miniaudio-0.11.22/000077500000000000000000000000001475701111600136365ustar00rootroot00000000000000miniaudio-0.11.22/.github/000077500000000000000000000000001475701111600151765ustar00rootroot00000000000000miniaudio-0.11.22/.github/CODE_OF_CONDUCT.md000066400000000000000000000003461475701111600200000ustar00rootroot00000000000000Code of Conduct =============== I don't believe we need a document telling fully grown adults how to conduct themselves within an open source community. All I ask is that you just don't be unpleasant and keep everything on topic. miniaudio-0.11.22/.github/FUNDING.yml000066400000000000000000000000201475701111600170030ustar00rootroot00000000000000github: mackron miniaudio-0.11.22/.github/ISSUE_TEMPLATE/000077500000000000000000000000001475701111600173615ustar00rootroot00000000000000miniaudio-0.11.22/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000006141475701111600220540ustar00rootroot00000000000000--- name: Bug report about: Submit a bug report. title: '' labels: '' assignees: '' --- **DELETE ALL OF THIS TEXT BEFORE SUBMITTING** If you think you've found a bug, it will be helpful to compile with `#define MA_DEBUG_OUTPUT`. If you are having issues with playback, please run the simple_payback_sine example and report whether or not it's consistent with what's happening in your program. miniaudio-0.11.22/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000005571475701111600231150ustar00rootroot00000000000000--- name: Feature request about: Submit a feature request. title: '' labels: feature request assignees: '' --- **DELETE ALL OF THIS TEXT BEFORE SUBMITTING** Thanks for your suggestion! Please make sure the feature doesn't already exist and that it's within the scope of the goals of the project. Otherwise go into as much detail as possible and we'll consider it! miniaudio-0.11.22/.github/ISSUE_TEMPLATE/general-issue.md000066400000000000000000000014631475701111600224520ustar00rootroot00000000000000--- name: General issue about: Submit a general issue. title: '' labels: '' assignees: '' --- **DELETE ALL OF THIS TEXT BEFORE SUBMITTING** If you have a question about how to use the library, please read the documentation at the top of miniaudio.h and take a look at the examples. If that still doesn't answer your question, consider posting in the Discussions section here on GitHub instead. Otherwise, feel free to post your issue and we'll get to it as soon as possible. If you have an issue with playback, please run the simple_playback_sine example first and check whether or not that is working. Likewise for capture, please run the simple_capture example. If these examples work, it probably (but not always) means you're doing something wrong and a question in the Discussions section is more appropriate. miniaudio-0.11.22/.github/pull_request_template.md000066400000000000000000000012531475701111600221400ustar00rootroot00000000000000**DELETE ALL OF THIS TEXT BEFORE SUBMITTING** Thanks for your contribution! Before submitting this pull request, make sure you're okay with your code being put into the public domain. By submitting this pull request we will assume you're agreeing this. In addition, please ensure you're respecting the goals of the project. Your pull request will be rejected if you do any of the following: * Split your code into multiple files * Include a dependency on an external library * Include copyrighted code Your pull request may still be rejected for other reasons to those listed above, but you will be informed of the reasons. Please base your branch off the `dev` branch. miniaudio-0.11.22/.gitignore000066400000000000000000000022431475701111600156270ustar00rootroot00000000000000\#docs/ /_private/ /build/ /debugging/ /evaluations/ /examples/build/bin/ /examples/build/codelite/ /examples/build/vc6/ /examples/build/vc15/ /examples/build/vc17/ /examples/simple_playback_sine.cpp /external/ogg/ /external/vorbis/ /external/opus/ /external/opusfile/ /extras/osaudio/tests/build/bin/ /extras/osaudio/tests/build/vc17/ /extras/osaudio/tests/build/watcom-dos/ /extras/backends/pipewire/a.out /extras/decoders/litewav/ /research/_build/ /tests/_build/bin/ /tests/_build/res/output/ /tests/_build/tcc/ /tests/_build/vc6/ /tests/_build/vc15/ /tests/_build/vc17/ /tests/_build/watcom/ /tests/_build/capture.wav /tests/_build/a.out /tests/_build/a.exe /tests/debugging/archive/ /tests/*.c /tests/*.cpp /tools/_build/ /website/docs/ *.vcxproj.user .vs/ .idea/ .vscode/ # Below are individual files that I may start version controlling later or delete outright. /examples/build/COSMO.txt /research/ma_fft.c /research/ma_hrtf.c /research/ma_atomic.c /research/miniaudio_engine.c /tests/stress/ /tools/codegen/miniaudio_amalgamator.c /tools/codegen/miniaudio_codegen_utils.c /tools/codegen/miniaudio_docgen.c /tools/codegen/miniaudio_hrtfgen.c /tools/codegen/miniaudio_splitter.cminiaudio-0.11.22/.gitmodules000066400000000000000000000000001475701111600160010ustar00rootroot00000000000000miniaudio-0.11.22/CHANGES.md000066400000000000000000002161771475701111600152460ustar00rootroot00000000000000v0.11.22 - 2025-02-24 ===================== * Starting from version 0.12, miniaudio will be switching to a split .c/h pair, away from a single header. In preparation for this, a file named "miniaudio.c" has been added to repository. Currently this is just a simple wrapper around miniaudio.h and `MINIAUDIO_IMPLEMENTATION`. Nothing has changed in miniaudio.h, however when version 0.12 is released you will need to use miniaudio.c for the implementation. It's recommended you start the transition away from `MINIAUDIO_IMPLEMENTATION` and towards miniaudio.c. If you want to keep building your project as a single translation unit, you can do `#include "miniaudio.c"` which will continue to be supported with version 0.12 and beyond. * In the extras folder, the `miniaudio_libvorbis.h` and `miniaudio_libopus.h` files have been deprecated. They have been replaced with versions in the `extras/decoders` folder. They are now split into a separate .c and .h files. The old files still exist for compatibility, but you need to transition over to the new versions. The transition should be trivial. Compile the .c files like a normal source file, and include the .h file like a normal header. * Add `MA_SOUND_FLAG_LOOPING` and `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING` flags. These can be used to initialize sounds and resource managed data sources to loop by default. This is the recommended way to enable looping for streams. The `isLooping` config option in `ma_sound_config` and `ma_resource_manager_data_source_config` has been deprecated. If you are using those, you should switch to the new flag or else you'll get compiler errors when upgrading to a future version. * `ma_rb_commit_read()`, `ma_rb_commit_write()`, `ma_pcm_rb_commit_read()` and `ma_pcm_rb_commit_write()` no longer return `MA_AT_END`. The reason for this change is that there's no real notion of an "end" in a ring buffer which makes this result code confusing. In addition, it's possible for these functions to return something other than `MA_SUCCESS` even when the operation completed successfully which adds to the confusion. The correct way to check if there is any more room in the ring buffer is to look at the frame count returned by `*rb_acquire_read/write()`. * The `ma_pcm_rb` data source implementation has been modified to pad output data with silence if there is not enough data in the ring buffer to fill the request. What this means is for an `ma_pcm_rb`, `ma_data_source_read_pcm_frames()` should no longer return a frame count of less than what you requested, and will therefore never return `MA_AT_END` which does not make sense for a ring buffer since it does not have the notion of an end. This change should make it much easier to use a ring buffer as the data source for a `ma_sound`. * There has been a minor change to `ma_calculate_buffer_size_in_milliseconds_from_frames()` to have it return a value rounded up to the nearest integer. * When initialization of a decoder fails, it will now return the first error code encountered rather than always returning `MA_NO_BACKEND` regardless of the error. * Add `ma_device_id_equal()` for comparing device IDs. * Add support for `MA_NO_RUNTIME_LINKING` to the AAudio backend. * Fix a buffer overrun bug with `ma_sound` processing. * Fix a bug relating to node detachment. * Fix a bug where amplification with `ma_device_set_master_volume()` does not work. * Fix a bug where sounds loaded with `MA_SOUND_FLAG_DECODE` do not loop. * Fix a bug with initialization of the band pass biquad filter. * Fix a bug where a device would output distorted audio if initialized without a data callback. * Fix various compiler and static analysis warnings. * Various documentation updates. * WASAPI: Fix an error when stopping the device. The "Failed to reset internal playback device." error should be significantly reduced in frequency. * WASAPI: Fix an error when stopping the device where it was possible miniaudio would not wait for the device to be drained due to an error with the wait time calculation. * WASAPI: Fix a COM related crash with device rerouting. * DirectSound: Add support for specifying an explicit window handle for SetCooperativeLevel(). * ALSA: Fix a bug where a playback device can fail to start. * ALSA: Fix some warnings relating to unhandled return value of `read()`. * Web: Fix ScriptProcessorNode path when compiling with `--closure=1`. Note that the Audio Worklets path is not currently working due to the callback specified in `emscripten_create_wasm_audio_worklet_processor_async` never getting fired. * Web: Fix an error with the unlocked notification when compiling as C++. * Web: Fix a JavaScript error when initializing and then uninitializing a context before any interactivity. * Web: miniaudio will now enable threading when the `-pthread` command line flag is used. * Web: Infrastructure has been added to support configurable buffer sizes. In practice this is still restricted to 128 frames, but once Emscripten adds full support for configuration of the buffer size, it will be trivial to add support to miniaudio. * AAudio: Fix some crashes relating to stream rerouting. * AAudio: Fix an error where the device is silenced after rerouting. With this change, miniaudio will no longer give AAudio a hint to use your supplied period size which will therefore result in AAudio using its default latency configuration. If you want AAudio to try to use the period size you supply in the device config, which is the old behaviour, set `aaudio.allowSetBufferCapacity` to true in the device config. Note, however, if you do this you may end up with errors when rerouting between devices. * AAudio: The default minimum SDK version has been increased from 26 to 27 when enabling AAudio. If you need to support version 26, you can use `#define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 26`. * AAudio: Fix ma_device_get_info() implementation. * AAudio: Fix an error when an assertion can trigger due to AAudio reporting a frame count of 0. * PulseAudio: Add a configuration option to control the PulseAudio-defined channel map to use. * PulseAudio: Fix an extremely unlikely race condition with device initialization. * PulseAudio: Fix a bug with the miniaudio-generated stream name. Previously this would create names like "miniaudi0" when it was supposed to be "miniaudio:0". * iOS: Fix an error when trying to capture audio from the simulator with iOS version 16 and newer. * sndio: Fix a crash with device uninitialization. v0.11.21 - 2023-11-15 ===================== * Add new ma_device_notification_type_unlocked notification. This is used on Web and will be fired after the user has performed a gesture and thus unlocked the ability to play audio. * Web: Fix an error where the buffer size is incorrectly calculated. * Core Audio: Fix a -Wshadow warning. v0.11.20 - 2023-11-10 ===================== * Fix a compilation error with iOS. * Fix an error when dynamically linking libraries when forcing the UWP build on desktop. v0.11.19 - 2023-11-04 ===================== * Fix a bug where `ma_decoder_init_file()` can incorrectly return successfully. * Fix a crash when using a node with more than 2 outputs. * Fix a bug where `ma_standard_sample_rate_11025` uses the incorrect rate. * Fix a bug in `ma_noise` where only white noise would be generated even when specifying pink or Brownian. * Fix an SSE related bug when converting from mono streams. * Documentation fixes. * Remove the use of some deprecated functions. * Improvements to runtime linking on Apple platforms. * Web / Emscripten: Audio will no longer attempt to unlock in response to the "touchstart" event. This addresses an issue with iOS and Safari. This results in a change of behavior if you were previously depending on starting audio when the user's finger first touches the screen. Audio will now only unlock when the user's finger is lifted. See this discussion for details: https://github.com/mackron/miniaudio/issues/759 * Web / Emscripten: Fix an error when using a sample rate of 0 in the device config. v0.11.18 - 2023-08-07 ===================== * Fix some AIFF compatibility issues. * Fix an error where the cursor of a Vorbis stream is incorrectly incremented. * Add support for setting a callback on an `ma_engine` object that get's fired after it processes a chunk of audio. This allows applications to do things such as apply a post-processing effect or output the audio to a file. * Add `ma_engine_get_volume()`. * Add `ma_sound_get_time_in_milliseconds()`. * Decouple `MA_API` and `MA_PRIVATE`. This relaxes applications from needing to define both of them if they're only wanting to redefine one. * Decoding backends will now have their onInitFile/W and onInitMemory initialization routines used where appropriate if they're defined. * Increase the accuracy of the linear resampler when setting the ratio with `ma_linear_resampler_set_rate_ratio()`. * Fix erroneous output with the linear resampler when in/out rates are the same. * AAudio: Fix an error where the buffer size is not configured correctly which sometimes results in excessively high latency. * ALSA: Fix a possible error when stopping and restarting a device. * PulseAudio: Minor changes to stream flags. * Win32: Fix an error where `CoUninialize()` is being called when the corresponding `CoInitializeEx()` fails. * Web / Emscripten: Add support for AudioWorklets. This is opt-in and can be enabled by defining `MA_ENABLE_AUDIO_WORKLETS`. You must compile with `-sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY` for this to work. Requires at least Emscripten v3.1.32. v0.11.17 - 2023-05-27 ===================== * Fix compilation errors with MA_USE_STDINT. * Fix a possible runtime error with Windows 95/98. * Fix a very minor linting warning in VS2022. * Add support for AIFF/AIFC decoding. * Add support for RIFX decoding. * Work around some bad code generation by Clang. * Amalgamations of dr_wav, dr_flac, dr_mp3 and c89atomic have been updated so that they're now fully namespaced. This allows each of these libraries to be able to be used alongside miniaudio without any conflicts. In addition, some duplicate code, such as sized type declarations, result codes, etc. has been removed. v0.11.16 - 2023-05-15 ===================== * Fix a memory leak with `ma_sound_init_copy()`. * Improve performance of `ma_sound_init_*()` when using the `ASYNC | DECODE` flag combination. v0.11.15 - 2023-04-30 ===================== * Fix a bug where initialization of a duplex device fails on some backends. * Fix a bug in ma_gainer where smoothing isn't applied correctly thus resulting in glitching. * Add support for volume smoothing to sounds when changing the volume with `ma_sound_set_volume()`. To use this, you must configure it via the `volumeSmoothTimeInPCMFrames` member of ma_sound_config and use `ma_sound_init_ex()` to initialize your sound. Smoothing is disabled by default. * WASAPI: Fix a possible buffer overrun when initializing a device. * WASAPI: Make device initialization more robust by improving the handling of the querying of the internal data format. v0.11.14 - 2023-03-29 ===================== * Fix some pedantic warnings when compiling with GCC. * Fix some crashes with the WAV decoder when loading an invalid file. * Fix a channel mapping error with PipeWire which results in no audio being output. * Add support for using `ma_pcm_rb` as a data source. * Silence some C89 compatibility warnings with Clang. * The `pBytesRead` parameter of the VFS onRead callback is now pre-initialized to zero. v0.11.13 - 2023-03-23 ===================== * Fix compilation errors with the C++ build. * Fix compilation errors when WIN32_LEAN_AND_MEAN is defined. v0.11.12 - 2023-03-19 ===================== * Fix a bug with data source ranges which resulted in data being read from outside the range. * Fix a crash due to a race condition in the resource manager. * Fix a crash with some backends when rerouting the playback side of a duplex device. * Fix some bugs with initialization of POSIX threads. * Fix a bug where sounds are not resampled when `MA_SOUND_NO_PITCH` is used. * Fix a bug where changing the range of a data source would result in no audio being read. * Fix a bug where asynchronously loaded data sources via the resources manager would reset ranges and loop points. * Fix some Wimplicit-fallthrough warnings. * Add support for Windows 95/98. * Add support for configuring the stack size of resource manager job threads. * Add support for callback notifications when a sound reaches the end. * Optimizations to the high level API. * Remove the old runtime linking system for pthread. The `MA_USE_RUNTIME_LINKING_FOR_PTHREAD` option is no longer used. * WASAPI: Fix a crash when starting a device while it's in the process of rerouting. * Windows: Remove the Windows-specific default memcpy(), malloc(), etc. v0.11.11 - 2022-11-04 ===================== * Silence an unused variable warning. * Remove references to ccall() from the Empscripten build. * Improve Android detection. * WASAPI: Some minor improvements to overrun recovery for capture and duplex modes. v0.11.10 - 2022-10-20 ===================== * Add support for setting the device notification callback when initializing an engine object. * Add support for more than 2 outputs to splitter nodes. * Fix a crash when initializing a channel converter. * Fix a channel mapping error where weights are calculated incorrectly. * Fix an unaligned access error. * Fix logging with the C++ build. * Fix some undefined behavior errors, including some memset()'s to null pointers of 0 bytes. * Fix logging of device info for loopback devices. * WASAPI: Fix an error where 32-bit formats are not properly detected. * WASAPI: Fix a bug where the device is not drained when stopped. * WASAPI: Fix an issue with loopback mode that results in waiting indefinitely and the callback never getting fired. * WASAPI: Add support for the Avrt API to specify the audio thread's latency sensitivity requirements. Use the `deviceConfig.wasapi.usage` configuration option. * PulseAudio: Pass the requested sample rate, if set, to PulseAudio so that it uses the requested sample rate internally rather than always using miniaudio's resampler. * PulseAudio: Fix a rare null pointer dereference. * ALSA: Fix a potential crash on older versions of Linux. * Core Audio: Fix a very unlikely memory leak. * Core Audio: Update a deprecated symbol. * AAudio: Fix an error where the wrong tokens are being used for usage, content types and input preset hints. * WebAudio: Do some cleanup of the internal global JavaScript object when the last context has been uninitialized. * Win32: Fix an error when the channel mask reported by Windows is all zero. * Various documentation fixes. * Bring dr_wav, dr_flac and dr_mp3 up-to-date with latest versions. v0.11.9 - 2022-04-20 ==================== * Fix some bugs where looping doesn't work with the resource manager. * Fix a crash when seeking a sound. * Fix a subtle bug the results in a glitch when looping a decoder when resampling is being applied. * Fix an issue where chaining streams would not result in a seamless transition. * Add a new flag called MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH for use with resource managed data sources. This flag is used as a hint to the resource manager that the length of the data source is unknown and calling ma_data_source_get_length_in_pcm_frames() should be avoided. * Add support for resetting a resampler. This is useful for resetting the internal timer and clearing the internal cache for when you want to seek the input sound source back to the start. * Add support for clearing the cache from biquads and low-pass filters. v0.11.8 - 2022-02-12 ==================== * PulseAudio: Work around bugs in PipeWire: - PipeWire is returning AUX channels for stereo streams instead of FL/FR. This workaround forces FL/FR for stereo streams. - PipeWire will glitch when the buffer size is too small, but still well within reasonable limits. To work around this bug, the default buffer size on PulseAudio backends is now 25ms. You can override this in the device config. This bug does not exist with regular PulseAudio, but the new default buffer size will still apply because I'm not aware of a good way to detect if PipeWire is being used. If anybody has advice on how to detect this, I'm happy to listen! * DirectSound: Increase the minimum period size from 20ms to 30ms. * Return `MA_SUCCESS` from `ma_device_start()` and `ma_device_stopped()` if the device is already started or stopped respectively. * Fix an incorrect assertion in the data converter. * Fix a compilation error with ARM builds. v0.11.7 - 2022-02-06 ==================== * Fix an error when seeking to the end of a WAV file. * Fix a memory leak with low-pass, high-pass and band-pass filters. * Fix some bugs in the FLAC decoder. * Fix a -Wundef warning v0.11.6 - 2022-01-22 ==================== * WASAPI: Fix a bug where the device is not stopped when an error occurs when writing to a playback device. * PulseAudio: Fix a rare crash due to a division by zero. * The node graph can now be used as a node. This allows node graphs to be connected to other node graphs. * Fix a crash with high-pass and band-pass filters. * Fix an audio glitch when mixing engine nodes (ma_sound and ma_sound_group). * Add some new helper APIs for cursor and length retrieval: - ma_data_source_get_cursor_in_seconds() - ma_data_source_get_length_in_seconds() - ma_sound_get_cursor_in_seconds() - ma_sound_get_length_in_seconds() v0.11.5 - 2022-01-16 ==================== * WASAPI: Fix a bug in duplex mode when the capture and playback devices have different native sample rates. * AAudio: Add support for automatic stream routing. * iOS: The interruption_began notification now automatically calls `ma_device_stop()`. This allows `ma_device_start()` to work as expected when called from interruption_ended. * iOS: Fix a bug that results in a deadlock when stopping the device in response to the interruption_begain or interruption_ended notifications. * Fix a bug with fixed sized callbacks that results in glitches in duplex mode. * Fix a bug that results in a deadlock when starting a device. * ma_engine_play_sound_ex() is now publicly visible. * Add validation to ma_sound_set_pitch() to prevent negative pitches. * Add validation to resamplers to prevent negative ratios. --------------------------------------------------------------------------------------------------- v0.11.4 - 2022-01-12 - AAudio: Add initial support for automatic stream routing. - Add support for initializing an encoder from a VFS. - Fix a bug when initializing an encoder from a file where the file handle does not get closed in the event of an error. v0.11.3 - 2022-01-07 - Add a new flag for nodes called MA_NODE_FLAG_SILENT_OUTPUT which tells miniaudio that the output of the node should always be treated as silence. This gives miniaudio an optimization opportunity by skipping mixing of those nodes. Useful for special nodes that need to have their outputs wired up to the graph so they're processed, but don't want the output to contribute to the final mix. - Add support for fixed sized callbacks. With this change, the data callback will be fired with a consistent frame count based on the periodSizeInFrames or periodSizeInMilliseconds config variable (depending on which one is used). If the period size is not specified, the backend's internal period size will be used. Under the hood this uses an intermediary buffer which introduces a small inefficiency. To avoid this you can use the `noFixedSizedCallback` config variable and set it to true. This will make the callback equivalent to the way it was before this change and will avoid the intermediary buffer, but the data callback could get fired with an inconsistent frame count which might cause problems where certain operations need to operate on fixed sized chunks. - Change the logging system to always process debug log messages. This is useful for allowing debug and test builds of applications to output debug information that can later be passed on for debugging in miniaudio. To filter out these messages, just filter against the log level which will be MA_LOG_LEVEL_DEBUG. - Change the wav decoder to pick the closest format to the source file by default if no preferred format is specified. - Fix a bug where ma_device_get_info() and ma_device_get_name() return an error. - Fix a bug where ma_data_source_read_pcm_frames() can return MA_AT_END even when some data has been read. MA_AT_END should only be returned when nothing has been read. - PulseAudio: Fix some bugs where starting and stopping a device can result in a deadlock. v0.11.2 - 2021-12-31 - Add a new device notification system to replace the stop callback. The stop callback is still in place, but will be removed in version 0.12. New code should use the notificationCallback member in the device config instead of stopCallback. - Fix a bug where the stopped notification doesn't get fired. - iOS: The IO buffer size is now configured based on the device's configured period size. - WebAudio: Optimizations to some JavaScript code. v0.11.1 - 2021-12-27 - Result codes are now declared as an enum rather than #defines. - Channel positions (MA_CHANNEL_*) are now declared as an enum rather than #defines. - Add ma_device_get_info() for retrieving device information from an initialized device. - Add ma_device_get_name() for retrieving the name of an initialized device. - Add support for setting the directional attenuation factor to sounds and groups. - Fix a crash when passing in NULL for the pEngine parameter of ma_engine_init(). - Fix a bug where the node graph will output silence if a node has zero input connections. - Fix a bug in the engine where sounds in front of the listener are too loud. - AAudio: Fix an incorrect assert. - AAudio: Fix a bug that resulted in exclusive mode always resulting in initialization failure. - AAudio: Fix a bug that resulted in a capture device incorrectly being detected as disconnected. - OpenSL: Fix an error when initializing a device with a non-NULL device ID. - OpenSL: Fix some bugs with device initialization. v0.11.0 - 2021-12-18 - Add a node graph system for advanced mixing and effect processing. - Add a resource manager for loading and streaming sounds. - Add a high level engine API for sound management and mixing. This wraps around the node graph and resource manager. - Add support for custom resmplers. - Add ma_decoder_get_data_format(). - Add support for disabling denormals on the audio thread. - Add a delay/echo effect called ma_delay. - Add a stereo pan effect called ma_panner. - Add a spatializer effect called ma_spatializer. - Add support for amplification for device master volume. - Remove dependency on MA_MAX_CHANNELS from filters and data conversion. - Increase MA_MAX_CHANNELS from 32 to 254. - API CHANGE: Changes have been made to the way custom data sources are made. See documentation on how to implement custom data sources. - API CHANGE: Remove ma_data_source_map() and ma_data_source_unmap() - API CHANGE: Remove the `loop` parameter from ma_data_source_read_pcm_frames(). Use ma_data_source_set_looping() to enable or disable looping. - API CHANGE: Remove ma_channel_mix_mode_planar_blend. Use ma_channel_mix_mode_rectangular instead. - API CHANGE: Remove MA_MIN_SAMPLE_RATE and MA_MAX_SAMPLE_RATE. Use ma_standard_sample_rate_min and ma_standard_sample_rate_max instead. - API CHANGE: Changes have been made to the ma_device_info structure. See documentation for details of these changes. - API CHANGE: Remove the `shareMode` parameter from ma_context_get_device_info(). - API CHANGE: Rename noPreZeroedOutputBuffer to noPreSilencedOutputBuffer in the device config. - API CHANGE: Remove pBufferOut parameter from ring buffer commit functions. - API CHANGE: Remove ma_zero_pcm_frames(). Use ma_silence_pcm_frames() instead. - API CHANGE: Change ma_clip_samples_f32() to take input and output buffers rather than working exclusively in-place. - API CHANGE: Remove ma_clip_pcm_frames_f32(). Use ma_clip_samples_f32() or ma_clip_pcm_frames() instead. - API CHANGE: Remove the onLog callback from the context config and replaced with a more flexible system. See the documentation for how to use logging. - API CHANGE: Remove MA_LOG_LEVEL_VERBOSE and add MA_LOG_LEVEL_DEBUG. Logs using the MA_LOG_LEVEL_DEBUG logging level will only be output when miniaudio is compiled with the MA_DEBUG_OUTPUT option. - API CHANGE: MA_LOG_LEVEL has been removed. All log levels will be posted, except for MA_LOG_LEVEL_DEBUG which will only be output when MA_DEBUG_OUTPUT is enabled. - API CHANGE: Rename ma_resource_format to ma_encoding_format. - API CHANGE: Remove all encoding-specific initialization routines for decoders. Use the encodingFormat properties in the decoder config instead. - API CHANGE: Change ma_decoder_get_length_in_pcm_frames() to return a result code and output the number of frames read via an output parameter. - API CHANGE: Allocation callbacks must now implement the onRealloc() callback. - API CHANGE: Remove ma_get_standard_channel_map() and add ma_channel_map_init_standard(). - API CHANGE: Rename ma_channel_map_valid() to ma_channel_map_is_valid(). - API CHANGE: Rename ma_channel_map_equal() to ma_channel_map_is_equal(). - API CHANGE: Rename ma_channel_map_blank() to ma_channel_map_is_blank(). - API CHANGE: Remove the Speex resampler. Use a custom resampler instead. - API CHANGE: Change the following resampler APIs to return a result code and output their result via an output parameter: - ma_linear_resampler_get_required_input_frame_count() - ma_linear_resampler_get_expected_output_frame_count() - ma_resampler_get_required_input_frame_count() - ma_resampler_get_expected_output_frame_count() - API CHANGE: Update relevant init/uninit functions to take a pointer to allocation callbacks. - API CHANGE: Remove ma_scale_buffer_size() - API CHANGE: Update ma_encoder_write_pcm_frames() to return a result code and output the number of frames written via an output parameter. - API CHANGE: Update ma_noise_read_pcm_frames() to return a result code and output the number of frames read via an output parameter. - API CHANGE: Update ma_waveform_read_pcm_frames() to return a result code and output the number of frames read via an output parameter. - API CHANGE: Remove The MA_STATE_* and add ma_device_state_* enums. - API CHANGE: Rename ma_factor_to_gain_db() to ma_volume_linear_to_db(). - API CHANGE: Rename ma_gain_db_to_factor() to ma_volume_db_to_linear(). - API CHANGE: Rename ma_device_set_master_gain_db() to ma_device_set_master_volume_db(). - API CHANGE: Rename ma_device_get_master_gain_db() to ma_device_get_master_volume_db() v0.10.43 - 2021-12-10 - ALSA: Fix use of uninitialized variables. - ALSA: Fix enumeration of devices that support both playback and capture. - PulseAudio: Fix a possible division by zero. - WebAudio: Fix errors in strict mode. v0.10.42 - 2021-08-22 - Fix a possible deadlock when stopping devices. v0.10.41 - 2021-08-15 - Core Audio: Fix some deadlock errors. v0.10.40 - 2021-07-23 - Fix a bug when converting from stereo to mono. - PulseAudio: Fix a glitch when pausing and resuming a device. v0.10.39 - 2021-07-20 - Core Audio: Fix a deadlock when the default device is changed. - Core Audio: Fix compilation errors on macOS and iOS. - PulseAudio: Fix a bug where the stop callback is not fired when a device is unplugged. - PulseAudio: Fix a null pointer dereference. v0.10.38 - 2021-07-14 - Fix a linking error when MA_DEBUG_OUTPUT is not enabled. - Fix an error where ma_log_postv() does not return a value. - OpenSL: Fix a bug with setting of stream types and recording presets. 0.10.37 - 2021-07-06 - Fix a bug with log message formatting. - Fix build when compiling with MA_NO_THREADING. - Minor updates to channel mapping. 0.10.36 - 2021-07-03 - Add support for custom decoding backends. - Fix some bugs with the Vorbis decoder. - PulseAudio: Fix a bug with channel mapping. - PulseAudio: Fix a bug where miniaudio does not fall back to a supported format when PulseAudio defaults to a format not known to miniaudio. - OpenSL: Fix a crash when initializing a capture device when a recording preset other than the default is specified. - Silence some warnings when compiling with MA_DEBUG_OUTPUT - Improvements to logging. See the `ma_log` API for details. The logCallback variable used by ma_context has been deprecated and will be replaced with the new system in version 0.11. - Initialize an `ma_log` object with `ma_log_init()`. - Register a callback with `ma_log_register_callback()`. - In the context config, set `pLog` to your `ma_log` object and stop using `logCallback`. - Prep work for some upcoming changes to data sources. These changes are still compatible with existing code, however code will need to be updated in preparation for version 0.11 which will be breaking. You should make these changes now for any custom data sources: - Change your base data source object from `ma_data_source_callbacks` to `ma_data_source_base`. - Call `ma_data_source_init()` for your base object in your custom data source's initialization routine. This takes a config object which includes a pointer to a vtable which is now where your custom callbacks are defined. - Call `ma_data_source_uninit()` in your custom data source's uninitialization routine. This doesn't currently do anything, but it placeholder in case some future uninitialization code is required to be added at a later date. v0.10.35 - 2021-04-27 - Fix the C++ build. v0.10.34 - 2021-04-26 - WASAPI: Fix a bug where a result code is not getting checked at initialization time. - WASAPI: Bug fixes for loopback mode. - ALSA: Fix a possible deadlock when stopping devices. - Mark devices as default on the null backend. v0.10.33 - 2021-04-04 - Core Audio: Fix a memory leak. - Core Audio: Fix a bug where the performance profile is not being used by playback devices. - JACK: Fix loading of 64-bit JACK on Windows. - Fix a calculation error and add a safety check to the following APIs to prevent a division by zero: - ma_calculate_buffer_size_in_milliseconds_from_frames() - ma_calculate_buffer_size_in_frames_from_milliseconds() - Fix compilation errors relating to c89atomic. - Update FLAC decoder. v0.10.32 - 2021-02-23 - WASAPI: Fix a deadlock in exclusive mode. - WASAPI: No longer return an error from ma_context_get_device_info() when an exclusive mode format cannot be retrieved. - WASAPI: Attempt to fix some bugs with device uninitialization. - PulseAudio: Yet another refactor, this time to remove the dependency on `pa_threaded_mainloop`. - Web Audio: Fix a bug on Chrome and any other browser using the same engine. - Web Audio: Automatically start the device on some user input if the device has been started. This is to work around Google's policy of not starting audio if no user input has yet been performed. - Fix a bug where thread handles are not being freed. - Fix some static analysis warnings in FLAC, WAV and MP3 decoders. - Fix a warning due to referencing _MSC_VER when it is undefined. - Update to latest version of c89atomic. - Internal refactoring to migrate over to the new backend callback system for the following backends: - PulseAudio - ALSA - Core Audio - AAudio - OpenSL|ES - OSS - audio(4) - sndio v0.10.31 - 2021-01-17 - Make some functions const correct. - Update ma_data_source_read_pcm_frames() to initialize pFramesRead to 0 for safety. - Add the MA_ATOMIC annotation for use with variables that should be used atomically and remove unnecessary volatile qualifiers. - Add support for enabling only specific backends at compile time. This is the reverse of the pre-existing system. With the new system, all backends are first disabled with `MA_ENABLE_ONLY_SPECIFIC_BACKENDS`, which is then followed with `MA_ENABLE_*`. The old system where you disable backends with `MA_NO_*` still exists and is still the default. v0.10.30 - 2021-01-10 - Fix a crash in ma_audio_buffer_read_pcm_frames(). - Update spinlock APIs to take a volatile parameter as input. - Silence some unused parameter warnings. - Fix a warning on GCC when compiling as C++. v0.10.29 - 2020-12-26 - Fix some subtle multi-threading bugs on non-x86 platforms. - Fix a bug resulting in superfluous memory allocations when enumerating devices. - Core Audio: Fix a compilation error when compiling for iOS. v0.10.28 - 2020-12-16 - Fix a crash when initializing a POSIX thread. - OpenSL|ES: Respect the MA_NO_RUNTIME_LINKING option. v0.10.27 - 2020-12-04 - Add support for dynamically configuring some properties of `ma_noise` objects post-initialization. - Add support for configuring the channel mixing mode in the device config. - Fix a bug with simple channel mixing mode (drop or silence excess channels). - Fix some bugs with trying to access uninitialized variables. - Fix some errors with stopping devices for synchronous backends where the backend's stop callback would get fired twice. - Fix a bug in the decoder due to using an uninitialized variable. - Fix some data race errors. v0.10.26 - 2020-11-24 - WASAPI: Fix a bug where the exclusive mode format may not be retrieved correctly due to accessing freed memory. - Fix a bug with ma_waveform where glitching occurs after changing frequency. - Fix compilation with OpenWatcom. - Fix compilation with TCC. - Fix compilation with Digital Mars. - Fix compilation warnings. - Remove bitfields from public structures to aid in binding maintenance. v0.10.25 - 2020-11-15 - PulseAudio: Fix a bug where the stop callback isn't fired. - WebAudio: Fix an error that occurs when Emscripten increases the size of its heap. - Custom Backends: Change the onContextInit and onDeviceInit callbacks to take a parameter which is a pointer to the config that was passed into ma_context_init() and ma_device_init(). This replaces the deviceType parameter of onDeviceInit. - Fix compilation warnings on older versions of GCC. v0.10.24 - 2020-11-10 - Fix a bug where initialization of a backend can fail due to some bad state being set from a prior failed attempt at initializing a lower priority backend. v0.10.23 - 2020-11-09 - AAudio: Add support for configuring a playback stream's usage. - Fix a compilation error when all built-in asynchronous backends are disabled at compile time. - Fix compilation errors when compiling as C++. v0.10.22 - 2020-11-08 - Add support for custom backends. - Add support for detecting default devices during device enumeration and with `ma_context_get_device_info()`. - Refactor to the PulseAudio backend. This simplifies the implementation and fixes a capture bug. - ALSA: Fix a bug in `ma_context_get_device_info()` where the PCM handle is left open in the event of an error. - Core Audio: Further improvements to sample rate selection. - Core Audio: Fix some bugs with capture mode. - OpenSL: Add support for configuring stream types and recording presets. - AAudio: Add support for configuring content types and input presets. - Fix bugs in `ma_decoder_init_file*()` where the file handle is not closed after a decoding error. - Fix some compilation warnings on GCC and Clang relating to the Speex resampler. - Fix a compilation error for the Linux build when the ALSA and JACK backends are both disabled. - Fix a compilation error for the BSD build. - Fix some compilation errors on older versions of GCC. - Add documentation for `MA_NO_RUNTIME_LINKING`. v0.10.21 - 2020-10-30 - Add ma_is_backend_enabled() and ma_get_enabled_backends() for retrieving enabled backends at run-time. - WASAPI: Fix a copy and paste bug relating to loopback mode. - Core Audio: Fix a bug when using multiple contexts. - Core Audio: Fix a compilation warning. - Core Audio: Improvements to sample rate selection. - Core Audio: Improvements to format/channels/rate selection when requesting defaults. - Core Audio: Add notes regarding the Apple notarization process. - Fix some bugs due to null pointer dereferences. v0.10.20 - 2020-10-06 - Fix build errors with UWP. - Minor documentation updates. v0.10.19 - 2020-09-22 - WASAPI: Return an error when exclusive mode is requested, but the native format is not supported by miniaudio. - Fix a bug where ma_decoder_seek_to_pcm_frames() never returns MA_SUCCESS even though it was successful. - Store the sample rate in the `ma_lpf` and `ma_hpf` structures. v0.10.18 - 2020-08-30 - Fix build errors with VC6. - Fix a bug in channel converter for s32 format. - Change channel converter configs to use the default channel map instead of a blank channel map when no channel map is specified when initializing the config. This fixes an issue where the optimized mono expansion path would never get used. - Use a more appropriate default format for FLAC decoders. This will now use ma_format_s16 when the FLAC is encoded as 16-bit. - Update FLAC decoder. - Update links to point to the new repository location (https://github.com/mackron/miniaudio). v0.10.17 - 2020-08-28 - Fix an error where the WAV codec is incorrectly excluded from the build depending on which compile time options are set. - Fix a bug in ma_audio_buffer_read_pcm_frames() where it isn't returning the correct number of frames processed. - Fix compilation error on Android. - Core Audio: Fix a bug with full-duplex mode. - Add ma_decoder_get_cursor_in_pcm_frames(). - Update WAV codec. v0.10.16 - 2020-08-14 - WASAPI: Fix a potential crash due to using an uninitialized variable. - OpenSL: Enable runtime linking. - OpenSL: Fix a multithreading bug when initializing and uninitializing multiple contexts at the same time. - iOS: Improvements to device enumeration. - Fix a crash in ma_data_source_read_pcm_frames() when the output frame count parameter is NULL. - Fix a bug in ma_data_source_read_pcm_frames() where looping doesn't work. - Fix some compilation warnings on Windows when both DirectSound and WinMM are disabled. - Fix some compilation warnings when no decoders are enabled. - Add ma_audio_buffer_get_available_frames(). - Add ma_decoder_get_available_frames(). - Add sample rate to ma_data_source_get_data_format(). - Change volume APIs to take 64-bit frame counts. - Updates to documentation. v0.10.15 - 2020-07-15 - Fix a bug when converting bit-masked channel maps to miniaudio channel maps. This affects the WASAPI and OpenSL backends. v0.10.14 - 2020-07-14 - Fix compilation errors on Android. - Fix compilation errors with -march=armv6. - Updates to the documentation. v0.10.13 - 2020-07-11 - Fix some potential buffer overflow errors with channel maps when channel counts are greater than MA_MAX_CHANNELS. - Fix compilation error on Emscripten. - Silence some unused function warnings. - Increase the default buffer size on the Web Audio backend. This fixes glitching issues on some browsers. - Bring FLAC decoder up-to-date with dr_flac. - Bring MP3 decoder up-to-date with dr_mp3. v0.10.12 - 2020-07-04 - Fix compilation errors on the iOS build. v0.10.11 - 2020-06-28 - Fix some bugs with device tracking on Core Audio. - Updates to documentation. v0.10.10 - 2020-06-26 - Add include guard for the implementation section. - Mark ma_device_sink_info_callback() as static. - Fix compilation errors with MA_NO_DECODING and MA_NO_ENCODING. - Fix compilation errors with MA_NO_DEVICE_IO v0.10.9 - 2020-06-24 - Amalgamation of dr_wav, dr_flac and dr_mp3. With this change, including the header section of these libraries before the implementation of miniaudio is no longer required. Decoding of WAV, FLAC and MP3 should be supported seamlessly without any additional libraries. Decoders can be excluded from the build with the following options: - MA_NO_WAV - MA_NO_FLAC - MA_NO_MP3 If you get errors about multiple definitions you need to either enable the options above, move the implementation of dr_wav, dr_flac and/or dr_mp3 to before the implementation of miniaudio, or update dr_wav, dr_flac and/or dr_mp3. - Changes to the internal atomics library. This has been replaced with c89atomic.h which is embedded within this file. - Fix a bug when a decoding backend reports configurations outside the limits of miniaudio's decoder abstraction. - Fix the UWP build. - Fix the Core Audio build. - Fix the -std=c89 build on GCC. v0.10.8 - 2020-06-22 - Remove dependency on ma_context from mutexes. - Change ma_data_source_read_pcm_frames() to return a result code and output the frames read as an output parameter. - Change ma_data_source_seek_pcm_frames() to return a result code and output the frames seeked as an output parameter. - Change ma_audio_buffer_unmap() to return MA_AT_END when the end has been reached. This should be considered successful. - Change playback.pDeviceID and capture.pDeviceID to constant pointers in ma_device_config. - Add support for initializing decoders from a virtual file system object. This is achieved via the ma_vfs API and allows the application to customize file IO for the loading and reading of raw audio data. Passing in NULL for the VFS will use defaults. New APIs: - ma_decoder_init_vfs() - ma_decoder_init_vfs_wav() - ma_decoder_init_vfs_flac() - ma_decoder_init_vfs_mp3() - ma_decoder_init_vfs_vorbis() - ma_decoder_init_vfs_w() - ma_decoder_init_vfs_wav_w() - ma_decoder_init_vfs_flac_w() - ma_decoder_init_vfs_mp3_w() - ma_decoder_init_vfs_vorbis_w() - Add support for memory mapping to ma_data_source. - ma_data_source_map() - ma_data_source_unmap() - Add ma_offset_pcm_frames_ptr() and ma_offset_pcm_frames_const_ptr() which can be used for offsetting a pointer by a specified number of PCM frames. - Add initial implementation of ma_yield() which is useful for spin locks which will be used in some upcoming work. - Add documentation for log levels. - The ma_event API has been made public in preparation for some uncoming work. - Fix a bug in ma_decoder_seek_to_pcm_frame() where the internal sample rate is not being taken into account for determining the seek location. - Fix some bugs with the linear resampler when dynamically changing the sample rate. - Fix compilation errors with MA_NO_DEVICE_IO. - Fix some warnings with GCC and -std=c89. - Fix some formatting warnings with GCC and -Wall and -Wpedantic. - Fix some warnings with VC6. - Minor optimization to ma_copy_pcm_frames(). This is now a no-op when the input and output buffers are the same. v0.10.7 - 2020-05-25 - Fix a compilation error in the C++ build. - Silence a warning. v0.10.6 - 2020-05-24 - Change ma_clip_samples_f32() and ma_clip_pcm_frames_f32() to take a 64-bit sample/frame count. - Change ma_zero_pcm_frames() to clear to 128 for ma_format_u8. - Add ma_silence_pcm_frames() which replaces ma_zero_pcm_frames(). ma_zero_pcm_frames() will be removed in version 0.11. - Add support for u8, s24 and s32 formats to ma_channel_converter. - Add compile-time and run-time version querying. - MA_VERSION_MINOR - MA_VERSION_MAJOR - MA_VERSION_REVISION - MA_VERSION_STRING - ma_version() - ma_version_string() - Add ma_audio_buffer for reading raw audio data directly from memory. - Fix a bug in shuffle mode in ma_channel_converter. - Fix compilation errors in certain configurations for ALSA and PulseAudio. - The data callback now initializes the output buffer to 128 when the playback sample format is ma_format_u8. v0.10.5 - 2020-05-05 - Change ma_zero_pcm_frames() to take a 64-bit frame count. - Add ma_copy_pcm_frames(). - Add MA_NO_GENERATION build option to exclude the `ma_waveform` and `ma_noise` APIs from the build. - Add support for formatted logging to the VC6 build. - Fix a crash in the linear resampler when LPF order is 0. - Fix compilation errors and warnings with older versions of Visual Studio. - Minor documentation updates. v0.10.4 - 2020-04-12 - Fix a data conversion bug when converting from the client format to the native device format. v0.10.3 - 2020-04-07 - Bring up to date with breaking changes to dr_mp3. - Remove MA_NO_STDIO. This was causing compilation errors and the maintenance cost versus practical benefit is no longer worthwhile. - Fix a bug with data conversion where it was unnecessarily converting to s16 or f32 and then straight back to the original format. - Fix compilation errors and warnings with Visual Studio 2005. - ALSA: Disable ALSA's automatic data conversion by default and add configuration options to the device config: - alsa.noAutoFormat - alsa.noAutoChannels - alsa.noAutoResample - WASAPI: Add some overrun recovery for ma_device_type_capture devices. v0.10.2 - 2020-03-22 - Decorate some APIs with MA_API which were missed in the previous version. - Fix a bug in ma_linear_resampler_set_rate() and ma_linear_resampler_set_rate_ratio(). v0.10.1 - 2020-03-17 - Add MA_API decoration. This can be customized by defining it before including miniaudio.h. - Fix a bug where opening a file would return a success code when in fact it failed. - Fix compilation errors with Visual Studio 6 and 2003. - Fix warnings on macOS. v0.10.0 - 2020-03-07 - API CHANGE: Refactor data conversion APIs - ma_format_converter has been removed. Use ma_convert_pcm_frames_format() instead. - ma_channel_router has been replaced with ma_channel_converter. - ma_src has been replaced with ma_resampler - ma_pcm_converter has been replaced with ma_data_converter - API CHANGE: Add support for custom memory allocation callbacks. The following APIs have been updated to take an extra parameter for the allocation callbacks: - ma_malloc() - ma_realloc() - ma_free() - ma_aligned_malloc() - ma_aligned_free() - ma_rb_init() / ma_rb_init_ex() - ma_pcm_rb_init() / ma_pcm_rb_init_ex() - API CHANGE: Simplify latency specification in device configurations. The bufferSizeInFrames and bufferSizeInMilliseconds parameters have been replaced with periodSizeInFrames and periodSizeInMilliseconds respectively. The previous variables defined the size of the entire buffer, whereas the new ones define the size of a period. The following APIs have been removed since they are no longer relevant: - ma_get_default_buffer_size_in_milliseconds() - ma_get_default_buffer_size_in_frames() - API CHANGE: ma_device_set_stop_callback() has been removed. If you require a stop callback, you must now set it via the device config just like the data callback. - API CHANGE: The ma_sine_wave API has been replaced with ma_waveform. The following APIs have been removed: - ma_sine_wave_init() - ma_sine_wave_read_f32() - ma_sine_wave_read_f32_ex() - API CHANGE: ma_convert_frames() has been updated to take an extra parameter which is the size of the output buffer in PCM frames. Parameters have also been reordered. - API CHANGE: ma_convert_frames_ex() has been changed to take a pointer to a ma_data_converter_config object to specify the input and output formats to convert between. - API CHANGE: ma_calculate_frame_count_after_src() has been renamed to ma_calculate_frame_count_after_resampling(). - Add support for the following filters: - Biquad (ma_biquad) - First order low-pass (ma_lpf1) - Second order low-pass (ma_lpf2) - Low-pass with configurable order (ma_lpf) - First order high-pass (ma_hpf1) - Second order high-pass (ma_hpf2) - High-pass with configurable order (ma_hpf) - Second order band-pass (ma_bpf2) - Band-pass with configurable order (ma_bpf) - Second order peaking EQ (ma_peak2) - Second order notching (ma_notch2) - Second order low shelf (ma_loshelf2) - Second order high shelf (ma_hishelf2) - Add waveform generation API (ma_waveform) with support for the following: - Sine - Square - Triangle - Sawtooth - Add noise generation API (ma_noise) with support for the following: - White - Pink - Brownian - Add encoding API (ma_encoder). This only supports outputting to WAV files via dr_wav. - Add ma_result_description() which is used to retrieve a human readable description of a given result code. - Result codes have been changed. Binding maintainers will need to update their result code constants. - More meaningful result codes are now returned when a file fails to open. - Internal functions have all been made static where possible. - Fix potential crash when ma_device object's are not aligned to MA_SIMD_ALIGNMENT. - Fix a bug in ma_decoder_get_length_in_pcm_frames() where it was returning the length based on the internal sample rate rather than the output sample rate. - Fix bugs in some backends where the device is not drained properly in ma_device_stop(). - Improvements to documentation. v0.9.10 - 2020-01-15 - Fix compilation errors due to #if/#endif mismatches. - WASAPI: Fix a bug where automatic stream routing is being performed for devices that are initialized with an explicit device ID. - iOS: Fix a crash on device uninitialization. v0.9.9 - 2020-01-09 - Fix compilation errors with MinGW. - Fix compilation errors when compiling on Apple platforms. - WASAPI: Add support for disabling hardware offloading. - WASAPI: Add support for disabling automatic stream routing. - Core Audio: Fix bugs in the case where the internal device uses deinterleaved buffers. - Core Audio: Add support for controlling the session category (AVAudioSessionCategory) and options (AVAudioSessionCategoryOptions). - JACK: Fix bug where incorrect ports are connected. v0.9.8 - 2019-10-07 - WASAPI: Fix a potential deadlock when starting a full-duplex device. - WASAPI: Enable automatic resampling by default. Disable with config.wasapi.noAutoConvertSRC. - Core Audio: Fix bugs with automatic stream routing. - Add support for controlling whether or not the content of the output buffer passed in to the data callback is pre-initialized to zero. By default it will be initialized to zero, but this can be changed by setting noPreZeroedOutputBuffer in the device config. Setting noPreZeroedOutputBuffer to true will leave the contents undefined. - Add support for clipping samples after the data callback has returned. This only applies when the playback sample format is configured as ma_format_f32. If you are doing clipping yourself, you can disable this overhead by setting noClip to true in the device config. - Add support for master volume control for devices. - Use ma_device_set_master_volume() to set the volume to a factor between 0 and 1, where 0 is silence and 1 is full volume. - Use ma_device_set_master_volume_db() to set the volume in decibels where 0 is full volume and < 0 reduces the volume. - Fix warnings emitted by GCC when `__inline__` is undefined or defined as nothing. v0.9.7 - 2019-08-28 - Add support for loopback mode (WASAPI only). - To use this, set the device type to ma_device_type_loopback, and then fill out the capture section of the device config. - If you need to capture from a specific output device, set the capture device ID to that of a playback device. - Fix a crash when an error is posted in ma_device_init(). - Fix a compilation error when compiling for ARM architectures. - Fix a bug with the audio(4) backend where the device is incorrectly being opened in non-blocking mode. - Fix memory leaks in the Core Audio backend. - Minor refactoring to the WinMM, ALSA, PulseAudio, OSS, audio(4), sndio and null backends. v0.9.6 - 2019-08-04 - Add support for loading decoders using a wchar_t string for file paths. - Don't trigger an assert when ma_device_start() is called on a device that is already started. This will now log a warning and return MA_INVALID_OPERATION. The same applies for ma_device_stop(). - Try fixing an issue with PulseAudio taking a long time to start playback. - Fix a bug in ma_convert_frames() and ma_convert_frames_ex(). - Fix memory leaks in the WASAPI backend. - Fix a compilation error with Visual Studio 2010. v0.9.5 - 2019-05-21 - Add logging to ma_dlopen() and ma_dlsym(). - Add ma_decoder_get_length_in_pcm_frames(). - Fix a bug with capture on the OpenSL|ES backend. - Fix a bug with the ALSA backend where a device would not restart after being stopped. v0.9.4 - 2019-05-06 - Add support for C89. With this change, miniaudio should compile clean with GCC/Clang with "-std=c89 -ansi -pedantic" and Microsoft compilers back to VC6. Other compilers should also work, but have not been tested. v0.9.3 - 2019-04-19 - Fix compiler errors on GCC when compiling with -std=c99. v0.9.2 - 2019-04-08 - Add support for per-context user data. - Fix a potential bug with context configs. - Fix some bugs with PulseAudio. v0.9.1 - 2019-03-17 - Fix a bug where the output buffer is not getting zeroed out before calling the data callback. This happens when the device is running in passthrough mode (not doing any data conversion). - Fix an issue where the data callback is getting called too frequently on the WASAPI and DirectSound backends. - Fix error on the UWP build. - Fix a build error on Apple platforms. v0.9 - 2019-03-06 - Rebranded to "miniaudio". All namespaces have been renamed from "mal" to "ma". - API CHANGE: ma_device_init() and ma_device_config_init() have changed significantly: - The device type, device ID and user data pointer have moved from ma_device_init() to the config. - All variations of ma_device_config_init_*() have been removed in favor of just ma_device_config_init(). - ma_device_config_init() now takes only one parameter which is the device type. All other properties need to be set on the returned object directly. - The onDataCallback and onStopCallback members of ma_device_config have been renamed to "dataCallback" and "stopCallback". - The ID of the physical device is now split into two: one for the playback device and the other for the capture device. This is required for full-duplex. These are named "pPlaybackDeviceID" and "pCaptureDeviceID". - API CHANGE: The data callback has changed. It now uses a unified callback for all device types rather than being separate for each. It now takes two pointers - one containing input data and the other output data. This design in required for full-duplex. The return value is now void instead of the number of frames written. The new callback looks like the following: void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount); - API CHANGE: Remove the log callback parameter from ma_context_config_init(). With this change, ma_context_config_init() now takes no parameters and the log callback is set via the structure directly. The new policy for config initialization is that only mandatory settings are passed in to *_config_init(). The "onLog" member of ma_context_config has been renamed to "logCallback". - API CHANGE: Remove ma_device_get_buffer_size_in_bytes(). - API CHANGE: Rename decoding APIs to "pcm_frames" convention. - mal_decoder_read() -> ma_decoder_read_pcm_frames() - mal_decoder_seek_to_frame() -> ma_decoder_seek_to_pcm_frame() - API CHANGE: Rename sine wave reading APIs to f32 convention. - mal_sine_wave_read() -> ma_sine_wave_read_f32() - mal_sine_wave_read_ex() -> ma_sine_wave_read_f32_ex() - API CHANGE: Remove some deprecated APIs - mal_device_set_recv_callback() - mal_device_set_send_callback() - mal_src_set_input_sample_rate() - mal_src_set_output_sample_rate() - API CHANGE: Add log level to the log callback. New signature: - void on_log(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* message) - API CHANGE: Changes to result codes. Constants have changed and unused codes have been removed. If you're a binding maintainer you will need to update your result code constants. - API CHANGE: Change the order of the ma_backend enums to priority order. If you are a binding maintainer, you will need to update. - API CHANGE: Rename mal_dsp to ma_pcm_converter. All functions have been renamed from mal_dsp_*() to ma_pcm_converter_*(). All structures have been renamed from mal_dsp* to ma_pcm_converter*. - API CHANGE: Reorder parameters of ma_decoder_read_pcm_frames() to be consistent with the new parameter order scheme. - The resampling algorithm has been changed from sinc to linear. The rationale for this is that the sinc implementation is too inefficient right now. This will hopefully be improved at a later date. - Device initialization will no longer fall back to shared mode if exclusive mode is requested but is unusable. With this change, if you request an device in exclusive mode, but exclusive mode is not supported, it will not automatically fall back to shared mode. The client will need to reinitialize the device in shared mode if that's what they want. - Add ring buffer API. This is ma_rb and ma_pcm_rb, the difference being that ma_rb operates on bytes and ma_pcm_rb operates on PCM frames. - Add Web Audio backend. This is used when compiling with Emscripten. The SDL backend, which was previously used for web support, will be removed in a future version. - Add AAudio backend (Android Audio). This is the new priority backend for Android. Support for AAudio starts with Android 8. OpenSL|ES is used as a fallback for older versions of Android. - Remove OpenAL and SDL backends. - Fix a possible deadlock when rapidly stopping the device after it has started. - Update documentation. - Change licensing to a choice of public domain _or_ MIT-0 (No Attribution). v0.8.14 - 2018-12-16 - Core Audio: Fix a bug where the device state is not set correctly after stopping. - Add support for custom weights to the channel router. - Update decoders to use updated APIs in dr_flac, dr_mp3 and dr_wav. v0.8.13 - 2018-12-04 - Core Audio: Fix a bug with channel mapping. - Fix a bug with channel routing where the back/left and back/right channels have the wrong weight. v0.8.12 - 2018-11-27 - Drop support for SDL 1.2. The Emscripten build now requires "-s USE_SDL=2". - Fix a linking error with ALSA. - Fix a bug on iOS where the device name is not set correctly. v0.8.11 - 2018-11-21 - iOS bug fixes. - Minor tweaks to PulseAudio. v0.8.10 - 2018-10-21 - Core Audio: Fix a hang when uninitializing a device. - Fix a bug where an incorrect value is returned from mal_device_stop(). v0.8.9 - 2018-09-28 - Fix a bug with the SDL backend where device initialization fails. v0.8.8 - 2018-09-14 - Fix Linux build with the ALSA backend. - Minor documentation fix. v0.8.7 - 2018-09-12 - Fix a bug with UWP detection. v0.8.6 - 2018-08-26 - Automatically switch the internal device when the default device is unplugged. Note that this is still in the early stages and not all backends handle this the same way. As of this version, this will not detect a default device switch when changed from the operating system's audio preferences (unless the backend itself handles this automatically). This is not supported in exclusive mode. - WASAPI and Core Audio: Add support for stream routing. When the application is using a default device and the user switches the default device via the operating system's audio preferences, miniaudio will automatically switch the internal device to the new default. This is not supported in exclusive mode. - WASAPI: Add support for hardware offloading via IAudioClient2. Only supported on Windows 8 and newer. - WASAPI: Add support for low-latency shared mode via IAudioClient3. Only supported on Windows 10 and newer. - Add support for compiling the UWP build as C. - mal_device_set_recv_callback() and mal_device_set_send_callback() have been deprecated. You must now set this when the device is initialized with mal_device_init*(). These will be removed in version 0.9.0. v0.8.5 - 2018-08-12 - Add support for specifying the size of a device's buffer in milliseconds. You can still set the buffer size in frames if that suits you. When bufferSizeInFrames is 0, bufferSizeInMilliseconds will be used. If both are non-0 then bufferSizeInFrames will take priority. If both are set to 0 the default buffer size is used. - Add support for the audio(4) backend to OpenBSD. - Fix a bug with the ALSA backend that was causing problems on Raspberry Pi. This significantly improves the Raspberry Pi experience. - Fix a bug where an incorrect number of samples is returned from sinc resampling. - Add support for setting the value to be passed to internal calls to CoInitializeEx(). - WASAPI and WinMM: Stop the device when it is unplugged. v0.8.4 - 2018-08-06 - Add sndio backend for OpenBSD. - Add audio(4) backend for NetBSD. - Drop support for the OSS backend on everything except FreeBSD and DragonFly BSD. - Formats are now native-endian (were previously little-endian). - Mark some APIs as deprecated: - mal_src_set_input_sample_rate() and mal_src_set_output_sample_rate() are replaced with mal_src_set_sample_rate(). - mal_dsp_set_input_sample_rate() and mal_dsp_set_output_sample_rate() are replaced with mal_dsp_set_sample_rate(). - Fix a bug when capturing using the WASAPI backend. - Fix some aliasing issues with resampling, specifically when increasing the sample rate. - Fix warnings. v0.8.3 - 2018-07-15 - Fix a crackling bug when resampling in capture mode. - Core Audio: Fix a bug where capture does not work. - ALSA: Fix a bug where the worker thread can get stuck in an infinite loop. - PulseAudio: Fix a bug where mal_context_init() succeeds when PulseAudio is unusable. - JACK: Fix a bug where mal_context_init() succeeds when JACK is unusable. v0.8.2 - 2018-07-07 - Fix a bug on macOS with Core Audio where the internal callback is not called. v0.8.1 - 2018-07-06 - Fix compilation errors and warnings. v0.8 - 2018-07-05 - Changed MAL_IMPLEMENTATION to MINI_AL_IMPLEMENTATION for consistency with other libraries. The old way is still supported for now, but you should update as it may be removed in the future. - API CHANGE: Replace device enumeration APIs. mal_enumerate_devices() has been replaced with mal_context_get_devices(). An additional low-level device enumeration API has been introduced called mal_context_enumerate_devices() which uses a callback to report devices. - API CHANGE: Rename mal_get_sample_size_in_bytes() to mal_get_bytes_per_sample() and add mal_get_bytes_per_frame(). - API CHANGE: Replace mal_device_config.preferExclusiveMode with mal_device_config.shareMode. - This new config can be set to mal_share_mode_shared (default) or mal_share_mode_exclusive. - API CHANGE: Remove excludeNullDevice from mal_context_config.alsa. - API CHANGE: Rename MAL_MAX_SAMPLE_SIZE_IN_BYTES to MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES. - API CHANGE: Change the default channel mapping to the standard Microsoft mapping. - API CHANGE: Remove backend-specific result codes. - API CHANGE: Changes to the format conversion APIs (mal_pcm_f32_to_s16(), etc.) - Add support for Core Audio (Apple). - Add support for PulseAudio. - This is the highest priority backend on Linux (higher priority than ALSA) since it is commonly installed by default on many of the popular distros and offer's more seamless integration on platforms where PulseAudio is used. In addition, if PulseAudio is installed and running (which is extremely common), it's better to just use PulseAudio directly rather than going through the "pulse" ALSA plugin (which is what the "default" ALSA device is likely set to). - Add support for JACK. - Remove dependency on asound.h for the ALSA backend. This means the ALSA development packages are no longer required to build miniaudio. - Remove dependency on dsound.h for the DirectSound backend. This fixes build issues with some distributions of MinGW. - Remove dependency on audioclient.h for the WASAPI backend. This fixes build issues with some distributions of MinGW. - Add support for dithering to format conversion. - Add support for configuring the priority of the worker thread. - Add a sine wave generator. - Improve efficiency of sample rate conversion. - Introduce the notion of standard channel maps. Use mal_get_standard_channel_map(). - Introduce the notion of default device configurations. A default config uses the same configuration as the backend's internal device, and as such results in a pass-through data transmission pipeline. - Add support for passing in NULL for the device config in mal_device_init(), which uses a default config. This requires manually calling mal_device_set_send/recv_callback(). - Add support for decoding from raw PCM data (mal_decoder_init_raw(), etc.) - Make mal_device_init_ex() more robust. - Make some APIs more const-correct. - Fix errors with SDL detection on Apple platforms. - Fix errors with OpenAL detection. - Fix some memory leaks. - Fix a bug with opening decoders from memory. - Early work on SSE2, AVX2 and NEON optimizations. - Miscellaneous bug fixes. - Documentation updates. v0.7 - 2018-02-25 - API CHANGE: Change mal_src_read_frames() and mal_dsp_read_frames() to use 64-bit sample counts. - Add decoder APIs for loading WAV, FLAC, Vorbis and MP3 files. - Allow opening of devices without a context. - In this case the context is created and managed internally by the device. - Change the default channel mapping to the same as that used by FLAC. - Fix build errors with macOS. v0.6c - 2018-02-12 - Fix build errors with BSD/OSS. v0.6b - 2018-02-03 - Fix some warnings when compiling with Visual C++. v0.6a - 2018-01-26 - Fix errors with channel mixing when increasing the channel count. - Improvements to the build system for the OpenAL backend. - Documentation fixes. v0.6 - 2017-12-08 - API CHANGE: Expose and improve mutex APIs. If you were using the mutex APIs before this version you'll need to update. - API CHANGE: SRC and DSP callbacks now take a pointer to a mal_src and mal_dsp object respectively. - API CHANGE: Improvements to event and thread APIs. These changes make these APIs more consistent. - Add support for SDL and Emscripten. - Simplify the build system further for when development packages for various backends are not installed. With this change, when the compiler supports __has_include, backends without the relevant development packages installed will be ignored. This fixes the build for old versions of MinGW. - Fixes to the Android build. - Add mal_convert_frames(). This is a high-level helper API for performing a one-time, bulk conversion of audio data to a different format. - Improvements to f32 -> u8/s16/s24/s32 conversion routines. - Fix a bug where the wrong value is returned from mal_device_start() for the OpenSL backend. - Fixes and improvements for Raspberry Pi. - Warning fixes. v0.5 - 2017-11-11 - API CHANGE: The mal_context_init() function now takes a pointer to a mal_context_config object for configuring the context. The works in the same kind of way as the device config. The rationale for this change is to give applications better control over context-level properties, add support for backend- specific configurations, and support extensibility without breaking the API. - API CHANGE: The alsa.preferPlugHW device config variable has been removed since it's not really useful for anything anymore. - ALSA: By default, device enumeration will now only enumerate over unique card/device pairs. Applications can enable verbose device enumeration by setting the alsa.useVerboseDeviceEnumeration context config variable. - ALSA: When opening a device in shared mode (the default), the dmix/dsnoop plugin will be prioritized. If this fails it will fall back to the hw plugin. With this change the preferExclusiveMode config is now honored. Note that this does not happen when alsa.useVerboseDeviceEnumeration is set to true (see above) which is by design. - ALSA: Add support for excluding the "null" device using the alsa.excludeNullDevice context config variable. - ALSA: Fix a bug with channel mapping which causes an assertion to fail. - Fix errors with enumeration when pInfo is set to NULL. - OSS: Fix a bug when starting a device when the client sends 0 samples for the initial buffer fill. v0.4 - 2017-11-05 - API CHANGE: The log callback is now per-context rather than per-device and as is thus now passed to mal_context_init(). The rationale for this change is that it allows applications to capture diagnostic messages at the context level. Previously this was only available at the device level. - API CHANGE: The device config passed to mal_device_init() is now const. - Added support for OSS which enables support on BSD platforms. - Added support for WinMM (waveOut/waveIn). - Added support for UWP (Universal Windows Platform) applications. Currently C++ only. - Added support for exclusive mode for selected backends. Currently supported on WASAPI. - POSIX builds no longer require explicit linking to libpthread (-lpthread). - ALSA: Explicit linking to libasound (-lasound) is no longer required. - ALSA: Latency improvements. - ALSA: Use MMAP mode where available. This can be disabled with the alsa.noMMap config. - ALSA: Use "hw" devices instead of "plughw" devices by default. This can be disabled with the alsa.preferPlugHW config. - WASAPI is now the highest priority backend on Windows platforms. - Fixed an error with sample rate conversion which was causing crackling when capturing. - Improved error handling. - Improved compiler support. - Miscellaneous bug fixes. v0.3 - 2017-06-19 - API CHANGE: Introduced the notion of a context. The context is the highest level object and is required for enumerating and creating devices. Now, applications must first create a context, and then use that to enumerate and create devices. The reason for this change is to ensure device enumeration and creation is tied to the same backend. In addition, some backends are better suited to this design. - API CHANGE: Removed the rewinding APIs because they're too inconsistent across the different backends, hard to test and maintain, and just generally unreliable. - Added helper APIs for initializing mal_device_config objects. - Null Backend: Fixed a crash when recording. - Fixed build for UWP. - Added support for f32 formats to the OpenSL|ES backend. - Added initial implementation of the WASAPI backend. - Added initial implementation of the OpenAL backend. - Added support for low quality linear sample rate conversion. - Added early support for basic channel mapping. v0.2 - 2016-10-28 - API CHANGE: Add user data pointer as the last parameter to mal_device_init(). The rationale for this change is to ensure the logging callback has access to the user data during initialization. - API CHANGE: Have device configuration properties be passed to mal_device_init() via a structure. Rationale: 1) The number of parameters is just getting too much. 2) It makes it a bit easier to add new configuration properties in the future. In particular, there's a chance there will be support added for backend-specific properties. - Dropped support for f64, A-law and Mu-law formats since they just aren't common enough to justify the added maintenance cost. - DirectSound: Increased the default buffer size for capture devices. - Added initial implementation of the OpenSL|ES backend. v0.1 - 2016-10-21 - Initial versioned release. miniaudio-0.11.22/CMakeLists.txt000066400000000000000000000636041475701111600164070ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.10) project(miniaudio VERSION 0.11 ) # Options option(MINIAUDIO_BUILD_EXAMPLES "Build miniaudio examples" OFF) option(MINIAUDIO_BUILD_TESTS "Build miniaudio tests" OFF) option(MINIAUDIO_FORCE_CXX "Force compilation as C++" OFF) option(MINIAUDIO_FORCE_C89 "Force compilation as C89" OFF) option(MINIAUDIO_NO_EXTRA_NODES "Do not build extra node graph nodes" OFF) option(MINIAUDIO_NO_LIBVORBIS "Disable miniaudio_libvorbis" OFF) option(MINIAUDIO_NO_LIBOPUS "Disable miniaudio_libopus" OFF) option(MINIAUDIO_NO_WASAPI "Disable the WASAPI backend" OFF) option(MINIAUDIO_NO_DSOUND "Disable the DirectSound backend" OFF) option(MINIAUDIO_NO_WINMM "Disable the WinMM backend" OFF) option(MINIAUDIO_NO_ALSA "Disable the ALSA backend" OFF) option(MINIAUDIO_NO_PULSEAUDIO "Disable the PulseAudio backend" OFF) option(MINIAUDIO_NO_JACK "Disable the JACK backend" OFF) option(MINIAUDIO_NO_COREAUDIO "Disable the CoreAudio backend" OFF) option(MINIAUDIO_NO_SNDIO "Disable the sndio backend" OFF) option(MINIAUDIO_NO_AUDIO4 "Disable the audio(4) backend" OFF) option(MINIAUDIO_NO_OSS "Disable the OSS backend" OFF) option(MINIAUDIO_NO_AAUDIO "Disable the AAudio backend" OFF) option(MINIAUDIO_NO_OPENSL "Disable the OpenSL|ES backend" OFF) option(MINIAUDIO_NO_WEBAUDIO "Disable the Web Audio backend" OFF) option(MINIAUDIO_NO_CUSTOM "Disable support for custom backends" OFF) option(MINIAUDIO_NO_NULL "Disable the null backend" OFF) option(MINIAUDIO_ENABLE_ONLY_SPECIFIC_BACKENDS "Only enable specific backends. Backends can be enabled with MINIAUDIO_ENABLE_[BACKEND]." OFF) option(MINIAUDIO_ENABLE_WASAPI "Enable the WASAPI backend" OFF) option(MINIAUDIO_ENABLE_DSOUND "Enable the DirectSound backend" OFF) option(MINIAUDIO_ENABLE_WINMM "Enable the WinMM backend" OFF) option(MINIAUDIO_ENABLE_ALSA "Enable the ALSA backend" OFF) option(MINIAUDIO_ENABLE_PULSEAUDIO "Enable the PulseAudio backend" OFF) option(MINIAUDIO_ENABLE_JACK "Enable the JACK backend" OFF) option(MINIAUDIO_ENABLE_COREAUDIO "Enable the CoreAudio backend" OFF) option(MINIAUDIO_ENABLE_SNDIO "Enable the sndio backend" OFF) option(MINIAUDIO_ENABLE_AUDIO4 "Enable the audio(4) backend" OFF) option(MINIAUDIO_ENABLE_OSS "Enable the OSS backend" OFF) option(MINIAUDIO_ENABLE_AAUDIO "Enable the AAudio backend" OFF) option(MINIAUDIO_ENABLE_OPENSL "Enable the OpenSL|ES backend" OFF) option(MINIAUDIO_ENABLE_WEBAUDIO "Enable the Web Audio backend" OFF) option(MINIAUDIO_ENABLE_CUSTOM "Enable support for custom backends" OFF) option(MINIAUDIO_ENABLE_NULL "Enable the null backend" OFF) option(MINIAUDIO_NO_DECODING "Disable decoding APIs" OFF) option(MINIAUDIO_NO_ENCODING "Disable encoding APIs" OFF) option(MINIAUDIO_NO_WAV "Disable the built-in WAV decoder" OFF) option(MINIAUDIO_NO_FLAC "Disable the built-in FLAC decoder" OFF) option(MINIAUDIO_NO_MP3 "Disable the built-in MP3 decoder" OFF) option(MINIAUDIO_NO_DEVICEIO "Disable audio playback and capture" OFF) option(MINIAUDIO_NO_RESOURCE_MANAGER "Disable the resource manager API" OFF) option(MINIAUDIO_NO_NODE_GRAPH "Disable the node graph API" OFF) option(MINIAUDIO_NO_ENGINE "Disable the high-level engine API" OFF) option(MINIAUDIO_NO_THREADING "Disable threading. Must be used with MINIAUDIO_NO_DEVICEIO." OFF) option(MINIAUDIO_NO_GENERATION "Disable generation APIs such as ma_waveform and ma_noise" OFF) option(MINIAUDIO_NO_SSE2 "Disable SSE2 optimizations" OFF) option(MINIAUDIO_NO_AVX2 "Disable AVX2 optimizations" OFF) option(MINIAUDIO_NO_NEON "Disable NEON optimizations" OFF) option(MINIAUDIO_NO_RUNTIME_LINKING "Disable runtime linking" OFF) option(MINIAUDIO_USE_STDINT "Use for sized types" OFF) option(MINIAUDIO_DEBUG_OUTPUT "Enable stdout debug output" OFF) # Construct compiler options. set(COMPILE_OPTIONS) if(MINIAUDIO_FORCE_CXX AND MINIAUDIO_FORCE_C89) message(FATAL_ERROR "MINIAUDIO_FORCE_CXX and MINIAUDIO_FORCE_C89 cannot be enabled at the same time.") endif() if(MINIAUDIO_FORCE_CXX) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") message(STATUS "Compiling as C++ (GNU/Clang)") list(APPEND COMPILE_OPTIONS -x c++) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message(STATUS "Compiling as C++ (MSVC)") list(APPEND COMPILE_OPTIONS /TP) else() message(WARNING "MINIAUDIO_FORCE_CXX is enabled but the compiler does not support it. Ignoring.") endif() endif() if(MINIAUDIO_FORCE_C89) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") message(STATUS "Compiling as C89") list(APPEND COMPILE_OPTIONS -std=c89) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message(WARNING "MSVC does not support forcing C89. MINIAUDIO_FORCE_C89 ignored.") else() message(WARNING "MINIAUDIO_FORCE_C89 is enabled but the compiler does not support it. Ingoring.") endif() endif() # Warnings if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") list(APPEND COMPILE_OPTIONS -Wall -Wextra -Wpedantic) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") #list(APPEND COMPILE_OPTIONS /W4) endif() # Construct compiler defines set(COMPILE_DEFINES) if(MINIAUDIO_NO_WASAPI) list(APPEND COMPILE_DEFINES MA_NO_WASAPI) endif() if(MINIAUDIO_NO_DSOUND) list(APPEND COMPILE_DEFINES MA_NO_DSOUND) endif() if(MINIAUDIO_NO_WINMM) list(APPEND COMPILE_DEFINES MA_NO_WINMM) endif() if(MINIAUDIO_NO_ALSA) list(APPEND COMPILE_DEFINES MA_NO_ALSA) endif() if(MINIAUDIO_NO_PULSEAUDIO) list(APPEND COMPILE_DEFINES MA_NO_PULSEAUDIO) endif() if(MINIAUDIO_NO_JACK) list(APPEND COMPILE_DEFINES MA_NO_JACK) endif() if(MINIAUDIO_NO_COREAUDIO) list(APPEND COMPILE_DEFINES MA_NO_COREAUDIO) endif() if(MINIAUDIO_NO_SNDIO) list(APPEND COMPILE_DEFINES MA_NO_SNDIO) endif() if(MINIAUDIO_NO_AUDIO4) list(APPEND COMPILE_DEFINES MA_NO_AUDIO4) endif() if(MINIAUDIO_NO_OSS) list(APPEND COMPILE_DEFINES MA_NO_OSS) endif() if(MINIAUDIO_NO_AAUDIO) list(APPEND COMPILE_DEFINES MA_NO_AAUDIO) endif() if(MINIAUDIO_NO_OPENSL) list(APPEND COMPILE_DEFINES MA_NO_OPENSL) endif() if(MINIAUDIO_NO_WEBAUDIO) list(APPEND COMPILE_DEFINES MA_NO_WEBAUDIO) endif() if(MINIAUDIO_NO_CUSTOM) list(APPEND COMPILE_DEFINES MA_NO_CUSTOM) endif() if(MINIAUDIO_NO_NULL) list(APPEND COMPILE_DEFINES MA_NO_NULL) endif() if(MINIAUDIO_ENABLE_ONLY_SPECIFIC_BACKENDS) if(MINIAUDIO_ENABLE_WASAPI) list(APPEND COMPILE_DEFINES MA_ENABLE_WASAPI) endif() if(MINIAUDIO_ENABLE_DSOUND) list(APPEND COMPILE_DEFINES MA_ENABLE_DSOUND) endif() if(MINIAUDIO_ENABLE_WINMM) list(APPEND COMPILE_DEFINES MA_ENABLE_WINMM) endif() if(MINIAUDIO_ENABLE_ALSA) list(APPEND COMPILE_DEFINES MA_ENABLE_ALSA) endif() if(MINIAUDIO_ENABLE_PULSEAUDIO) list(APPEND COMPILE_DEFINES MA_ENABLE_PULSEAUDIO) endif() if(MINIAUDIO_ENABLE_JACK) list(APPEND COMPILE_DEFINES MA_ENABLE_JACK) endif() if(MINIAUDIO_ENABLE_COREAUDIO) list(APPEND COMPILE_DEFINES MA_ENABLE_COREAUDIO) endif() if(MINIAUDIO_ENABLE_SNDIO) list(APPEND COMPILE_DEFINES MA_ENABLE_SNDIO) endif() if(MINIAUDIO_ENABLE_AUDIO4) list(APPEND COMPILE_DEFINES MA_ENABLE_AUDIO4) endif() if(MINIAUDIO_ENABLE_OSS) list(APPEND COMPILE_DEFINES MA_ENABLE_OSS) endif() if(MINIAUDIO_ENABLE_AAUDIO) list(APPEND COMPILE_DEFINES MA_ENABLE_AAUDIO) endif() if(MINIAUDIO_ENABLE_OPENSL) list(APPEND COMPILE_DEFINES MA_ENABLE_OPENSL) endif() if(MINIAUDIO_ENABLE_WEBAUDIO) list(APPEND COMPILE_DEFINES MA_ENABLE_WEBAUDIO) endif() if(MINIAUDIO_ENABLE_CUSTOM) list(APPEND COMPILE_DEFINES MA_ENABLE_CUSTOM) endif() if(MINIAUDIO_ENABLE_NULL) list(APPEND COMPILE_DEFINES MA_ENABLE_NULL) endif() endif() if(MINIAUDIO_NO_DECODING) list(APPEND COMPILE_DEFINES MA_NO_DECODING) endif() if(MINIAUDIO_NO_ENCODING) list(APPEND COMPILE_DEFINES MA_NO_ENCODING) endif() if(MINIAUDIO_NO_WAV) list(APPEND COMPILE_DEFINES MA_NO_WAV) endif() if(MINIAUDIO_NO_FLAC) list(APPEND COMPILE_DEFINES MA_NO_FLAC) endif() if(MINIAUDIO_NO_MP3) list(APPEND COMPILE_DEFINES MA_NO_MP3) endif() if(MINIAUDIO_NO_DEVICEIO) list(APPEND COMPILE_DEFINES MA_NO_DEVICE_IO) endif() if(MINIAUDIO_NO_RESOURCE_MANAGER) list(APPEND COMPILE_DEFINES MA_NO_RESOURCE_MANAGER) endif() if(MINIAUDIO_NO_NODE_GRAPH) list(APPEND COMPILE_DEFINES MA_NO_NODE_GRAPH) endif() if(MINIAUDIO_NO_ENGINE) list(APPEND COMPILE_DEFINES MA_NO_ENGINE) endif() if(MINIAUDIO_NO_THREADING) list(APPEND COMPILE_DEFINES MA_NO_THREADING) endif() if(MINIAUDIO_NO_GENERATION) list(APPEND COMPILE_DEFINES MA_NO_GENERATION) endif() if(MINIAUDIO_NO_SSE2) list(APPEND COMPILE_DEFINES MA_NO_SSE2) endif() if(MINIAUDIO_NO_AVX2) list(APPEND COMPILE_DEFINES MA_NO_AVX2) endif() if(MINIAUDIO_NO_NEON) list(APPEND COMPILE_DEFINES MA_NO_NEON) endif() if(MINIAUDIO_NO_RUNTIME_LINKING) list(APPEND COMPILE_DEFINES MA_NO_RUNTIME_LINKING) endif() if(MINIAUDIO_USE_STDINT) list(APPEND COMPILE_DEFINES MA_USE_STDINT) endif() if(MINIAUDIO_DEBUG_OUTPUT) list(APPEND COMPILE_DEFINES MA_DEBUG_OUTPUT) endif() # External Libraries function(add_libogg_subdirectory) if(NOT TARGET ogg) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/ogg/CMakeLists.txt) message(STATUS "Building libogg from source.") add_subdirectory(external/ogg) else() message(STATUS "libogg not found.") endif() endif() endfunction() function(add_libvorbis_subdirectory) if(NOT TARGET vorbis) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/vorbis/CMakeLists.txt) add_libogg_subdirectory() if(TARGET ogg) message(STATUS "Building libvorbis from source.") add_subdirectory(external/vorbis) else() message(STATUS "libogg not found. miniaudio_libvorbis will be excluded.") endif() endif() endif() endfunction() function(add_libopus_subdirectory) if(NOT TARGET opus) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/opus/CMakeLists.txt) message(STATUS "Building libopus from source.") set(OPUS_BUILD_TESTING OFF) add_subdirectory(external/opus) else() message(STATUS "libopus not found. miniaudio_libopus will be excluded.") endif() endif() endfunction() function(add_libopusfile_subdirectory) if(NOT TARGET opusfile) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/opusfile/CMakeLists.txt) add_libogg_subdirectory() if(TARGET ogg) add_libopus_subdirectory() if(TARGET opus) message(STATUS "Building libopusfile from source.") set(OP_DISABLE_HTTP TRUE) set(OP_DISABLE_DOCS TRUE) set(OP_DISABLE_EXAMPLES TRUE) add_subdirectory(external/opusfile) else() message(STATUS "libopus not found. miniaudio_libopus will be excluded.") endif() else() message(STATUS "libogg not found. miniaudio_libopus will be excluded.") endif() endif() endif() endfunction() # vorbisfile # # The vorbisfile target is required for miniaudio_libvorbis. If the vorbisfile target has already been # defined we'll just use that. Otherwise we'll try to find_library(). If that fails, as a last resort # we'll allow building it from source from the external/vorbis directory. if(NOT MINIAUDIO_NO_LIBVORBIS) if(NOT TARGET vorbisfile) find_library(LIBVORBISFILE NAMES vorbisfile) if(LIBVORBISFILE) message(STATUS "Found libvorbisfile: ${LIBVORBISFILE}") set(HAS_LIBVORBIS TRUE) else() add_libvorbis_subdirectory() if(NOT TARGET vorbisfile) message(STATUS "libvorbisfile not found. miniaudio_libvorbis will be excluded.") else() set(HAS_LIBVORBIS TRUE) endif() endif() else() message(STATUS "libvorbisfile already found.") set(HAS_LIBVORBIS TRUE) endif() endif() # opusfile # # This is the same as vorbisfile above. if(NOT MINIAUDIO_NO_LIBOPUS) if(NOT TARGET opusfile) find_library(LIBOPUSFILE NAMES opusfile) if(LIBOPUSFILE) message(STATUS "Found libopusfile: ${LIBOPUSFILE}") # opusfile is very annoying because they do "#include " in opusfile.h which results # in an error unless we explicitly add the include path to the opus include directory. find_path(OPUSFILE_INCLUDE_DIR NAMES opus/opusfile.h DOC "Directory containing opusfile.h" ) if(OPUSFILE_INCLUDE_DIR) message(STATUS "Found opusfile.h in ${OPUSFILE_INCLUDE_DIR}") set(HAS_LIBOPUS TRUE) else() message(STATUS "Could not find opusfile.h. miniaudio_libopus will be excluded.") endif() else() add_libopusfile_subdirectory() if(NOT TARGET opusfile) message(STATUS "libopusfile not found. miniaudio_libopus will be excluded.") else() set(HAS_LIBOPUS TRUE) endif() endif() else() message(STATUS "libopusfile already found.") set(HAS_LIBOPUS TRUE) endif() endif() find_library(SDL2_LIBRARY NAMES SDL2) if(SDL2_LIBRARY) message(STATUS "Found SDL2: ${SDL2_LIBRARY}") set(HAS_SDL2 TRUE) else() message(STATUS "SDL2 not found. SDL2 examples will be excluded.") endif() # SteamAudio has an annoying SDK setup. In the lib folder there is a folder for each platform. We need to specify the # platform we're compiling for. if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") # Assume 64-bit. Now we need to check if it's for Windows or Linux. if(WIN32) set(STEAMAUDIO_ARCH windows-x64) else() set(STEAMAUDIO_ARCH linux-x64) endif() else() # Assume 32-bit. Now we need to check if it's for Windows or Linux. if(WIN32) set(STEAMAUDIO_ARCH windows-x86) else() set(STEAMAUDIO_ARCH linux-x86) endif() endif() # When searching for SteamAudio, we'll support installing it in the external/steamaudio directory. set(STEAMAUDIO_FIND_LIBRARY_HINTS) list(APPEND STEAMAUDIO_FIND_LIBRARY_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/external/steamaudio/lib/${STEAMAUDIO_ARCH}) if(WIN32) else() list(APPEND STEAMAUDIO_FIND_LIBRARY_HINTS /opt/steamaudio/lib/${STEAMAUDIO_ARCH}) list(APPEND STEAMAUDIO_FIND_LIBRARY_HINTS /usr/local/steamaudio/lib/${STEAMAUDIO_ARCH}) endif() set(STEAMAUDIO_FIND_HEADER_HINTS) list(APPEND STEAMAUDIO_FIND_HEADER_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/external/steamaudio/include) if(WIN32) else() list(APPEND STEAMAUDIO_FIND_HEADER_HINTS /opt/steamaudio/include) list(APPEND STEAMAUDIO_FIND_HEADER_HINTS /usr/local/steamaudio/include) endif() find_library(STEAMAUDIO_LIBRARY NAMES phonon HINTS ${STEAMAUDIO_FIND_LIBRARY_HINTS}) if(STEAMAUDIO_LIBRARY) message(STATUS "Found SteamAudio: ${STEAMAUDIO_LIBRARY}") find_path(STEAMAUDIO_INCLUDE_DIR NAMES phonon.h HINTS ${STEAMAUDIO_FIND_HEADER_HINTS} ) if(STEAMAUDIO_INCLUDE_DIR) message(STATUS "Found phonon.h in ${STEAMAUDIO_INCLUDE_DIR}") set(HAS_STEAMAUDIO TRUE) else() message(STATUS "Could not find phonon.h. miniaudio_engine_steamaudio will be excluded.") endif() else() message(STATUS "SteamAudio not found. miniaudio_engine_steamaudio will be excluded.") endif() # Link libraries set(COMMON_LINK_LIBRARIES) if (UNIX) list(APPEND COMMON_LINK_LIBRARIES dl) # For dlopen(), etc. Most compilers will link to this by default, but some may not. list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case. list(APPEND COMMON_LINK_LIBRARIES m) # If we're compiling for 32-bit ARM we need to link to -latomic. if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") list(APPEND COMMON_LINK_LIBRARIES atomic) endif() endif() # Static Libraries add_library(miniaudio STATIC miniaudio.c miniaudio.h ) target_include_directories(miniaudio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_options (miniaudio PRIVATE ${COMPILE_OPTIONS}) target_compile_definitions(miniaudio PRIVATE ${COMPILE_DEFINES}) add_library(libvorbis_interface INTERFACE) if(HAS_LIBVORBIS) if(TARGET vorbisfile) target_link_libraries(libvorbis_interface INTERFACE vorbisfile) else() target_link_libraries(libvorbis_interface INTERFACE ${LIBVORBISFILE}) endif() endif() if(HAS_LIBVORBIS) add_library(miniaudio_libvorbis STATIC extras/decoders/libvorbis/miniaudio_libvorbis.c extras/decoders/libvorbis/miniaudio_libvorbis.h ) target_compile_options (miniaudio_libvorbis PRIVATE ${COMPILE_OPTIONS}) target_compile_definitions(miniaudio_libvorbis PRIVATE ${COMPILE_DEFINES}) target_link_libraries (miniaudio_libvorbis PRIVATE libvorbis_interface) endif() add_library(libopus_interface INTERFACE) if(HAS_LIBOPUS) if(TARGET opusfile) target_link_libraries (libopus_interface INTERFACE opusfile) else() target_link_libraries (libopus_interface INTERFACE ${LIBOPUSFILE}) target_include_directories(libopus_interface INTERFACE ${OPUSFILE_INCLUDE_DIR}/opus) endif() endif() if(HAS_LIBOPUS) add_library(miniaudio_libopus STATIC extras/decoders/libopus/miniaudio_libopus.c extras/decoders/libopus/miniaudio_libopus.h ) target_compile_options (miniaudio_libopus PRIVATE ${COMPILE_OPTIONS}) target_compile_definitions(miniaudio_libopus PRIVATE ${COMPILE_DEFINES}) target_link_libraries (miniaudio_libopus PRIVATE libopus_interface) endif() if (NOT MINIAUDIO_NO_EXTRA_NODES) function(add_extra_node name) add_library(miniaudio_${name}_node STATIC extras/nodes/ma_${name}_node/ma_${name}_node.c extras/nodes/ma_${name}_node/ma_${name}_node.h ) target_include_directories(miniaudio_${name}_node PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/extras/nodes/ma_${name}_node) target_compile_options (miniaudio_${name}_node PRIVATE ${COMPILE_OPTIONS}) target_compile_definitions(miniaudio_${name}_node PRIVATE ${COMPILE_DEFINES}) if(MINIAUDIO_BUILD_EXAMPLES) add_executable(miniaudio_${name}_node_example extras/nodes/ma_${name}_node/ma_${name}_node_example.c) target_link_libraries(miniaudio_${name}_node_example PRIVATE miniaudio_common_options) endif() endfunction() add_extra_node(channel_combiner) add_extra_node(channel_separator) add_extra_node(ltrim) add_extra_node(reverb) add_extra_node(vocoder) endif() # Interface with common options to simplify the setup of tests and examples. Note that we don't pass # in COMPILE_DEFINES here because want to allow the tests and examples to define their own defines. If # we were to use COMPILE_DEFINES here many of the tests and examples would not compile. add_library(miniaudio_common_options INTERFACE) target_compile_options(miniaudio_common_options INTERFACE ${COMPILE_OPTIONS}) target_link_libraries (miniaudio_common_options INTERFACE ${COMMON_LINK_LIBRARIES}) # Tests # # All tests are compiled as a single translation unit. There is no need to add miniaudio as a link library. if(MINIAUDIO_BUILD_TESTS) enable_testing() set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) function(add_miniaudio_test name source) add_executable(${name} ${TESTS_DIR}/${source}) target_link_libraries(${name} PRIVATE miniaudio_common_options) endfunction() # The debugging test is only used for debugging miniaudio itself. Don't do add_test() for this, and do not include it in in any automated testing. add_miniaudio_test(miniaudio_debugging debugging/debugging.cpp) add_miniaudio_test(miniaudio_deviceio deviceio/deviceio.c) add_test(NAME miniaudio_deviceio COMMAND miniaudio_deviceio --auto) add_miniaudio_test(miniaudio_cpp cpp/cpp.cpp) add_test(NAME miniaudio_cpp COMMAND miniaudio_cpp --auto) # This is just the deviceio test. add_miniaudio_test(miniaudio_conversion conversion/conversion.c) add_test(NAME miniaudio_conversion COMMAND miniaudio_conversion) add_miniaudio_test(miniaudio_filtering filtering/filtering.c) add_test(NAME miniaudio_filtering COMMAND miniaudio_filtering ${CMAKE_CURRENT_SOURCE_DIR}/data/16-44100-stereo.flac) add_miniaudio_test(miniaudio_generation generation/generation.c) add_test(NAME miniaudio_generation COMMAND miniaudio_generation) endif() # Examples # # Like tests, all examples are compiled as a single translation unit. There is no need to add miniaudio as a link library. if (MINIAUDIO_BUILD_EXAMPLES) set(EXAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples) function(add_miniaudio_example name source) add_executable(${name} ${EXAMPLES_DIR}/${source}) target_link_libraries(${name} PRIVATE miniaudio_common_options) endfunction() add_miniaudio_example(miniaudio_custom_backend custom_backend.c) add_miniaudio_example(miniaudio_custom_decoder_engine custom_decoder_engine.c) if(HAS_LIBVORBIS) target_link_libraries(miniaudio_custom_decoder_engine PRIVATE libvorbis_interface) else() target_compile_definitions(miniaudio_custom_decoder_engine PRIVATE MA_NO_LIBVORBIS) message(STATUS "miniaudio_libvorbis is disabled. Vorbis support is disabled in miniaudio_custom_decoder_engine.") endif() if(HAS_LIBOPUS) target_link_libraries(miniaudio_custom_decoder_engine PRIVATE libopus_interface) else() target_compile_definitions(miniaudio_custom_decoder_engine PRIVATE MA_NO_LIBOPUS) message(STATUS "miniaudio_libopus is disabled. Opus support is disabled in miniaudio_custom_decoder_engine.") endif() add_miniaudio_example(miniaudio_custom_decoder custom_decoder.c) if(HAS_LIBVORBIS) target_link_libraries(miniaudio_custom_decoder PRIVATE libvorbis_interface) else() target_compile_definitions(miniaudio_custom_decoder PRIVATE MA_NO_LIBVORBIS) message(STATUS "miniaudio_libvorbis is disabled. Vorbis support is disabled in miniaudio_custom_decoder.") endif() if(HAS_LIBOPUS) target_link_libraries(miniaudio_custom_decoder PRIVATE libopus_interface) else() target_compile_definitions(miniaudio_custom_decoder PRIVATE MA_NO_LIBOPUS) message(STATUS "miniaudio_libopus is disabled. Opus support is disabled in miniaudio_custom_decoder.") endif() add_miniaudio_example(miniaudio_data_source_chaining data_source_chaining.c) add_miniaudio_example(miniaudio_duplex_effect duplex_effect.c) add_miniaudio_example(miniaudio_engine_advanced engine_advanced.c) add_miniaudio_example(miniaudio_engine_effects engine_effects.c) add_miniaudio_example(miniaudio_engine_hello_world engine_hello_world.c) if(HAS_SDL2) add_miniaudio_example(miniaudio_engine_sdl engine_sdl.c) target_link_libraries(miniaudio_engine_sdl PRIVATE ${SDL2_LIBRARY}) else() message(STATUS "SDL2 could not be found. miniaudio_engine_sdl has been excluded.") endif() if(HAS_STEAMAUDIO) add_miniaudio_example(miniaudio_engine_steamaudio engine_steamaudio.c) target_include_directories(miniaudio_engine_steamaudio PRIVATE ${STEAMAUDIO_INCLUDE_DIR}) target_link_libraries (miniaudio_engine_steamaudio PRIVATE ${STEAMAUDIO_LIBRARY}) else() message(STATUS "SteamAudio could not be found. miniaudio_engine_steamaudio has been excluded.") endif() add_miniaudio_example(miniaudio_hilo_interop hilo_interop.c) add_miniaudio_example(miniaudio_node_graph node_graph.c) add_miniaudio_example(miniaudio_resource_manager_advanced resource_manager_advanced.c) add_miniaudio_example(miniaudio_resource_manager resource_manager.c) add_miniaudio_example(miniaudio_simple_capture simple_capture.c) add_miniaudio_example(miniaudio_simple_duplex simple_duplex.c) add_miniaudio_example(miniaudio_simple_enumeration simple_enumeration.c) add_miniaudio_example(miniaudio_simple_loopback simple_loopback.c) add_miniaudio_example(miniaudio_simple_looping simple_looping.c) add_miniaudio_example(miniaudio_simple_mixing simple_mixing.c) add_miniaudio_example(miniaudio_simple_playback_sine simple_playback_sine.c) add_miniaudio_example(miniaudio_simple_playback simple_playback.c) add_miniaudio_example(miniaudio_simple_spatialization simple_spatialization.c) endif() miniaudio-0.11.22/CONTRIBUTING.md000066400000000000000000000122751475701111600160760ustar00rootroot00000000000000Contributing to miniaudio ========================= First of all, thanks for stopping by! This document will explain a few things to consider when contributing to miniaudio. Found a Bug? ------------ If you've found a bug you can create a bug report [here on GitHub](https://github.com/mackron/miniaudio/issues). The more information you can provide, the quicker I'll be able to get it fixed. Sample programs and files help a lot, as does a detailed list of steps I can follow to reproduce the problem. You can also submit a pull request which, provided your fix is correct and well written, is the quickest way to get the bug fixed. See the next section for guidance on pull requests. Pull Requests ------------- If you want to do actual development on miniaudio, pull requests are the best place to start. Just don't do any significant work without talking to me first. If I don't like it, it won't be merged. You can find me via email, [Discord](https://discord.gg/9vpqbjU) and [Twitter](https://twitter.com/mackron). Always base your pull request branch on the "dev" branch. The master branch contains the latest release, which means your pull request may not be including the latest in-development changes which may result in unnecessary conflicts. I need to review your pull requests before merging. If your pull request is non-trivial, try to break it up into logical bite sized commits to make it easier for review, but make sure every commit compiles. Obviously this is not always easy to do in practice, but just keep it in mind. When it comes to coding style I'm fairly relaxed, but be professional and respect the existing coding style, regardless of whether or not you like it. It's no big deal if something slips, but try to keep it in mind. Some things in particular: * C89. `/*...*/` style comments and variables declared at the top of the code block are the main thing. * Spaces instead of tabs. 4 spaces per tab. * Don't add a third party dependency. If you do this I'll immediately reject your pull request. I'm not going to outline specific coding styles - just look at the existing code and use common sense. If you want to submit a pull request for any of the dr_* libraries in the "extras" folder, please submit the pull request to the [dr_libs repository](https://github.com/mackron/dr_libs). Respect the Goals of the Project -------------------------------- When making a contribution, please respect the primary goals of the project. These are the points of difference that make miniaudio unique and it's important they're maintained and respected. * miniaudio is *single file*. Do not split your work into multiple files thinking I'll be impressed with your modular design - I won't, and your contribution will be immediately rejected. * miniaudio has *no external dependencies*. You might think your helping by adding some cool new feature via some external library. You're not helping, and your contribution will be immediately rejected. * miniaudio is *public domain*. Don't add any code that's taken directly from licensed code. Licensing and Credits --------------------- miniaudio is dual licensed as a choice of public domain or MIT-0 (No Attribution), so you need to agree to release your contributions as such. I also do not maintain a credit/contributions list. If you don't like this you should not contribute to this project. Predictable Questions --------------------- ### "Would you consider splitting out [some section of code] into its own file?" No, the idea is to keep everything in one place. It would be nice in specific cases to split out specific sections of the code, such as the resampler, for example. However, this will completely violate one of the major goals of the project - to have a complete audio library contained within a single file. ### "Would you consider adding support for CMake [or my favourite build system]?" No, the whole point of having the code contained entirely within a single file and not have any external dependencies is to make it easy to add to your source tree without needing any extra build system integration. There is no need to incur the cost of maintaining build systems in miniaudio. ### "Would you consider feature XYZ? It requires C11, but don't worry, all compilers support it." One of the philosophies of miniaudio is that it should just work, and that includes compilation environment. There's no real reason to not support older compilers. Newer versions of C will not add anything of any significance that cannot already be done in C89. ### "Will you consider adding a third license option such as [my favourite license]?" No, the idea is to keep licensing simple. That's why miniaudio is public domain - to avoid as much license friction as possible. However, some regions do not recognize public domain, so therefore an alternative license, MIT No Attribution, is included as an added option. There is no need to make the licensing situation any more confusing. ### "Is there a list of contributors? Will my name be added to any kind of list?" No, there's no credit list as it just adds extra maintenance work and it's too easy to accidentally and unfairly forget to add a contributor. A list of contributors can be retrieved from the Git log and also GitHub itself. miniaudio-0.11.22/LICENSE000066400000000000000000000050451475701111600146470ustar00rootroot00000000000000This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.miniaudio-0.11.22/README.md000066400000000000000000000146731475701111600151300ustar00rootroot00000000000000

miniaudio

An audio playback and capture library in a single source file.

discord mastodon

Features - Examples - Building - Documentation - Supported Platforms - Security - License

miniaudio is written in C with no dependencies except the standard library and should compile clean on all major compilers without the need to install any additional development packages. All major desktop and mobile platforms are supported. Features ======== - Simple build system with no external dependencies. - Simple and flexible API. - Low-level API for direct access to raw audio data. - High-level API for sound management, mixing, effects and optional 3D spatialization. - Flexible node graph system for advanced mixing and effect processing. - Resource management for loading sound files. - Decoding, with built-in support for WAV, FLAC and MP3, in addition to being able to plug in custom decoders. - Encoding (WAV only). - Data conversion. - Resampling, including custom resamplers. - Channel mapping. - Basic generation of waveforms and noise. - Basic effects and filters. Refer to the [Programming Manual](https://miniaud.io/docs/manual/) for a more complete description of available features in miniaudio. Examples ======== This example shows one way to play a sound using the high level API. ```c #include "miniaudio.h" #include int main() { ma_result result; ma_engine engine; result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { return -1; } ma_engine_play_sound(&engine, "sound.wav", NULL); printf("Press Enter to quit..."); getchar(); ma_engine_uninit(&engine); return 0; } ``` This example shows how to decode and play a sound using the low level API. ```c #include "miniaudio.h" #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_decoder* pDecoder = (ma_decoder*)pDevice->pUserData; if (pDecoder == NULL) { return; } ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount, NULL); (void)pInput; } int main(int argc, char** argv) { ma_result result; ma_decoder decoder; ma_device_config deviceConfig; ma_device device; if (argc < 2) { printf("No input file.\n"); return -1; } result = ma_decoder_init_file(argv[1], NULL, &decoder); if (result != MA_SUCCESS) { return -2; } deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = decoder.outputFormat; deviceConfig.playback.channels = decoder.outputChannels; deviceConfig.sampleRate = decoder.outputSampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &decoder; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); ma_decoder_uninit(&decoder); return -3; } if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return -4; } printf("Press Enter to quit..."); getchar(); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return 0; } ``` More examples can be found in the [examples](examples) folder or online here: https://miniaud.io/docs/examples/ Building ======== Just compile miniaudio.c like any other source file and include miniaudio.h like a normal header. There's no need to install any dependencies. On Windows and macOS there's no need to link to anything. On Linux and BSD just link to `-lpthread` and `-lm`. On iOS you need to compile as Objective-C. Link to `-ldl` if you get errors about `dlopen()`, etc. If you get errors about undefined references to `__sync_val_compare_and_swap_8`, `__atomic_load_8`, etc. you need to link with `-latomic`. ABI compatibility is not guaranteed between versions so take care if compiling as a DLL/SO. The suggested way to integrate miniaudio is by adding it directly to your source tree. You can also use CMake if that's your preference. Documentation ============= Online documentation can be found here: https://miniaud.io/docs/ Documentation can also be found at the top of [miniaudio.h](https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h) which is always the most up-to-date and authoritative source of information on how to use miniaudio. All other documentation is generated from this in-code documentation. Supported Platforms =================== - Windows - macOS, iOS - Linux - FreeBSD / OpenBSD / NetBSD - Android - Raspberry Pi - Emscripten / HTML5 miniaudio should compile clean on other platforms, but it will not include any support for playback or capture by default. To support that, you would need to implement a custom backend. You can do this without needing to modify the miniaudio source code. See the [custom_backend](examples/custom_backend.c) example. Backends -------- - WASAPI - DirectSound - WinMM - Core Audio (Apple) - ALSA - PulseAudio - JACK - sndio (OpenBSD) - audio(4) (NetBSD and OpenBSD) - OSS (FreeBSD) - AAudio (Android 8.0+) - OpenSL|ES (Android only) - Web Audio (Emscripten) - Null (Silence) - Custom Security ======== I deal with all security related issues publicly and transparently, and it can sometimes take a while before I get a chance to address it. If this is an issue for you, you need to use another library. The fastest way to get a bug fixed is to submit a pull request, but if this is unpractical for you please post a ticket to the public GitHub issue tracker. License ======= Your choice of either public domain or [MIT No Attribution](https://github.com/aws/mit-0). miniaudio-0.11.22/data/000077500000000000000000000000001475701111600145475ustar00rootroot00000000000000miniaudio-0.11.22/data/16-44100-stereo.flac000066400000000000000000066676431475701111600176250ustar00rootroot00000000000000fLaC"3 ÄBð¶üI/ƒ§Hv¨âø tåÙÙ„( reference libFLAC 1.4.3 20230623ÿøÉˆ#N³“E‚,^tŠú°ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿå$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I”gDºI$©•’%)Œ EÍàÁÁ nœÇ4ã„+i·ä’B.†*2·Äp‚šv©ÈQŽOˆq>g%O (b’˜pß¡‡ ™F:ó.JÊeIÆ,S0PŽœÊ PEÙ…R\ÝC>QŠ£ ü0pEã1†pƒŒ)2 0û‡å^Þ±$Z 8…ŠEwÀ`! /Ó†²à(ëÀ˜ÊE,øÌ èap €tØæü„pj!feb\4Ë Às€º(í»Ìøáfn”yÚ¦|dä4BÈ#hÑÓK(“W™ü¿òÃêøŒxw0*ÕDEºmkzZõƒËiELÐÎá6Ÿ†¼²&ôÉÁ²n­xÛ†"ÇâÍev'ud¸²ŒcJ¯!…‰ÔJi”Tâp¢¥-gÔ(²ÁriueL·K$õ±ÈëëëbD(œ’°`1–-:a6*(òüLù³0ÛLE9Åñ¦ ËÚJ,¸O#XŠ ÜØc}¢œe¤ 0¿@ƒ„¡®` ÂŽµ=¥(;D)ÈÖ$@‚¶¥š‚‹djòý ¾Ƥ xpˆ “ÓÆ&d`B–`€0<4,ïBƒJúÖ¢|8Ì Þ8æp∠ij4&WcÑ£8šAËD|ˆìûqhJhk./æR¸B{8¨yš¦QYvBEMõ­0ÕB-%&†ýNÓùt}ÒD¶Š¬L¾– 0Y¥™]$-&2ºèáÔêíb”Úemß±$=iS‚…!—Ћ ârm»'Q”%-gJ"¥ÜŽ(¢+^ +IöºE-Ý êUôLsUJ˶ÍÞª“ѪÂñ\9¬^‰·ÒÖI^DfŸ™&"±Ç¢ýµ7aå%+Ú¾C ùŽ7D‹LýÑŠ+CÊÊs…kÚ–ÐÏgm¡šWGÕ¤’Ñí¯¿ ‰ú<ó880Óq¸§âRÎN‰‹‰±‹+ûMyQd¼Ä±‘=}4æã®F±Qeûcuž³Y]2\^j£ûÖ:¿È1~Åäõ$˜€ZäHð¤p“Ï6¯ydîŽËª°¤4Ï9üyf9È/fúm9ËèÙä`¹e™äj3bœMk¹FÎãúÌéK`œ«YwêK)],"䱉-êÏÔ§œÉ–õ£N5Üä|(„úŠî…XavÒ-kS¯<„´ó{щ(É8)C‡W!ç»u‹«yâ\ó|o™œ}L¦d5˜c\±ZŒe)WQ˜½A¼RAE*SØÂÅ š7[¶jÒJÄ¥yξĮ•ŽÁ ¸Á Zˆß‡ª$æfûK±ƒŽóߪäŒf‘ØFÔ Þä°¹ñ? ÌFùxú<,‰×­üœIG#Œ0§MyÝF$­lÒ<ºR.jJ áh[fµ°O¾ ‰{_¬ˆª D8Å(Vйõø_)vkl&ZaÈn)N°P àÍáº×¨»!ÚÙŠ_ä݉y¨ïlî¯:¥Z”W(€@0.t3), JÍÔ¬ûŒtŠjó»'a/]‰±kBP(M2W(0Ç dr E]|eô;gI`Úk3•¶ L :‹<$@DQgʼnój³©y?é`Ö È¶¯k§J³š¤"QìsˆÁ¢öJ—bC ôC£¶ŒJÏû†ø|­¤‰R‰¥Aö† C’r¡Zfþ{¶C3´(!}i(*N/¯v²ì:D`a_açvNSÞØ¼Îäà AÅZ9‰g>H-þøaÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþ5UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUa E¥XC0†E¥a E¢0Y…ˆ0P`'•„¢Ò“á8±C2ÉD`C"bä&ŠLK&(C`Ma< ˜…2%•"l0b#‚d˜ˆ0ˆa2ñ!‚ Ð0„i! Q&K„Ây0ÅÈL“1`Qˆƒ ÂÂt‰ŠÐLÁVDÉ&ÑdÂxFI&’‘bd–â'Ęhä'@h’äì¦|bâ*"’Ò)>I•¶pŽÝ¸‡B,#“JÚ8C“EBzÜ•Zd)²µ¤üˆðb¥MS’XÛóoMôÙŠFvˆ¬ÅhËО5ÉÈ­tn”Ž!ÈÊœ“·$äSùºX!rk·IÉunEMZ¦ÖQÑ[*k¶ä¥k#iSl¨ ¤Õ)… ûvŠÓt¹.nÉnMôjœŠO j¤Ó³’É smiäGy£Ôe›nÒd\EÜGDœžÌðŽLâ][GQSví.'¦¶%McIÍTÙɪXKð‚ä¹M97mÍâDÓdÊÕ«± 2%Œ‹ íôdSCH5Û“Ù=© {N¤EH¦½&¶Vso¶B=EoÄZ5¬HÇ68E¤œ™>‘¾lIDEôÔ‘ÚbRM'ü”# Ðæ.ÛMDÛ(ÊÝ ![A‡!¢9 TFrSšB¿QŽC‘±)—l¤ŒÃs9¯¤½±$D—%ic£•4hÎz13Äé,-Ü"òB!d)xn éª\8JD:O…íÍ_mÄ)Œ!“£·-¤ÁÑ™aÇ3EnA1s¢2”„$!ØËà“î¹KQÉ-áã*×°ÿ°l5V±sÍŒº¸ÔmàË»fŠ æˆ±!XYªCeÂçtŒ1Œ‰DsÙ—Á§utjºPb".­L](Ÿ™¶,ªùÏ–¼KÚx–³6)OYG`£3ræš”ˆíóí lE=;V7H•ŠˆÙ0·¤M>FhE‚5ÅDf^ç-+»à„"^ŒêÄBqe•ŠíŠJQ hÃ=tQå&٠Ͳ shÞLìlL¥Î'³Æ GS Èn™¸„c¯áý¦D:š XãPÊ#sEÈeCÆr(õž¨,VÆ8¡†CØNQ³2N½³H„°£%G=ÞÕå*ކF‹”I_–|gðB (&"b„3äìmÄ „Âè|V½×®ñHšB#A!Lfu¨ÙR¸HÏHHÄ+"3 Ä+ B$  +ŠF§µ?c í‚"R#(®A;ŽQ3–0b¹*¯³¶¬…1‚±²)1a£B¹™´ ÂA~ä?׸,@C3aÄJŠêp®Sb"$ ßÅ$­bG¦„®Eð|#5ô‰} Q;¶]‘ײ±SÄ M:ç”ZeîÕñ{éÔ–­4by’ $R®ó•$¹3DÎɲ j®(B0á\A‰Ë Câ0`^V ÂèÃ?ôH )”!ŠTr.V^ƒ‡% ƒŸ8ìLM12ã ¢rñß‚ŒBÉñ[j ‡­³F¥ÝOÓ¸Åí±)¾1ÐKâï§&3Žd·˜©‚)øÂŠÔïbš™E%w‚ªº•HŽC­2™¥ù7mýZ~:ØÅR-®ýÿ"?®Øà¥MÇBù«O0ˆZÓÙB®ž¸ªÌD­6˜‡BLn,œÂïó‘§2CƒšõUj·’ÞR™®)yÕñhB ~—–»•ºûªkýI§¦˜Aˆ§eÞRÉeUâ?·ؽֵ3Ô‰ùzÔµ"¹[Š¢Žw ìKÆ›mI¢íäs§Ôåd&‘”’Ä]ñE—þò×­½…v>~Hj²®2ûæSeú}u¤‰´ìÝÊ\aHë¯LK†u €Åe9Á·9ð²Šçš¾r¡(М‚”,³[vS‰­ÒÙUÍ$¿ø1NLÍS±¸¡ A"ËÚÂÚÝA¬VV_r¼˜ãÊAÊN© –ŸŸ¥½$šõϪˆ¦!pR³­1õhÍc#Ž:3[çË]0¥Uæ9L¼òRjD£õ‰~Ò%+³Ú‚…)[°û¶);DÎ89ŸÿHLS ±0" åBœ Ë6»õØ“}ñ6ì¢0®%¥µZ½Þ®g0Â0æ)]ÈS2Zت‰1 Ö¬µôâ1Þ•=iŠÿ’Ž ¦++Dš,i¦Ù"þŠq˜Å؃+ZN|»Èbª5ü¡„2rü›æíI\Ì#›}ÐõÍ’{V¯_ÆIúÜ÷´–a™–ŸZ ïÒ‚Šd0ç!T3LÔZëâ +‘h…Yé&ʼn ‡:ðga­•(¶þx±° |kÿøÉˆ$N‡D,Ýÿ[Û‚³“œ&ß÷ÈÕyx†h'”£Êå=G-PV/”á«ç„VÔ•>{=ÕŽ¢é¼¥Î£ào6e¥=sF@»#‰¥”çÅa\€#èôÌ~KW†+´¬³:Ù‚F8Ç7ˆ‚`ì¡ü·²HQx¥ý–#I×ôn YÿÕåáD%(+2(Rʪ 4´’JLcF®¿ÙGHRÙØU“-àµýÁ;òEf¼GŸZ*1E„qm«Z[˜DWö°ˆ™÷,S Âv…¡± €ñ4¡ aŒàÖZºÙÞ›¬¥°+W놃üf'ÒæzI„xwÜÇÎZÓJj]§+s3ŽT=zE4øJ \f‰¦z„ªÞF(tÂLäÆ!èër¥Ð8):Pšàƒ‹Ydw©GD5ÅJÌP±¼­´zo©tã"ä¢P½ðòñט½ÃhT~9L7¿¸¬BÌÚpK?¨·1‰OAĉ±þ¢— º8[µRÿbÔ—n3S¬yC#Ø¾ëÆžId¬‹â §8$€IüŽNvÔÃù\¢~/Vµ¹«ÀYí¤[îJôM2(áVt€;‹H(¤¦°6õjƒ i”UK%RôÀ”ÊGç¢ÛÂúœU}±G:вÕi,8±ÊL"¹ºq‚"èÇ#×{CDà…VžT¢2ÊÅ•·Ùè{•¬ÈAÔR§;‘I‚*²² ÔUɱˆU.†¬&ä¼É:aÚœfuz3¤è@RJù93¤±˜IU,X¥ážeßP0PXM3‰DT…ˆaÄ«{£&1K4Y,˜& ’ÒÏgèD¸¥- ¢±ÌÂS-E_IVVÇC[Ɖ!E^–b _Û1ìLH”Vt”¾UQ€ãiÅŠNi‡´áÍèXÇ”Î,*íSÆbäÄÎ ËéN¥¢- VEåT<šæÙI‡¡¹ÙNu«‡8aˆÂªómg²é ²¶&#§55ÔMrì¶¿óÄ<¢4Ë^A¶™‹"B™ZÕ:¼N¼ªú’œ âð½ìòˆÅy…¤ºa¼Úõ?V8(G*Éúø{ëj6nYn¶ZTk’ÇC;/Ç åuê:ºLåE¶fÜ›¶¢¯b¾Í>žÐ\XIYšA%‚­4¨™s 9ÅQyŸ]\GÎû±hµ\ºÌéw” ¡"ìQd­ÂÙ‘.¸ÜqÆE†µ—&®ú_pCòÈa%)"šÁM"1‰äÍ}#мFÙS:Ú,]¤b"ã¥%­‹Îùqÿþê¶iYBd_»²dH«Ù Ê1Š‚,úœñ0‚Xâ‹ÌPÃLj¬µo¡½ä¸^š')šA(C3ãô’Ó¶0•0¦´sL$)£¡#b#S "9 Õ ¯¼îoèáNÜhéëy †—³Ÿ¹ÍB>³zœ_]õº’9Ée¡FT°ƒ)O‘Ó©”FÚT”Ôˆ\Û ,•¼³Î “X•hœ§„z|ŽJPŒqH.‘qaÚïZ‰µJ;yäDp0bBË*šo„G ßœ15L¶V[V¤¶ûNz…”´EM22Hñƒ,Ì™ÉRœŽ«»‰q{/¤áQÄõ¦ÎWõì?ÓÉØsšîœ &ÁÂæI ZèR¤s¹\ÏG ¾3½íg®¶f4)‡]Ñ‚*S É4ùe·õ;ªLKª!ÈB38fÑñœôáäcбTUŒÕËHûLº®Ï‘)3öL”^Ûiül”cÄt–a´ý}ˆñK[ëBæ{ —Ne¶¼HÞB(rè(®-Jð×=èñÒÌäíKâ0Õv¡ÖVFªÊUœQÀ„4†Í•-í-P90¸ÓhKKœ PÒf´ýR9öbZˆ"Сr: QPŠÑŠ•ÂW1•™ÌZŒã qad•ÏÎR{Ü „cžsQ[q¯Ùòóå6RÊ…V¡\FôK$F0b‹W! ¤¦_‰v»/KÌÉ/Ñ«Amzؽ¨sHQÜ@@F,hV0Jø$³Øs?È1" E¦|-2[¾½¬†®¡&9…[ÐNn5VŸ&"RB«o•äcœ ‚ˆ4âa8ûàæ+HÏD,ŠUDÄßôÓÃÈiDNúQ©ô ah¯ã¨Ç*Éo;×÷È–dÍ~ϯ²xì¢Ô¥ý}<'´U?ÔäÆ)ÓˆéEgsBèf\+K¬¤àWY+ü.Ö³ìE GÁ°Cµ¸üÖ~0¤!1:‚ ©ghÄö ¶¶ Šò¡g8À«iiØY„k_±òâ­1ôÄöÞ'mïME_©ÇöK¢P§j?‰pŽÀÀ„øHˆæ£ª‚ÊJÈ_3?Ëq)øä­Çø¿SxO2Ju¸ f>Êæ —SŒAɲ"¿ŠÓSY0ÃQ>FÌM.wîWÐ ‹`×L9ðRs ½l‹’³‡ âJq&3‡ C½JhÇg¤¦*8ª®±W$H†¢ö±ñ¦öîÓs‚Tµ´¿:ÒýïT¸‡ å`šì{1‡Ô÷]ˆ¡YEA“KOºOk³ %B§B¡0Ågä¿h³-#f>^“D½@è>I'•†28ÂýaØH›1‰µ"Ë:âü"¯îÿÒ5%hE‰?Yh7!s” fJ!#B³)ðñí[ A"“Šx¬qÃç»ß]Ûi·à“ÌÅR¤4Bíä¶Ú c;„bɤ¤¤'¾kŒ#B,Ò‰[¦ ÕLr4¨ÙØ0\¢“¦¡íN±põaÆNµ* ô/',ÈÒ!Q ЋA–‰+rû‘I¤F­_´j‰™ëb¾Syʸ«’éöâŒCV®É0Œ%Þ”u!”†ïF) §q‚7¢¨Ú&Ù¤ê!ÊBïçÆžyDµ›Üi–Ë´­Ð¤ïæßócúƒýûÿk瀠AÿNyìþÿ+~¨fAÈSÜŠã¯]¿"êâÜë™ö0í¢Ô¼“œa7ÌTÏŒ™ùBZöi/>³é—(¥b‚ÔZ>‘¨N!Ãqñ’™{}()6•rPŽô¦¯¹„n·Õ‰„•¢IFÏŠájÛ× ª©Æ8Ë#W¿s§·a(çq´!ÍÆ°CR/1éFã骖˜m§[P‡ß WãN+ÕØì«#(•!‹GªçIì•ÄCд%)©‹c¿˜ÁÊ÷˽”·oÈGZàÇn>»aJÇ«Sûè¤ϯEÉ’Rξã¶þU–9$ž§i+ƒ7â”xõ©Ã½T»j]±‘NœŠ«2uùl=#õ,0ȩȉ÷T’™i¤¸§1uÆÊ—›Bçò½G. _qÈ#J ¥,ÜG^-›(Ì“’i B= î-£&8¬µèÌÖ¤Œ-µ°y))|ßs'¤"'œ„v¦RuáÉÙà 3+š¦êmK“”¨ËD[%©™è„:\ªMšôæ$£4ü[Ùö§#¡*Xujj̶[/Õ*ö©Áä·; 7Òž&„òªc¢“R¶/s”f/¢Š±Ñh¬RôDÓ‹õ£¹‘ôëVÕþ²4Ü–2H®×:µ-~®¥©l‘ A»F™gJ’ñ œ…_+¹d±=““éJ-Q Šÿc:×;D±]…öeòÂys"¨nDuÙFZ)ÌYÞÇ•þ褣¯ZëPœM²Ëz±;Á]÷YÆÊ'‹èwQ5éT£Ö9 ”(qÏ‚y‡¨Åÿ Yg(äÛнFGö‰Ýä¡)&Î'Ä–R jš ¥³±¬B™ëë–iŽ^'AD;¬ÛÖWjPF^mî÷Hô<ë„®Y°'᪕b“ï[{Ôƒ—ÐC©Ia_™Æ_ÄÖÃÌÞE(\»NöÆÒöV_!¼ísoQýÒš_dLb¡‹EDMß*L¦57tΜge ïÔýE›-cF™ý2N·ò7H™Å"“çj?uÍÄCªÑžAí×##ÔèÙ~oê³9å¡ dF’·Z)¯¤Â t&Û8T9*}k6Qr¦3”æfPެ,¤z—54£œHC*×qv›I0=ÄF¥µZVÖ6xF®ê'ßøczÔt¢38®Æ²]qNøzÇIÔt54eM³™U¥2Ói~ü K{îG°uEÉ ÅD©ý;Ú0ŒI:KC”0ÆÀP“m•ÈŠc1J®kDŽ+˜Ô…ÞØI1Œ&4BFBè¦éèÆQ5” ]Ï–Î ?>¹éQƒ–ªW&@WRø²\C2 ¦8Ä#áA¹ˆ Ø¢?e® À˜É-Åt~BJÄÒ.µ˜EµEŽBi¯ ¡‚†¢Iƒƒ®—? jñ œDW#v Q(ìüÐ8úú:¬@€°ŒEÃ%1…¢]è¬" ÄÅ Bª‰WÚ~¡$(R· ÁKK† £)0‘Œr #˜¸*Ä®ŒbNØÊP„8„$(E*—\(^AÁ™ X"†g à„U h@B—T YÄ2+Öñ…",+œÐŠðQ…i[ËTT8H¶r§!0œÆæ2 ‘ˆÂœB„h†A”ÔRñP w3¶s¬ öAÉÓ³Á DSb3¡Æž‘Œ€G3G5™ŽY˜-©ÝB±WäJŒ–£·Ä3iéBò+—O7oU]¥âó©HZÓR¥¡þ‡£ ‡"ŽT‘LÙ!Ùß p•DœÂ SUžJ/¶ÕÛ§½¹x²a%}Q7p䳕y× “†õužžâ¨R-ˆF,žFtÈè’I‡B[<£Îgؽ2öqE*Tø¼ªfÒÞŠºôÁ –!ÊV}(ÄS}ˆâµ3nQwR„-]uäI,ÝJ'I×7 j0£k‘³Œ!Ó„ÓP¦ñHÈRéÔã9X˜ô˜’­QAï'kÓ=´ñôK"}Éï"4FåíE£ºWQV¡èÛÕ„"Kô¸„¢¤öÅv;´ääCE¯“Åëu‡7¾Š™¾bX¢_„жc#éYˆ9Õ«Fu5ê¥%k &Í1$ÿ˜­b¥ywé#%E´£Õ+p‹æAÈ.wDZ§k&Z¾rv¡ vî"I6¨âÛca¡ƒK&\´òñ 8ïãû4Œ‡n¡˜·`„\¯U°B#é>EæÁŠ^k*gFV ûr{‡írµïÎÕß ‚T„òGoþÓ6 ˆr±Î¸ƒ¹¹b—¥u‚³’™¨ògâÌFÖ²Sí´ÌÂÛ¨©öÛ½¾ÉE+‘qC­Üdˆ¥K—Qnw_b¡úê Ô”ÔšýSwʲ[ðìø±…äʺò‚ŸrŽlã+%…;–¡Ž&4ÅÚ2´n©]4!(I1åQŽÌnlò–ˆje7lV›7JNNNL_݃5<í´³AWʺޜ95³ùËI{P½r˜M_6‘u©úéJ¬‚"(Œ¶´r;º„Z‹ÄIQ—±Ó,`d]l#×ó‹ŠB—™ˆi"f4ªõÔ*XØ›ÝW9èG•bñH‰¸·f4 ~îÿøÉˆ-Nü»ûXúƒú\úâûåýþ³’}ÒŸ?”óÖú  yáeq„🿠š8’‹˜“¨¤AGkßÑoøeÊŠ ‰J+ÚÛÓÃe@E’å>ÝÜ@Š¦Ñ˜Ã9â}ìZÐæ!,™Ä«X_°_KÜÈcm°Id¤E"ÐïA%2ŠÌž"H¿­? Ѿ„]$èÌQ ‚"°ü™Ý?•\‹tVr5¡Ä×Þ[ÿZ$(¡Ƚ&mÚGâ;(‰:\01‹¦qeÆ^§Dmº-»«R;ÿO«4hÕ1BT)Äa‡#‚ËøÄjÅ{(¶$‹Vc¡RG:|þRÌD«ÒÜnÔRwÅy›Õ¡• 9ÈN„¦Ï<7X¤9¼wâÝ:ÌbèQ(kC¥‘AD0•ÙÏâQº%}Q2@Že’•û^.yCësêA6ýS‘ÍGîT8ˆÈK’ø¸Ãr„5pó,÷°A T¨½Nïw(Éw@ôKT’P,^°¨æØ¤ë²[•1HÁH1Ik¸ƒ)DôÌgäZÍeÎIê}& #k5ÕÔ™ÁVŠIR¥s©³R[MÂw¬¤¥Ü!¼Âƒ$ˆ½iÿ—¶¾îºw&«¦™"¥ ^`”êV÷Ù\èQ<_âh¨² ˆe)ÜaRß­ä µ#¯2íðˆ³©=Rõ¶øÓÂøw 7h­ga–GÔB5—*t¦íË#ým(ÎΘãwÓ ŽNiåNð›9¢§„8ªˆLy-&ÂW°1ÈštcL@e¿,È9¸¼½å,Ɖ]/6·ozŠIÉIµºñ©ILT¿Qb“Î㟪ªü˜Bf‘š¯±š†r)½4„Z z´¦ÚNÉ; r[ïŸLÏaXAÜd½qN´õFÍ_ •X¥»ðô«QOv¾v©XT1;:¦»êKžŽu+èZàMv”D÷äKSh„,TuPS ’^R I9éjB•k Ù®`ìÅÑ<^ôï~©w=l¸Œc쎽PM¿¨IÑ),’]‚·yNwo1Îr¾Tœù-ÐQ‹Sl…ì}s¥Ð±UëëĬxZƒ 5Õ˜¿váuèùŽRT—"–ä»ë'²Y6ëWEb廨§/¥dÏÂSg ¤`Y³p¡eÉ´“ÙÄ+T¶]²ŠëëqˆSܱõp€aÐ$}³šôâ‘ô9³>ºÒä½2!Ci†o1•3Ov˽ÐrJKanÌÉçD³Õ}»MÖdç å#rôêûuÔr™$xŸÕ5ÉL[Ó†A•ÈÒ$„2¨¦N/uB7D‹&~{ùp®Ö\rÚ^¶eKBW{ëC¨bˆŒ–Dqhèö¤{ÿŽf;*P¢¼i*ÍduêèMrÑu;Ü`‚ J“ô\|!8¢H4—}¬[iwáÎã–†R)›µß•*+Šz NM3D;{ÚTJäš³V&…0DÜçÏ¡®+±î$¥‘ŒgŠHÄì"³FQ‰¥B2nbù¤-]“‡óˆ) ÁAVñ5®ýjPßõ[!0×-N”(Ú—Oz%I™r8ƒ,<’«®ó³¹YU±¶Ù¯CñvݪQIÈ;"ª•ÚU™ŠZí*º®QÚ¤j –Û¿™Œû¶0­^>ž$” …K)KvJ”);ù‰ÄÉ£EøƒBÎb.8çU#±¦S±Ni»8ÚØÅ$uêµê?ynÚƒ´ïÕFZ²²¸«b”f¡|ÊO¬.ËQ‚;2:‘ò2 ûöÔ¿[öeJŠ îzùßÞk†Ò¿)âÂMW]ÙG¹jbÙ10¨:c*^-—K¾‹R§ž«ˆ'S›ç‘Jbjâ.*yD‘½+*œíÄ)¥òr¡]:ÇæêsÊJQèF¢ãøûKalGf c "°˜E5 ç=3üJ#ðoCŠÄX¯ ”3i6d©,Š¢ƒ kÇó¦åD_%‘¶‹FlD¥ø½]z¢!*¥R ]cRVعÙE¢ÌfQS©|=MRˆUlÆ[WÔbÖ£C !ÍLeÜÓ±iJ ç’°Ô˜8+2EeDª©ÿ–×f:8Dƒõ%lèŒä˾´ úÄ¢¦p¹½" é»fÖndº1Â'…ÒÞãåî5še;¿%zSNœ!oŸÏÕÊJ§s¡ ]'œJ¶¥ÓY¿­O–=$Q¤´¬˜]3,‚sLBü~ˆùçŠÅ•ñKD¸ùcb¤äßÍÔ¶œk/‰Ò2Ž£¨äZÙòœ«º˜•B£Õ TëZNü1‰üfkºŽ§-›sY+*j¾O÷ÙòwŒtįQDC²3ÑÑ®1 mýö"{’Õl"¹•ü˜lØZ¦ÕøEAvGÓáQÎiݪ:Û«¾§KH³N‰M¤Œ“¤Ce/DyÉB5‚JBÖbVNDwaãR£s˱¥` Ä•,BváqùÌÒ–®ìÇ|ètÄ5з]‘ˆ/.y½ñêÕ#Qi“uÑ×=ÌÅʱ9$ô¤ˆ:ؾ­Eª‘ß•Ì9÷ ¦’мb abˆ(Óí%X.(ê§Ô`BA² ˆJÄ(C´Ë™ns+ÐÃÁ3(HkPQDÌm¬5FŸ$ ÉŒc9yÑüãEÅညÁ-jQ†Š‰I …ŽADí‡ü…´â¶"ð`PIÀ˜ËÕÆÈDX'ÆxpLPEÀÅ tn‘ð]ÆB„Q3¢“Ææpƒ¹Ç'6Æ|zÆC„†CI-=Æc¿xž|¢D7¥þÙŽ—ˆÈ¯Ùxµ”Š«1 WK13èèDRÈFô»¨#•Š|¹åÞæob•©ËÅ£Xˆš“»QêýøœRaM!'§)‚¬¤9ÊZ~zI‚Ë$I‚(FŽåBïbyUΛd׫íM"jy·&r l-$“·ÚR›KKÒq”â•ɤ¡ÞF:b/âÑË¢f‰E`ÏFmetìyz5ô„:#©3µO1-)Q(O:Q3µ²ä£g-VfZ¯á)å Ì[ý 6~º×zÎz&lÄÙ|^´”iC°Ï$¡ bTšN½GîÇ+B½ª¨Þ»1ñKG²NÜAd/{°evëÑ­q Œ?þYLEcÝ-¯œõ!00rRе¥’C•¦§5@/à È ¼ªÙZÆ„M€99 B»ïÃ5IVÓ•£*×?hI";ê¸lÏaX–ó2í|ˆ¼ÄqéœÏö"qÅuÏ ­K‘ ¤™Þªã‘iN-µxR9¥L§YŸ‡üÂs”•“„Ã`f‘>¨ÇC)y_J”d1EDá(Ç)pP„òqv&•¨5µê¸OkUq*—mäOÒ1ßÕvÜUI²¬aÓ¤±þŒ#æj]8ˆÈ„±N½¼+¯ýÝè¶À˜œ‹œõ®•‰æP¢ÉˆºçZ¦q¨yXA•w6†ÂÎÜ#‘~ˆámOˆ: åNEEî7.‰ßÄZ%L2ûnÞ´£â) ´òŒWñ=,8B{9h7úiY4—C¾{TŸÇ#%k™Maþþˆç~ieµ:k¢°…òÌßws±§+µâvFÚóNÚz)§~£›ÓYõ%)A×Ù4S7¹´«Rm¹7BŸI„æÉÌ%:a¨‡y©Ê¼ŽóÚ™ƒÓ!U 1Ì'e˜ËÕUÝËŒæ‡ûNc’†8š4¥’•™:¶¯*YŸ¤Éw.æÓy%Q_ÜÅs˃„\ E¸š;1¤"žìDgÅOiZR=*cªu] _ÜžŽ¢6;Û UÃéØÄû“KäDÛ«§7¦GS·öÔK!Lç!Éayz¶—è:n.]Y1ÍŒL{N'áè´QÆ".¥~Z…)š¥*^KŒÆVÒ#?…fjsVØ"…ÿ-…'êÈÅÔ*7ÉKœ+SYHjŒîzïR{St®èOR¦Θ(öI(™TÓ}´—£ñ•¨]²Y™IM,ŸÙ"\dC©Æ¡ì) ÷71#Ñ… ÝÖÿRû\š…¹’öQ [':Šo„§='Ú!XÂöÖ1S”êJdDÿ#!‹üBµ¦ÆÄfÊIpôž®Ì[ÕTÄìföÔ}SŒEå­Í­ÓiP+¯QÜ„ºÕðB7QÊ®&Pº;ëMgeû4D­{±g$‹eÿä7ìµ7jE?esTT©hîÕ2PßBN¯Ãu\]¢J¹mJ#G²šNG^­ŒKI[œUvÓ5|N +¹Õ¼æLO^J !™2„©êCï±WéN+±µèè•NzSóbQ¬R­UDjú­Q†–@£;×Ô£JhC?[.ˆÚ0Ç¢i'² Û-5ˆ\D#1,¨7Jt$Kφ*²ââÈq]¾•#¶¹E;û–."÷Và æèc7ÍÖ:ú¶ $Ô÷Ô¸+•™ ÿᔬ˥ã±4´èû¦yBß=|–Nx»šG¦º\jé[øË„Ò!5Kß¾!=î´3YP‰"ÝZÄ#’ýèÎ9U0“¦›8f¥ó\j³j Žÿ¶¢ß;c6uËõýëgÖ•è‚-²³ª*ÐfwÝJ*òâjv6R‰†ç|µrzù‚c˜ÈÕÌ9d‘Æ3b”ÔD]Wq •8¢º)‹w×ÌÊ,|5,è«¥! ©ËN›pØXŽ)¿ÌVÍyÝ©d“«ìLbYjâ«6âÑv@‹Ê†EÂXš‰¿-wèųv¦Î2È–.!êÏòÖÓ9U½lE|W#\¯Fº RÛ\Ò ô'óY’´j„Báþ0¤bÓå¤M¯Ù,A¿¦0Œäf¾èˆ&U?CDˆÆuY¯&?VO–1r±Jb’€ÔCü!àµJECnü̪HCˆÃ-búìA8ˆšÆpn*©…<"JNBŸ”‰[xxCPšÅ £VÔ1(g ò¥1ª ›l’ 9è…A]u0ékP”ªR“¢|ܪª$03#MƒsÁEÂx ÃµQŠs¡ s˜/áäÄ($)JªëkpAP:ÀˆÏXŒC”Ûnì5 ÒÔít‚ u¸âˆZs&£×/ Œ,S¹«ÃÌGݸ%Jìj ¦(”f&M$,!± Ä9¬î$4ؤ´%, ÀöµC‘þ6&FCyª&ªaÌ1˜f„¢D ï:.0;¥ó›Jìw†¸d®Ô¤8C¹MH2GˆHæj0¨C²F¨h`†q—™Â’(Î6Nû½1a…Xä++½H'ÀÅÂ9" ›2NbŠ%" ¥‘£8’~‡É•­*†°E™XV•ØÇ$v9˜Íyž£`Å~Wc †2%IP DŽ'æNX¡šN˜¢•á•lEÌ~¡¾‹À„mMÔËÙÆúK„6L`›1ÌÈÇ‚ÖF–÷㹨Fêg(’`,,!‘Hü‰’³‚'šŒ&7aQÕpl­àQŠ ­ŒQàœ¤#»AÔô¡HVw“" žA”$Z¦Ž!õ@' c I YtôªÔ E¦ s9çbÀ™>)š9…‰ È#wó a)S„Ö:† `Âä½%6Š!ÝÈ:+92Ї'C)–܈¤ˆÆŠÇñCnOZ±¾Ø¨è…j»ŽùfÄœsnBòX Ë Ô‘2b8æí˜¾‘2˜†D@•Fv„‚àzÚ‰àDAsŠ‚)ŒSXg,VÓW9¨f™·(AnÔ˜$ãdGQR ÌpÛâü|rÃûH ØÄí ÃíÌa˜PÌÎBš#"(O„D„"\ç1ÍБnp›ŵb¿â¢þˆ› L>2!„ …¦GW[d B"bÙóE™Øæ^!§r‘ŽhdA¿ÑFR±ð¬$6œAÜÖ #B1k 6´ÜˆÀÝmb„UD'n®rüÁ uʤ˜'}"âLLENž‰3-æM Gc˜JŒÅaÈ£¼Ê‘¸xÔÇÖ&X¥ ÁI6|Y“}ÓÑ$A ‚€‡ ÑX»¨©JÑ5Ÿ¶2˜*=²¨­±Ph!‚°ƒ“ZB£*ÖB}Œí}‰Ÿ3¨Â‡/ ŽP½ € ‡5‹— Ää^¢‘±†{À†k’¯Q®D ˆ0µ;¡Âc™¿=4³9`ðŽ>½ cNÔÃÐ1òWv*,p@a˜4:q±>÷ô×#çÀ·„"ø¦b˜äâİä„aH§ò†€&€Ãµ:EC(‘Œ`¡Ù]Cv©²©bKÿøÉˆ*N/ ‘ '  … €3³’­½¢§RôØæy@e¸5áiâOäÊ­E*Eyˆƒ Jt`ÌÄ<¬Õ wìf»œ³¡uãYª»:2HÓ©å Býɤu#ðþ„0§ŠU:œ"1¼JL‚Ë ð pÈI›mu£DhŽÉ}(þ>ÙÜ#eŸW—4W>–‹ô³n–VùÚfÆ3,B­ZÅŒeêbÑâuuR½ÙñK„É->ôˆ¥´¯]fDÛܧrÅ#ȳ'#a5Y=UÑÏŸt3y b Ae¦•2„–Æ£Û×~õK*HƒÒ—²U©#ñJ(vÂÚ‚ñóˆº`„O.”jÌLZYøVñˈ÷Ù;ŠcŽs—ïŘþ!lj'æt¯Nj‘5ˆ)ºþÔAfU ( 0&•+¤1ZVž5Ôˆ¢ÖJ}âß<"å÷XýdÂrFšŽ®šÞÌuqÌ\ˆåYù_»âØV×¥ýË)2Ÿb²]ÊjÚ½ÈÅ(‚‰i?¨¢}¬CŠ08CV%¦<Ÿ¶ `F~ˆËL\<yÀ ƒí')ë‰Tz+rìïi./–—Dô¥K›gõ") È"˜FqA ©G±þŽšLæ&Ó’ŽSÕ$ñtkÏ[ ¤›TkŒ=T¬ÄPì©ÄëG\NU‘µ\únŠÃ³T즈}¡[ô³Éj õ/_ ˜<ÔY‹GaÂÔe9I+ëgZB>¬a]I+ãBò¸*Þ²ODÌÓ!EŠC±îˆ‘'{!l„Æ«]}¤3iÊj2a¥)î ÄŸÒBíhê•9WVEc±ò¿Ö·MId± âáêKUTôh„,e•ë1*ÔØGŽ2eŠÜ]1ôº:”«òãb#¿ÊŠB¥pûŠsµ$µ¨²FÁ–§ Ñm/ &‹7ôAF êcM$…"»j…N%„ÒÈLiQÍèÙWÞ'µ÷ŒOÌÔMŠo©j¬*ªR¤ÀÀå,ó6}®ËBs Ä~b°­ÒðûÑëH«ãZ*ªÖ!|M$Êb$è8’)Ö5“]Þå}wäJËQ”r묧•É!14ª¥ÂÓEË¥ˆô$Ÿiic•dÑ ”Ì @‰ >ÿÔs¤â{aIAd/äÂ.6l[xöwç¬y\HƒJ”mÒ179{Xë$§!)*fž)ô²©á©’_~f£Š¥1ÕU“xO—ú’Šf±^ÄSœf©‚i™i ¨·PìÎÔ~¡êô1ªB³È† ™P”4¬¥IJÒãIíp‚Ê!iúë÷tr ¦`(@„ 4¾‰ÙgÿM&=*[¥§a¢V -–‚Qæz§’Íâc¦¼ÓŸ0ñš­ÖçÔä)5¹vR3ÕÆUAÃÍnnRœ×âS·6Q ĸ¿òà²Ë’Š]¢bd¤í´å•†*±R«Wn"n‰Êäiª²zó(„:uÊ–)= d³!D¨ŸÕ¶p«ÊG P»‘UÆ/Xê:ƒ%ãI#ÑP©_räM/—RàÅí$õÖyPrÈ¥^!,»Bï¼ÂYz1²Æn‘H™ç&ˆ~Ì™ü ñ”COe'ŒÌa\|žjQã[¢^æÅ¡8oíz; f4B–CÌZ®‘ÜB¥ÕQ%«C•nzú|ßÉ î#\“üÿvŠòœÉ÷¯,²pW>˜#%N T‘xŠ6~”„Fµ 6¦ˆS­ÞC~󘕖{ CÌ©¢QÄš‹ÉK•‰Šzš…ÁQ4GßSNS)A VHô”UK × +ÈSŒ‰[TL´[Éi·>?± dæ;Œ²¹Ý9Ÿh!§(±È…帚R7¤D"Ò¨xÏ(B» ¦ÀÙµYY(ZlüÓòTcI)lŠs:ÁÙ„‘èo²2,è÷}&z唃6R¸7I1cÙvR¦/ù9‰5•DE³®òH×T!ܹ©¥8 F†ÑQrE=©¯ü ¢)ÒÖÔïz|J-¹÷´³cÈš£2”ÅJcû/H*ÑV÷ÌåÌY”£©]Nµ»¦0Æ`£PJÒ–Áev——if§¹O©£ªEP0ΓSÈÙ?ÐÜ’¦MOü®È­1¨ŒE4Év¡¤+ÈÛV›>î9$Ý$äÁU‹SîF•èTnv¨œ;Òš°&Š6Gˆó÷ýÂi wfÞ­ùe¬y£ D7+¤™úL ¢ª;ª´;È×f«¨©]Qð&Ù‘•Hê²!îÛÇ:ÎGº¿w¦Þ^Ú‰ó„ÜD¹Rhâ&φSIª¤=ÕdwÁdÏmN·¡yîUÅã,ˆÛrÕþ©Ÿz—*ñ\¦i,]õ¡T!eVTD»£¢<\¡Œ 3÷¿ðA]…©elúä½%dˆ]Úr~nY¡UŒ»ž½W£ÈÅ!zô±(*ˆsn^ç꟮óŽ‚=«&°•2HÓ$­.[ÄýGWò)ŒÅaƒÐÉSSw/ÎT>hŸ5ÚÉDbÔ¶~ŽˆfWïòHJ\·¾5ÙŠ¶j"àJ둞Gª5TižåT… Ñ&°åd³—£kS”Êtlzý%øOÉ>µ«ølAØfœ‚%S7…xÌc­zq¨çæ¥í‡H‰EµD«°…Is -SK"ã÷?½7Zýy “½Í@ìa¥¹ä MÞ¡d2Ô‹¨ï)Iéôýz>ˆÇ'±®”‘ª¦ä}-j™u!Ó-íªg™$C5S,¿80ÀƒFšÅq8¦X¹n¼ž)Ã'ÉÎZ…õ—¾’¶5»«j'D5ÌGe°×ÄG$Ž…\Ò-8Ö_ˆNÄ1Éé\>n¨Â˜‚.ÖkÚeôb ¬ŠL­ƒcu×îš#ØŽ Pƒ•»×ºýïµÎø”Z;ã&ëûµZê‘XQzOFÏ~ j”ñØ›ˆJMƒ”þUüˆBù˜¬@D¸øÓˆúúߢÝÈ#“„÷¦ù¥Ú W~{tÖ¹rFqRí2]±[2J©¡HëØ^é¹_Ò¦w¢ˆ7þ«(á 3œŒ|‹WªfY·~ïj‹‚ö(Vº³§Ûzjm¯‚ó!•&cUÈÔkm<«!}Öä«zUu0­Ô¹1)ÉæŽeÇ?T[™µÐÅ-•Ì%RTœPc“ ƒh§ã^|¨`źFÆÁs%³æ›æÃWéâby4‚4¨ª†î®¹ÖO.Ÿ ç#F3žºØÉaŒR–ìÃåÛÝT©R6›Èo—h’Ä4èä" pÈkqèõç&ˆñMºlù:¤Ê¯œk¼SÑŒè;ÞZ"ñv„CÑD#—½Mœ"гŽo/(ºV+Ðå!ûYÙ·“K¸–*)_0žo¯äMË© ÔâÛ ¥l;Θ) N÷¿ñ?ñ?ô÷ƒúƒüº´¥°p¨„‡å†o#¹ÈÖú‘(7 íò¾«Îc›O¢µYh”ÄrUf|GdŽ¢hå ÷'—{Ùw¨j¹¥ IQõF+ l½~"iÔšKfÍìaJR®®™Ñ+:T¤s¾ƒ ߦsbo šì–ÉÓäû.. *ïÒEU{¥ Å!½(WMN:,Œþ#&ãÊ•DÈKåUK^™hC‘…¿4Tã„!³Ø†¡N)}¤d_õ#ÓXeT‘LÚ¾¦¹ ÎN=9ν´bee%)„´ßŸTV5|C/leLÿ!õ4¢s”A“TRr!$1™™þ"iÉ'[ó:âªÓh¹]¬ÎK¯!®u×ÚŸ™EuvZë{yÞæ>X…zde~“%#DBRò³7V‹Øå!y̆ÿªj)J¢ëÉ# G%ÙÆ"#ŠÄlHÃu.¼<Œ0°¥ˆÝb‚´OUBˆÐÀˆñ‘‰ßQ…¦/ pÝÔ1B0âPWd0uÀ† "ˆ 0Rrª(™ežÄ£8¬)¼|9Ž…QX¯Ž¬÷óaUÃ$Ù3U„ãA PŽ1¡ìÇoËRv¥OºqêBISkHmolávË]RÉìNa9TÂ33"”ÖÄ3×r^!É肹+d¾—QžOëöÔÒÓŠD×ö¦ÏËÅ1eâŒõF³,b«Èz…-š¬ÛMçæ«ÝùèM×Êï›fñ®\¶b­ù.ÿD9G׬Žéée ¬R©r¹ƒ¦š¤p¥r7Ô…Zêe³Î³ðžµÍrWµiµ“XS%PUlñª:P¥ ›jÕGZ½0ϧVSáU¹#PÿÙ>%N‚ÓCÿíMwÕe«+ÝYÌr/¦ÍôS4‰ÄÛe“ФR¡?é»®‹Ÿe÷ »ˆZ= ÃÑ+þƬŽO»J¤ãLsf) )V¢FJ5PÍ33}ÈÒb{b#áÿ”ˆN,åuyò‰+UkËÅK‘'2„“ØR¾Ö¾_A Î2~ËĉUZïexæÇ=ޤ—dãSæR½‚+Z8¤nE¼sª+ˆÇây=„Bräµ_÷ê³å›79¡‰.ZT-hµ£ Ǥ×9 dÅnÃ"¸‚Ì£“Û™µH·pªzzëŸ !¯/ï5‹¶äÔ¬œ,‰QÜŠJ6Y‰ä0Žâ§UÉœ×oìæR ŒÈÔ"¬NGd>~½®dÚæªë¹ó{±jG6(‚’¬“ôÁ]7˜…î¢ùÄ98’oý“¬Ýuî©o—ç|Åyè}]Ö˜Îb>êr©Í¨¨_ ‚¢Hs#yLf žv_‰º©ÏJȧªj {Yd¡{3•º´”¾‹ZЬbyH+JTÂ!11+«üˆ@ŸªYŠž2ÈPç(߈µV±ZSŠ”ÃÐ Rò!ŒÀ@ÕL¦ÉMS÷-;;%$­Å3Ê‘Å!Z¢z¯(š‰ úªp̠Ή ‹‰Q; 3¶YYŸÞf€ýNØq +>¡{Ü ÂÎ:&2A°ˆ„@ÛB‘Ö™Æ(D@±/2º}:÷[s ùú"þ z‡Ž´FS"„ceŠ yTû04sFÐUåQ%½á/¬QXûÖ’ƒ8@²äjK-ÒMÀg %‚,dG¥ ñ Ÿ.ò|Eˆ~ý̌ܩoÆmÿðs CÃQ1 ÍXC=>n42º.„hí vIGâ]Mʽ¹NéÁ†&© M'A± À’/9ÆãAbFx{]TaY>Ÿò‹|ÉYTœã>+2Ja`úbD‘“†ô˦'# bEПïm#Î¥u¥;ŸC§Hã& 1h2a'ø „Èh'í!vFƒ*¬º$˱ý]…v»:„ä©VÄcJÌ!DB(0´z>f0Ôb´÷þ+vC™^Î(NêSþ:‘YÕÜc:QHFq †a…ᜠÔA_ý'ÈùwñFÇ$-x%‚ŒæfV[dS~˜`›ÞÜ55 u%äÎè3; ‘AõêäQ}Ê”YB AV¼; b&oÓ%JŒ†;¶a à©5è0¥êîeÿ¿k3¢»£¥])O]ÏÄ|F –mED«eTe}.™ì¦|¶ØoÞS.ó©ìÔw«b#";æ—“›X±‘‹tÏL&ÓÞ’HÔJC©Ò˜¨b.Uf.f­I¨™ŒõÎþ/Ù¶‰Š¦!‘ëšËT‘8ah-4[J'N’µˆæ%ŸÌÄ`¦}ŸÈâvÄ«ÞëB 12æ>“i„úS^ÝöÔºÍvºÕNˆDm1lEŠ®TF£rjYÎS ÍS¦‰Ÿô%yJ"%ìZ£Î¸˜s8£}$KD2Î\£†ÈKÚ©DÓÿ¢)*/¦µDfÊŠBZß®Ó!ÍÔ°…Ob!ìQ>Å0”÷&6ßÔL%’½Ôg–¹¦ÍgRö™ä?$B8Ž»B: VrŒ´6s’Ùrì„ã]b±Yvß_­2»a „÷#E²‘ÒUª†¥Ü:.ØŒ®îl e˜¦ºÖD÷]÷.P–M&¡^Öì"z¶b'eŶá7Õ‰DªJâª[ eçç#V`äräÇgܘËN—"Žrå©Q-\â:v“WèèÄaN­ø&až…r© g»qTAUâ’>“†!?ãÛ¥"KmFSÖ™M¼ˆ»UG¾óÉúdy-32H7E! "D#{±›õßFD{ò& 5ʵ ObjîþpèûÙ¨„ÎÝb‹ü ­>atÈbžKPQj#c¥“ìc ,Lb:Þêµ~Å—Ó ŒÆÿbR—fËn#èî†gM󜣕…S±ÊÜU¶¯¾åå*jEV¥T©J~Öôj)²êKÚSürˆŸCœiQ*›cyƒ…W ®rjÊßô}œÌ«oâ8”¥d‰…w¾`¤§àœØV¦DDó$éG¦qÚµå>…MÑN}U¨´ËAD·ZÕL¥ÌíÂg×iéÊâ™%¥)„3”R–Ž’±¨C%HU¼MÉAöçw=˜Íy® —­hjYy_kq*Dý»àƒ ë¤S-AÖ¦•‰¾¤ÒcTˆ$™äIUýyhzŠOÔ+2c+uhè”ÄÏጃj¥TT¢ކÊÆUc"À qØ„<„Ëúà¾äkH¶ìFè <ŽQ-™¦b0l ¨a4 Љï~çbmˆ ÑYX~l9ø†ùä]ù„SˆÆÎy‹X!„¿Ä" á_7dLÁ¹–r¦Ü¢ÂÎc2X*Bqë @á+Ä ”Õ±¢ƒ–}P# È F$´ˆT9K‰Â1pª£th$€÷ŠàÝ4P'°ÎS¬'dB4#  öœ&ÕûÕhh×ã퇇£km#;­÷)ys00B›C1Œ è&qb§:¦óÞ•9BM¡‚¶—©¸Ë‹y,™´‚CËÛ;•àa2 ‡ µ* g÷ð!lÏàæV(ˆVŒ„)W9±Bò•ŽÉHA;ä ̨ƒ~G½‘,Ä!‰Èwä*aVyì¸ks$[…AAˆƒ@Å"’Ò@Á‹fLéò ÉV<Ϊqá*Èra 77üG<¹R'n9}A…CPÌüœÏ 9 ŽhƌŀÙ»*r¾! ÉiƒVŽæäf.z"_°­Œz)u¡¥kãÔ|H„'îS£I… jì‹Ð<~³¥ÜÌѰó$Hx ˜Œ q1 &Ñ›d+ÍhQJO˜®_°Üm„bj*c8ÄrAÐ8=¬CRnA'Hˆ·:ìa “ PÜÆÜÊc!ˆŽä E’DBRF)±'Žs”ªÎ„®ŒVØ DA9‰ˆ`Ö0âŽ;˜c»ÖF„ÊÃBå¥Ñ»áºy¦!]c˜‘Œd«HL&¸ÅA’Bjä2ü :BãÝÕK“Òf Ä4< +³7G17rÅÇ#£ŒÃ†¦ bÃìTW”G†Ø""ÛÄnl]”G~»"йðIFb d228k˜6LQÅVæCŒRShŸ \S>¨¢¡íÂXi_}‚Æ! Æ¡”TÜD Å"èÌHÖ" ÷f/Ô0L60ÏwcfaÂ܈Ã)F†äÌR‘YÔ¿cKš› ’´'Vz1²¥U2¢SÄvíLVo ×Áð£Â³:“3f2ሠώRÜb^À¦ä¨ ò²ìéHvNФ1aºê(Å5ƃ ä&q&ƒ6+ô‚–²±98©–ÈàäX°dcTrY2)b‡já¼È2lZåû1L Td ˜Š#$ ¨[­Å)²°¬ÄÌ£tBBIŠRtÏZ}¬ `È(‰q8 FDãðï¡¥ÌjéÞ£»´QQ^´ 2=äE0£`ÈÆEbÄÔl‘ÚS Æ,aT-þ°¥zHaHc1Æ 8EÉ×f&5ÃS t(VŒP^Ç o†ÍXäMFòó”…üЦñ¼Jì Ñ2p“Å2™Õ³q’ Á†cöº|oĤvmJÃåÌ®•UÒonœ+bÔBC1!0Nì£QTJ@1u¢Td-rT@9ùHfCˆMºH„1™B ]Ðv™•3P?uäÂ,KIˆ! DLŒ´_бB:‰E0äó fBn'sÞT4,(Lç5A €Â;›˜o@ƒ…ø Å3ï!ÛŠ)r&8¶?‰֌fŽáHŒ¤B´Çd‡6 „ʈSDÃqèzž…(ñípEˆÐ¡)‚Ù(¢¢ëK ÉrNi¬ëÌŒQä ’“cD¥Ær$:+ëä‹¿I’_(Ä5ø­ÆªLkàURm® I†2B{é6iÎܨôŒÕ:áÄS™ÑF+$d6…k²ÚjbPØ#+‘ Œ˜*1 ´˜c¡©|JåíÿøÉ˜oNÿ!S¿‹¿¹ßÙÇí'÷£ü¼´@pòßû…?âHfæ±;îv§JaƒPÊóª–!ÿ2ƒ„#ˆ„PЦÌÁ`YÄ„[¿­÷¦djbEbÕêR6'Çæ)p„ÁVü4„ƽè}$óà„F«Cƒò™]µVHÏÙ¡ð¦rjl‚W¬.¢Œ„Ôj#+cB¥ÃЧâ|D1„ !šÂÞõè…Þ†.MÓ\g¹7B%ïÂ<ÄgÛ‘`!‡«±ÍYŸoªc® A‘Ý‹ˆ$V)@ˆdOXt¦Âbªt«ÀOÐ<ÕK„é”kòåqzœ1XŠÁ ÌcTè»iˆ6±¸1×Å©ã¿|lI÷n£-xZ-EhNzÁ„Š›™Uƒº>ôÎ –aB Ƥ5'SÐd3û¯¤+Æo Ã^xµÌQ20ð£‰D‚sÎ Cã"ÕAïB G§A;'Uʱ •ɲål¤ŽÐ1œ‘™ÿ°Rš”0Š6Db’+uaÔ¢‡tb H¨ F0ÁÃÊzæùEÕ©©ËvM5!‚N+r#7EaJ+† ¹ÇH˜¢Rqa„T«8œÎ64-ü膘HT¦1Á¬âÁ<ó¶eŒ…+‡±R(!bFDKPN(ç+¸ÓdᡌÍoÙS„V»3… ·#Ö8ê $@³„Æx ÉÏOƒ› LR (dÐÅì=uÔÊ왆eª ŒØ×“@yq#Úzuud"Há0ÔcçˆQ:¥Y“º„1Ô3‚vdÎJï£|¥é‰¨lÅ)\…iðT£š¡Éq\?Å ˜ÂŒÁ.‘aã1NAˆFŽA3§—ÁN(‘A”ŠÅ œ!l¼ÿjnÙE>Dlͪ ©‰±ÄÁ!)SŒ¸K`¼u¡˜ !Q^”Ê‚såmÒ¯ù™R&­Ÿ ä$tâ ‚49”„r-Itj"ŒeãÑþüÜËŠFĨp™yÜ´Q&a3 ø• ‰E4â:˜²AÝ|a‰¾œEafÊÁP®ODhnc2‘³Õ¨¥bè†!ŒúÖ@Kò:¬Á ƒ¤ªâ1„Ù„ÊÜèGF„Bú+<èF@I#›2¢"‘ˈûJs I9œùêÏ—+åŠG"‡U ÌD nJtGËÒA£E,q©„PЦÓ–¸º6Õ #Æ4 ’$¨=åšf´&!…oˆVÎc`aBb¦Q+&9Ö ¬ê¥"“Æåe0â•™8‹äC1Qw3Vd}ÁÊãd•g¢j©ä+1¸Ë/+]I/­¦²©/5‡SSƒŽ)+¢¹?ê¦\­s‰ZÑJ^_ !.c¶ä¬ZæÔiLVÖBý|e‹ë¯nBØKúúrÐ6=™Í­†!=kRk˜¤ÿ¨î2œäW¦)·|Vãé´ÅM®édk22).™Ô­Ez«9-L•Ì!XØÁ¶R±ñH\Ú’ß'Lb\{,¸)TøÜõÄ1Þ„'(¨]} ºÞ“[lÂÞòelI‘3Ä!WImF•Â;zeKiÅbn›øŒÉY¦ó2únf¦4¥úiJôÝ"ãrŠùc˜t–”qM‡Â•Q‡/V†Õ>e0KÖÃ!>´2• d± Û½D¹W”ÏoñU´˜F×$\£U ì…Ûè§k>fÖÙ¥|Á™wl¥þIô¡/åÞì› ¡ ÄYŠD;QœÔÎØŠc6hÅq¯ó]_н®|øÅ’Ö”a„–Ýe'[Ff^s•)f_ÛSX@E•^d~A„|¦Hİo·"v­Q,¹‚)Óß2ºC⸡ ©'þþºT®¸cÊg!ÒÍ^U)ºè+Ö_&ehÞ¦dqSß/µòw¹S8NZ”…ú¨=:ŠkW‚ˆë,…ÎZ¨®´¢ÊTr ë¶õ%ÅÑFrÉõ2bW ’Sjb×k–´ôQ÷2vÍrçwÅ?3“¬34kPÁ ñì ©Ú¶HØÔ0±æà(ÏY2 EY$BW°ÁˆWÍòÙ´*S¿v?¾À ÀY€šÈàálä¥q({Õ=€2¾–áš¾.ë×îò« "7ú^^¬å³ôÂ\¤r™fÕuïÙ.EöH„™}lŽØù²Q;5 ´rÄK!Ì–_ìÕo­qú¥ ¥„V”²¶-@¡Œzõ'Dþé­>b0CW˜BF5‘º‚ÛO&×i!s?ÛFÁ‰æj=ÕB:`«Ô{QäN\!&S‚<‰e;¦¯qs ¦Â|k—‚µt˜§C–JÞß›Ä0Ž ¢=tFCOjø²‰ô¹ù”šDUbQ™ÊÅBâ®##2PNòúç“Ì›…]Ó>Èj¶Q=-G0ÆT¤gºî,»ÄŠ÷eG?³õ+Ãñ{ÍŠbJÏ!°ãîw³ò; ªAR…{‘êæ˜Ô&—3Ò>£¶{PD9¦ãe}wU=SØT9E«ð“>©;ÑGQDwu1ìZ›&‹ÊR#•–F•ý …ÚûV£T›«üW¹Ëª¥Z>ØI.5ºì“’ëUc¦ª(ÁŒ×åvbb%kz!EQHóŠéÉÛ¿L7êÖ°·|òÔÆõ|"ʆ)RVZ«ãâ3½Y qÚËB­[ÓŸBYKÏ›bð„•êÊS˜”VÊ‚J¤^¸À„Út;U{É‘?iפvœØ¸äÔwtÆæI¤GÄ&‘Rd™ÈAíAÓØ“ ËNBb–ÃYõÙvܦÄÔÛí•UF•n¤Õcn–4Êô|KS~Äo*{ªL‹DÝå-Mq^¯qº¦Z;ÅgòãU–•ÆÚеC·-þöËå›J’V¢‡ °–È‚7V4L’#]NÏ£oBè’Ñ%bÓ+„]FMCzeªGÂ3*Náʧvòž‰o=P¼…ÿvTé[Or«®Ùu*œ»ÌG­Æ/›2XóÉ9Ô˜ ÛÄrÂ䟂4ÕIåe§‰a=¨Oͱ¹îE?¥š¼­I%FÁ)B2W¿_p@Æ©1Jºb)ÇÂoDᎥn¡íy1d=L¤<=¡€Ê4Zi«@ì)( ÁÊ‘pADM§Ômæ ¼W+jhÜI©Vqâz×}¦53-½hâ‘äI†hrQ.TÍ™Úk›×TFÂDÂÞ!¼\mñ|Â"žgH¦2…Í%ÈÜ[ 4‹y‚ d6ðÒÃ…q'©¤·ÕÊZ…$‡8϶À¡W(ëoÚTE5W¦´$éC 'ÚbZ‚ó¹œz„ø×Ée©ˆQ\@qDhà8…¼=;ñ µô¿°JÑ‹ˆÓ)#¹Z}ÒäJ‰û¤N¡Þs(äb$¬Ý,Î,ÂkS¨MÏDê®Ybv™[ZÈB•B7iÁ·Z[Ód"¿¡}¸¹>okýLS†R>¼S¤-Sèo ©6Ø8@cµ«˜^ƒ¶O4½©FÄ ÃÄ‹¬î'Î,(‹*ŠWˆ"J0â™*“›ÚëþÅ2ø…êä“~ܧ›ëôe©±Oò½Ÿ…xé MâbÁŠú÷^ìG%˜Œõ¤ôÓqM½j?¼TµG ‚J2ÜŽ Tnà"BáoBŠfêÉÂAtáE[ù”„B6/y®€GúÖ"qîè¥N<ÉR\Ú'äš…&S–­ç¥š˜J¼5q*ê>#Š`BRf#Ò‹,•ÖÎn´‚}e­PŠ\\KAÐa§Ëؽÿÿb›b§Ã0Î+E.kȈˆL6¶—d'£]’ä1]’ÔµR"x‹f ­Qœ¯Çè²v¿eʯ~‘SöÒúÝãXºžèˆ)Foö—º×¨AÞ,QCLã:!£¡Zm’;]¼yâÉZiµGÆÏ#ˆC.”¢¼‰)œ)Nö¼TR+æÕ´ÉËVwžT\™)Ü-„±ÌxJE‘ˆAŒ`¥¨‰¤ïÔGJ‘KIÂÞnÂЙ?pƒŽK¦ñÅ D€KØ%NXh\æš‚‹'`,²E!„’ÞèÔ•*/”‰é’¼D2ñË„»Îˆ3¢þÒR–'& OùtC\زþɾÔ:Ço:PdÊpÖÈD«Yº=m©\¹(v $ðp(kwŠ%BNœ—¯—8²Ê²’’*1Žq”æ/%1]ýúñvœ#êù a-o׈go#:”à ¡Q̸‡—m|6˜J5 ¶›úNü’í¥0Q Œ3'Öƒo«J{(Þ9ˆÉ+䄇-, Â.)H™Ôá+¿„ûF’’#”*qÑÓ*ŒP¡bÆè¡^Å]’³ÈC?±*ÒÐù´‹§÷¯›¸›¬Ò²ÈþS¿œw(Fè‘HCÑ>óPå ¥9èùo–§SK¤58¥™B7·W€Œ0€S@ð³å †XÑ¢e†"I•­å´Q`ÚO.hμ«ÂЉÄ!¬1…Cs+¾¦™¤ @·šcJí¸I1ntr++䓆r€PAà,±ÀDI&0ð²e2X’¤°< áa,Ui¶ãº“Q™$½B/Ò)S z»ÿøÉˆ1NúÇú¼û(üýGþØŸ~³’õ¡§.ëú8¼ùèu1è¼sLØ}’˜ý2m–b G÷žRxɯâ0àÄBH1VA=m5ëRÚ±èYy®vÏüÁ9êÈDd"¹DaI„%ÚÕj*Uþê\:PÂX ·8OZþ’ Óc ¶¼×ð"U_•dILfÆF #"–ñ"nt믌ø{"š¿kà¹_Æüj¿ùvV”8Äê4Pwb £KP¤t…yâS~…:½­Ç…Öû%}n­xaŽ €Ä%”t`c$yCÉYtƒc—ÂËÕÔ¥Të$CbåH£¤(†1Ìw3²-ÔËĹOYZË'Û ¡Mòh²b¨¢!^C©uqÁ€0˜I8™¾HÛ-[¾I´á¢B[ ¥ð¶o–áÑ=Lª˜¢TNøH̃ÎÄ‘%Œ’Í$#HËi¯i%L1xGQ‰V¡,â³r±|â„8‰Ôˆ(êîAd¼Ô„ÓR­¶OmZ±š“tvk8êFÃ5=)F3Xo¨=(f§œþhëNåÜ×$ý‚Kj|’PS7%%}!˜… Á‚ ?•ð õ‹½=ŠæùËFÑSí)²Óë—­4‚÷gŸw f3!ÁÁ„eo s†x±D0VWÙnP ¾[Úµá3ÔªcÏfþØAL@€±f '1”&–„Z]HN¿N•X¸h†ý”Š¿ôRHÄFS”Dİt¦J³6–ÁšU?ž|Ö„Yö—¿ü„ ÙsEBÜÉDŒ³P  àà0›9Æ­pÙ|“j§– )G‹60kP;¿±š³4aJy4ÅlÆ=eárÕŬ“3S) Ô{”‡Jò »‰@Ï;Õ½ƒ‚VÓƒ4CóMòÎS£T%XMÿ¨ü»gÚ¿}œýa E­!$G1ë’¦P¸=ϲl¥!³=¨Àa@bž-3RR: 6|-Eˆ.ÞÌÂVÈ¥Œ–Àm €òÉ5ëËÑSÆê‡~“Uvz«–6Çã?ç–D‚¥¡e †Šš] VÁÆŸG°QÛ®Y!vF“ ³K‡Á a˜@1èÁŒU± ô¬$•bÛ‰^‹Ú&”âR„¨Ú#”M}!SVá8èç¨êîW1xU‘¤Kf¨˜ZhIaóŠ4Ò–¤R®¹%R­"ªâ„x0 G‡¨dŠ0_‰BbÒ­5æ‰& $ÛÁ"ñÆÈ—&8Çæ³-\Æt5×gˆNZ%6Þ±ö|¦S{*©q=l–(… 8Q›˜€ŒÆ6ôH‘5-§\‡Òqq›P†5(Lvj$Dq¡Iâ“w®ì¸Ö¦ Ÿ©æªHE±Œ "pÖFÁ•šÕ—^×.…ÞÖbXƒú‡iÆ8 qÁY½â’ýhÿLeW5*w&¨ÿ'Nº£i-%I•ÞÍ+:U„ `©XÊÓŽ¦µîL§'‹1H-')ºOf5òViín&”ç ‚„ )_Aäˆ' $ó‰¡uĤJ >ÕÌ,”± ¥dð˜C¤‘\PŸZˆ'¸Åm! j™" Š8"!&Òï^NˆµÂô“©E'­]Ä4è@(,ÝF8ÃýÔ.&ð NšI³NPß6ÍaÓ’ªØ‘®t…äˆS$Ëü)«:žËBº}¶LQt–oåÁ(Äz‡øGÖ0Š3Öp„xè‚K-/MÄÕ¬òRŽú¤wŚϡˆwØAB5ÍÏäÁÅò=^ŸÍH‰R‘Ë+Lì]°Ï]PS_'é!¾`Y©ZŠÖ|rL!D o“†Qe%Æ›oãI´Gò*Ú²[cýo$œíN/Š/(‹ DuRÙ˜`Ä)µEûUPÁWâΊ­•l a«=R3J|ŸÜ¼üòîЩ †"‰)Ô)(Ê+åû%£J”½FJ1&^Ù-•Yé-–ÒžWH2Š(rT32ÝúØ¿ ^ª–›"e-Î%qB !{eˆµlŽ\ ´°˜1™ÔšúQ)Ö¯[‰!å%Ï~ 1(÷ûzÊ®dcZË¢ C€AÖôˆ†”µÉ¨Aè¥Ñ¥¡¥žŸãéê¡ Ë1ÔVò'aŽ‚1œñ±…NˆÓx»…1vLØLR.µ7›ÏÉG½D˜p()bÔ@;äpImm&ùe’‚X5Soj±*4©•iZ1‡Mîu³Y_Ï”ÍÓT#*½+•ŠúØWú§ˆ“’ß„‰î’‚iÑa”)@aG<‹ GÝ|kQ·r]&:’sÐ%6ñ^§”z¨%Í™lo«áH¡C˜¨4Œ ÍN¶Ñ©r¦ZZ çDt“LQzÚL$Wæ`¢œaÁ‹¢RÝqbÔjçÊ\>©»a:$眚›øÎ"½É‡´‚UèT­)®@ƒ ÒÍIF‘ZĦÏ”£ÑªkRÕyb&WrÃT.Æ (ˆÃ ø»žû¸Ù-x,Û¦&ÞM·zˆx„g3šSJ0§;ÙŽ—b‚/óyý¿^êÿjÓ‡¤ ›•«æœ›u…À€AÖ‚u¸‡’òòåi¡¹)™yÞoV6¹¥.i*ì„!úÙ"‘nÉy]]ˆÈÃcÛÜK¥$ qTAӕĶûf+)l|u`ËÚ™¸òø—LózùLq(¨„bÔz?Nú£ b‰ýŠ—îNw4¬’)gÖº¤«eFÙ©ÃÕ ²¥%ÌWv¹pœJshõóHž­BšbË#K¬ø[Xf1DoJ"™^„ ¬¡èWì¹:ÅjY5ˆ¶“R;êId%Ì¢SŸ›ò#"rp¢Ýî#?»Û‰Ò$ˆ‡±Ò²ìÁ0™p’l(ÁP&aÙú'²-X„a[QI‹®¶Bv™H6Yîä9Ó閡ϧJ yÙ•9Ô¿¶eS&ü¿fÎk=ü^yºÕÁ-Õ¡„`¢œš+Ž]Ü1R¡š”c%¢?±[lVb÷›m›;³ÄÂy70Ê+ê”æf”1'Ô¡‘Ù(n&çÇfZG/ý(&×jÒ C8Ê‚ET+qMøõM2Ì«ZҨݔK'å’È@¦¢§º\ê#×çÏÉ(“'ÔåŠOJ¶Ql«‰ì– åýÕ~f”ôeÉ0Yd¯t°ÇâLV0ɵàäUêSðïŒÔgbqˆÆûhEz¾6XšÿV5®Cëó-›PÊefD+ÂŧänÅ9d´³§ÓÎB „sòÈuÞ•\¨C-©¨åmGLb˜lªon­o˩ڋTÞÚœJVüT2êñmd÷¨Éd9•&¨S^C0Já |Ó.º‹tïù´”äæ'éÒ9LÂÉèVYHÊB19)ÕK·d‹}#Ä6ОŽqÅLZ&uå'Û"îÜÆ\S™ŽšÍM—è’&™Ç7 …T¿Ð]‰·_.Aœ…RÍ‚¤1ˆßs»eE7 ¢“uBj1pìŸr• j=4H§>¼ŽB s»^tŒ¢6zVjÌ0BרĶ¢œ¨}J²<Á‘ÒW0xÕáU R®gŠœþ†6&;QŽ½ÎšæÊrP¯ä&=’ÛÏË®RÒŸ" 2]ɸd J)ž!k¢týD½mZIl1˜¢ÇID=QטBÒ2ïæ¹FÅl1˜J:v]±2IÑ¥bÛåŠËíO`FÀGô‰à†Õ™—oŒEÒ†d,‹Be/)~%IÂVW”Š0²ÿl%JïXÑ>ºD,G¯b+[L®„¡_.`Üþ»¬L¿É15ùäTä™Ït•D+mw$ôD\8Ì%$GLSOÔ™6–1t솯ë²¹&ÄÒ&ìõVõÞZ®#ÊÒÙ%wl½dnû+ýR™;Oœ¢±%LãrziéÏHBú¶ö­«õ[qÓR‡2Yl™%¶®Eqæ"Qº"®ÖW%ÈEfdàšQDˆ˜m‘|Y½,æ9iBiΙèFÒ«ñ.Fkvïl7Òß7ÍåC4‚µ™¡Yîô}œc‘H'¥ª†HIŽš¥L,­²tÓ©ñÖœÚ)±rW$Eó‰&œ(Δ«Í„™Ì\’YXB$j±OnB¨”Ñ6dò´èÒh RJVÄ)WÿÿÙ Š›Z?‘,Ê´[¯´L(ŸÔíºi7]°¢B "\Éu®ËJT¼ŒFJ{ù·°õ¯"mD!Ф÷çY#ñÁHRЛM¬ËÞtÊÖŽÍXä÷î í¢Tl¢yºÁ´¬1²a¨”#”dý`ËÜÚKmZ¢ †¾ü¤Ä7œýêêynTŠ6allG3n¹BÖ„‘ÏÍg,ʲ¯Õeë.9_Ó¨¹y4œW³m+‹WOk„"6©µ•ÉD¸¬çÍ·"fRn†ºsÑ…!‘,åWÙ…?Ù#'OK" FÊo+y$;“ ½ò©äE “•¼O[&,‚´–á ]‘70u~“^¸Rÿ ÄKÕƒ nò¹å(‚=uÇ+.ßÚS~Üjù÷“¸äx™Ú„‘èŠû0eúH¥ Ì’s´LLB<Ò[4¬Í*î%{ν-½põTvMÞiIr™_ªžOÎ(λášÔÅ;ý›R-gÁŒCSBµ>"ë RvU[dbÛÆ!µb+„²¹•5±IÊm6jm™·¦Pªu˜¤«Ý’¿w+ÞCFj¹µsp¹©Ê[ÿcå¨é·Šhkú]Ê’F|õJõ»,¨j}ΜëÅê-“p­ïŽß«Ý¿dþ£=¼c½¼ÁØúD~±Ê«INÌ}ëH¨!”½ÛeŠÆÏÇÑߨJÎ,’hpqh”Õ˜pâ"0»qD)Aà†0Å!· Ž˜Åtˆ0<Œ2æÌ"Ó˜9ß\P­) S ‚P°Á L¤ag"V×"1Ÿë!#§¸çà›)ZY'ôA#)(iÕјjta))-Ç퀼8Ô ./–Šæ> l6£WR'aJ€â&èA2Q•X3º=¥ÛýzÊi†"c‰ èDéIÙ! §Š…tS‘JoupæAªFÈ‚ÍMÉAoÄIÄ^c¡QU„7œEZÉŠ¥áD 3G£¸ÜdVˆ””­€Çªq—©Ž –Ï(EâÇQL4#-b"…,ïI˜œ\D„£+{‚…MÃá7S%2ù Dƒa1ƒèˆ‚ÀH!óg-riⓘ~GU0¡±Û‚F ˜ ‘(˜\õÕ1Œ%|ƒˆìPƒUAÒ(·ì†1C¤^«(cØ6! Ê%‡8©UA.¢®B‘ã `Œ ²9@Ýe†8‚I¨ ¸”AÇî¸Ï@Šc߈¨Å%á½!1¸ T) ‚Ôp@ãt†ÅL‚Ø*©?]ž*ÐLYΘ4A%¢‡P‹š"#£ElIJ„‚>ãÓV…è°”f"ƒ$­;)€“͇-ãS§;`(!ɘÇHFÆR„æ,f%ü1Ð[e!ŽÂ"xT9J‰üÅ?he¬G†ÊYHEã2¸1™&9ml;ø¡Qòq„pÓ5†%ˆE.ÎDÌ ¡„ ßèº Ô8Dõ»àáÌ‚°®Rì¬`ÄTc@“†tE+]²k8\(²$38¨(™ïì@c0ˆ0QhÁ'q:áC ¢c®,´utvƨ×9é‚%Ze7`H@Ç`”c D`¼Â:2© Ôïväœ!„t ‘_¤ùaU”`'ý°ˆÌΊ9 AÍðŽNˆˆÇA\ìõb(t8U@`¾@Ž(FÅK–2QˆXè°®@ÆC8RB Œx)â ®~)ÉtfE@„Téfhïi> †(è%O…¡b:ŒŒ=ª7[XX#"E¬:´øF*.äu)›‘u‰ÕÅàÂ)æB° Ù˜M c dC)I “©¦ ¼{(¡nXì ó¨ô©`‰©•Ú%pI€C6aÏÐÎ'xiQY ߑЮÏˇøØF€ÄÏ~JeFdã0œt'Å|CÅ)G ˜J3 ‡ÄS5¢8dUB!(â· à ÁJzÎ|†ÿ…%)MQP7 Œ`bÀ§H`ʃˆ61LÊnS „;Šw)n5º}­“„Qn´±å^%ËÕc.YÙäÖ‘©U²P„“ EÝ[N½Ý6‰©b°†o"»¡é·d¾©–®eÓÝH¹œôÆî23[:",¯ÆÁˆD£­‘ß„M\ÁµJÊÊ”%†Ýs0¹ÿ é÷÷W%ìÈL”c¥ÄK§ã|¢nâ¢Ø\o5L¢ì‘âÐuvnÖª¯Q¥éR¹8èµÎ)Kn‘<Þ!“üúÉÛnôqhdfcòѸ†t#ÅBb¸¯ÖJ=¨÷—Â"Ѓ2±7ÅÑÉA†}±Ëõ͹–jf‹ÅY!Z ¨í¥â&[7ŸžäJb(å4G*+}4äó‰çQD£ ê'"Jjl¼MÒHN¿ëg}|8Ž¨Î¯äMæl)®Ùštôy Ý…*©]*˜KTÜäDظ³m>fU"êÝo™¡¾L!¬Œ[•̦ÏÝÖþ!Zu1ؾ‡m¬†)ÌØúä^¢™‹L#>:Ô)wuK¨ÏZdâ”ש i¶ulùB ƒyX„R¿ô«¼ª@ŒÎMQç®—Ùø—±¼›Ô!›õ ÆÕÍvÊéNÊB“g¸c'Ëã!IÊK¾MìÜ)îBŒFW?§ßO;2ó‘éöVß+u¹½¥ýa‘ˆ‰ëïk1XȪG[6i•iRῨÙFna”ÒÞÆ[âµ3_–F3²µN1„Dsz,ÍTÕÙDM×2µžBÚ†ùB{n?e­ˆ\KNZ±p‡]Í*3w_!Íýºs"éT©d%ô'/ÑʧûÞfÇã(‹ŽÚž¸ÖICowpíGb(Øl]B=om×êr!næ+P覼ÎËÅwÓ™/½â´!|üç§Äˆ… T¤÷C'ð¥Õ2ÆJ‰WnNQ–rQžo‰ÚšRÐÔÝÇl#úzQHü…_Íë$è+¬¦S»®cÜm[ 6nT†5SP’ó[5l¯ãâšÅæµK½Š†w¹)UVÇ>vØ“ùR¬mB=U^œO˜æ):Fª7&-Ä£7SxIºš™Ro…üFŒ½Öó2òU$aG‚¤_FàÄ•^¨GTš§ZÒN+m7òæï®”ú±&:w&Ô©ŒÇ)Ý £1ZØŠ·= è­1Ss ¿í¬lÝFÞaXRå²c_g]Jz¾¦Y+± Á8¡LáRáK6!@ã  ÖrQ¹Ãúñ>k?KÐψfÓ4‡a\EÙלz"‚8­7’¦ß~Ô²\™_þkೄ:ÖÑ£ ÏLËHN"À¦4ßhëU 2ô™«ÎFj^™zjÄ2)§cÒÕ1}¶ÅgMÄÌ<½*28®zenÉwö·‰`¿JZטä@’’ÉOÌ–"?¹Ð¦ VÑØ¦Ñ•fõÞC*¶~ês–©R“æ-¿E¢¿PÂ4   9 ñ|u½~2ÿjÑ è³?4j–»Š­‚L™ۚ㲑¿^“ áÚ™çæyWNÛI«ùL1Îâr¥ÙÌÏ—½GêPu” (Èp@§¼Hî´šDFþ|ì ûÜN½h•Ñj(å ö-‰ŒÖ>¡‘…!ÚdüyRi 'LMw)¨ä‘ÔWIMŸkÂÓ$u%2Lç!BmA”Q­­²¶TÞ‡÷RW2ˆsÉY˜©²îV„2á\Äù3j²R°O/ˆØ¥&Sò\JL…R\Óájt¡ÍÚäP9 ´„ù¶Tb,g¦÷¡’-(–òÍßѾ³ƒíŠ—²ŽD±M˜á‘Žå›hWNº>íH¥Z?$¿Ò—ÊÅôÂË_ä“Ô°¡Ò(0 jC¸EqµSvŽ½Ë øi\¯2¢“ÏÙƒ¡ }ì[Šb‚vzó1ËbR¢~îû)Î*ÊŠ¨¤[fïëå6ìÄ!ÅYÆŒð“pSä¹O´Í²TË=Ë“Ó4Fŧ·x‹¤§.‡b²Q‹ÆyEq–ÉÜ/ò¦ÉeOæyH§£7'ß&´_±gvJ™÷9y¦t²–¥Ô‡5Öj+P'5ÖýzEs¬éÿ={ßÈg3|Žr%p¾‹AˆEâæL\Ú&Ó>†6¯Ýõã­7Eb¥ÇH­* `‡¤ü¬º;PšœgÜC¯“[z•è‘áfd­RAs‰u¡åYÞP¦cõF.Òè& ¤6÷.ßíL…y“1Öñ奸ˆ÷QÁŠxš.ÓÇ ¯…åâÕ1Į¢Uh~3y—q‹!µ–r™˜ºZÐËR"zãm;š[ÐTiD ˜ô[8žÒP»¦ù\rEaŒÅ,HÔ‚*‹L! ¸Ó¯6S ^·&¯“ÔÔUy[¥¼ò#Ä$C·XöfáŽC¤VÝEEƦ„©¨dV3{ˆ·jÉ[Oï+q¢4Å©ØCí««®»è§‘f"æoÌ4Þœ´´fÈWš5GTåS¨…ìùYc6júÑ£–ônOô¡xˆ²R[¸Ü§vRb(ŽÆKˆ²a(©fZµ,‚Öum±x%>ÀI°(1/ó+çÅ1 vEFfG{ÑÎmtü¤èƼÛÓÜ—ÛB ¤¯Éj-VÚÄxÂ)‚Ä’ažÙÆ^úÞD)µ–•ôõL£â©Y/¤lÃq ”;(ì¥ 8Íœ¢WÜ”7ê×/!.§¹fq5HŒv±y.‹…/¾â¢Ñ fÛ¯iUµ<æYÇl£?™Ó(Öcû'†MmC%…\ÅúÀ³`0Å5ØzU!ÓIìã;„sÙ}™SU²„™¤j_xÿQÎå¸dà‘rñ)ÌsWYÜ`ê&Œ:}¤a¸šör¦IËÛüd±±Å³§º;Sh¹>œ®ÆM2ŠG°‡wñ*O¡(}Nố1*FÚŠË3uD¿PÕ]…C¨ v Ž:ÞÌ\¢3§¯Ûž¹“H]z}¥r¡l´MÅõLåÞRH'ŠhŒC©•Õrìžoµ+iØvéª*žM¾oPÙêÊvA¥7ÔÙ¥våSj9D*Xú«¯ˆlÅ´êÊBWúöý$Ž(‰!lRr5I¶k'L´Äã¶òôN%˽A/Ý·!±BåIš‚,«Ê¢39±}ŸK+%WJŠbX›7ý½a!&–‰ ÄŒ§<®õJ V‘Ô‹1,ÅŠ_\)‹ä¥?Ÿ_îƒ ’Ë$mÃŒ>! Ä!TÄùØA±Hl]W&¦xºø’·‘kÔoÓ&¥7v•ÖѼ©VcHÆüÜZæâf[|¹’Ö:òF"D!%ÄJ]ììÌQÁY'­P!´‡«k-žÈ¨^-®mËc ×s›3fUêVLJÈˆŽ².Ìb²hwòê^·áT¨¤~*ʶ„ÕÔ¶Z¢­– ¥¥s²¦˜É­\ç‘JÖ/¥_*¼kî1Y±D ùl ÞÛ•Gr%‹Z«ÿšÎ[¥¸ Õ6»x³’Ë•|)ô’}°q,ù!Žt KºÙ(Äy¯dlö±V$ƪ&wß&èô°¢ML¾+2cœõ;†a¯eЊ7{´‹žÚÒ9†#Ö]4J»¥>gNCªY£•~õS8ÉL.êJ"9d&«6q4þLìÃ'½Ä9‘Mä^¶Y~Sa{ÉåÚeäÔ„Tâ¹i•‰½…Öò SÊÈ[`©ÍB‰ë#6ÔŒúôâóV¢ðÕ®ÝLYÍéR6:r":’DN£¶\„|êtš¬-é®G²$ãJëvBTü§ª¡Š­"p£gSÛÕˆ%û]œéu#QÓ‰³BmÔ‘ oãõÊ—$Ëdn*â¿\TÙ}Žˆ½dߪöÝtÏ"[(Ýi¥Jµ.9 T^¥³QלªoÆJ¿)˜²»ªÚN×­2Ú·QtLsSj*«Ù]H¦’rÕìvaDØô8žÕ±óƒ¹ BQ–ƒI‰èY“•JG»f"Éúõ¢ÐâTOF!åRûª/ù—ŠJ“4þü¼Z²'(§D6¹èôÞ‚ýbç£ÚaHCSÙY)ºŒl‡AL^ûŸv£"óÈÜ‚5Z©L&Ø~%tI,õ$%Ié"9j屋a(®æÆU­–# upå«þï›(íWu9½‰ŒL•â*¸žbsræ U/Zž*§Ù„2LF®S¥|YVeaBËJ.`”+?½FB6¥ß´z›è5U +ÞajâD^ÿ,¤HÍÕê—†¯¡Ë(ªÈ¶.È·ZJ$†êè„;¡†,Šº„Îm7'j¿%· ónˆ:šŒWaV¨õ-QU)‡#…·iLÍÔsŒç$Ëÿ§×— ã‰cU=ÖµJT±ÚçJ— ¦€îÿøÉ˜LNÿ7ÿiÿ¦ÿÒ?ê¿öËüþL´5!€Šò‡ó…ÿÞM!8Ï)ØtnD!¢ 0)a¶þ1#€ëÁòˆ@@êtŠ8Kð@LÁzâ†0fl@†¢9y ††j0Ñ™è8p¥‚²ØÓ@ÏU²HN&wbÓ<‰± ™~ðKˆ••©<'xr±d:bNâ 9ÕÊÁœhŒ}M„@Oãž šƒ=h-‡Ð˜‚!»£S<.'åÆ|8ĉÔÉîAÕ”ƒ Î;IÿG@`1ŒÆ ŽæœðÀL ¸g(¡S\¹Æ¨{¾qØpLj–ò7y€„B 6n ŽQ F•†«”Ã-A…Ä b”XšÆÜó€¼A˜Ðl݇•=&ïÛÔ‘ŒÎ%) Æ…©0)јmŒP³Š,ñ*è4u¼Ët`œD,x®ã000#cäê*á$P`¨ÌÀG.bŠ …< ÄIÃÆVcpŽ29 /á’¹PÚ7T ÷¨J̬HÅÌ¥!p‚î¿¡Ùè3 H báï }›)ª¤q+c!XëØ*è@Ä¢!;Gr#q¸-°šŠ0‚›‚˜wI‰2$ßV(›+õ- ´'3 „J6#IØé ‚’F‚Š˜¡ŽåÚ’ˆ‚‘GW%m&$i˜F" Ý Í—óÁ 㓲$(”ä6tá‡)L5# +1`¿« ÂÄ|C(+?½Þ:„›RV+–L" tå!¨{ÑØ"äd‡ý£‰ÅB{‚µ*j(5bdꧨ$ ÄÍT½ 6s>Ì"S!r5ç<P¢>;ŃG!¦B·FjìPGJ1 䬮ä$"š-#kV Ê-ïØŒ¬`mù`T¸K<9‹Á’* aE؆9Ä&G†2>t¾ŒÃÜÛ DzC ëè`{D•9‚*Þ’Fk_ÚÀ¬Z2(Ã1ª%.bnŒQÄ JX§H"ðNYÄj@RªV¢71C s:L eÍÄ+bЬÈÝ3&<á‹T›vVS/{¬ä@8‚Ç †‡ä'2êŒV[ˆŒ”%s8Mœ €Û6µÙ8)–˜“Í[¹Ý=RjÁ)ÕÄ!¦1ðÀð® Ž46 Éê Z'u`ÕÚàQ¯ð§!âu qT‘c%‡ ЇjÊF@œ•ÛÛ#‰ÐDïŠÌÂÜGÇ;w  È“ˆÎ899R£š*aŒ-aF;B‚~“%"”ñÌBbÐ0ýÐÉU¦0Š[$9Ô12–É>0L)ëQB‡”™(CÊþ‰Dp¨bq°Û…è:BiðG¹‚w tDZ’P§`F5PF─w¡°Ô‚Vá(öIóñT@ÞñNŠƒ<ãbihÔ°g±¯ 9EØQÑŠàŠÈâ§w0 0ÆBxÃpèUnц~T%!ø¨H=Ì”ª!X¿‰@Rº·ý „ØB‚fC P˜Û¥j__„-õ@½ŠE)SŒ”¥dz<ÛÔKªóê$ªýNFÖâ6 ÔCñ5YM•Ãã7ÙwÉÁÈÔ©¹(Z„}®5SXf¡‰l!&v.Ú‰ÒœB#jz³ú®C’¶©WŠ…uºPRðõbÕQ$Rw*¶7LÜdÍ&¹¯n÷qÊå"X¢ó/ÄW ]1˜èÚ_Ïm¤æý''ê…¡½ÿ•¬ˆÙò52Êå!g¢Îu.§/0‡& ô®•å²Ò¹c%†Û6ÐDÇÚ7ÒJ¦~åÏQr‰A9÷IÙÄJ2L:ñQOksˆÜÖõV­S³P¢šÄ"’•ΥΕÕS-hbñ;ÅŹSË%"±ÔÇ:ãè¦k¯SjaÊô¡QI^Lê¿f½ß¬øÂ~8¶bŠÞ)M÷O9ü¼C„ư‚ç ;A1Lrêü¼á®¨lHŸ˜@¾Î#¬%(ÉÈ;†HES*=#¦B8ÞÚo™˜côµ¦!ðeJY *ˆux##-êi0ϸÊ`ôB1¹¸p™jd$¦'‚ÑSñP÷Ÿ‚N4H»¿dC>’‘Ä­d „a|&ZF4 „†aBÇÊõ¤ê€'9M23‹L…qÎl8"¬r„ª)ÛÒ߆QŠ” ²b™?£”gWE9ø×L äàŠã¾C1‹‚düå§ ¤âLbé†L1Ao™Q4$n@€Ï/ 1àî¤ jeGµð.sº²fbaEÖ‘dqš²òSwG`dd¬‚áÇÅJKB›Œ¢^Å r¢‘qȦ…1˜A#)ü2* :( †!q.@Ñš¬øb„‚8Ç0¨°Š'ŠG•¡õ^Ѷf)yyA†PLUVC0ËN£ÁOs£ƒ÷Xè/rQ˜2±3rŽs™ÌŸüˆŠH†0$T)´pÑ@€1ˆ^(¢Ôµ®ŒÕ:fTpC¶\ûÁKÐJ&Ìd œuŰa1˜—™§†4e,xm  ˜ð¿ÑáФ6ˆ130ZuD´J†.ÆÁŒ©ô`ˆPL ­ÙXBÅ!á=M{žÊÄc)È^^?Zá9$yѼdH„_Žjâ€Eúx÷¸Ÿ9tv7'4BUP¼²VnO™ˆÕ]z˜é‰;Ö @˜i¸ËFõ¢B)ƒ)ƒPÕäv”ì©D=ݶ‡B³¾xDSc”é@š’ ú‘Ø!±m# ˆF0s‡çºˆâ$ØÆ¬8P°B¶ÆRlªjH ÇõŠ2 R|0` ŠŠ¨® (ÕYÊdfFæ~Ú… ø¤2aÙ¹«,È.¬6 Ú'hNàŒ&Í÷ŒV$6Px9¥Y'ˆFÀ¡Â©e iŒU2„‚­k-b²+ø!á%'.t>jFô!ܯaß–Ê'e­aèäìˆñ†0…SD0 †D‰Êæ‹GUQ!J3n® š'ŠÈ†2§"*‘cél†€C\A– Ç8d]VNEˆB‹‰gMÿ\³’½¼"Rõ¸Ìúh×÷‰R|¥ñž¦b½ä®/)×ÏTXÉ„Q—uB$¢ò"ðx˜9uõȹÒÉõ"Dº\¦I{<É:L踕íÇA¥oTé{wOj)6¤£ÞâÌ]aUŽŒsé ©Ó?nÞ­EôiÑŠy[1E{¡dF]tn2E$†©nßʼ»fÚ÷lœ^#8Èb{V‹ÌtªˆÎ‚ Ÿj¼Œ‘Ú©ÿj­QÄ!±” ¾ReMèo\W‘e--™Sܧ‘½zäA_0”5¤IDj 'Ésv9î•êÿç4®P¢Ý­kÖçÌðÅj—(µh¨z6»(ªWLŠ\=×*²–gã pØ]#ÁÅ”¤'I佄ÃÇÙî¦0͵ÃeCär«]xÕ>{#"èôBcÑwj­q*ßåçf; ˆQÅÇ£;¹®JÒF¥Ý’…ží9 \i>,þBŸ‹ü5±¯W&Y¦bäIš!(ÍdävÔ3§¥“ ˆüšT꯭?iÚ!R4 fÈl‹¦FùÂ\¾“ùñfœÅJ#µz¥ÌÉž§!ªÍâóõŠåTò:št¤‡ŒA¨¶òS:ÅÃi:Wˆ³.RI°“|2²à†:€`#!øã ò„#MÞS TJ’mï$ªÅ—-«Ù9ûŒ¢-TÎQ …t:.¡Ø¤ÉQ‰ÿ‹¾J±¥xªÞÒÑ?˜#!vÇ•×Oå“‚kgˆ9M´“zôaLR<ö.¤ÜL¢Fuw!Ö­öYÅ©#á.”¦e(}%̲º‚í£*‡ãOH½F1xœ˜”* ÁØÇH¥:ë\ÈéÄ_JYKë…Mßô{ÂqG(5ó2ô¥ŽTË=ÔŽ;B‘’ˆŒÇLܳ¥K*êãIée•qÚ•§öˆæC¦™e™c¥îk6 äýVf¾>°KªŒ²P´ÛÓ²BÝ,èS'W™ƒ ¤ü¢Ê,ÊÏÓY:Cám]þyô“…û*(nËÈÎs%Nb”(¢Ò¢‡'$ÅmÒ7ö øº²Ò¿XÚË6´œô)†|‹Bg]e c“’E;YO[… 6Ðb‹<ŠÆÙ™Š¦µ"÷Ñ—ØD!ÏÝ“ çÿ6Õ8ŠŸ‘>I,„“7> k‹cxвD3 GBiP¥b»qs|ß)*Y¬ËbÄ5oü»èqÕ…—„§ahCJ¯81Cñ"°F1ÈRZÂm‰t«à.Z˜7mê~ÖcÜô0’6Šh©:Î&1 ̧ñžÛ¤V'ç !|ÖÂã—DxBg'”0£„ÊLSâs½‰² ŠQ9I(Œ¯[ÖôþC£6YÖä±ç!Â8péa«¢$Ëdª„ѩ͕¢¢Ó>Òi#¡Ë‹,™]!V!1=4Œ; !¯JÇhQJ~®rzêÙü%üz_’BK×ÅÍzÖ#Ý»ŸN~#Rt›è¥+Í-¢‡Kù]ci™žr¡Ì[«¨jJìU˜Š¥/“QkF— Qe7®(¶µ½Ù8¥A&>éégAŽ¢Y) ”[› ÒŒ±’yamQ(¶G¢ïþô¬Rª±¥Ýr>Õò»#;xWaIÈ(Åa+U „n«AºÄ²VEKØJõ´iú×±e…¡iw‘äg¦ŽsÐ’˜‹"eälB›i‘MS.áåö¤®²¾JØx(@+I6ÄGïB“-BjI•Ý3yÝŠI&šnÑrœMT¢œ¥e8Ì‘…’ïg&Š cêòrýª³õ8f—©O.º;}SNC£Ä ÔQÒQ—k¸Uj£,š\ø¸j"õ«²Pí3TÒ¸^6žr„B €\yÝÓ¤Ô,LªP:£”£ Ç)‹úR‰y†k3D]™µË%0ØbßÍÕÉ‹¡q¦î”ÄÇÁ5jòkÔ† ‡4êfdZ«±Ç!Ô½@¾¾¤!i“øŠô2)ö'³Tm‰×,Ç­É$ŠC-Ç$A 9ÚZÕ%(¢™M•Åê9 R­|YMÖíûÉy.¦Òç‹ýœ´Q18r˜CÝuIv¥nUɳX;¡”õ^È™R%.†6ì¤h()Ò4œ0ƒs ¢è’þþ·L„å-Çúþt¤Õ¶¯§îP:hd˜ïÀÇYä„ GB³ Z…±4‰¹–Æ7Ø.ö᛿_‘Ú…û0Â(s+[ 1SÆá&ï®{Ý9bMBo÷å¸ÚýA^E¢\=Þ¡Eb B’ÅvZ!¸£"ÄÕjÖ°Ï ®(ž®@’äm~â%†\LY‹âýmÃa™ $—’õq™îŒ5w±)2]Ìè¶%DZ‘£«UØR#’‘ !õÝ$–ÚRèN«Ö t.þ™Ûᄳá #èÄœÁJ¡*Õá˜boüê«"1ªšä¼¸&|{®ìØ÷í± •K6œB”E‹º“‚£¸ÇÃM*'lÞÔTFÔY£„»xípªhKœŠ&TIäÒQv¦%›¥5^l *åU­~Ù©b‘„gä`å3¥ó1ÊGzÒ‹¯ëË7àäí¶´÷¦•Åâê6‰)*Æ!b¸fHPÁÉ$ÞèQGG6”NÜÄ×VМ5­lâce„ª±Zö¾¤:øçe¼iˆ2 Â‘ ÏÇý˜FdIW[]=Ù7lÄ~)ŒmU!ª˜Í¹¶®Wj6÷ž¸º!V˜o{H¹ÚÕ"\s_H;¤Ëã’¨'«à’e)r§ÖIIu'V¶‘ÝÒ<—¼TªŽ*€ËÌ䓨‚QZ™«~Ï:«#zñjƒpm^š•Y;å®ZDª«®¹FCb-w–å ’H@ÔÔ¥”»¸^wD«Y T‹aÆ$Öà¥Ñ¨cZôÒ&¡ɯˆœü’ÐM ·D— ˜ò­„j=˳­Â(8w.Ë3œ„…5 ¯­ÜL|erÞ¢lOžÂ½¸Õ¦•wS(r±‘¤rˆóŽQ¬Z _Cîš'PxÛSØä¦ FMCPµwVrÅ ã (­C¤ ”­U »Öä”Dôû"ÑõÜ­½â¥[AF<žð‡Ê8Âá+q-߸ö¡:£P¼ÉAëž%M·sæÙÞ‰s"’&Ø2{˜d#Ùø_Q~-ÃŒ«PH^!Éõ£—˜öÄ|/!\¥ úR0r²çH@ä)Uþ¼%‡ow¹ýÒ_[dÖöµ4Ÿ±´&«+ ¦%éáßyÉ*X2-¨ÇÚøÈÅ 1^m,†bR‰á9–3Êòˆ"ÏÓ iTM=›÷)øô3,ÿkî#}’LT.o¦K»V»ÎÿøÉ˜ KNE€@`ÀÈB5´ & oòЄOå†qsYÌîþ""eö^rާÒÈsT“Zî™þC²ºñSFo*É[Û¶Ë­Dçå-ùƒ2…´×»‘3í¼4ƒŠ"•é‚Óf å|tÁaLíÏ$²y\sµôÒÔ¯ƒ\´{¾àNÏík´Â‘¿cö[zמF! &iˆ¶\{ÑæãŠV’¹$)ä’ßl)Ή}Ö2j·¤ZßjŠŒõì“ÍØ1,î:ªŸÏç%7»2¦½=³›L“5sñ¶»u­Så1U;hŒ:3=SHj»Wn&aJÉùÆô$:$“gYóU³?©D«PLf­E[ºëo—µ)üžDñE©‚}.D*°æTÅÇ! r,û¨„/¹ ™ˆ’SÑZ›"°î’º„*®SˆRR‹wUÖª‡|=ȨìæZJS Eä¯"©· Qq‰˜Øs…éƒ@†ÁÎ8Ê1éÎ9׆ È=°"?P¢€Á†§Ä¼ã™+©›È° ÂÐ8(õHz‰åc˜A›$ ‚’YÄáP±‚¬V†o—LªZÖ'IY•… ¢ÏŒ¸ÍzD3ŒÁk­1·Jˆ¶0ÃîÛ,LÐã; v©UiÙa:Šsq• Øk5Â_Èa‘ÿÁ"©Š#¡ÔC ™9º¨D) M©fqMrˆpûÑDòçу9à9_C"æ­(DåE¨¾@Ò" p5œÜß(€­Æy‹jhÉÒcˆ|R‚ð5ãìâµïàÛ¸èP‡DD €˜#­††0g^Q' ¤3#œn$Èx‘`¦.'!8Ö(µAB`00F¢°ˆÇ¡*ˆÈˆÁ©ŽR¯yÄa*E¤vQj•D(”ªZ&+ ¦[´iÑŒµ9˜E& è£VѹdPf2©‹ô„,>B¼«L„ ,}ÊP‚Ì`4LÇŽæ ’ž‚ a„ êþ¬Q ”FFf7B§(Á^¹„ ® ¢Le¨G4 -a¨h-a!ÓŒ0gD,éZ*‹•M{‘Ôf½ÎJUea-1IÌVªFsŒ41%ŒxŒF‰Kça"5ß ò=ç\ˆ ‰2©æR‚òˆ F'Žw£!#0@aŽ¢EâÒ sØ„œ”0«—êç3ÆKu}C ’¸Nj¬ˆ3n4‚¤+IÆ—¡UAPâ G%a8(’ˆ¤4%q‹!\j#¹1XVÁ¬CŤ0Œä-/CÃ9 šN=ŒC‰ºå†@è< «ï ÁIó„¹J`B` "1Pò@ Ø "#g2x‹¥9D)º3Aô@'4bpR˜,&b`ÔêÆmà…O‡(r½ +ã+Îäᯔl%ð°‚™ —2cV0•µE‚3v0«…–³ `¦¡SSk{&‡K:×Yup¢óÐ_K„ó›þÔv ™gec1F¼ÈÏD•±KÄ·«°ÅFmÒÒ&·cäTG=Ì%·]—jSÔ“”þÒ¾“¢*ˆ„M?¯½ý>’¹ý¢õ7—z}©\Ê¥*v²"Ô¯G˰‰Ò*"MÎöc‘ŠÜ­‘,T¡1]4Ì·Jm;7~Σ##‰‚â•êVªVU2Æßì—ìâ¢ò½´ËB«³Œ0ìKy ]A\‘J†‘;´lJ*"!2ûBS“W+†S—¬ì^Á…¡Žþ‚6HÞÄ«‘©Z¦m-'—B"örÓjÞò¤ü!Ä*÷¡u¨µ+ÙV«gæ2'ÝžHˆe®‘ÍI*9ÜC˜˜—K?»d¼sJK:ŒõWYi­ý»Sè§aéµÅH™"Ò¾ ¤m+rÂ&Jec7gþn“ç;é4ê^'ååçògÔF¥8ÂWj+–î9²u\©Iô dv”«ÝÖ5»;‰œfâ™ µÇ§Wâ5„^¡R¤-bîú"î¯-8†:²]t˜|&=×G*?U+öå¹²VSHÛÛ†?9Ì媱Z^&IJ²)Šë_FÂn.ØtWaB](‚[ÔZ”ÄÄväM}W|_&uz–=k*–¼ ¤âH:©~â*V£†«£¡WqÜFZú¢öm­ò³_xÂÛÚL.³ï:ït*&æc¯Lº‰t#-S(‡T§¤æ¡4a¹ŠCßÖ‘$·…“˜E[Ú9¸xœ5|—nqE&bª/8¤iÌÀ¡(Ó^ÑÄ¡¸"M¥ˆUÏ»nzq 1òü²Ó~ÉIÎ&ÛØ·ê´Š¡Ö¨qÇk$š¬"?Û ¬S‘¥0M­ì#nm‰6©Û”!TÁC„‰jœHX”N¦Ô"-Å\ÎÎ-GÃÖŒämÝfå'CÎôf¨Œ ¥ÜÖű6‰w¶½¿^i&Ÿ5ü­ä?—ŒFZHóˆfá–ѨTâýX×Äb±½‘¯\ðXJl†ÙÈØ;ßÂJm#-–QBŠ …ɦ ”>§ÓÎmCäÒ0C$–c—Y,ùdbjÿ•Æ(@ ‰I”áoôi»x‚úªF¯ÒØ©UõÌ/e‘Ž_DYXFö‹å2©Uu6OûI{(„V¥©eÊIÿßüʦ]Ì+Ö«@…õ1Äq† ,õ»›z"±©Ärr£ŸŒžˆ•êj‰ùv±$N¿ú‡«”êeAL`¤¡DÃÓU¦íSNULe{äÊ:)Ü|Bo=Èl¸ìQ@ÁÅCž47£î "¥žŽ^Ka“ðLÒ=ì´ª’"é_ÄWè¥"1}¦ ^wÄb¾tËZ‰ù—¹¿>FÒR£;úF[£8¢fäŒ%h¶Yêìs’é-夓M®þ†»½ƒqÖ§fQ…à‹­x¤òïÑF>—¯Ô`t¥ò3®-X•NÔåKHZ`àaš=°l¾%èi åI›oÏÔB®¿mi‚‘ jµ)®CݹŒ9Î{—&Rl˘P‰øOw§ CÛK‰1×Lz°²–´P…~ ¡”Aƒ»BɆe¶%ߨýuz1&]g¢Ë¤¤n”sY½mdDÃþ™ÈÃ8 U}ý~×IDÆàÈ«ÅFÁÊÑHÅSzROV ltxÀ(ƒ"ÚT,yäz¶uœ§n×^>•ÞOvÞÿC]q‘|EvUâ®S,FS!7¨€ËºMLJâú¡v‚óî õ™7IEr „ ä»œ†8ˉHTάbî1êÎ+)»eêAØe¨äÍøÆ>µ —K!…0tNµ¨Ü0• ŸŸÍ›*]ñI÷U¢cú1+U„AÔ g$Tñ¤©jŠóŒ´Ý~lézoãaRe¡lò¥žüÇ`â”Aý¢R½N@R LJHµÅ¦ËbÞãHD²y•5 ×sˆùc„1 ©èõ5½älòå’å¹<¤©ö†äîT5ɨWš†öÃS‡ŽâÁŒ¬MÂn—Ö˗™ŠJ“:ÊŽ,„Ê+çÉ%¥AT¶RÀ¡Â‹%µmy7Wä~zH7 ˜M‘+Gòeo™APôo#dBrz¡„•â/,­ëD°VF.ï^e¯ÊÕcnÓÑbîäq°´®dÌ ³Å‹9VÝ;5wØ„Ia(Òø¶èŸ Åzá”…ª÷·ëáÖ®*˜QŒsnYHþ£Û7+ób6¦qž!ðè˜jœLLâÑŒJânDQûó_üž¯êrw7-z\~2;Uè»+‘¥òˆ‚œcž¨þ’j-2*N²y;–£`ÔO̳2–…©sWÔ‚$Ey”Q˜0¤Aa.´-°‰äÌÇ"së2u„ãŸX–k¦ŒÕÖ­†îêƒ )‹ÍC›þ¹T¡¤Z±hŒ'>¨Ís G«vɦ©ÓVäG ‰>×EûTœZìz¶k™_zÏß™ÖþCœhŹªâvÇ,Éç4Eæ#„:ºO›š¨Ag=_¤³sRÂà²ÑÕy¢Ý„g1œC”1âÅÑø©ßYI¾¿~?måëy‡qlþ‚³ lÏ1T:u¶M#´ßÔÞ!lZ{+#'ª'/<‡ÕI›½‡3†(1 $öKÔ&yzƹ=Ù®ºM—t>I‘S~fTb%—;Ëò©Œ0ƒ$¹äre‹Ïì˶DÕ&ó×¨ó ¼¥Óû+Ó¿¼€«fŠu tš=º8™-ÜiV¶fžͶ a}zsnЬÔ1Œ%k‹58‘NÀéìØêóðÔJ%¦Z¡l.T×M£¦2ÈQj?m,[6 â0ã9)?m†Äç«7®T–' ¾j›’lÏoÕ°R(Âk+\)8F²ìÄ+$åjˆB›2¾îÞüE¥w>Ⱥ%T$[tS/EPŠ{s°‚¸bÍ=hR¯m”ÒŠFæn¯çž´¼¨‡ÆÌaÛÈÎ' ³F|De^{.â⽚‚T˜zùNžOR?ÔØcÎYY.aÈ(„ /^I_?õUåmä´ŸJäã?5S˜ËVõ=5*e 8FE¦•L|)jk5 Ì[¶%yj~õ«×ɤ޸žy˜ŒH®2˜!”s‚¼h²BÕ§ ]Ì÷nL¨š©ÄÑøbWJ+àé¥-”`Ç1Y{ŠœïϵÛ% a(-K嫳q 9ŒÕ–¹d¯ºÈQB˜\½í”Îz‰FtÖa£SÿDÆvEz2b1?zß.YÒdÉê\A‰Â™µcY¥ÊÙ·»ˆ™Ý[4JGMãMɃ(¬P˃ڸœëT©¹¸!˜¾´·é„ð”üUvƒÊªà•'Ž[¼‡XÈQÆÒ=W*ú¼•=_øÕ«°§ÓHÜ»‹fGç»x`ŒaN9ãSª®mM¶²-R…÷BE®üNȧGÛ3X¬W¶îÈ!œj1‰ØÑY0¢sw:óó"oÕ;_Ë”¹õ-¢HæGCŠÅ ÑÈaÁ´>œW›É*K«B¦eÍÅŒ6^ž*ev[æ×Ù=rsŽ¢ŸR¨BžÅÎ?9V«ø¿L˜¹*mÎ)‘*I/yM2ŽpáI9 ‘(™¥ËåÜ$EuMMGÿËb뵇[¤¦4M=,R…ÎCŠô"ë’ĬéS‹t_ÚÕ qªçŠZè“  `C˜´˜+· "¡LAeÂæ«"óÞUeR’¥Õ&=¥#]g ½ï!󱜨W”åk5ÐVÊ' -[äK]3;ù—¨ª–õ}_•ö¬TYÎ*¸!<þâ‰Ûé_¢±IîIzÖÈ™'ånRµY<öæµFYÎQ–ªÂµ_˜¸†¢-Jù‡ëx[ðÿøÉ¨ »Lÿ¹þðþý?üjûŸúè´#)0w·jXÿü0f„­Åã”ç¡ÄåpÃÀŒƒc€–¡<~¦&¶(…÷ÙeúŠQ7œägkR‹Â¬S³ÏØ8„x©÷8¼äB—E´O:q>D”Ò™Ìè³æY)Ï#!Ê"‡OwY“ûZôûܳ¦£QOb^Á¼¤»|ë‚-B8v5«0–vt’¤bB¤Å;-“Ä;kEÝZ v·\”Ö&ñò¡~@¤&Ž QE9[kJj& ²"Ÿ%*ºq´E¶¡"n‚..oòH¢¥ wfN*¡”c©„uÖ¡KÕv˜]BÐY þºÙßqh…òÜÍVx¨q:\(#ü²ÎÏ&î«ÒÆäw_EA/$¸N#¢®«¬«_gÎçŠj)i–¡uæõÇå5›S8]ks7µ m“ûª¾:`U V â AÌ!!gŠÛ7ÑÐÅ&tVÚzŸ Mc ›÷j ŽÖjî";¨1ķ袢UÑm3g¥LÕÃ|òJb–Õ˜¨ê*ÌØ¦ÅB5ù#,ƒ8¥˜ˆw“ó õý²ë—1žA5i…Ü_[¼DÇ¿=*˜¶È¸ÂÙ,Q‚¤ä~»ô£#IÔR4–NkíUò´4X$цYô,Õ AÜì&&!»ÄÖ¥—Nµddõõf=0$òøVrÚShn¢†Z%×=hâg!QÊJ®rºaRŠÿ«†Ú(‚sý—µHGJ¼ŽÆ+œB¥®RÉLÌTÔþl›õ_¤Ýú»¢*w«¸éͪÞþ¾:‚çb.v¤¯ËõmÔnRn*u]IÓRnÜïr“lö:¼w(ì`àÆ,~àÇ›ÞrOÙ¤çò—›&ÜR¨Œ9‡bmj”j¤Áo¡Jœó¹r’ªuLæÆ¯ÆõŠÂW¨3z]J½œJ ”©œÂ‚Ž2¥ W%í•·˜–\ÎÏUJo•ÊIJAF­IË@‘8Í‚`®›;ÕÇ#Q¨CÎåOÿY ”â£âH›Ùc½0¡™Ø@¢"JúrØ,™NY$w)±ÌÝÉWf|&Í$D*ß»R5‚*z§H²(d¬˜ç¹éB3Tœ‰Ot\ùŸV–гzਞ„S'(¡•Jô&?—HBUµ7‹BÖ‰ÝZq¸ddR—dÌë]š‡¡Šâ‘N¿§iu¦ßö)ñP¥¤Ô½­\ÍMÌÙ(!†)…`‹ @(bE–p†ý¡XÕeÄ‘øÑæP…žÄŒb·&™¬“¹œ}¨«)*d¯§Èö*¯×ë_R ¹¬ê´¸¥â`»Ú#;Lc‹ó-ŒŸÈ×Å­[¨}FWÀœi½¸vk §r‚5ébÏÒ’îÝ:¤o#ºbˆ´™9(&:˜ÝõWF¬X%|`Žy#­„QHW$Ž¢OÕ¹é†s&´¨oL …êöNÿNî&ön´‚ 0¼êò©K•êÄ©›„y<Ì7•èéëÞe.Z½.RGNOu!ÔÃ,TçÃWaóÝÛž¤Ý¦Óµ±9*k=j †æÊY\K-f2êa‰2s§oµvDr–Ä¢~wu)º¼Õüf*&qQH(†)B9!6Å8ÜìzW]½ ÿ4·¥Ãjöj6ÜËss)È㓨„WB[—eRÊ«TÁ¼»ÚLíÛ’EcqmÊ”Z¨† ŒÚª"Nb³®q˜¢&:€Z.Á"°n­XåtÄ£†T™]¡–hÂÌeôq39ŽÜƒÝ ÇB¨0FYÄ L`ÔÉš*¸8Ç8€ ‘ìoVZNÙÜ@Wˆ¼3¢?œB›‘Hœ¡1¢äEWQ °Êˆ 0Ô'.0ЬA¡•›°LŠ';aÆ ÃEIƒt%ê)mç®g3d­ôÕ°œÄ) 2Ã(ËœF¬y Ò°‡>C±–ÛO¹Ä)*Ã(ÄC832"QaB+àÝØ+4')þrŽ2‡!L‚¡)EãÌ1»‚#†Œ+-á®"È^ç99œ˜™)'7'FQ‘×6¡§Ð±èb î7¤å+¢ê  2ˆ‚N•QÜN!DdÇV‡gTdTe$/LÍއ@dä.¥ Á S Ôb0ÉÈ*—ø90vU¶3`äS”¹j ù]+åd¤„!ØC%šq…š B¡DCÚ5ì$•šÕqC;g#0¢27ê̜ґ (xwì„CÏOXûÄC衦†ª³`–Њgl‚!ÊÕ:(!õqDv3M*!Š‚(Ç p„gøó?e3b¤cWB¢òÄ3 !ðžÞeÓ|᱄Tr¹`DšRD½ŸùìJ‘2 Î#Gnϼ5Çmˆ…TN¨JFÐÐè(Ävd ŽnG3Öq¡é•T'Ø»¹©Wë-ÔTBòÔA(ÞFþ™,Ôy’ø#UøŽòšä¹Å|L6®ØºNÜZ)˜ˆéMäª5Û›Úé¸Ú©•Ô!‹´•ŠN21 aK«”dJ*}_;Wd9h†r–ä²&±ªˆ…sŠÜlžÓl,<ÐǼ@`ªo‡~+Ø–ýëþi\‚‘HGd²Q„RÏcy­åâbÔÁ*BQ®V¹¬võ[#ü–šˆU9ŒFÃxáuþ–[úáÍJá…üC…0A YùìvH²S*È”-¡6`1û‰A¦ï Á#[U¶W2˜Ìɇ)Æ"tL'Œ¢Š•)à ªÑíƒD…„áx¡vÁš©(ÌQƒ½ç—¼»˜&Oßo ‚¦Ôµ% A”¶bu*¦G óØã¬˜«4¿Ã#+F­¼¡Ý”Å2íÇÄ~a„a“á •Ñ eçe3ˆa,È(ªGx1 ˆ3ÃÓ%r ŒDXè2 Bà J9!Ja ‘·U!SNI—2Ó˜°Ê>F tÅã ¸˜hÇ,ÑÈ=Œ ¼Füä:’ g¿ÂðÆ+1€ÈU bÇáÙ˜V6¦Sþ.ͳu*–Åùœj=ýÐLa™¤Ø ŽNIª è!*;M]¨\õOPµnG‘Ëæ J ©T‚ HÛ1Ü ¨Òz…aØlux§öóq†5ßÑš£íkŒ¸EjAF£¬ÊfaDÕ§Nœ‘S+šjÃT„.µI0‘I¤L­®9 {JÍ‹É9òèíÍ” !)™EEÍHüÎÜB/^™Š § AR  bðå":±²ÉJ%hýˆñÚ0ІFŒ¡Y9CJZÔæ£3ªS¬L쪀Œ1[Ц• “d[ šSqˆˆ‘C¸¨^&)„5 xt¤REK@†èò˜É(®>ᓤ~RTrÈ–ÚYa `ɵ:fˆ‹»8Œ¡rVKÄHqí0Ã~4EW8ŒÂB0ÌéiL#eÄ6̇Y³µ;sì ZífêbPh ±ù!äÌ·æ¦û!“DPA䪒QŠÓýљ͠%ƒæêZ&Æ0ÓÄ.ûº!D™™qö ¨ðè¡­cAˆDâÔ¸õ™ÄâUScÉŠ&0¸çQsQ¸‚”¥Ö D b!U2"vÓGì¶¢*!LWiÖ \èÏ(¡•qm+‘¨ÀÄÊñB&˜Ñe˜©Ž0Š 6œâ­6a!ˆE¯rº,6ÆEÅpD+@½1¢Pæ@xÿ<E*^PM'bxJ`ÄdÖQ„G¹’*¢m(P¡l1 ‹9p+¯@Äq 7K[Tn`%MÌ;k—¡/¨yÄCŽw);%.Üa^-#—ò'SiÆ1w[p#„£q× z"OK™Œ š°ª÷'d"˜Ad‡©ŠgˆDZèÇah´Ü@›@Âs‰4šêÜœÙp¢8Q$ ÉN\t¤v"v^qg¢6BC r°…Hᄽ:‚8‚•R¤…Ú/ë6<¡1B^ÔØ…W¤ctÅÂv¡²­n­Ž Þå"d¡™b¨q4¡œ„AÒ˜cÅì!ºþÒNè73,é$E G$ 1Žs ‹2ÒŽZáèªcø}K qUX@A"ü²¢&ÂPBåK"Öü:ݘ¢ô: ‚ݸia¨ÍoJ܆”Bªz43TF£„u¸å9ªBF¤D1^uðEÂr I;:®,‹! jX}:wˆŒ0)¡á%Â4{‘ Ütë»Ä'v¥¢¹Y)¨ðå¦At2T•ÐØ†B’Á“9ÐP˜Ö‡X ¦Ï•_!H2ÿ`×¥aYÔKHX¬9'Í¡l1B~é„#ãùÌ™Š2#ßò†„™T¤ 1…j>C×Õú&*ö˜f Q§cÁC F=Ÿ™ŠŒaCl§~œŠ‚­ ˆfœ¯KÕ¨€‚d%!k^Â$ IÌ×WvxÿøÉ˜ ENš3ßöÏôç÷kú{üÖ´­š8‚òWï†gÜW„ø³¹2zŽzÔN Щ`ß••0œáßþΊnAõ‹cÓ9“ã¦Tj2 Æ!Sº÷1¨kŸòÑТŠ%HXq‹¦ L‡Ý:ÆF‚ QM MiÉjM•Ì^Ù»¦µPå¤j(ÁB… R)ÉH Nnγ¢ÒT&%X\ÉYÌÑ Q‘›.Ɉ³C>‰8™9…C(É Šˆ…èñ„³Bõ¤ 3‰ØE7棛ʢCP„F»ª¬®…c9ˆæÒ¡Ä/R´A‘‘‹ZxC@N6µòA„%!œÑ™zà_|‚#–¹NcÍ•5 s ÅeC1ÆqüŶHÕ☱ ˆ£Sµƒ$)Ž!²mŽm3("îcÄ8ÎaLꢉÜEcrlœ­Õ#Døõrò5 ÆB0¸rŠÊ˜“)9Ì‚û^ר'2|;#P˜Éä"H°gd4mcܦ\G=DÞ–¢Œ¦Ì¡;5±ä4£|Š©K­BääOA“r࣡Æq‚†JŒè0á¿1 ØÅ-Ó™C6I,EJ¸i„ÏØâB˜¨4¡…sJŒ¡ÍŒ¡ .„åMè•ÑlJ°È„æND¥bú†ã!¨IJ&$(ÈL&)9Q4œ¾Äá[¡—Ò^F¥B¸a€£˜ˆª+çB~B,2( †ƒ½\å%áž26dÍ‹ Ù”OB(íÑK†5&"8ªÊœˆÐJÇ, ï¨d! #ä瘃2+`΢!sHÀèÊe¢±Ù`TMë5gTä–h'28ËäÈœLNe£¡¶£ucòs¥íUjˆ, ë+‘Äw A Õâ†vO±Š ‰ -¶‡ cŒLDZŒAó$O2å ÑŒƒ¬`Cµ)ªPŽqÀä Å#†~ѾGüàÆ†B '\FLëYÞ¿Î)HjKWô4AÜ€¸LKî¹Vš˜Y 0”qÇ š †2¸…c£Ä‚`áˆ3]BW*V´7VÆ!*š%÷pÙ8‰º ¦ÜѰ…¤ (¬•ŽÝ“‚‘!Ó¤NSRܲ¨Š¶#½] •}š¥Oo*6šµ-+Œêm11Y‰BTøI+Õ꩎õ#”fâTG[m™^YÆU›(ú×ÅZ1ºt±+ô^¾lR R˜EÂ/W¾*æ•*½„1غSó¢œÉ¾öEÚHV'Êr&ªùwaËäºpËÍõ.W„ÅÓ³ŒqTµZz—š‘ÈQ•DV2Ò–â-RMCY(âe¸‚ZÛ!NÂóK„ï@íš²‘xç2›Ò¢ŠE2£ºQ¤’Ûr(¯Ÿ]ÏDô¨³Ñŵw,Db¡Xí¯b›6G5þÆUnvÄr×WÈ&ª¬DÅåUÂûlƒ!QN£“8Ñ:ßã*§ËÉʉvÇ-5Θâ©>²ˆåB™êkˆ*»í™R³Pß&p¤lSZ{ŒkvY‹.õɨÙÌQ5âœCS6e-ÞÆ+¹ÎvÛ£!±è(†—?L)P"(ü~^¯½G*»éF¯I낾{êb'Œ"²4¥•¬9B*QxÅ96äW'È„d;8›q,å×Í&®*~e­ÈUNñÍŽ£ª—±yËÉpCTrZK?Œ¨7–®ÄÚs}ó²@„ûý¨Ëªˆƒ×f1 äbðž"g)nâ8å(„v‰è¸Ý´.ý·öE9Â'ca„’Ü)޵; 2/ÓKÎjÈçdj›?•5šÔ jÝN;cª+l˜ÌòŒ†z`íõ‚c'4¾Ìb—u¨®É®™É]ʬb¸„2&;1?é.¯±“ôÄ*%ÆÎ¤˜!W-R=:„»7fÆ)â5Dj!xèKjá…† a‡ iÅ(˜¸çC ‘ †Å /v(Œa{:E7cãÛ8¼³-&@ÔÚˆ¤3à”¢<UÅFŸsìâ¤Ù…(þB„)ÍBƒaF/i„ Œ >’k*TC¯×?>upµë:;ge” hsŠ2^@€0ˆ†dÀqd¡B ö™¸‡„àF§â¸òˆàL!º{˜Ö¸ŒÆlÈÈ-pÐÈ(^À ÁD1‚æ aÄè¬)îÏLCmØM¨8¿˜(²˜¡/*ª4c:`Â(ÜÃ' ”ƒ«Šø"l`â±@‰XP°çÏF¤Ë_ÂÉÄu1™–„y Ð›)˜GÀ¼„\¾„E؆VÈPH0̃ ¾Ì%ƒªP„™Årxˆ8†tŒÃó®øŽbØ3íÙB%¤E˜"³¥ã2ÛH®ƒŸ»C‚E!#¿ŒÅ ¡(B.$I± ­×áÁ‡ÁCÀæÓëþóGvÈ2¹ÁQŠAƒ,—÷Ìî@ ÜG¥ê3[ L ”w*íñ‰„µßv¿Ž TR#E„Â^±LP#Tù¨Øa”]Ý]Œ°œJœNÂÒŸ†¦fËÔî6FagWS€ˆ%A„ÄdŸ,u„ÜƒÞ X@Z\b¹hæó‡lÇ jL(&\€ŽŒÉ‘ŠÁô⃠ÔENÛ ÑÆŽœ:P Ü¦!ƒYʨÂdaÉxŽCºeh-ÂÅEdUÃF@d°ƒ"֭Ȭec qØYE£"…˜èR½æ…¶`D ÜR›!¦" bha‰E†.ÌOŽyMÊSŽŠ0°YÇåX‡L‰ˆè#1UΜ˜fC h3²LGÞNÀAÈ(B“Ä­Ä ÞœáJq¨ƒAˆ9`û¹yÃ3(R³ êÌEc ¨2ù a˜JÆ ƒÿAÖš" é¬òà^ô6D`b€ÔBöe>D@†ÀÄ!˓⯂áÄÊiJZ‡jw|B):/H”ïC£ÕæD¤4„£¼¢)2~„`Âì*-`bŒ~R>ã91 >1±,0T*:ìÌò”Èc{:- +t¿‘¨ŸÇOèЀ"k92YÒdqÿ_·ŽPg”šÄ¬ÎOáIÔ±KYî®Tñº!¦îµ‡RÅ AhU.JÖ~©MͪÑ$’ÐÉQÇ‘†iZê¶¡’à‰>ËoÖBöTÞC$Í1¹Ô-Ò—«SàµãIÙ#‘XGã<„Mc½‹t=›ÈöýD¢ ‚-djv‚»Jexß{ésÄcÎ0¨Ò‚e³ÕdùßYúZSŒØ†62ÝP‰þ1d‡h.„ÿ¬%î#œ¥–†öéu´¦«?0ºNÃ:êéC)AÆ›¶"(¥… hJÑ$–®€ºb:‚™J΋+™öé_w¹z\rspu*(Ämr²ˆwîéBÑbi=2Cä¸-ãÏåÌ I ˜^dë±øs  h&!žK†a÷‘kˆx4Y@@aiÄž `ê²Z¦åhÅ÷z32;³„£´…±Qw"Õ‘7"'v÷uLõtt« AC8áã\´¼·U¬AFŽªGë5/gÁ3 ’©­•\½Æ*бÞ⺷ Ï¥dQlõK§r`÷RËÝL·îÝÛ štD²"̈—b–”F¢G»+›=¤]3„Óé Éý„5ÍàîGE3—ÏTÒ·j~ÿ9KÆ+oBPúR6z2B¬¨:ÑðÏôŠ.S;ˆäcÎ|Nñ¼È³ÊÊ€ÒËûfvv0i7Oìâ/Ø›\§Qd§âã"ó9I«‰AaÂWµåû¢O.èy˜ GD'Ó„¼±¦Äd‘ñ³Æè†áœ¾!ˆãÏ­B¥EÍ-‰úHHZÜ…*œÂ9­$,¸ÞF®)Ps$‰ÉG$„éZg¥K¯i5t]-žÍQ…‡YNâù~”ZÉTƒ)wøÞÆsÂ{ _z&!EQGÆ_:‹˜¨žÖH¯Bòsq‹9ðÓné3F³é¹6BQ¹ε:£|Ïè÷+]NeOšÆ˜FÑJRѶ}G¡e@Œdb:‡-º^!²˜Qêµ[.™Ñ/‚ Û*%W&f91m‡’«„b•;5“¥(¢áè½ìν0µ›ÚëXé3jŽ›ôùM&RE[Ja9B`üsbÐÔuŠÕT•êK‰z ž&„í¦`ªYDá¥-g¡žö¼\0Z‰W^!]„q—¨I ’–»Z2äÑ£ÂD09ßš8«²Oò÷-Ì«qEölÊ霪ªO=’’bRkúïò¶âŽƒˆ03„·à²dÚRNI†å5Œe)+!ñ¤˜i<)xc3Ì2BŸ”ù‹¼A έVdôOZ’¥áÒ}öJ?/b“4&ÊÆ|éWc-yäÆ9ez„\ylkœáÒVŠ5i/=dSèk3޵qP¥Â¸,’J‹×²":é]¥/ök|FrìB]r`¬;ßÍBTïšYÆñ=HŠå÷Ë ÃÊ.†¶,ªòT1£î§FÍiG¡Å#2È}ÈLraš´Y“†°`à9勯pOÍ5÷øÂE1y:ød»ŒT· š_"v¸‹Î!Ìȵ!‡±ê¯0\hÐI(0ªƒ †16ÍÓVµCñ8@•+Ek—&ªˆ´{–Rq9)ìsùÞÂÛ]ÉÑŤ–]¯Ó4V+8Ôt”&é"LPÝÄŽ.Ði`X¾ pä9:á\Æ­>¦¢8„ˆfUÚ²ÒÉ’™úZ¡¹}LezP$¸ŠüU1x郅d-# ÕVSg“0W!–żú¹1¤-½˜÷aB„É„L¨Á„Øf¾üci¨‚§³”ÚIgÊ‘ ´UXä ÜV¡'wKo\”šbg)(ªFGñôY%óŽe&ÈÁV¥Ù¨<^¤„£XÊ£Iºü²iI™S–1‡iC4Û1DžÚó_L35˜Ü­­4ôÙ]Ûf.v£ñ„(!JyJdW!LQ>F—^‰½xòÔs“! TÚèL4¶>?¾”õh­÷Ì÷!„'žå ÃNR-;j §‰kÈõ ³ pA”4½”¶°dOµ •{T±!ϧ•ÖJgÃÀÖœv6‡tvqþ1c•ÂŽ¥£Ì6’…!/SöàÄÛ&&fŸjÓƒ2‘ U£™*ó3‰EuÇ#¨bÅÔN—–Ƀš=dÊÃ,n‘H$áÅJÀµV7Ig_J*IQ õY¡#)?¦™bŠÚ|¡ü³0¥F>q…ot•«Ý’!(˜“ìKVpì(×2B®t¹6C^¬éZ†FSŒOfª«ðNz¼öcÈæ0 PÂÞiËp]Ï 'ØW¢H{Õì8×Lû™¼A²–C-d§? ºQJQI :‡ ihSZߘe`ɇ(æº-µCèõ/YäSù‹Bá³Q’Ë•.}wÜê¢ )x'>0(A ™qŽ!„-¯úâ\UAzk#¨Vk¤À¦ß G­å¨$c 'œÅF!s·}ñ™˜s+º”½˜U°O¥É rÙ1)ÂãïøÞDÀ˜4¬‚‘NÍCmÒËGÖnÊt0DÿæA»–ª¬J•·ÈucÜ!nC$²ÉÈ”ú¯¡Gȳ“„³2™·Á ›‚!…³£–j?:j)ˆ¬ŒÄ±d‘˜µ5j„Þ‚:ðÁXY;šÐÕÅRf£!Ù[’Äa¢l”'Êö;†XÂŹ½æª÷VX‡ÐË]5n-[êH‹‚¢Ü´A£O¢[ ÉII#8GS¤¢,ȃ©(Yx/¿Ýb¤¦8`£5©/q©[½è•6~OE‘,dòyeÿ4gj²‡!ÖJ|ƒMÅO%‡Î(E$ß2c![W(yc­ÙD r•÷\…¤õ¬=§°€Wnñ_[·]ÝS$C˜è(P‡éªå5½‰nó=IoZÑ÷;tÞIëû>Ç:xÓ¦_Z­d\0ÏS’*ÏäÜ[—\¶DÂ# uZq^XøQ5%ödœ³›ž„=ÏF>}šˆÉeÛ7©Õ ’ÿøÉˆ NûJû?ûúèúßúûû1ûn³’…Ïç€ôÅ{ ec †Ô#‹*Õ¯”®Û”$· PŽ 3–ØbM-%I:Å(É;Ž@­UþS¹7é½™‚ÈäŽS?H…½¯¿')š‡0‹‚hY^•dŠY Ó5u¦ÐØDFÍ‘3JØ…™Î’B OAòzª9Ê8 ‚%'B/M¶¯”¸LÃI.Ñ„s)¥\‰¦Ã¯"G AÖ„£$˜wÒ01F+4ö#aõ}gÖ7u±Êù‚‡„bUDÝ¡"^ÚpÏtqÑIä±9¦Y[d]º‚‡JÄÉÌú%.¿^Â:/6smËOãK5@©Aðb«)ÊÛíÕRŠT`«Uj©=©½B«J„×*œ¼—Ó™F1 I´Ÿ”¡ê‚X”SÌܾÏN·É B pW©ÇOdÔ½]Næ"•J&T–Ù.³ýtû:(¡ cs‘øX—¿‰DÙLb1Hv2y‰!ÄÊÖ‚ë‰" ˆÅyn„µ¶jû»šïõ7~}E™©+8õœ}û% ¼[¹̦R™e)…Zµ‹±o£Õ #T0wÌÒ93³/Ÿž‹Kô—®ˆ+‘¨>ßLIOÒ`çC?Dð! "”˜[+Ó5íL~¼GâD ‡l—d¿†þ–äb”œçj%û²8ê´Ï+aÌ è}ñ™z6VûtRiÈouûm-   í[ld­HLbD1ˆ¼‚õKCu–b}&³œô9üTFçÚ×ê¯N‘sqŽ˜ì†ul=-$y#įŽRÞO&ÕOvÎ&u»B[æá:½)J1Ú ¼ÏRÛoZÒZPŠç*ÕŽê3#Ôg¾S;êJœ‘ÜR·ú9fÎâS½¬ï²Ý´þÄ4å+È*TLÕZv7©‹–±fæ2J±‡[{Ò›Dk4ATãÂ>bÕ5OO%s¶²ÒÔˆ‘ ©& =Óé2Š`\ä½ Hxלç:NqDo[–Âg/¿›»„PÁÎ3=ô•Ñ:.fmÔÆ}¢mQy:̨GSž¤m+¨¢+‰]bâ~×Õ&"Èo>’MDݦ¬Ëuù]|–ªpéaÅ+]µ×ªºOÉâîGôõ)<ìqXV0¦buÝÏJeÍ™i‹#T„\"±«m5¾_fÚ£˜•+™ºAb¥,J“»B%)÷ƒIÕÚJAEwD*Nëö ´¤Šždrx®U¨äR‘$ ©lÌNePAJk«‰ÙN.ζ‘)a©ÔGÈšiªBŒ¼2#ç‘”œRÒ£Ñ ñ-D„^Ò£U.l½'“› „R˜WyÚCaäDÉó ÷ÂÑÌã;èLš_ÁÊ6 E0Áƒ…4m<Ùg”3cGSpïÔ?>Õ+Q{„²"—†`ÂÌ…íá$¨´ßÕfuäZê7‘UÄÀâQM3Êš(b›Æzž[Ô’îR¨Æõî“ß䌖¯+jІÃðF™&!Š÷ lݵZU¦i¢lØ*ÒêAH ‘ !ÔÍùÅ“‹Bõl]t»È:±l‚­¤¥é6æ–ÎÒ êG- æSTäB¥Pƒ„X´¨Ÿ€•?·ñ$QHò"³¥©©ß†3›_†¥:Œ¶]q,¹a²ª³”*z¬ˆôÿªw%*|¡Ù_î'ú“ýŠ93„!0´bŽâT]Utذœ „[Jq•Ø.Þ„Åä8¢=Ù…)=Èsmhbb[>\ËÕ´É:X¸OÀ$– GŨ*B@!­<»&W'IaT’¢9*½Ô©¤>»z—|”$évwn7“¯^>&܈3 L±¨>>¶Ñ!¥E]yŽK¼à`¤zcFìjKIœéò­‰”›ãTºªŒýDùºœm#ŽÇvê*Œb)l"µÑ¢þ± ²(B£$©Ø¦­ôå¥û](‹dB,¨ôê¿P•Ô!µ½q¤t± Eû•ì#„$„É6M^&ï2q¢ tNC›f×Îm¯ ùoŒ‚y®QÈјÄO'Ü–jéVd s¤Á7}ÿ—§4¤Ï{éëÃtª2îgÎ$RØç#wyá'¤Ä!KerÎíÒÖÍ=¦"œ¤kªÜá]%´¬ZZmpÏ1Ø©GÓÒ±clB£ÐÁJÀ®ƒRj„bIm2)5k‹½{„¡úBL_ILa˜AwKxšýB ÂDEzÐ&“$‰Ä)L’]¢-îœr‚ˆ,\²ðKb׌Ӽ­¶?Z}ÅûÄÚßõ éÇQN¬däölœe)2C ¶ÛÆí¹êŽc8¨ÊBy)½œ÷ÅÔ%øGT±X䣩{fǨ™ûQ5¢²rŽªªQ–Â:cè÷ïÂiëq$\9}”Úݶ?”z—ä—(r²‚‘0+¡ d¾´äÕ* V&wø¢r&˜¼Œ@Rf$”y·ðÎÚ}£2e]^Û¦ Ÿ o˜®EAй¤m·7Ôµ1bjL²Ô a5¼‡öñkÖŽ4«ˆF©ýïÕš^x©iN ¬É¦+s¯B°dÂ5ŸÛÙ´™¤]5›P[’ÈN B„Êø¿4òq@…G&_Ë}sYêuÆ*WfÜaJ`àÊÀLäÙ·V‹×CNUÒoSç¹äjØ„ù¹uXK1‚y=•(hŠ‘L{(Êy+H÷òË €„bŒÇGl÷òø•$¶5’¸Üˆº)%ÈÞþßÜA´½ÖÉ.NÓ•Is•42Ç„ôÎ/! b)Öï™JÓ55:†£>ž] Ä-% •»ÓÐÚ…k+ŠÇ”ëEeoÔ‹êh­A !{W¶›|Ê•©ƒÑlCp¨c\ ‹Ù2Yö½Ò-Á]/1înz«P¬h¦K‚£… ƒÉÓµ+.>ßÊGã˜ôãàN—â<­ÇR>¿z¤A©H!ERª/½÷ÿ‘l¬Vbïë&Ù…( Ù´©å’Z2k8vrŸp™Q&läºejÙ™bQLaÆ:š‡‘æº âuDWÌëïZä³9;†ëËD”IK#EEMDì•A„ÛhÕ%þYm•b‘„@«9ŽËéªô",üj!üL¦³ð‡H:âºáìl<´Êb¯i©T!ÚÊÅŽRÑÛS³üÉrYu×—y;¥-Èj—º™O¦P‰‰KŒr6+]iÄk«Îx‡E¿0¯cÉRh’4î$A5³j‡ñ½Ò\d\K)d9Š5r¯÷µWÞD³„§—YsªTX¬#dEm¶Êä(w òx¢ôÚŽo´*Ž•ÍÅfõÆ{¶›ÜÔNj¦î0‰ä=½}óQ Î*­»»Ý)ÀèD*<Å€Oƒò£¢Ó¾Sö,ùàÈ&8J¸0•\HÈ„WîÔ—ÂW2ŠWòªAƼ fËùÏ€NÉZ  `–ÑEc'>Âñ‰”ÒJ΋nqÉYÊ q„¸/IÉĉLc‰%æ!]ÂRRj|‚F¦‹ƒ‡)X’ˆA¼ ëYJ+q[ jîµµ9È„êTIÈÐa Hf8&u=0ª@ˆ"«RÛâ.ïÐ&aÔ+⡆j¤Wè¤Ãb@%ÆÂvBô=‚ãRš¡šö«UL¸~âZ Ãhʰš†M}}Y7ð@ÅŽƒ”ƒ):¦˜.¬nRT!mÊíM»’CVNŽA99 Zš˜n"S!ÂlMl Í )(‰Ô´UâqgœéjcrHÝNâ‚% R `€Ã*ä¦&…®¶o˜ZŽ2ÂÌ”·‹1ÆàÈswêAF+H Äe±lÃq íñ=]øC F1`ð?*FCFìêç#õ¨\Í"Qs·Äˆp›¥Át5ŒC(„ƒ©Îæ4ưJ^ªéqÈ›¬áÅ(ˆ †f(Ҟ«6 † aªȪU˜H3™rV\.ðÜ•Xå'ÉJ™HÃ] ¨§X ”Õ3 ˆËݤq 4bÙÌúb7Ië T)\JЧ|Wú!Ÿã¢(fô¥¡ šÆ™È‡“  %™PEw¦ÎbyhÂ¤ç ¡…Š]2ˆ#D~^xàÍÈfC A3¶w   ’©ÞáÍPR0÷¬ŽˆÎÞa…ÆY 9,¢d S²0q„BO’¾UÞ ŒÀoP<*¡O „!ˆ¦Åè±¹Öq’ é°…4§•D L´A 1’,«Æ†Ãt4åSPqä?ûóq\¢²LFd‰ÉO<" Ù€È»‡g†îÄBJ½¼C‰{oP("¡c)Eˆ`‰7³å­˜’â!€Ä¿œ­"ˆ h!È¥bå$çå®Eã0†IŠC(]Í[ÄÜ”}à„BB™†A”"°Eh¹˜œÅOˆ¢=*6B£xtҿࣛDB57‘ u*š1°€!1pŽX4 A¬dËЀç2‰†Qc…”¡V%EŰÞ=Þ>@Œl`FŒâ%ØEDð`1‡wWoĤ!" åö«¹L)©\~³‘×"DŠ,`j ð0"ñpú\á·3 ` ±S¸(ƒ0Hóû—[†<ÀŠPçDb¡v­ÔŠ´*ÄÀ f+ °Tä¨MP‰EQ :VUîÂuá‹ûŠ.H„Èœì')ÊfÊ@2Ä)»”ß¶ÄA(ä.àƒDŠ ÃøøÈSH:˜GaTÄ…*- ‹#Œ*ë"ŒOLb¯#@ŒøÅLÐher€Ü.0"oNruÀçäbÀßäÍU^nA @Ñ| 0ì03áD*„‹ùé8J´ð(áÖn2Õ‘?”! €Ó)G¬Å…BæNw +v9(AƒŒñÊ> ø€¸×ÁOÅÃRÓ·wÇ‚§BF.¡ÑZc( l2°­Wða©$âSÙÎR ߌpÅ’R3\VT(ç@&ˆ`šj^| † !±-*c2¡!h® Ò^URê!5 ì)ûŒ—5•†ÃSÌwL †D4`MáèÙHŸ`²ÑÅ(¶n”ÁiDoUó<Ç%³k-?PŒŒÜc£SŒÆ +ˆ¦6Ä‚*­j 20‹PUZCÓ™M-.N26¢öt 3ÔdOÈD2ìz1Qª é».)D\¸A.ÐÈP¹‚œœÂ3R’(d¬!4åÔ†NW5"rˆ„À† øÙ7¥*`Ø$#AP{΃."ñ RêPÌ^ oÄ/…iú@G0 Ø2æ`Ç:a²¬+ED+Á‚3fýQB8BP— K8¨âjǵÄ%;F°r7 v Æ!°Ú’_õ`A#^—!Â.ÏŽmê) 72ƒ „*Àq] Æ"Œ°Rù9œk¡fä2 •PÔÏÔ¯>µ†¦áÄ?#݆¼9Úüàäòè„`ôÁý9ˆeqŠ`…Jùp3Ñ]|!ˆU)ÃcÚLÁYÏ”ô„ü‚ŽB…A Ž7¶ÐH5ÌÚ‡‘˜Ž€…ÆŽZ ”tÄ"Óo…Œ£‹­¼ `))JÝ0J„˜)ꌋ¨$ˆRBÜ—ç!FØ\ÉyÓŸÌ:œâTz ©éaz‚Ä%0!1¾âv;0c#ö!9ƒ2!Ÿ7¦E´Ý_"ЯHÕ8˜S…tDÀ$ HЦ°˜ ‚7|´4ƒ‰€•õÙëŠl!ê¶%»±™m  (D 0ô[ôr˜!™R´_œ j`ŽNi„ÅŒ­ðUN Þ°C )à‡ ò’ ^¢)B§ƒœ·„Åvá²(ä ænÞƒ¨œÂ2†ˆª†$z·CÑÃcp\zËa›Lÿ©„Jæ‡ÁÄ)˜’ÁT ˆ)Œ“ èZzåS æC KMá 6ù@J3‰Îãâ™=ÀƆ;'jRŒ] £|NQjz̦dq¤W$#dÙL”F•g"*B± ÒäÄ G ¡Ê#êò舠e-š©‹"†èÝ‚eHPÚyÊbæ-!”)„'!T­I`PiÁ „1à&PÈù^b§!Úœès1’Š^îGÁ%s)ØÐ˜ŠH‘±Ø‹ËÚ-qáMœ=)A1ì®0ô/®jذ Á ȦˆAÑX&iâlg ©”‚J£å(ˆb<,ƒ•°’8¤Fb˜hÇãNG2¿&™ìâÔCö ê¨ä5D†¢â )›µ$Fa3…Žô‹Gœdý—0A¢s: Ð%æX·@ŽÈ0FßrÒ±:-R7ã¶\ÝÂ-¬¸ˆCp„5$9%†ºEDÚu±…¸)z½ºi°cµJ1tGF°1Øa Ü™Xùts3M81aÐ>S)â&a ̤¬°‰|þ7vZw´ŠcÑ|q”$Ê: –Aª›Œ˜‚plnV(¤Ç ¯ŠÊ¥îŠn„r7N,'ä !Plììù˜Î‘Ï]i›AT.pBŒ…¥lÃHKN(å˜ÜÙÂØc‰!%´Ä¬KÁ)‚ff7„Ð[8ÜËhú!bÅ!ƒC*GGE"œ¦É/ ÈŽ#á# Hã<âYÌ@B"[ø«ÐŠ6ì+B)ã¶NŠŽ€G®€¤hd†Fr¿°Ö”…0ÒÒàŒ/ªªì+ÆP±tCbwV"2BµÀÈ0ß´ÜO%ßÄqC. E€€ìv¤•4d™ •4`׳Àæö’Öß••QžŽö´“¤™˜“ÆœÂ"á”">«ÄyOØ¢ôŽÏ¸„ÄL1È*Œý•T"ˆ AÂh­H ÄZÏ¡1 ÷.˜)áì6zLB(CÇ9ÏÉx†!Hc†d$E®#Î1fQvÎ!S1ÉËŠ8 bUÅaõ>…†ó |8ß*ª¢ˆœ%´cÑÐÆg§ÊSt¨3 CLN›©Jš¢yëŒÐðŠ&äYg¹Üˆc‘DF¡´mÑõ¼àb”ȆŸ×rBÈ÷Ì£²¹(B,ç]†\Ö(1†%+š.¡…r’`ƒ&Hñ K ò\B‰9ŠTÆ$J‹È¤,Gs"UÅò$V®LÓkP˜‹œªcÓvhG@Ç5éÔ¢.ÒзŽX|ª #€§9—¦+!B‚Ým†ã0¤]f#â„®hè?|íBwiöjÂӹ핌r`Œ„a˜Rl*íÒ×Or HJDJÓaTêja²gOšˆ÷!CA5äWÂÁ'ˆ¥ ‰µ (4"H%LÞ Í鉂C$!å4‡-Ôì|½PŠ3†ê £*q²±ƒŒÄA+ö`Î) ªÂx¸Ù˘u¦.gAË6zꄘcÑË€D7ôacF}Ž`§e ¶rFί13Rô†b¦”b.Š4͵ð1¹ê}–¡œÂ®D ;zJ„:´B ºu hm“U!Žæ$¼¢œ¢OÌ(„Åts‹0“Œ1ÆÂOŒø̨\¤ì"‰o¸»›[ ÊP6}a…$ \î…h„¹Ä0ÉèdZ›‡"Ä|ÏEA†Dæ#øÛõ;]0Ïa OKyH2j—·+ðÄbºHkH"pÙ¹tñ"¨Ü„\@‘ø°ŸEÊãàT|CÀÓ`;8Ädá# 1›¸ÇäfêD!pÑΠ˜N ùGjDãÐå… 90§`fpôÂq"0Ô¥Dì;ŒˆÉ±œÞQ!už„MVùRŒ…ý%æ#/ŠP¦•’Š ´iñÍ3…0[Hk*b{š)“Žo§z”Ð8U1ŠqÔhƒ A‰HÐ&aŒGÆ~±Ø©[V=œ¥Ê$YK™EaœüHÌ+n°Ü…RšVÈB×%@â„0Š$¢C„ÁJŽ 6úV-U§VCd2ŠÄf(¸Eë˜Cäà ÐÀcìL _Qt U˜³0iؤG-0r;Ü9Ô`\ì†*—ÃHŒÈ8à!ƒ(ÐÏAâ W¡` PT°(M„¨aí`AAE J ŠD!êt.)1˜AžŸj¦„&»÷$ƯhFh`YªšÒ*@&(³Šä#•Ü G 1² a¤ª…ôÕ’PÊÇ þu‘ÎrwÆ^ "a ã‚>CF\&Œ@˜j°ìâ 0z¤Ú. µð¨=#Hhq&¯šîœ°DDAˆS 7nŸ^" ¥l‘jFç‘DeÁÈ„C•DÆœƒ"TX~/YUR/(u!UŠQ‰›„Š á"ÐS‚@ƒ²˜4^¤殬ü‡¦RIRXÒG g{ÿ­š®"»¢¹ÊEŒí§±ÈòÑHU¢›N¢’}Ò)ïî«N{³!-Œ?Hª'àux¼pg¥¥¹¬3h&Y؇A…Õ¿W˜‚¶_’¶vgw<¦Dýíx›ÄTáyÆbô®\¬‚¤ÄÕ¹ÈL(Ï+=ÄÚ B—îGZ§>g¸\ÆLüW.°åËRùmseèýø!EJ°UÿD ÆW±õ„)tt%™FÞí ú‹iŠ)ë³CÏÒ¢ÏG£&û ïp©T›Ù˜I®‹7Ð¥*69¹Ñ1Ylùò²­9)Ö¶AX}MæÑÎc'ÒS”nïÔ´¢S6b••5"£˜E)íq \JÌ×™d£J“MS³ §#[1µèÅ“ªq IRên¶ZŒNÿ(þ{þrÿ0Åí׳’å®$O?ôÈðxð†yU | l«T9é„-hÙCÜþn÷ÙšER/U$@¾¸[£„B„-ôñ ¤lÁ6ùûBcZ)ù)‰jy)¸lÊj×—F@Š+D’}ºEy‡4‡1ÅK)Ù,†!õÿ05ÍÎ\\" rÅY™l]ólºÉ©6BIl"ªÒS{8rZêÆT+Qb…4†T–CuUÊTóâËÍŸÅ—¨JX×Ìåî2Y8+ ƒ #¶0!}‹!6›ü¢]Ò³2Ün5)IxZúy;3ª;DzA9¦5±Ô÷‚¶·½Éˆs4¯gL_ Òã&}Î~#Ó:ˆr<Í©VÚ“4]›)¥'\5¼õ*Ù6"JD"k-ZgæÇlE󥓢Jò Iîää @›½G,W¹(ìÝß8âй‡ãÑ‘Égå0åñ‹¤!Ñ‚Õ|ý^5Bc63ÙbaÍ„¿j5¹Gô.Q-8³(ɉ9%G÷¯|ˆØò4Ä»¸gášÅiÙ¢È]kysS“)È1–•Fâ¶šéÜö¼õÃ]Í"µQt™9Jº‰BD%$|S3Tä±Wz¢Ùõ—ñZñ«ú^qj‘bÑÝÆk»Ä2Q,ŠŽCýbÔgÖ~*3êV‡ïÃêêW‹«–yÙ¡ª/­d~R\ü»!drÑ+Fêï3H¼Õ`ª*ºUm!9UîäyÉR–ŠBJø„óñ95©ñ( Î[:µP‚+D'’Çõz&X[/œÒ;\gr³¬ïˆÚ Q+vûµ™µ0ÃNIZ…ɺöQºa&&]xèWg¢ÕÕ™FÓ#Œ[žÍ¥'7dÞ{2ùDÉ5W¸„³õ+cò“•)ØrLªÎü×£¶³7H”tD*ñÚc6ûÑ;Û –7¹üšÂÓ½E”–LÅ./š@¸¡$.™yÝ™lE^b6±.õN9nŽfÔ±d#q1Uf'Qó—–œ|n<˜œµ™<©T«š)Dj¦Ø»ë‰Úú².º¦LÈÉ»E>ÿ9±ôŸÏ¬¤2eŸ)ÔèlËø³W§’øE¡2Hª½‹ÎG)UšädÔ6Jý¥„]Dr§Ê%ž»ŠøÝÖÞï^TL³êBR¼%]ÊJ0b„]MèOcZ'í-Pgb-„Îò¥QõbP^”µ,„ít³ÐïT]N8Äq•H}#L¾ýn¦X•œÛ/U íéGl=%ËVd-G`3ºU'/DžoÑîN¯’W!Câ&Tî]^!a.twiO].öS«¿áTçôÊtEç´Ì|ÿO"˜CQ†˜Š*¥v 0!DÒG2.4‘&°”(Gã\¥É’âš§âsW+í™Ê z9)ÕRúçF3ˆ×|3cî¯%3ïF,ޤc¼‚RçÚAo[Œq:Ë „ *Úf‰x–?ü›ÔG$¥ªã%Èc¢•™ñ>`bO'~ˆÖ%Ÿ BÏ%âS+XÅÊè]_¡5Hámƒ)|¡ Ix¿aÎìŒV8)¼‡¹ro¤$XµŒôYÒr âÙ3Ë®¤­Y2Ö!¨¨M¬¤ïs­R’¬¸îù¯L6"gµNýŸu©ŒFÚl´!¡!kQÈ='IšÆe¨)U(u/.®©(Xiépèu̘@eBU)%L ${ìR®r‰ÅóT„!õÂf9š¹Bÿ^„¡5‰A1sÇ0C2¾ýE8fQ F9©2&ãK“bØÔ6‚èL’B¼ÃÊñˆR ŠF˜!-4®S®ÉC_D|ÍQ0³ìbô¸[ØÒ òŸ9 ±G)„éç{ÚI@Ë_ 0é= rñàh™ i,"(Õ°h©g+Yü)¨q ´Gw^y²X&P¸}ØÑ£h`+‰?¿ìÊæ·P…Ÿô †Ó•D“ñ‡¸€ã$£HtÉÅ"RÝð²VKݹ*³ 8ªcs*8†ÖÒÕ0£éïFݯŒ¶NÑ 0Ô¹¨ùÞR|¾»Ó±Þxͬaƒ¶µ÷‚A¥” á£h…À ’eKFƤ™.Z¶„—¤OÔdÙÂÎç7¢ È‘2ªR]Yd¾ ¨TØ—ììã¢=+/åjØJÐÔUS˜RmbÇQ˜uÞã(ÙÕ‚Z¢N"çÖÁv] k¡~Û’–B¯ê…W¨`gÀòNP…DGëÛTGÒZúžQ ÷÷¿J²®{Øó8F2Ÿ›2\ñ“ÉHC¢«ˆv~’ÂÏ,óAuÐVZ¶bÔ‚„V!JØT»(¬­®çÏB§f|›ñ|I^Ð’ő̶_ÕIÉtšT˜B’Sí±‰™)Ã6ˆJ8î(ЇØõž&¥è?¾R‚¤¦.íÜd|³å}Ä4¤ã[vÆ#·¨¬Å9\B›8‰¢yA°ÞG:™²åïY$4¼sZ×GI†¬ 1ÒOê3ï}„š]ýÓÌ™ŠÈ‡CºL«"uÊ¥Œ!Á.-òZ³B&‰ÊÌF/KÄÄmCÐzkLõ CÔÓ8b8…¢=˜ìü‹O¶p©…­×ÏŠ»ZSuYs˜¦¹P›à ¤E‰:!äy~a—hÂR©£ðŸ–­›¤A-©ù)#Xѳ ˜ÉÝÂà A†Èº±áóâ*…õÉ‘Ôcœˆ«„R¡CmrÙÅŠ¬×ÓyçïrRœÝOÇEÿÒ¥*‰a2F‘†S§&–ªB^â(á&QŒã•Ôþ&BÍKn͘ÌéRÎa™±‰_][ÊUó]”½¨Fá CEIC²„ »Ní-nA(z1fuy>†‡“dY$šÆ»Â‡VH€žê9éA´hô3*âÈ$‰î!t!Ò¦EáÖ²u‰Wâ ±9õS‡Dœn|ÿ+íj©;{k'•ÙÁÊ„Öα—R0f$Å"?(™7ȤûÝrô†~ümþ2)xÚÜ‚¬G 9h%Hsvn„ñ×F<3‰å§µ©Xµù|.¢På-ÇYA{¹{Bù8@ @!H##Ö«°“D‹e+“?Z²… bN­CEm2Xãà ƒI3•:V5{ÆÓáSþÛ@N¶mRQÈ)EÕ„/Œ(•ñL*¨ÿ®E”ÁÅyΉ|I¥‰Õ\·i°"L)g«;¢@¸KŠó:˜ÆC G’†±™^«#ˆÆjmÄÄi%–g±k•ÉL)Eü……ÛUAiÍ)˘@€¡ òà„C[kÚÜ|;¡ø›Û‹åQÜc§ +Hy½K¶š+òÖa.©v}zwŠÃ±1ý†²ÍATÏ„Ö@¬bJªa—3#’Ïeþ‰ïL$Re5•‘ê²åî|O©E½F¸÷ûÿøÉˆ NüÊþ ÿ~ßıw³’½¾!÷fô8Þyøk'ŠÊƒã8ëɸ\Ê'Så¢O™Ö‰8‰ㆉ>ØÑhp+ûÁŒ`0pbÂ\è o¦ƒK/c ºë#éZÅ”b¡d!%,˜ÕA7¨˜++ú°h_QN]OSJe»qÆKØ`S’óÅN öv¦¥yÎ`â}‰ßY­&ˆ"^oådB-îFìÜéEÅ9üôµ Z±YEìz˜ê ÄÐ\MÈšê8Ô.„)‰P¥òØlY24‘*´E@è*Š–#Â1áéE´ÙÅ-}hìô+›+ƒ+›ÊdòŠåõ“ÿ'Ç×ÊùÌèÈ‚# ×Ï2޽aø/lEæhŽÁ ’Ï‘îƒ3QçR Ørý3]tñIùÞ†Ù×|„³å'">pw0Ïg©Bq¤’•5I¶!Ë×­IC,ƒ^ýcô¿)Vˆ¥@ƒÞ?ùgæa)Á„@!e‹Ú =rÖ¤³ª10Å•¬B2•U*# Õ±„bƒˆáâ^3“éRš|±WÔÅ ‘,<=$¬K93êc:$­³80â›ð#ëò&ÖS¯p£ëð£Eëô¶Èè–’R•qÈ9h´‹ìWºl!YdÜ^ó2×Zä±îTcbœ]K¿’D¹¦eW0@ãüߕ͵2}¥ŠæhŽâ4PrŒ=¦ÊêMF£m(R”¾‹Òa#Y(šqG2ÖËb‰²ÒAnn3:sŽN]ú¼ …q3k%©@Ä¢¼åQUfµäj[*JVVå\ßæ|Ê2ßRkáM#qPÿ&s#eÝÄS60«ôò(ȼ6È#5žPÒSÅ\ñ×Cêq¢cGÖvE4´ÒÆ«QËí A¨00 I­Ë‚õ$¢Z¶ò!¦ò T,¥[­OÞkÆE°@;– Z™°Zgü#ˆ’&ŠZ,ÐXÑn1Іºwôã:¦J˜0B‡‹Xå5 ¦²‡x©gªëÍçï¼»ÄÄöJ/Túþc…KJK¸œ)[‹Œ†Gd×¾}®YTÈW˜A[gP²XÔJâíÈSœƒ¨BZ•Å&׬•‘dj:X¯zJäÚ]tL-œí¬oZȘäb§¢ˆqUa%Ãïý¬]í™”…Á ´lúv-˜"}>ÙNÑJE⸪ÈIª-D˜¦˜’?“Â7==»Qyëa½žt2Nš'a¶Låj‹2-Ìîc\’ ¥,ŽQÒ´‘]~eË[––S™¶I_ tC£)#ô–áï–ŠÿF¬0òSÄ¿?úÛþE’I>ÈÄòF1ZR´ò" €c¸<ôF[ÈÏ’mC:´Á!¦“AXÇû/SHU:B­Á…BEÎ3,†ùª©Ê­)HA+ß—¶å¹ÌùB±ÿ‹*˜";Q::̉ˆ’=×0×ï©÷2Çv1¯”¯;ÙÛû┬¦1‘ûù³w>ô¯J”)”C´Îž-Ú†!kˆÌ¦'Zr#Yå[%‡(å«nÝo¯™êÎN¢ÐFÕ>Ÿ^†™;âX»3T®¢FcaM+kbY®Â¦2+N•pJ“9?ùyÉÊÇ<®§AqÉ/e«"uÉAU:¯ez)–‰ˆrw ’h§×á‘ Ög’ýáU”…1+ÒdÑóÄgƒ)È! k]ªôôWš¨¯H]é%‰Ù:”ËHl<Îô@`Ì%ª„YäwνÄ(àŠV½*-bß.bL¯’Î!Év©Ñˆ B9={ z©îÜUev+i°ÝõíT#^QhÖ²¬§ôÑL–&iz)§1â" 툥·O)É£e¯q:µ¹A)µ«Lå:ëP…TL§cêü¥TófUoÎ7`ó'¦‚ŒeÜ\:™Iv;N¡N¼Ih¼&×É©ÚF£üÄáIé/r_xÇÌ}e£ ³½XD÷¹d~ªc–ëâ C0®È¥+ó}x¼Z\yU8®IÉ*ÈÒSÔ½ÿŒOW”‰²'¾!‰EÄã⤮);uô©F§+Êûòqœv‘[ò]4¶µÇJ §0©QD Q=ñìø³sêÖ´7  Âj¬«+¸BÎnò9|(AZ=þ1ûë#žå¹.CãYi[ïëõ&Ƥ!Ida¨`ã•qJëШ3¹QµÉt¦±DÆIV™¾&lÑŽ'Œ‘KþO㵎4F±17³^m%ˆ„aD!Qûx]=Š•6VÚå(I›±AS[0˜ö°”©D?NЫY“‹¼R‰K”Ôcª”£P†a :Çv‹mÇZ²îõ1QÚì·_”nÛTô\]6ôCHïåNžÊêˆëwlÍ:|Vò èâ –“ßmWejG$T™=é®7e9ïT©ßYÙtøR¢óÌ´¡B­asPŠó.*ËÄ¡ _òȘE–ÅÊEìC”%+L¨;½ÌêÌy^„ºV‡Á2H¾¡_ò ë3„7ÈjæD AÃÆÎ+-ÊlÎZP‰Âê ²Älk䕉ŒaÏTÁQ*q‡#•(Õÿ»Î„¢5>®¬ÒYI–ÔQÏ]V'¼Ï!O+¼¢nµZÊUé‘Nb¢_beÐ;Qx“îz½>2f›*ÉÜC.ëUf;5K9–B£l¼k)—s%l®U¸ô¿e¸¢9žˆ¶t¦vòëºØü,”"Ú`Ó¬P‚PÅ3’ï#Õ*UëõókV'e”DØùßnS¸Ú-ŸåºŠÙÔ,ZBægË’2Xì|.©Šß”~ÄF..¥òÖ‘B]%-+O^9Ølu¬(̨zh}úB©ŽC9$²;²Ês}L™j¿—lòã´Œr%½):m¼Þê1$&”Ó¢añ⤈z½““Ž—CtRCŒWBïö'-sêüü‚3-KM^Ãâñ+a¨Øå*XžÒ&³„]gI ÍK¤”,Ì’„UÌm©ü‚‹Þ$…¡‚0¤²xœJUä{c\¹Ö‘–­cJ¿!jåJaö’ ŽbN%jj6™ý¶¨µîrŸž‚b uÃÌFq9ß …!vJ²µIÕ–…¼ÝàÅtÐVÍáØª“¾qjWð¯\7&\[«÷YS¶Ô$©Þö¶v¼Iä±G?TWi9PŽ1o™¬ŠqQ'uzjzš‰D.K¦=‚r8‰CP™'Ÿ\*m?…c¥Ášâ_ïºó$®#>Ö«æ¶+ ’[µßTï”D~µK¯m9Ñ „+H)G'³‘¬§j&J|ϰ¤'KÄĹ¿Œ¾ýËt4DéM_kbnŸIT¹FnÌ2ášâSb¡s¶r¦}DW|)Œ>cQy†*=;µ ¼½ò>IüZ³à‹ÔzX/y\„'£´ŒÂ´4ÇVôqü!„Tq‘û(T¿w2èÄj°“SùrÉÚzÒøAJa÷Ä8Été f‘hÕUD?œvÒ+ „ÕÅ8å¬kˆ:OõD,”MæÅ´Ôª¹½B”o0ø‡þ ÏÓHUqª;:#®zºoÁ Þy›ŽJ ²„U÷NRû‰åû-'á)¬&lD-pq™÷.+ˆq°ç"Å 0ˆ{T)Ë)Š3M¡SÉF¢ùôÕõá±°³Û¬T>­¿©ŒS¥ˆ·'Ž#)œ«TU(nU÷¡JÅ—7˜‹ÇID¡”ê†?b“:•l¤›‡b²Ä6U’éû/Ý*èÉ*'+ˆÝÑP¢ B’„'¹ó'”ÇrKÄÞRvÿËé]•°¸¨ZãÙø…FJà„3»¦zŒ*f¥H*ÈgN˜šKîH*z£"n×Gâ§•õ­(£ª!‚4¶sCc&f©˜AöéÚ”ª¡¼§JüXRˆ³ñÛ­š‘>k OK•¹nÊ&ò\I‰!6Rº%HŒ„‘©êtY§"Ú1†JŒ&W^r±¾â HwïС(¸£~t q8"ò„ ‘Ô€4`´Àˆ7œA™ùxAr⋤H¶`PãÛÌB­ÊQ†D¡9˜„mÑ6ÛD#+p9§¢Ëù2™›íýxR<§²´" ©ÍïU¨J™a 6}úOŽÅžІÃtU|Q/.ŽH‰Å3”‘Ðä 8‘”…*¦#`D0Jx% “J #$)Z6sØ`E6whs—§,{Ã… V‰„È1AFŒ êËÉQ„PH “Ó­Až¥/P†IÌ+ +EÇxFH£ºÙV¡È¨º ‚H71ÐË £Q„Qœ†jÓhe(±XbøbøW)TQËži¹ˆÆRåbjIƒRš Œ6Ù=±rs T²ÔÀ~ôàL\)G¦F‚Ü#‘˜ DA7I”ÔÁ•ÉùWƆd苞,8º­¢ 7g,û>ºAÃ!ÐUøB ŽŠâ# æŠ"Œ\. E*£l‚²Š¨¥EzˆŽì·70¦F2 n"*$gcá8da} ¢ŒÔó€VrÃU(nâ9!‰.à@htf+rl 0F#•Ð ïCni•ÈàÛm9Èâ¯PýàK”o „[L«2†f(a Ї ( ôZ±· Ù‚˜ÌèÌ‘œuÙœ‡$% Áp{Ä´Zeùš èóqŒ ê!ü¹ŽT9C!ÙÉÉØÇ×^_Ú˜ÈÆ·RÛt¹÷æ—ÊALÞGÓ,„:œ„ÅvÃNç Ë¢[ÈRVODD”VZéÉd‹Zûöï}˜‚9E»Uƒs'?(ª„â°WÛ“SÝÊY¶ìr,¤±%U.Û§r-ûoLT1ME¿ØÕ5«G'²1ÆÁ#¦ù¢)Ú•*wéÄc,ìD+¢De®*¥<è’á •·Š&DÛ' Ég‰,튑#6ÝÔâ ©zÐWåqSÊï¹uÿ×yÌ?j"sŽ•­iU‰ÄÊÈR!+AéLÙû:‹ÏîD™+Å2é|3ªY¸µÌ¤jDE¡jvªÕÕ‘ñ_Âù‹³³ 5ë»#Õš¿Êw¤Bȉî!7ˆÛ¥sŽVÐÎ †;$ž‰Lj²ž¹j½).ì¸Æ^”-OâBêÒ1E"é:èD5ØäK13>ˆ×ý;‘Rä-ÂPË£Ì~JŸISÊõ U~¹2‡ê-)ŠÄ©4EyÊÂ]½î1M/¤åz©eÀTák:™ÆÃ¤¼ÆÖ¶/‡Ç­ —’…ªá(ÙûR™¸f}ÖŒL3Ní(1$2H«SÙ ­K`‰#t¥·æî7ØØNÜ›\¸Ò3DÁ.ú1ˆÜ*‘AÏ%DÕBF)(j!™ Wâã’Az»Ö¤Ê)³*a z~dÔTq(¦#*õÖJ•¥)]Dm¨¶TÕŽGtg­Ë)j®¹Îfót³×4c6ÏrÒï*Þ” ùOS¬§cPîd©Nô®ûµ¡’›ÚZgkÏý.'å-ˆN®ù$"\¬v#©½‚ªñ"vj·[Þü‹«Þ)b–ÔQ‰MEÞkšŠ,¢³¯ù—[«+¬ëT\‚gñU\£¢…Ë£)Lä3DWg}[ 2º©9&é0¥rvÐÒ×öÖ=”± ë›aSUi1=ô),Žò¤Â¤Äå”[ôU¶ÏIH÷j%ëÙN5IFòè´µÉ[˜#&dÇH†!sNDu)´èûÚ'*©##½øÂtŸ¦ÞAyù²ç²ªîE)ëmkI©¤6Å-¨%ä8rêRuê(èeI—6™qI„z—œž"'Ʊ¸KR—Nªý­ŒBØB¦¶Ä–B‘ÏSÈA‡QLE2cÿ{Õ§uóàÔ§n“”»¨/!$^(¬DWÓwz bÊGs¥²ê ›éÖäªÉ4— uL) !•]êšä-ÃabkH†Ô÷îÚ;UÓÔjZJµqHÉûÂ]P©¢‘<ƒ(Eü]M‹ò©›Ða+xtQv½lcorÌ”G#Y•(öuã——Bùh*Û´Kȃ=.N?%šuuQ]ñ[ÍA¥NAjþÝ­B% …ÊMRà¢ãÂ8ÁÈ·“ ¿Ä²VØi$ÁC ìåd³Hä2.é'C†B…¶˜œòS-ä4¤ÿ©]Ëä}ÊÉPô‚q9­(î)8e±¥O#Ъ«ª).¬fáÖ‰ÔRQ M¾—I+QF!…¦¢Ä¡Ç!³HË"JRq9ë+г1X||âvõH"ûŽr0$éFšÜ¥ç*Å2jq³ðdÔ;†ÊY—qðüÆÆÅ‰È”A3;Y»ô”èÔ/(DTs-8e2°ŠŠi…°ôO±0:ÊGWÏ¢YyMÓ.^Do|j*©ÇSq±é+eÕ ¤%PµJ­<â9@ŽH“ææé«.áŠP©ÊMDu*:eV[ [“(B‘‚5Ë|WMwÑXÖ÷ܽp“(Ê‚©¬‰¥t"­Ö»'áˆ!E1u¤o×G¥)±+õ«°çj¶Rëf:¥}±û(D™<"ÕõË­=‹wÙIäMâ×SÑÖE•y¯/³Åd²Jõ_šÉ#Š3°àªLÖp’v ~—ãœDU!50éF%ŸÉÕ¦ªfaTŒr¢³PºÖJ®äsíª¤É-Tì“%±Û¬¶•g._BÖót˜!(@¤6s¿õ€X œ`8€ø­ï@Fä{ö@ÃúažÎá›c‘ LaE-Ûª¤Ãô7¡Rvæ!q‹\T$†.> ã¶ÈT#‘KüUýu)Œsi ‡® ¥\6Qbîï!dÙoÎ˵·"Yò‹*FU@Åâ\‡Ä”uzQÚ©ú’mcó?»×?ˆä·YN‰­Fí_Ž!¨b“-r8§ÿÕe@ªT 雕ǺgöX†/Ò·¸¥C™´YóqIØuDÖ+²ÐlZ'º§¡ÈÍÞJžåtyÍéí™GÛS‘)R±²ø½i¥b¯iNuáõN‡Ý‘?üV¶Èƒ"ÝD ”2¬‡Äì%À†1]Í5é-W¾ÝˆdPÚJR—2!òîIËΊìAKªr™Ýs3Y±è©éâ¯+—þl«ážD¢•´š×­Åó‰Ýj þO3ªë{qÑ1;ïî­ÜFUR&çn=Ì„¾„1ÈFò3ù–ôÕQí”⟊R!éï¾Ô©n­ùÜ+ŠQà F¾ºâˆÌmÉHÍÉÆ&<´Ùñy3/Öwy²Tæl%ª÷\‘ íͦ)ŽÇ¡ˆ”Ä)tâŠs>FõŠ*·×<‘ÏëíZ¦íåä¡)Òwô„n“‰ŸD#LrêÖ¡}Œ!\¬Øœ–QF2™¹¨_êQ­ZІäK®tÁ>/ÌŠJÈ!·7‰U„*±Ã¥b7!wÄ8‚ÒÅ4Z[ ‚ÔØÞU’Jw—g;ZL³¬¶A†.Ž'œª1…U_¶'˜šÃ²) 4É»×Ò‘¹Èe+>;Ù“Y•- m6z¸ÈÏÜÊÛSå.†‘«)¨5R Å‘_Rå^ÙÈ)m!FCeÈæ“úµÖ'[ÓÎÉ?ê¾w¦´=û„[Áޏ‰T¡Ú„-_çz. r.ë?¼õŸ${)3¤ªQº˜25)¹­(ŒŒ©D–Š!ܤM{“ Å- AJµŒöÿ2¹zÍÅ\ÅEÒ7=0Ê´d¥d¥y¿Š*o-ݯúÒs¤9„z*º’ƒ.Œ•'u.'¡…f}'î"V>1¸V‘“PI"a̲p‹Q9Z‡!šq ­9©øuÖñÎdAФõ$÷ò’ûø¦%‰žØÌü“Q…Y(Ñ”™ô•¦ ¤WbnWŠŒÌ+wÓùtßKªš½"•›N¹GeOy.RM/+îï›…F Mªáz¥!œÎ!Yó,ª–wÏYŒÖ¸`ÏÃ’& I¿o#ròQq ]#·×èÂêqœ8¢JCVÑ‚‘?9ÕÌY9uÏÊiäï~J¨™mt6¢¹)üJz˜æó®22ÔÏFâ+’™)$L»T!Æßè…¨¦7Žþ”Ïr²QSr[ÒÝKC5’k¾’¢÷YXËÅ}æoK±…§4QÄÂX‡[\"Š‚U¸Zk‹l–îÒ-&EÃZkaŒéN/¡t„•¨+.(Î¥tŸÅJ8ÇUÉ•‹ô­ Kv1Ûi}\3MßUdVn}wkz",¤uÝÒ6[Œ”Y5ÕÿÖ^J‘ÓËÖ™ø„wuö^[–wéÿ[°„j¦T©ä5&Ù—oYI ×C¾Êt­TÊT­°qtá]šµjSøÿmBTÙÊÈÕk}‘d–u1&Ìc˜ì4IÜ„1[ÉÂmnqZÂF~%‹J]5™©›6ÚW|Ù÷ÛÑŒDåJ«̨ØC¡ž´â]Ã02j›{219”Þœ¿úA¯å>[©Ãøº8„Ùû–Y>ŠW¡(½¬(‹w”Ì_5ÙWHòbßÞãs„í| š³wT™:ˆ¯õñ¯_rãu ÙÈrÜ®¤H£„r/ý—Ž–Åm¹Í¶Âëö’åAzô/²ní®ŸžÙîQu.çy]ž””ç±»ö\ŠÎe¯[\F²U¹{îØ31žŠtó&>µ·šD-r¾‹¼%?Tèlvbúˆ+“UåMWž± ¦œÁH>¦bÓ.[ïjþQ³Öˆú5òg¹e „6T†) v:”‰Uþ’QdÆmÌÓÈ; ROÄpørV–Å8†)Œ&@ä¹Â3³ò!Qý¸ÜÄ0˜YSžÒ;²ŒSmî" ¬‰J­ØâmÅOS»¨‰ÄŽÁà‚LÁŠSôHÀÄH‰Ï˜ÀѨl† ‰ø·ÕrÁyB‘Ê犅R¬¢'dèc™&mJ$jЈð ¦<‚® Íèçaé ¤ª1û`“ÒÃv ‘—5¤cS9É,""%Öò" ‹I˜LnU*FX¹cš×§¿ ­ß¿aƒ LUqØD/t`††`Âùۣ߮8˜T)—»®Äe0†ÂH3h¼À7 c¾8ÃÆT¢ ¾8ÀèãçvQ Û¦~…Y(LClÊ‚áSâ0˜ †Îæ4NñŒˆž„Q"ÁF‚H®6èv´|t?ë:R”rsPcêPÄL w2ô‚!›˜è¡ŒÄ,OTðö‹M*$LU{©c„F#p…bã ’[Dg 1©·D*ÒÙa‚›^çe*/ŽOm]DNßN3Ä´E‚§²|Ñ!,L…gˆ¤"+a=1TÂvXêΣ³™ÈHÔ+B’æÉ]ÂP ‚98PÁ 1ƒá¨ƒpƒ1Å›…£»Vq?¼RÆ•ð䪖¢±Aƒ„pA)Ó¡ bR½è|zsO+#x zN†Q¤8™á¼%2lÌO8î¬JH†:‘AÊ-bdLÈVÈ4ä¾-âŠQ±@­2ºº…a:\ÊÍ„(b¦Ð$( vdFæ!ÚÇ¡¡BÒÇùÑ Fµ9Ë…\HÂ.ža¯d0ŒóZÄ`à …j}!ˆS:¥R¡€q¶o!•Œ:KñJ ‹påLÙŽ¦5Â~ŽKƒ2Ú}œŒ"‚)‹)ñz¯"‰K˜~v3Äæg!n¦bf«Âl4B© fP†£ æzº >Å7 VgwQÒ»ó˜j#»ŒR"”" F5@Š”7.D0`²?™uR‘y¸ž3ˆƒ¸U¤"7Šæ¾£ 3šiF¢¼î!„pCA2\â›ðBrVá@ñÛ "‘ØPµC€™úÿøÉˆSNÎ Þ …OaÅy³“5Š*Ö™þ°•z¸sˆN‰O5 šIcðYMsH]ºâ«Ž¶d±|ôIЊñu¡ TQ§yƲgÕ ÅµOäÛ°’'tÏ+X¥ ѵüÄ4¨ýh&Ä–Æû ”ÎDwj!;ž-KBÈ.zh©YI!,áJ×d±,Š»vYM4ƒH³Ðj‚lj–0—²0‘qÌa•Ɉºá$âJqÛLÇ &žä‘ä.3v[aæÌˆhÙôØIX¨J±[­‚©ˆT(qPŠ6¯ ´}zµU ‘kÜúá7‚\¶ç+%Jn€)bÖ@£½N£Í i#íf Ø=)Wˆ„à]jPôG>˜õ6Å,CŽKALs8‰¢7§âQëXy‰6Ø¿[œ§qò|ÙøÔ¤¶–SJa‚C‘š #³æZ<ÿMš”5“QÍ¡&¬ŽLf \Í(ø5c͆²o&mB,:…*†-éK’è_Dµmsjº•(c¦3\ÕNÌ3PV®Çý|éxÁ>BÜ÷߈ç}§†Ð’‹8²”!*ä˜5¯/ÇMkÃC‚ÉÕA’ ‚¹ËY)â ŸÆúôÕ­EàIƒP~ä4Cy)‰AÊăŒI,:á'W,×B9(¨‹Ïý „ˆ5­>›ÞCëù%O:µÏÜÆ;…HRT©)qÕ‡JiŠâVаÒ]Î|JæÌÇa£E  à X (P+¼# Õ’Ÿ1äá÷CÛ,3ìXçܰ£X$Qw}¸ò©Œ…CФ1F#Ò"#£?h-fÚx°ŠòsÕ¬—K§øKÑ–œÂÕ…)Î P8 =4‰ O %iãv¸\-˜ %c6(b˜(‡%Œ6>ZydΗlD¦ÅxG9É3Ìl›¬‰WKn|¤¬$ÊS•" ¬Ò °‹g™á!ˆ†'‰Bp'ý¿«©i.jœÔL ²í–En2̦yhý™,ÇÀ­yaΊÇb#ʲ-UÒq¯¤¦² .M$ hÎ@´”¶½RG9!R8+Ú’‡F¨T4tÅçvçÂì³úIè&M]”—|E‘ˤ¸Fˆ`€¬¤HŽã¦ûO—0s SøIàß#(,•ñ)L攢¾Ä€ ă–ÐaBÁ~ÿêL‰»%o<(•§.Rr7ú˜4ª4̓3]¤]rÐ’ñ  ΚbVrºÂAÁäðËxe<ùµíCKnK¦ÍAPî é2Èi®.IJß²¿%NØÄ E’*«4«M<¥§êáCLüÉÖqG|á̸l3X–j(Ç%gm·–º¡¹oÝW3Tjë}Å©µpQÕ”í?Œm¼ÝÊ*p„#©GH®_<¬ËRúJ^ù´Òê óñ¬Ín:˜C ª(Ì IBœ‡4ñž¬)?°(ߣÇó5ÂP„hA¨ã#0íu3SŒB1@Ã+V£?TN-b||Ú:‰8’Ô„ËËJ“¤Ч¶%R\½žŸ‰3Ìs‰1ˆut‘¼r¢òlöÃmϾt4y#ת ?ÈDäã0d„ >Jsì¦í~Dë`Ç/Ÿœ¤šCØ7e[F'wÕJ ë':Y$)4Í1šEòÝ!eƒä(Zã‰jÐ¥,â´ÂXyPR˜@z… Û $ж쉪l®BGú±ìÿ`zŸšÄ\ÕL'”cNŒ­Sœï Hâ–vœýò^%ì†7ét gŒö7Ükš6]§enôñ¼ÀÁC€#BƒŽ!L%-]ž!cM±æ„¸ÃûBHh+ˆ@‡%d:<´¸µkRº·¡ÍTë—#V"¸ùdè˜&5ÈØõ^ŠK¹ …\-…9Ž P§ç‰Z‹øžqDkɿij M4ásæ|iô¿ « ¡ˆÒq?&M2]L¶G¸ç\¢¡Çñï$¥ÕIð¿,-…‰ÑDJ¹§U8룅0S8|¸¢–é@%¨%#|ƒ³çRæóZÖ½1äz,Ú9Ú`0ÒV¡T±”A"˜æµÅ-È $È IqÖY9]zB’›S¨0``)gàÁPç(‘£Ø'öÒoÏÒ±íûZ–fq¯é´Ô ŠT» Ûäâ°e9Ï!£ªç^yl)’âÖilµûDˆÀ¿yE*„®d‡‚ ¼G)šî<´Á÷ä¨'ÖHzôQ–'*­B°Œg$%eͲ<´1èÎ"ë ïÂÖÄCcíkCkQUŠ}Â]è1GQ’ç×àÁ @p¥c¿ZKlûáAKµ8œ\%v!dáiAWò£f˜[æ\­ÓoUÃFE+qHQ†KP‹Ré'…Á%­¾’á³› ¾*ŠÒ@…(@U ”ˆïfåÉjQ%jœ$1nܵΠiBôO7v¥_²¸Ç k9Ž®¹R!pERãÔÚÿÏ!ΗäúºÂŠ QAÀÁƨJq§(Ú,šž€²Vá'(æšXå¯Ç(­9\BCQk(Qi·£Ðv©Zr+›¹nMTI|׫¯Ée°Lc(⦹Î|³Ž¡HáÁ˜%Ê[æËöäSÙ¿ìY ~¿®7&XÔ{ ¨Uõ$¨ÕV^Ķ¢·v¿W˜+gH` Æ5°#VÆIâd\›’LÂDŸ#k!ØÚQ : q¿Zùk‹–Ù32vä3•0édµEûˇÌZÚlâ„rPhc h튩9š’…θ<«uîø“ÉB>YZLÃHǃŽA ÂÉCŸy¦®IÔÚÞ«MGY1ä¡jòh¬T­’(·ÉFˆÓ‚¸£+y3Çy;õ¹¢DÑØhò Âæ‰ë#NieÔW ÀaQwø!2J´ü×ÈI(Ê^çš©æåO˜®Ç7ïQÒ¤ÑyÛ” äJ7†åèuˆ µë[vG/œ¦±EóZf!,)Î  /Ì Ïôð_¥k¸o7) Ki+£FD0ÕF25Yf{¢¸…"ÖŸÝwÞ¸5C»î„Xà@8€“Øí¬ Yc^Û^gì‹$oëOM 9CŽ !”yæ%EëŸBáºÒ6Hž1c ègeÉ>˜n¯?­ÿÆÿßïZÐòæ“€ ´ƒ'ô”éɳ¤ÃTl æ0jÎ). \Å(CµiüaÂ#TT è9¨ `â»þsò ÙÇ5â;‚F†” ÐdÁ¸ÍDf 죧„õ(¯Šc ž¨h9²"„£÷A0 1Ì ÊÐ 1Æ¡×> ‰ÉÁ9†) Öjâ^Rœ-U"…TÁ…,Ù¹)e†7áâ˜!QœÉ¨TÄr#ˆS ‰FíP†Šk³QÄ Ð-pÂ’.Oåüâ>´™Â:L­ˆd6 "5©Œ€7oÖbˆåaOô£SB„-UÌheÁ(íKDQbš¹Žv>2ˆâ@ÍFk“>32G¶uaS‚6Æ^Œ\Gzœ4.Óló9ˆQ&äÁÁSÙ™Dr»Š“HO:r"cW¢F³ÿ›wˆUUÅéµQ)^N2+£”ÒªHîµwKº¹E”Æ!W²ö'ÕèׯSTéŠÞ•<¦6‘ˆ¶Û;°ÆžÄœ­:/Ò~v¥Õ™ŸœÈùw!wØžÚ®4¶eeê<ª’7k+"„ö'½I4ËÌ”:‘ýI9£-YŽç/QRÄõ‘¤4è¿…&=Öß½´ú¤«ùîø{5{X¦È—DUfªcª•¸ægÚ1Lèçi[/­.å.”""ÚéÊGz®Ôg©¹0ÏË×k3 §#e0›|²ÅS3¡ªdm®.1#+’I8œ‰!*Sâå„D$ëüK'š‚h蘲ÇUjË3o †NÞa]¬['&-…K›¼ÑWTaýß»íE$Øúcr#¥±>Ë{7ª]ˆWˆ÷MOYÒT!DF'aVDbõ12ý²ég‘,T;UkDz݈›Ÿã-’…;©XÛŸ\×ñÚ¬¹èK<ЉCykÛTþ~un»¸–R \1•ÞÔö:¶Ê-¨ ¼Î*³#“_Ú;²õY “»j)Ï¥V¦T†íþE4ë6™\ ã#IÄgZŠe­¦eF(ä<›ãâ\BÌ¢nžÞY:´8‚Ò•ª’åÚx‰ž$ìá)Òʪ¢/Šv=ÿK룑[“›t•å!ðD³Ä¶ª'¬ºJ¹Ræ«%>Òš+•õVvL¾öíÈ+Õùˆ¤²–§ˆe©½×‰÷CZ1sËœò?æs—ùdVRÛ)¢®3êEºHwU÷TAñQÏwJ'2Iër)Ú+!ƒÎoéó¸^’ïRðꪫû¸IŽÒ'xÉQ¦JŠA‘H¦Iil|{1‘Ð…D®-Dݪ½*ª¥¬™ê¶#ªýž™¼¡‹´´q›¼ê³qUEò!^j½ÂTb ôÊcR¬åR lb{6 ³ nSû†•ð†âtWbª%{+{ U‰B?8¢+úL‹Ò\DØKqF!fVAhÉA´L 6‰è’'[ ³“Ý·½Õù„¥Šd¡´î)7¢ˆ/çüý°ÌÔ{Ö„UìÉ6K)/YÛK“št²²¥Ì–_lúð¦œcwHJ½Ê|µÜCëU苪»ô;Þœ…mõb‹SÜ[/ÌKwý6+4ãÎ]ßó<ø²>†9ÿB.±CõôÈz¡H.ÝUÑ#^«Zf§Í¯/ûH!g&žüS§ ´SX!κ·ZY ‰TBx”î>cq”ŸkÊ-(¾®&·>É*Ç=Z΂{˜oS˜—*Z“D7n2>™ŽŸ®›ÌQuަ^Œ~]²þÔÅ3Ø»½œ½ë®ùêëºÄ ³ø¥ô”¬™¢„':‰ L\Œ!•”B®bYKcÒ,‘zJ±eY|²»z„TM¹Ÿ [žÖ2"\‰… S&–ªÓ[<¼õ Ž%“–µ5K²Ñ è”'Ýhf¹”üã£ñ)ˆO0æÚÒƒ–RhÜ#3V‚”J1_±†1;Öîµ]BaÒ‹!¸TJ_>ŬE•)J•檺‹%„ÃŽl"hÁبÊìR’](õ)™:Y).rᤵm„ÌÖ!„¶UÊB•³ 2kq¶Jb¹ê‰¦¦êMÖ«xèf5æ‰ÄË“¨ûؤ{&¹™†9dÈ‹BmN_݇¢Õ»Ô ÈjH"ѤfK´¦?RE*bÊÅWeÅ*l„îú·ÊA+þ(„ú9m7»¹ìsm!Lüb"iˆǪ/ÏEW-AÂéó;KØ´Üí*I‰Až„i \ତЃ¯Â!*’©Â-KÉ\¾Ñ-Ô0Å^˜†¨¹æ›åW¯š÷J”牵™ÕWQGóÛrY»ñ¢¹hˆU+˜ˆJ‰ÒØcœ›T³{¯¡c7ylD£Úz-(MœŽ[é5ÜA&Ý bZíDNJ¥ åi1”ì31¨µU¤…ÂÖõŸ­D¦‚uk!‰:0«´ÄÕÒS®kJÊ’ S>¿»î'ŠÚCg6¯ˆVÎO¥'šªiõÑÛJEâùHR>óØ®õnmÑ”È>#Üu5ô¸8²+‹Êw:òëÝJÔÜ„yS^¦'’„ô©Eaÿð" »Ñ7âE|k#¦Ë`©!ÚÊGEˆK¿K‰ì !|üß’K£dM>͵$É÷K9üM1N’ÄSJÃJÒ{.¬±u´«ù‹¢¥™‚ BÉ\¥ƒ.‰öiT™:CeØT}¾6ˆÂÈž 64'%Iªš.P Î+ 欴êS¹‰d»ö"ñu0»Gv‰´·“úgÆ~|Dz²~“Â-ƒ5ØÊåcyÈÍB³/ªk”AiƒPÒi-£On;gèëF95b,ȧ5Î’±¸'% M‘•©¦bI¥ÌW/ ߟڴǙI©:i«+™{ÌÏEO512œ”-ÿ{{$±K¼î2hŠBœ¨ýW3:2Å-ªB-ˆå“½®ÙÁ0…¹Ðf­ü|L*Ô¥KÍSŽÐç2Ô©bȪ6¡Ê¬7czZ¹K¬O½«'¸Œ‡«™+%LD¢mI ‹šSÕ.)7QŒ%ò—sÙùVG"2æÕ$Ão´å\5?yÆsHΓ¹Ô.×ö:â^rèÒcî‰*¡èg—~#_/C„Q舱QLœ›—³Û?KÊ£í;EºÙd¢Rõæ°‡¦a\eQ¾q ÏPêÛZ„ETéKA´¶/0ÒD¥{ªØ¦ñ‰2èE(öÃ1úILÆþJuDO"X•£Zæhg--bU‡ñiæIÕeÎÙÌsk Q0^`åd õ¶*MeÅKˆ¬Õ]RžÝb)ÿøÉˆTNx¸>þ!ûžù ö²ôس’½¸#WEõ¸ØyІ“T¬C³P«A)ÌK&]V9yy¼œçÁ¨§Ný‹gSòÔ´â¬åŽÓ0ABƒ†²Ê õû°õ§£áƪ™—†Áè.ÝÌ?‹u­ÉR"W¤Rà”_þ!hŲŽqË”  ×‹PG<4áÁĦ±ogûOFzÜáÇ3¨A‚Jaô®ôË(7Û:o)&dYôC’ýf+Ì"e"•}NëyìÔZJb§’#\ʧ¥m¤Šd0ß‘)Rùbö¤C’rUeª²­¤€( 0ßxB 6Óé'biVb[$¦àšYQ c"É_~©xÁJngZDÆÎ’!6}¾U,ÅE ’ƒŒ‘38U\M¶Û©{6±íyÅZ&N +PpähzQ°nzè'*_#q42¼Vy2Yk©Ø=—ªX䡦ÙGQÖ(tÊTÌ…w‹Už¼Ì‰±$5 ôÏÒã7çÊ’ÓœQ’(àŽ=DŒNAljïw¼²‡C˜Ö¼–Ä••Ýn^Bœ/¢d DîÝi×m±•Ê VO»’]¬ò|gað+#|„‹"‰ivrzÜB"JÂ0p`Ćó™dƨCP¼o’²¢éåe£®Xì—^X·mHŒ·S¦JÅ dÈ‹LÒV<þg u#ˆî.YIfnÀ‡`0æù…7ËRç‘žŽ´Ÿ)¤Ì±Ž4‰©«»_ —SœÎM¡ìqöħœZìNº±X—®17e1[>ÚnZØÉ~Ü´€„nœÀ2åX%œ´¥énL.ò èEcOBOkÆÚÔ`”E,²˜^YÐRƒ•U¡l¾˜Q´ÅÂLQ2kLŸ$ $¾J–²îd°ª ‹@å ±tÔ}=MªU]\~]K mìÅÆ+U¨î­´”©0s‹s8­Ê`ZÚçÙä)S¬J!¬ÅĽ¯ét­ˆT¢Îáp€àèñ<¡Åî,ƒFþçú¶6Ûò÷%—e=âÜÇ«7ø–SˆTf1t¶}h0ݽ4Ó`’䢉WõÍM˜‰I ¦F5]lM’Æ!d°– Iôë*VByëgö\äV8U(Éö­¸ d®Ï_>.`¯ð§@„ЏõRÒŠTóÚì'oFƒA!ƒiBr‡ÅS<†e¦ÍQ?HZlKÒ’)†VK0ƒà”‹I Álr=h+Óq›;Š@BTÝG~xŽ–ÄÆ™¹…6Ì2%©(‘æ—înI¬3-‚$ˆ F±‹åu]gÛê£ÒÃl©lšÆÁ'µn…Z؉4U ñéõ-ÔÉÁÌ1$;ƒ!=‚y«¯ò*­Ù9½†Œ6Ú-ȈE»6‡¡Ü(qYFC4¶2O?Z…¬©ö‰CÏ?tÒJ›Â RÑýÏá*@ÆËEºz‘ )ßvQk'ÂÚp‚—Ð1»UËJb©O£0BŠQ qÌ9­dYâŽ]ÔÚó2ç󿹋~ãæz¨ÒµÌ‘ @§AÿÊÒ×n/Éó¼’V¢ÏåhÌ#Kè…7ÌYžt…/VxN`)?!Ef‚¿™G9©&oݲl^nçˆ@¯* m=$ï|Z2ÒR‰ö«ŸPÆ q-‘ø’r]‡Æ«3#¥„b"ö5öX”¶æj±Ì(†K…ä³*å…&X¾’JjjþÖV•ºdë^¨ðˆ²ŠñJ´‹†KûŒžAšQÆ'¯ÊûÃò£©lÖߪë—þ±h[¦:HL³W Q Òè¢=+§ ZRí¥•)â^ J¯Éx2}O2šF8²¡ŒÕˆv6ŠÈ—G(´Nü¦CÓÇ!Mj=¸GÉy¹îÕ!Æc-Î1ÅÒˆ+çû¤J ù<‡W6áꞦ$ûöú›œX«ÁŠáF0í¿,©L.âWAï[DFSD1=~åã! ‚‚ 6·6DÁa>·óÄ §ŽÃ"9Öi,–,zü“Û¶qE)ºº.ýÛ äÄÓÕ3ŸÅ§%„péUîYL—7V†¢Ð¯d;¶Œ‚©Mô|BWŒw°®r¹‰AÐGd$²%÷ë-ŸEZmnx]Ž#¤s•º<ÑqO¢Q4:ŽTŒås…-Ô]"”’ã•$ãˆÅ œÄÞ­˜·ˆ«q&3‘Cç +‹ñJ·úçúÕmG±·©ô ¦ïÓª—¤QY‹øv£¨â";’Q4„OÖCDœoZQýê:H!Vt¹Æ³)„À³dæz–” „´ªsy*Ôâ’`šMÒêM*HÔ…WaLpsœZáÙ,™žù¢Hk¾±fnä%ù‰ŒØ#ê¢7’$ª ¢±iæS7§³Ùðýüê¶*˜!ȉjÍ%í3ÓÔaJfõ!R╾ﵸAšƒJ[«H.Ö\Š”¡6ͲИ%x‰1ämuØîOyURÂçÄôî£Økræ‰Èœ«—! U‡ˆÃÂ3gå>#[íζ£Lƒxõ ¥~vF£l2rI…C'¡@‚½(C0¾[“l4©æ7ªä±0Ò+Y5Ä¿¾.ù$le”ã9F:˜Ó®zJ¯Šúò²g‰UËm¯—iyXôrŠº`†s9¼ôLN¯­lÄ¢'u©]ÌñD»5d[/”ÙO©{;‘fjˆaN‚”0R¡WˆÚ†·Ódãî—±†SÎZØ=…ë:¥饥¢ÊUЄv!D»E"e×Ü%x5l¤o”r !1±[ÿïz^˜·#L£žfaˆ¡[Ùm˸ÉQ56eϧ¹Ÿ”@Æ,BUé%ÿ%_·IÉY‹w©Å9^wÍR &nxJ e<æ‘\M,’BkU;V„;Xa(âc ’ tö/"a<´f³%mèhH%ci³cñí®Œ´zã9kº¹®êÊNÿ}Ä?í@è<ˆ ´ ”É ¸Río¿ìwHG›î ‹“1q9”i„-îɵ1MÔÝ. ‰ÖO3‚1ÒÝe½!5(TA”™‰™Û"ùä@ÖÇmÑB‹I¥¹/5MÎ-ƒho\²Ìº¥-µ&ÕB®4ëoK"'ψc±^Ë”åþ”¬Dºìv$y5&¤c‘,ìh²næžG9Z¨¥vùilÿ 1XX…FtÔÒ݈Ïr:£ŒNn$¶‹C·¶ÄL‘û‚[+Ro_çPŽ”0RoéŠ|Љ&h:Žk1tUÍ©¨à–‹¹UNŒök7¬³§E†­‚Fu. (±!ì9Êæ™Ä&dF¿×H ‰y±¤³ó;2¥>zŠ˜OŸïý’ºíµÊ…y(.µÇr%ÅÁ*ò$JÑ‹/ÆÒÄ ŠzÏ„Dá&#»mÈM(GUZLg#o –¦›Íß!QE T¬¿¥¢RèC¡Öb:9_D¸a¥§H@õ?tâ'O'?Žø™¯8«…Û£øÊöò0¥ÃäŽdÕÑVÚ-4¬ÉÄÆâ•¼ß¦Â‹¶(!œ’•Q?‹ê2ó,1ymAh5™è앤éÓÛHÅʈŒ!R§e%¤/yJSô§2np”šD’BÙˆ¨m}Ùêû¾gµZŽ“ŠžüZ§Ñh‰®t …:™èmFg¡­ÝŒC9üÒ'IÜ9ç„°p¢.ƒ„Zì¯PCgAM’»åIÛÿÆgi;,#]Ú…‰„ñ9F1996ûI,§¥YG%PJ¾K›+¡©´7hærõÝ)‡¾Ræ+ûŽ „÷M(µ2׈+†(SâÐ/“ÊÌZù„!°K,k_Ìü^3BÐ=ŠfÎ꙾"g£¥5ØCBnš”{C©f—cj¢™=ȘËnû¹ƒe[;}¸céʵ {\Üþä#Ýürçþ!/IB‚ˆŠ§G’ºW©(ä;ˆ…”ò¡ëúÅ«:Ã"QhÒÑ" Èh*!KÇʰèV‡E'e+d²ë‘Éj}–¿²òí(VÎÙ“8îšûµQdAJìf*Øè2Õ©(ÓVÚÎÌ#¦;=¢`Èo¥Fã+$–à®%…˜ufќŘÖ1sOÏDi=Ù±Îɲj”æã”Dl9ôÓL#÷cÜåÖói)J¢)ªJûXŽƒoaÉ4´QØôID)1Mϲ*}˜î‚%Žõá6Ö)_ß¼Qo›>M' Ò¡ªŸúÁ[wÊ"»Òë¤ÕT¡‡DìJ¨ºkŠR“K‰d$z Ó,ä[¨¸dÊ×RUËXáÙóq}…†<«Gd§g„e„68k¥05Á‚†+f9$“ÎA„ò&Š¥S¯ö:µ¿v—Cmb±„ꄉ˜ ®u:ÑŽ!3¦ ‰Â¨ˆå¹üšr3ª9$ËxÈ5tMúòSšž¿!´!EoµZšyÊñ^c0F qy¢û®c®Lžgä”ZÉt#ùëftÑeÙŽSWäUp©¯ªC.66¶*{½úÝ1ý|ä6¹DS AJM ŠÆŸ"H¡ÒXkWÖ„¢¾É"Ý úÑ©”(«É"ŽAO¢æã29uë ˜Vr¸M)4N¥)^VLlZÓc"’ë˜Ý¢±9Nr1ŠEÑ>ˆä[‚œžÜF’²qꢥ 9— 饭«è:—qŒ™{–ŽÌm%–½˜ç[ª§T½Ä­Ú¤z8ä1G»ÓFB%Åe÷V7þ15«¨g©ö›ZX¢LˆG¥ÚD±¸Ì"´‚¹ˆ‚¦cc؈Μe«{ÞB‰¤— ôBêZ–Ã!ˆGâoñ0œŒPå9ÐPƒÐ¾>œ‚ňË_âõ´È·)h!°&Y}-Ïq AÑÛò*DZ“k*غ}›nYE:Ѫêªüe¡·.Ž·BªUˆBñ©ZV˜Å¢æ"y´Ø,Ñ+Ò1œ*9G-UñÅJ˜Œ—Q‹M­[´«,ÙMay¯Õî®3£=?“¶ËìØ3YùHåRn”&*Rê”V„B"—„®“i™c‘Úv•hGÿ­)ܘr¸fáµ ™lcäé´os’Õ}z=ÏWsº*1&m䱌øv³0èdª ¯¿˜†>¾gJ„& ߪr¹ »ja\ìGb!‡E2F°µAÈÌR#6n÷ ¦Ü¯õÂw*pÆ$cahÜ&&ˆw R‘2n&­ŽÄ9jmWßë^ëÔ9‘%NJ2»)+›üC(áÅÅ/3ÙhåB›—}'EÌæc$φASt²ˆ¥~z&êÂ:Pw©¹ 6Ù¤îDÌ!”Ö¬›7øQ´EfWv#·˜1WÈqÎhßiHâ‘FiÔZ—’¸j’»/2ãÙjæ¥/“¹*Ú(ˆÕK'ºÑ]XÝ1&_xiÕŠz:дâaxÖu3z¤V!h)#Þzõ˜áJRoëšœöH˜¤ä¿/VØoFqŠŽªœrbìD¸÷qz­Q qWÇu‰E5?…Jßp£‰·æ¥pl-Ç_FÓ}î„f(R3¯˜„¿§zó gÒˆ÷¾úm;u"X¦üŸˆŽ-ÜŽ'’;Ú•8ÄC ø¤‘ʶJªéZ™ü÷ó*ö8ÉlË2ª9.¬eÒ* è„Ô±—®/²_8MÏ°Ž¿2ÒY„r¢Ì·++ºm8‚¡Š2Xm1ï·¹’¾e_><³IÔÐåd½.¥â«D1I3˜ÅéXš¤#˜æ"LÛÛeKM®JQ‹_RfIüñÒÝã¹ÅÇ+¤¸B»¯#2røc¥ðR¥èÑÖùyUÙÅ„ëW=.RÆÞ‘Z…!Rš~豬"š¶s"ßÌ7PœS‰sÌcݳFÎb§¹yFÏ5ß•d«Ðr—¥§ªaqQ¶Y4qD-'’]¯Èg0ª®Ö Ÿ(‰=g šE2hN‘Î,/ÊQØófºf^¤L\ŽA4¬càª;ä…ôAè†N ¼¤m¶(«^(„æEæEj¶{UÈÈ%Pø+¯ˆ¦jo6!2²íM3Yr"ÜI3BŒVÁŠ•nTÖT\…B¡»ùëNAyäµ,¨ñ«Ã`Oz…8‚åälìˆâ1d!Ú–a‡¦JäÙ qÄæ«­†“kS•ù Ù‰¶k6ñ)$2‡Æ°§^oaM¸aNLÛ& Txšì„¢Ûó;Mê®näB¹”¾¾4¤f£Ñ7¨¹&ïör?˜â3ýRBúL†n¡êƒ>Ì„¦ÉªÅ5~§)^Ú}cm*‹ÖÓÒü`ÈXÛO9îä+ª¾Ô©Q•}òˆÔ˜âª€ÿøÉ˜ Nþù…ÿÌë_÷çüÓþÁÿƒ´µø¾q—Õ¿Ö†qùÛI%„0z°ÔBguˆæ&ÝSMâ9R”)DnEÓª–_D3jomÓQp„FN^ŽRõ<¢·n"šËò¯#¸—ãâ_V´âQËT¢Qv²*;xå8µïATˆ™(B*ßr„'ÚD2wü„CÚÓ{ –éŽÅ)B½™4ïÖ)WŠqˆ¶7uIfKˆþ‚;›…ÊêIš•kqs›tOHF%‘¦L®×»ÉÒ:Y«AÙ1› DÒÓslϼ†+ ›:&ñie;-—9Ï]¾îf7;#–ýJc•ß¡ˆž• ÚN)]“^¢ª§ºœqÉêîQo ¯Äé3_Ñ1·ú]\NJúd‘¤>±±cˆà¨êNìéLìD!J`§¶~g_+%]Sÿ)Ë»º’‰A@èA GQÙ#ÙD × cBBð­p¬ò2æ&ØóŒ apN%#ºO’) FšŽ‘~S–ò°t¥!g˜‚!^ÐßÄ£N„ Fb Má¢Y¨§!j8YqxSƒÒšõ.¦)†"0Ž0fJ%Aiö a<ä0C-îZé_­¢Ë–30Fïé ú†1¬Ÿ¶\Ͳõ:¬ …vè |‡áÂe¥j`‹Qò/“ Q!©¢°~PÐAŽ¢Ø0B_Sƒ8Á„9ÈgQ]•@çª@#9O(9ü„&uLƒ*ŸBD ŒAsøA„¤`€Â‰j~wðÂ-T Œçr‰Šª¬1 ã¼# pã@LÔ¨1ÄN¦ü¯ü7ª›µxt&d ÇîÐ…áZ¦F Ç¤Â?S °¡Üs>ø¤Æ: ¨Ž# bI døÃPJ\ HÕ(*Y¨ ™ì:ƒFôH¸·âá £b‚ ÔŒy´ÆŒWÏ¥0V¨))\IpJD}rqàŒ€HVJ4.hæDc¥Tç]1qcyÐ#RnN1¸Îõ„¡UT2‚N!s…(q˨ø”X`R“ ¬ žKÓ˜4ƒ âÃG§'`(åÈMCÁÎ :ñ*“¹…( a `ÃbŽ>cŒl%ÆÊÜ®u fd(öà09ØL ¬„äìy‚VÅP%©4ÊG¬ÄUKP¬®%ñTGcÂá¶mŠ’tĤ¨PŽ!©ǿ8^$À†Ãk·Ð&Fš˜†2!? ŒhTýÈõâ•÷ HHqh°Þ÷<@"¬†ÒÒPBh¡,0л¿mRÒCáû[JHŒ%Ðú:©˜ Ru‘Ié;%Œ¶ç+ˆq U0Ã%³!²ÃR6ÊÁÛT/ G|,JK!ä6à q":9¡ŒÔõYŒ@a€ØD(`ŽzÂG ‘Tôç¡\áù(lx-J¥C˜ Ð# ‚À½,l p!²0,hO(0_3•Ø‚3;%—Å¢ZÙXÜÝâKI …raRÆõæ¦Q­Å3dì‘Um!i—£ú[~ªŠùDGAƒ m\fОƒ"b ®lWŠ.\x*/X‡aŽŽdÕ&0A©Š£p׃''¬41JÉ”Wéj„A#‚ÜoºqFéÑÌ›ñ˜VjÎjw្¶³˜‚§`i.ìbBSL•Ät¥ªùƒ/Ï™XáEt®ˆJš+åÐpŒØÁ`Jj©È|à $0!óŠÅFè/WŠæE;@/^Œ(ãc!š…Ç=7A"Ñx$ì§O±s„ßã)Ȩñl¯´CXZÁƒx\’ºäA‘P´TÍQÊÀßt€Ð´¤Ä„CH5P³Ñ6 ø1œX=éxhs”¤bå˜0D]2La¿A„Q0Ì)qY]lïÖ"#•©”*˜R±ÈF3\3 Q›+b—Ýõ$CºTàvRì’® j…O»Ž£$ÐÊ4%¦àÔq’l•JU­e4ƒ(×–éPRoÙür¦Ñ¡ ‚SưeÌ ;ûÍÑ×›†Äz¤œG ‘køŸ²iYÊ*A‘IU—„ï…áv *ÏÛ‚×¼BË ÐB·íÉ|æq&¨sgbdÀV)bu ± I ÄQÔ¿fbQ›;t@Š*ŒÆ r™n|„ý1è \%šÔàBaw’r®¡ÄK£5/^£ð…[âé—›Ëì^šZ2Ô¶u#”‰¹ýToblîèT¡2¢H-Ëù‹vWÚ«Ä£iÄÂV“ÇÔLD;™nKtåEF±è]I›ˆU+:ä«Êɘæ¢IÀ•nôF%׊X¨—(ÄJ⩬mreKE©í1ÑÍ–·ýóÚÇ»MÅc;<¬ë”ªØ²7JK1ù„¸Ô>É´³™ØŒgô>M]v¸ê;N¬WÕEG²ç *´Í‹M#m!ªRX^5¦—:ˆ¯D˜¬ÌŒM!`Ç-jn7o'ýÓœë”.žh›¶u!´7š¥º+URÍG9˜+eO¤Ò>³“åÕhÃuöñºâÑ|¯2„&‰¥ÆdºŒÇsП–õ•.üˆ”Òq~¾í2P¬E_οP±™JF5^¦Äê¡BLÏcÊ]AämLCru·÷îJ5Y(b±2»žS)L6¥´ž·$¯R‘yÏR}r™”tädöÇëÓå}sD0‘ w¥IFgxÅTÎËSĪ¢8f1Ѽl'}Ñ ’…U/õö¹±œ+2Š%ÆÍmJ®Ù|ý&[tV2Zdºª>!7ÊG©–1¬Ùfû÷é 2 œT£i[+]DNQ¦IËDëKòÄÀŽb¸èb’8ýh”¹J÷t¢äÂBxg±¤^gÏÓÊ&T¾žŠêZ­Œez²UzBgo9rD,wÕD"Ȉb~÷l‰ŒšèUí¢ŸÏ)(+2YöÛ³OeeÉ–f—O$}5cˆ¿› \šÌ&It``QHl¼4jVQ!X ‘ Fù·;Å$¦ Êã>’M4úu~B©Ñ|Û|¶¹ åQ’J‚–‚èÏæâjþ‰ºga‰B«O?>™žÆA¼Òûëfê—¢uª¢$aRvP‰böóóLÇA'¢wïÂÑáˆïbðßiºe²T)lM= øÒµIPbG^²¼‹‰îË3k§é÷|*ßœEšÅ[º™(V&ep›ê‰TT¯¤©M¥HªõóRöYÈÑ˪¶ÃD< ‡(9Ä<ì±okâÎà0)#M¤,’,+åH+øšùjë´ì˜Q”y0×f‘Ÿ‘‹È'Mó\‘Æ1­„FéE5Ù!M4âgvÕæS/¸z5‘(T&b”õN»N¬S`²C['r !Ú#©s%ËPf””·ÓMˆ%Eªˆ"Œd®î=p}4–JáË…C¿˜ˆ±^FÙR”?.½Éç×¢5._&U:TÒ­JÊ â8’Zƒà·¤\‡ƒ˜`ë=ÿïò©g9R´ž'ÌÁ¸Ð4» Æ6ÃŽ)b;³Z®åPP< /8,]0ƒtâ1FÏ¿ ¿ ¤ÀpqÅ ’ÂS¼%{ ÷(qFqßÿøNñ^R –• ”Ëõ–©Cg³=f¾Hó)! ²î©´RYTï•ûø[‘°•Cõ¹(F”ƒ­ˆw-¢Úl:ƒŽå •…ƒì0`R0à@cµ™!`Û9oÌ‹#‰Ói2Î2 »¸sãíŠÏAmXQ醱ۅPf8±vJ-…XÆþm ®8)N&§W,J;ÛâMOÒ¬v%¡¥zTgVÑÍ»–~`8!"Ó« ƒZ 8cÔ Ñ¤bÃ|É'Ž·€+À 0ú8õK…U•šÜ<ðªÀaÉHBI±BhÙ±>ÑΈ2‚žá2¢g¥PH‚U4¨7„’ŒӜÌé´ŠT (¦’MÉ ‘®å3(‰X„!\)JbÏ5î®R3ÐÕï8ÒZÐÝlŠa± 445ƒ†q d$(A„€Òɨ”©Œq <#•"äíd"{^j½&•i”"j¼A$%PH£‘(LÔTé¥T¸²2É Çc¸æ LZ¼‹åþ5Í4Kÿµ@€Ã:'`ØTÛ‹FíBô•éˆ, …‰BƒDù€ÁNƒœ£ÍjÈzU!h;ˆdŽ ¢@I&'ñÌ«r›Ýž.¥Ê65%U ËxXLˆTÈ¡Ÿ}§Ÿa»\›#Êç[Hj ãp†hªÁˆËåô£–±FÁĨ»ƒ Z¥*‹YÓd‹ <¥B‚Åc®!hG Ë‘Ké#L4³<Éåy®ÓÄrJ,¥4Ï(ÓW¤,9t‘@–b±¯Á’W(=b0–èrŇ(@Pa~¶Ç‚díQèåaÀP@hö’Æñ p²tZ¸X@OcZ¯;{Ъ›âTü%[a)µ>IGÔˆÄ Q^q‰(Aa€`àXÞ£¤HˆxÒꪧ7 cˆ$Û²‹$X.s3ZqÇ_ðXM*3Å ŠÑ@@Fß²ý5%òñôˆ4¶$…5]s q•l±Ëpâ«F¸ôO/®šKDN$iù!T±iÆÐJª~’i.R´d‚¬užü;Tb$Ó38 "üJNèJ%Qhʳ™îÕ&‰„&Ì´=f+ óˆrf¨¯œ8$6% ¦«j¨Õ ¯E*É‚1%`åtþ£ RtÎSIÈgªÌBQEÙ8‘dòŒ/ùˆ·q¸yºœ+Ê*ƒ‹î<¦±Šä;à¼ãËxÎq¾IBHbŒâ) ‘¸£VXÞ¼v80Á¦z¼³CuÇe:Ä/yu‚þì‘[TAäk 'ŽL÷!I!Uœg~HB¥†(CÉÌ M¥lA³^Q§ATKÊú—àK@m›žt÷<Í ‹B°„‘Î:El9$&„!no!) 'qÂ/9¢"‰/Y É@p"[¹ù:ÓaB jÊs@zŒ!!úÆ©A€¡Â{å¡aïvᬪ:DÀL:zÕlÝ’Y­Kkè¸öx©ë¢ Rʤ¿˜›{ð,Þf “.{B!)Òü€B¥Ç85£ ¹;)bÚY©Œ±b(8AÌ‚uä-쀶š¢ÕPLãI,€[ÄeºÓ©j…pµ+ÿN–¢V‚PHÌ#|¥\ÀÉõ)ÂsêÄ>­œ_Âyg75$µ°gb¡ÖÞ~Õ…‰}ÆG²ˆ2x„*æN„[²ÍÒEX’ á®»ÔÇñŇq‡–å–”°!©BØXƒœQv/‰Ug„á@óô ÝÔ˜‰½ „4E#u2öøh$Y.û6¸¢•zÍ[Œ)Z˜b öÃ: „/E¾Í"iî¯aèBȈᵴDeˆ٭´D3úÄ%ÂYDkÈE¬èTp€@9afÂÖ?N‰[êðF“ƒíob7ílÑêG@óå\ˆ¿• Jìç”veXâeBœî®Ó9"( ‹?’SÆQä­e9N¶ÔB‹q°=£BE¤ìÍIМì â©ü¨QÒfR¨†Žî“Õ¦ÚS(E'™BHƒûQ.µö3Šå?ÉHô1ÆpÍûJ,ú-K]k•…à£ñi•='ƒO)”,ê0’‚0 iÊ• W7Lñd¢¨vkF„@‡Á×{ŽÊ-ÄäX'J4¦©ûõü"LvÑëb+†„ ,ãM8Þ¥âÅŠBjrN†€ûU¥C5²G½ù’‡ó’p)l3Êÿàé÷J:ûê-gµÛ¾)¨SŽk‹+<"LQB$=R¬YR—‘³(a0,ãËHÆT³”°0CùóO>m9ÊG… ½;G6U¥&Ü%–yâtôBÌþdŒöy²ýLüDwÐŽsS®$R´€@:Þn4Í‘&¥5”í3Ê]°“¦Ö ø¯ PÔ¸ÎW£Ð®e+ÌTÅr!Hì[ÆÃU»dýréW’!æ¯ÅBè„SŠ!äÍÞðg0‚fðä/IžO9BPá^0} ’Íy×R“ äIV£T% ÆZÙ"=ãLü©)È2îd§óh·†ï® SX{ˆö`FYX‡©G,ÑÅ$€Àà zŽÆ¨‡›¶ôTˆÒd7c(Im=A¡a%*챌^h¨Á§+¹˜Ä@1 »©5E­ s6…&µd#¾é“äaHBÎÚäÀ—ãŒ"nçY3DÛã¹5‚d†gÙe›^ÏoIÔÊ(ƒ¢‘ÔÂñ‘ÂïƒkKæxD%IrÜ}~ȶ¢Cæ^YuÈ—1BÝ€E´ƒŽ 8 xàÀÔœ±¡cÒB@…1ÌBo¸pY- ¿Žºa9½Ëúj …"ÌÌ2<èe£Dr™|¯¢’åšà½ÒÕ4Ȉü¬ò˜¦jë;|¡&#úÝUTšÓºôœx”ú]¡ž®ÒpDûu<-ã^ R!£;iînrE9ÐâèÄ.¿Îx¢"ŠK÷1^ïwE G‘¨ãi(ßœ³…aA<ò8A¨žHµÛ Äv*<‹¥¨Ÿx³M"óÔŽ(RýQY.€¥12Šv©¢U•T/VÜ{7éi$ƒHdGˆ‘%k<„»ŒZ 4YÎ,ß ªÂ =ƒµ#0—SP5M!h†IUW{hŠJ´ñMÚ7´ÒˆÌÅd¦z)~6ÒÔ¶4¦Í½TeINˆhÄI–²'…Àé `:ýi£ê`ÂU°@†0³‹üÖ’ÿ ’£Iº”4AH,Ç(8¡’Z2ÕºÅËùãKF¡8§$é8Ïv\²G$ÿó½é3²È|r'©Z6/-ð‹Cª‚œg˜MbôXÒ],NÈSÅaÁ"’W¼JJ>v³DÍQ¨²£QYëÄÙn]e–ÐÚ†dìFm»°†ÖC(PRCBÇ1„ú¨ð²ùJt:9S8ÄÆ“I-ÂP”ºW©¾_©%^*ûžbÔcÅyÜTð®Ô©Ò¢s„’y Nc,õRJÒ•k Hâ}VVqL¡x‘‰2½~<áp]á\r Š0™­@óÉ =nWW„Lk’ëA„Ó˜3±nØYï—Ná v¾:RYbßPD ôNO£(n)èn†*Ö:4ékY­ËKöˆ1¸*&¯­?ç„;Ì»Ü]ˆðŒªIÑØÕYfdù‘°’Ùz‡ÌACJEn“[¡<„@E©dž}ASM E⬢ø=ƒZ~+±^dq"–d þÍ¿Ò9æ$Ž¢$ÊZ‹äD–kN”¡D(ìj³§ÓáëKzÿNID,¤°U2r k&ˆ†(`bVLq.%ü6ñå]#8„Ç=‹Kd{Mi¤,D}‰M¯5ÅmàAD=Gçã!—Nq™(ËHô͈CP‡ñƨÜR ¥É(‹BäÂ~òì’ª–Á¸J>J–_Ü.½ ^l‘®*L‘G0ˆs±Ù¿pi‹µ.3kÐuÅb?alN¯uG½>•R!Ë»zJO*àEñ8…ü¡UtóhôU[)JZ¡Ë8•r^òæÓµ=‚kr¥I;yåG#XÜ9Yˆa ÕSn¢hÙ%_‹«u™¢µ’ïAÕrXÞ*Š$ŽÓ‰R¾ •¬ðÛÁÁ `¤eºibI[wï]?¯igj”±Gq šßÓФ¹tb\D©n_+åoÔds¯¬ˆDÄdjÝUÓÝIÊÔs†U¶Ìür'Þ¬ûg¤vÁ+U0§&¥óÅûùl1©…2¨¬Ë)UrSªo&§™Ny>ºjùD¨¥ñz¹ùEWé”K)»´³”F´³Ü‚7*r_…iýß³4R¤èí^5Íô¤ì¶:Xƒvø•)´J\ŒÉŽÍJT¥£?h*dÌ­+H’6Ö§â.*¼§fi4«d.³ÌLä¢ú×Tû–ôî3ÔæªÄÝã„ûœs<»óŠì#©Ïfü9èôX¯žÕ‘ÔZRŠG5rÒ!9´«Jb3uÏG]%s.—;e=Š·qÞlØæÜÁKÓ Âu1E+#›(Ko&ÝVºKˆâ´ÜýÒ÷Êr4e©–®­Á_W„2ê­Úë¯ ”8«!xn*²Ó”u´­L’·Ìf‘ŠTÒpìäÐ+8„²Œ 4Uè‘ã:G…aS@Œ7¡X¥ËVy\¥J à ASÖ ™‚6ÌÅ‚áöl… €hݘLçµ ò ×aeQ5BÙÁ(F S S‘«‘xCÆ"a1ÞÖ O£d…8CÖwab®(eœ2% ÚVÊR •CÔê\ ÆPÃ@Böˆ¯à–¶Š(;9ŒÁ 2Ái_nølRIÝ ÄÎrQˆJ‹¶laâŒSU9’æC`f‡~(À}tÉ^!šøªîWD¢$2õ[T©\n2q¢1±¶†r”ŒA2ÌÊ)`„Î2Å<ÂÙUçK`¢Q# ,s®eå3 œÐD4 ¤A ê(ŠŽ£H7?©H/ùÝÜãQ+ š …s ا¸1IЙ*“qEÆ þ #¿PŒPZ(Ghqk¹2ó%*‡0qßÂo¤ ¤ ˆ„L‡è×`¤`ˆR—d08ÂZnÑKŠ=Xlm5¡ð|äOp•ƒ)„6 /ñĤÙl@^R{ ‹¡€üzcø¢h0ÈNÞPÁñ Vãê'`î(ˆ.MAdàbˆ0êYÇ6A0 £åP~¹F‹H@A™ÎáTÎÕi™š=&#dæ†ÂQ‘#†¢°?%1*á*½lpÓN(S¹!”ÁN_NØPªên¦Xˆ`ˆ›\í¸ˆôW)IÆ!8þ…²¡Cë öðŒè£!z¾r>ªF+6UÓk‚rdÊ0ÄåeµsUÊþ¹uz×WEknà„W²iÚ]-¨›RQ½”S¦z;µlL”"Øêe´îÒ4›„æ{êD.=XÚ”&¡­[uôby-ìÊýýL!´¦A˜Xu©“d\o3Ž2”ÖoѰÆr9±yÏô¡6··P¶fOLø¬ÊÚW"û† ’= …ÒeÒƒó(cŠ+㈦Cn·?tŸb‘ޤ¿×sHd½ì‹ÆžÂy­Zoϯãéw3ˆ™UBûŽÂ(Ìùbâñ•UYŒìF58Û_¤ˆ†+úVSòM“d©"Ф2Þ«ANÅ'¥^Rp‰"Ž´¿î²bs)ÕçKÚû™BÙF-pùÊ´_ì•шIO|Úˆìþ}O–ª`ÔJ²DÇ0©L. ËÉÊa~¦38JÁ‚˜®¢Á”®âBå 0˜(çå' Es\ÄÀH!ÎÃÓCUë¢Ú“¸=Å rÒ u¯×+Ãa½²‰²`À5©Ù ÂyCÇ (oÓz ¬¶~? `s³°c;ƒˆV‡5Äv2þ˜èÎeÍÈ7d¤Q"ÂÞ2ƒ8Ì¿ž($:31ÉÔ¼+¾&Žâ)«A[h”ÜÜÁ ¤ë´ÄS%rñœ2º ª9ÇB*° â8è#ÔÕA$¸›&êD1†Ò`645®êï‚! 2ñÂŽìp`V,C):0¹Vt[¶dÎ"Ú´…¥" ¤a3Æ€5¹m‹º´•Œ¬::,O‹C¨(P@¦vJá5åд„|% Ødb fh¡àtpˆB±Ú*×k Üã 7Gè(ø«h#äh¼ÂœÓÀFÞ¡gªp„‹g0훊”‹±Rr´ƒ.È]¡Q3 ³ŠÅÜq€âXB ˆ¤;Z2†¤@)á$ ufa‚RFÀMÇÁÊ^Lc%É]£Ã‰XA rV@Ä!\WêD!Â’¨1(°:ž^–ˆn Ž"¤ïUœÕZÖ"^N1|˜ pa±ŽCT$Ƭ|Q_Úiiè‘髹èôvC 0Õƒ*NätcáÁ+ñPØBEuæƒr4 êΗ1b#ÁÔ Î.AÁ 6÷ÊÞÈÿøÉ˜NþDÀw!€7ûkûIüë´ ”ÌŸø_í˜c‚7ëlÂtªašï1](¹SŒj]ÊB{Û~O.e¹IUµå©º\îd í~Ê‹a +cÂ;!Iõ$²–s#³:¹RM-÷bLÒ˜1}{I–z»”ZÓ V4ëD×-P¼JÙK!ŠÊ¹¨‰ì:¦Ôå¡yÝí¤0¤¡Ò/÷œÙ‚<š± j×¼$“B{v|÷¹ŠsäáJN| ÇÂië4`S›…;‹%ÕÒn!±²S=6Ê¿"гØFÎû«ŸÌ)vÑUžštò˜r.=1l’ GÖÓŒ¢"ÑÝ’Ù¦!ýoºÆÔ)›D¾¹’ı‹ÅF“D®utL.Hz2à´3úh®„Ï8Ї6Ëz&R‘ÝY¶ù*‹Û¶S(„>ñò%2D¸ÆdÛ³®Ù:„ŠtYw‘ÍB!…É÷b d“Ò ª¼-”£d/×PýJ3ñŽd­êˆAŒ…&HÉR˜¤ª±:²3*°FÚ‹6·"î —‘ŠUg§í®÷4E¢Œf/ ¦—¥ÁJQ!¾õdwD¡ßÜFRÔ¶õK™Ôš§GÉ*‹f2'`K_ú|w1ÓEdžÒë£LPu¤…Gzˆg[%ÖR öeú†ßÄ8Hõ­-O=í;Ь·û{„‘ÇWsН?*? ã. qL\^ݶZœÆL"²8¹Z.½ ³6“rǯ©”³ÚÂÈC<ÛïÆÄ™u0ˆ&¬Žª:ß&+¢™¦–C+Z1½w{xËsxíÖ£¼²eÄ’,çïá^ÒÌåÚL23åSÚB•ŸÃ‰„àæ[m÷«režÕ“]iEKT7É’©-AÁךܑ›•Ff½¹ÓʦRférs­.Ö5zŒ¶ÕÊùõT¬ÛR2q?›Åç)Õ%D!9y ö¿Q™1Úœ¯óX£+°‰×¤¦DAMblë’”¹RÒVv¬N)ìX„9wøZõ\ô‡ðƒB«"éÚë·!;*!;ZB}L}=·d¡¶‰æNUBrKrÒÍd D™ÿ%Á 1ކa‡¬í DªB#¾Ü÷ç·ÛÕJ™‚i…ÿ´ªUº²Ûz‚ \a˜¨ÄT?yù¾:1ÈFq$!pK # #HùÅ)7ã©EÚéJ²Úbž½”î1ˆcR7T}2fìC‡Atªb3 [â ;{¾è­l,¯K|G§6ð²òíÉù›2,çÎÔ®aÔ1%ʸ)•lÊ”á‹42»,¾b›]ß’\MaêÔ±»ô¯EJËÒ±J/—úP§Wõëý¥£q¤‹íW'“0vâÙÌd*ûë£ÌÒ­%-Çå7Ÿ» \!QͰöû¡K‰G9Æ3ú©óÒÂB˸æU”˜šc½ùDé&¡T¥N`ŸÕE©¯§3Ê…BäRNT3u2‚+­eczç"WŠ:2 »ŠOãºopD¯úLS«Ôÿ2Œ¹,‚ª´Z¬ÞœEÖ£±9ïÕuBÅ",¾ºq,!df‘'Õ±Yve®ëˆë£Q‰“§Ta#Ѩtn Çz3´…Ã9HG!úš"u¾W:'–ÒëîÊQ=ìØj·“]§C#é›AE"…4eŠ)ÌR~‰¼ÎIޏµkškR~Ñ38v Ï6ÏŸZ8éDF+ØÕÂH”°ˆ‹š¡ùmÈs˜ÊbZâxË!›s‘ò’9feÏW*9˜„·W’B¬ÂöÍÛ5PŠ´/Ñ*V2‰¾å9ȇA“Uj ˆ! âW#œG-7[Y¶·V’ºÕìZÑNÊ·Áj¼1qJæÂY¨Å:+µŸ“HbÕ1*XF-­+ºTs!Ê‚O|˜’¤£Ç{>kñf9IE”Rõ¥á0—º°Îd:ú“®ì˜úbX–v&ÝÔÊCÔ”3’©Œ‡ì¡zœC)yË”“EÍMwªÈ+T¼ŸÒ<¨’¨Ùbî!ÙËÊUr6ÒlF\C• _Ĺ*1Ñ&–K¡ÜÒ:: c –óŠ3‚.÷ Bg¢*9аµ¶Õ[ð¥!E¯ ¦&êÌíWâõTeâb»=Õó·µí¨aÃ/õlišÄ°½cp䔈2R«u˜rœ‰­G ËšœE&e›s‹{Ö¤ êOˆ@‹è¹·!Œ2LdõÂ_x@rjÎ’ð’ö»REówø—{’Ce:Tº£—T…7„mbR>X·÷Én”UwÖÞêË~뜘èeê›°˜Î¿¨Zãy¶ ˆËÚtr¾‰|yf'µ%U©*ò›Õ*ò1“ÊëªvûY¶ƒ#%;Þ6ïÇB%v—Î;§ô¦) AUyøGOMPâLõEõµo⦴ŠÅúéÓý¸Bz•_-œ•“˜…"°Æ&¾#º¸‚V+zÊü9EReÕ¸”ÈüR/UÊj‹¢n%d÷æ±üNË0¤cY¥#êhNŸÖdÊ!‚ˆM:nvT9r©SrŠ!¯ä0„šâ¥ŠnzܹmØÍ»>ZÿÒrý~¡ ˆ[ îˆrŽ)ê^ançAqŒ*õeXå-OÜQlüBý=Ñ1R‘-Â/‘”§¿Õ0íBœDY6”|ü±ª‚Œä/wðÑp´*ÈÅ;²(]¹JȇCFQ©¸Fay2Ôlêu-ÖJ ^¸í…Ý¢~#‚;Ømrî”ráí!E#Õ3µ¨¨äî&JIEê=óîÃ*¢`©´ÐA# ª¨†Ei0]:ʇ‘J_é=Ë·u»ØÙ­òøë„é3f29XD+bùRÔ+óR2°Ûä"$¯”ëM«…~ß²QVª™úÏ\Mu‘…°øS½’‚•Sé¹%—y4Â5Ìî׌‰‚UuýÚ… o7…Zè´*Ï»6–vy¢Òõ eé >UZŠ%J¼Ì…M)–*¨¯É.ÙJu:N˜Ä›ÅìSx­Šû\¿Mâ9K˜ãÉæå`ª¥œˆ¼OEŒYH)Kíc1È-Ï2p‡-Aéé¼]9¢¡“˪‰Î×M*su¨J:ÅI)h™ÛG¨ªeªb- F2,¯E“Žwr¥ÄU§ÖÌUS¯=t·a=ó5(MªZx\~ ´M»ó¥VfDáÈhìSR\ª…C–U9™7¶òª©ÞˆºÝÈÆÌê™OÒùX®UÈ‹¬—ef)§CHÌ*j6Šb“ýù{ûñ“9d..œ»ä˜X¦Î1ß{+³0îMú踸"aÞAI¯\n£YÅ. MY¬‹v®¦Œ¾”R­[„kgÈÖJ“­jJÆ,äÆfJlŽ’3VUC+«S0ì#œûû“úéùø;÷%ööog%»hF.¶çÁÖòð$ Ó‹ —bŽBÅqBAE¢ñ«+„Ël­R¤Ê' è\¯Dµ»h-_Ŧ`æ÷vÓ ™Ë WlæÇóD!‰a¨¤ÏäKÝ*ç©`¾µY§é]“yÈ÷º…,ª ¦ê o}úG± Fªk—vîôm2k]¥ ÿÂo׊1¿ü™¥=$jo˜åĶÉâßgvÜÑÐ~Ø„c»• 3€àágPBó˜P±²Ó2êl6‘û:˜%I/<öžT™zQ’PÎJ,:™T)šFto¤£PO1ͦ=ÅÒ(¨‚1ÅW[W“;‘ù˜ŽFÓšP“YDè_2H^Ã"­&Ñ£lˆcôÆÖØÄ! ÷}˜”Æ&Ó±gÅ)Deã ¯jQÿØñ;å”ÿÛMN!ý¦+\÷ÁÃŽ3ñ'’jæÖ“ ¥b3¾Wƾe͘™ùØý»ÃžËªCs ¥ÖN¨F}_üŒö.uëz\érÎÅSD:ÔIyN*ÌÑES‡òÎÙé=Î9ÑUVMáÒFã? ô´\¸˜¨í!JW—sÛâ03/‘Ó§O=‹©zÝPÖ±©n±H­/ØE6…âÁJéŒ_ó*¥yPªÚv¡_MÑ)Y>6ýH5ƒá3w\SˆªA!JRd¾J+ƒœ†þNÖ–ê3©xœú[£jýPLídfN㨣 d»Ò»¾zHT-- ˜žáM¥£ÒLff¢!Ü¥JDn4^Ï% #PBÿH+Í“œ”’›H{ ÿmö#Þó„[¨\JAC€áb؃m×ÞDf)=ÒW£”ÓÐZ’i)HܳesÑý ð‹B–QZÉ¡Šª[¹Z¹ð‚xôÅ)Ù"âÑ=ùë¡^RéBû]·K+^¥jØCa ¶zË[ÈñbÕFHµ5Ҹ”Dç#$fÚ~²“Ç`¼L£—Ø–Et.j‡´Ð’!e%O¯aŽS¯x‚VÂÙxŽEß(X„uòU´»·âÜÝçãOÂÜÞ&o)&Ü˧+­ž 1w¬¬iÖê¦úu&Ÿ´(äÒ1ÉÔšw¹H‚!b˜#KÁœ)9š–ë’›èÄðU3uÛí͉(Z Ëœ,eºöÖ"Hä)õTgIV+l×\Âz8oûmp…a$q|[ECMQ!Â"·a™Ìžl&'$vß 9ñ¿« 7ž!Eég· qœA_ÕAKcHëÇ©\`Žë›¶$AýêåAÊT-?³ÄÖM¦ª%$Ï}X…²SŠ»BVå«—þÈþ“•Ź ž-ÝÛ9N–Ä»±Š#q{é\_UV8“°e¥I:vLê&a%Ÿ›à±© G7TãEä†m8¢¨²aS¦’ef“7·,Åb³Ó—9p%'–ö‰iW?d±¦©'¤b–+šf"Õô¦æÔQ› õ¨Ò¹Nƒ¥A\&„'k1‹L’f+«ÂÐndÔ©‘u±t5i£;}¬Âä{8✤AŽov¿ýÊé1ÖSîRºÄUªåq©qBÏëä¯!/‰—w+›‚ˆw(w<¹#ˆÉfúZF;Œü”ÝRH_ßÝ ¸]éj-Å«´ÏÌ讥 #ÈB¬ÆX ‰±œü\‰-bÔ«)bQ²T¨ÌœN®…TÒÊîú!6§ÚÒShC’­©ot0i Z‚v£±æ%Šj«RÄdG"§ÂªÆ¢aW¹%K]{WËtföbïæU…{Ó)"2ÃŒd–•G ³¦ÙZF"'ïe“Rö'×>&Àÿÿ!ðä"÷ࢿšÂ)Oa„ýA_Õ«5‚òKó¾—Ä\ݦ¦ëËsrm§Q®ž»^ê*“ˆU~ˆÞ¥‘_w*U3a¸¯¥gs%RšbÞ‚yI1±ûœ×Á Ø·L«ó×ÂäLV¤ýèßKŸ³!Ü0ÜÒ ÞÆbAiy šr/_P”IÎCѹ’„á¥ð´¥{r_Á¨LpšD6¨Ê2RŒ2Gv#ðæô­ÊŒ|åÊ #3!Ej¢êù­_^«õÞt±¦ãéyÆ#ùS½3µö~×*§O_ ÓÙâÑÒw@¥âDëU•BŠo„©SÑœ‹WæÔ¼¹Û<õ¤c–'cK¦Êª1!Bà¡C‰ ¥;ÕAÕÚµÓÌÝÄÄÑL] ¥Át›¶¡sTF·VcõÌ®¡*Œì1R¢TQ(´9ÿy·´§.þŠ®¢& N©;Êš1,”[’µÅ5 aÜ*ÿ tË–¬_§QåÒa…íKQÊœó!’– E•òŽJíu½MÍ-wˆGJSêœt+½Ug!TÂ’ƒ2÷0BжvÊ.zõ6J?BÓD–^Ži¨¥ô‘Q؉SÈt9L픊Yù2—ÉÕíÀ§J&à³qxø„ÌJ#¡ž*cue%“IªK ¤N5“jŠZ'’¤Ã­ÚÏQO9yWrWRÉ]z(1E˜¶.’Ϋ‹bßúZYâÒPºTÁ´ƒ QXÚP¤xÀà@6ˆËü›Ùe+H^Dª‚Së%kþywi[U±+b™×× ˆQ„8fªïû&d²ÛQ(~”D)Iê«Ï¥µ”Œ‡t®Ô¥ÔÓbó• ¥”Eõý)²©Jåò5kQ gÂ&X³?º |.Ÿ`Ž™¥U×:b~HyÍ÷Bì$ÖŠt`ŸRÚ•Œ^v3šAÌ#D‘DÀWxSuÈ©ÂUt³öözÚ¸ØônS¥ ‚*ëhÙÝ—hT”V³ÕŒD© ‰¿dýâÓç²ÌJ¥·©–iXEãT˜:Ð%v!¶Ô^L²$†²ý”Í"щ7‰¥®óQ FÒš’ž­f g(ÉíT3* «¶ÂJÿ¥ÀšŠ‚ŽR«%ŠoD3·nc’‡ æS·~ï"Y¥yZ—u?·HZ}kxXM¹ ‡¹…õ¥ÂHΤu(ÈqV(–û™”i¶)µÖeëSQH× §ãäžM¢O_!|sÌR›‡”•JÉ­™>>szÄ|̱¿È›¦0RHG+ž~6á,AÜ•S?ŠîÙe•S¨l¬j˜K}ŸÏó½êæUT² ’  kW#ı’ÂáÖwûŸªØ1l¶ÍcÒ‘t5vbS³U(V:1ˆBˆ['LZ;x¥ÍB3ójû©Ó¥Vô,¬”-ž’SȺÙd³²ºêo½IŠxBë‡ã–Én7M´-VIÛOrJeuª±øF£ 0ŽD1WS‰·±&Lîqg¤’¢©mw§Éf_bª¿‘ˆR»g!¹ÿøÉˆHN"*_Ìzkž³’í¦¦ øhËy¸s^¢vfv•«RÐmjr½Ù¥"ZÆÚ„‘é9†{–©ÜAuˆÎçiê ²W Uv#gE5 Jžã;˜ª3Ä.[0¤Æ^³ÔŒA½÷æ!6lÝö':Ä[¯9ÿ[=b”Ëì}9,N'¶ÔªD=OÚOže,®äDÒ* [‘Ô©è!„wóýÞ„U1l¥)½÷rÒ//ÛɶÛQþ‹ÌèT÷\ñ!DAlMäöôkv%ŽžW?!pº¸9'Bª)JY^bãè­ hU=MŽ»èæS5j/‰Ë”K·Bț˵J1H#:âı•RµrÙ–'¦efzÁ¶‘¾ešª“•J‰"ó©„Htß$ÝdDéͨM¦cnz*‘9Oblµ­¤.ÌB„ÌnÕ,窄Q’ìFí²Úâbô‡J4©ãÓmcyFY ¬w펩›3¤­b_òËZ…¡È‹*¯våxŸ—#ù ›ìÔc–qH—^¥mî•1•›xœ- ¥\ñOEë¿e¾\˪¤ÇBE‘}Vé2X™N%.yV×R˜™Ò™…ær:Õ_>ûùS5ñMò2‘¯ÊH‡•ܼôÏÍïdb0ì1+ãP=VºÜë"r%÷I8žä„4‹âuµ×Þ“4þÒÕ{ÄiTë+"×3×dyŒ½†Íkò+­ åNw³å3[Ô¤3)=ëMÜ®ÊéaVËÖt3NSÕåtÊXNårç”{æE-GçÎ}nÚ!s¶&Æ`¤)"‰å¿´=Ô0e‡  &à–”BŽ1æcªã–KSˆö(¬2ÜRò!jDK= DeÕÇé7©ëÔPþ{ #ýɨë†u»ˆ Æ4¢ÊŒEÇ—©bpá.r¿CpÍuÆ;HD(ŸX™ZJg)ƒ7&\V‘MZ¦ AÉÉ%>¼'xF÷ò*#¬¶ÔòàÆ9. …ˆÎ…¨¢Øˆ""çîé?ªäÕ-=ß2dUIÏÂÈÅV”E„8å&ôUÍyÀKR_¸è!­%äÊ¥U TTFŠƒ°³ D¤cÙ‹A1©²˜Ô|\ÆWqdâF”1åu´¦E]Å©êB^¹få^~¦¦3èT™ j×i—Öª Ec"c\帓¤ñöä9wIµ[<¯u£dWS dÇöˆ`Ž]j&ërŽQe |<HX€ÔŒ±¤r"/)‚2Š:×Ô­rES±øZ`ß%Þäè@š÷ÚKSHøž¦r·¥‘lEõáKô8bІ;B!—WJhÙI¢O‚Š­DW £â"Ìv«„"}ùqUQŠ&çc•øìR–¢è¶ÌÔä_mÞV­‘^“5â˜J­µ á†EKP3ª‰[Vo€ 0ðÄ/´‰)Е3¡:Š»U\"*M¿Aü7ìP"ÖˆÂR/}“HK0—*VÍ+؃!šúBD9jõ[ieXÌåÏÁdƒM,ÊÞA\ÜJÑ7hÓG"xjr•Ê §<Å™úW¸m­$YÌÉøB~‘x"ÌË+U°õ¢N`žYç“LuS9ÛÈ e˜Ô=)Ûb‰[›$vÎW|ÙØ;NÂT\Æ6†…ð8㆔¬o˜¦d\ cr 4Jèa¤"Ê–¡‹JW+þT3w´˜yéY %J‰™˜7–Å•GC‚A%Œ‰Ù(„qz×z R O§‡Í>ižöÇ/­ej˜o4¯D,È`§:oíÆï[ê۾ƻa“w)…òâ*J'm—"å9¬GNƒå@€E üZ–Z¤$€ÔRþÂm$^ÒÄdƒ¤(‚ÃCÐÔ9ëÀ„´Ò3}nOµeÓ’ñÿ6žÑÿ:ݤæ,E¢Ò©R©؞J¤@qý¯»oKž¨ÀŠ˜œjêëNR;U×<ŒB—ˆÄ´š-q㮉y…¦9ßÈœï©?ßÈ·q“îš…9ªyj‚–†Šb–cìa&Ñ “ø 1¯vHm멤,RÕ–äP`°‘& û;ˆòJ~SC¡°J$ôó‡i6m ØÙ*¶áI»áF3Ÿ)¬ÑÜ íré+°£l ý ¦±¡d‹’ ¬±FCFµad÷DÉfú±TrÈVÃÔà ŒúwѪ|?X@Ìe7ßäÜ;¨¥¯É1¨¶%ʃO¶˜i§!M˜*PAܾÔeÜjô 4 Xj²ÔŠ[fIHƒ!Ž9‚ÖHTàµ{+ê¿)¨eGÔ._ð™f°Ü-{ûz/•Ž¢½ W3JC[=”ŽIÉADœôïæßöCý3ÿ¸VOÀ* {AùÐá— /@h}¨dœ¥?>-‘'ŠÁ%"Ïœ¥S"@ ÊyÜ„Š'¡„î£&e‚°8qú/¶!¾ƒR âe T¢hÁBü„Á+¤)e/‹ˆª6“ 1qÈÑJU!€Ÿa‹ ¤%l®A^?Œ8ùÈ$ÅþñÊ"4 ¬#PLF¦„ (8¨B¢9Xat¸ïbþ[N?ªT@Tð=x1ŒÄˆ¨¢b…X1B+²`ƒd"Œu/Egr9‰é*: #¸â„P‡ «þ†ÄÎÀ² Yáûqˆ q(ÌjĹ…®lÆPØ‚¦*¢N^xs~yÑ÷,Ü8¨Á_¿9)˜C àføÂ `%âØ†1Á¼Å_ʇ#î[yfŒLÄ R=Ð5fI‰@”I ¹QDPÃA1D;ñâñ%7Ã~j9-È<Ø4'(Þ”…$%·¨zøª“!\&b 2ÁPQƒ ÕF ÐW/Ãz9”¨ÌpÕ9΂®Â¡(b|®c `!“2`‘©ÎF€!Ƈô"ÀR+ŠQì‚1ûCñÅñûL€@ˆHð˜0›@LÏj ŒxäØL9_…ÅJ’°°™Â©Â0ÂΤ{Ç}›ê1îQDqp…a J3qº’?Ë„³B™ƒ6±Z1nràõ’]JRþpÕ"ŒrcAc[p&‘êC0ИPž C µß¨;¡HyÁËûJ!@Ñ­C<Â`ˆhœB1Ž' ™¡Ux¦ ÜbðÐÃ|Å£`Ý/RZ‡§"O¨8Br;¨SJ£ » MëQLÈfU0¦ ÊÝ”?óà0èZµs\?;”$ìÒîcJ ©™LˤêAÀ‘,L9:>Ç:·KªKyÉŽLÄ””`ÜF!N6N¼lÝ” #eg‹P.®œK¿D­ý ¦W 75+œfÄŠÞ#¤(¡Ð:ñÃ*(D !ÎåÝÑ „î¢L–4û2T8ŠxùÈ@o;‡¥AŽ˜ …È1ƒ0™Ý$ƒ| ²¤ŽA–Ç£«á|B¡t+`À»ŽV^cgЂ² "1:†^ç0eJ" M°Isª«ºÄл8Ê@ÈY).§)DøŸÁT‹t:f âY˜Ms—…æ ØŽLÊf8fuý*^ª¤„Ë ¢Õ TBdX`ÚV„L0¸C…EãD¹Æ·Óô~¾ÂÁ!!zúpž½d8 £Õq…@–í©‹Àƒ6&#•ùÔí© B Ð**Á¹8MåpœVS†`È”Aê™GP°ž H$Ù‚e#J«Žh›‘)„, !üœƒá¸¸¤— ßÁE•|æKA†%"@¡°Â!Älz|ˆäc¤&•ÁmÊr¡Žû½A)Ç„ÈâA‰F •Ž„H¼Ö¨S* ¼Î,¬bq…DRtªXÄ5¶=™ Áù)Q÷äå äñ†"ÆÕŠÊ3=¨˜K†È•m93™ 5ˆ>Î3„V/:ž”3Ȇ!ª1ŽÔ"ã!(ÙØ¢ Ѩ™†èA[æ-EuêE6€úr!ˆñ‚!ÌXÃw„VÄ©¨D2 á;°€¸( Ø8CpDç¢#‹ íÝÚiF'j¦‘žþ!®š¸Aaz1}üEˆ gzXì%R¬5><» eG³›q „A)A bœè@H‡Ã˜#T«wÇPĸ/ä´ûˆ©Vœµ R­dÆùÑ…¶iMQWL&!Ø„´#kÇ H@ÃÔ ¦Åc`¨Ñ‚å"*#Dœ ç9 Ñšè Âb!2;öhVå"B%à¬pÃþp­˜nOª‹!ØÛN±>ûêD÷”äæÐŽ€•¨¤[HŠ¥Òwõ©”§Äª&rÎI%;¸øyJÌZqÏ^Í7“˜…ZµÜLòV˜È™QQYFl ‚:Ÿ1ñ ù¸ä¦Ü«¢õÌB!?1¢¯Ùç)™ˆZ±4Å‘äwD"p˜â¡…µ¬V*dI휩‚;ˆ†°œèÊ«-¤ÆnB˜+?!ÉDvÕÁh ¥7ÐtT·ˆcˆ©¼OÙn1s\›–0ˆ´¶7a*¤‘¹.E‘3WÐï\ý|œW¡Jì!E¥Sùfôôk™M9ÏÂÑJWÞ­MjùTt¶™ õÑÙF0”Ö9<Ç27!<Ïâ &ÚB…f£‘//JbòÐè[mF+wŒ¼V ´‹³Läþ Ž$æ"s6—·™é‹dV'a™•°Åöè¢=¢ðŠªÖRÒf¦Ñbôœ1Šn=™÷ôŒçÖUzŽ! S#±*DÄt.aj¨Ê‹š®”îc—õ„òJ ©Èø9úž†“‘ŠmÏ2mˆQ ïNSK‡û7,—!„d͹ބò*ó–Wteÿ3œS|ÒÖz´ V'.Õi»_Yùÿòb9lJBHʶL^Ä)Ú—3Wå!‹Š´é~SvDßÚÉŠ¾zy +òéÛÏaNÁ>Ç/ñä3]l˜-èTZé<„zU=ñ°­ V[æ;e^ë•é(Jc¥“f¤…•KÒï”ÊBºe÷dUò¡¨²Y®)†"—HÍy7ìzç+S×˨ÇL=;\ë{íþFÊb¤úHÈÆ½;(:ª» ùO{þR~+2sä¤ì{ª%¸d)ÜÅ+*!ÜbdÝGn\ªâ²5©‡Iù¿åfD;‘êf1}•— ŸJíÌuJnyµõŠýjãúÊøRy–(Ê™WG&ø¦R„27¦ [nYšJ"!²M8Ò:TóêáÈf?÷ ·r\D™8Ìa {SD£X¨O"ÕDª k^h¢iÓ)zZ϶ú;—°qH=’qɾiH´¬¹ÆíLŽk·r+ž˜×…¹ºäMÀB½~#8»˜¹=½„QüQ,–¨ªÓhª×®˜Š¿@é²èb²Ò®Ë¥˜Wjˆ‘‚¨÷‰ïsiè!+¼B°'b•OYФþÙ•´Ro§ÊdFJ•ßËóˆ]u1½2aðjì“ yÿøÉ¨ïN N Î  ã | ç ? –³’uÒŸŸ„ô0ÌzÈ m.vÚêD7ué»)—HúWfÌ<…¢8sD¡réÖù”‹0Ö½ù9ŠÎWØþFw¾1<¦¸CüZ¼'(`BÂ@„„–u+ï9 HX( ñãp„‹Æ f\’è¤kˆ@ãÇ’!ĬâŠú‹e»ÊO ¸„™ 2”Ÿ —ASWG­dóòõ.—B¿˜_\b¬Ò†5JZ±¬~qQMÜŒšEßE5bé·ë½ÕÝ›bsž ò·âÖu©‰"ÆKpQ‰%CÂIE{šç®©ÞýîÍõ§’Èsºë%“ܱNíAÉ(„¹k”£YÌ"•íj=Óä%äÔµU´Çæ#UÂ%ÖA–uUÑhS#7*’Zű?Ùlþ6ný’EíÒHô9EY•ÄÆúR¹ ;·xšì©†R„¨¾.¯ü±z…-óD,È^Ìc&¹;‡Y a‡&1pZ‹ô¹ ÓR/¶ñ‡#"•×B\S9ÆQTÕËHñ*ÁV’ÙOÒ óK_F|ôM—¤$„]ê½¥ «ü\äÒ´ˆE2/#2—Ý⡊D¥,”³œTËé®Ò‹EÑ“Ìu¡?\yuª)N/0·³¥®3ƒŽE‹·ŽÎ¤AGÒ *¤´™J×ÕDMU&Uy©[Ñ:ÙEó–Bu|Â)S—8Ü¥ª³9ˆ’?Ùôů!ê®&æèò½êUFÅc虇 ¶: –9L[±}Þ¯WF³¯V-'+ ´£¥dIŠô®Œ¢ iKvµDÑ<Â…nm¯O&•Ùh½FÙUK-j¾»2Mií¨C±N¹R„ …ŸW&vˆ˜­Åzš5­fwÊÒªŠó\WѺÄf;£Œ¤NN /e†&î³å8¢ÐÑd&æTI!ðãªã8îÒÃ5í辕i>‘ *SUU÷Ù ªÑ(|:’n&j Þ.‘Ì”_*HËõ'²|O½]îÜtDÇÿß¡LTìÆåø¦r³™VD[?ð¯ýb¹æ­ì~CÿÍQÄË]k»(Ž»Ø}~1ç+û¸aYŠÏYâ}L!+¼V¢´ËÆ‹ëÕ}b)$·3¹ÄÔê +H¥“2Ù"ýšçC“«™2ƒwÒÄvsr'Y,ɤ3²õ½ymêbútA_]N¡ •×Jc-SƒÛE[»y­! ržv³­c8GjÅIfÒ[Î"¤ó‡lnê}ÌU!X‚†(…c"˜)a€C ¤5@MQØk`S–ânb' x›£v#‚F!«†)F4:þa/º¡Øa5›zÁ x¹T`Å—t;DÄ3`á  !@¸üãÇ0鮤)B‰ýœ!(ÃÞÆA3q’Ò¯%;Í›ls>C•R1HG3¥)f !IÐÝ1#h1†S}hPZð„⿜å:31P©ì^$:¢dd!†7ÑYˆ”ǃ0Èœê1B, ×uÁi€Ê8aÊpÎó,P—x6‘¶hÓ¥§†5)Ö‰†Ò"Œí`#YÄcO‡~"”È3\®‡´\s’¡B;½$+ebˆ¥L" ˜G1Œ ‘T qÒ(Iˆ°Ç¾xAÄ:eî8ìÿ& D ¤,t@™ˆí”1ah„<·Š TÅí¸BJCÐ!±RÈ ÈËDr%9™'ç'û¬-1FîPÌ‚¸Ü€Çf±6dÀ”9/8œß{ÝÈõÙqò¯U+6rÒÛÄãx¬Á0B9˜ÁŽèU„°Et ž~u¬ºÂ-åÂX'ˆÄl |‹«IIŒ„LA›¨‰Ý leeKQÛü«pŒAêP‚v2åŽÀíö"L*ɘ*ÿ*!„¤õ0õ140Ã1¢yi} á3zTs–R1M…ƒâ+ù”jŠ Ø%%]€† NDvxcµh†V<,$)G$a¦Sð´çÂL±OS Äq fHÈ¡Æ!ƒ(Â#/z®!jeÔQSðߘ|aDŒ/Q8B6"•(òñ*Ñœ…">kÙ "©0Â4ècšRe:–¦E!ÁÐp‘˜üEâ±ÃB¹é„ãRòá• (‡/;芈^Ýqˆwn *ÐMÿøÉ¨èLúÔûÃülüËüïüõüû´"„]©=å‰ü0gųqÙòpá\HØú(Ô/d*fZD™)ôÑûîTaêSm~äù[.–©¸F‡v&ªÉ”Ö›'ÒÓE¥‡j$Lb1 a*Ÿu(¬sM¸R¨´:е¢+äÎC}í<²òú©Ê´# aÔfæBg`î¥S¼ÀÀ`„§°c¤ÜfU¹­o¢'îצà¤Ú/M[_&g.uêŠ!NÄ9n%2ÈUC-‰\ØQå5l_Yf!ÛQŒÍ:çm+Vò1Ì8­‚üˆ*?'5;ºÍö¯ªç'¦—z¬Ad².îéHr*ÿTkŸÂµØ¾ÖÍYzñ){ê&ÕÈ”³1 ˆ‚¡ \T©JÁX0*ùh#êÐEþ&±öÅËçW‹µ[µ¢J¾—-JuÔ"å/1ù„Õf1Öâ4Ê//;ˆ^.eûk‡«U%Úë´©!…×N!Á³Bn”ë€âK,§Ú1HÏCvOÜ®ÞäÖ5ÜÔ'׳LB©FYÄôÚB‹ç—-˜Þ¦ÒÍh31V§S¯ox¤2¨Â˜O–óʽ¯¹Ø¢-yìšÉÝš½y¥ÀlϬa…ô-ÐŒuk-\—1F"”“a’º_˜º„_<Ö{*=;íLâ"V¼é´h©"ªPŸªT*Ýtee*"PJ©p¹UÝî+2ŽB=1 Â+¸‚Sa}ʽ‰²ofœËÉ5¢I£½ÏÚa>‚F-Ü‹¬ÑžÅ08˜'̤ÔB•‰P¹˜žK—’J‹Ø¼L“<ôV–‹Ž“qk’ ¢ªó¡ŠJ* ÅÒ%}»ÙNÝö«:w_›“â%P’»+‰R£6'‘rûâõ–QQ…0R=¸DBIÛÔê“t_Fl”E2¦™ÌVÈ«g±/a13{þÞNûŠR°—|-ÐV³ebõVrݵY˜\Õ Â>ÒC>C˜Zã‡îì)$J¨bb@…Áe¡¹™†fOá®$ƒ&¤ò–O<+õG‡-ÀǺ‘˜$b§×L2²𘌘ãž?!ÍÚ´ö¸!^ñDt„2 ˜u Â±ï¢¤ªìVEa‰4(I„RIÉ‚s² Ý)¡ÐU"·(×ÊB”ÁÕëáo*Ä÷B q¹¸6k1†& !‰ÓÌ”Í)Ii7~JR¢¤wéJ'f êˈadÌi†3¥È³ÒE«iP¬Œ™„B-ø¥ pĈ8ªnL¡òáÜhHîâ+ FAS—S#O 4 ÍÍ¸Ô …dþããQ?`©Åÿ˜)#!3A1 Ü^X0 äùq²yXÄñdªSš+ƒÈ2:frP" ×˜€¦ñ«º–1‚\Æ Ù&] ÎÂõß5󄃲˜$j!(æƒK\¨¡b0T*ÊÌm„43è„!B=‚¤¡²QÆ,1È&vÜšŒ*‘ôvã¡U‡1ÐÀ °˜œ‹ pD¤l'£™* ÉL!ÙIØS 0þ‡p{×ñ¸C,VmÂFR.]•šDª3¨Ä —™ÑFŒ¨Z(n% ¬Ö+b“àgÈtƒx¤ئÅënDphà…%täZÁœÞÃmHaÁ¼ºAåk¿#'„ˆÑlÔ蓦ä*vFÐÊ0…¦I‚b(œÊד!'5î=h<ûÁlšÅ,æ?ha.㸊!’ÍK&`DÐÚpˆ]ú+hS-ôÎT&bF›½· ßt‡‘Á KjÄ8 ê bq‘…v·áŠ#Qˆž vé±ŠŠ°.8Ž"ê#7Cº_ã/ T\ei4!0Ea¿•}·:ŸÐ¡*†ÕS\‚um"u6çÌ}oQŒŽ1LÄ ˜Ç3ÁD¾ ¤·…¸µˆÆ»øJ4ˆÂîZs²g ML(F¦ŽŒ¶OŠ!n;K*#DQ ˆ+·AµD(صM¹úªœŒ¬ˆéi› Û$̨HÞMá!'ô 'Œá"pØäËô‚¥;²}âÍÓÌŒÓ"¦Œê™V¥5ÊØW‘zІ¢ÓåIÆ{b5ë³ÀXð¦Ae ”Þ!Râ䯴’Ÿ#RÄGé78¯eq Ú¼þÍrèø”!4Å£a˜¤©Y‰íì} c B€Ä0Õ¢ÂÈ^7K Ô˜FXô—¡F sÌåÌ9B+%¡æààQcÒêì:¯E¥è«’bÕr¿ªrq8ÎUó–mF±T¯Ó ÅH‘r0(Nz$y¯ÐŽaŠH,yü¡@¿•Þ®AJB:éQ®„S}VÙ͘ôb~£âúYŸÜÒ¢âÔƒ7…¤²g¢ ¬8qǵ,‡«ý'Ù»Ú¢}yaqGJWihv RŒ™÷™$b0\NªG#¥2Nþ•uTˆ×®ššYeìŸ3d6\UZp hh-?ðßé?ïU ûéT¢‡=ˆJ¾ˆ2Ê!BoÝÐ%e(¦ð•W ¢ÈKjá1ÒÖ+'Ù%5¾£7±awdBÂQ…nhÐ6è1ˆL 4û†Ïôärº„7ÁN½ Š h¨Çë ’: yÂ( 2´Áˆ0QÈ„UŽ»^F>sºCaç,s&@Hª`³ý…†B åB‰WvjáaäÆÂŽ`‚t1$߉lì¤ ˜ŽŒ,$C‘Õ´ð,ë•5V[9¡-ŒaœBJQ¹ð™êš2'*ßùÅi:`›1FÏL€Î%Ph4%–-RFÿ zúŠ`.ãL®!6!"а,ƒF¨/Ά*˜hŒárÛ°¤! é 6«Äj0{|N3ˆ0 b›0§9* ø %ÃâT%…22)ĸƒ ŒiØÌ#ˆ¦e3êÌㆫ¦¡ûŠSù‚nÕ=Âc" Bƒ+‘°i‰¨ªk$ˆW¡TTQŸ¥ü‰Cøxg!HÑ­&(&+*)#à©åbT†i½ Ì£3UâgÙQØœi}ÑJ¥q#çÇq!ý/”‡Ñ‚h;!a†4Ê8ÆA3‰JÌÆZà¹Ð‚°âàþ xV FQGˆ Ä75ØÐFÕ&؇FsIÌ¢HBŒ/—.”iÍù…ŽN’ù¦‰Ä°MØnÓ°Ì(¨® ÌE¯—‘îÌ„IB ¦JA aCKJ(O^hÔgO‹^=#á©r«† þ ‚f!Ä@3.倆¥E3 Š˜®¢žé_ANágTn3AˆƒŠC˜€zF0@ý؃"ŠR£ZV"èª 1Š&œ•£:a‘ï" ¢ª‡™°„ãÔ,Î# ‚²U¦êƒ Š„ .ëÁ¡ÎwÈ”9ÌE&¼À…8Âø‘Š)‘Œàæå2s† :; †Z t0ˆ´S§Á…LòAèˆbF •ˆ9˜`@…Ut‘u¤£XB Œ¢ Eñ; W ‚ pøa|Jl@î †쎵5€ØÛScNÈÀ¼RŽÜE>ÐÃ'x!#90›ø@éžÖlOŒ.Iñ4š@Ú(ÅEM±ý£;Âk(ˆîª¼Æª*¹6ùPˀΌæÄ¨tVŒmiÈÖ“‹Å0‡9¦C¬)û,R[ ”N;,B$„Œfb`Ю&•‚Õ˜„ÁÌtw¸çȪ+;UgÆ¢„åÐU¨›)FœÛt¦$#Ãb8EÇJªÌ1†já§Ñ\nÄÇ%vÊåchŽxä ºõù ÁYy%0„/¢„c!5 ßl|aIÒªªÊê®`ºŽ*s+*„å &lkÈA2ïÍÃ`fR:‚hw ¥î;ø…«{!$È™HxÈveÎlQÉïMItœã6!Ã8™ÝdÅ#ÔÐìjB)ŒPE ¬QáŽF§‹Mߎ¤cdø†8ŠÄ`ŠÁ ÊäX0L2°Ü …—æ•ä:†Z{Å#‚ðv¦nعÉÍ bhL† BQÿ`Š3Â6#ÆdxqAé $8šžS |{#·,fbÐŽqª(¨ÅÃf©K’¡·²hØ V»‘…™ÏHd68ƒà¼"¡æs^Z²òºS:&6¦D dÇ`ƒa ÊÀŒfz´VŽnBÒ+Ýã”`ûh•E20R¡”ƒN!À˜ÆC„‹Æã!1rª×ÂÒ1¦½0!A–›’Çy+C›Œ"8ë)0ˆcøAj2ÜBÑáC¢§˜| Œ׈Cs:©«JЃJ#*)éWè¡N©Ü‚†ÿRr!¸@bÕ3£(ÎÑ ÊS«î‡ŒD ã1z× ª/8“ æÁ–·GH!ÌQ„9ƒ!‚8ßÇ+Vb$*¸ÇcNÁP6g) ™ñP%]N‚ ¸¤¸e!5qó+»Áì‚#\":„0;ÀÒŒ+´È €‘Pí+IÙE= ÎàæE˜»†¤´Á)Á(@Žb@'D c¦(Ф‰$ Ìö„J¦J:•ñú«Jà@ÂËÄd¬jî!á ƒFä1e°îw‚n)‘"¾ÊôŠ,Т0 ¢%cþB1\'ÌR2…)ÚˆpbU[¹ µ)¢QHØ2KØa‰ð¬œSezõàv ”¦£;GXŽ)¨0jæ€g$¬¢(®ÃBv¤1‚Ž¡ n G~£ñ“ò’ERF,áŠÄ&p!Â3±h£;‰äb»‚£B\t DwT&Ñ¡‰†5e0&D)ˆ"IJW`ˆ±’c—,aÁh;5D.7n¾ˆ«‚Š‚êÎJ2­Î)x^¦ª¦ ”L–¢GrL„1’WDDÕŽÚrP˜Zõþ¸”Y’ˆ»%k'0Ò¾ŒI Ž\³&{¬E™˜¬„+Š©äíåç¼¼C¹ÉGO'ñGó v‘é#‰s?ïŠë§Ê(„ŒFu-é™C¯·‰v×i”Ÿ‚œ®¸üµJÍŒ„Þewü"ÿ×Sß…!)Åk=é]Å1¾Â9Ý]Ššå3#¨ê2o.^e2Û¾žý×(ÎÂq3ɉ†[¿á["¨…5 Uc+”b1n¢!Û?Œ[^N¸Í#[¨Óº›ù¥§ÈG‰%UTJ$¢¨ªØubt%È7÷2…!mkqŒc¥¨IŒ&Sÿ•^Æ~}³÷ˆ!5ü˜¸O"bæûeC]Ûot#¼†QÌÆI2°‰H77#‘h„xSþóô(u_Ò÷ ÌÙœ¼ `Ô a`2¨N„„OŽBäBYÊN¢ ØHö)Ø¡P”F`Ÿžš™{3ñÇD5+°‘­ Dl$0ÝCÙò6bÖ‰Bš9¹ßŠÎáN/(Û•å`í Îd$V\ˆaŒ ™shÙgP¢¨rß‘ÏÆaìjAPÔ+{£tBˆr jH@ú Òœ^^ BBÃÒââÒA…Z|.h!ÀF5¼Á½!QLÎÈÂx[X.þ™ÄÑ c|¼0U„‡-›Æ1K½j¨n­r(¿”ò +@˜jC`ËL%Á¡…;(a8@)è¤ !â†< ¼9Ûm(ŒNQ3Lª&^ l dÂi/¸X=W0Ðt|Š'áwó`Ó”q ш0ÉqÂC\æ@ê'/ê& ½âiMŒ„rpÂF¿3ÙÂäX@†éÏ׸Ž)Où8Rœ0ÖEˆE3EjX;#Fàa¤+ì±ý⺑ Kà… «'’*nd%‚ÝW(ÈøÆ4na–¶%¹¨Ñö œœbOÔÿ‚¢ž°%+Õï—R%%d V.7H)Š*\Twº! ¯+ÕÄ"H^] ‚ždÄqpû·¬J;RñuWKnÍw ï0‹wî †£ª³%›ÂüxMPŠúbήfËKãqhûé¨eÍÆ>YåU¹š¬â®¹ë…ÖÎÈÛ²Ì^)<Ôl£Â­œ† …ÒaÊñ¤ù…x£€B©ºŒa7ªµ¯Þ0EÀ‘²„#IMA#(…6NúÇ ¡6ñŒô)‰‰<ßU‘“6ÒZ™ª/k-ýJ|»D»".^WpR‚¡Ô!ÒBþ -£BõpŠŠôuR Wz/kÖ‡j3ÿVÄìŸú¼Ä D&F#„,By²­)?9Gß5‚d‰1qÔ„ýå>—¤ßv*݆¥+;i#póÔ}{]+Ÿ“ž…2+9Ä-^DK´G¸€‡-é é#å—ˆÂg™7D°k^.‰9º%¨Ýlt~B9Ѿ„9‰RŠ0ã‚ .`eA¢½âXŠÅo!î^XN'—}±©µb%D«7’˜Çm'‡xë¯Ï!•{‚pž–VDBÕHË2»žß¿ˆôB抒¸QÜ9åV:ÓžÕµzõêûKÅíZfämiÆEs©$-„H‚¥‹·c£ömý)J˜÷5­—˜.¡|hÝk¦.Y0µQd<@qÉ þ#…SWÎs_%ØHÛÁK$«Uª¸„ëS=DïI…òQÛ0ÌJƒŒUò5’•z\¾ßF• ,áò¢™LPÆ$ÓeEÚ\Az_ª 0ÁÅŠ^ˆÊŸ~4mÝA·/³íWíªyÆs§Å|¸@â8´ÖQÙm¸¹¦C”ke©¾Ó‡ÞÿýÉKv Òš“¶Jþö®×DÞ¥¯Ñ8¹ô:ÑÇ%é§OäÑK8V°r¬å7u25°”#HX¨«¤Tûà»N&_×({µIªìK’ÍŒ®ˆ)ÝýŒõ>ßÖRç#霂2ŠZ°\ËʾkPl($¨ä–ƒ0¢Þæ¼óé¯ûRD›D¯9Dçœåµtˆ%Û€ AÂMÓg±VÆ””jÕº¹Sf´ÙI¿í^ãâJ¥;UjBâ„à :ßTŠjèYå*²’ã5x…Š• ”¸Æ.—.û‹â?:eŠqìK’ÑSl5M›K=:/Þ‡TWA:(´ Ë=sX$ßgr „ À):žVÐÕcIZx¾ûDgßB ’>Ù>cdÊÃ00Ž ÝÜ¥M‰¹Kq&a„«Wym䱟w§ wiby:gÁ*AKSp£ÀÀÀ¨>h2÷ÒóÆ´°…äÚ>‘j?Ò¦e½ìm—(³!¯ÝÅ>³™ŒÜCÊõ9ƒ•5ªêŸ#(O‰ ¨TôE^Þé^ÊFìµÏ¥Î@àG(mTx›à L}©î¼BY”íÉ2Ž/³±üs#Ž8³|8¡j»õÅÖHŠ÷> ‚Ag¤ÒO¦§[c<†¸ÂH&™ÖÅ=ŸÅ!‡@T ¡Qǧ^Ç¡Z"Ä¡2{o½H7#$„²ê'òµ…Ê™»¿Ìg-°Ÿ&ï„3~ÌàäÌÂH{Ox²gÕšA!Ã@‚éè´‹—žzmì¨T}µ—*yÅ1J3yJìo+¸\ ê'?dÔ¡ wÑ›wXJR%›ÛKv®=Š•eª;LZ)ùÈ#' iNRÍ×Éù«Nä+;{©¬Äˆ~•îy=7ÞîT™ &ví"RVáDKcX,ýéòåJ(ökY"*QçjÒBMØÎZ­F8 0BîÅJZ©^ägú6¨3Øžœ¦+J¾+rH§8T¡8v˜|m5kÅIÔwS¯Ö~¨w-‚ BŠDª6àçl]ª±JÌ;p¦cã!Bu'ñõɪ¢&Õëí"ZªµE'­S¤geRdÓr9Ë›ïE9\ë9ÿóŠ…!ÈEùR®ÖZ‡§4‚Ãü’¡Ñ\@8C¥NB½§šɱ$âöÖJ–â+e£˜¢(R+ÝeÕ¢Ê0qÖ$³‚&…Ý]’ÏB¬#¯‘°I¼“lß\Sá-Þ¥r5ÔÄB±gmÇ_F(â‡e¢Ñå‰|¶‰Ò'\ƒŒêË‚W91uϨÅO13I’s½› o^•nÇ,™]´JpGIî!„qÇfåg¯}«Lú{Ü©¢Yµ*b’5;$®Ëßï…k;sXaž„¸·ug0"Ž.ì…qw& •˜’*¬¨Þ}¯ó»µ!1F»är‘WHŒ¥ôªu@âg,®bOjdL6¶ ”jx¤9 „#}n}¦T«BŽ‹•·ï¿C §fr)GÎí–Žùt­„œA‹R›†úO‘hÉÿsŒ8€á]]æ&K}‹ò[¹q èEJHUw!È»S’µ1$`¤{TÇS×ËÔ GÁîõ-øµ‰m£X6ç)žÊ«³±”I ôT©§ âî¸0˜hô'áüjˆ’‰®úÏ”/±(úŠ\™–gÃÝ‹^šeT}öJŽ„-_„¾0Å*<„U*ÌîsÒ]X¡4y©k ÈV c¸FSp_¤JÄ´¨käjgÎõ!â’ç(q aÿäÍØ‰QF5ðRŽõÆm¿k f9¨ºK^£eov¹­ù겚ÅqI9t©ò$‰",¡ƒŠ Û´y¢EÍm ª£â)ê¹Ê†z¥8²––YÊO".ÍéT'°é–Så娔s3}"P‡ÎÙ¾j^Zp”?©"˜Rˆ"ö9rÓçÏKá¬Znå{NÖp¬E• ­;8ÈDx˜g,¹JuÎR.®gœ{`zPõ}l‘ÝÖä!ý šW¢–‡q )cÌè))y'Ë|™?*+ ¢'‘2Erø¹FÝ2…+Ôú—»÷wÔ9†1Œå¡'á­ré µG”„)H™õrðiòm¨Ó0‡iÂȬ!³çÑ«òóâ…ÔÊ&9 Š‚dÓ«Ö1`¡ÊX¾02½°IvJD–nß&Kóüõݱý¹ ’´­Y®¤RšÊÆlÖ[0ÁN9RâHÛjì–¯k´Å^vô5y’As™–Í#ðCÌ?!ÿ×ajnVK-lZ‰•Ô÷*”BÄ_!ˆe9DÉ8F/ÚM­ª²§Fa„ F+yj´ùkóIo›ÜB-G'‘J¡ßqŠÔ[Ç!ÛþáJ9íBõ(bl<‰Ïi'ûDÂäBçËr®AŠ[¡ÍeVóY®Æ88ç%ˆ·i/yîÓ_ÚåiØ¥DÎ"¨d=/…'Î͹âˆÚ×êb’G™™H]ao×ìã¡ÐC–AXìM«ë½Ëûm­<œ©)J!’‚%Böá/Û–§jdK¬ÙuÓÈåK%„:>¬aíZXnDÄ+/%Üû&’$Ô CÞÔ‘lÜtR¢>lAÿV´[B8 îDÐ!oY¤‰¿ùéªí"¼Ä«Ñœ- *—e10‚z¦¢ÙðŒ3µÍVj®TÚÛc*;Hʈ̺½¯j Õ®eßÙˆPPb‘jg!ÿþif§>—Þ$…5~9â¡Fyú´e :š-ëIFúïp„‘Ó Ôÿ‰æµ$ÓW-)?­*UVÅ:rs=Óºíâ8ˆ!Ä2£#µ)åÖõEΫRCô¯VYRØ[3/"Ün¸“™K’W ‰%äJ™X¤•JÌ*„¹1›7Eç¼üó*q‡)Ìš÷è“è5;kÂù²ü"U(:™õªŽ~ñÓÌt9X*.Íeú'„-_{j^–êÛiõn“[YÜŽeö\­S”ôs@QC*È’- ¯'GØÇ¨á•H[ä9Ûw»ÉV«ˆ"š’‘›©GÄú¾,äfOÉmyêM#ÌÎfó:+2bXž¢q/¶¢ÞAN ÀaHîãªMúZÝSd¹ô5ñØVµŒ‚" ‡*mÄs˜Q®uˆ7ãñª¾M-œ¨¤®µ¾ ”e ß)ŒänU¹,V)*´IhêÉÊ! Šw,\¬´—0¼¹Ìç£P˜a%”R¥•B4íÕ&Ú«rçJÊF¸CbPº¹m&ëH·×ue|«£gçÑO¥¶5õ8P ÂP…ÌŸön>Å¥oB¡7œ"-Î*tÏ­•,Qžµ (.#u¬”#T·>}7$®‹ÏK|’µÞS=L£:Œˆ_=k¬ªC˜#¹ ¥D§M¼k ·M™>„±ü™b)ÓU¨z‹„àX«þïþ¥þéÿH•¿ÈkAüЙŠW€0[ýðge½Ùvšì²»ô„#&µÖøSiýdd^#cåÊž„¨Ä;_gvš!—‹Š¶b!UÑ3‚s&]•æµÉŠDçu:FÍjŠJ³'I™b­ÚAZ®”1ݶœÈ¸¨ò&±·•d“èg­ÑJT. OM¢Uj¢”ÄUdË1Ø'•Ñqƒ3­) ÏÒµ^Õ|Q“-œ£}µ‚=°‚iìÎÎ'?ÉŠªr^â=Ö¼ÍúÆy©ÎæÄ´ªWåýþ³-*¢½Š˜˜fèózröTì™JIªŸmY…Кæ*¥ ìÙ’ *Œ×̺¯ÔiU_j¼œ_'Ï‚)?,ªåëQD<›ÊUä)U)VžfûÑjv5• ˆZ?ËÈIªšJžÕþ⳸CSñØ¢£“Ñ8QEœÎ2J2ÝD ­@lk ¢“0ød³ 3#1j~¹6SŠ‘ °ÄŠYü Ž»Œ"8œ!„¢¨b±Å-!;´'ᔈpñÿ*+½Ÿ8óå^R!TÔˆ2™DZ¤ž²)Œ eA¢!YŒ-»Qtš‡Ö£V)á„*-H§@¥iØg÷†Òcƒa ® "ÌAÄ!†æÒ¤)”R°p¢Âd—„6ÁÎ)7/ëˆ6FYJB(4Ç52jpaS ã:R÷*‘x¦¥êáþFÆâÓ0€L3'ccÙC(œÍÈ22ÛÔÁœb”´xWÑ™üÚ*÷C#ˆa2룳˜S!!Z7ä|ÄÔÎÕŸ b\Èg1çdŽn c»CŒNN8©p3Œ}C ®dÔÜD*w†vªLe®R«2&ÃF)ž×¦2MB5#`CÒCE‚Jg—“!%³’=á/“t`Â{ s”úQ´Z Ú,"ùR̬WEU9+#FáëÄÂþÄ" PÂÔÓ9ч}¥¿+½.Û¼Jتµ žÁˆGªØ2ÙŒbr²fHÒ­4®„Ïéd1³dêå¼ÕJqvË* ¦/[¶„X¯ÂÖS¥ésŒT¡ø.‹™S®ShLò!ŠJ/ëa†IÈõúåÖG„_Ry5詉¿B÷Ÿ°²—,Ī«ÓèÄk!]T”§qä{2¯¡®9‡B8ÄT'“Q´ô/Ó^´eJÛ׌ÁGå™A ïrJ™D"¦å¥û› ¿)ªEjy33hJf) È&Þ—Jv*9ŠwaT)Èõî¸màÙêB)¨\Ã$¤¢!0ïŠÚË1®FölÎ&£È"êä:=P“÷œž\í×ñïQ$YR†K¹CìFþ-l-6Ø{ÛìeJ¯çº‘¥3ÓÌõAQ.µ®­)å-ßjZ¿!ån Ü·ÚÄÃ}ºjï¸Ç+H&‹¢5Ó芪 ¬1˜Weì¥ÓÅa[ N­–FB.ØN¦¥ü­ŠÙœ‘’í…ZrÑÅ©%ñq‡õ0«UR:Ñ]™QÄó í[ÄâûPÅ2¹&:ŒQJFD}¦ðÚkl\h^µCº„ënj$HŠ‹)Ë#­î–0³—(7.}ÍjÉAx¯))ÿþgªŽyI÷펲Ά* ¥ó9«ÕÝlvþ¾=Í"S‹3uK+]¤ÊRrTÄŒ]F³U¼¾-µJÊ%š–<¤?"U±TŠYÑŒ¿–Æ¥ž””¸fœÂ-3€ƒ«)…L.rœã’ OÒÓ2q¡Šc Äi!TÜL;DQÈxÝÚs+¢²ÆrÓÌQ l (ÙàSäØL0ŒP1»$½!Uܡàä)AŠ E y"Œ†t3NtÈð0á‘[uÁDÙC|„‡¢R°P ó(b§¤;rCÒÀ¹›ƒ[YÁ€˜ĈBýá|åãÇPdf –àÐ"! ÍûfAžv4'·¬ÐHAï/r|®ªœ—;¤€Ô‰:ÁÚv‰‰CVg£jÜÎÎÜ|ÿ†PlÞÄI.!É)ˆN*E‰Ä]iŽL~s¼Y£$¨BµdÈc àÅ›sÂÇ8Ï‚ ؘ&æ¢3†H(‡È-‡X¦C$/m”ÔÄÜfám>Ƶ.–ö9ÔŽ#5‰ºêcèì8‡ƒL„£ALôßÔBq¤9 âÂÊu2ö†¨„} ÁD?•˜D…XŽlpÅÄA÷ ‹ £C¡ a ÆufŒq)?¥rÒˆZ ¬L5ë^’ØìõNšVVÐÐÄr2$„5",š&8ÇC”ùŽR"´&A‚® ‡l³;„“2_s2a#²= pO·ý*Ó£bNb™ÆAã¥À…¡SŒT]¸AÌC›ê±Ô®Îq2„e$ƒP×2†[·U³c„5.Ši@hn%ùÔ"³ u ÆjS"‚#„N5J!º¡ã8…3¢ï3/iH+äŒ!®ßªÔG%(Lã]ŒŸeþK¡’ŽöbÌ{>²û&ˆûRíI¨¬Þ¤r&Ž!¦jç=QSV„Ú>+ª‘½WH+eI7êäˆaØèÔî%*ôiRð[V½SÕNdä· ä-ˆÄR…J¤É„Á CÚ•I‰ÜèO*úªrq™*Çÿ³y’W*ˆl&úêáw ˆ&Å´õ gz-äQ‹sz;禺qSÕ‚@b#å'v3‡P¹?KFÎ>%æÚˆ" æ§Ž1&.“§Þeu®-KrÙŒªwAõ[g.-1”íck§²1 U*qM÷›Ò¨¦5 gã¢Ìl±b2È_ 5:q‹êÕjì‰a¡=ê(Π1`XÐá Nœyþ¤îß-ä¸ÒKXP¬,ô¢Dʼ­ävrαè¤1Êêf#”‚‘JˆÖnFöÏJQ=¼NJQËïTE$ͧ}tÄò)2 cy§eJþ|êA£E%æ”Ã^jœ)Œ™œ³ý%ªÐÆIˆ¢ )Œ~yc ¦>­nÔu“><,OÂ…Ö%ÛCX»ŠÕíYWuó Þ©êæ=%1ˆEj!Öìá¸ýN›â ós“ƒ¹ e2-Í¥»¨£R!+ã«J8AmÒuápô„ñ‚É{NM© Ⱥ\Ö$„ ¡FeûlÎ)À£™…–»[:&ìÓi^ñf -[hÙ")ˆJɵ åINñ\Áñƒ—´ÄKÒe»Ñ— ¹Ò²¿CÙ[‘ØIZEiNˆZ•¦UÏOAž„ñÿPˆKæ² ®ºbŠò2Ô4ï±È#À‚ðEXá iþó}+­­&–Ý&”™JÊ}MJ„q*K¾ë„Q U_O)Ø…#5f[—2ȉL%Döò›ÛtÕ\ö¬´)+óqgs°* 7”b­chÕùjÕ 7¬‚î+‰BÕk…}Á,ÿRœÂ ÑiNQ†‚”XИ„0§fI¢IibG¸pSƵU†ˆcVD“Ô”£ö ¢Ø$ÿŠb[œµ­ª¢øk0µIݳ ¥- #!ñXÎáÄ_ûþj/!É–ý¥©z#g{±u9Ýg¨¾þÈ6 ‡xçQ´CáMË{n[µð’·K_{Å"ioô½cêÁÛï.Ž £³"C•uºh»1œ]öMÚ>©H)ëƒiÀÑ`îÂd{Ó¯­Ô<²Ú7JdSÕt2êñÍvFÇ(„:—´¡ q#­uNäËúõ±°•Õëçò߃(Äc<ÛIë)[«Pâ.ÜA Ä5}°ÖÄUÇA1ÐÖ&SdÙ~U¢ÊbŽj>é± +žçÆ@¥²!Ïéø‘a Ù ƒËt¦*U‡wÑ1üþ¡œÀ8ì-‡F£móòõ>•6–ÒdÕ¢UUm¥JKC!Ë¢Tw_‚dN¾"Êé6ëžQ0²r.Zua‘"Ï G8ê"Êß'AF#ˆN‰%)¹¥—­ö¤¨R¹;þ½ÿXÿÍ€`  àÐ}ÚPƒÒž|$Pœå E£dUR5èñô&:Á†z ÁN©ŒrœKЙТ[Τü£ç!Ò.sA‚ê1ˆÂPH£@ÑÉSTŒ†QKÊ+œ£V¬è‚ ªUÌ|¤ Aq…ˆ1‚fY¥jã ¢êJ ª] ÙÂÁ»uÐÅöN#¸ì7$1Àš¢c;2ÿÕ-†ã),ÆÀŠ ¡ÅBcÔth€ßaHj¬àJÂèó„;¡1ñYP:0ÌnÕ#CD '1MYE5X Ž8€ê£¦KÔ^ÿŒ„8nƒ«ÂÑ``JPŠc ÅB¥¤VÐ`#euTnXS*¶][×qŠ)ÿUƒç[ˆÁ”@gr¡ËEf0…)£VR‘A9y„c„§•ŽE= TæR¤4=ª!NE/¹"¥$`Œ!†‰AÂBfPÇZ8:qBUÀª\¦ „1]F>¤ŒÄFDF$Ž!ÐÑB˜ˆùFêS¡ËÈc(!Ê(Ejr‰#^"ÃTe$8!URGR’˜1b’W54h‡ñ2%™ŒÆ(à@À‰T¹áÝp’E ¬Þü‹o8Ô„SÜ ‘1LÁ¹©FTÄfB˜r)¨¬ÜŠŠSÑùS(8ôРެ aŸ„|@a L'BNLBr :«!‘óŽ‘Ç¼Šˆ œÂ¡GqHÆdù‚ovÜ‚Ö';Š|6ëî! É`~—1Œ‚œ‡ ‘\¶Cóˆ. ¡ )³Ò©XK +Åq? a™Œ…4LZ@È&a86äÐÇY"Ò-BŸ8ìâÖ$^«N¢¡™Ì1ˆØØVŒ!©„4lUB† Õÿ*…Ö£0+n\w†ÝÃZP˜á (hlnå‡Ù'Q™¢#-ÆÉ#2ä‰ÐŽ @ ÜdÏ‚*H*%ç!”xU†"hŒ’cÊ‹  QáB)ØUÀŸ(§ãtÂÎ"4å…1ÏUA`’Òb ŠM(L%£@ŠÂ¤PšÁYbœM /ŽÊ©¨`É“f‰/LJä͹4¨lÌyQÁ¶l)@ˆ .W ÏÔ*ñ!¹‡aõɬtþ Ñ?HD&™4Œj!Á1øôì §dr·[È+AiÂWF_CF Ø1ƒ » B ª.Œc7#„Ø(]E”šøª‰Ðuxã>EÎDq¨Û ÂÚêË6,Â1ˆ8ôÒÄA ¯ñ!Œb± ÑÇU9Í!(Bý‡üÆ|¥(ù„.”ŒD¤S4Fsf# 1Ífs*§hâ ªR°~aÉV|xVsIØa*0Ø”j+ €ÌÌ%ƒ­E3¬ž’~n¢2¡ýÁ­äf)‰a ‚,Óg–Læ7€NQ*$l5¤B—{L!±’”‘J,ZÕ¾B¥ …ºB…Bº5#²1(†; b¦76Â> ŒeÜDÊ~jC¸„ØìWߘ:”nÉEW&‹´c39v>ŒJ€d@5æ_^UϘvQrŠ)FÈS/!ŒTC¸ÐÝXFÆs²SQY(6‚7’.8†˜Çm·*œÜa˜ ¢+¡ÁÄÿ’9cÒ»ÀÙ)ðRqšãtFq†µ›˜‚5C,h5¡rú••i{g±AHx?î‚°¨ê1̶R›ˆžôHÁ‚VdŽbŸÕøÊ&Ì,Þr^VÂŽEDHÈкªâæ"q¨4·©¦%dg@ƒ·¢ebÉzÂØ+:ÌI•ú[‚ˆSþÒ±öZNÉÛ*"1”Ó© fFñ…‰ï¥ád®<>=A‹Dg¸CäÖA†©-º’ÍbJK ÝÓŽ›ˆÝ™~;¡H𘕶d[ÓTo‚ÙŠBV¤­“†œš+gÉÊÄUC†*™k>1Ї½Š‡—%¤Ä½ÿ: ‘(’é­FÁ0 Ún¼ÍF¢)ˆAbW/¶¢yƒþÿÊq±Ù™Ú5à Ê̤A ÐȸfđƧ‰¯S´S)딟™éDö8‹\ØÐIî*"!\´b1±#=L#›TSî`“°%¥ï$tWg• w}Ó €¦FZnÈ\l„›³È1¸€Õ©`}"ˆ*ˆŽBÑL+º¢´ Š»Ê¹fˆ¦*`1¡u™ˆ€ÆtUÓ­;H|#–•yOÿôÔÎúŒS•÷¥¥ªVræSR¹„ó¡Œfæ:»D#ÈìÞ¸÷#û£Ù<‹ÖY[ýêžõB.³IÔgÏҦײÎzU*KöþŒÌAÓ‘‹Æ"'9 í#;}UÙ9Ñ|š”ÕU'‘ÓCúHˆM ñý¨ÙgÍdg.zrºV—I‰ó{"-«sâ½Þšçûìç ï”"ñ6© ‰èu¥GA zßO╟û ‚žBŸw´'\GÒØsÓ“5ZªTN|.ˆ)SU|U£8È¢ýE27iTs°Ÿ)Wz•T"pø¤gmúšU#[l¿|e\ÚÜ®:mòª= Bz™‰ˆc;&jš‹ä ˆÛ#zæüZaÜ™b®Û´Ôú1Žî!\%ðs†Z˜†¥ˆ(„éíŠq Ô½t©ªÝ”€žòÿøÉ˜5Nþmÿ\?»ÿâñßøûüeþ´ ü™è›ñ_솷Ûlweß\ÂH˜´Q‹n!&f«E!¹iT*¥Q:R*Cò 1ƒ©X¨aM"¨5*_–üüÁ…*…n¤˜Äç±–)U›P!ÆfoÓªé-"9‘_WÄç’û=}«u£•²µ½ÅåS'ºQ¬èt*±ùcª¼IФÅZ!kvIDDÎ-y ÂY¤Ï÷«‡:f‰ý*wfeÓL÷—Ï…;m…º]3¶÷D7Ø!^¹‡9¸“]Y_/Ê\ÍZû*“Û Åg¥U}BWh^H&uˆw+ÕU{1ÊÅjòë#ÙL„2f0Ù‹ô¶^É„¡„-i¤çåÚ1Ke£ÈE¬Èv«qŒþÕ'.¯gXâ®Ó/LȵOÆîý"؈ÃUâÄ/å|W=Ò†# ò"³v+ió{JR[·L~#5zJìÙöi¥ ¨I{åcO¸3µ ’˜s%èu¡ó$”^+„*™Ê*æàQÃSZÿÂTZeT{ä·%7·sp‹„ÞJªãùeA\¢#Nb”‚ªù(Æ!fmVãÐîd^ì$½7ò' }j++iv¸´OJ¢qB’Á#NAÌM¶1L»QuÑô!W2kT±mD †Õª£èý¢ô’êÐés3/p³{¥åjvF„C2&Æ£O¨sª&ÌÂéõå–’LŸ%+v&ÞN)—åÄ‘xµòé´Q˜¤t©HOhbÊ´±b»•<˜…Ëù$Æóƒ ’3Møê›§Û™}µiUÝJ˜‰Dg­Ð–´–ᨒ”Â'WìO©¼E*þ4F÷J •Ïöì¯ïŠ‹F*7vžÖë¤TÄ®D×§º˜QѼ•¬‹©ÍÁ)©ÏÛJà¹EÔ,­Odå´Šç+?f†Å˜ÄC‚¥ï%•Ën%_H¯ØVü§u1¾–r•„6ΘäR‹‹ï§1̪ÿê#§™Ív㴴ξ±Z…qUSMêN¬õ j`Jˆ+¿öZåýÑÞ%)aUÏd ¿È~×¹HéPÂ’bãU')2ý1jÉK`ÍÙ«“:úóDÏê÷{ò’Ù½I•7=*¾¾Aß*AGCœ§K:r)®QQ–ÅI™Ójfý6š¿µ·pªEß1˜{ïÑä¶ â¹¶ÄœL=„'·Ê"sâØbã,‚²éŽEëQKapg™ÙŠj¾S­O5%þª®#”BH›A-Iýn—ŒQNÆR¹®dQ(U*niº× R+d”¬NÐ×êo‘ê”ÂÉæìžS̹‰Â9›YJv.D\#›º±•eE:a¥¯œn)ÉÄ1ÏCðÄ£R¤ÂÙˆýœ–R»®¡ƒÞÊô§F©ö!'YQZ¢êyd±]z‹¸Ç«¥üF%uÄ{ˆÎ½? ¾åPîC5‡d‘g1°åÍ+¶d¤d]óQ/Ÿõ´‹¸ôÚE¦x¯–Œ¥vzfà– WQTQÞD]Û<çEÒ$çËW7-™«j%K]ÛÄÂ;—Ý$]\¦aä%ä]o”Ìe1ý@†ÅË1XŒäÎ1—™5лºÂ‰©™Ææ1="kM–×3¨\û¤×4¦)‚çPGl•Æf‚D!¶”â»âôô %ãÛ†ëU ~ÕÃÛ‰w$܆^ê”qx®8êtAŽ–Ф«2h¨U1NRSÚ•"‰nA/š#zuš­NÅÛúI:„¹{?Ä`ïmó¡=¨¨Î9تaˆì“µŒZ«nŒÃÓXúˆä--»X—ÒýMÄ]w­W~\§Ñl¬çr †c!Ê! á ʨÿJ¦pa Dõ?E°Ú²Zž>¹(d<õ\9«ÊŽEÍYÛˆ2 †;”•¨–Oã×SŒgÖ/^¬ïU›(ËšC›Ûy¾¬ÉõúÁHdRš-³O›Sˆêœ:¢ë!W1®‹œ Ä|¡L陟ºT¬s6¾ ¹£¡M'“ ïˆÚAˆÎèÊÄ¡ÊB³Š.gbpeË•Pœ–¹ìZêèôÓÝþ¬ÄÿSe»Õw„©Œ_C«µ3• 1˜´/ÑßDª^¶- K‰ôLó‘2¥ýê%˜Âþµ2“ c•‰ç ”õät$Îs QÜU-ªå)Ù*Äcm%rªæJ^ª‡‹›˜'–GòS+ބ޿kK³­’(AÎXRù=]Õ ÅNu)zº%ü_Û[D—¨„­;0Ó}Vų̊Zöa—síٴǺÌâ0î#còHØ&*» §=0äš¶º559¾Öâ»ÇnĺfUumZ—˜Pdé³½øC´¬¶W1&P†orz>êº#e;)_ÜBîØº•ç§èbêaŠ×Uve9 ‡iDQ;C®‚*É«G¼N‰oQô˜tòý%kÛ…÷²WÞ*Å'*"„Eº˜äÒJ›(ìDPVÊUÜÞ܏޷u%¹ «¤1/´KgýÊ´áH›4EÃMümKÅ;ù_J•Ý+¨teÆUyP…ßo§|´|ÐýL~#€FY‚5ÙÉRä/¹œo½1vK»|­ýñ´¡Ð ïÄ%J!IÆ÷=é~,MF?ù‘¨‡q¢kc^ç2N)@òD ¢Ü¨ôV¯%ÅÛs;ËHš/–«-j˜Z"°’%xQÊTIìC½c¡£(I_ÍžßV©ŒñM$_é"V—›'¹ §©ÿPÇÀÀ¨{ušŠü×áqú¬i»ÞV˜ZØÔj' iUër¥ðÎ\t1ÍdŠd2ÄùÝÉ~ AÇ^¡–¸tb¼§>Ƀ£`B– Ú}C‘?ª&m0¿‡‹Y¬ù¯äÃlü•°¼)Ê¥¬Ž1Tg(`¤ÿ!…ÉJªãÓ¹¿^•÷.¬‰Ñˆh±/%0cµ«è—”(rôÕNS§¤é¤t‡£N¸·*|$…SæÙ3ݹs 2¨Ë“°Üˆ™óAë ô—B«"š!$jÕ¹-dë‚ ‚ºC‚•hŠ| š|”›jâ–%>ñs\Á¨¢e~è¤sbGlYHR ®33ºÊáßfy×âpÇ¢_]e)×Ùž<$Zލ´AÃ0êIUÖDÉI‡‰ùç—4+¡p… ¶å¤ÆN a‘bê™ôä.æIE/ÑHgÁŸ‹•¦ÚIlGJæYâPcÍNl2eP0(ä–Ò4CLNf§­ªZ6½O)/|‚ú [Ç]Q’¢ºl‚:ˆvEÇ á£¦éQð¬Õ‹ç;?QÕmû…'¥ˆI§ü­Ef¯eœ‡Á…9z¤1ªŸ„á½S Gÿ¼È}a •Ôâ Ä ¢ñ8–7>ЩtqÛE5Œ¨rѫ᤟AYr%Ø]¹LË<¢“¤É§2` 2‡´ÀBªEK½®múQÍÕµ;kbÉy­{»_¹“?3õ6u‘ w9XÂ¹Š¥Œ££%×éR£Ñmkpò$b1òÍ­{„x·äÖ!ríDÀ«Ù2¬*1ñ1ìôÔ1…DÄ?·1!‰*'×Ð,Tt†o¢œÈ«µèzÍ(pÂM”oî¸ÈüÙSo ×AYö‡`PìÕtÜq).]2™k‹SåkûúÉ´Ûnª—úƒ'©ßÈôÒ)!ÈšÆv*++8”¬W)äjÉ”£!…EêÒͲœâá¼ÂTKŒ§(A¤4Y !æéf?q5îº|É‚ =Jå ª¹ˆ‹¼CúÖ…¬ÄM¡Ä8è"Ý ìCÌ%~´ÚvᾞL…%[®Šå{P ¡M%1ÑRBOŽ:E6{í%ÖöÝÍòÛMZ#Æ[%*ïiEb 㔚’$VÌ“©f*5U¤ïæN)‡dÑi_Âp¬±ëi•QÁ\]wo6™p»ZL÷>QqñSZG½ˆ)<‹CÛ5;Ò„k³©²gJ+›-ÂR›S¹ =Wè•ÉVtQc—b§nAÔÅvß+媅ëÒ„ß?š–ÀÜJ™ïÒk½Z-ˆke«¥(•¥ U0R 8³"¢Rˆz-¶.,†)^‹ÓR„ëQ‚ái´B¼æ!†»†ÄOÓHâÝñ¶™¬¸J­©‰‹F¨åu'é½e+€ˆð”#§¯ákH¹G4Ÿ–Õ)I>‹è5Ž”A4¦aÅ8¬dv„ ‘KW–…¿y+kgD©;2MZØ—»yI0éÉv¢ÖuŒ—u°¶1`Œ¥Uo§Î_/ù±ÄnÍe¯l‰^]ý¬UZ™\®CÂXâ’Ôú µA37˜”l"û=57µµÚ’7T\¶ˆIÑD2JòŽÑJ–6e.~/rw„ûKa\‰†'.Ýîè‡^Gàc¦*Üeœ¼"Tº¢ÙÙôã{Ó­¬%ñÖÍÝÏH«*q,Ù·pŒ¤q„A‰!d+¥ÅÚšTÎYÝžèÆWG_ø]Jà™ôZ/–QTwˆc…:mªÕ\óûî"[ž¶j}WIœÃ‰IÍv‰)hÞ¥K=ŸR¦¬ÇÆÖ=öä$Áu²‰s Bà…ÍY,ˆfÌà©b„lÌbiÏ*Ë—é“›´³ßï¡MƯ==j–»û«iKÈR­Û•g$A\GS«‹b¨ÇIú­»ùzˆäsë¦Ì.'žä FÇWC”¬ÇÏE¨´M'¨ò–Gn,Ž_{û¿1 Uœ¶jØk=ˆQšƒì ч ”úkŸq¨Œh–¦™0ïDTÌF*±ª7ÝÈC”¡Ð#ŠVj³Ê~âm= ÅŸiLU“d×ÑêŸÞÍ2ú5Èä^ÑI©ò°âEÆ]’SpÅ0sX¼•ÒqdU¸ò¾ÛÅ/ð|-gî4U°…É.Ðê&j©pýÃsÍUjfnŠz$©Ë¿¹¦mqN´WœÞµ™9†úÐÒZy=˜ÍRUr²\YJÒ„c˜†Dç\-§á5К^jÐm’MFΞϤ2•ûJ•(È1åQÊ’•Ì~9ab)Ç’¯Ùäryc’ƒ|¥ˆã©øŽl¬ˆfÂ7¡šVpæ¢rzø„;žN®ñ,2J7âH&–!D] Ò¼cŠŠ¤šïdÜ­ËD- Žô¶ÛkIEóSýŸÅ[>Šrè…”~b8ÇqÕnø†+°ŠA«GÃSÌfEÎWz}ŠSþËÂÿcúò™b”ªÇV]+úИˆI¡)q®#-Où%Äy’³dR”•²ÝÑ”¦Ôîi»œW¨I´ô“¢‚\’苬R¡Õy|„’e ƒâr uJ«)5+«ÒÔJ¥ûÅݶ¦›äô;\ì›åfR ÓÿøÉ˜ Nÿ˜ÿ«ßɯàgï ÷wûè´EM‘ô·f ‡Ì†Mn`Ÿ„œ4„¹ÎaŠ»”Ü9€€’«4)OÉÞ‰†|!ÅÆD{h•˜-þÃ̲UcÁ ù«R u³0R9 VÙ²MIp¡`%^惘@BD íÑ3«ˆúb ‡(Ú´-A˜Â'@')Ö àÔ{oddŽoƒ¨"(ª`j Ï‚ zNu #'O:„›´A4ܘAJG _¢•”ËÂ/êS76WviP`ÃF!ÇÈ  f ÌЗЄ&qΊâ™G<%#E5hÐÈK”ŽÆ/Æ„Â0Äþ¬Qz˜¨£:;û®ÕGÌyc1ˆl\NR ( ËÌB1 Ib$9 Eh§Òö Dr¼æhðµVnGtkC-,^ ƒ—õ!ScG"’ ȈÄ7A A3î¬2Æh¨fÖÙ23N,)Â×—0!I¥#2‚d#…ÍF 3ÁÎ:È(Är"°ÂòJø#ç6çÌq“}„¦(‘›`…fÈ€Ž›œŽT/üø…dª!RsSÚ˜•/þæ`„`Ëcضj©nYS„¿ ¼Näu vb +yE2tDT£ýñ‹ªRÑÕ'`hÁvdJfWq¤1†yL8l ƒ‘åçÿûº‹•ø›©—ÂRbòA˜¬H¸†G" ׺w›š„«éĬ4zw%„9¡„=QÆXÑ]ÛÌe÷² ˆXŠ”5#r%ˆ¦j8ÈõöÆ!%Çd Ùxç1߇â©sZ"¦YÁ!‰÷XÄÂ&‘‘_ÓãVT3‘PUTVDÃ?dÓ„  e !̘sEB!ÆÅ¿Å[Ed9*âÁ‰hìD1ŽJÎÙ¡\ÎÀa 0‡ï‹#*c›Ó!ùŸ¢‘&2 hÏP·å)]ëØÕka3.ep›%Yî£CQ„!¾sªV'çU±¿…5«‹ŽÂ#°7¡ Õ÷n„ ñH†ä´"ᦢäÇZpRl 40PŒ Hʶ¹„ˆ•L©ŒÂƒ2L®Žëø/vs DOŽXù‚:#™/g¸ÆV0¼„Eâ1 IØ®•{œ¡ZüˆŽeIRFcPÅ k‚M,%O:®ÐÆÄ0„DXö/Qgoùü±±¸h6Kãc JÚÑ-ŽrGH%R0‹-APUüõcp&Æ+,Ž ³m„TÐbV!Yjðsò~Becˆ)QT„D"%¥ÞxÈb4xfcÌ$ôó¥^8¥8T}‰ò !(B‘ƒ DåŠh+ä#me#‘‡mJÉSâÙÇ3vÅq¨ÍÍÀšŽ0ÝÆÎ…‰kˆ™¤¡J*b÷wD„† ] ¨ J¸j!“P¢ 'S©JõuäbÄAéÖ2°à† ˜xg(à ,ñ¨J Ȉ*C†95|EçÈ*͹24a:ïLœ ¤C™øD!±D~Bˬy^˜8EGÙˆú¸„ø"‰ÔvB$F/w`B!ÂëÙÚH)G¡Çx¸jÌ@ŒpðMãøvŽcs `–AP¼QHR"LaJ#«½½1 û°Ô ÂW ÚWdiƒ9«X—Å{ê ÁRˆda:30›ËE7q4@de('*zDb¹¹Û£ÞC¸o¾u a&Ȫ¤9 Ý Åf+p¡•*IGbü\c9"›+¢²”51œ`‰D˜bñsޝ[¼6÷5É]½Ð €¤7G‚# ªG¡® Ì!ÜI㑘R8r(EùÂÀˆW6¸À͇4©2P€LØ.1B„r¹ŽtD‡dö-°ÞftDB’%íÓ +Ù1‰cub+‡)Ûóƒ8Br0ß"\r*½Øtá±Q¯ïLÊlWeԥؔ-Î]„Ú  ÚC3á H¹„ä¦ìßÅÍTÇ=ƒ¡)*Â3¡Z¨E%ƒd•´¦ð¾FWaD"œE.lMŒS#ÅÑC « Z#mSA%%7œÌ¯Y'0t(§"aô´L‰ Ü)C‘™Ø¨@ŠÃ’ËÕN¥bG@°ÄÎ}‹C…¾ñ¹-ÆsAœcœ ¹ ÖåêBâÕ{Ô¦uðÙ ´fœ"®£9õ8Aâ BÿŠ(%©Ê-´ìWfér­)„ÄìY:‰›7ÔŸGA„D"“ŠÉ‡*Jæ–Æ6l!kLˆHùÑ [v@’hqÓ• å¼C­‚‡ò ;z!|(Ðd ¬Ã:•„D:’Öë[— ª_ˆ)SߦÈ7A<,u:HN#˜ Ê pøiŒ.Ê! @±™Œ Ú j”-ã2qÐ`?ñ—ṙ ùLrñ´9¬¼ ÌÂæÂFÄÎ^5úJAdÀ¹|~´æƒZøXT¨¤£VDb#ÐÈ5âdÔîÂ;~*#a]ÕWÒæR¹ L4A+"\À,Z ìÈD<Ñ=ÍÜdì)Îl4dæhÈu('#ÃDxÊaˆßÑ ™QÚ%G¬ý9<òãFR$„R ª%¸É€µ Î`à ê êßà˶„w¶*ù]" Œ ÈꟌI>‡Ÿ¸ Î…GªÈŠŒ.uC!SŽEÌ£ ZfûZ»l!1—*Ã_mˆƒ§»¹31Xì·%.·Tù}¨BXÑé UžìWê"MŽ3³­>¦RA©Ã;Æþb‘Å(C uy9HÖÒç3÷óRéÎÏÈ[.UÙµÿˆµc¥ù¹DO0ˆ†ù FgbDÖô½hS›ú–o«Êƒ ‡Ê玌p†nÄÖR2fÚÌÙJѽÉo§ç0’k Êõk®¦qH’,×j§°AHFRЊv@¬V–¹©ÝÊ‚®8çYnµ’òyõèÜØAîe]ˆŠŒ}ÔL¦ÜŒü¨u6'ïÞEc“j E³9RªÜSªgú÷¾o̶TÉ7'ñ%±­§µôA%òˆ^U A@G!À„ ®9yz£žµå êW¹,üM9aDNØ1 R!#0Ä™ÈÕ¢‘П}3k”A›`)TU˜@bô@ !Ô˜Ð*¢T§rá0Ü(äg 8–Ñõ$f*q!F‡j6¡qµ~⌮P ‡™AD¬Ä¶{õhÈ0ˆ@Ê»‘§x-ÎÃÜ# °+ÕüŠNÌÒçíÄ&Àã"0GZ­®7e V­ÉNÁ¡ð ÈA*ò0ád2«6DŒLqÄl9õ‚ˆAF),Ó. T±= ˆ´QQŒÄˆS™yŒETqе_âhäÕàe „DZRÚ 0¦K¡–w#Ó»¶£×S N¿gù³,òWZ‚«+¯ëæZ¨1 )ySLt£±H÷Æ»äôAû¥ê×DJz¬Û?óP¾|Ò…‹r„.6U¹(„M¹6‹ŽZeÅmëøšU²á\˜d_t²ÞÄõ§¢ÕhŽjYHN8BG¯0œ¼ÄLΣ2È3TÈd™Nµj3å%f´ˆÔ«g5é]ÊÐÆ±m)}h¢¨ŠMåú¡RŽèâ§¡¦!Æ&•Ñ*Ìï´Ï© ü”ç<œ„/Z´ 'Ä1F—æEvw_V±z¯§­I¼ÜÇ3¶~ÉéGI2™”!JŒ¿\í ²ŒC¼–™Ì”©Ä-¼¸ßÈi¥ol» ‹uñE]&>y9*¢¯ÌéT1´ž*±?;=6›BTN¥ÿT¨›†T6! Ê,Ïjè! ÈYñ¾š·a„\QÄØÅ„P›²° BP¹)ÀêHC¿cÆpe¹Dv+»rãG!Y”Èíæ¬f„1QÜ!RÀ„f£8#„ê(§ˆÂA…vƒ D 2… ÍÄ0„­Hn£rùÙqá[œu"yŠâ…¹7ERÕqŠCœ0ÄDˆ8#Ú;ÝÄŠ#Gúa“ó@ åS ©d ‰¹4&2»!ÝÂiDüC¹îˆŒ7Ðã ¡Ærs¨ÜH’aúÁM€ôQÁ‰Gnò{*€Æ 1LDò˜IN,y€¦#…8R‰È·+(n1 &qÅ“ÂÂ/luè@ƒ`”ÊBzkÜg.Q ¾ GÖ" %wdϪð™9Ä:¹èÔ"{V¶½ÞŒ225É´Âq¼¾ôr#ö>åb±™9øÓ¥jb¢ÉvýÊI%¬â×r+µXÂ/ކZårÙR¨ÁIE…òY1X—mân—‰›‰=ŸWµÅÝ.¤¥+s¢–¸³;ôjë¡pA„T× Ìò³TJª~- ÈC¹/d]š±»NF’˜†C8ÄC +ûà›” Šwõìj£u8äWÒ9׊©†ö£&rl¿Z«(µ#ˆÁ ¿åÊßôÊE/ã®ØÄBŒ¬ÔÄ#› bªˆg!;X¨Ùˆ‰'¯îaæ}Êß2œ˜ØLç3:u•_ñåy…&T†2½Â¨G\_ôj)îõ÷¼Í2Ì@â—bwâ_¥þÁSd`cˆÖþAZE)k…‘¥¹YÜ!<¥ßÞBÛ„(ŠŸê‹’/«™M®Ùè_)ß¶ýÂÏyÄp¿Œhu„q§ìòñê!Î!Y×ÝnBT›¶£î5*ü/u}äí£kíH²¬ûV¿1]PÎþK}v)B¡Ü¥5yµø®G—ö‚¯!Ù¦Ù+ö©dÖÞuºœrÙ½2é¬û±3m#CÙöÄ£zb¾õ üÄs͉®^r Œ›Ly›‘d`¯Í†&õ‹. ‚§jˆ†BŒK9Äm_Ï컘ä"2Y]5n„vÊù´™É·õüfƪ·7y(ºDê¢:ÈaIDõMd­\â2áNæ×Â¥i¾Ï DÁÆD®˜CÛ¢Ò\#;Vçy\C1ÈÃƦgÑlV²SE²qÄñ–©"fàÊ„C²"©ª—RÝœˆ71ˆh‹?Z7 †&&Œð0¤¤(L1˜È‚˜ŠÓ7'çý}I¸ð,¼Að-3°Y3›=ÈB{ “zb"2 nAb¨ažŸPôVk\l?C -§1=T&o%£Ä ´¢¶*#g ¦Šv}2 îâbeˆ£NÏÇn¼Â’Hãš ª€§80Êu0`KÙ2ÓalÄfB#PÎ! hQÛÄC¯ãü_.ul}Cv=Ä#ƒ(JË‘`æ f-$&R6½'}`Ê 9|n_€í­LDÐbáe,"ÐýLOx†j¸Ê·3’/FSb5‰hš ÞžC"´ NêÅ„àÃålˆÆ€Â$Õ†“`…!ŠÈâ2rZ'*–¸Â¡Âˆs øºÒ AÆ8…k0å0Æ"ŒR63%$aú/HíHnùrüVfu'Ä0 „?ÆU‹Þ Ñ Œƒ3«(¦@›çä~Œ§_UŒC2ç>0‘Ëwä%â0¦"4`‚?›×é“v­b+µ…†f\óƇ*rA)GÀ©3bëꑘcÌì¡DŒ#2kR¦¦j¼nqÔlKX`Hæʼz¼aÌœ FN‹œŒ#)Å)2€aÄújŽD@Њ,cŽÄv¦rBí²ˆ<„4j¤(Z„P\×Ñ%˜dQP#Œ' tœù‡"ŒÄ#32e²Ç+–C!ÄvÈ îDÎLâýr ¹ŠG £]¤+׆Q$&1¡Š"Šu ˆAÉpKa)##R‘ÜèSCUØ6û¥êûHhñ„Xb›`©ÄfºˆMˆº+©¡· ÙœÆdÏ—‘5u3˜0æá,Ž;‚˜¢a• e2ΠG!“f Ê°$ÃÂNœ„wíÅÀ$Gc‰m`n•‚X¬šVnø3E¢Ìq' » >ư…=‰¡°#h0gqéˆ ÿ"÷’‰Å)œP Ðs'ÞMßáT¡œÈTŽSfͲ!Âa»[=© Í9.?Ü dI‰~©¶¹¨Ìfâh@¦¸°AMG’¬â+qÔ;3§Út’åi Iò›‚ÀÎ"ùH2ÌFHp‰©{Œ†ð×‚ÇÆ†@N¨?Ê¢«‘Y©éÆ0çˆÅ• ÁK“Q”$r„2©h"!†òÍáO„LU41¢‰[·È&èþ ÄQžŠŒb !;¨Œj¤0øÞxõ>b„ÊøÐð£GÑc»[Mcj ôŒ9Ãz®Æµ)ÚŒ„êÙ# Je5‰& Ý  Ö3È 0…0°zvV!y LÀVWB# ´@•3™õÇ ŒåàéÁ9Øz5Z*ˆap­/A†ÂÇÔ(Š&æêeG!˜ êp„È/<á`€ž`¦Ò‡ VB±k.ÙIègeböØ ¹Ë2›§±ÿ¨F~ôW~Š!%ž•iJÉúÊâ|…›wΦîbe}©»b•7}hR0JÜ–.û ³5½´Ô¡eBžŠjÝ}»LE#ˆ„šµ :žµE§9ÑrS8ßoÅ+ö¨BD¦Üi¶ñÞte¾~!ê|«¦#&¿Ü…% VhæZT«B!Ü•ªf®ŠFêé[b»¤y)£Š¢eÛñ¼ƒ®’‘›*”W^Õ°BÒ¬õ [üA 'V¡ˆT¬%òøb²ÔÄ ¦ik¥#ÛÅZìFÓxêdrü‚Y0aVÕãbx)Ö•–»RD×4}±…-i9Û¢Õ=Çq/}YZC—Ú黤ãy‘>¥ËŒc`ˆ…Í8L+š!¬N*µ¯®D¡¨ªEï$Ç·¦-H¼«WÄHŽr¢¥ß|¤_®}Uü×C†[HR_éUºX…¶TW´nWãï2£*d»Ï…Òwhî‚m\­ÄWD™Æ*å5ÔÆÄ8z¥Úh²0cWΆíî·–ÌKæ•"W¶}Ÿ ®ŽBòû6¦Ø›fâêT8dzË"õ’ǶñªT¹ñ1M[0¢ób N±˜ü¬¾>D)Š%å'ŒiŸLÚV”ï¶À¯Ç_Ë_ÎÒ×/Ýk9.ÚÚ@ôÇ<ω`d'Ä(doFq(ãg$».\[¤È«N#½V•s¢XÏÌãS0–¨Pb„P„ r ˜©J8Ü‚)ˆku"œ øgpb³*)Èô¢ JNàÁ`FÎA98ˆ)‹È£Xeãt+y2ˆhØë;jCì¸äã8@R@9 Q ¢C²BXBÆÃÂC8ÙÛX‡(…3òÇ/NFéb{ ™tèÁMðÙŽŽiBCjÊLBÎD›f*‡.Rs ($`…GBÄ'; \’³yÇl©DB†ea+3‘”‚‚hhJ!³"±P‡ZŠã¡Aq…ˆ¡1¹¸QSƒØ¹D1 ³WsBC¹…0¹Ì¦ÈR ‡P$†™:+U»‹­L!èØÈþMÅRs’ïè”t“]’S‚Ž!)–„uƦšjò)Îbpo&›˜YEÒµ„Ä.&s®˜êœ½…™îìf:iDåULWE¬æäCx™‚–Bù’]Ù¤L9Fu—e)W^ƒRHÚ‚ WG¾ö»NÄypK›n‡‰šc(éËzé1£/]e'6»K¬´o³ò=‘-g%Å5](Ù'q,#TŒq(‚—eg°»m­èG Õ’ºmâÌÿÄÖy_óá;S‰§|”3s¥š’”QAVk§rØ£9µ‘‘*RÒ¶õÈ¢»à«1l£µ5,ŸJl=¥ã1™'hƒ­”µM¼èvÛT˜§©ibʺÍÔ®{1”Œ×S¦ÊlÌä·<ÖNû6Ž/£bÊ.zÂl«çq @@A Nw , ÷t—¼ÖòNó‡`F@™ÖF¬DéqºG¸Ò)iIdHâŒZ羊Æzj“N´©F2êÎ"ÔÌäÒ¤òIE\!"%Ѷûh|K¨‡w3íÞ™Órz ¶œ¼Zd¢YDTÏüGª~[j~»$WwocÈ]2°ÅŽ—çy"Øôà´ù1 aÖŽ˜'™$°‘­#ZYÈÊÀ¡ aW²1Ì !ÇÉ(wôYDè”/K\´ú ìz’©÷tB&i_²–b#'¾ÇeAÆáåǤ2ÄM›t¢PÔQxg‘DHØG[ŠR2ã} J4¿JµÑ0%ê0¬qb "Õ*iÉl}Ô#ŠO"Hu©uštWú$ГÎR¶”gXPÉq÷XnKÞ9š!„táZæ-XPQ?Z…Ä;7aê˜JÓBYÙÉò:)HÆ%å5‹Ã•È1D¿Ø2Uh¢árÈ$Ò¬G.ùFs¹˜y$ËDà¦Æ¤1ºP†DY“»„IÕ4Ô¼¹©Ì­½‰/“¬³%*åbL¢§~1‘Trè”$ïž5Ÿd=†áeÅ‹O (3ô Â…½î6Ÿ¥B.WÈ­)ÆE1Ì„ÖnoRѾ˘lbV¶§Ö±E~EþÔ.Ø’…™4EYH¢±s„3râl—¿V”·+9ê>‹‡ cL­ã1VÌômÇ%†j‡ì/ëvB–äWýkRZ‘lõeéÏ1ä5T‰A‚ƒ ºƒ‹RÃ_…Ì=!4âŒ'Æp¡I–Æ„‚Eˆ¶‹qÉŠ) C!:åAAS÷F¸‰Ë]R|ÿ¦ÞÄ)v¦¢®°‰ÉO^»Ù¤ õ<ïtÐS˜ÂêSAåð`ŠO ®IÒ¡,¡v“½³ªJšØS/ )˜v]c¹5ê7Û—dº\º“Q‹çÑqn)z‹ˆJ»Q XÏäj´Bï÷â¡„ÖoÎÎ\U3¥y¨Ýd›Qó[LÏ2t†ôf8î#«Sx¿µãÍ›®— :S³$5ÐßOXÄ!–©¦²dðQ‚5édyGòê.fí”5çrF\ÇÿÛ`Äæ§Tã2L·#\1¢Ÿ¥,DN6 5îº\FAQÆá7Ñq(j–†zW«ü„±HÃ4¢ærê•<]JjâjqMºwœ"PžìÉò‰†]âÌÕK!/ƒ\ipÁÙ¥Qi2P‚B9÷‹•’¤fâolâ1Þ).ⵈõ—ÅDÑú5„åȧòâÏ—ˆnµ¦|úa‰ù•\”œ¨Jµ1”Ah³™*„áòseOGl†7ÞM*iNÏTN=‘2Ç]¿1oÛ&îH–!˜ž´qä=¼làŠ­Bt¹õtÓ©—`¦¹ÚvD8Þ^¨IIe’¤ÒS,T»ÔN¬mëÞ-œÿR¹ÈeÁG(î«&‚/&£ “Ù‹)>@ö{ì¼FìZ컽ŠÛ³¬CÔ؆ åý.\ d/‰j¨*+ŽuÎîÔ¯.¦ý.kZ*ˆìì#÷=Óy ÜLfT\«^œe*édîœÜbÝ ¼È»ïr’c\^\*¥Ú»¤+䘣§ÓI-÷ŽBÐ×zN²¨IÐåi ‚…á©Åº#Èïâxڋ˺×Éh‡°ÒŸ­{>é¬Ä戶zªÙ • `v.üêÉê õ¯¼ÈƤb®þ—ßÛÉÿCΊ0²õ$¢t£›90…Dåºcz1ó)ïZ"„g]NZW;Œg&¢#ýóäô8Ï«5Q4‚•VŠë¿CIÛ]IJnCˆM2«×ŒØŒš’ã¤ËŠþ*N²¨£§[Ë®\æjO•Åw>¯î5Y]%¬.¸Š•[³e¨¥v¢„ Ç–º)§²RHœçŒ eSãrÉÒßlåFs"òâ.2yØ•{”OY™j[› -„ˬ¤–À‡É#a=.ñXd Ç­wëå±ÔÍšå¡y(ˆu W"þáû!:nd´œ*JfêèÅ æ åT" ½nboòˆ•h„¨¿i+BW7/].˜êW1DŽ”z§[pLÍ[.”fóžBí×ýAj”fuâ¹ÅN®¯ýw˜âXrjÿ¨\§Ýî×bÕ"9>/þŠM‚»æi]ŠºG± ÇÂ’‰{Ÿñ·l÷t‰"ëñw¥¦â]é^Gd¹gÀÇ ²Ë0‡O÷ëîe3÷D×­Œs"Û¢ær! dM"’‹s6!J–³ž¢pkÓ”* ­*ˆ-óØ&¥B넲uCž‚@š&‘R£kaK„ÌÿEë8ìÅW÷ç·à‡[‡,•½B6E´¦‘RtBQÉÅú®ˆ–i Ï}™lOª+QÅ^d‘Tº¿³Ž•ò)Ôêåy>g¼«Š•tÓh·¥fÿ¸EoZ+œˆR˜*P¸ÈÒÏòHM[¨¥pEk»Fêái䊘íDIs§•Ðe1V´ÝheÈ‚¹'ZùÿÎ0É1Îí[^m "+FªX„Ÿ*lêÑ c™9dï-“)Ô" ‡ ›´úWlÞ;òÂÉP¬B¬*L)à >å kd˜×¡üWö+ó Qpµ§R‚‚¬û«VIR‰@¤*¨F‘IRï­;êmå‘RV˜¢·NA+œ:¹j2";ÝðˆÚ‡•¹õZ¤l|J¦Šº9UÓÛvI­±E!6ÈDéVlÂeJ¨!Ôrã7Ó’L“æ,uG•öq(5³I+ Anbú#2{»”B Ÿ‹eŠAô ĵU]Z_8P¢}H´‰Ã_Z lÔ¹ñ×2Ç´G¡sM}I(œuK ®QÜCÓw\ÛT§£â”j ŠR)›ji“lÒ­„ÓV„£.±êgVîüq¨qVŒ´¦‰­Bè—otªÂ”*òš”é1|êa"õ©’I¦)Ÿ}Ô¨*{xе]c *Ú¸¬i½|DúÈÉ@r¸A,.5«/|Ž©J·®Ý#®…qÚ)Φ¯›«?¿W… cŠBeìåÏÉKü²›³j¶ßÁžÎÇBü™:Ü©T™®–̪=«.9FE…Lx•¾ 9“9„_fOÚbËÄ”…+„|Ü#PÕÛkÊåt0FuÄêæe¦é.™‰sP#™vèÍWqp‹I{k¶¼ê´!êK1|dÂWÖLÊ•um…}0·Z‘Îs ˆ5„£òIU(‰2AÄGµªû*3›¨!ªi IÎCv©;ÕW•SIä•Zº‹Eâ©JšÙ¨&Ò˜3!¤M>ûT¾KŸÌQ˜`Å"ËZu{S|v‰ë£ŸÆÚûw!3$÷C'!mªwæ©É1OŽ[9™äÊŒB$±ïY. 'TUü;2Ҥ£˜c塨ݤ¥þÑO‡j¾Ô­7Û]V¥Å•6©·S;óâ6–d¶þ ÈÞªÊn³‘qÊÛ¿•u¨ûc\KòñÆ8‚•˜J>Ðý.ÝŽN`£µÞô׬·’ÁXÄÏ:ሶ ®b{ŠE ùf5o¨EFuòv"`‹rù¨&RÚ›+EÈGôʦ؉Eƒ PËY/¤—w;;¿QP×*¥9ÔÿOI|Ëq šöÌ­4„9ÖvmË䥩Úì9Hº´ÞÊRrŒÆ¨êSs·IºEÍò ²%HM£!vLM¬A có‘¤ê^ݵñ –u3—§ÊaF$Zv¡ogJ6.ÞŠ²?+ˆ‰¯Ž> rr˜íCКÍî§Cd„mÜž{ðT).£‡t¼ü!e÷ŽÄÞ!¨ùc3u÷5 ¥]ªþˆÊ‹SëÓ„”Ìg™ÐØ„ïÌ9b/¯÷Ž”¡(WW c’%$«Û{Æ]׳3»òéѲ½7.Q4ˆuNr¦T['ÇAŠ“I#•)[9{öŒ–_kú'ËBÙš¯ìŸU—Ôñ–aTíüäô›âeÙ²sêLDêPz˜›¸Óª¸õ0Î*Ý•òr”+·ÖÞmÒØTÜ3rò‘×ÈrR´Äû’ôÕMv!…8¨mµiºä9ÈC„¥ gïûr»®’!ýtVR±TŽéìçQpù+Û˜ˆøj—“*R¢*йý†ãx˜^ô»Õ[Èš2©Î¡nªµ4º6bdyçK +ª©%Qh/b»ÓB¹uMõÒÝ„'±Œò¥VÛÜJÐÌ"¼¦½Kïmð¤#ª¹µ«DüLsYF©•­É-øÕÒvzŽækQê­ÏM§R”/#¨2ÊËÎ;QF;Ñ0´C¡uö¾Ôç1¥Ö*êKŒ/×å:#Ï5ë™T2#*Tei>¿.l Æ£HB¶Ö%.^ï²UŦ–Â,èäB›h–X›µ±¹J!pù^jîGA¨ÿÄ)~”+4Z=Ãpå©hTÏF*ÎI5-ï5X–_ÒÄZ§ÔÃyµÂÓî>º:>;]­)(E8…½IRžÜë¸3ç#­¢gRºczí«FOMô¤Èb¹‡VÝû [Öò°ÏR¹ˆQGMªZ*1 ÷’‚m•ÊÄEtQHºcën‘2`ìð²ÔgéJæKÕ?¬K¾˜:8ØqE&b¼—½‚ A*æTn9’mÁW÷•d½y›Œ¥Ó÷ ×u{Peh•ˆĵ¡gÑ]ßÄ"&†'ÞqÐ4œåI©b µ°Î²j5ÊLj%1½Q$‹%…åÉÜ‹U‘±ÒVâvá›È¹`„ §üú|ŒJ9:ŒDÙä¡È´éÌFæ×Ûh×ú®áU—ŒAY´Ç9OŠî¦OùBY4ƒ[‡ÖŠ)ð.5Xì$›\ÿ²"¬Žœ.È#uVC6/q ŽÆWFç"eŽfn!é„åêÕ1sB2uº²žª­µÇ7/”XJµTb9QµŠ¹ÒÔ™ºãžT!y‘?”沪Õ΄ÃWÐAl ¸dÀîN åÁËèÕHa8¬¢d ޹®!!dx#~«É Ž+A ë¡P™ÿf'âæ 9®`EÜ~ÈA‚hÎD^ïü§‚tṴ̀#ià1Ìú4ÁW2àNÇ)Íi°6? )¬Ø¨ç€BÀ°g7ÄΠ¡ha€Ó±T4}vp`Ƭ\2bŠCAÒ«Â'H˜H„±p5V.!Ñ.(`äc#¨…0Œ¾>vI…*±Âĸ5Gõ HôÈ ÌÓ±vµÇ`€ŒÃ Ę¢¨ÉèªÎqTR¼A•%R8ÔNþÅmY SdC#ÖF5á`H©Q5 û"•Ç´` Æ!u¹)´OÆtáÍÕr¹éÅ&š‹ U†Ú;²`‚T¤lrIˆ —N!Lu‡ #“¨AÐs©E >§ ¨ITf¹hŒ@Q D†L ßÃöæÂ /AXw[HB‰¡®ŽÔˆ…EZkІÈjJbSwÆÔZã•7S)ˆãj¶`ÆãA5ø£…CÎFS"¬¤D㬩Èô“§ ÌÁ¦é™1«¸Cĵ†ƒ"á•ãØŒ¶…νPLÁ/u©N˜d¸ŒI[„ÃV€d‚¢cdV;OÊ\:uQ‡Ì΂[Œd>ƒä}Œ6CÍÎAp€g ýþjG橳§31æäm…ÔïGè†âv¤êL,9H|®@£6q9ˆo9¢b“tš°”!|(Ô²¥áŽS ¨@Q]Õ"Ês9¬0#Òäe•PÈBƒ)+(Ìàbò°é…:NoYÆp? ˆØtsmÆ$¤Q–©A¨P{B(%l®Ø¥`J!ÐÈ àZÀSbd§10z}Ë‹Þ< žÃT"PÜЈ#²±¢T@Ø$ë‡‡Ž¨R|æ:à8.° ¾–+=1Cò(„ŒÙ„!@¢CZQP¥*‘Q#õô)‹Rs$‚¨ôC$F¡Ò² Ë@! Tá¢S`*HBÆ ?Yjõ憰ÈJ.L†UQA!” Wò0Ø…*1nÈAŒ$x¨!²Yã¼ê'ƒÊPtá¾TR×dÄa# V\„## 2˜W„"Ž;r|(9ñoD‘6åBþâˆBtH¤‘ÌJ{FPcaôøÅ_BrAݹ ŽDpB˜‚ä^ª0üÀÆŽ2+A£¼ã-4 ÞzPØÂX‚¡,EA@Ê'``çûc9W± õźt¨ƒ°RF±Áj!‚=Æ=ì„ 0Ý€^eœñâ9J%G€¸ª$ye ðêÀ™ #Ò1… FG¥ÄQ5Ñ h|´¤ÇxBÙQ ‚|—A3fåÑZ!5aB‚œ¸6L á´.¹˜1ÇŒ&H‘A™ÌM¯è+¡ñV‹Åù”ÁØsÀU†0…pÄEQP ÍS€CÙY šDbüâÝfŽAHÎA+X¢ø †=! ‚0†&Æ—\+p‚)°‚“Š%b¾XÊ PDpGœG#ò¡í31Íø…BXÂ+EU(^¨)’†V.¸j‚9 ‰ ,1HQ7ÏbEåæq„r°å°‘ËuãH¦\† Ý)ˆtØhde¸!†^,Ü@¢òà]CÀÂ!JÐ s–ÆàŒ';h µ ÂFRX];`£)#ŽB @¡&LÃ8¡×¸ChqD̾gGâ¬ô‚ň1˜„pNÕÈeb"†4a"Œœ… F>QuBUÇ?¬_Çqi8ˆÌoÍPB §2¹¨d¡…Ò„`”tC“cîu¢ ÎÅmYj5vW¤†#$0ÅrDöG‰ã\¹ô%f"0E%B„!S‡®H¨,Štá6\´Î»‚²¹…D2B"ÂøÂ2&È@˜Ý Xs1D ü#÷aL<õb¾Å_ŸÑ®Æ " l, Å Ê2üÄ Î!a 6¥®,)©L€1ÆâåÌ‹£j($Êo¦.ót¨5|ìØj1½!-!‰DCéÆq3šÿ‹ a‰ˆ\z›® ´uaÓŒHôSš™ÉFa„fA•d-¤G8MéMÅXn; àʨT@¬#‘L „ИC™±qƒ|¨)‘‚‡8\S2ˆIB‰ù9QÔE„Ü! ž¡Ä$J‚+OÅ"Ô4`¼™ù˜ƒÌ­qBpŽ£F jxÅ®ˆLn¥^6!Ï8)jÌ*PÆâ>jb%+ ‰TÂR`#2:0+ÃÜŒ;œ\̳ˆù·rЂ±˜3ÂÂŒgd¬Ç1šJÛWÐÔœãÅYÓNá±ÑÓ”Š(‡Ñ3;Œ%NSÓßÍW<ˆn,C±>U`N@D5–©˜ÂdØæœV)C ãf+Š…zZŠ †ÖùB5Á rR‰ƒDT×I”Ò)ý('.*—ꯟÑ8Fq†ÀL…(˜LgÉêЯ#8Ô„÷8Fn##‡kø_#9ˆÄ¸a® 1JsZS€ÆlZè.¤`VëÇ&N;'¹€˜3°2Â!Ã Ž–¼Ÿ6ÿøÉ¨ÐLÿ_\šÉm¾´"t\*(hÀóü f¨[íä¡JA(fsæŽÔÜEšÔ·Éô"¢X®´ ®d3•¶US `•Q†Ø”¹½ùðt䯴Ÿ]!}ùûM|Äùb”¤1Bº´Í¿Ü¤dAØdŒWåÄ¢T¶¯ómЄœÂ'¡¢%~üaUÈs°æÁ[Ù®Z¤LB†-Ö“ÔNx½d•û6éb)qJ)¢K©×­Ô¢cŠäRQûgÚ×lD&UHוÊL3;.¥ b®Ð¶zrꬾAjý"ãu|´þ&“oŠÆ]»Èƒ¼e¸£É[w)âuEK¢©Äíéb"•²^¥:‡ú fʮɚ˜sª¨É#J­\º4ïJUðê]£„G#ãê){d¿ë*ý q”R²ŸF­¶‡*)u®Ü*–³Ù²cZj¤ŒZ¹j`£©P±г¤fEÏÝgí˨…W¡$|Lö=3:µ®oß.ÊNC±Ä#T‚$2õß*JšR8"ÏSÅ!ô”D[Y¹ÍD=Ïnm-+ª²²Ý$M.ãqRsª®“•{Æk61:¨ÖLîë–RjFr˜â¢ ÛRJaguCS®°‚Aü²ðkK8ÇAë)DEªÌtt¬ŠC8 1ăҬæšÂ2+âá½ÕÈzý±Ûj‰‹»y/ìrŸÌ¨F©÷ä·?{•lêuGs¾²EêÿK•3(Çoò¢¥’™¿R‘Ö·OE7*S—Í•5[¢EÅ÷Âv=WzŸÞØ"EW3˜w’«‹µÂS÷N\jxò^•~ôB“=:fDb ︓ ÁŽZNùß­uGÕó-Ïœ^ëÚ·#ù¿›èZ9X¦"ÕC "õ)ŽL$²!ÓÊ3TEå9×mš½ÂîgT…ÛêYm“qÜ©ÁV*¢½>úT»>*.&s&rP…RPä Ùò`¿­TÊU¹ÚÏ}åii¶wK„qHœ§Bš§ÚKKý¥[7s¦#Ê•S†3´µeRãÔšJzJùÇ!|ÕÒÿöã×Ëcô™o;Ñ•D]eiM>µD[ª™ÊŽ[p¬G®‘Ÿ‰DæÔ;.z¥âRÔìÛŠgâ·»Q7•ÓR[“£¨Š»«ä%З-…ÓñJçF;!ŒÒý(ÛZÓp§S³TÆ#+U({tÙ%iv1)þ"ñXµK«©…`‚ަúÙÑoT”Òž9µµ«õ¡×µ²Qd9KJÐŒ@¨AŒÆÈ늃¸Ü3r^ % tC‡Z5Q£‘ÉÐÜ#®bË `†ÆÄ: ¥ þ zf Dɧ¶ ÈRÌê¥S‡ †ަ„œÁÜ£¶acP£ˆd0³¼)1ÙwKˆÉŒ¤¤ð…Ž3Du ›/jÊäŒâ2áÈWS…8‹"âê94] „Ff@3r©><ÿVÄÂ! BVçkå) ÙéMWX)›'W*ªEFåIÙѬÅM”&H„AJ¨À^(" ì)¾-;vDˆ'Æí§{AÅŠ5ãÆ ŒÜHdo™R Ì €€#/ p`î@¢v×CïOν®_)Ê(Ì æ¸ +…bµ3dÄ1• ¯|H´!8…Ä×2h;\®n² Æåž¦_[£Dhâ°½"c 4ð‡±£! Bb 41³¹U—+ôbŽOÄu"Ÿ¶°PŠ¡…aϸ׷™X„ÂS:#Kùª„ ‘ ¢å"ˆ•Èæ¥R(ÐŒî Ž@10…— ‹¤ÄFTóZ@'¿aIÂ#°ˆLâå2º„BŒAµƒ±_a²%·¥@—àM1JB§83ŒSS06L½ÎNÔ6"4DYqáÐòíX¢s8ŒÑäEÄ¡“£¡’Â:mÈ€ÁL)ЉûB)œ“’ LàHC2gbï6ûDîIɸH‚ðÊ4kªªHY(ÄÂ$¬©íM*Y£µ˜~ôEÄ„wtñ™q—TA=/ojŒ¤ã%$ȵ!Nl¸8%ÔU c6c¬AL8Ø’  †¡Œk‹ýówA*ÑÔ€£:vM›K{ã†TáD#êE³2Ĥm[&cý’¥ #¬@ЩÝrÝ•ƒˆœ#˜D|½|Q Øá «Œ†¨ÙBò˜ÁØÄ°ÐF`‘ujqØeàÇ—D¼…"d; BZLÀŽ1Ú¨Gº•"ÐB4¤^*@Îs)ŠÁHa œð8Œ)(„ÈVŒäÇ%JŽÀ™Ðˆ$ ûßJŽ“êF4AQ#µbpÍ”SJR;2×àÏL)…æJk19椺¸¨ÆL3Z¤ÕäuK"ÓÈ”6ºbñQ–ÈRz}„­Ÿ*ùsH]';è1ä]óQ¹{>í¦L^wD½¤MòL¤wúDÒÛv„EÆ+‰»jûÞ=´á^ æV¿ª‘jÕÔÏDmäc®#9˜¼µ;áË1±S™Cq:­BõWŠLkª“¨"éR‰¤reývÅÉ‘”o3?k*aÛ‘¼„Òzïq¿&zéŒÆNPæ(!M”çAFmY0ÚÄúÜ‘s¢€„+Éšõ¸²±tJ-hνc)5f2†)È]â .ÓäY”ÏÜî:Jr: n¬IácΑå83›îTT:O‰ß7vИ [Vß  ‚øÄsê?õrý|í”䩈) aV2Œæ #„“\µšM††Øà õZŽDèã ÚzÃÁâR Dñc9§¥Îc‹có¹VÃiB:Ìø¹}B)9t§ÆC–ˆ¥äËN×_ùœŠVï﯆uaAÀ éÁìH%Ò$$ø·`¥ CœæI#a“å·×}Ã[×ú—á»BŒSçY‰ˆ•dUÃÉFidr×ä¡°QEDlÏ–,/D )0Ag•ßë‚G‰&RÄ`ë.Ù‚.äü?R—!6ˆ•5˜ç%³ôÌøK“¥Ýí4÷¥ ¢¶Ž*S#iŠ1G4X.Ìýxñ¢è€¶” Å—”,<_«Öam'-¥‚†$ˆ^1?ïÅý—tŸ.¹‡&uD)ùÑd‘LJ’q EÕÊ•š‡y5óRñ0„®Î9µ±ØSX‘aeí`M‡üQϬ×6‰ßë?ï_õcúüëþƒO¿¯Öƒì¦Âh~ˆò!=úÊ®š|£ `URתiĈæë™dP%g\!_`ƒÊ¤ŠRåŽ8u¨.~â z w @1ž±ui„VƒNTØ‹» è3.Óª#©"`YèĦNî}%6©ÕB38fç…A1® HÙ µL™DÏ[~ÛcÊ^ˆdS•HeòåÄ´k‚‚dÖ¡% ai2@z¤6Ù^Ä¡lu‰JsÐŒ–˜ˆCF»½xÚ’˜3 Üf–±#pt E uQ†HÙÑÄ S¤…e0Â#›•g0œ@šãˆŒê…C8„ sPLE[Ec‚5P„L„¡1錨QXbgn”¤z¡Nã<´èr† `R„B²sUâ3„à GAP0äˆu Þ±²2–…Êè¡i%w£ (kpF;˜Lf]2‰hc§cöd;3—Î̬…ƒFwZ{¨Câ*ž S4 ܨs!oÒ E…pÐcC*$Ð`‹Œ!Yw¨#Ùi%Ž'Iz—¸º1OGdŒj3Á¢@–RºÌH+Nc"ÕÊâ-Ë·*¸H~j!+Ê Æ8Ê`Ï™°%æÜ1Ü'„!]C‘“¡°¢|RÒ¦0µJ ”¨¸D¢ç1\ªr jÑÂ…9É•I‘„E+f=¢b|3FKº©œF“ Õ”ï\j,fÁ—I1áb dÍpÑ5::Å!.Âròê?(’W¯i2£¢,3eja±j†0 $M^9Gâ>yØa„‚¬‘€÷C"ÑT@e Ä`±Å”Dc ˆßWSêôlF´›'4£ô†@#‰Š#dÿ)2LÐA%?˜T‚¨q§õ†¡Ž82âXŸ„jˆ˜HÅ2Kبɻ§P§O£å–3¹Ê"”#Ü1)•IDÏÙ1¢8ˆ†¼ˆ%3Æ ”üÛÃèÌ"¼jè~la ã1ˆ(¤ˆaQ!x»G¸t2,´)ÂÑ ¬—&ì@Ì>8œJÜã à¬Sˆ!C”tbñx ƒ‘=ïMÕÖ •PŒ$îÆ(EwFrÍì:žÙªGe\á2a )P›„30‰Uñ0BV†pNŠn(1úu¾GãJÓÊO(‹H'Ì«ƒCœE]ñ½bˆTdeR•«\¾¢S8M5ì6D(GdÛÁ›’U)‘"!DPäwÇ9ã™ÉéÄ„rkJÂðØjÃ’º 1ÈXl։ܢ…Ì1 ”;°¾ƒ¾ø@Â.Ö14Ó E3Êb Í Ó Ü-°A:ÎÜÕŠ9:™ „çŠ1ÃtRÔLˆÊóÄ‚zäÓ,‚’A•™†1„`‰HVc 3Âd@Ôj’5´(½ÕQEŠïð• Gå•З™Æ‰jE‰…C!-4å7Rº©ÉsŸ”E–TfMK2 lÊFsÓ2`j„äÔ¨AÔ™3"˜È±Ž™ jX$II+Å2Œ¨ÊËŽ‡€ÕØüù¼d§Fì!ÑPL“!Hב]R „Gh? ^»÷ŒðHžo÷½ÈØÔÈዌŒì!¶S- „@¤êªBK©Ep¥†\Ä »1ê› Ö^" ΂.@j7ЈWËí”ÖÅÉĦu>š4N­…”…2$“$«ðU¦&¦ªíž;)Wa+VN!$! )™JB1¨jsˆîZqÓ£·—nç6Éf{™C1ØL£cxÄJKÛ ®s®XN-3ƒEGâ\Ö+”‰ˆ$RxÄo‚;È8•Gg½ý¬ OÊ|FŒ—±…mØ‹ˆ>ÌA8ÇX» .…•u3še_­‰X†ÆO‘(Ls(q¸Œ2´0ˆ&åqG\qÑc¥igeIŒU â0@b1lD& ’Á”ÏÇLµù Œ7sŠºAX°Î‚о ‰„èÅ!ŽÉØ Ðb$3E!\à˜®6Ô¯aM©–Dzc-÷£g ñkÑҭ&¼•c+F‰ ñÌΚƒxó¦ÊÁµô¦Äë¸èB˜´—³nÌg˜ÄfN…é‘.,V(g$§ÁáJYâа){.A i ¬˜18#5 ˜¿épH‚c>Ü©1…¦zµÏ¡c- Y›†ä5œGŠŒSJmMHt]Õ‹·@äÕÑ¡`’(ß“ó2  XuAMÈ3;SÕSTì<ôv%`Œ2æ¬%$©„S@ˆ\“›tˆ«uÇ‚ðåAÅ0?£´'%âp‘§Èƒ)¦?Y0”!œÄ8Ç#áQ¢îó3Ý ˆa0ØHÜĤ"ú"ô‘ÈC$=åËU_߇Ä5dYÕ¡ ‚TÈ¢$©OèQí›#å ‘OB &2Ðß07 ñSPbRD(±?ŠkP]|<¼¥u*Ì´AØ*8•¸ÅÆ|ÆÀˆ@a e>9…bB>Ü! üÊ@…â Ðù\¶CID„C^G'âH—èṈ̃öéÄi9H££ÀˆÞN1!®Å:4¹d1ʃ[ÑÌ(ä ÂNÄ41Æ(d A’&cQ4E4̸H"2ŠMèrrŽpìËKà|8Þ>7\¨Àˆ¦ñ„Í—†xpÝÙ N' ë'Q ©Å)D(11L´1È6æ(dwv ^Á nC./^™rihÄ8’‡!ÝP— ƒ/Jô«(2o„˜¸;aBã8„Ä É±†F+Á±µ0Ô3“ LH<ÔÂ`ã8P¥Zvj*Àã~¥T\Ñã{‡Hy‡ðÎçÃ0a¡rÑ•,# NKd(ƒzu1d(2±!QÏŒ ŠœQ JvV¥‰¥+¯®! uâ&£ÆdT"ZÞ9˜ˆAJ'hç)¼Z“ûˆÅä¯îòù©^¦-¿g–ã.þæT³*J­R˜©+c°„1Ø¢º$‹rJŸ¿!×bÒ„â×t‹6H¸ÅŠïÂ]•·þ¨´W@Ë&ñ%BІ:8Ú)„* \â#Ûp¬Væyž®Lå¯V‰¤& cfX»íÄf”žÎìV#—•*LˆaÄ[5ÝlNQP…$tÁ(ª9c ,¶ë„Ô ½ð:S„j"£¯CZY3Ñ h'@d#²a)4@éPPPŽ$Bw9:¼b²È(ÄØù‚Q ÄäfÍ*ÙIù)OÄâEtzPâ‰Ã¶Æ£è×-Ñ-}D¬‰:” $” ÎÁ‚ PB#¦!JS f‚‰^{î#r™âö,(ï R)D\j'Q07-xˆ2=# ëù¶ÃP¢SüQ±ÈÞpPnrØ…0”o¨_D“@B ‚3–˜Äf¶)#Äcr uS‘ðÔÛ¤gÐW?A‡TI§ïùð¡%lbÎmÐ:0`‰†!„`¨`Ê/¨ÙFठ…èó‹€UÞεI¡N"ý™šBU3³ùZœ”=I) ÔÆE¤ê¶¡{“8o2’Öä65ŸSÌÔj¹k­Ùȶoͨڮè2¸Ìc­œÎw±£Ø¯æ¿3•x«çY’\D¾nñûŠ^“µòÂXÂU·<Ÿ*Q´¡ÛI’¶¡*âœÄP)Êbî#Q[“.Ý•Ïv¡fê¥q)v±wBþ5©Mñ +Y0É3›oÒ™Yu.c¡ðÂÍVRù$l êéÍÛJvªg™îBnu‡ªÒ®J­(ÊÝÆæQv·D•8ªˆš^¹Tš¼8¬MáX‰šý’>ÒÒ‰OA=ʶ½nuÌ{&•N¿BÑËþçB’æ– Ë›]OöpÍøMËbr>ß=®!{™‘+' š§;‹CA4¤–ÓÊ·5Põ_µL'ìÿ¬~²~}é~0þó$YɆÐÓ;v ÖÉ•ì9cC­u ðŠp 0¯á y4Ñ"T5 ƒýÎÌ^xßõ¡‘&ä!¹(D­M…T_ez«/ÌRÕ„ºo³H|¡xU"/>8­¼!Yª¨Ø¹»œëïô­tYk R«á…}9G9Ÿ«ø?ÖZSm‰#°)Fo+2Y† ¢öQÝóìŸ&蕲Ôoñ8ÓªnÕÒ;Ñt›Î[#­¤gz cˆpŽ…‘i=r Î#±e+ Ñ ÛýïIR#ë)‰Ó"ì~„£õZØÙbjdl‰¬øxÅ2lP„}eø%*ßs;Zt fŠ&]—†lR ÛC^—å4ËÜôO’³å_W’†!uÞÏ">uÝsŠøË]£Ô¹RWï§ÑÞˆ²jµY0µbÖ)’ªH‹ s„,âÜ_°%/`BIRŽmŒsŠh=rÂRÒGžQJ](Ì[ åä3•_¥FC‘ SûRbï¤SùøRPïw않´Ó_¢H Ü!Ô$ý2ˆ¡J/^I-@¦a—Š£:ØŒŽ-o›ÂJa¨ñ ÷;9ã°Šå ²›ÜeÚ^Q;Z±­õµ-&BKÈ[†­xÚÍç<ãqŽSj+™QÎ0 4³ùÐ%h–Šò¡';ûÐB9ó/ôÑ$- û&ט×ZÜM&ToR¯=QExæ"=x©x‚œ´±lØw¶¹ËQPôæC¼Áf›qèÂ)‹ÿ$¹:Žy‹VMÎ;‡r-dâÃII†i)QÓ*£læ%ÂÀ¦ >Äõ‡-/ÚsY³·émÛ›YºÄ†¢æË:ÈÔ>Ê®ŒQÔAB´×’Õ M5™áL+{TzÅâ¸ÕSå-J¸»‹]6é¦z ÁF¥q)%ê)šW8Ž[r(¯…‰CH•õgÆ«XK¬Ì‡y€§q!r˃xŒ|µ½B’¨´jýõ}H’È”qª¤-LìÐÅyeY„•iahNmÞ8õk÷Ë”1ø_|«Ø†é íñT‰Q ¤Ýô@ƒ†s »³æ´‹Sǜ àpb ×+VLØÒhæT¢('7"g¾¹ê÷)Lëƒ(½Ù)l„RUvºƒ ŠþAMZ󞇺úì¢sT¦ªTÎ §¹ÐõA—‹ÊwªŠª'êiøþä©¥Q©¸)œSŠN%8Wß F¼¦Û‡¶ ½I !*Ãp|璉ý~Çs:¯,‹ˆ8¦: Äxn*“Æ‘jš£$R•.|¢§v>§ö17ÉJšÌ\.¥MnAÇ R¡ÆÉ]*ejHù܈~Ro K›TÔ,QZC rIõ]·+Ê»$ÒIZh-oàˆ²˜VHÜYÚ%ïd&ý™VDô£ C ’‚!eÒƒiK7Ú¸oN.=F¡Êm%qq*þy‰: RàP’4áe#W·…û„rI‚=D AÞÌmÒ¾‰¸ ?¤3R)ÙGé—ú{✥é­„6^žK÷™YÅæ=ßF¨—°¤} fÂ;Éùl„%ÈXWº)krPâȉQ𓳚Ê8Ü¡N¥±…åL!â ""°¬n‘MÖFì¯Òj™¾m©©M£. _ÁBhž˜›;áLtçñ§(« Âýã3¤=¢Å¢}AJä€ï,ZĉEbdšå%ž¾ÌYU…]ÞYb¹ †ošå|m(IØ×JØÓ#ÐÚh—$FPˆ®/åðÒœ‹j C÷H®¤ÅZ›Ø†§4ˆT‰±~Rà¸D#Çv0Š"•Nr BqZŸw·m&ãUíª²±p[¼†¬Úçê½ÍrÈ]6UÅ*b@G=Kõ1R·/ŸhrŠQÊ,ŽE%÷žØSVìfîÚÆ”üáè‡á<Ê•V3̼$gÁÄhŽkm¢•í<îÕ* €Šñí’VX]é$x,Qà³ $‡+’`@·1FBÑÏJkp¶±ñIRšA·±Â™A^EqåJªñ:½F®yïÚÛºÉêÛrIž‡\ÔùærøVÓ˜s BÌm«ØDÁ(P…1E 8Ѫ„µp´ü¯!(mÆÌêX$Vê ärܾI2†œÍ¤Ø©Gj¹1KVo|M_ùf(„òq¦ÙH²Cì²±D7»y¢NÜÕ©lâÍâ›6Û{F£™¯"ENŒ”M1Þ«WÃ&/kÑ‚L¹øûèí”$P¿lµxý#)IrªZ»Ct!€€0¥‹4!"äš­Uñb tãn-™š÷Mòo×ñp÷|ÜΪU¥eZŽU"켂½dR®T²›Ä=S~J¡ÜT1‚ämüÏà†ÂÕS–CU†¡$±%b1D(‡)¨“CýÎW¾aUç1Uî­)©œTYÑòÁ8„°•= ü„÷þEÿ-‡Ãå(Ø©ˆ‚mìA—:F Æ%Ž¥ö½FHŽu c ù;’,5PN¨¼éµákE-i\á¥54BpëbWÏ­ˆ¬£:R¾r÷Å©|Ê+ wò^kíáÉ9¨áB­'ˆï¡d-íÛ“-]‰c¸É†¼÷þ6*äÅŒÖWCŒÑLX§™8¯gº–7¢×ËeRy¿OQeûy.´ü?¬Èr5 d;S¥zÓeIIŠ!BƒrDÂÈåªÚ‚”Ža0Y/trž‚R¹­*žü!ì;ÝIÏè+‚QoRó±A0ýM½…Jœ°¦2X\A³KEk‰ æ iD«©Z_·*äµÚî÷"Ùf1ÐJš)jt0•¸•-%?Èn9á“ù¤§ãî~´Œ…-‰6 ε„€PèA(„zÖ´¢)wËd Rôi«ÂI(µzm.'_)…]}D ýÌYý§\ÆÕvS3îˆiAÂÔÚ¦„(Ž©'Ó­óÈÍIHa’rmô¼oIçrr­kå–\ã1vˆaq„uzŠq@Ê‘,E3nhßZÅ^ð—BX¬øùd£óü•¡i ˜æÝPÚÉj¦¤Ä c§TÎÝm"›4W`8¯³NgÑÕÄLNe®£Å¡únLj/Шrz – ã4ÇrI´ÜTT¨ÚÙS¹Î`‹ÂèÝ71ÑKŠ`Ç]16lT‚á|U`ç•HPÍD&õ»+…²³*«ŽW²LY΢³i W[q3xK¢;k÷r‚D|mùwȦ øòËêÚc-Ê)MÏ’[iˆëEˆ0P£ ˆüY—Ϊ¿¨|-ÉM—î$‹®Ò©.-ž¹ÄRس±%§4ÃÑ|Δ_ánàÖÿøÉ¨!jN| Ÿˆ J9³’ñçµô8®| zø‘¢Á,)†ØáÑ8Ê”ž[Ú‚qH0Æ„ÃÊû—>oÙ_"9Hj•ZQòbU Uj‰[‹™îWIÙ'ÿ]$×òª÷±0F·þZH†c•ÈPA‹²ÖQ1ö¶Ô™ü±Ls¬¥Êô§S$Òm¯Wë+žhÚƒ†E݈§FÃT†U’‚¿öE£™l†Jñ=¨ÁÈ^Ÿ X>f| Gš.5‚Ï (er Á‹Xš²Ü>ݧV!Š…D‘Ä+JIôWâ{joj¯•“D“hWä”KVJÜcFy\ô 7w…i™Ç_WyÔ¨˜ß½30ÇaÔãZHk¼NË¿’ƒGôq2^—L#”œT«pÚg)0¢WVÚ›ìr‚²¸@+ĬJ½PÙ…sšÕÏí¶ùl˜†ÞÔÍ]2øÉPìT’ÖÄDÕu3-jÈs‹Ë¿„·ÛÆW²È–qôç¡ãuõëáæ0ã1>ZRŸ7:Êí3£ç¥h¢ ˜µVv«=›S¼·jTYM¦Y­JZØnˆ8C‰[zVxŸ £# cª’šBÖØ*ûˆRdfZ¬Ü+T'zé+Ëœ^tEW˜mí_U+Q½ÏuÚª]²‹Gðˆ#= uiÏbPn¢Ä¿É£Þ`®!l€G_m¢/ÚXº"?(ƒÀ¦<‘y’h´³˜Ê2O0hñ’CVøÿRðØZ& ÄI‰R‰ô“Eó n4™©¦G_«j×1Ì@«g¦CcEËZµˆƒ™‡c:˜Ž’—;Lÿ¡3’—GÛ¤Ïú šKˆÈ©N5„ÃPFt\½£b­ÒYž8‰gQ‡'lðœG"EqJónø¯ a·×­q:Zžäj‰­&¥'B!&’lËâtˆ©A ^ÓÃûcØîÆ=üNif}°óÑ o6ô”½ü¢-ŠsœœÁ5º3Ì'3ù´"NÕu5VJEyj% ¦ô¼¨‡Kíw°›^qU"&eßÅßÖ.äŽòŸÊ…{¹¼OJ¾#=„HƘ…)H„“V˜ÔÁÝÇ/*·‰¦ûŸþOéG±3¨jtžäw"¸®þªžþÞ„e)r¬üoÕ¦¬Œc$„+’ÕÒWƒí‰ÀÀ 4À‹lQ76ƒû¡SžRùaú°Íÿvª¨î¨O­hy^FNE"˜½øNË¢ŒÉü3Q<¿z‚ɹsÛr>»î—]ô¤O9K‰åq3»ç&ïeõE¦{©qy˜Lo)ÑýY•wÐÌ–*ŠÅÛbµJ¤äÑ^ÛÊUÿ¡yÍ<ßuYe°ç(’O‰úÔåIXˆêb”Ú¼«’¹ˆr\`ÍXž¡\·û!Õ4ËVä¥Ò´«:·W¶ºog§ìzTœçe§TQ¯QÆbEÆê‹:T”/'ê†æÂ'´›úˆ'ZÈ)ZK˜.¢iªOwbjã¹N¦D"Q>¯Ì¨g_Œw{~.oz¢j5óÉZð•uSRQŠ"Û*êÝ}qˆå6õ¨g¢PC3HIù|ì|Ö£ù5UñXpŸè•]eïâ©~‘Š ÒØ…]6ñÊÿw ’5KXµj‡%;!D.h…RSuFFÚ6[/DSÅųà‹ú—BeõLgÕmÉI‘ÈaKÚÞb«,ŽJ=ŒÜl¦Óø»Øå‘ ]©SOÞ•BgX„K)Y§Cô‡rlX¢‘£!{w«íÙ†©Y¨oT¤™ã$äÓW ^ôÄKˆ²6YI'xÃ&e1tg¡K²/á~u¥Çñ…L^fÊ¥gΘ¬&ßÊq¯WºÿÎÛRr­æ;U}b)3:”#¡”§Tz¿ÛwkåœÉЛíPÿtê 7µ5ë.' Ì\É9˜‡[µËV(‡å$£?4Š÷ :ŠÝ»ºÜJºb6\õ0ì„%l%¨!¢2¢kÅAiÜ!Gg‘µ0lÐ*dA…1…2â.Q¢¢° V‰À £®èĨ½OÑF |f27Å#X5ÚÕ ‹ö`M3fçîE+7Eý£ß,+’«1„oÊHEN0Y ¤¡¹‘¡D|ÈTÉÌ]Θ• ³B„S>§8Ьäøc¸T‰Åp•1Úšúêœ2¸ö Çr`b?¬!8å(9 ž~@°]†@Ê1Ñ6QFäOJ3`K-dÜ1œ4Q5 nÁÓ×§tBû=Q‹òb:c˜f÷#"œ¯BA1vÎ!khF#Dªù0› ,eÎzS† Š)˜¦Ã«¥ÒÑA¤ ¼™„ ™): … µˆ`Ê ^£@Æ3ågîÅD €¸¥8ç=ˆd}nÅ„TL+0é 0†½„„3Œ¿Èâ!‰T\ªäº”ßšó$øVwæÁ ÿöc†0C"eéXhfITP¬*"šbhV÷ @¸j&;ŽÉÍóŒF`ç`‚ ­Ö3”BGsaˆl!”äwÆ*œ¦^rS%ÅÎa™(©æ%¸h Ô! a€Œ\Œá&~2%GV†% yp«ÃlÞïÂ)n˜ÃŸC’4 !œUoˆdA{@D­;†‹ Ìhή©PÐG£ 3#œÂ—«“Žb ‚,㈢á®!.§½ÐÑH.%›öLJÞäͱíQ "Óe¯Îfl•Ë-lDÉH¨ A(1M‘ÌRrá*5Gfeyʤêq×)„G /ŽM{ðÇ)‘™ԻÆNVEÂkÎjD&IQ¿COņ`‚C*&-=Ó91! FðD’ÆÁ>£Çœ"Ç1X(Æc%$<¡ýÍ?!\QGI ŠS¸‡R„—;Œ¦3" !V Ìl¸˜ˆó‡LÙaXBˆPáùçŠÂ-¿•Ë& 3Ç1’ˆ¨Jf ÒR‚8Æç!ˆ „îE´oêE6UR1)ý‡ U)‰ÑUTÆÕÆ‚$+Ê0˜†“ HÄ Ñ?ƒˆ#30¹P¤îg ˆ0¡r ñ®Ó ¡èv!ÆŒÍA`ÌEÙLtDѰ¤ Ä%av Øóœ  œ 1XUxªðIÂ;Ž““(ƒ¡ H „1UXÁ˜Ñ4¨1[E:åVÜ!‰ÌÀ¾>µKj·c¬ÆŠ,Š G¸B‰Œ¹÷£/CŒ%ùP†u…“¢>›—Y0Ä£!Ûo]‡! ™„FŒ¡ „šËIG²‚(O>¢ŽåÆñÜ‹qR»@æŒÃ!V¡†Â;dÌ«NÍ“qµ ‚Áô¡DqéEg&äb³I!러ec0ŠROÆùd`ƒpŠ%¨!Æ3QñX¦DAÌYS[½¸8>Šã:Q„.Hq IPd0ÈaˆÈ&4¦;¸±‚!:?¸(:äFâ±EêV@¦5J-'°ÉWClá¾hÄ d(Š5X#™F'&vL²nˆÛ,)¯¸);ˆ©‘„ UÁ"Çî§=œ!)9[ßâ§8¤ø!‡LâP1`l E5z3%$&$Tä¼Kq"꾞”Øq€è8ýè†ÆîC*! a¢“ ÐBÈB€‚ "ÇPá ç¦ ÆQàR0¼£‰ÂáLôS Œè2¡—›Åv"PaB ¨Œd ðy%¨AV ñ+–Ò ¢)N£¯03+–q¹œÅÙ{‚Fu¦Ì$ DMNÎÜ0N©ÀÐþ ”ã;ˆ#AÔÂÜäâCâ…å8Ò¸J#q`Ø Éz´™pf' @c"n¢¬~Aa~ RQŒ>.ƒ§ÁòܼûB: ×5HF€ÔH”Ô£ áŒÆ`ñ^ œÌO‚¥ÿ ‡D@Ú1Ь@S™ÌÎB*äQ„ÈÞ¼Œ5Jq„îÀ¡# ê'Û•…X¼á–Œ(+'6‚\y A0ˆ…¨þ˜n ƒŒƒ@Zº”¦ËÂ#:°V!ŽžcñqU»ó=(š‹) ”¯]ÐÇ„¨ ë?ä1H†dQߨÜ÷Ú¼â@†ZÛ€:ÿøÉ˜"šN1€Âu D0&$ þ´e8Iñ·¤‰ÇÐL ¼T š¬@l%doÝ,áDèjƒ:B‹7`r’¤®“ô}ŽåƒdåŒXUƒ‚ Ì+/"2`0b€Aw2jL˜›öÅŽ¨ªbŽl9 =!ØÎ‚AÆ HGÍu„XÝ)À˜AŒW 0°Ìdô<³´ÌãeAóªd+™ÃRŠ(Ô¯T@„è|a H«TÕëDw b¶¹õÍäìé:+—u³ªŸ™H˜HJæz©ÌD Â2 ªˆ•ê™ ÜþÊlUÇ Á{’ôuâáÃÐÆIyZ™Â: DÕȤ%VÐÃw¥!T N!”÷fäG1 "‘§bˆDp1`‘ÆQ‡7ÑGŠI+å”?®vOE>t7hBY»(C8„Œ%À­Ãᢄè¬4ÿ« !Wg,å ꌨŒAeÔÊEK%Ch“ œ3SQbs6¼=x"ËB8ÂÖdØ\\7ñ5T W¸R†nÔ0Úð¡ ă±Ðb1J†Ȥv0™ò¾–㪌®$Í¥U¥!h£µ"®$ !Ø++BC!”3ÝÈÊ gG"óÊDjœtf \„auèÆB÷ˆÌF-28f éŒR©Z3h½hMA”JÁÎ[[!Å"Á(E3Í=\;&Ʊ£‚<4Â)£±&ÒHeyLd5ôáˆS¾åÁ©ÌÎ¾Š§"œ¿®ªÄc1°nÉÄ `mŒ—y±ù0Â36«Î<!žž‹Íœ:Åâ)4>)'°ž‰ ÐHØŒ¨EÄ+xj0ÔˆNj¥VÝS!©”'„$9j;:5›B×% R‡=C bÃÖ3ܱuÊäâ&áä‚y!ïb’ž }#E ŠÁªÄ? ±²àŠÁ0Ɇ~J¯Ó#CF ^é¹±yÎÍÌx¬ÈCŽ¤Þ•DAbb†+Á„ ¸\ĺnÔ¦ÈDAácP⼘Žú1’ŒË”½˜àA>l[dÂHiq¬xË•‚SðåŒ)¶´‚Cß+‡¸n¡A抸¬ 0 ÌuéÆÿ30d0BmV0Á9&ˆŽ£”Cýö!°ZBÁ¡WÜC:œŽÁYA‘™¥ˆ%Ù‰4_Ë ÌŠÂÝ»?-)ÊšB%œQE «:` 2œá/! nÓ9ñ:,‰1úâNâ• Öä Êö†íÐ(#A ¨!ÆšCH2äÞ0”!ˆ"d%-~À‰D^¸äq%1ðã é wW(xïʬÁRšÔ m­Â%®Æ)QÐ`A ¬Ra­C‘1LU Ьå33«)A†H«Š3eJ0SÆ ˆ4*¢‚8RÕãt8œÌ™Šv´ªêå(ÕÈ-𢥠‚† ÈD¤X+G¨Ì @5˜¨2¿z@AˆHQˆùǧãPä)59rÅ%Í®Ç(dJ.V#E`oávCÀœ#gÎ4a´3 !KÊ*¢Æ,"°ÊŽUWR e»QQ !„„¤eBPÄ1á}˜Éd r=üÔîé Ià¡TbÆZA4k~bN74J¨&Ó6ƒkˆÅktƾü!;3 u ½•2Õw…ƒß Ä2ŽKcX`Ð zgÜÁ"7>ˆ³±Ž,æ; D¬¦èýù÷ c#5E®²Œ€†Öç„H5 œÒš©à®GLaHEh‹ò–_QwXˆ—ÈÁSÁpkC"À†€‡AŽ„*ŒH Ðar6to ÔñpEYr˜È\‹KZJa¹Uæ4†Ââ)F‘›Œmíx(a,Df"#— Þå+`ÝŒÅ3°uPäC « Âq·Î!™=½@Œ#<6JÅZµ VSׯêÈ>µk‡Â;†aDµä™Â`4åIïaT@Ä E­­õø‚0Ú ¾Mt…NçŽÈLSOƒ*>/Zô¤¢@KfjÄ2C*šÁ©ŽD݃\ &9X ç#’èÂ9>eéØÔÉùŒž-·`ÆèŒæ1ó©Ï˜vœD H–OÉbbÇWNN99Ūª"Š(ÙÁNHÑpCŒÖk²6 Q¬Ac¹CŒVA2huÊd)#â­ÐÈh²’mŒ¸Ëa0!*.VJÕ„nnænõ–P(j¢JC}W¸†¡æIb°½ˆ”Ã+c=qħgQF™ U)oÊÿw2«hBˆêȪb")]Œäj2ÎìmÁ„FƒVz35"kŒã:ŽçN~5Á ƒ‰UÈ´v)¸HãôT"AƤ2:B>g¦¦†‹“Eo•˜P˜vGJ››#QŒìb˜ØLÁ;’nQb`Aœ¿Þšœˆ‚Ü¼WMNûE¦¢Ç*!q.~. x¬fðÁ±e%gò ‰»‰pFÂŒäAC Ã~£ýÑÉWP„RèÊÀ—³´*>² œ»a’œ„pp!j %a`Â,¨ÊÝ)QZŸ¢@¼ÐFVÅiq¸H ¸c@"ŠÞç`K0 n(ÓþQ)‰\ä3ë¨rü”HLpäzÔŽ\5á ™ÛAD€ÇŽ„!MƒÑ€™F8›ucLˆÍÈ·µ¹OD*Sz×·¤<Ÿåd7Ø…|ä Ã(…BˆØ$éÕ„+$¶ L꛳ٲ¥!ÕR* DHE#9…ˆF$øJ—‰X§S;ªAŠ+HS± ¡'Ëü™–¤ðœAÜÉVSsèŠ ¤!NÀ‚! Iéá9@ ¹qçQ±Ð° }(ÐqRÄ: $^ÒJ @&t3]“¢A§hÀ‡q ´CgT§9¶áÌ‹Q`ò ¿S„Fq‘ÅR“ÐÅL†O¿þkýÙ}k½1}4}uýìlä¯nhÅÑý|4þzaš‰!,Ù!%B/*TKµIV³L ¢ŸYpKPÒŠâ9ôɯþõ¯rƹì»Jax÷5’EûK'W\‹gR‘Mxþ{az©3ŠÁˆv;”@†g{Í…''a0Þˆ}=êne$ï*””9ç ¥£öd•.–êaLÆs6™NŽV«è¾ôÁ­[ A ´uÚlµ&ïN†iäB&~íµ·jK©N‘˜AB¤nza¸ÅÔoçmvýTÅ~°—&Û0J IO¬•tæ.-;}×e)ÜQÒ©LO7¾ÑPîB‘Ì£<ÉSTNŒŠÂY2âÊþ¡n-ð þAÍú²½Eõ9´×?­J§!]nùqhÎÉ1ÝË:ÖâÖáý5*1}shj^-ÞO39K+âúYHk¾ëlécë+pW(+.h«æD¢X¾úéÜÿÆËf0—«K̄ղԗ&ü˜/…¥^WZ°Ž*NK½(L¡yˆã‡_0ˆU+.åÓ®YY®þFÓXÕÊ[ù=(^\J¯“{ù‰®iØçªÕÓQÈ1 U5EÔ’æÎ-]ŽŽ"kÙ+!?7J¾DÖÎÅ?Õ¨- WÂ’âdCŠ@ÆchÃïÑÔ¯´c¼ßþ…z¹ç5üص¶ve4AZ‰š›„ä§)E`2+‰­£ÈNV+¹L"iÞîÖ%ˆh‚HRrfQÕj 1ìNç7+⑈Dÿ'“ÈÇÇR=-¶U9˜ãÈ”ëì¼5Ý1lWJXMéx’4©WTf‘ý¿iCQ)9x¢]Ôt9Å;‘H繪¨RQYS{_3ùI×vEο2¥¡©=Zœ¨S.\@A Ìñø‡2!¡„æeÕ®Nb)©Xe ÍÎ )ÍB»-$!­C“„C2ÀEžØ…FQ‚ˆ´vÚéD&Ñ ¯aHö¡6#‡ª dÖ…¸GdPh@C DG Òúdˆª.9,w ä%ŸËí@+êÃŒá Ï „(ùÝÀŠDf¼Á˼þ†ÌÆ&6 LŽbñ2·\J¸™YñMÊÁÆ{5#f¯Ør»3òlJ˜…4*a»2 Dº è;¸ Ê!ˆ2ìŸc¥â>’Æê0+¹MDRs*C °È`˜ÖüÂõ;jÄÊ‚âÂÀìš& u u`¡•‚o®ê¼Õ„2FhêC£!÷þ…â”tò%U\ܪCHÎVk·#H=“t½Ò’š}DöĺR=*ÿ®Ô&¦áX„'vBùžGAÒªÓ¾èºÕ©°Å²ñÉbgŸ×lü3\¤ª{/ÒL.½UèÞµg8‰ÌÆB©ˆ¶%¨¾BY{yºž­”nmDuSL_.>PÖ[f4©ãX¬ˆW#;çno³yPžeB]3ÐÄF-‹W²PG³ëÔÚ™úz’Ž—UfÚöɬn!®º3tŒ„M™øwcØ”.“˵ïÖF÷zg/©ôˆAˆ¸tGµðY#IqÆ~É bNê…teЉEý¦VJ<„ˆET³)¾ød)Èëæ¨ßöÚL¡Ä#pºÖγò²qøì˜©*ŇëŠ"_~±%¶‹1ÖC´ŽŽbil™ôõö£ä\bÖ†V{ –Ð̉än•"`FÆ$™-‰Cšpã‡52c=$¬Ø=ZKÍ^„"pESˆ`ã ÇÏ"(Ól/‡— 2x±FRŠ£LÉÇ4¢Õ2½Zž—- 褑֌"©ÜëK6Û$¦¦?œ'?Xôb çwâ\»xБaÅ( aRÜfÙ©AûÙЩÖçØ¥!*µTøöåç"{¼Ùø1„ÏDä¡¡ÔÇ Y41Ä­…⢺å'Þµ*}h5¦YEý) 9bœö¶œòII'‰RŽD ‡±‚:i¼£¤’ ãKbX¸^Áwý*ªŒ$ê¯+ñ¨¥«[õHõqÓñs0ådKv¡•.”Li1Þ!%µ+¢à­:šÏqЭÔäê…á÷WÒÌ#þÍ:-2F1÷7H‡@á’t¼-¼Å.Ù$@Áá< ocOj5hdµrx  Ä¢q!ež]¥ÊlE3¤¤:ëåq# ‚âö«Ù½˜†æªu/ÖKB˜Çq_»×´´>Jôû1(Ë&]Jæ"÷R¬Q–K’f!‚ ¹C)kÝ•¶M‡…˜QÈC?kÑ!_€è%Kmv«‚âr5ÊT8åFd%[j¶{;:Üv£T›† _»yRb„K^ežt銳<êûZ‰¢­P)Å) Tg°ô\äâЕúQ[ŠÔo÷Î(²7¢ œ]FjÁN~éÅ í_¥²A?QÜ5§’ò…Ibƒ.Å8­j’o‹©BÐz]îÖ±¡©ß#‡EðÜ•’•;¦¥¨EŠ×6ù…ÊBÑ\AF):nw˜NJßnªÏZ,HYaG £Èª¼ä0§ 0"À³Yô‚J± KqC1ŸRÝÌ¢qo˜Aöø'Ûþ¬å.ó B)•è"§ë¡#l“;¹÷Ù,bÊHädñ".˜“³~º @¢JÔý,…Êm@#JJm擄ãý7u²7!Eù+• …1©vˆAÉ?S·Œ(P01fÞaÿ´Zkœ˜˜Á>H%¥˜#‰6Å*œ ¤é,ùÔ|v޵œ¤3TÈer¸FÔ,«lÖ¼êU.&ûmskW]‰¢U¨„ö•¿Z^Þf1žG¡öÂ7ÛW„ºŠcG^›[<ô¬Xh@á`‚5¹N•ÇâB…[µ–•<³~x÷9Sk!ˆñ˜+±‹RÈž‰:DB0šeÔ‹(”Ö‹4Í€ódPĬ²‹VÛˆ2°éîñ´73YD¨Š:„Fb³Qª¨˜åÍ}Æ ˜ŽQ<ÜÙ¦v²Ô#&K…Ÿ¼‚9 ÎÕZ ¤ÇF•ÜpÀD4=ÎW†¾“Mìõo`ñƣæ—ÒP™´ÆBTiº/«$R2T×.eË–ÍjH•ra­# Dà£ÝJG p ¯Ë¨V톽•Ôð±5Ù‡ÊSɉP .4Pd’…#r«"YHQ’ ¤@ú³¼óQT›Ö5ªZ¼œÈ+¤È¤A½òÍSÜúMQêK!jgc1'3™9¥ãûTu 8a:nL‰Ot7¥r3’cu…ÆÌ\Kò.6ëö4N½äÊÜÃC, ø3öb”páÛùSÞÏl^»eÌú…Øyn¸Q?Í)\[Ô_[Ó%ádK%iŠE³”Ä»ÀGõÿøÉ¨#dN°Žj ”¹•:³’MÞoŽô¨À{ †mîç­C G¬T¥(çu«UóŽrⱪ5ÕnŒÒeq+æ4gɹ§ =¢£5 ƒ´¸(D™8ÜÄÈKp¥µêôUÀ¡N‰¬)+´â‹’ty?" šsÙc%ŒeáUJX`ÌHjÈï´*tm3>ן£ò‚-.+Rgd¹¨üò™;†ÆY”D©Šg ˜ïìщ{è¼ý,I‰P N&ˆÃ"¹ªKì— Dº{á{‰;˜ïq–Y¥e×Õ“k·Jga#4‰aÄ­?BHÝQ¹|Ñg=ÎVWmµÈk2ŠAõÂw«ÕžÊQßrÓî“4ªÇ00P‚_jÏ_°A°üoÖæµ|°‘ðpfAN¯ I`µ:!ò+­íŽ.^’Ž æ"8‡rÕB¶ì*Äý]'Ñk®ª»”›4+m·†¬Ÿ(ÉôšÝ=ÐÆrª^—¥!m8öl`â`ÖVœ”±9jßµ¦ú>­Þ¦ÙÅšˆó“Z’z_ÅJÚò Ïë{PñB®ÇAe)BDn/rÄwÍÒ‹g»asÑ0ÝÏ!‹—P%RʹÏÖÅ%³ÛÞÈáë˜Ã'z™_]ШRí²¾¬¹ž*qsßÈÎ3á)¾I*Ž9™ÈQa%èèyo ³[üv…çé¡Ä?7‘ 4CÒxk‰¶¼S‡J[nˆÇ0ëyZ6%)4SuiæòTš½!Èe5’B 2šjqVüèKgX\Õo|–³T+>&Ž@å²H%9»¸®Î]:ŽÚ±‘!ÏÎc0ú-Bÿ9ˆ[i¥G-”„q ŽÌß|®ál¬§— ‡•Œ+ÜEºÐ“v¯$’þ$§B”ò¡ÈyMaE©w2M‚ë¿’ô{Š4ˆ”'a’šÍبl2š*96Ä+‡‘æ ÓÀ‡r·HT Cn×Ç[Òú/ÑÀÊLº·ÆÖ¹’¹dË/ä•Ï‚ éBpFˆ‡2ÎÚ—+* ¿£U°¹Ìt\**«Jyûo+¸·–Äæ‘ñ*¤Dv$‹¦/,ÆÖ;°SœÀ÷C'?1}×µoP’t/Í*GGž™@²-Åt {¡_’T´!%!2å"4w"Èi®%‹â<ÏZy=r ”m'ÅápL0ä †!+C¶·±³š¥¥ˆ&=.Ub»pÈâ?a;Ö*DDôGؘAGXâÐtæžAÖ”À†2ö‰ÂOZñJe¢x‹°ø€¨4·„×·8‹áTwK®ƒU3IU,ÞOÙ¬®9é’!",„Ö© ¸OúH.¦fM+û/¸‰*{ ‚ Ìb{ÚXÏɶ£Ëº‰sÐÅÈ´ÇU1²ÎR<®2I¥/êGlœŠ&£³Ô`QQL‚^®zùxd kýSdt´Ïb S1_-L5Ô÷.øô­wÒU¨“V…+ ÷êë:¢šS ¤BRXÂL¯–­X}µ*òð´ †Ûsº]AWýy3ÞDdC¼‰3# ŽYX+\h<4L«c~þ¥rÅIúŸ _°bÖ~!×eéB¦ŸÍC>\N%¶z d·3Ji W‘îE„R±©×Ör¥¢“ ;L’"•7ËI‘zKMØîÜm\ö"T‰¼åôf_Ž„*Ç bÚÔ*æˆqË܉zžSÍ)ƒš*%¯K›Õä› ©šƒþùTò ï¨r°«­WGQIœ…!®Éú&vH¾VL›ínïYf9O׎¦4Ü7µ/Âóq$"¹§+c\¿Z©B'ÑéŸÅewI–k¶™ÝÉJtXò¬D.™Å'"5hÊSýR›Ju˜Xª23Šõ±†Ægµæî–¼ó;Põeª`ìØÕ9(_JѦX¨\®3"Ù…r‘ç¤1å%3‰‹³USD½Ì7©dÕ¶ ߊ²—îå°ÜÈæS”ÎÞœl«P¤²Â!çs—UKâî—lù·Ç.(ìNK×srä+Ù5K‚‰*¬RŽòÈéŒV¡ÊB+Q{+Vå˘M~/žŠeÕ[›~ܺbR9I0ÆB]Kÿj8ue"Q“ÕèNÜ*çÙW¼ÿÄC¤³Ð_ü[íZèk0—C‰½ÉoÇ&ÕuɨB¨ìB¨‹Gª1xF›(î„9ÜkéÉ[{Nì¶é,Ä^‹mÏ“ÆS©™KÞ1¬!Ûr¬¼å&UÃ.ÕLIýõ­Œ!µTÿþ™uç?Ô¢Pöcë)Ô¶¸®†Ë4¶f·J¤ªL"åžÄVvÇ¥ÛØèô©¹«F#2™z»“ýùêþÜGÊ22áu— ÌéVCaÎí9Æ.ü¥JaCžhâŠ1NØËá?W(ZqmØØ¬•:a0{ßeÎF²Ö…j¬¦}Œò,ÉͪfiTEhBvu¨ùÛ•Ok5~D§ñ‘õõMJÅ1 áŸ5JoÛTD/ªÉg_Æ—Ê¢vñµÙ ‡•rÍQ©ý™ìÔFª¥NÍ„YñXô§#Ô¡!•&Á‘­‚ÌqB¯!ÇÖ¾:ÙuM=7ÊèåT¿Ý§¼iŠèæ2 ñr\×JÅ(ÚŽ!‰v*ÿ¨É­žt’Ì­Y9~.pŒ—ŠÉÕõÃÞ:ïa*ŸAÅgKba)T‘¬IRÔaT²¢Ë# ¿‚¾“IôÓµ¼@›Þþ«ê^geÓ½Z¤VܯܺÜq¬C˜£“SÞµY[}…èA¶‰Òç1dçt¤¢ÿBûa»c’¨El¥¬¾a‹rµ—l3&é*!H•¿½oòò‰R{Iw#‰ª®\˜_õbòNˆ—Ö2ïQ,u«?­ARO­}÷“©e F(Ç5DÞK#Œ#Ý÷^åTvUu«jwÕÿ°ìA˜gâÓºÄÉU}˜c)—!•3nÈ´¥f}Œ´DŠÑ>µn® ІFeiŒfk2xt4ç{)åÎue1…#÷“Ó–þ¢?›iȹJ‰Qê]Jš…ný(ã,c™=ª²õ.Þ{* Cˆ(—u!2ÙBY¹ui³C*jÒihBµÚ¢|‰Zºo¥Ÿ}2¯§S¸ŠíõÛ U¢íÔÉ!Òe3¿ž…sóüˆðüBAB’ŽÊr!™î"²d®32NˆnÈ2ƒtã °ÌNdJ)°y7 èQOã|õ 1$ ÔŠÇŠ5ÍLC 1€ŒŠª ‡BŽb†lE½ J#iqÚ˜\E41±Œf‹ƒŽð¹ÔϱÙ!+Œ8ˆÊFPÉ«`@ʈ„¢¨sü™ œê‹œ¸QœÅäC„…]!˜€l©åÒ£™o'€£ÒödyÔ¨^AÀ…ª´)ÈPe€ˆáˆ3nêš•d'TN€„v.¤ý™ÚÒ0ºÈL ‰ú±f;nd]ðÈ&_?< t=À±)Ô™÷FR$ql"!@bµ…Jsc&i"¢(SúàÉÐ-0hâžé¥c§£øES3ï"s!N9JØIHò¥Üf!7s\™µödºý¼ÒÉgÛ)Q„ÅJ£aö¥8¬Êb‘Õ5ß½vBÿkÙ]2úR=9©ÜÚkQªé´©R™]7[ø˜D1‰- ÕG-î[:«¼¯…Z¹†Vel©±(–ÆM!QÌJ¥%¢Ù÷µœFlTJ¶bñB©ÎaÎö7òÅÈF•¤fÿnsQúˆÏÆûï7Ì[qíÓÚ&E1Did#òé»Vçr<‹B¶QÊéL²Ê|Nc#tú²±Uir.vÓŸßg5!Ô‰m“Ñ''%M²)LD²m•êjÊjµÔ)Dk¢ÐëvÝ“Ë\å©™4ÝÙ½»•S·Zݶ_ÎQNþ¨rie £9J“¤!ÖÃp¢ˆ(³à°`èªKZ•Êt‰)28œÑoNŽsNš 1 ÆÈ2Pê$aû ]©:Vƒ‚K£Ê”„DFv$# …w$ îS Á¦¡E6òê# >f2hJBµLÌÍÎBÐi›GM»éYÌ  h’ŽâXØ€Áœ 9JNÓN ‘‡)diˆˆ.8ýxÉÕ¨‚XŽ Û»YclDçJ®PØ"Àºã øA n¼ä$h½ — 䂈ȟª…ôõ]( ‚p®ˆC½AˆâÑà€€Š¤Ë\*,BÒ²ä*aUz†@Á•×+ çqÆ ‚ ­,d€2m†SèFJX8CX,.`Œ ¹l~tý9/„`‚Ê•[ö ƒù!”6>T ÈaM<®¾B5ûæóª0£rœj„#²Ü„OÐìW¸A‚/EAQú1¯g¨dâs!„)ÕC(†*Ô„‡VPÁƒ†¾Tq‰Ìà„@&\úaA0"˜ÆŠ#Ó/ïu)ý’x[ÂÓáÎh„!+‡èS>ð˜BŒ¿JÜ« !ŒMTêCJ"§L4ìQF5B:µ âˆdÆ8¥Rÿ!¨FjçéP¦a¶8)MÁ®#‡æ&¡ê!qê0c´*¡ÍœM2‰bB­Õ;,&ðÉÐ"e°Š(¨ɉÙɧQŽÑáJQX+Á„!ùü÷^›ãPKQ 1 ¸1ÄI½Rò³TEOZrºã¶}nÕa…±]z‹ˆ?c#÷U$*ÇãaD]Ù.ˆNi( ¢9Žô½lä ~Îêq39¼›†Ú¢ 3ëïn&gèf)ëZzµU S¢eD±‘“«dR=èrY’ü²…©1Sáò·˜vw%&_-©© ÎâæŠb¥Ì^þBì¿b¼kPeDêÔ)]é×|ýóºåq°`е½÷3gå¤GÿhÓ(Œ^Ìâ9±S‘¤G)¨ž´/Ș†lb,ÊO%½ŒÉò³:Òß]<úa¡ºœ˜f×ã"• úœ’5‹cù{=Pœ…9 ˜%­Ãe·ÛPTb‘û­MìßJ•QúèÒ­ÕîÆT|C>«ùœ¨Æß•†~’oý|ÿøÉ¨$qLµMI¾¤Ø )´#7­ÇëhÁ|Xg¢RŠ4kñÆ{b¬«ûÙ:µ1Ží* ¤!Á rsµ­§)gÞjÓèUë¥Y½nÖo?[ªønNªç`ÔÎèZ&’‰É aÅ<¢ˆñ:žEìZÔ{Æj27%…–m8¦Jqܧî*Z¼Ê&+©ñL¥©¢ŽíÉ. [=ÝÑ¥AäÃæ„Èv9r%‚˜ŒœÙzP[õj®´",ŽdJŒ)#WKÑf™A'%0cŠ!„:¢Sµ«µ“vZ.™Eͧ&µ™3¨¶JQÌï’nš­)S~ž_(¤ S¥¤œB"¢`¾OóâÅ|þÍ’†óÍyO…bŒ! ŠÔïáZÕnÑuØ0‹¦-F%Ñ„CcdǦ!M¶˜¢²Y?¥8ÅW÷må¥tÕ´Ù„bifRŠñgKۦ؊­µ©`AÝëØ¥êIG¶zúT9?±;¤¯K´ÐÎÙHƒ#Ó´Qµpö)JFtƒ„KšÔ"¢ìFÇ÷¹t„Ã×? Öøc½cØC²˜)Hªn!i¾Ú¨Ís{ùÙÌI¥ôc²Ÿ™*ú¥:JºËÄtˆ£3 ØÖ%¸œ‘?6„Úüí„3ЊòÐ6å-Ó®’ qŒ8‡8šÅ‘W«“ãgî¤â’¤¤Ší)õïjY ïÅ%ºôìñÙ”"îŠ"Ø çö“{×·-"éff¶~èyhç@ÿéU!LþFéËÛ»–ÎR‰¢°Bz».ªlôÚ Ä‘&&ù=tRÏ*ê‰âTƒ9s•)%jÜ6MNª1Ž@Öý-ë‘Òõ½\‰8S!†ôÇ¢{èLüN›Ð¶}¸ø^i”QL$̃!îj\úžNǦìC„uœ¡—Ñ Êëë-´ôJ#T˜õÂe+Óß#¹Äú({r¬Þ˜[P%VñZ§y îÕ‘JÕä¯ZK”ŒEÝ\[ÝŠA]ÍBjé“òA×tÛ#’˜õgΖ°³sÆGô Q÷XWÊ"¹%¥êØS[Ä”ÂÐ_‹–1 Þž‹RkØ®ØS1¬CŠó]a EªßÉ2kÉýä¶’ëu.§VÛÿ댜«e)Ì!W…ënz/Uµ7$Låí'i}Ð΄Y­µsF¯9)/H]vg )"B[”̺cßýqË„NSoÛ6”0¯Û)ˆËë“¥?‰T_*UE¡Õµ%çÝGÿÂ1¹î²JIØò3V9ŸŽ\&¢·õîÞÎJ”„N"™w¯ÿZ;i(ìV©ŠRÆqT]?ØTÕ®?ò:ïe¸Ný˜S1ü¬¿Ñ?Ï—tûh„!ؤ# æÖ±ˆß%ŠJ¦h˜Ù-“ˆ…Ý‹iB6÷ 9äqá]9ù&Ñ—ÝÔUc%„Jüè2Ùеþk·7ÕªFâÛ aJT¼ÂB éNy¨|¡ñ8¾”©0ŠUò—ˆ>x«¦hC8†x¢2ú§Ÿæ{&ñ—5W:” ”°k‘,6 ê5߉¬öólä8äB²QÐe@îrÏu"“ "úöº(†±ù8\kn3Ôþr³©­£r`Î=ƒ£Ñ™Ü—ÉŽïV"ó<¯Íds$[± (½º¥/^Ūça‹Äú'¦ï¡´—öúެܫQWØ·q FfGË.WÎÈãµ˸FO‘¬šŒˆÅýêÚõ"¬J4Š÷2˜ƒ4©Bˆš;«ž’)Ídê¾Øš3Y¼šòÖ°…vš¬»ZXžÝg ˜Ô£Ýˆì ‡s DÒ1;Å%*0ˆAMõã2%1Ší‡W'ŒëBŒðŠhb„”—ÀäÅß’âÓ!9–Y¸Ì1Æô@¤b8FD7~^Qì$Ì3–f( }Ê‚Å.HvĆ!Æâ(a2œAÁNVd)ů¦: D2d[¤µgá‡2…N¢\MˆiA9·ùF"„\+1¢&ø‡ÛšÑ‰ù‰Áð–lä?ay•;,©mÔ ì°"±@œen£uÖ&£+wAðˆÍ°†žõ ¡ Ф3^9 ¨T u|l+q% ”¹Äpjâ8Úœ‚EJ2g ° ‚¡á/FÞg±í ±D+¦Ø|a ^À`YP <'^ËGac8ÞïXÜ1BcJy`á D#ÃŒ9‚±ˆ4„0P"ÆŒ:V(Å ЋŠ#n3‘ØÜý’͆¿db (ÇìøB#.4ŽO¨ŠxZÃŒâ„Q“7†¨ kYÄèøa-ëÉùÈä*/ßt ÅB ‚˜VëUX¨È´1‚("ac¦lëŠE”¡ÈäÈ0à˜Ì%ÄÐY˜€¾#”ˆÁT—C†ˆQ‘©ÒÔÂ8Ž$¡,AB~aDÆE%+pâŒäÒz×btFMJ'þœ¥Œõù câpŽ‚4DV Le¢M$iQÑæ;(eìJÝœg çšÏÌ~9ˆeÛŒ„2rÔSQt¤=0KŠ†ì©µ2 è@PGPaævLÛ±Nn"ÓˆÊDÝ¿±!S€ ßú'ú{üµþ’ÿ¡€íÕLäÞ;|{éÂ{ó“å$6Pu¥|ç%^R¥Ì “hð)*0º`@A)T®ÝÉÁ‘ƒ=#&SB\ ”n;HÖ8G04n\˜f˜PšÐõù¡ÄЮc^Ž," Œ£Xä7…,T+8ÄnJF.„±ýîŒRÕÞ’ ŒNÔ3+yŠàŽ)Bˆ+UÜÑH U#£Â…egY•ùLÄFAˆaAÜZAC=§p±Ù”áqÐŒàž†nά ¥*  瀎¨)Ë;á,:„d ÎV£”)Ñ‘ê¤@]H ˜'¤3½ î÷‚:ÔLùËÁ’"©;£¦ãö¦ƒ£¡Ó ÊÅ!ÔÌìÑÆ)™Ü hBqAÞâŠtv#¹Lò'ZA&;¦½XèrPì䤙“©‰G©ÓÖþÞ##Vä{«™Æ0šíAU Ä)ˆ…â7éWÝØW*LüÕósŸ[Ëúù¨VáNž½Rõ¶&q*] œ™'y +©æ®¾s%X! KU"Q¹Lsy¨EÅëèl7iÊ*IaˆÕ>Sb9¸Zjgúm2ôë¨26ÇK–4é½ÛR„r|•ÙU½i¯Jy gF"2ß0©QÛf3wV×9Œ«n+â#ÿ"uîìˆGš¤drWh¸DWÓ%[]™IÔ–ˆotyÂ+;Óƒˆ…J>D³¬êI˜^”©"'铊M§;·åï²sYˆìÃ%nùc½¾ÛÝú²íÍ#ïçȉîG35f·Hìvj¢4ÜcDõ`D|TpŒIަ×^&`À‚œæPHedv2ìš”$'ˆ•eåþ”+)µÑÍi®G2•ÖÑ(DzIƒ•õÈJ ÔP?R22e6Ž˜Ùª‰Ž¾ò$1ÛbXÓ´¼…ÅåR„!£Å¸e0I¢â„BL@ÇäuÂÆ+1ŠgUÑ„AØNcb³tœPjI¤20s1ÛgDù”ñ À–¹ÔAå" ÙURÎ;XŒ;FsXø­yÐ3>9Èeƒr1–…Qæ„;¬PÊÈbBΙ¡×,|qÒš‘º¹N cGxâøxÅ ´E ˆ‚Å DW yÅqCP—R •k@!z4&£®B_Õ LWV0D¡ð.Ã+¹êz`¼b@¶‡ I?¤B£”A‡È‹D ¤át…°äÅkDÅ ˆ$#d„X„T2ÆÅš%ä;9ÄQ— ÐBk„º9ÒŒÝÿÌbà aà¨TÕ`}Ò]Ķ?  õ ½«‡#¡µ0M…PÐÌ,Œ§2¸‹EµÝD^nɘß"=U8®… AOÐâJ nÆc·ûv0apÊá œJ Ž@V$Ĥ)°@è<,@F!DJËå† Âô y1BGr«!™z{Czäv$AX9  I‚%LÂQˆ\SÒADÏ—¸„àNF]/®E™7}øˆFbBS8´P¦tOЍ¹°"™xyY"HS 0á.* DZ7"\0*Uæ¤ ©lò˜aLf›u(œ'IÉØçQFÈ­Êð®G%Qº“³âêH/ ŒN‰~f§ i„ÊD оÐJ5!ùªòª˜ ÄK‚ „ëô€Z‚׃ˆMx~X3ÌXºá!݃âÑÊS;‡íÍ1„j\A QL& „Æf¡ÜLc0Ü´ÙV˜î¬&Âóñr@B(Ì*khFoÔàñ‘ ¤Ø¢ìs Qˆî%™¡›Ñ˜î… Ö6š›ìÂ& Sb©‡4-œÊfÈGG‡k oÄB™BÍAœü§CîQ ÄÊ$éʈä¾b €Ù1…J$`'¨ú1šè"Ü3¶¼rtõ‘ `€Jb°_Jí}ØæÍú: ƒbkÊj6ØQÚÊg6n„G£dÇR8¿¡4ÂS2TÛ2Ví… ìµ²‚ ÆHR²Ã-Ï”ÆQ`Z8‚Ì•“Ó·?v ·\“%dQAˆÄYóè&ÄF|$'0Ȇfî)Š,I™AH¬’&<~% ÂDt-F0œ2¿êtRçž‘ Êf™ÆpTRâ(D¦„¼g™áPe£ ™ÂH£&%!‹\qÞ›3†˜†`bAá‡'S7$þr0bâÈ*rº¥?n(›'‹Ç&Q=Üè&Ô0!Ø5Ì£#x‚†˜ œt:Ð%ÏyJc lC¹ú´f]*þlÄ4’Š![õS”Î~$ì! 5WX$Q‘ϸ›;Ÿž,ŒèDð™s3 qr3ä®› $ íÅÁ+DzªH"s&eôªøeV2˜Ül”5ÁìÝe;#q!²“* *ìd0Õ²”r9#^Àbõn) °u4ZÕ8VÄC@…»aÀ~¢ÄÄeÍö¹PÁRâq´™T!u:Láx)‰f9‡¨Æ AS0@$)gçuDS^ÛÊ1çRbsûÞ…’Î À],s‘ж ùL¡‚Ó³=¬h¬eŽ'Áú¸Ô"RŸÇa$‚Ž Œy†1Šá™^\¢dróê,Øn!‰+"2JS3Æs½†4(Z̽ Pf}Ö1’Ðl2œ÷0¡†¸ a„=Eáac(¤ô`Ô1ÝhõAÙ! |‘z ÊLbŠ úõ$Íî|Â87š&Àe:— È1U#¨™쪣•—¤j0Hæd(ªc78êAÏÕb‚LÈÐ.æN¡¹ˆŠ¼œ¨D§²'E ‚ìq…j´bœe  ¿A 5$˲ƒT Ë2+EŠ`øQú½ÍBº˜‘fª¹‡SBC,.C DÑ[Ò¢jľˆR:cFr-aÎfAPŽ¢ ÍÁQ0à-£üɘps±§\"GâqÙŒ @­‘ÿøÉ˜%NÿÓ?ÿ@ h ¬ t´ìý¸”nø0ƒ÷å†t˜·oC¡„\i±¸‹˜l© b¹ô‰næÄlÂ:p÷1™˜ç!JW#m?ßY¸¥)p…j„ߦQÌÿZ,ÞL²ŸK+S¹Ï.¶q°îî”ÑX›{’«Q #QÚS)¥kíÖUV"®bv;e¨ºúËzŸKý-îs­H—Òf!Ø¢gS*§ŠCk¢‘ ¸ž²ÜZ•¤#* „毄_!–Gn%"šÙ%>¼·j‰1H®Ê”IJg+é¨ô™¥ :a—©JW2ÈB«úãúJ3gSP߯ß'Si#;”£¢z^šíev#·h«÷N‹uó)31˜”¢H!Ñ{tBQ÷­Qyº¥9 Ü«¸s ”zü™”)U2æA‘Ž˜÷F9´tÞçw«-ÇÜÜyÝñ^B)QXJ󟌘¨‡EtN¦67FvNCfÖî!r¿ û_Dö1‰¥îÊ%ª[!51ô·Ä%Ÿ_–«Ò†tÍÒì¬-^ŒfjˆÂ¹ÉŽÆ©ÌGù;’¹šeuµ©FÄòÓ–L¬„Ø’›×yLˆF³ Y)*JÔs#ïÉÅ_Z»?*k*"ˆRý}7‘¯ÈuÍ+H‚XºFûi ¯ºEñ*QÎR¬¬æ© S˜Ê©ä„ºÒWùyTz¥ 'g#â;a8Jm'¥‹VÒÑŒÎIÓϾGá8ˆ9Ù„Ýü®GRB;¤\måT(ƒ*KŸM²>l´­6î“,ëº=9*BéKcx¾¾´%â¹8¸´!ØŽ½¬ÆO}ªÛںͶk.œ%mÇù’/S6úÞ)Î$<7e6 Ðúˆü B Å\GÃ@ÎR]T% °e#…kÎs¦ä‚‘ˆÜBÄhGgQ–„`NÖš*@œCù@|ÓŠÑ=@æôVÍJ„2³<¼e‹…D2®q†©Sm So9 ãCd,ñLFØCr:¼–‘b tdİn†œ¬&&m(7Ož|Ö|Õ{%∅ØÒ0îQJ!TL$*@ ”¡ÞŸ !r !˜QŒÅÈ‘ÁÞLx…L£Q΀³ØAŒ„“Žê57 wCª+"#f25„5ß›AÓÒ9 lÇhË^6| fP¿¨’ÓÁÉ…G²  (…Â(JÁq 5`Î ‚q ¤Q ê@@û£4)äÝûÑe /à÷‘ž#S´EN#£ Va©!ˆ'Lhe ÇR³Njq9¹ê|+ø!#- ‘êä!P¢^ŠÁ˜Äv)¸šIk½1"Ÿ—AœÁð%BCNE,ß±ÚâÍÌFf­€Ò˜Q9›0!_,¦1¼Â8,Ü"*2¹¸îñ”à­L‚¹:!Š^Àb‰îeæc0ÄJÛlbzŸ„˜…(íšGé÷D;s£™æ¬¯FBJœÆ£ ã&}¡%ކíÎd'Cbqxä%ö–‡{0•!jÍÁ©FL‚A€„‡Ä i²FCDò: EŽŽâÕªVŽC‰ÑDÓÀ‘— ¨¡ÀÊì Ó†˜,qDc…xŽÃlQùE³ßF!¶ýŠ¡m\…!ô¥RS8Üĉ•Ù *‚v .>%ƒÈÙC3R# ŽaG"Š+•Xy{!Œøð&Pg­aD¡´&060CAF!‚;ô›-d:”ü‚‡¸(ãâû0Pk¢JT¹*)† 0œÎ%N‰ÆwI1*¢ØóœöÁd*&z1sXèZ8¦"/>%•½G:©$DÛz¡¾¸2V«3?˜¸†¢ëqɤüyÑÎ2¶,s“1q•F¯YQÄ¡­œ¨ÛïÉ·ªò2¿mDb録¡H+ÖåòmÈ!Dz}/* RXçßÓÔ—åòñé„)žF³eŽ ŽïTp®RMuõ~0ÏÝö5½<Ϧ/ýåd¾aݤÂå-¤#%^é÷DGÚåF[šŸs ”Qsv„Ô;§É •%(^ò¥Iø\Æ6çÌB÷šÍëëOLa»¨CRUÏü°¬l# »Ã³*]tT…-Ê9Hü­åb•ö©”¦|çÛéý_‡Ãg#Ó×{n]')å#šdÛ ÅUÞqŒÃ«`—wšdÊ¿(ŸlVYgN¬Ø!¥$ÈÈãªäµô¥Ä0§13kžÄ0NÇ©]T»B 8ÅÞùyòÉèo`ŠtDÒº‘—{˜Ä?tµµ4£t^îÚÈZ´yt¡…_¤¤J(½`¦+;íÕò«_)2˜r2çEûÑÒ Š†Û+Ù“d15qÔÄùmܨÜN’·‘®Tϧ5))ÐæöÉ«¥ ¯i’9^çÕn11ª@í„ïŠùkc`ì¤tÅ7„3L^tSv 3ì]²f®wÌ"rRuQeÿ^YÍ•Ñ]ŸìâM=M’¬ I¤E£“jZú­ž Ÿ´ö'|Ôu¦£+¡C×L¤u§ù\Wr¾J°Æ)Xœ’5J2V%PüñlËœ'[lõ¯;òú÷¬¬¯uêômÄ„1ш®Œüé¯n°¿ß„㦘¿çtʼnl÷B?ÊAÅd¶ã ¯»”LOÏÎßk”§b_Ic¦q­Sákz!DUkvTc ¤ôvZœ|ÙÊÄ¢™»({º¯qˆ‡,Ïe\r î"18ì”^}Ut6š½'ý*G97Rè3âüÅÝ÷˜„Çú”‚¯Ðm9nÄïô¯ÞOÈ_µï©¯¥O©/´[91Yš}îÇ pf­téWdZ•7”I ×K"í=¨©TÚUÖîêMY‚j |"z’$Ïâ¶H%—YùVSçºÊ]2õÒ‹©¶iŠddñ|j-ï8ÎTQ}óÒÑZï2Ȏ믨¿É¤upâȨšW¹jÊFi„ŽjžInø¹vì-<–÷ øÌQ0ª†Q©i•[4{[>ãç©3HUìÃxßùSUßÕîNÜ¥”•jÆh€ŒO Z Þ—Úå^SQÖ„‘öT¡ Õ*–SX,×4ê+LD‚Ä–Æ^¤µe•5èüÄòN>ýéªMR\Ò%ÖFñ¯žÚ‰Y•!ÍÇO+U•ØE2Ñ&µ¢ì R‹µc9ißÞW„!À„7WXËï7†âÝ&=ƒ2ØvDñd\–sû'n¥_(J“¨D”îÜuF¯ž†®¯•ì¬û¬üœÍïèÜo2 f)?{à”rŸªSœ†}“m\;Œ#‰l$Hðñè0ŽÒ‘ÌB~´‰_}adTW½].Çvq u-ØŠAˆ£ "ÒÎ?’Ø-&‘:µ7þ¶U¤àpRà=™Û¿b^û”=P"˜…2•(ø&µtúÙö"õ$µÁ¼×ªQ¤`Ã…‚´$š04$%‚6|+†¼íY)uÀ«·PË|}„Ñ$!ØN©³Sß•ÒY·\V¨¿uäz‹@žÕ”ñZ…B!QSÞëµ|³Õ$-d-%&ø’±aÖ!ðJ¢h¤×’úØ+ض©$úàÅÓ1g(ç8@¼Y³Ï%å²EA,­æ)Èóp¾E•ßVšJBó&¨Í õBÜÄ‚ ìnâ<ÓuD5&!\â$E£ÓuÚÀÁŒ¶¨ÉöTrèæªºBÅsÊí´Gϵ[•ˆzÒ)em’(â M\‚_ê0áh¤°¡ÂãlBãŠ^9j¼ÒÂL²-'EÅ£Ë6}ÑShE+D?¡‡^ÈœlJÑ2®…äÌé-ÇóÛß”¿W°˜©¬K8D § \,‰q±,‘l{%D†ö(ä¬BŠõÕ/Gÿ!Jtr™XÕ\íÉÉk¹õdJ’)c"aš†…¼ý Æ£‰·XƒPá„›Ö:,8A nårT† îåB°©ÈMt_àNÏ¡¼qñqMõvܯA…‘,N ¢aÚˆ“˜äŒf¹d?lŽ9#ó¢yZðIv¼b& r­ªü4õixÍ´R‚ä_kH'5H ¡HBð7Ê„)pRX’:‰£%ì#Ä¢——}ÏáºÝ‡™ê[¦¯ùï,²(…ÚI* G˜Ç2‡þ5Á°–Â/Œã¹s.;’?&ûõj tu"ûÔò¤R¡Ø Ç‘n÷§t$kNqxƒ0· <šCýI€0X )‡½–yä[/(Õ*$ZEu±Mzäô1,›±´Bñ}/jÕØ9N‘Ê2î¬ôú'’ØmgR7™étäZ.2Ù…ÂêRe¢ÛƒQsÛ5㥮 àuù¿Ÿ¦¦ƒê1F,€…¢q¦’,AœËÎúÖsl{ußÔQåˆò(Ÿ Ž£XŒblå ‹(Ñ_Q(›|òˆ,áÆh[(enb×ä²Xò6&˜W‚Ø.ï6IrPÞÉbÝ !¤~ö l㪡³Bn£JÅ2tÂöÖZã…qÒÝÍÑ"RV¤ØlSTòÁ­Q\ý1ôqD¦}îäŠêæÒoE8ÛÔbj“'ë]eKëõÈN³= !‰¨ Ak ¸€Ô=~”V#¦ûC™"Lù^…#p8 @,µC˜[8³É³¤£F1DzR'¬‹éö^ÒÃúU;HDôB«e$!ÂE¤±(›w£ÿR‡QHC¹JÆYAÒ˜ˆÀߨ•ºˆ$´V!°Ñ¾¢ ¿¢,UŠDˆžÖaó2. !æYDIˆ‚¢rH<ãñ·=PÞ;Ì5H",áÌßé\@·£…]«ÅY˜[žÆžC-nÒÀ``˜aÈ›BIµj¿ší-|Jv¥÷Ë’UžÇ³ '.¾âÓƒkœU–£BãÈ7Êây[Íã 8ñK)¹Ô3¹ªQÝ$²ÍY'1”Ê÷ÚÝE°'š¬1ÁM`èá·}cPv­ÔD#)K´—߇X¤/•?†Þëe †vj¾?0K`Ò>5nh‰Ž£¤„¡ D‚õ”•0‘i¡‡GRÏ^¬q ²•µ«åòd’Éoä¯bVÊ«Â5†oÒ$E8b£‹8µew.éFsöÏRP©a0T¨NI ¢É\ñ“ç(‹˜RT™õ§ÑRÈÿ#O G¢Hj ›µATÞŒˆì涜ӑÂQ„5"¼É½RÖgb`”¤º¢Õ>åîç9C™ŸÂlC!càS ÉçC^d15{ä&¬G§›á6¹†ï229›’e³Š£ #T÷íùה̗T¨Aa ¢†/¾L'÷¨¬‡Búü³Ó ŒÆvr Ã*Ú’Ø¿ÓÐújH¤*\äu\…iz’Òˆ îãÿøÉˆ&ÑNùgù³ú ú¬ûUüüÕýš³’¥Ã¡Wusîypl0Ë ‘*M‹‚T„A†à»¢XÙF‘ÜÆ¤*V4˜[Ò³¯É×1ÎuÝÒÿ„pùÄ1zˆê%‚½Ûírû*ÊÝšw+Še¡»Äóit5U(Z?ÌÈ›ªêå¡Vú©XPw°„X¸ˆ'‡Nj9B2sÚÖ¨„Sþ§ÒÛÃþÃ)Zzص›Íw¨¢Š1 «S\]Ä5&¿ˆã.‡X¢íÄèµ?ajMHAÃŒiå©’Òë=óNÌ®LÙiäyð=ŸîW4)®uÄŠS ‘DH©¶â V¹^#Uá3±Éì㔥#"•54%vny9Ž +¥„æêƦº«"¯§)jæJ%šš¸Vó­ŠŽ›‡¢“íµ¶ÒW‘fv”©‡ÏÅšQ0‘(ô‘ˆSÒÂ$ŽUñ¢¨MÅÉ„oœPp$XñÌi/A˜K ¤ Lüõ¡â Ô4ç“óýúŽ¡ÒêVFÒÈúµi 9‡V¨]ÛÙí®N‡#²Ýª›E)d@¥rÃÓp‡£•¸š¨G¢ÉBe¹TwÊ­ÞňÅq‹'WWá¤Æ!–(AŠ­×t)®n?K†h¤r4‚‚Înž¿kIopɽnæÊŸUz„Ñ„\!Â, 8xÙ²Ÿ¿­^R§ÇkE—»PJˆbv˜dî³%ˆ D”ª{HsŒ®1¯I jV¶Ï!p“Ž„|ˆøÏrG*LÓì’ʾÌV9_³,4iâB*bû•Ït9OÈ0Æ4³[4û‚7.B&•´·ðòÚØ!J2 ÏD«ïÿgI|Ãw )•ØäqÍT)°m3õ"0áo ýkœAó2íãüË+zÓA+¶Ù¯CLurFºiÙ —KÐJ/÷¹SŠôb„7„ö“É(¤±ì¢h”W‘&lXiªl¤B\ÜjPþIhýd,ìB• U¼ÚÛ·°´LwAJ(ñó?ÉòÚ—ËiŒq†^ìï>7uù]æò¢ÛÖåfAÐÉì¸Äªö9ÂàSˆ‹š0·ªú¬BD¸å;áo×=f›ZãU éGCµÊÑ’Ë)ÈÈ0v+WÅ×Ãö^ú$Žåp†"s‘c’ÏD(ÒØµ+r6Ó Ô$íTª#R˜æTr˜Œšm5/&W¸Ó¡ŒUQŠÏ_¿>’l¬aØ„a ˆZuÃI®ÉC¹G¡†B¥/.Ø”+Å<É8Ž ' ¡]o,‹J›ÄfŽÞÃèÜ=l4GëìÊ3ŠTæô E%MuІ1ÊÖn Dz7M2§ç!×5ʨÈ#­©§¢¼Šà£ŠÙ7ˆ$×ÔJQ݄ꅕÅz Ç(¢¶aëx\*j”9]_§Yª%p> P¤1 à¦Å6¨™½‚ ú& JNSN«Æ+®e‹Ï®&-Ô®½%Ý[½ 6fP#eöö¦ͅ׶V¤úÕNchç ¬ñ+ÝÂ,è*ˆ+„/’ÖéôìW_9PWÿÂz`ƒB|}§(Ú•+Œ1 Sbìœ^>+ˆìeTT2);(Jž©ó)\QJa>ýý~¾J(B¸"ç//a92ƒÜØ‘yô¸¥£’(ô1T¼î*XBäD’ý‹­ÆÄ"gó«’ä"ŽMëcÚHÿ{.nf•3Y1‹ŒÑgr¨…b' K.´[uð‡A©¤©„z`¦;SY¯ÃlqZ©²¼Ü¸˜]hü´æ[$B'ÝZô‰ÔD8†gÁ -Ö5éj£´„ !~.›ô_*ÇY¸ûjâG!ÌyÜÚö Š êRÜCŠV…’•Mæ!ú»¢˜›CÜ›‚Pº5›,m䣜C;ñ‹íô©.ÍâY»î¨ö.dœ^-$Tp”r<—J´£/·w•BµŽÇ,×7£Ò†­Ï¬&Œc ®)t¹MÕ¿Ûû$;‘ÝÖ[=]~x¯RHÌôíé‹â}¬¢Ð¨¼OhÄqLå²z¢ç(Ò9D'€¡Š$‟ –º)˜Ëdn²®I¬Lë_,.VaUÞ)„Jפš2LS•’EŸßâa£)irQ \4ÑÒtò^´š^/uÐ+˜RŠzvÄâáKŸégRª¦b]U ”'!Rȵw9Š24òn•Å¡P3Ô©"öþY‰cxˆôù8ž´ÆÏÁ¯äS6 ›"ÎïV!šâVv,ÝÎ%²á/*¬¢­ÝNâɣΟ?z.‰fgl¶öÓ®ŠB¥\ÅBµei7[É@íˆnTÛ)¥8…vLŸg³y´(€ŠBß•3öùMÄ! •TÖ#Ä%ôÙMBôº•J„DF,ª$ДáŠeÓŒ‚jõ1†BÇZ’‹¶“í¨2†%”‹² wÔcB )ÄÌ=·ÊK} ÃÙèÅŒF¹*ÉJQoÓîPåôÍU„•òéW?ˆÕRPWÇ{¡ööZd·iIDDWÒýÉ*Öç¯z$Î[ÄY „KŸ…ãvVÚš0…ŒIÄARÄ÷¦ë¨œ>IÖÍäÏ&#ú‹æ¦ªÜªB„VRóøüM¨º#ÏF‚”ª*%©‚û|#\@ 2|zÄl‰íU%C2.q9Z„Ô/â½éH?Ò‚xS…e¬6„ÖÀTã A(õúzPŽ#™¬mjÎô«îV9kk{Éœf:È)$-´~¢W2´|’§±V(þjo¡3dV”Š•}0ü¤‘’cáKf“MVHɬXÍm©-1S Âm~‘%ùEr,‚]QßH­æ$(‡þnÂosfæNBœ‘Š›–K Ô¦LÂû–¨@ÎèyuvD0ŒÊŒ¢D ¹„Ï”éQ¼N“5Â2äµ+—ò<ó™3ÉO$¤/"U²n\‹bGAËn5i©kT©“•žï“jŠ–YKê¶AÒ弄ªÔåwnënBH˜3QŠUÖ¢ª{rñÏqœ:­™ò½U•¬j-Sœ×N6­½%Ç¥]º•–^µg°‚*ËÄŠÕõ(‡E1‰­A¸L¨È!Åѯב,\øªŒ³Z¶Üõ3HUª61+-þâlÌ(†ÉÉFi—”o2Š­„R]+TlÇä»bIˆµq ÕIˆòõøäÓÝÿz-~H…!e14¦ÒXèWq–©•씹#1ÒªŒyÎJWñÓe§Í¤Œær1ÖŽÒ½Ý÷Èù¤ÞÉéˆò·"'mß³Ûê®V{"áKo¦º”ËB±¨ÊÊaÚä¶ÉCjï`‰ ªR=—i‡õL±£ØJžß4ö÷;¯9GzpT·}QÀ2  ¡§¨ÓDãˆÿH9~À3èÌ|6Y(BRŒ´Uu©$=ø´:Œ…2P¥oî=ÊTcÓ+fÇ’¨¥M­¾¯Òg%ƒ*­hJ)tËâ¶Y)MäÓ5Ûc»¯u—¢ùœFÉéB …ÍêŠJ}+UÙ*¤WÛe•6l[³Ò§ÅÚ1jåðî•;/øõr2•ß~ÇBœ”_qN´›«ÕElM©v’—+¦©wõ­”§vÄuGI‚¦7åE8‰ˆVÉ>,S¡7èF-ë²ÅÉùèÔj_ÅLì>y4·KîЪ2n2##% å]Ä×Â*)µEO—K²œžÚC¿=5y»âÑÎÌJyt¿ù?VC¹Ìc؈ß^Cäl¡Æ3j”¤-xd*Ɇq»_J¡h]¤ÿ„³1IZÍjŸ&ĺŠEòAúRJ©Å¯,Çuúêˆô¦"E±Ðírß/ÜzÈ;—o¦{>SÜ„òpr‹–L\™ø×b¿¹SÿÊf%—C3Xe¹×*ß°ÙÇ"š’5p}+VR/ÔŽJ½2Rݸr¡QbmVZ‰}zµ.2’˜dG¢÷n-)œdY‡zîЦú?1ˆ:¯ÕЊ"Ñ<ï\GMÚ+ã-q‹wÔ§î¨6e×Jë_F²¢¦VB–ßRzôãœÆÂ£ #²a«”>ä¥8r–âe‹ªÌÛ„»£öÖûr°²÷ªKÕ½tô“èø“®1EQ>F«- é#¹œÂÆ ˜„]³ÔLöðËCiíª-fçsmDÇž/œBHD²˜v"Ìù»®{(V2¥ÔBTgÒbþòKÌF>}®&+Ý0Õ©Â"sW«¹-R±yÌBr(„(¥T…/"ØŠ•31Âj¤…Ë…E¿Gš-)ÙØ´—¤=é¿A-"{òN#öÎÛÞŒ‡(g9–ƒ9Ù+\Ô\0…W*fWô]¢¡­Qyb°QËœ_±]ÈvY~Å[›DB •J.ÄJï9lG’×h´dÓ•[ªeÁ[Éê›ãNV$Ÿ2‹Òyú¢w~†=+Îâágd•S·;nnDK%$#9;M’’ÒBÕ&:±›)ZfXýŠ…»ŠKá7âŽtöm³ex«ï†J—ܼ´¥ìéÍWL«Iµ9µ d6©)–ÇUˆ]悚â›C~¯®!É*øVäæ’ß)9(¤”œƒv8¶T¤åè^/>aÌ8¯ò,¯gÇ­N°w1"õ=·¼ˆR/$Þ„ªv3) %ë{r®>S¨jß.(¼YŒ"Ü‚-F7•Êb\WÙƒYjƒ®á7ø{¾Zi+¦Ù[ù©•Á•þbj­wDìê¢=²s3Ò‚¬ºê‘ êAL*ÓæWt.ˆ*u÷¥DA±fZ6[©œÃOú˜øBc™Ú«U.Èm ‚»Jd™xž§GOb9´'¾j¨ƒ“s¾…ŸçÞ+h•bnwÚ»‹„ß)ÆU¦°Ž´W!ƒ‘¸L(Š„gLÖLªtc+>wLOêŠF] þº±¹DÊ#b­]›Jågýw¿s¬FÓ3!5,‚!׊žBЕőBv2HlÍTL¯3Ù³—/ò)‘-LgTÖË8Œ¨2#˜æ_‘ ”ò|¯£NÛûÌ/×êb²utˆBaþJ,ˆÞó8V9úWNÌuý¦ª¨3©ÞŽ&W“Z~ïLɇTÚQS›nö»+îT_{”Æ}¢&•ôB*ŠèúÕ#ÈœN$5!Vå›+f3nRM6æ›íU,ETôrÈ#•Ôv:¼®ƒ¯7+c£T‹ë»Y?°t3ˉIú[ý Í~ÝÝîKåP­é³ !WžÃ©jëgj¬ŒAE{–®J3ÈÅÌ_ßh”)8=zBæìœBæV½Åc¥³´c?—|‹gÙE°Éók/?)]ÚØËtû§»zÐ¥ÕËeE§¶sà‰©—â~žv±bÅTÕcå +…z-)+.á)õÚLo‘TããŽU’@áx¦vçð0F]îÂÛä>NfÄLÚa Žº&A0Ázf!—M !ÃŒ”c‚Çð@Š„'Î:¾ ÀbÕHS†ÄEhbC Ô¾˜³ûò)’±ëÕó˜‹NR‰•7Ü$Êk¾ygB1£wlËfµPrçûä©XCR•üÉ*•Ç·É~[–¿µMqž¤ªYîÄAŽQc#/w Ô4¥]!=Úî¨ÿ¿\›j%^—dõõS_Á Ë2NF{‚%TBqv´ ˜Aáï¯W}d8ç ÎèE6&ⵞE²î9P¿¤ÛÓý°ŽÎªr¹ önëeÿ ‰¦¢-Ë*c¨V:®Æ¹p¨Éßtm=0^ iqf]½TM9DuBºujÌu¸ŠÈ†c)Ûofô&L²¿c\óÞ¶½}ˆ&Êù£)d6Q–! ¿E|Ë E×/)&efÍmËi|bÕä•*åç1xºÎ!jŽ"æ!Å%’Äâ¾>WÑÊH¥) ØfÄR)SRÊaªÒ¢6ãwo$Š"få\·&LÜ£cg—-|ak}ö_êˆR˜Ã•(²-$C«Î!Ö“Ä0E6â©iè…B!0“œ¨z A:_¯ý7>š×B•=fMQ\ÉUË‚ÈÞ!¬¯žJ¶á^Ž¾ÝŒµIŒGD#38˜¦÷ïþEBFý`!òŠP‡_áq×!¢NLª È7•á+µ0‚˜T/¥1IIùŠl¤¨ æüîŽV‰ð6E —˜ƒÁ(íÈ&c·¿ed+㈴ùÿE!¡»" A¨‡ÁB´Ð#’¸ÜF9.ÜÂq¯Sœ0»ß…‚ ‚D¦eüŸE*F(¿X[7 LŒ¤uߘéˆäb˜â±YÓeTÙÜÑÉy™T‹S8!ùï kHpC±„d±MN#jB5<ˆLH\¬gêB˜¥ƒ¾<`(DÚfäPÜ%c0JvºÀ…ˆ”ð I@b´ÂŒÈŒFîoC&"TU‡¤3ÌÖ».0¹XEr×ãËMö‹“yÑÊâŽW©8„£þ%Iè|nªÕ˜‹1µsÑ Åk|ßÕÏÆ.§¡I…s!×Ý®[¾sòz-F®‘µË*z‘¯Ž­A3…îL–V¢•mÄ;Æb³þõ9è’q–’ªëùs1ËÞ%–…:NÚe²ÜÉC|‡ðš¦¥"L¤‰„~}“¤¼·×9Í{´%ƒ¹S,êS-HLnEGÂLýw6ýG0äkSGŸMîY¯Yi¸‘ ()C˜"XÊpQ‡RR+Q÷ØÈÇÉ]}ç-«.O\©/å—ðB¹‘¶®YÒr1”’¨¤aãéw–Å\þ}no¶§ªÓYÆcªTÃe 0Œ$™*£é‰_éV&U_Éd.4’éÔ“^£©)ç"Yv"ˆu3Œ)d2·a/®‰©ŸKáÃ%š%KöÛi*"NêëDq N³Ž„0†|¦´ß¿où~ù$X,À ·†sd‚ îŠ :Ç‹Xþqù…ì)u*q9—I6äš{½?}—sC»ŽAD„a*Z’›2©òÈ+)…SËø·…úE!|L¶MõRù‚ŠøkñnÈC‰t”|»/Z¦ãAxÍ4ñ*ß>5¶)Å0gD‚Fðwį}Ñ)b±´”Y{D¬hôá{Ä¿½#Ý®t£Vc˜‡)"Œ¸|Å’ë`»A¢Ý†Zssn:M¾¹j$ÌOŽˆw³ÒÍíqÊT¯åÒ¥¢d[%éßÏÿß÷ì«õWú¢ý’ ?²–ƒþ óÞýîúÐΈÍ,–£ëÝ®Dmý;6ýœ¦De©ÜÖjòŽýü·¾Œ+HK:J&«áÓq~••%IMF!2«…¨”%)­„-y(ìÊAm&¹)ËE3¨®©ô%ZFM5%’C *nÐÌži™–iäGX§G~˜É&–(ˆ¡rSa'µÔè«¢éÊ+ÓèØMˬ„wn…ù‹Ê/爄ÌÜEçR4üÕ=?˜¸IhæaK²¬¦¬¯•¨†zñV˜‰MÂÏ«2ÒY¬óóU.Nþ"5ê#™iÔm›WKÊû×¥¬ë5:ÉÛëɆЮÄÙp…œ#°¿¤hÊASQ…¹E}Å¡ ÓÅÿícâºdÿ1†FÕ!~ža›¢¸ä‘>ºdˆNÌ:¹9Äv'bŒ`] ʪ…%2JA—8„”*B0DCG ø+&8âã üÊUeç'a!F¶8F/°„žFƒŒwžÁÉÊ=zà*8«ÒV'T„Æš¡$ øŽLÂÑ(h¤bÒŽ „5HœX@`ŠôàJè9á38%ñ‹T!Æ“‡y… ”/XÝžÇË™Ç4â:`B|„6 BU£2n¢AC ƒóK™ÀŒz㣜1`… ˆ ”0gl÷QCJ+°‚QH+7Uq02, ¬GlfZè…œLD„Vê;—– Á^¦C²˜ŽHByÐ%&³12F£UÑCM ¹`lDªJÜ㯞È?QRˆýŒbS†^Å(‚¡Àd•Ȳ%$a’¸¯Ì@ ‡2Ò‹Ú¡(g)`!¶ á9žjq¥¥~¥Åìw”Ät:,cl}Œ¢#2n ƒ˜ ʤY1ClçS•Dƒ_Š˜Z£ä&&öcÆ)Ê%LÅôV6S#2?àû9‚PÈPgTQR¡`Òƒ/‘8„¡‘›¸ÏWCzÆøRB£SXŠvsª%q3žÁ F>ùe‚åba™Pž5:8úŽA{T½Q¹D Ö]²âˆvØL@#ÖPâpŒ Âýòpi‘"Jc|Ãõ3‰3ê6â=㌂ Є ƒÄ70ýˆ‘ÖëÀ’ˆ!¹¡›’øIÆ0Nn:J„æÙ¿ GB¡GQó”îââ¨A— ¯T¤ Žu%¨Â„ª+¸t³² ‘̘C„{’FûÃd3D†„7¼Oiߥ%¬-VÒü[*"äe3/LÄ„#5¡Y h~ÁJ¡ê c˜öŽ$ ©w"è‚)Tà ÐF2-e 'c› Æ»RSÔ'+=×8)ÀƒA+! ™œ¬>¢NAqÎýt‡1Ø! ÄbÂ*|¨Þˆu)Š1:Bs;+Dl9…à‘rØ269ùˆm#'räÂ?ƒPf#è pPAœ®]+6Ÿã²n+ `¤tr?؈ÄΠؘÌa¬\£1 ®Þ ëÌ!xâ­—õPŠBT$f±Œ–©°‚@ŒlîPäʱï J9J,Ñ2PPQ BÚ;ÅB Ô‹"îÍ‚$$-¦ 1ôU a @E0¡Ú“r÷§g#x w³Ó"›©ÅjB:ñ´ Á¹„PLÕN˜Œ¬Ö©Í 4Ô-+ŠO]°¡Wì¢Ä0†‰±¹8}ƒQ%ÅBpuúnU¡fDq¨°":çP äƒ#ŠM’•h¦¤ Žu0¨ª•†d @V=©!aŒ †ŽU"ѪJüóp„¶vQoo Pí‚ÁŠº2Q¢܆d€Œ@À‹ê"TBv|U$”-å#tA#3 HìjÍzÖTcÚs©D\–|EQˆÈ¥ s NÎ%jMW°aïÏ’ˆ#b< îÂGÎîfIYEÂ-@!„v970á¿Þ3$ ZÝ‘û ’Ø.óAHC¸L”1-ˆ€Ì êƒ1Ö éÊ8H!Èân ¬›”„,ÿ(’èDc 3•î- fÀAÊ#Á5£-”Ú.Ä)\-LDl„9¹=m‹OŒ18xB±„ð‚cbRbW$a™œÐ0ãS(ŠhI 4¢¡G€¥0â¸è"±ÌtT¶µ¨eBú…3Æ1€IqF™ ÆD0¸NªA˜ìu¸ îsPä: { Öð‚#±sã %Á¢ÖÁêvŠ‚À¼ †ª)c³Œ—ç'‹2 …ŽLcbšcÙe’b6äÔ"?ù¯@G¹ÏÂä7•ÝŒ½‰Æä^Ê* ›n?ÔEòõ<ʆôç7(F£JuoÈÆ*)U_\DÚ]±Ör*_Й‰GÕMÚÛÕ*~ã:Œ‡## “Iꢢì)y:ØKÊã«–W­B%ï'wÐL·ˆ„±q‹©¿"¥<Œìi<ŽJÞ…XGɉÖÑÅj¡ ¸7¨ë5”¬´ÐŠ¥—n*akb©/ÕÉ!+¹åbn\d{êó-ß|†DçŸWQʪ+iSÎEê]&k´¶ÅW›D#k#bä¢2nN*u¨!ßÉж£«æ±:mTi²Šç¶Ð«Õ–Ò¤|4‰‚"¿ÿ¡<œÔn£a]Ëa]Shk9긴åt/ R$ín0„>C³Ý¾·Q÷‡½"UŸŽ)‰&+:öSJO-Nš†+Ýêç9øsžGé•-ß\‹¯M.»{bøß˜E“?Ù”ûØ!gÁ˜Er;¢œ—õ1izJc²T¥O¾J1ž˜† ÕçM¦µTJï<¶ÄfÞ2rãȽ„¡Û™ñÑÛŒrU}UXgõ]”„Y¬m‡wåC¡{‰²ðfØ×tãh‚Øö±u±l‰œâ’Ä÷Ó"ê×Ö"³E[§|­Mè)FÝú•z‚W}ÖÄÄìR…ä‡:3Ê×J³µÌGWfÔß7•=‘sŸ©¸I<–ÏM|*Tô/+”‹G{eºC"õHÜŒ¶!DB’ˆ­ªI$r¥Û+wî#ȪY®!ªgB)æíªéýIP´Ú€QOÿøÉˆ(ûN9ÀÑ^Wý¶ú—÷L³’=å/§t(³|†d8ª#5Û+–rmç -ýK)=IU£cH+á>´’ϯŽE1C”##¢Q8±~ž¬Õ#V|8–Íõ›õ»T$^Ù˜éW2·ˆuå(Ê/‚¼’ЉšSk[pÚj”ÅMò§ÚÕJüfÊ 9Læç:_fµM¹*Ì) Œ2uç¹=^…müU\‘Ì›û%k]Ch£9Θ¶CT¹iý‚Èž}Cî÷nÏQÄ æ˜iýY¡¾°Â9’0T3”ëŒõÒYh¤BŽžy·‰¯!ÿ)uÿ3Ùý?íö¤“WTä9ÔäœÈÅ!›Ð#!º„1óHÙ”±ôܦ«þ¦Œì×DöU¥d:Ê\™¨TJŸ$nË# M7Q3£Bé2XIûEÝœ)ŠW)1®# ^sq #˜â•r,•¥†òažë#é§J:#ÉÑï=ÙØ§UŠDž¼G)%; ¢0Dš—’†’}sþ¥Íä":^”—m¥ éÈ⣔ªñWhÖ!¢‚…Âí;ÉåMºÛ’Ì{%¼þUO?ˆü¬E2ÌE)Ü®ëùA*N¯íä7/½ÊËE/¯''«`—Iœå2(®ƒ+n_X‰¥ÜBy¨ºWÆKzÓÄÚáX:2eT]ÙI‰[(O‹`Å:¯œB&nQ’ô…YÚ (qDÁï¹\¶3i²¤a¸%6kšÚËg»¯1ZbHAG[%+Èþ䩉"YÉy½uhÔ™5¬RŠ–ÎÆûY«J÷ݘŠur´Š’(ŽJ&¿âÊô"b>l»%ów4+ 3Ÿqqh:÷»¥MOï5H‘JãèÝçÿý¾"âĺ/ŠføË!N¤dlëíU0‚u‚^Ú‚oP×-,'Tõ$…ßÒÑmpžÔ¥0ärŠ+1SëÈ襕ŽT”JÔkž®§l¸¹‡ÀþCÝê·>s3V¢‘ñQDúÏ_i !ÂÎò6ô˜I¬^'ö•R»šVˆ†#”S'ˆØAyè£äc,Þo[ÝèõA[ñ2»QÛ ™óÜÊcžÊ¸Tˆ!Äá <›¢I›üݯ䑳Såé§ô„Rº‘hi^í²“Ñ5ɹVEwÎÍS:+Ö˜§}!÷{BYû¶GrXçfîZ‘Ru²ô‹­Zs™4ÖN\_°º¯¯_g}Tçí'\e³xV"cò³ç$…Á0F.ô“5ñ¨XÓìPb!*Ñ_·G0ŠLç‘܇’•ær—.QuYلḖÂSåÇDëµHe:J¡¢»ØÉˆj¿Nf-ñ•°Õdf£U;_Ÿ8¶Ã[%³¤F+Š!S—VÎëÖ~ö¢Ñá &n /×ú,ßTUû‘Hbr!”¨„wÜï-3ä%NîU+’™~ö'“n[£vÈrÒw"âPèVà¨; aãIþˆÃU«„Ù"~VþΞnê3 è¢ÏìõrÄj£·/b#UŒ‰­GzéõcæÊÄ^˜¬óñE]R],Ù;Q’Là•7Êo*HT…9È…|KM†¥&ôÄù‰B,Ëbœ­¦¥ä˜ªØÒ4Á”A?,Lz{}u©d9$žÔ6-æa’ŠfG#Æ©ñ;)#ýWƺ1E”ÚÖùm³vŠFCž‹1œUºiNµ+ Riu9Brešˆü²½Z‰^Ûc)ܽ\ž˜õ:»°Ä9b) ŠÎl}-xóåXˆûœ*þ«H{gä­L‰R{ÜŽe\+—ֺ͡â= ¤R!›W¸ø•°¶[Hl6TPçoÅݯ9[õT¦yÔÃ’cD(Ën®÷×±ê„uÜSã§ú ÝŽÇ”²2H„rd2Ê•7ì˦1ÊLêiýÉa:ˆ²n³ÖZeÿñÐví2ç“ʶW#Q5ö|°“±!œ "_©R_p]š×z©„-Z£dE*?¥ù ô>¡©ß³_Ý¿ñkú?þÿ}ÿ6ƒù¢ÒØ~‰ô.ú0Ì’Ü:u+0Cšý1ȸ(¯M`æ‰I‡¬(TROVI¥ùrc G —û}±ßk‹C®á¨.ï™_Ê2åÙLq5Æ"ïÕÆjp¥sÿU‹¸c©ø„nÖXöÙF1¯óy8EYrÌn «òØs§áh#»uÜUlÖ²¢ç·(áQmgZ-n¦‹'r–”e'/jÒ¸³ï*¹Œ×ô¡ÞéÆ5Ä Ëw+}¥¶Up§vi\´ûkm(Šb†5tŽAYq–úB(Ç1s#Š!¸õ8¤ý¡^¿–ƒÍ,ÁÒi«ò3òŠòWb‘m6ˆYµ¥u!7¹å=KÉv¹ÛXœ-¶Û+QDQ…ÇêXŠ”±г.ض}v™oëÎ%³t‹N*쾤w阮¶\2~ "ÞD:„B«­·r’ê±]Q[¨t%.GÂIq÷âs|ã¡E—ƒ wäÑG6g G«JF¥Ç³.‚µë6æ$õôHê”ãÒWjæaúåJÈÖ6þ¡ ~bÄÊ­oëÆ8¢÷HB#?U¾s§øŽÊ‡LÀ½IZ´©EFö`•‘™ól-…g­8Ä]gè+²I7ã¦2HB ûÍ_ªa©mb¹3ë”#Š™ð„ÆË*NPÇ5¸ÄLêëm;’³\§zãDjô·¡»ê**^ŠBPÞ‘9Ñ«çIöMOªj6ö£)BùiÄEÏw^•Y±Ì",IŸÊ»¢dëGmf4%ìÕEf#‘1¯…Å¢wrq™*שØÈFk.1^E·§Ð¾e+sy™_ŠÆá¶PB¶†§‡`d:Bfø8DZ)\1ÄSb¢¤E½Â#@ÇPÿ©Ì89ÌÄ;sr")Љ ¤  9\´b 0æea*@ˆj—g AÐJFHQ–!F6ÎÂa]Ö!Lb$ÉõïÃÇ‚1ŽpÈDˆ2”ÅTããëƒìŽÎP^¢ô¤vÛ¨ììÂ3 jH\‚†á ä0D(Ä©;Iõ|æÀ›AK ‹Çii$æëИ±ÂqÃBÖ¬Ô„¤1ºBuq9 €¬7 Öì¡„S\u½Uù‚©Ÿ•]¢ôAOƒ Uk(DF’ŠÌ1­Y˜¬öð'ÕNE6 È2*¾èßÕdæ¼Ìˆ†ìæ ÷SXÌ A‚Áˆœ!këLeOœ9׬*7©Ê¢ÃzB’Î'ÅVÈ^¨(FŒŸ b¨Ö£åFx­‰‚`ÄØfÃ8ÐD3 DAÙÒ‰»ÜK†Ì \W`¦yD&nì9ˆ™´ÆI·êqT|L4A±Lª¢”IHQ‹Ù6æ2ÕO‚ŒÂ(„æFÄ#“Q,‚Þ{‹…1o8=ýUYz¡yÅÆVB(2†íÙÈ„X™ÀѰŠCHiJ•8eMNØŒtÅ,ªâÌj^ÂëEܤda2VæL‚„‡†a ‘HøÉÕªÞç§läDvxªtÊGñÕ†Zˆ¤Î&Ô%3!»P„FP27Äed8ÐRJ6"0^åÜR§’”¤:]áIàŸ8Ãä©JEC$°ÍQ¥î½q›‡©­}é‰D!ªLr#!Š7%e® ±ñcËÀ\ÁHWE†$&ªc‰!©“&†3Ý:6â"5/r§Êf˜HLÍË“¢2h„ ÙMÎb#T½sq>’°½KEîℭ ´åâT;®F­IdÄÄÌÛÌRÓìÑÃ"g>!X‘’eNˆm“[! FRqãú¤|„T6 ¤†Œé"Á•Øÿsa‰ˆbÊw&ƒ,n®ÉÑ!Á(Ê Y3,T„ a¡-Œcê"Œ£5Aޝð\ty²¬´âMªte ä¬ä& 7 4r,Aò* [µUŠâ¡ˆqä̈£u'ã=R¤3¦„u é¤&0&ªßW‚6eÇ ¸œfD˜´U~úÑ#áAUJ A( *ˆ†Ç0‘£Œù„#ˆ¶œ‡~-E‚…4”$ ±â©IXa"ˆ~rzƒ 1¹èïÏ¹Š #0ÆÇùùÈn!(c¨‡Ý §ÂQ*Rbšaj(½E*fU)+…=?B1ƒ>Á áHƒ3X”ûZA‡ ¨´"X73. 8ÔA¸C1“8‡R1àØl7mðbèfqn+›ÀUÍÚõȆ> ¨a ¾ztRéBfáá_üQC£ °TdSñÊP1& ¾ƒƒµAKšEE23bJZâw‚¢!Bý¨ÄDt#@âðQ¸1’.™BÙ÷BKˆŒ† Ï‚‡4 ™²!ä #4s°Aš:‚„"1TwF‚¶`¬9'`w”A C£mî¸Ï!1„°Æ–wn/(ì‚S'Éo /`lFRCRMQJè`Ä¾Ñ Øsˆ£1J®aƒX;уWæ1ÅÚÂ$æu+ø¬1® Ôv9ÊŽ+Ñhenl¬ˆw¢B k„ ›q# ¹‚ò|*k(,€až8s 0¹GvÀÁ¹w†+“tߨ…)’aœNBÆ7`§TVu®†A”˜0"棦T&$!IJ S˜#ä>g #ð«ÙDgíˆAªö¦†‰zÃ,#óÚšðß^S¢Œo·*KE6¤“0  ÍtS^¤f D#©;Ò¨¡D\oØ1ê §¸™eE-V¡«%ÐåqI2ˆh6¡bðŒC¨³k=Á3ÏaÕšG·í)n2ñ,á`®&‰æ JÆš w®€ÍHU^ŸÆÿøÉ¨)RLüGû­ûaûvûýüôþF´"äB¬oûhØø|ˆfK¤®!,\äoDÔìJ3x”Ïêvn.jN³¡gaEg'2‘rÊâ.Õ OJ:[tþÛ›jM‚åsì=WóT†eºo²»Y.ff)˜c¹Ó”Z)·ö0ÊOù¶ûqˆNýˆLÑ|R¤ª»ZBWÒg ©r–ŽHOl›_Oñ9r«¬J/XÝG$„Ò'¼‚,…2jà ·“Ñk*/6+]bð¤.K”½.É+U `C{ò2 Rïêæz?n=ÿ³[ÿôÝõ Ë´•U]Y׊þ„££DB´ìR1—Û³é!æ^"{Û‹ä–EBœˆDNB/»™Ü™1NŸ5ŠQ^¬Y‚c ×ú#n¼lÜÝìÔyKFµÆöiT®`Š»Ñ—SgJ ô{?2U›D¤Ó%µyj¼¤ATa”"¬‡¢˜­«—U!—ùjïCf욢Pn–ýLEjJ]bˆôk1,èÎÄ®^3 W£ëb¢&ÞBÕ©ë—©/†¡8é­ºr¦Ì;#"F`R°ÿC‡]k´œzåû“;$‰ûš›¶E"ãWnqMS8§®”ãŸ?nm]¢×'dsÜkÖ›Íûµ\adJ´*F%ÐÎQNqsŽE\(6Óq|”Áuºšl!¸”/RBn}E^CÙk袧ª"ÝDL1xØY¶m ˜ãiöƒ2ípŒŠ•u94ÈÛn¶c¦-†KÄc;#?4”=¶©Í¶Fööü’ë¼LÂãqRÂ8Š1–¹iÈ!yy>¶"*PË]rlLòaª™WÒ0…t²ŒM¾°ŠB 0òæa„a šÒ¾- ‡¯W¢÷Qç|{¨ˆ‡~mrB™²­"™Â*¨ØÖD#ª‘®¶Ù4¯BR¯‚Rêd“ЊúÖN%Fâ9”a\2O¤pï'îIqQ™ôëFsImÆõFA·«ÅaÌšs8÷I nÎvZH"UmÂÓ~#+͆5Ž:©›Â˜Os³‘eb¢a$oWÆî&ÿü¼\jcòit‹‹ôˆ¾L¯•¼d™Q,b1Üu­¯qø™Sjj·½I¦Á6Šyìî³w—F¬’%ëD„ c2`¢ Ãbª„Óó‹ŽOTwy7^ŠÏŒÊaˆe~Æonǧñˆ9^æ§½57JJêf®¡ÑÈì„D2)™Â3w«ýØÈZ.¤½ONîÆ&šßÆ¡d)1O® u°aºQ†HjA#ª)¨È@ň9%L«þ¥,ƒà¶¼ÏPR±nˆf(`Ä#¹EZךz´`¡Š!Œp-RÀ(EaK»@ƒP…Æp‚`"ã­/C ‘ú"`è®tèì ¹ ƒ Ä1h$ 8B2?@‚ R>:ØWŠð:QTH!Î41dÈX1Š1¹µ ÑÐl ^î8ÙÈêŽzE6k^Bî8 ;D‚Ý Z1Û`& @‚‹A¶(³î ½äD9Oò§4"jr„dl¨å%ìØ DטQUÄËBåëI€h%Í´Á•BL&4âVf!ÉŸ 6 ¡j~4*2Š¥™’é¸fÚLH†ÜyB’ÅÖx­B©Ì#p¨zéÕXØWa`‚rCŒþ£‰ŠRfo$T]Ò¢Âl … L„KǾáÖ`)*0ÍEõX9C!Ìs梫1(¡L†rµã¼‡B•eAЮ'¬†Uâ•‚±8B”\¦hA †'h¶ €ÜBG­ë©Š"' Õ£¡NC¦áŒà„ ^ À‡Ä1Ù ŒíA ¬Kô+«˜…ŠÂ^5èÄNŒJŽ!îLf>ù‡s—†%/C†¦a„Á£ÅeQ¹š1±`Ãt…¢@zù8ë&ìÂଳɹ0˜‰’ "1Dq±/‚7t€× G‰Âlª¯T8ƒ)æ¢÷ÛeÞX¤©­b `åÑu½ž•;u4ªj*YEÉ®¨>­=±¥&:;ÕS‘¹+îR&P‹œHœ¢ˆ†µ6ÆõaØS=çmª7q #DÅ©˜•#/bb˜ù|¾¤aËQŸžOBi$^FWGÇœ¤!R®g12‰ËC,† …=)èÇî¤Ätt¡ßµëYmhާéP!D)ÕÝIÙëÅbHÚÅ·Êo\ª¾w³<é_\#º6+‰µ×AÔŽ¦Â ¿Ú2±æý>Ýe UÂ!Ð\--VÄ0¢Š½~~Ìdù6ÝGÁM§ÕL]ǹüûä3LlÓQ.Bsˆ9õzRH¦j§}£éˆÌ{fgllö*ø‡êÓx¥6âÌE3”#y<ÅCÔøJJMc8‡Dðyñpö‰-B@w‘°Á51<¨CPk{‹êqŽQÃ#q阙 ‚a‚;Á×Á§„7pJ *ˆbJvV>®®ªQ2ëºÂHÛ%B`+3aƒ@»mì˜gœ Ò¾¡ L•œ\u8Àf¡`0‚D:WkØ®CLênˆ>í™à±‡b´‚Êänœ¤G¶ëÊkˆ_k ²…é2C3¶‚5}„B†ÕDðc„')ØxqÊš<'J^3õƒUnTŠÉNá "n!‚)’D"q¦B/ †J£ñ&1Ù ¤‰“…œ¼2a‚‚T7f#è)ü”Á½Ø¨î¬Æ¥JS}Á‘ÆTFX”T^ÕhÙ ‡ò½+œÈÐùX6à܃1ŒZqPJÌÀ€ÆŒ,h"`ÅÈ×—‰U¨¤Xvz‡”á–ýÈ,Ta7‰‘™Âxâ2›ÆPˆäšŽ)’0‡ÖA—$J™•|hÀˆC˜j‡ô/‘‘7rQ w‹OJHËXEv8ƒ9…#SÒvÐB4]Üg0¬[Cê*>q9‘0ØFpÌdDËHâC Pä`ã)±«ºÒŒ )P¿;½+$+ôo% ä¤t7åTÁ A¥Âo^r‹ø†(Šk¦5i,;¡;À„ËÌ!?EOñÔÎM.j.D‡‡!8Š3;Q“†€AKQ"å“£dnÔk¡Ô厑;þAþQþªÿlŸ¬oÔ7ê–ÐsÐf™ɾþ#_H(¸ûÄ3¡àQ `Ïs¸•Tnã$Dì!! Y;pK d¬æRŽÇ¨,3w#žW0¦vDwgŠ»0æÖ+ -MZ |‹F… ¤ç,¤ƒ96zF$ðCa„{aL‚PGf\oF|Ú/û™YÇ*ã-r?èÅE!DÓ“ bôÄèÌ(’Ä=#¦âx•v\¡""c%f™H%0EÈÙ(‰YÜŒ‘˜ÐûÎ6/EìªU+ÉÅ)^µnÄIAˆ¯((ŽÎ3Ä%vD¾ÕRIWcmKé e#ý– jh`—mÈéqŒhŠ:Ó€bb (˜,T¬ AºCϓʸs!ù£ OÐSCò<8Γ¢n6R¤F’“˜0˜Èh6QØÁ²w "G¢·jrô0&C…//”¥5²—áÄtü¡ƒ‚spÉ~=F6Ä–-å q¶ÇDP¬„‚&J»o„3} ÈUø°"îJÂG c@…)KÌÄ+ÁŠ3 ¼¡$ç È24ï‚\*ѱCµFÃpãbše!eêB`Bo6Ùš†N$q„b:Œ‡¼ÄZ ‡R¶t NøÉ Ôå^fFdý‚Ô„£4G╉®‚B¿>­G6¤häe7" A”%)vÐA¦ˆ÷r)§8­co!Hˆ²¥M0Ã6°rí»2©ÁÏÅîäÎ+0“°¬ "b Bq0| aT1•³IÇF7uZ!­C1m-"Tu/Í®B§^¶qWäʨ`¯‡¶¥™~È Â%ºÏ·Ü|»Åç~¶›¾ÄD1?ˆ™U¤Ž!Jµ)G Yüļ¢!*jÕ8³ëdìØZiJÆ>•|¾z}ÈèC&ê[ogì~¢’dzak§hŽ­ÙJúY%…#«+'¹Ç”!Îè}L+)QçN6 ÌJ¤Ô½·ÇäË\ÄÌ\BrþyØ!f19yfq\§ÏãÓÝlKÙ8ïÖ›-ºm wq{3G_%¡”®˜CÑ7JQ•ÕWå%ý%ç|Þ¥VŠ„D2ëá™ZŒ† ¤3f×ÍšBÌœ/—7lµÙ{HűõäÜéÎGó7‘ @Œ¡¢‚!­È²¥’J#¿úë’æ‰ƒÕ÷(‡ö=Qnuê¥ÌަJ«f 3-˜¢°ªâImQÛœ¾ˆQ2¹˜Â:cP­èì)N\ˆ¥µ*±´+пí”xŸ…ôeÕª:•}~Ú?ò|ˆq^ª-"Ý2ÉuÚ3Ÿõ“HÔüÑc¥´ô&율ü#ܬ)’îÌ”k.'%Є3¶‰½”˜•ßš”úv·qµC0›ý"p®Ä;ˆÒR“˜G3Ô¢š‚õiÖ~®›oLŸ9 \b=Ñid;ŠÌQŽg É’;}ÄŠ×jïï2Qr˜¯böûÿrÜD žÅDZ÷9 äéCZÖÆz‰×î ©Åéw8† AX«Ê§  Œb/±Ð¤”·;ûmûùI5yâ[¶¹mï¹MùªÔ†ªþ¾e0©Q˜©Qœ¦-jÒa¯JâÑ:+B0(‹²±É–c!Xc¬ÎðØ§ =¾G¢ÊÈ7áQSªBkù {”0´ê~ÅÃ׈£+Á`\RV&')kC8¾ ”F‹¹ ÉTFDã¨}rŠ"u(®X6+ƒ÷D 'ÆIë@@æ) N2…âŒïùF†® §ŠB–Û°L2@ÌÃ7!ðaÆJDÃrz'¬9E-™´T™ˆým„CŒÈa*t¨DŽ#šþX8Hˆ ¢º§j’0ž êL0ÀB˜Ð@"tF0B³KÈvͱUÔ·¨â RÀ\§øäýÎŽ TP&0fF i›‚Äd&)Bè(Í«!Å,â38²œ!P¦ÁMõAè¼AMÐÔd2QYÐð1pœhVÄH5'V‡dB*Hâb(ðôslòÍK‚…³ƒVJ÷P½…Æ0–«ÄÑ2‰èfÚµ4D#šRbŠ }è´ô¥;xд =ð„‰FD‰€Ü ÄD@™„~alU1>n®æ.)Xë`Xl@Ì qQ9ˆ6_ŒˆÀéjD µ0bê¡#¶+”`™ÁúÃz .¢Wl—Cät0-êIrs§‡;cj%`‚1Èp† @ŠÑ2äªJÎUg‹Ü(u‡Š<ÅCJˆÊÅqEÄ 02’)°H!D(#=Ðá܇5ø!{+ ïÄêED£n‹ P@ŠdàÆ†ðéqˆ)Ä-PîV7•ò˜' L1ˆÇ‚‚©Ã)TÁ* LÏž©ˆüDS*)ɉ‰C'C…Jt9 L±K*1"ZâÈ9ï®TbÇ4Ý @¤ AßðF`ØŒƒPʃ…ײøä„èÜ’]ÂÎA¦`ˆâSjæ`KƤ¬E7 ½1O ˆVÊ"Äg:\Æ$%B°G“GF਩œPÁ^*;ÌFó!Dg@`ÜÌ`„ eEÄQ85Rã Õàu9ÇüQŽÅôAÒû ¨HA©0gá`Î Ëá“ZNVå×&>MS†i†°c0€ÔGF[„9&TrçŽayÂ&ÞA!)Æãö<Ha††!÷uÕM’écjk¢~÷&kX™Of$”DÒl­c•1Æ&J¢±x)û˜EdD—GânËG$Ô«ïu_ðÒ¤’e~²!‡I 1 BzHŠ(¤:R"--uZÉ¥§˜Û]ÂU(½'›q[Ȭw9(GB"šFaÊdņǥjn:I‰j•)Rj}(ìI‰£´„m2a„å3PÌoäBy4ÏúZ µˆOJïQñŒCJ²ƒ/¹•”g¤d¼"±P”Ujo~‰«µŸñsªJ6—¹$Þî·áHêev)T!Æ«N¹Iß\f±DÊVBTKÿ9¦-6ˆÎ½·”* «îÄGÊBˆžC)L¿—ÏÆš&¬ˆùé#§¢½}|–Ï êçuv[·r#YÈN}¦UÓ¹TÍØ4¸2|ÿøÉ˜*¢Nÿ¨ÿŸ¿³¿Î?ãŸñƒùCý´ ôHtïÐ5·å†u6Gb•|‹Rœ¥)÷¾ur¤v:1MŪ 5¨Å3±o¦þ›lc9„*®ª„E*UŠU3çf¦—‹ ©[[tÉäMÌúX•gKq†+Æm^2²¢¤TZ׉ez¼ÿ®A\V“Cÿ-ɤÄà](ª;!Â4ìÞ¸í»$—+9[úÝ’y±?µ°Š"ru*â‹þèYw:3ïFN´%¾÷õû[HR‘¨×ZÒo<¬bä ’­låU´ê)4¾Ü¦ìç”QðÒ×ÑhåªxظÅ…QÑÌžáQ]÷1'YˆFV äË%å—·Òõ6„³V²ýæÆ!SšI!Ddá/¹Ë)Ý:\¾¹jО„ÿ÷®´¢qŠîËt©Ž¬ÈžõLÑ"E\†dYOJŸ"z<×z8¯˜r@ÃŒÓF""¥.@N%CªqŽƒçÌUïÝ0¬œ@¤Q ‰çÆÌØŒ—†ÀB €¥Šž@ÙzR L8è±R+P è9Ä# ÀL'ÛºoÜŠ6Êz¢÷§-9«¾@˜efƒbb °¼„ „Q°Œ‰«1§Õç¦z¥uqxÇ;a¡ÊÑ€JFÃ0HdR…½ Ð[úsÕp!À„@e„ÄfT˜‹¯ 8LD u…Tèt8/VÂ3$ðüB†R Ht0†B» Ê–&ÅNL©zžxr@ÖQò«^ÔƒCFXY¶c( "— 8AØ+¡xØÊTùÈB·e5§HFâ#c â¶! ÞcPI®aL9xd†-*…Üôhjp3šŽ•F0aD&!ƒdg`¨!Á‹ÁÆ«¾SêW¹9Áy¾‚B8nPÅÌ0Ünž­‰º8ª(g ¸ú—´Zˆ©Øf CÈÄQŽƒ „€”œÌÇNT&ÜçQðè,0©Å†PbæÃ56 „4*@€ƒ# âuRŽpά»N2ü1Æ£ùÑÊÈ!¡‚c)ŽS*¢A /ÎmQ‡\Q¡äB¬BP&mWF-"ÊŽÃEÝ…êžbåê{àè†Ya²( ãvZ&À3†?4rc Øi;„•Ù¸¦çÈ¿:¸’óõë+™ÄÛéœÂ `B’­ÚDJCYqb¨ ꕜ!lÊEÇ“\8¦B‘¸ˆÒ™ •À…- ¾Þ_Ë0öÂQˆìÑŒ¢RH Ádp¹dðAK¨´QÄ/5…_9åä&ƒ!0Ý8ž³Qƒ0 H?Îò‰™©]ÅQÅ®%¤±+)³TTˆ6HLØ„"aŒöj…J>Tâ°œ`¨â”®Ü(Ø"Œ'˜6â£4dj#ŒùÄ66:˜xS;ˆHƨôŠRZ '†„2îè;·$4‚Õ-ß‚¦~ _LÛC„ØÁ®n%SHú«x‰?ò™IˆEPº*\k`9c>S«ñ%êM…\`lž¾„ôDhn ‹Û†BD$¡p°§q…ì}œ”Jù4Ù‡s¤)yÒì)·EÔ ˆgª_<¬Ämµ×)L뺸Ëó béœMÍUu¶èo¢yu渟ßÞœAêr¶½ÜGIL¾¥+ÔÇR '»Â;&‰UifýßvüY“u«**VOš;ÑÖ‰D+®* b5rBPeÒmÈÙøƒ¹°„›hÎüÆ «GAÓ™mUÕ¦-ÍÆYÙí[¯|µ2¥4ôÕÌÌÝguiLõýõ‡K9Wñ¨È¨Sb“=‘y»Up³H¿ÃüF^µ–­ɧr)Ñ ˆöeÅQ‡! ¸]B%Ž)ÍýD%)†Xš’—¢JÄ—ëŽÏv¥Ì¸«‡¹U2½+ò¥¹¤/©_#„ZjÙÍœdiJpƒ}´dÊÄ-‰¸Z8£;ó®v‡}Ré&{Vwf\ÿ•DÛqè\×Jv;E_©,õZ#’v}“1¨Jaû¤>½×+K¦öT¤š„¨G)\­‹W»œ’yqÍ6§˜þõ_­™œ¤ê‰…ú¸Å+¡èªY ¢0î7¬…Sš×\Î\ö®hÞ6z­gP¤}ʪù=ÒÙîE ˆ0ái> aÍqÆ ’_*mDuOÂùÓMMga;à Fw¡rJ9ÕÔÕ{>.ò#ªþí Òâœå¥,SÉO£¥|È3f4â é&Øå7ÅBMk)<¡OÖ­‚]ŠGÇ¥e¢v—“§*/„UO™AÛ±—«Ô!ZLŽL&T÷v Q¦Ý(’PqŠòWÌ|Ê ¤Ù0ŽÂY\s¿d\ÅJÏ-Æ[é'9uð‰³ÕÄ_Z*ûIî‚2ÅÔ¬ˆ`‚µ-ˆ3)Mo­öÒµ„’®an„D­^ˆèjqNôgÒG&b\‰Ãñ5š{Û&d—*«ÔÛ¢»1Þ‡3"n£¢X‡ÈoU©nr¶«¿!yß7» Ú¥tîªùC)Ø‚PFf먋„= ÖnÂÛ¼¥Lßz: ZítÇöß¡\k9ŠÖÑ_Dá˜C5´ï™d2góIQ ‹:é~¿mB±IçÀEâ„!Ï“; øV#ON]`ƒ†…®Ð¢uêAÔµ×"®dÇkK Êf»Åj©lÎq6ýÄ>gVÕt¼¥ëYmÏ#„¥1¸B:-Ó·¦lÎ9V„±C}R’<ª ÿ+ÐMý*²©K”ålQN"h›ñŠT}ˆQJÛ½I\^£œ’ã*´ö|Ï„Ni;¤0ê#ÕÑM–2j×[ œ.¹Ä'Å­ DšûJqiqòæŽRÙ®]cŒD-È䢔P…9/¬õ) µ/9ªJÔ«rçtçOíéÕ(×)†A9dj§³/ ‚Å·ƒ‡#ü·f5+Ù#¯ù‹’¿¹•Nõ¡#9Éÿ„òEdÖ©“l¸†ŸjšoÙžº´;-ôŒA-Œr9H¢#kh(A†y)f•º–¯9 %)¡ŠÂï“ ZoГ—AŠÍJøÂ¯X"¡èt²-3&V§8©Aô^KÄs*c­j\FÌ´kq\†¹6©#—óª1 ÄÛØ"é8¦ÚŸ+ÚԽѥh`Žju6@åwõÞnJ`Ô¨@Â>„[²[úÌUòQµNæAëò+./ºSŒ‚ äLÄLÜcªZ´ïe¯b?c?fŸjÏnÏrÏw«9-[J5tÿIŸ”8e‘Y qÄrqƒ`1D¹ Ɉ§ô•ƒŒ}GWꤎ`?^e2 ŠF%N‘6 Äуô@¡ž`YçškPላÕ]*‰Ó ¦ÍYMæwiB ‘4Cd¾Cöº˜¸‚»b=rSá ˜1Ad¡ŽU!ß n›b^Žâ3 ½ÄjØ3 ˆ´0âg¸TÅ U5#Šî¤…r.yàBâ„€ÛA9 ‚$€Š"¦|"¸AWâ9¸OP)Š Èsg8gg!5 ™F9ºHEqŽ sVzЦrõض»!4jÐÆ‹"ÕTìPÂyXR¤Pº>) 0æC†W"h% ¥1Ä`ر" (™«—Xäj Q¢ˆäêAçבsáF)(AAFXË9(abláÈ(4ŒôŽ£ æ/Ý£f(›×EoS™ ÊÄí‘[àÅ ‰‰XX³2å$v"‘‡MŠâvÅaÆRbb*0Ôˆ}Ó˜q‡~ æ**JxàŽ#Á 1J øÊÀO‰DÍ `Á{ÉBÂ9º²d Å‘XrR¬•”hÜ2˜„1Æ#„m ¤4“αahËıG ˜pJqœÏ 3ì¦Ì$8àŠÊÑ”Š¤\Âr˜ru#˜ƒ’˜PÄ8ŤAÄvÌá K¤BpQª±Æ:Z9•QrEœohAM$'ÍgzGÇ "N‚(%Œé…5!µ15)Gy®Ó>Y®G£bä‹è¨¼•VÀ«FÜ”Y¾ËV©ª§±‡°U ¶w™ùhløQ(Lte«-Ë*åNÞ˜äo$‹¨‰ùMª½SW7ÜJ¹&~MGTC)¯UÉSš¡j[Ÿ˜‰þNcyK*Ñ-éîÊ«F,DÖªâækâ¹ÕDD|Ê•(¼SÑ¿ûP]¡(ºë¥"IÕ–bQ5JÛ3ØÅÑå/R”6í$Èy)‘Y¬ßÌˉÜjݰÄ1\aD«˜¹ÔûFñA™ÎòiµO& Ãcm RTŒÂ¯J(íDt±¤!*„k·³âö‹Wé9 #—P±¢/CyþdR´† jàCœ= ýYº’b%Ò1C¯¾E#øµ½m]d" „¤3Ý4V²lœJŒ(q©Zêub%Þ­fì4ð?Œ „ŒZ- äóU,,©£ †Pl(eIV›'ed+øg³s>ËøÔï§õtÏ"¹•â5R®n­r¬dŠV’Ûxf³ýr¢ûý"M‹D)ïÈAV`…0r $_r›¯<µ®yÁŽU]gbŽqrKˉŽZ×›÷Ý á (§dvI <šÊS!Kímix/äôÜkùë6=åÇ®rLPáØ8 Êm c]ûÿÐöäúQß4¢|™d¯Uï§Í3.˜–s]T2ˆ"YÒ"Ìvã½}~ƒô>ÝC[Ű˜#Ý饔&7z©Ã 8³ðq”n'…äÕË]×–$ã ×åËbú±;~„ˆ®€VæðQKS†'3¯\RÌG¦¥þj {Úxz¹ªÅÁ§ DµÚŠ(`€u a…0hŒZÄêP“B'©¨‚6¾›Z¹mN,²J¥ U˜GT•·5æ¾\r'hR"•5ëéQy¢ßÆhÒ—ï“ÍQ”!*!(àÆRêyÁuí©š¸Ž Ã$\¬£RµŠpÖ’oBÈh©ÊYÖèÃ+HV 8¡–¨€„Ò±–šÿÔã`´­:k ‰ÿ^¬úÂâ#ž¶(†!˜3rƒÅk;·)/™&gXÜÌXi2Å`’U¨Ô¹4›Z)ÄA2”¨)IGw,ŒmµÚ¡ý2« ˜š>§X…'_/D’ƒ$0BÄèP«” Áv™Ãá:¾—Ø]z1êü.½—Oµ0¥Ì, 48¡ì:ž×g.‚ ”5_f·?Ë~‹òœ´’Ç‚’é–¥‘'AÔ KáA86~3”n–jš¾êŸ¢[æ1¿=ô|RûÈ0Ç_’GÜ]&Ò3‘nœbÿ …OÇ*Ê ¡.ʆä(_šØj*™ccàˆ¨sK%"ô›¶Fc–DÙÔ#Ñ ´ÏâåFû‰9Ö#-1'(ƒ49(i‡5šA¡÷kŸõº÷J]0Ùæ¶Mϵ=± („#ÅÔÀpJhµŽ”7’˜…˜×|ޒ׉E{ËS› ˆØQ¼“"¼Î#ø+ yUˆV…M%ZQúýí]ÄþF¡".p¹{ÙlY3pÀA yCŒÚÎÃS• ‹Ýòi)ÄÕæ‰$žŒ*oï!â„KHCM ²¢Dej?Pç!–ˆÏ®=‚nÃìÖ—0#Ï=VkÁ;f25Çg‚:~…BЂtº¥O‘L£š–ÊÔ±MÏÂe~‡Í%Uf9ƒY÷2G(’R§3J',¶>C´ÇÔÛÌ8Éqü·.S[‹^¤›K!ÎQFMO²_N ë)̬0²­‘õ \¶ BTO³ê!EfŠšus¥L*гlB¥ Âæÿ–õ5–BËO.‹ô÷—+CV¯Vq”„ “ƒ  |tr—rZ·›vš õaŸ“q˜Ô1i4‰2å°…"—–Å!̸®Ú/Ó+­D¾¾ËFŠ‘8_»?;• ’„"¨(³çÖË‹Cá9¨œJàñíl?>¾/•ÁLÓ$G¡)_\ŒU0Æ‘iSQ—ðL“ëi ÚQX.®6/)e”CÐÖSÎ`r )æ C­¥(»>º,V¸…ð]$f]<ÔâöûòÈFDÛ—K!æä£Ñ%¹+¦+‚¯5`ƒÄ Hˆ"”Q©U=¦Åµ´…rÐà‚‚Œ#Qý8] 'ëVŒâ­Q´E$§“Ãq Âê*ûv‘&A[ÙAŽGáœ!i1÷Dñ-åª} ™O^Î5{j¹ù?ðʨ @E¨803E¦d±_$ï«Ë þÃe)$BgÏïVµ âUgY‰R0ˆB.± 0EßfÖz¢bô/7vX¨*HÝ6>"œA2”¨`À€@µ…­:žëºUÚôëP˜ ±à»+ NåSøÇ*)̲˜¢¬åR™"…)ô‰ÒJRšõ>L†hS ,”pµµ\¹Æɳ (càP8SÅÐC“ôAtiDMÙW¥©.¤ˆ]Y8‰I'呤Q'Hr- Æ./Ü{0ˆcìi>(3ä¶DáLóÔÂ-…hHŸ Ö›×Õ»¡\s®ÿøÉ˜+¥Ný¥þš2Œ_À_Ýßî3öö´!,¹¨†ì@OƒÇã†|B $^—Kø.£¹FgÙOÁB:NcbœAÄã,c‹VE­îez'Ј%ÉF¶›%”bí±8T š§Åý:ÆZÚÛã…=cIaÆNÃ奉¨c¦O÷EüòTÊwÚÑZ„ÊÓ—”í@ŒruòÏÞ›íqY©½÷Á-“B)UX—lqAJ9i΄q-O˜ÎãOt-aåÄ•X›-QÒJÙ—~“¹‡QŒíO•j/Š FέU¯ŒR“ñÅj—m°¸yŠ!.óÜK5Ôæ+ ´ñ¹ÊÄ'̋̂ ‹÷érû¨j (”¼•î?`£çrq(ˆÎ|q“¥Gt‹¿Ü3»JI†÷µ‹áÿIqh)]H%•V¤Œ:LG6Q¤Ud:uÜØ|ÍNh\Š÷ÔŸÆ&R^tbÎëÇaHžf˜S¶L–8¥K«ˆÞ]§•³Æew–Œ.&š§Bu?>p¤ÅÇà ø„PÇOR]Uq³Hþ^% –¥°®zkq]6œ“ìöõ)ՈΑRÑowß›7èud½ 7Þ»Õ:ï#üµé A¡Ê00Ü,%”¢(ˆÄ+mŸi~^ˆÙ¯~^û÷)ˆã2~5%-®C‡ Ò,ú?¦ZPÍßöõ †fÂÒÓÛSGkV›Ò‰fa†2Ú]ßúBŒ)ˆrzÒ·®ËΓ¤RÅeiæ´”,D1"Õì©Y‹fY˜+Ð䕵£K,þaRG1dž-ñœD*!_H&Y¤bˆVm¯ÈÄB¦˜ŠnžMÑl™”á+X–¶Úä²jGé«\ŒcÐ+År/l" v)ˆÅSd- g©B-öÄÉ4ýÖK(üA c‚ТPšÒ qŸ»PíTJHMjæÒŸÙªb­º÷F¦J¢ˆD—_,L9Уœßo—ŰÕ!š[Wé6îÜ`¨J ^Æ6TGwÔ£)Š=ÿ´2Pu cFÍ$¹˜Ui)ú>¾’Ó½F\ˆ¹KyÌ1’V)Šš¨÷Bו?TN!ËæÍ!x&ò‚ëÒc)Îä)¢RLéØÉ–eu6˜ºœj7•ë¬üA‹Ä.è”)8uaS©mÄEeÂ5¸ÜÍ¿÷óz …!X¶´´Ê)¥º—‰åy∩´uw™Í‰EV"<öï¶’—Ýú“‹—£d„®m.‚p–4«ãs+»³¶QBÝy¶ÊñLKÛ<ž•)þšŒŽ>•eD+lŒRµ[ùê®# WÏ— ¸]ÒÝeg]ïÎ5Ëv¡\¼}Òä+=2g¨È ‰Y6lˆç)ÂeÍ’†;HdŠáŒŠÕ*•:UPø}Þ™ùiÍ> ¸lÆ·ÄûS°rÓÖÜ”AUP‚´CS,‚5^¬˜)ÞåFÑpÖGu[\sZ˺g¶S*IÔdelµ¶ùŽr Ã+Ù)ä§‘Ån[ªL"s#ì"qÏT¢s?ˆÈèN5(rg,™5‰­UÇuªvþ%…I[,™g`ÎPå!ÑÏ"á“J©v'¶f'Sɯo‰ÅÂn1-²V^lÄ:àˆF]%@Žä,U0Ä`ͧU&Õ’â3‘—•oM7X„Jr;ÊÝRUµ9 ÈíJñ¬èW²ÌGå<ûZŽÐäR"¦7aP͆5Œ´©x­¸ÄÎíÄ£9{Íl½t¹EÌWÆü¦#½\ÅDSÕÅffò%ò­¦1ŽDW‹Ü=Ê\i³"ÊöËcß-ò)Φҳ÷¸ÂbðªÌv¥7VûëS#jßX‹÷Ç/Q›3Ø¢*ÈâÌ%7¾Îâ%]öW*o²ve r̺×öZ/TÄ1ÛMÙÎDòiÕmn».5oZ¹LžI(™ŒÙŒFv£s}ZâŒaFe:ik±,ÖF;c/a:ÞÙ”–ln²ðN¥¿‘îY¸Ù¹!%LYLp†„G#°‹UW%Ï#s¡{'‘´Õ–·U»Kb"©›Š&þ”W˜ýDÙߊTˆüT(h‘3bœF™'Gä"+¿-ÿŒˆ;{Žo-lí÷¸ùJîQ<âíÜzZÃ=‚]s‡M-rã˜áGj '9¹‹8c°ÍÉâ7𽸫ù¶¯}fʦn‰»Ö6#¢®Û<®ÌdŠ[”#ƒnÜÌTúŠ:}å¢\©Ý®CèN¦9¨·1 Õpls; ËAö(…uÇÌ\ïCœÅf9éý)œ‰‹;Ðm ÅTâYÛ7òÚEx³W()Uä¡浯Žèížr ‹á™Â½E0Î䤴,΂ 9JLûHó`Ôý·çRBôHµ6¹O¦~Ó~/7"ŒÁÒvFôŽcŒy· ìÛ ÷ijЂÿ>èÜ)°¶êˆ9=7m˜ö"JùŽR²"ˆ¢)=U¨¼TÁB&!ÖÂ)^à ճ%_‘i¾[MÕÓù ¬M ¹Jvîü!ŸÄ*Žgý#ž`ÉTס2¬¢gO¼i+´£):.•4—®=ržÌ!6d¡\QŒF1 Qèn1åC¸uòdźü†¹0'ð^7¦m?c)ÃyDBNŒ\b¡Ä `:–ÐÌliÊ=(ŒL”è­.TY$èËEb5ÿ!u—c!@CòåË-—š\‘bPåˆmâEf|‘¸7W‹DE(â&ý0¥‘pálóV¤’‚Dq‰»;op«eOêFH?â<»JH0PR‚¶ÊÄ èÂ^˜&ÞWθbö%ôñ;r¯É8¦,_Wi…ÒnÉ[:ˆ¢œáÜ“ § —±#Í»¤ŠL$ˆrÔ‹’ö¦1jsešE…ªG¨!Î_oâ%ÛFUóPÂö“þÞe0ùJ\¬Í̈[+j«Oîüˆ²#&ENQ¾Y$’p©å"âM[+ê’iˆêpáÈd!…õeùäa{Q¬žSȤ>Æ’ÞX<²BŒ§¥Dj,äë7%â9˜… ;Gýˆ¨_°üç£ÔºçjV™ÓùH¢J$…Äê‰&wˆÜ ‚f(Bz‘2ÿ!xžN¢´Jä1Ò .õzo¯SÎÂ5g~5_N’–Š’¡¤¡ä„ß¹„õÞ>¨Žb« I Ñe©•ÌÌf) 8¥CÞ…ž¼Y­²1ÊÅ©w&éø¤s¾°ÆnÆÌ÷@¥•÷Î…+ÔÀ81ž$9JÌi~FÁIŽx«õTÀžÙ»‰i½Åœ]k E˜Å IYÕ-.“ó•p¤±í™Øi—èB]U—äm.á‰C±YõÉIT’·„u)H= ‚M>WdH¢(+ûº¼™øÄ«(ŽÍ@â¯5ZÚozo )0A%y—Ì”½âl4¾P¥?-ʼn–•³ª±†YZÐñ”·˜Ö‚gY$RvÚþ†•×Ö½û[‹£nyÐR ÂÊ3–ü‹öæûú×ÖG+è+ávUÎí^ÒDz“¡n^Í!Æïfy‚x´®ÑIhÔÄRG «òB´Da8]6]?pV”f R³§þÐô¶v Å•úBø¼-–¬#ÚÍâØ¬ÊÚfb£±y¤Y ŠŠ‚’5:9¥¹¢v÷™Íػ˶±{ßDå …8BÄtë# ”¡ ð£©D™W·×M…Ä7*ºå[YÔŸfžs´‹Š΢•n–BXéõÛZ“ö d:ŠÅF¦>g©3 9:!(s1hàÂLÙ Yv‡§5—†4©%RGp—ÀZ]ZdÞ´S ­¤f£¶FsÁ@€wŒÉ=HKÒösÕä8iU‹b£ ÓZIºj¨A"°æ ®)cQe¦9wúq«¹Neɾҽ59ž¨Ž™tC–ä2yLïžîAqò¼Š±cA8s®¹ÆÖ8G:3 Æâ~¡¤,ª„g÷¯½òóòðˆž¸¸MÙʽM­ÎY†$;“ËGäu3,o…'> |­Y©äY8Èïž!y>²_”ÓÕÅM$ÎG é0Y‹¯Ù¨ô¸HÂÖŒ\~ÚÐK!*Èå䪉JéìÓÈ{l÷ŠÒ°éµc“uBt^Û¾œV8HªÛoÞ“iü:ìê±^áÖÅ:/æoE•µ6Åf£±KwÒÚÃx°×– ˆâ‘:æ1+*dž`ïSà(<òþ¾²u½Hj™®'šŠgBËcK%fL’ZÆ~9ƒCÇ9›BeL%MžûÆßdЄ믣vu‰1(­•Oõ1yÉ#* Î:¡E¡NÅÂÚy†¤°z8æLÀͦ`ì—=I{žœMºiöZ9&R´VK²§¾p²~ÔŠk-gÜó¡lbÙ.sÕcT{H —aÀ )GIUSýé}¯æ8·”ŠÉÓ®sž±þ¾OÃÙ*33¡>WÔ?·õ#”tŠN“2J§—S²Fʽ‘òM9NÈÜo7Þæ+åˆCjidšÖ.Qd0ãTB¾å—š‹\=B⼦Ûî¥q\Ù\>J’£*jHŠ˜–%[ü>Ÿ‰%GWÜ”RTÎ;ï7—$!–( ($]"*bš•¬ŽJÅÖ¨1Óêƒ,üü‚ ¤!ŠB‹"´A3+¬7­XlOŽÞð*\Câãd›²'ñJÝê’“z–Õ|XŒB˜ŒoÅAæË±ûV*¯.Qê(G2¡zÔ4î@… PÀÄP´Å2WœkáVеO¾#û¿?Ÿ2~ SÔºW0‹B ŽfÄ ŸW´ëq؇"‘†œüž›èÓ% ÛI:Éb'¤´¡/¦Ñ Wr¬…ÑIjy¼™VÞÐÉe‹´ØÈsQ !:cQ*#ˆ©b©‡-aø¤âŠ·3SUb Œ¶¤lÑ//Neì¸èÞ£¯{ù…ó(BaS¥³J&WOÞ¢¦«u¡«½zBöžd'“ ÷kŒ˜çq‹`a¡è·Cö»HŠb£ û{Ôžˆ„6­¤ö¡T¹ÒXò¢(çvvŒ]ÂÝ­ååšYGøZÜ`âQb2HÓ8†÷¶M¼U* C˜ëBÌ™1¥%ñ¯Bv‰[†*Ë?™‹2 ¾)xÊ"uH)Šn0ÃìB¯Öšî¯ÎÃà•·ÕiÈM<øeêós%ˆ# Y>ÎîZ²9­Ê—æ! Fç.ÂeAÌ[ÚS­ëuôåÔÉÑœq¢qæ{faIA›ÚTL±d$”E§i˜Sa£¶vîÓé½âU6¤£ã­“NAí%¤‹¬ rËå90âŽÕbµ4b…‘£aÁJ>c«×µõ϶õëC[ði$™xdÒâ VŽ~R\Æ^/y1iÄr/W¬ÚÌmÜÉ #{S ZNÈBt&’aANʵ/á,ûX“ɺtTÔNR9I:W–¾ §" 8ãšÿÀ¡Õߤ–¢¢õÒBkïWâO?²˜=ôªì’È*{–#3šQ “ £2¸Q1 :¾f=©Ü”²‚R´Ñ+Íu¿›Uìs ‚šƒ‘)Ô”?š¿†9\®éÊ›fG_¾þ3Lq‡hyêS/eC1³kqè²íîÞ™‰¿­…ía ›š£»–µ%R™Â ‚¤£ #)_ËÑ0™[—©U•ÊRqü—š 5¨+›els˜+xŒ¤ÚŒC” 8UI¼CiB2ÒØû¤Öå&¼žý´ÓBFú‡Lš£2’Æ+ŽçFeÊȾå±§u·^ÍŒj5Mز­¬–¨›wœD;ó.~gŒ1–LDãä‡F´²Þlºº³ššÄ!,U"b¯“$B9%(RZ³Ëj!«LËØöc-rµù¦–õj,žØ3åPS Çe¥’eS˜#²‘ìºtË7ⵟ†£ãwYƒïwK»”{žÄH©R¥²Ù˜†G6|¹»(ŠrqÊÞ¦*Ø•òn’G™i}G\M°‹õç•%ÕL~DEJ[Ö˜{UlBbXÆ+T¹†á99É"”D±Äa’E±Ÿq®¾ý-ZÒ½Éí´¦ö`“ÂS"%"ÔÄG¹ÊÄC”I–Ä`ƒœazd£PeL¾k› ÊÈzeD­åï‡ýŽæÌ[0ŽãŒC1Û%³¤ÒŠÍzä.“»*º¹éDB¯©½å2Šú4ú*ÔÜeawVŠôR:IÒKÊUFºœþCŒ\¥“$¡Îä £AD9æ¡ÎÈ=[xþ'¯®Ñˆ¯¸%kµþŒõ¬²ˆ=ÒÁ[ÎwmA†dŒçtñT©È§UÓuQ/ïÖ%tÚïÇóã ·¢ùZí2”Yˆ¸fy ë¶á'9ÈŽAØÒ¯1+˜^×TY]EêñÌÃV¼,ŽØ©Êºt«öѾÒ‚Ûp¯†YËÜó,AY‰µ—_]9‰!RÅV¸G¤qöÚ%_¨Ö!} ê6…«>Rº:†ÌUÅ#›•r”UˆÈuÅC°ˆOl°ÞO7ý7h¹\Nû×m­S¡[¢X¼SefB-µ*½XÉŸe¢/‹—ª&:QWQ‡D[¯ª›5èåUCIf;¥d$MïÆü$‘¨¨@A¬}†ማPÈaSET{NaÃ)ÀaI6 BqPqÎ~Ú÷OwƒŒ ”¸0orˆdŒËVeJЇÞGí%C‚•â1™lR9†A È;¡ƒ‘ÇP@ PÔ ôâ«?ë´äsA’>æ|8Í[ðeJM0©Ô‰EUC® g¼Bp‘±ÿT6p˜} hÍ„™˜ í1FFðb“ [ŽŽ?P¦ÁzxLØÛÖ"‘°Ø  7P‡q¹€… ¹W9Ц!Bž“¸ƒ“•È¥ÎebËÐÈ#!Æ¢8Š"¸˜d ‡?ý Ü%ò˜•° †jÿ¹¹„B›Še `¢AªˆêB–ˆ¿õþ’[œ6Cd—ffq¸ß}Ì&3R®êb§ŽÂ+ˆÜÏ~-Ñù\X!DÐNK H!d ÛJ8×ñ£QÑ‘ãHG"¼õ‘®r©j¹ÎaN"Â#r&)‘Èþ+H£˜9µd­Õ`"9QFÕfd¹`Žn¬ªv=[îŠéú‚–‹š‚•óè”ìTU*2gU‹D®r&£¬J É·6:U’¶v[ŠA5ÙòŒØ†"7e1”¢5רžü‰+"-‰Ê¸JΆcêPùfd?)OwR“c¦*UuÒì˜(|·I-%€À‡¼ ] ç"Ú±%Ìå~;;YQ*»"ŠW¢• >}èd!²öB1(vöorL¤ï¢WÚÄÊ‘R` 0$ ‘eÑE×–žs¢ê!!jÊ!²øJTËú‚ÒÆ'su–¢<Í’#µlK5¨â4Â:Ö«|/7„–ÑöKNpTd†e$ ÁN¬I3ÄIânÖx DE0CqlV9>ïãÆÃÓ€E`,x˜  Ènm;2§„!{Êao÷!›Ð“+­]Râ2AˆA©á  u©(#ÖîcßkRKB–Ÿ"ºOMßmWŽtén2¦žDÏ+«|«žN2!4Œ„_§b#~hàÂ,c½ÑôS\–ÝyÝW$ã’cá})$yªTW•PŒS¤ñŽ"•hKëĈfÀæE?Í$Ûç%'Èr- •&ÓÚX¢¥£ëPge˜VO¹ÎÛ[’ƒfU¢èÈ…»¾lÛÒÝ‹G„¨‰Ÿèd–Qú»…C=‹òެB~¢«Qcoä2̯¦§op¹GgÉC'rúTíô°ˆŠäÂVb£÷+&=íºÄí,¢"èçYM¨\h¢“”€Èb)L⊪…§é;Ý'â#êö5<[RMlSÑj#¥Q.v•¸ËDIC:µPeroª#7V"i-ä'uÉR»¤´/#M?ºPŽ)F;pÚ"ýç-Jt‹åEˆ¶Gêž´kc!J«ó!…-JæÔÂÚL,ÆR¤Ûó”¥È•>¸’Ú.Ô£±êe™ä¤â…3— •>¿ˆ(‚.• ~îºÐL§G,²znžÒöQx|àŽ3š¦:"o";ä¥f'sälO‘³ãÿmM¦ÂÎÆ*gz|–¶þæü‰8v9ô‹”f²aÔ™½(®‚ ø¹oþ~ò](¤#XâPÈIŸ D¯#UÙósÓЋ¦¼kÞŸ-$+]1Ýź)„Dré…9ΣDj„z¾»õV¡™«nžÔZE¥…‘¨dRÏCˆ*:§…oxˆaHêe:qÉå%2L¥xmí«qQ2Œm±2lb]% §uÎ^+³Uè)(ä‘ì쌪gîâwuÙUYµ3‘3‰Ÿ\ •U#!º»(©SI}&%bí+R0BØŒ-Gc jn.‘†Qˆ„TLn õi»ŠÂêá(qt$×[õíZHäS¡XŽR¥Æb´# ÏάAWŸi%¼keFÞæL‘òÍW=3†ä=~Ža…!Š)ÝU3¤¤½Â AŠÑYdhÙÓb‰"Ò†Éñž¨r©PÅÍ|löj?µÖ«ª¬ÞY¥žŸLFÅI ›VÂ"¥Ð¦J6+(ê8¦ qÉØªnÌÍMÝ2!M}—Ö.mlumŠöí)˜gï-"\A'RŽCf=ÒVªS -/ke›ˆOuÄ|i4éM§lŠeޱbN¢¥›UÔ븳c™ˆ]j¦]K9VÕÛ*Z0áR¦æ§ Þ—äOÕ9–®”ä“箨‡¥±Н”m% v•p¯º’HRœB%1üú<¿ò¨Ž-­ë—‹X”ñO.cܹ€ñ3æØ£ªaFfi Ea.c‡}“¥ÃRö—ʉ\æ/~ª­•mCç°Ã K•Åt!lDt“ZBFu6‚çzRM«PÅ?SÎ! Õ,A6Ôõ”¼r©K«Ú>.üQúÔ®¿Ë‚çpŠ´rnH Â76 QU®aÁ:kq·š¹GUEM!64ÖÞ_>æÓœl6ŒHƒ ËuïN@¥ʧHÜL•‡ š[ÝRHâãã‡ÿ¯8ÏB‰ïô|«ŽAˆG)õD¡ª–tØuUM¿õ$³qŒŽo±,•V"DzT{¨¥L(D"&=†N›™èy+žFñ&Õ\£gµS+CJ–[˜dm2ˆ0…W*Lbâr®ò¬Jé¥bÐ X™þOOÖT˜Qʘ×[#5 ‚2]G2:ò-‰4•%´ØF©ý·ÚÛ&²™M¾Í‰ú0QάJ¥Ù5‰2nRE¤:‘Ë^Ñ Qd¢Ôt_ý Ésð…3Ío*ÂQš)V‚^Ä¡)KR¹O5j]}UÕ¢ Ak™`¢)½\¤Fo9Ô]û3 ³ò˜sí åbƃs-ÜÇZÒ²3¨T”19²Æ;P… ¥8©¾Ï¥ÑµZ½¥ý(äÁª,˜{U „*ò]¹ˆB4BÕœ­š.;œW ÚˆDð»nl".{¯#¦qî診z™¢ˆS£!>SûmφO¯Ä§2¸ëýñ_ôô¨âª”RUÎE##EYL—‘XžŽ§b¾¸7õŽmši¨†Zi3ù1|`†r5îäB'«ŠG©\9„lzêôœª¨ønÎ]¼¼%Yšˆ–94þ*F1 ÞaVgúYÈWñ‡R¶³c‰ÿJ0Ö4H Fë‡S½"‰åjUäu­Žt¹¹µ‹ƒIù+>x¼Ü×™;MMi¢¢Šž!6¦ rŠÄä÷"h²&© ¨¶T,Þ{cm{Ý)ýkB¹^T8j½CrÓ8¬#]}—qÉÏy-]ü±pÄ]´õ¤Ÿ#n’3²„kQ¬ÞeIŒä}&Ý.u¹V¥Â¶ó½{¨^]R`F+óaÔ¦k`‹)Š^#HFóêˆ;Š.W7ÊKrGD-eïÎÇ“ÒÄ3‘–F_~(î3´ÍüJ&ЉuŽ¿uóÿ¢Ñ·¹sw”ø£¥ W·¤äVZ-F*X*]+›J+"vç×+þÄGéúŸV&’Ä ÎA(]"½‰£˜Ç1hMª§q Aͪ’"%+š]î½Ô)Š™¤ÇFTA‘Ha;Hôr®ð­Em.®' ö‹Bj#dO¯ÏJ¥F(Š"¦qùÞ(æs „¹|¸D¡tº"SZ›ôëæ–åÞDZNegB8­Üå(ìDá !Õø»+ð˜•äšÙLUâj¡hû^‘ÖG!ެY³LAÔª+Hú÷ì˜Æ[±i¤7¶â’¹5Õ¤]±0Uk. "»n§r+]˜ÚH¦¸Ù~Fa³Ô‚m¢Ï£+)öÂ6sˆnÑ"­Š8)ì²{ÅN5‰cJ/ã]ž‚{æÑéòX©œAGáA…£ýšƒjvt6ð¢ååUVíL )ÅWàC ”Nì³)ÄrÂ@oËXŽˆfÃ… ð>Wžoó"u(Ò™ŒÜ ga`‡ˆa:)OÑ!܇«ÇS“«!Õ¨c™¿â‘a†PÁŠhr,'D8Ïð|Vô¤(…FArI€•´ƒ"A Ìȃ3¨ENêâé0äwØïJ…Ü*!•²µ|ì0'3lâ-H ÆV8¨¡»­yèD D ¤O7D8'.úR@Ö6˜©O“ðïtèT*f81# ?iÃ2B U Z‚iHw+Å„â6¹ð*òȃ(c@E2 ;9FÒ Ž!6¤ ÿøÉ˜-·NH€#À ?þÏú_ú ûIüÅ´ äº!ÐIíP|€ÿðE`˜Ýx^´S¤ý.fÖŠ#1í†"QG/î`‚LT+QÛˆ¡ ‚õ냓䀘£00æEø‹î)Ä‚>÷dÒQ?f ”³£2£¸ƒCN>|œ\åáq“Ÿýæ[x8MDì@ËHS `ÌXµ¹)’HThžt‡ÁÇ:À€d5¦¿>ZnQ3(l#°¦I q²:Q לTf(Ÿã·r°aF¼ÁSqœ'‘èd*s‰N8lB‡¡éî Nw)ÛñlÅÈ3&pŠH*:â‹à2>åíÞ_ŒÈ ÄDƒ(!ó &e‘.)†Mëe3™Ð*½1’4ËE ™ PÇtØ‚eÈ ÑÍqé1°‹áÒªÒAÌ+Ðí(B²¦¬¨ä°L¢2€Êã‚qƒFÙÔ¯zPÃÆÈAÆ;ò˜(£D2¡Ø/]˜„L_¤ê9Ûñ#"3‰"“‚(Â7¥Y-Q»y•B&ð¡Ãè# a Ð|ëF@Ç<'E2&W*±â(M³UQ‚Œð ©Ý%§¢ 'Cqä“+C©‘ÍŒªUijjuB«ä `ÁjƦ"2YºA»s ‡rà´ç.PzÇC/„q‹‚hf 4Üb!JcQQ·0q ™Q ^o¥yΈõ¦»9D&¥_v´Uú˜DÏK§¸e+ç§“q®Êt1QêÏ´m©%+Ðö™®’j¬GÍoÞm8–ûV©d=—?o!#â¢#Îz¸Æ2¹ý{ÊA2DV‰R+D,Búmz^ëuèˆV™ÍòK¦Ó¥õW#œfÖ6Q±L0­ÍžÎŸµaœ˜bDF±)ÑÅJ*à‹/‡]´´&¦qÆtB¢¢bG_cÔu¡:޵Cƒˆþ•‘þ¼\;Õxut–„ö­Ug/ îO{²ð—ßùR“žcS¿¨¯ІU!l#ìI— ’§qÔ­H…âyt’lMÓJ¶T®_ß÷¯¬îìEtG2J%Ò½UìUÒ·é–ÉÕ M³¨5Ë’RÌ}‘1¦³Y2šøæáöËýJý,[™ìk±.ÓºPDeO(‡ªØê¸1Å¥zr•f‘g]5ô•t›:ʆ,†—>å»P"ùbñÈfÝ”dßB•ÿx G]©$zk]DZû¿šÿ,¥úïX‚öœe%¼ÈòK‰tÔùÈŽ³èoòèê0êQ Íâ.¾„f;ΉS[s¹ñ}\J7­4”Ù´jÐYŽdLÍI8Êbˆu*üLÚ£ãFüJ>Q:©o2JôZdœ^ZiSÜ–)qå~·S(BRÇ_}¹³ÈPÆS»Ô]u"T§)ªƒµW”g'’Â#r§IüŽkZBÒ]Ç&Rj˜ù¼b‰)íA }ýj„(…d…9ÊYܸ¢ŒÂwœ½Yt–L,ÃÓîRäòSk~Ä¢2ȵöM>$dò ®¥ CˆÚa˜çgQß,ƒúŒt¦›VzgU{Ü ýåm(ªÙû–Ößdè®Úùö'’W™èÃ¥Œ•_6³5‰¼–e= ç¯} Cb:M•݉ý„aMeó65“r².FASˆ# !G)°™ã)G:ò½‹—mvíÛ³î~Ï[þnr>-vf¨š„{F3ÓÝr‚c'ˆ9½;º•,i›Äz#P|âæ þ²ùò1BÕŒÓer›Øˆˆ"ëvÜWS7­)Q‰f Gâp`„É6v&¯bïæWªÒ•­‰ºOqy?r¥×sîÜc'"*Mq kРбŽlUb7j»´74W­þÎY'ª2Dù8‘7´Äö>.ÑÑ Ôæ5¹ÖOk†aH*©n£•7JN±EYi^‘3&ÊPKOFê1Š{Hs¤JùU©œbñ6bŒ•b³„BûÜÚ)E{% lÛÙˆ¥*«‡šÒg7â=r›JT´O]:ÔZ#ÑÌ9ƒâ±²Â¡Eб¶Ÿuúæât& ¶¾õØòK Ô“.Ùµ)ŒBƳ3„8‚ ‚)„¹3q„2w•7äÏêK”Õ•)©{ ï±S–Ù)Œ¹µ&ä[ˆ#!ž¤‹ß!Î-ˆ!Jþb=vɦÐçTñ( õÑ~ØÆ"b{–¶¾I¶®q;”VJ°Æék†°ÃïI C ¡ÜGgI‡VûR?ºTmdrO=—i7`ߟÄÌe& {)\ÆvS¤IhàáÄO圤w©UìØ¡„ü; $OK^ïc[\ÏKÖέ….ý2g)ÂŽ“]ÓËÔ^ãô0©óXRN5Kˆ’3´ÍÁy>Räç—8¬MáO³ë"¦Ø·M¶:ï†àà„®9U8rÅ}ë©„N68ä&ÓRÖ‰÷ˉo-£KÝ*ê ÉŸVíq)¶‰ fvr·È1¦qOç†ä%Ï'dª{a¦7óPÕÝ,‰8G‹z”¨±ÕG9,J£÷ ¿n¨‡;N;X5¸êÍP‚†#adjyä –(GúYMa+a1&¾} ©ÚÞr)mÑh}(ïF”A”r#­:ÆéVâ{”S>ö“ÆŸs¶»§æÃfµ­)§c]ÙÒf•)ñÄDÖ bvŽv „9¯^ ô©çCÚÞ¤ÿ­[Lw$_ ¥5«r­O¢Ë/Ð#þ1ik·9*š1‚°Ú=QœUöá(ié’+òDû›z©sZWãÝí‚;Õ6äLžŸRÔ$¾s/†E]¡ÎY)háA“D¤‚“ÐÄ? VZHU…‹ÊíynèB©$•¸ä²Êë•ðc*¡ÅNµ*w¦[«wâF•W„Å—±ì¨Û&P0¡‹²†_š„¢à¦sof-°mgH¤@ã£^œ¨Ö¸„) 1&’ χ“„C×. ²–”ʶÆb`•¨©œ•O¾®—\…;‘˜Ä±Î;“,¼É“:º¿ÑE-¢Kþ…¨ÚL´¸&­ ˜Äºš.´â4®’Ÿ$EsX€‚™×è9åðRô•JÍÖî5 ÂòÑ+~1Êh•k9iBì¾äA1Lf$­„7”G(¨Q+¤Ç/•Êùkj¥ÎÄ6ÄÝ6Õ.ÿôO“7wRœ ° ð†¯þ‹úõcðeg&;?KþDìÑñð* Ì®CÖw©H§%›žE«_R»âÕþŽ!*¾øF±^R¥ÿ5¬§tÒ)ªE™JÄAËù~„S:älíDg]±$âѤ$ʧ¼·óN#Y÷_æ`Æ8î0€®ä–8ŒE#Z&¤ü•ñ|¡-Q2,û1OÒø‡í;3™ÙÉ ÌˆÅ&¶˜v³’WÁÍwGNúÈÓõ½ÅŒÓ¿bˆ/ʃ;’¾šUÁßý0‚ÎN_”O¦ô­ÿ cÒu”jif1Ÿ €$)å sEš-Bä«rSJÉc´ÍÜÓø²1TS]ZzO)#;×Kb9*ã¸$Q¨%5ß[ \gí?^&1 „%A#*ÙøSÈ>óËØ0¡ÍÑ“¯qB!!‘’+Õãñ¾¢TCI_²ßêÏA)0ë¶3¹.õñh+œ!.âºÆ›³>~‚'{ÒÕ0}]sK8A¨„ƒø!æ9eÇÚ»q$á)Í#è­%­½Ö¡ßPÞ«¨auž‹Óˆ@åAE,!YžuÚM5gv¨„Â×o|C'’BZ§EƾÐâGð³d‚Uô¾›Âõœ¤ˆâSG¨•&›œ¯^> [es1UŠ-Wèj¦–¿,ëÍsTó1™Xå¤óYL24ƒSŒ… 3'‹Ë*²°ñ±Þ–L²ŽÞK|Î"É1géè?Å5ÇûÖ“´Å9Ífç)€ÀM~Š#ºB—‹ü6~ëÔÙ~¤,$¡–ãd|[ŠáN‰C6Ã-U„'¦NAUÓl§1%°ÙÑ1Ì¥cq)ª›:Ùî1NnÖ"ª$®‡<‰™^6)gÅÂD©ìõ±èÜ팫”ТċC„' 'ÊëË9(Rñ-aýªŒJV—¢ö¡º–ÄzuÝ®R¢Žå¹£ uõ»ûÍ(ö6|–Û$‹ao,.Âýޤ]Ê>L 3¨ åG5bÿQ9©Æ`ʦFÁæ°ïæ¬vÞ¥­)?Ф¢i¬ÆcýßÉ|÷Îì’ÈÔÞŠ¥ŠX¤X®Äƒý¾w†;ð¸Ø¢ˆ WY g]”iBoYÉro›ü¾æ±$Bæ Y4/¾Dš6ÈB.Ñbµ„H3 PÀ†‚XÃTÒMá¼ÏMh€´½íÕœ€Òoœ(¦…”Ðï„ö”±ž‚LŠ‹ƒ™ˆ"¥u¡µpíO½ò<ÂfQ¬GY”Z-.ªó¶nÓÑ~øõ¥`ªEÀ‹,y¤ÍÙÏ×› a ‡’ûîLKö©‹^— ¢~Ì6„‘©ÂÐͪV$Œ"ÔÕ,顇vrRŤ5;åáz É”ÒK£Òõ+–•”¶Qä±F5ê*¨^N&`—0â…tMŠ"¦{“4¥Tâ`’‹RÑn•G¢" qDœKSSší祺´…*‘ˆ\ŸëUˆT£I]³£0" Øew]OÝMå–æ¡Âz=Í‚šBæè”?Ö6̹öæWxG¹g*R1 8 4áUAˆ]¾óI½RYäì‚G¹Ä<{a¯µC0Ї:M»W$$…ºÊ¬wá!Ò„ÑýBy»çk­ýkË˜Õ×:ÝsÚìd\ |!ïß"GR]ðX%e‘H)Ò{ÉÅÕŽHæUŠaqV.Ó *ÕK­Ý‰³SqWð×ÉñóKéOS³/·»ˆsƒ´8Bü0!ÕÌVDëñ¥âÄ"(’ðM5å†Ó²BbžÈ‡3›ä˜ç•¤8ÙBTÿn{Žæ²Í´s½îç ©ôCê§2:•šDÕ¢N^mu š}¸jÕòe–¥÷C½µºi—²}[•áD¥PJJ@舖į²”Þ ÌwÅ·­p¹ÛnŸy‡ª¬£Y¹KÃhÛ~jVÞùZâU±Iê!}J1“A!:ÝAAY] }ÊDKí{%Y„”ýjè…zœª9ÀåhZQê¤Þ™-’H{›ŽDÛ… ¶á4’fÌzn „$3jcbÓÄi‹ØQ®Ò‡pï.s¥Deÿß‘:cýkÞ4ÔÁvÝĤîo™®¥ôý©}X¸Qh“™7êÓ­V‡>­(GÜ4w‘íEAUÎñK‹2Gªú|Ö^ÿøÉ¨.GN i W î  w >`û³’UÚ„ôÈÃúð lqM–¶°½$w –ÂÈB(¡ÖÀ€pàX½ -<ì6I1ÿƆma ÃëKPõÞñ›Bß õê9_˜¤h‚QŒ¡–#Š8 ìRðrõFå.®Q;½)NÚÏ4—Ï<³¶ó”Äx„7¤tcY:C(žõz Å'#zšRÈ.S7¶ºáVÊ2ê¿ ZVok½ÊWZar\ŸHº% »¼§\¨ÞWð©9ÅV¡@‰4•×hŒµœÖíˆK¹Ó‚p¹P&äR#}¯–P޶·¢ŠY$v±+PÀgh?eÕSæ%x½…öú‡òß¡,A‰µëÒÆDpBä×§,ŽuC´¯ÅNˆÚZ¤…§ˆŠå?¹ˆ×)nÙ°E=®wäŠcTš‚Kä¥6¡Êµ²óWwuä­nÝÓØþÓbÅ@‚ “ÏÎ"´Å‚yM…ºðÍ)òRm_LH”“éØ!–FÛqˆQ,s‰â†Â0Õ±:…|ÌÍom53+O,|QÇë_Õ¥2ÄM0CÕäYW j”^"5‹Ä‰™êK7K¨í»ÊYÔ@‡çu¶–;HbóLOE ¼ºø?Mµ²H}¥¸©i¨hµ…5EMä(çëYŠGlìÜçê³]ü„²¬ž]‰%–!²| RùGVIîúw”B%Ù$•ŠQÀÙTÒ•Ý8ŸÃVÁe\As¯[Å£¤­]Áí9Š£æViLÙf£ÖTîHÍ‹ƒ>q=ods—N4D­œ‡gGbE0Œ”“-¢kVÅ1“9q÷Í*Y'‰Zù$jâå$Î CGì]£‘¶©Rþ‚YRe>rO®½Ï-kk×ÔrÜ»a=—T“šãÄqM 4Cœ\¿WÜÛ¸œãpi/”W·eŸìÏCÜaˆÅW¡PÒ1ØÅ}ÒÔ{IxGv.Q±t¤òQåz<¥p¤¡Þ…¢ˆBXïUæ>Æùµ®uSJ]5…¬ôßv•îæˆk€`1˜I.sÒ„ïá^µ4VÆx¤”¢l½·’˜gZúlNjP–è©RóDÜ*Åp†¬×w*vë>mu*Ø´í¬‘&ì;œÔ&±Ô"ÔÙÍ¥Ë ˜yø—g>Í16B]…ÝÍ)Vë­Ûâ\‚£¼üÔ…&¦‰Öî2å #“=XâÕë4,Lã)1<è¬d çRò—]Ö–,ˆŸv(šèG’„­‘Ÿ›$’Joó[Z]W4ë1ŽÔQÑÅ`p`,' "´„*×ËÈλl>ØØ  Î'}Þ{©w ƒ•Lwtû9;Ve³Rä¼ybùØ`ÕÊÓ¤a.þªD#†w^APšã³µD>תz-³B%n=\ŸTúÅ¿we˜¯J‘Ò q€å…/W6b¤Z)žê1lQóçᤸ­Ÿ¹NšŠz­ŽJ¶] ç/ꌳ4(…û¶ó’+PêŠÞ§Æé•¹ðÔŸ+={ƒ®ÛuŠþq¹,üºUÄ|LZñTUžSy HŒ×J‰÷ÐìEÒæÝ"Ê¢¨3P´Œ¢aMªžlÿE,Ö‘ßèÑÏ­LÆb™ud^æñ9 J#ÊZ6•y(èd³qªCj‹{›I²{É ­W}Ìl…˜#y© AÑ p:€ip F$¡_ÏñéY£ék€¼&ŠJß)ªY‘M)Ìåkd¨b …lpI(SÈ|É鱌10O՞ɤ]Σ]ÜãbÓ!ÛC³=L¦¦n¸ŸÒeMýº’ô>‚Þ¶±*STºÂ+ hO1¤h…a¨Ö½ Í"i1‹´Ó¼&›ËÔ–rDYN´«HÊ‘!šs"F”¾«î:úuI—ä©-U½>ë±^ê„_k&0C鱂LmW÷ªm”©–Wj?-O9D÷~—£™k¢J´G1vrø»‹\üý‘ J"`™‰úŸHþ3ïj×e„ B÷`ÕztËAÊLUz–¤¡sû‹¿yvÕ*W½˜m_búŠ›)̺Áa­0åˇKÚ"7bb~z“-h–ôÄzj¾z±ÒaVfkUL2,ä7=HE-Äö ñl(­“VDê}Ç•æ'„XÏ A /ØÉ(¬BQ‰ßGbæKÝÃ8µ"í­öè= Dk¡)k¡Œb”)ˆ¹ƒ¬F÷6RœñYU¹;±¾ÄÔ.a©\¦e7›ý„4TIMb!N㥆B …òëJ_eôÒr£B«rt‚ÛO—¬[g(t§¼¦LJ˜“¡S‘ªlOÕO¹5„ÚèʆC!iÌô:š!w³ju+ÚW©JVbEilÉ0¿vs¾‘˜¯ÇÚšAk{f9´ú‡{le!v4ùxæUV¢Qï1M#Ý2Ýž' ’ÒØün”¶Ûʶ¡WóˆDƒxjÀÇR¨ÁBî.ŸÐVâÔNƦBþ)åêÈK CZ!/G2J–MŒéV?“‹­ ÊÖ×âµòpbБ]%YDeF¤²¦8­0‡Òy^†°™^ŽÛBÊ%6ý 7`­J®ÒjŠ‚Q !š3x¦wlJnñMa¬üNvæ]Ò[õ+•¢ìº¿8’:]uä#R';ãÞîÅdÖÄëvˆÁîµ®Xú›%£èµvfJ©N^±“–Qtƒb¨†º¿u3b*¾Òëäg!ß H±Š¬çF’RFaD+=JþÝ#u2Ü×_rY1­8šVºäº‘7)+Wy“Š…MR¬J&ˆÒ±Š»ùYÚÆ‘¬Sëï[Y¼CÛŠ^Mmã duG©ÀQX,@ç`ä'a v¹RJ³KŽZÂÅ•ÜÿèRõI:Hw2%¤/ª —+‘Ÿe£úK4]0Øy^ê'”á^¤V#ªK—gˆR“H¿®4"ÿä–j ɃI-§ÓÔQxN'ážvÔA”b<éJ®¥Dã;‹L#¡^¤–ºNwþËá0„••]¥Y–!DÅsYì98N\&—3ˆVqm•.¾Ò{S㋦,…)˜æË …$DÌ­}éT¡Wû÷:+Ý¥¾ÒÈ!ˆrX™–Úˆ1N+â­Š‡ó2{l’›XØÄíEë/.5×FëL¯èL_‘þR\ªïbdcEd»abÁÖ: ù"PU«kS󚯸”· ?àaºüKêÑCº¼« èbm „¨ÌJÈÞTg|ÅE¬¹ l"×ô«%ĈÎ3 FÞù®’ŒC.˜D•;s«ºgf›\&ö0ì‚1Z¥H«“uN3Š“h$ÌüD³_5•6ƒd”–“uË#ÍÅ¥˜ýñþéÿpÿ¸?Ý?ï÷ùý[h@YÜ77Ú`„Å Õvò׸îÖP„ä*Ls;yѺƒ XØ)Ú™£(}Ô¥ü1M*Ÿ{T"›âñ!(e½*;I\މq„6aC=f6ÒFJöÊ ‚jiX¿øj!YãDã…¤ï Q8_“Í‚ –Ÿ†98Ô–”ñGΊQrN2ðC•m©ã ¢àqËIo1¶Är}Ç¥¥)¶ÜgžÞáZ ˆ4H¨å„¨AL%ª)Õ®(…~ÓÖSï ©\!V¤6ÞØ)H†“"Û¨YQÊ´Oi~² VO¥HK.Pôqž‚Š•´Ì3Ÿa°… ——¤{®vÓò×WR œ£iÈ„šë„oIGM±1‘ˆ 26MÇ0F¢å›ß%¦Õ] Jpº„³!“kÜFI"rÝR„£ª[xaˆ<ƒUÍTÅï{Œc)‘¬§MEñ¶“ä (¸ô³üÏÏ–;|н½O^kÔ)FûøbD·ˆ9‹.GøÒŠËêÑDО•?f¦ôÒ„ÄÂ=©´TŸ0ë¢^ŒC<ˆjcŒ›ÁŽ!F±2&¡FN'+æ©r"œGÚm‹#ÖËJ/˜¹})ˆ'àBôÏÚØï,æ,’,FÊs½ñ§1xö׈§;Šjº ¶aX•S¿C7×È2µ&–Á:‚QlI ¥q§Ý™ò¾“²°Ÿó!Å;QÐŽžLÉ‚ E!ê+SÐÍI+’*šØZC;Sóÿ£°üËA°å;•„ƺkìÉÜ–EC&'},²Ó•dŠÚæ¢)[è…õ-yræ2Hb¹Ä‘…9hmô6×<„jî©í#½IÁ‡K+ŸÑJ¹Õ1Þ´U÷ìYÓ Ùžo.É}L;#˜»L™Hl!Q_šŠS&w.rÙÞˆCëoJ›­Õ=kõ2•ûu[“.+­SÕóiý´Ë’˜8MmÇV 11eÛŸ?k#^Ρ•)© §ÚiEZ»SsÛsf`…ìo}¿©˜Í[‡d糪º¡lññðæ*åê¥Qm”7q+͈[¯H÷ðš|£^´¸­öq9œBP˜÷!HãˆÌšéöV•¶£ÐÄ­+˯HŒ”NËIB©°„/T£ŽŸä+Ø…"û݈!,3ÈCv#½ûHMnÁÐþö~.ç¬ý‰¾†{ìo±w"èº|nJX²ˆÝ+¦‰¤¤WJ“ÊÇ*s» c®KÕì¢oPÄ\§j{³‰&Wê.*™ÄÁUd†–`Ù¦‚PLŒJ ¨áS¬áý@!¿¥aïÖ„Sq¨ã|ëv0!‚²PÔö‰‚ ÑWé-ƒ²* ‹Ë¨ØÅâF`®¦|¦jƒ›­8™BÕ`~âÉLˆG‘ÄìéW!Gäa Í‚×GAi"xŸ„ês—hì0ƒx1“JˆL]PCäR45NDÇGL«ö9#bÂÕ>À]ÛŒr%Ô2¶SfÅ Ô@!/Ž(« ”7+D o€u;ß]€¬éÌc@…œnFwr’¬ÆŒÔˆq0Å)þ39Q€c 64â ëœÀVƒ‘æ8‰Ê8ŠQO^´å¦$@H$‚)‚쑌9‚ 2›!⻊ªLRU0! /]O{åq 2'ˆq xjL9‚tS63‹ØæêÞ©*ï!`UN3™‡ ƒZÞ g¼-Q7˜„žÇh•Nƒ FA”D5}b³ÜYEkã é6Äs°q]̾Œ‚ãù!ƒbñ%3 Ãƒ * ¸8*Êa›å½ó‘YЪÁÅFQ8ˆ' ñ…#ˆÆ$o°Æ¨ta &+:9‹ªàÂBó×”®˜`€Bˆ»ŒÂ¸µÆ_í6f 1OÑnLraœJOT™{³ˆDÛ‚b…°ýøŽ‹h`ÒØBn°{390¾'ú”(½ ý†;Bð%n*øÅrÖR°Õ•cɬr+½šT«ªéÑЄ)·(C.Úšw5j­œ†66ÛõéJñHœr…WKöm­5†VÔÊ­Aß‘tKT²2rQ˜Ër:þ;riDÄ¡}x\’©a É›ª&öJE©AäJ™q„§14îáÌB»ç=mkêi¹ sì¬W1îýy)›D¥Jèt•W)ÙF*ç*/g+)’VÕ;_”‹ßF#4Ì|¦Y]¥ÔÄ“)Mý°‰¿l^?vÑ(—Ìžsš3fU"á^]J\£ŠU£Š‡](4ν˜¬Íw^NÏîêí[ˆ[—Ô!*õÑQKZ955ýÑlPȯ*ù…”~oîÌÉýˆ…²YË…æ¯~MŒR$1û?H¶1”G12ôî2ÊK V•m³z\öJµ´"góR“S|)ЬKݽ›xLê~cIÔˆÅb¬åT;)‹»vÒuL0æ%kÕI‹åóÅ5ûÒ‹Æ]§ÍÖVºÜ¤6«HD"HìU‘èZÒ’!0£¸T2U=žcìйNFU„²œv”RÚñ2”F¢Üª½tÌü2¢¨ŒtíO9wÄþñ”®§!Ö˜®¨ßVVQHÍZro×ësöâšB;þe¡iùl5¸…)ÖËW¡¯rFpij¤‹;õ5ÙMt‘z\îS.½§Ó›78¯¹d®bùSi™)X·nûÈÌeòloZ,™ÖÀºÔ™<é: ‚PÒÉ?q2¸ŒÁœEúÄ*‘œ´Dt¡EΧlˆœˆ•b ¸ä*næBæí•ÓM9.»§÷u“!2,™ƒ *N‡&_T‰#"æô¬S¦ÔQ êä~2Ü‹¸˜m®ë»¦quå¡Ý…²Ê)¸ŒÌ½RÑëVõB PíéEqV©òä/Õ÷)t:aNínël_Bz–§çRÙÊÚ[Í„Q›qðÍ”gNB;[:FH’¢ñt¶BúÎØÕbd’KÈ¿bHºfŠÍD®$o¤žQª„… bœ„ÓŸÆÆÑÊUñ :n·n…*ÑÊê'"æz²PK?´žÞ™Ç¡PªŠBz”‰ømä/Ó2DÆ*£°ìVeŤ²ÏÛä«í(ÊF'Öô´Ký¬u±.é3]±ÙUˆW&šB­gæ#9ŒÜ!kL~º$ÚLFJ¦õ´Zï™jmÞ"H8–[ném%ºˆB˜‚”¢ ÊO§$ó~ÿøÉ˜/¹NžP€j`` DÄŽ´ Dø™@²ðßß—×[#W„ÜKÇjÆ!_l°TíO.B¾ †TS* žT[°" Å!°A°ˆvs‡ëMk‚a”Þ¨\çuB>CãE§#ãD(ŽÄa‹‹'Õ@N̉§fØÔEƒ%U!L¤‚ŽUt+;ᩳu±ÕB½4ÎB0"šbÂs Æ@ÎÊCäĤecJŸÚ0„g)‰g\(D®u„0GÞ/ òª±úsý≠Ø1¢3Jð $E3Œw"¨´tuJÆlFÆ,ÈÅä‘xH3x(˜Á6âkñ_Á›B2¬c¹1ÿ)›¡i a‚ä‰ÜwžÖæ¬1˜Ï¬@戆XĆÇ10È!TߘaX^HNà¾gE÷åµöš›µa šÚä'²¹³#2"(®QTA]V!‚0´ÁùiúÅ!ÙÆHV1+Ï.hÉŽhfÌQ8ŠDK\G±#nBâ9I#૤×èÑT‡Pø¿%e0!Œ„)BA‚`„v1 oÅ¢YŒà·pŠé,§qÔ[çª=ã¦0roŒtm͜ոȸ9Šð&¢ªŒH0…3`ôpP[`‚ °”-F‚b©û1”¬3C!HF‡Ã0!(´Â¡N2#•oR…@vdÊ„BƒÐø¸åÇCC¸L“B¢ “cg&eHÔ”$jÓO9¿,„åw*°çIg*+" yJj´þ¹ÎV┢'Ì÷)–мÙFÓKºQuvz!¦÷Ôgù ®rXüì¶MêùJ^ù¦p‚ª‰¼š†[-7ê׿.;næEìYÛ7%Ú˜™ÄU½olZ¸Þ®EmT"ª9ŠÏ¾)G"ÜÕe™Ì­Ê‘Šû5~e o]­·Tš6â7z­• ¬rÕ6ÌB–¤áŸQrù^„£ ‹²w–Bý¶ŒêEÓ¹%ŸËj!ŠrZÝ’ŽÓ¥S1T†T³Uت¾ìËJñÎW&%UÊä= &×’â’ƒm=;ÂŒQ(j×Þý˜F;YÒEŠGG*vˆv?®ÅF"YŸ3„'¢/[)öK÷W«¿lby¯ˆ^ Å[ ºq*géu*&Jc”béŸÊ7 ‹ã²Vö}ZÓýwÐè˜ùb:õzáÖ}¸¬•=Z`ˆíK­V¨Ÿf2®Í— Å|Ûˆ›Õ„GJWXͶ¶”q7D-ë 4ïdÛRŠS':3¿&Ì AN²Žo9ÆZ²4Q’¶¶¹F]-)Ù”&ó \V^“¢*×y’Ç2Ò„Ü:ÝÎã q6[/ ×Ü¢H¾DvBîþ鼟ˆ•3}+†™I!nä~Òº”Šžfr•5(FOzRåWVL!pm3Ñž””½#ëæºu=£"ïvvÛ¨‰vl*H”wQ9îô9Üd®=Ù<¦õ1ÕlìE.}©ò±¨WÂèÿÙVÊPû«‹ÑDªòHb‚-ÞÏ!ËR„ÌEEvܾñr½Æâ¶õpke6J’‡tE¯ª«ñ$aŒÌŒt ‰Á  Š†PÝ Â'7a3WRn@ÍqR=ç,DW!Ê(¤ðE2RrˆäÐF/„7CzgÀe 5r\¤Í‘#ܧÖT^E¢« „O>ÐÄÁ" aœbC°‚Pˆ…ÓSo”{QpB==)ß–°ŽOŠ/0˜c ¨ˆEÂ!†a Z#4dq+?…4W)t3†ã)laóÌ‹[³2"±P«Ö.‡2>c‰zl¥ˆø€Ù9óꨤ`Ì!Ëe¹Å®KO×–œÇHÄÌFE ̓ 3 æ°ÐnJ¿E¼ï ëµJôÓÀ…1IyÁ.c˜BNÒ Â†éaž! ›1HSõÔ¢>!u©Å¨b³3q_®·Uª~eF¶§ën¨ÄRКDR¥/‰ë—*æÃ-j¶¦!½uSléGþ-íb)ù6œÜNÂ"‘ßq¨d°î™•[D(¢ ÉäÕ «Ìotzù)ÊÌÙ^Õ?ÄÏÕÇJÝìy°mwcÔ§3V¶iœç;Np‹‚`¤r£Ì¸gÂ>æ1äÔÖAk›–õã (öê"·«¢3QòÓv™D°”i}Ô£Tº]@†­§[ ‚"¤æ\#ˆ©ÛŒ‹CÌ.ÍL12Y7é±?ËV÷ìUËRpAÝX¨(ÂÉÕézB¥)vþÜ-äç{Íj9Å×D]BC“,éTíJÌá »–;KpçUA©Š¬émwµÊHcµ¨„Šˆ“œåíœÙI|ÞåU^›"ÍL¡QESæ1•ù'uiYZŠ‘ÌŠ˜+c¹¥W-’Ÿ~‰¢Û$n%Å¥zÅg›F5HÞžcÈmâœRºUØo£] Õ¢x©†Ï˜¯%í"ñkCv¹JuâZµ¥°ês§ÒÆS7 @C‘3Ó%”œûC&ü’º."Ñ%öÙJc(ª’¢Yd²ÙŽFu™‡\_#a´†¡¬ëJ ÄÏT¶¢ •OFÞäò°WÝéÝŽPëÉ’rÿ¸‰'>xOÂm]nB!}LQg!ƒ¹Lê¨ ËgW2óJ锦Z^D¤JRùy¯¼Ë¸–Ú½^ìë´!½‚‰S‡r'¡¯â©H…å5½ùY“V´Tüc t`Ã+ù1r[mNU¶;½3kb‘ÅǸǟé ÕåáÑEZ{(ÂöÌD-Ó,:¦9H±¦íƒG¦È¢_ÔêSSn¾¯(¢t:!$bUå1U“ ìd”ZÕúòÍK*?HrËK÷,œ9šInaÕ»+Æ©H9\˜¾«’#šˆ!5Is·å?ü„ïóåf)®2Ñë~¬!L¼@«^Ìâ%?åêeºµQ1h!»gI¨Ä,™ ÊœaÅn•T"1Ë]}*[¼nÂ!s¹ |O&Ûõ#–dC²L«ìåEÕHBP§9±ž›'©r—¡­–Ó~âÙF£yÙ] KD´þ`„õ îøM‘Hh¥Mù¾Îš.möE7ÍÍ¡(B¶áŒ¯¥áHšMà¤9 _ÑY?ÜB“k.œÕòÓ¶Í¥+‘ëšf™[¾‹!^÷s÷U'x¶yÒzåûØ|–ý}p}¯YÉZÛ'‘ûøc= 1B”Äl¢êOB%{èžuö5x¿Âoô”‹Nêbwp“’3ÊvŠÇÁ‡1ˆíC!”Ûàô=}k3†!ˆÕ"c¬h¿>•zœ‚˜é*Ì;\šBWÉü%ZˆÔ?“„ô§/P¾'XþÄMMC4í1¥D+ŒS¦ˆ§#ýrˆ>É´þÅ'c„S¼|l¬™¢Ð'–^1^d˜q*ùåg”B•m3yPrñ*—7¶Ø¼£oD¤JhÅ·Orò^!4‰!Â1Ê QW=Î|ô̧Ó%J)žNƒK½]§%%_³·°žzõÇAÂ!4RŽ’®7ý©ûô’L¯mã½ØÑÆ9†+޽dgY ‡û<‹t÷Æú¬›2òË•¬²V}‰$’fò YL–(8†1IJ•Sû¹8‹2ñI3 "ï¢7~l¦ÔÛýù3½š#ÜÂ,ã”"CÊç ǫץ¦K¨ì;§[˜H—ü>Øj%œíÈv•ê½ÿ¥¦&c ÍdJj¶¥r渕|þª;#®¡…J “ ¤"Rd”Ѭ]* ½"+“þ»Zq5ìBˆmÒåkj“µqÓ)”U;•)E¤îC‘ÄF KBÊ«VlSU¶‡êwVkü­¶’A~‚ÈôVUöF9E3 [6ºRrÈbÇ]ˆhÉÅ7%¥“ûÞJ'Ôy©D¦ Šjï ªñ 0vœâ è¸Q±5ÖM½z­dWäi™ÈR˜‚.#!¢(Ž­2Q$A9ksDÌ©%„Ï–ý/ÏzÛ2ÊÒ-Ê¡ZR*”˜u*X’™ÔF±TgNJ-Z¡3iÒCs>…Ư¿s¸¢Ž™sÄPgœÎº„¡rØ{"Šë+Êì•¥©·ä´¤¸¥â“6œ-Y’ñ ÖV‘ïI}¸­\~åó²Dm¶RJëgü&£:·²DS¬«D±eÓÑuÛ)ÌLDßɹ)D‘ýtED+UvCòýKÉ"]|èB‡4èÄ#¹FÒííyígòWÕôŠuÙ *ä­:ˆd‘õˆ–{¥(Žï3]œ‚ÔO „§-{5<“/2få}«fÊW˜ªt aeq—KwÍCÿ××*ü²<¨c).RLiT‘™~A'm÷÷£³>Å‘ w¡¨}ÛÒ¡l½.·!(D¨çŽÂ¹UîúŠªŒ”cȲ½×Ì”RˆåÛVõQ9å¡{ÚBÊ…"ÓãS¥M"zÈ\¦5h[ Ü¢5ØQ‡éL\Â&Ê1g*ZW1CŒlÆá‚Žj_ˆYf—åJh•˜ÃA.Eqt(d¸Ë]#dÃÐ-Qƒ˜uR–µXÉDj"AC8Îøõ΂ŸP„(‰@C Зoç§ Rã > È!ª*gç1s ^@b¥8#D'7 ä;å&>) 5 Î…ECVƒ¼¡ À$*"k„Ž?FÄSN¬ÍÃi6lÌ9fŠÔEaÊ 5œH¤Î|¬u^æAØrü(Æ8DEF1ºËâÏ̬˜Á2 B 8R€)JdB•”ÒÀN\P¡ƒƒq…$Tâb1YdlÀ»PÚTZ3À‚ƒÊ¥W++õǽ¦;f¨†¹´Râ=t/”{–†lRÙTBÜå„,PR˜–×Bý™ñ…òÔÄ9,KòóÂ!¥)¦IP„ Ëwß(@}K>«#ÿÞ¶óþ!Å% ¦qˆ«†lr‡âjJ2䛦6É<ÝKÕßÞA€€aœÒ¨Í|š°Ý@3›2˜A¤Ä-¨«'¯±‰ïï8C÷Y y&ýÄ*êŽÌ‰ ŒÆá>S”Ý’ÏÌ÷”ÂÏê4’DžzƒœY>2Pã¡2–´_}æ¯Ñ´ÁEq#Õ¥C&ÎDrB3¸õd»g’ÔgL¡ŒåªœÑ eª¨¦Yf:XÜÆeCËKÂÄžÁŒo­4q"V.„î´ýCµ¡lj s)MÕ*r/Hª.©ÓSœý'V÷݈Y*$ÅÒ‡qÎS)œÁÑ´ã Ž¢ŸSe­ë-!! õ jÕJчm›éÊY(“§:at¢”á3de]µtGbI'šõ U·£²) qAKE eeD#Ó”ˆÚ‡íòyJ½ië?ÕyéÔ¥DHà@0¥úDFòñ¿"í=}¡Ú“lœ¦Šn¡#ah95žä#—;‘Ëj"ïLÜ›®šD¢Ñ BŒEPÒImè¢D¶l$Y=|Ìl±Da޷ɱ ‰#ÿøÉ˜0äN¿}ÀF@! X«ÿ'þr´í  ¶òº wÎmlÖô ž—2*›[†ö£)MjÙÇqÂ4ãÝ…3¹0An^PVž^—Iî¬ÈjÅå­*Ä»²M¨‹Å˜æ–¦b]Q‰c3Sù +J’éÒ~‘íVvÜPˆÄÝg÷e£Å1™Enû*¢+³ßæ¡ g”žÂe7l9˜ms ¸éñDd^Lq>{úu7êÅU½oµ%ÉL±œù•’’W2 ÍFSUÍ(Œ;Æì5‹f¾Í½i&¾öæâ«ߪu´Ãh§~e±N2þ„GL²$" ºµs;gIJ$¾mù»Ê•S£0Ä+Ðe \e¹˜›ˆBÕzì:õ¿;¬ôÊ¡‰Å¯óbb0ÉLÿ×LcÔ§t…ÉK‚§Io«2X´™n„eÄêu,r ‡bÑHk Q è%:F „.'ûP†8bØ®Ÿ-—Ô÷[—?SN„.–«9¿jÒ”Š•gäb¡ TR¹…²õ1´ ˆn‹o!.½'+q1ÜFãÖº2Še¤Dž1Œd{ºUóó:’¢fúãª.×——jôaø“ú­vËQ‘_÷4¥ÆÍíÚhÃÕ_df$’§>a*‘ ¼ºd¡ÈÁRF}6«¥œ…^f¬NµkºOåR#SÿÝ5x–Uï¸JšR¸Dg¡œ¦C]7xÈÄ.á*™»Lµ¤Mv¤¨å­‰b¨‡­UËÄ©–ƒ8ÅÕ'Þš§.—²…ÚILÀT:µl!­v Ä+«2çÚ&þaªD¾”‚ÊÙ½åò¦ºXrr{n Iܦ*a({§ ¨#Š;ø)ø©Û—BžqŒ3S‹1¤9ŠÍÌ}1 <ƒ!bTÇ6¥Ô!áí(‚D¤#£œ¼„%$Ceª@'ÌÁ0#aT9 í/R[…¬±E‰ÑÅà±Má Èí 1¶  ”DQ›· ‚ !Ù‡Ž" D8Êèa\chqé˜$ Šhu °R½.-aÆ/@âˆfV §àœc €aE!°Ã_©É¬šm¬éA!G(ê(1°¼W¡–¹ˆxÊlÚqa ¢˜ÝЍ€ V(\S/ ª1 » ŽLÊFc@Xnåcº‰õXæIéBD¼òÌG"mÐý£A+Ò¯/*§B¸ÊBR aܵWâQÎæBmû0À‚"6ºù!WRvÊR”Ï?igõĤlq"7=‘)rÐ5†h@! ý¦ È_¶^Àr ‹ ÕFl(ê8°!8A`@å sp· KÊŽ •8ÉÙ]0ƒ ‹ÇƒzÖ‘ÑŠÜ!22¾’Üf%ó‹Ôrl%;è÷$B‡9+"s 0„ ÃAž’ã!^’y0ÕJX†l(åÙf3ˆ ¨A¬' !F*’ŒEªã51Üå49Eê!ŸØq”ÐÄÃ¥àfÉ!@§tˆ D‘‰"Ä2 Ð „R)Œ¡—sˆ†+TÐ5Ъg‚†¸C`¥2" ¡[2i)Ä-1Ä1€L24eaÄE¥(-Sa„͸ܚÖris6Ïu².>ט¦#ç“­^e¸äD\ï&½’¤)7~ðe2«jßé|‚ºn“!’ô¯JÖj],|ÄâURU—S~‰3LÖº¢Q5“eG•Õç¢Zwj&ŸÙªú»fA4ÔïêbL¹k[e ªæX‰SkEgõ§­è½½=E»ÕÉMbw¹x‹¦6ÜLˆy™‚3d¥šè‡eº2JØçâÙj|"S$)?МR!žïµÃI‹ž¾ÍGŠ”9ÞV¢¤û¥Öw\ku*tÇE1s3­¬»›µ²¦äñ^•-,ÎG•ú…ná~’Ì‚~Ôè1.#j&?T¾’Ù>CÎÊVr½SÛ ÔÇÚ“7ìÌU!:YZ¸fªu%Äþ¯Ž,2þÒ£›„FE ‚‚`¨òˆK²L&‚2Ú⋇®Ü-ˆ!™NRÂè#O”–£T¡Ñ C<߈0ŒUœÒ²Fcç¤ìk)¼¼^8Æ8†(†™E¢ ŠB¡Œl!˜ˆªß‹˜YEbå!(&-„8S) Û::£ìYD;6„ îQ}èzبqÙ•„cHóŒÜðâñÈÈF8#"Žò ŽA­{ÛF2‘#ªp•”…Þ‚r6ÝŠp«À1ÕŠ<̇…nø‚•398ØãDehzBЦ0ĆΠ­ÆÂ.ë9çƒv°ZèQDtÀ`h-^ëB -Fw(ŠpÑ‚8À‘F¶A â¡@Pf¡ÙQïsO†›¤bl¤êmaAIÄÈN71O„¦°Æ½E8ˆ YÔ½L4È-LSX `¶‚¡¥+:°Â2"^sb1à`~f3ª ÊhR¨fâNˆÌäl¢ ´£,ƒ(؈-3XÈ SÅã%»(UK;ÄQ«bŽ¥ž`K„$ȃf¡±o›V%2ˆmp†dÈ¥êH]‰7%ç& ¦U)ðˆb G£Œç àÃÙÔ{Ñ A&åÔˆÁŽ N§Cˆ$7BÏSl¦¨ú]¥R›É\Æ"X^šÿDÊìé¸ýÖ;„;l–¿¾ƒ%Â`’,§8qŒj[zÕ“)k°¡Ê¤iÄÖúi-dã\ª¨ ï„ ·Ú›g>¢eD”¶a˜B\ÝUFdŒîQbtåBýßB{æu8ÓÅhEµÒ8¦¢³‹óS ‰AÉ á„!kUûG‘(Ž++¿\ãJ„ÖA¤1ç'ûF$„"Œ´CöÝV¶"_)‹=ê0…3A+y°¢ n«Ù…(ªY7a3d3](wº½F™š\“Y~«éDÔgie%R›|©§±Üt% Bqk¼5ÎX„Юåj.ûxˆ-‹z~˜§×/ÀšÂ9¦€­ÒCý­&˜Å8Ǥ ,ñ7ÆoTn[á¤GÌB•îUtìæ½®îg•fT<ÕéÒ‘FLMçÝÑJÈèïlôúc<›²ˆ!Ç1Eá·æóý?dS™UÙp·¦V›œ! WAWÜ™&|ô;Ð¥^Bf#Lü¡,­+¾¢R Ñ;g]’Ï ß—&–˜ñ(¡‚†«ß÷6RJEƒæǘB)ñ¿¯S½ÕeÕ\ª‘WT©¯æl!¬‚Uï‘DtZÁ¬ƒŠãkӋ²5«B ^á]tQt—K®M›VšŒ¬"aW|÷R"±r¶¡bˆDb)­î@ž½ÅB¸§Te!-®½Ç’ÿæ ˜µ 4öƒ(ÎÐȚѫi$†ÁF b˜C¦Ii­¸ì*°Âc«‡´«¨ò:±VŠ«‰ß„J©Njå´›¬@ŽADù{Ý*bHÜ2Úâm; «Ì³DjStn´Þ³ aÅ90ÛZ`j©•B9M.¾šƒRBFmA!³TBØ„3Ù’`ž~EVŠ÷r*ÑWÉ%D>«'uƒ|$@ÇèULr}£ÖÏæPªš)Èþ‡Ç¤E3Ô©ï}Òs`ËŠ¨U_™9+É”o–r+ "™ âiCxßQB;ÝÆ¨i¼o¢™›wÓh(Ž!E:|ùË$ߢ™”*^½VK„¯ ËJ!Ëc¹ršG»gwWÔS)›WŠd£¨Æ‹+̨2§‘;ˆÖ+á5¡}Tb_KÁ2`8SŠV¶Á> ž × "–!_ë?Äåz&Øú?TÍTpªâáiÜC*ÕÉ"þDû ’†ÛtÚ8¨ÊVÕ©Ñ…Äl^gãÙ®pdbngý­£m4b…±6›&˜™!ÌvèAzÙO{{mZèVW&²©›”Ë+¹õ쇺ny¢˜CŸ)†šÆ‘·) ŸŽ‚IJ¨’³äŸáðÄüFF°"ÔK4„ý!’ˆþ†Ô&ð‘‹Dv¢\Ýè3‰ºœåu‘nŽ)l‚KOÚÄÁ oymé­ÛIKìLS»¸íÜy^)֨ý²§ý§)!ìÛíJá˺.Ùeð¨A†Ôj‘ÈÍÍ/ëHšá §AeTJ¨˜›ó˜r $ÀáÎBJ9Ñ~õÉ|Kó¼d”ŽzІ­ìUw â§{oV|½I;© •*s&½,g)„Æi -ˆk7ÒÖ´ÉVDkyÐÏLB‹Ï’Žâ €a†XùCäýµûqŒFAžô¯ÖÑÅÄ„r(^?‚úYnZ»¡¼º2¡ts ¼I“œ•jŒñˆ)³±§\J&y)º.m€ÉC(SÖÓ|òsŠ_aÜ”)U¤¡Pîfv/.å*orñ–7H©Eö¢ætAT‡;Æ$Šù7–Oóm©AÒ©ˆU…Ò{‰wk§è2èa"–´ ­µáìõ›&ªðÿ8÷QT<{Ä‘ï›1U¹jëUrË9 wRå½XŒ¢0ÎJ½,˜³Zš”ÅÔêÞ©m Š¢Wh£ïDZ­¥±eFK¢$ÚHÊÒ4c•w÷«_!hUeK9[_‘¨IHs»îʈÏJ³õ1o<™9‚²ÙѵŸ-4T÷릾tÇ(PRŒ4ÒÌÙ µhƒJ!Ê\ ”¤½écF"+Ĥ¼û}%jÐÞ¬Äl£ÊȤ~£ØBÈ-Š$ìPGM½S~pÃ\£Ø&Ü|zä¾0)C¦š”¥ópꢇ¹•IU2 ¤³ä¯éôMvµ‹Ž- r‘7{qxR9<éµ$…/Ÿ2MßÎ Â&]wF¨¡7³ˆ·™‘¹,¨áj©•üüoŒu™lF“¿D­E°£¸J¬û Ï“šBk‘–BE&2ÝUŒÜ¨â6ԑʤ'뎇_þÎíJ¨¹L@óc8ë)B¶ïgµôjDµåVFÒ×NjcѶˢ4B]¶›E RÙ÷ô.éòK¦e£ù(­u« w—nN)+ˆà‘¨2×uN§ÝõTµÍùú ëK0#—˜^Qº&õDv‘ËEá0î·\9¨¥:U›õÝZŠB­ÞÍÄÅgçü? ÙøvD­\Rö® n=¼‰;y5Ÿjų1¦gm0˜Õ­E”è>ý-•@Í!%j“$"£¦$-1J§)Wê[?aæ8Ò‘=*´P¤¯’RÄÖ¦%è=Ó¨5H•B•0OU¡dÊÉ”ÇWk/š¬=”²5.ò¯ÐÍ^SËFSTz* õSWEëÆ¬³3Ôt»–a0Òi1\«T±þ͆^tÚ”«…[£*ÒLiRXB ŸËŸi9PgN:Rôc\’Ð_[ó…Õ[¢9ʲí7-AK:8WÐÇÒIYÑ-…#”ÚKStv2TR·^EÍÑvÔ Uú{lØd‚~Ej´‹)h”_+Ñn™ƒ ÌèF (J—^¼&>Ñ«S݉)î‹HÔÓ¢Šk¾®›.+•ŠˆÅv^Ô&²À/]ÿøÉ¨1LÓþæýBü"û¸ü ýU´#/®ÿÌjÐì|¨g7÷°¨Ò®6óSÅ£io'ˆTça[Њ• §¾‘OÒ!U"Šb'“áIlDÅNÛLžÊ¬¨ºèä®.D¶~ÖÈB6àDK»¨ºb'zì¼GR+$ ¨bþüŠÍ¿©´¯aü7ÂI803O… w,C™­Ý6ž·¾'¢ ŠF2 µY&·Ùޒ쫬T0¸Ù‡aÝÂ1Õf)ì#Ô&gKOÜŸ) ‘*Ù³‰sn!¸Ê»È0ÁHŠÚF¶ #S뵇ûb1Üé{•¿Ñ/'ù„ãŒýºG´¾pd`²z;ªDC¶Ü¾ˆ¬QK£ˆ–‰(îÂK*èNòÒ´à”çÑŽenÔ{F’ÍAdü!IT@Î’:EqQ][W;äÓ)]ÈcP-’3»¬š&шb µé¦ÿ¦y^¤Ô+#™ÑZ´’ý3Êœ«TŽ‚ ãŒÄnÖÉÒ×)^~.¥Et«{HF#֥ГP¶jíu³hó¡ÖäôM!ŒA”‰9hïÈ2“jRŠz$ž~/ I$µ® EK\fÒ‘Ö¸†ßî> ›FaåÑ„#˜M$‰Ùö"êQ|þŽe Ê¡I•´ç:¾eV»\Úøµl°Gb^#NüÛU&m¨K¾ãAÈ8îüñSú‚õõû$äì!'X²*ZŠdtÜ(‚`•2 i 1kø¥±ÌB˜åDR"·Üv`Œs^”8¢ÏQ^±m¬>Kôʇ8ÆãSañ„ù~¦Æ—õð¦œdº1E) ï˜ûÅ£é_”Ô/$„‘tÊÇë!GDK"ÛŦIÊfÅk³yb ¬¾ÛKOj̵°ÔE:†Ž#Y±Oº/—³ó™™t"®:XÏ‹J .ö¨˜»«% C2³ò±Òg# ì—"2é\qJ¤êR›r…î¶àôïjI2å.W[ø}×Çô“É«Q_{¤!•˜VC‰ê¥\ôTÂêÖ…!št±“ •PEj¯Uü›øjçkkQqrV‘:Ž.òú“(i]®q 9Ê5„g ™{ ÝÙK1(VN§ÎEùqNMΜ•j>Ïe^¦£ñtFðÈ+ ì²&*±‡zD(‡m&Nå~üËq´KWþ± ©KzÉ#väû»WšMO+ØìÌäŠ"œ†= û©Õc³ZßQΞÊû¢¥ÌÔ%G©;“÷wWØ"Q{·©=ú`ŠN B(ƒÊ)+ML¦6.йˆˆœf›/;¯™ë§Ä½—<|›¶G'%Ñ,îeŽªªv|ª ã8‘(Pî]ß7V𯿽D‚Ú§$¸„FÙËÄ㯓¾[f"tŽJ?"ÊÁVζ.j©š¥—>e¡RçFâ&-È35)i‰µ­¾º¾"óx®_\Ü‘ð¾*PE –3½úq Ãgµ¶¿"q Wr»Ä?Êq$WRz¶?bÙ³5^I v¹QQ§)¬§K†I•YîÃÔ’U¯I"g~ ŽRÌÉÖ‘Q ˆ6I.“5mÊV;yLÁ•X‰˜Fï[˜—êܧ•C)M©f!Ô+&›+ü¤y&×v!e1+m*ÔxóKˆ,ßâCœW!)j27ò0Z&b"éíulfªÚ‚ÕuoJÓ;tjù'´èW‘˜b8¦±’cîE®enC­u0£æê&áëjÃ…0÷¤A3QSȽùõ¯Ø’¥]Ýo¾¡ŒÜ¤uK‰{–¦Þ¢Èö"3ê´È@‹rÍ¥\ö.FÏ×ßóy“'íó{tÎc,㘅)œ›W‘¯”ÍO̱K¥ã*fÕ¼]'Ú¬ÂïE®›Þ†Â)õèÆR3¶ÆOŽ"C!b]Ø!}m²^˜ibù¿:€â%H§7z\ÆëK–¾¾ö)\ÄÀ…Á.ÐŽÅÚ*«é2Úg#¶yÄ»e;‘—Ó/Bb5æöõgdºÆ9_T°ñaäá`¥(Çr7—ùÛ«õyò‚326‘}uónn¥»µï»ÛPWC{ 3;ˆC©*“¶Êè1!—òÅûg[xÔ®Ô i:aÂSµˆK²Z–Ö¡ä]mLEE!;T^Rˆ…\¨•Nåå"3} Z¯ÕÈV†>êˆq»÷Ú¹.£*9È¿RW>ü‹OÎI̶)ÌaŸw–Ƕë3KîåZyÔäõ‘ð’w¡ßij "ï—5rµTºNœÎƒFg™ì#úçrA§§²[ L '×vSˆUœ§»Ñ«.6õÝÄS‘ÇB£1í½¨éÔ©jšâ¥Y¹.ùT”²7ÜLçîn%;rëeZ˜ƒâbu‰ 4ç)ÃcJä:Šægº©…úT´>Ôõ„ôD¡[(”!·×O7¿SëÓKô¯Åˆ#LC‘ˆ¿*HÎcˆ"§iJŠ—¨OKW°„¿eê‡91µÙñÊä “}Ô¨·%ËEy§ —åpÅÂo«p„÷mßNeÃ:Š;õ¤ ÿOæ°•-X†_ää.röÇ¢ð–AÅ8Ä!’uäÛ¶ÓyèÞ”'¡.b]¿I©zï'®á·°Õ(ÞøÄân™Å"ЪårDt¸‹Ì#¸Åç/ýY:¾n—mJÉéAB6­%Ex¨Âb6\-ñ/âû "¢E"Ùef¹|\L!MŽ’2*cù4ê®Íµn.¥ÔW¡•Rìy‹Lß…–} GðòPÎÉiFº„ÌN]ò“1šW(Ô~;û”‹Ô7v6ž\š%Jîõ¨w ¢BÌgMd2Ñ$aDb0šØé_a¨C໘Ü#gnò3Õ›Ÿè´'“T¢/%”R]‹èvNª\ù c„.¢F€¹ÃFu(Œa­†ƒ›Ê39 @æ(Ñ\¨¸?9³3ˆä C L(ÊA*wTÂhÕ8k³™sö®"ªG®+áLŠtêŠéÃpÌeƒt  â AÀaWRR`¿Š…På˜À2å*£° ûÎù9©@œ €ŽcAvä)q#1A(ö@ÛJ[q*ˆ fLV:8!ÈIÚ€ÔOwÁES„j§¨"àÕŒ‰rȸ톈r!UbÊ8Î%=;)6«][ì0Êç¦ý4É„! n$œòp‚ÈfÛ]('“ ‰v<ÉbwS$\jˆdc P¤|‹¸ERþȘ­zY¿)½•,…2K—£™™ºç!Þ¤%Êf³J¦*JvòáXÉSÙs’]áýŠÉoÝÚ¦£IO©SµØfb÷ëYí´Ô”fªä£RZí…+Ô#ïûeÖcâ™|R¦òº[ß9:ä†âî¤A º¥_ÕšQHv1D fø¬ ƒ0À)¹‘ú‚‡7†ŒŽs•züxL3„”¡96R9 %a –1+!ƒaƒÊV$5bb¢õNܶ©Ô¯ÂYGààcÑ™˜§UTá €ÄÝUBjgj„Þˆà „@Ï©¡‚½$EÅ 1C©\NÛ…/KaÕ„èŒÕ„¨œÅÀ1LY #·SœÇN o( îáµ±ËÁs‘L‰l¸”@F1Ø×˜ò!Æm…ßÎ䣮TÉ þüüßIà#ûTd Ì{ë©1ñÒIÄzŠÆÆ Ü²ÕeÙ3Z‚ÌyiÞ;©=Kø°qcQ‰BzQ…! fû¥)NwII¹ÁGÇϨñT„ªËdI„œpEaÖBÆÄ .AÚ[ '1])b:£(cÑþ…|®¨È††ÇÌ´…4VºŒ„XeB^øôD0BŒ‡$fÊæÕÈ~FÁÕgr £±ÖŠøât9\z•€„ #“È1†£ f`ÁˆIÈèí„nB©JïwŒ¥¨‡|0¨¥åäD#0!Ä"t>Î €0lMU „c~5e /½×âÉB#§8ñPWÅL"TJ³Ê–ú4`ȵTuF0“„>–*Ö@ÆÈ6 îËÁ ƒX1ï!ØqC¶¤9xéù•CÁkPZ30 1ˆ›Ì„VÅUW`¨mC”qqÆ)Å(¢xXw„PÁ'#vm S]†e}w¸º"HE³ÊnÊaÝ9µŒ¨}¯××Rº#2sEòá®\ôÛ«)”§ß¦9‘Š×v¡¯í‡:¸Tõö˜´&z™iS¯ÈZF¶f;f‹V§µ:›‰ó'»q c#c%B)XÎw*ù!‰A;±ÝÕBmë= ¬S¿‹_¥wÛÄaa(E)7•„Äc1”¨íÓ_›‘ÕV1Qp“ὈDÖî?÷|•r+•w„¦‘JÏ ”}ÏEB§wÝÄf-1‘¼˜¶IŠe9çT©$ƱÈåL£½-'KôÊD •—d¶gCˆl6Jç+.¨FÐr áK¾#DÐ^p”ˆ¨Wù¯.j¯ŒJËO¦‘ö¼ÄÓ9È܉‚²T¶B”U9Ñæ•8S/Ù¬ƒ]Î2aª_÷ÖJ‡Úò×¶‰óºžDÀJ\B-WX‹½^+œˆˆå>zmŽ3U‚+½ˆ¬2-O*bþå+¥+¯屋‚RY,´Ï¯³Ù.)L^Ìc©HC!›ÐŒä^gC¹¨ø¹ïd©j3½ï®.ëLv*ýª¸äÛö(•A&•Ïbr‘E+yjv’ë:Ùñ ÝOù ÄÚ“~Õ;]÷j¶wÐT”¥ÍáEì7­ÆF£¶êi9¬Bu!;pÁÎk!(Ky82 ‹ÿ׉-©%脯Gú©Ñ‰o9Ê鼦ä#œŒ ëAÚ‚­÷LB«Wö¶‹gB O½}ò”­ZêMïò3µj*•ݰ„+R.úeŒë‡\:§?–Y5›Rœ‚—\kbã äò š=6‘ãÿøÉˆ2½N†ªžtH6Hy³’…ПosˆÎzà †\!Lx‰R XpYˆˆr9 ”Ü"a>dÁý°¡‚±,s£ rÁDŽB,ÑSÅøŸÑHBš»+‰þj7 s1"€Ø™Vƒ|,AÜŠQ*:±Ã›#{ý"¬"Œñаu6r @†413,$4múw4Zs›8S40ƒaA–'lË ’áBq8Š"q‚¨<Î(&V|) Ã8‡Â$è09rÁöì‚£®*L"ó„Õ‡ÐÑåCˆ¦@¡ aID ƒq4„âdD% Rš©oèä‡îgÇJÕ++HqåyQ‚A/r\ŒÍUظŤõù¶Kñ¹„ù Ê1e별B“Õ"D§Ž:8†8Ȁ†Q ÜÈœÓÂÖíÊE—ƒ /ÔÚ|眡ÜÝ/Z\7¬óM%Y=êäX„Rc 0$›b Ò!K‹´·=*ù-¦¦¹ÒýÚÄ–¨–i œt8Q#Í„3+VæÖ‘XNEº2ÖeãÝûÇä¢ò%V«ASU*J#Y(TÒ{=DÒdÓ~XÿŸBæeévh0œÒJɆ]öËETA‹‹¦ ºIto/;"[Æ©ÐÍ¥'.S± ¹CYl„*XÌaZE:s:;'™#—6˜Á~ÂkW…àú‹Žn=0È"üä<ÍV¬åQDmøŽ-|µ±ÒÆSx“2×TJ´Û,õ.gªØ¥¹ #Ä"ˆR>©§&súåy‡Í64ÍØˆbyËÿrdÄ®µ!DJÎc\B²qøº£ùyß$s3ÿ¤³Ä½ÐF=œ›˜ˆb;N!R¡€P§ûl¯”ç4Oþ­DÜŸíÚð%¥Ú‰Or8ŠU¡P§)D¡HNò&ccš•UVi ÄÏnu ™Bú\ž]2uÄ¢¬rL³AuˆÞ_Ö´MýÓq5Þ¿‘*‘) n=èå(@³EЂ­ŽO›¿I•- ­­¹Ø¸æ”“½8».)ÚÌÞRUf)–Êr0Ëc±Û†u²éÆ×—òÜõ¥†¶Ý¶òKš…m»i?RU¾;;Ûßíµ1Ü®×f^z2©ýô·®*¬ÖB¾wÊü#ï™¶lTQ²batïÔÒPùš·Iuy"Öü1Ìh„vò¨†½™(½VÝÊÖ·‘ ƒB¡‹—˜zH²TÁ…ÚrpŸÙ3Qš;2]BŒp@æE›G”l _ô›„Ò—úÔÞòµ‹,nÓŸ*Ä|ÃH‚©Œ£IÄëuc ¤Ôvmn žµÊ –îDÛVd"½e;ˆ6Q_9Á…!ж7óÿVžmBMÂwK#J…3Yù‘äã$ä…c¹,sIã1¾©·Îú«i:´ ŸC2–…Õlé,‚è¨Wç‘ ¾@¯Ú!׌sˆu1˜GuÀ‡%_É{!\kø’%kÜibà† "{³ƒ(ÌQU’¥}Ý1rB«¢9 fÆœCWü}©ð–6–[²ýŸh‘Ìí9âLçð“1;—ú.¯!æR•£ˆn.š6˜R›»¿Õb:Ì")«ã?žrM[k×N#ªöU°žCO>E!é(ŒÓU91XDŒÔ€î2BŒT‰?ŠíY‰jîð—nÂe,e¨µèHjÌÄùXùlÆ”FS(“ÐS ±]Ú„2•ÖD%jr¿¼—&aÄÔA›Ê>/X³0¨—§±Ö¥e0¾<ÞªO m­˜Z¤lv¥Z¦z Ä8©¿Ã§û³h' ‚t«äÙQÿ¥D·¸nog¼Êý[&ø­/*q,\SV#gR–›»&.ÔmÛZè"…á%½2Ò7áþ‹v¹B.ðŽH¼C›¬“³-“=†vÍY,üªÉ&o‰™ÆWRØRJOt1®ê´»•Û–SùºOK ªã, ÆáþCKL÷Sçøìa„wY,¾á°ÿÆ×ø§OegzŒ<éQ¡w'{çâýl[Y’ήFŒEaB aËÃ$ºÓ,Þ\_ésh2a‡¾F‹§Çÿú@  ´ö£yZ}L´Q¹+æ„êÃ9TêfœO5HaÄC–Ÿl³ØÅfToC°ªPÌo{ ¦'o`ÿÂq»•ù1qÅË”C?OuyI ÂŽWr$Â\‹qâ‘a\Ûóê5Jz”„p›ÙØóÛúFêu6ÅnùY0Q•’¥•Òœ²#•ƒ¢§9^‚ÛhŒB¥*SlL›SHºÊ•¹õßÒžZ”J=a†­7ºaB6Ó9,/7YŠ®÷!‚ÆEtá‡+{ÞÚº¬Loì6 ²fWךG³ZËÔzݨ`‰ÍÂèÎA „-¬ªäºæ4ÚiW¥9d>:žäI)k#MQ9B¡à O nÑÌ›cˆqPÓôÄ9Îé…“1<Ìki‡ýÄç÷ßS¹u¿Ž"b‰š™ùÙ¦r¡¾‹™–Ac&1¿S¦À ¸gaµÂ#“sœ‹¹N“:°?…‚ c‹±CÚNC0„„ƒf3ŒàD4ã…Š$;°oéS *Ò:Ž¨ÄŽtf¤HdFé„„AŒbˆ!ɱEˆFE\Ä-9Íb xQg)3 rdê0|- “çKD&óÌ m÷ ¿[ƒ23ftäªq… ÂD‡.ZÂÎ.Cº‹ÝHnfRÑ¡š:ÀÌdÂb˜!ÆÁ8½Äo0xƒ]˜ŠØ Syì;}ˆÅ´P# "¥Ç¸ÀˆjØ„Ssbpü©L$Âq›œâŽ<µB.íþ:±0×=@µz!2³©)C6ÇÂ.äP,LfCN…  Þå\j±¡ zŽ!Š,)šZPC”x 42;DÒBƒA°CN©VTÉeqrbÃnáNR™ùyÁ0eeÁ8”¨A+ƒÁ H£` F_˜/®f6ÁŽ/,•ãlÇÞ/Ð3 k§Æ£ \¬ìa-!csV„×;§h3±œ0½È#¤SS¢Ž-Š~á)”ŠìæùÆã(] "¨S@aŽ• b3ƒ ÀÁ/äÝÌ{!/Ç2²åR:¢¸8ªO”…a g9á ìܳ`†“pAeô¯NÄÈh_Ð ùEÇÀ²j¥'ŒÂ DxeŽ\aż¬&Ȩ!*Þ9?ð€‚ mÔ$H#ŒÊ!EÏRB!ÉYÁèøb¢€I”¦ÚBFë1™kû)FPŒaÂ;=/™ÚL½Î¤b‹«™÷©úçã ù%KËëþsMK0¦G 'NÁ±øæwþ(KgQÝIŠßÏ×ç]çrÐ&õ$i:ˆ#÷;§¥¯’°¤Êy¤W¥|ƒˆcm5 „¼—QB5$*›Úe¸¸Ü{uE}D¶õ¢^ŸGP„â’Fê"S.ÕGx»…k¹F@†".ßÿï¿V˜W)[÷%¥)ÛÞΞšsU¥{AÄ&£~^ŠF,¢u{Þô¶ê}R#–¢b"ñþ²1¢ò}Iû_C• ‹*©=§ºuSjô¹û ÚÅ"™û«ÇaÎe¡‘Õê›ç*2áš—jÜ•UÏ|êVûœìj½X„kíyÛRŠ9Ž¢ö‡D©†))†ÙI²p*°@IH¨gu*5`½XF«• ñ(`€ƒfIÌAÌÎ1›0Ã…(QCûΛûNƒ‚ÛB0 fQª^ @À`„ƒŠræ#iÈúú¨˜¨ê%Ô“¨7ÈCØäJÈò³0ð§cº8”ƒr5Í–úaa†’&äd a4D(¥þ´2<õYGލ:cHgl†PÞL ™†70ü/˜nÚÒŽSò‰>ƒZP?妠’Â;em{â €L„.áV#ˆåJ¤ö2 ,¢ì\–@c3 ÊÆßŽ i¤Ÿe#ÑÎ+8i©»&…§%ðùŒÁ‚F„þVÁf a‚ŒÅ+T(ŒöÓƒ¾,6{T ÓˆìK‹ DN›0ÀŽf$:;#1ÈäR½s÷Ï·"hW:…‚  ˜Ç")ÂpÁ„0 %RÁyþ®¸Ã‘)©IÎì*šófF ˆ3ÄâXŽ9;ÈšqNåµEìɱJ/T)†ÌÆjl1ZŒâDaš³bîU㊂¥D®è¬ÁQ­Z› €CC!"²XAL¦)Iè-Ôt÷«'©J ¢8Ø" Ct†âC.!8ÌeÖ YV3 V£©'I¥¦œ.ïå£P"d t(CyºÐë6Rg…ª°_IØ”hgÔ.7# 2 !85>¢µ¸ ¨Éiy];ñüx/&9³Ž\e!‘Mâ%˜@`1 ÷!Ì„¥9zŸ’Ü„º‘Ýø·ÂÝ”U'd;:Ö´L±žr¡’9¨¦•rÔ¶Wý%Ee#ær“]Q_Ðtb¿„R²»•êo¹(õñù[èQß3DÉkéί(‚%jìFØÆÌuÅÿc&ˆ"^ìö/»Öh–«ú§W}þŠÞ^bÏC>UŠe§B±¨V[Ò³—¯{JáwUv&8ÕˆtV78TÄ8 ‚!ÇÏzë/­ •'‰-±SÕîNºûöF¶ˆ ™[Фȕj³™Ê|ã‘-¥¥û7QÝÄCKo;K~XèŠÅZ‰üü\1DZˆÆ!µ4mkƒ]¨•§ê•k-Ÿ leG£ºb1ÊC-ÂõÜØ uƒaé_Â×ô̶U²F¢ÿÛ‚%æoBiØÊ%´TÒE)Ç;œâ|ÄšŽ×@`Ç|öw¡¹ñW…ò'"æR†0ÒKôm¯ÙÉ‚Œ¶Fš”Å.fc¨”*˜KQ×ëÔ‰ib“½Ý”ƒ B#a©#ÜB,æBËä%Ã)âOµQ)¹ ªFÎj“Š%95Y09ц(E4Ï:CK¾R©sçä% îUjM‹à„.`A´¹ @®ûÒÍPâ)RZîp„!øöo¬Lq 'è©-1ÿE×Z° È+Öµ§—©‘Šø¨eúVõUþe/Ö¥©xc‘™ÓNæ Æ›“Д p"yñŸäúΤV¡…Ä%DÑjÖ;Led´FÐkÐ…d›Ž+8FÙ«Jv ò]xq)RòÔ×™•þC™YUjòÝ& 8ʸ…óR‘(‚˜Ã`¤Ò÷Ô—°ÆϺ°k`ÿøÉˆ3ºNÎý9ù õñãðï­ðw³’È ‡~ó¸×ú`†d“úbTRŒ1Zøƒ®ˆJ3Ò²®ûE.· ÝEt³é/QnùBu]§yÂ(Î-RÌtÓe!…©æ ø<Ô09æÉ,µ«.ÔÂ"Êcv³œs´›(*d³>éõ³ a½,š¥/æ¦~îºañÔÒ'Uœ½+ò­ŽÁ˜A…­!ŠŒj3îÓOýÄãYÍq-òɬu!¾¼I/ŽqÒ¤Ò%(s1ü‹š¶:V4"CÙLˆ«äÎzÊizÅâqþGñ\RµÜšnŽÜ¾í{­ 4J–Šq ï Qd‡«¿HU÷ÝÍb rYÐ>‡|nd«\Å#’®¤Z&ûÞ»®Ðô- 5 ‹Ó¥YèT#´ÄÄn0öý•˜ÚõÉh­0ŸKÒ4™(±åÌH£2p¥tËÈÌ#yT´Ë™Vé„u"Ó†Æ:b}*l×a8Db Wþ‰_!ÄoÒ½M}¤ÿ_9²Î&FÁP#Äz(6–¡HáØXZqã¡éji¼I‰1—Ú† šõ®áâMn5^ƒž‰Ž%E)¤ +Žvþ†9›ecfËÆ©)Æ÷]þjÒ\½¥7%ºâÓ:F[°0Æ>MS ‹G$ÔW0¯AW̳‡LÝ %Ÿ¢–¤ö/fSÿÊÕLž¤³ cÙmBá+%6ÅC’‡E'ÒüCTR”²ôÚ¶) r¢ D-he­÷Åå°èR;qæØIˆæ§OrW¶òÒ¦'y²T”¡LÇT×°tþÊíœ5w„‘ƒ|¿Y£äÄ 4¸âè—@ˆp©T.m„cÛ ©Â¬ªÕk½úÉügL“ÜÙQëCÝPÈ8¤|#‚7Ýt¦TÛ8¶¦Ì#xôsßdã'”|Õ.0… `¢É²~<Îÿ|^oQЉ[’ÂËkýYZÝúKë1Õ®jõ©)$æ p¿0æ+J¼ÿ³î«Ù *èô%ú.ân¢Å¿¦ES p@ƒ(I uÄÞ*êûïµEY^q¬îZ£¡UHN>M÷4íT?ã¤fº ¯Ev:çÃ^JÖŽ3e ;3 Æ4†EbøÔú+”ÂåU® §<ôî.Ã1°æÆ ·§À•äJqýÂTOÅDfïrc˜ã cœAÌ}1nŸîüö§Q=«*ßôžY°1)¤ß5 ƒ9È©u-D)SHb%üt;@©™M{Ï¡q95ïøÎBãP­JkN¤U|¡Ì-D@Ä[’JvŸçQŒëµÇ—Œ\e*x\!dWÇF›ªc¤T5PÛf_wWëe‹6àü»¢õ2¼éµ«²M‚ë£9AÃ'5 GKZL} J‘oe¢Ååy3û_l‹îùƒW aåи´RÙmåÉQÙžb2¾Õ—XÒ»Ü܈m¿EãY7b.Mœ³"Ô“<\±iºa¬ºz.ˆ¤!¹µÄÙ;2ˆ(ŒkÐÅq³iºv"*ØJ®Îo-Køoba>ÊúYlÕ£RBf§„È•%bc2©9cs`¼‹“Júãm`Òj…íCɼ#J¬0„ŒÊgÒ‹*0 ö9‘Ñb9u¥¬Ð†MúJõÙfEªóÐ[šÅ¨fQ²¤;ˆ;­iLËgmˆ¶Y=e¿u\éL ™øAäS„8õ&ÁÈÍåg<žüŠˆÉQ8œùIi·­Qt¸ÆÞi‹³Wí ¯e8‰Øã a gÀŽZa ”ç= n-ö•®£`j.y|ê0ƒŽzñE?©“W—8†z¯„&Ð[‘,èUÔLÚ;# re]N‰í†kõ1öžÜ'ýŽèCzVRó±Y-Fîê…aç Š©²QÌFÌâÙ4¼œÄ¢QäÓÓ˜ƒÈMµ({£¦ý*nY\£œTS°Œ×Byº*Ð’U5±„˜m6£HÔ—„—¡×/-Ö×ú”fYšU:kmü†Ô”:Ýéõëë`ž«Bû‘s¼J³L¸(uf æ1g mQüµÙÛ)YœbV‚ÜÑ8جÍzA¬Rî„¶&xC%$plÜ[PíSRWÞ )bVd¹-¿­º¸Úœ«÷$!Š+F+°àfärW¹0¤±¯íŸG—M'8œ<‰§z£4ƒ)w¥1×ÊÕ'Zͼ–tDÂ~–ÃJž9±Ÿ{„BI÷$Ê+¥‰DL!O"y¥ôµÎ•S¶[?xŒ!Q\2£FIE#ÓQzÂ’j½·ÄÁiK¡h?ùsÕ5×lÌ+tƒj4Ü@‚.:S{(„Ê3f§ü„º—çËãrÛÿ¬Œ$ŽžV 1tÞ=¥J»æ|*ñiFî¦C"QQzŒeQïÛz,¨9q=?•˜‹SH\z}iš#;ezWNNÖªS‰íèE ©W9fRrTÅ¢uËZ‘·~È蜴¥6˼IJÝ/­Š\þY*¤Ûr)¾ºžw(E9 ‰v²©ÚRo·šMЙmïab/uìAg)NnäWß[Ö#išUîEÑõ1d•ojúÕ³·ÔÇU9ˆ7­C-•F%?õ‰•fµR®îÖ=zµS˶fEˆÎÈ·"ÈE˜’2;reª[¼?fo¯ æ««¹Zy|þê2¼Êa‰#˜E0Ê2JªºÔ¢Ñ‰Œ² Còœ¶Ùzu8N}ÆGO*ˆpæ"¨!(¦dú0³<6¿ÊÇŠÓ/RTˆf*21(,ó¥ØÍf\ÚYWZ‹\¾6]4ž]'ד¬Cl“UîsE#Äkˆ˜sz¹Ì–&" F:ѼÃù¨Ÿï¢÷r­I—ª˜Þ-5I3§'ªÚTy9ÂŽ§“êQiQ_h]Ϊár¢í;o6~&*e=í0êÉ˨LuQŸÝP·,ÃQÓ×t£¨ûÔ2vzuÂØÜRÌYÒT¢•–‰Ì+ Ø’cH[1z¿­ÛªÝ¿M´çÊ Î¿(9èºq!”;¥ŠfÒQHômþÒmSÊL¤½RNß¿—§K®I[&”‡f•îd"¥B)nWM/#f ¤ëeÝN®Ýð\}SÙHÒ4ª(äza BhŽºn§z@8À  hÔ2±¶ÚRh„0x<BsðC=JâÝz=k\ºÎ)’ÙŠ–ÚžçÝʧxâYü®Õ<È}ÎZ¡ý”â¬N[[=HÞ0A^Ý>sXÅ|&5¬a,¢Š¼!˜–®H¥5‰ŠùBCíhˆõú sPžµ(„'Ð…MôwJâÿ#†$ƒy 2Ìç9’ÊäW¤µ&¥RÂrµ’iÁŽ©A…U6ËÍ6ouíjîi ûLM4¹Ã9z»+ПaÄ2Usœ(REèŽj¢ÙÍ#ášAòI˜®‚ìY.µm´ŒTa$cJgœ}Ö£¹DˆCKÌg½jŠÎ^6÷¼ˆVálALéÂt•ÛˆÞÈY-i J5Ù®Â'QÂË’D8€…-fävpì™?“£ÕòaeÎßo—çÔìÖ-/å•V¯œxu´dìšg,v©kœSœUíbÐúýBêúŒ{’êšÙ)D+1Èå7|׿V›(eàœÈ* ”b¥üùë×ÎÚ/ŸžÊJ·&y¹ôÏÎɽˆÔ0e•ù}S¥Q‰Ô“7NgŠûÇ~¢Ò¤IŠÈÝtg)Vi“«ó76êÊ"È_ŒA©v§ËN±ôZò gªI¥-¥'œ–V3¹[®¤˜»E s>l³ª¥»³­SrZx‘kC*__‰¯¨A\cf;(eù¥0b.ûW©L]'÷P…bZkÚîâ0…¤”Ê…Šø°êb¥xtL¾éå!ý}·+[33fµ]Îg+vxè²¢ 亊ï‰Ö çcx–±E©>n/cKÑ+»B#ê§ñþÎ;­uò‰3H´2Ô†2¥,êLúò¾¢¢ˆ½NRU˜ÆQ·«ÜæÍSc ]±QL7Ê3:ãJWmÂZ>Мj¯BU4èFgÏ©ËT¯f†U^õZ× !¢õkøfM|=ê÷Nªà‹A&Úº×Ø—;«8º‹è¾1F67X‰O;iëN”“*þMF3k¢ cePȦB"Š9=Šfä$æ²×ŸèoR©æú]ŒÖc)>üºFÚª«:¿ÎBïT"eî뢣›‹±;7r„@ô¥‚•u4bÒiUTU•FÄFÌùU•ÖÈ&ä¾´«Žwêbò¥Øf<]Ktud’¨sž#¶i]b¢ظŠåÛ|’nè˜KaʲvÚ²L• ¨tÅW¸„¡©ôIHFZ½G“{™T«Jÿ×;¤ZÔdJÛ4tûLŒ;ªfz–VˆøÕs”½!… ËìZ×-ÉÖ$¢› ÍChŒœ¬´µ™Pá…IzGõéR šùJåLbvãaŽ+ UE6ìGºw#–s1j‘WǧÍö#pUà—¤¼Òý”A6¿þId?³+•ËAW î3yÓÉ"JE|äúI¤ ¢ÙÁ$‹¸šòfW2„r•¸´Vb`Éd«£«°3N®¨²ê!TJ¤—tâ'âðÿÞT) 2ÚëNˆ‘ ¾„ï–­Ê¥8×ê1Úvmý*Sÿ”‡ÚŒ1v–Bȇ Õ1d‹+’ä® ¹m²s$D7Ka^ç¥ÎÔT©•ø‚;žÎC¥s‡11…ãþþù*û(ò÷”•3Š’ue*“+nK‡gݾûI\¢2Œ?mdTWKÑyHâŒHzják{„l¦a…²QÈ~âLL®4É»êDÏrb·Û½3;‘ÌWJŸš†"ëdT}7+!sañZVóUZä«¥Œ|/Éú%Ò«æPškß‹U ‹D~Z±?Ž¢ „Á‘ý LâQ^TK %uT„ÉM–T2›;Ä+>†P®›k%§-ÉÅZœ#‘íûTÖëvåZ˜Dºq\ÔlRPSÕÂ0J^ã6“B±ÇàeÆÃ R›å`ŠæX´ÐKÜR-q+³NÁCFOÑKi ëjÌ!BG6Æ1>¯ÌQ âQÑHtaÇŠ(Š c†ˆÔÊrr\{šj¨Ô•‚ ›0wJ ZEbž`C2r”%UQŒXåfäCáIþ¢ïÜÈ š›Ê;zLj˜ Bà“au¡0Š‘˜PåÌFwµ)ô—L×V©=·Œ¬DY+NÄ7~úD+8¡kléhÎŒ‹BŽ0©š@ì#Ó×qq)R³¡œ­‹M%«ôžY},ßAP)ŽBì“äJ¥=‘QÔb‚­‘í¿ŒÄR"¦é8îþN2û Ïê†9¸J©žÅ#0—jyå] Ÿ‹*箄­d ßzçÙVìqAC•˜ÁˆÑ'Ë«—ìå§M*˜s‹Ú6Tëç“ç–ŠWV>6a5hÁÖe±„T&„ ÕÊcÅæÚ-F#¹›Ði+™YðÖ1¾çÝ¢ CKwêjç’Š…v÷–…Tr|¬Dîv2©ž”*/JQ hžŒcÑNWbç’Ô?®öU)וÙ÷ã}óójò3Bã2Fjrkí¾«Žê&¼ˆe†&W÷u ëÿM‘0¥Ba5sÓŽô"!ˆŸ“#Ó¹Ÿ‰ØR³¹ÛÒeª‰$²|Ÿn2S‰c ‚ êŒ™Ý4ŸÒ†¢éJ*ˆ“­vÔ:Ô”C³ÿÖã*&ˆ„JcH).”ŠI6Ò9]Ü*)©\u±Ñè! rìX½ßJÛÄä#b¹‡9µ¯¼"fl‚äšf1Å;’¸Ù¤UVç¼?Z1È^­ »]T¦]¢X1ÊFÙÈëåò[(¨¸S3¸ïeÓöq)¤]Âc%Uγ»!IÆÿ1Ý‹ø¢³¥èR\¼®Ï®+bm袕›írô¦•fmô‰™åÖZx¼ÝV¢Ñ0µdxØ‚/µÕƒ9Æ-š-ÏR®?ÇÚ¸EÇg{ô†•ªC”ÂZTÂk²V©ô2Qì” …!h1ßP!r£%FÔsЍì.9ÄR Ä@·1÷ôªPG# !³¬ö†!ñLL@QŽÌhƒ)™á¹ˆ¤å׸è@932»<%áá£$65Vpíkœxb…!(áÌÀŒôùílŠnH¬ YMëøø1m‚ÄÍþ ¿‰¸Ø¨‰GÕLÿL©h­ek¿•]¨¹*3¬„~dMÍÜU|-qÑEÎD÷ŬÌîÖfLz¿*ONJRbÜžJ.#_} T¡?µ›”ìª\‘®ÅA\¦¡¿Sìø…EÖ‰IS×±“‹ú\LÑѪJ#±yWä"˜×o9&dÚVc¯û&›0þ‚1‹µöö¿›z‚Þ,m–Ãr”„z“ ³«•Ñ(æ2ÔçV²:â*òQJCþ.«GUB´Ô'¹\b6_N×%]¸2ë̈åþ'á(ÔÝ+/ËBƒ}é%RB'sþ¬ˆ))F91韲É^á¢ab"×Μf«·Ê‡ qI-LJŸ@€É,6QÐ((p!Êiæ…«†–JƾúI Ý ’kÍ9BŒ«WöÕ±ôBét¦z¿Q T3$Q–¢ÒÖ˼òåXb:‚‚Ž8¾ ‚¢ n·Ih“D´’Ä #å+þ³‘Igï­+I4G+šW1"¹)SñK™­'s2Œ‹^JÈ‚ÉìOÊ/V™ý^eÐà@Ž”ˆ ÎyóuA`Ðñ4Q Ø `¤@… VœµQ2Oõ ¢i—ÿûÒ%™¾u_Í6?Ä7f?\©ÔI\EÁU9l¾I¢ïG—j0‰qÔF1l ý%gÛº„aM0‚"¥ ]‰•ã^ÿ(ÌÏÜNå·õ•™b¹ÈóœÆç‡S®¨2à™¥Íùí/@¶ß¤$$¢ 9vÀ `Œ…ÈQ#í`XZ„ ÛQƒ:de3î7¿¤½\¢SQR%$¦éœEb™‹‡™²¸#sç¾X‚"•„S†'çtÀ:PP 4È=£ZrfÈP¶ "ÂðÃ1fn¡™^\’f*·¯:¢“ÿu](…¥Jôཇ+0ø”2/WÔîÊèæ8‚"4Ñ’Ä~þiŠ%YEW5+ÚG@¸6,˜B­.ØQœj ²”Ên çÇjT"û©T»"9Q¬Úê.¯uÓ[?z¨˜ùÎW_m‘Ó:zÔZåJ)N˜Í‚MŽÌ:ªÒc¢ìÞ“Ge©DRšÅ¿«ª"iDv^ÿõ¨õ¿Tæ#aóŽ> ©òe6¿êúŒ›è+Ê*9õšFÏÌXBŽçÑ1sàû#•ÉyÈ!9>éFhŒ®×G«âÕž2pD¡—6„Ãaö„9žéåöêÿãÓHÚ›žZ&g–U³ )¨H¾JX‡,W8ÅE¬ó²È­_ ÛSgiŒ¹+-ÈœkÕ&wbXw¹ëA’)w?¹Þ\WVvíÒ¨¼øº"þ5å9RÉR1S ¦C5[ðBœ»ÆNÓd‹M¤ôßApmuÍŸ˜‚:Ì#§–ìAFFž+DòH“³&&HZ6ž\ìLí¥~͈•Ä+Ä¢QIA»ðFò0ŠÇU¾W7e ¢,­š‹Ûˆ¦*L¤r•¦GæÏ”“§o\¨b”âbõ~ñ §7!x¦ÚVÝ)¦|Énì žÉÄR²ªå<®¾„AŽ!%®wëõ±GEÃñq%–¢RW¢ùÐÂ=‰%ÕZUÁ\aU9½†cÈ÷¥1óbfO©Ä‘8ŒÔ[î×ê?š˜Fce?ðˆ9Š¥#wý)Øžž´b ídÚ·s&ã•È0å!Ý-Þ*«3˜V2~ãÓk²qÔC­$’ÓR‘2k¾v ÁÈÈÒä™:tÅ•—RpÊq”Eç.ðLú¯ÈÕµ’¾-#!ˆw.Epèï_åñÙhŒ;”Š&]p¼ysµ ›/vfHQc½ˆ¬µ‹Ûˆr4ç0"XC×ùaiA&#¸É¸—ì=j‰W5ÏfVB±Æ„]¨žDFe=Äg!¨Rä°ˆªú‚`O½÷™2ìÒ‡Ãuõ¢5ÛjŠãŠ0ëd¥/=k~Ú,CÎO¶ÔÓZònPÛ$ÉF±²ÃbŠ“2œNAæ C *•e‰|–ým|#5ý¤×îBV‹]SeÕX¦q+NÝÂá±s3EOB=/X¼…ÂOmŽå(…?6êG}A ÎÅgä ÇÕo0…U =þ kyˆ+5\Q‘Mô‘óY¨ éRÌaŠ7Z5wÈl$¼«W¥5w~ºžµ’ß•²£]ØUÓ•*E9‘E¡XAƒ •ϸC&ÏþØ•ŸîÊäÜæ=”#ésX¾C b$PÏ1iÈï]„ï‘,œ§« „>YS°úÞ u¯ºŒv~ Ž(£bqÞ¥_wöí‡!_–òüÙ§±HÞ-u\S¼[™pœRM•IÇÆB°²V¸¥W¡&[»ªäV’}·ö;TêJ¡XwnL|QRDeÖ_;ÊÕ¦i:Ykijá9t¡K¼M]¥‹·!DÊ”íaRg*©; fÄÎÁy¤õ+*:˜L¬|’D»„Q&‘*)GdMÓDÏÛ*PèU³Ú&·ÖrLšÛW*àü´b3h‚«Æòœ!˜10º²Ê.ga Œ_²á¥ÊÖ_~¨G>eq Á Å£ ÆV©Œ•¢ˆT(ÞªÂå>í'Ë"VÆ“ÊnëäQ«•tI±.å’pèË'•)r„äWmî2â×ý"’^’î#›‰ç\Þ:ä¢E":f.½èÐŒ©¾ì.ZM©ð»Ÿe­='÷hR‘/Ö;ˆy4â²£Eµ«FVÞ«/{ÞRà˜ZZ‰ê–~<ž&ÌE S³ù.T¦a› úJ%3ÙÉ}žs6Ï|ó"Óüèe£,ĵ$ª!T⇠Å&w!;ûþi‡Õ"1ôýA0¾Z”e£r]¤lò…CºñÌŒø¬—7•ºŸ/IµýJ6ídÒÝZ†ÃûÜŠAZƒáy‡gV«ÕžåôåϹ})®†ä£~–¾Sm+å0†õÅnG8¬1 Å&êäòäêºró})ò3KÑ7_(.ÊQÐBÒ®DWÜ ÉdÇ"Œ\U+seD¥IeGÒU:¹'óض8ù²yV„JŠuIÎö/S„­?JA„>7£¢[³%¢m¥ËÊd^\ ÇAIu§n¨(1Ìbo+6ëjÙ5ÿô•"¿“è6êfÓþFo3Œbo•‚ŒU§œ®äÃuü/NSnUçÉ£SS:’S"^.dTE|«½Ä(A’¢¡X´ë6’HÒ/(ŠOCwò‰sh¹ûC*ºˆYb>& ŠûÁB>”·LŸ6\e9´KúþËJ¡Œ-Ä'Ѩ…›Œ RȤ"j”¯½˜V¥¤“òü…R’—“ÖîD ©!—8¨ j'P§ ¥îÙå°Å³n²9s<¿UÍ’3« ÐG[(¢ øäi“c ¶æ[Q©A5caT‹EM!-Õ5P½d[,‡Uô)Ìž®žÔzŒ‰„vºiõèÔóMâhÆÑ÷K;k—ŽC_RËTÍî(Æ9TëäD® "ò~õs7ªuM¦±—mTN¡[]WHt²Ê¾¥x„‰¢!ÓL­ÆÅy [T’‹¹ôdÉp‚,Ê…W!9;Ž! ÌC”'[”T–Lå3 \B¸˜zéj©¯}kŸÍ¡wˆö*j~Üä˜D˜†ULÊs#ÒªVÎêQ3‰š{"¢t)ŒÎ½›lE‘lšRŽ"‘u[BÍá3ËbsÔZu‹ôi9XD»Ö˜Ç%P¢Š1×ß—‰&rΚU#j?àò—Ø”vtØ–¹*²ê$Rœ»×2•ÑQ‚»ŸI˜K“ÛDÚ B”¬µð¸E¼7JDF à”0=à©50GHpêÎB ȡŅÐýÜh"Œ„¯:†¹%”f9`@ƒA•™ÌÁJæÒó0Ñp¯P©øIGj}ƒNM5G6Â%„´È3 ex9ãfŒ|¦ÇŒ¸a(ž¹a ”wH VAŒÞ‚•Cø· Ÿyh ¯˜ €a˜0C¹ý%Ð À00ýH~wؤƒ áÇŠ6 ÐÂÇãÞeÆR ЙBEòX¯YÑù—3Û %j\ÝJ€|Œiiš ιõÝÆ™ ËîQêô6@R/¸Z2„ª !„}XΫa`v9±¦B'î`£qB»vF&!”(–è…QÿøÉ˜5ÿNt @G@!PhdP%´ ¤Ø@ˆo…7ßFĜԄ/[17fÀ8JGC÷A8HÝÇ‚”4l’\äyĆl á€Ý(ÏPG1Š/‰1qToÑP`šgâ„ø„À† kGŽé )¨ä*Ï~u±Iâ9¿* @Æ „â¨ä暘ì~W¶Avº Û2hÞØŽÊ¨!ˆ2}ûɆñ·ÌÞéùhc]êbBó\ˆyF[È`EqÐT“HK™«Z÷ª,h弘šª5ÒS?QVשÐu¨Áˆþ³®Ÿ<ÌȆV-6©êºº¹esKÝÈûNßÍ¢X¨T®KeQäˆS˜Îb¡ØJkªŠ!Q õ1‚7m ˜ÊªrÓ©-Ö@¯T#¤•õB¥ñTú¥b“‘s¹(0ŠB½¯øÝÙÄ3ã·l'¬µ©ÙEbŠyiJ~}áKEš“ûJi._‘msP…½‰œº#ˆ„V9xåÆE|²üÏcª„iê^ÚÖ´µ:·ï)C“/W&æŒîBÒŒr¸å„#9¢Ñ6c![_.R!Ú…\¯ÞÅeÞ%†"Æ#Ñÿ-# ¯%’Kë/: ~þ¨ˆˆ\gýS ¦qŠsˆîböÚ†ªðáŠ"?V•“¤Ã]„ÿ’UrtÞ†-î§„Îy ççp„(fz|ÙSFD+o¶t‰Ùþ‹ERãqhòÄó;,A—òJ¾0·’C%YJU¡jºD(—/D$ít£'oiEK“ˆ”¥3’æ.we£Y–Lß!V¨F)ÃФߧW\Îv×`u®q"d’}-đŻÓóW<´þ£9ÂeŸk¼Ç® 1†jb˜B-hÁ)ŸäK/r«rÜ™òOY~iöÔaÜ»é³0Ú$¿÷*p㈿вå–)NþõgJÞs¦%óˆC³[ðæ"¿dA™6y,g]êH’ÒYq•IØÌÙww+7>¤å£ BGIé¿D1Š3„¥2~úæn~É”F!5v˜ÝÅXÄtû§®ê;µ‰ó‘c¾HıuzÌ[²íë¦QŠ‚S+ˆÝ/b]ü¥jÄÊVZ:2&]DÛ±± ÷+›!N3Ñ£'Ü¢º³´¹µ!_-}ñȨ†§[|˧]Ì#¨Ì*WZ›·¡$ÊE­DÄüT2Ò~oF99•Ë|µrDÅJÄ3£O´ÀŒºKLK"ÞF9NZê1ìÒ¹„*jã·/Ý7¤Ãé&’•µµít}R þI„wg*ùI…µbZ´âZÌÎuzÓ÷0²¡JŒï“ÕÅ_0™SŠ!Ñpͽš¬…n~Lt‘Ù8}Þÿ./“[e®¤f‰©‹L¿~ˆj¢Š‡*Õ0–½\§3bFVDJˆk%È%¶f:æuš‡5}{͉Nâo¾¾r•«U˜Ò—„Tx©Þ!\íšqQpLòËtʪ²=¥›+uÄΚÂxÞG¶ëWz„ã,¨”/ZF!½â²LyJ%N¤G*ˆº„ò/-¼—ζ#ªiL¹/I]"óö™½ÜŽBQ)RQ/*\ëS6c;R¥Rœˆ¨U\GIØÌæ$…¥]F¢†1áE0¬à êñ6BRÑJ·ò# €AB9U‚¬a6ANÁÕJ¢ñ ªE ¤¢+aŽÊ98TD âj FArŠA A˜ã_‘„I‚Ú…r‘ž,]̤¤®Å‰çÈ4\Eú?cáÄ ‰‘ü.S3 1½aŠì„;Qm++«:9¡$áñXÐJñ¿Ø' ˜0†Sˆ1‘MCR`é$4T1€#Œ^QJB¢ ^YB W‡)AÔš3è {s®íB±ŒpîB%tG‘R¿Ì#·¿PM,mk¤ÂÑ%§4’.6k®ù»OÅÝbŽSºo"çî⬅9Ûv­ûä#YÖ†ö'3ÂUD¨šœž†‘)ìÚÊüTûEô­ „lÌÁL)ÙÈß»k:Œè1<Í‘SLL#yÖ¸A4^\ĹÅ?—"Q|âÝñ_Mz™êóÅv¾R¿;§ì|£v Þ¢!,˜y]Žú¯& ¤¥If)QñºDÛšB v\îv©©ràE|-±}²'¢½œ>ÓP¯uúUB0N?R)K¸"ñ‰ª’¡ˆS#Tj/ò&”ºfK¥ ¶GÒÕîNÕ.®ØTwËôÛP²¢šR9[èÜÛspì8†vJmE[3 ”hNühýƒþØAVŠþ³’µÁ!gusPéyr®­‚tPR”2©Hé†àƒPIåÑùkBÄ{ª+õ8þ¹§ör¬žÉ–çÌiÏA”`‰œËv£¢¢­ lïå\;ÉBi{°ÆwZßÑ!x ÿ(ñoszY¡ôñbMAMÅkç#Ç\³jBE£22r´LËØmÑOê¶“²váj¿M÷ôoE³úº4W8G•–Èí\%‡b´Ã¢bŠ"¦û-©‡é«K¸…õK ·*uq-Ý•ôäýQïUásOÁ%UB{”ênÅ3YêbC(t¶ýÑA:¥&‚àý”o˜-Ã# økü– ÔÓ‚eQ’¢£Do h…}? §µ“-´­OCeä1?šTþz=$VzJMzuÏC½’qµ´ÂÉÁ âRrPGd`c®† °š1Œ×’i†Úv¹8ÕG+nÒJ¦¥Äö=жÃгJWT8­3ˆdNìQ“.³ù2¼Zë‘_GR…ú ª'Ï|óºÌ ¡ªcˆ¶••âi)KÒ0Øy]ÛL; S!²™˜±ádŠ8¨B$[숅؆¡>¢É^b›ÛÜk<É­O*obÁ LÔÉf¹‚‘ˆdÖI0¤k«Wäâ|”İEˆ]úÝê©‹¼{>nãLÈéåP¶5æêX…Z¤ª›uÊœ!dYŠB”ÎÆó!SéÂY»…“úI0”Ðá”»çp˜%"Ë´!ºG£,c: C)RuI–1p•wˆ59ÔJ÷kÓùd),|·÷JÙFÚSЯ•RQˆV1Hïò '“+‰¨öâ²’† Xyk i·úØäòû…÷½Òu2ªO7N ÒeN™¤ ¤R+â ;†IŸØÚö"çæÑ®ç;*†É§¬oœ¦KJ!†ä *íÒÎÖÊÓ:׈җ¼EË3—=]H@p€’Òî7O-WT¾¹¼ÿatnÄ_ôÒ—ßœ/“¨¨æ)ˆC¹O„¨Ôð¤2`ЧApG:SiRy°˜æ¨·j*ð*"¢5­Í7œ…|õ­Ú{=S“—):}ÅJäÆNIFr:µûÎV*¢zØO¤ItÂŒl#™¹ #Ò—µëÊlÒu1%:ŽPг(—ÕdTìfÞ’å}.ÌOý®<¼—nË—íŠRd¤*»¹±Ä#ªïô\ÅØ%Š-TAÁBÒ êS–šŸzrù(N÷±¨&%â¥h¦©ëvÄ¥Åòx­ˆÓH´b ue¹Ôu˜¥Â't\òœ‘Gû–,ÑE}ñŒHJFR/ÎWD" Ô4»SùÈŽ „±>ÂÑW8 UX[Šb«/ÓÎmÚ\­Á5¯JÞ¦j›ý¨A®ÜPž»v4Šr˜ªÿ%Rëέ”$å )C ÅR‰[#—ɧ©$šœGÅ‘nŸmööZúñ„7¢ŒL1ê,YñpEÜ5X”"ÎÚ’¥+ –S¢œ“"yïÃRŸn)ñ4rÕL“ƒq´•>e($D;7òºÁAèÑ׳±Óê.”šú-+Ú¿•B©oÈÆ£ÊTet[£4«8¬èÖãD¹CfÝŒ*ˆ(Á:¢,•8´7”™^וÓ³©øU˜×¹p}þ”ºõÊú¶*y“ÈŽîv¨2°Îé‹„¯»8‡ ‹¤ý“-a½Í£ÿÔ#î‘ ­Žnc õã Æ D¢ª]¹ìÔz¶°â„[~Üt÷™_P†Zå}˜·ùj~ÙlGÇ-Ñ(Æjþ®|†qXäÉõ(CȉLOŒaÇã;ˆZ§Ö}Y³è¯¶”ïæú!iµ’µËäs)¬¹‰÷SÑĹéÈxG?!"1X*HM•l¥9ŽLŒ®LL¾ˆU¡½Ó¦_l–.[x‚êWˆï§Z˜±J§@ Þ¼a‹_³žžU©y3V¨³vjQ=§Ó[”„§yÕ8®r2ÞRé `²{éÉAPCˆB¸SªÖŠRFZ¢WMÚíÂñ¬ï71ÔÞ{“I­Ûê*W޼'§"©JúA™•Š*—°–“™6àœ;—^Ak’däÿg3¶J’Í“V³R»gâ¨é æ}"Xç9ÁqG[½zÑF ÓÏ•·ž­Ú5·p¤¸¤ö%5ù [‹EpŠQ©¨Ö%ɴʈA„8£(3…MSH¿N¾n—÷Žæj‘«ÖuÑ«M^Y‚w“U=e"¯¬®¤ÅMÿ¡s +*”Š”ü–c ¤:œ«–½µ¼¤¦ájþR»/`Õ®ÈMÂÝ/E‘•Œ3Ìàc(Ÿ ÌŸËaêîCsÊ_«Ø”«T½¿«6OB!2bÙ.oªŒ¢D,ŽÄ”´4ÙÿMóµ¨QŠ:!Í)ƹ­õ/!=ý°– ”l¦¡‰Œ¨BP]Ñ1rf¨»º›ž[©§'â8Ç-Nã:*>c¸ü'·Ðdôó¶I\¢9r¼C*³™¿ŸI K(݈90Tc$Ë©Y!$”µr´:SÞUôã3:/{IaýäÃÌöFka·Zé_v 뮸¥²Ð¸”Ë wIƇCèž¿{·!)Á)! {ÚÆðµòÌ|bÝv¤/0‚­²&eíÃPL©øGjÎɨE3Qˆ’f R6o^´ÂŸsñB0ÄcR£i2‹O–®ZgHD× LœÁ  ®"tÇæ£7q=饘¶cå3tzÔñ;f[ WÂJ–™Ñ]N´–wÄ)Š)X+ª$ަmÁ(fB)nÍj‘P%]¶³WªL%ûøÝ1hùfÍjºWqôÌ㈥)ØéY[^J¶ŽXD¡ :ámÄë[‹"$A&N¡ | PÍfÜ*±ÐR‰îÊùÇZ7sÈÆ²n Ú…-Äe¨™- —§„D£/Ú²—×ÉvU®n÷¦x½…»å­EQÄ1M•C›ú¿¹)[;Üæó¯m¤ýEKÑž­´5I´tÆcº¢òºuñw6¥Šî訯S¿¿HÞ§R›åS´·FÜÍÕ$‚,댪_š’ÄZKõ5dz˜«u*¦ÕjÈã¿J’Ü¥«}ɨ·»)œµ¦v•ß þÕW¤%¢ Vl(C£[ ómWŸY“ˆæ;LO0œR¢™g* ov•ÿ^Äê_LÆÜÃîÖEÄ]­””l¹ö„k¤çíýJŠ3ÓÓ·Êþ¤V?Ê2ÅJÐ]ÃzÍKo™lvRTEòÍçæ³’RxTw¼åçWUmv"·(› ¶L|²—±5éž‹¼r*ǧŒu}!SªÙIe&Ð ùÌEâ”G`Ža†µJ¹âÿøÉ˜6öNÿ¾€%À4@'€¸ *«´­–зrÛÚ†Xå¦D~ñU„¥Z±ù‹)þ$1 A%mrKy•„`jDÀEÜ€ú:À±1  áL] ”~IH¿ iZOˆDkð*7$jCL#´%&6Æ[PA˜h¥ Ö7‡ µ§v®Q¬\¸=ÐUñ.ïÈ(€“³a’Ηi`JB{>kacè3"fÄ·\sÁŽS ÓÀÑšxƒ´a©„øB¨4ÈGÄaˆ¥+¶á*¨9"±`å2ÿH‰0§A†b…Ž0#:Ñ©¡– ÊË’R, Á›3$!”.}˃+i9ʤUE:¤¯…âH½}h'+¡CJT®ÀA"…³c2(@™! 9èå‹„Jôð­ }TgD¢‘îÐ2ô˜DJˆ¦2dw+¡F7 Œ6êŠRãQ”]F‡&C££Q’– "è~GxT‚DQ `Šf\y#q¹‚M¹##Q ·ÇSt1ŠhU‚âãó¡Z¡š v†ÕkS\Ü€´B`Ã"`‡u÷ÉAZ B3„Ø^ ÃñƒˆCuS$ªQ²x¶ÆÓ×á’„ä× Rs S=¡ª),Uïjøbˆ"@5A¯ Ð¥ÀD³0äµs2ƒñÄQH‰‹Û„£pÉ¢R商é@‡¹DÅR!TTC©z å&(»8ƒ&b1;) %@ˆc6ÔNã‚ÇÄÊçÝFÔ°qIØ^$a+«aÍ„à#ócP‰‚¨Ç/kWà˜axÀŠRÌøXàêoÆJœ5¼ˆ#”/‚$ 0G99BN`š ÄÒ—wÄ0Æ)Äeª)Û¸%˜ðp‘Š9j@•\V&ëÁ&Lg]Œ£·¼‹ N­5Š\þÏêÄÔ¡ö¾ùj!Ú¥_ÖVKô„9,*#ÑwÎIKå³”3IOg[ú(‰ë.Õby¹[K#•‡!—U×øÜÊÂ’È"]”Q='(ÛÕK.¨þTelï}eJŽÞËT7ò¹3-BekSmmÿå;ÿ¶|Æ2¥DZ­‹‘Ä9 )’å«á OïNRQ‰íÙ¼YïMÂT·a8µ"üëbˆDÅñ]NÒ‰(ŪXžÝnÇ×ÂçºæôF;𘕥•‘¥Oq,U!ÌŠ©u7árfÞõY1ø¿Íj£/¡{Ète³ˆ-K\ réôì~>é;¡0|#t»èC©N£½¿ªúkÎF!\F>c’+ ’±r_œFIµŒ_dE(¯kÖié-¾dcÒb´Þb‘„§vS/¡TãºAÒRGâËgNÜ¢HŠZ}š™[¸Þ’4ÇF1ªÏÏë;0×0Ž\A2Õ-½õÒ©”Z`¦:~T—MWTéXTÜôK0åó[ûîX\MW1[·tUá%¸ì”A_ŒP¢9Ô…w³#’—fjY:Ìy’¡-%¨É¦¥“³”ßÈ)‹¨‚„gAO†iȽ„üQµ)Õÿ;L*im•r¢ñðÇNYGB”êýïm.ªåNuõi7kŒrÿ0BS ‚¢¥ ÅG}1#ŽJß==„Ó,«!ð·ä.®å3Ä2ni(å>ý ä²ysºePÃK-KS:Sd#&êU]¯•”Ix™U:juÏ˪–Éžâ/ˆKRá\k›1 _®Ðõ•œ~­Ÿ4–”*ívˆOjKîd÷"Ä#RD1Š)”“’Kª¢²&ÊvÃ&Ì©¿•Á.æd~b÷«£Þ‚!wüVÊúUÊk•9·³r÷ß E?Æ^™=ÍÊô+- ¸vð¤ˆí1ˆc'>F«=TÏÑ.WH”Ôª^—ú:›¶¡ŠS㔌Ûs³©ªTUÑЯÎëò}—pùŸuB7íh¤tÿq ¦Ÿ¨bèæ;ˆ¹c-”Y4„1¥Ê±Ù½ Å®YòÝc1˾ښaéff}×}&YZ¢£¡¤!±çÇE{ÿJÔ"ìÚo°ïMÒ »œEì„"Ä A‰åÃ%÷׊l‘Î#i×+~Yw):ˆ[r;âzˆ% Äc¹9´ëËNñØå»“¹LY3r‰Èöm‘¢\ß † + @€ÄLHcRvJ‘1ÙέhíØ\p "h{„l­Ø‹¨…B @É•¶–Å-+<Œ!…”1ë‚mBÒ’ €E ˜Ÿ”È*ÂÒŠEä#‰Ë hðªfU;«3B#sÀ1- “¶ ÁXQî9˜è)ÀzÀIWjܺ\‚QÊnèj L01.µH£ŽjƒXHÅ;w*ZLW¡Æ¦d¼BÔðM©Ái©‚ A¨gUЇS‡ÄSÊ"êS /à7*ÑþPHÁ`CQÇz‡d; F¦Q.Rrá—±EË „Æ,­óœn!ŽLN3’{H4 ëù/l!Ù5XRÌL7‹FÉV…‰ƒ @D%„ê\DáápÛ ®ÐPp&›9"^©Ìz·> Ï·°gÌE’ïȼî/z{j¡;;©\T6¶Œò…\{Å{=x¶.µÔ” ÍQ}PËG1Tˆ‡q>Ug¦¿‹n:9²¬¦ì´”ó[è²"qÝ5Y,†)zÆ;9n”|KÑËî{&²ø»Ió•J¤nzm³SÉ!ØTg¤ÈT6óK]U{q˜ŠyK;ŠÌ‰„gò°¤žäÅ—Ú¨‚ Bæ6Õlk]°Ëœ‚I¿¯RÑRöOB¼ŠàtˆÜJ«ÆR6¸¶"E'þ­0LO»ºÑ¢ˆ¥ü#{VÑ6a––”…ôQ\!TF™}î«§2>ÛKËZ¡Y©\g$¬Ví³î³7’Ÿi:QB'³·íqzu¶ÍJwñÆU!E@ÀÇ-æáH´Ú³JA*–Y®´¡qQ÷ÚÕ>z˜›Ve+BZTB­ž”Ü©¯xŸè@„â7„y¢…wÉñ,œKQPÙßE+½XS±4Jô5VS´¼¶%$«ty æ+g£Y•õ(Øû÷ Ô%W‘?U1=“KÛ÷% bªgqÒPbX_Á¤k§áÊ[¥T§e¯†©JäjÊØYˆÒ÷VÖ¤±tJ²ÔbæÓ­o½Té…!|Õ±¢âÉö%(?‘ã›Ü»KÎk˜¢»zï4†!]Š—Ý $&Îtëô‰·$â¬"·c–©f%dU”šùevé…ܲœè!œ©šw¢Ôévõ ¤©,W}½S˜^kU^‚mÉ;{ˆ¤#’ÿûS(eÚ%*©)¹û’J)òNµèu!¶÷¯©Ž¤)Œ×q˜ÚD”Nº¡ ÜN¨ÒŒó#ûë½yë°§ òYè¥9 B1Hã+qTD.%×—è&)m¤ˆU¬•¹7WL¢§RÔêÌ[¦U*Õº Gf2XcÙ°’O<’ÆÑ•i¥b¥É”,Œ¹ý´#³TV[f»[xåo±X”}­®Z§;X»m'¢qƒ:ö"õ} Xݹ²§M5L™åS?F%P…Šª“„tÙ¤.gp÷Ÿnb³\‚ TçC¹†2=ªÐcj£¢ä‰÷X’“8ø¯uÜ®“mšD_}©øâ] Ù•» ît£q*BµL‘ùRX™/“>‹d_1*‡O6¢nµŒñ IÞŒ»êj©-®³¥DϯãòÃ4™y²³Ú”!GAMDiåv'_0“™Ã’DÔ­è{ðÛ‹Ìzæ'Xd f¸ubâ$¥M") •ô8J~ëy7ùwWùjWïäÂk5™ÆÓ±ÌÄt½÷}¦¿Îw]º©D䣙ŠÊÏŽO¦»ˆŽê¹ÆßìØee£2gÄ^§âº¿öÞ ˆ;ªJõJkXZŸù(Úôvmâº:¹I! Ø-ͳ¥„¢´“jûrÑ¿rsËίŒ‡Gü”•-f*Q]; Le"äD½‡œØc  ‚pŒôtš#r©%ÖåŠP¹Ø-iFÈ'‚à ˆÆ „´cæ[rÅ®˜±¯ŠB©LZ‰ó„Ž(J#1(ŽÉ5.8äVæ^2Â| ö•œ%¤ñ6HE?)`B„|™ èÜ­ö‡'ÅX(N¤ô´k¸‡œÂ †ö9/h‚JZä™Ì·|fÁÉä ¢9ÓœSzpÎÆÄTš«20L,*ɼÈo±˜¬Áݰ/R ëág8LÓÓc‘8EÆÜm`­Š5¬ŽhDÈCôU@ê3³g7˜ä+p„N£*¬K ã)X:+É—B&:ÖVb¡Ž˜¨ždP²0h˜æ -‡bÓ QPƒªVä9Ì}r2HÁ¡#%@òŒ•CœÎ‘s #ÞÂ…N±¹¢qœNÈØp5# â¦æ¼¨"›©‰8H›(Ä1a‹Ž¤tìÊ! s@îCì[Dc´D™ú ˜°›a‹H]̘%¡‰Õ“Ýr]¢´,ø¨sqF£rPÜfB2£ˆE2‘¸‡5(!UÉ2u}Œtz)IS9•kD#cQ£™ŒfŠbB Ki…$s6戈1ˆÅ+5øG)«¿iª7£Š**•lÜí5WH}V+/Ói™FÙã%¾×ÐTðõåõ p£UÂUR¥ojz$Ä8üyvý4='ï,ZˆP‰”g°iá;Žríù¤ s;F²}YYËQ¤ÄVV”ý«üJªmîõ2PŠœ«1ý’’ít¼ØE˜ôUW¤z,¢¸•ñãd+•7ÅI¦ÏšÇˆ#)ìiŒK úïí´©ÍJ6Ȳˆ¦G5”™¿nC·Eåh©‚¬3U•8C £Ëå!¼ˆÍÂe¶»XõÁ€C%FU¢’X{]$–ö%B¸£ ccª”ã ò>J’Ù7&³3—™7ÝÄ*+Ø©ü΅墓.y•Ô®W:¹+4´b´qhjyHâ¡å- vùjŒó¶Ü¶e8¸ómÌ:“d¾ Êf •7>ˆzÖ¾·3­žQŠ!\E$"~ú÷+»»µ9ô|7Ú %‡ ñ)¤ Çtù‡¼\ÖMíiw…(BÝÌ‹wÚ«ØŒR]Ÿ—w¿]±Ù ¨¶'Œñ¯Dl&-iÉmsY˜Î"Ð×Ñew0Šý(§F‰ C¥Ñ¥¾ô¿ÏB0ä@–6„™"’òõ¶Ÿb„2ήQ10;ŒZ Ñcê)š‰ŽÜ3˜„"¦L%L(f p‚*c—IGµ¾ýƒ…t.ØSu’SÇE¨4Úˆ–˜¦+Xr Åb¤FWYXæw¹0ŸOÜ/IÉ‚ Åz”e2ª%8Ö?*nîcµ9ç2HÃ%Û¼Óe$Š~¢\Œ0pg¥uë¡«A-áF›èBBº- ËšM¨“/ý<ÊvÛ¡´ŸBoÔéʈ¨ˆQˆyU`æ©0û"&C(” bŒQ™„ Œ`’Õ(«H~݆ /w-¢×YÂÅ(Ô„jÂT÷dNˆ$Q"ŒÊÐ aTHŒ‡¸QúÄwd£A* ®Bã@Ž´hCÊ`ëV>#SL,\ÔžÓ"¡† Ž„–±Hìt(ÈEF¼BÇ©¦L.r°¡^š M§#cŽTÆÁf  eSÏj93ô ÙÕÙU]vðùÄa»Îa YáQDÆî4`ÀŒ¤a©2ðщÐ.¡f.„í"§ÇÚIhÂ Ä g¦¹E¨û1#é]¹GDP@ø¢6¹ B¬ˆ1ÄS°÷Èq‚ó0²E@X·^~J­  ‚©Î0ш̀Â&=oÜÅ™ ‚2”‡1B Æ®ãµ'+bbènDâ*M\˜Ñ60R9FJèÍÄxÂåu‰nZüïט”Ì+›ŠÊ¼ìf@„`h)ÇäUAO8c½Ó|MŒ Cž±òÀBÃN‹…rÀd/áOY¸cž-¸î2³”l#࢈æÌ± @ƒ :„3ŠGgŠ9ÛØ¤Ec­z,Û1"ØfÅì„ÈÄbàzŒ`Sˆd2Xý«ÅÄEÌ7øÄAÉG£L[ d'Xá`EG !* È“¢#RÀƼã'VJbÐn i•ïËÎ,ó”æaª‰À»‚ gã ‰L†0%l®Ûp3#˜0lŽçUÿ›¤\CaʸBìbW&§™›3™Ð!ÍÏ‹ø"ÈØÌ..ímugÇE«{1QåÓÊEu÷V¯zv:Ä ·®Å ~ø‚;eœ†B?Üév)˜Üª*¸»IZeª!EY¥£­µË"šôßD’²Ðë«&¹(ɵڈ®f¨Äv¾1VÏR§ÛVŒ‘}kÎl¯ç~ÖÈ” ¾!i· Ùw—¤^dPŒÆFUJºI¼B!mùÌ™–¶)ŽÛMÁQ™‘mqŒDGJ!<‚·‰qQrµôþrPÉ•<‰Ï]iæEc!'*î Ê}NåÄ*j6E*ýëS ÂãÉ»vKOÖv&ÔñF7£6{ÐQNf#eŠ‚2”¶[/ öâ9f³Ú{™zkUB9÷L޾#œFÒy‰J˜âò%¹÷$5)/ËZ×ÊÜkbœÌ˶†“ÿøÉˆ8‹NGwªø‘»ýͳ’eÚžOs€Ê{ e¯xªÎv’•W£ò¹pLúˆQ['rh!hítµS ©!r¦9$7Þšcü¹ôz1 vyÛ¿«~ì²¼í#CjGlsˆV o«þ}^ÛInmóHæ\Ñ";*ñmØ›Š–LvK>¼Â#(é´ígÏ9'òàËáI@ƒƒÃ~VNšRØ…{9JE'’&’Íõ%Q4Œ*kc‰™”Á&²è†¦”Á˜ II”4¤©C6ÃR+'e7Eåűq7a¸Õ E¥er{ qx²à™E rL9Ã':JÒ}žbe êgÙpÛØøW¡#!Ÿ ®/rцé•-×s»-ßNDÉ(âæZ•žåd«¬†äˆ9d9ðH´©–—¶Ö›c¹œR•Iè]µåÆòãD"¹Ó3wÛõébdƒ¡ _ãHª¨ÖLš«êk-Û‡;^{­3/am[Q•Œ“ÕJ.¨òj½:⡊E;ø§9I“¨‰•r8á;KBb—“VïùqÛõ…táÞQ¿¾äÏ,¯ÏGÜg*gf7ô‰™#lõ™&$®r¨åp°Ÿš[íÕ“Är¤¦fêmóÛ˜î_ªŒCiŸO®Ü¶±ãÉ’°Ï’ Çw ’­h?-”…vè^R¼õ'[5±Hg°•àO C9ºÄc®ëì›Üæ]HŽ9 l(²–Ub% bÄÝ<¥î½]®FEû?úg(Êä}]âák…Ë`ŽÅx‚<’ÒÅ©l†w²éSç2Ê ¡‹xKΕ[RMÐcDü¤%« Lz²ÞF™ÈVuý‹jVú?”r*!Åe9’Gü šºä™¨¯SK6Q já4OåÛtªÙ³–ÆÅ–Ë%!º—#²¤eK ã²Ôi ´#Š’^šVÊIŸÇÎN*`ŽòB³íoolǹž¾I”ʲ2‰§B×Ußþ§3„!囕—_•&FZ“”.­EëRrÚB4l- 5pã?´§8 B k=},)6ô)¾Ô±kÇ~Ä3þ^½´”£ áK妞ÒDÉ“UÅ(®GÔÕ;û5YÄlFa°œËNÒX„k‰Æ^EºÈ1ŽÅ·­oÂ._3/¹UŠ£*ý2ÙéVæýNQÞB(Å áâËs(Òký4`‰¨*.1‡é)ÓÒ¬Û‘ „QØß^5i–n^‰(‘"œTk6¾è¥¢§”8ÃÂM¡Wæý{}ö䈮Í:ÙVòã €™=-™‘r§"\èîÍ"Ng:t­¤ôü½*Ö=?^ÆS¸‰2™†¹:í›ÜØJuÙ%0该Ö&¤ƒã$#HswEÉ$¾Ö›×NT; 옫Ü.ЈT╱­rM£i¿e”†C¤S±R¡Iêø–,„ã(¢9%k$½nbåé­GE%E®-E2íŠéöú jé”M ¶3™qjöWat""êî6º[ÑYK©•iF! ùŠÄïò£ n\eéÈdúQëJÐêן½ˆ)‚±–8EšñŒ¿rÛK#J‡FP¹Y´o*.цt øMömÅ•<ª1„+)ŒÚG˜µz:LÖQˆ/™:Ô©f­.J¹ÉÁX³±d«öÛjÏåÓ=Ä#²PEІtbE#«¯œ'åRMÅÒæ«k„9Jýüu½½ÑWð/‘‡6´¬£'mÏf ġ֔¨¥O(⯢]­”ì5ꓦ•.&ûÝël¾PGŠiP…'²S ‹-·•°DUFnŒS4’2¤ruBµHéKû¼üZ/Û}ñY ¢Éž0ªS ËÛzP•Úh)¢Ê’”ta 1]\½tµˆZ qEÚ²g,©vK YúGå-èE;I´‘AeMbKéä-ô–R°aG‰Š«ØK„Û)ÈNj&äüáŒE-”Ž\ß.¢ÍÉä'¼§³9J’;æMÚ²ö©Ø)$a€F–4K‚_ ÓÈ%YDäZ1\ª;[>|’Þ±4íB¥Ê’¦Lì­C²ˆÑIB Æòïo^ÖDgïp®žb¶_ñÍåC ©Crj%IˆBÉŽZ¬ön+IJ(¬¢¬3ËÛ‚z¢(º†Eßj>ËÙ´AMwD£.fß¾\¯ 30T)Ö¬èì‰RÄvª(ž©!ú-ý8úBÉF³žL'ô’W2óùù$ãI¢ò;±“̪uå+«¥W™jË_ü[µRŠš%QÓ9‚-”¥£fª+æPß‚(¥ÌyE¹sÊ[îõ¨µì©Œ(ÅYTÛH»JznD©h}ñ°ód‘S±£r–Ë­…·Qȹ§ÑWdˆÑ] Ôlµ!‹0R\¡¨?%‰&)¶øò÷r™`è§å…ù©luçªUJBn¿uò•Ì}9^¢XJñ0ÇÎñ̤vM'Q(ªF>INc I®…ð©ÖK×즿eqøì¼bRû‹c|ƒNo_J "ÿ ÂããÜD¡ŠUeL|Zô]1jÒï·•£?™jrœìîÜíæc°ª б-Ä(ÚoPõÈÜ]çÕ(Î3óS…©©qd¦ŒœuKªw»®1“UjÔ¬¦5‘Oæ¨G)’™K²2y~oTÇ$¥F$‹Åg"Ï@ÖúÊZ,ñB¶ç(D1K¶Ã"6ÿ±³ˆù‡²î·S‡! Ê~""O†|ËÎjsÈG,ö!Ó¢,ŒäÄ]ˆV•]ˆ)†·Ë9¤¯êÏA2ºDFЇ9F&W‰SR£K}¤¯ò%”ŠrÙJÈf%Ìã2Ý<§Ò(<…Å¡¬[™È—OÛÈøsTÒPm®{.åTgmg—^ÿ¯Šè)T삤r)[¥4‰n\¡u‘Ú¸›m-¤G¨g0Ñ„ssàèð,G T‚|kLp˜ M†(1ˆ@Ç& Ü)Àh+µ€Q±éQƒ8AÄá:ñs±ÌR•â†J%¢ BzŠÆè¤…cgŠ’°¬öpæ«´µ„ÔÂÕ Mû꫈•&«VBUºšBFr=Š÷1œu˵¯ýJ©ö%¥'s>Sö‚檚#Î^qB;êìSª´ßóšNæÕzÝ}¤zÛãÑ>êÒô¨u†#Ú¦ô'°£èôŠB®.K‡×ñ,öb øîùN^ß&NM<£¹—&0Á Ã/U „ê¥Õ’¯-)Õ•¤¥“)&^䯫‚ËçTåˆì½¶0ªã1šC¦*Ζ¯tBõ(PªÝnøž¤žzPÌßõ(ƒÃ;0‚ Ú-HýNñäÖ26Óꙣ2IÚtÒìAÖ9VÈ1!Òûu(Ú„1‰=1 E™OO’’‰³QHV#YlÍURÓOŸ–A+SŠB­FV:œ¬z&tL1 zµ-¹lÂÓëæÎõ¡ úDÎAÞÄÂõ™,Õb(„f"#ŽRùÿ0S·Å&–ç·M¹¹?b¹Ê)˜Šì µLÂsÈJ?ÉvÔ|™ÅÏÔ®[-/2Ÿ(’™d:­‡ÆZòÝsS§.=;Ø©JD®šž³¸Ë|Ì)Éê'ZÛÆ§qˆº¥`ìâ"”Äá ä°¤1Њ“oiÒÓ™|V´§6×%z¥¢TæLȧ!^¥K&Äwš²¾[eB*Oö£ ñ长’çÕW0åcšåÔ„ãdw)­"r~r·òË‚°CŽ„f9c«ù6ÖÕÃÏÉ…ý,4%>¶ÝÜÖ)1¬áZ¦RL>^¿Å*»Yµ–q Uªï4‡ºÄMb‰fËîc|µÜ÷—s M¨¨FLrײ“•uð¥12c¡ï¨J¦ŒœBÓ[ìW5²¥ô1Ýx¢®µÃUGe3­hCRÞ´ÿs.™jíÈ»š(eZT‚§–û©Br\¼Å7jŒ1>-åÏlC*Õšq¬2TÂ"™Ü]:V¬ÅV^þ&ÓöNÙ9+DÒ'D+ª©4&žƒBŠ™¼b¯êç¢dæIÈ8b1’ˆOÔ£É<ýÜÕûPÈ‘ŽÎi*?‘„Yq ˜ök;Y® g)d'Ó4Eʧm{eU_ V¿í;Íúø±EtôÜGfœì#œÑ)žÙ&¸jf_ÊJuÔFenÌSf&ia¶úEÙB0ª•^Í¡––—¼dI99ÈÜU&*®ìÛâ§³°ÄIR‚&Ú¤”ÞT(V#§ˆüÖ"öOñwGà ²÷¤‡u\j¡1+®·V«°¬®^!„(쪶¶&1XÝO©ÏÂâS·95 YuøtE= d¥K)®îtsŠŒøîåëv‰¶ÝÑèsËee*‘Ê|¾+⚣­»ì]Õî·SÈòjëôÇyœö/–ZØè¬”¢ÝÈåT£Î¾0¥a »F.?ˆ–Wp§…ßAƒšäª h+•v°4hêÀ`Gp1TÊ„Œ3(s¾#ª^ 3ç&wñfšPR“ h8ÒQއ É–A@–c‹èúæ@ãa .åàøD¹¬a”9Ó$ÌFW*‹û c‰ žÛöç"¯DÂÁ1‚€M"3t5šrýJ^͘x ãèS2ˆ.êfŠªp‰  – ݉˜ÄQŠq¾Åâ>+ ô™A²šœGl¯†ûƒ²(GÆ­˜S{Ø@BŒFQ©0Ñš½œ^¤VÃQ“j)ÍÅmB„|SŒö&ôŸÞ$#1x™Mã16øba¨ebC:AqT)г¬Àš É$‘^;Î421Øø…1ƒA Z4àN?g,œDá‹!µÓ»G„ÜgK³QIÃNDŠb»÷q¶Ì @Êo‘=xÔ aEVt9jf7#¥•þg.¼)„ãBñYBtAÜÐ# Jf2šØC?1ÆÃS¹èë †Û¶2þëü(ð¨'¡#p„ 0¡a˜!t î!Ì›E¢º®‹3A0Œ¶áÛMñiGhc D2‚•CõâKó1Eæ`E A{ öÁ nmþÊël)ÅSƒí‹B!p¨R(#îÜEd?ˆ €€ÊÌ9‘  i²‘ØQtÀZ)2¦21?)áEå½LÔÒ°… 1…!ÄUÔ#A\CoE®iÊ)QUU %U+ÐßNÃc׎þr'3-uEJ¸L(ŸÂ}•ÖUq΢+“Ô¨g¥µgc®çý0ÕI(l¤´ìÆ23¶â%RϽ5›¹«¸auR¡.kë‰&û¶T"L¥óÈûµ®ªÈõ¿£tí‚Q¶¶Î=w;îc©ØžêR)\kµl¤^+ÈfI®¶?[YZ•ÎÍ ŠÝ²r;7Ïï!ŒS×J’){zQŸEÚùT¬YX â1Jùô¹–Ä$…t«öåJ®ÕÁkØ»ËsœŸ-ðÅœ„¦¤F|ÈM¡§bss,‚r8†QZBµV®éÕ.þýº…¢3Ë3zŸ %¡bpôÔ9(ÙaRd¿2¹‹JW'wvZ2j%\w)Õ"¡ ýÛF#›’•BW-IGѹÈxÐ7ÙÄtê‚’Ö|œØˆ" k@Hºâ‚ L,þŽŽ8ƒ @pZ) Úˆa V¨Ôª„Áu*>  ˜#ÓÜ74ü7(”Æø Â+¼… )‹éÀ4´¯PÌqgvûñ°†95™.QÙ8ÉXA aD2‚r˜CAï1<Ñ‘¨S»Ð¾C£%‚Æ–Ä”€…ª^"@b*N a› ÊSª@B1PƒwaÐXÀpî8‚²ö„—Ì®á?ȳóhF3£˜Æe`dcÌì†]@0Ê6?XÇZµÔr1âë‡FÂâQŽ„öt:ë²c é\cvÈ(l1)fdŒ…ƒ¢øi°"Œ~¸ÅŠ?ùDc¨¼Á¨&ÄèÿøÉ¨9"L÷®÷öÜöó÷7÷z÷˜´"„b(X;ç ø|°d ‚†0‡†Î3pÀ@@` 8¦1Ôí‹JtUQ3‚]:Ñ^ºWËŠBÕµAa˜%O S`h‹,IXZуÂ)‹#äã 1Œ?Žf^²%bÚÇe#Våpu0†Ø"1t#ÌŸÎCb X“ K“%!Yx½Ä®& ö"Á 1Câ!“„Bd7΀JrØ ‰ÖË ¸wǬ`‚s©‚¸;çD:A,† ?@ÉZd)¦¥ L“):L1­êÍ Ä¹ó©HsÖ 0‚÷4wÛËÄã÷ÃåPná @n@œ3 ¹œ ¡ ö\¡Hª…bA)¬Ç±G™R÷Þ1"xUÁ˜a5LÍÈÃc E  pCw¥¹‡ÕïtÚHOª-Äoòap]]¡µŽÝéUHÈ•\VÚT˜SÙã²3iË©—b$2bV·!.'º&=ßÄ:Úäî¼’ËRŽaíµPR©„B.ÄTLkáH_.Y³žÄ/«?} µ*io_«=:‡O.¥or¸Cžs{5Šw2HBøÅµëºÛŸ´´Ü‹É‡3–DbSÛ¥~êú/yø¨†ûÅ)Æ6:å#m#ß}9²ERÌ“’¥B¼Å§'i{=ˆïBý ß®‰´îÃã3‘'YˆAVfõ\dÛ%òg›t’'Ô·vE{=1žRöõw\¬vl–’Þ„KePä–F‘“ÎÆe„ AcZÀã´ôçÓç{jo"U¢.þ—ÉKTE޲âÈ „es)¡ÚÖ; Á ã\`q Nâ †A•°ÆCÉB'ùaD˜èÀ‚'ç1Ê)Áxu/ƒ2Fá'‚¨¬z´Ž&º›ˆ¸E›üC áx¿e®æDRÊBÁBH2Ñ1¥Ì`fnÎû²ãÑAù.€l!Ä?Lz½¼Z*‘r¥<„)ç2@­ÅÉɨe¤PŠ! da’ vwµ 2 Ç%úŠè+…(ªFf5¸Ð0%¦D ÑŠZ,ZéÃ~‚ˆ&§™¦ìQ„jRŠn±œè8‚ @ Þœ hŒŒ3†ÌŤ0AËJ •Ø)n"Ñc”œõA`ª"T‘/ŒÈ&04!] Ñ™C©ýddaôƒ)CÈ” ìµÅË t È&ZÅ?â¨(| 0 î`ˆ0¡D¦ð^Š0rZ±c2˜¨l®xvˆ€®¥0)Ž1‹f>+!ÆØ$š;8A¬!ÁŒ0߯eÙUNôQ|6˜ ŸÓëQ’,pxœBªB ÀØ|VÜ …Ú Ü!QÐÈFhŠ¢1…S))»Zº¹HùTÈ! £‰àQ™HP¦€BEÄ|RšÛ0tÁM:ìeS Âêù,QðQG¨ˆ¤èl&ÃÎŒB¥+q8DRbŒäQ”Æ'Lý\“]B±Ö•ÎS¢0l¦øÙA%Lq4 °Á˜A§3hl… M„¦æ×Tá4&bˆø¨ýBÿ6ÿ造Èàh? V(1Õáß’_­ ™&$3¾¦!j6° ¢¢!‚@)yɘ‡u7)…r¹: 쬞e{Ø‚Ð&0˪J !€€Líffh V£+ALNJKøûñGuáo)T¼-ŽŠI!~4m:ˆ±ý­E`LÈu{C56%8ôgÌ–^!YIá› Í„n‚ÀDg 0¬Nü(So2àáΊ ¨s‰Ò”up2 QCÇ0Ÿ³ ãyØ„íÓTg0ÐhÐBQ ãTJn0Öˆèéƒ fžv3:[qNçfHzª1냅r@€ŽlVÕÐLHµŒMP¢dý0‰…åA)DÇÀ”ƒªœÔ3 ßeŽ¡9©ˆAˆÔFa¡A©‹;†#…ãZçPpèUj*¾Wüè,ª89ƒ©‰è@âˆàlJe`ÄEAˆNˆ0&جD49¨#B%áKK1›. ˆŒð*Ñññ‡R GdÈÆ¤>2„êi°£#`gRÕS›ÑÊc±vµ ä:¸BkÐt"%)1­È `k™cn„0Ð}D@•"©»ƒ½„â,ÅaÕÆ¨e8 îC„á =È;uIMˆdä2†Q-'„ÈIÐ" ¥5Â1‚C=øB²…².+—±*óípö$ЏõDPh÷ŽL9²0Ѝ{š%v0tKbf2㔑5ß°ÄønŒ›!1¡ˆÃ+[`ÀŠ ŽÉV×Ñå=¤ZfEqH¸¥APÜJ4ÕzðÀ†MT”„È@#ä¡$?%¬. Ñ AM°Þ˯Pž‹ëth|ý‡ùó3¦SB B ”¬~€Ê#&k€¤åUU œâ®Ä*ÜÆ0tæ(d— c,0a„Dv f¦ƒz Ù‘ÑDÌ/1éz÷„ âEQÄît !"ÅPIIí0Äø‡$¡8A)¢d™(%§o€uÙ L„+ªúh=^%™æ׌‚ tYJ«`‚(1y”!„›n&¦`}‡è¡£2ih¾) S!sòÔaÈ´OA „‚Œs2Nº„⢡Q…Ó`Ô¨QL¥;Û!Ô¼2jC„A+Å€œÄ! o”Í„§âøÈAèufLa+Dj.˜×:2RŠCúÐXÎNCª!ª“€æ:¹‹äŽf¦3Á#LsmàÃ9dF1°W¢Q˜V Bjzw@CT= „e a!ÅôH *‘œG]¸F/r>R™Þ¨¶‚nRÆF †ŒvZÁ-/Æ3Ò0„ z ‹t¯KH *òB ÁPØÐø¬„Ÿ@8-¤N„Ÿµˆ?$Ó8™ÇKpº…t<ƒ N×JX°ÈH©¸Ú'äžÕj! ›•ÌÀžHo©Ñ9‘Q­XQL¢®B•Œñgw£ÁL`8ÇèüÆø&oO¹ &@… \ÍÙi˜Á‚ ‹‰Zr°¡84±ÅuÔ”4˜©cÿ.f;‹¥STŽ„tÐò£8jA]‡œÕ½G†ÝB6T| ‹É&¦2å $HüE`“ Pÿð™!ɶ"² Uq.âý™Ð«¦)òšú=¦ØBà'w^ªpšZ1¡YM†ØkħW¡¦*+µ1Œ1c¤1Žn'Œ{êRËêXŒËÊvˆIT°R?½|G8µw@EJÓlÆíÜj3$´Ãu7A”Ä+œÄ †ˆåu´PD 61˜Å„Qg¡¢˜ìîµÎ·/ÿx[_bø„bfp¡ 6Ã]˜0"£¢1³( ¼CfOŸ*†¯šðDGƒ›¡‰ÙøJ# ÜÇœ‰ö'1bÀ©ÞrèÕÁ"ÀÅR¨Gû~šD!r?˜b0oº”÷´Ù¢<+*ƒ†í<´*bAŒ0"ã ³‚gùüu+T¥Pýa­Ä$Zv$@"ƒCdÍŒd€BpT€¸Ë Ì#;q%MLtòÒÔ†áX9E4“Š`cÝ C0s‚Ó˜OáHâä:BLyŒf—8LLRjÆGQ*&f+:[´â„”À¬v-BS £61‰÷¬(lÏGCˆuŠ:ÂÔnG¡” AŸ‘ &rVä6Á…T¦`'ª¥k H…gáh”G”zm½[1/§>büR¡ABT,UÃ8ÕRõ ;‹•³P‡.ÃânŒƒ IŒ“e*‰¶PˆÜHŠÐa6bŽ7S($ÉX‚0zqLŠAå~TÇÖ£Ö9•ȤSÔ0LÅPîˆ `nB§ ½l@ÂHáQ”Õ ¢7 sd&!GñÊÞÂH¤†ZÅ€‚'üR¶+f?â쑊Y˜ÇêS×4˜7Á A”R‹`n‚ng¬7gâTbju"83R…´¥!//˜Ý=„p´íc<1¤@…/ÐA(Å9ÐhÆSR«Aˆ˜!ºK`B1Á 4)Eή Ò‰ Y0Ì¥j ÙÞL"/ €ˆW(2–PN *ƒB1qB4¡K¾&s§œðE"ýöµB¨ÂaÁ:¨êE($£T½ I‚ A„j¥^'åýz: C²$)UæÀ‡ä—Áv €{ ¨†'"“˜ †Ë!žá&çâdŒá€a¦ |!· ªDŒ˜ˆ¯Ö`Ö@âÒ¦§Œ AAR¢3S#2+]ç]Cw"Qea3†çš6<Å aiŠ`gïH#E)Ì Æ`E!àFqr¬ 60P¼C0ùˆ UÔ´ce€ë¯‰»ƒòÀÞAj®‚å Ø¢+:¯‹ ›Ç™)ÉN|˜„;Q(…Tþ-M÷+iIÏä,Äk¿—ù<ž‹ö]|² ªF@¢BK@Ag0Ñaày¬N<ßBn$aL aƒ8W ëkMww*JJÉL' ®ýŒgDÄÌäöÕôá¾øå ‚šw4Vâd ÷¢•ª&[0Ôip¤£Ò°²CÝÈY«…¯Ü2FAÈ‘L×ÀO'YíéömåT/bˆ¦aЫ%‰çªÓ„¢Ê¥"V¢ñËS¸¤e,$]ÀB¼ªÀŽѽAÇZ¬ /ˆ'Ê^ΘŒ1Å D+-s›XÆ_ÕâívxHô‚ëëÍó¨ee1dV’4´ÖL;®–«eNyN¼&ÁNtEáT’¥8âhjìù´ñ¬_K7º¦j&'½<¶5Ëd"›"'!Ëô'ad»›ÖT± š&`•bíå­ŸNˆ‰óOz‚8¢àD‡ƒÌp!r1„„ù ðJ )`–Ú‡Ò*Œ8S¾‘ûÅ*¸¬6¥hx‹\¥”[½ OjPJëø”«¼Uõ™lÎ1 #9ÂKÂlžWœIRT C Ež,•8ÙZhý¶zÃÎ1T® ý›#,¤å\›3Í•çP‰†öY—ëò>ÔëRžïl ò)EIÛþà]à +OqõB2¸AÆʳÃÂÄ:ôKR|­ÊÀå"°¬úªL¡ENW6ñeîákI ¶—6ëŽâ1|Åx‘ÿiˆ~{w4Â/8ÎÓ`ß*SSŽB%Ž!’L9k´Ì·È-\–=%PŽŒ} 2Ú¥»qÝݼˆìÖaº¹t0μ=[ÆSÆ“iKÞ¥w]·/BêÉ q äêƒ ˆX bš/Åö¥vÜõG9U(ü¡Ô$fc”æÞ죽:нÞü•z&mïGü¥¸ö±*O;;އ(Yý%°¡‚Z¦*Ì`¤[9™Ë¶-Ë“×϶¦!È8§"hÍão•É”K [ Ü‚]©ìñ¬=FZ>iÞ¸§»Ãri-„$‚ŒºBtÐÑ„²'TC”«"h? ÉÿB4AS°aü…ŽZ$‡4Éu Cí?ð÷ò —ñÐÈw,«í· Z +mF%iôN±XRTÌ/à(f&Îâ[ü#Š0‚¡‚úo–’jÿ+Ô˜{hʘr›I(ôT0^:ø•ÊZ3°¾•a–ºª"Ã+2ù%óñžt·×ÆêhCÙ¶,³ðÃŒ)…rÐ@PcÎë)VhH°‘~l’‚å»ñlS'´¯3Î0`éOÈäºÑkQ"Èl¸²662¤Cç­+M[ìLy1)Qde… (1øI_`QB¡9ö²W˜Ò‘¨×¤Ô±ò4Oèþ[‚–r{a]¹Ò5Ž—8É|¾ÿEÕ]e«ÚüùÎ…!/¶ÌY–ï]V—½e 㯽zó1iÀCšwL–b˜2úÞi¢Ò†á©ámÉ9eIXû2A‚¢£ÈfÕ½|Û4û…å«{%XÊbq¹mG•˜þlsXÅ9F.‰ÑÇãç.âŠG`¦2ýýŸÒŸ­[V˽ÍZ$ŠÇz ÔY\IV-¶ˆ§A:²Xk¤‚ÉdéWTŽØ/töíÞÔ&a²@àÁž©Ê• !/)ˆÓ¥‰%#Í$’kŒYÍŸ^ª¸e ¥Wjs’+2Sö´ù Õ{„¹‰W‘ëÓÓ_%')qs”ÀqFq2QX¼@ é¬ÈBñÎÆÑØcûfͳ}¦’j“¹ ? aÈQŒÅ{z0)ÔqkÃb1óóØŠåâ&-jžAIM—ÂXþ\SE8tãßpFTHu%ZµÐuÐB/Ãlm&}þ“ný¾jdrŽÆ:pyFw«M…“Ï–‚uÓÑkeÁÄ™îä²w¶Ñ¤.gÜRNÔ{¥Çdg©«¢‰´y¬ §°ÞO±ª¯Ÿõo|•ó0báõÉF1M¥µ×}e+'Ô¼¸q$JIÈb®PJ§Ì^&vù´Ô¹n N“ˆP-„Z´0På.­Šƒ)Üo %¢RY¸´Q»{ØINáê2C1YåYI¶Ó[DÙKª‰åÂêÐßGÝÚpÓѤmy„2ÂŒ…’F º08Vv"×ÉgAqD0š’øI>l$¿_ÒùÞÊa¾b•„!ÆGMzí5¶”nBöâlÃJK®PÄ¿„ãíø–£Ü¤Él·˜ÆC)An©;HçF£B{ÍòÄÏ­ Ÿ´>üävE(ÁQé‘ÁÅ’AþK|ñw§’Ye² êÕ¢_…˜ÿO_¦èE•X#p¡b)ÃÉ\¶öû´ä1Ö¹ZT„.?ù²ŠiÍ)©Ì¢j{¢VÌ¿­g=s‹¶-JâRtÕo˜ª3ZPÚ5»(»K|•ªÃ3yMép¦æ¥8„¢t“aê}¤¸5쳞‹Ã.g(§TKm—ºÎͬÙý´.Dq,ýËV;cd[Úœ„¸Ò¬G¨aD{ß² 1E¤*Å…tã!ãü™\ï×[“$3‘²ª’(CCL?Ùëbn­ë¥ùäiÕ(éÙ}t÷®ÕÌr°Ã€˜Eôƒ.q]¥b „¡œvüšÁ(Z¹zY¦ŸK2$„Ž’¨BaÐ9WAësÖoÝÔÿ–IkjЪTÄïü+ ä;NLjS¿ŽÄ¿áðø+übþxÿm­ÛLò9üë¢[ô!“1Ä ÄQ (8NÍFóÖ<'2„ßU#³)ŒÏ:"€€È yJh04ƒ@MŠ Žv. ´¶$èݵús³d`9V\ Q+—˜3FQ¸uåÑŸÖ(Jsß+µðØäΉ†)8 ƒZÎl¦|Á¬´xdqŠqÃJ2¡›™³ëùóÔR v7WÝ,CBzt¦Á™—þ Æaˆ0Œ˜‚ aÔŒ\Êwè’Áò¿<”˜œJå´ê‡@J ˜]65x†" ¥¨N2Db˜‹LR:„ê(ÐŽ7`^ÅDíȲQJF!‚N!‹•5@AŽ`’¥xŠs4ÊJì…`FE‹TänFZübÖ)LU0cÂþ#ÆL’ˆº¯f1pˆ˜ŠÀœ`‰…DäÈÉ‚™œÒü”8Bœ@âÇ u`%'ÐÊÅ`”hA, a2õŒ®£Ó—õ9±" ™Kˆ B+0jh|!…2T D2Ã)Žðvè)Xq] ˜ŒœÚ ßwÚ`Ñœ¡Xÿ4)* ŽJˆ N"4)#A‚1é1 Á1(ÏmÛò”T'*ǽW&Á ´sç›"‰ jíÌ&0b¸"& à'5…â£ió¡‹Š°wP§°ÇÔ£ÁÁ’´Àcòeãd Šñ©üZ*tG¥è”È-ⳡsÚ§H”1B3™ë0Vã‘B f9)HB„`mŒ¬a„¸ƒA@f—PÅc6¬ã¼wq¯ÅCáj¨p¤v‚'8“`Ýœ¬a8®áDR3 Ñ/G5c”I&”)Ä+(^ò˜Î2(hbq¸Dè³I†æ8ÉyuËE¹Ó‘n:a‹¼E€Ñœ©¢ oÂÐÄxéÑY5Z¤†Ì‘#ZyFA ưQ«ˆDB¨Q ¡A+‰Ã q^ª¥k˜£-U®)‡A;©™™‡`ˈØ!`KزgEâm'-,(å8‡#RŒ›Œ˜5Dn5æ% ÜL!†ìcž%hm~+¥§\Ó‰hAP¡qf:+• Žbæüœˆ´Ja>k’vdpf2Œ¤2F¢,¨Ùˆ¤cîÎй r&r T *RÇ,rN+Cà wÑ’‘ ˜ÃL¡áÆBòšÐ¬TŠn8W#Á39²ðÄæCQcJv&(NA±ˆÎý×tßx3ä†Da! …Ä(‹‹Zæè)¬,èŸW|b5vŸÇJÄ0›ˆB) áèªFz¸ž³Gw m™]¼à÷ôo4b$cÔÌGq ¹$ŒªïÛ$Œ±ƒ£—Ï4ñBÑhœÂa“R3“››¦Mã1ÎÔâNÖ;QHsÁYÃÓF]KTƒ§®Â’”Æz7/†D4a•00©B ¼3¥b`A8M=©Â„¶¦$nª¤“к„Uì‚ÜV …á9)£ LˆÃDV$¤"±Ž…,"°¹UF:¡ùŬPÂÁbá¡0Ê!ÐeŒÜØ^l›‘aUAh±Ça®ØAAŠ(‰ø £¹•áJÇFî5A¡i˜ä JXÎbDaƒ4 @j@$~î‰\"À¤äµËÑn!Ñ9 ]²¥G ÂòöȤ™3,F"âp‘ˆuœ\Íü$Ct:w³Šb_$±dfbë ÙÊ*(ˆ!”VÞ£4NÓŒç„:W' &PL›±g8Ž‘ž­˜«$!s’у #Á o«eC œÚãA ÚA¨A…J¬fÇŽH'®ã¸Aœ3h™Š\œåé†ë–ÛÆ`éD ˜j1JJ4âˆÐ-ˆŽŠEœá VÇZ[ÝOdÆf˜B—Tâ)P¤ š‘Zî+t´ø¯ònK©i6FuÃçäGt¾ŽÊÈ5jÎQHœ›¿ªÞcy2œb"4‚¢Y“ôS:ŸQÄE±[Üg+5L¸Q(Ï-|Ld9–LÌutâgŠjªWÄÿ7Y]+ª©´³³NQ6¢ÝˆÝö•Kis[Ædc^äj'yùT›Ì¶Ây dÖˆb!ëÆÕDº›‰½ØvôȨŠG>£z¿¶úYѾ„z‰úÍO.PѬ„ýþ]± ¨; ú’1 ;²eeD:»XÈ-TBÝHW9-£È Ë% •¡P†\KÓ(á}» j«v'ñ$Fu©”ì¸Ù¡‰¼sU${U¿=„Gø…ÕVBône‡bcÄ­•»|”Ià€"Ç™5!Äcü GmHÙ+CœˆôÜìÐE¡dêå‹ÄÍC´@CÓ!rƒ1®T Äp$ó˜ Ë“D¨qÂóÙ_áthD^s0$d„©ÝÔŽ(EPÂ2 -6銪 BâÕ¬àœìB 2“+˜Æ¥Wý\Τ!ŒeÓ‚–ˆÁ€£Ði†r+áœ5„1©1ã+¬ÂÕìLF8ÔEãN©¶Ä^à ÝÃ$+ 1Ñ\ðÐØ„¬ .—åG;è¼Ü$&3ª¾p†@#SùÇ.☴±â%0a}€e2Š „?¢%ÒãE d>l¹Ä‚‹GF[» ÔÅbˆ„vä{¹’6ß)˜Â‘+œþ&6*˜²ÚÛR=i¥6ž´‘µ .f©ˆŠûK”¾9Bˆb¾YC˜ÿ¢‘S A u-wxå_'u³k¼?`Î* –ì!Hª¶³Öûvf=wr©.Q̶jñŠK*H*\¡}3–ÖlôÖÂa‡K¾’æÌoû•+h™AÁŠòÉÞQ kò!I¾Õ!UÜŒk~cÚ¯J`ŠVòetMC]\~’lÌã¶nšß¬‡©¨’‹åñ¢¾aŒfk¿±1p¥3˜„MõĪnå:›»ÇVNUo/$áÛHž¡9)e]&ÓNžb‘Ø›¤#qÈb—Û¨d¶ýjÙ¯ ¬ÜFª¢ñìrß_lR)vK½˜®„*ár^n$9P‹ˆÙS,f;±tßþ¬#×’×2:­DfÙg­ÉÅ&Pû61ÿøÉˆ;‚Lþýšü†úíù÷Gõø´#D"0ŸµkXì| fcxŒw1Ø‘»¤:I?ÒQR—)‚ =+ΉR~ýUÔ©ó ôôÕR..»_ùUÐÎ\éQðŪ|è0̨YμòYä¯uëÆs*Óåô,å3_,9›ÜR ~è{nôºˆ´ÿLûUJA.±Q3¢³°€„¶êqéøÝè)Dg±PA{±žõ-$ÝÓ-2’•T `+¿)ÅNR1ïF‚£”fÚ«u¯˜[äÒ[_™Ê0UÎöê*rR“-þß›…&ö•ÍùÃWªÞÅËí’–äÅ”aPlاgÿÌt#±H0«¤I‡Ÿ”§g¾O\-”®úV”"NÅPs"\@ÜÔÐÛ_ÓɶÎ-,Ø9N˵d±1†jR]ê/ÄqLû8£wá8²ÓDWbe1„êò‘qnø†u͈‚&çÔ¥­ôë^O'rD^zQÕíŠems)]¨˜rJCe®±+´c›}id)Q(Ü+úåDŽ˜&1Ò’ÚÈ_¥æ "<Ø…)‰äCŠv¥(¤7ñsµ}eít:ˆA«›ÿ»Y-I="”ÄaL·Ó¹‹Ä©ýZf)ãæçYÇá¸ñí[}³Ìª…sS%QbyJêä*ù©¤Ì.‰¢b&™…2J%K67»¿÷. ]4Ì1 ®£õ‚iuÏ"Ø¢7¦±Q·áó0a%¯éÚ›é™)Ah`ˆ;eAŽ„®IKÖ]S[öâ¬çyQµätâµØ²On™‘+(FUÈáªU)ñ°ÕLŸêÇZ8Ã7%ÓhJµ“shT*ú;%”þ:-0Åj‹ÄUB£)=kÔ§;JaÔŽÎA,®wfêòÕ<šW6}ý¥=DBuv¡DÆãl«Kga¯íOt¸Þr­öÆ!Þ§wÎðòkñ­·5Dí¦Tƒ¥Ëè|·ÑK[¢_]цA± ´3LþRTÔv"PŒq 3¡ "W‡Æ¥þýßVLÄ+;œªÔ1*\ÎÊ’aj‰^BR· ¤™ˆ½½ÜEDûÄ×®ª-Q,rŠJ`ƒ0Y4©*å’Šé›!1m”¹*Jõ¹î6‘ЄŽE1†IÔWA²ÏsËC×£R¢m°ê„ÆLÂшͨ)¯-1®ïE(ä\áÅE²ibWP„U}ÁŠòÌNÜ]¡Ië—&DlMAUõN+p†_²Ý0¦m]?ßwøS5'.[r•uÇÞB£ÔÙ-LïûsJ!$_!HT ã%Jœ™˜‘5Eêu…¶úVJ0#çøÄ*¼„0©#¨”¾ªñi­LG £°SØ÷ôn6 'Okm‰g CeC.]Ù³]jÖ!PŽcŒaÍ™îÕ¦‘þ’Ðn¦/¦5 r2&L„*°ëéμMÉ/×V‹R¥"¯Wö)vÕÛäɬêFÃ**•5•‘(dM¹Ê´QY·ÛzêQ§‰Ò ‰6v\DfÄRŒU„CÓjcß+‘e–”Å«•:"w&&Y¬Ý[r⪲1˜ù!CµNÏ<»aÏ”×F³®®Ñ¹´¹t¹‚:9RìÈ´.¸œiÄ—lD"ø¦ýÊwÙÑV€‰J * «Ëd9U\¾¤%þž\ÜZáÓG°ŽA‡ÈA .–ÈL«Óõ”ÖûtÄg6!‘jÈ ÌrÊw`•Â)þ{¥Ô8¤BÝ,ûŽYãu%­xÈi„W0«*)V×Êë+9D¥p‚!7ÆZ ä5>]~¢RÄÔFYˆ!G+;ÔÄMå·qµ(”)W(²ªVÉ;É.áäyIºl"q’‡qð¥d«fÑ©Œ†2ñ–þImZoá8©çR¨b")ÎIƒaíÑ_­½yþÕzñnu{8Â:‘ËÍŒkâ äËâ¨/ŒUD¸¹õ*nu(Іo:÷WêªA½½ªª2"§VØÅwhâ!SœéNÞÅ»;³›&±™gYSDreˆR v«_ðÚoòut„í>ÙÐæ+œè ‚Y/çr§Ìc[„šZM[•i]”c¨…q~-û~´o$™’PWqä'•´Kþl¶Ý±ºÚkª3 â-X‹B:;ÌÌÔ1ŠSˆíê)Ñï7¯R’ð”‰üˆFÙÕFG*úók¡Ü&ËHfË­Ì¥=I¥Bª&ëÓ«cT¿l¡HŽA+¦¹LÛzy(@ÌTJ»‘…Éy«±o‰µâbuª%…b)ÃåΙÑ-‚æ ¼%׎]ZïÌQÍ¢]j‘0µ~ú—SGõ’ɪeKbßFô‘“Ô#,£[ªËk˜˜i.od¡Ýˆ7ö”CØõge³¯(¸M«(ˆLryVb‡$¨‚£’„æúcæÉÏÝ{g%œ¾”9Ê!9™•ù¶¦¶[ -¿íßQPëk ¤tª1pÌ!²Iço7ÎEE9c%ÕÌë™Y)Ñ­]¸¹%²£ŒR”‰IiúU±n(E0VQÅmÜDž•ú|•Ä»å1Lg_AT‹úT1E_ÿãñlÛÏeòPº3Õk‹¤Cá*Üjæâ*³X)w eî¥Ê®â”21–;¹~˜³lô¥)؞͜ÎË)Ld!ŒW(C*_9;ïÇî¦6xÖ%ªYŽWE/Õ3±q)¯Ò¤\ AÐËZøô̤,‹äEmDÒÏo$¡?ÞB-‹QS”úªdÖÓQnÇLw«fW•ˆ™”ëS¬Î*+;È÷QS©KU<Öבs°½tjžQUZCŒvq„;¹ÞÙÒÒ»?Öc&SŽÉ⪪åîQXûûU§âJG¢lUäæ2 ‰ù¢Ëô•˜”æKQÔc“ãaÞò½ å s9Ô…+kïâmë%swU–µYÛ×"Wlt™†|mì²\û1ÓSTËf)QÕLÊW?'âáÓUÌdòÑ)…î*¬Ì8b•Ô`‡5äÇ,¸ûô¦N>rª+©(öqNdå¡Oýsdß'‘‘Ä#2nãa¶™õçi܇1ÆF(Ï¢m7vØÈ+xÊ…f-;önI(j*ÕRb/„ôò.DK&”Ž×”ê"¶}výœ¦*Å0…Bè¹J"}¬¾ÛûíL>Éù•ÌBºû¨@¢†)iΚ_“w”BqóÙÖ­VQÄÑf£Ñ¤ÛHÚý—«¢ò„dõõ š4·µž£KÄJ[Š9˜ÏŸßFÆM!ÑÄ0® À ` ܶTo@Vƒó¥B{î]óFùÀÍ™ÉÞ+Š’QŽ1IòZƒ©‰·°¦ ‚Wò£¸…–[ÊB*R,¡ La…2¨ì¯5¢íDR‚c1¥q:g¹«b¡‹Ea]ˆmÄ¢¦ôÆGøúÆ9×+q†’ÏßG½:Ʋڳˆ*‘³,Ë´ª¹\¥:çÏý)„VŠznÿ#"_{pص7:O¦u¦qSs:éÜJrØ„jÇ_#*e=˜b$»D’•¬Pc²É.ç0Õ·N(…9°«»9TÚ÷^ûW¬òvç˜éâÄ\Òz>H…¶Z)HúŸGÌÏÂUUˆŒæÙ»öú=IV_¯±ŒWýÆòxÌÉ辳J:¨†ÿ-rèUÓv#Rº”ÆW¦ûË´!O¾½r>ÒŠC- Ž BYuÇmJÓȪèáV®ùÛâ…ÑèÜ̉I(†ëZò!—Êî"ãÞÂÓ¤îì&ï³]¯ï—|ŪÄB{Q½“ûçr”ùWŠc=øä ïKw‡déù†)²^AŽSÝl¸Ô—åC!–¨bô´îW#sNKiöŒûõÃ&•|Õe\z{:.ÊÄäê—J˜­#“(¤qÉDVÎZ!â‘<ê…·¶¤Èß©ÿ‰E»lz¹2C`ÌQ̈ä#3Ó+–d\›S³‰Ç$ÈÝoªâîb8Ïøž¨§î¼Â¾•X޹Y©bß•f3µÚ§æYÜÉJÒ…EV$„ ½l3J†t3LVZb¡éM·¦É~°„©Â×i²ýë’ˆ2°»¢Y=8Â(R´Ž!’È„p®¨êoVýë)s$|ŰZ îH0‡(J1¤0@›sÕM”QMröD눞ÄDåó˜Â‹©ÁÃb•¡(;„¬DW>t‚Ø72Ž©FjCdPôÌB „0ܯÔÀžA³u TŒ(©‚Sº œê¡Ê¼Ì@# Í´f Fñ+™mÿøÉˆ<—Lu¨ ] D ô"ì6.ÿÀëçü°fÆšŸ¥½¢Q3›ˆ”Ü©ªyV¤o,„|Ý_ºù´MMÄt²–#Î…"óçÉ´Åù+Z”®Æ*ò6e¶ÍÚë§8+/8ŽM&Ô²ðø$¿ž"v©Û×Eb*ÑL·S†(˲yŒ)?¿zJîbÕðŠ×e²x˜%;zØ&®(Š) Žu]"õþеjYD9 )¨rv bZÕÊ{n„¡ßHAh¿Ì…jŒ~Ú7·Ñ;>—z±:Îa‹¸M’Í”ކQ d%´¨o‰5­¸õNs sTÔBnn3ÛøªŒâ„fDäGKû}W–‹ô_;çâš_÷ú„§Z…IÝ•œ›$ôZ¹9ì9ÄJ)• ÚkËgÅ-H3™Øcc»&Q꽸½¯k‘OæÊ•lôG0Ž.úܬáj« Çaˆ„j3pƒªŽß§b¡‚`Ó^JÇ…U+‰v1€‚F0¦˜jeNrŒ¶˜¢JkÝ,WrÍ„T®÷µËŒ‹ïPß¡èS*Q\ŽùP1à˜`B„8µÁTµ„`‘ƒ 1\:jGŠG;^\ä¼¾!Œ£¹…„B‘÷Âñ 1r£ÁȆ0Æ1$ÈÌt¤_ Æè 0ŒisƒÅâÇ%* 0Œ @„Ã"fï)ŒyV»9í"˜|íΗF'!ŽƒÔr§eÝDy› Ä (EDÏYñS±ÌÃpjfàê^vyÄs*&è©©JӊÜAQ›¡ 0Мå¢vǰâœR:#·„¨F D„BF!ô¸¶Û^d!™´W)ÜVN>ž“ŒÀÈ Ê#„ªDÙÐl„Îhd÷ _²êEˆŒìŠLt*„ÜXÏ„)Š2äPЂ;VDæ7lL”¡‹ìøÑ°´ˆabÕÖRŒ…1FIKjêæp“¥oÅZÖvVÝ"f¡*.%ˆœ"¥±²“ÁVMü°‰ç”–r)!(Ÿ7Ý:m2NŒg!YJ0â ï8ŽbXÓñ ¢ #Vn‡øAÆX"2|HÕb̺¾kŒ©œ›g'r-Äìdœ˜£!Ñû…bTDÙm"ù㜨¢®„ùLE÷!Û6¢=Ó¡:B ×.ò‹•ª ¹ Uý3²h7Ï{H¢EšÕDDj$T,S9tKQ )”]–©…øÎS³ÜCt)LQ¹DàØszJD5sŒæ,h‡1LcgDkt.ô·%2Â"'“Ác“'è´ yHU+ŒSB$ê2hÉI$"mD(ˆTÊÅÿ¢"–¡„8E¦;XaÔšÏXH"™Q™ŽB(‡74K߉ÕÅ2[Ú7O¾´ÇûÞ†GWâ)µ\†ÜR1¸ÍU\gt]~vQ¼Ž&9 ½BYW’uϳ܅æk#2£·£å¸NâPG§½Hg²µ ÊiÝ´%Qª÷&­hAy"vкٛZ]kbHÝf‘pˆwÿC-74­ÈEÚ'Ñ\Éu%‹„5 ê–#(¢ŠúB KlÔ–hH•X¹a—^Σ=IN·û{«²÷E‘ÏìÂ!‰†É*:QIï·ü‘i\yYÇW£¥gzŽýEœRsóÐÛ˜L¬ZD©QŠVó¹7V~¤¨_QŠAˆ +œ´|S“Ö”õMYñmX“d‡ ó_ÎT·3Џëã¡0¾e4ÉVlî«Öö[ ÜN¢nû×é»iµ5VˆFD‘Et‘&nv•œy&úÞh4´8v¿Ä+¹Gᇠð”c5ªŸ‡Ó¾åÕðKNûVøâÁ…bÓ²Ÿ6ÏYám&Æ(‡(€ÉgDÛnöf«Ñœ…®’Eò²‘Lwå¨í8ÆÒÔþOÃñó[$åRrd›ò+1Ýf0Å‹iÁÜY'ǵ6Y/ŠqˆHÂ0ît %o O± '†  (†'ó#$µ­˜\«Uét¢ÖÚ]HXi<8RÂRÁŒÌ˜l™n2¹âNám‚…%sX\ÚŸ7yòZéE'çYj.S]̤œNÁŽÂuj˜Kɉä6F,ûOÎlY4™¬ª·T‰~­Z˜e1B 1N@Ñj†–.ž‘þ± ±c€Ë6‚2g¦ÔG¡+bHÞ¤²T«ÛŒ/.[J.Nª] Rnï5¡5k\Æa‚ @§f®`f:U1!¥¬pv¬öÃF– =% §ŸB…9žcŒaQDKFÜøðkHAî1Ъ§qN¢,òu‚Ièô´^¡VÚ‡ºDî´ZONÂkíz’7჌ r%¯9í“"ߊuÎÖA©KÍF9¯,‚Œü± ŸÕE!l¾ÏV”„²j®S Ô5\Q¸ê¤®&ikLf©\¢”S"*3ê`]íúÛeËüʾ',¿»"‰áVÛƒ†~ŽÅ/2Òc… Gj°„ISJLD !!9ã8Ey)Jz¥1 Ú”a)CÉ[þ‚ "í¥ûÛöÌÇ%ø¹)¶C”R¦Yû,öb­OÂ^-1a.­^ËeKŒç"‰µÆÔOÄ;==æ"‰ùºÆÂ]ìR°¯ÜåGÄ(Å!SFò¼‹B‹B[S^—U¡)_ý*ï é¼ÉÕ®Ñ)RHÄÊ%…~*~- Êõe˨œ8îd#e7öny¤Çfá±A[øeqx('$;Þ n*?"ˆå¥ ˜GÚ¨Ô!Î"q˜Äœ¢ôU½H¦6•[®îxPž,ˆ`†fL˜GYÃAâ0!1ȧð‘™½½:D4Šs¡kFWVœ„…º•1Ű¯Dí°#¤Ct‚œ#26C „[H2äÄÕ¡ZçP)H³ýªÐΩJ‡ ™Fê7a‹fdâ @)Ü# ÆuÅÃ)aøª~90Ân2¯×¿T˜BAÌ¡ ›91Â…ÈQ¶&Q™@¬‚Ì7W’ODt`“•¢¢?ƺ9‘8qx(£3dŽdc  H¨\Á¸¦4ÄCR,êd#‘à·ª”Ê D^·˜>8áÖÈÛô'#þÇBC bmÄzcÔíH؆USíϱq¯"ã:Lëõó) †%%P¨€¢³¬"zؤŠÂÄF ”HOéUFÈÈ9©&Ž,Ì)¡’q50òµÃfa«R£ fFVær?ÇÞÝ$‹bÚ˜sÞ‡Ý*’•Ñ na¯ã–çcäÙHcJäTªƒ±•ŒJŽ0»F.w„1‰³¬*¡Õ*„ÌW,-¤ôŽ‚7dìÔ‰ù_:X×i-·¯±÷ÍšRRDÀaIjBb#p51Ý¡iÅ8‘ á QÔ¢‘jd)çAPG™`ÓÝ'rB!€ƒPc)=[zš6he"òuO…:-ˆFñ–A”ÖqŽÙŒ)¬g¨gðß"Á•##ÆòiQÈ&D>r™Ù¿Õº§| Ô[Û9) ÜN,÷©) 11IØÂ‘H£R c„œ‚š)ám訵xý|‘§JbÆ!zh 2fÌr"^bKªËa8ÉXE|î+£î‰BDa H9:²Q< t¸ÿ"°LÄ/B–ˆ.&V”ܨnD¤¸&b†|Ï‚Bƒ@ñÝ#C ŒaÜŽpŽ"$Mñˆ0ƒÁ.¥#©­Þ“v!dêyT³‚Álz„_TSR’Ë`E”F¢%l"$'È¢ ÌĬ¹| r’Ä©\ÅVÐÔÊQ›²!r¢40"FÜ*Â#x5.`æÅËÂ97˜„,72fˆAÑ7L¼=ÕÌnBb+ §£-Š Â1 ÑÒ§Bf“(!Š1?§z:`J:óœZ©v­ã•qP Aq°2t1˜f6ˆwÖ™ ‚ª¢Šª(ˆØæÄ2šÎÖˆˆM£”¬0©DÕX4Ñc&h^'<­ñˆRä|‚Vr ‹ ʌוOGÇq†@‚^8(@+…ÐÀÉ´8*˜‡W!—Å(Fw§¢èê#bûsbîöO/nž}7a$ûU5±üèˆD‚*è‡#2#g72#! BïQú[}Så0œTn[â‘fuü…äEã·jyQ[—7ò©„Ê#Pû#]ÞZµŒÄ©$EÝ”D³gg¹ ì™”åâ–›B[ÖŽi8ªÚ…uÄÊüaUuy ÉûP¤rÖ—#$•³ã_º)k4}VY­Êb_ARˆe1Sn¦ª‡d©}/Pœ9N¦½ i lüö"c‰bšJbâ&œÁȉ‹"kßÊ®™³ÿl©h¾E#‰JÜ¥<µÅII摊#„æ¨êBWa_ôJ¦DáXæmßÅ?e±œë¥©ÝgZÓB•ÌîÈëÈš›¼ŒPÀ@ÿøÉ¨=>Nèãý"Qÿ—ÿþγ’Ê §{sXçù˜hjNœGÍ[j«pùª&z ¥,u*j¿/¬b„SÆ8Sƒ8«•ƽ`1­…]{YÂÔ'ÀX 4áF–Ä%ËäS€f4@ ¯¹2R}¡úô!‡=ÆÞ#~K%Ûh§ÓIž':•ìŒe (@¨B‡9D\•%ù(|[ØZlý›‰‚qBoàËe•|AGIûAIiJX›Gª/ßUº“¦­ò.¦Œ-„Û*„F˜)’ŠâÚ`A\QœòDÉ¿«‡ýÉb`˜¢rv«ŸZUŒE“ˆú…ÜQŽ)Êš˜âifU øø™*ß‹cWÒÂÕ´âùZ")U•b,§!ß7wר¥wóå¡!o(¯cænQ*~•Ã.“ðú,Sh˜ÊPƒ B¹%þ!²,™4ÕT”YºÃ¨Âyº¬äñ'¯GðoÃìLšB,ÊóC%Å[˜ÖumÉš‚*-ˆ›)RÆ™6KpËA8ú¨uQà …éÓ)&5Eí7ÿ”dв*J^JÔ{ðމ'Ê&’V'sÛ–„ë F°04/‚ƒˆ:ôô¦‡ÅÆjúípÌÂ÷à”n^Õí>`š6ãcPÃÒŠBÄ»wùfè·¢Ž›¼êÅy’Š1A2ƒY­Ÿú”õI™Œ|Ô=Z‹Ùs¦.ìݦݡX·¥ÊV:¦RpÅR£6¬eç @«èZ½0µ—GÊТL‘MëÑ|Ér¼’VÝ5"î½B ‚aµ´ck*×KÝôì) ›æ¢ˆ.—k®†µIÉ•í/ˆÇÄ`‹ç8ƒ 쳓ð—š,ì7 \Òì U'_O”%Ž9kKrÑ׫~{b¤z¿_Tz½î%Â`˜ÇÓkïiÌäñÁÊ8F&8F3¥‰'æ7b5u““3ÃTjÌ<ƒøOŸ’Þ%IC jÍtCuu,U|Z’Ôg&|³†éÏ;6H\äU…0ÓP¡,âŒÔ‰t¦D÷Ï&Ö|IH‘mÁgoõyI-7oÕÃE ç`!@ÆJ(‡+uŲS~íKŸ‘ •©¨_4¬¢/\OrgîÈio„»r„e¢•Ìp™º¶á˜)'ñnõw(³¯éEi-2=BŠ0ŽÚcH¾ZX†\¸†9$O™U…Ó•ž' ÓON{K·ñ±’ìq„gñŒ4T”dBû?¤•8„|m)d(³`Ó0I¤Ç¦|‡"GL(G'yF«@bؾ‘®÷w©Gþ—t^~ÄNŸJò.¥6‰ëƒØ+Ž‹!tùMûô‹ä–Ž- “Ÿ•˜ÕúTzP’¡ A@W ,` TG3‹>·6åK¬jæ¨IiþÿýéùL³ÝOÙZ0•{˜¥”qlÔ 1Ì’Ûs÷Œ bO%{ò£žJÏ’e B(†­€ÀWwk¤Il|¾ž¬žô#ný½ëQe&ÜÒ²0ž§Ã_‹“gæ#AÈŠq)D:­3䬩9ÒQš^똤Ρnöé5 K‰Gáe5QÊ¡1Q‰ú¸d£ñìk˜˜ofM¤‡K+k-t¶m]™nt §Š¼DÁL) mÔºJÌT÷(ñ_ÞÝ„½XÝ&ö[A) a©rŽ·&¹ù‘D'Îj¿mƦԇXÜ×'¿iÿ«Òoè‹ôSúRýFÚ*lO¼'÷Ø%[õ4úö Ôͦ쒩;ØÒ*ŠQ — 8ƒ‘ìa¢QôGÔÂݳ•D¤œÙ·7— ÙÆ_l)+ô4í1d» æU_ϳíÒÉë]"2Ï[¯šœ,‡_Üñy&#¯êE]¨îÜn2rWŒ+njwŸZF£ø„ì”$Íló‡(2ê+ò§­õ™^ÿïÝ_¥ï]{T_A—íÔIY”†-¢@¥ä(•'\S3¡šýKØÙjUéŸÉeöóo šrJò8ä;eÖÕ>e¸U&ÓD&llþ¢­;!54ƒJÔ;ÌP‡=«†ÖFrJÔñ’Ãé5 6uq vöYQÄM¥•JÉ2P¤)Êr2­_Õþ4ˆWIö¹Qº´úý‹F^âç’ÞÄ{ÑwÈÊ`„OFŒò6Îæ)+W¬¹5ÍIÔÆLR;·c¦s˜Ž¡HåPÛºtÉP©C^LJgþU O¢Ý-b`äç’«íâlÇÉW_É„Âˆßæ;Óiá7…)‰¢èÄåÔÖl%*sfõ<¹tA4v£Å|éa‚‰A…|0L…8fAŠ 3ŒAA`…¥‰«³Œó”1 ÃF*EŽ_f<µ-\ÅÒŒX°D "Š0²1¤ \Ï–Š!ÍÄÓˆBÁh¯¶ Gt(…ÞÃ+ãΦ½ŒzÎü_Š àA†Æ1¸Üã¹ †ÑN©ÅB¹Ñej¼Fb2vq5dR/Ð fMƒ0‹"ˆC‰B²,dæHMBò¹K²1y Èâ1TêT‹gq ²!&e'AªˆC(AÈnÃ"P”‹IH„k#`ÆQ‘ûõ0øSô`YŽ3QN©6*5}¡Œ9) I¨i—Žœ†ÜbGSŠ"™ÚJ…¢«Š fMÃ8aÅà`‘•ÿøÉˆ>™Nÿ ™ŽÿÍþTüCùг’=å'¬óXÃ{` †kd£ BšÓ„NÕÚ}òCueç‘›BòM¯QWoÕB$‚ˆáÁŽçµˆDã—ðšˆØvÞdÀ´|¨õwÀ•+Dm}§/ò½ æZ5ŠqÁH¨,c)ÞU%­Å¯u\„j ÞLùl{¯H?K5ÆòçÄ"KHC+t¸þ§±ÖDÖVÆøüQÎÂf{ èÒê³øMGf1WôN^§¾l›)N)I†oJéz¸…>‰jCã,Sg•,ÍR‡Z‘–ÊFFbQETô¼&²:eÌ@‚õoÍN´õÊåïc(W!«[±µXƒô·Œ1Ùú"Êö—û‘žß5²…ÃО1Â% â%ç-È̱±Gu!ìïröažz#•ûô”KäÙ¿y¸ÜÿJ1B1ŠÊ99]ŒL±ç:ŽkŸý½š—'l²2]/ú‘ez)"†H!0¤ŠlÝ™‰vÂíò1®%ý¼‡õ£}BjßÊèR«®E0DëˆÊÕ×#f+&ŽªåË%˜ÕS2³¸ÝÕªÖg)×*sÄhª3²‰QlßÄ÷£#š¢ít_kT’û™Drr£/.Êß]½UlžªˆEÈGæ4äZ B`!QÏ…S«•DñW˜ôÛT²ÄK ¤˜+ L(·4”z½'^ÖNAæü[¢”ÊÔ7RnÉñ¯1<‘7»ÝÎ1ŠÈáW‘Ìa»ÚN”2©ë"Úó*z""a$šáY²Þæâ¥TœÔ\Ó Â #aª‡!6ÒûKtqo!ìòóU‹í®e ƒ ©ær+…+Ýõ*ÝA5½ì^Ĉ.e¨Ì¹‡½%¢DåIîðbB *ˆZÕÃ.žøLú¶Oâ_Yw¸Õ')›s>iÝo[¸V²Ñ¹žr Ä,ˆiS-{P‡{ZƦòzâ[ò‹…o1ŽR0„m¢˜E·ªãÿ×Í‹J6Ñ‘$w³°Rz~⳿ضþÙ‹â)‰îá˜(¥2u:Ü]BoexƬÕ#³KGÉD›IwL"땳=©²°‰Ã7¨â–…Äzu _¦ÓÇãÏ&ÍÌä:…×Å#Ž¥#PJÕ´[2® U˙Ҭõ†ÎKË-ˆŽi‚ ÌñÌî©bXBœAõ¬–d²½3ûÖäº>¼Nˆ!‰Óu<}{2 âëu0AnJ,†U¤¹íçÚH”- }nõ[þ±^!QE(à¡E1-Jˆ!‰üÅ–%,›Ã2¥ªƒ©]ÜÝKо¹›Í²ØlìÆÔq˜g˜ ƒÅ3ªmêjl”¾"¶+N¾ìŠ˜UW Ô·ºHq ïØA __vµ3D.á3q«rí3 ïö¨¼Ç*ä(•-TYG[Rå=§&]ºJ^tÏ&ˆ¹Äˆ(ƒ„#OTpâsMKÍ¢Ü@…lAL~Äc=¹ˆß&‰EÍZ…ìz¹=ntª9‘Þ®ª}Þ’¶úPkéã4S”¥Ç*YlÊëa%v‘Vè–LÊhÓÒž›™¾ž(â Õ:†â&µëé¡3ØèyÌ”æåO"¸LW¡/ýÙ´µùõT*Œ¥èa€pìóp¢¦šÏj¿áüŒÊ»sP%m4®†žÿ)yšÅa‰+¸êÇ´¤#? ¿nddDtÄ… ¤ö¦ûËB Ï­÷|« £ ƒBÐ(¬¼¡K6ž«·åÿAÚÕ”u¢ÒRçå÷«\Ÿvœgîrˆc­⻪2ßIÝ6y«™¥-¥;ˆzQ\ƒ6S %R…ßÛ÷WœC8ΩO!3ý«+Õšu-–‚uªÓÊLuó(‚`‰(Ry:é‡â}­>Q ”:³¨„!Œ)[ Ù›mžX²ÐÌöì²oˆu8ƒ;§y*‹ˆŒ¦™Ì念Jâ£Ö%ë.òá-A³öæ•L"ÐÙS‘n9L&Žp¤Û¼ŠKNó>ëRý.Ù™«”“ ¸f‘ç]bÙjE1ÓÓÆ•Þßq ±PÏ‚‡%I·‹ø¼4–lÎã©Êul @D’ÛB&ž«ü=ò%Ä-[<]¤6ÍŸøš–N}!ðÔÇGMUÚšÈoÜ(‡ºˆ˜WüQßRÉ·£Ú­@ãuÛPaˆ"­OŽ%/ôò÷+‹”Âê\ìô²Ñwz¤¹<œ‰TÄÚjù„#¹;¹VˆÙÇÃXF0ÝeDU`…)›vߺgÚ a<÷]"z¢Ì_f~ͶW¤k=h²*Ùžsïj«¢¾µ©[­ÓQ©•2Ìò7ðä,«\­Q(C8Ì3Js~fNÃ_qUsHb]éRqQMÞ]ú¿y=IœgdädÙÐ ŽÁØÚ“:"Ý)•£©6ƒ5óWõ‰L¥pJ¸¼Ns¹–îq ’²EnbNáv…©{¹vBXŠTÌm£kQ³N–t¹ˆØÝuoS/Þ¦©UÆ}Ž˜T~‘Ì)ÅOüû,l,J˨ô“aÙÕÇ"•ƒ"®þJ–æêeÉÅ)Ó2«–îXˆþ]=$rXlGþè¸>û­MDn]TŠV²Ù'[»:Ò«0½$œzªoËŒEBJ*N÷\­.Õ9,–âÂ0Š•]TÅ÷µ=mÝM%|˜òîv5®3ñItqÄl5C ËUÚ7õÓÕ*Þ%°M½lË‚RŒ[‘ ”Ìq Þî¡lŒ%wY×ʘŒKáµ/Â`žü‰Û¡ dc•j¬rNJ±W¹Œ¥k&¶mqWlòŒÿÙçëê½mz[äI9ÅrP»¸Ä|Š%ž©J©Xçíé—T!H–›†Ì"×ßë~®›ùOeÉ•S“œ…ôá%ACµÜ†2iw)TWy{%gÆ´M¹Ÿ'½>™Õέ‰û¸q‚ŠÕ*Љ®ËRÓ Cmm†|ÂJ¨G»0¤ˆ›³2òe”A§j i_™*ÒP%2û_ïLG$«Wo#Ùn}“ȼR9‘„j…&_EÆåÌf­éY ‰Ò8õbYt鎩SŠquŽ4F^l˜Ë;ÔO*¤½-f„ý!~—\÷S±]høÙWî"H%Ö®¥#¢u¥ü[ªæsk% ¾¤ÿ⺨‰+!‰d²Ø©¯äoª]¨¼ÉVÎ.as>õ®_‰õk*YqÚ­Uæì/%=wͼ×"˜ÙBÙ®¢ž¯GNg\cÕ7õ“”¸žÜE¨®¨-P‰ôà$H8K€1@ó AûQÉ_Œ_3z˜•}e¹‡l!‡ŠP#@ê ƒ •P!€7Âç4 ÁÍBcAð`Ò¥;ô¦B ‚‚;©ï‚ŒíXÆœdÐ GUåÄô‚Ò’—Ó3”5«z2 W À® Öp´€F¤Œ&¢¹DF3¨O ÿ1´ðµŒæ©ð ³†):*$¢‘FF, Hl@b!œ€kÑH&v º¤Œ¥(|GQR8bsÄCÒ¡ÄÞ8©¶ØF^á# ÇéPÃ4¨Á@,/MV ÆF~ªÑ9d*¹â"sFSœ „d=1ÙDj`¬aeNQ9Ìâ1 |¤x!ݼ/<-Æ+ /èXD"È–%3 ‰6Q4 ½Q„ D/ÆN"‹"‰O‚¾(EˆI‚ÃL±[—r:C`D¤C0¸JJ{ #ª™èA ¨Áx–Œ aš¾òòl%Kè`›‡ˆa¨ªð„-∠"†…¥ÎË:˜såØù»5'è™1(ª—¤`NÜ‚“‰.i—dW^dŒ¸),p€¹X•U_Œ:¦­WÜa¨Ë:e¢ŒD;H”'$ CE{~d‰TÃd UAï(”(w ‚~\5 «äè#\ˆ!"Š!F#È1ÆÎj„~³t»õ;‹\`@k¶Å!h«Ä9qƒ ©Ø‘S֮Ũµš`QÇ"lTŽ\aa„ah'£åRR07;òG’dRÕuv(Ã`IƯÁƒ¢‰”` ….ÀýÞã§Ó¯Å9ÎŒÁñ[ ÉÊ„áh¡ ÈÐà‘§©B`œ@œ½ö  Z³¨Q‚(W„1NRª1:ºú‘C¨‘á‘ͪ¡Q×"™ Y>…ÎNf‚àLÂ’2÷ ²VâÖx|P¢Ð0ÁƒŽjC©“2T1 sˆ3Ã…"+øT놰ХVu¬Êc€Áƒ(€‰B‚1La삉EE¤`ØWs…ðU€PAs‘ +ú±é°`Ï„ã!ΈËwÌÊã *ÝD‚ ‚8‡cÁšÈ„ç$RdÝÖ0&&Ú§Fý‚f£ö Å ”1 ¸ˆF0+šŒ&ë„®Šw‚°‚’(´’QÊá…‰¸n_LAФ jÙUbž˜˜ÈÂdRÐ*‰U‡|¨Øfdqqì㢠‚%BfÄJ1Y¯¼Ö-;7c$g8¥¨6@H¢msS\C!R[Š5cH@މú) °Â™#Ã3î1# _ë\0!„rUw™3ˆ8Usßj‘”'ä.Ê!Zg2„2ŒÄ£hd#£­½;c!0±éö®Ø·hµœ"¡Pš^e¢À'%bHG‹Ž!ŠfSkÐï TÆ×† .ô×&R^K2:úr÷ÔÌÁS/2´ê0q%a EѤ26U.Ša!Md9Xé•Nu>TŠŠ™ºÓ¸c`Ècvª"š! Œ²?Þq˜c O[¨hZ”_éU('(J0§BVF­Û’©°¨D~aLXÉ™B²·HM – Ja¸H5Ò¬¢9‘_G2_-|ñpY<)é"0ƒ æ…e-Äv0 tufã{©KV½²%íIÍèõà ‚SˆÈvk‰„bÂ9·Å×¢ŒVå ûaÿ«SešT'2Á @,°a£)Â:AP³±‹!É.Q²ò 2!š‰FƒD‘±îG'ÜAÆ7ïÊuo€G‹ZaI4 Ä“åTRgbˆ!ˆ½\‡VR¹«ÂS¦ÐÚ1F _Ðd̈Áš`¨å ŠM9…Ì)'6:^„ÌÕbÒ˜º¬dBDP•:|ˆ†3£33ލf760âB°ü¼™Ä‹Ì$B,Y‚3XTÝØ_Á ?n¢WÎÈæàýVŒÄ‡…C1¡‘✉D¡ŠM©†Ø•ìèø_EFì©Ð*ºº¦±‚1 r'ˆè% E¡P/3ÇÊu ÈŸ•…D+Ø`œ€Á[ce@¨^ƒXB¦Xž¡R)œš°R±’‚QÜT3‚:SL 1Cr0™ùWP^§"@&,ðŠ LYGÅa8­6Ä.*f©Œa¨ …³­)¹p¢g Í ó”ƒŠ‚Œkj- #HCq/ó8sºü3 o÷#¬+}º%!‰Ï¤c)3âVÐ!:JÔÓG%NaÑÎ"Q‘ENq%ÃÙJÆ5[‘5g [÷å‰ ˜—Ãr“Ju…#2ˆÔÓ çGÉѯ ƒSø9'·6Ä\Þ–a\•Ʀ`øúòHkLC`d HC¨[fqÓãrKm £Ü¡)¡‹áÚ—Ç1 µf3ˆ!š…Z9Áe/T!„ )Ü<9ÂAµó Îf1ŒPÊ0hñM²×’îPŒbŠPYj¨60 óî$g0¤™“™• ¡ŒÇ1xôÅ5 Ê0«HTÄò ô¬ò A¡ 2”ÎP…49= —Š9üÑTØŽ1ÈD‰AŠ4fKÉ1#rD\™…(²ª³8ÂHEKŒÜºNr*@I(›0Æ“¬ßpˆ‘P¨ d¹Ípy}!áâ¨U20Âò—")ä1˜èCq0QøèËР€ÔHH;@(ã0*ÿ˜Â$@@C1œA`®àŠU)Âd… —¹ÿøÉˆ?žNÉKÿ’þ±ýÊý ü–³’mÒ xtˆÒúH†jK;Å|¿|Û’H䙹Ô®Ã7 Æûa*Kñy­uª˜¤*Y}}jˆ±Xô/TJ“Êï),‰ž,¤Â%2¢HÆ”š¥ü"TbΌī܎V©ðùZgIA¨MM^~£dC è–iI’©Œ"JŽR–‹Þ„«ñ?’ "?½ZÉé&üœY|ìˆBÎ…erB-¥B!‹'VòÐó™µÌÅC9R§ã½‰®²—ÄM9gNB¶å‹ErÈ.ÖÜú­sîkã«æõ-ScvB3UIeÖ&™ëf¬¦ônÊ’UÒùÒ"!L²#Š®ÔÏæÇLïOºÔD:£¥­|v±è—ÿUwIT±ªÒÎâ=U¸ÉÍRÑMræÛJ‚.ˆæYØær£'§;w–§í~ £„ÌxÅgr˜pNKBz(žñ!B 9”Ž’1&1Æ»„ ”(Üü)ž³˜D1ã8mDPD 'ÆŒe,PàÁLFC£%ˆDr{ £SQŠ!Иl†pÉŒ(3›‹ AHÎáIÓòÐ…%v[²±8 c ŒÄL ÈGA(Ì+AH(Þ+ALT.[—8 sQDÜ[Š(% p'_¨Áêºr™ØN™L.65xB‚ËAPèè¤7‡|j REó:]Ž@v犆Ä31PãfK È##õ8OH QX/„¥S`(Ì~!Q{G‰ÁòA„g„èönÄ„š57ÎïØ OU×. $Ïês‘åv£ ¤Ã¶àÁL˜¥øLÈR}¬þŠŽ"hSß*rs N!Bøá‰éHQ˜é1lr3aAŠä‘è‹qÁïP¤;&dÆDÄ^AFdf«Ã’—Ÿñ"gÎD¦æøÿò±DðcöpÉ‚‚P3+J‚ºtUìD2±Éß 9® ¨7À‚¢îBó8AL+8Ï"Ò³áŽL"ÜdÁ „8$DÓˆ¡55¼E¹xÇváX(HØ ÍÞš¨š¢ìš83©†,"ˆÑ." ¸ÆL,Æû›¯â^ĤБ ¤¯‡ øÅO24"µ 0BB£)Pçu9‰HT)BüŒ3¸`û ÅÆäI6މ†*Ì~ÕROÆÛ,ô‚ÓJªØ¥Öô”›•ÕÒ ¦GPqAK<áI$æ´Ò[)•ªHèˆîˆÔG9sÉ”²£n±Rftu.#±Ä[5Ó­#ÊZr_…Ê ú]ÝJˆò2•ùèþN¤0’  Ý_Ž"Ó›Ö=¢y/SQ˜Õ'1å%os\ö&aˆÏä.È£“…[šÌ1T¡ ²ìo[l×­£$ï¦\­Ÿ*ŽË*þf¸—º”SÈdóŽ xØá–þ®õÿ¤ö+5W?¿åEµ EÚFç"ÊïÕôr]TDÅVÏ\ÂëóûËÅש½Ìbó77,ÍB#ˆÀp()`µ 1WoÜ­)ôËaU(Ñg‹ú)'íh•”©¶³°ò˜IƒµÐs "5Öˆ¯ƒYW.×д/sØñŽm¤ô2B•…9!8!ÌY©K.5bS͸½Ú¢RZ?Íw?¶]ÜQ Kû²Œ9Ç/ä›çÛPx p4b|‚¹sà»Ìq©Z.اq†+¹b?˜¤&IJÓg’õ5è³5‹$­WyˆäS ¬V‚)8e¥RìûšýiK"#‹äM=lW/ Ü¹˜Fæ³¾â4ÜBV¨å0C0v.T†M’ƒR~´ŸâØ´'®Bq &ùŒ&ŠoL½b…ïVzÆ b¥§Z¤ˆ×ÃÓVTÅUn­$émƒÏDÔ—ŠÉT µŽ‚±œd%˜GDñ}©’ñŸ/¥ê–wMöͱ«–W=‰ôA’Cti‚ˆc¥|Ä©qJnY0Ýè?ìO)VmÓ·eWV·=”£ìI£`!È…cä¶Ñ¿w°½YŒ(Úõl!ŽZ!Ǹ¥(†|~”Ìvñ ÛÕ•ñÛMãa­Ïrêmíróåϲ¼¦C˜’!J)+asƒdÁ‚ü³V-­Ju^¢–A1ÉU2S*>ÎÔ*JU$+û¹®[¿#©”=¢eö£š½â¯öit„`¡C­¡;TµÐ(1k_¨— § "9ª,£}bY=‚ Š„ïÊwtñ€‡}¦‚äz!]ˆÜu( ³Ò¢/¤Ë ¹‡t¡ù†ãû´Sj­ÏÅÄÛ³<¬êÀPÅqôC’›^ZKJ/LZ¡ý6Úä¹ô‚âÑWЉ¾¾C.‰á)³iR¢ 2Ov½ºòù"gat_}S°Åf3Ì…ê”èó!’RK‚_ŽÝ}‰õ·½=Ù¾JˆN¦­,m¡ÑTƒ†_0éÄt•Øßuõ±KZüÜ–ödV ý9)o¨ÄÕœÎ"Ä ·Ü00¦fÌ[P(áF²jí©/„¿†ÚŹWÝNžG¨JæÈ“ª7e#”öq©úBÈøÓIÚV­Œ¬ú®/ô§ñý°å‘8Yš«JìÑf¨Cà·Gb‚C‰G-"ÛÏoÒ8õ(Ëà u¬ä¡rfû3Móˆ–@Ìj펚úžäíp«’­ E1;8ŸUI –¦9´9Â,·®æÈc%OSKs @8(4¼PT®Ü‘í' ùœT ¦Îµá7a„áæª7Jr pBdƒˆSÇdÁ*A…Ré5M^ï%Kö׌r1¢ÓÑ+3]h(0œ±HÈYÄ·R§‰~¤u°GÏÂc)Âq¹ÍW uÄËçg*J#‘êB“è^ ±BÅ×å/êĉ¿Ígò}žg0†ì’©†Ú*£ :t‘ÆSmZß6„ÚÊ­ê"iK¬º¥d8‡ËXgñÉÕêÄÔ ©roöªÕQåxE¹}Ù­ªÕ¥8ÁâK5xQÈÔòÅÐ@S†@jÒÎmĽqF©jÑŠBÒ‚ãåûP•¢\×c*š”aJôA‰|ñF~™˜‰‚¡Æ§É®qÆo¿V6pr²èñŠ)Ît·ªvù¨.=1ocø¢O]–“SU}K¥ôa 2û’Ñr<! y¼EŦ#¼Býôñ!íáÖœ)H³ÈÄJ= ÆŸªQP0Ø3² +3…›SŒ±S4´X˜ž!k^¦b݈Å;¼ÌïÔ²TUeï©<è||ƒF‹‡Íræ‰*”¥°¦³ÂMuY3Ðå)‚¦c®åO›'MÔ¥¯Ù@´ïêOõçú»üôþ(~ç¿d± AóTÐü·Nvx¶|Èg-p³ð‰ÈžÆ(dfdSœb% Bi ÕW,Y7.sjk«6šKêUõ‰…ak'RY–r±üò-V’}ÅSÚJ”ÖïÍRý¤ã©Y÷¬C®›ÿËgâ•G}V1H”?åøFZcÚçCn°c˜–ý!KÙfêŽQJÚ) ‡$»Ñ—¦DsnRžŽGi(%¬ö¡ ²ª– £ÔaÈlÂŒE£‘”™YzL7jr>`‹nl]·ý*)©+ŠšŒc¨©s²I(F§¦²QÒ¬ž™V§ß‰hŸ£•äyµY:µŸ--pf9/÷( å7ûª½ÈÍ6œ¦V¦x‡Rײ…o6ómD+¢Š§SŸ.â:ۥ꫽ûuäe÷éoÖ¦¶ñÅfS3®¢+ê1˜Éâ p€•„þ‰PQ@¢Tœ(ò‹]ˆ‚˜±æB—0@ƒ Èœn€Üˆ˜„Ü#[‚å(È"‚•Û:r F!EäÏ9e”`ˆè†`…i£¯ 2a§ªN0™ÎpdÜ9o¬B- dâ”0ÌáxºõÁÜG6H¢°+Û…sE!¨MÚ.!ƒAð˜bêá" 7 ðñ ýÍ÷~ŒOd VrÜ'ªrPÀ†%FCbVh JÄb%?ˆa‹9) ”èâ•ÛZVjBÄ¥î+„1“•°BNF#k†…ªfF9hnIOÁ\ªh¢96 †¡|h ´GF›`¢©6Lç8²·ÇêâÈÄÞÌ G&øÉ 貓éÇqJö"b£W¥'e"£œÂÔð Š~#ˆŠJÄ‚…è»U$4âêÓIÂyP@ét%Ó#r¬Ã‰L®Kr 3µ¤½¥4/ÈŽÂ ‘3|X~ù—‘W²¹G‚ ˜Èc†‰˜ûˆGµ›A™©·ZY…#j9Üc–\úˆ~Ç«UÂ'Ì"4F'1•n™#‘’ä_KX\‚ør!ö3Õ†\ß쨙ˆ¤ÆŽBA›Ó„_Q:´v˜–¿rÊÕ¡/3 ð2ÒA­7Ä!IÞÔˆò”½›Rk£JLðAC1'ë!±0„'Ë œPCôZ‡ B©ç#¨ÚXØz—b †¢&b"FS.*‚X%"˜ížg*¢£¯ÁI”Ä2—£T¨ä»„A,26‚H#?üRmœ†?c¡ùÓ2QD2£@æ!\B¼Ÿ=q±,ã „(®„¡àÙC;}“™ò‹„î°TD,ˆ9ÓœEÂ-eÚ9D∙‰É!)1Y·ÄN&TÈ#à M¡%Œ¹&ÿòCÂ©È êš©„*6ÄgLG¸ˆ\ghƘ•¡%“?âC1• "7 \‚ÔªÓ±z-Es¤K‘þä̘!&ŒÖ(Íã%øˆQ:NF67Kz=0ëæ˜Ž˜,)Y;ÆÔ—Õä1 d'ÈÜCX Ä µ+ÇšY8ˆ¬I¹ Óh¢efœÊàŸ±¾^øÒ@¶X£3{1Ù‰ÈÞ^l5ÃGnhâ.[Ä\ÌC—¿B椨#ÙDn&˜5cW1L(ÈaÃk6R·)–˜‚‰qDXs†#%ž”Endt”FˆÅôy°Î„'ÈÃÃãöYá2„eÄAcôSám?&¬&ä¤êJ;”ÌØA#Ž …ƒ^ü’P'©ûpÖ²DK‹‚ûNÁ¿kÈrw!´NÄKL—)2™bQÔGQ#±,†C:D?Aã41´Sº ðoSÁ‹`›ñ72™±)(Ãj1"Aµõ?hA7" ðΦRñÕr¢še Ä>AÊZ)ÄB¤0¤e!%„&„(š6dY± 2å%,-z?uMÍøIïçÑ“@‹PA¦4SŒéN ê~FHô–¦¸âµ „ÝH0¢ˆ.ñDŸ"LÏy‚4dZ­V9ßìÁŒ Dã “Q– PLiI-rx¦ ‡!Ç¥*‘B!Ðl^P¢Ã´ÂsäaBnÅÄBDV¨„ ¤¢@LAI8%zé"¸Ê!ª;va–s+3‰•‘DýX'"’Žzêr†‡ªÕ¨c‹ÕÐØÛ'VêbnÏ„G…™Ñ¹YŠª„ƒA ÐØ´Îä L ÆH5ëĶYBBècg+ÄC-vQUÇä’ -:¾àè3#ˆ!4sškva5ÄB;˜ŒdŒq *ÁXåTb˜‰\b¡ax&ZF¾‡¢ Áˆ›´-^XN<€Ìô§Èdå¸Fh'!œ¬C@Žs)ŠA…¥=@à sQ›Šòp^“ F  |ba$61BçÛ=ôW,TlaŠâÇxJw¸FF‚Jè #Pƒn±ÌCYÍÐØ¥§0sô¡<È!JTAŒ+fBø˜/T19Ö›¡ùW)ùÂz^\ .©PDÌ÷QŠNvÑ(f¢ qÇ-35GAŒc‡-Pµ¨€ 170áôÄ4Æ!† ¶ýŽ:Å0•á*Kt@‰ƒŠQŒÏ¤°Ã2kÉÆäAßàBÃð‹¼-B5f$CêP˜âPʬê$ÛΉÆöôªS¥?7´NL+&Ñ )•´šˆ¶]ÏÕ„&Û‰—ñýª!…|êq:ôܸâ©ÅP«ÜR9·H`®8ŒQÚ²ù¹k×Î))/PM<¿ôTÚbäˆmß÷;+Qäp¢‘Ï´Èìö"f¾j¬e‹ß`…! Ûïæ’÷ò…eÃåj/÷vÜ\¦Re„ÙU¤¾xUámZaIµ“=TÛf:©5„Dë&r !²Í›‡¦;!/d£¯ÔB•©ÔÅ)m²•ªPä'ˆ:!÷®Ò)ˆŸ̼.›–%1tšQ¥ûH„ÓwõšÉ©û©¼ª‰ç2a“Ø„ý•zþ!D[p©3땉bWEo—ªë¨¡X‰v93󤢸‰j uÒmÓe¥jÊšmêQ)MH£–ÿøÉˆ@äNø½÷Xöõ ô{ôAôyõ³’Æ¡rô Úz~”ižGY^„RÎëöèâМ1jBQvdÒ ¤NºSS0´ÙeJ I csÓ±ü‚1¹ºrJ¾÷l¤Y6_’ºlü™ " r˜! ‰ä~Zڹ訞8”F©OqTrŠVÆiËEO\¼ª¸]ZËT»ÇRƤœéøáøJ¬!…,¡NçšÄpQp®ŒÉC=æYs7¼õb­X„.(¾¿í9T8‚4œ) J«¾nሄöm…’qÁM†°‚R$¦³¯¤˜¬Ad ¡\CG–`­¸c‰Ÿ¶4¶V6vȹùΚRmêa¢R^ûb¦=KT®„BØ¢Qu;¼™7ªøò*˜ª›¬öMžÉç!N¦3MgY¶ÒKìok(„“ƒ™kóéÔS wt5’EJЭ*lX¤nÂ.mWißUO³h¿/ÒY.F[$ÊSêlCÏi±ÍJ4­¶Bç8øF2ÍÒ¡¾²NúwAW4mÚè·³ˆSdUüš^‚“—8?Uç~Åû…f”~0Û]8ˆD•pïTQOŽ´*U”#œcŒÑyGZjHÿ>â6繌z5·ýYÆýl¤¦‘éa8”{žb;œìvûŽVºŠø|TÁ$hJØÇZXë©U«-ž¹èZ+’Q€€)$„¡ÁRY–8OíÃöÊWé"VfoôÚ‚7–îŸqHdgk³.’ª~ÎGæ-+}ÆQÈÎ]D.²· Äü ¦ 8áA0¶9QqÈY:nF»S[u3“j&j]«ÏuSI2ÚTÓi^•ºª¸‹vÂaŽ:㟭-ÜrÈ1B˜ó}&çlhùŒæë„2N…)W¢UÙäÅj–2w±JÙ¤d&ÚQMA= ë²>I~ô}²„ˆî¨d˜Ò‘l†p«ËµMÏÔ± 10RÕ0m/å¬õjXÄô §¾rÄžU-0ªù˜ëÝ1 Zۚό”-ŸÛv¹ÈîE:”PPpÃp—‘Æ}/ñϦîy6œ2ÙNùê%ÚßÓÈ5U)T ‚ˆÚh¥íŠÔBrýEz‹¨J›¹Ž‘ê·j(O¥P“´ãº/ÐBJº:вjVŒæ; kß Š©ïFÖãã}™SѸï‚‹øhµ²Séù/.YuX±Kˆ\ŒÅVÞ7b˜œ\‰Œ†AJw£Óøˆ+•oº7bJ©eÁ u/“+Rª5YŒ)‚+ãNQÑu°Ôí2ÿ¼©ØÄŠjÌöJyu‰’m yL±ÅêJõ¬*TŠÚj?*³ªcàš¼––^÷!­Ê†lã#‚Ñޜ¢¦m'ÑäVBj>›û+;-¿¨âc úgº'9ô®`!^nVºŒ3Ü6,ý­¦Ë}Ûµ}uq·o«µfC˜T `37ÈUójJ/u«,«L ®Ô.u<•ÔLój“ùU¦dõEj¹{%¹8A5$§Qp¨V®U,„!No~Ó\Š(ÕsJ„«sIIqgÂ"ìŸÕËØ¶n^õÔ}òYÛέ§©^*øDV ‚”ÄŒ/c¹¤QˆÝ^£×lgÏj·ßEBà¸[5¤6b{ –Lå²Õ‰¹’s,ëj»—Æ¢%Jq›e7­x$Ë[Uî‚Dz6‘ˆ2Ά°Êavõ]7έýgÖ÷E\ÐòjHö¦w—!Ý8‚§Þ¥º®1ÍöO:‘Rº_¾êKõK¼‰‰É©Þ¦†(R´ÜärˆpŸs¨öÙ-Êþ†ˆŸÖš¤æÃç®[h“ pì/,d3Û(Z¨ZŸ9©Íê¹ÑIåÃþ),GªcHÕÅvi–VV¢™GU\£g-:}^÷U­s~©Š¹Í×b ï ®‚l#‘÷½«ÄDÄk1Dªú·*qõ“—›WPASÑ“jÆaž‰âØJ”“.È-Kj ¤ÅB„ⵦ %¢HW½÷b øÞˆ)(¤s*¾Tr Å{;{«î¢¦Ýu»w8ü¸óÑ©ûõäþ"c\zuŠu3Ì(£•ÀÅ—N@ g©PØb²$­&? ”1Õj9É:ˆCû£e¥R¦1¬Üa.ò«æòV_»Ñî70^"ÕïÊþæV ¤q‰…B‚7$’6µñ«P´\5}ó èNj‰Vݳ ¢ƒPXü 9×9?ÕÈ„!ªò7õèÞ]GÚeeÌ)ܪRÕ âF¢©ÍC#2¸cmõ>Ö«[–÷fWæ);MËW]-.žvb„1B]Â8ºŠÛÚGÇ‘ö©ôÃÚ{dBÑk+T¯’:¹)É©œŽ™OAfc×вî#Èêô8T Õ‡)ÂöþÔ:]ˆ®RÆM)å/ä¾_Ýcѱ;pe]’%.®ïTúµ?«F³/}=V¡ ¨ªÒ-ÆQ’0ưT³Jw‘ýåªx„äî®,´­Ôr’U*3Jü­Z«úÕpGÒñ"Æ+›–¾,+A¡É‘Å­`H2QjAˆS DÜ`ç(B™ÁX€B²§ÅC¿Ã7ðo”Dr Â>ì4²kv1½DŠÃ+5B%‘B%ÆÔ>’ˆÑÄr!\e ‡“-=r‡ T‹@§…`P\ŒåÔða‚íj3D¤Â*õ ‡÷X‹ÃcšñNu%b$E1W‘ÔñÈr:1U1¿,U_F0 ZïÝA3Œ)‘¦§ ƒÜ‰Z¤.HS‘J!’ô¢}e9®È’k³÷CYÒÙ½uϪõ7TìÉYÔ©rÙ¤RUÈ1(g§‘­Jpª™¼+“éJÉ®äÚÉ;Q¾ÑÇW¥"¥Ú¸Bãû»°í¿]ñR>ñØ„ú1™°rPåä,ªÃwÑÄ5’‚=¬iÜÊ”LKÉO¨ƒkÊQk7-“qÉWë)Up¬s56Z°„vRÓpvÎqM'b´3ºD¦Xê8ÂbXViñu~ÙJî^ˆcî°âY‘š^¡Ÿ ŒT“=^-5¬ÎôÏ]ÇxEm6ÐÈßJOŽÌb «ø·ÞÛgÜ-®è¦Î¸Í²-±VÎgÄÑ ™ÈF)\Ž&+ BMÛs¦Æ«,’Wû ³rë-ý©ëŽÔ+û¡†õÖ£%Lª;H‹®~+¡?îäÖ¼Ç*¡fc.5ÇF­Ö‚DÎ)ª.بm“KE3î®Ò˜‰¥ŸìføZ¥Ä9¥ÑÁËÛv^-Æn-ŒŽ¨¿)%õÙ™V„±tMÆAbQ¾ˆ7Ä6dƒˆD_!Düë »¢rM¢//R‡•/LÄjò }k]Ô‰!Œuu|6SÇÛˆC7ÕÈ‚}q(Ë—Ebâîe…uåû C2jÕF"yHÇò­yñX˶™u×z¢b›²V¾R¹*mg"sӫ©dD2XRoENUu ìR‚eZwÃYÈD¡Só¨¤u¸1VÏÛAÒQ‘>™ÔÂqìR·e:Ãk…ôªq¿8¡ËD\l#ô ”՘䬬€S9‚@)ÖYü\Ή]Ù±A°59‹!Y#ráTÂJx;‰éþ”Šœ¢e a….ñ €‚žI]*‹YÄÆVýæêiÔN0BëXbËíMñ%C ¨ )ç¼Ù8/5I«S›vT& @ C‡|¨VH¨Ê9³úàËDc¸MÁ“ˆ¨cB ƒA!:mšœ!h# npª”d(h^è¨äÙG#‘f‚ ±ùVˆ7$%ìwõÄâf'(Aql+¢2ˆˆ1˜v. HJr9†BC)Ó4Ê‚ú »ÊP‰tå)ävdS£×c‚V9åÊ0Ê`Ìc-„>A \¿ rTr‰ Ôv¬ÂL‰Âr àÄCc'Î¥«ŠN²Ê±N]H}N!Ý®‹ÌŒ0ÙcåR@Ä$°§ã9¢oDêe©n TÙÌL ™„P Ìl®\f£(JN!ÕÖ{•BüJ'Ãó•-sV $0y⌠`ˆ—]F$D5:Dè„QF?·#šÜ•ŸÙ˜h2£8ÃçÕŽ˜nC©êÒ.¡èë+™†- Þ¤oj…k‹¦”ÇË1JÖ%z’–‰‚¬ª§#5iE-«~–OTO°1QQ_åôÅÆ%Jë»AÑ(n^BoTµÑ;;,íåú“p‹BP‹ßAq¦tÚàe*Û+ÉÜØÈEµÕ)ÛÂKZNg>eŠB9ÝaBäù(Ö@¨!Û(fû`_‘À½á…yØLÅ`ªß4pÂ(!hƒ!Œ€L ZC¯®!èßB” s˜;0A–Œ'3R8uR2TɾĻr+‡üdüüc§à†<ñ¬RBBß Asg~qoÃEÎË0!;Р‚þ8C"8Fb!!ÍH@°£á(ÊŒ¦}A´FA † B9…wŠh:9/²‰B˜¨RÌí ZÞ1„ÇËån¿”^p00ÎàL–bT±ÊÓ¢e 2ßdçä¨/9B8ÎÊd¼ÂÌ ¶Š5b)&“H2¹„(‹ÌRLs”êS’5pb…BB‰.¡΄t5cË®+Q­RÉè牪*‹ÃY…ȉØACA:õpÁêÌN.¬:© sŠŠ&=8„¨®6ˆBŒ11$„xD8‹]DB"ª}ÇŒ)žœâœˆÆÄ^è-ÐëÙ)*2H‹·^ÎA'rÖ—ª@ádF‚>Œ†`ÊX9Ï/XT] ‡rCs©M–ô(< b»7”² Â@Ii† ÕÈqPbw ƒrêÆu% "éH8ó(‘È«K]g €›×d”H1ƒ”=ù™{QÄ‚P“¤Œ`ˆ)0‰Ù2€"7R2Û:³š Rö ÁÇ`6åca°Ì Ž`#‰è‡¯H!TVSr‰jW)ÏæÂ}ûS¡D'1P¦Fh©™H£5¶ýSñYB€¥1‚I‚ da„f0` *(Ò*8­ZÉ_-»®Jb1—þ|JlÝ“â©(„T6 A°ˆ½‹¡{Ÿ®¯ö .%f93~h«„ˆ¦®„ä u?sÖp%DvÃPÈ0¸îì¡ F¹ÍºØSBcuưB‘‘ñV§õpÜ¢-`ÌØîL좜ÄA­°” ƒ&V:¶«© Æ Â}DŠQiê6 Ëæñª¹ø:žºtxì`$$ò%¨#ú: ïÒÊs…P¨Ê e ƒ `Ü—fnùÙ˜¤eíIÅ9K‰:ӂȰ¨½Je1˜ˆfa A…މPwWx¤n–‘RF¦(†ã2"ÜûÛÌbØAŠ#’-qáÎBlµÄC ŠI`šqMÈ¡¶‹r ǪüØÄ!47² M ŒË9©„ñï⳿>ÃBˆ¬ äêˆzâŸbB†Æ¤4".胗­ã¹k ÐÄå´nIJZtÃ0”Ê9Æ:Q—® ¦ Bi{Ò ž›xÄ0ÝÃT<÷¸Šf¤æõÑ… S©*Á`!I³²ˆ'ˆ1™$¥IÐ.¦0à•fä?q~©D~g¬]æ¢ !Œ¼@Œ#*¸:Ž).ƒ*jN&f1 ™›K܈6x+T>+²¦9:(ç·Ty’0˜Æ7¾4ASÐo_¦Æ*¡ÎAáJ$d>BaƆ³ßÉi‚ºPe΢*"š÷r”97Å)Rdzj@ÐÕ„Â f•/‡0õÏ%R(É!ú"†t‚HÈÀÐm‡cò)ÑÌÖÊÎÉ‹»W™5Ƥ4r! á1;‰Dhb¼×$òâÁöjË;'Œ‘ÂÉXà¨àޤ3 …C„âÙÏS‹üAQ‡°ÐS@˜" cšò/ˆ±™TQ1~˜©llÇFS7e"[˜Ó º ‚kË›c)¢!FŠ…”{¨¡˜aƒ’hû¹ÆØ™A ìÿçGD„§XÌ"³DFQDpBD§Ÿ%$Ê‹ŽbçUz2wˆ1#C Q |(€Š&dø‘˜œû¿gÑŽi#ˆÀ´¨H–)ÃvØB ÷„&*¢Ë8If@ŽBãÑcþù#¶f?£\eÍZ¨åOV±TâÑMŒ)àA ƒ+üí ½ðEuÔÅ%VçbÐn¦é®©ÿE2'¦›«ÄQ3”G 8ØÓ¿Žf†"ç»Frœð$è `Lf¤ŒÕ`êæt:²“Ò(ÅOòcºÃ›2˜¦iŒ…n•PLÃѲ ]!P¢%0÷Tp‹ 2ÃSHÁL}¡Kr ‰‰¸—º èPŒ"ôXÂhg9¢†9JœÝ‘MféPȦ(}LÑ^ÒáðŠK>5 LÔPK 0JbV^¦åGqÍ!‚DdIž¯°ý;ýíþþÍÿiÿÅ¿ð€zÐtF\bÿÇÿ!¿P#›TÁ .€ÄpOGLî´Ä"a: ;±U+‚y*èÇYb°£c%7¥3=c´#"4"á™ ý#&8©a¹#REt«•Ä/÷¨ Fb bÇP¨§!CAˆ æ~?~Qd ™KÇ6+j2kA¢1«Ó!©² `HŽ&dgÚIGÐ\béCò«±°!c99Ø8jONÐ0CÇM‰È£î™œŠñmG1 !ª›­âh÷D¬1ƒwˆxŒ¹ÉÄ lon[¢ à „¬ « X5OÄ6' iF(PZ9KTßœ(uë-¢(dŠ+$ Ä$0”F 7A˜Œ #¤. Pæ¡ÇÏèš™nšŽrÅÖCc`¦ê‚T+Õ1¸"š„$Qã”0@ÜÄ>@Ó LÅ’‰Kb A3´ÆF$ÕW²””Õ©X ±{ ‚ò10ƒQP`£Y~¨AšÒ™EGpÓˆ/Pã•úV‹Âû,µŒ"B~TÜ¡„ˆÙг¡h‡Le§ [Z¨"$†<(ˆ¬o‚K†»ž͈ÒBä5àaz+øŽa™»qˆ†c3 ÊaÀ‡4àÐ1)Çýh§Gb Èb:?ï*§8D¡nì@²ã,ËÇu˜ph¦´Ò1QpAFq¨£¤tÇcFŒBá”nB&è²UyË;Åä†!^>)D8%c9ŒR„ð`¦¡g÷ cö„Ay vÈ \‘Í As2shÂf²ecðÉL%2w/¥W0[2  ŒÉ45\AH–Ec&CBË…+R ýíh爧b-M!&4f^†75Ð!Ä‚ Z§Ù·ª”W"V‚@@E^ L‘.Ž#A%‚""–lÄ ¥‘BjìÆJƒîdËŒrVÍ d˜Ã( _È,q8ËÅ1&G:sn˜1ÙµƒRôN}ÈPHc`¾˜‡éÆ®U¶8^ HTäŽÜ†TÐÆ7FŒžî$&¬ßoidRTJ0ØHvˆ&8­¨&B¶¤r9õSR„èÄ ¬¨ó¬÷1ÅÅQÓ(J霥ˤ‰{"¯uÂŒM3ÕNš¬ô®Ð&v7˜!‹’QˆZ0.x´ÖÄ»ðcê-éä2Ü”Ù/”¢ªã­ ÝÇ=UEv‘)Mc¡RæÆ9D“ù÷ÑÖº£=-L¡¨ˆ¼Q ½RQíb?™Lº…ßS.¦± }^R¡µt…ÛiêœÍõ'%ºRëý2ï\'úT¡LšSeñïfºj¾F_o¸„1/Æ(T&Íæ[/c¬Œn*áë"XφڮlüÉbô^Z¯3=äM; Uþ’Œæ)e!J„S¡ÞŠé÷â˜Î¶·K¾5‹ÝãGzeô©-=цSé+¥:ÆLå6*­××c£Ñb¢k•ü³9„'¢¥ÖR¹ŒVòˆyr•™MW‰ú±0&D„”+œ€2Ѐƒã˜b$[¡=‚B«Õ œ½¨ÄMˆb$¿2ˆÔ LT²`ˆ@­HAJîÄÁGÚ%ñ ó@BŽq¹9¸ŒfóÔ€‚ƒ¼î Z*à¥)V(Œ2BˆÆˆV Lœ†˜°v`°5mŸ1‚˜qÀW ËAYIŠÈ4Ve7ôu̪X ùЉAkº²ÎAßU’Ђ!8‚PBa”ÄmÉÐÀ€A˜uv0 B/rD%C¶)E8²ÐüÅ»þl0€wmÁÓ†0ô)“Q8l œÒ²}ZÌÀÔ£FA{ÖHþJñDEä8ÕJFcÓ®T?¨ƒ5‹LdˆÅ*)™ j¡3¢ÄF…Ôè<Ïz-0R‡n¬‚îDÝM”¨0 lÀ%S @ƒc”aóäÖ¸£—}rŠ0î„ìB‘úf/æF™ÐédÊŒˆÊLT–áéÅäbC Ö‰‰Ä„0„´ÛOã „ARwJó:чxq\#ˆÇUpA˜ÎýX¥ FßÁ0¬^½QMœ]µp9æLƦ¡¡¢ID¢±9" éˆôÐŽgÌÈ'Ç«û¾>s`ø¦ÉØã1U™H4\j„ƒˆë£‘Î`„ 2òPÀøò ˆìÁ&è§E^!FBv®k:RÁ`Þ„¦'.¡g!ÃQ¨„R™D%³þ'‚„‚XnRQacWS¯€4 8R lî♘ tÁ/4À40gvÆ0!Æh`€!eiÇSfiyÑJª8R|ŠŒÂ”?yE(Äjj0ù*ÄÂB ˆB“>e1÷’Ä DÂ8Ig¦y[$ -ÊYðc²Ùt¤MÔTle$& bɳš$fpƒŒ`$È]`¿¥ð×ë@èGrˆ‡NA” ‘|Ù+sc±³dvDD£!¸"Ú^ª,7…_íÈ0èŸ~<,sŒÿ@F¨w”’ܤ€Æä+‡Ü†;F ÃXq“½Áé'[Ü„ ™M|‰ãaœž”œb£ŸA¨NKamÕûuc# |ˆ]uQBˆ¨x…t*}C$+bS‘1²L@F¢Sq¾J”šf"U­G+¹V‡d”Ä> TÑ"PÌA1 ŠÂ™ÐnÅCfBCHe8PŠÖV¤1*º¸È1:S™éÊNØ'U±šÔèO ¥P#×Å/@‰ Øœ¬M9J«Ã3‘Ü¡GbÓ²TQrHÙs Dp™™F €†(†D ÈBCQ!„A´µy3%)Äs»8Tˆ¤‘÷¡WGuƒmƺ3QÓ!ÑŸNJ(@†‚;ßcQ›|¥0™Ÿ™ ¸‡1's‹Ò‰Õòó ¤Ì*‡Cüã ÌŒ+Ç”w¢s„@mÓ;•Tª†‚"D:9D´AWb‰ŸÃš.)?Y„ 9-ÆLcjDhµÊ*”P® ÿøÉ¨BDNÿÞÈĤASij’…Í '‰r`òyPt†'´Òé•J½–Fªi1rÐbÆ-S½wŸRë¥5Ñè¼}BX3)‹d|=yªÔK%S]½øÞ›D%‘Ðé–=Í«ŽB)Õ®%Ûµ]#aͦ.ÔžËd²1Ü‹â{žêÔ#v)qqs®õEŽ,ˆö'>íµLÕv±j˜Þ©e!”Ïcyµß%5WÈ[¤%ïêPåt- “DÚÍ‚)áÎzBIÕÛ°SUÜAí)üBLB­Õ(J‰Ž%—VFAO¿×8œ]«Ý˜‰0´oÃXœTÎd¢lír " ¼š\#òÖ@¸je«ƒ#¢\¹N«v/ '9쫨KDS†#•øÉT&îä±JW}%­¿S\äòÊJ.ã>س¿]º¦ˆd…ZÒþÌz™ŽzpÉÒM½ã¼¢I·ÕV•”УQkBã$‡ «3L–êl‚ZtÃó3&w†x¨kEÃ4AÔÊX•eä'4¼0 ¯> J×{vcÊŽn#µâD=ÙÊ*4‹ë΄ªrñžg¡ !(deöT])l¬µV¢­‹ð(µLB=YýðƒàJúLK:J‹v3W×Ù¦ÖöÛÖ4§Ú‹é»—ËØÄs4†©mÉ{”Á– ´¼#¢Šöc——û\¿I: Mœu…•d¹c ÉB&œBpáÔ׫†'ÐŒùj´ÒÙÜ¢â¿ÉÇ74…¡la¤lˆöy¹"Dz!^‰bRWÓ‹ºNBæåˆýÝ©'šéâÓ…RT5‰ž)J0Ph$ÜS²;´%KxI²8¨¢ÎeÆÚµ}3„2Ì’JäÈ{/Œ´³l‡å= SU²Bà´&—ÉÅÆ~I&w" @ÄörQ )‚<æK†ºßÖÁÁq¡©²³‚¡P1f¨oHùQ7)…yOòyK#9Ø¥Êi¾œ^M+>\J—õÍkw‘„*oñB£YeyJÁH)˜bäÍÊ/yjšU"Ô4çêµ½,²ùÁQÉó§^j"¢påß;ìÏR¿‘îéwÂ!†¡XŒ{—¤üdLu$Ï##’š¿ƒ v`…0£CZ˜!ø•®›Ú‘Îý5u¨²k¯³îZ3i‹©n´1Gb”Ø©OÌ«çÂZìR|D¡õÈuêœê3¹¼l"(æ0©k.I…Uâ]KYº^‹æ v£OÕûX¾r]Œž!N¤â`Ì R™WØ’Ù:a°8ºn§óÓOŽ6Œ=ÝL&¬¤Â؆ Ên.ӯЄ G1ßvE¢6¦M–-Y4Å.ç 9Œ¨)(ÊD òPˆ­b§U K®Ð”‘HAˆ7š…ªf^¦É˜Tï–zE WY’–Hâ$&5˜ßE±)ÎÒЕ\ ‡MN“> t’äì˵Ëi G,Èr …)_’–!.öR¶q&ÇûR Œjº4ÐÑ/)¡‘Û0ž)#®ÙßËJ9"½“nFš0ˆŒgì"púU¨¨r *ÂmPÆ÷"ç<¯×/˜|šOP«Å­ÉßÛéêe­_-”¸ˆ*G)†!H©ó=šù ³û Sy.Q>ÚèŠf!ÞuÄW ¤õ‘­EClRÈ%6”}êRž–^)jÏÕÚðÏ¥1.ú'æPáÁžmZú½q“ҲߥúÄ!Èæ7µhŒFãâá¿KT-5¸j‘F7D,‚)Ü|èèTâsKRDfM…4ª1•…W·ËºgR–êcò2P03O“˜81Ë%~‹}ó !dZÑôôì£6pS…Qú²»Q +ùÒ¸¹Vcò®pO¬L#qNBK÷Û!JÃ6LçP ` Ð™rÉ*ˆÅÏObùjÿy!±N’eó‹29W ¼ìhBJâ?ùñª§9Ñ-Ý%)Ó—½•6–1^ë£Wêt@¢E0…ûF’[,©»Z—ûqôå© Û{S¬Ì›ª¹Õ»â²f KyÚÍ\ϹçõZÎ~™Höb.ÌYÀw9Š-"¨…šª]YN…`A¸ô,ù%ÒSd2A?¦àkbñB— ˜Œ„ê1l‚ î} Ô~onråï}X¡<Ÿ¤¯q,N”k$Žë² ›FH§œ*.öRŒášþ6%S(«·ãb%&_1.œaCšGúy‡:ÔÊL[ê|o=g«-¶žš²rPÙ©(нbÅ1§ÃYY#Tä­5þ{ÄtÖvq%°›cgÊbÉ•\B!Eâ=Ò®IöP²ìû¤¥{‹h„º¢T…âv!¢ #L´e®+X™S°3ï~OKÔT ²µÑÿ0ëñÒÊ.^hf 6ÔQ¼b8ã7ûñ´ˆžhƒïRÍž‹¦­¤È²*BS…«ÊAí,‰i}Эs=šéÒŸdx‚¿["v¨Š)DnÞäM¹“Nž9/·K=k c\×s5¥L—ª½¹r–K;—ñ™,Ä¡ÍMã7ñÓ&Á˜&QÚ˜¢;Ô‚…ŒT$èhsN•¸ŸU£ò-³/…œE½3æÉn‹Z3ÊîÉò0ÂJeO‘L& Z"% ¦¾Ö ï¢oûΨ*œG ’± ²áZ¬¤=m~0ö]a«ÆYt¥BKÇ–ÉGéÕIõQnPçÒª=Ì1ÄÂ_Éùwsð>þE_Z9Æî¯c<é•Å1pÄõÚ†~:U·/™Ìé©yxÙdr ν”Ç4Es„5UÑX†eŒJXýJör ö[”½•é3:&m÷E5²V· ué‚B¤A Ri¶RQ\©-\Ýçrñu|µR9ÜÁ öå(˜Ý¨­q\’’§IÈ+Ëî3ÖüwýD~.>åß`ªïÔÿëyh>J— ²ç/ž º ÕÁ\£œªœ00Mp*Q7H-æ¦ÅeW!ŒA)•M0‹Ê°D ¸ÂPÆ5%!ŒæŠ®†r™‚S(·”埆‚W1EuGÃ0—õ») lšx¯ò.öDdÜÄÆDeÆÈSŒ‘Y_ƸޛjeDsjPR×,@#Ú [E+‹BaŒ ÔÇ>hQTÙ+5Ê$c2#œJíœf31‘0Ÿ)Ht:ÏPÎâ ä I Hç §8¬U° o]Ã…ä-A#„ ‰Ì(uÁ0ÁÆ-E‰â.!ãx®‰­Òæ`Ëa3Q„†Ö4Xa°†  Šª¢©ÎWtcb’©E( G }m3êô#pÜ”ÇåÌR È$£+˜MHÓ36£BÁ”œ‰„¬õ‚´u¼¤‰4‹qà)èà=.ƒtBÚS”ùÃra›'tí£')D[ÚS"ã ¡–åŠPŒÃEÓÙ]§!9)´æa B¹\£ùÕ#FêzP9ÜQS°CrÓ¿RÕ"Ø1RÒTˆdFBæCcJ“ ˜!°†Ý–ûf0D„È&£),v:Æäâ7ùó¸§ðé*3–©MìÙ)LÄÔÜÍìBÖ•ˆe öq…(Õ!‚3*Ƴ)C')¬”’Ê*–”±"æ’œÅ.øÜ!† e$#¶6¤nщ!!ìÒäZ°–¸›°NbJ'J>;«S(Ìo¯v‹n)d _• È0ŒèR¿2›`½ÕR¢™ÑXƒÉÞ”kâD8%&H"êeJá˜Æ й˜½Lt€„ãFìØÓþÕÁ…Sx!Ì“&ðª¡Êù’ §‚Ü÷‡)8ŠÖ®6ƒuRl ¡ 7í4!ÔÍ¢²–¡ë~Í8bŒ¬VpéËÒøTë̵,½”³¦h8…#dÍXÄÐEÛŒ0¿ƒ:ƒv†¡K+¸d•šÌbaÕ…B„f•›(Í4(Ï\ â S¼ÂÓ;´ £åÈÔ‚Æú¼ ½»V墅ˆþ+EãZBU”*Tæ@Èb `KLÙ™ B!1œÅ«/Ü­t:•B›Eu2‹?iÆ!é!‡)…/©Ä-’ôãäœHD2“J•„% †Â©Š8‰tª¾U}ñŠÕ¥¤.|öaltõ&(Å•0¬L!$Vvn Im „@ "Žß+!%ZC4 ¬na˜„tt6?y`2Î7į…e.#X–j2.”ßNìÑD{¢Χm~»ùí¤ î’ÈN¥jÇD”BJCípî_u‘ñoka6ǧÒK“’†ã%È©›ïžýÂ\ !ƒ1•\!E\Pƒ~Þq¢õ*€Ì¡žÌPAØùɘéa°‚er ˆÕ–’‚ã'r.%úç1@¶ÇsŠ@FA€„3c¹C‚Žô(K%ôp¸åEØÁ3d RØf„BtcÑgíZ“j—ªÆ²XÂ2‘`ç#’ÿ¢õtˆdMÜr™Gh²™ÅÔÑM=©àƒB‚Y=òx`ÐfàKD¨¬pРn`ŠÉ6(•P,ŠÀá¼ÏP|/+щl(C="\jÚGc7Cb"Æ~èUNÑÝ8VÿêdDøUc„dJ ‘ÚÅétÁ!q %‚†À †'ŠT0€˜cJñø©º”aÅ'\Uà¥aÿøÉ˜CºNü]~þð_s¸ÿÝ[ï½øº´ $ÿ˜°¸ð¿Þ‡§Ö†i•§gn>½®d(…!ÜȱÁŒA–ÅÕg@¤‰ÉJ—ISp»@P”¥¥¦&.ÔŸïÝ”ÅÓý_4í[“ÒN34§W°}!Ìà ¤UBQLÊr<çj»ÙIÙ\DÌâ*ºñ(&–ÿ)õɪJžìR± ªnjsóU™ 2X”r³²m‡áuF#¦yE¹w\ÇÇ¥K¸3jòùÎí•á(¨Õœ‚|è1^S̵K’’vÙ<µ3ŠDÒ®n¬— 3Š”ˆÖ‘5ŸËgw©t‹TS–…óˆLÞCk D$夫²å"#e8WòE-TI‹é­cÓ &‹¯a±¥(£¼œ+CÌ„ÓdÍë'“ 2¡4‚ØMÙ__,Æ.55v½a¤Zš|ÓT³ „~ óX˜ÑU3N+Õ·+OêV¤ûyž­AMI ní“¶Ê›Ùn’)Õ3õYRêQ‡!J˜a¨EgÞ©%Iâ*/-V=[‚I\­ÚŒ/%ïWD÷õm²q} V˜QL*S™œöˆ`©R †.)ˆõ®v¼t²â{ºÏŠŸA1«…îe”÷§¾Q³Ö«œB–«ƒ6„è†!X:n–A1åÖȇQÃ.çWm-~œñw(D8¤ªd»ù»'ªY\æ3HæÂ":*®Rb*ÈŽ"áв¡µ.sº1¹S ÇEý¹Äñ/K¢i([XáE8˜Ø!¥šnmŽ (#T r!%¦æ>Œ…IÈI¯^íTÕåËý¤ï˜Å•Í'kÕ4ÅWtfJ0§ˆéÔ5¨m]¿­NÉ#L¦B-ŠÒ}ÿUÎpƒGY‹%K•ž¦e¡ÈÎ2â©^R5RLÅ0ˆTdÏÂ{®¾Äq›.PúGqÈ)K_ëlšZ+' FB1ßQ®bϬÌ~÷SŒB¶üšo¡è¨æUTÃИquDüQlµ*8Ä÷O+![L–e™0"!„q S|‰ˆ¹¤ÂxøD"‘{„ÚǧÒ߇ҜˆŠr›—ÚiCFfw¥Õ1nÁECáì–dÕÉÆ/}¨EuGÆA¶kšŽ"P^¥¹Ö¿­Š-7¨Z5}s®ÿÍ äåE˜¤Ã+|SÊèF‚oSÒë9ò“.Jê ™ê-¾™'ÔŽƒœR¿Òò™ÓÆ#‘L@ª†úÑhøä#\ç+&¢»u‚BQ}Hú|Ú.Ñ>wW–·µ)éýBsì½zû YÈì”}ùvOOŠQÆ0T&¹uu*²BågÅ|¡4MtÒ‘pÅ´½&ÿ‘ˆ­ª”(Ô¨Ô¢$…¢²-OÚïè¢3)-}BJ,gâ’O’„ú£!ŽúÅâ³a?¤(¬´L¤Gݵ…d–Ë1Ó>^®ÙXÇ»ùÌlcó“Þ´òbõõÈú–ûÑ«ýnºer#¹9 4¦åáŽ@àËa¨Él¢TPå*¯•ÛSY%}©~‹’MÄÏÖE÷(¨L•Çb=QäUïy˜T™º³;—xÛE¾ËDÃ0Eθ¹M§ÉfÆÆs36ÛþÙB± ˜CJ¥Î-E!Ÿ•YÐêL³±&ÆÆQÔ”s/„“-?²¨QÍi©Òq»U~¢ÐqQ+!¿ ÒœR\ÜEl¢ǧî1ÿ –RÿQÛ~«÷«_É|±Lu£2Õ†äDs#*Œe"í1´A~úP…WÝG ‹Ì£æQ ºÆ +ÔB5<Ÿßœç2µ¢#vf5‚!bŠq7¥¦’ˆ¥CÉÃKû¹˜[*Ì+™w)ˆÔ­|S8‘ˆC ‹¦ç²*1ÙZ•Üö©åW®š†¦Û±•=TÄ¥L“å»ûÉÁWvعÓUNu¤‚,tÄ) µÑ `¢ˆ0A²5ßz×v) @©î.Rm—µñu«[eýÈ^ÄÄEÔ#mÖr¾È²³c‰§V±Jì¨ÅX”ÿS²«- ò¯_iéîF©;®/o(ªÙuÅ'ËÄ©®š–+ …¦˜J<G{!ýJˆÉQHB-ö‰û³1»n®¤Ôy:ÿNö¢ ‰ˆ®*D&ß±†ªã‘ÒéaŽ_¦Üšè©)Õc%KøˆGÝ#&×øÕì°GO½U.çØU:élV›U5Š@¬YÆ>Y•õ_Ь|«ö¤ÅúkQ†nnTtÕÆ¶éÕÈáä}q$ºÚȧlª¯\ÇYSšLBkí‰0ªÒÖJSê›Ìã>âQ5áòÙ…´Íe]n»dœ9 ßI\S© B½U»ôd;Œs7+îI¬Î¸È‹P˜z?]ШÎM“Kd˜Æ3Q$vkQ3¬ú¦"±Y”–ú\ÚNn]eMôÚbp’¡sœ¯ü|¾®9FVD~Cϧñ˜!ÎQT”²}ØFRnúêEWÂö‹ò<Ô¬›U/õ=7ŸmýZ²å –:ѲʎÊáR1ÆEd2ú6c&޲OmÕ¬ tE*@ÖÇtG((/ ªÌ5)ˆ5(X¦%0!”!0bÁFŒPÕÚÜøâ쨟‘Ë…"6PÕ¦§´?)C! `Fưð§ôC4 ™òc;.‰‰UÏlE‰[f,8½ŽcŽdá3N`)iB·¢Œ0H\€U¤6 €C€ÓTi8"!€jDRYÅQx:b²s× ç!],*ŒŠ"ÖˆÈF?¡±lØ#1"±™®^§6vg3+ ÄSbq1O©Ò©¹ˆ!0„wèèâ| †"†1é˜B'©,'ȹ¬ÝÑŠÊç$EQß+ .vÜ7K‘‡"†@„ÈNHmW«ã È +3; ÌvÇ¬äøŽLÁÂbÁiÝÕ=ˆxB‰P8'#Ü €œÀH ÆÎI—hy‘ÊCgéÀ:¹,ý&í$AŽû/_û©nèúšcBûʹòùˆ:™{LÏÈeØa«K‡‚ö‹ÚIZJ Œ\Z÷ãœÂ4 <ÞaïUÃ"IÜ”Îgò†âÏŠNÓUŸ‰wZ©•Êœº–J1VXÈ"¢…¡âGžàqšR12bjÕ™8Rr©Ø ¨9dpˆq°‡+Çá‰ÒjÑ4í’êáæct}ÇúæÜIS¨I\⊠`Ûœ&d¦tÝ©ªºõsš6¦´¼¼!ƒ±Ë-)2’$’uÔD©ÊˆBìü汪oÅ'äµ=öóœf™¥¹­e ä+©Ðtú™³QûÂ;ÓλV•®aÞ¤ô0[)dnJñ;›^¯o,¬¸0¡P𷘥„¢J{JßWÅ6µ™ëy¨å®~êdâ©Õ‰ƒ¦z™¦:ˆ(q2†0Î~7\$¹_±DlzðL&kŽlzãoÕq\Géòa—K¶ ŒÂXEçÛ—[µUm±$­ÍÜ廈2LgOr!BÒŽä*ea¯†’²V82y2d_’æÃö·Rˆöß*Ê h‘n2iˆèÚLšU%bñÔŵZŠÈéåb˜ÑļevË´ƒõÒºò˜Ò›C?“¼RR³Uòƒ.m}Øn.MIÍUyÒ¡XA ‚ÛE &›Ü^Ôb¥òýëìŽ-OYžžº×Òr’Éâ>ä”Sˆ¾"Hu×XCH&,X±·Ã.¶È+²'Ø„­'†t5êɉäªrØÎ2aÓ—ŒA•YÕ‰1*Þé·üùô'ÐN£vï[‰Sª†|J›Ðr‘×$‰õNa¶ãQ©a’«DN|,—Ñ9>BWýTçpŠ@P¯æÙÎîFe%ݯª¤Oñ=p‹ùn©¢".µ„D][7¬Ž3:™ýj¯Š!DçïÉúÉ+õ¬Vñ:ÉÆÌ«65IÑÔîp  Ò„JZvNOÁö ™ÙÇ­ˆjã×ß½Ki šöå2ÈèWËeçJˆŠúL¸ô‹•Svd#·ÔÓ6wسEj¢å,îR'ȾªI å.êu›+ZKbsP¢v¸¿ÍÝËÎIJ¢0’§ò0V"ó…k ŽGçÁI¤p‰Ê‹öt׆٭QÈë—ggv*eË9.UòP¾|W ¸bJŠ{‰ô=R± èôC'¾\ö;(‰ÊbáLAP)XJ¿yw–ºŠÇóZøøJâª-›H•¥Š(Rˆ{Í)E*×S4ÚúÈEñ¼O?󈥚ÏT ˜œ„+1ÈŽ¤(«Ff±¦e]¢fn!ð.©Pâ~¬ÂkåÏÆ¥Ò¸­ª‰Í RØÃ/¢Ød‘©ä»~ßöšè¶{—iÄ1©K±fÉèB9P¢*ów³ÝÈECöce­‹§- Yùí>ÉÖyø)…B ²»Qµ’V5gï8†ÑªeªT+@´áÒªè^UáÄô#msJ¤tZ`‘Ȇê A?¹äz;̬= G¾>ùГ-*ó³ŠÉ•ã0dˆ?voÛ B÷©V·MÏônë£ =£áNšdøØÙIy [)Ÿ,§œúA®IZÜ­©¯By^%íZ%Xô$g3G4õñB%òâ¾b|¼z”uA‹Çûû‹d›ÅÂÊË"õW_l³)‡BahefrÄÂÜ¿ è-Ñ¢>1tšï£{v3LT¹† 00‹.”AKõNréë¬OWÂ&éëÔíãRCzMÍwIÜ1w‰:â”Έ«J#ÌRÝèL,II:‘“IRÊìK¢°œ^'u¶+-žOÆÇJ.[Ó79Dö¯oueÓÄq §Êt]I‰¢fS+ÄB4ÉD^‚ˆtzŸ®B2e¼Z¨ÇJ˜âƒyjIR7 ÛD‹òÕÈK Úßë•*RK[ÍKµ,NWÆYÍ%]ÇN*•xŒì‚©±EÄ/2¢­ò•ÇS¿µ½RÒè0¤¤ˆŒz·™ œ¹‰>-T ïSÝŸ fÉ­NCïÞèíUшÁŒB•¤VfbÖÌQW;f&µKFZ8m¶ÔÍÛ™¤lFCª9dÄb²Ñ¬ÙíåÌLܫ˃ÜÉï³UÙt¤%“ƒ”0å­¤1ÃjŽ 'Ÿ[1wLŠá(²Ö7s/žá¤¥d|¢Uö…¢Ð…B2žf¼Qÿi«ß²Œ'LFø˜DBK)y«T£îÆS™ªI ¢ÚÊmFªâiš6ͪ„XØ ²©ÍS¡‘§aŸd¢“7Š‚’bUü% ÅYÝ"8Ä.bÊĨ%Xœ{R=«A’„HËaI…k*J‰OÅm·§ÜYIšjõw‘ó’Ø´úM\…ò¨ãÙ¥M*ÙÞG+1œ§y‰Vå{¦¯?Ujø§~/ìØk&;hb±\TãtÉÌBX”Ãâ&˜Ïl³Ô\ìÓc[‰a$%µ¬Ž!8¥2ŒT9Î*¯¡ÐJ1éüIÅÍÍ#—xÜO¦Ó:–Öz–VÃTaÎ Aä˜ÑUÈAÍ%]iï#[ %ycÒB_®gõ1º*J!Ѳ²‘L,R¥Û ræÒWů‘(Äú>êpÂq¤Ð—¤N"…f:Š‘ŠG’­2;&+¹–õ+›ÏéS)›SÐÍÄ:î›Ñ½þ¤¹œÞCÔrâôBb·õBéèØŠVÓš¯©Î¾ßB×”b­Õnå)XFqUy½QN- •iîA<ö0ˆM ËJ·Í©'„£Ìd[$%RUs e0²çŠßÍÌBÊš”L«ÐÂn7òÉÕ}Wä8¸)â*ÄaI@¨12¢5ŸåDb\­½œúû¯¿˜¬VÜNŘºsHcÙ¨¨9‘ä÷#­F¡lŽž®”¸ïÉõ¾Ûw4È©kª0Ì)B±JØ®TÆwy$~WÖò.ë|”’”1—ÏT%ɆÿøÉ˜D¯Nÿû€$)`!H´´á´%TùõßK §ÇLTæ Œ€Äa†›.a#jhC‘ó œ^Bž‚ãv1sµÌ°ƒ4 gB+C„Èbh I‹ŸùÑÆ¨R4x‰«èµ1ÓTH%«…q 8Óét4f ¢ÑIˆÍF«ƒQˆ~άŽrHAšãˆß¯wq1¯ÃÿJ¥x¢†3x*˜+¡Áƒl!aÔY˜@Ì!L¢£œÿK1QÇ® T¬6A2Ð]ÆÞ3 @b@¬ŽJ³ A5mz"± ÐKúÓ«‹TìC âóŠŠwPö°’£¼~2¼ ‚ p"àcQA=MåÅš¡Ròt"ܰ¨v*“Ò:¨iˆ†GáQ@’Dé »ˆÊÁ•žpÝ)ùñ6ÑhuICÏY‡8‡ªº@Ä¢RI你.¤Za&7„†mJP9p©œ…j£=)Gï‘ ÒÈ!…AÆfÆsÕG!ˆÁ6‚6LTñ"223ˆ"Î!n¤!Ð`©Ôwå¦)„îÁ(!€^„­ " BŠWB—LŒÊΧ ¸QGïHÔÒÕä¥3f$¸L!M¶€n`bQ:ÁÊÅ ‰H£b1=‰ÅnºdŒK-`äü§.¼„ C2‘IéB8B+„0 C@"c ®*žˆl"+::õT¬c ‡”UápqXrÁdŒ!Äs”ªNÆJ1· P~R ! ¹»Ÿúf ¤!‹ZJãFc]z”¨†è ¸ÅŒCPŠÙ8NÄQ2FOI‚@ÔA¾B¹Î;Žjȵ]UN!]*(ÌÛJRÁ„ø@ŠÈ@£B¦‘ }rš † ÒJ±šþOH¦ÌT Y•y)àÓ !DWɬ\&Ño¢ ª¥èt‡1‹‚sCYÒ;µLL–-pB™†D@c 2 <§U"ˆÂˆ«V•Gò`† Ä7 ¥à«¿!†èЇW˜i ¹ùF! ˆ¤¢ðìÐb ñÑÅG(ŽÆåGU§—‰‚Q‚ Ð&¥ýQÌ$@mÛdÞø¦ÂhÔ1ÖB]E´•Šlc¥ë\‘.VšÇÏŠ " Ghà jã+%¤Är!‡·˜òeBˆJtÈäÄ0J†uaW.!)D柣!ÈÔÂç{Œ6•\YJHãE^ã¾`åÕœ!‘³QGiô1@ŒjСÙ^ã0Dà \ξ“°‹ˆ/"Žššfõ­F/!q!6Bƒ”¨-8¾¹:šBPÐD&·>C˜ÜÆFR,'‘|ë;¬'Y¥ßF&!€†CSѨßĹŒsÂÏ1 KŠQøâÒ±˜ÙŠùiÔJ#$n&r@‡#­ãnàŒÈXê¡G ¤D@‡†v5pÊF#:\=:ËÀ† $8õy10Ó\¡_tfÄ FÛ”9Ïã-1GáO`¡V(Ä0־ĥÒ3 ŒÂdrÁ™º# RÕBá^x21Œ*KJt+1hR ‡Q–á¥Øf3%á:˜+•Ȉf@RZX=8J¬ãÝ›n LV?Taƒ=B!‚cçCS E'+‘XÄ4(ŠÓJlfA}  ES`ÛqïM”Ë ÂCÓ Gäµ õ4µ@‚0;BÄê1HGd†|º2öç â¾Æ-²äs& áxU ) C 8(à¨Á¾ˆ È¢°^œJ!LŽBçl7hHŽ‚­de» HÄzÂi»«r§è†cªÒ”šÁÌRžf%¢`A(¡J9NRU ÐB¤‘… 'i"¥›• ÀÈá¿fP¢Úþüšñÿãý…úö#ò3g#Ëû4ÿ˜æÑaø@ íKæË-Ví"Ù·/v^”cy†°’:¥mzж%JÔ)‚'ê–)]Ëœ~’ïÈôZŸ·¯ên®üœODuMüÄ(Šˆd­ “»™.ELï¦f+0ª¤/Êâ*;(¢ámÿZ^',*ªñŽQ”ÄRÈÎB]‚RBzSIJыgß©6õ¡åk6[ô²—Ê•'ê±Ç#'Ô®èŠR ÎÔÒ‘qüÄ¡¨Rä“^yå w[×eBhŠd`êDõó~twªs—^TÓ6§ëÉÝ)LØL&_4©¥{›2U¢<Ë8‚‘0žwå^!9WogˆŸUÒýb× uþôMUÔ á†zbÈF-[”Ÿ‰VtRÖr5of§ÓÙË«^6Të¦Ü廨Š3º¨ƒHTqlÞ$q0R;N\LesÐ¥ç`€bÇ8'v€ŠGf©Š”\Õ†Yhc²ö1 jêŒe#Œ¤Êœ°…ƒ ŽQ¡L. ߊJQ‚o˜³•ʹCò2£3 `1ZQ#˜ v*c vì\µŠÈŽUô¤¸rG¼*I͘ŠD]\D*%Il Ì™Y• V9sÍ Î ƒŒDA0‰ƒÃD Á[ÄíDCÄ>oÌø~)D«N%]֌§b(B€œNr±)=™qMaZ”¹ ÂCîmKïdàQ°Á"8Lò.Î ©EÅ@ðtåg\UUSã¢4`„f&È#‘ Ñ\*0¦yNC(bÐ$¦,ù79>@¬¢†DR2F% b6Qöé+gq‡"Žˆ¬"S‹‡È¦E °¦R î´¡D¢96ˆI†Ì`\D2ÌÛ⺬ÇA±iaèCgQJ£Ä¨ŸZT¤Y2D½Ð)]bºX3üÓ¤ZÌDLØAP aÀ˜WÐü ¢WpN£Øwà¸jaiyHP˜ˆDìñ½aFüÅFŸENM4.<¼Ç%*;ëMMs]" ¨aª Õ{:™9¿+F… \ pP¯Ó Ëߎ¦8†0$Ã*™Df™¸%2yÔ;9'‹÷)XQ™9*""„™Ê9'‚J؈!g#:Þ&Á9YÃ)G:Žœlp“³áE0j,`)ÑéÜŒf«z š‘ÃQJ WŠ73&…3.l¡¤gÃvM6:¼T Ç2Ž$ˆ9ÈW#R FDŠ’2„Å °nH/|ÊAŒÂ0ѧˆäO—'S@qŠP™Žgôq8C™Ù7 "!hô…C.42‘FÆ¢Ç;…ý·îP‡H1Ð0FQ* de„`"Ö(B‘}\#™Ûó;²#± 0²®G_ùvA‰”Ϙq¸˜Bñ …»²!GB®Ù‰ãT8cƒ\ !F”ΑA”Œ¡8’î)´EttnŒ‡1ȯ©­:b„.0V¡»40e/O!Òø¦"›šEÔÍ£öR)(PË*6¤ŠéB¦c1‰ìR¤2$w R £<ûŒF à‡Âg-k.bÕ bш¦vÈ!>8ŠÏiD!ó¸Ig‚J2!¸Ó£³ ™Xs ä‡(™JE3d<cçT÷®Ø˜Ù¥!ˆý’ü‚dÁ«B“ æ¹Íj¦tR!’àHì\ýÈâ4Ät{ÆC2LÚôÔ·,Y ¦+ 1r2¢µ &ê¡BçF:Ì¡ eÃp‘D,b†)ƒ"‚„‚„ÚÔ‰í%"@˜b¡o,^ʇe†tjgµâ ž~G ¨ª q¤Æ³‹3™³$ÐÛ›µ5ž…«×aÛDJiLB§cÐ…Ḻ SB¡ÛsÔMÕ Þa•K A÷QŽf|D«þ)¤AbM >c>™S“‰bÕ J6Jy^È´"9ž›)x¨vJ!*jb¦]NA{8÷\±|šÚ¤çB2jšüE"áh.é¬N9‚àŒ"ôæA dþÅåFM]Ú­½ÓÕ.J¾«x•Z#èµwåDÆú;ÊÙÍÄêò¦¡rФ1‚r¹«JÍ ±ÁÇ$Ôªµá Qú÷G3jÓ5>ÜôÖ‹RŠÔ"ß׌ç?Qk¨s2±=ÈøÆ).÷>–L®‘jr¬Îqçé9suÁ-–’ùíÙdZÊC£ŠÂ 0@Ž”æÚÓÓìIkµðÃ*"1¤õ¦Ä;%#Ñœƒ‘ˆÄꢗmJôi"˜ßôt¨Z(ä&–4†AíGSÉjaG2òê?2Urq4¼Äf÷Œ¶óÈZ1…"ÆÞ îF0‹æ¡%»!1¼±£yD\¥KÎLá (à 0²dÍ’VÅ´™þò=¡3/3*eÅ¡Î2èôŸ«ä¥ÈGOŠŠBŠR¸ÏF¯›†©ý«È®J‘fwŒ¼©Ö§-Ga:Ì9š_¸[ fÚÍ÷¦½_mï˜O_v°ž½G#•5ótŒ+¾“Ù* ‰çþ&M‚RkŽô«Ä0AEh-ëàÅ Sì™ÛOm ûžÄuR®|›Xö–r)gŸÈÿßw‡ã”eA2gD+“²ëŒ›KÛMØ€„²TÈn÷çdª°Dr +rí [;Ä"d\RÍò¹¥<¨UL«‹‡–y§ª Ü[)Œ)¤åQ¨:y¤Älì|–׊;-ˆb*¾+1 ùZ׌‹R¹O8l[õNÌiüLæÅÎR5C”©æg› BpªbbQx¯C×¾TÔ/± ýÖlÄIì–UÇ㈃Üûö”Y~>Ð2VÔ#K¶uèï@e„‚_’KH ó©áí`À¤”R˜7Þ‘ç“ÿyømy‘„s·œƒ1ŒOs5^Rºe’ª@‚ãvtž¾Õî ÔÓ* ͹&»·˜›¸îG8Åy+·qŠSœÜ‹¹PÁJK¡'ø±¥—Á™¢uNÆÓ‘y¢ÎV@ !CÀÕ˜b¤K•®}´¼—Q}©«é^zY~—ú5 :âtÌ\Î@)Ã=$ê‰LË…TèÚ[Æ`c»ž½e*1Ô7daRÏÎå¢Âä¡­ I„ÚY7Ü?õ‡êšBµÞØ[Sަ"Ý{DËê 3¹  ^8(#-úsV©"™·“mÉ7½jªõ÷ºÀ¹oÿøÉ˜E¨NÿTGÿyß®¯Ôßë«÷‡ü÷´ 4蜘ŒmˆKƒ7ç†I¦è¦D2R™~¨D(CÒÅŸÒÁ&;I¹»†. :ˆù]tS*Cñxbµ<ø{‚µ& Eèn!ˆ(„(A†s&DG\Œv(ê`¡ˆ>~¨YÞ°c "bˆˆï*>AÕ¹wê¬ÌÏ=LÏœ7a[͈!‚“F46€Âl²éŒW ÏRž pArÌB„fp–ÂE• Ä TëåA%ÆeƒšÔ¥Êâ8'@@í™HD"Œ¤' ävΣ]ÚçD›± 0çÖ+)¸Aà½PE2uœÅLšÁÌРä¡tJgÈ:2T†ÁT‰Ä! §QuA–RfÇ«¢HG• 4LåÂåZEˆ¤Pìa§e¼Qg|ìlAƒzð6Ÿ› v9çaÔÞ¥XK › D¢`Ä‚t‰_Âo _¿rJMáÏB@† n:$$AXî#6ÆÂpÊW'! ¼¨ƒã4ƶ£#Lë³ è¿”õJd>¢ò$ªénBº“”2†!‹ƒÁ0A1$!L†n]Éy è*­ùÍ]T&S"rœu¬c±z@Mˆ ‚; ŒÄ¢>b©…†ŸHׂ:o ¢ñ `B·›ÉxÔ)ú±«ÍPžA –0Ÿõ‰Óï©!Á» ´ï»QuÄ)˜Ä™ù1Øj$PÌ8@‘Ÿ H¤wÓ rò Bp„{Èå™G1áaK: °HÙ„Q MÈ; †ŠK˜Ø„5Ì Ç*U-Ð"yI; b7><ÄéiØvqL> &!r‘††+DBSö("0ʼn8™? Bâ•a‚RGEøÅé¡P]dæ(†£ `"Ôq"ˆTV6)¼¨°¥¼zoM¸­HV8Œ Œ9xÅ ˜œH†S7L2¨‡0¬ Š~Ï©ÑS‡sƒ®QPDävøª¥ âáF31M¡Å®&Ï L C„F`¨"¼7 †ƒ ·!‘Ÿa奠ŒŽd2rz˜MÜ-Y»qD.Ÿa.'RvÄ2B3„*vG ŽH¬a r$b¦*EwLe)·»H®aB˜Êòq’¬Œ¼y5_ë±IWÒpLE|—8ÿíc•GOÝÊ% ÈNR„$‰[¢á9ÜÉE_uvK·«X¶“¤:9åj'R ªL¼·§fa,#mzýK!i†Å3!ÏqZ¤0ªwˆE¨™ª …-Mc1 šíº¸M‹Xg7D¹ŠÉ¹+xµ©;¯g0ŠÔ|&6p¢1Âfµäj•þ¶Li,a9 e\©e¡¨²®ÒF>å7Šën¢9ÎT'!-öl]aÔÙ2NwMÊÐ[âm™…Äf32¸IˆŸ´ßeÁ ëM«Õ—q2g-Eê)*¬ÊÄR¿ÐbÂj,ªu5tá›3mj’ã­ˆŸFÓç¤ô|ÊVW¢QÂqR!ST«*;ƒ¼È¿K™(#ž¼6² Õ]¢.Èn*aT”üÖdÿ#!êç/þNß0LE¨¦TÌÅÿcUÔ#Ìœ(ÎE5ÁFc[¿¥Ø¬1«#¶½N—¸G&íR‡á_%q—ˆ…³qéÈ6öÄ]RRzá=ß¿c¾ØËFE= ›”1öbmVtÁŠC 6ì†tþv& ‹Ò;ÖLR˜!šJÑYÿéO`¦ÌÊ0ºæÚç? A­Žƒ^t)ž½Í‚0§Sfû1b™!1kR½Ô«cfˆ‹ú6æð„\¯L"8´r¯~vše2ÖÎ˧œÖ-©Ü¼LEþ“T²U™hj O$Ê8@„F¦á^DOÅ'Ú†®"JôqÍG)™¬–ÝwNìKø¾Œˆ›Ý%8¹¸œQlœ¢“?;Ôº³PŠVM®PÊ^XˆQúÎQ:¤&{/2 o Ƥî-ÊÊÔ°§êÙòÓs$•]´ö/&j$ÌCRLgBVBTFŠñHeÓdË …mä Í«ú̋۱ôƒ©êz´*ψ[}GˆÍËáüfYzÆ-¥æbQÙr·0äC+“FtÎÍ(Ê!\•Þdsd¨‹‘:ÅÔ¦¯o-MɘT2‡îLá ¬”'¦0zë¢-ØüO-¸üÖ7!ç]"ÈËÅ:½wPˆDU*Ž˜‚Ù,˜žlô\i"mæW;kfóºÊTlõl{ SË-dW7Н¥yŠÍRsî&¯®Añèecäb¬tÉ(þ­5ØŒH¢¶©ÎZ5u¬GÂy´Ì9¹¾·ÞçUT4’™U:cŸ¸nB«J¶cXÈÔlPoé ’iÊσ5BÕ…+]Ù™}˜ž+œ›2ÈSHÆ’H¸ây³ñ;l¤¿Ímü©&m3ØÄ+áLs'þ©Â„"7±ßc˜ŽJiu”½ÚLÂÕNLÒ«4ß‹Šò 1uìèÞ½õšÍ6 \Ï©–Tâ/ µ¡R‘…“ t*ÎP¢ûcþø®”!Ÿ‘™).õ„›JBi5›~B- “Šó=}|¬ôj'!0É ëä«-Tí„éUF\IÒ”'no;öiQ)R}ÔD“­Ré‘äB>‰L* „lC'ÇK¯e“óY‘p¢4¤ÚZôBî0‰D¨+W|¤>’2lÙÖËiTýa õËÓüC›%B&ŽÃ)…&(Z½NæÊWb¸¥$~6‰–jdÿë[‹JR˶Ý‘Š_MZ+ #©vOÞÃ&¡OÄ:Ñ)ª¨ë‚#ýlØÄG …eqjŽºÖOî)ZÒM?žNß{ZD)brPúÏWÇtˆQvu —ìØB6s\Ms躇1Nغ¶¾îÔ”‘N3¢¥ÌTn-LÃ*öÔì'Y¹Uòmýá¨Ä#ad[;°„IM#QäSš¯Æê—(æMLå~¨ükÑÞÒjQ•7w+¼Jë±MÄUÂBË®âvì¯GI’ADNʰɃ‘LGGì¢+ÊävnJV»‰½IÉ\ÒºÙ ˜ÝC{ߌµ]åà‹k%¸Þȵrˆç33ä™¶¬RšˆQYxîGMSJý({O#§éjkinº‰‚- ó$ÕS梥'ò€è€Žáþô}ëüõü:ÙÉjÛQg¯ùÄy¼ˆ <½ýÌÈ"›Œè FÕ<¢öXS£KM¡ˆiù§›yâ4Iž§Dk%ÛêK §Z1FVj‘|US²Û"í"Fꃈn¿Z‘8ï:ŠŒžÎB¬FÂÑf2¨FªR¤r}¨UjùñK^¢w%Œ'./—×È¢ˆsªÉ{Ê3C‘Ö‚Ñh‡k’™y+‡¯¬Bþßµ¢Ýåål#ú•'3XŸ¬¢HM-L »Õ˜[‰¶J Š©FâËŽæ2‹dS’®z[?[(*ðß2+í@½Ö¼›R:Ù*ý]£lBˆc‘)ýEJLê(ÑWh&UEj©Htj&¨E¡ëUC+?e56‚¿õp“áÉcòë[lâ ˆ š+!ë1býÃBJbCW®°¼(RKD|‚¬«pçz*!ÈÒ£"즳u®«e’Âþ^ÍK–A­òS&aT^mÚuŠWaEB !„|QSÆÄVÖn†ÚýÓÅ{¥½¿ÖaIE0ôö•=\„!Šÿ£zŸT´;%¢wÄjc¦YÎŽ+O>Ô¦¡ƒ –è­æã;(‰IwãCÒ(QÅ’©>æ˜ôŠœêu1! ‹-Îe.CæQ›Óºž‹Ý»rQ÷zoZºôr±KVªÅ(V6~«3ÛW®ŸŸáZÅ CÂW$–«-ö±÷-‹ƒR˜â >ÌÌ’/´Q=­•.cú{nŸÞõ¥£’Cµq"^häD#’yñޤ”ËÅð‹§ „(8"Z`‚Ù¤Ûz¯î"¼’"=l-"ZqôòX˜~ÂuWÎ¥™x †Mž¦+‘ÖæoÍÑ®7²}Œœ4!‹EJ(šÊÍ!Ô+‘›ÔB4ÉùOñR«”Ý,’[fጄ­.Nã½t¿01äv¦x‡ÜÒ´æ”JÒ>ËW!ØVrn—x¡ZÉ0‚Fi÷£Uvªlxä*Ðé¿Å%å4O¡]bu:ñ臕|Uó¸‡ Èg•rT)WÑ¥=_î~r!A}‚e']:áUk’WkŠ+Š6 F]ÎYf©KPÉ+Õt.ŸZ½1{…Âq¤nîÚQn’™U›ú}k[¨ÖÞñßgJºQ´Q™LOl’w³¯&ÖF Ëä&rOj®%u-·ÈÊs¿ÓZʸ΄?QhŽ›Si Ò%3³¼Ò5 §B±KÎç;¤ÈoIK•ìµíͧœVú±5{ORM=Z‘í Bâ-<3X P){¥–q†ÏjÄ¥úÒ|~ uædÇ⎙r ¸ƒ4SŽå‹”TZÍĈô6Ê”óótkʦM¬Ú¬{“FyTµNo«¯3J¡FÇ(¨û”RüƒlLÑ–·Ú•QŽõ­Ð¥-ØîDµ—†ÕÌ{Å'S…\’Îä6#ýu§PJ-zÈC1 â6ñJ-ëʤW(WÖE¶¨·¬ç««Í[¦ÇJŸ³yèªMñ£[”2;]-ò–¥Û…jVÊ>âà€ÁZIèä1¨ Mù¾–ú‘òÖW¤xœÝ7Jb¯a§¢2•Gn¯VN*´ÌŸÔ!¶]£¦o½ƒ1Hc1nYJeWÔMC‘RAžRUÍB]Ûôº±"c¤#P$z^v/®&Ù>¼`èòt¾LÂh‹»ù‹¬H…©h¸rØ‘ÔÎzWc3p)ĉÅyKìÃugÁ$ #h‡¬¢g½É|ùk\WA$7ZÑ\C¢;{"Q™5Ênk‘ð½ØU/«#Y¨¤lD¡Erеð¼ÜÑŠ[¯Õç¢íÌô£Ýñˆã4 G’…;t³( ëgáëk¨M¨ÝUD ¨’yZ –2ò¨1bW-ØQPå³ÛÕF]É“¯%—C‚F¢7VêVþ§µr§»,eœ1K¥IŸXíž'¢Ëe¡{¼–Œ:¾&¥k·@‰¨™¦9Ô«bµˆ„9%oòG_zÐnT³µÛËM¨U»y\—Lž[·ngŠ„PÀ€å½ê•x„IgÓv^ÄORÃÐêy’bQ*å`f &|J=]J\!&”ˆÿ“Sª"Rõ TÁŒ×S-]wÔˆ‚êÐŒ,Ì8qI Ù’$JóVËÄÜ¡NÕgRHG$Ôºw¢7—¨Åò5ñZB5A:LZ`™tËž²Ÿ µr1-ú˜wä}µ¼Ô)Êê¢ 0† O·+•”¢?‹²õÚæäeÚ~—oJŸ|÷7+í}.¼Œ"“Jå(œ¨ŠW:Y x¿£­$” è–—ÕYjùW@cEd%þ„uJ"÷i©ÛÞ˜{NDkìëM §t7b¬³¨FE1ùxígE6ÚLý­êQ(' E·#6©—°ÈfëšÇQL<1žŒ8ËÜþ¢Ðýæz×Å“Ã`“·•±ýæ5Q¹ Dv*É–=$jP¦ÝŸäÄ”žLŽ¨í“®]^åA‰Dü§¢„ ‹‡sÙsëuI¯˜ßy2J˜ŠÅNòʘ×!XýÞF¶âÈõig=ÈuR”´'”Ë(ª1k²—ˆXt¦5“Baœ/^„¾b>=äRSf—´öM3Y$óæªÕr(˜üfæ¹×2ÑÖ/”%H‘U¥O”³)‡1\O*fqs_=I§×ù7ZŒM]Óx²‘’³ ’0AGhŸe•²ƒ& ÅÁùÿå¶i‚¥Æôê(Ëba($©1‚0å5ºJŽC¢¸©É%“ÒwÉ ¶¤æQ²º‹_1if½É9rï9ŒƒwÃ=˜Ç>^µÍ÷ÔÝÜ‹*`È¿E5OtSe0ì(*ÔK‘m2a„öŒ…* …½¨´©ªË¹!fwdÛ’be·²›F;Ç ª¤Âf¶/Z”ªýÏrï°„˜’±JÇ5ãqhŸB”F“MrÕ˜ÎoÅééõ3¿»$Ûˆœgtwõ.Ï6ÐÁ=ÅYAÝf|)dAG9þ˜®LN”×B•~6‹AîÕŠÓ¹ì‡gn¦Yª²]Kè‘®cá-èßtîÒïŸj)3r).#cF¶ ñcÜÂ¥ä!%=Øýq; ~³VZî_䢑)SX®­@‘–u z¾d.¯PõŸSƒ?í­YŠ,„±X˜aùöëè ÈE(8Eñ"‹WrÓKœ”4Øûz&ñ´Fì$©Ï‚(b,ô2b‰€3–ÿøÉˆFöNÿÙÿEÿ|qõ‹³’-霾ñè×ú¨ †~M†Ç­³YÎåÞ¯§¾ˆbÊ•nâZ)d³¨7äø¿´­?QÉVóн3ª‡nZP²¥’J/ŒqÓ¤YùFn•$T·^MtB‘Ìy "hŠŒ%Ù³¥[¸daÿHŒJ‰Õš›éª¼ûÆ‘¶ºjà”b8˜|Õ] „"ð†-¤**T0…(PVx¡%8†³dCÑh´GöÄK>—­JsòRÅú-ˆáŠÉ‘HO_1>”ç(”l’_0FÉrR†:>±êõ9]ÜÝŽ)Gs D˯“•LjëËJüÁ[Âq‹ Ù'M’4ÏK'"ðã 8!0n˜wz#~¶lÑzÞ)ɳ?ÓS\i TWqUÕÔ×.놌ԑ‰Z!V”g¤‘:Hž—g¡7ù¬6g¦J]t¥¹æ8¡B–ž{²{po¥÷}5ÙðJ#i¤fvgeÅõMá;M¨¸¹†Õquô˜BcÖôÜÇ7c§œÆi=Q—¢ãÍÖ Uvâ³> QI¬¾¤&9Å 'mÌÛYєŴ…á‰3ê];tçCZº‰rùVËy3JfÞ¿ÎûÙA?*”ù*I¸öSÙŠ‹:êq–T°)Œ/¡‘uiêôDOÔf·#*-ÍVó'ëŸL¥hFcâkIˆIR£W«ö‰ZP#¤õŠ«¢Jë: ÛBŠõ¨_š<_ #VÂrºMÃ6®kû]Ñ0־ܻՈßÏdCŒ0Âúëó¸ìŽC%ìm:5¾¹o[4ä¥O(•&Z¥P騹ŽC+Ê•ågˆB?aK­=çÁ2ğ榄Ì× c¡HèÈ ŽLýSîÇR z>]*ŒÛüŸˆ´õ¢ãJ=ÕEÉDöÝÆzUê‡"åÔ¦ek-K£î¥[X®T²-:Œë*õ=‘ÒJËm^¨*¾k’ª"Ô*…_mA9¹ÞCý0¨žÖ{²j5Sää¡K+¥‡dÃ+ɳ¡0K­k§N[mÁ¯YS2IÓ2zû‘^¦-–»;¨Q™ÇLTÂ}ª|Ñ(Y…ֲ̑' ´öIÕ×®a 8¦cq„WnQ[0œ}&þ$¼i÷¥JôÖr2bU—H*¨‚œ+ÖVŒ¨1çàŽíÊ/“äùóQmNIO¤B>ˆª÷ªßýAI1"똴§ís±~Ùä%v}\8#’ÍÞãC0ÚD)õ¦DÒXø5ˆÜõ$‚ •Ý>tž«ˆ²¸ƒ#°çÌÙ_Ò²4ªI á“Q(­ª²*«MMZ—¬W¦âüÅÅ—)©lÜb%ͧ¾è¨c©“U0v¹Å+úv+\»å³aóÔ‚¥Y<Óa¹–…ôFÜS!hÂåË ÈµìݑӋ2V’u©†‡–¨ºz²25I¥X­bˆ ôÛjšQJçW¬–f6î£Ò’õ,Uf2ñpLån|\œã@¡&Z B÷HÙ¿¼'éÅ6Sj%+±‰âÛwæaâ‚é¨*Ìz¹2¶_/=½ÇÃo›´–=3X´)Æ-Ê⓹Ÿšå0T ¸UK‡mäRP´ûRÃííïÔ|A7{Ÿ>35F2YŸP®÷2œÝ{ÔîÅk'~2Žu,ÎnÒ2 P@¢8üøšÂí–ì¦)q]¡èñqqsª¥ëqR·iH/‡..þëдxȨ5›,A B'¥Xì 8äÉ0!2§•0éuÚÛÛfÅÂÓ ÖŸïûŠf³ˆä¦.uDv^óy.‹ÜfBmÐJ¨^Åòy‘9É¿Oa EÑâ)³œÇn˜y“H-6³ÉATÃQB·ôk*o§ih‹aXv¿)ÌØ¥Gס-ùH©È]QDüÌ+nŸÅFjˆ®d2±Î‚®7³]å{—ʆÐÙ%yŒ×’AjN*¦õþ”¢x¤¬:#?\“–›Êþ¿Qt„ÓOøO#±ËØ÷3z™Œ]‘Üdw.žÄe«­’…çýE/m±ÊÿntZ&Ž¿ìÔËkÖ¬f³pƒ"3$/ ƒ†¦e°„™X£‘ƒp0+£.)!ª;°®S n"ÂÍÅû†™,°¦.e¤Fv9mØ@qvä•1D $â Ü—Œ[]9Ó²Å!2͸~DŒ'Cv27vˆ1Hš½/8T*lQ× ABeÇB:ÄcDSœ ]\dQ¿Ös–• ÐèîTù´ÎéF'@ƒc6' ¡†(Æ;·g%·Ó±UN„Ê6T@\⌌4…a¨š;áÄ:)ÃÛÑŒ¸vaØH1Á ~rYMðE• î9˜Ž ‹ ?¦Q bP‡8Ji’!ûJr3 @0‡Æ«¼xîe^qB1c‰ÂÆB°~½êFj¬¸ÇfS(ÌÁÌ M˜ÔÉ è»Ê  r-7(ãõb‰ääèI‰Æƒ#°G*Р”(–£x ÀHWøÅ‘F-V)Áa2(ä1~lÂu,⸭%ùcº…)\ŽûqØReGVƒâà¡‘+°Æì8«m2Ÿžœ½¼¥Ê|19”c‘ã0C Þ0”Je”miX™á¹lko+"µêE!Ûbh@:1Hu#Q‘!'B¹(eU½Ø|÷0àJ0Lq(rèC‡‘ó5Í9 4rS†Íà†6f4Lµ9L^DÕzŒYÊ£‡ZF™v*AÌ™0e0h26p‰Í`E¼LÌòˆx ¼Ã˜ê9M Lq ôab¡° ´¡ Q ҋñäAF¯!ÙÜ1`G1(l ^ÊgDìGZq¼'E-p¯FGxq,C@n͘Læì#Bµ75Ä,BQ "EXœL¤!pðÜaŒ Ö" ˆ¨ŒxŽ€¢·ù<‡T …#Œ$t"cq˜¢"`D Gq W® …MR۱̷^Ú‘B CŽ% Áñð„D¬u(Dˆ®W8‚ÏÆ0¡8ͲÚd¤Sýí‹yb‹ÅÉdÐŽGŒÃQÀDb« OUZÔÔ6Nÿ›ÿëà P¸@ Ä®´ 0©ï„‡årõ¨¡#©³VfUrf\÷íõD-É­„Ã67béÄu«ß0CmÚR•[5Qêç-“â ª7‘ˆØ³‘ù¨9¤ÄSHõru²²í=–&kñ0¼•šM²†·H†yHAFgñŽ% )˜!#ŒCNS ®ûLÏÔ;µŽ…µëÅÔ­Rÿ”³Òå3isÏC5eÁޤÒf±0Bb]Èø¼d]‘œÎeÌ Å\Óe\ëùÏ*‹Š¸.®6ùHFÞE¦ìn õoçv[©x]²¡´ÚRn”™ØEî« ˆ’ ‹:9¼Kudjµ„8U~&u;r¯Å;µsÌrç8¤¥«.ay®E.¹S8»©‘(J×zÉ”+±Ei˜™Ú‹ü¤™É#¸¨mz0“ßµK?åŽÊìBšKQÖ¼¢FoL„Y^´ZõÌÔw{Ëk-$ò¿*iŽZb Ç› gÚ(¢>ên§ù? æÞÃbŒ^½›©NZ²ø¡J§®Þ§:!&3AÙLÉ-6öÙhWA>’’[S6¶©6©®«ìm‘ Qw.CÖ­#…Õ)]4Go¨ÌáÈZyi«gÏpªôé½hÖÊeVº‹ùµEÿõ=¢îY˜¥±U¢r»¶Uç1Ì(EbríSèëº*ºe_Ðm>"Õ¾üU{×ÕS¶Ö§ò0Ù‡_Å]ä9š˜‚¢S,B )Wì–6=TΩãY¦)d·ë²²Ì"•ö[SS‡ó!jy”è¹ùœuúû:ŠB”JŠÁ>z9y!|Älr¡5̽Š*YßD¤O®y~¥á—L÷ÕCR¸V½?H­¶gúÐC ¤ò=6)„OTÎ>—B‘>š)˧âgW¦ÕgÔ°•r¿Ì*X­¬‹QU(ž;?ÎúØd¤ö¨¬NÙˆeýú^å!ëaƒ¸ÖJ³¹7µ–ÆmŽcD »®‰Âw®U:ž?vÚ¯B•ÜšR¤‰RTÜ#H\2ÐF‘Jb%M6 ¬&\8a“©uÇgïÀR­wû÷zt™rö¶wñå»äµw8¤7ºt¯”³¡TŒï²2G_õA÷Èî·"åEA„¿Pˆ¸tÒRšåim¸0’×:B6OC1åä¿]h-áÌ ½j(J¬ªe¸S.Gˆ\ŠL±_’b6掯âã Ý è‹„È-YRäêÐ¥üÝ–m@¤nµx‹ë܆U^ÝtË‘œ×Z5ˆS7‰éj-„±xC{£_.‹ÈšD:à˪‘Oõ(â=„(Æ}üâ$ýB«¼œÅ[zv‘é7ЈÁk¥3v`† ¦¤¼›ªEŽb+è¾O™Mž¼”O+:[_°å³¡ŒõœB´”Æ#":9ÚÂéïVmJÑ'‹XŽ®&"ˆšÑ$û¹Hlc÷˜„Ư¿QîÎêÅúp¥ }æ ­RiÌ*ïw_'G)5[ˆW7a¥"êa•6õR¹7ìúv§ÛPÌÅv9÷­ÏC[öiЄL~Ÿ‹0«Ì Ã6s§Q|ÊŸÕK8â<%­fîüæírçë£":ßIG[„QVÄ+²{"™–ˆ¡•”šˆ(Ž_ü¦9šR]ÏdÃf/9QÖö#Èl‰ÈæìQOçÙ:î"8[ÑÜu €ÆÆZA™‚~!aÐ!ðÁÌ"¡õå‹Åpâu°ùâ‹hš‘ŽŽ>€þˆA‚J™¾…6ã`£5(‚œCÂåÔ0F }q*+¥Lz­jäª÷Û*Š£Ÿƒ1šà@Cà˜¨eNCZš”È‘´®°>däã ì#XRÒÃ1aA!åÓi L%)Äc 0•µ„FD$à@DcS¤ ×¼%`¾:˜9_¢tÇøÜN(ðtJäF ²C9)G0¦aïÅV "ðÅnDàCƒl¤¥nqŽì]•|²9—¥!;±ÁRS‚ sòq½r™# •̽ÎÓ¡pA‚â>s@Ô˜™©¿á#”§aÝ\+¯Ö]iA>h&Hî^$‚& J5côBgE|W ‚S"ŠSÅn:£„0TäZ'7‹ðÝÈVv>­H5`Î4ÃcVù“Dï‡ÂrýBëÊR•AåN šQÊW¡LÎÑ“pÂhž²¥go)0Õ0+ÀQÉi¤["äVH¿Vÿœ—«,$ÃE)Ùj¤TaS1€"G9ˆB˜¸6æ÷¥3e0ð‚9=é Fjœ~®gc±]ð2˜rY¸#”ÎoÆ40hÊ&/㲎ތ@Bó(ç+”‡ ù‚ýÔ•ȉƒ1ŽT¬€A*’”€¨&ÆM+åŒ(HbbìïHüЦéFÙ(œ]Å£œ*”ë{3 ÜƒŽ¡hBQš@†4 ŒJ1&ˆVaˆæDØÙ¢‹NR¿ñscˆ*~O¶!–™z0!ØŽØ(L+0⎅zhf”D–׊H¤3@ÌByÓ L؉åçëLBFŒç€«ú•‚˜Ã¨Èa0%Â-JÝÄšÅeq\Ú jÅt=ö(̃a%8<>ø"ˆb/Q…¡¦bC‰Fk!™r°ˆd3 |£“ïØŒtî×®‡$Ç"’ßYNjÕ룤\9¹Ï‹Ó 'ð¥tò0A 0ÝX‰ œ‰ 6§á_šq…ÅQÅ¥4~z± <,êJ‚‘d›ebsŒ¤äƒS#1k± †‰Ôn1 ahÌÄÉOP¶`ÅœZ(ªà¡p잣T¦+H"=‚b)PG ÊÆS?AùÕ-V!`â ±ú1Jê¦Æ2týæ Â¾ª°‘L™ W#‰Z"76@„11ñ…%" ªr¦¦o‰œèhBù"URÄš 4Pšcr‘THÆ0F"àI‚{TÔ ÄÔTè:w@½ E> yËÝ›Ù[ !(1 ‡S€ÜD ÂÌ£LÖ›) âN‡{ 7›°1N…`ÂÊl E2XÜ rB/sééiê>èV‚©Mk(5c ”Jßø5c`˜ßÅ¢¨îÂ2”x8èú]#eX€öÌÿøÉ¨G_N=ñØ›|³’•È çvó˜äy¸†N42Hå,PÌì;†W"g2¡¸ÂŒ)ŽZä+Ýý:,&‘c† Ân`Bã˜AÌ]z’„lf‹WrÑf¦V%“#øc¢«QŠ»Žj™Jƒí³U0P3ò!ÄÂhbÚ(É«C:káH,6R‘Sxˆ:71q´ìEŒmŽ2Æ9[Σ+~ÚýHzœ&8#X# à•Á£PŽ5BUÍ~`PUYÖ²TeÊ!‡yŽ…(Œá‘,R±Ü!D že“š1„dà‡T°× ©Å%r'Õ)sSÌoŒ¨¨0¨@¡šfGX%&”&ňVW0>äךeÊŠÇ"V ´%CéÌôYÛܶ'øžÙÉ*âc'n¯«x‚HÜît”²Xú畸#Èõ² "Rd=‰è˜¯ª4†ä6UõÖf3Z.‡1eSLj"÷f3'ÇE4Awšˆ·5[}J©!s–&³<©¢ !‹BQªdk9ø\]äéìòÌFªêS ¨‡#Y¬ÇjëÕ:ÅG"~¥î}‘¼¤zµjø¬_Ußg˜YĨ¶Nu³YK["¹(~O“Õ*­ÊK”–4¬äJ¬rµ Æ,çÍbiK"QqÄÒs–0j“ÅöÚ2”Öcî,­J©Ö–e"5X”!¸‡œ¾rmSqº‚–É‹"˜ä«é‚]´byÙbˆ}†ÅßvwC‰Ö6ãH•Tå7ñ5¹BP‰rŠ´BUù=ù[Ë(ï)ùЪcïsVÍy ƒ6ˆäæ4êK7÷ ±âL0)IóœYo<Í’¨„*áOï•çQ"•U´Ò,„D‘Ša£Ÿ\ËMŽýqè$Õö;ÌžÞîÔ^î5fkŠ·C=¢xâ;ÔBõÍÚ a¾§í½½·Ñì4ŠYG¢ ‹aL^º­Ö¦_EíÏ"ë’A=Þ´+ê·ùÕMc3%l“è…(ŽSi¢V)ÛNÄÙd‡º(Ž.5ÜhK†9 €ªïjãTä/ˆ[…«7§ÜL­JaHÒ=ã Qjú~.ˆËRÂе‘’U(Cœ’-ë/Y‚ŒQ@0¢A£Ô–Z“bÃnI §ë‰¹br%åÙD©P‰%Oöv»©‹Wª±5vâ`„óëP“¶ó CÎÈ 9§’HÇ>ÄO5If ¿ ,DiœLÒ·;y{äžSÁüS!xr§zXØ!ÐÊBsgr%’Cº„}6çÏ0ר˜”‘Lœ‰›ÒªH(Æ ¢Ïh(Rð—3ÍL6%¬„wâd¸£zžä¹1µmu²-$¬h@šCÙ(ì†fQ6Jyçš@cµíÜmj9'TeAHìÐIzd¨2[»p•[6÷^l†ãÊÈ?d—‰+ÙŒ›Öõ²éÜÅqÎ õ>Äê’¥"™Ç¹©k*êwk"«–êMéÄ"ÊÕþ,Ÿ0È{Ž É=å)TÛ ×èº&¤B:îóýHò¦E4îÁI-°ŠTáWBmBP¬H‚U“Îzž×F±~-¼²G.¥+¬ÇiЂ’”vB9,…ÊnŸ³¤èCnâv©7½<Óï·bPö{Ur>‘RF`®:<‹Dý±õ/Ìt”ÝæüÄÂXÄ"JÊзš±NcG„ |¤ .Ê”-é¨J$›´NÿD5]/B1 —ɪ[ q·1iJçÙ#!uÓ¨Û¤1¤„!â¤T1'9‹”£ð×&ñy„¦›È-‰ Ü·ÒPRQ( ÓgJD±Ä*LÜvT²nZß½qÄrâìY+?Y2TQI«¡&B!#Š8RÈvä ¾ONìˆLêS<÷ÑÄ" ú´ªní +ئ*Èžr¤‡!\ÔoÔ¥ºo¨„mA|]qjwˆµ9Ô_I¥C æpD°rú S¡>BÔi8L|¢PÒÉÔjK:q+Kµ2Ž”q…Ú=LJ±‡_HMƺ$)§u1=}™®žµmN+ÿ2NÁÊ0CR½4“ µ6vûŠ9šKä…¥¾¾P…™‚öMV¬¼á¬k–²a½w•¾ÍC¨¿çÕ¸²—×lËç¡ûª©µ¤yd­ÌìV˜Û4Yn“(ÆŽ£=86p„ZÅJš¤?]3ÃÒÔÉŸÕhÈ‹µ,å̘æn2¢ü圗2aWv)~Â\˜;ÎKK¢F®dèt¡ŽôjlßQ ]Ó\!Ÿ7ŒZNô`Þ,Õ†ãÝŠº=?jf¢¬WÅú¢Ð¤Rè‰Û˜;匆nT«R£UEðšë¦ÁvLÆÔ ŽÞzÈÖâXœG•@ˆmÞÃÒ_‰0¢¸šC¦%$ˆ÷ –YÍD°¸^_9-ŽQRXÕµP#“x…êÖSp—mÒùÄöž´ã²9Ãiµ– ¡€Â`¼b`€B[ü¾t>ÂåQP‹ÂÊv€88=gŒ µ¹„o¦<´æ}š’埥ì1 îCønóÊÒ*”ŒLVM&9!)¢ä»7V’O-Æ¿m¤âŠBs{–{aZA– „º–W‚H~Boïy;Êyò'Í4T™ùYCa*¿Ó­R‡!‚5£ §i­u_ÝŠ"S ”KÝ«ÒX…[ÕQtÙ˜mª\µ!…88§6S¥±Cûuœ¸Aê,·’G)D!wP)&ÈY,{&K‰UM,…’ÃJf9‹iË´[®T©mv¦îDb^ïаþ`ÂVÍsÜb… -÷Ç õ°ow²¤ú;‘f/‰dª !«ªy‰žTêÉu1‰)”t8RмÙÇ'˜M_~­õíý uR¢–ýnõ|y•LP¥ {•²6Ý̬r¹ïÂÿšf„“ü"fX(ò”»´J’;¹ ŽNÝT+P| RØ´•2xýrŸ“ŠWÎBûgd3ˆÒBã·lÅ#Ä0Sê Kc¢F‚t3¹Ÿ·ˆ?ßà}ŠâSÑ"¦/9U œÀ 'é`!„Ô Æ`LÃL ´‡¾<”¸ˆk\¡S-¼ŒG+9CDL< ã,EÃHw~\6W°ˆ–ÄjT`2 „'hQ0JF§ÈA"ë1y>´s÷•B¦qWåb(ãä)¬¼@Mì¨M•ŒaÎlÇuˆ1ž°Žðs”7…DîýšV.ßnõ*5Œœ\Eq—ôã;œZóر¾DKwI=•Ì9ßul|U"=›ŒdòÍEc)¶Mj# Z$«o5ûW6½…±—ä¢3E8…H¢rúûf¨Är6#ÔU‘(~ËIôä²)Å~7ˆÍXˆÔ¤—d‘sýüª"¢ª2ÿm+ê_RÔg±¨Ëm.)ÎÔL{â•V†§ÖtÂ)x¯Jsë±^ºY{ïòþDFêz +¡»„eþû>óß,+ˆÃo¥ò%­.¿UæEZ”»ÒØ"PM!Ûh‡:ˆr+~%ÌÅ­+r f¥°Q'i*WW¯¬ØJÒ¬)Ž)0`‚“øæN}ÒŽ Y4êt!zF" ÷âR˜›]«½}ðaëŒG³Jc°™â¦Ò•޼K»L‚RÿøÉˆHÜNý]ÿ<57¶æ¢³’¥Æ Ÿ…òxïy€jINì˜õ»Ù!PI¢ñù™=Écjê¨æk+ã:A¶§ ÌÓ9“åí-8]æUèœ'”ÍR\ÈÃD[¨R Ø´Á˜S:Ð•Ú Ï!¾׷éò¬•úk󨉳VÉb©#L|p†Æ©KÕâ*Q½©O¢‰TQ{5Œ%YÊb>^ÌüIDâ×Ù-ÆÒI)æ3G%L‚5Û-EÔ"D¸Û^¶9ˆÈp@¦P½NxŸ³ŽíVâ1Ùf„Ò5ÙŠÞÒ`Z¹èÖcÚå¨Þ–¡(u9êãgs¥ B­["9ÒÖ5ÌÙ®' ŸƒÍ)!œ^Ÿú^ùKR¾ç°—¦ ¤äG|TÜB»ÐMµ­âŽwµšõŽ[»!«[%Èf^l!$» å9ˆ%ôú'Â¥)nºO–‚#ðœ…ÈŠ*É:\Íç(áòÚänÁõsËØÏ—Ú¬“c\BÉU.EüºD9»Œì’)M"XíŸI¹ã˜qªf@HœªBE9Šá…P°“H£ ŠqSæi’$Œ”m#*>RÂû÷µ²ÿL¤„»ç¨ÞÛÌ®+y•ÒÜ´*i ìöwt*q71¸ü)B12&Wp³q‹,èÖ“¸™nc>‹†k"…48 ?àŒ[• kJª/Öλß"ùRC×dÊoº³›Ñý=œËö0b1ß- ŽÚC7pÖ¿íšì2ËX¾Cy!þÍB­JðoÐá‡ÌÍa*æÝÒ ˜q)¥<ôÍÔm¥Ž\UË—{j×b…+9 +(á%Q'$Eÿ× 4=Å «¦ŸŠ¥š™SùŒv¯5IFcá… ÷™©O«×³\òëØ¹{«#úä÷eº`„h´Œ»G~D«¹“®ÔÑê)(2î‹4kªD!©ØzÈK.ê¾`‡b°€Ž.å‚%¹•9©=Éd½òêC4r§“µS{Ïw•ÊQ­Jú‘¨­‡AŽUš©M<Ès ÅÃV]±LÉRE%Ŷn§J¸G¢qÓ¢wÎÇeE¡ÈÊÛåÛÊž¤Æ>ü¹{½‹ü_=s*©’C"寕…N1õóo ]@Æ1ìr¤ÒW ©“ ©Z“üØB 8†)Þ”gå±Ll·UÚ´!3óó3“(µD—{Hg(þœì$ÃŒrŠš‡g_«2=9埆3š–;xûÈ¨Š¥BX$ŒáF ,ÓðvsΘZQ8½ÉÛód“’Ò"Ö_÷5HAš±ÐÌ5wøW*Hr8•îK½yÊIÒîçBò2ë-mÜW5^¬®R¬Œ ÁíKŽ„òm餘”Ûq}‘ø¼™_rЕt¯dZ5îj3Q_H¦WK‡9Ž+72'È£BGµ*¤Ä]6#ª¯ÚWV³mצ‘vÈç ä¥BH_dR3ù"]6íuÝ­hò©¤ÆÃ0¦,áD=8“È㑜´×Öî¾1ÞéôÃõiDdÏê1®$ébr<´)I"Ã}üÖW°ÚNöÑ“š•üþÁ©Trò3y>E(ÊvRæÝ­2X©D5ÆÅ·µôã9Øø,›/$ëMЄ ’)àá̰Påz˜Î[j ’6&lÜû“?Ô³ÊSr`…ï©$G±|æ‘”AÃéKU(Æ#&ízôn)ˆ.¦1+†ÂšæWRáºg±”r>n™R¨. æ5äR˜,ˆd”¤üÆ•¨¬í…ãqèô3÷2Êó ñ‘ˆ6{O)Oi.R2#¾ØU#¾J$•:©fL)¤;Ì„Äò#Îf3ý ÄÝ&±Ntçñ+õ ‹Ô$«Ž‚ 2b÷ !Bî¢<!žƒLðK@_ˆš Ä0ƒ¤î= ‹Å „&Âs³˜å‹Ò²Ó•ºKý9Ušˆq?~#Ê`@†„± ¦˜ˆòÿa_?—ÑyúÊF_ÅuZéuñßÄ(йD"â_N+¡÷ ˜6ºi)¶•³^ŠâöÊts:eC¤¬g1;MN.aˆ¶ªi>—ãQgÑ„ì4‚¶Šµ1çÒŽBˆÙŠïQAš^²ÿ/1·?Ù]4FSˆ]¹c½OŠg*¤¦-EI_ªjL"‹§þõV[ï(v¯õ²ˆÚšQ’Žè«|>e+"äÄwÔœèÞwm·…^•(Ýž®®äÁ)›ëõF)•qyèÜõZ®ñÛHüés*ö-‰%Ì^ r3ÔßI/^#¹8ÌäÊ5”æE°«bŸuýK1De‘8Õ®hJDŦ‹RUݼ·ôC‹ÚØµÔæBX‚T5òJvÑ„n8›œ„´z(iHC‹F¬@" Àær øgIwBRe2 R¶¢Ápá‚+Á°J˜¡PÔ ~ãc=ÍGÎ(RpÁ§8>­ÔÈ%-O¨#R.€@‘°Âƒå¨Q?ÍUE Â5¶Â ç#ÁLD;Ó‚96·ÿ7 ‡$‚,¥UãMg´:S„iŠzûÀé† +P„ä/r ÍÏB)ˆGAC ¡1ÔMQÖÄ1b‚0JÞ•&WAƒœóìp(™äáSúúX#ÑÑFFxmXû Ðe Ú©ÄÜ€9S"gæ  (™¤¥eÁ³J‘.VËJˆ=ø (u­È¡QH;ÍLSX"†e¥%EÆ&@D 09çPŠSçßZÉÒ¹ GD"  œ†Crt Þ¨ $ˆªÊ¥.*„e"¿yÐ ™:tâF±lƒt°úMovôv‹Î1›F#$ä)´æ0&ˆª¡XsÒqº~G#,ޝ‘cܸö”%HªUæaÉ8«SdA¶l"g˜‰iÈG¾• ËQÖnˆí1A–Š vYÓñ"æ!¨Ìp‚%ªt0¡) joº2ÐF.Ž á‚…aXÁ6ìðˆåˆ_f8C²Ÿµj]ŠÁ#p‡ ƒiK› ü»¸3R2Œ]Eçúäò?‹Ÿ6.) aÁ¶LLˆŒ€ž1Ûn‰0„˪w@Z\OŒ3¡1HôŽ3žLú×9@g&ƒc@PUqZ3¨bô”# ;] žÔNûÐ6'P´8„†w‘™ ûÖ–Âzjøx!ƒxLNŠ…È·ÌèâŽÏ )1êLàœK‰€†CcžÁÁ”a1fÖŽQ—›(×÷Ô b†W«ÏÇ ¹FRõb†•¶’Š`å°ÉˆBœŸƒ(ŒÆb¿¬ÖW¦¬/\ ÈÅŽ0c#ð€U@ ÃGB*’ÿ‚I £Ÿuc„ ÃTéq=ø k7”#™l4K‡ vù0„9UØùYY@€„„ ³ g —ˆ-׃B™žOTêw0aˆØ\}A£ ¸ê7ES8B±ô%UP¾q LÀDdsI—Q²‡È6…+Žê*µBa1í‚ ÍÜà (»0À@È4"“‰¤wnEHa2ì±W‹ú <0Èèí’—‡ƒ  ò "k¶—.Q F¦ Hb©×7AJï¤Æramq© 8½Ùåu°Üe "$@X/¨vÔaÄÆgc޽íh È%â[e!’_³;#P"ls¥Á‡6UîU¨337Did$ʇ1ÌŠç"€‚Š ˆP…xŽŠfJ(ëf„”`†ÔÑ dó%¨:L #*ÁP1DrúP'uÛ”p®+0qCÞS!HßV º˜ºŒsn±œìXÃjA Áœ9@BÿøÉ˜IŒN§lÀr÷ôw÷ÉûP´•)”éq¯ºŸÕ†LÀñÆA,É;øʼ`‚…ZC·:f¨|BTTãlØå6Ï©Äa"©[›°pV†2XôÄ4PäÒ ÑÐŽ5 Ddm&l~%Ï㈠áãÆ‘u)Â…Ñ]Ç£"QOØ ¢•@†£˜Á#j¡˜É©±;®3ƒÃ7Fb)?qLýøsC:Æ„Å_iÔ‚Œ3 axU éF‚]‰CF ˆAÙŽ7žŽ˜¤33Ò§úà„’<©®›’&­Æ)Pƒ(]DçBäîa~fìŠSÖ”ZËò @‹9)†SgŒ»M+Æ:yiXæAqåÉv.UËÄGÈBñ3Ã8…EЉiÄ´›ÂNØ™g&!Ï)B2¥DKÈVV‚´¬"˜4Tmu”q†‘^† Ów@MÌ@Q­AîT#â“%ëLh¦œÌ¼`¡ Öcʪœ-É74 r‡5‡v¸G÷ Sh3œÄPŒÁ"*!£ ª®·ŽÌLˆÙà dTuRÆL(°ÊF4†Vvx9™ð½0A«[Õ-î7\þ¹Ð‘F°R«ècšÀ!I(ÜA ÂæcuA¹Ò0&†q¦ â¸qÅÂ'<@6 °#†H fÎêbÚ $-½LŽäˆæóÁLˆAAMŒRZFáÀ”f1­–²ãפ¤Ý®ÇÎ?ŽAáÙ³m·bgs‘z dhŒÈ’>Â|âQœ¹N…©¹='6€Ù9•™Æ &@T?¥)ÜE e A #î9\¿R „hA„ŒÛöâ”OÆ N̼ÎÜ>¦;)š³Ñ’ ̆rña)SAF"„%N-F1pªTŠP…Ä †³p´¼y Š4&!±(ËÈîx¹®¢L°V‚ 9 p‡S{Ÿ –ÝʵãM$ÌH0C¨¥›Þâ0¦™9ªFØxÑ+p‹»à & ¶’D£‚"“éÐåRf@ℤrÝ ƒê11Ü ÙËL”Ó„+ lü4ȧ D1e$ôˆâÓíþ¦a8Å‚cBHft9j›†ªŒ7ˆˆ*f¯ï!:˜V…C]Z¶&%gˆœg¯,#…É1±ƒaÍò9Ȩ©aƼŒCSÀ5GWU”'!˜ÚC‰HL³‡j’x#ΠԎ, ‚gŒivÅz¦ÂŒù-­a˜Âb‘rº èb´¸¬ƒŠˆQ…ê'Bˆ ªÁ8žŰb‰Ä†³(AJ¢È¯.#ä ÇbaD Bnc#$`‡ƒ8g:ž•¦¢È/4ËP3R¡ÅVŠBr¢W“ÖG 3d‡\Á2ÇŒbvÈŸ(T=ÿÉŠZ!ÄÃC¼+’¹AOoÎJצMt²7s8¨Âq‰»´•g ެu¡=lä,²ÖB¦`é•ë3îH‰Ù”]Ôÿ «çºIDæ5uתf¥U¢L­FKx˜ÄÊVbÈêešŒ$„8«›tDéû4Wf|=7ûk©ÅYŽ¿„D“8G£mäR3œ¶»«ÿº[LäÍկж%Y’†ÖÔ‘ßÏT/ ƒfGÎJò¬ño="˜ÆV*!L¤ZuêŸÀàáK Pb 娓ǰ2 …ˆƖz´=ñXÎvV V «GH…Ö-–ÿ•‘i¿øÂUêU7!H%Kt*zî„ÿÖqêB §n £ÍÎi$þ­°ç\¢)¿83L¨ÅðÐ$%å!ÇPµû4rTô‰JQj¢ªT?’S›ë8ÿøÉ˜J…NÿkÿŸÿÅ¿àOðçúþn ´Ý(ÂqˈgÓ†]'0<½Í—n £”ç)ª4 _]›MÅ¡ÄèÕÜœ!;W„ )Ì;°}1_RÉ /L‰Â:«8.¿\§yqዜÌ1Ì$†ë³¡ªTÁ ‚„:‹‘EgD2zœ|S˜ÁuÐR¦$$´¹±²tºvlǬFŒiˆÁqÐÌ¢fÕOBíèƒLrõ ‰Ä‚<azˆNQ0‚ƒe‚ÃF¥MŠ+E¾ß˜@¶]Ïü7ÂáÁ Úô)Êb±š®Ào9Ǧ-# eÄ R FEDª%Äj\̪«KA ¸«£” 7¤r•iáÃ"Žº@Ä6Éû¥!ÀFçDb‡;…jêqïÈAJÙ£ußËδK„³•¬3àˆEf9$cv.µ¨N3+5Šú/.æÜ¬Í»O™½ÄM<òáTªn¢ ’aÊ"ýüâ ¹—Êcè£ÄäÝæ}g¤U¢°Š“.W§²2eª7-%¢õñ¦ \©qÚ™”Ô*n6¦PB9ÒüµdIÄ)$Bö•˜Ÿ¶%­†vªª¿µ¸ŸÊO!HäYŸýœU]“ßi×3$›f©Ð¸©eׯº´›Þ^+Ⱦʼn—>qLš²håg&ËAÓO· ¤cUEr–äæM¥L©&£Y°Dk&õkv”¨GÌ·ÑùrPÝNB%Sè2é)´hû"1“ëµDW«ÈÿÙRœ¶­nÂv[H14ÙÎ:õ.)‰ÿß!ˆöï2a—C©†ÆùI`ê7J~Jñ@Œfdt4Q'ÆÂÆ|áD§´IÓ¨3Ød#uô$lFk>2Qª"‡2 !Rh¥(®(!ºö¢u-—À€Nr›1D£>HŒj± ¤DÊFÃvŸGÌ4á/KÎö#ˆåqÂk‚ú 1N CqùBD3Ü½ç ø`@!ˆ°R±L$KD:c•Dgäæe) ½Uä"5Õä1SNF3…ØÙ0¬ ¸ºšA¨8‚0”NÃpì´^vè™Ê@£h(R©ÄJ ŠJÁH¬Š2ÐŽÚÆ¥ÑYÈ;†p×|®"…'s"0e))1+6UòPˆÎFŠwZ™©1ôä50†ìwÌ©øâ¤^ ËÔ`…ÁVêl}# 5”Êb4÷27¡tú‡#|gåŠSÃXƒ‰ø`åŒm‰ÛÞÌD‚u `¥#PWw$'A•Tx#™1B äcˆ4ÊÎØ' úXm Š7 $1» Yý„V!sàå-hnEñNçŽ0S(|C‚”¢‘*ˆ‘†žD¦Ý ͹]5ÉŽQ YA,pRÑ™8l ‰A` „"Fj$¸¢ÏF Yn%hr±Ä‹T@#"l9 yÎ B+„ÎÉ*wbó’Šh"š{H D˜¶Ëó)1Eý»líM„Š®^¬‹˜è樦&cá lGÝNÒ‚¦û1!HÜA[/Z׆Ož~ŠCKÝØ+#;D°ŽäÂâhJhØ …1K@¦øQ“2oD¤1dÇŠ_M ¨ç”Â"ЧÁw!aDÉÔ°¦Nâ»sgÍÄ!‡FAš J4"a»WVPQºiêv̲ä C;Uâ®wØ Ì˜ê± Å1:uQL‹\uå1½‹’4(}äÈñ”‹‚ô]PˆØceÊ*f †f¨0x°„2(DQT/c“ ‡t'‹œCꢾ8š>Èq25cÍF!œ&x5¡ˆ€B0cQž­î)V€æ£ß·4÷®8zg&Dœ«NÈÀG1H¼ƒ›£E+f{" 3ˆD‚×)´b” } "óFLÎA 1aK\N ŠÊ@Ç>ˆC„_Ý]˜*s쳪T nÛ¡œÊ ©+P\¸„@!b¶ÔZDgcsˆ1HBš f‚¨BEgR“Êðë zcÊtˆHŠgaÄ/­ ‰X$…þeT"kèQÞÑ1ŒDf8ì>0„"rŒ¯‹” €A¿u5Ì„0 Î…ÇÞg1œ5ˆEqFa„DçB`T½OÅðÒ•º2=TIWŒ¤!¨bP íqaY˜D–9oB©‡ 4P|º^9Uƺœ§u‘ºƒ²MÊž·¿ŒD€‚¶"(Äû"‡*$2]ª >ÉÿF ä`ð®@`Cˆ¨†Q’!†D&#" ´83#1M0êïÎOŠP]ù¢ÁIŠ·¯`r}¾`Ì‹ÍÝ~(ÃsA¬!ÈbN£ ÷™­VˆÊS¼òÂbå(RP" !D™Ï×Añ©†&„xSÒìì%5Ž>q’‚ªœƒÌP¤A®Fh+Ca>á˜ÆÔeV á ¤q(‚^D eJæaÂT+B3£ñU: ª=ó¼UR˜¨c§ØN2 9 а#àhÃPœÔäF k]B!`™ÆØž˜;bÒ@Ãëv‘R‰ƒK€RÁA—•áYP>Fˆ` Q‡æDIè ìÚa•UB¤y ¨€¡ÐÊrAÌ‚ @2É…1É(܈Œ (Q#þž›žœôœ^(Rt[TÉ~Zíƒ a %MØÆÔì2¨ÈàÌŒDfC™™‰vb©˜ú…Ç]Ö/ÊU1êñ\ßPŽ3³%É1[á?DÙ*WíÃ(l ù°NrÇqèÁ»§,BrÁÃbèA=™¹ÀBZ ƒ@„ ¡ÜŒâ9±h-^^’PQø±'ž³Çç+"R„¤ ÌEÃ*«PÁÌt6T ÊJ/h§ø KNâÂÙƒ1uÀI&Àˆ¡OÐÏX„ C‹…Æ ±‘X d)¸]\„ˆV^Óè¯-â×bPwSˆb”ñ0¸q A¾†ÁD"mÌ0G1ÃT ““ïÝ¥ ææqAñë$>fz[h܃Á™;æ7èWê?ëêè‡å·â®ÎLÖL¡{—æC'æ P‘ª)#½‡Šò‚8Pƒ21‘m(û$³ÂA)1Å’#ŠÊ ög醘·eÊÑžÛóšŠ×t±„qŒäOý¨u3cË„¤¤û$ú‘]èFwÁr[0¾ÜmÂŒ—€ç M½p³¤¦s<+¨GiCï`¶Ÿ0&n©hiØ”tŒ„©—†båñLC-D¢¤tÔÍ3þ’îín‰ŠÛIظҌXƒƒ0Hn(±æñ$á‹SH}z æ¬$Ñ0%µ){äÊŒiDz¥ˆíUbtÛcJã ˜oF>õ)eÒÛ©†˜c;ŽjbþOË;¬A€BEÛ‡.Ie¯|•ΩHO­B*eZ‹#R1V£åÑF³Ö#Tâ ÕY+Tßs&p«|Ü ß‰ÔpX¦E ìÙo›,;á. Ä6Ü#L%žÓK/_ÇaÖ&mõ\‰l~YlÛf¡J¡[nyØ£¹\^·]=Ör–e•–ç—ÖË–ò].ìò#)´Õü áá€â1,`pQ^\a©,2 ^Ü:™T?Ëop… )ìK¡IqöÏb‹^‘á‰)•¯šî8¶âŠ"a *j[+¤ÂKQ Û´·×y1×è„Fã'_‰=g±ªR ³Ñ¥^ÁºJtÕ6÷8âÊèÇ«6Šê©qŒP avâå%W¹KO}úPßy4n£¡÷¡ öµ ¤'ê`¤$ô¸©f:GúHÑr/‰˜&Œ% ìI¹üGM…йIÇ_ˆçLNm&¯UeÑ{oqa ÔÌ©³Õ0Œ¥Ð’_LI›—D)GB-Nû,Ñà“Y#‡žB”ß,ÿ…˜#±'—ñ¥ŽRÖÛjY1¸”RL¾¥±f+Èÿœv–b ŒÓ˜_*©*29¹$†­‚ìA ! aŠY8›³ÔO c¼¬¢ QÍ#Æ’Ž"yÇe†Ò`ÓnÈøY(¶;G#È+Ôvâ ‘BMë…‘œÕó’bØLÀË(KæÈ‰2Äb”á†Wézèí÷RºjÔQí([AúAÇPýDj(¤Óò“„+¨aÅl¥¨‡¹ƒ§}ÝDÛV^Þc1­Adˆ+„ÖBOEÜÀ¦RJažúGd ¸*¡âÔü'T·çÂ)˜3!^W V(‰}àâ½_äGˆm±§„´Á#:Zñ&´mc²æñ’ Ñ–1„ð´² µA_HÌ­®Ë¤ð˜|þ%Q4þ&szѪW§Â­Ì³5ÜÁSÊ‚4‹FÉ1sæâY^=x¨ˆJK£Ý[+tL™‡À@­’£?®[›[*\“i1虞2†'àzRR#0è7H•º©§©ŽZ“UYÖׯëT]JJej¨³†Ú©ˆ´óU‡ S†2 ,ÏbOGø³TÂ=R9 Ê% ²l§™te7Žå”º-ÝNS‘tB +i)`ûr ‹a¶ámk(bª‡ ~’— ÒÍ7Šš ¨(¯a£1&y×1ì© Ìqêï‘QË3íÚwî\?Ë?ÇñCëë5øTw¹½ÒŒS»§+EcÞŠ*c¬¨·2nB-몥r§¼Vð8(a`ÐñY2…9rt×~-NXn¸:gs|'ôϧ½YbPv<*"ÐÉ(PAÊ»4Å+Sݧ­µ †ŸZC×ô £’ãׂ;€Ááí0cÿŠÛÜv)[ÅX²zY¢{GºbËC"3xÎÁ>7ŠJUªGõ6ÐŒ†òS©ÄT³œPe-ÿ9.6ú&Š ÑÎ1gÙ]Ãb$\1ÌZ Ì—(ßý›Nv’‹WÕ9D•¬An’còW]Ïœ¨â°#lƺ!êÞÄ9Ò1†A¤&äa²d„É Wc«·N &ñ){ØÓ-ÏØ6³\ÓRp‚±®DἫ·µILþjŒœK1ts<í”W#•‚(ä.™$Cù‰+Û=¥&ÒJĬ¿™¤\_(#bôÁ/k”y8 rJ{‚"ódõ¼¤$×ÝîpŠE—®f¨gYFébÜ!D*TWÞ:,Èû<‚¥ Q^%âЭÚo7aä;°3R& ÿ×* $Éî©Èv¦þÂT[)´µ[ïH6ÌŽÕC“δì 'aЕJ’”K£/‹‰*ˆ£’Y“éðßûNÜ”å0pr4|ˆn6ôðJ áa¿¿i Oî¡I9„9" ‘*¢ûí<Òk§}bQ 9IìŽêÑh­A•ÚŒUE9iß™,„ å*/žÃ÷ňb­Öå!y¹¬K5Sša6»h™ƒil½C˜lT°š»æŒ"K”Ø´6á&vhè`Ä:/ê ƒA³Œ`›Ô ´)Xªx‚SQ¶_q…s‘¢Q1Æ%z¼“yWÿ±D¯ìL\YCåX¯ëB-jf[Gtc!„ʸ0×jùužˆT–• ¸ø&`ËèP‚” 0`iâÁ Jw K:P± ­[èÕ–U«wq5­q#“Bca´Žb¥(Y^€ËvÆ}&“‚¨„:ÈÔГ+ˆ²·ï¬‚qŸHÄ$ú¼Qø!7/W ]°72{0äšCágˆÕv•w‘„%Ÿìnå¼GH‹82»˜²2„'ŠI—V«ýmôÍ̈ù-Ûn¥ø-—õªv¨èdk‰Zá“"åÇ0†žE«|‚X6‰r{ªN=†·–·ƒ¬¤±[†$­ÅGA(Aa„ˆC”p£Œ&H>ÖøºšuÁl¾JS5¤<¯g. !ˆ0†Z["\$ˆÖžÖ$ÅùÚvo8‚xrÜŸäÝIä5SY„%Ö¥±=/–^IhAmZåIÊ]÷î·²Î~tRs8¢e[1Ù_r³U‰RwáJ¾}ÒÍ$ž!h…R „ ½J$¦¿~âúbS)#­Óktö5uh”ÊÙ칎MrN‡r…!˜&d®ŽNtQ5ÿ0µ"×tþIWt¥Mé˜ù£œæŠ a+3–â%䥒Ö?¹8‹çßå7¢S¬§]^ÕDœ·CN-Y,¨•"®*f;>ùjkÙ9¹ Õ2²HËêÅc¾&þ%׎ƒˆ‘ r®òâä»cîváäÍ«¿Yµ•5º–ß[=ÅòÉ~±„Åó6/ÕÊ:½q$ó ÈÞõ8¾ŽŠ~Dóv2¥xúÿ[ÐtB¥ÑLØœè•f\Ù\upq)ü)¾åcKÛú½b?ÞÓRÖ¡¿JÐ…8«r•«»qoWÜûêU27;ë{©YsÛ79Q b¥Y¥DªrqŽ B‘ÔÆåj·I\-ú›­úOÚQX¥*ÈÉšœwE|ïò’•#vó‘Uì‰ev#ȨBÝÝØb³JÓ•®[0Ödê(ªe«7 „—>© O­\–E²ÈÙF åºÿ2 J”¬V„¥\“…[‹B\Cq¶u^~+;Ô¬eï\²Ò´[#y.Ø›5ïRˆSjÊwN0ˆS' ºah…õÜÚA±d»aL5u®[¯.%â”ÄVMG: ‚#²ja—7:ã“Z­YJÄÏ· ˜OÍºŠ¤1@‡T­HA£fµÞâîàšÖË2»>2ûø„)¨¤:"î*·šfEJ9 Ì!Í«´_©òø”=EP£äšíJõåR#Ùˆ„VÙ(”¦I¹–äÑG²TÎåB±_–ÎQЍ˜™ µn²UwÙñø˜J[óIAs‰rÑsjK?jƒœSèK„δèéÎÃ4Dã’‚¦¯TØ]íu£•r„ñV‚_&—NÇl!ð†ñ^„/–n5´‰¹i˜¤Êоg»Š©ÌOæë/ˆ' UÅ ¡£ëÆŸZc rÄ1‰•Äϳÿ¶i?îT:ªb¸—«|Qj’XþÛ”trUìÜéb9’ä)Ëë)ÍÍ•>)éß!“gTJamŸ¡²¹\ŒA˜PèAv##S_ J½½ÿSÝS\Óy*ÅÎ!;ý}ÿ7ÿõ€7? 1PÀ²Ð~ô~TÃUËÞ„'<qÅ$„„´rªc è„& kE“hR0ž›1]Ì `u9’­8˜ Ðw)˜%»„¦Áp}‡ÂÓˆ!,†\.¶qG¾eSgŽ–š,eŠY™†0a² ±;a˜d1÷ „éLÃíGQ@è/‡çfd®xwHE‚Á§( €AF J¢œæÂ2 \glñ:ÀÂ0ǹ÷i—(a©Ì¨šßdØß§.æGŒú£ÄfaÆ+ðÑr»j™È„áVáʦá‚ñÿlLGÊŒÉhØ„s'Æ2A†‘®;ú¨5!wÁÁ`Wƒ2è‚÷ /·5öÌ„qàgƒ8Mè^,`3ÊÆA¸¯©1ˆÂ á25NŒ¬Ñ˜„BÒ¸)¼Ø«ø3\tZ¨@ë †å -6Žá ™³‚Ùð#`IŸ!T@¬A¨ÈA(¨^`²pÄ+G "Ä™,ÆäÐŒ¨E1Až‘ðªk“蔡KBÎgc0œs°å!ž21¸$#qÀˆD0Š¥ä"P!nc¶ðu©â›¥Á â ŸÔh 9sÁ«P4×§ ‰â´~¢Œ0AbJÄXZÀÆA>"¸A0 E .-ÁFaŒ Jàáǧb© R÷”PÝeêʠö)ÈLŽÂ­N ÜÀžO-Õ&Ä¥7„øÅ­ýìÆ˜Fqb÷ˆdÛ6ŠëElEt3€ºêdWz¡TEÌ"! AS÷Ôq(¢D2o5lcÃáB†ã6lÄ¥œ€€†~ô^”EAcÌ)ÿjYâaŸBò·%ÃÉE%„Ã@Š0Õ¤ˆ}૯`È¿kdR%3’‘™ÆÍ`J1'¥’”L ˆKWð´È,»«äZÓµ/W •„I™†Áæ„Гƒ=E>ùD¤HA¡® Ͼ"AˆD%UªøÆA²tqÑÇd"̨wrªÛÄEš£‘iŽ‚*ºbn4))ÔœS].ÄS¢‹þsw U:VÆ"%Å—± ØAB¤šj#f"‚\c0|…èj!*P;PôEÔ½ÇU9†ÄHc˜0µäRÀ@¡”1§ ^ÿœ$Är ŽèRT1|*êa‚“œ9ÅR“„Å“NþòËQÚ_<>V”‰Œ$¬hMj‘k„± ÿ H‚&B°ê\Hˆo±Y@Äc¡íüŠ2@O¾tÍ`ØRêîÄöÜåù/5–;““37!&N19YT¾' ¬¨UIâ)#A9ùc20ÉŽ-R´1„Úå]Ï™êJ!ñ‹¨ÏúÚ„ÑÉ””GÚˆWcóD¡9Hâ‰é‚r"³dáÊcQÛì"³¡åNÆãEj¤NÄËËÜ|âyZ-*~…`ìuÜ¡æ9AærQPˆK‚bŒGÊ-á(l Ç|V¤9Œ¯â¹ÄHcϼò3?‡4 ˆéÅR=ú ŽÍ“f˜ŒØ"’„I¡c¢[Ç£º!9©J)à3³9! ˆd 5ÈèØC ¬C•Q0¸î½k7,QIØ—°Hb9Œd©‡êeE]tˆ»T!q“bc C9‚0Øiþ+øÌ6³®\ãD·BØÑ# Ÿ K’9¦gè3!µf&l‡,“ôŽ¡—„QIaA§74¤;Ðü70&5ZEû–œÇ!wÌÄ:;  LØXc F_ÕG(H#EZ¯ŒQ“FÉ"âT{Ñ¡‡ÊÃr ŽÿŠ]NÌ0™„ã`ñ ùY-ÌìW+ èËðnMν†%5 •jÓ:vŒÁ’ewÇÇbH¢˜^XGUŠ% Þ›ˆV\š ÍD dUUn@˜!˜dÊ=Ã#c”ãÅÉÈIÌPÂ÷gA­áÜ)u!OÐâ r°%WF*jÈÁRh€BÀ†„„1„Xj† Š29ÔQZLНôHd)N¥¬4h¾ŽNg@ˆæ©ÝO Åõ á·1ÄhNÂa‘8˜âN2²&Ͼˇ<´4 ׎#!•>c‚RâZ1-CÑÕRÉS§ÿôù¤…69¸B+èœ,¦1QOB„ °%Ù“!Õô‚|Ë( |Ár7ùˆ°"Ðä+)—•ÉbºªF(ŒôËÐa[b¯È þá™.hLèÀ¢™Â ÷s.À¨"ƒ+R‰áþ¤ $0V8q‡ÍÍŽiLtõ™H#%¬‘ö-$Ž$¤L[Ó…a3HqXèÂq4L1v(íQ &4圇gcõ"’‚C à…L¤k…Á4d— †$XwgȹÆíéŽÚthdA>>XÒ\c»^CÆ|ÇÃ|Ì!Øg2ÀE0a2¨5¦3‘¤98øleŸ”®Üø!, )àÅ; ¼“„4¤M`£#ˆb&&#¤‚# ÀÆ ŠÊhl肬ø­ÚÑ‹È)²-ê¾4JNabˆºQ‰“”Å1Š ¹0`EdÁÅ_Õ)‚t™=gr ôbAªIhôæSa)#è[fÁ& “¤Jd¬ìQ9† "†˜§åƒÄ,©+úsºƒ©4Ã`!D2Mó³2„@GŽ&S!µ7BŒ¨qø#’¥ãO…EAÕz´€h¸âCÅä ˜ûñÚˆ@!ˆ‚q­„Y PÜ!›¬³q‘!‹½?›R” ˜xÒŒ¡UȇrgÃ7A°ãám¡™ˆ[Þâ¡©fal5^ñ"Œ‰D1IIia‰ÈñŒâL`‰_ µ H¦!Ь:™Z ÿH‘©ú¢l!4£­è¡DPš œÈ ¢:¼*bXÙÁ+fJ튇5s¢á­fgÜû V2d†”S+”VBN02C»«?ë¶aÊåáN^wÔ”L~øáF"†10c2‚ ’Œ Ãõªæ`‚V:ß¿P”%Y[TŠ›fÊSߤ%Û f"uiÖe ÛR‘4„d>E(rˆˆ®BáïV!ÊÂ"ý¼Éùr¼”¥,Š‚ZžÌY9L:¥Ëmµ,CGp„T×+¹wE”öâˆæòÜeä§U¹Ž”JI¿¸Åº’Šì䣿fEó•äÞ%œŒâ"ÿmÕÎ):´iQœÅ.Ôºeôj¹ŠûÛ)Ë®ÿ¹Ïòåfc.è¢O])¦‰#Ý {}rÄ75‡"°ßœÌʉ‘UÈÇ&ë‘™ZSéNbÉ!2îIe÷Ô"îÍ™üP­ø…ßBõœä}·§Få/*MŸÎy=V‡ B»‰l¬‰Qyx‚‘÷¤«3¦0žr/4Ê¡”éQ»ÈéÓcìKåÇga•={¹?ª\b éÑ“ˆå“üs ’a¬N5ë+˜+ž¥ÐÄÜíí)Õ2wf>LAVÕÎ"}t¦|ßDdC‘ÂuLc‡Ó3¥ å*ñ;ìâ fÓßEž˜tßAR¹ ÆæIzK0·­†…’ÔoVÚ§:Ub±6­¢/-(¤'Ð!0V*múL~°G~Ï2tôʶõÁ‰ä%”Fµyü¤YÕðµ(LtÁš§Jó±13p¬ŠT2 ›‚·ò"º*sÙ15³8ºB£Mê^ÔN³ ˆìo:>Ð)Q¹$A‘·Ø_CòíŠJªnk\Ú˄ۉ)hg•–t”‡ Ì1Ά¹.¼È:u šŸtÑ϶„ÃÜvÒù°IÚÊF?á¹p޽dQ‰æv~EÅ róº) æz9ŠŽKF«:v";{%¿EÒõµ7 )æS IDKùÝbÕQ¬ö2¼ø"²e=öˆÆºù¯J įg_)4†´Aã:ŒAÌ!†)BŒ[¹ª~¸¶!øMÔÕí]z’´=•^ÈÑTæ|óÎ\´J„¸‹Æ”ÞET |_Äì~ïísrä醈%‰éçCfb1‰E²§ Wêj5E•iá#- ø!ä<ªš¸ŠX¢FzÕ)dB²H}ÛÈþQ"êýSwo­Âp™[ŠÅC‰R(å0¥N[¡ŠÛ„Ë%‘œšÈêe±ê-9•QIa{ê[2å«óéuЮVºd© ¬;PùldÂ5IQy^v©’ޱ^T3œT©Jò;©Âm¸ÞBáhÄ[>].J=×Д5_v»&Û½_sÇÆô÷g)h•aHg°–±¬ÊE²ìÉu¹K*æÞìllòãw—ó÷ ¶¸¹•÷±!%E‘jŒ¬ÍEäË–«×? ´%.~w³Y9+Ãs"Zˆ¶oeЂP€Ç Ž¤Äu¥)íQŠ Š2bˆ‡5(ߦDQçÍAñJhÁÄäÓg9U3ZX ¬XˆeE D „¬DJàŠŽñÔ…„v£à‹+jÙ‘‚ÓéäÀQÉ‹7†X!Ì•„ˆÍƒIQOOØ·ˆqKC8f8Emb2ÀŠB¡Œ‡ £Ò9&\…Á ,4†%w óm%”¤Z ¤ÜÎÈÏô£<)tRAŽä»r|'ãKéô6b€ AF‰‰xŬCXeޏ,ì)¬)¤ÊX(Š¡2„©!’9…#ÃŒ'ؘeÚÌÆžŽBÜ(‚†š (Á0&àÅ ¾Å;˜v³{ ܇&‰“Ž2bÄ”@¡´Š9§Eû°¢aÂ>ĉ)”?BéÄsRT‡„âFDÀh £8B›«E äEˆ¦oÀÊf¦¾êáŠÆÕï;~‡GdPpÁCn&¡©(”‘tÈHä ‚B*cÉÜ8F|‚/F„¥¨ÁDDaJ”Ï­0¢~§¬bƒ#ˆ¢ñ8˜®7'qè\ò·ÔÎ# ) ÇåõŽÈp…ï5Ì1F}7 EL( q¯‡ŠÀÓ£]9†¡Ÿxû”á…lìҘ쌤°@9¦O5[ZDá †h…aðZB ‡`àŽ&àB³ttàc*#|ÉÆÔÆ )¯‚†îqÊ9s”ÌÆj ’ˆ? z °b†¼BE0ÃSD@‚gëWKˆN|Õ«ÔQ*ë)Hr„R“*E*£sÛrô~£n´Žz-Fô¥qzBq*ªI !q‰)Ìe½_ÔÒ‰S× H% ¢½ž¦ª…8b6JALå*I•ÝTß¾‚žZÂc/šš&»PÞ1èÔJ9Ôå1:`Ê¢ë1(ÅTõ[Oñ䨶*­ô˜I„:ŠÚ$ÜdÉ· à—Ð`*-ç^¤{Иö[oÌœÍaü܆æF§ØÄD”„­Ž(Îd.­q8\^`L%’–cŠ9k¼AGæßîgŒØ?ÒÄ„ÂáßÅ@8‘êwµ+{pMK`ÆñMš$ë#­Hš&DD³y)»’ß‹cšg‘X®§`gà ɨ4ï¢ú<òÙ¦¿Jþôšññ:¥kÑJ#ƒBä@bÒ“Dšqy’0l- nC¹<“ü×§Påšü_¾ŠÎ0…-8*@ 3ÉZ…1ÃiaòŸ•Ù ÚO$  P2ÂVÇ—dÙF<¼˜4ƒ…… !4*EÕ'&Ýqá|dÛEöãýb­O1ˆóœ¢˜QE6Jr5ã"ºbÙº,“ÿ/÷„¬ŸËp† Y/5ç©Î士ø†€ XPÆph¬$5g¶’ë=>JE!hŽ9žÊVˆÑKV¿™žo²É%5anÅ\¢6Ä÷IO-óšµÒµqÐCŒ1Da«" PŠg8â`1C­~oé¡ úa?•ç¨R•ä)æv J¤ã團 •šJ§’U.äE1ÀÎ9§R‡ïp´›¯o¿ «)%oÉAmbÀXÈC|{`[…páC !Ù *ãÝTü9 E•‘ )h$JèÓFÑÖ'M"œzm3•p )$Q…a\3LiÔU±'Ë·šÕ.VÕÎ}Á M !#ö|µ„÷ZJ9@à„‚h^{\µ‡üò‡ó^µ÷Þz_^Á°ˆ#]t¤¨M#ú¦0u¸´ÁjK`$O¨ÆµhÒ*Ø1¢µX•ó„+t¡á(MŽ÷’?ŵä…'v4_¢jù-ÀØ“•ÖW-Ó† cñ +-‡99,Uqå2›É:^½ —®.}Д¨qŒ:%¦ÐóV`U¤¸‘n`t¨C›gÀ²e#î]­#+‹’-®lúãæ=C¨g(ZR¯_Á˜Y®Z” QAÉË:Ô!zȬ×k_¢˜£ŸWj¶§G¨ÃÉpAcD„]š81€¥ž_9ö€áÚ~ØUñ1¶æ¸¹5 ÿ(Ž¢Ò˜¢iå/¹qÑ?|ps8@‡vP¢’ëS· zÞN-‡È·ýKŠÌñ«Dóˆ;ùä¢E0p ¦­S§Ô¿‡A÷Yå–$ ÆÃí>auCuüé…2 °Á…3¤p¥ AQ­FÒjß&î–F‰O‰A<4²¥E‰5ò œÊsdaΖY8»Ÿ*à²>®§ð–.Û,¿¼„EŒ·+•tÔ‚0S>8AiÞ¢g0þÚSQ¸¹$>§~ ÷QÀ–…ø—°`+ô³Ø„(Á’!æb³Ò…¹–!‘þcºÄnÇöFR—ÍDzjI‘´–fŒµ«£«Èvw›'Hã2³à–˜ä(¢Ÿû©o(®Y´Ë%Ôå )ôÖk?U܉îkWá…ÄXl rJ'9}ë—м¸A¨9qŒ(Î)ÌäE™œ‡?Õð”Éí÷ú¹ÍX[Øôw³W(b,NÿøÉˆMÇNöžöö÷‘ørùŸû8ýso³’í«¤¯6õPìxða¶(BwD ³qßR@Í´Yú>ÚÎ!+6jÖtÔË`¯`G¤aÀåëú—M˜)ßí¢l׎NÇaËQ òÂBJ1E»gM`¥Ãþªžãë“ÇéÛ‰l-eFóÓ ÿˆØ…"ÔÏUC&o^ Û礱üŒ¦¹U’•Ñh‡˜Ó@ph{L𥋙tЂrˆ;téƒOCVi5%}¦Ó;%Åa†s¤DÇ4¯ÎIŧÕ=>95ªCY›‡"Ma„l`c¸åõ936W¡Þ0L̸ñfþ øYhoiÅ;‘ØõÙš¾È@“_!’)RCÑò–ãî­Q'¨™oˆc¦D*ˆYœ¢•,¤LrP½18Lr|>sŠ2‹m–h%£‚(h6–¦¤RŠG‚8¢%òE¤å©°CŒi9% :ý¬È%9£Ø+ñ¨¤>¾î:TQÕhX¤%Ä¡QUNÒ¹$éÿ8ÅH¨ažñ&ÉœJÛl!Åpàà±0A6iÉ ¶ÎN(mSlƒ’Á.u®¡“åR¡Eyqîv/rgk!Q™©üZÈ5”¡ÓD稂)çGM¥{ظÌu)ÇÆÚh_ùñ>AŠý8Êô0§V,âD`²$U߸KÆ=ýZ!"¢£kïS¬fÈJÛ·ÃÍ !hEˆ,iZÏkÖr HA‘P"ð¤ò-Т¤`ÂãPè Y’'›k…¡ñ5~µmÛpÖ\Æ•ÄJôH‚ÉR¬ ”#µ¾JøQNÊ:ֵܸë†Ë 5ÜqJ 'ÈA9Jýh0–Oqs¯!¥2#fìÉ}¼†ì$ÄL-;Rc1 cŽÎpaÄcîLRó­ÂÉ!¢V6†x¦Ù¡q“ùb ša¼ÓŒ PYèÛ™Iô5Z’ší²©[÷ø¢q‡í,ÆâÐJS‘X¢G)YŠçDOUBn‰âg7õq‰Q†j‡ DÎ,GfЂœr™ëŒˆû®Yt·Tg\qÞE'¦eÂNº"ȹ"ò-ðl7TK¡P~CN—A$±"gG|¨ƒ¥¦œSŸéöx⦩…mç#ˆ`…òêI¡hbHÉF’Jˆº¹ÍԴ¿ç<ÆaiNTâ︣(P“gÓú–›E ¯.–•'"QÌJYŽßA¼#˜Íéœy˜Úõ+à¾Ê›Lª ÒŒ7SSÊB•„H8‡Eaˆ@¦pé1 ÊhÅ"@ws¢9Ã<)M S…†'çãR“™ ¦…qæ=1úÒQæ "$)JÈÏŽF‘X2_AžµÊÞnŽ‚¤ƒ½ëÕ·_C…è\6MÁ« c^´ h03!šÄµv‰Ì••h±d“fˆ»gDÓY‘¨B;d|®ŽGg"3 A?Y7SsÉQ…²!ŸA²¡ Ò”Ž^Z’>fŽ«Ê„%7¥{Ïö¢aØ36v®“¸A|œªÜF#¾ŸÉ¹*EGʵc¶mh[jÆò‘WßB1È’2˜Šz_y—õ†m M°•¤ºBZJ¬‰ÒV­¦Õ™3J„Ö¹(F±L2˜§&%=ô…ä*³2SxœÚmÕC¶j÷ÊŠËÅ «6ˆî¶]:}¢}N)ÕrË­ñ>Ä¥ˆEægA>™ÌÄ©ÓÍJ­Ý<™­„¦[mÕ#7£¬Ì6® \_D ‘ ‹E•‰*)F2H²,C½¹? D4N*’HõÆ ,^¨B`IHÈ µ½Å^×ÀŒS˜A µCgY"„QLW&\ßUeíÝW+ Wµ(È'»‘ÉtÊ} Z*…õÓ¹>¼´÷¢{H´uB)Idúžªq—3g®‘Ÿœõlûý¬…7&ássºmV¯¥\Ä:ùì‚£Pg|Î î“ÌBí¹Õu!ºlÙm}³0¼u'ÄìFÙ|¤#¡(NôA†B4îvß¡Ì-»J ÇDVêKªÿFcdÞ! µšº…²©ú‰b˜­ŽRq.ŽF‘«¦u%±ÉE”1?H0bÒ'weùˆUä-™©£ëªMß&ÔÄa_”ë._=éÇqâ²QýG%ˆpÅCÔ+–›(S®#+XI/ÕU¶_ÇÝÝ›‹¸ÞÄÌEÄX[F1D:#'RÖ[ ˜Î;Šú~; ‹½tbÔ†A&´D9,œB ’'bЬZcNœ3/í[¶ÕB®ÜFgÁ{èb¨™‡2cTJ¢Ù»ò)kõù¿ÖÛ—­ZÐa/N£¡4W)¨ì£V±Æc),#Æ…o”BHú"–íÙ_êÈ4¶Òy÷I¤Þù~aý·D¥qh@G3qç)3TA θ‰…SX`†DIÕ1%ú?”U+Ö¦þ>?Z‚•[Šncú§6Hƹ/•5ª›2H“{®È”n†ß&à¦ZsÌÉBr·iò%¬Ã{ÌÚn­MN§Tª"3ªWY !ÝTÎbY5£™9ž…§u?TSÕ›/\^ô’*gp½YdS% Aκ®¸#i-å"¹fyÄT¼FN‹üŠgK2±—kF"¼ˆ‰C¦Lõ[w3©OWeÒK™„ÞñÐèå.¶¡l«1³›Ÿ›Ñd.¥3ZõâT½žÙ¯¿Ê3¿¡¬1x…­Æ8¨“QDO×V9÷xflo‘ìöZóyw­I³sfwY°¿ML&ÓSuz’2Œ­å ©¼â=2—0†KÝNÅ-1r¾/Ì!ÂbW{œ\^@”j°š«f§|‚"ð·<ª}v!Œ#,Â5•ÿÖtR7ŽÕOÕ»)êØIz—ÛЈŸ~LvÃP˜”¤ß#Œ5ŠAYÜ´0Ã.yS ¿ìQšUìµÍ5åjTù =52Y·•–ŸøÕŠb’µ¨„û»!ÞñC¸(‰G)3\Å5úwUÖîRjÙø`ô¿bµÕ‘•“+¼}Ì)Fª­þT´¦F«‰ñËB™1q¬cîœBÕec_8ß=\æäÖ Úûì†6¡{>bvN­–™¼f*S —ˆSĉbÞtriÙ$žÞ}-–‡²j¶dÑ툧-Ä"WÙĸôU*J꤉O‘E£TT«–]‘@£ØÿøÉ˜N™NÿåÿÇÿËÿÛïêßõú÷ýí´ Lú˜pÐîP†gÛ†}©ù9¬ÙSÈ8‹‰åW‘)‹‚ø„£ßíÜ÷Ô™™äyɨ}Ò+wý —úêŸñy,)’ÙBí{ÌC­XŽPƒ VYj3N"o aãP‹Ô©Ì^Ä$JIˆ«‹ì½.”HûÊx½”¦1Pžr!vR.kK1 †ˆï‰×”rlž§3_ˆ´r¿[= ”¶,É¢á9˜«IÔUÚ‚ò`Z°`Qz˜¥zìSŽêríÊA+ôêr5D*õæ¬[Ñ'Ê„¬«7ÑšjéDW;þjÕ˜ÁJ#`B9 toØÎ¹¬dm9 JˆÄ­=íµ=VˆL4™ö¦V©B­B F£?ëM#•År5ÜJ*²p!›¾ka ¨C }Û™½,ÓVŽ. žâ2×¼‹ˆ~#~óìñ˜Óå”R’Éc¨W,ú¢ʘÚÅçå ²—÷(ê–§uI¡$✮t’ý+¤Ÿ”VM5~ävάù´ÇDM_ÁskT®É&b½‘z§!+Ø\§ˆCˉ^"•³:v[‰F'¾¶N¿rŒý¬ûø&ɶ ‚ädQ7).Ê¥[`dFÝXõÑÊ–8dF+¦gêÉ…˜‚;Cº-E ³ÚêG%Zö«œ„òÑ[¸KëúÞ%bWHfÑÊÏJëÕUÓ æqDo|Á&AŒQÑÈGZÑŽ!„%Èæ½´™/TîŠæÜíø×ΰ­¢•oäå>Ñ ´¸Åe6kº8¡E9ós—ÙpfJ÷%˜Î3ÚøµúÒ¨NdI Ź9³$áŠS¦°‡&):¹ÈÜëéYM™Š ïÓŸ­…%拊%›Ä2¿ ‘~ºg˜Ï¾SÓ2¡ W úRŠ¥LEqÂ*ÈÍUæßU«þ®oeºã†Þ%i¼„0¯¢mwŸce¨˜jW–\caGg{K/tªAÎçQÓ‰ª¸sç—ŠTß¿ñq‹œªÌWËûU%¾Fâ1L!Edâ6®brQuÊÚÅá¥÷0¥!Eîüø•!Å{Wn¦ U…Fw5hK0TE|k™Êˆõ©ºåz¶hÄyk•Q•§DªóP´ýÛ‘5ƒ1*dpéì”çõ\¹‰R²Ò:ªoÖ«¼EE;DÃ׻Ƶ;V‹¢…&<ÛÍÓ³YÉIIMÆ”r¨Ò1L#éªS6•Þb"ç”D²öZÔéé^$ïr3«·K¤×J˜šcQ]…)MUö¼* bjÖLkMêDWÂr¯=X”²õûRžÍVНìΧ|Ò±®—µó<ïÉqÄ FBXMîÊjLBŠsfÊOEgW¬¶ïl ÜœªJ>ת¤\“üRXŸ|ÒÄ®W1 êÉìË@Œ2Ùš•’T餽ak[Q{$c£{è”5¨³óP¨;]6ˆ†®*ʃ•gªé“'f!‘œÖ3ú½yŠPŠ^¤¤™ÒrÊ#±MW×rкZ›‡ô'R¸^ŠqÞvLkmq¬ÔC±Dc3]]—ä箢P¼b´ÅÖÒ*`ýMWfç%(ˆªf•ªäÖˆô:'‰F¹Œ€OBg¤æ¾›ñ‘ëVâ{ÚíÆÔBöU‰C¡B9ŠkåèÃ#ŠR´T¢—ÉaìOuDZ÷¦Pr9 Ƶ;¿Ä2ÈÕs_Óª©FÏtöüéþkï£ASŸ&ậ)†!]Ú¤*Õo#×Èò%ŸP¨¹wÊ>f½õˆFª&ŒÓ#ɪ¹,“™<á=VÇ4C*3efšþ%¾T\.ì™­FÓ:VDqÊrs‰ÎÚs,â''m]Ap¦ôÖô1´„Þ""ZËZ5/Y —wÖÆóbë¥#\!éJÆÏÝä”á#3›–^]ºÌQÑ5,¶bnósîœú¹î:öˆüÔ›Éí²ò%\DFu7_&e!…91 …rN"yÅûOÒ{•+ ÇÛ^/IIò‰dõg¹UïJÑqQzçs²åËêüÇvc^ĺ$¥×FÃ"Ê©I 7* †#v¾È¤!jvöUú¯ÖZ¢û¬DÖj¹-y(ìDr O)\Rð´V\å9U“ÌëzvFˆ›˜Ö&%èÉG&®t¤W åk®ùÝÖ¢ίÄqS$¸¿'þÌ’Œ´TT $”¥Jö4ŒVj/sõ1z*?›±‚„NOä³yéÈ¢¨«R+%*ä‘xªc§µQ_jj`©m¡Œrbwv6O ‚1¼"•Éš™¼On®æˆÄE2ñ%õÆ×Bˆ´(uê}êR»·tU/®»¥¥'¸¤GtC´‹Ö!Õ›YH¡í_±Ð™ë1ˆÁbÍOÞ×®§Y[TŽwœµD#÷µÌ„V˜„"^Øc 1ºMuM"rwnê¥ UË,.½Ñn¤3ªO/Íß;²)….¬¤N4´ùœ2]7JC£ºpŒŽ»&è¦T­¹¦SžûÏ1°¿k­}ñ*Ç.bn•™ÌaèUúXˆ!J#DÌ®6ÚjÓø"Šq’ÅxJMmÛ˜^\ñ‰…t©»'-<üÿ8æH«‹!6¾wçDHŽ)™™ŒíFºçÕúª­©­×ö¦ô®KxØÛ(‰‚–uÁ3IfAÓ3î˜1F”Œ˜ÂÓµ]–¤c1ÆþKœ“­oÓi?P‰æa1-ëè×B¡Yq—ÌBBè9:Mµª¸D0Æ8'É}º¯¾Ròá5(w1?+Ü›ŸZ¬Tº®U®ÆJÑ[Ë‚~ â”U[r- ¸úAŽFkQ\¥Ì"%põêS­c G)i¿‰\D+)»å”„)Yy‡=Ï\ûÈœ]ˆe9¾¹õg4·î«®k0ÎJ½·g*¥•,AH#%M+xÍE/~ý°|>U½{vÕ´Õµˆ—ûRyQ•}‡Ê}„©pªbË̦mµIN*òÐRïEŽÔÝN˜1¤>³ó};ŒìD'éMô´[õ˜¢)JÒ!pM§ˆb«\–T_AF7Ú›‚ÝH]0Å"•jf~­$å¤CÍÖEQÁ{ÒÈ1yEˆŸÅ*Îu)*EíBý(˜¾! ÝÂcÞx¾õºþ-3”TNA3M'a2È3ÔÆs¸ŠK®ù³Kd³ Šæ\ìÇRÙ’¥B5ˆ…bݨ¬Fìo®ôlúåJt1ù.J+¾¼«fôr§TÔò:¹äWsšì¢© Ÿ~úùwd=;ù_ú“ûÃüWûóús÷ûôÖÎJ@}¾YÊ‹è`>¥S®,V«¤ËN²9õÎc'goâÐÆé'‘_æy‚- èaÔ2áÕE¿S­M*/ QB Jv&ÒoãSkÕÔY ÊeíLvÊJ?})Â&—2´­Ø®¤"{Jb]ÈdáP©q–ºõ†"í‰Fæz/ü–¬’}*9ˆS´昹&ˆ/Ÿa Igf»;Wu¬ÔTÓYnMnWðšŸRåPw,S%‘& …,üVÛSÇ­:âù\*Aßi'kb­¦ÈŽ|¸À§!ÌZÒƒ¼”©¹ôi¬¨ÍœÉÛ,¤¡©ë½J£LqEV­E(¤yÕªl2(·%˜üöÅîþ©ÅÒy ¡B[¿él]!Õ(B¡ƒ&ZËEeçÞÄÏF£Û5ÅΠíL•¤SJZ„d´m3¤¾])¿ÖI¯Ð(å(…‘ËWìš—gµ*• $’AÇ@±®}=9)–c©"§WâÓk!­níT•Ü SŽY´¢›ž5 êe’™_ÍB¯¦ÌÊê¸T{¨Ž-yQoZ,“”ŽB3yTÉ5º-é+`þc#ðÎF"›êÌçŠÂˆY aAšò#gZÂfL&YN¼vÝ6ðm¬ä6Íc‘1>;r¬/b-mO½#±8ÅV¥°[>>í ”Zˆ(PÇ#D’p‡>&0±dZ8³-s+ÁkAúÚ9þ&ñJ‹t±‹mÀˆ¤vŸŠ¸âœ­deúÐÙÌìN÷Ô¹ÄRÈjÉÔt©~T©ÖqÃ-ø´cZ’ n®’”‘·P’É]:ž»‹:±HaÖ»ú}z«S0–E{UTÂPüÆõÕí“(a– 8B³)Ý%3FèU6æïÄê¾ÓXN1¥s‘~R¨”7N.››ÎÀ„$ª¯/È:ˆj6ÑzŠª³½c–F'(gaŠ1’9„¾Æ%¬·\³”ôÆtãÈ&“ÊÆFE•¾ün-± W´«ÏVEbS‰O"õ¹¦NêˆÂ Ç 0EiªaeôÄú••l}º‘)»ÓÚ÷íb%'D9!ƒZ`BåûÏK”‚š¤3>Å–¥NiÚÕ9ùhg ¥K(Dn;˜ŒÍûj9ò|¥W‘½dîE0œ$ùþ¯ö ¬£¨u/ÊUzÖ躽ü”äœâ¿.㵞ޚ²êÈ“„ ”¨V%Œ…ÕF5H­ä¥pz*ý+.·všÕa˜ƒ 0¦Y§,Ò`’+QxP§WAZÎ]«TɵYH¾öS[U—ÛŒL!(Á‹%l>»!ŒÂq9íW­&©Bi¤WF³ˆ£«¿¬íLd5ú“Þ&Å8g“HLÖ;õwZéJ¨Bºª#'šbVëL/«§iß-„éöʳ2•J5 "™†r_ÝÈÈJw­¨ÑT©õÚ7†¾|¤0TRµD¨b–óÐBÕ’êÈ%KåÖ{mé‹Ì™Ä|{\µc”™ØªÖþW1²›N^ š7Žz‰æ2©D)³6娕&åÂ0Á &¹ESQq)žmcÉELÜÂþeî<ê±U¹ùQÒVC'ª61;‘ ¸¦¸–m:\²„ê±ÓLPˆ²°Q¡(Æ›s®×ÇkªN˜òXû·©¨¹¦.¶vÿ´tÔ¿¡Ú!|¼jŽI…F#‹”Jݰ‰¶YQL‚2¯-G$ì!Èzº¯‹.ôN´BŠnÅ;þ`‹mMMëN"k„,Bª5—ä6nmVÑëÍøä¶ÏZ­†Uù“‚ºýe*®AJ@ñVg6Mkß]åϬD³ §!ˆþ¿uªµÈ÷5K|Â[Õš†¢>ÈQjŠ;fy‘‚På«ÿ•΋Œ¤«Ú颉^têri!\¦I|¦l²kc Y`Päl`èˆÞ¶Ñ9KwÏMÝñ®%Þß^e\*¨…ˆb.Ë’±½ N˜è“¯¦åN¦’]’Îÿ‹ * n¡ xù‰›ºîá\"k³rêüÕ¿®w%œK$§)5T;j9Ä19SÒO!¼U¢”DK‹Í,3)t§?é)Î6L½wå1Êp …ûð‚d‘ok›îÎXBÏ!lNVÚ)…,Ë!™½OÃ×i_ CÝÈVª’Åã­”EÏ Rærª±ËFÊ™h¸ÛŸ{W)ÝÈvk¥‰$‘bê{IR$wœƒŒàŠ8‚ãYNL²¿VêK UÜ.ýÈ夎R㤂ëIÊ®¸!d6¦Ð„"”ÎÄW¹š«L|ÇZ""Êw^©x´âõgifaGHB ×»rÆÜ¡©Éå)UÔ„J‡¡÷hÝM")Ž)O­ìy”ˆTuLã6w!’lSú^ÓÍÉ‹j·2ˆ¢8W²{õ"1±çSˆ®“UÚ«M5 %”N#ü§¨Ù. KÛÎæ{ŒTlð„âPÎg«mèö]ëáI‰Y8ŽVR©ÕÅpê DpNÑ ²^$JÅ[:œEÕŸgm „¯ŽÖ'¤yÖö.¡¿ÓÿŽr&2kžÖÖªïqµªf³ÈcG%Ì@¡J¢Zf<¤Ç´Dôs»!‘zÿ4½Nqy®;ÅCVÂf·çâíÌ)Èv"]÷ÒßÓæRQh˺¶Ú6/‘ÊžQ’‚5ŒŽ•C¯¦ÑK¹¸L­5&VóLCËb[é¶æû‹+Õ»ÅZ=I –Z™hNˆ[ªÎL~úIü&’™â1ÜS»¡\FïpœSÙ®ÜM%zõZ6—ûôN”•T(ƒ.õùZy6—S¤aœ;,G!‹õk ©Yo¿wÄ”´j­Èy‹˜i}ÐWC‹‹…Eíºg£©$YÉ^%_q*…MSÞUÅ.°‡™J#cZ™òhÖtgã© „,¤åCf)(tˆÂ.:Ñ0r˜brêš_Q··Šž…Õ•,CJl¡|”(LGâöæû‘Pï†(ŒV[ìÒ~!KÄ,«"qKc³ŸÈ²©Ñ”¢¦QJø›¼%>ô?¶\¾v³ØMêÄ.Ð÷j ˆ´¡3 ÃY¨ì˜#1Râ~+²bU}ÔÙÈÄš…rÂ¥èh©G5Д?·XÕWÕŠ^væè7³¡=ês>ÑJ^ù©S¬ge¡|J‘Z„̫騵»c$ç¸F™„!8Z?·¶†!PÏådzp„ìßÞé'W嵿¿[½(”f4ïWÄÞ²ü¨ElÆÖ„­òÆÖæ[?¢ù“7„J')TêW[ô¾o IÉrÑÏGÄqÈö=qý¼‘Qü„G©s_½›Ð_e"6i¥}H¨!_ä®%¹ŠK 9J€„Ö½–õ+£Ü„k¿½14z•LžfOmãyñS\¨!êy…©¿&™qE_-y…£¢«£• ï÷>­+Pb.²ÕºÃP³§ „VÏ ŸˆMÚ ôOJbùO–ÂÐÿE7W.09pæ«ÄyzFuÓ²lÁÎN¶]sÛpz^§O3™Kd×3:¯;Þ@¶eÖiKî³-‚ؕרêµg4{7 ˜1óBGjPˆi'+ÒU…=‡|n•§ºâØ6’?!˾OW‘qå5QxøÅ©çi”ÙCß^…r…_ €Ð s¹'œÅÃLÒÕ0›] 69I)ˆ™ÌÔ‘{›% !î›r‘ÍÄ=š†aL8D«“56äÂÕ2¢ê?ÿfú£,âž*UOëOL)9Ñ=KT¯f5&]V¹ßlz]ùÈú1ó°Ý?¬Žs±N@¡a«äS3Ô1‡Oé-:šÿP£ N-&ïf>nT ø€Ð,pÀ±d(ÀJGÖž!»†G«ˆïd/ ©Â!g³Ï„µu³w5rŠw¿§#º•nžå³kê.Þ’ R¨Ê8ä´Y«(kìX P` [û €ÎÃÿÌR0Å ˜zt}GªTTnâlÒÐàˆö5TÑDœEH•ÛƒyÜ´C-X­¥‘~× ÓÁig(ã{Œ¯˜R²Ö–‰I8£ˆÇE¥wT¶­É1 2âkðõdïÚB A㘉oA¦j!XVk¼ gó[Æ â„²Stœo®ÀÑê+SÆ3È 1ë=Šåná8%¯H´ ps/{^¸Îë›ìå ã»û/ÅÁ:Üé¶#˜Ë2wžDçÜ%‰=‹O¾…BXÔi4‰WKæýÇ‚2ÈààA LˆS Y¡'¬`q² 6Ä'9¡AÀJ—{¬VÎàãzW·¹?•‰EËWkÊÅí©sd*=Nk¹ÔrôXöŠ!Ž+È1Á›&ûé± ²Ë€ÀŒ¬â¶ðV™älè¶)È’U2Ë´¦Æùº Y (k•p‘ rlŒb9,IÞS¤Sæ¹Ø«Þó#>™eÌäA£}7¶Î†Ã˜@Q† ]‰’B è`á—«)”q>¼,2ÞZ½ QÐå1Ë—3´QœÁi‰f_ßá¥Ô4tGJÊøÅåÙrÊsy–²´Ä˜þ‚q¸T„ A÷¸€’ ‘~)Ì%iAƒ‘¡Sü&ÿZ˜TaŸŽVÊÊôUr];bT’I±¤Ø­"]¬£MÄ+èÇzN¬2넱HnÑI„s†yÈÕf‹óy¢Z:µà¥êز˜#CÄ-Ëòq5oâ¡H‹»‚Ë8·S-¸»WT9©Ó›ÐÆT}*QJ3Nóta±x\¬%i ¡l­ È¡ ±«ÀÂJR•@àª÷¼!:Ãbr!vY)kË A˲¶Ú£§–®ýrУŒ{ëÕ3SnB)A Êÿ¥=¥¤âÊF Ô_~Å{È¥»eä…‹Ò @Ç Œ—[(é+eÚfòÒ mœÊù#‰‰êüìÄåÄÊé"ÏÕU™ =eóX¥r,¦‘KÖJç9‘03q‘2“¨Ü‚§úl½wÞì)F3m)¨ƒñ Ý% Û;aŠÃËå8÷!GYÊ*imfšFj‹A ¨î¾ŒÔ8ÏÑTæ¹ñÞ›´Õþ!€…âØ'!ãÁ€ƒ =ƒŸdH¤‘6Ë]R²û ½0ô³¡‚ƒkƒjD+úJÿ†!Z£ÉÇœþŒâ2Œó(Hí„Õ"‰+ {·žß±1´‚4qb™*ÿjÎâ©´XÄSÄ&›5 ê‘{ÚÌ"Û/cËGE[sH¯*¡jÕT)J Ûk##QU{=)±>F¢â„ÇÒrHQ8è°×ÇEF ÉR/‚¸Ï¥£È›…ðI¥Õ[Îç¨üZH±TgfqBŽª5Û%ÉE·¾›bÝ×Öx‹î²<‚Yù.øyltz (2a(qlx±4@#i’‚PÊ–=ŒW.I©jIZ;ñøÌâ¼eV(õŽB„o?™åïOûV@Ü®"S—M•·ß“«&-U0¯RÞCŒU/y~$^f<ĘO" k©ŒÀÂ#M¨Ü²S$‘±ÖMý10D#Ë^«“ÓšñõsU¯#XÅD³º-%5xËb•N= y„¢ RëäßBuWüQÎ T“í#!E©^]i>T\Ùû}e*«aes•%FA¯J‰CØU…J#J¶ GÍ%ÅF Qcœ’›4Z&Ìó°+y­Zܳ¬`‚.Âç©øÈÝÄ&$ÿ b¥¨š{Jc©‰+ìqä£ÊZ*6W$MäRøÛºŠGÅþolÔÿâGŽšQBƒ·ÒÜœ¤}Om×1G,ªç”þÝõF°’ \“ÒÕ9G0˜êBÑr‚ÚA*ÂLÓLÈF2¿vÊÜu㮡$4Fs\Ie_Annq5ü”¥D¨ÖY.E<ª D„Ën®I‚J%[Jômþfdq‹"àˆ"÷¯¤¢"!ŒØ+/Ì)¹VLj‘j”Êq;ëcõúû[ýø?,ß³_é·ý6Ð~´žP›Ëz'Bü'Ël(ì;JªRÜ—Ö)AS%h„ÚZ·§ ¨Ä'azKo!Œ1qþŒWRb>ÈåϯU=qÊ!Þž ®-z~)Å…qS”òW·xWaLv›v¼J/»•ÕqÝ÷’Ÿ²™FS"Y3«ï·RŽu"aw›¥¹IÜšÖ¾?ÄJJüéµtºn1W”ÛZ:±ÕDQLJ—[ÈDÌÇ©æìÞZ+±ÊD*KÚ^Íê9•”v³¶V¸ÞˆZvB¤7ó¯R˜¨…:â<…óVßïÊ ©\þ8ªEjZ‚(™Fð¡Ä:½­-)Ñu>Qœa™ÖÖµ-…F"Ç)De­û.f¡Åq›OÜ•:´¦¡‰Ô&Ój%þLd(t©è{ßiD)ˆBœGz››v A0ƒ˜¥N ®&A2à|âÌÉvêÎè¦rÜT… ½%LÊÅ@qQ7!BK“37Á@JÄ¡Ôk¤‡Áñ}AqN)–R`02l kF\Ãä ‰9¸ ’Ðê£Ä%š‚‰ËaÜ—Í”Œ,p¤'J3¡„$X‹˜ì"GyŠPXîÁ‚#¶„u<á LϹU²×‘ P. ˆ‰b0Íd„èƒÜè`Â)Œq𪑸b/ª™¡Ø‘¥íÁ‚˜D+– E¨$1ÉNÇ ¾¡Ðƒ ØAImŠ."žM3±™ñW0êáã Â.Cu9'Â0ˆ¤‘ÕBhEªTE+ï„’±9ÊB‘”I°!'f,V 2‘ §(Ô†#Q¸¡ÃœZrTPecB‹«¨„Ä‚"‰ZŸJ‰¯=MLÁÑï3ñYâQ÷vO¡(ÈYEÁȹ„™¢* !„ù¸‡W£s"q€Î!¬Ùad塌«R›XþQ"‘ÈÈX ÒX›Ap˜˜Êãkb"ß‘`Ž!„N9aEî¸Nè¯N¡‡ €[oAtÄ=8cN«e“`"¶RÃÒáÐlPeÛF?Ž2iJ\P›0JVÆ"6 ¤¿aXw“"Jƒ)ƒÙ9Ò”a˜…3§D®HaLU_"sD?XA[ŠßV:’†øfqTg06 †$;®²Ñ<A®…ã…x‰ŒŒ!‚;œ¢ (3bsãkº,d „ì@’#–ݤw!û "3˺6 BBR!Êd'j €š™\º2"µs͉|c^N{1•¨Ã¿àîèjjAa¾/bgˆÂA¢PÆFqÿtÎ6:òY¥%N2aÎRŽxÄ$%˵È[‘Èa †XÕ˜tö ædd?2‘JP´SQ%h`Åfu ª>{‰ŒhcÂv6lPB(ƒd"W{ 3ѹ9Hng¥sdŒBl£™`ˆAÊ.ÅÕ¬„.§áÄ*ŸL‚Q ÎÐH(܆1€„ Ì!‰Ìe£¤¬ˆjȆÊP¥…"¢ D}z«‡ÛF0˜cçûS9ˆB­/ \ºhgMJÃ"dR ¼(]™ŒÆ2"ð«û2„2"1éÅ£˜Å†mA‰E5'üCÚ'Tâ¬ü!Ä›æZS•VjsÆF±“‘KáÈq# b˜ˆjÖ†sU¤ F|Ȭw®[S¦ òg_³TFV´Hìzx„ ‚6'~P´ÝؤC‡ePÄ) R¥Ç39† „ä¬ S#œG ËPkáõ8ÞUMw?¦%ü«È{LäâõdaªÖ#ÁTò”áJe†ä³õA" aF1c_Xqš„8@^*©·NR~Ddô)1Ÿç(d 8Å$fBr„1ŒÇ늧ZLvù$¼AJ•`–̹Ó¤!â¶ÄÄ!0AÂW÷‘s¢"Îr¹B9"j‚è¤ ˆ-\ÈCßÕè}YÊØ¹ˆF±Èâ96b"b1†„@ˆƒ@„ÈjJ½̨tç/1\€èQkÁÚ|Nœ©˜ÈŠë(‚—£HC k C˜_U†Rj:¡ˆOF ¯¡Èèb½œÀ*’ZÄ&ÅéŽ)ÊÆÅa(žˆš”´ù]!ª2˜P¦@÷ÇÎŽB B`‰HJ)#•Á@ýA wF OG ÄÙoãÒ`¸ Wç@ÀÄ©¡Œ$QHìw1åFΔãõkA o¦û+4‹k9Wmºc(•?'óºy×w«UŒs%žŽ½¦£öº0T˜Æe¥3/§]ºLR´1¹û7f¢vd©WE£««f3~9{ºQ_ӎꊈ·n*² ‡.Õjïø]\mRoªXŸi †ácÚ¶Íb'–EQB™wXC,´ä2Bº«ÌpÆo­ûÑP TŸ±ýƒ&tQŒ3e¨y†Üyêrˆs9Jî…Ý>õ%Îö¨ÆL Ó)/j—K %9 e}_;2«}uÂqT!HɹR˜S¡ ¤§j" ¢ˆ_y×Þ{ÿèœNr)} CRÔJ]Nd³..«eaKl\²ý3L­G¿ÌÚ¿›Ïa¥JT|ÖJ èêŠM½L¬…ª+§« ÕC_sÊA8@ƒ²ºTî×KM•܆Eã_Ä“hFrÒäe÷úЖÒPMã•J9ôò Äê{Bæ(…J M*ÉU.qèimlÒvn³}†9S„ìîf–^‘Çd9QîUI Õ9ª²Y©²Nª]åtÚIÔvU?”PŒÖýaD+ÙaNÚòní“¥d¨‚7IœJI%ü†µ§ˆqM/HR)òý[ˆVê|c޳ÛRTY6L£máŒêDmnä“âføq™#Rõ`ÅsØ!”’æ[8Ò¢z± ߣ—‡É¿Y]dï!Y(î#º’»vÓ9RÉ!öN¤Fu¯•‰î¼zçž”‘•Ž^__M­;ÍY‚«ÈÚDºšÿøÉˆP”N^ÐLÊR÷Ù³’­Ã!'{rèíy€s·Å†åŒä£! Ö')N˜ ‡†×"Ø©h‘)JíÆ7’cšóŠ4Ö2LŽœôj=ÖŒì‹ÅUNº)•¹öëÔÐÖºKÒSTŸÊÒ”«¤Q …O×(­rÅGV:±Ü’³)e¨” ì{9I)lN;XJñDÓ(Ã.9hɘ‹­´eÒûœ•§ušŠêÍF©<Ü%ÝÆ'Ž8Ëúˆ œT-k¥ ’”(’°v g¹Ô…ÛQyeˆ†”Ϋƒ¶•H†â®;c܇ÖîzI"w±^ïbI3Â"”ÏlJœÌªÙK $vOWæb•„%LB/¾geúz œö'•t’»’V5Qb’Eîüåªbùµª½†'“nURœ" ›FDz~tÐH_…CöVÅ1É)¤bȃ*È0Ê®¢µVÉ7‰}â½"KcÖ&­_%Ývt2={Ë9 -O±Žk+Ê^,Ú^;"D’žÂ-’Îõ5Qlûe•xEòv0RN¥•‘„C¿KO¡?{lÖÒ^¸èÈÚò#Â¢Š‡šÝЉ¤ù$ËHò¢ÌM!î”9Wu Û¨á‚'¥¢¯‘(]fòQ³Kg•ní¡}éH±'Æc‚U5l;dŒf°è×0å>ÎøB]2¹ýF"›±TÖt¶™t¼f/ŸdåáÉV0:$m¡Ål?alT¡5ª…+:pRL7ì’†ù+â­Ž¼_S» X’éE Q7å'gYÕJ$ä£Q‹Ì«äª‰Å¯$‘úÀq« A>¤A5bP}w«½Ô@w!¹Ê1=PKRˆ!qr|êDq4ƒîœ±œíµuœþ¤R‹ºÊ„u+!$MÁt¯dÕ¶¿ÿ«ˆfN ûd% o_;†Cˆ U5QKž’É4·Ž‹x³•\â'TÉï1R+Œ<–ˆ+‰ÙŠþk¶Hb#2¸–î>X•y|oè´)&']Ø*a3˜bD*QmÍiȬÛrŠÂe-8¿ ^#hÙ!(QgF^Îö1 2“uâmM¥¡s»y®‰DŬL:o¾c×<Ë)c1˜c8’U%!¤ ê­Ï! CSqD”ýWi¤B~[˜J—Ñšò¦a&F'UŽFÑ8«ø|ÒõÅ2ލ%ÖAÊf#”oæÇ!Ä'·é N+ù;$³Õ)B!„ÃÅ•'QðCÒZy›*% { æåMAe3ä)/zU[M1‹Rô…»Ês´—4ʼL˜›6—-3i#féRJ_W+Œ!˜VbF±3Ùò…K6çSãi,eôý–øJY¶å·¤D¡Nw„£ÈÄ´ÌÕ³”…ä6.EÃþæZ:¥—!Eë–re ¥jICq13”+J›ºWjµ2Ù]oyko ¶K-ŠŸH “œGW£b½‚ðùQ4µÄNò—Ê®¢²Ä,¨e3ʪ •9·ëB¾*–E=vÞûU@A…ûé[PKשè”J-NEÙ¸§ŒÂ‰—Úñ‰ºúF®,‡a’V[R8§NM¥h=ò!¦åÂ_ÊTˆrn%k›î‰§Hâ‚°‘z(è±,ÖÂY®™›junR)¿§>‘‰"þ‰;¨ÆÏÛ@Sج#ßÑž³1Mþœ(Ejӧ™å\[_V…OaQJ‚0Ä´éÏ| ý&=wìL Lâ¯#t„:ú”A#4A$|B¿±&i\úÞoüˆ˜²2DÃäÍÆ%-âX¤)Y +`‡æ'V·{Ö`VBšééÒÖy¤«ç>‘krHu+Äw”qLæÙR¡©Ä~&¶!<šì ¼­˜[-Ä×’Ï¢“™ÍŒ§f9w";ÉV¡MëÄ[±Ô åîÿá>ŠÏ)&wB*ÖNUÖ~'(«Ä%CãÖå²]´¸q¥s „6ÉÏZX‰A´F3½ˆ™–j¶›CUlWºª [IQÖ á4^£T˜%ÚÕâü'³âe CU2ë½æBÞ¡Bó˜“ñEœÂ-1ó¬Ìa«u¦gUs®ö?!—3 IÒÄ)GQ+±™…Êåo©½?ÏSVÅ•ÓY7_ÒáéBœBRËWÞ¡±ÄGN"gåWÛ°˜&¦ï‘§æß%@Wà ݻ3OšaÎ**eVRñþ±+Mí[Q°¼A›ßè³wZ©d^DY•PÒ6›CU?2¾BøBbבtŒÛf¸§Dòm Ó‰mžB’AŒ4‹t6½%¿I1}ˆZ‰ÎMBå%î±U”DB WVw¿rRÈ–e1p±T¢8a+u(‚TFíΫRµ[b¾(×ìÍ%x†äãpqÁ4El6ÔOâÔjå…=„Ud¢ùHeÒ!ÍüºÌuió„#ŒtÑ<ÆE!NÉÇ%wIƒI·âñ¯”Z³x«Ÿ…I|Ì¢\¢’`q_"{}Õ#KÏÞÒ LÆ9·’T´§¢šŒúBš‡‘옄TVtÇ=^ÌN¥ i$åc[~Œ™DqVbUŽr=;ø´N2\BŠ!WXǯC_,G?¾å©›˜Ø„áR¢Êì%)PôÅ5ZÌØÙ¡;r§2Ò©Cé”ÂЬRñÙž¸GQKøˆ÷ù*®êä*fˆæ'Wo­É¾ßÉiÍQ!¼†•TééÞY—ŸkNýy®~/Uªè ‚µ‹vC™ãMâÆLÞ¨‰‡2e:¦ãqÓ¨k–C,C8‡Z»â;ˆøåâ#"s¯^­¸'N¸uª%¨Ÿ©åóWAÈcˆ“IœÈîTlZå!;&e„Á5}\+P& ²“*¶(žòŽŠ(lXâšD!…ÕÊïÙ›&©¿„›~ì]šW"ç§2Š©Ö8¨z ¶6<Ïø,§Ø¦ŠìD¶–"…òðê#íY**“™Q¨ä+\ÂŽ¼Ôƒy9%¯wDÙ0ßz'X޶%^ ,‡QÅ¿fc,Á$5ز Ú?~X2ÿXå”0]¢¾G¹ˆ©˜wÇE¦cp,F•ºî‰º›Ù³ænRÆ¡èYHK¦C‹ED|ÒÒC.5J¤d;zÍ¥•e‘(!¬ÔãE/³Ý±ËUv‘øT¸ÏôÄ5©ÜùÕC8¯]0­úÖE›Ÿ¯Dá>{RL Q…ݭДc¦út‚JgˆQHFÚø­ÌÃ[µJ“"¥2šüB ’eÏÎŒ‹~Šõj‹µÃ #-MŠÉÛÑjm^4*ëM!Kg)_2¨äyК¼* bj'ñV”òç a[¸®¢t5m¹åé4ލƒ1 k:õ*câxuV¤à0h^! @ŸýëAÿO‰²‰òhIþ fè'¨Z½NfUS§×ȈzðØñÓùÈVÂIÉ“7ÒÞF)ªyØž½Þ—Ìëu¯ºâ3ÓV†1Ý’‚ ȆÑR¡SÜÕ3¯{>_â]¨TKQÓZ¹ŽJQÎåN¥ª¬ˆj®ªrl²3HþäßKj:Y µ®~ЄäY_Ó\f1K(ÄSJWQQM\jKÛ„6L„T!Û‹ï’ÿ6¥2­^?£"O£Ù×_>QIZePú®è\±;6¬âX©µaÄÒ Dløƒ£Œ„[銵“n%æô/IP®›·¯G˜—¥]ç¸QE.!šÕbI¥3Ä”Ö3—ô£MñIœêýí½/ô= dP¬oa75É8Í«@B“©u,&2ý)9t‡.mnQãæŽ‰5œ¯·˜§6aTºC©·®¤½œùåøäZ…!¥¨–l*§WEüŽ!He¨’xÅzŽüêb¢®–Kך¿f•ð!•é γIi7<¢»´R²Îé™ÌK{¯ù9„ùYÇa^øeNi?hlT£PDéÞŽ—UòUÈÈBA””ÌÒRN}¥î¹~« þD*é=+×ÕMå*Í®#9IžÜRúé¥^5‚²ut¶;…)Êl“½ÊUm{Dm3¨‚æsr¦š,èöê5-LöCqW8äkfµ“”Uº©‘ŒV„³ûigÕˆ*M½ÈЉœêÃhÜd-¹lÕ&é°®"7˜‹cu:Å!ižEQN…cÑ´;fùËryÅ]ßÙ«z¢r‘Ñ™DFë¡ Èì…æÆÝ™ÐƒÚ¢Êr‚!ÇÂÑE.¢§æîVª'vŠ^r”®›õj™k&^•æ=EF)v—ëåÛl9‘Û‰s-©ÆRÑÅ Éb”{ÁGy3û—»“jžÍb%w8dtàê̽èÎÍje]¬Â;yêTFR ïµ®ø©éL5ïšÃ©5èeîË2•I߆L=øÅ!OJ"¡RꔘM°¤~—‡*nð„bh¤¸µ1Ë[ò×ÙÊõ>ÔB§PjcÐäOUÇVé¤2±7øçÎ/i’≿QJoÕ!“ ¼Ä*ˆO­ëGúmLe B#ˆäZJ«”ˆº”Õ.ÎSš±Pa”¨|îB^[$Ž~ŸÙhÂû÷æ©‚ò¸V¡ùE}›¼â¾¡P) ¿Hd“ûù›Í!‡)>¥‡Lcã%Ë1?±³O(ßLˆs;œ£d·Äá¸ûÅI-îUI?L3¶ßu +7‘é„DKµ9Ótˆ ¤{ÞJéˆÕ.HJ¾XSˆÊÜ* „Gi™¯>ÿÌŒžúu3-SH<×¹®¹/ØGͶ“5q0Ôb |˨3ñ5dDÓÕ!Hf¤¨;‘×eÒnlÏ”NóêÜ©) ˜^5ÖÓ)ú5©&á]:k8gjåÈÊ$Óüô Î/áÁ׆—¬ÅCïÈ• ]VQP–ïêÛR E®§ZÉJ¢j‘Ñf¤†2-Tf½Æ©”RµL.Ò…~Þa ôf1™iMÞÙó÷»ñ„ qUãQŒ"s‰ÙÀ¦!?I¯×Ê !…öñT³ÉÆZ1¥ÜF|©U;˜Hf²9rnk­ê¯aT›5+bÁÂÌ7N aÊ%©˜Ô”û£Ðˆ@".ÒGæcˆŠ5kˆèîš Q aˆ ÔÐ…@P‘Á£°û©• ô†B[ŒZÊQHCˆ+išž 8ÊPß Ýœšädußæ)Ž¢€‡Kƒ Ò¸Å770`ìAuPÈijQý9 f Àf D:¹J(åp£†¤Ê¼…½°sêB“šS(ÃMpƒ\ÇØxô-|UV75eN~ȘÊO²Ñ:U‘€C B{aÈ…UyZ*6æ&P¢^T °ˆs’òF(Fìa/~«ý- „Îlˆ#̦ [ÅS¹ÎޱŒÐC•V¾¿ —|®ý#0©Ýƒ CJ±•-%WÇT¸h#ô[àŽD1)ä1:ZcÖkÅ™êò’(ÈnI/C–©Ü§ÊFf›ý˜D5\XûQ™>  Â˜#±‡exX †I ¢Òg÷F~i†„ÝD9H´‚ô(ô´C  1 …•P­êø¤ãn u¬³h ¬«Rt†c&2Á*È­ÁD|{)GÁQ8&LË4@JÌ ¿ Tè÷œ$†3³©u9Š¡ „ ¦Ë‘LüèÄÍ 0Ã)+©é1 B\'­ŒuUUt¼jf0˜&$^«ÕÄ~tl2 ÙžY”½Ã¹ÒÀ„dÉ—Q ’ª=ˆ@ÅÔ*Õ\âK+˜… ‘Ö¹ÊRƒ(BµU!„ ÔêÃö'#…R0€2^^â¡‹Šª ŒC5†DA$ðãÒ¥0œœÑÀÁ”˜QÑС:jB! gª>åõ °„­r¦£­É6! Q­Ê¶q>5B"yY±Ìž±FZáš%ÓŒ¬ÎáŠ$¦q»¡V…ý×à™ƒDD0­. ޹láƒb â ƒ ^|¯àL`ÓYÌZe*c߆ÁŒá±Âg ¹$e¨›åk¡ÜZs‘fì5 0ø^:âK2†ÆŒ P!ะŽŽ ´ÙÊÈæ \dÀF˜ð©Æ¯ªxˆÌ Ænb…€¹GÖèLdP€Ìƒ8-5üíü­™D!Kª£5(•ùi†‘G|««ËEÒô¹5K¬Dä C¹Ñ¼Nl•1ÎBÊRQİ•ãç+â3ΣŒT3 ÓÍ@×t« ½Ò8Çs•reæß½©ìŒÅZ*9†Å³î¹sñ“¹¬Ò”D2f©½"õk̆!êÒøþ65°BqJœ_58Ý´õäQ9¸†A»dF}4»ÕÒj%ÌÆIJU忟ùXA$ÒcŠ@­„6•*ˆczmOÅR%PJå8”¡å«lÇ‘ÌBêšÕöÕzèÙ„÷å!UjHºÔÿ|Îãrˆ2f;Ùþµ¼NeBŽöO³ ˆ×¦áM¾[㡎þºúëîÔýH¤Ž9Í1õ?­õ¶ÿb“Ä"©UßËÃo+TÆLPÿøÉˆQ“N½¿C % ^þ ⳑõùšÏÎr¸¼{È iõ#²ÙØBhÂÊY•œbÅ-ïfÔ¿,ÂMÞU>wsÖ^¸®›Y˜²I¬¥+½÷"HO+”CŠSKÒÖ¦df°Âc§Ï7&ÄÆLK•P™–ÅI*V³ÈDaq+'iÊAVü#îIt5fÚ,„ É*…òzUÑææIÓ]Y8GæC…’o³¨†)G'©†2I ):ýe”ò‘´·ÞoÆrŒP™²\k6´aG;äI¹3/îswLã^òÆšã(Û8Qê1*ÖôGRiR"{]Œ  yãæ’5:¬–\«êÇäYò9ʗ׺a‹t ‹9¬Êt×YwrLÛÑn«ÄÍ´MWC8|t]”à…)Õ kîQE1ѤYµªý)µÓ[1*=8½må R™Ó†Ú-&HR¹È¦õú¡Ÿ™A³~«3ˆ‡r¯|•VN3'5™Xƒ A-‡úÿònÔeeqS)¯5^Ô‹M/ïQB1[rô¥¼à¤FBÍnÌÛÐÛuÁD#·ä¸ âB)ÀƒŒ4OUžN”Èe‘ÄâÙÔ¾Dê7Ë{íŽeº¼îG ‚`äðöê8CeOlñx”l©JØÙÉÖ+2m˜öÆ”­U,Ì£® ¤RÙDMLÁ{]µ†dÄT×ag¯Ð¹•AN)‹cŒ¡åú‘E‰2•EÌû½¿‹Äž<¢ û—R:ÄLuöGJŒ’ŒRä÷ÒžEòÙˆêCæ| Z sÂ$Sö;µP§àšWÇ£(£¤ 0¢Ái·$òI!1 ;Ýd[llÇU[„+!èÒ5øÓ«­Ø¥ß§IC˜¢ Q¨˜Õì.O.œ9ZqɤkŸ“¶KÐ[QȦ(‚8ˆÆ­¯oÜ) r #+±’”Ú³ªs\¾—\«í6¾â]1­ûØZ­ä(¬Œ.mø‘z…FÇ0Çs+våäÚašU EÒ2²¯¨¨î¶-Lfi¨*øø› Ø÷McUYô¬tô¤›ßÄA+o›‰M˪ˆc»r•­vü·Wj©P¾ºØf¹,”SmÍìcœáAÊ ‚O¬GfeÌú ×Ü,^œ;ìH¬GÄöÄj‚‘F&I¸È¹Ä2ÊrQ™ï{ël³ˆ*›z„ųÄ1Ux½¥¹©‚œ…t^ÆÅz#é¨Z:Ó_hA•U˜‰¶iªØ•YHeÖƒ~Ú™r :&'J6e*ÔyL‡ }‰+ÔVŒrꈌ#fŠqÜwÏȆ2DƒŸL¤c6!•‘ °TV0†&ë^ã‰àf0“>ÂŒv3bµ1”A6w½ óAè2DB0†bâÁE@(–‚+ V,@)l$#\ b±…`®5ìg2(nGŠԄ@ÀeéõLŒr‡…‘:UìýЍ/Î LjFAߨ P©Ì"Îg÷éiƒ;qŠ~\NfT¦`ÊB3B‘ªðÁƸÈA*aÜ/P3jF°yÕ3Q‚v4@!€‰OU­{!T{†¡]YKD8DDã+Z¹¸¤ãÂd=@½¤E€Õ˜âE yà……œ2!&`L^¤‡ÎSs0È ÀÃeⳊb”ŽèCR˜”H „ ‡1Ï]”‰\1ÀŒìŸÀ*¨]”K±ddNg%‚@¨´O +SW^AT)Æ@˜A µ†zl¹Õù-H 8pEâ:2ˆ‹‚à…âA2Lí¬TiƒF i(sá]2?ô«œ2·Ê…7ŠÁ Ä2ŒˆH±ûÀP…!L ÕIΊ”[ŽIYŒ†WÖµá ”¤UHre>!Fb„:/¼Rý$a(ÙRâ6¨@èBPÓh@¬1çäCc¢ŠP$¢4!{Ÿtp!HŽ7›Ä)«aÄ=j&c("‹œ°$©K×°B &K‘ñEdU2V$\cÂB°Tz/H䀂°œ-@RÐQf1°bê9P¥Ðg Zö†äŒ%p…w8ò¨íZ¬éjȰÊkQ1#/EçÁMfh"¢a ÏEš 7¨Ç@q7æq¸Ww­FPF$DÑ€åó† e1°9âŽ9Y1JÅŠ¡ïjfä t—;Ö[‰8˜d6v?9E¦7œËÑœM#UÑ£²]IÂRwo#°ä?YÉ NdFUÊ©õ¢ NY˜èR‚D¡¨B"´;£€Æ–QGQÕþ‡ÁÔ7E¥åÁ1…v0Å^ Ô£@„ NRäGC;2ÌèRª Â*ä  Xr-eîèvƒ@‰Mö*?¢±ƒ Œàž»Œ¤søÆ!€€ŒüªŒ‚ÏS‡NÓ­¢#61¿™ìÖoO&.æ’/1D33ùDDÍ¢ÛGçj- wä¼Å\Zç*•QF".ãŒ-~DBŽ—2JMZᨺ•R©8¸Bÿ=Hž!¤ù"Vœ»„wzIÙ?¾LAD„rÞúßošì`aŽlí.øLÇà²Ç¸£‘¼aÔ–VãT˜‹":]$mÂ#fHSéD2©uí2YŸ¨ô-PgdÖÚ¡&ovwF.Õ=v¦ ß;öeÍ«°¨1†Þ–Б8+¢™D&“į(v ¨$\]Ëz,f›¿¡ ¼‚,“ ëþb váã`“†9.E8În­¶ûÉƒŽŠ¯:ÐL/x†Öj.-œ!cŒ¦ÆÏÐô_vßË=mMëì·)9~T31—RòO-Úq”|QÔ’~Çߘcã ²~%ú_ÄÆÍ‘Bù¼oöÑWˆyd,FîY¯=)0¡^@‡*™‰Ãégûy qƒ$²®ž¦*çm)ZVÿ·°¬›eѸÄ3ÊéTeD­®šädEO¦ü,^”GzJ©„þB—AÀpuXB¬ðÿâ‰Ì)RG¦šÂîs C+nH…%èOm;„W)ÛûèSK¼Oé7Pqz?Ig *Óê+u ¥5LC*@ àð\BBí#Û¯µïÊF郅bZUid¢Íúþ²¦"‘1QµJåpâéZ axZu1kŽucl…RZ"Ô™’mBq2ÎRÃÅ™]Oö]ùbÓ;R…¡«*!©+ûxËs_w>ÁA=¾Ñ->Bi:[F’¢Œi¾L6JNþMWÊ_õ¸¼îÖ´íhÚrÇ Î|·«7ª6ÎWªòòåˆÈIÓ”b^ÛU”¢TÔZòË/ö”í™Ì!ŽY~±? z(Æ¥5‹WŒÌµZmQˆŒC\la…}¥*â$[Úò…6•A3sÖÄݳÑAfgö6ÜN8¨Ï¨ìµÍJ:Q~¤nµˆÄ‰ˆ9ZGC˜Å­)˜ÄüóíÿfDZRƒ%rˆIöäÊsh–C©\b•3ŽçkpŸh¿<ÎG}½¹äÉ–è[m¹ˆ: ‰Ó!upr•I–qNkzÊ! zpÁÅgÜöQmMIÎÅÖÌmzy7rEÂÚÛçSŸ(¢’®B(Ô+°¿áG3݃"(ObPq’µÂ·í¼L˜&ZÌx”7*5…*ÏŠè'Õ,¦?2 DÔ#®2T®Ó'›¦ Q•H‡¨‹ˆ˜G:œùš…íæ©èÛu\½©WwîB ­Èã•„¾È9 dIÅBû2­ ÈÍѰ¤r^ñ5Ìõ“„ñßCovä®u*Yn¯êa ¤Mt¾É+—Qüæy†÷ɵ®gëÅÕWÂdÅ=+Ì«F=^[1ÿ› ÛlNyJÌÕ÷ýf§ ÂŒSvµB+&EB¥YÜnRÈ„ªm¥? ƒÛñwŽö˯%¼‰«®GN¤Qó¸æq+Ö@ʹKH«"¨¤#©m/]|¢¤0ßüoS6ÔU7TÒ)í╤Œˆm&N®‚ÒF&›ïÉUÞ5™ëÅÂ%Âm˜¿­œê‚pq‹µ¡¸ä£±Û TS¢jÑü!žäRxS) =Ú)Šz­J#ÒÓm›ÓJÏ$Ì0¼;¡ŒÇïÂQü Ä TtÃS œBžÕ[H ë ñG8â¥DŰʑE VDF˜5 ] -Æ@DbúçÙˆ§ .tÆEýã"#¶"Áyœ@ŒaG‡šØR‚7IjŸaP–áq!¹„A3 ‹Æ F0È.‚a½ÖÊRŽSádK—¢¿V¢!¹µ,Zƒ±K :`ÈBõ?) ÈGš"ÜW ׯ Ô @èT%5ÆÌ à )YöAƒD ¡»»³˜ˆÌÙ…, £ ÛÕ’…u8c D̶‹x‰?AÜe‰fb-((Ô„¤äA‹s™ÏŒÂhU ð¦w¼—“ÆÑ»¹Q¨@$<_6ⳕC·‘}¾º˜ï¾éÆêÍ3tåóȬ^Ê+"˜Á† s‘r|DAÜCS.oSy›ºL¿¬…'§jéM÷ónUˆBœäÑ/I6œ‰â'-V»¨ö'ªZŠ–Ò E ¬Fvª:Ɇp‹–Nìª/Ó¿ù\˜¬{é¶¹d_TÓi þrP©dcˆrwftâvª\Rˆˆš¥rKí˜G?‹÷Ì/.Œ”]´kl²9•)ŧtNÿN­Ì… "´lÍ|%eözuz•±)‹û½Wl˜ÖÞ¤´¦âÌÔ~}çA[4¼D˜¸m¢(Eñ–!1h²ê4EáHANc3ñ3ó„¥ ×"œœ§½o¥þf&¯òânH´sì…¢^„ ’ Õ"ØÕ¶ÚÉÿEË`ƒ” WœÅRŠU^@Á @¡Á ЬR!el&6îÅ–/5Ê‹û–DhO¿k›Äˆfîˤ½è¨ÌDN—ç)o PŒ AD28cæ+? è 6˜¬[8æü펎‚›žE!TŒ9ͺ"±‰Äø'Œ b (EbÄ(†A™Ø°¤;‹‚£JPVÐµî¢ å~°n„! Ê4j¤•˜È ÄÌaH®|ûèGú<ÿ="6Hܵùx,vèu‘FäÛ 0€L#"&0§jBŽª›£ …&6¿"~Hå"¥§Ósúÿ-Yµ øF!)„žÔÇr1–ÔÔ“Íž¬"ZæõS˜Ö2 (ÈW#ºbÖŒ1G+.)¾Ü\z¤o}µ°M ÍùWw[ BÉ\B1ÈÂ$… Äu''ÞF&…d ­ÿN«ÉÂQè@¤¥«ŸDÊèœ2‘×f± žgkŽ#Q“=”¥Wñ^ê! ØØæ}}{:§D©Zé·šØ",õuq$µü•1ªnΪùªýBl‰uDTê/­„Y^­J¹ŽB)½¥"ú&±öþæ×¬™¢£Ž±OLßßΩ"¨†c©™kÛec‘Xç‘«¸ýV·é F Ý±Kº‰Ú]ÛPîAŠC©ˆôÁóeEÂB¤·É.Ft]W¶µwsE])Bqz™M.þ)“”¦â“IlÖ!öŠGø{ÝTª8C:šœÓŒ‰VJ•ù÷mÜ¥1o/îÛ‘7†o?=YD§áLqz‚ã7í3{ýHaØg,jtžBQ‰ô+Ñ$“kªÞI7_ÊmÝòŠD±H¯)3èŠÖ *†TÓX˜ØU±‚±«É{RœÄt)ì¢Ð”å‰É_õþad:-‹ýmDENn7:µJS&H©E{›YÉu°†(VÅ—©ëåB9É”d6}ï‚/L—)hâZ¸©qp…ȉuM:>bû­Æ4Î̺GúvSnD+ÉSf. ½ræ8ôä£È²H²¢#»m(œ†;å96µÊùìQY7{¯~Zv»¶óÿ]Ÿ×7+™5£¼Î^Y,e •iØe1VR66h5pBµc#:©Q”B³„)+‚¸,‰àÖ¨Îaò^ $Ý"Œ†URZb ‚LÇ(å9ŽÎD³/î6HçÇêÝ ÁÀžL‡&+0@ÈKR¦9”hI1•NB·È_Bˆ>öwp£‹ †uEuÍ@•hœÆ"¢Œh ‘²Ã ¸! ÐǹTL¨‡'ôöÎ(Ê!U¢ë©ä°2 £®è¨ †0Ã@IÐQXR™š)P<ÄP…'ZñEŒp‚VEíŠYð!Á B ÁyÒÐ`j(j¤(¶sE8 ÎpMò¡ùHQyB4¡ ¯ä(A‡ ¼¨mÌüˆ†R* ŒÍ8ÿøÉ˜RÍLÄ@9à /ýŸü[ýhAY~D`‰Õñ’úÀÍq·:¹Ê¿ÅÅx‹ã~ÚÎeuþ=ˆ¾®ùT'½EcRê¤AÙõÉG1œ†\õ›ÂåO´[ùyÉu§v(ŒÌ!õW1s™Â.›ZÆgT\IÄQ‘Ê…dÒ7µŒÒ¿mufËKS×4Mîm'cØž¨Â;]ñ—•¦FœEød™4‚²æ©’¸l“®œµ&ÄÌå4¶bÖCÔBTR űè“;U2תåûo`”+P¾!Œ…ä±hs•id¸¥Òò\ĵGÚܦáéc[?^n[/2Ùa’˜SФ[£1†(¥,î§1g%|‚:š0˜Eö‹_½°NAõí寻›Ìv5I’(¨mCÏsô…ˆJÌÑÚfªL‘W|Z>Ý7•=s0‰æLîJIÔE:³Û6q-3ïu%v*×âWÄ©MDΨA YI[SH:¾O‚=ÏO>­¤$¸Ò·í¾J9ûleíçEA›X1”˜éA…Q‘—L¢»9¯V%ËUÊaÉ~½ÆÛö¼˜FÝV%w ÈC̯)ÈáW(¥evaÖ!„«ê­óÓ‘ïl« )Ê]ÄÛÐs”„‡;(DÊ‘û̸J±«-ؽ~–ã ºB»°‰ÅcZ‘I%Ô®Œ"’^M‘ŽNiB"'ß»¥²—{þŠxQS]ä'D1YúŽ2=»S/RûF×-¯azš’¢ ¯ìJm2‹±EgÒ®Þd»Hí¥%_.‘Zå6¶:Õý%êò`ž2QäêTê\sŽ÷}^«Ñ­ròåÕ¹<þ¾A½ –òˆgz˜r"çýEΜZ fÏ'fm¶% ôL)9ß7æ˜Çª"ÕÉäj,b¹Nò ©eQH ­È\yTȹ5‰ÂÃb©³«½YDö”’nò—ÔÉÖ£f»™i2D\ð†K:8bE,¬ÌoE6,L´•sù<"bgwü@ÊdS;™LÉ=™ cBá8Á)_/ õð"­zBËJ¿¨’κSÌ‹\ô”n! Ôé’tz-›þ|ü}¾ª„[ˆ˜¦…QR†ÅÔUv*—ÅM‚!QðûZÈV'ù)éæG¦*>gŒ–%ìõ»cƒ.¢‰©õM¡í½w:Ò…j“.ï|ªf7”ÕQ*ÝÕb ²¶Q#0ÊœÏD¢Ó·(LQö]­$F.:o0©‹”\nM¾i˜Ý¶{%*÷&[Y§6͈"ÐP¤&%®mtÉžBˆ“²Pú¾©#E; BLŽ»”Ûyikí­•©ë·•/#qÈ©ÛU_ǿץ$Çf%šŸèwN0ÍDîOU¤ˆÍY,%t$RˆÌÇñ9jò \§¹Wä!_«žQ·ä!u¼%žf?yˆ)œ”«üg;JõPÃ’DÀ…Ê CâqѲֱ“¦ÕòÖÄýÛwïà‚:SÍâTs…d! í â¹·r¯9¹$˜¶Ù1†ÁìãÐAEĬB´•HŠd8£lØå „@…¢‹)¦=S+Ô­4¾cžÚÊæ¤‹žY¦i$#,ôn&h!^„&¡×K²QÓ’ˆVz²ÕžA×ÐùGæÂ«awhKŒØ´½3H¢ï(CH±LËræ¶z™êëÏcyŒR7ËœÛ1ÝpœdLJ8çTYj瑬!æâH‚ñ_§‘ÎÂÿRdµVS/º—^h‰Q¡j­Qœäj !Äpuï’ÌAoF"†ªÑºæ,½Õ“i±™Uþ[™PöL©ÖÈªŠ·Þô±¤1×V åJêuFëœçvârHúö³Ä4ŒO6œÌޤÃÆ—·š‚f;ýéèeÓµxYⵎH¢&‹dà†1éB1èº†Þ ŸJV†ÂæPK–ëló"+v-‡S³ÌOYjŸ6¥ÂÎ"Þ£kço‡ÿWX_‡„Ü\ZT…-ÿ¨¨”9^‰"÷­RƒàÙwf[+­’Ä P„»xÅtEöçï&äýÅ’½3§W„+­šr—ÎÝ%ù.ͽž£.*ÆÄÍ$v¯ÒœÔ¦-¹êÈ9“>×äô*1ÛœžºßDg’bÝ×®£i~©ˆTN[œB×ì"£y Ì¡©e+T®þáî×ùóhd¢Îø– ÏûáªINAÞdj r„ìøSÒ´”†{˜…xÒº—fÑD%Q¦'–oMbšÅc#•™…µ3°v÷ËñPo«B§V‰E'©›’Ub³(GÎ%Ÿ 9%/½$n“}´“KO|Îê–%–)›Z‰ToAb’§5Sy‘Š‘Œ`¥Ô/mZGѤ>ÌųPJîk•ùŠQ7ªhkB1ŠJ–rRDrJ×ås»¸¢%ÎSa؇ÝòZs¾MEýÓõAÄäês–ÏÙB²»ˆž»‹ÕÆ3õL^ætiä é¤äЊçNL ž¡;Âe1¥wÏêù«*ù„©N1/o×#r¥IUZ˜â9×ÓVâ2«™ˆÔã½RµóycdÖœazÖRˆ7aJ®Jœ‚­ˆ§ÔJ–õ¸þ5èÍ›ÌéöAW¨B]*ºï‚Äc¹bŒyˆ|»eÊJ‰ÂYg.VÓ²ÚÙDY Q6šYNÚû##?qwˆŒ"Qí&ÖªyÖ!IVi…-šÍ\ßN67 Y›D6h‡ ¬®u§âˆ´GòU Ê›­ÅZ#ÌJ®é-j¨C俇aˆ©Wb‘ÕxO?ÓꓳŒÿlH­S¹ö Ñ)/Ó—¿[a;wZÄQ Uä×ñê©2ó9ŽzhZ9YréÔi2•3©&å³ð©Vêt…>ð´C[)d3~“]!ÒDEÎ!hoÞ«¹ÒBd¬«G`¬ä¥ûÙȉÆff,¿.©ùÚF …õlj³ŠÉœ³tMË8ˆ‹U;±iIáÅCê°¢fÞÂ-Vš[–gÒIæ©fufcº±²¤ÑúY}ÙÔ»å™8•I‹º/ˆ±Pâ6{Ù|éèé:ˆuç ŠŒûuÎÄß6~ß¹Ä]ÌFc峓O·ï¹H§N÷NA2ºqû±¨åÅ1Ü©äêþ¯ ‹Vmþ&¾Öï![’œB \ÉZÆ.›5¨‹Úet&£Ì‘YN]GV¯¤—˜‚ÍŠ)L_n¾ôNϬµŸËŸíDK9/ZJcð×yÏ`gÎÂ÷CpÉֳŀ°x p[x@Ea0¥šöö½6})B%KÖÅÈÎz%„u¹5°ø\b,ìIúŠ•AÆ(¤+\¾Üò8EfòN7ÛÏ£yÒ©Ïú^gÊ „u´õb*qé1i“LvÇ]^V ø$Ð×è"óÉœ•0…^å× ¦Y¼Öxͽd'{aèÁ;ƒÉ›•yŠÖ8Y©eJÔ;(ׯÄ»æ[Êæv/É¿o>§×Érzã./HÞf B—Ä=HE¥ÄrqV. Iëa‚–cN¼ðõÖ»ÐU IŸâþ«p‘‡v@€ YäŒ_fÓËÁ88 c²?R´)ï˨#TéSu Sl©êÆœJ$_=H[±”Á®õbùBH,Œþ¦!ëcŠXÈU,B9M!FIE }|•Z'‚W¥––9™Gbʤ_ËT&+–ÄÒ-wiåÖ,ÆŠÂ,:Õ”IÖ£¿—=‹¥Z.}ªüÇØ°’ýÆBkDTFŒ¤PPC½:ê7(£"Ð@«­et'R·¤4úPD¥y—çŒÅ嘢åK¤ È-LCõú‹DqH2•¿&È´ÌL#ä­#ÓÄþٗآŽà@`Qf¼Bí, ¿@…8ÖyiµÆ‰òëß“q¦©ë)8g•Ñ^äÊz­E8aÖV¢ºR¹?-Ò`ÆË$rѶpš¦˜J•¨KâaÀ„A¿î+Ý<­´ä8_´'Rq†T½P›'ÍjõŽ¥9 3#),^u“­TºN¡YžøJ•~÷9¼qÇ íÄ´æ-)_[c)¨y s(1ŽPÔ>±­¡v²,è@Ï­´±/mc&V9©DTÞoZ[¢\TUŽ2ŽÀ3^Α¤´¢…à‰LªË­lå&¯9F¤‹Ó8_ˆÉü F¥Æp²[ˆœ±éä‘ þz¦×+1.~µžÍž­Ca4Fï» µ ¸üÄïw&)˜ƒa Ɖƒ#l´o®ŸN_ryÔÈ g„0‚«¸I¨õr¥Ê]4½ 4²û«#Œ\Ò£ËFWv3 0ê©‚ íARBQÚQhÕÿÂ)(©¿ÛÃw¢´.^«ŒV:Æ*ŽpR*)ž¼l°›¼vŒeÁìNä-IRÝQÄ%ËÄyTÑN1¯ºa}£$(Ç?ô$ñ$¶ü"záD!qe„¦`BR+£U´’ª¡uÊ;c¤ËÊ..¨ŒQÏ8Ísà…ãí—Ø—$Q|Ø¿{‰æº©¯ÂýmÚ9% 1G%:´õ®u7óÆQX®–a)·y 9ùÂ- ŠN5¾C £‚ŒóÖBÍ… kVCˆpFåj JDÖ¯yœÖ©MÜIjÞå”%ª!U†´*jKG;©‘Y3ÕuÌ%÷ä¤I†—ZŠe;V‚YlD•à€Ž8MÑIþÅ(‹R×2\´–­Ü• ²&~âïÅ+ ¢­Pé€áÄdçD±Kb[o‘(1d×y|–'>3•GêЛøæŠ¯`æÃ³OT|9ë3ŒÆ™ _ò_Al£"þlíD¡ë QDÛ£ ä¡3–þgf^V ;ÂHÌHª ‹{Ò­¢ª%µ×*Â=ŠQrÖ——†àwráXIä'$/S"ÌPãÙq‡£)|Dzìå°ˆGC–ÊwôâLâÔ(…ÕˆÆ]¸Ñ^m‹rÍôŸÖ}ë oo˜¡G0‘ý–™Ö}»-YÜ¢JÕ).BñmqâÅ !Ãw°¤øÎ¶ ·-ÑÈã¼ ¡GEÖö#fT²DÉ.%F$²Z¹cPšóRGs–pà ]]«Ê–¹B±yWËV&7ô»A ,ŒÖJ¤Ä”Lqb(£#ð®tC&gk—c’ö¶Ä¦„b[,Ò„¨ßFÕ5Õ¡Ê @=Ã(²Èˆ±ìÞGW2¿ÿÖ¨m5‘{%k»ˆÜдh„ZE5¶2ó¨!½iïÆ÷xŠl 50I™Þ¤±qç“´*ô¢“ )@¡’LLžºqc2”[©²¤K§9¥ºß(Ò¾™îU@¶¡DßèèáDЧ*ðÆÓü’žÍ"”7o,%Ž+P!žkʦùêç0JÜS§DQ‡ÖeÏ•#CQ'4øcú+!­!Ž6Zzz^LMq»¤F_˜}õ,+Ä)—Áj5Ö#HVu EÜ5ÅB¯ÕzRÜçùöË ;œ” @ŽÌjÄBÄ‘ˆCb%…©‹jôL‹m|£¦åÇ¡ø‰I÷ÚW1’‹;¨83¨imêÄFMb b-C’Û)¹äªŽm™™Á€0ÓÀ³õô—¹¤eAÁ}›‹1«×úátšYˆÎ„g¶‰)n!‡9AÌt#©&³àJêH9³,[®ÌIðŠ3Úåù7KQ¬sEP„ påü!f®Ê|5ˆ*ˆQªþ}Ç-eË„ÒÑu¦*Š\ÒX6w ýìz‘×eŒDV6y3–)\ï!ÐírÌ”L±QƒÙƲI¹60B¸Pž¿`ÿÑ?¸YUÐFTïaöèBèéúZÔŒ&Û®iýîcLQ ä”fœwC<„ª¨T”ú Ûu#rQq$âMú!‰bÊïd™D‹72ðŠŽ*­TM"\–Þ$if BêæõF}°Þoóκ+Špq»¹ƒ¯˜é+ ,ÒöW ¯;R—ºMßN]@DÕë” QÅöª½¢Ò©1%8¥¡° Ü.,“ÐTd,†Ö*¦ÔÈýcPK9]SØ!e!a­nIyƒZžŸÛ»GÊãaõЯB¾p­ì@¯ pVÑ‚ .ß?Ìk 1 ­;ž†Y¼¥ó4Ãa8߯¢_KÈŸF.,¼Ïˆ§S#þÆ£/wÉBø£tK-Q6{ÓÞÀˆæ±˜2zñ¾Émÿ%×ÛJ8ÄvƒU$ɬ¦!E!EËÈyd½sw…CP#³ v6 m9 £ØŸ"šA¢¬óüÂëVKD¹Xüæw¯fÙ•â±ÄÁ»äçˆV9üåË ‡Úµ?:»N¹.z“œ5êþùË ²L"Ô‘ì¾EiˆûOLÍjª¨˜•º¸Êèó8r€îá¶‚9«ëÙ˜eÏq,†Óu8Nè{!ê6°NEÊ“Ít¢½ÜFª{Å™jP„ìQ3WIªñ…²!IŽV•H+Q}Y›ÑkD=-^4˜„,å±:„þ„Ü/:ˆæX‡^GÇɬê*‡9ÊÍ·úuŽb µu_óª›3•Å@ƒe73KÖû¤E¢êMeÍ+1}{Âz½—¨+ CßÉq59KæºÜ•>58òìœ×WBˆíu£¦(Í!à 1¤®nÉ*’ûYäez¿T n@Êl,èÈSŒWn›õJ®ñÿøÉˆSNÛÿ=ýûiú€úMú½û­³’eØž·—ó(ØzXq•‡bÐŒÜÏ‹6«=%[ô•vœõNU°§2("!€¥X²qX´ÛŠÝÅöõÍÿ\û#u¯C€äZÃV®mðhœšì Å‘½D—â2ü,å±BúºUâkBTìfkÒ+©êÙ£ÒkÞÀ…q%îÇï Š7 ‹=ˆ‘ÖaK9Fe4ŒŽ=d=Uˆ†Þ×+HJµ—Ê´öÿ®ˆÒÇ%l”wä-øµ ‘KÏ}®·R"×Êi”Š»¨„(æÕÞâlÑt8zÜ(bŠ1ÛGÆù{JL§é5QB”D_Bpœ¨Fòjá )3Å®Eþ±È•Ä% :ˆw3Ìo’•ʲc|šâ‰IÃÉ–¬RÎI)Øg± '+á32Üps™ÉG#m·‰µ”©ßž“‰ÉŽ­‡Ü•,¥‘Hã­HTÔ]ÙX}£Õþ„Tü¥hLG°û†ºB…T  „4Hž_n'‘yætl9¼ÊO‰¯ÛüÕJ'TäJý¨M£×ÃËäU#2f –%‹év&¦e ÊÄRÏ!$o‘¤;œÊ Б(dËîdµoÖ©–üò%r.~vëÝ K¸ìZõN›^ËHž÷¡t=l`) šÁý„r1Nj·“ †‹‚ G•s d¹\t‘P›Néöó|JïŽ[ ¢²Ñ’WÆG¢œëExËe2={‰aU·¶Ê0Êt3ëÓð„r´­£ºµ$•9SþJdy~¡E)<ˆB2m9ãMf)Þÿ)& çm\ÜÌ®“|Ùu»³jç²Èbûj•È«¤0…N%tŒ_DBìl1ÔJ÷ðiªS(•Dr¬A#öÿ­å?ݽv뙢„I^¿š‘beRGÊ8„7—†%\3®½¹´FYRKØý§ D£”ØÏhÇÑr³ËÇIÞT!Œ…³‘þ¬õ¼¼¦ê“Ÿ®Z”¯WË/™*÷aÇA FW.LûïU“ý(¦1ÕXŸ{ø”#Lzõ8‚Ü®™OÅ®.è‚“Ê‘ŒbçÍm¶’ÕBý=è³ ±YJ…!}tEå:9héD©yiÆÖwc[_ ]-DZ-·H”¢ Ì–Lï*Ä-pMÐÓÉDzñq޳ §r'xŠ÷&È´)¥N*iÚVóóúÒèþ˜”=Jõ^O]‘ 5ºZ·HÈwdNLg‘l"»•ƒ;ÙçZÑ{‘rhªsj1ÙØæúÕ…Êá‚í¨Eí²NÜæ£yˆ^'ªn‘1Þ´J£"JÒµ›øÈ2»"$DñêmâçÖ…GÚÕÊ\SSVÆáH1t 2%ƒ¥³¦”SÔ]Y*­d”„=7—71˜¿‚„z‡à«¦ïˆFpÚk;&RÂÜ”My|™š99‹ Øøc¹J‚Ê^bØì;<¥Qâ;©¿û8MËæ¡TŠI‰Öcu•x›Èꎯtï^fja) ŠèJ]UßÇ5–Â) b8qAób˜ž/˜KÉüÅy…8«*ùQ M–Zt»÷î=ÈQqîÄBD1¿ÑÈ¥*ñ5®É»Z¾»ÑB$ëîw+9ˆ¯ê„Ë ”µDÊL‹ø(åI*§gÙFôeþ~bi}èFfAIª*²òÍ;,L¦!ßè—&:ÈŠèr‡"öaS¢§¨•lâc­— ‚uh,ÒRGÄíN*B"þf¡„Ú½ 敾å²4œÈ)µbÈZäZ±Öè’(¡¥ë›ÂÓT’©¼G%¥)ßÿäT™ÑÔ”c·}}¸Xé@¨çM×IȘM¤µŸâ÷;‰±n„O3LKŠì·[)C8g¼§˜‚LÕsrkékTÇTc —/%èŽeå?-êüc•<]jUOl<®ºRÂ9Ù—ØõΛ$ªÐ¿#‘lat)b] +NªM6:ë%eK%„ÜÅYÚˆo=lÿ‚ý[Œxå±®J"ᥚ÷*mvV×Å-6²T«Â¿ – Ëf5Ë;‘¿ ŽÍ†“P‚,­;KÕÖï=Çâîã:XF«ãÈL+'˜“²Ðº]/Ê®¨¬QÎ0PÂ%¥)“­™-´j®pOÔÖ\íýZjC+§±•ŸSªÌ•G©mÎW"®rkSÝÞNÿ*õR£ _¿rHU:J( ízÆ$Š”$£dßZffEÉ ¿#»'Ø-M’‘„!ÄMÑ D9[t…Ùœ¾¶FÊ- ²‹©”ö8T¨† ý6³c×Pƒ¨ÑZsS'»P¢cÚÔm¢ìê®¶£ÎFFëf[øUUK݆IšKÍê§{µÚ–jˆ-ˆD”žFa t dïMZ9­‚hߕ۬päbb¬„Ü7IysøÊˆYDY‹‰¹l¡Œb¯f³ófÍê,éC xB£J’¾•¨}moÓ Ô³é°“ÓÇE1’¢(SG°“¥IKóRÖ”äßÝa3Š#÷ê£%‹D•SáuÞáTêz鎖`¨M3ûëå+M6¦a<‰w+ѯ9$§ÎŠâÐGÏ`‚ –rÎÞ’ö¬ÂHÙatZaFIµ0²V+¸SÝ6ƈÖ!R®.s~Q&jUKØz ƒ5‹·B{}ÌBêt57[äZ•çQ®¶*ñÎÈ-¾D‘•KĵT—B˜ÌÚ&Ö½B• ”8…7’qª§V.I~7‘NVÿUª²ÕèGÔ5Q*FÍì!±44O¼a[HÇJ'rB¯éé…¨´µªD'©™†PÏÊÜõ&HEk´üåZxU*Š®Éôu3zmÿD«~ZÕ*J\•QV©ïÅÒIÞ«]’P¨#2ñLB ÖîÁ]è’*!ÈŠWèŒLQê’ØÓW$QäV¤åÀÞaP§r UDŒëIYÃ!ˆC¥*áÐ!øÃØ!‚  –PlØò©¯4ˆvÀ\dA¸JÁ1Ä/ ‰D_éDd@E°ÀÌ3"*ŠŠš¡ÍbÓ¡ï9ù>S‰™AÂA˜fôd&íTõƒ4pª\ƒfAÆQ#ŠÁјŠ¨rA17Žb™Jbë¨.(T&º§3ä1F!ê'# ¨aÐÁ Øèóí™Ò6õÜ*‰kPA¥¿)WI²„"&W‰É•Ä_¯bE:ñ¿mAɆIjùJíPU1“Ù(ÊüìT›ÆéF RÓh Q¾–q([WF+=û$+'pŒˆ\ýKk²ü‰þ̓ns"h¬ï%z¥pªü¹Û\¡N0îþ¨!D)DªyŒÕ“â.æ4¦uµ³{…¥ÿ,…ìN{ËØ­ªWå©QЏ£©Ð™ªçkDg;Ù)^W¾‘—ð˜YH~LҘȵª›ÛúT¡4¥m);Ë£*bÉByÌÎ’¯c°6å); °@ÌAˆ…†é "˜ƒó¼b(½EO¤øóG5ÀÆiÝ£:C¸Él¥„@žVÁÊÂ$â„iöÒ¹)]ÀÆå pÀÄŒ*MPƒ³MPQ Œ ¢)F)ÆôÄ0æ¶^HÁ#”#˜÷™†¼KñYÄ!Î )Ê€Ö‡•Dž**Õ6$à ‚ÑÒ`…0ŒœãÂÝô=‡$â•™Pb!e«…ÄÚa—áÂG~iìÊb³†òƒ¡™¤' 5EÂñX¤Aˆ…§øê€:Gü¨qت±¹!5F… ÎQ*#P„øù8Šš3 i$uÑ T+cEÄ ¦m+Ur'!$ËÁÊœ(!HLõŽä:#¦,UêgÄ3‰!†56‚B¤ÆXÎDwùƪ€â¨T—’s©èÒ²Ž¤„&Uý(˜Õz6ÚhA½B¡ #S?%ÁC(gxƒ ˆËAŤV,z å>È$V ,ªf°J1~ÂTb²•˜ÑÔ„FE1)œ¥Íg ÓPâõLÅéž­F˜ŽÙ˜f> ­Uñ ÄZf 66CzWvÈ;Ç"üݘVQ33¢°œ6„.… ‚iA)Iÿ„7Œ(t?@0edT20F2"tŽhRM“F`Ž–‚è(¬G1¾ëkS Š0!tB°l4RN"kNJñYLÆSTüÈý¯Â zŒá9Dƒ`ÊÒ*ò±vü-Ô›6Â!iÿ763”„ÈBÆœŠ †Æ´ã–ÖF8š¯•ñµšáŸ)ñIb^"œUn"Î)¸øVñÙY3 Q†ŒÈð?$â  ca¯r»Ì;BsÊH Nè{Å1PAirAâáÆ„P¦1Þ+á„KE¨CsRT1¹”Æ"E‹F<¥xC‡Û‚í/JxæŒE~ªØ$ÆÀlB¼(li.0V¿àRáˆaÄDŵÿ(TAÝÐÞ^F5BÂÂÉö0„%bq$â ‚òßô Áç„/Nß@¯E‚;ðT&ÁM ŒŠ26*„ÕÅR)œõŒGC'„#sË“Dz1Ü–÷:è ‘bfr…áPd €¾<ÏN Ô™ ŒËÎQ1„5ø4lZ¦L+µD¨ò“°}á m&J}CC™M†ã|aÎáRº½‚R•Å„ ŸM0È ñì}Ú '" q,@‚·Db ¨â*Zå„ÊW2  ¢hUh@GñCyü½DÄÙú(ЕL@ƒDŽ@B†4bÆQØøløåñ§;R*¿LŒ¤ Hr:PbrÓ)¬;ຌ.”GŒMȨ„r2¢™ˆn‹„J*©Ð#Âx)ÙÎ( C ”sMhE@4(Ø1‰9÷CZ«„"gdW9sbJˆ¦ÂŒršÔ …!Ù±ˆe)ˆecó$bø`#…'£!/º˜k·#zª9‘ÁSs©ÐH“œ<ô‡)>b8 è\c74f4\‡"“†4Œ k–Dø.ã‚ØS‚ 8¤º|êx°T"†¸žÐ…áUú‚_·c¢Éøs6G %%ÌN`Çé× * ¦C8Š^4;ŽÐDGÁt†Ô]èÈE"ª¥õÒ©ax1QµH>ÜÉ¢pШü熌tÆØbêU¿¤Êµ5MKÈüȆ"*±6`ƒàe y*( qaütßåŒ!¹v7lJëìá ‘Ã.^®Ј$YaÌ#’jvC;1¹ÊâáÙ‰·jËVfØ+#9År8BìE!!ŠWøf ˆdçzó&6°¹+Ò*rô œg1Ø H;ˆ¢X 2ƒ#ôÍÜw„æL ¤ :) VÕŠ"C!HƒêÓB„0{Ý(žæôˆÁ)j*˜£|Ìbø~Ù­ ‡/ ‘“½Jêb¹„aKÁŒ`Ù)±„þ@e b™m;­'6ë0^ÔY)™‚ø~]åa͈¥ƒµ ÐW`"Ør clÌ¡8Š10ƒ ¹$ ÎX ƒ00ÃŽàr¥Q;ÃcñÅq‚(Û/¶/¬›ÑBo‚…0`N#‹¬„‚0bV QE ¶ a#… L„«¸ƒ`€¡Ëá°5#“n ÏU#L¨…;ú0€Åß±©Šƒ¨ÐðŽç¼‚$¼@Ä#úaÆC >qA”Í›²9Mˆf—ˆq $ΊìAè˜S!ŠŸ³³«§#rù¥ã¹dh'‡%9ƒ‘Ì@Žj¢EÇA ÜqrB!L‚Dà¥^‚$eæ3uçE@Ì´›®AùCqˆ_AéUˆ_#¹‡Ãh&g``ˆˆC±NF lyLÁ„¸U33aè¼A” × ÐA ù¨²C¹T\†dAiKë÷Æ7UJ£*o!ô)‡a;@D¡ b3„‚qá E'E° zê˜xWØÐ´^q)•jôc ÄBŸ¡0@"SÒ‹ØŒ 6Cg íâ˜5'NõÌÕŠJ(ÊÈôVv5}ü @PÿøÉ˜TßNþ—ÿ[?¹_ãÏõ¿üÓÿh6´Ý Øšò‡à†·Ü†BÁ³&kF  ÔãP4A)&•õ+'«bt¯Pýî^ B ò1—u^Æ1 bd0Á¨‚1‡háE™“+^œ´9ÏD˜ÎNÉ‚¬² 7"XÔgH3(L± º”Ž G¼u& ŠAÆ¡FPÈÐXDŸx9‘eÉ‹û¹[a>E+$6Fè40È4Ä"dJÂD˜DŒ6Œ°(ãœZA¹»À±àXvnDqÞÃD ½h‚A 586T!ÈÄC>SƒPȥדZmÍLE‹Xä%-%8#ÁXH6`KWÂÚ# ÛÓºfÌÃxÄ9È"±ƒ«ΉŠ4Ó§wÂå:RHÂs \Ù”™ b‚0Ð!LCÑFÖ<æ&Q´ºè8–"e¢©ÑÔ2Ó|#®UD #¬1ǘ`Øik(C J™ Ĭg¨át”TµDeÅÄ!r«ô§)ŒA0Ÿ}ިë(ˆf Ž 0â@H•+’ÔF–,8ÈB?+›µ°x'b¹¾'<“#IŸ¨f †qó1‘©û$&gäc㪇÷œòòœ=ä2@.<|† Èä@‰ˆ„£ÜͩڴÈ"³’Þ§œbˆŸ`Žüs¬<ÅÚA!Ì®…:Ý‘–(h(ƒÈŒ$3a T"är‚óCƒ äVu*lEV¾%‘Þ¡ä¡® #·ŽÃ¥HÀ0B$æle)ècä#u~åv \Ñõ1ê¿F0YÅ´‘ŒB'Äù’Ò3S¤³½j g1Jpª»f$´"s1D(õ%"tD'ï/!wË ŸVܰ"ˆ¤Õ†Á‘iy# 5 œ™M°üwä*¥Ub\5ÉgÊÂ1„VFÆ™œµàå‡"yBŒ@bŒqéÅ3ñ}Á‚)–!˜€J`È@ÅêX!ˆ¥!ºO@¡–õÚ–”âçþŽ©Ü!„ÌÏ"OÛ†HN`DÒ«€˜"09¹"ÒŠ¡®"Á‘JQÕäXs ”j3([ªòöbóCx´7`‚áMŠ( Â$¦T;º€ã5v/OÇDU [d,ŠÉ/)¨A-U‚2ÅpÈ› ÙÐHU/GOôp™¬ß*SŽ@»Q­ Є3Ü”£'WÍ xhA!ÎQN3' ¤]@'&þòR%¶ø9;DmΩ¬\‚ñÃÔ¨0gÃa”`¢FqÆa¢“ gªÁͤëÈ|´ô|LŠçp.ðÎ5`ƒs_a¥TÞ @ÇA”X„2IŠ,ÎJ41ÑóÈŠV*ÓzD™‰%2”ˆqQò 5 `õÏv 2„7ÑÒT2 ”"D­ð‹ŽV‘ *B_Åð‰Îo•’>JlD&!–Rú-è‚0-NƒÂ‹r Œ"•¡tÿ²'ç)mà ‘:1ˆN"! Gr†£0¹ŒãŠa°®¦+9A ŠTJ…,}«5fjd‰LiŽÝá€ÄD@ Ž¬vs˜‡X‰­Ã`‹ÄsÔy 148ªJ!uD¨êk‡ÁæpÔmZ «ŽËU· Bá¤C3…¨‰¹«lD«¢ù*Ášˆ;H HÃQ_”¬Ä3~PNH¤3är´“«„Õ±\µ¤¯Êî À͈¢Î^)• !N ȰªAD ŽcN–šF sŠg\¡¯)JPT¦½Nî€ä'Nÿ„ƒ|’(dÊ]Á„JQ°d(E0!ÑEGbAØŸ0s£Ÿ«ŽLB›c²ôÑ«˜ÇLjcUW ˆ†õƒªˆc^|”ÅaÁïãh01™ÉOZ­õ?\Š)S ÂëÒ¡ñèMUl%ý¤K=b•ô·!TÆDÙtò•H¥Þtõ2c­ÔñÉT£œ™Qù~šI—rQ]‘‘½}K·Ê•ŠÕ•üÊÛ탩yù˜ÉWþË\Å8WJÑ[]{ú…p•[5ué‹DZÚUõ|¾3™rŸ÷}wÖqHwTÛU/ÖFßÉúAÝÉ•tEbá?—è…ęԢ/¡>ÄEÎÅX‹ÕÜ–Äyª«R¥¹EòGc‰/̆¾+«?T1µ¶Ì Ü]dö?PUcó+ÖW ¿eÞ´»’•»jpÂãäU)·J“éÊí\®\£»'U(¯§Ò¤‹TÌIeÿ¥.BcÎÕoÀÏ™wQ7X®ó9]ej`s›ðŠë”Å«ª#¡û‚8ûè3曆 ózTVíʴ܇Zù™¨µ3?3kì'fˆEÀŒ)§ú\¨çº+zLOs¹RÕäe• ýˆÄ'ÌSŒO§ŽÝN™×‰Ë™^J&PÁWYÐ’g¨Ùn8æÒùÒ˜>^,œGqÉ©%Öeb”Ì2EQ)é`¼ö£ÉAН.1pmf;cŒJ—’ŽÍa;(Äi>ëmTsþGsÝ0¼åµ÷£§öÙ»6a7¼T7“!m'}Pä0ª)ËÝOM}œ§5Dcß´Më{„ê èé-”D.û]ó…$¼x¥1®ÿÚVÖÒßãOüߦܯ·8‡?nÅBØÈ"mÒd¡GMìÀ¦]+¿s©ä_îŠÕJÜäµt}‰.Ð…)hèí‚Tì1°²³¹°BV’H:$’DÁ¥Lª!2žAD‰[މX‚9|Ñdµ]ö¨î¤Òz*=Eê33.,®e·ñNÖ*õi²$íÍ[‘„"²m”—ó^½†"êâÒž?=T!þ½êC£yÆ —c0Ž…3°i‚£aE2­#ö!'›e;¥ÅÍ&ÙùöéJ ¿|6Bˆé#}¦MzÑiT«¹ q"ssôµ¢®…O/Øbz`Û¼žSÒÿQˆîŒef*­-è‘u‰„¨éÇ’èJcQ¦Ë k㜊É÷Ý 0ÚŽšj¨"½¨ÔÝà‰§ýú¼¼j0¦,Dd s!M‡1;LÍ[ð(ƒâ-$½ ÒM[â NÒ!-/-P«‡ô36Ž·n&Ü•\Š7°ôUõc÷ øÿúõü›ý©ýõg&k Wüò!õ°# ÝèdC¤5¤g醑ñˆâ¦^¡„±+ÇÄý5ŸçI” *ÎB9W,-0/^[Zl%*Šq|mÊHYçªÙ¤Ô«™Š´T‘g`§:F_"¥P®Õ=rK|›Ô¥¸›‰þJïJ}{©—h†aÆ8§ †ñKî†ñíA²ä‘ÊJ¸Mí2Ø›†î]1ŠOB=–K0‡gVÝFÇü—oÒq¯Q»†³=DS Æôâ)e-¤YGpáX#ŽTyMIø>D¯OËQ(klI6OõÅêXží*lÌ#ŠEbv©&e‘ùy6fA ï%Z¶=Ÿ—De;%‘φé¶ÖãÒgÅ p¥¢”kl½jËûzMCwã’ë! æR\´U:PÜN¹ä,bÎÌ3Ñ3=TªÝM ßÖót˜#²¦Wÿ(>_KqX*4ÎPBÎ44A1Äõ^v\.zŸ3=SñªYÏr\“‹"ÍþJ=“ExŠ"iÐè9 Sᩃp´ÃçuREò¬å¯^‚W«¶4«c\ÁÎC¯[§zͨç:³Ÿ~ÿÕé4˜N“ ºž—|)b¢ ¼1â‰x޲¦)#!„ÊÚk¹öAe!†Vf1×ûczæç¦ܨRr7 —·wûÈ´.…Ãb;{çìÔz#ø«„EˆI›‰9&j³³ÉW2ŒÛµí»Ð¼kijdòž/ÆÖ­[…+Ìçp‚-ÉúJ=ÍTGœÓ-ÿ¢™õú¦q¨é¨eõ.¯k¥YY¤<ŒY3&âSV”,湆(„Û‹ÏJ·yÄFe*ËeêC\©!]6ÃQ3IÆ¢‰1kFéG²©‹ÊI•ó©­DVaI"VqRíuMrÊk­“>¬i‹Š®üß”§KSÎ¥«ò©ÝÃ;ºÔ—d1›ÌÈëÈo>i¹OšÞöf²%ôErÔ”òy_HJ=×ÄS1Sv¹zŸZ¾-0Gºò¥er!Š!d{.;k¦úVP² Gk"”Y )ßJyKŒûÔjÊJ‘f"Yʲ˜ê¾‹úÍSYf¡ùQ³I]nÎã w².Ìžµ.=–òJ’*•ªšÇ=KïJ–p’ ë!c–æõÓ’åcµ×t‰.þ¤iÍGD¹jAì-Q=öŠŒ\¡iMÓ(\L°œ+FaܾF14Í^,¤Öˆyf>]lyžö SÆW릌øä˜Žy¢ Ï#Í1F¨“‰1)búSHI×Ì“…AŽaía.¸Ÿ^Éò$óÃß2Bþif@U¹˜®´u( ‚ò@ëšx<!‚ ëQA d²BAò­‹A^Xž?ÏaõrWß[µÄQZ h¤¦’±$ãP÷b*øƒ°¡X¦5Dâ*u–P£DP@ÊC‚Ä’ Øá¥r‡¯ÀàQ‹ðpà(jȇ B x` ˆu<Ý@û` U 1„ðÁ PÀ„ó¤¥1™(I6´_÷“$-ÈÖL“Eb9ªÌ{¨5 Åd°àiÒ¨’9íÀZwX_}Á×ÙAGïÎÆ­4@¢Óv õ—ã§âg+å…µ~bWq$%žVÒæ¡düÜ¥ÉÑY÷Êó˜œi‰F<¶ª´õd¬åa«·ÈwLâ0Ä”žÜ®ql‹‚h˜ \¿ÔÛ:ñO$ I"ÂBþ¯b½¤‘»¨ò¼ªvïaI~r%$ðN&„HCUQõ5_MºŒ{¯Õ(Í1ª ç­ÍBU¯§l3EU­ãÎA.5F-ŽQ°µ³ËI(Â8‰kâôÿÛì©ÖahÇ~MuöæM:²¢hbR:Æ+ÉÂÖ´Ò7wsf}ë1–ãß{õª[…ë\ªÄìž§/ÁnÓ´Ó¹ñ1ÖxX… yb˜¡.ìD\LþùWÇåi¯±HõE¼ŒSRc‰ÂŠ)d#‰4‡,¥øöÑä‰2F}V:šUŒyˆÃ™Å„–ÉJSÊSõb_Ë(AÇÏZ €`€ß/G‚Óžh]£hUâ 1Ê,Sn-_ósÖÂÈ FßÕ)ð#ÖN5&2sG;=‰÷¤=V)$×±:Ã*¤4ÀJ’ òáoy9À… ©÷³24ä—¯B ú÷É"<—˜‰R:íGC78XÝÔZp“û˜Ó8t°våyÆQ=g5J¹[ l<“\³0Ò(yMƒq-{â’ðºŽl ^ @P£–Ž<l=:=A¼*A^ÈAÄ ™]R"Le@• rÕœÂÒœ9¨ƒ£¨Â¥Ý|>°X‘©X‘+Oí£/E@ŠÄ/ùÜÎ.Ÿf¥ :PWþ·r5¹ p8â¼£%Ü~/Ö<²Ðý˜ÉcØÕC _š{}¸I¯-%6œ€G é‚ ºlZ{sGåµKo6õï ¾Ö¡H#°Ž’_>1Ö±V  @ââAà<Ò?eΗ¢ë 2\ï(Ðæ‚LRxw(ÚÜÅIÇáánHÁ-5©4O|%26›¬2 R… 80;´b9(2 K ©1Z `¡s"ƒÍ¤Yg‚R-&Þ;1œ¬ÖY«C’"Öe©öȳÿøÉˆUNA\þûµùÁø˜øxù^³“%™'füxhÐy˜i…ÕÉÞ§%ÀÎpòFo‰JW-O¸qC‡ædÙ:¥™ôNA7l`Ë)î!IýHw°Š2a:¥|ÅõKFC þfíKÌþ^ùržÔÑ:ßSÊvœý§ö^s‘„ â½Bò¤ŒåDYïhÜÀ ã±©R„ðÏFñä4´Žbü%ò0ìL’I-¾Ã±`~#o Ãžâ¼:L[Å.*ä“5õn²#ç"êê.¤û‹rIò›¸$Š…™%#IUc(r3šf½‹Y!6Þ›ÿ'qCŽ@¯ÆpPhY5¨;ZZiP¤½…,v4’&Âq%¼k¦Y¬÷k¥¤cŒŒ*“wFL(‹`[$½ä˜u(O¢b]bgÞ€œ;Ñ2D.ý€¬ÇK ½q®Lç«"«PëÛßiºC1 ŸR‚åh0£\9صµÁR!M{U{1‚vÕ_Ï+}C±Ñ+q¨+Nh¦R^š©ò»‡e#ñF¤éNlx²Üžn·±÷"¯'ê,­ž`ÊÝõž`ìx­Mž³þÁÃY¶·×Šq‚Jã„c©ä‰*Üê@öúöŠ*ù†üJìå4{q‰lâ%l;Ø¡ˆ¸)Л+Mcú‡A&ª† QdÙ-ÖÆz\¥ëô%(âLYYA™ fųUm*üÖ’ýC,£WtœpW>þ¡Ç=åËçÈUuÜZãn–ïàž¥)¬ßVbœ@Œçñ†$¯ÛJ3ušï.ÿ÷óØJ/mG—yÎ^Q“Yäc¦\vV$Œ;J!ªi¹4ıוÚPpä@L'|ò,SŽ>ÓëºÑ’ê£>žú…šZ¡Ö›šÅÍAZì!“ˆ#êÈe()qk¨Ý…¤µ:Ä'Ðk‰öí"WÖÕ¿ÚCU"å#Û£Ó\·ï$¸„Ql3Ζ8­âq?ÖÏÛQêl,/–±*aApøÇ©Y~»èæÞÌÂEQŽ8£1ƒ9…ê%I‚ÆK8÷¢™Dc¢§ÔMÄ%%½+JD[ËÅ›P†•â ¨¤"Dr\%¾<û«eÕ‹}n(̨&ßg‰ªâµìæ•e× ˆ#è)¡´¹ºE¤—fö2 ۊͧTld PÀ«Hý%* lµÚD«u§°ù ~˜fD“ƒZ6A TRîðD`íÎÒ;¸ä3™JÛZ}­V!3¢ ½žUÉÊbÒ6ÍUc†S?ùI$]mÕ'Wƒ» K¨E¢:¶Ê bš…=X“¦·a÷ŠŠÕ¡{±¹7?4o›r¦‘fœ†œ `¨5%2¦¡°‰”à‰Ôš: Bˆ¡R@WÑ?9Ä«׆é³é}`@§dÅÂ,GËZÀ”“úU&º"ûˆ§{ᘎ¥²§Ð&â9LÁ9_WD=m|¦_®wÛhä}Îg)1„.=*¢ò£*™«^.¤Áq–s¢d\Q÷´`J“þAHJ„#¡Q·ù@–D•³Q$mI‹²þçºd†4Ž3E!ª)X‘ÙºÒ®¹ŸÄÌÍý'Ï[SÃi›p…£Îtõu"ˆ¡D#»¨„ëWä°¥c 8LIq Yi2öÜEÙf·iˆœIDª½ÓùβIáð¿•ÖÖ-ìò vò“…ƒƒ„—È¥,cT”à·þSýùþxÿÿ‡ËŸìËB L‰ëFß°T}Ðfm÷^¾ie—aÉ‚œNÓ+¸â Ж"²â¥IsgUz‰y(ùN¥U.4Äz¸ËòËÁÉ%¯ ¡•40r ot´´§dµM/ý.ȬCwR7!Jé§pÌŽ(DB0‰í²*‹6†(F{†UD0lj{ÑçÖˆ¥7P¥©A)ÜZ/uñ†aÓ8{‰CàíM4ı)aY²³”„›îSõ+ šÎUÁ‡òuQº¶êåC³FÎȘV½þ¦O-¢db1{ØQÍ|<ª¤œ©ÒÞ!mI¼ISÿ»ï*;dßÉ–Å")Má…L9]zs%F¿2ÿDˆP¯§“Œ4÷¥Q™7)„v1©/sçe¿¶B”ÅHCµBqÖIÌvËKܨI1JÒÄ·"T%ÓÚ·aX}D"ë^ëÅÔ{+ŽË1ÈqKM"žZ$Çm!lÅ¡yâ÷E¶PŽ™$m#Ž-ù%L%õ-Bf™}ü•öc" µò3=~W «érRIì“ -¢V¡QÄ´êiñlM²9]S•‡>RNﺯòSWs˜¿Çò×C«ˆ>jSØceu„rî¾­8wôŒ‹d˜ÆT7fW+–äãŽXˆÉq)*Rÿ^T;ï˜z!Þ5 ”½sV§ Ô±B¢–6hG§b×ÌìÆöì!äÕ¢yºÝ5(´l>JÇ"Ñ$zNÓ#¹PG à ¹Y:«Ú¥”xëè/cJs xŸ²ÕmäŽä¡Ì¤­:U‘ !LF>É$®¹·¹]ë–ÅõÏúâL©«3Šv·××y©¨ 2ŒÉž@B}kÖ áOZÕˆÏS_,öZªoXic—-—}tOâd.^Ö¦¤ÚÂã“+›†2‹´¤Vœ¦v8‚²ZföÂL’˜r™má?ëšLýºy ®wˆûƒÉ‘q$$¥ó~ée{¦n¾¨©c§¶e’ˆµÊYÒâñHÒ‰ÎÚ37e³¥ûa ¬l;ÍRΕy¬ÔÅBmFpæ9%¥¾¦¥Äc6VN†A©.ˆqI*ˆO \c2hߦ!M¡1ÄÖõfÊ¢gJâúUÕ‰bE)ÌAMÔü$Œž/uvÞ9̽5fã*í)- ¦çºØ¢®±ÐWzQ*nßÕøASزel¼m-…r±ˆ"|–¶òˆ™EáH‚­ŒÅR~‰qFãÚAJ¤+*'’oâå? CÕ]ç½#:j9‘^î•iÝIØ”=­Ë*Ñ?W W@§ ¥VšÄÑÐäR&k$ÊdZ^JzïS÷e*2æ¹ oñùw-¶ÿjâ…NòêÂ(©TSÐ¥Ò$Žb5¿ùbö¾%Èó3JO’_Ì¢vɤA‘“(ã¢U—Í›[Ši‰´@çI°öÃYí·k¥÷6Å!ÚÜt•ZÑÝöºÚ)›é§£hÔ­{Õ‹gCݰ¦s&ùd9½ˆåQRu»©RºLê5y;j¹¤FêÈ}áôÿlΣ±Øíìür+Í”W\Ö+ødhŒ¼½&VøÄÈGyÙ™©kÿï¡P"œF£¡ S’ˆ²qx¹"HˆTÓµS˾oMŶùk¨+ÙÄ~)æ-Y¤DKÓFÃasˆI¼”–FÓUÔf±ˆÅú›V¢'²ù×… ãd-;ð»Ãä‰ÅcP²1•ÅÆ¾¶ÒooÍ.[XŽäUr7·'œ™Ÿs8ã=’U·‰¹EvÜÙƒÉÔ®gNùÙ­Å#PTc‘Ͻ¹ÙV»9ôÂCøl¾“?TšU.bÑÄ#•ñ½•Eâ'}Kg¥EÜÃræg9Véw=Þ…j"ùw!V«»s¥ˆ_ëÿq—/­]‰¤¥'ÆŸ›‹Ÿ…òÖèC±ÌÅÚºNÄEª±KåtJLÁíÅ—h¢¸§6wna–¨¾,øƒÌ!hA–T›M¥Þ®•a”¼lm"8¾´¡ª¾™RcÝ®¨‡¡3X˜‚/ÑxœF÷bEÿoa31xÈ£ t3XË;ÒÍEàåy\Ä#2»TüoëØU÷¡tR{ÞýÏzt” k Â0ŠOkÈ£¤‹c˜bµŽÓ)ªUªSÛPC&ᙥ·} \B*Ö¨F(‰š]‘?ó O¹Ù1Dñ岩œ/—ó4c²Ù b?3yˆÄθúGÖM_¾µWe¥ñæ0¤ô÷®ã3³ÜÈ9¼U!Í!C1„aˆÃùô§Ó¶‘m*â_%ñ-’éŸ6y !QÊŽÆEºwtA’u2ÑðAj¬æ§ï—lQQ× ÛOj(—6Õ’AÙÇB¥4FK“Ð5Òè¡I qK©j5è˜i¿™3}î„;täŸõ‘Óq µ¡~K"9jÿŠQk­eÕ±‡#uŠâZŒBêH #T‚ÐèFK¯/Éë.Ç[ÙJ.=p6è&·­dâ®ë¹ÙŽ:?mÑ™¦u¢ÔB—°Ê|iˆü¼D¥®‚-ªFÛ"ßò”srDsâ! yÏ0ôrzí‘ -ÆRIœF1Æþj>äd¡n)$²ÑcFce¢:ä‚dظ• &ÝqÐc½y“xK’ê*Ù0BˆÅ™.FÁ V—˜³“úäBy_–ÔtÕ§âØø5˶6œEÆ”‚¯4­V5TÅwÖR/žãžiQüÛn(•»JìAy–¦ú‘uqN§G)4"`­wíWS™bJ¸etE%3ó„—^ËM¨Ä**‘q ¨Cæ{¶–±ZÞæ Z╺zûTÛ ‰Š„RY¯—±”žr ¨sŽÉÆ çÎ92nOæl2~j¼¹Kì¨ô“ýôœsM î™B²bŽÛ8î¶TÕ± }Í©düH…ü£Pe´! J#¤G+w2µçM,ú¹¿PC%zéÆõT]×¶b['©È†‘Ì(ÔÒ-0Ò25J‡\ö5¸6ý†¯2g=YFUa7™WzQW¨ÕÞ+Tð«!‰}>©q¢‘ˆLr^»åߟ¿dÚú=”ÄJ!(bXУ¢bA‰1Þœ]'rGfÁeE)m–°Ffl5 AY t²:¼"ÑÌç»)8¿Q4•üå³X©ÉÙVîÎr,‡«s“ͪy›äÊ®µÏžË«s²4ê©ßj´Å±…jÆCJù8Ź-÷¯èšVëdåúr15ö¾õÝteYJRÞtôóŠAد‘S±jIE1ÚD´òa{Ã4å”bò\ãŒ#€’gH/ÄÉD0J:¶± R²1ú•–ÓÞ„vAØŠP­@µúÕ8„N¦­½šˆve°aÛ#PÕá&S¥‚Ë|ÁD±$V9íwæä˜qÇÁxZmâÍ,pPT4Ã1'å_äºígBÔd+ à¢zQh‹[õ9ª9NQ¼>}©yñƒžÆ'R#" qè–1™Š¸&‰IR9NaC I:^ÚÌDb9û÷ÓƒGÙ^O`Æ‘zOÊ.‘…Þ ¿[·åf³r©‚¾,.æŒ0޵«GÏ&­\‹®&¥iÞt ŽQ}s¾JÄaÔ3¼iÇçïêäa¾Ùª¤ä„ R¼n­ø‹Tè¢] •؉Ö`§\?‚Sú”@B-‹Ò[ånWrN÷BˆÁB#–kÒ¯F”€BãE¢ÿaaKd„¯b,YæÀ…bD‡5 ,Ÿf3±N”ÓgtCUe+³E"Ô%ÉÁLrrË ü‰c,Ï®ôÇë S˜ãDîÙ%£É5¡C P—;‹?‘[¨S¿+ñ¾£YU Pàf 'â$¸ÕoV\¯A©Jæl4!D5n§ ˆuNJ³ÎB=¼•VJˆ"Ü×=K•/·”—@šê3áB{ý+ÑyJ+„…e$Ùy”JD¦.û~n˜§ë-šÍrˆ®ÌKaè‚…3!A®^%ˆîI–©”ékÝA „X]­Ó wANª;MRe°G UÂD*\ämAõh»bÖµGRÑZg™N9¤5ô[Õ“¢Z§5x9WÈ"QQ¥² ˜>uJr„uë÷íùβ¸ˆ¨|h}‰ ·R”fÞ›ÄÕ ŒuìVÎÔ2”ˆž¼…QTLªÙŒ ˆ°½]âL‹YêGê°aÆ(gsÏkÜýAèý”0ìÇÍ7y’p⪜EïŸÈ«q!€áŽÑbS0I²ƒ!”dÕ¨~¬ù»Ô ea6¹a0Ë1.{JiNYŽIEÒ¾fXìÕ2:_ÆðýìésIYÄkFì&‰Ê!Å)L´Î¦-ÕŠ¥Äh¶Ÿ0£±F5ß±NR5 çÖ0 ¡ð”§ì‰1gj¡ -¾|®Pal5©ŽÑˆC6¦t¢…ëk‰Är‡匒´e©ó~DŒL[ëö,Aèý¤#\1©^¤´ÆFUÿÚp% ÓŒ2ãæ{‹W"kP–D¹†:¢/oŠM!ÇIïLÄ0ÙX¿ò B+fK†¡NŒÅð™ö {,çbö*=ã¤Tfjºð†©­u4‹ƒ EžA¶(4Rts¬$úTSÊvµ5lÔ¢ŸQõšÌB<Í®%$MgÌAƒ,x%=pÿ£ ]!ªC_ŠÍX‚ê–„ajéBaªû:ÍR΄r^Ö/‡B˜þK|jo…+¸=ùúÙq[Hq•¬½ˆ,­â6fém ²)¦" I¦wˆJìÑ^B¦x4™·ÎÆ%ÑX”DMAz,å*… ZƪxSE#J.™&f.mjJêÚ1ƒŽ#²+Mvz®ˆ’ºui¶£Q ž:UG)ýo-_·˜¬èBÞݵ´@Â7¸ró2¾¢„h¯AÎQgصm8É!•žµ¹¼¼Ç÷*qèâ^SL¹ïªlÂ…+³C龄£º5Ũ‹éÌ(¼Õb ²ß.–«á‘…Rj Å´iJJ—J²ÊZµn·´½³ X!=…ÄÚlî9,u9®Q “׋¢Œ#Dì§JµºO/R²ë(ɺ¾”kÍÏÆyÝÊ£‘i.þ“Æ æPpŸHô’QÌ:•F IºOö©çe© +¹^%8…G%ÛMÑgšÒ€¡F3‰&Ãoº’Á!n0±a>v7$u-‚+ÜÜMÐ’5QRè’kÓñç!H %¶´kà`¤Pq¸¸Ï¸"Ž— ˆ ß²<˜J Ts’#sþµ“ŽÒ '¡'Ôádc¹0Ø4–=fQ q‘Ê×> †,§+™°‚vl†ªœöa·µGª’aø÷”›"C°…=Ï{…²+¿3¹SôïåȪBëê5=ÿ¶+2yq%UõɤB„Äçz‰7m½ÜâfòKJ`ˆƒ;•5”¦YB}:TjR\´#ëÝš£ñ|˜×¢¡Di Ùné7ˆ!*C™ .î>H€¨Ìì_>}|v­Î; Ô &L±!çJ½TÅ/o5‚?«Pôé<Ó‡ FK—¯n¥!Y˜TDc!i¶¢¶ˆ•uTG+x½0Ö/Ý#4£yiÜYÑZnÇ)Z{W\Úg F±5Û/dOWR ² cåÿÆ)×—éÚDÓÅ*=Âý­ŸÍr©TŽ$»í”*yê^¯sÙhvöOtÓyQÏâQ\Œt[=É>Ÿ°¼Î×3Æ{³¥{q ”;f>)uJgÉPF½Í‹L±—غŒ­Ä!‘hï+Ø­cUÕÇ ™ûU1ŠS¦ n®ŒçiJý­+E˜¨…ò1g5=ˆtÌL~t²í»Ø„¢èÂLIŸd}rQõzSËÊoI|ÿ&[ÒÎÉZѺˆqT„TÞ#ðDêpÀXÛmbÀº@Z']¡¦dñD7q„$ÿ2¬šg‰ˆvÈ ¦(ûš Cq•Õ¸¨Ã. pHKîR3c£œ¢uxŒ‚lFC¨‚Q{•Äb!&ŒhíUŠ%ÐB„†CÌ+†‰‚ '¿‹EŽL!ˆ!a_»]RƒK±T‰†Ù DJÌ9šæÈ%OÉ‚‰ê¸ŽÉΊo–QÐÿå"¢ˆ5„é^&n Љƒx79# Ñâ(çu°3!½ÔýÁBâæ¡E!…œ^ýŒªÌ&1‚ˆ(ž¹ †ÉèxÔb b$~{00BEÁhèHôN5©méÎuÎÐŒ9ˆÈkÄ;âXE6›™Gü Œ u tøeØ%ç}qs,Z è£gSÛ…dÇ1µèÝN(ÅaTR)9(]£äw3…¶÷MîLÊÙêåî“gÿ‹«gtIˆbSH" Æà„oyÂSs—ÍR¢ŸøeM‹r\#jMŽVñl‹ÿ}K3*ÑÞšåT2ÊVŸFÆ©\E©ª;:èßé†Ý»AÇ^ï§ßcîQ®Iµd/›³÷Ç¢ˆ†c?˜ÈY3b²}Ç0QË£d«¢kj\‰£9+¤Ïÿý3¹æ«˜‰„¦]uqFW%%¦"Î@¥ZG^,›!YäXã‘„T¡rÕcT˜Uêã*^}&ñœOGôµ7LÕ—5‚ª½ÓÉž¬n²‡Y@¤Z†uñW.™U! âÞ‡,—lX²Õ¢XE›3KǪ—ðT2E)Øôê:×LÂ¥V„ª^:}8†;ã\Å%e­í%ÒÎNºX•–« †Óé •ùˆm±B"‰œˆy¢wo-šw¦MfFI×/*ÕÞ CR™T*‹ô0èBiLs¨éæ)lßÇ¢qX¿ÜS/‰ßKRimMNù)‚&22nä£Ur²D! g.±‚¸¯ÁÅ:>ŸÅRï#303ÝôÉ)>hU)¾ô#}ónRY´Ïam¿ŠéÅ Cç–¦6ÉYÊJëg/å݉M2Ø$ˆ1ÝÍz>¯uЖ›†^=î»êêˆüîÇúT9Š‚S’éFE(EÃvD2Óæ0‡½çÅùrŽkdÖ6—˜FíævÄý­„ë‘"Œ ÂË5ÖAEtr³—Τ!wRûzÛËT^úà¤/5èº^['ØËRé¨;²Må\{aYˆÆËæiЉÅfg¿gX«ALvíJm|ö±¥ßz½™p’~ÕÕ/œ†JÓP£¦‹fö£)ˆ¤^¨ªSrÕÄúép½¿,Öů#—o­Ææj­’!„*hª!ÈQ~¯VJãOSŠÃ‘±éÏK_»ˆâ'5Ñ$IgüQE)/ÈLU8“¯qþåó÷´‰³=ÈþR$ññÈ´ # Ìžxƒõ‘Oé¢fí‰D¤ùɾ¹œýWÿø¤ îÆK5`‡b‰c:²¡ÕBp´—k- –&u°½–¢¦XJÖÙK”)ƒ†(Ȳ—Ä$!X©˜ŽtS=Ë’–Ç_ô}BìÙ¾…-=½˜²õµ…2˜ÔvÅ!jK*býq’ŠìK×ó£“dTt(OÔ¤Š)ˆS;£lsȺ#n)…ÎÁùñLúÍÚT_#®\Þ¾a#- vs¡‘Xëe}bYðûjï5¼KÖMgíã˘nM„5ĵ¤Ã8¡˜ÇAXæJŒçmL ä:3„¡ Æ¢?)3+Õvög\1¨ô»LìAõeþJÊ”Z¶^Ö?«q9õP«­A+o ªÇ"ºÜR”É¢÷µ[l% ™·ÞÓ Åé6¹Ê‚ùt …dN9H©9Âé¦Í5ÌK&}¼%OE¾÷ö •ËmÞªŽ…¿KyQ@êa(•#Ec1,Ô ¢£É¦yTTÎn*j-©õz0™\¬„›þATÄ.Qik»Y·µèMüÄ9«„Y—tÆ9È˨¢d®Óe¨‚ó’¸i¨&?Ÿœ&ôø¼¢.Žú«&ÖÄ…kA˜Ë¥™%b‘n†D—,WQI¼Æ“_Ä'îQ¿V½Gó/Œ3ç×µ”J­H!Ú\윊£b1—ÂÍ ‘KWÌ!ˆ¨ˆÜÎîçþ*T¤í¡]o¸´B϶Ó)ž·múöDCS6QQËJ(V 1ÆFjóKÈDT>º™¾n69v¹¤kk¾ö˼-b©s”AÖž˜“µdk¬é[¦HVEMO׃a˜Ê¶Ù¸ìMúðã MÄ‘ Òi™)ôu©òǺ×U0s]¤²±E+±&Fª/‚ ÆSö "¢iގקÉèËÙ¡*¿»B{t"R·.‘4RÊ@Â3ÿgiÞUÅyåz"ë^”Ãc~×4뽭ʆ]ªd‚†s*vWBL;52×c*‹êÔÄ¡YóRP– û‘&åA“oÔ‰ómæ_{}Å0Cå©ê½óoˆF¢w˜Œcp¬¾ŠUS±8¨ëÒíÑJ= ƒÞªaÀ+)9\ã°È¼ŽfÄptacâ 0Ç I†^ òWæ´ñRð´æDÜðZŠ[\8Àvw` L Æ «°pLÃDpÈ;baToñ wW­ ¹ÎÃ,‘öK³Ò;i!JØ´äÕW©Ã1±l€F7Ë3b`€1ÉHqó-‹O‘L`)jžªÑ ÅkȨû0”ÌÈcc¡˜d µÝš³Â“¯E3½RKꔣßê!·#µ 3×”âc†Zæ! 6x¯¢¸£s°\Noô ›SècG ƒ¶)ޏLдT3³“g ã/Çj@„¢ˆ ﳂÜbꮕÿøÉ˜WÖN. @XÔ¸L´ \ñš˜‹óÔ‡7Ú†k:Еu»B/œ¨²é 0„;xÅ8É“}µyÔ”v[³ZŸJDñ+/¢ˆºÅôÒ§13לR(RY,QÓžÇ9Ê}T۾ܙëüÛÚJ‹2âò¥h\{6:réÅ¢¢ë6FêiRFaSŒlù' …2q¹½ A™N•U"ÇêëóV–/Ò¿Å[.^‹u©–ŒÆq ŠÞi‘†%`ŠÍ÷´”f³b¶¤ûÔ“]{^üJbyjÉD¡ó‰dfOCœÂ¨¬—/+åVÈ9fH•7>_ðìq Æ%Ò¤ šººÙni; vIŠZjZË^$›ëÌîºj´ˆâ/œ§T¡dâ5„9QŒÒ?gíû©lqd±>Lêu+ºÆ2Põ½vŽaH¢æRh•ÎpÇŒ;zR»¼C§¹l9®«µ.è‘){ë*"µgK¢y)B cSJB½ËÔý(b†Õ œL$Ÿ}V!(Ÿd"6žÿÌ•%I‹VRö‹ŸsŠâŠFÅ´Õ‰…ËQLQÍBKZV®(Ç*c¹ªdܺŒC/%^ÖSwwö|¨ÝßJS¸ŸWþË4Œ#Ä~qS˜&¥ŒQ\ÊGud7“œš‚ÿþɺO™(ÉÅ­z¿müÚ1‚£~Z˜2ÌáJ§9~™˜IrˆWZ&ﳿX.¿c½Sô•ô¢íõ]/wÉ|*¥q1wÈ„UºÕÎgù¢‘جƒ0¢%IÒÉÒ|ÜË(ã*5bôúç£3HûµÊ˜B êEc—Þÿ‘PÎ19uùiµzçR¼gWÅ—©}ºiê/\ûµÂ²²£žC£=]7ñH(ƒ™FOsÈ—?™:"”ˆSK&“±‘¶Ää–„­šäq]™5ëÔF #L%µûZSK‘x…²§¯¤îw1RÜÜkV˜Ž+*ÿ_ü‰Rf¥1ó Ç1•®¨ž!ÖCŽs±$&ÒÅç%¼™¥ÒÓ$=ÕäúOœZz¹Ê)wF¹½ÔCrÒ ¹ˆS8Uº.úñn¤DvλÊRÈLïú"{k-æ]FÕϵ ϬU¢qðÞÕQT!? z.P‚INÎø™…În+°êÌBïÒզѮS¿¥qf‘y¶ÊÜüËÓ¥Œöen!(Γ”ª;åª{.©’ïW¯sTW|ƽ%ùõñÄTÔü啕ùñ‰2ÊQL:i-»8@§9L#5 LÒÑ*öl*úÒß´ßC•d^B4–ÊK¢¾U5Fos\w®™ÄÚ%—qÔ„aÒéÓ"J}¨´‰r&°äÅOl_f£¡ùÇæüõNþ|éˆÞ‹¨œŽ¤3”ˆ‚®âf5^ì(¨Vÿ[ÖÒf"ÈÅSÒ’ïwt©R7•z“vv¦¬QfIåëÔwTœímUã%!ËYŸl¹¬ÕÂù’„m*/¦MKhœ}EÑYÒˆC|ˆB«Ô­3òÜD*È‹•uu°ÏGÕ¯È$•%{ˆ²h¹É”×£-0ìE'.3C<Æ4š² æO¤gU¬…õÓ C;:üïn}[êœM¥¿DååU%Õß)Y9h1…é¦ïI;9 2IwóI*9]Šuý6[ÍÔ™Óò\Ýbï>ú; §ÉŒ”rDaTŠŠuÓ•ŒÍUôLSIÌ`ˆS}êfܯ+1\ZS-EÄK±·°ö××"%X¼Tßq¤z-Ú…)XUf"&˵aÕ)]~Iu«mB3ÒBCR|ÍŸ²¢•\¡Z†®mlúR™ ќ݂ŽdÚdÍå%ps ëºAÎ.µÝÉõÒÌÜÕöË$dQ(&f±©s„+xŽr–¤9¯'ŠR9A„FýY¤íkJE ÒnàÏ>;ºÉ^×ÚÔéF¥Ærl”íÐÁ8§+µ *nÕ³gâ˜DyQÌ´¢ÿ ìrv”ù‘º\sM)a5 –V%öÚ[¨Í5ðPÄ"´ ˆ©”­=&tä r{á\o²¯,Zî ¥dxŸÃ-bD¾T­~¥"r*ÕG¦*…0Cœ˜±Ö„m§ã0ƒŠS‘kW§Z´n§IÄ«B×¶ø<Ý&ÈîþF=œÛ¥çË“ÞUs(¬1$a¥¥Ê!1}Hj´ú»ÞІÄêSê3ç,‰»KœeDN£º§õ¤«™ÊP† ÇTnÚ[y3c(W"]Êýôãoí~ˆZŠ" ´ÂP—¼¿i4éçdÝëð‰pÎvV"{ðª½ýàQƒ²ÔÆ©%ïÍz “ö»ŸÄËŒ„—ÞÙiv|­J) E 1Í“n§?áGŒaD;áÕ¶Ò)˜{ eá6Ù¦gîu(Gê}¾¸Z÷5ô×Zåj8IyB!Ì9J¥ÃvgÄMWr¿zÕ¢’ý5D!çØUP–MÚ·‘S51ýÏ’ ‹U3Ÿ\áÕjÒ(¢ é) íE ÒL¸¦ãVßWÙ’s²ÅçÂZh™R.ЗKTÇ\ád)–¹öÿ̰®q×I$33®Ù¸Ö/ùºB&b0A­¥í'­5h޽¤U#Q,¢KuŠ¥3 ;4¤Êoª¢¹FK1鯨տêܸI„ËûLÂZÙFÉ1ùö‰ÅW+ˆÎî¢ÑÌdˆ+n^„0BÏêÏ>Qh^ÛÚIQÕ‚œ…òÏ.–ß¶+R3˜›ÓþUŽ-₉FÒ5m¬R㡌ÖÒal¬†¸¥aöÕJmµNèa¹i­AHÊ*åµ”«©q ÈÚ&MÔ”QÁB1êjh’o_&楄Oi+’1%¼Ú^©U¢´&®)!³8Q³nã5{C‡{'`¸RîÈ2Ó)‹Ÿít‘7þU¬%ÏrqhåùЉƒ]¬LÓ[§Žáœ‰ú[1¥ª™Dô5“:S!äå¹sùÅÊ­qy]giZŸW®ô„[I”1оïC•{=q}Ø’ºJça3QZ¸YyÌÏOlmUÕkÙIß‚+¼áÑJÒís˜§!søÂaY$C’•¯™t¾×ÃÖÃÐj¬«ÙÕ=rõš¢ìTŠËØ´â²=‚”W!r!ùÌ26ÑHívý©ˆeÿôGv"¤–”kÕ•‰‘“MÙQ›iïCUEE…NÒ·0øÆ2%F•·8—¥)WõvD¿™„š•£6‘f)L¦®{ ADS¥L#™ét2eÈs ¸kUs)t'ý.e,–]ôÊÕhg%&Ãmlw-$Q J/ÊWß¡äb™)2"t–K8„ïõüÀ  Àp@ 9.ÚºMrÇh §—8fcÄn/P“šé¤:•´†­tŠG%É¥qT¤/¦Ñ0K‘ÝY…ßCçåQŒZeËfÓ¶ŽyVB—ÈI®¶ät‡RÔ_+NLåk)DªbVˆþGr^Ìý¹Ã!QZu=A ²ç’®‘”A›5t¡EBI¨–x›Oñ6Ä©žV-o $x‚¢TŒ·£å2”%ä!œéêþÈ‘Hˆ¨#•Â*ÊO"Ñiô%‰¦EöªÝõÓ©_%QvJEŠÒâ!™¼x¨ïÂ`žÁÂ-ÖãW°¸AJr† Ú&‰©¯ÞÕvóÙʬõq{Må÷«×ôøÜÌ’W$6¢”Sˆª!§g¯®_µ|«uvZDu?ŃR±P!¸ë\–ˆ'QC¬¢3ºÿ§NZ%b¥—‘ø-Jã#\!÷Š!Ø¥+QqÚŠ|®‹K1¹­bÖˆu=Á:i'Duº½=!L!æc:õxÝYRS”Vݽ†âhų8Œ6Kg"¹…êw3Ì¢”„ï¤Ñè3‘óÍG(¿UW3s£)»žRŒt¸­jì'„*’„.'+Ðz^4jrµ‰Æ‰¥Á˜¢bÊ…FÒaJp¤̲Y1ý´ï"ŠôBQì¨C«>ªe;Ú¥î?ºbóEïè"¥PÅœaF Y£ao S]P¢ôÝ!ÂR˜Ç%ò¯jÉË’^v2}“qObeM3Ò‚ït¤5³q‡I!L’'Æ6Šmb5³s…ÎUq\êŽl“æ…½® ‹þGèøq7#(éìVC&ˆ¿a%%y‰öUå÷3ÊÆXä0Rx¿!µ C’™-É' ´º*ô…’“æcæ_>l£dTä­¹)+F“—wD–1œñ‹"d®AvIyf`â.(Þ‘n¥óo[^Ê2Q|‹ä˜·w°“5„¬Ïè0ps’=^ÍY‰9z$éB›K|…´òÕÈ ú^h$Ë—Z“,I_K²ÄQQÊçÓS½´G-ÏñMe/*ºQ‘j{)•¾âþ2îÃðÜô&>ŒÖ!@æpœ™ýNúAƒ/e¶ǽÊIš›YÖÞü2.)0LÓ0ÖEõ‘¸šnné¬VŠ÷3‘„Lˆ@Gb¥ZˬMgÛê¤ÃµÕDK‘g‰IÎæê-¿¢#H¾ïVüÆ^mªQܯVóU®n5Et²Ås×l5×ýt¢ q¨-0MÅ舯,%FªhÏÖ7.Ù͉ã'_[ˆ R)ËâcPù, ¦!u“±løŸWùNGÖÂöâ•fˆNi4ê´*ˆŽ‹­™\•!!ÔÐ×2Û:ìÌ2•?¨þçözÞÝ-'ì Âiê¹/rë„eÔD"¡ÒU F37&3¯Tõvªy†Âã.¨FDa""Ñl²óÕ‘¡ø›l±Î}ª¡Ã‡&Wœ_øibØQödY®)huG s0†YsóÖD¡?<¹õ7%tJNÚœN%*/êT“*e”‚²ˆ 0Å?mÑt†ºéÎ!ý 0µDn-sç›Tcá8A»óÚÓ­‘žT±F¦>ûJŠêÊK·Xù¥Š}ˆó‘cœÍÆ\#²£ …Êè×é- bX";ÖRã¿ B‚öcîœÈrH(YJzÜMˆÛ1"Ó:jhª#/×±ÕõZ\²„Ö)­)¢/®£ÐΨvâdéFƒÐi}¢ œ!™WÊÝAIãéo‘)Zá&ozëÉRѤüŠ‚W$É*HÇ‘’VJ³bˆ˜œÄÕ]{1lxêg³‰…õ¥\4¤ñø€•,âšK¤Ê`À P‘?£^æ­ðq³W£J!ÔTSÇ(ºéœ†z·Ñ¸\[ ËÄ.µT%R$ï!²ÜÔǺØîLŠ®ð‡<'Â#oÌïûoTÖ¹LÓ0˜›½.Ú-g¶UÆ’a)ôˆTË hކ) ãY(‚S¬(Ø^iGÄb1c§Dk%ÖEq«‡>k Ñ\’„Ä‹Z[Œ(²i"E‡)¢Mw}šª— Âº„ä>—‰;ŽVû¤Ý5‚<…!Ûª[¢µsÕ”Dµ^Š_s‹+댺ß–@X²ÐÎl‘š›4g¨†B»$¢Y¸û{øº]¥“ø&=xÞ†J+äÍë·YŒ¡]É!50Ç,«—,©ìe!}KÞÄê…Ç'ÏéZê"NJD¦BnÊ;µÎÌÓÍ"—·É÷ôf£‹æðØö2nŽBîÈæaHa¿‰K>“lsŠ'P² É­×}ÍCq6G³~„tè BCF‡B‹aδÿ’íÖb™K~m¶½éPBOF¦°´¬‘‰A–ȳyŒ#a‹vJ:OźŌ¬`µ$DІ^_¢\PÆ>å|<ŽUòÁ¨JR³jp­61DöHG1¦„kÓ ‚¼!(´Á$D1ˆáDú[ZŠAÓÎ|t”J¡®Ë™Ù\¶ßU\ò 2e5_]@0‡„û&~Zlž<ìå… d¦à§¾ÃçÖCòçÜØMV•U!f=jEEãHìZL…¹‰ƒˆç"6Ò¶_ ‹èz¥³’(Ívþ“-ÖîAÕ-°8î ¤JK‚¹ûìÙLÚ¹•ÌçíT8„ŒÃH„>%ß-¹^ÞN¢Q•Ÿ°LÄsà¥Ç°”\ˆ\À¡[é â1©^ëØ[ ¬Ë¯„¾BZ/T9Ûôa*ZÞâ%9S…R¢0ˆ*3QŠèA)ÿ[Ê\†^×SùÈI\3˜æSìžúÓyÕ­\y^†ö¢ íÈáé%Þ¿,Qlþ’…G×qJfâVÏ“'ŒImtFÒž‡Â­sKuLÈ«G¢QœãYÉ(²‘qoGRYŠIj%s…"8‚½>¤àºÜ%7VngƒT¿Ã5ÐÌ"3•ôJ©eZ9LŽÞ^lnসŽÏ͘bj,qJ¶n–£lÂ:ÅJgO@öôÑ tVr `À¨²Mr¤»rXóЫý¥šq(É)®ïrPDSŠÁ®Õ¹ùWkŸòa”³• &É/d…Á‰æ·ž¬ì°`prË{ų—‹Õzæù„Ù‹qüzE‹j„[4“TZZn•TŽÈü*:èd¹Zr+—£Ðµá=JÏõl©%,¢ŠÇ)\õ¤ŠG‹¸œ±jj Cá eZ/¡PçJÞ—5¥Ç¢=NŒU98†R&f›lIH›åi‹ŽþUÇU¯\ÿ¶«ªFN'òÙî’²'#®yÖ#vT[”¥8%.`ʃŽ)-¦Þv nÎÝ&SMø”iÝNoSè‹d©¬f¸¾"*"ù¤hé¦ÿøÉˆX¬Nú]ùÓùÞú“ûóýñe³’UÝÿ¦òÐÑzØ †}Lnµ2ÊA³Jˆu\Å«’¯?í*t¹Ž8à€UYiÜ,N-ïY•·Ýñó{e³çµŠ‚Ö Gë̈Ký$‹Zé]4¢”BߊW®ÕÊõøŽÎŸR.Ž9»d¦ª!L‘ªo€H·º*E”E"÷§ÕÝR‚˜¥Sƒ­onîɄܭëMdþh„1ä„Òº¹]¼É¶¯àœÖäyF£ öùB#õŠ(¦ÄƦ|KK/ b#˜ÁœE3' ý‰J¹90C‘[ÈžoPÑMýD„;©‹!1ÉRÊuâ-ш“ÇùÊP½BM/R‘8€Æ/H|—PŸi«/_»ûhK9®‡Ä”vtV¡H‡¥”ŠüÙ¦ÅìÛ«¸p…2¡?ú×B:i êË6W6vë¥|V¨Õ®Léô s0a·¶—_S/3¿—´$ÛG¶iŽV@ÅyR0b¨M£ÉO¿Iò•¨¢ÝSïj7—*ÊS–+SrëД8a‡¢ò}¥ÒiŠ¡YGT¸ôÛO<^•ôJGC®3íµ±Xw8­Ì vÊáÉcÇ[!*ÖÛ}DÛq$+¥(bô#œ„9DM:±¶“Õ¶ôäF/Ê5{¢"W8â†dG䯑qÊÔ9ƒ:8Œ”ËÞ“YÙ¬YŽƒ2)=z•ÜßÎ+ah¬9؈ruÔR©)PPƒ„šI#ªÞº$Ú}1ÖŽ GK&±¥¥¤ÊE ÜŸ«KµRœ)%F!l‡&Ë"rÞçÌ[¡2©¥8A„Oª~ÛT3ž)gNU^,›\ó1QR”úânnŒ!Ä!«Z1OyúSËGrŸðJFþ%¼!Øf¨F) QV% 2‰’S­µ³ ¬9ÉÓÓ–Cï$Œ¢«¦›‚ 6¸+¦}ÉI©Ïb("\òÔÝ“ÍÏ#ñ9lφÒ?ib„9± b—+t]s¥¹ñ‰/ Tq=0¢é ¤D³ˆ•v£Þø”âÍ­åýYkÓ+¦ÔE`È©J*¬ùAÍk”9K޾[w÷³°† ¦rwpL½o¬•zˆ”VböuÓ_Ý£µŒÑq‹¬³Žs>©Hm_®åã_#µÉ0Q‚7©W>»¿KË… ¿bq‘d_¤[6Œ»ÇÉ›´ù¹_~Wƒ0"rSßžÕ(«Pˆˆå‘·Bé–D)Sm%©Ê¼]8¢¹‚… A댧¶’D{˜›ôóý¦ÁçòEWQ܉aY‰1V®a¢qõñs…)ö” i$s“ÁØ„OKvaH´0âo†µ=<#‡VŒ³·é©y»ûž§íþ±/+z Å Ó„z9äÿr]6WtCón£l~z—5óZèU¡ÐWŽ©ŽW®MRâ ò–½ÆKhPSŠ;z“cÚ4•"ã`ª‰“—ºWÅ©Ž9šFÌàœ— ¹Uôûª™J¯ÏÚ6ሿ†)"”:PÉök‚±Ú-ÚA0I(£ZññŒ½Rƒœu¹\FÓòËyëZöIFÖÇ*œëe²zжâ }n|LÊp¥IKl]8–!ÕPŽdâÕ)Û‚PÊS&U´N–Ô6i±PâŽ0ÁA3—­W0J¤ÝôAr6u{ efaDʧÔDÑ›íDäJ»Ó›0NN!phaÂÍ'k:ºŠË´˜Bè£M†»,B¸î:XVñt^›åóe%Ü\FïÊå#¦¦Gä"iN„DÅÕ¤†•cíφҦí ÉÌ1Ea‘»±hZòvq8Õ¤›UCy‚‡/)AÕ ykÒéq)«§Òú–% "\d*ô.%ª%_™µ¬¶.Qȶì—T©Y&Aæo'UF(¥¯qX\–•‹ZÉjh‘a‚8ìutÊMM’ßóùu)r(RÔÌWBÊïøj›·õ˜ú”RUÙ2´9Ô¬uC·:ñg°õä±ÔgFáéƒù»6ÄCŒ`⨎…›±ê¥Ê¼ÛúãÞÝŸªsQ8ÎÒ“©*pF!Oöwê\”ZQì]âøÈ^C†{ªÂä®™J‚»)àü%~ùOPŽQ w©Eš£W/Ëy;øMK¯ƒGA‡*î›™DGqÉWß'ºišlLõ’É›­"©!5µ^]Ä•j˜›E’ópZ¶§XPaUˆ FÙiõ’Þ-R]—²ÞVTD˜ÂG{âUð‚]ÐØ˜!n\ôAyÍeñO:iÝ#·Nò0‡ Þ`ÂZ·„Ùd§!G8å#:ÿèÕéöµá*ù†g2™ä2Èîa=^ä¿+’™üo9´ÊD,¤ªšìA—„jºS÷Òö¯iÍ©î3¾ÿ kw[qÈ‘aŠ1QˆR§µÚIÅì<Å߯®ÛLZ›Ñ×H¢°R-7dzË­œšüLÆÒ”¤£WQžËlï²P€¨¶É¢ZÓÒ’õTÈr02„j¦tÔù4JWi{[9•°AÓGaX䔨–#˜ó!ÐÚìŠË12˜Ì˜/7*#9G' ÈŠü¾\÷Œâ0¹Š„–Y1«q<`à@ÊS 9…ËÍÃmoÚÒîÐØûåDÄ(¥!–'’©¾B58BÔò±Z»‡ý"k(ŒÂ/•+X¿)'ZÃåvŸþ×’O¿P¬:AŒP«dþêÖÿ&W¨¤B¥‰‚ Ê‚¡œÚ¢’¤º1?ÅçÚ'sëòã4Å‘ˆRd²âÞƒwy=â å!©zRôÞú(®A:ˆŠR˪¦§¬Õ„.ïº¯× ´?ÇÖ0¤(Žr ÂÝsVÃÕvçñq/–c„ åÊ! dËìŽ0F!ôŒ(ZD—æÞê (Œ)Å ¬!?ú¿n¬’ÖØoÌ3Å1ÈCˆÅ=ÆÍM9goÊdZJüä¡qÈEScIÅ×3ÏÄÚ*sæ9Œ^¦¤I¥¿QdâÊ—Pƒm•¶žø~RâÚ”’¢"ë°T¹IEÃÖ®dc“‰W_$fýÜÏ,­WJáÚd)NØWvã9 g(m˜£Ÿ‚a"ekÎÓ1Æ*Ν‚þÖ[Ó7WÈçZ"¦´D~W:ùWNÅUúbš‚][3éÉÜíTËÊéÑ\ÛÛÛæªý˜Ævr>ÿ_nÓÝ0"(‡iÛÈï‚ÕéâÕ/¾Tx®–¯fþ‰•½•¥qÎR)*í³åµ¥êzs ¢0¢,ÂyUðÎ8æâЩjÍ¢Kjp¦œAœD b*m7-—µ¢p½—»{q^bFFCT˜ˆ“",ÅR·YK®á壻Ñ$%Ç$í+± –N˜¶‹äïæ/ó/ú·þ_ÿÑ:@?`+ AþÐérŒîûþuýxfJRä(Êè&{Ú­˜ü…©5½e|Î!M’/!ªDzi”C2VÔ\èe£ 7–Ö(©Wâ-0ߦ2a©’«dÕM­{3ð‚3/É-zò¶LNõ8‡AzÉr1Ås)8Šâ­WË-½.+!Ya6jâë‘b­{Ii!kŽ(c*™p–‘ÚÈXïÜþÚ0ª*ÒÂn¨E!S ×–K— ‹R8‡7¦¯µ/èAUòŽ(OÉ«v çJrþ¦«\ŽwZÇ\tß=’®ÏÌÆ:ùHòK½é²4º%¡sæ!ŠcLÂÏXk a’9:”Ê¡¨®ê2±X b•Â[q^U%mšÎæÄ}Óê G{É Ñ0dž¡%#Ðzà¥UÚ䊮äuNî¢à¬)]z¾²×¶AÕ•—rªæm4ÛÉó‚˜ç;éèÿ´Î¥KûgŠìZÐ"™i›9k%)+¬ªßub‘Ï›¾hL—Å!©ùZÍýÒˆëw%iõ¬îî‡rŠ Q„B/I‚ˆr˜@§Q·q4•úúꬕ6 zišE®ÃK58äj¹Êâ“,σØÉR¤Š)×ZvoŠÄ%ä&¹Ç<þ§) Âèx‘'íŽA‰Î:ØÑ«˜wbî¬S³núiÒG ['2o™yðÆCºo“iå*vmάºM=°üãÕ(¢ìµ8àæE"µ)š9|ÌÕØèˆ®Y«ÿìÄÚ'ªM»dçÁºJ^šCŽ{/ «¶¹*VëÌˬb*V¦WH!]f‹&XD!ÒëÏŸsÖzw•w‚:ðÍT^u«×<­r¢ûa©-©1ÓIÅnJuD1Î+ª†É7)èÌU“iUÞ–NJŸ6’úóu늲„S:‘µ…E•t¢­#ædÄ©:²â,‹;õ;\’çugçâìÓ–G¹Š)Û» ëÈS•76éÇs̘h‹è«›Ý½è^l"jå*â¦Í7Þîn;T0¬öÔôEݲétÆb7è¡Zæ»™PÙ›w~«9ב*CëQ·‰âvÉõôÚ³Ú‹²ïoQè¿ýD;ýã©×Ž(èÿRv3ql¥R!JÙ&âÜÕ“uEEïgl­kMî¯ E䦢åKæqN—¼¯+'§ g_¢EÒ[S4Ÿø¦U&»-/½6K š\^q”•gœ©ÜZ×\å`žfu]¯ºaif¡=vªS%ÊÏ”Ù3<Ù7+sÓ0Öc53÷„¯ÏRU)‡D$¨s¯ºÎÄtÒ *†K§>Äú¤“-µNíæ›MÂ_z»:%›ºD±]Ît"¾®¦ ¦1=ÈAx/,äV5(ICÓ2E«~ã7‹ˆçH†Ôß¶ò¾µ/g@‚×2ã÷Ç]cë©"h„Uq3qÛ͹ĩq>¬Zuh´^Äô®ö㱑DEnó4©n1‡)ÌŠÆ^Md•5Sk§úoæzÙU ·Î§-ª3jSO¥*õ\Ë18žsðU¡Þ„1YÖž"T¥ÚüÈÕýTÈ×ÍâZH3[©Æé*7¢d’èŸäÄñ™L\“•WlÝ*VËFa äo¯edKPBHW6¥ô¤ÍeÆN}¥¥¦aXUê$Nsæ)ˆÁ†'V#`Ác•ŠåL±ã!Šà~8ÇÈN1™ÔBìPƒ‰ˆd0Äd©šLŒ°‡&øá*Uw³F1 ˆàõPCr!x Ð"u4Ôä9QnŸ„ A™K+%e 4v4 ˆÀ³ŠCÉ HZ[Aéè¨!LÇz˸G ! 5’±‰Á€‚¨ªM™7"ÅÒ¾382˜¼àâŠCLJ!Ø }Ê1³5'} ÎÊlˆ„ŒÇ°Ð‚ï§N°ÇJb°+³,èfÏéØÄ@Kxó”¶"äba‰uVKSž™²0D6 Zö¤ú²g¨æR8—äðÅ)\¦ã ÔI£(‚„l1ȃ ÒFPa(2Î6ŽNçeBÚr!(B‡Ž«#ÐO–X°Ä8ÙMFcĨlÁ0B\ꨂ°ñ…ÅU†C7^`+í ‹*¢„Ø L©Çü9º‰3ür”Å¡±E;™”D¶Näóá•A"’E1LeëZ|æeˆ"d@)2‚0(S2Pƒ(ÄC§8 äJš‹ÁÌìÞ›qg(ã È1•IU ¤6„ÀFB ƒ)œá‡ÿ§P•V¥V-?î3œ1?b9xÂÁÈ˶arÝÉŒ@„1å®0 Ìø†A#G¼¸¦ø1 )ëÔ ¢i¡;¼¤ÎgOQ‹’2%'7­Ã ÃD𻌄¢'”îÿ@¢V("N)ÎÜŽÒ¢Û|ü‘ pe’…&3ÄÄ#aTV:ª #S!¾RŠ êØ ‚0IÌ*¤Æ†”¬Ã“ÝkSH3“ψ’A)j̳;miŒµ+5íÊvªBZþ*‘¡*H‡‚͉y J31CÄ"BªŠœä×Ê}ŠEjŽŽ• rI™(Á[^"š9¼ ŠA È]ër!V¢ˆ?\ÐkyE …˜#%¨§Vvì1”`Ž!ïuÔÀc ƒñÊU\ jˆh.g‹Îe6Î!KÆ‚UÔ`¤{bPj„”½ 3DûòÐÆ '‹\"(´Ózd*1úøÎ‰UO\¡aܺ‰äaûxBB:‚ø€€„˜…¢aˆ9hq Ñ‚þˆFGü‡†aZ¥c„ NMNb|4k‹£0™LQaXŒDl¢#ãbŽÏ=@‹Dd!SœñØc qN:±Ã HNHz…r'FdbVãC(ŸˆB+?ÑJ ŠÀ…q®êåÉá„fÞ sa¨‹MœÁ™ƒHh ˆc:c È„FQIç`œÝØ)`W Pc‘Ÿ%è^G1ŒiqLâaJz+¹ D!*HwAw¢ZeîÄPÂC%­ìÝ 22PUß#@L¨¢Ô9"2h‰ ÂIYØ{MD€‚¨x ¥0È Å¯åŽÞ|lÏ‘ÒT5ÏÕF6 Æ›†‚ Ñ ÌV)ÇÈ"ŒˆPR¹_B@Ðlà_ÿøÉ˜YüNÿ£íÀ  Ph`9´Í–XÇrÅ'Ö†PPšj‚ÒÁÄáœ5(Jß½íPÉHãdEŠÙG¬ê3R3gÆJ8¸8„VË›ò ¼‡T Þ¦hJ¨æ?Ìã+(j#SåÆUV A N> •x…*W•'(„DfÃ`@½[Èb°CQ‚ƒ$Št#ä 2¤•W'á»™¯ãœrª§•‹ß̪簵"ìX«á §Q;kØÅ ÏÏ©òˆÍ › ±éaE@œÂÄ·" ò…½%æ$l6Ry M‹—b»:£SºHápïã¦c|€ÌCrœC—XH„ÃQÈZ¹Nd J*«‚ÙHXͰ´h^rv 6àƒ|¦ Òö ©b,S)ö¬Ü…÷­Ç$ÐN1¤úÑNöéÃl@ƒÔ¤‡¸Ž#C’šƒ1;1šC—49ˆÌÆ94U~¦7üý ÒÓ¾â”bìÄ+pMŒÈàÈÕÇ“¥J#`!-X©Õ†8ì\Û™*Šh‘ÎçæxŒ€Ç"šjHà)E0ã<Ê eÜç7Ĉâ*‘Ð@¦Su R³\Ý $Ïéù-ÍaÈzb™ 'LÆ_c„ŽJFƒFb‚3/Aê)O™H^³u8ZRæ"bÔbLïõÚÈ`Ä0Ì25#˜¢UPH³rVá‘ IC*9 p*z " —ºS|û|2Š_&j¤¤C;"„V±• ÈwI•ÔÑ H„ìŒ=œåáUG–ìÁ „âfa$e9äC2ÌqŒr(ðQv~r rqQ;¦9䢒#Q”—ëBr£ˆÃy‡3¤!‡#⡼d˜æj: µRÅD-%£JÁ’“h¨´)0™¥¡LçfŸŸ·.yʺBêÅBZÑ ¸(h–  ̨vÈ!‡E¶~zƒEXl!•6w*Æœ¬D$çáÉðìÅD$lFDn‡HͰŽ1 %A1I3>WQÞŽe!I”É^@ƒØ³œÌQ nH"Ö¨sÛ—®k¼FaUÈ€Ìn==EÄÀ&-Ùê‹É™ e•R)S¢Cqcñ„ÈCXbf!ƒR‘”åN ÑȤ nÂ)À¡qD w›";òRbŸ­°èq”A³<ÝÆ‡Tq»Â<©A ~‹!³34Ö1Mˆ\MT8ïÈae b NEd¢œ§˜N(AŒKÓá¹Ø3†§”¬ ‰g›êSÌÆWcÒ1¸ýø‘ˆWðr,Ä1€Ÿ$E01B: 8HЏ­ˆA l̆mJëAÅr…!¨Hg5Ÿ/*:KIŒÁ ƒ~…÷!7ÃD£iºaÆ~¶áK TAHfé!Vê1¸ V<Á0ŽE 4ôâúâÆ …b¶Iû» (o좠\¬*Tä@ò æ¼Î AY9D]¤¢̃b`ˆ¤Ï¼ÊA&¡Ì‡¸¹Îår*ì¸#I¡kVëÑj°B Лç]¤# a8E<‹s¹±2¸%A*ž T#0œqø+òÅ:‚ «ãQ^ЍGÆ Œ ®BaF#9‡@`ÜÅc0Ð+¸€4U á±>8!¼ë‚‹ŽØ"L°¦6ÌnøïHnbá„"I œTK|!Üù ð¤9VŒÜ6¹:ñthT¹LcfNÁ¡LÒñLÍŽ'HÚPC Š=Í…Tì0‚ ]éRÁ¦Ebv¶¼ãÛúv: B 5ñÖc¹1„d(µ²ñ¬b”ÿ ÁdBÚÎ!ˆ¬ÀZ…OîÌ [ rr‡<,‡\¤f3¼üGB¨tF1³›ˆhÇð¬ÂhX̃ÍÌ#*VV/éSYéœdg ÌÂ_NPˆ(NéD$7RŒ)ߋЉJI@KrÜLz¾°bK>¸‘’Z™¿w1U…Ñëvhä¸F†' B· Âo'N­°‰Æ§ÏB˜®R ÒÇf£bjY ŸÆHq³IxR¬c'"£ØõÙ)kÁP”3 ÂáŠÑ¡KR ‚ +ˆ\ŠE6~-NÌÂìhBp8ÕDB’ˆá§L:±Z™G¢TÞPaë:À;C—):2å@f"™Âc°ä‚1=0H'aAÐ4“çû8åt H¢õ|@Ç#äjB›#Ð(DäC™@…"Vt< Î:fH8#'üÌ b9 „n®4šŒÉöÂÎCëFB„°·g’(ž!$C'^쥰hHÄ€çD4J'zäq\RâT”jä4¨pà 5 39qE‚ 0¥2áNéPÑJ0„ ¨8|%ªAƒ¸(áˆbAŒäÀ‹E b˜ËÌà 1mlJ6-]º–0™õ>º•°(c~XÆrŽ™ARŸÌÎÖA6‚œ£åxãZç9-Õ%)^ê‘ö‰¹*»b©-”ŒŸn؃‹{Åç©”‚Ò¨g°‡+Šéxžiâ†>TR#öˆÛÔ]£ò­[_wd ”Yÿv¬e)$ÕN%YIÅV’€Íløã68¯ýDÕÕ$Y‚Š¢S†q/H‹Â\1ÎEªwöÌq3†Bçq;Uü†–¶­$L»VÙ¥”Ò.JUÞ˜’['+ÍñˆJ`ƯÇÅï' Ek_ço|˜cQTî)Fþ+ŠQJ…S»- ¦ÑÂ3fˆG®ŠÑm"ÄÄâš’$¶á…¬0¥µd¯œÄ½ÄúU¸ÞP+üqžJ#¶ÓêÄ?YÄ’ÞèÖ__Ã5¼èÕ…:­G “TG_vlY JÌ¿‰!‰Æ+äÒ€þ€û Á9wAµÝìä§rH#Þ]4> ¡$Z8B6´G%BidÑÒC¢^—¦KZuK*¯VEÃ9RšO*°VW¯Þ†ô”¼:ù}ýbXñQÆ|¶ïõP©QIbÔ¤Bd ¨#.U›­šÕÔÚˆ\#cª%,6cë½KÊj6c(åôlÅ!Q%v{ó"Ջƾ¡œŒ;•ž­})(ÌVb\º^~Fª3²"E¥-bÈÄGÍcªðup‚k‹V’v1UT‹J†ªl†£U)×ì2)ó’«%¡)‰tûˆ‰Õ½4\G2ˆºE;0â™ 5 TÅß ´ÙCŽÚG,Ïb¥—ín¾Þ¥Òf§÷5H·,ÏÜ¥!T¯äG•ª+ÑQ‚8«Er¿66îë/cSkbÕL¸µvd0ѸýO¨Ì«š9…dQ¸LRuš×é‹\&¢T…¢a œz©TGk¥ïWÞÚ(GÔ ææ¯ r§PØ=ÈÙD‘ØŽ¥CW¸%DY Ul®dÏ1“ë½§Äw¢îuEï|wärQKv¡ìü„mVg#Þ–?ŠYH‡ºÕm‘•‘óÖ‹èÎM/#´ŽsooĬò„Q&6"hÃ! bÅþÓîq‡k0²Ÿ$‹½1|½Ì^¯&[Œ2eSdÆ«–D ¦Ç—I…z#ÅU:ŠÌ9‡4Nz 4¬l«¤O uòr-›ÇzªIK[p–~§‰¸n9¬BYó1XŒg*¾“y†qÍ+: ÌTr¨ïFg¸–`ø?×2çhÉõ‘JS>˜ë;“Ûj25ÂÄJ$[‰«loÎÄMú „ÖBž…3¡“–kÖ[-R2=?©u§b™´zH-ݪ§).·"êPâ6­¥cÑZruÖVC • âúšGÜr×ëœÙrj*²zÕ5IbèÉS—J·B&̵ ´yOȳž©,EÊ'L»T“([Æ¡xÈ®ÆÌlá‰øåmâ¥A :šMû~Œås±'zUIeò3vM½¦çß3íVìšB›Ë™sû#6ø´n¹7ÐÇQ“ˆÓœ3&rœØùïO¬‰‡s)ñ³R•–»z×"z$«ÜØOÖNĪ®„i–¨KJ˜§o2Nö;Ù<É" «ÅQvkx´¿‚>«uFhzÛt¦,…Z="–¼cÄ(ÅÃÖ—ì¢]QÛ¯AêÔÏ^*¤¤Ëˆüå\(¼Þ¸¯©bê"MÅÆ'³8¸‰fÞ9”¥$¬A(k•Ï1*®ã«“^®eÒûN¾çf)=´Ý¬ï¤tJ#™åJ²„uÖ¢ýÛÿ”|J$Ⱦz BÒ‰fÈ«N/»ë²’Mã Dã*îäÇ‘e!‰‚Kæ×4¢4§a˜NÖÚDs<„—d¥Ò’ïÊžÌÕ®þÕ[“q®Z"Q”›ER9§t;ˆô~-"áz´ä30Ri´njYb%™õz]—ËÅ$Å#¾Û¹«®U*h­*b þëÉR '6È”3ŠÅŠÛBHtw\<˜%-]õ¦'ÐÓWK‹GMI d«Ïg Œ*Š"õssõ¥*™×R6|žŸÊºUÚiäEÕ!x‚r’Ìëk‰¶oZ¯. ˆ˜V¹tBìéc¥]Òz"QY$J™.’ª…+â!©^‡"óp›šc ¬+?Å(#a‹“‘6™ºˆ©FAw¨WæAœÅNÄs+q†àÔ-øL~†à)°Âleñ1 f¡ê%AiÌ^Š!#Yná 0 žÇ(ÏDˆa»tAÄe>8Åì(BèeÑFˆ˜PŒ„¥Ç®BÉ*œÆåa] Q† %ã`TâMÌ"-¡ÒªŒ¨G2#‰‚!оªÔ2†9À® D®nyWƨáÝEá`Ã1¤3Y}7Ä#2!9Zð ÀH@•h_‰R=ÅÁq|½X¢qœM ß^ vîBˆ*Vê3ºKH€‡zžäÞ„V”b-4¦ ˜E&kQÓ*sã¬ën> œAiG„ýO²Wh‡ áÁ ¡Aâ‚Ò_šô!\•Y+“øMsfêl•g+J”úÕ¨»ÅžUÚ«ÈñœŒã$'&ªr–íê¿…EY3ŠöE÷Vú±'ØF-x $ZøÎÙ¶êÓ´·Q¨ƒŒ2Ò7È®Dƒ‹ÜœnÝ%2Gr¡KÔªéVgøžIpÊ1+I8œ¸Á)À8ðmLJ™èCȲ7vQkª=8`Ŭ¿·¥ùñ¨V×=ìØÌ)åḞ]UæR±µ?˼ôR1[ \øžÇ*<å»\!ÕâdC#Ê ^½ˆó)?äÃĪ˜è¸ÔÓS„•&D!AKÒɶ£»Å8+’[hÅLcÍqkùáoËð±°”$i3çür˜ä:©EQâR8çW`©Þj·ãª(½H½â‹™kÍç©ÜËv»?¼é¶ C…qI¦M]!—äJ‘ˆ…½~Èi•ªô§×šŽŒí0„` p+âü ǑΠZZ’ÉsŒ ²Pyä’8GG~M“Ÿ L2Ä83†´OgxÁ"ýÂ:’ØîM Q)¢<-ãéE•$·ò¿¼3‘qAH Òý‚…3¸nZÒþYÅ¢MpJ&JóÐåa-GaéØF×Ù 3ëþbÆ8B*­åÕõv†‘BÕªnª¥CÐÖ¥ÎÖ1‚ À¬ãK3‡"!7r_úþ•ðŽ9]sý¥¾Ã¨ì!’^»6PS§¬B„Y¥ó»°`PS—áãm'=ïB4õ¶"^ÿ÷KYæVŒ!Öêd±ˆZ‰‹«è¶c® 9íK×]™¤‰ô´º•2²4Rq‡ªº ޶#ÔÉ‚®¢Å ßCˆZ28™xY¨u+H7£Ï~:}L¦g@`8ƒÒ©(ÄP’טøX¤½´ifŒ‹hž—†¤Ëf®–¢QFÀƒµ£pÉRE ¦ÛzZïfE%Ró–ªJ×þ´ˆZª!bR™2Τ°@r¸a޶èâ(Ä¡DðD£ÚË>cà‡JV„T’D jN–%*íî‚o䧈S¸¥zèèÔ°ò©¶[–Œwa‡Ÿç‡sœ¨Œìl aŹœ²D‘WÖ"’±=Æ¡9k·uý§Ro1ó1”ê³}%Ä(QE3©­c‘(8„ J4Jòb0Ô¯­ý–Ô?}†4éê" 9¥ Ií0Ì–r•-¸ìA²ª!¦¾ñ:Õ¸J-è”Ø¤¶‚™Ô糺HÎî)äqr%@§m°qi Ë¥ÿøÉ˜ZõLþÚ^ÿ§ÿÐoçó»ú‰hA©UJÀ(ÖÁ³ùÐÌúú«áY§ý‰1µC>aÇzfkñx‹­Uy&¬r‘”›uY9$9 dÎ!!%¨AÌÒ*îÙHL ú¥ñ¯VjO}!)‹Æ´M£Îµyë—(©žê”d! ‘K€Á)q<µ¢ BˆFÇ<ùIŸœ@î…,µdÒ°åz¬ÈLÝ"c­2ÝmcV–¸“RWõg¸³ªñ‘'Ã-(QÎ|½I4‰F¤½£ûfZÈi)ÈbáUžËøQ0AE!|G9dà FÌf¢$®]‡Ì·Ç¨AÝ™zã=ºf´"´^1Å ,×ZÙf)Za]÷Ê™…Ý{Û–Úú»·ñt¡>–ÖAs­^#§ÛYzyÔD9»n‡CQÉ„’Ä>™7»H'éˆx#q[nÿAèõ²_ÊÅ$¤4šêƼ¤Œò\l ˆíê —]\*]C©LùSÕBÕù‘º‡jüˆýjz a£øJ…EUvJ|…)3ˆ²˜ù¿ßž:Ü3}NZbŠÅ ¥["ûŒ´¡Vcz¿ÊCչ‰ë•ïõÞKŸQÈJfg1 R3Ôô2w-UÐdûþ–z<ß=?1ø¨r³ îãUHÚ(â‘„±M¬Ø´C®dêPŽ«gË8·}Aä ³–ˆúÕ?2¡—ðé§ÁD¯ÎKi ÉïæCäK_") 5ÃëÝŽBª—|FÏ´ŠN#Žßn'y32ŒB<…YIl ¸ÄzšžNÊõÒUurv´‰TV›3…Dï:’bVaº¢I5ž¥Ë(®iN)·îbù{1½qºŽdr¦‘E²¡‰!nAÆTż‰F­\Î%dÚfŽÕΰèA‹ôÑÇ3×ÖcdòšÉ9GUØ©í{2ðn8«Õã/,Â.Z’ˆAub|ŠgDd’vï 2cnÕéVeÅ}ALBi Íô•rŸÃ)äTEÔ´å ¥ºHÒqEí<„W³.!¦¹ˆPÛ2·Ø ‡62c+J±¿hb¬åŸöºiŒº.H’$žÏ/ÔË‚ØÅ|¥›DÚ˜B–d¥©žëaJ’s¸WA%ÀP¢”Õa»¬*õËÄy„µ¶ÁrØÇ¢§)F7<¤QåAŠJO*%Š1 |TŒ!wª=ÇF7øŽE*zWIâ×{åá [Ìf“¬sôZVR(gžQ ƒ–^CÁ„]|çγ»åRŠìóÖÚºbÉEñÆÏ–¿Ãˆu¢ít!µö—) 8CÒažÿò%wZªP¯ÌBùòËù)™²–Ž1JoÄ*=TCÏå(@ö30¿rj$Åz·šÝºÊARÆÈ=YV{”¦Ã‡u#“>y…R¶—æžToÕ–žBÉ’ÖsY¾whÒ˜`ÓñÑ>˜‚­‡J·Ùå÷…¯úYD|–ûi0ŠX“%’’}aJMüa0µwÃØ„)t7ªËkqOAï¥1¦¢ÞSˆ®£?éÈÌù,Uÿ­Ù»õþªChåW¤ëI~Xb/§P}œÅþ•™G;œ_¼g"RB­wÌýK¥ðÙ{M:*)Hlɇ?þ=eçS9Õ¸ÈÖ’u9J‚Œïaç2TÇ!óŸ¦~¯eÙ®„K%ÐÓ³ÍrÙD‘7}ΔÛ-¾R ñPƒõ¼©Es» OSb dÇÃ=G;Uê¥I 6¿ÐQJO"¢ÚGnzTòc ÙesM¼G£ÙÛ÷ÈœT‹#tŠçJ—î*/‘c_ æR^Yí+]“ð5Ö¨ìí½(‚™ƒ¥?x„¸¨â™Ö‰g·l—I»Dóî—™ÐÈï+Xl5N#ÙjcH· ”ûc˜©ÃYE±ª£UhÅ^"4Ì a7S BFÔ‚­K×}bùßêGÒu1´†ÒÓd­Ä9Ö¥Ù"D Å[¬ùDcˆOêÈá]Ì&ÒiT‚;þ²ÐMöU&ЛüB¥>Ú'y…eÒšÅ(ª„/b,ÎtÒ%ŒåQ_Ÿßs¹pè3zÂñWI“äJ&ÉBPïý¯¢ï0b´ëO·îQ*»rñT„^'²ç/«4†Z2jê"—>‹‚䄜üäܦ—›HÌ›ôŸËu8Sõ‚)EK)30éÖ ¯ÔàºÔ Ú@ǰ›ÀZàÃ91Ùj†í¿£Œw–Pf² ¤ØÒ±žªÎ,aÔàÀ$ˆ0ñ’ó1„JK”( jò$»ìá¨/J»0¡QØg%ʾªC³0æ‚rW‡ED6IõC>u¢þöã½zÃ: ê jO:9Å,¼I&—Sú( ØèLâ=ôö!=ˆˆRØÔI„;’t0aÒY|§­êÒõ½×ÀÝ Èç{.jÜ£Ž3”ÐDm Aj(gQ—r`(ö¾ŠBH²„¡¨“ËôeZÕeÊ—ÂK†8Iº Å–£öØÆ TÈK†ùþeTÕ.Ä—*MC’ö,q‚€PHŒpÓ6W?󖦑A8’TD}Ö60ÅÏÃy’C›]°ºã¸ê‡u&H˜B®K&ÐGÃTY¡ï;#äàš÷E<ªæåEðÀÅ0wä Á¼©{åš"aþ׃Á2 öy®#†É2b6ŽA-Æ$Í0œ …¡† {— ÒªÆN}%ùQ‰ „ õZ|· Ú¥˜}(c‡ ÂE³¾éW lµ$2Ð2L6--kË¦Ë cYÜÂHÌCÄN\*Ò§~)"‰ê^œã ¤u”0(" ¿Ak$Dýd“FšÏ*’­UE”‚4WŽ ¡C„–—;Ég¸þÆgˆÔù9¼Ò_Þ/VÉ—·øO$˨ÍôW, s°'cMã â±&þ°/„b Z¶Gîß*Ðh„Ó(Îæ$Ññ5-²y½)øX²É §{gBE7Ém*êÜŠsUåWB¤*ÑL㋜¦o4…þ5ág¬b¢èòXÉP˜Ô$‘J·,q@áàóEh—Q)M„--$I û8 òö±°ÇÖëÙâµÃ»FÁÞSTê,b9:‘EÀKÚ᎔' ~‚–U»Ü´µK.äæUBåAÈ@c•«(]sâm¹ºUE{ybý~Z{âÑåh…ã% šÁ’âÙÏuìï!zF«½‘F``A^Þ¤º":OSudÙz,ÌZ™‚Š+H` Â6I®Ê­¼njnªÌ¤“ÞÛ7*®2?Ï)ÿ$ÆpÀæaê̳ÇkË· ¡JoYBÊpŒ…%l–'#Ñr_’êqÔ¦¯•ÎÂ9ò•bîº^Þ&Éc]ÐûƘÒÌ$¤­¥"9_îa¨v;E&ê<#JPÖ}ô­_(¸—ãÙ ¼²šNµ dÔˆpä B ZØ1S;©” YÆj,¥5FÒÄš?ýÙ¬k½J¡H@¤8Ê+cd„‘ÒŒ/’œ]Û£t†ÓP• žy ì^¹"¡¬¥¯Öîå É0\Mq0Ž+-†²+é¾$6¨"ZfŠ’ÐÈc—MÜ8ã„[Ð@–` ÞBtã~í‰l@‘¾µ.+£ÖÁ*ì)*Dkä(¤J=”dg[+µ°}þ2)(8&.‡/bþrö²};¤0`(pú[•y m.›Øû¼"VÆõF'&5ºz¯p‡#·ve²"«TÜ%SÐÌT×åÜ*1ËÍ)D)¶²R¢Hù†Z‹b 9‰\s˲{ùÇ»WW{“ñ!¥?µKq*òj „è­DYX⃈{~ÅIÆ@ëwüïA+š1,² õLÙµ%ÛARBÙ!Pf³qXD±mѤ’‘gù†Õn7¦õ•’0P€r,yäa ãòЛ̭as­AbÏ^‘ìÈlþ”òF)%)™ÕD-MAK9%Uo3a3DÒJèºAä )½6â_ËùÕ4ó”V8ÙCÔp–`ÿøÉ˜[òN'ž˜Ÿ¶?ÓÇè#ó÷ú´ 4õ™è·nx †GÚ†AÙPЂÎ?:1@°v"Ò R) Æ gÍ2CBŒCƒ(G‹ SÁ²uakM ñuÔ†(bŒ¥CS TAÒF:ð¸k{…3¸ á4±´ ŒÏIØ"…¸oqTЄ‚§ Cu0, ’ŠÔ) Du£¹ Hf’ Ê ù!àM°®+®QáDkI =LhXfl@Îè 0ÛÖDÀ€#Ó§¤då䌂¦¡ ;–Tıaˆî%‹ÒY8‚°üb“[xØÃfsQÆê ”gR›°nµx¦{DÈjµ™ÆíÅ®ÄÄ…$x¼Fî`Š”J­­18da €‘0Ì Ý )™GvQóÃUwS){ç]TfçõJVsä"sT„v Žf0È)ÏšèÛÈ´E|caqj¼û•¥é‹UOA‰Èj³LÆ3—¨¹.ò>#î•ZÍ—]AP†–ã:®s×ÏORœU) íM/Z_jKN9V7£¼ÔS4µ¨Æ!dîÌÁC–ŽÐb/Mã3VMš¹¸ë·Î&Ù5å/îÉu1êls•ä%WÞíÈ@Î+¬8Èê•Wÿýa9há-MŠ#2´ŒIiM%êůԤRó™%¤&†v“ˆTZóñ×Kß•\iTb.Šä°Œw‰•¢­pPƒ—F¡„mWd\η£ñ–Ô% â®0å Ø©fb,Â$ìÁ›uÙŒ%+9<¶üdJóa!ù—´IuUûìA8¼â™—Œ!s{Ôª£îD8b•5çt”N±w\Ú^¥ù±Ä¤øÊþŠQ]þŽ(šU q«&TÏú£/¤! ^c­"m«’s.Ùvvs¿8åÚ\R’’ˆ)Jœ/6á¼Y·©"êç!3Îsíý’ˆå0‰‘Fj¨p©J^QK)­]µ8Ç5)ÊçØÕ¿9ûrŸ“•7‘nR'¦-R˜E!FE ’¦+%žˆ”û”­%¯(Fm¡Ô‚õ»sn§CS¼†/ÑWL±8¹)†-L^NÆMõ &|î«IBN9LS8§h’S=¦ñEi<ÌfL¡J?ˆ7;$’R¨g÷º.£Q*ttª2ˆtd&’‹û:[¸— œ6¡s¤ÜÆ]“_Pdó&S‘+šä8…ª˜vqB*â~\˜*>>©v¸~q}uwr¼+d„8ÒŽoà gk‚Pd8g%‘Ä"K]nc1Ñu¤&3\Ä)s†¢zjDQì0Á㿥и¦¹à‡#§E^Ħ 3V(ÈE¼N„¼u>DfUˆwuæÁê †Wº%!ˆX¬ÿ Á›ÑÑ#ÁhaÔ($na?È01¡{HÃ7T€ž2¶jǧ%ØÕÚo…œ!ûš@5Ü©€†Â$u ¡Ì?6@ÎWN42Æ }0æ0þ»L F® ¦Ã"J3‘šR›~d2•(™¡V«Ð£¸(E-px$ÖÝÚ˜¹Ä)„¼Ò5€ÈÄ«”Œ-Sž6¤:ÏÆ¤DU ¦Â.rJHS „Å'V)~-+C71ÑÎa!˜ÚF5ÖtIĹŒêÊP"ˆGE{Ž`§dX  V”E„,Ár”„@˜ƒ†QŒ Š1¢R”ªQÂPðêÆrÃh\8Q”na*òVW^>'!‚ˆÒN£Â:PåœÃèåŠÄ4 cÎápÌ0oç»s J NŠ%ÐC´Zâ¢Ôanå`gÄbr?‚†uÚŒzQ„G*Ew'õaØÄ±ƒ˜<…`±ÍøÑ9ñ2tW$ IµßⳄEgr%7~@x Â", •Š0W3›‰ñ؆`‚;m½’NWÈ&F/}ïㆣc"(äH/CcåÃÁ"Åüš†U\¶•±¶èá$! àÆ!H9ž›²¦(>àNƒ y¤·å‘”gN„ aÆ ÔÆ\SƒÜìEʧàÇïwèÝL¨@¬›]º~A©¦¤/A„ i`Tç3 e¯rÈ¡Ž˜ýLâ5PçSŽ,XÁ¡Xæ"%mwLQæ‚òŽ‚'½‚Jß•<(`¿çb+Œ ˆ!ú’™¥¹”nåX`¦Í ”J™ ÑHÑ ˜˜·â!-~"dB䈪t9Ì;¢ÁóîȱÂúŒÈ¦œBSH62Â9A¡ ^"0E®®Ld„pÌ¡aÆcóHM ‚CS-[ENvìI#Þ*5£vêf®H9'$€È £2šÈLa¥g ˜!„ÄÈÂ!œRèn-:‹²˜PDñ£Iîq(Yo¨Ñx¹¢ý¹!çê ŒñÒÒ5X‚§›YÐQ\ÍÙÕ„0¤ÉÉ[†5=T¸ÚG§ŽLô±{Zn™´pŽ` Ði.F¼>»ÛêˆTäDBÏ#¡)¬Ën¤ƒ´(Ò¼ÄBF›(ùõ ¯þ‹¯Â4¨æ)µß"©Z«åîúSðûÑ1ö¦Äðg˜#Ë^²üÎ5lX…¥•5­ra¿3sª²v¶Ÿ*\k«Ö3Êæ %×-S‚«{ ‚RÉW\©*U±–Æ÷¯Äž&g¥DQ Á ;œÏ[zÜ‚s‚~ •Lî%PØÑ¶/„z´AУØlšI*_lœáF|ÕäÎêFrrI`´’l'9R™Pþ»ôÂ;ÏCW¡\L—Yq¨êÕ,ˆˆU̧>dÔ‹$Üe©ez‘H±V‚¬¥®$RTX‚óÎ|K# !®ŠS)ìIxmqs$ +Ç=d›&ß `A\@aa#R ÓÃê–¸V"÷6M’ªf¯8¿ø)n]<¤Pr=-»ŒäG> z ŒÅ0àt¯RÒ$"Ýy®ämé |ùxJ.• Ì bãBg8л÷múî„”ÔJ{枟e †Û›œ…©ì›Q•Ê‹VÝ•‡1Ù°µRvw)µªÉE"$ŒBnĬ,Ø’¡c¬r•l‡¿3ŒãØ&áú¥™èDûJ|kihbâŒ!^´·µlÆq7Eõvh¤B­J2n~íx=}j]ˆÇ&ž†üÜe•ï0ª Q¢RíÈÊÆ|eòÝ1«dÅ ¤¤°—ðˆŠD´Rœf+âÓ.0D‡Ä£¯óºiX¢—“p²ã{SÐTê&šÒ`šJ§Üॠ ŽKBûv×ÄK¡êx®ád)¨U"®78Žé^­(íá\†Ò<Âöi¶#u,Y3J1‘œë):âØ¿ãfèYÙË:TáG!À¤iâFRýéDzFsª¬ý™¶·.6Ü÷f”™WÛâ¿&8*y ¦¹ìĹ"©.j§o}˜øYNdYН…‹Ñ¯/ †Q FmEVl”„s¡ûSÕ9õ–RÔZl_y A 8¤Yæ¤Nä:!Œ1„Eûâä°bUˆa]%¹ù˶ÄRSZÆ¥ò"êõ$qV9×ÊêqÄ!eºæ‰„wÒ"±ITÂ.ïÒiàZìÁS¼çkqA“ðF”¼"8eœþ-òNVN&$KWÆ^ÀŽªÚ-!÷R¾¬¦X ‚á‚A%åšiJµÙ³‚ï6Ï9Ž‘&$¢VE—Ä™Jþ¼í&DêôÏÙÒ ïŠ?2äš‘HÅYUòÑ´ù«A¿2›IÎÑ @ 9AkxŒ$¸ÔZP"¡2N_§u1(èΟ¥M­‘/\F' AWfb6݆bˆRy©SÊG“ CIIgºË„¶'y \S0©fÒA.Í:"Ùw©²(Í„ d®°Ÿ‚g@®±É$Ý-vÁŒADd{eùÖ®"é]ˆd÷ϵ6+Ð÷WÛÆÇ•Õ‰‘TébÚd[gn/•ß,µ_ÆÆ#æ;9¢’-‚èx,5ˆA¬¯¼RB%i2ŒQ26eª~Q7ÔFaŒˆKIzÈRZïÓ‚Ú>ÊKÚŒtˆ  ÁÞ׌¹ ’ çz*& ¯”ê;œ•vuÉ‘e¿j'Mž¢´r¬2ôÁˆìLɼ½õÎñx„Šk«EG&#ÕêD’™jyî+)Ù!Â-ªRmìî^Õñ†¡ñ¤¯éîø¾E—LÿUכȚ´0ê5LÒžG¸æaVt½…³.Ò[“R«â0ìîªÒmijWÍ"Xg£¿a\¯ws7*±2Ô¢“ôNm»)!Ù¶ž=%š_Iˆ#°ÉG£öòД2è¬tJ’ÌÕL'­¿ê6˼¨ŽO¥¢4ByÎT`•Q %“ŸXô! ¶¢q‘«ZOå7ÔR Ô"“…-p謖^%I䙞œÅ0šöÃðÅ#˜‘!#ôú˜È 8PcCˬ#ÖÑQIšÉ®Ûjn’…[J¼QE‘}Ä¥¹ä¯‘×&¦Q…-Ê»L&vùoË›ó%ê´"„j*uÍ3U~´¾ ×APQУÂËÈv’CYëg« ɤúV”Ï©ui˜AUd[(š&^Ç/­x•i[¢’Áž"¨Ôʹ?­Nfº 6K™ ½‚ekcšBPt³·kº¢5ÈÞ«s-žË¿ªÊ„Ïo ³%ƒ.´Ùr5ØÅ)UªWD×ôÄs2!“pâU_ýØa¤²d½mM±yh£˜*d碕(qnkhœFñlÔ莤Bö¸ýhYdó˜MùN”¡“åU*Pâ%QÎYvIZ­éçܯ1Œ•8ÊKR4³Ó™§±H# Qê?(åF‹øñ–‚kÐÇ‘zÙòcâ=Õ‡PÍvR63ºé’t¢SW½[9.Û#Ewm8¿$o¦ÑåbP˜ä 5H‘ 2XÅ£{’È´ •võbr©ïá¥4‚4C°§òü‘"ZAhl b `Æ_Õ§ˆ’šÔnj­¬Û¯ý”T£®©¬t»ê*&=²¸;­[Â<î…}dÚÒBòWËKU;Ï]HÜG%†-EÅNÊ?•ÄWpa-pTkÝ“¢>¹«½øk„ô-¤ê è›r79×öªÖ^ÎC’ºz±ae©Î¦.U_¯¥j_"©•xLbU®ŒE2‘nLA+ƒj¼‰¼ˆBPÂ¥ôoޤ®ìêã,d—“ÿøÉˆ\°N Ý»V3[ù³’µÁ!gwsëù oí¬Es YÆÆ¥Iª×aR¬Ü¨µ?­6ªO%ÄL{5¥®]SØŽR¥S.ëF%Q"®uDˆn?+NæOl19¿¶jqpcȦÖ%c£zÝFCXÊy Nʇ Í&½.?â ²C ¢è×óUHRœè¶vÌvB*g¶¯BÕ«³aˆDJ «Eºœº| ò6Ε¦YPÆ4RŽ CW/íI Gÿ~ÆRš¢ÅéàŒswvj™ÍRjõvÎ…`¨[ý8ƒÑΈ½*|Œæúeˆ= úÔ¹$+YT«r‚æ?v[šÈÒˆ…*- ÇVnRúíòÖ%*HÎÊ·#Ô×+wi¶¡G•ºÂê¼m•ØB3,ýŠ÷¢á×JPÉ¥µ[+¤F•n¾vf/y¸6M)”Æ™›LƒåôýJTÅ™\Cî†Ï1’ÉÕc±ÉÅç}E•2†â“TL±d:N”mÄækq÷WFkfoEçе¢¨§bþ`Ö{¥Æ "=5‚Õë@’‘šÂ¿²‚YöQnN!pÈ•/#ÝÈÅ"Ôò¿6^º]"„=’ºYVïauˆ!‘´ô­7db³¼qUŒ.–¾%ÓˆÜiF<5$ÍîASv­O¤lÒD:¾×ê%®EZ³¶HÊ Lñ¢¾g“H&aSŽñ&4ÄÜ|*é_È¢ù}PÆöµZ¬ÅvUC2¯}±sßÜœu1H2kªg«Ü÷Ü<¢òb3nÙyÔˆT÷»PÍÝÕgäLËtåÚì¤æê’´j ¢*û%|üIúöL Wr"«Q_6RU2ÄâS)’»Åç*S¨O“TâV!nåhR-’¦«Vëk‹Ë›T›É®ZRG‰Í3¯Íh—7Hžt1LëBNý}Ÿu¬">´4¢1.ˆƒa‰ÙLñä—3Ü ¤ šô'ùhO©y{ªº«E£#,†`Ââax’]†c­Cš©¸y«ÜÈ1¤*Õ°¦ÏÉ&¬;:cÊ}9 d‘„qHb_¸ô‰Ä­D`íU”ÚÒQK­.KfL²+Øz‚!9Iz!Ù&U!"²â©‹N¶ã%NŠ:Ìü½G­÷9vƒsHG@ƒ.ÅZH‘›/·ò%NQ #rwÜÅÖòâÒîT©|ܶALZníw²U2dóŪM[gSÞã t㘅\¢úy­Úêõ$E«Ò#ÐÍÄ·Á(Rj¢Ú×RW{zÒf(É„WWa©QVª².ã?שèW‘JÅ|Oå›§õkI8*ãå„A–ÅßJ ).†+J3J פB|«f%Ì|ÿ>Ó“‘wßËÁ qZ)–Ä+VZÔïÒD–TS!ˆûV,¶.•}ËùˆÕè†Òøb-ëŸõ3Šþ¬¤Ä#’Ö%‰2p‰D«U~O‘š‡ÜîSˆò¤`("EŸÎ0,%èfZ-œŽiÑ©‘bdP„¡ü¯…±FdÄZa¢2¯NÔ*ƒŽ:ŹI1ÃÂǨâ%üA—”Âê?¿YC-˜ÖßÓ?Õ†nT1Ÿƒì¶× SŠzcõ+“• ­î®íˆL±þaU=Œômuo.J×.V´’VQD3…7Ò~¡úØr‰òýŠ„P§+ˆÄ‘,# Ä0×úܲü^EŠ.·^£pÜØò[ŠUOˆØVµÆaOc'*+Žì]i•ù»¡ÒŠ\ÝìM%j±¹sdJ8®¢‘ä (Œ²-k]¶ßEJ#™D‘ñ%”ÌÙ\¶MUÇRaB%ŽÿŽ)ƒiVò.›¢l½`þQÃ.×Ë”¬Ìéïõ“[¨xâê1AØ‚ƒ,'y~†ZÿT‹ª+á©“i>ÓJ-Xª\vJD=DÕ3(TIã¯IR_£BK(c°ÞeÄ‘‚âÕÍjJÊclÓ©è†3/•3ˆ‚u|ÒÛ.—N1}»ZöV-XÄgeÛQõÔ.Õ•Í*¡6OrÔrcÜ-Ö´±R'-ʯ©ú%)zqlŽÑS”¡ g•¬´z”¡†5£Úé¼BϼÞíÞJ¡¦îº~»·âʇmU!Ï9>æˆ"L#VìK¡¹)U0Èúé­›«K¯—"ЉîÖò”jMºË…sÜžLæÇR3_MO%Þâí•t©8ž!ܽÁÅ=Èv ¯3\ýI[;HZ¶í³~¸·{[&7Å"8ŽF1İá“I„=VVf¿?Y(D•ýIûJrYWD±ZËVbñ»JNŠs7!þx²ÂT0AÂû‡q¿nœþcGbŽOÆ rä0”v÷äctº„Ä)Ç–—¬‚ñ0Ï˲;œ¯«æ°ùQ) R&· ¼R8Ž®œ_BP'eØËÆ *'wô“m%¦ª2`"Õ˜+ªò¤‹žt —šIH‰ä™ÒJ–¬˜Õ™î$k¹ -qçµ$™Y²ŽfC5•¹:9VÌùœ¸²YhC3•×DzVÄÏ&¾;³û¢¤Å™J0V–5]òÚ‹L_Ú®V dçž臕EúzX·†&N–•ˆB I1¨åÍŧWÏ¥8ËÙ_7ìšMw@º«rц9d%ëR@cÔâ]_ìŽóñ}è„W‰žNWl©Ï\c-tJ-Eñì’X)B Pv7J(ZÚ·‚ŽN¨¬X·u}â0•1z¾Y^B äç©5CWú•n­I3§•ªTQ®DÖµHô%ŽIž0ód—YVžÞ#û^ÇDOoši,Ážcƒ5) a6דm†1u„WQQ ™Q\†)Üù}*÷,Å«ë~f‘quP˜’ÈÂÓá.¨9®r]d1§%VÌt)%Q8ÿúµYØç &Q¢2u§¶•¥^!®Z…”sƒmÜÿ†ÎÂZ‚$¢aB"«Î="WKæLZÈÔl*NÖ^!ä9Øs O7ÿ‰’QpB,¯\ò\KÑ{gÝÒ r2Y,êìb½NB Àvi¾ªŸŒE·ÛW=/f>PºóarÕ2É#ª’Ylâ )\ éÁ†’€´Ûwi˜~“EM£·›ØŒh¤ˆ]u«xú ¶/ö>ªÞ¨Y fí—•ñ(šÎDm!™‰Ä[å#;ÊBŒKÌ%Z‡-˜¥çó¦µ&ûŒ+ `äïë7õÏú÷ývþ®ÿL?Ÿ_ÍKAþÏ‘¼ê„Ø(~¸f]%ZÏZÓµ.LGª¥™Â™/¾…;ç3%A +йnT#ñs¯¬e%³$‰Žé6ƒ2¢å1PúJÈý…Ó¬ÆêR}Tö9B5ˆ;ª™r¹Ê+¡Tl_¤Ï+%]M $´Ýœ‚&¨ºÙ„UÌc+7²™ÛŒsïÄz*™\­CÛä,Åãaé‹E0­$•®y¯Ab·ÿ\„çÓ$ÎÈBa)Q"$År“ &ä‰1RŒÛš]±H¨®…ôê8„sP­w-íKŠÃSl#­Ïžo"YÆrÿÅÇÕAÈdUÔ$­«Å;³)}k©3ˆ«Ÿ¬äâöó*zÊUÒÕº™XÛU”Ï#æXúùAÊ9S—±Žd˰I‰Ú·ºzÿkµ“ô˜äìÚòó—‘‘ BÊ!#æŒ/ðÃdHÕ1Óº°‹ Ô]¬$’j ¦BšBRùÂ(&™]q˜TÝIš¼ó±áK¶e!r9”•±3q&öYL!SÊ|sŠ€Ô !ĺ^°ˆÂgFUÜD DD c"™f]æ"h¶±¸ÙfÖÁw-ï)9(œ„A]rÌž»©"Þä!¹íïÓéÇj›ØGÖa[Rã\¨C™‘“¸Ÿb¥§ÑF­hUJ϶L/)Ñ-æIçY$…R§è(«ù‘N›…vôÔßÜjò .óâà¬mæÊePö»yƒ¢ r®_”Éb5§„K6²«M„åÜ" „°U÷ëÓJËÖ²–¬q„náUÑUجR±ë³zÉrŒ­´mkŠJZ®Añ&Ã=¶¼gDz+y-üQTɘ{ÒžOlÅRK…ØÉOQ†ùD}/Nj “«¶SH×Q4õB‹ÔÚ«H'r¨„é{y|…P•qXÅa±w­´tõ ‡2“[Æ5ÇêЊT.碡òö"²íŸÏž[ª¸¦Tij5ˆš¯žeešŸ¦6ý"­ö­VQOħ_J¾Îu>g:Ô·Õ•Mµbé¾mòa2íbâ¼ÂæùÊo%Ø¡•Æ÷"º Ub­Ùlš­vÞz‘äüÅÙs{SZ”¾9¼˜™g\°®AÛ¤ßqÌçg®‡;ˆ!¿íMÿW*ao¥ÔEDË_Ù¹îž)¦¦ ÈD1ð­îr†þe± UæÌÓw¶Î]4”S+äs™?éë*³jë†æ1KC/­éj,ª†¦áK£ÈVK¤ä)ÉzÙ¬uZ¤ŒH…Ñ^¥ÒHÇtâl¤¼÷Ä¡]HMO¼H•Í5J½BÅç)³ÿóÙÅM[å*¡Ö‚¢Ó$@郢ïYÎ…Ë®­¬ÿ*ˆ•­eÆñÜíbI©-[üŒdbÛ ×_*¢—ö5K¸'(!šë)3tÅìk<—!ò›ZxZìÑQŒZ“P™YEïuDL• ¨+ŠÉ)Ö‡ª›×›ŸD½8´EE!±¦á-†ÚQЫÖ#‘B•\èG®™h+Ì|KˆA fóêá5×Ó*nc›[2눉ljû¥Ý ¤B!Ëbˆ²)Ô ‰9Œ…*14ºåÆÅÌ¡†,˜'=9×*n”˜íäjtŸº©ùÊDqµZu ¥Ü^2Îä™7H1ƒ»˜NÑ;±ÊR«Sn'›Væt^¬ý5mM£äBŽÌO¤µE"úî¾yH1L3óù8–UÐk£®­ŸM´¥û½Z”íµJf)Ì3ÿøÉ¨]Nü“ÿVX(]«ó@³’]Øžç“óPÔú˜ †{­X’75°©QhŸñ©£Šê ªÑnžE2‘üš¦ ©Í–ú7-­½jñH_-òöº „¸Âke N^âu0¨E˜–¬Pî§ío­+{ÜØ~ªxŠpA…/Ë9I•ß­ëßwG[{]°ÕÝŦa‰Zu×ì”űušQ\8£´RHmËÔߨïLåÒW²,Ôù— U-šìc•$qH )cy%u”îãL%x‰_6™Ÿx<Ù³/y¸‰Í¡ušF¹0‚É!‘Š@”oRõ¾ýaؤM©êûÈ7cg¸(S–Ö±—WebFО~õ&ß„‡‘^‚ò‹½s¾zfÚî2Èrböz°E2Œè|ã܇à±ëá…Zˆ%žÜ+„ÒàÜ_§Êç÷=Nƒ«µBb,€€­ÓU(䲥оkU>âÈEB}§šúBßôªâÜJO>;¨†A’C=ˆÄ-MDÒ‡D±¸ßk;Š ìÔäkVâ#zU£H_!"‰A¯VYkþÆÛQ5P†ÆèÅ¿GÒE¡çI;Òq}²GÉÞŒž‚ ‚ (Q—­³ VùUÔnÃÎi%nðñ“~ÌAËM¬þúdF»Ç³z¼eÃ2ФF šÓT’„ ä£áv.”[>¥h[Tò`”¢ªÉŒÉ„ºeDbP8bâ¬ÄYSÉ-Û‘sdøO…‚Lp¤¥üÁ8ÞD¥Ûó/d)بÓ$‚ ,¤]_¿ \­†nåDí¼Ñz¿0œ¢ŒiAÈóÿíB PöL?*¼½\[ü!¿›~&QedtÖºŒG§,U»PV)î›Âz¥ àÊèÚÑñt‰w£Zmzµô©A†¹r„#™Ç+ŠQž% Mü‡·’E©DKZçZ†Õí#7á6þ<âU äæ˜ž1®¹Q膞|¢ºè#) Šg$ ‘mF\BÙ¾+l •Á§ºÓÜJiofR.û¢H=óa„•ÅÕy‹V¼é.:ÜdÎâD)ÁÇÝêî"®kãí7:™êu,¹ƒ‹,ÏPp„BŒ•@’ÅHï‚­ÖÛû¶:H¾7—Ae¾D!0ûæÞ¥³!:“‰bÔç ã2“†IHã¹™»´µS£SîŨ͜tT¶ºÔâAA‡ n2ZÉÂa³DââÆº¢*$‚ÞY;¬[:ÿžÇ:ÿiƒœS_¤åÛí(º/tM7Õj!LÖjoþbTÏï3$á¼˜çÆæ¡¼´!.̇r)ƬˆQ3x\4˜µfHöƒÚò¡Ñ#°Õ%¬Ã3%ô3œ§,J’"(¤ò±‰²SÏ»ÂjS8Õt®—EEU ¥“ª ª3ˆÆ©çTBHÒdz$ŠøÍ›[í‹íS.§¸WP•§ù×1Ê«5xiG¹Pé‹Þbĉæb ¼õV;4¥Ý%Õ8tѰìçx¦Ôz&¿mËÁ.½“X¸Z‹MÅìBRî:Ž “ÃÎ`«-Q$§‰Å‘÷ÜÈM£É-4V‰f:µJ¾ÖÙtLŽ!›ºM÷x®²³fªõOd7é} uö²øÈd&äÉœ¬Ø ÎAANߘe%œkmëKnEå&²ï-0¥²3ëzüÁéÖ„^&摨t„8… ŠªÉdθÄÇÍì®™ôNYg‚á®^e#6î]†ô #0*Ä¢mò †rF¼ž©5°;q†0ëz7 ‰é«˜âá±›Â&ÈNÐÆ0cd#άÁ/ =)2r:8QwLëy÷S/bXRBK°ª& !‰ÐˆT|4jîlÄ!‘Ä1Jc= ´Äp‹©¥.g;©Éœns fB*A™Í°ÉÄôãQ0ȰcïayOp{?1{µbŠ\d~ÐÝÓ A‚)% Û u8#„0aÈšj†ô¥Cˆ2 ÄTÀ…bŠ8&ëðF Zc„ Ï ‚Â-@)4Àš1«·`' RµÝÆ"p¬ö÷ Ȱ™I"ˆCš©ò§Q9c¤6a‰Jê ÈÒ¶„3)À§#ˆ€óGx1ÀÚ-uˆ¦üfB ’·¿«Æsó$…Ò\†i–1˜F{—Ž\º³Ð„Ζžiœ¥¡îôÁ{YÙ^¹¤UÔTßÜrÚÏé?í0§#íE%B¬F£•lå»)“\çsìŸI Å9jR» M5”Þ|·ÑÉÄVõ2§-]â%(¬Tú*ÅmR&• Ì^~“éåÜBS6×?¦_8«ÏJ•…A?Žpç‹’,ÆWfM CšÅW+m36Eìj#Vl-XtcÕì"Ûí””Õ7ìG±VnÙVTÞXœòÔ•Zvµ Èc¹ˆBs$Bb‘DU[wÓA5išÅ¡¯b× [)”¤6aTȤQÈäíÇ2¢î¸Æ3 Õåg@š|zý-ª‰¸™z¾éÑIÔd¥nOdb©ÓÊŠ'„c1Y˜ÂH=B9ÉÕ¡-¬è#¼)ŽH/Ü„Ró>žŒ^’­ÎÀ¥¸8hEì31ˆŒ'(„AµcàŽ “Ua£cSÑÊ 1  åî£P‚ÏÜ#±—=ˆ†MlPϾ"„MŽˆÂ:~â ¥(§"Ÿ¸ê¾š ÏæÈ¡,!T@ŒÜáŠÂDR2¢vKÀIˆ*ëA=T“Ш"ö$Ì̦Bé†ÙÛöÄe'ñ@¼_ÉJ…4Óc^#ì1‚t²Ñ@aÉš†‚”çãK ݃^ UÊG3°Dj}2Lƒi!%f8Œãq !Õ‡W¢.u½D?Ëûx'YhŠÁ„0Ì3 ÈØ2 ßDÉPä1+•ĈäÎäÌ]¬(NÐÿy!‚öNOÔŽ2 ~®îåµefr ‘Ø4‚Äa83†Ì‹»4JôVå4 ¨‚ªûÐnTʆjU)†q&àcR™qA Ñ"‰kE.+ :þ*È0xÆ#²yàOŒFB ˆ I€ÄS¨&dia"™lÐÝpô¬ät嬩üÙ¨ÕHQ*Rg|[_জ¤êT'ÁdÂ0Â)†2nÃJoqȰäwíÀ”÷’t©ÛQ¬´ +ECW2ìp`Á íÜb¥/.|§gK´E%e´fDn©L D9›b;T%µ$¢Eb:8>!LB‰§Ê©ƒu‡Ü#)”˜É?ræà§@¢ˆÄžŒ=A @ؘÌÌFÞÙÎVY!5äü#´MÉÖ7h Œ`Ó%èX˜Ðe~®eØ!Ø¢@WqEÎÿiyYd1ktÙÌ‚0Æ †шdäÔ#> 5€„,6êzrš‘í‹vÐl‹‘Ž˜_ŒƒG ÐÜŠôGW;ÔC÷MƒIH³¦ Jg!Ž1 Î3>TŠ)û ³©ŽÎ Žbrc¤ ¨œ0À@hg8N0DÖ€"W¡Ê7ü Ž?ƒÎ:rö°ã/Y(H4 vDÃ2°B#l`Á†H£‘ˆÂfMÔ£¸˜Ñh,LŽGvÄzxÕÃvB*ÁÅ1ºÊ„c”Yh#¸p۱V3á1Œ†S È‹Ó) ½³?ï<ä9Èé.‹¾uë›1»¿yŠÆrSÄ{œÅ¸þÅZ5.E*Ð.7ˆÎ[ÚO µï¶Q‹þ>xÈ®ˆ®Ð¥9H¥2œäëÎÔ$(‡?#aQ?¥2Û_œòL™cý¢`ì!Ò•·^¤0ìFf"§{j<”¬ƒ± %jê2éDK¹r…E"TŒÆ"b›Qìsû߸å’Ù]r÷â¥ÛËêdOÒÔréäÓ$Š™þæ*;íäì»P‰zOmCêo/¬l§Ó˜W¡ÙÔæŒsÜç)HAʶ tªYV…§MFPÿ¿¾gÙ+Ùãá+é¦\W)-.¡Îš§ñÚGߑȽ&Ic—IKJ±ªL)X®‘\C º”X¬V§æ*i "g>a·g!©¸»ë\L¡H*¦óÎÉ›T°¢'së#›…:ÿ%º_Ô—¶zÊV+×v·1îqB;µÖ1ÞÅ+ËmH¤ÛEw9él™ƒ^J ˆ¿]S)2~bw³WV©çaR- ÊZ¿˜Ï\¥!‹‚æV§]Szÿ7¿ E«|Ä”¨‡s{ u¶5B•ñs_I檙Ü_ž¶³&¡ê¸îdõ£XV"5ÙÈ쎚r½9¸åÿâoýsß7ÏÓñ¤ã,Èb‚²Œ¢•x)B˜¯Y)‹T ‚"l_æÆa÷½œÙ.«®Ï' «Fk´™¼SÍm Ï¥·8¢ÚKÕÓªI¹-”õ¬F•uº³*§FAÈmj¨¤ÉñÈÌùˆÚÈ·bn©wÅÝÔcb2åD(…¨„\éØ`xÿøÉ˜^éND€ÕÀB€°_þ_ÿ/ÿô´­–8Êq¿Å‡Ó†nø&õXCO7WÔ…Ü)0YgŸrÁSÐ}çE*¨Q•Ë$Ì£¸¦@„W/æ6n™(ÊUÿ©5™nd'— .¨êÂ6=fS9éŠvVã8¢•W_*_´„]Ù35Nç7ímä¯ v!1TÍT5¥•ˆr쬥.ª†Öub‹·wmO65WÌyÄϬ¼{!´ƒT¦Žãl„êŸäö1°¹tÂV_57Cª—R¿¼¡‘JÖA ¢£k9WÜËE9—‘eü¼›&è‹DD´ÞUm¼„T‡7hˆH‚ œ\“ÌGÑ&RÁÏq‚9c877þð gÁq,ÊÜ1a[r`tƃî Ê@S“Í‚ÌSˆ0À…Œrˆ…\e§¤ ®¦Hì!R(ds;ˆp½"ˆÕy˜Ã)±(!ÌE •]ÖpŽ0A°AÖ…zIŒÐÝhR%pv+D´ÁŒjÎ9ËY5‚qÏyšÈÄŒlJUæ0& …†=âR=% JI(õ2k1 ]ÆQ pä›äA†ˆÔ ÞyšC8aD1Â…'¡ fPIÝV‹UàÁ"n¥9]™qhœ ­ˆ@"¹S‚NjaUhufbpËë9gŸ#b0JÁ¨Vľœ)F 2‰šŽ*h¤1/™(íÊš¯ÐJN2¢ ] ”F¢uXshÑΔht¨É1Dm'Q> „G" µ¥(#‘~)…7X9Ã*ÓÅ|£8fBåŠb”Å!‰„a ÈõÒA0YJêuw‚r£‚xè)8¯PÂ4·„ EW#µ‡h¦g5rÿ³ Ó}Ìq0ÞˆVè`åÕ‚Û™ P©®A,]°ƒ¢;7p’*ŽÐ5'LØ5ðŽÎeçc(Ú p±à#ˆG0åP¥aœw\Á…N@ÆC¸FàT7ìÔì¡}ú™— *ó‘\P‹£!†É4]§À¼jÁž™*èü1IºÄHÓ÷*˜%FÝ›rC#˜œLæ=8XB³¢ ¬r…j˜¦¥£òî‘™˜€Ð¢· ã5…a ñ&x1f¬Ci‚¢°´PG.OÀÌhÖ‚b$¤†^äç £ÀŽËœ¹1B¨È9T+cõdõRV §°OƒjD)GŠ~´$`݄ʨý™¨™®7 ˆ”"²x~TWå7NFyX£fAB)L̘¸°1Èj2ÞÔ^æ¸xÄÄ#”9ðã'lf$œS¤Š9ÂŽÆ+"A<1D7)˜Á‘>EFrRYE)ÜÈ ‘VÃ!S 0À‘(|DTb—á”6?áqJª±”9’ãÏéL$'%|¦b 1ñT®"mF8¨ƒÉ¦RÀµÆZ¥àe„eB ƒuV A²•”iEÆ+ðW±.qøØ•ŠEg w±ˆCA2Þ”Wa 0ÔÀ‚ã;#Â÷'‚g Î ÊRZÐB ˜(j¹\ -ä@”‚ö¤êÏh¹\‰†¸…«Úc@˱H D!¹f‚GÁÔzÌÇ•ÿì*0ÂJŽ ÉÎ¥×2f Zqáy” Hõ“æ§4a&ÁlR¨ºaOƒ˜0DŽ ­æA×gA1líeÄS'#9ܱdÁŒ§zU„ûNÐàY•¦F)Y̌٪Å7ã  „è 9"@¢U?BƒeËLv8¢¿BåàFhtq34päÓŠeˆBT2 L;÷xš0ÁÐ^ÆFõÇúAþÂH® ¸Yg$[Ò9¯Yç¡r÷€ ßÌ9?Rж`Ë”¡;1uuBÚ$Úú9QsŸ¹:VR“¬QEI]duFùÈK©(íQ´»ï*Ÿ;ýwúwã'š¬·q‰à§,ð½9)«­ËÂÐ"+=–òZKþÈîüF+0‹¿W“~Ê¢8qg½W=Ó”Ü×6.±d|#b(­žJ‰WÊ$†1C²…@…páÏ7LsIœD|Ï©¥RÝꤟÍ5¼Gpµ ¬ñ“Òy¾œŠƒ:ªåe £QõÛ¹LŽM=:åÓå]aÔÉ6‹o7;*)„AŠ Á-JHƒYêÆÝìT92ÉE}—Ô³YßnöVjõÍH·9N=╌Bè›q3F3>jnžˆjµ³ÚRĪ <£1øÁE%ˆ8w*²-2´¹— ²µZ¨w¹uý´³—ØJf¤3o¥1÷ ë*ÕÎÒd%”Ç$tO.šERå5|øÆÏ&7iM‚®»‘,U/ˆ2B^•×ò·„ÚÐèEË‹JàýŸ3#nŠWªiOôâY„K0bù˜ë=™:”Û§!QÄæ¦Ó[|>îã2o$„0®QXÎâo¹Ajº›é‰fåâÛ7‚^þ+'`‰*31þJT3D1—䈵e¹[-]¦IFº±¾ut$‰C5Ž™J|œœRN¤eŠFrb<¨[jÝ¥Õ•“´¤ZÉÙþÜÑŽè)9ø}·Öºã2ö¸Ë*Qj¥£9–ĸæÞF.Õdø’jÞ ?AÀ¤óG˜ä D9È/×Lº%ÅãUG:jZÍGNÂ`ÒE½!…ÚË—£²§1˜gTUÒ˜C»‰F>§4¤ôm½BGÇ/+g-—5 ȩ DóÍU_.¡•Ê&­6ßÁrÒ]–"*TþÏB¿ôæXEˆ…fRšò™MyÈë%=8—nÛËKq^0œÞ:E+TÉ é÷ëÆÚ‰›Uª¹|L¬?NQIØ9(§^H¸]3eF ´ÿˆÝz^UOR¢f¨’l#§Ñ_\X•ÜU£ùQý‡ADjš™¢iIÍ%6¡a§éËæîú7±lIÇYTv³kDËH(ÉŽtnCÊJ©¬ªÞ‘™Ú—ÊVÇt[buÛ` Î¡" ÅÁ˜ŽCß#=;PǺº>4ƒpˆD®$h—¤;œ²Ì›£mPìÈänti§rƒâL”˜Ó±°¨œO)ûU;nAdžî3PËõX¦g&\m©nVúzŸˆwîÂÓù³ë†³•ÒR.£`þùÇ«{jU3”fUݪë‹WEDÝí4§ÄËõ£ÈfCùÑ1„"Ä!`¢”$\ÚrC6ê.{»Isà$KœuZÐè×5Í£^ïî“„¾YɆŠGÔ4ÅÞÒŧH2Ûn2k©—šÙøö¤Y™‡A B`ºTáxër.®æ8œÕ.í§ÒÙ”‚Êã˜ÂÅ—3-ZW[#/Šë‚‹"±—v]µ_Q0§`•k.fCA¥´FòÀ€Ä1dŽ3árDÏ·éÏ1$Z_×,%Ó‹Å–ØF0œqs¨i§[9yXW…Bfü„N*©-ΘŸ*}2nQëoÊaD4Œäc†*Ó‘mR]ÎÌù5MUYpœ\Úsr;ép­šºsJÉE°…YÐéŠj¶J[¯Ê»LE š*Q™ÏÉlåç5”ZСëaVF kÉz ]Ò+2ždÒsG–%C™õ8Þeâj¥ vd{f&{£’‡NEBöÞ³ó²6Æu£H(´.à•ÖÒ¸Å8…8cçî§ë¢/¡Q1˘ÈÊ]4ö¾ÆqQ„Gšº²ÍºA*ÿT;/Ù9R+ËQF¶IèS hV)Í4, i;5@…CÅ#Ä/ªüª/SQ4³ˆVz¼Ö~nMêæ"ç_ˆè^"¡ Ô5˜ÊîD÷Ìó·‘Ã_iËd'’ŽU¹N…¤³üJ”ÊUóQ“„)i%Pξ+Q”&›ýÊþîEÇK„&j¿ŽáV©åu…l-ÑÝ8ºEÎ4ËVmßtÂîé²z¶ÿ5™X"œ†d̤0F9£ú©E£±…¡e}#¾×/$Nqô˜‹j˜²“3¬‚¥œD­}æ>¥™‹ÌC-Ù ¸JO^–Ž#-‘¨~Mánµ!ŽP‚§“Ò‰us<˜#{rº©2°¶­&3ެdªŠ†/Ü»Òy*§E3kuìDÙîS˜ÈzbúËÈB:7òäzÍ4Ä rJXAX¬§VÒ—•ì\ÏÏJ+Ö‰j“÷ÛÎMòòid?nʹ«§¢h¨G¤®!*¾C×îÆ"–ÕmôEJLŠq[y·¾Jb-¢–G£MÏÞØÇAÒíÌ#VÞYzºô%Ì×K4ÍÈë^—{Šb-ÓJTsfëíÖu榮]Lé!ŽH¨ÎKErž_ÃDà D -<è!8¢(G­`ª)ÁJ :†P‡OQxCÆ"1¯€y½ «:! ƒ$䣊6¦)!J¬Rd(Ƀ „AZÁ#QMÕ0Ü£TqO–„d&-ö9— FãF‚¨:à¤.b@bRÚgß5txpW€gf Ɔ7×1rÁD<ļ©A8he…¸äÔÄÚ„¿ÔŽN œ15ƒ„Ð9” · aX ÅaÅ!hJš±0æ 0‡Ø¸/mc1Ä1³Œ:WŒƒ òYH¼ƒŸójAÂãLëGNé1°EÌG6pÃá\ᩱƒ2— #Ìr%I”ìAITƒˆ¡ˆ1 šþ¦¼%lÚX}Ô!‹¬½*;®X„étÇ2þïÍ^üF}ªÐÄu¡Å«S˜WEm´‰z—¬™1¨w©J?ö"N<©)WƸM/‰Â4ŒÝS±úŒˆòœä¿¼Ò-NÖ.•T™™+YßLËds‰~¿qÈ"åPꌥF{](µ¨† ÛäñçÞ°ªËB1È®tf-IúË¢¿w¬ÕZ—¼[ºøµ7Ù˜…-ÊÛ¯Ês¯¼âb­ÌL1^É–:´®ù(ËûE!˜Ä+q)ƒUD=QHì0æKl‰Ñg— À0É$pƒ*}1XÔ|zÉTWj™ˆÒŒ½T‰rY·q=‚ú‘ôÙ,þtõhÉ¢¥Ñ×>$Jo¦„(¥( `¦‰Q‘ƒf^òÅçêTGÙr+°ÊpËaÚwÚ_ÂÀ‚'ÿøÉˆ_¹N{ÿ©ýëü›ü üaý™ÿl³“£¥÷÷pÓy¨†qS×mß=:¼¡w%§²Y¯’™µs ›1,ñââ¬_‰FŽbâÆ ,õ*ÏCZ™˜Ñ˜ö-S‚ªprгS­mü–oS£ )1–Š—B¸–\—­/%‘Õñ¤¡ÚÚI X‘f ¿<ò–2JQF•Ä#‡ô”}¶ŠÇ•Â6{kcŠöJØ÷%?)É^ºÐbHŒÍ‚T÷e⨃(ÌuI8jÈfLê:W(ÒyqÖѳüWë%™”q\`Ê0ÓV,£¸¦Úl‘=µ08á%xV¨‡"<¼5ì÷E£î*>ÖGyvõ1H×MzPÕ'’ªõU¢1Ü„ „³f G+hµæÁž:È!Êr†Oþ¡×»ÍJ(†ô¼$óL¼Â:ŸF~ïŠ-(†”áj…’”œC‡elÃI?bˆY‰´q*Ú·újT‡2-€ÓJ"§$ yÉQ/bÂ|Kœ¡ "û¶½Ä8Ϊùíäßü~Zq’Œj¬™jÈÏ;åÇÁˆ¦KÜß)¥À1 Ž`’|¬.–:w¢ÃBÉü8gÚBº §5OhF%ÚBæ(¦ÅAD•$&k3[–[¥$S,¢PØ~E!*œAH”ÍëÓõ 2rX“—;ž¢zy)zËÆH)= :¯ØïA†1=2¯Ä²t—•tSYGk¨Z3±¨øI´\yªOA§K=Pr2ŒB¶UªÏ¯åÏ)jE"%Òž5Ú ¨"ñ¡-}AÅP†»)Ì‚lÓ)ë’–ÒTCkx…«`ź9éÉ¢]ìÛ0 4,yQÉâ [T9RÈ‚mº´E’°šZ輤¢©¦QŠ׉) 1#B©o–âP¶bìSյ젪¨Rw9)„âËmF-Jbæø•`h´† BÄLÜù)^RsE(‡€QCÀ‘& ’èu¨Z÷*x p)Ô_Œ0çBš-'æAHºZˆ×{ o/[˜¨Zi-m[+Ì¡Š|êv2š"„pˆƒQ-‡æëÉ$®!Äb×'ï4¼i²Ô##µˆœ¸U !A' ¤¬Ó7W<¥x…º´âù „ݵÿÛë-Lá ûñÖBب*¤$,÷×|ÓºÕb&[ˆ¾I;’[D¦pT¢îts ›nþ'/ñ{$»ÔÛ%3¥ ®y ·¤f¢¥Páƒx5ªãF°C願ɣ2u›w´ú·í)ª…%z\.†¢ѤÌùã°Ò3mHW-wɺ²²ÈGc©enôi¦ ¦ ´zÒß*¢ÎY—Q%û7Ï 0‰Ó:ó1i9xFQ S‡Á`I§0™xpÛ$­& ‘ y€0sZ¡F&0ŒÏ ~ZtG)l%Bˆ•E­•Z‡kmî5e «{»·¥¾%–íÇh‡J‚œŽ"枇Ì8†žË†¾“ Q)NÅ•‘)rVGWc rñ»<&ˆêÊŒyÓñI91UøjŸMº=h,Ž¿;ãÆTÜŒV›ý¹3E¨-KRT2NÌ#ÖªÌdË !ÔAF{¾àÒ57òiµ±ÉµMÆ,º†&ùžïQÁ (Œ ²ã!;Ä ÍC°ì‰ô°›þ¼Îܒăê9"HÅ3Bœ'“5/¢¬§BŠê!q¡rœ½ô1.ËS×4a®’ÿ»¼69¬àŒ‰Wrg«Qå>.ª{ÿ‡Õ˜rÌÅ+Šú>œ>šËs †É?ïȬ‰G­OG¶$¨ïÕ,Rˆ…iÌÖ4ËRb9¥V"rs&ñnØhÅé´M.P/´ÏJ¶¡õ˜óŠT3GEÖæf»ULb‘ÇÚIøé0@ÂmY¯4ÀÌvßn%B¥’‘Î*Âb’@{7¸Þè´#ŸãÚ¶3î餈ö1NÂ’œÕ!J— ô4¬ª™Ü¸rÈÿ§¶Äû»c‘h¨|«nü¤‚G tÇ M7á´ƒá^Séë2´‚ i´Õ Z[W aœÄR¨»X ù"øo¨JÊyÈ1Œf ã2ØMºðÂ,Âé©i.熋€Â¶0ÌO ¶<&áÚ½¤Ï™^ǹâL®î—JþÓO#ñP¥Ö2îo ¤S* 2ÈÁÄ-bãÏqHâ »M,þiÊäV"Qf‹lˆ|VRDvWµ?Â09¦ƒ´]|SµO‘|þA9QIÞÌY0–JTÅ9rÄî_L2 ·+²¸´ Þ#DQ1ëïJ4ƒ‹g¢UŒT¬bšW$ýÜ|ö¥ú+zcoÛu¼ìz!Cd{'‘'³úУ¶¬˜A*ìC—×’H¦ÔÛRh]¤ïeŠæ1JSØlÀkéF(@T0‚–pL­%¢ýVÎ%Íbõ‚ˆÑC Zù¾ÂgcÈhòµÄž×šå)äEYÿ Ãxž¹!̤‘Ö‰‚AR—èM¶Þ@ñåØ ëW #\HV¢n­ç- ~i‹ŽÂ)6XÌ•,bïå¾6‘äiD$‰ÍÓcï½XÅ(ƒŠ8ò|ØÓ†r3PØ$’žs8Ìôz< =P´ `îv:ÉKk’¥¡GU¯ò*¹®õÔf •Q2cÊ^¨ÔÜòBÈ!H%#˜ÒšÈ…-ÉîF"«vjþèG•D*RMšZ"“H%^B•JöLºÊ†šr[äQ$£™*¡IKF›®d¡%J ã¡Jy•è[3œˆ¨Jì*W³7YEc\õÂ|Ñ6dµ!ÅIˆšKüx¸Bˆ°¢Q)¨–’µlóHÏ›ÔlqÓˆ1ákîÁ8[Ô%Ì•*}"¢ÉÁ¸• I×)³S/rýˆ`ÏwÂ;`Ʀ(Ï'ÞGú÷l5ã0dâ’Â#½¼K×É«²#nP­]Ò¼¢18õ \K¸ï˜¤3­áôŸêd;¤Å8‡‚K'þ´¡Dl‰^}}ƬUX§Áí£Ç¬ÀS¢]ÌE!¥IV¶æò,ŽqˆpšÈ˜+óÛ–=?êÊïâVI8ZÙræeŠúBÙ:³ ‡%Û½“&y™LÅ-)Jµæ[?ç½!¨¨íâŠB’ÖË))•gí™(-œ–‡¬~Ùuž¢D*Œµw>*ER‘ð†¹%+6š–«q‰#—lj4òˆ‚J)m¦?K»AQÎÉ*¶cqzsIÄÖ¾+–AVRå· %džÃâŽT•¹ù²Åì>uP#œÅ¯­>y9˜+kTÓ'#’:dé~S-ñ"å×A޼ o¿²1ý ¤©3RÕŒQZ¥ãT}?”¬M+È%pZOäŠ:Èâ¨Î@†ð։Υ'yÿ»¿ãOöŸþpÜ0çZ>lÏ1ø´BÛîÃ?ˆe‘÷åv¯‚:Yhí®Úæa;1qì5ÄÒ7b’ÆÏK翟‚mm¥,S ‰Ù/¥u;&‡ÍçôóéF‘œ¥£cÆUü\²Èc2•MGOî\Ã9u‘Q zßø#â|_ûõj¾Ä2bøŸ}â+„PâC“hDT®§¸«ì‡[=7«e:x„j“-…ößn30éUº$Júk¸ªr9eö¿§sSTõ+PÛ¿¹!\ëö®ÓÒˆQÄ;›¬ÿ›i™ŒæDµ A$Ê) ®oÞÄ5Wjv*_o°™”“Üžˆ¥}UE˜øÛ>cLZ» *V©"\ ÍLy¿¤Š(ˆÊ„Ô‘ …7Ы¦!½­Ä¯¬ÄÖ6v!u m¡»…ó4¤J+"&o¼  h¸L„Ù •#ÞÈH—¬x9£¸¹q C eÈÖ¨PP¡\ƒ"!÷€ëyبâ Ò¼89Œ`€e UÈÍLD×!C!ƒÌ)k±SoÂEFœ°ïŒÌLjB°Ç‚”Qõ"cFSNXùÂùÄ0 JG~CøÄ!0œˆ"F€¨»Ã eqòR}ý”ÈY©¸ÂÌ•>x ‚«¤aŸAû€}ƒÀ!PEeÐìæáÐ:A†+õtøA°ŒG5 Âo•Îä) L%â)â½ZC’‚’‘É¢Šwre8ƒ ˜ÅÍ÷•¸EÔÑR,+GFV¬m|& Æ-L†²7 Ì'䜮³¼æNÌçp‚äÙ²Y ¥;©œÂ#•éLÑ&¡æ G9s^düþ£)UȨ~&Õ§FºE%_/¿(™ÉT¡)–Ç.S†Ì{×òÈ+å—Û™µ#°—_s„rsy×A"5ÉEMóâïítU³Œva$×õêÊ¢¯bŠN§áéSDGŠD½;pEò<²=Zû¬‰ìVvf®zÈ»"¹Gsþ&7K¦uUy,l‘)¿œy¼ºÏ"º ­L&qƒ,ÌÑXQÜ„º.ªŽfE2?k&—øþ•e#‘6ô¢×èž©cÔS ¬eÕJ]»–B9™žËÞ4¹l£ø„uÚõ3…¡ #Jë‹—+Èë„¡(nî[âÑ+ „a4¦9oÙNë$æ”ç&>T¥ª­Ãm -4Ffñú[>»Ú)±¤·ºOAU¬s˜qÔžêÕ!8Œ¢«¦Y¥[`»ªüœ7zyû¦eþ§¦-+˜w%Ó DÛ2ãõNF»0™¸/5Øä1QK[êv!‡%ÌJ§13 Ry.B²¿9¨=›ˆî&[ú÷Ð’ Gõj.DE2qÌ„•tQ ¬¥D1n"¦ai^Tœ’ö¾*§ÑS&µª„͘`£Û´wIÖWv³jÐUu›Ußß¾Ôºy|¿TV_õ'‘“ŽZ[•z‰a{ÖE§#6ÑŠøDDýIWtDSòcô¢ºSReWN|¤´×¹W†B¾Ù¿Kãrø«Éø‰'SA­ÜÔ+ô…ªr ë^x¢*ñ”éél“¸Ä£é¶}[«Ök¯žNN‘°•zRYä*Òƒ(e²TŠš«é¸Ìˆ.UKâQ“ñLâñj¼ÚbñD:IÜ1I†,‹«R”ÚzŒ:[µ’j„ò7¿6]™De*‘šdÓùJôb¯R˜Âjn>®¥zêó0¥®ÙŠLö÷0Æÿgû †•ÈU2u)R“íL‡§|•ú%:v“sfàâé~tO0H•!ÿC†cñFN8ìQsÕâ?M$ÁNaï5zF§blj8ÉmJ£*Ÿáʱv²­Â–Ù@Uí«‘åzÞ"9µ™‘EÊ”B`B”„á h»3K:°¦"„šPv¤%nßk ·ÉJãÞÈ&Чj :Ô£+¬œÁ…=®`ƒal%ª`¤¿Éœ¸$4”œÇýUW ²ËŒÈ±![Hk(è`£ ÕC›l`ˆ]ÜϬ>õÜÖ¾%iÊöû)ëŒÍTÁ l(£?­‰-Ùˆ+¼çMbÕrb—±y RgÈ)ŽG!Ïæ/g±Ô¾#ÒÌU•Í^]/{Ñë¤^6(™©äwwl”Ó’„:‘ØwEAq7g9³]^ºIzl–í¢hä¦÷-WRJêcŒBµìÁÙhz•ŽÏu¯/°½OЄGµv#ò+´&³`õ$èW]aù^ˆÒó‘hž¹#NcëÅ!¾™­+æ5a Ô°Ç'†w)4þÜ>¾­ëþ[¯˜´úД䢢y1ûüÊæZ2ÆqÊ+>>ØPè¥*IiS5Uqí6sóf7ÜŽÒõì¿59E;+€‰wÎà‚ïnÆYWÜC¿ü‹…åìs¨J"·?Oèc6çYíôÎqœi…Wm?ÝìIJv_MuZ·NúšLÅ'·;™ÇAÑSXÄU¡irbY˜J¶£Y[üÜ\/·\»¥m¦99L2…Îw¢ë¦ Â0å"Xæåܪ+—ƾOÑ1&©ÿ‹ÙËÒ²`üšÌŽ A_©È9EöàAœQ‰ezy C}¸Ú¤ªîºi¾R{£©‰|o#ñ_xaŠJù{ŸK®çdÓéP‚ðÔk;%d¤O%S8aªc0ƒ9¼êc\ea#a9C­ÉTÒÐÂãÃÄR 3&ÍsМ&".„Æ0ôåè`wc„¨…øé¯)oå@fà0¨ZÔÑ•9Ç1Œ`ˆ¦Áç¹1á#zP•¹o êñ ¥õ‚*F#—ÆV)A‡'ß!Œ)BC2'B˜dA¸ll…j¤+#2\ú#©Äx(¨øè¯.Š!°Á±ÆaØG`A‚cB ç>¼œ§8,9Ê&9( ·ÆOU edÁŽJð0A'(ŒŽ˜‰ÖvKÇ{@¬& ‹‹ ˆRJ h! qágì`Lf[ÔŠÜ FýiË0â0š›1/b¶ecÖVÏ{ÿøÉˆ`Nÿ^þý§þAÿ£xUdz’µÃ ÿys¸Ûú(†~ô *b¢ME8ñs.ž° ¡…®8SázFéÓÝRRV¬1YdM£ÎbÔö?Ï!HçQ-ÒbÜÖñtšôjaè­UŽ@ï^ö!Ë¢ o'óa•WŸ“Ñ*¦!*Â%D <þç²xŽ')_9‹élIþj˜UUŽØ&ñ\´2™ µ6X€„(Ÿg×’ÃJé=ä´‚Bb o”‚‰‹·0Òp9׉9}± fj¥F6Ö]íñ‹NHÁ…¸ à†ƒßˆ‚Ö¶K-DC=zÛ»‡ÂTQÝKûÔÙ+YL®—1ø—Ëã(‚µ£ÎÉBÊmô¨É!b%ÄýæIYqd]ÊÑ¥2ˆ¨U“p»O¨rbq…#Ë.HÒLqÌXÎt©xƒÏN0W„Z|þ-† þ  ¥ Iê!© c‰X܆ ŒòK‘C%qñ T@Æ·¡Pz-×,Z¡DŸCþmÉ{É% aZUû7[ló/Ž”D:ª£üLBòHžö•~«t{•\XŠ´(ç(HÞ%Þ[<¤ÅJ0ž¤sýì6K†tÜEcz–ÊDœ²ˆ`å“dªÕs BIh•?Äë‡ 3dCÐÖÊZ\qŽGº ÒiHE½¸G0œ~—Õ@ŽC@ÙÚP'[0¦V±4Òfûãë§°¦mBdÒWó4rØãÌ6®aÜ332™„#±0\®b Åç(årÒúEÍâ*—®>wÔÔu8‹\7ô»g eªŒ1Þ”½¨ñ,c¥ÐT¹ð‘*IJC(‹z†ÓBx…§œ¡Â˜Jyíïè~¸S®õ’ô¦¡Òu÷›Ä^G”ä[ǼôfM=H¥ÖõVT¹èÇÒccAë,  .·©tZ æsŠHª„O(Me þÆ [ú#vEdÒEÈÇx¢ž×ê¡ù(ìB±{$×"2ñ6ôÿ˜(Š^C&Ƶc¢¢Juà C³UË")˜ÚYèYý²p¢5tJKõ«órÐÂå ¨wåÑDd&ïzi)gº(U:h*H.ªÒÓ*â$SyÂy êK¶è–S1V$œ>–WÅ?7+‘…?8£;/ž'IYZr¨ç!Ò1,ðµAîõZèµ/”Æ3Å"Ð5k>áX!ÖŠ3rñ*Gé¢Ä!Êâ:ø™^Ó¤%i6ݵ™ÈâQ {m¤÷±¨o1™–NÃ%x©]bb¤ŽÅ£§¨P"µi‡Bn dSõËÔZiÈ6L‚ Ö%Œ,—Îe¡JTÙ—[0’<¥BHÛg²¢emjHÇ*÷¢. õÖâ1Ëb/óÂà¥)±0öµ¨ s¨š*v1„²™9ˆèf¡Äs’ƒí‹wünˆ‡(îÈ?TuTiu+•ã ŽT'9]Ü·ra¿³èS˜*ø©£jÊo?"г—•èû.0…ÃsÒ;„SJù¡ÿ¨µeˆ]sôÒmÊq uZš¤¤É2aÊdö]<‚Ù2vw]/æëJ{é㌲¢VÖ‰6I0rV#µ FžÞØIê(Â1jŸ߃ G ‡Y2–êD)ÒÊAˆ:à—)(kû‰"u[iYOTÔé FNœ×jе§ F—øž†Ó‹èÌÍÕ.(ž þ%k—ð#53e‰!W„\§Õ]¦DÍ)~‚t5 0©(Ärc,湚!9m÷EÌ÷Ó²‘:Tý#ÒöÅK”!Ük¥³’ÅÉË D!ìL9l ƒ¼¸L(õ£ò ¤r ’P^ÊÎûÙ-ÉÎ[¾•gG [.Dáµ™hâ8®S¹sq½â/Jš¥Ìg/ôêÃlŸåŒ‚ \Ü"xªª/g•¾†HFó¸…©ÆW¬=–Æ)¥\ÆD: ¨…~NzvKÔ@F+æ~¼.\)”™1ÊH§3Aò•øJŒ*‚KÔ·8â‘=AiM- ¬dƒ UâØøNW!âW­È·=õ1ê{¨ÄCP•'ZµJ” âK…™fÂ)ÛåaIÉ–%¸Ï’ÐqAƒÒýïÒ&¡%8š‚1ÓØ¾þ;NؼÙÂ}/ÑNÌA ž¼êˆG¤\½g;;0Ìâª{=Bó]óhÖŸÞ¬yŒUü'©äBr%§d'zG½„åÿuS†æ©2Eªá ?l¥D#TYU%yLW¾uµÄœ–gsC˜Þtwæ_jE[)}TYo_ÉNyLó|Þd•B¥‚~„j '8ʬL°ñ÷¿)]…Y&¾Ë£¸RS]rMFZÖ†lRˆ›Å­­£F ‚ŒOœ§z3Æ›+\h ¢á <ÓYÉqD;¯‡ýj|F#¿hžf!zþ<„â?N‡gtóï…ÖÕ)²g+WÙs'y†RÎ1£ÍiÇŒn±D&5|GÀµU(WÁä©(—üv±9Lª-YÇ/¬v‘s0~¼óŠ!ÊbˆlËø¥Š"ÊI-}B«R=ÖUú~«‹Tbµ´&­%•©Èþz”S)Íg-S„$‚ñ<˜ù:…]BÊ4îIß]|ã/ZM¡ewªô¦‘è®FÜ&ùW׈åf2д5ÖhdWIž¸b1r|>ÓJqŠZvm{¹LÖÒ}©ÂP]ÈÈBеé$6¾ ²%NµEböHu‘Îñ{×KôsgÌŽÆNc×¢â Æ Ç+Q4¤©šibT¬ajŠ%òò¯g3i»"\ü„9ÙÄr#WêMà–x‰ŽAR”½òÝ(‹Äá¸âU´C&Têƒ*BEú]Ù yD\Mܪ% ¶w)­ôçªk É×GÃRBÎ#ÅSV$ö[ðÝâçcÈEbj!ÞaÒt\¿o@ªJ9•ÏkiesY¯cóÔ‰Iqø…&B¯Ò©u"wºªI}ÚÎ(ÅÛ"óIIÑÉfô£P–Á+“Lê•:)p¤ÌbÐí!¬T•œÈŸ]M²B³‹Â°©!iQmšëa•ÑeD¡}Ð2 |Ö+…ØBœËáSúÔ-Zˆ®”*9ÈžóÁˆ×F¡kK®ÈÎD?„ÿê™ebÈË ü¹[óÄ9Š*¥¶K5ݯ ´M߯µ X¬×Uº Ä-º¹øòp¬èƵÕ?ŒËÄz¼Ú\J õ'®°Â©âëÆR¢ Z¿˜O¸•t-jÌš/ JS"­Yg2`JH!©ˆ… °!¹š'Î ÇpeW8@qµêu #ˆåŽ&gCÖ|Cˆ4Õ«-¡Y!ŒÐûƒC§+z«Ê r‰ùŽÕc1Û¥mÕ8@&1…;t2Ô,Nð­Ó ‚‡éÕï†P‡aœCisvôƒd«^–š '.+…SóE‚F h`Ì/J# F`”ȹTNer(zOBðU;!%®9J¨ä@S.€“ŒP†liHQ.¨o¢ ´ãQzT¡Ž  Œ"U?!Qû¢ŒlbXÛ©^=°Ô^ ² b’=xTfÍ‘DfP† @O^…ЏT›)Èå"┽¸À†HJP&ØÝ¤¡Â3)”ˆ* S6ªŽªKˆºØ5EâÒµÅBÚB$¢!Fi)ŠÚ21)Єì|TÖÃäb œù{9•Ç•~È f`Óƒˆ©û)˜¨Ç# Êß“¯:Õƒ6´$"pd£|~‚ Ê ŠCš4ëÚ»#”î,¤ÀƒPƒÄA˜ä?¬" ŒØÅµ¬`P„á…*ŠVƒªÇÇul» ÔFÔE蛨Cˆí±pÓäQ FUVn á$‘kÕC,•PDš„ÏE,©*(ˆPÖ\IauUsT¤PL¡…H?â½®AŽ£ œV<Ã)8¥„6&Vцå6‰ LÌ0–*² ¼)ÅÊP0ZHD"K!‘ÿ¥†°…Â!’ÞT% ‡ÄBÌR0ƒ™F1?ÔIýâhD/è{uøwaPnA—ÅHFaBxD¶öˆjŠ‘ÄÂ¥„: C#è¤}Ç"c«Á‚² NÁ5ÎP.,s!‚цPÀiЪ@Œ"ÍÐ Ȇ‡ 7+÷q|Ç¥LQs߸8qÂT¡Ãƒ¡#Žà†IJ!†1Aª”Ó®MÊGôÊES ˜)«?51³ù’/E䜯Q±SV ½^ sp‘Ð H SUU|·Œ¨eë±¢ .ª³ÇÑRhÃòT†`†C=ÀÄk‡ÖŠVâˆaH‚ƒ‚æ)Br„Szê@f&º§Áܰ.€¨ Œ"›„˜²˜Mº¡DQómÆV‰šfì#™A`@ªVZ„¤v9±IA[õ­«dA FêÌ¡E="‚#?„¢wF˜³We¬hÞ‰$G…jf”ˆ HEKc8˜õä( -t2¹Þ±¸ê¦›+*3µa»ºš Î ÂU1­t$C 9^”Ö Ìµ|SÅb™MyŸ3ÈCÀ™›BÁŒBˆ½(ȵ Ð !™Ca¼P±ÍÎý̈wQÓ23Šršá¬ó1qÀK„6mM†#0c8Fs=}”\ݬ´\)ðZqŠ®$¢L1*¬§cˆ0@£a`”1BmRærñ«¢)$6:Tíyw‹wâKG«/jYz¦wdÇ?²tè_2Oȧ\UÛ‘䈔F?²{‰ÆÔ®»Ù‡슄"‹§¥e>òå0D­tu&÷Õ}Êⵚ„ö®ƒ®þIîïŸV:‹KSZ©nv²k°Ì2.LwÅÔM9˜¦ÝR³¿˜YWR²øo Ëé¯bQŸW›J·íìè¤ß#vÍ|?¡[}{êµ)jPŠAyÅ;Ô™VÐ 9 #bt|b ]µ)t{[ŽŽOþ’ér³“å³îÑYÒ­B8ÄE[]ѨK¸@‡\ʦ)Ù}®“fðÌïÄÊIԜߩÛjéžB dàŸì§M#éÚA\QHb«9l÷B³bãs%4ï¤V6”ìi¤ÆgÞÉÝ1 ãDmÚ ‚ÑŽªÓ?!T¢>ÙYòÏæQ#bŽoºúbwòáy]Q¹5é%r•{ç¯@‰æx©æ/¸€‚¦È£®¬Ì"ÖÒiV²V¼ŸÖâqe´õ"Ù,,¶×)æ(g5äæq˜Q)•¢ÔêG]E@Ï[&&šÛ˜Ë"ŠR•”¥÷=ºO2) ÊétÛ”G¤ÿæ›)Œk®¹„ÃSÎQ-å3¿fEAÂVSz.ÝÙwýd!3 í¼¥©KHÚz/²…©U«õÏåj]0c•ð„:é ÄÂËVq¶¯r£zݸ;8´ÆfbÒ©r­ÑÍj- %˜—s.¡¥ºq\®Âm*:×Ë­!þš1Ä)¥ø¨ZnTRuz¥“­Nô/åmˆr-0ÚA¼DÜ9e–ÄWÉäuí³­”˜ü¼#¾Ïq?[ºzû®Ÿ:U%–)¹…0ˆÎ¤’ÆJ³Ú´­KâBgÑÛ×ivKÖ‹Å•´º¦1R«-R)XªêBõÞu)U§¿“3ytHŠb1sœ}&õ4ŒŒ›ÌR—$Q\òPÕ¨‘xFºHB~UªíšÔÚT : ç1Rž^d¢Q™<›µ­¾¦³'™L}Ãoõh^­ž0¤B7"„•Ì)Ó Ö#JV3‘©ŸÂ®Û~Å:–¸WÞ£bºu¼Ò>kd­m »B"Ñs£§æì…£­‰ùW2ÊšäEa”wu,I¶‡â?X—G?&›iÎÕ¿n*Ié¼B˃U*Ìeów `¤Ôçpv3éµRO¥Í"i_´òâ\özöî’\§DD'ˆì\&b:-…iÉS3 û{e-JÂ25oL¦þÚdÓ¦ÛQŽRˆÙ’­Óßðrܪý!‘Õ-B$BRí¼­µ‘®\ìT«Ã-”l}»˜´^]lP¨†1®mÆ‹…“—†]£ç:™hK•Øœô1Žd%ÕXÒ¦…e;1 ¸Oý¤Lª›MýG»‰Û¯o™,I×P¯‰X¦bØ"ˆå¹µ%ÛìcJ&’Gï™J ´%²âdÔ¸W;õªå*é¤! K®ˆ‰¼eT­)Þ&·_½®Ê˜êBµ¸˜ÏPŸ‰ê¥­xÄkÙ¤0F}Ó u"ûˆV²¹QCXìù¨Æ"f÷P‚oIÿŸSváí¦çÚ\Œ—x#¼ÿøÉ¨a­Nø`öeõlõöyøù¿ûb³’}Ê!wZu¨ÒztòxÛRUÞ*Ä@D ½1¦{¦Pk‰‰¢8ä֮М`šâ[o'Ô¹w‘‰qC²F¡M»ÑtbE/Œ®vÇt#!ê&;îÜ$† s!!tÊQ¤z¶ùëbšÍQ)[âMëÔ÷Óâw>3­ÖÆJ ’2úk'²æˆîþ”¡)´Œ!Ò§Ô]“k9é2Q*‰µ,ˆþ-ò%§§­×j`‡Šˆ=ü›’¨É<ƒÕ¸rÌ¡d7Û‹ù¦¨“ûh„ì·¾(¼îšš‚ˆqE%B7ÑþX™e÷jŒc¬eK¹ŠÝ´Åúëi2]Lh—L®ÔÄü—/Ϭ$•Ö"¹^å¡Ür˜ä5(yIT%ÐîeDª*ÙÛËf!=‚vËbQdí6™le¥}yjÏ3Šq»q8fo(ó‹GQTÙ VÛ=<&´ZMùÖ&+ªÐ)Ã)±Û´¼Õ6²ž†râíŽj-–E”­R+nÈ "¼?&Î%S–%G†~.‰rÈ{Ö_ì7>”ÜJRDnŽ+Šz›¨%F-”%Jj0IÌëÌ0Tó~±¸ôóá/ ‡#™ìmáxÊÜ\Ä(²‰ž©’.‘aÜq[éJYd!ÈâS W£Óžj9(~/^¾k—ËO eù—DÅiV޳)M+úZû_S¥®Uã:2 ôqD=Åáðn¡¸«*£ Ëê"ø½7×}UҒħ]lèa"ÔD2åÏRk2:Žê#Ò®’<ˆ‰›µ*\•&óx¶-©$þ\9xº¿Ê‹D©Î!\ÈÒÙ¨‹Ø¶Z¿#ºåÈ›öÒSº–Ñüú‰;û,¬GòÕxL*UQÓ¨llÁ iÇ»!Ï#ë©­žP¥"YK›V}æÖ>ñ݆YY»~ÛÓ)Š\›·?«®ì)Ö"ý…Ôy…³­S½D<­šR¥‰ä2—_鸆ÖñÈw²Ö!î62i®~&:ª.#Ѧ9C™i²QªuÒ3¾òÐUïv—hZ*m©n‹¿LÔ,T%}n§ŽXŽ–R- ü5Ý'~u2QgBª¤3sÛIJóªíˆU×qÒ…Ú½¸%ž¯ÌÙhÞÊf#‘ÙnN¨–N"™¤ :8…©dUo2+餳Z‹F~‹Èn\M®P¾Ü"9ìAâê;»Õ5ùìéFO[»X»ÕNmÂ0ô®XšrúÚ‡h…²-\ó¢˜úÛqåà„Õt÷•ê(‘—6¯¸e±Üô¡%bþV³5ÝÚ¦4†æþ-^L.yèÞÚBÕŒªåT©æ'-.Ê›I—¥$Å—Ý b’2¡‡ÄÔNÊPa"´ÌL­?Þ’"Ü´2öQ„£3U¤Œ¸nBæ}^âµ›gRP•™°†£ÊþRÒƒÞâjÐÔDtçç¶ÑŸWl¼¥Ug±|šÎÞÖ)e= ´)Q•çRrº\%›±)9ìôyI©ì¶5Rºˆ¥4¯†·2(¥ó) kIEYÍ“šëéT£ ¬ˆ9¹rœE¹å^!§5H’{ßÅ»›J%Ë®Èf».PÉê˜ufkù:¥ÎÁÍäz­Ý‘èìØõkxZí¨¯VC/Õ;‡B5W$êÍ-«(f+}žAg®Ägýû—ØŠ0–+”rZlÝ3a¦örK“Ž—þ5s—X-Lo\3=Êã—=¿dÜîÊA†Â:°–¤ÞiXèéFTb¬S~e?ñÙDÕR‘õHÈGtq¢ªó,ž™Ïßlr­Ee½ Ï·)ì¨fäAú> ráJvbf§ $-­«¸0Ž„ú2Ê—ªÒ^EºaHÔáåé#8öLÒÖ«¦É­{DQ”¾L ÔK!¥'Ÿk²”1˜B&²•‚TBƒ{yÄcy¾4ÒeåªMQ߸‡ž`–~Á¨-U×Ý-¦w]ðü&œ¶†Nôn­PLB¦lФ'˜ŒÆžk´‘©(9qøÃ†0o°ÉÛãF‹”ÚEÌŒ¶5.ðäÜdc"ató‹ÃÓ¼ˆ$!¤>Ö%Bt‘¸±•ª‚TõG›ÇCÏS+­^M÷$F@ê³°Âq‚UKÐ4 !|’sr¸S]yy¿›–CHmåºÖ§¢P›îUP‡K#žPÙ…¯¨Ür¬NLiÈ–}]¤±`Ie (øa™àà 9ÁKWƃ^Lë¯x7¸G‹a™eç¹+¥bžVâûÓšO~ôÇ8ÇaIßT…1“bƒšéG_¬‘0ò‘n&äÚ£æÌMnL±ÔÈ­”tá\â‰ÓÌ¡,‰Y9qÊ×gå´Á~]&%.«z6½4± á…)¯8±DIÉéàä¡•3zŸ§<÷r%v‹Ésb¨dÃ¦Š‚©r23ýˆjÚ^>ÍTj|˜KÕLØÝaEo‘~T ¨H„¡×5µß4Ò"aÆ_ ¬^-by·óxE)„ŠZµ*å‘öª#m” øE&XŽŒG*¨¶™lN.€Àq MP.`¼ ŠÖ´ ,ÿhÁð·ÑÒ†lABu!ßAlmÝú3 ©šRt™õ&­¢­\öC9þÅ‘.èfk»ê AZu"¢lL^¥VÓÃ7PÛ:s>•yÓ77_©éº”ÙëxœÚA{Û&kS‚Åßã‘×¢‚C$8Ê„ëØ†-y „ãg'á·Kl[bHÙÚ©JÚa޹ ŠÉL2̾ìáù®o?݃jz¹Ú]ä²ðÈÒ¡„eqkÅÑN” b-)½R“(± –«‚SÜB i"3Š¿ðæ)+¾Gº2W¸Œ×Õë­öNˆ‘?Ú¦/NÌ{curQÊ’rUraŽæ*ëYÐÚNAý[Uµ8Oo^ý?«»¯pâ."ËrŠç-53æHUâM†ãgrëkÚ¦ÆÂW[_2ñ ¨dt¹ŸñXŠœ¬¬ËiR¦v{²Ñéé쎬•EÉVî†Þ¨B¥+L„Qµ,ìQpž!Ùkõikþâ ÉQdqº•KØuœÁ‘2¢•RøS¸¬"â·jþjBT•é1+ï%>K{úþzéVQ5p·Ò$®AÊ¥Ê7Šä1̽ûþÉRJ†{6Ë\¢æc!ŒÄ®½ §$Û}ÇE™8G\O¢Sª¥Œ­)„zôõ wÍi‡i}Â&[M"(¦êys®¼Íßµó}m¶-JSHßBçkŠFŠMˆC-΄ҡ„ w×K§/f1S)L²‹1%ú¾5½ÊTA¦50È ïs=N©F¤ƒ‘Ó­-LnL¥zuüN&VŒ¥"ÿ6)gjû>RåWÂÖå«\FæY+Qs ja|ª«Œ”Jcøâ«Ýs*×xB=èr9«“o3s;;Zµ. $„¢²-1(ÚsÊó¬S¯]؋ݫ#~­°Dï‹ÖÛ®ûúàˆý¤íf1¥S…0ª¹|«¸ˆ3 baè.Õ•*zb ³wïTÍRêŒÝè+»Ki+"aÔ¨*ú=Q˜ã"T©Æ<œC9„ÑÞË7§·:팪Jý¼‹J"¼]5h‹ar„¿ zŸŠ¦J—¸£1jEˆAJ´J(UÀÎ)Ñl9²ØDíba*\-klC]xº[ª*¡;‚ d(‹¤+3ÊB!“aW•›î®ô·p]¶r¶cýrCÙ—²}Úúò™pQ±”‰";˜B/š†¢=·0QD^ßjº¶ÐâïøÄ•S6”TBµ -D¶¾§YëL=u9PþûŠ»Í…+¦™œâ/¨v(„Üœ„1X{“ŒÄÜW伜ó"Ñu©3Û_ÖË#aÈrp‚Tí–u)9¢Õszÿë"1òúldßÄj”’+QÉ"­bÙ„GO«¥Dm²Ô¢²!,Kº§Õt(Œ¤') šëû…õ Ì\%kZ9hZÕ¶“¥u1ë½ùVß#¤cÚt¤¬Wn œW*Uб,Ú#$ί¾ËI˜üCW[mÕ7!}{—³¬üÈÏ¢‘Ϋê§¥u)Lrîóû©–šGR¾õwoÝ?[…=‹[à\Dº=œÝŽ¾ï›¤;”AH±‹É´e‘‹QÜÄF{ÙŠç%9+#¢»QÛRÅ ô‹Ž…½óa›<^õ4‹¶$¨þKQîu9 ÌÆe¹‡:…lúÍcªó£ïq„7_^ßxµ›µvÏLõ¶ 7sJ…V]ê!el(¢”ÄèK£NŽYZÆ9z.‰×U;â—©]M"ð•ýëm·ø¨v#jºcÞ©æW‹ŽgQ’í®é†D?›žb˜OÜVâwö”¦˜¥3½tœÂ†Lã¶ïшoJ˜‡šç‡ÄÊ)–‚¿*ŠŠM]álÖ¥µW¨_TˆöÙkýÈF۩‘hK7S¨+êIr¡ ÔaPíô—?Í™—õZRÖëÈT„ OßË1TB¨E@Î¥OZ&ÚëQ(ÝÉCNzÙfC™Lëõ%5„žDkú bÙ%6ëé(›»˜I(KHC8Ôé‘)HC CÐJh•› 6™¶‘\=ã„”‡a¤céŠÔŦfæÉ„­%Ð#Õæ¨Œ4DAèS(^õA ƒÄÔCżî8ÁJƒ˜¢a†Grh1‚R`„pMÈ€„hËV:ˆñtâqŠ* ý¸zÃÈe"áE¨46*Þ'h´˜&0B(IE1˜fÆÊF!”ˆ½9Ä…¤¢=ã9XÏB‡pûÏÈla "A„œÝ„s8H€‰FA²œçÀ¤Çî8—Šœ¹©zQ:UhLæÛd> 1H3C3aÝYÈSÌR÷ƒ~TçZb9ª|¯©…š"8¨.øzŽã@Ã# ƒ‚ NÀÂHÄô@hްLuþ¦°ˆÕîݶ›r‚?‹¯jÖÙÚRÞšå19Lº¨v(«N6j:ŠœGª°ù–c±ó!¤ë&qK²IŠˆ”o• FÏ3iØÙ3úcÛT»JÈ׺ÇõZ-|qˆlúÓmšÔâ ̉E/2Q0ªõ¡.ˆˆõ^21ÙªJ+ÑEÉŽ»YŽì&Q>Srw‘º§¡[´ØÅ%MkÌŒ¥£Ù ν3¹’ÿ£8Ä+;‘æE$¬iQ[«/‰Z2`&(‹òå>~Cß4åSI¶ú ‚†~›\Ég"¹ÎÅãŠBPAInAÖòQפ%…všÒlÄø” ûÎv- V6Ès.k„š„«ãª;5'gu"׸§S–b«nJgV)¥DM®yX½K¤·É PõØÎ7ÿânq¨¬š‡qH­¨ä§TSRäm Ó¬„9›-ím"ÊjÚÁ„®L×§~©´TÊòó+l!TÔ×GEŽTb_ƈƒ1Ô"¿a± éEôB©JÆ»Í4†1-™!/­ÄÕÅËY‰çUZû‘ ]))1––VlQćD†MÌR)|#±ª`Ûf±dHh—ÄJڞ˺ùêS’eëÒ·Šo)Víc(Ô¨x·KŸ¸…›ãªù Y3•ä£cSÊtîáÎqÔo}ª•bµ$¸¦bÒˆQ4¼¦á×Zœ¦)wóΡ°BìRk ÚD×ôr‘(ik1ÐO¨««S7Ö(9&uüWˆ…»?ίÚÍJ û'J˜²ÉÊb!¶Ä“¯•¡ˆG£(Sñc¥•™rÃ!,‚ª&¨2€°‘ÿøÉ˜b]Nÿ¬ÿØÿòÿþ°@`ˆÀ´! ®¢°Ml ‰ïïwå%„ÓhÃpåA4”›XºôiÉFÓ +½[KNa‹’¹ ¨£Œ$¤Ð‰Tþmoó‰S?[Fãë‚ÞÖQëB‘¤ÇòKå!Déõù…RvŒÝ¥‘„Ej¦Šlº$¨Þ:μEöO9õy¹vŠÆßË ÛL ¶ÜMÌ1K!vˆ2™|wGzsÅ)ŠbSî `ØÄv­–%1pƒj…îè™ Ò a:ÅqPRfðÊ¿ÕUY ñ „ËîëÛB¦–B˜¥;50žLÒ2[ü‘66Š?XBä^”Rié2¥;)HÏ/HnVŒ9 ){S^±ÈóQ©—¬´ˆd>þ¤Ý•ÕëŠÉ:ˆFJ©B íç*}Ѭ[•‘/¶â³uñò5JAõÜAë±È§›ˆE®Y©Ú†R:ΜËCù6!ŸÑŽK FÖz!rútz Œ[)‡qö·N‰ØëäÔòFÒ2ÕdAZ™/ðŽFÕÃî’çn;ê "…!²‰:fÖšaIaªFý¬¯¼…Lß½LSê“d©FziÊfÂ7#ˆÍ•¤GQÏr£¢Ìgà¹äL’„&mœ‡ÒKÞ¿ÏÏÕ·ú?ÞÃ*bX‡ú{«,ßÓ‘«f³©³¿ß/ã#¼ ‚•™¿Û´Z%}mÉHW1ÿúAét± i–Ŧ"ˆo±Ó¬Ó¥èŠ"üì‚!²ÄŠØ|#)+Ù›C'Æ’D+ÇÄ- 'aÌ#ò¸ç:¹g?ÑhÌE«ÜeŽŽŸ½UBÝ#Ñ*‰_;änæÂþ…o’üägTl»­k¬@¨Øi=9jJˆléö*¢mçDÇ© ^vÙ8ÖI|žÕ5§ÔQ=Y1¤²q—¸éëÖ˜”ò"k'ˆ‹4é)Èr„bÚõYUn£Ҫ¶5Žn Þ‡Ç\¯›ZÅB-D(È«B ©r?h„˜óÅy]3¿ÄÉðé(ÜI×I›šŽùÔGˆ …Æ% Ê–".ÙȤÜk‰7j•ÏÖz˜ÕG«¹ÓŒ z`Aƒ¹J*R¥®“EM§jAÜé[ $H…rVŒâcýòÊNC‘ÄÆ«™ 0ªD6Ñ®R“Óüµýk/¾hN#’ù’=>ÓÄ=…oЂ"Ý]HL+!<ôV34JLÔ‰‡­üª©z•:Kq]åÙ=D3+&Uë¤ÑŒT-nK†™]•Q j‹ù„:Y«r˜!jtö BDâQ¦„/ÐÔ7å!W)Jw™H”VyY×s®¯v+QË2ëoÊ® ³¶)ù}¾µ(…-ìQ:~Â~õ“ŒoBš'»wDËR…Cü‹ÚÆAh`¤bd†6÷³ ª²Å¼Âšö7&u0Óš™:Ý„*—Îþ˜Š¢åMÍüíBÉ1ŠY.—JóLD‘.ƒ~‚YÈ(Äãk—þ‹ý%ƒ¸­šcw{OZ(‡›”̵HŽ-üÄ[Î)W¤É½8§EáY‘¸¥Ü&°´u¢åm‚cQV5}ÚIä:™wˆ¨aÂ\ˆ¹¡2Þ•D°œÓ º¦|Fþ÷²õ*D;N+åÂ$×[JóÔDtÎRÎö]ýˆRlIEB_¾‹„îÅK£áO¼Z,"b´ýçÎN§‘ø¬ËÚ$¼Ü–õå"z CX£œ´fA†Îì;¿æ† ,ŠÊØN<ÏSËFš½´·Ü’ala™H¡Î»Z8æNgÂ%ÉòXc!±›‹í\ÖV„ÏY|EưØÝ9°·äi=GA6*TRŠ%ò’"¥ìõN¹×È´®¬¬ùe5YÆJN+†\+¯)ðkmü¶LôI5Y‰]k+SÙ“ØFz¬B ö³»õ%ITÔˆÞ:²Ð^. gÏTºÄî¯Óª]¾¶ivA wqÓp ˆEX©”Û§:ؤ9ÇO7QEÇÓzé‹fZŒ’'ºÑ3a¤FÄË*TÊJƒ[ŒV&‰yƒÔ„"[Óó‡2¶Z±$! †9ZG­}ÅÜ»˜×D¸ñ$Wȉæ!)R5Œ'§žs¿Æ@É’òÍÓgŒŠC6^b÷MU²}iǹdM}¢ÞŽ(FbÈ¢kxÄf#ˆ¦q1–ä~L¢î ´X‡{;F=ËÚÿ¿yk†»cÊâ¡(’S˜Y+I”D.]TÔ!9(‰̵>Ьèõ-ÂF¢ÔìòÞ´C)œ¥3‹½½†®&ÜÞÄÒ± ÃJ·f¯/ÅMêœaTF%\%«´#¥²ï˜•Ÿ¥Âk&î’¼•Ub‘ î9ÖRêbXˆ¥ ‚0‰»—j†°ö¡9Õ¨Í2Y’â?šÕ¥9-AìV¯C²¼]‹¦Â¢«¨‹½Ûk6z\éÀ«×ajª ciØ‹]n²’Š^uºëu„Æ7Pú¯Š¤LvÕ‘t„°•9ù<µ3a1ÆsíIŽ}“p¨q¹žº%Dì&cõ¾»¤™ýŽ>R«7‘Ìn/r˜R¡eº6ö¡³©¥22“÷rH¨ªIpº¼ÝÛÊê’¤›=s0ŠßQVŽº¤;-ëóÕ8ã:¬ŸbL†MEqÛŒÕ:Þ”ßqÙ˜ó:J]ÿÏÃk¦]s¨# A(ü¬»M¡‚« Y(Î#ŠG"Zÿgªe Y ®z Ä‹’áõž‡ÍúfúúQ°ó%ÙY0éaÈžÓ ‡9_®,Ž•}ÚX¾êaH)וV¡ª\©­çú¨Å*iK…ÙÿeÚGt2TÌãõï£uv£8Vf²A )·9ØíºµÿU`„‘pô§ëkàOíb±Ê–.bì­åW-$‹¡"J¤#±‡ª|¦¹1©ìÒŸ|h–¤´L‘w_«¡q^ˤ°JÅ;ˆnÏYG8æ9Ð¥N;ÈÛ£E ¦!1ßRû‚i6·ñhîͪC©0—ÞçÌ"”ÉÉž¢\ÕÚÊ”ɬ]P…±„ÅÅÒ2¹JgJ<…±ŠúÅ%–vÜÉh”5ž¢ÊÌ­‡¿¯ªXN]#Dª¡b RѰ¶~­u™F.‹Úþ']Âã¯÷rV¬BȼS ¡^í„Z… ƒ9ˆF-O¶¬'jãN‰:‡ÃóXLÊ}¨´âg:0d©žªk0½õíÄväqDAGêî é*mETºèVO|DÁ•H†oUd¦>sÑ)™{ÒÝZ'yËMa¥ys’*ÕJŽB¸é …9ˆÎ†«–B5“•¦~K}«&h´zy±©¡,|ÇΜ;³u “¨É+ÇqÈž»dgZ–2U©Tß¾ „EÛßåÑH„àc UPHð@0;à; >CK90ÚJQsß@÷†hg¨l!n…‘M ¥¶~ ÃÂFtLg8ŠpÁÐà ,d¬×’ãK_ˆ–ÑVŠ¢»ú¦Êºà‚­!.Dk~ ¸œR9 ªÿÎ-Q0n%Q-!9%õ¥ÚC QΖýo'sª” 3mÓÖÝ¥1ÎB¦½º멼ªRkeðÙäÌPˆpá£å.] º¤ Ò¥¥'˜]mª‡õxŸs\Dàw[CøI¦žŠŸàÁBˆdTãÉ¥íXN›BGøÅs0dª.·ÙløW˜@[±D¨m¬Kœx¤M6x·šìeÄr²X©J÷¥TpËÿéjv}òó»„¡Å!Ÿ¯kÂß/;”î§9=ÐmS)¼I(µ{‰üsG|¢ç1Hëe±5•t¥Ð‡³Å¦Þ]Pæ‚8Ì:è\îø²ÞbÏ*kmá9CÕiA¦¯ëF±!æ2”.³òfú1–CAW£UH{t‡ÉîR„„I*¹‹ô)x’¬¥Ô6ŸªJUH¡ S ÷ܰžYˆƒ˜ß(øz“^®rujk.T5.ò#.­ÆÕÌRP ej¢UBUm1(LQ wH‰N¦ˆ>¸ßlH,çŒÁ‡Y&¶Ö-·=L ``3ä“—«¦– Iì„ ¹%ˆb°‰šªÔVãiMˆ ZwKSüóq.Å˱zÀ‘-þ¤•æ)4ŒüJ­Pç×2½¢H nðÂ,tÊÍhšI¦Æ¡Ja :dÏ’ ×A¤6á5µÓÝÅS’Īú÷‘Lò±2|$uˆ)×:Bå¡· @„rR "ìý_-éO~Tfr @ƒ8t(,Þ‡´.eDÃìÆu¦·ÝsUÅz¸Ä2:±øO{ëê_”Îa§lFlDžëYÐã“EÒÄíù ñšAB9cP’¾ix©@à.ÒÍZRöã5Æ]t©;ÉVlÆ—&æï&§Ø9 g‘~rêÔÒ¤K'LœšÞýÌßÍ"á¨Y/yTèu`E°².F¦W2(£ Rñ&+D‹ØXöþ!î%‚/»,ï_! a¬Ü8Påkøå¡ëW'ß v%Oĉ‚ GÙ^âÈ’93zÊ +¼4‰sR·ÛiØ£çl£¼“Ë{I™Ãâ$Í"6=S,5¾žÎk $«¤l@Ìi?X›¯ËAAœØY‚Rü„?HµA’f¨*˜­‘ä¤kä®c q…(GêÆ®É¡h5ÉR±ÄRíš<¤äÍ)QRÃE/lFÞ¤ÖµrÎñÑê$«¿‹kj¸)Fð_Σk°W #”” œu-|Æ…Tk#(»Ú|ë¥O§•ßû‰²Ë}äg8ÌB$+wpGàI>‡j¦èšÅ$Ì…"%ÿ¦“„JªŠ3Ô–àÕ‰I¶[XÁŽ(H,&ð$ÐöXŸž¶Km(‰D˜­#ÂcÝŠIZ(ÏXWÎÑõnN,„t¯ä‘. 0×ôJHó):¼€î 1’´Ï i÷¨ª b8…;­µ¦žHÜ®îìa:˜•ç.UHBø•?• UˆêÒÉÕÓ∢)d·©vSò×MT#ºˆ0ý$fÀõøö‚ñŽf™ALÀÁJ0NÀ§¾—Q„oß7PGc¤2ÙÚ´ßá.iÒ´R1:O—I†J3ˆGÙ©‘ûl£ÈSŒB²’χYŠåŒ¦"¡,§íϔ︭t~(†D)sg¨ñe¥†ÂˆPE©8E1 , ÏjÚÍçÝlV#°ŠžØy­%éHC§Å sqj4 4Õ.D@Å€aM %ÌÀ½¶`ôyÔp$ü )‘d Bñ$4…ëe…q“ƨ‰J×ÞEâ?<I«Ž¡H…=KKØöO]"" ˆéÊ‹aD:‰gªCWkD@ ‚ž„²‚æV‡®¡¸’‘¼TCˆ2rýÉ¥sòQ3?Ò †göî¥`ñ#qËU …(©f‘döýͧ7Q¥ÆŸ‹ê›ÁžbU²VÔYÆcͱB{'+ Bç'éõ²ºÙJåÈÌiˆ)ô"#U¶Ô_’rDàâj™T+$º[‘c­º²epªŽv)¾”á|…³áÉPC3 ›/I- –09ƒ«ÎlÏ¿1kŒøA.]MÙÞ!Tì’bøJI_£ ƒŽÑЋ{É´½)z1¡H+³6uQû¬ó¥(†a‹·æ·Ô³=doö]bÕ7Ó5+G—›~INЮ‡e¨šz¯Ø¸U¡˜R¬äý£i·ëËt;¸©B=ÑÔ.àj.ÏÍB2·jXÈ)?ËSXåG@†O¾+È0¶ ¯k7éM!† Í´~êwCI¿ÛBÿøÉ¨c£Nô£óòñ˜ñžòòúô³’5蟼òÕzÐ †}Ð`Q)OLc± ò†áå‹IŒßTºeœçf C"øªm|)¸Ö/­dB1ä[1?7©ö ÓAZ¤ž«¬$TœP®Tˆô[„:Ô U¦Ð9S‘Ñ·¹é¶óö½ìD^Ô½'ê°Uì¾w0§0!¹å¥c©NÞe‰”J'Œ+eèŸ6|„,Ϙ¸¯Äh¢úÝüžbx¾žUt ä)þ§î—; bÕç˜tF* E˜ˆæYY]ЪåÜ-D²ëõK“Ò˜n÷··Z¶¿î5‰’L«viÙÝÓÉýòµÕ'Q‰+˜)Ä.2eDçdi4JúŠ£$‰j’½ëD'›Éÿ6íJØÏ¹ìaHDÅ<†!IO¶ýeZ²6Nslï‡/\¸ž‰%îEÁ¦V,†Y›Ð|‰ZIZŒŽÏ§>ˆE$dѨ˜ÍLÍzRB)‰¸M2qÑYý­K÷F…‰À¯A"Êïî(¬)]‰«gãìt•ò(),R›üÛŽù´«ÕpD}¾Hò¤QEù;¢ ¨çžº€BªHµh»˜Q £8Byå^¥l¤22þ6çU$]_#!;KDD8¬GOEÆïÓóIÂaéA¦'œÄH‡W“ wtäÕê:ob’›¬®ÜjW õòÉÓ\ûÅâ%½„ަ(LÞËXÑRÅ=–w¢îEÖRæe8I7®’ÜBÓ[Š™U:óRôÒ íJõŸùâTed_I1{l]E£g É—™§}¹(©”É)¦î/í>Í.!O-Rv¸“É^®üTŸh`…aC=É!ŽÊ7ÒE.RfKñhzµ'K?XÕ¤Û°Kè ¡$–ç¸*V9 [¯1'<⺎f¹‰ŸQuZõ/j{a »]¦2MI*bèî)«ÕV!YØÛlFbøÊC¯r9^T+{é¶’¢Ù"*bÚ–=ÓŽ{˜ŒJ4®ê´J\|ž.+ª/Þ¼V°å‘AA¯I’sj¹¿ûÖªÖM¶Á(ÆÊ׺µÙql¤•LF3Š)Oͼ¹™ÄçGƒœŒZ«TÕÚ›ì‰RÜÈûžå$ÄÅGé)5Dº‰¦´‹_ŽSUè´O+¤«#)Ûq‹t×#&î*–®ESÑ«N‰†µ‹è_*³/U¨dæD’[ü•ƈR9¥‘.2ˆ2ÏC)@§ ‘/Lteª™â`’&“£‘φÙ{ïi§s xçG¤Rº4fê´jéJCÆr‘O€‹É^÷¦ÉlI ©)s¥ÂIzH#=#Y RèœV©ªTT”õ»tAeN!jÙUb)ŸYsŸùÑÚèB(·Ác·3J¨edN)ÊÍL?|,¶P´É •b³œa^´AI `ñ|áýÂ)Œù¸R¥V\¶iòØ'Í/—Ìd°¤™®)Ñ)gFŸ=Š|"… â(§ÉæâŸ˜ò¥ÕRªzôDƲÜØòii:O¶Þ§cªJ- vå1Úï¶9 Al*JªBæâ±<ŠbiþÔ¥vŠe>â°Å‘ªro:8–Ê|}½:!µ,çV"Å)Ò@¡ØjDሬæÈžzŒy•Žžæ˜ýw©I¯$F¦Fجڵ} *šd5Ô±TaÊÁt¥ô§õÈÉŒJ¸›/a’jIùS*;PÍ„)M‘IË)âîÖÅG)¢¥¼®#^γ5hß:µEªK’Æj¹ýH“±D¸¥½î…ܯÅí _G´Š} QÙªwWò#@@CCÄÑB”%•Ë´ ™ìÅ7¸˜½Ëû6‡„Á¬ìï¯Vr0‡èT’Ǧ¹ )ôW°¦Aʲ-\É_ Qò´L#X{1vÔõä_Ë-‰BËŸ¨ŠïˆeæFMô9TŽ™IJ¢›ø†b!+sJ‰ÈwçÂsO„û .,FrmÌ‹Êܶ®Û%îi…É®ÊÄ£ 1J“Š*ô‘/Î×á¨^±èéªÍ¼÷Õ&^Â\NÃyMv²™ê…3"#ÖT¨í性eZ*2î!oT]löVú“)«²Ûøu’²‰„f"ÐffŠõnöai••ÖU «®ëÒ¢Š.1.Š–©½6Br{?)ÌØqNÝ×7ŸÔÒý¯4H3TRôR Š)Sp!ª(P `ÑçŽ9LMØ{bGÛ³Ó¯BV¡´±íÒÎk-ãÌhª£»&—³j´f«ÔÎU®·N¤EÖû}û“ÒË"슞4Ì‘ýN,‚ñ*¾]!5ÿ_*v/`„j3:³ ž£LþÜŒÅ!*&‘¬E&%ü›Fë\õG¡.…5q¶úzî9Q¼µ;õ ˆ²ÌC‡!ÎŽã>ÈO> );Q”…â6¦;n¦­fý§s'oû’u•Nq"5ŸŸFYP®AEIW(Ò¬„£š›u¡œ]òk}/”¢-q«ìÂ’FI #¤÷äÚ{SÚÄ—LDç»NÿEzÊœRÔæä×;àÂ9£¶'i6ôo“òx- † Û²6øWIÚu{ :¬8BDš€Ìg ‚4•ýþ…/>­¾ºŸ?5i ¯Úë§TŠVæjühŠa‰È¤³©2V¦mŸQ(’ÕÄã*Þì%W…k©ßw$ÿ[ú¢óR¢Ñ(cH'a;9Œ×yÑÌÖGÝ)ÔÓr/wÔ•2Ø÷%É¥òv"­ ¥Z‰´üL6å÷“6P´)Pª“-§@¬sÂJˆ[(Z,”]lâØyÓL¶÷ݦå5¯§ß×ä*:ºVˆóΚs?_sY§!" EC]¹–VS•_óc`¸ú¼¿§öN[4éçOTLÚ§hY‹bã<¥¡íSYgD9ìÈét­ÏíitD³•±dHˆZ–± &žØ,óKPr÷¡EË´Êè9]Ù(¥8¹{F9Û’/»HŽº¼\Ñø‡ÖêR{W³›U‰b$©¥Rñ"6¸‰)õ¸Ð…±ÖìCÝî/©""œNeZ)¥k±eo”^f1¢ŸÉ÷d¯r]L •UDÊÜøäDWt©b’CUŠré\ɯJ§c]7:Bùjž¹®A8ž¦Ú û¬Cս׊e)o!\eÍ+œ¤‚y4§'3ò~_¦Eä%*ºj—MfçüeÍænÞº­W°…GZ?UÆ_Fu¡IÄG“j̤™b2÷¬.]9ù“Sq7i!%;\ß ˜„³ˆ¯J‰SÒDUK3¸žc-‘E\Ùèq±I!u]ùRB&Q°„ì,Ä–*Ý9æ'~îÿ¨?ðà bqZâ Xw8#æ„'êƒ5¦”t*“·WBS²ÄK˜W×êþúÌB0ëA,¹‚©›U*cÙM;¢˜’nZ¹j˜DíTGjÚ'úYñJ`T™Q  ˜ÈIPC³váB‡F.OL ZWïD½H–¾Û×ÛbH†Ô­;EE¢™ÎûÍÔ_DÐ…(*ܾ ©Z®—e Š]ÖËC¢3{--'(¦r"3]kVþFT%{èëïMn#fñpW5‰nIRbªUVÌÈšeôKoa’§uc·sM—Ózº‘ìÛVîEò;êÛì‡+1ŽÞï»z×qia5o·¾IuK]±ªT:ëØTº”É@¢¹;ð¤˜3áÐrœˆÜ¼RPÓþÐÅO,jUŽÔõ1’òD›õ.êœâBÚ÷“Zй¿&qAr.Cq¢”Ê@‘Œa„ E0D˜øƒô…¦É¯`WÅ…Öü>s˜C`ÆSdÐ5zD G8°ë~ž4)Ü Zƒ‰\­Ôm8£>AÁˆ€ÙŽ ÌLƒËØ054T w9ñy‰ÚéÒ™¾/ªåW£°Èa/+=ÊÏmP™[3 ‘‘@Jƒ1$ı›¡=VAÐ{#u*”¸ã¿rí$u!à' ƒ0Ææj²âFBˆ3‰Y̯‡¤æC¤9b …ù â9ǾŒÑ‰`LzW!† EeÊCh„`!¥ w J/,/ ”5º‚Np¥g A6€Ð– ª40Žì:Ç$(L­PQ9ñ÷2 š£0!ˆmB–ARK6¬­Zs+Ýž\ý´ƒá«Ý¹fêVîìÓ"ˆÌtÆ3Ì3†+2¾e$é/ÊIS ?VÕ¦}>ŒÙ֦׊#Trù^…¥Ö§0Æo2÷?ò)JF9ñwhíE/¦sjàêPâ! ÿµârÕ4Â?2btäEV“úØJ6Yدè'åht!Œ¼žÌž*û§o±qJ§ÂeÄjõt…mÂWÎ¥{Hè8áLe#ë–C¦1ÎGCšúÊdÆcæ%{«ø£èµ§ö ™é–éqÈÓj¯!®!‡C!tη)Hã‡a×[9iQ1PŒ]µ‰;“*%vÕßµQ:Têát·]ÙfQ;+@¨g~ãij™œ§-Y7KU)ŽÊÌê"êÑ|)f^ìÅ•²¢brmšr‚u/öV)H•Q,µ¥JÿA æˆøC{ý±’EÀ›¨äŽÆrÞZwNçÐŽQ£’b&ó‡j<ˆ˜R«yvô'Q×9骹‹1®½¿œJ%ÈYñ šA™§Óéü|ú/ˆØÊÇR"Ìå*’‡ìÈò¨‚§Ü‰"ä\'_œ³ö:Ý$—û3ë_Ììypµ;D`Êu|ũʧ1p§²‰0¬1ÊêJž’õ9Y0ÍB¾Yµ³±ùû‰R¯ ÷k¬gsXµ]ÓoQq*aPZ®³+Ív«®ç•ÍW~!©ûêLïHƒ*÷!”RêÔR;c1ôéÆ]"{â0ØÔE6‘Õ”¤[$B¯Tþ•VÚX”íÒêo{¹8ÝôÁ³L(g|oqÓd(aÔa¹Î9±"yñÉ»lºæD­kÈÜÉZE«¶gîäG* S1U‰ˆˆ3œËÅ*c/И~9 r{O(¿Úç8ç"¨‰.Ͻu‘–E#•ÒJ£Ì*~ð™KK-lDUΘèQ+½"R†Ü‘} ãGLïKàš±ÒŽòݬÅÙjÚ­¨Åêb%XB°ŒîÜ­¬v:ž‹¥h…8AUWm²I¤O&êúÐÚR"7Å¥6|l&˜9*Ù'Tv7Ç:Õ…ÛŸ‚ˆƒ2³¸ªý¬IEdýU¹UwÅ?õw­£ZÚC¹„ñjI}5·ðÊéAÖRç±µp˜¤\OB©@Å3ÿýÙ\ìa™Jk’fwGôM$y$ŸHU<¥#WäÁ=:ªáÒ)Èb™Q‰ö ŒGlçZ—KŽTDìªý粟F\t¢Es»Šõ+Ùl3XÎZÆÊò%Œ,ÿ_õÆs&á;jÒSØ´t)<á —F++÷máñÆ;!P®å[áw\Žý¾2¸â°GR.d´ËH#ÊD(G×?SkÿN²煥ûÕçT6«X‡ü~ìÕ8£S2vº½vCÉŠå™åe;Â×ÿ—jÚä+W|ár¥$ä» vM.‘´+zæcQ;ìä~œØÆ\\Q°Ù–ڕصbs9,†^%Ï÷b2õHû>6xG(¼œìØ"Œ"¾¦'>hÜeˆRQ©Âv[ËŠ©[Zm7U×0®ÜRÔŽžü\9‚R !ÒCëe•ÛŽNDÎBéé™/P~ùÕ½2”ã”e·’TÅ»s•YsHÌG²Î®M{ö3°¡ÑŽ´çEZ¬´©5f*V*«fýÛ ÃQ³ž­µN4õD~NµlÜ"¹H‚+ê’åÒŸ[JV0¥Ë.ùøÕÚ³V_Ó>/ã¹;®Ë=/Þ1ÇsŠFZ!¾Í¬X„Ñ Bu¤n#òòzò­x£þ-1ZE×d"ˆbØ”ýk…:9X‰Ú›ìç\Õæ¹_8†æ“ÍE¿[¢ÐäS¡VŽBÖÚb²5õJFe’˜Jo×=…w51¿}H*œ®Õ7’ùe¢˜"Õ7Ҹēê&™;j$‹¥Í’µÒŽ¥Òü_a‚„R¦™p´ªTê2cs´¾J_½ÚÚ\®ÇÏY]׉äF Frò¶ݹXã'©k­¿×=Ê3)h.;OÖ›zn샹Τܯ½0F " æÔ´ˆAXvN¹=HtKQ1®BרÚ!L–õŸùÈìÈüÔÚ Kv–be´»Gið‘j"ŽŽ¦Z²/zAˆ8Æ]Ñqž…HŠV;s¼œ-7#ЭGbl²É¶²QœAXTjZû]2ôQŒ\ΡZ͹TÂ-Í¥ÜG)Ì«Uy<±i\JŠ!TﯔGû¬ÓKUfeÂÝ=IFG* ¸þ„DÄäZ9¹×L?¡u”.P‹Èܽÿ-û4¤B–¥¢;ôG8Å;++õ)uåvL§Æ‹eTlY?0Äê üݵ¯›$õ7“õrö]§±]Øû%jB‘Ò«¹­©èå1ôbeZg0©O骼c9Çm1¶¯·'»ª'àÜÿøÉˆdNùÏûü`ý®þËÿœ ³“-Œ*Ε’zÀhÊrJfÅ ¼-•U $¦×¢¢½±Z’#f5ÉæÁw©î°ÏviIs 1ù¹ ‰v”Õãëf)Ë1¬îîMÝÄZ¨*Ý*ûÅÙ¨Kg ïR婚}! d”×7Aü™ÿ«R8ª„tÔÁ\Ì„,çÑ,}Zj­lJ‘c8fÔìÖÍ'ÚyþSŽÊ½¶–éçX‰+ ÂTLO¢â9ÐU› £©ªŽº3L4áp»Å…yY‰}z(™¯TÓÓ¬<Ã̾å(#*¬ûÂîüy«û¨9[4M.ªÌ‘„º·ÚãzUdë";WØg8‰¦V.7¾Ò’ VG¢o-(¯¨R1”Gæ a«ýt °UŒâ5"H¢U~šZýdyNö/ÜX§•RRÕ¹R²®F ¡J.KØ0±’¨BN¤žÕ6néfmS#Ø ^D±U£Ôö\úT±@Éb,=ËçSHIirŽ)?ÍR˜Ò‹¼ë— µÔ9gy[–¥âõ˜T ¦dvÚ¥Ô’áLIñ(ôUih­Án!Å,`h57–Hë8ÕóP]ývcÇ9ØRÔZ„aÏ/X´%h¨hr‡êÌ#XëpƒÑ‡«¥AtJÖä""Ý·~sá´Í}a¸OKQŠÄç›Eµï(„r¢L%ÛxwpÅâkéhrq¢äØšñ„ÛãÀ“Fƒ$BÂ’¡î°ˆ·c• À8ëøg0óÉs±2в”ûHž¢øÜ%©3ò¯©yÎ1œçR*Ø‘ï\B QŠ’ É“Óè'”©k­É–0Ôøšµ†rè©zB:Ú€EÉ#xˆÕàd9í"%ö£kÅ`ÑžÐy£eøï-|*’ëò0AâÖäªÎÊÚÍœÔ=÷2J´_:øâXnäl(žn~(ƒŠT‡Ã4Ÿñ § åz°^y |!”å$“i¸hU %EÊ!`p h 2?øádóï‹(^·¶”TÆ%8×,šFV‘™ ä\áHˆ;wlñ# h—–ƒZ¢ =bWÜ"-E.E ž%C”³04Æá8ƒP*Ú€F$zÃQIRÄ€ù üæò<ÉC"Ðr»@—·×S˜•„Dfˆk}Nan3d¼7“–d¡¤DÂJá–F© –8¨dp“–[ž‘­d{ 9æ„í]§ruˆä_dQIozÂ:*Y¸H‹2·®'»²Ùè se'Ò=Ny72ýbD÷”s9(Ô7H‚”PÊÐMC ¦Kñ¶“)SÄtz¼°×éŒiIƒT”Sí–`Ê8rJJ1DR1ݳ!ki†}àÂÉ "ØŸ"`¶bŒÜ !„,I޵hgñ¸’ô¾j.ƒ_¥¬ös f,¹ƒ „ëÄV­qD ë¾å­D%AªPPT±iÓD,£Ž× ·Í 4ëbŒæ b¦QC4(rã ¹¢|ͰN ,¡Ç i·ü¡–䈕9Ä3×/&ŪÊã væÝ;ãçÒ¸@GÆ&1+´ÕuðO+_0QÄi×7¨`TQƒ4\ì‰ÑŒBJSK aZ±¶³ŠÆw$Óè´`ˆy*-ÃR’U*ÁPšK—èQøQF`àÎ5$Ú!deIx~P²&¢Èö¡„%ô±bŽ!HÅûÝp÷HÁiÞä™äJy­@mÎ)lbK‚ža6¢àŠÌPw¼.F$ŒFê«Ù\S if”|ÑŽ.?6½RF(ž~RŒ±D<¦ $; ¯{fõÖµ³¤¶ŸÈ*!:š$ÇN qÖ¨!Þý2…(âY”´åÑ?D‘‚„]bÂkE„¼Ãƒã2³Ímˆ¬‹ß¡ pÅðqÊ%8¡…㕜ڷ y£R6p(:$õJQjUŒqŠkM[Fõ„+˜]-îb`ð&ú×€L€ÿý{BÉ’\‚Þ‘ßʆj«¹üTÑ„¸»ý"”2jæw>^{·Ê­û¹ø›ON¹=9Õ ,…Á †fe¶¶yŠ2HE;v–›j7rž¤âפ›’²©U>vW¤QP®fÜÅÝ÷-DW0" FdÔ±TRö¶ãʤâÖÇ™}OÖ¿7’‰©B¥[v²D6Í(ŒðÝË¢Är65·§) dUÇͤQ¦lÎÕóÌAç!9ëÃa(Û˽ßãÜ”rHTdöîÚ"*„JËË—'XÙ¶f¡âÔï§cȼ´ÌýRÑ7îÂhÌü|ÎQÈwÛü…©ÑÊ«tÞ'i³ëæÖ~%D25m÷¢¹lNÑ8˜´"‘_'Jq&!.¾MögS¬F';'³„A d ï-«òat‚Ò›MOÉs4´Zôþ/>+å$-Êç2Êf©QÐP¥©Cé„ÌùªSTµL¥ªnë+”Ò=7¿Mí_'nWÄúéOUÍ%¤^Vµ&9ì‹ÎN]-5<®e7Ÿ‹Œøïž´/#ª{·&Y´G2iGöIÜéŒ~îRQª¼åÅk#¸‹‡‰µöy ´[3lKœވ"~JyÊ9WÉW¹’7†,ƒæîbÕ*Í"kšÅ¦¾–Åæ ìRq7…,©.OÍ㸈Q(-pú¸1j”% ά¬n(šÈßj¬…|m<‰³«”‘ÔGËűÑ"=Ë· ê‚¥FbqÿR sÕÖ‰Fß"í„«9J‹Sú*V¤½’™“qµÉáümÝ*;:ÈkÈñÂ# Æ#Æp(ƒƒchP@PÊ—°EëGÈX* hfaÅd–;ݲ>Eµê}yŽÖ‚(0à˜RÀ„7¶ÊBŒvB^R…ÜNˆîAÈsŸ“Ÿø%3­ja¿Ghˆ„@™[@* AÝ`· `á× ‘" @Lœ 80‚†è2´E‘Д$ÂBÂ÷çêÎD¦)7‹¹EEHÁÂj#QDfvìIçHaÙÜý;†¯àµ¸ÄSi K±Ñ‹¾$Åã&WŠ\zi%Îcb3„r`!1ûf+B®°ä2üýBãX„‡Ù £cTPl !6Ô¬p…¦-l/¶’NF8Ü&µ”§Fý˵lC‘­¼Éœa]Ùp[6Ҩ䱙” º{ëT‹B¥{>»ÈQ¦;u‡±3$!”ˆI,ÊíægôªË#ÌC˜Š_ ‚­Å×››ƒ ÍQ³bâx)Ý9±éåÔsh¿”±·'—ÐŽZD°Üìµ}¹|Ö…1³99tÇHÇ@Ⱦb&i•ÿdc!fd^;~"}©µP¯¤„UJ’¨D”A7Çuiµô•‹¢¸è‰ÿضSÔš Ü=º¬¨¸¤u¨DÛqü#…R`!/BÖ6ˆVKÊE^2 ¦ˆ«‹Ò/IE#V¡|år6Yâ³µJgï¤ÎP¢ó[ƒÙ*¿õ…ú¤ŠKPZªÄDÔ#-k3ˆ" )·ÿrGˆbZ1¹t•¼¶¸‹¯kõQÕÕjº‡±T0˜𯘬‹: ÜÂ'¡5w–Ø•}ÀÛÅK0Íh¶.=™ÒíÌ­×(ŠõºðÞÌßã# ”93{ž–F©H§}|[s,D«4¯?õŽO#”¨S¬¼g§„|’L·e8”ž¤R×PW¾zE]$k¸SDª×qd@…95©#c—ô“m!)[¹L$…3 QKi½FצÄrSÅË¿üKÝèd¯È¢œI;ô÷&5¦rZ()Â1fYÞaGµ%Ña}¬’t¼`ÛX@Ž[wXt•o†°E£šÎ+5÷j8æ.™!%å¯ùÇrÉ™EÃLU4’j^BÿíL_0ÁSH©ÜEdAÚ©ÅyÍI"í~ùn-È'~ìöuºœ\³†-%©a†vOôÁ;,!øI0¤²ÙèJ]ºRmû›}ÎYq£ …2ÿN¾¼[q‡I:µ!+%›§æ~aݯôc]DÛ£­“ÑqÜ"WÍBó™ä¨¯…[ÒmÍ|­&”îO$¨`­ã•äH•þ8!Å”%Š9™iôØ]É(íTOá‡}æ²öb13† úG§9š¼S)äJHÿÓÐÌɤCR˜lJØ‘ ï|#<አ.·±‰œÔe¨ËÜ(±)Å©hô´Š;’N›9V&Òb­WҵÔ„O ˆÂ¿ _{þ¶«=5#*ê”»l!:ú!Z»çbÕ:i6aç{Žj¢Š;´±­ŸZI²ê"irv•ÿT’0…j…%I⨎Æ:~X†T-æ—1y0‡šÏö1R^‹¾£#>9ŽG³¸Ž]=ù¿XÀ®1âWÓ |»S7<ÓFPˆòÔU)O§ä±Â“B¡áä\3jì…²7¦©+Õ¸¡5/dNl«3–ahr£gC qnÚÔ‡8î)ÒP”©è-*—xš¡¨ì„Íı¼ÄóZqGGCvœ*­é!\Y’Œ7MiLC®ïÉ‚ýð¥I$íˆÆ9LeÔ*J2aÿ«¸a Ô)¡iN•­-~)Œ¦œÇöüf¨¦r1œ—ܲL£ 4ÿøÉˆeNýûÿ»I£²W³’å©¥Ç ù(ºúX†uV#a>â[Ð0Ÿ+y¡D ¯®MÄ[c‡8¡tñXõ–’Å™hT™‡¶rqbH÷!ç$Ìgª¡+ÑSZò™(úЍÉ^|óŽ^yXãÁnŸŠémyZåÆ>ÃF¤“"—‹Á˜¢IBBK„%ª„J¤(A«9÷éÛcŽ%¶¹’¿:åw¢ :TDL–S„aˆå²()•­9ú7ÄXÇù ¡¿~Ë6˜Åàê Ÿ@bƒgH4Ô. ÆÑyÜmK}ë§ŒC´c’¾V5¡Ò¹©ÈR8)˜Z2a‰@öbšÈ zlº4MŠRZå%ËÈ-D}‘¿QgaàÆ¢o \yN ªòfWâH|‰Z_âUéÝ̈1ʨ4J5EB|Õ”ñ„IÒe{â˜áeÿÃRD™ÂJþG £c<éçç ‘X pÀÑ8AK (_—ŒJ"þ¯æ ]v,˜ rR#1–ÙaÔ‡Äâ‰PN^rv°ôÒŽá%q À `€·’s7d¥‰øcñõ«óýÄÄLiØ0¨D‡ 6cW$c[©ÚPÃzŒãë± c]û×EzÒ[¾#•*ôr§è"HÏwR#äÔ59â“%}Î,NæLÕ-u´!ÈDÎ =£«×6†§—ž™W¡ìR >[}”cëÇÛ—Õ NcÅEEÙ U_7'…#)åA²~ 9Šnè"[ºˆ…f/ –© @Œ"ÐP y´@¥ÂŸgµD üoûR³Þ§L‰Ît!N+o” ÊR\û-źXäÁlé#av't9"K²ÈgåâTüDö9¶µ/0ã ¼ZB‘²–,KOí¾(ÒPÚ’`—,ŠÜüuRô¢Òqï4Š$ÔS‚Y»æ¤õ,)Y{ÒÜPÍ€^JÒ$üÌnl cD–@¡Eã34£#Š0h´Û¼˜+™Ím×ÄR5"ì›45v‹-0$E*yN»Ð!¦âØ"íIR=‚d‹vš ®ÍU6+mö”µ,òu¨ íb1€ ÊöT–¤sj_žSïžQ'—éY䣨´±hìFnÙžë[Mfè[šì;È"­'å§’3%.bM¤oO@[–Çå@êD()Ò@kÎ)ó¨|ÿ½§Á"Þö`¤Ú+±§3ûF;¬‚J …QDQ›bÎ…?¯{0a:âIR)’¾|°¤‘IaõÏ3˜¾@v qå¨soP€Z™º¤ÂM¸º;Õ²ŒZ) V4ƒ­æ&”0˜…òP‘&®G²EA.f:¨2ŽJ¿DDD×Ê(yh}€Y#øs!#Œ9† á7nÄ·¡ò%fZ.’·¨¿* (Ô‡¢g§¨SP–£ñŸ%ÝK;X­sÙ³GÁ׍诪ÿh“ùM¬"„v+Ã<Æ)Ý4}ôgBieÏ©r‡+ ša9.ôJ¨†-Jóæ‰Q[¬:!FdZŠJï­5e>È%[›XÚý¿›@Åö`Ë‚Š)ΠÓhuGÆK_ßý¿Áj>Íó«J«æ°¦#ŸŒYÛ߇êµfÍt¡³(šÚé]ÚÉHåÖåcÄe_Z‰Î§ * ¦!§2áaäuy=ºšÐþýe]™ä›_5‘ä2HB…Pç(’R¾Ñe¤†ŸðrûE%C‘Pf5š©I†O÷ ¿—’4@0@½ D%‚ŠeŠÒŠ–é}>”|ù6I£<¬q_gçá奌4–º–Þ)I<ÄÖÑÊ@Ç3ÍJ™œs8ÃÑ)9JF&üÅ…š©~vº ¾r…ªnëDÙê}âç“W*ïÓ •n Y†?KœÓŒ0ž÷¥x† *J„“£=.Ë-2‰É‹]|MWÔ=MËÆšEbÎ`çPpè.´å8›ÝÐÑ0Šj[ÖÔ­ëAˆ&îF¥1’®÷%Ô"\2àÚ¢[¦ÈÂ)=Œñd>Á'Ž › ¼]™9?0´g+Ek†[ †æIU=‹MBmÿúù\!쥪§YK©¤l¤Œî8‡p¨\ª {"žôÑèáÊÄ•£9î×7“L,Äë5Pªþx,%g@½)Ì×ãs˜`‘Å Áæºá/ê{DîÏK¡ˆQ5g¥²+Ë)¾õV/];”ä3„ëÙ"ˆ ËÍJëÑ3µ©Ûd/8I‰%¢|\|tÃ’bCŠ8é™ìS¨¥~ ‰–ÞÕÜy†™‹S凖>H2¿ØŒ¢>M~ù—¸õwœdÕD­…¯”^¯¦**‰ßÔë-E¾—*¤abšS…ÁÁÞ=jp›tÐ5¯@NuPmÓM â8•óJfõ•°bÂ6E\o9Ä tÎKŒ¯¬¯_7CIR›ùZÉv³g¾¯¨ÌÇ;5\#BÝæjÈ×5§ÆÜ3ØöÅÊuRpÚ/êZ‡ Èòu‘ùœÖ›Î’³Î@ª‰dß¹<›wvê4äØÓò¢íDs’aDe cÍ%صèÓ}øò•Ķkä¿P¨ñ7µ,¹”×'§]΄¡}dˆZ“IÞD!XˆÄN¨dtÚOX°ÒÙdZQ«0‡)Ät*³˜)”ýZ+ ®]%UÓã%ûâEØT³|V»šBK,üîÃí0eä"¤W ´S¼ƒé$°[“*›Ë‹…õå%{Ô”%ÊÑ1øA4!@aϲÔ17nÕ©4†¡­ZM)7%Ñ7s*”;‘ôÆ#¿iÚD͹‡™\ØÈ_%{ébJj¶[?™j߆™U—ˆó EŠ )ž}଄eÁeª÷½([Ý*3Ña4\¢ëÓ3,  †:”®µ"'öÛ°ýoÎÑWöÝ]˜0ñ†YØç-µŒ¨M“_îÁ¥"°¦ s…%d¥ÔAï£^‘ª¿«"6iUòÍÌ7›¨««Í”ê%¥)ˆB²cG"ŒëMo#"]jǤzqm±äƒ~Hòo (—P„*ˆÇ:9Ìzml½ô޵Õöš±2Y¦ d4Vû‘{Ðápùè"ˆò¥ÅaHdk“·‹æ¢óZ‹­ä™éía¯Ísd“7—0ç(âŠQ0R¿f’„ÒéBe{².‰µ¬«‹®ÖSŠæ%®Ò!ÁX!µõÖ¬ “_)UÇ»bÍN¥]¦=GüäâúU¨¢ŠP¢MðÌ" ¢ýísÛ.ÐŒú¾~Ÿ´¢Xj¾HFˆSŽƒ!N}M¦íîKjn½—¦J:7ÂÒ¶s3*¶Œa äa¿·>RP[íY:ilJ°õ¸Ÿaú¼Å–aÛ°NÍ )в]©dÙ$¥k"“-•b_͵èØà¡ (eÅ Šu!VŽ“²·ezÝÔr$¼TþleÓCu„ ¾È›‚qe @Ü«1Ú­I»Ž‹kv•îŸz2­§ú…2Û XÊýÒ9Ž”FAO©œƒe"õ b-p•¸–òX|Æ=ûÄêUt,ˆŠr)uŒwQ¹­!;L~ëaðW"t¸ÜÒHœ”2‰“جÆßŒ!Žbg³b“ÒŒ™rƨBÖYpTãüM ÏÚ±‰øå!Djî^ë­÷qFÁþ÷(š6+»—è‰óçÈ"zP•¹^ëUŠAßÔí®ˆI•~ô|o6öÆ^êÛ+-.6o÷昶jœÛä!‘2S„1ΚÕΨƒÑÏï²æQ-j»¿ç–DkgØaH„b”…¦£Ã¾•hFVruÿÒDyéÊ*å/Lû·}"%QS 2®vR¨ü^ RQ-MµL¤Õ)D×­¥56æaj™fvÏl"c±GA ;rg×·øÅ¶Ò÷Ÿß=u«Kç3çú®o.‰Ý˜WufLòÇg‘jžaLçpž5[hÍå2ÙMó7òk+æŠC·IIwˆO]_-‹Åâz´y3ýÔ_Ÿ’Ê„ªùNòJÃܪteê™fb£Ì§)Ì'½W_•t¡m„»‘Ì£ Ýâû&þ¸È"]r¨”%L”K.n/’µ¦;¡7}D“¨[P/¹#6{UNuC¡ŒÎÔYTs"Y¹ßE%B“¦¼½Ö£ÿ™ˆLzoߪ‹D<ú&f1ìçíÇz¯™cçªAú•¡Êȶ"z%eeä+dZæ*Ù=(Ò ¥SþÐ–äø‚y¢#fâmO½'/ˆ*é5Ìú„)®fZ¦üØhRkáä½9”м?Ùµ–î_tócƒ©|K=B:­—nGÉO“9„ë# õÂ}^Ä©*»Ô’c°©ËDýd],¬GìÑT´i g[…ÞÍ2á*·9û¬]úÈLõ˜ŠèââëyU9nÚ(Š‚|©Ô‰¶Dùkú»NڧΗùLþÅÐÌtŒc”aECºJ! ÚÞTJ’ЬåûåÄÛöÓõX»”93lš¢ÚdÖ%NÌšd;ˆ«E®;ÉzjcU¨®ÚGΩ¿8áŒä)ÌÂzƒ0רÌjhʇáu«oÞš‹Ë­7¯a3°‹’%Ü‹Å.çíŠbQGS713âÙŒ3be¨`¨éŽ\Fr¢>ÜŒ"”äz;ãXFW·fÛËÂ1*J%õìBn­)h´!XºI†°Œ!òÔtÝ"c`ÎV¢‘*ÊÕ°Žt¦öí0¢È?—PØí"ÚTTc ^©.ƒRŠf{RrPŸC+Ú|y²Êk&[hN¡´•u —2²¶å(h£3È£³C§‘6› óa ¶¤QMùµºaÙ}±lÁX£%‹Ÿs©Ëk¯f‹bM#RYôˆ‡˜›$›˜d·0ÅæGViò‹0!ÄÂÌ•zrM¤¬âcä6åüŸ.¾{He2)}Ò,…¾ŒÍ\û¤Ï›"©ëf|5RäÜ’«U•0Ö3,W3‘§gñ$0ÎÃK´§¹PÊ.¦-o´f‹úͶݔ„ÒË[_¼!ÓMìDôV©Že¢xæGï¹ð… ‚!ËÆËì<‰N͇Gñ¶ÇìF:eñ*©i˜Ì‚ʈm§Ð¶L)‚f‘É!ê¡?øW¦‘LúN¸­Ã»_º³¶  ÎÁ”žQuȪ}de²JKÐnµÈ){ÑÊûDqÄ¢0”âèéÔùØArºù7z‘·= /kz3fŒüùˆvrXUC¯¦Ü§u*W­—^]üö¥IU^cüœÌÆ7%I†¹ ß8…r ¾ëYbS r¡ºnÒµ17&ç ”œ*T‚2]îã5AYåËU„£)´7¨Ô[âñèé¡Sµœc®ŒwÁêW¹·z¥Õ'¬šbà’ÖJ;qK=ùòJA{ŽAHÂwœÂˆ”Ó#vS3uf*VOûNö>µ)MÎ&>y1[êL£ð¿c-…Mc¦—QB’fØ"&˜~úÕ\¤ªädJºß¶ê³§ªRÓˬ”)h˜§¤ÍGlÄBÐÝN!Xæ®"]¢2%æˆ0‚¼Gc5u—$£d‰Cwín†Ù°Ý­%Ø®ÆO³ÊÎ2]èQf/‘ÔGwÖé4õ´Í*öµïO©(JY †rNøœº)Î#©$jí»ÒûGóMqèW%6Úùæ2˜â2!¬”V»Œ×ú÷}ì¬]kÓ䙺©ÙJ:ÝÕ‚5™«¥¹ä1x©†S¬b¼Ñ)%j¾DJ!œ,NÎ6Õ%:¿"¹ä)H^³ˆFa©'H‰ c ‡»’ Ñ;jjÔè) aˆ#Þ‘8B˜H5(öVñ„6~+‰:®WTAŠdf"%9)ŽÈ1Ì| A ã ÊãŸdãõ)DU2R׈0PÏ@˜ÌÕ ÀÜé²3B²ðCs,6rBÎH/'Ç"±ˆD0"ƒs|A‚°ÊaQº° oŠTùj”GÈ+ôpÒ•oçd"šácöX€$œ[:ˆ”10HnåU#3áaa 2T¢d 9·Ò>ÝÆzŒñWvHQoX‡\ðEDe³ÌÛ^ ‚0&M•ý&ÐrRžç‚š¸dQ)@eq œaÆ$ õÄc2j†˜mIr9N@æ(O)Ø€þ“ÿøÉ˜fANþÿQ?¦ŸÏ¿åñ£øwü2´ ÌÕœŸî8…ŸÝ†|Ûýúéâ.›Uæj˜U™dt1ŒŽÍ&çP®.öP½sÑHaIî]æyÉzNÌdâ¤Ú楶×Ñšå§ÉÈvó²2rR $ªòÇ,@‡!¤‘ Tãâ7—qJ›óvûîo¶kO.½vWg}ÊJ²©¾"ÕÑîÅJ.½Ï¢ê–Vî5$-<•Ê-Ù{Þ”£+LTjì“ZÅU%³£2µ™Ñ?™NIJj˜d&´¥–ÎÖŽÞ¦ºó)³éd[­„T*X‰Î'®&S8ަÅû 90ÂU³-«ÈF)3?eV˜–!QÙSWá\À‰Ô=9=™9ÅEzó=H-:]°Jœt¶KÒó;¢…S’¬ B äÎrëê¦rõ‰M£SœµM´¿MÛ&–ègM´”ÙܶŒQ]r•{Š&Ö®0É)¨Ùq«~ÌsšÇ Tt_ÄàÏÄcb¹ª·³®)V®"—¤µf-»z¥(m®rççmÐÅ^Ñuœ¦1XS» ‚býÌ!Ž8²u²ÅyrÆòm c§ µâ£¸ëèUÍÑ3­Ï¯JöLRéZo_TȲ—v‚YøÔ#TŽA¹KrÙ>œD ÍŠzÕºÌÎv%]*ÅϾܢˆC3!Wìîc:L‰iˆ§¥©ÞÊøÅÕ&‹{KWc%¤¦µDD¦:ŒûßÁœˆ„J…z-ePìûÞ¥*’w0w)¥¶¯µŸM–ÉsòâQ‹“}bûHÒ*æ«‘%\êkP ã]ÒŒËyH¢2êh¬Ï–Á0ßLŠõz_?Y+Ý"9ۯ⌇ôR!RˆU!³s]Y2D²M£íÙ\‹—,Ï¥‘W™eÒ‰‹ÄsŒjÒ/JõSb¡E%+_ÆlÆXƒ#b)̧cxæa C˜ge/¡2*ÌC½úI7ršÛ=m–#ÔóVŸiÉ‚³Š‡B¼„R= ËA‚¯4›6焪[ÔUÊ÷)(ý`BZY"J¢yˆrvÚ¥"x›d:ž´ÕTéâÒ³íªOr½»~@Œq*²Œ¤ª ½²ÈA=7Œm£%†¿âÈP¤Î¯(¢<–¦Aó¢•Úòä„'‰É¦n¯0¤w¼OK †^}šÊ"LL¥ížŽE ˆ!—̸OÀ¦9ˆÜ¢+"uNK%?Êtp´+6÷TCm?µ÷%¥æ|ÌYDŒÌí#%E"¦êUʦÇARzÿø¢‘¬Øt]ÒÔÌÅ?ï§Q’اÎü!?ÓE¡2ù3ЕѬrÝ‘*0ˆÌB˜Œ´±„ Äo°ÖQÌ:2Û¾û$–OãÅ“1H‚WÅÞ킱 R„„?½Š!‡QH"n?<ŠN÷Ú­ ò¼6íÌ|JTŸ531ñ@Žw“óÊñ + 9«j¾J}£±VÆTé 1œÎÞ¢&2sP‹]›¿™Ò–¾®GË}ê³g6ˆGÂW’ï†O(¤+zçe2e0 †rvìY‚”ç¤Òù 1~—êÑô”C¥-ïã&j¤ˆtÆc%>zTáW?ºP©é;ŠÁ©‹p@ƒ!+Bql–¨QÔŽl,ûÏæ!TïU(§±«%ñH‡“.²>ÖSˆG”3£ML©Á–j)5B‚¥sØ©NÝ¡’v¤"›V|êéåœQ†2džmÕI†a±þ¤§9ÓpûõíÖb¶Ÿ2Ùu¶êMÖõ"’Œ´b!z«£µ ¡Ç]i>Œ2¡|¶eÔ|to¾b—Óg*®Ï„ª{óÄ!/ôÖaÚÌä>4“òf`ª2&Øùî¨q1…W…2-™.Ø¢ûe¿ÞÔSÔ¿ÏJRLžÈÄj¦þsâQœS…c±$cˆ 0Æ(Þ²›Lâ£DŸµdJSºkòïU™ýúÞÚOy â¸Þ÷¦3Î"HŸ)TGéL…#D¦¤ËE(„ ™±H¤ìÉyíTGê @)M6-Û•¦!<²‚8D(ˆˆÌ5d@¢ 8!A3ûØçNø`á V,í˜j2qǧ %n!Ì¡Œbˆ †""ÔO0”ÐWû ¸Â³óŠhŽ ¬;)HâÄ$dTHÔ¤6ÊB'S`Ä‚aŠŒZô zAÑ.j\p¬Ü0¦Ì. }óœ°z·™²ËO‘@›³B’%0Òf0ÜÀŽL¢!Ì9GÔÿ`…c–•N䆊 ÂÈ00¢6ÀÇD5‘0c12¿±A)㼊¤Î#±E5S9… at+Ä<@W saÌÎÇVEcƒpE„)±( ¡`B‰‰-…>a*lWp* ùŽJ')OV²"„ð8&0Cˆ¡8 G"71–ðn9¬…åí†Dkqq<'B… uª$,Ë¢uÁLî˜ÌÄ—«ìÊ6&襪†J Ì>MŠqŒhZ½xЄ;U!Ÿ¼k}b10ù‚ó£ Æuh Aa•ð!ð°ƒa¿@xb ÉßæCÃ3¶ˆ¬—!3Td#\)ŠØEA " -Ìðnäœ*IUª+q1.“Šj`Jf0¢¤ €ˆÂ@’°Í ¥aFÉŪWõ}Z!ßÙÎyj#´ëŒ‰Ì̉ÆªäÆ„0 &b‚ÒÁ@„ÄX¥BÀ»a(–†`åêÑc”Ð+ •8Gü<¼/Ì{þûïâbÎI×J~~ Òƒ ì`0–œÄ'aŠ’”ÄvbÎLVæ%˜ç^­—c+“/ —Ž"U¬8ZÚøÖ¨È²sikWÎS‹uï»%è¦>')p-ŸŸûžlÖái1b%$§Q¤8©ŠAÑHúâQ²…Ú#/èñá«R‡§—Ħ•sj!Väõ8p¦~ˆQ^te×8˜_[¿àOt2æ®Þ¸ÆÔ§“ˆÄr0`ƒ*,G!Ä¢= Ïô%ÄDJæ¦æ•}é/m?¥i fsÇ"¹$dÚ½Ó.-ßÚ7çu3œÆùÉÏ2Hz¢Êj›EŸ;n'F+”E8PäTÚ¥Ä&v[+{ë÷]zÍë­6">Ëò[0¸ŒîäC銃 r’޳=ýþ?hæB;(¦Uj‡Z|õ’,šÇÂ#=4æ"ÄÇFÂztí ©Q·0¦Eä™­¤ã­„¹©Ä§g‘ICj_¡Ê¦ eK»L=…,ÂÜ®¶ÒÑiÅæÔûϼ7½Ÿf„HE¡×ø ‰TË%ÓtTÜ$V£Ë¾¢HYa x·!çµ—G–ì·q_ÒRTYŽ(¤yNTÅM¡ê÷QwVê%bð¶á¨noÞçAR”(©¦°Uˆo?wÐ~RÆ:¢!M“:dµ-Ô Be—W‹äJ¤„#±D"yÎËF¦Ò˳dùÄ»YÖv¾Cù|^ÚÓz™ËÑ Âžá*” öˆ~ôêÒ©MÕç%WÞ¿/ò˜L-Ô§,‹˜t}–ÉtÁ’1…9JާT3ij“anïRXŠŽ“š¢ú›Í¤‚q2ÌU Ò£•È|VÜÝ8FêzH¾ˆ¶¼œ‹MÆT\â/‘ÇÓe̤ξw^V;»vR’‰Jš¬õy%ÖòKôÂ’j¯²„R®1ŒÌ¦0ì„£“†\»LOc©‹ãÖ-§6’,Ãm¢ØK­Ø­L¢r¸î)„Qɘ]ÓN×)Dj¢‘rþK$õÙ0ÉåB(í+]gµ¶š¶z&åº.*dÍôýiþ©ûV•AD÷É¥±ŠêÈ‹¬ƒ˜º'é[uqŠ×ÅZÉB<^EòesFJŽ#… qÊ)«tBnû"hëɇO->}ókízÓQzÉòkÍU¡Ê)R3±L¼D›=7¦)4òœ‘¢gîþ’V ; 1XÉÕEÖãÄ}±®ˆ™Ú#i¡zØŒbý39\$é)ì„RúHÌ+7ŠiR¾¾sõgÈ“ …™·«@ÓÖ‚¾®¼Š„b Æ!Ö ‹†Ùß‘Ÿ™n¥;Ä—¼Õÿ]¶öÏoR¾fMÖ²R„)Çgd!Š´]m+Ó5dC·)”ï1½i(š—û‘jTï´…ˆF+?Ø^n¡.Ÿ™T²iIÝ&I"g¢º(™"}‡L´¦Ã)L•v)ôægu•é™SÐþ©ŒM£çuõ¿ØjõõÐŽâEñÑÂ0àBÖcJ”¬ïb5‡25—*Ÿ%/ÿ•¥‡ÜŸu¿ö„R²²P¬#Ž"\nb÷bÅB4—;³5•s7—0¸Ê#·)P¹²;œµu×-U8¨gÉ¡vªJ ØeTÑÐIJÜ×,…Z‘dl})•j^5Mt:lÇÚŸL~“Å¿ngûÈââœãÆOH¡SÅÇóÉí(Dk-—×jM—Êj¾ !é”ó=‡¡ú©"Ô¬R³¦AH˜|ÊPšøfva6Ž8íSâÒq0‹2ÈÜd¬‹¤<¬æ-ð~³±$9 ¸È.2–jgè¯Ë…LÙdf*»'~sÌbœ×W1j´:öµh´nê¬CÝ÷á˜%ŠY7¨]u1•âdÃ$¢Že1q±g:sñÑÌÿj÷öÉ¥z ò]xY“¶%Kc1œỂ:±Õî7¦aÉìOEÓ¨†,‹žÔÔ$å«YÌ^Ã5†ª;¾õÞ]1(s!Uvµûu¤e1;VëeªLZ"7¹Ýæ%4¨•/¯'«-•*F«úV¡¤M³z' ÿ„æ§v¾âÚ„)R2ؘ) ©C/XލËZbšs3Ý8÷Bµ¬6½©ùB<ëº;¶QÈôÈFõRuQޝBÚ¤‘pˆvå­ G¢­Qlªå ÂÐÒÅÊ‚:…ì D0ê\î‘ÁF!ëô{šéÑ£ÙDúUx¡E{ìN}_6wûŽŽ†AYR·!ì ¤–Å2nµªúTq‹œ®Å³Gªp„õ'Ò‰™žíâ/“,eìAý Q¬Ë˜˜ä«•HnK4²#QFRxs-ÉA)¯…=Ÿ“÷÷Ú„K"÷î'Éc’âeG‘Yø˜Ô±Io1‚Îó&ˆ®ËMF»i)K«oµÒ˜å/Öã.¬ÌD¡•ÄÅ"2ÊõÊé°“/W½lƒºÜþœ)_”DOF–”è{€…—n¨P…SRbŽh€¡Zé{Ñ¡'¤Úá„'lœ‡(«lúÿ~ÍÆo«ÙÐdœáFy,ÃÆ3“ØÕ}JÊaë<#é!±¹ô„Šõ­FV¯)‘÷RyR«Ô\sUœµ}9Ž’Ð©c¢a%h²'­VÆN¸U²U §(Qœ<õ”„¿•kÕ=(È[ÎTãÖ¬CWÍBâ‘çÑW{%”ä–D²œÔ+qúâp–I9SÕ•+†uz  ÿIᢠƉZx`PE¤Xø!ÏsËÉdmHˆVxxÒšã㇦ʓÆÏ–:ôQ“€8P<g‚É“¤œ'R±È"ýW¨xX@ê.ìcŸr"‰ƒÐ.0QÜÆ¦ÕC,‹«ª‡er-fV°¤’„±eˆÁÛ†¶š‚&:®¯oÌ]ïEÒHŸ¶ ÿZ9 _yÒbö ¥qV%ä$<1 9€aâØ«\•Õ’Ô-Q 9lmÝftTfuòËr¸á#.¥ã)Î pbHý€ìaޤ­ªøZ1¡å‰VB8å(_鿥(3à <¿QeÈC’Ì»vX–Ú  aŪbˤdCÄ–{Ät@s˜·(X@ $j™"öÓ˜‡¾tÀd†èP‚ìSIµjZXѾ5AŽWF¨F8AÐÔ¡%}(>Úõ¡Ì<¥ÐÕõC8 ì+´}¬­Ý”3†›0¤$:Pƒ)˜ñ ÉÞ«‡¸cY¤Øù$ö)‰õ¬$,yƒ%þA€€‚£ÂŠè=Œ•Ú¡å;H‹8ˆ% Ë ©‡ª!ÿH÷‘™ÊŠª2½™žR[sIãºRjo·„ë…)­¤ uBÈÇ/i+)ƒ ËÁ‘‚b„¨õ~>[c³l`Ð@Ch}‡ˆ€ÿÿøÉ˜gFNþÕšÛðøûŸýµþø´!­"@aêø‹?íO«›„3! @͘$ÀB³N³Ì¬3t. ß™ðŒ€éÞY|'>tR˜Ä  ú˜#—ÃâÊ.´ë˜a)2€FÐNÕjTƒ³¸Šh#¯Yms:¨VrªªIÄ71’!¨„LÊAV“AŒÆ00~‚ †¢MÊSzÁÁ EuÀ)£Ðf*0.y5BáSf€F Âe dIÂ2à…ór—9\ÉÄDAŠqB™À»Ä+ÁÏ«'ˆ Œ#¸ÀZ^€¦þ*‰ª¢š˜CÚT"gB,™#A†³Â¥`ÔŽc¸…¤}Å#`K˜¼¥$=pwr Žbq™B Àƒc²‘éG>2R)8°ef4°uüÆÃQ raÌg†„lD$?¥ÊÏ~®SíLI0&®‘¤'eiåQj•Ž_"hAŒîAÌ£#®Y ƒ râ ×BžRŠ­ãïî¢ØM|¾—2âÊ”mOÕt²s÷Ilù Z5š§@êqPYM3=űof9ª'¡2„±R¤÷c#]i]оÖté'|{ÈËþýùÌ9ÑM–Z”«(ÜÊr„+ÅR’¾‚' ÙÈ1ÜïO^R–ƒÓ/¼µ£c,’<¯D0ÊuhÎb¥ˆ>’¢¥ÉãdÄ™Ï<ÈZâ÷ùÙ¾ñ<´KRÙfìOS:ª¸‚|¡h÷ç©izÛ3ÊeÚ-M²r ry –ÍÄë œ•²½Q ÔÇn-m­÷Anxßmê‘ûñE[ Úê9’Ì´FzÝ#I/ö®(”Ü e™\]W6¬8É)n„Õ'Óê£9WåKu=^lZPÏ^’”ÛÈKŸi…•?qN¬”k–V!_D~tv!HJ=}]]ªÂLT©*6“Í»NÒe¦¦TéCakÕ(÷9>Kæ*‰1‹!Øâ3¶Õeeážg’ÄV´º¤«·^îr×cJª+íR-áp©_ ¥ÊäDq¦±òç³fýÊRSLR!=giÙªÔ:Ñ7Ú”jz1¤nz’N‹GǪÉ*‘TŒb»ŽL®Šå~ùZÁéÕ¬!,¸ø‹ùÏìS»›¥¼zŽ9ØL!†bZØj—éÕª`Ýbµâ÷TÊ13B‚AS9ŒN",Hô aï-:Ëq»çúë!”inV¹*©´­ØŠaÑc\’«E!ú³Æ«Rc£$ÉÅb®f-…¶ÏÜêéûYIJ¢¶j *SYh{á›+¶¢M`B¹UÈXØZÊc0ôÆlYÄ3g‰[-Œl®¥¶VréŠ(¶É\fváëKµ?Db«ÕÊ•”?U5$*&*4Õ “=M\ÁKßT*dÄHÉ9›¦vѬ4ûó'Í©‹Ù¦êaþ%²Ë¾$VÚ,"¦u¸Ò±†XŽEÍ3'Xs3?«úT=-bziŠñŸD?cˆG¥ ªÏ)*(Õ-³{_Ž\½•lò±=©aqØëަwGŽHˆ»ßRY¿T•¬ã×ÈX½ÚÿB%Uô•BY¥-hì·Ó˜©o8¬ÚToÒ±FéPF× ½©T¬4å;‹XŒ2EÂÚ‹!Û'¯¡¤Š7A-EÃ~!HO(¨õ:)$±ËUw^°ÁLÞÀc&W¦ èoÅó’ô¡Â -KbJA´­šL‹jù’Û%ñ=pš„øÞâ GG ‹LB…RÒC*çúŠ#;dÂ&ÂJ•¨™½NI3aÝ¡b׎»¤“Ra+ÂJ2 þ§Rꋤ]*”ÖRزó•ÕŠVÓqIûÁŽkIÌUm&lªQ-%˜E½T®ÆÒ‘SK"_)"Š›bÔFRæTIÙLkÈ%¸,É2º–k ¤{]qÊØz¡P…ñD¯ÛKÈQÈETgC9’ØÞ_WDG]{Ri5(.(¾ýN" ujo¤†)ŠOV§K#X‰Z³ÜE´U±ó•RRQ©Cìç•ûQê(²¯µy9TˆËë¬äåÔ¶YäR'#Ð×LºÎ,!¬VZî`•Œ^«Aà 0q‡L¡˜3E4bë×ÍÈá äÉFºŒÍÄ#¥U7¢S˜²*Ô€Ã(1bgLİìÈVQ²„;0¡„Ó S¨E+™Jj ‚T;& HlãI¼Aœ…*ƒ‰úŽ ØÐÞèq9YLÀ®Q™!„—¤v¤@dÑ( `ÆdÙ=LËÁSPXeŠ88Ù‹ÔVœ®ÜA`¡Ù‚3.Rs# ;˘ŒOI¿Òh„°jbHLAJ+Þ0œ– ¤™=3+"˜ÐÑÌÓåí‰dU&"n,™SµÍ»pƒœ[f{'ZE•6¦Ðƒª¦ÝŠ# [­GiÙØªÜ¼"çé+S3ÌÅ¡w=ÞŒPäE¬šžA$žÉQUËqÕŒCÈ"±·(1êú¿„¼–×mfÒÝ%òpb,Ãiss=Ä­¤ÑÉ|Ó.Ø•8‡!1¢«á/ÚF[gˆ!ŠK[·[Ø·&Õ)×åÛý—KË„o f'-nYÈ•=ÚG"fŽ-Xµ1_ª—™ŠR'KIêÈà '¥®ö#äâjV’n1ÓÚÄó&¦+]ö¶a\¥?«ÔŠÝ'y:(JÒ¹U$ͪëÕêP¾¢íëéCˆ¼Bq bd§ôG³W|Is¹Y‹­hËáBbm䓽ˆ²Ÿ„ª‚ý}ª¨´3XZ»ÄG¨KP˜C)̘!ÖÓ75‚QH;_H4TȪ`Ìhª ÇëÃÂpD2í ö¯öȆ­˜Œ¬#† 6Î" *qoyňÂ@üP¼ AL˜&EsUD®z…L6ˆH‰¹ ÊÁf†…dxL±A€„3˜8v#b„EFR¤‚„ "Ž¥˜ˆíNä)0mDB™… ÌWØ¢HÃ2"3Ê‚˜rÉD1»ÁTð®”5bMÍÛ5(DzÜYË|QÆB‘h£î•ÏMs7@"&oïQ´…21sq‚Š+¬ÑÂa€Ð# ºEB=eB!¨êg@`䂌Ù:²D£«ã¦Ý,(NFöј0ÔAªÕÙH(®ßAÛÇÜ“á çùïï÷ýig&êõXm%û!^ó ( Ê„N´”¯@‚ $ÒÇq|ÑI&éD "D‰ïcLôóU¨Õ ,“D‹?ÐÌÿˆ‚+f™hUº E1–eòD[§ù)Á}qÒó/)Ê0GFk áì#ËìÔ–)>—A$Áˆ­£2Ñ7›Ú,³¶à:“¸àP m¼QD9¡~j52YãfYX’…ÝkŒ\ Cö¬¿†Z᦬DÒJ¾+b SVc„<ê R5!6‘†ÌVSÎwºIäµchë¶„™×c()©G~ÒðöDIˆ à@ ¬tî‹ l»æ°†0Ç]öë]¢°päKÈèÍj˧mˆ„=‚Ë]8”¹Å=N6II-‘4£+ƒ¥Fe/¿˜OÀ¦ñe-)DXµ%ͳŸùyÉ0ÃU”}ÎúÉd>§9D !„­iaç0S /©Á Œ×šßcÒæôFA`ð,ûÁë$ë±ÃÅ9?,_ok7“…ðŒu˜˜]\–Y#V¼c/ q0×%Oˆ2Æ#ú?¦1unA-óêÂ-ë˜/Œpä(u <¬cÀj1íÑÈ ‘s•¸,Úg‰!Ã9¥HÊ]“ ÞÑÐez£Iæ+^4©xãAÊ uI„hQ"¬ù3)Ь>ñß~† 甄-~Îüt4ZnCÄÊ/KM#±šd±K³» Â!JIØŒÝñŠz¸lá¥zŽAH`Êa>埔•è@çýòWbÅâ•$iU¥ PÓV\08Wñà6N‰ypÀ@8Í/y]\´Á¿²Š,Õ)l%J{(§" jX’0ZË`¶¹¢‹³X’GB.†{aœ(¡€RbV9HíXñe±*è'|…u”'©†ö¼&Æ÷'Xí2„¸üƒûÒ­QP(0Ø”;eßé¬ ™ÛÛYP—±DÁLŽÀŠ[Šà¶ˆ‰ë‘rÍSÈ„ðƒ CžÌ8h-M‚ÞJÄ— ­BÂ… ÇR1¢ VBÐõ3= ÒEÜ­¥éçW# žÅ{|¯RU* â8•‰ùfÂ(r@ò1ëê $6b”‰‹@ÕHI|D’Ò)°Å4‹;œîõ…-)ÔãDc 7 uÒUmi¨É3Æ!¨A$&îFÃ\rÈð¨{àR åqºQ–7Ɇš¿rP €‡p’zH/OGN 0Y£A~´bÔ¤ IçJr`\Û×2U¥|„–Ðß»ä¼ÉÍàë#Œc“èc Qƒ‚ëò·"P$µ¤…¡Ü!üiÙVNW¤zÁ ¿žy¥ˆ\ñEr£Å`Ç…;/LU鑯ì\ña"J)Kxe1£„‚1ì=‡ˆƒv±Ö³õŠHà _¬ ²ÁãVäa@¡ÐXÒBăçí7!P((ƒÜâQyóm¿µ½¨^'8ÍBµp¼eµª$Öô¥äSéá¨!UYÔ …`¤ pƒ‰°³äLç5i0œw\ôE <¬Ðí$” 9Œ–rÅêE8nï2ÂýäD¥n;ò’ál¦š _‡KžurSÌØ¡mGÌŒœ’ç©kõ-®Ü¥;ªÙuX’Dè³Ü·7\U%v¸®»£ˆº=‡«Wew žò‹b^Å/©Q6~Ö_Ú¤Œ¤…û—è@+Ö( x5Æ~ à\§T®KXŸÉ5bä *`ÒÑ=‚8‚(Íó¬q8[; W-¨JŠæA1¬{’ÎÞùR*iy£NaHƒ¹ž–‚¼¬YÜì?ôœRZ8¢Æ,Ô©0k÷àqÀæH«ƒÒ&صD;s-~m3HÃ8™ÑhZCÒ !DÀª=Fê ŒSˆlH:9à*A%¢™š(»y|ý9lzŒfäNY¾y¡¤:ü&È[PPS0ÃH-ÊîvÒ¥ŠÁÁárUé†îi8ˆdæ{£!doYAFK}$ç½vr\êû€„¤6íÉ-hSP@2q½Ä m†„C"(z°«‡ŸÌ²~ý¯,A}‰ÉÇÚJ¯ÚšTÛê/[›DµH…a˜Æ b” að(oÒ <’ÏX‡Ç@X°<$‘ ¯P`Å÷»ôi¡rIŽ AÃ3'•>ÅgA!ž`¶@ù.Wb„‘ÅLk¥Tɘ+`„%ò+-QbSg/ˆÔ‚Ý"}åmiŒ+ú„,^ñË’8d ‘Xc”Jñ8ƒNR&­ÂZòùQÚÁBe÷Ÿd”³ÌÁ*Å9 ãcq0HB¥ÀSDùC¿WR-é8Ô±£’W]IV.EÈZÐ…ž¶D0È·„=Ý×X‚1¤#§¤Éé˜á‰CÔMåˆiœ¢]$à›–F!ºr)TéEc¼8ɸ%àX.%  ˆà )úo@ð–Ê.XNQÜGÞÍ=i#-’’R• RI®Ä\Çé~ Ѫ±”ÕÄ)À¯d”±Û8B 4^B«QD†‹ù´å'ˆìä¨ö$óàI#C‰#rŠôUC­K(*p`pFÒ=o.v5Ú§3¿ÌyÊ´R\H¤)|Ý^®<³šcxeÛ!og¦Óæ©O‚†A\BŸþƉ4J+ÿQ  À¢s aê†‘å øŠKç¢a/Ò%b°Üm/ Q-«naPË´±ŒGÃ(«ÑŒPPA£\ CűÀ,>å¨;!IÂtÑþ}ÆÓ­ßý2ÍA­Ÿ)ðF”Ac’aˆî9h4‚*Óˆ³Ë$¤LN”%SìV‡KH„‘Éùgh«çÜ„J–m{`JIîÁŽ aÉÉóÅ–ßQLW°ä"¬¤—çj¤áMÉê´-A§ašB” ²µa¡®„žƒ8ƒ Dm.rœz”çp@À„0Ò‰FO-?Iu¡%B• ´øKG†š#h÷ ¤ÐÄÚ=Ä fV¸­1ÞžJ„ËÂ¥%¡ U„[ã-n§CÐF HôO4q³x0!p± hIl‘¦H¬ƒŒ F}CÐx”h‚aHå!„bÝåyK²yñö§Tñ‹­q6¦ÒЕ”Zmƒ¡‰(vÝÅ?˜š€†  Œ–(; ÍOêmIÎ9a׋ȱé 5aj:k:j*[„qC‚ƒ‹…B/²IÑK.…IJÑ‹¢¾‘J¨c†˜™MÞËÚÍ%HY !IëYgÊëSc)ÎQOí‹$x=Vgîð¤á)½`Ž&s–Sÿ Kýf4ãyÄŠÁo¢F/î‹,ÒGcéqZD±*§‰pÀ€Ê4³Š©~ §*Ês)JIVQ; ±±²²#írëºyß7ÇyJk¶¤Çq*Å^RfŤÞGç½"LÁUØŒ®òÈQæ2ø‚"¤jÉ4L=eÜO0àP„„%CG…‡’§‘˜yÅ[gº9AѬ³‹ YP4‚rÌA[~‘à›Ã”3$’¢‰Eõ‰bÄ ‚a¢ƒ†PéÿøÉˆh¬ÍgÚW,A'qژъå-#åÂo%?‘è+Ÿ\¼|5tØÆ_$¤±¤QEdÓT Å5\UÑ<ÇòÉ"ÊȜʽ' ‹’®¨Çgf#Ï7ÐC,¤íAÐQsJK"Í™KŸ^/9ŒÄusnÓ;ŒJ¦Ì'ŠhÊn!MÐ÷[n²ä C‡éw 'ǨK åy‚ù¥1Lƒ´ƒ’u1Ó½}AÀCK $P‚Kl)¢Hè*3e>„ã öŸÃHÄ!)KÄ–ic¤!Ž!/çò1…´A±H\2Zhi7šÀÇm¤zÆ=Í€¤¨šÎo!ì7î=§{ªÓö[9$j`Ž¢™²m“æž½§Y˜0†aœÞ® •´¹¡efŒ5\Õ|F”ƒ'i3 G7âcn,ºÅ2ÛÉô¤Æ:(¨P¬0"vÎlÜl—뵩L0Êë—Ík jæýTo¼VÍgrоÆ2Ä3jÄXv”lï´|¶¡y¾NZ˜R¹f)Hb rûÉÖ4C ‘9¥Vš†ø’láÔ+Ôâ›;>¿7únÉE¦"H‚ÊÁEXBÙ«X¾`OPFÕŽüHž²ÓÑF̱‰µ¿ˆå²G™ØËÇV ´#ƒÁÿ¦´_ûÓ¥±XtÇw'ÒÃý$àÑé("92G@¢±UxO©ƒ¥}GÕ-Xæ.õ KiPÕ‰…i\ÂÊk3"M]õžRÇYATb?ªÈå6ét}`¹7ÌmW @Î28ßÕ=k ê#H+ãÿ&ÉNäóîÈS')EkެóáeÛÑ”¸Q|€ý° 9‡¼PR,ÃìózÓ@! °pÂVž²KÖqÄ9Eª‰FÌÜ7’öÒÍH]êDˆ)-„8¦ãy‹îî¨)—â^Ô®SJw¡oÃ%Oªç4"`¼KH.æÝ™<ÇN&òÒ~ÄUÌÑ1ˆ3yº¡ä‹‘mw) 9b#l#ªÙ$â'éЌ䑛^?r§ò5ƒù¾OöMJ QŽ:U¯@¢”+n“‰_šo„ÅXÇ+ Q4ý&ÛOtbcÇùžóØæ±Q0"†^ ‹Zr¥3ä5Ïz>Ë/…3G9ƒnF&“ßC$Y)í$»Uó ÊâqOD•Þ³[¢WðìGAN1¯(O6]ŸÚs•¤!´¼ÛÕ’«swÄHNÒŠÉb’Gn™”YŸì[ˆä«¹F¥Ë^ÿbÅz«HMÍri²:‚’SÙÆ²LL¢¾Ü°‹f%ç´Žfzª¡VùÚLR)ÌšÛi¨¿–áÌrœCùœÂJ¸¦¦?Ò¦ñBû¸ƒ¹U§ßH¿1¦%Z¢auEòFòºhTœ²« ÐŒBÛÍñu’¹Éjš±æÑÀâIA€…-Ä&–u·­žæ[tªkæÜ½Úƒ˜•.Eç4âéìûYf¤{BUä1E`§QK¬B8¦²3eÎSöýXkçUúº"(Ì’‰Å„7qsyMöòâÇ(b‘˜‹Ÿ$|Ë¥hk®:ñ©×–$šAJÓ˜eÛ‡aîQ˜J³¡­Õ\ý˜ä.’eÚãIÄñˆMFª×F‚Eö+1ÅD ‚ø3öP¢Šr³¥Áþj $n e©Þe±êß L£ÈŸ¢÷mNfB÷ˆÆ #i0èã¬`…- ÒVžõÂËÁ6ör·R£”t3œ‡ü{Ò'dÄõlE¯y1å‘gQÁP•iÚkÓ°»„ßüF`†/#¢"„r.D¶1QU¢|¸NB‘›½W'ã™DlQY&:P¿´íö@æ#—Œ—}¼µ¥¤]×j!õ¾%ªJv"Ó˜WÝÄõ‘_ уŒA¾²*gÈöÅC¡n%iZse(tœz I ëÂ*bqêLad†½¬Ö£ùšfŒBýÅNVv±ªe÷>å)=ÉE CE-gXµ¢þá³è¸Y› ’ZtͦQ,ÅÒYQŒÃW~¯ùzJèÆ«}Ò%кʞ¥ä;f&¾ÝØkoZDâ–Î¥^e Îåd²Ì‹1øòVLN(ž9fTŸÂoö+mɾBøD©Zuõ;3Ç ¥^i Š©¢¡™lC„fùk~,¤ƒNø×%_iØFÄ+#©â9Ž•èŸÖ½’©Jt;l¿6:±pÞaEº” VpÛçc>š¤ÕDâÉ¿Ù×[Ós÷¤!F"¶i !™—ÕœÚ!".²² ìS'PcÅûWS)Ž»¥©ig‘΄¦tRÑ/è…bzûÈcTy-³(ä ©ÌQJBŠüu.Ë[#rËEâùzeŠ]+9ÊSK\öT¥PŠ?’òn–¼ò¢ó TÉèØ¨Ÿ#ép„tq<3)êŸvç¢þIâæÉ•2Ô¥RQ·)[¨ÀÍäÓ0„3ë¹ÉØ]áåÔ©Z³Ðo(¥äêjʪ´/ˆø4šGƾd¡w=”D]Ôµ æµ8ó½òŒ+9XBHò±lÅÕ]Ò5×´ýö·}dd ê‘¡(¤)“~°êT: D¡ì”8„4›â ´œÁ…Ö„çòÕº¦¹jSªkÌ)‰âÐ¥}Ì%­„ñY-Ò§Tè¸þEnËê&`¾žEbáûÙìª:ÙèþâaéÍ%ÉÄs¦¬BŠ„{›Ä_j-œò*ÌQ¥utBç‹Õ×N"¾çi Rsd‹JÃI™bD³Tv±¦©Äg:ѸGu";„Á#Vó†Wœ{•hq§j ’½ÉÍëþú÷…°Z†ÒuÕÚ5šîí…T¨Ò BíÅ´Å´iÊ•Z¬©HB=í„ úŽ“õ!fÒÊW5ˆ†3}N8¨F¾*®GÅpçýs 'º‚Òì—Ê]6N¥I3 Ê—¦âdI±Ç¢ê¯mT©5î0Èaig:8QK“N@eÉcxÝa2UQs¥)«Ä%ÿ´¾#Òr¢RÛÚÚYHáÈc”#ˆ35dVuVR¨äîÌy«Y)R›¶É“uôúû¹d%ß…&](»(ZÞ¨åÇ÷3똬2R"Ц¾ Ô[¹†ßGdÎt¤›nDûñJ¤TßUCR*¤NHÈŽS¹—?U˜(ºÿ\xE:[ívî’ˆâIòÜ‹¢ä®ñÿøÉˆi;Nû±úÄú ùù`ùxùÍúM³’Õ°¤O8u˜åù0iT¯2*g&ì—l8¤•l â§Ì©R÷0·'£Í?%/ÕË'øWCB®*Ÿ‘¨éS:\%ENÙ(q·Ë:LÎÏOE2µÓ+¢ñ&ç½¦Ì ýRζ’c9B%Ò¾æÌµÑù*ä¥?–O»º¡WÇN¡8CJn3™¢Q·§ ´6Yn‰!¸¸CÔœ½¡ô-䆼ÉU„«Ʊˆ˜çC¦Äa"Ðn¡g Üé’+œ„úºÕölÝR˜·>6›¸öO±tÄ£$ìÌ-±¬}"á…ÃZréß­Þe_-©SŠÈjR— FåIg,ÈWÄ[B !¯ˆxÑ ÿ@¦6¹G!ìk¹è± †*D–B³cJ”žvtmóQê¶67} Ÿ/ƧÛÙyÉ0•#Ìlæ RœCÉÃÚîûQuÉ3ªMêÛsjyJÅp‚˜²–â×åÕË'“j‡2ЈAn­):Ã]÷•Ÿô&ÒÕB½D•}¤SˆÚÅç¢ Q"µ(H¢fõSšJ¥U™:M²Éª"[¬­®tLÌ^S¨sŠ %[¨#Ên0ÚËtÒ&u:˜-ülZP™º·.Š"ÚVõæ-È’µ„G*éÛ‹ŠIÌC2öËH™mÏZQœ ‰Ä^ÞçAîÁVœ¦mÑh³JOavÇË`F@ˆ˜ÏT/ò<¤º¥O}Ñ$&géâ¥ȸ~JsdËË$ç¶ ¹Ö3UPwq gT™Ý¨{1ÞËbeöèŠÆ&Ø["ê7-¿¦Ù75-œiÛ]ÝÆEçq—‡)ˆ]¤”\§Îìëþ%‡ÇÈÅ!ÔiÅô'þöRæ8Rщ2>þ%PDõíM”›†óÑ4ˆë¦Éb±ŠWE”›âúÞ‹®M¹ h†™)¿ÏF™ œ¥7Ò?ÉAD»zæ¨F “d,BSgüTQEÎÍyÈ¿WÕû–åª cá*=FÌ*s5Ç!y*‚0¢žÄ'‰í–ÍóYöÝM Ì+ÕXb$'±˜žT™4F*ÐÔeÔÊVV©Q70¼¢bW¬W£vfj•9¥y×2ZÜN&kJ“Ongól†m(µBd¹&T““Ž“´*ÄJ¶¢zqHEQ*/)òîŒg³ÕÏ¥Êijk¨ì]ç5í#]¼¾ˆ®•vvœJ¹´l{;£ˆ†}°¹Ýø[)(T ¦I9Ùÿ«Ô•ç1Jš«îMg±iÊ$ó3¨ñ—e eÂ&*Öèè×L gÿÞ›M7¦ec@¾´Ó$ÌT·Iñµó’Â1Õ%c$Vòá BÄQMÝMIˆÜDãÝibב©E˜Û†úá(* dª÷4hÔœ@‹À@» ±«‚¶ÅÉ–ê9²xôô£†X„J¢™èß÷äÕ»ˆv^}_­›jtªaw¥ Ô—íÛ:NIÖt @¢ívÁAjkÒH“T£²9AùÓt”"½Y$.— %|Ü´:†,üœÿ¶Z#V¦¾£‰bzÉF˜¸Êw®í ÛéHIÌa’¤¥í/hÙ¡èo Ã!..–m#ô5[ÕÕiŸ’-E1ÊŽ“’‰­BþìËEB®Fþþ+ºhÂq9ä%*Õíê D¸‹Â¬ŒdYÞÝY”-cÏñ8rbÌtí§®"tg-”Bª90õ|¢!kNHÿ@#1ªî˜3˜.X'ß+–å4eY[ÈÙ¹è`‹RÜSÓb=T&IóF‹AcÖFbé¨O­3+ÍÇÚúÈë©D¡Q= &"s‰“(«ÁnÔ»êÔ°ê“88ƒK£L¦Ý§gS ÛBú¬VÏJó€$‡Š¬4oŠ(²Xtõy’B„dŸ…K‚Y&n&uÏÆ´.|£ BX‚võMÔ6âB)d¢ê«¢LùÝ8ª,¶¤})½÷‰={2;qkæT1šãÝ£·³ïâÔVz[ÉØ[š†ª÷vóÑ|BØ.UŽ_LÊuH¬2‰šúó¸ANaCÄùNfçÙ+.ŀР@@xð‚–L‚†{Œž&Î[h}™Ó[¥]Þ]ÌO*ùàØÔ0MqJj—Ò=©©¢vˆí ‚dPE„{‰p©B´È,ˆ’OÞB=&m ,àÍõ™Ho3­(µI0ås8pÂRz™³§¡"1O2ùè¶ßmÑ)ogòzùÊ…!ª!Öþ±‘%ìkDî„)ÎiH9E(ªÃâ}"_¡'‹†t›PW™BˆEÓ)EQ8„ ý‡bÑŒMEÖÞÜž«›~•qèþm¤‚ý²WÞW:½B”:”É(®\”aT–ȱ]Ä&‹òÖ‘oõA5)WΩ§Mz„NAO3azolw`‚Õ¸ï‹c_ä ‡¡Á)5ßX¢r%r@ÀŠÎoSXT†¾û3ºÊùmºÕÖ,ŒEÏžð5á@ï ‚5* G"Eª; `3¦ÇLMˆR÷ vî/—ôD(¤òV‡&u†ÞÐŽo3Êù qƒ–ËUî~ÚÐâ»±tûª)*Jk÷By­ÅæL¯3 ÝD÷+JYX9šÒÝ Cݯjtå¹,KTÕÔò.óWÝÍ­¢6#˜‡™áU·w…½dÃ-A6Ȥò½ãÒ< 4¨…½‚"´sœP˜ ¨‡ g~/ðœÏRbÇØ²˜ç9nsø ·?æ0çzt(†(àã5´D\åF¤"Îü Ûb@Ÿ.X¢^…•ÂëRœ´#E!–eM+6H9µË!½KéÂóÐGêIÒ­/:æ:],rù9AÎä½¥ðkeÀhu±NQÇ!)>kÛÉ X,œ¶œÄ7:mÄ¡ŽB‚€â Þ`3×C¬Ñ­Ó)ÉþÅÉ{I’¾§Ä Ÿ¸iõ WÇȈP¥Ê…–Œ™´ä&LE©"8èï¡*%žy)˜Âyw:*%H…/ŽÄG0L¶’‘R"Z•|üÿ.¹BaÊ@ß=ñN‰‘ J"ê0Í2HAÌ/†' ¹q”Ï!™Û‹ÃÀH<ðhבǤåtå[LW(@¥âwg$Ä`¿k:é»ûdœHˆæ (›l«Ÿ/©B D.P@ŽKrî "D+ŽMÁ.EIFcæ*²ÃMª·bÎ#˜™ÜØs*ÊhÅ rœ|´Ì­‹™òLùä”'R¦{šsóó‹"©ÿ~O ßXBµÈÃvÚœæ‘ÕM(cˆ)­ —¶ @5 Â­ë`…‚ŒB#J„ (Š{ B®Ð–®)UÍO›¥s².±,©-è¢d²#• ‚d\wÊ ‚mˆÇq×ß%é--çWþê¥q‰!;û'þ[ÿnÿÅ?âßð¯øÏývЄRʈA³aþ¿Â’¿7zY´)¹kˆæ%o¨gëIt©5J¦§ &|Èã‹v¾Ÿ÷Z v‰8¤wjsƃ?ÈySQ”¦"¯å°]Ñ»3=|'E蟽ŒÅ*çІj#˜;UF[Ì*ˆ°ÌE/}öO/`Cf÷ßÇÇ1FòÈ•Eb¼ž[”‹B£ÎŸr6ÉCRQ0¢hÍ2 ÇÇ*VêJ±*¼;¨†ŸV¡ž‘ –?­pÔ‘½kWjèÙ|ÿ`„BÛÒ@¦ÁT ǃ…r5„Gb°ŽsYÚ©L[£,_ÞNµf‘¶¿êUÛËB}í”YÉ)ýuHž¼fŹJdýºB”„z–—~_5Yk¥º/ÿÊ#ñ= ²düÊ‹ì#Ñ r3 þÓÁÓf,å?’%BåÖ¡Q ÃJ×MÄLfÆ2úoÕê?®™È§WUÁ(•ÑMüò-ÔMÔÄ9ˆÕ+¯¿/άåwV‘¥s»[8…ºÖÖ“3a;ãËkߨ>'fz"=Kü­0¡N2Ù©s(†1 ƒ>t¹%úˆ£§¿ä•ãu[ŒŠVm«úaÊžeÑ_×[USs5û»|ÄY‹T¶gvkäG°ÃNÈäU×#c:]Må­SŠ9&Ãm8›o?zf×yÐS¤e”†•þ©R âª«B?§6ãê¡/’Ó1J¾SÜ'ý9«WÕZ¿DB’©nZµ\Ç?1,æ1ÎB&ÓZBúé6F×"œ½Oj¢¯¢¥øü]ÖǺcö1Âpœ!htÒÇ¼ë©Ø“?©šïŒiâ&½Ë‚™ö&Ë®*‡s™mîÃçjx…ñJƦëî”:+šÄJ“ŠœÆ(¦QÇíJ&{mŽcßÇÁûg”jû*co¹5k8Dü:Š"Q¤P¦†v·ãý¹§J)å¿6ú¡•H]{È©Š«Ž1Þ+ûê BTRQ¬¯$æõ¦mˆr¤­U®›·7<’ŠÒ:ÆDî(øÆflcšýä«‘ º-+´é|y #‘ís‘(Ó¼«”iN!Kœ\ÒŽEZLAfµ6­.iÍA$vZ¢ä»E93Íd!¨„/äLþ)ÜÖeH„Žš#‰ZWÛƒ3~ˆ»Ý;JÄ58¦^¤½;²P•±¼5.“¯“ôçW3Xc1húYl­™Ã!U}¯ïv4u ôJª>™éìù"Þrղ摂>=„#z—¸»A̵{-oÑX@ŠbÊÙÝa ÄûJ%‡F!¶‰Ï4’fï”Z¯ÇWá)aÌõºõò`ÌGHçOÑ\ué[-™ûQÈZ&»8cɼe¬2áæ£ùe^TÔ’ž”ÿ1LºR´±„KÒB • Ÿò(â.“®)™Þb ë.bÎÇ)[k¢•:üÅÁåÿÏ4¦:úI~'£ÈC :'kΫIÒtÑ“—žÿt ×KÜNR²¶¹¯/9Š…B)w>>"ÉŒBýªQKpD*›³¡¬•"b»EÜ%ƒ•èz ¯'P"uüŒ"5­Î‰îÔ ÿêKBˆF³ÊÍÎŒNÚ1ª¡L‰B6étÅDŠ#Ð<‰!¹ÉÅ­ÇëR r“²[Mu¦æ@ØMâ*‹6*“Xaù¶f6Ên$‡l÷Jý•+&yÒkû8¾!"!¸|9•S“dŽ7År­"óK†˜u8¡+{HL-d3ðÏ„ÁhB+2+^ÈÆuL ÕbM;á³W,¾§Ç½_@El§°–W”]ú±{,2‚c'o±…ùª¡ò<Ë"òKÖ]ê£à‘c!íüJŒ:®e'tUíÒ«¿œ"ì¶°w1íc/Ë ÆÆ+„a”zb¡>wuz%’•ò1„˜bèÿV iާÊR–…÷ò!ŠzùîZ0»luu*Åé¤õº±tW§Ìì–.Œ«Õb VL¹qfn7ÊR­©ƒ”Äìúa¬†w ‹íßĺ«÷e£Ðb1²R”ŸV0ŽÈ›õŠô áS4J7«•ÓðYÓénRf®„zÉQ«zaHR’Á9‘(wMɆ;emeAû*(¥½«"‹¸ó.–K5öZuQrë:<Î^\A\ªUÐÕʼQ–âji3OO#í*ÓV„zˆ‚8šJÄa0èüéÃ9¯˜׳TA$§%…gëÔ¥B¥èœÎa‰b9+"=Ig¥¥¨C ~¿eH·¶P¬?ÛÎ(RÃv=lZ(^s¥©öÞÌ(“3`ÿj8É¢¾á"ÈZŒÞNdU)¥^\¢2 ”rž¸lA•8BÚš‚ qhøE擨B"<„9/ÝùªK¶Ì!‘ó¿¼å±ÂŠå–,µ£315Ä®aTÌýzõrs"†ÎæL:T9÷±9,‚º²ÈE^òåñnÒKŒ·oHäᦾ•ʘúÙû¡Jpˆ=ÿøÉˆj2Nü ûgú¬ùõùUøÞø ø£³’õª$Ç4õ¸áùhc¹¨IŠ=’FO!œ¶â;eWÕ VÕ¤*aü¥§¬í]²‚!l&ž»î„'h^aR€¡åë­ Xð€¹‚,5ã{hC0*Ï+€8(x, ‘z)IåÊŸI†ju”b'Øòߥh¸C ×±â˜2qÊQîH!ƺÂ=ÚÍKƒ 2]J’dIäñ >j"RUB„Eãüæí-W’ÅVRT•“9êf^ȉ+ýk¿)hØ­%ÐÅb*èì®)êÚ‚ÈX‚äaFEQ¦lT›^ ˜0â͵ÞèG_\}f1\""Ú@E¢ˆ‚æSJsµ%K¦Ø„Ân­1¬ø©rmvù…g¼Ž¨$ˆCXûƒR¦\óx÷yÒ±¡å•åî±öÖC˜crées„-†så9)Üw]Æq'E¹AH´®¤]øÎÄü,¿´#ž.°ÝUýñÅÚUàâd>œ"µð·ƒ@X“€Á¢ã=AÅ/,Š'…)qG9¯{¸É¾© ‡±vRy%ÉUV¶®Vk’SfðµÞ¡ÑjzáœV¨„­tz4ä”K²›Ÿc ˜4diÙšZÉfÎV£¥oã,BŠÄÚD¹XA¨¯ ˜ºâò3&¨É*˜Ï'[Ê*ùÁ+¹âY,ajk|I¡Œ" ê,Z+‰¸ BBäÅ0^RLärd«PÎá4x(+ôiÇAmš©G" IeˆƒÉö?t Õ¥ÅüïNá›(*Q™xç!:ªA.¶Â(@Bä² è_ØßRrr?Ý¢=ErfÍràêdN¤¶ú—Ô‘øç7pC4Gå±]×o|9^í ñh‹Ó;2øÓ¶§%ÎC«z9b)Eã)MYkÉóýE!²ûß<¾×EV3œ ƒ½#`9üö^|9(!ù1OGRº=mzS¨ÅcR¥Ë"ñÓKã&Ç@RQhDžÅ GYB¸#Óð`€¼ķѨÔ0–¤¤úlPu–8×DNT“‡)GÜ÷Ê‘"‰} N¡Œ½§®ª¸” “tµ'rÌi—†È¹Vs36¦E`‚ŠOð¬v¼ë%å¼ 5ƒ…‰å(¼a 3‰Æ`†À< ³¹i \ÏFú•{ÏÍü7S=Ï—úþ=ÞcU‹Å"\ ŒS†v=…OÈìUâ‹2ñËÅ#ªDñ·ÉòZ—ô´è†õ«SÐŒj¬ÍéØC‘deA!}L¢Óðûjˆ+ûš™*>Ú2Šj~¾f=ö ô+(ãˆÚ!„«É,j̲YE–O¨–)•H÷`ÄÆ*  !o4ÅDJ‰KH]K¾`Æ'¼÷4™7 nüÓV÷UÑ]±YÏ¢Ê!EóÈDÈŠb,@ „ÌJM0§ÂL3«ãIJ(¥5VÞç;¥i›M¼ÊF± á~Ä|%œUú3 #Ýpæ¿›ô$BTF¢M!{^3I­w:TF"éɆ)w ú=k­fË7u{Œdô»HV¸â²[ŽDÎÿQT…ÚœäB ç¤~䞺›õ4T. vK$@„)Iœë&çj…æ8"z v}“Ü{½O­®ž¡¶i „Uæj7Jn¬äR'÷ ‡Ün0”Dü¢c„Ï\¶ö- kÙ(Æ–k\šgYÉB-Ä@ެú½·ZÒ,Ę(‘æ;äñ„YÞâs( ¡á>2Î×¥½Ë!ªÌí»Ž ¶6Í'Û#öÑ(_ߊÇ'¡…(åE¹¦?) C1Ú³ššÏØAw¢¾¯%2´¬”É“OÔ]¿¬ªVâíÜE%Š–Ü+“Øf$óQŽœ-–‹ÕV<§‘½$þZž²&ûy¦ AE„AH×J=P²,Ì‘ÈéÇï(ªF¶oß^Êi‘‰Œ‚Ÿ<…]58ñ:.›¥Äí5ÈaÚìtC6ȱŠÓ­„+3H+ãl‚_>Ä~rñ·WŒzK3qÔó L-Ÿ*—9åcð¬"5,J¾‘{QD2Ÿp—iªCñ·23üÂr“¢+\OrEQG^uÛ&J¹ÂS%¤‡±ª/ õy‹š•?;™’ŽI†ŠP©U-IË!üYU™vˆì«¤2M@´ Ýk¾|Ù]}N3„/þ…¥ :¯µÊP¢†t4¦VÜ6rÆ\-–¹ø¥±h§«Õ7HTÜZî§"õµžFÙÏ¥Ê?œCšš%TÒ=+ ºzvb+ÝŠrBêºÇ) B vìK‰í@Ÿ^©}F¹íÁ*™D»~تã):Èå".·/T¶2¿_êK™$ZÜO´Ñr¬‰úæ¿ FB2ž¬«–,©k® c…dæØÂS‹*¹p„Ô|¸ûÒüž‚3ó8ÒŠ™ëv!å^šÊÌÌó§³À Pp ÂZ!Ú’UQd)uäC@§öC8u³ žwCµJºO¦ï¦­5ˆ‡mjQ™žæeLz½Ê‚‚ ÞŸ«Íÿ{îpÌÂæ‘Ó®R›éhA×= s1Æ$íK¡ÜUºUé/×(ˆ™²5ØJ ‚Þ–ú9f:œW}—±ˆH)ˆ÷M‡)¤)îKX%¶e¸¶ ¥b®õ¤¯TZ R739YÎÌ–-I‹N'z­;(íCŠ‚²çÍ~J|ç37,‡"Sßõ’æK ¥%qT†OÎKÞ³:HLç6s *.3e åd2f^AHQ½- --ÂòUm#·÷å¶¥pÞâ÷°‡=òD&»à¤!’„s¥ÛÊ×v”6®%½néª%ýÉÆÒcõ(-ˆ~BŤ™gz#¬TïgÍoÞ0AQ©½ôžp¾tcPªÊ™csûŠ*î¿ ºQ"/Þ!Q½Îд«Ûò9•n²#þ§~æ\"ë¬!E—)ÁW.´¼zÑùœT«Ô|´^¼Ô¯¸V&—³øôBj°ì¤æO¥FwWäŸh*й{Ê’ÄJÓc_TW¨†ãñÆ+ Õrž† #r†dpV·Sç+ÿª¼Í餓¢‹NT¶â‘í¬Uü¬BñQÈf¦Íƒ’„‘9½ªD¡mÿ׌är‘{]Ê)”šã½UåcÔáZ?¢É_D lV’ùÄ&[+‚SMü^L2)_*"âIRTæ¨óœÊ—ã®—†!D+å$¾!tù2Ê‘,ˆsuS£&_2+”V™*ˆZc"É\Ï•½$~©hÓKøÞM­;O»âN£ÊA *¨¥j½ìvö· ™tCÌF#[:„$ƒP‰ÂorÕÑMÉèèÝÕªmÚ¦ëÕ¼œRÞȼ]\>“Ù·åæà¢Ê‚õu±¥"ýÍ3©D! ŸéÓþ©ˆ–Þ̹ ³ß¬V&"\Öˆ¾ÓÊN˜º{UzRr5W;œ´­•s…䤧§úJc\íTmQ½·ÉsŒ×d×J~Ð듦e„jã/’¹–3YéŸ! †û³0Jg ¢ÿí…'Yæfö.¦ÍѬá¦BꜦ9,ý¬ûToTr`QrZÛ©ÖW%õ²_{¯V„1xÎ1œêíC§Ê3¼”UfEä«=Zô«Neäj¨©[“¯Õ TE*ò•}HT9[K¦FæµV)oá_7Ig¤õòÓ B©SS;n¦So\EÚ¹PÛÄÔ_™B—’":áj¦³½ÅÞ\æK²Ì‹t«Rö®n¤DDªÛûsF²â¹%äk2Œ¯çœè0”ÁˆÈ$Ë D#zúá'“¬ÎP¹'U{J)¾õÄ"U‚Šzµä]¡Bå ‹©OçUb挼¢=Ö½zcü䢢2èxª‰rFÒ.ÕL|ýb’Œt=„“eî%¦8æs ¤aSi6ÈäL+DÆ¡%C)Ñ$ÃñÉg/þ½ÓZ¼ZîI5ÒslÄ9ÓVUo? Þl!ÅZ! ¿5 DžÈfÃ_W.¥–MRòw1%Q9¥agQ†j»e–ˆWÑ2.r:eÚì\Úúi4mQùIØ6dkÿ±ÏÕ•ÒDG‘ÏŽ¦·_I©FwÜTvb¾¡sug¶jþ¯É1}PùÞ뛕&éõWF±­™oZÈJ±Û_nÄLT)0RLéíu,÷0WLí¸†þ˜º û´T£œ¶»9´–ŠS³hÄ© #”A 9$¢"r9¢abÕumöœŒ^i)^VººŸT¯…þÕ©kpŽC©¯MM¦wF»øVS©QÒœz™4Š8ßMô•ÜS‘idJër"Õ[ܺKÝ®ªnB)$[ˆ RRQ5ZÅüªŒ^Ì3‘(w)I“’ËL¯=i‘X¾ö&" zË—Gc9Ê4Û¬S'H*#ýD+µ t¦÷Êã2¾˜4ØF&ç#R’HÝYy œñ]3P§Sݦ3Ê«*Ê|zf°)¨ÿøÉˆk5NÿÔÿÎÿë 1X©³’-ì¼ó`´ü†t!Ó„¨éSÖJÖI5==¥u2W0ÔC¬"¢U¬·b-:LbPµ•¹¢íÈ#¬b§µ޾FIlgVÄ)&ìÈV:­•¢5JC[×FÑ1vú˜E:–! (’3¹µQÓ„FX`C’-$2‹|­NHFį.pÖ›£˜ž£ˆ,jpÈ1D+H’¦P$ˆd‰\£­HqœúükÝb&ë¬ÿ'%‘Ä^9.JRO«?på!ËeÚ=“c¥“³¾z£iRr©ÔUw¡ª´9\ JÍduk&ÜùšµgNi ­›Mêd²Òêeý8!!u›ú¸V1$ÙD+”‚ßiħ¥•‰Õ[‹LG]¥X‰‚ åëê}!L£%𒺵߾mNK8àÄ™NÒµ„©)x¹LÊ †,¢²éNÆÂr«#Øpĉ4‡SFų»!ß[uãöŠ MÁT"ë)²ý^ä’œ™ÄÅ•3;}«!ŽTßÂ[i4“ä5h„òh+˜+]©V¹{<}¢f9F(ŒŸÒÿÑ]¹µU¹_öµçÌb"“^V‘•¨A wò:­9“—ì¡DQ#µvŠæø´§.å B”’wJî—iI[1K –zº!*ý²÷WŨ…TʵIg[™fJÙî›æ#› ¤Y½ åÙ*‰‰»*Hse³Kâûnõ6M"LÔa !+Jé’[–DꩈPF -(ìXþg;Ô½ÈD-wÉN¨ƒ*b«ÏhºÃ+”£#‡&?ʬ\®æ­˜dÂ*m9ŽÄÊïúS¹ F£s3•èJRÞÞ¥*ÞšT!vïÔþÉâr …gÝf+ñÙt­)pÉ"Ê¢°kF#W]!yÏUeMòØÖ´lýœ©‹eÄãò”„ÄJ"#!®ì£¹×ÚŽoll’²¬«º´Ù”ãˆÆ&»ZmˆÓîë…I—›·ëúåiÒ!LsûåÛ¥·Äé*¢3 ƒ¥ÐÎë/½UìBˆ05ãŒie¸Ì^EKÞbmãT0Ž_!](WѬ'Ü(E0¼æõ⡵ƒ6…MÝý'>伪R/¡¦d~ B™ìP•þ©(IŽxËãµ m쉕,¤“x…SÊûJïLé ©Ï"¥ÚÓ=×ÌBˆ9‰“}ª%%¡‚˜â·3á_t—¯!*Ü»|o³d¦O'ÿ'`îq\¢OáS±úÆÁ-MÊ8„Ê­„&œêíÌöEhŠæ4Ó©v#ÕU›—Fo¹ÕEÍÞ/ä±·mÁ;¹(GÜAßì%JTR©Ò‚Ž¡~J,¢.¦k~H„®é7J¦âZ=%’QJ¢hR ¤Ò ‚¹Tؾ_ÔªºyWVÒ“Hm/®B­–“ÙhnÛUN"· ®¶ä‘©d1RŸ&ì•W"~ÄýÓ§¨a seÏ! *ÑÕ(R"å3É%7´ÆU&óÈNN&웘1 ì5M*ºeЭø_^eaÜÆÔ"ÔþSHóúU+”Õê( „ZØJ cë’¨™cš+3¿ñ9†âåÈf+,b\¹2×úÍ4ÕÑ[>ts]W}Q=Ä#ÐC#†ìm öÕž£F6& êR01 Øh„ÙTN? |Ày…Aކ¤°9‹ fƒÍæ d E×®Q:‘X@„&X« /…Ä •±iÌ”nqpe Ù†båS9ÛGì(Ü LPü s(ŸÖrô!‰“hQ½)”ñØÄ„ª›©KãÁéT&|_­ž(& Æ!)Ó˜SVt¢g„+ì†%Â,Dnuqf©³ 0ĤsÈxÄJ1È; F?•‘Š Üàäî ]B@Á°3“xô¥î6A @!+r³›„ôŠ„öŠYYuGß„~ ”oœi3ÒEwyDÄ0Ĥv}]äQ`áö0…¹…}Â; ¡Š†PÆ!/CUЇŒðH#“T$¦\*ð=!4Fe'C aZ¬Q9³†äâˆ\ânAÈLq1Œ0'"Ý*ævÆÆ2!Úª R à ¬â0AnäŒÆ;¢¤ëÎ HC ÌÄraˆNŸáA7%p‡PQÙñ‚A4%à¡Í„5„ê$%7ÿ­ÔVĨˆÌµ±ÙHåÐ1ÉÈS`B² _ÇE½y5½ HÝ™PbÚç‰ZÌLq@IW"©B&iцsº ê¦laÚ„q3bÈÏÝ :)É28Õ’C¡Es(J°¡šTÌ;1þUã„‚ Å7VÞ qWpDâˆweÜQ²šÖ,7øAL4ä ð£àtƒ3£ƒ1Ÿp#¡ 1²A¦AKDò”F#_‹‹ZÓ‰Hn@–3˜Q‡C?ÓµF y gQ%nšÒS›š£µèZ Ì­!ÐF @Š«ãá®s?GŠŠBĹЀ¤§aG ‚¶@Dï¹oÛ;î÷Àüƒ~±¿ô{AþÑA^Ç{ðŒ}8f²T› qßx#¤Û”V'eNQwÈD«ÈC7§çé ­…BIûùQqÆŸtÅKŽÌN©JØBºî…_Ö}¸©_fL ²"› B,NôJ›6fϯŒGä{PAHÊ(å'!–«å¹—Ý,¤¶æ× U&Ó?UJ—¬wîM bÇqO¦9JªBËC ÿŽc¡·*Ë­(‡Rn\^ûUjÉCíNM¡ÑÈ©IÐÅ<²5ü®Í‚%U©0œ®S:'a„lñŒê|ŒÜú¢_WÝšUërroÔ–R¨²Ð¤D­Á1X+¯•Å\³:³ ¤%»Ë>ݧ?_1½E+Ö¨v9(»®„jT¯§-KE®kEÖÂÔéjX) j•i¿©¦G»0„ò0C« àSÐÌæ¡¢¨”ŒQ\¡ÅPA xàÍÜœh…$2·¼ƒ  @‡)‘ŒÈHÆMÖnr‚1x‹Üà0p… •œdfL@,Úh`ˆ¨)Êuëæ;_JZnt£1ÕÈØs fçƒA ÌÅb”dzɰÔD!‚ l½‘!jŒÁE„¯Á0á‘”vå"ŽœÇÈTº‹êÒ©SI˜‚7ÜaX €Äâ18zKц\e5u!Š^éG‘s O¡ÃlL1Uæ(‚‘„fj!™ DœdC 8g³ÒCÂ\®9ŸÐüÔ¦e b–³¢0¬ˆ )†pÌa˨ÉB)!*(Iˆ¤ Æá”Ú9dc…aƒµd!ꊡÿ©¦êèÞ%þ9¡Âû¬¯È1(ÚäM˜FC´ÅÄn2~™] Â>%1¤éŸ¬ÎL¥ÐËþVÎÎE®º¢‚ˆ”1z‡FZ˧A ÇR–ÜÒd²r­qD;®Ô©9°è•ÊÕ&«HVVQñ‘-œE‚šæ`&!ÂDs+„“4à‡L Xburqs¨ŠG`ž1&‡0(@’:)œÅ1Z„¹Â(âi½¼äBÄaÒq •Žt/†+ ÊR«þˆ¹•„á!»fí0Ò#S(c cl†¥ªeþ#!àVMÌËA'ÒÒÆŒTK4x²tФp0`h…ü¸$Ý:„@ÚÕS)(#Ëxt‹íS†G]¿؆˜Ba1 ‡2Apú¬D/Xr)ò庋g‚ “üîß ;“Cs+ƒ*¢ðϪ-¡ a±3zÖk£¦Q¬i–G9]:½£‡KMðÌ&SÍ’“ˆÿŠ2™”*æP‹—9QRÅ+LGŠ¡†%r|`ÔÇ,å! Ê0˜Œ¬Ä”ÄD1 ò'’G3}‹ã9ÐãaŒ…ÁÁãºú/בÉTGý cp™º>øÆ Áa ¨ŽÜÅË ©(Í ŒàH”T>šò®†þ]Rµs3ÍÐ*(ØŠ.*1u LÚñ03!ŠDÆqe2ò+¬2œPô„ ˜rø˜JGlF†„nTÒ†¹º†+ z«ÕEŒ™PS½"ºH~žC`IWáÜd±NH‚©¨ÈLLF®‰’] a™H) ð©f!ÊTˆ‚ªz ›r#A¤˜'hKâwÌ# 8 P°çU@ˆqÇ(Ô©Ár˜‰J‚ °ä*$¹Á0˜Tf¤cYöh‹…9ýÛ²¹Ã?@^¥03ÊsCûæÓµ˜þ[†e¹‡ †V£ˆd¦Ä êÖ!Λÿ—ØPÆ?”¸´¬ñD‘B%Þ¾Ò«RBší÷Æ”J„ÍêØ˜ÇªÒ†O&¥eÒ̸wE *xœAbJ1øÒÊlƾ-}œa2å¾Qžs˜‰'0”A]JÙ¦™$FÍgÉ>Å•xÉ]CKódkíξ5ÞÚÞ#úŠˆâ QˆEŒaJ– "šèý}hk RI‹Ÿéö§„^ßNkJœE”¥eÕ«”a˜ÛmºWɺ­Ç©žFk‰LG:G.^ZeG}Õ ¢\8 zBTsóøR7S-{’ðxo…K­ 4r¡# µ 1a=Å©D[aj*h¼¥ºßhñý-!¬MAG&ÿ«× D *„ªsHh„ãŽwçÅ'Т.ËfÂî]$ÊR‚LB¨ˆölÚP“ˆ—¦ß@Fã‡=¦”gÄ1ý¦Áö…ÁjT#â2—Ȥd::Lp‚°j}Še²ˆI+Ÿg°Œü´É~Ô$Τ4õ'Ö÷Qšw6dlo$Ïb¨¨ ÃþÈSð‡É7e=¤·bZuŽäSJò-­{ŽÑZä5kJ,áŠY%bµ‹•i£ Ì$J½©¼ã%us¶Û˜'ßœ¯üñÉt‚;CnJTT°NÂZi§Lç»òªæN²]>„‘ ¤XJ†jr¯eå[{ƒ]TÓÓ6û|Õ£b±fêXdª’¨Ä(ÄLnúF%Ù,¹ë¶Üy–U7>XJÓØƒÜ‹3[s¼Ôa=×—wVÉ"!¬LÓÌö´bvZÉ*hBqGMK×’·Z=ˆ©ç€æ4–8BPÂ%ïÙzË ¿ Öt.J]ÛD9‡ŠkBƒˆ`XÖkiL#¾ñ®_EsTM¯µŠõ~¼±6ÚTö*È%%åYÃ9Q¸ÇbpÅ8º—L†÷£Fÿ&Ó1YYø¸˜ ò¼¶F«×j¹è0äiHg¦=ÒE¸eÃ}îÉc5~¸šrÐîæ›‰ö¡¢!:ü^¡J3 …~̽v7‰ì´¹N¡â%U•¬lNhæ%+…5HeO¦YðE±„ÒRž}D;pß/\Ò?®+Ñõ¨’=Ì¥î‡2 ~„lF Cê* {OCuBLË•çm&6¢.ë£Û‘/èPÆ©.d¨æUssJüiZP§/ô7ܽ»¡<ü3£²<€‚ƒÄÀŒ’T¼Ÿ5O[’Çûšìh…ªr:쩨¦wz(!{¨K’«! B$«DCãð”ËY±Š\&‹ŒŒ×ˆ•[% Õh‚Â(3˜§ÒŸ:”°…)zCY2 ÜSN«FÄN.‰¦¦“¿R_ÄoñxP„ömïHÅ*8KõÁÁ÷a~aÊx–Î"åbMc™9äqŠÜZÄ®ò•d¢ö•iŸ”Zçí*ëÌ‚1Pø¬¨†¼•5eãLvi?JG§æ2!°AH…z!jóêáéØÔÂêfzHFýw#IÆ]&ï#Ì·ò·§²N꘦rsÁÄzõ;:I;*íX™ ƒ9Žœ_ÝòD´µ¡Zœ%ˆv"\3ϨAS*]\>F)²Ôͤ¦û{i)OCUÙë[iÕè79ÝiÛt!|ó«×lƒ¢˜â1^˜½Mû×qpË+˜¬r¤Ãßëâ]³ï'˜6ïŠëI5Þ#ècéõc9Sý*tv6Ú´"x„¨‚ŽÏÍa ÷’{i·Â¥·ñ›-¼¦»ž¦œGK¡ÈÔ§í„©‚1 ²WgÖy J 9A7¾¤Ÿ;¸bÆ ƒ"Àå´½X,U´ÝÁ¥0…¡Êƒ˜ÑÎQ‚ b€ÄKJÁ»'±ÄWÃàcL)Ôrˆ;ò›¹ú‚Z„B 2Hˆ{R".¤Â3ïÅ"d!ŒA‹µË@£œ9N(}Mgì`Ì5 G³ ‚©”$B÷ ƒM)ÆUa¹ÊF“9%Ç ÐÀA û„;|bCžpBµ!†ÂˆpW`F õA%±"6]\‚ïu– - ‡ÍplúDÆâTjAÂ1Z:(däA&U÷Õ߇ nµwð®*èvg ïQ¤ŽVH™᪠”db9ŽÙøyú㧎ɉ9THBã–d‘ÉòÍ ¸2‚#Nþ$g~â*tÕx¸fB|‚˜¾Jß(è3Eá ‡ßÆÑ»Z±Á>`NOoT2J1E¢2Q‘Ã0ƒÈVUÂÎÅ¥…á_a;" b$ ׺]ÂbÄGÄ« 0"'û1Á\㙵i”’q6|*æî¨+ “˜¥˜0ÜÁIµQá' i,œÐ ˆŽ+,¢Goð ˆ îhNqf*b®ÎaÎm!{B 1%µÆf/ÎÁ‡k®Q !ŒÏXææRTÐ §’ rŠö©ÈZ3!¶Ê£ŒÌb­72G¼!žP¸Ê %7‚bd³À²œ£²ç¸€bʆÂ^ÜCœËˆÓyuMÆJdç)ÉËì+L•§ñ·Õ6—C ˯t:6"Ê[R\ Ž´%Y’…Ç"‹cO¢eYßÊR5ˆºF‘Ò}:½ÜÏ[K¨˜jTÉgý¬ƒ:ìØº_þNR"½E1D;œÆKý5%¼ªåëmµ¬Ã£¹DâôåTßDTúÒó&™Ûù(Ý–(ãºrãõ̱ øw!%™Ú§£’w[§Hœ­LNÁ¤ÛK¨%®æG(¿d)e â/0µ0µüâsS;§a æbœ‰TÌ£^Þìâ_òºß4›ŠRåÉR·¶S1™2¼]Ú¹Žs¶U•–ëQ«ƒ”Å#>„¶ªœ‘³ñ©NZÈëÉä¡C.ŒW¥»òV±­OˆÊîšÏª:íË¥6É‚’y–¢ 1†Fæ\kÛ”¾óêïjfq‘rƒŠ3â¡ÐG&“Ä!•"]påq…EÍ2~ˆFزu{dµ3åÑ r99 ´×Ú"ÔsÔ{ÈVîµ9¹û(aV¹ÉRÙ)WôßÌž‹í,”íS¦c¦±QÕëdLVë9KôÖ"wVä:ËÉC»njŠA¤>`´mM1Jè²ÓQ›¹("®Ãº´ôên¦—¢1_$1{”…9X©wò™–ÝVÇ}9 Ñ9Dd ŽrO¤ ËâÍ–šäÝkDiLÁ3Q4¯¸¸v^_ˆäWã7£ær(²nÅÙ··(^ò¢·‹dUw­¹Ä{‡ ß=ie¿î‡=_TrtåÆáKe+cbYiož¦“í¹ùõ±œšì(‡¼â#AÅAƒ ™lm(A`Æ( B#™ÆôZ{€‡/9ö SžmÙ³4¥ÂþN‘H1o`„vwƒ e¡ŒÈ·:»²(S‡ &i)$FBtò”V^‚œ‹"ÓPįH ÈLù€ÖÒº~Ã¥01˜ÈyEŠS=+ŠáN›qå$75E½JQ”†’lHfÒÁ=•˜ÿŠœ8¾D/r0ÍÕœr”©tŽB˜' eÈ-~eKE ˆÄ„f¢œ¥\6a3ÂP’‚†l¨ã’,ä5wøqpe.Ô!‘ESáñò(B0`˜Lô*(¤»ð¤>#Ü«Ê^`2DŠÄ Ù€Ì #›ät¤¥ØˆjcwæD7ãÓ¼_‘ä<ã¬, H8„PŒ0‚„A+´w‡êjAˆ`A„aŒ0ŠJõàWuÉÙû·oƒ.ÿP¼…8…tçÍ$F¶:8Ô3` Æ6A©c÷#® ÙŒˆJh¢z¿ÖJ¨$™ˆS'Z‰Ü•Ø ÈÆ3¨„øÆÈ$&j¬ŸÁ!”A…¼w;¯Í›¤s†<qÅ(*â°È „©˜Ñ6>ʨd 0•;©(s°ä 0Ææ¦ÑnÖ>æGÂÁˆ9\œøˆâA.D¨QB$½Œ"-ÁyA`ðZ³e J¢"Q„™…ÕÌùP)XªìØáh#†ÌãNÆ©¨ŽáPP¼Ø@Ø"¢Â"“%?Ù"iÃÞ7Âà^'£ 0†AÐ̹ËwËÐ DQ Ò”Žà1Sïßüz´0æ&êæt6L45ø`âO‚îtb ÉGDÞüQH¥dPȈ…½ÇYÞØ'æ¤G!Œ†#5ÊŠƒA1„æºÒÌKËçà™‹œå²9¨â:t8Òš 4 f4‚s]%ypb ‰åŘBŒW°­Ù¸7Äüe*,e¤¥ŽeÈ1õ-ùBE$µÌ)/DE®Êc(‚ Ô @À U\ð§ðªN¬ø• Š ®PEA(H3«R Î@Âc2²V¯~*º¬l¦r™òHDcÑ«e@P¥Z Ü øöhdGGr€ÿøÉ˜mpNÿN²ÿÒâoîögû…þ5´ dè›ðrÞ‡WØC©dsZ„£c'Äãffð1Œ laÒü¢ L#‰ðª‚„Äs9Ø_R ·éÞ•CÑl0š×1 ÅCÆMGwåH`ŒÆ ¿Éîž=â±FrfqI `@Ç"6¡gdF5Î ¢#¡3™ÇCW‘LÀZP8ýưCà^óÒKÚµ†^$S”O†àÙ2…@ƒ e#} S ­ÂZ@—9z‡,/uaÚ•]Ei˜†ÊÀsUØÙ †`a‚¡"”6–Sñ#’©KÏ)’Ì:ÀR»Q†"X:R6`Ý•Ä6‘¬ òÜÔd)ã)ÑNôxòqº/µèŒ­¨^åàŽ»>6†G%÷ †7!Ì‹kˆQ °~›a‘°+ 7¥)n‘‚åñ˜!• ´d`LC“±1®Šà•F2 ŽE+1[ÙÝ”#¢… §/ûŒ•9}V++0H62bJÛ #9331È„A!ТÃÔÆÌÕ1;T«C3 ÅÎV8Mg ®•*óÀŠ"PŠ`Cªâ %€¬œÄ$2˜ÔÖÞ¿ªjT‚•Ÿ½™÷! v:(†€‰Í’°G aȇÒ[¹QÎ+LáèP?òNØÇ)*ŒS”‡l j'j1X@„h#A1™t0Gâꆆ›·$?YÌÿbŒ†Ì =/ND'A.éeBß ʩd»¤eÇVØô£X+³¥·…Ê!Ò‹Õ\º Ôª ÆV#æmººuVI¤rPß^uM&a¬ùM:±Õ×¥iŸŒ0†R13DFUûˆí4W5+âVÔ¥•«”‹—_®-3úŽt]ŒÂÁÌ”#ж9 Vw]1ƒ:zQÔ¾cý}úÛ>3ng ”§}ÿÐW"§p’P¶üó3Œ¹o¶Ö•qŠd×7vÊEõ:2ÐÅ2HÄ#¼æ:¢eÓ|¢“-íÍj²µ¹)\Ò†ÞQzŽ!:æN'tÕð‚¥§+&q‘1yˆ÷Y›>º„•xþ”⦧e0Î÷"SD:ŒQTÍF‘ˆ#2Ññnr6&&ßÕ ”ç½ûĽ§ÆÃÅÆÑÒ­q[™§ªœ#(…ãR‰gàc™©ÄâgÝWëz§Ez{ŒÂb‘;J]ÔéÈR^›‹„Ä©5ÚÛÛv\Lôò«~œÆAÖ®Cœå%dWLCÜÒ7ÛLíId»eÍì5µŒX™s˜kô_²¤ÊUZ1Ý‘¤-P¨PºÖ~/Ÿ³hî µÆå¶óù³_#U¥.Ÿ˜;²ÊÄß^Û !ÑOÝT”aøuÔÊ‘}<º[FoÖk Bù©]Ãv”EÇ‹çï ©ù[ˆË]AQZ§GÒL0ˆC ®áV”ò£n¹—KìódÝyiO[4Ÿ lÔ ¼»¨~#\!UÌ35Ý !PÉaÌæTÅVó:nQ/ÌùÒ{¥žø¤Ûrí3¡Í‡)­Z«uf{bÝ0„j„í*TILÝNÌ\C¾õO)QL–M5PVÑïL8Åaêi[Ë«šê™JÐÈÔQxf³í°Š*íÓŽ6rEæz‹RÚ\íû^sa/$›F[?úIÉu:#µH3‘Zaˆ“HΙÖÿ1eOD©wDÜ&ãm:§’¥©ˆKåO¶èÄ:ü«’‹¯Et×­DF\g.¨u8†ä%Ù”‘:‰Ja²ÌÉ/Tck_½Õq[¥ü¡Hì-HdG~&"™ÅQ•´Ê1©JLŸY_‘+²SoÂ̦¿wö•󉈯A s¬ªü¡Lt©C;1g0ú¯ôŽþ†ç×·îíOÄ „¾Öµã"Õ?™^<¦fòrêиQŠtz S³ç÷”¦NW1¶¿aœ¦bfª*Ô’?d݈a^Cn4Ô¥1’Œ4™œ‹ØÔR¹_EY¶Š1C$„ B%^§t øÅgnÝ·ul¤uÙhoóW“li­5 ¢2"Šž}‘†!ÆÞ°èõ/ŠQ“z‡[œ/:ÚÖ–¤ äüçŒ]—û(´²Paäų(™[ŠL¥™ÿ«¬—d)Ž´íµTªøK7Ýõ$Nm¢Û› *Ûé±Zg×ráõü‹¬-–Jå‘F".—rͤ¡^NN„\LÊ””öî&ô›vTt÷diíj r]\®˜oLIPRUeÝn!=ŽAUûtƺjiÇÔ â2íHAGûÉAޤ'¼]±Œ·7‘oõÔ2öa«kSÕÎÂ~“錟9\ËîzU*!¤Ìeu"àRõ)FU"÷Hl·d‚Ьeܸ}msRüS ‰ôÙÏ´&Ü×´Jû ºŸî4ÔÇ2åå–ž¤™rC!¤J˜‚„!ä`…8ŽÎ*…jº[1ú¸/û­\Æú£ÒMžÞh…ʲy5ýõ2×,d)u·Ä¨”½ÝNèÅzp÷ýGúOøö¯óßï§ê…œ—-©»žÇ?Ì€3ÊΫÿ‹S“ˆÖzQ·Ä R*­½óRŠQ%-ÄH·‹ª¶žd‚”žƒ•# ¡¯m•O”_ÚJ¾Ng-'Ç!É+:n“Z뢉^„xâIÑ ]¤†.F'TëøŠˆY ¼>|]µRub.`™÷>û˜¿@ˆtñJÅ0å\¹¸|"³Í ®;%¸/Ôy#©¤P’ 1ÿµvR*g‘%«Éd©C•f W§Õý»0Ÿ_˜Çu‘ÈlZãiûòÔH†0ˆUÅO„‹fÏD]ñGQšŒ ’}£!H©6&JF»†%ÿÕåã*5L›L"Õ.#H&¶|6©”wu&z•ŠÌu¨N× ¬tuY­D±´¸5è‘T S“ '©©5Èõ#½*5gýQÄn}SQ(¤Ñˆ‚(p …ƒöç$·) ©B,‚Ù4¦Ôî’m¾‚;¶{¾òéZˆÜõ}ß)–Ä9DR(%ïcÅý”ÇŒ¶}Kcí’2BÌÐû¸FÉ (Üv•mg!©ÈK #‰14ãJ†|d Ož²¥Âæa"ék7 ÒOb™Úéètàå,½­%ô…_"Jßħîôˆ2N¡e.‘щìÌ₾[ìcмë­ìäUˆŽ¨¡l=¶ÝáPˆD3æ·­—ÉúWþcÃ(K-7”Y?Jb4cÔŸ¥ýaT1ÛRO´˜Z©èÆ:ã©2’qЄrŽuòZèDDq/”Å–sæ ¤--Ó¸?ð^¥¡Ìs¨ î#A`—íÉùã9}4çÆ+[ aHúä© Q¨ªC–V#Lù•tN4­tK–„5¾D‡ü"+Lµn÷¸¾ªÊª$¬¦RŒœp¥ Kõ8úGHì0Ú²]J—¹w ¶=Än–ÈôHªDþkÛäjjJ’Že+ç76ÎÂ!"î©°[¤œŸ¯ž1™G`ÉIbkñ©ü„TEk ‡Ÿ…„ÄxèË'&. I ¢;±‡¼o28¥q¥ÖåJ³W ½½iª%h¦_zºX»D[ùðýäë8‡#¸®V­? H–)ÆKËÖ5ˆœä‘MqiŸEÇE«g¥Ò‘$sYñkÆOOå³±D᤼J¸C„qR*oCxúˆg—žÂ0ŒaÓa‚¹%®V¹ºuR‘klÓ ÓÕJ‹ìƒ%ù¡JJ(ƒ§ÍN);Ð#ù}jž2Ë k6#Ó´VuÊš¹t1ÖA2ò`—KŠq˜e"ϥדJUt¡_MÝžÊv9R¤üãj`å‘©bF^Bå-¼‚ª„+9?Ï¢%ÐI ‰Lÿì1ØÄÑT‚W²èZ_ïÔPd¡Š”¢-sº&ùŒ²Hé1µ7IG=Ée¡4ì`”j¦s,ýº­ÌWuOM¹¬ÍBåñZJÉÑY.$¨Ë‡Þdfrµ '³%ês 1Wˆh’Zf˜Ö8Š!=ú¤êÕ}6Õ+g­‰”¹íÈb³#~­™É»QŸ5Jžª…öóÎXE¡ÉçKL’çξ‰C`¥ŠJbÂUD‰½…RH¦$Oiz¨Ã䩆Ôt©¦wÔªÌP¡P“Ë–:ÚQö%SQê‹Wzr¶¤NåZSìuÌ£’T>HE!C<Œ„; wÈ6k‚¤Î×L¢QMœÕqgU²?e¶–¢£‘*6e*ùÉuâ·¨ù…ϽRÒŒôv:ˆF¥/A,¶¯<©uUÍ*Gï}Ra:P­fzö •·ì¤dùDwzíøIÊh!Aœ-÷!Í~s˜ûË3ÒDc/nçI¦–w•13ê®WRËÏtÍ;„:Tì†$bwWR‰³EnkD5”Œë–·½šï–abµy —µnµ#ºPê*5Te\uÛxµ6¤E(CÊ„VkcjÿËGë¤B­taLå¤Ä‘ÊïR=3‹¡$"˜šE¹ì¾ûg*‘Òp£Š>4Ž. •Jlbð¼üZl´ïœ¢”µq9”®E¥KË=\²¾N® äŠUbæd¥+R‡±óì·Óh„Õ)Rê[ªñPÆÜl0èC“0¨¯è„±nƒ{qÃBb¨„gÓW<´ã"¦ÉD©ŠHSW#Ù­K½D5L(˜Øµz¶^[.L¼siD”³„ ¸¡“ÑCb0ìU²?¿`µ¡ðü|#º¯Hw1?ÆãÛw˜ÏC! +¯)ÁµË„â˜véŸH¼C.í=j£éµ™c8ÊópK‹K*ä^S.áp¥óI.×npĹ”«~AIɳ½„æõ›JUZ c ì"ù½H^a™Hšãaìo›²®SDB¹ WâríqB"DÖ%…³èQ*Ì2ÙU7 ÆÍ ßh®b>-’ÔB›_E7«HßÚô[ áÔV"œõ¥¹3¨í–»\DäÐÛzJ”)lGœ¢i“dÓæ ‡"UÒ÷ªë"ˆQ±›DélÄ;Dj¥H¨N>:öþ:¾#J­ÈqNŽ-­U—:Fo$‰„˜Ú}K=q1ÝE5 ;™´ZÎB ºDkˆ B–WÇTm¦*ý|l*>cqwÔbPňô°ž’ã½× s¸F™õD”ù…!ÛÌñZ²#«U쥋¾®ùT!"’¢sÞŸ…âÂpœL§Ý½•jKzÿ°g‡ÿøÉ˜nyNÿš€>€VC*øØ ní´2’pýs„ Ë{þÌdí †¥^ÇWÇâ¤Ð©l!¼˜~Ä‘;)‹V£­ ¬S5r¾²ÕA]ßLgV]'M¦·#× „'ÒûêÌ|Zm úÙã‘Nœ©§u²ö™DnœA™V†ËèT"ëÞÝÄMÜ¡\£Kº‚µºØâ±;/+ºê¡†þÓ©T˜åqW±ˆAâf«˜E¥Œd}çÌ+^[g!Y„®¦4ˆ½¹î‚ð•üIÖ‹Æve$oµÐ*Ф!2nTÊfÝê9Zô•DBkîXêLRÊ­½[w*Q¥Lüâ)bW^ŠQ;Oá\ãÝÍ—UÓñ|®\\ùV¢Oø%™¶¤â„rR¤R¹§‚»i7Œ!5÷„aWQ 8„cM\D#ëЇ¥ñsVCIÒVjó6æér©-ÿ׌Dí}!:äò„c9OÎìªêWÊbúœ¢³uP¥‰/§ix÷Íë²b±*Œ\—ë57ìgeOâ•­YS6ž0wvì©)2Ÿ(æY>øIÙùÁQÞßšv{ä–LZSƒeÚãˆ1ß"Úçz®ÒAþØ”^»mfQ{²¢©³JçþKýIçÀ¶9GG­)R<å·ÐåT-=¨2—ÌÍ3d…z¡Hâ!ÎÊr“êÜÜ\ ¯µÅìçÖ·[0Bvjÿ¶Ó=t35ßîw_;ªÄ"¡.îAŠ—4ÌÄcvâdŠêž1b&ò‹VÄTê¯ç»3«Ó)êªmqËI»èƒŒË9Üèi-^**?•”wÝV"g÷uEç.Y‚‘}ÍU« Èž2áÖ×QQ“RL¢]vDc¬*JJ,C Úy oÎP!¼S°BR*†™Ã»‹ÊB˜Øa«|©ÖÏ@€8QÛaŠ‚Öà’`¥%áŽR•0Ƀª•Æ=DPÈŽdÄ„)í:aÈH©°´â …á!„ºq™ŠÎŠµÑ¼Ôt)zPÙ¢?& ÞR(µ"!ŽI b Œ$ä' ®–œ2œä)R9ШíŒf  q c „Í”fmD4ìS¡ˆ®6p”ª=x"¡ˆ/ ĵ ¥B\!)DA¢[Gw(‰@@‰F%A„nS~Æû 2±5} ˆç B²®C֟”ðU»t±ŒÐÇCˆŒ†A§#`±8Ø51˜ÍŠ(ëÁÉk# ¦tTP·{½ —pì“®+ˆ—ôâ2$hAŒŒVJÙ˜VÚ7ª» q„æD¸ N(j4V`†gB·8£0a=B« »ÝgˆÄSd2)-”Õztá±(°ÃÊÅdáTx‹TÄ0Ê*"@Œ¸%îA ˜c|îpì®(‡7Œ~ö{è‡%æ!ÈŠC65ã2q3H!'d7†zþ¼ÍFA™GÝ=Ĥ2D`Rr›CB û()Ep§f¡ L­ ô*Âæ LXŽAˆ ›X8S‰ù¤$HaN³HcMˆé®0Ä ½0ÐFÉ3qMHj†Eâaë÷Jµ"ŠSs^§0ÿ@é!ˆ $ë¬ Ø÷œG†1ˆÑ8"±±´*ª©š¡Ö?ë~Ì^R¼+c #ˆA&ˆ0P¨fAcLWAû(J¢2ˆÉ=%fÆPÇ*À\Pݲp‰VT:$+TÍÿ§¨†…ê¯4Ç"Mƒ2fœb ˆlÈŒ¤!-ÏíËÊå[Èzª¯y˼L1›˜EÄ&ƒ aé¤Á¶þ7%YE')jJABö¥™ï43^uAIüg4çùjÕ!` …(ZMR@Ÿ±a8Óˆ.«äìq´)ÏAÒ°Ìe…ÂÂ}Q¶g@ì0„ n4Ê#”'%6+‘öC‘ykõåå©+KUñü„™4!³Ì&†oF˜%‡ÅíC°GAaÓ"öЛ).)DU%b š0ó)Ì|Ђ`ÔÑ^Št:˜€Lš…+Њ€  AÚ0®O^“¨mP±ÅR™—úrë‹©ŒÈ¥Ïò D1˜„„xq\Uc’%;bîÁÈ:ñ (†èÔ– 2lžyÌB!«¢”×™òˆïj’¼þ7!©PÓ‘¥Næ6ä (E"QžB“Œ@Š#„|p‡IÃiÛƒxÅ"­S¿z+vwÁÛò1=åË=#„Â3² B„BŒ~e. Û”÷Æf¹Ð¥Ää® zêQ ðGr™BbT1k)TC³Â9¨âax¬*‹‘"f§åUµFraŽ‘HÒL!˜™=G²D ‰ˆ¢r¬‚.B ½EÌdE¢8TR²”e.£³¢b,|=Uâ+L56m¬0” d0ÈøBb˜„$#‘Cê«Æ-‘€Rõ ©f)`¨s²!LD4Á3!8Ò™u5c2±‡#z:Œ<ÅC>E5AznÌdI:ž @gÚb¦;Ô_ù8È)‹‚2«WD"„„6DFf2H¦â°èÜ ³µ)2Eü%Eœ!˜‹IäCfA¥ TÂÁÄc˜ð Cð¤p¡­¡Øh´.%väDSkY5! õ „©È:÷'mB ‹AGÛÓÀk€‚(Ár Âó xEC™ø7QBBžüzPÀÄ÷Q´+ü#°ÀmI7±;â+ßÜÓÛïܧÞïâç:ÎH·¤sž§Ï‚÷í ,òˆ¸§Qì’ |ê\s…Mq’\# vÜýY|û„áthxŠYËꂨbŽR­‚­Yh1¦äd_zuW]ìI«.Üm>v"Ñ4•n ¿ç¡WÔ‡ t ‰+Û‚­TU¥uÿ\Q—ÝH$‡«Ï¥ßæ9 øäDä²Ä(½ë¦,¥"WDëßÖ‰ÖZ ÎÊ‚;ÝiŠmB%‹ƒ B1eàBºG%ºö ¸ßY­Ìë¸K—L’1¤á˜D)ÛÞÎBµšJ X‰ÉǦ¤{I{ž=1 ¼EæÉK1Ed´–µµÄ ;3*E#UèVQM³W*J‰†ÖÓc¨­¢ fô1\¦ù(›Ê¹šC?‰c<ÍažƒõŸ,¦!„¦"ñ˜Ã£²9*ýW¾—´JƒQ‰ ØÄï—M7Ïlµ×"nïjQ'd³'°¤^8§TEL"?o™|éóìýŸÛh—Ÿ†¢“Ÿt®LY­¹G-Ù*‘é§[AÝ9he²ÌV6d¡ Q4”ë}ÝÅÃM®B!žBnR‡Ò¬S®(\m‹ÁRÐÛTñ…J»ü…3û-«SÔqHBÈ Q349AßRá?¯L‹ä–HµÌÈèo# Gœè31 "HìøtÒ©^WÈOF\Õ;RýI"×þŒþÜÈ2÷¡hòb}ÎÂÊDj•#M ŸòrTë)CÙOWÉJªÄv›„RPÆDîêõTt²Q—ÈMGu '+3•2©BAŸ±/Šb¿DK¡HeQšRé „.øªj_3xÏŒ„Ä)®"•˜íA­¯ì¤-_ÊfsïUjÅûá=¶’Кf¡QÚÎErjINÜ#-H©RXæ ªV7–I†ò l&YÉ®YšÜ{´‹ÉŒ¿“i•uW:ÄbªF»Û}r¤d/—Ñ;”sH…aq0™J,­Ó¨ÊÃ<¤Ãˆb? KK“[ˆm“9ÿš®í«ITŠgC§±Åy…3]T…+­L”TG7Ÿ3k׋Y&Õß'š´9œC蟶‘Î:Ȧô¨Ìa ‹®E2œõx¶N í‹ýÜ|^:«zoîjEgÄ?µ‹Ø›†ËW½ÊæZîõIA\¤o#N²Ô5¿7á‚?ÖÆº¦Då#q©.›ö.×džO8„ »‚¿ç+hC°¤‘ØëÞ¶\¡ˆ(‹) rbG ¼W(:Å`AÔ¬* ¡„)ªã¬co¨—ˆÃá*¶*!ðRÌ]˜l11#Ñ:ˆ(‚uÝEÅ7ß;|Àœ1SB¡Qn³®(r„8gBá»2ZÅjîUjÄèM8í` ƒ*k£•C°tFBy– „Dï¸eŒ†î0ÄS á‡L%R›²£Î;œ¯Ý'ß›ˆl‰XŸ9ŒØ1! !¶2 Ézå!y]iFæ&0X.ö£¶C(ÁòPH˦XF;H@¬H ¯‹JÈSk¨ÇØ$SÈ8‰ÅÁ¹½Fæh¸â8£ƒ…ïùÆÁ(…#.˜Â!1•" M a2ˆÄ(œÒJ}jÞ T N¼2*sͲ= ìä)&0<¨„¹‘ J50¥Ll”¹"cw¥ ]ÈÒbŒAtp@RnBŠ‘`ãZEÌíÆx 1r „ìp¢ü±†´Æa‡P#„6棔QKySÎnÃÁXJÜ„qv7A1;:!¹‰|GÝ ADÝi´kÄ 0â “0^9›pÊÙ»PÊ#PŽHQ˜yÀYœ A)™«+\¢ÈQ+ ¢QÄ(ƒ¥Î"¢«ì9CÑŠ`t ÜÑ0­5 3±ˆî à×§A!ž! “‚ÑÄ=W!Ù†kT …؆"&j8Œ8Ä„r®ÃH˜BÒ: vhD¯NH™ð‡¡Ð&—3C£rfÊLNj†)+ƒB Q4B¿>ò­îeé¤Ñ‰9°‡¨ü圽T¦m±t¯Íó™øÔ&„$ˆÈ£2kÑßÝ.œr6»Uþé[Ë´©üìÎUR³¯LÅi/Ǽøætäú%Ù:¦vU•Ö”=—|’¢æ~z¸É³Df~±Î÷lÞqÝ¾×ÆžÆ^ôý÷#!ܼNbxÊ1z¯RPÌURJ7Éc•´Ò¯PW~¼Ï›ÿ)9‹¬YYJ“/à°‰¼'5èÎÇJ1zœ=IRÿâˆlšqDFlÊ ïûX£z²¹It9Ž£,¤ÂW~ÄÆ\D¶Òè–nEsBˆžIPçÿ‘bŠPE^- »\ö.P¤¬²ÚâQ3Uj:BRœŸßftgq° ÉI«gºF0zõ®.iÖ´¦c‚$µüI+1åùËQ{{¬œÎ*²©qœÖK±yRj,kT–cYOíH²ÊI$kœ’ÚYE'¡·ù3ιµ–I¯!EWÒò·ñ3!eCÒ“9ÁÀ(hpJÆT¦4jé½T¤yæ„BBVYè¸d‘)åâ£#Šu””3wZ¾¹œã›ÓÍFÖ¾ržŒAµºURÔD!hWE+eluºS’è¤ã^H˜á)¾KÖfpÈ;z†’÷Ÿ*)„D¸Æ)…k“Œ;ΦÉ){Þç%GļðXX pbGž¨ÕÓ¦*x”—§!h 0à QF¯µd‰«©ó• ‰bkx…‘)ê‰?]…‚‡w u«QÌ„í®6sbm³žUz-[Ó+¡¶É)>«Ê+ @ 1àHñÀ`…ióËZÄÌij.{ñäâ "¦³át—,ž˜¼¤:) ¦)ÁœºDêâ–7çöïxÔU4Wö˜(רW-»kš²º&÷Ô dò&b v±+UÐÑ cŠ€»EeiQ®Ò,‚²%Z¤0@(€Ñ°:ÙÌÄßžœÝN¶Âtýy\•G¤†|›2Ä´ŒB,PÆózPÃ)!yâs…Jr°šGâØ[Xü>ÑÞz6@bâàJI³©s¼­8é,¡Ûa»«z&¥u+æ!8·q$m°@¿yF³FQ6ˆUŠÍÿþB nR5d]Ñ>= ã’ÑæeyIÁëÎéF«—rE0¡¤˜*K8t½xyzáKJô²gmɳÝYKUdF¡Ngc)Ÿ®Z1XÍÌxÍ…{'S%ÿ¥®™Ïcš² R¶°ÕŸœŒ¨™#ü qÛ“%ÞA/^ÑO)„»…TRP=ÐÅ®/uØU,ª]ÑŽJ”e00ä§("!šø¨4|¤ÕÙÝD럼êw3¿1¤–²¬Æ” $I€„¸2SÏE5ÄÕ†ÁÁ Q3;²‚ÞU¬ÏªðFrT2U”«î|5T³²ËĵvE£÷Yèáo ÊSâÆÊñttOÉDˆ0 )ÅŸL+ ~%ëÅç®í|”û-&S7ËK­NBKµ4¢ù Dg(‘Nb‘Šq.êŒ&RBŒH×Ô$êu¤„ºQÙ/Ñ CÆ@#£Ð 1zbªP$¦Ëlöù¾%ç KIФ[Z!¿Uˆ¬U¹L‹""Ý ¯ Ž.8Ä>ŠŠ¹–_â“ïQwÚ¢0â$^½BÄü‘K®F¼pã•È*b4‡ë©0Jy9 ¬Óã=Q¤t{TÜ"#¬Çu¤BBÙó(ebü‹#% „·\»Eɧô”ÉÙw¨ÿE‰!Å*„JD—(öÊéé\G–W“ÁxM)eRd”QnJ•tÇ%™LÎÕÄYÒ±×[ã;:]®SÊb'’Ãûíp¤ª v/<Ý%‡rR¹¤a\©wm!eBwO =£f]™sK·"è÷÷é®–)‘6nZ§°Ä-É0Páõc‘ñ˽/ÊY#y] ’#±T' k-]8`ìÑ?ÃŽ’N6RÏbå»ÄÜn¿ç,Jéyóp¥"jˆä1F³,ºrãRöxÎ_&`/ÝÂ-9 Õ¶¡dysÿéþOÌ&'+0q îõ⯄’‡©¼÷E`’%nìÆ“‰þi—dM>WI©j$ÎÄOL1F"gMcýªv3}0­*Äf«*©¬œYPFp1ÏñNtq¡dùê>­eí³›+Žg\°Ò·#:¶¤S¤"iLs¾BzTQH…É“Z©¢uŸ'· EŒBR[i$¸uY(J´@‚@¬z`v˜>–¯LÁ’ÕlrìÏc½’ûb`²%ÈK©¯Ôm ’,qH¶R³‘¹tIo(s¼z%‰Ç+)'|[HZ6؉£º”q‚£ÐaÎj“œ|~§æW»Q m—~—Rpø]NcÑ3 *ꪕˆCˆ$VΣKãV[©V÷,ËızÖº<ç)Øû=$P‚š«éÅ!qÊ_d:!ï ¿ÝG! ÜH‹WåôMò-zåæBi%¹ê•yبE(1'LŠÉ¶Ôõ§&©½ó¶‹#*Ñ{Ó1KBY YÄ)ZÔs²jéqýñZÖ]µû^J’–ˆréìs IÅ-â¶ŠÁo”ÈCÝÙ='úñ×Cž ØJÈ’ÌW&¥µ\£ÒJ)•ú9ß0™I(RbØDÌ:ò AÛ61HCÔ©ƒ"}PF_Ê1P˜ZKøª]~ÒíŠìž^F»(¦}"aSŽ@‚ŸKºÓä„vë§`¨qKÔ¤‡zÃ0Á;;Ès)ntG­Xg³“ÆÇ½))µÄò*ô¢Ïåèÿ3Ü s>ÏC6áÚaÙ¶Â]™¼ºëÒe¦¥\øOG¦y‰{uõ*„¢·¸£&k±ÍÚ`D:„m%ê?™½ýbÉ5dv¹!È3’„”½$9!dMÄôÅ×Ïm^©m?¢ J6#’Ñ6Å1+rwê*ݲ§Ëã1Ka—ûÏob $¿aY¾£±Ü#BçW!†:ÅEÚÙüœ!{nÚ²dŽÝÍ ß4œ'·‘hä’–þÇ(¥е_wªb R˜Í"މ2¡øE1©| òÅÉÏϧ?¤% ¶2Ï£;–³°¯¬CæBÛã«ß´S:ñ,…Ø”í>Ër˜B"¶úÐ¥ì³H¸ÿÄ+ºá<²ÑhóT¦¡ª Æy&È´ð£1Ž V½D2M´ VŠFnäëtÅo ¥{6Rñ÷M5,R¿o •–Ø¥gOV!È1Æf©X«IL3Èæo£ëÛrfÚiäªÞZ$Â×Lá|óP†c_xRNr—»vTv5¤S×0ÈÛ‹eê;¥%uCŒÄ°¤D¶ðb(‹ªÂOŠå$ó)e?б6:%!…ÄÙ°]¢T@Â60E)¹mkS%$f;ìè¸ö7™ÎzeB²7?—xU4ÝøÅô×ÄÛW,&ˆ:zm*¬Fª¥•šâ%u ‚Z$¦V³Üg9 '§<¸rˆ!oJ™¶‹a†Mf¦ødd´‹ÒTM‰$©G{RÔ ZÞ/mÌBRsÆŒœÂ1Î ÒR$A Dþ¢·ÕD:©á<ÔòM…«íd½±hj ‹T‘rÕ£¸¢¶.»4­£"gêÄj©,›|Â/¥!V›ˆ¯„ó*™µŽÜ'Ѩ¬DÁzY·I§ß—ŽÌŽÿN¶¢C1“‘ŽQ Ê0 RåýºŸZÄ ¤×§Ú»H•› ’9(ÈIåÍ5]©S°„Œ¢T+Žr9Rõ4ܱr£µ±‰„w&«y»O2ãáî9T½MáäÛúéqˆ¤~¶ÝÕÈÙ®£ãõÛ‡J™„tFM¤‹VCá´7ñR«)3žüMÔ¦Ö•««3ÛíWbVt2-RåJV’˜Ç¤"ïêpŠ)¸ÃÕŽÖ=0L§Z†YM®›5ß“t­…nS¡RÄq…•ä­KG\ššå³cÃVm=]‰5*j]…“&U´bNá„}u¬«Äs%–ŒœéžZbwW¤½ "ÜSÊòí•™¨Ñ #QØXû…_jÝ»5 S2ÐݳµDJ¢!›~ì0‚-\¹ÆåÕíã´¼ÏT¬½Z%cKÅÍOÖ¨˜Š”ZŸ ãSÉ:t)û{ÈVìP¤w^µ 7v;Û%ÏÈC¶up´çbŠ´lÑf­,bbáY®bܘ¾}¢ÊrˆÄGäÒˆYÏ"šÃbùŽ…d}¶_9¼“uêesVC‘;¥õôÒ¶7­Œ3–*Èmk )u—Ô„%J…NtÕ¯¥m–—‰ýytH¾ò§š4¼«×ÙŒshR¡8eb+â%Š*JËŒJ/:¹v‰RdcbP¾6°ŽÅɰQÿ*Ò'ëJ„fËÒIö¾ÛîêØ¯b 1ÖQªYSÄ0£ÕÆ_Y‰NÏpÕ®,é†B­ä¥²B‰Q@ï¦2Ä­na„;9ˆýµ‘4¬!OUšW.•|ñ¨bc£S2˜YÌØq¨bçV­Ê¤’î/žŽyN¤6”ÒÞ@›cëS¡O×®RˆÒ—Š÷T;”¹M(⠌ʗ¾-JO»Jrèþ†-«WµÿÑx†TöÛ+‘îö¶Ò­uF,¨IÞD)QíK–sÊ@1D5”¹»¥¸éG —L!<·9(ä9›¥·Va?{;©jÈ5µøkŸªpɼåBˆÑ\§Kg4BiBTÍJØ/KÍÖ’|dÆ-nµäæbŒgUcZŒs9°C!©$²šÆ±gFjYf=ŠÅÜŒÄUäèÎNW)›Žž=»ûŸ;ÄßÔõ6Ò¥`Ø6ñ2P!ÌuF ¢c;\ÄOPÌ#’«î¨…¤‰fîÞ¦+Ûµ5ïûÖïÝVçtkÿU s•–ˆ«GÚ2±y•Žê1ÊëKœ—™£ÌʞʢHD3õË7é1*; ¨½~~ê»1eGóÑŸeúg¢©áI–õ½Ð«!P*§§ õ? ”"¢REܬ´u\W™ÈÕk6u%]+k:ôžr5Šœ33µðj¦SŸ¬NkVÝ Z óWÌùä© ŽêUzSak®òQ¹ú")|BzžL¾ ¥—(f¯ª†z>¾¢!ÈÇqÌl?TŒî´®ó+=íÚ·b¹Q ôÅÕYÌf$­Â-^qˆrëJˆ9ïõ¡¿Ù¥p‚m{ÕRÈf!Ü–0’R˜¥UÊê¥ ŒF‘u[(m]ÿ/4LZú=SF¾2‹Ó%.ŸAÈW©˜Ìä÷®bm_Ì–fˆ÷tmÓm3[5ý k\F«»Ä&׫³‘†.Œâ¢‰ML ˜Bð¨âª8Tó#õübgV**l[#a Üü¯ÃíªK+ùª”!"lÕ±šCæT"Kžq*eºJa˜)Å ¥%HþGòsë$˜Z”èÃõ-‘²¯“8EÞ¥7?¨üA !Л•¡WJ$¤©Ü­ÄEái%M‡îHeåº)Vì¡lO#xavê·š NídÇÑÄ­x¾jºÕ)fÙUYèZžˆÕ-•§JkËÒ„b‘ -¹tÙùÿøÉ¨pÚLøöùö'ö,öëø3ùÍ´#\°—¹ëìü¨góÞs9ÕKÄ^v9™fJŸHîkU*þSâ-i”ŵK•ÿ½‚x«uµ“ÑWÛ‰¢nb%7ªœ3(¤cÅþ-2€‚šôÃ)tZ³t'\GÚú™,#†9%>¥k鈓o•¦9BdŽï'&m¼¦MêÔo3ò{¾RôìÄä_]…â$ùzIìtj3ï!8FÈè½L+B'¼‰ˆ‰š[/!¨‰Ž|X”6Þô3}ñÌê„16¤ª°í9ÅǹGIŠÞ_rYJ†3ãÍ¢ÛVÕß¼†)wë9„ÚÒM·¿ôF1UÅ**˜•c«ñĉä'Ÿ‡zªQ¯¼µûÔBûœÃþ]ýr«êA™Ú{qÌ"3S$†úÆ !ufE®ww:¢§tS,aŽ0MÞ ëq¢Ùù zá9¿uÛ ª¬,„ëŽõfÔ=‘Eè¼_*Î¥r?’c”É2Å9miþ„Ôc‘í<§_ªÃÉj[Mv°V@¢1ãýKw]ÈÖź¼È]¸e¦’¯›¼Œ².]´¢в±\¨¸^îVg*èºö-CŠÍ?®”2ùk»ÙòÙˆé£ÚM!Ú˜¢¡ ú®÷·i¨[a©²s§ìe9¹©ä«ÑX”1AË$öŒ ãrÎRû[Òù^ÄÊç3ïûØÛÖ²ÑùWçÇfubÕoq9Ž"ÒN¾bDq™H‘!ë«uÍ×ö壔¨îV%e“‚E®… ÇÕÅW¥õ}P—q¦e ܧ;ˆœDѱߟ·•,$¬Ä&²ûrØOj–vnÚjØ*ið®õe(ÊbîH}‡b1ÇÒ¹Äj«U-ˆüÁ*]±ñÖsh«[é"+ÝÒ9ôúœW¢2ºÈúWQ-¦¢(æ;â+Íûû¹")&eBé~[&–“m4ê\IJd(¨W;©rÕ]$˜„ãòxïB­•˜O¥XE/×›jÒ)Ì<¹ÆêB!-¾Z0‰1¥7–¿˜ÄÁ$Gñ˜Ì§UðÛúÈdA†ƒY•OÉϪ¤ófW·Z‰czöcy+¨Ç\öeoc%«z ÔäF†ReQ^Æ®öÚˆe‘qEvR­;sÙ©ýc–ܾ3Øê'ºÝ¥ÔÔ-FsŽ™œÅzø›fSd»¤æQLšÚd[ù;DÅü'1È äÓЯ ÑˆÄ¿ V%ž* sÌߤǫ»Œp®˜¾QKܹOJ¤ùz ›b½°½•åv\ãmSn³ ØDIzÝ"ÅC5dz¾!LbPDs5_éluj¬ ª*‰‰Òµ÷öf¼žÅh³°TÔ6/:®&¢ÍãúE!ÌÔ6ù1Ù=eë„A•]icˆèû"™ EÅ«rN–`(§õ"Ê$1 æFׯ}¢²ÛÑÊuGÅOBçZÏÏ”5W¦ßUηozs̈Ay ìÄt›ßtÖ1 ¾r…l5<™ÂªœCNÃ8ùAWcþËõ³2õJ:°ŠB±Joµ ²þâ),ØåC§?©gKù1Ís ­j®¡ îÍ=ÿ¥|þ!¸BcòÏÿÎVò..øb‘ÜdD“h¦+Õ'z¿6ªº²µtÆõ‚î½8i7ʾä»ÈJ6²]¨’­Ø„ñ*ñ ÅÅZ(FR"¦^Ò7°s£W%n:ˆ©ë¤¥)Ö¥º¨GÂaë|ÆFEöÔݪf>*©VEELÐüO)Šž[',ŠüôÄkm¾¬ŠÓ§X[z|Àâžö˜FNgld;cSùÚ¥œâª¨uçGB6~6•ÿùšZŸþe$å©*§:r QæÞÇãÑVå“éCœB:0ê¼j­wrëg+*†BN;!­L±µ×ب3£‰ŠÅ&¥–¯”U!YlúLà ¯„yXò9A Òç \¿·atåôÓ0Æ/™GV-Ê[ F”}³È¸äO_RÐYTŽG©·ÙèÒ rX6sÊûÂ5“Z†Õï½Xì¾.LD¤X‰wr¾çVË!(AŠü?Ù?ŠîfìÇ¥7¼Ô¯sø©ÏG²i³¸ƒ“JíQ}Û”†)Ÿ¬m¯ö² í•=ÈEOb­D(F4Á8=s4¨¿šçB¢Œ—jQslRò7©ò”LLˆÑ°æ˜¤.Uã¨Y7m“}^ïAUlÆQ6Øž†ÛŸÕ®W:§§ö_;ÌA fßÊJ„?YZwf~—Mö>f¦êmD ÄÛ¤„³ç–)Ü“î]R¾k%PÅAõk`½ÕR¤…J !žÑ(²’›&I¾Âšß™„êŠt>fþ—£#J¸¹vN%+cVê­CÌTÜÄnh‰ÚÛŸzóhüMÎ[g‹ô”ç.9LêQÊF²Y SH³äO¼­"€U@. 8d“7‘­÷F…X6Ü‘ê¢aô!š5¦Q ¸®œÅY”Ž"PíEÔ\2ÉBe¼š-›j•Bkå¹=í%z¥+º³»úôJ™}Ê)囕Ñb”ÄUÔú©6öê+éSÄ|ñ$œ×LeJ!¥8ïwBU‰-¬vgGaDØÚœÒ(²úY)֮܄%h”(Íßm·¥ÝPbœãšØrv"ñƪŒ„*­<¤b:S6ô)YÇ1SäŸZKÔìÇZT[Fµ¦Þ?×$(†Û[¬¡’¤(A+ÕrA]tPŒë1Š„r¦È†’Ý& BûùUx–E¦ôžú)¼«ÈħPÊÎBlGüÒ{ʧ+"ŸIMoK/ŠaÊ)šŒª¤{{(è¤ äÔÆËd­"W_¿âÉ™Ä+;q èÌZ£Jîd™(ìÌÒ Æ a=â–JO倡:Y [ºY}E^:.À#4e©÷ä@A%xÍ“/2 !ÂЪˆ­aCaœÄ¸)P¦eªA!q†‡©ø‰°† RçËEÇl!Š%Ü”JÃTÂ@¬hÈ€¥í0oˆÐJV¢¤ pWã†FbF!û9 ‰ç"w5P ÁŒˆº˜£:¯åqÔÈ1Å,S¸€~Ji¡± М.†3iEhÁfq yA`´QT£ËQÄ"’ã.Ül Û&ab‚%C,Ùq Ù¬),ø´Ü90Õ0w(‡B­—f®¥-a0ìu <(,GMÄv0Ü1`‚& BkšŒÂ2  sp¢….+DæâªŽµpüßåÕd)ù‰CZ‹Å0®¼ÆqÈC׸Ë!NŽc‘}-ü¸9LˆŒVÏ}6»k÷™óÚÆZ±1ÌúÒWóÒ„ÛS>±tä&íýNg+X¨Vë¦ÿ!pEv£ý„õÓH„U~üz¶²õ Ü’HŽP‰2 ²«‰÷÷I0¦ßÚÚøé‰Ûjq)Ù¥•­¥—_)óeöQSýB*7åÎ •P…Å“ *%.KBW©…N Øì©„Ôs„êŸÕt¢§Ñõ c6®çVÔÍÉ_‰J~²a9½²–½ÙÆuæK.¦Ù)XbúÑULCºnây“‰»É–ϼÊQÕbŽÚE¤¯ÕÚÙäyÔŠ‹|Y³ZÝÔBH¤“}øä'ßñ¦˜âœåÚCˆæ6x¢”Ä#a”w ŠEU¶½ÑÛ ˆ’Z”^=\²²ú;/Çò'•§"çþ•pÅá E_"Ì:Ñ^ø¹T)R4„¡sD6¯Ð¹Â¦D#¶ÖÿBnkQÊEËÄâ$Ë;ÖÈåR¤ëaÝm×~wLï§R°®i­j¦]µwÒäÔ²$‚Z¼f+“qˆƒk9˜šÉ(áßj˜äúqÈq ^_jµäìfæ¦=Y°ò.¦ÚÄÇ%E¦<‹¦K%5ÓGF1V¯ŽÆÇ£)ÔÄ”›¼äƒ}±QD+dŒØÙÛJáä¹-"“}è›KÚÚžC팮eb¹®•°…"¡ÉÆw)>Ƀ%jm¾߷ËU¶Vb*¶´eâ•ûŠM!²QJ…ßÏ#ÍJ×ØÊ„É#çÉ”‰Î‚w Š® Á#QŽ„4ÃøSÒÚ¬ 1i ð/ 9Ĺˆ0HX%>¢ÁÌê0†vŠÎSð¢µ2ùIq š(„f®`C) 7>+ä0L0T…|wS¡ÄXC‚òô/CÅG  ÇL Š+(ù£ Ì0Á†¦<"ÎX àFÍ?íd²¼ãNÄp[•Š„t!Ø·¤53 A1IªBÂCè…%… ™™œ¼çbŸ„RcA”ˆ€ø ^¬Ã A,ð,H#yÔ%nRH3³¸ÆPŠ30`Æ-p‚ÈK„T,‚Š (\/UÄQfF$d¥¼0a†Ã#ŒËªmYfžt0ã_á­Järh !%ºŠ€¢PE8[ÁÌzH]”¸~Q 2`’((@1 AÙ׉H˜šÂÁèZ9¢ÿøÉ˜q$NÆ„ÀJ %àlÌ“´•$•8ÎrײßÔPTó²zEA_æØW› ™¨õ–“z¼RmˆÃ÷ãšÖÔ@a ºí†Àß¶Æ`LÍ-éŒ  -ÝÉDÏiE•WÀ‚š›°S.“! Ë….Í„•Ô½ÉPei [ለaÄ€b Cò`0€Ð Äîh8KC3‰d9ŠáeÍÏó£§Å¼îd¤0a]tÌŸ”ÊHn&ÜOu`–’àC›E¼ô²ý‚´!QuJ Ýç Ší!½bŠŒÇ%DáˆìÅ!ŒÂ+®Z 0)Õ$2ŒáW‹8ŠmÈb ¢g`ÊF†¼d~%lÓ «H¡ÂF*B°´ê–óÐPþcE… 6!’!81a' %lb|ˆ‚f!à–į’¢µ"ˆJLŠñ.RÃ8Ø8‹rˆZ5>…e48aÆsr CŒA aˆ)3a†œ¥ÂˆÚQú…"‹ÓŽËYy:‹óF¸„˜¥BÁ&%ì\ŽØ1*«8EUBdcµPÈF`¾8Ü‚ 2çAD¹±W9C*Ò9EQF蛕¨ãe¢8bCX Tt­F•ŽºÐš.ôaXÇQ„hí½ Há†S*à†`f÷?ÄU1GJz–™B°ê:çŽE)BoF[ƒ"*%£ Ø l0 h1D<ÄÄ0„4ˆwðQP8‡ŠY‘ó EØTÆ“/b!9Dáˆb’¤ý $¤ÁqùTø&‚h¼Yò°Ž…lP*MÍLI_©ƒSX"˜gä0ÈÆNÚîgì¢Ç’—GRGÚ9*´slF0˜°31¤ Œ`#V#dq)äÆGT»â°QÙÈm8î^eÎä †-ý3*D;ÅeƦÄAjÍi£dÏÍAà ØR††!±Âšìd£dþ‚¼0æ˜1¿ýÒ]‡ Ä&!…E‘YÍt{Si:âEìb˜æ†¤dr©< 30\ê¸bFG2‹Ø´G"*ÒˆU7Φ(ØAÃòæ?\^B Ñš£³w© ’¹*-;9á2 9ò¨Æ)”ÁFA‰ðÄqˆ.îB¨ŽRœK†TR¡Øä?ÿm5ä`Âb‘QŠ¥¤ä¸ÿÅÌ:±Ñ|ô&2‰ÑBb! ¡Žl‚D¬øoÓ{L)\ ¸Qb^5¸`¾©þ8fVÂ# ˜£R F‚’”Gt&"ŠŽæ[úœ!Ĺ´ñSVU*gBL-zö« „ñLršÔHA 6@…ÍÄ#†ƒ"¦‚ "hú (ËH«Šàsâ´O‹åtWÇ0M ˆH>´`N ¨0Áš‡ƒ H›:2˜¦ë‘t+>WÐå3ä3"†®<”XÊÁ·'ä+x^b#FA^:ÙÆR9^eBzœJ1&U6 gMQÄWª‹xg#t'7zV1a ”0ž°ôŒ!›qzœ…Ä8q ¿;B³ŽÁæ\¤JNNÉ” ¸Ðf‚[Á¸€†±HÏh¤,ð¡˜ã†wo›dC\…-ÂA#qÂÁÙÅ¢›*™H9M^¡W„µÍ‰"ª„BÃ2 Xd¦©ž‘ Ã$ˆ*jäý܇ ÔEÇå@AêKÛĘ$"3„GC¨œ\é¬8Peüì¯82± θ$fŠD"±9”Æl„8ˆ.Ð!L¬5¹Åœtçx†b-:N’ñMÜè!BÉå'_jÙANÌcVˆ<*dgÅb:ugn´ƒ“Þádߢž9ÇCÑ êB HºTC "3hN  ‘˜†ÄRÃnsMJóÜE—Ó%wÉwÔ±Z¬†Z•·²FM·9×JC‰/îô¦rÜ> eWóyÄò0Œ"²’´ S¡U]NQ˜„Å+~Ö®)IJÔ¶/؉|çõnBñÕ«Gg~PCåW*¦Í0ª„Z))þ¼MÛ¢[òµR•ßr³±B&è®}%Ãõü8Œ’ÛÝlu^r›g­ˆe—™VµÉß9w¤$¬º]ÂèáÈëBÝú„7=ô¦PÒкzQ7ÑDD­‡ŸÄfæ2ôd"HªÎô*ŽzKÅ#IÔĚ̽>™Oê¢uܹÞT«„e¼MŽ×f+[7iW\)ùÊ”Þ*¸âêM£DEëcÌPt5ŸkUkd4šˆkšŸuÝÉT"S0c/Qf-LA C(•JúÎÇïF[DáŽ?7qbc™ÍŒ]U‘’q˜ù£7ºKÚž)DÖiSK¹™+®W˯\¹?ñ„f–¬†]²VbPïr¯… c~=(¸‡FÏÚ«å/S5X亊å¶ï®©d"õR­N«ºÅ1©çL .9ŒenÙ·½²êAE%½nSz¡|.\œTs«òâpÎeÆœOé]›Ò…Sý†ËÝ 3£s¾ÜNkS[¡ˆ‹fïlmÖ(”ÕZ!t’è´å‘ÿSkŒQÒ—ðQXÄ”­J¾¹ftöìn6UI·Âû·+}*&ÓŽL+™È¢’¹ZÆšFe½™J_ÞGïÄN«¸‰‚][›lF"ñ[;TÃUÔæ­•xÚºÚ³'ЦV“w˜ŒþŠk”®{9L+>Ô)LÿhŽUòF! ‡Õ¥s RyWÊY£mJljs+I=³<„9OG[3 …v´“$V§”EžÒe}_9:Ò?+ýSÖAº®"øã*:PÊÛ¬œc”»Út!:ªÖ¼Æ"“›«ÍMnS¦˜¸ûBKâ„SÖ¢ U±–¤¯/ÞŠqL]Dky+aWdÛˆ¬]uÅq2Á9vl%?ùÈ¢¤Íÿõ¥t…)Ü•²ä„Ã/Z[ šl2/ω¼N#‚1|°Á__ˆäí:݇GÿzavVnÛÙåÑÅTu#SѩΩ®q'Û ´bPÈèñ3žÎí…¡gN¤ÒÊY÷ê_KІSeóY“(o#%ç½C‘pÒ¦^”¹‘JE¦ÕØbX)HBpP¸L˜HðF8D˜CðDDœ–íu%yK¸F“ÍÀ”3•mÍ¢}p¸77jîˆUê êS&ÕZÈž*CÑxï¬æV!P¥'1¨Òw)È…8…%Åj<š.f©…r±&>/k¯'%¨Ù¢ŠÉR`Å«c`¼M_ˆyD4ìñ¤__â©Ò“{ I„Îβݪj6IeEÌcH³ŒáN„=ÜúqV#´cQ…{)ª÷÷É ©‹Ü’æ‘¶˜´NO7x¸„„ÀD”†3’CÊÏdª¢X™ÊÍŠ^•H!¨Ÿ>­UäF+E8ãªR‚ÓÁ¬YB«”Ö]uï.Ð$Á  aÀ{Ç (ˆ3ØÂ¸c„XühcÙvm/­x­©Û³çCV$(s z¨Æåä6ߎYXçpŽÆ Yž;»®ÔNàMâ^Ð¥4¢˜ËQ…·Ëh%±$=H"‘h„9½ au2⢌k3ñ¦=† ]²Ý5Û{+Ñ̳ºn•%š!…Yœ¥L«ÞƬ¡+,_r„7»‚"†ãb©a6…šÂ¬-$ ´AŠ9„ßX‡œpTǤsÈY” PŸ>~\Ô™~jAË#=ö6µžîÖO Ao¬¤ã„® +ÐÒZ£Ä‚ÏIè¸~Q̶zŠâÜ´±b¸œXk8ŽW꨷ÛyÒøÓ¥M1I!ü¿û¦|–gîR Çtõ‘ Åš-eê8æ””è¦6ņ‰¸ázáÙÁAD;L…«Â5†åöiZS Q2i(L‰±0±d¼(…ÛÄO÷V»×¡´f à€ÊL rÕÏp»öϵä„3âÎbrå òËàI¤IBëX¢ b1®«éÌÍ–MY 1~äôBý-/“MVò ™S›h!…žE%Umxè¨Á–NÄ0lÉàÑê Db ƒ|à JO WRà†HŒ®Ñ’‡;øÉ{(ÉÑ·•‹(ŸiôZÍÎë^²"í“v‘yHZ¦-Dpç±ÜW8¡{<ñ|GÒaÇ7D(dŠ]-ä­¥Òç¿‘Œ²GFB(ø$Ε,Š^§'˜Ñ „Þ¹æ¨mÿ£®Øêv ¢U´©:BñbŽDÙߦŸšÐlXRž«;(0æ_4ׯA Uê™ÿŸowÞ*!+¢0¢ˆ(è.e̱xÄÅ«‘ˆ¥$‡Úý:¤Ëv ŠƒS¹y[ŽZ=I%‰Z+×”y¾»Ý¦vß&Ë+X–ê-Åž­Rp‚5EW°†1 çî=ßvÖqÇýAD@1Dc}/á'©T~µÑC¸IHg"ƒ„Iqi:çï12ÔÒ©R$¶¥FL Î mÒ-ûjò ¡I"¨0QÛžŽBÌM4ÝLƒ‡1äÝ[V ¯½î!ÐF-0F§-ŽÜæÁL¶/˜_Si{ GBXŸ)lªeã©Íèú–£äå¢lÄŽ3ŽÝºn¥ëig0‹÷tYØDV×ìø²Ko&å«BN!ŒC»Š¥IÁ =vdrKñ„Éd7SËß³òâÈ.c›’£ju•C+AÂ+í TÄN ¸*ù aÄYáþ}iFé/+Xgd°ôègLÚ‘hMâýp¨r³™ùü…òÖëÎ=éþØ(¯|ÿøÉˆrzNûÉþxO{U³’}ÒŸ?•òÀÝúP†aŽª%ó~Lö]_²«=ŒDôS/fIñz"èJipšahaŽ÷@£§_d" …RËü•ż/„ÞÐ"b[•PZ¥‘„¡µbˆŒ&\Ò+V~luó êŒ(¯óQä´£ŒÃ[i¥˜“Æ!ØR&g Z*i3Q«Š”ß|ß*ª¸äbÏe¡›†¥¾j)ðRÄ2F4¦ÝÁgÄn˜)g(Šö·íÍœR°™SR†â½G[1ƒ)$j™J!„v—†ÉªVªÒ…ÄÌÆÊ+Ú%rœ9q¨DåÂ’éU(Ãá+À„#–¯÷Ú¤bL¨ÄÅä,¢ù²Û5hѼ³•ÄHJf #"°ÉF‰ÿ¸üt;fãTIJJîšÁ.dˆµËÎìªJ2bó\zTªW äQN£šoþŽJÆ‡éŠ š‹Ù$ˆ ¢E0ê(àŽÐ\ @åÄlywO{ªµ9R´£•ieÚI&2¦é -h©¤q ÃC£ˆjc‡tšSâa;:Ït"W77S”ÎSùD̶Ü1Ê!œÖZmgÆ'Û~«J¥¢Hè¸C¿I¦*cDšCOä?å*…$LË‹FùͽMÖ¥¶ÆÑ0)$VèDw8£²²cJ#6‡Ä/§xòß*#ñªI¯jÕ%B—dÁèÛ:PgqFª9ÚUã]VW1æ8¤­-Tµåó…ZFìÖ‹é8C9 F9é}l! ÊÿÍJþŸ¥Cë\Ž«SrKJlc¦2‘1o#JG+ï(ÜwV¡c*òQ*–Š&æÕWäL(´ñ(F ¬…lÔrs‰;¬ˆEÈ—ú/¦œju°‹T*%'£Ëú/S|®æŽáÊsK¥™j®µâq–DQˆô6θ­]5Š_î¡ëU?ôí«-x²¡‚,åÍÅôÚ+ìô”⑪§´™1ƒ˜tÔ¤½®ö*=3h‰#dµ¹&T ÞZ£V)æø$DQ|j6Ñ,aRC¨ê…QãË1Y4îM'[®Jd'¥¢/“Ä­˜bvµ8÷ŸªS1…R•ƒ'¡C²Y,BÌ´#¯+ÕÉ¢¬Äë “k%º}Ò‚¼sÝz¢ëâQ }ÔM7“ˆngFÏB¹WV]51dèM^´naÎaJgJ:P.\Q[ËBM‡‘“P¯ebÔ—\Ì –RûZ·‰ƒ+˜‡)F Ø wGwn¯v«Ö²ß@!K“> „"%ß½Og«£=t„ôË*ét¾q”¬äzL¡HÈØÿÊ>©¸z”V‘ÑX›/™â»Š||<ùBHÚEÓ; Z{Sõ†uÜȸ¸ÒˆR2&>K䙄*ÈvŠz®â5Ë+<¦¢¤~n¡’¥û"q>Dq†U!È­ìPDê÷é¢5¢oVSàRÕD ñoòû/ºOvîªr3° +¿èÈkr™"¢³Ü…Ú·Ž{¦‰‹YR¸úX»_•‘Hd¬z&ÿ8‡"™é^þ.Kb$ÏOµh00B“µ×NÍa_R«EQ‹™ÿ^eWb­_4Â"ʉ"mÍùij_'ÆŒÇI 3ІëœD –i1xÃR»|F TI¶öë*ZœjË4¬D¢P¶+]4ŒA :b¢ Ú¤òo¸©c­‚êž©¡Ù8™ïFç\s3v?¿Q_°KÑh­ía(ÜAP¥µ’×œÎÆªVO–æ3ݦÖ!9–Çâiøì2wée1I¬7¶"f¨CR¹O÷ò*Di› ÍDã ƒ¶AtKªû†Ì'ˆCÒV$ñê`:µl––lNâ ª¢¸ìä ShÏ"ÚRG}²²©‚•±0媲ïÆÓÿ"é¼!8…œœ0ÄÖÄ› çBÖåâfzÐÈÝâtF•͉õ¿4„õÌj ŽÄ1T§uºã]²µ»I~³ú[þa‡síå+h„™ÅqÅP¦²´ÅÏr®&ŠJ‰~¥+§˜B«’ú=pnˆÀûªJ¥™ÁUÊaLå­Q•ÎÒªw(ýI˜ª—cYâbÏMn!ØÆl?Â÷%ˆ9ŠÚB%¨6]sosŽVÞž$‰{°8g÷ú+q¥GIdYjŒ{ÑËB- BLFÔ2ÌdÄm)lØIs zÏ:“Ẅ╔¢©ŒéýîÏB?pò=õ¨¹fº‰íÛÂ7^—¼Ù÷z2•¦±Ê1ÌHÅìW¾Ì) I‘v¥w¥nâØ±œâÞ”¦ìŽS!Trù;Éwò½H_Ks¥x×n¡¦+¥ ô\m—¼¤2ß­˜Ri¨QQGBtYÕK¡î|j›Ô”gÛ¡^7KöÖ%šÄZ’Ï3ªBSÈdÅÖßN%0\~S£‹¥¬[hs„l%:Zç™F$Ä÷y(„\WaVµêØWvÙŽŠ¨gN£P”ÅQmow1fUªU6Ç:¥œ©%ìLK³¢W*Õk/¸K¢´èJ$¾ú²2ô¶­Ÿ„Y u0Ϲj‘Ëí(èf• “gåÓÍ´1Z5+ŒÕ±ÌbΑ"š…9ÖÒ(Cwjº“2¸çʨÇVÜ6ËMM[6ËbkuØŒ¾êVãŠqß«UYhW!åf©-¶†yQp¹¯…µñªdò;m&¹½) r«ã¢PÞG™”Ó¬ª³[²µb7ÿ“îk9e$¥% CÌT+bYÅöõ¶’Qm#›¶¾~ë1¹•øVfºÍÃþê'cQ$÷h²¤UØÂ>Ò„a6ã}ôuŠ!ïU[ÈÁZ|.!*–3*ki亵ÉAw²ÝæP•NÝØ…Q e4šÅ¸©‰\¾=¹ A‘s˜Ú#PrcÛTG÷…¨ž¤Ô£n¤ÉÎØ±­\òkÊœ™DK;ëHU:Í&=ÊÎrJëL-Ù(”ѸÿÖÃ:žM4”ÕWg2PÉÁ˜VÚÕ ø%>¢•SÚŽd™4ÌÄ&>Ù¿¥úeóLFGA*IE£1‚kÉ …)r÷ηeLf. SÑ®E±ê¼ŸK!ˆ^$Ù- ŒwGCT¿Õî·£‚ˆ»!KZôD¢±3µÚ>Ÿ¨¼!ÈD[«uâˆeñ(bD}«v_j¾%U.ŠD7Qµoc Ám•Íï&wV®â9æuè˜[1¤)×Ûû•,›qTÄ¢û÷jã“¿Ø,ÏaØÕÇkÊFåkuÉÉT󳻊C-± ɨägdÖ,gâñ† ØóÙ)šŠ¯¤uÊDR)8 œHµ€×Àdp,(>Ѐ_+Á@#BöP¢¼•ÌZ{kƒ¢/9)$¾d¢®§È¾ZQêc2vla‚Û€…0Lárë%1|‹»–»&R…"Ü"üÝeJ¹…Vê—þÞS.í¨­’U<–½Ná’å¹(è[«±§£„bkÔÞU!Žg}Õô å=k Ťڨ+‹"d½PŽ!í!,¥ÜiC:çkªçímóëã§Þþ… u8˜­ø´ZD)ùPÖwžê›ø"-c£‰ûcç]l˜º6Z˜0Ϙ6úh±i0q üZJ¨Á1ZZ ®æÉ.„ç„R#Ҵ⚎¯_L:­KkT½ÏõIÈ+3ú"5*Ô²-ŒZzì¶ú¸æ¥î½F¢Ëõ¢èì8ŠRéQv¾«üR‡“Uu™HZ>[{_«ºÔõô®¬ŽV} žÉ0!“é)5f)E5-n¨É}± ¿™«^1¤ÜtÊ/ˆFc©²C'>®ŒMÂF E¿öÆ"Ê›·ã&½ÐbX—î;‹ÖÝkjºS·Ò{æÜ-û¹Ž+Mká ›#•mÚÃ1P:§úœPCˆ{ýES©ò²5(餭ÛÆkýi#Q³“íNGGvÀˆTCHáP–ôKˆô_¡³X´(‹tVÔ´¸¥¥j<¤ZtÚÒ9“wMÉMM¨¥ºU±ù“´Õk··IUíncizU*m1[iI4:™h”:šY?ňE¡‡rM[m¨{$æ!z†Ê7Û+¸B;‹A™•)'Å‚¥*jÍ·ü¸Ôoïs­¹4u*Zì‰aNjˆÝŒ:—+^­•ÊÄÓ,¤M77-»sÔŽù#•ýéÎqYH™¹¤ºim7J¥eWoäÓfK´Ã²‘ Q E®-òõñnUÌöˆsQéʶ'ªÊ[&/P»œD§&ñˆÙíÅ#7ÑŒPDdü¶³YrÕ_×^òái©g~ë„-¯IíKÅuÃíŽå § m*º™ü1J”5ò4ûÕõ µkyÖ6ôÄ¡0å{«ÓVûáÎsfÝë&0ƒ¨…îC˜A5Lnk݆ufÝ£m3è£ eÿ&r«7eVÌ%Ófµñ•ößöç>³JË]ÒܦD°Cœˆ¥û!^ä¡r• eÔ-m§¡9Ê{“>Ï ”WÆdÜqRw¡-èÓ W<ªÝ‚ûq·=Ò ЮVïZgyhº!Ü„H©#Ôß#xC)UkŸ†+©UVÅ®[2”&ÞœùR! þ„ª³w¿œ¦¦l.ß"¬„U\ËJý?ÝN†Ú_Ù¼bêyHPÂ:÷6¥UȆe¿= u#óJ‚ Æ”ú—ÄeÄݑجlNFWÉxÈc‘³Æ±Y)‰aozçÆÒ¿¢ù/3DÍ%hM-8g@³£~ò£‹Žb$„^‘hÕG㢱©¿YÄ÷BHèëßCãM¦`ƒ7+õ—šŠ3ÞŸÕovÏBÖ%´eÛ¶¦P%KŽ1º"J.Ér±]‘hMMO_%)ôÌK ´ÙÚ¼u#â¿§-WÉœqQU G3ñÉ/1¨ÙÄ'Ô|êJžW¿ëî‘ËÊaRS,ÉɼĔDR7*TqûÑ‹w[Ÿv¹^7o§!;ic©É™Œ*ÛˆêT‹Å8‰VFÇDÎ.òudWRRñ')GJ”·³ÒéòœU&Òøƒ/YvDÚ|O;”%íC™Ê k7(„@Åѱ Tzíjã؉UruWÄ%2&õÌÌô¥;7Ç!B3d¶ÞéPìwŸu·qøë2¥U¹–…ù‰Q[õ-éº[~­éEÒ¡ªÚššÊ^n[±$„Ê_~½¼çÖl+;ÝëkšÖ^ßò ¦#¯e™0©ˆÌ˜že¨b4¯âà¶ÒðŠA’ÝJÿá]¹ˆeºQéWÖõ± 8ªÉ´¢+“;¤Qßð’í¿d¥Š§!+[â%‰Ö-ΞgÒŠ¥J«\èÈžŒÂ.HD2ÚŸldäÓ݇“F©¥_ÊU¾È0ô…J!f•Ï”÷œV˜›ðÁpbÖ9©,FB<GA h!…‡r»Ñ´íQ\Uj÷ªnAÑû”1_ Úr°Œ† èä&¬yBÜ;`‚a:¿¢ÈCt„8˜ÒTL†p‹ƒfÆ* ŽQ¥žŠÜ>£¨¯8l ZŸš"† ÁO‡„Âä…K0)ùK8Y.§-f Èê)Q„ƒ cÁL‹˜Ž@p˜÷Τˆ•‘ë Q³X1Dá¡Qs‘'¸ˆ1ÌTÂA>vìØIÈ’ s׿¡‰ÄçìÎ1™~Ÿ›³ˆ#¤d¦BîS>AŇd£k•Ó£"!çqPA4f`Ã8Šï8!‚Hü´d"¸9ùáˆÔå÷ˆ—$å~R ‚„æ@l@ÇŒ®ß„ €‚b”\`#šÄ'V‚B÷9LÅhšQšê2ˆb¡ f0‹Ì»)P;363vBç;ªÍy„ÍMÅìÜ̇e ËÛD*‰]‹J¬ PÚ$pÃ@(DzBa&F¡ ž…8ª@S2#ÐqØøB.9nÅ䇈@Ä~ÐØL…¼ŒD,܉¶(‹€äÌC"8¼”Q”Žd!± »ÖæZç*> hÿøÉˆs}Lxª K ? u í ¯´#4#0÷©ëÀìüfKÓ ÔÖÔ«±Vg)–! ÄRGBP¶Óc7I¼ü‹æFj? M·šøµ}½÷*¶dwñ®#`…7þE3q=ÝØ9I©%ý±úÂbeÅJ¡È®ör:£?Öª¢“køÚc+3ŒNï»”LÏ;fà•ÓÒ–º·—i†1Ç AX¥%^–Â`”ú%X)ÊR*Ù¦¤˜ÅA´Ô ¾\²º<„Z®˜Bó” êÛùîSò“äoÜÒkÞ™õzQjÈ‹Ÿ›DC•XÆ"¹ïÇÁ¨T"´†ÎÞB7jëDÀI2™'fbYª #"ã>÷ˆaXÔ Â^H®§­0ëFíF«ß%|mé£ugV¶]HqD]Ó„<ÕüqEÿȦ|ˆB=¬i©Ö½iŽb£'œÅcTñ³¡l¿‡§w%Leªi΄‘7­²Ñ÷ÿçÙ««®}G%JcÅR5rÔ¨J?Tù+{Œ!U9«˜O|‘(dë÷jçR]åÌõ ä²b¤R¡×vúÅ¡r¬ªœqßý…í]^d*éP(å¯Pˆ[ËYµ¬;ôCŒeÀ§+¨£nË„„¿ÖD=¨Ågv£— FÅ'”«]ULÆ5ËŠ>¾ñy9§ÛäŸ]Å)vpʃ¥ÕÁ;F3jùV€ƒ(ªF³Ü¢VùÝÔÇ,é™QH¬§} N=HßëÂq8E¸G¸œŒMù“SLÉLB‰—«ÞüÕ/uh’¤80£°EúM[žJÓ̸Æ}8ã’ŒrIº{­VN é·³‘ŸG2Ù”¦l÷•ÏïIJȣÑE)}1†Éç:þüÔ¦å-ìÆd²ŒÀ¢ #Ò†Êdkmd\f¦¼£„!\ÙõìÛïSÐ…ýV3sª’©â=’c$‘ñ¡ùï)¿Dú¬FõÁÔgz>…êÓ"I‰¤žëÔa GÍ¡bÒ²’ªC˜TÇ(Å9Ir^ÒO«¬æ^VgOòDú!Ý\E µÎ&é5ÑuÏ+ ¤‘ζá+•§™hÜ>5‘ŒÃ9D(„U.IJ©IF&’0Áh`DQ(¼Bà´ 'zÜ»—ª¦Ãiʨïd¥Ôã•5CÑ~‰u^ì"gT‡²ëþ+‘L¥KŒ0)°ÿÍY¾ÙEæ•g2Är…~KïSç¤]•íšCj„A]ÎÈŽrQEjůЧÕ'lèEÜ)îG-=vÖÙÿjUÂØÂÀÅ›oé¯S¨ªÄn â(æ(Bu˜ãVM»-˜…DÄd"úú!s™1å_ÕÂ'¡1}šG£Ðì¨æ£üØÞµ¶÷Ó îB9NRâºÍÕæ¾<Ëd DMñ³ù†¦·ã1Õè/«W==“?¸ä1]>‰§Jfo_+7•í뇛|Ô‹MZ6êÄN2ÈâŠÈ{rPÓq É\¤Ê¡GQ(Í~\VÿÝÓ{Ò¶­ÊõZó&ܘDPBû·åÎ)KºœNÿcÕ£.‘×RòÓ,åéìå ÎÇüˆ\ µs½,Ò˜+;¹Fjm_·Ê”„³75 V1’ÊõIÆ*%ñŠÄçÌÕóQQ=råô%iÂÛž.W •÷1™Š1Å1É×÷«aÉ‚"ã¨duå궯`TœAWLÜ,(ô,|¡!˜Í˜\`É%O8äɄƯHgÖkhb5 EÁ~" Ç×)„a”A¸!œïPê:‡*ÔYàG#ë8‚@LrÐì0ΣüPJ5¨ŽùQ-að_Ê;¥4?¢1Á õaTðLkÃa%"«ÅÑ5G (1ŽAjx»é‰ aÆ"/gÈ MK+ / RS„{…ƒÀ0e¾l`3Å9P 0@¢§NÜQŒ*…ï‹TG)1…sNd™‚5ïÂvHÕb' žÒƒÇ+Wï× Q:vA›6Ȫݎwô¸dLÃB :7‚ˆ!2õc„+ŽVcŠòŒÌ4ú„rئ¨²ýÄ‹š; ŠHü¡UÛX¦IHð[ºüQ¶ß Ϙ.çËÊɃtEJÓ"!òæ „N#0YÇ;$u—ž5 âPw”9¦{јÁ†¦†šá; †"ÐhE*õ¸ê‰D† I×xŠ®èæ‚302¤”`wUZ癜‘ö¤§5%]`Õ¨B5ÔIrS‘ ¡ØŽ"©! õp(}œ£d× ‰ÆVì‰fPB22tíå-(ý&¢õ¥1ZÍX.ÕN:Qº‰Ù ! ÄdœW3“‰ÍÎÒ0‡VÄâ”¡Š C 2˜…'¯ýg ¯¹ÔdŒÊ<=|ÅXÏLØ2„:&*Du”1y”du*pkÜ‚0–›MÆ: uK«Œhæ ‰jÁXò&¹ðDŒÆDé£ã§­0Ê.öVã¢Ö)ïs`†%nA3ˆm‘a˜ã;b+,Žȸ¢ÃPhÆ(hCÒ†è)Ö©ÝB0†£a¡¬%%s (ƒ“*”Yãc`J £´HÈ‚°é¢A¹Ý”æiš"+rÙÚ2þphdq‚ ³ ß„PÚ'…N×õ*×~ÏU„)­_†"²µ¤òTy ’ŒàœbQ:š3ÒœšþÍyÈ(´kBPjŒ@&N=¹‚ ¶W7c8ÊExän#¦¶Ó3ÒÁ¨pOXj¹/K|êFBá[3rRY}%¤"50±„eaepÛ–¨œ2ö‚S+–’†£NH—ÌV~1þàÐ\ä#µªe‚T5ÆWǘ"Ïf(FpƒˆéŒÜŽäf¦'Ç‚!pgj(™MPhl €éEc†îY±U͘‘&A¸G!{rPŸ­A'›*CÂpI¿+­Ç&VW D P"8e”ÈlLý²Î8Åa7P^ñdÁ œnN A!̨B"(ª§; na!Z™Dì…A^‡èX© #0ÀD. 5a£h|yºB…ËHlQ…ÄÙiã|RÄ)„$D7§‹¢ ëPzq³àÁF+ ç·²ƒB`È qÇ0Íð`b8¨ƒåP)Ù¿…¿Â¿â·ò£úýpþÜÿw­ïF¥€5Üù!ÏöA“)† lŽË¨¸&†0ÃŽWqÐ¥Â!^²Œ¬×)j#-QHBA+š\ê º°e¿$çÝ(){·ÕF±Ä tZ5 5І3óÁØ ^A]J†7¢Ä)Ž¿š—BŒÈRsMé„@l¶¸ nXÄ£*õâF\çC_5+˜⢡ۙ³2Âd"pÊ#FŠ!Œm L¦ô¤*b”C· ±ŒJ!ÙqMÑÄE$J ˆ‰IàÅVZÄþ¹Ú)2…ûQFÉ+c˜CÆdˆ$~Ä::”ŽGÇßrÎ}ˆì“À‚ }Fr‘ Ñ ¨Þ0u' øîŠ#—Ôu§´‚”å䥆¡‚lT(ÆAŠ™I¸àÄ â&Ôâ ¢cQ£PZXО0Ë…ÝÌ L¢Ap‡9Š7;ž~¤G>kP£ˆdà‰Óå KÌ@Œƒ«Àëabâ@ý€â°¨ULqtT†!ÒÙˆ¤A%Ü1$j#]×…+£e-9݇9…CæzV1a› "2 ‰ Â%èá7e¤þ§oÐV·92s-PŒb¡G^Ã!*)JªwÕ"×8f˜yÒ!0ÅDÆb¬E Í8’%« F(ø„6d=ƒjb0…% 1€ÔGdW;^$Â*ØÛ&,õJÝO”ìggFïTÅ'']V©ºò3î!VŒzQÙÌ]ÿE¢§-—oÒb˜Š¥\ü&5UÑéZê•O-[üž¨¤_ñKv3ÆÙ—…:ܪTäæDEòî<£÷Ô×òþP•A:–ãSí¾ã·µy%..qÄd&Ðp†dݹ S܃¸F¼ßÚ”>R‡+Òš}*vÛé[T•ì*RÉÔ#”ì1Ù–¾t™QhSºKjÜ…U’œ!Ð_¥.r©mS†%©2áS©”pRå²ÊfÙ"g„nÕ¯º¡+ŠP¬¯dômJ!™ˆŒ!IbáP´.§ÔÔ®W_FòÖçÜ¿ ©Òî(S{ÙÆYZÄ!›Žܯ³•ÐU9ŸÌ«×«;´›…± Ÿ£%ļtPl+þL'ü¤/Ìá‡u¤`š?GM"µè©\#7ªC—eÈUõ©BC‹èô‡ $᪈Ì(¨ÄVÆRf'AZú‹é0ÙN€óêsã8…z8ÈÐ)CCM©¨?ÃB ¡‚à‚KL¢¨”" ñux䃨/PŠS–L=QPćc™.ìD ø3ˆ3#¹ ‘ ™`‰¬9‚ä¶ `Ì!B•çÌðA(©JÌüÄVZ @^"¸4dÄò —PdAº!º¡+õx•9 ç^+Ú„u1š¹‡ŽƒF@œÃ~Œ!“3!PÀ2”Š®†PÁÉ£ÝÉCG‚µSõ0D³¥˜UR°Á(Õ1Q©Pƒ0f…1Ñ+ì00F2ÏÒ;«4ZáѦñY‘…üx®,Âs 0A¬… ÙÌ ÄbxTèI€†(…ÉŽj,çít/'?o ¬†P’R2MÎ3 "pÄAŠ^T ÄXÑGÀ¢„e'!Tf/jBÑMû‰ð0ˆ2‰a¼ zB É—0ä Ü1n„Á²÷Vð}Ê· ½#uFC*Ð¥…‹ ¡qC Ðjެⶆ ‡ˆDeì`˜ªåŽaÜ;…DŽ£šÃÑT£ŠÇ˜„ < ÂFÈd`JâB ‚ „A÷/¬XH'S¸P”[ûx"“hL™GS ´iòxÜÊðok’ W¤¸&ˆbŒ¸¬L:%”‰ŠKÆ0Åm Tø)·!˜€Á98‚Mb³ 3A…5,—˜2âÇ5œqUO‚–/ÕcªŽxÐ3 •B4RËñ¨`f4F"ô@Á!*©PŽž‰[‡áà£HùØÝR•`Û¡±1˜ß ’¥ ¡„cBÛØRo‚ s ä3$‘–b)GQh¬ó×°ÓŒ‚¦ð”m§áÈ`a‚@@ö ±ŠÃƒ»JÊUоŸÔ=Q\â± gê“) Æ' ¡Ó™ˆ @Á¨±‘É¡¾X+VÆŠaÑÎÅf !Dù„RpACc| ‚1D9ß´Iþâ#,ÓÖSd*˜¬"1Þ2º„ül”ìAlÅqØø‚bƒAµhõ/ Aá;›7î#’vÔix¡ë†­îþ!ÿM\Ñ qP ³ˆ7Ó š8R4B3/× R`d)ƒ®¨ÑÞþâBF¡êуFF`˜Õ, ʯÉÄbF%r–YÑÃè@œŠõ Å¸¨ÌÖ˜”0”eQh¨á™Wõ"ŒAÄœsµ)"0ÄC0Ý:Å€‘Ôàùù. ðÏ]’óØ.Rµ°L8Ѓ ƒL%( eõáo`_æE/>ùÄR'b5d» ÆH3srXõ›¤:Òš†ÂCQ©‹„sÌ‚*—çŽðˆá¦µGFV0Ê!MÝ•„jd# AN¢2“ àòÅÿøÉ˜t?NÿRˆ?´_Òå§ñOø'ü´ œã¯n¨ †܆H"UŠø*bŠïN9#¥¾ÃÞ‹Ñì!.Rb±BhC"0Ý—‘À5 †.Ë™Hά±1 Ès›H¸TUd‰ž~H Â)‡Êµ.3C ¹ ´|¾›’åj­ªçIfìæ¨JE°÷ó͈ ¬ADvJ$ŒO‰Ü› F£Ý–øaáJQ{ù!Ûã¢ËYÌ£ œÍ‰Ó шJe'f¸…L²‹­ /OLdìB˜Eh¼1ÆA˜é‰ìJD'»Šä‡ÁJ P‡Döšµ6² ÐhGdV*7¬+†»cQvxq†xŠÓ1(‰Á(‘— ÊnÐŒµ–’æ3H0ìg s#ž;zD#4HíÒˆÆM‚1èï_·€œ¢ ½ù `‰Þ½Î¦æteµñDjªŒÏ P€Ò~1( ð0úBb2lؾŽ`Sq%ráó·§|#d^Ð T¤sAF"˜å΄JÞ¦0èW¨EGæãÄ4B »(E/ U/-V.(èX2Ò!QY˜ôaCRl‹9œC(fâÄeMÜm2˜ö=é…È6"ŠÃ4$œs^ä`aa€ÐUcSœTwÂ3q4b#í`Ì¡£bÁó¢»Ó@˜õœ8q ƈJbžÄ@PÄ!&Á ÄᨂÝ(pÈ2 `ôAx"÷r”šþP!ˆ¦ýà¤Í8ßJ‹_û°TሧuÄ¢Ó˜fa8Ž£B0»‘B#Œ©c^‰á/ #„‚P—#`Ö© ÃÒ"¨„d¥v aN V'E1O—¶F:1)“‘IGa‹K°AHEVªÁ3TЮl¬ æbBÜL aƒÄÏÔ9~ê€(Hš‡dŒÁÂB ±ÆÌEê•@Ã(Læñ ±Ñˆñ ¤p¡É2Š D‰Ü†Ç#Àl-V¡"b‚ s±À„e܇‰D&76¢2¨BE ðŸ;A\;3‘Jt•W¸* ЊB“±H£½`cbˆ@D73m3½EP‰¸¯Ô qÔ/ìG&bì©„þ˜É;±†t Øl¢nFLõ.¦ÂΊneÇ0D¬=–ãÆ&í(ÌÔ–NF¤¹”0‰VQèMA®,„¡Hgû”!½Ú:œÖN2þ%ÕÓñ«NE±]¨ÔkyùËR:¾‘ÅìÜ×Ö–Ë¥UB–Kªú]Õ³ÎRô¼W¿'_kY­V'“¨Z¥+Å •~1„/?®Œ‰9ÔÌ%7ŒÆßi$-é„•ºzå$z.Ýj+æœv!r¨+ÙW›ŒE*#tœƒ÷ J›·»:¡’o)5Šs2fŒ£DÄ#•"­¯š »´å’º&Þp‹õ ùþŒEb24G) ÙDæ3ÙºD•Jn—yMé«>ì¸NfQ|žŠÅMiŒ¨]"Fb%9 D«¶ƪnv9ˆOCX=•÷ºq7øB œ¿bßÉ2~ÝÊ#~ØQˆ†F0æ9”æ™›Š1/â‹E3¯k&ïžýo·¼ŒæÚ-iIZ•:˜dee-$VW ­UTV2ÒR!–QH…]¡)Ùïâ» j_žÔ¬ýÚ%Dåûfyþ…n"Z«R U¦(ɇr£ÊA ³:¤21zÕ’]‡ÏWgEg·5t%eGs.Y*F²”‹‚.‰cnW©Èº©%X®Kvõ:g±äRm]Ü¢‘-l=ôbõ)UÇ¢½s$!êÈt8€éa†Op‹ÔBAÓBö"-Ð.'¥1ðÕâäÞb­ Œ&zïÆGÍ ¤ç1tît^åGÝ!·±ñ ‹Ñ7žÍ³ÄDSÈI,žeÙ›)/+kåj/±:\: r˜Éÿ¨YԤኵ.å]\ÕdÄr¨{ÚŽÄ6;ÄW/it˜ŠŸcS-žSü‡z)Ä.ú±ßÙ5[‘WZ.ÒÖ—võa#÷{–Œ·eœB1ä!Esd© (s•S뼫•eГlz¾é·öÍÆjj1hOK5ÌKˆ˜QŒòT‚¢HÄvò%¬Æ_¶gfÊ3»|ºQWôQêÅ©µšËM›¯kÙ» V›1,¥«þžã«Œ*Êo ŽìqF1NFDõ31&J¾¸§­2Ø ^ù´•ßæ¾"ÊêI…c”´J •a”êaÎeÙ[l{Ù¤|¦×²ª‰µ—»H´sê¶V\‰¹ÇZ9Zð›p¤j#<¸)Õ­ÅM°•=UŒ~£"¥d1“W96¤M]Bû['[K>{µÑ‡/zaûXÍ=ÌâŸ'A8Ñ´J™seu1OEŠÓÌÜÒ4¶ì6}Ò„ÞQn“În.7ªÄqùˆÅYE8T9úè¶gÄ_;²mõ bÉí¤JÒPÂfc‘¬„ã¢JUÔÅS9Õ*!ÊãoYÕ>/¼ô%þLSÇ7ý]Ýx\K̽”Â'Ôs¶aÖ\þ0ýU3—fÝ;,l1¯AˆÓøÅ)œ †×!Êb 1¤¦ONÉ>!…èK_éÛZZ˜ˆšþˆŒœDªTåUqØÊÞcœ(Vn¤ßT-ÿÝs–’ÏKðN‘ê­r‰D‰´{Ä]w‘åêĨ²˜©ˆZ[®K/õƒšB}Š2¿¸r6!öLJ/¤wùYžÎ,Òhé‹Ur數·aMt¥Z0Èè õ-tWþc””{6®MJÒ¢m~»ÙÌj͆:üqÑÚ¹6‡+mÂŽ©w¸ØqÄ-WdR*£W0! _Î߯¡²jˆÏÜþb%b4î“eƒ’ýG1RìfòiQ¦Ç¡F7d‡{ÉgNfnöæTÍ©P™Œ®:•‹¤7_&u·aS/òç:‹—ºöÙê÷oÓ˜å4„[• ƒ¡ü0åoÃô¢©7‰ü” I|¥Ykåb’b•d«•šÆªŽa #Ò{är.¦øÛÔÁ~E6å]ÅÎÌL,‚òX0!…ñ…êÄ#YpT&Ò•õ貈·®³WÂŽSÞ²»a°Ió•/á3×)’–\A±?t¦d'iJcÉ¥ºjÏ"U(*]KµWîÆ&6wÈ2KØVP’õÝÙ‚1Iß<H¿s¹`€m@¼ÀñVrc³ÄÂäÞ«ÐÍK™–Ù7Ïâ¡•‡sÊ$A<„”Œ–AÝMÑhˆÍ¼Z­ŽáÞÊJÿÚ 'uÇ—hIÉ G8†sÕ"•A){Mßòüb™âU¬È Šoܯë5øK–ˆ9ŒDª+N„zœ¤!1"GȆ(˜R=§Ý<, ZÜJ|žL:YÆ*yDœ\&å¾öwËcˆŽœq¨}5IBjæqR®ã=ÐB"u_zk ÿتJ—/,¯#•wÀ@£aÁ…s÷‰ $·ÛQqH b†(Cˆ!Šk“&Õ?4ÒÈ6†Ñ)³é•‚i 2Öˆô{áôÿ׉Ӌ¸";ˆpC„ADb$\áÝÇÒ¹JcdÃ/Ö[VÛOëFÐÍrÒäAµkÙ]BQ×,J:r¢Ü²½“ÐÜ%áÑ¿ìîpÁFV×±'ÜPè‘{ÌÄ _ƒh( Rå}ŽF1-4„ÑixÞÚ‚U!QGÍ‹pR…#˜mÙ4j‰¸ÖÑm¿ìl„ªSÞŽ}¡ä_²L_°¤x¤²ØT£_2#ü¶¢”Mó)D(wp¨Ú–¼%o\ <ݲŒxÀbˆÿ*µHž<ÈC‚Z"BcJ,Ýve×Z éŒj^d¦&(Ò3ÔM¥Â¨ÃTȘýì u†JO»Æœü7ž­Š‡q–bª!޳!’¯ù!Éo8T®­…œQÜÕ¬¤¨-'…iè-%’²$ªP™ÎËò‚•ÕÙße”×ëL¤™g9ã“·ó7{i3ëF\W%ªþù8)/'!@›À@ÉšrSc¤%6—‹Ä¯­P¢–Çhvˆq"F^•ˆ0º.ŽM[{-¶zô¡[qBQzõÁ65k&!UŒŒ(¢:Å ( XMˆm½(„ÃidÂ-ƒ%Y’•´[P[ — G¡MIÅênÇ”¾V³­K"bhåª`¨’)Q¢¡ÈJ?sšÊ:°+-ºÈÆù_¢loifü²ç`ÀŒý¢ žÄ(zEùlDˆ–I #ÔPHð(ðó/Æš[ÒkLÿ`Ñ K„ËÝõÂ\jñµÖµQ úA I‡;¦ö›³XÖ!B„ P4„‚é°¢ì´?¤TAøß¢E˜ZÛå˜(‚aå%+oeE2œr\ ZAüY»({a'rLÑ NK­Ë˜¿ ¯ƒÝ;ŽT”n“Ú'šÕP´/>Š3ÁÊ!a½H0²Si‚Õ:ÆÂGçÇ!1?ŸëƦ ót™8ªäy‰ J¶6Œ@CÚO¡¦žƒ)A‰`£Œ,û$Çþ¬A)ãN×ZDÕ_¼ äã%Y«¨m)µ%Ûgs z9]=Pm¥„¢ÚAu–Z£'–3}»,m[²‹ÎaÎc¸¢õ˜™_¾ã­ZR°;3ˆ½)…3¡¡ýÂpÞñòýxNù‘Џ&á,]ÁºØMK&»yã®°†àÀP"6è)^·Õ¤–ëÅs+˜›[2&ÆüÄP´?csl-¾Y%yŽY‘F!šTTzQž¶)K–¨Î ÈfÝéá\+Ø\—ÈBmœÀ’IV¹êáfš%S6B”`ÀAÄóŽÁd–‚Zyz¾ŽÕ ²*G)G(*áâŽ3eúO›¹·­ V–* !pÇåBu¬ƒÍ\IvÄæùÓPCˆ;6³ -”1'½2pRG(àÃ[”¬¤ëO~Ì\g|r ¯’^—©ù®¢¢ªH’b.jñÒÆ3‘^©Z'óוªìÅ=|”ÑPƒ¼áOtÛ®}/˞Ơfª¨”ª’õ†µ±Q‰S˜f8ªªñE$Q%OÑnBó~¤ô±«ÂJ7‰[ —IþKi®c”F‘kB ɾi‡:xܓć肎 sZP¦y(I¥‰i ‹¥%ñðˆ^¥&º’êT¢¤’½É¢y1R*1XUn¢XO!Y8Äà×ZrWÉüˆ“Y17Km>ã¥ÁN¤Z¼”—ÏükU ¡JP£Äs‘.j³ñwEÆ·}¶¿Yß_¨,ãâmÑ+{ÞÑ Vû~ÉšÒ´va†)®9Žñý÷ïBÃŽ`¦^Ä IiJuôjÌ&S…ð[Dš„£Z3 Í0ëDZùžròÈRŸ†y°’½MìÁB n˜7—øƒ4y§Qši•z‘˜ˆeSE—D´øò\~k48¤!N1ÅÍÆ9+u 'ꉟòhºÃf.a;‹jWo„Ÿ ©îý^+Ó¤v( q]±Þ‰-©¿º Vˆ8 "ú1fÁ>-kÞD*3/™ãåð³.³Uºµ¡ƒhÞM~ŠL²r± Ι#~æ´Â±ÆË]¬Ã+ª©‡­·6‰ÔÑ:š–¢NaVU””ZôÓJ÷ÃRÎÉ(ƒ$QÂ3ØuìM©ïæÎW;5S®§ ¼ˆ³H¨œOŽ$Œz ÂÞ^$SR4H¾JÒ>.TrD¬B¹Q/[ÉlêoÛ—%½nù->¹%LUÎ(‡W©ä‘è­Vü£²a U6ùnŒÚ—§q1ÿÒ’Üü´¹TC-…Öµ©Òsp¢Œ2cÐæÔg‚á,ÿ@ Å!ˆq 2–ãœDh=¿+”’ƾÛþlËXJÑiòi{¼¶ ¶-¿›Î!Ì¡@¢A†u$Ýî½d¨‡Qn€‹”ákóã˘ΉCYñ ÕÜú ϺY‰0ˆ’ŸE­P†%.³¯SgŸÓ¹X0C¹*NRT-p€ÌzÐ(¨ä–HùÐù—a³˜Äi¸ôù±ç¦[Õã ä â9ÅÔU(„³£IAnûJDûqF¦²¤¹%ÊVSÛ»Ke´1ìØ2ŽÀåqæØšùÆìc8ÑŒªi¼ói:ÃäŽaVýGÑt×~/H—J.ä¥Ë1šš×w[ª¶&ä/³—bþ‰ä© ¢úè cÿøÉ˜u8Nýƒÿ¼ó Ð<  ´ „ã›Ð—o؆?Û†rÕ#X‰çB¥ö@s.qEn—xÊ]ÚºÖ©ªW>õô¤üÅt˜b“žc"?ÕT>p¥-ö J!Ã#Ÿð@‡$YT#š|¨s‹Ã òÚf’¿[˜Ø”±Œç²ÒDÏ©—Ê,Ýd 7úé]F‡êÆ\˜¢%î+²iB EõpÁ#.¨‰_uE‰¸5eû]4œžŒñ(Ž¡>„# (+ š"Úô¸ÉÂÚP©5¨ê…»™V=pÎ}Ô¹ä})JÑ”„â[õhR3q‚ ÖŸ l¿ù…åñRßG¯b‡ø¤)„ïl¢§[˜t,JV¸ñ;vNRá²ÍRïöõ½rœB·ð‰Îò”c èþ™šØÄybå0—¾Z鬗I6&˜¤_r—vØj?:ÛüsÒÈ@B2[Yª×VT¨aP²Ô¥W‰k 皌’3nmu{תq)×h¢ìSøK.ÿðIf¥"dÃÊ‹dõò‰]29qpb%¨/c… ynUlu /mY§ûÎR›0çZöØRˆ2L«èº«Reg²ÐÅ—þ‚ ~ß»V$[©öÅb—¬vÂǵd2„B¬;Ž*­ží¹QOkÌ!ÙÄœ žN!žº‚·ÛäÂ𪠗³ØGÒ—,øMHÚc5Ì¿\é}ú¦E6Ü””2X@£˜‚á(uÍq*“‘èDj’$•½&£½+6}¾CÁ)k>›vg.©ÎrÙäTªð†8ŽJи¥c>àé1wë™'ÊÅ ·ŒÉÛE‘ŠrØ©ME¯ÊBZÉFu3rÒ’òu³ÒcÊWL<ˆ¦ 6J𪉆Ž(BWrò8ðú`a8Žs½·A+¨`Â@&ÌRઋD&6f5 uQT¢ue $2*ŠØÅ#…‰iÁXŠ`„Ž+27kÀB J“q€HÑB`ïYÂF™ÕÛ?-$pœä=¬Ì졆 › ‹«Ò3£bÞù°±Áé†Brˆ¼ ƒf\6 Μ13„Q‚„í–âù-½Î>“™€†p68Hr>pJ!3Œ¼A׋xýAB®s ä/~EËxED1òPF0A•@B˜ªÂPÃB[ ´q Ä^T<°¯ ø®H 3ªà|ˆ! ÄàA¡;‘aĆÃÊ„²©‰qœçaÜ$xRUÜ8êUKç¢=Á+¶í*Jˆ†Sœbº§ãПî2„Ï>hÚ•@‰­&ÞÝ…üFt}òìé¥{]’Šgg¹µˆãT”^0†CŠÑ‘ÎÕ‘fbÊF+ñ—‹¹ÜŠ¿øÒ½Dý§—•¿?Z«¹œC¡P¿VçG«uR‰:PޤK؉å<‰„£Y¦/üß•ÑG³5•ŠNí5¨%]hºÎQ}ñè¢tD b²È­ºÞ8Ä9…! 4mêf3­³"h–54¸È‰†ÇB‘+´åJžã(«ÉžtoRÄ) ÈÕõ¬ŠÉM?©È¨'¡g.VëÎmçòê‹t5WK0ôËDÂû+• Û"ÆC­usWñ‚8dSVGdÒel·:T£e)Š”s;¹ú•Â<…2ѲÉâ°),ëQÖÉ•îÁñž†&§jM‚ñräÿÂåSßIö¤§Zô}RwÕŽ(šÈ¨"敜ùtó¬Í!Ìõ¢‘Lÿ®!Τ3Üö¿kæ8ÎÕ÷Ä·ÍÉr)Ê輤ÂHIAtÞMÊ&™™ÔÞƒu´Ž®—ñÿ&Ó2âï.§Š«„⺶砢Q«!ÎqJ´’—`ª;ƒ«±8•äwc*Jú5¤¿k"éýÔµ?ÖF> µ‹õqL¹®_ë1b‘1*ALW÷÷!Œã¹XÌçœL"™Ï©²Hl"8©b®ô‰¯G ‚„ý›\‘‚z–ç]ÏÃOf¾÷î!NfÎøCÕQ©GJÚ¥"S*¤±°Okúʇ×Á[˜ê*=S~Œ—%ÊFÞBD&Ú¢d]dЇ'ëº\ÉÔ*W;òlÅÔˆiY<4µÆæ#˜r; Z³Ú ¯—1ÈM¥ÅJ©C„üW(C „ýO­L‘ŠžnàŸÝZ.sU µÃYu¹³+Ùª¤ZûnëR•&✫¸¥1ì¢0ªÚٯϺdˆB,©˜Dgº1”Tñ)ü“ºPaNBÉÔ—í]ºç6wÕù]ºA´Ï—ûà‚˜Ž¥\UþE©XêÎæY_t™åC­¡ÆÅó UíBROÉÂ;:á¶²WÆÝ Í'ãQ'u²V†”]cª2/2Úu¡™d{‰´ε:jig–Ôq•LccÒÕ'ÓªHÅ\bGRá=.W1nÊbʪ¥"ˆ×CŽIbîé-¾CÒ8ÛY:ÙÖš¤Jµ[_ÙJ¢ TÏAÓÇ&êˆ9Ÿa r˜ŽÉ¼­¬r ¢~ÚuàBˆO—Ö»ÕUÙ¨.rŒM—û™=–*:ç}[ ¼ê¬tÑSº¼«A-çC13WôŒzzT…§fá»zÆv"b‰JøÿPÉdu»¯=TÝ9L}?"1š©‰IŒAõ_·KÌ判BÖæÑ6܃ˆ©R¿}zÞ¥s1„RØ›9=Vä„3¡ „6ÒÖIÇûÜnGfnÜúŒDÚÚKõ,s©ˆfµÿâ±:ŽÞ…2ºÖ¹{²0…)H&eøº& ‡t ÙRøžˆ\IÈäL_ìYŒb³ˆß‘êUâ¸c†]]]%ˆ«¨³¨“o"Ÿ,*kMôVj’T#ëâuIŒnÕ:Ê2ՙݗŒ½¦(Âåæêbë&)ˆKõ&0¯”¦‹BJÂ%6ïÍ&–QÖËþÓjbä¤>66Ë]”e”Ær5pÉT¢B-åâ[vŒØ™e³ñB]ú™þuŽò)Ðjé›ÙŒ ŽþA¶B «õŠ‹œG“pª]îB)ZoòSí®¢»\‹_ŸSM[ ïŒA šõ@½¸(犣1wê›gVDP…cJJ*ñÕ=Ì¿ù”ü¾}äãÓkÝëZ1…%æ¶ê!ÌUGS¦ì];”D‡7ËMq±6áÈÅH’DÂ#SL¢#_P¹2T¹®VX­¼Ùª• ”ìÞ»øKd1\û<¸ÉâÏß'ÍšÎùÕ§ˆRª÷êYHR’«5n«¨êT㈩]-\‚v*Ý?w‚¥×»V¸÷_'|íýî~û€‚ÞjYÉ^á{¿ùŒq¼ü8ôËâðÈ )ÊMÕ%q¤— „•Øf´+«djVb>ýM§:Hj0²ž¬œJèÕS®©º·2UÓJ„a8¡ˆ4KPé÷å] åaÆX¢1ƽ"{áµ=^¤²?·J'R©ÿ2ÄÂq_]müM)¬fâ—u„Xƒíõjc äqòlµëÀ©èxÆ3ºØ/É­JÐAÁHBŠ¡¢wP†½†*ÓT)Ɇ” e›)dZw¾³>¾350%TDfF¿[ji è´5:ó•¬1F^(‹‹Biü¦ªrÌà E–_¹¯kLVtì#ûQ2µÑ¨{ïL—-U"âY±R†AC%ƒË-]H%Hdl(U1ÙTµ–ôÞ¤ó,éCtJ »P\ò‚8Ê¢†+µÜØ~ åUêBœ¯aHºÕ]u*®Qª¶Ó¥*ýâfP†.ªýð%„hA¨'KfL»Ž0qG%¦î„‘]”æQÌ0áÑÍ„Ô{(k§î¶,ï˜í2û-ïže&Òªœø1v¿Ù“$éÅn\Ïua\­o½Fd–£Ž0¬VžIw»È©qÜ ¢5ªü7–'uúš DCŒwê§>YÛú÷y”_[¾ž¤FBžÏ/jµå!Å{ dª+´µø¦Œ;Ý’)Lu²í8ÚLÊÈÖz+A ýI²–?Y%~cÝU[_"F—2 ü›ÅK™Ð¤Â#a…̬ªþØA›¹‘*¨ßýƒZµ ¢žéठÓej£É‚œˆCŒGÑw¥¿îMⳡJÃ6µ`„lŸÙßsÑ<É=C ýE/W˜«—zзÅS&1ÖŸ¨Ë“´êâ‘Äj³¸õF¥ÈÓ¬Åpr Õø‘kvíeS¶H˜~ ¦žÍqN}þJÙ©QYJ– õšM!èÜF™žg©Ér$‚Xý±)“ˆ\#ˆáeiyséZnIl˜WÊ b ¸ÒÌ$’ÇñÌ5V!J¶YZ뜒‘weW*ê1iÄ‘‡¸~,×LØ]‘ëß’*¯ðÖÂq ™âT#H¼Ñjdô¢†u(D®BQ>º“Ù1»a9ˆBm9Z’"ÑæVòÈFä«’áõþç8Âbm1†i“g¥;…üº×9LI ø%¸LÖÔIL¸0D.‰ŽÛx³úPC¡ó«ï bŸþd¢}M^l;D.›Û†Ô³ºŠÕ#y˺ ø;ê’1ÊiaI“VÞØk~CáBr¨çÉiMì·Ib LÄ>Ö²§J÷n" …n©â¶<”f‘×ÏWÊD°À„:õ¼½÷…‰VbàÃP³ÖéKOÕ©ÜÅ…+ Ù¬ä“rž‹¶Mª`DñÞ¡^2±+O3•iDk—y1‹Ãû[Šb¾ÔMì˜u™Ñø¸SöT{¡FrÐzbés˜b¸R áJp³Iìl9Õ—+G¦Ú¬n=Hi¹}|óJIXB£æ’/"/˜E#LÕ*©"PNd\1HÛ*¥ËWñ¬ùÁzzF Âk‚”½Q¬ypj ))vs‰äWmi†ãøÉ!Åe¶8Ò’ëmÂc9–͘û¯"I¬!/ÙK ’Ä%zˆ§Y |ëA°äçhB TuHø"ÊTWµ†¾£>oâ(²[,²µŠ²)€ÉD³3BHµcæ4ËCœT÷—ÝEÈ’Þ— á2Àå e¶M{Ú’­b8a)%öŠJI…ºl­#k4£ØBŒ”#M^öcæ‰9dG³0ƹ¿E¾­Ft%¨ŸZ{&'#7­†‘£;íLuZ”1n±¬Â:ÁŠWÝ£wuWâR‹JïÊÔ¨ø“Rfzk7Vœwªe]iO*Çôá(çÛZ‘œE¯º5þ­/0ýE!ì¡+á“ÉÔ Õ6XòõΣ³œ…ÙÛìt%Bur¥\){‹„ª©Í&¹—PQ0™kd¼aulC­Ç!“%âÏ"•«Ñs”ÔŸëRÒhe•²EX®Ã…ÊIee™SÛ™¦Nd3OQÓ(v£Øsb… ¼”Àö“{©pr*¤(B"Ú&mf|ÞZ™sjú3Y‘jnê rˆ…7]¨¬Ûí”WÄê—Íõ'™j ¶¤É •TÊì~VTZ&~²Q¹b+´ær§,ˆ^':ôl¥“f{­º&·G\#Y?¥I=†­ ¬ŸtîD©¥yB¸\£e¢Ô\ok¨çqV–$µ¦Ð­V!Â(„3u-Öcaˆlf­“'Î* 5ºí¶éTOibŸ KÈûÍS3Mz2Ô¸´ojµØòžÇK½œÃ-+4‹`æ»HDC$ç³KÊ"b'£ù$ üÛ¶5&øåt¦3º•-Ê”~U|YÐIZlB+²Y¥±º—ªñQÿnI_0YÆ¥«ïÊ…,®Êg{‰¶“¸¯V£&jêØÇS±.ò¨ýdÂÈÄ×ãâäBa)":Q ß-š´r9V‚¤”µ8²ZƒQ *•.uÎúÈyJ% öT”‰Õ3˜ZiPâú¯îa­í¤Ä/ôoÆ„š¢±Š¢6q/ffI×J¸NR˜„çA.³QnQè®åfµoÂÉ.£¾ØtD˜b™’Å¿RºÊ2™hü†L{¥|Õ2dê¤|ËýLs!Ô62vejùbop˜rDR ¸ò¦œK/6Ìœ{§Ñ¯q4BùEÌàâ™ÎÁZ[ÑEx™Ìï¤"§y:‚êä¨{Œˆä1 ÊiõQVÏGt£×ܬ 2¡pÔ? }·ZÇ981”–i¶ÛJ©³-X†*£aHCå »ÍååE±Nb) nö!ôLQq½Æ9=s0Õ6‘¨V”‚H>ù7v„‘yÉálúËéRNÜw"ØbÈIö÷£ý :©Å(ä+°†ÜY“‰éÜ”Ù=‹RJmHY ’½°ŠçIоezÛRïJ<¢–r¼È¹Jg¦sà„C‡.Ÿ®¬äÙEΦðNå)\ì)ˆFgÕŸÛP¸˜Åe) 20ÂY„ ¬›.{2».¶›ä.¡çi[Fáj»LÅ"ÓÛÍ‹þúdJDaK¤Å%_ŒK°“¯²Úd:؃” ‰X_C8ý¬×MèÝsÌJLƒGîáIijWOgr.5v+Û›t!^Ä~}Qò‹dÍ"áD¸ªA­òé;©µ!ЧŒ†kOVâ5]Ú„€ÅÿøÉˆvfNûJü]ýkþFþÝÿ;ÿwÿ¯³’Eà7õ ²û° y8¼åZÔ¥á8¥”Æ äKá.i¤^7u°Õ|BæîWÜžYW§T¢.gœ“-ÈÒÉUòVe«¡dz¹Q\S$Žî&#ª3dmÊ ËšLÉS(©X*›&¥ùŒDá{BY¸‡ á̦ÇOCÜKXÞÇÂyø”Mß^lâEEË&/¤ ŽU)|Ö¹ü»åŠ`ÅC®vÅT&9å°¶ ²—ª-O›TDKº[Êõð—bP»MÜ!,Iä{±–ÈQˆF[¸²½\Ú- ×JEª$vr…©ªœCÑ?äú¼j4³Dñ†)6gR)¡ªFfv©…N7‘&V÷#¥™*ÚÑ ¬k—ú›'Ò_¦ªÖ„ã§b¨…l*ÜÌ#£J%|N¾Tâ>1ÚrÄe2Øu²$í´‹Q®sq.ý‡ì—'¢šB=–»NX‚z¼CQ°›™ŠÎ„[:‡%ž¬•R-…ö3…IBJóVBÝ1“·6ÍØ{§öË$æ‘ žN>Wت‰¼GÌaŽYŒøw›ÕˆÔ£e–úÅJ0Š©7”®^ÿ5 TiQë¢f­Ä%sžŽ1šR㩆ada|ÒÔú9CŽûZ%¨÷Oy ˆ¸ô¬Þ”ÓнÜv!*«èî¬Ó­ ˆ¢?óKEnz]IîœBE)L» 7—]ý(©»™ß¨Kžª¥. Ìwl¦Q ¥66æ÷zÙXg2e˜‡$Fïb)m¢m¤Ñka*ÖJ¨÷|ÜŽô9¬Ø²ˆ²ÙFªô‰u©cœVÉÃs:¯©<Ÿÿº!,’nšŠEM&=pzóóòó*þÈZíÌ!¤dÊaSVéœJ¹‹¬¤°·DIÊó6å1žR]Z‡åj »?-j§?ᔇó{™™“núé+"&ó©–‚(ŽÔZzHBÕ÷ºûëÒêq,jx”e+UèÖÁ*sBçTšúÌV2Ìô:PÃ,©µr¨uò&g2ã픚z èol5$îÅ~nL¡õØ®q9{ýÚËâ=J²"DS!æZHJ«ˆó;̘¬žë9®™){qÑNóÙºëä“ó9³qÓ©TXw³RíIÂ&yÑqý ¿T!õðeù„Z1’¶S¯y;$Ò6,ª‹}n3¼GЦ9dTµñ¤5T¡ѳ‘ŒÔ6Ô*åñ©.q©½+!8œÎÚÏ+…-[û,Vb]?‰z9*•wWÇb„ bh!Ã?§‡L$Ge¼êÙ@Æp‡ä‚²˜h@R)Ÿb› ÕGcöFBˆD„Ð÷äE/iI Z*eHA C*ÀQ5]š:É¥ÁŠ€•£†Î‘?Öúâ⪡{ž¡S!4ü“²ÓpAˆý Æ¡ ˜m 9ž±s’4a”P”ÂÇpÎ 5F{Þ½Ç8 ÁB#’‡d‘œŽ¤¢1pÐ(ŒP0Qœb$GôãABUøq2†9 Q“˜ÎHýÏæ1W^â „ f¢o Ok’ ±Dׄ܀Q–5›G…3ŠôŽ%¡¯ ‰Ó—t”0ˆËˆH„peKLÊŠÆ&5#ˆ®” V7DFFUSܘŒYÓû¡UR»H¬ ¡±>?û„42ðè¥!ò´cá°Šir"f€Ë§€¼JB(e))â‘B6Q˜80V œ‚70ã^ýˆYT!Ýáý!ŠQIÍÆy]FP%&cNb˜q”ƒ§Éq\CV´°¤”ކn ¡+ˆƒò#8ÁhÖUƒB%ÎéÎF „Z0+ˆ#´!ˆ†é¨bØØR ÁÈ)vpÄ~@¨$ùå¡ …VRdŒû<;D B ]±L‘#ˆiÂMÆ ‚™RÄ ­!`â´æ!Íð`G `¦”neÜ!!È„v'Ca ŽÍ‚ªPŒãS`±”gd~(ÝÈä=H¦ ¤ê?¢‘…S`11˜…`ëC¥Âª¢'5ª«ll)hûWäÆÒ<¥a ô(Ž)jK‘¸$I¢äR––1ôM bÖ]£ü´]}þ8dbIM¨Ìé“&–KŸ+Ô$­òˆè—L?]›W›I”)Jaèkê üLZÏY±)ˆ&±µxWÌD¥ä)ôÔš´)äô7ººŽR•‘)YIø¤ó¤G$Ñ+c8¼™^¾‹44zFvL1P Í9Êï] a)n¡§½f1Êelä)ZÅ/‘}ùrjg‰JPŠwÕ&Î[¬Ãœ×!ÿµ©èíè]É*—Tiaˆ„ß­‡·CйiJ uÙ§ák»’Þ¦(“iPJr¹£•ªKºßnMX‚=è"žô©È;%Ÿh·a€¡U–>è0(õM ¡®ÔÚ°¤úG–¶ÐIä­3ødÅ1œÆ)î–>^<š‘Ù~PÍf˜@¢n ì ¥—íÒM#¯©[ð†W*fy˜‹®l_èøž¦‘f_Ñ(ìÌs'Ä­6T$‡;)XÇB— cßUÕÁˆVÔ[ §TÑ·>ÝQÉÒ)ÚÔÁîwWÒ¾I‚HRKyciÞ2¬äˆ ’ ’^Û«<ÝT -§ƒK„Ú¬áØÝ¢¹mom£ãÓ–S)R©:‚kœ”>>…õm'”í†!WœTÍã¿#=¨ ÎeóÅÕªµNõZ³å#ŠŽÅË3Ž10¤IÆ7VhѾ*Ÿ0Ùe3õMœT ¢Áï;ž96ÒÚ׫A˜¦BˆÏínR.p{eÝ U!©ˆ$¦ƒt0S„ÇNírb97ÒBqBª1EiWob)^®ä ›¸Þ2bÈIh¦§}(¤h+¨ùVè4YŒ’ÿÉèïÙ ¥ƒF¹ÔÛ y'ÃZ I4`So?ý‰ZÞÔ=˜…)-Ü»$ !YÝúM¢<Ã"ÍKÅ­%)%’ã«È!Ì×9ÎqŠdÄ©¦^ÓWäóÄÉ"ÂZH-(`£k„ 09šmíPÎyêã6 ÇB*(D@ˆÐûŽY<É,7m£æèÊQJ“)Šô¤OºjÔÅ®:&UñfvQŠ6ipÇc ¬*©*SxBZÕa{ž¤DI3Û[ C»’`L®aš—XÕM”iBŠRQ^’tèwƇw„²Ó-{>~¶ J x%a€åñ’À‡qª¥/‹o1–iìW!ón(ÍVŒEº‘7ù)E,ŒQzüäÌ!\ü*ýò~÷ÿ‚¿ÇÿèÇ÷_ýih@J /!ãÏ‘® ¸ª:ü;Œ¹L1ë¤Jóˆ4;(1-Ä¾Ôæ3SF…F+ä †àk„B'Á„–èkœæfrøJ£»7üÜ®pÛÕ@ܽôz†!†—¹õy8¼a‘œ(‡{i¼FT9)èËŠA” I°]„ìN¹ˆØ£R.51„ØEGP­ƒZ!Pjí¹‚Ú)««4«pÐÆ 2…R’=‰A¬$gÚ‚R“Œ†(€“ˆ4»h‰ ÈTE!L­fÍ[ŸI3ú¬MÝKKû²"œ•ê±V‰”Ù¢r\ûû¨·´G]ÿæeë«](y*œÎœ‚ •^™˜¯EVi¹Äó,…º¢”Û¸ëõ_%Ù½?RÔN»ºµtJ§oîÊVÔ•ü3y{ ÞFÐ¥(ÆvÐîB™¦±ØîˆF'µ³µ3ðLïÂx¸b3HNÊn¸U÷vß³i$l’ÅJÝ™X+'¥Dnº˃䦶XL4¼®ÍFT¢ý/'.X’0Äe9*3œ‹'3ÅNÖ1Hr#Œ.Éä7Œ™W¡p´Õk?©Äá­Ž~j]ýÊv6æÿósB¥ «Æƒő˥^JDKší&lþùz—2#H_µ¢IoꦒD-ˆ'˪£Š¦õœEn{ÊsˆW¦Ý‚~¹‚ŠL<½ª•.r¡z¸"6_­WIQÊ´f£¸¦ZÖrP.gÔéS¹«ÆDÙÔEÒ­rœ²[‰L)Oä1ô®ŠéõÕ®°»ÜËvEC.QNM Fœ‹·(©Ùÿ憥{Õp™Ë0©Ïm%O›&Ê®Dêo­XžäßZ²ÕËÌ’¸„j&å™h÷b‹¤üYhˆmuÓ¤RSvörò Î∺{‚±[èåsÏLÈŠÆd&K³µSì´¸œLô¾s©Ø%3lM+1ëöc#SyÙ0ÞciQÓJCÈkö™× +2QÔ‡Deªk¸Ø}eöñpšjФÆ]d!ðØn*Ø‚«Q¬)JcØèGïœÃÛ>ѹë÷Ý\ø— 8à¶eÉ‚ *0bâ epâƒ!Ð ªU!ÐÊÈHAXìÓ?i‚Rltä ‚(él›¢â/0ZQ½Æ1†©14v® Ä0v‰¨Á¥ jCÔdö?!*…:“¸xZ0郔E ЄFÅРˆzÊ#b1«$µ/’nZ‚,¦SÅ9¡0DD*†ÀžÊÃCÞ¿öº)·?£ Ãøup¡7*­˜š±C8&1¸§Fœ„f õÿ-!j0ÄTЄø("£/`O‚¡ƒnJ;51«6ÜuV"<*˜eÖ¢°gHQp‚ ÈÑâF ]xt… ³6S€É8r„++!”C àн"ð3”NˆzÊÅæÊ׌¸Ç èÂ)…¶"F †"aô­h D(t!™Æhl ã(0Bu)P€NHÊ3b„* ó Ä`RlÊ:´%äŽö‘ÞŽäe¨ø†Ü] et šêPÒ@b@Uhsâ¨@˜pRpd;S“—‘}”0I¸¡ÈB«PØf0ÐB P…hAUè1¹^%¥öCÌ*^%,ñŒÙùa/…A nÓ´ ¥ºÓ[èÔa4]*Œdd" Ø)¢ÁÈB  Œ ¢2 ;ÀA1À£Â™V’kYr¸×ž mÂ"—BE„ úJAT¨”[Sk‘EuœHc1š„„¹È@CŒ„#A)­­ä”ã`°|³†+ÿøÉˆwaNÿþˆþCþKþ•ÿÿßï³’¥Ã¡OtóXèy°h‹O‘åµ\ǦV¡Z…íñqwæìÒ*ò –cƒð™ †ý#BÂÎ8Á©#íä@aǶp‚ *×!˜”›T#ÚxNAÁ!#D²=uÕ`¥¤Ú!IªˆI¤Bi/¤Ùa%¢ße ¼C˜AÌt¬Ñ»â\¡Ы"8Ä3•$ÔÄ5þ‚~š².á·läz†$R†8öŽE¼¶·~{«Ôó;„éEQÀË 6¥¤÷—Œ'b‡#~ªOgµúÈN–ÊÞ'=.Bã/‘ S2$ÅæÒu'Ì¢ÿTÓb´ÅaÔ„ä) v?Øîà”gøL/ž$ªjÏ&Xë´¦Ô…0AÀBCÇ ä¼nˆ÷—A\ާsÊö%b—‰r‰Ö×èöQhk5È9Œ²ëôäš&ÏÂQEf%T¦˜eiU¨kæûĦ¾·?ƒƒ@‡qÓmæÏê¥$ÆÈßëZ §xgÚ sn—€”´òÌyYšPèFpF7ÜŽx€ƒ`’|¨õÎrö¾É(‚ß²Bý¾QT±Å¦'‰…©:_÷++HëvŒ[,â½S™“óeˆ_7óÔ”² ¼"ÚB ûÄIJ1~É.dc#¦{žÈÆË—Æõ«‰ÅùÍ%‰ó€ (hX£5(ié"ûa¹)°ÒPzåÊ­v±wÔ(›ßDZév©Q9“2Wœî;z )!ák1DèB^òPý‚‘««$i>8pŸ;C­‹F;µ‹5KD{6“‹Ûu¹PŠïC°ˆT££ÕÖÆ“õ”‹È&'Ëd´¯vZÓ fŸëÆú®Y{WØŽTwâ *[rÉ0‘ˆ)L”¼¤ ˜k•³’-IçåqÏ‘Ž#“D‡ëIÿ¨Kû‘«b•³.ŠGœõMНÆ0Qs²Ê"J…ê_™¬ÏíÎ=/-‰–T¨£Œjv˜µ/”z gUdë>%IWNf³Ú¬Ž˜n©rñSO)‡*ÙhªÏEˆ²®­<%hG"Édwb´žk)>»·Ÿmp­‹¢‡â“›¶„°Ñ)má,Ž®gçqÌ@ˆD.‹Éÿâñ½i •I%k3ÂFKˆ¨ ¡…ZüüÍq÷1¢ZØŽK«cù4?Ô9Fï˜E Sœ Ô×z9ÖL!ÈÜU±µ. þ¯˜AÓ³¯Sh&ÒµQÓ›Wõb,B(UÃs¥„©¶íù/ón¾B~iaVE{etD°ç¤©LB%ÉPN¸6!?«uÜr©>3J¼Í“UÕó3 Y¼·œŸ–„T1è¯g‘Œ¡€„íéBR 'ûWÍDCœÿHÕj­ EL) :Ñ(•¦ÑqSiµÌNÓ˜é…Ç3{;+ź´…è‚XùûEŠ”R˜íæf,‰Eû½°$Ì~&Õ±o.ç…-XÿljÕ¾¢8RHeA…"åaðô^“ºòx¥*ð•>v*Ä·M­LuÔÓ*‚HÈD™*Í+H²›j‘ï@¿ý’Ñ„n*éÝ-1Å|ß 8©#D]FËÒ‹MÒ¡8z­5pAUJA8ÆTw¨µRJN]RØÌ³d°Rgz™G¢çËeA“ù+wj³¬‹Z𫵦f¦´§IN«­d¾ Rü׬›Y¤};ˆìvu˜•r2'#Xž(”'SdÍr(²7‡rD:ŒP†^ÍTgÄù%ÁõöCç*X,I8 ¤†b.ð¤"u—¹Jalj9-¡Î¦ANSŠ)ð¸BìA¶×¡r’½ŒÒvàî±Ú„áE×uRîsvSX‡G¾·ù…MIRµÖÂVšÝ²¹ÇP!R 2‘˜ÂKõ£î*ÛÞ¾¥Wñ(ÝãN.ÕTýÎâÕÅR§ç…I\á‹1Å2Ye5žµÜïuõò ––JZf"ZÈÌAÅYIÜ/-­oñâM#5¶U2ÄTQÕšíèbEw¬¶d¡t:âÑRÇ>©S¼¡rRÍ=øÌ-j”ïõŸú‹ý—ÿ2ÿá€À+BL±á†êT}èdVtÇ,æÂ ˜FËÔˆL;ÊbÀÞSÇ¢ ”c⌂ˆ¬e"k¤ Ç…"ê+1 ˆCD)Á*•«‡C2qpè¤aÉ ]@ætÔ††­ƒV sU£ˆµ¢ÅˆžŽãÔÄ0Ì! ¿8bA„(N°2C‡i¿,&W ²87‡=0§£52/Ntø@¤5Ãbz¥>!‰È# ñUW@—ˆ”x|J€ì™,ö±B2 2kFeâéÉÌÅ©SDQ&Ä-@¯" ŠÈ'CË7D9ш‡XƨµÐQ×È ¤dÌʬ^… « A„(Ç‚­•(pÐ?<+'‹ÑÈU.Ñ @B"#ŒäSÆwÅÄFé­íbµ2¨—®KÂ]®ÃDäoÑ7 éÇsý »®qV¢&²Y»Æ1Åwj%LÇÑŒš^öôµøíqK×ÕQd¥fßBHíDÞ0ÇÖæs‘Ç Ìtîd!eAZïQÒ¤tgï%>ºÔZûl‰)oö­—ÚÖ§ÖžLýÆ«#½Èˆ†Êª*”ïHÌÜîû…y”šzãFOÅŒz§´ûȲ‰ó×Fd1„J=І_J"H©ÔÆz¹}#Ø_ƪ”´DaÉÔ7¤JÝoÒª#‹¤Åßù ¿ž˜9U¼Ê8´[¯ââ]BˆTÂÞÌÍ\¶Úž´&Vk&´¤›«.Ò™´é)…ùÊ"ô‹#f蔩ˆr½Í9;— G–õíC73Ê1Ô¤ý¡³/ãt¯9u$Õb\ʈ:[»õ|ÇRx‹É†3Îþ”®jH–^ÂÈÔ’kM={bûéB!„ ­_\n3º—,G6Ê‘ŸA*¼)ìúÆDœvé;‘$.)YwÊK‹®dû8‰/I.š‹b1¦y&*›é´Õy„~NS°é]œ–³¦r¦’gUÏTPù«ÒßûÉ#çnI¯)ß t„”îvJ¡Žq¨àŽ\«˜ß/+™'åNMq…’Ÿdú[¯¦• Æ2ÉZÑGë.­•IÄBòÄÒµxêþf+¼í•¬ä!×÷Û¢u^ÄJBìL¦Ï¸‹¢¾KË¥mE\£‘“ ÕÊ ŒR‡ áÒ+åtÄNT»\T»èKÒÅ¢QÚIC·[m,ÄEãPÇÁÉYV§Ü(î’„é?-úoãœèÇNI„?â)Ö¬®P‰I%;ÔB`ùYXÔµ'›NI_Fu;P݉V:ŠqF ¶ÚgOÆf9YÈûR>˜}o•^Þ¥0…¿w¶)Õ屮}7-#+Øâª#E'?œtVW;¨*S5Ås¢W´ˆ Õ«ñ2ÇÙTZÖ•®i¬ÝCïÕVܧ>¬…;Vuk"Нd:%Ó¶’î£;î¾è7„ –ôå²ùŒMK”K» e‘窧œA1Î*ŽC$ÊøNgfuN±»Ö­$®yjT­s=ýIî*ѱù¤Y•$Êc¶¤V±WýlÅVªV*¤?Wr˜ÿ…ÔɵÞbѪ]:)ÚÊÌŠÝë‚‹e5X~x™™¨œ¸¦•Òi'z®Ü:ðêföÊf#f‹¯ËUï5(‚Pë“%–¤ª™ B† Räë"ûÕ_h6z8FÆúùü´è›ÍU}Zú*ŸèLÉ)êÔ/ôÙPâ)Ë;+«òÊUáÊ!FM¢zÕÜ«Sµ"h¤¥r§”Åa¹ëoÊÖNk(B¤¤ò­k‘:‰d:³¬æj2­ëG˧L]^m.Ù8‰g£ÄkÔ™&%Ius'{ÝÕVò&ªk­PF5_1g^G*ÊVcaeu«ew¤U’”Ô£Øöã*Ñ-&‰[uø”6˜žî!XÊêŸ"iJµJP‚unÕ¦¢ eä8/ÌLlçÚa1M“!0_JF˜aˆ2…N{™YuO©)®#ÊÂסñ€Œ Sh(ðQ©ó6`¢iˆmbDF`ÌtE`€@Ša*©|Bp JC‚<áT)ôØ»ðF{yœ3{r;º2VÑP"µe.Ý":t*R\# ÑÁpq†2å¸pwäºÖ„•Š1r…„ `‹±B"?Ïñ&.̦º¹KçXê0CÑä;c†˜EÁ…kP%‘d9™:…e£}p‰[¡"âË’Q(1rj<Ûú‰AB â)7ßu¨jvª´; ÿøÉ¨xâLùñüvþ묖±´#D).¿îç‰|f¢y=bWü ÊIaE(¬ŽK ùäÛö‹¥”uã9Õtèï_Ôn‰¢˜í{ÕÓs(˜ëôZ¸‚8ˆç³ÍMÌ£ïvV‡z8R¬ÒÕä‰%SgÈ(ÇVùAM×kÛrÜÂ&.–¬9›ëæd–«Éç¦sëaB_ÀÍ+>PAU'›kµéVéÚügñ[œÊZIÝZËVDlr¤¡F 9_³½L’JI\ šb³c1ß;%U_ÔÞ“•‚u¢èQ„?â3áJ0ˆ+ª LBÏÙÚŸ[ÐÆ:É­6D”ã‹ô¡Óçk´ÃQ=Ú´­ÜûOkzˆè#ÅQÝUèÄOÌ[ÉŽu9±ÈöÌ…Ôå%~X‰¢,´ö‚ÊxJ‘³Š1ØRŒ@´Ò‰%z‰Œ—(À€Ž J‡¸— Óz_¿wM]ˆ‡6û\šþÕœ˜þSº¥3*:kí¹,âä!IL†X“Ù1ð´#jé6õx¶š`ËY~c‘ÔqÞ¥j¿Õ–ÓúïM숆9žp‰fC[}ô²¶yq_„Î"îÚˆs)Ø¢-sés^zV+a%¡BfiU -ý çÈ(p äDí‡ÁíÁ2Ô¡l0‚‘üÆ1¾¹û‘m‰VEl}–…Ãnh‹WcŽpÅ[ :½ïRj‹'kekÁdÑKTÆZáÐN¡Š™«+‹;Wé¨â]ôìä#‘MBñ«ô3÷b¿G|Ã’1 ÝÆzéù‹E¥)üϾw%¦yWM5$‰R? îë( `‡„t%:“IKÓiGÙÊûätÌÍÏm)&¤Fr÷zç«”'ö±`Î`€-ó~þå’²Óè̘˳kft³T£Ø{œ¢ºˆsKgUˆ}oî-§s‚<ÈaEÛ?‰»¬/Iéî´«éHŠå*n°DA‘›:Òf¥¥·TG–ßc˜*øÈñd›)š¯«RÁAMâBR„ûÛËOcH㬛-×?>´žº¤q²P¬Ç—R0‚1:j=‰v0Å EfЇˆ—ÑÓI%×+Ç¡);³­<‘c!…¦øŠ9;æKc]¿OOôªÞF¢I¶#Ä{k1 „wú¥h˜¼†ê%[øSºãº)(œNïúP}A¹>(X‹s›É.Ÿ¿ÖëTÄÁ `æo’ÊÊJx¶ì¿-¨E¤«Î踃aó U• û]Y0G¤©ïÓ9¢¬â8톚£­0º.Zò-"Ut•7Äâ½Ò¨;qÈBq“‹Rïrbt¥E2Ñìk&÷Òƒâ:•nÌÊAM”³&²¢ƒ$Èûåæ' —±¤esJªeŽ¡/Û¯$\Faµ¤8pR(ˆL³×oCå}zMDM—‹NB¯g%|²‘²gMi£>âiM¶âÅ(qŽrâJb¨¹Ÿ}—ﺊÄzõ(Kø©ƒ=så;œÆ¨½BU¿ Lÿz¨¥)É"©Ïn=$7ºÜœtÅ.ížB§ž!SÕŸs[¯ÿ{Wå KT’‘Ì„ µ_ìLwG*T);ˆê#QK´ógýÑp¤KËB}4û[¬fY;r:=$MíP®ak3ˆ1‡A=ÅFÌóP”\sH½¨…’ó^/eÊó}(îC tì˜Nbí=Ö¯ë÷úsÇ1«#ø–r%UqIrUV®Ä«ŒÉêA ¹E¡è߄ޣöç¹¹^ˆj|{/²”¹èw8è ¤¤.#á;wI§_!t´2º7¿Íï–*’îbR{´¥^‰D1 å@„bH“V0ih÷¤h†²ÔÄEÄ¡'ΩĠ^ÔtcUjïèecåOäªLÅK"Ìùj–.ß⋦å9©…1Ç7±Ù=\æâ¡_H|“J¹5É»!^K"È·! %DÑ¢RúÙSꔃ0@ç"B&&¶´š/½ÜØ‹—Ê%jÍB3­*ÚEâÿ‘]:Ô뜄ë‘FYH9%™7ïî6¥î\§_^$Yê ÈkñÎvIÁR„UoÍ-„äN2ܾE8Æú¶}0¬ÄÕz5$£íŽõYHÊ”ø… wN«É‰ö.ÞJÒJ\ÞäD,B·ÉUîÌ¡÷ÜBœå#…GBYN7.i Õt°˜.à²ÉZ¡8¦Æ*â19\ÌF)ÄsB¹˜çJòHBÿØÓ›Ð’)qŠZMO–»â2¶ÅM•â7Îâ#‰ÅæZ½ÓdÒY]/Ç®¶EZ—hÎ}+(U#QLÌ’”CI)RþëS1<äå¥XÜ'йNMQøZSKRê­‘`£ Ø1„~Ja/ª?–RzU8®GÌò}:¬éYOjà‰kIR¦-oÄ ¡H9g ai„³Ú͆ÓÕ$*|–d(œzÉo¤–B«ºŒ“¹zìR |i•§F¶aZ‚ËYn*}ô¹”v•ðBш}ÝrPúš’ñäys×ÝhIXEËC|½}?Ñ«1Š!:ÊÌ+©ÔÄV[ Š”¿ÒRÇÓfM—ÀƒãJ³¹z­Žœ¿Å©-‚Œq’â¥ÐÂ(r•¹(èõªÛ§åɲ…åIJZ-*0#ïØd·)r!¸Õ§P#e ²'-ˆÎ_¬èŸ®#×ôˆÜb1 b¿&VQ„VÕ8˜ž½.)pf¡sU‘.A=½³Ÿ,Ç*zw0„;é(ˆ«ü}*Êè²4¥6’‰6úI=IbîZ©›}É •YL… e2£9j1 Æ"n%ˆõ{N]T¥RŽõ­°¶Þªk/cnJôGЯÔî#£»DLÝãY¢åjŸ¿‹¥!YžE+éÏ’’1ò#T™ª¬²ÖZ¯*NMïìÒjò ÇØåu C8Ð% H Jh¦™S˜pGI¾c+Ît8…œ¡™bögƒ•€þ&qö Õ”q€G 00^Q Wr¾!H1²u¬P¾9Äeb¨L”\Å;Žƒ"H ‚A‰?©Î«â¼ìµŒ äC¨!ÆH ò›Ø¦Áà ¾ôJ`ÇNì#õ‹sá:±X#’Œ(†R–)BqÓYRðƒ£ŽÅ9?|! d!/¢Ä5'@`ã6Üq CA-L!®#ácôuqÇzø¥ƒO³†øbϬ³zpa™ÄQ E›ڠB¥ŒrHby!KçÆ#›QÚˆæìR‘Ä“ àìsRÌg‰y˜eгS5ñœœGDïÎGãÇñ øüaþNÿ:ÿ¨ëAþбƒ _1üh~}xe-îË)†OŽAM WÄpœØûÅAHõÑao©¸Dnd|ÝÙÛ€ Bq F‰¾ó‹(K üØ0È ­KG^U‘iЃá[c%sÆ Y „|`D 2¼Æ„r+L$dEdÆ­òÍàR+ •‹AÙz(· L!S20Ñï¸":PbŽÜy"ŸØbûÔc*ü,U¨„]¹Œ!‰¨‘Á'c#?‚¡¸† n‚8EEEaŒ„%A!è‹Ê]= ðµ)uˆÑ§xXqcŸ0A q8؆C†®r8iÛå!™P”×¢“ðÊ‘5ºåTI3QÈ3 ¨)^EÅJȼXÔ»ú´0¨¶F¤ÍDá´GçÕÆ “5!€Ù€”‘1ˆ!™Æô‚RFΙ™€L£‹ ¥•Êü¼“ B-V¡ùX:e "«j¤Dˆp ¼‡! 0B¡XBr)j.!kÚ2PÅžº' Ìh$2 •uò¦qÀÜR4ÎÝÏ‹Ç#‹‹qˆl‹T”߯W ¬iMq:‚ŒÌBP7¬KðÒbjM·ø¶Ú SAÓŽ@åïNBâ¨E B~®(\í3Nd6i€˜"‰Ä$¡å™#´æY¢'‰l"çP”Š-ã¬ÀiØ1 V: ®u¢¢&A ”ù†r˜®ÔEJ%AX[ EsaJ‘(‰Ì%9ÓPaªKS(ŠAD!ˆ‘‰Ñ“àï–fDa„7º-P­”AÃ' ¬RÞ‡bñcbÖgNýáÆ! äÜA#—ÊÔˆ˜æ0¨ØC<‹ÈVTx+4‘:$FІ137¬Ø´€v8Š p˜âpåº t,Ô.F—ªLøæ°#!^ÙÜ0'H&'½ˆ vÃG¥ï±ˆ½ d°¬—™x`ãŽà©J~ŒÁ­!‰OU‡:¨ƒzAÄCWµù°Ê-RC|øˆ^QœZBBäà%O„õƒ11LQ˜‡L'¼04oL¡S"ëD/_Ñ…é–=—Gg÷”æ@¹Xµ”°•Φ¬Ej (fe0EC#q¨„xL B™@cSvϘçß9NC‰´ÒH¢MNYÈöî¥K~ä EÑ[æÄ©‘™äláŽg¥ #¹H†jdÁkq(3sÎÝs; ´Æ2uMj­˜S7ˆ["ðžC)TÃ<Ú JÒY ïñ¶B¦OÆÖ›÷P´Ò‘È[ÙМfQB¶wâÞWÔ<†#m1ž‰C¢ão±w*d”dQ6E3&i:R×ÛT¶¿9Ä¥0ËIIÅN¼îæž…O'J¬›(UïùÃí’¹M\q_ Žòø¥+h‚:†ìraev?ŽaÒ°× ®å#¸Ø2Ù¤¸èÆÙ=RMMHÜÊ!Z«kÝQšYr"Q³ ‰DË]”‚©:™á°¨µ dvãTêÙ´e%Ê+:¬„Mþñ‰m1ÍöN̶bب„åìy+r»Í†å(F 0¢• ‚úa¤¢0ðraTæd1]=ƒN&*Ò¸øa6ç™Í`L Ž ‚!“¨jd¹A¨‰,nŽQŠ8©ÂSŸ¢AÊŽÐ1ü™ª(Ä)o „¬4dÖâf£!…Oí„ÂDÀg')›àÔa3 `ÔDƒÎì ±ÂºëKÏ»Æ9'͈9ÙRé{¨`#šô1 KË_u>Ü̃BÕ†„©Â)Â!‰Ég|4ø2fg!4h#à }3Ž¥ _ U\½[1¸ê@ï“W/h¢!³îíD MR éF‚’ˆ„8ÊC Œ FÉÜ‚†Ì6ÝU"ÑpQjõ2>ðÿçUêB1ÎS9A Â¾j$nÄv8®N¤a‰Ä‚§~ÊÆ&N„¢!®b\Ô7S$ß „h0éB”¢‡ü¥¨æJGøÅdMHÍqÄi1€ÔA9p!Yölbb1ŒZé˜gBFéFSbq] X6gU|ÏoQà:Š…X)£¬nFíã× x6@€Ž4D–³lJ¹Tò9Cz®åˉۇB3 ‘VÆ1‚#!•q—TiWÏûm+|{~bn-žM ‹ÈV`[Žâ‡GÈö>¤Æ œ1r•„¢nhöV˜Â9¬\æÜ3¹¼øµRb™ß¸â<"zBšðÙ‚t#£jB)·1ñà'2RUˆ¸¡5Œ!sz´Ç á#r$ BR‘‰éð·ã+îñAV!ó8–\Å„¹¬%ÍZ…I·3þ±I.j¬éjñ¬#È‚¡¶Â#hʈŒ)ŽÎÌ»—Nï?fM:W:äL`rJÁ!„Œ…"؃50ãÜ…™Ag=· hÄ#!›0”ˆÈ*2C3¤¿hF8«ËÃe5È“%Fw˜.bÜs„:™gqÐRè“Ö—(3&@ÎcR1A†€6 G ÂvHò …µ_8)Å`¢›Ú~…DÊPLÆèØ5Ȧä„kÐ)”œJû—Z!ÊçÌ.r¨™LÈ"36PÔ¤3è2‰B>"Œ®U¼<’/DÌBà‡ˆô¬%zd$ÍH-[ÿøÉ¨yåN¦&£)ÅW³’¥»£w7ö˜×ùpf"Ù¯E%Æ÷ÃÓËÄÇ£&q+&’žö/ï'djRD*r”‡#+x˜TNy íiJ Z§ Œë¿­]¤¼õ¨šíU*ˆI_Cgc[srz‰!ñ 2XÉ;ЉÉKÌ‘RŠœÎý‹ßÍUdEEr§ZA*ù”k†¦/ÐIMVºà¬h†‘ýšG5 ÕrJ\Þßj½‹­¬ü}CHØf¤Ì¨sakÉ}ú=(­¶C²¹ØdåiUÕjðLRç6;i6„Ì‹ítÒ£jQ±'_DÅ3ÝÊBÌr‰ìU •58}lÕO³cç-¬ŒVtåFZ¦±r͘ÖNg76È$ªk9}u‰Í‡ÙH*ÌœæYÒ­RX: '‰v)5Í!©–ÆÌ_ÏÞÇ”„jšƒÙNËX·Ùf$†S±lwªFºÕµÜ‹ëšk:DØÙŸŠû´KÌ잘k/R—Éó¤¶m¹4#Èžgk"˜Oí§/ï4ê3k1Úª³’ŒíFâ¨ÆåÅ´v»SPž†Ü VyÊMl¢%yh©¤‚…gbqÏ*Cr¶ë}Äâ5•õŒ™§ Ý`³‹²–é¼ê$¦Ë³é‰eA ;Pç»ÝÈÁ–ˆŒõ/“D¡´Q$M™lœY‹œZ ab|¸ ºÿwE˪¯¢siÈE¦!,²8÷l."¹ßNj”îwºÙ•9n%0ÞŸ…ö²'.%‘Kr¦áPS‚ôÚ‚½K‚D‹] PµcÅ%HÔ(ô/Ô7°HÃn œ‰ra5dR(É£‰ŒbXÞɈÙ_>—NYÏÊáZ…3Rd-ºÔeRX¬8ÀÄBN(CcS¢[:´ÅåŸÇ&ÖE§¯ùòˆ¤»8Ïr¬ç7 ©ò¥j$d£–1,ç(¦q"ªw=|[ÁàßÎË'LK1(õ%}¾Ü£)x‚ TZhÕãÅU¹I"`圎q<òf çÓQºác§÷â¬ÆE9Tbh+i(¿Û¦.¶>þò¢´,ŠS½ÊCF.Ð/$ño±Õ[èA\£MÍÖŠœ9ü]­½h°°Û3 šS”…ÙÈ)uy¤ÂóïµWl¢8#ç3©Üq%& 0þû\=þôR^òÓ.ˆ·1J 1CaÂA2“ÂEïY%K&ÈòºL2³e0µÛïÝ‚N¦¤Ã_¥™û‰8Ç0¿ ÓǨSI‘B°.(š€9R6Æ(Þ QÌÆêCâGŽò•¶û‰z?UZ·›3-¬>úNA<¤+˜ó=•†x‡Ã)PŠŸÊ´Ø[#"ì^J-ÐÒ'åhKð¾n „ ‚L,³H‚ìk'‚P (W ä\?#YÓÅЉ2X‚l&öo÷ãîÛ+ÄÒ[ "4Õ(S g!és¯„¡Sgì¨0†F÷E+ 8wÈØNñ¼?•×$BÑêô<]½EøK’½ '5ËBcÈXçâ”;p U}*ÚK]šZõ€aŠu!Òît0szœ©Í£CÄ­+‚YsŽ•[ÒS ¹SÑb™Uˆ9Ü“g2vçZQ£*ÆKŠêg|ìÌÚͧē֒<‹5ý¢ g›b;²[ŤMãåI2 Ç1Nü„‡Ã…F­+¡Oh‘.m»P¥ò˜ÚŸ’w­*3¡#Äz"i£V.}*U!hˆAÇS³2O;^Û˵²?õ˜RÌ„œEˆÁÃ5K¤ÐJÙIß\’½wU‰B ë(Á­H&§VòËÏì¦»ŠŒD±ˆßH”Ç&æ˜ãsÉãÃRÑy4P¡Šâš#(a?¡=\)‘tÇŽz‘ ÄÉÞÁ„EVˆ¿Éòb9eÊ>ÍøWÛ Ÿkð&•*-e÷{Œ‡LæÙz¾•Š`§—2Èل¹L‰F7#<Á$$)ŽQ{ÉI¯,÷.=$1¤´d„‚l0q ³äSP 1•³ºé$(’ Óžb”b£Hz?mqñ«\.¶™«/Òžˆ¡õ÷4êS±-¸¯2”%.³¹Â¯ˆ2s¸„@ÉõЈÅ6Ëœ™¬Æyˆ¸6ÒœHšYþšH—r›ÉîLiÅÒ´‡`8DÚ(3#-éŠãµÐåEk …(88¤þAhié£õ-LñjrÇ<Þ4óÖ*p~‚Ö0 å2ˆ…÷¥Þ°òIæJŽ“áDŽRdØuÎj|²úÈ_W’¶ÁQÊ IC%È.–%#7‡’cÌ+jm -HXã€À˼PâÖ¦’$'ªÆ{§z³þèqz×2Q}%(|Jtl“{õD+NCHRéÅ®e俵‰bLDbˆ*8GEˆY4~ß¡ˆ™i(,¿ ªl ±ŽB‚9ܹ½S‹Ç¼²|Y Pr–{1Ö,{n‹Æ$Û(d¬Iº.ýíbg‰± ¸}0Ø",AÚë`ÌaôKç,r ‡ðè9,™ÒSõ-—GšCÜ“\>'G¥óidGf±Ø!³¶ÒÊH£8ó9Nº1\6Ò2zun%ÂY¡AæC:éMǼxkÎb\ð€­4±Á‰,x$b‰ƒ‡;ŒV²óEvrðަ·v³SŠÂ…ÞzîZxµ'ýX]‰ÕäE\#Õ2‚BWU¥f"`¤ajšJ¹NXXð G{E{Dé Ív•8¦A…Ü“båâ[0lje–ÀÔkP-OúÒP*Cf´Ÿgñ¬_t¡ž„EqFá Ôã$ÜÔ–±º·ÕóUq@²ì‘߯¤.ÖB(âçÔ­ôÜÔòGXaõÕõzÇÙråÕ­ji…Í1Ò‚ n G þ<Ði&).L3„5±xÙ+$(À 4 xp “cG¦• ¿e÷zÑý•žÒ‰s«ìº697·Í^(ÌU‚C Dz*^o O›W uÂxŒï)”v0ÅM$çóÚrìÅÒJ” 1:KÛÉXÇ$á@Àbã†5)CÅ‹Q^ƒxó¦Ž1kÃ0Aܶù,,’ñ7ܬÅ"©qµVÆ™Žå¡¨)ÔŸApôeˆ83W¬ aŽ1r±wÍÕ§>ùLô>ŸÚ'y0I,5Ĥ¦ Ó:ytt";±Ô"‹sx¢ÊŽUK„5ÌÚxE1A]`«\‹<ñ4H[‚Œqê1'ö@ˆoëë£ rŸS9ŒA[Jß9IéAË©Dj±?QzKÈ'Ê.šûí(×eÂù—­«ñ|J$DɘÌ!—–‰[‘Œ(yd±ÒíH¼.´¤qш1>ëH÷°Û$Ô‰Ñ#Û‚yrb"ÃBr¼’¡âƬE!gÒ›¼QŒã‚­8¢‚&KÆÒöB_¦/X²‡I#Ä™^›-UÜ„3íIrÑ™~ÙjC$Ã,bÔI”D¡{¹s¢`ØoUX…|9"Þ’7Ó€@€Ðð 5ÿ÷ÿÿ­BEÆ3Ü?òb#ôÁšb¦[¡2†Ò‹ûYt„?¦‘Êû½_ÔÁTÍ£‡ÎÄ;wªÈåؤ’‰¢1•Ëë#.¿Ûþ%|”äº".c77{¢VS™jÈé¦s:KÊ&åð[“pÄÓ)BÒÜJÕô‚˜BS˜þgê)"8W»oÖµ'¸ˆ+©ßdµ"S\‡Ê’ÉZ–Éa¹PмìÕÙ:·ô7¿§Sݘ؞k¹Tº©sèƒ3‚ 8Ä1 IýNÛ/Ô’1L^¶½ ñ6.ËÛ/l”ñ|GÏŽÖBSɇL#9Îb Vß^EÿÍÝ•;Åü¯”W÷YSÒE¡Š¬c;q/Z`¤í_Gcî2Rï&é\MEq˜FÔá\­»ÆuvªÕW°¾&?a(U+Z§­¥Ãäýî*û>wÜŠÝsœÃÄSª»á‚ J;®Íg3UÄÜLò5´_ž[|™y‚ìÜlšCò%ÎŽì§uâ¢Ø®ˆ2pŒŠ÷Ãká S’å¥Ë«väC̳|ê¢Q\ÅÙƒ»'‹”ÅÎê«l¢Ø–ZWº§œÈq\¤y—=«2jÈœZD§u¶½ü ˆâ_%)U‰ë)Æ3[PÆc @‚…”‚0ÄÂIÄi8¢•¤´þûWºšòõ{È{½De\™pg=pÆL#•«ŒŽ*>-³ÑubImšèì„„1Zª¾]ÙîG¤ÇY˜o6­:ˆ0‚‘U åÝì¹RžDaˆé˜µÎcÐT%'`¼ïÂæíq¿‰ÇÃÉêC£ï¶T¿…bnrÆ)Üä~º4Æ)] *üÄ¿s¾oq?_‰ËóE´ÕÝô¨¢:ÔÊL¶)ïGiŽ®›gL•JÇ)…5ZÚJý-»Ë‚ éôíµŠñÄc¦ ÕÁ1,¦s3 ôÕ­>lLØC2õç§ç^Çc¢*ÜW*ZÅ¡Ìû¨g‘Kn¦Ð^‰³5‰Ÿ~U<‘f¹8ú˜#ˆ»„!ÛÐ(† V³‘Ê*Ѹ­ì"éJŽí÷ÛvÞ¯ªøL+VVÌ‘2(¦¦H!‡“ØÙæ­³rFV e½í%p‹Éò A …}OFVª_Ò¨‡f+Ù}®M&ªv˪ˆ¤ýtš§Φa]úìWeìSм_k‰Y´ZDÓ^µnÏCr6›¿*RjS¹q 9T+²¯‘–QE6™¶^’ÿÉBZˆ„}’ZKy­»Š3¸¨ŸQ9 Ù&J¶H¨C†Z™ÜåN&²nç+ÙåëÒ”b)«Ôe=îndgqWˆšSÈsŒ‹Ë+s×:§îöImot‘Ó‹S1x‡ôÒæ‹Þ”‰„úðj^ÙWÖ9O^®—5#ä&ñš*…vÒ§QSTåFª¹RüZ=Z´ªâì——k­»$¢PÁߥsä Ôªª±œr$ËcÔ/¼®\Vn øKqÿl—a=½ÕT ©ÅNb£UÕömÆ †— ´W}-„.Cõ’¥&6Ê£»äD½*iJš"ø‡Í(—ÉzÑ+&-‚'ê#'ÿ ·‹ŒFÜöÒ)Ê(…T²ŽSÕðrÔõCµ ŸåZP[bõþiW*DÙŒŽÏœI«ã ‡)GS)JQÃМçÃÄ=·=Ý—Z«’fi.\L_dqÈ–ÁêŽüÂŽANÜ\ß»¥|!%ñ«dì£ eBe¦ZÉÙ•ºNébª÷\²BVÚÞNÒ7~«D^#±>ÞŒ* æŠ3œ9P£]Î2L£"iw™­þ”[lm¶Rô·gõ/ê«‰æ £7pCÈ“AFR ê„)6µ‘Ó1—0¸‹ŒZEÍ~kuèÖ+üQÇXZkÄFWEZ>/’¨t*'ác«j_Êâ…q )Dõ·*ëWÒ!ÝŠ¡µ¼~ÍÉk”ÝCw© PFŒÜjo…Èö¨ît¬Å êœÆ^s ËqÑ«m÷"-’D,™[ii}ʈ~â)Z¢}^ÚOÜ×DŽC&Ô¢¨Ìžl¦s¼G×Ä+(šbkégºò+ØR- ¨I"?ËMZº1”-Dú-Î[w‰¼l¿%„iGkÄ.`ôneê(c…%{ú-$Ê‘l"[IÚšLâ—,Yj5+–Q+eax©w[Šw;í7Ö¬´úÿ£!ãK¦-y1½é¤J GvÿIœ…Yr c:‚L~'ñ*Fåè¢PØäÜžJ3½M‚ÒU"ŒIiU3iÒBŽÃZ˜¤_T‰ëßL+é„A ÏN¡Œj JŒ™Ý¦IVJ>1HìÔ­¯n‰?w“=”Rú–ÄvVÒДRz¥\AD9G.qT©!¬Ã%¸Lï¶½·í[[¦®^VÎR?mlÃ[ž§)H¸c(eü" SŸ5„+3ÑW´¤¦šJDÌÄ£"‘H$Ñ$ã)DJØMû¡;ttc"Üæ.;r|­"ü¤˜ÌÔeU“GÝÙ^"eÍp·é?ÊRþûÊQ$´¼íÒcQДLÒ‚8U² å1SÊV ÉšÝÂoo~\[skIYmjheNº®—dJæAB6jîu“ŒuN¥qý‰Jk Â(”âj¶¥s¡)_P€ŠC~DW›~Åd+à ¬’ù4R´æßM÷ÉJrèŽÝüZ®âøÆ'‹„îzIŠF«:Ñõ›ê/öÌÊ}"øW¦ÈÇTÊfм”*C3³y0¤µ®PŠR÷-4óö×%‘)ÕG©s¾¥²åS°«Èb©E‘3IdCW~TïÁ­OÂ5M¬U²Dð¯w›PÆ–õÆUú¤¦wôÙØw-%¿]Û–ÙsºöÊ æ,Õ¯ÎQ“¯žF¡å¤œR†B–ZM'ø¤C–AAu‘黼 ¢BW!FZ9ç&Ky?VT6.™RÑ/«5Pì—W•,Ää-'î¤vÅŒT&©Ä"x˜¦®Óµï1dj+síež‡··%‘Û†3:«ß?z¹Ä3)N¶2/´Eeoã9ˆ3ÙÎZµ *©©Mf„j5 šëj*9 F*QÞKIü[µ˜¤8…An1nj›J8§QNu«Ë%?««û( Ë[ÉnïÊ}N’¹1±—Ë\Ö|Bić_6„URãäâ í֤Ȼ­õôI·¬“¢å:£ ï4\6XÔU”8ëÿ,žÄGÚ8p¡?ÉÖ%cWÂô- «ë'KÊx…ÖÐ#ÕíKÄü®æC îFlÿøÉ˜zN©À–àE ð3ÿý‹´ \oÐ?ÜsHR›˜µQ’•HšÕ·jë‡E# ×ú|-ÜKï–ˆ]ê9Ù_æ"†UEC±RèqHëQ/žd™±NIÓ) o§¯$—’ÉÚÿ-3˜ÝD•½¨ãŽø­îФ–d;-œ@†Õ«+>ºÌËí£=É74¹øúfôÌÁìÒíkü†"øŠÃ$–¨Þ11Ðb5ß㌄ԇ(–¦L0Šùæ3$²u²ˆÒnÒCj¿×lM=bÛ†Qôj•Ó©èŠwqÊq]\"õÍŒn †b»'éBzðšÝOæ ˜¿­™»¹jí¾’®2¡ý'‘¨œ[ª)_,@®ë©ðA âï䫉̎ߕ¥•™BYâ½æhµ{JC7îYQl¤î߯ï4ÊWv1ÑpoĤ‹BñŒÇdD1,Ÿ¯åR"¢!+µ[U$ËÊ…r;‰!7oBbŠˆWz«$A¨ì®-ÝÔ´]²6Þ«©—’˜¥3cËT'ôéËÇ’U4rçEû..4¾äT|; R)ކ]u„|«/Wif§r§¥¢I‹üt/:Êv>'3->w{6!G ’¤ŠË¶zðŽ[Z¼1_ü³³ITÕµy|nZ8®lj!{$S™J‚«-èå9 9ŒŒFöþg1NˆrÖÆ²ª‹}G7Ò| GÛÍφ$…Æ <Ž¡šò R!9l¤Y„s94¤Â¤Qr`J‘Á^•¿¾¶Êadé‹‘çþ+á«ã‘ÓmF1ˆÉrý´çQ×AžTÕc¯DANв ŠZZÑÞÛOsm µ… îïRèÙzj»ÛÚCŒzãÜ3œŸ!„ Äò r‘]ÚTå¦ïUÅÕ‰¸‚Û­r*SÔÔf¥NK¥¶I(Ê*¯{…[1·B2N˜À·¥dq3.5eãÄ>gùh\9•Ÿ{C5I”Ü)s—&2†TRr˜ÈZJDç¯39Ÿ¹d0¼Òþá4¤zù©Å–Eôb $Ž’“+d˜ŠT,uÆüÿ9Š™­Bî…¡Æ22VV¢ÛpÂ¥6Nfoî1®Km,ò½}ªîïÌ)Wo”R¸›Ú…|d *V—”ÂŒM·Žä=·ªëZËêA)~Š\¶±H’ßÇ"%܇$äp‰‹b%ˆˆsœFN\bÛ|Îò.šžÝQ7r_Ù¬cb©U>¼ÌªÖ«¯©ìÒÕ42í‡;V¦QN­S,€ž Œ û˜ÃEå^".¾Ã¸øÉCþU¥UHÛâ#r`S~lÌ@Ècµ` €ˆŸÎ0dœGA~‰ƒŠ=@ãrº®/ œoÒ–1«\Š ˜‚&ƒ@0Ì%¡ƒ¤à3cT$|DÞŽW¨à±¤*U)ð¼0¯Ó ¿(ìÂC ÏˆŽ‡±³\Z&êÔ«šÛåd,)¸è¿¹Jù»Á›˜~‡`ÿâ (Èp†l0 nCFNÆÂ!kÿ¬Fµ½b»TC(LjSHb¥%É€†™/DÈ kŠ;ÂmiŒWgtB·0¨IÌ„c‰¢t+rˆ¦`Åa þF¯xÑxEC'T#üØ(Šá~¼'cÔ„s/%£èDdWLîŠ(Â9’¸BtÊ›Pž›§RuZñ—ì[ZBaA\°~64ÌpÝ‹ ˆ'V¬Fc ;a³ +:?&2¥5´(¥J«RÊáî ¥7Nïzá !¨â Ä`Øa¥0B"´ƒÕjB0DbBÂV•èéRP¬rwéé°~èQ&èÔQ,/aPÉ AÄ„aC!@B‘ržKx!Ü®ã>‚8áBÁNɆVBíp)8è—fc$Q‚ f V­£ hG‰=9HB¥VÀòzc¦íÈ9F~‚x17NFFC¤ Æq оDA†¨¦Ùiê.B“E;hØÂ¦ ø¯¸\œÙ!Jõ^e¬ã°¸é‹èìC"7ÿŠ2½cµ_Û™ZÉÎ"ˆDM^Æõ}Ò“§+bëšÄ«: èdÇaqU¿”¨vÞ»-Ïô3swÄ­É3Ÿ,¹n|ufr%K#ÑQÊG-Ê0ŠÎ«oZT'W;aþJvÖ¥Ó3¥×qÎwì}#¤ùÑHEUò+žVí\ÖoÉÛ•w¿⸨¯¿ånE§;aY ú[ÅËîcgeÄwsÉ1jæãaHúè#PÁDZ®žŠ.É9EE¦‘;I±s‰.5?$œ˜»÷©·¨»Ò̈2¤ï—15šás³«b]¨ºÞb‘ÈžG½éÜBóq”Ô“$å(A‰å­4Åjzw"9òÈ¿!7ûB ¹¹—s,†B%„””Â8«;3•wÃ=dÔˆž-)OxëÇ}Ê£˜p¥IÂdà%8AdbÃd£)*V!Îknhâ¸WHGvCÞìâ2FµfD CÒš™ðŸo‰“ ÇI¥a¢ó(iTÀƒ]ÐÞ…uA²»« åXVëØÎÖCÆ„$Óø„…SÐ×°¡ˆÐBRíX ¿P(Sa Ž DA jÜ Éùº*ŽCQ¾ÝîªJ&‚Ps‚!j8‚°„0Hª ˜rá "—–0‘ûß¢Ž mø½Ç![/qFÛ"‘ÅLmTabcæ9šà`³BSZ.£µcÑUÝÂ\(A︅9¡’)Îf6)üTB8ŠbEÄ ×Cë#¡ Â%Ó˜Â0İéJÕ4‡U+“ ƒ{S¨´’~ZG“‘dò¥¡OG „l"Í#Ü0¨VË¢gˆ!E.Ìd(N¡D%*o¶kŠLÍf$™¤uõéP¤m7rT…·?]™ ÈZ©/)Žî«¾S2Qiw3…\«‰º\s˜Kå°¢)9"Ø-¸}z•j‚KJhE©d±ƒ ³¡È«…)ò¨GV«¡WZ… Ϭrßø†'DÏ¿s9šÈí²T¬Dꢲ1TÊRÔ¢{²ã,«Þï„˸¤|"vT}Cˆóv)Ó÷&Dæ„BÉTæ*¼ûN²~ (ŠïÔ¶`æS¦°‡bK´ôk„çË Ö›=4)FT¶jóKƒˆCÖ¹’§6ÕWCjT ¤V 0ƒ’O™J–£½€| < ûà< <Àý©þ¼ìäµm¨«Ùܲ?~0AŸ ¹iSq}z쀇Ág!<’æiì[#Õég;RÓšÜÊ—À¥¶°ÂS¼AwÅÔÙ ´Gü¼®âáHŠQ ç»L7·‡oLgsˆhE—£õ”ÈåϳÓ)KÞå|8TU$üwÉbF’Rw'Ô~c]Lb*²SÐzÖªÆ6’¥(mD£÷¾‰l¬Ç´ÏCXÅp«‘œ«MÏe  [€Ê‰)KmÇ¡ÙÕîMh½™ñZÉt%´w±¶ÈFRG#&u(·`ÊH‰ ¹×Á4¥w9œ†3W#ÝÑoV8¸((—ÜdÛoP…ËTÁ©ó#4§Wõ%ÂJÕ!<ó;G8e¥É14dUïsIGD“¹ê êj;jKŽö´['8y]t§ ÍÆ]dOÑŒª8Äàt}eI£iÊÊ+Ýy‹v/ œ¿šn¼Ú[ô–OíÖ%U¬)©Rœ†1B ‚Ä]·t„¡7LT;$Œ¥hCŠÃƒˆòÃñU å¢1øYY\}Ø\«%µÏ—ìç\ãaé¹JêÕ0*…ŽöB8TÓëÏ]jXÜ"®C–´VøÒã…j¼C¬‚ë¿»ã½Ci$s¼¢„ ;Ϙ V1¨ÿQ,OÎ-ÇUN©bunæ¿rf«Ç*ô¾Ûíaj®„ZŒFb?1‹Üò":¢SSLŸ)(|»F ‘BIQ0„…RAYv"#× 6W=¸Q^˯’˜‡j’~mQ9õÊÁÞêIŸˆnAu)¥Ttú^S¶…óQ#É·â«Ð¼äö0TJ³YäjY§N‡1ÃZ!Hagz‰½»ØÔV3ÎmgCöKP·½ç<‚Mä[,&\„~ì…Š¬Øªu¶¬DR抴ÓQ"hy*B=šYqõÅòb†¥+bÌÚlîëBb(¨Ôu«TÉ>–ÂÚ#‚Š=.±Qn×.>¦¿mÓTŸbéÞ¯âhšÙ­Yøú{#3 ‡ræn)¥$Æa(3Á$…M×r­n£ÎeÓÉB¦Ûþ­Ë>ü··2J{ûHmÇ}KF¦(C±$ݳ5^†ÿÊNNZ‘E-Ä Bpáö}žYF%BÌÝ„ŠlÞ_¥±jŒÍ#”¨¡ Ñqß[.Om3]ÈŠ@‚ˆe•q4ú'¿Ž/šÃ:‰‹šiëøÔ2q¬Ra1"ª…n6$‰…)„CÄZС ÚÇ<›& ³,¬Ò(5G¦®kæÜøVÔ¥+Õ2•”˜ÎÈ:3¤¼ª‰ÃZ"ïnò"Õ,¸3Š”œb.<›üÌä VÕ+u¡)ãˆÓ×uŸ£³9lÊv!–Au æ'¢Œ¶‘• y·uÑXCµå‘jA¢‰†‹¤–»”rV¬Š—EGI,Ì,ŠV@àæPþ ¦FbFÊW*g™®¶)~LòMû~ý&Zm5Oõ”é*ˆ9;µsŽ«þ*}Üç÷Û¯C¤fC;nœr´â9'ú“ñã9h%nQˆÅ·õe¢RÉFÂήÏRÏ5 ¼¦¢]n)Lu¥t¡1"Y%1—±s©RÜþµ¸OÕ ÃáYIÆu}UãxC%RŠ(À`£YGJ*)ê–Θ27«&aêO°Ø%6ˆ=RÔÃû§–ÈÆK­Š©+•7üEÎbeçŠ-]â!ç4¬C bŠ£>”ßëRa×oC“¨í‘}iz÷Ý…yVÅ-mîõ¦j£Ü‹7Q¦O a¶FQ{âeB:.¹¤B­T½¨G¢dš/¥Ç{–¤¦)—Mq(wà§w¼¢žžÂYèQ¦TÃlBj?í&ÖíÔK^¸FÏ+©Î—¹V¨Ö|ôÇ1È!ud£s66{–‚4­djïz”Q$ ƒ­n˜ÂT׫é{Qú§1$5ÙˆrLla~è¤K&ã?(ˆ6¾™d4¬#˜]§‘ ®µé©oÊ[ö¿¸H…´)4ƒNŠG2µSH0ÂRÊǑ*Úþdæ EB a1ø–­4'K%MƒHM ã•>D –=Õ£–™½97yˆ´ÒŒ] ¢,Œ6ŠO=³æ-Tž„[²o/¬½\)ÿ95D»Ì§ësºV‰¥:hqЫ%ˆC·4Œ²«†ÕG±¦ËÜ»½^xµ­¬cà_J¿ ¢*¡ˆ‚ (QÌ…ãBüÏÜBvs0¡¦£×'äÊb)ëõÊ;•ýQ Â)S:¤Ä#"ø™’§úOFõª8…™ÔFSmq‚(:JËqWiÚ>•¬„ù„äj­¬RŸVlËÛµ†Í)†a—_iYRbaÙ‚Ò«%ð݆•]¹ðÑ´´ƒU7û¶²¥Ý¦~9JÒ…ˆ´£;bŠ\Z¶²ø…²QŸ%ÞŸBR¯‡ L-pò7g¥ÄáØ1¥ÔÛ)C¨¤Üã7ê„*"9»\rá©Æäj3­èÖ9V³]íïmª6&éåyϤë) r1j†±sæ½RtTXDà„J.÷”òg‡ß¶O¦…&i\Ô¥jË!ÎŽR…h¡€"š¡L0Ö#N5ÊNºf â<滣Û%à”‹>)Ém²í K´¬w•Ø!*¨ˆ›Ï\äs4É*e¼Î31؃©ÒÙY›D*iú¼Ê'²(™–j‹ºy×J­÷ï{NOe;ÄrYU2Ÿ©ˆœº+ÌÞ(´àž_1{¨§þ÷¶<‘?B>É*œ:›P*Èv9 ¨+Ÿ€ÅÿøÉˆ{EL^Ë6åÿáÿ0´#¤´·uìÈðü`få¢Tw#ÑŒÁ¾Ø®‘)L ·¡H(Ý2JC]e*ÐÃ) ®mµ5_[$ÊK­0ÇdBˆ[®ÙWIDÂà3ˆx¸ò¹eÎvÉèæD7ùNÏc”ìnÕE½­O—‘Xd²(¨æ÷o™wDË-ˆîôÌKmÇn5¨jRæ Æ}¼üV Ý!"+æe†8 EÄ¡ªG¾¦R~-‘Up­êý{gwµôߊŲŒªšEAZ«BˆF²Ý+ÔÑiIJ„N_ëð×G=+ì˜T÷ A‹Œ"÷+KËK÷ý›?\¢ì0Œf3"õ‰Gî-Òí‡þ9¤ÿÝt9MG1ÜA‰{+¿ƒIù³Í•’ø¬|«¢ŽLJJˆ¤qÙEV[Ò¸…§ç«V‚ˆ¸ÎrãÓâRÓZKØ—.̈ìTâ(#QY1¥r©IƒÞ^çA‹fqÄ-JœŽB!ØCí0í¼’·y«ËSî膴¼jæ²µNM´†{çT­õm•&gdeòVó 'KÆLÊP‹r9KC"æZ˜È[§}îM n„êIJĠS‰[‡W!¶)(¡画E¿#š´,ó9rÑ0š²ß6»Ø›ÙŒ¼ÆÅS ŠS•l)Â%‘¼”ñðõRì™ß§tE!sD!ÙæNNr:Ïœ„Îk¦y(·–µ¦¹Ž(ÎÔ¨“>n‰Ô“ø®A¢bsμuRæZ¦JþK„ÎZ"³zšÍœ—! ™Ä‘ÞÎ*Qõ¬AN qOCžŸbHL·P¯é‰Ç®Û‰˜5ëQû•Y±SçMan¥IDR5ˆ²RØØ£q ¶!SrJÄû;I«/­ 뮊þ!V58|¥°óî/:¹p†ܨTDõýÒ’Š-ŠžMš¬¿&±ÆÔ1 "3S‰ÛmäÛbâIÖóÛèâ953Ø3”¥NB":*p(+–=ø!O-ú­ÉëqÈ,>”Z_—XèiqQëR8Êb3ª55ÒÝÛÿ®©´òní,(¨…ª·˜¡Ì+¶svš‰B…Å£ –½ÏtÇ,¬Ë"H! R¦â¤ÈZ5*e¥²Ý«&|¡4’ £u»fí_¬—¿|œÔq c×ÄŒ“&TB2iÐFe%hmÎ) Lu¯Ò´¢Sl&LD-œÈ²8sŠB#7‘HõÎÝ#öaH¿Nrm¿+Ù<КPͯaÄGÝ»xŒa{”G1È$îŒÎÒ˜•ÎB¢÷ɴœ’º„GbÄæ@ŒE±¼–Ξ„§S…2q]Er)ÎfBÊ—F[Óír|¦üU&W(‚„)QwR„űXÖÿ%3Í$yj0R~\sº˜wJ­M¨ÑÁ‡{UB.N8º’bÑsç8G2ÐEå)B>(„ W Â"FÃ5 ˜œ|R èr- v ƒQ˜4]ùÄ"¡tI”ˆvFÁÖ ¦!ŠV#/mVtV„ H G”˜"ó(ˈ& óüçú«FÊC¥H#aE„UŸÚ&Qƒ0Ø%%À£0„T 4 •¦†êqFPE1”ÎßR‹ ø n€Œ¨\¯—† !6ƒ§È†E²žSiDUZÂêLˆC„l…1ð®‹S!ŒÑÁÅŠ:ýÇpçä)„ÀK‚Q§1ò8Á9=#`T,¡42„Cm-&EáiŠ%)‘œ.(fzCBQ !•˜¹‡0âBB·ÆF¸ˆdJ.õ[5)™³ˆÎò» ])L#*²3שtÖe˵Ï e©¿ÿ›\d£³Ç½FLµ¦mu˜€¥å2h³ÚqLèâ®Y$/¾L¥«ym6|M8f‹çw ƒ bûN%se$šƒ"›ù„Ýìþ0*Ñé*/’¨¼‚H?]ŒîÇBÉbRB¤ô—YÑ‚”ä?7žç ö’Y©lÚ\„ýŒC©ýÔ­•ôl”ZDã4‹»ç©ñG”ã ˜i!cà tž†ÖP‚Š þŽ*«eœe OJF6«Xµ§_þ>BíR¨ù*Šâ;7]\U¾ÎEî¨DL뉃zû¡š“s­EB­ùiLÄ™‡*)̈ë)×4˜]ÎÚhqFkÉÃ&¯YöhIëa/T1É(0­ÝëNýß~Öj_¹¯àÇò¿ú‘ýÔ´ ¼ÙXŸî(!…7ßo‚Õ Kè•~rf¥½Éݼß1Z¡q®dœŠl0gê• öìªúý¯,²y{/¶u|bî›Qg{™ˆµÜBmd'E¬F¯Gô'O8ªC$·ÛN—}Z½ˆÌrªw:ùÏ—¢ÐªB6¥$“tOµýZ¬õ^qO„24„Š)XÍÆze(—0 Š&íRôþª#w2¿h¹Øä"S‹EõýVQŽ`‹×Lɹ”Ã…#y…Ïé×jó=–…L[Ï£4…þÕ)˜EÕ«Ü¶Æ êǦÅt9>ÔõÕÿòQWú'û15„@Ûš3Va”­M}8æª22pßV%¥›4!Τ–oâæÓH€…c F-8s/ÅWθB|œˆ®›®Ëjï×÷ªç5g÷‰××@¤ñˆ¸¹1 CÕc—ñp©"îR¡‹m™—òܪC$º\r“ÇB™”g\Lüâ«„6—Ëi1ÿ‰nÔ!ëåRôLí½n`¢ §ê숨R8ç_[åý\òйy(±Šv¿)‚±ávQYWøÃŽDùlàƒ8{$„ÏÔ1ð=ï¹tݽ6v²:—w¤ †d¨É@Â!®(! '¥œ…mµvêbß5ÅidòHSèÚ¼A•ˆÛ–6é¼C"#”ÈÉY÷ïýU«¯HZ {Qb°Ï":õ’â%JèR÷SùjŠ&º±¿z¤¦Ñ]¿Hü´’)œíŽ; ¦.ÐÆYöÊÁ~!Ã,„¸µö…¯n6 ÈÔ_R’õ›¨¶ámb°éî—A‘MˆWüK-Ü¥š‚³"+²M§˜åÊ"ý$ĺÝQV£©Ñw¨mV⮇W8–·ÒŠ©5¤çTRÓXsQ/C5^¨s¹›ˆÅÊ™¤1qÊU®]çÄ¿‹4Ô¥å+³"ï'êUr™ˆ1E#þÝEU.às\/””ãÍÒÊl̈BŠÛŸœz›Â0¦!t¨äl·I¥kR™dy|«^RûVû—:ê¤Êäcmå(Î2>×0yŒ å]‚úizß.féÏt²QíiXÄ7_~r˜#R_FµKJæ+·šÔBºrl×jT«æXÖ•qB)Ò¤`¥9·eÓ+•ˆâ¸¤oA2´¦‹‚w}™y˜ëšöüU‹ýZ³Ì@ŒÊÙs¢å+‚!Üà ‘ªžŠòaª‰Ÿ¤bTŸÅåMc#W%pù+•ÑæpGÙ—»­ë¨…Sh¬í'“x!ý°¯jÕ¹ÔR’”Ç×Tõª\™L}TT0’§Ð&}¹ W c¾Ògi 8AX—£ÔDì$‡S6 ›JZzJ÷ó7+7:ƒa1üŸ•³ŽT£J„!¸ˆhDNr²%RÔ^§W˧½Ï¦!Q½‚C”‹GöÖíFâ”,ÅŠ­|ØÖ¦SÓ1³ºœ‚‡_L¹­„‘R*|ãB¿^DBÖÙÅ):šWq«58Œµìªr«Öm.ë c ìÌó ŠLÿÖíqBŽdSeSƒÓ¥ÅÄ]¥³Ïº'IŒ%›ÙÛŽ×MZêØê§_£ç²¶„0"•é>¿ÞÝrˆWJÕFÑ ;QRè;i;»|ôPç:f­´{m7óE1È¥Å_oéy^r‘ÿ¢UŸµû¨ÙQˆw«N­ëò%ÕÄú¿¥-/wT¹B pŒ¬"â¹Tº‚7Œ°Œ)¨¨ÎkRw¤•¯YºßSÕϳV¦¾×áTî"YçÒ•¬ÄG³Y”’%ˆéôuUÿ´Ö&ÞäE«jElÂ3>ÜB°‰@ä1¤é韋šrÙ÷|ÝeµR”³a•6®ÁÄ¡ acS¨ïFô¡Ð’Ûõq÷õæ'î^„§}¬ÿ®†ÃÌãEuBURBœ8£¨Òž´’m¬ˆ¿ˆèãu7›¯y0䮉ؼ²«©^ܤ³ D•]±sE}«ÜAŸŒ×°±]ѼË)ÒB ˆÚïe¬„ª¯T+1IôÕf؜ĩ)ÿüv«*Ôlä¡È ì”ÛVQÇ* 0B”ã÷*-i5.Â/åùŸÄ‹N®3qP+ˆ¤©”r+“1YœQFYDÒztô½‹BÖ"!:I.Q¼óYê…ÿq]hžî„Ã,®"‘ÌÔZKAV¬#ÔÕÕä¯yF{æÔ‚$ÔñŠS>ЇEÂ%‰ÈÄ!¥’IèšBÙ ¨ÕðùdåJ¶è¹[ÁævÛE3qìDW?ê–•ÏoÙþ#L[} ¥­ýؤ"Š1DIEs7!„ã°©¾'ÔZ\ÜÖ-Aú·¿—ÿ Íêmnò¹Ý…Tty ³§»$¬¥DæçA¨ÃéIJ–C5ž,èEž’Ý©çs¹ñ€T:9“ŠzÛååYvǦ¦>n‚¼bHu êS*©9Vä*v¢;l”>¥dª~ÛëùAmþé9|úê”Æayî©R*l’R§Q Oü6"Ù¹:;}k-ó¶ÛüJWRÒ¡Lª´§¢6iJ1¹:ºÅ*víΫcj"V§2^Fu"Ýl+qÉÕBŽf -ÒÅd©3Êid×Óf¨„Z}|n=5B¹?œ›‡+°JuRJ:H¯šufÅRZ¢ã[¦“‹WG>ÓÈ~Ôw ïkΪœD#ig`­riWi6½æ{3RÖæ„¸^DI ß„G&úBŒË’a‚yH!¶k¡7 M—ù7P¤™Z–ûŠm¡DOä,‚½Jí2LWv¤…p²MÔ¥öÕ8ÚÛcÓû‰T,ÁÍòAü\œA‘>¢,¨‚céÖ¯õ½ÈÚ5«Èí¢J¸™[S F+˜Écé3¨Ë”O*8C)XhÔ—ë¨öêê)–…RVòÒRÚôù…_}R2λ"‡96ûáÈÌI Dýš!óIµMâùJN°ì(ne"üAHÄé’¬B­ ¢ Î]ËÐ_wqðÖJé-ƒŒäFá E¾©˜®´a11ýúåíû#RlæÂË'D |=H´Á—›ÎéÄñF3WveŽã˜®3JÈ‚g‚ÛÊA\¤F75;&žd!¢HrÙÐT×ã•âéj1E§dCþ?½¹9©B7_%Q l҈ߊaHr}[v]C £>ÌìÂÓ:¿Jªù¥itÙÂQ¨æApC1ÈS£ÝÌœÈ(Ü?'•1šû’e‚ÛßI‚_W›>„jèå(íZ©…B«3”ІtÒlÖ%X–X§BDùb/§Ñ0Šøï§ÿøÉˆ|PN‹áåáËôv³’}Ï søÕzh†t\«ÅGòP»Éœeœ¤&ɤ²9‹sZjÿ\ÇÈDæ9ÇqV™M3©¦^¡ôݬŠ>dÑoaˆI-ħoˆÕw;Yîüa.÷3²°Ï ‚So¥v˜Ä)²Ô7­3õ‰FÖ<«R%™:–z!E¤ÿßWös¡Rº{-½µñVÖûm,–´ã¤ˆÌTæN*‰VÌã§Ï“#ñWˆ0b3ËѱX‚!|ItÙUâ9.¾ˆVŠ S›J$wqX…ÒÝW‘É=¼n~¨ð,ÀR¬—ŒA#ÈS.T]:XàK .3ÔaÔªüʃԲrH¹RÔZvÓ-Ã%S*UWsrˆwCš‡Ö¥ÅŽŒ_íæ)Šê%ðO½tb˜Ö¦â᎔5PT A’M’aÅåø—¤õiœRÈ®£Y›Æ•¸4òÐ:ªøË-ýQœr8¢ 0 Á’>Ð`šPaÉ媮2”R} ðÒ`B–Ky3BГ¡äc½ÝŸ“ŽVâ)žlÔd«Egû“µ[/Õê¶ÞZ‘óÙ*;XG£®ìKŒUírpÔAiÀ˜'4•2Ãjq†½lr‘¹ÐAbÙ¨Oݼ…©+U^AL|7ÒE̳‹ÿµG#äQXPFj1n A]U¿Ò„_çéënP³IàªÀ¿u—)£ ˆw‘v§Y©+Hr„+Isé0Ej­úJvÉí0©ûLÇ\‘ˆ¦FÀi/qÞHÇ ¶Ê×étÌb¡¿Û^¼ù…jVùzPŽä(„§»©XîW! ÇO&ÇæzµC¦É[‰™Ñß“}~F*4¨¤YŽ“lk ÝŒ(«í×ÑÄ™†jD£…¬•xj‚˜ &Ô²ÂhŽ(«,R¡ÃÛ#WyÔÙ’XU-D²iNµ$Ÿôn>£0#ç«F¨£1GÏ䳌R›qþWqʸjÖKÊâ–RHy©/Hµ$%‘”Æ•›"âXB¨T)²mËHµweJhµ¦ƒBd@*Z6Ðëgr,î#(Ä1ÁYmxå! • ¢\ÝU™-”¿¼š±iÔä‹äÚSÜ« ‚•6‘*DÇcN^Flä±Ïç§£6ÑXÛ&ó/2™Úîf¥D©îÈŸ*"ô•|x¢9^öéhmò,kŽB[¸£Ëj4€ÂvºYr:V”¸®ÏÙy;zËÙWŽäâÌ=bÚq"Іýè¬ìþqÐS„hqÚ¨”C# ¿=-WÌÙ <œé<ßo_Iˆã>¨³4ˆ¥0ìÙ„<ÔwHAVº7Vïì-CœKÉ”T]­UH¾3"D£2Ž©¢n›ÐS_:tt9*“ä&-V©ÚòtL·†w_gõB©¯!ddBäS:"×$Å´‹Ûòx…Dû.Vãªâª†" Ʊ,ãͨ7û~éõšH_CAºztÿPâCz$…±XA“yæ!Ž­ûíCÔUläj„ð˜]îdd%BÚ¯–<¢ å “5ùô£9Žë槇_>øjU¬.© }頻ƒŠÕ™ï›rŸ8DÃúâiyC3£W<´V1ãSãn­e<¢Je~äiåKœ"„/j„K˜»Ÿ”êF©5opô¡nl’ü£fw9c‘QC̬W•ÐÆK¶ÈyHg\e<‹ey¢V‹ò,¤¡rÞÏ!UNÖ¨ºê(„dž$OÀqÇ0u =‰Gxê§Í0—¬þKSC(…[½óœË¬ …žDD©ËÄ}'Šå2×ìâe|F—©ezaâ}ÎA ·D@‚ 1"#˜ÌooÝ%J%‘°-fïk¯Ú»z¥,T‘uHoºì+¿›9—(rÜS;jŸ×KT+îïôL&ÔS'w\ÇÒ3D'DP‚*õêœ+N|’ãPب…gyp²ôÕ[§Òš÷ñ]ˆ¬ŽÞÜU¹RGI×N' dö+_Ùäµxˆ_Lr\å-‰´æ¨‹åY݃Ç¥Åk‰ŸO6/ï#XNËîHZÞý³+9x¥S!ìºPÅú¢e:„s •Jú“ŠbgaòÛëbе§ :’sJÄ!*Mе×D¾¬ãWgÖ¦yT‡LëWòþ&Šò%¨.[¥)]hé¶¢K£ÕPŠEŒÆg¢1db„MZd±7L‹ûíééŠÖ71W™*3¬á‡1¤öÅ@CTLËvc§·’šJ†î“©A3¶ÊT³˜µm%*iUQdQ™5PÓ-œ”Ù©m2…-HM'[Iܨâ#<šZ3¢ú!ÊRšAŸ„®™såí¡µ/ľˆ¦NŸ;Õ—TWÔ©}êŽÅw=S(›Dú~¶‡ó;^œ+Ö™¤};."ˆ‚³°ûDG)Ä*[òj*Ùw“­4¿–D¦½Ï‘ü¨r‹s©Ûg¸²%ªêE+™hÆÌh®*m —×$GI[‰œŠvt39P*éRBØÔ2ÐÍ©6xé‘Ýê•âØøë¹@÷´×K»œO½{Ù̇CTJ0‚¯•sH3JO1“ùŽ‹=cœB«/ö×!O‰!\)Áý|¢¨ås­¶\—‰"#¹ [õ>5¸´¨“7~¹1œëD˜ËAXGHqù2C†B?ûè"ÌÍ_´µ S¼OóÖZ1’…J5yqf—(´,„J…a‘.Ò>ÝêL½«Gokܶú ȃU•*I’ÿ|}ÙT¥$EIºaQH‚(GÑ«[ÑŒÈ(Ú•ÊùFGŒiÛCCƒŒbA-× f~HóX·A ïjß„jŸòL¿%wuÂ5P§AŒµ~*úrÑv!Lë šsT[ÓªδºÃRü®AÜå^±*ÆÓX©ÂjæC³¢’¸êâÊûKW¦“_0D‘)ÊÖÚPhC³« \·fÝŽ¦6;pŒšVBVýÇê"øÑòùFC±õµ8ë0… 0ôµ‚8:E*!¥õ¢/æšO›¯ é¶ÛëP„˜Œ¨øä1(š™ìî+°¥®5R)\Ä[“úJPõ*ö÷KÛ)WRž§‘D Ó§16ŠÉ@bº˜ÕY F•O¦%oý[DZ(œ¹øKºã“—hIÇ+¶]ì´(ÌAIcùtYú‘Â+!¬zÞ’­Ô@„¥1*Ì A˜Ô6ŒÑ ²#%sJd|%QôÔÂd’eäòÑM}#•*FfAÍR¤¥«rPBÑ|!Mvå5Þåü©{Ó‡¯QxœÎ'qŽuL\Êf¸† ®(ç^ýw\Š(où­Ïk»»hWçoM;9:¤!¨›15,VqÄe ÕÂpxêÇ€ÁK`P¡'ØÌEzP.~ð3Ès™ÝXžI-Ìb‘¢å»ï¹­^c!ÉœfL|-—E(‚ ·!íÆtJ8â tÅZÅ’M±;QÞ~&Yܤf‘Ÿ‡B¥N:©Å¶_¹¶šž¾¸Ké{5"gñ›—ƬJö) îR9ŒE]Ó™PµW1‡gsIn¬Ók9˜k™„Ÿž\¦J« +&ÞÇoZèÎŽn¹¶u÷Z-ѶÙ:‰~5ûþŒØr/þÐÄ1-36q2«"­ÛW‡9ÑdÂMid)?vÇ+õ™Ó¾C{uEa2Ó–ËŽÊùź·±BŽ}I=’kù=kM¶ªJŒ­&˜ïN¤c³}$ÂPšcnãÎÄ/ç×)/&ŒV×ÇÆµ8¥´é9º‡#Vì FOMÑ5·¬Kš¹ƒ¦ûá¶Ž¥3j²:&®ø‚¨»8Ç,L¤aEÀ曤Ɨ­·¡Ex˜R‘¤êLb)ì`É2»÷¤‡j<ŒI—û2µb¾%höÿÙ>JU KGzæ!;õœ¬êºTiüöOl(Œê›ÕÓѸ‹`©ŽS¹šžžæ9 *pƒ%‚ÖA To‘›m%R•#‰â¨µ¯yKvc—lȬžÌFÒTrd‡²jq\­”)Ž9ɉófR¤Ë7±û+P¯äÊ#1Éê„WIeBŽ™¥7·¢©p¯´ëã÷õ=Qù®‰Õª³Ó’ŠMgœIQŠ-H"£¤z± ž•·›´2kÛõUÜS²£õÇU6QJù„ÈBv°Zª"úå„A­&NÝÄ’©ª7QÅRêt©â)QVq\ù˒È粉˜.m6´Ê9Úö¦2!slŨwÑ[N=7D b*r—‹['º±u©Ý™Jgœüôo'"?eÌ÷b2ûWÆm}úúš(‚çÉ%ïµ8tf•V’êâ“-" +QFFªq ¥k7›Sr¿Gô^m]tzýQ¾œ…AIØRÕì†v1H!Ý2Êê´£j"ÇSŒ®Äù¥¦bz©xJÑ ËúÛ*•èÛb¶:Ä1VZ(„Çm’Q5𨔝?ãÂ÷ÐÆkpûR'0œúwQŽ­ÒæÄ#ù:†Í>ns$Í]5*ËelwÛ ˆ9’¤z«gAΆÊQ»lÞW£cÔÝJö†­É‚ Íj˜¦ ŽÍ¨"+r•$_·È¥ )7ë}_§ÐD²SöQ¬dœ„ B†@Êf!X|&Ëι+U"9€áTåR8^¡¶…1q 663pÆ4øªaÈ&ÎwDƒ(€Šk£!°ÞUáN" #0ï ’™éxâ°C! â…øã#ÅØ€–à ŒN.0C4ÈŒä?!Æ3f!ÄÜ¡´uÇ2¸S. …â±9­'R_ ‚Q 3¤¬«t¶üaXÀ«"«™ˆ^P¤¦õé&1“$΃ !¸@Ÿˆ½Œ›™Öb-ª€ Ó3{> 1„TǾªq|(S…¥ ®Câ‹ÅÈG Yà!‰ñDƒ DA &´4¡Ä6’¼F¢ T(æÄT/¡$SŽ"3ˆ€':†RÖŒW¸ÁØÈË1¥9±Û؆c!§7¼f 83¶B 7ÇÃÎ]U‚ Öˆ²’!óƸn0˜†Rlçätq¾dDÓеñ°Qe(ˆÃOÜyAé)~è@Iœ¡‹x´<getM½)  Ï•›r¯ØœÆà@†0ƒ÷£";†vT‰FjW¸C邨áQ1@¬Œd±~t>îv%ˆÒU!YÁŠÃ™ÛŒBdL¦"ñÐñsÆPÀ–ïq…ƒ‹¤"™Ø×è‰Ð¢Ò"²•A#CÁx‡ Æpƪ õz…d¨L &*B@ØõÄ´UÉ2Á‰DÁAJ*¥ä¬hˆ†>' @´'2„R)•Ñ Ö‡#¹É°Žás‰‚T$s zE‚.œ 6 ïÖ)XˆðNæ èed¹eäæâÃQ£ÀL*Ð „s˜2ƒ#”çJñµÜe7Š˜d#e0¨ïBRT„FÂh'!Á”0§«F3!„aˆθ`Ä š1 Õë9S’‚˜ú‘4æ\aýRS*Š¢ïkr‚‚fÚG*+õ!ò(!ƒnT„â°Un áB1ÜÕ(sû–²0Ý»‚GüêÈ"§Ù rò¢Û–›&/I Š;ºFˆà9ùAf…ÌZ–ŽÈo‘ ˜$Jl^¼­B2¨œÀˆ0ä1‚Q>ßHŲ̀j^žEîñN‡©pÃdÇPø°ò0 ˆc(”g\°‘ØSŒzÅr¤£ Ã×ø¿Ä•ˆ*È"Ó¨ÅGÍZ« Ÿ»ß²žÿͬä¹é層G‡UoENòõ;&­AJºŽè¶ÿ—]gÓÕNAUfO·Ï6aNŠ´6LÞw$%{†³¬«÷2!ªÚæÜ.ÈO¢ù^G—jÄÊmì“ %i®î’#lÚ¹böæ£9HCœÄÏüSRÖ9L"!b56!ª_í¦ùx+Lq¼˜Ô/_I#r,™Õ5U&_Eå²+%?EÄ,‚†(c« ¸ùçGRaD󧌧*1¸}7>¢HjšÙ\ClÞ¬ú®†Êƒ?QÌö¹~ÍA%ÕIöÈTrP¦T?_LÆk<§A J”î'˯TùVRR…Ûýt‡¦5ŠT1u˜œH@Üh %fÆǦlM3…àø!™Du ¯+cbÂòd>9©ÊÌ€iJ½Ó¦ oÁHäô">BPct0@„ \.Œ££¨Âq 1Ø\S‡ÕÁ‹K˜b„Vo? ÇhST£„„Іa–•‡àDFB4Jª²tÈ dAŒíz±Ì_ûðNôÎau:œDBóPè JCv7½~ cRº ‚ Õ Á¼8Œš«‚¤Ã#†ª(x%*¸ü¤ Þ¥"&Ɉ˜(Å£sqb’ ÌÇ Œ->±Š®¡ª*; JÁz²AYÄ+æ2`F?h˜^ †'ΠØ¨qŒ@CrˆÎñHÑyI†¹EA á×MEXˆ@Pp IÿøÉ˜}NçQ@?ëOèwî[õ3úH´ lö˜°Æo׿‡oØWƒ[ÃP„ŠSãXNަ)%Ž7ïÐ)daëôîà˜c<5 0"³ìãqáøKÑeC9D A Úó£‰ð‹s ®<)D)*|= ØÁ”J‰ChŽcª—åÇcú ¤&6 !¹Ÿ¼eÎ:ã£ç% AL¬ @! VVÒ¸àK¸§ b0ußÅ¢±‚)Ûš ‚U6£Õ©˜Îg¬?uü܊ߦÁ$ „(XïPzÌÕ[0ˆt@á*%aÇW@dR¤Ñó†3±ÏHÇ =|Ró¬ &a‡.A½ã HÖó_H*\øÎ {M(*"ç+õ¥0¬0L£ej.a˜´u‡çŒs^ܰäÊÛÑ•³Šr”7²×¦ÿª”«¥‘Ø9ˆfeón¿Åê·Ð­µ2òq= ܘšæ³:³’ MyÿHDíÿ"Œ”Ý¥T"7%Ðë)36†,‰®­’OKWHå„#˜¤g¢ý¼½·¶ ©˜NU1FVb£½ —Û›$~&¨¼«•E•d~DÔTZ¹ØýZmuY®–VµR•µHoëiÏf3)XD÷>ÿ²¦±ºD£“U˜ž|%jį ¥)½cæwÂ$ËÝl£™ÇêíÅsK0‚Ioq ö쪳¹ìGÑ¢ÒUñ±Ô#ãjP¾|)9"K^ðŠ"³ ö>%‰ …Ëa-ó‰ ¸Ý¸EJ5ó•K²ý<¡Un‹˜V½3VéfTr™œˆ‚-(JÓºDŒ!¡˜A0—sûN AO‡¾®6ÄÜÖ†eÅî+ ‘"cÃŒˆ1’²KQÈô^+¡I=Âa´ r6R å? ¡Lbò°þ%!Pðùró ‚‚C'g˜ƒw…%0àÙ§œrB9 (’°é‚ jîå þ…Y2 Ã28bëí>WÀÂ#&\…‚(†Ç-)Â2Œ]ÂÀrŠHrÃàŽ%‡$pèEg@®2!2 “z z£ÖN ›ê£ŽæUÈ\C0Ð͈x±w*Š:;<|B³ ±µ ¸Bl˜€PÛ\¼&¤.684?d†‰åÄxÞƒÇpÌŒ3p£”Ÿˆ!3FÕrºA¹0¯AQ€„¡È¢»®Ã‘0NJ2ˆÆ5#O?úFܧ•ŒD!Xáø*Rfˆ°ÖA=…a @ýÂ0È7ƒ,|Œ€Â¢…†e®$^q¡Åz‰I Ì‚v÷ç¼è+zšQÕy1¶\+Œ e&)Štá•6 W˜ Ê#‡ JNB‚ …Žts„óŒSŠ-z/BQœŽñ(Æ$Ç¢¡®¤c!ÍF!$Øj¢+¹ò @ƒá\¥^ÆÍ! CÏšŒ¡7ÄáÊPíPH4e 4¤" 0׎X&¯Ð ˆ‚Šì#’s™»ˆ*”aþ>9Ü|Æ|læ)L“2Î#b)B4fFSW.~p¬Ñõ‹§Dq7ª3†™:┆Nò̬[%…2™lîdMÚ ‚E+ t~qÒ"©Û±9›¾Uòö3¨ÙC£#2!LÉ\‹Ÿÿ•3lA¯Ecµ4™T¢%,ûQÓRšŒ™·<¤‹'ÓÜí”[…7W,Qóîb+õn2ÈÇ¥³¡E'ïó &.„{«ï×ü’¬¿nòÉÈ@ÁLª—‘&M_dÌLC]•L²Ñ [W¬DB®lŸz”ì̹díÄ ¥QÛˆ¥%‰´Úkµ˜La8ˆÎ§D9èdWj™Ç £Öü²)tבvŸC ­^ÂŒIcÏöBßâ„ro Ä7éLw’_ÎÖÉ ÏF”râÌD,–úÒÚªÞ–ü)\¥Òˆ™Æ1š•B;å2†;ñdr a™ …L%©ÿý_Rù·Š¤U¥–A[¬'¿îhÌ"‹‹OõZá”Ëm)¬;‘^Gm.ŸuS¬‡eœÆ3?æÔ‚¥6»l/ÊÓ¤>yiâçõ ²d™g»åqÉ̤ôSþÜå8ŒA’'ˆ(Ö\z A{pëM’d¯Il’Mú§*ñb•IB‹LÎAµŠšÔÒR!¶¸&Ä-Ú„I ¥Â*ˆ¿}æñ\Œ"3½M¬vFÙi&b!ž‰º¸Íûº†2Q¬—XÉAت÷\})©))^6 •"+BÖ¿ÅëMO4§Ú=E:ÈqH»lUrjéÜÍ2ÄwÎ×á–ßä® ºB¿YxëÇìG7¼ÁSuŠã3þì©+¥•MšÄ3ø¢+¾…®å.Ê’YIUEå!KU­uhd÷ml¨¾%XLªB@!Çr„1Á ®ÁW³`C0ˆéJÆD¸ñáÙÁÙdC‚¸[ƒ«œÚç1uc §¸2t@ÀÈŠÄ£P¥㳕ð-VAÆ×aAÆ: B¢ˆTCZ€lA æC`2†77*ü+ë“`Þ-§ iä¢ÍZ•¹¯2–5s3„>‚÷jBã"6:©„b¯cQ• >yÔ j”^+ªŽ‡~¡NÇDc]nÈ#ÌÌPœ„00Ì[¤”ŒfkKGôas@î@¬®ApªaÌ$ˆÒ Ä,E£ Í\Eˆ0{ÈFDE8JI „|1ÝJµÁ[|ÉÈ+,á²5\YýBn þnD¬¼ ÈXÎ1{NC; ipϱŒ°ÙD´¤¦PÊðˆ…EìAž;¨HÙ Â@‹;¡0A¢‚ÀˆŒN…/:¬)ywB çGƒx)æ„Aƒ“‘>ÎÜ3˜"„V¡‚fä;ˆÁ`¾ÎE0¤Zã˜0 ¨ç á‚@C=v\:{A?‡± Ö2 VÖ1 â;Æa€š£BVqLã´UEÇJGµEJ|bÛÁ¡‰ŒÂA\àØ0@1& ¡ˆ*#Öªþ— µèwu¿ÈcÖÔkA¸ã.eµ1€ˆÈöÌÌìC`FÝEaúAÈO¾PL ¢cŽå;”Ò”)Jde  åŠGR@Á×»‘K0F Š+" ‰õ‘Œ¬”DÀp€'0-€/ð,@!KB<@S1zn¢/Ãh…ê…çÌ)ˆD‘ Í@£:à2¬I%0vÌ£¾íu)™ëÅ–¾º•®Id%ѽ)ÎIJ˜‚±8έ”K–Vezc¡“늄!{h‡ÿÎ"¦ „­F»–Rê&«vR¤!†R¢Ô»žÚ|äÞ½žm¡ù–ñ Wõ9‰t‘ŠÖ`R¹¯I%s³Š·-ùÛÈz¿f ºд;X„Eú1˜€¢¥í ¤EèW(ºíãá9éJÓ3ÑØN ÞÒ1šÂzŠÕZЬŒd)Ü„•5}åKˆ/'-3²ÉWÂÅÉ5¨Ä%ŒT®‰»dªy…ò¦3%üd_þ%=·¥æ¥Mè|JØG©ºªÔ5]%G©¥tr;PÂ#f)ÍÉWE²Í¿²»™O%”‹„Ã8©´IJÇYR¦T\FZ1Ê¥ü'‰•ªøœŸn¥5v´L[â5Ÿ9ÅHÎQFS‘:’ûÓ§]F¦j¡¼Ë¸”É$ZP²3ß„r²Õz‹ªúJî–pƒ–Y|!ïÝÝëQq<•Î1_qyå;*§×OÎdj’”Bº*ˆKªq?ö}¼äFd q€Ay²) nñkâ×±PüFU%]ÿê©ÄPêë;H0ª4Ò\ÍÝÄ^Ýôc*=Ëõ¦•¿üֻʂTgVEæîŽQNçEÊåKu$›ÚŸík’‹}_ÔÊe¿þˆçaœä)ÿiÄøGI¸ûgÉYðˆÉœM¿ ¡~d+‚)Õ†3#®IôÇ¡,3 ¡Åw7•ß2Mê[u›Þ"{voïW<©*V‰±Vc¨…¥/R®j)§mfÄ÷<´Íª3îÈT¡] ™È2—…©UsÅTtâ~——Eæß5í ›Yùxeý:ÌAÈQRÍÂ}p‡UZr:Ôg+Un…ÿªP¤>KõÄ/¿»˜ßøB©1ÖG£o“Ó Õe”(ã„V–ZEU-<¦ï’§äfMF_“‹N$Œé®V‘uŠ9jWýÒ19¤Õ)x’Y_¥‰ˆ:OEŠe¥J§Z1 c‘0!.žƒ‘èókã Ôú·rY—ìNE즷“>ÉB¶«²Ý\(£#$‰k-Žæo/äW7e]¤ÕÓRD1éÔ,ˆ„vA'½ƒñN7'"P0À 3–(cª­QÄæQ +¨…ƒ ИlâQ°‚=ä"1ñuÙ ãNêüÞ¨ )$ÜLôÛD‚+!Œ!޵T£˜:Žªä,*òòÞeÆóedð„CÐC^ÂgŠƒ5¤ã-”>/´êCìÌ×Äl“ù‚òÚÙ‘€HèÆ^)lˆ+¼ub(dd¡E/: ¸ ÉŒÁiÃ=h`Oó™r1]/ ÿ?Ó6®ÆÆH !²£x}ñ G!È1)…Q:(âb«Åè, …DJeÁº Š@c¨L!!8GNr,Ø£O¨°pJÿ’¤Î‹¡HŽìHqþ-\cŒ 9®ÆbÏ\ÎY5éÅH­ÎZúÙfLÚiÙˬ*s”Ä!žèl£2®©ŠŸ'ÒOZ G/ݰ£˜ã¢}–Ó»ò¬"‘ +•È›Gå—Kº/wû~ýÑÝëJjþœÈòN‘ZG"os± qÖÇÆç\»)4™”ÊrÛ‹!îâ-2]{ð–÷ÛðQD ìÎß1t•ñ*LkòéWÝŠI°¾ÜE};¨b”¨!V†§(Žž]bÕ=ɬÒ7w†­X‰_~_‘ܤ!ÝY¥M[Yf¸pà>¼ï%Eö6šÝ>ªÙõß û^y«¬]>¬¥"“YJÂç3nU<’ Žµ’Ï)woRºØ´*;˜Î¤§WO& —*S‘dä9÷GÉ7ò¸ëb¬‹Šü¯M.·¤ØMPÑI\EÆÂ bqh@ß8‰·Ü<1Å(@cX)£‚A™IÊ¢âtÈ!ˆ)ÁF¡x9=(t?ÍÅ”+¨Îí`ab5ÔÄ3£qˆC €Í(°…LÙ>1D,*'ÊyI£Pb°ît… Ú\C  0N´˜;F uŽnœćÐOpæ8¿:) TLˆeе,C¦ Òº”9OH½…3† ™Ff'¿³ cŒØ$eN‚Ë8T{@QL+I P« ×’Fs.†‘ˆ Ä F`Ã1D…t8A˜3Ì,äÇq›qñ°ÄSvà‡ÂºŠ =„@!±³pfýÔJÜwäËñ°)£!*˜”ÎÁ”lõŠ„„lRØÅ1Pªç ·©9OS1H!'à^”BsR~98ÊpTS²ÔI‡cÊ: ‡UîHP˜5^fä ÀÜdÊ%öàÊÓ3AÄQЇ ˆa"…Àúæ! E€Ëp¤QT¿8Ñ#|æ<Ê`öÀÙ PRW`€È’¨R„™ÊaR‰Å`·¸AŒ+L†b K°¹vÂFÀÇ JE®jÎÙš«ѱ+³ ¨›Gád0Éo½a.40šŒjDgäНEÄ*Sà‹á8n0£!UÃLB !ArRT‡B) §ã¯B’ "‚vDEGzœÅ^67x{N¤ÀH‚Eâ‹=`vXPÂÀÓJ¦A ÒÅ(2 ÇE®F‹¡:x‡nÈÉFã†F,ß1ÊG!2Pe†]ùpY×:^RÃã´i‰°Ñ¢£pˆ!J#å0¡Š@ƒŠÆ¼Œí‹9!¾Ò*ui]“75sIÿ"‘0dƒ8סN1bRA±\­PÃ芛T;”pe˜¤æb!— ã:; !x!tVþxY"š6&A.£) à HB/@¹Š4€…ͼ…j´ ÿ#Æ GNΓ5œ„®% h‚d$”jÂz ¬ŠÏ)–CN5DdC²ƒ;™žÃ¸7!‘C+'á…hre2)» îQ¢:ÂVä NÄøÈÌ®S²”%©DüÌ;< ÐX(‹„©•) ŠBá`·U4¬BMõ"¨ýÇ‚Ô kˆ…jX«œ#ˆ(0P”¢’„n%4riàgf=ŠšBnSP…VF.³–Âq-ˆŠKÄ/¶c(˜(Kæ(c ÆšÄáÈ–¸P€¾œŽv>E.íFH@*)¨‡˜)…!{P–ƒ=ÊÌ’ ŽAFq¨˜!Û“bÐÕ–,ÍèŸ梱aŠjôë:Ù Äwb‚NÂ&Å Ì#dlÍšt=í¦œA Ä`ãCŽ£1ÂtZHrwc„ˆàEì,Uk™ÐŒ‰Ô!h@H [o¦[+]Œ¯Se&ˆ³ Ï é9”A8IDdEŒ`Î$PEA³QiüùYWAqÔJá › €“³—Û(¾ªøêrÕ;ÑÌ~ÂÐøÍR©„‚€»ËI}º5zýl'‚œÞÅJT†l©vMèO¥ ®a‚&—KÇV?ép(qUhV,§«Wi]¾oe„U´†+äåÚD¢66(ƒaÁHž鞆Áä,Ë2ȦGºžÝÒð×DýåÖ‘ªF¢n–œÝns9Læ q±&×!ŽÉÞÕ©¸’oK}ŒÒï4D)‡8‡SÖÔw ]´ý § ’Åc™ÆK|iiÝÄ'Ñù7eBF,„+§8`WG‘–D³›’£ò®D“CÖjQùé¡;'õ§lîàÄ@A ºá‡6}-â67Y~BJ­Óáh{XL­¸J ,¤±d?X©R­ÊáÔÎeÌ¢u*[¥V”æ'Q\|2¢Ê¬tôÿ kÉγŒ§AÆ<',y BBXô_æ£Ä°ibI‚圾ÔVÚÕùpÈ‘0Áê @±¬ö!%ŒâªYirlØ~ÈÔ†Ý2Û'#˜´þÃÍäa ¸)0ÚÅîüùٽQ¹Qª¶Ê6›}÷2SÔèäcüA4˜hÕ”r£1’Ä{SÈž‚ ¼ßÀÛ¹ó\_éüiDPaNCœ³IuQ~×¼»øJç(Œ8U‘õ ZДý7Ÿîþ!e{­^IÊã…!IŠQzCûš­ÅÃK«/ù/xòÚ¼ôõ¤2ª ª:zØ0ƒs¹z B³ã…‹JÑh'Û_1¥V{]7S‡)Äcá ¾íÙºdõÈ&­ç¤¯rp‡¡Z¨lŸ¤¦)Ã!€`8ÂÅÈ eÊQ²^öí.½û~H’{ ’†Ìÿ'ä%Ì "€¡ [L1ø¨ªS•är>En~*-òHZMðŸ¨+ç-‚¢ &—Ý,S!Ç\q ^NËóH$ŠGMª¥³äƒÛj‡ÒñvG‡`¤\’B—­ÐŒ)^cŸÍv)ÉG×Z E„¯9PÔ–’ýLèÀê›(¢y˜‚=m?F´’ñæIEiPæD!YrOúá/_OLqRŠe!·t¹P8ÀÉ'h¢?)×J$¡÷©lZ ã!%=š†µ· ]j;¬¤1Ä2CpÇ„’vkÈ'RÏIÕß©-£Ø®¡9¹Gz¡8¸«Ø;†C;{1X™å2±‰T®Ÿ·ËµÖab%E=‘¸i%Ïc¤®70¬L(9hOæýë'³P’Û$¬ºÕIü‰Ÿmlö«Ð"ƒ(¿¬ÄNœˆ’ •e˜´I Ý%p~‰Òþå·å„l'Éö«HÚ"†1u&˜­_yÏDÚ.È·3Ùû¥ºíZýýJËqJ#‚ˆþ=“Ç®æ‚.õU¯:h§‰fÒvÿDûå+J:Ek £°33³ê_潯‚ c©Bš¾Öt¥i˜Q¶ŸêÖwÖ1Y9fE!f(`…?Α]ªé•Ñgú4¸é×!*‰Yä´“‘œÛUw(…ŽÁNhÙpƒî÷¿U qrô¬O~û½(«mÃWReä#Îâ"ÈK- Õ]²¬m¦©-ºR>°¢•¤7ÞÙ¨q“AÁˆòà ¸ü™—|³IÒdœW±8 ò1;¯€Þ p6^ЀóØiÂ=Ɇ¿lÒMºßyÖ›ér™—ÚT»t]\ŠALÂr$ìX¤3ÕS:ý-¶žTêrb¤ª–ºøga™rµ„\Ë!—Î%8¬(‡9W0LµrµRíwõBÄIDB²/ ”·5ߎþu¢.®s½?ÞOm]©lŠý¦šŒR;ˆ#°ÅE¨…õ[í³©_#X­C!rj÷m6š¹¦zÕØŽ©¾ªë¢àÈò0ƒ WjÔ¥*âõC^ñ5Œè\\³Ú´¯™ŽWvÝ(Œ™o­ÎåoR{%™¢Š1n¢y=ïDJ´´¦èì²i‡*¥+N4ÄíÅC¢·¿¥ü_óQ ŽEEÃ]ArOn¢·¥ÔU°ŽdaψºŒè~aU>Ûz³Ÿá;›LµÓ ȆyI_t2˜ØiÝuÃ¥Cƒ”VÊͶG;¥?«jj×OP›¿Õífã“pºÌqÊ™úØ£'çgZÃ$£ TDNd‘+bî·8T£© ä2Wê‚¥Q53Hî†ZZü5•ŸŽíRt©aô=ÉÔVNC!#ê)WsLÄíþ·Yæs.ýú.-¸Xš©dK8Â^JaŠ«A.YTcޝ[®R éÌHÊ®ö¥ë™ÜÜ_¦ª’qJ;É. Y T®1uŠŠ–ˆ†V4ëbܚΈ‹P…º–Á™"úš´|Ò½ÉkS6±R¢¶96õ•Zª_›,ôt°¬(A—,ÊâÜë¢rXNi¼¾3/U¼Å¬’w±JoÜÊ*7Õh| ”c"%†e~™Î DsÑæL\Ò¯ ÷å÷,ÿ¡|™BÍ•³÷…=¸¤ªEk7a ýWʵ’ÎaÅu É¬û‹Z6üÝ–"Tq…v.qÆ=Yo£K¶Q­|I"-XéH(½â;;ýflۜ… q¡D*J;2eëLFÂóÕ¬ÚBR'Éë¾õ÷Ìût‰èG%ûæK*Væq•™ä ä#/˜"D–{YUæ×µ³Tõ’B—(eÁÅfY*†¥=z•еdá|åï1…sU—snSvÔå—*ˆÅ B³UÊŠÈ›Lh“Ðz=‰yHûˆ*³ROǶöt¨Ìg9>R“ɉ¬Eúæ9:TÄ• ,\ÎI%ÞÝEmµHÉéo–UG‰/ÊŸqGô§TøƒHc³îû®9o-»K†ÚS¡d>í„óèó¡jIKæ1PžÚÄâ5ÉFð‚}ë‹:),§E¡ÈÑË©'V7 \WÜN¥œS-ˆÆbäƒFþýk9wÊñ˜`ÀÈ[² YÊ]ëÖŸjîˆ2­ÓlÆ‚Ÿ;ѪÝ\žÅ®fî-Ѥ&Ñ”(…~ª¢DRúJ«»eº0Â’Õ«`Mì¥Û¢‘B—¼Þè½™dýeËùFuÔÏS;&uÄJ5d/Ñÿ3916¦!]Jb„g5õd¥qEÉ)ø8‡DŠeÜ•·,­–ì^Z/ ª c¢˜aTSù‘½ ëB‹&cg%mò_÷ì‚62¡î÷p¥{^ÉC/«_¾Ã ±Gm½Ejá3¶±°èZZ½¤Kª „UÛbQtJ­på>[¯Æz’¤d}œ…å!ŸRÉì‚Et-¡œdVÐHU”í°^-(n07žz)a*r´ Ä„­½Ç6ÑÚôcþÂa3 FÌc(ó¹§Q€§yŨa‚µÁ; 2#Sç@†Ãˆã.×Ò!{ª¢ Ÿ)…ÙŠ"£N¬Ža‘˜lj¸ü€£YƸ™•FOˆÈ8ÜjÐc ô¨®Á (ø9ÆYa2®Ç).MÄBúLQÀØpA!qgŸB‘\XÝ¡Mä«ÐÌôe¢°¡rJK™)™“Øâ 4F[–\Îô<.)«F3ˆašÜx{¨æäu;ó†¤È†5 F„Q$Dé»jÀƒ!ãQ0¸áá‡qGZB»:ðN&ª€ÔÈHNÃéD8"øÜ0Ð`…' dˆ$pÕ U)z)¯1y‹Ù\ALˆ—Ÿ»Vb,®8LÃ%¢`ÈdÈÅ ÏK%F=AFé‚¡KS¬óFƒC¥Rš­BŠvw ÆB95B‚0Ä)-Cf2²ËG,vNâSˆJ!È!c)œ¤w,CEEæC+Èdb´ ƒSs7cAŠì\]£†€ÔL ÄW•ëŠú:X ¤1z˜¡¥ìMLÿ˜–¶3¡jêÊEVCý„õ±[™¹ŠŒ¶2X~œT}zÔ©:•m•&á *ÉÏJ”M½(¡ZÖ®‡NÂ.¯œè1F0Ɉ’ºsÊ‹id¢i ^oÎhë>¥L]’’•–ž¬^ê ž›Doýª7Ù]ïDÍ­!S*y5ìÅqXIÿÆ_'k¹„ÍVu}~ï7›RS'ÞàÆM¾ŽFëH(Fzïª÷d†¼‹Æ#æ±…£6T’sN™ô÷÷–Ø¥X»`à俤Q'dQ_çaú3¯e¥l«ÄAºE•’jsR-}„p²â*SyžTR¤„+)eÆ)¯ß¹û¶˜B þ¡Ní~1 _Æ FþºT&xíÇa->ôvû/qp¤"×(ÇB” ·ˆC¶%¶š+Yv„ZÍ–dE¤D)Fî(¯ßÕN*þ2µÙæ»­×úF‘®™t¸’k°AA}ÕÓ‘LÈç¯=e wFæQ6ü#~á=³I„y‰VcÓSñD¦™†BJ”‰þ*Sw"¿íìc·U´P¥WУ’ÎE¦ÙÒ§Cì…á'ì8¤úzB¨Î¤j÷öÛ(ÿøÉˆYNü_û›ûiû•ûÎûÂû4ú³’ݱ£ÇFu8ßù t™{¾?8äa æ]vQJc«·-Œå)D³m)Ô{áâOq‚cº_©SÖu»æ28¤0p¡=Z`çö£CÔ‹é!­¡h=Õ˜å„O¤¼oËAMd03œÿª©o•nÕ¹u»Æò‚›)….ˆ‘™*•órßx¶ã\œ|,ê†`Á–!(¹÷©ü/Zy¿(l£&¯.)‹ýýO¢×ÈØ™GbÜ”1–gŽáŒw¥Ç(FÓ=z×Ókÿ¦1rDT¿ <׊jXò=¶¹¶18Ç8‘° †ZPt.ŸÏ¸æ7Ôû%j®†Þ.¥ðЍ/„Ô©s\UiA ì*T–¡ŸµY6˜R™<¢OÉÓ¥îüAÎ5©WΩJÐÄÃ“ŠµpÜ"åA$ {]Þ.Ϩ0GsÇamå 2X£…lÚ,UuȆÅeÊö^HI¢P9ýáƱ¤;Ys7Ô—)B qAYÉY~ˆCb›Âëû±Ö*Oë`i™ŒY!ˆ\œ„oò²ölÇ©³ËjŒg¥ZÇïT3§¹@Ê {ëœý¬ M]:ƒ*¯«zlÚ­Âs;µ›Dd9hÔú“‹YWÐŽÜÚÎÆ[93'I‰S!1†±†0œÉÁñz›Ä³VQl‹æd›šQh/§ÚÜs¬ÍÃYB¢×BÝâždÃITÏë ÈLV_ ú#ñj”Åú®µ‘4ä¹ÐUd#kHÅtˆ__›á2R:™„lÕµëbº¸SøI–qïØ3(²Ü'N†äeÚÍÇDœ ,.Hw–•7í™4Ugû*à(éHôreTH”TH.jZ‘ »³•í<ÌYþè×iÚþÓ5J  |è…]±J’ÅŸ? º)ßÓ I•8>×Äã5œƒÁ+º”):æP’ æ/‹,Ÿ8d“Q-]“¼FyÅ(I~c9ëv§mTU*ˆïO¶µÝ/ïp–+«È7"åÓ¼Sûã1#‘ÎRLÌ’J²/ÊQ”p(U±£t˹.kIBîS9ZˆŠ? {“´ó ú©Ó²J㌔ÆGi\[±5KŠ$‰%W}½}ü]ÜöMûÕØê2´ÈU.z‘…[â Ö.}-{yÇ©”ªóý·(t*ò Ò,NCÑ1¹]?˜$¦c-Pˆ®'«É…¬ÁKkTF“,Š¿tú¹Žã†0ÒäPB8)pÂ?_1ó‘iHêgžCå«ÅRj½Q6AÌ‘ “t£*‹p¦º´—Õ–+jáGô•ÿ»WwLC âÇüÑË!̬7„}F{’ik¶%ñ;8‹[†0PŠ ö㥓?PˆÇ Ä󉌑†½ ö–¢qx"¥3¾™LБØV}Dÿ!LºTÛšÅ_z#ê R  RFèÅ)h£‰úø/=, fÃs¢b—l™‚XMMˆNªŠˆ+…y‹þ¢ â¨ôDV+YSØ¿KÕz9¶²ocq%n9édïñ„!É*%¦ÒüJˆr³ Ì¢ýæá !èüsY¬¤y„Eí:î+{‰…;El]âL·ôKÃA8aJFpw-¥j AXƒœà›¡ ›QHzé\¢0Ö%ò=}ðÍÔŸ þMyM/´¢9#¤XR„?X¢öñ‹Ô¼jα5"TÇïqÍF䞢ÕSsdrݤV°ç”¸kðûa@•ÆY¦#Œ&ì#™+—ÎqUuŒŒ´}\¨Nœµ¤L z¿ÑxCÒ´ýúZŠ2vSÖô2…6&~% ñÙÏB¤eNHLðø9¤µì‚Xò½4•&å1;ˆÏ/÷xÞÔi®²7ŒmUÊ£­šõyHJ1&WãýÏ–§™9ëQòØET3«½íûµW–D#*ĘoûL䥬”§EyK˜Ú'{;JŠcŠTù!1µ úývâ®TK•¬&ÐHHô¹E DˆjcE^zé¬ur¸€ÁÇÙ.!ZVŸŠB\ò®×­Oýºvžô‰µôÇZÈ% AV§;„b•Äj ¯fûN'›ÏÂ;Ù")0Ó¯Õ¥jãáw=•¹u,r1$Z•®i …­ß“f’_zCÔåM‘H­!ÊG±$53SV«UîŠ6:üÒ½R„ÒèNýI<’&÷¶.rÕŽªÍ¤b¯˜¸¢º p(+Á; Ž”ñ YmätÜÜÝÖÌNÕfÅûBß9Õ|èºAR±YÌAYB¶ñևıP̓qjÍuo/O}Þb±Emþ¿ÓÖ£‡}Õ6÷Ý q‰!¤“¨$‚'6¦~ûNJ,‘u>U¬­¹ÂÙ–cÈ]²X¢cò‚`m™ìµßãY~Žúwb/ˆtˆ Óüâ¦(R­kÉaf-íâÄ!éKãO^»7Vä×$F³På@Ì2×üEUùD ›é½C)6)»ýž§?šº®´O&‘C±'rQŒ%”™þ¥¨’^øè¾âé"äWœ›"g†ˆyF²ˆ2¸önròâ·'Ä£vå4²íèO2þÚžö ^;z-PË"îѨ[„ 8U ¦âÊq‹&ÒEå)r›A¤LäÂhµ>Ú¤¡ôîx³²£½¤jº X„,caÉr²f‹E¡KF“´´è¥q1Ö‡¿îs.•Lλ•L'“+L)œ—ôɬr¤½cH»gt”K9Îú\LÛ£f7:Qý“X÷-|6‚á21û¤‘“uËmiÅT„AJ !D:Ф`l&{(íÔ4ÉiÅ´ZBßœë'°LÍÌäy’À€¤1þtûH…Ö¤Õ8„Ñ.ö-$yÍÖa;ßz¥¢ÕˆÈU2õ¶_A5ŽË.­fÇß·R·¬ëîE/3SŠwc°¶«*×ÓØší­ä¨žz$¿?“%Åû^®!Éâî~TMò.÷aJ³ F½nã±æ-L©di7vÄÅlkØ_7\½•õþWržÆô¥ ¤o*û)ƒ!ÙΘ$SÎÒº“z¯ï™¢å¶ÉÂ9ËÕî¶IqÒ¨ËæÚh¦ä7Åõw);!è]Õ±ª´åÒЊE5—ܱ”SsùŸ?ʯP¨a\Œ{²I‘Y*[™ò´¼Åg—V‡jÉ1’½›"gK‡‘ÉNDÖå3Ó3(J&ЦEK)2ÇqÊ\Þr |Þ²÷iÓWÈÙºLVÒwþê©î¬¦uîbÂ.ˆI‘h„J"Žš(¢ ¶¯„R-lèë——s*’k¤‰m]ïûÄkz੽½ó§.o…j¦ê«” …zÞë!U‚› q7ÍÈL”º½¹a-¾wñ;Ç7d’&î‘‘³¥!¥Ôƒ˜þæ“äòª2œÉËj7‹E”Ì^Ç+=©Jß=õvcâ)Ÿ¯¨ÊÈw Èv»ySl’†LQ æ^ÒN9äCD¥oŸÄØ^(Ä@%s$<iqžÄõ×–­|» `@…BdÎUU#UÒcijc©,ÄU®½§)VOpB0JÖ…Nµ÷‚"$Å¡2kQW5´âTÿÈ–×`ÄòxÁB/⃈G¥ÅÍ-¥j" ¶êžzgõkÅgùš¸HŽ´”P¡UªÁL¤ÏRŒP­¹)PûÔÒµ± /ãÚúƨ¼Ï^ݧùb3o)T¼kp­aÅ TüDæ3Uгº›ÛŽÕ¡ÖÎØ!j èý%Jº´ÒñU:»d¿ú©7]̶æ:K+7Åi[N†îˆŒOJ‘-®®Ny[›ô¥êöîçÉmj«Tk¥ |×QÕRŒ…ª»å]q[|A_ –x«nu9KZÄ®ñ0,Õ ˆ5§,ϳj¥TDk¤tEc ÿÄØCsýÞ¢Tè*•¾„ª7mr¢xŽ*nNºx¶³…ë! Ãáo)¾_å!šÕ%Dìý¡‹ëâ«©á2-‡ê»"λfÇ1ky¿M©ëö¦tóó"-¨ö\Ý¡³äJ)È#«Ê; ¸‰0ÂSú©OO}&«Z›ül±ôW”‰á$.”öæœR&U„R*.6£ùÖba¿*¼b]3ß]L¼ÙíûYH{5=L=kîÈúõTSmë]×2ç˜ä}ò2±')#ŽANhÏÜ\Ë!¬‚“…Ÿ)èMO\Ùw<¦—xŒ†Ý(¥NŒEÈANQ[0´qȵ<›´I ÃoÒJ\ôïÛ G&£ªˆ~©.J ªš˜VÀˆî‡=ˆ†WÞ7%*BŠ6†Ò‘MÚ˜"ç3%DÚïÚÉV~™Tï-þÜÕÔ²äƒnëòc=8b§#\ª1œ¡ ìêÊR¦ëm!)LþÍNÖ[Ö·¤û•ä$…+"ZäaZB;œU‘œ3¹“På+»Í‚‰‰¥¹¹™Ên -iˆMúÐD²á ]Y$#N‚¡sjȯP†uîS¥.ÚÆUñˆÌJ¦>RHÅ2šœ%ŸOˆ)ðù½k¿÷IZ×Jˆäk&ÒJqœ¥"¸Š‡Å1 G)H å‰Ùl£!½…AwJ$‡Ù;eÙ7Š»u”ŠJþººü¢ªÚÁXæ:óIëB¨¤# Ö¡ÙWôݲå?|•TGÿ!¦³)¨äÎÙcù•Î¥g"¶2q «H²!Uµ5K¹‚êí4¼…³ã ®LÓé— ^¢Ö뎛_¶fš¤yɵLBïHìEP*{}Ÿ†ââ©JâhJHÞKRßçžßÊVÖß³!’Ÿù:‡#)lGÓ ‘’…ô{²Ø›Õ~R§{{¬õ?=)ÌØ˜kØAHDWÖ% "+:YÌ£•«k â½_‘=0©A VɬL䳮Ϙªg;®²göSô¸ÚôtìÍRLJÈòª1.E`T!HŽê#8ÞÙsÊ•5Ÿ/´ËÑiBÏÆÞ-ô/ª¿rÉ)l„Wl⎥b•Ì.íË¢‹vR§2ÓíEEn“ºô®b]µ‘­µ¡ŠÎå×í¢« Vœ‚_žáP2Ö¤–ÉFº-˜º]Tº7¤FzRšcˆÆ]bÍö¥˜˜&““;|J 2ÞüAÕ A0AŽ#£%e1HôQŸ{~Ú‚7Û'’þ´¼‹gÑ5ðÊ• ¤ãÊì¢1—¶Éê:1 ¹ÒÕ”«r“[Ø™¿ßûM¡IISì0‚•·¥îÌNqžu©;•*D‘LG¤JjXW©¹%9ŽÎ¤³!UU®|wñJ+¦e³ó¿JS(˜Ç&j¡q â¿ L_ä| ®ç"~H•V«QÊe¶RÅñž¸ª&ßiÉÇnüÔ!KìnTZ>d.Tª¦}ÖLnêóÌeMì£w‹SÒØÇòâÓHœë"Ùˆ”æá^U;c‚+0‚²P¸²2â­Ü­¸^ô2 ýSéE¢—*aUû˜…ýç¯v=¯šâkVF‹®†²b©aÂ2»…SFq•~ÍȲ?½êªŠý-fúõf½§e»×¨×¥d°"‡;ˆAUŒ)1Ά(T«MÆë“Ä5ÜÄyí÷}YpòkqŒñ EîM¨¾’›Žsº#¯sjÜ!ô«‡Ê5в „´Úƒ§o#˜Œícó=(Î’ÉÞ}éj÷7õrù>µ!OCQ*ÇÜ9Ö”ØQE2òÌWÆb3Êw'_Êæºön1D—³1»×ï¥b‹¦ˆRä»È„#óÚû9die2(¦œß¹RE‹ô»_0!ˆÞôó gÄ©¥_±Œ®79ÔââÐ*µe¤¥*žß3œ¢õwêšè18JŽÃ6νøOSdDŽ,]ɈYg¬Žµ'ÞôBÓiz-™Éš*Ò§ aŒqÃ&ÉÉ“Nr2Pã˜mÜv¤]ä'ÿñíc=¦L+!tª–øN ]V#˜å6TGb8c=bK!Ù¢QŒ4¶ìÚ4ih¡þhÑkó”`‰ÿô&$æ(Sa¾ÊßÅq1½’Ç›ô„1ùâ¸G)¤©Ôç¯X…eæ#ï'™¨]9þjí!2ì8™Ò[ê;W¹äÂXç3F9ÑR½³][ü¤^]6\c·Í£·REVoQ^_t«LˆŽtÈ“°EÓŽ~Dà¤&行óBL`Œ¦™3u랥ÿÝZÄÒ+—õg1y©µ%¼¹UÃIqÆÖmd»2Îböó¹Ußä(¨*‰IV‹øÄUAþìTý›ÿãKybVL+d¤øÔíѬR*ÙŒ3ÝÄË)K¶ 9w¨B)P™ã%ã^¥(±©¬_ûlhŽ-)¨JP“¯P`ëCýËÎC@ûÿøÉ€Nú"üó†`æ € Ñ Ó³’5çœ×²s0Áû€ t#Ì!øY0Hˆ3Û«FmŠß)N¥Uñj¼±¸J¤FAñdœC‘Ò„Rµ ÅDqÅuµmJ©S 3Ql¨’e$íô±\Êô–¸‚â ÂÿK#P"NøÆóñ˜Tní öRTC äÜ«¦% ¤ªIÄnø‚Û8Y ŠòrÈa; Z…± ­ü@âŠ"–P¥HEUe);J]¥á„Ño ië‚ kImúTñšd£ì0¡h^¨(­a/ÑY3N©6Jp¦÷‘‰H¹uB*„ÊwÓÈaAÈÙ\Ìj;$©a%´»z}«XCS„UÍ"ŒG$ºü¨ÆGWEæÒbVR8Ž’Q¾Š Glé+>`¶ì”¢Í#™éID*£’Rpù+èrp­3ò¿ aui„ä³ùõb×÷­/…BÅÏ(¾åîÇ5êò,Ì)ô÷áR´bÐ^6¥F#Hókÿ¶Õ BçÙdåR&%P!xݼ’)Öf|iôù!JAJ(Uÿ­,ºf‘Èêõá³½˜Ì¥!($ôŸñÙ9ÿ™ÕÑ(~DµH+™,Et¹ÝëN9ÐUI¥Î¯ a‰ÙÙ´ÕLùQÕþ„¨Ò6Qumª-¡k1ØË*ãQ*åiJYxå ²f2Ò!E(’/?ȼO^=dâP»`”Éþ'mÙrXê1˜#ðµ°ƒˆi®'S¨L÷F»™ÖOÉ쪃&±±»Ó|SJaXßjsmBŽE4“c©§­ÒZÌC攈ATv!DÂmšÇd˜Æ(œ½VÔ>PݸLîr’ƒy­^…Þü.)§÷ÞG;®n>è”U !B6âê5ÜÌu%wÞôLÊ®Ø_¯ñ)V:çeÕrÒ¸˜¾äz”×O%Ø"RˆÒ ¥dy=ÖeÖSÄ–zÓ7—Ä#®L„’N“éZ+¯xžÙÛ”`†AY°Œ*×È©—F"û’íWQâÏÞ9ƒbF»-G£>tb;­ñä‚M48cÚRÓð®¤q_.¡@ íX^ ¡PÀ§n.$Úu!5tjþTž¤¼=f諸¡_9ÎsUM)H#âbX•&ÑUÍFä6ã̉)(›…Ò`BPìøL)©©ÐR †¦eÑWbÒrl'Ù{Òƒ9Ú*ÝDͯ®ÐWªÅY=c¯ØÒ%55ÏVýBv¥'G–S÷Í ûY Ž"…L÷0Û”eQwç$ÅñZb.˜þ´£¡n¨½¹´ÃZµªZ†Æœi‹í’$­U2W‰Ÿým !¢4¢5IUwµÎ3’¯$øô)<#ªþ¬KgmYMF ù$öˆ¢*îÝ¢}7ŸÙµ»sºÍÃ1Pb™ÅÙÈù'ÔdÓ÷½QW‘R²íé ² 4n¢<^”–gãØFw8Pï[Z1ŠgÏŒ„éYL&¸ÞÙ)j\<ßÂBùÛ´4®qÚaˆ¢2úedL,U'ºŠkÝ9·ˆÌïå§®éDT¢ºJùꢔÂ=Ë­5aN³ÍįPÌ«ÔRÕ:¨­¬^¡uTÊ 3ßç^1û)d5ݸ.apJXÛ-=.[çùއÄV¥6ÿ™ErɹU¢œÎªôK19=Ñß ŒnѬ5sìÔãµ7ÛC!Jþ†¦ÛÍ]è#ºG9¦@¥÷W&(‡FB±©Ô³Õ¤E9.JàØqvÿU•=¨øßÛ“ÍRó˜"ò „Û>9s-è=’-LY çwmBrãÜš’z ¸ª[+}vO‹Ea+~n ¬(¥Cµ‰eÂ-š¦”ß’`½j3!üºÍÌ++9YÙY'B%®‹¡ á EÄT-W¢¾³ÚÍn;q³—ìÔVÏTWºaŒ(NO/Þ-TáHÌviIb7”é…×r3©Ö}ÿd”gf_6É©´ $ÄìÁ7WÏùZ§ei‚¬¡Ðtry)#Ñ2˜ÛïÛe!G—ªùVîÃ%1»–DTQÓ½¸ÂÖPA{)S /K(J†´Ä@œÃR;r)2ÓÈ: Äè~7}WÀ) ¥!cPTÂ2· \Ý: c:0S„„F`asš¯ 0cNy»2)›4W:ªàÑŒt(ˆã`Ãn´bÖá• 8žö11ž•eª¦aZžÌd*(Uõjµ§£¤H¦Ã#­;bd “*¹”&©“cÎü³â°Âñ…ërÄÆHÝlÈ î&4E=@Â&Ücã •,Œ¼b5ˆ:?}sv úËÍF*‡"pÅCh@˜!Lý‚G–å+ÄPD1²+GDŠÜJû÷:(3zƒ½ SVV4@ÅĤPŒd#…! ž&`”N-ärS qñmDÌ*„iGàr‰Df0”eˆ;&¨!³/jiI8 œ2ù‘B££˜ÐDL8ã,f]1d8‚ì)È4"|Qœ" ^gâ™`ƒAà  ‚ûR£+\¸-ª'UÏ–©9”ÝQDcd@Bà ¢¸¬ðü»f#›)¬JIXªF¨ˆ%ÕÛ(êz%é1z5bñ ÈÕûÊ@LÔ'Hˆ”Ö%R+æ¹B±Ùÿe!JÅi½yˆfCL!EÃfNÛÑuî¥È©ÃqçòiP„|0QˆPÐÕâ˜Q°t¢˜„EPAáX¿Šd¡…3xƒ„3 íàa‡+)ÈôËø™ýLæ NÄÓg$û¦=ÿ;äÁ¾ô  Ê”|Zq¿VÄ&ò]› âg*Ï$”âW·Š!½t£#j1^ù§ªÙf0…fj«»dÃ+ÉOfâkq+ˆ´ZV–5ˆbs½5“HŒ§ª§6”:UÿÑ‘6è—É9^tB AB„”Ì İ­ôÜ”×7* ”OLSwÜNø’_D-ˆÔŸ€¯V¨­¹c0cˆL0ì­_pŸ¤¢Ò1F.1ç’’BBbX—šC̽sxÆ ÇPŽiõ‚?xŽkKs«"zm¿ÙK±É% äd!Y:_ª9 aÄ_¡9ˆ„ìÞ<³EÀ”’E;ÂÈBˆù!Ú¸Úa)#ÑÅ W.TÃN×MãfUåT Õ"aiÔyoÓÞ<ÔŒT®áÎ$É¢¢fï=†2Å8aHÕÅWuשּׁ¸Nt|KÛ²’í)O&(#%Ä2 ^Êvbªk ¾ŠÉaA R3øÔzÜÜéìrÚÔ¹¿®îÄ´ÇŽä¢OÏû&йšëêè"n] Q’õ·”³%S©(V×+ŒŽÄ°…ÖÿfÖW#ú.oQ½vßÒl÷ì÷&d›G£ˆ·U¦•áι=¬Ô,™¼êU….j§Ð²Ë.i¢týâÙšÅaÂ%D 8Š"Óè9¶L+,¥ÙuÍV©ùåj"*‰ï´¶ºÈuâ‘LQÝ™ †ÞE¼Ÿycß"œÁ+îbÒ²ã܇ÓaiÊB–Ǫ„µ)ìÌ…vâînÑì²RZ  íÒçªpÈ+c´„õj2Â@„:,+c-ÄÊëf «Í¬J!³yv'M,hÆ¢qL®T1FB[ BU:AÇu¦ ‚…S#dÏW½Ë!ºõ™ä*΋›“7“7JU!E –;+‰¹l“ú–D%ÛÈ’ d±5Gä%;}rHñŒæTNÒ1³ ´û%‰EO-m¶çl4Zxì&í“÷>c½êå1P@àt7V0ˆ^vëñËç•LÉRvK^y0oí%¬ŽíS©NÒ¤GM|™ˆXìMÁÈ!¶³U™¼¼"Ì‚˜Ý.æ6”¥#¤TrHålò¸Ü·H»ûxxº0JȈù‚l×MؼîT—1änÔ0­¬®JPêÜõ#ؾ[R²Íod ÌŒ—¿Ú#!_ŒM îNrŒ22fçb‘}÷Ö͘¸QóïÒ³aúテ QÆrƒ¦ù0æÂ›ª½Cˆ¥S«¥%yvô'–—cŠ)´ow•²—cXñOjV¬ôÊ«ö^q;y¯ÈF2µ›M:¾þ~¼žÏ!ŠD˜ìAÐ_°„ØF|±ÐBz œõóÉcìX|˜U‹5gZr$‹ž§j™ÄL´FîùKk¬”=Êgfͪº”ø•¯ÉR¥(Š)øu…$ÌVMr3-J­QÔE>mì.¾Ý[„C:œ@Ùÿ)ªò+:º“¥u;Y3•*ؗ٦¾RÉüº§|³HÏEBVZ„N˜Ë €Ám˜;¿iØ¿¨íMq]i•ý¤ð› ”J6íÙÌù#\ôt*”Æ"ç Gå1äW»i‰*kÔjÔ‰ ß[çy/RPæŒb¹ÔGçÇ<ˆ~~¯éa˜G4£±Q{b©{¤MóÂÖ¦˜Ãîy^¤éÜ ¯Ù"ýßžzH¥šäºöç©HdéHdld%KLµsÑŠRˆ+Š#…GRøÃyêÅ¡(UçUMdn‰ÚXI¢\^Y¢%ú·j‘YBHŒaÈ3« ¤Ê.©5ùX#éKRz¤ÅèЖ½ÄÆÝiלŽ*1„g㦻úÕHÉ"pôÍâKTwèqQ ' ¨UâtÆâ!~QBœ‚5–ΗZ“'¥&øJ:•u¼ª„VM=¿jF*Pé8 §E®‡c“·úÍæz'µ—>_7I ›ö¼¼Å.ºa‘p޶)GL˜¡ FQ[Ü©¢—Ý›Q±ñV©³õmM“ñ+½äÚw™("5.©×ÄÅïdZ8ÌÄl|V¦¹Gœí²ÈjZ)lŽTÌ•jaîM;Ô›ë\ú_ÿ) î*½;»7›¦üǯ­qä °Ž(Œ!r¤éI¹ÏSUR®­AhzfúI »q7û%3x…UœŽG)‡¾‚ÍVV×{7ª¶Øµn™é¯^4<‰œ6»ÐÅ•\Íu•3®2¶ºœò’ÎZ‰RЙVbµ•4„±¨—¢j¯VA9ôŒ* )ÙÐQWS…M†Áf—óˆºÞìW²;õµiÇ¡KGQJb‘­!sq™ „ôÔUÅÓ`^?O"j»6®*Ñ #éÔEP1†;{ÔE£‘T ZªÄmN«â 'ž/ Nî¡húÌ*Ž­¬I„¶Ûnf9j¤5Ò•?NÿÕyJq´ó6sñ=ÈW´ÉEj ¥&÷î7–”Ä­I뢷9"%ÎÜöûv/UÎçr¥I…YËuL“Ñè}GˆšròöÊ9 QâH¡BÅ£8œ"J!`%™ŒÂQ sJµ S:b‡J=¤Š>¯zŠHc€jd¥1&á3|ÊAIÉtÂp˜Ù‚ÔùÖÂr¾46ÃPÆHn ¸NnQW*å(ÈÏ3:fUТ¡xÈÄE„€Ã¥s ìôâÊŠz9Ò'­ŠÍb $pnDŒ«"61¨52øÆ ¨G9¤r¸8îb«‚£a âç ·A 3†##´?ârAŠjc ÿAV‚‰Úê&@”2hÎ Ý ˆªáª‹W¡ÄQŒ{  •니¬Î!¡a¹³ »e›*œàIð¤¨â’ÛT´š£¦jdÝP „&Ê%10Bbc„[IRT9=@Çð08ÀµPr{U [JÄ8“6¡²»V—V ²„ˆcàh ÄWÏú"êÍWMxD.Ñ.3"Û sòt…d‚RÉÅCÙ®NšÂ‚`Ž.æ¯òÇ2aŽæ®«nz)ÁÛ •ËTFĬ$€ER¼CÑ”Ã=1À‡Û†(Åø,(;¡„g 6'¨rXÒq.†pÑ!: ÊvTÝ›ÄÀ3„;‘U òœ1PFPiœ¡#¢ª?Ñû‡øÙ”à“ãˆÐ?ï.Æ3^H#gc+¨"°Ç0B§Ç÷YùF›I'íÜßCpˆ¦—XârBäáSƒap¸V‹„ÿøÉ˜ÂNÿwâÿý€¨DÛ´ ,ý`¥ðßúß߆mh!K²ŒEÕ+¢ø”e“öŒTZj uc~ÙÌu\oò¡ÝÃõéU}¤a_¿Ú‚RÓ„2ñrÊæ¦e_ËÌ\±ËâhÓy‚[Dc]N(á2Ó”‹Ô£‘é%Ò«Ë«ÍrP§´L¯9±+å½âÑÎbyòC;–Ì)¤v¥j„¶Ì°‰ÉJ.ÉjåªêuN}p˜ÉEÕâ(Wª•˜]~6ruÇÄ NøR%s(¶+L¬ÉþX«er8‹ë!Ìßh—0­KNd ±úûÙN#¾î…®qDŒª˜ZñѨ9ÆN«þüMên±Ö´^Äã±²¹®ëgC­,¹KÈ#“Tå;½MȪ”;rÄÃêi •13iÒ¾«yGjºþÍšß³%Ì£""ïJ)ƒ0ª »‚œÀˆE0”!q[ÈpŠèL"q¡¯ |B ™Ö”r„T|v‡ã &B4 XºÂõ-؈‚^dÑ=Beèp‰ëg»ˆ ŽìŒV.t­Œ„oªûÎFã0a†6¸¡ÁÝîb…£”sPQŒ¢aÈýZ–ÂQ¼…TD¬¢5Šs mýèG¨É ̃I$f뵄2´jb`C‹SœVª4Æ&±È©qA”7¬L3jð³Šdfh2û…^âÚ¦FC%‘ þÍÁ¨1 Oz÷%#!ªOˆtl2À”¹ðr2Á!’¯@³‚ ¡‚27…9Ð.!Q Eǰð÷j²+ ¬H¢tQ™ABF Z‡!= žx‰É}–ŽHJl'0¢‰3B9ºWEet(‡MŠ >0}g#\¤´3ˆâsV2Ø«oÌ„¬ó&äHwÂäq” ­î¸9T¸eB ™>Ë =”†PÑ¥¤EJ dQ ’³7! TÁBi• Q9’Ýö½5y8lB1€œsU#÷T#¡(ÌÔU ˆààœÆ™´¸\2Ü2ì% Š*û+”¸ ) ✎0ƒ1ãêF#ÀÁ!Œ¯AÆ…1̤Pƒa8C˜°ACŽqNÃQ„ìÁ”xÚA86¶áǪ (³¡(¬Š‰AT30Q ”¯HÃS(a' MéÜ<\”½"ä !H` |/;‡8T°ˆt¦9”šæ6UîÏrï«YuŒªt«O­ø云ò‚HÁIeÏ¾í ’”Ç#¬¢¢Ûc—,ï¤Ù]•=Û%:(½Â^ô ‰Ü‘άÞÖ´•òòÙªC03ä´úRßPW-Fáz¦© îߦºýÂI%]Hõ)´HD:¯¶_.|Ó©—4e©¯E2‹*_T­Ét±*qV¶ŒèNð„ZQ”½Z6UÄúmú–t]þ(•—܉”aS“˜ÖKT`ç# g¿hÅÛeïAŒ‡j »´½çŸUGÄ(¿*»ß¾šr°¢Û(˜I2qÑŠæCÄå»"Ò¢Ô­#$üA—¶‡:¾ïa¹ŠJråzå{ï!io RjÐai õ?¡ŽçQÊ@¢‡Sw²WH DæéÞÙ÷šsð‹u§h³w‰ꨵå ¹TRjSrDSÍ)œì—â31.T*CÈ(1ˆDô5>KRm"æ5¹]'§m[Ä;‘HgtÎÛ\PP£„G!™ÖÔ=È÷]щ¹¶©mK›my{Q<æ¿K™%;ªB:*û#ûô¡Ns$Fm&÷¨Q…+u©­ê¤7²šY?uXͨúˆ¹~rQOÚ])>ƒTw»×KJTøC„" ž!µiœ¥• ggæ}$ÊŠYBmÿ¢ì³o™#§%é;}¬ªâ”Ås¡Rê´Ksèžñwþå# Ž)$èñ%­q¢8â&ZioIò'•…ìB)Y”j&‘±(_ È:¡J²³ž¢Žwº©éYýZS¬Æ;”–õì}÷!Ì!0’{t/7¿„ß.8M¨„ f•ÊÇRonXÊÅcŽ6ÐOKw^‹ô­º¹„Í%UÜä¡0£ÅC0QKŽ ŒvÆôOkᓬØÚòÏ-"_%Õª"wúVL—nS wc£¥6¾B2];¦áJá”uq]X»øÝU"êHZ&™ÆÊWM–tK*—²¹{T¹…Q8–&çás2AŽqêaɆËt¡†sŽ!Ȳóv¯u¹ë{_gî·ÐGb¶"—Â_Ĉâ#‡Š¿rBÄÁˆj#ï[æ9†ËÄÛÆ–{çDb}jZÓI?ßP‡"¦ˆëVÏÏîdýSaHÄr*1ìĪyJ_Ö:FÌEìš•zz¤ª*É'û;=;ÆÝy©gFkˆpdm7•)¹)ŠSÁHVnÓH›¹%«jR”-4Û\dÕúZ™šWsœ§9Êïâ”qUb…+šÚ.Duý"X΢kWškV&bî«5‘ô•ÙhkX¾Ô•Ì)]…K¥ZŸ˜‰VSÈæ'«ÈŒG[f Ç2žÕsèKå(&Òóqõ»¸‘+\Z ƒ¹Emž÷«Ö¯Æ`RnUX«Y6ƒŽ#Yh(¦ZOcÊu5eÛP©I2”êY}Y7ÓI0œ‰!†[!Djµ",@ÅÇLuLarz®%Ìê#VHóRl@ô´ˆ(íM’”,•} ;1Ž’–Ãh¨Ä$‡§fZHž¦Ë!–èM¼J1ñ¿2Þï‰ÆU§3 ¤‰Z˜c8²dŒ#ÇšßÁŸ18 \ ”¤ œ—þ_ûNÎLvl[Ùäc)æ`Nñ ßÏÆ\uì·•HÈRa(„G. ¥×=‹îµ=Ìw ¸|-s{UŸ•9o0õüßE•3±DKáî?¨cp@ ÄŽ ,YÅ .HyERÑ ¶W™|YP¶”—Z´¢q©ÝeŠ'"ã qAØ)â¡ ÒPœØRìIäYÞ?’II[°¼|²®D"…K$‚ FyoeÐzð¥<öB²¡'¢½ãQ²’)ŒUWyq1Í1à  Bd1§½BBEö•äf/«™LzÉ]‰G˜øÝ§/Åü~ Ã• ƒE1$:Îì|›¤yǧ\ÍdŸZËŸYW4ß—ªÅtZáÍ)Ü1”g…¢n‹>û8;¤2P\°Lë"Âûa¾Ij5Wƒ1XÃq5ÙiDÔ¡$)†Ü¨[‰9 èçl²pŽrTjð ær5\aì`D¸B&t›âWãJ"lÆ”A#‰Ÿ²[8[-‚$ê¤óÏLŠ“ÖSƒ¼ b W4J¡(Wjbwõi’öÒw²'ò€“KPTF¬(²,VtÑšŠsYìCšMAH!Ý´åïÏGô­5L¦!Ídj0×D.‘fô—hShÕ>’ºcÛ˜Rœ‚“¨|ûÙ’ˆ@À ÂRQVÔHLÅaI½QS7ÅêÈ‘ò…E(¤Øº÷ý9®œbÌ )‚‘ÊCÙŽ®m)y Öy®ˆ2Í~‡¦ †á•wuáipå<ŸbSB„ "i&¬7ÌàgB„c¡ý¿eR†L >Ö~JjZ¥r©†šIF«Õ)+kýxÞ:\„§ñEYPªc+üYgYÒ¾>Ì00Ãæ‹g^“R¥þ`‚,äTm\kbDFŠT ŒjM G?§¸ATRÔYV%JS¤(  aÁ¿çO.ÄÛ=Jzpy¦ áBä—)V+ ±V¬³-+yT¹l©6+UJóš/×éEäËq,BŠv»¼ËøôŠ6ÍFå…j9“Ê‹Ùv÷¸©¾'š‰=ËSHGÀ` ,-Mcåm-#ïô¡Ek£7þ²Û‰W¯±Ë–­Dÿæô{ˆ…8‚_N§r¤„Á)å'Eúmk4„؜ӑ‡V¯=­)ÁgµH‘à b,,V¬y6ð´p¥wQR1¢“Þ²£Â±iz΄¶Ñ\ÑÌÉÎ’Õ¬T!SÉ›!¹æñoÉVªQzW+0‰ ’t”®˜A8n_88p¥QIíái¶¡£ð‚8V Z¤ø56x‰V!ß /µ6]`ì 27®­ø¬—àÌ@`ГÄx%`¶¬‹÷U3©Ôkƒ©"e„v³hÈG-ó1Ò´Ïs-H„9Ÿ7I,{ÿ̯bÔêÛq_êéàéÓÐ!¿ºê=PŒSXe&MÖ€»! j¥-ö4î.‰’[Œ ‚‹5°Ï¶–’Ë…(FgÑd#1FŠÆÎãÚnI÷ߊâ9ÝÉv#9ÙŠBˆ4Aƒ˜I?ÓîEFƒuj‚JŠqù5e½'Ü|3Š ˜ãÁk’ñfÙ㘇8ËT±Iz½È‹c;}ÅÍÖßÛ­Í2^ʴ£*Š+T7W¥ßO-97Wb§L^_-˜žÝæ0(T¡D5õ~÷ܬ^$Ã)%(–ÿÜo³Q?o½-bÐS&éÎ*«7ÃPªV¡E‹ó:‡½/“1ØSÉ[‡ÙiJD›FaŠ–cyf{ócí$çÅrܪ%&Ξ‚bSHtÒdå¹Ôf0rµ6QI-±rø)Ey r‰á>$¸8–#M»m.U¢l5©Ã ;Æ)¢õ‰$–g’©©9Y ÕsøLëIÒ_볺ÅyÎÇ\R‹áB8(©@¯É,SÕkO6­„µ¸†2Ö…_ hxž‡¥dAL(`éh6%­h˜l!Å9ўĿ5‰)®\©$4B±«¤bUû‡‘Îçl­ã¬Cí¤ú^Òr¶Ø˜fˆÄ#¶þv_^K,aEX1Fa\ö’âèÿ6Äá(‚”íŒ{›ï¿l¦ÑpNl—²äLêŽU]º5uyŠ@€r¸|î “íé•b§rJ_‰KBVEg¬äŠ)ÅɈûzfWW)Ê;ŽeM_%囨jCeV!ý·„±¤q 8‚hñÙéÿŠ~(‡#/€±'ÛŒG ËÆ‹Å¯hKL5Î(0ÄIN$]PœƒIN¹Lvõ:!RzëWmÅ­b´ËIœíVu}L¹*‡)Špìïfôûñò÷êö¦Ä§lÔƒÚ Å¶V (P‚s85ðº$'v‘¡Hî¶bcÙpž•£Hôuk„!}i¨»DMâ5„[ [­K¾VRÒjKW ‚ B3ýZâð²×ÿøÉˆÂ‚©Nøëù5ù×úÄûæýþ/ÿ³’ݵ#WôPçyx†z"NQŽ9úYØIEzíèIq« ¾"VËe ×ÎåL!·[êó¹-¿è®9SÈ)2¬(© ;lüAXGw_‹T’¯¼´I»þY±…/}æ¥x©*WuÊÊ…väŠN3U ½’Fò¯O¼¸“¹Û‘8‰ðš"ÐÆekkuyËí%3„¸q|4´“àAÈŸ.Âö0Ř8Ä0`À@³èp¢qFI>Zd²"•Msá4Cøyfk£oµ§ß6;‘ÚTÄ£ÓxG”CŽ2~ù 6(ØOò=[v6©ò!Ëߊˆ”© 3ˆø’9f£Ó|õYW÷äsUùȾ÷J3Îj!ZA2æ9œ”,¤S*]ÌA}D51kqŽÜM7ДcG¦’µò±Œ®Ä i¾§D÷•Z›ˆ4ä•©¼„*Ô‚UžA"f²Q]+›šŠU¯ÚªEÑ„"eä)Î`qö•ÔÀÆ6Z‹'&áЂ±¶y Þã$…sqKŠEŠÒ åçú=ºù¥ÊåËRWÆ(‡¹_ËpÍê˜Oµ.¿šaZŒ5IõÜ ~4áBpÛ óÔ…&s à8SD‚Lq0`¥§Ôß[ˆž­`½¸·‰`Ä.Kë´ „ã•S¬ò–œ¢ƒPFGG=Þâ—É¡u÷78JÅñé6 ’Òå@¨!Ë{9‘…rš–LDÕQ½¨Z¤¢Sͽ㿲LÝj© þ×#¢Ê+ãUj¼Ã?¾1u¯-¤-_ó­ë¥Y–½KÕöÁÊVYЋ ¬.¤UÔ¹Ÿ^ì ´Vz1ÙþÉÚkstìüŠLí(暉\Z ³ ¼sç$à …¼ô:á !³ø¹¢Qµ:ùJËm8ÆÛâéÄ!B-)ldkŠ;m¹Z§t×G É(ÖQl³ð÷bª‘·Ææq!˜²›“E(©Äµ)´¡á œ&¨Oˆ÷Õħnß·Š’Ý À€#,i"vá /Ú«Z?Jy[É¥­-R9ˆxN’÷Ò‹GcõR¬he„ˆgV•¤ÊlŒì–¢­)Ÿ ˆB—%’•œÄ-ó³Ífl)„æB EfWL˜º!l›Jísbrfœ™‚IÑUé¿bL¢ÚŠ\Ë$éQ…É;ë{阄µ%ÔÂ9°|ãYc޾TÉGÇÚe4„^XJ„Û­È¢ÐÙòåSñè‡òÝc" µIÅr&& RÈ€‚Á]€Ý:£V ¨|zþši%Ó;— qä4®#ª¶©ku9]ÉCÉ+ÑÞB$‰Q«£X›ZÔŽ©¨¶Ô¡Èatoü) ç\ëWퟄco­%_y&Ϊžšu\¿J¤PÀQ3É"'äD@õ_JMÔÝ=ùLŽÆž÷—úÈÏÆø¬F±Ñî¡Np0 x¬:jCŠ‘1µä»ÛA¬¯Ï%»†KçiÈ| ’ƒ9¼¼K01›6F9? “tÕÆìÁ|iÔâñÈwiÝû”Tw24‡Å2L1™½Ú=¥½Ç ûgüß'ÛëíRŠB¥jês8~¥CNC–.¿´—+ „*/Ý–Ÿ-âpæ¹ðòqf' {¥MÒ•PíÔìpÈ%ï£ès)úCe…õ.¾íû~’V÷ædQH~æ0¼€…U{{Ôbz+ªVº›ÄÃYâ¸Úo©uaÈ´}» PâªÚ’u0…«¹›×i¤yÞëBO$Ò5ÉTÏØÚ“˜`ª:ášñ*{©EÃ{©vVóK­ÚìÍ,óÔOI‹‰™ËEÉÖbZì8 @<%AŒ«0wËH\›‘ú_ê·h%=Ì’i´ß¥10f„sˆÕ¯µHS‚ÄïiÓ¤Ã[Ć rÉ©? #è¤]¡ŽUnÁc—&!#Œ\oIpj®Ü)B_‰ÂÕ¤ zýýÜÿ›9ä @ øâ )•ïR}8ÜÇ)ª›¥’¡&æˆbÜù-/ïS ‚X¬¯u;ÒâÐà…‡3»J$ÌQV¥ £rŒêo\H¹Qíýs,ÜÒê®z~­„S ~á-¬+½>âD+ïa¯ \Ïq fÂ’úx„Ær²`cÄ Ub‘¤ª îbˆÿÂe .\+ªTi — r*‹bİ•X%3 "ÙxÍ,czÉ!:ãr½UPô§ÍIê!Æñ/ï¤ "ÍY 1Aà 4À­¤„0ÅöB׉Ʌݷ´ë‡—…êU¯‚$‰BvEñH™²XRL'M¾Æ_Ÿ0KžJC&·ÐžáŠÇ·iR‘Ð1ÅjVïÚÔ¬8eûÙNÒÅ’~!ãŠ3‹ƒX~( C™¬A–¦&Û|„ÅÞd[ͨ{,‘S®åÂÖ‹¯"‘oGwÂŽÍŠœ!ÂŽ+K/Ê#&\"ålãIVÉŽÿ]¨û³ÛmaÙ»jWm¨z)ŒÄyQ„¥™¬UÅäKÇ{PôÕô êCq…ñì‚´è&Äâ0!Vnš;_ľ9ˆDʳ’Júb½É4œ¡˜MY«—©Ìã‘ÂÇ Èþ†0¦t¸·NûVË«WO{Èì«…ø›NÙ1BÕ|ä(¥€³Ö0b< Xl\­ëêOÉ2ÿJã\õÿ˜¤iÊöfœ»)Hb¤âyT‡¸–´µ(‰öµ‰J 9]w ˆ)Â0ÒüE*¬1YKâÐbRƒÓ0á–šbÏòÜôž~¤QKÂkå€ÇRŽœ¾!=ñT½RYˤ£ÒØÜS³8ÿ$² U£Îõ1,¥«åb FŠQÇmÜ{½1uqYU;ñ™pRRÂêÒ‡–ÒÅ:)¯d!‹!¹Lª#ÄmwëmÂÝVá0•S5{µtì‚®â­NiE”RÎZT¨;,Ïæ¯úS{R¢¶¢VrY­)q_KòNYŒ•á¶LJ*‡QHC‰bí±œ‚- cP‚P™”óÊ)ä,Þýݮ܅?WKáщw•œ¦0`qÅØþu‘˜˜^1õä-‹òzO£æ)“ô_j‡ŽìëA‡¢–8d—eÖÃеµj#½ôºKïJÙŒã˜a]ÂÓf0Í`îCW•·g%MùJ¼ŽfV óÉ¡©MŠBNz Øk"ÅPA3y9ýˆö=ÄÝ—ñY‹^¶Ëî”É9P¥c búlìa̱MŽÍR‘§ƒóP×v+sÕVԻɑ3^(šäÎ\][Â'»P¹Ïe¤†£IëF?0ä­³ÓJâ‘—e>Ÿa„Z*׈•qŽŽÛT¹„ÃüÈUWML×ßø™½ÊƒÒÒ¯¾¢Ð!è¬ÇÌE`ê8”ïõø˜”¤Óì1 °;B ÌIü‡6Ð88~8fËì²›ÞÚÈîDÛbÆÊÛ‡ÓF »búrÑ,Ql™vX«B9@År+Äp¤Q\R»¢²'Ÿ%òjÈË}Aù D’”“Z¶N±T&’ž”éij8ƒºV21y¹¢L‰*T¡Gæ# W® ƒ7µUd)ÿå¹ñϥʥd_!÷ »É„Ú7·)¥Z=}¸PÆ+±”q–Åö+Ñ«Ê0®Jú…{mä •_ÎÇâqZWïDiu#”!ñsÌ•Nb„b™t-0‰J1;¿µú•ëç %kŠ(Œ´Õ#© n×ÊUê¡ÐìØŠ!j¬+œeÌewQ8Õ'¶T“œÍ•#ªS)"b½Î‚?Ÿ“Þ}ž\"ûù¨åFäRkçšÊTDs*ÙÙ3ù’‰´ÁäÏúy'…—éË6Õ 1,rPG/QÊŒ#1q3¡ ¡ÝQˆ`œ²c"© Å-·ÒòÞŠ¦¢ȆÿÄ#ɺŒêÆöXË”2WD' µo$B¹ò32ÿo¸…|ïÖOêɈœa©F¡ŒAɬ†¦µùW¬‰¼ˆÈaªè;„N”êÛqÅ?q](\o*èµ5Jæc5v%7¨¹[eSÑ£Ñ_òÈWö #™Šb,œOEY5¼VçúÜÊÿ'ÿu"BjT©(žÚw,ø‡”†oFâ ¥äG÷Ît$¨"Z<ˆõEJ“b Ã9ÕwSÕx^$®‰® ›•-zNü•“jÄÓ[7׬öö=ÇÌÖe•ó E3ëî]r”êÎLf­2+¡‹Ž2ÌYêyB; b ¹¦EW°W|Ź…Ùj„VfÍQ´úJ5éNn>­´AL–ÂÓ7P”d9h꞊Žv*ðžt³¢.Ž¥RY[)/iWÕJÚWêcÕR®£Ø˜ê"Q´­ÿö™$-Ë! F<é'³*{÷Hwp™”"?óÖ‘‘e>êH”˜²&V‘mÊ!,гˆ~ÌBÜÞ…"T”"’UT•LÜÔru‹C%LÄ!%èµäÿ·Éèâ#Ý™˜Oúï2Q‡2ê©\æKkZTnR+ü…uQR„ñ™Ù•S;’õuvaY.GÂ,Šº& ëšZ´ù¹‹¤^[‘¸žS”†N#6µuD;rMd¥‰Žgf Ƭθ…Ìq+ͧO"J3D †Z[ΣˆªÔp«sÕ* мJ¬çª °î-Ë˺GÅ.6¦ `R.â ”i5«‚ƒütÑ• Á{³ ;,ÉI4u½Ëê"`e–°Š QDÍH]Éž¹HrÕ’ˆÑ[Œ* X1g„0ÀŒ:¦T¥!B±”edCa¥\£!r$ŠV¦ÚE.*1´&â(`ÝTBàhlð–ðã + UL ‚KÛ±ENøi!±2aÃ*„Ì}1Ž1j­'20…^KÛž LÌ„0 ʼn‚”,O‘ØÐ(¡íõÔu\Êã`h :‡„2MŒGGAˆ0ÛžN–•û—~“¢0Ô ­V) ÂP€Õ$$I1ƒPÆ~‚ú>(/px¥HF0b¢žœu3á (O*O-Ô§šúq_5ŽØâTGväÇ9[)_ñkÂÿ*LÔò­ÒÉ!‘ÚÆÕ*¢òalJy{‰u敊;JïÅp¥íM¡°ë!Ô÷qÙÖŠ†b5ˆƒ­«=ó¤-]¥Ê]¬úÛþéü¶"ˆç²Ó®áP‡WF3J|ê[ÉŸyi¯9“2»dššDš@—B¹Nâ,ƒ.;ÐåréŠè½\mqZúíê!(B•t_’J¥¾£ Ó[.j5†Òæ+&1ÿi–£T›Ëz§ÆJqfQêß”+ÝêR"3P¬G¥MœZäÃÔ³~ܧœ´JiÒŽ¹|ÆÞ†qXÄ1IfZÉÆ^-¥ë‘²~¥ókÄ¥e7+”1”Ë&`øæVeÚ¥‚7ªÑ·ÊjµÙxN Än™L5ä$ÎftäWº”iÈU·i‰d˜—r"˜¾‰ŸDI­ä[eöÉ÷[ ­A9Y¦õ^&%P‹‚'ÑÂLö¡®Še-¶._*BÕ¹óµ×*ß›LnbÃ4‡É…M->¤þ•R›_p´nX—›ó©s˜cb­V\*½»Cñ¨G¡&1”zÙ56Ï9ÈÒ¢ô’$‹.%Nx¼l ÖVãʬ_O¢üÈfªÒéÄÆ%íâWëåD.P‘ )dzªÅT—EÂ.ƒ24šU}¤¶+ Ôž‡E¤géuiÛž9ÖMÇCN s>ˆ\© DEÙÌgKHºÁ)¶¶éÔÇ99Ìã"þÏz7:m9HÙ‡ ypv¿üÇ÷Þ)"aI/”"Êq>báëÑR#ö^ëý@Ìk–‹¡4lÇ&ËXŒZæ2KÅS“aЬTò¦4—)ŒrQßJ®!PŒò …Î"p´ï©†âÕ‹·°„$)œ~Óìêœ~¾!M=hqµFeîEËPFycÞéZ¸ÄRê ær˜Ùcÿ¼(ÄZ¡. ¤I¿U™‰0Šž´æP¯N UTÇ{Ö!I1î´I´,‹lEIÍÒ»ÚòÒd£u[®i&ÍrëHÞí§!éœêRR| ɺFýjÖÒ&8KÒPƒª³<Õ ¥§…BªŒ“5 ¼Òë’åÎÌí­™ˆÄÖõeÆd3ÚÆ”T¹lµ˜—2(­!®Dã—N6‡e&––’O޹ÔÁ sæ2Ž%Mt8„ŠÄVÈ®Uú åµ(N‘ Û%NIOeâ™;¦±(Ypç”ó«äd)Jb5‚jIòW¼”c£–ÌN|I…[± «bð²ööµ£œ„Š„[V›¤ý%1hEâ³3ÜR‘ZÃâ׿/ÄêúÄ#"UýDJ!jšw±º…Åm-)Iþõ¡™+Qœƒ uL2îMèµr¤ŠKµ•ùéBg¾7#ý³Ð‹ËɹùRy5—…2ÈæhŒ;­•(}±KþkŽ;~öì[®ÕC°¦s–„­ÆêS,‰î‘K#Q[äró%šé”Ú—ÊòQÕ³¾Èv:©„‘±Ö”z’cy³uIC; ŠRÓË¿ ‚ñŠ"Ê€†æöë²È×Dw"ý?Y./²¦òiI)ÐEAÝl“q톢ÒVœ¨ÎäÅ„iКD%¯ÿõÜû©DaN&¨„ôK”6Yù&Â÷6¸Æ[–T%Œ÷zY7|¸È¯ÌáD¡˜¯RY6´Nl“HYMœ¦Jš¢žE%™øêª¾[&©2Ë–¬ÖÞª»Y#Ì–!ª]D§¯h¢7¯!V‰Ïq.‰È?³%~­QÏbkëKÅ¢åZÈÅu*%ËdP¢¢Ñ3{-öìĤµI—TÏ¢ó½ÌèÅz’Ü%ÛûŒ3žµsÈýòµr¿C'?{é¬Z©K"º»+"ºíË–7Ymý¼…|ªŠRÃ'c•MD»KsúIʼn]@¢VÉ q2¨Í\ì& ´!éªn,eÚžS/§)*}ñýÖ¬UVbŸ·æ6üíA¨E«Qx…*b™Tá$¾É[KW®XQz’úZú3ÐB `ÎlÃg×öa¤$ÎÄao·Ieò#2erÚørq/âé¶tom*ò,„Vuz Cʇ# )åz$²@Hiè`»00!ƒÝ¸Ú½„úB GSgf'?Êr #—Ëò_­ÙO70é3ÌÅ!äwuj6:`Þ™Ië4y2ƒ½"8 ‰XB4jMi òÃÞþ3á J˜áJ»jg‘­U7äÖ-R¢%S†tôB+LÉM;P'T&?¢„AÎ{0¤0Q”^´Æ—-°4Á/–¬`€àO#`JËZËUªPº%$¨)MØ*4€DýÔ´ÝèCÜU'VGã9 ‘¥AÛѵó ²]˜@J‰”‹LuU#°¸&Ôé¡ÀáÄ1mß,hY>~ùÂr®Š–„žUqdÉÌ@B =?kBdÄKr9h± nŽI¯ÀÅÅ fs¢ø“BŽÕ¯XžZØ´ [èH = H¶…¡ p Î/øxE•K.¸Ã¤¡Õä»ÿ±E Žc2‚RŸÏý¤&†"囪\£Î‡ ±¶b1‹–ê%~ª4×ø±£Ö *‚Å 0PžŽ‡–ÃÂÆ‰Ï•gIJñŠfßÝÖ‘${·-/ôÕIënEÝZMWÎ!) Ö©‰ QÔ&iòF=(“R´ÒfŽFL˜8…’Q¥–?¶ï)ÓìÓßÞµ\M“ 2ó2™Ô#;&)iÄYÊS»cmsHTùœÖmRäµ Ê… ’ YcTUâÔâ` ¾qœ\Ù~ nžÎ«ßeÛnõúTqÄ+'ö}¨¨X%@ÁÆ–I ÄvŠÃˆXé+ó£y£ ÑÌ—¶ ±ê5êà°X€ #ŸÁN@à‚µ+Ia¢ËZ`[¶‚<îb)¬¦7š*ˆ)7Æ·[·DL$Q¬¶Õ³Ÿòâ†K!Œïž¼qdLŠÜØ"eueÀÔ…ƒá”qÌ1BŒ¼o'Zia¾»ãÔE;0dß_¥bÍ¢I÷œ$ÆÆo³¤uÅÝrîˆS¤fÈåT;–"+‹2XŒwô¨ŸŠ—’Ð,ÂÀ` àIf„/†UÎ5&Å¥™$1 WѪìZú(—'¿œ?ØŸò_ü„õíZîˆ  `8ÛäÄ+êC*3f`^R”¨;§}EC‚875)ND¸B³EdØ\@ Æ(GBE$®aº“Ò\*¬Ã%AH›¢´‚ÀdHŽ!Œ-aaTvA˜:¬@ªðÀf¤sµyKà!YÞL1Ì:iˆbà£ô ñð‚k©ÌŒ„áˆ"Œûõ8Üð±MXŒRVP…TÇÂÀq„¢³ü Îêžû—̈…â~mŒŠÍÉQ\©¤!ŽùY3Ñ 'hŒš´¶†}TÊQÓªè²&"¨LUK…kÔ¥ù«ÕU+S8ØLQÌÆ ™ËŽÆ~ߢ Œ[ØÎˆù<¤ŸÈÝzþB5¥kM&ØBœ•éG"wîÔfÝï¡ÓK¿Ç)l•ªþ$´¥ cÙ›×z¯iÝ&f¾a^©øõ»R¬HŠ˜úüì!JT{Kù›W²ì¿m9C1t™Tò¶R¿²8¦?µsþÕûçgh•Ò’"åW¶ß¸e†f¹eôIŠÎO—'¯úè†\µ±9Œ…2sÓU…2)ADW] ‰¢g!}UŠü\O1S¯%c>7”q×v©Ò öé*¤ãßÝe._,ìbqñÚ›ZzÝ[—NŽ# ™:Ц|Êý “¿ÑH¶Q©‰žˆ?k$·ÒB2fÙ¥Ô±è´X¨Ú_”—Uù*®GS]ü„\Ý3˜Í$û>­‡n™ê~Ü)B FãS-ŽúQV‰N) BjaÄ1Oò ¬½KØaŒ—·ëˆ]=1…EÅM®‰®–ÔÑ.ü¿ÇQ©Bq‰ý]”µrYgÕå±9.Wt5¤ú½*L(Èݶ”‚”CQ._jÓÅ(̽ëŽT§¢$÷üàÅkjk«>'®O§°¥3bqEFѳí}Å¥‰´}Bz6X®Ìæ¾.‡2Üs"6c™ÏÅË­n%­½B%D.K•äubÒšB§µxÙvå^¶¤‡!X/§ÚŸ!ŠB~+L•a)mâÕËÄ5Erðš"¨'n»=fªØCL*QˆH_„D¥ @jTôÊ3 Zu(Ä)?ü Åq)˜*)Y¬šW£`bŒn1ú…-%Â] ØC †Ÿx0&MÊÊ"k!hcÐËF‰w€ëx€È@8§:0‚b0ÃyÊ8  Šs›ˆLdÑ A8H9ð¨r¢ RŒŒÏŠÈ! ©Bp2†E0S¡-Ë ªù/‡Ã,Å]˜“Í Ü$wŠª‚…-®F®˜„§ò˜‘0”H1¸†0†¡‚„˜„Ì.v( ´A÷èüƒ#n TÅ”.ƒ3:ÒïÔxˆ jæ ¥ó“20‘/¸\qL”"duÈ»¯;‚R®n@4ªˆ‘³2ʆí¥."^sg3» G4Â¥(ØñåRu1Ë|-¤dp2("'-nÂe!`ÔÄðˆJf¹[6è?9çq99O¼JáÔ컪œ¤k—½¦h!ICù£eaâDF’†Û>Ëë‡cPLD–šˆ¨¦œ•F°ƒ'Äu’ÍJ!±ÂÁVƒ`Òƒ¯#n4W·ÄI‰N©íŽ@y”¤„¡‹B2Ô5 hÈ1PF ~§ÄmYF…û Ä@ß¿ŠÊêXØ2°®r¾ŽùÊñB‰½<çHÜŒ˜‚’ Yt¤É£-"ø£ï™ÑUÂÒA@l­Í4a·yêSni+sè\uorŒunU9,u'8•°!7xŠD:y±çB`&]ˆ2µ8BuÆb¬Ø@f#-TX_C¤ë}®B‚°½ ft9«ƒmJׂ‰: Å¢¸åZª'Q…so‘©‘r 6AÕ!)Œ%­©2]JŠî:˜„0g8áÅ1pi\JÁÇça B°â:h_æPn2’ø|Â&•fâ1 0„‘Ð )vð(j318CÄÚö§g1›’•"ñ™3u02°ÕˆTÿaJc8”€¡0e%†Ê$rÈ>\, §ÔR›éƒðÞ@j›:a«|æJØT/Eâ쬑Ïð† #³ÚÔ'Ù#"°^CQŒLìC†ù»˜FÝ÷˜æÙFÈAnHÜg·û™~`âE«MKˆX+`SB›µ¦…8B™Pµ©`JÆõ>!ˆCåòœ´:¹ ‚ˆ£1-µÀ˜c*w2Ü)€#S±9FýD$dc³':‚"˜¹áBˆf^PªK{3UAèÅ3Á £J¹üŽ$!ÍÂäÐ4!(Ü(@xz¤ Í]¨“a‰w'J!My œÎH.BîÂTA¹Ìã’—øœ‚ w ~#ˆ!S¢Ÿ½m=«XØ!Ag…ƘÌåBª^HB«d£C˜ÎÂ@Çcz)²òcüê^ȃ@æ§$|ࢠ¦NËÁàƒbìDî÷0BOLQpŒ!:µ¸®€hih’M Êß-:Qs~®GE{\¬#ˆõÿøÉ¨Â„øNþÿþžþDþýôþ þIþ˜³’}ÑŸŒóáúwa¬ò¯çÓn¨+Ô+”0ê¾åUø‚л¾.ˆ&§·^‘kèYešÌ ÓáBÏ0æm{]îhRhúJ°Õ'˜ä¼š!¯^”BHKµÈç=î0m¡p5qUM0ŬÎþ˜Jˆµ½Á =ÉÄÿ¬¿,iº@·±}5xYm':Ý£CÅ>¦ r´ÁÍè¶(}v25Uê"›ðbT×­ÿš–uΙ¨'É ¼îqf,"w¹m|¬yivëÑU*`aËÿ1«|ýë÷Û Ö n!ÍZè‹c¶OÂ]&ˆó8­‰m­ˆ,`ƈq8‚”B޾¥)ôÆ”uùÍvÈa*»%’ ‚@yc0„ÈAL¢’Ý—>’cVô·1L‰Cò!l¾üj&Ñ8í-9,'®äÞOh"N57¡[ÞˆyE‘ÉuérkDP§}ZÂÄ̱M’,裎‰G5 ²ÆÊ„ÿ „Q5l|~»iï#f Åõ00‚‚ÏM(½B•;teÓ&ÊyWJç³âc‚¤‚ø§õ£þÄÚÍZOL‚ãýÜGÅ ‹@³õ¡Æ#%PQ°†°RGOˆ¯DÚ.º#£Š`õ­G|ùB¡k:p•2½°T+6WŸnŽ9÷â`Ú§¦A?he”ªn'F—"*« ->B?pÍΚ†«ÒE©Ý+æJ ÿNâ™|EÓåÜ£±k³®HXt˜2årRš(N,ºy§–å†ü×n8U?% ØÆ1xËtšT± ë¥ÕÄîdaì„+î*9.]99W|õ9ˆ+9U®¼èV‘(KÄ5|þV8ͪŸÐKÎå‚%DýªÄ@€2<Ð…;e“B×ìºÜbgó§d™QnIhûcö¸U®œc˜?b”·hˆÉÑB +|EÉKÈÉ#2CŸ`ƒ¸úºàßÙ´Zf4Q¨UŒqÃŵT€%-paèäYÏ•"e²&s”©ØÅ˜ÕJ”„'kWi£ºiZBç…rù+8ß)ÌK†Æ}¿¨îÒ”!§Eäe”k.p‰C‚¼»¦'N¬Æsñé2Äf³q¯p¸#TIJ”¯¯žšl_v°—©eV„SŽŒvì[‘ND:à!Š£èGùt“o¶¼”–jåD9ðë!hQ ÿE[qüF?()4„ŠOÎ+5»Uhˆ–zŸ–Ü,é‡7(î+¥±ç:U<¬ÝJä>¹CÓŒzÂÚº f0õ¥zT(€ d„î“™Ü%Þj–ÃÔ?Ê+$þ•–ý¥G­5¿Ðâ§5/¬„n#ÈåAZÇâ]Æ]ã'&uK$ƒ¯bßÅÉëá>$ÖªØ0† :4Ø:ÉY)ë]3¥†üØî)Xä£ Ä7–CtÑg>ö’È)®-Ê%Y§w¸¶¯J D§Ï•¦ÎeiDïbJ£öÓ* Á„f ƒÜÚ[Û{KvÜÍ#§)(=d!Ÿ½9M"ÑÙ,‹P•ÚEFÊŒIÙÊ£Þî§b#œuÓX),iWi'y/-)OH¸­®ANêu$zH¾ò9»Äc6ÆJ ÷Vé5½¬š*WºÃÑIsNú†j"ÌRLž"Ù@²‹.CÖR´KKó‚¼ONñ ÁA’¢Ka\Fµ ^FbÚÄUãò_Wz†¾‹ºèp0I ½2aÆ"aÆò,#™ßJ&ŠÒ(ÈDóžB9DDåÑúù¯Iü³ÄXì lâƒå[šlÉŠ&çwsܼb0ŒV’D²rÔ!lßTg£ôC—qyˆ–RŠôéü—:LûYgô‘V÷~99/F‹·g!êL˜ËEIz ©®â?‚[b+UwËÿôNdÕ™ðDÊ¥±+HÂ8³  ãTÍ"š¯çÚz[ãPYz{¸¦'ªc#’Ý{«Î<ÂìbNA;†r¬Œ;GÍkyZ­C"Û šÍ1µŸ›Wتb)0îå ªCÊ%¾$ÊÂÈx„—£ØZŒvK}pMYÈ ƒ…A+x¤˜]‘îöÇ]iuŒÃ—¸õâëê¾çºÅ=ëÛ[™,"ï+2ŠaHïA°¥ˆå!NŠÞ³A‰«­56yå4 EcÖ£ *5¾B¾_ŒuÊ[×5™DåôÔªdˆ»bÑ,öZÙåk"¹Ÿ®Â™‘ñoq0a"•N—øÝn‚"£—ã¶R«Bež„ú¢PN^'3Î,ˆV‘31}Ú)DR p¼·ˆSˆJs‹A¾dÓ& ½lFòŒ1'HPÄá>êöÄrcõ ÅÛÌZmi›…G¸LBcŸ˜—=ä}T@„¢a…EBâ}D!’sZ­@¥Žr!1·ä£gß«4Ÿ9ܰ¢’A·2ƨÕ%(?ªb?ô§èuõº-ŒžëQsÊ«ÙÌ”%ÞV9ÏâÊŸ1|vT Ö°͹—õ«ëæ•WÒ墳6f(Áëu|²ç»#ß [>ÊÎ\™¨¿è§VV¿©råœÿN²Ž«øæ²s:ÕÌ!Ù_]‚tNTSV3æš„—„²÷1a,²2Û4›Ä`‰ÅR±E]#[ §f#ö›mO,U1-WÝ r¨†´"pëR"ÔMÉ,²#ÚVÔË— F×µ3J“5L®9‡) ­I …5ÓW–ß*µM†ïk;(¿†Îúµ { »”qTÄk˜ò>e#Fa\˜kç„×ô 3öjƼ“”¤6ÐU«q’5 –ä¦6Ó¤'Üä28®©µ™ wP­œz ¬2òžSáÚã5ýcH—yÑ4‡ÇÀû&Hå'r6e™0ÅÏÕ±wT¹…8“y¯*$–Ôw.ów¥çËx+å*Â!éFb'Uy¯D„Õku1SÈGËÊB[9ÈC„:C1Æ7¥Q_ì—5? ÿ->%Gí²©ü´×¯s¨Û½'’*ðÈ&xËgAžÔeL!ÿ‚Lœ±7û6Áê<åÕQˆr·˜Ý§ójΘ¾Q¬r~‰v.ÓÓv—+4Ž(© UÙzêŽþ…LÍÿÆ×÷‰9G‹wå§qÆáj’í· ®²K4é!ÍbTŒ@(šö0ˆAdz“%¶Áã|eŠƒN%J—B³"hºÊ›ôÚô¤¹¸ä:‘$}¹ì‡i–¯CyhDR6íqŠu9ùvrwû3ÿ =qW€4€@ ½¡çäDCL/>è2²Œ4eÌ„òГ θSî»pjh$B2à$1+R4­È ¯ԔÌðsÂT&‰¬V#ijâ¿8b0Rêì»dðÈ2bã59š:¨W—Pe!AFw^c·Ì) ˈÅÆ@Ö†“A³0eÙä!MŽjë¼á@œ"(ªýxJ!„‰#àã DwèË×»ˆ –AˆÌëɘDCw»A›22} )²¾,â)ˆ*U¯}ƒSiïc˜q»0YâØUS Ë¸Ò‘ 'eå'„‘ ¤{‰ÐSÔPÈ_oˆZÂ&(`â#GFª À(ÈC>0¦#³â5HRÓŒíCZ#òü!Â6ub„ ÈåB¯ÁYA á+V+@×F‚`¦WØÑ²oHRV.Pƒ)?&.@tl;ȸÅ5}Ã#”îNE²4SÖ ò©‚1‡HÇ•€A¢=f/W+³Á¨Ð~cLÈØNB¸¢!XAÓ–›b2JâæÐBx;Ìx)dLäAgx C‘Å ×·N¥m^t+˜ÆT‚ÐF¯":‘Êò(AL"+Å£Aà ƒ9¨¨xŒõªœkb· À•TÙ‚25„Æé§êæì2 ¡h&ÐÀ¥\gS™ùP&ªÅ[ ÚPæ#j‘qDÕ÷¦¤wH^ iª%¡ÎVºœñ•8‚qßœ0øa±@Q©Ÿæãf0¤ÈÑ2…/ÂÜ’Õ%uª}÷9n"¤ôôMÏRWÿ•ò›ˆ·T*ØANh¹(D9†+·òOóJ…8¹ÅÔ­“kô»ò.o}T™ŠbéZ• çlõÄ¥/SµÈ‡úqL%˜gûÚa^f «k¾¦Z‰ÚÈVÛ‹%ŠæåS%køšÇEF2|jîJ_»fzQs•ŠÍ%¥²ødO(޳l„sœ¯Þ–¨¸üDŸL8‡|¥kòÓè˪›^SW ªAÌîÿ[„)fïŽF)ÎAVëvgÕ‹öNûwÜä}yvÜÏ'š‹QŒÌ¿™ÁЋ‹vQŸ…mrãâ2‰¹Eâ/§æA¸¥½JS2°ZŸ¬”!´DBa«½sj—ì¬áQŸNÀ… W\3u/ Ž(”¾ído¡ã)Hø™§^×xµýF]KäžšíBz¢!Ž\ÄAžÊ¦(‡lμ…s2bÔ¬¨ÙÞÆ ›è\.TÙߟJŸ2ijjµI)ÞչŦB~™>¨¬¼ßW•–›Æè§ÈϪ§áõ=b«º›å§f™µMˆŠ/¯µ ß' –eÌÛ®+ЂŽ1“{hQYBÈDC»ƒo_¾„ä/ÿú‚çI+¡SrºÃ×Vh¬0Ê1 )?ø¯0—WÎ\ šë"cÇ‚” ?ªÈà† pGU~; Š5æ˜S× -r‰ÌtFÀL ‹PØ‚ Õ A^kZáOúº£Á8ÜFŒ~÷0‚3/"†Ä•¨Hˆ§{ñšôq ‰·4A±T,Y8ÜÚ‹. Š`µiÌTSAÙ¾IÊÙ>PÁP¤Éƒ©ˆ"’ó…¢½Õ+â·ÊÅb0DÅUpd3€29øqÈ\ËåˆiDÅÊŠ?w,F1.e&U9r‰;ï ÔH÷‘T!ù±G3b\Á9JF0# !ÊSC£ã¤aTêÏÈáxd ,Cœ%`a„ ä a†ª tB UdÞ{÷å‡þBå¸3Œ¢pA@p‚…, ècPU™‘ Z™¯Ý×r=]ÊËi„S´D"iÞ¸'äEV±v¨2/×±)íF/¶Ò‹Un«”íö GÄ}ε 2HFìDxçObÒÔϬ¼`ËRÞ´«1w<•¥uNî¢HNZ%b;b=UÛ†#1…c;q4½'çÈÓ=„G*~jú£ù'Là•*Ø6ì…q+~ÓOßÀ‹è^ÓèÊå±++ Njˆ¦Z8…sšæ’BÏÏZ-KEEbëÅÕ&wÄÒq¥^©{õÆ‘AˆT¨êc£5 :ŒW¥5¶ŠÊËõÊÙ‘m•¡¨çDàÇ™1Ä(BŒ|£Ñ²þÖ4dL·ª'%h¼ÉÙ-ŸŠ¯+Lv"š}ʜζzY D ÊØ ’ÙÞwÏI<ÔLÔ ’1üN#*Rúv;90®2ðßfmmÝtm¡TËFÄvn&$Ûv2•XJRfÝ׳¸é_©Ä+íAÛì-ÒTa¥u•il*L’m¼ŒTÆïC3YŒ:JÚ_26ÜΔ/=z‹MSy³TÖMÂ’Šj“(~KÕ.Ulg0‡Z×]¡ŠFfâ-4Õ{³»z.l’­ÑKmQb$Fk:æ ÿN-S<› ’9ZKep­¥æ¡d¨öM³=D?uZRÃ(¥Hîi‰Èg¡0çåÜqïlžTâpLãg6UJV¦.j¡Tv+v¶Ûi¬8êRµ4GDoˆzW²ÂU¤"´‰ÅÃkrýFbÜÙ©šë™7}YDZ¬˜žæk“•1^ÆnÝ$§B²8¤u j°éƒÿøÉˆÂ…¼N ß "Çnûd³’Eæ¿´sx¹ûÈ vò­zœÏäJºY{¹]Ö¤2°€Pt¼ðަüDµÊn‹›{ÉöŽd… 8ZwJ„ý3z³ª£XX•ØŒg$B¥›HÇ)wFgN¨q0Kl‘Tº”êúònÇATbLgѨÿ,]ddÙåf3»ªÑDV£ºö—{a(dˆQý/­h³˜¯B. Í!°]JéDV"eUÉõÿ¢jùe0BTë#„(wÀÝùÏ‹B¦lÖM'RŒ²¡‰GyÚi(.k+.÷:rùŠ¥r…¢ÕYTe¢k\“* {¦ûÑ¿©ºl&e´.AU8‡Ù3¥müNn3}ISb4BΜ#]¬Ú©ç7—Ñt̲ñy„lQZM`‰K,¤É;›Éþ¾‹Ø1›ÌïvÉî«YþdQÎ2^HòÑ“¹ÛÕÀØ%Ž;Ufí·¨cܘV_T¹Qµ]²­F‘¦B™ ±QÕ™¦²­·Szz¹¸%cdAëaÈT¡ ¿ô- ç]_ýÅ2U}V\°ŽK6±ëoO:9ÓK˜B:‡#IèB"ºäøD_§²ìB5zŽÊ×WävÅâ [¾…P!ÙMêœNau¾ï­Ø6íüV«BNýâÈ^KÐùcÔÕvH“i…t“È®»Á™Ç-ž¨¦z­Lf ©Yý ¿÷ýT÷µ —ËB(¯õî¾ †aPØ#ΞÊ1&DaS»Ý=%£â<‹W}69%m‘ŒN¯£uÌŒ0•Ë®_Ô+ÑyÕ\—îÒq½ÐEáÔ©C0o.2užº^Í&§kŠDBb˜Êf¿ëLÍT(Û-X“RrÄ+6eÎJœä*ND©\ˆûÄů ¬È|Ä5>J׃ Q¨žVR•éê–%ÙukDª¥Ù}h2íwÚ=¸˜+Q±ÉRý"ØÑ¸6 ”KJJ®qµÊkRµ×é;“͹[Ëô‘hd(‰1E!&™*•½uDç¹ %9ÄDÂ7“|Ú£ï)!¶¸ƒ7µ…E¦*§Ðš9lèA –GeÅ0 Kd… Y~ÓÏXäêÆ"ž.ã>¸oÎõB9ŽE'QB1u? ^+$‰ËzXÚ#Ù.ïVµ—Si…iY÷Úsâ9ßK¡HëÎ?½©5®GTC*”ÅGê5{iÇäÛ­ÚÞb¹Œ¡[YmÂW-KžbÑäÝÝ¢ˆ˜B–Í3ª´B9ÏVU±XÉP‰”éš­.𤬇/Ë]„Ô+T*²ÂÑ{“[šDôB­Wt¯)e"Qdªv%2'µ0‰¢Sc; JD'©¥ný1ÍÃvW¤yˆ. ¨äÍÏ‘º›…®¤sŽa‡;¿K´g¿òËßµ}6ЧsŸ×&&Ÿ'Íú´§(†Ñû˜õ,–Ò§jÄÉI+=ÈB&™ ‚$Äze,ÄÒeQÔÙ?Î ![èb\$¥ÃwóoëÔ¸„Šr1œF2¸B+9vúú‹‚)p{K–Œ"Øúcü·F.ˆÚ]çMVÑEª…KbR=vÄ&ðŒˆ ÈÄBýµú¿Î8»v³0éé·B»é½¢á0ƒSv†ÇQ^Z%ó*é *3±‘„$QŠÃ[ìv~ÜÌCÐsuiÙ4’ ¯?…j½D[7x™¼KŒ³=”þs••jÖí!.‰Sé÷ÞW2YÈT©køD#ºáÒ¢›{Öž&Êt̲”•6ñª.Xµf¸êfH†^ÄI¾†Ó_ݨÌeS/´¨Äîü—ÖEe ü#µýЍˆV!Vê­ySÕtñ )˜ÆÊéDÈDµþÔÿ©† „²±‹³ø„¶W:¹Ï*®ã®mS9Îæ6Ô˜¤ªé˵Æqr©U9‰ß*"IgC‰‚„¹°‘=ÔDýà‚(ÊBfµ ˜)Šû’vq‚²vWmÏßGÊþmÒÊN:QHŽrò^êO}Z,ø].“Äá•-î±ÌVâ±Ì“.QLtàEhÚv|.pÚ¹KÐjÊEìš[ñÛ˸úZ#ØAܬb DÊ'[Fæú‹ÆÊ¤U©¬S11lÙe2_îîz-´µÇÆâ™›A´Cç,Ë ‡)Ê#”fÑé"y~ŸæÝæ‘·‰Â¢Ñ¥"Ú÷ÚåV+’ôÜ•éSL„-„K5’Fò5R‡+:³Ñ3ØÂ$”DBbM€¾û_¸@Ìì·vþÚ5²ÚÝý-*K71‰"̦*.à´'”¦\¢ÂB)Á81ÎΟOΟÿ Ùw¤ƒÇ8Eq@ê`Àð`%6þÏãœÜS9?%eÆ"4lʯ§2U DB±C˜€¬›†¦H€Ob`G€ÐÀLj ô†Š±ÑüV‹AÑÁ³ €¤rGD z[Üeu&„s]ŠÔèÃ8…!r·I@ƒš®ŒÒˆ2áþ@”V]åŠ(e„¶Õ)Ù [„1ˆ1„*ŠI µbúžP!¸‡5½Ý{ ù¤/sp‚ä*CŒ¤æhHˆdaÏ=üîcÁN‚¸DcŠT½œV â©Ô^ûP݃ j`E¦© A, à£cDŽÁÈTœb‘Šn~F¨˜KIsÈœîè)‡dl½óCTaЗp¤2Ž0‹™ô–R£‰J í´.ïáLÌ*Ü¥âêrPžŽ„¾³ïcÚß9ÓÉHË:üWùK3%d¢¹ë„+reäÆÕp˜Ö©1…Ú»1rÍùŠƒæ.U»ñ4¤d*®üÕDäLsø¯è•j´%åDB»¯ýW‰¿›½ž»Wô¢YèNÔ¥ÿ½¹DR¥1Ì0Å3rÉÄ¥+œØÏŸ‰E«•s0œ„ n6ÓØÌ´N²î¦úH¶!Z+;]Ù¿5Î؉؟F7 ÙÕ S ÞK²Ð‹Ê]%é+¨Né.Ëtâ Š¼K3·. ¬ÊºÞŸÃ–ÍEªªTüD*v¶“ŸËç½íTb3C#7IʰZp¤bª»€?åã¿ëÍ¡è¼F³€¾|E~Œ3*ÍfR¸×¶ªågÍòûÍîf=­^链AÎŒžv!’ŒuÚ³V¨¦©_ø¨—µ4ˆ„lõuÞ7Ï/P…«“EJ!5žTEº”C(†¥ rö[Ç Œ•Â,ÉFÖ÷bæ_Å^k]ˆÉ.ÜåBëãN—#ùIîÈ&—°›Öª¾“N"Äë ÄQ…õ©×¾©£5bá™øJ攂unl“o”ª‚Q6U¿ÛôSù¨R+t§1U“ÒŽÈWuU/©pÉzËOÁE*VýŽÕ¦BëÊRé–¤rc%DB6SDf-hØV§k”Së·«š~²v#˜ö^²’æÕ¡e×ed!9‹„Bc ƒ/£yšìÌϲFl\òÕ3ù²å”&•[ú»;šn“Ê…u)mßTHEIÔ¦_a]’ÎuºÌ"º³UþÛZV&fO¬yMð•ºGÚ)yÚô…Hî8¯o#ÿúqNE/«º,ƳÿÕúQ5ñätgâÖr>.ÕL#ùhz˜CЛíÎígVF!0Gäÿö §mË]R‡O|cœG¥ä­P™Òê[$§ LZÔ\®n9ƒ$¼ê¡„E; ‡ ¯ÌEõò1BW ´Ì+*;¾å¶¹÷u]ÎÉÉR–‹SQJ‚·Z›ýg\+”ÉK-F&¶‹RZ‚S’ÊÞL2y7((Èn¾Ñ\µg!•ÛÍɆJ׳¥2/£+¦y«¨ÚNƳ±¦GœB©Ò¬Ì Gââ[ŸÛU™Ü|§ó]¤›2B”®'°‚1I)Ñî²”£“Ôµ.“LÅ-QéÀ»-¸¥ˆ¦=— ú¾–K°„¢%“NÅ«,Fk§YÙjƒæŸW$aFêh“RO³±ß1MílÜvNÒwL̋Ǭ„*5Ç«Æ2k¹Å4Žc„fÅS%‹J~G• CØ×µŒTн}hCö®¾.¯,TQrü„S´;Œ8æfËÉÇB t£²Ž®Å.6Ñ:%/=0¤9y …úÚ]'È ´T&®:ÔVŽ#"5ËÄ)¤ y±¦¦3#çDBžAId͆0„Wêe µ¾6¦ƒ¸rj;C#ó+˜È0è% mš ƒk‘DuPÌ0ÕÔW¬‡8R¼Ì1B òP  Uj¬# l0†‰»(h¹åopŒ Ê2ªåŠ(GÂj»ÑU Ht’çJhc6fİ ä‡GÃqq†ô`¥Øfò‹ÝíÀ¤ª'Ç)(z$ H”.oÛ,®!DVÆs S1!q 7³ùÈÅ #°C#ïδB‡ðÇaÄa{1C!a7Ì ‘HÕ™š GŠ …+Jã-;¨ç Ї7¡ÉKÖ•„A ˜Bðl¦L!Ø'ÃQ „SwkÆ„Q=éo.:|¨W!ÒCG+7Ú£¦c˜v{q¿Z¢(‚ƒ=b†™1: V&0eÛ® ™„`‘ÊZ XrñE/hb8Ü¥u¨Ù5Œa00ÈÐG0Hĸ"HM„Bâ¸Tí‡È¢¢Uiç2;¢Èsf#XÎ%… 32zöEŒÌÂjLP" Â˜Ã“ XÎPLüN†—ª½x…¦¸j+ëÐ4FFQ(Ø‚9’£ŒB‹“8 î“jG”qG/‡ÈXè\aÅ2ª®TÚ2‚8‡¡‚‚°¸ŽÌრŠâefq\¢¸‘'1߸{NŠFDl£¸ Ê‘ØÀ™F®mî#"¤23 )Nk¸OãÝÐE› šõ 6cˆì©¨ö)ú¥DTì—YŽÊC´d©ut¬3)u·Öª¦r6ÒÛéèI$‰ˆ„G°Ôe÷þïGñ,§ S³…yYTÌa’…R(‰èO6¯j¿j´ñ1I¤ûc–…ýŽVWդ뮻)3¥JA‘Œ”Å•kÚˆT+ èîÍš¢+1d§|¥ãjHäß\jÝ䓞Âg šÏM-7NQt1íØBe®êffÅÔ­PJ© T\üüÁr³ì˜\¾%_Ut–çŸÛ’ŽUðFs“SÆ9A•Ê)Š+‹„±(Œ\j6Úµ§î`ÿôê!w$•÷ú³Ä[زDn¢NqФ#(G¯[÷άC™GL­«…©7°¶uJJ²,L¶v[±Q%OgF¥¸˜–mZyʪŒ7#:«‘Êu™r‚1vI±JÎEä [}~éG–óê²í°z¦8Òçâõ¾}‚u!Þ!’F,æ#ªQlTZ…"!i_˜¤Ò[,LN¶Rí•J æÓm™rªt:U¹\Éê%7 •f2…}«ý×qiÎEEΣß¿…s: ü¼GêúHB¼&niw[ºàT¤}ÔßE¡¢µhÜS2„Ê¡JëþMÒK<“UŠòÊZÚM÷¾î†;…;ˆ„(M"L#ÈÄ39¸†j®!j„m¥2Ö×¥ll³uœVº73È”|Û¹D3gÌ §) Ú¢òí“ÙëGESoé-,N$ƒ™(ügEù¢UܬîY¨m'“ÜøÈDüìI]œÍEfk’Ì,æJ½§=ý±ÎJ' ”ý¥ò·þR¡qi¼™H{«ÿøÉˆÂ†µNÿ»û¼÷kóFïÝí¨ììí©³’uÒ§†óèÐz¨ †g3Nsr•d2-[-åý}ÛS4ìGz+J™îÖ{Í…%DΦ/ÓˆÛ&•r­S„+˜Éw%‚‰!*Ÿ.Ó‹š^õ3 sPbQžÄËgWùª7’™J?AL¼êE© +(«E¬Œ_Õ‘6ˆ„5¥8¨bñ›y²—®¿n*»º{¦oIµ£c¢!"*ŽC¤Ì“= géÍ®}3í‰!4çÂÒ´%ËÈ÷GÊþ~¡¹³Éj“h—YT¬¥2D"™ê¤¹2Vs݉DS§"uëi½Ì …}6Èuº²šÃ`Ý]kô–ôå_3¦Õ>t‘XŠ"µS¢·-™ÕL9.m"ûUñ}ÿ7=µ¹uÊ+JrܳfdTB²”…£µLIfßZå ˆ‚᪠ïõQ¢ÜÎiLªä_‡Â–W±U…&C6Ã@K° ¦g” I¦º©Ê)þã ‚ S5É™?;÷½G78Æ$71B9œ%#C"D.3R ÊÄÁQ1%pÓ=#&ÌEt®‚×|îÒ’X”´§e"¡XG ®V+A¡í£eÎÆvŽ0©ÃWç!.Ç#ÈÖâ߯Ö1Úð”7"pÌ‚J Yƒ˜b‚ÆVªh7s‚ŒáAD’MâaÌ9VNt:š9’ Ž…ÈBBÉÐG(pJ(cˆ³¸ŒõL)ÅLWTÄ\£s œÌ^¬˜n%dÄJQåA'"éú=ŒÎC Ø+¨¡.'ècÉĉ„,&•–Bˆv‘.5 á an%È21e 1Ç3‰ #®t"ä‹™_qÌ(.(Na¨7Äi@… qªf¹jÂâ#0æÌ’„&AÑQÄ+ •ê)È œ‹˜m0Š ªŒ ‰ $5ˆvâd92ˆØÑ¬tïX)J8e$1éÁ) „ts=#°…v܆©Nˆ6(B›ÛÈŽEÜ2¦3óßÌÊ1PÕPNSã.\^EŠr"34ä8Ï‚D8†"‚‚)̃mz ²mP¥ÑÙÍy`¬§„ìä1=”ƒ™éó¹"sr,è²+\R/®fòŽ@AB7 (Ü•"|mu(ÁÈãZŠÎQ”ÎB8ÄÂc‰ t!¥ÙÑ3Õ_å|EQKëeL´Ìº™ýÅÕçZÚRbPëTq6!TæòèÖeßç.ÙX˜t‘Œ¤=Šzk/' T·šw2X0Å$Œ*î#ur±gÍ^DÈ\±‹Ö|z)ËUvTdc"’¤K®ÔAÙúž„-E›ãGº1…Ѿ+HiÌ»íuT­Z! ‡ÇdTåB\šF³iÑyÔÛ[ov>Wd!Q›LÈéAõ©åÎÒ–¨b9±E«âù´A¸O!¼BˆŒs íP`0H g,HŠPšJhb¶ú+dH²tr«Æ³fËÅ*â±®¼;Ôâ†t«YžõKÍJ¦}JŸ^XŒ”‘ê=²Ée%l¦BLÉé±TØV‰dF¯ ô›³5klòÈU¨2JìÕ¦®ÑåEM+ú©R¡8O¤ß=X(Aù17;ÉÒ8‡•Q×<ŒUãJ]eŠvÿ1ù3ST‰ÙO.od¨2â2TÒxüGVܺP`ÀæX¸2>y,»}סÓ­æZ…àA'µ¢DÊ*ÍCxÅâ†èqÐÆ9bÆ"ÛØûRí8Ê-it¥¿ OØ ¬y«>iÖŽRå) WvŠ âóí V““6½‚¯”É-Dã'b©ž²3*¹Žó9tª!ÄßfTÛ |o@–ª#wˆâ%D*˜¨cWâÊ‚¤‡˜oE0ŒC¢eçðú]1&µ>xÁÅlö_¾žbi ¶ÞrªG*JÈ3Dy•Œ‚·#:’ê‚(ù[÷-¼¿µæQ1Fû嗈ˉ+Šýœ1E î´êj~á…"8`¬…¡VBϳ^_úžômùJ* ÇUÕJªy™’Ûãi«É”§ü­–w ×0³–ƒI•‘ŸÜšN(PãŒZ U–µ{þõÉØ÷¬˜ÌÂ.}-ZÒ>"ÖmŠâ"­QÌQŽG ‘x¢”y‰•ÊyjZ~ì˜X½,ÁÌ-s4-0V!ð¢ÅPÜb“Ð"WlÉöòæì†£§¦m„ˆ~.¯ç½‰„3c8Ê®¤d¢¥¢Hëuf?›ÉŸhÙÄ%û(þ=ÕØ£vÆtþZœ…j·Î“µ”MMW·lØN œ\J±1Ú¨N ƒeÄ¢ÈgRºEg&å?±ÅKÎ^E*ˆÄ£5¤§ Ùú\¢å¶M7ãᛨ! e f0…$]¢Ÿº®®Q\`ÅB‹s+ænƒÞN¶f”»Õ;ÔJ™ÎäÑšÍ#n5Ä­ˆBÝëSÛÙU’U;‘N‚OÿwDÍtÉ +(QTD{oèzUÒÝ}§qÖã„G—}†‡ÕjMS©xÒ;AèBpPqŸbH–cžnH~-ÿ+zK…)UbaþƒhÄ'㪤Ìa:I’˜§³Jã/–ÊÇ¡ÏgïǦõ L1¬²EC™çe)"5…J8Ë¿Ê&6ãDÛäâSIÖ €…gQƒ71ò&ÈQ‚ˆ,–ÁØrˆNÇŸS{oû<²=H¬ÝGD„ÎU¦1J“©luñ«v"k ¤V!.…8¢úù©M/Wù°x¸ÕÒÆÞ3Ø&È‹õ!Ø•€‚ Ä¦ŸUè]% H`¤lÜÉbfËøJfÞ©6ü£#öˆÕAgñÍÖ&õŸý*‹øØ‚û{)ÎPˆÕƒä· â&-TÝä`剬}ÂfS‹o¯“Hpå5Ìnq"Ã}Ýe²o‹šÓæ3b(ãƒG-e°«µ)--•’íš%e|¬æ ñ툦Jq5ÒH@æ%þE* 澑_TˆßD/|©]-–o-Hþˆí U!5.4åvZ‰BZîÄ$°œ¥˜’èôªí–B&iÕ$µ…^!E}™L0ïYZqiüßÔñvÿ‹V9<„£.^¶×&礇³¿\†j‚£Ìê!:ÈR•œÉ•|§wÒû¿–ÒUåz|õÕc.ëQsºfÜá™íþrp쎗S@~@3 ¡&ôèÃï|Á0$?3gaLQaWŽu»Š% êªÖb¡y*—›o¸R~+ÕW_«¦§N¡9›l—db™Ýêg§Íz¨@…R‹t¦usçfT>—ý¬–ÑÆÕ¼¹Iš¬Ä¦îδÄ.¡ …ÁÜR±ˆ“:´a (ˆÃ8¤>s$¢-l¬TÏÛuï·¿÷u «¿•ÜÚ÷S:‡ºlBŽ2DѶ†Ó…f#)qt­ˆ]¤´NîÚ#™-ˆL<†ÂGElÄW«Øã#Ô)ŸÄß¶­6YE~bnlÊÝÔï¨JQ¼…B³˜c7{÷³/ÌgOÊШ¸•ÿsqþ¾¬2áˆB­{´ÁdF0Å3dÊ)Š„Ëˆvï}C8im7R”¦ «SM·Õ{V¸yµh#¢”c“K¨géT¤q B»2ùE£Ú–23;Ÿ”Ù B`2sUÛZìÀ@„&ää%.¢aø(¤( ”ÆÚ XgRªØ œ¤dc4ä†;Žó¡æ…ªŸÒŠ…ˆâdjƒ’Fr¤ LBD¨„'I*{‡8üx8ë!9:ˆüW)ÖÀ¾@‹Á nˆ fYAdñÁŠ"Å(QAT2’œÏÐÎ^ÝÐü”ª;uA3?Þ!”æVXbËUD(ƒÁXXs ÃÌ#NÊ¿aLî¦HÿÔc¸X?Éά¢2F0b!01Ž›„ º˜†z{àX ©K^ ;ÁVEX•ˆ„"8`À1JÐÀ‚oùšŽ X °Îvâ”uq‰GÃÝÉ™WɨQÝÙOU’Ë)PŠƒ~ÕÕs;/ˆ“‰ößD2ÜG ÙÛá™Ù1¹Ý“0~bôÜûWZ×ß«ÜO±»¼âgMv³ØÈAK+#¬ÌÄDÆR íµ¬½z`™íËÖå}é1?N{”ÃuŒ¢BˆC¾0ˆâÜ·döU×3?èZ´œšÂ­'¸J±„Eö_gúR§u8e«/é½ê޾„KfÓ‘Fî*…Ix¼e¡òŽO"T¨r‹F¯ŸÎ«Êû•ÑjDý=›”Ô·#‰CT`ŒG£$‚’tºˆD³J(å3RêW§¬­)s¶ [ß¹»±û‹KSyŠf6P²*¡äcœŽ*œtVF_ÖVB&«ªêir>G¡KˆF\Â5·ÔfC±“hTâPœuå2i E¯/áÇ oŸ˜E#ýS»r™œËç1™šº‹í_/úZµmÙ1ýM=/øaì_b˜f©WDUL1YEH¢%Ýd FÂrq¸<¥§ž†§}wwëè‹÷ãͶä2”ŽÇV0å.7\äláV¨OÅ(Žäë|­ìZ|¢ Ͼå¶íy…$…Ò¶…*U=³-zyÙ’÷S-)_þÛnµ×ere7Øïgÿs¥Rçj¡ÇÅÍñ™EÔÈ&?ȨH“sÝjzSC=;¬­¬ž #-lÔ#3edC)[þ»D*Іæêà¸~tb}™êΓé¦AN¶!ˆ­ÕÄA‹ÚšœØúUšO²Q³ŽB©TÚ´âªaÔïVÃ!Qêı‘Å7`¶:*þ‹ôš¼ädÕ¨Œ#­'7e´†‹ôAÓôòÍyuä•¿p•é5°‰ç5Œesná‡ä0‰b£ˆÌÌ;®½y×¹·_rùza±~dR¼ö®#¶ÔŽ2nVuÔ¥Vf¢ôà ….çäz[ÔäÓêÝËãЫž*—|ZnÕHA„3/QQh/Q‰ÊÇc½½zØ'ŸÕ4¤±6ä-×Q?LÃúøÚ]ÙsyÌêOÓtž7Ñ,DrýD1L›É¼}bŽR"këó¹Å:«Ó–ÌQ±Î²¦#e'ÇÏkðöNL×òUiØír¶Ñµ3Š ¥Êìèq\|tro‰†lY(D#S>ß?QNvvú«/®Uˆ…۪ܹÛc¦g¶¢¾ ŸŒ5>Uu‚™Q ·k’üX¨)Ò…•¤bz´‚?‰l5Kæ®!–»œ l"œz¥ÆpŒˆaƒZqþ"•5£«uâ«"$*–-¡S3 pQ ØTÄÄ‘T„VGhëÆû’üÌ* `%…YL f¨! CˆÅÆ 8!Ò V©³ [sEPÀ¯\Šðâr+¹("H(Ù•þÜepV@DCa°8xŠ ŽüƒeÄ0 …)2e/ˆΓ„[LJ³f T9II¸•APS*UZÞ¸k‚ç.)¨fê5àDgHŽ!ŽP%ÙÙG%ðBlýÁLyñX´A Î…‘]´2ÈìH¦˜Å *xË‘J¯âŒr‘C† œ¢|Â#ÚGŠC„)ÜÔäRQåðø2›È&+ó¡X¡Œ `ÙGX N-}Å1)L²{‰³T¨ºòÒøÛúž•$Ü,^l©ñ6£ £*ûÔFTΑ)Zy(cŽL;1¥Ú)„ÙK¨qq(«Šrï'°C£i8¯½Œ\õ$ƒr:ñ .xŒeôÑ7ÕhÒ~ç«H ASšœâæ3ÐÂ0™”-ÉŒúu¤®rt›â æ;êUOíŠÂä‹ÈÑWµØÎJ*R¢ãÒGëZ÷z®“±‚íMJñ%ÄaÇ|æ$´^R»ÑäLÅ=ˆÌÝ*+s¶“ÿhÛW:’­NÇ.¢m?òœ¬(ɽR‹fC*’p³XtÑ*!ZMÇÉ“o¹÷â ‚Ëuv[ÉÜÜ‹BÔÔ´«¢ÝÆÍÒ- ¬ä*)ÆrºÓ©Å"ÕÄFdú®eõ á i¾JÚû‚²öO·[ ¥s »~õÙD Ck¡YÊD'*XºšB^w#JRžJÜ·êí\5,ôeKuÇÝÒ•,\ÌåüH‡×î¥h#†!Ñ/å‘dwÑ÷‹½RˆU륚]"z?)hmïFwÆ$Åvu÷KíT옂¥Â>ÜCÙºÄp„z¡Éî®êN-¥úy3ÙI¦À˜fQ ˜¤µíªœS VMÙ‘™]ŽìëBº+l¤vçz"ân/è¦-µŠNÆ?²eË0M™š¯2“4A˜§ÂUi¾K&)ò–lÉ+Òš´Îp«%®ç3-¤‰M붪.Ë/(‹íAVºôÆw?܆wqÝh­º¬!AWpJ3Ûfb¬l·^¹ÝÌZ;´•4d­1ʇ¦#ºŠ:)ÊŒd¤ˆÃåfÿøÉˆÂ‡²NëSSþ¥ý$ûú-³’•È!ltÈÒzH†nc˜@‹)¼\/Ë}­ r†±*ë]\3Ìu‚°Ë6KÓn7¯åR„Z¶*‹eÑ^1ÎUBBM=ÌžÒŒ³, 2uÏß$Æå} LµÉ̪)ØJ“ ¡f÷ubJ(Ä™úST_AYhf2E(P¡M,Œå“]+ËgMÌ— ëaŠjËÒH1‘Ýõã"EiˆÓoëµ.¡D)7ÿÔÙˆätƦöêdU£y]ÍU“ –aâsdÞ^ÕÏéüüb²H\­¤RUa½Iæ ™AF¬q;‹o_¶ãcg%Ä¥OWû±Sp"é õ“dÙPu‘*O\A0@¬æ`E)SÌôŠo¦T´.™Ù×N±H5~.ËÈ"ûc!A àsE—LA~œMœAVÅRUÅû–Rˮƛ1•÷ê§üúr½ØW’¨„ëØi°$…IEV.š#3˜`çëÖ²Ë"ÊÎC<Äl!Diœ†·£‚ÓPl›Ž×s‘8F³¢dß—†.ìUm!IJj„#FWw#Œ0zFÇÙù+¬«©l–+$Eå‰le´¡¼£§éâL†æHßÅ~Ö²tãHzSpeò¹˜¤í뺬¶Iªy4RAC™w=¼´¤‘ü¼è¹Ñá+(UÝ0*PO”¹LìxB»¤r•„ûqÿì\Q%¬cPIL<ÌN½‰,ºN³7XV« ­…J¹„k»˜‚*^Ó%¡Wck½ìD)µÇ¯Ï^È£‰„²•âìpŽ,. (ÒÒˆ|q ªžGI‰Iìî­_'{.U¸ž„?2G S.-ÃöÉ2•LV$l“å@å#Œ1¤D½)0ì¶2ˆ™S4„_QCÄÆ¸Zq´|шPè1%q4øÑ:Òv¸ºïf¢.§ŽÔs5Êuˆg }â›+fßw¨¶b‘‡¤Niâü8íK¨ÏZ-—ØÌQSk’ ¹Ždêû*î+"ЩJa=ia_ËD*­D"‹^‹Pê8áÌzqVZ×¥“æ(á‘¿K -³·‚±êa©ö’.èPÈNM»!IÄj1œ±Úe¦’œ¤QØA÷VybD,¬è#³¦•$©{Í®:'Žè9«zm^Är×Ù¾’”D׳Fõ–w•ÂÑÈÆAƒàQ̰i0šNy[œ¶5Œ…Ë¢æ?%wåõ6{NYêEéRM¯:)D9ˆ 9¦çÆ¥pCp;áÍ”#i™Nv<„©ÛêJ*i‰8ÎHõ°Ä6h©Jsdúç# ÊdÚ½4”Gó}tZKB©ß‘éb*©[·x¥ªµO±%—tS£;Xõñx|²íÔ“’ì!¢§‚±·úE–Ö÷ˆÂ/.T÷m\Ý&kÜöO&U²£k4…©_Yxòˆb8®p¥ìfÌ–Ïìæqì}Qæ=âßÅŸ& •3HSN’¥"õÏ.NÒ2…v*‹Ñ¥Ê©™uª‚6* cf·”¬(¢‘Òúµ­~QR"¶ù«µ¯ÈÈH„ÚÇ –=ÈÞøQ–qVCŠòÂÖ‹®•d^]ÖÛ(õ/z2’·‰3­c7&,¯O2q(–0ˆ)+&ÊÊK#LŠMÏâ“hÄ”µ¸Ô%ô^ô7ÜVÖ+ªP;2g+2|DDÜrêæ”K0E‘³YóIe1ÏfËbÝsŸ +Ù¢¼…Ê7 wt§j‡š– ËE0äͦ%{ÐBjóÈM+AQ¢(ÉÑ7êø””šÆA3Oއ}/›Dv4ʆÄÅúHít¢ãWt´¤¨F@Aƒ‹H»õ”zÕèUeñ›Ÿô¿4Ö°`#ùn¥*%•ŠU8Å¥MŒjéNé)#¶ä%Cl×ùŒ$ÍeÝÛ ´ÑbT§;¼Ooëû„wcÔ¿q0Á|ž%~±÷!{ÍÄ»ºLr-ÄìâÉMD:Î…°¼Sï7Ô¯!ùÙ©'R/¸‹ˆq)å$ØÌù¥+ˆQ„ eIô“%×v‹¢âÝ ¥çÒ6v—¯¦\F¡QPVb*Ç%ÏL¦‹ôsNC]}t»êmdª6²ÖBùÒíÙ¹•yN—[\®—Ä(½»÷®G¢{¡G¶¤Å2K'ý•ШÎAJA±öÆÄEª!Šè¸þŸìz!=_l­d[æê¯Ì¤DÝO£vâÊA @PP¡æ¥P¸Ì¶ç(ºŒâÑ$á÷Æ¢\R¦‘)ËY AVK­IökÕRFh‹) »ÊO»(FU"aFõ,Íl[5åNtÂß.±ƒ& ³›úù‹b²+ùrÚ?Z΄,Ã!N‚Òº‘J›n~ªŒ_/;Øü¬S k~ÕïŸyòF ”A ˦?4눃|¦1D¶]‚6±9ªQ(¹ï¬y )4J´šoG!jE¡‘‘‘LÆ`Õ£”%¨´Õišò±äk%‰=x²˜Eã¶_.òžÊCYÓsOGÞ§%*ÎbjEÃTˆ…TL£’ȶ)ek©È‹Ù[)·ÓŽ’%K¶[—j-Ï›J„vKnbiKº”\vJ§ºåK3e^b`ÒZs ~t´ÆüEÓv'ñ{5ê*;6Óh»÷) ä/mfº«!R:¸„9ºZ¿MAFu²\µ=;ÿ­ÿZÿ…º?Ýÿñïûgÿг®jݸÀ,ÿdÖ*è¨GY•ôµ÷®ûR’ºVm£)··´¸BÄvMöi>„8浉ª^Ò é%Ês:uIó1e¸veµWuGAò“˜™ æJIVev]¢5מ¬+(aÝ0RȨ"!ì•rqÂ%xVl¦;©wškñëB§oP˜MZ¿ÉÒ)&R">Œr¢¤ÇZmšÃ®;'z/‡k÷•½˜ªyã¡5uIÊ|Ê‘eVm²sPæ‰ÎTíä‰Ôã#¿¸[/cèR•ʦíãë(Äþ˨śO‡ÎJ±žŽën vÏ(F5ˆfn"yIAe£ \1†Km!ºý¹†Û}5“[3{¨^Ç©ö(GvúB–Ó,‰¾ítÝ3ŠŠøGTÚŽIμžÏl¨½Û¤-‹Òu T³³½Öû…9ÆÊ“¼Ìž*™Q ^g‘ó„W CJ¤M ÊÒm]0-e~é]Ò3f1ÇbkÿÙ.Ø"ÊfåYJòÿw[hF;:u')Òÿnjbê“ù–Æ¥­n-Kd J„2o$¢5¤Â”چ⺼¯bPŸdR•,·ÞW/â±ZOß4´¤Ž¹±LDj:a§;b› 1ÛYß“™UÍäQW‹m.á(´IÈJŠ´’ÿC¦~ˆ)ÿhB–Kš†ÕV&i*ô.d«J C„+3R2þÕf2RªS¨º(ÛÙä/RlêYűIV-GÍíé7Ô©ŒgÊùŠYh@Ä9 ÅtÓ"–›@¥Ó!Uˆ¨këLº®—¤ž&&¾)|Ï+9½2¶IWiÚ±1Ϊõ¸„]ìÃ{_›YZÄ.zV½0îY+æs ¤Sß)YÄÖäéEn'~\èªä-š¸I* (¥Oª *©èé5úÄ)ˆÖm¦.kµñu¶®ù:â:ḏ3S}…S§2`ôf*kaX¦Ü¥˜µôÊ\ZÓùè!pô‘ÔBÑN+®TÈéÕË ˆªŽÒU‹ˆu9ÐmŸèk]*ŒQM) ‘6/q}•Û•†d¦ üÔž¢¬ŠM½éˆgu”è*;>ËF1Gs‰%¾E9›{'B蕦S_µäc‹| ĺkÐçs&¯ "çÕh^`¡Waø›EWªJ¤J?þKb¢PA‚æK…Ó_îÇFšò1ªM€‡Bvt$„´BÏ"P¬ZšøLßïÙY6aã"èÔžU‘«K¬’ÿS©îýÌC~yT£~ÂñŸLþÑÒ†JÕrÆ!H9n†°åó ¢WÇâµT$žšMâuZM.HW%ˆt‘ Ï­«D¡Š®7§«ú 3ÅC:>¿šº}6*V¿¯¯%{¦S%1Ålº T±0)E"]v…Þ!ЬùîÝ5oREBñ,Æ›| D$ÈKJë²Ý…S(–ÞÅDê˜ÄÔì¥Q©ÊB5 !Ì勺㰬– WRgLÅ+MÂw½V½Ü¼}÷©´!)_VRÙTASfÐ¥;¸W9JêÙczÈJ5RA*KÈ”³ÚUÌ=÷Ê\#r„ùQHTW#wç%uB¼¢;¶’.ºa73Іã%LŽ~Cá{JfÌIMÕ]¢™v›vÁÕWÌ-JATž…aJVufâ«-Ö!VQ·P¢*¿OœÅÛÉ>ðçT®©$J⇧R\ŒE6!7˜ŽRbÓ9‡¹iŽ!ÈÆ|ZmåË#j_ËŠãP±(þÎÉ[+ˆíȺSmJB0DJ%Ñ(urX^¨¼¿"D'5÷Ê)[™°‰}—ݽ¦K•JKsŸgÞ¼ÆbÜž¬î&¯oõcŽ(‹VÌ*DayT¨äQ¯BýZˆ[. ZЗ}¦îÉÝ,Žî¯#DGÖ1;% ‚ŠSc±1éz¹ND;e Ø&7ˆéϽ”­÷S)«ÇÂ:ÜEâ~Ð^uDU+z*ІFíJ–åÙÔ;¤2šÈˆ…¯¥ÚR‰zзz3Wò|%RèUSmþaŽ •+ÊÌE¬‹9ÆÌf5U¯éÚ©‹›+7tÑ1.tFÃvçy£¬žPœQx©íêÆçc÷[u¯‹Aœ¥n9²´šè‡Tý[¾õbTøb,‚UÝÔÖR[Å©˜@…'™5 öF9_q«¬f²ò©9žen½õÉ)—Î9ÂÙ-K[2Y“—åNQDéøÙ" s–†>‹UB9ˆG_Aj»¸™é³;/Jîuè¢ãIÍHˆXFªÇ>ú³UGM‘L꣊ItvÔÚTÙ¤{+=R´Nþ¹*•äzY³²ëúçååBcZ´f‘–®œEª½Hz¼§j©RäQjžìDôò%ïóó‘¹6›'6õÛóµ±¹äZk8¬AÙê³GK¡¸ÿGþ9n”MI=lÝø^wBlÚ1q¸šdSs]X¹Ï†R‰ë1ÏœÖwDâԫ϶²6 dhÅ¡éÌLAozJÈS“=\¼Baš…¾ˆÎf»9Rëb”­J-®J.{]qÌhÇgª زé}8F²&å¯éjªÑÞBníø¥Ú•$RˆÉçßlëµ9Éb1hÍ‚bjf’šsZŸûTÕ¦þãÖ¾Â£Ý r•ueT¡¤IÕìeœ¬’¢ÆF7µ\^à”%L]<Îz·ÓNì_&ôC{–”BÅBu‰—î*H\…L½-&¸Šˆ{C+>ÊFSvqT˜hƒ«ï–¨¤ÊbqìIìä²ÑªÎKä!êF})J(‰ÝÎb#Qh¥n¾êµþº†gZnëø\¶ïóÒŠ`¨(êŽøèÎj—ˆ‘ ¾dœR·Š¸)ø›žÏLË! ÚJ0ZxžSKˆA‹t“6ŠF®TÊRÙôVÚõ ÈËÔ!„}¾ÿ<‰éAULžRÈNÛ×5¦MM®•¿q–¤®ÑÈå­vƒ®&ü£¡„ mH„ Ø™AÓißQ+ØFz[<¨ZeìžóRÒbè´3œŽÇbØŽ­ˆÅB'Æ;´„±VG—;bÒ„ÂwþdÇ®‰1[0¨Ô_Îܪ²º~aWZÚJí~3£sg™ x—ÊRR®(rv­ÌbO¦ªÎljҡѤÊå×&ÚuÖ†µ ‚3oyB±Ê}(‚ f¯ !ŒÉ÷3©^ã¢EÎê¤ùô2Ö¤n¸Y韦/&¢Ž¹*2"Óh§\‘HQ—^Òªûy¤(¿ÍÔZ ˆS²¿æ²íàÜhÿøÉˆÂˆŸL´ ÏþÏý—´#D2”lxëü€f„Ò *{9Í[ÔËG2õ=Ä£âhÔµuèßÕ¯IDò6© b˜¤UUà«ÈFE%ÆbW1V›­8ÁóÔ§—’²í ÿK+Êž®¦³V˜‚« Æ+™Ó¹Éc"q8ä¥qÅýÒ,•|‰-fs¯«c¥ ATa=«…+e=»ºiV‹õ]2±J¢— ]jq7ZĹrº”–îdÞ³JÕ¨üù¾‰Dï'á³–R#‘(RN¹é´…M(«f)K_ëÕ{÷Ö¦#Pîä$½Y,|Â‰Ž¦yu®²-X’–e.mLUçU‚bJ#-ër›)5 é¨NE“««}ë•n\ÊqÊIc5v”Y?Ëtê?ˆ1‚‘̱‚ÿÐC_ir³ö•ÑýêÄ»”qŠkZìä& ÊF$ûb"‘ùËNòð—š_¡™4¢äp«¦s2k§@𻄾7b%*Q(åå›åù‘Cv׋¥•GÌòP†(t¡G"ç•8¹¨ÏêØKò˜–E´²`e\¤ŽŸªb•8‚¼˜÷-œ:GäÍDQ-Ægb ®+wTa•d!Ib•T¿Õµs—9\uJ9æ¯Ò†¥–B}+–”³,«}Ä’VRR²„Í&f>Îö/¥jòT¾-dßÕ‹fœ´4‡*aŒTKv ]úfQ8ÇC+ù;‚tŠm4ä]Bs#©±¸†3]5ú¢pLONõ3©‘œæC5w÷ë5¢ý=•êV*g1…A‘•Š• !O1šI<Œ¥âH¦#:Ô›4‘µ®d¥|•¼¾ÌFÎhˆ3qÅ"b’›QÙˆÍ}£gª”Þ­B×d—2‰ks;Uˆ®Q™f@„¦Tf<œª†û²#&~bÊVÄ­¥V°ªÊþçÛ6‘*wK§¶¦Ñ¯ÚüJÙp—ñãssReGiÌ»^tù\QÈWdé *[Õ¦oã.ÔÒ˜Û—âãɸs‘;Qå’„+1j'©Ž!Xc‰AO,‚»Ò¨Eæ#Ì”oÄ.ËÿIúßåB-îCއ=«†®_ ?Ô‚Ž¦áME#ÙÛl.ñQ®œÏB/êˆFR S:ÛӬ͒ս9‰®úšîa]sU_+¡ežµGÞ]³„w9F\bâͱXká]ÓpÆ©GÔ¤É7­Ý¢§m»²ßÍ¢c!]˜¤Rˆƒ„ “y!%×âDõc­,•*öO¬öůÚGˆì#e!Ïb?í—V¸u»f’­]ÍW´å#‘„z*÷2EœDi|q’]ó»±-Q,Êo>ÞÛµë=¸«ÇË ææÜAîQÄ1ØZ/¦KµÎH‹:ÕRè”§_òM¥zŸ1-BÐPë—­—Ö‡AÙC+ézr1õ5ÞŠGôQ½ó1«\馩û VG¡…QЍ.2§Æ/+2êj#fy !U\bŠÕ!_¨.—ùKµ)—^ÊåBˆòÏ~µËÚyOÕ…jФ/ÔŒ×r#1â!7fMz੊"3ò™91I!´õÓu¯ú‹)1)J%avöðYŒ•7åttâ[x¥•»û’ï ˆÊQØ"k?o÷% :Š´RgÙw¥‘ÖÆâ*™Öúm$™²m4Èeª9\ì)NÈR¿›Ó’¥ôj²¥¤7îS©b«KÙ$¼`Èy¼ØîΗuâÆ*4’†9+TÇ{³R©º’œ(˜Söeaí´öhj4IV v l ˆ~áÀQsAKPA]+ìÂîìêô‘Ñè”Á3Çï{ÿQ!F8‡Éa`CŠ! ƈHGaÅp•Pr4&b˜™™< q9Ë*OŒÁ#fU hèAH#DânÙòCf`‚(­QœmJIËUc™Œ^ôS)„F2‡‰ÕÏ6á° ÔGä [=ÊEnÈ‚1ðHfAU(އˆ£u4I— ˜Ç3Œ†iô(RÚôî4(á; V ”fz_¡9Hc¤ g˜ôwHVÍJâJX Ø9}LStAGjÁ Pr‡ÄSì\{I¶.ºLÛ“ œÞõ©:è6cª/0H2¦/Å8õR›‰!@JÃrDp¦ªÁÞ<1ËðÌΕªíÿÔ„u6BˆBd21DË™{ƒ‹Ccw"Vûdóã³’©ª¤À”†‘³@†ŽX+9ŽEƸC ©š&¬"YP…~£e7΃ˆª‚“c!ݸf=¶VLlC=øìŒS ;bˆ "ó³qŠÃRtâW;tZr6“n`­Æ38ŠGH£9 ìãajðÅ¥j1Ä©ÓÛ—xÁÄ+7N!ÏÅLe#t…°‚.æ¶îŠŠæJÔˆQ·-í™™wß6B-CÕqe{D™Lè… àvÆHÝPVNÔZ®¸¡|!X˜bjÆ7Á8tt!ò’3ÚüÐÖ=C Wg$‘ð„#nl\£tÂâð˜0¼1$ƒx1R(ÄšÍØbÇݵQ*ÆGÐÅAÍlzÚˆýs‰z4Š&Ò‰IÅÄgÒ¹ ”_–°c¡¨BAçBR/dbÝñ0FÝÄ7Š,+c7ccP(Å ^"ç † PÊÒjFîÕ!ïôÙ†&s ²×ájê•Ú†|C …6V!'JPAS“äÏà¤&eÇ ”"Æ!e+ ‡'¬–™½d7‘¡ÅM E é8˜ÐGˆÅSµÌ1ƒLøØ»¡ÒР(0N"Ž'N¤Ìå)ÃpÄBB8ħAyT1:Â6:Œéßóõ÷ø§ûýþg5¿¤6„3}±‡ü`ÉP Æ:‡µ(>6$:œA BÆ A&“CÖ~GB‚"ˆÞ:ª…(×EŽÛZqDüC¸„õ3ʄƠŠJ uÁ†…‘ X*¥$P»­1AâAœáET? ¨S cDfêE2 C1%¿$Ì”,|lL|Ø]y4çSlfñ‘Ù‰Rj ÎCr(’„W_L‡-s,”ÀƒBŒÉ±ÎH!£) ÔЦ¡jrX)ñ !x  BvÈÅ”!Bhà… Z¤ OÇbõS3!”+ä¿-û2ÃPÈC@g#wd;ƒMÝÇk;Cæ+·L†S)qa„3¢ãCZÇÁ©°ÎÂr J0bº¦˜¥T: Gdc0ÌRŽ#–iІ%—‡¥0¥¡!ØâbB¨ BhãurÁA¨dh¨„=ƒŒƒÁÊðB3:äÑNbâ.“ T¸„àB Èae/N˜"ÀO ê®C‘HR+N‚º/dr¨C`Î@[™ Èp@€Íˆ¥^à¥2Å„äîùf¸¦(Ì_>„¦IÓŸŒÆQ„23–-x>ãHæ‚+× 3e@a±u aÕä2uX¬ÅÓ²º2§SOè´¡({F0cŠ ÈÅB£vΦ&*(=u„,1ÍàÊå!§9ˆDî+òÔ!2£FE±KE¢I”E¬+2„G)l+†Ä ‚ aŽØ¤„.Þ Œ‚;h•‡sç¾bùP…"×ÔcPÏÊã†F¸‚¸¬q(¼êlE„B±ÁaÈM6 ¸ÈXœlŒ%!ã¢X]¥[/ðÍ]òÅf"]}œŠâ „ë Çõ, Aþ:ŽÜ &5\î¶Ó„A‘ÏBŠAMP6! U.2œ”„¼xߊ''³U A\ FD2Ȉd21!@õ ŠÀô†z¸# ÏEVCR¬bBwÖ³t@„dC³¬AÂ>HSÝÔã–ÓÞE¥­ì’Z«Ù¸ÄOœ:ÂcaÚ°˜ˆ]ãˆ@”…êLÆcQx¨6á”Ä÷D AÌQ‹TáŒÁ†P`Pµ ž8i-±Í^Fçq]*‰Ul:.36¾cu=I†¥ÍôÁ)°\¶aö„1ý_Ó“‘d#¤ŠKB¨C±†=4‚Q7؇Cãça>µf‘ÊFUI¶žE‘ˆ9x»žBp† g¯È)Iuì¿ò;b_P”•,´Þ7ÐM; ÂU?‰2LµmÕÕ¥sµ¶´5ɶ®?¨’Hq.‘p‹þC7ðF­œ>aÈe¼¨ü¸k³Vˆ²NZ²Õ¯°Š¯ï™'¿PqÑÊë¦G"L¨L2¦•»Û“ðRkæÕÛW# ©¦ºå_&kiõªâ4¦F±^­…L ²~T:W´ÎsçPÃídió„ ­-4gA¨ÅL%µDs ¢žªd+w¨‡%·.ìþˆJ˜… º½E6Ò+•פäí¡l÷Ë?šqù¨­¦»3ígéµ4¡\Ï$õDÌq’ÆMpçBŒºâfUŽÌõ2)5šÉù-¿G±'*U;Uysÿ*œG®ÝUÖB˜ªeЃâ8¢m5“;q\y=‹q$±&yz5-×”í¯Tò’¯UtEÎFO¥ŠˆÌÜ5ìVb©Ì†m‰·Ã„ˆ1˲þw¼µ”Ž;nß1¤£ÿ¬”µ¥s …к©¾ƒ9':Ýd2\ɼüLjLŽ0ÜY’ª_õön~¥}ÇL<™ Õ6;«™±È"s·îÊOO>e…Š ¤L¾»{¼s!ßû,‚Xì·ÀêWRú\KÉÄ©æNzc#7##ÙîRræ:î&s“M¶TÊÔšt”ŸØGî^¡IºšÂq(¢)þ*ðbi÷žÞ&ÈIÐOØ1„ aLëzg£2 ¬R¦è--`‘ÕÀȸù{”A01ðø` Þ^1‚ !ƒ‘EÆ WÜvB.èr©fBá`áhËIaÉrÔFU2 ¨èÄJª3iÎDL&r‰±ªBƒ™TêFàKc%A‘m €†oUΊ A Z*0€‚^WC(ÅS·ƒÅ”¯zðÅy|BP™¦.4@f4eò *JMÓ¯BÓ‘Ðô@UQâ‹TOu(C vÈÇ!° ªP%JÌ!!6—·3²< 8Ë¥ð®5Bj+q‹Y_je,)b.†ÆJ>W— ¥¶‘X4 CDyn!Q†0J U„@JVª0£z0‚ÜŽG¸©úHÕŠX5Ãq`J­*w Ï•Æ\FRƒ‡îYh:,£ @dRÿ™FÑ€H]€Ø`ðqH”ÙÂA^ÿDÚùj÷4p•JH$Ï $Ee3Âçf€ä¤q)7$Q<™¸@ÔH;¼xÙyEg DV¬OQÅÌ¡ŠFnC±z1AŠEí̈ cÄA´:…O=; Á Ðù²±\,)h±PHFFˆõ˜e2 A=aFa!‘›¨‡[H#£—”Vv‡â51T©Õ;0Š˜&Ü0Zé׃pI^]£â„0ƒ}¯ø¦xË81PR/ ¡ZŽµÞ’ëLD"×~ALË(:0ACpˆæ@oMºSˆA<×|‡qiJw'(¬X ò/Œ¸™ÉP*A˜a͇%´J/êé ,W&ªŒT0D±ÍÈ¿ˆ* ¢»æ6-)ŸTc|b”×…AD3˜ccD*‘—"ÈÁ©PZhé‹„ÐTcM ¥ ÏJ 4/ °ÈÀ”ÄË*aC•ÐO1Ćt%,UPðpɩà ÄW!Æ#‘qrdŤ@ŸÐ4*WŠ~d ‡üt`øQÖͨˆGtæÜÊÑ âOêW'@dL)OTv)9ŒPØ ÍÐ\_"Åš ‚‚R0æA JE#'GêM¾*Zñ\4eE 0CP#G -ŸͼL)j€tÿøÉˆÂ‰˜N•îþþÿ0ýÏüþ³’õ©¥%w ÑyÀ†g~‘¼Z¶“t¦!œÂ6ÿ¢¯6{Xj)SzW«r5[ÝI •|ºÙFV#组yDÂPºWâÓ‡äõ8Zµ”þ§j†[´G>…¸H“l ®\ô©… s;–Ñql!‚’\½_ðÊEìÆ7’¸.•?oTDR¶…Þ÷1°·;)Ü*§åø”g$—M9#™ÂŠ ¤Ú0b?t•è•–7 8`2:ggækåß‚åä/æy³ü†4§_:8„¢Îîèf§Š´/‘#zëQ®¤"#˜Ú‰ù'Ÿ¥U”`ã—:¡µÒßÍi`Ùt Ô@¥rŽs9&1 ÆüR”rjWøD¤œÜë!?Ë”åÔ&à™\Úy,!ÅÂ…d£Ó†ëT •ˆèwvÌ”Rq?oJßëDu#•ec¨º³#×’\ÊÑ´$-px©”¥p‹¡šD±ÌTAÄ)x§µ˜äĵMïkš©Eý‰n9ж0@cÆŸâ’y†‚O[…mCЄè1Ø­1ºÔ×ÙÔÕµTÜ½í»“Õv3âOÝã“›‘K¼ÍŽcÁA; Òù×ÄöU‘íÌ1 @!Nõ¨ö¨|’~m‚³©ÕõntÉ1·3+£]º˜äW8®“ÈR•f3½Fd.Ý]bí´¥¢qUÝÉKZy¡" ü0$JJ ¬äZßBĉs 告`¢è«IJpaH@™tºŽ´Ò·ËBÒ…é"l¦$õZ F‘­OhÒ ´w „s¢MJ÷° ….L±ÓéÇh¹im,ƒ÷2TŸ)XB5ȸš•Nq1« l#ÜôjSd¶¡‘E³PAá Æy^‡9E8pÈ®´&Bg—ÊT-bÞ—tµ¢¬V‘k¯}‰ZUH¯ç1J8D)âê`D¨[ȶKL|„䬂]ù¥ˆ-’J’Aq({Y读HéÎ ¦95?³k#5:ìøZF¡f  áv`á:•hl>1^æ{‘O{¬%ª{}Ü÷£yf«X· dÎZ ÇF1B5$>dRa«.Pʨ †óN~zO¢:È0rô]fòY»äÓåý’ÿâ1¢)IâµÑ¢’@¡ÇhzÎçF±ßÔÞnÚÒÏóIÙSOu¨M» öã&tª—t#Ô`gu½I%òò.‘nÃìMm½w+6žeéVÆ!¾g ù„MVêÒÒ­j¶MzžA¿úžy’)S„£VŒ8Œ!ÎR*9ç[• âîyù=&[W!bp -HW±m+r)/×ñz±2ÂŽ*Ä@ŽÅ• á×´K= ´o/ßëÏF¹Í8¢mU1ƒ÷ʤì×79ÄITþ%Üíï-X×>%We-…ŠA((‘myÇ?6Ü]z㲕­«©|Â’H/pÞ%×zJ|¸8œE(#«<Îå)Ç?”º&™ -Þ[Ef!‡“©zÃ-ˆSåªëä!ÔÿäÃä“Q”š²Š,…ñ Q=20;…›C¦Ó6ž¨¹k0÷'PjMÇ©½T^eE'·\Õtz•Dhâ1ß<_ëG†RH…¡¥sˆ&ZÕxl'5B±S¦UwW|µ~›Z¯•Ê@¸78ôtJ/7æ«$‡Ít¼CÎvŽSÕuŠv,(”,žõÉëNpDw纟#ÓèJ\´&£š}Lf™§#¨âqÌ1Iþ´~!;·´Û«¥ÒX¿´õ{1îzÕÜE¬C¹Ÿ)„eeyуßywt‰EŹàB…4? êÂÕT´Æ7·Þˆ»%”ÿèô¯ü«‰‰E&©î框O!™uTì —[Ê]õò”²èl·ÎîÎp3ž.ÅRæ d¦l¬ñ²Óœ}Kâ¦UŽyc)‚†<“iÝwB—6ȯH¤ì7 ¶ß­j»m\gÞu ²7µÝNŽëÇõîYLFTÖ~1ÊAE6f!èlÌ5[â-ÒîÁžKÔç%E¤¤²íQ’˜âÉè+r¥Ïˆ$$éʶb´Éc±ÉžsNæ¨ÕÅy­˜Rˆ¤æTK?djgáys‡ÇufˆŠs+ B +!ÏþYoF¹Å¡º‚I¡.†%Ýç£ÓJÌŸWaÏ1þkŠr'¿Ù?ï„ï_CS%ÎÅ á8V¡Ä Š-ˆœD,£ãÍWUè_údÖwÿ'©r˜uÙÎrEW;±ŒD9(ÃacòQ>G‘D½í*ŠG«Šè…ÉK¨Y’±M@Ý)'µìã!µUC„abV-Êëˆw§7‘覧š¤ùõ‚çÑÊZæb±¡W™)‚¸âÞ‘(dˆÒ:unæ;˜R­8™ÆÒ o² \îO|#Q×IȈæóbîõýòs뤋ô¦UJ5Þæâ¤gU4S(EªOsâku*ä°„ª+—ZŒ‡Å—g¨˜§«úaQ좪Ð@V À„Ax!„ÂJäëi+UïܯßðÉ›æª7àÙgº ­–y™ìŸÆ0Vq;â½é_r¶ºË:yÊc”Î6qYDU”ÚDá±Rƈ‚jÂW[Sw©\“u®þ’“x­#¸Ì²¡ˆÎDò¡0ÖI š§ä,[×dr£ ….›nkhfÔdÓi+y´â¢²ëœºË2³\#˜e“‰rõ ÅTïÑâI›Lý«öåU­TÝÊÊÔb˜Ã¤™6çd\² $ï¥y c#fr¾ãüšh¯T¨¤#-[P²RñKAhév´„êþrl¥ó©NæÚÏ*Ф+"‘Æa *Ò6#-0ŦQH­ß¢6<‚è’ZµTê’Fײַ0‡Ç9K¥™å7ÔÎjÓZÙ%ÈoJT]7ejGNFs&H]Ä â*ý*£·ðßÍsS !Uñäɪó+-XwlÉÊú‰Ù‰Çí;Q×´~í©?$³·'YW5ˆ3B*]*®9 ¾ŠÈ†J—Z-»ˆ¸ÄܧÝ^ñnF2’‡³i"Ko ‘c%“"§­ÉÞGˆóšË˨&³YelByô¦Í5E ´BÕªÅÕ­hŠ;ŽË8Ü^ò?ÜŒõA›©9"ˆÙV6«Ie0BÑÂ»Ž‹$i›;žæÉ íÅ NN1(Ó’„yZ¥ñéµ¼•G}*­“â DÎÉ,L™$&“©«ˆÇªÕ›ÙÒÛ& MÍtýQ,¸9®B†qÈ0Ë•´R ›)MÔáF®>ð¾ß_IÇÖ”ýtœÕ-ŒÎ†4Ž€®9ŽC¶.=lR7žVûD2i–ª¶n™%V9fJ;T…¢,¯&¿ÃßÖ¯åï›öµûý¢~ô-7§Rüág÷A”Pç:‡¢«mÈ`@ÌŽR¼Æ@€œfÄ Á— ®ATÍóƪo~H§=LBç’PÆNaïî€SvkBÈ+¹oóðHë” A‚X¥7ž$DŠŽlNW;7sœC’˜.æ:ìlJ¥ ¹Â! L5\Qa NÅçoBj7F@ÆdÔïÖT/r™° ÃJç8íø\áb6A*ôDD9(¹}Â&.$ hìÐB_†Œiï=<Óáʴ΂„vÅaXÊÂ%1ð«ô 1 Oœ:½Zã@ˆ]ÅgÎUŽ×&Ä#Pƒ ŸŒ‘Y…¢)—ò¢(–cc)»# 1§`•q*•J2â$ô×ðV0oJàªc]b¸B*ºÓÑÂ0Ì:1D! ¢CdmÐ:â\EJ¼ ºPš¦R‡(„Æf¹1ª;Ž' ÀJF‚Šü@¤Bî@º˜$ˆ@A ÔDTqPølgR0@jä[ÙÄpG 1pQr”n•É‘p¤S /­ hƒˆ\È$Ajˆ!.œ`äS*ߨáÁɬAa=­²´­ÈCŒtã`6 3Sâ}Û¥òÕSÏ®b剾3ŠävL²‰)ÊC™è{f:é+¤¥ Yec­œÒ(•ÚQº²ŽAQŒ¤FCäe™©%Šj¥,‡*rX™”§R™zŠS‹!Q L¶±lBmŒOTók¯êBÚ”!Å>ÈF}g±„!¹*Å¡dä+³=Ï¿!Ÿ›œ‚u±qö?©$¹{B«HI¸Â‘5.!I¤ÊŠ3?1é.{$­élCRj©Þôe¥¬½¸C„FÂФe·•ÙÄ~ìÓ’GMY;×¼SC®.bÈ[Qe"¶p£'æ0WJO¶Í=r¬S(_{'(ljJÜÁqÒ‚çYí*\ôäTÙ%©ª^©©%?œ®žQ½ºa¢%¸Ì–ZœŒQ¬qø¼m J3•kZÙÕPø‹tɶ¨äaXG-xHæU÷s‘d7â=HJ Ó#»þ_¡)‰QSŽã£^W!{”ìeäo§QŒó½S«i'ú¬¦µü& "œv©Sœ²HWR®²“’¥6t’'5q2¢õ$Á ÔÅä/U ¥}ˆw:‰Wç_*9ÌW^!ˆ”Bâé••ç_–i5„ÁR5éb”Jîq™YõFäëî5ˆLkg¶[×pÏL½’(«å®˜U‰•#! B #&Ï•×ã êÇH¸{QªLz™d®i‚g$EsŒU±„ª'UL“;—FãEé5WV!æçŸ%¥Ò¥ËåR›W§¦> #(„浞¹ÎÄtie³TÙ>x­ÝVßÏË‹˜3Uó”„ý¥äE2Ѝ2þÔsJ.“ä?¥‰ÒfŒU®±ÆÉYÜò´ã«;‹“jÕRªv/î’ŠÉÝ›_ƺQH«ÒvîK‡%„J>32Ìžryq%Õ®öãW/R:%²^Þ°„"Ù…u"òŠ ÌËÆ8ˆ¨)Ñè¥-ÍU) ñu‰ªÜ”%:ƒ ©µÓÑ]Jò”ß«(ÿøÉˆÂŠ‘Ne…qC #[³’5éoºs0ºû؆zl ®sVäoí”·FA b«1 !#Ú_SŠj A¥Ì'sÈ’®âo-pæÕ©1Üb(D’zdŽ\ÿŠÑŽ8w+ s2w.yÿŽ^ñ¨ÙŽªÊÙ˜­y)gKîü¿‚ó¨¨A”W CeeöuijÞÛç9ÔB–a_’Ds{å;D)½((ꮳI‚t’[ÞÍiITÚè…Îò¦ ¥(«A?ó—ïäM+½ c²ØË#¾åa Y)T¶Í3»z åÇWÕ¦®Ð£Rµ±äR‚2\QFb(ŠL±YÓ¨[sÛ‰KþÞ´‘ ?n™ZÔF¥b&gx” ƒªßo-8Ï/é‰qRäaU½É;däfê UÜ{:7O›ˆ]ÏQ-Oú-rÙÚ’ÝÖê+¹GL¨GÄ^F0¥Ò*|Û¬¬K ªmÊ­w’ŽKш+¢QÕ'´Me-,¤J¤p§)RìgÚ*XOBÌ/&£³RÍÆ,„¢ÑèŸkq:¯*udá¾Ö [â˜‹Šªçsd¼¥ÕÙU!ÎRÙBƒ–KL`«%‹i-;œœáY”ê‹[’^52-KøŸa4”3{pª1$_z÷6¦a yŸÑfJ–ÂBJAˆï&k½§…¸œsQ=²ÉzO¥jMì—å0A\UAGöiØG­_zM|¯T'²÷±s¿I›×[!2²F3•„H¬".œ¡RÙk_óß6íÏÓšVažïΗ;29µqåz"•ñÔmÕŬ”¾µw÷I_½Õ'I®–giNp‹ÄCo$¤ó³7zØ¥vá²z †®+D#z¾!G¶“ɽ¶:TV áG#ˆ—fÿ^cÔô§ \Z·±Ê¾y](žôâõ?Y›²´¿¹8F^8Ç>nd¯zõ,K)4†Z5TA„ÁÁÝ'½‹Éª•àÆ”œ:3S BsïaÇ·[i»ï¹wslâ˜Däz­ Íâ!™jçô«GŽã#MY£_)ˆ_O6Ìüë:³f X”ú1¥ÖªU,”!ï3H„KYÛ L1+’jSò#‘i& ¢6ÿ#ŸýN…N㣠8Îþ‰F¿O_Jݰ˜ŽÊu‘ýÏDȲºDMÖcÜ·r]ð…ÞÔ·íkÿØÿ×í/H4·k¢ªÌæÆ:î©êè"!sùsÅ)Hb!úŠšÓøbм*~ñºÓ]¯Ù£#8F8rŒ1RG™X«ÍõÃÿD¦-Q}΄ñTÆ'=)ßÝ;{Û-Òûír(ˆîâ‡kµí‘'¡´¾ëâ>ªå8#e˜öÆSovÔ®«*9±H”©r¤»Ú›N-ߊ‰jŒ3”þ˘È#xÌBç·„bd”%ªÃC (ˆõª"µß;»ÕÛ¬”6è’ÓCV*%£J’¡ŠaX*XŠWÝŠ!yt™ô¸—S³[¤ÔÊ%q|¥¬žœ¨EÛ *p¡ŠïáN)¬ÂàJ}*o"?¢ŠúTtÎ2U9ÃN%Rªó$‰¾mO³1SˆˆÃµB«v¤ùøÏ®Èž.â-rŸ| ô¦i “>¤Dv_T+½_òŒV9r’¬g"RL—ò—fÝe2\¾©PÒϦ"Z2LYEbŽõ*Ä\bjmþ…êýVRëõZ*k¢lš‰eL³èOB˜™Õ]ÁYn³J¾ùEr &ɪµ%)FÅY‡Ã„Þ×™¾¨ù¹«¬„ÕѤ7yp¢ó|¡(|jì©‹øŠL „£³TìîÈI¡«;)¢d¬ºDŠe‘¤qìEÚÔ¢Y(ªÛwÆ3 ƒÆ„³‚á sUŽs:_,vÔw6¤¸~"áqŒlRâ›V¾ÙSÓ›mÍŒRqHÅ;LµL%ÍG5<•o’#Õ–)x¯éœFoÅ9hƒ ‚äJs1[éúÜ¥G)¬^ýûóþ‰ÂÓóΊNÕžéÅf™µ½Ä2Ü‚%èӎزãI…Ó*ñ.S±‰èôëÖ#Þù²=’AÐbîÓ˜†ôí¶e7…õ%IÅ¢±(]!¼ÄijÛ®ªôUë¦+4íÄÑB3|™IkG0jl‹ë‘âœk;7k”²/]HŒšZ>ˆ^ö.¥y·«âk“mÅÇ0r çb ƒ³¾ ,´Ê¡½¼«„±ŒfQKÉ„DF=—%})W‰r³¯ÐZÅ­ˆ«¡]H-”Ä]R]âi4*DVßß^‘؉Þz·ôüœl_©Ý¹z­¸œbQ.tˆB¦ÒE²âú*ïF¡Xþž/[¬g%’åÎbíªL®ª2U•Õpš\éiÖ¡û¿Þ¤R-‘Ñ?ï0¨þJ'¦*eŠ){±?ë¼¾u~(â?k:I}8––å«4AÄ¥ÁÓ©y•Û‘©Ý'—ÚÜ¢¼›z2ÓdWr«û;·=˜‰“Bñˆ ÞF)Ö„~¥o'èQm%&?šsR:ÈMTVV©trӹм~)å~!Rµú[ÉGóÑ£ú©8é#Ðúr}M" F°¥#}W'L#•–œ_2Éê'>ÑòÔÔ/Ÿ„EÒ胗×jvrÅC„5/?Š+;ŒäÝKZÞúüOA ÜüÑ9šQœ­áOóª œAÄù¼Ì¼.å E—/UÊFï×#&Ñx]!ÊPÄ A…ÂP5õ,µf±C@âœC˜N3ÉH`ÁËL`@@ׯ„ h+0`@ÔÇhB¸Gã: 0sÓB ¯`¥cŒx(AQÊQ4Ʊ–®@F¤1PÙËÅB‡®fÆŽ+&ª€*:)âæˆ|‚Œ ÐÐÑ‚ºÊ nAh‡óŽAÓ¤\£† Dz ™ƒ&š¨ÂÀÄCÝ”{Óÿu5ðøPs/aj.®Î&¨*˜L ‚43Z¼L00Èʈ_ó"ÐXùˆug¢ì(êÈÁˆâ•a²iœsa¬ Š5@©ˆ£ ›B²°øå0¤aU†ŸŠ#SÔ¨n@éCR;„FG]Ú ¡Ã‡+R. Š8ák$ÈôÔBa™+(Ì@0—²V„!Þ9C ¥hÂR ¿°T9`ÂP˜p9 ùA ¨œF$™"7q/¹7b¨vQHæ¸Í¹ß V¼@"Aé&p¢­„ŒÇAxP{æC‹NòvÅ7(Õ„ü&àÅhU „Sˆ®û3^¥±OT§›ž´ A”¿ºÂ´Œ¤ ¤Ì‡&ÌT°2â(pŽtƒ•;¦\a$ ª“viŠÄH%¤1i§BàR†0¾ Š4ç|ä‡r Ø´~ÀÁ4£"‰•‚ó@"h¡ PE8°ä\'¥`ÅH¢²‚ì~j VQN6&Ñ”M ï)ƒ°š1—}ë"³RŽCljè¸[A®˜ã AT‚V 9ØâLá]ÆàÀC±ED!t!a‘0œ%MWœ¹“• ds :éê]èኗ¨tfbB²¨ñDá$b-èEB!Dè„2Ã;8aÇ‘B7˜$Æ2úÌFÔ§åAÆETÿØL\8·ÒHÑ Ál„aˆfìsŸÒAÄ#äÞöŒ*)dLŒCf,ü|ø0æ! ‹jä ’ ¼TeÁ+(æÛˆ¨û ”gÒ±í“ ÈÆÎôM‰$-A†(f?XR)„ŽWp_H!„!ÙÒv:­A"² „¯¢£(Õ!™0¥*©*kœU æ.ØÄòAɘB%EeO(É™€Š„êØÔ‘^~A0NrCtÕb ˆÙKŒSAø#Œ"å9p^ªãJ!¼ B…ÜÄ Œ.PÖª.,\1© KÒ;~Â8¨" žÁÙ‰/ï>²ï¡F+D±æ¸a‚1š>"‘(‘C eóûFsq{í±¯¤h$L _«5kŽº'ÆV0AD«J(—© R9š§+„V#Æâ— †É-GÈU2ó@½@­Peë+Òb“uᛚ ‹„Æ:Ý€ØÃ œD* Uá ¹K!I“vTN´}y"™Œ Úì“DeQ¾–K¥¹B¸É“ºÁPlå!±˜Ÿt7%v$0aŽÖ%Ø{™D•ÜúbL®­A gêŽ hÃ) g^C¦6/1A1Ò਋SU¬¸¦¡‚! g„%2ò„t7CÆ»ÿÈuå$º9Õ)±5U·˜@…˜h”Ù;Ã/ARŠ"¸CÕ«»3ýë_”Ä0Ì‹5ÀnC`ªá ÐÅ9ÕÊv BwK!~á¶`#’(Š?‰1(ÂT`RŸÏǯXIVV/WH£¯™…Èb°`ÈlF¦HN¦éÉ© ‚eʳ„#‰¨)†F~<¼4 †µÆ¢f5¬1X×!n9qÃ]˜`¢À¡ÞÀ† üQ•L6 ʧnFÌ…ÊŽˆ&!™ñXG™ˆ¬¢î"#&(‘F®3(hHÌbvˆFëë™u膋&ÃâÎly¶qßã.¦"Ü"LèA JÈôx(Ô‹ðp:" +élòULÊ5@†dAB*!CuP¤M‡AJ_jv-)ãb˜d`eBr@“!‹œpÐ `ÉýÏŠZDÝçdttC2Š@" hbeô0hQzá;(ÏÈîJÌãژȂ*SaZ¹Æˆ‚„!(bªÇC !†¦úd…M[ƒ˜¡lzޤ?2•Æ B§'#D‚b|ב›âÒ7ÄõÊ;žö¦ à¥S˜™c ùRoTã|BX™k|W‰ ê$¬”œÄFZ-ˆA„#‰ª=,ðØ‹¿¤ ÄVV´´ô áãŽÈ€˜  yc°ŒÄ@°Ø`“- I•¡D ®¡â˜Qp^øê´O«‘p†L6 " yd ~¦´!J'a_(NZÐîD_Q ÌEaÇ1(@`!†¨ô\ T²,Èx]j™ÛF3„+D8e„%2@c>x -5«[)’¾¥ŠÐ›\Qå)Â@Úü£ldáІ Q 7JÈ'Žã¨2÷/®9c`ÀRŠU8`dÁ«ÔÈDÊA)//¾HôZw&ìBi”Ð¥‚0jJGRÌ3"ãÓ K\‰Š0¾›iB¢;s! F¥@ìóX”Ž”sb(«U„ ɱïÈ`ˆ!ˆ=Ü ¢3(Ĩ¤Åb} ‰¤],9Ü ¤ ¤PC ‡t¨c5Œ©Zàj JÄÅ1 C‰‚eQK«±K¶€pÿøÉ¨Â‹ÕLÿFl˜L æ  ´"Ü9®ÿ³ìØÚ|ègýÑhûÆÅX†•.äb…/é…í•8âãîèéÕ¡¥¼MIÑód1 ¾Ý5ÒŠ¤ß¡3ê©_O©’ª_òáäݱˆê?b6â±IªŽ_³ ÆgT£ÈØü—‰]$¡TØÔ¬é\Ÿé/õUßÇS‘Sq÷®BòÎ1Ù†âþò³q)eåRˆÈòæn†ýPŽºÞM3ŽáP JòZu=<ÅC»‰ÕF%?›¤²hÒ8‡AZSa SRô ÍÏs})Ôzþ9›eËT‚{PëΆ‘;Ì‚% ^ç[9‡w‘hdĵ~ÏbqLR0¤(â-x½ùÎgæ*gÙkE2­(™ìîœ×C༈Nãw[†1DS7K:¤ì6W_Ì#¦QdRi ´YÊ$¹jDqs ¹6D3a'¨[× ¸Ÿ¢!–TH¨µ¥‹µu»¯WZ£Í”LZnûÒ²HŽCUu÷_P–MT³z±T¤FLèúJ·?7”!Žr¦ñyUvkIyéA Þ±Rz¥*-±HE8c±eTRéÞ¸Z$šüb/­6M/Ô|<†t¯îÌr˜‚‡}>Îò’køJ Ž)×­É#&¯5>%·³‘ÌB΂ÇZŒR:y„MÝvñ.ù‰múMµÿ$†ý[§£h»d¥ ×QH¦T£¼¤)2µž^Ë™¯®a1«åöݪhâû=•¨œBæ'¯•µÐ­UÆb–•Ö¡gÁæ&ÔKQTeû­Žj55\º& RP‹1h®íc¯–™É¾S™LtE’bª~ßiz)hò˜Á¨ÐC±ëpFrXž‘Q Míhð\¢ž¹Ã 5¥\9*EhâB`Ž6b"˜i:¥ëØJ Pa±È@˜¡OG ÈBSh„¦š #„FbKŠäH- ¿ü!ÎEÃ;‰‰”,zìÿ*vunfÀÆC4¥á.ⳳƆ8AÄAD\)V©²‘¡ !"Ãpãæ.`;s‹[Ó¸æ:"ÍQ2d µXØ&CF xG Òw= ûáÜäT †î‹kb"Æ(ɘœÜvXaL$*ŒôC.•K åÆ: )ƒ)Œ¨Er4Œ¹2‚Æb±¾'Ùã‘(Ô‚0ä|#‘£ŠÌ|(Þ™AœhE1r(!L D¥H#Ê2iEŠÄ*ò Q(H¯”¯ Ä“9¹Æ(Äb g1ŠcÓØ¡©š<6£.½Î¢Ÿ2¶#îCTÌâ#’¬ØGÚ €®2¤4–”Ž3¯]™ÚŠ0T™M‚j2ܬíiFÄ+4LíÖ‹ß½6·Ób$38Dt¡dˆÒH¢OÕàV>|AH8pN”!RàŠ™æVá _o„…b²CUg+ZGFG‹ ™¸ AXîv$2²›³šôjÅ3øR"ÃÖfäO´RBÌ¢bì8†pNÖ 2…qDdaDj1ÃV=7Ø~s+ÓH°@„Ä#RLtfBå8MsrwX¢„,Ä…µÙ\Á®„Á‹ˆLÌÌÏ,+!ŠdÓ'% ŒMDŽ AZBˆ^ ¸„Q ¬ˆAÁ¸ÅtmŠÂ/ÈX>œ‚1HÔ£)‘¬ÜQÂŒ¦…f"& ”–+gC³oTÈÁFHŽN£úiÌ!á8E¦Ì´¤á¡âJȤ2õꇡ/.‘‡'Il!®Å#{Ô†Æuž02׈FÅ\G&ˆ½“–¶1 Šˆ@k†^¢±fƒ}ɹ°˜±†b×f¤½㪮loÉvtÄåbêÀÎÈÜ êU)¦¸Bd°D%êQXˆläøb Õ²› erWJ1D§Ï©•A5ø)2§: J*pMMJ!ÓÀ0Ê(E:é…Ç´‹‡æ”Û°ÔÛ=™bÑG²»8þŒ¥)= ‚½qœÅ¨jL4#•?ä='¥`ºâ‚™0¢MhƒM±Ø~NNJ­ûtuj®Fc AOšÔ ôÊÙíOâqNÁT©†q#÷X’¥ÌªòŒ1Ì9r¹J®Lu ÕäcDnjZ,²O³†²IP‚‹”6àXÓKE¢öhB‘E w{¬TAÊžùM³NI“ý„%ÖD¢‘S]ÓûHÔ:-S¸kܾ±W´c!ž®¥G«Uüú5WHG0È\–ZÒbÃ]Tæ×p§B!+±2ÝJVÍ:¾QL¾ŠM¼™@ …/o^$mAEz¾é^´Rº5uN[,£Ž2kµÙ‡¼ô¢îöAúýÓÛB^5À¡N…Xq ˳@šQ‰lXȦ¦bD•.k.·[ŠÛ¦ÔÿEeb­‹äÝYP…AÍF®»î ¾äõ¿%FäD¥è‚:ÅEÅ(Âw„´“_­­Rbã©ë¤+kõk-è9ÊœA1y1ˆ÷ð´—4XA2HèRL·0Å$ôv3ú¢pI$ŸI&H@AKˆ¾¥ö¯ÁiœRE›yXà á\b  #˜Nr˜‡ûÙ1)kÿùhô~vóW2¸CåSZ©]·(Þ–"s—>Ïiö¡”ã{Ī@áæÚxÕ·¹EK~Ü™,¨Dõü)uOg«Õwr=;õ‡û&ý¾~ë¿vÿºO܇îvÐôbâÉÁÚrq ƒ %ÉaZMLnfC ¸C¡”@^¸¤Â™Ž@…f³9ãç2RÆ‚&¤“.>OÎ5UºEvq²ÝÆ) qã5eÝ:ðÄ?G"Dè;Ò‹T®ø¤sÝPÇ¡„Ò†`†lSC"¶šXR|g58êý srã¥Á%B'1.[xí¾a&tLoó´œ,ìÑŸK¤e1‰ŒAˆ~!`!pA™×Øåˆh&"jxwJðd ‚š®'#ÆB›8‰À@…ªb‘K‘‰DV 6Šd%9ÕE#º‡wx»‡6hR†‚!Ž#ˆ'h1Sx”Ôð0PÕÌQF?ТⰢ×*fUÙƒ%6s8´AH5„ªBÌ3àª@Ȉ.V¶ÄC’ ?ÃXBa@Ù Uz”ô‡A78™¥•IÌ¥0"ŠS F!Œi§ÍQ„™èÊÖ÷tâÎUq\š!6׎3dÊŽ%ðÃf}ñ‹lNu äAbâ~h`ŽR b‘)Wã+–†hV` ‹Åëˆx'¥Gh"ÐBR!ª¬JbMBQ?Z˜$æååâÒ$J£ÑJ|Gs"™‡ný (œŠ†?φÖÆcRóöY2¯! ‚¥DÆzD1³Ò1„‘Õ˜A.XFäáLðìt°†<øWíFQ5f åFpͧ7näW$; ˆBÃ&ÇV„~|\0j¸,½g0aHM˜q]g>PǧçiJw”À„ÍêcäLÑB N†µ„Q1V‘ÐÉñŸp¢[Ú”.öŠÆ+ˆ23Œ/AÕò9Œ Ã=ç°R#Áx}Œ‘œ¼‡ìç6CêfB!1áOÜP…`Ê ÔÍš±gB X% ÊäŒ ˆ}ë/Lµ¨øb°ŒZaÕJ\E. /)°ì¦kؤ–1ÑC@jÁ²2'¨† I â}†L4žŸñدœæÔ˜V)‚‘„a“,ä¨Íˆd ÌÔ£{j`¦;£Æ“³?2Ó8D;%GC(Œ’UÌH•Gu Ra Gœ…c“>d8ˆA ‰›’˜nM>Ù£Mâ™ÿ)ÕŽ¨-u‹Z•º³±8ÄcÓ)‚3nnŒn„=+mb*øÎã!áÕÛµa1#ÎeËh!v6jBhÈø…„Žæ>>£æ12̼£Uu¼1ºU¸ÑD?ÑÎg¨Nšâ"8‚³–ê¨Ã DíVZkÌ\Q AˆÄ3ˆèÒœCÁЫhG Jvä8˜ÌEÑ…#.$ƒGne¸Ñ1X.è×ÒÖZR¢ RðÁò˜D2C ˜b#³ÄÉC3llNþ \É:†wšf*.W(—j8–²­ ~'t9Å%CƒT}­æ†Qº±ŠA2–„ Ø¡%«„æ>(‡‡h–BWˆ,<ì‹ÆÁ$)£è0ʤ6Ü@ÈÅ#\̤c±]TŒSq¾d ³)Ècž`bæ0C»œojr#Ñ„‚'50»SQ ÌW„ $îA¢¿ä5q‘pÛ ²ºÑRñÓ,`ß ( U ~N7Zƒ#†&ôÇ"Š%9‡£v²nTR%0 ‹øîû.¸ètÿøÉ˜ÂŒ!Nýªÿ¿µßðP@|vß´ ÿ™@±ïˆGÛ†BÀ™N$D$î•ÀŽƒMƒ„#ŒRǨòWJAÎ|3—ÖÈ¢÷éidV¬Ín6+)T€Àà„x…‹UŒ¬";±T0bEáÔäÕ&![©ƒ d$Ç+„Ä+@…K‰¨‰D‚ó£ä|!TZ‚E8€ß DèÈ CC&>­˜ì hV­¡ rñF”ÐBÜ[ x"qhPª±ÍDŒtaÔ®!¯ÛŒªCC. ÅŽn2˜Á;rg2jB¯b^ÈØ§« <_°ûhR2Ê&3cc‚*Àlo ÐáHáuáÅ0ÅŽh9Û s0CO¨âI„sD ¬*¹~ᇠ›±¢Fb ‡=„¡Jb¡×󶦿l…ž–•Îm rK6¢W gZÊ„/®B¡“,DRéŽer$ɭżö72”–ÔQl–¨¶^sêá¾MyÙEv]R‡ €Ìãñž²¶edÍ>9¿žE®Hu=ö®Fw½U‹ŸVVÈ»µS«ÕLG7jÙýÌÅzPî›(ΉÇVÞvUÛ[³Å²µ¯‘úõ9D®Ô…ï%Êr½µöË#Žï#¹S«jÕBœ2ûTØŸ’[-ÛGjwñQ ¬ìç ÝLô”ä%D¹dq‹QU¼K1t„q›xɼ^’þ#u3ŠWVœfa2¤“;VŽÖLÄ>Ѩ‰r”Ìä•-¬"‘xÇI1B“+ópï­¦ù¹l%Gçaê0ÂË/ˆ!ïÔrj+E¨ì))ê2”„²ºQxÆ3œéS_^[‹Dæ_¯n¥ä/Óðįàä¥1²œëR:”DôpDû©s·UÑÑ•Q1ÜÌû–âÙlÚªM|fšÕ—å•}ì–ü¹¥åˆ–n6Ê¥ȧê)HÎa‘ÏOZ:áÓ‹ªtywlôâ~¹*L léªK!N¡i^ç|I†) «+Q}*E*έÈR_u,šLeì^1½ ël ¯Q(hê®=þY‹ã¸‹UL잦+{"³þ«)¬V"PÂ’µÁTŸrÜšJ5uô‹ˆZ‰ïþŽ’–]i }OMDœºB±IÜÔ ¾Œ«åN!$ª‰lê£}–Òº}­²QpBv[Ìs|˜ôÝ_e"Ù7ÓEA×1‚RÂpFÄ)פ/FZíSF< “©)Å‘èÍ0zÛZ ÉX_‚¡ ۔ݗàˆBÒ#D#çFb¾AjžÅWa ^&%Þ¥(!r–>" ÄrPbÚÃiÝ àÅžs\Y0æ®7d*ÜA\u¥„J… èÐ×R¡LVf˜3 †pq0Læ4(çN) =%¯Ð/Q†æ&á˜C¸$C>\/0œdFK[Ôõ‰„z·›ÊYOŽ¢s:H‡´ AñHƒªQ†A†0ÁH œ`D“Ã[ŠsŒ…+;§ÈUÒû¤hä¼1ƒáœa DJ%ö ‚2h YRQ… L0Æ 0êêA”c…r0Â!çP!l»²-ªe Ÿ Q9 $!Öˆ­X˜Mr9ºw3{J, æ.Øz4ÉTp)!‰©L¦PŒìÒ˜ ÑgáЛ¢)xËXkONrÔl™Ü;¾»#FxT•ÆÅJŽÒlj'0B†z"U?R7%0ýûXÄ\»!m°GSµ ˜då0à’¶EæG&¯Ô'aa—pý8„G^!„Î@sˆb ƒ ª¬,ª^žÓ:À¯aÌGˆÅä0`&0D+ú]† Lδ^Vh˜9Üu‡…͉È;øIuV@ÛM#8† H›]D2’”ã Ùùȉ±ÈX¦TM3QÓæ*ERhAˆ`‹\ +"ì°Øèû@ƒ?ç>þ~5±?‹XÑÂ$·/~Qrˆ0ŒJð™ÀH0C¦ˆ!0Æ! cÇj…›„PÙVºÓºÔ\ Q`ébcƒ!…w)Ys ߀Æ@aaˆÙÃ_ÏÛ0Ÿ,ŽP)È£A ,zÈ_ÎŽ6‡U j „On —¬†37e<#bž‡©mâ3JAüy)|\¨"ÎOD C·!ÈALB1¦6™(2pI„J(£B©Ç¼Wù …êc±,¢‘þâ$FªH @Bˆ bÄTMËPÆŠHڜՎG*Ú"²6†¢1€€ô´1 ¨êRÿŒ2 í™Ñ4DÞ³u ‡÷íGQúê§=d÷-7Ý G+ÉÄL:3&œQIªWNˆ:† „+­õÙB¥Q„¢)H«-1†Ú¥÷v»=”¥h­ki+ŠÅz+ZÒÊ*L) Êšd)[D¨Õ©$#Ù.rEÊ-;sW[±Q½ùÄÎ"¾íDã!DntT‘BQŽR3ñÉ3$Žê”SáüÄÞj¦V•BÕÅ!9‘ Mí'i\…!sñjôOfo}ä°fV$Â7YhîÌäÞ¤‡WL5ói6}šºÖ‘“œ‡Iw ãr#Õ¨Är,¦!ˆ`ËfBl««M©Î_Ü&5¬Èm×!»ÝžEb9Ë>­ò;¨C¹èB)Þb5Q"¹ I¹æ9YŠ&ñ]ž›ì¥Õúžo~ m»£þ×áé½EÆí›„ 2Ç ! ƒV$2Ñ0ÁQJÆÆK§r‘ Q^…öŠb)Š.PbDR³~È‚2 ‘)™±q_Mà –ÜR ÝùÏÊaqÈ4qDR+í^C8†™„áÄPP3„u€`Þ9 +€…̺(TÉÝ\¨2E)’(¦\k‘HQ…V4 £<˜N„’† /!¨ý%¡ zi†3,D(RSQÜ;=h#ŠEÅ a‚oŽ„0Ñ› Æ`E‘(¾RHx¦ÌЍ^ æCªsiŠaµ %¸š¹Ê!ðB9 lŠ˜‰ÏË@0sÐÁu Ôr‰AÊÇPÕqzÖê¨ÓŒ`‚'($n¸l¶ ÀÌ2wºg¿_ÉÏØwé7ù@x µœ“î¤õ=/ÇÒt3*qÛ²[%L9‡§eJ<2¶2Ý9=)¹ž/Wõ*Bô»*Å1ÒËÞ4NÜ@œÖ;Š@ŠîÕb¯?;o˜ŒdÓÕn.ªF3&6)W¬æU½ÕÒÞŠ¤Û¢ %Xˆƒ•é}×ÛXäcQ Ò&áíi²‘<´¨¾TÓˆâ®&}óìøôÜ*XÈâ+¾Î§®RýÎ2?àª:˜æ9$n¢+YJ¨Ò¨î½˜õûZ¾lò•t›+©Í“àJIÝm®¯Š*Nïè:EB9:Uê##&o·ËâŽ|Ä"Q‚«s;&é3ñ°Š‡fÚêȪqˆ]·c5q¿ÒGAƒ$BKËM+G£Ë£\êÖ™„SO¡Uô\³ ¿ùÎrè–Âô¯A7ªIH !œAIA¿ü¢ªõ­2¾.8Ÿ\¦Ð²èÖqïM%¥ŸU¶”•œr…teo$þÒ¶ˆaœj6{Yˆj&ÌGœü‰gÓÄy YK:íK…êy¾Û#TU ÙUòT 0¡ZȧUYk£ü´·ÑDn*™7_iSa»jútˆ®èÈÍÕ&Wö\ås'E[œÎe£= ­Å2ã•–ª†Íl4–ïEt$滉"²×ë@ÓM^-áMGJœ“Bd•Ú‚œus”Ȫ¿jõ;´û‹ÕiÖ¯›ˆê¿ÙÛè¦5Dì`ä•„2÷»=μ,¶jÄ †ä–O°k5}ªä¯°ŒêdBfцÞËÜU3èò Ô-&’ƒÊõê±Jd˜D•ЉT¬ËÒ` åY,®¤~[L.Ò½÷ç”>N:Éj¹z<ÿºJip®QA^AVv«µÏ)Í3•k¨Øž¬Ô”†‘èS.ŽM)4çæWfìDÚÖL=\ÌVb¢~+µ=[‰tÎpP bž'x‰J~Dš-}lV™qe_deÅ)¤ÅIJ¦L9íèß«LŠJžCäR±ÚŒúœíB¬Š8uA<èLKÒ—É©ëÄK‘q*å‚l4Ÿ}v“¤áš!E”¥<­9Hb˜Q–ŽC> ZaÿkÍìC3²±—$&îY ™a<÷²mdZ­H-•Yý,ÒQnˆÂŒ)iëo*Úö¯Dé|c˜íg~ÛW._¢ÜœB”ÙÆ»^[ýôÞ«Œ²;Ø…&Ž„AB¥$ÈáÜÏÜ|¥_ÞËKñ¨xÙr£c©[?e§KÕi=< Õ+ÈF;£päÌ*+žFUkØÔs:©§ª\ò)%7%Só—ðKGÄ äôfbÉæmëHnÍW"X¨bFšAKÒO…®’Ç,Wc'[Zg©7âŽvªŸnÛÞL+ØiD9WŽ;-¬tC$È4BQ‡520ЧªÖý}.ÿb¡T–`‚—ËÑòXš\Î¥æIŠueu:R™QJM*ö—iÃz—é)&ô¶É¢ ÈAT„+µžÎ¢)EBºØ•Épžèdª¤‰ä³Ä”-)‰^¸•.äü.”¦GÕ/ŽkŸÌOÜ"u’ÜCD¼PÌI$ýÁ3[PFb”ÍôÙ&ÊJûÖrœf«£l´ë[‰˜K¢J¼9I3žf”ÌeŒëùW+A‚ž¼›ãVô¾¯!7jTäg¦)«X¶‹ô¦š‡±ÆkWÍGû°„P޼^r¯z¶ï4"e’í"æŸjþR"/ð™ò{\êþŠæÔª”.J¶œÔ*ŒŽ §CîØ\ µÇ¶Y\e¨E}ÏN$aôöc¿ŠþŸgíÒ›2×RT!.ݤ8é;p¥†3z Uª+S¸ùßÂgÒi4Qè9Ml—é=¥åìOqÔ)ÞT‘D!ÙDI¥}—3˜¹ˆ¤EÏKÂ6pD+šLµ·*ž]ª±qSðò¾ÎW5¸ã˜;†“àAŠ/Ù&Z²½ Gfr`^¿rlËB!ÙÄåé°Ô,”'“´îä-X“•ã5I:U–GÀaT’X Eî*I<ÝÃæ% ™¬2i¨.¬IoÛñõ¾‡Fœe!Iª±çi’Žõ5ßUPÉeãšU¿?b¹²ÿJqÙ|]æ²qÑ/}YN²"‚°é0S*ýù©âå»È¨•)šêV® ºMri™•ÌâÙ¿ÿIis®¢RÍíC¥hF"¡“®à©Æ(qJÁ§|Å­q+¡0»>ÔáZé)Suõ¢ðM‰Z[[ÛŠ•çu"»8Gb)%OYµwÙrâ!Ól¾eQÝi¬1¹Zjb¯Ø’<Ök³¨ÏÝ[Sçl¥è¿+àƒP˜çÓiÿ:ÚƒM9Ä"­¼[WŒUzÕ¾ÉbÓé½j\˜¤2>3æ’crLFf|3̃ƒ™+Kz²¾ÍûKË›GGpË”NB’ŸL<’`Þ”Çe²AælWDŽ„;™È˜ÍËg4…Ò‰ÄyM•eÖêµÊ•7ïvèBùúåj­ÚÏeëêÒ•Õ!„X†t- º5 ›=—nkˆ‡]EÆí{¥îY]ŒGË~R™ý{÷å“hˆCÌúÎDäçZªP €Œ&¡S1 Jþá?©ÂT–;ú^f³rö–&MòÍŒ­_f•¢”¢.‚fjRééRSÊGõ÷ˆtRÇpž4ã) ‰[ ­øËÉò¦«úVãI¿êÙ<£Xå 'E^™[mò“»8›‡9¯¢÷umÛ±‰WB M.–$÷öç5ÊN7ÑWj‘XT)„~"F038þp¥lR“¾Ï‘9h‰áØŽŒ}=âMjׂníF±DÕBW)Œü)±‰UJ3Ùe‘ã!•5îõ±'*%w7'Þ-Š–ò]ÝzîÕBømëc1lD“¹‚‰¤þÿn~’ÉŽXÊéÛþLTr”ˆÄR• I:oýà L$©w§âÈj²J½ÉqÄR@P£9¸auÇ'´·ÍÅÇ7º“„»Ì´b~_¤Ïï—V×TN2Äd*΢±Y+1èRXüþ!6…•DwJ­ØD¤Óz×Ñ9ô•n!.,Í#P„êß3úÒÑÉBØ…Åïš´iEôRïÿÈ(‚t•™4G5Ûf-U«%9³©Ÿâå’š´Å ¨#(²£”í*9€… ÿøÉˆÂ„LÝ$Í ½ Ęܴ#,,/GÌjxñ|gãhžšjypÛÈ’ )ÈÔÎ7í§ïõÝGj:ëqÌÈFR˜£´áÚOõÊɼ®žœ±–^&ãÕX¬òöîÞI ©”1ØÛ-}ä´=UJÃ2éJ]gfá*ˆ­Žb?ÓÚ³v5Ól”¢õ~ÓÐÛÖ0šÿ¦®l¤¥µ8‡dKNK3LQ]…qX’¢,›ûí¯_l”–&§2>^”¥—(»y. ¬li›ÌWȨGœ™ìÌAhÚRöU™±¨#U[Ð'Ò⎮¸OÓE‘YÓÓ ÔâHNi~þè–yÔ@¨£7'o~9'bó¦þng{B$¤Ö;Ü‹‡úë1”®÷öëÿJ§l÷M"Ȫʌì§X‰Aæ1ØJS¶¦ìÖJe6¤¡ˆ;‘ J¼º»”Š)C¢ ¡e HäZÈ1!`£ô)"ˆ+=ƒ Tå!ͨN8W-s MÆ 1}’}Iágà„¸q % µÏ©ºvƒ²¥)Tµ 1`Áƒ "ò ïù˜G §ELđœÚ`F3 Dô1 `ˆå€@€å\¢„‹¸m`q%”«Ýœ¬Y¯„¨Ñ(b›0oÔØE强sØØD Dñ{)ÙLí|CöàfYMóžq}œ9èØHÎ1˜ ¦é%Fç$Tz0t9p$b£Aƒõ9õÂÍŠ)E) V–‰Ô"Œ¨dNÍÈ€€Ðð ŒNÖ°z즎…^Ça…äz€¸î1èC&Ø‹Ï( À†0Ç2¯ùëœå‚þP„¤y6‡òbñ×S°O~Ö!U_•©³§fï°¸ü‰Ê…A˜ìÄ ¤1oz–†Ã%Gµh¾Mڨ⡚Åv?/&Ñ&ÔœÌ= v÷ûÉ«r>8¢*˜ì©Cèô…hðI"•χg6eô¨3Dõq0ØîÇÇêáÜL—ÆH¨+HGdAQؘnU×öäEDı$*]½¤%^Än]âQ<Äåb&î#USЧ%¶,%¶3T_ŠÇ*ƒB.”D¦¯uó3зs¥#mþ¤îî¨w£í;é_.7"˜5QÜT¢Y"Jb;/”bÔb굟 @C•b•)¤EÊðýôÅV®©“PŽø’ ª²ylLœõ%Y±tdHËe¿æÑY§=;»•Ûë*;1]ÿ½nÊJŠÒOláÌVe¹HRs‰ýåw›;¼ý‹¬¤b/œêëèÞTÌ7µ,mFT«’¿kT!Ý:ƒ3«« ÅU9E-Ìg‰óœÛ%Ε¯7f…þ!Ô݇òoj˸Íý–b‚¡ÌiŸÎŠSYsë¤[¼„©xˆŠÄqS0N[17ÝÞ¥Ì)YèWLUÞ(q0gÊOYâÚÂ9õ'ëŒ0ᛓ*r.ä²ñ-šæcD0¯‹m1­ÜÓŽuRW³tþì›Û˜øF:ˬƒ™ˆä[9&L¿¢76110½n×\8Ç2^É¥¦¿áwÑÅ’ìâ§6åæQÊÞu M3Šm¯Ž©ž”N)jÚ"ùEº»™ó{³¿× K©Sn\[iJ’¡‹_Þ‘ÅvLܘ0Ñ€A2d‹˜us¼áò„›,31ƪ#@N®®ˆÊÃ`½â”qÌ`ÐC`iMÚq‚ €@5H#Š, êS¢ˆ(…G¡´#Ê2ÛJª<áTÈ”6LÕ’h»<®6 u>aq˜i)‘-â;h•Ü"¬­®"Z@‚h•ø/p(= ‡¤$Ì :L.‡-~ÁÖ]3f!ÎÕÚžbˆ`¼© aE1ò³«!2! j`‡fä ¢P†B!N¹ˆ«q©p_EG¸a £,­Ç¸Ý¡‘Œ#š—‘Ã'î11]œaeƃnˆÊÚº«'BÄ- XÃÅT FÆß8z+•8 ƒø!™ A £sR¸[çsÂ¦ß '“û¹±¡7>¦¡ŽÂ¼°(- ÜÄ„ F1£q fÅ+D)\‚³«®Q¾B¤¥?·=E–S=ˆlFœMQàØ„„ýÈCäQN'ÈkùDìAâ1ÏtaD®—ÀA€Ž4­Ø/C …NMT7u:…ØF "ZYã[õ‹{´A+DcHâ#¡Ä`Ö7 ‚ ÎS ƒ¼ר2ÔR"¿ ‚»"g$8pNÆSÂÑ(݉ƒhȃ„í" n2 zýì|FPB¢+=ƒ!Â2‚µtH3Š$ÀÃ)†åV®ƒÌ@a>Ä‚SBY¦.‘ÄvæÈB1”®xð¹ †±ü4YË‘èu#¡QM³C05h0ÜÇ ›„1¸3±°”{Œ9Ü-|CÍ®Z7 OOB ‡ìS#„ðgÎ¥ ˆ@š ˜äLžÍ­$j†Ê!–¨aº: ã°£^H„üÊ ÷Ö(wS“Pš€ÐÀÄ!¨… ÅÔèŠB|IÍÆFÆZ¬lQ+Ub{Lª§L̠뎉٠g1<3ðM©Ä#5 ŸB Yg8ä8LŽ…ËL°¹V…&Dè”J cP”Ïú‚*sHFu*H‘Fˆ” ä™ãÒ ”Ai"¿;ÔŒ2cv¶å⊇S°™ X4á› ùéy##ðE[„ž• º±áBˆý“ÓÙ•yÇnDû ¸Ì¦¢C &n&‚ …åkÜ>TøØŠAøS^6-r/ Š$ Rb$Nè JnL ŒëVÑœ#¶:j1Dh¤¡‰—Á«Ai)šQ—0„Ø÷*ŠçR&&Áiª†úÁ E…C3Ucvõ£S’Á{tÎc˜*DèV.e T ¢v ·Æ%4†N0ƒJ9Mªã·[9×" ‡8qw‘ç zà<ÎЀóÀn‚ Áà~ŸšÃ5; Žü¤ÎuÛö`™QM‰•^.§l>äÀ@gaH0l«XcBûNʵÿýU4g µC˜õ‘ ~zÄSÔ 1DEHÁÓ.Á.ˆhç” 1KøCj¬±\(q°|8ÁFN  ŠÃ©”(«ÌœOÆd´ª@f (§ê¢%*ªj …äw8¬¦@§ˆF§q …p(˜@ÈEâ0Á $v;¹¨ÜðÄ ªlrÊfÇ ŠÎ7"ÕtP‰6OÙ œ§í²u%aûÉÛóŒÄÉøPŒÄ#—Õ'q X ê í¯µQR¶& J‰F3ØQ²L ÀœÈfiXõ­ž’¸Aw,vÎ1Rº·?f±¥NÙ1Fr’-£!±øCœµL8â3ïœ$Ì;Ñí&ä«Å§í™æÇë8EêÛxê)6a♌Š;7+ŒT OÚ\èQñÇLMNWüR¹š¾ô:“î÷$ØZ¤^?6gª}Ha×j+¡ìäß Ç:uS“Tb°‰½NLÍ9)›k“‘´"lÛòn>ù%KÕE•T¤óÔ­J±‘P•c•,R„£éHܦQ)S(o¤¸‹õÿÞb’Jáouz;º¿¥ÊBk±Ôئ-YÕj¤ì+%½·<«šNë“/åB-äõ©“Qhù¬ˆÔµ5JÅj•)S*gÐç;k˜¬b9H/²fõ—7~‚-nnÙ’­Õ®· ca¢‰|Iˆ‚Õêš’µÐÄ:ÊVáí;‰¬·£°ªõ­Pƒ-OM/S†fëTME³éŽ-½Òf!.˼u' ¦b¤«JDËÄ/´!–ój ‰³E¾µªZ[!ñ"™šâXQ «¥Y Î}ûŠU+™<çIÖCu<)¶_(ŠI1»› E¤ÚN·¢°ˆ/nøSõþe‘ŽW3‘]‡"“!‰F×B|ÊT4«˜&/nTíDŒÝQ<ÌÄ[v¹L_vRò‰”±g¶g3¹®‰¶Ã°Ž#Ö””Î’t3•±ô”$†ÞªÓH*EF/Jû™+•I‡(EK^C·W¦!ÅêVµ¶JIŠ1“R-¸„L15Úªt“FbèÈ;»•B&ze‰‹õ^²ÊW) [¾¦¦rõ‰b¥Œ›×5×üÃQl¤±èDÕÒøº¸øBSG«âb¿39F2‘”¨¦V²)üg˜Q"¶ iD©‹A!( £_ÏÆ)Ä>áƒBȪN5c0Š @ ÁÛŠ€²(„V «c:â±Ùã jéNM8c8ϑȦYØ”Œ±ŒQ‡BéÚÛ<0T.·a`Å C»x,¢XÅ ”ÔCˆZá1‚¡˜ã*OQ”ŽÅÑÑ™c4(ÂäŠ1Š0bƒ^É=!MaGZ0.…tH&D'Á+r‘ã¢üÌ£ÌâÂjÎÁH½Öc¦ÄdÁ¥0Љ‰L…Xä)¢‘Y6Ÿ. Q³†Vä$S1{zú¬Û†YB"8Ëá±AÄ8„(„%(ʤ,³öc1Ùé DAÊ…KZ­„f†aFŲÒ2(jó…ˆGd(3ÐÎ2œÇºÖ:ËeõÚ“ª'²TÈdC6϶&ÜÔ#Y˛̌k¯¡[ˆÓ=›*šBón#¯‹ŸÍRmÓ”ªDB—ò@²¾ØÚËÔ% C¶+\DiчAX*yZ«l[×E­>]–jˆAÕD²¢9½øÚõ¸ÖJú1GYfÂÝ}IvMe^NÄÒû¡ÉLLhó8ˆÔH¤žµlêîmmËêH‰‚—JRHMG»ÒSL›É‡­ÒšDJ¼‡«äívª–ääYMEl=úiDÒ%Ê’†<$uîT4ñ¡÷¢]'9Ø!Ì)U'7B•*ºœ¼No&qi½§­¬ÚIIÌmé,]öÎ3UŒR²h„„r¨Ý-8ެ²¡\v6žU5F¿Ë´·Jò§½–‹ÌŒâQ;SÑÕ›­ÉDûÔ¾D™$Q=ÝÊž»­¸ˆ«ÄJ›Òš‹‹K­QjÒh”LMr p;ÆžPïÂD‡‚O’ˆûPAÃ2-'>ÊÁDCR‹2&6ðoÌÉ¿‘mÆ9Wî˨'šúOÂPܯw`¨(¨áQ•PyùÄlIŠPŒt'á›$ù) öØe]nR©Ç´ß;˜¤U%‰äG=½?;n¦BÊD"”rSQyèĺ!Lë©Äªõ]SŠòÂä“¥ªppQvÖ3~’ñ ‘®a„1æÂ.[—‡VXÄšD:!¤xÙ‘66–Ia4)›ãÅ-†ãê †û¤ËîOÄqJ¡ÉrÉ_°Ë•©DX„êTN50š¤RBÎYM¹{ÅÔùžwÔAWjJ?žGQ¢1,¢Ð­G¦’‹¡Mdã?g¥­-:maYŒ‚ÚMZ™$L Pá‚ÄÓËX‘"Ü A¦ˆ•Uˆ9h›0£$”F;fåb^Âþ‹u5È’1L˜Zm2•¯— Ü›ã-JQÅ(wê&Í•ƒ„‘¬!QÑq¼Y4N‡¬Z†{ ÎT˜È]>òÈàÌQFÒ*¡¶õ“±“ ©ò9k*Y¤j$„ådI•±i9ê³·”ú‰-ä¨KœWPP…)l” ?É ¡ –ñ‡R…0¥N?cHsX¥ßcD¬n›­òp€®©€„ÓÌdM'©æ;í²Ç­+)~2Æ++ÈóZ%EUÖÑV9Ú‹q8ØÊÝZ½QS,WˆýL?’¸â—É¥J1ZÔRTšd9dÔÖ»ÎZ7mê¦0Ä#}6Io{#ëÈ×Cóþ«ZË"Ü€­Ù5¤Ç¼$Ç—ò¾GVªyˆ¢­~Ê¡à `‹{’ä?ô’àMÎc¾HHÏŸ(‰zTów(õ>³¬ŠÅ3ÄqŒuñ*³ËCEâ(Ž (G.'ü–Øi'×›ÂAQ“ï¸N1ˆ"'gŒú|ù°½éë¹âé‰!$)l‰„×:ªÉo£ÔŠ"³d¨A–$ÐNÙÄj˜3a&È„ òôh±°E̽ÙNcE)1**ú†fm$ÈÜ.O4“wcšs‰8œ*ÈV¸’•Ȧ'ôÒ¼ÿAjgj®Žœ5z·!ªê;P‚*ªIa5è_¦¤ÈAÏ#оê^÷²rR]e£±RÔÓ±Êå.)" ü"†˜¸E£):h•¿¦Uƒ0ƒ-"ÆÓÍ+éÏbüL½­=µz—¯eÎ+÷*ÙœëçÉo¨ûi2¶çéEK"¿!ZÚô[Qi´ÅíÚ>zH+`V) OÇ…í¢I£%v^õŸÅ‹Óó_§•I̽’<ÎZ ò¾Ö‡!±˜Á:… ¿fË{.WÌï*XSÑ*]z¢Reͼal{ŒB­tö|–BMh¥ 1@‰uâ’~ÒÁ«Ô-ŠÉeVK®²Èeh(áœxÔÕÒÍkféOse)"Åz¥…I•¦gÎ.Sr— ¿æ²ÇA ÄàÇàkXf7Å•kŠ;1LCµ'7â´ ÉB!Ý„êtÕÄ.–Ã1$y CUhÂ!®j&2#¨¥”§%ø~[fìˆ1!è•™&/÷† oH¥6Ö»%¤Ÿ/Ò[7FT¡Š‚£¡ UÚ¸Qr±›P¸É/ßý]UŒ¤ä¶ítzÖ?¿PYÉI ¡]!ÁÊcV2tH$D)§ÛœÇ?‹ nȸ¸_“&2,ŒÅ*ˆT»‡£ÒÍÆάy‘¼|϶ç*v dÞ_œZ¡äbL=Œ^§[bÒy¤\Å „ïŒc Q’µc_/óÃÞÂ5¶ì1.„bÊJ·:˜ òÚqR“P—’´|%Ó ר‚*à‡èv³vN¥)9ü®Q…\;Âl•»¤×ʺç„g(êqy¤î B[]–äb•&O]Óͱ,Ïej¹¥/• Wz5”¨k2Ô¼c’äbˆ¶\cGÚ[ÅùL:YkÅd7v…IÇ #ž•|BK·ûÖÿI²…K½¤e)¤{šC²È¢’djâÄaâ2H!&UÎýU›sq'ÔBâi9Ü8  =WŸ!jNúÁ}Eþž¿S®ÏÛßð÷ú=´Å% Út×yŠÿ̆eìÛ.v󓼟C±Ã(¤vò«3¢:º #(¡ø%7·ä)]]tn“¤®>ë1x´9uK§ºS÷ðÉ"oœRW«OF D‘do¥š,©R'Ç1˜lúÿ~R“. u[-þ6!»ŠŒ1ERUõE+D_ÊIWD9Ä(ÊXŠùO®Ó¾÷“^ˆV¯ {ev˜òv3½ ’%ÓË:DQ˜¤U:+¢ ‡¢L½0—íï@ªEFõ~ɾߜZzÙÌn«\ÈåN-ŸÈJ't‰ºê¶IŠ.6¡HDBf®/#x…V}L¥­lê!µ“Yй=%âHSPF•lT\ñÞ g*êR+B1Jw|MWÿé?“•êa/’`º!ð•¹p¥ô§˜¤s¢ ŒiÆ'‚(1š 4ºäha‰˜qP È\Ù ‚K䱆$µ8ððJØhÃQ‚ò¼Œ"+!,;š¸DdgŽ.(±ØJ‡¡È€W•Ý@ÈŠ6mHb ì ˆ eÈ0íˆ0™÷¢ÏÕÜB£³êÇ¡h´ ¢x; ¼ÏH##bÍA> °lB ˜oLP¬qÛƒ\7œ~áNbú¹Ì+VU Èj+!USѰ@Ò£¥MÏ„3+Ü•°êMHˆ‚ÄÎûŠG «²ëf9äR«*ârâf LFs3™” †&BÆ(§)d„*ŽåÕUV¿RÑI„#B éȈƃـ”Bf„¢A’N$Tn¥DÅÔX[OIÙ¢Pä¥NFÁš Ä˸ºšœÔØB±¡(LÙ¹3ϼ¬á)™ŽaE]WQ[ZNvðìP¢ èA‘FÖÞn !8Æ1X!„ÈŒâ H30VWÙÞ.~fÛ:…]ÂÖ:t[¦ýrˆŒÄÆpÈNq³Ld ÛÆÌÉIl Š(º)±ˆG ‘Å:ñ}h€‚1™“¶èôÍHœóÙï’X˜¶Ä£3©Â£x„°Jåÿ*aIYGô V¤@à„t%‚¸ÚŒE%¸‰ˆ? ˆ0bµQÇW, %H‰¡ÔSÅP±†3ô|­ú`0`Ü%VwÈ|Bsl±œzåþ.7ÀŠÝgo§™LˆjiAŒØAdVŒÍÉÔÜB32¬ÁH< j‚~ìæðµ‡HÏQ&@‚¤)Ùƒ'£¥|‘öF"Ìk‰8B! Æé 3~´æ¸¸ë#¢g¶ãÜ9¶ä*8¬Q˜À†!‚aªR @„‡ ÙÈ@ÈEçs…äÝuaBa‹(é,Qn98š8„@ ¡U¥C‚o|#cmþî´¨HFQÁ›1‹?XÛ™ÉÉ ¥B¶LiÅ-ø0% g†¯œ30ÍFa ‡¤ã ©p)Åc™á H®ôs~v%1pƒX@“ˆC¤tª ‚èTº±NÎsOˆ5Ò Õî˜B{ws5­#gq[“cD$ˆ®rîŽ@‹à¬8¬ÂÅ™e®¦¨JŠ ÉØG ÖDRfQ´‹ãˆœÆ#tp­˜Ô1&-MhÃÄβ:PÙb ˆ H*% Ÿ´3dÛb¿¤)ŒI¢È¦¶/ UÚˆH±Ç;Š™`IJõÈ$a¡ 1„QØû•˜‚°u/ƒfÌDK…è! Ðß`GB" ÝVd†ŽõFH®3ª•t`Bsn&B6ŒÅ‚˜Ž ÈDÈ(½xLB»Ž´Qð¦¬ódT§ó›s`ƒßašDF!LÃóUuv" %W±Ì:„WŠŽ&ƒE•`ëÏD ’ë‰P‘Æg-\¼‚ Å>8Gàƒ þŠ*:ÚccÌ‘¹ð€‚)xY‡8žŒbóªÔÖ‹œætJc Nˆ‹D*tYw †ä Ó´8ç<#YîÍÂPêaÈ5É l ÔO˜fPC@†ì„‘t“¸î‚4!K]¬)E=CíÙˆcH²ˆ*t(Ôd¸iˆÙ6¬Sc˜ÂŒTµ]‡ÌC¼ q …Fc5AÄ€ˆÕ\0ƒ ¿Wà˜² Ä2þ@T(®ø4`ÂQÎE€„f°¡rÆFÃRHΊ˜Kz—HqôZb¯ðˆB-hœŠ†AƒCfPÂÛð0Esµ°ð#m‚Àu:¸ƒq6‚*yËÙ›ÆÁ ¡‡e6 ÐÌrJ,üA„1}RB)Îcǧ —å`!8‰„1Ü ìj ×°§8q• aLqXíƒá( Àð“±`Ä!(Pµ’Zt ³)ØÖ\/Éz~"ÿ±GW8‡WX‰ŽmVuEnÞ ´¦f$µqXê«ÎÉ,ÚøLBN| Ö^W«…4ìYaí¿1]´îVã(ªÏuky¨N±~»Å.*:%A¥aLU3ˆÍªŸ‚k´¬›èþÆe,Qo½+v?9í'Taëv>RœïV|¾R1ñÎE øOÍ-¹t„ó…FQEYÍÃ%í"Ž„Úã;y¯íu–ŠÅ{±“†z“rTB›ú®•ÉN­?A4Ùw;Ür‘ˆ9ŽQ‚ ³êmL¶Ïª=ä׺£•S™ žÂ–Ê3ã`ÒG¾ÓÓ°”Rœr©F)0û‹H›±4&øÌÆA”¥(VÚ¼©‚5 ²ä8ê#„+)µ6¿ÉÑ~ù»ÊÌ›W(Ë•gKr‘ÄWæ¤Eúôöòžì„B–åŸ+¢ZœŸÞ»r¬rRMŒè›)Ü›D°§aÕæF§ce‹8JÖY?.ØmÑU0Êtˆ¢œµÑºL/Û±³ó½±Lã"„Ú)˜œê¨«Y]×°GÄbk•Hnس)”øƒŒŒD1—U ^'ì_ªŠ—p…;“tBlÖ»-}G3«r2þ©¥iJTõbkr É)÷)„*P»¿OÞm‹S ëÉF2d‚;‡I1,A0N¤\ÖÖT%øR»æ:“b¬‚Ç[v´¯šŽÁ³èf0®B¡V¼¿|.8{IÛj8†6»Éw!ïCEK.Ý,UC¬ÚA–´Ç­"Rµù=íŒ!\rÕêf#®šTçꤧÒÉT"}—“i¨ÔÑhZÈÚWå-*ŽØŽQÞ­aTˆR6g^v"—Ñ”ß$ö…ÚqPµ™hÉUF÷¾¿-³E²HætÙ0–þ¡ '}ÈÓAÓÓ묅â+¡û“LT«±¨ÓȪÿ{Wþɵ·PÊÏŒ¶\)Œê(à‰NÊ©d¯ Öþ®}ô°Â½"›ÄR•؈;ßVR¹ü´¢°W#ÎVצ/ÛïLý|üÕ>‘œ¦9\Žw\£;¿YÎÜ1A‘Š €'Ð~÷¦NdòêŒÑYÄ%‹u]r/³sâÐbõ;MUre²w6g‰ÿ¦ÙM+ЃœR∸”mE¥$Œ+µšò^zÇÃJ´ÂP¢ ŽqÔ†Áv0Â5$ÑÅy5—æau’¤}ðºîr›êtñ½ýýi%´`…>­ c±:ÕÎÍÝr’‡‡AΓIM{h™Š¬S0ÂW6ILµÙ4%Êž¶¢>¢ZGÝ'3còà”Çj±¾êY‹zR.‹LevÂPŽõª‘$WbœÅ(á‘JJÛu+_½6zž™#Ÿ16X„#,ét#¼úAÔÄÕýgâ0ªžêˆ‚¯ê}i´ÍÛÛÛ?s‡ A]ηb\ò/#ÔbœQ˜V!‰õ­(ÖžNß½³")eY Æ+åé.é‡!Z¹DÍMtªuû‘žŒ!¾™tÜÌm>_0Úĉ1Nʸ2³_ ɇp¢9ÒF Ü¥bü•ÿÝÑzF‚ jµv*†U HŽg’«Y+sšŽÛ_ÿ¨ýb5}P‡±x5¤˜r+I(`„š+ö«ËZxÅ7ÜSs¬WÀ˜mù/BÖ˜u9ÌÅFÉ-F±3ˆÃ0Æ+;¾…®°‰ÄÚeHAȤ2Y¨Ì‡¯ÉAdÔtÿOä)±µœžrƒ˜Ž8‡!­f¦ö¥¦þ ¾0­ÇÎtv¡È«W0¢â”C×é^[œÒ ˆ*USŒL6©öN®gä/zeÅ Çs&¹_Q<Õ1 p„ Œ”NEÄio[y«õ¡U_tìªUT×L~1ܦä¿YØïUúO¿¸’“]îMW)UiZm2Ö ˜\uSNÑ'5´’ªñ ¢S”åKm©X±)x´Â­„)JîÕq•š¢.œr"uÆ%vNiñ¿W-T'’F˜ÅDJ©³-[Õì‡Tʆ RiÝzÚi%‘ÅlQŒ˜½Qv.|M';N×!Ç! Ào 9Pð Ò.Ç<¶ƒû¢²¿>ôñEù€Ë(‹¼èŒ“”/T~´p¶Ê‰ÌÒ›)›2hg7!¢˜ Bœ0®št½Fâ&T¢îÍc=yBÉÂ0B„¦VBx3ša¬GH“<@œ':“…'ÎÊÊ91Øz×Xyö̆t¨ìa Ǥb²ÇSV3Â0¨5MTpÙɆNÅjA%!þ áUÏÑT¡À´.ÆaD0âdŠd×¢ÑKr#`† Èa’ç`%)­2†Zûâ¡\'î¨2Ð`ÀaŒÃÀ@©’SIVäT@³«_«J¤,K”õ†‰³„Lʶ  7pÎ rs¤Ô¬Š´¾îi…èù¡Ø`Œ !¨ ÆvH6E‘¾§Z—åíqM~ø)•SØ¡A$©8Å?®3ª>{bó¹L»ÜK7ùrDZZ™Eô$’aV¹½§e:ˆ²°„²•}Z¸ä³’Br¿ÑmjžDJ!Õ½¿ ô59y®ú¼–ÆoÈrlÚgÂPèEp¾¥G÷‘0–%-GNaŒ²}=ŸÕQIÒ0ˆ„ØIn‰N#J*ñ;RÊ¢!Íp…xc·w™÷DS:œæv—ŸJzžy6Š,–šþ…aj³8‡trg£&Ñ™Q=‡S³/./nɈu)EšE’%(«DBö93t†)HŽ”DúQ‹™yvÍ6ʶKIßd!ù CŒ•Ž‘Ž×Λ¦[ªµþ©"dôÿ¡§–Ñ<†2—L#]G«dÒˆt\Rp‚l°ÇÆØ“Šb†Taà¸B×= §AÊ]I !0p„eˆñš&Y¶tC±ìx’’£\1» ßÜU7e(LN$'gØN„ú‡ÆÍþd€§Ä@hè„ Hß1Jê D@¢’å†Nà¬h;Ò0†% ‰8¬dBW*ò¼n@FˆH6µQ‚?i “ãÕU¡GŽ&™(‚”C2Î} þAPF ‚ÙK Høçhˆ8\/ÊpXt 2ã‡K+3˜†å6é‚{ÈÈ8ž'c@Ä©G´63$ÀjkŽHØŽBâäBâ«—!Êv UbHÀ5AÇhŒèÌ„³zŒ ÖÁ2Œÿ+†nÂÛør"œqJ<#baQ ÄÚ)ÀHpa‹Ã”¢R™óc ÜâÇœbq¢…p¢äf^@ÁˆÎEíÊ,F‚f"³•U! e !4ë„’“£tƒ â÷!ÅÏéâÈ@l=u ˆ"†+¹E9‰[(ݘÎ`m-­ɘéVŒ|Zª¥–òJf C156c‰fñ$Éä¡шgX"“fqð\¢ã™Ÿ»ì‘ ®obƒ2F”t3±±‰¾QMÀìR–+ Ì3R>5©‚—è•"¶!?pêqHØÀÈá¨X+ Ù˜ãe#Gˆ† #^3A±sªA›jõÚÅE=ç9ð^–² !ƒÖœÃqûJ1 "SŸŠLk*u`ŠÃ‰ÖP°¬¥¬¡ÆðSôQ‚#ÈA‰3D4t˜1aäx M”ÎäPv55 (ÍCz"‘$ ¥äÈUçØÛAƒ!(T „K ÈÊùõÐ(Å”Ø1}ÁÈf ȵF¨(pR‡ÊÇÁC ÔˆÁ T%0ûQ&%$AŒÂĈm™•™Hàu¢Èô‚ΕT"¯R0ÁFQF]£òÐy #'8‚Ó<Ê+qŒmÈ¿¢¥C>Õ;³»ýTNACñ¡AM)5 ã>Šƒ1CU0Tžq X’Q1nŒn8„Æ/ªê÷‚¸€äG`È"=sÌšš%ÎܘðP…AÐ+w†g¯`è\Z]kGâö9˜ÇÖ† j'ŒˆHT6PbBc QòxJ,ÕŒáˆ50@óBV0¿¾ÕÉxÍasˆ“U ™ŒìæVÎòR(˜QzˆâI°Â§£§/@­0@È q‘Cõ\ÜÈ(\±‰JÈÍ]ÀÚd*„.çDs$#'JQTUtÊJ»œôäªÑ •Xx›Cà @ k!9Ø\£³•A CW¯®©‚‘D4„ej€»ýW…ÍD†úf¡<éä<©ˆ#õÝž9…!Ö8€dÈS š;VPµ'|6JSe?ÆÄ"I[ˆ,â@6#çaˆ¢ I?q^.¦@°‚8ä/R;4fHÇ#˜·¨Ã™{R]ókh~¶øF¨AE­Ô ‘¸hÁ„8Gˆ!S%"”Ä6 ޤ ^Ÿ<¢`¢½(á:‹ü3ˆ`ŠÐæ’‹â0ˆ$æ¾2÷¢¼Åe3‚BlèI‘gl…L‘ƒ†9C2a¬59®¸îXHQqKAÐ"èAˆ KæA ™9!ý£CT¡h®¥kçcš[‡&@Šƒ#ø%€"Ià¦1LF ‘r†nåaÎg­ÔEQ ò ¡í)ÃJC.†æƒ’¶Ì'ŽËTM_ â¾î"1 !•Œ Œ¤£9ö)ŠÂ›ø9”P›s°£®|Æ$cºŠàÁ˜d0ÆÄ5¡ƒ\l9”x6Âæ ¢Ó© Î+ðÙ &ÔÉpÞQjQk†ÙŒÄ258P5oiÎÃ/ºŠEÀ+Úf49 ‰ÐíÿøÉ˜ÂuNüâ ŽPC l r´E;’Xþq¬ —ÐT@™ca‚ Ogu}•y™[ŽyHÁ ý 2&¢ HÎG?—æ-ç;>ÿ¨¦§D‚¤'Dì¢2ÅI3™€D/8s£——ðIÌË 9a°Œ!”bS "ˆ9ñ!"vÇeÝW-¸†]Š£)LRΫ›®Š2 ¤%×£h)ÛûJê„Ì‚<6V¡ IÒ ‘Dìñ)ÐAžò䅉NJSÅv æä‚^hÆ ¸7S\˜’G›Ñé^¦7Š®+×çªÔÃ69 ÆZÄ!I‚@——1Y!Xö$Ä×U:G¾"lzTì#¨ãd÷ H'ìåôt%"ëטUÑÃŒ†ŒPNVéª(Œ5)ìBò”# pã”Æ¥®sšj””ÄW·a†ÖPÃQJ&R!gžÇ0utÂäV-ø+`€ºFb5êÈb^¢_1RŒ3þ±¡Ñ*gÑ#s©ˆb©ÇJÕTŒml"8ÉPÃn1‰Q1ŒCŽ*k§­0µš±uA‚(Ãüh*3)µm›õm+çäl¡íÑl6Êü„ ÂÀ~b PsQ ™ ƒl„=µ9úA²ÇB)à.Waƒ? L ‹D!˜±² ™Æê†eÕválì¥C~¹Ý”Ǧ"ë¼b@lìˆaä4¢Hö‹Pä‚‘ER)±Ž&a•…2ˆF.=€Œ¦C·#š© P‹X>ã“,ª .W†‰‰‘º¢pb2ï1­œ†JµÐŽ¢ª‡j¡DA‡¬»¸Ä)´ Ä®¦F#†e3¢¶?ÅeS¦ôR ?FÏÌfìÑA£7oD!AŒÍ‹Íâ8³äG:¬1/tbv„æwH£©R$Üo=ŠÍ+G^¢°¤#Ñ­F9GíØ‚ž¨‰-„mœ Û nÊÌVFb&ôKÅ :m”£2àÇvé† HNƒ4®â˜I‹w$u¾ÕS”ίîÓPŒ;Ö&Aù9™Û0H Ä#˜Ê!•ãÇg ·xÌ©UC![zÈQhÉë)YXÆ>Xd&=L⃨) Œ!IyŠr:c\Á,Õª 6Ä‘’¡CJKâ˜|N¤ ,¯¾i¸ŽËF*ˆB¢ –3DOjQQãzàØûWF(UEkŒˆBæŠ4U¡ X †æt$^uf9ˆzä¬a PÅ¢õ0L4„GAû ™zÄ»gÞ°.Nn;b-®qˆ¬[ö¡EJ)fÂ7aº‘iÛç6<"²bó”׉nÔ‘ª7 Ö4O¬<5ÌrX~ΑHxgÉÐTq…L’}À†m•Pa¼Î·‹œùÂ#<êyÉì5aZ!ˆ@ˆŽx<"t•€A:@½vŠR!BÖª¦ sHá¶n7BÍ ½Ã!MTäÂØÅ#ª¤v3îX‰-ßæ6 hf¤„5Âä\òvË‹\–J*lޏUŒó”h‹ƒ—¢ ‘ÈL@â13XH˜&äû(+_u1pÂs9Sê#–¨‚i"±VÿVò GC âˆþB ?DÈX5JSj*ˆDd½ÉHDE:R~!õCÔLæBm™NÊ!xÅHÆAÛ;D‘ ùyÃhQÈ!qi2»åCè*CÂópËbC ë«!#ÕA#pèÂ@'KØ-¦Ð5+ê¡«±Ð@XÅù±G  Š®}£àS×YpJà qÌÛC•ôƒf 1´=d4Âá„æ1qûu3V%í\‡H»¡c›3„C2"‹…½ÑðŽÓG¦v.TR †+n¬ä~ÖT±Âá‘Äx1 h BU`®’0Ç11Ñyá):28Ly:[ä HR› Grø®èBÔ-'@…ŽˆB= á …K±©– ${ÊÏ,‡M«U$¼Y¢3^7 * GV†ù¡¡ŒÂ¦*ƒ÷BJD¢àËȱ²­#ˆ)’¸Y’.òŒa°ŸcB9pœ#hu°EÎ^hAyþ+µt šFg—)¡ÇÒm¹“iHø´;1†aŠák)þ1DìrÉÂ?Îãæ•5C™¹Æ+s3aõ«^Zb˜0³S@Òª™E<æ&èÈr£Ü‡´À—b¹Ð¢,7¬sc Eë-â‰H1n`ŽàN®Ã/fè8aºU8#»W¤…){ˆ¤ÅP;„”É‚»«C)˜2œ©QŽä0Ìênt#A¹eY£Qªq¡$¬!ÖÖ¬eŠQ\Ê*HÂJ@žƒ”p¢%2Ĥ7R"‰Ä]Dt%oZ¦Î%•ð„Qœ1s?½ +º%2½UŠLIŽ ô*Ö´…5f%`R5ŸŒSç"„øPB°D'R·Ä=íHp‘Š%UªGVË’ÖT â"È¨Ë Áó<`”BܲÔÈÌÉó¡:æé CCÕÎ8Np4àINÙsª…¶\XX" ¯8ÇAœ€‰2˜¢1‚q ‚vlÐFë+â vÊ)Ý Âææ Æ¢Ö"—PõØ^\5f xDkÿ+Q 6:W”dÓ§1F„;uûë¿p‚‰†ÈÕ¬ç­ÄÝÄG‘;—ˆ°ŒADoc/ «â5¢$¨ÎlÁ ¼ìª«j‚A¤ì/)„ÌVê ³Q‚ªjcÜ. ±;ã ˆTF òõÙ ´1BÆZ€e#ò:AT׋«®. «-« äQC&LÎãûœ‹ ÃaÈ… jBÃ9#’ ÔŠw)R BåB³ bˆgÌRâ©[Ÿ'Ô„ål½¨gB3®û ÄmÆFtte`E™N¡=6^ Í ¯ÇÎ)Þf:¦~ïþO}ÄýgýG}i}ÈÚ61”h´x¾d3¨ZQYÖe¡(R£»™¤J6§á;•®ÄVb/câ¶.ȹI,1sQ§úÎb)wìJpÅqÅ:‚Ïâ‘I'‹’Ó ¼“½z•j¬D«`ã;FùØW% ¬…­°¨"Xüö*½¾Ÿš˜A+J+­¤V•ù54†D#2Š(î!™™ê †¢R¡mÚlðùžü½äÖ-‰¢TAn2†Nñ‚¹ß?ê©l·JÞÿ›BiÿmW/+!ŠÈE¿²c½ˆ™Âˆqî";ÛRèÔ¤òĦ¤µ¨ê¼" !Š«ÇKŠ8"‰|ˆb–¬™|Åcé'kû &Ö´Jkõ0”2ïAÈ*e›ÕQ´¶Ç Šè(ÊŽ[Ð×bfk~S³5‘l™Å_¢W„Ê1‘„Mü©v!EeA/•³qÞ”.øßB N «£)ºìLðX@¬C`b0@a(+ã8wœRø^èRÑá³ 5„ãFz˜ŒrR1lL[DÆy„}ÕÔ…pu@ˆÄwˆÈcf`ƒÒ˜ a†(å"Q§90˜vx×0QÜu<°´â»“Ã0do¿Û;#Á0‰„NÕå§8wBUw³Ÿ #a*8W–`Çè0H¤ €“ˆÇ¦*u„¬Œ¨Äx¹iŠ&ÍŒ ˆRh(\·U(a æ šº„‚ñVÁ+çl3+Œq‡¢ÜG„9%9%¶¯ ¤„¨r ˆª t““j¤È3˜¹•j!ž(d" ˆÂ1´`™?*"w:Ìð+))òb·²±‘ÔduQg áõ\ý¸} )Æ6ˆêìxqX‡ƒð1°Â! T˜‡½/Ç8ƒZuÌÖ­ÿÇ:ÔBÚR&ñ Šð¬sA9ŒZWÅÈ~¸EýȈ¡ˆ œ(— Ú›j!6 fÔ݇ZpyŽP^æmÈžŽ\g%£„1ˆˆJWQf4ª`ªÇb½ë\Üb!@Lh9C"¸<\éHø`œ˜nBÒK…7)å=¤íâÞWQ‡\ œR3¥)³”Jêë‚1 Ѧ…´­Ð°r “±FG4R’ÔäCàŽ3† qŒdÂ-LV:&ó”ªâZëE–ÞºC½”"œÁ Õ0…&2„'pBL)iW'2A-¨WUÇQiQÄq&0„Q0Õ™W$aE³Ùm<1HUc„&E5aa:ÈÌC ëRˆ0† èA(ÝÐW2Ó¨â'§A1 Ô‰©ôÇ«ƒHá«êþ=!} !Ô缎"*<žïÚ¡ €Ì6ªƒ•>Íe>˜åuQÔœ'Êq6!†„!yB‡ºà˜×@†L&a)˜È~`ät\!SÉòýßR P‚M¡ÄLDÜ®Ê$c“$ÚHÇ0SâŒuÛ¯00…ÞîêA‰Ö©@ŽV1†áH9†@F>?ÚúEîÅL¢vB²ÅiŒ`Ø‚¤WâL|B‰¨Ù˜è{O÷d¢IÃTLÍÀç6H‚‚×  Æâ8‘Ä_Y4 ÆÞ^W3¯lß ËÉMCdá|ÔŽö#Ö±ÍqE­â‘óÈÌc!˜qzq‹Ÿ7%„1 œƒ¶Ð—&:$5H75´í+1®;µ_E)u¤Æ`ˆÒQ$Zª4CjÛHßZá&p¦F'b P§U#mÉs9R'a˜æC‘^¾R›VŠ#6$ã©+Aì3q‰AÎlt]µIéqŽŽÎ ­Eg@GMÑð½œ$+£â TØá¢ÉT2Ò %‡4DdE© (°†Œ•˜HÛHO úD5>½$H‚¢(ºS10'B…î¦-ŠC<)>ß™)’1â&¸GÂü5qŠÆ\‚ä¡/CªSä€Ú Q;ã®n†3²sa JG ‘¯ÉøZމ÷ “ Q%7¡2;Œ&؃bFª ‘ÆY„UÏ[Y‘7ÂR>Ât°è‘—2’1Ø_¿ÊKÛ ØLÞ;¯~5‚BP‹â æb¢LÅËb:\ê_s·£dR™ZÖK©ÈaC)BàÇÜŒH„gÈá‘b*˜ÈX(Br.%J9UDòŒ”bFVø•– {4”ÞÓQSqC!C²¤ñ‚JJÌS5TH£n2¬NˆNŽ ŽE·T 葲±ãDšVçnfKÑÕÖb.¦4­>)ÍF0Q–ç3ȉXŠ©C`‹` ˜M™n$B4Óh#·Ï†â6Z=0ì~hA‰oÄF"¢(FBn¢¹X ¸ZÛ)*PÁzÓ"™E ȔʜÏ"Øìyƒ#:éð!‡HÏB#RÑ ª·ªC#`€„ñ}†~¨ C9€Š:·1»;tûø ÚAŠÍ† ˆÇ¹Äå£!æ¬xÖÊ¢v"éWÄ‚AœVÑ QÍPâseIœnEÚÞԃǰ(šÓ™MäDÍÌ^ŸHýB8˜t]PÂ9óÿiæÛÛc^_‡‰mJjU)$õ9 »ÍüdɔДŠä¨ŠÕ&³-¨„µ¸¤Úf:>~U #¢ÊG,üBõR?àÓ^™P¬I¼B{¨á 3y„ é#¤óÜú]Ä7ø‹Ÿï±W‡ 25ézõoKbø#µé0a›Ž!]ÉÒö8‰}ZU6‚mH"jÎÎ+Eyw!BÕ*3m»ÛMÕ5l‰ªnI´_¢Lë’ U,Ö Ã^ò¡§¼_Ôs –ZãFŽRXý<‚±jåEq‡ Ç9W.)I?ÝI/æÓ RR7eª‘"É €y8Ì„ú^±Êa)2¤ÁÄ?6bQé5• S;´•ü1‰åãÀ@yÿøÉˆÂ‘ÐNùQú%ûü üÑý[ý–ýt³’å°£×Fôèèù0zÍ ®2”ÆÄÁM¹•En£n‘(½scÞ¤»Mg¡¬L›?b*hê ‚0v1Mb9´õ-{‰ÒȲ߆ŽÛ+Ž5rÚ-ä%‘Xç7éO-!•Q·^#­ Eb‡ýÜü"UJF丯§NéäÒÜ2r¥¿QŸóKjåñÎÆAÖÄúçI,F(íÖðY'¨¡Ä(æBÒõËHBqÞkÍÇÉ2ÆÅ°äR'äûÒH8έ2ñ;íèf iΡ0ãͰpª£ ïlž’ cnõ¢Là„Ò´Ž•´Nëhªv°ˆcÐÒ5^Ž_"Ý¢ØÒj2Qçíë{{–†O ÌÌäñ¡¶5GÛh…ª2-K##ç~|›‚:o8­MÚ—+†) A”"ï1$:¹Ü“ZPT1~¯x]àr²°ÏŠÊ¤ª«õ—G¹NÒQÁ¢D m§ˆzxN)ê| ‚¶o´·ÉRÈ×0û ¯ôQ)J VB^JPË2… ÅûKÿY,òcêYÔU¾r/UUjˆIi\iˆÇ3‡; ˜· &I©èT« תºÙýû}9sX¯ES±DTYäÍ^Á‘Xª¯ÎÓj›”jt„hƒ¹Þ`L%Ë Upð’Á€C¢”ì¹HV$RÌ, jçßêXÉíQ1zÁ*K•LúüŸ¬!õ®âȶgôÈ€„KKÉ]7pYè}6µÑLçNä¼ÝIšÊpîᘓū·˜ØŒÂí#emIH0¦«Ð-s׎G0âLù™´´ƒ ç$ö˜ÄÁ"² …PŸ]Ùù4+H¼S2q§¬ÉµQ˜„(()ÉX¨’ÚÍþ¾²ªùa1z2g'6úÝñÖÍ%Ì“–aGkZr,»­ä鎣½Y)g¦Eš%¢„R€¤/Ô¶´{Í!/±£0Å*ê²PF0ë%cîÚº"„A,×R»ÂE аØásºÖ'§=Ë%NÔ%²uG]‡&ç’»¤¦‘PÒ"­ªD•\3ÜÃÖY.iM)YŽPÉR+“ |ýÅq¥În%óÁ±ŒRj|”€¿5 "ÈpÇÚD˜OÆG° Äb (Hý—<×z½§:Q\‚ý‚p—Ù ¤Qòž¦g¢)$’’WïP©!ì²ôZ] CŽÀ†Eš¹/Íâ *€„Bo„êÿ´b(âÈ<ù-O¢øä±ˆåïÊó 0ÒÿÌYýåßb¦3aÒÆ’½AÐCâHÜÔ6/) Z•lw9^̳ÙœêL’›Bc±WêcܵkñRàáÁA@‰ þB_,¤k§NÂßM' Ã(D²—%ÃfoaÄOtÅbu³6lÅÃ[ŽþŽD±i÷á ŠrU(3Ô—úQì³;ò8ò É_™eìII-Æý*e9¦-´'šT³O¤Çq¢^I^Gh‡aÒä/"e$‰)9¤IHlòä¸õ’<qòf[~²þ„;J±Ê¤C¢‹v²œÅºí‘5Œ³Øž0Ñȇm§e1 ´,â–Ãó'­OšÅGAR¨ƒ‰a¤#ŽBœ%k^ÂéœèFâ%-$¶D±ÜB”V¡‡,ÒÙq”ék5Ú\ÕYÉ; ¯.Î.úX\åšv%Ká „0Ê‘†-%ßSܺ¶bõ ©6‚0­Ä.Bóü§°ÂцdÓ‘9`Žo•>‰Ý1e"’—­f˜bz Ê»¤_ܸ¶iÆPc©gþ919•ÚcJÒ]1Ô'–.aŽ¿3:1”Jþõó°dæ:)Íb³(¾¿O¢Œ$áËä_Í» f Gää9íbÔA²‰¨ÒÆ7¤²¬ŒWÃâS¿kÿÆë÷úSÿ4‡§€yíóBÆ4(œWü‘÷aì¬$2ÎHD Î ØB£ìT™ Á¶v#sZGG¡ñݹŸiˆ°Âímá#®F!Q!±Â #— ˆ@#ŒðÊÚ-+Br(ˆ‹- 8ƒ÷¤Z¥Ú´t·< ª|v¥&4Eb"™M˜ðDÌNlÄA–a©UpÇç°°…ëk0Ì‘‘2nl¢–{{9ŽH̲ ©©Kn²vV‚+6& }hÀÆc;˜AØÕ@Ì$t'Z/Ű¼ƒT”PFæ^1óJƒ Ç—c™DEfÝó•™\R ^K@ÕYrž’PÊé„ÃqFpŽŽ`!`Ÿró s"ª•)D0Åᙎ¢ zJj#ëLƙɊƒ•v^9˜# ü”±N+à'xà–Q4=¨ôJ`uŽgR1®DµN¨L aRˆÔ`ôES4tTYC•$b ?-j) >#‡ 1a’#¡²R'Øãh‚a¬ÆÚtÆ\ÄȼWF®§‹ø(£ß'œÖÌgC'@ÔăRhR‘Œ C`O‚[Wˆ(>ç)ç/ÎÃ\ˆAƒ›Š°óˆ4 áߌ¹ìôè1J/A D¤1\ˆ ‚ ·!gbHüû!ûöü¥«¦DɤfåmfoIƒˆ€„àäjÂdøŽu$9<(/TQTN¡èD ä9¥Ââƒà´É*‰Y™¨¬4¨`O‰… F:ˆþ¢›c¹*ÆcPâ5d¥©ñÝkØ8•©ÁÒJò^íeªÕK¨*zÔr!*R%) ”Es÷ý8‹\8ìÙ•2èì‰tÞæ¸ZkP‹&㾘Ç1H@¦¡½]8ÄÖ·¸~N!Ðôô…ûš“5­æd¹,dJ§ºåGU䱟h Æun£ë[óÝ¥Îþ)ꊕËð™|W&­QÄ0Œu!ß_(¬ô¦sÞžáE!IÅÕM7¨ŠL rв&Y1ÈDDŸêd+Шvi:ˆŸöòí‹ß¯ Dª²r+)3S·s)Šf³hÅ1VšCñ[uåN’¿šäÞí6÷c¤ˆ«Ä™…{:&íÚëÓ™WÌ9ÙÕ’"8²ýUV›õ'µ¤ë—ä©4¸¨èÒ4ƒFLÊ+f»Ã*úÙŒg£¨¤—Jô$?¥ìTéH(¯Äå|S±sE)/yPÁHøôª KJV¬¬Uê•Ûs7$¶ÙR]×ó„8¢–A½¹EFªß…Û•È"X´O¦ý0ôÒ{9o‹9?bÈY,¥ÔôÇ+Œ!b¹iëAyš¦Ïõ±U§æAj÷qiëæ1ˆaIS*º e©OLÁ]:ŠMKíRš‰ëƒS.¹ŽîëFÅ¡haU1QŠU¢ªPK~ºb…ü™$&£ÕPÞŒØV/’¢z3a›ŒAIÒ|TåÌRyÃ}e‹StˆSv*¿G»ºékÊÅ2ų×”GK·S­ŠGæ\G/‹é¯üŒ˜|’™Ô¬RyÖGï§û*ŒÍSPt!)–Ö¯Ë^s3‰n®3ŠÂˆâ’pv`QŠ%c ÀFÈÿ7Š1Í7$¤Q—ã†c\h2@‚jÏãl^9H!4˜‚u–ƒÊU/¤;ù0NË‚âÆ0bTv ÌC“¢Ð™È îÊWL:F(À¾”/¡‰h”š$" Ú&ÜãSA^tc‰î S(Ê.™Ä¨´ÁŸ«@`Ä@‚ ETohñXjÑbR Jø-:°%Mh ìˆ*Sˆ_²´"}ä3ƒðR37/T#H±¨´¬ªÄ#”!Ä11XF2Œ‚RDqÈ928¨}Ìâ´+°1D»¸%èéŒ!‰yX@†Êä¦M[C»Ãæ››5 *qˆ›ü7"V˜!.%¥hxgó4qô F6(áVe ‡œqàÎå¦q›…!ƒL3¢üÙ o•i…(¬é !¹ÈÍŠ‰Îψ€b­> ¹¦­z ¦h¸+•(@Ã!Ôé½ÐÂ3{>©ŠÆ˜Œ=99±‘ñë‚•N)Éӡ×a…ƒT“ÔèCv*9KPŠ!¯åf¬¦ÌnÁ¤R1ZaÊ¥*aªrøM¯í‡b…AÃ%Œwf‚<µ¡1”0"…SÎÎdˆ÷• Š›¤h W ¢ÈÊÕL±àS ^¹¤)Ú !ÒvùÈ ‚‹vBw²ÃSvP”ä0a4¢¼e1²èA[• )›_•Ôm˜UdA Dâ½ü#Mš $®½œEêâSÇ(ªtFŠ¡J‘•+ ÆC0€Ì”D@Fth ¦Wd$«ƒ2(~{u!ÌæîØJŒaGu®h͘ûˆá˜Ìó6ðÍøú–ô[ %’ôŒÅWJ‡ß•Gné+ì¶§­"ϯD"²D©ŒŽO*Š­"ÈѪ_Ô!TªMz%òVÙô?’öu\›>ššÄkµner(–»O!‘×Þ¤£Œ„oªr"·Œa[y‹ûv^ÒªŸi%v÷­ ëÄj1$)3.NW±Jv‹TìL­4Ÿå© ×IÎäóœY5îjûœí9=8W¥›s±ˆˆý¶£ª7Ò®‰aÝÉÙ„cRÍŠRâ%­O¯!íÿ¤f’Õýò§Ôù¨çK8²…jÜ¢ŒäN•((BÕ”l1*+‹Ô·£Êâ©/O1žÖ§¢òe-û];T‹!\垊P®¸_°'r¡¿s•žIá¿ÿøÉˆÂ’ÙN[‹CcÑÍ|³’=ãg­ò ÓzÀ r^½Ôxú÷ x\P£‚1fH!‰%¾Ñå¡Üc‚¡Ñ3vÿ_­ï¾xâQ^…NQMâ×Ö·MoékEô²²œÕÈq:k AŽ1h|R“ê-Ó\\¦KOø@Yâ_Ö’’wI(ịöÅ>»“é*ʺA,Jñ>§ÒÚŠ†úUqñL:ÌÕ GYgoAÎ&µ–ÿ—–ˆ’I7•J)먄¥?íñœS 8ÁÀ@+hPAŠ嬓~¼¿—U“Ûé7×k~’“_Ô­nYtÅþK ò(c2”€ŽÌˆ Ï/LÌ$”á!g›ÜƒŽ)ÄíejïË5ãŽBG¡eá:$Újšµë1'óHŨþÈ"Û0‚"”ýôi¶´y÷¤(v ;‚3 dÕ¶¡Oô¨¬Ö9rÜpQ“]ñ>ojÛ¥¦© TA…(ÆßMgæ©+ªBr7 i)ú"˜ØOD2|»65PšÊ!ßÝ å¡•yæÀƒ1EOíÇbY{[N;òË Ø£KO«©„pâ:Q§ò16” Ÿdgj!|ÚùÔ¼×> [¹½1;zA+C1Á̸@áõq}y :–óMÚ–Yÿò™¤óV~·²9† +§ŠAI­K÷âîÊ}'Ð')4J}h=ê…yä-ŒVm¿4ÀÎ p „µB2i?ïƒSŒÚËM®˜Ô~¨üÖ¬³`•êÌ Ä`…rVI:[{ãb T]_&'Yƒ˜‚¸(èTÏÌ%ij¯Ä_v’²T¨‹üÒI}õv˜N!•F‰¥¸³WpË%JQÞã„(Í:9ÍJ—dMçÄyÔ§¡~žL9£ŠN²… µ õ^Ü(B±4¬tÕ]¤“â°®¸ãY uC«‡GS#)Íöµˆp¥4ꛯQï ˆS IV™s—†ü·p𵨗U!}ŽeE£u†µ#mðÿ{`×È!C¨¢E\ÉÌ9Š>¸qDy|j½Ëg2²^zÃÓ(bį΄KŒŽÕ×j"ËF sØW+Ò¸@©i â- 2âÍ­~vR³yR#yr|‚̽2”)D#8éÔ,‚êÛO­™Ò*¨².FÎ<פ¬BÁGHÅ †‰1ЦÛim%L-É¢÷ד &c“ŸÂ‰ˆ²–å˜B [QÕN£P"ÝÔrÕÐPkKË…¿Q¸Ôk4÷ÚPGˆ a‚Œpp®î8éæ¹ü5oŸYi¥‰ßÈcä„9’¦qŸèܦ?×4\ô`‰T·­¦x£¸e²º³gþÇ’¸lQ†† R£‰xðµ£øI}8GÑ™0Eózõç+"I3#\¡Nq*#\æBRmÇÓYP»nã¶!6‡ºú‰d ¯¯„_!"ªÐüN©”u³Ž›¼£K·uf¶˜U9BˆdŒqPÊÒzîÄ¡R‚PW;šËt''½ZY4„L¿¥0’¯,•¥%çR?¤Ki©ÆÉ7C §~Gþï5É©Ä3¸ã *ƒ˜&\*Ú>Z'o[1îjý·¿«6áx‰ÏëÛ…'’cE¡J Àãf*¡I+ÛA¤’û •~£?ªàØâð½JW8(chVâ7Tl¥ôÚ†Ôò&2È)¿uq[¯ß$…)̬ù¤)=k 2P…±šÖû#I’Ug ±Ã€ïÆB¤”͆´²ØÝ)ÅyäaF)Nf".0Ø~ëÿ~¶¢iqrv‘h©u¹ä•˜}ZÖM¦­¿‰ƒ8ÁTÁTªW;úç$©\êr¢æÒ- óIŒNz±LÀà‚¹‘G©oA;âëÉd”ÌeùTD£†êíäêâ KÓ¬¸¿B¥”²¥HrŒq7A„lý [[ìw*\ÉÄ%ëн¬×­=ΆA]Jš‚‘Šž.Ÿ—J͇á?ËQ¤­2£©ä×—re1Ò u™'")Òå¦/SOÞÑ$oª¨§³ø²xNšÜëé A¢¡‡FoßÃQ}+E¡fúUMS{½l!Äq#ø©eüµzL›¬µR£¤Í¯-ÆÞ÷D8W¨\-»iªã…;…!ßÑu({}0”ÎÔ-Í#v¤§+°èº9 Rsß6ÒÃÁ$Æ`’ó8dÈQF)>H✔”®¿o(Yú*JGo­bIJþjïÄ0þ•;êwªÌI‡yÚ0ÎêŒc; Ϙ'ŒÖÄ*ZN½kÊNÄVlÊÆ*Ä<êAE¨žL+ïØÂ8ªƒ ÎèÿzÆ„–-L{MÆ^p¡Ä0Å:­N:8Ÿ)Õ(lþ›û)æ\ LÝÓW¥Á;»EZa.ôBÁN)R©B‰Í¶ì.„=óŠw®¹{==ú¤ñ\TŠp E"”+2ô›zih!ªÒ¬²K-<õ5k¼ñB·6=£î¡ŸD‚Œ‡#’‹ã§W·‹ŽµtòysJ¨¶ãâ®´îdù+S-j”uQÞTbDÙ¸Y5òér”égWc0­9м²¼nDS¶ri“ü‘ªÔïäôoûÏþéc€a`G AþQ¹Kއ'y€§|Èf‹BQy¡ )(%ŸI2<­³³pÑ2‡(B)·¹Z«M38çA)ü´VãOíºõ$=Qhùâí{JÅNíÕ!5‰*¬Elâ&qJ¬˜¦TTNdÍȆRRw“ðAˆÆžj´¢#þXÅ~K|JðC!m·û(¬¥©y™4ŠÅ·Ò„va̾”›®(¬…åùRSF­ü¥bþßXˆæ®±Ô¬A%â–!Y1 ÷lÙŠA‘¯ý§0èi¤"£«~sŠT‹Õ¡YíkSŠö}²}ГuqEb´ó'&퉈â¥VÇe"NÄUC1ÜZx­Å)PB_Õš‹Î# Ú|Æ\ì–LÒº ’32þ¶”V1÷B)U¬ª#”z×J”m.eNœ„“d^ÎG7 ¨­Zˆ©ÄÜ’Ä"&† §wŒˆB0Š%S›0™ŠÂºƒ%ˆˆAûD"œQx5ƒ£’FáÏC›|›‘…˜…7Y˜j[< NŒ!¿H`Ò–2™)($†p¤pË|¥ 1Hê¸9XS± Ç&ƒÄv ×DŽʡÙBß…ê¤Å5F2!ÓÁa;™561ÞW #!DBg)ûˆakŽQJdS(§Ç1{e&±Ñ5È!¹…c@¤[ižÞ4ReLŸ-2a¶Ja« ´ÊÍ‹ ƒ),bq1Æ1bôGF²4GyyÈ2ñ(”ÈÐZÆÙRŠ‚Í ŠCêjÆn¯8ïX¢D"Âpß4¥Sn ‡E<ìQ[Àz/^\Á]qóR s1˜l!ƒ:0%Â7†˜b"ÎGB%¡ÐB±K_‘#…S¢ˆbm #$3̯‡ L€Æ&tGE ¢ *Ž:Xsýc±NÐJ”0P a€….< AGX)‘†-äT¯\eÁŠO!OD=peS˜ÂjfAD‹ˆ¡„ K8·² '\rƒÐ=+‘˜™x\RÔ@˜Ä0n†"ð“€Üa™´#·1h”¥ òê”…Å*÷ã8IˆSck“dSxŒ‚Yš €ŒwXå]Ô+osÀ¬Ç) L˜ÈÅ 1»# Ç™D¤šÇ+ÖR™N˜èø^)Š:$îv! Mjˆ¦R0ØßRò`Eˆ:qmC,ʃ¾Ñã9Œ0‚D®&˜5(‘iSÊ(TS↠ˆƒN*+°¸¤'è—@à ¥Ç”(G ß!ØÏЧÐˉŽójö®7„ÄRß´OÚ†FZiñ &1WòAŽaB: …1«„aaªE¸CSғˆÑŒpªQP¥l¥ì§î^F DÁ½3uh3 ÿ$(b%°å®ªM”¹± s‹I‚‘0Ÿ’ãP@˜łÚ•4 a ‡7u¥¥zaÊç>Õ í'&¼jø „Æ;=Î`œ ›øs²°µ6+ãÂp°¹Y ‰mÜÀƒ`G­øŒ Á±_á Ħ¥s—…iØîŪ‚rP”c÷R ƒ#‘ŸƒB(30b AO|#E0X™æp®º Ê…ç(‚ ``ØOxô‰È2'B¯R|2C¦XW?!ÏUÌBr>0¦J •fj3Ca«|)ɹ*úáGÜûf © oB)FH MYI EhëJdBc¿!êEReª+#†ÔÒÂ10Cá:“Œ»Œ41y\ª±#„ʧa_qÒRa§ÚŒÃ@È)›™á8ièÝ>¢<¹Lr“©.Ï^±²tQ2oÑD¢.Æ ‘ VcÄB=/UC9ì%4:¼ˆ’ZÀ2c)¨„†X7ÀÄê^B Â: qJæUr ¹‚Ô¬hŠ¡(‹ÆÚŠÍʃ°…$ê^¿,W;DœÚˆf2Or A™ˆd/„ƒ õp¤¾¯BƒöRME G;* ¨‚oÍó;P”¡#jƒ4Fæ>U”9ŠF_ÏY¼"JA¦¨”Ó†½§±XÄYJÈ6bm TÖ„Vü•BZRæcJ!ÂQœRFÚšæ@H½#ªoŸˆ*KNʤ1j1²3™q1Y‰˜B¯%­á`¨~*³¸/GrÈdžŠ‰³] &¢pE‚&ÔKs‘SFòhwŠÇ$o¿¦a3ÑX’ÐJ'aפ•Û‰…!ÿ©DäÎl)âT¤L`PÆ|g°ÂÉ]0o ~=cõhvb\eÞņ…‡#9?1£vt„!ÎQ@¹Ô®Á“œ«ˆ2U`¸¢Ï{°a’ Ð !W 4Z-m ”B’…« Ú˜TbX•+ aJEr9©Ê ÐÈPð`l7  ÄïNadí°Œ}ÄØ1Ø¡ 7/b”†¤Q´íŸ8\ŸÝú†F‡Ea0œ|aœ™DO² D+(Ñ0âœ×ˆôaŽœrÂLê$"=ð‚*©BNØ;#0ù¶……(ÉB9dJ»©‡±R„LýKî/2HÆ&=~†Dr‰FùÎà„,= ’p·Ï£Ã~‰ÜÜV3Ò Â#TTúrê,î‡ò”2‰­"),Re Dp#Ã]p–AZ9]‡,dOCó¨Èœ<¦Ö¹ñ èDØ!Æc­v f"È(aAÕP_R„RxÌ6ÉÊÝBt@Nl9> fÆ.f¦WÙÂkÇ…H"*[È‚Õú›s3ò9-ÊÄoGÌ`„#‰sT!ˆ0"‡ae-ŒÛ#‘VB1q )µ/s ¬#!Œ”<¬ea¥Ê¯‚•4ˆ)(¡›±Q´'¯Æ„Bsl†qˆqñ_U¤V:Œ8ȃÐÿøÉ˜Â“|Nþï¥ðà ÀH 4ÊF´U?‘hûôŸj ÏÉD$G(ES+‚šÜm–!ÍTw…Ì)ÊlŸ±F„ƒ:0B2a‘0“˜ƒ-©Ê΃ÆîÊþ¹›:£Ê„פOA”!†í-%bRzvQJB¸jÄJOáÕûƒGû9D0g§RBSc f)!¨B»‹ÀªW€„"BÀŒP@ñrPØt|ˆ!–òˆj ŽØ´E(E™\# 9Ýú‰áV/2 oÑ‚„åbƒ8Ä)ŒH†]*#¦ê,3ÁŽ&Ê*þ ¶SŠÙ›& !«àÂ1”,|ÄL8^ðÅC•’‡°…\ˆÀ LˆEßx¢1“"=¦…3õ[b­ï¬D¸SJÂ+ pŽH bãØlB3 Nr‡‘LŒäw;³‰C™/ƒ&1‹ª¡ C Ì ÁtÓT¸+´øy2ƒWŠÌEU1 MWöa„#m1:“É¡Á_|„°sº¯ì®\˜ˆk²+°q Ž7aÚ8™2ЉáPY„Ãt4Ö©ë0wÅÅ™(Ƥ#Q„©34ÿnw:~=Åvªœ¤%n3ˆ8¬r1š…B(€L! Pí(Eaï+ÓA¤qOÁŒúVY‚£ Æ„…0‚Uô|%fpô(‚jŠ>^¢2®@ùň"RT7º"ŠK’\1ÐΤ.¦ŒZ5PÊŠÚšÁ’„ðDSPâ>§GÊU8\TÎZtÄ$Œˆ7WR@Â8lÁ‰FªS/AˆbX‡ˆsdH¼S™XFv„03\´ 5 ƒU8/ˆ‚D?¡ŸrŽb™ Ft^—rR Ò¥±‚¸žTú5Æ+ZE¯ØJ<;ЀÅ#ý!§0?Ñ¡ê}æVpƒ9 ç"NrÒ(€“„ cS b ÜU¤e2žAFÌ"-S¨"Šálf¾+þ¨!9pl3› nyÝ0æ+ÑÅw¹ÌÄ |B¡—{© WŒ¸cŽ#4WEï9ˆ Ü8AfÄJËPfBº0cR¬˜ÔµÈ¢‡õäsjŠScÃã >F "±8ftÙ1 Ä(°äRJ¸, Ä \Á \æ ‚RWn4…dìMŒs'£EÔ9ˆZ”˜‹Ï¨m“¿@!2u3 úðdkW22FNÈç+ô†Ä-<îÄPG¢N×'l{†PˆDIƒ(B0ô€ê#-kl÷(„÷  í}Ç¡a¿A…ž1ˆÊVvˆ0eÃ" ÙªLÆå;dúò cý‰ˆÛf2¤(HùÇ\EÄuhA ¯ŠP„“™QwÕ’xÄc)$„a„£e‚»ZDX°^,R ‡^Û¦ÊDpã&cÇGb)Èa W éÈ0¹„?=ËI#pÛ”m˜&'†Q1»~ã?ÍØH&ĨDBŒA\ßSæ"œÄeU˜EC8»ÔŸç¨¹¶Ç~ÈÌ¿.°BÆDŽf=±²:! Ãg¯INFá\–©/Q.¶à¾2ᙓ‘Ž0Å­Ÿ2;$¶Ñ$pŠž5Ѥ”¥Gêݹї¸c³¦LÕ²) ’“@ˆ›f˜€˜@’B ¨J e‚º%8ÁVWUH¡êt;#Œ„ÜhŠ$#†0âl8E©Vʾ§¤jc*f¨Ñ&7^J´Atë/4S0¢.9µ˜‡]\•j‚#˜jŒb\ŒŠÆìŸ‰äÉ݆68ü:?ŒªRŠnyMHf„*/Í‘ šna #™NNøŽ†Íˆ”c/ÊQŽa͈z%ä%¸ŒS0Efû”S#œ…v9)Ž Ò±Žj"Öùf˪ê|n3Q~)o¾CÜÌAŠ„¢‘uMä(ئ¼Ó›&Nb“(jKš—*øYK­MvÑF÷c FªÄŽD$ƒ D¨L"‘ -*ãÇ 3Þñ²*bžÃÖ>#ljɄª†ù‚'ꟽr]Õ:ʉ‘D"PØÃ‚Ñf­Ñd%!#Ä9[•Šä;¡Ä®FÓ¶ ®ˆ¬q 0e@ubÄÙ2TNù¸ær±Sö_mc AêcñMÝD«‘lfù'à b3ˆZX^Åú%„$6Í<ôE)=8–«=_Œ'• ¸ ð1þY]X®ž6BøC˜Ì-?ê!ƲìV"3!©°]Ö2£a¨Š2jŸ@t0+5¢3ã£×é ÍɉÌjÒ -Êq‡¹5M&æ”fúSåJ¬FZVÆ€Á ŽÅÅ"Œ¶:<ä¤íüLá2³•1™„Z^¬;‘¿ŽÉ„‰™Þ¡úìªÓZgFNHds-è%Œ‹š@`†­Eêý | Šå Ž#!?C‚A; š¬Vô)ŽCÚ•Há©‘œËKUG=W\'é–>9…0¨ú¢3N"Œ'`ˆâ2œ™dREDW I¤¤*}5fÏ<^výº‚2 ÛoÊÏäÿÞÔ$ m+”@ÂZ7tUøµÍˆ1á0abK-‡æoÍÐŽ‚QF2†D2Bíã­!ÊÍÛÃ)Ã:$©ŠðöN!(VžQMˆð$±± ‹‚0Ü„Ìn¤Rú=`t×â’njB$f¬ØÆ`„ÆÚ>2´CH×Pf!‘Šj=ÝØVyuX6Š n C硇ŒCÄ™„wÂæ£‰?€è .ÉÌÊhFA‹‰èÓŒ¥û‹øbÑ…Œ&„¬?¸[Ircr¤bdṚ$ñ°9GÑ TbU´˜èû9Ä'ŠCc4"Áˆ|n>þ¾EsRORÑ—¬1‡@ˆB+ ‡šJÛ”LrGfª1 )&†Róêé ᚌ£dgÎø©ôõñ‰îì)ê‡éÍêg$kÊ:ÿAè€ö æcH‘ÎDž•otŒûþþÖaLµ= õÇ£r)>ÿ•ĬøS'<¬ø3 a¢6¢w¶•½g3<1d=ªLé9 ôÇG\'!ÊC¨Ä衺Ò/•Üé•-‰F•‹NÙº´)›ižQÊ6±æªOýÍ.*Dm3TŸïâk±S<ª´Å¼CDõý'¸’ªi"ÜbJ×!ä&÷ý Êܲ}6L÷ÊÞ‰¶-ñètZq2÷ïe«j¶3TìÏGAì·8Èd"ˆ2a‰j‡þžX¨!]ÚjñĶI‰™Þ*'D!™ER'S™ÖÄï?þܲ¡r˜Á<ˆDÃHÞ(Š ã…§h¥_Ò;ÎIŸ7$oÏý‰'Üâ¿õ|†zˆc¹Gæ¾1Fq„SŽù92ëçojþLýBHjìµ=‹’<‚rQµH¬G!Yäj*Û+­›)2ŒI™J®ê7¯W‹ÿ*¬ìS Âݰ¤÷3u9ÿɶ& ¤h˜'™¨Å™=ýF!R%¾¤Ô^rÈÔ\bÊiš®gÍ6f­O)µºF=K*3bªþBX_+ƒûVëÅ£+P¼’P]SP¼J•#´…=N*PÌ)ÝRØÞ&æØÉ‰TVÌa…JPönñê%qrGત¢ì¬³½_6L&i3›ôÛ1çd±öªÅîF-Ù’8îBZìD/ލN#«yhOÄy­´Âz}¦Üéžè¸ºÌªnFö±)˜äEu:²±)Iûªí0øcHÚ+\‹+ÌblÕEûºª{b<…%‹b-“(›Úo7bÛžÂKi9Œ¡>DApkcº¾&1«-|F%^|Å Ca™ÀÍéÓDŠGǪ_E»„G3.QHw$¡$E>[Ì1ÐÃ(âpD±!(!r1t9ž¸W.HÈÈý¢ ÁÚÅî J!Q‘È–˜¢2u³HJ´*ìŠF@GT®Ý!?3@ÈÜç-)…vÄðçD>„ ó(À&aDäÂvªâˆ±ˆêªD†ž¸–)‘Pl®JJîBÜÐAˆÁˆ¤j1o«ÏYÇ+ĆF®á¡„ÌdV£ðcˆÂnPAÃ9ħ q²Kcʬ—Ãñq4žÄªfäL4®Û­Ðƒ‘òœIy;2†g%ÈüLFXÅ)‡éC2ôèAÍŽ•£ÅŠÙ!rô>4ÛÕ!ÐO’%DgÓ9ãã+`laÄ 0L†k³þ6°Ò¦¹Û }ÕÅÝR*™jÚ…ä_ 2k5ˆYOο!°«Ì”t_M!1«TB+-\¬¶*{ùDì›éAØ"©2×÷÷_qW3ñmBT„©ÒT«-¼¾´b ƒ®î_HªÌ¼î¸ªÌ…œ´>Q¹Ó ÅÒ_+GsœACHjÔR¿`‰·’JIÜ«Uá>Žõp¥[ï7}>e^j=´ø"ε¦]"k·û{à…²ñ}ð¦åO/$¨ôv÷“zµ©…1Ö@Çå¥!„VT¡:±;+:ˆÞݨ¨k"é*ù»Â!*µ}f«!‘ƒV)JGãZê_ZVlɃ Rÿˆ®ÞÄ[T³d—t‘Ì‚NhßÙ0©Ä‰†–†{¶Û‚ gO1½ÊLUQÜ–U°Ú&ˆI B”AùKϨz5Ò¶xˆ¾åÓRõO¹f_ŸH…•¤2‡`XYìHÚçÞ}-hŽ]I‰ámdºÊïÒáHÒ(¬9IDJ‘Eqc*ò­úñM˶oòòÐÂc›sv_§]PÆ2AŠ€Ý8ƒ¿©_å¯oê°…ón~µËø%Y;10œºs ÃRÖ-b˜¬@Žsuµ´Í ƒÊÀ"KpÎ,¾ Úóí… Ý.?I¶ VóaOT²ÔŸ…‹[ý Å^Çê®ûùšR’î÷n‘(1ëv1ò¦Í/¶!\ÍCíuIëÊr}Hâ!4\wdz²ÖÑõ…J!ŠU0@Æ2®;Im¡¶.oi)Þ¶!ô”¹©l(ïGê¿~(Ä!·:Á 8@@+ž\°Î%²õý…¯don6Ë?÷й9S~Dâ×FqŠ!Še#IºÞÛ¤÷â•‹}åä¦ÔÞ½¿BÜ]#Ýcª‘=iTІUEÍä¥ËêlÝ?…/Ľ¤?§çeÚµ÷ËK+¥Êg9CH)‡RÄòW¥™ë'q”–Â3kœ„·êRŒ¢k95é+]ŠK—g>*Ù‰ZIl^ÄäNEb³köjº‘ܪ&§¹(ã» b)räÛi¸kˤ~Ë8„Úé}u·N¹½fÔz/ (ÍØ98kvv‚ù(•>—Si'UD%œÆ [ZŽÅ­ÿ4<ÔßÇ«8AC‚±+LcÜžRa5ú—{2£¶#æ’hjL Sî(„ü'%Â3˜PQT$kw£Jcá%VÊP½Úbò½ÉÔĵkr®H"„C(*>u[—Þ}rÕÚÙÔ°”J³g-º!ÈÛ{{Lç:Ç&§]!’²µiq)Sz?‰ÖÙÏžç_!I:TQ‡ù4Qš§Â!±å¯&¡9JlLï¹ N²ÿV‰„ã¹”A™zIq¡ÝÑýQÊ'$o|&î ˜#áE•®^WQéh’W²`¬Âˆ;(Ó8ãèm\.)¸Ø?jµ®hµ—„œGŠK±¦Rá*’YEA )%lò³>Y”˜[a‰å\ëqÉo°G¤ZË  €bÒl(d•Ü¢ÉÕ¦½KYCf±\úW¢±QMc{â'©'qlÒFS4¥)Žîå1h‹é”ëb˜ÛZ[fˈ0†“hm›äÖÄΨ¤+€€ sÀYå<¿qɲÙO_©ÛU~H’Gí 9eÚÈ6m†ZP=ÿøÉˆÂ”ËNúÉû+û˜üü^üüÃüÚ³’…ÏÇrÀåùà†~Är)–«fH鮨ôµ<ž?_&ñ¬Mj¡,“xm•‡Ús!jæ;JÕ$ž&‹Ÿ£b›kqϸ[M!ÈY8ìFÓR(B¸Ž;å‹FÂî^BumZÞÞ’Ük®™1 ZÞš;\®ˆáƒªOádÏ3×öõã“KùDË1_¬_D"¸ƒ»ñ=(«GÅ/¶>ˆ„q*’N¦¿ íKµùA¹ÅaYC $×Å )“_¢Š!Ì#Þ·sØ©U§M\¼BVÉ*_Ó§f-N+#x¤¬’÷$Œ"ä;Õ¹DEÆrzü©0S`ÿÅÚäÀï¢É,Y¥)Î\¹yTC˜W8…"2ÈËŸ!¨Øâiq¤ñØÁ4û4_œ)[<¸6lÛP¦•2CÆD( ê¿(ƒâ±HZT¿bhßî-cpTjdÄ­iq2T‘ðꨱL¸()g» !(t¥‹L% þÝ%©BiË.ÔŠ_„¯D"²Ý™Ês˜B㮽…qõCV¼p8¥ S‹PúCò…dJµ[|½ò”ϲ9‘Ê1š†¹sü™DúdL–'u+¸gÓÝÈžYÌ÷5+0G±Âq)aª#YШõEGÚÌRNo!(lzóäD»°d%mø™áE"’–jRT+£1L§ÛÝÚ£#Ríž7”B#· ¦ñºÛn*s}ÄJìW;ãeMí¼eIZ‹¿¤"R£ÝÞ¤ä½e—Òf[`ºKœV ¬Ì–Ó›Ô¥þR+í‰ûÏCœÁ(‰ÕÕІ%Û[;ñæ!‡V/=]ÑÝ?¶uáLÆ´~îðORÂì—n G.•3¼Q”A"ҡξuÚËÊ–·êÅÂ,(›@µ5‰‡$¦£¹^êˆÂÙsÑiG¸›f:)*]ù¯ˆœâ/~ö.T¹v•œå:Ì‚IÅAÑ“Q–ÒË4Ÿ1Ç$%IË&ܲ’feæÔå±RÛÎÇ/”+tF¹¬gyÅÊև̌ý.kÍŠ)”_Tlݱ7 E5•V» U4sƒ,üò"¯ꇕh1ûEKÅ!oTþÓ²ŸÉþ=$_T ©”–”Ô»g”‡(Â/…ìD‰ƒF1·=ÀÔžíC¼9%zèˆA„+86`Æ6–êz‰§šÍæ>¥»Z‚z!©¹f¼¨ýj²uËPË;–dßU).÷9(RgÚ‘âä¡G Ýïm¨Dvœ^aSÃ! À±8()>â%G–ãÝV.½rL5®6¦Vœ»âÕ褢 ä±ÒFŠæ#Ù!hö~­YȽp’R7Ĥ5×ùfç«j|ꪪ:xvM/$\"ÙJÑòÆÅ%Zºßcú’êùN# A„I&éU‘®©ÛI ÏèMábEEræ¿D©Œ¶ $¤F7®Fß°*X'¨Žêˆ-õÙѹ¿µ:¢YÍDôÕoÑ™ù #jSÒÔµÞeÂyLª¨vYQ YÐTĦUH"ÕÂ:ê/¾¶>„k6Š$8ÁM6ñÞßò’É“‰²åØdEä4”³ÜN««è”-*㼇!ÉF¡@€ç@ÒJÔH¡ôá”ä‰D-ñí'ËÃâía4uHŠ•`¢•ò¯’ †\Äô{>¤›Bâ³i³OEZ"]lÊïø¾u¸®Ï.ŒÄ$ÐÉ‹HŽ~eNËK.”ÈÙ9j'¯ôáÊy‚˜Àå8ZÐg_ù EÞ-ýpZ-„ q$}¦q"§"…;]SÖ¥Ïdúr¸§¹4M¡y‹1Q†§ýÿ–vä÷jŠTÙªN˜Qˆ‰¢#°¢+÷Nß‚n›Ìçlzñ,Z„qKIEßLTlÑ<½Ê¹ˆ´j§QI³ÖïB Fwoà”F"©j.uiI-ŽBZr]©‚)Í3”ÉÎøJFHviPN©R„¡/õ‰Z­•^ÅÉ+¯fóY®«f”b]½¬ÔBˆ9›$Wmçï·ˆäY,\l?ëW)ÞÈR}O1B‡cò9•n!MïílDdF-f’ÙfwÅ#½žõf- #e q¯v¥™äEÇz‰‘¼_²y’sa)Ž[$£˜´m(SŽ+¬µr(ªGÆ——š‹ÂeóÏJ¼¸e—{µËt± Sãï»XVR˜AŽÂ‘6»ÚË`"˜’Ö%/™áTd–È\äUij¾+UøºT"E$¤™5 •‘²‰Cb! •Bž“žti 퉟w„åfR´…Ó- %Í·xÔ0¨·òê …TfJT_¡=ºyªC˜ZbùaЍC”‚{‹;ÙœTÞà ƒØédgËa?=%%·ô•Å2=hÖfªÕÌä cÜÎb† C¯_ˆ¯ZÐìÓvéyv”RPÌ븘È@áÈí5Ñ%yÅF¥Ä¯a,ø/1¸›Œú›DËÅÒ­Ëg1 äþ) [£ªÝ<§eN¦wZ2˜1Oû>¥£UHžj!›"Îb°(ˆJHâ-§]/Pi91†Á¹âÈÎ%Ý¡èŒñàϧ-ß8åu|Bs$TýÿZIO‘MþÝW;Ÿ{®²fõ®J’‰‚0‹¤AÔ[;Ü©Ž5Iªa¥Ã(”®˜–7vÙ Äû_wíf ´ [G„0AŠp¢)ç—F"RG ë½!®ù‰õÒ‘V·F±dr)VVוê¢ÈJª3YW}£_.÷ÖÖUòÒZИR.6-;Ù:g:2¤v1ˆå{wT’ U®­7q»óèÙ˜â Æ éà‚'Ž@ð·8§É«1MGÑÂi1ÿ±Z…ûù§öÁÓq™ÊÙ"³5Ìer]5d=„eœöZíd½H:ví½{‘\ñªDD[WŒAGc l)ˆBJIhù¾³?žZå&ÙªìG?§:r%ÇêÚšºöUî5^–Øæ8Ĩ¤ÑëþTs¨¤oð®’Æ Å! ¾.¥ŠV±¨µI¬žÛÖå¶_½Bâc&êyÉ3]µ‹‰ÞÛDdL}©h¢ ©ò.,¬(„Ž%;5† ì½âwÖÎB¾›Í5o$ƒÑHïî2ŸcŸ ¬Ìu¢!p!b6eO[Z•â!0ýF]'‘™ ÷[ƒ #üEt2#©B­ ”ÜÆg=†¶p’YÊ|deFö#;=ß]4¥S E¢WÝÞ¿æšùaÏ%9iJÌò“‘P’9̹/ UžÚ%1(ŒïŸLe“†¶–Œ¦iZºlæ8¡‡ÏÙŠeeÁ7½ýñ»Iÿcv,‰Ä"ñD¦™ „ornÐd Êâéu(b¯þuïíéÀ° °°Š7VÄ@iÖƒù£R²îúQúÀÊY+Œ†r0¤§‚~Æ^y(< hœ!£Ôî®"°˜ƒSEvô‡‰‘Á£kn!Ùšl–xJáÐÅ`‡Q‘9͘øÆ•’_-oÌYÄ-7›¸ü1Wc:jÑ¥$­ÁŽB þÈZCDá.1èDçáÕ‘&eÄI²¢#w!f1+a×'ƒ±åÑ5^yä4{n<Й‰ƒf6%!-jˆƒ*Ö7)AÜ`³I—÷À°\Äò‚‚‘Y—@Eb ȸCëªÅT‡Áù´¦˜ê¼¦hHÈ"ɉT(!©ºˆàªR)H†ˆé¥ ìT ¹s Š…2n Æ\æüy¥˜O79çåÌ"¸HQ‹M‹Ôbâá ÍDë hp†6d¸ «]Í„iì0óXXXeî»2A’P‘µÑ“†E'hì5¨0>™ E¡Q©Ùø1ÍÒ‚V€Ôøe#“+L+$+ e †Xp¢È:œÔÃ%GÜPHÆÄLF»…4ho}x:&⛂—ÞXÇE1³Ä0L FGxËE&1º³ W†+—¤sÒP‘0˜±`%hk¥à „„!Ââ´T‡>IP€¡¢ŠX8‚7ø‚# (H‚5Bò F0Ñè;ñ¢¡ØÎ‘MFC#"giºpßE†êã8õÙµ„™EÎT.Â0¥¤-°—EGƦR ž| œ€Ž´üúª¬ä7qK¶BZ•«ðìê²ÝtÆR¡ÔDu•£”Bù’ÌÆ»­e‘¹8®v%¿x×±Ú¥"(ºˆÞˆWä¡Î+¶!Ʀ´‹h„G}üV¤«E›[™“)SU«‡~ó³®KЂ/5ÜÊYSÕmJˆ½^ÿÅÏ#²ìÜ|¯ˆFsQØ„J*œ»!b*‹´p¾W±ù>¸ï|y*õÛ ¬#ék9¦AÓqŒ¨\˜¬¥çf>åÓ—‘‰î©å16Z`Ÿ˜(tmô¸âÑ„m×™v DMì¾WÔfMÌRå=žäµM¿¤Ò(ÛÔèã<»T!K"‹Ž¤]ìåUÊ©ÉߊUÛãîþ˜„!­r·“%QŸ´¥©!ÇJm&ÆKÔÝ0Þ幪A5…Ì7.ˆræHt¦¹ÜÚ×:œºáÈ—ºœžøªTþz§iöcO'zÖ– üJªS©R*RØÝ8¤Þí]JE‘ÖC6./+ª“q_’øã¦Ö‡9zÄ-|„5Õ¯ú[£]*°/LÅ0Ÿ¿Ât¾FgÏóqÎÄuÄsˆ†aHÄßÕã*âôúQyq¹¤¿¬‡©Œ*.E9ØžÊS¥ÐAUJWDé¶£!–ŠÕ$¾ØTûÒ]˜Éœ!—|¨Â=Ĥ¥qžˆq› â×v¦r=)W¢Q‹B`…õTªw]Õ¬#&¶QvD»ãP±jçP³Wñ_ÇOyNÿ›ÞVM(Å_'+:þ ŽARQ-KnH† ¸œ‰2ò®Èjò(ɬuEàuÂ/º•15¤bµ&Öf&DÃÓ8LvøÂ©Â”Ô™Òˆ/¢(Þìv3`G‰h ø+a¨'AÇLĨ‘p]Ž@¤'ÁãæPŒBÁ gËAŠRuS$§CF Š”È+0­Fˆ£„FÃT²˜ i$"@ªØ‚ZXRY—ÛÁb ªIT„Õ¥@Ô˜xF>Ä¢J¨ófP/(Á!´",W5ÅHds£+c*ÖEÇ©X^rÃ3@«Ô1Âu.“JäaˆB¡8!I”hš1šbŒR4Žq" Aׂ1ƒ8 ‘•‚ÑäÀ‰ÐC„ˆ2b™ôC'!ÊAMê(c„ú…J‰¹Ýüû¸8CÏI†ÄN„'mQÃ61½"îuAÄ Dû‡ç‹ŽHMiGµ 6(@Ér‡•5#j't„0\ª!°a™0¬hįpB1 /7`Ü­`BkE9Ð\² Ç‚…9á¯ÎüÃ(Ær§&!ÍÄ0€H®¯Ú¤qˆÂ ’Ü>s¬è`ÄdNËÄuì Aai65±É‘™møâŠ5E1UV¢ ³ áÄXF¶ i‰éQˆSÂù¹X:#5‡ùÔ2àƒaƒJDB@É™ØØˆ]± ‹GU|§lN€¨^¤[d%&ÏÛaˆ6‚J™„JèÅ2˜¸aH|ÓÈ,YlÎ5Sj‰ 4Ƹ²pˆb 8C¯¯ðZŠÂ—)ß.䧸øÐXR" ìPV ñ ¹BPË…XA`“ÐEÐc!Y¥Í¸H†œ&kˆT¬(·)ÂxÊœC´/þ0÷úlfÔG¤NÓÐn”gé¡{S„Ì&O…ŠRD­”c _" ÔÉ„l[WÓ'‘àêG’Dyž÷BS,¨†¦œÈ'„ƒ!A“¡¶Ëy]‘º°X§d.bÄq7n'CRØÌ±< #T§Èh¦ûD(©ÉTî½ b£HRtY¡IhŒ“wm”œ:nÁ i¹R°CÒbìÏɸڅ ÂŒe`BE‚nd@Ô¡=ë†AÆ.Anס:’ÕâH@ƒ¶íÈÄí×X¬`ÌúŠ\Ε½Ó˜dNí[1„ ˜…Xíݰ%á+R ðRŒwX½«ÀÇ>SŸ,àkÄ1ÀŒÈN,ŠBBˆ(ÚØAÙVɯzªúô¤ÔS8ÏMÈÎȘ•3 4G2-¨8Bíïá^(„RBª¾Ü“8ÀÎläP‹êº£bØW„Xe iŸ-pCÂ!‘#$äVBQ)L8Òmm;à¬VN0õŸ"këʯ2)sĦE!™’3ùQô ˆ#RG®¢ Nž]ôV5Â8 ¦ªj q”‰Á„™­{šP…݆äâÔ*‡´H¦?¦2=4'D%B$1™1QöÄ¥Çw2-Œ¨ƒ5¸ª2@Eq˜•š ¶;ñC3¥ê%]CÅ"€qÿøÉ¨Â•L†ÿøþŽý?ûÿúËù¬´"ô:­—éé(úüpgVÚRÕ:”²ìÿ‘Å(T!K®ØZüÏ©d£YÅU5 E¶’.(…%¨ò2÷;òÐÞÁeg CŒ^“eM¤kûb\U”›ê1¹‰ÖÖ§BǽE:„•bŠ•1‚”îâ½ Cå ©S¶çö6Ö‹ØøÞìWí¥0ûæL5(‰¥”‚.îfÙˆDñ}Q“S;1l•ãЧót‡ë \æ*)"8aZ3Œ*)Ò•³q©9w6¯®”¥{ˆUï¶(œZ#>m8»Qe@Bý´áSÕ¨å‰GöìStL«Ù„r³%è%Ñè¬VéA‚˜ZXᛤª ¹ý¯§|ÞåD~êü‘ªM²êb¯+r­uû´îq“ØJ‹žò-l=øœE3'ÙtFb¢œ¸ójSöÝrHŒS±Ì5ƒ8U¢›±‹ßù¯»u+ZÙ•U‡ýšU^·8µ¦/§r žù´sTD"Ä]ÇŠ¾EôLè“!oõéiÓ”Fl!š1Š‚nSÒÿ#w\¨!°ËÆ-Óÿ([~ê6.!KBSˆ’¢däq^¦Hˆf†¥¨C¥¯B[3½vDÊ­$hš(ˆ,ØR:è†9Ö¤§FüYÑ3w‰#á‹ZI„E7ÐÚøGB;Hübˆ¾ qd‹qJäÛ¢Èi Þõ&x² ökÙ”sá¿$ÌRmÈW@Î8¥+9x»*þZûf.?-¥òÔ•|ÉRªêåÞI2c—lkÿº˜ê"“èdÕRVòeWìlíDòbSD¨´¸Š#TQÅ;Úe—M\¶þ”˜T± Æ:¯ˆí4Ây$ÜuÝÕÁ®~ø²‡©yYk[1ÑÐÊh…E¦)Pûþ“9D„¸ë¥æ¼nÊRõA,æR&"™]4µWwD{ò\$Ûò¥ ÇK“H³0‰šMFæ£h;š†Oêï®ö1l1hßU‘uÓnù Ó1X!Åà ª¶ëA ÛM*û¯çUÁ½7$¦ >"eê±ÏYÈDßv”™ìbެtÒ\úµ"aQ8êT’§Cè”F.m]Ddá Eo „·a$¥¬Zyb28ÚÙ†¥}iø¦%Ã/m*"Åw[f:µ’Ä|™FnÅûé¦SP”‘0aE¾dgšMrgú¥2¡faŽk)^”.­êJ‰owvËž‡/"ó-¶ˆoqžËŒŸÍ+ é©‹“y uœW¤;,{<ªššúK©HSðDëõí$F4µ "RP‚jS‰OæI_™ E>£ª(”=(&.ûÝLòÿ¢‘Ò¬¹¤_œR8dÙ¦N’*×/C:ªÝZß6ÕˆIx¨î0£”¦ÍQ4èäââuPdob4+¥oúBçúú¦ž¿Qb õ÷4SŽÙPƒ¤””êÝoÉäk“P’¾¿5ò5e¸ŽËj%ÁfsþL½OgüD×6!Kä©ÓŸ?K®ƒ­ ·tJ‚1ÇMnçJ3!ÕÓ^‰lë?ß}½¿Òbóœä’ÉÂD’”µQ”eèÄ9ISÐ…¥Yp¨GC'“jGED¡­ÔºHWLÝnï°¾E© OåÆÔ”rù}±DNMÊ–¬d™jäÝä-O³–’ö”‚*]‡B«Dç”ýœÒ6œŒ¹ríMW£ño܇O²Óѹˆç7âSŸ.ê3äŽaŠ2œQýbJ»+â&£söô™g!±ÒDqXäVåZ´‚:*ÖB‘ߎµ7uSQÞ'®]•­eB]œ„$„çu³¤äemê*¾ïí¤ýÈ‹¼Í91”ž¼ÊŸë´s…)ÕÅ\åªEýÜæådd%–Þô©ëÁ>$¹RÊ"j{Zå R6ô?È¡ÅîBHO›T¾®Qhåupd}íµ/ãõËr)ÔW"¨ç9ÕÉ«ím|©¼þ¿½^vôÎ{¬ˆ¬ †ÍÓR|á%m!/5Èâ©ÒéE+œÏFåBp£„&I²-ÊŠ¹[q%2jñ”E’„•1KVé3Mò HœF(6DBµt¤c{‚­ Sh#’šÁ ÍÞ „sEŸ~/äc4$TîE…(8.9ËÌL,1€ÇF`A8V€Ä’\")§<p®ƒ¢œeˆ8”5NLá‰F ÜNñœL…pE7øƒHÆ8¸ç ®sr…™00`C Âr:aí7Gz¥¹ÚuWCbƱ’)y„†ÐAËÇÆjØ Ÿ‰¢×ë5r)ˆ¨TØÇV8£„Í Œc£ˆlŠB¨¼ˆ#‰)‚`€Ž$U¹ ‘Y~U*&sŒæzAˆgdRE¼C¡Î÷Ž?B#@À Z…Á +…rª' ¦¦@È1DÅŒ)J%Æ °R°_Ì»ÆDThPôƒÓ£¨Å×è ÄAi1©˜ŠÉ“fæQœîé»’”ÂÄ DÈDC@e!1ÓdyQ ãVìXRˆSõTŠ5Bs¦ Bš_&.‡%%DÆú‚ƒ¬,S,FPa¸ˆA˜d|wcÅ(£ˆƒ7A¨2µ¨ ÀµJ󢄚“jÈD`[[šµGé̼åî 2ÎB 2": ò…8•Z椬Û\ã „ XÒ³›¼±éPVq&$'3H0¸C¬tPÃôVh&o»S>6èGt1-|+”xèe&BÐÔƒŽÀ§,CˆŠB™Âd“ Îi…gÉÅÑÒ/eƈ3’# BB@ŒcaÄdBIr*HbÍ:¨¼Š°NÒTÎ[qÔíÄx4 @˜fvEÜü}bZ%°¤zq—ÒæÔlÂDa”­IÅ—"°áÎ ¸ Œ±1\S…ȃ먃c0 ÛT‡HÎÏ‚FåÎYݤÓ`”BƒN2*)ñŸADãšöU2f8Íeð.7›™$ÙÆuׄT0JÀ‰ aÐ;OÙÌÄ1MITʦälH2x,¸õÇÍò¹ Û®5µB;{8Nf9©Œ¦dÐ’°*$OÔŠi¸š¹E§|¬V Æ$0B4,Eá1ê(E‹r’…u…2œ 9 HQ09+‘Iã1:*ŒE5c2¦Ž`·ãäYŽ{.E"wúgüéþHÿ€ÿ¾?ÞßïÕ¡h<·›Ž=xMþp2Äáæ„ @–‰9B”ŒÁ˜Â GsAâ•J!PÁÎOLNâSÓèÆì€6”õØòˆ‚?qäaxQËÁIÉS‘W¡*d°TÇîn@13" Ž?§S ~¥sJn“T·Íb1›„W®äEĨ@Œ^ˆ9EàU)ƒF x‡¼fF±Ô@´‡Ž3Ì eƒqRÄž 2†c‘Rh…]5{hµÄ˜â`Œ')ß0blÁìêQB”UÍ¥WâŠæEa „i‚™*1ÒdZTbw°0¢‹Ér’‘Ľ)œCµgVBB AêF0Ã"$Sx@G ñJhMsŠ˜©#ˆ¶ZèJä¸@€Á™”E°ìæ%Pd§8Á_òH®(6I)ÀÊÆ`Ä¢­Åm‰¥W`Ž¥:(â„æ1xT}7  dAZÈ Ž3ñ2mÄ eÍ\eoNd毊²Ä7èž?˜Á˜`êî1=É`ÄF}›[EC„/è†üáOL²¨Â ƒw$@‘ ºaðC Â‚ŽG\݈c#úìQ˜UhJ`˜0bâFa5 +qÀpw>8ÁlâeAT¤Uã±X»\bD>Á„ÌlpÂ6‡F3~¯ ÿÈ!w*¨BÊYÌŒ€‰¢f'ŸL‘ô@€*Ž èâ,e³+b¢+ncAb„ CC#1eˆ0Cðå¡©ý"±PAj›´JØB±pLa·”ŽŽL~°dW|Ä ïê‘BøP H5AuQ)†Cj7@ß ¡&<¸0É8½öùG ˆª„¡œ«#£*˜Q j‰ `‘|õª˜Æ¦Cw‡)ã’Ôœ“©¥UPv'ÛºÌjŸ8#³™ª0ÍÝDóC“ˆ†È9$ë%@ˆF)2!2TÑœLÙER¹ißü=Ù¨O–-¡QA»H¦Á˜D†æ1¯/~0½N¡ð‘Á^”Å½ß HˆðIÂS  #()xœàˆ'£¡íî@QÞ r(cÐÊFÉlǧ¤µ!="4ˆm­z[|ð 'vÊW-10`ÄŒÏÄ9`2„¡ ŒUNþÊÙQ½·¨™¶Úqó¹„8‚&hü-ÉW%â!u÷R·Øo}¡w÷³ÚdÊ>¿/åÞ†[jä£=„iå(Ä•1TôE.ˆGñÉm þ/—䉥Dzå•i©{P–dËr3‘¤u;˜R¤„Wª¶íõi†L£uÇ¢•gs™ Œ?q¤"XĈEQZ¬´k]7Îæ ¸¢q…¶„ÞeÄ!šçy7¯ú—AÔdS;aHÎa‰®f³U6L¼²ïBšëùIqkï!‡vîöyH˜pˆ¢ªR'%Õº†¢a%é6¯N“¨^Ý%UÝj‹ú7ê˜î)ªRf”s+¨O0Ÿ~>¬ÉÜñoäâ… ¦9=õîƒìd+ ’»•².LªÚivZå?í}"c2æPóJ«‘ÆÍ­P­[#y(E21Ò=÷!ìFMÂË튑)^Š)fÁÛòÓÊG3e¦(¦Ä¡_=Š)-¤½ÿ+2á<È®ˆÜ„lÞ09™E/)cwÄ*‘ïÃ)Þ¤ÔÜ›š\ÃòäìP­Bf~—QU.2ˆu˜B6ê“­è´Ä^a~،ݟ"Чÿ7¤™7Tµt31Óñº¦;s¦FþuÆjV‰æ§)¶kò¸r¢«‘Lú^ŠSŠc¡VýÑ&K-È.b[äž~§k¼B ØÿMj%ý(b ^)XU!Xø®¨Ih˜C+ÑŒÞl?M<½Y¦ S¨Z Ååò q EUþeV¡&O+Þ•Ùi¶Çþö"«æ*­Q4Å÷©íÂ!Å*Ø*H©"-²kX|Ö,¹ggjåeÑõié·s„ONe”Cÿjp…u»ˆår £Lcº¨–ÊÏ5é«Ù³g‘®W‘;±ÚIR2Ù[…S ÒzTFÞB öyI9 ’üµë"•²‰8¤L""UK¤qˆ"r«JC2œŽÉ½½Öûv¦_ ȆêyQ;;"Ó\TÆüÁŽ*+(íBWx¤:â8R¿/Ô–óm¨»Bp®È«ØŠgD1Ì©(É"nœÿ~åí¼òŸ—mÞev&fÑò–”éCcœb˜ÏIaøLOÉ5É_¥&ë\µÖ]«å*ÕÜ´"ŠaT¨÷&”ä²Q3›Ý§­ ¼Ê—‚%ùöÖ$›“!FDóÙxô“ÞQI-Ž|ö¾“žŸGTÂ3&Q0ãEW! C·š„®9Q)úCê.ŸÚü7I5¹ñÍ(Ì!ß:Z×åÅçR! S1µÙ æä~ºÖV®ßÜ^\_$È®Lr{YYœ¤ßDʺéTûH‹”Êæ-xù[¸Š¼#²Új=ˆäªEC5ŽÆs:mzWü)étÖÒÛ“i=±éBS­fû*2ò“‡ æ+±œr™ô”[µ‹&R^kï² ÉEÚ |…ÔT2ˆìTB¡‹äâ©4æmï¿ÊýæÌ¤®)±û‚š#ŽP¬Ìކ)› )‡bí¦_RSÞ•7ñ´_¶D–™l!„ ·uJm¨Óˆ1B”fQ øQºÖWV"vDe{KY*RJåÂÚT{3TÄô#±Ý”¯F&¹÷ªçœÌ¨S&!ûâHŽ0æáQD>.a LaÁñQÂ-Æ `È#Â9W.Â2GA΃ô', J5\Z#gL3¡Š‰& A€Äa3ê ]Ûh¼ŸkD¡ c8ò½Ø% "RGDF™Ê+fC$CÚu;Lý•½RÔÁ#2Æ@„(‚O Œ¿D¤­Õ\âŽâÁE³ÆC©ÁÚŽèT&ˆ n3#C56Af1é¦ aGålŸ8÷€•D·30ÍF Îä/ž¨AŒ Š/+Š §Ú#¯Løf 2\2³l‚L#X~+…JHÑœ2…S…G[©$\ÇGØÝ3š´FáÍÔ!q†ˆ2„±K¡ïc9¦f#Að…¨ê}Ä 6”ÿøÉˆÂ–ÅNú ùÞù]ù1ù`ùàú“ûU³’Õµ#Wt ìy@†qf$Ò´Xê(2ÓDvq‚bbS>ëPˆHAYy©ŠCÛÅŠ*£ߤVìÕň™Š#ƒu8Ñ(3˜ŸaI²Ým, ‚©…j)Q‚%”2äba²’(GVħ ¤f V8OPP‡áM^î%¤,¬'FyN"Dâ6!ó øPE¹ºš€A8e¢!ÃÀ9F p@.Ax` ‚!Ü:º£Èr(Hh@œˆä®>2)Ö«5Ïó‹fFºg-ìµBT‚òí¨½Q=A"ŠÕŒó·½¢ßbüÒuSŸ9<¨R©Ïï„-=‹UÕSÊpbL»—Nª_-VÊ…¨_"’Âx¹IêK¦Õªïêµ$Œ" 0æÖ†`É:£ugéå–&{•Òªc1Ñ ÿÝôªo¬¬êFS'œšß6–3§_÷¢Yâ(ÂM>"X@ãÂÍb¼)4ÿõŒ0aƒíéRØåf5ã@°J˜´f·æÌÃ2ˆŽ{¯ºU£4†(¢ñ d:Y=ïSÔïô=[Œó­šDYÎiQHTÌcéÿ i²rªçð­1ˆ1xRµžkµbÇÝ ‚*ª˜—)ŒrW6¸yh'¶æ÷‚$C€+¬h±BÔW(Jmtœ#U7o%šHõÑIq„ìË2 lé¡S1¡Q†% (0êEW¿æË-ªV÷øIV3WäO$DòŽÃ!È¡YN÷/'…°¾/4Õ\ZÉFí›1¤”RUFa͘ž¡Î ‘©kQ”HÒÒ Àçð¶¡Ni@äbUIGÚq¬.ÆC*Ó‘¿k¤Ý|ñ0Oçzë6IÙô|ôy]%9AEf$=â+¢"¾•Åc |-ç‹Ô,Ÿ4CùJ+5¤¨å÷ÝD1J©Ž+Jg×/æ=:ö6ÐoÁ/í…çéO$ŠíéÒ’Úß⫘Ԩ7/J‘ã°A yÜÏȨø[—,/ºû29¢D×2D–¾^Â]Ù˜¬Jêg-Z&|©ÊË¢®ˆÌU¥ν*,¦íÊeA‹ÄY‹ÆÐ` ð– ÚÆ‹’h‘oZÉÆšMEBî·S>ˆ«^-Ô—)!H¾ˆ1Ä%.ÔÕ^±ŸYe¦a¿»_y£%„8®¾Ø(ÃÂ)W8d;ä«cýV>ÉX°'Lg’-šAÿy§iJ&&¡uƒ Å¡Š(Î P¨«uC¿¯|×Éì?ïoÏMÄ!Y“Ùg8§Mߘ·lÚ‘È{”A S g*Æ?äך–Z/’O' ÆÐÇ b5H…cŒAÍ.OB­+»Þ”±‚¯*ScöíŠ¾Äæž¹^^Yg§øåD]wh࣠-z1HíBž‘ízcÓÎd»½ t1Òjý­Q;2B0§™ª;AêG(åˆbE6‹–ÃgvÔ½)ê×Q]‰ƒÏTˆa,Lg±B†QB¾¾[ååÎÜ/ x¼â!}|²LÓ¡“=æH a0¼ …QF,MG¿S›ö5ijKßÒI|_"Å£bvR„xÊ`‚(á q‹øM„„Tñ0…î×3¤åf]sÚVvyØŽZ ì=ÓÚ^=u*mQ|»è¨¯K2¶y„­…ªd¢‚™&X‡uiP⡎ï¹òø’R¿IuZ‘ˆkŠÂ±Ä)˜Oµû$“¤ñk˲=(Œ3»fY™¨©–âêÔÆ”Vã¤e‘"-˜—=Zî··\]ÓêÁñE[]¼‹æ+ÍQ(fáqùIdÂQGÌ[®ñÚ"Ä÷é(ÅS¹âaÄç)BreÏi)j¤ž…·#%¸†aEtQÎ8 oÐpCiEdŸ¶–êyþ‡Ù¯ …4·ó÷j•r¯"%‹£313*YˆŒö.«a CnÖ†“Ê›}¬ñ©•-å'âî1C«JpcìÅ}"6ÒGèœMÞÓìµ7íè´] µ'\ *‰"B±¡—Ý8ïŽZIä¢ZWäOÌ8ï*͹EIAˆX¾àr-–ë]¾žò’F :¡µKX¹ÀÔûx½%o¼Çeœ@Cå¼å×I¬•…k3š"f9H‡W¶ZR­¦l)1w*µM]Â"“TØ?N4ˆ¶ï"hŒ* Jü@9?µ‹X×z—½*ú’=Ž÷×ÞÓ{ï9qVg¥X!ˆÒ é_1ªQH]»™O®CMâà,ñk˜HØVf•/Ë“0p ÇZðSŽŽ' ô|ijÒÝ·5¸ßÂcåÜòNîÄ2!H2W9H+LßǾͦ«L“åzö“Žì ‹»N†7’T ãEi2Ã3²x±~kn·p•¡ª!Չ߮›·"ƒ‘1TD:û~ˆë"!„É ¹_ ø'ZL'DŸ+‡A™DåɈäZJ¼– ¡Æ1jC‘Žñ$…ßz>²1Œñ^b”¢>³õrN2æ©hËŸ»nå;©UJö–´lÑb¢’-yš˜Ù¤žÓ:´”Ö@ì!à ·¬ BX#§«ýìÕH‰¹’M-x¸£ð'RŸYuÉ1ð¯Ó”â/ˆç5ÄOW˜])E} ©»Ñs\š}ÊŸˆ³›$ÉL+Fs×B…îõ‹æÎ’‚já‡Ê<œ%T~?é)±[×TÚ­Ù…Æ ­rŽóäY¾âh—á:Ô-+mrÛ˜í5‹½­¬¦„*„;˜„UÛ5µ¶o4ˆ¤6Vô“ˉÅl-;ÿ¼6@€8À)ÀXvÐTVZc Èÿ ŸZBÐ2óug÷”˜CCI—9Ò! ‚#`Ÿ›@Ža„É~„g§Êéìed\p_‡ñãH³õÏ]Q€Ù˜H~r!½2Ú›ºp†Bá]>!y!Ò8D¤®J„`fß•Šˆ ¨Að~$6…8´Cv(q߸]ó &5ž.ÈŒÈ@nlï"CV`D‹ûœac«ìÍŸ§Ê`Ô!¯*Æ @нtpΘQ$¢£ËobcbJatõÎ TµqwwBSÃŽAR„Jê‰ ]pA@A€˜Ëˆ!(’€ez?&*á @[[q‡N^£°W\ !X¸Ur#—111 ¸‡¥"Gþ#1aˆï0†&•Í(è‡ÕÔÆ*`ÿþØÅÍQ…üˆ¨Êއê†D ‰›§Q9ŒìŒÀƒE·ÑÓ4ùˆ`Ž£‚‹³ØZ¶¸îˆ3PÂ3br`ÈcFÖ³C˜+—¦ ¥ç èU\ù¯wƒ×”n*5dŸ aaøáŠ‹!¨Œ@ºˆ¾QÎ Ã eJaa˜gGäfïb:U!!Ahã@œu M5¨Çì¨&!¶œÉŒÇ#0碤tUfˆh¤„á JQ‘›ª$¨C“ƒ–(KÍÖ£-uO±Ñè‚ ‡§(/my"øWý@ˆ59ÄQÀÐJ¥*0$ ¸&11[IT+|„+éÈ» Â>èɽ*r©É„ËJrFAÊ'6EJƼ±ÚˆÞè‡ rR³CÅ$ÂcÃÕêIRÂç·ñÜ41. ¤¾0PÀLÐG'ÉpÈ!(„æLĦJÇ$- ã¡Ó¿(þ”£ÁgíÇcPÍ’‚#¥”kYH€†%jÄ@C6¹'Ðj&ÄB\¡*´p ÊÖb£AÝ8¦¥”°(å6z‚†LRŒvÉ…66ÇeXL2Êû} Dmò! '§S¤™—'„D[EÑŒQ£%fALVäˆmÐë”p‹°NÆ8#;µ;2¦¨6r qm77 r8n‡B÷6dõiºW“ÔÈ‘Oö6èùŒ6ÈüƒQ&'10!T ÁŒ ߆2ä R¢tÀ>äxè‘ xëTèœT6ŠddÇeðª&."‹XÈ3ÓŒžàÆÑX 9•2¬(ˆGÅW iœ¤<‡-*àåE/Œf(½"ã —@OÅNQx9¢°ÔÅBO{†a-h†/' ‡¦FE{ôÉxÄGǰDaÅòè ˆøQ…;°‚"wnèEF)Þ™á˜èQÜ…gâĚ<) øf:ȈŽhFü³7Õ)Bx3ž—±gäì•Õj¹+Ý›¬HÌQ_0ÎRLÜ}1 úÕ±APŸ£1ï3™0 Û‡ÉÚÂJQeÂÖ¿p¹’æN9À©LÆC©¹ dÙÄ2+ö#†_q.¬`D£õ¡#‚\„,™xbCœP¡Dߺ”Ci~ †/¾G"™…‹ÒÒ‰ƒvCÃ7Ð#)´€®g£²ÁŽÑ>jCX¦ùÌëŠD"òÜ7"PÌIÉHÝÆN”¯\%VeõՔȞˆê ÈFM+âÄ&Ú&¸E‹HRÐÈœ<”`êa¡“ ú$8Z¨`"¢”KÈõ!‡Úˆ9.B¡×á8›¤Uä«1Ÿ‰ dRXÔa'vC0ò!Ž˜¡A–„c8WˆÒVœ¢™š¼DRÙ›Áj # ¹ø9×9HXB™),@œà¦CW•$ýŒD T;‘2¡é={&ëœEP³$Pu"1›ŒFŽ#vA†a¯„Œ°Gár0fu+âAÊIÈæGq\‚ÄÇAEoTÇN˜À¤w#ä¸È‰ i‡1Dá ‡˜ÂHÊ–¥FH]bS}•0ø¹ º& ¢µ}Ï„…WƒIÅàB4aCa%‚ n<7Bˆ€ÃÐRŒA!“  R(èär.o‹Ï&ªäì5ÎVvà¬)NC†a±ÏËU¤ÔÄüE†Á»)­ ‰ã¯$¡)Š œAŠl2¯.!¦)•¾Ó8ÝQDàžªbÓÒûîz¡œãü„ørE§†%©XX8)à ¢Î'ŠU õ€%ÿøÉ˜Â—`NÞ“@Xà2€P üªä´ Ъñ÷և؆@c Q n•Ìà”œÈ¹ ImŠ–cÄ(SéŒÈ°PähŸ[3¯Æ1 ”âã JÌ@Û¡ÃJ‘…0My*Lj$PÙâ©p†€r’;Ûx†{ä¨âŸ§Ç8톂=4¦ÜĈþVd †0Lj¨NjlLÝ&óˆ ÃúRã¡”K¡”†… ?ÆQ/ñLUA BQÈ™”ªP‚údì!º´qGlûüÂ6 1åqx€2Φâö$VJâ RÞÓÐgB Ý…ÍQ£SÐC¸ŒM˜ëÅ@p^b–¸Â¤ ”½Få)C""QÑXH؃ »‰ð”‹B7Ülf¥KxÌwæTÆfPh£±œh13¯5S»)“¸…ÆËV’"ìüÉB³ÖͲ6#=žE!i#LŠš"ÚŠÌÞblMbPÿ)$)QÑ‘†ì6Ž*»!Ö¿¶^DJ¥]ê·ûtZµ†RšÞÞÂÐ…ºº•6ZÚÉ¢–¿­ms±3PQ™¥Ä#°”å¨Âp‹šéSª"èÈËÄg2…Rô¹c‘8ª/ULãJ2eÉÄm¯wcÉ–F¥rÛ¥7Må&¾¯Û\EÂó ’L¨DÌKºñQN*àÏÚ‡9+kΦS¨AoÙ%f¥»~câlÏ*rБçªv…¢ZWT“F5 •D¡už(†diÝÙ\¥B±›ÿ0R~‰þ²+cò“€²Æ&!&d6~L…ÊBD\@‘íoÃÕ,˜Ç žÅ?Ј#)F Ð˼$ U2B¢¨™Ü“äIKBT¼«˜…JÈ@çz™ã è …<ˆáë8è`„Q‚c,•2PÐ4 3H=Á„£G”GˆÆQžˆàIUˆ)’ú€³žpÀ¥Â#&uëÑÄDQ Œè gS™™‰Cƒ·¬ÌpŸ'À‚¥1B,¿D@ÃAæ’/!öA:ø{ý2¡9—LwÂaÂcDB*!H1pr•ã q!ˆx;. Ÿ¡$pÈDe  JC*!Ä)ŠrLÐP¤ ²±âÖ¤±bÔô(Ý ÜÙ5šD‹B‡ J/ópM˜¨@胆$ÛŠ8Œ¤NcRtwRA¶WÜ9±ÔÄQì§L3NYXXÅûà¾HÈëÌι‚»¨¢¢VÕ ˜Ùr1†´àœK/Õƒ !sn;aæ¨ERt¸#²Ñ*:¿.]„d`Ý™ÊǸj;8ÌFÄ]‚B‰n‘†pÕLn)yµ,±ë-°[ÆÇaŽ xJƒcfTHr43C‘M·ºUÆvª2!²ç°œ£w¤®t™7¹Òôº~Σ&›­âLJ^^(Šâ_*ÐéQ Qœ¢¡…Yevº˜ÆêNM6›ú­I0™þäfÌÖ¹Klêi1¨zeÔ)n]Q4n±¬¦LJS}2*~Ü©si¥#¨ÞÆÚw±êu±WQþËÉ‚_¹Ì"ru)ö‰{ð†:µ”Ȫ‰Fç$¨®ï•[')ÑÙ—ëµ+ëìÜAB¶u¨†Æ\û+i7êÈtS¦¢&ƒŒí™ºô‘êEuô6^g˜Ÿ¢Ñc9²æÑÒÝ$œ¤K;XV )Ó4¶8ÔO0Èý¶TëgIQÔôÛÙ§þî+–Ir8•Î>%µ?}()[„Z9õ†|ÚOÍO&PÔjûj™ôª“—”\ã •¬T^⃔éʹ#JIW^Ifò‘䤔¥TÖ§º*/}ZJlÊfN((‚7ê A¸Å39ó:!ñ«ªí¢oñ:kù\Š’º­ …T¨1Ä„öØîeL*Z“nß•Ë5˼_÷¬½Ò&¼¢“xB…[¥2Îvþâ)M’¨¾y1ØÜö¢7=ø÷á C¦"g á eIJå^Gt10]Kí~&“éÞ¾ÞØø?_;?Xÿrÿ‰6rR¹íîŒ_> Ïý60£ŽÒsMä.dƒ9×+i)%J2Nù‘(µ1(޶­i™(e3ßV¨Æ0£K B)íå2Ä̬—_"“$µoSòª%,O+ûæ™’Û •BL˜T;ÓRç z8î†/º Cä\ŽZÆ\¾ »%^Ik`®<²xC‘y‹Ý´(µ×˜oL©Ðs.ÙýWV.‚Ñ>¤§tCf sc‚*‹ã š[„J%+ïm£sí~¬0Ë<6ÓßH*ãφ© !„E9‰{ìJñD\™ì߃Ë.RV•G‹R9†LßY‰0 E/Å\b) d1=w-}Õ‘*lO¹5—-ñy½É¤FÕ–†qÀàÇ/qŒcÞµ<¿¡HÜ&Ãß'%vŒˆü&;»ávÌ"ž‰e+L¶qÔˆ+ÎÓsBRt³ÓlQRÔbSÃÈ Ã£¶¦Ê%× æK¡U°6_ì1nJij‡3‚1|7Ô¬dJ“Ѹj^™¤rÔU˜]Ï10#3MR)0¹n‘zmúJó‚ŠÁ_ä„Ô#’ ¤§èošÒBà©\Ý<âÊù¼ÚJÈ×ôŒ8ƒRœXµ´åQ =‹q‹)ûœËzÞA…FÄ>ãµâ½*~iõ&D–Ö˜Ýü!ºr©­)Z™ ^žàH Ã¿Ã„XY8•­$2å±4—¾Ù¡kN¶¢¶faö¼ÌY–غ+£$¨©žâ¥(Ð8pV—Y¶{d FS7ë´\œBƒšŸK™…EÁ7¾Ø×c²T‘i¢q©‰ôTN.LÒ˜tŒ:q¾†NiHQBåSöºÈj-£dÅUQM˜ã ,á¯" (.Úk´ïvr‰Ì‘I¤?›}G¾‹Ø/ýneý›÷qÈ“Š:H¸bzY*Ëö‘¨E_/šFyØé+^‚ÑTÄLk\\!2™NmÕ²-¢ AÊxOáL$w½A{wã0ÞÛI)Ì´«(—Äçä²bi}E ž @exr>NÒ,–Ik˜@„Ãe»õN\uâò»LÆ ¦úæ|±j Ò ¼XŠÅÔOù*äÛ®}nG®¢%0‚Œ‚)r–C¹Tc¿~V«>uïzŠ*Ó|ý=wªBð› ½JŠ” v„â³(̧ùW”z´„(§Â4„ý£ï ªaÊ8ÇÃÅOeý[â¡M”l繨¿\oJm™Êcîz{a…óªŽJ0Ê<¼p‡l]Ñ1qäš¾˜Tâ“Kåã´E²Iã}×›G¥B\˜)Èèç/¨á G ñëÕ ù 3¿D©P£t+Dy|õÒùÞFs+HÉŽØ»ªPŽTZ¥(z ¼R-R[ ý¿åêá‹O'©Z3JûTò~ZÈ1´GÄÎ?ªÎJÑ®+Ôü¥5üVÄÂwkJ;Lu+K¨0¤1b=pùû¾Úq,5ž“PE+¯;ï‹âµY\þŽ#§YÙB~u©ëE´üE=2ÅjÙ6†Â:Ö†Ë/˜¦(Š,H—£1¿e¨~SxL²e®ÓEç šÖCgêКe2zЬܷ3:µÄKþkjRÄAŒÕäÅör> ‡bé¤[FXfºDÃSÔº‰íè‚yèNQ´&Öu5 Tâ~9ôø¦ˆÒ£˜…i¦¨¬Ó¤v‹,Ë+ªâÈnÓˆWk/=zˆ¬›p¼ZYkÄFª»ÛÈÄtËâka±šˆr·¥×s&£©.o»`Ä%É•Îî+(Q5‰d9*cäœö_9§ D¢eé«éÇÿ\³^dK¡]ã„§êÌ!gZ™ïý-Ä=PJ•˜bJûºjWyȆMIÊÄ#ÙЉUpÅ»‘[ÉÏN•‘‡;ÿMRö¢¢› ¢wifC4¢‚ˆ‚þ•U”DÍB·zIA9/¹<]11V¥ ºYP¤D¡l”;´D”ǪéÖÈžŸ•ç.S«½HЏšG¹s¿t´E«'åYÔk=ÌRr]½)Sóȵß)E*3dy¦&ùH"Vîê!ªL­l¾²!œn’OÜ"ÕóL>q‹îMÁäj=S<Ú‡º¹ƒ´b„»f»%ÝÒ¥§­y ÏÏdz3ØŸÃà6¹‚)=¹iÕB¨I`ì¯dζº3ÕI§Å¥ÚS2mžj–1°‹¹D0`Q"D¢„~åÃåè‹ÍÖSñ²ù-‚òM†Ê)ì‹Å3ºôC˜UÛ9ΫŠJ D÷n¯~þ„• _Þt7·>Q0ÍÎı)Ì‚0S¾$¸ý¤c5M¯nú²åä\Úñ¨K1LúuÊ?x•!*‚]K)ipº6%JB›ï‡,dÊ dêñ¼…d9J‚d¤[šd¼‚jA0[Ðý¯Ý’>8K–´¥›ÈäbŠU.K®ÞSS]8Š9n#–½D ±[jOS$©èd|“+-,"õd9g †¤ƒFóVÆÕá$~“¿Mëâß¿CšnÊØ¼EN÷»RWO‘ gˆC)Ž ‡¶qIrÃe¾¤©hµvÕ/ü[oŒÛÁ.Yd,âB0æ¼[¦AÙØ?¦{¸Ž”¨ÿh“ºF7`IvÞCÌ}…‘æQŽ")xAQ˜¶~µ&t›â8â]k‡Æôí…ï%ZÒc˜çÅ›çe%$Uêžû²[è–_˜º%béD Qz-Ý…)ª]”±^®Óµ\Þ|-î•"KKrs«(üûÍ̸uªÝ†pAÖúˆœYÑŸ©Ta7IWtÏÕ?3š‹›ØMœÏG¤«!È—H­Ìæ(2 ´®›VL¯·û;#VRÑ BÓ¶•ÆÇWÁt•Ф9N‰«•vd™(2wç%Ù]o…ÒSàÉûÌ£âó,ˆ¯ErfÏ=Ê\l&î÷ÔÉqP*W0ŸžO,’£„ûÝòÚv‘ W:L†r9‡uúQ´Þ¾ãX\ö¿âcG²±T*®Öåóž#¸ËìÒêºTþÙm#·#êö9Ôœ|ÇbH%S1ˆ Á@ƒ‹7P¥È®çòioìÏÏIG¬ƒâ›³ô¾%„äÅwÜîJ ±LVSV2¹È)ÄÝ“õ¬o2ɯœ¼¢&Û›—®HaPÄ3+éÃ-YKGEÛ¡¬÷ésS¬þ™±ûâ=ו\ÇY^©ô£¨Ì#.>%|š¸WaˆÑ‰ItW³\®Á/xÖ…¨ANKÄA×gcˆÔL*Ä+)>J}j½‚4ƒw" "ëgÒêÅF/}=L¨wz½SÔ—è`OÕÿøÉ¨Â˜¬Lû«ühýrþÀAÛp´" u'è$èøëüÈf©•OeïÛ‰¤£):™¿ŽÅGT[¹Œ0äq+Ÿv£Sßñ¿̤ô0–O©oKZݹâk6æX‚¡ˆ!Rˆ• !u39ªO^ÚÓq3ŒË›[7/î–¹ö“øþ¢+ ª(AÑeáŠFÃ2¸¥'¿Ôép‡L?. –)LΦªÃ¢ 8²Ív;ýž¥ãqž!1?]ÔÄɶ®Dg”Ø—¥æ¡TÅ­q€S†ù/™Êl̵Æn4‡t6Hq•?Ñ=–¬r¿]7qwQi2%ÓÕôÇ\¿£çRšÁYÐz?¢­Ò½kÙÏWwª¥*œpŠFÝݧqqS•T¤)^†1š‰æé+üß٬صÍRŸ B¢¡œ0燒b‡$–GJHþš¦OÁ›jü±dÅ¥5(›ª ‚bÅ1Õ×ÐCÍü¤:z{}©¿nXº™bSZŠŽâ¹5ÜR⥹$+™.‰ž˜BilëOþfví~µ®[dl!o*Ìr`Äsè'Øë¤Õ7¢¯W‰Îž¢ü}ôSŽÔfÚsù¬9Ñöþl"]Udl£H´Ò6ÍYŒ"‰eTz¹e[²²•S5SêáJÁÊCîœä+hIt]}sz¥Zœþ›OZZS ´j%ð¥R8æc¶#Q*ÅQÄwé[vU‡g&îŠò C™NWÂV‚Ò'Û¤®è§ìaÈ)MB­M^jnBËêE¨K–öÚrdja;f:«ª5IUë9—ÓÂ!ÐB)\t²:*ʯ‰ŠùI[ï6Eg+vÙS(îVˆ+§†îY_‚• Y¢Œˆ¨™->›¬R=ï•ÓÕÌåÖæ}”Œ)Ž;a[ÄU\Í_Ô¶QÝÕŸŸê}ÓswÈ\ª2\@a Ö°r”“IÖU¢ÝiéO¬·ÍnçoÙ‘ËØU;Ls ®Ê©"k V^¤¬·?™¨oOÇ&¡ñjDcåVÎA(aÝ”IÊÔ#cE©)¸•7”,„7¤(g ‹ÐX' !rÈFã"×cNPÌR¢¿òv#‹ð7œRQP\™IÈC˜DÂdŸ0gž—µ¥…£h}A“n NwQ•3¢xsJ!_®K(öˆÃ¤¢ ©/JÝ>[Šú3Ã) B[ŽÐ¬qs)KºNÀO$@O!ƒJþ(ªî†–(Cœ!ƒ Ž29*$ŽC³Ã¤d}k™²×*.ZÔI~òÍß­A'TA ]ÌÔ0SEt3?½Fu$5f(— “¹Z++&n­PÕ!)*„ôÇ$ÂïwoÁ‚8‘ cbXÆ¡‰È;ò}+:R†XŠ`ŠÄÿó™1¢ž2‘ í…&>ŒÆê!$2”UYøS¥%4%¤A E&B4aÊ‚‘|2ŒñA¤÷q¨•Y9È×…ÇQ“ÜÕ‚Mƒ0al Š£²ì–4ZÊEt™Ä][ùU1ƒ—á— WÆYÆ1hÐB²ïiÜtDGA4$£×lÃ#çõ¿“ã ˜@Ë °žQ3(ŶH¥"¡k„FâMq"Þ†eæñÒŒQÆ¡…$A„£…°@`£©Œ¸ˆXbH× ¸3ô  ܦ.lü·ÇÚÔ3Rá&3ÅU¬QhàP 9D ⨠è@ƒ M‹Žd *æÇô§u”Ã%Í’à߇· QYsš ‚ æ0bÙ?¢¹R(`À #Š )AÅPpƒ…05ò®e«#b}ËpP¨4,ÖÇ£}j'ǒ튪֢1Õé# µÌ>ï£ ç8 âûŽb™gZô·–²m«8à­ü“6ìN‰‚Zs ^œËšášÚÉ"bTîˆÉVå&á¬^NE-ŠFáSÔÕ3ˆû‹ï´ïìéKǼD:÷¨¬ôa…@€  8@ø9¤‹\šfi¢Ñ鱤+‰˜ƒ?܃ „’󿋱tD¡QŒ)†1ˆÃššdYû­·ïâ‘k܇Q‚%T§èÚS k˜¥0*A2*‹ÔÑ#G´N×9.”í;u1¸Ø†ìgnQ²”샭½ƒG3z’ûÒO'à Ñ,˜TÃ…(Ö4@ &¬$}ôùÕÙ<ˆ¼R»Ù5)Hðñâ,ZY¹Œ‡\rñS…Ö×+ѱNûLý‹þ½\o®§Øƒíw÷¯´¥+ˆåô/~‹ˆ@Tt!ÇqG¼5d H!!= FçB¼1 Tü渇úT¨†5 Â…ò ïA’#¢3åK±E‡#/azH_Ñ]U[Ì™„‰™8§4+¦"loE[6@: R¸ à€À”R˜ƒ)b jˆz@‚kå;18à£ëÝùZ¿ºCä{„ù4CYŒÒ¶'ˆ€"‚Q‰ÒARn°žíýw äF-:‰¨1Ú“ $F†€Äs×8b÷Ï •#¥,çÛ]9ºøTaÕF†ÂDËHâÑÕH­Î%«¹Ï0ŠÓ8Ä0™ Sa>šâª ¹‡=Ü}t° ¨+ŠðêWtgC‰©•·#ŒC%Wâ+ÜüLŸ¢®cµ¼¾+ Ê ¨ ªÈjF„ŒD HègR "V ÞóO|!2Áw¤EV&„ÂðtH9  ’ C¨Û‰³!bŒ`HPÂaŒM™°l^ Ý‚È-záÎ@w@ÎJ.ª”÷¥e˜ ƒ B`Á3vÄ €ÆÌÑ+8šÀ0[Šè~,|úÅÏ8øÔ5HÆLdŠ71 $ÊM’)·%ª7ÀˆpŽ;Ê8g›â(‘ƒR(žBYP‚ÞÞ¬Ør+*æ,Ô0½Ìæú™ ‚¦La«ä”@&bÎQ1CÅ?EÅ9)• xw â…„*e2Qˆ7ÌâP`ÇQ2Ð%C) HÄe Aˆ_%)™Ð¨'£1„+Ñ.Ý$Û¼a…nˆvdq á£!Óp¥5†fˆ()«¶D ‰8Ì#÷^˜vѹ†d3WUHb¶­1©ƒlªœÉq¤’н»ÂöE/!ßÃxê,2W…e ‚ 1Ñàˆ0@bPÄÑÙ˜òt[ØèƒáBøœÔs: g5g¢ˆ%äà Á!ܧéQ¡).bû1D®Ó§l'až\$rpƒ/\-”‚zÕYAëP"îÊc² R¾A‰Õ×Å<9Çêâ)?î'&‹x&DÅ48õÔf£4SqɄʽ†aÁ à§cZcß%`†ìAð{Àì°æ9—ˆÙPt:uUR ÐË1› Ü2!3‰ã¾gŒB— ‹'Ÿ©è“¢uHaM1`˜¬~±†ª!2$ªtRÈ¡ã3&Ò©v£q+‹JcÙ(PS¥ Â~‰H¼%"öÛ :Ù‡ ŽU— %Ü‘Pa kásðÿâÉŸV`¤C­g¥*ƒ¢ˆ|¡w[󋘂¾NoQ:T¡…ÒWjíe‘‡pªC°½‚ÐJi¼Ë#˜Í\#ÚHžy •N2SN&³N±PîrÒüv¡Ò•{Ù%É:¸‹D ²—K%‹BUŽUpÑ+†…žPP¦ r‚ÔÃ8= ñd©:JÖ¦OÄ[—ÚŽ+Ý$+õ™žÂ¬*Ñ÷3Pö76ŠMZI ˆ®¼Lœº†Ü*eU!¢ª÷ÍÂc #("Lõ'VýVÓÐ8s&;Qe2ůa%,:8€€¢ÂGž; †^æ|ÒHª?ÅÍ‘ŠšI)j½–ëe ÑIÛÒ,®R¿ýýÍk£6L8«2±lCCÆù´ør+Š’á8ÚÂÐÜq'\YdJ^á ã›Y4N²7äå#…98Úÿ³PéQ+¥ëSŠ…ä[Ï<ö®$¢çv |½=Ï! Q™–ø´ëZB”ÆU8˜ÿ¥~tÝÔlÕ1yéM!ÇH„B‰…ê ¯²vâ•Cw™‰‰Ì‚u5õB¤A„j¯í°n._6( *R£]Œj÷a}{~qPÒµWYTŒXu69ö®å¢ý ý"’BX•%Œ·)%Vÿ¶JdÃ;&ÄÂ_ã×piärãd3êã*+Uü¸Jí±ØRÊþY2-æØÁ¤µžsu)0µz¡ÚåWD;ݨ¾™´^mØßi.â¢ÎwÞ›çi&ûp¨R‡$¹I¹®Ã‡&6ÿ£­LÎkñI)IŒÍg9‹FYÇ¢% ïÈ¡Q±f””e~IjN<Ú˜(÷MvR„8$ 0¶ž{¸]œ 8Ä9¥½,‘GJ!Ùý ÞÍT4Gj&ý„Ò ã>P„¹nòm6Cì”üaërmy!Mr>Z|)fSЬH¹âè—¥~^:ŽXˆê?9*ÓX­+1Z¾¸&ÔŠG0¨lxĵ™ÝErU R×#y£¸4F«o„7÷± @¥$&ꅞ‚%Š e£¶þ|÷¥>l˜ ¯îTÝfñòuðf$s ÝÔ3çÅIÓ7!äl¦¥Ž‘KlV%³]ýªúí²ªá®ƒ|-ßK®}6j9„#ˆ”(qhÙ=«@¬Ì‚Š!EcÓûô¤sÐb9°&‘(½A¨]ô[—ý0‚ÑLêv!{r— %ÙHBœ1[…ÄÝ̲E̹T#ÕŒ3Âp„pyoüÓQ]w:•OB½x†²[´!HnTE’¢Q:†"šÉHÈ!ßtc-dïtÊ’D^óU=S¼ŽÇWLjÖ—Hõ|°Á’yž&‘%Ù#JNJ…_íI°žR*íssŽîDÿn׳ „0“¿ÝªìÝ\úR6T@FT¢ˆô”Ó÷Y½CR{ËJÉý# ŽV"ú.åvô¬”® RnmU1±I®uQJ×ÑšŠô.*xˆ‰_‹vÉËÔ¬ÏÎZ.ª#m‚(!Çy±wÏL'±Òàv*v°ZÏ/¶…c½Ù˜J©*ØS&æY™uµ­/òH9†'£7 í}'ððF¨¥lFDÜ¡w å0t,«”ÜlMDE¼‚”T.}©”á}®’”Ç]vÖÆ+¢Q—™û¤çˬÍt•hª©º¥ÄR%ÂMä‘N:±?ŠxØñŒ©ˆRrSf>ýÿähŒ`ÀU=á2¤Á+VýÖ5‹©ú ŒÙh® ˆfî=f,® F›é’&ù9I*U}‚E&‘+ÈSœµ¹²”ÆL0åB:¬´²¥4Å90dcµ7ëæëæ—khå"—.ÊC<§ä¡ô’–ÁÈ$_O ²ÕX­Ã¥—DCÍvµ‘{%z=7Ó&˜‰á‡Se¶Âx“J.^² RS…7ÂK¦òðˆÄÊën·œ˜*vîz!vгº•Ú‡×ÿWöl,®Ëø^¦”â(¦kU—˜C$ËTz ‘¦šÇ<…óšd°á wéöl|Q"­ÛUå~|Âagf0‰a FüZJµ)æCvbX¼ÏímúŠ¢5m·°úŒcZ±~r bÌuUi‰‰É¬ó.0Œä t¶û„ÃÕo)h§ˆò+\[–ÿ?0:s%×¶îu¤óåØaëé.Ø\¨œŽ3â\‰A Jp‘M0žÔvþ+\²Tbzgð©B!¬õÏ¿¥[IéFÂsñ*v\“—Ê]cI+ ’ÐäÎù…ûi®!KÅ¡ªë )t7“J(`ð²X¥D ¢ì‚Ó(@VŒmBdHš³gž+ùÉakëϸ1]XªŽ\â·#ȤQlËE¤ËܺrJ½Ôª“KÄFå&Ó²¯Ó¨s"wí¥õ%HwÑ…2-€ç,ÐZ {K\!Ì!Æ‘$Ê$˜!"vö­È›l0±¤L ÏL«RJ.l²Ud·DZ#L@Šü§f¨ˆ†±5Φªˆãj^ª'cXùDb¼®ÙÑ2_«ÂSÙ{GÕ7žC-A˜‹v³a…Énbª«m¤%qîR&8“áB#šr cÍ[h‘tÉ$åå&Z/¼ƒU¹mœã%¼üFªÕlV•5èSµÅ(¤Zób'M4ï:aÔ\ÖÞ¯Æüò¹¥„I98b¤‡^£/)9¥Ìp¤ˆrŠÕQäŸ,Iàµ(¡ B Ä•>æX¤K™ŽÊ||÷fÓ&§Ž‰[”ŒïaÄJßh%rã)ÙJGªBâÜÚ&xAjÕLÒT´;™*rœe¨ÒI²·„LB3äɹÇÌFDÌÎmSPQ=¨Ýê7U©¦\Ë•¬Õ/‰¤_3y+)])ˆ6kàü{!‘Î) (q'š´•딡ËGáPZ?<’ÓņRˆ®ˆY Ú_\§ ôAVâæ¸…/4³©ôÉ(‚ˆ#Ð{“Œk'eTeò(Tþ{¥šap·(ñþ±[lÓ¬•RtjNÒªj£3M¦H…O*g«æêþÜu…a0±ð%ZRk§º½J†}"mMÁŒ8ÝÔËL[®]G{-„Âei¨Åã5‰û–­E•înˆÒ{ìT¯*G¥©9q‰B~17±¾¥)G^No<†Õ9T·,Z$d/°ÌNZJä5½E½ÆäͧDÒ£_—H$näk©hF²ëLªz©LÁÐÜéGŸ®JˆS2ÙW{iùÅ™·…B~eÞè"; T%°äá?ª#a© Çd 'öáME^5]•³bµuØÉ±9P¿@Q^þpƒ µ‘µ u%„Ô¢ö"à¢+wp¦«7z2§K¹c”ùIWÐ¥[eDQ"†"•ÄN滑ì£á'A-í1z˜Ooo~&q‰JæÔ†)–¢¢íG"ðQþADÆÕ3›¢"ïòqI ûÅE\žGa+µr×tÌ´± †¿¸[R¾CW•~ˆ9&‘ÌÙ·c‘’Çds•Æ!ˆ)”ÉUó'EtmO¦²I$Ì´½2•ë9Kd¢ö_‹ž|±˜ŒT.¿ë®D6–U+(o©NÌõ8Ì»¾´Âò±ç™STÇ}[öc6ep¹¤OSÔ¿?““¤Q˜ÄÊ«ÐIe³£ F ÎxÍq%EÙyyZ!´‰C:¤<⡉4!P0eŒÃ4+Š-LÕ’dYÊG `¸}•Jâ$]äüŒ5b9XF0™°Âœ*…r0F ªŸgÌ;.ôToº‰PWI`!œÉHà¦c‰„Þ$0bÎ\Ñù!àAªC6 ¨GÅ20deœì’…0v@íOTìQ9Lvf…ç#Œd ˜@„óÍéIV0–¸+¼)Ìt¥û˜ÿŠ9~¡¤N0HÜ)ç`bŒh 1ÈŒæÁKqÁÄAB`Ÿ!Â:ðsÞ½ð;å ÀÍé¡à«”B #k†DØHi€ÆH¤>zº¸çšÅLÌ ³—8Ë 1B Ìãº+³ FD»‡€é°Ø1)2†ŸÆæC#'¹ŒÃbW ÓÅXv²Š=*RJ?Ê0˜œ¢¶jFs 1†!1"‡Ç$"öé2oW/ÂÅÉ\%Oéªßîa²d ‹*9ÎT„<RC¦ˆ¡Ãª†˜3ƒ"#÷”Ä¿-#m@C„ôPP*Ód 11ëH¨­pÎÄE›ˆ„¥GªÝëÖz¬XúUg^r94‰‚@™Œ1ˆˆ¡pRz q¬2„⪅p*¦«ÌŒÂ&1±6G}Ts¨b ÅcY÷4¾Ëò§q¥¤›lB,ÊÅ'·Ú¿&z‚qaß›V®tMÕÊ1’ªåRºþß+ß·Õz˜g;¥}{ZµåáU¬—!×§÷³h¤?š]ÃÐÌãår‹ŠFS¶ CŠc$‡QT4–Úi\ö-'K• ô–OhŸjé¬2ªåi–C? ”d¥xœ) 2‘æuÒŠÏˤæVnôN+.ZÄÄÂ]7œÊgÄ««¶’×›Ö¢˜Â•äeÑ6,. èe½Œ1P­òóÕלOŒEk>‘5Wè^2â~Eûv¯9T†ŸïJR·%\ˆ!EPÅEföYS7 ß2fg%ØEnÁ©&˜\ÍÙӑבÞÕ/ˆ!ŽU:”hísgUæ¬ôl¥IZíój`G^Zïz—i~Kb‘8‹B-j©66R’¤2³ÿm‹\ÄJ»‘ŒétÖ”FßN—t1Ä[µ+F£>a cJ^–ÜG0·[t'—пGÜñ‹â(©‰FÖ“Ç’Æ«¨®ÕfklMEÜ% QUQY“"FLºìQQ®r TrqŒËõ.¢ìº»9UݲßÔ®p»tÉGL)ÓѪ£&“ ì ìÊâ²Ê&ÒJWôÌeR‘&fÄàþø!Ë:šs©Põ¾mvVû¸FΚõµk%ŠŽíìspò¯rºäËÔb=VAÝÓ[w9÷w1\ˆÏIì/õ5ßHfº©rœGõ'1LÊD²¥‘_Ìô޼Ĺ˜èû^>”¯º¦¹P¨ö ÿøÉˆÂšáN:7Ñ"ÿGýcûžú ³’=å¯sh¾û˜ †rìd£õu)äÌáb :4ÛÈÀݯKœj ªI+À‚™GnsJüÅÓ[‡`‰PÇkÒ–r¿6Y—{¹2¨˜Üykm0­_ïgC°ˆw ûŽB¬ANÖ× ÙõçµoÎ]ÿF/sѶÊVÅéže ¯uåz&H ¢.4ÅÅ'Ò›çÇJŠ·l=èN-_hÂãeKHÿ³à·–Ø) …0§5M—“{I¯[²…5Låg#ΤsXˆˆ{?9ɆÝâiQ¢¬&ÖäM%¦)b"J³­ f'ÝW‚ŠPOÈ…p߸µáó‰qy¨F¦Û1­)¹·Qìëép¢oã;w UǵIŠ^Ù«Ç•,ÊT*•(¢5c•åavI¦mBEaˆP¯:Ù›é~÷Ê_û:'©¯ ‹"(T÷y̾LÞg9.»ß²!H‡?M$ÄÂrÔT\S±$6ëHèÝÿU]Ç5š”£5‘f1ÊHŒ)Ñž•Þè½nïõ« )NtÊ*MTc“z–Ü«#“êÔ«•B)µ\±%T#Èvæ 3óÛ‰¯µÜô+ªSˆËMãmö!qh30a-ÛÂM§ð²Õ¼Öb&ºa z`•wÖ‰F#µS3ˆÜr±EpaHÐÔbYs?õ»Pæj+JH¥nDª4©š²Ö³üÌŠc À‡3-%MnýïµstL“³qP1&£%øš«,«AO(íÅ ‚Þ¥Ò_ ¶[šRµ_ÜÙ]–ZʤûpFÔˆâ¥;[FÒöUÉ“ˆáHr‹I0%£ÄÂç"L©32NìëÇU¹d¯á‰!hGԢꂮèš6™8þYÉ»½³H´ãz/È‚¥D1rVÖÞz®ëÕLƒ b¹Ÿ²i˜¸kW³}„¡¢-Çfô×ô¼\d¢J c0A±0¬Çí5¶k8¤#ТHL±ô‡ÖÄOÒé :¿«Ô'wf”Šå8Ä$â …‰J?šOÙ*þD™bsu-µb—¨V#TìëU31B-ø¬síV‰„J‹äUûo¡o»bHÝÉSP·7£j,‚cC0%´WH°¹ý>ý¬²_B ø‹eCÍNµ›ÇYŠçe×$D±«ôlsÙ–Å#SèÜ-©rnw¦µMqa™‘¨ßË„QšAMìPª´!0›Æ×ÿ’”ÜÂòúY†‘f/«j³”¥9Œ[5W ¤F~ö/§ÜD¡ô’2T„U²âèU³ˆ3¬ÖÜïž]ꈖ8ãŽ9’nÄcß·–œo2júFC.Ьû~ÛPK;GDUÎ)WЖÛ% ã1@ªæž"»Û);íIé5ÉŽY Œþ>¯×軌æqÎ8EUX¼ž[l˜/cÆ;9QêCê5‚×i¯u¹;ЬÎôº”tÁ–åa˜Îõ& ˜›´Ü]%·¬)ä@)¸n½5u©žE`®8)ÐßtçÁuâÔÔùÐD¢«(´VªPŽU^ ¸…Þ¯Rcá‘u½9¬õ?pÝÛ¦KÛÇu+˜ï†Ì¥8ŒAN`\DOW¨n¼ú[Zä3=>”ÅMÄÕ#EtÞ„™l·ôÓÜëÝEJ.P[á>^×2•®C§*+ä¸Lù(6 ¢”É+˜Eeò e¾ïpš·AU•ÌÅ6 áI¹lç‘©Qñ3/žýÓËbÑ]—H®1%n¢õsO¤-V‰B*¡? ۵*È6¹Š“¥H@¬Bz㓾ۘÄôùšëÜ™åÚ׉$ˆ„Ú¦õHaV¤`G:6²6¡q3i¨ejW’‰¸ÌÈÄÒY/9õ<ÊŸ˜8Á‚‘–“"}pÒhûÿG$‹f\|j~S+øÎÉÔ~+·:Ù†pÃ39•S5ú¹j“3;ˆ¸Z‘·[§8ST”iI¼¼e¤Š‚2!¾[*+d¿½.’Ö'¿cÙâl»gZ1U¨Ì½NÚ®9jw?“-»»#çéÖbuRtÏû-T¨@ªæÞäÂç’æÑ$3¨9ìèIìoµ¯ŽÄÁšS Êì¬ÕL@ø‘w(Õc65‡FbfÕ˜‘‘FŒQ] ¨X­ºã8¨)èé}C)Dì`¦G`†xl¢§ j†9 ¿<$ˆÂYÈ7rˆŠ„ÓÍ9!pENdJšâ# X(e2ø© HÏÕXô¸D‚DØ£vÛh@€•“pÐM‰ÈB+9T•΢úÇÅ0õ%šœC™Ê# L%Îf6#Áˆ¼AâK k‘6AX (IÁŸÁ „S"0›1±Ck„)nèô°æX‹RþJg&‚ZÇ[_嘈ÁD¢.dIqŽÌ/£¦GA#<<‹ „Uµ‘ÀÅa‘‘›Â6úMÀßê#Û‹‹”UnR*¡M‡ŽXvUq @Ô‰c1²WJhMA’‚,9hé9;± „Ù³”Vm[F#5øn%mA`VÄÇ )%”˪‰†ìÌ\ÆbD ÈV(c«„x¥^š§T!Bh©q(@¦u Ž`ù A1 *u6ñ~Ϊˆ8™©`g$^âè&4jb ±‚NÆDÈéŒeE¦qñÃáÑ* îQ ³).NC.s\&%uÐ2(aHÔ˜X¯ÉB)!A©Ã¦¼$¯…#`„bob†®¸*$5×2`”æ)ò?^–#g¦Hc"ðž¦î„Bˆ‹2ŒFã0£8âJ‹Š79—gE©Ô‚£s’™‚ !‘ ˆBæ&cÈŠA³p‹îJ©ÕF¦hÓ¸ìQ1F·f (Ëy A D'¤.RŽ‹H#^LPjðˆÝ\Q Æt#ŒŒ óVCáÁ½ íTs–¥Ü(ën’f ÜÊÂÂ"a0BB°J`ØA ðë ‹–£±9¸´zUˆ­è‘8Mé¶$E#”AX.ìaš"©Ìs˜çc§°Æ1•v"qA;ˆæ¦°ÍØÄ6”U0£+tîôŘgx©B³Ž©ˆg3Û8…5lB³¨¬ ÄAœ¢?Y–%ب6 ‰L{R3¢3Ð8Í bætxörÔ\T…u–:½Ê׉­B‚Pbma%@fÔò%T¡^ ã* 8 œƒ©ÞšžlÑ”$4„ˆƒsˆêËPöáÚc©_‡¨TJú:L±÷0ÜÒÖ!Hí aŒ1»ª•®Ba#óèa“2]$4“398ÑQí:ò zAT0Ê)…«»$†¢ &¦5$Bj¸e@D ÇáT:@…Ƨ  G x9%øërq3©—FjfÂE¥_§k0‡0ô¯ J7)PäËÂnˆ…`ÝXêN FÅáe™¸,RäN€ˆFăüí”4ìî1ŒŠ@Ý€ÑóF!–—JAz”¹ð8G¡" hb›³6ä,n ÈlB G‚ó Q^.ÍFN¡ÎƒŽL#ŒÐK†ê ƒ uæÄÉhöNL€S!UÊ¢‹I’"…Ò²Ò†Â2 ÷!bpÙªw¡QøáÙÔ ”C3ðâV!‚(klÀ’%Tº™Ñ~…æ5u^¥iŠ›æ%ÿ¸È0Íœ#0½°£ Į̀½ó» ¢T<°9—Ö`#Vp§¹FA”eff€ƒc|aÃ~›e3 ¸¨»ßÖ‰Áž¸ð<˜‰9S!¦/‚("Î:X¬S¿å£è4lƒb T!—ˆ¦NPŒ æbS–û 5(¥+Å#8ø%KÁ°B–ö° ŒÀn5†äRw¨Ž0®x(‡ˆvÀbÔ D‘Ÿ^a»"0f-JHƒuÇÎPSZ™jæ+ŠnF$vÌGpc”X¢ ¯#°”LVMÁQeUY øc@BªqŒ%æ›K"Vh{Ћ…Phç2…Fs–Ñ¡p”Á‚Ó ƒª¬Œ¾“À'œÌt†BÊ «ˆtºÀËL̈2‚¤®ÇNøŒ­!‰B3ŠÙŸrw«‚vÎs&H‹”Z`ÇÝ Ä3œ¸$Ð@ÐË…Á##¯AN a°ËP†qNˆºWΧ!„ì,âF8I—‚±LœAc9*ƒUŽϺ¨A…‰¡Œ~ AH|4(=ŒMV$yŽª§k÷)Šä ÷5 B†ƒBf%”¨ÎIùšÞêXÌWš7´X¦nd1#ªJ04„:×=sT(ãàÈX*ŒR…,e ½Â£á(!˜¼$S †P_ÔAú‹F ,´€e{„eN†Œ(J l2‡¤Ž×ô z®5nR-b®Š¢* 4bÖêDuaJeP‰ˆHÆa4b3«ª‚ ܼd2,>B¶P(H¤Žãb`àTv’@DåaÕBUZ¶Ï©Ö³ 8*ÞDh¦ ˜ìODª&q ‡E ØÄáÐfÌ…4³â‹æÃTÛ¡Ýê¹S7caSd¡œƒçŽ>áíå:×\u_½Ì¯¯ÏDÊWŽVÃ8RŽËF‚ ¿¹R¯`¸Žî-iL¡ Zÿg§V¸ÖOC>²©â+•’â“ÓhDS›µù5™U_òÊb¡›Ùf_âñBЩ¸c¦6í$¹0%é]AL²nÅ3žÕR²-OT|Ò”C½+ã,ë²Tb†#Zšq”›$³&¿v72žŽÓ7ˆ)ŠL~éoÆË±ÕÊES)™ñ—|™)¼®«ŒB#g݉{eõJ»z:Í'òPäD¬ËRxͦ¡"fY™\ä±U‰ŒÉé'ÏLòâcåÆ~oÙPƒ;ÿw“lNó#8©û[ Œe­9Hˆ$L)F"õ³Çc)±šTÈ€ÁôÿøÉ˜Â›DN{3@ àð à¶ù´e?‘hïõ÷a‹oÍqj-’g=fü¨‚(ÕÓ- ao¥qÙ=xê‘ ÷O¢wÑÏGÌ{2¥õ±~.'aW˜÷1rC}MqTêR,†.yT&jaP<¿å)H4û:É/ˆV ú¬AEËàc»%*w=oºS¸–¾¦yÙŸK­"‘µq˜¥ÂíÈËW¹f)0ÏeÇ£¦1Q­}–ëMz×Xæ]ãk/J»éT@‚kLÉEQkÅ0¬BÞ¢1Ó¼ÌT¥µG!õ)s·-¶¥JWüfÛÏI\-eÁß7|Œ¬‹¨².Xå;rQÌWj‘ÊT;.»c«Ú\UJ×(gõüÄ!5Š®Âvï»ÿ¼Å:§rÊr¾o¡—z¾KU·ßnrh¸µ"»Sˆ¹lùM¹ˆ•/™M´§¨wƒ"…% Ã1…á Y¹ÁøØ(¡~H)ÂÖ0ã€RÐl‡J˜ÝNÌ@1ÇGÀfઈ‚ƒ…@ÅކÕ7f†HüZˆa`Ê(E+FŽ`‚—Q_“ýÓ" åˆ`œ`ªV “áëB¢bŠj)Z!ÎYšŸ·'ê(ˆ"6¹ƒpÈX„ã\ Î<%°‚ÌT§!2`¦96¬‹“‚ÄG"•T¬²›óéÜÒ±= z@nnÉ`bV†ÄÇv" O¹¢Š ¡*æ/8ãw#²F¨î¹¸Õ4æ†èiHˆF‹ù¬9MpŠÄ„JGŒ"Þ#B¤ÏWĸi÷£Q¨™1A ²äB`›. ÂVP¡5!•Nz.e\,!N`R…%e6¡ÅE%jb ªÙˆk™uß’sR›DñF‘Ì0â'+ƒS1HŠ»‚ßE 9ª¨mÄ’##üA‰ÀŠ¥͈椧â˜gˆ+­ Øð£î5[Rqé‘WÆ@˜4ÂÝ>DQŽÊµŠc± Œ\ŽÃO¡IXJ>ƒ‘¹‚º+ƒIÖÚm”‡dÆÛÓ ¨ÐÜ.}ð%oHz3Fë¯êS dùœ¢ '/N!2©a>Khœ† Õz(bœÅœ±*µFÁ A9@Í@‚n[ûSuY¾°në9ÑÞ’»B—D3Ä¡€Ë„;Ä D57¢æuÂ…KÔ•'\dVh|åî6™^؈j2ì¹zUŒ; ¢"‹;5a Ü–Ä(‡çdˆ ÔO´ÂZ’R º(¬å(ܽEÖG‰5Jl\ð+aŠf°È©XøŽ«Ö ‰Ðä+™îXÂÖ8iÈùk±8ΆçB y+3 Èšª m´÷ó"ÀŒØ‰ø[û &ÆBß~B$´ÁF|bøYüÁ#™ Ö!+©˜Ú ³(‚²ZüÈR6Ht‡3£.Èó±sŸ¯<"̰LãgЃ@Câ#F„!! DsÈ=Lù–C´{K…ãáVå,X„8—Qœ„„‚ÂÔƒª¾fYœ'hÂD(8ïÕÀ0¦Iy¯%+Ýu¸Ëø¨%VVÔ5FäGj¡YåYVìkžB¥ŽEbòžÈAh.õ6ü‡‘®ÜÌëíJ„AÑ&B-ÎT¨à†x #³dig‚ÃAki÷ŽÜ8w*‡kgó!”Sr}yJΕ½Ü¼Lr2Ó„UÓé6ô¡ê>;HWb9R«Ì]¾Ó„)Ð\"ÅéG ,ÿ-`³Âà"\$¥w:¾)â‹ËLÃg:ªLG÷QÝ—u˜­cÑQK‰ëµñ9?xÜâ3­¸–,¯UD”ÓOIÅ:[TÌ#ÁÞ$7FOúß0•ÒÊÅ reãÍX0¥½å)ØqÆ%ÑPøVÊcºT†%ZØVD¡“ħ®T6v?ß“Uˆ9%T°Õs(¯8@QeáÀŽjTÒÄÚR±$J—ŠŠ”yW…Ç.>Tæ»Äe¢ÝIUB&;ìuUª ]„‚ÞHÞYktcŒÁP‹·Hìt0>QÌáÎu½ª¨:”¡tßzÏ-)9Y©_¶2gWh\Zœ… ŽArŒ´¨ˆcX‚Ô}~o‘KF§5([1ª¥Ö!HVca}ˆ2‘×yÚñ0 r¦› 9j3‚ ‘>“ËY÷ô§ZV…v)|Iû¨¾´"…3ñ-C½8o¨- qgc¡”.T{”õWº"—Ɇ% ž%¥÷#õ2®àÉ3 TªJ›bz*ZL–×+\¤Ø‡ŽZ>‘iYýpÅ¡Èa.o[Êã“Ò¢ ¤vœ”åM ›ž\/Êiûiz;;V©f ¬YdÛŽè&…A…‰ F&P§³4Uɪà“Ç“‡,¹[œcI ÅOR=!J½c.çc¤¿_¤ãI3Èý¬_ψj4Á ¿Lؤ ÉíR(tdOÙk-cV³Hq|—eRsÑxÃ÷R$¦ +Ñ BqŽDùt9QL6[ „²gotºRbê\™ÔÏ™ÆJˆ¨\ZœN䘖Aê“„B“I.ZÜ4!Ìv+]×ËdÌýÖáЉʽjß•q¥mŽ$©·iW÷¥¬”ÃÍJLBœ¾ºn÷ŠO)˜r?Í3°`ü?—&‡JhGé+æ’Inýø*Š‹Š'Ï|‘òZ”•[J¸RŒÜé^~(¦; O+WÔ‹·ÇŸ\i–…y6–„'ÐFE#òÅ­ï¤5ÿ°êá …)䨃µ&Ï%+c¼ª¥ÛwLF7…Ò0‚°)–¶–®…„¨]6çê¹N(]Ž(…>ÐíÍÒ¦’—~[UYi]ešY2¥ZQQÃ!°“˃¯V¤·S*T±Œë•}>®¢n»½èœTKŸ–«ŠéfHCå”C76·Ç³ÿ ²þ(É*%©ºÂ©7LIœ09/ˆI%°µúLùËbb\hXJJU—¹³ŠAHšUÙaTÊAŒå%ä*oš:¶ñ¶dì{#ô,´-˜,¤±¯¦¥•)KèTð¢zÞ£TžCÛ­J·Øfª#/„$ªýE!#HÒ-…=­˜¬¤¦~èò$R? G_½½ÑëRúzêruVºG!(«vc˜‡0e¡dÊ@š]¬ü3rÉ9ý‰®þÍ‚‘#žÜ,©LÊWa.ò /“d>PÒªøÊ@U²¦”–ö+§) ½öE+UÔ`ÍÏ‹·‹­^I”(Œ"šˆTäšãÄC5脊n(mCGï>³×n{<‡!™ÙPˆg£JÔ¿Üf•êš_j¦ÎIrÒX_¬Ë ¯i;cµ£5‰'…jP¢‚!ÀáX·81Km©©ôÕÁ ¶—ž7ÿƒ—'õ\4Œ#šˆŸC3ܘÕÂY|“1Œ‡R¡‹ŠÊN¥ºO)—×-ÙèÄ1íÅÜ•F P;,“EU -a|ˆÄâ6Ñ<‘°— i ˆ/VFo]^%B0¨Wz·‘(þ©Be)v”Äö¢[é‡\ Ëó3ÉkbËŠ“ÐBˆ¶Q—¬Ä˜l¤¸Ù!x³J-p¿ìÒ“|œ½B v£GH‚­)}v¦Ä•èK)•7Åç0…RHÖä½›‡¥J×ÇÐ×Á,Õ„SŒ`á¨UnµN­S/v*¶%V2n+×OÔ&J/¾Ê#UÈ;Ûk¼Õ0é VL¸TÒÛ iµ2”·*[×ߢP¯v©ÍŠJ ALpÀC¼ÓÜ;{ÉÊj>Lz¹67dÑoTöììÜ+6.IU¤Dª#–ËQXêc¦Õ‘ZåTꉢÌ!>ޤ3‡-k.h÷ÒKiøe3Ÿ…;¡©Ä—:™&/~©J-ÔÄ[a’cu}Ç1Èã17Èܦ?®˜„k‹…ËW¬J×é¸*-Öå-<õ<üœS"Ž*u¥"¤Û7—ˆ–,‚¤²¹{ž¬—T°ÖZ«ÿ˜c<ÂÔüþ]’Ùb¨ÄôD•¨´ WÎÅ”ˆ¤l2†nÖ,–Ÿ$Ów4Î(‡9@D£Ú²>“÷,¤»¡ÒR.'/Ÿ¦ÃÔ”¤ñHa¼ÞÙùÌÄN†C-ÐêÕ#i:SxKï Dz ÎüIÒnÖÄ—MAÈ“qØbŽ­¬»UÔ^ê8ÔSJ²j¯–-)_?i*rÙªèf#®õ·hr”á ¿AÊq$z>òïêeã[f! iíœÉªÝÓPÔí¢˜ 1¢ô¡JZkÛ¦²2©Ê´C_ò0£SUJ,¤Ù UùÐQNÊÿã NÙ×ÚÉÔj8Ÿ)®×¶?敼×EOðŠœ˜vÌ6ö Kâ‡mÖ ƒu¨òÓ”†4˯¿?ÉM¿¹9«(CÎÝfÜÂÒÔÅ(üç©ÆaŠs;f+mº…TÓQ»Ä#LâÉX^A ¬¦rˆN×¾‰Šù}c‘))]ªªkoÊ}ó?›P§OõOw$†0‚#·ÔS!ºSO•Óv“W5Ð÷7“ðõÖ\ ÷K¡Bt›löÑèŸ2"²i6Mß6­ Ä’cUˆTnêµØFu×x†Û„ sqXeÂÚ©ƒz’¨%½;L›ÚNÂKõÜÚʱÔpà)VÕ”*ƒÒô³ÌKBôÔ"¸LFB8è[6*D5_‘aÊìk¬ª®×RŸ‰Ô ¢u]VäÕòa Rn²ÝÓ.㘌¾!gf-„—ó…¡´«¯J=Ј¤-1nÈØ)5OºÖã’0•z/ˆÁ•L³*¹â&­›”/_w1œ¨ŒÂ§‘±d4š4ƒîRÅ0w !70Ī¥Ð™¢ŽU§ñ®þ†LI5˯ÞLÉœwÊŠO©ªÎR–Æ÷ÅÊ'œ›ÙŽªÞÿKåÿÕ²×w¶}ÖC #‡Ñ…)CÉBX–y¤ô°jû3îUGßëEÆg¾ççñ±fk”?ÚeLœ£•%f!ÅBø…¬—õzÜdOë± #¾žBnW²Ûçb²¬aG.°ÄrË…Îþ­ ÔSÈÔvóSr¶FϦÐZ˜W:`¥!Vt‘ôŒIŸ´™å«Ü¿_¶^”J•!˜wÖjåú\9ìîwL PBÝ’¯Ë´~zµ¾ME¢o'K¥z–ÖbW8‹Gܤœ¾„#Ý’RP»CŠL«8šŽ‘ͽše Ï{HÝêÎaH€‚æ«ÔtZ¼ûö!2”gzŒ§>¨Û¦©kÁ4[]lš®^Byê“7Ц[Œƒ@;gj){‘²Ö&‰{$ÌŽ½ü]òH7½4#»˜B9üíf¶ý.œ% G%1¨æÔŸú­xùÄžW1Y¾Ä×HŒàq‡Y|a:HNÓQ9g¨ú$ƒ¨R¹úˆH[Ë"Í "ôb!Î#7L´QnY}s-ú¯Ÿ!.e÷Õ¢QY’ìôRŠef Oä z!¥èz"éw¡OW¦M¶Ó æ¾éj¦%+„Çe 3È;(† p£®=ÎRõšÔ¦ê.ú%Xéœ×-èöq4žô^ö¸…è\Yt¾C%)ÐÇs¢X™\—»Ö/æ¹Tî+ù¥_Øjöµ µˆyÒQÍwß=*$ŒL² ˆœ#È–9)ǹícÕrÔïÚ‹bá%Ü„;”„Ñxíd$Äú–WR6þ wÓ.:ssÉ/~9ë½b-ÜAc-Ü¡†³©©mNËzµKD’»Jˆm"T:ùÏCIIzU0ÉêK…!RE¢á¨­uÚŸdïïzÜ_E¯:‘¿D~éØT˜œöu€ˆ@6€¨ <yh@*-±ƒæïBo¡ ÙÛ·ëÔÞY}'Då1×§8’[ËO3ÁD9Ó¬BVŽÍ¨Ä+j]Në‡7wLWù;}÷Æa–â”Û]éJ㜿’´âŒ#<µ8†¥äÑ8t¹#^Ž/}yýÍÖÆ0ŽäL¬¹G7ÖÉgßÉLÔ0¤b>ŽÚòP¢ÉåÔ´.ëºûþ¤ ¥+\c3Д¼¿êa{;˜g»\é뚳잒M˜0SQL©NŠW#E#7ðÄk§Je>9ȹ_M/wÍ¡)¿FYLÑLÜïn^D§s§ !RWñå®pïZˆ!Mõññ9Id³ˆòdbHÌiªD!œË¤ZVü=ô³wŒ5š¤éwˆä!ÇBïe'J¬YäÉÆIg“(TI+õKQF2TŸZtÈOêþRoóF8C¯›ÄWÌ.öÒ„A‘Ê3'«»OËb è½±ÃôâgÑ»°’CI‚1Éê+—tƒ3?Y‰uùYÛ*G‘ÍÊÈæû!ÐnôFÇÄõ u§ÜS¬"â—SŽ/ò†ø†I×¹JÉ´'`÷4‚>ýýçËþ ‘N¦7q‚ crβÐv±+ù‚–Ù¿Ø"ã‹è›/‹Ÿ¿7ߌd1ØD”¤måA_ÄA HC6%HæRReÒòÕiDöù=1ºYkLÇgØÂœ‚%jJK_lß•‘ÑŒR9D(…R¡J‚ó‰i+Uò[8¥ÙEm ƒþÉF3}eÏ¢ª›¯ È6´¢ j5fÙò>aÉܧd Ê®q›ÓC§.RgÙ Åm–N1TÉóòÐ.j'ý»r²ÍAy9eaEtKEäJ6-y¦)v„·¥Œ˜~/jË,»¼é¥]â(R#µ×ˆíõÑÊÂ5B+•lF:¹sI–ôRgS¬[©Éj7©*Û#¡!_Ø¢›xºõÕèöWe4å/VøûýÞŒá äh…‰…rî&kpΩâˆÊÞÙJµ²Ó"Ö›FÖÆÞV³éÂd‘H¥ ¯q]É!d)§ò0ç˜J<„®žÿ%1¸ãª·oò»›hSuIΛs#‚1 f÷¸S°Ž¥®8¤µ·¯»Çc38Bù÷îfοV¾!KO1 AJ†®qPUVhœ¤ì ‚µhéºè;±L©Èì1×,Q‚-/ÚÔÝ_f¦Éóü‰Ó[°mæ.2àˆÊç#ÑLF9 D©°ˆ¼©¨×æ#ª6’\+Â[°gæ]Tw£ë”Ïç¢.# â8‡.#>»Š~(µ§òŠ)}kYò¬É´‘܃³)î1ŠÑ‘)ƒêjm²B‡.öáT} õËÚ|«7™ÝÈe¤q\añ®­Î2§œ‰¯åÖ“¦}§ar™D•¹>_žË"égB¤î˜È!^D3¸¿ÙþìÜ¢kÙ …J—8¶¯ÖíÜFmU!îÄBTŒsÕÙט„á<´þ”HŠCQ/„08P©Ýp¥G&@JÆ*"SŽÕW1@a˜‘NdnráÔTõ›ì8eKˆ*K˜†1ˆ&¢¡c›íŠîqYàQÏO‡üQ> `Ù•ˆQƒ%2jaD iÿÂr»ÑNu¥O‹Du P OX#%â\ÐsUŒ¶#¦©³ iÔtÜ€‚+)C(nÀ¸ãîxâH¦ X™‡DBJÇ)EóÆdåLB˜ ˜Aˆ"’\¢2)·µèâ¾´Žg⯣¨ÖŒˆÍë&aˆÂu^$ #æÿ‘†f®°¶1µ°=ÙL‰B„^”++ze|) ‰Â5“ CŒ$bóœrüŒÔ$¨¤Ä‘’s<}D e LÚˆCFQE°OªÅ™ò*â%„$¢?¡£ bhâTQ‚‘ÊÅ8@ì?aÞâ΄}‰â«'"¡8ÐÁ™Œ4$!Æ?$)š«/ÎS*ÁTu裄A•¤ÎÖUJþ·` Š êÂñ…ôî£òÇÍ``àÝ–¥lìy‰aš¶)`Тęà¨c-|§‚ I! !B%ÕÆb%'RÚ<üÞ9Êt}ftå|_7¤6îv˜ ƒ cTÜ 0Ô¯ËȦÐB¬‰Ž(jƒ(°ñÌr L71E×#šÓˆVà ¬¦CLœŽ Ä=²+ Ð!Ùw¢Œ+ ý'a‰û0¤Ÿu@Š2R$+ŒS ÇƒÑrËs„ ¨Gg”n .­B2&Z.rê®b‘ØwqûüÂâQç½´2PÀ †µ„È"H ‡!€—Òº"…PZ*À鯂V˜zªxHr!‚çÐ!Q["EE°ê£|!©pˆLP¡¡†1•ƒ$ŒQØ8ñLߘ° ^¤ç“$'Æ l1hY!H‡´Ô K°†çRÐ9œr)'¤áGLˆ*0Â"—QØÂœË *ª BˆØÛÏQèÕ`œ¿Ñµ ¦'¢ÕR¡³QƸ”A•ÌHàP¦A(Å;­!Ba +5E0*Ž! ´u¦ ݇™ F ”!a0˜âµn ¥„ÄçÁ©ˆ„Ucª9ÈÚ×C±oý¬Ä5H¦–b0J^ÖÚнþƒzýœÄe£Pr ¥QäWV©"‹«’=öªÕè´ï»b“ˆF4¼£ˆ•,¿qŠÅ6ĈI;UÊoÓB J˜y§¯ªk÷„ü;u=Ä_ ÿc„äÚ–ùZT•ÖO|>ѳL‘,šMqÕB:²Ÿ%Pª99ç_&–_Ç<ÎAÑÂy K ’ÞÒR~W£¤¤¨É—yH‹œÚ›Wµ 騅pg+9*®B¡TeÊÛ±lÉUò? ÏJ=8G`‹þZ¹ö²ým­ÙVf1„s‘ßol—©>2*•I(®ÚÉSÑ$ìꢈ˜æq® ê_'ÍNi°×Ö"”»žFwâ¡b2nò¦é/ggc°ŠV„Eü hJÿøÉˆÂôLúÖû¹üæþ{˜:´#-¯'ÔéxýüXf°€†,N‘)Ö£Ò¬)ÿȹ¸Ê›|5÷‘•šŠ„—}ÁPî¦RzH¤J§fòm)Ý×Bi½Œ´¢Ë"¯‹è¼O¨ŠQg»…sû»—¾‰jU|Ÿ¶ûéÍ%yy{Ó•”‹µQŸþõßR8Ç+Vô!UÔC#q9Y ¶]å0ƒ;ý¬SôþH¿&Íþ“®8æ1JìF%5«ßß„ú¯£;#{±’#œ¼š¬š*xL›êö"Yp§|nÌ”r¹:ÙìŠÏÙlÓ¾+y2_ß1–óÆ]”C’£2£ÊUNí7ïãq<¶TsëÊ|¼„]¦ÕsMÏZ4§)ˆU ånQ ßb³îÑ«ÈõÒÊ)è»ýÄ¡5‰£æ½º§e0A„´ŒæìD&õ5—uyö–/…#.ÍÍ0®NÌ„ÀÀL dpã f:Dôã~‡Ná=ã›¶§À¦eg|u3Ú†qŒ@gf€ffèÊÇ}ÎãÚ‚+Üf1Š w¨Æ`s…ø¡i‘ñ‚"W¬ªÃªËŒZ순ms^0á@(¨0É^‚2!„ Ã0v¤ˆ‚¡øÓ…BŒI”#%ELPò÷üN. ›ÁDŽb„Š¡c*—'›r‹q–‚A#Pç(Œg…7hBQ†  Â\agšŠÐw„eŽ5/ßœ<©Å^ÓÚ¨!`Å Ê`„%CpÒ-dšˆS„v Î ©æt:`â«;›R5€‚A\fQMåRìF”F>å3ÑCq #*ƒÊ ÁP¦`Nó3£y¿»UII~F.ôÚ!ÙZB‰A9VCz"0‡U5Ž+;Éz·6›D’ÔÝ"5+´æmu1È‘©ü'™‘]Ö¨®S¯fˆÎ”-¹Gæ%X8äqpÙJÌn'ÕHöG¦}ˆbç¥míq7t¯By—Y\—©hòSUŠoÚrç©–EÜd#¡ÓIZ’]guz)¬_úaL¯ˆ©Ï¸$ÞCõéHÔ1B;¹TˆG¢j ‹úÄ4¯uÿâÇÄõåµr7~N]¥j#™ÈB©§yLÒ/kùr‹!~Nü;œT9$òÜHñú(É,7¬ŒÒŒ΄0…"þ¥ºú6ñŠ7!Èo§”‘2r”Oʃ8‡®vœ•Õ”*¬”±Ä(òšŠ¬ê¥W±ï¢b%¿%e^»MR{´rÕQŽâ goáJtn]–ü˜ßÞ ™I9,Œ¤rɬNybÛ›Užô'Y:†aXá”QWî•’Ú¢U*N>T¯©`‹'QGêgO÷Þ|ĹÝ^ˆîȦ~¯"kÐQ®N*•ªrm{UU“Èõ'®{!¤WDÎZqVÂë§7Ñ$ ­”;DO»â²Dž.Ž1/z xd Ö#Žƒˆî¯FÌ»:v „ïgÄû¶Ë•”QÙØÖëþåÕ±r3EŠ»QU&]W÷Œ´ß\íG7³îC™+u6¤ŽÕU „êN:‚R´VúrLTñ MRP˜=*õQe]^¯Ñ*ݨ)W6wsa™TÕtz±jùÖѵtr'f+±‘u¹3¹¤u"Ù”ëgñ¼’‰©¥u Wjü i*#c25®RŒªáŸaM9ލcìsV„22PÍ` Ç• ÁŠr {ÂPÃ@†$@aŒ*¹UEO`V9‚4ÝÏŽA)p¤AX9E"à \Ä3(cri¦À„4 k.A3/ê„: à”ãÖdÇ Ä†C ÂAôq…2™g©PL3Ò‘1].¨åëµ#(vA(Ð!D@0Ê&aèM ƒ‰q±¦E!Ýï«XE =h ˆ¨+©™ç ÆR ÈzÊÄþÐ\¡¢$1·JÆ£¸MYŒZ¾ô¸ö?5O¶/€Æ.#Œ,Kû–Rè^PÁ‚ †Á][‹`™ô?*¢(–‰{¥¨„ ƒ@ãÂu–…ó;²)¡K›ô®ÃŒ÷!œÉɦ¯ŒX D™p˜Œ3bSF䣻ÀTªn~¤|D aAHy<ê/;;ã6¡ž @ÉxŽ"Ñ9Fʳ¡ž…k”‰¶‰ªP° P8£€µ„ó1Šd}„q1ù ˹£©ÎwQa•ª÷ãKRoؽv831t¤.}TL„yP¼=3¹ñ¹:€Â ˆclBÚY—)IUW/ã@›ºzYÕPR¿r:ù¥cä8àV€Ô¯r+Éè¥)®@"1NAå «g!L@ñ(2„^=8B¨ïšº8Î æ´Ë™ N4S!LŒHJë)w6Ù1 `Á»*h;‡ {5¦7@†¢ ìuuµúQ6E¦/PTÌÄ´"Î5ƒpCbQ‚ñc,RÄ$æû&eˆHògŒ»Â»ŠpW@„Çá074 ƒ„) ^ºq‰‚CåÙœV¼ÓaZ¸Iâ¾Ô ¢‰aNI‡ˆ 0f%eÙÂ)Ž¢ø ‹S‰ðu".{1’Ñ XCååjÅÏ‹€†˜SzâÁJ¼”rPg9#Bl †èGüXã&ÀÁDæEêÁkÚ!b«%0¢—:;PAº-…%÷aSÂ(GVŒc?-Xœ¡·ÉE„ª1Âlgr¢Û”°¤Ë;"ñ‡§ÀB¢Yˆê¥8¤9‹Q2!&„DÎV(eT LŒÌéùÅ—6¼³85@åBŠl"C‡ÇHτɘ„Uƒ9w:—IC À˜2|^¸C«(b Yù£* IWÌÄ@"htzÇO u#vƒ´ÉÆñr´‰?)(œŸN&‚åf)î'¨`#ˆÑ…R”#ää5÷ ó“˜*»8ÌréziHZ‹u’!0Bv=7MXÆÉ6a^9Ä}†+B±Ó !0N£+>çžn%Õ/]µ–:ªQˆÂ8Ö}‹!_–‘„ù â«%P‘k6gÐá‹k¬’¥BT.aÃ)<Ì‚L l4(ŽVÕ&~ŠÔ•Pj!³÷Š‚-a?´ä*ªp˜Ÿÿc5¿]Ÿ’¿½¥ úª0ƒ;¤»€X~p32vš^â#í¢gˆºÔÔJ:½˜¬V¨CŽ#7ñob„"Ký…W=¥æì2±P¸±xåÞµ;l©÷¤!}ÚVx…-‹Ò¢ÈRhÎ&1¿°enUÂR~’ô[ÅL¢îT¨mšZqH+“IºEÛMÓm…l9Tu•%¥„0‡dݩʩ³±ˆøµÊß©Na7?±-]nlm5vQn¼i ;Ù|E„Y‰’œ¥)X˜¤!Oö£«» ¾šFúÚ_ÂeÆ®ßØît¥½ÐæLZoeçD¨Ì켸"v?ÐBY÷ˆË<Œª•%•;=ÐA š_®=~狀*¥ Ølµ-è‚d=R—0¦eQœ‡ÓÙÕß¶T+®qzüÍO¥·JTn”¨”NC¬@˜C¬S!Ì ³âY9D¨¡ÝÑ JÔùÅD Å F Î ;`„¢AÉDÂkèR¢AI*"'z UN¦!k&2GÊhÆn D4…|Ca@;·("Tuc&"ªœá3¡½€Ñ/ˆ Ü„ö&2òªeoÅkJNñYŸ†X"SC‘¨40ÎÈFˆ!¶‰{X”NÝ]Äû•EHÊ¢ÓB#¡”Á§‹þ ˜ ¦HVËÒÒ™ &“”<‚ÝI.Ç¢AR©_b0FnÏqŠs¸´Ä F²ñˆ:aD0Ð"Z1ŒbJM¨#Rv°)±]¯)P,¢³Õ*ë Z…R DBds Äá¦C0C:S†b1 ´ùpú2T!”¢AÅpષ6#^Üt p¦ÚrqxÛX… Fq¯”°Í_cŠÃVhÐÞ›Ã,Úa~ÌŠ§áU)M[“RU+ì”$ÁŸ#2 ͈ˆ5Å}\`ˆP¸¼‹œÃãiYÇœ*AH@¡ª>1žåm5ܘ†¢Kr†–e¢n VTJ}ÎëRGÉè1©RåÄ~–£‘9¨™°‡åNð vw. BQ©ènBm¶d:d2&"%\°¤¯(b ¸¼ržˆx¤n9¨Ð‰ GJa¶íQɱó¤Ñ¡Êƒü”¤)bä€ÎA¥ˆ0fvœN1iŠ!ËÁÃ{öYXA}/TU´~á ‘Ë‚0JŽ6µ¯/!1‚aþf~̺† r§ÄðG˜ÉF ;¡³® 7A½‹¯Ê Ǫ˜KŠ EÁoÐÇ¡Æh 0•Á ¦ŒGI^ÿÈ(†0æeR@¬QE1™ßm:“PʬV0¦3 ²'r8ËvFBÕ§0çW*KUŸ¡¢Éß•å Æé‰ €‹„;.TeñGxbä‚Rò]'ÔA 5rEA‘D$YÇëÜF,WLÝœ«Ów¨=H% Aò ¹œCvìn‰ -Ü9)HÆB°çÁÅmÈ %) ( †FÊ ™ˆàÊ*OK «)ƒ/|PúlSLzÊ)ÌD‚ –Qz l…5@ȼ"ŠˆW¨ÉÄXbŠ‚)ŠB9Æ!Âf!6L¡LÅd Zh¼/^A½.µ<±\Ÿ”g–ÑÓ4‰ý]تRÏèK>$_6ìJ­Æ†j¨b‰"ðŠ`†ÆA³›™AŒ®ˆV…c*Ã9H}Ê.Z*!ˆ:#ô PR!GH0Ü@Ê0ÃŒøÁ†n©‘Ë ”’ž yé†ü#:0S's"©ªñ¹â;áž ‚½–Ô6¬Â-L.R\‘„#ÖGñ;+$_3Š3þx0RP!¦Âj#b%DD0E…–¬»Î™DÔ¸§Ü«pÜœå#°Æ¸d¸¨ÃÃ"‚ Cf뫵‹F?ϰb‘«¶.ÔÊfd …Y|.ÉÂà•#µÄ=6¬æŠ­”¢7¨›9 Ž'ÉTŽ%Šèf—› ð`¤jHgå:&q ¦wõQ\i—…5ˆ¨ÎBÌíˆÅ!‘Ú’ºÊÏtUM9… (Dè‹¿bjJ³{„âdÃ+®Gx@ª:(³Ê/O 0Q,QІd0OÉM` G0ˆ°„\&¾o„*áEÊQ£.¹wÙ; óQb²Rk`øÎ6ØE·8N†â¡"cÜeFšŒ—vÊ œs¸b¯Ô_Jµì¨UÝ  þ19©²@›g"±xÎÃh)Hã(‚å§ äÔ¬Ž1Dq•Y¡4A å"!†©t¨“T(†Z!ÐâD •*ëÚ±Ä@¢?ˆ”ÝŽY•ƒ*ˆ~C„š§ESiƒšayî6C P$–¡]žDrúTŽúS2ÁJF>lÓƒ‚ÀÈÌD>ÄÆ$R’3b'^‚š~ÅJ@A;w ×Gi0Í$¨„ugíiG¯èM_zúvæø¤·6È6ÄPÐcÆELÿšq ,\A Ò2¢Ñ!Ä‘¤ü°) ŒDÀóøNà¡qDœêûcÒŸ† "€ÀÜCƒTEP@e*F(Š¡{5Èç !µs¨1²–w0Ô®‡`É/œFnn @¶B™©ÈŸ ²»Ü3¹1Ξ¼€¡1{’=Œ&]Xä`• † ÍYÙ~¬† ÅÉÈa ©2…Ö0Ý 3(àð/Ì0§)Õá™Ø+¸„“)ó05!, !2 1„"~™1PÍÍè¥MNð%Ó šQ]Ñ1©xNôøÀ1 E2"8åDnx9Ø ƒü[FÚÎDKxŽBE1ˆÂ*8´ è„r„&ÉÖ¹{ù© I(ž†dÂ3†*ã0ŒeG„ì? 88‡Ì.p¨Ç"Š ?dÂÚ&¸¤æ6rª:7c0gŸ–·^~ÔĨµ#!¶é&+4"†6¯õâ*4®E;°+–Ö;ÈB%@^Ô4ˆá ”¸ÄÝ‹Ú d`1ÿøÉ˜Âž_Na€$€@ ØÜšZ´ Tèœ(ˆo¨ÇâD£N1ÒfHwšä… s9_”™‹AP $CsàU: F¤N3„cb2CDCBˆGdp”ãCÛ—1Ë)|Á\¥sEêiTŒ\ †vC²81±0e,. |s”p³œ³ „†š¸š¡(ƒT¥ÁN‚“¢ë+r¸êꈈD)º9h›‚2(˜$à”š L` aš{mHAT>P\þÕ#‰ Dy¿+7@GÂÈ¢PB™ L9‰Â#Kf'#?n(Þ`ØFQ-S2bD>ßvRòp¯(¨2Œà:”™¹ ˆCJkL” “rF'6_Ó¶â–‹:½G`ºu›g™„a°GOy°B0NFÆÄ¦àúQ#¶)73|Z% £cjcbú&Ñ&BÒg-*^榩‹ùÐê|JÜ6Qˆ2b¦20lù›Ù‹79§ z*°Z4É/-8§bAŒTw°ÂÊ BAB2 ƒF"QA"QÂÛžòh€ ·¾¸o¬(ZR••…,˜2‰Ÿ(ÜFÆz7˘á©wDØLó·à!¤Ž%FXQœEDS檴Zé¡¿íÁ¬ DŒÂå!úô3vÆ£D§Éš\'¿ÔS-ºOi(_“?'q”Š3:›s2ódï”BÒ3™—0¿¸¦ ˜‹$h±U• N«óöžˆÙ¸| Ûî¼eÌ÷­“YЕ©†«\¬ÈT~R”R«)P³ÈØA”ˆXš„ú½Zþ_»a©®?Kò±ÆONÆævÛŒ_ÔÔÉDLù˜›2â¿(‰R£Þ¿¥'íÜùüÄ—ŒÅ)¹§1̹Šgä¸UÁ˜…<´vîÒÙ÷¢©7èÆ´œvBj)mw£U8õa¥ åj9óŒ‹×£¼¬Æ—%}-G+ZgPÄÓûú]ÝTEp@ëÓØ…]–¢’¦ý2¦.beŸ¨1–•ˆü'\⣼­ûo²Â~µC‹_D.è¥çõoÿëK6]¹Mî<¨T" GT¤äk,8B'¡Ýu5Þ…ÓTŠTš™ÜYiËw·"4\X†æ|]+QÚ"¼¤gFS²Ì|õk=nµ\e»É©¢=*GjrVŠ”rn• „ùgÂý’·D)ªžìÛ.ÑÒµS—è¤&JêuFÚæôâ_#7¶TÒµÑ58Þ¾ž¹%þ\#Y5Ÿ2Ö17øÄ¡c9!е8è»ÈîiÖfÞ¬…_›qn’Rš1dÒø‹†–«zÛÌTòÔ‡y?Ü…Ch•uKyš„fôÛâfZ·–WœºS„!lÂ|…b¿/¶DªŒZ¥,¢u¾˜‹[Z„¶i† ö WᤱSXƒ±*u);Òt¡Ø™«q„^§Ñj[ú¢5jbÕÙ]„Ì‘SŒaIýRŒEÍÊâê!jŸëONëá³o±dke$:éFÄ áKä÷s¶nʇ?³9‘jW-‘²ntµ†C"¨úªvRþ<¥y–©Î#o3WúŽåzˆbÕw -•6UÒQ³ŒlÑhèE²Ñª©¢U¶ŽlKÑ•‡Ü8ʇ6[z÷R­yYw³ÄZ–A‘ÒI\G.Jpä|³K‘̪ìq~ÖrÒ7óžÍ¸÷ÅVÀ·ÝÍJ-f™Áh*:P¼^EˆûO»m5†-e³HAë„äÎõÙ)aå©T†¾ŒlúY5ÈÙA/yjc%‹é]{=‰­¸Ç1Nv9Îëþ˜¬ìõÕ‚"a¦éÕB×6’ ÉL®íØ9=i‰ÛÎA êŠwµ"ï«x¦:­Ôuľ“ )]}Zjž›'Y,9‚¡ IñF[öšE¡—Ždm§çSPrñrsdˆW³2#RRT'åu !S©3ùˆ¡’¯6Èï•·â©È•¦¶­?ùmm5ΚBM­B°M^Ûra¦(&2«êD=tI>V¢S³kô-˜S C´!„ÚPä)MªÊW¡¼ò(¥ôüòè×êvú"™+“ŒC=ó%1ØŒP¬#½/Ì!J²st‰Ú®ôº¿¾-„ÒáF#ä¢äeGö8¬¿ÿ¯ˆÇNc9p‹äûÿòmôÅCÇ~eÞ­E¥”éU÷q‹ý¸š´u&ú2VD×VÅ ‹_"âÊtd Ä#²H¯:Ž©~!EKaïæý©¯º]‹N£TÖüÕ«e\ÅúÐÖMÉ|…qE1Qír©“®÷v¹‰Ì–>U êJÖ†˜…g\Çw6’ÝÙ+¥»^•½u{w*¹û|5 îħ§8È3ºJb{#yìr”9C‡5 N9±êiÄóM»µDé}©ä¤¿=(æ+UðÇGl'AD JŠæ9¨[ú)оZ6îPõÚáur‹TBÙ‚ÞŠI ‹Ò”©„ä¤âú›Y×õ~¦^Y9¨Å”˜´Ó.ŠA ƒ¦iXuº­ù‚!ÄQw¶úµ½9¸œÃwÅâü–a*¥W,ª„Ì'Etˆ¥W*È&¡hÂUK«„Lóíéè–z>o–©u3˜ª®§b!ª)„"[r›…q.¿Í„.þš%ßµ‰”ÿÞv*ºäÿ'kk1G!HUDv‘xŒé¾½ÎŠœMvñ›Zº.³‹+bS¿5þÿ>ÃþŒþd>T~g>£läËeiù½^ 7~8¡›Î<Šƒ§?‰ Ûd!4”\摪³¥Jj²ú´ ¶q*¥‘½Q«×N$ëŽNâæ;+Ñ|«+È5Zš¯Å,¤I}1—HwŠÈˆ¨5X¼ºl%4Ø}m;{LþR=TÉT¢æªHJ®–Ïr ƒ'³r‘ i[ªO(žOåÅMÏ/2r„à†ÅTâžF%Ô•i.|öåNj—YäN#uÞbÜÏOU©õÕÙzþ–DtwVgoYÕm>Ÿl51>¿BÈÚ#”îFB­LìäæR•JihtÒ9Q¬Šó —Bc®Øù@’ WxÃT¥²j¹FAI2ïÔ¬Üq=)¢ s=Lz+a˜ªb­Úˆ} a¯ †_‘ ´ÓÊËu™…ƒœ%rÊf¼“xƒˆ|êš)Îã@D"Ñ~]ý“äªbrÿÑ‚,rư¬;Í‚ø¹ÿƒoÖQ1—KIIEÒ8é+Qϱ}yâ\°ƒ O p„œá‡¤nÙä­œõ¦ì~¯JþV½ C”®ºPäAÆ/Í*ÊbŒì­‚R’v'aïn÷è‰êëk…ôÂ.“j_#YQ<¬G ‚މ‚)R©obÁg‘õêÛq\b¬SÄVsûóœ´Ñ7åãçѪØä:¯"”ŒT‰Šôµ)ùF”%ß*­)¶AM¦ÚÿJÎ!‚þ†…_RF*&wÁEïh÷ñí<„šÆÚ×¥¢°‹d™d ަI^¦^"L¨CD&*c'‰¢àäÒ´”ÕÊ”ÅIÜ®xœwj„%þM¿ +ü€œêéŸ-õ\·zÌ_wÇF1ÇʆAF#&U*nyÙ ³W°öHT(¨™F¿ q‹ À("ÂõÆÀ̦à³G–-9ˆ[Í\úJD?ål7˜‡q,™¬B¶NŒB¨cL(åv;àFDËCgÍïY:¤ Zöí*êâ ™B˜ÑKÏQÜä­Ž„:Å?Ŭÿ<ÑWHsR{,å r¡¯Lµ q—ª‡ˆY^!Jï´î•YÉ2ÍT¨Åº› Qƒ:Û©B8ªó¼P½öã` ) ²X·±Áž4– ´–ç(ž5å® ±ŒŒ5ÖûqÖLÉ~„ã-ÂY1ÍBLžËE;ÌÈä#¡ WY„Á¤I¥÷©$µ:óûdµž!@ aâP 2ý£škhDiEÆýCD’“1'ÜÆ¿Î^1%6úz´Ï¥`¦ùÌ0„tÒTÃà´?Ö«zþ /ð¶‰ãC ÔLí:¦suQ £˜;ÎRÔ%h>“GµÖÍÀç{mmÂú TN!§þpB2†"*îrjxNòÚªÈ&ÚMµkš§(¥¡òXY ÁQ0Y˜Ó˜ÅY8)L^´^Y«‘H@¢ŠÑS '&¹nAÊ$ŒL–_¥²ÒÊ~ Z©î|„J/•B­È)Nü/™œ€”lÚm°0RîUªÊ!ŽpAº®ö“þ¾¯5bXÄR:òÃ)(_sÒ³<‘háDÓÑ+†;Fy\®1 º¥&r-)v˜y1©0Ùku­,ÄTü˜œ<¶(© ÄV¡—Z3 ”„>9Zr4Ÿa‰±î¦ÎyeÊ %^ÊÎ8`Ì„* 3D9ÚH€¹i‰z©F´¶Êp!¨i ް —bµpW@À8(@ß8Èv!gŸT Ŧ (LFž?^[p»¹¯ÂívR†© U;„™$0÷C ²vªýx¯ÄgvµÎ[©Ä%Ø;ò.d#ýP£˜RÎQä\8$KD‰´¸ï5¥Ø¼|Š¢NmàCt• ƒÐ! Ô‘µލ"=ܤ+!jºD¸RÖÒQx¤^Tˆômæø-Èw¿\ÔÌ„S%ÂýU똽.r6T.J+ ØbÌü7›lBqÖÁ¿iBï0gU„)Ê`¬IPZDZe¦˜×ÿÎÜC(„Î-\´f]Á[Õ§* £wúJÁ ®Íhýk.ÅET·›EiT†Šz‘D&d¨ÞÉ#TÑbK£ÐD0IbROP‡HKÿøÉˆÂŸúNô„óÆó·ôYõœ÷UùJûA³’}ÒoŒsØÌzØ zâxa.ó"ÿÈ+ˆÜå½MM(PVù ç¥)²L¬·GÔÕ3‚«êÓ% ˆ9%—16†t?ˆ/d†‘ T!È’Ož¿DØÅ1K!wsidŒ¯lf¿}…¶‹wóE®ºÓÔ@«`„ôÓº]Œ¬Å亞¾‚Â@ô®eÄœÎâÔüÍW eM¥Û> Ò@B*?e»½,B¯½KkyR·}e±ÄJÔ …)ï“)ç)$í±ó;Ò¤¦IIèJ¦FnÖ”LZ Zõ,4¸ Ô¼‚Ž"WîNâš))nR @bZ.D&ó†)CTƒ[D‹—òDÅ Ý\¡k]!%"Ž|Ò›wH)%!„ƒšò}•mÓ…q^×?àOè–AVÒ;T^M°Œw‘PC^‚Ó¤%‰÷jŒ”GØmº]8uÛ—®“µ‚ur Y(ÔE³Ön3Š:‹f©»±½TÉÍAs±º»)œUt•R—¤ÆD+§­»{ 6W­Ô^*á Z5UÅc”áŠ(²é)èBŠØö²Pæ˜Õ/Å^•ªjz‘ÆÄϨõ ê­A¹Ú3ú@‚ªr[?&Ð" ´zW;Ëòl€Š3!z\ªaÈ?EöRKs>RÓšV2¼›ÛçTÎ@„PPCš ,Æ• iüY¶’ªÞtS×®ÈÚIiB½¹ö[/ý™<{´†B3á«z æR5伸q R¹öèfÂ1(Z±äBŽR­Ì`ì‘msO»»õðµ®âS†³-3uPü™#juPºŠË÷ĬöœVGÙPJ`AÛLc)¬cgÝÕ # ^g¼¡äúí˜R¸ï§ÑmÒsMOÁ[‹æÂFÝ£^çÔ8gé±Ð½SB³HÎ?O½cœâ5Ñ×|œà®1ͬks\9޶¡W5rÿæ‰R(O²;nq‘'· ¨šW ¬cÍb8—aÑ/²Ÿû*Cn»Z°º«²ñ‡sˆl˘;:+*öa×lsq2«Í¦’Ît‰˜b’õOr!D«qI§”*ÉôV’˜Î6Xi C“…™mæ.mRÅáU¿VS8ê("r YÖ#ŠËøNÙ}Êsn6ù°«½Ý-ÙË! réÀïXÑ$2£?¡¸øÈ[^„—å”Ê‹tB‡C1HÃ(A×MU r–c8âêÍ šBØU¡{[¶®×ò f+•ÄnÂH'I0…*xÌÍaºõ¨¾"YŠ=Z~gµ¬Yˆá ’ª\Iñ‰…WÎ}Fùô›z¾¯÷­‰v‡jçÉ¢¨Äc0³âƹázÛ"%èFõô)F¡, ’—†b‘Q%òÎÛ¨c·§ÐSz~¿ßÕ\ÆÉòYþn™'WS6™c@‡ Ë]ÓU!Ž~þe]Œø= ,—¢Lé*Oõ9D%3,SðAÒÛ=ĉ…‘†¡,gVN«ô‹ò%- ™k›™ê£0€‹I&ªÑÅqHÆ4”–”——ж]¨X¥¥ÙßÈä6ЇSŠqçÒ!Õ·ví=)$†Ìš¦ÃŠJ ÇÒŒ×ET­ÓÊÙõôt1Oµq7¤pú¶7ˆEº"‘ÕÓ®dX†b¶+î§n(ª‘ê܈F<ŠKž›¶¬[\øÙÁYêy¤ÎKÖ'°æºÉX–¦qÝQ¨q>’&Hñ…$Ç*ºLqhJ­9)ŠkxM=¶=Ž "&Ž¥„øÚ»#E• KVô¥’Q†!^ˆMÌ:+™“éSåhøÒ5–F+!Óôç S„O‚È­ES±;û?Y$g®’Òåhc¯©¤(Íân­Ên'ðNË™?ñ©ÞJ£“Tj)µ‡j Ž¾õK¹&ñÚèÛ1%&­¼j‘‰#¶Ó$ÚÖrJœël¯êzŠR¹ÁJP—ÓˆÑ ÎB‰o† Ø²yð©@²µßè¤e«È#Èpå!f¾crhÎO“º)PÅRwëR Âúuås'ì¥á»*Ô%b¬UaŽ3V]N6jLnJõe´I9’ÞQ2Åb’×@Êã C½S6$¥ýQ²§EÆ`ÞÜrc:SÍœo½Z¢•&4äJ ¾=+(ÇDEt6ýrêȉ¬Ÿ!_ ÂK¹˜§j¾qH‚!Ij׫§8нl–&G²8«„y1?N‰¯Ã£¥~ýj¹„S•ì-§ÖÊ(£³½ÕEpŽ(Ø…1 b(µ¾“žM}A2ž»’gÛEr±‰.Ï硌t²ëŸ±wŒ2ÑœbÝ’CÐÒ=qî§4È”“‹-·ÄK–R.8A„údŠžC«¤Ø4N¿Ù˜ËéJÖ=Å+¹Ñ;ñÜìÔn¨œK$f±´'Ò®ˆ•b×Uª9» œž ƒ ­ZY0Çf#Ý=x»W­›d峨^~¨Ô7p*é˜UËýKÈCtà‚T]]#¢v¥6’¦¢“6]BYd%‘ldB¹Šò4æC2Š¿yáqÄû+D—-e{/•#2r¹éæ2Õ±¨-h«\PGK±.Jø·5Ê«åœT#†3‘¶q•.Œ­ôUED.²Í5úáDeø«üm9®K;+®æ ÜWœ¢n5tžyÓ(¦ú&™0"Õ‘D.©ÅAŠábžRw;¤ò&cm¨%êk’¶//6³÷•LŒÜZw{h»WJ-&6¨¤Jž‹ìe|íÕÊ8`ƒ)r”[;È)³2ÉRÈnëW ~JÆMËÐõíq,dêËEé- §,CŠI ç ‰s²Xî˜ö¶Ww6šY_U®UæÇ3{8ÍÂm72©d+>4–¿pf"º=ÉŠÔf‘œGd«C Dº³×é%šÒ„'åHõ»]IïeÜþÛ.˜­Dòœ_ʇS‘½[iI[n|KIx‹g"@‘Æ%‹S1_Òä¢nʾÂÌûVL •rlûíUt‘ Ý©eNçBŒEgcײ®ÞŽRÊMjã÷ ø®!ÝwàoØ…«~ÔOô+¥| ˜j RS÷ Ó£k'Ùö¦¡V«W³»!þ,ŒÊ³¨¯Ý._\jR•¿4ŠÒñ·±ÄX„2¶)™n‡k­?q¶ê—®ÏCé×léR 2&7Y\ËVU]ôÃ:wf-[‰dub~ß7íøÜ4™Í´"û’r3×QbÕ-ÕþºT…"’›ßB%¥Rr…²aOÌw8Š"\¼q8FÆz¿6á1‚:—P>W˜„ò™j7â·‘1 âÔ”JmB¨«®. ™[âÐvB'N>u8Ú²!€¤ÀU@)``þÐ~ôvTƒ£ÃžÎ'Ÿ28#`ÍwùÐòBq]Š7»ÔµÜÉ)’¦Q~Ll1&Pb8’1ÅÊR¦CGˆQšH÷ÃÒ[PTÆ ‚"dìC B"6Q°¤g* ÙÒ”SŽdvçG“ ¥nGäè"&¡ HDÅ’ „‹ÐèÇþv \‡‹CêcˆqDg_ïàÊî/‡0‘‰ïfÄ…‚ 1—dŽQBáþ¨FUV+ŠR™ð­ñ‘!„V'0$"a P°9@H%)^±`QG‘U…;1Ù‰Ak¨ä7B› D(Lä7ÉÅö„@B Ђ— ˆ!fF ×&lÉHý‡°¶ñ…j ©“ªÒÙŽæuÄò6æP뉌„A ˆU•ÁˆMñ’¯Œ`Ç®TdÑ¢ ô)‡¢¡.J®Ã8ã÷jÄB†-B‚·JŠ §7bC-§ øQ†D"1S1(Db9Ù1†Ì3Åþ(¤V¢’æ‰JÛ’ºDN'-NþyÄD¤´¬(z-QÇép‡Ó˜aÂÅ‚r‚Ý+”ÓQ À‰ã½)ÇR©£8,ªa…©®0áRo@½F"˜vG"•B’$3œíˆeLT-@§•(B1™„K=DXÆÁ ±éÄ @®ÇEr’ -+Ò ÊB*Ò•# Ês¸p£¨gleÁyÕ Œn¨#1 ñDí² "$+c(Œ#“Ñp„„°j`‚³ŽÐCÚÈ ÄzؘXgDß² ×MÊ•5‚ M¹_ ˜ƒ5H¢ïò×ÒaÔ@\$™SFÎEZrGÍ!"©uWaŸh‚ç)²›nˆðÆ£zCËb²ÖˆH†{ÕêX³Žf~ÏÑE!¿ †QE²!ÍÌ/nA‚d1y‡e]±R.ŒÅ3$ÏzPFjÀªw¢0†Ö…Ç®§!Y¥G©b°ZÞfÒ™ÈÝÃAœ)áȰnâR¯v1 fÐoêe 7 Ž ºÐ…T Ñ´¢ðsªB©MÉ«D!«<ÄÆÒÚ@'­JƒS)• –ˆ8%`OœÄ´FE#õ¤RH¬(Á ìDâU7ŒËð¾#hBÂú­ÕÜܦtRýú^3³é?£ƒÂ!JHHàÅ ‹ ðG6tT`ƒ²½ÊÈ~Eôš¹K–˜‚§ÝBG«:w Ä HD9Phd6/ÛVˆÀc2ŒæáSxäÉ`k·ts–ºÆ¯^!s¬JÁ "6lU¥g"P• ^«éÜE_ÎW&¥>lBpË Q ¼6"?B‡1²%\-g+d0ñ*HBªr!$$¹ \*¯!E ±Ã•Þ c=YPQf5d†(ÈBd¯á8A tp©j‰Z˜&„<ÊhC»–Æf&ÏA|,a ÈÃS±ÅqFüM” ˆ„ˆ6-€G%ëæI”ERGr„0‹ôŒQ¢±·|Sˆ!„†(æR楄ä¬á`»!jl¹žXg3<ÊpÊJC‘Hb2¢ÓšÍUC¡ó¥‚‰©‰`ëLPÄMƈ¢¼|H4î"©FÒðR´pÕ1ÙHNÂ!FDã9”G43‘e Q…ì*èãØâîá!à{Ž 7 CÂZ"†fø©Üý4 ¯ç DD3¸]Œ"΂ÊÌš\=ÊQXuRÀÎi¢þç[„ ÂÆŠ#~"†P†u"ÆhðÈiª´+Ä F£˜b¿*ꀎ̂¥U±œF¢rS˜R°äƒ@Ñ)±„Ç \”ãu¬Ê3Œt4ŽÔäC*¢‘Ù ƅ)y,1º÷*³pD ‡YŸå)‘34¤MEÊQ7¬R1GÕ ÍÈG¥% ÍM N¥6˜B½:l!%ŒœÌ&3œEB¸”Œ 2 ‹ÖÁ‰pªBr”ˆŠcâc8ª£„jõ0ȤT)i¹ŸY:©ZÎOi)¤dJf(3c6%GZ…4"A­\WнÛJÁ]X”3NŠ6Ä„LÁh¥ËÍ ÓRŠ…£PÔ˜AÍ¿˜™D øÜ(IÃ\ŽÂ ¤;EP³À@Ùˆ:¨HÇJË“ µœjƒ=ÁI ‡CaYHèElÐÇK69¥ØjB£ÂÛQ9̪&QˆÍ™ÛRÝÄ¡ŠœB#˜v!$W'"±Çè.ǵ1ô{¦O`Nè ó !­ÇZáŒ0BŒýÔ\ÈÀ¤¼¤:ñ„L™¹gÈ+¹L ÌJYrv#…x?»‘T%ÏöªÎù’1 ÜBs®R» Ê ‚JU;$!£òQ q2BOoZÉ¡ÌÌdÈZÐQXŒPʹN À„ãkDaSDOKϺÆÊ\à&œÿøÉ˜Â åNþuÿ‹ÿꀠPøÀ†´•4’ò—‘Š?φe#.ý1H1kGóB-µ•l„Ìs(ÎT³Þj'J;<áakÓaH­kv](V¸ŒrWMÜOêd¢¹U%ª}–jæ`S2Ø´¥°›–.F)Iïi)A˜ætoqY›«‹èJ….fìV97µVFM®x¦EÌ“Ž+“ ž¹ZcrØÍÊóSÓC«ñù$uQ{˜a }&Š!7±‰C2̽ÅãÄjRšv°¯CˆáIäæ{99»4Är½nºM²þâN»GáFÐMõQWäb Ë,Ø|Bª3ŠŠ¢K‰MBªÑÈDÌO¦˜U¡Ñ„ŠÚ”ÊÚw[³­«Ùm³µH„eï/66Ÿy®¬»fÔîäçâ2a”–$šô¡–%7ÄAHN.Hä9ÉDÉÝLÏ&Tæ¢lI±œªƒ«-äD%˜Ž-X¬@“¸|/=tPaˆâ+ñö(m˜¤Jf]õ#0Nfv…4¨„[º"1ñ–F©z÷b)b·I.,IÃŽz& ˜çÈ+rŠ´ebh½‘D³T5 „ fìD#†ù«În'KÆxnÁ‡¨þS–¼Ôâe a x)ÃÑÃÓ¢„hÆxÄÊÈvéP› ÚÙSfÈ")LâÉš†f@ÙÄb®PøÄæŸ(M²GÒrÜŠ8‚„¬DÕ¸.+ªR+d5Ì«çæœC6­”¨L¢V •;ámb†£n6¸ð/Q—¦[ŒUÍSZpZ‡,L)½!b!Ò;gf5 Ûo Æ1™á÷d<3®FD¡8Õ<)ßÐM*23ô3°„…F„±ø´n0Á‰¤/B€bhX™‘—aZ §8[ÇcøT[”9ʱ㘆”È@d1"”äèBgà⪻Üg·S˜“ï‹na€@ƒÂx¥r‡\Í)’O}tÂs:wÜœ¸Õ(JÁD?,)u ’„ æK^ÑÊÍ(V$Zl€ßó '0g}›Œ—*WqTãÀ„3Âe(sñMÓ3 ¹º™väc¸Elde0ƒ0EaXC¡,îa—³òc:±×ÛqE›Äi8„4ÄJ¥*öƒ„! ‡s‚…ᡜ̆SHœ’âSfTÃfQ8—ÒC) tC,‚hÕÍ «5eZN–àªåUïhˆ‡Gö,8RT гd@@A5äBp¥ %°f"GŒÈÕŒ8ø[SÆba”±Ö—8» 1=8ˆ­æ×•ÂW™ @dû¹±˜âï`€Ö 71¤±éák 2á1eh0ÝE!ˆ úÄ@@g"§c2ú©b1Š$åç¿*18ÁˆÜR¸QXVç!"Fꈴ"(…C8äbaÕ»E4?¥|6"Ñö,XÐX°H}PÌ')“€”hUØC †0€¡…¬u/êBÔ‚˜ +°ô;ð2ŒDYrÜvD ZlA h¥ü…‹àa ±`…¿¾0l&="¾\‘:ž wÄ… H@PPV„¬`&BD= F#e‚ ! '4L f õÅR\ ¢­ @LvTC~ôˆb)4–䙉%q‹rÑ °ÙéÔ¢ CžõAaˆ_àUR‹™(d8·’‘H1¨î Ä6˜ !îT°`flf2uAÉrOBŠt g#Îs”›iBòÊÛ0C S1ìGƒB‚ A;24FãÀlŸœrªY²caÙrœRþ¤ÊáÅ 5}ãº,#R;Œ9 ô ÉKsF7É-6$Fa ‘ÈwL""˜d%Å®¦/!ˆC ²r¡ˆ3tÎh¤!ˆ5gœh¢äÄ@¨àxv÷ë˜-Ĩ`– ¢)mp#ŒfäSb@…8‰¶ À¥‚˜¸¸`aCàUñÚJÂa'æCfÈc¨ÙÂr:HÌ©iFSŠ )ò“ä2¢-¶à£efÍäû6‚zaµ£à8äJ!L`ƒF+žôä`”F@Ô™gÌ»œò—9´:W-„W|ZÿÖ„$“ ‚XQ„ ˜3³M„D¡TsÑÇ"¢!"P¼8^S`—)±)¸„ „;f¨&e JŠ!Pôñ©h|™È¡!ªæäL†ì„ääTf°ƒs7]N¢äP0„ …gb×%æÂ0`†hÅD¬Ê¤Žΰ¦ŸÂŽ^9SwW`§¥GÌlÆ!À!ÂPÆ„  0‡ ”D̘×YÕEÌ<ÔÆœ.pª-.á04§£Y%RoS¤a´›×k”B¯qEÏ%ÉITÖt…De1Á,ÎÕ(‰ ‡C»œrdHV{(¶"`ÓfA&FÑŽqÂXJ…8B‡Ôí„W/wÊȈ…jÔ"¥ìEFd@`Ü"Ûx¨D F ŠôW;•°!Èæ{ÒŠrjH0&`‘«øæ‚;“!¤"}b« Lßr”"ÝŸ¬ÕΧ €Ùyøh~Üþe~ ÙÉ&îWÈyðg}LC5Ôk´d.R#U±VÊt¥.¥tñ¿%婊ž‹"˜aQ”tAÝ“t˜D9{iÒWMM›²žNlDír\ĈîJ»‡,Å:M)99‰æY‰S6í¸n[ŒÙÝÍm…à÷­ÐÉÃs sv v+Šÿ·ù3t]—®!ŒÿíMǨE;’TJ¡RÎÐéFà„™E*žü^M¨‘ ¢swÛ)wÉR1“ú™škó©C˜¶úLºAZ#Ð´àŸ²ñÍWE­šS¯ñM¨ì3ˆ§‘õx‰ŠdÙ^•?Uê”±ðOâè\Úkþ«.)®+•(ØÌD­«J˜Gú1Sè§b©’®¥w„gôú‘0¤âÝ®¸|ª{z2VG³ ÄÊbIõÌeßDê"= iʵͼ$¯î«+ò ƒ›\h±¸3™6êRÕ…8ƒ¸*yPˆÓ {¥ú´9Ksm7ËßÛd5—>¸´þaW;{†â2g ´üÞ(Èî"'WºL+3«3pú]BË!D«‘*@쮇*[- Ø[ ¯Ÿf‘…6å°´S•ª¹¸6&zQœj7ú&±¹q%ÊEá5/Sâê?Œz;Žv¨J®rˆ¡–Á†U]ŠR óŽÉBvKFÅôÊ~Ÿ+’XL%oÖý}%VìR½^Êb²#õ¸ûŒ+ªæ“IÎ3¸ª„Eõõ#Ì@‚;Éïö=ñJA“ÊßRPЍÊÒöík/«É¿*JÊÏÔäugåN}Ñj¸dÎÆÛ{’B(„r¢¥X†´.ë3©ÄAE‘)âTÊ[,JÍIÄnz•KóJ™;™W¸».ø½Æ(! hÅà‚³—%†4^(¢Rái΄‡¨%À@ÈÛºëiÊ ã÷LE0ÑdØçd: É ŽÐfaŒø]dŸ¶Ìª=:˜R8‡# C° $±ÆÆâÆÝºŠò.âˆqqU…d|R´0 $îq”rÎh0±Ø#ˆÌñs…œ´Áw ‡ÝË4„@«2Þ s:!“„8@ÏÚ±¼G tYŒá ‹†Ìš„1Ì)•ˆ¢Dp¬Q['Ü?v¡¹˜€˜@œ…& `!˜&êë2±Š²ã©ŠEu³¢­ƒÊX"’Ý‘Ìk¢MX>NŽ«ç:ã±D¨Lã „°ŒM-"wEÓ¥$&vÙO¢´&!©‘UP‘#1Æ~aÛ$˜¬pÅ3GUÇÕC4( ­Ì¤Ï§¶c>CŒéY™OÕ !c‰N`¹ÒŒ[©‡GÉD@4BD:^ZBLÂ!È¿QØÁròøáŠ"ë?4ƒ¶ÉÁ«GVQ ¸`PÈaØ0(jAèê"¤.Acþ”¡¡2 ‚`à‚±~"ŠÎⵊöJ¨>ëªy†'+\Ûåôi K2ûrj#L¨BÄ5Š$«šé§ô+æU âØÝ•Ó"\J½e™Påä4Ϥp‹QØ•ªTÓ½7>"Má¢Vfoû­²‰cë–)jDÛ-Šáæ+²,ä2ˆ¨˜m“UHÿ@›õÊ *f2 Ç Åc’Þ~#”)-·¡9…|~Gþ”›Õ«ñw3¼í9j¬D“Ì”èÅœÞbG÷x&r gu¬é8Ç Ç5g1ÖdpÙܹåÒã7Å‹&×JGwí|mg©.¼Ÿ"P¶qhG B ÉÌŒã+Šú6Þ%`Ô(‹Y±éZT²9KI#3±eá” å/(PïbRI¤tsºí37‰LÄx¾ÒôiÍÏ(UGå £Œs+¸Õ¥e×&ÓZµiŠÀù»Ô#!/{ J&–ÖHX¤@0pYþ€£Tp rßasãLC -­Djœ¬Â‡O² $yI^FY:O ûå2¤é¥#®Ü⃆È)Ϊ—MOkí§ÒIbRyâé3UE*EÉ}Ø@Wéh9§–žž÷m¿ÊF@â2`·–QO™‹?ÓhÄ(‹! ; Ážò LŠ1³©IrÌ6¨±¥´pŒÒ:ÂÒù¦VÛÆüd¯ÃÖP© _(²¤Eí£Ï¨;«êšXøš6±—™j„8¥%L9l®14DÄ[—©I zd²®ÂÖþ»=gC–­áç–EBvû짃\0o°—«àÔÔ´ÙùÁLDÓ±([@¨Ä[0™½¥ Ÿ¿kéKWò›S¿™ÙÊFþìÊù†1œÜ%£ÐdŽpŽD`¯¥¸£ ´¯ME9:IJÿ˜ 0¢ˆƒ%_Zø\3¿_'¯Å×9ŠÏþSF,ŒtÊ90oâñE±7ÑËÒˆ«a>€“Ùh%d0àpp¨Pâ òUîRåRÉaC6n ÆQ$§µ­¸®ÓŽ_z„{1Ùj#*š îÄ£+á<ÆÀœR›>¦o/˜,X”ºæ3ÿaPbÄØ *êÆ(i(YõäR¥-‘möG_ÉºÙÆÎ8ˆÒ-¢ý!¡ 6îäă« ²É¶ˆç“ןݖ@Ê%¥hWR `,¤ÄjÁÁ“}º=rº¨Hþ%‘„>K’¸Z$ŒÎÉJfbJ¬).CÕÌ*SŠD`¯ç“Uÿ*Öuº64QJ„ú±á.!"Ò¥O¥DÒ¸–M`¿HÒIáIn¿ÿøÉ˜Â¡âNÿ㳿¸ŸÍ?à§î/öSúØ´ äÄXzíxCâ†m‘&EtA÷UF\iÆ¥‚ußG0ípÊb`J‰åcômZH$¯QoÕ·ú4†WÇ‹d¡ ¨9H—ß²ÌÍŠ–¥©Šè¦ý&~Æ*RÖó1yIßôs§ñi•Q 줥iUÜó«TôÓU9Ó—ûsˆ3áJ˜Ì¨*æ;„QPïSwºÉS¦Ë^¹nÕèÄ‹KÛÊRZBjZØ%”¹FÁLS˜2™K6}HSRŸ=LÅ|#æ[öH‹ÚöÇĪФKLªWYÙ¨&b(²]ŠŠ•ûuìoÚ¤‹|s«tEÛ0în4„£¯ØÞfë5Y ¤DGS}k¾)…ôÓsãѬ­f%~–½<ï‡¸Ç b Ä™?Ù$yÞâŸxÂÆ;mâPçKú±È®µÅÎ¥päÿÍ~C°MÂ; Î@¼…L“„&>Lay"''PÈB_FÊV‡•v¶ÅU쥊Íkk×RÎú²Õš•/ÜLã¬r¢™—Wå$Ê¢<ÇJ“³®…0|Ífâ(´©Á¨ÄwN:¶U«[³¸—3ªzŒIuÈ@’QÄ\<È<Ó0bG^*‡/)Ê6ªÎâ ƒ³ÞòYøUòIçÌÚª’zS‰í¬y[18Šd²øLhά'ž„ñTÊ!Zqhu0¹åï ÎÂ>âZGs&)0øøZ C E”½5•¢Û*Rÿs‰þÇ*ú~eJêk’‘•2äÚ“¤8ZåDI ̘]Š£ ˆ&Þ®.ç.?P¢ö%N—ÁV Zt•¡¥¦‰„ûe£\dü¶'(Å© Ké|ìUO¥ — twñe]™Ñ9r¨Nnâ†B~_¤Ýæz`Cïý‡ng9kÿδ(B AD#usݦjØ“\Ä!û L-ª´îj,´£évŸRÌZ¨3Dõç´Ë‹Â+1'f3÷ÿáS‹Ÿ”ÎP‡d½“ÎOÁ9§9ˆØB¨Yå‘k&W³ÎÏ ¬_*>«‘%5NÑ`b‰êQ\eŠÃSWÈ7œ3'_iI"m4þešµrJ|+~±(ùS±w áT36E%Ï%¨! ¶¯LWaw¸‘äÂU*›!§T.í0‰qŽ--û•z¶Ùšu}"¶Õ‰WNEäb%PŠ5†?q,QJb:íMÊU§­˜R‘[þš·;8\½èŽåc%:.¶â„)+"š¬ºÃ¦1¤V˜W6"cãíÌŸŸ{ˆùÔ@›“aHA‚(Œ¼z1îôÁ>ìë" C¶Å¾KáKá-‡©Ž¸K~&ªôƒ!ô*ã¥Enf9&ru?ÝÛ¨ÌÔÚ4¥J¢PRuÂá(â8‰ä±/V×Â6Iû…çªâ×ûœ™™WØCïDÃŒáLƒœ¢¯=±¨ãËa51; >Wg¦áÝ9ŵS‹Ï+ ²/ç]Îcq翬êQ°\Uºçå¤ÎѨÍÇ<ÇÚ5KÙß®šVË ¨EÂKå+cIYT…dG+ÚDÏeóÏd#”­¼· ¸ŽVb~|ý}ãã ½Lb&[w’ùÊeÛeŒt¾*ñUÝ∕V¢,¹. } YŽp-= _žØPPþˆ££t¥- Bl¦$ã(¦(1Î#žnŠã0Ÿý¤Ê!^‰ š Âu‡wv5œ âÎ2ˆßEQZ±Äº‚@ƒÈ£>Bn•5"çµV‰òKÁN3™¹Š‹9£D @s³ 1 H‚”vs–Ò—øÌ˜-qéhÌÇülHÊ„d €Nje° h:ä2 '*Ž2"ÍŠA»W]æbcÂ"º8Žø“™„ýX>Íà˜¡#*T.W™¬s·S–Ž‚µ[½no£"Qʞȭò[ÜmY=SwR+nbûô9K÷µˆ!JûŽe"Ž çMÉB딩O}ã_éï"ã2šMûê½Þ L^ Ê)¾ÊUblF )Uÿ-Õcid²â[é…¦ZÍš„12Œ:k>Š;ˆQW ·~ÒÝÖä¾³‘Ì=$YR«ØZò„£iŠß­üc“³U0܆(‰O%˜ÄJQMÙFBj Ê„ÚyØÖaEFòøþ«1ÄR,ä L=5XßD¹t™eÔ§ºKÅ¥}·¹XãE!B#k«³´"1ÅX¨,#Q0K±$æòã Qq‡×V†,ª6•ûuˆ8ŽJ8µ–MqÖ0‹ö„cZ£PN1WÂehäóâ7ÕéWÓ&-ã-²Õ¸U;obdl%92”m³‘DFyL¢­TBqÂ0 î*«m7éÝTßѹßVúÁ>>MJ>yÉïüd8‰è!Œ©…AØ32 w„#ýñŠl“ÈR\›ŒgД¿6¹ÉGwn½ŸgµnÕuI$ÕpŒj5Z´v2+ã’g³‹³P¥Eâg æÑÆqÂfºýVzº.¤’3Üjȸ1«æ™h˜GÙ];“äuMúÈ:HXí_¯dèÎ= ôsâÅVÇÖmvØSµÔNÏq™+LÎS2¢“_„õöÊ1(\‰ÿ¼©Ê•÷ÿc¤Â‰¨NúRýƒÁªä8š³“Ÿ¦#õ@úø@rÀ¥[`Å=ÈÕž¨äèì›.3ö¹NæTU¬fiS‚¼†åª‹VQ\¢Å‰(ðšK 0óKðQ˜QW¾¯)ƒ Aå§SN!BÌ™•N­3PVúÈ= æÿ<…¶/*áÃ.T S° Î¤Å[HWKZIkódÃI‹ã FLëß§8Aìæ Ui„úm].|²(\Yåè£ö“‹ çuZXiÓ,B ¤‚V ¢†0ŠLe Ÿ•¹“õšÜˆââãô%?®í#fÅäá„#<‚ Ý:™ å7XZtB=Ñ„²·ä‹TDã69§Zƒ’åò…h‰eŠH‚7•Šüôiµm&$ä<'ÍÁóR):brÒ„ûœá„šJ‚‹ž„½ã•½G¶(“ßC0%x‘í&9¶ŒrêÉ2qÛŠOr k„vÀV“I’téãñd®ض¦´ñd¸ d:¨-¦òœ`0Vòƒ¹GqîÝYgjr£*=±üI$ÃP•—êavGÑ|Ro¦Á›•Ñz¿n²£Õ8¢L€wn‘ že `Ð,С §‡¶9óÞØÁ;)a¥êâ¥v-°]‘ªRëê•j&yÝëÁ¸#·uÄî” Js-zF¡Å0Šôüaœ|Ìv‰Ö†[=ªG¤ÖØ’‹VñÎ)b1Pœ+×7ûý%$®d³$í!$·IâÔÝJpö«\öîRÔ²9”d}h¡)S”e *îdKqCˆä 4òÂÁ©I¡é,ª cœ‚—r°¦ 䪕ñK1!¬ÊR͂ջïp´Èº›aK))gJ†cé s˜FeRÎDE6p2DÚxJÛú§¸¢iò4³Ê¡@à8 Ìî0f&`IøÁ¤Î–5!AW6q+ô8ºá›¨@„t’N9Ët˜¿¦ÛeÝ®Î).=gÁR “K°¶êq‚?I^ÊGq$Nœ²8àÎVc¥‹:8-²#O>Ýä­ØdðÌJ›¤9ÆY9wk Â=XˆsòZé=ÊVË)~Sj)HÙT3Ä´[Ê1ÉvUüghv ²Ju‘F´â]­Æ¤Çý¾gã}dé¾õS[&Ôž„)c8qDdV‰wبI…ƒ%d²ŽäijO!2É PàÇ47B#ÂÔáê‹âEAÏt”˜Á/=;¹7µè$•zºœÑ)&mL°C…jE`v¨U»MâÒñõ¢MY {ù¬òД–ƒjÎŒ’V(a•#¹’ôÌ›G¡×ýØöçLÊä/çÒˆªj‰¨öeñÒ(¥"W|Ä8ã¹s°Ár¨Æ-'¡³çI\Ï¡5h"EZäÐÒb]˜8ƒ­ˆîY[}èó—[í¬×z<–Ô] ×.?¶‘ݨ¥ ƒòWK&‹&nC¤Ê¦ê0†;³TVw #y[iè*bI5à'Ò$·ÊVƒƒÌŠd­m¨,׌`ĆMaþõRŒÊ93B\i{6ÇÆÔýh•…Q³ Á‘"šuÉGS’Ê.K†ÜQmªïÉQ扚b7’Ij¢9ÔÁkòJˆ0£ â.¤M! Ý{õ¬íadñ,RŒf60Î’ü(P‰QÎÙJëäV½8zw ;p-D¥¥¦©H‡ ,‘ð_똡ΠeÔ”:¸ ’j—“’ÄZpÝQ{i˜Âî£~¤Ìíå˜uÕ¿»1|W³ôÔUßÖ­ ¥R”-©/øøéap´É8§‚qPA N-ùÖé&!ˆH£žTˆÆlNŠ´’©)>„¾‰@ŸÚîn<„ó–Bå;()Lhñ0Â-\ Ë,Ûcठš×ÝíëµZŒ£®QPÄùèØÜ‚ „aÐ*È+¥¯=v›‹zþ× Wz z¦j¶d±IÖÝqB;¢›µ'[;»ý}ë{x‹•¿Oø.Sîv@)Vñ2JIË"©FI‘Ê-Óõ»|‚^éi©tCQe³²ÊEŠöbÜå "Jš¢ƒ3 ºû6áhZ‘ ¸±7rgˆ µI•F0¥#$ÝÄÛàôê´&i§­½¾D²ÖÿýzÕ0§X‡‡˜ÒÈd”ÖR0DÓÌ›[çR­i“lšÑUÆIH—ÚÐÛå.?­ b#~úmÏΞŸ ­ûÓõDõÒæT²9U‡d'®©u3Û),­0drqv™Í:®”p„¤šÙš„÷Óæ_г Èã4Å[%j&>‹¢ù¨Y–ÄYž%ôJYï¶Á6.÷‘LZ\†Uª« £*Š@Çh!IèL/Ó˜Û@±ì( 3KúðNKl†%Öò™ÊJ,Î-—„nYIv¹å”žÔe’uj%Î]!)ù!Ô"зâÍBû¯ ¹i÷§S6¯$ǺP’ôœöô‚/Ö fdW¿š×?Rµ¾Êá”\‰‹iåõÒ) ŠÁD+Sˆbå:à…Ô"òш£;mÛR·‡¯e?ô‚Éǘ´ºò úŸwqœáJeœÁ“æ@®X™éBm¨ÂŠw¸_呬C •ÔÎÆ³K͵µ:ïÍ%OžÕ ðÆb‰-ùÚœ—« XÞ5ÁZÄ&“èÒSÙ)±X„ ÂèdÃQ”ŒÄ%Eê4S™²£¹"W™Þ¤6žZIAzÿ…5OL“ è*x·E+Ánoˆ0ÌR å;FÕ$\†‘¿'П‰f)î‚ Ð1}?4åšJS¬smÿ©ád Â_o—BÕo«–¢g+²Ô0C¸ÁÊQè&Ö)² . nNÌŒ^[NÊùόӫO¬æãœ"Pú‘1{É«ªøNj|\êæé2·‰nÜŠ(ÔGOàŠTRg°a\!ÄÀýU ¤2 ¥íÂÙd[HÅC Ç?ùèé9A Œª‚,bpcg.é||3ÈÒô’ÙÍÄîcÌ¥$¶¢™]•Ä´½œBúöŒ0ã¦Lª2 “kYT8àªi"ÅI†0"'Ïå¶[3Þtf¬´uÁ‰²ž‡„Ð.½øê+Gì/”²šÌp¬ôË7í°uÍyJ2 ˆ‰§ÁÌEi6¦:ÕÊL­ñ„ªs\%%„®HMn ÓeH9B,„ò²f¼„)K·ÂŒÃ¨FLNÍÛ×Þ‚‰Åh½OR±j49JÿøÉˆÂ¢INúÍû4ûiûtûtû’ûÿüä³’…Ñ7œrèyðnYµÊE»&“^ÆÜçöxè"Émê÷®L–”ÌÒ¾Ì*†xP¡œ]9ÝTˆùM»Ñ7r›îy­•õ4ŽZžÊQ[Y±ocó á2Ý©‹Šx­Ýÿ—k#¤•™’Ù‰œk íßmvIRŠVâ{Ï-Ÿ÷—¦äkxïæbœa ª¡ŒÛ]¹Y‰¸ÔÏ!eeŸîünI„MšjèúBm¿ÙŠ*)AjÕý[¹)U•„IS;ˆzŸˆ¸O$DñYŒäÜ#Ùpèô7b­zDòZ¬ä“f’-ÑøþžvÕíj¬¥ÈÈÍL2WSI’MVìê²¾ŠQ˜G+©†rZ¿UPL_"Úé5Vˆ¹Ô!ºÙV-†¸›[Χ¦²³Õf^혊êFb…‘4§±”ì$ÕGç"¶Á<•(öZ|’0@Š"UÓµ¹ªN°ßCW?ÔÈgLû ¼k©—³ ¸üBY8Ф(2»Û”‰c#QŠAdçª]*°•Å}BŒ©W¢mßEa•=(¬¥cÕˆ6RüVôz·&#О…©d2¦='èŠúj3ÊY•I“RŸörž„ì-܇t1 v¤BÞ–Ž&úQDéªCiA\W8¤§–u“K‚VÿĪi ºÉ…,¬ß¥û¥«–J Y„¬³HΚþÄ£b- ;T¤wB§Xã)*ù(´j+ÑSâiD–šEK-’‚ú#.‰W‰¹ŒïšY¤V'—PÌJb«Ÿ´ä|”+pH@ÿ±/l¡;h;n)«û%Dy>k¸e|¯HÖÙH+PåN®)0‡¸†WnûØ9Îl_oœ‰•ï|¹ªfI…KˆvÒp¬L·ìô~’NÒntSY4Ôÿ…*T÷:祢,ßû‡ÖF!ÍÞM\pÉÇ¢}wu^g4ïiZ"˜ã[â æmæÒ럟8Ú‡°›AkÆ-F¥ÅüD1\ä%SÌÄ¡šT8Êèòw¾‹÷x‡Ö«ö ‹tÚ†»z*•ªÆg³-G3œ¿[Äõ–%é`Åü!5Ã8ÍqvÄ*2á©/™M¶ñÞûC(J­®ªRùdÚgâûñ¸+g.LŒT¸ QŒh™U”O;ùò!rÏSãÙ‰µ+KUìÍ®‡3³[”–¥þ_9¤Q,C‘¶J7÷ Ébf•ýÏI c 1‡?*G#%Ë5}òÐÛ'©oœq=zŠ©ø_&¤³­“òP‡+j{1ø¬„ýe¿“æL]NÊ …g‘-*Œb£ÞâˆßÌSï§íLÚLÞýÄÆÃÖ|Sf79â%"*}äWa4–iEÔpŒ§3 ‰#áW \ɺLb{¯ªkزxŽ@ª‰wvOvÃÖ܉‰Ü[ì¼N»ˉ‡AÉRä®!èe—‹›œ“,ØÝ•㎹CÎÍ;¤³Ôš×I(,Fïk³‰)ž­dWÆÐˆ¼_q²ÊÙs"HËÍÄ-›ÌQ…CH¥äeD’„¹hD3Ñä"[éô)=¯ªOt\åºLž1¬Ø-‘sÊì'·ÌFA<䈪“õÏâ½gÝ;ÔZ¤·t£IdkÜo¬´…®Êî¸bÚï²>º §%eSÎb²YUOÙ'b(´.Ñ+{D«PÈô­ £§¥DÊ]ì‚.¾Sqÿ^”iY—¬M²X›*ùnÞ˜c°W ”·0BóS Qšïq“ÑÕªŸA¶iº[ev‰ím˱GI—5ÎåeV ¼êòãL©y;í)=<éØÄ0Æ1—V´]§f#’ËÃ-(¯ýJ`ò©½Ëèžút2^”éw2n8í…E èG×F³9X¨­‹=´£")ä-oëFb+Pîr»–˜fÝ·÷تÇSœ´Hêz„“tŒi¤™ÕÖG1‚G+o è_]mï¿ é‰A¿íšŽ¥LV‘xè*³Ø¨seíIŠEõe+jyV¡sß÷6ŒérüœWð’j%jä!ƒW{ˆG#iz'Ÿ%ü&½$žA¬‚%±ˆVTåA‘¨Êua¦Ú¸¹nv¹ÔeéŽ% µy¹,A)ê8¥)ÊiO*'%u5~œïdâ=ŸÜ×zËVݮդh„@®f3H”pQ^„Œœ©„m¼Þ¹Ý„·F¨“õ*:¼‰öîZߨ›Vfe5\vÖC|ÙSññj#™A+Ô½ST¼1’!÷í)Œ¯C ôšQ}D„ZPRÙyË¢|™'Õl_ôäC ö:nÚ#inC®Ý¬Â0Xµ¨S=ígj‘'`‹Иù¨¿ãaé‡×±Ñ<ªü§ËçœBo’Bv¬uºšËÆ»koPJ!r†+ößäzVùTcUJ­17¤dDB“XYâSˆ·¯ b÷›ä›‹ª†Oæ‘/˜ÄSûP¾Wƒº{1R"˜Û:yV•’­˜]Tê|z¾Ü˜˜_d3(¦1Ø@‹EåuB¢YO8”1ï®éÇ“— ¯Ú/›¼…d\Öìý ²NsŸU üÜ×Õñ¼|–—©IÎ×}Ц0Ñ*ÙS½¢Ic¥êžŸªâ4b© ²5MsqgÓcÑ·OäõEª"RÅã]$m¹1´÷–i¼Ò#ñHZ´«ž(ÄqLpQ›îøúåÄEÉÚERW¢k‘V¥±/vq®üÓæ¾“ÏRù™ÝnÙ‚U5ÙITO-ÔDtAÚ!‰+‘pº÷S߯«%ÏSQû5Ðy]”¢X§ºwD×畲)ÈŠJ™âavBiq)úš£HjÕ]HF¡eiˆ#˜ª¢„[-5Ò„§W©µïT3ê/é9Ÿ˜‰WÂpt†¼t€€ 0 ¡§ÛÅ{€ 3¾Ô2¾¤d|Nä:’“ צÆB¿uDÌø„% )G1Qe0„"nv„‚~;Y†8#‚9ò°1‘»0Z Ì` R<¢¬3†sBì±ó¥:¾VP¡Á)bŒ‚2!9;HAÄĬü(´BªPíÎ@S»Â)ÅPåÃføœ¢øf|Aà !¨Øf$†øU˜ 4*þ3ƒ\ªÈÜcÌ£¤A‚”ë^h¢¨,^Äê«Ρ6A¡2¦ ˜`Ö °d A 7DDˆ*ÌÆò”2µ;W*‹q¢"È;/“Q‘Ú D7^ `D T25'ñ†Q^%œæR¹aŒ R>F]PŒYËÊaK©‘©J2. ¨Ú„„+H©[ÀÁ¡Á0Nxã#ê½MÄ…–± bê“!È–a ù¨ÌC3V·#È1ˆ'|F¦±¿¬¨ƒ„u [œYáP+UŒê †Lž=F±(ÐÜÉÂ0ˆ ¨ªÔB ÈçUI)ùj E‚ÆBf ff%æ0AB_ E"8q‚J¸)„Uz}ÔGaH‘LCéÊ2„Ø%ؽO,¹"Q·Æ:Ü0$ƒ é™D 5:¶)±B,q]©ySîj:²”AhàV£‚N¾v:d!—°Fh6J7âbj®˜f°-Âr‡72Ü{yKA»—*b#lÊAQ!…!œn e€×ƦB9^ ‹Œ‚©ÅæTc¡i2Ê+[Ü&àÁ|\.^rq&œ)¸`"†Tj• ÀÒ„(3›œ@ǤȭÊ9"qiC(~ÎDÒtbòÁ`† 0fM·ÜÂçMzØA`åB„ãVÏëŽo„0l"ÆŠ„nêdc~ô‘ˆK‚9âŒÂB„a‚„BQ¯!FSb©ˆ”P³(Ü ùÙ«Œáa¡Ÿ2ñK\¦41š‹¶aŸêæ(ƒSàÔ„¢‰ÂkJ8Ìà@ù(D;®aLL¢æAãŠDmã†8¸tåÚQçâW9¸ø¸Ã0g7€Fš¨Ì®ÄŒÆkBô[®ýÔ+ÛˆlŽ8I°2óúˆJÇg' Ô}°O[øâ+´åVŽ"™ŠM³XœÎ"_ÊèOWcѵ¥ÕËQ¤µ)íÔJ;®{PDb½Ôà‡#;¼™C«2K™º/é= '’j}ir}јž¸ ‚3¥E)ENO_TŸ(R™¨I$ NkÑ9 éI*„!‡â6Ù|„cg.•e/Q2´mUÖÉq¥ì%ˆK2‘QÒ—hˆPæ*«i†ŒV™ (F&z÷ –ÄÉ»%³V¥åüX¿ŸŠƒ,…3wÌÚåbÔ˜ÇS¨½†Kœ‘-J3ÝÉÙg ÔíñÅM&=ȼF@оÏ2’†——øÌr5–ÅgÚ÷tfÙmOqt¢±‘+îCóUÈ)QZÏt%Ÿl«~ؾGGUª CÛ4R8N£XÊk#Œ—dÁˆKÛ&yÚ¯2­]¤¿è+0”Ì.éþ´9¸n«ˆGsáLf5|tvTm•(»‰5wFÏ×Ú¥ôoµó• ›©™R ŠS¹Xƒ3ˆÉeFA!•Ò½¬J6Ñê½%ëlòµ Ù!œãP¾–2Ÿp‚„0B[Ñ„fÓêYËÒur§,‚ÿŸS7ôÇttR Äe(ŽP"+;µ7…Îô%ÔBq©$Ô/±º¥ê½ºšÑVæ>%„aH¥~G¤ˆj¢-S処ZŸq9~Ôzé$¦u&eTû·é—,ê;YŽWûøã C'=­”[¶é°ôt:½Šír–„.r·¡ÙéÍŽMIý «ZÚý…zmº¤)E‰¿uÈ5 Ççz9„"½)ÈK ¤jŠj3qظké2¤Å^íý6ú4Ž%ü£Œ„-~ìD NZ«ñz¦#¾i]V»{|äM ¸×M}D(ª¤r‚ˆÚdrªrËd«R‰O›M¾‹ÚLi'ÁeNÝ¢ãˆRUI3ê¤Ã S!.©Fbo*2%~¹ßþbiú~;9Qz2”¤#™Hâ.¥ôÊsòå¨TB²ö%—mV1w~™B:œ’³¯p1F~&s¹ˆ"Zä#×üΦ—iö Ô³n&²×й³8‡±ˆ³8Îâ¶)“}NUG­Ä!(òÒÕwÛ÷•ßæ¼©Åç-’±UÿîBQýŠ2­{= Ò7Š·éóû®–NÒ—+U5tb 8§9ÖôjšºÍéŸÝ¹VÕÁ¿éç¶Yt•%2»O—haîÉ9M¾Ä ÎaD2µ"/y^u0¹ý”šXMN­œÎô4ÝEâì¥*ÈŸCHréœFBz Å0í„›~œråº&kÒ¦|Z&àGc9–¸­ê…c ®{3öjátôçÚF²’í³Tßý¾VÔ91F8â:9S8ƒ™mçÏÊ)”§Zûb¹IMÌ“°¢‘ú©çZˆ§(ùõR/”)[oe‘ü¶NZè¢ðÒa-|Ô”ÏØ]º¤C•V:˜Apª×gÆ¥‘jeÏ¥p«¯ŒÒVzÓXõs¶²òˆ¬B!IÎ2¨äˆŒÜº\"Èn¥°—ž¶B&%¹¤œR+à«*ìÉ$!xåNH§OñtüåaÉß›nD3“dE1QkV3ã˜3_‚Yý¼ç;y+¬¿G$‡¤²wm-è¹nùwÖø«ž¹•)†¥)Ì €ÔA•Ñ”†D Y¯B–Tù r¿ŽSA(sbˆ> jAÍ  N1Ë‚”;ª ²+sC¢(%# ˆ Áƒ`h!¼VÁ†P‡a_÷ßST8‚PìU)RT\¬sšÌq†J‘· wìøò.QúË$ÃAö´:BtRVÆ ‚2£ §ÉA†3óªÔðÐê©T¹|¹kófíÑj‚8TõÖÂ754¥1Ð@„b#ö]¯U0„¿Z¼êq4¾–2}wñ©Ô‘hÏìB«Gå'}¹3¾¹*+Ñ· ²šõï³ÔB}œuC”¨Â£¤´¾²NF1™˜âb‹ë‡D\Î[hIAXÈRãÐü=«T!ÔÊ¢#2×i&© Q3æ}yò¾—)8´×íl*\¦:NtŒt!˜Gªêã8dÅZcyuQh…Ž$©ù5²n\m)œÌ\5Ït&-¢•G÷ºZýŸ‘L‘± ºNë×¢9UŒ•\ãX—0ªRe;fj£ȦÝIˆeÁ‹æ]Ô6òr™UOj|•úy?Ê““lÚKXÜêg)38©‰µþ!1è²°¥U-ܬwc0æ/­^¦ÊÎÍìÛªJçáÔe̬œW§ËÑ0Ì©«ŠWfÞ5ôÃ]')ȪU]§Åq×*ҙꋭCIÖ’ë#Q°ýùÖT!¨ý²›?vŠ*¦î°íRcaJ#ª²)RÞü®ê"Žc"S®—þô8ªw©ŽJBwö>—î“+¬´­0ÔÆ§‘pÍfRXŽÂK'á”#5Ì,ù#ì„ûì©eÝKß·…ÃçÒ§;UW…ãRò]EqÌthGôLJ*y’!djÅÛßsYè±eˆnæ8Q‹˜TëS³‘ØŽN7¦S50”Ç%Ê ™0æ )1A˜ÕØê*°ÔHdŠÎöІs¥ÉŒ¸HS˜)ü¦#-H#6H†ä0ÆûA„»E<>3PMÝ’^ƒ® ½cF19”Ù[¯‹Á2‚ 6DÑen¨N W8³ý… )ÒuR¿2lÒŸÇì  Â@ŒJ%†¨ ˜NIꛜDv> ¥.ègëÛùò(q…Üâ'±„˜¦Åq¾A‚ ÆÈ'ä0`† 2G è¨t FFðzÔ¼)âëÌaDèVë ¨­ö!FA9­£t&DŠ%Rf2È+‚ÑÕU M“k/§N@Û áÁŽ1 ,ÌcØCYª¤Â1|¬aÈ$UÉ)?SQ2Ñ i8²nÝæmd¥†§Mßj.ö¨‘4"a•ÜC ˆä6ªQ+ðˆ¤3‘lLÊ[lµwö¿Sþ™Ø—èÆjŸ^ÙÜáqˆ*£öIvêeÄSŠØÉ¹Ù†oÚfÐÇÚÖ_oCȉ‡Âr—ä*ÄwaÝ®ÈÊz3æ*>±„"jr4ùºåÛçeqÂi¤#‰õ¢˜ÖîÆtvã¡9¥§¿f8㔩!×=íŒ:qɾôûUTÈáVco[÷½14˜_DôqHã—­IªŸu¨PC™ŠŒŒíޏ£¹±ˆá9ŒEìÊÄàI2ˆü³7=ßÉVýk‰}U)‚ :Ž!ˆÔ²1ŠW‹Ä±ÕbùÆb; D´Y¬Û§Eß3`ñ?¬SÏýÖlóöD©e.žÂ¸YpÇíÂ-G‡ è‚=Ñ:o"úb†U¹¼ˆkWëÛW‰öª;KŠƒ!S÷¿ï”¨BfaJWcù=Uu< „Bãº?LI3«¹ýW±›÷¼ó2´l]z_¬e¡K0áÎ%ý¥ˆÁJCÖÌC%/S‚¶˜×çé7øæNÏ£¹°OCÖýFi í&ÓXœÚOIï\p¥1V¢H2ŠÊEÍNòW" ®ƒËù¼ZI§!L×È“M£ÙÈ)ê¥\ª½Qg¸Ý´#¡4‡)Öæ£q»e´“vÜä }Òï´–£D#6½ÈÞ…G"E!ìS+ÒÂ…5Ô¯„îMFËêôqm„ÕGÞâð.®µ(zÿ¤ç§cqdœ±Œ2 ͤ ÍG)ªf˜áÕWÂ.æå„ç.6ÜåÑ%ÀŒµ‹mUÄ!;Ó¤2S6‰Ôæ™>⦮ʚ™¬KŠ ïÔI‹„ÝÓ o-LÒ#ËlTÑL³$•Ç£ÍòÙÂ!Èc9HB#Ïë(©G ¬é¹…4ŸC¹ÐÌeÜ¡#WžÉºÎ΄­uÑYí¥{‹Rú)/ŠBØ×(TI%ZR´¾¡„EQÃ({Ľ©ÜøM0PŒ+'ŽZÒûD+<â +5­&ç2:T—¿pÅ}ĹŒ@ôpìÛ·ŠÚ”{OX—(ËLR¯üÔÂ}‘Ðí0ƒ-ˆZwÖܯågïÇûˆ8 œ˜lù5øC¼ÆïÈ@¬3im‰…ˆ:Ì’59]Э¦±ªlüJHÿây–딪 #cF[ºØÄ¹êÍE¥UÖUÕ6w1Ò‘"ñ<Ú£ûâ#‚•RQh•âÐz¯EJ£›3}ÙwîzT”c œ;Æ"\nKÕèü…ò79*öÙ(=ɶo±žÈÉÜmr]‰sÔŸåÄÉ=]h*ÈkN‰Õz /{.·ºS+Q.†blï¥WAIz… º¤Á e"k"ÒÂÕ¶De÷ªé‰3ãÏ™¹2Õûâ̶°»íä%JÇZ³øûJ;U4¨(‡1””4EC£lƒU—×%¹êì×kÔ½ 2T¤_gâq:ÂQÍrµŽ¢’§=2‰E;ˆª^Ê~Iâ J¶FAÆySrŸ3õ“Ë9³Zä³ô…¼ÎYM)*Ò›ÎII¸¿\í 2øC’¯b{/<ÏcQl©ìzØM{¦ÔfD¦vfÙC·âªj¢wbdµz±TF«Õ«d.ú««»ÈÑKª¤Z¡ÖØ'ä·˜“¦¤‹Íæ5‡ýRY¹Žx«bys(I•ÅE2ECXÙ“jØÅ7î;Fš_î^T"!%W¤BÈ.êµRŽžË¿¢'Ž‘²û¥åÌÚY‰åE3}ÄöÌ’¯ˆ¹¥ôÖSѨ®D9ò×~kxº‚»9JD!¥/S· µD1,¬”oB½‹Æ5Y‚JZ1‰El®m4n-d' Š1'.Ø_dì‘§u©4×]®µ&W8äý.*~"ÈŽâ¦i¯\ÔÕ\)"gz„©µS ¨ëÇúQ,¢,ÃyÂbš(•J½–@¢LbÕ-B0´lý¡È_!שf—רý£PZWöõ0ÍÁ E½L-JÕI‚BX–¢Z™åŽä¹ áSˆ>›‰%I]L¸yÎc±ê³ñȇ"<‹Z߬=˜Ån©(—‘ôžt¥Jîà¦F,ÞÝ»—>x—&(ª$«ó™Õn¾ê劚±?¢ÒFZ$DÑÀ0(4(Å!*U»]—mÿº%iÍÌ3N7jž¬VVÌi‰¤+:U¸æ…,C#×.¡É”ÛPJ!OËy C§L–l.ê(no«3]U„͉Fó,Ê­äÛ­ MTÚŠ‚0æí¦ ÿlnd%Q!¡!/Ã$¯íXP ÌâÜ·¿q|Ž èzУŒÇò<¸$hÁ§‹ Oœs ¨£GRHw:s'é“êšïqË2’–/ªtžCÊ“ Ò·ɽÍbqÖf% V¤Ò äÙJ" +cA F¬ŒËTÙ+4)\L¸›XjŽ 9‚“œ‹È“ -?€Ñ÷Ÿ¦”ɵhÆD“4ÖFº¿ƒQ+,–.H%ÐJ¬¡WšìC±ÂqWA]?6•Äô¦„¨Zš¥JZ«G¨€Äs  ,·¸æ“f’ˆ•/µÕeí÷ÚüºšøRV¨‚jºP”²pçœwR·¬¤ŒZ-jýžQ§í„ôeJ¨®!'ÓP­ÎyÎV_Œ³“¼Ñ,l›7È%$³ÄÃÈjð’PCŸHdÊI¤„ŠîgŒ‡Ú MJ 4“WÁ¡j1ÄFB$D2OyÕ ‡sØys$¤9¹ž;~¾Wf4³AajªpžL%DN4D;÷´+Ž"ØÊ&©ÍºåcqWM‘YÕ÷:2PÞÜ:¹¢TÂC$î{ÂÉÁÁXkT*°(!F†²‹m>{“iT-ZT÷éCŽB»Äª·bd’Ò’Ï)kN2©G†„²¤ÃÕ&V¡ÓÙ÷Ð×è„Âi„)б'‹?œ#²ò×&IÒƒ† Iv$ƒêT†×ò—'*­Ä€üq[”¸é)úCT%HÔÀ©0…d–F\øB0øîcÕi¿*/æ0¢»wÈ7ˆÔµò€Ùu')²(¤" O§¾°N¥!6£ xŸbQ\äB¬R‹R#x*>A¾ƒ&¨XÂmyæ rSº­K V=’/ íÎZ%Ä.ˆ È (cXƒ¹›¨¢ðöécįœ²R†¡‹ hФwŒK$r…\§"rû±ë÷ŒñMYEÆaé4ˆˆ’—>¤6D‹yRØP£3’´…Yì<–Ø£úe)38Z±t”¾ Gþƒ%ÄŒ“>Š~By»ÞwöŸmh·’#ý/ŒNÚ] ‚YU.@í[¯% :”bã¬3JÖZÜôúÆ“n%3ÄɆÁÆgžr\-ä&Æ“qV†sdÄÍ’‡éï¶[–R¼¦Á¯·"Ô÷(§–«%!Ë0‚©Ëò~–y«dHÒŠ*BAÁkÒˆb­AàçH[Ϙ“V$cK‘:Y& BœºîHžV®QvñB1e§ÈÈÙ|aø©+q¢Rã_ä:䌭Ýê?XµSÆ;CD­z³”R%4;Îïs,´à’tzO=†&z-œÅ¶¦°­ºD}îc©‚D#“Ñe¦ª¬‚˜ûäi™H:ýbµY¬êePtª¯pÆjªçõzj¶Ï³˜šž®#*¦¾*†g]¢Yƪce[Ç“¨"ä‘íR R•ÇD®ˆÖC𕦵)[1UX¬“„9ÌÔ?ðœµãR¤ëÓ“¬™çö)ЍIü›6 ^ âajŽ*’#Òt ï&êPQd!Ä tñF ºÂ¹7h\¾TØ5Ú•¥ú<»¤%匽ç \¸™S”ÄjRf(( ipa–ûGëÚBU”föä"RÉñšë[´­A ®G:Èæ2‹íõÙ+Á8›õ¤l­í‡6YŸ8ÂO[%ñ פ~åˆëòâi^(†Œ%–ë¯ØgœA‚}¨e1e&åq{=x¼p˜bæ7M5uy/!s0¤9æWAÔã)ƒEvj˜NÍÚÙ? â™"¦}K´Í÷ž”³² ¥eù RZ7ØÖÉÈk4¦1Œ îÂQ™G¾ì¦.u>rDZcdö‘{öºíÝ=µtŸ]{’VcŽÕue•±»Ä˜¯3ˆ1X:\¾C¿‘« ÝL+?U)‘µ»öú\-×îà U„dÅŠJ±le­«4ÌvÝí) å2c•NQöÑB=³®·ÚJùŒ“ ¨*bm?CwGég£ãËÇ3Õäcb]žˆæsÈ\ñU)F€§U´¬ƒÃù…PµN"ÌåIתM1(I "¯"æå+õúb+]°Š!Hî}n¢¾­4²ë :Å1”åS ¬’ ×KS÷ìÒ“çqHQÅuÉHƒf¢ï¼…“.ún¦"n*ãò†ôR' j|OSíš_ V"¡Øs9ޤù ô$‹UÆL1lþ&¥´L~ªV9HU Õ0£±ø´Y0žþ]?^÷/#j9½T;­žRwI)é…â-;:\"Ýt"!‹æ‰HÔÞkW~öõrÙpSY8¥ÒëCŽ*N²*^a1EôÛI Í-7¿Qé^óq<¥¹î+fÉ=ˆ¥¯9éuE¶7ˆ…'ríùå©vÚWØ!‘»°‰»è©ä]:¨êÄêYBPºygÊð”zõt付(Žž{¨½ƒ~IŸVú1Ä*J³¡VŒAG%Ò± Ã"KRñÏÙ”'öRóé§Ì"°s{åE-¾z‰OÃ\^©'\ºâ’tá¶fQÎÁ»yú´¹l…ì) !r C)3›kMæ½;p‰J±—jÔSµ$Ü:âi'0•¬qY}÷lˆ„GÍ”›ÎBZÙ!m̾ZF(H«Ê¢Œt¢5ê¬dG|ïéápW8Zз-˜bj2ê_v®’ †(„(Aa•IäJKBÓ'¹ìÒnÖªû¸‰øešgg7ÌÌRjØÆ²«¯È~†eC•[œ›f¡iÙ¯2LÝ’s6>mþJ" IXF1¡˜Íºñ£K޽ªÙM;ŒC†I8Δ,‹kóÑi¶Ï“Ðeª•mLrˆI%­ªßBeEÒí‹+O*“Ç»ô§±"+ à♬øÇ±~b\iTP„Ô`T#HžÒUp´—Z\&X½šœKø÷"\˜fJ"΄ ‚%zt4ŸæL6Ì»Uºa°Reæ¶#Ýžft‚ƒ%=€C!,BÔö{ DFµ’‘xò^®ô%ƾŒZ+-5“h1Þ‚T1{R"QGg.11ÈÌÿ¢Y3ŸËC’ïZ›%ÐĺΕ zlqŒ>g<¯\–›Wü.£P)jþ¨ª úô ¢ž×~þÚHu,‹*UUrˆç·}“šT" B ` £¤…(‘‰+u_WMäÄæûCqø[ßÜd¢1Ð@P8„¿DØþô³WÛ-Uж-WF#)K)sl®™Jœe„ CªñHqŽ"3ªSþ‰ZS†Âgþâ™*NLÅçì1\¤ b;…vV¨^Ï®^‰»´Òh¨¾ÖBn&H„£Æ"W¬´!(r¡ËDJUP©¸ÒZ4û„$–¡1Ó,¤„ND1-ÏCç0A v…1Q:…’–÷D.Ÿ2µõ-W!¼;Æ Ží¶A‘âÉGæÌséEˆE\³ØiOV$)ÿ^3‹—µ e0¥º• »sáìS'Ò`ɵÏ2}#4äóþªŽS}Îß]ºøOìÑÅ%³±pEbµJ¥ãqB¶¡ìñЛY‡UTæ|N±©yŒ†J+æd¤úh¨X_•”ZN‘˨s=i“Lº¦g.uA­ƒ ’w«7\TóìCŒÒ¦w;©¤ÃªØ©ä2¿¡KÈF\«ÖJï'#Íóº+ÆÚ«Ü‚/ó·f¦õNF¿á¤§…2ËYƒØ\Úô¤.ÍV£.Q0AT»£-kIY2©”ý˜N!J EÊ&sk¹d!E[݉)p´dÙôMZãTZz/DÕ©Q—ÅU!H~§²ºq×jì!Lc¾i›Ô‰"o3ùF}±‰(Šówi Z¤ô³·Í†ÖC|šã3_NurÄ9¸ÍâÚÄ…L[ D¾’ç'7P‚o£´ÔJˆwBÿ¸Lk¿ÚÎ]ySŒJ&©ªT.`GqÚêê…&û¸žëo:XÜÉV§¶½mZ/;\n•Ô…ùÞ»ÕªÕšÅ}K©E‘X¨Å’W(…ïæF[—1u’í/Y\"oìíT¦:Laõ-:­KºÛ¾#·ÄÊÐ÷OdUF2©[X˽j-W{—È„"Èâê÷ŒLu•ËJeÈj6”ÇHø%*¡Ð¤%ד&’Y›3޽gÆï1i-³ÍEq•¥"noI9©ZÆe8EqÜß"JÔnâê}rƒhîê‚„ñ åFŒ¡›¦òØ"P²f™²¶jjöi‡M%upM¯(ÏÆR]å*ÚÞÕ9KÚ]bšR´„z2[iB%«ûÜÞ–j‘ðb˜Ä\úU1$ fb¤®ÝRDmyç¡0ú ³óÚZ”:»60/ƒ" ¤Ýüx#ˆ%E ` A©£&!Cs‚û¥£Œ)°½¨2'ï EÄŽ.¬ÅÔ™ HÄ+/gW¤”pw „„dwaÒsÑÓÙ\÷@@ÍF ŸŽ7Â5ÕE1U;ÎNaJ+¨ @ÙE#‹ÁELBz£+l–  )Uí)ÄXù`ÃPE* MZçA!A5îñŒc9xãQT¬—x!&O*2 lB4‡;!ƒµè“‡9jÍ–'P~?ã ¿ˆ)(ƒF¦Î”$†PoF"2 ¡Š‹¥ßâ§Êé ›+YÓ˜O² ÈŠ"Q¹ÎµËE5­C'äp‹ @Nˆ·xHÌÂäg ˆT!„a¾tœš„"³»Ñ‘ÕHï^ƒÃg-qA³ QÄ0ÂeH¨ÊvbbsÑ‚‰œW :/1M2<#TÞ‹©0änA Ï‘D”Ž2‚±AÒ…qX‡"œÈ'lŒ ¦Zd‚æã%Eb“‹…‚ ÒpäqΣ”AD_Å"AhÀ…@€¤ã<ჴefV˜„¿&gl(t«L*1@©tƒ35ÐÄÁ„WQ{0ʉèŠt–"”¼~ڄΦäB ÀÍBúŽÊ ó ›ÍÑaÔ5æôÅûŠ+51)”¡«YÂs&Êc:ç~9JŒR-BfRlÞ)ÁUÐNDffËZgˆ)Š”+DÔ"U¦(ˆ„#1¿BÆjs(B÷apˆˆMÄ1E%`ŒE%º”¼„bósa“;F/+ËȧÕÉr+·ç3 ‚ /Æ ËWZ0îâÌq F6™Bâ1”nô'hH¡ØG1a ¸¤ãdD)}ä3‚Ÿ‹+™S+²ñ¤å9Œ*8 "ƒN3ÏÆ](ÆéÅ[ƒíê@ÂïêQ(Üf  BíL‘E (…ª)Ä Ù°â~¸Ž˜QŽ6+S°SseA¾G)`À!5"]Ž—°äU Rhìâ+@´f¯“df1N9\á8K„V#ƒ|aC  LC=™WŠ$¡‹d&Ù¸b ¤#FQÊÀÌ YkDƒ¹S‘«¸áe Šè¼Ý…gÕâ”É™¸*ý;BZj¯ç/:‰ÃK4—+ˆíŽ}¶Ú! ³6gí*G†B”IRœD\¡ŠDÇE¦ãØÆ©-w©œŠb!O…$ M²òiè䑟؃ÉI}Ý?Ñpé߆'fhÙ¤±JÚjjú%…0Uu^jb–ÌŠ%“è’ñ)CqPâJZ-¹>çFeC'.\+&^ˆ…Z÷)Ý„Ôî!ê%%ɱjÍJŸ4ÕñS9…~¬·Ã0P£;óQšÚB&39ŽÕ&»=šC2"V.QŠ2ªy&6hú¬'W)ŸUKQT£iSB—þçeÁñ çqIÛØ™A¬†2R&m!nr˜ƒÛUB3¹¤Yµôíš?¾½šže*Ù¤d:˜‰™Eãb`Ïg(¬2æú"Ž7ý‰aVKúo‹ÿÖ8›{x#ÄYPuò )ŽRlûâÉŠéW5®IŽc,X˜õ(†Iä&“wÔëÍ^õîù¬çT"Ü„~k{¿‘ˆkõ2¬ŽNºÓY¢’‰¨í‚i !\š„=*J2Ì|DZm‹>戦WèzÉ „ )~+VЬ¨Wö'µ Ê¢)òΩi1²®6¡[ bb%ÎôI‹dÁLkˆñ¢›Ùiæ ¤„_ReWNæC[m=Üc»c®6cØÚ¶µô÷^ì~C:HWTÔœ…³"þìÆ¡i9$ÍW]š»Ýå)ˆŠf²+f"ÕŽã¶¡ù…õ×lZ(~“\ŽÁŠŽÇI¸†""éÓ܈ÁÙ~ˆQHÏÛÞMš”SÕ¹\zâ¤Éø/]®ŠBdÿøÉ˜Â¥þN™p@H`+0  ̾`´ léX›o¨ …¿Þz¯´VÌ0¢éGVG\6ê‹L©†u²Q)åšÚØÓ“†Vq}Ê•F­‹eÛyIª×=ªªgzéâ(¢WöŒJ17Nƒ¦qUÈB ÷«%¾îì}N|CÞòó\Ö S¤c§ÒˆF;?¹ÖD^(WC¡Ùzì{þ¹«ŸØE/aœÚ,»Ö^Q)¾£!;lWZ‹Yr*„ÁlÂQEÉC2 µBÕ’ºÓŠf6ù©Ÿ”á7~ž˼œšL®HEbW©Mm¨­²‹Æ!º²cb˜ŸGr—‰+9Œ}çïe¦HQFI Z+N4þÛ\yx$‚˜ÍºÓ8o§‡,‚VîQÂlw;• ¯ oÑUÈÞ–  âÞm#Û±biA §ÕÆeC%˜wkä¬a<£2œÄåç´µuæ)}Š^¦g|ÙÖ|œ”\Ï-ºÒ½Ë1JäLdme檹M»¨B:Y œ…ÓXæÞÊ*¸DÒUŒío×—W]® "~fïÓ \ÌV·å)3ìRÝи øì3³-Ed¥.dÔ³[L›Y)0®Q•©YZ[Û{ ©ÂJ"ódnZHM¹hÈWþG;•êu«‹J'&70œæzÝŸBzoK¦B’Íä.ÖÏÚ ÅjJdS:p¾ê8º—K‰c:;ižJwqѪbx¢Ñ5ºÂ”2ȉñ.^íâ,"SÛµÿÝj*v*a~®}!L•9LIDú’W±¬´rªÓÆ› œ©>"r‹òÐ_c¶)‘~D!¥Pî¯õˆ¤ÆÕSuätÆÄ{Ts=¿ÜšÁÎ8Rp´QÖò¥ áˆF\Ñ}ûÑ 4vâO„1±š—'O2çž‹†SåùpÉ1ŒWöæÕy$ʤ¢$äk'Z˜0í¸áJwzV¿)Ÿ “-X´!îÆ¼™ZŽœêGõ}¥v1õ5„Ñ(%N˜•˜¦yˆZejq¥"**Lj©›¸U¢«l“Ô‰Wz¤ßÊçÛJÔTf/AØÊ噳 Ê2c¹8Ìù‰É¹kˆŒ‹œ˜™b<̵¹´µt¢«”̧‹íWÎE#›ÉíÖÒ•lø¦ DTÌ|e²;&B+ŒR9Y¶ÏôEs•š}.µ›~~ˆúÞK² žÓŒWödéQå"©¹›Ãwg6;úwkÒªþí¤ˆEU’Él¡y¼Œ æsªã—Io=ˆUQ±{¼®ò9S‡„â,&ˆ†0Þ@*½y“˜`ØGžpAZñœ¨ $¦„ƒrµNRûBp‚1žšÒãŒJ?h’Åé†ü8œè8K *ŠFqAFJguB•\ u¦˜Á<[§$¨(« „aÄâvV)¹Ê+ûØ€#!‚w1] €ÅÆ(f;u 8Ú­cwQx ä! èÀF’ôPZ°ÄÀÀÀƒÂÇKt@‡é¬í„C…ܤbb¢”•Òn EVA†ÅwBÔYþD¨t™dW.ï~›8’)U=ƿӲêz™x”â•lg‘ ôÂC3˜R fôTq2”fm k­Lþ]sÙL!L7–®Z£Ážæxv"n—‹lN•) ¥Ð^®s -y:džaÇÃ^ˆnÙF*³ŒÎLÇá×3}Î]PJDi®IŸf¤±Å7=ô˜Q3´Cºj\G˜”î­8JbçcˆBª–¶¯¤ŸŽd;“®b…Q-»C5þ›bЏ“ŠŽéRáên˜Èì½[(Ž»vYBWwiÊžÒ•ÁNQšLõû…áHZ4Û,¶&{·j蛽®õWÞÑ,o•¹QAŒ•Ís /”kDÝì© F­W¬Õ.:Ø¥ÞÜÛ„H¯g<Â/²7uËE§VGWâíq°þlåFBºƒéíɛͲ¯Uv:™5É­\ÛÑéc\¨EõfǶ6 ‰ºô:F뙌¤`ìç&ahPº…°G*yñ›I½¬«´­Ýâ’’ifsú§yDJ„q•Uv…³*A4µ«û%‘Fm~5é|î!ŽÌV¡I¹²kq¦’¿†)‘±HÒ=´JQ³òšTK­˜Šø[ÓpÙ_³ 0‡õBw‰TÔªfPEO'°È/»B})®ËŸ¶AÖ¨ADS#™“jM©Ð…Q žnêf×W¹4]žÙe*Ó3;í.Ò’•ÈäŠÄvåNI:ÌPéCêiÊeÈÄ=??ëÿ'yˆu*ºHÞèû´U!Ðé*”E]¥Û”˜³áÎŽäªN'×°úÇpê·dSic&K‡ßRkë*¡«=L+zŠý¥$…*Q #©›Ô˾~LôNÒz㪖¥½o£ël”¦Å@¤f=e-x_­ˆ‡N;ŽVgâÅAÚŒF±vŠ…L$„ñ)ù¬ü>’ÒÞ^ú”P‰îRјÖÎWv: ä;i¾Œ‰Ä´ª¶Q÷cÒ’V™bcQNr±(dB ýíèüT ¢´¿ì²¦¸#bIÒáõ ‡B!NB+W‰fz"±Êèg·­…âØ¤SI[M¨J¥HŠ\Ù6›M ©aN¥œŠb£”"¸D&¢“ TYLÁ$é}äé;Ð1ÖȈÊBâ?Øœ¾Æ!H×TÔsQ½šÙþ²1Öí«VÍj3ò+Ñ̆Åâ¡[\Þ…ùs:•u…銸ÆÞ ˆÉkn8–$A‚ß(b9êäèB­j²i¿T_·6L%Qq=Ok|„E•-–ïATÏÏÄl&xïè'”‚Tò±t’Ë6~™ ê)—Ù>ùœ5NŠRªb\ÚþG„:ºíÇì=dkÄeäFÛO^IJξT»1ü´ÝÍj¥8#Ì0P·ýÓõsî’ÎH÷šs~½Ï"Ûï`$©÷ÏU~-ϱ5ÈÛÆZõ…+¶’7R6õ§­(;õ:!©r‘"ÐOí£šÄÿw`P@!Ç£N#lÂ&Ë)öÛÊÉy+š,ðO…m ¤~˰R+ÄâuÙJdÔf5 E*¾/Ó¨¶#5NÌ„$§ ‚YM”äSK31‚B\Èâ ˜ü?Þ÷ÎBá³K3–ˆaÏaNgÖÒÒ¯åôQ—õD±eW¼¨¢~ÑʑܖY†nëÜ©ztEWÁæ—b8ë kÞ•zªïÓlŸA¨ˆÉ+mOÌ—;uDç±×¹r¡hEªš)ÚˆC eüéŠû=DZ¾²19—ˆÔ1”¶—øIYYT¦CGÑ2ì©™YtÖ]šÔ[Æ’¾GOŸf\šR•)å\³ÊFv©9˜ T¢v\§!|—IlOB¯ ›‚ ´÷ÒRôÅ^zQ !GaD˜Dê™Z×¶CbjªØ´ŸvÅñžå1[nèlç:œ+® *7³I˜Íb–¤ L,zü 9%¿ÌÅÆ¸ÊØZ¸ý¸Vë8Ž!y×EIÒa3gB þã¦Uîë0ŠI6ƒž_úÇÕ!PÄÎ=T¥l>µº[U,»Ãjë3±Žw”¨‚Ó*NÄEî•Ù‹¦Â‡OˆA –Ç'S}EUúâ~rÝKÕ¡êøÄY_pª:±iB–o!ÞAFì¡$u¢àéµ~uhºÊ`ÔúPo?½ÐÅ!ȇ`pÌ€•QJ*¨ž—ó훯i¼¡˜²æzIèò®Ðÿs0*p’|¢šâ9 s<˜÷BfÐ[Vc¬“c„&NcjÑðÜýè⦱EXP"8\‡ Aqj{DòT–1 ¢zÂáCó–Rç BEÖZ=F%_×™TšŽ¥OæãD…!ÍÇd#£É¥•5ˆA˜EÛ;1e…jýõáöÈô–†žZå æá6DÚ‰á^béKDÑXíâU«Æ³!¬ÏïíˆT˜eÉ2Žä˜á„jý*ÏZåô؆}9Î`ŠìÕ;œ”Õø¿Æ÷–´ÒêÓPæ~ÝC6¿Ê×NíÔKšêÂVšC? ê1‚”ZÛÁX‹Ø" q=ÞÉý”9íÔ¡ãËҫѧDk£ŽÉN"ü\Å6êõz0·9l6ÑÍêº\ ¯Ù•3×êòÆs¤Ž+é£1|ÚQ~•Èô¦TF«ì§D®gê&kÙ2CÜR¨•¤¯»i)`˜™jo,Ñ¢Ñ ÒÉC>!L¤\¥Ju)ó3Ê´!nº"¡1ù Âl²XUE¥U‰ÊâšéžjT”®áÔ¨a@…0˜!C>Û˜6êÖmipôwÍD³¢ÕT!ã)E^TVqÿìFâ•Q¯ûv¬Ú”n›R«5_ú‰ºŸý+šéJ‚mtÏŒØ}W"˜*&޳¦;QJßÔc.ÚN¾Éš–GTÚÒis»Š›’Sù)ª'­HÑ9Úäã“û nîÅöu+j†C0v[’¤é’R¯·‹Ki“¥Ïü¶Ûs°ïtF®¿2eN3ò:\ä;¨ÈN¾qDÍÝü$„ÎZ©ô§"rZƲ§‹"c»œb€ÀÁ 7Ð!›jÐÖð½J“—‹X³Í?ñUúêdÑ« ‡º±Ê´‰Èb"D% í¹n+-fÆF Gc=ªMªŒï»uåÙÇ0Q•ñï´OöÉsP õ6Z4¢ÝŸËEZˆ‡ð–Ì"ê D_“õ9wç8Ìî|ÑrKÙîé”_.LâœÇ·½Wˆ{ª#[M!ÊÎVæZ%¼ÿBÑþEe Å¡»>í¹{/ÙÌßÃzº?<럜âQuCÑ”õ5Œb*]ª~ 2Pa9‰f%ôÔµéŒÂ¡*î#TÄ¢£ÿ+ßÌþ&wãûSõ}çÑ(u©4âc­ ÊR—xu#J(0w¹2Í+QúËF“«FÏòú¯¦´>è^Béh¤”Eã,Rú#´W•ÅÓ„žå¡»? [­9‹Ä³"ëùUÙ ˜ËV–Wù ô%G8p<‚QDqòñœ-X&eÁ(”b(‡2×™[AS-/‰å¨1¶¨B]LÓ²´e½°É:rB*(¸;°Q°á&55! ‘¹Uþ3Xc¡†£ „©ŽESøëí¨’Û¬c†![À™Nµ \îq:‚hbg$QQ²Ð°¨¤›vAÍ í¼þÙ¡¸ŽA°B¤Ïª!¦G–uŠ•Êb³TúLZ¥1¡‡‹SJÄ&+(Aœ!DAk¿s½B3 tB‚Lš!ð]ñ©U0FHg3Ñ´·(ØV³ÑkCˆŽL9â.7)ĈÈq$iD†ª#°ˆa`§£ã2+ ÜcÒ))šŒ*¢ÂŒ¡2 8ƒ@OÒ> ¡¿í¦¶)H e:㥤l1É –H¡L^C¡QÌC · †§1ñkQ‹ Fz%Ùš)Å%Ù¶teÐ&!¸Û1êWÎfƒ{ÁUõ§8[C ê\&t ˆÌˆ)B2¨b!I­®¦8•ŒÖbˆZSŠI<.*Q ÊQ‚F k<@(!Dqƒv`½_ãÞdÂÐÖ”çÚš ãºä&B&` faN‚~Énv¡C Ð8”#1Ê,qC#(Å©˜ˆS)”Bp" JeA$0¡ÜQÃsÅà‚ár˜ºÎBí¡Ì¡ ¹Æ˜„B8Š¥8ÂjTá+Á¢zªQçÈ+õ·r‚2E6ÅøAÀTðèk;n%ÝÝm'e|Pé³^JªSÕÅV:Õ(:ˆ†}µU’ïʃ!OÉØ¸l_D¢ûeÿÉŽe¡Ä'•êø‹uÅJàûLòéSuBHZ'Qÿåí[QÇw9u«wbTS’»´¡M+ë—$<´ëüŽEåDÆÍÌïgUgBÊ“/TCý¥f>“Ÿ¼ª¿ä«ÚŠ+)4Òȶ2ˆ|²¹,ž*]í”nìUím'zRÜËÇít³yX[Ú–}1XUÒ)²£wD ã¸0‡Ùé…§ÕrC¥ëàBù4jGž7]‰O©’M ÁHäºyš©…t1®¨R˜"Ž‹½F®*QŠ­m°Õäg!Ñ$¾Ê]ô©„sÑXrÓ„ä³þcSèSR‹2óšòr%Ê1)ŠGèÎÿøÉ˜Â¦÷Nÿ=|ÿ·_Ü/ïïùcý‰ÿ0´ ¼ËXgî¨I÷é†~¼ètHĈ37_ë!|rR“[˜ÂÑúêÅG•<‹k`¸n×õw6õ/ùi\D3Jï™ZÈ®Dyvq%G*bv—*+Že×ÍmóÔ÷V²®’Ý¿›mÅ)Ø‹W•i›D:犓)”íûëB¸âeDеÍA %ijxˆ¤veo“vvEßr-‰•U$™F˜Ì¢±Y7²µ4‡KºS‘ üÄ"¢³6gúézÕ÷üîg.Vl'á(}Lô!š¸Oz\›À®WK7¯wˆ†³‘Dc²§â똜V•H¼.Spþ[‹åqî•“åÆõB;ðGWÝÇGåw;ùRú»8®èÕóKýRCͺ?îþ=#b˜ÛÉ‹E*3Δ>Ò3=Œ¥Fe³HŽÅ5>ïb’BxÄ{qq´ö´s Ìš¹cüùÇY‘¾¿–r˜Û-‘ì}Â?SzºaPbTs˜ë[‹Ä‡Oÿ4¤¶ý.¸òz‡Êm벿ùêî#~â5dª §Tr¸œöQÚT5KTã”RêQ4Œ]ñ7Ni”zEêòT‰wåÚ{õ„É/NôºÕd&Uy«Q¤C™’Tó„Úš”zæ·BˆD*VGE+ôVV˜¾l¯oÖF˜:uqØ-c×ãxB†f‘äÄÌ1Œm¸ƒÃ ˆ @'C(JüéYŒ.ƒ‹A\$-52Jº XÔi‰Ž„(̃¾R¨nj‰@45Ãá]„vœbÞ;ßP`SsØuÿ.Äh£<æ%Q…1v0ƒ!€Ã#"e]™ Ы)ðñU•S<ÇÇw%#3%åc¹‹B†!‚¢ÀnÃ`j¦{9d)„b\øYTAÉàêÁLjBÕÑìsŽSÖ Äi490»™A†$(ÌÉ£$@NÙW¸…¢&ÒUu¥ÎRÀüîŠg%wv.B]UZ €ÄfÌ»¨aA…Æb†gW@©Ä„4_Åà †Z0!DT°·¡ ìÜ •ˆ6Ã!yŠ-IÌa0¸‡¡ªLÑ–©E) KFŠÌ#90þq!Á8JAâ 2ÓH5Bˆ8)"V!œÄô6ä‡\¢ˆ_K?à— œàz”— gd¸˜ % 46¨C`ÀÂÕǽÆ3¦¡· ÉÔ7ÙJÏT¢}î&’©EJ §t!ˆ‚1±itÿ-Ê&¨Ñ™.R¥F©¯Â{‹t¬ï•Ùϸ֚؄ä Ó£)(®¦c[P‹gò.!˜¬æ4‰AŒä1³ âœÔYÑLÊËLkØ?ÿįß˯+µxLy¿_]IÁ 1Š‚‡~ùæ©‘ÄfŠ 9ÄXgW‰‰‚û«bŠú4µ]~/`$`@ú»[[Çfμ˗Ÿ*Ž~_¥¸`R tT5–þ£Y’Ìå]c8,óL=ueyŸŸptˆ%=±õ…WÁ¦ªÑ!­]¡ˆ&gx‹ØS»¥ Íü†B®‹¹°°’ìC›Æ$ú» í¼Ù‰Ó§Úæds—üA³»…l’BVa¥)oLZ‹‹ !BóÄt÷¨‘s‘%—ªD·N®~•Òør9«a›Åq aÚô×LSšjY4=ùÈ?‚¥$ü5¤ª©¿HËg6q‚Cg¬âò¶â¥Ë+¹ ê‚{Æêà!˜ÝPD3ÝÏÍ–UmnÂÝê¦ß»ˆÄ·¹Ï(”%l¿c¥] ¥* ‹»ûfy¹§MYÎûžSI¯JÏ¿‹åñK¢ËYKF} ºZLÜ%†‘ENµnu­'#]Èò”³'¿¦V¾1"fÕ„¶„3ÖüÂÄ¥>KZÁB ŠS–Dôìy—¿"”îi…Âê>Xg‰É*»Ð†Û` „–õU,™S:–Ø6ý©ä)ET¥dõ¼-ÒQì‚*NK¹¤SðwÊD»æŠb¡b+•m[Ñíj{ LÑ;Sïj`äcÏ„vP‚){øaBn@£Dã,Cw±e*VnÅö§ëžÜ_†À³ÚiúµöP*6P¦Á4Ê“[Ç~µÆo3ÆbèBø‚ŽÒ0‡®ø!H­@Ì«‰ºƒ*šJ;js.¹›‡‹Y$D}W§R¾ØRo!Û·(ÔEÁQD2šâ-ÂÓm,†QÄ%’Ò½:&¼ŠP„áyAWe¾Ï^éÆ/#õ ‚hç!ˆå%#ä5´§!u¨W¥òåIk>°Ý4š¸ÅSgÄ­¤uOê‘ÐC®sÌùÆ* H¡\æöM'^È•Ö÷÷Î÷0Ø`€¢µg£˜Ô’>Š Ë\¨Å^EÞìWà¾ØŸA’ë×,»ã‘ij‘[¯Ü´¸è¦.müŒ†½ ®ž0F²ëé QÏŠPR>-JQ':Üb Yx3Ô<Òe”‡½úBâmЖ|=¢^Öòc !QË2ñ ˆÛ‡ò¶ ìU9UËÿ¡ŽxÊ;«í%Ez5dxt« Š÷¶¶ššt;‘_¦ÁÈŸÂfï<ËN¡EcŠó!FNÎÆ»¡ý|G”zÔ¹æËgJù¬®zÖ•b÷)ŒÎ/®¯WŠ%LŠ)Ž2é­EÕ¥ÁCe*iޤN±Iò³,—Ôce²”ÒäMž¾Ty6ž%Íd¢±Ð™ÔóˆAŒ‰qP¨yÊ!›T!ÜÉÞˆËZ“T5M×\࿺ˆºU‘E+M/o"S¬F5µ,™GQ±{ìÄ1=®LÚD1eR¤Ô>]8Í%^ª-ðâ<‚SiÄ­ñ‹+=×%3½½þLþØ?YÿÌ@)@hÀƒìäÇeÊ·~ž/¾ráŸx!Îp’…ºÈðFˆ^Ûæî ž8ªiïq*+((ê1þLˆRøO*3‚Nf¬Zu¤žsºCcj1Â]%Ï´4&8Ò:Jƒ+xD# R&ãXN{íiÆ°š¿‰«ë2HIËÛlJ$ªÅ¡fH†nä)VncDm¥Ë®’ $’h&Ötl^?‡~+çVج3ˆìò÷„®àTÅ•êЃœA÷4«g…3´Ûâ¥i×Þzi/—cÏ—\8êgiüN£®§Õêéèj•92dƯàY”ÝQ)F°„T2X€%!&$îâÂe(y›e­^”Ákm?aºjØ‚Q‡-±â Œ9z#ð̰Ê"&RG9œÈ.ß²<ÙeQã`y·Þ"…ž*ù¢Ž# À@KØf†S‹',I¥gÉ#ׇ›‹~̘k¦Í„§š…D`FÆiFàE¢ðâ¼WbÉZVLùsÿmqûw4Úï)p‹Š*Ô’ Ðp U T²WCuf…¶a2bVöÓ Ä>ãSE%Åe”0¤¥I;ÈAM+à%fÑ‹dÙ cq•‡¤£âKamsئ5èa`€p²E$€À( |¤c)%µï®]ô·³å…VˆÿÙ¸¤X‚òíhÒª•êæHzæt˜âaNAФt­’jm<ü.ÛƒnH^ÃT¬3uC*J8#ËÃ;:RÐÞñ4&ÖÉ0¥øB«^am#tåé£ywˆæ%F(±+˜0@G£œô¤§_¾†Ð´Ðß ÌY+¥ð’¢²¼1ä1a@`ãdPFd8\?„‚0ÛE´ÆªÍô“4^l&÷"ê`)Ó8õYÍTÄ=Ró—Z³ÏåˆÃt¼·Ù/oG/y&ßÚE¨0èT±Ù‚€p “PR E¤Xðš”JïÂ]óæ“˜g2¦È»ÝúÖ¥ìzá® CùìBy×ÇâÉZØØ•/¾Ø¡™>I0A¥G^ 9Æ]Á–& /Ãõ}”šO±Ã‘¬aD²÷î`úýQ">Ù”£kPB.gáS>¯´ÚVz¡(®QyV›uƒÄè¬ye©s ‚@€0!)YÃ'ðṆ;qKtJ%bI ŽU…ë-£ÈS G¡É¹¥Œe ÖeæW7Pµ=Qo&Ö»Ó¬ÔŸ¼Ñ"·¯Y,¦YX  «Ö,ŸsùßÇ×Ù1„­éñf¶n({+•˜U«fñ‰`ˆR˜‡rˆ3Ñx±­õA¤Ó^Ï8Ó4ÝKvœZPý¬À‰/Å0âu¦tn_,¹x°ß@ÈýŸöºj2q%úMdp€Ëë!–Ahy^†u‚œã0‰)kU§Í·Á¿VT«È“˜ AmoïÞ,ûò 8à¶‚¡»¤áÿ5Ù?lt- „íÛW½Xì(¥ Ë*Ídcͬկ R8§”©Ö˜â[ '”1ÌeÑ¥´•4ò`h °QžH¥ßaHâ„¡É2w\6rÝHrðÈ ¯´ýÃÛÛý_= Ó&Ÿ]lq@áɆj„ †ÌY¾&pÜòÔËypPIk3M·±.Ê[å …¢«Êe •Y5JÚ±‹Õµbͱ Ñá._GVFaf”ò2Ì0(DpD„@@‹ìZÍò—îòôLÆòÞÚÓ;’|ÐúZ¦;‰!EŠ¥`¥Ex³^t¤1+ œ"ȹ& nY$E•®Œ2Å6‹ž!<©“*èE1#ZÂZ—^‚×>rpÂÙ:2ï6R’ßtŽF>½JcŒ‚­ùb­ÇC’âµMää•Z5æj¸¹ŒjÂîÖ'[pj9¦+бÂ1l=ZBñšŠi\„àâD²–<Ò³*1º•#ÈAÄ„ F j+J…@ØTa¾ïµž¡¯hµ¯ÕÄŸýÒO<¢Ú…ûE3ðqGr¦`C\Ç/Z…MºO§I%laf–ÔõÈ„˜`±Þé04Е‚uާ,A'e8žþ­jé÷E–ŸLdÌbreH´}eB†… DŽpâ£Ò“å{–«&ž«B+Ÿ„¥j_Ü3ájÄ-›Å9M¸!—ÄÔZöe•°ö‰7:Ñsškg#Š14µ¥÷2¥˜âØta„)Ä 1Ę‚”'šmè-? K`ëGEѨ€y–ÿøÉ˜Â§ðN´~Í€kP6ô ªÑ´ Tô¢ðÏ÷†Þ†rAÆ ÈÉL$œªcç+©klFùý”š›DGνÆx«/+.;b¾³¥ÒtõÞ[½ò ¿ˆ”dô+ivŒD:”ëT.Ò^ôª&û:²ïëöY¼E¶.(§ä”Á]Ö¹ Œ„Ê*®qÜïUú m\z _&éëñ¶‘šƒöJ#‘{;®Ü!„c\¯L•ÜÉ£ª+~·æçúﯡÉ4–ûG̺íïò]ÒoCçù Ýmª‚'DÈ@ŸóèDaŽœºŠ‰©L—,#»kj[É]¶’sURå}¥°ó©1ó”wÿB 3¿’Å>錊Ŝruh".ûe”Š%ÄÔß§é¯R2?näØœ§érQ ê+)p‡ …WFb0ÞWJY.’â’…êAÕÇZÿ˜¤qG¦–D6ËœAQ›'ÜDB/âáÄ DAÊËq^Án².Õ\Ekèµ²†„#‘Óˆ>'m„ˆbu%b¢Å»™…áÎX̨ÕÃŽ±G!œ#11¦BpÌ&0È`ÐBŒ\^FzÒò%÷Óž¹ ¼¦é¾°³‰¬©¸ˆG¢ÈÆ A8UEF‚1Ã!šúÇHÊ’#”¥é3"°ŒÈ…E0;'@ÕpÙD´¥äQ+„¡ 3,)ñžS@ˆ%iŠ@Ú²9â© €â Œ!JB´NUb€ŒÅx @’℆Pb39 ‡Æ@Ýyp¢¸^$¿ySqlãÁ\H@LØ„5&’¥ !L[Ѿ–ÅM^³uÕ'õé|BÉFæ¢Ès-г.ªi›qUӽ߸„ÃuÍ&Úéσ¸ˆŽáo%‚3SŠNéK©Ú2H©D“ÒÒ×¢–£©Ü„ë5i$æ\*¯í ÍPÊdY,ωº®O5oÊ®ÜDVÁzLJé2›¤æY˜é´Æ±„*J æ©Êa“×Êœ)j¿ønj3þí{³:ÖÿbÈ|Ú}Ò·Ã3ʘ1 Ø^g+§¼¥eTË3Kb‚=(ý Ò5ù}ó ×6IÝŒ«88¨Iø›´r&«a?WÄ#¸LRG»3u²å$…ˆ*‘W(¸q/ŒgK9¶GüCuq ïØb>Ð¥g¤»ùˆ: @îSœe¦["Ž‘‚Ь•Ÿ%Å©™øLO’¶× XœìW,·¯VË! ¨Ÿ2 ´go®ÞgWKkYiµ³c­‚)¹ÕýóªPÌ!™W¨Õ[~s§³åi%jÊRmª„©2šbT„VÓëyÌÎBªˆBsÞ’¨Â»Öt²ß Çq˜Òòá«o-ÚÏë+ѽRµœR¥¿]B/ ÜεêS„N×=Ÿ>ÕÔ,ŠÌ%fü£²3ˆU¡/êF¨‹+mQU†-N ŽŒ\>d¦¹±Ð‡/[vÙ“Ý©;ØìüZ­Ô„³ÇDó{íŸó «n,ê|¾U”…ÞnZÅ2‘yYˆ@Ä}§ðˆ„´éC·šJ´çIéJWðŸ1˜”ÊõÇjoÐs{dàA!úÁ@æbkTæ,ݦT#S}°{l˜#ÖÖ¶o©íIÖ™¹)“uE:í]:5„EýÕÈÿˆ÷Ÿl­ÿ˜¶l Y ¦ÊüG;‰[8r ’cÜéØ]ã-‰»dÆËÕe9Xâ.¼»rQqH”%,µz«ÕÌ™N6Næ¢ÒÝyqþ”Ug{QZ¥ÌÎ*ˆÎ¤Lâ1HD©–Uz7¹Ê"Qû¯Q+ÂsÕÚTe®êµdÝÝ ®UcSU ®–hÎqÚ=ˆq/õclµ½“{ D¤ŠÌGG$žêR¦X"]‡Þ­ ^îÅ2&½qö‹]ŒTµâd„W«©Ø1M³4Éîm¬¥Ê…˜U˜ÔÓx‰¢~YUöi1¬äçΪK¤¡Æ(eî˜3z錫_§†>ʽ&~¡}€@í®ôÈÎý!Ž£&$lˆÃ‚::í¢°+fîÄSaL(v á¾1H Ü´ƒ©’в IÇð[^Ç1¢t©·¤"‚΃> TÈkàËÙéÀôÈ›PSÔ«K(CQ°­(Ò „1¢ØBcp‚!Nãtu㉞`°¥Xj­B‚ï\ÇçLBS ¶_ra#…ÃÔM¢q«°=p¡ƒ2xRQ/8¾›ð£ ŸDLÔñWbÁ°´pr=03±:)Ä»ÜˆÄ P @@d¨p¡!€Æ11®×ýÓV å®QÙ'¸wœÛš‰Ô(ñöpAœî,´ÂA¾ô~ä>Ù¾à¿ÿ\߀ƒìä§qè1ÞüÒ9Þja™M…‰¾5Ò¬K¬µqN´•j¶Ô³<ÞØΡ¢‚”Z .¼IZ¸‚œÉŸ2{Î,Ýým¯Xéæ *H`Ä>} -m÷°ˆa„o®YkPËã aÊa bÖ›7àJ˜Â!j´åš…*VDv&mÆ“ûD>JÞv3mÕrƒ«’‹a_MºVµÖD&¶Öꌢö# AU¬Bå‹|UÍX΂ˆ +ÂVWÅø¯Výjdè–e®h‡óµ˜/Ÿp«J f4Aˆ@À¦@6²,ßÄ}J»ÈûûÉþÔ­Ý׌ÝjLAßÄæ/{. D³•enjnLõ"|è&6ºT‚‡&.UR8Õ#•ÜŽlý!ì‰U!2‰zíx´·ã"îÝ­ô_ºaE,† )H…­«¯¬ªâ0â¤-?ÌÚØ*éÔAèÙ¯áö¨V ‹PÕ-žõz^ÃLBGi MLn¾¥¬â§R‘Kò°ë:ù{,Þ^BóѸDé‰^‹_µÇƒ5Ñ×l%^²¾L0(að5 ¥ÕæÈÕk•q.$Öˆ"#Ü„Š3úô¾—”=…1Û5‰KÕL¸Û"YhÞɸäòÓU…‘ä;LUjŠ*øØ0§qïô$¿J.uÈŠIKˆœ…›î¹”ˆ®‹CgŒz[ [i‹”tu)_ÅÛËs·cJ©Ž*•Ée‰”Ø‚q'c¾+óïSu¦!3íö¹ÊCfg²j‹Bvc1žŒT"ÅA5ΛõÑ(¶"w]¾¤3ƲDCgr­ ⬔ßÖœJ¡DÙVo›‚”¥SãÖ‰™”Ö«H@ŽÉËVí˜[Gàˆ#`ŠQAáoÝ JôSÊ÷u÷0ƒ)„{ ÅS¨]j#䥲¢Ë¢ÖjXÀRa‘5–UzµÄO"WBTŠ)H´-†\÷Ù3O98¤Ê§D_¬¸D©mN“ª„F¨8A³¢RZV— ‚t¬#±ŠRj–ß_ºsŠäg]F¡N)[ö«…µzúÊrʲ!®Z}j‚’KA¼¬t!‡YB±m QØKæÌ{«ˆæ-qÙ8´'RJs-ŒÇRº\y)×£áŽ#›µZí•ØÊšˆoO˜Li%eˆŽE¨&§T…ª„p¢ƒ¼Òä¨÷‰žÿs!U_°MüIh†CÕ¦‡`‡hO±z.Ê»K #ú$m؃¦hC¦[•·©wiˆä( ‹4N+ßdòuÈ´2ó¹Z¼ŸÒWçÀ»‚" QÐÉRù;¯LgM¨¢ŽvM·žñ7P+ÜÈ:ÙW„Â-Ë;¹Á3otÏJ‡R?ÔÉDÂh™idú B%Tsœ‰ƒm6kð„læ)á—YIY¸S~~°JiYÂ)—Ky¿3ÕjæqÄÚó‘,ëgé‹3}‹©»›‡_#D}ØÕ¶&íø©:(v9VRµé™üÕ%ŽÏRȪ¶êZM÷Ü“ ¦fsKkU¨fˆ¦2.?*¥Êw6W«JÑHÅ" Ò­z[#Ñ„¦Ó™’ÄI”†+О¼ÝO§ÄãÙiè3íÈz°’½š¸Xåi^e•E =#íß-ç9XB)sÑ>³Œ¥/yþß]odm¡Dr!ÍsÔ²m~ªˆ9Š3#q Ñv´¾ÎRšª|È:üÉ2“óO̳; RõJ;Ëû}žŸê3ƒ0tÛrп¤Çõ¹äi\¶,O$­2ð˨߃ƥ%9³«…,äGòw®™•»<#Žæ«²}öë´Ê7V¥Ok3“,›ýQ•Š]Æ¢äë)œä]~¢<„%Oa*–­Ù$šy ª]tC™¢.ÝUK—ßîL÷*§ÏÊeâÿl›ìU¶Š–K! ÏK×4¬ì‚ßífR&;>ëÊõóõ¼B(ƒðÄNZ¤ì΢Ü㉠ à‘q‚–\Õâ|ªê„&„þw2c †ü¯/¡œÃϳ煤’pE…l"•GÊæÉò¬¯ŒˆŽˆ©Ê®S©¹îb6³pLV˜ì!(guÍ©5¿žƒud’¥^bà®Ê–©ýSЬžÈ#®ã_³îjPʶòÞ^†9[%8Æôv‹±zE+J+ŒZ\¯€–JU0«y†¡–C"9~×§ß±|T¢LuZ1{ƒj¡[W C…l¨I«<Î[èEf!;È—O8ŒGWBÕudäE“@éo¥‹ZMáU³»”Â¥¶\7cY8µ""-Š‚.ÔHïizÙÖE°ŠTCþ¤Îª PáGrß.Åêg½5[Ù ˜7—%x¨ì…BïKýÛïa )(Œ¶D7\± ÎÞõ²ñ®%)eCU*ü-M*¬VçlóÜ´2†u?/¬Þ/J¦bœTzÚšJŠ7¦ˆ¿½ rNögV®ºJ)Ô•ÙêøBTÔ¤¹Ëmœ!¾F!lþĕѫ)Ä/×ä%?PÄÝòÕˆo"Qø¬E%‹‰çîÃr4¥ôÊa¬¸Ód¹ž ÆA )Sï™k |¯måˆ×!g=X¦ ¤r>i²ûlR2 Éa1\˜‚H’ˆEa*Ù¾ìDºkseRÿWš+äŒ2¨öÖ‰ó„ ù[™ÈŒÈœNMˆ­V¯ÇA\ùµLñdw²úk<š^ò̿۫b$"ì-ŸÙRN)4¼7;zzX(”]ÅFTòÊ ßúº„Ñâ ”‚áÿ%^¿³ÙCšŠòúv=—z¥j98¼ßî1Öë~Föë)2qR›kˤҖfiVEJã&e/N*5H 0-ó=»;¸‹aªûqû4"ŠýUe?cx™ŒæcˆÃ¼·ê’ïQŽl\*’A|„±D©[úôÌ™UáS^u(S ñ-ë’Iæ(¥AœR'žEêÆÔbo4TÁŠA­ƒjv¹[¿§4¨d,ãm¬êf¦›EÁR¥2U‹*ãÿȼU1'+JÿpžcYF™ƒâBTƒlyýë¿K„ßÑZ2Ä+ªÓ$yKËÝôÓ+º Ì5ÆÓÞ!îEªû½Jås<ˆRœŠçÙ7)±gj·Ìw#3–ž·’'F!‰³©ZF0!n‰øü«O}Ú']$LtI/¶#1?ÝÔˆÔ"qºõ£ˆÌCb.\’I•Lš†²ÓÂ~ ®ŽB.iS+â’&Iê+UêËgñÈEbo ææ'2Lž¬bT6ªò Ò)7Êœd¡š¸+‘ M/ ©´T"9_®ÙÿBﲊ‰„58ÜDèF¥+˜¤©$ÝÖtˆ± ôúÚJXa¬‘4¤©%ælìÉ(IYÆ9ƒ/ìô6*yˆ„kñn™bë%J¢)Û£@g\ÿøÉ˜Â¨ÝNýÇ~ö?—àûÐ@¤b´…,”(Øó—™‰çφJ[1TX`€Æ¢€¡yDf+šÂºÔ!ÓDl¡ @Ȩå IŠg #±o#ªÄ#5&9I6&Ecˆ ´@>?-?1˜.ÜLýo퀿 …@@„óœA3†u]ÆÀJ˜4•ß@U ÝB1}—‡÷Šlq†ÄoDö0tÐKtÏ ´Åbd7¬páÁÎ5‰  ¬éøÔ”“fr@›vƒRq·ñQD9ºεNîøTHÑ@'8ÇêR”xaa·ÝиM„¢Ôáâ¥WH1€‚ ìõG΃vhê#fÔ¶#ÎUAˆg:¸‰`C)Jª LÝD̪4dw’‰8äe0—ÚîAô”$¼:ü8š€ÆÄ‚äk Š!¢Â+ZÒ!¶)A¤Ã¸¤•Jâ) `‚™ b˜¨.!ô§Ä¤ìa>T€«\9…š-„i†d4#j©¸hTa8B)‡¥ºìz¤s4ÊÎ]ö&b±"‹“Œ¡*¦™" KÐzATõ)©ˆªŽ‰N¢´Ȫ1Ãü Al"0¬T¸#’F¹‚» @IÝE3ê dN/9Èpoñ÷Fg4AîýN1E‘”cqK¿ ŒüI„d#ˆ: ˜eÍS-jC !Âüs_H¦!ÂÕÔŒtžPDŽ#—&9ÊôÌJƃ/?/XÖŒ‚be.çAC+^1Û°Ú2ÜìnR)8lG¬ô¥WËÉøjF„@ìÕ'vä˜eßÄ… haIPX~\‚0C)òÇÄSµñ¢„>TægÖ Fæ ×ÑÂq¼¤jùÂCg¢˜Ø3-@¦CBJ2A>Vš…ji…Qøç­p#®QiŠ3qK_EŒ¢ ^ Y8H&˜°BWuå¦Ãrò0ÉGj¦+aH0¬–hg-PE3(¯qUýø¡ Ž”Ò LàCëM€CQH¬'´Qv4 EÎŒ¢Ž,;v)ÏÔ/ †ª¥†h0#ÖæH%c1°ªC—wCôƒ‹>/,æ%V¾ †I÷!‘ 0g„f0ã›ØîÓR…¤`ÁAoIžÁŒ …]e-â¡‘Bˆí «: B®&¤õÁ‚AbÂTQ¡€Œî"a…Å9=¬&ÛŠ•Íiþ®õ]¡*†€ØcæíèÞ”hŒbã°ƒ(fØQxü]Ê ‚ ÌíV8Ï`ŒbCÁ±jjM(A–¯‚Æø’)æVWBr­; ¤ÂAŒ1þ€R/!j:d±ƒ<UBœª8‹£èBBEЙ˜C0@Óç=R}ÈîMOÑE§\h„B„õŒì0#“%Õ‹ÈÓ“A$ˆv2˜¡E)JW‘0P„Z6óÑ#äã €"8Ár°·žFĬçRSÑuL‡åqF+˜A†0%tâáJ׎Dᘆ"Œ„'¬±ØykFÀƒx QHÕÆçÁ7k¦Wi.OJÕZA³ô«R9!á°Œ0ÛÄC5&g3ðûä#7d§j(QOבQ¹#Ì®!Fš çœT „ØDRü $¢CC¦kt‰)'¯o)gŒŠ ˆ]¾œeRЧjA%ÒÌ7FÚPã~b ``Í’P«]aˆŽbò ¶‚çXT§óVam(´VE© à  ‚2hÒú!Y52S’ŽaJW*¼'¥ÕP¥ ]ܤ=wúð!„ )WõZH¤NJÞw1ЋØ)©Ì% CbŒ¬å…€¢² X`§´R+oÄÐŒŒ»h)*‰èÚ @Ý*Ò®Ÿl¯£èÇ„*”·œYË©Ð0c˜ ìˆÄ¢ ð‡`˜‰QWö!\CÍÒKVP‚ºÔÆBØj•µxûG8NÈ Iͪ (MHT"„j„… z,ÐSc‚j°ÙI¸þ„-QFaÌ6X8!ú£‚bã*‹.TŠMa}yÐ^b K1k°\'Í`" Ð @H" 6 †b>dµHÝîÑËË9¬)Ç+ž<9¸– Ô”üŒX®0D! §7E R"~- ¤ˆªªÂ‹ÿˆë?V©ÎB¸Bžø¸Ô»R"5J_Óo^ÎMK« "îr>Éeôx¬Â™ ¼Eb¦û‘Yž›¶sydÔ-lôÍÞ£-<®-³ˆ½sTcº~†¢6hßèægºDE/ñ)_âÕÏVgJÏn¶j²ÄTË+a¾¨U"zó ”\s©˜DZ>™ŒçÃ.ó´)rSŠþöm±D›,wfݘÇAöë[ ×[Ì#ÔK~/£Ðg”ì:/«³ÑûÞLÕâRBNÞ¯}7¥u¾‹ÏÕ_cñ 8E©—ˆS.’Þq1V¤!”=R‹ÿÛ*5md7—“ßpÍ}û¯6h…Y’S>O#ö é¦1Œl-4êW°’”ŒÊb"Ó ÀÕàÊ@¬à‚OàóÓÖr]´$óÛ¿^?;pÍ(íž‚¾´ÜÔy™úúìðȉf?“œ[‰Û{÷µÊeºœvÍ8–Eœü⟫ŠZ¼ÆzmpÊ`23Ô½T¬¡jn— [›X…*ŸÉÈ)v–’¬´ñ'~ ²¨ÉÑMsJútï$¨D•n¤CŠú”ÒñªÙ¿OyMe[¼º„£b© "4§öBÝmãSs¹åò©ŒBªç«*Ѩlá%x„1Ü·rƒ" ¶ämuw\q'Ú¼q¦_±5•ËR‰—ÒgÌ,‚Hó9Â8Ée,„Ôj+ÒLj».¶÷*õÄÇC©"H•:bÙóKØ·W¡³ŒöTÍl&¤¶‹år³v„@ŽR1騒caq¹ÞÆ”˜”©ëë¥oüiÄ"å2”':?=½Æ áÚ)š)*œéÈM=楛 ŽêÄ©ê^i—0ø„™evdäÖtÁD»çâñ|Ö_¹ìÇõÍÒê«":iÖ¢²Ì=è„ÊJö2ФZT:šãõu(¯øj&JFÔ.’LŒ¬š§&Оfq Š´¡³Ú»§ˆýWYšEge+Ý3µLgY²ï þµ±¬5D‘ôîbd•ù?4÷'õ"qñ5ìÓ–12ƒÕtÊG´¦•½v†•$[ŸÖ¬´vE²U0‹ìf±ù„ô5D‰"æŸI=M0¸ÜGC»ËÈ[—T"¿»É"Š*b=KÛùdÔ×'S)UºX¥¢þ99Tévu|%”|ìKz暦ÑÍd*Ø´íÌžŸ^Æ9AEfs$‹br+cÛ$þµV¦fâÉI›.ÁžÂka<•tº•N”ß ó?­S,^S¤Ç²)=q©aèßta¤;´ÈÔ)Þ´JP”-…9…[7¢#çiz«]-É#zâl“–¤ÜIU‚µ"¸­bcnññÖwæ5›è*Õ*ÖG³R´ ;YTÄ‘ÊÁ¹ð^ž«¼'ýCœFèV²žQ1›ØÄ£ÐÕ!!ª‚Ùf‘rz¹êøˆ¢6bQ©Õ«q¤¨Òd{–Œ›Ô[ÐÛGª¥ÍF0„YK}ïÇØÒ­:ÌÄwk¢aIr–ÉÌÓ8Ë+b·fnWym õ>+úáÍVôg°—kw¥–ȬõfA‹ë…¢ ¦»h¨q”gÏ$ÆÚ×I¯úDRb,DkµöÆÕ¦;e×jQº¬‚ˆ¤‘ÉÄ5VšsHË´=[´ò©¬µ¹.“:ql^¡hÜ›ïvå"»=¶¥eoCyH®‰Scßê–4¦«$§IÒB¼Eà¯C=œŒ»Ô'ÌAs-«N®1ìúÚìí´Ú!LŽŠ,æ‘hEŽ$éXç…H‰é\ 4¥Âö¥Û·¬¾SfZDR£!c/³¯tݳ¢"×SS”ÝŒsó_Éܨé¬Õ-=µX¯WËÜtQÈSX± GZ‹Íš¬^$Kf_-üZ‘œF‘îìW«G5Ñ&´U±%\ jz“Ä‘»tôòcD”yIܶ|öªáLþ³Êz޳94š¥+¦ç‘N™ÎÌv^Öâk¿Ÿ9s‹GÃ]Þ£šÍŠu‘‚¥dVJ4âÎL±®¦K5f5Kµå£Aª'Pš!n´¦i(¨b „³4îCb¤ñCcÓ.·^¦Ï8þÂIbÕ]èS”aLEË¢•„kPÖ)nª1ûžÏªø›Ù¾_¡ê.ùe6¨›Nª–ȪǪ@Ê›wó9y{.¾³>7·¶ ò‹R fÑOEœ[§EˆöP“­”½"Ñó혜›Ë…4‹ÞÞô³Îú§kr’ˆÛž­ûO,“aТ“ò¾ò §,„ä 4ƒ‡È÷ Â.œiàØqÂ:E#¾Y§Oh$™"Ó´¼©z¡ÅHä)J2JW£ï/‰‹ÜZkSJâ¿Ð¹é2äJ‰ešU繓O:I9"qŠ]à¢Ñl¤þ5è;†ÜV’8PPƒ*A D­Æ¬ImHx4jÂ5Q Q8•ˆ!a„&¦™ÇqP’}wO]¡Ý%]ÿ^¥b¾Úº~Ÿq$òˆéHQHc §‘ä¢XIƒ ”‘9_A> ÿ…ZI5a+<€…~+VYÌ…*UáŠÑuÈê9ð–‰ÔHbÕ¥Êè’”*©%´—¯ŸÄþjÙ)`qÓ(V?E R,Š Ô˜ Äý¬< yÌ KóK(àÀÇÞcÌŽ àÂDáêT³+h›Þ»´°º£À³Ã…$y9!i€ã"/Ðêh #AÃ"œ"X–t’H@+::s ¡ŒñvjO 44Ø„ŸÖÕ¸8(‚™$Y9×ïœMeç‘Vò<Ì¡†‘¥3™Ž\öˆþœÁgç¢2/ŠJû©¨4‰е‘e¤`0[A„…žYþYòÙ‘—‹ÊL(ƒ°Êeˆ:[èG”ÔHNæþ§ÓèåM+¥rîëc®ãV½!³¥?%LG cSúñ†[´‰ÂŒŠÍã"’¡6È¿8Áþ«¶éÔæ [*£åYÒ”½ù.i “cý0Q@”¢Žh-^; gòÉŠ}Þ ÛP¤IW¼Â<”™d„.ÈÐÄ?ÆŒg4hÓ˜R°l\"2±l¶fšWl µZC*1Í}CÝçlÒ|ÊW…)ZÖ·xﺉ1ÕÚQ§ÝV›þÞb’žñסI( l.É!îAÂH6GÍíåBµPóÝB^ÖX‚.N,Ä©íÖß²)[ 3%!u­j^^¯)F»žÒ§%ºÖï%ª¡s~’¯’MˆQkËJÕ´6”1.rÞ¯´Úœ*& äx‘wJ«ð‘f4BÉ|ì)ϲBm£¹N?(­oJj•„XâÈ×Ü¢Qª—Ä$¾z¿ò¾sYG´½¢×å%5$—; ÖKñt»ïâúŽ¥f8ÂÌ1ªu\´–§¶Ö8÷‚ k³‚ªª§õ”÷tÛûA!,òRcá%bvì„”i$€÷“ASl‘‰¡Ðfz¶Púr0Äjå§5(‚WòQ™eMOSì²ø—$»çÌö"›û,ã²Ý®Y–“-ȨpJüœ¸b¦Õºu³†í:£A¸Î{È$´c¨cP×0?’׃xŒ.ÇS·T«fæ©Ð嘳Ú)Š7FIøÓ3úÕðU«æ†¼Ü¾ƒÜ¼¾ì•<¸nÖ(EŒ ¥!•M‘<«†QƒP’DUEs¤S ‚éné©#K\»Søv‰†£!NÚRm¤¤ð±¼„sB–Vb" î8Ù2 ‚›Ã I¾âÓ§$»`cºêÉ%‹o…¾›G*ÒÕöj$Œ¡®äöÇ#Ü@Ä2Ò­YoÓJŸWð£ !o~F¯fA…±ó÷q0£›Ä¡È† øã õ\Ë[ó¥F ‘JE0Bmìü²ƒKaF}™¤ ¹­óe·zŒI)L“mbE»ÎÆyô’¯!؆0GŠ0Rž[Ðy¾SXŽSñJr]µO#ƒ…jÄÑ-!d¤çô…?‹a¬ I·ØˆŽSÙTËms#´)G%gk°Ó½\&÷½êCÔùacÀK Ò^Á–Þ ³ñ²‹’”éhF„L1„[à‡*š"acMò£pB¸¢"Rœqѽ47!:¹ ÿI›K ¯Qì‘2•‰Ö2”"7¨æyÉŒà SEóš¤d[ÉôžFA‰Øßã³dzB.à ðò­Ü¨VÇk>Ö[º®2Ñ•!'åJâ8(£Š*¡¯×hË#º’TñRZ—MÐq«aÏi2$Xm!mŠ8ž“ªÕâ&TÁÓFo¥1^Šü‚-‹Í).ÃÔÓPÔ‘ A&ð—¾Pìhþ2T…ŠJò?!ʘÃeSK¹m!]È Aw¤Ö”Ú[€Ãòî=-ä?ùßeXrõıûn‰ö}Ôõ1,Ó¾n†l@¬éæ]¹âl‚Hi$ÌhCoBÚ ‚8Ù–6’a)c`•)jÚ4W¤ ÆÄ˜ˆ¹H$<€CL¥#Ja†ŒKPÊW»«9m”Ýž©j‰S* NiuÐÝúyИ…19ã»`«9"9ÔÇDí ÛI¾Y‘ÈîâHl?IÖ•²ÈRûVI-–U ¬êæµ ƒvÉ‹+ÂíWØiùy´Á 8¤M–WÍAL2+eò¶ÛîµkÁC…s©™ßÆ­V%¼¢êîÂPã;n­Ÿ–â9Ga É·µlñHY…ç¶™¾îyËM­©¤ÓŒ³ùc˜Ö'ØZ¯!è +…T>?:¥I1ñHd\™å\KŠ O“øÖ¦ëõjxèRQ}? —Ľ~Ò6ºÌWÇTó<ªò¤ÍÌù¤òcLÒ†,¡e'µ¾ñ­YB©K"Ö¡1CE/r3bü¨CG(¢;4éÄÂËGýQØåœæI›á#Ýk„&[©µÚ¿)Þ¯œböÜØ{W)Ù&ÚÅ4„±NIˆÔ3˜@â„-0šÓñ¨‚U¡#³y4¶·JÞŸø/Ód95r5b³É!’Dx¯aÆåO<²KcÕ”£ V.a&Z áHÈKP.Þk srÄ w]*50üÃü’û5Šþ´ºÎãÐ_"Ñ2ìÒ­ŠãœK’3Ô•^BçþèäF}ظùGt4¢' sx–"ÜJ•¨Ã1NJøóœ¶*âbY“5®§O+ ‹/²Äå)6#ÝKúÅÒzâkEÐÜ—cRwûžEbÒ(2ÈV#ež9<ìN°[“Ô—1Hd)¹û°Ý„‘ ÖZØIÉ!@PPºñ…þøKMPU,‚ªdˆR$¬Kœ"‹tP½à•më©\L\Ï‘hAln'š¢äœ ƒX–]®šãQAƒVßÄ©i2D0cÜ%ËdÙ¨ô]U5­.Í“±WGd–ùn+µX«pˆMB‰j}w„"™œOår#œp¨’vM <–攌cµuâiOb` !Œ€@€ûB$E²³6„Æv¯©Îs*òw÷{ iI™—•ŠTÂJÎÿÖË–BÎŒ¨: 8ôK¡}ør‰1ÿ‹ôãNRdN%,^»^Õ3=%%̳¸„:»DœR°Æd”ôÛ’R¬øöìßOεžûö=å1Ø¿MÁ*µ ¡Û‘êMÚ´êQNçi7õÕR@¬t‰e¡²t¬©A–éÅ×Î.„òÒ.6‹ö¦F¨©¤moGhÿÒ¼¡Ô­õtº$çˆæÓX–$…Æ%ëKçuÈa2õ5éj؈DSª·z,ƒ$ ev2¬„0Œž—-\§Mý~Éom+ Ø­7Æç¥Ð„OêÑйs`¥âÅ##І&¶\±@‚¨‰-MK%J$vK–ödÁw}.z5M·Ï°²)ˆ-+1.M!ú϶-Ž%I2\bàó–C7ŽaDz£kòss­(z)éýô{‘X‚{Id±ªNÚáb‘aÝÂ)•)q9Ò!+$ ©G¬¨ç™LƲG ^*‡\œM²\–bÐþõ!*ÉèùgÙ„Ú,² Žºjd¶C¤¢ç%q R©I"+ „û?Ç Ðä+XZ^üZÖ=G3ó:»O« C6ÏV Ä¹Þ+y$å¥Ïrgdš”³>UõäÝ¥®Š1ˆGÒw,D)S !—Þr¼ËQÐwú÷H!G#Sš¹,™òТF4ˆ¼Úm¦í =þy Ë`¿Á¬¢NiÀˆOk!UIŠa˜W3#«Ä%Úš‹;Êš©C†ôMFÑ?ÅõÅ!˜´šýL_<³­™ˆ™k·—I¢”e-œK®inÛr-šÛ¸ÿï”ñ|Us’ýöï磌’ˆC –j †YDOvˆç ߎõ‹ÒÓ:‹ .›PŠ]“|EE“fÒknÔÆ§”¸aªlüÓ)N +Èjµ*/UE3Z Ø6š!B ³%™ªO‰NÎ0ãTœ"]='Ѷº•œÐR}Bê·¬#B9Ñ䥛Dc1—LBð©íÝú»2êöËZ§qOb$…9»¯„˜SWº9“ØÄ£9r¥kkS¥ì Aä’—ÿ^)¼\·Ñ7>\Ï”s+7¢Sˆ®„§T<¬¹vÊó•ÌQ´|6§#ÜŒ¼·‘ýä÷ä}TvCÓ¹U8m»]’»ˆf^G‘Nq’(_óË)ÊQ¥A9vSjI:H1ˆi2Jà^É‹7{²™ð%º\<Å-<8q Q]ëUÁƒ0ˆÎàË\%ÊŸ¥Éw®dØ’ZØýN±<í=­Õ-0Œu±œSѦ1]B”¬HÈV4ÊÙJ9³XÃvéí? î§)Á™Þ-Uu~š<ˆÉ®#ÌìÑkQ¿Ô«ÂK1(ÇŒFlG$â°‹!ź\仈\-ˆßå•1s/ygŘCág|& éÒá%—œ9£=Äô{šá ™Óóì´p夫¶ìÔ2–÷fßKÍì£i)±;Þu”A|ðùÊ­ÖýÊ„Ã]Ô#þ– —¸Á²³ C T/=ÛˆÝ2ç!æMÔQI#õkôk`)ô7¥p=…&¡˜áIëÑ4…ƒ1<´ÞtËH(qÎažHÕB¡„$¶k)Ü4H’^Ô$” ‹zׄ˜‘Œ#Ž®R‹Á‡$¸((€ûŽP[e²îð”ý)ìܺòÏ.”¯C å*˜A=„Æ!ë  Y'D—âI¸d*èwQ¦¿O¿QJ#N15Èu_¶Ûdg¥J×ò»Â~ôX¿8G&%-Ùj¥ŒaX4W39 ´Ó»âW–`Í6óŠ%yùÆ) Z井rˆm’’ð§*5ŠN)Y‡Žÿ)‰.Bë(p(‡ŠY‘³„z}îúrŠHø, ?ùWЯ ¸Ì 7‡3’P`aĵËqkÄ!FíNC fÂó„+ݨ¤ìÁiBd$¢·Î*ÂÓïD}ç˩ФÃKÙ cøB1'g…« R˜£Ž˜7;sÐcŠr"O·â^eäm9ãD„‰ ´¥†[$£‰Ê¤}:FTIœ1J’ॠSˆÿ&–ŸñmbZ’ìÒ9‘Å ÓD’åDާAb—y¤:Ïœ;!æe93è+¿ÈwONýmd…!L"·hä ›/·’%ØP­ºD´Jý©Ê1÷M0šl3œ¤`Å™­wWÅ!5¤äMV:è™·6,¹yzFâ¬äKá*PçÌ6¦’™FYÄ1œù|Tåˆ!à ñ/ýëdÖÍ”Ç~E L¿I^íîòUÍaëOÖ’¦(ÍçtÞDITpb"`‹p›dZàÎ!¸lÃÈÜ4&™ò×™ª}5T$G§µ‘«’l_:ѼUDò Cymñ V ØŸŠSZ”JœC!ˆo¼|/TâbíÅn >Jçå~g‘d BŽ[ W+J¢œ‚ƒ¼e V³ª-Ûî™^—BK7[/å âô[I~jo¼3Êœ’0ú8Ö!¹x‹JWÞ$ƒ­•IfÚÏÖ(§qׇϓþOÁêÖr”^¥|øK½¹ªb de©YLâç0â…CÊT•bLÆb˜k–}—Q6ᔺY”r`ÌŠ#üc°g•ß‹—¡EÃîË»ã Ê[WY4S‚ãÌa "qŸTº²MM¨®ƒRniüž”C—ê(‚'´È›þk/‰k¬),Ä-o JÚ@îyûðZŽk P£ùƒŠ€e‹ ± LÉ,]]*ò;‹Q¥}b ÷µF“õL^ÓUJË"”è#c8u…A$¯rÂWèG)2CÈlb3;'r&Ô7g«îËc¹Ë"šì—“¤’h€¯/¢´øt Š¥á®Qp8T…´â´*.+ŸsD¦güí“sBV~f«VäC<`Gp׊U5<¨ãQzds)Îä9˜ìóš‚ô„fÇ(nä Ø)äÏJ>!*j9˜™*t\yàù@!ÍøéãN î÷K1Õõn)Æ‘"&ć% þôß¡$Ê{ c¡VÍ–õ—&{Ïcå4!á#“}×S1~û.x0¥vœ­&z˜I•Ì— j$’C$Å%;¬zR„[ ŒÂT‡Û¥Å…sÖ“`Ö)–@VQ¼ RŠ !í'„-’Tþ©mWï;V†²ìHnÚÒO¢QÛIj-I3;¤‹ƒ áL+'! ¹±øÁ.ï#°Î1³Q(?YbPmorÍ…NV:½ý5'ÒóÆÕ±bÑãáFp8ïÑø1‰å9j×ɶZ]HÊç³ÛZÙ^¼¤SWWƒ ¦­Nä•h\vãP­¦CŠ—Nü¹ô$C3Sžo=J¸Qu}Ü–ìO)*#Z•¼Íh,±Ã… 6áW&­?q£±O¸È÷½!SbÒCf ¨šèªYˆùSú*Li’c ìDºDFíUÆÚ=¼äˆ±ÊZ£.6L{»Î[ªï,›6¹?ì™ýi4²¶‘Æ#°ÄA Èá5#ˆŽ]aª-R…óYèü‡ËÍ•¿0ޝN—$»xf«‘Åa[–dö ¼쿳Jw2Î⺗•ŠÉjùøöI%z;£‚(”z½*iÛá„©i“Òåu­dJ!¦`êp©Ú3ÊÒÕRžÕ«¼¤˜­#bÞ«IbK Aö’—ýWVr®R–¹µuÌR´©RY˜„ª¨BážWÕŸmýÔ½*Ht(…6Ò¢Ö4ýÄímÊWËa¥VÑ {Ýk1V«áœÃˆÐ±nV‚J´×Çò¹I‰›CÛ©œZÚ›­2·5߮ΛF]3Ü\r©Zä_W(}—Ò¨ªå«âïÜ‘1Þ0ÖGˆÎLÃÍS“i{p,µŸªODYÅâÑE”šP€„&«w…RøÖ !°€“Cqµ{|æÉ³f¡pWªiªTN9?Žë“i—L¯ÆQ„#žÆR]­/-hŸ#ÖÌ¢qEY Z*²yµOÓ}> %ájí LbR3-ÆÈê†cí~‡B$9èëò;J=m>ÐÃ%‡³÷·Ó{¨/jÍ‚)Hˆ˜Ý++)ž"”‹sz,G¬BÊ,ÙLxm.»¹dpäÕà¥)è ´ËöÞS×(B3nÒ«t-F'Ž2$„¡0˜ee‰‡-J¸ë(ùoZGù%Y(IˆKbûÐë)9’ÉÅOÏÒ=ˆêgl(¸¤«ˆ–A_Í2ij½y&#!eh¥³¨ˆ¥²‡Ò_¤´kxQúXRêN®ðïœ$aMàâh—q Ï(__8•[ÕKQnÔ”.´yÃëÕ¥‘)«HréÜ¥µøOÎ/ ¨!a™Õ•Ò%3û[û²*DXb5ÄáË™+ñ°üÑùox[Æ KÓ%I(ñ™£).âª;8zsJæEórò‘1Å$¬×Ð˺.t×L]9~Œz¨ÎBœ­ÍÓÎÒ¡|²71¢?‰:¹†â>’l‰ˆ¤,¥°…„’Þ@†%[×7éµÔ¥£YÞÏY‹éÏg*tt»8¦óئìŠÔïÊ+ˆF»§½Bý¶•Ú¶ó&äþBeÕÎî"´½Žò"Xö7Š¹Û²¡ÝlËÖÅÄ]X…Þ褪)Æ%\“½‚Ôöé>${øc¸ÜFÆÐÉR¡Óvq!-à¡FæŠü_1ô×F|Ÿ¶‘,ôZå?Ë™ÖÛÎeA¥7—ÄD1,¸TZ Ìªå ¨M?Ð[ ‚%ZŒ"d„¡˜Ç$….=¢¨Ïñ`•°s‹lzµrÂ$G¡š+\Ÿ‚ÆY^“½PYEõ<¤]t#žÂÙ~›ŽmÎæ¾=-ŽÂ¿,‹c¢“¿ØßýÐè0ÂK”›í÷FÅ2;üW颉óA…gL`Ì:™†æ b œT¨ ƒ(ÌaTU­°Q-PJЧP¦té}“2­B ÈÑ2ÈPàŠAˆFjÄJ‡BÁ †©Êª¨)Uó* ô¨wÅ(Sσ ˜WŽ9)™ÅBP€Â9/Á+NÙBŒnÎq£ÚüÐü~qy1Lž#˜TÇžC>FnF¬à‚Á "¢T8àe( Ð¥ UªJÏpˆœaÊ¥*È¢Ãñ~ç¬(œ„ z™b¦ „ Ãf8ƒ  !θQâ;gyE…qhð±C°ð¼Êr-{!ŒÁ0’n2 èCQƒéÀ"Ý¿ˆtZéƒ<:¬›îéç"¨î­óÊÊ6 DhÝ 0o6¸‚q€4@<;ž ¦ã)9áEÏTÎ¥ _+¥iDI“„85°Ghš†J$Á!ƒÀØ@… Š9²©Š@V Yéõ¿úáF0¾¾+ Æ"¨CÄ¢—;xÌ·S)Ñ‘_„(+@žÔ¹å‹3Xέá’6P!& ÚN%(œD"Ò«‡RÇÜ“”Ó­ýãÚtñ" ä ‘ f#0Ôddj"Ö+e`•€Õ Î5‚°°ëÿSºVbÇéÚü;L$£† Í‚XÕ"¹95Õ!ò•Ur! P®€úÎÑïýS3¡±'d Ÿ $&abŒóƒ½W\…†±©^Š @¼°½p>9iÊÄfR3À†¡†â†Æ`ÃQ(&”¦l‚É *oÉž°R¹aYéiÊ“38ÃÆ:7 p,Ø‚–´4)©õ%„†G戡˜Œ¦, ­ï÷Ö­Úk·¥2ÈbœÅ4‘˜Î`Çf2190dã~+Ò÷ {BíBü¡L)T½Äv܆Ìs3æ#@hc$ Ù øJ˜c  ÜGŸQ ˆˆ´x)UÎÁígyðøT0©à¿¹“(4¢$ŒŽÆ­­HbˆÐÅŒìbåDD3‚*2&—ÕiŒQ‰Óã„ ˆàDÃ+îí£@šˆ §UŽX®$Xt#öð[ð«C— •„31t"€ˆl „€1;`Jk`OŠ$r"Xí{°Sñ…ÙÀô!nî0²ªéÈÖˆŒÐ‡)‡ n ­…Lc@Å!<7QâdÜAd Ì»…E|!)v}éˆÌF-”’̆5äB>ôI®A)c…€XV¤"ŽÂô`tu±$µU{¡ ´X®Øb!¢*B |"àÀˆ7S¾ŒÄU(Ðø¿Áe8Y ŠÇ‰…RgX±ÂfÎ a çD­YcŒqÌe)AD¸2;0»žÂ!™zìèB¸Æ’E£W å D•v莔13{á¬STÀõˆáŸ£™Œçsª”Ç ÂÙÎã(€„N9qF2¡c%ìÄ÷“€„!0##=Hd£±ŽuË-îÍÞZë1?ž2zý뫖ΰ¦nZ)çÍæEkyû“ˆqլߎÏâo±É‹láHÄ“_|TT¡L{\O’‹!NR)=E4ݼ¢_*¦]ÉtØ•év*~&;™dÝå-Ĭœ†u]ÁØäe½IqV„;˜­Ø±S˜ùò„gjÉbc!™ .õ0Ù«’%+^ÝMöÂD|5YRÃþ˜‰Å]`̤%¬ùÄ”Ë"S~¥•’eLªziq:I]eBSýŒr¥Ö#"žÞÎ èîª(¤{ûe ïö+Ïd© ™?\[r™å~ür¢%·hŒYí‚n*iƒêÖ—èVåEá…ZŽvlÛ¡ÙÙj*b·û ¤ß¦1I1„ºe¥Ù5È´F¡ •} Ÿ6ÈÁ#=V`lµOMæQ€c‘lÔCÔƒÆ\sE½j: ˜F$†è‚Æ!ŒûðŽ!ò©ƒ7Ÿüâ¦ÑÏPÈ‚)ÈA1Î@Ž9HÀFCo ñG©ÂA ˜è¥aƒo€˜DaI€ ÑLÀ@D¼ëÄ_$"ZEèpª8™î—Ãt:4$VvÃâ‚‘NHhôQõŽEr‘÷:Œq„Yàt"J.0@ˆVDCãœDìÈ4· âÅ3mHû ’Ý`q:lÁpSº¥n`†U ¸Œb"°FaˆÌ”ÅÆ1†39$fçê[2•ðê:ð¥iI–6(§;±21ê!F?˜J”µ­‚ÒAˆÆËФuSä<2Û—+åFíWÁŠfŒ“õB³óŒ‚é¤GÞ¨û5eX,&@Wǃ:Žê  ÐR½L ‘qb¸…† Ù’1Öa„ƒÄ¨iHÄâÀ‚7*•Š¢´@ˆGÇÞ¼ã,è-9f(ÄÂT wX@Ï"”€†gô¨Àœ¤v˜è÷µ‘EaDF g$Ô#–Ù†}± Tøˆ„:Uä{€øì‰ÀË ˆ.¬áœA‚²¦éb‘ùŽMBœV½ E/) jBP\ã„1† ;9À!ÍêL|ÝÄ4ú”qʇã8ÕYgr–”0‚0x‹‚.5cbTpè¨@ã3˜Á!2w8Ê+íµÎm½ãAX ‚ˆÔTZ՛Ѹ#­Ýr8Š©×; 5}ލ8œ"½xC¦ MDhLf3á¦f`A‡#nl£ˆAÈ€dD‡LCCàŠx¨B2º‘àワ0­„ŠÑBöÇ'0Ø`7¼ „A RýuQHðûèC‹Ãѱ §8± R—¨a ˜Ä¹‘Hf G-fŒ—B 䲑b³šžïì'£=#ùŒnüR)á’’§ nÔ&|mÂ=™«Ê$‘†‰]„4w¬jhSæ„(:Ćð¯TsŒw$A-dÜj¤è M*¨µ™è!â 9Ä MùB'< 5Ì*FqŒùD#ô8”Ah¢|¸¤#S‹|¼ÿøÉˆÂ«vNV „" …³’Ͳ¤O+÷XÉú†h»†ñ¬©Gã Èåh•6´NEÄ)j"޲<Ï®b²¦}gÚCà‘9bY*(¸ˆ*ÈõŠ®Ã3„Ÿ4¨G;=0‡ª.¾D.Úfg§„÷ ºªYžC”Fï|˜4éa¦Då«“–¸t:y4úÝùeR¡N¢»Ê[',¦ª½ÍJü\„–E·ŽÒ¡~‡ÕÕVS»ˆP‹ãó³£9¤mE·—e|—šh‡«²ïL­JÔ÷Ò/˜S.×ÐØžQNFçl­'j'D]iÅÌΖWSf$dæú³{ÄnC ŠâX“è[ĽÔd4êÛÈ^*Œµ)”Äê›_d.²%Š÷T22mSHûT—%èlljº!ŒÕp«‚'7/oêîê¥qåö//Å‘§2¥¬E;|ŠTiJRyجSoÍI÷RUÎ}OÄѬ–k9³%s]È&ji.Ò˜‚7$‚ú7¡¬KÊùA®»ò[\µ%×LŠW«j cŠs‘U‹!/ÜLJëVО™Dñ Z"å,ËIÒ£ÌZª+Âø´66…@¥vÜ¿úÏë›^gŠØ«U¦£Ù)ôC̾é¹ÂÜO~d%DJ˜ZÐó5SnyRV´)$]˜I^Èû‹µb®[‘¹S*4¯D¡.ŽW×RõI!Z¥­Cr`¦”l½['hì"ECµmn aC”0˜¾ÊÕgs[Új•^Q©XhÐaž½¤Ú©ÇÂ{¯$^£Ý¦XE¡†£q¥Õ-W¬[1î»å¢f~äEß1æEW=²µ; GŒ”-¹V 6Z$x\ ư!…gÛÙeRŒýMÒæž‡ª\ÚÇ*k¸„»ž£ÓïʨØ' e•V„æöðV¸¢!–®ùÞ¾?½(,‰"ª;9{«Ý¶8sõ¸7}Û4è¬RN¬¬â]:R²#ážêRÊÔCTÊÆ*:ˆmò<àœ[iy®'PI]Šr" nï6-ÇDT3 Õóx»19ð¬s+!¨6®íK<ïØ‡©´v³¶™ŽR¦Ÿ—êJ-ˆº?[“æxÏ2Sò øçK 88#!;ÛO«Õ4ÅGLº s¶ hXy ÁT¼žbw®ž;­›Fgë Ò¸“41$\cDÆ]nòz‘14” ¶-U 1T‚TÝÄÄû : Qr–¹ÜrPì*ˆ½ç¤‹<ÐqξS·_l–L :®÷¸lãé$âmÊAUJUÃíOUæùwIJ„-”‡mcQÆwx… ‡z]­ë…ÿœþ¼:o&h¼7ubS¡Jü†U!“»ª…˜TÁ&,­{%gRU(+e3 v!× !× ‹ªÅçÜË…Þ½eCL‘2’b¼Šª:­0ª´´¹±¤j9¥8ì­rÑ[û2 I…?pü.™¤9˜%W]ø”%Ÿ{üö¤Ûš¤p«)¬KÔjiÎAÀ1.Ä&K®Ÿa eÅ×?¾ …úBË,’GÅABYº«¬Êâ«%t©)I!Š1—šq×­ÔM“n·iKëL\J F²ó$T”´“˜ÞD¸‚ÌYw—Ab#00ãŸøóà²Á#h(Cab‘¾Ïye¯ 8`P%0«7w¿%èËžEE/¬™q̞娚ºe¬Ïdö:aAHv*—+*”ߣ^W%žÌRJÖ°ÿ@`‘(³/©—/‹e[£6˜ƒ-Ó‹j%‰•A R)ójšpŽu©Y÷5Èî]ý¤¹ÄÝÔ§ÁVAå’·&'Ìš¬Å+\-nü,Øâ]JÃ6u˜6°~]ȬéâΫA­óRUX˜7ÔYfÞ‹K‰RòÈ5‹”磾ò'P"y“Ô¯ÑÀ@Ï XdÁ;ÞÆ2Šu‹í‚Zµ‰KËiª¶j²×º­G©…cDb› *&`CÙŠuäZ³syJþd‘:Q½x›÷ö¦WKdìI]\VZUÚ™OôÄp)ÀG‚Þñ U³ĈcjR'PÊ&B—ˆF!ª²QCÒw5F#1RˆGxùËXªŒRÐíþÞrˆ’ƒv1†h2erT¢qQ³4Á· dÜesÁ~BT"“`!Ùó¡eõ°“)Z“mœíÛµúkäá‹ÿ¦Æ¤¼Ðˆ—Zל¥Ê^¨`3›‰kÜh¨IÜG#¦ÃPÁ¾T<ä 6E§rˆ«É UÐ"‡Î"8í)”Mfs2yC B.’çƒ# "Êc´Ò8qÅKI곩Üvî2[TQHqj¬Z¬̙LÌC ô°#`™`¬o~‹Ùz:!ŒœÈ¬®<3ƒ â b5X*Ç®ª„˜ãøkYýÔb‘\ùDD2²©£;Œ* ƒ3#L! ±Çsp¸q·؃@`AÔ‹pâ¡Ä!Æ;`M´§<뉒Vb‰6!ñp8GTä‹á-ÎÖ«F¬‡·£Æ© P¥(¥ yJÀ@ž² HÙê(™´ ˆB$¢F~`-XÁš`;Ø•…: ®«1¸A{(e;wÆ@ΠG c"™¨F’–¸ÆqJ(S+ƒR Ld4¤… BôÀdT}%&z…'­ŒSYÓ! Œ;s Çf:cf\‰r^Õ&Œ!(žN8¬>êQ^Äe>7 ±…#±MàÃa#)H Šc–¸† ¦¦aAÛƒ\SÄ <ѵŒªMážšvÂŽOMMJ#3¨§~&!žA¸NnÕ°©ú 2‹M‡‚˜Ç:.Ã7s-J! /Sb%Q†R{ÚBV=3PD*ƈdT5U<E®;kñŒ£(q©°ÍÖ†)Ž‘01¾¦01ÄENÉÓ¬…â»Pa–ÅÈå(‚$B„o—È1 Äa3:Œ& V# 꺲é~u0ƒÎ™‚Žmø‹Q¤0Zê ÅÊDËe؈\ƒ Û%Îf·²²QY I Õ%9OYæ\Nr¢, b“JÏÐ0á D;P6ö' Î~!†2«†CÁǃ0î\¦)Êý5yRÎÑ»8„¹Žh&Ä%H”0¸™YUH™(ÐáœÅGM´‚”N 1ísv¡2t·,^ÈøˆOŠg™8BU~”1Ç'‰ B å?§ayßâØµƒ”ƒ† î'ÀˆâÑŒ ÅF Faœ"PlgÔJ¤\a(à«Û YÈùG AÁ4 ¥¹Ã § ¬UFˆ ±qAÑIF*ÎNjaívÈÂËãp*ÀÔA|\G`¬6A8È0CF$%0½õv ÌgLcçŠA  r’t×2ý¬uÎ@å’Ó ß®­ÍLàà @e³š[óˆç*扖f󭼡w ØœäùŒÀ“Äu`ÃÇPᕲðU1ØŠv'YTh¢1[œ(…h}¦Í!‚-,1˜Ü€¤ ¥(ƒ ÓõOÈÙe%5œEÊ8쇃V!>‚ä*‚–‘•xxÂ+Á@Æ„{IˆjÊ28›˜!L¢9°D⪂‰ˆ.ØŒ°R«ÔÓ‰FA““ñB˜†%1sbQ¹IœÅ¡àähÝNŠ¡á)È‘N$wáÛòqê„R•Z9Ê/a67Bã ¯Œð!7DÙŒôü5w@3áˆVƒÙÕB÷pÄ·ð¬Ì2\G1ú¨†q‘À˜òêÈAPQ⌆â,suX3­ ¡M·g 4:·*¨^0Xˆ™‘hÍð« ƒ «ìÝ0£}”S ݋܎"5.d˜AfÌ@[•ChLf>qLBb¥Fgb d ê„ •ÔEŽÐ“¤užWÆVU„  +ލÃDæ2†¿«Mš5ž©Kì_kaÎQ¸‡Àކ/Äd+CˆC[˜ ”- ™ÛÓ=+)‘‚"¥‹ÚŒ³œÇA`•Ä ¥7”….ea¢A‚!”N`CCü‰>H ÕQK®`Ãµæ ….xͳ(Æ3 BÔÁ5G‘‰†v–ˆ ù¥á&J5l`Œd¯zé?ìÖêˆ3°È¼Ä‘8¦Mfe "Oa™¶Ôqk`õ@!…A'kòËñò|Á$Jù²Sj vcîD£¡n/ºÎÒ¬ªˆ%Wlh®ì¼gNtÄ7•]LmÁ´Ôô£»¡œÊǦ¤ sHPÄBëYKoß=r¦»úUв*ʧiÚBÊc&ZUÙ¸™Aÿ3¸F{!«LѧÂ1 uÜç ½8cÏ$€ƒ“ñ‰…Ôà·%… ŒWÚ¤ÝX“BøÆApecRQÍÚöBØu9]}´Â“È’í•4„ÓÓê^uЄ2³JGò Ži±¼ŸSsI䬄©sW+F35Žg†b$Jè…‹-w¨'²²NæuWoy9w¥» gKµjºV£‰~¹Y²wmÜŽz¶"ñI!Y ´¨a kP;­²Äš4‹³ø è! !ªõ0^ I§§e;TŸùÈûè—_ˆ–*œRsâ©íø›ž¬3F´¯ÅÅû˜–+}r¿ÉDW«2ŽÔO£~Vïœr£ v¾æä[oTÙžô¡*NZ¯›=x’$Ë"1IaÞmí7ÈyiRÄ6ÙÜÂóµ/¡›ž—Gkë#œÏcŽrV³¿ÿÌ¢Ó»Ës cª;kVÐY&AYŠN‰#—ÛLöz…*r\©Rö™Eeßãu4‹EÝ!NdcPë#تwB$^{-1©!õ«êJ›Äù8DS0B¨†FûjÖ“Û"UØ®B¤u[§lØçñÖöú¡Èøö]1,âÑhG.³®mR­©´«á É! À«h?„R BP·ÕÑi¡ÁJˆT•-IóïLÀ—È\íç·)ÎIÞgÑVäá.Ïw[7fò«:ˆ³•ÅRá—qÙÙ³ûψóÏÅCªX¶Ey3yÏrÅr rƒ6íîL’–Í?áÈ•ÿ_6í)úùîQÛܨ"C:ë"½„±äyD–¢ÄܳºåÜ›BΉÈ!åŒ-ä!Û2ÄFò)Å0®õEqz–’[íUènEõ¢úëhˆb˜Vçs¨›•-Œ‰¨ô$”£5UeG±i8¤²3§–‡l§©ý*]TnÞóÉ&P¤o)È1Æ-8}/’°Öy•„t*Ÿ¾–ýb¶Š·oÒáÓ­šŽgéN+µ.9¹ô_‘½1˜‚NB&¬`0‡‰\ŒÖü9©[Ô³ñ‚"D8ÇâÒåâZÚ6ë•Íš¦Äã¤VaÏ)5…eÒÊ^!½:BÕ’©ÃˆqXš¸TÝe™N>ëI*vŸt¥s7ªá/LS–Å¢E8£…8e¾íÕ$½õ$«a6Õzl—§§¡lR­ˆsµZC!tŒÕ…âWÞƒ•} 2ÄûáJ§©„}¢;…{4B„•ð‚+RÏŸJ`*Æ1â *Ñi¤¬NŸÕvj›7ìUäI†e™²fDÂYÃ5W_ï£6‘4棫纴sUd™ig°çò§ä»eõ²òÒŠ"ÑÊsD|’RþC|Ø¢=*t‘õН‰jie\t²{Ô§ô=Ò—oSiÞbðÏQD”]º± žTD$ŽŽÒfðÁL4N0Š“Ô•I†:Â*àóµ {æÒT›„˺{á‘ÐRb§lG(â’NЇô¦lL1F"•Ø›ßZpܸIô›VQ‹t£‡{›¸‰é¶iK ©F5™ìDiæl~ßt›OtÇÔf)DlOV»ê““f½i2Šj( æj<Êâ[R“askúTù<ý1È–e»/¿ÝµY–VÍ]J‡,ãúåâ5Í"ÑiS7ªÔÂx¬a[DáSÉz–öµKÖPÃ"- xŠÜn·aw©¦­Ë#¡‰Gã˜È+Ø”ù¢´®J-.JqVEe_tÉ"<Γ,–z2ið’\óER$¨¤T+Ñ6Jcvb•NàBˆ¢¯Ù6põNVjP»Ö/7e…öÕ{£q1½®r9ÄV¬ÞGc,Lš¹,ÇnI&e‘¥tòs} D¦ÌbÛ/¥¯Ù Á TQµ¹«ã÷ɹ5GέˆÕ\8¯9 è™EY›% ò2Q,•S…¦Ü£o®_…ºñÓ×VˆÇeE±Yœ˜‰Ç“æ±H«‘ Ôz9†¡?ÂT²r±7†¥ 1Û“9UßIN !(d¡*k>Õr*o¿÷sŽîLO£ØªcP •C8bÖyŽsm6ƒ[ÄÆ¹ CHîg£ÕpúâkZψiÅ‘­â­dÚ­7.üûˆô&YPbY}kbÔ‹*]*FÜÏÞÆ^"UP"ò98.­,MV"ÊÃ)ßß¿õýÜF‹Jò¶„›cÅ Þ3Pœü@Îv¡‰…^ª·‰†‘˜®·ÒU%Mõ»S"oÿóJS»?M¸½U5ÉDii[új½Üº&ý)!BrŒÖ^ªÔEb¾AB8¥¡Q½Ç¿kDw‘/"\¦œ' ÖÚù" †^ÞÂÔÄ23MœIŸ|~OìËÅ3¯ì_F„VZ¥sé"]ÙsüÇl¼•ì+ŒÜ—·åžäÍMç!\Éý¬šâe~ÎR‘è¨ÅwôlsêbJ…^.P[—9b5­Lwq«÷=i¢£G®{õ e)s‡3œ‰…@ÌÖ’Zà¦9™©CѵKsâw7ÝKåÌ5ܧ"lIwh"Šò)ФS’B!húF2ÌšA*l2 ‰ÂדzžùÙbœc7—iŠMÆuÊ=³I"k9ªäË`¾Q—n ‚`‘ û9£n¾¬Uçgð(Tbþêqä8©‚0€„Úö@‚`’ ƒˆ°˜ #˜;Š)‘„f,+;?nSÁÊC)ìQȤSŽ¥‚¢C)šˆ„¶4a˜†Ì¢­® B°Å‰üaÄÁb‡¬6䣖W!`§VèHÓÈÊDCãbRÁ.È„†¥áH£TDB T87G<9ˆQ~ÜMxE¦Ì £ Q)­dœ¨)T£¹`–WœäQ)qÊááJ@’SpèaƒàPâ”C~Ópa¨cAA=§#xæLpåTÀ€•¹ ј±3R< ä¤  „9n?îk…[M ]…+¸Än¨&TÁ‚g.™(gF@ŠÈ=7~­5ò†¡|¿ÙD’~ªT½ª«ßRˆúÍ3x…mö…2Š.'dNEò †!¹*×Ça{PVg6Ù·€‚ ÆýSíûU4®V'.Ys“DM±<ªFÊW]<]˜Û¨*ÒÖ\Rj¿ÞÉV®?+јë4â ¥B–ïËbÔçb6Jè¼úOCu±pƒÒÄÿ§kW‰+TzTÚ0“%ª3L8áœä±Š(ßVe¤‚–©Æ‚_ìc2“^ÜàJ§LD2ur…4ÿµ!-fË ‚3Õ–÷uÔ8†-W^ãÅzºûJ:¨õrœ´Ê«¼VÎr]–Ï&H¼ýgT‹J]Ÿ*vÊ•º!JÏøÇ_éqlÒݶ1Ö‰øÒË~ºÈ¤FjT„·þ|ìFµ½Æ^”ÓŠ9éûã‘)WBº;íH1š!Su+ªô.ûz,ƒûϺ5Ógœ©ùãBʾ¼r?®qfuuf8ºê8¼WôÃÎzPW<º¢¾Ý[ºÉ}½ÈÿtŽ%-u£=éBUL)ÓQœCa¦W¢rat“h„û Æ\œ4™ÚIFM™7|©” „#°qQó†zRV1QÂ+µ(m“(˜ú8òÒJ(lÛϬÝL~%g”D¡êS?!F}"3¯rx¤Lâ;¥M“¤Ê﬋¾Ÿwt°¥B[XÍÙÌÏ\í7öº! ô¡¥ð‰_ecdA¯3S˜æsU¦öÆ52“‚!öy0oè}RÙ›¦Ë=E¤•(ª¦êÙLÎAØ¥0ÅmAžeÊ®½HDö )ª&ØÒù±Sÿø¤®W _½%Yµ=vO˜!œœÃ/”¤¢ØB£*SeL³HB­‰F®³òÕÓ(èE²~Z•ã6þúë ʤfÓVšRå0õvvR'=šÌ¥]+YÄ#%P¦2s5¼Û¢f›·7Q=©µþo«LÏw.b¸uÖ`­Œ©ÄD8d!‰6Ϟ˒µž£ëåÒ™"Îa(»˜nün³ú]H¥E}Äd-ÿ.TDX†‘húÉr¿3g~¢òNã-»Ÿhì¥JS ØkÍ:zËø¬›ÕÁ±H:¶|CœÏs¬ÉPµMË’b²½ŒÄ}ú‚V¹Äôä ÔŽ]R´Q-®¬rryXS‘äOGM\…VÝã|F+ß· ¨-Ó?ò¸º9 ÂPµÚçÄцf'ç±ÐíïºDòïvñÙNÄıA¹(öNôV:N¯Ñ꜋{§r¿k‘˜ç^·I¤ãq_Ù„9!Ö¼mÔÛ%“Nèçw2wì=pýŠ”%Û²¹jK qñ“HÒ“QÜS„w#+zqÑÁ"sÖO@c¿>¹4˜²Þ…§›Ùlª1ðù¿Ù¸ûrND1h›rÊÍÕ¦…) Î”åá‰1Š«lÌù\Îg9¤eÔ•¬Õ¡d9æPÅ´ç!ñ´ ¸£À¿…¨í¤„aSrÊs_È`Ã@e"qaÉ­µŠN9!ÚF¡Øü.ŒiƒF±«jjÈ ¨ê¿ÈDÏ”C“õ¥Z¤PHàÆ*gø*GÆÄ±o   A) ~TÐFÂ\ex!ÄÞ”\¢"†rÙT‚12qkžTØÏˆ?"Œ†²²òñb 2ˆá"s®~cÃjæ5aœ‘Ž(ÁMQ1Ž :“(ÕE)iÜF ŒLŒLb L¨ P54>±à˜ò+ÞŸUCîDC}3½rô!F Q Œ ƒ0Nœ ´Å0ÇQ)§ y+lX £˜WŠlCÃ ŽžÝ2Ö*"¥Œ"*0©Kb½Ç¸HŒìÿøÉˆÂ­dN†®u̸L§³‘Ýÿš'ÕòÈ·{ø†yèÙŸ„¥,J/U²V­gÊsëòUÈu\Ýçtöí$]]E9Vöú‘$h‚¡HOb‡I´¡ †¸Ù±*™B„æ ’*ˆnhö›%š]Ê;rR®Æ¦¬Qf-6ê¤ÌÒb$f1Y7¼1(úØöžÚIZ{¡Ò—qHM³ìu/&ð[ä¬ÕÙ%ÄzJ0sJ#ìÛ{çi»dù>®ÜÄ!t„!4‚#Q‹Â_rÞ¸Ä1˜CѾú$ŒwK Ô.U #Á ë*ÐPPu–·›Ê笒峷—ÚŽB‰ì,íĬLjm½®ê_z(çaÓ•™Y"ÒZï÷IADR–˜Ù´O U™[«B%ævJ$T2•”¹üv˜¶åÎsŠ£5s«º¹³s´¸é®§«[ßqn=²êÜšUF%[™N¬Ÿšn=t“ïmK>iBº\öj‡BêœèØWïë[Š‚¿Èä)›Y½ Iä’Ù'×ì©m©rŠf0ÈJS’F2² A1D**ŒšÊã=OŒkVºrÑÚ*/”„.’æ0ÎôžŠÿZ{túÆ©O ¢ ´¯[ÄÙ6iìu¦=D^1Em)EF)ö5>~]”«34–Ëh™“Ó [6çT2˜gÛX…¨ÁA ±gþ-Ñ Kh¹»ëÊmK6þÈ‚åx”þ‘Õ?Ët±1<º¢!]|ÅÜ·-0÷:±0åÎæ«ÜŠ(žÄò …s/x»ÖÝ"‰UÅEíñBÛ‹lä¦)ÈçœÉVÝ]Úrf<êÿa.ÿC{q:¤âj©7¢‘Ì ~ΦìY††Ù²R]ìQ T2•¸î ²Z‘!ýõEé8j1n¸f;»§kçÓ½~W»?׈S"¡‰Au ÌZù3é+޼#ˆŒ¨Éã3*)pßQ±ŸÄêkædá9» qÔÕ‰úõVD£–WKZ²]ð‘è.è¶ÍìR2i„!VóÉJWég‘MŶí6–æ57Tº ¤Â¢yI?#C¹I*Úl¯çúý^•NÄéÙ3uu²LK¦Dtºñ4îRw}'~S¢“|‚ÖîJ¨ÉÎi â¹ ÞZ}7+tä÷!pèÁ.QJEµp´a„(UrœÌùDn}G%‰–ÖØ‰tL÷“R¥D¨¶7Z¹¾†QŽÞJU«ªÚF+})Š•(Íâ°F£«±Ãe´ƒ”Bܳ¤–^—³ÕÐÏU¨»ê§úßæÖ—OcTº¨a ®„FE¨Î:¦µÞG ïRÕLDЩeBbÏ”Ú"slֵ̇åmrÒý±Œ”[ 0B ¬!bwj.)'ì®Ò‡mÂÑU_‚#iuäÕ×DΓ DÊϬîêFfß¹˜g!uK+Î`å^b¢y¦%-¹%Œ_EÝ>3Û>ùŽÙèÒ-ˆt‘øï̡ݜÈlÕ£Ÿu¿TÖ/[¸¸×"˜ƒ'•¥luAÏë'› ç*b±HoÒûë WaŽR£ ꧯ¶%Ä}Û&®+•ó©©U§y ›íwW³ÕœÌ/WW•J^N7ÝHd C¥„ ââj”C]÷ÿá·0ªïëR½U0š'VÛº-k¤Ý€Þ¹F&È«c Q¡QÐó"ÀÙGð¤Þ Ô N)’`€À›‰q]ž~*a8À€Á#€s€¬¿6Έr.Ôv<àÈôDaùèÍÒ ¢>»ŒW@Zb‚T6TXJb†£g0NÀ"ePˆ"®3°|”ü…:œ»ð)?µj0N „23˜QŸ8|Œ× oê9½QÂÐ9#fˆngQ¨‚D.L\D¹‚”ľ7Ãr$ ”É£ÁrÒ™Á¡dÅŠ©ãŠÎ~¡ò¦žÎ(Άދ“7á8D@š€E¤Þ`C˜|ÏéX=,‰Î!p…æ‰ÅŠŽU™b²±ÂNE0$‹„ª¤x4¦÷!G;èG"9” ÂTbОÚ®†cqÿ¡‡„"óvÇë¬d*$ ”EqóðÔBv–S˜ïVA _“Ø]A$ÅP˜½ …ª©”©FJh˜ŒG#ÊFdqMÀŽÅq˜BáY7We•Õ¯êUtDà"ì?[Bƒq³ D-R%\p©!qíáu@Ç0E40!±ÿˆÁuáUMë(ƒy9||FSq £)©dÐi™Ì€E3²Cb¦b<¥î"‘H[DÔ7oì L9 n) g„:‰Wh÷•!BÓŠQ%¶¡L‚’ˆZ+dT$äQ¸K!pœABQÄìJÈ'€›`€ôf*sG‹ÅŽ>F)™™C”‘?±ÊÊbsP¢%ÁMd¹Ff9¤_ëû°ßÚSé‰éš7w•vʯï5™Lß휺Syl¦Õjq¼vFÂ!‚ìË*=]‚!}î¯{ Ë®˜fìÌ¥Fz£/“r™ÄåÖê”­ìÏJM«î½Wä)p€D&”!OqÛF“ë%lèìµü =¶"²ÒL?'Ìý™‡í~U:¬ˆ«œ Uâ•H쫪\¯¥=ú§zÊ©Lp¤­ØýB‰1ND”ŽŸäØ[e$%-W4ºQAŒb^¯d«jüDV$…Q˜JRa1S—×±ñ|ÄüdŸOÕ#ŸýØ%˜“MÖµÔAÊ#àP  Ä´Y¾J“–×& –û0©,Ýìrj9¬‡PÓÉbV•AÖ)c„9¨‰† Þ¯l®?þ-l“’_W yŽÄCþ(aO4¡À„Gš‹4ygíú‘"Å×yå AD \—*&pŒ*PÅuK%>ú!;â2㊠O¼ S§/Ú'žI7j¥èxY`€8ÁàZsÕ(¦8ŠÌ( )!pP*¿·’’Éu«¼ˆ£7Ó§’ñ‚8$ ù“OUѰZˆøw0bÄ0 ‚ìE2™lCSûœßäúÍChSÐÒu¶´«ŽCC5Àà€ÔPåB¤¿|xšIE¢ÖKð€¤6ÄÁíQ 1¤ôªšÃ(òDœçK„"*sèêCÞöžo9œ.%o<}tˆÊëI«?¬cLá1`âžð€("Ö…È÷Éü5iüq)KÚ&„¦ÙV8­ßL² ?jîü—0QG"ˆÉ¨ÎLËý­¯j&y[(B•æZõ0C„!%JwïWøeüôÿ ÿãÀ'€/°%- ÿhx¹†'‡>ð;>Ä2ëÈ'2ÆF/6Ã!‘Ðæwè‹ ç¢çBÊÄ(î8u`Lh¢›±ƒpŒˆˆQ Ü@âc Äb‚|‰M¢, î#³j%¤p¶…X D~SÔ Á­G|)ˆE ´R9¢l$Å×f½y0ƒc9„«× L3*œ­b Á!r²öpW‡BNuAßB@€†‚G€ê cm„ú¡`ìçH=OC"•x>(ÀæTcCT`!±X²ÍA”OK eËENáÉIP@r P‰KïÉÓ8€…Ø0Ð Ôõº±¡‡ß ÕÔ•ËB¨D0Æ—^щÂãº!DÄ4±ÙBMÇ8°]è“ rã\NÃá“+-Bæ…#UBŠA-~×êÄ—]‘` Þ9¢¤1‚#¯ÈFŒ¡:UÆa†¶ƒC[Çv¥r B'I¨±ÜŠÃ,? \f2!gdäˆw1®Ã‚Ãüœ¤ƒ |jÁ‚å6lAJè1!Üœq R Oqåå¢ b0ò±Å!Ãy æ¡+¡Æé¨È‚€ª¥)½ÄbŠs‚¨ñTΑQÜGQƒÆD‰ $`aX]ÆÀˆ€åWC"¬±8»O þÁ†+þQ b4Gc™'R!³AÈ/6ç*Ƈã"B ‚B^2¬bÃ!ŠgÔÄ„´¥³çjNo¦†$vü¿# ÌÇ"þò1‰eAûU Y´pU(Žb¢ dDØÀ$̈b@Œa™D, @ÔÁ|”º"+(WueD+)—ZSjc1‚NX¤F¡¹dŒTc¢à¥¡ýŸ³A·ö % ÕÔÏZÀ‡2°™ ƒ›r©Äê¦)´ª>A&’Å3Ó €FE1giŠá±rùa C ,9N8\\ÔBd<(%"p ¤n Ì¡„8ÌÂ@ƒ(TQ^:§X\âÅ‚ˆ^‹ÖN¦`Œc:"BÀÌÂeØK§®7XP¤(ªSÓ3WÚ˜ÍÅ£—@JbÕFQQ‘@Æ%ÝÇTVÑÄ›èlk[C…£BB¸…·ßéPÕ'ú·ÒfWRcÚžªUq×IkRª? †zV½Ësc¾YÊll‘)ÜUDá ! R*¶Óªdÿgz¥u¦W4ìlÞ£5çû v&áD%Üç¡Îcjá–¡È)—[—ø™GÌÍü{z²kÿÕQÿ$•1´Cm³ÕÞ‹E*b™­[± ?WŒÊL}N ^ÁSèýÄ#rr~ †Gú»¦£5_á†ëpã Ò×Ȧ-yÔfæmS'¢ÿn& ¥!¤»Ýkèq³êwç)v½U¯[ý°O9—Äe™ñ’¤IÆ'YXŽˆHΈ–oÆÕÙ[‰ZaÒÜ”q%·¹6¸Z7DV ÒeRÉÙìRÍâ«Ý—ˆº‰–17%ÿ%;›½wÍEtÇb Ye1›HÊ2 (åò®)³$;c ZÔf^.0îJ ÁTÈÊã&äS")…q_’š >#È옜œÇÇ Æa ÿ7À‚Æ¡«î ÁU ¹áʵêÈëªÜ˜‚#‰œ%™ 1Ød²å8 hAvp@N§ |G+a‹Vƒ»¡†FÇT[E]A†€F È'\ ÒX&rkBXÝP‡#Hm‹!ÊÆeüÄÛÕAñå ‰ýØ4†\0Ž9qGù‚œT:2S‚`FDɘÈDñѪ`¡X3Æ;¡L^‹ó“¡ˆG‹ÄÁHÀà b Í­ÀÔLD$8õBX¥½ë¹!²Xæ]NvÉed S0ÌG¢m`~Ng“ ß¨,³ÔÌE³Œ$~ÌBbb©B+Bãß1ûêÉŠE†QD¢b­0ŠŒÐ2"š0ü2Å8@Rq޵Þ,ÊÛ);l¢=›Ôa ÂÊ N8‡‚ ?ÆEŒÏàˆj½0jZÝÝÐt½Ä&€¦¸ÌÊGðãQ®""V)p‡# +Á9WÚË; ª¤áp±Ü5߸fiTŠÔe0 A2JQ$qZ&AÈ@†Ž#ѧrˆJNä8c™Opçp°™þRQèá¹DðVÙ — ÃÆÌ+T@ÝO ! Ë:ʬ B¯W/¡_ !‰kÈÎ%/ä1ƒ„…(N7qüÒ)Ü!B9N8`Up`KÿøÉˆÂ®mNüÙþ±T¦r ]멳“”)V¶ý™zȆ{­N6?ÙnMKPzvàgO4¯ø»Êµ.°A]…½’}µL(Φ8ë\'ä°€WRS2^í¥i·uHQq’©Ò£4Rw ·›DUS–ä¢ac“ qz¼7oPSw Oì%϶}~\+äR˜¢ˆ ˆ#*k·\Ä÷’ª×Þ<“ÒµVÉ F-M[NÎsP`x4£#H8N¥¢R GêKX~ØÁŸžB|i<“S$c Æ¥çYàÉ3œfE/eQ6˜_«j>¿DàúôR1êÒrT¬BˆPÌV3»äQ*ÖSJ5É^ [¡°=zL] Ѩc¬/½ª§3áX˜„(®;Yjy!,ÏŸRHz5~õe)\¦#1æûè© ÊŠ8ï— ²qtI9¹of¥D³|¼m³D?2í+"ßTS»hQþ’Ð,»A ¡+<$@B „9yV[a¼>‰za•o¥J«¥ Qk @§EN"É‚•‰uvê‘–4œŽyªæËÕÄ’É¥ÆVÆ•!Œ¶0w´"H‚íßÂей,Ya©sŽ^ݤÖÍ>Tèý t@ 4ñG ”­5›ê{ü>ÆŽZQÊí)&Ç4¤¡ÍpQ™åº3°ˆDªîÒ6!éjçQ™¤A"Þ·H"CÔýºÜ*Žë ‚ e sʽd&¯ÒTæ·´”–H¹jr A<Þ| Í6§ÔMÆ‘'˜É’-„å|d¹ª²y}§â”JI…úm³„ÚG 0PáJîi²ý%VWïñ³ËÖ²²0¤¨5I#nÊ ò¥ÍåÍ’âjøæ3 9Q1e˜IPg1(P„a|½-û¨7s‘ªNžke S œ\¸QGÀ ÃBþ‡Ÿƒ;žª„¢¢æQ¹ %“&éÅêÑ„®ÕfVÕ%ÚHDœuœ¢ÖÄw¤¢ïð!‚›,»®† ¬£{qð˜u¡Å¤0€XK0@ö¨+‚Mƒ’'04З ŸóZb/Ë9· Æ)VP‡ˆ!‰%GáA0ºNé BíDàkCöÈA··£›N{wAÐ8`Œ4ÎSKas=ˆöɸóÞ±À„ ŠJt!>˜ìXQ‰#ÌÛ-‰…]*TU:–…%Ï.!b+PôjÓë¥yÐužL5ä \/¸æ0pÄrÊÞ%E¥dþâ1"È<Ôå7›íD×øÍ*äèU臲äGÒý Aˆq½ê±¹vdð†€ª)á(·ý"¡¬j.MRƒ¦éés•F“‡ÐI"’8ø4‚]¤JiIé¥.yE¡±-k‡¡j¾å˜û•÷ëŒá\#–7>È@œ°cÃÀ·¤~’ÂX§Ái‡ÛÅ)•ÆÖ†@ ÃÀÐ%5ä8“jµd5T»XYE„iÛ ”Ïbm½‚ÅD “:‰ ô4aRNËYËUr•³IY ±:”‰x¶áX¾Q{…Ë,³/0æ@ h ¢¨I• Tï¿‚ÀÒT<\°òö«¶ŠtÊZ‘æò¥–‚3ó o4”ÎÊ^/E±¿˜ìÉ%ÎV—E ÁB ¥§·¥•$¿„¥fɉëâðÙÙdÔ:Põk­†y˜·«z&-×o»%3!2Rç™ÔZ龞)â“ônî‰Ä˜Fjè¤-¬…« æ)*V•–ôGºsÖñJ¿¾+!$ñ+zQ9Üú¬6b«|R…yÅóíÊZ2dXÂYE ñþkÉAÌwмQºúo/ &ä"zÎ#“e&޹JQ8Ù?¶Ë p•  ª5kLì;³»1lÈ!'|[=Rï"e—˜wcð–"©GY‚Òò^$˜e8µY6ëÐÔRýƒjÈ€€hH2kÅÇê©ïT_¬óÏ 8­IùCíÄqì• !ø-Y-c°ƒDy"ÏBZÔÀU”/BI¦ú(éQ²}(O!4c…JC£2W±zZv'7“3Ä}%VbWè2ÙfM´;N”"s-ô” )⇻úÆcF F(L¯ß;·F¶S®‡Ó˜Í@…Cî⇋øR6³¹ÿµ.´r£¾Û«O‘Ze0“¹B͆qƒ iÊ §¢HañÉsÂsÐjBfÈŽr±wCR™)sW8t+ÔaÊ8PÑé’$¨1#Ýoô½Þžz¢Vf2 uZìR5tJêv2¡è½9£¶ Ó±Mô}9Ê">}éô‹7ØÈ0äo3àz‰žÐ‹0:ã€` `à °§*_}ü½ &Æ´'Ÿp$E*`bÙ dóI™a¥Pɽ*:ñ*_¯öCwž%Ùpé)^ÏónfÅéW£˜(FˆF4²#©v¯Ykÿú+úöÂÿæ8ÈãòΜW#–c¼èwïZÙi—ÒÔ\.-YSÄœ`DÀÛÇódF©{±Êäž¹ooyŒ´EIÊ!‡ ¶øH„µtõ&‰•8ÉãûË ± ¡f`»÷f‘‰í!ZP¡¼ï+æL’uoý6M"ê‘HC™_ Дç^š ÕdŒÕFŒ « ¡Ì[h¤êj¸J º£Ôz¿Õk\žÌî$Ž›c±W[¤ÔcÐf¹U9t±X¤ A LÂÄà-¡¤¢Ú VHÒ-6lf‘nAŠê–@p(“à17ºž¨YpZS¢QAD PþÚuˆÅ)rYM`›M)4s’ÃGLd©j0ÐB¦‹‰‡Ë"êL»RíÛv¥A‰Ô(8ª’c¡-Uyíªþ*£h‘þ/žÐWceìçTy›gc©Dt<– `žôb{Õ÷\³–§R‘‡]›Z<+?¯Ó‰bÒ?a™EAÛÊ$PEÛIçej:¡tÕó´±òe9&¨.V)ATÕÿÚw’’y$S% Q5â>'qN(…ÓÂO²ìT M”ÆvŒÕ‰kaE-!r®;çå`2¼²©Ò‘òÓŸ­6P˜þþÊ[+•™ ‰¬B–×¿ÜøQ’…¸K<«9Œ*™"n­&úÃÖ Ê^@Mw£ç/]K³Œ*ˆ3”:—˜œãˆMe/?¯Q­³á¿,‹«÷1ùH#Y-aù&u‘Ó²=‰é3ÐÍ`”ϧ’…»ýœK5‘4­¹ÉÈS)N@Sð–|jˆÚ3¿î§Ì­ˆ y Âï.ë°¬Vfa._vÖ*õô™Ö(‡)Iÿbã RirWÁ *|¨{Cïó‚©’(E AضÁšïéÍ,<Ô™ë²e±OÁ°¹Ç} ŠO˜Ù-'d”Èáó}Ñ*ã0ŒL´ôîöˆ!üµ )°ùy»Ž!uSÔÄ*)^ƒ˜-‹'P—6%‹zó`J• N4€À   ° H²f´ ¤Ñžxzn<?á†r]-TD.ŒA1¤ì¤“Èg.e8êÆuIÄÅA&j¨Q ø9XæÎÖcu%eLÒ{ò¦^i>éɽ˜ÄÑq !5Ú¨!ôå0¦‹!ÄO­È¶*Ôëö&T"í¶+Õ „,·ÊûXÕz£­riP»l­E}0–²`FVÝŠ´ÉòC" ã’­ºumµˆOj \U„‘4×Ñx½ó"Ãùƒñ»Hˆ‰ Fɸ¥òhÁ õÀ1Ëæ1E«È#šâi‚s6"mBS2Uzü0Ö¯ïáHÛ¦3‘dô@ÆßQHT,‡°SyµŠd?nq-&E+9=MŠ]ìÖç&À®b®)ˆ^½„!Ò„ºQìtÊ^J¡i¾Ã*ª=„µuÕ+¶r5“Å)*.ElîVò×Lw,˜cŠÃ}k3Û)®J9Ìéí ¬ÌY* S¹Ò¤%o¤+ĸ¯õôµÅÒãÚ¿)™¤®¥M~Ò*q}ЧäU¨Š®ªáK¬R¹^¨dýÏO]Å£øª!‚îíR}ÝÖO®©ÕÌNé#«kRÇJuveECÓ¬³ðÃ3—e:¬”¡Ô²œE& sH|«[E&¼ÿ`ê4[Ç1E¸…ÓéÓ8H®øù9o& ).Å ÚT™j¥ÊM+1›nÚ²ÉKqvrùŸ &{hßbIˆ)‚ëeG‘Y3Xvñ\p‰œ0¨á²–"/ìå)û‰r¯’©µ·§_ e0ÿü¢“†MbÈÕ;{m$ãµË¶FU'*k'/¾ÿ°ƒ)Σ’Å_Á±µ7û"!7÷O<§¸˜Kæ]Uù(9È.šŽîŽ A•‰J‹1gb UÓ)²¹òa5V©R!븨}-õ{?Œg1ÕGy‹^ÒظD2Š´«B?ºªB¡ê‡Ô*0Ú²QÏC «“jJs6Õ¼´ÃˆŒ²î陈¬E*ÑiwUv›ÈEeDu~T«tšÉ•í•è_ îõùL§Ñ=—_–Dã„çšüB= Á ˜ûd°FEעœ‰£`kk-ZØßeGÿ.Û²‡ò,e¢fNœâT‚.LÆ%ØR‰ba$Æ’lÖ+|Š(¥¢bìMGªšØ/i¦³®u#®×Þ‡Á²Îê¸ÎcQ§c½‘ËÓt®ÞT± IJ¦É<Íõ„à ¦Î•Õ|¥%ò·oø eŸà„2æ‡VsùèRö`QfLÂzËZÕ±âõGbiL_©$!íZQ_¡Øå£rgŽóµäZ2Ëü3¦På„(‰¦¤Â ᨦ],‚<ø|(›Î„·Wñ>¥™LnVéV¥‹¶ä"P¢Ô˘΢¡´]v!™œÝDS=R«ü¹ƒávÄÜbuFqÌ`¦â’±WDK¶:±¹­Äÿ­°ÛÄB¯wŸ™\‰9&*zžÄ™ßÏrÕ½Yl†R“ù„Q™ mq(L£ÈqNæoás=ÆKªî›øÒ>³²‹·ÇüMd\á9É3P­3D2Žb)Hó6•æ¡0J“§/~…åkpæÿ-¶Òåq ÎBhÄçÉ–3ˆ)î½Ä'!ªë"#S¤ó&Ü¶Ê Bf=Ч'?Ç`¨3;‰BâÒ®²T´Ìg• ¼Ú½¥VÆQl¸½G¡¡pNî¢CÈW–ƒÓžÊk=ý¤\Zð²oÿÙÄ?+¶LŒ‚„+ˆbÙݪ¤{:PÌÔdnƵT\cuº[P~_çB];’¦ºÈ2H‰d¹Hï´GEm£Ü¢t{ËJæ4†{3''¬‚Â*N÷¤ÍF*òûÕZâbžÚ¸‚§õ.*S9jÓ?¸T íìŸ#ÛÍR»1{éš”ÅB· —êõL)»…r°êAŠQù¿”™ÄvɲúŸºsÓ~OÓèýzó«)é…êãÉ þá1„gæ?IA©<ç ŒÎ©PRcä1HŽlútÓ.DpBŒZT?$¨ÿŠ2Ã7/±°‘æ(aAÄ0š±ï’i‹<Ì៼«…ÛaÚÝb0B Ì3s:\a+ÙÂ#™Ÿ£® dÔ~^8¸ZÿLØØd‚ÌÉIæUX‚C˜)Z˜ÒŠ(“ã M<ì @ †#R…èF­E ¨1јzŸû™ˆº›¸E E«d  |*/Oî(ÉÞ-e› qGWÀÎaYQ@`Ô7  ˆÀ•Ìs à ‰w𫨌ˆðªâÖSªò$%9z0!f4f½‹Âc!q”(3áõÅxVx ð˜‚ÿøÉˆÂ¯jNý"ýýcýàþfþÓÿÿ³’Ͷ£QôðÞyÀ†|<ÔTbl>”ÙÊ‘s%G£¸éZ5l|`Ñx},ycÈKše*É'ø„y0 f@:³ÊE´ºû̕ؿÒÞ[S¤îͱo#CHébŠ§Í‘üqÓÌ]qLÅ‘ž¥¯IÙÅ/5«ûž31 ˜¿„Eì9¬Â9‰€ 2®Ä`——JÊ—¦éê\£1bZtñ>aÑÈçþeŒžOâȯ䭅ÛÞF%Z¦fR[ÝÈ‚¼¦íÙó%¸&ÁŒØÄ‘qr‚JE ˜ZøÖ%pOµð÷ÊΣa3Dê) lmc…ÌònKNÛ3\@å&Ð¥Hª…ù7·QQÏJ×8çwyÙKÌJíoÆ¡‚aLÁ•QÊFÌrs ²^ÂëREm½k³p±Â7šžM¬3ëËéƒuœw¾5ÊÀ†‡z×îw!¬óüJsð\ÜNñ¢ Vg*ËBNÜÆ ˜hìñËo>Rµ’‡ß[ÍZØ©½z?Ýdzˆ)Oé¶%‚¨ŽdÁŠ#jÆ>£û[Õú‘"dL]2JÆöåôýt/4Wð  ÁfŠ'%I-q,jžÓmUu Ï~}ìäYÌ!ç(ÆKSŠ©’MòýbJ".•Hý{_%—X¸â!ÐGL›3ýl†¦úzØ0ÁAE¥HR:ܯ¶Ÿ¦›VÛUòZ™,œÔµª=†Ò&+pYxÈ3ˆAÜs˜b³g÷½“…g‰¹ÉÇsëÞkvEü— ¥Há\9Ù|£é)ȤÔsá˶´QYEú±J‘„©/ÇÏm‘ -m(E @§b“›Ê2¢­âÑ ùøãÙ­Æ#¡ BzD€QÁëÇ:ñIŽ5*ÉTÿm[VI#FùxÕº=…XS±žæº¢Bˆ8vÌS±Æcôñ옆öÞ †4Ϥ• A¬xº@Þg/‚P+ ‚€AÍUƒeiÖÚ‹^Ïy$S„ÃÑZ¸A™Jˆ@!ªe5xƒ5•‚î~ATñK¤¥íóÔÏW¦ÛXJCˆ¿Mb{êOvó‡•B000GN"sòhJ÷f ·5ÄÕÓIïÙÕÓ\üRÌ´¶Ë÷ê”)&ÎÖ”`æ9ŒdÅ—?NN«!¶{­ 1B¹,bà“S­Û׿ÌЪF$qH¨¥GQ<Ô%j]0˜= ý{XS¸S•)k%}»/¼OZb:N%ИDÙI-f§e*ú˜LÀRY{IĺÙB PQÄÅ„ùˆ5_§üúâží÷¥§‰'³…¬kkéWu³§¥Pœë¾B˜C³ ¦í7йòwjcûæáïŒ?<…­êÌpÀ02 óÅk-Ú%pý\©eâ5 ×qíÅöOªÎ¦£`…n‘³„EœÅÒ}Ëg#+Q~²Z‘»Y’õñ¼r#3÷zSwéÜF°¶8Á˜¢x8ÅO£ŸM¶fS)Ô<Ÿú'îˆ}ÆÆ•®”Ä4O²õ ä.K˜9ŠChþ!&7ÈÕ,›ÓI!rN/Þo¹m’Ó%âVHâ¦a ÎfWahèWU¶Ó(¦½jœ ûÒ’×_Ðò š.’‹ŒD…(A˜f&nq\…F/ %i"âgß亇}‹EøŠAGpÂq‘)ê´w&ÿg«VÞŸ&Âå1k=9Ù¦ìH‹êSˆ@á %Z È)#³äõj‰Tb7Ò‘ ÄýfΈkP$¢r/ÚA4’ ¥Y zËĤ¨û[=v÷z_ZŠ?“EOâ¬RŽÂÎòÚ™˜gKç“D¦éº#ïŸ1ü§`¢"7êm_+C\õS`@À «O Ç-~úN—ê&vÖ×¶Öçô—%ìî¼|¯H“—Úæ$ä E(äÈ샫–˜…½ô´l$Ê!Ýæ-’òZÏ€”§áÇJŠ¡¢ õ'ŠüJ¤ªîþM#þk ½˜¾mìÓ-#l´wÛ_Rô=æhî2U8H‰ÁÍù%§×Yü›J N$ÅöûµL)Øë(¦*ùÐs0§‘ñA(‚.µçÇôžÐ,þxJÜØ_Q A Ês¨8ajÔ ±1ÙßY1†«G ³I#¶¬¦³¦Û8’‹­>[[Å@ÅCÜ(Ê®A>kd[¡¼Ùj{–ŸëG½>cs‰NJ¾ä3 I˜/L+˜R.¾¶”4.ƤÍãž‚œT•µY÷vªJ 1SAƒJ&Ì*Î8Ü&ã÷o³ž‡½Bío‚øl-ùlœ¤ciI½aZÔ/±°b®Pï#J;DQ[92’P² ëfiÊ+Zï²}f5ï'9¸U”B±"ïµÆ0å:9¹ÚæýGÉôüCÙ¸ÍÛݶvjW _©("¸âLWL¹°T¸!ª½~éj}]òSeÇi ½×ãpîq0î1ƒ˜Ê(‚¤­3ïU8–uók—g¡ãGlu ©ûؤjË!ˆa…1(a±+²u‡ÁŠ·‹'¥Ðɼ<¢d§òÖJËåœAއ\Ð@u#]O,»mS•8™âq³¯yV‚Wó*H©FÄG¤ër-b¤A3JÄQ0Ô-¤y© ™Æ¦ï)ìÕ3ª´&螿繲˜0r` C!›ž¯Þí•E“í²M~µ7»ÔïÈ’ g¥ C‰Q²af$D\R» rÊ)ÍšL'¥´M(“¢£.P_átl)¥VJ¨SL™„§¦à«C%Ô¼å9µ¿¯£ÓËâó'»î{)cÑçDß;µ•NI›‘4bÜÂÔ$y_RZ3ÒKy²u5½*)„(¢œÆ `­!gÉ}ÓÑ-Ŧ ÀHI¸* +Lm¬S½Ž¶s°qJ+Ô¡Œ¦‚9y^¥\ /·ŽO&»å(|‘64N©®(áÆq(9L[)>UHT+DÕúп7ß{Q*®C­ê]&±T‚êqÈ9ÞÌ#0VdþL¯.KòR¡²Ÿ—ת£²J”T£Q‹bQl¬)ÀʯpÁŽN¨…¥P•D&.ååÃR,‘º¯ÄÜãU\©èÄDEGâDC¡Ê‘Üâ%Ê­shL¥I¤ÒaŒx¨‡7°ÚjgbÇ+— d•Z1qòLÑšc03f“„õmø5»Q‡×A±<²–¿4¥_~±4Ü)¯uµ–GSþý¢öçšç«M»¾£l·ÏB ÁG0‚(RC’ÉGÔÍÂ󾵎¦«õ¾-¦‡¤¤$Xi¨ôêå˜Ç²ìŒ‘œæ!Ä!HpŒdNw÷eæžÔÁW·Ž‹E’«”‡’ª¥!…ÎñŒC Ê"ÎZ›ÜÔ«×BÜnÌ¡WR!6s{|éïïCsÌ*iIß°¯ß_óÓûñþÏÿ¯ÿêø–„›s·½óð’ü0ÎU™dvca÷¼„:]Ø¥VgTÌ K6hl¥´Ô"4ÆÜÑ;Tl¯´T2`GaÌY±åÄ"ŒpŠ)-A6½_zJn§Xøƒ&úvt’(ç^5 vSÌR1+qDsUŒÔOboË»ÌÒĦRš‰¨ŒÄ"„Ió·É†TÞ;Ep…î7þH‹hýy™;^ÌÖqVO"2üa•ª¼Æî š Æq=îíAF¦uÚ—Â)Kfà¾ä‹”1Q2!)P—ܶäâE¢Äa… 奤.öÑ-U"‰¹Iy[êBˆ›¼—"gþ`B¢ÆdC:‚ 2N2.Ö¶úåž’ÛMÕáÇò·aÒØˆeíØF_rŒ"XÝä} žõËçc£WIªæ3ø¨Š@¯ëžËbéƒmZ?VFëP¤Bç –Î“9sjJ2'`?ä1Ù õXÆ4Y4De”âºÆ8ø^Œï•õCصlý哸‚?Zäc)Õ»R#Jq ŒUt)ß—jFé{°ÂèHœE&æïíÍ•º•5cï‡S­ÎdJÊããÂ็ ß% =jì{#C`AF'V)ž›,–AH<‚<’UŒL®*G}-hJÕ‹’ЈQ~‡+Š1L]¡‹µŒŠ—”ÊQY>IøÌT[<¿æ¶vv úÕ¹\—KTÇ1ʪ“3*¡‚ËEè37þŸÄ,ý¦5°A¦KÞæi(Äi(:ö+¦)LÙÊ‹Ž¶&Q§zu˳ĩsôQÒØÁhâ—#©Œ¼(R–´nº¯„NîîÔ§QS†ý5‡«—êæ*Ñ3ú$Äw¡Ù’Gn®Dt8Ø{;ÑUé×áfµ8½j±ªê溘Jé\)L Éc²ºÙTg,¯R­»höÄ Ôô>OËna?Q«aH^N¬S”“[“¾„Idû+Y7uQÅS“Ûì É˜ÚŸU•ú`Q¤*­ÈÁyhå’_Y ×]¡«_ëÚæRR§R)\Ô|œÜLŽÞúÕ¶W®ê\”ÖGµf+ºšr ²bVDqžPtb¥ZtЄ)q^¡ÌŸ¬–žª¬Ú&IZñ®¢ZSZ‹Â‰^ ’ahÁ¦0ƒªŠ)ÚÙN¡ w^qÊ•Îצ§˜t12ƒ"kõ¢LBŠÊoÇÊ!‰-HÎ7ùjM쥨¦•D}O“¶ª!ÞÊS‡l C%Œ§y†6SæÊTjZô‘hÒ'tÑfÔ.—.È(…6í2×ÛPS#ªN¦Ó9 fmºLwÕ—jRÐÖ%úþE.Î/o¢_ÏÖ ŽFÙJ¤Eº1 BËNÂÒ²™ò•ÌíÅqÅ}Dê'¦Û/ŠB$V©¶îÏšßZTDs 6 Ÿ¾èת'Ü‚•NõÖ#±„Ò”SªyŽj'f寒n¸ÉEKkçm›®æŸŒm1®c¤ªw¡ŒÅn*)ËäÓšd§õ’ÿó;y¬çb‰ó=©mërAV‡if“„;¯'(a}ù0×í]"µ6äL-QÕ—? Üã«8ìfwŸ’”_ïùHd¶2–_ÿl•òòäŽvVC7çÙ“±d„|Á•¨¼Kâ?’ߢÎZ"öO”ç[XpޏôRJ£¤†B·êR)”æA7‰ÖNÞÚ£Oòi¸÷Z¢±´ÕYzßÕWtâ.î!H»dâ9·B¢U¼ˆíÊò»t£—Ï.ª©‹B‹" ·DÛ®/ZÛ®Œ­çLò;^¹—Ï®ŒSö•z¾|‰ƒ<Ç!QPl*µiMqÚÄí_^øš¤1?3"$îg·g­9e9Š—= Œ{8¢±‘²w ¶¥{Šm~™äu±sUVCÔ´à˜å~aRºZDÒbS0®¨üõm­§íLbLAÜçį“4¹\30ÈBß3©Ýò⨬u7dׯmV‚°ƒ•ÄK}EÞ/\–Zº—®ökr ÅÝbÊ–£õÿ?OÎÔYÈšD+­?UDˆ¦aJ9̤IC5Ј„õÖÊÙùs³})MÝ’br}lÙ‚S­O%Q\ˆBHØô³qÈÌäó·XÝþÚ!î›!Qˆ¿¥¨¿¨¼Î”U*¸¤öeÓºòD&:ªˆÆk°ÔBê´d”ˆL%|ú…¡â‘5InÁ5ˆøçr:俆¡éjÝèg-Nb¹ßȘés 8¤®„OÙ+ BVGDý‰½å}Éqøah±=÷ÜœÕMñà¬z¦0aÕ1Žþ8 ‚)]‡C¿zÀ˜cdN.«†#Ýs£ ]ŽFè`ëÑA6"(‹!GŸt&ÐnC·"™½Ì•BBÈ}—+† bDŠ©YDDL ºq±Ñø ¢|À6AQr§Y¸Á aŸ˜ñh+õfM"Áóœ«Äk¦àÇ7'3tjc„ä†ÉAÈGPætŘÐÕ2Š¥â䲄B l‘–Q^”ˆT!LÈ0lŽOÊ"­/ Ʀ$J·gˆøN¤@¸QîÖ:’¸~!§Ñ '½ÃT"#Âçèc€Á;¾9ÁCš þ?ÏCØS P°¤ìXw{L 5Æ Æˆ feá]H˜“†„+ÿvû¥j9,ŠË…¥øˆ!^§‘p}OœþÔw²!ºU«m‹ªìe3;ÊBÈœU£ÙHB°¨å%WwÍNš¼ŽEÂfíÉUÅÉ0™R¨Š¨Fm¶„(qXÃ#¥KÜC2%‹ œZ¡(¿ß¾µo›…žœô&éSÈeìJíU”ï2ÒV­YRf䮿¿²)̬¬‡Ë,›D ê¤Qjˆ+RóòÐú%µyESŒÓ%6úæî' Š\ËãvÊ0„_Ρ*¿ít%;erU”™ÔGãRGD¿Ç³¨Èæ1D"q7 DæT!ªd¤óÒOdf§ ¿yŒ•!k¯•6õ1SËbüd•Ê”)fÄ-¶WbÈlý¦§´;¸wºõ‹¨jRöH†qÓÀT@ÿøÉˆÂ°7NZ¤ è Œ z Ê®³’È w‚óPÜúH†{øöëKa¨Ip¹)hä¡(G†oJYzìó’QZqÚOPwf«sa]¯â’@Û•Q¾Üx‘/K:¹jþ#ª¶F²ëY›}æ6J²¥1Ÿ‘]ä•2ÚB/’ëü¾ž•VææÖùIe!Ihоɍy$2Jf![ ø8ÆÚ÷î{è«®¤NWìªS²‹A¹Ôĺ1Ñ[KsÙÄ"ñ²ºœ÷WãpœÙSÙ&MT…J­‹:”2È6Ô…/¡Ñ~ca¤My(·ÊÖ±l•`šlÒú™ŽDÁ•GR™úwEÎÍÅ*—bìFwÒ5¿IP”Œó“r„ VWT÷r;õUb’ceoCÆ.11íK¢«Ù2¤•ÈÞBc5ñ©)†b5‹Ç0´‰5$£m6ýl ¢H‹ÃŽë¦ÈGU#Š€QI`î!äsJ_fÕt ™Ní—-$½y'|N™Úíf;UždiDÇåÓ¦(„)I#j#úí“ÚÅ¿[0†J-RȲˆTj³hš¯™è´¯tfª\®ô/¡UhåY=V®B'«Ž-HYÞ¶\ûEï/‰ÒÑðœµ6gÝ*¸¥BŸ¹qF{=UzO¬á îO)Rc–v²™èË‚ZV[>QxR/k9=sÂÓ‰'2$Jqh&Ry‰gY]Ê´ºFL É£í'HÍB!&²iK…,‚c ™Èå—ùóH ¦bš#]EºqOg­I´BÊò‰rn+j‘dMS;°¼½Æ¤èîj/Œ”uEwõU&=yøLD½Ú ÉÌ!ˆF9LŒ¥C\ë÷YX¸ùDGO$‰¿»ØQ P˜DäŠçÚ¿øé½4דX)ب–‘sSÉÔ¦¢w•4D¦J®ml"éRFnì9½kü|&…bh»BÈ#‘”ZÍ5«4Dõí^+„ Q‚„J˜¬Ëf&¹l¥ê“Ê™&_¤H÷–`Q+ýÐÖ¬Êè‹VºŽ ¥Åi C= ⛕B²ÑZ¤§ÔÔUÇ¡ D‰6Ä)&ù‚E‰´E*_·-³ª…o–؉½+"ÒC=XÁ§×)B˜Ä-Ÿž×yæÓ÷7í˜d™„ì>YqEéh*U*îÁEˆŠò-D¥²›˜±L7¦‰€y3ÄZÉD"?˜Â«+–Ž\¡êÌä´¦q6æ´H§ ›r·Võc“IV¨ÁsÈ!UÚ.£®P—T%dá:ò¹E›6OR¦T¹’JWOTòÊÅ5H9ÍÄÓŽ[Ž?aulJŽjÅ÷L*\Bç[¬[#åimŸ:ÆA1 îX’8aÚ`™û3pfJÓ•BI#ÜzÖ^¿´¿ÐòÒ¼!‘S°CñLžr QL£u¢&UøžÄ•*ŸÕEÝâ ¢`ÔÃLMa¢!Hàà ’hT9ûÿ¿*~{}ž»á|‰Œ7Œ=r|«Î£ EF0ãˆì],¥±S ¯Yâ_»q}ŸmÍc«7h“oñ*G*ÔaN p`!ÆÝ#vÌ„ãm;tP´¦ÔâVX˜R¨™­­íjwˆ5 ­«A†(Ë(¡ ˜ —ÀÒÃÆ+ÏI’àb©c‘¸o3䊂e„2x­b÷>HU ùÌ5ëyEõ_–ÇÒc•IÐj’„JJi¡SÌ®G¨ÎÜõ³­u«•¢­+ôÚ\U•ªa×7ÆÈšKkœ‚­HS’§aDtA&Çä[ô5ÉZäŠÙn,mÔ,•é¾ý9»úÎmß:Œ•e0¨¡Fa1\b“”¶o÷9¹O9eUâê¯ÏÙ»ŠÏå(„˜(IòÞ•Ê ²‹I/2•†dÓYCh¼mE0_©fŽGU ªë ‹0€QÍ q¤hÙ:gò}­â.ÜlÏçü¦ÉÕ¢òŠH«C¡QAÄAiÌÈÇB.õèò±·²Í5÷9Ö¾lÒÝ¥R™eZäKhAȳ„þ)Y2[ÞBd\ŠjýÁêåô²lí¦{ ²ª]U+Å”–jX&yí›ÞŸØJU~®‰»UQ !»D‘ÄWV…D' Înr„k ¹l') ôŸügƹ‚&¶eÑËíjlØ1•N`¤iŒ;”EDäåœ"å^”òØÒ0² äŸÖòm­³hKɽªd3E!Š‚•„KŠ”V*+!SŒ«µÒ]eM¿vo|Ru.Êô#$lG”IT¶|­ã|ͤ!…]µÏÿ‹NM’ÛI„ÁœéædFaDRû )XNy3粓Ÿ$ª5¸º|o’¼?/™¡Ißî¯ÿ¼ø×.ìà–„™ÃÃ]¨0‚üPΚÊ&5.~÷ôQѸ–IJj¬´uG:Hö#J¶.Õ¬A ¯äºò›ñ°²j6”®ê£±y„rˆÏÃoqœc(¦;‡åiT‹Wë¶j½ »„©+BÒmnd32yåÑöÍëK‹9YØß¿äHɈÍõßè8…/–˜ªdÅ3îëf²š—írB‰'_Ò‚™ÏHnåW¦º•¥D³=V«tbG”éÈ®]-1Šc»“¢ÕêZ&ô¥±ä¥»ÉÄØ‰–6d1÷â”…uä缄ˆìb ˆÄÉp¥OF¯³m+¿^,¼š1 „ëP›Íœã«Õ?*ÙB¡…b7jIè¿­J.cæêQÔÉC&üüëQ !݉”Ê¥““YwùU+%_¦&¨ö\mµš¥q§yÓ°ájEÛ)P:L!®O¡i¾ø™…W¯×‰G¡sðèÎíî·/{De$Br: ‡2ÏŒ›˜·s RÉ#WØ›uõA–¼5©fo#Ñ0¬]ôÝfp„!j}’¤ßÛ‘Ìr ´«YΣ—F-®è·C¯™êJ RÑ=hO§&ºgZÜ=pNÛ´®GÄ'LÈC«™nÉ„ITË;#9ª!=ÍھƦ_WŸ¿³°®Ö¡²¯âdc†!9Ù‘Q3ŠBNÈ[‹!b¹XK'd›ÂP_õáï§Ê ZÚ´„3vìûÉU»÷«J¡ bѵŒôí-dºi]Y¹hcŠ¥¤ºïSúŠ…#—»½L½9­d¢7D¥>œ(A *Èè!5éqZ•0*“Ÿ^j^'VªØ«ù¥¶‡÷ýDvK)û×˶JPŽB´­¹í¨c.†Ìë5Ì]&›¾Ý½r­9Ëeïç.~¦ ŠÜÛ¤ôRˆFO%QK^Ü!ÞCxН•70‡)Ýy…})(WU‹»g*ÞØôf{ådÄÕ©%cÌ×^S%ʬ½Ç)VwH¬Š­êt^Û"Nß;í%»ÖMÄ\B{Z¦–E¨VW$ÄC¦kŒïlzC«\Eòg¢¾ö~÷¢ù:¤œF:Wû1ïµ°ƒÍ-NK7Øú+ûuѤlÉ„·êON9DM7o™‰D¹HΤogÊÛü¶I ML|A³q+Él{U“æ Ævâºê_¨m·×¿S3ª·u±Û’R^ÌaG0Çm¦§¼ö¸©F'qZ~膥Øü´+eÄ¡¥vn[ җЧ2Þ],‡z’ÿSŸÛóÖ‰›×.ûQÞ¼We:ÕE¦«(Ç+˜‰Æ èŒ5Tõ°Ø­É>ªíø¾™­ŸŒøõ¢‡3©†+Š´uÉ™ë)Š# ÙL¦Š<ùKaöÒvÔ®ú­ ]]Ï[RY‡8ƒ#ïÕGZÎE!ýüR ‡J.Ò¥æ5Q3]+Â1ÛZv#mù»ñ%Å9Di)tœ^³ïÞüÓåuÇ8˜® ×× Ôåœ8c3†Q“Sª!9[„ÿ²±i%ì‡$×Ì"ß·³ ™Í2ÑÇ#°ÍU9 f$³yÄ)]Ž!QmüADÍCxŸ˜eç韈²1XöÓ[ŸÜç;²YKEWoý­Òû¦+&%98º´WOæ0Úûu![c­ŸUN ÞýN?#ÌC5l¦ãÍ´»¢WoìZ?´‹¶•ŠÃ¨¼eÊa êQQFUé´’äìEB}s›Ï´CQk»û|[¹j1˜¢“9èæ™%1…{µ5¤Ízo°-s„ú².\®hßjk”ƒAÖÞdc•M3joDÕr9“|¯­˜6VΜòÓ’ƒ«éŽNwžÉµ`„vÿkóIRg½upý2˜ô©Å©OÔj4CŽÃˆa½Çai\½Yêj1²›È‰JËÎKæ üCgF0¢ ¯”W: OK%c:=pÅl/LCu–¢®öu×q9ûëµ±LÈ–jľ“êl?Ù0Ψ_ÙZFÆË5ˆ0U ÔrS,2Xî”Å3“ô¦KõôWù¤’«äúÛ¾a0›¿ýB?™‚2ÏúºÆb ‚3ÎR˜Œ¼•£Ýså²r´”ZZI¦+z‰¸Ûœªg0Érffôgœ¦G1HèœT«¦Oj’Åîc«“¤ÉqNœü%-Feκ34ÊA®SŠ˜ì:K3dcÙ¹Z>LD!Œ¤"’N›Š¡Î)7·^êüLÕOR¦²kÓñzÝ]Ü6Rš*Õ„ßqjb1AØá˜B4Çá¸ï§ÄÒ}Z´Té¶¾[)¨”ÛÑø ƒˆ«n¤@ŒT6Jdâ2•½,ûR1è‡ÒÑÈ´ä¯L^ý©Z®?÷ׄ_g³Røþ’¯“Ъ¹l¡ÕÏÕIîDÅ= Ùd”w®YnþoÄTÔrñ;Öc÷ù©¯vÑ»»:Éʼnœb•e‘þÎA†´´T*ý lä?½~ˆ6 ²:´´¶ÒZ)ŽúGÚ¹ëuTÊ”¨`Ì¿ÊV+©7ŠŒÛýäªjnkÈZq{=nôÖ-%tb~/èÉb/oz H¬Ô%ª_IS9Š[XHª·j Â: 7îœ6ãò`űº=ôšÏµÍÏ­©Õ4GG –D[‰‘Ù•ˆa‚’„–¬P„½Q ”ýbQ©é¡ô¾íÂYr±h"ÈÇ*ÝDQ¤ÐÅq £.å„ççwSc!f¹2e®§ ^VüY­‹+!z!7›#u¥“7ˆw¸í\$­Jí(¦ÎsïHäÌ•/Š“8«ý´Í¯•¬KÔÄñ;Lµ·8å$±²ÊG3®‘‰ï0ŽïärDè@(£¢»#JlJŽ}C–.ëKå?OãÝ;Û©ú%$±ÅU£'¯¦÷¥Uƒ˜rê+:ñ C&ëÌŽT‘+¸”A}-q•i¶Q²OÙH¼'ÝOÕ[•÷[Ës ÏöÕ¬TbÜWnýÚˆtE8®ˆ^Ö.j˜K- ·ä¼k¬†SÏKPùD˜T€IËÿøÉˆÂ±0Nôõ¡öÅ÷÷ù!ú.ûûó’Ÿ#/GõèÑú hp…u,¨1TàŸýÎ'´ Jwt~oÚÔØJqw±JŸh¶d„+¤Ààª6#~ß>JUotálB!eûÍG&QæZ»ÇEa1Ójad ¹5 œšÜ´ùp¶G\îUÔ«.o²ù ’•K¬ˆª”ÑM*·®"[¦¼é#‰£˜mÙ¶š4×ÃlR "B â½Ä`ÅŠÑt“¨ªÍÁ9u•¸©ýUÒË‚WâôžøÒWItpˆ: ï¤ èS'³¢dˆdÎ=ÌI ¾®0™I¨&>™jBÈí¯¡B3öÔ‘QKØ›¾œ»#©ŒI²[yKR¼' QŸG-Jö*­ƒ°1“»C¯#µµµ„D=*=/Ñ8úŠ1Dv°…29B$§þÇb+Ëÿ¥‹UIóïxôzäþ&±³?Ù¤C~”°¦œ´:wsÄ GMÓÖma eÂqÈ™¢àÜ´ ¢°¥d5£™-—½üP»¢\ùÇöÍÎÂ`„äÂjBÝä>-O©²Ê3´âÝ}.—´%½8ѯS™áB?`…-$žô¾äþâq\€¢Uæ2¦†"ˆa.±„KÈ”´I‰ÁSõpP”bxKä•§ÏCë6÷g›ˆB¹ä$(„*Äi R±Ç¹8ŸBJP¨äÔÔæê'[*C¸…`㻀„Ê#Ö7IgK*œ¹tå)m,œãaµ5)u+J¾Æ³]uÇH€„\ªŒø>óÖBã8ÃráÙ&šI/ˆ¸m)Tªf)Ö+XWŽ!ÀŽ%&†:ê³O‰dÅÿå%-ݰ“ÞŽ¯¨•YF¹l]W]«Npaœ¥1覬´¡5ö&í—’¶ ÖòÌÌvÖÏœìË»g•è+ÔN¶,¹ElÑ({`”KYwJ¾\ÅBÈ©1&(ìücãeˆFm×_bi 4Ix0£h¡†é"…jÓí²ZMí11 s4©–o¤S]iëÅMzW¥‘ß‹G~`™\ÝCûËBçù<õïõÒ­ÁrŠÈ¢‰â²‰ˆíôÄb®’›’Õ¢(ÂjI.5FS;,p9’%haDápJ×îEÏz,È¥É'ÒÖ©e:ª&_SYkr\½;°€… Cs,¢q …¦ù7ѹö¢õ+Ñ-=…_­T4e•TeG”Ç(ç¶(0ãÎÅÒž\³ õ,¢ §âCw!'½èõ<ÇÃP§£DTn:ûà‰Åü¦Š=Er½˜[Œž©EóeÈ(T#m? ‚Û¶´½ ‰‹Äý ih• ¤Ø!Ì ¡@‡ðzIIÅBK‚÷ÌAè'‰ZɵQ=)Èm3±,`–We³0Û2 ŒBe%¥;›ŽE’|z7Dg+ΕêÊÍ“ìРA‰':SI±3÷u)ñx¹—Û#žKÕe:²¥òÊ1 n[•1Odæah›µ'Z܃°¶}u±jÞºlyLž…‘YY_98‚8v°  §5)„T¿¾³cVÊbDòr;¥uÁ(5lN¢¿+f/5úwU(£Ô¤qNLáè²e ç|2©Êa†R P•õºØO_‘!Õ2c`ö2îÄÆ®jJ°çÚ”˜ÔŒ¼ªŒâ[‰¨EöC çÎ5Û9NÖI–œdþ’STÞÉòÔ•ÑqÑ[Ôµˆ†Ÿ§-”FG‡ @r|àí¨ò m’…±Öa$Lió:Éé?ÉGÕâ’Ô|c¶”¡ÜÅ,ÄWR—ý¦ª‰E¥dÞVVÂ=Z«vº2±Ä€A’jtq7I_KºÔlÝ~·SΑFÅþ¡"ˆhÞWÑQN榴Œ,¨N…iÞ„Ú¥ åÇÎÒ`Ìì¿´lVE™I! a„ èå©c®R–{׆áe$«ŽBòt‚ÞâÌ%;54ÆO."U®IÌ–aÇäUï% ‰_!JÈçLLÌKHgS“jЬ¨“'’P`“Ž´_ëí±7ËG½1WYIÅ”²9j¯sæ(©Në¯Ô§-rœ"Y§ áØ8"ÐÓÕ.ò?*ÄÄ–®Øë¿7ÓÝè¾wØbJgŽç¥0¦M{¬¾/]¦D´7[X\S¤ÚÈÿ#ÈÄãYlf‘"ʆ)È+UZ’ ÜÏU·Ú¿ˆ"–æÄ#]*êîË!'q… ”LW$u«ëO–¦É·v6g‘¨OÓó™u5Æz GrµŠ2²) Ù𬈒J“7‘1¯S'¢ϯÿI¿LSè˜DwÇ].¨‰>þqtôALR¹š¢’ž˜ùbŽÓÄIPËÕ3L{S2¤{,—Êip–|acÓõÉVË!Ó) s:^¤ÌÛ®+Ȧ‚™Ð‹Ž‚ào£DR(ñø)¥÷ß«‚YÝqbîH"ˆ~&å´UÓ»ÖsŒD:p¢Í”"•™Ž\§›þ™S,‰˜lëh“r72¼Ç&eëÙQ]N¥FeJââòk q×·eË w&y4é¥D¬J¬‚Å!вïQ„öŠ2ãf%æ¤OÊ*Ú‚VZHEA†â¦r(FªaˆâÕÕø_Nœî„=ãá·ÏŽ' ’®çIŸlÒXÙ*yÔÉD¡3Ä¢°¦a\ÆYÔ›dÛ,¬BÂãeùþŸÔ¥_cÌÚS&i=æ^1,å)KBé•L;íy3ž¦ogè%u’U]jD8š½ó,¨|d„K%zN¿OoAØEï©»ÊÊvâuÆ΄˜ŽFa®ó¥ou—?¤µïy;©ºÙ'’´­ZÝß'™Î",ˆpl0š†pmÃ@€„º ؤ ÆÍw–(réÓàƒh£ÀœRl2ëÃT„ áD& iN“ÙYs\íB$=.¦gÁÀØ¡kŠÈp^Å!˜l â+¦L lúÐ&¬æ„ LË |°Ö1iV<+uç"HOJC·˜„S$„)Á ¬$¬ˆ2‰Nö”JLÅ7ô,+ŸUQ¤"n„cˆTpÎbAŒØÐ%b$bîÎB ­YÇ ¸Ód†Zî+Ú0@`ƒ&bº tq"2÷©Øªb”Ô¯ù ˜°„@D P!°EL¢ …vE2³ˆe®PáCOC¡E\:Ÿàí L d0Cân"ŒA "3æc' c‡Z_qÿøÉ˜Â²›Ný×~ÁÿMŸΧèoõ³ü´ ,ÿصïØÿÞ\x8¹Æˆ"ª’ÊCˆ¬¤#²"Ar0;RæˆFP‚ɤ.)¤(’²+õ?²%Ëâ=9iÚU uS™¿/¯a ‚ Ɇ‚Q*†8–4C ßÚycˆ\@.€åªò/ŠD5¤"»\%ÌLotŒ ±a_ñ°Üú…e–æ(‡Ð£0ˆˆŠîDŒ•@… "àÏ1ѹHËŽÊzœqDj?¬Â †FÃÚ Ý˜& PvGï]ÿÙ?FÃq„0A‰I”I†5 è— Êd>= 8()D¸Þ?<åR9Â`ˆÂ%!9†`@ŒFm›‘Ž5³5Yÿ]z0e@… …ÐÊ6!Èw¹Ði›'âŠ{+0™0äWê¬D£pΉ(ÎC®Nc$~$ÿ‡C Vƒ¨@ãŒ/1 0Ð40b“HÂ0 ëÂP„jv¯(/‰;¾ @\«Ó™¤¸£T¬¨×Šœ@Æ0!¿Pxr‚FE9ÊSåÉg%“*qˆ,@v2šxÌ F“¨hDç:BR5a:>3‚LÝТ£3Rœ¬ ^&!\S Ä~i*“žsŸrzt ZdÆ2†1€×Oð†„j#ÁÕÝÅ ÀøŒŠ`S–WC\D3WÌ»ËÈ%,Œ!³VˆoþZ]lg¤Z¶æWqĪ Fâ-Roµ·f's}È-Xã9±¿Î"¯d‡TËi—°Âg¼Ad?`´¸Õ¾© OΔƩ _ì#\¢ŒIˆ—E[Ze{ å{ZŠß'2Jù4¥ýc=—ŠBŒ^#ÕÉ*™(Ks§¯:Ý©ä~R.wÿ/f:mŽO|÷m¬…2«ØC­¹î»>‹ì½i1æí.MéFNßÜ4«aGrˆÆTÂ¥‡*$Å~ý££ä¤›Ò'NùMÏ {õÔro£½°—*•Quça[ºÈF¶ˆˆ~\öêy®æˆ-»·^ºc°œÙ!÷ (Å¥Hò‰™·U“އnÃ..½êZ´Ža Ï«Øøž†úÙ†îÿMÞh¦‘°¡IA<¶-rÎäkYÉÙZPÈŹ…êÉï„I„1*Øf|”lÝ!ÌQ+ˆTnz–ëo3w}^oµÙm^²^”Æ^¯Vfz©B¨ÄTÌb9IžÝwYL…Òoík̯%¾CsE=Ès–‹PWPœtªŠÈNýImYG"SŒJv& ­¥c­„Å"QꌅBpçÕ®ò~«´ƒç-­Y*Š^®î?ÜÂêgaB™hÌsª»¥\+:a¾k“¤£Ë\ÌBjóc{kzu“¤!ÇfW) ŠmKáR—¹–É‹¼Zâ8¾Ã«²‰ËÏ¢µU- –[t#•×X}¹§B6 b m|~ÙßÛk³“íÜRSvÄ!þ¥1/´J‹t¨Í÷±ƒ*„6½f1ÒäÄ“›ÄWÊmyêWB™+õÌÞuW÷+—Q)š_ˆïåýyh„©¼âÑ>Ÿ”'1œuc_ãìçs9ŒÙ:Ñyµè`„W1<—­zT®ÜÆMÆóQ«yæºÌt¢êaòÜ–{“©{ýFê[DF6ª«îËT#™x£ŠTQruxáլɿÂÙ¤ÊaÝGq)ˆT„½,FO# t—-/%Ž©t¯Æb£OA%UB–†•±‹mµL›"œnÏ!›‹g2aÛ0ì¤àd`ð^Ð]`\0YàTàK{9']Qðù?Œo²¸f˜¤cu½éåŠy°Øe¤â u·š¯u#ëÙs-Iæ¥(¨c’˺_RºÉMТ+4…#`qC?ZŽb‘Ë{t&‰Úe3³þöÊö¶OÙâº0õLÒYWLÚ%ÑÄ!ÇQžBd*—ÒôâÔZ%,nëèkå¤[ÊLE%D(¬ACÓ]ƒ§aÑI'¿•Æ$­†¡rÃêI˜nù8\#QóÓy)bB²¤#9YêoS6²îô(ŽM¿Ë#±M1›·" Cv8˜kåILMÁvÞ)&dE—°Iö%…Fµé”µf-ˆ”3”C íÚ åê•o Ú»wôj&ÍÄâ}k-÷›"å^ãaÒ2¸ç‚ƒ[p s.ê6…þ´ËªL¢’¢ÞèÍ'ñ6Ö9‚ËIâ5b”0Ýö.yJ0Æ:nõ0¸ÏíÿK-Öž˜Ö4¦bµpœF‰e2Y¢ )qî9LÅ',]‰L½ëS/àlìµQÆ%kÚÝYKm⟄N¥ tõ ƒ±N_NÉÒ­Ú5Rrк›Z}-5r§}Äë!Â0€â~Úͪ”ÏßMÂjšÆWè“Kz¶sfÛ8Òi|é@­äMJ®µ*ŠUœ›MT!¸‹æÞ Ï[ÆÑ £ÄYŒ¥0bM‹g! H”âÛÉQI™¸’Ò·áX¥’ÕûSÑ”Y¼’ “˜p„çÐç;»’¥Ú[˜’-Q•o®qkL·?Ë¢y7Šv†s”(#–±†1 CHÜlaª[£;h”^ÁˆKv'ª™ãÒžé"‡Š,Np©(Å ßþØøy •ËmŠþ»³´£’/å0Gs%Zœ2N‡ñwZ%6~ì±}ßk^×U[o¿z˜tA'¡âhVSé"!•،)M!ŠT¿éì[%JIxÚA:Ò ÐQ£JÄÄ(APS {¢‘îÄ>è¹SHĺWVVv¡<<³{M”údûöj —9%OT¦[ @©bØ\^T«ª”öÖ˜Ù¾½ãÙÉV£6I³­ÊQÈÅ ~:zU+‰ô¦ì¯Ó¿1ë¾EýÖü\%¹©ä$¨Äd‘J1‰fÖM>ç·ëÐÉþJ>>6Í™ù^¦í(M ¢¨ç 8ލ(tŽG?mI´æ&ì¿4™¹¥Ú–ÄwZI–å9DÐI6í8¬vÒSÕn•ùzyŠuìBñx„|ö¤¨Žß’%2Üæ9"0c–y}ø–°Ôªòvò߫ծ»1vÍåÏEêü‡¶I3Q|íVŒsGQDgÈ­&é‹!9 ¥Ùu[kD4'‚ŠL½„>^QEÁNÙ™ ÜS‰fTfÚÞ”d¾š·¬Ž«/ZÒv¹VB¡,{£ ñ ÷r Ä_mÅd³ñß,$ÍåîT¡³Mföÿ&µŽ‰b ¨MãJ¾«j³næ³m1©Mã%šØmBQzÏÇóú7¥JÌ8aL{%Ù¨ÜÙsPدÎüöM`”›´úY(bñ5Èe#8ä(f@± R> e·Ñ6\±2ÞÝ_°Èãq~åºÜL¦lŠ•aIõÓNÇlÎ"éÍäýWKKz#÷«1”¹]ÍöYC¨Ã‘¤2 ‹…çÓe¨ïK`¶Ý3S,êó!C¸X¸ë÷Î3{Sš#ì#8¬S)ï\©.W3±8ÚqjQf‚R@GlµHòÔ†Q˜U#)Í”=š´b³ª>a1]ª/ÖÿS„§Ó¥¾ ê¯ÍBsi#‘LA„$êZ,Br¯®é¯Y^®ßõ“ŸX÷*TJœ‘ !H]Ï#¼£>=IRrûI1¶‘=I‹vZj°¡?óMA3þ(½L¦)ŒfZ†IQÞˆ$­.XJ§ÄoÅrÒ6Z“º& b$Ïf)J` ‡þCµHr”mJéüåðµkD‹ÁXÂÚËmoâ±w=Ÿ3>-!\9GÆÌYQŸf§œ!úܪlaQ½3Mb¶oJT1.gNþ)\ç²ûP¸RH']ž¶¥¡6ž#¤,[ݵ¡È’ß]3Â9΂£ åÎ{uìâ:ÄW|«Å_hI¡´R„þÆíœ ´;ŽéR1¤ÿ)9Ö®Œ‡'g’E& ‚j%Í~ÅÂY™ ¥>—ekŠªdßµœ2ؤ]ë£jJ‰;)„ÂO6?•ж6êy"«ˆMîšõ#¢n‰Ù#ÿŸXÝ]?‹C5ÑljÒmz–ÍjŸµîªF[#iÑËJ•Šç*­dá-z¿î{Þ¿¤rxT¹Ò fþbâØ›DˆæÎ¹d~Dž›a/j©L^õ)Ç\'ÌqPÌ©lÌÎË”É6®#ß°~R»å_7·Ë!NÆT£³Ù*p«*Öäú6qYl¯+ßI[R>%Êþ[Bs›_dloª÷Æôvt•ænbaÈ’ÖQHi¬Ýj/.¬±%"š³ULùŒ) sœÌì%û¬Ëé9eLeþUçÊ“kÂþ#.%9·†²íÊYB²¶mTˆ"1œ›w™Tˆ23ÌaôM¼Ý!–cb&¶­\ÊÆJ½Žbùvu·'+×lMî÷ãTU²/­i7“,N-¾üÔr/½Ž‡+»®i<µIH–n»1¼ÂñªnÛܽ‹Ä™¬‹å30£Ž¼†!Þã#ªa)b†«RHÜcdê ø¿uÍÜ"«±M«‘‚ !4!µôʆo%sˆø•TÄÔÎÍ•Öäº?7gV)Ec°”?åjÕZ ín¿ýf¢ˆ˜LÇK|Š™+¦Ý­‡©YY.IIBQYÚÊZ?¤WuB#wÙ*u䞤ûÚôGŠ÷QÄj¹ON¥ËíæïÒ„4ÙZUÔÑ|kU0Q(Ô¨øOÇ:ë5 ua ömi •\â&{{·dz‘O1×”ô!ûRc‰su_טó³ Eç,Æ”¹¿&[']MVì­—ynœ˜}ÀœŸâŸÄÅ6¹TÎ!"‘HO&ŸDeÑ Í©])J9³MOŲëv•3IÎ2,« ¥—ÎÞ‚5ÿBHŠI³är”=e±š´f.¾UŠ…b>fh­ÈGN-‰÷-Ì#ÓS±d{21©&YÙÔ«ù/ã˜c,‚ñÍF³ØYÚåºWç¾è¶\7~ÕñU)‰8„æ¢*ù¤M^¤Å%“’SwUR,¤z%‰EA3t!6ƒL-Ü„D™l¤Î-3 brn£¤jeY“¹wú˘~]Qªk#Ü„!¤hì ÿøÉˆÂ³>NøOúmü—þÿá••³’ý£&W øÏù N"êÈÆ¥(ÜÞ‘‚‚( ‚71UEŽGA DBÁ0½_‘Ìá³Ôˆdb»Âòi2^0°“Ñ ëT(B.X¢‘X^"¡"‡ÚGRƒ*)½aÄÊ$! ÀÆ‚]W‚vX–ŠiYÚ‘æP]Ô ðB„¡B2"JY¶3˜È4ùže]Dén1Hûo•”G`!FÊr S‚G2š(C†z„q;D>@𢀎çB…£IDD ÔÈAÌ qÌ”ºì*¢ô¬‡L?q(7#Q 2 ­_ºï!¸ÈÈǦpDÀÁméÊËA\ç #ˆÂ’œN"á3¹†²ë¸´¦“‰¤ (#¸”úd`7"[s94Sb­é´Eô绊AJ#7ï!~Nšx4½{ª¨é*¿¦²œOëš;]ŠÍ:QÐ!î·T©"‰J…•7kžjoL½ÉFòÑxêWrÑ2…ô³™Î=ê°ÂoaÂÖH”øÒÂã ;މ @¥PÒ”…7idJÙíýœ€s ¸ŽGa6lª_Pœ£\ý Ò±*½0R„è,Ý@ÌEáF”îÏ…¥ëȨ!k·q¢ŠàÊRìœmÉ{Ïj„”ø ÚÈ|®N%WQT›b3Ðöz£Šti]G#ÚOŠ@¢öÚmxæK„0âÒ’mKlKtÒ6‘DíLsG£‘G°ò:Ô@ÀV *N?]è|Â,Œ"%–Ì&’œÕ¶¦Yi-7©X¡Æ…©¸p„8–T"Tª¸´%wJ‰ÄU%Ú­”¤1ŽKºÈ7,[T-Mk™J_R¶Rx(„ _{\T?­\„s°C€PXà ¸pݯ£èQ`y¸,›ˆŠqß·®MEÉél¨ÓÅK»XFQ[‡¦Ë!,ßdÕ= b!ZÅöyÊ C eõúö\A´hI[Š\=ï—´†Ãª\»êP†…r”âùì)´µ5Mêô œ"LºÊA1fÚEñ«›_bûâHOfdWi !+÷l(ÊWrnýiYDh…¾’ÃSL*&JÂH¢ƒqî ƒ]‹A±)†Éwcu_¹u^¨ÉòNj) ÆÊ-¤:I _Ò!ȱ)|øMÒ¡^Cí ²„ë^DÒøÒj;9VÇøï!…#åëªOT™ðÔ‘¥̲8PVäk •tžJü’TgD™uE Ð\Øw,žqÿxVÜ1|—8±L QC0·Ù^#-7ÔßbZû¯¸s…9ÊRÒ^Ì¿|£h]{¢êU™Nò?˜j„̔Կk‘œdÎÞÆ,eÒ)ÜãGTeµñßc"[^™cáFˆlÚS4[‰rI”™%kˆiN#»Äs[¨Ã5 ÄAVérÕÍñ'ëÚ‚}³ð´×÷®x„ï% ËÎØ‹"¡Nwf*±pä˜Å:‘$÷“(aß J¥ ã„,ä cWd%~ß=‰õ<çÆï.Ûê£ÅÖM}ä0¤0S£Bÿ•GN”jº¡HÞΈ©ÏS]e¬ϸah¢%‘x×]nªù¦8æ8ˆf§šWÓ?3T©nfiƒ%ÄcSõ"Íãk4DY ~škðC5öGÁ4­/+S,c¢8Uœ*£ü…9 …ñ*’Fš’­W8‚8W:T´¯‰p\®ÐlA}ªJÜÎ(³#¦i&»Y%ã“Ïå)lNÓÌK/*°(!Æùb‹-乯0ËÇób#šëÓ…¢|¦Ó,÷’±ÅÒYV‡heGÜþgª&ŠyK¿Šõt‘ CmëML“__0·Ê‰eäLŒYÓe?»Œ §J¡–äDòËõÝub)©²˜B¼¨³`¶½ÌÇú Jòj"í¼ú%²T7ûÙ‹†EØR£µ$)Ät{¾qqßP«Í…II<,ÿ“7ûÔ¥Œ„cräô,ŠúXì¢qЦš*ÕÇœzÔyPIRÆxIØ#MSé£y¸yDôe5ðñw ±2Í{y}§²…Ã8ï8ëµ(aÅ;¥\ñ¥<±bèAR‰ DáØ2 þ[w¹MÂl„Åí÷"ŠÊì­/>“²DIZÄí/)Y×D#ŒP!–i,ƒfÌ‹KS Zz„eœô?‡Biá¢w˜½Bˆ¢©$§l¾\Õy2y·QÊT ]Ô¨Üz ¸Ú{\<¸J;MDŒA¦LòrºŽ!+ºÐ—IS Æïûec’Y¤Açy„JHƒ‰sƒƒ 8*óRöN_Ê„Jóã’rrúÒ‚N¼0Ó6§2°gIŸÈãµ1ÏcJñK2"í,ZÞ3Uzca"Ó¿»ŸÝ—ï÷¿ûøþÿíùB&**uöáõá‘RZÊhlqŠÙh(#ˆQµR§V,ᕈc Æâä,#7¡Œ‡ÝzfÅ)—y†8¨ KóœBh“†aÛDeaC%Qóu¼bƒ”ÇAƒØC%} èèåaøì`ÂB:2TàÒ¼>D2ìýœ§Ê5´ìÊZGCA„&eȨzTq°3 PÇCÁ`Ë. ¡­0¸Ó йBtæZ u¼3D qHQÈrœ°I×/Á™„:¡B€™žÁJÉÂ`ަ ‡pU0¡Ô‰ŒðîÌŒ$Á Äa̽ˆ@˜b4egçã(Æ‘\´z®ÊÎ’$ÏÒ53¶%Ðè ˆ˜ÀÐÌ’,lŒõÔ†0†ƒ#†¤R‹ÊƒC ˆ‰’S®Îæ.JÚ«îäo­coΑÛ¢† @Ük„5…\"àƒ™Š„]½NGà´¦V0N@rœCñªì–æhSXÌÙ71.èC KÄOä‚™‹ËpbF.2 3 nPt¢f˜Æ9 ð!pâ‘H™³šÕpôü˜¡“0onXI8­ˆ@dR³¬U‚°cªábåáoù!B@™? ‚EË ä„1³yYåǸ¦(Æ–çèuÿ 1èÙ‚¢=5Ð`h Ü\µÁºœ)Ð|DKàW~u·DH1ÈŽ˜ã¢1Ìì9>$ᕇ®k Ú¥¤ªÌ؈ƒ”âNS1 Ñ!i]Ìý „›#OÊ-‡b°A‚1¨ÎF¹I“!á†Æ!Ÿì!lì2¾w«°L|¼îå„Íúr:!Žh‚`Hjcç’\e`›ª‹}î#ã*‡çÍ'¬göèzÅ18 †4=×¹ %“6 ¾RtèyPÆâ@NcWE¯‚z¬ãAPRÕ&„"Ф*÷Sd685Aœb˜…0Åc;Ž6„ a†ãÉXêœv˜”28¬Wå×J'0ÚÃÏ•¾&#xFTï£!—š4„‘ÂÜT™†@ÓɆe¥]¢"ˆ# Úwñ1Yo £8Á-¬è”£šDC2Œˆ`ÜAQåJŽ 0A”EЮvW$¹ 1¸¬ŠK¢A„cbŽ Ó™‡#ˆ%ÌɈ‰=RØ+e!mD¿YJÀÀ©Ä14È“Joœƒ VËC¢ƒL3!Ee#!fŽ$¨|ØuA9’c3†4€…>1$:E'.!R–ŽÊ¦Cà„ÎÑBªXf0f µ!à¡Ô:l(ž7@è pÚ`ÂŒB!…RFÐD¼@ʰÂWB˜ÛL9àQ2ñE†v%2« É)†Ž ° rÌè*4E«bšC)J¡sŽBctR†À„U_ Û˜ ÁHsqœKS‚°ÙË ªW#0ÀfĤ 0=|Bˆs€Ü0̬ î¢̓Qï§L ^’-ÌCÀ¦é¯"³Œ•6ÃQŒã Kà¦=ï¤ÃK½,].oß’G-ÔªBÑ+íojå9ˆFLãë¦,’²âUÎ’“Þ/’”?”¥iI*r®ªÕ—‘0¬B‚»|¢¼¢kÕÂqÜÈìjhEE眕£3sо­éAGR¾æy"W0Ȉ§°œ”Zi»‰§G«ÌË„"º&Z•™8cËW®ŸïÏË_ÏfKù O}ñ +²äÌdÁµŽUY8"v®ãf.˜e_')Œåö(ñtJ)snB‘6¹PäîÊ›·lÅLÈ«Tr‘èÊ/­õ.aU6íýðœ9ZîR‘0Ùæ¿}hç+Šõ7[,âUøÍ´W-7hOAht”WÍÙŒ„䲔Ф_êшÎîç3d“/%±*5¤n¤–¶uœ‡°­"õUr¾ÂŒ€f£*Ô¡=ÕT6lï€x¼º™„pÛK90‰b;&(üÃF¨ÜRà°c†‡ôšÕJQ ƒ9Kb˜ –ŽNÁÊ§ŽœE¾›*(Ñ‹ÙQ€!•–Œs‘‚Bäa@3nf´sR Æ£- ˆ¬U'+¼˜*!¨ãFB‘Û+ 3ÙÁÜå ”+«1HL_E¦å½ÎWLQa Â`ÊS—”i„ÈAˆ™*73!‡ˆyXQÁ7 ý dQ͇ª' b´,Iëð¼Ã&@c‚Å!”ý'0C%Ì0˜¹Fµz¼uÓPåF>v%qR˜V:"Aƒ PUFBZr“.AAÎb Ť½õöTª•â*¼’…g׫!J!GrmnåG½Ý_’Ô53‘Èæ[6«•ÜS‚ˆík‘iüèë·ôÛN1i‡ýgôj¡,*È_ï¬ËŒ0ޏ¡9O`‚”ìÄ×WÙ+ÚC¡ç¶ØÍ¶Úרèè&™W³/m‰tK’OÁEz/PtF’$ÈBè¦;q¬¸Y›<‰tÒ~ì‹´›Èä%ÉsP[VU~$Ö5ÜÞÏ)RDj›þAE ”%uÊäUô½C·´oÕNOg)¯ÖÁÖô½,;"Œ õÂaD©ª"rädÒ°­V•Šp™ì! %|b·^¹F\ÕÖÏÔû‹»QT¼œO&ŠE¹aΘ•ÁȤ-ö’÷n7ÐaM¨…Åú ™ÔÎí«)Hl/=º­É&ë¦Où w«¦¬ôÏ*‘8àŠ¶b¿ŸèVbëÞ‘":ùÒ î?Ûy«‹WY;ôaR+Þ—k1sP Ã Ž¤'nÔí×ÊÄSìX–F#•lT{®Ié-XUQqÕñR­·ßL<šÌ"™j¢MécÒ’»p˜"œ©aŠ+'.ImîõWñÅ+fÚ’Ía[6݇T6Mò­/PÒ¬Vîáx‚J·ÊÇÕ£oTìÊìòÓ‡Âd΂>œ˜#TíÈq5èló‰ÈrµùÐD&at…ö+Tšå:9ÉþI‹„{µåúTBCöÿøÉˆÂ´+Ntÿ¹þ‹üóûøÑöŸô±³’å²#7\sp÷xè†bX‹¤(Ì ‚”3È´ñ³ú^âj… nœ8 º£Jè^Ïr¤Ÿ¶évQyk1¹²Eéú,•W×"ä;¼ ¡O>‡ »m 4šS|Ë1œ¡E`¨G4~µº´ëÒ-)ý¨¼UÖn²&믞yGUº už»*݀㠢Îî›FÚMØ,T.¹ -ª!.Å ByQ¦0qA33µWÒ®år=N°GeFlÙV"ÓD˜øòò^~–”¤¾,$òÒ‹›Ÿ»+\ŒüŽa–Ž R!X#1?8ŒÔ$‘½ï9ýñ润e3 ‘:“ám2”K›âVwKM%ÕîR¿>cDa…+µ˜ç®ÂvR…hëB‰É'¸-cÐTµ)šhAÎÄ´š•šôÒ<¬ !Å`ƒÅ#áé;êEŸ5‰É mðÀ)Mùû)[ÖyMÍΉ. ¢óèØæ.ÒnÇúOÌæ$§puÅj s“‚ q)&|=¿°ò"‚¸àŠ)!} rÆÒåïJ`Õóó–èY–ŠÖŒ¦Dô‰ƒiŠJˆèæ±òÚD°ƒ«XêæI\Y¢öq0A /cú&8Wj°,$ÉL<>ܦp GL*&g'È×`CˆÉC3ÐãžÉ¢Ÿ”*Zè]kdzÏ6s’¥·qåC* 1Zbããˆâqv§fV jfQÛF«¤é(QCHàSܲà7$7:ʘ<²ÓSátÜö!Ðê¬ò #8Ï ÃŠCÑË2 æg}°×¥±éYбbTÎ&1X4ù~кMC8©a†’3¨>¼Å'}R\(((9&q†B ÆÉðŸY©ïǯ¤èÔ¬´<Ó b¹S·ÎÒÚÔ«šŽ(C‡Á_ÄHbC,Ïik5e±l)8eéÜ.‰~‰]Éœ —½B`ЇM5Ô1Kw2UÜc°ÿn!73(aHê!ÎŒä5-H–tØÒ背Ž`£?®P -%I£åꡌb¾\±jZ ïÓ¬sšísŒc"ã7å–Rf÷õt¡>Xñ/$Š’hô­ÒFP¦•pa,†ˆóŠ¢ŽdBg²·=p\:ó(ÆpŒr„­"‘É}Mi1…«ÐŽÁ¸¯kÍH…>|¯ÉD"Uœ‰õœ£¬ÂRV€S¢”à½oXš¬<&xJý0¢M¼–š óæãÄK«+œ¤J æ%S8‘ uI‚ÜÄ즞ý¸Qûíù-w†;KBÅçÖµgÞ´Å`Ž51ÙŠQ”†rl'n¥»¿4Q”TŒaÜÕ7Þ†Û[mõ¿ÒJ’PŒìÖ;Ô/cÊ‚‘b¬Dµanå%)*¡†!Š`ª¸å­§÷Ù,R$J^³r¡e’"ô$jÕþÔ¢ºH¡’Â3ñîî^c’Y–bà²îS6· þȯpÙCæMÐX¿çjö‹I\FnµÞŠ¡E £ˆ0¤y–¤sþ¯þ/Ÿý»Dp¤#„*g3ŒLëq%Åü×󷔌\ñ8Yªa4Ý¥ü!™Ä?“Ü!ÅÀaÜŠÃöòm+Û¤°„6IáÖâÆ‹¶hku°žýf8ç2XåS2g“™vµç a †qY—‰¨]ߥ+Ea&·V[ãø"žî£ÎÜâ[kÔåÖS9 #Ç0ãèÞk!T|,aDrÜtS©}䯻›°z’ÔϯS97–1âOmRF8øEæ¦àŒ í;T!y¼²ewú×S¦Á(âÅ S!´”¬ N É!b‹¨ˆ¤r®û'Y˜@¢9¶SJÖM)敚J,ñ¢îàð_¬9BÁ&¾–”S=——܆U aÕWH”$îEó~^¥lv¶ûÅ ggZ§3£VÛ%¥ÆwX†±¾K"ìMeH5çógµTÁ".Ä# ÀãR$®B”.}¢PZ§³a)NÿiæÉåëÒ³f¥jТ¹Ð ®VtÚ(Í’UI3&X 3=©I1byðï%…¬]·÷qˆ¤ziRüB}zß²iRg㼪P¤"Sñ´ÉÕ’[Ša‚ N£VªOö_G‹Z—5M¡©ápƒd¬5®[0 çn˜T}²-zçâ 1† 1<ÔG­*ZYM†µ6 n’ˆ‚¤²M³y #UÓ©Ž'§&MVÓ¿Ì8 ä{ìQÌ‚¢–òö)Û3æ6“¡f•Ôh{ƪ=LESÉ'>œÂ%…(e‘á”Ê–~dÁíí)7kA'3‚œq†2¥z!²ƒ×d‘a¦]äÙÅ©:þ­æ­+™§Uäbå;rÊ Ä0p‡~a‘t¸YkL÷B¯¸WEõ=£O-a>ŸôÜ|òb\ˆ¤b&È„òêQÂFøaƒYÛK›w~§5í_‹òÉæNÔç/ñÄYÖ‰“Ó©çò×,Ê~v¹ÎÄtmli·k ¦¡aœwo¤SQ¨K[âøšÒõR›òÚ¼3<òej@)PÅV‰òª[9N!Æ(ȥĒÏAB]¹ky¿+0¢“5šB6ž‘+ÞN*xƒÙuº…ª2¹»PeuQ_,@ç|ò 9A²zùy¹}èEi÷¥ÚrKz×HYŸö&þ1R¥ÐqŽTT+uì[×"Å¥‹ª(R `ŠL‰¦± µ>Ä,…£™Þ#ÎÕf Ö’m‰?dÓ ÜRU%ˆK¾‡0â ;—„;‘lÙÔiRì⩌%qö¶øòè-‚}&¹¶èRÊÂVŒWµUT!‘2aC›,I“ý‘¬)æm»|OÉi]1$ûÆ©ÁÄB;ø¿Ìjª%tbho»Q!‚‡RŠ*R•6ò<â¸RÎa_ q†Qå-/Âé«ýÂJ-†ši#¨JÂV„Á‡:4„ÊùÓ/X£jT(sœ2HšÝÆ­]'K'¾æHÑY®2H¸“ãXY¥êÜꞺÚä,¯n!³£J…™Ã )0Á@DJ–jBmÛq¸‹¥ _M“á'–lfSPJÒ¹k\—eº‡3¹Œ¤sbDÊOW Ñ»† )È(åYä=ÈŒ.%m7nˆ5è’C·?VÒÿXN k¾“ÄvÊ„1FÒú ‚*„oÈ¿†²t¦’Ý?K$û5ò™ZRôÜ…VpŽdàŽýF˜ŽÇGcR…©3ziåÄΓ†©ÿª-ë»FÈ˶ri«êÚô‹nˆ‘;ð!\V)’so ¤ö‘ÌR±ÜÀ¢„-æ+®r sX&ôš5ÛÍY-ýµ53bAµHÓ.¨J‰v8É“‚Ù2Γ¢øo?ÜZ|BŠÎ¨"%:LúW$º­›Ÿ–•Ѭ[Æ);õMú@ý1þÀÿ€Óïô§ÿ¶Ðƒ€ag½ ü?˜Ê(™ý¥O"\$‡=Q ½ÌÖ&&¹2íZÄ«vËxo—qÔÊQÇ ¢'èL½%9ŒPãus¬Õ¶Ì¢#ÊÒue¶òÔÈW¼¤­’GêÊaˆ9ŒQ1?Xj5‰L˜â9Ñj­Zß²¥âc^©¿C1ÓQ È:Ì~Ó÷*±Êu;¹ y&’J8‹OµXBwÄô–ƒ¾¨Jˆçaõ.—_V ¢ˆs&òSçÛ ‡erµx¥W=M)~¶¡‘¬Y¢ïß±$GþÏñ&ýïá‚2XŸÃ9[J›rŒ¯è¾m"jS_Þ‰"Ù¥f,™ºNÊѸøÆ=H—2«’Âý7y è3wÏí!Ôæm’¤@0ij~-D¢Ù°çíN„z!Už‹G­z¨Œ¸Jâ;'ÈÚuœ‰Tf72㽓¥® Wlir0Þ×*©“vˆ¼½ã+§•\÷s9Ò“9D«6¥8‚òº¿¶SñIF:Óë‹gIñx¿ÄIågé¼dýr|Y‡?Õ,µåªß.)5üb>L*©2 •æˆ0(Í}ë””¢"ü‡å¢þ¿JyiKŠJ:½²sjÑä¯4*T Tk#£íÖÏl"TE“n­/éŸóÍY¸‡L–ëŠôCKÌ2ª0‹ë•Wñ;¦œÇAªû1 wÛ-38‰–eÕý6ÂKq›°©dñÏ¿õ<ÎL&ÕÖ¤*mÅ 6Óóp¨@›ÓȾ…G*¶jx¨ÔŒ[–¼Ä9܈yìP®Ýê_Ê-§¯#…Åp”B%°G ‚‹u‘Õ!Cz=µ%YÑÌ_Q.ÿ67­¬r2ëiSuo*Éþ¦x§gD÷tc‘Š9±¿P†”ˆÞ§ÚÚEfa?_)BV¼NN£ˆ@‰Ì6K®N­ÑxËsóõOªÔ6íÌJ¿RÆ[ ãtÌJ•_¾!”Q #¶õOÍ_&ÿ-kªŒçµû°IÙµôGiNeee0²Œ‚Ù…ÎÔÝQÜ‹¼}[aíÆc!…>S1ª•ã”±ÙÑÖÿfÇ!Õ,ìOlTo½+Cˆ1£cÍi;¼ŒÉâUJ©ÏRN…Ì<‹wVŸ*˜£ªäÚ“‰ÒvÙLtûî¦1y¯¯ÖaVJß…å;± ›DC=üja®Uôäz¿¯ŽCÿ´„R²*m/ÝSêJ­ñ¹‰]‘ž¤Ö,Ò&!œj7*¦r™É"©„K}ãòÄ FªW”ý®U%EÒŸ)Y©´©’QR*í¬YÎõzÑDsôMVŸ•‘=ÊŠˆ´]_ÆÔŒºÍ§«µìÜ2HÙ¤&"›X•Ï5Ï"d„5¾”Çn²¡“:ÍÄWvw2ºÓmÑ,¨)$B•ðI+–§žù­Œ©†aµ´Ø…iØÄGgT¨®N1L BªZšß»åq Wnêý°Jý¶A9”†*/íñ6¾J¿jqU+¿‹Ä_3ŠØóþêÑ$A å0¤#í/6­†§ ⹬Dm6쎫攦CüÛz±¹ŸlõÄ>„Âò|ËSæ)ê׫{þ&QFU!™•4•eÿî¢ÚŒ¬âÓ²)„#žò“˜ÚV‘LÖ0S ¦ìéÓi¶QÈU‰·!˜¶½M Äûöë Ywn©mj±×·ÄyO'×ÂU ¶uÄÇÎ f ¢íçÍtà„Åëþp¨®&JÓ¯&Ž—.׌ùоKI+º>æ·BmË«®9ÐÔ6–S’Ž‚&›è*ÄNjëX¢¡–¦Õ Mæc5èÂŒ„j²iñ\ªËsŽìl#:%uÇ)Ö¨^|'t©g:S÷õ«HšN¹n‚ P™¦›DºÜ1%jSÆQL?£‘Í‚\ÆZ ˆ(ˆUH®#õ©ÅMsÐGÔÆ_%íJUȶ#ã’¶ŸôDsáƒE8ëÒzìÁ Úˆ2¡€Q»ÇÁ¨'dáˆ+ÊÀ3q‡ ô<0BP}Q]”„ Äp$&Âÿ›“E ÜÎv%4A™à¥ -…ClCyísfªZP’Óš,}™”QÎN AC^’²ñÑ…ìäŽeÌ"F’Oª­ÏqаŠ$©‚rqd^¥4lŬª'à˘>RNã|Eî@,;oÄ:6³æMSe~$@ddR!&ÄXR—+2ÀPå*!l ˆÑþŽQø”Â$f¹kMÌ>ÝaC ÄgB¶ß`ÄHHDЊ@!ÐZ@7¢:ÓÕ¡FnÉÛŠਫ਼PBPÀᢡś€ÑÿøÉ¨ÂµoNûñü üZüèý¶þºÿìO³’%çœôP½ûX gÊSÓíÔí˜÷Z]²Ý~óéô¿ÉسPM®©*É+Õìa|0SR*¾òMˆ·—D â¢sŽò6VÙQé}ý{U¹±Pb‘ÓÔºLF“‹zÍjd-ÝJBJ#œ…UY âZÕ%¹:©#¬V¡0šL­­$,ÝYŸøµrŽ`­’¥hyÆ ®`®*­ŒtÒ?Êöù’u%W¯ÕÂãϦä|ÇEbˆCÔg)U3‰±¥…ß#ªÜaEc³- ˜ZÓÚÄaÔSpŒpÀ(ƒ,‚£~Ikÿ§6L’äÀÑ­_Ħ™‚±rÔV#ú(ä1QŒ´ªkɯ·U$Œbý´«ˆr/ \íÖ‹5·IRaLƒ‘ŽmÊrÖúB$Ä£üªr)6k&ÐôMòSZ©â™PYžÔô2œn5b{ÂbòôêW2ûH“‚”QlqT¹IíIW·H å 1†U§m¨-¨~µ°Ô?*ýÊ íÍ×Y.ZãËI²²ÉL9/#±:„q ÎTwR#U¶rÒíΞõsöIÐÂko†–xnb¸O<¤hÉEÍVòUìµS8 ä«UΞk`|ÞË!–ÈŽ¤ª ¦üIxnJ?1›ÔpA_`Œ“øl}\rCÝr­Íõ½K!RÔÑ’cƒ¹!%aË>^”µq«S,R›8/ž––«»f²ý®Ñ‘´ŽCdˆ¤2õi#î)TRØK5è´ˆ’]f n$ÅO–I§µx‰C”c¥K• rêD«QuùÍU'ꢇ w½4Ž=ŸT•×tY[Ü—¿éìù”‹…³i·ð­[“ÄÙЄaUqˆKEÔJ? AŒã1JRÌÖ-û$¡©¬>Ob”a7J¹Ò_A|¶÷Õ-&c¥¹ÊF(F†1h¨ª¥¢™‡F&§'™Ðµ7ÿãÏYéžMÍÑ‹9Néò¡9ôÏbHÎ0A”ŹŽß¿µÒU3Ž•×ô¥:Û-¢Sl­¹îÇ‹‹ö¬¶nÚȦFY^¶dââzqXbHŠ9ª“‡Œ9£ÐW.Ûk‚ß—È;•4‹£ÿ^õ¦Ó«\ ˜¼ê#Ýd£ Æù—ì]v²ç­Bâ§òšŠ1ÇUGAz5òÛôA„c••D)8›É…e«¶SúCÀè ¹¸J.#žQ/âK¶u¼'¦#já[z·á6Òs% »DÖ«%H(Î!Œ6¨5a7¤}~Š‚œ ê;H>R·zX' ‚u'ËåSœ¡*HdK±%’SÈõ{à ¥•Û›"=D"ÕÕ)¼ÍÆPÊÓ“ ¡±)vDT÷ö¯É½ÉzõrØ‹DNdÃ4ˆA‘Çã‰T”W®ØÔ®9S(‡sJ‰—¦ Z ‡‰qn\Õqw[¥ ¬ˆÞ˜Ÿfá9 ‹å• *Xg¢úTš*Š£ Ä=,BÐÙ‰J]leˆèŒNh•ùt×â÷ÏÞ¹T¢YÄ‚,ň=†Òœ¾ÊèEz5Q†a]xžÍ6Oâ^¤£ c;:®õבvëæÆ¡|Å©·Ü¤ R¾~cë—Ç rˆ)9¦¨Jç·®­ˆˆ£JjÔ7 äò¬„¿§êÕ;ÇcÆVÕcM”ˆ…²ˆg[”U«µ3U»ÄÓÍ‚iž¦#ŽNfš‹BÈõkO%í¤-ÝÅ"Ù|8¹œ^ã•Ìè¦ÃÛˆæM$‰#(–/6ùª‰%$ÄzSÑLV)\Dª8å_G¡IÍÍj ªÆK«ÝÖ„Q5Oïjy:¤Â/®”‘ ‡j¼ÏF«®c.ÓêJ¢ªeRYTŽî²‹VqÒ¢0VéäSVãT»D"­Ê¿äÍ=_nNáøzyu7â ãaìT©òŸÿ™UÎ#Ü–»y,UBLi ÏÏNÌÅ;9Ræz—ñiuAžËäâøƒÊ|Ôv;ˆ)°Øç¢w¥†!ÉÄ9ÿ–­N&" äõÕß´°RUÍ"&“o¹É‹„ÂʶGÑhbЄº•R§ ¯—,Ë—%×~Ÿš÷Ìb•XëĪ{©_'¢ñr.hñv!G³k‰³Ø—' c4Ê·/'}Ò 9ÍDl"kiWÜþ‚S-u¾æn¥#9‹b,„k¦Q3N>“èB'ÂE[!®ôªìϾ{X5 &­‰d …þh2Ú5+–$ã™óXîQH1zO•Û(R‘øUt[Y|¦Á‰L3݉)½.åö¶’¸Š=¸¸‹s"çk™å›»ËMfPp`êÝwHKì±>?øt˜ŠÎV×)é×ÜY$DM1DDôh¢ÈU”µaJ’JŒ*—ÁöŠ„Žgïõ£a×+G~žZ›¬ÓaÀ9Éì9e…µbÉm\¸„9UVÅ‘¥kT¹”Ör«·íŽp†’žüÙ%?]«WÚWŠÄ½Å"j_ìMi&Eær6¶Ì»¤!CŽd=–šÐвŋKL;JL™æd³|‰Ñ®ÒÄFÔV¯væ¾|%ÈÅîF•nĽ»ÈÝeadj”Ây郶´‚ŸL0jÒ—<]Èø-ƒL”FAÒQuòW(µ%‚»»ý6ši_/ôȴȶœ -å0UáÞí\Sävhº2Ö£žó|”ÁAQAFXgS·×æ’4$h,Ña΋¨0€î Æ-¬5¼IôÞRbÐEç$ØtºÊg°ær‰1 ù6îhÓΔJÌ·&Œ‰ry‘Ï›xx9I®, !%ž=¿$ÒáÆÄa#ÂÅ‚-ŠSzùµ™¨X$Z‚•NÛðzh†bé4`^¨Ë¶³ïóT-F(P†|=b™•ï £‡ ²M‰ÓÚaÙyÌôº­&Ûn8)ŒsUƒ_I)M_ég–u5ÜËsª.šL‘%j!´R£3¼³œ†gŒÀH|3 $¡‹Ó€ Ê&’x4Ò^46·aëXƒˆU+»#;Ž®iÃ'P*‘,x´ì&t_XX5áÀ ð“Æ' Ån'Q©‚¡£ÌéJy­˜5ü¡A V°¨ƒ„ëA"BÍü”ìáÄ@+ŽÎe%åçê®Ð²>¥¬¥,´e6äc`¥!V­N_WOÔsÂ¥ ¢§¸ám‰Ä<p` |`#PG 0 ?qÇÀ~ÿøjÓ¡"O²QáÒ§Õq6 %á]¥¶u¡.ªÑÜB?Ö]g@³Í11¶ÃQºp³áÉb…#[òw£È6fX,- •¿Î""õ|¶ÓbX‹@V¡;y›G <•T×ÄéðÃ:!’ßøÒÄÑ–t@Þî˜N£i@Ÿïÿñ_ö§ú×ýd´Õpéò¿ ÏËL)Á)Œ½5îp0^ÈÃqS˜OùY¨ÐHØ ÅyRPÜÂC7Œ¥Ú°!ߘoaÀ§`·Šf:\0?®„2b03utʱH.ÍB Q8jœ3ÜÁ³B¤0B¸ã‘Dg§a¬Pp9ŠTp¦0ÈÕÓø)űˆM Êè*9,#¡#o\ƒH­·=˜ƒY 011U«áÊℬ MRѤœDÜlÔübàÇøÈ+“š8Q‹pZ1^Ü40®Sµ`P¬B!* HAðåЀÖŒ!°…ˆÇ¬Ä†B1˜è“X/1z±Ì&W~g|ã±Z]ÈWnèD &3}aå™AD¹™1ÅUg"!1#NÂXåc„c+a0Hð(Ê"ª#0ÄU ÿ1F2¥\,…BÄ‚t[Ÿ2µ?ÔøE D.ÆJ¦)þè›gÄ c çslcDhÂc¸£SSzîBZE«‘]àï¹.:±Q£ˆ¦l—XjÁ ‚ììftɾUÀPJE´= ˜3Œ9œnPøP”`ÄvÝJžS2‘$Òð'„‰ÀÛ°‰”EÍ hAeÊì¥\Š|U®4ìi•W ÄΦˆÁ†@ƒ> x6aƒ  <:æºF ä 8Æ^ý£FzòÑH…H ‚\`áýÈ0I¿{q;oµW&±D!˜‚N ɉ QáÈT#B2L-,ÙØŽÚŒ•FíR0Q‘² —š7|?)˜„ÊŠC?gW¿ÝÛq,°4"›öŒ&%CQFrAØÃ†Q @"ÄruJjƒˆU¤S•uøš„F–‹A (ÎÊÌ„Ê#)0¯Z³(ð²´§Ça¨#0†A ž¾t ƒ@7•MP'E)?ì/wˆõŽó´¦S'!†jEh|/é€LA–'‹'<)y”Äe¬p¹Õ\ßsU†LÜ3á1Ø—ÊcÜŒBòöB8Ê…J?HFóáy`µÈ4¹ÑJœÓ´!ÛŸ˜3uÁI;ÔpBÅ0|8‘›Pý? óMºÁcQ V'b 8"(N튋3êÙifá¢hQâx¬Îð ýd¶;CÀ§é[sɘfd B !Àº0`DØLŽ‚1ôEvâÃÞSœõ¡ †QÓóš˜L 1G>)‚D0!VQJlW3Ñ£ ±`9‚ŠO€3Fp$U⊆äP0”ÑJ¢IÒ¶íΙÌê1AžP¤à8Zã0`H1‡. ¨¸‚—ù«+9 PëÝD1ÅG0bã°Ž C*Ð+±îC719 (ÒÙuŠV+*F ¤C•IŸ 1œeÓ’HŽEB6­ÂvQ]9ñ¡\d/ÁÃD)w8He Õ/!áÊZ Ìr,…¦¶’#÷fqŠEÃf¾\` ŽN¦®n-P‘‘Þ'µÕYнqQ,`I!°“K@`‚r˜ÁÃL‘›e~QàP ¼„B+ Z”W P@`d h1wò1±§ F1]I ÔW²¢BŸkuHJ"ŽˆŒ9R‡‘&BJ)y I4 Ê…tKE†©Ú‰LRõŒCW6©•ÚŸS‡Õ 1Ðå ×j†šPNjŽ¢M Ôô+KC%‘R¸¤b"AH÷áÈ ö’øAH [BHA1¸ÎB r™0‘Â<ý8 œð9_ÌØðBdÕzPÖÿøÉ˜Â¶‡NvÂ@Z $@ xËÿþÓ´!±"ˆJì¸|ì†h+×Û ˜")ŽëßÛÔ"º´ŒîK ”%òJ¬‡jº1H©[&Üœº©ÞMϸÄÎ56I Œƒç \{Xz6ðÇt²ÄMŠ'-*s ÎEQüdÔüBÜf„mQ$Òþ`k’Y“p›k·*vú˜SêdûW5ˆ’S-ÍÖÝZ—NKÞ~CÓ;Š‹ÎIB˜© LQ%Bà A#³I·ÍÔ{&³³=L/lÕ¤¥8Cù›Å݈q”c±?ߺßßCQP¯¿|Ñm‚éݽ/fâ%Ö¨ ç8Žaˆ!Q”Ү‚%Sò™ÇòwÕJ?wIßí^H«Ê5¢Bvò8g¡vŽÂ&·"ºØ§ôæÅI|µ›PÛËÜFó)W2»â "pØ2¹ÓÊ㱞_µ•“U)‰ºMD´©½ïœ©„\öª4f£iõ(Ê!ô™¶Ú7'¼F¨—ÔÐEŽÕ9S”/™)l‘ÜÅEEÌÌA$/­q ƒcýBØ~ôBe}“‰#DJ)‚*:Fr—7qÌü:hý| ±_èN­ÄÏjÑÖ¥4‰ÎgòŒ)]»H˜RÜŠndX´›†¾S,úžD7åiȦÌsݘ”_Š8ƒ;é©i5þíZˆ'MÒQ³ï——Ö¨WêfúàˆB¥C+Y±â©œ’Šó¬Îb©ªYÐÙzñ“6"¦†®n¡u¼¢Xl!VŠá ³¬‚7%õ“ÎJ¦3j¥Ø¶yj¿âneBTº‚Ò2ª½êÏVª]èÒg£iå[.Ê y)ëÚ…Š:ƺ—^ÌŠŽÌ)¹èQH ˆå3MdjfóV•"c½µ»y´ØZdCJ-}ìJý+…UÌ­²AÝ’ÊaÊK-.ƒêøL ­vÑ¿‹ÿ_Êø».^ï°ˆ3=vëe÷ßb³2˜Y Ë„-jЛ®RËÙ—ØJ±“j”w•ðJâTfuDg—d˜¤=ma\„A”Û/7z Èžò•8ÙiÄ!œ—&m2ÿ-níÜOMO[×+¤ï°®J**v­tóªñ"»)Õ]Öqé»—\§kO0´SV5—] ¢vPŒJx‡:ˆZ8}þFl;;ù Ä•·»öò”B·\¸æ©BÊ$†ìºÅM*Të*WDÌZÑ ÓLq[ÿ8ª-Vu±¨™¿Ûfc9ÜÉɧ¡´ô¹èœŒÛj·8¾m7RÑFi²óÒ§z­ƒ'ü«éc§¨è„»,âºH˜¹%yÌv³mý3/˜üÕÊ*­“(;²ªŒ¦A*bú*êj%ä7_ýIV£þE§± Äþ–ŠD¹DÏ&Qí¯‡" ©ktçv1z\Ç¥cŸÉZ"ÅTjè…nÇLÚu-Bú9gÃÑ>ªGZýR…Ò¹‹&8ÆB”ÎUâ•× vróE+VîYWLý\jÛ¢€”žÙzö•W?¶ù–UÔœæ$§Õ«4äKA¯ý×loJÔXŽú%¬¼ËøBæjõ9oÁ 탡ձ¯B0ÂSØB’q(]§”¹”8Èf™~~A ß*+s‚¡?\òH”bz“MOsÖ<ø+ŠNv–â"–”¯S”ÌÜ„©˜t!¨+ÌDÔ£"¦sS‚œÅ²è—âó²ÔlÓ]xâi’"™wúš@ŠœOy™ÆÚZ7¼BíM:æ•'mÏN ¾¤&QJí¥}î²æRSôŸ R Q‘<¦°™þE ÅD>²ŸÍtb¾óðZë¬ãàyROÕ'ô÷%q„?gÊŒ|U:[ƒ§º w¯Òã ¤!.Èù»˜0eE h’·ÞÕ)Ù*ø•£ˆ5j€‚¯–”RòÊW%™J/‘‘Σä¾ûC¹ë´°‹ï%CVNK£:‘¾ÃôÍ;“ÜC¯V‚: @†+Ü¡—/³NìÎR<ê­KQõht)½Dr龦 ‚Týs\‚)¾”½Ä½†J„õ£‹öc²Â´Î(…~Ó/¤î ­sœÅúáÒ¤u¤7â» ÅÅ›÷Ê_šÓr#fá\C¡‹ÈŠâeêA /\Åw¡ó(´^(„SH#§¿°”M…³)¸K áhM¢„É.1][9Iß Ã"‘PÆüÙÌp æ9ª ß’}'òQ'Ü•ÊÄËSÉ“mLŠî^k£•ZaA‘ijö·Y…p¤åÕÉK¯-„Óøpä-; ±yðǧ“u&_E¯­4èìLTܹÙ8C˜CVQN=è4¦<§iGÄw5³+ú&:òü—î7àWuV‚ÿç6gŠé´š2â54Dÿ)F¥ì'˜Q¨ARµ%ˆÛ/?ºJˆµ1Žù‡l-¤"Zø1Í«bgZ¡úƒ™¶k"¡ˆqŠrÌþ'\ÞDí£Õ¯C¼[Öžü ³ß §¨¬#°ªQW}jq8®uA *¤óËÞ{1æÃc%N˜ˆÊ…¥ºIIz²[ (§WU@I>Su)3ˆ­ÆÎG»ç"2ù I(„I QW²Œþ³Z=xÕÌ(¥ÅÅ^‰RžO’¶B „KÑ ] ­®ÚÔÑ‹ƒ‘þèE$¯š,ÅF’P‚<’úiÞbgQ±ë[X‰;U{jÕ|)‰õ' )NÛ…%E¨! SV~qW‹‚©<_ÿn3Kmµ;oÂ5Ì¢µy“TL|¥ÌqRçŒò–J„M˜ï%?Ø…8‰„(黈G…Ñ'qÝ´%¨}JË/ ©Gö–ʆÙGMÁ(•3¨ª‚ˆ: Óª|¯ÝȧÈZRöKOöáOßReŽMffIÈD¼›ŒR%š¤Ä¡¦¯´ˆƒÉ\hGªÍÃ6­ÕÑpBtó.}á“%9·¤ûÚé"‘ÜɤuS6ê³ #ÚŠ3-‡Ò #ÞL ZãçµúN1÷¦‘*¯]ñuéËr V˜Ö®Ó=SsŸ cŒ×N¹\¢ò˜ÛØè1—ÜXŠœ GäBKLó#ÚÆ2-ˆÒ&UC’ç•h!È"œêž•J¢ú[Ÿ|Ýg²¯Ä‹&Õtý&/Ý?¹g×7&&´äqÉÓDR´UõóX§#Ë”«‹Ø@KôË2›¸’¾±êE±WÝôûû„6_Áä7ùIÊU#ÑÒ#•jŒÎ¦/vWÄ‘ºêص¹ù"íoîcdM‹´m¨bÊÛdµyHcŸµl¡ÜDªS½‘?¹ùP¡\†FÿLg—‹ÊwÁ*¦R+ÐõLê|Ü/;XÈUO9;ÜOÛ{Þ+äŸîcú \ æÎKö¢“õÑãßâ€XÚwÈC–é` DjØÈcØ›]x‘%¨Î<󤋢½I#ºŒ)5.#œC™çm4gݶ{{‘ìU)ð§ìü¹!()©r^´Â+ÃþK- R bž‚<ª þPµ³I)êá#µ•µR•vIÑgþÂ-U‘Ÿû®×I¼Šsª“¼]Œ¤i,hסŸ”W^(%{l5BA>,0Q®Iùу †!"R"Û6T ‚kÆ£'cÖ¦ˆšE)Uu2pÌ,j–)/õª}j=7‰Þþ‡üü.#ù°ÕdÊ+{´fä+e¾sõ&[7Ÿ‚”\“²i/$s¤ê†˜_I2«m°FT†YétG)ŽLö~qhN~Ôµ3Vò?ö”Ý ‰PÇ0áaa«ãU€…âäG(Rk šÔSVvô„¥qõ^Â?-F;”ÈwçAˆcù*èýGOíÚÿû.:0‘«¸ˆí”4¢ "Ä”³%DA<{º/yU2TÖA”C¾ŸE?Ãb‘FÓ¿5c Rz2$rù(Q8HbkÚf.l%Éä_(„a–14(Ò4kžãSëïûTy…”â µÉuº<¿áÜ‚~’`¹8£08‘$ØdmµMjis²›“Ñx—MT⫝̸êC8KvéÛâ³á71´£¦)4šlF¡³qLUÙ±xÄ3•CVº±Ì¡Èƒ´!Å|á ¢TQ,¤:¯ÄÓÒa¾™0ÇÃmrñIîÃS”vðã âej·c%’êÍÔB˜L§l›Z†Á¨Òð´”¾u#  H¹nn)ÄÝ9Eta¡Y(”àKÞý"¥~‰Cl…R´Ut¹ ÂÝÚpƒ™^;‰eA®ÐéSõùíkÉ1¥Zñjõ£zmF&‡÷I,S*#½YAL²-OdOF]Õ¤ÎRØÒ+TŠ„÷-P‹×X~–!QÊT²ibE|¹â*ΟÅÏ4½šL÷º]8Å"cÙG hLë… õÒ¿¬Cp`ƒ %%*Éæ(\Þ°.ˆ[›¨-Tîj”çC)sRÞúCQD±31”ÖZÅ_òØJ>ñ_º?’´b!˜T%¿÷L!\!žp®‡’Ã52Sª§" ,…Æ$„ô(†é¨@Úùž˜‹nz!ÁÇb¼¬C#ûÊfÕ÷’Ò!©ë[ýä/9XU8±¢^âÞÅÅ˰Êpû8§£È KÒµÔ¢ªp²–ʦa æÛ%㘧=§Œ†ÌŠV½ž„ß<`”4–=$”£¸ŠÛL˜™E•X9)¤IìÊ›R¤aggW«æôšjÂl’ƹ5Ä}Ecû£éR11?Šn™".£…jWž9\U¦Ÿp˜PçRQÏDàÀg‹w´™xÒNW&•²¼È@+,•™ß­ªËº¿\8Ô᛿©†A?É+šÚ•ì«Ä ˉNU> }=Ëõ‰Z\¨ç:”ƒ°ÑèÆc:4¢»ŠaE­D¶YÓkn´ah¹aꎒçwÖ¥í›Iw³Z‰œë)œîDò,ˆ©RÕrÄ¡¾bUþ—šYŽœ¨ˆaYæ›ùÑ] AØ xZˆf'†ä¢>®|›­ŽŠó¨Ì"n±jh‚5‚Ë=NcÉ _=ˆ5Äœ{; ©i¡ú3TœSÚ¹.ø¤"Ü© e¾ØT´¯g¹È0Ë+ eÍ+¯d’×)±·3¶šGcpï­$Bq‚z(…×N9ÈZ©<±Oe´2B‚J|öSʬžYn™G@UasÔ‚c^,ørM])*¡Aòa]÷ýJ$„²ý‚ÌZZŽ`¯ä) G¸ävu:êo‹æè¢\j>-†Â&`]õTºÌ·ø××2ªD §•ëÙPƒ˜0üi @W™xW*­ME¦ò©\ºÄ$”Z ÊÕ9+²Q%©›Å7-*pW˜‚œ|kE³¿-W5Ÿ‡.dJM°Rû¸÷"V6Ò.}Î×+á!@P! ÑÂ#{•BDkJV_°ÅìyÉSþ…‘ * 9ËPT<©œcëc9رrHÖ„÷µ­ðCQ{È}“l\k%ÅiÜ*b ¦žVÚ ìŒl¡Rmû{û¥Eâ^–fJY-$7­Ê×w<ºŒÔã…b½7?™ŽìçP†)»•+zPÞéþéín\’ÒQµ¡6Ž5r?0åR"I.È)RªSlÇûšAœK “öXö”9ë5ºisÅ~’¨Lø u„¨„røS®:ß&y"ìPˆ~CAŸ<¥Bj8P€Š NˆêžêôLä%ÖÏ1>‘²7å@±$àŸH‰gúÅQ)Œ&‰È"¹œVñ¡šS¼:ÑsIÂÒ‡árb ú/ÍrHÜ*ÌKTô%)D"¤¦;²¨Ÿó0‡T;…ÚÕhÈ«]=ú¶MW„wYN4BدŤֽ†œ†Ms˜-1ØZÔDQ2)µ‹a¥å_¹ÙÔ@„æ (V)y¼ˆ º½V¬&p¹†2›šI|¥p-åÖ7Ëed»uéªPÎîÅVb-¤ÂLŸŽ¸1çDE),o·`k)y3 %0ìtù•*E$èt2½Äõ˜–bJ´ö4™,¢ˆö¸)‹%«HÑâF#0ÖSóœ0褺{*È&¬˜©•‹Ós[D9UwUË#䢶œ)2ñWµF"`ŠÛK‰²ám”‘–KÓŲeG£ ÅpÅŠ‹FŠ.*fò”#E!šCIæÔZ2H5’_Ù©Å3”ÕLûPOÚø*XC(«„õ'‡U“™šKc*­Óv'òwêì: ˆ1Gú"ir²`•#o1Ä*Hz×} º*õkšD&"³1"‰0“¤d+¼åQ‘fȉˆ!ï²ePÙÉ·±óvòv[ßçW³¸¨R£5QÒBq• –C±X!ÈA/bs «²š"ª•ÙWHªbvO¥4õÇô¿Õ$'z³´„h¢ˆª]-ìÉc»S=% Û-‚†”UØ\’ºH­/žÖ$Ä!„BµJ”}O+ZQ~,J NÍŽM;LßvMJå‚$5¶3 ¬ ·âxQ½ËŽÔ.nÓ©+I4súrџňqGYUîZ’è9B¨‹CQâc—œó‰Ü¶éäÛ¡ rb,–“÷9ˆcÙœWB —2”ú³’Ž !•†Ì7“‹õÿ·ã»#ì •\<ÆÅ¥ë)¡K˜Ò’Í+j¶ÝˆeèX«ÿøÉˆÂ·"Nø!÷çøø…øùùRùƒùŒ³’}Ï ?uuÆzÀbˆôT•žÎRãQµzzÙ‰.í{õIç~X¼µá3o¯×„ä_AéCµ\ÖE*”ÉU³Ùc’c¤ÇSý7 Z<ªšRæ¶¢»+¡ÿOõ¦™Äj‹˜…ÆÈªë"UÄæ[qDn¨Îäµ*%øNJ£¿¸âh‘9¯Ijʬ´K á(”z³§Ù'ì ÎŒ¢›—%ˆ§3ŽPÂ'ÃZȼy]Ų툾K%mïg­š$ŸDÂb»q´GqŽPŽëâÕeQ(¢³á*L·X¨«•R`N´¿QYÍ®'M©Çt V±Q\OÊ>Ód+,’&S*æ ªÚI­¸rYUTr_éry©â¨YDpœ4®Ò·¤NÕÕÕÜLnD\¬îAQÓbŒ3s…lëÇÄÍæú!Rõ<ƒ^¸É}õ¥%îDvBQL­u—ÊV9q–B¡É!¥ â3¯ËËõUSÜØ„õsu±ü6ž­Ú2˜µÙyiÄ{¶º±‘Å(èoÛB•Å[èNBPõSˆŸ]%P”Õ%ej­1©a4ï";*ç޽ÝL =R‘õ eÆ!aJbÝ‘ÖJN…jÈ{®Òsңܭæ¶Ry¢ç™{ýŒ&Œ‚ Œ5ÏÑNŠ@!^_ê¶’çiˇnë^¹½µç.¥¼žÓ ¢' 䨖)|o·½"8c0êJÉè^ï8‰WÜ“uòdÂ=Æ1i‡•õ<„\UbsÎÖ“9¼7®¥±'¶\ºîf"‘‚BAd6"¨¨RÚCtü¦+Ù´œø.?ô¶|{ÏùúA5¤AE$wJ¤‹‰.HA‘¢Bed¡åO*TNòœ"ñŒ¦wÊU¨Íù_IžÆ<Çì-c(CcOCÒ“s›ºbr·‹B¡ÓÏoZõŸrêF.ïr#Àˆ)“#M—)‰È÷¦=5ˆf¡`–W¥ºi­ŠeZ2kaE_ ŠˆBù”Ž*sÄ÷bµ·uiY]ÜzméJª‘ß‹­÷ÍDô%DGc»®Õd&<½ä:]XšÞGìQ›º’3˜ÚãøÕö3 ©¥ºõ1Õ ì…¢±-%Ak@ ‚߈i ŒX†.å¯Ö†Ñ†+ Ž^Öv6WZ])êI$ ,ÙMýHËRsEcW°f£Ù‘®S3ŽºD9ˆÞN´ (ò½[êŒwS‰"s“uðgcòßÂu¤5UŽyMFÍu*ªRyÚRÒs]QKü®˜‹ å¹K_äÓùʉµ*ˬÝê.‰Lú”ÉK2:)\T+!˜AÖb´@Ôì)Ù<š¸¹ŒcѾ™²TÙ{÷ñ‹ôÖ9êGŒl+Î¥Z—Y˜ƒ`ÁJï‰!öü¿Ë毎ô¯¢Ÿ ü~½™÷Wz„ÔµÐ$,¦n5Ñ2ùŠgC¥TØm±ì,‚±énSÓÞF¡çÇœõ1ˆÜåF$æ¯Dáaâü—Ý—Æ$2ëcÈ4YA:(¥E¡ ^¡l•ÿ¯Ö75~Y³=w‚—*d ð‚ðœÏ„AéFµuºƒ&\BêÄñ$¿QÅO±L¬ÂbðääÁ„M¶í¨zsº*-VÛ1èŽ&)ÈŸ&ÑOL jœZ5õO›g%„¢­ê$ɦMÜ>äÚݶs“ÓÙ–¦S%…&øÎåiLÏÛ),#Ù“WQö…ºo‘W±³èjà]E'æUhœl3¡•H˜)쬔cCœA¤äU^ÙMFì[­[·ŸD½þÇò—i¸øî1Y Ô«Ñ)‹1Të.¿&®XIÌ¢/ æÝÄ#ò·Ó„YŠ&ÑœåÙšdF¬\f¡¾¹dâS-„ÞôÙ¬+)1Q8‘\qÈJJ’!†H‰î[WéËêÊ‹!È\Ä×s9Ÿ¶%j7'ê¡’‚-i÷Ój”ƒÆDâ’ÃþÙêÍ…Ô²j·‘5,N|BòÙ¼ËN•ï¡;ÎAEÊ­ËÄc%PE&X„c³­èNe€Ø€}`F&€ ò£´ ô߀ioh,„oâ†e3é¬AÅJ¥H)Y1˜ìËøè¯}ÂÏ?ÛuÛ2ûõÒocf'úÒÜSJAÄ竈G>ÈÂ*ÕE¢*úWº’%EõÝfÉ/¶v”Ú™ODpɅ̰A òÊ]qŒ©É¸bzÞNæÔWYð^âøû„[н'Ìäq:¸’åi¦¢L¥+*xW|–©¥j‚­Íl«œí%=Wù¨DÒbÛÇUõ­œgêZŒŒÚAPJÈ›îáE¡§ D˜˜©œÊèGÙ™t¸ÕÎ?=ío¡ ^ÑZåÄDy4;”¨­Æ!ϳŽ!ÍtR¥O¨\D3ÙК”ê «ŠÂÚ׺Rkzи*<¼„1ëåÄûsõÊ*±6¤ ”ë„qÈÙû*ã~ØpƒZg¬Œ’o"bòM=šb|½§lî%¾a ­MïæªåJ¾\—B2˜„×· PŒu§寲·cÍÛ…=oLr·UUí«´œEeYHïC3!Y„[•yÖ‡m}•=Üvyây(UÚûçû‰‘j"HÓä¼D²Xž¤ÍÔÌ‘rÈC¹Y -ìÆ!¾sY+™9›} ÛžŠ¨D©Ïç!’7ílk!¨{ç´É”­h¹Šr*HŠ& ¡ÇY$Er#°@¨sKg[ÏmÂÉí™Ð¶×á)ø9WÒª"²H#4®q c\ÛC”NÛÕlê59ÕÝ©I‘-(F/™Ë­D6•Ù^ø‹›Ì2#Ø‚¸jÞ„rr…]>é¦1̲…r‡çRÑäP¨oÛÍ«©OÄϘ>“ö-Ÿh³v-‰‡³XÇ4ŠR9 ù`‚2¹f0„—²sÊÚköÑÂû5•¨ÁoòÎÔ4œ† %»Š¾Ï*]>ˆV"ÌWŽv_=,Š#T¤c¬Ö¡^Âc­Z·W§Ã:šÜ¤(Ýß§ìò‘ub¸OìÆ<ç1‹!IGݦ)‚Ô\b)mB03vwÈ" ÔËèK!(”ÝÖz¬NíªÛköÔIèçe(TÆhŽuyŒ #§¬á$­ªÉ_ü!+ö¬YjR¾ìée…í¯E‘nç"˜!ùyS®ö ÕÁt¶J* %=gsî•Õ~Ìþ·2T[M"å7£2væ)mÙ肊\¦Ø8¦’ˆ«%;Õ¸¦;L»a䦠coÍOpÒɨ©È©!1ÿÑœ!“vŒ)ÊbÄ©H¤Ì Ã2MáŽú‹ÝL ‰lµö¶êÜ;«D›¬ô©Ô"4c•¹LV*ìS»Uî1 ±8åbÓ–3ñ;š­W{÷ϳý®öuã„%’²‰M霖{˜¢+(–Ε‰8ˆ#9õ8d‘9ÛS“ŸvÆÂ«¡¹l5…ýE;ÕKì¬âƒ"Œ¡Äd#•ñèQÐgÕ·Æù:nɳîˆôykuêS8ƒ©ï¤ Îì4SˆFQÊÁF­ΦAQªÎ«3`ŸBÙ^E —Ö¸B¢ÏÝÞô¬½EÖ+²·’f²6îÊgljŽ!L´(B¹’ˆK” Å##Ä'úbn¶­è»æöûYÌ–éw›‰û"v¾!Ôf(£#ŸV̲ˆ«’$R2•©Ÿ¶§Í‹’._X›[Õ:’â;=§/ö\R°Ë•9ts+AB™¥j‘ŠOÿD7žèžo¦U„-Y•.|µokö9ÂŒ·&¥)»z·JO³é]nøÄ ˆDþR½Ìâ–BÆB&¶¤õ¥5©¤ãç'5{äÿ§j¥Ôœý„ÉÊ¢a_•UÝÁD3Š¥;÷e¶™Y?Z¼~ÜÖòWøš}ÏŒÇÔÅÊ!Ä0â‘›Ëbg§Ðf!Š%µLäMfRÓRV±v&'XõIíôÆ‘.†dýÿÚÔ¯ÌlßõzC$çQU9eb†%ˆFÄ# iÖY„§¯á¹ûþ^Ã] ëŸFcUiqhtœs3•޾¬´ê®q"•Ó¹X” -Ï"á<}ó~¶95tõî'ÕÈ“2Tœ*pe;cHÜIc b±LLæÒ9,U³v-¾¸Ü:”~¡õSí³K-5îW+)xÝ¥ü9=ѵ|ŒC˜ì;ÌÞ½C,vUÛxÌ¢ ŒìBbîÒ£ãÓ$î|ìjSþ»ô6ặòùÞ*ˆ#”aPÉëO9J0"ŽÊr‰ÍÏ'µdêO±mBÔº¤¯RÕÎÖ¡–.Ôqc9‘(Õu”Ž^jwHüš¨BaçÓê!ˆ¾íWG&’ZTÚ¼Vǵ,Cap¥Ú¦ýd'²Êr˜ŒäZ•ž2`‹©®ÂaLVg-)nËsí\[áêµÖü®[0˜v½JJ1’*F:H„e*qd7œgE)ži*&cgJ!õ]ÿÙl8šF3Q‹´j§•¬uCÝrDÒUüWqpE±P¯d<ˆ–n'/º²µMca«•Ögºó–ˆJ’RjÎa[ÅÆ£ aÝŽÆ\WíºéS ‹ŒWXÏÌ«Âpµ ò•3ݲúýk¿•OÖ%©†=[߬VW2»Œš©ÄL1Ì0ã¡‘u5|‚]s)˜jÜ_ö…ë‹&Ó,ljn”Š:èÍŒ\R(†"¨FJ%,ëf(æó>'ªShÈٮˈJi©cã!(.³\ ص|m3™‰FqĪñD@îÅl£*³‡Ëq1;MzÒClº'¾žŠ]zàŸEj/1ɆÉGRŠƒ1DjáyXraÈÔ]ÜìÆ•÷޽ʼݼ¯km½J¦®[îN3'P¨R¡± ÄUÅjU¥ÅöC ¶)²Eü=âÌÿŒMý¥kí»iìÃê½Ø´zHá¤jr„K˜B)›ÑTޱccK@9OÿøÉ˜Â¸­Nþ¹ÿ(?y¿²Ï×ìÛø ýL´ lÝèhpx$„_ã†}G2ØgÇÿÖlûjåk«]%8‡•?}Ó± çEtBº:ÄC‡sˆÂ’d|—3VªÛLëá2^¡{¼ÅºÉ!-Wá DE{²Ê1Ø©E ¦M¹,Cyi~CØM¢°ÆÒv)z•Û]7,-"Õeÿ¶ª Ž–fû‘†8„H6ƒph ƒte±aò‰aÊ/U‡uÔº£¢,3¾vqÞZÃ"–AÆ„ W8"¡Z ¶9š `”J¥*¡¡áL‚2jõÝ•tOâËA† ž—H!#Æ g"p„ CS’d®zОM()*4§¨hHP^D£r(Ffoࡌq¼1 Ã4ê⣔c¾E¬†F¡HKÓƒÚSpgåT‰Ç(¤äQ• 5˜´Ê!1¨•áÜ£¶qÏqÌqN*F2âA1e‘0 q¿!a€! 4!„W Pͺƅ~…þ ô9iÕ­ÔG9J)lÇÌ}‚¤Šc „N¦¤D1‚! F ‚ˆîÔ[¡%P¥(ã xqåpÊDq§ VGDâ{yM %Ì@” L\hBt‚˜+XNŒœLV/-8ÇÉIêtH#†eh=â£6D„jJ¤C!äH™, œ¤Þõpè‡ëEêÿHo‚ˆ©·Ž0Æà 'pÕ`ˆ`Ge.ܽëöÛd¨Sžˆ)¨S “©Š\±;?Ì¢ÑHC@I™ Øa¶ïÈã'g ÅU0dà îÙðU)È ß™ÐDB[æ¥ F ‚@üØÊîAÂ$/C†ç3 ¤äe›¶;Ù„ˆj#Ûòxƒ@CT!IÆ0fJF¥4 ˆBœÔ8“g£ò‘ÎR Cç°C ŒàTì¤sŠ÷› HìØQ†n¢/(.ˆÌtÒÿ3”“!¢Šø0aÚò´|¡X4 j°­z6= P€Ž# ´½…Háã‘H¥ÞWQN²¿´Ês@aH|\#„„b(hPC† €¼œ .UtüÖk¸q‡Q‹WL)©ö Á®i„/nAðãfÄ'"0Õ!É ¤ñÅ)c×Ôˆ¥¨1vfÎhØW^Sq¨[øÁ¬¤)®&jhv‹@Ü Ö_N2Æ òfÊ”TºÕ .¾±Ñ ±Âà "vT  ˆCÓ `ÉaŠï_7âw@¬$Ãx¥vyc Uá À0B¥ÃvŒhˆrÔ4e³H·A·ùA$-S^ÔÔk÷×Ö•¨äL´„gtµIz¾ŠÚe"袎¨Í§–ÉC3껑*21Ì_+Óx­"HŽZi¦oK}>‹}~Úèm2ƒh_T¡uåVMwÎÞP‰ç?‘µ „ ›h¥« D&kb%¼j¢=¾Bd8J/`W BHïš¶´"9ŽŠEUÜ~K.¹¸¶Dk\ÔÅÌÇÒy¼vs–L2ö:ܬÛÄ©™3‹•èåò—ýЫ´Ž1œºÉ[6~zXM£P¾YÔÄE>5$Õ){Ê™†Ù–V&Hz—'(d:S˜TQUW/ùêÊ/kÙ·Q¦éyæ_ëʈÔÚˆ0‡]tBªœ¢>Ðä1 Jk(bL^Q5ш/5NÑk´ãÔ~ÊSy[èbNΔ¯2ËEª-JÝò”eº×dÒ9âQ‹R5FZmg¥jÌf¢! Í$M¤³&Ó¨ˆûF âníBÙ±žøä¦z™vŒciˆ­âOÃ.Ó‰¹·2àøUïÇ›ü2“I±‰ ‡Iuu“NÏaŽíjï–:Qõæ§\ƒÔ]RU}"i= YL_$ƒ¯+§ÒS£·l.Ôis.í*!©–Ç–Gû¬bn0)Íîää0E®®y \u¹¾ÑMÒuU»½Búº“T¦XCgy‹w1†2¨·° Ä\VëažÈ! 6¿aF"[‰']EãºïLu0Â#–¤Lʘ”A¾õæˆéNvŠ6 R ø®˜f<ݪÅÉ ”0#u¯ErËN´Ë>r¾–¬ÿƒ…%'Æ)_ÑZÔHÈe™ [91]äß\[(lÝ0ù¡|…(׳£¤äa8AKRÎÕê©ÑÚ*™2ÆüC-wri!û³IJzÛp+–£/Xô0FzÐe(PKYœØ¦M¸Cê½ËH«–÷ZÍ;öbš½R<ˆ[×»¼f /Ð3!(ÿöq’ßJþíøS‘~³œ¯üY¾Á†Ê¤ÄôÝþ«Æ ˆiêÅ~‘m¶¢ÿ*0¶‘HÍ®Jô¥~Ó™-‚®×ÓÔ@Änb?pÈEmSmí6c-¥¢Dâ"ý.¤&¯Lwõ ·s±Ð¤í9Ò—y©žôÿÿ{;bÐÄïãÉ\™0æåš_!Ч~Tt¾$Ç,©U¤ ¯ÄÒý,›á5½*ŸHAœ™S)/¬mÉHŒ)—B‹ör…lÊ2å+¾vbMäw¹Q>SKœÂî«­Š8½–@²há›ÐƦì)›i˜.ÓþzÌb,j)št*J'{hç)¤J–d5¸ÔÆ3¥5£ÒÑAÈÒ\ªšQ+Š3„½•{|e{(ÛI»ou ‰3²Ê)Y(zfŒúùŸr#.9xµQhN†Ì 2IZ©Tå]Ùˆ~졤©ŠIpË<µ0î]g?MIP"O?P…© a Ãï#»yÛ¼mÒFFXÕ–š[ŠTkPt‰4áC.°‰.G#°ƒºYˆL éJûm§â%›Èi0¥$K˨nB)½XêµÙö²hWTð¼œ`‰&NÔš¥C«£DðFRÓ…)žÛi„[l†y½Ä¨«¬~Í­–zîvˆ*1kDékâ“‚ÄÃ+ƒcÃg7ÞBmÁöìäÅeŠC¯D'Þª!œ·ÜI]yÑJEÖ_CUÿÂPø×Ï—²ö]gS§¡4‹e©%,Š¡—ÌY^‡h‡«q!"¶ˆ²*‡Ñs$¬½/ž«þ/³qK"*\GÍÖ¸ÚÒsk¼­¦IWý§6Q¤I VD·‰bݨ¬0¯RH–s6e·+”ü‚ÒGR"¤ˆŒ*uù¹I€¡ºuÝ%í% ‹Ôs1J÷Eü%E©þ‘¸&p–KÊ,å± ™·ÂH’·´Í#F”·Y #r,‹AU£ûšrUuËw£HÈ¢ë¾Bã_/!ì/+èùïI Ú·B%D20‚ÈŲ cÌj÷"co¤¡u›xü>lž_'`–JQêu‘‹C*Ê-кd0Ê(Eˆõ!n¥¢6ü’ ug~-ÖSUVÓ1rÙ5ÊHi ôä©Ì²’¦¥¶sÈW¹¹ê:ÌK·Æ<ÅK.‘¦RYŠ‚–GΠº´ ±E¢þN~3Ü_ºdˆ•5‹Szè¾W¹XçiJšÄ#P„!înµ¯J%Ë1\ä3ª”EÃløkÙI?JÇY®Ìô&«­“ !C”å{ úƒ×qxŽÒ¢%Ê>¿t„ðø~¾ûÈnã/äG-Ñýš¤œ×Z Éíª[5¤[eRNœD¢ób˜IH6"S^VW˜I‚Q®˜NBª"UþÒ a|¼š¨å µñ¢±_˜–M~¦S [»4Æ`‰DikkÚY¸+zf )!S˜_…⣚øî ¬έ:HoNCXºqd^yRÚUÛž%_ÇÌ%OI1êFÜËØ™îQÊ 8†ç0ƒõ¬[OW¤F„Vñ„GR™ÛDjñ:¤|¸³Ÿ¬K»ú]ˆtQQ.˜õ‹[õ^¦¹ã¿9HDYžGÁÐê\ì‰D0€Ä1®æ_Qk%bW:(–OÃåE";º—4®ICg!Gc6ö"ø¢UWŽøCæÞJf&¥à³f Ë¢K#1EC.6kÌË1Æ6U¼ùZef(EÓæÞhI_ÓmZ?¤AN& _.•—¦RCˆr†!`!É=„ϬÕï%KTd¸ôhñä‡0Püc 1ƽ×ÇšzÁûSÒ ‹r388RÈIìºÄíÞ©q?EjbÎMq^â{°Ä+Ç!¹”& \î”ç]žËþíSþ\âÞŠ”.䵡f$Wˆ5L©/ÉmàσÇI€3š»:°åEâíúDó_#Ü5š˜C—;¼BÜÔ/e‚¤É~ŠDÏ©wTTåÒÿÔxnÐG è/“ …KtÄÔ ø‚„:Dõ`Aekên'3mÄ!-ÍÃËáRX¶zPÈW= ^€ ÞiC‚À³þÿ K´ˆ6ì±R«×í":-å VòÜŠ€¤;½†,Žq®®S\ÍHäP^,-gÃê N™Jˆ29ðòIÏ3ÝQx¦8â‡4þÁÒÜ{Ǧ“=e‰4PŠÿ EIëE’~ 4kw’B=Ú‚„N,!è´9~øœj) aý3¹œÖKT²HC¤4¢ÌS„1×þL-0™†œHªtÊ£ ¾ëO‰¢êhèA& ¡òÿø!Z/¨Pa…P†1†<öu¼ÂX5i7•D ‰BêCÆ¡C°I†Ÿ6iŬ‚2J'¤¤UˆKÊJUY°%˜×’Û¥?ÆÖ¦ŽšµO”ŠáA]”„Màí–Û”T)p“l$ {AIy·hï rŒÙA$d$€@p<5 9Ä¥@h³|ªVK§[I&-–7°ò$ï•CÄêQCЧ)VÉ®VŽAÎ,ëÒ ±%’~sN6¦!&¾ðY N´BnŽT¯ºG0 )À$5AŒZÁ­ ³7 v)ãÃĨ(}ÙDA .K&µ)¡â­Ö³"J!Xâˆ-J-…Ü×®ögèü¡>ŒZ!×É)0‘Ì*ù%ɵ}ËH'B¨‚Ë€¶¯èè&4ZÄY¸ŠŠª·“BtšÇBuœL„ÅY½‘-8¶m_êäBJWª©J´~.1Î0päü”±ZâW$öÒTÆß…dÈâO\Ë"@ÊVÑ®çK€€€&ˆ”·- šBÔÄ)9-ƒqò¹Všë±ëñðdf±äb8wu ®õÕCøY¬ÓÚ1¤J‘=¨üE\ÁtùeâªI4ÅKÂ!@P€ÁàxYâ±`iâ,ÿA‹5O ü€uJÒt @áXIëClžMšñFÌ$Êdæ:ÅSY–¶‹¬ÅË6nPÛöuÕÅÓC©XEBuÈ“cl¤jÈ/-ó¤YC }ò,nÐ],D…Û‡vŠ3¨O}úÓKª¸k´f%‡“G»ãI\½d¹+QïSDš‘à ʲQ©Àëª ° CSˆÁ(ØUä±y˜±¾mSK"õã'¢_Э3˜ (sD²Š¸ÇÞVAN/3ÍðÓø!#Ó… I")Yô|6DIÀÀ –ÀQuŸÚèTd©,¥½¾¡A¥ê%í"1¶ŽÞQ²‡„[Š ªXétयwKj´ÿY^NöÆ­û­µd%äâæ{ÉPQÊ`ÀHÒS¥ˆÑç…Š'õ¦K”!«ÑÞ"Œ XäÞ²¸%´©|Ê’N4g 2Ôª)HÙx›ŠbáöÅþ!–ø¨ì\@­ë«[R‚œÄUq Q/ - 9ÁR‘, 4òÏy¦ã‹ÒŽRÈcPIÔZ_¹„Î(²2PIWŽ.T)Í+¥L–­­Vˆ‡‰ÄÀ›‡ž–KoºS 2c(S´)ÌM‡)dôäÂTó¯’B)Eš MŒÕ~¨^¥Š!1—h{ŒÂƒiþ£§ëÑ•0S:]j†¼O—i‚<ÿøÉ˜Â¹ªLÿ}ÿ—¿Á?á/ô?ý°ghC¨áT¿ÒÖQÍùPÍ,Óu5XŠ÷ò£^Påöji”ý'Äü°A.©æ"¬~±ŒÉêb­+œ—<0®“yN­$S”N gíQÔ|‹Ù]ã6QÓ«QTcênmj^ã @´ü)Ñ… XÑ2EŽ¥à&,ª"%þoQB™‰ÂziEó8èOgÄ$¨6Þ‡&~çTœAkänCŸ¥R°YÞSwx´Ùߎ1¢<Ï&ˆR˜jß$’Af‰CB!6ÍèÙ †2H†¨¦,Š«IZ'±JÄ­ðHˆG¯¬q²li%é„Cýà„Bä†|Ú_Êäö $å¼{iS‰v¹(‡-\W¨][Œç1u'ÉMÛ®]] ”ò¦ßþ$Ø—Ygú/ˆ0í?Ó‹I\vÀâ:áG ’:iñª¾= ïœlÁœè³xœ.Œ@]§(×`ã2Cﲺʓ±lÁËö Báyöcx»å˜´¥âTtu¼Zéíi³Ì |«9 d1 rÛ7Év!ŠëV친á&×f,œ©ê)ƒe-ãqlY u?H‹¤àÌNµ] ŠK›BzÐè3XµÔY-ýâSS£ØïðÑ d·Êr¹D*~Q‹%øßD–¥îÅüi§è™å©‚´¢³ë„=®‰f@ûÎÉ´äUR=¡‚FÊgÖT”NÓ‘,î*ê9 ›#VKȘ(åÞï’ þˆ-S-ÜD¡lŽÿ—\aÕÕ£"Äq gläo¯Pš‘16½JáLùø•®¦qô¤SeQécšq®ãQý‹·S½©Ò^¤OçP÷¥fCŒ!/X“í†@R2¬ ®ÔR`¦âHas©ïÚVR®³»[†¾8ãYÕû¬IX~z2*Û Ú~¢][Cm:rrx„Z¹¯G9/Wš"[Âäž„…¾•=‘òþb ƒê“×ÜB¾AdϹ;k GwW Zi÷Æ'Ü¢NdËZn¢ao £hÞ*ùJD²XL9@D¨!B8¹+Ú‡ǘ…tÉPº_Ÿêª¨ä†‹þŸ›§¢á3mic~ÜA‘ªÔ[Dç0ÁtL-kÎCNØ¡j¼Fœ­Ýcº(æ;œs‰cÜUn”À‰;*Él-•¡ð¹MA¾(´ì²DõÚ yrTÃb„5, ®jbS¥³Ö!j»uâ ^b“ªp¢æF!õˆ:TŽcs •åC\PÄ›ÌÝô%òk…šfIWë,t…O®.ל&:Lhât‰ñ´èÍÑbTA\nqE6ˆV*Hv“bXôb¿vÅ¢Öƒb|a+m£s5 {ÁJ²ƒí ‹8‰÷ºÕïäëxF®®ÄÎUÚˆNò ¾(aœtÎìãTÈ*¤*sËIæò=—¢$Šò_‰y^®( ®ŠišÔÿ!ÄŠAw–@OâpÏt"ﵤ–Ô?\Q’Zi’iê:g$ª_A­f#`©CŒG,Ò%YTB^V±‚ip„yK^$•N=ñIeÄ#VúR»Ñ2¹C·6Õ*Dë„-(~éjdöˆŠµÑOÎÜÅ %Q7„¥5 ‹å§Kuä¡h«Œ„¬Oêµyªú+ ªßõ/¢*¾•Œôú _•Ë}+°?ꔚFŠDå¥gäIˆì¦(¥p‘FA¹†*#¦ ZbžÞYMI:Œ´jMª"L>q%tª'Z©R!Q1 ;r4¤!^R^Ÿ²Õ"•P!еµ †1ÓˆC_r¸s½ó‘ü–˨…¥UœL–òâà‰©}Ê\MJÙURV V+üYÞpÅÿstÔJE>Þ‰NÉÅ> ˆÁéa1äß,Aj¨ &e3›Rr·!ÊWÎOrüœå2ÿØY Cê›io–©D"¦IÓwxF‘}°ïuwm8º…5-–âZ̾'? –ŸÂbJHÂJû3‡)ZÄ1²Î|Sˆ&"ÈǪf¡j„ yåïr5ˆ¢­e-Îò{hźxËìHŒ{‰UUÜNÒ—.µT‹`²%½¦B–¥0RQ}hTë6ʼg¸´'P˜Õ•„V¦¿ÖRº¥qg #»•ì”Ú²q #CD@Œüy©>gé:™›0úõÞ|­ñU…Ï#‚¹Î²£LƒJ ðBs(¥úœ–M˜„L?â;É]í4ùl¡&|+eÖeïã“k‹ D˜¬ÆqzY²$¯AWÕÍ‚Û÷øžmd(¬Í§@R°W¡ÚG’6̱L¢‘oM³Ýv»þlýA©,ÒþîqÂ4Beó#Úê±Ræ™J¥¨ø`\¥tŠK>f4¾>á*JÛ-©B˜FÍ* Aˆ×fsƒ$w„5:»ò©DCÐÝn&Ú?ËúK”½OµPÉFüË2¢Š¹*©Â˜b1¿þ«¾“•.”º[`ø¹Ë¶S ¦K¡ìÎC>·¤¤;"{Ý7zKœjTLÉ1väô ÓaèI“Îî9$Lm¡'+ …w»Æ úL¦\êÚŠ„Jt–½unèVívˆë9lŠ!ЦFAFæBûñúÒ!}_á|%úÜL:üÇN'Ûš”‘B¢°Ô³J!FQÐ"¶ýi‡(Ä™æÙ2N´Ò¯F;®SsÅÄÂÑæs·¤oñQ(7pyWw2M_"²‰‚vþd•J„1•n\o"±Ý'9ŠÅ7XÜIfÎÈlÚü» òÛ>‰Ô¡H¶}í-†HD÷3ˆŠ"8V8íTi…ˆ“ ò‚bs²—&š‚RíŠZûZFó]Kd3 õrPeä ºKšÎ$wÑÇÔ§5¥ú[N[”§gjQRŒèÊÞ¬Î2ra7r‹O\â„þ'Ôn.q™3––oi΃¥#š!¤Æv 2BØÝ‰?•­·‰bñhe³Ñßp«ã1\ªE"”Ã`«ô/ŒªUf¡¸¹…ÍߦÜ~úñ{Ÿ¹‰‰mœK”-¦(FN'}Ü|Ì|0ü |Aü»ýR}ÛÙÉŠÍ l=ÈTýL3L ŠÆm¶ÔÂ… P Íbd¾d’6¢Ô—g¼Ýcu2Zê„Fì%èÖxë½cÞÏR¥±˜J×ËnóZ“ u[‰·„¾DBÝB+•bOûrJ×~ éÀ€€®`hµN?Ͽ鬆~Ø@°H€¢~lAN3u~ƒ‘cѼ/Þ$¬!Ì–E¹Þ>M2SHkù¶›h¤^•}s¼FŠ¢YrC˜£ ‚Ë Jm«¬qA Ñ¢hŠ¡:ê”GЋÔZ{V°¬Ú—=¥Ò»ˆJVª:1.`æ %p½A ^ÛÊ.wdõ« ÄL3L÷!ƒ½\õ‚|ÃM»?¬Õ­TñtÕ¸(F^J _è‚5(òAƒ˜vPל D1EÝwbJEë'‹¤Ölœ‚myeÃÚ»"ª8 ¡†p AàM1 %˰’¯-Aâgÿ $ZX‘SEÆb#XäUÛ±5½h8pZI*ºÝ¯ir€ŽaÖñ¯¯, @Ä4È‹…(XO©÷~’`ã­ƒ„'Fš‡Qòýf~Õ^µ.4Û Gì»±gý¸A5ízjB²è¤rì‚=•ª'Ëa jÄcIê”Í2ì„z,®¨¢}HI–) Ÿ±bÐ-bh 8GÔ–ó¦`ÔßÛ’Â/’œ](4Šb 1 {ÔÛ$Ä!èU5ƒ`ÄUÓˆá‚GP¢îaBþVï£DhÓƒ«H0á~ Å,¡W¶0`’mL%—-!æ4‰†ÇŒL-u AůþCÑ"î\úC‚äZ•\e}íCº—r£æËQ„{ô‚Y+JŠSòH½°„ â ¬!åÙˆ$7¼e+ÖŒRb^¾Ž=‡E~ža½ +{T…á6Ì¡²wÝÔ5°PÄb—bɈH}@8cþ\®,ÉZÓjOf-æ(êvp¤vÙ!m-.‹”HÕL–-(ï_°Ëe…3P]1ñf'Üh‡”Ó˜¬F4¡&==&W=úyµŽ¨¹äk¬…*õ f³pRŒ8pÑëF ˆ4•PÎÿQwš… i:Ä4Ê*Él…gajaN‚¸‚V­ÝY]L[_2K  yJ `,Yµº“½’¾UÖÁ"ÐÀí†y g)N0„,X>³Ql%%ŠòëU£T•ýI-|L{¼sá\2Ž/žŠæ ær'mÄa–IºÄüó.tÉ“c‹¨Ý§öU£-£'˜ƒœPr¼p³¹4…¥Û3™ÓÆYl£F)…¦ˆZ'Iv`†1–¢ˆáí©’^tS~¤œóaðh²L0‰÷¹ÄZ—„²þVSïtä*°2Î@à‡À¿¡5 ±;k¦çà”òÖn\—liN«N Œ˜ ¶®\ˆC•iWN–]o rÍ0ÒqŒ‡$îÑ™OÃÌÓÊ8¦¨7åÊ ü‡ÿ8T__%Ò˜ZÒúvˆ£Ÿ/ù^ÊüIqU˜û]©ÞoòäHÓœf(0†JúknHznÌlfS OêžKDY">Š9pPç¬md]°¯I$Œ”©î-z2°ÄŽŒY)ß$òŽJÉáÈâ¾ ‰’ª 0ºZ=SN”Ïä%Šô{<•YOˆ|´'ŸlÐo@„8@ã<„)kìòuÏ‹¦xå©ö «²m¸H– î7â6óëÇ]‚ yŒn}§•\a^‚- %?m¿Ñ¤H¢³]ºbúoôŸ«“b8¢çŽ2‚…£KS–ÒÍb[©¬ÿ‘mÛ ?YД+îWF¨”JÖ¨8d2õ§¨ŠHåº8™j‰—‡0›Q†u*¶ß»JزÄ1œ7}ØüûöÀ¤!jÿ•”š¢j;µ$“ t# ®y‘„c eÔ~—í-l$´)M)‘HgRcc‘RM!ù(¥Ü/U‡ÊãZ £(ažxzžQu JËú¤LD¤3&¾K4I,+—xè`²ˆˆJ–Èf@ T¤ýK§ •_æÐôn1M"é][Ë /½J¥IL®°Žž9B·àÖ®9h#ä”yˆ(úߌÉÖlyRBãHÓ¯”~æŸÄJ¨Œ­î®|êÈKS³Z1ˆÈÅÐXŠÚº[u;Ü¡H2긃‚€ÆƒA/§À¨<ýª5JM*'W+²˾ù|GŒ&}š ÚqH0¤¸•‘jèyëgê –†žXÁÅTŒÃæÉèŸÖk±Ç8Á /fédë[%Y‘¤ÙI…•Þ䟭¹ÙŽÄ¹µàï@…Y¸Þ…íÅ0˜!éÔ ›†dª ^ÙRiZŽxŽG.d–›Ð` ÊðAÉžvr"]>%_×ÇÉèÝŸ1Ôˆ) ahÞ‘¡(‘ÂЄæçÕÆ)œgŒc,Õî $Wˆ%*„Ïy# ƒ¹´i|Õ¼kñ½*Žrˆ¬Æƒ2â$ý5œ©¸oñ蘔{v («wç§L»2 ‚Ò=ïBNܲe)]r\£Që°÷ÒîÆ%ÖQ–ÁX¾{žRƒº}Ï~—JkªÖ!ªÞOÝI4á/t% Å›"Ègr4bEh"ñhæŒü5+¥?eA gªhÒÒÿBêÎc+ØD! ÂA:ENS0žÓ›Ü«Ĥ[ð ë¤¥·ZæÙ b=„_DµXW;YGj­› !ÿŸƒœ5Å¡'YP_«d¼e³TT«aH:'¡zÄåÚ‰§r––¦‘XˆbP]ÁüÃøþ1™“È ƒ!>Õ-L+7›'(0[½žœ˜¦Ò1Rw1Þô—D°n½cÅA:8F –+ŒëñSæ ™&a*)…,TýMÍê×Vü‰M®Üó+³Ñ&AHR6#”eœ&۸㽎ï#¨GÆüÙ+ þWAð#D™ëÅ@¥ À\Ù½$¹jÌq9NØë‹xHßpB»0«‰¸$Jé†!}(gQ>ªíª—-3Ö‹õZrùH%t\ú~Úg¶˜‡*‡E)ÁXqÃÑ®›dÒÚŽŸœ„­èÛMR—[îO±*Iò¼k„A…u$¢;«~Ÿ*_LòÓ4REoª¥S•ý¿t–O2tF˜ÁC(~ÿ+py<ÿøÉˆÂºN ž _ ×¶¸Ý³’Mà¿§sÍ{ l7.4­‡¬½‡ÕBÑQ‹sæ] bPÏýŸ%5¤N¹÷ÚÄø£>Æ_bó¢øí¹ÖSv¦•%Q Ë(ÁƆê[Ö#¶¦oSZü3%è‡:ê׉Œk ½¦¡×pǨÎ(œˆE°ëGÅ,’eˆudZÅK[_:ðKÜ`p ú•`“ZCŒ!F1ÜJ™/2¥^@­Aâmý=Ôu¼,‘@§ZÐp£Ež'IðBŒF—{8C0…l¥lËg'#²vÙÆõ=^ï/Öq‘v–mf)ʆ)C ¸dÖ?ïL½“V1•ýè¬) UÂ_q RŸ#àõ6C²ÌiÊT‰dR."ÓòÒ³\ï"œBŠ9‚—„¸â"¶[禢þÉÇÍz.kÖúQÈ\ YiƒÜ‡(g)¬½kˆâ3^æóß¾ðP‹M T5<ø³™Ï/÷¡é_cÖ ¤n!¼•›*öILaé6ØÞyVQûc†‚õ<˜c!‹o “Óz9¡”)&ÁdtmQ£f-iL¤¼_K+¨|1e8¯¢Ž:¸¤³ú¥<êeÃU²õO¶êÁ \„™cd¤ù¢Î¼¡GŠQ*ff¾P@ŒçXÍÙž¿µÄÅjÅQø6õ’R ŒUÑu<Ã0Äò¶XA2¦é«Õ-ŠÖù~üT>YõZr¡Ø•óÚGŒç) ú¥æR•ܲœ…â´ïj¤Ž²×kpÈïÈIôÑFÆp¡Å)­Î9mJ•Í‹y<ÛÉϽ²^NÍJ¿à^"^!ˆÏMêw"˜Î¤³>ž¥Æ¯#*Ëæˆ'´†R»úÔ¥9b‹¯QŒ,ÆÝ.ååKw”ßÜ\úò"¹VéM&¥Q\©fj<¾DQP¢,¯oÏK\Ç Íµ?$G¼ø½Œ«…J^îÚ#ç1Ç5oâ°”‘#5ì~_â&õS„À¸» ªç¡ú$–Ó‚1.švÒ»N±J¦yÅ= 5*Ú_’ɤJ9Ó^›|¥ŒÂ>^fØÆ0©Ó.k¨¥B/õOžÌ¤§a‹µ5'¾(¤lC ‰I>­2P37WH% 2ŠdqJ¼|læsrfáVÏ™.¼JñN»j°ºQZC´T©Ê8q›D§”J‘‚¬Ø§Óäò¡rƒô¹‹!bW¤É6„½•uf}RWŽB:jeEÑ.Úñnî(J«¹ OÆÞä¥g.ñb¨™â(„VUÞÏÆê£þÜ„JV”§ã…mrÕËçÌ«:yìÖOˆY‘Q ŒRUtGÓùK˹ŽÈé~ù6\LÝÇgþd(Ȳ åxEK_DwŒ\N{2øL¥oMLÎ]—ëË: ‰:éfgåö‘ s„5rZ‰B.õ,ä'U[Tº·gl»­)‚®ríœ3ˆ¢‘)l'ö´ì©L¯ßêZgtDªÕ›3,j1%N¢|ˆ„‘¹SXé“/+3¼Qèi-D¸ÌTA'“{ÒS ŒúÎVJ;tì98º/U? ‚êôX»µÚv-RºÏßµ×⢢*ÅæU¹$1ÙЩ3rååÊn(F![¸¶±.…v!Û1Þäò‘7¨dí!õs FB•ÛjK²á}ùÎ….ù=vÉGTI9j•ä¡¥~:å“ šg½=l…~sUqÚÝ¿½Sîü¿†j‘„uÁUØ åq©+§î”ÄÅ&v˜¾~Ö¦þˆ•OÍ,¾«ÏS#%ÄvæÊÒBˆËJ„Ê>g-׆5+•J5\æ/•ŽÚçå%̲4¤uÞ%úݤ ŠªYFµ¸Ò‹‰ Š;j‰Ëˆ‰ÄöbÊ$ŽÛÌõ&‘(ËR"—Þµ×Öó”RûšƒËEÜXŠgçn­Ì•!sÔB C’|šªä°·kª|ýî° ¦c;ü§§ùÈe)}*¦ÂT©*Äk”ºÔ£Û\M2­G0²/2©"+.µÖ©[å"˜ó3oèǦ­Ö†²ñIu›;{¹ÄMO2µ;hRJ’5p¤Ú=•O¯¶>ȵfTzæáˆØ «æ³`pÌ0ÕO¾f^ÚÁ-‘ÐT­^mFH¥*Úõ“i2“_H™C¤"x³LÛèÁŠ$‰^SJþé´TÑìå/¸~»–*U‹«+ÓµÈk! 4D‰TÌvvJ:šTÔìÛ쵚– UÎõUr…M%ùÂ1'‹ô ²<.ñÆ *Z÷’=ì‡;ï8I#W¢mâ ^Æ”móƒ:aW-sÔL ì…BU¤˜O’ŠZ‹wr­Y ½ö.ÙžR)7i¼û\¤Viq ´ÑÝÒ±K„—¤¥|­ï8íCÊ1(ùÂEQñ©–îVDËô®Ujaû¥š¢NI­ôñ¥QX³± †qšÄk®JªÕYUª÷°ÚÓbá×¥òøBñš¼bŒv¡έUb"a=‹w_ioŒ‚ŠqÐ÷ÈKìÒ 4ÀÀw›´d¾ðQ/Á…  p) %ì—Ú•˜^&Ž;¨öÖ‹7 ˆÒñ«4õ¡%e K1“-(ÎJ9ÎD2eùÚJïÇ9…¿i3kw^cÕÓÇs›oü{šU»¯´»£¦{Ô†ªÑGµoÙ‡ ó¼wÊ==Hb„!<±U‚ƒy©ØÛiˆåQ¿Ò•éH@ß²‹ë[I‰jU×uÝò†çEQbúÑYqÈSÎL%S i™êíg°¡Èpð{5ÒKpßSž Y Ò…;i&ËÙ"¤0äiB,ÄÙo ‚¸ý"Ú‰Ä1ƒ§› R (𬤛ˆZreŽüIö|B;ðƒ2œFÅš¿‡~\T°ÇrŽÅqÅA…FJ~Z¶á:ËLí›Vœ—™²,R-˜¨·-«bþ¿› æC ç:¬vBäjï§Ãk=[×½û¦Ñ…dER!¢B•.× Å;o¬ªÅ£6Е‹¸øBÕw4Î!Zq.|!~ÅÉ’ºÇÑ\ÀtséE}Í.‰í «}¥×ÊN-,yɶ|T²¶B)YláÌN’º_®s¤„Zuüõÿ‰¹ö+)Éô^=ÊÒ B!Éòb ‰}ú™»Íé·’'^!5MŸer­{=0ÆïC 'wVlC) ÉËNMb”A¨H}’Òú2âUh˜3!){kª¡u0)„¨GS´ŽÔ*+ªžœŸÝ'ýdjf[Œ¸%`†ryLpáF¬¤Z‡šJëSÐÙ-7ñ-¸Q\¥~„D•ä_ÅÚãÒ"S ’ÃêФ_²-tÕãýãUw…§Ëʦeñ-q’­FâK8‡A̤2’6û’®•Î&}¦–߸޵äG*™r„âS¿r´¬¼¼›c>K%JgXi råA ºr‰b !$þiüc’“ÛòöêŠc`ße5sýýþB0bî‘jB 3*´¬aE#QL¤¥íŠ¢cünO™³¨ÕsÕnK¤ÎB2(T`™MUü7ÖÙ&»Ó2aU £®r&í4J-E¢”R¦1Î8b¢Ü¥JbÏ©æ%2»Õ=«ìÖè•Ç*}‚ ¨¿è넌)Š«8‡%G_zR+ЗÆn‹§‹%nCqj29éZ/~´bšÇîŸD!›¬F/Žcü!YA/ÖÐòÍ¢¶“$)®¬*•y#£WÈSCˆ¸'©Ñ÷•—)Snc‹„yšIGMâc“Û ÕùCˆliGíSŠ/%H}¹†– ñf„”Ši#ÙÚ¿½ëIJLg7 0R 9†)Ë©nŬœõˆXºü¬µz<[g/KZíDZãÅ2Ùìs;H*ŠÎ[')(UGú2S…®ÂÖ¿,«dBÒ¦¥ž§),Žf²aYÄU¶‡ÕK—¦ ô×jªr0X–IË—¿"ûÝœ!È€‚ò¤8©,ë²¢<ƒÒÙD5ï>J{Íyˆ¹B­QŠ*Û×±Äer†Y]l}äí=yéÉ\=ð„lðüšÞFõÔè]û•$¸¦8ÂûŠ* ‚Áû$>Ij—Ù/žá|˜AQ5è㨇mÃ6ˆÂ15,QE¾Ùº·ÆÔ5,F•¼ÊD5(*f+{‰E¾¡X´èw*%L1¾Zºsñ¤·.òïJ4¾ÑÞ½'„\rÕ…ä#ŠåV+©UʳõPØ\™ðpݱ$ÕêËK75, æSûŒTVua=¥EŽ£ÉúmÄ~Ïu¦É‡rM-rlÞ”›…#3iÌ3™PR¥ß,H‹Mü½¯Y(¥­JWøò2þGb®Š„Fr‘‚*;ÜÆuÔæZd®–éóé+žM-«]ãpÄdBi$@ât³©ÄmÑ;æ³röjiýJ¾‚ÛÒÞk'ž¤vW¶wþðb;ŽÇ0¢aiHØ×§þêÜ›J%xjÊßE8Èr5OŠn¶8èÒøK"Ô×j¾ê‰üÂ-™w*Ä/V‡û’OÒ†0r"°æ8„c¥™É|ÔÂ'ɸ]éÈe2ïŽòmidÓr î!L)" U3 URX„μy"a¯O›?0ªÎEãç唬ÖÍ‘¤r‘ŽËåCIJ5½GÔuWí‰.µpØù™*ø!L!F_uÄÈëáIŒJðžù~'µÕ5YÂá­úaG]Ô®À«áKs;§*z‰§§Ûëµêß?ShÁtjõQؤZ½ÔÃÆ"SÕ.D:ãV•%­øû~¾ âøßº%]]Š! å;išF²;+JÊþšµlÞBz¾"™shÆ«ß䮬ˆªÁJb…f2æ5‰g& (š™¥çoYø÷æFD¹íK•F7"P¦*z\ìì1ª:=QìjÖ¡»—ó ˜ËÎJ Â^÷ë¹Z‚þ©F (èþ˜8ƒ3.—Õ½$pI­=%$éÄÉü²]þ¬‡Ã愼´|*™bÅ+•ƒ“î\¢5¾¼ÉùúµúMß‚<ɶ‘^R”R¤ûfr¦r+'¥î›ßýOÂõß½ÖžNµ-›®0!ƒI³œ§w:çñµ¦'|KK‡á3U»üLt7’í±W‰Ší"G)Ç+(*U¬«ïe«979Õsº/´ô“²›¨&¹HB u8¦æóK4—tñ*ªWi’®l|¢ c};¥ùòUœÏÃ:\RYTdUe9Y=OìöûW­ƒé¤rÔI4”&ȸÝÈË*ëà­WeºLd51ë|—0ÎQ3-34¡³?¤–%µ#±i"¹ £b£ß…aEr§eò´ÍvêßOoD_Äíî{æZ#Ñ¥ˆSê 3·WXŠKDÝö§B™OÜ¿Iü}BQEÃhJ±HÍʆlj+F%2½Ndš¸˜©øþa ’õiR' QGL÷‘c 1ˆ»šmñâ;ôµ¦!ÖVü¤ÉòƒH$Ÿ=èÔ£ˆæ#%^ⲨÄ:/½¹Éâ%·oäü—^Ž–_Ävj•Øåä^mé  eÿøÉˆÂ»N b¥”ŽËƳ“U«ÞŠ~àœúH|×(äó×¾E´Ã‡u LH³¡Í-Ó9̺”*úC#•²0ÓšËõ"Ì~4­”ÚxJQ–FœW§%KNóŸÕÈrøŸOVB´Ÿ%B£j#†+È<݌ΠœkÂÁ¤„ ª@"Ƭb‹£´¥ß?U£ÖA¶Œ#ŸH|¦ë Ì …I£Ii¡Ž4gk<¡PÍ ¡£ZÅhB ó^JÒHÏÍK~3#SDܶšÄªiî/ÈfdáSH1;;™ÜaC &ZÑ{౦€Å? X°Æ Lÿ0ÁPPÀòŽkZ¢‡ÄanìYä’`P SÐò ZFÜý“ÃVzV0¡›;Ä-Äb»“.z›Äå–J\R¤ªÂÉzßœ C‚Žrðä°Xv®+Ä‚FX q²‚ÄX‰3¥>¢?rgõ‚Z¾ƒYL`zpYáêGÂ<¬è |*DŽæ]s(’Ú_ö•ë^I¸5r‹cLûTægJÛf"ƒ”Çj¡»åNiÊc˜,$†ŠMºµŠS A“¶Ù?ª SñlV šÉ‹ÎĽXYó‡žu|ƒƒ††š%¤xàV°å(%kÏuõ‘èg¸T(`e‚Ö£¦T3½ŸT¢nñk£°Ûsw´š,”¼{yH%¥R—®f¥Ø‚‚¸Æf-ÒÉ9y ­MÌö¡zBŒ´,³)óœd"yh×’÷¬@Á™¬Çü»Ú3“ÄxË ) ²í ð}ƒ€¥J÷E…‚Òk\Ö¶Zй€’óú~9f]œÝ¿O| öQxt$Göv™lÃêB• ‘LR ìÈz\k0’´¨ùÅ=Äß>ñIra2J Ù"G]*IòMÙ8ÇVA'Ëq)œß,¥1*,茶æÏ1…2`yöÆ×ê’q}tÁ?„Ð X PP¶ tÁ<”7Ó±hµ^4RQˆ3µeaÍ*±‰Úu† ÇÒMÌeI”Ö¡ß%HBòÅ6ñüÝåz¯(·ƒ!BÇá$À@R…0Jâôb 5¸Ïpª0•’Zh´PÍi#yü†g¢"# YQKõhFˆŠÆ§gu‚S­¿s§¦‰-gAÜ)b$©o[ù¤  ƒ§S‚Éš©;Sƒqâ àÓ]ˆ4—+ ¢ëXD” f·IcCä›1Šf(µ âð~½ò£$S•íþ$&$CšRªgÄ"$ω8ªcJ§B’ j„a¥¨‚pXèæ¤¨Jz±&¾O .`1þŠê»!ô‹+-CRàD·=›”-O9!9‰À…Œr†Æ{ÛDíC¤àœ'ÆèJX˜é8eT‰G-h™¼™í •¤Þ|svñx´u`‰èõ+B¹L¡‹ (§©„:þÂôµr0‘¿Ö›i!íw Ä([M¼KË)’ `EæF >Òƒžê“V[áª"Ýåc´‚ÖBŠ(!J0Ñhléy ›™Gš¶ÀŒ©±Š†W¼±ªzäÖEsÙøzœ@„÷ˆvªVšs`^sfœ­y+¦¢ˆ±B†­Ô{g1•ÃLI6ãFsC€{AbC;f/DOµœÏØ.‚I)TK¿Ï{tõ»¹ÜVÄãC¿­ÆNÒœÃZvŠŠMŸ*ÅàÖ à™cœe¡p]äJ¸…3‘Qµš‰¢¤ŒÈΊ§4Wö~Ô{­e&0JfiDB™º’äÔ)!LvcÛ•Êã ìå0‹N$¼ù§¡ *©^ÏT¦.EˆRQ7Ö™¨r¯aH‡Y)ü¬½F&ë=Q(-œe¨†ë2 L9(!E#ÉUnwˆz»ÉË'’ê%Æý®’nêb&ß’Ó…÷<ÎE3ÊD»s²ÜÅ(¤u°šˆË¸F)/Ú'[]¥»:Rc¦/‘¹™{É¥ëg´CÜ”_½=*†[«z‘dOˆüeÅDÝR"g?µü_å’…ã%‹¸_·ë¡R+‰q¨E•uv9´;J¥©®= ýÂÐþr¯ÕËî9ªF¡–£ÐÈž®" t@‡¶°™îÁ;*&ŸkæœÊGÇö-06ki¿©´<œ/yµ[.0–cÛ„¹)¤ë£¥ªâÏUÀCøŠäuÜU,šU C«=I/›7•`…i:_¡ér«¶¤·¯cnH[5–Tæßg1åˆ+²\Ìê•B·ö-ÅJˆ[‹”ûx¸CùSüü”ú_—Êëž%˜ØLy$K3”BZùEÔv˜·O/>MUØ„š…⪳‡q!øž‹G`α‘\6tîAÜÔTÄÃê Åt~íBП¬VõÅRÔ›´Â/Õ~!ð±*×98‘‰Oñ¯hˆTû†eJGÈÅêÛÅgëc FùMEð©Ÿn}ílÍASW¬*”:ö¢a¶ö U ]¬¼LÕ›¾Ö$×r)¼ò§~ð‚Ä)Ä‘Üì¯tœW½_äÍèF!Ь^bœ\<– K½N¾Sôöª¬•YI_âÍ'T¨Tò‹RìѧBõ2!râ—СYUŒ¼SQîÙSŽ1HZäJ?ÅåæÜï,¹“;è†ékÍòDŸQÈr ÊG÷¥W üt‘Ä 0ì¦×ZOÆÈS)ô¨Ÿ†«MìR¾ü¦Ì–¡$ S ºcŠ YyT¨ "媅j» ú?Ü¡Úir®Ù!÷úâ)îdÂ:D'òAd’˱̢µ%D,Ö礜ë¢J"SʳŸ ¦Éœ)yWc‡1b¢ ½a#eiêk7‘äûϵ×\‚Õ·ªž’FUɈ±]GÒU;†Uk¡iù#[ÑD'¥MÄKà’ ¾w:¼j3©œæâcDAêFP½ˆº‚ªkQyÓ^¼«”´QåAjÞæ3м™óeîÌ)uƒÐF‘¦¤ØÚ”Èd¢Yótµí”8¿Û&‹ùñF{]¦¥qKæŽW¡åU-Ce.;iD¡¬:­C‹ÆWcåÒCˆUêUšßLì¿¢š„Üh™N}ÑðFvéæÊâ‰ì„Ob¨Æa ÏoAE0C„V÷×±’e.˜c+wÚB"H+5isu¢]tdœe>3$‘gçÃñœKp¥kïú8—vÓÐÆL"”³»ƒ-޹»Ç<}ê²2 Èô¥ë+a¾Û™ÇM—dðR).é"¼C¨ç3NÓŠr»¾¥NniìɔΓ¢9ë?—¢tšcqRI΢–Ì£óÅoÀ(á†ßb‹—(„’u¸bŒ³H÷ )C”jPɺÜ"ÊÔoi›Õ>õ¤ƒ ž¶£CZRJxê·j01 þ!J‚„NÑŽ„âåÑ.FKnÏì'L&T¢([bS–&jÎÃì”g.©>±ˆ%}¸(e(¡J€Ü@Í,Jsuƒ£ pd&e¤‰=Ée“CRÏ+GL2ï£2=ôB•ýÐg™8€M—.bvÙi½ 2Ó™)6© ®DÚÌp* x„"d)~I‚²/!HúÓÝÏBÜÅÄû²¶ˆÖ˜Œ”d·8CE¯L“dˆ¸!Êyìõžþy­·'ÿ:W°!ˆ ÉZ]LNaΡ `#ë˳\\¯vHVu· #pØ¢áZ [ÉÄoÏ8aWgr ˜sЭ'Ðö?¦$"æñ8bÔ!.´W1lnc7÷½ÚSi.”Qµô|ËVøe˜ô c“ý¦iöòQÆS²-ÌeJìè•}M¥¥>‚?eݮĩ/jpªeÁTV:¡ö/"P˜(äQ‡j„Aù骒#­ˆ@«Ä‹ø7IõT°¯›},¸ ÄõxT/V¸Ô ±ÍV\KóŽIÄa‰¹g¬²È”Ñ•(Ž%XZ­B­1¦-ml¬û¢ …É{ÛòÞ•ÏN+YJQk¾ ކY„ÑW%ñh6vݧ¯Ý~OæR+2$Y“-MªåN¬<™B8J[)-s(̇1Ñï&ò}ª´O`Λi›„¼ä Jì¶׿ª®äèo½|}¯ÅÇdñÆq^Æ’Õæ[)SŽâH×:žJmáe¾ÈK|ÄÕY«,ÖYHÓœ¢8¥ žQN(ÅÕ¬Z+XJX}6’$í•?•굺ç ô˜Á I}Œ¤Ç²tÖ1B†fÃþ[(%Íã*XœÖ“³rä…'“ª™‚Å]$Yj4A\P’zJ…ÁÏÓ¤Ëjâ/Q\ÞïC厃˜Ò*[iÓ„¢ÙþsÿøÉ¨Â¼PN+ƒÕ òMÞx³’½¸#w@õèÙù°xpÏi2áýâuO%ˆîBB‘¼YL–¥>Ùì¶õ ü1H¡4Am—ÆSË/jϨ ‘(€–9Œytì%⊲R0¡ФA´IL»%WÓ î•*܇軚¢ðgæØ" ³/à“i!0Zœ a&-Är ¦_#ŒSQã© CAãøaÅ uh³cþí2-Sœ\ÅÚËYaíp¡°ò ù‹!È2l…9 |AŽ}’)ßktûkP]V ›D Š¥vT ,‘8ãQè?s«¨ª dç¡kÚUÒŽ@l·ÊIaôS¨\(v½E.8B8¾ZS•ê’IO2Г>Èšf=³¬œ&½òY( ÈÞ£æST"„{2àH8¢dâ JXMÑÏb‰\=Tˆøk—dá;)ÙÞ¨Qªc¬ê T±ÑèQQ2Vôy:ÿ¤Ã"I!f{„9 èv¬ˆ¾G„‰3TU³x˜ ·ãSARó£Þ¢Š%ÈÏLrODC’)laÌ¿,bSÁí‚.”¢N çHa†¶'ß2ƒØ`¶ i±—ŽH†òÔÄï'¤\CÖ¹eâ&þÅ™DZºa†  YNH•Ñrk¥•œÄâúÝðNËøž­´§u–ÉcP‰»«|îŠ# R 4‡j(³¢PkñŸóðìÒ9"—ʲ´…DÔK¤†% #Tøª]u¡`¯(ža mA]cå¹K}5[eîiÆQˆ‚F¥"yNSRTŽùÖ*×ë,†dáf’äF‘¦ÉÖ¶H©´pŠ€@\xÑÖ͵Pi(³”ŒçÌ–äûíæ„“"ˆÆâ‘AÕh:&0gú·'‘_x¤mîAªiE¯uõ-˜Ö—ùD1*×"–v9~Ç “õÎn³ZW˜ˆ¦&¥&= ëòHÈêõ[,—§‚|¸¶= c©Äfa‹D¿Mù„­ðJÄÇ9ô]V Ìs¤bj D  `^ŒU¥V§‡§Hê:]–ï¬Rm;OóuBl‘ròŒe)Ù§‡ A e:õÔíʃ ñ? T¿Š¼Ab˜Žñ]]ÕÞ› ù¨)aIÔA’9% èøm›õŽ..Jy8QìÚ±5Ʀ¸E«tf˜±Ø okWxq7.Î(&í‘‹lÛ`Z[}a#Ò mÊ($Á"Htd(ÉÁ'ð!ÔY{âŸlæ*a‰e~'fV-%šÑékˆ\¥Lêå\+ÈÏRAIAO:ËSì_Øb«fTÃGPª•R¢d®k‘+¼ÅrÈÖÓ¡ )±#ÑparÁDC|m<œ ´Õrîx‚©(CJQ‘;Ç&šCä¢ uKWÑgL.¥$³fñû¢asö•ÙV2(íS”!ƒ!)HˆfX…„­²Ê¨r¬¤ny¶Ûm-‘íŸÂ}Ò(ƒÕñÿf*Õ®d•CÃ.“e5šó2×é­ßr„]tê’뉛1 T”8E’¾SMô?Ú̹ɷ(Á ÃÅû&kÛfÑ Zº`r\I«qH—*;pD”¯RtÒ ½Z«RÜF¿ñ>äÔC^AÞŽ8¢)(½IŸ‚ša­¢5tËÇ}R›º”dÚÉ|v¢³„1DWÉ 1/·óaQ(¥v4á%JŠ„jÇAžÈª¸æ¨”z>§=‹šSêN«vLáú_¼>n3JùÆ”W#…yÚY@(¡Ãjã…{’9þKwñ†M{+Sø–µ6ÿ&°¼C\K§¹ ÁÒ‰Œ Î:J}œ%šò–LæcÑŒDqÜÊì! ‹¤ì &‘Êk‚¥:âýÄ5fwDß5rü­F/¿J©‡"¡+LÅ!èØ„IÚ£ ËêŒB×ÙÁBþ ø—1ÜwÍK¯«+Jã Ç(=\Q uòÆÇÑ v#ò(æé:‡ñ5IÇJªïç¨É³ !;ûiý%þ<~ð¿cŸªÓ7éîЃÒèƒa¥²áv Ÿ”hÛ•\¹Ÿ’ÖÈ»¦„R5Ê(F—8AœŽ!ˆ¨—1\Éuk{-ͯEѰ¼¨™Ëü\O…¶–!?éìRÒp„fR—–º‰DQÅ1Šs£Û7?'âKéþÍI8¬é"$¿F²) ƒ }ü^JˆÔ¥§!1%çêúJNõsÕjS$«ÍI°b¼ì8!NB‹{ ØPk#›#uO‚RJË’ØTÂø£™çfòX"mB,ô/Œó7¦oˆÍ¬Y/„ŧˆ«·¹OnÞU#0ÂXÎ+q\rw…áimLhÁ¢QÜijÞ³)0jó´¤nCi”ˆ£!¨y,^E [$âi.G¦çû5D0‰JC7•µÃ=øŽ1®îæFô-rš´tá ÊjŸ¯ÂQäûíîd²¢¤Ä#È[”•]WT© ÆË¡ â!‰Qý,å7=ÏM©lz•æåk[BœÙ/”ŽçŠ^ÃúZ9ÄZxˆF!ÕKÑ]2Ýä_µ1·µU T® …P›ã‘­—FꂦÞa Aü£“¤ÁV„P‹éa)Y„·dçYR9:ä +þ˜´¼½LefìykUµ­êKO6U+ÒŸxäR$¬2pÃ2,î¦wv¤îQ&­nOýzyjü¤•/C^ýJû†rR’v&'ÒmôâÉ0av¡ƒ«ùø™BIe@Wˆkú¿µ*îòRüZ!Är\_æºõUÈ&ù˜©î+"2»öTÞú¬to郜÷¥’Ÿ)tÜè¦Ò´¤¿_F3Ú%æ_´ræÚ"®f¤¦ˆ¨Œ^qE2ÎŒ+¤I¡öW1uË‚ÖVÌtu ºò˜*wÚ¦y{ÿ/ˆý}°@Î&;¥ Eý,ê»'aqÓÓE«)YL{ #–Ë`ƒ,Sµ:«T‡Fæ0¥“¦&ÕŠ€•®R«"qË{ÑlÌËôS«O›Î$T+HÒ×­\æ³#QZì)J#µ7ŠIäêûµË‹­TÌõ}äÛ")÷©ai¶a8”ÿû*æ)U(·!Nä;áÁÔFx—Þ”¤;s¥i•¦Pã5oidqUД³ß¢Ò¦ˆf£³¶²º•ó–t1^êaIB.A]¤Ã6Nþø™¹ÆÒº%´•2íþšO{êT*& ¨‰¯šëTµÙ\ÄYAÓ·‹#N„—¶¨ŠjÅ\L1ID¡›Æò­_féˆ*²_uÕTZ”ÊDK’b ÙJš¤\®{ÈåeÍßШé²K­¾b˜©¥ê÷gy[7oÊQŸÊªî™V¨´ç•Q t#ŸgÖ3ÄÑBhÝ+ûÝi›]Y\g$„¢¾‚ØŒ¬©šETÉr%&=–¤ý2c®ªwÛ1N­½fK®#xm%\¬˜r9Õ5ÊóÂmR¦rÑ[õB¼ü"œui î!4UÖ³s+¢woÄÂuÛø‚,·¯n–KzQ6FW„Ò‚?oå1Ü£™½ Š¿aæê$¬˜ôÌb]:»&%Ý:ýú½ÏEÛ—IÍd;¯ò¶nÕ¡Š;¾”q•44’(ªA¼­* ·,†Ufû¤Õa¼LÃü™B Vá)Ba§;¤ª%Žc]bhB «GŠ1PÄk>Üp™²D§µÑ䤟©KwQ%&þºLüU¹y¦ g÷c™s[ìnB(ìBÉ—ÆmÔá2¶$TlçvÓÙÚËù…£ÉÁ«Ø!ðÙS "a.‚2t½Ó«[ÏäP†Ã)öE"væ I «‹ëV©·ìiÑa ÈÅJ¯ÔzqDnèN⥠Â0ù^¨Ó¾þ«×õ¢œ-;7,~).ªR!=®í(„ò¯öfÔèªsNûñ)º ŠÂ¦&&YŠßìµeÍÕÜÔYf«ð„#ójÔ¸Òww…jõ|‡ _LRëR‹ä*ë•vš#›¼… ‹“!xÂâíïw+6¥IÊm!D:ÞÊv½wˆä°ˆ¤î€åG%6®Ž‘µ7iÙ¤¤lZZÐR{Õ0ÏRz˜í]Ú„s¦¸0äVÊþúBÕ¥N*ö¦ÛN³XÍ!(ôþãˆåï¸JJ¶9h=UÅ_óU(Ô^A}›Lu2ì«d!Xd³æÆTÞR^µË;…5B|±§¶y‰¯„þgFmEe”E¥VÅ8W;¦ —õ3&Ói§.Ø¢ léê)0ÝÿF©ÑÇZíÈç]3›¼lMŒ…tGåâ"2ï]¨*uv÷ÚB!Ö‘+ßt*H*©åmÿš¬â±8¼"áO1×â!LUWªªöî«2׸ëOkâÞMVt ÂÈ_<´* ר—¨˜S%JþÆ9²ˆ„Ý|¤b®b´§Œ„5¸„¡R£4Œ­›]%i»Ô{ˆ×½r!_Êêwó©na˜B"2q³¬l© Ô¦¶ä!HÅÎæ¡R†ç«­Š\¤ÜÈ9¯_ÄËêú½´£iŸ<šV5>ˆá’î‚”íÚKŽ+ kŸi¹Âˆ#ô¦nûù «Ôm ×HC‘j ‡b8AXq§`¥H´·Ì̧ûRÄ¡¹D"w¡z¤>¡œœ=uÇZ“į¢Ê•Ñ/…`û´ÿøÉˆÂ½N÷x÷Ùø„ù]úSûpüÃþW³’Ç¡gcuÔú aXT7ºÛÆãü´êúqÉÄLZ9Æ_qf;ùò³#¡ ‰\!ÕúÚKûØÌ1ÅZšÂ®<›%ö´úšt*WqärUu]•Åk0S]µéçì£Ýë¥Ñ«K ã¶.êx¦(­¥n!µ\qGRÞ<#Ä÷J U‘Ýb–†¹‰Yü³E½þx’êˆÝ¤8ÌÁNIżêr¼ABöšg#å)`½TjìBoÈ—A(}bÑÖä®ÓšÎ8G9D©öËͱ°õõ!ýBˆC+¿-Œn]*~È!Qæ|z7U±‹šlÂE)EjŠì‰8»ƒg ø5Ýþ’Þ"yª1ˆ·ÏEb êÎr€£´h\ ÿDÂOŒsS:*²˜MòøKËzë¾ýuøîär”cÑÔ¡EÙ¿—[ùi˜J¢Ì,«Ã†Ä^ŒT¢{%urSØ•dÃâ½ÝÞ‡\"1Êß‹Y2±ƒMÒWBfqêbV”ý¥Õ* w-f¡Ôä²Ò±<™*UŽ^·ð±)æSIêÝH‰3Yh!B ¯zPs¶# ½{,¨þ¢éKžöáûs²¬ÙæÛ(Êž•mß¡=AÓÕ.;~›ÄÌšæ×¦š¡ª})ìÒ E#VЉµbÊiEkI×Bѵۆ …ŽñK!ä[R5ÉË.$´7uHë™L±\ÅC„¤FÊ(B[Ék›yÏ_Èsó®pÄe^µ}r‰QŽf7!N*d:h÷J¢ÐÅ¡5 iðûxI£pèÆ¦]Õ"¬¬yØîcaÆy¨î1´„/MõK¯”¬l7þ)*‹˜‹ŸK%¥j{PD(ªRzJ¯QšB{‘(F&ÛJCNIÓiQ"6ˆK¦+‘Êd?înm[Œž;‰b*7©óí‹&ý( Ó~bÞ £”à…1¬BrqÐP™þ£°§³>BH…b;;Q’Sï_KI){ä´ÍUßñ•0³e3 ˜:ÝTíuüÛS¶«eª÷¦Jk¡Ì~|CˆÁVŠýßdË BþžÆi„C¨³>Ê$Þ¹q=iææÊS­èK ·Wû-†S§P¿ÇŽáÅb5i¶r¶4Øô+© BÓ͇†Ä©;²rÐÙ·"ª9):Š8ÅwÌ9›ˆøÚôM²¾nu|LѸ·òç›O)®¹*TfÆæn# Ìˆ…;´ÄºD³g³ñþ¢[íUÚñ@¨â’…‹³½h•(ξ™!™VŸ)x‰Ù'£§²ù¶ºùAc—Pk#+¨¬„ÊL¶;LZ¥ —#«P·mEâê>¦›¶!ˤÉÒBŠ(ɆI FÆrd’­7‹UÕä»ù½h‹f¥w_í3âf{>È¥[“9…ª;¸ôz·ªÏÙÙœFæõD¿›Óæi™UYWÞ…úy}¤%w „â}1öËÎ% g‘¨Ùvã–ª¸;ÔQb&UH‰ƒat¬Ú–KDC:RQ(ªv÷7‹ϵ—y;Ë)œu)NSf‹*1‡W\’b) ôãL¼ÔE8¶w²¢RKÔœ™—¤J Å^vtæ£ ",‰)‰Vò*)FýiB§Ç£a91÷È e(·wl}ç'©é*ÊôQ*j‘Ó0òÄÌWV¯çå‹f3Ó4ä)ÚRß„ôã§j¥O#©K-E» zå·¶©¤}ýÙv3 r¥¬Å¹h·*¦K!¶R ä±­¼î´‹¿RéY¥‰W[5Yj‡;Y^­¨b­–ë?.ëo"5 ÷/«e(&¥ÏÛÃåR´ƒ*ôºa.¹¯ê˃"m*ËïN÷bPœõªúò"Èy]Ùê–Dë“×è„û—(Þ–%‘n}q—._?X¾=?ÙõC)AœÅ1y4ØI »˜n)Ö’Q(îwV*u §£.SyK™¸A*E©\í®ìLX”È2Ê)&ÁÈÃ1ä¶¥ÜË»q¨Ú©D*{³ Ìqb3ñöa½4„Äý!$%UÒgâÕf°øJmÄ.°á‚Pßu͈4³ükÆØÀ¤1zïOh…tD.é.ú]¥«|1«QÈ)A\9›ËfÊØ+ä™úé—¹ô´%W¹iV=g …÷´© …‘jg= cWƤü ™qNÕîöA®š‘nÌÞ›‹S+“œDa ‹†ÇOϱ5:‰Äâ;t¤ÖÙ•RoßH¡§Y‡(!ÄOR…=Ïž $ö‹%laPŒD¯ñèùN'êÊ Îç5Î-ÏÆ'TkT[CËÀ`f©—ä)Zˆõ­°öŠÚ”Œå(CÆR9k´ÜEr Æe¬¥C°™<ñbt)Ó)•Œ‡a’üÕ8Ú"pýaª‚Ê-¥'ÜÕ¼aÊÚ›¤¡j½ê|âäjpìjšDñœ`PÁK=2ª…²—Ïå9D»Xž馔m¥ €“àÔœpO”ƒ2ì“©é(0A©¡i°È„f\)0ÿCÞh‚$[H«+ÓQ …ºÕêc+Y8kõ„!ªÆŠœì*Õ?†Éâî Ý]å§ñ]Q…ON˜Ó3È”¢&F9kf¾;`̽R¡¡22jZ…“ÿÒ1*K¥¬°+TÖ)'ì(c ¼ RŒ¬ tWÈ$Óü€.ÀH NƒÈ  Î.MåhÁAE<ÝTœa’)q7HÀÒУ ÞW›©}úfÐNq”ÑÌrQqÈÄ+øŒÄKôNÛ'Ž4ÄQzÛ<,<1Ì<»ä˜ÆˆyM'U, gQ½t—T¯£íoì5L±pȯÅzÝÐ)7Ì;î¤v!D¼ÛZ䃧m´ÁAHñ¦©wÒ44L#ô{É@§LäÁd¸1Û¯ŒRûÄ'‹ÜmÜ%…‘ô-ó0…©ÐßgâVfó{j 2Èã¨p†?û8”œB9ª¶¸qÌÈ*¼ÓE¾ÌCÚƒ„± ÊüþJ¹=¨ˆûœíå<„î!¹…Õ ‹B„mèM”c8×öç 8s=÷‘å)zà°Œ8Ù²#ÒT–®ãÙ$@ñ (‘£Æ[Ú B(ÎâgˆÚv‰lƒ'  „<›r&y¸{Ææp˜:Ö[ûgo·±ñâ™ì8a èl;'D)ÒEb!PCP%¸Õ´œ.M^káC0”– æK»;/Œ(s }„»ÙÂàšÛƒ[n{V®É”ˆ‡¥}YåÜTyTƒ4äj,Ô¼‚…Be¸Q‚9âÁ6$€KÁA ¶3(àÃ1N{$¢¬AiAÓ0È5íréÜõÒüYlW'†&Ÿ”÷~iòL¡c)Ýœ¢g 8b7ÕGå­¨jßLÇæSûxÐx›‰‰!" FB=^iSŠž¥nù„GÛ%;øSüjþš¢À %à#ȾЂ“\t‚a´àÞ€çê[7¹E (åI³xŸ¹è!‘ÍqI>ˆúóKíÆ¬ôú”¬-1ÌŒÙlœ‰Á¨F2ý•…AØeî2ÙÅVl¢×,˜ó3U,¹Ô¿x•Í™L2ð’p„5Ë^çjŠ+ñˆÙÜ`ÌÆ­šä6”š0È«Uõx»þbÖ^«f:»X¹Èç± óU­¡Š#¹[EÒãu*i^¤ß&¼Ûž9M²)1æ!h…!–áÊJBþ8U¯alª^“8¬ox¡AírE½Œ9ÛÓ î´r}›ÊR5åS,ßZl²RUⓦÁsô›îÅ!ü·8®ÍR+¦ò!ÓJÒzŠr±.(åuù?èÄ-<®ÎsP²q-û†z"|í[Sq¥9¼ÙU"ÕŽbRµ¯{ÝÕ"òmQ©ìï&]°–`Í}U3‘ÚŠì:ŠAð¾s™v† çѱŠüNØEC4L§f*åÕf½YÍ´Ëb1Tª1®fêfY,C¥„JÈÂÊM±.³¤„E–Žq™ ܈ÏmòîÞÑöŒ!×VX²ѳ)C©Ô|뮕·ƒ’EÇ!IŸ~¢û‰È¢­wï¥ú‚ÙÛYV¨®úmU+iÒõc*› ìT³ kÑE&ˆ Í,MïMÊd¥'»÷ÉAˆ!)ÄW‘(…i«AWËÌaSf3i*p«ëò¿ºÜÂ! ËÄw cSìÓùÓgd7mE‘Q¥„ZßöÔqFcÙtô<ÅR¢¡?²â¹$"–NYB%õÁ{Ç-ò:zí[cmd´jŠæ>](Š~äµX1–§„ª)Ì,g™¥ö®*si•ädV\%½~â¯ÿ´Wr}zËS†QKÂ….zùg"ÈJ2›kB˜§ÅÂDÔD|êíkê!ÛyGKHå ½i½xÈ+î1”F¢¥uHZ*ŒC»êÇ刚]"Y^Û‘)è²7›Q›ïMûmnD+Uœ»üœRM•k†!X²’„¹hØrªùI^LDä/­Èü5ù¯¿â©Í©¿ôâ²ëéŒc{”Q ³¢ˆ)9‰bn;Íí,qÌç˼ßóQ¯Tǵ-R¬„c«óId[,ò•Üb;Ò„ÎÑZ2&ü¶1E_ÊV‹•hëf²oŸi Ìf̾ ÓÓ4ÇòÄAy·ÎŒ‚ܸ,ˆ B•µŽ"¢zî5¹3 L‘¦}T¯O'VîAšSæþÊúu²i ü†R½Îågj/¯­ð˜Ü"ÝJQU»iÃе)CPšC6›nÖ¢“‰íÈB*¯¡ýŽ“.Ý»ŸEQÜFÛÖLÉÅRUþ­¼jØOõÒ:“„‹ÛµC'ã QU L!SÚV¨äfš\+*9JR³“{ŠkŸ @¥2¬I=,´dJÌ-+­Ç’xõ Ó!µT¯#{ØÄBªéCˆqSz¦æmF ëW«¡\^&.uK†¢óZ›-ZDDz§‘z´µr{)Š\ª\$¢ic(µvå …!„B±8EA\Ì)Jkæ/Y?Œõ¢3r[_Dv¨KñÊ¿y-L&Q¤ r—äÛÕiÃYè"»úùZt9dʯƒ$ˆ\Cœ‘Š—S~ÉDR|þg©œOÊt­…ÄÔS+á—r#ðÚÇtäv•EUR]glm×$í~ÿg\qØïY¨_¡û "Šþ}—¤ýÊBŒßRЧ‘(Åc·G6Ûx†rë t!3mfß,•E¶“-séŽÖÛlGÜŽºéPÎO­ÓNâãäʸº@ÌJØ—cÔUõ6sryNú:⛉V–›E:øJH˜ûªå9‘)öQíFö6XÁÄYPpŽûJ?;1QfloÑqèBh¿BÖm‘èaÉE®1¥!˜÷v…Îq‰;9 ÎüN¢›ò†NP„Ké6”O±‹¶°ÚÅeê¬ÍòWæÆ´â/áˆ+7Ñf7|âŒ!C0‰ª\ÍÎ[†í–ÄÉ&ÆÅuì>þ¥:Ig'D Á™ É¿I·Eu‘õ éJŠQÌ6fêM&ÌÒšš!›p¤©dñû+ígáÈ»¹ÙÁp”œ›¼++¤¬–eŒG³Ù稨Ε^÷@Ž´‘H—¦áÕ½k»RRˆASºjzinæ"Jv~í« ¥:UXÿ¢•G•nw/)jWª¥:”T+ï5„Ç¢»ÜŒ[bæªe‚?ÚÜØz—ÈÛœ¦>rˆøâ±Œ:ÖÔízÝ 0Ž2QB*­÷&µºŽˆAˆ¬K #‹Ùæ×J‘,”\ÒÌaŠy ûÿ†©¤ÌÏ3APˆ]—tµu¤®§.ˆúA·žEt±r†ÉgÅÊ‚”¦¢¿ê0Ú¹9†’+{Eºq¢ìèþ–#´’¿V-›Ø‚Ö¦¶ÖoT¸E•hÆr`¼ˆ”5t3¥ŸFQóNšñ*]%LB™»²"wZ¦¿v,Í9B= žÀ»&J•úØp†xAS–ž®B~4Ь®Qt;mÖû–ýþ]ò×¶Ä®ÕB‹¹ÝzûiqÛ ¤90«™Ïc¤eÍ3k¿n.‘l/lC —aM'#'^ÛÔH—ÆçJ: ­†›k¯æ¯•B­ŠdwtLQÇ!Ü,fÛÝ.8…)¶bR_QtÒe±¼C âr¡oNFÉù¼RCŒ¦eOCSXåkò;Jƒ +—LÑZ>ãFþ²ýuÅÎ]"éÚ­ØJ(Ô®5ŽÛÛˆ†L~L¯VFÑÅ8¢®rWWÜ‘¨r”2]QµWôÇj ô¸äJ3ŠAç­?%Éef†™ Zq¹uÅR`´2~5¹YÄ9[öWRK˜#­UÎâ+H5)ØoOB‘j›1Z‚VíR Mý o«ŒBÒÚDj?iH[JæqÆO/g˜Æ4”)}q$ĵРŒ^!CöT˜^Ò¬ÄTEª…¶ý(¤¥<Î;˜E–“*µ4œ¯È¼’³Êá]qWJ,Y¶éºÞÈH´)ŽµÞª­rð¼šF•d#Äb3ö²?w7¸¼2ΘµÓWŸu"=](æP‰1{²t•ôf)ÿøÉ˜Â¾¿Nþ–ÿn?ÇêŸ÷¿üoþ+þë´!d˜¥ $í°‚ßð{íÔ!=ÃÙ‡«Ñ®¼¨ì6Úe:ȲÔ]ÅdTuöåÙ!¿\dçŠÃ°/û™.uBÓØÅZçØzMŸ%]MM¤Võ0½‹!ZµøÎeoFMu8EMJ»¨žJ´†³E)ìÛz•êjUêHºƒâÒzø’ž%ÜÌÔóµU¢ºD©$ãJDÒÙh¤© ¦\¼†D¯¹LllÆÚdÌ!ú]ðÆìO&“ZW!_zW#œÃ üiLo`Q äÜL3¶³úåüG.Ê—M!ÄÞ5¨H„¨’Ôôg(GÔM¸´bsºj“Œ×*ˆKꈧ^o~î#˜™×Ñ ã#oU¿ëÃ-´%>Yœž„¸³R¤3 „‰EGÇ:qäuCç«ió„©‹q»´ìêÂý:Êsˆ¹[s”³Uê¾§]Óĸ½\¹ØSªR]´uŠQ;}÷IΡý\Ç›êG½¬~r±ÎûZ Ígw«h‡“æCP!CùØSXîÝ•£Ï–)°” [îFOƳvò ÌܵM³É´oÑš¥Ø«œiÕÐÒ©+öVãØ¯ŠUZ·¢¦Ž4æ¢7öaÏ)eÁ ×öÇ7?}°m9uY“0ÇHŒŽRÓt©#²]éÖA[*‡Ìª»ˆeWMTÎ)ú¹‘-èu,Ê#Ó*GÂÌïL…’Dá3D3Tã;Qèž$ŽgZœ+\D¢§»m)Í/“ùì.âÿD‘;é©´þPÅé’ºT’¦PL"íFv}Cu8†=Bê®UÇN+~&YTF_¾}yé! ö~>mõȇ¦6k(bÎ+/¤Ç%HA•j;.•dL¹}6h¹ÂUº›¿¥óåô”òÜžîøÂx«EŒ*+,çÊ©™Ê'›”¨%Bv0ž»oMgZ»¾¢q„ìCýŸÜB ˜–ZbØ-u©l0ëÎ"ždjyÈEübT¼2˜Œ!Ì"¯'¿Òü¸ÊÒëb4E]/ÄKeA_p¢’ë F¦wH÷V)}Ä£,®õe£RV¤ôÉyvèÚÃ'ÍÝv¦˜b‰•/îHQ’?’è˜ö!:ž´J¢*c+²£¸E­ù.ºŠ2o®™¿ áKåʪe~D'äÇ#±™¿9ëÿ×TKë§×¬J" U©d¡¥+TÌsþ{ÙvuÅ E½†ÍÉŠLzÝ„3¦¹l™Î)*cïTb½„Sˆ~¥úøÃú«±b'†ÚÝ‹PnÄÍ/¼¯„% Y,`ƒ³…wA0䔚!¥ ’t±ê"m]˜MÚLlzm–Ÿ»n^®P}æ-5c…²qPäñ(·.Ðh‡8¨ª6JcæO>Fpé¤Z!›pÚÿ"9+œ¢ ‡*¹,`¬¬‰f‘Šä·iT‘räQ YÄ«y7ðSPùµu°´0ŒÖ=–¯´…?¡ÄjšÄi$…äüklêSÒÚÂ*]Æ_SêµFJvé¹ýªW+Œ¶(µOi ÉÓ*)c~Øtù•Ô£J`„dÜgAÕ§å™ò–Ù2‘Èìúʈ:©¸—OˆgkoŒç̤R…ó9ª’ŒG-coj|•âJJEýò‘öÆïz'*¢©ùDgÂZ3Y’á c%ˆ!É©ÎP¸kùÑò?…ÞB„¡))ìR:æ¶Qlè:”Vªi ¬yªÁsöƒ)'l9uÖ‹¾5Héýµ1 ê„M®$ã™BxˆÉÞŽ¢è—l_¦DâcÓM!žjÎGÙÉw¡Î™%çT,ƒµ7/¦ §: cÖbv»³¿ÄG+T1ŒâìÚ+”â/$r-¼µ/[®/ #1°õô+~Ö«L6 ®B¹íþtáå¿ØSSíåºD•{Ö"Ý$!Zæ*¼ª¥5å"Üûa7P‹“mì…T»˜ÒX@‡m¦×¢¼¢\še+ÉØµ&ž˜‰{©\¹¦e.°Ò“7ÖbºñÄŸF¨áœå¹EÞ&=Ï«kŸë}æÅÕî×ÍÒ2H,äôÕG”ÅnæØë1(~OžR׸^¥«`‰rɼâ’ðÙÅ*¬…²g™4¦`ª#ÉV³©KQ D?‹E×JÈèËÆÅC–œ”d§ß5IRaÛ‚"îeÖ‚o”jIŠci—³²¾“ž¤¢5ŠP‡#)öBŠ*k¾Ñû[ utsì´-›×TPZÉ]\Ö/·&Qr+Ž;1ŠTä:¡Ý1›×­Ö¬j²ê×ó-ý~6Ó›ÌÄÆdŠg;Ð+<LˆÞŒ«ˆÅÃíÆ•«íøM%ŠZ ŽÙœä .^›ÁŠ$‡`„0ü]VCËF1úNô_cTjµÑ(´Rº˜â6vÈ`¤vZÈNýåþ¬ÿâf°%³“-—'~þx Õy`|^iw\³ #T‚ÅRVªfN8‡YDÃdô–$O”FBñÈT(g·:lŠ¡cÔ òM0c{ƒ‘Æ\i * € Ha^{h²I…ã™äSq¨˜z •£go—r”ža(Ù" Q¨tâínù:›‡@Á…0œ;t[€“[B†ÒøE,á‡þ%†Õ\EñâºëDa´Y”oõ|6i΃ÄÙ ,'ÆzËÔNp„ÔÊ©¨áH®Äl ·–ö 2Ü"u*øñðÑ 4°€+Áz ¤qSÛ‚Hì Ä8Ù€9s¶%«ÄÄOkŸ6¼²ù(œ_ É[âÏ‘•ÊPU£&[-=Ò­Fk§aÐfqkW°m4HXJ„ô(‹Ê‡\ Ç4N09œå#•ؘ¹F¹ºCø•MO»_:˜i4¯5.1Ì!”Äm_kÆókPV‚nôkÖñ¥ž ¸`;h°æ@ R¶¡i9ˆžÙFbšžð·›Í›Õ¹¦$î9¿Éiñ¼4KæMežB‘g@T„ q5Ž}sSòç3ˆ˜Zlñ°'ü£ĨCMUéÕóÕôDˆw9.RÕ®¹îç”ú"в‰Qª¤Kº`Ý»Ms.µ–)H‡ oi6%©„TßßÑÎ P)‘™ö°4 è =²;‘(œFþÜÔ¸S€…‡´JêÃÂý¹ö¦]Ò] ?´¦ŸF”}µ5éœÛS±J!UY¦†B9%f‘L(‚…*xh‰Ý7‰œ KQAŠ[)’×~mŸØ—gŒ'¬`D%L¹=r“çŽFó6d1‚ M$KRÇûHRUP+]œ9ËçoÀ¤ér¥¡AÊŠøA¹%¥ <ÿh,M… =ÜÏS+¯¸·!.ñÄ æ¬f´÷–a¨Ê)ºDmÿ7J†­´“I ðÄÁÍäT Þƒ—3Ðõ¤0+øóÁÒZpŵbRì›X Á„‰ë4$ä‹JR0á„@tS;µn–®Äé[•p‹Åx¬º'¼²j¸ò÷®õE(È9ˆ/Rš% ªgàáBk¢æ‘~ Ýf˜(=0ň;3Ì–Ú!Ô1Ž È/ƒ ²U/4Ü6刯"#r”/wO·úeé3Õén)(†¬xŒ˜T8çMaHåœ"9ÄÄ¥ÍN‰m_ü$A"¼š^0Ë™K×Ê=‹}²(¬Žƒ¹ E'g •A‰4Á~—+‰’Æ‘¢9 fí50ô‘¢_eb<0`cÒŠ £cÉ Í0+ X‚.´Î¢»UW ãfPã„“„K'„‹ÒT]v$‰Æ³P ’® $Y蔉Aóp¦$sD}¢Jõu+Ü‘ Ç9„A˜pAšâÊB<”—哨՘ʮ³¥26„Æ÷?;‚+a”‹[u½ŽS9RÈÏûõÞÒš¬£þ·ûpÊU:¤”«øÄ%Üâ#Õû>ãz,›Im'\Œo¯z:ò•Êœ‡  £1G¸V)-ïä—¼¥¹LbI"µ)éðжõ¦êÈo,Õ "•ÂzÞëNþ¤¤b9DPcE§x"!yj.%Ÿ–‹»½‚É%WdǬ³¢™Ú˜²”æCؘ²b”‘ÄpAˆ+õEñþ$½¥/xat’®RCO Ä`¼Ê%ëSèÝ9^fˆµïf›Èí*f Á¤½+a¹Ìêðšr$ä¡YÖ¤(uˆµ*áÛޔÁ+XØBÊ%ÍÒ fÚ©Óò‹£”ãŽ(æë¡V]Òmù%[¨¢¤Ï`”»^ñP;1eŹIÚ>¨‚ˆ SŠÿ³˜zÐ\R (à㮄E‹,†«)(’ (HKÍÌ$›¤ˆ(Ëæfc#\—Ì)BçµÍ–çy7³7}Ö§µ "ÑŒÔÚi{Ì5DéD™’‡(8ƒ”y‘§<‡ˆa+,Ww¨åe¯Ù‘B€ 9Ö‚™4¿ñ2hˆÍ†uöÛ=$=JHŽ|È~‹Ýz~5 †+‘C8Ë3°ÉºqR#Œîȶ¨céñs9¢¿.ôÛ~³×!=dc¯ùU4eQ‚–:J¤#i+ÑSS…ßzXü#rä0BŒ‡ŽdµÒëWâÅóP×l*ÙmBPM%Uceâì'˜n „•ê)$"1H5Ûª¹dEeíDa¥†—I‚‚ 5/ÊÐòVÅ=ì@F HBqri fû–æÆ %Í^6+hí*‘Ç4‹•Ÿ!úôySîìbòí ])xèq e3;º·åkÿ¶šåòõ]éQ¥BMÝ)Ð#8#\7•N%s)O1Ð…9ŒŠMzœÉ­=Gž•+}=MPr†0Â9¤».CP¡Åç¢Ò]GÚí(‡ð·„ÆR ÎYˆU©Ít®bô,ò¥ßC%»PÔÞ’‚æ.”Ziâ ͵lÉ U‘†Û‘È €0î-QÂË iDoÞõ}ˆmZ(ó FpšÅ#f$%…òf¥6Å¢yh]ü_Ñï Áª.y»h[SŒSgŽY§Lö psÙ:\ü÷“¨-D÷;^š.T½eíLñÎB‹gâòxÖÆ‰!›I&!¹Š”Q‘hߟÇ,¥)Å¡å#õ¨Bu9EBŠc9WÕÐÃØzõñ†¨žÒç‹sUf4‹Z.‡a\`„ Ãs‘”oè׉`¬#¥QSœ'Òl=o=…Òî_I¥X‹@RÎ#§ˆ%ÏÚ…»1ŠBüFJMú¬Î¦d_ÒCmìû6$¯A¥º0Õ%U«ž‹•Òœ¤>±ò­½yÔ¤B}Íùž"ñ¥b£d˜[’ÎXÌàâUÞî˜Cxú–ÛV´D[Ó*¶,ë)dQ”0*S„z¬¸QóVt èTUjíôÙsTM¿FîÕ·ÿH@ÄqGi”¤5 #ót…•¬PŽ:®(¨Q3ê.5 1îþ‚è“ì%З’Ä\£˜eꦤän·ì1dÏ”A_‘m¼§#X\NIB@ŒÿøÉˆÂ¿L™t| ÿøüÈùn³’õ§«v{þf—9HÜ&HBžãÀPU&Ø2ÄÔ+OY¿&M‡YFW)xÜpqHKÉÖqUÉÂçý–UêœFêûª2³WéòÒû]©¿¼åW Q8Å)¸îÆN!®“ ˜¸ÂÛ§ëà‚«I•¡0„ÈY~·2®PB ÷·S7¶Â)j´ÄJÏØ¦ èwç~’‚(œ»|ß&' YO2è¢ê}Ïc3yù}b0Æ¥Oò|¼§Q¥Âxœ…9RǨþÒUâçCÒnÔÄÖ¦©»LgÄ•y¾L,žDåÒ\´ÒÎ2 î‚ZŸõÒ˜éW3”)Ž'¨„Êæ×¥RÓ›%ä …%FCrî é¢*D¾ +T²˜ªjvÐsˆã§ýïsr;$ZKÙ]£˜¨¨2™üF"U›h“œ%’Ï<Ü¥Ãw±K„L´õÅÊ© CÜž9Bµ‚f„i^ðÕh¤6ÿ´¸(¥n–zE¼˜qŽ…æûˆ(V4ÏZËgRíÉÕpŠ ªˆ¬òjÑQ1÷ÿmÄÚK$Ùåæ0UÄÇ),3Ò•ÔOð¢²!u°Je¸¯ÚÑHN/|²÷®­›×éE¾‡r¿™&qŸ§RÓêŸóTnç±+bg§)¤*å †#¢ ]­RRÞX¼È"ÊD³ìšU•*œ²ILn“¶„n?N‡e”Ì3•4ÌØl³¶Kî*°(a$÷‹l"¹çeEåÓí´Hkäफ़ÊQâI ‡tc"Ó¦'H¤X¥ÁóˆDø¨!og-œeÒåy´*[ui;"ŸiQ´ÄL½#\¼î#<’SÄ^ÛR[g9T©‰/˜ævWBƒ,‘7æºi×=v“°F“üT[vÓ§ ù±Ðý´è²)iÙ³ŽåVQXAˆ„mü&˜ÂQ˯¯LWÂɼ›ä˜r¶Š[,¥6a8½/ PìʯæÙ>XÊ‚e­ÎßB Åj±™UÅc.O‹,zÔ…OÜQÜ2‘ð©èÆk ÀÆ4±0S¼i{㺚[éGG%NÔ+/8µJ¹¢©HgwÌu­bšûnQ~~m¶bÉ"‡…`«‰–lõªb ­ÔWäçi å"÷±53ª‚ïf~Æõk››Y,DrYLÚÓœEA $ÒSNM¹Ã Jе#)ISR¶¦©ø­uúÆÚuî¤#¤æ!P Ç6déùMâRNó`œRÕXvª(ާK=‹§Jkˆï7a œ©¢îçbó”ý¸«´˜ß¶ž²S¥F®r§PÉ*#ËSQÕ'(¨ˆ\™7^‹OÛ»-ö™Ú™êÉ™%´ºæ8™]b&˜s»®Nš‡¡Í…1eU)!°µòÐÙÄ%Se^O_sb©hÕbáI—R›Îo––=œžÕµ©AÖ¥¸®Q½NæVñ8B¢Ã´ü9w¶é#í;1å{›ß÷ý×ÛY7¼Rˆ¼bjÉZÄçaáL;³ŠT:æIË«¹üùn.6D)NÝøM•*éêú¯iG&×Y,Kí +àda’8U1ìdÐÛ~´³\ô~»HÜä•VÏG]VG9Ò©â‰DÃË»[|žŸÔbêU(¬¬œ¸„°’¯³Zê2"«È£Õ9 ¹ˆå²õ覽©¼éŽl#N¦’,èÌl%ù’ŽƒÄ*.>:—“”„ür©i”ò[™2oÂnÐAJ—Ìö!†·I–þyÙ†3ùb-Д}d'½xÔÂH†Rd"œÎÇsš¨B„‚ñ$3Õ¹Ðá : ° †rŒ´%R°£‚¨"†&='hYx JØTD ëY"b±Œ~TÝÉä)ÙT¹añ¡‹T¸#NfÊ8"é˜^¥A¡®*Ÿ›„pEÉ„¾ô Çy’ D†~µðŒ ÌgèKáé¾…¢ÂxŒ› %eg@ÿ pÅE† ÎAÿŸe‘ ¥b(‡Ð¢ž…d¢:›8&4@”¢ :”( Ääg' ™pa̧‘j#GI¬¸r˜æl$A ÖsSÃñR˜8ƒŠÞcP͆ŒLkãÆP\ã¸DQ!’&m ¦!ÀE Å¿Šœù"€ø€X ßô‡ïŸòuh@ùÏ6A>àßä ¿³ È;{qQ‹Óå•v&ã$ÊZ·ÙÒåE î»ï)T…q ­1Ä]^Ñr¶äŠg'sW3¥µ]šn¤„ ”µsq]Ôî6PL#IÛ#µ>î R%•Ê~§[<¥J rrY2£ŒY„O6M£³¦wyŒ¤É°-ÓFYRò/ˆ¥®y‰´CüâèJRîšDQŒM~[˜yF;ÑJ!±Â}5IÂsئ?›¼«_K©ÜN±ªºÎl(¤NLR#Eês˜¿m²¶Òi3(ç§YÞ²çá<_8#˜äk¯Pì¸ ¡ÙÈB_‚Š)ªößçªMs¥¦¯­{j~¨Q Û• ž%µ£¶RúS72MYÅ=/õ)“¹cŒ*ñûÊÉaDÛÅ¥™Èm¨ÌöjøFV|§ JÓ’…;N6›Úp ©n:2[Èšc²–…Û´®ÓwTŠ.dsS&²µ+ZPå^î댉Ù&š†C&C_ϹX"î±ÙÒ2sþméyH¾ø&ä•ÞÞS(µ–(Ï$^ANW^ª˜Ç'jΊ3’ÿµ;[*)ÖÁÈò§ñ¸f§çŒQE_ÛÛßzŒ·ŠvJº ?á&Ká13œžñÓ«YE7pämLu$B„M.#,cæÆ0±âË@‰aìuk{Û†â¦m/Ñ|½À£‘ëhÄNÉüV¨ÊS"^¸t6Up–ÒYù½*Í©#îÖOb•z®-Æ)ö"™»t¼ŸV™eÂÌ£23Üí?ÍqŽž9†OB®)4¸_ã 1BIÜ=ëŽf¬ÛeØ´Ö©„\Ü ÇXC‹›ë‹(â•¶£FÕ̘Œå–6X¤6´˜m™ZÔIT±7Õinhˆ¡ŒfqØÛR~µ4uâ…pCVƒºp•s"e{9ÒÜ!x”úºá]V¦1>_…s‡¦T"!2Ä3í{MkœW-}H…ú+3Ò˜5 y¶pâ7ué#ª—‘eC¥Dá1Tf5»'[ðõ1”ˆßó"?zétng¹›V÷U"yYL«×ß ;VøÄCå9Å”¥³~•®)0à‚7Èg#íÌËŠfQ¢2–›ã«[Èûkoaí„z›;œŠ-¢RëòÇ1ËùS‰KŸÝ|Ï«¢©o6!ÎzTú™ˆT9BÞ#±Y§TOÇEc„pGJ’Bp{q}dúÏ/¡Š³Ñ¬Û}=6¤]µÅ !]ôeQ|\:’ã ´¶©Âb6Åê¢Ö{Iªš_”¡I‰ ŽÿzÏò’Ä"”c ¶)0ŸFÒWÌgùöp¥þ8ÕI÷&Góy¬% æB^Œ]g)„kéòB;¦”î]óç9P­îâaÏÞRrq žŒ }MÎÔñ9j¥òþTY¯-©S¶ºÐÔJÛÙ‹:1Zq[öû rܪœ‡±»‡ÎQ/j?õ+D&nÈ᪃=DjTDÆaŽdŒC½T‹üÕ!noïÔkWtúßœ¹è'¿Ÿ99he˜rQTgþF:³©¨µ’ L›i´¹×èz,–>3ˆZ0–u,¡qiTrº;%Y‰æÿ÷Jp˜'UõŽóFKrkºª*ŠChº+ȪÛeÜ@…ì;vzo:ã÷Ûñ‰¸ËREfK6“Èšæxbµ$?`ŠI„Ø"0¸ ~¥G8Ò„*,‚‚[1V¹Œ5z¥6¬l2æPˆrèñ¥A"nsâ©"ã3˜ÐMh˜æéÔÜ£;>¸B¦Bˆ¢˜+:¢ÖcPœ¹xŠÉ™† ¢ˆLLB–^Øj`¨ÂòœU \%s”8tÞ…æÁŠÆzL‘Ž!¨„ ÂaÈr7d‘Ðs(³æ%t(« ?­õ4+ïøM lÊ„ÊXâ:VˆA¼ZQÀÙ4ƦÆèPK°Ž-mH„*¨ˆ K"8æ`䮹„PˆHÁM}™±Q-7"óüøC#l¸ž•Õßñ‰QñNÜPƒ¶• f2 ìÐe2ÀÁ„D(e8š62pæ*VX}T1D¥ƒ°Raô)„LéGf±DF¤5ÏK5ÎÄ|Â8Ń=ÝŒPi ÝÆV+×q‚0Ÿf#+#\ÝV䈂ó¼Q ñÓídq!(FºÉ8𙑠õ1pËNðZCã÷„ÀÊŠ%0ƒŒ™DD­1ª˜¯0¡,&ÞŠ+aÆÇ.õ½R"+„5/ŠåÌ4Mh õ©ÂîÇ ‚'1E5N‡ LÁ9¬=%4"®~¦J9–µ@æZ^;˜áÔÛ’“5A‰a̳+,â]_8üCÜeè¼ôsúá#‚eaIJQ8¢#Á ÊcJ׌ 1{ð¢fò•},—»><(åÅD \GAÄu)š7cCŽq"VB±²!°¨¢Ú†V"ÝÂ*i á€æÞ–ô7nUÖéÇâ„q Ù ´½˜Œ74te–Œ"SQYZŸÿ‘à¨*¯Ž¤äí†MH([ ‚ ! Œk”—£>)V< ¢W0Q>.«Û²‹`¡ 0ÃHbŠ%DŒž¸ŠÂˆ¹DpŽvîä7ìn#2+p@-çG@ÃïnûÑ•¨%ðCÚC8”ètÍ­dW² †g§ +BÒš›0ŒVaÜÞÞ.uIv?3¾‘ž<(¹D½À”€Éˆý¹ˆâ0! ×ñ»3r‡ SDýJ¸RL¥ñÊ Ó³:°ƒ‘—) Øql\TLDâup‰XÕþìTA1Œ3´'½¹Æ¢ %AÈŽ‘2²8•©ŽE< 1DCPD4–¸Ñ rãRŒ<‡H¹áy\^è•åBPÎʪM`0‚" 0F™‘~D‚ÆF¨ëáu9LǧQ}ŽÎâ:è ‹Âpg¡"BàO’ñ*A/b f2… Ù±2¼ßLT"aã­FFG Í„¿ ¼ÅqÖ;hN…˜·@¤ùyÂ-&n Ä™_ºLbìÔnAZ”’&Ë\hÎ$û¹ˆ‚> ˜1ÙÅFÄǸ˜¡ B ; ]¼)¤¦!œ X¥™EpŠ&T¶›ú‰Œ…ØrÆØ0‚‘…1N/5D2k†HÙÈõ»À Å€…½€àFÿøÉˆÃ€²NÏUPà4uÊÿM³’å°£×EuHßy \Ý™”᪄cƒ“ú©Í<ħ±ê6¦#"FîFeÓ"DëÕe3„#qº¡‚§±°da °(ºº1ÀÔ@ÊzAHcåb/ÁXR¹B±Œ22Ó AĨ¢fÛ‹häP…"sp"#'¥‡}”2±Ÿµ§ôüaÄÀ††<ÿs+ ¡<ƒIˆ“öB D(Aòt$ EÆ<ôB˜s‚ŒØ#´"£)šØJ˜Ž2üRÚâš c…æI¶V ЉÙ]F,P!d˜Q©ÄêÞ¦‘Ä-屬qÆ\ÅȦP­nÂl% 0¢<(¼¥ÈnŒ¤˜ØÌæ<†Ä%‡P©ÅÅC&™ÓD9¹ 1ÈgUÇ ÌÆ¥HA¼—Ëo6™N´É-Lë=ÌîUobÜÙA}*ŠUf¢¡Oï_mY:f¿QµÚbÈÕä{>¸³še2i²×WŠiÛ K7i554’±Y37¸O\ã xRN²²–çÄ¥v/BéZT$2/µ‡©¤\+ŽLòÕð¹Í"UOZQŒ¨fC“J&6å(|þf ó7§Õ|Ê´x¬m’Ï&÷•¤$A+ƒî}‹b–bÊI™üÒ«XÒ¡ˆG? RÉz:H!uÛìÍ)vºúxßÒhMn1ž³K– êåeºNN<¸-ðú±ˆu#‘|ˆ*bÛ,®+JJdL&(Hx”@Å €Ã1ø[‰%•K$„m´¼‡$‹aÞˆ]C&âŒ}|ž¿ï{ J s­“ÊÖ771i‹È³fr”vI¾õ;î™–û^Ø€ÁÕ¦§ö ôrq¸èT9Ä‹„‰k”b-”¤õÌÖ,ÄoÿwÇyO¢1Sº”$©åCl匣¥0*CÓÌ8X¼Fm±bG%„ '¼³ü"®,â*Q–L³Îê¤E_þ¡jeˆùSP¹ÿZñ™l¢¦¥Ù—)bâzÕ?šl‘£­ÅQrIb>êHjvBŸ ]šÜ1׿Uqä Œˆ¥á1d9DRõ^¬b m/-~šBþ¤‰è” ÆA"9œ·V=ÝLìÍ£L§q\¦‰-ô:I £Ç•„GòŽÉ&5mNÎe"´ˆ™” Ëã¤ÄíÒ;P·(•yIÏ‹…ßî&5EB­ ·}jbåeô¶bqä¦0à EƒÏ‹ÀNÊ”Zt|ƒ/sàoÛ$¹HHôù‡œ‰æ¾ƒ3…‘;•è¢qœb.6­(<¸.½îá½Ét†Ó°çp¦Ø±­}á;Y\v)…U·m/YF&:`üMëw9;SW:á!¸¡B(ÛQlÇ}¾N_\Sвh·¡\¥"jeÖ¸÷Û¨b6¤«”0RŽìékqÊCí~ѤÇ,„ŠQÈÓ'›«juQ(Å1TË ”é{ŒOVbg\&óñFhŒFý¼•?S]¦!eK1ú¬‰ä.¥´u•&uªJP©>uh·ãȹ‡ÿÔd¢R9&y—6e$lv³±Ü" Ñ= a˜CkmRÉgÚËÁm`J)×ðhÌ}2Xi)L8Öèµå˜SA†`èÉ]újw)Kk]ô¡;˃QX­êcQRbJEÅÚ¿SHæ3!„ñs%L¿“Éw(£WÁ)JJ[%žm™Fv"݈#YK/§x²l˜µüœ² Ù…GUº³ìå}DTLS´BZí±Ú‚ 3Êíæt7“¾÷úIFеC a¨É)ägVºÈÈ)%i—‘E§n¦ †›÷Ä1¿²I»žN%Í+êÿ—L–/å!¬mtc•ž•6³¬oûÙÒ ¬Ú_Ü2¹Ä ,³Ç¦ÂøáETÙâ)Nqr,Æo“ò&"ÕÒËÜ—B(¯Î¦™®Æ;Láƒxú¤­lC‰f¡Ë!4Šêl‰ö´ŽÊK-™ RbŽf]&eJtŠŠrÙÔ0Æq“°¸i,?ý78QˆÕOؘøvW*QLõJS3†9Hk[ÿ6ëUwG1–{b[hÃ$ÏE>¾a.c-ŸZ}n27öm¬^’DY%lÞ­Ö9ÍŽ±Â5Ä©¤%õŠWŠIÜ`3…´O3ÖªDb$ãÈïãKˆÕµÉfÌlþ£…Ff0†£Fù¼"•È" i†â’Z¶~ÓTž"E]ÚâJúóМô•RcÙd\yRÜ&ˆbØLN,¤ÑDD,Ù^±9äk™ Gâ̌½.Eòš Ö²‹qb–hjáÛ>W„ܹԾ‰50 ©+²’£I-’èiÇõv ^3Œ§±õ§ÚßqhÅñ5ºšhäs§’ÅÚ›J«#;±C¤òÿÑ2œòÊ¢%D$):¯´ê±j¶ażtÜ-”’¾”«ßô:Œ¾túÛ "4¦‘ê}™ókÜË*T…_xJWÆ¥$qFù”„󌟉~›ÿ[ÙnR]®\!9E4EË>4ÆXPN’é³~÷üFJä(¾?Ú%°€Ã‰fÝ$Ôw²'«T—QSEì€ÂÀã,Û!bVù{õ…AÊØ}ø¹,®r˜v3ʱo/LÂÊÆ+˜6Ú¯ÑxR"© .Íí!„*M‹4‹”L„²ù*lÕ%?,ì ¨1l  Ç‘¬ý\áíÖÂÅ;2PA(K0…¦3Y2œ†àä =-ަ ‰A|‰‹‘ÛiÁ%ä%/„UÒNtø9.×÷ø‚HvŽôt ÊbR—‰úÒq-M¸C£¹òÄXµëW÷9us9p«¶ #j‰bXCÔ™Rw÷;ûý’þ›2ŒÀÏÞ¥ ÿ(€¼’>Ì7>ä2Õ2¥Å2?1 CRÞ°ÃŒ!ŒÆ§·’ù}!¡3Áqàª\ä´‡œÅR8†Ð@†ÏjÀ‘F(È‚>EòqNÂ&@±^ă…—2Bœ…2ŽÇrHÍã5)9Ñ_@C NŠ;)úì"ò D0A% "¨ÄÌ);ÀŠÆpŽ4¥2³cjR5 1WÊc8€Ú†/2‚+X;"&(Ç÷~8 ±Îôâ@¢(r 6. †@ÀDÃi a½ fB1ó¯;Ø0íÊê¤E®q*¿6B5+Ñ èŽná…†ŒC¡Â°²C¦ 34žÑî³Sƒ A%S¬¨tbÁPå*(†)]c8±e„1¬8Hj¥°„&43X¯wB È÷,ÔâŠEOIJ‰XnÅrF¦òë†@¸Âˆ¡ÎáCv®±P?F0ψ°…‚¨¢ í‘QÛ©L>Q(øA„ Ÿ ¼Ùï p‚Y!‘F.ã˜XT¥ „!6QÈ ¶ã´aUUW$?åLwL‚gL4!Ê"šŒ1# L¢¡%lHã% YûÊZ8#æÄ ãŸ0‰FV—…¿)”öê•Ørv*9DlB Tlh$*s C‘ÝÎ(LÇ›JÄ6„X%( ³œB°1 q.D(8Î!à ØÀðƒ!Ù“¦NɬpÂ+f§£2·\0¨º ˆrª‹*yáaK¹ÌÛ%Vr¶î@„ ´.™Œ%¨@K-R¡ÈÌdæù…´·¬†=Œ`MÈ¡KËL íB â„N¢@‰ºk L0Pë¯ › \!§Ïó刎Ë@Íšfu¬ Ä>?”V*Œ`Q–ôs” ƒ”œM/ÑŠ.‰Óa†@C' ÛAŒ „ÉØã²áš†dˆñÓó‡i_ðÄÃ( ¼Ç+OG„9 2ÁPÞ üGm¸Œ$Ù²qØŠ zŒ)+_fPb™{«°©Ø3“œ„¥"c·Ë´Æ;3´H»?Œ«yµØ†çòê|[Œcå†te‘LAL+ !ˆäA Æ9NشлqFØ1àP ¢BΉBÇàH5ÍRÊ#![ˆ¡¨ßH"cÌKŒ7ŽyY8‰¨œÑst$q0¦çŠšó Ç40MÂ÷CäA:˜ 0Œw" ëLÚZ1ã¬sS2qÀìiÜ6ê&gDqµÂ¤ ¡LB£0bHEÆ~W¦ŒEÚ»Ôã|V(7)£†œ¡ bÎE\nb0‚rG8C0¢nA¬è@eÏõ…v!‹C$,‹Â•a¬+âÐaƒ‘LRìU22&žŒž¢ å8!p=@‰ªÅ™×WÀsÃ1Q˜1%£^H'.Ó¾¦3¡º¦ì¶]vFqÈAAw«›}C³as%ÕõÝj2z“0h¦;f9û=Ä^\RŒWM‘¤\ÖJ&Qȷŧ¯XŽ÷}wļ¶R5YÈG‰NÍ›žÄ9)F#ªõlÑìL£vÂ^¨…‚‰]¯ÞÔà¬bc ¥¿ÑýÛ;I*­yN¢é>¤YG1‰î¦u´­#™“•uCŒ §…Ø£S;²ès‰ë‰¢ÞKu·Ó×$õoÕ;‘ ºÉb¹þ+:ä1–í¤ì»¼„:®´õÔÊùÄ2Jn,Ñ5(Ùj¹ßÛ1(šä–ÜâÙ'%Òì’ÐB2? `Â& Q$í3 ›!Ð+„¥K†°GGÌ,Sбp’:Á ú&ðôÌÙhœ"6`¤ù˜dFx, 1ÝDb¾ŒÃ ž¸¢©î‹D¯ÑÍUŽÂ ˆéžœc D·xƒrõdø½5A-1B:8Q´™ÁD1¤„ßÞ•}1®¡„1Eå«ßˆ1 ˜µ»×ƒ(C5¬ ÆäìP¦¦oŠQÔ¸Á3¬"oÁ;/‘LˆÄµÙ‹™ÅD¶Ö0éÝG¹4ÊQÃ0Fïë™$„Ä)dbQÐ3ˆ¤PË뀢<1„†âÅU(·VæÄ‘"=’àv¼G+ˆ 8€—Z6%íQ› dFÈêçBh!N ¢pTŒq[Š`¯_Ÿ1 ‹ ‘È&EC Ä Áˆ8OÖ”È0 Šè³ŽŽ,”[ˆ®ðWü#ÒGËÂt#„™Ž¦í`œ!Šˆ’‘ ¢@CmjæììHx#>…˜c«—^§”޼BÙ‰˜€Ñ”!L¬B˜„# aƒl1Uîjijâu<=þ)Ùæ+Ž+W9‚-íChñŠæÄ áA'LJÁ†U‚¬SBÁYø¡9yòýî?ÂŒê&)œJ©­ øE 0xWmž´‘¯K¦5(†ì $TØÍCˆ)(IÌ4¡ŽláQñŽ.^gkÁx ¦°D P "ØA‚ OT‚ Ç€÷‚¿Ä`î‚QÐd•aÄ¿ ¦D¦”¦U‘‘ ×90Ä9–™Ä„±©ÿ„‘‘»°®*KsÉŽDrñb!I/ÎïRü”áÌnL!™LôÑßRî†K¡²è’LcŽûWý/EÍ>e:–©3*S•&I&§Ð·Ö#p·/;~¨¹ ¬zæÃ»ñôŒ’¤›•1K·b_›“)¯Ká’NÉ?ÎW¤[”C:4‚aÔB”­†8*ôÄ1]GLak³wˆâD„°BW±kkѫ՞µµÎ—å"”‚½'åø@C‘ºÁ uüªáÆ9IŠÎ3^Ô¨èZjtŠ)e—ZvCe¨ºcóê}(†@›µrIj®oxнòø÷¹)š¨(d39R€ƒ˜HÛEBH;ÓTVüÖš£VýA©•:ïü¤üVDQªÜ%•çÂ,„IùPõ•ÿøÉ¨ÃöNÿ$ÿ _`ÿøÿýÓ³’=㇫òHÞú@dŒR&êÜ})JÈAÛˆö5ûÆñxTÿõˆñà88°òÄøJÜÑä§ä˜˜$&0¦).梕ÈäM´( cŸè*•Eá(›™ ûÍn[YèŠm¤»Š«í·6Xj­ÈÇL ŠU ¢ (DÊm’ÿâIL–×oN Tr/"ó“›3*K“©ªû¤Ó*NzNºBDr”ÙƒóÚ¯Š´—ä=&Xëråt†Éy­Ò܈´9Cˆ¥“PRS)Á+ZÙ](•ÿw0Æ ŸGn`¦ÃŒûó]ÒëF¯“ü÷{²¶½i&õY´h›ºï¤J&â«>ÈšK¹]@tP À›®1ÄçËÏF¢ Á(òÜ™FF z²‰Œ{#”œ„u–ÈŽ5ŽX…–c\ˆèsMIÈ*ŽŒÓR¿tЍS\Û¿35ª:ö‹i˜CzáAF{Ì!ì’y ˜\Bbúºk™ŒÌw:!îŽrT  ‰¢õÐëS¥Ç[ÈyÑ®%IßO¥&Á;óè„TÚYT¡Ø÷v QG ŒôµêÆËÑ6¯š†:±,bªKW£[pšüº11 Fªè†ªÛQä"¬§íQùž*Õ+‚m*r‡Yže™Õ†Å±§‰jÆì† d¬¥2šCV,šM †ôŸ(f<…,Bý•A—˜U•çÁ©…)ÃUˆßoj?ª³ÅoÁ¬ÈAp'˦çEV¥zˆf\ô«š®B8f(¡ Ìmv"¨—øÝæg}Í)yr1®…™y]¼>Ø“½×¤6?8â¯îE;9嘵|pÇÈ™[Všc3JôW2<¤±­O¼›¦B ‚Ã&fŽ6Ķ^ãÕ¬=´Â\ÖvœÒ¨•êîb ¸ 9TZÅEgÊ!¾qj¿V//¦êShÚ/¦WUÜzÈÄ-3l¨(¥!ŠS‘äJ™2ô Úk–Ö6yô©¼ZJO+wJ²¯YG¡è¾ÌÁ±lFQ %E±+˜bY„ð•!TæIŸž¸¢²\hJD±Ð«V2Ž 8Ð× …§ëÇÛUD¸ûѼC wzr©âèµN``‡yæÈÏ̲ ùN¾”#_xIzY6Øa²”ò—›ÌšC g²¥˜B¼Q8dŽy*-Ï=Å_ŨÊEþR%Hù—Ñ2œêÅÇe¼‹I ) Ä¢A Õz¼‡+n OÖPÈ@r{°ƒS4§šj{ÔžOSˆ ¡ÁZøî.RÄ… ´\T³éÖå©ê$î‡Z’dh8Á§äÅhžs10²µµ–’©ì~ÕRÒZ{š­rQèÛ)t‚U6F/:]Ö3(+£²Iî”ѪYø± ÷ÃÔõ‘¢:9\Š´Be­Õ ­«×sáw˜G1Æ] ä+µ¦“^o–@Dn£ˆå”’.—áði9âHÌ*CŽ<ß§Þý&½l_*ŸwÄrr•^çJ²‘(aßE”˜‹äʵ‰ÌLwÚØÙqµ¡ä— !Ì‘ó’f6‡bÙ0ªK¡1Œ9BªQrÄDqsoM‰"$–õeê9qk)(Wl=|Cùeh•¨ƒŠ¹A¨]B•pG"0ÝøAÜDË”ïƒÐ†0µüIaº·qRê‘CB· BšZ^¼’ÍL°Xô¸ÁÓõHµv’¸ÄÔ0ÆDhñ¶ågAJþo¹5Îȧ±«“…èMU›PZº÷HFdc’âú2 ª!FpG(È¥ª¾‰jÂy±ßÚ¹V«"ë±÷Q[DGá:Të>•å°žÈWtoÜ]÷(™Ø±%Ï”3Ý,0ÄŒ”¾žý6ïðÞ·´ H‚զ˜álL ¼64JsíõI‹–.³$…¼‰tã'H…Zù5Z¨Ÿ+éŲw .%9ÄŒ~ËJé•E8ôeQuJºáA‡Z=ìÍÒ Û†¯å}ìuL1›v¾Ì؉µG%®5 Ôx†dƒ¤´°ã2|ª7Ä¡þ5¦FZGZ³H†F¬ÞizÿVåÉÀ¡Ã½ó”¹l“éBÛÉ›ˆ‚#žæºf¹ØV°BE_c¶žB´Ý3"ÜÛjŠlŸiðÑãÖqY¬¦a¢³5&W±9AlòŠÐÍRŒ8ûg>mR…¸þKeW’’ÔÞ© [–DþUJ”‹É¥šM<ŽêIM•ôq–̬ù•õ^:”¦W Ô.•¦6é²I$‘D34À¢AôdL—^¯Ùy/HáSuŠK(e⑈i¡X $Ñ2A ²<¬]KX¥R!Q‡ÔéøjV”û Á$feºÝ3R†Ì¢rBFq‡à†Â|ÇÌ’ê›J½‰XGŠR•—ßfòn{530"¾ï[ëΉvÇ×C§‘v^­m}8¤°“=Â(f‘L»Ül-)ÏR%Ì¢¬€€€ï»¹Єɿ]«. #‘? Ë…pb–GCŒ8f4•±—Í;§CLù¯žJâÒM­[-½«´Ô§,Ç} [¾ÈÇkÅ0Äl!Õ)Ë­5GÊKj’¬·IÕòa¬Ú6dú]'„:qmÿO)ÊŠv9iFE=ºze±ó#&càÌ"$åŠÒ`–½§º^éA+T–;ã£÷SëÙëùD[•*ª¼–=Gh„¬«2T0Qž%xEf©P–¹¨ÂÂ=ê=BZytƒ=ûþ²cwòè[‹Êë)bJgeGó*yî¤Ê My\ò„Þ´‚{>“*U,d3²–ZÑêe±0Ü\0eEÈ’§GÎ{º•®qND¾¶‰BV°—ôY¢$; …†nä_®õú‘¾ñd BV“8Ó,…Ž12âGZë Z”v¼g)|[¡Ù|eÒðÛòëÄ—$ºÏ±$MŒôw-Và¬Æ,¬AR 9N?Qh¿'–f–Aªæ‘XBµž¯”ðϨ q°¶#”É—æãŸ*ÒñH%óÉQ¹//ÏÖÉJO'Hòƒ¬‹:…ãÛäÓd¯íɆ(0a’1L½u’–Ρ3ËÒËY(ºêUE•Ô™1ÎE [I²~¢aE­ÂL—”ÜR‰äÿÁ?Q¹ÕãØ®dR­^¹K©ªa⾄2s„1[Dyz-k_5è}"¬®'â˜êô% ¸–2¢]åÉöígyT„k£‘EeNÃÔmÄÝ]z¶¹šeêš#ì»ije]¨ÃQ‡*ɆA[¼’u¬% è½Ô}oWBЂ©¬˜¦ñއ @[Ï8ŒÒ3½¨®¨W”öé[}d®›Óð&²¢ ƒý½Þ­•rU–ÄŠÂHw•~ìt£ºKüLøÚO³Å÷Ü¥hV¬0•=¬Z/»¼Zêj!lê•ÄÎû%TD±R£,GM_ë%ø\úwþNxA€€ @  þ¨dÀ…£Œ¾@¾¨3¡)AZèîl[ž#þAÚZêQH^ &Ôê&8öžêKèá“/ÊØ3S&+¦XUdæ1'žŽT©µh¾&ûŸ4¦t°šN¼Ó/žÜ‡=÷ÝÞËž¨U²Õd(#Ìf4L! …WÌ»Ñ9JC‹X´’‚$·¨”¯-RÍn•’–ñY_#ˆR%´X‚­ˆW’Ñ ÕéÜ£g©KÝ´\A$¾¡>ÊB͈#§¡á÷•ˆ¨Ã‰ý1E›,96GjÈ#Ûd)¯Q ö*2Yò•+åbQ$â¨l»*ZV›4ªm˜c=bË)ØúŽˆäŠ ÎØ;²àªR’»†“«d‹\’h[9òYºzæÐøÄOТ—L@a•-„+¬¢LW ÄkŠ*ùºëýd¹Mù·zVôù•ɧé.£BTûI½BÍÉÄQŸØu‰N™³†Íì2ÝQ‘«Nv-¸P,“ ý’$œD­t©4œ§8˜f°×”éNƳ<ÔcRÞÕ,†+ q\Í"}|dae )§Ñ–™U-ïå·ÐjôÄjúŒB®gá–äÃeN8ŒK»rrצ pžvHß#Èsùm&§6k¬Ëö+²•ÌzÝ/ZJ¶ñél«W=7©…*Èb/’¥/Ö˜Åê.3ËÊeeN\©zšÚkiQ÷ü…}’S0è*¶`ÆS e¨‡2ýý1éJ†ê9?U×ç“nÔ.úvŠìUNtã/˜r“ýD9¹ÆO[(Lïé¯b_Ì–õÊn°B)(?'oøÄܯŒ|•‘˜†zÈtTäz“Æò c2^& J€Ðdd ¸‚ Ï'ø(9 ¨ìœ†âÅg™°™Ìa¶ã$BwM˜!3æa`˜3s“N}š!UÏlÏ,[ã÷ ÝT„ îd1!=ÍÆ Àdcc™@é  Û72Ç œÇýÇ¡QH*S|èÆ@ß. ;àÈVù˜Žš‰„‹üTQJ¿%„iF–«7!œa$Ö¹‹Ý£t,¶³ñœ0pµÒ¯È Â2! ˜"9”y1™LõŸŠ=è7Rm2º˜ÆÔ+V eª9ì †Õ:|1N«P&6.D£MÁ¼mº‡rÞ mù0™@”0@UUàæBë{¾£FïeÕ K0``hYb-¨ÁP^Q 1@ÈLUáDˆ½cˆ¸háŽ<*x°D11+0Ä#°TzÊŒXc,NuÁ £Ð?t3B‘hX:QÈÎLÇ8ÁÃ/Ň5˃÷.1ØXR”*©ûÇÔ!´D)Å!z½T&1Ì7–FÄC£‹É‚G‹^ßI <Ú #„æÏF‹ÿF¡HáŒ+_4)Açðªè!%'` žäR ™ ¸VW9¨”!9Ä¥)aŒa8ù† Â5%ˆâ)"~Zöh†Ÿ‚ÌÌbЪWܬHà€ˆ„Ã/fŒqÊA1¸¡bP ÉEg`1ƒBR?¹ÎnÌ~Mž+CÓ….¤«:‰g"CQÏUÃ/® hÆ® ÔœXRJœÆ Df¬§è¢9¦(¢‘ͨå)»…8Ž!Š ¥¡©ÝJ M† c0ˆ@MÛºK½ÈÜÛŒF@JêF¯š)+d@Ué„Ó­MA„,¸{±ú>ˆ™ZÝCeH¡ Ð‡ ˆ$®tM”;™„rÆ 1¡8`È`ï¾FáC>ÎAÈFaZgÄxQL¹#âSÌ¢4lщ@؃웑Øp”йEiP—ÂÈxP\Ê.X "i©Œ¼u¾1OטE!” ðëŒÂh+‘‚Ñ&½‹ ›– Æ$ûx¼Ü€¡Œ ÞA €Ð¸œ¨w1Á3@´Ç1 K#P”ذˌˆeçÂV¹ÃP‚‘œÏ-^†IQ¨_lòØEº%é¾a^ÅW.ÄL%2œþÌ¢­}v¿ú¹Ä^»£¾KvIW$ì6¯ß^Œˆ^êEFb2‡:HlD¹RºPÝm䪶ßy„/)(Êcûa¾GS1Hç¯ëÈÆäŸ÷ÊÍFö19”¬rÑäiG.£Ó„Q+i“Õ¤\ªÕm—„«mØ™xÚ\÷¡V!dg$‚q]v¸Í•Ó[6…cŽuŒ¾U÷Csk„ßW1–Ü×AXTm n&¼Ž•µ¯“#—E©Ó=T…Ã±ŽÆ4”O°ŠfK Râ+#Ü–ö7áF2ªyÈT}5>‚íKb¾-(¸#"ûX¬¶|älkÿ/Ï•ÛnY…q(YgU™ÔV ­Š $D¦PoPÅ7…Z<㢠! Ë>¾ÌÕƒ•\–˜+ÚlQDÍLqRCáJ‡6Mx! ¯'[ÌѬD¹Ëd Õ1ÛÒhPœÃ±ÖÜEc2 ÄN‚ Fjê#URñ#íHDÄ ­è`† V£ä* ß…/)Õ•ÏSbâÄÈ™·0ȨªËHZ‡ŽG@€ƒK¾`”LªÂØÕ´àœÀÆ&1Zpªâ˜F:©Äþ–¤ÄT! ‚Æ0:±HHŽÌ¢ÆÔÇòôçL@,áW†pÐ\(ð@pÍÈe‚‡aiˆ Ü@ÐÜt‹‚çjc\"ÂIWª°Q Jc„'Õ â/$Æ?1óŸ/|œ±I$3 @ „x¬™;ÐõW„ƒ !'d S¨£©’‘š¯‘c÷¡È£Ää\MÛ‡c@ƒìcÅ2™6¨o8G lD!šzs³´c•Âðx~¦ÆBA†Ä0]!Ñè¼HÄ86J$=qÐTAFÄ«NCÌæ$°¦€Ã›l¯‹•qW¤Hp!'Åc¤Å?ê„ Ì!Šb#¹E(§R–šššÔ¤1T…ûYA !„Æ>(†)˜"5$2#`ô.ô/r™•õU1 -ôô¨±ê¡"Æ0 òS†D‘Z„bv“4‡<9wõ›C3˜vw‰š1ôEVh&2ðªqX˜#>b6·ÞAu\*;ˆ@ˆÈÿøÉˆÃ‚¼LýÇüÜü*û¶û‹û¸üH´#¤3Ÿ‡l°é|˜f¨–Îç$ŠEÆÿÿ6„­#àmEL&oŽq ÅRÌ¢1Âúè¦Qöû¬!™•¹uQ/×·Zzñ2Ii÷)¬å [1Æ9jŽgˆpŠ˜<…‰]£ºšŸ¶rÞü—eÄzÓöÄrˆŽ¡>ªs—ÖÊ*d\óLJÝkßáæºê%q%ÍBVÖFßµLºmdv˜ †/¼Q®=°˜-|˜ü(G¾0ÎL T”ò EÁ„4|a¿x˜ÔÌÅRYQ‘3kÚ Mµû®ÉFs)2­© SŠ“ b¢Ø!ÝÚ™~“­Âi.õãùô£ŠU<¿Â­‹AŒˆNiI”©j”ì’ ÑÄ&=wzÙÞFGni“ÉtLžé„›I¨“7¹C Ò[ŽŽ›Õíµ3*<ÒÈân™(FD#}!ÀáTx[AΪùœ]EáºÆâoIä§!|oóøê+rÓ2â"”ÈFæ#ŽS‘^†uS29¹»¹”¡p—F—sF9]œÈ§å‘ŒUOêdòîÑhÄ—i¢·³•…AÇ8‰ÝªBᵉm56ØTˆw‡¤Â¸éý"Ÿ¡>N­§åÛI†(ÊO0…j¡HAœéG«ºâxä9ÿhFǨ¨æ²‘»Õ>%d »&´NÔ%Hs¢­-¾£:ÊÇ9ØÜ`â±6š„®S¸‰Â\¶g©•†¾ß$IQš[S„r'Rc¦›¯…aÛRÐJnϧµº×QЉƒ'Ÿ~Ù”s“¹q„aBÔ Søþ[i9¯lížßQ I½%jÔ…yƒ!™%r´Dei/ó„Ôó^ù«m½0®òõ|æÔ;?¼¢«1ø¶"/(r.TÁUAØ0˜mÉ2Ûa´JH6˜W¡gÒ+ˆìâ%—3¨ˆ…4ïæåºm=Õ$UBV¯) ÎÙWó#‘Œ‹|“PM‹”R-4QCÜr6Ø•›þÓnk6ŽT$8ìºJ¤ÈëÆwj£ç RbÈ‹º²·•Ó bêV…¥âvý÷WOKé\å+WILr­HŒ¾„+±Ça„@©K¡,{£78_Ç% „gÙöœˆ¨dëå*9•ËjRèÉú'Wº³»‘ˆj®ˆÆR2»£ÊË_ÿW¥:a‘ÄŒ: "‚:¡Z‡—âK¿ÃV[lnà…a¾ƒ7ÈÁX‚¸­F2ÌãŠR¦·Ÿl+*WwÑLÒS¾òÿ>M)&yHTUGÝQ…s³EYЦXª1Ó…Ò}ô¼ÆäÊá :SšÊÊ3­>Ÿ"ˆÚC•ŸK¶U«rbÛv…ïåk?¥¹5 D£{ª¹Žn£á1uÖ¤Q !C²ùlM¶µv6§pãý<å˸¤*®÷1£ rç”­¹g º–×OgÓÑ©¹ªDš’m J&µÅ#ÇÒã·D*¤Ì#»`À„sÑðôý>þ[Ò šÍÿåuby"þP¨ªa‡ÕO6ñfån”«ÉÄEGãmKWTÇÎobñ±t‹”£˜Î0¥c c&L&Ij|mël÷—„S®®ÕAH¬ž†âœT*˜0‰321(»&q},•-xþKe­XÙ•¨•ÊÝ)!SYtŒFÄÌ+¥ ®R ƒ2¶Xšºè„¶K®Æ*{õ©ÔgR›sÅËÜè^ÞLÝ®IL=)¨ˆ!W²’¬¬ÜÔ2ݦº|[Ršb£á‘½!Lå'·Ö{[ ÷—¦¬&(t’¶sûè’‘Û&Lò Aâ/.ãm?Žœß#\뵿ÓO©ß[Ñ—•ìBÞõöÚfT9Ô*H8‘,®zï&W¿EÖÓ" ªEÃ%ýS×Ô•¹ÐA3íÞ¶M¥ý¹Õ! Ä}îÄóן›lŠ%•¶Ý_Vk0F ¦*7ëNî›å®æ‹'¯ y”GvTo±YÅR³ ;‘H渼i.lÙùH«‰Þ}Éj¹âýèäÄ£˜QE­^©:¢|BØ‚¸Ž2[î%<|ùµ5~¤GÈFR!ÄBò¸’š¢`C3 %¯ÅwóÝÊ4æÌCÊS;²nÈ2°RñçÕà KBÓ¹EqG:— &‡ØÃ%"„ÙÜ:b ÊXÔ€¬:§‡®Ø’Þìù–®W*À% ˜b‡h"ðņð‘†J`B Ë6qެ b’f(F‚;‘æ«Mbƒ±C@ŽZ¥s…#š ¤LE2,œ…H gQ¥ÌÏl FÛ|&'¥g<Ú9‹‰”LCC*4†W…0b!¸‰1exÕNñ¶pè…¢©YáÐLd& tc(@¤BSLÜa7ÅBçÂÈâ f9x¡Ðd!Ð#טÃðÓô¦´ÀlÂ|Ǫá}R ^LÀñ2‰Ûj":›]3'"ØC,VÂ%u 5 R8.uT1 ߉ 4™B4ª˜NÉZ7aϤ'ê–¸#Œ„?|á`wªÆhŠ-¼„åeFí Ê †B&î„0FTeb'dpÀÆW9Cb%F‚j>Î-]k(JE%39z9†5 ËнL˜˜—SA4D®Ë`ªÍH9­=6 ¸ïQ”’:R7B1ÌX <Îá$h ”Žý7ÑkÐt;”)ËŠƒhÛRf`œ`†!ŸÕ„0Dûu4¤vuÇ9û“6E†:]Ÿ`t  ÔH5ƒá]ÄLB–…c† ˆ6†•%‰˜ŠÇl ÉKð˜NEz)Û¹¢Ñàä~‚÷¢Ã1&(ÜÄ ­NÇd$"°}¯27¢˜sdñzñ„lWpêÐ!0·ºˆ ![Ÿ½M,+8cRqC)r›d"˜:íæÂB×rÙ+MÎŽðæ´#“Çgƒd6b™P"B=¡(Œ#˜ÁÐzæH qÏS]QÿÊyóBèXT;E$!õ æÃ%v˜“ˆ¡†iº;Z¤£0ÜBœRÞ*|˜eGZ:AB1ÐUÜG1&—ç1±‹|¡ÍŠ‚s-^8„˜M| †)$q  Bæ“+¼;¤$fIH˜BÂ>1SÑrÔ3 !UÊ*ŦCÀ¸ê3¡Úä"9V´Æ# Â+ #/š+sY†¢ˆþ¬CÔˆ¨7PèQÜ0ŒÆaaGñ! E™º¤ý!’(”Nò Ct^Š´+ÁŒ¬PЏVôÍÔ‘¢Ç=Wbì!ø½ú멦^ñA™#ŠÃŒ!ظ·¨„V[­3%Õ•Á°C†] 6xV еò˜]¢n;覤ã,~¦0Œ¼¬$0ÓŒfb%7!Œ¢ž?LµàbŒõGQ†3Ò­áqÒò"¹zu,¡Ö~°EVx%„‚$ÚŒ3„¤`@ÖíÈh~4`àEéO¹¢©\RðͦeX£™ l#… ˆÊ@ˆ°ÔÌ…¾ˆD@¥HÁ´î†£–37Gõ% ¬D ÓóH)‡èaƒ+V½)' ê ‹êœ †Âçêh͈vaÉNRŽÈÈ4äÈÆä7ŒÜ'àˆµm¬8‰7Jè^'¹‡…1¬% ±`ãÅ$Œ‡1)žñ«"Ka‰$–nq28¦_ etf­þDä(Å1¯)hJpF ‚®3Ä솧¨C•‚‰\ZãÔ¸á‡ÞkÉ ªÊÄ©1P!!© l”´e5Ž! œ4b†I±I…^"„D£åÌ<-&§^†p¦bg*üÈD9ÈÂÃj Óf9`!š F6aý¬úÕh®¬eMø’<8£\‚®¡±ºxGTz3hÐF"”H B< „‚Ç G#šFûq•gœBÜæfuJùŠU(¡±¨±Â †ÇŒÒˆ¨$#US˜¢‘a ÁÙ§b‚8ESâaNî 9ǤÈ)»@b””ÔLR 2(µ0ÈÂ0€ŒðVue? ¨ò©¨Æ9Kbc fµÁ ì¦01D ¥!¼7 Æ-‹ èÂ~FhW¬60WF$kÔL–#f(:„¢8qÊÁÍÓˆÕ­ ÉLéŽAXŽ ˆ6„Á’  žJô;Îj‡Ú8­*a™ûáÔê‘‘„l QN'µÎÅïðŠ';úÔñA M c “°D ’âhr*àÆ.Ï“º‹X¨)³ÁàŽb ¤°LY bù!_&®V78˜Ë›‘«Ǥ+! 0†-Âä"ñÕê ?¢˜+pè½ (9 6& ¢ˆ c ˆ$mi€ 챎%4î8)KıŰr½ ¬U.iMÂRV¡œÀx¡ "‘‚dUo8þèñÍ{…*vzbÃ,7@S8Š…J¥Ì„Ç;AJt„±“Q3d ¢Ò³ †)w èåY·+BIqhf×—†²Ýuùxéÿõ¥V"‡"uT̼ÎÞÚ‹Ørâ­ÈñpLÖ©3ŒßÔª«ÏøB½%Š”t­VĢ璆Ì÷FîYé«k¡? Ú´CØL¢j¿ÑÖäQŠó©·fvt8VÕ®$ŒÔʲ£§žÌVg$ç\OÞ?ÌìB˜·ê"ªþr¡þøDõnú"M¶£Ôâ²iä)QR9Ê/ÎöŠYD\*ûãÕû©yË|ª#S»%Øæ«1|Ê™aGå{ŒjQH¬D#XòU,ê‹™ï†Ïùêd±®mkv˜aÇžšdCj3`–AœM®PƒoìK¼‚/I†Q5UÆ$‚ÝIR‚‘©·ÝLåÖî%Ïɳ!~Ë.h5¢ÿøÉ¨ÃƒøNÈ”$hGþªû‹ø ³’¢ZôøÝù †aÆ„Ò=j¢-J21^lýŠX…¨p°ÖŽO‡ ^i´%âe95”²K+îñD”øVÕæôO c†!Ìj©Ä//»Q-cT_n)ì¥ÂZEàƒîÉD۔ܱ©C©3âŠ)€Î$kF*Î[%6[ÛŸð´|êÌ̻ݎN¯’£vº$…B5Ò…0Š#aìÁ”æõÁ|5…è¡zuþO2pÊ+Y:A9–cœ ÐlpÅåáDÆÍ“°ÔøšN‘¿hp”ˆ¥QöWÓñ~©TñAÄ8q0ÔÓ%,@;‚Pô2ñ/õÿÁèÉ­Qwúû¤TS±jפ¿+ØVœâˆx¼)ÄÒ¦¼’¥ÞTX•9(ØãHR¥¼Ÿ×2~Ž@ØQ‰Ô¢ ‡2Rµ} L"Ò/^L¹;PSéG=$9±¬Sp#ÚA€¥˜À€ÍócÄ”S4m`”ÏápP²T´é9Ïi¥“Ô$ŠCzl§»tª×4a gS t¸ç•°Ï'EHŽ=SÇ ÆgR‘–—­˜† ¤°@ XzÌÌ{”[Mz‚ݪe Ôõ‘Nšq£ˆÍ]ëbRDø`† 8Wx=êF@P`Åßôc\(Ý&„Øiâ"Á(Q­q‹±ˆJ¸ôÐ!¬€0<ø@8M„:mJÍEÙ=<%‰½oE&ç·úbfö¹“˜pwŽK"mN¤#!¨¸wŠm ¾ùKÍ’ÉTV¹e~æ®w¤…âÐdgB``C{+Jù­r×èUÑOQkA¤Á gÁ Zv$Ä8Œá¬¢m‹ †@ÇБV¹sIô yå¨Ì7XBö¥j™µŽL}Ɇh€€ x8Ô"ÆPôõAø„$mr“æçîïf°z’Ò‘(+CçL- 3¤«B†—2û¦®•DÂñ1¥Á(‡ÚŽü¦[Ið½8ïž)ËqÁŠr¶ ·ËxÍõ™ŽM¥¤¥Çç©ÅÕòzyZ0ÄAªuå5†$‹ó£=Û˜†­ð, %"f%ϳ O,¤~g ²™ÊG€v ŠBåÄZüm¡KJv¡¯0¡°.ÝäÌ>â’©éÇÒ—0FYÊ:Ç•jê˜gÜ¢ñ³v…Í|L#|†p‚Ê’Ò±,ˆò,pR¨veäPÚKÈ©_>myˆ3Lµ8ó ‘moeˆZ™ÙWoÂ.t))‚2¾‰´6žûÔ–Oý˜1«8RÌüJìþ±@ bÆ@2ùp"‰iþ}z—¨oÖ’Äâÿ^ˆÕRspèØC•ŒAœèš¯ ñ®ÌQUUµÄâOÞšZJR¿]¼ÒüÏ;ÙúL‰å;p+؈b€â>­\ÏšF”MˉJ†¼­cÚwN¦H.(Í£Lœ]öëf`ƒ½Þ=:Á~æØ%ò €™þ9¨!$b•hƒ>I dà âÁ*Òü: {)6»…Ùi$·Ë8cIõV IŸBR(œéh²± ŸÌ)#”¢°ÆègLï&Sá¯d½vÖ,„x«®H»ÛG¨d:'ýïø©)=•*²‚°¦*‡_D2º1I«á¬.çñ%µnq:ÙÁ6÷èZJS^B“Î+„4DÍMTu !¸vÑß²µãx­)12i,$¨b:É"×Z«$¤¨A„ºsÆ5S¨]‚ÃR@Á —£^9Hźuɇ‹ÎÊ9¢° 0ëVÃ'¡$6=¹; ,¯$—‹Q¾ßA_¤é†•±vñG*§*Ly îGd,ŨËîÚqq¼ÉpºÓóáPbŒÖ$Ý Åc²H$p¾Ú"¬PC0_¥eÝ—%±êF‚ù¢¹ø¾Uë\Þò#Ý äìjUL¬RG…z—[¬WՋŵÆÆÿ”sJa£Èk<ËÄ â¦ZF¦©uQ› zÜk†Ãny:¥ä–P²!5ý",Ï)NdJ>¤¢W]ºªñékÌÑ™ìBõëßTG ÅXý?h&á{öQ„!ÌêB éÕRÒÍr Q¨%Ufæ³â+Z„ôujFõVÒ:DµvœŒ¨ùƒð¶32ÅúðˆBíO£1 ´…)‚båWBÌK$µM®`ºJYæÝµëd">ÿ÷øÂc• Q"‘¡¦%ND˜…V‚!Å3sï7Ø¿”½1ŒÅ*kµå’¿FÅ—3ª: â‘ÜNU©†ïv«ÝZåÉ3£sò‰O$‚c8íB‘øÕòNÜ£‡%kpî~n 'DÄ< ŠÂv¸s+®:úñËgÌÕ±(áí†Wt»·²—1°¶°ºi°ÕŠû&t +Q=qUÒ΢ûĦ,eìI(vsȽÅø†Š{q9Šj4ååßk½øÿUn– á¤Ã[Òú”‘¬=‡òmÍ!9<ÞmFjXn)¹"bHFD±iŽ£•G#£c!ø¾Qî žøfwâ>©Êï!(Y‘Å:Ñòç9RCPo~#ÂuMJßP–²Q¸Ý!âî¥S£c$C9LaŠ!„„„TÒ§º\y}8î¤Ä8i6˜4’Õ¹iŒÅ…B•ˆY†¹4¥çCØ¿g­—ê%RFâu5¹ö(’9z¹¼·g+s›Ù‚ÅÆµ§ )ù[ ¬AKA¬rÑ’C¬G²…°…!ÄbXY K¦TLúé¹ùm_Г[æd¾æ=ÉŠyÐ÷c8’½È”:|ŠA±Ãµȹü 5 ?\¬„RQOW¥ªl&T¦P“6sŽVðºgä5—"ê„/²y~›Èn5TèÖ}ñ4n²ˆ²˜8@A¢Ñ† ýÈJÂÊl“¹é Y.Dò5Ón²‘ùq§lˆÓ bwûçû}üËþ‰ÍŸí5¡ç0ÒÅëv?È8~À3̺UË£ƒ£¯Å]©j;)ÙÎR·×R Ÿ- ›2µŸå£‘+j©Ð¼‚*9Sp“yŠÿ¼qÒÏT²‰ÖvÔ—ˆÙ—²ÌMýoï\£ c òp‹e9%r‡ô_LÍoR–î#ú=܉¨³!‘Gk ¦…eźR¨Fý;­qmTkmª6,›×Ôªuz!\¸·B«pæ„c§ÅKŸš›,„ÖÌb¥éF"¶¶¢}É•KÊT™nÅ%ÛÆKù¾b+Ö®ërã°Ø›"¼Júé-…¿Ë|è¥#œämþ=˜Ë8Ub*Ó5¼¼OÙËAèìAñJcÕÜÈþb; o åB1ŒƒSñ8Mf#»é–rv‰Š¾/<‚]¬¿M‚“W£"ž„Zç)Bxª'|åjmèêKXˆ!ªšeåq[rJ•ˆÅZ¨TÌD)r”‘eFZÎÈj+Í„.éÕ® ÞÒ¡:¿aWf#›!%vV}Kδ0%8­ŠÂU5n•5ùÿ™ý„Ýn!=’mj퓽YpF6òœ– [U œ&} Ž.е$„;”´q¸£ ) PÿÖ2dõ”Fò×qOôÞÂRÌL}½©ü]xÇbˆµ%ŒýAÇ+ãÒ†B²"Yuµ÷ÎOªSju »º˜È¥-òâ¯=œsŠÒe;|×'ë(ÕÇôaTXˈrŽzÚ¡ˆ)E(‹>õLîr* Ÿbˆš›ú©N¶3Ngd²N­IlC¨ŸQ[PtœŠztÉš¥y…¶jêIB³Z\gTúÍè{~l‚²ð‹ž¿¤Ëi +‘Å3%<ê_âÔè7Û$EL¡û4~Ei ì}}ÄLF•¸Û—i˜«ÕKmÞËĸY*d&ã5)&]„!fC--c””!uÓ!Æsѵ$$ÞZXl$.Y ¹¾á·<ä6h©qÄs”eÜ&¬®ˆŠLùDëjtUá-}âVˆç„íÄeq–£Y%9EÅEmðÆ*SréÓWqí4•Æ9·œJÄÝc¨)ì!ˆC¡Æ2µvR Nõ®Úå1-‹—{µT\Ùõ2!ÌäI¸ÞvM©.œ›õB?#§ð_“Šõ¯îÔ+iÉs÷„;+ÙF\·x¡LÈbÈ/(V/—Nf/ÛÜŠß×ÂÉ…”VA~¾¤äiÊQHLĤæ0EÇú„'Y5S—þ}®H.îŸÊ.INÔsbe^»œ#ªùLù)Q†?+Trîx¢§ „B¼ØY_RRï§ÑDt§ÑÄéGUÄr›šApl7oõ§–ý1j¾ßüþI®²‘ܤb³ˆ)JÎK9ÝõÄÊ×ÎJ¼ÖîyâihÛ.×i%a™)è*b9ÇjHò”â›Ä{7ûI.–Í&ÓHlôÎA5Uov©îc®§ÜŦŒÜ‰–-·Ô5;©vd–ÜèJ-N)ÙvC"qâB©µÅ[¿Jtæ½ùÓBú/%âaTeµ–ʽ\ÌMŘÇ#}Ù„A ägõd³þ.ÝYEÊòb¹4\ê ë!<žÌ]mŠétaB¡%T£†2}—-ò{Éž…n§Õ¼Ô[¸œ"bJ¦¤äƒ½uBD„ážËCٲŠR!¨‡ýÞ‘51`„r©àÁ”fºUF<ÔnQJ®eN¥0æã¸¹ˆ€Ö°$LÄÂPn¤La Ü9DCЀ¼~Âó—tb‚ÀJáæB0!€a0f1 ̸¬BCLÅQÙ]"¹9Nsw…pˆPBXŽ„HÊeM¿Gd تB.H1 JU5ˆä¶)¬×U/” C¾U0¨ÆV/-äa*s#Œa©„CPf0DiH‚23V ±(ú•!NpæŽRQ^ó*6°G4=Ö€‘†æÇ"ʤ\¦û­©œ#Å„«à¥‘F ÂÙ\A³ibŘ¡RÃóWæ)¡ŒBàþÖC6Âf ¤A NÄóícêYD½ß¯gCÉ”iB#Ìih›á¢.'ä|=Z»xÅ:ÕTDÌ@È%^Wa # G5pÇeãÓ¯E! ¨Z¼¯šŠä„ÀƒC(ca”†!¸Ã°êÅAŠÕÕËÔx“ ayGS²„Má& ¬÷ÜÊË•C<ŒïnR¨;´ DRŒ¢ Þ Ì1 Ìg|BéF¦Íþ§gz?Ê:._;ˆwB ê¡’ñ"1#pÄ"d‚p™Üc-VŸU}ï Á]Cý”D)¢Ž‰†…ÁN„`‚ bgæ.Š#ª&·OXlJ l@‡5d¦÷;¯§™}vZ~nɪ½qŸ븅öIÉÙC\§#†c™°R%™ˆ®&¼šFás$ÛTÕ¦>&y7*ôÞ“ˆAõ9qXÅcJï9*Û^S Êzo%½ªž–þ¥î½æ ‡Ÿ©s•Ù(Eêlëyyêþº…£tÁqGºÐe%nß;²¦NS„+Ö­²™ ûB#™³ËZ’&’™nRcy ¯oæâ¥y+w¹ÑD]RØ« ;JûÈÆŒÙG3•0ÿößUÕ0†ÿ—.^k½4ES¥VäZ¢X×QS…J¨ØÕ°¾œüW-¹QhµGÖ¦W+ˆVªú>9‹`‰f£æàÆB1…Åb¾SeQÏUí×f)w·U*!Yd4^e£µ¨]ïe"Üÿ–¤·mz¹^ƒÌ|ÞS‘XN5\§GWB.Ø2C;'“*¢{sé$õ.K½/rV—ÎÓ›Ë'öÊWs Ó“4W8!k”ÆW+Q8Caqþ¯Dyõú~áõýN¡½Z1H—A;ÿx¡³qÕ «+Mú"Q­V¡ŠèT;ŒtÛ[*K"ëÛ fjòÓT'Éú¢+—ƒ1\ZnhŒªÃ v6eÊQlÖbÔÆfßþM]ÊB ¶½&Öu×'!Ç›}"³[±êØk.+¡…w)8¹7sY…Žì] #ŠInÎ!óOÎTì‡Rõñ¾Í[!heÕî&:"¼­"'m©F‘½’î+¹ýõ=ŸÎçC¾7ºš;=>üµOx¬ú”ìb¢½éæ"âàBETä&—ÿøÉ¨Ã„íNüôÿMûÍ à ¿ ³‘íþ™ÿ×sHªühn¼8ˆŸé-E¤‹[Eס>–éê'µ8±US$b)Ù Èu‡²YÎ æ2Sþdè劫mu¥êö3Õði˜Ä’B]¦ì.…=laŠ(HœáI[×<\é?Òˆz©R¹ý¹“2ôÁsöµfwy ±(C¼Dâ)W#¿Íø±fùÎZfêäcµ‘\±HïJ•\¬™dä¶k-I‰LäÃI0õ_´ÖµÝiòH†!N¸RU1xWºêJ å9JT!6èò›¾^³$c²Ü‹]/úòyF’} ç"Å ˆ®r;u¡$¢7yö˜hŠ$Çó—-ÎÎæáýJ6JõDI2QL!¨2ä»û¨9NJie·8AËû„ôªhc]úBš§sï¨(§GÜÌ-mSqd˜þ<^êà¾=zÊ&? ÇI÷lÚ­’s1Å0¥w*jaÄKYwnÕ¶ˆB¥/í µPJ ½6ý{—h …Pî…‹Ä"W_Úô*2Z¦tÛn(ÄsÚê3¦7Ÿðþ9b£Ñ…1“.TÁ÷–Ÿš¢‰/Â÷ ¶¥L’“&[%އÄùRI‘ Å!QœÊOk»ú¹;iE®Åëo,µI0L#ÎH¥Nd#&!•~òxUR—;‘Cç˜#×ã’ŒU=²¬:rök4úÌóRŠqŒr‚ )©…%ãÕmN%‹cSÑVÕ1Z–ñ•ŠŸ7š¢y¤ln±”®¡ ($‡ç4bŠ_¼Ôp».æ¿JüÈ4É(„ídk-F#2‘P„l©®}%nM[NÝÔü-íj ˜/f9Á ÉyÍSÙPŽc†a±A²Ü¦b †æÔ4¼¡ÇýØPÂô‡rÉùY>”«• ÖPr Ž2qò)nz‘8z£ðŸfòùi+ÿùŠ´שRè©]dƒûëüו&(¬yÖÑt @ Ýo†7˜®;‘Z¤×±žâ‚‡q5ŽËœZö¯\Òpô>xÿ^©pMO•˜Ž»‰TK.kÑ…2ÖuâŽ9Œá…‹D»i*)$bs¨éA;Z’^Zçêb­ÌÁFD“ÊÛloJsÓ.=?õ&óDN»]á|Ö•eaé+'¶êþÜ"á½´ÐÖ(î –„^Ov˧7Ò®©YÌ•)Òv±®žÄÌ\§å¶œô¥vOásŠïcd‰ü#&å3'—ζôúÖP®cÐ9G,I¤ƒã`‹!˜|£LÄè^ïOèW8‡ ¢‚=[õ1»ªÉäÇ wó-5†O¦+‘}©¦Ô“–ŽÜŒGÁÖC¢¯×n¨#”W>ĸ•˜Ü‚éîë*(èQNä1§ühDøŒì˾Ut¦¾‰e¥”}L¹i¯´5´K:-ÝóÈ•\‘=2ÉáE¨báÅÑÐR•ZöN0ùhŽE¾mC±(¬L¥-$™}RöÚgˆu‘"Î-“y7*Ù¥‘=Ý o{QU7Äz}¨ÚƲÍD£ŠBÖ¸B_䱌2ÉÅ ¥‹$£ŠÑoC!^å#ÈÄC}q ÆÁÎK°C¥]7s8•õľ^Q6–ÇøúO²S‹b¥“Ó5ÊÌ¢ål…V:•(Ú"ñJ2 ‡ZìÑ[—ˤô×£XUϾ'ÿÃv˜äÉ¢QœË·º6Œ=Ã{ñ v‘¬eWâÕ:D*÷¼²-Y}ꢔÁbãéo^1}wI…jÄÙC)&ä3­Nµ+Üé¢géÚqWË „)XÍ­Ô&&³õi†‘jõ¶k|ûª+á'O#i,ô[—êö‡r¦¯ÌTF¨¢ð“·B‘¾¡ä^D!ò˜n¡ø’$Êà áVä*ý<º>¢ÛÉ*ÎlÏ%…wÓæÛuÊyÜ4™D+iך–-VìBЫDNÌK?‹ôK%tB#x‰z5GUê¥fMA²ÞÛ…¢›Ÿy}©[îZ£j:ÙÍï‹„;Èyì%Îv@Ç»•daÌJ.oF&s´åÊ1H¬´ªI/KLri·|‡©#ÈFOrê_0¥BµK¾D^ûí´{ýAô¥Ëêæ‡Ô';E“èΕ1*•‰xႉ9ÄBB‘y%eLÆÑnE. 3»H£5U\n'~qsïBkg^“á™—[á Š¾ãñùr#;!YsLT8­a{ŠfÜCÑÆ¼Õ‘S²LåùU R‘~†Ô}æ¡J¡]|èu‘#îÈŽý5jç]O2]31…]ÃàE-^šQ$íÃXÇòoe²]î²]›qЄ¯ÕER T`p¨V¨¦9yâ¢i’r›^™×1›z©$¥ÿüU‘%-DÍ'ð†)vó™YaÆB[P(¬ÿAÊÙinÄ+Þ•—knQPsMI$ì®Ý”†-ò%ŒR‘õbÉMÈ탊C¶áXL¼œ§RsŠ# {u›TáH2Ò›¬ÕÛàèê©Þt®zçž'I¬í“û„ dôç¢f$g+—ÌDÛ§"fe‹7ér¬ßn~ç­ˆS­³Ø)™øb‘‰ë8B”ÕÙ_šÁÕq¦#ßÏ¥¿öæ§.ù›´¼BH«É¾ŠDFÕ˜ÌF¶Ò%F_9™6mýZM‰qʤÒ$¯_ÛˆÇ[a˜¾‹¨óœÊc9'*§ûß•0s¤ LÑ“{Ft=¾øÚ{=Èäú~r¾‚ÎúŸˆO¢\g!Pr%˵_C¡D(èI Gy<úà§ÜqP…>‹E¬´šºÄ¾.â”$—ÊÝ1èØ´'«aÅT©<æ8Îé¥(ìµz•'^­)AŽý–¼ºÈN)b(ùy] óS."3k3ß,›ŒíZ[·DmçP‡1V¢•ÔK*«¶yÂ9ÉyHËÂW4§×Õµ)%GëÖ¬ˆ\æ\¬Ø¢¹s Î|S·wz©*B„0B-Ji /Û9öÿÂ¥KjI÷~GÅ1{]¾Ûö²Va5nÙSºŠÂ¹{ò‰§²Ñ2¨•+uéó¨ÆM÷»R‘æÅªŽŒ!h¶ïúÿÐ…v#$È“D,ŽæNUdêá9(ȇ¯Üf*=i™ojü„ÄkÔ0µN&Ɇ$¦dgª#-ÁUY­£Ô¶N2‚¹S“OÚH• D%3jš„m«j¦âËçGNutÌd(®ŠvK/›DÛ7©ûŽJv*vœsœˆíÃ…A=p®NìÈÃ…I]õRïÔ¶IÇ) ë´Ò1tŒYÙSmÌNä*㺟—?oU77¹®ÇÜ7U(äö&r³Hó—ÇZ¬ÆäÖÛIv±Ž ˆ±‡~òW>¶4”³eþ›Šû»—&aèÉR3"Ýeb²#¿¢ˆ»+0Â!PÔÝ)?«ö[•"ïÈ“´‰jÈÿ5fÚ:Ü[:¡_m‡¥ykä*±ŽþG\¢XÍÆZ=yÒÈÄ]g/ Keôˆ‰V£³ÐM®×²¦»²”ÑY®2i–a QS~ýgJ˜F[:þšÜmýµ NÄ/2mñËòß²Q誼J˧BÙÙLÊæfT’1‰Rrº™†çlFÝï´:é(¹ïM¡(V+6YŒ+ ¸à¢ vª`­ÌÐØKƒŽ â1¸0I&CŒ(¬gc )‡ÕJÚ%MÉœ°k¦'7E+аa†‹ë¦S"#Z±ïž²‚5ð¸C˜j#‰Dê&5º˜Ô‹ˆ•šc(Ä(B¾*üºUÏUY磂\6 Ù(®V,ÁAa¿¥,q0Ì2ª œ».S¡Œø4]ÑÖs_å–c;•l¤Xc ‰ƒšÀ˜ß©@@@™žÃ*S#0ÁˆÌÅwv°MñœCºØüº<Òòv²“V9# Ÿ¸Äxø¨@¡pÌ­ÈWYÄà1¥'ÖÕ!kR!!‹B…^.›šr¡N;»êaÂ#†°T9‚  gC2ÎôT6`Ȭç-7aÒ¢’¤ª£9ÚŒ“£'†˜E`#ΧÃüv>s°î`Zw ã±Ê¥90á#;1š¢!Œ jˆ‰XdBJ$ÂDÈD°OË—§®ŒÆaú 8„tio0BÀžÞµÊe)˜"„%°ª¬èÆF?î3`ÃHD‘)Z—"Ï+'C½û“³µ/n¯ñe°b† €D†ÑÈ­É0B@$J_¡LLÖ1hÃççÿ©º«èBø9;“d 7 tÜXÎC†B6|ÖŠLÈgëB«8T7ÆQ…ª˜1wAÜà‘ €ÅA==¢–n¡Œ% C©iP£P†À“"8€…0ÄVp!©´ikÑi˜Å^®Eæ°¼Zëä„`A¢ôÁ™’‰J @€d2 Áá´4$|PX¥ón#Îô(ùгn ) QŽ#âˆñˆr)¤…Jv') äÅ «Æf1¯etâHAÀÁ6!”©¼µx^c1(ň_%^1oþˆm™¥r² qjP2¢Qñv-:¨‚PL±Ó ƒP‰Á”!¡ÂRøŠa¨™‡”8Ö»…B±‘Ž¥:ª£–ºåÂ^nS!-µ3 Æ%È%‰u}Æ\„N„î ïé–¥È#FA‹ –Ž7òÅÊÂ$_¡oc¬ŽåVS04dyá ±äFgDè%Mæ ºx*¦Ø"7 ‚*Îj 2æ@#Œ—(È€_1ØÂÐçÑèƒê¢qB‚œ/*LPØ2ˆANb†A˜Ë+0ÃÃ8lÈ›“"xf”P‹[ð’°.(£])ìQ µÁk¨9J Î10F‘úâ˜G1£)ƒq‘Ìj¡uµ°ƒ%$Ëq`C÷t9ÍèÅ¢LXJÈt¾œB‚ gRñL¢nƒ)°D+­®ÿøÉ˜Ã… Nÿ® "`ðØ ,t<´ ˜è£q„ïå†BÃ(`Û ’¦ÏuZµ+a!X§`”f*Q: ¾¨F E J œ õ>ßtB µZÃ#uHS ,˜0÷?:ØFÌ"º09OÜ+¨ µZ'`û C5A”c+†ìã DF ŒÐ†øBÿNÝ"Lë]„÷‡qÎD”‹F1¸ßh#¦Rd™©C6c¦»ü**”°vJɌȦABk-£Q2S у÷H®Îc¢^51¦PpÅÈAbô†CWqú1 .ç}݆3“G(¦[ÔUvˆƒQ„ h®fá™$' Á¢ÁqJë™1Ð=Ìb"¼uAÊW W›Œ$–kÌMF†Ê3+ @`H¼pReú|³<©B—Ú„k!5„¹•ñk}z*ýK¥aJR/.ñiÖ®^¤©ó~ìa™¹)F…TÇA qOúÞº´Íù–VAB&½l?S¯5÷­¾Cñ–¦P§c0ˆŽ­f5Sm…bŠsª&gs#}<Òz>5ÛèÅ̯忾¹E(¥#²¶Èµ2ª¥.i £•Ó©©¦fo’µ“¨ˆ^KrÜ–fTwÚ Bw5èéåfT"Ô¯¦\Ò%…«q.#ÈQµ‰Ö!*nç±Î!„|m]ÝwÝë×JBÒ”é ^èA¼ÆôÞ8·2qÌëv~F9*ë‚–2æë\Nq0¯åüWde-d®zº©;ääåÑSiSŠ Îƒ‘ÅMwÞç/’Mš’j«>ºªØØ˜‚ …Úòb(ì¤"®\Ç% ÉËÜcbåØÎbñÕ1usdS™"§3™÷Õåád²Ja¤¬›UY¯&Æé¿ß•S¸‰;(c¥Ù•5â sµõª+â]ôÍ3z6©ŠÖ¯få»Ü53~eÉJs)%•Õ ÏŠk%]‡8ƒ2zãŠJî½E#â'n„±Œ\A+¥¢§7™Ó.ŠŽJ1¿v…±fK j"²:yZ½CÑ T³'n^È™BewmQG0Š"7X´‘¶ôï³±ÖŽR*•4ë‹~ ŒBˆR"Ø*ˆ^ãd®Pµ©XŬ”ç úi>“wÚÝ´)JÅ4¯„J­êPCÃÄ1Õ¼MõÉbÓ—/'$RžÅõnÆÏ—IÑŸ7î(î4Ž1Šêó*H-7ø‰F*LuÃG‰rˆ;´Ê™àŽb)Djî+kü½¾õ18PdBÛSÞy¦–Ÿmœ®¹JÔ äBvì/Ä:aå"áß}~Ô²/®Bˆm|#Þ'×iÖÔDÅ9]HSŠ#ÿÔܵºåÌÁŒ9J·1Tºº–ôÇ©fò¾[æ^ê®êÛI¶Z3¡íw'RB®›ù7ï‡R£G Ì;b— ªG×µJñA‰éÜ\è».>r…ìâеtܽè'íÈrª©î®ôÂX¹ØV»™ÇT¡KßÌ;tú!ØÉ…1ßð¡/ãu-æÏÓaʌԖ‹ªl–aÇ 0£²œ Ù“—w7GµÑÉ(ÌàŸK¯Ún¿ñ1‚eÇJED&òRŽÙÏr5ÝÕ%b‰Òv¡›E®(‚Â*™BgnÐ5;$b¸ƒp©äÒýUG—m^ÖÝbÈ)»‚Šù‚¹ÕŒUUŠÇ'Þ·K¢:µ,ašB {Iù$ÖÜ®$¾3î38‰ô¦'-¶aˆŽS¹—vÆ5Ÿ™^¤ïTL¢ˆk:ù) Lü¼TÜ%(è­3HU.È5QÄêŠq‡1mEÊ;-)os:NÂ1XöÛvƵ4×ZlX¢ÿŒ!^ŸÚæâ"h¦3›­š2=îŒÄäûœŠÜr¯·éö¡[Ð@P¯Š”ÔjZšúZ^ì䣙eï¤Tv©'¢<ÊcŠçrXÌù&!Ÿ:FÔ':¼š-êý»{¾™J±Û=•[©#œÇu-I¤´K fÚ ˆæ0‚+¯ÈÔ®_¤‡PªwEò..¢¥¾³}HžÔ³6zñ‡;QÈw+ŠUÕÞj‰98‰ÝZ&3˜(êçmëVN¥/…ø¹j(Æ bHb3Ÿ]R·=;(¯*ÝUŒ¤+' ¢{DtÊÝõ-^)ßDt=3$Zò2kÛÑÏA?Ò‰ë0AÐr1”ËŠ„#¥m§~ø¥s¾j¥ÆÎ¾7cÈäý ˆ]Ó¢!³•­Û`Œ¬S1]<‚%Iʯ/W× §a2K²¹4ˆäNàìAŸž‰RlÕ«I?ç9îÞwÍÎËU鎃PÏê@ЬC»Øµ&p‰”Ä?“µ,ˆøwás)½›ôÆÚáh…9.C-‘¼c¢âõ˺ˆÖ¢Ñù’G£mK©ºoþ½ œBj" øF%Ô|͹©ŠÎ¿„;œ¢“_Rê½²•ò"a³“ŠÞyˆ‰Aw£‚tR¨. ˜tü&ÿP’Êa³ã©‚DT6\n á`‚¢S‡JÄI¨† ãBœ)#9J:(· E A y€ÈÌ£ƒj`šz0N3ƒÔ ÕË ±Jðè ¢Øf£?*Sd•jöð”° FŒ5 RvǽÇÔYEc›ä(D $ œL°QÈʆvqýFg*7̦ÅUë¨ a^1”#ˆ/"¨È0QqLÿ>½v›Þè(âüuQs æLbì‰c Õ3þDìåÆF9ŒFd6 º‡,œb»Ba‘­1Z‘ºçˆB"¯Œ¬ƒ¨6DÕ,GR8(C‰H¡Fm¾.áØ!ت) R4ÅŸD:ô3ãá[ØÔ,®Fœ‚"6ñWÌeÞnlÂ6-+þ#5횪í'¬”ÚÿæM¿ü¢é)JøJ0âgKé9Ê~Ê MûiËø[õsn1˜™à„†¢§õ>nÑq2jâêÞíEÌ£ä™ç^Þü×ê{»:•uœv2¡5Ò™>TÞ|¾è9ŠFë|ÊTÊ£Spü†ÚJˆ¤@Â)ŒÔ.±QZÝ­ry5ú´ÃÙžf;Ú‰ç'æs«KÅ£¤¨U$‡(A·¸‡z×S•QYêGqVœ…´j[w/EJ¹ ²²HEèßÒ5{•QZg*T\’µ!“U¼QY›Õ\›¦Ò\ê0M[æBÑ)ÖæÑ2½¤Œúä+ãå’FÔêò…N,” aQ²ò)]«U´Â¿Ç¿p ~ ~=½ë}®ý‹,ä©p›Ô=b6>pŸbÞQñ¨’£"‚éþÌ3ˆòª Ž+úsü¥òLÖÆsq1Kº~Ãk϶*ÎsNدT1?¥-è­d7‹‡y²çæK·»¥ˆ¸†Ý~s#Hʈa”VgéTÄ6›«OãÕW™Ž—# ¦ïìB Á™õÊDäÄ(CûSù‡âö­×Ý–×ÑeEbQ©faWIç×,­"l´u;ê§i÷=¶A"’c˜!; "=C`Ý%WDR0¨’¥ #y4ÿªbšVâfmÞšdaŒ˜GFK­Ìomê_„öIQÅ/¨—Móã&…Îgy›3’‹"ÈôŒ}¥ÅtuyKÂ’Š{ßW¡hùضâPÞ^BêtŒÎšø•”T¦jÙÄ2úqÌñ " þÅâoÑ5Ùc!\lµXÝKרæu ŒÇ¢ÍäbMLýÑ•Ÿ¿.È*yzŸF$vÅiŒ¢‰)u®k&—»{Ù™Û±I‡7Í’!®š"+°È®Ûvp‚ :z,Fj;LJ«r~¾zÑé}½;óPfåÞ+ê*QGâ2j‰kw„(®Â—JIž®Ìö/\-Ȳ#u“(IÍ•¾’ìaY_½”þm52N ˜êüg£j±<šK³»2_")üø•#¶©:ÍA×XýèçM°J|]o).êªK:ûˆ¯‡]»Š(ˆrPǪZcÑ}u3éž¾ŸÔÿM-Z‚Lz7bÜ÷b\K¹=§‘’D¢*‹t-×UWÒTâµ8ž´iU”‘DÊ#,åh/½8µºÄtbr«T?_¹e˾jL÷%Ÿ² u~C½ˆ¤j<Ê‚“ÚÕUs&®Ž’’!sKœ=q$çüóQU‘ý¶D íTu‘¤*Î$Ì£=[Q5µF\oõ¯µ¥‚U©‚д+øÄÄk<ËG.p»"U—*ÚšF2̈¤»Î–D”Lüú®9\FqÞÆ§™ -öCдë[;}qys ‡r=IeúªC´¢Õ›eYN¢>*u$n³»Õsû}mUf÷ø¹þWÑV¯ª©F!•*šˆW(¤(ˆŠ”.ö}TþZ¤eB{õ4ˆö…Ò§®£uèÎùK–‚ÆË-Ö˜N:ïÈm8Ñ b5QvŠ›gYÚî[šÄ¡qýËhɲ a)2îo4­þ$ùsQh¤ýϱ4ÈåŒF‘,ÚÆ°˜öÕã”Vrèvj6Õ«q|”íÑ–Ë’3nTå3yÖDâ¨+ù‡ªê»ÑÅ«£µ»)Ô-Wp©ý¤wÜ •[X…©+T%̈Ʋ2+×ýRÅYËrÕëÍE1"‹’f"^wºìÈb½lz8¼m=Ôó½Q1ݤ_¶N…5U z¢?*\MBéÚô\ªõÙI™Úû¼ôIŠrÙü‚ìOóˆ/’ç9:[)ˆæ+=;W×+‰—c‘PÞZ´%Xè®ç×Û "¯¥ÄÓZˆ¾ÚEÖ¡šaä.µxY@æ @#Kø¡›Xi´‘C/媆˜Ìš]ci ä— Žò ¬E_=ÄáìþäbV„YMæ~Ò:e‹õ¥ÖäIu/‰ÅsŠŠ!ÄÎ K/P>Âô×âŒäJÇ?Ä!Ô.~¥é›‡’?Í¡BS© [࣡HE1î†ÔDlßE‘uòÉ”Ëa D×''ßMT:a%j£¢cDAQGõ½õIP‚ÓD†¨G¡)”vÀŠÃZÄÃÜ˵䗿©p™XˆX…8Ê`Äù_)ÔâTº¢ ›¦ì›E¤0Öy’ìIÜÎ5רýÑ¡dȦ?Üá©)Jå2¦•TøZðM]²˜Þýµ"ÌÊeM[¨’»©´‡Ä‘)·¡(Ö^²®\¶.Ú÷#]cFkQ¦s\HxHPDÌR¥ç R”PBhõÑN>±Þ÷`‹—wà¸höš("šIêÿüéë!³b©*Ž(÷"û”¡ ÉtÒ=òœ2–ž`¥ÁŽDw4ãš‘âiŠùÙs¦¯N{&TÖÂý¥rÓU3βAùJõ<}¯QGó²£Q,m3ŠÖn'âªþ{‡‰ìCfÔï+—äÛIHhL:Æú‹0àPéPKHìÑâ寿•ɲo|•­IÐR \aÚ¶)åmÅb—1ª|°¤F/U9PN¡2j ø¾•2ÇÜ÷ãç"=!ú±áLÉkæ¼—£Ò.á…NmJ[¶bQ®yÆú¸¥Æªii¥%…bÔ•'­,@’#0jÏmüÐG pp)ä¬A…ÞøÒñQ^¢½J0ÄDÑâ,ç0G5©&j±dkP~gÍw›W ”ØQÃé9 1™ØU·T—{Ž¢ƒ>ÂIw¨Æ)§{d¦ ¥¯¡[ÄJ½~y¼D“k:%ÇLGIÚdÞ>FÔU'Òµ ù=# Wþ¤ˆ3ݯ¢²ÑœJ…jr·q.@Î÷š`ðÀp*ÉÌ ‡…¥€¤ô=`If#&ã,9Ç2”B0Cz"mvbOmá}Y®·¬zÐ>èaõ¿"U‹+P˜„l9$Cœ‰ô)§P0`‰ýnzߺ‹"”¾dÈalŸÒcb¸©‚+±‘lL¥©ÔÂI‡£XΦ.˜_BÑïÕ2ørU±“Ä1V8E$'`‚½f&žn¥r%op+&Ê{©ÀS¢Z-e‰ hPæ'Ø:„},  ã1©~*).Såi›/Ó(´½ÜCg;_¨Ûä^n!ø‰”{›jR¹â LˆY¥ùŽQQ È#ÿ7[7jñ¤B;~b£9Ï/‘4Tþ<š‡­È®mÁ|YË9K!=dOOˆ\›q8Ï2$ÈMÆ(ã)U“³7µôŒrv¡PÆy²• |œªŸ¸¨+¡Ê‹[¸ÎAÇ \Ú·é _‘ÏãZÞJ ÓÃä€Ä¿´‡·9ù¬ì´r%†mî!$v\Ú›\ü B+é™…ïšß’+ËÖb‘D*2aÔYSl-PN<͈¾WÖ‰”²”gÿ"QÐïcît§(ŽF¦á¦Ç-êÍ\iž4XÖ0W¡g0Gfäµ-¨_¥\f[”…"ˆaç0GåJ>._WqSµM¬§ßåÚÒ®5Zù-N†mÜìs‘ŠØŽ1Ø0ƒ®æµªfSô¦ôAJ§GK_xâ¤ê‰µÙcQR£ÊÔf·‰ZMBˆgL-û•MÚqK—ô~­ŽtäâåÒb,Šå®Ê¢‡}Ytöý ±ØÿøÉˆÃ† NþûöúVùlùcú=ûâþ/³’uÔŸ/tÊzè †t‹VbòƒO-Å$,ß¾tS˜Íå“,Aƒ•±B$Vx&W„žµò’ÞC}¥äï äDêV»òœ¯CUdh‡ ®ÜìN¸QÔ{óm!ˆt™%äÂÍËfRt‰:×LÆAJG'æ5[âë[eRÖ8Qºû„:ù1í?f:¸§GgÉTP¡Ã‘¦‰T¨•µŽ0jD¤‰ƒ)¤×8óW"m”ŠÂ¬ëSû¤SX0È$ü(¤¹ˆO´ú<Ÿ+:ß óÔdònRõú(ÈJ2%çh¥º¸ˆG6vñdS!²%³Ev&Žr ö\®ÔMƸòuêU”­Nà©QŽ”ïç&È¢Î@‘0š …ˆI^­Â1]Я_OZéãÕ‹E(!s`¿H“ÂŒ·Á\ÔP" ’ÓÏ4Iؼ‡ë¸Q„³XÊ0€!¬œ컯/×ǽýBôFTKv÷_­ýS&WÅC,ÌF(qA_OT0šNT ¹ÝVŒã¹ŠJ‚é*±K®û»×K6ÆQòöÓe[˜KN´6ÓñJˆÆå²¶Iô'5Ód.¨¤ôý8Š: åU!8&jR×ZRò-†x¨VLO=‡ZΡ­Ývëã&\ŽÆ‚j‚©åyâ^OÔý²ÿ’Ë#c6)ýWÑßµ:¨"!Ç»<†˜ìBâ5±Ø•(¥;±O%tæ–˜(¢EÜú«Ç9G#¥)h÷V¥s ¿éù}ï[“„J˜ó焨µ+ÕûÄìÝ•tcâ)S†Î(ޤÑ9ÂÅqH÷3šU/Ú*êDÕ­ B]§óTª(9V$œ “Å=¡+Ù¾¶nM¨ßý´‰N ±1‘ªß¶•Hd³ÌF1eÔs§pÛ”ÕKÅo9HrZ#¾êqm%²ŸÕ{§k–¢œˆÉï©!UÉQþQèäZc‹„«…LtÅ×e-y)çEô±‘–ÿZh錨—£,ä58Ÿ-ª.Âlƒ©§ììG rÚ¦(@)ÂMPW0Ø•žÒÓ^Fú’Â=qTÅÑÃlòò'ïЕkIU8«Vã 2jùØSGë5D½5ˆâ±^tÕõecîÓ°çWh¨cñ<Âo+ÖסB¾wEÄS3D6)<úF+ò^*xÂa9ÆÕáÔˆBœ‡3khë«Bm$ïû‘HÞñ^Dc’£Ö¾UPßLh‘+V„g „sŠIf0ErÄ5k^$”DZ9ëKDA›±íC\¦+ÒLÒeÆr AÏ**Q“ØÅ¦%IS܈:‹_¨ÿÙ+ÏZ¼¸°ÑÆ8È †’ª*”ž\¶K Ú¾ìì÷C%rüÿe+›òÉÕgåX†äÊ *’"m[iGâ‰*Ù¯åÆ]‘µEá»’‡qDñF)„I[Ëk‹±húâÑWË¥§"ØÒ"MþTæÝ?⯤0Fã1º± #³R›Ô–V9PVlYÈ1¨õäY{Ë{4ç4ˆE5I1‡‘ÓAMBV­™_ß¾ÞC!š¥*¡z¥ ƒ2é+j¤S»D_lÉ|úÉç×ÕG[¦ó•YhUqr]zœZD“—ä!C•HQ‚ † pÊËbÍ4—ëW‡mÈ‘Ÿ¦N]},ÿU¹D¹ä¥¯’D;œÜ9^)É9Æ•lÎ5 %Â!ˆœt 9Ȳ\Z}R…*ˆÙg™Qyµw KÃeÄ-ÞŠò»~v`¶ÃpÔS[:wq9ˆB¹<Ž39dáq™ø‰äY¹éF´÷{ž6þ~{z`§QŽg0 Åóè¬ ·¦bIí–—-mꖦĶœX…á°µD£8ä„S9daU„gá;yIç÷A ÆTS7ú|/uóñhåb‘•æs¯b&}VJ>m¿XšŒç"£Xû¦Íÿ@”¯J¨*L)J%))È+ cTÔ/vªç‘z¥‰Ÿ™F»é+¹DÍg+ˆ! Ž)*Õ¨¤ÒR6Ä5_~!ÔCWÅÑ©«"Ö¯Ÿæ"ÓçRˆ0ˆyJ]ï¦×T¨©t"‡hË´Ñ*QzÚ¸>¦ˆ–3âa DéL(ÖUc ä‘5ÓéMm¬©z¡ u(6”M¦B2a ˜©«n³U¥5VŠN&Ò ¤v¡EãØßÿ¯hŽ’œè`†b„YˆsbšÝ))^Ï¥;‹Ùfô©ëŸ-ÅTú @¼B•lh¦ì“+ b„Tׯ¸×r)*ƒŠk vcÚ¯·‰âÙLãGJ)ôOkÕóZ™F¯x©«¦Æ´‰£µ/d‹8äåo-na;™èE@íb‹+ÿª/ù-ßd*²lÄê2)¾È`Iº·Mªxë#Uˆ2ùŽ˜HAJ†ÆôýtS}º˜ÉQBž[aú% Ï]®ÑŠ*L¼ÒE ¦S%ʦ®ˆº}IÚ1Å;aqhýÔÙúŸU2JfõUqdA˜bãcÛÛ1;3u.Џƒ{삈2÷ÍæC>¦‰ˆ¤tv …`ìèE1†ÏªÜÄf¿:X'YÌ‘¥¯bê˜; Öê„ )K™˜Ï¼’wnŸÙªˆj}¥“rŠ^ëõ¨„¢œ¬ÆeV QÌϱHRõÂm?NIHCé,2Ü‹´ç~§ñ·MVvb<…³ËšT˜ìUí+õ=M%¨œ­R¾vÝDÝœ*½-”i)ÚÈæÜ­¯!%{2褡úGÊtD1x‘ȼ?¨Ô®p´ÉwÍ㨣”¥dˆSŠ(Bÿ‡DOºÄ¼Ö-qæá u®uxy[n¶æï—LIJÄoâ8Ä@Î+(ïþ–DdîÒ\‡zd¦-%ìmb¨¥•,Û3òçê‚Îø¸MBVbyÜ"?%º½·ö¢Úž¤³UFj9¥_ùZfÃ5ùˆÉc=ÕÚ rJ®Emrиë‰&?‘çn1ê‚"ÊŽàâ!KG>nÕ±÷ÿ®{ZŸ¬YM=»Ø’³i‰ä%Þ‡PåÚ¹NrбyB;¹4Ç*³ L–˜Nÿ¸šUNw#!ÙÈ"; È»y ¿ÉL—Ê”ò$¯›þÔ!~ލJb!µê†éj¼åÊ9F9L´D‘ n+;ëÜe&g‡XŸ%Ä–ÿ"%gwœgøDS1›gs—7¶Û‰þÛêaÉA°ƒâýIµÒ^KyPCY¨˜RŒs¨è‚fM(Z]1–¥'mŒAX#)k‚P” ùÛíöi—ö-švb-ˆôvL|šVyH-Ø©†¸£ˆ-²¹"rÕ›UYqǺÄRH̸„ûmLßA­¬S„£Úi%¡|•ܱæCœœÀØ€r@ %ðð ,{hA ¼9‘Þp2 ï¼ Œ±@Çdâ„Z‘LˆáŽp¥! ™3‹µzt"°µŒQ± IŠìX¸šÑÐXÉB ž“ ´XgÈ,3˜eD}Ì¢ô~©ÄÂD‚K˜]1†äAÁ¡†pcœìīΰEÛ6 d'₱ œ(RÇAÚ&c¢¹`ÂEÔˆjѲ¹xÆzPˆ‘ÂV=w Ä®¤O ‡À¡Ô„ÌýÅè%dta@å´Rª#Œ@0ru'@‘ÔüpÜ`É“$SÐê2¯3” »dž„wªu0†Lä¢W$£¨¥ð7p¦) EFR¸ÂúpH$"SˆTÐQ-â„¡„Lb";©õ'ü±ˆª¨ñL´é}¹U)ÊÇ2L¼³IÞÂ2üºªDÍ”£Žb‰ZñÖfúC¾–£²!1,µEW_Û‘*%<ºOz6 YW½lb'&z÷Ûu¢ê ˆË^ ”6j#Ñ;HÈ. T„Kû¹Nk{jõŠQ š[iŠÃ Mz~H…w+‰ÇÒñÉÊ»¶z©8ZKº.=fM”˜Í"%Xf»çVF6PÄFéì˜c „'-/]) RõföO\DOsÕXTeÇ1R-35˜úºÅÞÝIJÉü~A¨¬ ¢ûÖG(Fr!Y÷Õ¸ÄB Sm®ªÃ-‰V–ƒúw—"&çVê­’¢gJ)ŠÚ%NaS¥çDñëjÂO=Nœ šªÖ5l©T-–•\æ*Rýj}\ÅÍúWG‹•1B3}&¦QD7”D¢©|®#ЕVeziޱÜ‘Žè›?§§ZêÌF«c™Ó± ›Ëí"pËÚäÌ™;júÅÑ«ZMOª”Ëü›*ë9l΄Ò<…êßÜQŠÞÕõ«’Š1~/ýÏg2rþÓ8¤‚›2÷¾³ ³ÞÍõqÈìÕ=“—°‰S’KEÒµC>¢>Ôl¦jêâÄ\Z¬Ý”9œeæÂ˜Ç[*]®âS?(PQ*•%¥xb.M'ã0†ºÝŠÓàžaYÕù+n[éá=d±7hô!7ÚÊ–6ïŠQÆR&)™¥Zœb˜ŒMÊç)Krê‹ûtÄ'½5³l\'S½ubÑFZª¢«ªïäÇååRì¢jS2¦9JôZÝëd”Æ9“½ˆõ'YE0†uböÙ AzOKÌ^”ÕR©<Äõ(Uâ!„%ädØæ`† zŒ òþ+!|& v ØÇ® NŠŒ.!Øê5Èœ…ÆA zÄå%Ct r)p'#ByÁß‚CPÈB1ЙÒ¥TiAŽM UGmHÞÆg¦,'B2’9»0Á‚+0†æË€H,y©‚ƒ·Œ`íª ÁK¤ÐJ ˜¶h3 ¨D)8Ë©</ÊÇ3xyf29£5ŠÌgh& ÐfwT#W8Qݾþd÷ !•Ôúæ(Á! †ÃcT nJЈHóÄK#)p£Øç%cE¥e' gQ梤0"ruCŠA ‚9kŒ@11¬g)øí£¦„ …΂fU²»¨¨ø qxs•ÈSPÎMÍ;dìˆ1 òTă”ÆÂ&Û•eY N–ƃA¼()G™ˆ‹Š‘’kŒ¬fC(°ç)ƒŠYH/ªGăŒ!D+u) !ˆŒ›BF®+ò¶ö”% ôÔ@D~=çÊ¢¡ »€‚ã Îp®àÃ!…:»§)ô¤ÇúÍÑ C9‘C3- 5 þá¸'$BÌLöR“—±K 10(çB3‘ ½¤#`ÕCC{{ET§r©ôÌ$ Ê4ÈqTÅ !°Hb! ‘Dã ¸…(B—‘p€¨vÂ}«‘Ç®GûôJž‰°r3ˆ"òWjB½ÿ¹šÅ¡šŽ…T+г(µ)„1è[50ŠeÂ¥èüâÅÖ¹“ä§•ÿÃ.ën1&+ç§HŒ™c%êYGR(+1Ö•Y›ÿg-–»Â-PúmòÙ~ÊBwÒ’¬‚íJo+¥M´Ò±‹¡)jø±Ú¨´z£;LB¶H5”…Y 'Y—íËS[-†/“ç}]“Ê{>âŸ9Œ)Ž1[ë1U*W≂½ÐÿlU5õDu"º‘JS„eÞº6«(äÌTÝg«¬¹Î¼Ô’Ø¿øšÃ¹z´öªÒœ¤y®Êú¤6¤ålzFÅ”ÇF¶ëI£J‰BàR²žD]«Ê‰ª+YRe¢ñNâ®a†%BçS$¥øÛ‹dåêÙÙt%P¯$£šdS½EawÇÜ2{*í*îEcAyèò6÷à‰¬±„c¾+ù¥›Þ!LÒåTtÑ$U6Xòz ÝÝL#î÷B®'_h]šòÄTv¿Üuä0‡_ܹ…fÀ":ÒJº™ºýDö;jˆé„—2Ä}Új7!ˆµE~mÓ¦y©º½zg”¢#â·#Ћ^äª4AŒR—LçõfcÚÓ,cê²ÐŸŠ"ËtE®Ib³®ˆU' †>*pˆÛÍ) )L) ø‹f}#f+ß×äg¹|¬UEîÁýhÃù!ݳ³²%S}²2]™FG!¸•¹Ð¹¼ÖOe¹šå_ÓiHe¥ÂzRÆQ×%xúNÎ7ëK—œŸœGÛìˆseµÁDF¹QÍA U°…A:)ÜË>pÃò­Èz8JEp°ˆc0!ÔPµ0Xã 쀂Âvƒz]2M`tLH¨ç¹ý¢ ÈÕ¡…¹Ècx)Dèf´F²ò Rñgh'‹(ÎBLn)ñ8uÀ†q¹nÑÞ@ÈNc‘y½c–„qé ÛÙŠqƈVR¸|B?‚!!ÕA¨ŸWN0Å4Djr!ŠC¨¢!3a zÀÔw‹âöêA…& *•tE[Ž„23ˆPEnhA ë%⌡C^êhEg(Jl1èN2ˆ|!2Òæ¨L JfÞ™²Í9K–•Š›²J+rJ"˜AÀ‚m:cl`ä¥øØ†b>'%槃÷Šæ)K¥9lDv´ [ÿøÉˆÃ‡§Nù4ù×ú‘ûVüüÉýuþ/³‘ýø×Ðrˆ¾û° †|aÕz´B6“_÷[‹úÓ ïnÔë¶üKv昴{zgã)P Æ"[èf¼IÇ2W "°®ýO*_")…Ê?o©†3Õ5 ˆŽìd{òY2¤¦µ{¨s:ÑðNz²keÐT­2¼‚UÑ(–%¤@Æ8QTÒþªæS ÅYؤ».óê8Ÿ-mò¡,‡DÎ["Þr U8Šò舖©:¶&9¬„üRl•³Y3뫯•QòTÄC$P…26~œˆZàÄl¡ˆ!$™E䬂È\ëeëa”l˜K¡QH­î‰3Y§áyk! æÍýÏ™Ôm3qr1¼&wßð¨ËEÓ†*„í*°}©C‘>®2ö§»ñ©\R_ë£Rbt¢J9B„G-%br/¯6é;)—QF•Ùµ~¯KQP”·¾?´AœÆ Se!R¢×œ‹tô§©™ŠÎž1ªûëÿÉü²1¤Dﮉâ]ÚíVwòK‹®]Ä•Õ=¸¸˜ÆI^Ï¢º5ùW²ŠÎEyX1¥ÜÄx]RÈj6qNªÚDòû’’[é´7SHU+„C9„*„f9dlaª¾“jâ>¥ Èbëß±«Ëêä£RÓù-rÄB2 åV6 TŸ*9·ýCjJcóP‹éû6å\‚…]gö5\•‘§J&(øø¨U![Óû{šÅÒ¥™ÑbI«Þm)2Ä!T1Œ:ÝxšU?éúo1 2±„©šä“"ÓÍM°Šßþçh‹Ú♜FBè® ¿"&oQ«3Xn{HÍù˜9qF•iBîæ© ’•ÊqŽçÏ2§¬¶9—$år )[%r³H«ZfÓââ½91ŘôtEu±Ðr:ÞmR“úS9-SúV©åvó•Ü›¯y6&Ú„Õäú õ¾1Õ,AÛ•9ÈœÁ*þòwù(¤;Y<¯vŽ$Ë#¯¼DW-5_õ}jŒÝ^O«SyT,Jc8–É((8#…hÅ2/îf’Í›ñVIÅ4ŒõnÅ¢vîPÉ&5p“6–”¦¹H×QY-ƒ¡š…#ðþ”ÔÏä‘ê»1}žFôÞ7¨¬Î8ùåRÛòMÃ9Z¢±_Èì•*æ|º<–ïÒì¬w-Œw¡—F%œ‘C=µLÂýí—¢þÞˆŸÛ¸îT§Æ’µìÄr³YÎê©–ÙͺÇ*c§¼¤pŒdÞAƒnÄ(²]¨"‘•JˆMlO’EqSÈ&|K)Êä[—éOŠ™—9üúÒÑgÉ>Tí¹SžV…(Ø’å¢Êä”tô­ŽÞÌÙm¡$%/îD=ÑQÙ›ù“$Ad<ÎOc!ÅædT#édõüá0º^Eõšì©‡Á‰R¢J2UOrU%ÙSŽj)j²"'¸§E/L„Ê“=óhü½’Wa–à [LìÏuFþoVÔRÕN*ÙRß_Êæ ÅóR‰ëPƒ l’ÉB—s›!1h¹tBq«ßlo_Oº©±eZª©$B)±,qn\:ÑMŸŠ…äk¿¾ã›_»í~•—ç;9¨"aHcRÂõÉwö+äÁkÍâ'R+ôœ”ÖˆOñp¡0™Ì{_µ‘L3 9˜¼’»*ú._•äz9]{*tl½ÑÛJ2bPä• õËíÈm/¹œ¾RæÛ䢨z앞÷BŸ½5ˆŠb«bˆ aF¥+׌r³þ=5_T݈Šå˜&í&‰î´EQ d9ÈBXôS­ÙÓôïÆAXÊDq^‰³¡³ §¯UË*Ä¿¨N«pÍC*nj3©WéI·J™HìÚšßG£WÀø]DM"Ȇesèübgx®¨g¼m1EáU'ÇÒ¦*7Yq²ŠÛ³+}'?½UrU|jªÈÇâû¥d5L’BÊ´Â>OËw!+–uE·õ$¾¥tr®® T3r”¼ý¤òW<Å-+ϵ§XM/ ‰Ô!†9kâHÎ+ z>shÈä³5ž­e)$áBZ+’d~‚!é!,€Â A,„Áƒv‡ëÛ:53ôlp„t­ð3¹Ím,`CòˆéWšÅB¼žtÁÎ ÁÞ˜˜dÄd Øa&(Zf ÌA'fŸ( 1*a…²RrSW’SŒr•Àøä!¾ Enß §±YÆ)‚"‘ð´e ãì=¾ÐÆa2Æ˘¢nÄæÙÌ šB…0tâ•„ôtNìd#£"³ FaݘõØ ¦ Ù-¯N—qE¨S¿†¦VèÇ–Å' ˜ŒÆÀØL"‚cQØ.®¼³ˆø3gqBw;©„< &8ˆDsZT ’PÁB>V … `9@ª®pLØDK#;‚M‚B2Î@ƧL óª÷‘Ìj%C[G7F+0€Äl9¢„;h‡ ìdlGU²”/E(&-Á˜RÀÜa ‘S 1%j2±kÂ)a“bÌV!ÉE‹˜sqVU‹ƒhÌX„°N`Ä*0 ²Òa> ‡Bé°œ…#“;‡ØB¾R BEAÁ‹o#qHB[¯ã˜à|"‘IüÈFdÈ¢# ÀÈ—FУ8ÊTuhLÛÔÊ+Žl±E(¥PtÄ‚Z' 7½1`Ä‘̄1Ÿ©-H5›!‰³‹ƒ…áNJ(—d¬Q!+»(’£ŒŠÜ¯D‡S5,>’"jÑÂQ!*(†³5q æw!aíÜŸ{üå1&Ï…¼lbA€ÅvC µÌ* 8EŒàtîô3â …« r@ãPE¶ô!§'fhÀG%L±ÔÐbŒågˆ\ „¦Éz­Ãˆ‘„’°Ï®#;%…*HnÔnXZŽIª#Ôe\!`ÂUÆùŒA DÚ°Š6r8îÇR›Ê¬! 6ba:,9º!Â1ÄÈY9#’õNÆgeC–ƒˆ¬È;:ˆr!ëpj Ó N%¹Ñ… Q3½ÜS™Ž6ÌX3D¬¬8[ÑL+]Ä­ rgCHÅ ‰Ä™1󦌓 #†í‘ ǤT ž õç0DÿSoÙDiE5й©)x!"ÂQ¦ÃèPÉD\„1à+Et*pHéÀ!0 ÿñÿ9ÿQÿ”Ê6ƒþ¡òÖ'øÁú`Éø‰ÚˆäøããA¤ü„5+” Â>³¢"†;¡nOHPˆÂʡ㙻d21ÓçGÆ(€F€Ço™ìYeAA¨É¯ŒoÒ†bЇT”8WQ•Ø(2Sž mÒÑfrxI±x5{xšª9`Æx¬/sª:È5ä6Ø@Q„l§î J3ÄF)wcÐ{„—Šx€‚õe¢)Tq1?çƒF(h%¤ˆ¤5PÌÈgN´±© ¸vQœÜõñ(ôRˆÈæÀ„6º£: ù‘à\ØÄ"+Ø´Ee%¸Ôà“ÑÙPA™­ï ¢|8ÁÈ„q@.(‰xô„3$¤HnU'ÄTP2DC³ HALÕX?¤ˆ<-RF5¶É•^$–±Ê]%F)k…ä®I#J‰„Tâ„ÀE¬ô¶È‰òý%J2ÛÌŒI²ú§¹ÛJ–@…«=˜­T)5·ªE$”vS°½[9ÈqôJ•JåîÑ9ó‡:¢¿´Ç§"LßA4VD¥+z% ç¶°Ž¤â¦-:ŽÌ´DQЦ1,Ò¾U(ýq(•9+ÛF!4ZÐzæ{6®‘ÎT%rùîiÙçs«åL0”bÙ‘9eÔrnHÕ3Š·Lƹ Õí»±[‚²ëà‰K—PëU%ßfÄúz™m_j>-¶ÇZ7é%uÍÿl2²î+£’’¹Ùé3]ód‰…%KÁã8ŽºÏ­º‚Ý*ÀÈ#ñªbåíf!1«clÈ”KšòZ¦©±kƒ"Ô;OlÍRºA6q‘Èúo EÁåÚXˆ‰ñB›iòÒÝGâ•|D)Ä¢û9$üÓ•‹Õ°ŽFÊe‚vY•ÔaÊ™Åb5nµ*g»ŒMZ¹›—oÆe5­[].{f„f_¥]KŸ}RÆ1 ’ÍBLúÍĹS°z9]"[ñ~çß.’\íC‘3çeQiÝLY˜B2«âˆÈªV!8³×yÙØ’¤-©ÖlZßE1X¤N9Q ¼lÁ1d]US¶Ú!‚qõ1”˜„*QÄÔ©„:¡ðDºñwÝllº9SI–OÉkùùbb©Pw^Ýïrü‘8W3T¨Ãx™cQîÓ9E&HÜq|»Ò®’¿—~Âz˜†b쥣 Øl1B)W‡V_¡H*f/ŒM§Ú›bÕÈçv\ɺ qKÐ Ìß!K°ˆ9Ba Ø.Aç#:0Z™•lC1Ìq âdíhì¤;oq‰ÕÕÓ¡Àt§Ä)HP‚T U%)° Ìà Â1H˜(!YÐ9\Ä)Öeb¸¢•!à(¥6 §q± ó=5 N@B(Ã"d#†„u(­A†¢ZgC¯^DîäE^0¶ã… ÛQ]R(”@ÈlAÞRBF È ˆ]Ò¿­Îc·G†o‰óŠ‚žÎ‚„L@‹1:Å„$ƒ"‚25É„CÔn„ —‘|s–N:üY‹ ,RÌõ½ •àa¨kŒQˆgâ„ 2A=¦ Vù‰&aB1)B»”@˜£"h!X½Ê[M&o¸ Jâý“qQ‘¡ÖûFäBdfô‘ã"!(V?A `C1aEQýqÕD A„`˜¬£áZ„4 ’ŒÚK‡ŽÑMàOˆÎ¸âÕ¢ÞÑq Zò³ MÄãÚ%ù%5À„À"³ŒUÕ1ØCÃ*”©‘‡Šº¤à¢vÄÄÈzÞ§ãp1 jÚ!žxR†à! L9<‡kw9ÈQˆM/rD” ÔQfq H¦ùfÊ!3c‰A± ŠEˆ30Gl^Z¡J…lާÅb¡w8°á6‚v;j£37fE É„  Á˜ÄŠqÅ5:+U@ÜЮSõëó©[\'¾+“ÓeL*Ö¢g4u>aˆ}ÏB2c R.¯ºÔ¦§f}u²®G*èœm4”½rG8£)œQ(¬šÎDª”U(„o;%]žê†&á â3WËÛg©±ÛlÑ)Óf±U¸öa3ˆû:gn-~DßRŒÆ#'ÞÔ¬A$`£ŽAžªß¤ûç*f¹’QQì%Éœ›Žç+ªor©6™•HˆB/"äÌ- è¬îTy¾¯©Úµ-9fblñoi;¬\ÝxÎe¢køÅ.G¡"Y !ŠQ(ˆ)œ¬‰Å+¢5ÄüÙ|2”«Ù÷’ÛNÌ&[ßÑ8cW㓈ɜc ¦wC?Ð]“üˆ9ÄW#o#¢jg\ˆžmO)´™Æ3RÂ_ÑÕ)MæÖþ¥î¾Gz]xÂÝ‘VW4ÏÜB l™ê¯./ûLV«»ž5´´§f%Tì f˜ê÷Gä÷ZŠ+•ˆnT#2*¡L%¼–Oè”—ªìع´ž4—ë:ÙùYˆ™j"{g3Mg0ƒaÇp£.,n¦æT§;J¨wÖ­³²|j4Ueý¹¤'Ï5·L©1´3U/ÁûÝŠdï²ûú²°³aLV#8Ÿij[È¢#9׉å®V¦Ô¯m(+yz)T¹,öK©ý`¤6Èv÷Ëó¹¤!›2ÒQ†tCg“T—¾¡•ù¤#/˜’ˆ#æ#g2zëˆ) )I¦&RzÒ¸ „*£UhBV¿Ø…#3© èû”¡ r%hýI?næÍ&£™x¦ülôªJe+:”2”¥s?£î¦™OtÇ0©GólÖ¤Õ¾¿CfENænãÓå% ŠR Â蜅:I²¹ŽºbeOœúÃ2²÷/ŸWrÚÖO´yôëg ¬·% B:Ý™ˆnJñ˜ª)ï¼¼è)9Ô·_YËR³Õ©¬Å"k½;Z‰SUÿè¼¾%¹±ÈĈºÏŠ}ÖÝÅ£Êc-[ÿ-®¾ï‡SÝ;ÑŠêìžF„Oz )LsÔd1ùÙå5Õ&ʤç¹h«búU¶ëã5•d|äE K&§ï²•ìM°—~Ï[¯DLÒNm]*êeP©S­‹"þДâógÜÞLÔ#Hæ¢Qâµ—i©Œj‘ #{¾”Ès:Äz¦ö¸L{{j% 3p»A*Ýdga8ô$‡Û fÑÌQ\…NFja:zQÊyXbyÏU%Uò«Ôåj©b3Å,Å™äYĹ–¨.É„á(§ªe¦_¡•¬Ìò›­cçsym}¹u”Ô&“üJ%4‹O#Û×hiO35çqÅFê¦qSKr)Ïq4ñè.Žè8ôC\™'ŸØk Ê¥¡å'£]ýØf„!\©¢=I¬[<©Œ‡ŒV2ªi»Å:•#Sb¥†H^*ÎI ͧUú&/cß$¼õG=dLf ­l§ÝüJ„ ¢™¤aB1Ü刕:jÀ¼@2ÑåzÍT |“m ]ˆ×Fˆˆû—º™‡E˜ò'¡ 3E=ªw×ë¯úŒ§LRoû·Ñ‘VM¡$,Ø©1§!n¶é„:¤ $ÒôBôk†²îØã,åD`ÄeÃ¦ÍÆòéjyW%üß“¯ö„Ò_5òŠf“Í‹i^‘ZFxTU:\"ŽêêW4[ÙDx’¥j¨‡ª iƒék´¹ÝŠ!Ž(x…Ë”GÒ3*w5ŒŸæ¡?hŠÝåBœŠ¯Oš\}ÛXT˜B‚‰’SjY„ !ÃkøWØ¿Àd(Õ³è ¼¢Æ‹ )h6 –lâZ¾ ›`PW4·d,EÇOÜ—¾…šùs6Žj!=©Ë/ù9ÊrB(¸Ç3Šs‹a%¥T)µ £‰1<âNnaêivxñçœu êdPÇ<«È”w]†.g„Cå;m'1+œ´ò­‰:õkŒ½¶.nk²Ù‹´ó³„†}rÖ{ÁNë`f<·b¯ìòÁcf;à‡*âC¥EAÓ¸…Áh—¢Ö„̯çÏðÕ97>Q‰3ˆ?y;°ö#ùX «ìèU•®À@b '„ô´,XJŠº)ÝçŠJZhZM½Z‹UálØ­k¡ddz¡Wœ¦Uy¨• íéùœÃ‘TálJ%ZwâwäÏÄÝ[ÓM™ÓV,QÄ% dV)ËV•c\$iz‘ l^r0QfiÏÁÌ { §e!,jVŸ˜K¥ëáoU»éÉJPÞBáû¤ÅI—Fn" 1Ç*DÂSgÙ²ï:ÙÐv¿a¯À^6LN^”»¥T¥=F¿(º¿ìÇå)fµ]’xÈ?’(æ™9PKÁ攂í@ÂâåI’ÿ2QÃCÒÜp±&À†Ïa0é‚VY#ú ¤å*aš9¥'Œ„ÁÎÒÐæ œîZ÷#ª¢‹ÛÖkéä*oaßèiMÜW!ÌqФY<‡$‹ ™“aãÚÁ‘ïDAR‚.k'¥I8¢gj½æÑJ`• :zxGñª(¦I £ï=‹û*yKB=IS%•Ž“/¹T‚ÖÛ$lR!×XùS’G§Z²'%C°‚™j8~“.Ý}É•²Š(¢ÌqœŠR…Ĩ¦Õ§›}Ü«‰OÑ0Õ|n˜º—ÖÕ•úk#Õ*pÜIhÇ0Å*%æéR œÿ! *„ªTm¡2Â[b~cÔ£µÓÑ þx˜¤šƒ„^5ù$ïgS¬è¿Š(›ó))¨åÅÚ®šçß™„: 9ŠüåQËcKë¢R¨C½%4-wî`ýÖGI’¤(S¹†²±ž·fÁ½“¬çm¯ÃÚaewžìü4ÌAPã<×ËÆâ8xòÂa ·½#wÇ$Ä‚3CUHzépzææ¬Ë¶¯;в¢­(T䢣sL%E±KIexå¡Z3yKäú’F¢Î ±¨1­¯S^¤©§F9¥S8[+J„)YdO¨k%i‰¿« Ž’˜W¯–>ëÜýÕß¼übìÖ"Ôú8ÙÖò©ÖOÂs¥´RÌÙÌ\ †Pqˆ•¥b5´¾{D;ŠÃ摪Bå¯u­Å6’Z½ø{• WÏë 3&„f¸æL¯”!5‘Œÿ2“_ú0¦±A\6Ë€M°W¬¡Cnð"ªkƬÖWBˆÃ4è["±dÁi‚æI;a Q:PŒ‚†yìÇ.bJðš…)ûÞÞl(úfkil-è´ñrb}š*S··å)É AÇ×,DAP˜òÐ{ðˆc¤¦ä¡)§»þÇTs£P^%É©ž*m»ÿOyЋ=H"ª`A¹}\BÅœüÛ £?–¤ûÉžJ½Ú­qˆ)X¬j!º›]Dó»r“¿bŸÐöÐ (>eÿ÷­ Bå‚;ÛÑõBôášS8DÊSêáHÝ.bÑ{Hs¹LÁŸä&"Ž;X¤ÝF‘ÓÒE»‹ì4©ª´qÞ©Û—Å™VŒNü*nh[ii"fþž‡G±mBrK‰Î'¶QŒ¤wQR–\ãæO„NUWuNuñ[ûšý†f™3ÆNÜɃNÅW\ºâ!¬¬(”,=î)ß–$­„gÊÒˆTãd…w/0à‡K–DŸãjQÙ Æc–l“Q–LÒçh®­tV¦Í¥IeAM¤—3D+ú—¹tܵ¦’C,ìÇ8êk~U÷er…qYÓŠšÂVž/W¯ÛFÍý-êIh­b'+á•êQD!Ìe«ˆd©L– µJ´Ô%sT‹Ùskä\›i|êîXËbª³*—…îUf£Ù稺˜º!ÑÕû.»’¯£’˜¤JVʦââÜËÈ¥BTÆ·3ÑÛ³ÑjÏIkB>G¢¦å\ÒRJ%PÁWZ¬ç—÷Å­éJÍ)¸‰ŽÉmÞóYRž¤ì2Ôv˜¤C»îPX#8ˆÂ6¥NÅ{—Ö™.‰´¿ßkd—/«¶Ì®òäD!R‚«rÊ(Nÿ­ ‘Jè1è~¬›ËqÞªÝW'™¬Å"»Pê!"ÑÌFFôý”½»›Æúe»é–ùjWÚ#áÖŒ´d{#DIÔˆ—%WËÑx\fDSöFÞÛP‰GGä‹+ A…vÛLâABˆAŠÍÉ^ßÊãU^jµ ½i{kWÆ\ÉX”\ììC'œDò¢ï¬ˆr&ÿãx‰éDO¢¦JGØh˜¸„sŒ·OÄÄÍ×(©D¶ñ9w67R™'±Så}sfžo^•¶¨ã¸A0LË]‡G2{XÔKDíþ¢†z‹jÎÖ.?Ÿ8êµr÷`އªÒ"r8…BM„n¡ ë_Z®PÝJDѶ¸jÊnq+‰©ÇJ ¢«×Â,¯vË„vÖ&%šü›‰™Y*¸Ÿkâ"Uܧ)ÒbcÛÔ’©2G­ŒŒÚª]ÓKJþY,©ÅM;¡ÐT ®:Ä]•¸¤Äõ­ë—IKøºòâ۽붿uÖQZŽØ«bÂ9r‘EB¨Ì}> «£¦ºe5m÷ïìE󬬥G0žz"ÈÈqꜨøŠØŸª‡D-ø&7m.f!ÌÍå§ Â‚¥î¤t¦¡—¤´QÛÆœjþ·#­ÝNd\l¡lIHú ‡FoâÔ•.²qÝ8¿ÏêbÓø™ËËEAyº‹.³NÔe“kŒˆf–„¡Äw=)˜3…3êÄ íf£s«‘ËÛ&¦Ú…Þ8š'>É‚ñ5 …ªâˆBUÑóyEÍC1NK&›š’´>½,95HˆÅ¼!ÕÅ!Ræ9žAÖu1P•º—Û /i¨‹ä“³oU5Š™åTªä¬wÔWÄ)uë&:[ÖMf®­^Eú_+J-îe)k A—¢@¤B±…r!iöUEú1ôò驼IäTz£é9ÊÙYëd˜Umã¯%,¼wÞËrP•u»úØ•"q&ÈÌc1ˆq˜ª©Ü؉ë"+_'ì>Vû…¹XGÎ?· Ë*…qHå; )K]s°&%uÅ"`ƒ¨¥¦S°²&ýƒ25|æYãq€B‘È%IL€"SÑ ÝSqÄr–^¨Â1ï`aˆpÕ€1U£0Ì ’ 0඘JGŽ&+útÅ¢)"‘ðˆpfĽ11U¤3“±(ç‡uˆÌ´°ÓþÈ&ĈĀ a•$+çCX ¼t¡Ô ZŠE¼†0&î¤AC '2á—òT8HD®(,]™ñ¨çZÈÈÚ2#+}ƱEA2žjù º&“‹Ž¡ PˆzLÂ*6A9•(BžBˆ\`TUH@Þ.Düæ%‰nÆÓ›§DD œUðì3¨‡H%§ã1µîJ3‹´%73xê‹Ôö—(…;±yh¤:_Nk&Šø(â†vËZ¢# d9{·œ~þz3ýðÔ&Ú×ô މu¢“0¢²zm†\0•"ßÍl&CÕ©nõßI^j"`ä%ƒ¥S>F ¨p†[y•¯ïÆw¢1>´Ô ƒS4QPQ4ØCZŠÓJR˜›MýÛ¥•þGß,²“ 량7PªÅfqmOŠgvB ŠuFRyEÍFÇJVÝì÷“HA”—î¹i»JŒb¿R’Í*åÊZ+®»c‹·\2ù(ö$†úî—esÂ î ŽìäùûùU‘êJ¥&ìyY+Ô„Âi¢/wÇ&õ,ÇuФõ%é~Õu¹©§ÂÒè>UýV†&êÆ‹‰Eãs¤ÈÒÕCЬ‚Nй[É2~¨¦`Ïn(ŽUB¯;…Ö+gmWsZO䋨6•¥ãÏY¨£uaG мLR¦ˆä îD(FcIíg0Y5Æ0½ß*/_«¿qR«C/,+”„O1J›rý+ÿ‚H[*aóªŒÉöϦ:™TŒ Ì.®wRd֥à ”,”ÇÊÏG±’¥+¡‹êMí]W(C¼Mûë)“n½Œ•µíO=‘xBíÈ´e[SêGCyŽg[36·ÑÔïO¢¥·üRžFΖ4Çé‡,"¼‰Ô¡ö‚ì³:®6*‘/\#YœŠFLË®6ÿ”ˆ1hw¯þm Ëã:UËZ¿ÿ[Q¬Å{Ôbº|¢3[SÑ”Åi žž¢¹îO7“‚©ó&)Nè(b²é(‚Ž—¾Ìä1uÎ…=÷5%ÂË£mez‘ÂèBnÛ´’²¦*TG*äZÛ\¤¿yN"[»î.Ûõ7‡qLÔ¬úÆ«Æj†eªáKØÏ—J!Fi&]v¿\ÍÝþd£<ŒDBþ†- -ù Çî8¨SjI±^„Z§ˆï##?1PE¢:ˆÜg]) VÙˆOΊ$Km›6Np‚©*¶R hµÙMüó¨ŠJ§­¢nýpº«U%DqÒ–zØ‹ûS% *T‰žÆH”D±ŽØMfr>ÓèU3(Æ_=d¯½”D¸Žƒpôá1wEÒ'Ù„'(´m(’É\¶‹yJÇq’ÈE#zN(–;'æ™z›Õix¤&×Ò:$›a4µEóúçm.WqÊÔžKF½v+9…e0]¥ ¸Cí.3JÒ˜c-?V•ü ; Åu4‹Ï§0înTCê­Ø¾'©6H–D³»tº_ß%4Õ}3³6LÈŽsŽî*nIPžõ/Æ7Š0¡…¬¼3S­•ßòmÔÏ$šŽû8ü#gI§tBˆ½òQ¬aΜÉ\¶1%²"0æ*´¾ïG!˜QCšx5X— Q„ßÌ»ø¤˜Y-Œ&!¨·˜¿gôJ:â”PËׇÞä Œýå©%»eTajkTÙÍ®ßI,1h÷kOnîY,ET˜ªŠ¸Q9†$Ê)P)@ĤòHºÔ¹Î²©Òû0%:’ŒFK›Ú}¯,T*Èšë_ŒÉÔ+º%Ú·©¹"\S§ö– ü“¥B0¤¹Hg°¢qç<¤ ®Œ^ɬ{£ø»uO©(^ŦqŠz-ªBT¿m…γ¯XVXž,ì‹-ʶ×[7 Èr!\£ kôÄks2‘<ú¯‹;ç)ž™½ïÈbå$W¿ª¸êijU°f¶‡5{w««=uV¦«'=®’¨©Õþ =e¨ŠFx¢HÔ0ÿbÙæä!ÐÅQQ×}³§á×ït{Õn¨9EY¿&cuz–ÛEÞšÂbõ”«¥J^óCu")ôÓSžTY†²0£,ŽÉ_z‘ŽSÌüˆ3 &æ4ƒ­ Ïöt¼öÅÍá-f*(˜¥•ENYèD裔Ñs§}'”ÉiM#´Q‘žnö˜å”IAZ"jS²En_¯Jგ‘ÆnÖì.gÚdm/”ÛoRò”ªã èWe1 «Âû6k7þ½¤²)ô´´•ˆ„;QkÄÚ„ ¦aßr3O*.¡ÐCbPìvE/ÿúÓˆèJîpÕ¾§©Ä3Ý<½”Ê–ä+ºZÂR¦ÕÜRÑ‘ÔTÂgSlBŠâ/ ßYæ­¿'3ÊHªC PÞRzQ¯ACe(¢›DI4 ¯[#.-Ôš;¯•kP†œY\J‰Dû4²¤ÝV•í~¡â'z M”åbaVgNçÓ͛˜¦'½Ep®·%.¸Qwyñ> 'ûM6NÁÓÑŠiWæâîq>iÎz‰S$…£wÒÊs©Sá­÷‡½$DÎ!¤—†]‰X¡B ž’‰ëZ­Š¨zÐÿMs•åVÛ¤‘u"Œì¿©$£iiÛMYÉ„.IõÎ fò³ÉªáV‚(èÌ*ð!lÞ©¥Bªæ@ª¬Äš•GÞ«ëµ „6IŒ…ž¤~ezB]ÒÃ.6UÚÙ!™mé'A•.õ%'Ú˜éa"™¡•ÇñÅÝfŸéW"e„ –ùF¡$£™Ÿ“¸ù]9¨Äy Y¶s¿®Øù瑇ìy„· zƒa(ÌÍŸYþó˜U2"4âˆ%¸š~i†"ÔòÑ‚<+ ª2%¾ï¼|ÊN¨ž·SQi+ñV®µ_SbsD×UÉFÃÈúYª bŒÙ$M–h%Œ>«ÆØ­)/:úK,êÙŠG ¾¯š³¬|”¶‘æÞ°Ìc È«L—Ȳ½Ñ—Iµ[a=›Z9&=©|äLÙŸ!¥.9‚-ÁCˆJñx,FÑ…ô#©TS3Ðå¢z“÷ï£g““¨íÞ'ŸØEaD*!P×6*ÊF>£r¶*0e9î´Ûq¢Ç¬ 0¢W¢Q¢ãrèNALšӉòÊxÍ9p¤©ý:˜Ò?Qªv1ŠâÓXÆ#Š’{q¨}qôØD÷õ\ŸåîéR/Lž»,îut•Ó(*Šº*HþMÁÑ”¤i‚ RÄãˆô_¼ì£Z¹ô&ð„ô›¿»zDI„Z䵯>­*Ì˹ýŠsœRPŸPŸ]ŒdEub\+°ÿt-(^$÷O¾c Øô&«ÈTJ•}s>*jÂ9PRÔ¢¥hK“5hmW~25¿˜p‡ ³È¤—b º†fBÊJÛ—ÕOäA[åk8Ä(¤X¬wµlßô%_~ [¸ò‹Z ÅyXîÚþ¨#Q»{¬ôa‘p÷vŠ0BÎ%i$™ZOcŽÓ\’«ñge*¼¾Ër¯r˜|áæÂ"Õ?Œ'’Ò3‘øUiv—Z¥X¾OŒª™›û²z¤ì…ÓIn̬J.ËŠò¢¥!ZS#b“6[_(ĉž‚¦ˆ…9 s-‹Žÿ‹ºœâTÝ%*à è²k:oâ%Yz‹é~yÆI KzÔ½bŽœ’¨!\¢ÖwúšòÎOÌ)€H `"„.Çb÷Q"ê„6f@!C2˜BA †*§ C¦õGGR#»”Y`‰à§$1ž°¤G0ˆ1”4æÄÃÀ†a ÀC'ánŽ1aó GùRR#œpzù§50gbpSa0hÁ¸·DàŽËsGfó  à[˜ú,c¤…Ê!Ø–x@pù‚’3 ŒRn´s0! šG¡•»Î!]!G rpŠV\âÀ!PGUX¡•†L¸!Òœ1Áa™8N¥˜âhÂ8V¦ˆµpr Äc û2 ÏqFÜ—^ìÔkƒ•Á-ªÀë… ¾Ä#ˆE ô¢j¸ÐˆÙVä4Y3{Pn.©QJÁ²MõÖ$„ôÇtze‹º´²u8Ì\–§/ª]*“Ä¿–F5Ná’ŠH¢•0•S~Ó)ݬMÝ-Pª3ÝÞ–{ˆèRÄÉ{'ŸzãümuÌ£=Zd;eȇ/”­Ì„2TÏ)«åöÆébbµOO^&eHå°ôÜòš«aEIÈ‚{òet„C‰ªødë+ùEJ[–äu[¾…©õLÇçÏ54|3HÆ|êw}úÎUUr˜[UÆz¨©®£“…ª´Â–`¢ƒeËcQùÔÖæ6¥7¾ðœ#•kÎÚíÇÛé|eÈ!ï—ÅA^v9 ËÂùëd¡YÖdÒ¬cùwn†Ìó~žRíK2hCª¦½SR©K'™=×Vœ¯bÌìwªünþ±ÿ¡ø Àð¼ çh?Ê0qc㟘ߦ ÑkÍ®b8éŒÏÄ!ÝÒJD²ð†ZS?®Rí{˜¬d^z^­Æª8ˆèÕ§ðÄ"üôîQZʪ’mhÆLjC2L.îÛWL[²‰ÏtË‘kèµjQ¥âU΂‘„WÝ!B¶fÊL]lZ;¹HKçSûVgl¥ÔÄÅN"QvùêdÒ.v¸]C'õb¢®\F •?—$e#ukÒ^ƒ*y –ž]e™yh•r¾0žØÂ¥B:ÈÉÒƒžUæ!:ÒtoFrj—õºÍtÁ°”öK¥B?.)Sߪb”ÄBV¤ÍDMj=Û–¥Ìêhˆ8‰ÊC"È÷rPgÆ×q—weãªEÍ! VŸ‰SÛ wIVÊ+é>…B½²¶!ˆ<«ößÛ­lä)úe‘;•ΊwáJÚ{yˆï;qz‰çdÜë©%k"ç×G#Ó7e^­zËBñFôœ!˜®¨fŽ–d1å¢ÝÌE9[6]—ÓȦ"{d]þ–3”GK‰\/#•½ªFqÿôÊ*» 3]Q+?ˆÅ”\Ü9LZ[H‹Å¢ªíœ‰•±Ìßô›MF2òrŒT-1ÜÎoSŠÍ¤¡…«1"•T–.W*þõ.«Zð•T߯te‘zõÂU¦I˜!„#&cCLÛTÄ[ºURK犒.W°ìÚ‹K­3j¨a±¶äé —2¸Ûû¯CÿP§Uêã /–ÚD8„¢P¯Æmdj4¬GQ=ÔÏ–.NB9{ˆZ¢ïÔËŸù›" Nd¨Ï@‡$œÇrR’£ˆøT!ò,3Ç'BŽÊ£b´¢/Ó XÀ Å-QŒA„â/ü, Ðb™AžŠ#œr$ÅP´VîÇ@Ê&ùMTî 04 buÅPƒ²Ìc@s:‘ŒÃ¡¢æ)YÈ(Š…"Ä$0¦( ™ñVPˆèg4¼uŒÄgTÅð;2 ÍÝŠ50&à”ůy%¹‰<;Š›—Šö;£ “Åa/ªäæ 0 b„ZN/FP“qjRÂ~—³œ‚ŒJ‡ÞG1Z˜nB„6:/>T`”Š‚ÀÎÅwS ûñ¡!bzaLìÊ‚„&BaÜîJBëF) T(Н@ÁX¬Qˆb jf5$V{„'N¨Â/¡V+”(>,!ØTzýçé󣩅A †¢ aF8A…¨PÆÖ C+ŽÄu24RŤ©ƒ3EQO•èÁ ƒ§‹Jlå©’‰ L-<åÉŽÀA†2ÝF!…QR¡ž"µSÚ „G;>c !Á$"aˆ ÝÀˆØˆh ‹.J$ëTpã93*‡RŽ+~æ’Q$"…PtaFâ]’yÄ `d.Fí9м\dƒÖ¾ˆ;3Q‰eϺt“«[qš‰NAù…Œéb RæÿØ"RŠI L‚c+gȃŒ¹Ù a\:›ÕãID "8ìx@L2Q“Hè(°®Àƽ!BÂŽr¡Ž"ø§È¯µO*Ymcµ„(îc"ãZ¿ 0¬a¥¦ È)¼öÍÇó »²J¨9(ŸÜJaxd±¥¡n<ÓuÄ(tOުإÜr­ZC%Œù¥ênáÊCÃýtÔa:ª†6›nKÑ„fû[<é:–Õ'LÂCæž …¼ÆÒ¢¢{eËÛ툛/q«×š‚e]Å)¦´Ýl0ê£ ¥9ÞŠ²>ŒC¯ EbtÖ­ô˜b#¥)l1LO>uL´T–ç2”•]© A>ÅG5Ò¾ì.çë±Üú'}|# >’K¶Â+…S~¸ò:ˆO¦§»z7-´Üv]Ë_Ù…Z•Ô‰Šº0©!ô1…3©I¼Oê' ú‹_9ù-‡ÜÆ›9îÙª”Ò’ÜGe±ÅB“’j+ŒAÓY©j˜¬Í“i ˆ‹ü¾Sù•ЙµÉVÙ Ê’§©.·Î¢ªZT¦7¿([o‚¡8Jûö×i¥B6ó”ê/éÅÌË¢„'¦œZ6- —K£ÄBQ WErÊ®\+‚”˜Q|•¡?|ˆ˜?&•"ÚÕ¯6 ŒÖ;v…ºßOˆƒœªŒA•Ìî¯gS‹T™UgOÚÖsJ¦b¥m¸B]8Ïa/¾ÂõH!&çhªÞßZë§Áuÿµ0¬S¾!´ŠGõÕ0Ý^5Êsµ™¥/½›ÊørÎe)?ñ髌‰ëâ*{®mlU…p¦RoЊâ©q”¯E=9²•Íz{øMúÕq¯o3¹üö$„ʱÓpÎêa‡ì,’³e”†—YßjI4ˆERzáZöû¥‹P$ž))‚#ÂUU˜T²þU¬#‘ŒÅ ¸Ad2Å'R(àŒ1 |†U¥Æ9,¦‚IÔÙLèˆá ÚIcyj|0à rä)vTîgj»˜W²œÞ &1"ª…s8„BÚŠ5 ˜LdùU× ÎC9ÈÇ\èFrv ûR² fÕqA0`Ðp#•‘¢óÁ¥)_6ì(É벌ÿø8VPC0È Ž\x<Ü #šbKÙæ×78‹0MhˆÁ8†ì Ä9±(σhb×V-sàQ±VR¯F¢²±°la“Ød”ⱄZ#2~á{rŠÃ7ñƒ ç"b‚Ö7`xêRé4 ¤FB‡æU—GYEÌ‘Ç(¼ò~”e[Ñ®ZîÊn¬uÛþÐÆß(¢–·š„l ® •éTDÜ£ŒšCº»&«`ã5È_åÂ"¡rÒn¦5[–·¥ó7Çk<ØI>ŸPª¨Ijþ@¦=_°‹Ã†+}SI©æ5˨Wt­ßY2´ýÄ A”uî§Ð¼^7oa Y‰’V÷8ŒØu4ûÕÕK 6WÔ¯’ ŵ„@¬zpŽwÇDÉsÑ脆bÒÄÔC’q*{:ÈaÌÝôF+f1âSˆŒZ¬›]+b[ìö.uÊoA©˜S™©¦1EŒJÊRÈSŸ\©=ñdRzîR>®!$·“(ï(ŠN%ë¤Âk:ýäo°ˆr´„­,ŠÅ#(®ú„gyZENR€c€ÿøÉˆÃŠ„LÞ@A"ÿ´#4(/Øè©|(g Å¡² ¦§f_ ˜¯]­ß<ª«³©ª´LÆ×"w>&nÊšôË¢‚H¦VLŒÅ‰KÐOÜe¹²û¶MØËf½ËÂ4C¨fñ"ZÒ2­œ,é©ÕÙ’Œò7 ºjÞ ™gx1ΫuSvÊôˆ¯¾GB”æ!c)ÒNDÐiéEUùˆ S·²Î¢éøI¤¦q‰V22Û5È"¶îµ°\­{š™ì†>iÒÍwsz ¥c‰æQ©6¦[O¨Tô8‡2‘ËB•Á:µÆú¾¸Ø½#a©U;±E®¬.›§Cª…R»)쉩¶zr94‹Fòß‹eõ»o›ði6ØT«ÓGc£ŠõgWÇ ¯MÅ¢‘ŒQt" ÊJuÚJ¥­·z®É'¸¥þú „¦”cªÎ¢zN­¾¼ìŸ…+12¨! ê]ÓeDp@Œ5eKyy¹ì†ã"ãóXÝðÝþfd1¥boÅÕVeq^™­îAËè¹¾Á«ØR·+"`¢ £ÑqíŠkb2-QND­îÉ‘q°bÑÎÜuoP„.Û«ªÌ0¤f¥JC27V„E‰ôÿBI»éôI–Œ«Ëæi×>U*¦vGE$õÎÛɬˆå*†s¦*bu7~SÒ¯ã.‘}É•ô9UL–ù”î‰[ W«Td27ël¥ôi8.-}t·ww_C Ž~íjS—4ŠC ÁEº{V§¦{3Xå;¹T¾¤2µÛét­Ø+==ÝÏ^Ü-û5VìUB½.ºewB#—”¥1¢';©åš“3P‹‚£²JKŠDy°ª¤­¶O¯õ•JÆ“ƒTž !u™ÑتüÛEõ阗nJ•Ùj'gÝ]l%oŽºZ©o?u³…NÉ)TaXÇ?“°÷Æ2• Ê»3„†- BTþ7¬ÉÆ[è¿kÍz\’º²Ò¥*¾ÓW}¿•b¥ ”aJÄMåftìÃÿÄ: áÛ!Æöî¦á¨õZkÊøùkùfÿT³´Ê¨œÇngVEFÌò­Ä«rVEw®:0ãŠ+váúÓr¸ˆDY E¼D²7[1г»);†*‹È¦ ]Îp§++žvâýËsS®Ÿå6èÞ÷Guvp„Y—(‰Ô¨˜ó°µîWó{UÙRæ#§ v+áv¤eÞ)¸M¥£SE¦¼ &lPNâ„dG(BVXæÙ˜ŒŒ$ ›ñoÊUáx¦d)LH…ÚaðÄ1F£’4?.‚š(Fj$ ¨èá(sÁœ…ªjù̦ñ? ²¼:Ü:ç|ÈC~ ¡1- Ã)ÆPƒ@hÂdc¦¤}†|G7ôvlAœ!†ƒÊ „ æz9-¯ä Q€0ÐV€ƒr-‘+ÚÍÁ¸E:£˜ï %n£\dcw:h•½³@ë:Eb$.”¤3m9h%0&Ö«AŒ`„%a‚S;e°rQM΂Šu÷aÐ|´„‚ƒd´.¯¼bˆè' c D}+¤Õ™`N6F„â;˜Ê¿ºÅÈYQë–’bÃæè‚–gŠhhUËQ{\A ¯CeEÕQ@‚™†!­d¥CæÅÅ9CÖ KÖD DefM¨LF wdubhh2F""Ù-aQ~»¨T í 6!3)bž‚3zÎwNÈsGg(%ñ°Oˆ¬E2)2˜¥!㎫¡x„͆fWhœ¢ g¡T´°ùY‚äf@°UJQƒŒ¸Ì!Œ#S*Xœ‰Ëã›ÕÑLñƦ ðÈ@œ&0„^‹z†Á4:!96r)ØzÏ×ä Ä”¢¦! hD%Цº¡(g¡  F°1DÈèV‹ÅQnTVA¸K·ÍXˆ£1”…NqÌ©51$dÂB*Œt2™Š‘ðªèQ"CGN ÂR¿]È÷¡&„„-³q„Tñ_ºgKÊaÆ PQ˜†² òÆâ"HЛf•{‘e0­Ê@ª³¤A‘‰–©”V:"Æ1v(Fêóz^Ž5`˜Jru1 ‡EäâCMŽ'AÌr72®àÅe+µ6S%1mõ„æCsVÜ‚ ¤&¡„§eã!G9ÙÚ½ ݽ´Ì輂¯SƒÛøB¯p©TØÈ‰©¶RPÕ‚”3pÈDò Ü…‚B1ÑOGæxç'WáÝk‰Ø˜Jf¯”äs1" 2aˆÊ• áˆ{½6‡gr!—ùÌ­ÌŽ’R§d'#¨øCˆ5øb‰ªeF3mú†F2"ßµæÂã×{ݰÉÇ*¹Yj ¬!ëqÔÌnAˆ¸f29¸!C A„a™eVµ• ا)L[ÊçŠwzP\³¢!ž±ÖÆ ¤"$ ÁCäA"}§ ÅB©MH2¦ukª#£QOÑŽÄÈ\”Ç0!~†v hc1D‘ u!9‘ bŠ&÷B±É®Ì,H2ãnS‘Ǹøt+xR9U„ 2Fb B ! ‰„ZÒ“¤åxS–ªYN- êA^³ã!Æ-N“ˆAAjâ l²MƒJÍ­B æE¨½,$Wf`Rb—i²t)ùÌq a+XPNa”†q›6Üvƒ*HÙ0ÁF¢ B.±D* HBì°wãj¿*â6 02öAkÊFÀH@ޏië›ÝÕÌ+Úª EÔ¡Ô¼§¶¦åݺcÊÈa8Îp#FJÁŒ(‘3åƒ&…éÄ©Ž)¼tU…‘l„Â!¬á_<1œE„­P”ŠÁ=ˆ ú« 2­ð"*¹ùXj0ÛR„§r)xEPñÁç±é±Œin‚täE ¦ÃP`!9”Ä „Ø U)DAè;‚`S•ZÕOPIyhÑ‚”£Gä ¬ ŠÈ'¢Ýsr=|…” ‘ \b˜*îÁ9ÿ&fb¿5"Û@bˆè‚ “l"cY®mrˆÑyMVqVJlÃ.®ÇX‚‹FEÂ!¯ÊÁ’•Y€€ÌßÔ(D€ØKU›º ËìZή-)ÔâÔ¯ÊäB;Ò@•ÅB)* }BËÈ ŽR À‘Žâ´LQв¦Ò¢¡\…SGA ÍØDP‡eÃWŠ6%=Raz&ø_‚¹ÄnźXTMH¥rúÌQñ0‚Å2Ì¢ DŠ 0B²’.‚1fgÔ+‡Bìà‚â-@£…7aòă#òó(e”†%m”„Ƭ$}æÆ0‹Vr!IÁå¨ß9zÕN›Ñb”d?…ÀØÔ¼äFG„†ÿ} ÈGˆ2®AXjhá#eÆdxzr¡Øw#‚•x¦JâqƘ„!ƒ#!X1[›<ÔXš”¼êw8§{™XµÎ £q=‚‘©ˆ’ClÁ€ ©ÐCÑ‚–¡7.5µ–© _o£’‹ù^‹ mâ! „¼B™˜AS³SzÐÉF„ÄöŽVI«:8˪®!™÷(*1OUÌQ5êHbvýãNƒ & „“FtŠk‰esB–…Œ9©Áo~¹B‘suþa0ú*©™ˆ4RRó ÙÉß#ê¬Æ2ŠâŽ¢ w†fåª^ Âï&`cr.%ØËÌLÈ©QhÒ+3”ÔIgw!¡¾Ò––?6.?!òÂc% Hb ƒ1ˆQ‚(a~b$1T*á H â0 Š„ D3û2¨ËZþuZHÄRò–ô ¤#—+Ä" x¯Î̆3£*‰‚‘ ŽjTƒPÝ ²,ãþ×ìÒ5çʰƘ1 †fç'0 Ï_™ g_¢VúeB‹‡ÑZ¬– ÈUPºüPÛ†+T!‚†:0†¡pÀˆ%Zy„1$'5oVM ÜRÉ )xTX;–«# · o øÈÚŠ"+ Ͱ…n³n‚+õ1:#²Ò¿77Âúå þ2V•.j„êìc0GÉáAôV3˜ÃOŽdÈ=‹E)Ĭ­hë8çT<Adâ›A„MÁ„PŒ€ L#ö¸ž ’ìT+6–9Å2Ä‘Ç09K8ЃQDS|™š—» 4!ˆn2I|¨¤)ÕP Ël¢ÅFó~ V£ÿøÉˆÃ‹ƒNý«ý¸þ þ’ÿ(ÿ©ÿòÿ䳒ݱ£ÇGôàçyXlô:¥½õí)\Fè‡iÎ+r)[°’m%–ÖŽŽž)ªÆc÷û•er ±2¹ó ´¿ÑèW¤9BíÅIQ}´ïZ¶§UQjrÊ6,ükyøC°šug‘‡a…R›æÊ4Ò'²LÄCT®Dó%T¨þ̓ÞåìwmJbŠžÂ¢„PÆ_‹ãEÍ(aíJS—Ö•˜åYEjxŠ Ý‘]i C´Ô쾈&-м/çñ=´˜”ÒSˆ€¹_iHáË‚I=¦HB¬èìF F™d!NÏ+ˆ†b ê¯Û%…ÃW³ãD‰ÁÄ|.4îASäaæ³4ÁÇ~²ðs“¬ÎÁç"O ¥^íûOSzÒí´YÍ…dâ™QéÁ+÷Jo~&z¦Õê J-^$оmƸtjA0n?*ß1lêO?²•XˆÏt3‚5!:qZ=%Õy"¨îS·›ÓæÝ¾â"›L´ÊC¥Å,é{Å j?¬¸8Ú…Ýñ…*ód{*=i—ŽÛd/DÕ¢N: J…m„’ˆš% ‘XPp¤ 6ÕÚJQ8¾nIVå×4¤&>ȹ‹"kUõ¯‘d•”3‚©Ñ³}Pî+–(гØA”5Kû'B·‰¸ýn.z‘wg™ ŽäùM0¹±i=Õc²%Œd²L"âË"-‚dST½¦cH¼pžâL…9ÑHñOˆ—,…Ì'±Ìj‹kÌK£ÈÉSW–½Üi 4$¹9I3KŸ*I;–<Ž8¤¤ˆW¸p‡$˜¤YûPÃPÖxºƒœ")Š=15َ‡6ÔËš\¶ D)j.Kâ`KXÎ\¨c¦ …kÙq˜¬Nc;QÄ1\#œa|]Tä%¼³P“îpÍ»“½Ü¢³P•^§Õ‹óá ›…f¦¬ŽŽâ¸Â¹ÏiÔØ¹zV!š!"¡ÛЏ½›ki²EëRý,›ò¹Ù}†0Ç™9†çäï%ÐOjuþF»—­wœ¹¬BóéJ–A‘ßeeï"I«"þ–E]Þ;JI[ Ü5•¤!'r‰i+E¸sXR²Æ×/5J9ûôRÔ0P)Çájar™äó‹s_$‰=ð Ë\4ìöà銢¶.õæÁøôZDJKj™ee²»¼qJ0øÔü'3ˇóÕDiƒO¦¡ÉX‡»ýNy´i’ôL:¡Þ#Ša#z攪嫺at˜6ÖK¥ë:)**;¼A¬Ü'’Y‚]±9=úþŒè)šËR;È¥²f›DrÜc s £úVæõrðš{[ë„—UѺä)ß·.-I#gö¦~Ø·hRì…•|F Ž8 3ÓÄ(•ª-zØ'rMùáçÈ(F Ng,‚ŠfíòuU‘ ›Ü7‘(¾"Ô„#fi¤+HÅ”zîkø½•ñ’AeˆùCñ‚P–£=ml›„Ñ‹3b»ÌzF_¶F”õ•ÄÍäÊ týeÍr¶Z…ð¼Å$½†Y\ÄIû¨ÇÀ%”jì‚L[ŒÓÝF•Q&Ð8VŒ„³HÊSóW÷‘x©?Pß72Ä.±¬dæ%¦¦4Ë¥Õ¹Ï!æbïÊe•‹ÜVÍAHO ”yr_4¹]TÔñº»Fò¦--mz:›¦Gk}NJI¶Ôý)!D‰´,T¡x¥Ý'¬»'ÂN(²uõT-YüüÇÚ[~ÞÚjÔu,Š!Mˆf ¼>›[6q3o¢I%ž¦Ö<Á$öТú´ˆSΈZ_= xU¸…œt f-\€„â©Ó‹Ü»Em¬»_ºŽé ÌÖåaÅ(ÛÍÂ}Së\Yj%•F%Ôºšó¡ØF_ +! eóG3+eQÄdcTÜ7mÿŒ·DMâŽ_&5‹†'ª{RŽ"t#ú9Ǭ–'HP‹pppƒF­ƒºzJHœjb1/‚ô%ôGb(zÌIL¢¢Ú·u»áÉë„×YHB™Þ¬‚‘–§Mºaìõ¥?È“úë·Nå!LJ¤ÇÌGQ}4Ù×Pº¤/Ζ“ÉSPÊg*+íèL\Z§¹Â©z4⽄B0”/ÅËi‚P–0û…Ñ 2sféx•WÊå?O´¢HGeDõ1v”tr54Ì34D­ºK༥Ñqd 6^Q—)*›3 þÉ­Z- ìrÑÞ…ïb¥B‘V¢–ʬ'®º“ѵlØÚRœR]òŠuå§61|¸.¢“¤×Î"ˆ”g-=…sqè9¢˜P¨äàoÿþ]þŠ~÷?\¿¥KBÎaµ — ÿmý˜f¥Nø”ÚñL"‹fïg±ŠÈµn˜Ã8©›½…¡(Vª–½\Ê:wXo!ôÛØ¬iLõ#ز£q „15²¥ géŽJwÈÕqNi]þ¦ýˆ´.þõWF­°]-؃Š÷IlŒ\òb1Wjcâ¼³ui”r9YB7Òòg‘"®¼æ®õF+J6?º7£\ÍïSU âçG OÞµÖìÇäÒ S¯“(%ìÓ6Íý¸D¢wX¼za¾^¿³Ldú5$«N¤³´Š!Î`…Si䨌ÂSjïÝ[;‘EéfÖæzáíL g@¨¬~¯ºa±Ï;ÜéP‰S.œMÊd²U{Þä¢) Fênª–f!Sþ%²¾F&gF­kÜ®±D' ŸÂæ)†ü‹ô;QUoq10ͪ‚wÛ™)ûjõëÖÍw‘*ÈÛ.åêF2ˆ÷QŒ9DTŒGùÂ/9L–¾æXÉKùûž¿ô]Ïi)ÿô°®©·¾«H»—)(« ⊆úÿ fWc¾Èútdµ”‰ÆÊrÈŠgc"á-…Ä5<Åz6 å·uç+ ”¯ú’Ëâ˜ä..xæ"zÒÍÅÆk²´›îÌrçW´ÿ…u’…§gšˆæñ”Íu½S±„…@†«’‚XÄQD|£×'ÕIJë¢É}–šße ¹Kç}U$;oD£be™ðET R®•*ª¬CU‹Í—\­S øÒZeÔÌ‘3'{|Ÿ/QÎÔC¥ »ÅuÕ–¤-WpÆaJVÉ8Nb Æ%mì¿Nâ¬Ç®yã^iùfüBze·×c‚QÄa’GŒQD(§jº™–me©Ýq¹^\=ÿIõ®Q7r¿µ¦â˜¨RÝIÄFK´ŠATDSš©î”,«É±Wî¥?m×DZë´‡úÙ©ñx$§)0m?˜j•{’ÈRz²c4@ÃŽëKhËÉ”(ūݻé?ÛŒŠ"^†¶Ÿ¤Ù}ì.wLFé Å*_p¢’ci™ìŒg˜ÎqœŽ‚‹t¶á¡Dv*y-•“ÞÝÂX¨™^®¸“5Фµñ–ÉG B3 äGÓPA‚¦å3’ýØrœæÎ‰ßÝÅ#=ÛÿŠÂ˜"Q«W2KØÆéîgêÉYÌ2%•‘T¿ËBœGI^›â5h’t“YCTùó¶ZÓVºÙ*ºó(¥Ý‹ÃÚ÷´´ uÕ/HúDÏr!.#HTvQ˜ÎîÌå8Ì+ºuîw*Ms^¬½›ËÄÑmÜîÔÓëb AÈSfÒ¯Ožïïd!Œ¢*Ou±{(1Aæ[’ÄÃgèßÞc”¤ÄÄ$ñ){<¬%sÝŽI)7ª sˆV±2Ç’¼EÂ)N#”VÆÄ/Ì`­©Ú¼/'±ùåÎÑd‘ ˜Úq;$š¾æÔÖC²´ƒ¦!Æ~L2»+™1Œ¶·T¥õÔÔóÕêO®Ó”Í*‘ñn̲ÈD+ŠºàbíÒKR¸UÓ(¢¤ÙM½Qܺ¾ÊßA‹{»!l«Ï¹¦ dÔ{ÏúޏA«O¡ñ<̳$P¡CœGKgž»·â‹ìŠz+ß –Ù~ߊ~¡J²mü¤ÛMŽ]±ˉwb¾dE¥ÎQ[z¥9Ó•Rmj#iZ‹y9´ö.ÆTN¹ü2ÿå{ “éR¬y‘I?i¶ï,‰ô@™ù÷Û%G5½ä+­zžÂZ¢9Kÿ-JMÛœ„Ý£) S„îô+? Ú7pAF#CNò[ßç*ÍU9“ÖG$$?v7ÔÕkûSÄ›èbÛeC­«ìZòˆS%ÜåûÑa‡C‡;’íLV/†1Z|Ô­äŸÊã÷¨å'ÓèòOû<…˜¢ 1NÏ¥nmÆ*þÒéR¹)=}ºòÒ4E2.IPŸJÈNFbÓÖŠ`’"ŒJ*»ñ³h•­F¥#¥Ì‚„x‡M§w¬Ï_(£¨éN„¼ºY:´Uÿ׿,’fgrVJ|šR,A#”ÊþJ—Æ9ŽÎ⨯½«mILŸD-拜å"3äòD¾Ä.Q©v ñæýŒebŠâ€¸ÿøÉ˜ÃŒ4Nþ;]¿Ð_÷ÀЌĕ´ Lôȯð—ß÷ÔhW õ§™» Oÿë+,R­¯žT©R’N|ÖJF|ÁFJwÐ3!ïb2*ˆ\:î¾ÄA䋚ê¨c Ct¼¬W–”¾‹Êm&Ýjf'µ¼¶QµýœÇ1Ds)E)Ø…wTè‹"ÒåñŠ[Ñ2~§Ö·Þ-,Ä•)3)‡%Ú&æóRé!E}n:”¬Sú‚tŽfÓ:¿_ìå?Õ1œĘ́)Äi1ª¬I)¸i+ö/"·•ùH) ÒùJNÂ;NBˆ!œb1)éšÝe9×Ò¢ÖÒ Ï[áò–®Ñ77„b;SØÿìRD;ºTÅ•ê”k/7½B°‰ÄnZá'ÆÌv²ê(’µPÊF±û¤Í–••b)VÆ$w9*m>Œî˜ô(A^ªÙ¬.æ/–K_C¤ÚÉÑ ­›G)d¢-Ït)Š;VB¨¨Í‘¼Ur +\Æ.$ÜÔÃW´«Äf=]ûŸ’A:—®ß Äôµ»IF?h4†Ò]…J±;ˆø¢ŠA.çyÍU»ŒŠe¬ŠºÒryó~–S*¨_-,t"¤Þ'ïc#Љ¨Üíb"®Sy˜G>螤jj#ëDÚÔ”R™¨ž½eå!Û;øN©N"¶Ök „|¾D;aTÎÞµUd©ò×± îzcrÉÚÎ[ÔJ¾×ÿ‰ªTÍÍÇ˯®(2\ÉF¹$8SˆëTÓ¹…Ó¶-Tò¡:¹ý%؆"Ú»¤pˆ™ØJI”ÞzØL³·gLáNÝåt¨ŸîÄ!²ù2[[ZFÍ7™L¦­*E™>ŠŽÙÈúŒ³¯ù BŒŸD"H²“Š2LЉ¶Ô§çgðS+ŠeaèBÕÃð”¸Ù`PL"U9j!93°H " ¢=ŽVUnu€•¥8¦ »}æ…R™œææ!Éäpl™75¬CˆÌ¶Æ7/è±B”mP£¶0‚ñRˆX(ŒØŽÂCA`¬ÀÍÅÖ4£ 7˜Ê09ª* ¹13áhˆÑ¡~QÈ;´v< ‡Æ«Š D§Hd"tñƒ#Íh%Y«§à¬NdÀ§@ŠÄQ©Ê/B:‘kÂ`¹òA˜A›²kl @'Ç:¤Añ㟄Ê*Ó„ìŠÉTp+ÌÍ]:„JS1„!7V DŸè›ß†€’´¡9#‘ ò­ÅóC”W0šŸBâ|•VTή•uð¨â¹«ÆqÝ…»–£Ò…SŸW‚„"£…&»ÅFàÛìtOºó•i–b¾Ÿ0T½4·áU˜›œËŸˆ(çU¯5S¯½ôK[åIÖ[Òýv)B­™òÚr,‡öå"R—p‹:iISqÓpAØìµÙ½öMN_Ö»?—t‰ìL&xöÔsjõq×+eNådp‹œèR•Ó2ÊžÎ+J¬›r¹Æc•õBPJÿï™m†ëµOƒoô<òÉ¥*µoþB;ÞR¢ª¡Žï¬ö:½RŽ3ú …sq/ÖAqI˜^ÍU®Œ°ÍBx†*qòã9KÛy¢¯…1™)ò‰¸dí·ðžœlŸ\ùÄt¶ã–ìKËBCS!.„FÂX¢RœˆlF1D R»”1i(ÎdÇ:&Py…$c Õ Žã61Ü烙YA°%hæéK ÈÈ@oN_ ! V$Q0g΋¡u¦µ‡‹Ú.ÙƒcjÝ̤$C!±¡(V/¤ë®ëB¦\ ‘Ht=8Î*m15¤Ê%ŽôEà! — -¢ÝˆÊŸ|h3q°‹2”+ë\¬92&$*²¹TZ9Å3JEØBb@Œd¶ÎÌ"õø§3©…ýúh™F1É-ŒŠ+…h¤8Ñ~~¢0'6 Êc!¬!m@¿19¨‘#nŪRdÅðxn! _ w~S2™ïVV)”ŠCƒ… 8€H„ EADÑ „¤V¯|-<>?Xsâ+´T5„i‘Ûi¸10Ȱø¤èšò“€ÎÃ8œ²†V!Ó¥3Ò„G(Fn0¸ œ¼BÅY 7P€óˆ!†°ÔpÝ®®7&}þÆZÕt8¼y[CU.|1*äËXÎB6 'RFk¾$0 9…,WC©Md+8¬üEqƒ°QáGÌA :„`J3-RTA¸3=a‡ð3õ¤‚ ƒ6‰'B(A3r„"°Y„$“ýP¨¦?(˜…J‚~i…Œ¹ ¡-)oGˆÂ†‚Q ÀƉ=Ñ á–ù+tüqŠ/ÅñV»3ÏBÖ„V¶iTŒÀCbJ‰ Îgq‚À@R<(Hd?K߉eF1¢‘À‚aÖÃCB¾ÂC¬¬ä™w'uéœÞ0¾ÖÁ™r^}¯q/ÌΧMMtJ-š©ßÞ×ò®+•XÏÔ3 OÌ ½·2“i“Å[ýt´¼BÚ%(¬V£ð…(ÝÒ±U=R†¼ºIHŤ-ËVv.ÒR›FBaH}tõðE8”ñÕ¸rœÏVs¦õؽy'~SfPö>½\TDú×%«uHoqDPBz÷ˆ¬+´—1Òmt¥q0èºÚD#l¬vó;}û„Û‹‰BjPè®)E É7J¦Û)Ü¢„Æ÷CácË[ƒ ’\£›üF±4ÌV²ö\¿#}˜(¨‡wB*5¥1…d)­nÖÇ*áPÉó ®Ôcaˆ Js¥ý¾'¥ ª¯m)OD8!Ê^ BûnU*±G)[¦*ØÉ Jhµ|Êq„r'aé8Mè´fT¯“Œ„,´=Êò´Åz&Q •AŽìGÔ³LGô'…/)¯–õÑjÒú2TR)ˆWÒÜgÚkn‹™yK;M´tSÐ…™ºÙYÖR3m$u\ b0˜åðÏ#ó UŸ[º}š®ŽIw§/ ÓçÉ_rˆ‡ã S\ââˆ;ú™Å%>š_é3ΙÅRŸ“j}EåÒ­iÈ´ý= ôb:Õr×0…c «±¼DCmŠ5^.Ðâvõé*2v-’g.–æ29R¹ü´ßº=„£X{xÝYW)¸Žj±gJ„‘¢¹Îâ½\Þ²döÍÊ\-Z’1ZÍ;¸è^>Þré²Ìk!EPâ!¸Á DÊt—ûŽj+ËwÅ’u«žîø`˜©¤r£/T»SJ‘ (+›e­f³ÿ½18…Ìí…žœ+‰Žö¤0!B­³qÑŸŸuõSUwT£õœ¥tþýÔˆ'—8ÕxÂ/0rÓèä«Ê4Ÿ• è;,]³RÈAЃ·à^-ýîYRíá‡: –)YˆT^Ë;꧷\Ä'úïl´¹C•²^R‚Ö”«èçbLœv)Üæˆ)³”ìÎi^Cö„ÎÒMZð'ùF ¿b¿¼s2úº™¨oOËç?“ê1‹ÜyEc¢%ªJ½ŽÎ›ºê¢¶µGV”£ê~çuMjøDQi¶D¶Yš‚I„÷ûc.AG …'e„*‰õúnn®_"©¼·l”ÚÏè&ùµt¹øskfÄ qEf%,QWm²Rúf{wæô“Ž]5O¥Pâ}æË_qPfÇʼ!î! /X•Éb0Y )0D-û2B0ÅŠaPÜ·k§'—4LD/'JøôD‘Šq5¯%v¦\¤Z cF–í*PTÚÍrêý ²výO¿Od÷¿¦3Ž[/ëÒÔ¸œZØš1â™Î Èõ¬FWÀRÙ»÷²w}ÄÁ¾I(žöãUŠ„9qÒØ^b Wu%7iB¥˜t2]Ûhó.%‰xž¨EŠÂ/©+ØK«-†µ*Ibö̵ÊHÕ;ËCO†é îŠõ1*QÂ6öƒœ§z² ÚëRUÿÄÌÉ1¥’»EA›ÙÀL“CìÄËÜÒ2 †U‘XŒW_HêɶJ·™ÔË!µº¹5é¶1žö ÂkÊIƒ›DC¤ØôGšgU4MÔîô6D%’g*šÍ¹¶9Ëøgò1FAÅ,„Úãz&.ikD{ZFs ⢞&…Îô2jÔª®Ì¤?’Ñ”ê—-«’±‹:í'£;&®þnѽT‚hÒð”+0›ý˧(ÉÃfYÈu?ÌVfB{|éæM+ùrý]†Âн.Ñ.'/¢ˆ2PšsbêuOV©E!–”cQUíÞfbk=«SÑI!H…QÛ‡W¡ðbhI(j%‘&l+È:Df­¯jZþSôÊ®¤!ÎVw1eR2Ù *ÿ»-^Wµ1'åt%íc6›ZÍø/´’5Å㹘FçEˆrúG¥´ÌSzV‹mɲIé[(¨ôZ«Õu²v‘Èâã%rŠêBâ9ËÇ%ŸèáKE¡uíÊó雘+Ùˆc¶sí¨ÄÄ‹hJX"s6%]ü¶Åäc”½ß;4Œ#”Çrˆ˜¨¢Õ²®¦2gMåÒ.©Kå¨cY¹¦ÎÒ¤ïŦ/Ücêuª1’"Ù8ÍT!åiÈ—y¸ÁiòÛi—cU5Krª„8Äì\Þ+/ ‰”$AVÏ]Íß(Gª+/¹8¾¬ËG)H¢%“Æ]'.öÔn¦Ÿ-‡j±ž¨Eà—’$…Ùĸ˜þÉ9ŠRj´Ñ0E&ŸŽK#fIüʪ¦ö$¦¸ŠVÊ ÿ=µâ>¼µnß(¢0ár ¤ùç1Ó©gá(‹EdçÕŸ’±¶K”JÝÍ:œ«Â{i5˜“¿YÊû‰f%É%±soTÈþôrYn"aÃT§#¼g¡+‰¦‰ÒÅRgŽŽS”.$ÔòD&fã%X¢˜ëѤyLŸõ&ñêÏãXÙÚì7 ö JÄ=öoçÞy“Ò»ÆÑÃ<¥•NìT Wº†Dç¢+ã“z•´Id™ÎÑ(Àˆ¸IŽ& –+L\ËR¼³"uerŽç%׿+Q”¥~UÓu·ŽtòðG²ã±FMEÿmÒË•ËZÊœŒK£y‹]\U«õ%MÅ£1ƒTÿñ2ÈÊíšÿJ¢“©'M¶[£È/5韒,¯_î76GcŠó¹˜â%ʬ¸ƒ/"4‰T[¦e–RÍKä6(R¿Éä'>r †ÔŸÕ«QÛ޶! Y/çWuqEÑijЮRˆCÕÊquÎ2²öj¥7)è´ÅľâŠB#æÍâËÞÞÕ\íó*8†3ÌÌS4Éqªl»Ù?|ÒlÅ7vµ{ÅQUÛ~¿Ó‰BÓ§žÄ9˜@‡)Ê^±\ìTßýÅÍwb&ý¥ûsêÚèìç³\R\×|N±{4οÍ3Pb&fÐI+)ŠÿÇ¡óÕ¸¬dæJΣ¦Ž¦B”j%æJgËÂcÈ”|Rªˆ+¥‰‹4ÜÜÏE¡} gRˆ³œG;ÔÙϤ;yéƒ4¾&è%¦´€êçYÁ¦áˆeòÌFäOaG1ÂVcðè2êÛèË«fê“ÓbüJ}Œè-U± V%Œ¦[)°\Ò¸’®‰R¼ˆÞo3ÑtŠ2c¬‹Ä‘TíEzb¥V!ÎRl­OUqtž§¨ºKÕª>cºy×¼M59ŒÄ󩌃?&†=VéçÛ6–F ’/a7ˆÿøÉˆÃ‘NÿýÆü¶üûªûªûèüE³’½º¢·Wt€èy@iÒ}ez %G‘tedY–ª1Báž…Y𢠋fDä^*öÄé6´¢óË¢eq•LžµLjµæ{ÊJ¥¹_c«SÌxå¡D©0¥[%Ê™#6³ 쉨Fö- ÈO§–¥$†ô.¼jp½¤â#¶X’¼§Q”èåc¡êi‰K •¢(‰e¢>+2úÍQn%W¥-ê Cf±©è½ÈäZ¨£šgq™ÅbZé;¦‘ „²û³£Ÿ˜¹X¬ZWÛù±ÉèB?¦ù2ϲ8†C,Œ–Odm]Òh…òöæzY îògZ–FæZoŽÚäõ½T‘V¤MwHǾ¤Ïå2Ô‹ïïRvìK¢2©¤Íf¢Ý\¯r w’CuIŽY¨–&vÞþY›R.½»ÞìȧwY€†@#«0l ìÌs ŸÿOK?tVÏéùC“#ÒÓ‘hŠÙ%`F€1Ã$ú6D8…7Ç¡ªàj„XRp%ƒ½P…0¦)‚²)‹E#8‚˜»îœ¦>" l ؈†82(Î6r:õí¨˜Ùªc¥ÿ;{`s*Fó• Œ¬"Ù‘ˆ$…Db™rpÎâ]Õ3áe½\è:¢´¸TR‰uIA!°É÷ †,dL8HÜäxC†£Vñ>3Ñ!`ª@¦˜YâB(Óâ„: eVAXÂA¸B]ÙDn…qŠäq:”E„c(¸œâ Èí†pCãŽ$q¹Í r0²QŽ"Â&b€Œ7 ÙE#¬Ò”bÜš®Ä‚eC‚ µ‚t0`sjj#6šëJgï¦+ ‘0œÈÄ%(gª1ÐSt«øb‘õ3qˆ)¸ ƒÖ©œ‚A)ƒÜÛ™ÂD93Á…c™‡ ÿ ´åŒ[Sv¡1*ˆZ§0 P‚˜V¬”šdB%ÜK PÛ‰F;g—¯èpEP0vˆ"NQ²ËDááy£´¸'A@Î"„"E$,c"²² (ƒ§ÎØî¸)­k¢ÚÇR\CE$¢|C:D^%&Š$¦L8ØÕ Oc¥>D£IõŒVA¡F®ÎÇáCbt~×­¸‡BND2™rSB3§!IàÕȽ€jGØÁ\;4Aøß— °`B0‹ðÕ¨b˜I[l$¬’½“ÙyE&-G<óTO9ð’P]Zj;ïvæÊ²/% PcŒy¨t¡]Ï[IY}¸³ĵMÚêÝÚo~§KíÕ5—‰Wâ u•œW…ŠºÒ¢H©}_”j±SÉTÊ‘C)ª]‹ÙþbÄ7Á zZ(!œ«SK“ü”’‰É\jãü¥•wÄöl#»,æ²}]‹fº±Þ­èÌN®RRÍ”­a`Hз)&‰ªWѨ®(‡S)wŒqÊ”¸€ÁÓ(’Òm"6-ŒÜ®ÕJ¢ë›ï‡¶}ªÕºç¶™¬’ aVåxê†%ÕWôùÕæÄÞÄDåÙY<éR,ʈ{ °·¨wS^ÉuŠP„N7§Ù 2Z×¶øšÐ‘&” |½Õ^¡äÂ2*šž˜’]ȾwóN1(¢Ž­„ºT#áú‡¤ÿÇÚq Nš’cUÝœŒ(@¢Ÿ8AÙâ>Ò7Í&6ºg2.ù ¥ªk†¨–±0CÕ/º7‹÷•‘oã”1@p¤’ðî@ù ÆúàZûHà0RïC¨²d`èE˜’Öj'Œþ<\­«ÑIeZ°ÃŠAAˆÐ±dq 5±«7ý:D¤[$€KÅ”b±²u–z)ˆ®* Þ4Þ”×"³‰µ+µ¹÷©j×­\^À¾®SŒ:ü—Fr?_턵OËésL"åtp‚°{Ø‚‡çß5yJJö)[‰>¯Uy.ÉI»?ùKWy¸–Ô3œ §J*ˆO·ÕÏ•¨ï¨³&ÑC1Æ+J²©ý˜©Ò4›&ˆCPƒZ²Õ´g}\è 1‚®RÎ'ÝŸÍfMC Þ”m¥*&mµþg«d$ … ½ã”2·8(ÊÄ¢žå°cJ´¢;9ŒfºÐË3òk’Ë‚®$²?t˜ø½…Klÿo饕ÖêQPŠ-˜‡1F<¦9LD„zÊË!ÚSk0Š£®«†uk%[Þ¯CpšJÞÝæç¥ïzÝá ·$y:KlàC£GGs sÈe*9É¥ÑFù!8jm~l½B¦•Eò SÜÙ”¢ßHR—ÏÁ5¾IýY7|˜/ûqd»Œ‘avf¿üe}‰RP3ÎW•e$80áAm«/- Ã~ÖÔËip¸Ú4IìÆmlËá0*q†QM÷1yîfd颖æöêí?Ð(©%'ñ¶DÆWj§‹s‚™)A…RÉ–‹%Ff­gYlXFLR-A ËHx Æ–wM3¿¢®etÄ\8–UbÒĵwÍüfŸd¡2…Ydz‚µTEbæ-Ë碓_.ÏSB;Ž¡Ùö† éÊÚZI¾S£äÕ¯E¦ L’¤« (QöIÁTI£#BÙ¼C±-ôbRº %† ”R‰MÊý %7à šI§']S¤*Î4Cˆ!¸E&£8S•†ÉÈ–,#y>SðÝ݃HLÚÑ>oᩳX½\Q8­¸tF+»¬­F3í†jÜʋË*Øt„Ç¢)$ [{ƒ²…?ÒX%¢jÚ *ƃeD4 =@à8Hðšå—fbØ*Œä ìüLŽââ¤û ²’Æ×ÒÛzŸÎÚÕ›Q$é’Ø1Ö¶Æuµ;B2ˆåPU²3%b9DXYlp…,êø7múRùNB0I ž¼»}ê?Ë$»ñlµf+¾Z†(ëË–D ^~>Q½¶3¯™Œ0¬AÂ(u”ޏ.›w¤Ì]¿•CK#$‘4¢öHÇ0‚ˆ©´«pRŠ#Ë[L:ÎCÑnÀ² "oôûbDbèB*},ŒDÁìዉj!Šž ) ïÓ‘|œsÄ€)?ùð¿óÇø£üah?J=+áä/‘ÿ® Žð €ÊPà Ȅ *¨Ž2w'„ éPÙ_®3~{kë ʧÈHx55Š@„;¯"„Ô ±“ ÉÛ+ C,ƒ‘ŸS‘®§.:^E+¡Ì1g¤A—¼8ÀÊ j‡´.:ˆ˜3C#å47}*»K A\D¤  t} Iã1ÈÒ˜R|k !ƒ!1½K†~0äB¤ƒäTˆ#å°¢TTuÑ'’GîrEg1ÌÁ°#¦Ç¸ã*4N  BC˜Ê<<1˜âQGj#¼`ZX8´ã™°Osàd)?¢ ÔÜ55¨€Àƒ+Ôcj‚ˆ)©b £F<ªîâ*A˜¦Ü‰D?jƒ#¨X †B[ Ôs&&æ „ FŘM¢åÕ$h9|a(Š…NŒB°£º½!„Wkk XŽ0ƒ; ЈvÂ5Åâ"£‰ a5z ¦È…9ÝÄNx(˜Žââˆ6UO£{Ó0`ÆU! d!‚D4‰†c¹ pEå;†b³¨Wèê[BÅS45®VC„+! 0†‚A_2’qF2±ò¹Ä;¸S°s @‚1ÃÜ3„¢ º§ÍJa6šúJ$ììI¡°nˆûŸaÕÆÌÞ Ä!¥ò¸ѱŽoÃ;*(‚êü&•ØiJÌk6y®¼± §éKÂ, Aå„ hÜ)©ŠÇóvÐ'pÙFŒÇ̓ ;‘yŸ‡#ŠÕ +lpÊ5¶LBP©Ë£“£ÝB6¾±Ä;+ŒÐB»Rj5q²)yÀ„¢»Âf ¢Žd6¤€¹1MÅIŽô1D%%ˆÍ™1q €ÃoÇÂVƒ±“sÎxBlÕâjåÐjʪ –%0Æ4L!%¯” VÊbpè) ºŠ (F 2š’Ó„PgÁ"]òj"V³u"9‘nB.br#r1ÄãÙÎÙœ¤Ò²A}Ü\…ÂH‚†Œn%*±Ê7Lˆ@¢6 „b1 †ÅHt8C¥TÂØ9†°´^òñ; \–T$ÞuY¢…`L`†¡2B9})˜HJW1yÜ+2F)ÉÖ[½7hÇ Xß!]. Ç€Ä-]9d Õ…fnŠO<+ n"¤†;¬«ÙùŒF,*©­²ÉÄQ¨dcQ‘¡-È2cgBF&~:òª¿*¥eþEfBë F•E ¡¶„D¦”†ãEEhb¨xQÑ"qIÑE¦ÆaŠ1Ž&tK›¾R´ ŒL¦!Æ (UŽƒ03è(x@±  IŒi¢häQ}C‚Œ«ÍL sDUÃîjÁuzÁ‘Áœ‚¡pxbŠ…¬Æä(‡®)$&Çp¸lN„SŒ]ü_üã©·ÝŠù´¢XÙý™UÞC¥ þaŒè² vbf¬ÄÝZ‘ŠŸ!„磟öò³#芪%ÕË×·=+ÍQ”„]ÚUˆJžÔrë—ìÇfeŠgm°Ïj¡YWöBd´I“DíÄêóÌòew:ys’Ò¢äV“]„1gYGêÞ"6d­0Á‹cr¼¢ ªåàĥؕ²ˆŒPîFkO€G^R„PdAD*BáÐ%Ç=Qš Ä÷L*©7eˆYBÄ(|v`Šu‚ެ‹ÜBœ‡G !M êÈ3Š… †ƒ L9 h˜2+rÜŠ– ꆢ± w‚ŸœP†1 `@ ÉcÀ…(¼0‚£4uÄ [ñÈF9ŽeÐË'lÑV(‚Šm ¢#UÌ¾í‚ ~ã warä(Ë¿þ?zgBpɰC¹Ä‰ Å&©Ä0¥FXñˆˆ‡4 U1 .DEaŠbþ³W2Rˆwì•EMÜE<2äR径6 „@Ñ †¸Ö“eœÈ€:©æê ‘J+ˆEE«·æéxF6!„ÄF†5hä"êâqŠ ðU$bóW°†`¢70»”¢E‚³v¡ÐÈê2§ÿÄ#6f5Ñ„$& R’¬"†°ÙÄFŠ’‰¬ýK”#6±M bI‰wjñfÕç$›È9݆âŠQK0ªµl X´y¥\½Ída†¢k[#'7Nrí5…Áòåi”ùãæqÊÂâ‘Vì¢ a\ˆ@Œ¥û÷¥p™"Îi B¤§Sá‹cþ\rVüž–C<-–r^ãVèU¿°ŒK± •™ù!%&¤Û{Å$¢¼+|«‘O"&FÜÅ ý0Z W¨P¬ê}¢ÈI%í+) fPœCÐÒ2 Hì)ÕÅËêÍ”ö¶ßмN\û3–`¾-e5º¯º¤b’@¶Â¢´ªDÉ“ÇAÇ5•«-F –Ä7U¼âN]IÂæ#RZ8ÛQ =È­Nâ…‰z ²vŒÊgª—.U!¼„𼯅þŠÉò#M¬Ô …FY^ÈÉ!iCÜ]Õ=­þ‹ï8«0Õ`Îqf±>˨2!ÊV»*²¶Ô-›‹ÔnI¨J`м±˜“y P’ y‹b"d¤³=JÊéYˆ‘Ř)çü˜ÎuwBŠ!\•ÙJ©«ä®ö=]Nº©^ÒXzTº”®ÑU]B¾s MmãÈÎa~¢$¨1ОÂJ,¢.F½ ”Ú¡ÒEN"ª}íÂi¤öÄ¥èýsð)RÅÙ’uò®X @‚BZ Ä D²Éþd»)1Ïb¥ÄìÌ^©öÒöEú‘*ôvÂEb®ÕÄNYÑ ý®ž/õ)ëj1©Aëàé¨b¼×”²%v+’H©¢í4»Qvåb]$B¯-[Z-%D±Ô:ù¤¦O–›‹$¿9H\óŽ;h¸D/ù)Øìé;&–C8¤£¯IØ2м1‡˜–‰9^ôG5³:ˆI‰¤~|ÒÚhŒ*õ ¬ÅZ•-UÄJ]òÅÁ )ÎuTô_ eÆU-¹÷Sû°0†;®šÅ*JPa^%8碮¢„c:ó÷u+e¢`v ç²åWÊ)Êô‰©Ç³B‚b±„¡]?öi)NùhÉGûºŠúTÄÞr= ÅtÂ5 å"ÿà²Þµ3œ¢’„øï0¹ÿJñ«O§ BÓ6†LIŠ™V:Q®Ô!Ì`£’m Æ…[sÎ趘¹T£¹*¾ÙM‹Câ“é¶õ´ìŒ&û—ÒT‘È) U:.»5qùïÙßêfRU¬‚•ÊCTû/BŽîmÆá¥i%ÖÚ ë¨˜eb© ¡1ûjMòKÊZiÝáH‰šJÜø7Ö骤ÆG/%—æêyAú7­ÅD¹1¼•v8ŒÜB€¡L[^S­êáy“cæÕu÷¯õÓ-ŸÖ›ù„3 Òz…u4†¤ÃK댲qk¢Q~¦©š´ET)ޏØk¨ƒ?…¥Ó܉J‹ÙiM¢PÂ\‚=NéfC´”jgmÝŠN"a~>V.üˆÓCµ˜Dmï%i[F³híd/¶ë¬a’)¬F³ÔEWÓ/ÀÎàœgI§&î-Ùfm ÿ½â[»OŸ-‚øñ%4ÍȧVÄ!ùª©çIdV«RâiW–­tyPFÂï-аÆ*W¥þêâ1,UñÊœ· ÜL—4´[L4„¢½\¾5\•J/3Ž  ˆRËr7WI³{LC¡fÒ•W&«=¬/ /µ<tžìUZ=Ñe)„1ÎB°QÔ¯oS"Ñr…ÆÔÚÑJîâ.yhÍ•¨“V˜¿'³pšÒ.\˜B…;òŽŠ—þšôÙˆJ2œ]2ʆÆc„ÇBH$¥[ "sdLgž[ô®Ç'Ý+‚{"g=Dž¢NÛ!Tq »brÅšß9™Œ ŒLT‘è|$÷DPRµGåù¬ÇvRNMÊ §¸ˆ¿¦!Š(ðz]J!¦)'þÕ²Q[ØôbØKWõŘӉIJº(Cy+BšY’dãˆä%ÔAU;ºú-û¥Þ§êÅTÿUˆë#Îgd2Oñ[[“ÇÇܹvV嫈T!ˆUý'h”w»¸ŠËG=ª%inx®TW2â嘔ÒRƒé;ù·ñäï© fÈ«†]¬ró BB…0xOŒC®T¿ø‘ #ê‹Î{"Ü'ûÅ„è¶ .v…AVdEŸˆµ(ìB¼W!¨`Ÿz!M#Œ•b¯+©\©Æ!ø'bS’­E¼¥Y!.µ¡+&nPšž´çÞ5ÊýI’„s¨R°ï º'"ðöÜ=È£Ÿ‘¬£+}ÞåÓoÒp·Xý{ÑPÆ«u‰)ÝŠ§LA^Q:/ñ á%~Fû¯¡˜G$…RínÚ_'™À;`ïüïüQýþÚFmŽtLöˆGðC!c®êºwÓœŒ£Mý¸±8–bˆA`J`˜# ‹aœÊdôéÁB Ó͘ ¡2˜”ÄZ PGŠ;ÅÒL™Z¤!K#‘.ÅÞó´$!¼ëŒ!‚ “ã ÀŒˆ|_Ò˜ï¹â– ¦<Ѫ&0¡Ÿ_! ÍJp†p Ôð3„èƒ>qÈ/ñ™v/,ŽCD …QL)»ÑDúŒS|\Å&„1ÌU…NĤëC˜à…Ž ÍaÑN”ƒ sXP¢¨ú©ÝŽÁr‡”ÌôÐÐø¡ aBq ãPÅ!X˜S#ÜR5!Æb¤)àC‰”ñÈ' 9·!ðæÅe)°Ä2þ|¼¢Ñ€Ç •†m”#ÅÀR¡«Œ^Nòí/R°QUæ«æ‘R…Ödä½?è.Sh‹8·#ݵ-¥AšÅ.ýïrÈ™‘J%èRy«è§S:þ\½,D"²ÉèÕ0‰gÚÝ8B=‹í›ˆncU¨–ÜÎŽ_+Õ£íQS—,qpˆVÌ?‘g#y‘T¼ßå®_2¸I4MÝ+1UŠœvªÆp™“X!G.`’®•èQ;ÐT± ‚K%dÑ4¬U3ªÄ‘ÙIwn]©í¢Öœž„J%-“Ù¬*)¨G¶iªåòR¬#•–'³*ÕNR›ê…Dú-–™.7»~g.Øõ±ÞÉ_ü”ާ;NÿøiÔ)¬A^CLœæjùaSzªMf‘ êLù5¹Â“+µüRïh¡ Ô½**NY,åè,óÌ—/² !jtî**ÄI"&²W—•Ëf2a×$Ìô¦ëqî¬Þz}¯ÃP–O¥; `ÆJb,bÙ­9‡1‹JsæR|‰Ä[7sÐÏä&d¸²g‹ruW*¦9 Q”íêµÕŸõ‘–Ñ9n…?vî6K޶+'bó réÄlû…Â#œsã(å~~÷!]jU©òÈ1ÄDÊi(ªv;ÝüŸe!õêkUéúW¦Óô—’"vÑ܇—\äZ)l! µ9Š2ÎG dÏ8ÞMkÓH„(Ÿ5³ ÆM#–ƒ‡þ2ó“Qü•"Ô½ú’Šzj¦åçâùkUæV; b.ë«F!R!ÍòÉR~I˜øçï6¬²d•A­ˆÂ ëW"ä‰G 9(nv‰Êúj3!NȼBHNö.ã»~K\Á„!Ôë÷ÝHä(‡¢~f‚d¯œ—Ö?¨X¨ÁŸ°¤ur-HE+â-uUlHÊäûSULä(‹¶i0î†"V˜{}®¥ ¨,šÌAHG3®ûL¾e<“"”^ÇœÎV!ŒŒ•Þo+ÄJe-|eˆ+ … ›JÐUŒb[ïÍ„¢œ¬Üë#ùJFâË¢S7Õ¶¹Rz´ï¥~sדFr®kŠ„Lr "1Èþ¼­™^M&{%þÅ)UØj‹{aG£Ÿ{†ä¡ÜBŠb©Í† ÌåãÌ<ûIð%?íŒ÷EòR ˆ"êÞRYFFܧ·&Êè„Ê=_¦®2gå?LÃ&¸‰¶!G1ŸËSy8£57íwÇl0©JgviëO¾ò…¥mw8•B»Êv+;6Ùåe»ÖUºiZDl믑ù™i³óœg6™/!HU›Ñú%ü…VÏåÒã¥Líç^¦–…FV+ ¼ÚaÅ*¡Õ»¼®š*鯯OsmWÎö•ЯÝò‰Iñ.úêMú×xBHdG2×—’ÑTÊ!MVÉ”¯"Œ–8Å)¸¾•Ö‘7Ĥڔ¥\èû·¹ƺM+é pÄ»þ!N¥v3¯7hˆ®Ñ _JI©8ä5)•Ãs…C²œÁé¼;:ÓÌ'i»ï¼½mÍÖî&lªÄBíßÉC:Q;k–T¨ÁÌÀ‡¬l\³ápÄ¥oµ¦\¢%R¤²N’êä ¥eÓæ5>cµ[± µù^ƒ¦f RÕš»$S˜VÛ]úY\¬bj¦Ó GbXšªÒ>†©Dþã®<]aÑÒû¿Ü(e™¢± ‚³îªÍQHCQ"*w\ÆçãP%~ˆ)XŽ=h¹EÔfªæçvŠO"!~2»[øŒÕlL3Ñs\Æ-×*ªF¦ª¦O×! 7вÝQÒ†! HŸÝG/>ÒRÂ*1†m–õpÌ:q;ðS²Q“] 걎¹Ã,‡!˜'yš”ªýk¦vKrÖÕbõJ Öq\Ÿu½©ìv›Î³ ˜aŽ»T•Hcgæ ¥såïù:Év¡Q¤)žÿÛýüëiG» ´ýW”è~‚Üì^ñXŨ鿴•;épÆ!TŒ¶*‡lÄÙ$šÇUBÊŠ=Ý*½D/Ùœ•}Bg© vêÛú 2Êc°²<æLÅ26Õ–÷üË∣•ºJ%Dv[§·Ð!/MÑëêþOeª…AȨ„R%A ä¿Ä"‹Dòmeiè„Eºqp©çJ7d›E»ãnehÝï#” ‹‚CI‡Â´9‹_ì©Ê­èœªVÿV Bq¢˜ž¹A ™§7HK²‘—ÙšŠÅDÂá ˜ª\¯¯ù½Ñ+×]"*°ºŠ¨ôc"5e%Œ#çÊE!ÅeT Æ}mœ¤­VŽˆ´^âúVc§‹OG·/Hœ}^kXØBæPšsTØ•°¤:iŽúìô)#”¦¾‘þ†ŠW7ÈqslÌ ‚T7A™øþ–vÁ„ 1ƒ¥DL‹³î3âÀõ ĦÕ’‰P!L&!ÕÇO ƒ…œU&Xc…3nNt:1ày1É`FåÞd1ÆH H&8îGœpÈŸ1C*2°ÎAˆB zP>Å…V*»/gLÄlâg\5%ä°ÕZÇa”ÄQ ¦d(%pAPÂÅ€¹Ôc„1CW ¶á$˜¢R±z éÒq‹D)‹–™¹¹˜î2aˆ–# ‚Œ¡P”Ø…‘¦,áÙ„á ¸(°¡ŽüˆF PNǺ…‚‰ÎR $`bèݤ Bƒ ÜÆ‰óüdMɪÓC=/îß¡ð\¬¡ŠvÖ6Íh' L48ÿøÉˆÃŸNIܺÿåÿPþãþ€þ³’ ñ›×¼óP¹û؆s,]‘yâkeÆi”fªÂU!ûdø˜ø(l?.þP;•Ê “‘×ÖT+±¦r¨JɪÄ-¶Ûõª25ÞTK9PÕ¸i^^ ˆÉ1ˆb׎C“UjUªô6Ý#­šN§Ré#?¿±¼žr•EÂ7ÐRC6-4T Fòs·gYbi±Ëv§ò¤I¸zM®S¡ÿM2#V>ŸÞÂ2Ý‘Yc1B­Z/ß — b¥¦ Ö%˜¤´±*ø#Ý}Ç]c#&T›}ý-d*6[i”Æ1PEºê¢)H¥'¯žø6dl¶”ì…!daJš‹Ý?àz0˜}Ü%  Î¿ð¨¨Ó‚°Cþ1¡À¥‰ø``ïüU]é×ìž^Õ§ÚôZÒYcs»‰ü …ÝùIx‚Ïòv‚ªœ|Dy;¼‹J¥&L»hGã Œa]Ôøf£6Q;ûÐNDpföÌÂtµ#asŽü.5iìÅZ-D1Œu3i(¸äîlåýÓ””%E-V×|É¢ Ž6é—ùbÑq©&ÈÇb:ÄK-ˆpAÒñd!Ü›DLÚygA Ü¢¡‹j—‹Šo·Tš[$´ý0èWewZ‚Þ.cR¢Ê…Ù«Úä…XéR«)’350iD2½÷¨Œ’“JšÑ9È&M(ä(´a˜FY¦¢$˜÷õÊo¥lùR¢vs2w<«Ý…Eü½RøºGRkW8¦w)(%;9B¸¦Qš…¹ÆVNfíÌî-Ÿ™»÷×Îf Õ?Tñ’Âo2ÑvV"HS0C}7‘déÎÅáv”^Î+%%¡‘²i;:g”ë*k˜®Q –Ñpú%‘Nâ#5Ä{-]yúA ÿ?PôÔ3}xÏ2 õ¯gÕcI5btz’[dP鑸ǪFgI’0æY•QP¢¦:.>kff«C#ßD÷&‰Âl×Ü.¾½‰˜,ªçEÜ1I+¥—ÊÇ—-YÎöôÎÓ¥ UF!Sµ6&ÔÙ¥ôG%¢¢ú%ù==›v‡åô{]<¦mR ¬" w1‡¨¸aò¹ˆTÓ$«FôÓ ä¯Ñ.¤í&’\øÐœåP±+äad3UºqI 8Â<ºAŽNlÓg“Õ¤j‘•Ø* ¹õÌÜ&-úZ…¢ˆV2~-D9†7u}Ñð\Lú„ý(GV8ƱˆG'‘¤J»8œ_R)ÑñhKy±¥ÈÃs3Pè>çŽk±4[óvùYéí!þ¯Ee³¢±8Ä*Ú‹Ja0È"U5±2 Æ­QÖ§lQÒ©½" DwÿJ2­Qw뙢ôZ¾7JË/Üóm|Ϯɧ²Ü£JÅý ƒ¸©jD뜎fSDµ–‰M!Zµìëþ0ëQÈ‹íQØ­T3á7O§ýâjµJD»LÂ…)¸˜e+;¤½-™û”õ1 ¤°…•0gÂv)³é±eÕÊMYèCFâD!E#U.q·0F¸ SÂÖ(¡Ÿ4ª-;:!$|Ý9ý(­ñ+Æ‹^ãÈ‹KÍìBŽaEO”Òx®t·Çî¡ÊülrkEb;³‚¦'îJ»Š…&Þ™“94µ^ÒÂnÍ1z…Ô%F÷É^Aý¬AÜÅZ!$Sl’4Ý¥‘]ì¯)½Ýì[§ÔJ7rŸÿxm´ti¢Ø²-#N¤bYGr ~“Z˜}]Ûâ ÄDÑÈu ûݽ–ÿNí¯äº…"1õžŽAÎv>tµ*©»’äÝâk¤é«…:+Šu1ˆG¯÷„6§Œ9ÿO1•DÉrNQP«3Ð÷!J¥âìMâá0寝v1A$Lq¬ä;B½u¨ù¤™ôÚµ!µZÜܘݒj*3V›t‡(é«¡›Ó®ˆ‹…çÚc9„êÈ¥Á»á'ÖKò £iêÎs sõËC¸A¨R›—-(«Bã f>n¯7ªvjŠº¬›šÂ:»ªä‘—ÚóaÊÊ“#9¼r1Y+ɇHˆ}¿[pN*ˆ—Ãv:C GfÞјÔFzß KSgSé Ù +¥¸ìT0DJ²lÄ™  Y¤„ò9GÅ)Z‹Aw-P¾¾jÒ_=t™?Sj¢¨êÌ„2HrŒ•Uwºƒ®&ªG‘†)Žú¶é½ìg±y¿‹ã](Þ*û5ÞNNO×Zš—st¤i´¶c—©úõ© :] ¿æ'”H}ÍÆ©TÊl.âï§—iûßZ+-ÿ޵WBåÉ;¬2#%DtÙ ¨ÛÙb–U‘*T'î}ª›Ä½ÏiDÕiY…7¿übî:œ½UÉQîøoNó|L¢ÑLi IÔšd¾ª»Ý¸Ær}ôdñ;Ÿ?Eç!NÕs §"¹jIëøCV¡9—hˆ#Ù³5Åd© Çþ_5ŠÖil&ïU–ä¾åHS묭#ØŽÅD!U’3Œ%aœÈ}ä£=4t8'C.(sœ;ž˜0,§Za‰†Ôbì$T …;Ç;¨FCñŒ8Ó Ú¨N\‘’‚(d!‹ƒ/ [ùJ‚ Û ‘ŠN3Y±)DTMxƒQhyÊn‚/M`EÝyg¼R‚°w `]œ‚€Œ2%J$`&aAÆa…TRP°œ2˜hÚ D{\ð:õUQN÷ØcÒoN@#¤µrž‚Âð”T9‘ô¼b¨Ùµ%”„™J¹I…Å"Ñå>J$ J`à„ÙAÏ`›,*›™ƒ0%RKn›3ï›Ub´v âª8‡”zì‡&šˆ`¡˜ ™X”ŒæS ¦/X4 dc9°Üšäç!Iw¦¢g5¡…ÿ(˜œœŠ#§ÁœÊèUÈj‡¬=¸%†<ài‰€‚ˆ8‘˜@²æ`HgŽ7›`G0p ¢Ð‚–lÕ¶À`¿nn"tè‹«¤C'0¨¡™¥6ê!Ü÷")Ê^æ’îd'MÞE¿VÀ˜(t„ ƒQ¤A$5×§Œa îèíSX2¨!ÔV(øârb¢öU¨ÊŒ„A9™Ð¡œ"BxNâOl* „CÆúƒ¡O—üLn}x£ 5ë™ øG! a²Ê"eTj‚'ç!u ®ðVL䨔Œ®ÝTJö¹7_‹Í¨ÖÍËQÆSb0D'}ðކTŠÁs*ß* Ô9‹X«o1^ºª?ªD6[s1‚& ½Pä GÌçæã‰B82jNEì¢%Ãq („!Hò…ÌãE ÷E ‡ AÆuCþ¬Z.?å À@hpžÆ Ã1­©Ìq à•N;±!òUKí\¼ef¢¶a…lVˆKH@"QÉÚ9’ 2>b~e#¦ËHÝÑG6¶%!§?fR®‚7S%®QäU}qRÅ5¾j1x„áX§E˜“¨Ìk2HÅBªÖVÁ”Å-Qõ3òúQõdß‘QOKm _ÿr žôHSæ»*Šs™izÕQFR™Lþ©íÄœ·EÅ•G¯S㘓"{E ê¤Uâ™­÷¥jè³w‰B›O²'ƒf¨DÆ®»Ì5Žâ*úïAsOåN:³iñwPJwóU ÔC fì+ Áj¹Ì_'zŠÝÄÛíó_jÔÞÞÍäõgsX—ÂU-UB¤Ã4GLBáDÆ7S)®R½Ö¿¸-¯×©4‰×*ÝÈQÕhÈ2å'§-ʦE'ó“Õ-§5^‰U\é÷ˆØ­OÒ*¾{æÿöÜÄn]Ä{_}<£" çøãI(…6eB: †Á4Ä%!?Žh!¤fa¸êP¦QNp,q‹0(¢pÕaê* Q†8Ê!šÝ•)|íÆŽŽQ9)X[Eêª÷&#XKÐq#+q”`dTAP`Ü‚ˆî0ÁtÎÁ-°i‚@RD˜ŒZbîÝw¬ÐdÇ"½ˆR* Ì.‚T°±ËJƒé À ‰y LAë8C8–q;èîqF/ ® °ræˆR,¬aˆb™!$¦ÂÃBùÂT_P#f[†í0tr ˆã8AÀ‘ÀƧˆ"G(PˆØeò°ãˆ¨`…°ä©Ï–TIÊ„Zþ Æ'ePd*"dr”B¦˜ƒ-³ÜlååÃÐ ÐÐ ˆˆ;Ø£"Ù:R)RCÓÅÔ"‘é•!ËéÌcØ¡ ®œ7 ƒFä½p²ìi®\;¢‡œTt‚ Ìac‘Q·¨a‚(‡ £p5Õ ‹Fâ 0|'¢r)íõœ¡ªÉWTRÖŠÁ8בC³»ra‚H Պ}¹B§0@€€™h”¢˜å0°h;U èr—ˆ‘ß*÷8‡`­X!Q.ÈÈ6Œ!3ñ‚m䡈*ˆ†ZH†ˆp祰øâæV¼gT˜ÈŠ£•6"ð7DSP‚¨Ô03ä*“§D\J›™)]”¬XƒXÞ¨ø¦(¤qÄ& H¼a¦¹SÁŒ V¸ 7ÈÞ"¾!†L¤pV‡E>gz zB”¯…yO¯PÒ¹•ªL¨Nr¸¦YúÚ!S ^¸*kiNQ–…Ü´´ÊC9Èž üÔ˜štöïL©c0Äs5qLì¤/•ßÉ]°„"³{ùx&æþ$f! Ý)Ü-…"‰×¹HÔûyëR±ŠŸyú¼EÕÌBœäz“~éIŒ”"åjær®Ú¥¾jå„Q:\2°‘;lRm?Ñ2Ô2*—Ç#")œÉÄLM»ÐIªa ´_L²šºÕþº{5¹A ÊIÙçF³Ö¼¢TW1iµ»yˆÞ´g¹ÄÚi½{h‰â_Whùr]mÍPç¹=ί.w²Zûs©Dé†1Ž=HbÒ^`@ÁSÐëËMN1ýJFE~²‘XÅ¥“õ¶†ü>ß(o!ª©µô6#Y·Ö†+#¹DÍ„Ђæ~I“8r¸)Ãâ~$ú=œAS7KI4‹QÇî:•À¦b¯UZw9ˆÉeâ<ÎZá.úbŽú’æ ƒq‡#¬¼ÆB­ÕO7£!)ú‘ mø‚œ“R™—îA–ÔùˆTÆ Ì´ÖR/Ã+µH´/¹Úµ*ÒøÎãÚ}¤íæì}‹ö¢¢r¥Ú¹È ŠS:]9$¥(Êj˜„I¯~b¾[„TLlÄj‰ërœD¼¾±Ä3uGP­ØÓ¹ÓçÆõ¹Çén%Ô"´Jß–_AHÌÃfŠça–+óà„ù¾‘Jìø1H“ÞÕCØ[Õ|¬+áˆAq‡)‰Õfâ¯1qðRh²PÄmôR¡3ÕÄÑóŒtÊ¥IŒ¾‚Œ+Ö„)J]JQÆæˆºGÕYZØìBþÛfJõS¼Äƒë”ü/¥Ó³ŒRçg¥c–ª™ºÄ_2óXeƧ±iL&H²Ôj¡J’-Ú«r‹r}^ûE1EfÚˆwÎ6¦®î0Ιßç!,Ï! ùbz3ˆã¶«#õ³Òô‰G!Iøš¥žôælÒwâÊÕAúF»úhPCPç·¢'’ŸR*dÄm¯KN¦ ’º%¸¢u½CÑ{¹ UH ×aKý± Á!º‚fy°ˆ Ù:Z¦­WÑÒ•ä!S¢Ñ¸B™(ËaL;@›d+TìG”Š:·Â(E M(І$DA„PlÁ2ç Žz¤PÌŒµÁG8wUØ…(L¤R†¨è$`!šL–2Q2¥ O8 ^*¬(LúS v¡ìÑæˆE ð¸@Ð Á J Ï'*= \ƒ&LåRrÆ€ÙAP¼¢sÓ õn_Çà˜1X1p‘µHÁ4@ƒ°–6&+•çB£ |;±Ð•¨æaŸ*ÌÙM\:cy¹ºŒÁˆÜZ]êòÍ»¯ÉjÖ²ÔN¥´eº¢¹-¡jvŽ;=NQEAEp¨Oɽþ·¡J•E?ô\þíFV&ådAˆVKj]¼ˆcœ¢7R~#¢éJÊZgÑiŠªÇ×9IJï¨\öZ{˜„~B'7M*”Sy_R„ žRR?÷‰´U+øÊ2Y¸íïeGM£ Fmk¯ïoªÜ…Yí5tº$ERŸ˜ù²ÛfIØ „]Ù_ÙÃ3’©Zkk¦9ûªdw5v’vIu­ø†eNV9q pe3*‘g[m›¨¸âµµÉƒçœÎ—§š."±F;ºl–B‘Î…K-X²¹„+‘š˜n‘M”Vn½%ÖwÚoˆ¯#ïJ™•©…9]¤G&õYÊX`Šé]ÛR꣜§/!j•ÄÝk/¢sÓÿœ9ù)'cíPb)‰¿G|êf©*ÆèG"’øz­ÝÈÌä<Ä/õSSª^t¶îçÚ‘Ý!q7§.®¾)<ÏŽ…ëöÜâõ)„u;¤Ã-ÈOEÃ+-“©jïÌØWc ±!+]nÃÊ;¥\¢yÎܦ›‹ep§­•ÂæE1Œøÿ^7'UR¨‡K*ûÑ[Y«S7ú{ ¾‰ŠLf"‘?DþÛX§ªõ½;3ëS!ئOfGDÕÃ:SP‚V–£eMJä˜CfÒDÝaÿð¦k•—Y,RŽ’/©Š®ÄTEU-–ÚU¨„ÿ¥hˆüLìjs•p‰*ˆé’¤âl2)|œ®g0»˜´/ûSP®æé²iQN‚"Yꤱ ¾ªvËWc[³c.W’†ºö8S¦¥ÊÒŸ¦¯ùšÊu)Ôޭί\j—R„2›ÊöÔJÅ>%›¶ù»îç,Å!w篲9¢ z¢ ™ˆÆL%0AU%ûËrceÑÐX°´’Š«ý¥¢µ*3ªz\ºbHâŠâŽQJÿ‰£é„Ge&7Ô®ÛZ{»ø½~ÿb…_v{%T«ûÙôst¹»&©)d"˜jÊ[§U‘NË„L*÷M)*úTK˜ÏJú5ë´ÔLìá~¸¬VG¥¤cˆd•:Ã!Á(ÉC"P«ÇCß9Þ¤%¤¦DÝýʼõQ“bl£6’˜ŠÕÔŠò>²Ñk~Ç# ÆÔ*e³Ä)Ó®”µd©ÚS(ăõk!QŸ ¥L5gTÅ^IG÷©)m§LŒSeJU§%Þ¨A*b’Ø®BÂ÷«ßS†Dû×øëN5 ÎbW‰d'n]#=RŒtŽ¥£b°Œö÷QŽB®öí+»årü»n»!ªÕÍeÇ2H»A5—jA$Yć=åë¶>îÒm,º·Ø…(Ù[ùQ­^òp!xàÿöä÷ÕoÉO œ”®E»Ÿ£F“Ó€t3xb¹CfuP†0í;T^ñ7§Ä_"H±È"fev52j—W"kî!äº]Š[›ÈDì[ŒI—µïDJ;AëBT’ý¨œ[%ÄFõ½-¿¦‘4Ì2ŽžšSÔ˜É)qPr³û»å*¾ÎE²øü=§‰Ó úŽ ¥Ä}¼ì[ ÄùyOÕs‚ ™#w·ioV2Αˆ ü$- ’±•e"󰤺g§5¤žB¨eÈÔ'ªßmÞÍ|à{S@TÒqÙß= Bý ¥båä3ÚÓ“%ü$­ÖJºëýšûI.…Å4CîñÔÍZ”Ééeñ<û΢<â:‰å?TÂoðMµñ ÃÌB²ùŸ®‰×lÕáøÚqã´tóy¾ÓÛĸSƒ&œh°ð×Ñ®pÎÚÄKg ºÎÖËÕ_3Töâåõðß•š&„\)X£LB‘U…c!Pë²rBŠÎC$ÇëÛW‘d!UhÎ&ß6]ª%y„q *¶×Žƒ»º“1úêVðB Xžž¿š‹”Ém5ÇOð„ÐR¥)¦}¡ŒÖâÐúäºðu¥¶>n#3®'ä‰cuDªâ1äÂG3«5H#©R¸Ei’ªŒŸItÛ›þz­¥·Dj½!ZŒ¾sUÝž¯+¥L²¥±U É „Å&„Ìt.g“•PJuBvpÉIFa’AÉÕª{JÇn‚u÷e¨£+‘Z“j\/ÞJÃýB~ŠR³ª¢ªëEó^»µÉCŽ…JZù$†¬k«¯r¸Ø'è”+Õ^#™Ç³k eйQ}ðB°RJ.§ý7ð\+µg,,Ü‘¼(«tqÌËã0à$-´5hÏWds¾|Ú‰Q9–£e_äûE”È" ‡3Lý‚Š˜Ýq)"ÓNžÂíb$éM %é,Ì誃¦5ú×L¸ƒ&í¶jÊi aHÚ„»q¤‘̲®3¡"A¥¬C"裥ÐîU]ìªàPpÉ , {æ…[ØÏ϶núŸ-M¼ÕÌv˜S¶º{QÊVC9¡VžBúi̾t±~«¶Ê;5jÕSs[³ÍR+±×EtåÞ]io¬ãÎ#Wmê¨Aa0zJ&A ”¸WkÇR>Ž]§±j3 6?ù¯]Ò9jV|rêõLCÐybSK©¨r»5V*<ÈÅ5Jc-T"‘ÈdÒTôih/ó­˜-‹ZCLPÏÛß F’­*°«(ÊVn&N‹2\eó- f–µ(DÃ&-Y£ÿJ¬œS.%ÂiJ9ÿr jØ­t§!ÒF,Œ5‹üGñ8­kX¹A¤\«éÇJ±Ò3ÖâÑøŒÛ*:‰:Þí3®©•‹«°Ãy*"å.e:âªTÎS' BEyRärø¼ÒÔIŸW¬÷üh$8(Á0PC‰ÞM$¦/Vp© p9G¼Ë‰ç™…d!†>jöúj{þËV®óRÎåj-¦P®ÚZ+*Ì„11+f®Bµ ‡ŸÉÞ“­¬Å1¹ËõÜ»¹C©II/§PŽÆ'j[ªè0Â+&Sä°xxû@*‹¼§/Ž_«ÊÕº‚ƒ‡8òYŒnû»ÔÝžiŸ [ºI:lþS­¨BÕQõ҆㠲|"¦:·,ŒèD)/×òbp„”Á–sc¤cgˆG>ΞԪcñ¸â9Ñ6qqrrŠC%hN’ZT a"\1ÛZ§­Y¤táˆzËw¸Oz&¶UäaÑÙű¨äûF·c.iN‹U ŒmN¡PB !Ì)šÔ)uvBb5bÓïX±ºàÌ~™ŽœU=BRâ„eN1ãUÈåôR…1Ä*çX›{I¤ïZL%‹fål:y4(¯8€Œ<¾exµ— RJÌâ "ñ-ï°¶“ûgyR¤`™çâ‘ZTïQD#æ3ä9VBT®­–°×ÊH+ëiÄK!Ÿ V/Nüœ(„(§ýÅRV1­:ëµÅáp4Õ?‚Ša¦8ªÕ½…ªgbœáJbÚ¯«¸¥i ª´±u-ÎgBRNšªZ¬ºG‘Ê%†$DŠËP“"Yˆƒõ_9‡Ѹ”–³x]é nN™&”†*÷&צ-B<)+)¨›·’º#¢!<™«}èÝ "EL˜³M{å-YÄ*ˆc)Ê…·Ù塚z¾{eå¡­x¸xóµÙýNTÅz'ï)C´uæ…k m3ý¶ˆvqožväò±zÔ|&è˯¥~ÃÏÇZ:s·E‰¤ Aœ‹I*’Z,^šÑ˜d¢%ü´[¹Š%‹TÏgg›èŠ?ªÜ”«çi‹²3Fþ=6X†j±E,ͧ¦b&]Ý¢(Ì`w·÷ÆéZ§KËâXØ4_’Y2â @åª5u‹¨ÞÉ"Fq˜¾A4ßç~8Ã'#µM^›tØ–JXú§¦ºEDçZ3Ýjë¹–Îb§H†k0…wGàMëe¦âÔ„DÍ\4Õ®–ê•RÄB¯%[O‰ŽDUc!Éíô?¢K™Ò7 œ¹BidU'”)R)ŒbY$q|Ö\©3P¨÷.DÑe¬/¨Gªµ“Ä}SQ?CºåÈ8Ã$\óI÷ºžÅ£-‰¦CdnY4¥*ê+~/гI â–¤uüwå`‚‘ÊJ©¥ÛQëÛKßßÄy݆_&=OT¢Ñj"'šƒ\ÞLªÈ£)ʵ0”7WI'åiŽB91’¤Ã´’ E”¬tŠäÊCÿânQI+د5¤Év²L±ì$¥©3pE%‘ü"V3ÄBº&œm¡÷øŸ:Æ=ŸtUÝX…ÜöjžR¦fJæ~~”Ôúß.†‚ƒ†”šUL…onÈ¡£S/dS-U7ÈìÈÇ$D0Äá5»º”1„›¹ù®¯7Èwn«—¤ßÎqÕEWO;)Ääù.©ÞèÊFÆ¥®òå!öó‡&ܦ?¹ÚÝT‘Ô!CL¾†•¬e•¶RhžÈ#gzZ7&a3YbìÚíŒOLªmÙÕ)’‘˜¦IYLmËÔ_‰…L7¦= ÒÕp²%ØÍ"mhK¥¹”AJ)¤,¨ú·\L妚ao=r¢wŠN{ÈþÊ…9'U”€¡Ÿfåamû+ÑxAßhyœ{÷¼µÎbåY îÕ]òÖ¥¹…c|RŠSÎ(U›ˆû"æuIT<ÈÊKÿyÊ.—IÿyP‡k•F WíÄsX"zPAâ½½¸ßÂì‘1„I–…|n–UFDDóµÞJrÑÌôyVêÆ#Ÿ²»ÎZ©*2HÄÞÉ®,š‚£`«^ÿøÉˆÃ‘ÅLù8ù›ú$úßû×ýþ¿´#„2±iùü0f0T…(£(Ëð½6+9^­ë&“ð¿Y«—q+CWˆ¦%\³¡ DªhîTNQFçʪ…º÷BVƒ‡WªHÊCÏdBèÕ'U}]L#([îïœÎtC$È®ÊNóÄ-¦µ*íA0æv–W¸ªW³’„ÓÜb%|à…zŒ}Zsª¥;‰Ítgû¾Rj¿ŸUDLEpÊv ÚašDñq»Q]Õ´ÑiÔw[ôG Õ#Žn¢÷“ÏÌ‚в-N¢uº&ð¨ØÊ‹‡ïÿ)û«¨[T²>¹RAIŠr—Ïm ¨é*4¦\r$•Òjêi{°JQÝKŒêª\'¥¹ @ˆW_ (ˆ¿™žßµÚ “äs™ –gÜ™Ic—öèÎ á‡e ¾üÜ)°ºTñ½œA©’Nðm5¯ÍQQ_Iuf)Û¦1]hˆiL.Õ¨ÞˆØöGâ³·U„–K˜ûÉ3U>Ø1BÈúN_ÝP§lS­÷…gÎÔ“íEgÞ F*±$"íõ3×ÞØ"± ¢%˜¤ÏÕSô™·AŠØ-_VZñFrq…9‰l1з»é¥áYKQROÌÖ­°ÒÖÚ•mzÕêÂzØìϬw±JWgf+¹Q.݆üß1×úas¸ªG÷ݧ´ª)I10‚uIU+eÊc+q È–Ùÿv¼¨|.z.‘RŠ+[ v\î1Œ¶xAÅa.PŒj}ž²à‰ù´#s#ÞØÏ³f©šeê«'d¡aG‡­ƒ™v…RË.•3kCsæÛ¨gÉ<Úµ‘äu®.ú£$¬U±çÈC¤¬FÌtG˺§M+ CyqkLÚ³ª!_5ÙZ¤)2ÔìZJ`¤Gò2wfµSöÎ\‹Ãkó.u¼½]l9lÚôg!rŠ!Sò©rf‘~ºNæd7c+R„#öžÄë®d,A ˆòï”'=EÞ÷19Ó±¹r¿„Ãe·wu¬Jµç-Vê…PîÂaSd¢Ü´g»l´l»6+ºœ¸ê¶i· Tª¬DÅ{3†YpæhóP0¯äG‰œ&Y«÷˜T¾-Š7©UW6œÚ£!W”Q¨›ÔÊbQjÙ¥uÛ×÷1•t‰TU"’ÉR,‡1)‡AN™ÄÂaþü‰¹J*º"÷Ð^¼øÞÂô¦¡q"¸ª·tdU_ žžf®fogÁ-˽ÉÝY#°’«fU1¦Ü`ÃøU![:L„ƒÃ„›Z=ô½–,$!)WÆîK¢(›0@€W ˜ˆ‹ùÓº80J3¸(^€OGÐΠ¬aš PŸ˜ƒÔ C! ÝT¦"ÓáxRîÈ8z \“‡Ô7t ÄEH¤1'Uã7R.½Ä Ú)ÈS™t•Ç\fgp„9¸²C‰„;†Eo\©êÑsHÌ…' wp‰B°<ün€A°0"¸@ıŠüùJÞŠ½’6l¦ðH$ZA€Ýc1›?¬("±³| ‡æpwq×õzÈ­@ÍšÜÆ5Œk¡+0¬¶*s8À³¤R¬ 7ÄfQF„7¦0£ ò˜û‚;ÉKˆbQ%{üŸÂå‡ÔHka¹ŽeÝó~é0‚±ÿD~vsaq¨åe¢±°˜«§ÌOQ®‰G1hAÌò)ss³ˆ]>r®3{Ùê›r(”›} ƒôš›¦%ÐȨë¾Ô…/±a â"3Y™nõýÖn¨ŽC’¬þ–B-QJ›¹ÛTÿ©ND2íN#Õû>ã+MÕnÒa6IªÍκªžB `§*$´˜QȤÁ3Û×jJóRÍE¨„ö%ŸÑˆ!Ù‰bqÌ ˆY¤_uºKõ:‚á:[m*ºü¾u:N∘}Þ.˜E]7‘E!ÔR~æµ *Ñs ¥‰SHˆôYÈ…º³•Etÿ”¾ŒT£"LUª ¥“hbDßÊŠõ=Ÿ³o½jŒÇͽ‘Îâ™d%ö)ÌèßRe_ ·sù?­Â­ºÔµxˆQ^u«Ž:÷Õ'^o/ájݧK§yzÉG=9¿æÿ¦¶¯É£9R»D(†Td7`æ!Nã‹/ùŽz¹ZMë5.t»Wv›eÄä±u)•a)7œ¯©â¦r¯UÔ/K•RÛ[Uð²¢è•O£ÈÉ”í6tÅpîQA~ÂŽÔ"‡6ä´n¢Ïat•ÊçHù}â2k®E³HŽŽgîÌZ­Qפµ1•I«; ÿÏ"é ";„Ök=“´ŒTQ…*5KeÒš«Ì{+•eõT¡e‚„N:QWdÂM‡¢*´Ïq"k„*SV†þß×­-Br¦)ÂÑq¸®ÈÚ¡\Ags~Ø¥Wd™FŽ#§øR.áüÑù'Ÿ BaãÐKÈã“Ó0”ÆÉËBy›yÁeMÖ¤*-Eó3àˆ@0  E" T…@9ÿ0°ŠE µƒ–£PL JgÇŰ2£œTzbP%4|w?db¸¥C,#¿¦è1ê¯U$Ä[ Söó~^ÔL¾÷–ç'²i~I(+f}eÆÒ”¨D2[ÉÃ(ä:ò raÖUN¢Õ©TÎæAå*ª®×í©È¥©’¬(c:Ë ÆA¾›†žºõq%%JŠøFãb1$êÑ»JÓ8ˆ+kC8ª2µ/G~^Ü=ßòò.Z d6˜F¬ˆ1‡!‰0JÛnÉ3;ÔˆdR˜å¥-ªkÞåëknb“Da dvÔB3>.­IJ„[»ìê*ç)=6™š¹ƒ:13Of± *•ÿ4»iù¨ìýµr¹Ã‚»4t/ÓW¸Ÿ*&>³u4¨Rãnšä¡TˆÕd(˜•0¤¯r&‹ä"ûL¶þ,ë!q¿Šùs»µH:zŠÈCY$W9®Z7×TéDgÂÉG¹8þÿÃÇŸÜíÇøÖЀTFUƒµÂþì$ŸFó˜u3"8²:·¡,²¿òˆ•“óÆc_Zã™íÆ”=~ÁX'ü¡öÛy‘´'óÙãaiDw¿HB(×hŠC5‹ADG ¤8ÁIŠ3E5/ìd µþ"_ J0HÖ¿* Õ¥[‹:Ôª‹s#¿5UþR™ÚKžÍZT­‹]£Ž®-ÕJ!,õjÕ2Èol9Ñ˦ùKÕì ƒiJV/bŽv­¨"eq %Ùã²núbªW‘3,Ô}§I¢;_˜RW?Êf·úg¾ŸÈ#9êÊæ/‚±ÛVÇ!W‘Úš®e]>aˆ–{QöÕO+§ëS |vÄu\,«Nw3#¬žD¤·ñw½ÛÈ_ì°šIþ]à„LY'Œ·ÉW…q kZް†I±œ¸¤—(Q‰Ø[ Lð*Œ7"Ár UZÚ'\N‚±’òr.£Œr !3 Ø!BxÌX!ã5Žb«AD›¢¸WæwA{3!ðâûN•˜äf„O)ƒV¼h"vLA•Ђ!Ì0 a̧6*¼È#d9gBäJ²¹pÂn;«ÐÄ áH«t¥ N¢zaœœ‘X#Æj&"QT‚Ëžg]‚¸²G§E'4%$ †0ˆA€€2Kd2|ÊGQb.äœ_”V'ÂÑ\Bɳ±È-|92UŒ ˆ!H+<]sMá£&¦±†a„Do“ H¦\%QšórªúE êdQU˜‚4w­Äƒ1 ÉdÒlíL Wd8‚¦äg|HŠ ‘¢Ÿ%éÊøØ„€˜†¨oÍfAûdqR’U,ëãˆäWwPõí^@»T+¦b2¤£d 50Ý“kA †!»ÊƒÂ?ÑA¶ °1ÎcÕJÔË2Ñ41´‰TäAQ½ éLv¤1Æ¿+3ð$)„ÄÅ=Eµ Õêãö„¯ûj…æÃâ „Ð 0Cqmƒg/#“!)Y_RÌS•mùpu"®&×%ËàNmXè@‡0#ÔÄ,Ë¢2ŒŒMmQ†rf¬v~²1ªEj#•€çÅYÒaIg"âPÜ’8FˆCHÌû4BTB¡såoO“&psŒÁFQÌüEMé*“Q¬h°ˆÌ!ƒƈ¦„Œ)*¢#»gH·ÂíÜë•Íl `—h ñnv;Ì`!´±˜4)Œ Ë™º1•Œ$f°Ç'Ô9(J%C|Ù,Á뽇aqŒÈF`­‡Oæ: L­Úƒ+¨ŽAŒKMP…Ü»<Çêul8ÂÄ9‹•ÕÌjšw † Lcd`ØBh ¢‡Åô [µÄBðü>¬¥…aÛ$e/{±(ŠÚØglEx½YT!IK‚!”_f"°bùÙ¤pR•z¯Ää N´Äz@FÃQa( ðqaìè‹ÂªjÌ)”ø\¡Æ±EÙ’` 6@Œ'a×g¢G ú´ qAáˆ)s±½¤c˜¸0Ì'ÐaŒÀ@Þ ãVvªéÜqñ¹Îê/&¦U-¡'Åè N…ª¹FQ±ÆEÁí„`Á¢|áÐEÊÙŒV„ᔊ(œEà½DÒ¡íÇ= JÁW„âXS ÒŒ& ¬5KÑq1|Åe˜ruºŠÇ0t¾úuAÄ+&FHÊÃ(ÁˆA† Æ)LpÀÁ(Éi2ìBG £¢«ãp€þñ]-ÔPŒq8ø‡¦K†"¡4 Kœ&F˜2-!ݱ5GÐÑ;båþĨ®™bÂŒÊiÕ¸qÃ"çèDa‚xˆ„œC)¨04Hå?‰ÔX-øS¸wŒ)ìn9Ì©B*nC4f@#@Á Èü3 '!t¤Â¨ãш®qR¹ÉÞ¨©Ò'eª‘.ϘÈd; ¡²)EHÀÔôæ–‰I†b$Fa$&m[X¢¡zŸÄ8Í‚«–&ü(RÆrW+ˆ0c4#ã#'T­FÎ" Ö%8Ξ…®ê£šSvp¬—6ZŒ „D (BŒB=MAƒJJZ6}ž¸Ùx¢Š;D!UŠ>~ZÜ5éÝDâ„””(ÜRPš5#Ò“Šf¸Ö Ê脆ˆ:â² žë‰¯‰Ö\U¶È•¯dݳh]eÿugS& ¦[œª!†#ÌRÂ&"Ì”RcMäíÚÓëù&òRß&(OC3„jSA˜Â»¡GR æJ9®Zf7q¨AöOîáwsë5+R~³ùN^EZ*§¤®dÌÒQ“Ljµ,ÇM•RCj˜Â±äf(QHã#ôFŽ¥-ð«žO¦S-ûõ䉈ZÑú›¯‚œËd©C£¹H!šîF×»0ì÷Òf7‹>J¾Ö––ªI/¢eõg׫˜Í¨âé»!Š1ˆe\Eòb©« 2¼›ªSpEþ¦Yµ›sh%p”S[¦(Å›ôaÝä~&½²GCŸ(P¬yöC=µB-Io¬WbY¨@ËË6XV-­²iå“ðnÿøÉ¨Ã’L N¥‘ t´"ì2¯×¯lè| f¿;n=jÓ`ÕJâÙ••[ˆˆ…YDeEc¾n<¬â¨W£IU®kÕê•£]jIѹ¿^'V[W(V%X!Ä‘I”"0ž¸¤ÕUuè„¡qIÕ£:ÓH©è’'•Ìz4ËWdCÊNü•*­3é-³NäË/£QJa©ÜËb%¶¹Ôaaƒ0Ÿ‰:®ç—FÏ¥ ”<¤Ä¾=,ÞÈŠå­ šˆ˜þ\«prFT¾­rÌè¥!8º¾N&'«²%ˆ„ª­µ©Lêás°‡(@ª½,ˆ3=>½‰ÛiŒÌþºÙÉCçãÍv¹Ž$Ë].òÐd™Ú‹£rζk®¿Ëµ³Kµò¦,TÖQPÎA ¶–‚ù×(J»)W–ªâ3Ô¸…ê'-l¸Kñ{?QQëF•CùU8sLPR«>$w¹ÔUÄñµWµî†F\Õd\1NL®oͱ!²h ¥ãÎ9Ä0£¤¥òæl„¢ûé.÷G&®mŸµ%^­©IW™d°Õe£Ñ^Å÷ʽJ¢bùgúÐÞé¿OÉ!EVr”¯ÅN%®¹Wœrñ RÄR•:´·þv%l›UOù_7¿1ùXœZ.¤ŒË:¡Qå–NS1U›ˆ¸Z·¬Ò¡Â%Ú®‚ÞÖ´’l·bìa™™•©bÑ~¢|¨¢>în&ûòsXú¥ˆåk#*9Hl J¾Ù¤$í¢¦ûá)‡Ë,¤ü³ê}R†Ss˜»NïÒ\‚¸â¯“Æ$§ºñ²CéÓS±hûNÅVÛc›K›ˆÄ䨆‘Œè¤ã—Ý„%S„cÎö×Iy3s:É Ï ýJıXÁ¡†Lº4e¼:þÊaÚ c³ª¼‚Ýy8Šƒˆe1 C*¨©°†”­ŽgèqÐ+\ÉPŠ!™„hʉ=9ŠÊÍ"¡; Ãçé u§' …3Ü+4RrlÁÄNB™‚À”âZ LŽLìn4: •|ùK¸è“"d`¬RŠv¤6ŠÎCB1Xësˆ†¤ƒˆSyû']…D0(Š ”œÜÉøQ$rS$¹Ì°¦9jÔ‡fãh¡”%³1 „²Üjâ=Š™¯V¯(hŠ´û„qL¢ˆ*±È ¦R±¡PFÁ!žQ:6 Xø\¼Å#)¼tK!D ¢ …~ô¬[P3Œ¤)BRXE&ŒQ-ùº±Fõ˜¢>ÄúNÍ!¤zAÄÊ`”EýXS)[“­Äí;&(IŒpŒb*Z¨B†-+qü))Lìç ~„/æ9‘þ¡ŽÏßæ5ÔH™ò˜¸n ä;§NÙ$Rg%„QDá r>‘×71–æ†hYÉ6ÄQf #uAPs„q…bVðØ×ËÖr3† ˆÂ˜>>·A:o(jcSWK’˜”$°" ˆ$¼žBÒAèVù 4»ÏŠ˜Vê‰xÔG”nÆ72X%‰H¡F`‚¢áGKŒI†Í\Ü!qR æ`ùŠÁXÈè îDVêæ):™¡‰‘S)$•”b´Ïpb˜RO‡½zª4"+-ee~Ùú¸ÏˆQ(™ gD†q1Pàƒ„è–«H[T%ä=¬Ù ‘5u tIT¨BÑ©ÓC‹Crò[Ä`Æ4#5·q 3¤øÈÿ³Vˆ2Y6RÛ~„Ð@q؈gyvLUMôÄkâ¹Eóëc3“´ªµIöx…Âòa´¼¦&—¨L)ЯÚÅ¡®«lÍUV!AA@„š'˜ï=ª^¬û-uC˜cˆ—%)üèU2„’6ke\AŒ*LjD˪ÞBK¨ôAumesË7BËè !ÖÓ d|Ç]¶ÿ:ÊCpPE‰AÁThžsí/Ïæ#:lLDD¶ò]¤ªÖb¬âTŽ"½¤R=¥Ú"Щ¢,QÎw9¾¶Ú—ÍôÑö·á:ƒ(¥>÷r˜RŽ"M\˜¿-{¤–/P Áhîç§Œ:½e„=¬íz0¨mèR!Ìo,¡B‚ØÎ¯B–Œ>’j…¯K—ÙÄ!æ§ë‹–É—h´W 1 A/t¯Ä´Ïƒùù­19ä“J†ÿˆMÁXœq*™!PÉ@GeP‹Sz·»>ò÷KQdúRI==Üá^>ËgØ` €f òŽÁ»*’ÚÝCXwzžhñ¶8"ðiDu¿Ñ•Í#ɾ9,xX 0Ñ¢@€A]65d(Vdœ½–úÍ|–ÃÚYBzàVN•×»¹X9‡P1…„ùÃ9á¹ y6Û ÁHF^«ûø JYÉøõRï¤Wú°]šJä`¤Æ8×sTÒ¤0()&‚K‘O[uÝüáŽ9šC‚ g?Ò›óÒ6£K6¦|Ð0 ¤ ˆ>odÕqMðÑ6Õg ‰uK­D)$J ADµ¥ñXÛ'Ïõ-ÞšƒBíöñz¦ÞTõ¥*Љ–Š·ðïF†joì[*“ÞÞz Šø‰R™÷¨Z5”w Dë=P_;¼¤•·ˆú¤êPå°Ùƈ²¡ Üaå–’ÈPà 8hYha&Ì£ãË'c;qW'“ý‚!‚¸Ö¦UýUÖ§ œÇŠbMáÑÅ“+!ÇqÜľmøO­m$²ÞQN”A ‚«¼ÌS pC (g…æ•¿ñ$ß²°ÊQÍ\2e²ÆjÛTëSß‘´þÂ;‚KOI‰±t.tA“’ÄO½JvÍЪ(â¸iäcgºÖòD–$ÓXš8î$·#|_¯Ä¼,óxAALF[ †k#¯ñ-{lÞ…Yj:Tħ¿ŸÆŸã·ò«úýsþåZJq͸Q·` ‚§ïÃkqk.½vëõ6cYÖ„olë÷5%z*QNT5TA•N!˜ÏÆWWëb*Ó3wsíoëlžO?f8‹ô±Y„Zi]0C8Ž)…ZЕ6SKóÒ‹£é[æÅÙû;[¬®G£¬¢ˆ1’ÈÌ0Uü£®Š¤ÔºTý«FÜ×-_DÄêS£Ä¯ÛÂ1ÈæÅ©ç˳½%üRjóQm£ä¤f#)ÈíýRˆR.”£¿ìR;Tk%*ŸµªjÓŸÍýZÙ‹Cv!(Óá GM|‘1·pä)JÔ:íXr¶ÿèùRrœ‰Ï’ÒÖíd£‰s}W.ãz˜Sˆ0Ãs¨73º&X*ŽGìeÉ:Jù0ßBWöLÊê¿Ü¹m*ØRHªÖdqF%°ÜÈûžçõ’‹ß“&”J: )u ¥KG(ªè!ÐE·åqÿ7Lº„¾i+œ& ûº@ŠDq™4”´@Á9®uÝ_ò1/"o–kM£%)=+ž~“J•5_b½˜Ó:9”¯ŽÆw!}ÎÆNªmM·¤žœK1y‚Ò×Ã+ЖÆe¶_y?ˆªªÆ­˜d3ê¹·Â’CÒ\¼äR¸Š¥u¹%3;˜¾I!SÄ&µJ¡k™A ÷µiq·y¦^ß¿i¯^*ÌÆ\»òÔS’+!"t´!‚wTä¾å6«ö½éźç™u*ižÿ¢v¢¤@A„wÒ~‘5™9*…ü{öX®½:6…¯Ý(uNjŒïF|²©/bò£½C¾eM&æ—s­®‰õ»ÐÂSq e¢Š¬¶æ(R fA—%z¢.µ[­fÔjc?K-i²‰´½d;açM/ÔÁŽtâIQ2à¤!qUŽ|OÚS"ù9xz²êjî±Q’†s²ÇªòŽ)¼c©Îñ1ôW莯-hJX³a!MîㇾPqÜ‚e #Ò.´á 1wR„7Í'öԡᛜ‚3¢,ˆÜµ3˜W‘gA J²7r¡Jž^6ÓØ´)êÿõДGJ!¨Õ*[è3¡ÔÂ:ÓM"¥_PE2mu“qZ„ÂR±vJYÙRQ×:j,æ" B;½µò‰N0ÉQ†í²zWä»§¿3úÓµ3ì‚Q7pȺk =Ító3•,jšŒšq/M-žÅñZʾm3ó °¢ºïÓ»•qžQ”†]ÌJÞÃJÏSßõòø]¡Ë‚ÚÉëIó¼+Ý„`ÊTÌÝú…zª†i•8öêí6ÚN®ãe$bÑMDnl‘Êê; )V’5•Ò‚Œq‘•l‘)%4ü˜ÉeRåþ”“7_9¨¸‚«•µÛ³HDöbЮŒžóV¯É^ñ…¯ºiÚ„k?Q¬;ÊëaÅ5ˆœGÕʈfX¹5=\–55øÔÖ#š»{£rÓ{£âŒÏSЦìË„f„}J~ßJ"ãn±Eãá6¡ ¿c=̘euý0É„.1iB’–ülóáÔ©ëdÊà´õæýÎs$å,OmZëæäÊw!Û¾…îgy+PŠUþ4þî2œì)lf'zˆísL[´c76L»•O£))B&u~2#V˜å=ÞÆ®r^ª*;ŠîKºñ¯Z¯ÔéuDÐ]­;Ù 6ˆ†7µ3zµ¦ŠR¥ÈB'ø©wÖp‚Î:­{¨D£c%$]þÒ'ÓGâLD6ˈƒZÊ2œR•k”¾»j‚ŒâÕTÆâ’û7;lÊYŠõ’Š)жæéHÂ¦Ž¢b¬‰—R/=Ýßè¸mW=ù]2õ6â5%ÊQÐ! F”RšÙåA,ŒRê´-5?DÀ›Êb÷ÚE—×8I.•'!Lcˆéî¶6áD(tç]Ëç\¤Bbbîm³Ò»ø¦ÅŒBMÒ³˜†T³˜^þ¿ÑTg%¬H]J±V”ñ ×SæRíE¤¡*µUG‹j AÎgsfüíý“¶ŽœzfÔ×ÏËöÊG•v»“á­¶AAJ/Yz’ð…c©XÎåz[š&2(™)DÄW.‰Žj• ¹ÖBð´Ó˜Çù‡Œ§ Óy .{RbŠk×Û?…¡ù·NýJ¹;Œ2¢%9–¶ÏSlº3÷ãÓ³:ŒÃŒšMV”Í+ˆÒWjY9r©…®¯‰Ûç"4ÒU"­¤oMJ}³j¦q:œ8Ž™‡V*Jùõqhº– …/¤‰òä¼ÕòA´Ú@ꟛ~§œbAʦ¥×<¨„;#Þ܈V¨Þ)¬_ú׿b\?•^èù\:˜u35JA„“j¤b 2ã&p‘9”bm _Zµ%Hî+LáˆlÕ© @¨Ú² ÈEòiÉ¿ÊøJ3)ò=¤öµ¤Lœ¨&0ZnÿøÉˆÃ“ËNþïÿ·ÿúÿÐÿdþåþ{þH³’Ÿ#'KõhØùð†iá(¡;(¤Ä2’yWROãÙÄT‹òIi¬J¥êsŠé:ŒŽ;ƒF¶G ‰%ùÕ¹(— €ýeBÊ÷Jyj!(&¶™TÅrµ×XƒòË}}n¸•O¹y+¯MªXbJrÜØý¶IÖ*˜Q’ûÑM²ûSæÞ^$E%5ë/%1ކë¶Å¡ê„G#ˆÐ4öä•…Usx…¡l¬[õañ?£^LŠB c‘hvKw?ô‰Ìã¤ãZV/§_¹„ÃäVÒ‘ZXyЧj®·²W„«ëœpâúK›‚͆úˆuEw$™wG$ÌÄ,Ä)ØïöÂÈö¹èäÄ“è¥A`‡"[k.ÔéBŽPëS71f!<|¬õda¥rFS RH؈j¦Žj)ANâu¥GR½ ¹w§Á'¬i ®Åö–’_×ÿõ*¥K˜(8D´÷M–}V^³= GBS˜D2“–\©´›ìÚ³SÄÄ(Ö¼âÎ÷»ÒVÚg*CÝ¥^°õ…§œ°ËµÝÅü ÉÅc 0dImsÕÆÌJÙV× Ç‘´DœCY soÊšºVC„ 0òTHmÂ—ÖÆÌÂÜñȦLžÒœNFË]Ãܵ§XLGãçtá÷¯NÊlÕþKq–u9‘ ¬ôëfÿ×ÈQ•ng]ß5—l‡Z™H2TYˆ>9ÿ´Í«[ç©ÉêŸPŸ57JÔH­ßDG:JHåAy¼P¥¦rxøuY¥q–þ‘-|‘³8VÜ,ŒAÆç}‘HB],›V™ID’â'4÷¯(ªq…5ú4Ö­Z®!f D ‹Ï´©ZOtúÌéIÓýˆOé¯/lU$1ÎÍÏvÆ"„$B¹i‚£¬“¿â>š„WJc‹!ç½ê3¯Ð¦†s-I¥áÂN)¥Þ JWh³Q¥L¡7o¤_‘ID²Þ²b9$+ì1’—cÓF¢„An\,$´0Eõ9›B-Ëc-CyëK¸/ji,Íw:ÝL½Ãv¥_çXwò2;jS¾J-ÖµP«F©KÍ"eð©39œS8Â8ùË)¤Ë ™~D³jÊÒ‚ɵ©<ó<ËO!ì‡B˜w0Îj"}“øÊn¦¹êl1{ǸDZ„æäçi–«eÛ+­¾j i#TÍtrKHKUã<îM“Mv!J(·$R ”¾åêyÒæ¦Z ±ˆ'©Tš´…$(t ;Y‹ŒÊZØW  (©,ÕŽ¯¸)>¸sû-S‰s^Y¢É¢®ÔE¾æ§/#óaÌwrÏ-Œý{dµÙ% X@*ʲ#á´¦úd‡Ú¥ÐAÂóV©å•c4«ÔPžM ›’Œ–dü#µ‘E$Àƒ'Dn¿ÔøZ¤Î˜ˆÿ£z}›QY‚:‚R¤¨¿*ŽìokÔKE|_{˜s(8É{“yÏ~Ø!5!mcn°™Æí§˜¹ºÏTþ¬*”t«¹ÄME¯9]Hº¢qkbæsáQÖ¹SU“Ÿ.O!÷6¾Š9F|ÆVÙ°Ìa )BÍãD“,È$ e:KA«]&2¹FQã)¨e",Áj&â]&2j­D-oƒ@º3Dî’;¯F3ÐPB˜ 3‰²9?ÈŽ<‰«©DÓt÷úàSµêêÓk§Á2â±AÎJIo:—Øç¹ Ü,“\s:!Ä bó“•®BL…! y9á(¼OÆ[p[’²Ë(êÉG=hk k# )ÊhXºaææ2dƸb\¦ãUIä%ÿ8ìÞ%ØŠ]îû×ÄaSDrRzææ:ûiYß#”dŒ óiÎpŸ”bwkÒ³-ÃáyÎJó`TœA„¡DJ×—$R" ={è¥î-]E âó›Ë^ŠCcÑØeK{/¡NT¸ìÙš‘âÈAJF(GÑklH†ñ£U1G±È;lG⇑ËKÍdଉª}‹³Dƒøp ‘/ ‚‰F’­v0Á9o¿(ÝJª{Ì©4RêtQ>òRó´‚JèH÷¢¦4ÎçD äœHä?Ò­BØq2|¨öêåxG¤X•çB¤…¢4‡Ë¥·•hb%PŠ‹d]y+Ré¸*æ-5 2*#V(îq…KÍ%V¼+"±V‰çkPžJKŠB8y +õ/@´½&(+‹êseÏCíXÅwÿ!žQP€ x$i½WFºaÐL´„œÞ¶©¾­B5?[Ç‘;8Ψr±¾}ƒ…#¾’›ÈŠÔÿ\Tbc§û ’ÍÉT:DNbq)柑 A$ˆŸ¶7½vU!ŽÕJ|KÝôt©O#Lo[K±j%ÂHÒ K1(LqïZ§Yº&ž°LQô̦ª™ó]0†F¨8À£H`œ3gc1¸‰tÃÏ'ÛNÁD–$%PÂ*¹6åH¢!]ÎöPKJìL-nÒé}Â<"F>óÌ…ããbPãΈÁ¤5V‚¥-K9ñÇòW)Y…º&ºº„¦®! »öBQM¸‡W±”Á*ÖãU·E!Ù¼¶Ð›zìL;A˜P¼mbÆiÒÖU2­‰Ì«ÎˆÁÁËXYÄa¤¨©[W×|¬§£’™L.œ™šþ-}ßR!•zsšìîKVæ™0`š…™KF¡1³Ý§Étòº…VZŸ¯312\®EBô¶Ôôr2ÈŠ1,/ÿï,Å¢ˆ¯ŽÆD ¨Ä¦ú^J௥Ífʵ(™­…4M #-űST†O7”yk © ¡a:G\f’¡,UGz\' Ì–fä ,ý‚Šl2flâ×.ˆAÁ“ã‰Ò‡Çݸ¥S¦©0‰…ÆÄ"1‹ž»k. yJ!(éq0­T&P´kÜib^*ÌêÁÌS!ÉUûš…{\ŸBLR y“צ횪¦1qéQ©Õý¤!ü‚U´«fˆùdR2ØúJL¹Å"È 0;,}o¹Z†ô5 äÍæÜº¢‘¬Yh–h–g"­‚–¦æTÄÄ»xf¡ÚÌ…_\þ·ã·TÕ$” 1ò‹BÌF8MÝ&°…9ææ%ɶ©¼¢ˆ‚¼E&v®?!3‘ e^â%”PÄ’×ÑI¨‰µFK®Õjô¢>cKXý!Tõ$åå0©—$ÂÕ¢ˆ˜  Ñ¥Q‹Å~ôUE]éÀn0=8ÀJKu@¤¶„™ã¨ížà‘ü0ÎéN^-˜ER‰ú¸Æ±Òԯĭ*Ì%×Zj)Íèùb ¤œÆ!ˆ.Ôc.áYŠÔ½4Ä\qgl0ðžâŽ´¤/ª’“Œb;ëcŒ¢ „%™íξ…/gö×,¹BîRFn!sòÕÅ_1QÚ3iQŸŒVdñKRêì"šÕ½\B¿c’èR‡¶¡Ædg].fª2sÊB¾¢}´ÌóËf1Íj×j†×sRm,¡5QJ˜Œ†sŒó¯ÙËL§uYˆ-)È$õÞɬjê•v‹³“›(*=Y] ”ÕS=˜¾úRsQ¿ón¼)nrª¢"µC¢»&X´M½äTÏÎÏ\®3Tª¥Æ¦kè·*ʶ&P•UÉUsKæe\j-Jâb³„\B}¤æ:¥ƒ@§aÚJ Á5…d1C!Ýd&èæ5U@f šk[‘Â^ÐÆá;˜ŽbÓ‚9Àªð@Š„„2&MD1¸‚Žfh‚0Ö9 ƒ8•Á”Ú0àŽ$…¥Wlì~ Ì”?X†A#Œ)lfbòDã¡!•Øã˜âäñX¢”£œó„ª m¤T ”£@R1†m7Zä a ‹HƒeóˆŽÀ¬‰W „úìÀ† ä8Hè®ÄìqÇ'ÊWèC?Çc JdŠH4ÄQ0cÙŠJ…ÄÁ©y¨&!úŸŒÊ†Ë\xvS˜åŽ %Q !Àf¡"ƒ`@Ç´Òu¨)Š2‘ç¿á ÄêUêîꔲЯ´¤®‡jk\17Ë;”åSáhò¥¹”¨ÛíêÛ#%ðÞ!˜õ’‚ØøÜ‚© ¥§{2ÐôS»b0‘Iœ–:'ÿTc›‘PQ FÊ•5õŒc—eÊâF*”ž†í¸!ÈùnsÄkúï^þBf%ØWzTõ}±Š+Œl+²µ4!L{¹ÍCÒÆæÚf)Ô×vÖÊ.ãf©þ!D0»M(Èd´Ë¼Ùån§DjSr‰Üäÿóª´ÈCºÓ¸c ½Ÿ!O„“hÅ1èÕἚ"¡³•y–¬UG´ëdb8‹Kd„]5µŒÚ÷§6ð’ô•¦²N\Õ' »bœcë"*¾n‰#˜‡NÍf˧¢gÐÒ=÷8–ËSRiÌdq$—–¨Îâ©¥äÄ.9Þ‘^âú`AŠéiŸRÉ´­PÊl¸ÎK" ܘÍnF#KÙªî- f_ïçb¹üF99ž"Ù‘ØÌû´åJÆM &ÕÆ˜þ™Òز#)G‘ |Õ!<ÔÿªÖä"h¬)‹ä1ŽÂÿrޝ¬R äòìƒâ÷]™ò™ÒôZP¼âJ§¿V¬Ï…”qV þ†B³ó‘¢arÄfNÖöN™î‡àOÉ™QXÇXõ­’ËCÓ—m\§윧ޭÓSäÏ2Ï„#µÊTCqHˆöt)hÌG_gÂ[Ó^Ú—ŽõÌ2—ħÔÛ›â©R›œU²Êå1›SÂv'*ÒØšËKËþ~&/?q~T; ØZ¿™ÐÌ.[\ÏB¢™‹ß&€Å È3#)S Ïà_tSAÂM{ñ|½Çä0wÔýRPA;xO P1¬%3Œæ!#Í3™ÜQâtÎFÌžð•­6–¿!̸|CàÛ‘Žàb´N`å?â(n%Ù±Æá£üB¬_¼ ì€8±F„1 ‚v$(Lœ †C4B ®saˆÀUW‚<ÈÃð;¡èCÈðq2Ó!¸)1’<7L‡@„!…fQÑŠL³lh1Hnƒœ,+a®ˆ îQxž"ž@¤Î&¤VÐ @a„a•t¬Ã )‡œ…ŠyÚ¢ó»5«ƒ³‘Ub项aq°‡ˆs¨” A( ­’š²1„ÀŠcS« ÂQÛ…¯ iMª>Ö%_1÷•_*{©(¹‚œætõ¡V# 䘆ôë¡IŸlm˜—ÅÊpÝÄ*YºfÔÎ˵ÒQ·r¨ˆª·S˜eô#½¿Œ±GE)Iú^e0†¢‹ký¨D:+æ¥ \µh–!3éÏÖKJò9p–E¨érQˆ›ô2Š"e»½\Å{™‘kÏ(•kÓ/ll):A·ù·…ÄQ\ÆFò•‘ÈÎ)T¸Œæd¡tè¥:t‹'µ3ð¥#uF Q­ßef¥mëI™ŠvTe[ŠLˆˆ¾¯U(s)\tÝij"µ­•ÖäKê}ºkQ(k(å“D+Ö¢Nl" GÌÔµÖÇ8¬’è(’9ÙP”-dµOVA0üëü7Ûu½r»»¥@¬qÛUˆ+»–:^ÆTÝ¦â æ­Ïø_^Ì/¹ˆ«LÂ[%; ±~èS•è¥ Äâ¦!];ít8¨©$Æ&5îæ'Å¡¾éÆLÕS^ZexK 'ö4Ê´ßâSË!HVNa!Lî¤]©Y0Å;µBŒÊÚäVy«ÇãÚ§ëëûH¦¤Úýq)½gm2äG±}І•d¦M{„^²úHÞ˜ÅCRöIZ‘+tWGÖ;¨¸Õ‘nZjqDnW³²5#2kXÓ3ã9ŠÊä¦r<ª–ÌüZgÿ{Ä.?=ˆ_©‰Õ¡,»BÚ•%Ví„FbœaWÌõV*wd­Hì)1ÎVW·‘¯‚g)½M„ÊdÙZo™pzYL3uP8å©lã…wsR¿äñDNy¨{IÆfÙý0AÓCí(~§û,Ñ4D1“c'“«†Ë ê±ëX¡ˆaí䈙'÷X©R%ôÈgZn)×~¤Z¯Ó´üÿ³“Z™Nô¿/ˆ=‘ æ: †bBaŽ(¦AK“Œ—u£î">cÅâfK²g‘)Y'ý-)lÍuÎæëT"nlaÌGV!Ï™Æ9WWN‡è—N–êpêru‹(œ.ïyLlMFlk9Fgä)©ƒ²:¾ŠuŠü– ¹™!(媑UðË99§ä‘È^ÓÈ´ÀJõPíÓÚÉ«ôÝ«•6ÏFS*{U®Mf SŠ¥Ý„®š‘CÔ“d–™\Üñ3"\JÒÿ(š-õA’ÒkÎ9™é¡L2„F¹GV"Ø3ÉÃÙ9”»‹Ï¯+—i[4±tÿøÉˆÃ”ÞN[02PzŸ­޳’uÔŸ•sHÑzÐ †~óÄ࢒-iß?Ô`Ëgô¡Ã ânÅW»NpŸ6÷ÑžÉuà‰G&¢¡$Ö•ûé*ø² f>Ì¢«ˆÏþ̽ýY¦ù |‘~­J)™jý´‹v¿E+bÄeW¼^!ñcJÜØ!m÷¦ZšTª‹w…!IºD"DXƒ¿ÀE4ÆuÙ?ùéøqtÚˆb{Z¢ps±+}B⌱ΔÚNžì@‹b0Dnj¸ÆAKv¥Ú)v–ôw2½>–ü§ˆ!É©K†¿R!ˆ"~ÍIO1¤2}BHÈe”~yªÄvÙ”†=Ù¸A×reâu&ÒRüDe¯<‘m9Äqñ)YöU+QtÈpÁÒ’ha‰r‘}=\yGi©¼âï|%oA["Ä£)9ÎÝÅ1B PE–ZŽäÃÇ^¯×ñܤcîiÈ2ŠWÛcØKXHJ–¿åæ;ȳ­S˜ä©$–ÒK†á–@’û^­)…>ë ‘B!ˆ¤ Üã©9§V$›éM%ª'1h7ò{í­%xX¨ˆóYê)çme)Á„#EÏ`†sœ¸-©Úd×¥7ð©ŠÚZÛ$¨f‹BɤºÈ)N„ÄúL8®Øeg© O,ƒ¡™Û¼ô졔ܩbýÂy÷ÉNáGW̽M½(æCÏnÁ£¨¥òIBLg”äÚó ®Ä).ý!¼¸¯qÚç£ JSÓtT¹¹3rš~¬j’aOòWM¸+™´E!ø#1Æ:®‡8Æ_ò–~Ä \j\ß–ØOù˜Û¹µ)"9X¢ ¯'Ê)šÞc4mzCƒ}JAPë6âjkg¹†¢…IÁ G¬ñ‘ì@„I*^’mÂBÒŽGr £Ý˜ÊÎä@Œâ(«rásÒr„VÏvÃSО¼¢a¦r“üŸ<Ü0¨o²«ñ", ìâ{áaÑïÅd)¼Za4ÌLÊ[$¸l£á)êψ]·BðR™Ò§üùÈÅ1¥”LÆR4¥®¤6f‘qs&LY»ó[b~“g«jv”"7TNí"ÔŠd]ÔõÖPìž|]•êhÝNëî”›òÛûõ=·ˆyœ8PÈ& ÁøÂ±¤Îîl‰úÒ ¨=ꌄ Qö§‚S±m£>ÓȺ#T¤³ Š+Fe³jÊ/“¥…Se¦ßªn%ŸK%(Ø”³ÃÔ–1=ÎÎì·VaR¦¥ctÄ0®Æ?‹WÏyë/ã{Ñq½)Œj¾ë?,Ý#YD%jñÑjÅâÖdiŠA[ȬÇTä\Îô¡®~ïÎyÛc¢ÖjXûJÒ2ÑEî-S^ÌΖ5”B¹”ÈŸwÍ9™q*·FZ2idL}Úºô«ë‰U½²7ßs‚A:†„É,üC”*!™Š(1[„ ¾§suèÕ§î\îÆ’]5{z|íÜÝ!CŠ â -hâüÅUÙ1uKÉG“ã-.Jyjˆ"][U„+µLìz`‰R*ܽ¹ÕÒÄ–¥Ckbü‰B4¥(¨ƒäB"˜–YŒ!EOÔ)ù_äãP¿¸(ümÚPÒÒ_~ÒÝQåegÖ8QˆE‘ÊD3BŒC»y·Ñ±)Öäëêj®5Vº»ºÜÜFB>Äݱ‘6Gbuq?D0ÉTºVɃ8ÈÅ·!QRs8'?«Ð¦7¡¢‹Ÿ˜n#ýéÒ.·+ý4ú–!Ý.Œz•„)];¶U¹ùˆ¶!.¡LMAÈß%Þ©©Zrà•eEáX?ùºh-‚H/k£FI™09Xb‚)2‘C<ˆÅ6j.SrÏ[QW­UMž—¾6cq ×YFqŒbåt Sþv¿1ðÏù†*fY—9Õ ò¿f‘¯TNUÄÒ)E!Ñœ˜5X”µ­r¦=ok;ì¦I^#œŠUÔJ«`‡Q‡WÄcý¨BU˜wö|ûçØ[ÓfYe—ÊZ‹1 "¢§:z*ŒÃ!F….¡ Ã5 ˆsq´›m˜—!üLÊwr‘E¹×(QMSÌÔ*Ëû7=®QY Ë‹ÄAÊ#K¸Ç!"ä×CÈB ÄñrØin}a$è]ŵ©ú­!Ö1l­^* BhÒ£­é†.­Jìd(æYI†'55èEÂwš¹š3ΕD=d„ù&i³OM ƒ‘±®N+Ž Ã‚ CË…DA ¹o'æcúDZ|‰&,·Â%(n!|J5‚±HeI™IÉèfÚ:¾õRºU5u–‹?Eº6¬¤2«ZÊBrb÷‹•K-~jDóYIì…_« bŒ®?2Ê\³!\0ã‰'tù_ êòkvA5IÃGîÛ»K»Ò®S5•(ÙIAXb°…©KvÖ+ºv„Þ7èí#óÄÖ¥Dâ®`–?* „{¤D&)þ}§ ;ˆ{˜–1†røK2JƒŒKþá:ª¡Þa)ÓûZ”V)Z¸}Cãp˜©2m¤¢°ƒ£ŒÅf–¨fÕc7D#©—ä6¡ù:gÎ{-l\kh7˜r‹jñp—‘2HÈÕKŠW8á䞎1¡—¼.´R#¥˜ZÉè&ǼÜ"—Iz ZáŽqˆQœÇZá†y VÞ/¬‚¾!‘‹u•6—TËÜFLµoÂwÌõ0‹ËœÔn‘XJÀüØG=—±HC•=Ýô›!ÖE„)IŸ!N+J?e(ØA³~ëÊ]ò^$™®õ­S¾œä)ReåÉ0èb"û$Wæ1D^…Åæá»r ¥úY}íÂg¯I혆pŒªLŸÕèÇaZdRäbtG‘VE÷5+¦¨‰t‘JQ8½ž¦äÉ]tOêýª…ÈÒ.U8­R$‰9ØëGO-¬‡Q·ý0¦é¢9„!µ/ÃÝÒäÚ³Õ{;<¤¨œÝ-¥!vkPÕ$ªC•= "H1FkœÓQYdbØÒ7¡.¤=^«^¶Íãoð…ÊÖ‚IÏÊ#'BâZR9ÖE²×—=¢q­FdnRQ0ÉŽB53 L,ÆU>Q_ZG)1(·'}·?dLtú>óÆ"س-އÔìD+&{3I(¸­d®ã!(ê#gIƒuz¼‰Ä¢ZÈ ç†iÄc4É›­C/Œ„BwÑ߯‘=7 \îD#h¾´]#ëйûTYVbpkÿÿÿ¬ÿ•ÿ¢¿»?Ó_åõ¡çdÖÅSx6~¼3û霹Œf~Ú”ícê†Uz¢ˆe5Õ…ã{ùX¥bùU‘‹øm¦¥u‰¿òe¬ªJÉT)Z^¾ÌæÓædÇ>‰´²8Ä!LtFfcâ¸ÚÉt³öóÜÅ6Ëm¾Å¿O”r?’Ÿ¿˜Û)µ7FISDuK1CŒq]).ÑÊ©CXtUsÓ𦯠–ÁHTCeøŒ–WA4¨….³\åEMaT)Nåz'fý^äˆF#–TµúµÌ‘•Žnè—ë16Ü5ˆO }|ŠÝ¯Ò©­ŒÔ/!Á ! äˆU4¢ÂŒ'?ï®Bo¢oýò‘q1ÒdÛf¬Uû:ŽEªåÇN8î·ôÖ+Ô¢®^Wã&5-K[jVÖãò¶7a9ͪTÖ¿&ø…ÝÜD»3½–´»ÒSŒÆ}®Ô¢³ û|z6Ì4¤J«v*ê_¯¼„ù:úééLÒ%ê,ï– ó BR̤± 1FtJWOÕ9WŒT Š­NšäÜØ¯-»^È]¦7ó¶™d|WÆ •Tk˜¡ŽŸ‚Ñjr¸QéôÿB¼–ÓVG+>ªI™Z“Õ¸}\³ÂÑ;®Š­ŠäZ­žq ²”B,ßkeÝÐÚµ¥BSW´›{ï ‡’ý¢q¯]êh„¼W R¤äë™|Ê"ºÊmAܦcä˜#˜ìïºkpÙf~&.ª–“Wïî"q^­ÔF»‘ Ì‘B + ×ÝBŠd•y1²ˆëÕõK™˜˜\Zuz¹ëJ.•ð\ìGÎv3—­åyÉ)6åV¨Çž­„¹/æªX:SÖM\©ü»±(²fí±ÛU×,\ Õ°Òº„R ©J+Nwa„¥>!Lî¥Qwû9ùd¯ØÕÑí仕ï{æfãælÒ*Ì]­ c‘Oýe¹LFDT¯r) ¦“‹³/yåíJûbt¯•Gbj¨ŒÎtõlæ!H´V(Â:#㿺ŒŠëÝŽ§Cþz­”JÇúýmYV£6ÿ7î4žü«¥!Dk2¹ZªqLr"<Çf]\XE™›™ý³¶è¥&äùNëå?T•\Þnò$Rеär(Žg¦ï0¢Š*YÙñä??ŽØý]äËÛéÞFV‘ÛE ëb¤QŒVLwK7&9Ì2#¹‹ç“’¹É¾ÇA–ž™ŠDCK’[ž:œÍ;ö"çk5j;Œ¥2ð_3ƒ¾bw1ÜQ#Ý×ÖZ¿¤©öÃZ|<×Mæ¨]ž¿6Óå!ލËÖ&È á Ú’X✈¬ªè\NŒ–QoIö¾¤S5Z¸…ÄêóáUUUXWöf#"¹Ér¥™ÜªÄ÷£0޼r%—ìæÕ"Q 䮋ÉLžûö˜ÜßGò[ëoZíù{šËWABˆCµVTS´Šp¡ë´ôœ¶lÓ-Ì„¡å^Û^^ZÙ‰øµòË‹^e[ÿKYæ9 +”„~ïHŽ3œÉäJ~åu ·#*¿Äëyû_•>N]!‘µN!’ÉVLi˜B»±ISµìF²1j\T\Ú–ˆÕ!‘›š¼JK$šâœåz{žß”åKõ5â„Vbò/ƒQÒ;Ñ2ÄC¸Ì£;)w œÇ+©ôy¦É/US®µb^øÝ"Ì­˜lœ˜v(Çv\,¢)ÈZµ˜¥ÇÅÃ6·ö'jàœ”é°–ýZ¯•ÒTG^K”ÆdKV…)2Y*’o’B‚ººsrµïq–SºT 6’MÄÎüµP'>µò»^f~§’šMïCQ ç.«RŠð… ƒ‘™ÌmvW–™%B!kËaúÔ¥ U „Í3½²›Rò’îQ[Q¨Œu§¡ƒ¥Ì¤?®Œ‰­Ãð—Ûz%^ìÌÔ’Kå+F£ŒqÑl¢¤”D¹ÔV9JvßÂYlìBŒš.<Ô¹ì”9–ȯ´>fâ¾Iz¢9´¢[¾ûæ¼_’Üg$„ò#6*ˆ…UJ˜Æ!ŒÊF6¯¿9œ¦ÓY>$Ô“©¤ŽOžÙO=JAÔÜŽEÂGmÚ”ÄV¹|Ækg&‘ø»½Céi­BªeÒE"ŽŒÏ(´+;.-þís8…÷^·eçtãHSfk(WÆÅˆBs5KÖ»¯¬µg©¥ëO^›Uù½nÖâ …IIGZ$ÏÄw:c…ø†Ï¯¸ œoúî JÙ ÔQ¥bá¦õ·²pìA‰·ª=!”†L"î몑9ü‚!KínoéqÈqIžôeï— ÈšKœ®j¯bîʇߢØÂäïR֜˻ý×bˆÅÜôAf˜åµû˜ê¬}¢g‰Í™cìjm8VBäõ'©0Í"½±.S A˜b»[­"öÐg÷š_•³étA\û Nÿ#ZÄ®jKCŒ®Rȇ×¾ÉA×Ì+ˆ¦Â{Iö™jkIj]ŽLˆèBkþé8Gd™‚¡*ÔïÇAЬìN’K-‚ A—›õ?Ê!D2ÐB4—9­]bo’µÆZá3˜·ù½%ôÌMͪ T A*Ó‘[ ¤`©ÁØ §o—=òê)ÑÒ½ò}êB¹=9ãuD#I¼VÌ? W/³¶ÆtÌ×Ö¥|Æ Pª6Ríµï2·%9¼Ó \’R0èOq³o.¡:H#H¤´šNÌíý1É•)‚U+K-—˜Æ"ß" f²uR5¬N枟q•dÖÓk‹säiQxKŒ¸[Òr¥®­^)vP…V±‚ùˆ9q2¥I›­¢)3¥:í•„ù%©vœp‡%di|Gñ˜Èkkn߬E;ì]&RžYº¥‰øG¸Êr¦º”‚ñeoãC±ÕR}¶<]ñN™¾f·¨AIÝÎAsÜB.ˆE2"Œµ+é%4šŸ‰Ê®Ø£ü% J¹¼*±ÿ·MqA”¢…²þsyðQ"VL6SìC¡>‹”µ.©«T.ç†7÷X´j:œªÄÛ³™0ÙýA*¨dËäTNü™s”\!’²ï4¬µV#öR~+¶¥ˆU6y 55]óª¨ù¡¾b"åuPdçöc9ÌrR„;nÌS—çÙ+JN1Þô*±/o·P™âñØÅ— T& ‚¼ŽaLœ"/qÊ „×K|ÚAíÿmÞ‰_ײñ~™}U§ŒY¦Ú-¢åÆ'äNÈÅs*î9¯>*ðÁFZÖÇW®tÎ:ŠÆófîØ( ÉgÿøÉ˜Ã•{NýcþÅ¿ußÇ_êWøKýÿN´Í!@ñqO³‰/Ò†fÚyIÚº¥[nPc!ºàÎÂÒº'ƒÇ£˜èO”ÉZb„äÁ& „=§½z²æÕZ›#¢¿^Ÿ;Q% §j‡Ü\ U¢Téb–ÖùVïÕÍ-.Uøž!Š“Êb–>½õžSͶä*±fASäòÐèÕo „{a»Q©~a®úy;&+뼇_;æbˆv ÞpzUˆû›©jQsl2`›œrªc–´æ-¼æ¿JÑ$Èggi"K”QBKÒÒCÃÐUr6æŒÑe¬ ¦a(0ìFÇF(ÉÝâKq”ÄË?z9 žb=2½w ¢i$;wŠB4W]"YéVqо«eîk♉²k2Ú4MéÙ^á‰×Š8©¶¤â2w+Æ!‹‡Ó•Ê+ÔItŽÂIJs ‰GBi²¨ìBWF›H0V´D—­óŠ’¿‹£SøÌoË«J¸£›Ù]"ªËC½•+2§­õž´?ˆ¼JíÆ4‚–BÑ5¾ØâȧKIÚŸE†14ÚQ•OÏÙJý‰Ì¬dÑ;xâ;)SŽS¹ïœÇ0ž1K{BTª¥î8¯iµ*«CÒ×QXÄ6¥î/âÄ wÖ¢ã…>! !¯ËKcúÑyYlÿah(ŒÒÑè'\:™tV|])?óeªÊôÚ?„[ÙpÝLZ‘TŽåúº%d1ʘBøˆ<”5šµšÆ¡H¥“-ê6V´uZ×Èì¡6‡ ô[uþÅMöÏ55е&6Wu뫊ÞAéGeÅï30„3U\ÔÙNB=HÇÂt´“ £3³£ S ›%t¨Át3è×+:ŠU'!Ê\"*»€¤`Ê<^jÎÄËŒ‹IZ ha!4¨ð CDpä1ëƒä™x5 ¨õ{‘Oˆ35r :ˆôP„TìDïÁPþ,n¡ ò¥¥©Ÿ3!ÇÁC¹ï©:Š21^A©Z8ÌŒ+œC0ÈX0@%Py2c›‚qR¨¾©Û ‘gW¨ /#†Ð7¶4 ‘ò ð"5@ßjåræÂ1@¤@¦‡,\UzÊ =+(%ÇîA Ca`†õH®A‚´2'BÑQ]’S ,B 9Œ42¼2†cµÁ‘’š˜p¤å'ÑwHŸ²;, íI#'0$BŽRÕ°©NªRÑÓl‡(b´…8RÌ™DŠ ”l•Â(‚ ‘Ó#¡`€ÏW¿+8øô Q6¦¨;˜z“Ó8È%M1ûÁbs ^qÜHD6aZ;Ç«ƒZe2š¡D± š–¸…G)™Èx¯“ò^Â* S!ˆç¤Æ–t (–Þ O!(HqȤ õŒSE„/Sâ2Q†‘ŸwÉB:QQ‚eQ(k‚‹µ‚ÑTRSÞ  XœÄºø4*ã’0©)E"iF#8g8¼‰Í¥j Ô0Š~ù£3ùƦ3=+a_â") ±˜h" gƒF Û GÈ(L1›qb.V‚‰ïÈo;¹d‘WÄâ ‘¡9»Ø"ì>™@G"$"µzr¿ƒ3 Û¿‚÷7ˆ$"ÑW ŠÄ0Ü–ÇåKöF†Ä  hò»|A¡)£1ÌX¶9™\Ø,ä(™ýX¸iXè¬ÅA7®"r GE3˜ÈÒ!É“F®ˆ­×2‰^6!ÜŽ)¢ŒÁŸ ¨£ ájA’ü£4 œ÷äO•àüE”°U¹K‡G""S¨ N4¬ªB!Q×çdä¢ JÔw¢`„!ÈæÜ3@C)°ùá‹ÑS°Ìn°U8„:>E1It !ªV`¹¢`‚ ½Qè«…+½Ç6êVAHõITŠ„ ÈCA„ËhA„!ˆÊP¨§6ÓŸ÷¿ÅÄ%…aiÇÁãA˜C£Šôz¢>66œäVLn3 f ~1ñ,A30ŒE˜…ôR‘À¤)_alÜ´ŒUÖ©DyYb9Öa™¼àÄ"IÀ…°ÝpôQýd5Np¼ÅÆtPráV„bÆÂ÷<‚5¤T' H†@†Ø‚ˆ´ÌÑvT”R¯^‘\ð[áþ(¦î ä+1C7tG1¨‚J%È Æhx£2P’“#êq‹$*¬T ¢g=j„,2ô­œ 0ˆ±ô @€ˆÁ‡š¤Úiˆ‚%bw墭¬—,:§“¹óÅ”Žj' HìÄ#6Ñãµ 1€ˆH8¡Üºˆ&¤“:0ZNí~ËC1s ó`£- `CŠáX©P¢£ Ûµêzlca)—r¨W).h¯z® 3¹ŒC’Ä霈¬#É3ˆøFi/„ˆÌ´Ÿ…£TŸké‡4g"ú§²@Á d"Ü~ŠjŸHQ¨JC†pªËJ”èÇQKáE'ç¤(ZçŒ(ŒûK°RdR$´`Ĉ|6`Ãa0µG0† ¨Ä(˜¼ýiLzÅRáH[”‡5C̺ }r FU lB|”ÁzC“9`ü·«µ=¢ÚŽ gPb!g¬Â»D0#,Ûüjyâj5?•þ—˜Ã0¡ uQ maPÃ-Ôõ’TÝm2!SQÄŠ›µiLÅ–7¬ÖËɿȕÂÉÚ„òÓÚ×/åê3j¢FDgÊè¤aN#޵°årYQ]^¦.%eâl„K¢Ð¬{ËLõ b0ìF5>½­ªe·6éSó^Ãä#ýÛÿcÒ—“6ÅûEMÒßëØ¢Ôüü–6ékÌȳ-·zNQ†9ؤ|QÎC>Ef¯ÇÄ#:lüŠ„ÊfZd³½˜¨ìí„9ªÄ#»»åJ E#Mj)W6r\V-éË¡<´lõZ_Ÿ°ê†s1ú–ݨ‹Ô|RBßF÷ÑYHSºœ›å•\¤,ìÇ^ÏÍwasëB¯’Óå)©Á‹ïY…tÌÞKnÛt†„F9Ó’Å AÌaŒª*™>A<„à°° Ÿÿ_ùÏó/ë 9/ÚzRr×_Ž/”@g¿’‡[Œ”¹èilÔdYÚDY›wk*9ìÍO!$R]):¼ÝV³ÿY>¬Dä²áÑÉ ² [žè¬UU{H¾*”S]ËÕ/5er;z/Sé¬zÔò5^žÏ\5‘Ie™H‚(§M3}™GqI)+ÈhSë?+sžz¥§ šM1xÄݚϫŽ"rP…F%¬Eºˆ·jÚ<˺üÏœ!›$y Ä7£JÚ0”By*üR2«Ó‰wǹlÏŒ&ñ>®§RØÿM!JGé„‘¬¬K9.K¯ël‚ú}Pf"#¾?Wg¡$ˆ$gò ['Èí+¬êC”K¹ª›ä#• \Ê]˜åöõ<ÄÅRÔÚMŽ!‹‹Þ^$ŽtºUŸ¶~”YJó(†¢å¤}C]0¢Àxäx$â*ˆœbô+S·õP‹sô+/Ã8`£jÐãä8&»Fz!Ð#‰Êâ=¦: ~7JBæ.cô Û)ˆ(!Ù°êa@ÜL‚™H¨ vmÃ4²œD¤ÞHMÛåçR2„X^rÝ„8›±Ã,Ek1„ñÒ¸…r*á¡‚´xÔ¦ýAÅ„ÎpØ•„h…–t‰©eCT!M2ØÕ ¢<ÐÓ²œ"ˆQ kÔ3¨a\0Q')È9Ã"À¦DF@Ó8ã«pAB`3ÒÝJpƒ²Ð*êqHP‡gœ“T*|͆Ê0èWAÐh &ûŠËQ0bÁÂQ¿‡%h¡ £Lâ ’­ãUdr‹Þƒóã`éFR‘å{…òì…•Lå”_&bsYI÷yˆÉ›GÇÝ_f•uJȼë9®´ÿË^=#OÉRí&BiʲB[݉Æ*¹øv¢u†•Fz8˜Zb²”ò[ì’öi„¹šèI‘ùõ Ú«1ÚQÄÒ=&޳`è~Ÿ„‡Û+ùÝÕ\à …¸Ù¹¥oobRT¶m£Žä%Œ²’ÍeBå=G ‚ ¶®aøIyØlAlìcT‰rÈqNC‹,Ï!oa¾"„CHqßb†_2ñ…Düüa«[ôš,àdÚ"(„21&Cûâæ­ïY|yÌâµ=Èä(íîLm©¢'™Øpœ¦[ÈCÚ¹ª%”"ÜoWäê¼~!#C«CÖ5² ©ÛD3b b 0‡VšîE›—æìoLU6‡­[ýZ±u‹èfl‘ Þ@‡@‹mòfP†ªNd6ˆÖ,äN'˜•ï´Ïº-\ª[L7<†uˆVº¾àëé¥Ré;3º´Ùm/'¢1!lþ'm%qFs€@0h–@!„¼@qz= —ùTÛ]ç+NÙ:Jyã¼…/—fý©D~9åKaØs8à†·hG@‹Qi§ÍBH]l^QkÏ5Çí©]±"“ùÒ‚0E¶ïgÁà™«(Ä©*x‹!Ç"Š_4œ¢n¢Ä¬ƒ¦œ«^Ïe‘Š[4ä‹‹JeñO¸g)ã álÌr2{a¢Û§xÄ„Gl³ŒfŠçñ¶z È%“ÊA<¼ñ÷æ½ä"é¯XµZòL&g¥TaT‰ä à`ܹæ/J´zd¾[îôŸ¿,X¥éº¸Õ¡z*Õä1M=K–-K(„¯8ëÎQ¨ŽbÏuÌ—¼¢Gn±›Šƒ®î*¹¤k¡ºñ“î$êÇÙ`º4ä-W[Ñ‘>²uÂ(†r@Ãภ1»€Î$Ú¢N&¬ý&È‚·gĠݢʔOÌTÚÈCDdŒ[8‚Š1ùtã)Ì«I*¤=× nÓ×+VÖ,²ÐB¦HK}¬QÇà ýt &ÚIÎ2Ù„(™¥ºŒtC3¬Ëóf éÄÊ”Mº/­„1•ýŸ©ŽKâ>äõ~^OlÕ©Ü…’%où† ²#”S+ó—É.uK›"tÑOV¥™F.“ض)çp%¤þž Š€ÑY×Fb%ŠDˆf  Ñ-"œ«¡pNVÚ—ÆÇÙå½(!*{—{ÙôBˆòƒ.^iWÖÌW:UÕ”¯Q¤ê¸µbýú‚gµ¦-ÕnÐ1Iîâ1£Ÿœ¿Ré¤BÓ+tÚhþFm¡UÊþµðÎ0—!F8¡ÆKÒ)‹Z”ß%+ã‰kßÇÕJOšûµ-ÜØ;x¤s‚5Œ¢±Å&ùF1ÔV“ZvíÙ‚ìJÊ^SÊ&äxÐJœ:®È°µ¤)Ž4$•0ý,Ï·,„«7&ÙÎ;±GG)òÒKëÕˆxÍe°äÄÖìü_.é+¤¬ÃH/TþJ°; ÞƒZl˜Æ*ß~e"GÅ™j­Íˆ% ÌJ–˘åÊ[Æœ¯†m,›zL+)|§ãGbR#%Üâ5À1Å‰àŽ¿!ˆ=OY­r$Øè7’<< â4Š@²ÑLö†AÌjIGÜQSøbùøTö(`´6="]éwŽªôKûc§ˆƒ (ÜCòî¿9ÈT[61³§Ø“]-'9$×Y!#¥ #©/raï`Íý0âaË“ú7K5 kÊîÒÔØ&³EµÇ¹÷˜–B³ˆP«"HD ’­Ü¡žd± ^vk¬Å›©ß;ºyF–“Á"ì8¥ÿ»ÿÌR†ÌÐ’ÐÍ_³¾ysÅí$Rœ"—H#¯ˆ½ÄœšÝ”‘ïwbæFZÊã¢*’M'QOQo¸Ÿ‰†ËCsÃ`ZIàÀ%Ê•ÔÓ80Â1$!qSâ]ù[ ÔF-7ÔåÉŠ{Z·›îSÕxâºÌBqd úaŽ( h§ .q…½ÄñèbïáeácÀ»ZC -ð*Y“)Ö_É9·äo" 9PÜçÁú9š1~·Bmª‘% PE¦µVLu°æ¹ˆŒE. ¸“F 50ÍHç’®R'ÅM¥² W¦8ŒRTb}/"W²"ÉG±÷$0ÝzÉOÄï±®5YŒGT™…:HŽf8¢Œò9\ß:ü½—·üÈ1}-=%5ªÅ—KVH® paC^$ç>õNM"oOš*&DvF•h)ª]C•—u ºJPÕ_3˜s“‘Íî­L®ª ¶A ÍaÊTʇ¤üè0Ây³¤5Êæ8`cÍ _b-lè¾$£~œOWNõ¡°lè•­GÛ]$EEo1ÊL qƒç‡UðŽñ:ÉÃaR•¿RibÿœÊZá%¢`èÄb´¦¯*»ä©!–d-VÒô¸Ô¡ÏcõMsbQòF *•Œ`˜4A HÅÁ}枀›üg…ÒF¿rZ¸ù0D”`à)x<‡;Ø}OÿøÉ¨Ã–“N h à ] $𜈳’}ÏŸ÷‚óÀØú8†q”òµR™Ç @»ÿQw¿Ÿ2DZ:‘Ø"+8¢2F)‚œQ×êS¿Jz%²ßl“w–#PJÉG¬Âx‹«$¨µ!œR¤¨†W¸Q½Pv ª1–ËæL“ Ò=¶«G¢ö’»˜žÁ$ QJ$Kˆd¶ ~l+>Ú¹vrB/Þ·ž¢%?[…)Èâ0ñðqXÿe /Õ± 3Z!<ƒÖal,úM!k·Á©ÛËñ›SçsŒ)‚„{!žÇ0‹n9pø&ÒØÞ2fK¥í¦­ƒMì+9Æ1Bˆ8Lj©uÌ\(kª\³NKÊÎÛƒq#<…KÚ«Rs\¨ú†T»PFÌ®•²‚òß‚ù7 Œ_E©8Rûu)t¨kIÆ 1F’óŒ'ͧ ·ÉÓ.Šm$¦mÕ±»ÿ?8ü^¯~™µ”³­lâ©5¤J è00áDnÓª7”6"_Tы˰Z9’ø¶'¹†b°Ä>›9,ýfÐèÅicšeóË[¡ÕaGÀ×RùhrUjF r’º¤Öz­ 2Éj½m[e«I2à‘7E@o,‡ùØn a £EÏ?Œñ¯yÉ\åY^׺`5¸ú5YD±K3aÔÄŠâˆت@…YyŠ˜‰5¬5BàˆRZBS$Зß3BvÌèã5Ä"IhÌüTjè¤ÔÅ4‹+sžÄ•7^†n"•JzÑSõ–T]0Ž„ÉZÁi¼E¯¼7œœFi8¯#ìu)³«íz’ªädpż³ û1×RUôÅ|"±_/~ýû3Ó GWvdn{‹ªañˆb¡ Á"ßTÒ³ÌJé7¤¢ÿ¢fÂu§¼J™ÈkH#a(Ž¢ªž¿Ò±}:1Nıžrc´Ö32S»jk‰E+ÊlæSœA!=qßÕl§zµM¢p´¢‚ZÈ[~!d¾‘ëzÍrˆ ¥xS¼ç€Fš ¢™¢ã”I-!º¥#LJ\\ÞÜìÕ¯‰ëOWR¢o±ÔG¬’”aC†~%WÜnï¿ ² 1(™»_RZ^ ƒCét8ÄrÕ:gB\×CÙéEÊŠVÛl¤ë%E][’‚'O n.T¨Ùå#mSšÎò¶Ð/ÕäV¡;µtGK£Ròa°Ëdy !J Á¥$Ì.Im%Pòˆ½DáÏ"Ô®¬–ŸÌlruF«6pG°›”»N·t‚=b  à*´ÔÄõ^4ÙÔÒTØ»âEÌH^‰t—t¯2Ðd­¨4­šÎ¦O8“)‡d8$†8¹‰ª“QQ)j¶DÀ¤ŠË(„*ÚVU°®Y„ÒÉäiìYŒ¹Fªzv›¶4¸N,´%†X‹ç…Pypi¡!0ÄâåSŽPï8à MLM©å~a•µÝÅk½¶ŸµÄ§„àÒ_ͺµ»êµÈ’»ž1#$ qæ´B¬‘S†ë¦Ì™,¦Ç5-5{(>Rív «‘bŽõQW²Põv»”«Í¿<•ÐöãXN2ðUè©3+Üã8³‰w}iìR¥*rÈ òÉ3>·:}²[û3¿02Ê!@ áF%²¤U§Ûdñ OCÖ"‡,§Ò ãbÓKô-4m~Ų¶*]|ŒæGV”Ìrq¬B 9—‡º3÷ÜÅïû/ÄøÛñ‹E!‚½j¼µÿÊL•jȳ¨j2¹¨Åd×}zWòˆbÜõuŠ[©‚;÷–d™6gBw'ß0•J÷xëRTCâ $/BËg”Ä™Œ ‰yžŽ+kžÎ§/!ÕªBu,Ú™Lù|~Ÿ¢HØÇ䳚êã&ê¡1&A4@ã5ˆKÿN%]ç?Ô[ÛNÚ¤]}˜IB He)Qšœë*iK­ÖHŠFrlY°S øù´'LYŒÔÒêΠAвâ˜âÙˆÄR§ë!…Ç–êâj¸ µ:Ä’7°L)>b0¡ 0J„© ¦Þyÿéb“Äfë T·¦]¦-oa0¸Y›B„ŠË1 QZŠ¥#ÌÎán" M¡‹!|ÃJhë”|°üãl´´4¶˜bñzÁ†Þªg.eh®ds¼ˆ|v²/ŠÏÏÍ„ývölåÁRtùTvE%Ej‰s\AªŸ«\bÈXó”dA(Þ5¾,yŠ]BµFA„)C¡ßMI’®$«çM2ä‡ÚÊz½mþ…’N1ñâ”i‹#ÖM÷N  ¡«;¸J©Ÿ²)(«C’\o$´oѸvu«ˆ"ØÌëB–…q*IÊå+2ï¨ôš‘Âßlïù2nª™®…:ErIiE+oÂ2zHNªšrYSÑ|d͉qâõ°ü#ê‡ÀÄ•©â=Sú½W©ÔdõR…)ÝþÕØIƒÐÛ™þ=þZþÕH?™OÊÏæ>І² [¥c½òšòlY)^' ¿þßCåE»î=F.¾bU9=ãÂ8¤Iu0™SHìu­%ß\}YŽw,‰ÊŒ\“ìZ9 ä¥ÈVE’rJ‚••Y=$~9ê0Â1hÚÌiEä÷JÿKÒÔÛõ¾¸ï”¯TùOïäå\%®$eÁÒT¤Édd˜ÊQPPÆ£,ŒŒÎE¸1ýMj_&zñ !3-Ž[¦gÉ!¹j¡\¬Öj3x™ÔR„Lm³lÃæi7´sY 磦ðœB›6K¦a%i®š} Ô7Ž×vÕ2&eÜ‹&nŽ^N‘lO#ãVRñÄ¢SØ+J7†ÿc>%W‡D¤µ×0•šÎc™][B%I•Ç Ô·!TÇæ5Pêd$ÅÓRY/‰²7"þfê鯽Å)Bä0Rx¿rÇJ ¶L–„.®{øL²s9 ÿùÕ³¬HQŹEWúù7‹ f9k¨!‘:½_|”I—NUÔBÌÍCÅRºÔ—N"Ø„%X—bIÓf´’m¿øÜˆ,†µ·]·$K%VR™*æ¼CŒ8Ê ¤ºÄ9 +«ºâ·Z-r³ þ^(صâr®-Or P¢Õ '㜇qVîH¬”zL¬I®QÌ’ 'ÛCiñ™(®K_TGXµû­]W˜øøs#<ˆ÷9jRJŸ®:Q¦¡·îD+)ýU‘Ñúâõy{ã«É/Yä^Î/j鲨S辚(£²Šk ¥xª0©R)…Èç …ÎÉ‘U*'-ý­5áµY |kLÒT˜ŸÚ0ÈåËÇ· í†Ì¬«qãþL0”=HKØ›_æ0÷¥EJ¿Å9êNtâfö¡7ÄÔ£i±ØÎêV)bLqžåT¹jQ"³= s‡¾õ¼]¦ i4_ಱõâSôÔ0éã´EcŒáj8A ‚°Ë‚°Go˹ò¬CG½þ‹žY¨Mú} VüŒó½Š•3Òº‘Šû’*w,…3ZÈb0ï'¾H¾-S|]+hO4…A°ú8{¤”{Z‹E¥VdDl¢ÐÄ3šXŠ)Šë!œKS…DqõÛÉc~‰uCákÙŽI§ö±‡¡ä˜–-5 Òµ ärÕ0t‘Æ0R•¦ 8£‹ÄWV¢5”eš¶Å7Ë÷l÷¥g¦]µŠrÂ>ªÈËUfˆb—ã=W3ˆZ š]\+n›É‰¶jßÂW=ôw8«Qg.ŸFnº4©]D¡4J-yÄtUö1ƒFnS\ïºÔ¯Ù„ý¯ýºª%­| O¥IŠÝД|,ñÚ!“(Ê(ì98¡W”Á\k Zo©æ~¢–¥;¯ë­ÔL!Z_¹nhŽª¤cÓò:»Ñ›ˆ)¸ÒÓ¬(†(E®mlG¢éˆÓaø—/˜Cïüí§žê ‚ZÜéj®¡tŒœc)$ÔiR) FY²¯#òlžè£âg¦—éZ#¾RZ9xÕé7½ÏA &ÓüLÊ Q!ÄræwXT¹iîp„gáËWv`,š*´óTUȘծʪ,N©‡§Ìâê¶n‡]¤qv¥«qÖVºL1ÿ‹œ\ÕkÏå0¦ÂQýPíè<È/ú@‰í#®ZæÏ£NÌ|Ö²)OCœ¡¤i~_œ"ˆ'6]úB¾¸²þH²Kvøòyg&î¤z_$ø¢­2ÂL cº{†I ‚t€C>"¾²/RœÑ«7i<×ry­D¦ÂÑÕ…*‘Zª•qÖåêz©T”rU}Œ+mVµG©T?¶ò2¦¤¯/—²Nmy›>kå$±'Jù)W9šÆ#Ž'3w²)DrÆGÏÿBTY?ŒÄ'yï>î®<«žøU«äH¡K§•£Œ8RµE1O ¡ ZÈBºÒå›/Ì–E$™ÿ[Qý‹¤†ÊÃåB–ɶ*ØK¨¦Q ÜÌ"dmùUݹŸŸ=zÁ tg0·þZ?‘êÙʼÔÌc‘}Ù¯·Hí³«ØœC R: l-Z“–¡©Ó÷®¯¡Æš5eLÌ¡-<ÔSî\Bæa èp!ÇŽ9Ä!øC…\©Îœ”3 òš}Õw˧´¿Ü\ZbÒÄÛ©%j3m(Î2ÌdѾŠõ"…:ÔÏ!6„÷VæËpW ü¯@•2ÏóR³=ÕÂ?½ö¢yèØ•Egk¿yDfMˆ^uY ‰Ù[C¤ÌrÏ߉žIúš®¿\ÐMœµÚ›½Ûµö9óLS „Ž$Î*Œu‚³ÁXuŠSNª „ѱièWÔÃSí|©¥|©2Õǵ•³È®:ˆôÊIÎþwaŽ‘‰å5›<¼j Ó«ÂW"ñ‡e\\F¿þº YPžFòã¶™ªÎꊄ²l‹Œª¤ObԮ˩唆Võõõ#)h'uv¢E]±ljVŸ´õ×û~+égÖ[ŠôF‘ö2ˆƒ­dUK›ܴ#U‹ƒðòxƒa¡9ñçF«I•Û&=¨©…qXåKãåL ®j²{-TÉ#Õ0Ú¶²ï—ë.µ×Õ-¥Ý B–+˜Aho¥ "{+½×˜‰ŸLÚã9ž9±v³¹œ™K%dd±jØL8˜a%¹ó©BeÒÒÒÑõ›ž·?m9fc˜V”D±Vd•;pV)GºíÂd­„öåû‹GÿÚaIE{u{¾Dщ„¥8‰ÄËW¨ëAÉÖO!\ú/3ÅFQ~÷ñ®Ä«ÉJŸ¨¶)=7(ÛÈÊâ-HRHÝ»‡VwIÚB­Däj1]ÙØÈÌnÒHú!*²›t½(¶Jç&X’ÔÖ6¤¶íu]ÃÍÕêPæ!QÑg" T;UÄhCœR%ˆiœ* —Ïý&îjè­F¤Ii/£±—MÝŽˆ)")#ÈRѨõ!ŽÌص_¡ ¨5†²)gûR¤;-òl'èâ(‹„ˆy™Ñ–êY™hNî5,Èé•j_÷œCumP¿ìã9_š‹E»åTø´»JFÇ/Zzû“§Ó_×zAVvè¢+ÜWÌ`Á–U&“Ò!¦+DÂj rþSó$¸²~L7cšCÒœ÷ Â;"¸GèCz £ˆOwÞí­q¤¬›ÚKš+“Úkª¿"PŠK®V„¢òj˜ŒTëUSÊëˆÔk£ˆùf­X²ŒÜrk–ºÖG¥šBfW–¦¶ÙV·©’RQNòœT(bX"©ÔÁ£d‡AeFî-IÕê¸Ôé)¹€eÿøÉˆÃ—×NôÄôAôô"ô]ô¢ôÝõ³’ó×´tˆ¥üx†l8Å$U… ”gÞw)ò”&'kÕµUÂsY©h“~…$ QÛf)–/’Ưëòd±lí©åKI—¹œTVçåÉÑRR¯¨‰9bhˆ†öë‰k×Ú¦¡WÒ3/›Î|%í=-Ž&4V«¦;œBºƒ~ñ'AŠÌ›eÈ*V•ì.ž+J–kBÍî+ØÂ!øâ*ƒ€ê /Ç))—¯šÔ"UöoúVøìýZ¸­ç(Sˆ‡U6ªµ™Úì†f3S3ïþĬ%Ä"þ ªœ¶T1¢‚«,!Žb J5I‹ÅSôŸüùªô)>‚R=0´4žÙVqŒ0B…b®eŠ „Ì©ŒB­BŠnßÚÏA­’æm ¥µË—j Æ!‘LAŒâ”Aórf)ŸðÜK!Õ.r"Ý"Æ›¢Úú+nØaÜ`­Çaˆß»}1¬¤J](´÷ºšû-™lˆötBPµjB²¸RiJ¶S]n/Êšjít˜–CQˆÌ˜µ§EÛëyð(­ G1T檟%T1ÙÙ™»ÎÕýå¾Õë´é"[ƒTìù†.ÕÒÉb0b’`2¿I)iJãêeJ£Ï„%«ÑHìÞC”ŽEÓ ¢âp„Q võ"Š7ð™ 4’7îÎ ^#=ÈMR„R!“ø:&ò„Umedú5&“ª¾Üïß—û_QóQ?2ãŠa#¢ºa}–¸k.9Eb>²©¯&‹bÉJÛ‹«‰6¢ÑÒ®QÊf»#Dg¡…+MV(æâ×:ÖjU¨Ô#6ë/ÍÒË~-ÍÌ àÊ+«ŒeãRß|¢óqäj\˜ý! ³^„[ˆžZs)S©WÈåR£1K¨•bö¼å/.³±T†ëò}¯„/íg‘ÌDî²”—ëJÃQQ8‹Ôj&;Ó%©h´ÆŸ/Y'ˆ£žµAZH†+!Wßxa‘$´q{YÄL“„-R†6•%Ëí7•S–S¸¢•D%Þ¹¤ˆbˆ1Õ—Ó™”Æ–´ž{è¬.Ф50C¯.飕Ìc©@ï:˜ïStª:/jñëçìl »ÒËjãQK9Èa”RªÇR }|#º'TÖÂ"tdÉmÛysµ¾õïd:®Q̤pŰg•Èé¼…suKˆ|µZ£’Í„“%µ¿”ZPSµŠ ÉÄR/æ/®Ž—*—QÉ‹Q¦+KÙ‚Ïc“Rþ®S+ÕNR+¢¹ˆfV:=óè¼dã_ßüZ³UÒâèèU5›ô\DkUiòR"6d ¨Þ™¶B2>}%×VÒoW*-&Áƒ)¯”tÝ3‘0†Ú¥PëJ0fT­W0ýd•«RLõÍ¥ ™šbe,ŒüèSU”G–½e»±Š1†B¡Ôì¼¶¬“[Xï†ä®,†\¢4¯®QÒΜ‚0ˆVj¯‘¥}8ÿ’{›v´QðOÍ65‹¯#(DÖj›N3„÷J¨‡gTuAUu>¿H•ÆÏÁ©öúb¯´…s1Ä9]Ÿ™ )‡bZ¥ OH%ƒSuÒeñKOz‰kOɹ|p@Ë£l¥:u|ŸRn-†%È`CY½1QÆ›rØ/”¼f©¾ É2ä„‘ "Ï™èµÍ²ñ aU8\l-Z|¸ATÈŒ²;ÔCÑèô©*Æ•¤ÓÈÍ+)\꫸#´¤Æ!¿ÿOä©¥Ì/õEy$c{Žö.bˆ¼ P¢¾b¥¢n–¥£¡Éë™öÛϧL¶§–¾ë;î5”Ô-.¸:G`ƒ„\" é-«6Ó5µ©´¡TÄ%—Hõ9¬Œ£ÔÜ"JcÈL;šgÂv÷ÓÜ­E5òm_˜™'ûiÓ.NJ4ŒCº¢Ðæ3ÊÏTS®'&\'[:•Ö]ókW°ƒ˜Ÿ½cˆÓ& šÕ£”ª(É© c·vb?v‘ZŒ} Ø%5>ù‘ ƒŽ…­ë=—ÞAÒC…:½&îSéØN®Ö¬tR’†,‚<å˱Î{<‰fê­jIYÄ,®Å ÃgÚŠÖ5^Š$”lã.á4@rgNÏ ¦'‚øB¡‹]ÌÀ±a9Ý\tå‘ æ4S JlK„ÔtMÎ$b%ò#(‚ó‚Åø¥! G)’PŽ0·:† ˆÀ†Á©ðD@î-/Q ³£ÓÙ2“‚#µ0ÑÕÏ Ä‰ƒi\jýxSÀC: ÅÅSeAHÂâЈ @¤°;@A;›ˆ‡âPAªSЗáHÂ’‚9¨²x²‚0å(€Ñ¹+.Jd M̈^¦\<‡ Ù›ÀæÞåRQ±œÔmž*¿T” ”j@aŒ !*:”/"¨®Ý²ƒ&£­HÈ" vØìð@RaÓáŸ(ns4È+]õ‡cé-Æhš ÐBçÊ1؈îµ…]ÌTTí#cîeïæu¦ÿöà«ÂUGDý3P£ÎNs"f¥Û…lü)H\ª–˜ûûJŸ9qzEvÍr¶7¥—tm÷ÁtÉ—sžÜÚËWýrHþM²W“ÕÍè6U$"…AVÓ Ïô=Ônå£UŒ†ÚsQuVn8d6µž†ºêⳘ‰e¨ïÄQÚÆB'b'¹ô%iR0ž±Œåj™P­ºJ–¤%Y ŠˆO+Ðä2?£WDÚâî÷Ù«#2“¹Ÿ¹4…YÂ:¨TÂòH•Íï4×Â3[a©öã×¹W)D,òY(šb9gJ{¥Æ3ßm¢r&ÌòZÛA Ió ^"Ž«µEöñªH¦cT¢cŠÑ„ÒlÎ³Ï ¤À‚šP€‹ñgnPè‡Æ#VGÌÚ&¡Ðšíseú¿V5RÏZ˜ˆË1:ëÞõB{ªÕ²—ûhÐ%|B"J (©Mu>¼ñcÂǦƒªª3”¨¬•T¶Ò§ìµjtŒttÑLÆg8¨dQ—5ä*VF’´+Qè%1`àpÅšøN¦ßaàh‘ÀW )\pˆ] ê³ÔøWD¥4´°C j©ZE™ð#1$±(CñiõµITÆ8Å;–ÍKg’𛛆£õ(GÄê/Ž:˜€„ÀP1$¼À*¸¿%fžx±- (r·–Æ!+1ÌjÛ4 ‡ÔEUÊŠ0ýAB©èç…€ý@Ã#T1Æë™"-CWOèPg¿H†ÎL‰eÐÕÈxo@¬$H@DqÄ6y'à¶Ê ó`‚;#Œ:3zˆÆ«ËE\²!k¯=6¥ò äïÎè{õyûœþSmÔÿõËBÏ™ŒŒýø}ýPgnâ:Dr-›ÈÈqÊ׿JR¬ˆîMžšÍNò‘)ô°¾/_dc¥|’–™V"aÖVoúra‘õ_Û›5^‡*w±3S®rÄÃC’Î[9r¨‘“‰ÿLk⑬$kÞõ>zçq3µDRpÆ3s„R”ÉVf ۔ÉZ«z6nö%K¥¦.¹†²·L#™û“ªèWY—YNt£Ú9ñÕu­©Ÿ¼ªcü™™§õÄ&jÒ!pÙsÈ¥0©Ba—]­~ÂÌ\7/}*1 "2ø˜SUV¯ÌUt˜^z‹U\Ô.ð_óÖEÊâ)XšlçäÙÂ5žÆÌ==LË ƒ3ÔlÓ´¶1%üÓf¶=Q¥äZ1ÙŒŠFªEW#D§0ÐÚü"¹™÷+/lIȯ”Íoç¢^”LÆðëZ߸‡ÉÈJ…wõß(»tÌÕO ºÉîä* ÙÌþêï‰;ÔªDDûßKÛF¥ Y$®¼ËTâ0ܽdÑÊp†8ìT>kNîqær}õwkü¥í줞{r™1l'>Z‰ B“ˆK(®ŠRF!ZEË ä‘I™néqÈÂ"~INÖ¡·‘df-—Jž¾›Îµ#æ²: Z–Tq°o˜ö³¾L €„!7ä(E6a¬Ì)ˆÃ¢n­F¢÷rPµØÓePÄ&ö¥Å—0Ž!Þ©aÌãªçik£(¡JRÉRí^ßDŒµ­ï›BÛ³B›[éU*iH"zöTC²ùN0¥näáÊìôúå¿yyyº”É,ÄlšÿÜ®ê”r˜K},1JÍJ$È?S\ƒ©:•Õ&µ8Š’?£›—n¦9§êµòÕB¥gê9Ÿü—–צݽQ žO®U9¨ó0Å* £ŸÅã ÌDÙÍ6’ë\îÔÓÍLþIÔó–«M>«E)ÊB­–TÛ©E{"ë s52ókŸÜ"Å$¹u OÔG¦j¸UUú–…t²†Tµw ‡-¨Tr÷xq7WdbâÒTœŠ…O ²TÒ¬ÞËVwU)T—éeÏ®_FGDµöätÃ}*Ç]L0¢…mZÐÈ(ŠYC2xÕÚ„ªîÕ}†§ÛûIž’˜•x—ær ¢”ARQ}¹…ŠT™(3•™S7òµÅ¡”'Ñ= •¥£_¶k›S•§]®ÉªcÌD ªíV×R f–­%Ÿ¬Ú&gQiµ®é[4üÞ†A~Ÿ¾¢ g;i–ÒµLó®a^ÊÓšßjálBa„Ì­ú[HqR%îYTâa„ `d0›‰ ‚ßN˜9ÂŽ{ HSUT”2Ì40 Ä @„3ˆ9‰[äYù 8C ,+¬ËzˆFØNlèÙ€Á€Á ÖYÄ`ŒÍHª!PW¢[ø…Bµ8WˆÚ ^ô÷“Üoí‘DRê7È´Ê._ГŠ,2«5„ìŽ"° ¥\"!"F1ÍrÇ@wäÄJgb#bax! Däq ˆ‰DfQ'«õx6(h£¿PåeEd'#ŠRfF¶®4ø21˜L%¿“””¹b´)¬%¥Cì 3è¬GpF@d–BCL؄ɊˆsÙE„“(¼qÄã Æ?`\QÂTC Y¸™Áz¹™C w=/T”ÞåZFH ¹¨A!c/ 7 '-ŒÆ¤pU ¯K?ãoaØ¢ˆE4‚c4mL! ™†_ÃÖ/QT‚ÄvbÒYˆ¿È0 †gÌPB‚‚ãix#(C©B¸ÁPÄRaÛ‹Ewä¹›2® ¦jfQ”A¥0;GéÐÄ(J¹!4Æ‘ð¦Dø€âR‚“ XQĪÁ:‰+‚…àꆂK9r q’™£&%ˆ™‰˜(@D @„R+'¦Gø…©”rUŠÐ-Î)‡ËðË`Àqå„ãql¹ápF²9>K_³Àc¤=cð…üH¤1ܨ” G]ì4ŠH'8¿ ª \¬’Êož+j ha5ÅÃ0a„,¨cÖê0aåµ¹"œÓÿxBÓ݈-bÐa@0Ha,´!¶3’fŠ7¨îçZ”ØûŠ®a]Ë\ÔÈaYj&†£ ÌÜhÁ™¡¡R¥†;œõJœ$|ŠL Ø¡E¨d1Èj#1N‚¡,o¸"h+‡‡ FJªRî@Ô"™]Æ®†„â˜xBá 5Ϊ¯¿"ƒ(Kð¥]œ`ŠO¶Äf᯹‚Z´Hë”ä"¸bò³ïÝΦ¨°rºŠ0ŒJøÏJ `ÂN­ l j)ÇÁèßÐkh£y „j`£1f‚Ѿ4@Í6Df”%T£Ç@‚É“FƒÁ%†»5‚VpŒoWŽùÈœ%pœþ OE6&®:ÄNB„Ãi€J ’’àH2‘Ò¥ø;²+ ]âx)ÆTTqö9 ¸Ðf¢x¹’D œô@ÔB5OÑyÍï3ðPBàNˆiŽbWÜ1Ì£#\I™L”¨† †+žÖfCÄr³ÈLl.9‹Ù¤‰ÎTË@Aé—ÓÿÞŠ‚:q‡Ó#tlÍŒ:SC ÉQ¹/ަ¨­yĈâ¡ÝæÉæùøîœŒ *;Ç]Ô@—ú+_ÂT@÷ ‹¤£Hc»ª¶`EƉA$¸°m1 9Èøq æJšòׇ²ãwä4RWB¶ÌôÑ¡)MˆgƒêTÆMDD¸!FÑ¡™I‘™F»l¿ÿøÉ˜Ã˜XNÿ’È?åŸõ?ýˆ’ƒ´ ô²"Ð9îxbWé†D“àÿq_S|^Ÿ9ˆÂm¨ñé©àË*Ync ÌA3ñÓ©Š(@»¤Ô¨â‘ÄTÏ–Aˆ†‘OâBnÄ8GÆ:…¤AŠhètЈeb3º/›ðŠC8Nc„­ŒÎc£ºî8e´'®’‚ i¤Uf@!!99¨‘:)ļH2Ô´xEŠŽl#:a[ç8ÑDBÁ ÞËYƒ)‰ÌA’§…p™‘ú äƒa ²!è…‡`£Qâ¦æP1Pž©Fàò¿Ï‘¸Å÷=ØcˆAÙ¡‚|hÙ”1”hѱÇ1Å҅ʨ9³K£0(B +#„IjÎaHz!PÂD:qTæY¨¢(paa‘;t NDz 8˜âFbC•e{»iYºTE,ä)…0æè8fpFƒ+qbb°#k×uF\#›~Çè¸×£)j»TȤ+\1-Äq›˜ZR]¢7ÑÝ„™aW‰˜ÊQOÛ¹€ „T Åøí…Œ‚/„‡0q ‘9x¤¥“H)Žu  ôbcJGÔN!Ô匔ÛAĬ‚¬ßlÔ ®# dr (Ä(HEp…ÃõÝÌøj@ ½Ç8ÇBfÃЪ˜O’:ÂFˆ4ˆÆ‚T8¨¬z[!ü¬A¨ØCI‡ƒ$@«tã™÷V DÛ#Œ¢þm1ÕEí…ƒpZú°`GQiâ„:㹆Pˆ`Fá&KSø®[”R5}pÅqm-•¶´ÓÊDxáIƒéKgk)|¨š-)Ö®«½{a…/*z‰¼õÿºùGwíRQÄ™³a^§o%ªíH¥¡žJ)uÕN_£U¼Qq„d!/jhÊ*9U8rÕQÕ½êTt&Q7kŽ5ÒŸ.ÑI#b,œÉÛè _K[¥_ ìý³ØºÂ‹k™\] ÷Јe¨ã0‡Ï)IDDEÆÃ¥”K ™ŽR ÜsdÓÜÒ-¦¦¾) ŠˆY*k!R¸¼¢F˜Ìzfxâ]½OF~ŒÊ“¬£¼ªFeV>–žmNº¥ùH…Z¨¤=ø›”Êl¿6.ÐÅ)³ÒQƉØüŸ¶Q®~êJ£Š¥7çDjiȉ6õšŽÞÒQx^uC26{˜FäªòQ½ù¼íbœœi`Múç,íÜÜ%{tFqw6ÄRõIfÓP$¥(–#¬h­¿Â8|œ‡fÌJheg) Çr»˜y?޵,_v!ÉDVú9JZ:½oÕF¶È/F¹öaÄÇ×-{Ç6©“É­Õ’Å·)Mû…>g•µ½ÐâZO\혂ÞP¨¿ÊG:“–AR‰ó—-œ©„;Ko&pZ¸»õÊ“6VG¥=þb™ËS FŠ‚3…’¢D%h/¹‘bõ—N„Ø£3Q‡^1 ¨YÞ¹™rmQâ³$­LÆ}ÞÞ>}TúC’½"ðÕ„…^±dפÔI°¨ÖL{pÃ+¥²ê.:ì]÷4ÜÑßÜÿ+æE«;v UÓüî—]1©:ŠØÓC˜ÍNüDRIzk‡ÔD·‹L«•^˜¼¶˜M¨Ä؋‹3Õ©QH¨Fªewu„z§Ĩ¯µ”¦­ BfÔÒ°…•?$¢v’2²`ÉInGrê””ø‚½)1ŸK÷4Ù®‚}™8B-"»™´W .5yºt—P²êy¨p«mˆQ<ÍDÑÎÈ‘ "¶°µGVÕ!|ˆZl¥® ẫÉæ}wrÈë³üËÉùcdüR³{ûRÉ%ÐDŠ@‹feùWxuGiøJ'>=H†åjRë©&ÕêEAèK“íA–¨åq 2¥¬*Ko%±µÅÚ1 £*`Ša;qbPœYú¥[ÙÇO`…&pæ>Î#æÉÑQõM ÌÒlô+UÙ©a„k[ÏO[ ñ=^Iº+„,‚³ÍI’Ï̆’Ÿµʘ)Ró"ïÝQÌÂ2)Rˆˆ¼ÉGMâ3oþ§ò®“žÄÓÒö6?¹ ¶1Ôs>Õ ²Ùl_!Þ„Ñ’Êj 63'&#Xâ.%‘õD§ùå¾¹ ¨B僩šZ#ÕÝ;nª™0Q6B†t½%1鎾øŠ×éjKÕÒé5B—݈Z; >uY¬UmqÑ<åk‘ôjRSi17+ QŠh¥D³ó79ÔäÄ’«ôOÊÔ¨¨JÒÛüF5r½¶˜Z»]œÆÂ!G)Zˆ\úÒÈœ4†Lª]Z§!m{ð’~bã­±P¨B\„C;YîeŒ©Ì!ݬ%YFÚg2‰^Š/n›&?O†»âaxã¤";l†÷I³—,Ldsk™MerQá T‰œ†3;'˜Ó1•«ü¼ˆºþI+çÞÔë9‘Šú;ê{y&3<¶W¡ŽCùT‰¸m·nfÎ÷+û9Dºê7emM¥Qñ¦c•Ífc„öò°ÇYV2•,qNJmeE®“Ò¦.)ô«•›K\Í›æ« é#ûtÔ‡•âÜE¨T‘‹úK)dn‘ìr9ÄäÜb?74ëuûØOBñq9ˆýÕ¯1l.®ÿH]W¡s ƒˆŸ² e ÅC:²Ú‚já•S-¢j»Ý•ðµ¶ëëпÆ,…ª‚*{8¦æOaÊ”TDdòþc$¯ÙÊšïømXº&vßMƦ’»È7¨M5?Ü횥Цz¹¬Z*ÓD)“)b èÂ>é¥=l%©&¼ÑS ÖÜ-EÉ)ùêíE»È…3èãúX‚„EÅ«vz™vª’· ÎK§*_rI2Z«òd·-ЄÒÒBÙìtý}8Wˆê1EÍ+EÚ„”YÛiøìCõª^#ÖÕí1ˆBé ­‚ïRDÆóYˆçl).gtê\J±™™Ëžïb ÇAÓS4ÇÕ¬–¨Ù×n:£V†›S×+ªäôÄLVf½^Yœ ÄQZëgçíTÒ7ª¢6¹È~aªzÖ$¸ÕU'RþÒ'µL¤# Á+jz‡ªR¯™ù•k+\Ù|Å®¡)´ü®e‘ÆI›DO±»W¾”T•Y—ŽbÕDâ2 æYIdN¢‘&$í“ÊK§Y–ÓÖ˜ü‹Q}ú·Ðo= YV¾¦#œ®wI‰NþKþïÿ‰ÿäÿÕÿKþ[ý;³’í¬¤W@ôØíøøuÅVh¤qÐTÙMVHìž&WõBY­¹X4.J"DðçZ #PŠBÞKd4üp‚Ëd²£©LøfäG¦ñ?¸' Ëús$µ¹xy#˜}¥Ø% " 峈1EbܘJˆz¢¸jzT,@>ÀA ?ØŠjÉQêyø,ˆkÌ[®zÜÚ&Ü´RP»½´2ÝäE›Nª„,¨_9Ä8¥+¨ŽN¢LJ5j&æm+#î6ŸùÏ$Ȭ+„G `)ÍD0,mû{Æq$IJ‡›)áh”Z¿áöñÆÞpH ,Øy޲SmqH{Wz¹ PTl9›6‹ÃìFŸ3/Ï…ðpH\ í( ÅO!f‰èÍ%÷qÊáOW;1#2=hÅòè)j==0„.e´_ëü¶¶Œ0½+«|AOô0ž·<ÒØ<oœ|ssB…qÜV¥+KV¿ºzªË•RþiWŠ[Ëñd+¢Q^{ ©K‘nß–ˆ´Eëîs³ŒÂWK¡SÄl ޏÅί–žÊ KŒàœ…"²LÁ£-îŒM9‘ ¸/¦$“® M!:¤V¶ÈlÏ…?F㑼q“Åz2~!þÛ;Ëc «…²t·U›Ûý¼AÁ›, u©ábèäºm8Z3ì¿`Ã<³áíQÕ J¾‰þw’íHQSm9V ßŠe5,å”áž]„eÝש¶ImŸaÃYh"ð ‚± µ’Z–U’Y&7aÐbiGŠÑª•ÄŠ”n¹¨òOLTG' T&PVÅÒ½HhE †Ã)ë1¬»cÌ…K½cBÊAZ&%(€J·A‰&4äÚäJרG÷Ç¿s(“š§%Ç–¥ä¤wâÕ¥IZ#vb¨¥Or ¡´+‰qúCÉh$N8hIµYøÂ—6”~•ý 2tÑ©a¢j]• Åí!Fº§Vþ¤\³æ¬ÕHˆÇ9 rœrº¼êõ<ªZ4~:ö¼D¶žÿÉè=OŠ(¸WÕ3Öõ¦¶Y×"2¿¢‰éõ‹Auæõ™BƒWk¸ZÉjtB ÍV¡Æ”©¬`“¬æv§—/?O1Ì2P¼D8¤± 8“°fQ\;”–laµD¼{Oo…’«3d°*Ðb󯙼ÿÝN$aw눘ªDÊ·óFÍO9rÉÌõX¨#¬´w1ç/õj,|¼Ç)nõ+ëé ÄqÓ?g¸¡ ‘Es–øÊßMäÎÍòˆ¦ä—…ü­kšN}݈´/ms^Šå³³kŽÎa 5ˆr§5…e@¦’"f !<’Ò/ZM cµÜ ++–WUÕkêç§HÚã,Ëu)lIÚ¦ãçy CÈB‘“ÑÙê‡!WYe^ë|‚TÉQí$”ÓªÔÇI ù@“ Ë•ív+ŒeH…§-ÍO„ìš‚Ü]«}>ú«ÞIž…êò0™n¶[7:•FêUC¹ÕŽ‘ˆìëg”ÑH#ÖB—Í¢É<_[Áµ$1¬P¥‘pÝ´Å·ÓITÈ‘Uœ‚ Œ8žº«¶RõW<ß(²7E=Èœ=BFº{RuŒ‹¦ÙtôL¨Gé%^u»•uA1¤în[«j&“Wê¼+1U„ ¯t0¤ŒÅæä(¡Cå†zú6ÄûG¼~ñ£ÙErq>·|¼šÄø†²úø¤0D¹Ö…,EœÏrnÓ±¨žL©®}+]Œ¬“­I‹ï4ÇÉd¢ò9$g°i…ÿøÉ˜Ã™_NršÀ³`Gð` ÿ´ lóH¸ðר‡×Ö†eW:Ô«÷¢)Üè×G[ sÕ7I¹}{S÷¦\ûoÕes*1D±';·0Sˆde)Ù{GÅ£„s¥kÏŠ^ ]¥YPô‰ÊÌ©_²Qª%díë:ÈEËe]t ´'Q’Es¨ä9)j9™£7;ˆÕG¦<š©2]2zôÚþåßmEbêánMB¥5žŽcвnÕL¶–æ0¤*w—V¼ÅæT–[ÏùS§í¼?ËŸFŠ˜BˆFs‹„…!Ç/ «2ãžEúº)=ž¥® Â[qö¨AÎÆáäí–VÓ®±Â0’ {³3§yn‚¥«rˆÅmZY„B¼ÅÒ¹JÕTê6j&m ¨Õ ¹lÆòUk¬ŸR¹ªèéÈ¢¹ÌÆ,ŽGg>ÑxC1©# ó™[âþè¿ÙÆ œAòµ±«L‰FH«„7ºª”3â;úsJÛDÆ”‚1Ër[ˆôâÓMDâçiÈÏCí9?¾Å³"ˆÞ„+ÙXÓ?3/ˆÆ0¢•!­Ró‘¬g@©Œ£p˜MJ*U•{ù.¦õËJ§êÔ¼½GåãX¼ë1ÖvwvºÂÎIY*WÌ@Åq“‰K>¡"Zjòi]ßMB[…“/úB”‚T*+áY%9R®vœ¬iKR:ŠçUÍÏì܉k¿‘¸Žü¨}âvˆœ–j%JŽLz‘lÔ竹7½È1̾ž+ö)5 2މµ"_Lº6tÔÚ›[)J <‰MwFþ|®R¤AF&)ÔÈý)Kb§¨Œ3{!;KK“¾Âij]”Åý_¹¥Á7¼ª’3ˆ@@”Úha!'#(gøÙhB¢,Áù9ïWGYñó9‘øÀ¶žçjøY(˜Â0ˆ¢z« ¨i'5`Ã3´Ep›ðÇ IL3²©›§ålzré³rì¢]Ï…ô¶ðÂ#A¯hx0NLtØ‚:"°0œìtã…ÙUÌ…è|‡ } ×c(Dòàd6À2&¢Ä&A‚ Å€¯ÏÕ‹˜®Å£l|¤*”ìá ‚ÈVhn×3Ñð™1E®!ˆh@ÒêGС‚ J A[’‡†Ð¡ðWR :ÇÏì»8ŽÕ% c†Œá…ã."(ˆ#B3$@¤bʤŒ=qD¤ êu9ʤèÈbF ÅÔØ!Œ „U',¤+ÀcvæÚK¯øeFrg.¡î™#‰»¥â{¼¶k+°B)]½Iò÷tÅÈ„)f"Ë“?Ð^³™ÝÉœ.§ÐbFY|j»t‰"/¿™ÙòMÒe‚cÝ®#¼©“µïŒ3²åØ©µæ@Ì)7îëjÓíÔ#u](BßdÜ~¦3”‚3R„GU‚¨…j„ó]ÒÊ´V®6u¨XÜ%(”iËFò$ŸvÇmºQ]â3¤™°cëþ¡‹õ•%Ã×hZóTŽ#ˆØ¤f%–NÓWËÚZ]Mfji(¨«ÿß®Æc1N²;­StÌE9}òî9•K‚>7§­8¿J«èêõ7á?Ò³ÕP”Ç*•B$bfê¹%#Å)2f©W‡î2¹ÞM%K¾==êr[—®Š PÁ× Ì¢€Œ§(ã%gApbDJ€™Fq°†' Ås"‘£„z ³•È?s(Òñ`„1°ã…[Ë’w@$h*Ó@”-pÀlxç† °å\EËŽ!!HÇ®RŸÜ¡*'™ZXˆ B4 µBF4ؘCá¾zá]!’­˜4—‡È%â«¢ÇNÚwN]» ¼ÈE‘#²…!žc°L¸J]Î×hß ÒÂpãÕ~0ñHXìT$c«˜kqüÁˆ"ŒØAŒDB¡i•QÄg#vçxÌ‹G(¥q¥ ”â„2±4c£ÑŒ nÜ1 @¥Ñ*ºBÀW;Œ„(+….¤€¥ÊÚü€‚\ËI]r @@A@‡$j&sþ–ŸN2NAyö®j/kyV´{jËøBâz5 U“(+3¦÷­‹2œ—ì(!XA¼¢ Ë’ùIgûbÔ«kîËEåN––žj—wˆ³†C¢±YÚ®•(CA£<ÄMQn¾¸»ü¦q~†í9OõïL”$m¶ŠÛB˜á6n/~Ò‡+íÌÊ€‡e7v0EÂ. èÈörØ•ÚKšo»-(¹D"d—–¸&"_<ŒU*ÿ‘?1j#:Эs+¢Q,gí{-T²ŽD“+uÍžueA«ÁK×.iÓ›í¦J³¯¸Å+UŒp†r½6‚ú>JŠWþ^#“æ‰ßJ·ðš2²63D2çôæ•%W\®ž¯#+®IÍVÅË(rür±_/®® d™}|î;Y+mùówÔ]Y¶ø¦s#IRQ«òVÇDÄÂÝçS/öWÄôÀ”>¿&Í]GÓ$ùÝêcEug!ÝuÁL#ˆ¥AŠuLg¥hlIùý¨ï–Å¢D“s¸L'œr‘»*‚"êÔäeÊ W²"ДřyO¦ÑJ„ü‘™ÛÑ6*m§Ñ<µç0¥r%ë_ìÔZ7xËC Ø1Ø·ÂŒëè,Ì:kºŠ9J‰e- å–ÄÒ*ÒöÒ¯Ÿbîʯ”“ þ¦ñ\#—Û®é´(å[¢…8SUòú´Îê²/Ôþ¥-$š=3ê6¾RÌbWºFc2ös&]ÊGLK˜TåùŠ)Õ»uª™‹ WíY\Ή¬#ïKéYY½PDÂuOÊ/|¸•¦h³Eܬ™¯Ž¤¸‡™š¬p­FR+Ž¥•BòÉ*º©¿É¨6 LË/S³î^³UÄ"çC’\á‡q‹*´§²¥ÉD> Ü·*§Ÿ.'–—²9u¤9­A\c§_‰u,¨R$­ü†¯ ªe–ÓñÞ§ç%‘sŽæ\£ÙÊK7õóLB¢3WV›¿l®õŒî½ÿífîúˆC«^©r˜ž¬#Šžuâ¾S99O¬äVCrÝÙ=„dMò{‰ ˆ…(…Q;†"/¡Gb ¬ôѾJÔŸ3ÚÿN½%“ééÅÊâÐųÑʉ†I# amîâŠDÝÌD—éC¦&Ø¥Si{.C‰ê´™œƒ„ÞVMÞgfÌ Õãw©ÜÎÖoýuc©WÌ)wb$ê)rw÷È h`#@))`$mœ’¯ ê}gš3Ù€\3þ¹cÔª Š;FS°ß=‹ce¬Vœ×\d¢ôL$üÒˆé›d}|Y0ëa;ŸÝxSP…ж†zÖWÝn‚•w ¤hÅ^\E}*lK×Ff›`ŒU OµjëHä)eAP[Ž#>æºÝÚ­æ æÑ‹â‘0‡qÌD&cóWhÝ«û½ ™èØ!¥*?nqúªÇØ…(¦ óI(eȲöî\vÇöUÇùä™,«NØ Vz~ö'êù•Ϫg2ð"QÉÚd©*íE¿*ƒŽ:or6w>_ò’~ôç¥ 1%œs´òîdõUKcT­)ÄEZ&¯1ÓeVB ¶Ü~*YøœùM ¡ZNw:rê‰Ñsë’ˆc¯º'"Œ´îå§ç«íqÔU«d¶yi“IŽGf#Ùý)öÂÍFQ$>ÙQR}D!-SÙkí3•®!$Vr&„[¦°¯B[E3ˆÃþËò/Ë&×"M±[Ñ#±YÇ¡iÃré‘lXŒ11ôVÌ$¨Ü1 +zn7¡ùšCɉc é"曬·e¾¼û³{*ýyjâ™8m±¨JTÇÄèVœ  wèÛ(¥·[ËuÆÎf&í0añ®ò»S}zï…n³~7dÎ Sz#…NlÕ+ÉÍ; #œ´²8‚ʽÁø]oþ=1¸ÆBÜ‚6çì×®¶1ìf¬µa“U[ܬTK6·`µyPUJKŸnRzmQ…B!•r½zð\«Ø¨!^ªIJ—&¶Ö™èŸˆg+0â’aX€²o+•hâUÕye£bEÖFÔ[&“ý§ó;I¸ÖˆÙä[B'ñF"yq6G"¦Ì¬ZÑ•³°“n •‹ƒœD5Ê!™Êf´Òcy´«rY]*å‘齜Ö\9•˜”¡1TªC]µsÙÜÄ! „C¢Q ûBåþeˆ­¯Vj%Ùu±BtˆFæ r<|fŸÿ¥ôÿ!î]Je2Q¼(n5Si§²ÑH¬{%1ú0Çi$IQçªpïÍ‚ˆÀŠîv&eªq˜øj•Ìn©{ÿ)´¥ ¥‹"†ôС[7ÐJMªÙs'êùÖ*UrAf¯Dó FY™ªQ5ûRèw°Ë),²-]®øFÁ4Ÿo+é騈Tõ-“mOªQ¨ˆ¼!¡…Î=mIäß7¢'8ˆ¦EzîkÞòNM)2¯2qsS;ðŽ­MC¼R˜Í"˜ÔE»Í)\Æ2¹ý$uÃÒ„û|™”%ÿ ÁÒ¥ Ï7â`±©Æ¡[¨üW3ò÷)#?“ó¨Š÷Â"Ÿ±¬üµ•$cØ‹a‘q ‰×›zŒ[›’•$d¡HDCþî|Jì`¢_ ª1CSºÙ_FÔ¥Ez;ŽÞN"ÐöLH–_±´¾–cÓÚÞ>e‘ä*³Î’½[™¬ÅaF¹8î›§â~EÇ©v·ùtp¦n‘¸ÛRÌ­ŠO»XBœ]DÄ ˜z®§ ±[—øÜ­âsJB"ÎêÈ)޲zž?·²¸oJ ‰‚´‚mk%3ŠTÜýaÄ Du)I¨ÇJkwьΓ.âÕ¤æLå©®‹çeÝ÷¿W.–^’Ç8¬“‰ŽæmG²éÐDŠž!,”¯Øl®Kn/iB’çôU ƒY&ÞÂ]J’¹NeØcÒ¶¡¨ä‹ƒ­ëm ¯WÙ—šøåT)ù¤úÞT²×©IˆCœ¬:Ú£áýíZŠÍ¹¡0C…2¶ øiuDö*2’¯VwMOjûyu–EýãfžÛiD%EòºhQ È:›öŽ‚8q I4!„h¶6)þµrymKÍP€¥I- žèEÕR ØMüïlæç!o¥ªê$”ßrn0†(…Sµ\W5—$¡FrîwMü¬¯åþÑ)‚üÓŠƒgʽòªŸkTš›„@͉'3Œu*ÍR-H²¦Ô% ¶K#Ÿ´¦BVW|Ak ©™ÍõÙ«Ù×+lè8Ùƒq¹qKßbu˜"Jcn+˜~J8$EÆÿøÉ¨Ãš·L 4ˆ¹ü†´#$&0·°kõü`gìMåQNÝAV—µ«NÊRù‹Âg³!;+úÛDa ANK°¤¡ M¦Qˆ+Í•çm*Sd–×¾£ŽqJ1#.6æÖ.4¶“k½wá\ÁV+™~˾éV¡ŸÙ:DÉ™‹‡ïGrb¥“ñOÔ—Òe7Ý(‚Äö«D‰ š´®ˆ9(Q˜”i×ïlj[HÉ_c1L„7#`šÚ¿©AyäWæ4ÒR±I\,G Ò°ŒrŠ…QW¬×3±ËªÄ]sj#º… ’áÜê™U"èä*u×–œô%‰‹k' „1F>ý\ÏŠˆˆˆŒ‹ï"³‰!v”!1ÁÈÅÅ8A¸MÝ Ih¾L¢ÈÒ/Óv&s0JDf! RœTSS9ëö]ÓêÕ(œ;: ” bÖõ«”ÚÍÎm¡{+»#VNT©Ö§3:ÛPìµ8ÃçG}á8Id¤oÑD•J[*v¶óñí€øòsu’VF:1JõUUêúë¥R2’·>µgvb Í*!_°ÞAé{ûú»U¢;mj ,óã ¿¾!¸¡ÎT¹Ï2÷[´?˜ÞJ‚“5Jõ'#qydËʶR=8lž~wGÚ)nc¨FÇxªœ®a÷ÏÅT?kÉ«ª˜FeíŠSQ$¶vT”gª9Öí!ÄÖä*½Iœ]ãÞé˜T³æ±ÒVDb¿¹ëþn‹›©2µ!,_ÓÍ%rЬõ" G)ˆe0—Q‹š”_}±¥TÊ:vž.¥yV‚bÒafl[›)l9:܈ÕWO"J†0ܵc¯©L#==ŠJmI/?$2”þªÎÑEd¶=3¿É‡RŠŒ+>ÇLÜÆ§qÚ¬èÔ5›9ˆE"˜vtGGnWòõk/7Æbé\îrÐܲÆîð†«VR DŒ#¦–WµÔ….mÜ“FóѦ©doóY§Û*iËa­–§ö;§{#dCçYÍUJ% ÄtôŠºî¬\ÓkÉÒö 3`Rñ„ªjq WÞ¢®þ¯.Ul¦UÊJ‡'»¢s>jQW”ÚWʽÚ"ó%L×L1}?5ÙÛ¿r“ê–wnßž˜ÆVw‘ßgZ:”ZjUÚºRÂs†l¢…²±E”Ü£Õ(;÷)òZ—4”w”´*aHã¢pê3Hºˆüd«ä]îÃRO׌Q0QœÆQ=EŸpæóБµ9¨#â@n¶î>#©Ð|PÐ`ጜdvRÍ$ÿ`²Ò“›ll 9‡‚»¢bÑA« ¹²BW$1±BBr|×ô{*»£Ãfc@©ÂÊádFHÀkMŒ¤q¶ˆÈÕ”„h„u œ5 Ç^ Xq3¢94—ªŽÙR®£OD SSŒ.L!0Ïš7åhè ’JABqš7}Ù\œÊ=¸Ù7BÐNj¼|s|"´Á>¤-q…æ1Ü73+S5p‚¥Þ|Ÿ?V ±X1Q× WýR„ÆVƒ> È𨓄#‡ Ø'd®G]ʧÃÎ7HBå$V) Ì«£©‚.QÂC~7 BBá(…"¹”Þ¾l>—Ì1(AŒL§SÊ·AÃ8B73ã›q „±øòˆ“Ò8ŠÄr^ÏÉP1ÆÍkŒ:W*îÔûƒgÛhwQ÷;e Fœ5ChGR8cÆa']‚~tfEþx®¬€Á-ö£E9ŽÄ K’T°'Ý0‚: fŒJ‰^åÅNàÁUÑ{ ð #8Pœƒ¢§?bÚ˜HàN`A€Â©¹QÜ;¯P8è!0fCê J1-TzÔJ$ÝŠlØE0(A@Doã¡JîqLÉŒ@Âkè`LãsÆ5s0Ó<‘%£NÕOÂ=R9)ݹÔ2*°' !®† “æB>A™]`KEAþ@ª«¨ p„j†G2ÆgÝŒ$‚€( 4@KS¤{Ft¦IÚ‘Õèå¼_°$X á‚Æ–pKØWf}z…` ae´ÖÃIyff5œC‹ä!^—êÛW,t‰3–Vs®8­ê[ªÊþBq%—ûOM%,Å)s›Î¸.êßpG![“—LTt¦)o-ëKÐaFlEaµ³NR%î«X~’CS:Ñ{t¡B˜äB3õý!DJ_ÜY—wrÒÿÉŶd΂Rݺ¥]9<­(Ë;ýÚâÈ4¿–^[QYX¬Ø»p’F‰h[ZA_ú€†çsHÖj’©a²îmËGë=Lš‡Ä”Äñ.ì¡'ök7)æI”`€â &Œ ?p”–””0çë§Ërtí‰h±ç‰!Ö«ƒ ¬¶5BœçFIÂyf(q?û¹³½¥q‹"ß©€HÐú5½”þÅ2ØCSÅ9ƵuÔµ¶u×Dªˆ’Eq Öí'U{ N×U#œ¬U-)x‡c«‘¨C'“ðµ–$ýaÑ4¨Fé Ⱥ†3$‹.¥æHÌ¢×Cοܺ_æ–…éükÉÁ~[ëÛLˆs—u(ÅŒÆ"™hB]–BŽÅÃJìšÅÆöÍ–„ì½­„¡Ÿ4Û×* «"µ†{"Ø‹Š{}µÕ”§†83j’²I{O³ÐA¬šb)›­3`¨+™—1h™›Cª²ÒSWOfVßvZ‰Ô“ÕŠØÈMaŽõÑ  ²cµ²³’ˆïjLFl!z=¥¾ûÔ.3nêvwZ2”ƒ1D8‘¾0W=úG.}iUñOâR“Fž¼æÿ»õtâ·DM& §áƒ>é›åú&b"==Êb9 Li9_ÉMQsªub$D¢ˆˆ¼w)W„ÛТõfLJþr–•«”öM™qŽ„!5SjŒsŠLk•5¹=3&#q¾Ê•Yëd7"aÏJ¶FS»BD-ÅtRÊß*LU"sq%%KÔûn©ol&~ãl×Û]Ý—#-ˆB˜“àWH÷÷'Ó\„#( B¥ôFSÏÖ–m—gVNZ/_N!ÙÄS¥ <¥õ-H÷mÍê²hÄ]Ž«£K׿^jRÆU\Ayë”Q+·~Ï}^ïAÛº_${˜Æ‰È8W¡EMð„LȬ!AÄÖ(ßÕN—ñ»ñÜ•,Ycx©¨KM>™¬¨Ä+¤Gކ8Ÿâ,Õò¹¹¬ƒUdZ2ßézÓ€s0€ 3ÿùÿB1máPDDGÓƒ7ñ¥>0mý Áˆ½ˆ3]JàAíbÇ”2„6iBR÷ ê)P0§Ç: ÌÛ×&f¡ ”Q‰j“ÈЮÂrU<(† Åîl13ÛFÂÊŸ’/´¡XЂ uf*‚.#Ñ#+ œ#iÈʺ0@A=*(„Z”.3v]tF‹\éÊ;§sÍå C 7Þ»àEñ`Ë}:@†bÅ R‘ˆT$ŠãôRvG9Í™9„9+tÄ:A“î•4Áú!„ nyUµï5Ê+¡‰ÀbTh²­ÄGЪ@é¯ÝÍÎÀÊ´Eôjû²$ã … xø…#BŽ)Èð²@Ü ÍL‚"rUD2UdCS Û`Ž`§ÓÝÈÃÊÅDÏœKá'r1³#ˆÔdŒÏ éŽ0S= ÌҒ؆â/P‚Ó*ƒ€Ñ wk³Õr•аYˆ!âöh2ÂfQ§ÂˆÙËÊÌFmÆz0¯K/™Ú ÈG´¥¥½¸!ÈHÁ)@1‰ }<òªÑÑœ†@JI1bã1¼¿™r‚#Ž˜(އQüô€Õ˜˜nÕÅ4ŠX ¢1Â^†Ž…¯¬“ªv„y*%"’2z ]Ô'*Ý B r§A‚ø&èÇJÆÎãU1Ÿëñ9*(<Î{Ø‚/8‚ 0˜jSddJO>x~2 ’APÃõDˆ§ŸæwÄbV¦Èa‚M™Òñ‘D„ƒ5èªT+ŸŽz*¥ÈJ@Æ4Ì\CÌ!£mB“í.€ó¯ A„f|ªÉ°ªã”UÊÄ‚DaÙpâq‘˜Äœl ¡œ¬/Þ×2ÆÁ1¹…¤,bŒœ&H¡†~c‹aÉMЗ/°» «’8„†@aÄùŒ¤©Z2JQ’©‰Cê(vå!Ò*ǃô: † N¨aA”Á¹ŽKëbÉå“؉nG7˜‘•ks`0®Î,p­â˜#fJBlˆR&}‰…⢦¯o#`c$Ý‹HÎjrz6 Ü™ës+ ƒ­w‡PINÃÈÅù½ÄYöÄŒíØß5 PÄV„Û%·–úbÌPïZkk5„$X™Óˆ°f"fSrðÇÓÄ:˜Žr M[¿–ü˜¿àr‘‘©Dê0€D 4F/;¸NTqqÅ%0èeàœÜ%;B`æGÈ"„ÄÄd2Ç) îIEFåçjZ2”•®iȈ7 )ˆDAœ¢=½cI *1Á¸³Šªñk„F1†²ªšÃ2~•Ôq“ ˆ¡Þ8¦yäãr<ŽG¡P,Óª#1 Ì30ÝÚN¯p‚ÅZ©[ÍIÄ$>'Re‚VÐÈÌH!ʘ¨Ruƒ:ˆzÊÈVµ"÷!Ù**q²&È 1F}ù:¡QŒJ"«‰a$CUWx™ë1S²C8ÏÌÌF¥CpÃ/áZ8ð1ðÔäù½N¥ŠpZAY³ PE3 ³BoLÄU|0râ@$9”®}iEaƒ02V0!ˆ^\r=þÇ{‘LL«Çz%ÑYê f!–M†@¥2¢m ÌbWRÈL§P ôÒš½woR•äǢܖfº9TŽJrŠçZ´Ý†fÙHRªò!U^›Ýû]µ2gDÒQiä²F1ÌTR|nˆå•dQq´ÉEYÜx©ª›)lœªüžÌf2D³ÑE+‡£\SÝ&°ß*º©1‚ÍnanïKÿšB­×ĪðÄ((„¥Ï,æ±é)¾NÙÔ5G:cm¨Zø¶kÔ]ÚȘW•›QH¥yÄ"øÃs‰)cw:®×Xù¦Œ„ÕÒR×È\£˜_Ûym 9Ç3=»,AGÁ+‚P¨œXˆè)˜wã6lêÒ=µx¸™W^5ÎÆC˜B¿÷;¾%ÞžZÒ>W9ŠÑƒ¾­6xçïmÞf0†0„·´£ 'Q¾%é:zÌY‰’è£i0òº'}žÄå\ÇwG«ZSœ1†fÊüc²WEû_D²ó’^i!'”P¡ï{Ô¸¬rk9ÔNk„UÞJiË) ´$B¾‘pI=ê×S¢ç2‰ù‡»4dwâíˆ#%³]]©m´}ÓabQÓûñœeÏ&2ðÌ ¡B0‘d(…\)4ònGœ–DS7\Z® JQ\¿¸ùXtDqÙ_Db=Xâ0bD6Zv2ÖD[ „­Úurf“I'-±iÅ-¥  ‚ilšKÔ—ç³¥¤6•¦¨VGBV§³³%™5¤Á‹—D!X§%›Zœ‰Bu„¶ ~¦Õ¨ÓÊ?ç&Ä(ý?>œçIÆ0—nãôµ±qý¨¥©yÐRfúKoÁåÓ§©d£Iub8»Ò8… 8Ä[U…Ng!¯.¦ËT0ü…ág˜kOyˆÛõ”Ø2j9GQBՈφ3wÄÀ…¤ä¿„ˉèÅ<âòšT£‡j aJ)“~‹ÄmK%¨o(´¶–ˆ¸Y$.·Eb\ØvêºÅh€AXK”¢@¾7Ð-ˆx¢kžª^×4¾&¦)¬–Ò%ÒµRˆÞ‹FQw8d[r…LÖ2=ëßí:¾²&¢M$ô^Ûѳ(ã$¢„ 2¹ È{’m-‚ù8ˆˆ­è¦䢒åoG3KmUd9•Ÿ$F …BÍuÕ! Zô½HHŠSçðgª} GKæâïY„:FR)ɹ)‹Õìù=O´Åæb..wç#¾‹ÅC͹‹ÈBY³9\“°aá3¥Óøkm?ÐM|)±„±þ– Oõõ_°ažR#<‰V4ê¶OÌÛ•S„Ù\ÃßHËÃÝf!ŒS=V¦xCŠf–bJ»ÆCÖ-»XÔù{Î3^¸7fÝR¾=Úè¶P¥8!K|ñÔÄ•’DœÙróX÷.âÚ¸?.­9w{Líôc(´) ©±0B’´†¥K¶¥³ója*¥?ÉH£Ôm,Õ7 Õ™)Î%1Ž^-\jb,•Á]æ&­#Žx¥¥È…m'5ÈÊü‚™wE1g.Ê’ ¹{ÉÔᘤ¾šbín"åú¯J%–ÊŽcŠä ´Š]¸jâÇÓ“(i›™LÚ¶“=ˆþ|2Ñ=7±ˆ»8¢¶gh¡Aœ(‰FÏ&-4—£e¸˜M¥‡‡šÐc¢Nz!3&”Â¥£Õß’©é‚·ªTÖ}5¿ìÚJJ-Ÿ¹Tsè„•ÂFw Ф[þ‚«{w –‰BþÍ)¢½\| Ãgb«“~Úr¾¸Sp€£'-HRš‘h\AOSz§ ëF­)¸«äÚyµž¦£TëˆÒ5‡ @… g6T¡GAikëˆlUÚÍÉ®/¿ô/m²ç÷wnpƒ*1Sèrwÿ¹iW5^°¥½ 2žÃªÖ5Þˆ„=]ÈøX¤Ä0ÏšíBÔG•Én᤬Ó"Ysí˜%Õ”„±h%{ÓlÅ9Ôs¸Ë]²Â]Ÿ¦±Êƒ‰Æ,SÉ›¶ú¼a2£eê뻌($¥óç$„0Brc¹Ã”´Æc·-y’Ø%Òb['÷šh²ŽåÚ{fD±ˆqSž¶8—t#RçF¹®éô$k‹;/Û¤ìne#´ÂÔƒ$k¿Æ‘ašÆéF­9NKÝýI·Í‹Ÿ¬ÍJMbHµHŒÈa×mʤ9œ·Õ~D¼‰ž|Wiÿ I "Iתç%‹EÛ­Ä2 s„(ˆ†$fB§}8þˆ#žÝn¬«N¼ü}} E5 ç35qÃ$AùŒVR„¶îר9(ýÄ–Ó s§Ÿ¹jÞgõb+ K¨Ú“)ŽN‚ÈÀÜ f@-È¢³´ \ö™µñ¯Çˆ‡Ó†JA“6!†ƒ¦\;3šÅ 'Ý9Ô\xQmD ÃZ/ ø‹¡Æ¦F+N'Š#Ó;í„™p¢àUÛaL®eÞyÄa> ´BS"D(à¦u bQŠpuPq.G Õ3G@„†ð‚‘ ”e"‘õx" Dr–‹ÁH_¨uuøßçðfh!Ùpl˜ƒA !àBâ%‘ vx" @#2Y%)œŠ2&7Íú;¦r”^xq1V%°Rüƒ1/à b![EÀ‘(Mmë,úZRr± ÅAmLChã²Ô5ªda„À™TÑPÂEñKz…%cè!q¹ü \¬"v}™Œa•wèÐ")Ðw‚¥7!FuÝíjè'60„€„ÄݘŒ"0ŤÄaµEàJ(¡õˆã‚–ܬQT£YZÍíÁ”@Æ X¾Ã¦¶:C-u#…0°Ê†*Ю¨ ŽA“ lTvb„B !=‘"ÐØ¬MûW‡•†gHáh#kph0™OCrT!ØxÀ^qH¹—\<.ŸÃEj†!0!(ÊC[2ÙY(Ç#Q¤hž®Kfg„¬’rׄu'eÿ¯’Rkس¥QUÓfõR™èÞ"¿ÓýSœùœˆ–mDC¿¦«ÜTedˆ©GD±I›Â1ui¨©˜™Zý$F"n"zu¨Ò‰ÌW*£y•õ»Ã½^¥Ì­5³‰n6ßz´wÂÈT«R)°«Wo[ DIEb± )Œjå•OmzËL)¿3R‘:£x˜¨þRı…ZRîF¤¤;3©U3ÕRòÖ‚¥msvKL)†íÅ«êúUÓç2eÐŒÁ \ ¬ø#ÈJbÌ­‚H”6áŠ_L”Ü× ®QVû“‘zØ^Ñ^»%)6a+wÏys‘l2ÅeË#%vqÒAˆ„F9Æ¢“õñº”’¤œ.k“'ú—/|Â$üF+}NvBX¦T,B³6•UÅ>„^/ ¨ûÍ—Ìrj³©V-ÛJÒ¾ÕÈMw£ûµRªSؼ ½¥_ÄÒÍF0™»RÙè“!X£?¿#9*æ+ß7l¦&ZûËå¾ê«dF»œd²ÈÆ$Št¹T!L¶b3:qe[võ [fežÙgàZs—ôs?Ô¥e·Šï뮕}RB'±Y{y9IY”WèÜñ+#zßRGeýefÚŠ8™ÌW4!*˜‡%%Ä%>©D%´ägê‡q>¬Wéü„EX¡»Žën¸Š¤É†Bà‘n’žA4¶ÊiÖC/a,äl¤£ £ ™^tryÅ* Æ/ŠR5pN}¯Y3\¸±¼š&eçT=-ºë¿6–¨8Ì÷á’mÓ˜ûU¤ß\©R˜Oj!ìÞözŒ´ls%N¬Ú§‰Ç!ÄæO"¥¤lÕí4¬ö@‰’HÂ/ëY«×Cš\Êv¼kH…,´ó/´W8šò$„B§¬t¦~ALåm¡„5H*ø¾„G“{K­F·´™oöŸ3;G ›ÇjR¦bWYßÅ2¬â¯E)?<ÈT§Fkc-'ªt¢o{­bn.üʺér‰E+Èg1y NCžËpêû«Rl®ä¿™¼;ùC· Q#V„uv:BŸoãâbÿ[©†"zª^” ½«v·ë‚ÊD0¨TñUtC"-–¥ú{îL]][ÅüÉ#U(§³«®µâµÞ¥N³/ñ„+à£-Pª“¬¸BQ!ôj•ÚÙ³~ª_;±ïpËÕ©–-jB*2U°bH×ýˆåуÔÊßš!è¤a©ÎU;³%:΋ÛMk:¯6ß,½%._ºÇ[I¼bÝB6u± \ÆàCEÊKNb(Í&˜â&\CuŒ»]Ê䌆.¶ê “ҪĨï-0Ž_÷äÂ2ŒW ÍÃ7{Ý„q"»ÛÉ3ÛÔ­ØÞZɸ^ìNšª¤¹–¡òQ üˆSA\ØäC»tM”W]Å®šcˆ%DdK´[a]Š:EÕEG’™ä}\X»Ù6„©(T}1‘+·r'2ºšÏ)·BJ›ô» öï­°¢Ö½®µ!/¯*¡ÎÔÿtÑ]‹ÅÈaÝ3 3Pˆ¯ª—–D#y“åT½˜çíJ%<£–¼‡ý$DJ€ÔÿøÉˆÃœæLW‘æÞè ä´#Œ 3G‘ë˜ø|HfüÁ"Z[WôjQLÚ•,™y–ä!†)‡O„,^¡Ýe§›é)œœÅ8µVjoõºœb"éPGù¨m*'JqŠ’ªº…O8pÁ!¾Œéۧ䤽j‘îMikß ÿE™E!Î+U„jmÄ;ýµÓdÒò•Ÿå·`…^“–‰œARĵÉeR$à‚°×Ñ™O3TÿFêÿ”EÕ«oÞæÆo‰L)fµ¼)%QB,cˆC δÞOU£>KÎmº1»¥Yð•e§ëï+Žz9lØuÉX Á cÎ9ˆž´½«þ¨ÆWßÛïØÅÀkR\ECÎÓ”‡+…1)¯Šq¸Þ‚mh¦á)Ù†d-Òw9¾Œ¸/6’b3SŒ)Ls|¶G²-ˆK Ã[§¾Õ$W˼B’©´&ˆYÛqí2yÐÆM¬{Ä ©ÎxˆÄ­È¯!ÿé/_Bñ1¹‚µ/c1)¤"1 Ui]·Ê*`ÑtqÐMS,·É2×F&ù+Y¥’ºâ—‘Ús¸¥f= §s¿ ÙœÄif:G“ª3wíÛldâ?èb 0!—è«ÇAšZÖu§’"«7‰n«òßViÿ3éiXÄ;ŠA]Ì‹Œˆ›æAOü¿ô-åÙÙ%üLÛ" {šéÅw'aÑHSÀ¨I!HçI:j·+&)s°¿˜E.|ÒO¾²$¨{$‹1”rfM V0¦ª3ýò‰‡ÊQè)î¨è›!}2«‡Tꘊ$Î9Éu#}ÐŒ¿¬É_zIöô;3ö—ßµRÄܧ›•Š™e+Õ)Üéï†)]M!sõسW«6bæÞøzg…ÌR"”§ßVGÊ=ZG˜fºS„8ABÉI…b|ÔþÌ¢W/ZOY¥._ GʈÒ$Å ŒÄ= µÂm‹õU‡lâ]¥—ŽSÞL‘³ÎÆ-ì]v”å#©º²‘Ú%ó¡ÙñI¤*Ûs¢D…ÖN"È^8B•,B¤ŠÌî1„Ú°;<”Í&ÊZ•ûÙÒßJÓý«ÒÂj•ÉDC+ÇÚÁŒbâé›äLÃn‹u«7ÿsãþÔŒ¶³eIÄR˜Æ3¢íŠ…/?-?nÌõ•Ú´ÄÑu0Uq¥NâS äEu¶¤U²³eÏA©tz®¾ú¤Ä^êw-¯™"¢È£(² ´!<•Kºj±ÞF¥Jçö! ÷É4–3Uän×»]WÇ%c­Yʤ‚Š(¯ ”9x[ŠKZÔ7²©p¸i¤ÞÑ5b$„ª+¥ˆŽ9‰ÜÅa¥ÚÑŽÎJœŒ …)•êg‰³n:¡ªRÕY{bªy†t*Ure«cÐÙmä¤\nuvlô¿l‘g› ÄÌ‘£E)Œâ$â ©¤-rùݷšäÓ—~h•Z ]ìúc#¥Ú¼Uäs‚%…ˆ|áS¾žíøMî9Ãâ¿ü—Å:Û˜ãžçªÅ$LH¬鎾6P”;âßß»gl'ixìb©ÄÍÂ5gR†!?¬¤«àêœjçój¬­øJï3Túœß;¯7l*úä[µÔ…QO›K6í™(µ-dGF×ߥêÆ]òfMܺ!¦ÇÌv! É!Ð(Æ^øŽ"ÓI¨†ž¥ f%Wlëíëßÿ)¨DJ ·c˜J<¤ óoé.s1ÈT±®s¾—Í¥ÖäZä#ŸIB«Õ'¥S%¤wÁ âoù éj‘TNVgÏ–H$úkºe¡dŠVsˆ÷vs·ý*¹$˜ŠŒ*#p´óﯦK•–„gl]±½Òƒ8Ã!E81K&Š1T”¸·ÍÌÌäÖÄ‚ÑMô¶ŒÇt”®1D°Â~¤ÊP§ÍÄWSQ35üú¨Çrqf¢’dMÖJ°­¸)CZjH.‰ÝRai&¿?2öwLâå$1KØ´AˆæQTÉbž¬ÂÒ­EÎC—š¨ˆBN6 M@†ýë.PÓ±Êm°ºj”‚·¬PÁ‡[î ÍJk&Õf"‘{GÉð-:'=,ÆL8Îf°ã¤Þ,Ë'Ò]&Œ¸wS¢ÍD/U÷K¦ ÜŸÊgÌåÖk ×E³)‚ñ3Zœ¿ÅÌÔQL©êFõZD…ž%c[˜Aã)Jé8†:Lt¬º³­Ìù>êŠT{È.ü–SPø{ñQÏÃe%G: ¥)„ 8Ã[ãj×o‰Ÿ‹ã%›Y8\¤ý_¡ë›#»CJ“8G®Ë+©Û®>¿êù›Í¿zÁVN,麣ñh72{D;*Ä)pËÙØ¦åG^O®[ßÉDñ=Båfbÿñ[X£;ÊRÔ¿wüÆ«eéÄ3"U{¥ËžZ¥èšC"TGt¼q‹3oèµu.ìw"7YÉRµÕ„dûWZ¸ßJí’È{B-LîAúþàØ¬êä[¡Ð‡LÐÖZ;KÑ®cµqŒ#À¬Â„spaB"Œk>aD PñÓ°‚vQ àQC…:º¹8Ä$¨A„„½òPÞ-¥Ñ±ˆJém!Ñðs«È¹ø†Œ¦Ã”„?¢ABŠÂ„´›2Î~¢½)¡â‰ÉŠ© Â0Õô1; 0òÎsÓ@Dô`B¨BÂ>°„ƒ`A¸@)»!Z³„ª pCã‹À©ûEÈã2aäY¤F0ׄÎXyÎ7Ï¢5!ˆŠQ_"‰ó? †¡²‘Th\jb•¸’³pËpÜÊU#¢‰V“L¨™*¬Y:;ãâ(„`‡dAëÓÄ]à!ˆL6S9iÄ„|*E挃C?%‘YùÍÁy$ ¨‹…a&0BG~«á޺̤ɑ  1Þ¹’ŒC ¬Â0e®x å…!H½ÿ˜AzL &qŒqPQ¸L5ЋØx fÂwžï]j®ÃÊÎ2@‡¸‚ 5R¥DH†´Ã¦ rC¢Á" èiU¸ Ù’’’¹öÊ¢j7Žq÷ôèˆ'†N¡:3“cy—›[ù“T!áyáŽÄ¶†ŠL´‡e¬T¤gb0ÄYYžC°ª‡0æŠ&I¶$Û,ªdDDÔ„B?È`g@ªÁí''Fêœg­Êªˆ¸Ü6(ŸkXt"1/͈…ó#(A’]½{Ü á ÑÃÊq¹¸ALL³r;÷¥üþkÿ…ð€Ð@ ~дeB[Í~ü"ŸJ¸#çíœO7D/IvD‘ÅñnÃr!ÜÚzõ©å" ^­­„FNʉ­GÍ6÷ ®T[' uÙ¨!VÆ[.WD˜æ|ª*TÚP¢÷5¾·ÕÞ¿j4Ÿb“RŒnJ,ˆëy$ÏyZVB éèêå!º­ÙöB³"’‡êzÖËIâ\¡úB•Ò•-¥‘bq{Lp†Úg¥IZYÐärϸÅÎ0ŠWCK"¯Û“…A%Ý"&•}R^ñ‹¯×Ь UÊB„¢™GÈhlÎVx0Ác‰1¶'Øa™Ráu¸tVÀ̉Z™. H"Rœ¼@Ê&KÈ‚¨qæáLt…"brD!Êc±Œ$1ÆgX©! ‘JwÐPCC¸W`ÃQ¿ŠBdÎ#Vâ¯s &•m6ös 3øEƇŒN)=AÃä¤4:£ýÉÎTH³pfS@†÷ããñ ˜øÅÑP&`‘U6" »a ±?8cN¡ðàjrŒ´ș¹Ÿ ûH'5bÙ8á°+ØF3éX ¤l&ùHLA60úˆbí`U‡ þ9²¨x)K G¬„¦È'âä A–`Á+„t¶!DB-AÂ9I˜¼ßB,4ê«„ „‰¬”ÁÝ{6u@JN q „ló† Ûp„hÝ‚ÇÄûtP!ô£§Wâ⎭2 OQñŽ#5"Œ0!Œº Æ7À™—³F(‚_ï’Rò©êz=D!&vâ++º-rˆ‰D¼ÄŒ¨ÁŸ‹ŒE(B1!ÄÂ:…D|òƒ°xÉ èI «8Ѝ¸,`! ƒ”~f(IÌÁƒ1Z>;2ÍÜÆ(¦ŽÃ£Æ)îb•b^@r(Õq°Rÿ1Ñá†wÔG`1QV"3qŽFPéó”úÙ1S/W L`fŒÎa¡…œºT®ìQD; R Õ”1Pƒ¡„K¥»”%d ™ˆ ãp¬ “xs§9‚—>„%È !l®AqHAÑ顪>DbÔ¤^‡Qù%’á"04b†Š@‘BC„Óm†¡9œE™Å'B— ¸¨ŽX¦A!Hq‚ Ž¢B›8Ã&L' 3±V¬\%N^£ÂÐéÎ@· ‚ˆ*Üaª¦|¤ã rêT Ô¤´FS%¬ìÃ1ÍG 0À5"š‚±„AÃJb#Ç/]±g9åÌÑÐT÷Ô$Í2 È`‡b)‡ˆÐ!kvÀÅEë/R…îR¬$÷¸â;v¦Ò1 fdEïlíðE¡½ ¹Gj¨•&ö–È2ü=¨dÆkÈ™@×3„r«Èæ¨ä™ LÐ0M†F ³™é ÚDk jÂz>êS¯CT¡™H¨S0—"q§oÕNA\#ª!D–9óã1Ño2òИA ”‹s“N%8$JC ˆ\@­‹y©I Ȇ ÿøÉˆÃáNwyî½¼µwܳ’ݳ£7Xó¸ôøð†e¨ÙÂB ue:|¥ô\r{’fAtÖ|U•u˜Òʾ|Á¬ï"iPœØ‰Æå×JA¬ª“†'ñ*ÍQä–cï iRŒÖ{šN¢*éŸÈ¶$æôÊw&Üê‹íTAqtö$ÍQ 1{ÊU,…wˆõ^!ê_ŸyÏèþ%Jþ˜J1è”Tlbz"¤„áE;jÉ*ç âs^1­9ôáèÞœbP¯éìÚDòº&•YîN!.o3a®ÕJkSK#Q?y“›QtÈJ©‘W9UyцK!¥Ì-Ä©ù…ª%—8IOˆ›²–Äæ"ò≥&²‡-’Ѭü[¼W£;!õ?wS=.»(ö}«»U»Yθ؋ª³ŽŠ¤IRÕšš´%×:¯w»mš´JzU˦•]èK±*·%0²—JÞø‹B‹!¹ëNU¢bz#2‘šW¢ÒT:¡•sɨ{;YL¤¹*cr2,£1Ù#ØøÔ¨%°¿$Yݸ!ìi™Ð…O«êúŠøE!Ž¢%Qž¨…%Í”‰š†6ZŒ•mÓ{y¦bŒ]+ÈÒ#©k`´~‘ðØ‹ºê”¹}B%a[Èm-?o¨Êëç3*VÎ"ˆ2º#.bêÚ纒Gõ1‰kS#|’„B% ¿± Nr*2¡zï^¬ˆV­æyÈ„«ÕB5GyoCª¾²Û©"™‹ÇÚ·h·ù¸¨ÍJý’“RMsȺC3Çu¸ÜEâ¨gÀ£Þ\¸ÊLe®ÒQ=Qr”¯“Ìï"Ñ™äå$ÕúëYS(hˆ¸=çA"–ÄÚ gÕR\–J¸ŠtÑEc›ÐWU 8l”K[”!š‰JÆ”œÒàÒëò”œ¨¼W¥•9Ý'Ô)—‚7ž¢š¤*œFI¹ã7òÁ&qO¦Ø†êíº]² N©9²VÚò!…HVœäAt²1ξ­éT9ÊTR=RVfl¶wt”^ Ó´¤œyXmuŸ:Ä)k!X›»ê-Q¥Aħ‰Ä¸6žw‘Œv#Ì—j‘¯f Fç,ü)%;Êý´ÖSµ=ðlE|#â6BÝŒB¢g*·y¤§~)$/Ð\)çf«aùâq>E÷Ôr’ÆVG(íuq†ÍÚ6^§ešä …ÖYR3JQg¤ªÓ¡-IŠ|b2ú“{?TZ½|^åÇ<É@ŠÏêF(…!¬¹v«YAøUã’ʉíÞ¢%(å=…ÖFOÃ2#W}Ö“á›9·c$…þA›ª ƒ,é[> -…Õ5ŽÉìÈGD®û|þ®mQ ™BUîÉî!%2Ùd¹HªUQÖ£Éâ™ÈL+r×'¶úH~‚*{­»­¦÷I×cQJX´3ŒBpLfs€è …°G¥ ÿ舴s‰>¼;>Ì3/}%h®C“3YzZ×mF6)¨¶w×§=JËRbتB!Ã(ƒ-ŠÛVT«¤Ä«?¿’ú^ÉŠžA%¥½«rÚ±hÍ@©ª˜®”âÓ9$*Ð" æQÍ­GÝt£)‘X©„O“ü=S[R”\bâÄ£UX¤ÆßR5œDb>k»ñѰ¬ŠíÝLG+Ä)ŠUºkmõe‘Ä9Nª”±SXL™fïY2·ü“¯Žè"%:˜{+« ¦Èe*ó:ԅňʙù¥Çs˜Ž¨n6Vÿ-{äv;„N»ºMÿ{-‚!ÊD“×̉¸¹„ü{ñVãWMtÜ¢ñPs¬´ÄFäÊ•Ls&ãñ9_ÙÆ-›o·Ì|ºq1V†_§R¿‡ ¬;‘â†ÒI[]ùÄÿ^ÉDÑ0ß¡6[è71L­F%tQ{ë/»ò®u¬W¹M†AŒàŽqÖŽÁ² Y i1Ùâ9jÞqŽ‹rN)œv³AÄuB2 ©@¦n66l/öò1"§«Å܆À04"†9Ž…¡B›°†5T´±êÝÑŠáxã”ð¬E nbEÚᩌÃ0d0‡) Ž'1ÄD„h*°LìRáAH(S.‚0Ây®TPna`“ T!b˜¬¤üª,ÆB3»¡ú»ã«JaÍ]'¼ç…õ#Â6™3$"¾Š‚`Ć6`Ì3\WU`C‚ Æ-:8ôÅÄhkè;ŽyÏHC Á Ј}áœ@ÍŒ5d"@dI374—1û³×•ù¡;amÅ &Xw*® "C¤øTB DÜ„Øè (:‹8h1 á#¡ÊP¥¨PÌg¤qJ®#dÁ¸Dþè˜b ò"ïu@Ä@C`™T)Üuäˆ1*í•ÅsCÕŸçu±¶­@È” ¦™ CNO|Š‘ ˆ×½8wcçy‚Hz}vfa†¬G ÛŒèni´jÁ bÐZs©_ò8ˆ¸¬g«KqÕY¨Œ¿p"±ÌèÏ@ÕLL©xËt˜&ŒÛHhR s˜’Ø­^¨°ØX):AÜŽ…^L¬ÚÁˆ32 d¡ŒÐÀC²Eh« LBœê,9N=ë¡ù3æp·T„à›¤‚AÁ†„A‚I²3 g4J  zuBâ·#ÁŠY½ „­–ØWýˆ'“ Tj ù4"”@Á£1F'!k•1µ1r¿:GS”D‡Ê‘Õz1áÅDÁQ ÙԄĨ#PJ!PMQÁ!y@îRž*Å %¾—«ª! qØFDºb!‡a™‘3˜%äùN:刵$½“N—GÍŒ"[‚¡5¡Ä¢Ê B`dWQ !EiÁ”Š1ØÐbP@›3ï‹•ÐĹ „¼¯JÎ Dg< „е+ 6ÄRÁ· ‚!!29ñ™2z?|¥(à¤]õCƒÃ@ߘŠa>õ ™A(eQ±‘˜ídVL­Ð®$JkŸÊK‰!ßÒ/Zå‘ð‚«µ{éU71TêGëWnóßšVC¯E1˜ÈF:|õÝÿ ¤!>]Bì¸RÓº›ä¡?ÍRâz®ÛfI ŒSŒËB9ØÅEÂ2(µ¢95×b®¿óá°Òv¶t™÷k÷ºe‹B»ØR¦­…©w– Â5Øâ¨¸Eúí«áWÔÎrß4½-töT,‚‘™ôßBý>—ANúg2Ü¥ìò6mcºýå)ÂK30Œ\·ÕzRJ¦FÚWžIOJ>ïa“©6KF{ò”Äå7JÕ(˜Ì2úá¤hì”q‚r™f˳7’Ùz-{«b{6k7ö-4Æ+#ˆQTˆ)W4]SÝ4ˆ¬š›âb°¹j‘}ðïÆ¯T•Ü6ãòq«D”ãØ„bõÂNBbÞUs’¥b 3ºæä.\ŽßÙT\uâSÛ­¨¤Äê"ÿÜ–ˆLjŒ§º)Ã#%9L¾DÚæ1Qå˜CõJW8¦SÓ¨íy7:ƒõd!wPì{NÔB"F(ŠÆÿ¬)Ä:‘Jr™úLÃ(©cî ÈõÌ«ÛEúKˆAå)‰×+ÿ—}H‹âŽs¥ØÔ5U9dOpƒ B.P}IYoâ.ïUóxÙ—×Þy$½&*0´ôBnJ^Çg«Ð!Ìw£ˆu2éW_²ò¥_˜·r¥ó8ehߢwÔšF+_•¨Ü,•ëN ¬Ñªvc,£¤ú4Ä5V‚§dtöad¿ÕÔÙš vÕ¤»BxKÒ´{/öQu ɵا(ÃÛ4¹¨´'…:±)ˆ|sS9 VE¹º‚ºl˜©y"q[E•WlåSa/û…¡ƒ1Z„@‡“LEmÊ”ÉèÆL'·ù‰·)Ui†Ð•…¡†Zér«ÝëŸ\Âq^ëA’ã"%“Îô¡ÑÕ›ÁI]¢°–ì!©»"¤{âr?V\ ‹‘1¤ Âëp‹RAÕ4Öû-ò¬ÁØM9Þ“É£ªY­Ê†[7ÖAVöùu‹M–—N‡°‚”ÛHß•c}, Ì0¤V-ÌA‘Kš¾B‹N†=f$±u‹mÏ"éN%’¸´–‰ed]£î EUÕ>-ÊRåN+‚1Ý+lêåÒ¿;ºiçÙˆ§ÚéI+¢&KÉV60®U{ŠG'Ò…bËÑDq‡«˜·µìüù§Iææ[¯ýÕ^Wžtæ¶ù:"ógÔÂaH‘^TËÔ0Å7âK=2uÏ'ÖC0΃ ?õ2ª»Ú¥NúÊØ‚ÖI™l)Â+ÈÆ3¯¹±ˆåbß*@‡¸†¿Bã5+÷ÃNÚS2¿ÐH˜¹Ô·Îo±Ó" î$ÏùmÍ3]å0Ü…J<Òáø¯‚ÛGvKiW»þº56ÜÈy‘#\A…sÃvÜÈ×£UÊÞ ƒœò—$#åõjDÜÄGÙ‚„JK6ª%ôEEÙÌVBã‘/L•©ú9ŽƒæLTË”Fí’AM“aYÌÂÇnw_úfzÇÔ¡Ç™Yw¨²S}Q¥J¾é)ðAB8¼‰1¦¶ AÃç~ü-¹ó„ßû™ÛŸ÷KœšL$›ý)½ûªBPŠ#ÿøÉˆÃžèNû ý¾ÇÁMí¥³’=äO«óÊ{ xé¶´Yu®BÙ˜!$ QÇ C‰“MUV«ù‚`ÜÍ&$+;71¤é¤¥3j¶ãõ¢cí (炨 ;ZRH³Ò•¾~v=’­eú'áïo©¤$Þ^óø¦+œdºUžPÎ|®¢á»$Ú¥E"y •#BayQŽÖñq˄̡=w»ƒÔ/|”zâ|‡ç¶ž)T qË–`ŒŒÆ6 qÕY”Ún£ö2⹂"K!<»¢”äyzšŸAŠ÷–A•âÖ\dñR‡(ud(©SI˜BQÎ}ùå5Œëæa™4Ø”½wuIxÔêö*UIQ™›¤IZg…ÌÞ²;(á0é3C£mGÏN®u—IaNøw©kµ‹˜¾Z±5œšµ·„Dãg¢dO­lü’݆1CR½J2‹yðEtÉ­¹^ŸˆRŠó6½­”®ìDég‹µ¿­Ä99œ`£_˜cȆÔîÃqMT¶>ê®utº˜š‡çÍ'bh¤Œç5 A~‘–¿ú}ŠB‘‚”‡U©<§ºÐ¦z¿q3¨²¹.| —áê¡+'%ôŸéII…×Iœ¥$ÄLA5Bb0CÛúc&J/0½Ÿšœ*Æz›;Äiö£ÔóL%›ŽS!îø KÖݘ!Ns‘ŒW!V/[Æz!ªÅ®¯*Õ.»™d¤¶Öõjéóƒå¾GUvå‘ ³b=È­Óg¯•ç01íRè݉½FŸM"§JUÒª©²ÝKê¦ýJڸ̅\;ØFÓ ªŸ^š«ò=¼äÌ"±q”G{ŠsµÜ” RQûw˜Ø_wslô¸˜ñgëxºh†s˜AH)ƒŒíäöÇÇÌ|¾Ñ—×—l¤IQ•­-»Tj`•G»RR5K[8äˆUé´\Js&ÒØ•iÓ,N+T— s#Ìr²v?sé=µm9±b~óy{w0ƒ”Ä9㜩T±H£RSBf’ˆ>.šúJI†Úî=} Õ®üv(!.T8ª#RG¡·ìÝ.º`ôR:ˆFErÌó7•B“1½XÏd:8’l”˜Ý&4•ÍF-ú¿êVNsñ-j) ‡Wµ–…N*Ñ¢ù7‚£¤&››LÔZP“¦òd¦M=mD`Ñ8šG0R˜s„sF6­ Ú¸‘(>šÞ·GnEÖ"!(Ý‚z2k¥d “Ô;Œÿ+¯ÓªA —NkÔ㔄eQ"K4PZÛ"ßɹ+먌¶1•bQòÚ¹öµ…ÖG!¦mkP ê2J¦µo§±–¢ný¯ÇLj½ ÌN0ãaˆ1Oäά†NMF|Õ3ò$=k)+{íרbÄbÃŽ£>)4œY_<Ý£Ó/e'§[ ëoM³ãöÒåd+륂–®@‡…N°ØÕÅ÷.¯*½ÒíJ“To3ªZÄIŒS9^¤ÎÒrÛ»ñ¿õ~´é5U×3´Kj S`¤ËeUXÌM–›Ìb‡1S[HKRs2–µk.éÄ\ž¸ÂZŸ„KÇ1f\´ZÇÀ³Z´Ìù‡z›ÃÇoS÷õ*©½Oãb¼¤fåtFñbÉl-½ D°¬f!“Št— D.lÉ7µ“*AVb³¿ë¡t–é=›­çÅðd»!Ðþk™B­Þ¢Ë rRוêL(¡…!—-õ%×9nžWoUô'44½â‰,Jµ3î+C˜Rж_rLG‘ûÂ~µ²ûse_‰jô"y9'újN§||+1N¢#Š–^ËïðÑnK>¿ºEj*¼2î{¼ˆ£¬T±¨¥ü"s~â_SEÂ’oþÔüêiÉ’`ê9HO/kiLÝKãn\®(25†âõRRX¸éUWÙÑÅÃíðkÓ”î!Äbb‘“LKI[bn"œ”¾8ޤuÔIjõŠ_FÔ/ob3\¼Z/PÅ;­žÛJõ5du‘²ÌU qÂ%°AŠ…ˆ\4õ%$öª¤ Ї&uY ©÷£kái‘7H–)̵TR!…9Ôî…Ï4i¬4‘»kl@ÅјˆfW5M:l‡«4UÛ£ &rØÑ-S $¿RêS)ÝUÌ!N¦ÑxAEFm7Iý&²Ð¼ÈzÿXÌm+K»Wº AržUL b˜!Œu‘©cnVc+u¹m‰á™3q6ïVã¥ÐCŽaBâ{¦QÏ–R5Ñ?k>QÖIeÇ®ç±ÇI £EDeÈŠ^®•¿$f'^0´ Mº•4ÍÃgUTh¿©Ÿ&Ñ•p¢”0¦+ DáÉÃ÷SÆá4ž{W©^Ga×MwªHÿ1qYÑ­)=ðδ»1©¨6‰%NüÆ¡n…9…c6\¦2 ©ó79"­ ¬ÙqjÝâó^ÂU${xm¶á„iJJŸ…Rˆ€®’º”˜Ñ!:ácBa[þŽ!‡*ˆÛ·ß)ÜE$¢Ø‚È$£Õ:HÜ`Ë5kì\•&b%ÕPg•ØÜ1È9¼UïÚal©«©YfÏnß÷k…s Ú¿ŽÂ1ˆ*°ˆrë~µšE|’í ¶f)•îôêã»DGUˆ’%Rä¡)†ü­5Ä*­{{1lNi‹zÖ§Þp‹IK¸DhŠæUÎZ•Óˆä²sÉ·®•îŸ B×i…“ºT½©_÷±DPAâ6…K£ý³d¡ëAh"þS9Ñ[äÙ(Î㉚è•~•´ªFâdÎFJ(¦)z’Íj²Ÿ­„Ûd¢Ž8Æ!j*f+g Œ$Œ†³Ù2ÏýK6aõ)9r“s;—0©/—˜Áˆnuñ\K˜¹ %ÜÃO7söP+L ˜‰•¦jHÕ Êb\\Ô æ4íÓS¬b[°ˆ^±Euò©4’³KQ\ï"¦Ýï½ÏboILÓ&~„þe"˜‡OóqWYN–)’w~cÊ„UO±þÏ)žB0…÷6­t¤çýo'…`Íf«ˆ23¾Ñþ—¿4˨¸§Æ­EŸÂÊ–*{#ªQéØÞÞB•hCœ„à˜tŽUFÑ€î€rKBO‘’‹ýýPfÔ³”¹÷AU,§ O˜UÝBDCÉN 3 ôïÏ-‘°i.Ée6\ÏÍÙ|Ü·ù‚‘ÁžC–“$1ˆÌÝVú‘Œ2Ž•òÅìeý§Êg•˜¥®/1M½©ŸÛq¯²È¢-NcâH†ñìï),žd3×øÎgì\·7;÷È% †¶YöÔ1gœT«j3¡?u‚ÄU7’C£Yd&~.n/\¬yIµócñ K›Žì”û©W¿ mæk(›Õ8ˆS„Kz³!ðAA›®c‰TæÎà¨OµüUY,QX¶›·ÚgW¶r5v®#(†\}z½Â¬G³;:\\®Ü½…§ÞÞß·lÜ_á…÷qWWpÇ&Ö®(T"½õ D%R¢1ŠF‰ÅÏY ¢0¤PíU˜¨€@‚9äè£ç4õ2pDçR‡1Ò2àC+ad0‰¯R‰i8!—Å!vX¦ =åln‘ûSç:¹›E!rB h¸7•ÀÃJʈP aÍ‚Gu*Ÿ'#¢ãÇ©€¥‡…Â…`GCÑÄ¡Hâ¸F`è Å܈JPÜŒP‡ ZãFÁÇv¨¥ ¢ƒ2“?_‘;z$?S¯!L@Œ6œMè31µHc„9> •Úˆj9 - 9}E(¾òB‚@€C tjeæ¢2 Û„Rú){Š$E0Zç%IèÔ“©¶a äì€FŽ¢@Ãý¯B \…67#©^PŒJCg ±Ú·r ÷2±#DT;À/^r!ˆÙ¬lD FĈ ' …°Z£C ®ŸÌÔ)(" UÕX8Ò¼8€—U0 €†$³(i; Œý—t8¼¥ŒÛ¿]WT)m,Ø¡Êâ:•¾jÁ1Á O–®P#SIŒ"Èt¸U˜a"ñB‘xB‹ R«zbxR EugÈlF¡%8Œ£ @…¥9_ ÊcQ³h…”+#?¢¨÷±†[ S‡±†¢b1§‰Œä(AÌšRyh§ÊƒSÇr™“HôSˆQ80XW0#˜'B3²ˆ¡¡3Sz0ùH@&!’eÊ—² Hƒ*ÒEXì㥂üÝñÅmÕ½ÍÆ–LÙÄæ… é<¡–‚Y•PèZS”!ESžŽÈpFNtG){˜Dˆl0’‚#£cj’1Â&¢:ÕŠ9¥e%gÍ”‡…°F#'+‹+Þ¡”n…ÈÄRBL¤)†èc†ÊÁÁ£p§!P‡ŽbªÐË_rŠtˆ™ ð‡8û©ªèaÚ™!›VLÅdiõŒ9mC1\¢¸¡ÔÄÃ+¸„‚‡»ê4À†¨T0ÀÄèDb'"’‚ ïs%qN§´6”ÁQ×j$+Ead2ŸØ2a ‰m*FM†L ÄGs©à9 X\ƒðÊH¥§Œ(¬ 4# wG~Œ¦ìuØ’ „@n¨qœã!¨ö?ô)'(¹©¡@_<ÄbDëˆÆb@¦a5`‘Ó\nÄ F“ àâ¥'L÷ÐÔŽ* -zn˜¬ q—• Ân#n¸0Cqq d¨Þ”°¤‘0¹Ê–A8Œ ­ åt`†þ¢õÂjG…&C& „Bºc2Q˜™àü¹xAʸ E2±œqЮ=AˆQß…îôCœÁÀ@HÁùL¿&¦ 6\Ä”+æ_AD Wî¨OÊ,ø$¢ ‚˜õ|:!Ì%Ã%úÓž¼¦ 8†¥ ¢^,ÄR¤Äã–*ßÞ Wô,A*È3Qµ¦Âg¡0cRJEt2–EFÆ„a½PµÑ]DÅŒjb’¢óÁª àÌÆ‰!C‘#Ä*X¤$ãb¹Ø*È#£]›ÑiÀ¢1Hlð™ÃâêR1~cKƒA‚e‘-¤j"²Ç âŒj`‡b±b;ªtkH57WHe7|Ã1„™ƒ zw Ñ!+%•OÅ¡D+š°¡nÚ¯ñ›á&9\ŠA1!!ƒC~CXÞ‰QÄl…2PÏyy²ÄáØ¢0A}UŠAÎÄr3)‚…á¸Z领X § Â@ÔFÜçñÇñ(ÊÜð+@ñ±Ä¬ÃÏw%©l†Í{áŒA‰ æ\i¥‘'vÔ…e§}‘¨r%Z{ •º™kS•³†0Á˜C;uðFû6BK”b˜SjGGË`Ô™OSS0°Å·m*/{ç‚ PÑ)¡„Ã@†]å¤!-‘ŠŠ<(!L!hîlʡňÿ±IH#QÎdÀˆDÄt0˜Ÿ0‰'È1bœá–bPRW±Ò0ŽÉ‘' ™œ`£, VT–Š0Eq¾Øá"bR°7D)ÊQ‘b¹ž«–”R"aÑŠ‚“P¤#`‹h…E8†@”!DÄ'SCDL46IãÎ Qb4*úUê*ÑD;*²pÊõKÊÔA†‚RÐq ¦œ&­Áx¸ÍfÇÄï‡8î¤Ds¢WÉb“¥Ê”$¨B°ÀG±)€'U‡0-1˜ª™iE‚ %¯–T>5yò;b÷#sr¾D §<ªŽŽGbbÙÌR*TÄ/‘4B»ö£;jãU‰¹/ó×ͽ$Iwµª˜) …D÷3s?‚”ŠEÕ*y|¨UŸ­Úõ±­3_Ÿ­•˜›ÑÊåíßVÚ“ˆŸó©.ç7>…:Âxç"‰»¦Bç(ÉÏ6YMË3§Þ¸£ˆ½>¤‘[xŒæêg^ªçr–¥_±åB#s£ r"µ¿÷â©·ë{~jH¢[ý Û ïv)Ñ…v6SHW+q‚Œ!±ˆqßIK<…ûÈ! ÿ_E¤¿ÌS$œLR&¿%[±rAXœÇÔ±$:(ç²ÈÎFæ|Úá´£1 rþ“û„d“´œ„ ç™])Ô¹Çjq(I\„çÒå â”Õ{9ÛUS‡aÓÄM£ùÍA2ˆ5ÿøÉˆÃŸïLo˜NeÒ¡ñ´"ÌG+èçùühgÙ2»LC´¢‡¿jºY¥×c ]Α)‚r¸ç2ßQ_ù1q/¸ÿlú?NÃôß¹1Ëé’zŒšB6ª„o#­Îg-;à•žîº8÷}…8ìS.ÌA÷͹»t¡ÒˆlÄÒúåÜ&)=Û;³jlFæ½RáŠä|B% t¼ðטA‹}µ)„e™K½m}Ù¨AìMu!ÐÛ³X¨´Ñ):Ã¥MF‘vÍÄ®ðÎì>¾%7Nº§Óq‰ÉÕT\&7ŒØ^¾&ÔÆDߕ̵#¶’ÊWÏ¢b ÌaÛ¤•šÔ¾P#ÌÈ+‡]°Ê¸MQµ0…û.cYY|†ÝÌû7¡Òˆ~· ŠGM"®UÈ)Ê”QJòfž×¶¤Ääáˆ:î—HŸÊ=CM&f™Êç*Η ÀÅy1îºù+6|Ô½kèµjý^›´wR2b””b:©vR3•¼•)DFÊ÷ù¤œ¨ÿZH[=Âr%"e1¤ÁUjo98Üë3د ”~«ÑQ­ÝæÂ{S‡µ8@§a‚gÜâ ®BÉxœ²<\BÊã-ÙÝÓ’r>.‘Èâ„› Vm/Ħi‰úSß§)]B¦¤ý¿¥Dd-þ¶OåˆØ•ån_·„/}g5 ×YT¥<†Ê1 2PÊF$¤G}­Iˆó%ƒˆ*×t‚>Òa¸e%<¦;U¨c »My\e!{OõY3’—¦Ùvϳ¥Ù~ÿ‰¤¯PȘž©¢¥1Úv¡·KYi„U£:Y“èUÖ Ý·‹†Ò»&û w)‡EüqYh¤Eáx=,tZ;Ú¨‰›5´%H&–ÓÄ¢f ŒH2„\Ѓœ89¼ +FÌAcg…"ÄfQ VàÐÎ! jæÿ™‘„ Í28ïOqXÂÃÛS±·Aæ[Rd£‚SêÅ> Ë8ˆ¬F.Z"u¨-›ŠhjÈ‚41X‚áT†<œj ÑÆ¬à¸ì¿ ¡4Qù¹ ƒt¡ŒÌ„ìÐÅ$.¶ªÃ51² CsÔ5r×ç0†ÇMŒvd “–R2 AJÇ Š•]ïxTjg®úß2 :#ãT‚0‚œÓZø]1Æ"D¤Ã´…¢ÃÇ6(ŠA€† HBˆpˆߡXrŸ0ZçoùÈ[)¾tQ¡4E#wYf LbS‰Á! )@R ËÁØÒ9 †›57DS·"¥! >(•±FÜŽŒCaDÿ;Š?êïjpˆNƒM¯¢–9Gæú³Ù˜c¡ôÝQ¥ÌA:ŒH˜rŒ^;ª9„B3³šÒ •‡¨ìÅÑs?8èU‡* ½Œ™ãIi48Mˈ1efpQ¹;X‡ ™±ü¤]N0œâ&£8Bƒ%áb@”† kCEnB‹ï(Gam C(QŽ^U7oEîJ‚„;§1F®$‹³ˆW9è8Îb§°Â× ÐDf$`Lt!B:^>+ª!Ê =´ÎÃ/ M“m†Hj$ƒ0jäËÁÑ¡JJ!c7)©Mq’ŒœŠ¤¦2 Š«ª1BDi“CaËÄÏBˆ ¹Ès° §ÍàdÔ º™ D5¢·a˜B”N„•LQ"„‹ô«ñÏêi’ !+•Þev¬ŠB˜JªQOÇûVè@œg !Æqˆ"†S‰ò.Ÿ,˜VT7¨Ík•ê׌Ê#b@ÆÛ‰D Q”¨·Ã.Ò¹ È(ŸØ´Â'QB’‘«ÎêèÈ#† ˆéÂ|œAÑ q‘C; ›Œ9Lånb'DƒCBv4`…hcµIÄNŠuçóª;”Ô‹LŒ&62QEèi •±„†„1yÅO’ùÐ÷¹ ‡G‰q¹ Æ!¢—)Ò“*?pÈÁh6¶v¥“G Î…2ómŒÑPµ "™–¡“2ëv‚pňk¨:â¢öaþ!œ„‰A÷\°–›‘xÂ"¼Q\²Þ¤W14¾vº wl¦š§(„¦m¼„1ˆµ[Z[K4'ØQ!fÛ˜u"vcžÐN˜§-ë(ÆbŠ0Câ¡öB÷<Þ6»Y­É‡4‚ìI$/«Ñè´W#¯WÍ_VjÒ‚˜ŒdrFòT3T²PÐ’x8pÅ´ÅiaoÙ$ž!Óé ÆC>Õ±Äzì8b”!Òu%MQX„’-mÉ1Š#ÊNþý–?Ôî_ù—þ`*—´å–`Îòµ OÐ\*ãŒÌÏBòRR–|L¯£4˜Sp”‚B\HAä¦lŠ Cßõ-§C­~e§ÿ©!…1ºÑZ˜Ø( ÅìBæÀÕ((†Ç`^gÎ cØ¡F,ã’ŒC«ŽA3°RˆŽ²=^À‚1ð*r~ñR· LËÊ ÊE 1Á/¨6Z¢‚cx=N!9ÿd‡ÞL*ÞG2ÎC3RA0XSbB`A†!5ÁN~@%,­}"Š;” Ü1JRc&ÐT¡ˆˆÌPŠ‚¡¹Ç è‚4¦p@!»êüÒbáÈ# G"™[7Ÿ)ÑŸ+0µÔm”²OÌÍ—ñ#fW^oB!9ço] DJ;!ª ¤ 6!c˜À…b©˜t´$`Ž­'æE¼ÔA‚–(vÖÞ ýås“Ó„I<¡„XqC„š°1ˆ0EB(„„qÌ]‚:„Q¬(ãŒê@P¤¬ ½u1 +@Ð º™âŽ@KÑ™kÌŽ•Ù„™1ÙL†îäð!F‚6Ã"/)_w Ñ„2g£F!ÝÅÑ(؃Bs+(1Á=3ò[ì„A«åë¢ÞÁ;E ‰ QL3€E ?ä®cà@`Á›´!жï@@„ª‰ ®j`Lé’œ®S!hÊÄR dÏù0 Ã:½—Nc1Þ $‡(*fBZÄÁªž—H0(–3Nœ¿•Üļ3 Å3Ž„c<¤Èü! LñÛ‚"± TÃ× qsµaJ[aœ¢¢„]a´B· Q'1¸20 ž[ƒø/ 3EB¡/ƒˆev0~­º/7'-êH“p‘º4z*! –0䄊éX$ÌñÇZá0Œåaêa}Ä­8ˆ jîx¬D bd‡!0Â/ Þ>‰Üv.(P~¨2 •ÐDŽwâ1PÝ™½ -5âBB3 ••ï>(§ ØB£«Â:UœQùJ$¹ƒb0¤’™ Äd*”ÅÍ1œ@„£ MÕ¯ƒ„9šq•ÒîH) (‚ˆu¦‹oH OÎÈm³ƒ€ö¸Jý!€†CÆLB:R+”¨é î1f¶‚3–`¬Íùn†[8¦'02Œì"ÄÔb0°w›¦/ ˜¬Ï XQùYG>VŒèS @ô*(ÈA iqvS‘3 ¹5Â0u7!²•ŠŽ/9TJ!› {a~/ÁÛ1FGöœq [ˆ”v¯jí tfã F*:KIœ)æ)7#¤^8̱ísšN!Ä"øœ 1¡‹Cº‚àA„É¢÷ø¨W¦ 7PW¥Q¨BˆˆƒÒŒfˆÄhÊ“ø!z¡IÙ˜@„NQKGW£œ„ÙFâ‚9aÎ2ñŠ˜†Ç¹d©–™¯„ „*£»iX(B(”U´ÌŠDb”̨«S4@ìNIŽ™¢2Øä…ˆ–ÂÛ5ŒhÍ6@pSIe+x–)6ÚzÕÞ^¤JYUÙ“NšùMͱÔA‚$a13d’òŸÝÅv0‰W)7úÝt!·–øÂS¼åB¥):Q—ii¾Ù×RˆôeJzWY Ä+”ª.-2"U©…]23„^!yÍÊ»ÕTÞÜ5èÞ4ˆºG+¡v¹l\]¥È“+)£)VŠc‹s2b¥¹u¨2Jkÿ^Œ­|ɨµ¥µåLú7ânP‚-„Rò”z¥e~|¬„!¤ŽÙ? ªERò›ŸmU õ>vѾÂÚ‡¡Ñ…öò¾oXÉs®'ÏZÊÇE#+£iåU*TD•dߓ佦֯åM5³6ˆúTk'ä†g½lQ èuÈ¥#f¡lä|.“lno.à‚jS/[îwG´‚é5*¼E@R°Ì™)t‰~¾”¥$ëf©ë~æê¢Î™‚QPæ$›BÐGMª"­2„_B9œ¹¼˜DñHM7ÓʽX˜"ÊVWªž'•ȦÔÔDIµ®úºKêI)yx­·V!LVådÒ%R¡Jƒˆ„¶rg¯éô÷'¹iAtR1Õà’II%¨¤äÓ½ÊcÏË´q„)DaÎø·°‚¾RPŒc£K®ØÍbYLZ+eeî©̽D¢×„󥛥H¹>þ"QR‡2ÕJªDÿÜT¨Tc;äUEB­ÐFâ.;n×û”ýýÕ+`»›JÖì*ïB!Ù©™Esqr/át‡Ê—±&Öc’ŒM5«Ô¯®Ôž)_h^v©¦ÕrŽU!%tí䤅 à좪Q-ûj²ºPe;”µþƧÞU tÁ‰V?•(½µú>)Ì)IRNŽ^·S²† B5޲¹µ“H ·% ´'S ¤Eç&“6—Ù4ØWa U¢bÓkñ\B2QÖ îÁv:”¯ô“úí¨ieK”«-Wï°ø75’®se¤#wÿ è,1ÑÞOob«¥G!¨…êomÙÊ®Ä/ú+R‡¦ªwUtS”…JløLþÕ=غضgÅJ4”Û jƒGDöL¶¬®â#Ý“Tz6¹I—år#Þßnuê1jsœ‹…/“KZR(B†åSné°º›Øüõ!SÉ)o%eÿÚ£æ3Ej¹«…A ¾¿DǾ£§=€B×2ÇSÓd‚*X»sŒšÿÔÅY¾[}¢™Ž0K¥/³I]Ã*ªˆ9J•^K'þ̺SP!Ô®ägw69ÏíùëTfÔª{­wIòÕŸŸQ’Å:³—ü˜Lï!ÖΣŽÂ+6‘k~ÊÝù•*Ù8–.WF½e¶×Ó]ªeEK{á‹b!Pìš'Bê”ã0UÓváD1 ¨Ä¡ôLkW©B aLr¥„ÑvúöÖþL­Œ²¿¡_©y“ÑèÅ!3z·˜‰Rå>ˆ÷[1•~ÿñ F;fôÞ¢ðŽR¯õ}7­M2\eÏ!‚Š[Rœ³ûIB¡Úªèío¶õª#cnñNB¡tN'UªŒü’aL™§‘]Ù³eÖµz‘ʾ2ÓP–6îÕD£™%qÜNù)c~rг9.Þ\2ÿøÉˆÃ RNý0þ²8›·tÎÙ³’}Óžïžò8ãú†z É8ÝŒ*•ÖAèjn“X%ï¢CRWBIbh,ñP=:Ä(Â+ %F(ŒQÐDy ˜ÝRÉD®ufV —Wõ´bq¹ÝiÌܽW!“¨¤$ŠK2NBH&,^aL^~r6Ê•þBá?Æâ‡/5ul†N«… Òã%x÷èÿ) ;VQ³Zd!57“޼•ƒ¡„T+Ý„b3/UeR±EÎF.Ó©-j"­æÜ±ø_òÒN•J_5LåJk)j#ÙpBÈ_™¹¹çõÑšŸˆ[·—#+òjÿÐ÷^§.ÞëgC©mHñÉBˆ@äÝž QFÎ?K™Jò.c©Mš\ÝÒ™_þøjÌò5NÊäÒ"“íú¶;Ô´(WÔ»^Ê„wÆQªò*|¢{àûÛ¤’óaB$™ÒN娰™¥m‹EFüèΊqÜuÆK»D-·OæÄ'fѳUl¬¬Ìap¯É'aj«)"“½\‚#£S‚ÓÊb*5蛩¡HbÉÉ?dŠÓ©Zó—|¡®™)3Jsµ%'ÔGå¦ÉäÅ‘ 㘧~I¡H¥DöÍ+¹Q÷:Cý$Ñ:ltQïÅ!Ü‚–ø_á­e”M&ÄW΄1n¥]I”{®g7)ŒÕªPÅÒÜZ!Ô)—‹†ß.˜º½Ý_+H«Hœ´ªúV‘wÄj¶ÿƒQ­Aä-lh«¿â~õ¦ãÝ¿^ˆ*HŠ®ŠžOìy•KˆÈî#>)ЩhÈ!œÆ0ÍâQèÜ?—äebîÞœRévZgd²s]•h+X á‰bœ†!JGuñÊMOêe³}Õ5[<¨"åäú~ks;ºZÿ…åKû—ÂG*¤žÈ" @èNnÎÌ~‘WIuTôsiÖ*oŸ7ŸÐ‚« Tsn+Z4­Üþè+œë)Y\å"¸:ߦŠˆçÚøCÓ Jöy:+¨Éïi¨[~8‡¥ê+ÆZÅB J¦Õ–b®‘¤G“ÉGÒFÆg¶ˆò¢QØLãݱêAhKz¿3˜üø­&§¶gUSÈ3”EOI^%1+Ù´äI‘ËUâþZ1¤—VÉôVyXbëëÇéh“Å·•D"r9Ê›=˜ECµ5IÇ“ê›ØÍç²bñ¿´òá$ÙCS‹á‹¶sH©gÌGœ³6”´U“‹äíDñ£ÑVwáIvÄ_¡ºÉ¥l(š>¢2Æ1­Lãó•×ü}Ãæ¢ODãÒ’,…E“÷Æ~!¨¶lcL5©È´K³á©[6ý«:q§5„(¤AØØñÄv(£97B¡”@¹ÍÔ.·hœ'fˆâfeSײ‡“=.WyŠ1 *«9¦+™ƒ&¸ÔÕåWצYœÄ\usÇUÊî'£;ˆ7É_Ô¡ÄÔñóâpëbQ¾m´WDœA¯I*¡*ô´ˆûˆÌ©¤æ6[l»nJ7*Øž¢—«ò7q·^®"oÎT󤎆%TDÆA€£Šç¦%q+ú= OÇ}zÈt²bWå² óéˆ-ófE‘æU(©e ªà‹äkõ\ÂûKFRûÕªíQM:¼î§Ñ2噵œÕì®b…t8ããï=Ûš“쇹T8¡›mîÂÑE¼‰³âaĹ©wµ t|ùslT=E£vÇ¿ŠCkÜÅIu]a°Çdv µñÊ!,Ê»þÔ×.°K…¥:E!¯w”¦¸ØŸò÷¡RiJ’)ŒÞ¼GªBˆuâbS¬YÛ¤mÝ4¯Ÿ[ܤ9UßuÜš¯çÎ''òKXnºb[5p^º W(ĉQÉm¡vŸ;a.Tt­Z¿_{ªP¿¥ó-D-Y-û·wÌ‹BPfÓ Ç"]V¯1*‡föÅa¥§…nlÊëÓtøÅäÞ±«„/~ÔIé,ŒÂm‰¹qNb1^aWk°‚1«0¸‚X–×Û¥•ŠTW9•=¬–ä}En¥?ýŠ‹“1«km}(½ÎìÅ/ `wëë¯:YßÑ‹¤"|‡¡4¨âT»Sr¥—jE)03·å·)Ð]ÆÈ"º]9˜ÇBQË&8¡Ÿ u=ODû9s«¦Îâ#0ÎÉ=F¶Ú÷5‡.²¹d_-s –GWB f5 TDÆ5„õدfÎRˆèF/U ˆ-_±¯E2¡ ï|µÉæç&£rðĈ “ý8‘>Uë–Ä?ù^‰Å7õ7žeòÞ+ø…ˆ]\À›¨O7z.ú\„9˜d1!j%™¸B´‡Œ)i©„—(ÛÔd^â-‹\½‰L/Óö[¢¿¯+z¬…(‹T3+©Z#k:\ßô.!.IÅs2¢ê§œ†*‰iôC==Èlü2–_3iªò! ƒ©ŽÄbr£íSP­_UöêU̧®»¢Ñî"}¥"ëõ"yqÉG»™LUB£ótÏ*Y†(Pl±è!”ú+ÚQqoª“°¤ê6ÞNýÍ£|˜”Omz;“(Žr)ÈMöyÞ‡=Ôwå/®È\! ÂB½hU:ú%’øû¥ ´±Â{Q«]¤´K&ª¶¢ˆqÅ[I"\¦ëbYó9½·än­?Ã:‹v²‹ÈÍý(™]U<”£Œg…gzv(ÈJ¥Œ©‡R #Ã鬸®Òêùw7›ÇqS¿±kùãÞÛgÅgÖê\·:«"Rìñ'A”˜Òli‰éÛs— ÁR÷5‰bΪ¹7_ÚŒ·6EOšˆ‹jÑnZkJVUtR bw‰bYy/¼™ˆ…nâBi”Ê”þ94´°”/R'-‰T± T÷2]+ù]YÃ2ØaŠY4DeÙ”­ÏßNvî'ˆ?ÈäßòwùOüáþ¯ÿ‰ÚæˆËœbøSïÏëƒ!Œ8'r1!á ¡ƬL/Eâ$µI|¨¨A÷êvæ„Qb™’˜áˆè…ÕÄ% ‚sây$AYT,8ˆ978¨âž”ÿ!H‹(„Í ÄÉïŸ-Ôv,XE NB(Zx³ 6` )*uS);˜«ÉD!ºLV—Õ@¾;S51O‡ÇVDHNHÄ Â2ŒÖ "-¼å3ä3§,-„C8Š£Ç Mv ‘Ä+Q…£ñTC¡óÄ*r†ñ]еäáƒõ@¤Œ#! BÌ;RDIÐ, 8ÄÀ…íw£s ´Åµ8ŒÖudÆ¥!ÁiÏfK*üâmêAh” HÇ1ì.±6+¦Ø9÷.$Bu'Ž”2pgµÆÏàv=âueÎ! –JGQ…Q¬"è@nMóC*§5xaaˆR,êz+ÄL€Ô°J8Œ¬bD„ñ]æÇ†åB UƒŠÕh!Ã|NF81…ŒBˆc˜6õ ?PIÕO2Tª B¯5æa /È”W™>xˆÙxî!!§*àä*˜NF1 !•6éËH!2 …Ê9ƒÂ+‹¸"Œ’r’} !Hò ›Ã˜îJB)ŽŽ°=R·ÃüÂIÀ¥VD @_‹C`ÈÑœï¤p”Ä2°£¤¡H‘¾©„tâÁ ÓŦÄ ý+C!DÅåLPÎDðbB–…P‡ÀTFª±>¦‡¹—(/lcZ&h;¢ƒ Ds¿1uÂd»…,“E”;ˆÀ`œÂœÃZÇ1Hf…T%ˆ<;˜Çf/,®Í;RÛY„‹(„"8¦Êé„0a3͆AÒ¥G8´£#Ðvc©]RüLla™!ÌpœŽ}Àc¨D@T=Lâý€€A™ÈÁ †SSšºJ”†f~' ´ÁI;¤Í’Í 9Bm"’LƒL·ì¹q3!òªw]ʃs9Ø@Ä~yˆB@‚¢øIé“‚,Ö0¼SB†QÇ&98ÓÓú1 7œb„(Ìœ"ªòa‹Ì…A”Ç 9ÏFÈ‚–á‚(´°åb ÔW$Ê…qò z¯ iÍ×i’;£umØQÉfÕd«™ˆÈ|©ÌS³D¡ Sà[ÔbóíSi{Hµ;V\äD*Ù}¬¹3QËÕNÆ9Hr²þº;ˆ.êî©—©­vÂ×úã.õÑF+veœ{w`C ù‹FOB]2´ã9ˆÝ~+êÞb"~ÎC†*ü­¬…Äb³ïV¬Î»Üô0M[ë”ÈÝý®È”nGBã°eÏB\"kQ83j®Ç)™–žN§ßÇ¥d’ÊT&û;f§)Ä;›L‹›Ý1Èž_«Q þ†RPÛbU©B£jÖÆg'Þ­)Æ}•žëº˜UmÍÖYâ!WßûxtÊ ü™P̆汌á̾DcìÄiUé&1w÷Ån©Â%8Šæ6ó „6Ûä(¢#U—Œ^ݸf¨ŒV `Êuêe† ¸Qsˆæ)¸@ARpQ.f‘GH(ŠCÕNQÉüspÛv0™øæ½r_):©,å*lTÈèÄ‹”^¼9¬Gèã ÈJÆ0²Å̈&3xW9a4Pb/qV\ÌQ”Ñ$0Ÿ$—Œ„ FŸNPÎM¡1ÇB»ä.V +®‰ò„(‘åZÔÂ"0䢿J4­*s ¸ §Å”pÝLæH&!1H¬Ìa«„9¡¸‰Èðï„BUtØ*¹`€€Aèƒ @Ž>¡#8X 3ó™a›Šq •8!UUׂ}a) 4ÄL!¯µ@ÔbT¦ðR;™ë˜XÃ2u‚Âq;ôTâbÀQH7C†á½wBdâóbƒ2 ÆÌ0 pZ!c#3B”UøJ^åŽR,0F7+r*UÉNH˜DHÜh## 8Ÿ¨LfÒÅBåœÈߊUÚ¨ÈKš"ÊËñ飯ʇÉYŽäwÃÁŸ8Qª&Gr„gÌV%d|R¬`æn†t‹rhŠCVÈáлi‰Ãa«‰Ø4œœŒ(…nrqC _G¤bŒt f2¡é“åtCrcÜmö@¬´È&‚!û…mŠ‚)B@¸˜(cJ'A˜H Åf!˜BhÚœL«”v£‰Ø#çsdöºô::ˆhÊ݆MË4¤-D0ÑÌ%cE*ÀAvö;%0Žl#¤€‰0Qqo!‚‚W¦9ÏÕ'2,0˜`õjÂ& B3C Ln‚cV1Û+>R*ЦîAhza¦ºRVsDa;‰q¾ÄÒû­ez¶]e¢2%HJ@ÎÌe‡¨R²–=6D?JŽt?º”‘òŠD ©TIÈ#TƒBz‹zVu\…²7¢izÿøÉˆÃ¡ULÿ þ’þnþ«ÿThÚ´#T!0o¿jxö|pfÙY$ŸQßý—Xrvó‰%!XÇ¡9Ĩ„áëª#û=IR?¶r1Ü"]ñKr¹—[àššRoqJBµy¿d¥5nb) ŸÂc°ÕHtUÓ3Õñ–b }ì²7¥(VÐ…ª©ÄGUؼ-Û_™–¬Éž„æ­¡-ªÆõ;!‡ êç<–û½}9‹­Öüäb!ÊÄ!l…×݈™k- •D¬¦aJ«Ã9v9ªébÕV¨ ê1Iºå0MþÑr½]¡Õ aÄ\"i²¹¶Ÿ åå[­Ò" !å\)ÔÍÊÈG¦=(‡²ÌéÍB•pë„E+ûŠF=zÑ­=q*;/#\ßï? n[R•Ê"2{¶·ö·%&.ô¶õ\cP–) O)Xf~7T¾NÜÇ7Rl6ØänŒä9ÜgAÌ«„©0„$jHtzæémØÊÌ‚¾­Ñ+å¢×)ØÍ¸JSÊg`åÄ»Š¿C&îbm_™wψG:ŽJ}E‘$;9ÍëJk~á_/#{¬$üšéµ(ŒK°Q…!—°ŠÙdE¾#~~ï‘î“üö['cÛÍš•W,šÛo©†"÷ùŠÇGÊÄ¢V‚-Êã-ŠqGëñ_eäý½¯«BèQ­FF~-0ø[ëeTû-E)P—*3>Š“É2–C¾£Yù„ŹЭrÔÔ"»& ºÆý´þY˜Žìø˜ÆÞ¦úFŠÆ IСÂ">®]÷÷ýë%wyP„YUnDŒâz!þ¥IJ[2ôK;7ö™Ö†9Œ“ Úb/’ìš8¥5e«J­Wõíc\«ÈšÚ¶¢ÐÙ% ˆ×?iè¦ãcâ7]†!=¨¾ÆÛÑð¨µ|̲`„WWþ!•°ý«ÙD±Qw±5rR+ÍñeÕó¤K&‚Ä1F'.Ü鉌&>ä’=QñÕ*U¥?•†nDF¶Ë&ôÄuòQð­"ŒÕIH‡N¹²¸&ȹ.v[dõDDKRª¢S…ër¶ËŽna‰Ÿ¦IÄ—"\·;¢é}KüÔ!ŒÎ|Lâ™NÒ¯?cþm¸R.‰¿ïº%ª¸%W‘‘ʆ*¡ÇAÖä;IµäôÞM5°þu®yŽž­0Œ›þÜj#m¶ÞVæD£ß¢^îçJ6’Å;‘ÄH!ÜH&ÜQ%Œô´¹E»fk3q=긗Þ!¿ªØºŒŽ‘ È«’•YÛÓ ¨ÜTÆýæåV™(ÅÖŒ·'P„3 Céšd{ ÄÚYªÜ©Sô¹%öYB"ÚFb˜aSÂ%$IWœ¬âz)ɯaH±Œ>ê Brº+B³¡•ŠT(7aœ˜"##NÁ„ ˜¨+¤ÈçVèÚéš%@LR£…0r«´Þ9#só P#—Ô~ š]æ.)Œƒ”G ™Yq²;ÏæËôpnFgH+^Ñ1Ã`‰ Èqq3wþ{‘H(ÜíÆÄtÕ“܃¾D„J®S‡ÌAp'$J`† aI@@ÌxB/mA^˜@‡ø±ŽJ†x™_Å:¯‹0CÆàÚU B# ¡?!ð÷J!ŠÜp•„*7‡ ˆàáT°RRBÄah°8ÆÅ C6 €† (›B!¨YÿOÝ‘•„0gh|)[ „[Êt)ÍÎ-¡²‘92d: ÀÔבƒ8§)dÑUžD 0ÝëDçëÄ>âœÈC“ÒŒ@mÙ™¤™÷3Tò‘ %+Sr ªˆü˺¶Ã®}¬•rúÆé¢”Ñ!ŒfC Ø«@¼Wœ‘X$d4G¬ Ì¼¶³–3Ó‚¸(qX@l! ¡8DXr `1 à¼Àœåd‡BoŸš3½¥3±E‰œ9w u àÐÆ`ƒlÂ%^¦,C’‘Q3C"':2Arð…Üd7¹yø†4½“„°Sþç¨nÎ9SÊ' J£c•RÇœ‘Mˆf,«éÌÕèƒÈšˆø5pS–ŒŒàH•a”HbàŽA„À%ï†Ojô?4@A@ÂñYØùf”ê8ÃRfÌÆ¸ŠÉ€… ¦˜AU0FSä3o2;X‚á†Ká-¼.+‚9’¡œ 8ãQ•œœ „ ƒ-LN…#³‡YÜÛˆ‚CDIJNJ”¸wÌ£ &ÁËiTˆÁG2LÙ)„@Ã{@!ÕN1F·¨”a­éüE+ú G"¤³s NåÆVȃþZ1'däÛ9$x˜%B „8|ªe£(‚«#° ²Žp:s Â D¡® Ÿw|(бÂgn$¢xB¹žŽƒóP?ãbg¥©Z¨DˆQ¤H4a#wB`G‡F(`]cë{ð$ d"Û ÇB©{‡ú°NÔ£ˆb˜¢çªlèaÆ„Î1ë«E®”0|pªÇĘ*Ö›NS…‘ÊžªgØ@aÉñœ°?ßò„ã?롉Äv`¬ô5&/,¤Á• ô«ÊX^4!EA @HJ!™j˜#ƒOŒC¿rKƒ¡Ùª0a8Çg´+ácŠî}L“`ÛW F™U"JŽD¤¨EÛ˜ŒÎØA‹¡BúEæDŒÄðêŠFf\A‚† ÛÄð={ؤq Á+ˆ—*ãò]bá]ˆX¡È¼¯õ HC˜Ú5ÐD©“Êl!‰ûl§‚B¨¸vá Ä5LœC9X/‡SㄇHH € 0è Ђ­ÿA†(*œq÷AÏöa—ž Ès“™†%n•Ð Á¥£v9º¥{¬ †H„‰¯v›‰€H}f"xÂ= *]•ϱ ðÿPÜ,ü‘3‡†@Èß¢à„ ¢ÒvZvŽk™ó¡Â(@WjS$ìá€B˜½`@Ë’ˆÀ1R°¤7›6zTgGTŒBÒ¥!ˆêÆÍŽ£ŒDÿV —Q" åC]\t¤b¼æ4½Q¯€Á@Ì‘6jT$ 9jö´å5‚¬c2½q#¢Úšæ0 #˜Æ7BŽ‹Æggf*WPÈÏé§ñÆ¥@H“Øâ­ˆd¤å2Ò sL‹O©Œ°¨62H¬Cb²WM«^¬ÀCQÕPCpî fVU*1—óIF|‚ÍÆ >* Èáfq–¢ !_+l09 €œ³8(îºË¨B ä€B=âàÆ:5iÆ/(¯u"›aª9Ð.!PqZ°Û:t‚N´°$æ‚â Δ`Ä£Œ @Ÿ– †[µ$E‘¶¤F2«Ddó C”è¦qÖA††|þF`Å„: 0ÐDI „íú ˜Ÿñ°A1ø.¸âûéˆqú’S(³±·¨)2-_Á“"#j@mÅpè‹p†®C‚Aô(l!æj3ˆà¦WÚñæEˆägÞHBø˜CW„ Dg3 ‚S'èuEàڑͤ¶QE¨æ(AÀŒ>©²ä†1õ‰‚UB®„!(0뮜 ˜ªäBpŠvicDø:šÖÃ2!@ø}²6¦¡R}•PÎøNËÎN› ‹†èV}ù“}ÉÅA3Vþ60ˆM â?ü„ 4Ø„ôE G  ˆk!S ÁN‚DZD¡W¸„bˆ¥J¬…" Ž!ZAJXÂ6 ÎÂÇ$¶»ÒÆLÅtèµG…`@w:ƒ@ð †0ÿ†pP®Ìqa„;r 4¾á•Ef6-QÂrõ§¤ îA™7@ML¦fVÈ„~áC;ƒaùΦaaÌ8cއjx)UŠ2<ÔVÔÈB±„C º„2âa»¢d(e­Pô#˜¾!°‚™$éQqA“E^Ä":@äå6S$1Y•U¤"R¬~% ‹…ðÁZò2)¤ßâ(Q³a‹Š+¦¡Fdm°€Î#0fÒ‚5 ¡B  €¿¿!0GDsV AЀ阺÷ÎSTE^2ƒ­(Û†tiª0†lCÖ±l6 Æ+‘IÐÀC êRŸqÚ”ûê³…(âÚ‰A:*˜•²b" ÐÊÕ†ØêPFÙÈ¢Nr•¡ñòBª> #³…# ÚÑ0”2#(s‚‡°l. À„_‘\~”hF*nRò:lv‰r«f~›bÌD05=ÈJMÄÔiC!„v(bപƢTak¸¦vVPR,›‡Ä ±‡:öÃòRQKèƒ e-mÁ0”üU™QHWXBØQ*×)?ûvQЄ "'IÖ3n^)ˆdvJùþÑ­ ïr*~_Ä Ò9˜“bb™ †w PDCª7ž ÃòF¯ÙLœc„! Ça ñy ‘ScˆAUgpzEÈ2CxœQÔµ"²¬h`Gr€ÆÆC†J1E6¨' èˆæ(r’0†(Ñ98ްw⊾ö*s¡ y±96DŒÁ¿ ` †" A8¸%*ö`„%ÂÅrqÈR’nçe½)ŒecœPagg 5#Z!B*1ÖÁ¡,ì0M;êF¿›ËCöÿÐfUî\Œå Â3Ãdt5!ŽŠ5™Â ˜‚‘ˆ*pŽÑQPÙÄDJ= uBs°´‰Þ ÝœŸˆw@á„À`™ˆ‚wm5 ’6ºŒ"„#d¼Ì@ò’(lÅØ„PŽw0òî È¦Ä¢\-#q% 'Áv­”‚”Bç+KÜQL+ˆqy’?Wûc”LÔ Æ!!&v¤˜C„ë!ˆ5C…ÎPžLA„ÍÏóê((Züä)S §t\”®ÚT‘fHvÂA±ÄÔ›ÊÄlEø-#¨»ÌÛ#GS x†é¹AÄ!LJ)´#;ÈZ~àB Az—‘ðwø¢zv¡ð}ÙÒ"* àÊb+Ðc0f t B:F &`Yˆ:3Û¥C1Ï,ü)ÂÔ§y”•aĤ¯”‰H² À@ȘJÂç`Â9)9±W$1åk zs %cÌ.n°0f*½$b/&‘¡øØlCŒÅ#¹Â*ù¹‚Õ¬®* ƒ¾t8êt5BÛHWŒ äC$0™6d2#]eÄSa ±X+шÝq„(øú¼]²•_ˆ¾­ÿøÉ˜Ã¢þNBq@[ 9ÐÈ Ðè´¥'8âr÷› ΆB¬h0Œâ™DQÈCoV"D¨Œ# ÐpÂáõÆw-Ý0ò"1‘(ƒ •Þ™DÂv)ÙÑ8&JÀö÷PëÙDPJ^®…^+™„TG¤r’OŒa¡ 0 .£¼AŒ3X9ŽÓ‘³"5IÎ(¢‘–lÏæ¢¢¸§I•SÈ1˜cPcV•%ëì3 Šv}JÐäžKÕy- u J K€KD4 ˜Ñ‰`¹U1¨È¨ÅPP]Ü1…V×LU/U…â"ìuŸ\òŒ5!©‚b%1F¡Ÿ4 ˜†ª3LÉ.µ¹Vš8œÆœÔ)ÅÔ_‡5Á¦§_°ËöêÃFæD© jJC«s(ƒÅ\GL“åQúº ¡m¤ÀJäÌ‘1öj@Ù†mDðja$%czRCc’½@åAE‡öDmà±P¿bŒ2¦¸¤d©‚a-”£"æT ÄÂ6K¯«VMàœßS‹— ¤YÈT:@°äøÃ'! Êhâ"AÈ‘VÙ»Á.0`½ ì2”pkMÑûBª|a „FHÈ¢T2†Œ! j‘Ô‡ø<•DØ¡/aûŠ)ÊŽ¨V;Scþ—'&d¸‚1„¨…"“ ôb†f˜ØÄ˜Ô*LS|ïNG,CØ¥¸ ú/Ÿ“!§ÙãVâpÈA0@N0„ìÉ=\(n„‹š(üýkØ+÷þb" Hèk¹&S1 lha!„ JbŽN|ed8!Q¸;þ\ü£½&d-.×Å Mûu13#Á©¿¼@‚pC°"5ËI ÍçïwˆÑp^(Gÿéݤ~-­Ä¸×S‘Î!\Â!†GÙ¤¦®$­è#©ä£Åu4-oWq&ÄÌŽvÁŒ6²d&†aÏÉHÊÎèb­;«¸+°¦Wý ˆS¸/C$`T¤B5Å ‚© Ô5¡°jÁˆ:¦1–åSi\,¦Œˆ(ƒÆ}Š]Å•.>8Á0Ð8¨ƒM FTD0€È¥x3 \(‚ ÁH™qRFùN[ŠÁSñ@Ð6Ö]\6Å`E@IXcLÜÊ.u´FM¹)ëþðôü5ó~ìo-5³¯¥.sê¢!ë)Í’¬îG&ˆ‡ˆC9–¸E2k œ¬ß‹Ó¿­«zeÖÞ7â!=™7=’F«ô‡M»Ì0VÅæB–¸œ‚<Ú‡!TóÑ.RµµJF Jò>öWˆCš‰ä)È>[NA Û§1Ç"$¢•Š&½Ùo¯ †îBº–,Ô~׬›²£Ò²rÕ”JSíúø:\ŠëQ†{&ƒ‘PÉQ¨b”B±R¤T_ß®c§‚k7½zmÿW^šrrXÒ ÄÔ#zs°Œ¾ÏAFu}U$dËã\–l¶©ÊgÇÜÒ'`¿¹†õëÄ5™¬¤»v9ÙèG ŽB”ÅŒ›Õª+Y¶‚¸„ºª%+ZV¬¥‘1 Š+92º;í˜SV|ÄÆÒ"“™ D n4‘¹99={j²Lx@V*ÂÚ,Κ «à¦)$­‰‰ÌÌ©Q›Bx%o;¥G^ÁŒÈ‹ùe9ëÁƒL1"1_9p‰˜0¹9›l‡ØœM1=Q:5£‚¹Å*´§ùÞ³•#ƒWÕí4!(„H2R„†t3a³•2ˆRš½PC¨ö¤Î)èéxæ(L0bŠ…é® ­ „Ž@†AÊq‚ Ïƒ#?îrdÐKQÛ¶SRkßS9šq‘(µ¸ŒÆf†€dhÝ8Êi8˜ŽA”Âz*œôxp§¤3S¿~ø ©kfœvÁX$ˆÆ!LC"%Hc؆í¥8Ïw82°1žéÅC®1)Yì^"‹M¸#Žê¼ÙFøFP‰øÎ§7­H$M961ÉkÃhE”¢8…žV£lÐÞÝó‘0ÈA€˜# axC¹F`aœ&`aE£˜ï×ÍNµŽÄ…jÑÔÀõÛÄÈÂ@2ÇðZĬAŒ&bN§˜ÔŒ–W.Ó ˜$ã ˜¥Bœ…Q—‚"’2½èèûþa LBýS¢õÄNÈyNƒ¸—b|Çd¢Ó–c3 d:++c zP‚` Œ%`݆S1«×à—±H1 4ýPr‚ŽZI¶M⫹ÛåY¿Ä!Hf0ˆÃ$*xŒK‚ ª-E1TqbþHA j‘Ç+”&‚q«L¢‰`5j)Eé‘\‚†åFÜêú)ó–˜" MÕùW„ œC CFvŽCÈ™’ëf†01†5s+äÇ@äÂ0€&DTr”¡TwU`ëž^&¥ôìÃN"‡§ $0ƒ0iräÿÕ ¨7€¶ž²ôÎ`!M=_اA0ÈŒ­kU6Q Ì! · ¿*}Ç!vc•2 DqYÓ¥…èˆH…Q¶A0ü³Qª5Ù¡­Ì®ÞN†ð$`!“Q<3îÎ3p2t çH,9áGÒ ìË\Åž˜ï­F&3jCRK•B. Ad.;b›¥A”Ðê4ƒu.ˆu”ÿŒ@Ê’Ó=âþã3˜*±ÊΞ(†Œ´C”µ;åcæëèçëí#îçïûðÎJW„]ÕÌã¿äàNû'X‹‹®½ÌÔ* ZŒñX¥)URŽ3ÐÇ¢^¨?‹1µI!*Vfn.16ö¶öJnsÎåaŸJÕt]tk¦™K9¨âP•3ŒmU*é“ZÍèùUÆì›JÄ×Ú&ùa¤%L¾Õ¼¥Äte²"‘–ÿ¤ç,uÒŸ›?žÆÄ¢cWë†Å5ŽºüÍí…NZ#emÇþL™e¡Véˆa%REV¨"! ì5K‚žçy Õ1,×&)ï“àÓ\IO5[-AŽZ¹y í³ÅQÐUJ¥JÍtÎvÿUÌóa ´§>ÅákCHÙEÏ©l«"Õ•šŒ†asŒ*T‘ÉŠ“‡žæâ¡HŽL!ñÒ•.ò®•pZ BU^U¥É¤LÒ„¯SîžÃ/µD¤DõB¬‡aH-ÆFjà•Î?ï}"üÆÍ÷Ž\(;…Äx—F¼kVô"C*l\Þ!8D¤ù# :!8MĨ›ºVêÂñ_Ø ¨RŒ V÷)ª!‰Nb1„6ÐÜŠ¸»Ä¢›¥Oo'¯ÉÇ@¸ã¹‡¥%”É p‹êÌtç4†„EI L"A2ˆH41\3ÓÆT ÓFÙ˜¶‡ql͇‰fogHÌñ|¤a A, Ûä˜éòzÄ5ž.*ª¡l:– ìu5áŽNŠâ‚€ŽÁ€B "¹ØZîB'#r\ÁD“9¦RWS†1LÊiÛ [‹4`AÆŽBô% œÙaÁ”JØ#P‡èüÕv*ÙÆ3.Rr”9–2ƒlã#gÈÅjEJ¦8€¦'˜d×+!ÁBQ©ækŸ_e²=G%-O ÊÉÛ†„Þ‚0˜"S –Ö¨"&ãÊÔžOú”`q \¸fÉz:¶aQ 'Á FʬG¢$20"[k18HàC¨@£,éû æB˜­]ƒ¹eeØTñŒQœB¸"ôcA „D¤tÙǰ1¡ ’‚*,;¢C¨^UT9ŽCÈ!PI’+g Âp…Bªˆ3¥b„#jÆÄ°h®(`à‚¼RÒ°¡œÁ • È^ƒG jàÀäU¹JMÆA1H7(Š+4ää{Ö; aÄáÈœñS.0âL£{ˆèùýÓ¢•Cr>-›¨ŠrøÆ¦NV'ø—\öÕÌ(ØEÄ·PX¥«iF¤BPÈPÏÂ>нG£&c¾g²­Ï!³Ñ«˜œ[®Tô&;Qu¨^B˜R'¾)åÏWC2§R­M\;ʲ%_¹°žÜgârÆTµÍBé´DMçòÑ2RTœG¹wËŒõºÊJ2LÌgê/*{gÐB(ÏUD/gópQ4˜ˆ”µ‹™˜E­Õ[RÈ UêËÓ)(l—ZhôøSˆd©bU4¾ND󨽔‘ˆ*XŒ#7œIh”0’«£S׌) ’gì³þ3{\ éÃz¿#ÙiŸ(Ùݹa‹Û¶-en[݇œ—zÈŠDZ§gi6¯: ¨"¥,«]+Æ»¤ÈÆ Ê7t ld›N¶Â9TzâTÀG ˈVJçïü% sÒ2Ê#²Ñ ‰½|+xòèÕZ!NŽ3yf§µÌE©aY—VÛÇÞ,¸-„-JŠiˆßé– Æ­ZÏWs!QÑ·óyÌWÚ§ðÓ!SµÄ\æ©KSL¼[9S*è²h» ø à €„úö4XH¢˜0ZÅ!Ò‚©ñgó0ê%¶!ÊDo´„ÖñmPjá_äE(Ò/=ôÛ!º¨äySJµ#EdVÂR]”Q*çW¥†=~„†’_ˆw ’ Î'ò>µLãðJŠ{ µ«Š¥iϨ%×Õ“ˆÚ¼\0O^²w¨î§gL¹=dÞŽ*Q•a&¹ÖÚR<ü!ÓLé;jU¢Pa÷RÑ(瘲HO­õáeð fîñ•hNºíÇ{»Z{·”£Ê¢/ó¤=¹Bºð¤¸­Ö¨\#‚\^ÃÙdG‘ ÅC¾êSú„6eÖiX¬…LÄÖ%™Z!.Y¦° ÉÞú“Í\Ȥ ŒÃÅ’c(šp( ƒØ)át`°Yï,5À©~ZJÄEûç)D@+–Kz(‰ÍQlþ¤ÖÔG㦠-Mm¿¹ª.•{,ôW¹ ­Ä3ÓG/M„tPˆ’tïQ¯KÍ$X÷3©p „¸Ä:Oü‹b§NÍÒ5¼ÙMªH¼câåuTp™1ü¹wÜÂhºrø®B-SxaJ*Û¿å‹0 3ý…4âGÙg¬±ež§1yn„ˆÆºqs‚´á•Íb¾èŸøõ§ÄÞ(U¦è߃F=]˜áÇ®:¾(¿ÚGbŠËÉ%ñ…j0îbDr¥¨ÍKÏN,¢ñg-—Í#õ©GJ^Cb9$f)×*.©v#.-ˆw¥„ÊP“¹ŠS[7úJzºëv-§ó+Ì2 4-iY-½%༠’oʤcÌšQ*vgͳœ§SM‹.DKk~bTÚÊÄê(né'nbIõáE™ðp²4ꢔ)ÆOÙä6“AÐÂhâ1ØC ¹Í/RmÛ8S~HS&·ðUK¬SŽj~Å9òÞÄÆ»UmgÃsñôÌ^’¨¶]zbÑë já”ëb ”¡&ž¡C#£s¹ÏA¾zZiª#e$9(µ1E/±XCAG üœ„UÚl¹'‘ ÆÖ5IbÓ$W‘¬&#ê¦b?ÖÌ!œë(½…ž¿Â‚ M­Jž3på«:ô³Õ ¥D²¡Ÿz—/1[¶/é\š”LÂYúuœ¬cä¿q$5&n-^–D-éáKè–V–Hߣœ«:#˜€Î°þ;­-yú^xün%Î$‡é[l®Üg#ŠÅ ëB.ÑÜLªÙÉÇ¥ÍØ{r$äG¥ôʵ ädT8F¹‚/]±{f8câJƒŽ9׉\’´‰,Õ•‰'ó³õ–!¨UŠ”P£2 B¾ ž”j6Zž’5,©cr7U7¿ÿê|ç"U(DêB8ï"— U‹­c ’œâ‡¯´×¦ÚimE*¢]ð«éÕZ!PF ˆB[삪äµÏI‚Øôéê¬ÝcH×)—wh$…¨ã\øí1¦j1ª©óK(Å!õ ¢D¹’Bžj~y+Ò6ôE™ÿøÉˆÃ£[Ný°ý3üØü»üðý~þbÿ³’ëœßŸõh¢üX†kAHbc&„®?î Æ£Q¼Bº»ˆÛµ9´oÆ]]÷ q›Ù˜¸ÓÞËŠ‡'Å¥‚ÂoÑÆ ˆ’Ø 3D›•¤KÞ™Zº=;Ðïw;ºHÄêË„úÍè¹dNÔÂû \f½K*Vˆue'ªÿ¥g˜pAG‰(S‹ €„ç,¡AC6¬‰P²|&ÚÿÑ4˜¨åM]!G ‚!O!¨T¥‹ÅíÔì©QxÓPó¿5ßjˆ®´¼CyùuײÊ,Éy°9\‘e(ÁØQBO\¬HIrröðŠIŠCƒȎÆ8jdÆ(’á«M±´¼Š¿×ò‘fÌñšte[‘ó$}øE­Pìµê!F¶ÐWP•'íˆg¶Bä²"–µÕZ%Dîu¬!E­MWªú¦ö1È:”Џæ&‰©L£i˜r˜Fç=$µ0õòÏœ/ß8á y¶EŽÀ`pK|…´¦Ô[ß)š%dµW[ùó\¢£8T3Ò|ÊÛO[åîÖ;“úÄKs›‰=KíØw~qs»¬pp`Á I,!‰=!+Žs–Ž_d§g׿¤ ]¹¤CÑØPÉ؃•Šo­Dôiâq­1nz«—{.’TÜCÅd.²+Ëê#‹•ð„}‹êwa®UAë‡[R»YæºÔ›¾Êˆ«…‘pG‚ zôÃ6Z´ÓSÇ”|!¬ùŠòJ±õ{“™ˆ³Tl²QTÊžºv+1v›EKwÔ‡Wb‚5•ÉÌ–Õ®ãð”"ûÛr(åšÏ¹Š¯Øt|mewM¦5wP!™=EeÉêÏ?‰<&ïJUÕñvOr¨f8PQ…q0ÏéÜ•µ¿l½u©ae%(ÆEr ÉÁHsÿÝRß™ï,„•킉Ýá:ÙÿÝ«}:&sÈKC˜0W L”îY.z âB!ÝùHÈšKîŸeÿ7RÝ]Z±Ø0Ìq(Â!HCÐOFrI~V^Ü^CÌ‚:m0¸M]¡P­«þµE¹Ê@¹þ;¶åºÃLJ:ŽqXdF$X–ÙY -ÍÏò“ܵx­c„.V „Л@œ†£=ù-*7 #£5yÊŒ¸v-Òœ~NK޼ÅA‘óUÒãFK2\ä¤ÛQ9~F§–¯TaN²&ÔNߣçWM#z¸FwjHÚ’V‹c¹ÝW‹êUQðLÚiÜa³Äá5¶ªYlP„,SŒ£3ÅœŒ}âÐl(O¶=Kjš®™åAX¦EÒ‡aÖê?5͘=È¥!Jõæ§{TµÌÑ7 ïš›E˜Å`UÈ´UbÈr},r Á‡r‘&‹tljR߃ޟA-^ºŠÁ Ç:ˆ„}!9ŒJZ¾Zœ¯§¢.¹K—eüvì+Õ0A³å:)XDš•Œ÷¶¢ú`ÆchR®?ÐKÓ(µ¹_oÙ½¼PÆp®Œ#UKâ‹¿­ÙÕÿjõIæÆ¸ÜwÍC¡xãcöÓ©ݎo¤âœ¤Û–Õù ?©…5˜VYJD¼žþ÷ÖË7"Í„Qе*Õ?›(û›ëåÝWÍ{§‹KÆH­Têª1ÞB}GÕù•Jäõî$¿®ŠˆÎe11T}{»f1zÿ^ɨøl&•[Öb”¦Ñ«©…9VùW£R¤újTÞEºNòœ..­·"R¿¥&+ @î0ÌGÅ£?63|­c˜ä!ˆK>:«è˜<ÿ7É¢l«:Ü®EÇ6­ ¶Wu¨ùõÜÔÕ&ºŒ”¹Àšì´l+WBJŒ9(•)š6䃼û‚§aH+U9;ÞMú–¨~—êÕÖ¹õ (é#°¯(©Ç”øÍ˜ù·ÞÏí&ª3åÈ›ËDèV4ö­4tuQÕŒ0É„^µ£Ì…)*Qtð‹gê—µ„ãz*æ{ôª Öl«Ù&åFCç"ø¾ä/´^dfof+ç—Må|¤µ2ÎÖk3ü»A2ÕÒ*ùÿ…*Ü@æ Äû‘òÑjkdk?W´í¯…*;œéåqÆOì¥Å²ï7w.7XÊ8¨tšj^eÚô—´ÒiúE« ¦RŒY ä%SK™#ŽÒ±Ž_{¯–˜izü]oñh]±æMª•®cÅ«/úØ£rûSHb™^Z^²tfÍÆ ¯¶^:kçH\0£„·2—U'C gŒTr²Ó3˵-ãÒò‰½ÿGbŽ£-’Çs0Vé8vR[òå1¨~tã¶ J ÖL±ÔÏ|’Ltr˜"#X;Õ½m )lôîb˜«L¢óêŸ+˜.ÕZ­ŽC¸Åã"–ŒFÁh¦~}9få£Ê`ŠQÏW¤¢c°‹®Ý¬Ò¦ç%«û©}6éså®â+„wsŽ:î1 ²Óë´êד¤üÖ"ñuV)”¦(î!Î{ß”¯“—sÎá˜E™¨Y,oYúû.º+#Bw1’Œ£¤lf²Tîg¡Ü¬ž™ß˜K˲øo&²ít#:)ZFr!N^!Œ@ØÔf/3u.×^gNÂÒŒ:ºo̼§¡MR©ô—)¬DZ‘™^ƒªXì#N©ˆØýH²oî}ˆˆ1D9>bª géüæ{öm>J¦sµ™Ñº¾˜#ó©–=²]ßï×ËÍã4Í.„q‹Â¨ËâVR>õÍœ-TKâÕËʬëTÒšÎ"µ8d1ÔTãX‚‘Ÿ)¬D©lg)Ö—µÅ}ÝÃ"¢"P¬aD0ÃŽåΙÏMß´»Õ¶mù)†¡hW©HWsÄE4IÕT}]®¯X•"­ŽÙGÍé¶itÔï5Ú´S•„0Ì"ªv»%Ë"°é2cˆu©[ÚÛ ¿?Û/3Pz­óHÁÄ[‚:êz&¶Q¸Ëbr\¶#H—©~IwOìòšåçÆ’SîR¬K(D£•\‹éŠ•Wa ˆ)˜Gÿ‰l–ß…·÷£"¨îµXîC9ÄÍ8S~7uw3érHø)zÛ fîQïCdÒe°Þ„Ôv fݘ¤äò?8Ï!Ô"Ôªa1)ZX-¹¦Bug~DY}&>+H¸çQOUûšQ#)Û©M¦eX‰”ÉV«µ_¸Ô¼…ϧÔÒàƒÝU(‚!H`A YY¶šm­8Iþo’ªtÚr”µpÉWbŒã•;¬®'}z”çj3Œ’/ º¢>Vo„ì§Vüz !ÊR„=‘ˆ¼+a–t¹"N!&ºHl¢í¾¶–’eqûRŠã3ˆÍª•û*Çuî§+@l€_ÿø¯ù³üýÿZÎʰhùÎE+æ#Ô‚0Òî¬äøâD|TX˜9x0¬K ¨LA6¡d²E…ò†I˜W° Ê¨Xr½ŒCàÕ¡„„ÓZ6èÔWÂ(Ðc³…¸Ñø@ªfs2IÄ¥ºÒ¨ŠTI 2J4™9‚‰Q*/BFH¬¥r±Åe&w^"gŒP´­“OVá¡øÁCw4ˆZ!+ØUéu2\!‘€a°†W†W1\x¢ˆ»áPtÉPE˜ç)á9Žde3ý"tAƒpÞ›@ÆB ï99E"‡Èó‚Jå©#w7:ÀB¡²õ¡M~Ûá?0@ç2ñ‚B8÷ÑÂW×)Ä †!Ä*9‰Ç@´¬ AÕòê,¼O±'b硻Π„0d3ÍA"NâE¬­ýä•Ë‚±ë‹EDTæá 2ˆJTkÉi ˜LV”ÉÞûÓ™zbs|zìXQ°SÈ3UbÔÕ9<¸SQPÆ!à¦SŽaêŽ2°ÄâxH80¬0¨`ä2˜d3‘”Uƒ³‰ нû¡‡ ?ÊlŒ7â ˆ ˆXÏ(‚ìZ…"¨Ð•!€²,wǼäQ&€D Œ@ŠRêA1`"¡ÇböµbO7 ©Øèn™´9&12„î+ƒbvf¤Ð{ j2µ"ï¹ïN¼áIñre@L 1ߥ@ÇÂpƒ •3ØRH)™^Dª5s:ˆfÆãxنثº?ª¯Ò§™r&°¾ Ôè9†ØÊœ‚* °ŒPK™˜hN»úmì~/°² ¢ ЛŸjÈq,Í Û™ &%5èèBD5‚™-„Tƒ9ºŠ£ž‹N„$àÁ%‚0æ§?ÎÕ ¤ Y‹'F"ä®ìª‰íØ^×9¾'†L2°F%¥èˆ|--™ÈE €¦?,ug?c¨ZÌÐ0aëðÌ`Ã2€HDK%æ:“‰àNFP—À¬çW£ ;£œÄcj`Š Î\†|2Vú‹â³6;P´EâÏó ’7bE_&‰{4 IŠr2È%ÕðZà•­Ÿq¼žsØf3 V$¦£¨ªE Ê‚…w0›òÐшpR—5çsž†Lïˆ1L‰~e)VT©ˆ&ÇgÚñž‚x’\UL.T—)iÞ#T£[m@‰B¢ד6å;Vâá¤Úi5ÍÓDä5’ëÔû]Ì•LaL¦âWÉÒ`‹:YÛPBi©G2Yõ(ä¯Ëš„s{¡zWŸŽr¡9äc%ˆm½òBç¶ÝrLjÐŽbSObmO.ª ¬wڞ蛵9˜c¶Yþua’Ⱦáe‘ G"§¦R¸ÔèDv±7höíé´ÀˆråÊ2ã17h…ª4ª•'p¿d£fRœB¹Q1ª†÷>yG|òךÅ\Tò™5;:EfæÅ!)”¶Å)û þìËEÏ[‘Ç"¬¿…ªHÙ^ýGÑ·ÝE"ò#S¾š‚‘˜ÇAsLîcbYd~ ¨×•ª†cèÚl)ÞŠáfb²½Ù”Œg!‚Ë„;»ÁÎ8…©lC„Xa‡ ¢¢6ªF@¤ *ÑŒEÒiËjf`¡!ˆŠ±ÐÄbõZ„êÕ!H…`j"—^A@h0éÊ4&`²Hr éŒ-ìTnóg‘‚d°l#^8€˜ÄŠ™ˆjL×PÁA4¥«zôoB5d3èȃ†C0l*ˆÈnJ^£‹=%¦E\N›jCé€\3´U‹C ¼p‘Çü Á¨U' Ê/ ˆŽ#1-8ð`ˆR=Z ˆÀB ^˜àL‡5à°¢´ž¤Â„CÈÍ:¥A ûF œË‰‚aH1M‚”ßý‹ì¹!Æq´å%PÇn¸% 5Q‘f†¦6Tê&Fæ¸]gÁ4LîOBÌ8Ë‹1†‹Ïs`ÌRqÌ@UbˆjŒÂѨŎ7bH¨„¸‘d«ACb„l ð…åˆ& Th‡äçŽÃŒŒkÌY„nƒa:— †(š!3°;Ò*ÆnŠÄõÇ ÎÌ4F9CB‚(Ïx"Ê&,43™W”éj¸Sƒ Ù­¡¨scÛƒe!”p@Ž2•vq+ƒ1˜Ör ®,=E‚…ÄFÍÎ&‘ãb⥠™„‰Þû? &q„./P‡i3£¾¢3º#2d¡€‘˜I:Àqõ b·„mùÔ-\È0¶„ÃbÓvdÎ6¦VBU1ùG‹Ž(‘Äb„tE¬±*¤’›‚#‡ Œ ê¨ÄK“KÂxOÊhÁ¢S ŠÔLc¢…ƒ›J7‰”pË ½ÅLL´4;RdLôB ÁkXNôŠl¨e 11Ué#â±–«©®éÝchfˆ~'ôææc8 AäY “ã¯+‘$iÐËŠ ´H¯È+|ºñ Á"Ð6íû9qV1’6œÑéPQ”qL|f ZoPž}è¬êƒ#O …RŽèUbýJHìÑ‘©FŒûfÄé0aè®L÷JC)ûÇ wn\Ç,ìÝŒæT€Ï†R‘ ØÊÆF,\ßó‹ªaˆ"†¢* ±ô,¨ÅCJ ÈéÉ Å¡ÊÛ‚B8ÂzËÒa« QˆaŒÁ‚B°ÏcŠ«}àÎÃc'ê‰NŠü¼Žñ Rq+#µÎÃ((C/0”¤ Äÿ²£+³$ âT™Ø­9.¥$Z4ˆ…aDD&3»Yx%A3zw_¤EõV¨ž‡bT¢KcýüPÖ Í1ˆ@D£T^e¦ù2q šU\Œ¶RÝ_jð³æ‘?Á‰+ô£·X_JV\(iq ™¥})¹¶#SˆCƒùHùM^¦Y£¦PBúÛ³ UÏ¢ KŒS  Á® ) 2Œ„ª:® YEe(ÃâˆÂ03ÕS±ï©æQ„‚U¡d¬ÅKc`Ô6@—§h®@K9©pÀ©ÿøÉˆÃ¤NLu$)•“_5´"”X)øè€ï|Ðg‰÷§qËuÌÇå|á(ùÄÃÓ5Q^VNFv ˆ»Ò½[( S',T*Q˶Â[åþ¯ì·K]1ŠB°‚9Î(žÑE*n´›- }_ò”;îfoR˜ª”ï¾JÁ‡’˜Ó,"µ*Oü)JõbräO«'UŸ=¨ÉÏC-Uõßʾ²v:™nžO¢â&½u~‰N!Ø…©¦+Y{r‹›7e_¼›\çröUˆÈªa0B¹1Ì+ñ9f´š'ÐVÁ/½µb1Ò«Ú(åt’‡;e3­BÒ¨fK9ÄC–ܽy„¬¿Œ››BuÇ*)vgÍ3µÇgã£YXEr·Û¯OÏ®SY­žezqîZ—.´Å ÒÊ1Î-JU•®åU1v«W-Q•©äñ’·ç«Û‰gQŸµÈDl£-Hæ1Lä2]ŒR\pv-/uM¡¨zïê]U²#' Uªî—ÚôÛ'Ÿœ¥1èÖ2³$¢l‰W¢ŽQ¹ÌUGÓc•®)žˆ–*-K‡;PKÑ;]ìôc!=!™‹˜.Û(LJœŒŠB euÂ-°µ¿£=ªúµ³¯{ùyWç1 W.ßB4]®}ð.¢Šo¯)FK#÷6”ƒ¨¤Õ³“¨ýÚ«µõÊ ÉRsæ}Ud­Y _šË¬‰´ ‰˜]ÑÌ«UT) ¬8å3Ì_/V“V\ÍFÍ“ø¥! ¤%³˵âÌaÞôqÑÚ¨¤[*:½ukãl”íÌÚŒ˜ÛBïdz«I˜¢Šq[^aÕÖèý|­âÏRdþÔIÑŽÆL’ƒ0G?4ŠL¢x: ’“*ñQÞ;2”ýJÖì1ÚÂP×3Í\ Á(FÔÎÅ8P½)â.U)  H@¼ê›ø3p\%˜Š2î¿.¨a‰`£†\ÔR0ÃÃQ ç(±Ž‡­_A$ˆ£Ø½ÝÄ–v”0`eeq‡kqQXÇ}ˆØÅËÔ¥ƒœFÙòZ´>!ÏÚÁˆœÜF:õ‡½ TÂbÄ„0ÍŽËÈå<+Z/V¨!Gaæ*;6/Y'Ad«· ¶Œ—0LWÛy3‚«ˆÓ$ŽxŠ‘kÌä*6À!„Að@c *ôÏÂéòì0G•h}ÎE$¬®WÕFÁü#ëŸÒä(…oó O˜#…ÂxðaGäg#í$*T a@a„1’·ö˃ŸA_9Ÿ†"¢÷tœd½ŽW®LŒ@˜ðQC‹3 X²¡–8܉Âê´¤ã)•É]TgÑLÒC1†C ™ÜAQœîÞ©í]iæYG2 aÔª#òY€E¥sV2 féY ñFÈÉJÂ3H¢ìNe8x­ÔË²Ê ŒaFHn›ò *ŠŽ0Î!S™°âÌÄœqéNÊdƒ}T2"~¦0d1“ß„Gb8Ge©XiÈ»FrƒžßE¡Œ„¡ a³¿R¥çÎ2q ¸S–SS™&6ÈJŸ>EBF‘·v”ïêeA.XáicëôÔ#P„ ”A¤W)éÓ¹ Z(NvÜУF™58ñ˜Äjdl‚Üta¢Òš‘orEXbŸ)BÓB¼|7@¦1'mÃ$O5œ‰W"Z‰ŒÃ±e²š¥gÉA±[·e)«: ÆäÒ CöèDû”e‚iŽÎ/‘ØæêØ¦øÂÌާJBÒô\6b˜G©Hã #þª¸Vj ó­+º"Òõ͈„Ö_”n‰õJ3“ѹ!yVD‚hHd³S˜N‹É¢x2¤5 ¢S°YHg^9ÇBcs(‘Ä*nˆŠt9˜ŒÜbòB=uÏõš²vÌd»œBŒú¸2ᢣ6ÂNO•Z›ÊGma qoÁY BòènÁ¡”eÛ±[ÑŒ¬Ò=0RDÛ%A+df#d$R9 Qw‚Z"‚Ã⤘\©÷Dé­ÏФŽB›ÞRo!Iߊذ_Z#br È*eF}œÐÌFí*&N£Bÿ³eý‹g‡åÅŒdlŒj „jTlʨ£¬N|‚&ZèÅÊÍ¡:Õ± ²ÛS¥fŒY¸„VD×¢¸…¬rQFñ 5A1¢jJˆTnF¥€ºñÔ«¸Ÿ‚Q›¹4 ˜V¡vL”Õ™ÌäK­M¯ÍÍaüg.èºLeO)Œ‚èVâŒtcøÍ@Ÿ˜S Ó'ÆëJ3 C“Õ!)ü[DÊh´ÀfErMhæò1q#¦†’0ÇŒpo*§!D¶æD¼®6HæäµnÊq…A¢‘8tŒ"°á×9Y…}ñÎ5û¹RÜèëÄ]hdƒu©D(‡ì·Br\B&VˆRpÄ2+©ˆ6éÑ™Í ­íY½4¢q&-N–pq©±ßa†žBti̹ š]»-®* *&®ñ¸"5$@‰çLB+UEÇX¡u!H)ºBÁ#3 aªÒ¦K—!p¦†¹œDþÈ7ªCÒG ¡¼æ†XE« , ŒcÅâf!ú}†*z ³ DÚHgµÛ‡HÁ½øŒB-ÄÐZR„šbìji×&V*pü”¤ï€‚D #í þè ³F“‡¾xA>¬2KÅø¡JÕy uëä°ÑWQb4#‘9º=»5Œ(‹ƒ)L‡Ò!©–C Dgˆ"CA°„^ÝØœÅ?Ÿ ˜˜B¶¼¬ÈÍ¥]„FÐ¥ªH ˆTzé:´‚LÔ-0ŽÇdvTá cNNЇ¦|!ìsDÁ&zqàŽ$WÉ;~Æ$uP¬À‚ñŽ*H_M„„ÒLc|äSÔ"R6sa/7Ðc2™D¹`Ä!Žƒ«™HH„u; 0ÁR=E#È[°17*Šý·“¸éîD5Œ¡Av+Ca˜q*oNʤ1].0ÈÈËDµ‘¶XÛ†ÅeMü³ ËB²JÐ2âXpÅJñUœ$†ZKw,ìAX…!„‘À¯àb2²±ˆ!L< ÂM !MRh™_;; ÈÂÕAzdZ‘°‚ÑÞŒP3¿;’ãáfo¶ •_*˜Jd‘nUW§¨I‘É…9#¥;sÇ]]ùnô‚»l1:>¸Å‰Û”Bˆ¦aÃ2ŒÎfSÕP¢a·ÂÞÖß¡”B.@d)!ÉÂSW.¥³`ˆ5_ñ¸‚D•ÝCBÙ9©pP̤‘â©OÉA¯áä§ßB>cDe{–¿P²ñ:Ô¦Á">÷‘(†¤AÚQ®…ˆä”+ÃwLa£¨,-fÀºñ«2!(œ1h¥9‘œblÂ5n(!aÁ‚#æ=„`@’GHüXH¡ ( j¹¾ˆÂO[ŒHALêT*SÎb¢þh`¹`³à¦.h¼:.Øjˆ)Æü0@ Œøge&1Œ9 3=ÂWâ•ÆE<È&I7C)jûKr`„Œ\˜#[¢§ÇÄÊnz Q:®§ ¡3©œÙƒaà¬æ0ŒbÄ£<#!)Hº¢É…s¸fdÓœƒ$Dbž©‚MG.") : à‡4` D' ½)<Ƙa]ˆcäQ,\b1nXÓ‹÷Ûœ¤)P§@ShG1X°ã ‡ ¨¤mÛ@‡!œ0ŒuC0•EB#v+°„¤^A),$âBÓ”™xdѨMˆnÈ5ኢ{²P6&BHa’8§oPÁÂh1¸¨ÇGÐäª jÆ 5SÏÐy6ñÃ`ˆ#ÜÄ|™@€Âb.0C.!Dˆ¢Žïc-'4fX¸EIu–3ðn­#ºûkTB!!Â7UcŒQ«%I6!û£bÒ10ëF¡9⇣•jº©J48ÔõU·aÂR0F“’Á„shr8c0”2, v’¨Sñy¥×°@€Ç‰ú˜Â †!Â)Ь˜d3ª”TÁÅ% Dó(†¥U¾ ŒÕµ&о䊽C½R„%GˆÒ´ÀàŒw˱€'ìÉÐCŠ,ƒ2|ÀŒeÓÀÈZX°Ž~GÄeêq®Ç(ˆ:øêÆZ#«0I„ › DjÊtZ˜½ÙVáæ¤ô2Øn< û u3"0q8(AkõôZYȽ„F‚i‡ÅÃÐ3T„¬„ý¸¶XL9Áy˜seDëË€f#' Bãûa &P$¤ïè€ •¬?C… EU1ÀŽÁDç)ˆ. È#rõÁ ˜bçw00VuÆ#\ɰtQ]J ¬ ÂA”nQ¯ FÙÆÄ 2Ds† £GçBùRá¹ýÁŠ‹˜)F;MˆïÄr°ˆ¬L'D¬𯇻Ñ5Ÿ´ÊǦ.29t¾®Ë’» ⋤²Êê]”ÍD.–xæ15/ Ø2(JÐAº¢± „øË+…+¬Ž…¦9— K0EETf­g˜1$ŒÅ3§hh…ZèˆÌY‘-|¹>qýlÁ»„˯èJîê^0Æ åݘö¥1‹¨FBnÄòöb(e1ˆ ‘—’µJ'ÚŽÃÔº˜uT\C¢jˆ²­V€ŽÃŒ¦á3©‚Œ°6)ŒQ¥qjò±\·ØF¤ Tfª!ÄÆ1=ކ2֩Ƚ»ÄªJ z¼™WVZ¾œJÂ'2o ?üúŸ!Дk½Hcw¢00 ‚YMò…ŠÜˆˆ… c¸hÃhôzŒáùˆ¼nT!Y„ÑVÞ4aµ¦ÙÄÇ1+öXÝNŸµ_§|XMyJ1ÁÆÌޏ ä›”ìÜÈnî<5rS~αèv¶íD8‚#®¥ð’ENC8‡ ÆÄÒ¿&P¨@4b"˜H'”¸Æ#l/°æî¾żzÈ¥£.JW¹ Q3z3) ÉDg „ ¤.£+`£Rõ¾)\¸ìÿ Âdáó݈ô1˜ŒìA"’ 4¯LÝ(Ì­ê1/4ñu:E!]±*#I•Ú/-P¬ÉvuÄd#cr¿31ˆ" Ø\øœãU(ЦƤCÌV+ sÀì™ t=lg5Ôo}ø„,ýØŒÄ@‡µ‰NÃE*cÆD.@ø)éO‚%ÙBX’à܃IE#›6oØS§uÄS% å<5¨ËÍ,è4A)D%ô¶ (›« ´¸òã%l&3&™T)©!ÃQ”Šý—‡)òîŰœnÃ<™ÈWŒ nfYÁ¡˜A9yF¿Â*ׇP8£‘Írñ !.æƒQ#ã41ba¥Áš«‘Z. l”-s#Ôu|?ì P:?œå´È°R‘´S…#D>ñ&AµdfD6Ùè©A „eêLn^Ç ±gêˆÍFt帣1ÈR1 #„ĈsýN‹ùEÈGS8«€ôRÌa¢XDC'àÕ¢×ÃÌÄaÈIè[ûd¬ŽbŒ¢™ËÁÉÀÙÿøÉˆÃ¥INþXýxü»ü-ûÖûÁûóüp³’Õ¶"÷Zóèîy@jó×V“2ÙÅœ_FK›¬IΗM¥9p•b.öÑ kºˆ´uò{Yí ˜ò1ŠaØK 6>SܶR)Ûæ'!(—S9¤{=3ù¨GTbPLÇ럒ÑD¡”„þRÜ–K#)KV©ÈÅb›¶}?µ•f,”Ù8gŒ¬9ù$°·&ö«9ÐS9ܨ:oÖY[>™©§±¯¿Ë„8È–¡5 žÊ¸‹)OéÄoA•JLEAÈV×ë8«Omák Þ&å5gX˯ˆtº ¤&bRQ,­cøßêaÄK1Ú©Ã(Œb Iæ¦GqRN 15K9GGbáI+ÆNP–¥*n=1g«Èƒ«Š¶-¯«Lo7†|I—*í®‚™ÒŒp¯æò–ª!¼ÙGìn3í“a&^!?‹]!äs3‚ zÆâÕºÚáxû ´8LJMѱþF2鵉 éQ—Ž9 )šÈû~A-Űlbݾ‹_.P™&·•7g"u5”^KÆ%Å00Q_2DÇ¥OÒPä;ãÜI84…ÆÔÚ'±we+¨;\+‚*ÆÂäÉ®Wª6ë/9¹¶œ&-¬M‘6)(L)çÒ÷‘Fr áH`TE‹c¡q ÷ʵïëá/Á‚%¡‘ͯmUÈŽ§!Ie!G͵ ª•-ד'YϤv-KCí9$¾µS’£´ívrºÒ”ÜI1AlfBÉôÃÒM¾Î8Že!ĺ¢½¼P…’iôIbRâ™Ìà‰R²ïÒˆ± AƒRYe•´7húLÍm*è¹Q–é"ñôÛBë)KA )A’•óW’DÎ1U6É÷®.„Ù>7ÙÃ'áA$C„>µéBTÊ!‹!â!3xA1«@ÙODMä§ÿbP•?•.SFR¥™Á„Kä’½K>$œÌæÄdkäÿ¾B#“˜Ó‹Îñnz§ÌZ…-ÄP—zõ£"”\P$-pQßäQO¥p¥•—Úøù¢*\x="&㦄¦ ØbÈè“nÐYˆVeJ/Q&îÎ4â F0B£ëÜB³©=Û­%ÅðÖÖzW¸™sQš#,S³…ÁéZÄ5IÔáÌ!ôÝÞ¥¬$“¥ç—"uš»MR©}hØ#àSGl/uz5hpt9•›…fYOÄÚ`»kSbgUeºáGï$K‚†.Èä#稜„rÃÂãõ”ÄéFÉýçÛÒ„sÕ¨NæBJ]uú°‘‰g;ÜÆx¯½%~fÌOÍë÷©hú#¹®íçc0åYÈ’Ë{5±Dõ²L[ å¾ÄŠ/Ò’™™6Íoö\k=ÑÎÔjýäE ƒÛX„®dŸ'ŠÖYhzKý GiUÎJ¶ì´,BJÇ:„8ÃëëL3Ø.]B‰ònÝy8A:‰j…Õrñec@ƒÏv‘³ŠߥUý²võ´Xj(R?$r¯:5$ó(ú¬BH¡W°Î嫨ŽÃ0»¥ñ*Éž%Ûs,¼t!Éa ¾ºj*h&¯iÄ­ÒPŽc‘Ša¼^Ú*9jÓÅ'ѬÎulÃÍ\%ÜC&aÈY”¯…ûò;‰U1GÊògx!‚<¢ØObÍ5$hAB½dÜE0–Ä @ZfèHn"yñPä¢ %x2Á*'Ò‘ Xˆbhã,Å.OG)¨õfìªæý¤}h»Ýr#WÛîÚ®¯èvªP¥eU9تîE]Íz[l” 2kQœÒL}²ûƒÌÔ£¸ÇjˆR@f†›lAäÕê ê•)s¯+Ë× î’.·§®&cÛJ¨V+f¡Žz#XN¿ØÃ“Ö¢/‰æjÓ’¢eÔVˆ BÓöÃþ”VÓ$©EâïˆJ„fŸþ’ÄžF Îà sšsWÿkzT‚±J¬½i‹GÆMW §§2&*Ë‚T¤Ü¨Sݺ£~:ÅLÙzÑbVãQ¼ÌÜ!0”J^µ) ·eý’bPbXµ#NJ&e³é¶ßG"WÓ<âêíÜVR…M“Nü ˆFj—‘E½+¼vq0÷«8‡=æÒ¨F8sžË¯O4†éf ä²ÿp] Äî'(¥ˆµ\.v1nOCi ÁØ©ö[‰ì•?újv ›nû%¤‡ÿóÙVé‚”¢'¸ƒ%-)l&ȧ’-^%28)Ú œ]³ÒL[»R#H3EÆ¡$%„b–—k•KåÃöIBð§±åó}<"B9ƒ‰ÕËÓ¿ìØ’$å¤d©õí_ì÷Ú“‚­Âdã—‘u–¹BØç”N=•°Y)¨¥Â$!"ØiÄö‹@·F•rs·šMÉ¥aÐâKj¼,z…0(®ÉÌë*ñZá»ëd#Õ_Äbµ*¨çí ¾OˆM@Ò./Þ¤U¡HfV0ReÄ7­Ý#b]‘Ië8­´ê …×}4Fs”)Évð£*ËN%M<²´r5Ž2¡¶w¾. µ'X™RX¨òâa†KáœdÚHO¥êå¯a ‚I渂»qET>¡øL¹hþ!ÔRƒëÜ‹ö%‚ÙdKØä1ë‹?G(‚Ùôœ‹W© *ÌPŒ$M=‹’U*FC6'Ö“}ï(‘ìUi6åÂæz…[<ú/>z&& ŽñkªÝ?\¹âJ¨gñ TµÛ«Zˬâ)‘ 3=g“i#ëdŠaN*ñÝÞ…åÛ2B±Oé¥Z;åèo ¾_c‘w±L‘¬’„¿I¯]·èPÃ’+ùS¬ûcé>ˆ™ø#Õi Ýbê²Ð0ÄN(„+x) @IÕ.ˆ=ÍÔ6:’cäkßhòT†(]‘œ@îT•V²w#"YÎŒ”tdk9)ß·§VùÝ£4ŽˆCeñ¸¿æ €½Á &üƒSj×~9„ò‹ÐñeVÊ9MÖõÞ®²<䜤„ ¦o@¥‡ïdÄC¶}Ñ ò1Ké´“˜¥iÓŸ2RX–,&IA_" c#©Ÿmeç§H[½)¿V“šâ=—êb q¦nä ‚ Ç-·iŽ'ü%ƒáN”n94fÆË“’áWô×ah˜IoèÑõ9V‚¬ï¦(akypÞ!êF,‚Tˆwa©–^-1ˆ}N"‘WUlN.älfAI¸B ‰””ߣãꘂÊPëš{K‚JzÙçs8…=*íKW¿èq„‚ÃP_‰é+BÔ‘­ØTmÙT‘dZ‡$Ãtª0R‹ºÚ'*¼ãŒÖ‡å‹Âl²Žâ5K§ÔÅ gÄä*^Q‚¨„8çýÁ­‰Pϰ–ý¡SL4D§#¿ÖÍÙ'ç3ñÅøkü1Zú~M\Fø0 Bðƒ @£@S?C˜%PkЏ©ÂGJ&3ï Ü•&ˆ°>2ÍÿæÆ6%òúã!ƒ•ÄÆYö765u/‘DNÆáÒ2PĆ(Cü¼…WqêLJ–.¸ |ˆÌP3 ‘á•Ø;qƒ e37Qa!‰UØÙDAA„£ å°áÔFûÒ¼1D„*~Ay Ì'š²06Dbè_Dˆ0‘ÆEBŠŒ|ÚPß$S(alZ\8§ˆÄe’“Vaqïpœ·4ò laÉ‚*ßíÊê(E3ô,usŒ(Ìã|.pï\C2 ¡¨ƒ !#RËÕ"}›cö‡0°(íïw¨ãÁ~;s:(¹½|¢²RP‰„ÏHG¡†â5R„T> £JJE™ ð«Op®LPܯ{ Æ1P-ÇSCÇS8ÊãÀˆ†ÂAØï|r¦>Õúøz(´_bŒ0Ê’`¢c³3 À«É=^u¦d<02P X:•)ªˆ+çUiѸB.åú¾OÈC¬ä¦î-$œCPi†ühû‹Jdd¡8ÒÊ®39¹{㮪˜BÓpÆ06!ãÕA2 wuJ!„!l@…Š®r÷™DU•ŠÄ.¨½éIBŒmIàkD6 †ÂG ̆°g±#ûòhmÈ„œU¡Ñ29MÿÜ(XVQ«’„KÄêȬJ PþØb‰pœ!XÌ|T†0„ÍÑɆŒÜä 9Ý NÏ» ‚Cï)â|È BvEȤhF „h‚þÎ먻‚ŠªûÅ*‚×Zë]šÂ²ä š9D Pƒ2% 2H…7 ƒéÃF›a äW/œWÔ‚þÅ#T®QÊb´ 0è ËbøœÈN a†`#A¤¼àÕˆQ5r©pÆ`¼q1³zpGî‰Q”Êè‚Ý ¡8‹CÀœ4 BÑ )ÔS„äp\ VB)ÖšœkIÉÄEñn”Å–ƒA0Vs1Â0Þ%Ñ®™Þݳ¸PÄGÍEËŠ).Ä)]⫵g›ªÝò©\#•²íZ ·ZIFQWؽN“të9!£_0vÉ„†§Èœ¥2ÌTÓ½°ìUí0B1¯´DE·YŸúéBù,JÑ%+/ Þò=·&wQwšTâ3+š¨Ó¾­äZg±vˆÜ½nâa±!J‘’ö-áÑù¡Œ– ­a …AÖ䂲ʦb:8ŽJQ±Ü¼" (=!S¤& šqÌV™®ã(1Ta¼‡r L'¦Åcc6Ó…wM "p؈BS¥ÂébƒT næXÉØèå> H#ið•J¥1‡'XM‘ʦhB$? ùór¢.ÔæüŒ*“#®PÑæ‚(&àÐÛm8Ã;¨)+ºÕDC\˜.UÚ¹„ЃF)äa•1 ŠŽKð…®¦B)\á9S5öoQ ƒL@¡˜ˆ„aMr¼† ‹¨:œb˜4Ls³ÀÞ© ï²›÷ëÒÁAk†Y)ÿœŒÊÊÊbÕ d!S`Ìe<ÄsÃd$Å? Cwp„ áN±‹–8b¡ˆeZ¤PÇC÷fíY8ÑBP° Ø!‘ qŠÇ'.´c_@X¡†™Ë‰ðÔˆá#`ŒR¥`¢#ðŠ }_9‚¶5aZí—qÁV …ÈD3 R(JO|Œ.$–÷)P`!œÃ¬á8¡¹‚`„"¢vØ2Äq£‚¹“ÊW„èIJóó3(ËÆv¨B$笑ԹÌ_â>NE9Æ…(€Î ‹–¼ÀŒBhЈ )Ä ±ˆC-”ðÃq'ì§ÏL¦8BˆœËdäaýlÿ©šB&Ÿ6·W6ÅFM¢ÊO®íÛRAC2š¬á¶o²‘,êä&[ª¬T¦é¤NM(Nà•|:!Ëdm¨Èéê1‘h';ý{ÈMYöÜs/_©é†%Uwò½zXƒ„"³UÎg9ÓMË…ºÔ¤óIzo¦»WpèîjÙ,I-ù;®Võs…¦þc3¦˜a·Î+ʶMjeéåv¹7µ»nˆŸß§:‰‘ !X´¢&Ö®èNgh”칕1Š_­ É!s«ö—pˆ+£ñ1Qɦ« §íAIƒÉS»VMáõéX…’ý‡:…ɼÏFUQS㊠ÉBaŒÔÆS¬ôï)“*¤.S|©JƧ+³¦«€îZÿøÉˆÃ¦@N÷ðùú übþ,ÿÃðˆ³’eÖŸóxÓú˜ †gnÒv’Hî  ðŸ© ·ÒÈ\  ÜÑò|jZ©ï”%{ôæªynbQJô8£]Ò¹ÛœÉ×ù}oä¯Ïvœ¸ÜˆI/¯«¤6ΈB.iì^ø”)^–1b¿Zù¶B.[ª `Ì"û|rѾRÕö¨c#ÿQôL1Ó8¥!(œ˜UEÌkõ…5?ÂK´Æ PŽUˆpV¹Å2 ’tE6Bé:¶òÝ¢Dufô ³}}a³Ö®£ú¾Í›(äHqC6Pê)ƒ;eñÿ뙾Iÿ¬)*yMºÚ“î÷eF+‚ XÖ¸¤ \â^­ô4áÊF·UI%/ªž„U#ö‘Š&þéL;pÀæP¬Ä•è%öÚ_JfåÃ.g¾¡÷¿ÖZIG§AN@#­´ƒ”I'jˆ7_΢*gÔýE˜Oæú£’ìè\;Ž£Œí4³F½×ïDÙYÆ!Óø“g£,™f©†Üˆ·¼ßq½~ÉP¤ ¡È ¡.†1é|¥p^Ñ#>8ÒwmaÚÕB”N™6ÉÙz¤µ¶Û Ob#7P‡Š´MùÄN¿ù SS @H[\ç¡’â¸ìfÛ «ZXÖÑ2ç#ÄÎËBù˜Ý=} è|ZÞßÎé{.(—0ÈF8¦†«¸‚¡硽‘SˆfþiœÕA¯õ¡‹6ý… U±ˆÓPí~]ùªõDå!Vp™|®¾2v?eraVR[È®Eâ4¨r<¤ Í«©ÇµãöéNí-G dnAwÛ>â¼T”A@€€sD–(‡CÈ¥žIdIhêÎ¥Cîcõh§¼–WR,Bù4ɭݧ”U &ªŽ&*( ‡½ìÈöœtµâñIRŒ‹ÏoyÉQ5œD 8«7T„æÓÛ*˜¸‰’5[°ª†b.ó©= ¿Tyqhÿ¥„- pD¹,V¨Ê«…RÅñˆe  ­@Ö#œUêV»£óÉzߘ¯è¡Äñ§MÉ}UɹŠDŠŒòrí&C*ú‘ÞDb ¬j+§\ÙÆB¯nQÊ…qovRΔ"âcU= “áà˜j¹4ºFr”¤M`ÇÎJ6P²7lk½FôóbËô9‹zð¯œRÍ× †zŒ­ûf”‘N~¯­,UCÆÇ«¥Í¹^‡õ!Íkª»Œr áTDÄæ-²µõé Ìçlè«ZSù7ª|°iÖbŸÉ‰Å!’!B:ÉÅ;§Ý¤ [NZŠÅ+³.à¤Ñ¤Í¹ýº™6¾Ê Îq‡JËI‘¶ùiE5‰…7*ÕмN*ƒ$aGé ;Úâhsf—5mg*+¤äM"± ·žˆf}o~»×Rrù¦ñ-Ô³råÌ¡ˆqNdùÚDÎõuñ5ÊîÉFô*aUžµ1T¿.µz{Sjÿ=^Íc™ÿshÎGáÁÂíÑÖvZ½÷®Ò%ð*¿Ýa b0BÄ(FÌ;öCßê* G£þqb733öQ >‹¤Ì&¦ªBÔ“Y B”ÂŽ–;ÙÈÅ¥.Õ cYhŽn›mÚ&Û z7‘Šf ±ç çS«HE^­SŠK{KëN[&’ˆMD'“q\Šr˜¨9g–²Ö£;WI ¾& –JU³Päi[ˆ\ëëå Œ†Š0§-B£.›¦Â×i¢øœ²Ù¾âa“SýJWB‰¦ÂUœ†¥©ê#šBÉB]¦%”†x‰Bþy“„Çö)9ŠnÊ¡(//70ƒ‘x‚¤NwQ M¦½pœ6ì×(­ä[µF~§M-¶·®ØGÙ*¾“G:iòÂBH#ˆék|¤"•ªöåk»Ÿº¹$h“{•©,ìËCŒ©ˆÆÒ2IÖˆþŠ; ô5Ôc'?Т¾a¼ùÖ¹fB“¨BªqÎGã&áQ̉žÛ­§ò~1ª”× —®K$÷¹IÕÁÀ†+ ä!ÌjÊ¢R‰Jg17Q-I¨q’Ÿ^^â¿)ZÛp‚3- YûÅhŒgÁM!)„žßÇ.n•1Íf·µ{óVŽ*Š 1ÆaB!lwí?¹ü¹ùjr¢×‡Pë$DvÃݼƒN~²ã¯ ê#”ú_0ÊSˆ¿’EÛ`õÍ*\R Øêf¯I“é^Ú/òPTy±³R<˶k³A¬vI rá)É*?¼¦D_k´K³$rëÛJʨbáYÂ%Ë”+¡<³Ï>üµu)N QD!éjš¤s¥æNm‘¤÷%ËXƒwwùM)§üâÿ7­yž‡°¡C:¶TíÂÚÞ”ÔZFÆ©ýĶ'¶bŽŽ*0€¡ÏkðvYùžÑ)w38¨ÂÙrÝôÜ/(_=ª,¨“|•Jñb©˜á:xÍ9ˆ:ÝCeÚ¦¦Òi¶¢©u*WC*ͪ¤ _z£2Ë),kíÿ|ŸÉfE$SrÍE“KÚDæÎá„aBÕ+œW³”„?Ž_¸¨âJ&îý’†K b±XÀáztŽò÷ý£_O„`S2 ÁTÅ;ïVáx™„âJ½BLõ¸žé§FRG,ˆ/¦L/Rß>ø$ϺÆu0Ê:˜¨!(‰åYKt3¹,›)2im²ÔÔ;Uh QBˆ!^èy+‚ïô™%Kèµr‰¥§ŸÝ„U›¬µÚýzŸøaäZŒñ–¤" ‚ ‹\)tö@™Z%^ÊEÒ›>µžª ¼37Ä4„g[• ¼êîêÚYÛŠ“¬Ú&(32õ*Ú+­VŒKalg„x„s'ÊÄSãØµÍ)(¦A4Œ¤ený;MõÏéoÔ1JABR„qb6ó‰í¹ÖÝôßÁ¶–²Ê%TQ ÷9D;ÌE¨)¹]ìÛb¦ûÈbNZ•ìØ¥îÂ0š‰E‘0¯Užn·¡j]²ØTCˆ9ŠTFícfMƒýqÚêDÓ6Š2J+•0*Éq,“R4‘!dÕ Õº„äsœä*“i)DK¾í@“2p´ˆ„?k%4š‰ý!èÔJ¢ÙP¥ds5WUxQt»)·æSÜ[¨÷kµ.Ïka— "–R úTã&i<Žd£¥ Q ‹Q}°¦½e­!¦—|Ô¤Žu:3 VˆÓ#ˆ`ƒ¯ñȉoz"²JaWË’vÒ!°´Áé-pd#®Ý:Œæ8¨U“TŒí®µ'»méˆ^&âP²²+ØFò”u€`„5%0È©Ô K Ç„´Qh/tN9_Eó•V·Ùk]¡Ïw±ÕL0¢*H¨CÈU¹ú¢¡Šé#Êå´ ­ë/5<´Bv2cˈ‰¥HŒêÃ!¸ýàÿdîÀ@0ˆPõh@ùÌ7!.àoý ¿¶ Ù$ÜÑÑl•·­E0ï&+ÑLAy‘FLô„â›ìó"K›9È1G9Ø÷Õªõªm$ï(…Nâ²ýëW6§½¾&øaQ¤ãT^0WGýòœçΫ-ÌO±š²9 /I¥9bI×nzåÛÞ«ÛÅsŒ (ïýzˆJŒ¤M6VŽ#cr{»ŒJ^¶oKn™Ìû¡‘þ­ŽòÈ_;¼–r¢íÊ\\Öädr¦ôŠ ¬ƒú‘rnŠSŽŒSÈÉbQ5v­öME<)Õ7sJÙ~R&ùo’»“飄a´ÓÁmn¡Y¸Îä>ÔŒˆ§®qÝš\Ù\µ)Uu~ËYcÐü9ÊÅyNí^™LÔ©‰O’çc%†¯×‡-S"3­îþǹ—ßÝtè0ÏâÖÁ\mœ W«×_£5fb»Zòúd–)ˆUTê B<ùÊ3,Y2¢º¥NètbM7±FÍK¢ÔqH)imÃ*±ýÈÎ(² â­:4¬8yŒÂKjN¨ÿ£3âþQÙY- æ*(‚¥ØôòµÝWGU£uÌá«ß‹ÕÍò©ºÚE5•dä"–»ˆœ1îrU ©®ÖDË.OSPD¦µ]dn¢õ ÂÆÂ'…2²ˆÝb]·Q<â~kâ%2¦¹,y¥õ¡ö©U¾S¸†=®º(Èœ}Ò¥Y¬W%UjŠ˜ôÎÒìš’—š_k’éZï£rð„(é¤oQ¬£˜S[k#©œAYgš_wa©üR‹KW!Ôùƒ,²s/Š~Â)©‹3"¹ÓõÏTEæÚœ¤DÍâz&³£­Š# !ÛðeˆŽØˆ?ô3jum *¡ˆŠ(8]įæ`Ã^)ÈHX¸J¡ n¢¨Ær¡¥QÿÉ>‚5+~ÀµÁˆ' ›DÈ0\êXˆ¬K7 à¯y—'^(…æ ;å8aï¹j´Œa(ÆæÅggîe˜§!3ˆæˆ‹„0kÆņКÿ‰„@LêZzâÃËÄ¥ôT˜”g¬9†9 [½›4—§35§ +w+Æ›€ˆã YTÅ.’„À Ø5’ãB^"&Bá`'r±è9f$9Á `/‚Ñ3Œ. Þ™Ãà `Œüd¬¼Ÿ1⑜­Þè§1pJFÐÛNÕM~&q(ÛEvªR`TA#!Âl Xõ„#DQ® 2 "DöGOÁc—B»ƒ»Š7pr–‡(3ÍJ& äJ^ œ…LÝBÕ¢b¢ˆ¨$Øäǧ̊”è ÁŒîü:d„ùå‡g¥¡U*jEIˆa(ˆ&d@JDb·q`ľ^eU ¼//"Óœ¤9L‘ž@!˜lCB|Ah¦)9+0¼(í…ƒ‰vR@E LÄ3B†B²ÌÆ J2‹–JTwìÝB0CX¢ùxÌÆ¨Ÿb A}T”0œfdz0cvˆ:|Šq#Z&hˆh! ŒLA™(`l !¢±B–(T0ðÂRÎ÷Rà¯i¨4&"Tì<Ã0ƒacôåýrÑÜ€’ŒxîiA0l2! A„8nS8'yÄ'Eàëœ'WîñErˆµ7 ø´t dBeUG8#Ðü0ªÖº¡½¦d"™‘ƒ tbœ ‚št†š(¯œçb†2—*(Ç-¢! Š1F0ƒ‚\afßBH|¿ Še ZZ:CÙ á;½Ìb †1¡Y7*ò!¤gT¦½ÓB D\T^±)¨!·V”zúÔ¸E™wFo)ÿZ†2Vs”ŠÇz/¾»WW™ËÏGªH„¶¦ÕíŸÅ6P«V㔂mä2í)âSÏ\% „z¹ &þa3&‹+û–›di*Ó®|¸‡5Å7-FûX¥'ãD\«E§ça"Reçí º¢tT3óo.ˆr¾àA?ö¶v*¡´j ÷á$EË%YIØÒwÊ÷BŠ+Ÿ¶3…*iî„Ѭ®«oJŽžºímÿÞ¯£aOU$í‚^ÊÚ¢ÈèC)Ô×?ÒÜâ% Û®ÛGÍ!y„FqGQ½ÐéqvˆM*L¢¹—·×k.!ÓhÎâ_0ÇØ^qËñiÜÕê×d8E“™U­•ŽQPFMæ¦ç5¹Nï6p½ø0…zÝJ³GÁÄT~Á5ô«“Öjó’MœåZ&£"­WÅ ¬¿ùBV°Ë•YNæ¯sxOc”©Cº—íSÓ‰*ß‹r•§­\Ç"›9U$ò ¬J’Æ4ì r'~‘¯6¦ÈÖw „V[ö¹J¿ê¿V‘(#¦í Óe—ü”0«Ñ-ÜéY9 îÛúÏ[z„)Q•«Bbô¥Ö%8ÄAÕ½Ñþ,”QP¼îšÄâmrä^Çú¦ÞwÜ#eŒæb^éèûÈ:HT]VZŸ37ÌßÄÇíö¨‰ž—{ÕõYõQQ(f9V#é2ÚüÍZTEò·3¡‹ÎBÅýçöW£$Dú©®¯Z¡Šf2ŠÊÛl“5×ó©1·)ºî¶|ÙUÔæjáøŽ:™N·re-ƒ–¤ê ¤:‹b#¦Pŧhb”3oåQÉŸ£ÓÌŠ¢*¿WkNÏåe×$ ›†˜‚«~Üa0™Ì•ýQÊìÜž¦­ª8¤­÷ÆC~œÉu·“7ÿ˸±î½Ìvëš•©ÿ?PÆq ”°»¸"h‡Úd;þ–½"àVÔcÿd¢2Òƒ1”¤NOEVç%/Œ¦jÝÉ;[ÆJ›Ÿr—H™Ìûåa»åÎ¥.3ÉØÂ\øˆZÿøÉ˜Ã§åN°¨4ÀoúŸøoùçûú´m0”8Åu¯€ wΆhòÉ„Á\÷·°äM-‡+“½VÒL)}{WI?òézÂÉ‘ÐDüZáv‚øÍò%1ÈQ–º¥ –WK´‹[M‡"‰Ks Î{÷SV¡ªœ1•X%'Uu2¥”«C©³…«ëu8¦rðØuUdÊ.™whí©¤db:a3©ÏƒœFmµÈ¨ößKéN2-TT —¤+ ’I¥($»“ªi(qÓ^”Š--[|ú0DDz\R¸Øo]~¤¢:üáBöoB&×ÿÆJ?b«¶óv^ijo ùœ_×mvÿS½Síw£©F+ÐW1Òßy_¬‘K–È„ ªø#þª‘Z›ìB¼ÔJv ÛWf¢Ù±NF& ^ô.~ýHŒy¨ä)p•¨Æc¡2‰¢!Æ#„BcgV…Å0~†ÄNzÙ¼x“¥®1ŒöoÇ̟㣠b̆ % ¥E*¢TÇSš”[ØhH H% hã@äc@ ®žÖé†&Ô‘zB! FÆB|È;Z ¨´3 èx&WêÖŸ ÄŃœÎB9Ê'€cšã96'ñabBøýÜ—!‰Â3 ¤U¥¸Þªˆ! TY …Â~ؼT`¡±Æ&"JQUЭ“ŠÈB™L†ßwŒøB¢ˆŒºÙQóˆÍD‘aдÏUEd¢ ZÃRŒ°ËŒPEdÕ `@ÂžÕ m˜»Œù0t_[…g3„t9MÊÝq#Mñ¢ý5©UˆÈ"+µ{Œ0Hjñ[x¨¨C*².$…;@Ã0­C³œr÷sñ™Q„ÝpRëÌl$1¨ÅÉÎ"jÀ Môăr‹‡ÅhP¤æÂL§©^Ðæu@h˜B#á„ó·[œ©¡yhƒD#¾YÊäx’™ƒând &¸€êÝ&é)(æÊn©]V¹ÔÆcg,˜B jH7AT§.A4ÌŒs‰rÄ1ÙËT:ToX FaØU9±¸ØaJ9çã „ZÖ7PËB̈jA“ÏùÓ2æüDá2sLô µ: Ò'ƒ„B£‹²±­¦(ܶG!9R11¨DšÊx!„ŽŠBõ«¨ÅnðØÂ h?„•¬TJŸD ™Ã-Z[–‹&ƒFÈ£º¢'(  Lû#dd'Á) Ñwãä¤þ~é^1Ú,ØD890ðˆe Ph¨!ÆOª»›Þ¨r s{”¨¢±ÎnÙ2›½0¡9¢a†ã]µ9—±ˆ '‹ÙÖRÆÌB¢:±éc- ‹D\˜VaÝqð¦;ŽÑ¸ãÈ V¬äÓ ðÏÄ àI+tcA.i4‰¶â½<4È…ö‰) ±GاMŽ"7" øEþÒ½šµÚ™xÁvTs3ÖÇ8’2T‰À‘¡ VT·9ˆ„ÿËÚîCêULGIº fŸ)éI¾íÈnˆÊŒQ;*’²eNF¦<Îîì.˰g`Edûr ˜V&ÁRJZãj23./1ÝQÐÃßÊZ«&h!™À”1Lé{28ÉB¤z¤AVä\cX#èÃØIXvl˜Bú¦­õžßñ`š(c}DÁ¾e¢Õݰ¢KØÂ‘?%Â2³þJ×Þ§ºc¤Yºû93ºÅ‘8eKˆ§q 3“‰ªQ¯ErmÚ®Ž)}®¡ ÙæaŒ¢¬á‰¢N+.¦Ê¶À·K˜›Må³ù~”)Ï‚w³"Õu0žrÜ·B9ŒŽÆ–êeãвf[;Žü‚,§ûÛ¶÷>^Šì)Ô‡Ìò8uÌÎo®vrÕHݺӒÓ6›/…Ue«îªQ°î¼C¦åSˆÉVúÃÜú‘o“vê)”VÑ%]=¯-¦Ê¤Ù dª„K-uÄ긊ÌäÓœSµX^6ÈØ¹•wžâbÅÌ+[ëk)„n"ΙÉ_Ë×ñKÊC¸ª3%Rœ%ÉJ×ó;lC•hà‰FPÌ…}Þ¶\ˆvs¯æ.™Ö™úD*é¨_¨ü%±h¢IŒ‰KWŒä"J()HÒbÎNqs›®›šîlÍQMU}zݽñ)˜‡Nž,§J’DÎZ¿ÕƳÕeùj²õvl±îÿBÕHtÀ„•ˆbC¨…•[Òž½-´9…J8b‘D±ûƒéx’Z—Ì“ŒÃ·™*@‡"Ç®ÐDÅlF*¶mLÚ¤‰—¡QYÊqy¨sÔ]»ûÞ™E Žž—!dßö)ýh“:Ìc ™wÂ>-¬øý²-B™Huºy„Ñ1±ôzb/eV#c?’Èrªô˜„-UÛ°·÷¡Mììì“ËdMÍb³M—yÂ0‹–*˜ô¢ ‡´¾&S…eDæd¤q©_Ússb= ÆOáÝ2Ë›¶+ô•ñw2«Üø§j¥a]ˆ‘aFaëå*‹Mí.í”ʵ,«ª]Ù¯ûê~Ý#sÙRrHS•$·”CJçA ˆ¥õÜ %+UT\ÖMÆÎ9¨Z&"•‡GçIµð˜ZUäîr%u¼»&öÖ.†J 8åRHaо¥OY(þüOã|£TºæwÙ9jÊS'çøÌ¤G^Åæºò½ÕTÜŠTå> ˜âÐN²?1\ŽwåNêÛQåk¢PäEÆöÛïùýuVÌ’–E3¯ü™*™ÚTY²Ü•¦9Yé¥S²”ÎM%šÈA)µÔŠ*؈f‘ÈU±p'W$í«/É# “˜Õ F/ø‡œ0j a[!EÑÞ<¨[QH¿[jó­‚:{É5,»”ÁĆõ„ 6ÂqNSÇR³$½RL‚Q€Éb)£°QŠc‚˜q#ü\â—FBÅìáº5#…AÔ3„6Ù(gEj¨SALF1åñYŒÈ ¨Ê Ê3ÁE .Šï!˜C|3ç‡-:*ÓŽÅñA"Ò†ƒ£Ei%)U=„B§P&0˜a (”lB¡þè æDGnj#5Pj30ŸãåQ -yÑ]%£Td¦e#ßK&¾e†P‰"†hD0FàÁ ˆ" N~àr˜T–Ý@ˆÔ‚c9³¶+Qa^ ) ‡1LJLgèl8Öìw‡2èv¨˜Û’Ħ A²ZÊ^BRH‚4ÊzðÜes8ÛT!‘nP¹HªèS($Á8@…*’Š« … ¼èP&Èe@Š Ûœ×déâ0­="Óêš(À‘=ØVU>¼ôj Š A5v‡ ÅĆNhU:¾#âܹh¡Šmg“«ÁÁ!bSÈ‹²0CÏjî Kœû™(J†Á‰aÚ,:·…d´0’;]Â:£‘‰¸¡¹(QöV1i4•FQ¥:6fä&_J¢q.6h¨Y’$Û„'Ë«ƒ«(» £! h%¤a6'%Çr™WM…qp!YÃ8NМL@Ì;:µ®RôQ8Aˆ†Ìɸì:bñÅYñ0D …h5Ka|àŠŒKŒìq;ª…bxB“:8&HDt¾ÔY>—’”Õœ«C!)+ãªr¦EqD@B S0‹FrâÄ…c‚PŸ¢0G”â3£·Rv«aÅ‘FSc¶Ì@”±L`ã9°·5ê˜Ò) ÀaÙ´J+ðç( „"c&VwQ +–VfÂFE1ȹ2Q™ZŒs*A•µ+¡ +A-4B,!Îó ~B` @$ á€‚Žu (SŒL@ÚVJQ½ ö>&f€Í¨žd†+„èo‘Ϊ!o.&´c‘g3fȘŒê<8¼8À‚ä0DˆiL<³EûM[rÄ»YJê¤Ét•¡èf¢dëCˆ¤~«Q½0U*/»QeÝšn˜í¥ ‰Vß-‚.®>såiùc;\†  4OãÆßy¡d—‘Äb.ŠÍ¬–'÷‰¢Qæ%–Εk¬„”›^ÝJºˆ—f³Ý·D•_NŸäÄú¦ÒYè].¹¤!ÊR@  x4iÁÄ4Ø­ñ&Õüô×Ç$‹T ^8ÂOíB6¢¤Šuå™”ŽR¡Ø!…tudÊgë}/é‹&/ÌõG”Šÿ"?Fê6ªÊAB‚D›¦²è½X——ïU¹™ÐD¾­Nß_ÊÖ„Ê #- §ÂŽ¥›*!K®v[ÕVòYã@4Ò(x4,Pp§É½AoZqÄI-j*ä0áY¬ÄÄñ³ôI:O£Øß˜ò±‘ED¥Õ±0ýÜç{¢ õn{âô–Y›8£uäRPœCJíJ]ÚœÕNª¨”éu Ñɪ aFR…*|' kÍnô纎GS”[ôõ²í®‰7cÇ*¼¦™êƒ‡ˆið¡I,·L¯ëÛ8u¸˜Y´y~%Â"›ôc52£.¦J£ ˆjURâgò—Þ#µ}5H^OôÚæÌ¬BøÈ(Žq Cfô1"H5žOµ’Ûõõ~‘ÐIoÉs_"ñ(˦Ç*ÔÄ A$¸v<¶/Í-âm©Ên͈¹“Ÿ{•G cý|è˜C&v!v¯E/Ö^=„K[ädW±hÜÝ}³£´‹Yœ#•0‡=Ü (Æ}ôü7,J`ôšQD+ÒÆq—qm~n>ñ}ʪ¾!ÉDfÌ)£)Ùï¢Ñ`®3ÿøÉˆÃ¨jN.|VþÀüÌûNú`³’­¿¢'\ôÐÝy¸y ”.ÐY6³©Ö²¿B†(Öaþ ¡]‚RÙRë!] ù¤¡ÙN”mà¶LxKÄÔÛ!QªD¯5El°@9R%åL©w;ÊeòЈYOþ) Ó¢-1ë4ªú:³œPÊ sü£µun…ìn/”YW”?É;m†º/ ë+úVÎÈJ½LŠw§µ‹ÄaŽˆµ6 UÕ}ð»íUNìîz²r˜ƒ íƒÆš«·ÄöÉ´ª®|…éØ~Šm¨IW¥K Az’§j«¨Œ3J5LÔžÛbÈý®F«ú•õl[‡(<‘$ö̲”~¨;ùA2¿SÉËZâVë”*Îëåû`²ªå8¢9BŒ¼WZfı,”ZòÔ„òî/¡¹‡BYÝd5Oó_BG’“ ¶­Â ¨QŠ=Hùkr‹RåÈštœBn=8t‘7ñ)éfU,§˜j29LÝüÁÍt•³{¤7¿ã‘Z¼µ»Ú”$_)/REÔ"²0qÊÀpHXÑÆkÏ2u&¨Ç«fY{{âÒ²†¯êõ²‘Bî¥äaJ©"™n¹þ_tµýé%d£kl‰ÞÊTД<ܾgP@1 {9Ô—Z´˜Én ‹,…M!$lFLDí>2ò­ÞŒbÙ˜r"£Ì[&)®5jÍ~\ÊM–Ñ[)’ÖwÊϹyE»±ÜÀàºï&q·­$é2/¦®Us±ÖG¤Ë¾u. ‘ †bs"§ö²öò™P;vF¨jKîʾçb‘6]£ÔGQ”è4´Ô²ÑÆ9rœEwµ´Qpk#‰è^]ïŸ9 µ>÷ŠÁ2½G¥êG½Ò dc¥!Åb­hA=3“óÓ…!¹m-Ht — HùÖmj•™ÊaV) èãTW?RENãîX·S­wo€±è;)þD6d‰OyDÊ4 å)& t LŽ\oFJQ0ÿ±*—qõ*rÒ¤¦n¨šäS¬­`aHKyªªL¡3–‰<‚H^“n*R´ š·˜òÎÓÏìû#Ü¥QTBXšõ-rñ¦¼PQ/âŽ&â~—†Me!m\ ¡çA„@¬q•…,f¡º¢Y3«§ñk–ƽ]¸UË!ð¢=šâÕ󶔆C¥N¹³™4¤‘‹)&5*´¨K(‰âŠ“äß"©JwRŠi‰a ¿‡×–ÿLûR¤¯¸ÕVÅÓ—å'¹¹Ï*ž‰b°Ñq9”Z¡„”Wi0#.Uy%±«DuǤxZmW¸{«1ÔæA•Ž´IJ?5Ò”"³%ßcY¨"6I…zaÌô¬·ýj/IX)ÉE²;!O—ýRW(Û£ð,Òœv6îmHA.S]Œ9R0 rž[D3>­K.Sœm.à–$îÞ/Õf¹ýk²¡‡8‡ŸB.pB¦Q¦•Kèš>™ìüe“‰-Řö7ó’œNFk3ÈÅIpæ-š[ÒÛ-!6z‚=W±÷\îŠïÞ5•rÎÊœºå•óI3•Œ:”Œ2†ˆ¯K ®H¡5©cÚÖ¸bЙVHžkk»$¢Q8*x©qÒ`Ši~2ºqÆ{ØaIÔ÷HõamÝRqE(¿+xÓ~—1ZC:ž±UË^ãÙ ¢ˆÍï¶A‡ˆG³ÏÑlŠ)±³l+¨Ž1È8AY)B!Å»yÙz„²µ W§õÿÖså?™S$º´ûdgàÎgvDC ‹tÿMµKehX²J=is¶æ5ì¬bl­3 `„”`©_3tKöœA VÎÚ[Ïô§„ÎuT© ¨žýâÞBH8¢ C×WXŒIɤq(›V)²Ø7±,›Õº¤©³®ú‹g©V¢Nes›N„¢Øi×Û8KFÑVRÓÄfA1CÒùäGÒ¨ˆ;Nà`V¿ËCg´¹¥ñª'êùÄìÄKmXf1ÎË“\º¿¢u¼ä³'JÇB}·¬6æUý]ð—ôÊ7‘bªÌ³3 ù¶„#ñ\ë8æ*¾Û’ÿÒŠ…6©D5ÄÙ³Ï1ð™žIZW¢ÙpÞ„ÊÒ¥QÅ+éyä.õnäË-r)2´D—Æ^¶hKÃñˆŸýÂ*«"ÈÃwpSõÞ¢£Ñ¥k<Ö/øòÉ—g0•;Z»\Z·"°Ã/np‰ëR,By G)<]=)W lÌ©Ÿ/»Ýµtni“ñš(¥ 8Æcú`Âj÷?>«]{µôX’fíö%^M\á,ºÊêG9GTb§w«šIŽ­²à™#¶KUIžuMë?cP+JáŒÊÙäz½JU¶1Î-DÜ’„ﯮ!(¸±¸¶bÊJ³‰ ºÅôª”a]c? j£ c/5²ÖãP®³%…FÂéÆÛZCâàUÑ æo#°RÈÝţػ«q$T¹»mÆÁRU'”ê¹Bo`z˜¿Eˆ@ž¬s7;'‹ÄQ0è’1eteMÕ#‰…Ìüí—HüÌš¶!D$ç@â~-uv«ê™…dyUt{Ýé3ÔnâÔlrqwödÆ!r†Jî¥2˜bœ”RTü¾,ûµ#æNÞ†ÓuêG"zÜž¯lc›Ò¢Ùú¹bÑ$òøØL_?2YÍÌIÉJª•`Š:¸9dg™:þN3ÈâWIzÜÉìÚm¥†‹é!kÇ:“¨ÁÄ2+ÜÅëe ½!Scçu÷¨ª\W\ºÑ׈IIÉ0ÂQÂîˆd-×rnQLåQ°¸‚Éc}ÎK„jí¼å½+AÕK;]¥S³k ™²ª.ÐÆG£3¾# ‡«o5“L%KÂQ)\y1¨Ø¤A‹ƒá+³¡Â¤¢‹çº×ë¶¢–¢!PM!«kõоRLÉu«©Xe±„㦦g»Gé³¢‹gì“ ÆÂ5iVÝÎ/!$JNÕ2NDòÜW§äñ3Äõéh§˜ôSØØÙ«M¿ø„àX ¬Vs§?¯ßÌëAûPá–ˆW+pW~ eŠ•1bt:¡!¥ª{)0 4­(¹ù«fqêT¥ æFhTÁ ˆxZ2¹‰b,†¦«™ïjJޱÆe‰†û :Cy `„5ŸtAˆÁÞ§r +¨N®(oãèÃVP†`‡BãR@ÔL h eAãm †dQD6ë\Æ^3l…1‹Œò JêËx´pÉëžu(Y* ¤ !ûŠ6H‚a „å9ª®`ˆ!F F´*°f‡\g(§D„F„^FrÑÖá†D,êxÜL Y…P½ØS@P’ ÂÈ8ɲ›VÒ˜`®‚d6W1DB)„ÈU BNF´´J5=ÈQ­d«¹Br51Ž„f¥ ÉÉÊE"ê'v9 JœˆíàJD Hgæ39*ÄðRE;¨kc‘èúœÕve­Lèdåa0lbðæˆ(H caÙK€v-À£“¸ž¢0…uŒŠ! œ#2½0B QßhêäA€¤ŽÂœ Ý–¤<"78£"¢ @Îb?xdR bS¡‡Ä'JãN±r!",\üÁ îl'FA…ÑÅ~“+µ çãæìø/@Ì¡Ê1)ÔÁJðÄÐ#ÈeÊËÕ…zD÷^C þ͹Vä!àÆlnäB}Ã'ƒÀÇpsDç´ëO„^C"É_hFÁˆé|†o† R J §ñÅ›¯LE]‹ÔlSN)»•Vu`ê´ñÄ!ª‚œOcî£ çZ})÷÷R›•%©¥.ןZè¦UT¡z»¶`GZ¦5÷ÞÎ&׿ 3™æ ®[•ˆ¨”F§¸Œ¢ !Ô¤ÁͶ™Iå_“ôD]B"5¿Ì¸‰¸½ÊÂ?b³/c_ æíåW×A–µ–»ÕÒùüÒ˜ë™Ê¸š:Dz£®·cŠER]JŽqÒè<–ÇíAÌÉòr*ÏÕsPº#¿›õÂiwpQ¤æ.ÖºIe$Æ#ÙÈ©‡êÔ½•)¿ì˜d˜s›™+ÝÈ!ͽB1Gmº>žÂ/&·¯º*³þwh¥ÒTš§ä+²ê5› (Â;µ”|§8¦wÕÎXŒ÷ëfçô…/%(UÖ¥‘ ˆÂF0‡FMâ–l“ †5?U›Í—BíV„j#~Ó•Îdö›MÙbŽsb-õý+ì¤iˆç_Jö“‘P¸®G©l¬u¹]Šêã²½ÌFOà©Ùò®×Q¬>³{i%û/÷U¨ß¯þ«½u/j?©rˆÄeCvÎtQ’˜Nsl«Òvt:? ^­ÅaIªF!tC±½cŠ­ãªçí‡õÊ¥È/îˆíœ¶ ¹-^vVVÙ'Æ]1&c"fWMÚL3LGªûf”öÙ}SÙL§¯2ë‘VwL,„gLÜ9‘í+1EÄõÅܱbó½Uvn¤I•è.t—1üULþ1LSuÍçF"6VFÒý;úÍš—r >õWfS-ýVaÅJÒŸÇ;âuÐÚ¬¨÷7ÊT±¬CRè– äÌŽô‹u»#/`ŠêNGzqÐå÷Í«í ‰Î™¿¥+¬–¢gœŸL¤\ç+RÌëÇZc¡F®;Yg,¹œ¥í;~!É7ˆ·Óåd¬îÉ(…Aô_9Oäœî´¡$¤ˆ&±©DR'ʦ$Ln›œc®Rò_Ö —IÊÅuô³QÎüT©Ú”\)¬Ú‰ªŸåXõjäßW.w­¸o&»ò\¨¬ž‡Ï?ÍGìT“Öfuà¢53¥'jÒƒˆÓøŒO©Hô÷}Ê)³|ƒâoæ×TÝÜWu’‹XqHL3)I–¥éVW:<ž#îtS~ß­’’¥§ÞŸ"ŠDÖ1xaœ›1Ÿx;7V¡SVÍÂýÉÉ¢·ÖÊL´ŽÃÊ×]ô¬œÈZm޹!Õ­ÉJ&Õ‘†d™jFqhbx¸Ë¬ï+ù)\èˆó èGÁUˆß¦TÅ%ÈD—Û×–êOVÊÒO²)iP„Ý-©¹?2Ç•ÇvbÌÃ!•éŠr“$6‰Î‰‘ñ¤À&°!— #š†$ìúS¨c«U4±NÕìé†ôô¦åpÝ0Ë­JY5ð¼&!‹”›t•52^¬£±D<äº+CJ¿­µ'¹Íw¤€b$$G!d!ŠË)z>@Þ˜$3"@„FR¤\!¯ª(«.e#ÚªUr°xVþ˜®þ1Ї•0ƒŒfú§¢ÙS– ^Edá¸[Št)(ª’Ä'r?2˜N46S@”A±£C5AÉi0‚«ˆõ#vÖôÃ’¤@ÕŒ(‹Lh jÑD3”'GBõbóEn9§0Â0#‰Ó˜H11 Þá Ô¤C戔Å[…iBˆœ ˆß©FÂ!j‡^ý°d|«æÕN^]°#ã+OÁ‚¡Š4€HŒåÆá1Pì:eRÁ½!˜”¸×‘B!V®#ð׈1!¸›„ìÉ(œßW%t¾faN©Á›¾CoÑm1D â£A›å;Tv@†<(f (™˜üð0Äã`0ÿøÉˆÃ©mLø÷Â÷¤÷°÷ãø8ø­´#T±o­êðö|hfÂy ÀÅ A•%ÈËÄYJÆÒÖ÷ë_7yð»ª)Y_w°©Fc E~:¦­f²Újš›0Ä’?Te%B>•þW޲·„`S…ˆ…Ûš'‰.¾Pµ{ Ö¯²KO+6µÆK˜¬Ž„µ®id+ÿ—/Ó‚ˆéQƒ©¢qÎD./óØP)ÂW‚‚½f­4”‰ÃŠ;®‡Kûÿµm(´Žº¤2!ÍËî¥vB©±¤æÊ¼ùµ{°‚ŠÆ ¶(Gw@¹)[³¦VB ¶ª‘XAË¢W&4’Š¢Éƒ£† ’ßúG6…~ñTG”b••ù3â×-îZÑŽ¦õ:/k¦¼BR*ұÊäªH^ý¢ï.’‚òÐ’‹Û[^ýRדу¡\)CˆSk†n¦º5|ÔT–&,nÅÞI‘³m“yW#g7]Ž!Êi_„ªi(($»PDG’„å' m}‘*¡† "›ºs©e¾ MÊÓ:®kòÙɺé´ò7 …(ŠBúÙ°™ûø’¢Hò±QJ†3j.WÓ »N驈ÔkŒ®Fó"ug#5¬2y1[¹I0ë»®š£%I¬^ªãö9©uÔµ’bwIüµ.¹CŸ çU|2ªS+ämý •. D!Ø}âBS" Mð€bÑ… FA •ªÍ ÷޶Õõ‰ì–äÎ%µÉ|O%êߺÌbPˆ‡˜‚‚œÕZ3•-­Zqîz“»•¥3B¢y#b0Â)ÖÕA[Õ,m®y6Ôº¢›t%I0GÿÞYÿYsèßO- §ìà…3ß„‰eõ¦`›|FJÝʳåG:Ö…E¶QŸU‡B±®ÇRïXüI¹Ý5³¹ÿ´ŸHMO6­„bœ…W|-NîWCWÖaKˆÃ.¦RøOÒ¾ûö³\°ÈÆÇilRc¤Œ¶rœ£•Ô¡q÷E¯RºoÛpäéJWluæãck–´–‚S«œÜå¥Kt+ÖcQcœE1í¬or䨧E+³[s˜ÛÎÞžUP…â‘íMŠŒx™{=Y*Š”A9'¼½gq3”AX„ 0Š¢s!ÚZómj](—=ü.¢&›´•z @¢% æäôÁeeS:›’C04SîÄ(è§™ ä(f„Œ®Õ~$| €aˆ40“%r)9¸õ ÂP7›^€`ÔËiXó OЧ ³ïÌ#mH†ÞQÁH1‚O³©ï`¡Ja´ÎÃYD†©HXäEÎ&DÜ¿ dfÁIPéCX§Â‡>Aƒ‡)gQMBj&p€@ÀfÌ4W‚*PŽ3¤ ù@SŠLZ†b0Ž)# •0ØcéX¢˜àĤq“Ðñ¸JÒ­„ú£CR b¹!¹4ù;…]ƒ‰$Ôš9ºCi~ž 1€˜!#ŒaYiã –Ÿ¨p…^(w:0ÄãpŽªcF äufŠt…}ŒÉ›ŽÈ_œŽ©þtõj³TZ’‰z4®Žp®”cíüÛ§¾Z¸lj†—8Ì’¡Q—!Åc¦n ¥¥ÕÏÔ—Ï¢) S:ÕG0¨J‰–ÎuÊìÎé¤dã]}·Ý¤5JO(úúdßšÄï’žæF^§”¡™D|îÔK6‘ ×§ãJÂ:I¨çIszdR„+ê銔aª/¡ËÙÌ)´”†¼•Fv®õh‡t*ªØ"±º‚:)»¤»UÈ»™¢ÄÅŒ‚ÚÔYÏEV]fMÊT«Éa™q\W£““3rÜíù·ŸÉÆ=:[0ßú#J³œU9Å1Ç«Úë·ÝÝ´¿—ÝZ>>g‘wˆ"ü¬D-Y(‹ …w~&–нf‘}b3çïÿ´×7Ù*2ââ³&ùéØœ¢4T% ”Î7§ª8((xD^}aŒ$1°”Cä å‘Ä\ŠR&ĵKåØœ*Üýð7bá43”â”w&@¦+9¨3sh¦é•bnC’ˆ ãF<Sˆ/›V3‰Ò¥qÊ0¸_ Á¨0‡I¶{ù˜Õã¡4â…8(r_ È6F0Ì%¤Tå2¬eÔPj„€—FÜјü£õ-(¬;+«›°}ec@4°0@Blä+ «xª"áé‚K7i¹»hƒ ÆBC3®pŠÅùDƒÉß3!‹ÊøW)# y™jl5 ºîFüv;w%¬|^)ɆÊâ jȤ2üÄ„YGb:J¿Çs·xx‡1š‘8p¶Ôh /@ ¢Ð}TöFÄ Íæ.ÿNvÆâ0•P`Q¡ôç§[ÆÊ ËÔV¡- Qa¢³1BOÄ‹‚# ‚̽…Å•ȧD^Ìž(ÎVL ‹°è"(þQŒ‚Dá‘ð§M &fdƒ ÞÂea¾J!>åþ¤QŽÔË…pç-ù2MÁIC«q8ÂQƒ!‰è뉨$‚‰€÷ !ˆâ$Tê(QwÂJ•‰!ïEDÄ. íòâ%0Ħ:hÇÙƒÔå*‡ÌÀ€Äcã¼ZiÄ®Ô!&q 1Ì»ú3Œ;Ws"Ÿ!˜¥uSf0'!LZ¦´˜@ˆ F2*ÆqiTC„A«Ô­Â½ qª #†‚I9Ãä:"a€™„÷Ž#=lAÄ´¯Š&7èç"è(¨ø Á <á2œƒp×Ò®ÀLÈ2|#ЇcG 8*z§Øz†Ì|…Á±'*cÃ!œÎ•ëŸ1AN:zU _J\0&j¢òʇM²@£¨P¤."{0ŽB–•éj "‚C(‚4n¹pÍÄÜ„"k A7NENJ?•áe‡p¤ãFgìa¶C|Ckp€ACELeéŠB0N)ÕǨ§èZV3A4)æ vÔÈ0jE‡( úÊÚQ ØÊGåwådã%!]Ðed­ìú&bйù ºÿÔAOa(l%ÛÓ1Á@Á¸ Ô“*‹Ð£$ðÑ1TQÊQwåA03„Îd(¢Zˆ¼È@ÁÈÄz÷œÜÄQ޾˜ªÊOczÀŽÝF?!WfØZ$§JBQ9$B(êRÑŽC„@a³; MÒ–˜NÈ&0”aN+Z$!Bb§/l7^_NÄT0MYy`qˆa3E£ ¢ôSbb§b*ÑZ¿ )¹¢ê0!‚’”¡Œg˜È !0ä2D;tÍ€xQM†ÑéNÅ[ 0Ëvr‘ñð˜ƒkÙ°Ž"½4D‡ËBœ#ŠW¹R˜À !R—…rC"„!ĘXúg qh§7FWàN—ЯÉ9†c¸ÊÆ1‰ê Lƒ"T¥KgGu¢“{ usÎèÜ’† Ñ…sa9°†Â!(74s…ŒBÛ±±Aå݆$Äþa“ç}lWã†l'GS>»§aD!D‚…Ô\ìe Œ!³_`X"‰†Cr¹PT‘ÖC|YP4nq×±B[B`N¦*˜@Ýû%­ ˆï®ä†Ìü+–½/"¢`½\ªDa IGÂ=5†îkXÇC0šôÁÞ•OÆâ8Ÿâ Ça¹X&–¦ ܆DbdHϺ”Ùb8.÷1Q10Dvuq»FSQ ”¤ Q¨åqâÀEö‰Ž £… Žä$ᨌ ¬c°## ö!œÍHŒz˧1Eåá&®|W+ªÄq Ä3 = 夬5jAÉFeÄ:"´Z%§§æãÈ: vÖŒ€ è)E¢x5‰Eت rDB\+ŠK Âè  ìv™ö^¡˜ÅÅÃB*W^'Â;™Br`Êèê¿DLR (%Ö54â7ø‚B# ùŠ:áT— (Ìç(¥(^Ð7Á*‘yó¡A ˜ Aa<ÉÍÄ…”@'`ÉKè§*Yöàñ—ÑÄdJK¦H¥Ëˆ`˜…•>x„kFLæ¢_0l6ü7$,q€2QCì ‚.wd:¡å}~›»T…™ˆÁ(—†d" C„aÁK(™Ïr™x„Å®w0òDF'ìa”lࡊ!Á”Œ",;¹ HÞA!qêwóÒlºvA“£+nJå ÊÙƒJ@ ¨äÆF9…8£Ñ©9‰±¬o•b \]ØÎ„‚p­VSg¹ú]RŒPJˆ Δݘ£>e$Hõ~N ›©D(U0r”ˆêÍ\' ¢ä3¦O™‚† º¢:†!ÐAHîrÛV*T•]ù›’ÎÒ!n £„rwÄ&Ĥ°dRs…ëËH¬fB0b 5ÜàÿÐÆ¡" ñδæD§ƒ6u6<ÿøÉ˜ÃªÆNþfÿr¿Ó_óOüÏÿSÿâ´Í–˜³óǶˆG×QFê2±LBQ † Æ`Š@׵̈ EGŽ·™à¡å3 )Bœ a‘E2ÅãåsvT\–)–ö"¸žTÇ3¤¨ÛàOÚt(! ²Fh‹D" Ƭ=ÊZ¹C 2iÂ×ïNXX7'(*òÁ˜µŸ¡†C¥|BjÐA Ã;T0fO¢ˆd8hŸE=ì!ébñqg:±"FRm=Û„ ‚À?©22ƈʰ\|YP¦…^ ê¢47Ó¤¸V—`4B±-;*’0×î(e. jbfçê s™XDnHŠ‚%ÎîöM2¬¤‚à8»)©'¯ñB0Ã!›ÐŒRHãFD³!u`ð¬üäÁHq•܇.a `Ó±B?«Q æb hDR0rMq8”ü–”Ñ‹®Sr8FTr ¢:R¦Rv WdTDh ä©ê„L@†L ÚD®Ô¬¯MÙ/±EÅãÍRÀcV‰[ª"“†ø#Rbàr† Ò­Û"#¤ÈoÊärZê_pÔÊ…Ié3„øe6Ê% 6!±>U‚2 Ì!éŠs×d‡Bª”ìè2å†<R†XÜà B GÚÀÊcNeÄZA’‚rÄÎì+&›òvF …w><ÝœŠH“Ýnl•¹†‡.q f !ƒ7± €e ô¯Dá­) -àå ¶«–'ØÅ ¶§"Ì 1°ÐJ¦ZwÈ@Œº»Œµú R¿~bd´@³Àl`ƒÅ2m^"£‘˜L§žìæv/¬Á¶#ݪ84PH ADJœB™FªØ+œ©Ètý„Ž)(”cí Œ%™¹F&´Ãš’bã#Æ_ ¿aõ\‚—*|¡?BÖBòQpÐÈ ˆÖ©Ð! M°Øxç–œ!ùßÒ´]–¡4\¢R /cP‚B#àÈäB0˜™©aë%/`Œ™„Tí g+“YxÉàƒ5£ñIzÉ)?7 jâ£|¦„ä²Fctb«‹! …6£Ã…()Y¡yÅ:_І'©„І€NŒ!‘ Ê?0ƒ„R§(†)ÊB CÝòE³0–”4CÕ¬‚ŠJ1›ã³îP¡¸˜ †¡©éhjo† ¢5 âdÎD«‡)…k‚AÉŠ´*ØdêmÇsAhQŒ‚n7ŒVÈ‹¡Á‘Bl¢øž:*áÁÌî)A W;˜îÚ(mA1†íZ“®1„K\eU,¢ç‰—BR%Æ$Àì$!V8CkŒÈ@Áž1FPî‚Àt¬„HNäSMÊ!N0Â`ƒ* d¦dÅ >FY;A§e;¢PÏÆ€@G@ÔlN`l(A:V1,0(LKÌX(QÈ^Å /Ý„‡Ãv0(8Ž@Ì„`"‰X€IÙÇf J9Œ§p¸#w׋ôp^‰‘™‚$æ®xÑ”ù9Ú khÁëÇÓÅæD% 4a1 eÎD±fu_¦aõ³ܾ…+(æbjï*é,!lcr!HÄ¿…9µEr‰-¿(¥¿"w±½øFJį¢{C+藍 ʳ5JèT:zU¾²ûœ"} *`²KY¶ÓDMäÉÂ/ /Üd½oRžÅvEÂ)m$ȈN×,Ž· ¯¥äQëÒ9ŽMã-ÉøG¡Õ6¦$§ûK¥ÆJsÄ ÃhøŠÚªFæ ¨¥ä×ó²H¸Ä"©ŽŒ',‰a$éqËçS·ðò:qkþæ]§³Ššì)Õ©¾žs_¦/6eÐd±9T†Ñ?qY‹Ò”sŽ´uRZZë±×pŽ"XO{(«Â^í¢–™Ô«›ÃB%+ý¨Äzp‰uÍ.Ο|%†õnOL’”Lã‘«SêäYbSr媆u³Ñ›u•RzeJëåC+éÕC.É®d-´–u|9NÃKýùÛŒB9yWëŒ@êKZRº}©ËËÔr¢©ÚÍ.¢|Î!¬r‡q•ùøÍžAHìFîZîkÅÛî§ÚOï="á¿FB“—P«D® è9= Föd2-]ªÒ‘s¨U¤´b"edlja$«ÕŽB,ˆÕŸÔ•z‰AÎõÒPuFvê«û'SJe|Ö:÷‘–¯Ï!ˆ“×ö®×R/u„HJß…mbɃ‘=q9Xµrñ N­ )„ÇqˆRõnÎbp`  _ùî]œ”nEû£œW˘2†pÈ Åè2;zé…Vã‘ Ó™…!‚ƒ9„]áÑÁ4 „0d ñ‚˜wÞõR€Ô"Œ)¢¢·j‚ŒáŽ$̵¤SCvò (AÈ+ŠpÁä ™FR ã.b A†PfP@)›'p‹,cÆ6ü8‡¼:ršF: ¡¦/ZJ"(2(HŽKH¯è¨ûD©ô)*8ƒŒ}™Äa8"!œ „¬B„ ülƒ@”eŽ£òç|Ä¡%¢ 'JÞ&)ˆà˜ÑH…"ž–eh¤'ÌPB˜Jgo LJâÚæë$dÈjc¢Åx…Ú@‘(ËŒ aËÅB˜ˆ!‚B6(‚óhA¸Î"æ]•PeÍ”1Y"°î@¦Ž0íÅ6ä"RLÁF‡=b0ñ6Lˆ°ÆÄèçAYÈ)$„™ÌPQìíi¨ŒD H2© 'iw„-ª¥ ¤G" [%vÖÃ% 8ϺQDRbA™bˆ˜zXÿ."¡nЬtîhàg˜ b„FAÄ+† êôo@cÑÐÁìÉ7™z¨…Q'cPÜÚ²ˆ…gÜ£7¢°¤Ánu V°œM\Фs1c(Š‚"š›ƒ’žÌˆTE}î=®C ˆ2™T2fR™øm×'”‡Dÿ=„8ˆ …¤ á+ÈŒHE3¡ÅÜ&cr8„8‡¤8ã)QlÕQ»1jÚ…9 ÂUvÑ4›2ÌN†)c0¦-¬3 „T³ˆ/⢤M>PEŒ8ad£¦VhA±”‡"U#¦ÐAsC>ת•®(±Á–Pq#Ñ«!®&C0¤ ‘øC‚-QÅÄÎõq¸'a‹„9Å¥K’ Šš1)9a‡VT*I\¤ã2²¬…oCÊ6È‘ Gv“b9¯Ø#„ rZJ"}e8”±E½v8ØÐä Ý&L$謫„+s(‚›ÑŠ•U h¬D*‘„2ë¿áV°Ã(Ц«LcB¸B!Z”ŠfÌq QeÊžÓdá11“› ZQñt…,Ž2v(Ì‘¨@æ¤9$Fñ[“©¦Q«+ y‹šGÃ)¾ q'eS]‘È9ôå«&i täÕ-]¦UjLJU½ó’¤#·'#r§Jÿ™¨Bá›_tÑ‹)uEOíß=ÏŽ®æg23ô¹Cì»ñ¦–ÁÎU¹Åjg¬šò›–æ#Y/ÿ^!.šdxf•SWKc%ÖG‘w‹ë‚vÊ´„gÝÝ¥sR¼šGŒŒ9@`­.9Œ›[ÒMÃýRÚÔ ò j‰Å©ÔjÖ^籘¦k‘HU–Æú ©õ¹%ôßB%Ü«Eißö¶Zz”Ìœ:éê\­)ø|5»Ã¥Ëî„~R{_Ê{?¡~rYè]" U©zN„ ëŠ¡J´‰5R‡AH0„E5Ɖ·†–$( *!IÂ/Åè³Ä‡Ü…Y.ϪÖšÌGiÊžJ¶usõÞíé__ X…ó% i̾§÷µžÅ^~^z2&®wá%½hB1ž(wÖ)ízMñ$®k!‘†\½ù~×lo1•ó²Æs†‹YAY²åï͸ã¶á$%ï¡cÆ"¸½ ‚áD2OÚÖÞ¢ÖAB˜pP‚È ò’åÛWÛ:~°c+t°œ;álm¿ÈR ¢¦ä"²f¥ëb̉ÄnbfÒéÄÅÂI#ã=Îõy޲K"l—yÀ(XÜ@Vý$<–‰Ñ¤¤ ìZ1<ô¶åîë±ÜÂ!bØus`ÆÂc6ÚÄ„j§e(Ïq¨˜%]ë!Hí·z)ŽR ȳÊkI 3„[$㉵rS}Ÿ6™2Hî•É- ±íô#Uj£ˆ`èkËŽ¯H†N)QuV’;³Ñ§I·š‡¥úa¸Ìw#0^_\.Ö¹´)†9 ç…®f"Âê-6Ñ z;¿§9ï¹ “‚¾ΤÍZûáj·=#%:²Ðb§\sl‡»yÕŒj\7%_ùF!'T.ŸëT.XU88è+—dm‹­)hßÔ•ô˜a9íkh¡9ô‡â¥DÃ(ò)V‘kB±J…]£±ôqf…¥UÔL3L1××K»ÐÄÔÉTUöö…-׉ÔÎÔ4Zpu¡$)×öÜzáî^®’ŠÂ“ìÛu0|’R½ýÆ¡sk8Ø´çGóLÉçdgÖ±/~ëu$± )œGŽœ*ª“(¹á;%É¢¶—*~_œ2 c t%³ð,°$ŽbîœÍ@…!!d+{2°¥ ¤z!-_%j­š X¶ÓDÕÆaŽt®DŸ2ýmæÊ-ˆd¸‡_Ç‹´¢× ê%MDÆ)ìž™Sœ8‡)–!6)n'*PÜ_Ýå]É›—ÝD°¥r[bÖª¤d»•f#†GG¢%ɽ´;ªøbì<ð™uRËBŦ!†ÓñTøŒh}Ž-Vá1sÚ„ãõgúªØäÇgÃÔ¥úÿUøÂœÌT(â gPç2îë­pIáÿ£ÿ'1;)!6†l«3ÜïJbÙÃÔIDlðη))™.v!ÚÅÍf§%d§Û”§i‡Ï’é9Z‡`RœÁèqü´Q½˜œNÑÜà aNÍ~JTøyRLZ5“FíÃ"® W;“íÒ>7™¬.µvã%’ëö,AÈs*¬Ô§zRå0WáGãVü‚Ëã©Ô¤ºi—m4’ÍôB£q—BfýÜÅhMœ².qx›Ú†sÄ,ª%š§~4×Ýì)å&Q¤âg>/´‘(@ ˜,·dn”¯ÖÅË<‡‘#ÅÑÊ•ÿ!Üð†£´„ñ1+ ž[ eG0FFÜõ9§¡¸|û¾›9Ó\‰Êe—û-‡È¡NB R¾gçõ,l–o?[*‹\ÚžO£™¦«g&¿ô©VÕ®êa’Ä:7÷µˆ¤]t2„{’¼ÇwŠ2BÍ’‡Ï›d§SÄ(©GO©,Z—–šrU²Kªo¶beÒ„U,D˜Š!§{£ÑN^dºõÑ &ºn±•›“jkÛB])EÎÏZÓ¾6 Å™îªÁÌ 0Ñ)£¤òß+Yi1LÅG«:®)GËïägºwµ’”!CR- ödÿøÉ˜Ã«ÁNÿª¸?пäßñ·øÓüyþM´ ,ï›ø}ðÈ…á†o¥wš­È%û¾A*òof²ñªf«ê‰ƒ/?kvq…!X!S¶†•u‘TŠÄ#V%;®Îš³|–úÒÊ©!J½&O‹¹†YФN'Ч‰˜Dm©Î#ukt}aPI‰ªm"XU(òá©*Õl¤9ûЫJ’]mÜ71KjS’Åäa먚\‘È1›ˆ ¤O©•S `‹[6S°å}'6ëýpô#ÍX—fö÷b R&¯ø¶™*! ”T„”Ó–Úö½aX[ŠbZŠ3>ê '¥]<äj—½7َÑ5‰‹q1JǾ•Øüe/)ªô~FS)ØN³[[‹óÙE §r÷mò•àžc"Ù®b*r&8ÆþÁQØb‘:ã™kˆT6ÙhkÈ™„«®°­™/V¢a8ºì2T¾db&mfJ eûá')ˆ¡NV“%;Se£ÓjDõˆÄ6ïTÏÿY)õ­âßmÙn,¤j§ŠdJTßÇ`ļªB©ctµ¹#oÙH«B?~‘fÏ£vX…u΢i¼„â˜Vê˜í 0æc ê›1±B#,‡NL”ÍBµDO›R¸Asó‘oÿ5ýé%*bõuf-øÁXÿšjSc™NxÀ¦êBß»zb¥§nÛÁ |â’-ù,«Ìºô™’’TÅתž›RŽôÑÎcÉtö6ë΄ÒùÙ±Qon§|¹¦§‰(çkgÃóa™‡ý8Ì~sëñLë!—[wT鬂ˆÍªÚÏ”aÏšü¦ôË(£«‰C›¦ª¬ŸÖ&Ù"Š¿öI/¤Özy¹šcBZS¯I:&ásEàc\PÔD°£PrÕêƒaôh()ð IÇF%¢ D2ˆNJ¢Vñ–…lˆ49Öˆ+…ƒZ€˜‚PN-/â‰dí|¤!g0Å"ÚëÃML ØÅ !A Q‰rQ%Ràô«Êp‡cä”!ò:a?~ØQ2j MK¨Z…î媟% †>ÕyÎŒHÝOÌkŽ;Q‡>˜˜F«Ù¨ a С².Q%·š+:C”²…[)Odå[€”\íþpA†PˆÄA$e!$¡€‚2 rfg3ap؆D@"àql8¤0Z"9]Š‚”jŠåPŸº ‹¡ nˆQŒ+ÓC(cÃÔ]˜L9:C”†ÂoPíHÀrtƼ š&ÞÊiðA,nP« b›ßÉŽ¶”á€Ø„ò}Ç/rŽGfÌŽ¬ª‰@ÜQ†¡’É•›P`#‚G I©Fj}Oœ`ʺ4§ ‡ï޼$i <æ8ƒ¡ bÞQZ ް®Âï·10!„!ÙsðÜ Ã) •PùH‚9<éˆòô¨ÊU*TM ÂCgÅÄ2žp–õYï3Äåż|Ü%ÃHrXF4á2 HÜÅØ Å a_´Rªž å.$" áéч(”™S~Á 4•µ \Q,Á‚”F ¡[6s$.1ʘ†Äd¥¸Wàôbëѱp ¤' " ¦Ê!E"àå\þÆ2•l˜VÂåÿž‹Q¿¹¶ä¶Ü–ÞfýéUšœ¦s™Ôˆ]"ÈΖ;•tÇ+´]KsWŠÂ;‘ñ…Ñ)Ô¶®ŒŽ’-ŠM}Æ™ A.ù¾¢²Ñ2E)pí´Û}]N¹bÓFF9°‡'ãžÅ"¹ ƒõ<ŠÃ—0œn¹sɬåYzÆ:OtÇâòDÏö±Ã2ùKö§D ÉG¶+±ïK>-ë"ÔÜ[®êQÊ9\ÊAíªÓ˜A*C‹uÓW’%ù•]ß´lï)mOÜ­Ùh†ò¥ûÜ+ÙÏb›mZn£½W5ÁâZŽZTÔ)÷œ‹áLD\AMBá\Å}ÎùŽb对ÿÜe3²N¾Ã¯ÒˆId¡¹—ùÊÄ¥uDÔ!܆Þ$‡–9ÈHÊ2˜Ô) ˆå#³ VŠ¡0ÀÔ@@*5$FhbxTÛÅ1H (ÏÙ ¥yYk³TÔ ¯@”E|‰X`ÚÌVA0އ¦1š»1¯Cœt×CZ‡b›+eDÎ0$—(gºâU±•F¡\Ø•Å&„¼Ü%T1_” Ä vÎaR¹ S?õJÏéTÉCLJrÌÈ á“L 2e a !0! 3jU%Ì ¨Qy(tçrANJÄá ž‚2a]Ãó`Hуv"¶Cˆ&؃ê ‘QÞ1HÊ"J0ùLsÅåF ôp™,©ú C˜XóЊÁ OÂŒ`Opθ"¸Fayª/Rå, ÐÔ¶*%õ×­Ôt½’C»i´TІF"\Ù]åR¦ R?.PØ´ú“ý™Ÿ›ƒµžØôS:mò6a®=yW7æfi©~"okÈ,ÈŽþ…b.ë" W% µ)2e²)L”w®oЍçÕR#i~J5ÙÝ8Ä™ñx×:çaã[ ½Ø³¢ßRt(õn°¹é0Î+»œŽÕ(ÍšÄy•ß›(îuÔͶ<¼.eª'"ùVêA±±&‘û³åk8„ŠÔR›»²Ê–R¥w?ÌEQUú¼R­M%‰„N²eÔã:¿[uבN[}1J!…nJž©[£y¨í¢©Â¨…)6”ÜÆÂù2ˆ¢/?sÔóká…!'¥0ÔIYµòb«C}¬©¤ì'X¢ G~ê ½ã¨‚¬èÂST+Ê©Q!ŠÇ+Lœ) ‰…ª)PW¬ä®! QÐèôaB A²ø®E8,%aòºIŒ„ @Æ2 ™† Œ2=|àdcÅ8ÔJS‹ýÇtˆ8Š*°V\ËḀ‚̾qjjGîázq&ÌýʈÂÊ^åò$˜Ðné>ØM…Â%4kج­t⎠2ríL¬¬yÐá A츯­÷ñc‚'p¾Š±P3§tó5rDü6&T!„bV$­™B ÈÌŠ\bè3°A‚X œvqc®`ŠWNºþ¦1Ä)^,„# »˜!Xaq‡Èd dE"—+ ˆD`Ä"Qâò2ƒ†q‡€êüìUõè0t9Tê#3¤N}8Qöm泒Ź¢¯Zô@éyP†x߯7? Zü¹ñ&#˜]$Ö¾ÊJ%QþZZÊe0ŸÂ» pVû~ÍyX’‹Ã~+2’|¿[Je¶!9ˆsœï!Wj„•‚/ä[md+™'Ë=ÒæI'^ž5UÁ jÔ$ ø‚„RŒÆ4,ð]ÿ¸ñ0M¯”¬!D)>Ÿ‰Î*íÊæl)ÁRWò•)„ñ$'m*?“%ÿk‰j_·òíRŠ?,¾õÍݧ!Ì æhÇæ!$W)9/¸Qj6ÎeÈåVës1,ܨë¿Äoß¿i¶\G+•ª>3U‡:D“iâJ8F'Ói“S-äq ‚€e,Nœ:âÛjÉ´’åÅò”fÚ^[í«¯M'ÉBÛ¨ô–r—]‚)B(åA…$†ºo´Äj7I¢`EAp|ùÿ¹úc(Ù$æá€ÀUµ$)Å AÄšüZ^K‘µ«sh¼4‹µ‰ÖÖîÕEe2câ†/‰R"”¨E-s?z,Ȧ\ñg}Q“èùØVR—pãÄ„9Œ‚Â1Jj_¶'ìÒ!è6µí'ܤÿ·Xé15”sUH S®+Qm†rsäR—µfÌ ÅUci±ä: ¢'÷Þ©+ùá¼Ä•&0Ò (œAÔN²OÜrЗkÉL½Xõµ¬GäÚ–‚-Z˵Βîõ=®–U (Œˆ*½Pî¦VâX¢¬RÈli+Úi﬉„ôuŒ½í`NZüzOë%m®b£3žÔ!;•¤ú\¤ÌÓ!ˆaÈéR”’˜PÉ–AÕ÷ö­ÝÔÖl(«¶¤³m¥JøMè³i¨b¬Î Tè!ÐÇaI8}Ns²Sohm˜P~JX&}5 v\eÑ L2¢¢²rå)bÓæŒK‹\_Ì£&2^ÝÍÅCî×RâÀ@ "!áB¸Q bÖDé1°¡z{á—6_-'-“Ü©–2Q˜“¢ “›ÙÊhÊé[’‹ñ”¯ÿü«DRY5ìJäi—.åfä¬0ÕY°èEcI“X~½Š~6æÝÆ8¦*:!V‰øˆïôÌÂ"¼ÌS·Uá„r(l¾’­Ûß%)NáJ!…=& ÉЇQvJ‰^³+•Ã0B:Ù¸RS°/ð_W`¸¡Ëa8O´™ÖHÊ¹ŠÆË CXyY3sUëÉsÑ©"Œë;îDžêQ÷û…¾·qº¬MˆÉל:0(€Ä‚BF M†ƒK¹yºõ[P…ñº×ýL¼ýÈLV†O-Wý%L±e.ˆ±†I\ñ ¢–Gg–kðWßR7âŸìW´«eÝ;qBªu"”Š´î“¥é´”¢éº·iO¤o`¼…”´Úi+Gp¦`:ab(C,Äæ£ZG’0ÉYp= R«UÙ sF‰)Z˜JMjwãLç"„å6'Pª”­¤·KˆYUÔ7Srj™ÊU "CW)hÃ3§áx&«³gZ&½êR•£†6¢i·ý¶½í^&¤áY#a…‰`â²Z… L=ä‰ýjÊéCQ–za4L×ê ’Ôô—kæ ‡]³Ž…r†8ÌQt¢pd]k .ŸlÜCñímÜ3lk¸Î[F åIúöE ‚ŸúZšÌÆQ,U寴Òö[ºFÐô²PB\DRA‡®µ WÔSî–GóîLý»YŒ97{3Ðôû%"I”¼Ö$%j!”W©Û{þ¥$Â0V“û‹õÖ>!O`€¤Qkç(Êe*çP߉(¼¸Åë1Í!òHJ–¨ÖRîÕXÙ§Ñ:q´¼qd?ƒ˜aÂ9êPpTÂÝÃpºˆyó¯éXŽõÒÿ¾â±Q”¢ëHlNôi¾¶œ†[ÌÄðÈóÊñ$‡ÁFEÕ4WÙ‡•gMªÎÒDúÞ‚\égG …F\Òo˜R"ÖŽ4†•j…tËh½6=/Vµpߺ÷TLéÑHµ`Á•kšdæcrYM߯«”“6cÿ±pZ Á·/¸¶D¹Œƒ˜bA˜nG¦q:“hô%%“5fÈÉΕcuý§Y]®¸©eœˆâ“ÂIÅ0áª}£q¥J/Z„ £îB pSïGe)þôÙ(^ôí&‰…ˆ­Bp’㮕|ŽîÆ}”ÑYÆXÅtägì’»U½?r[˜â0“&²¡ÐÕˈ!„ˆcf•GæMêú·-¯ô—þÇ»IÒÛÛ½7‘_d"³úâ½ÕA”TR¤ŠT0ªªšïVDÕµYÊ”²"ÅÙ¡/Æ^ |Ú¢ ÇJˆ]×Û©ZŸËNÎö+Ä«˜eºå…°™e˜‹EÆ©4Ta¤:ë;ŒaÌNrö.û¶ª6·P{Z¯Ç¿“òL±¬õd Ps¥þÃeA¹‡Ïª®³&§[Yû+J—ök+y–cP®"’TŽAÒU˜‹1\”?ý±«2âKJÈlý:dµCgîÔ>D¢êÒ†3E@ƒ:þ—©é„ÅÚž$×Eú&4ü.¿âÊÈ2á„ :1V#Žg2#3È}”[6%)ø~Öÿ|ÊZAqV§­èü®)ƒ,‚¸QND@¸Mª=iÚ™Q‰nN3¨ì!71BÝ7>‡Ì%ÆZÊ'?Ñåc±›3:n’¯¼l*«aÓÓ3’Fd¥?÷¨j# Pˆ ™êf¢Æ*múÄÄh‹™N¸ôo\¥&ž2®«©»Z´kŒ­ž¢œ³‘e<¢¼RY1©ßÔ„Æ–Ì’.œÙ4åÚa‹G) ×Ï v`¢÷§ ´á E/¼Jlº-h}߯ÕÖD*×2äbŠî.áÆ ‡ "à‚щÙÛ^N+a°×&ÐYî{0}6\ˆEÅ¢Oq·gœK­;2…¥%ÄÖjýú{ý ¢ tY˜ŽÄ„Y,:„/’D„ }O³y†»I©§+!ÙºÎæ§3âkšâ 0ŒqÄ*ΤsûL%ôYì\èÜ÷ÆGò~¿å9®¤t••kûå,Bf¢ÿµH3+¹IYÍEÅDÎs{ÈätŠ\Âí«Äd’¤²!RŒJ£¯þ®²øÜîB§ôÊép”ûDïÌ¿¶bé7ŠaP΃’#X¢ IˆRJ”–ŸbòÖªLoKz†4—›I-qÆA„q‚/žá‘L;‡Éºäö2““K» ¹ý¤¬Þô1DÅÓ—ˆB”áŒ0Z¹Çc;]“v¹âЂ—¸Âaæ³f i;çÎʃ”pàfbV:J²ŒAÁt’WO¢Q-7zñ:’ý$ŠN(Ń”ñ$¨¢U „ÿ˜‘I*Hâñíï50† ¤Ì½1«î²TÿøÉˆÃ¬vLùªùÎùÿú8úsú±úü´# 6­oþgQ ü0gï™sŠ+¯ '–ÁGSKŽ$“á–ÖÁËN3½ôb¶ä*’…%ÈÂpüMn‚Œu5çœæªº%¸Ò7ê#”™K](ûMêÖzI¦'?^ÈåcVt÷å"ð†,ÂBc …:×+ð–b­iû͵!Æ¥ÿµM!0Z¡ˆôaÊÖÔÓT‘s+ØA öëa«þªéK-ÎáTg ä©xÅŠŽ´n•?W·:èTÞ%x•¤•ëÕ–üĶë„2©E ek9 Jªé­_ê»Úª›ØTìO9|¤N­=†f÷° Ñ$” ÖÛòå§mUy ×´Õ¦VÕãw2D-Fä(£1’ªZ¼`ä"·&gnwì2»oòõ‰ã4Ëœùˆ&o±µ# ¡Ý‹œB?£8íðm—_ª¾Ru¬Vv ¨æÎK¦yKÛùG}W•©¥§%Z·?ˆB;pŠC•èe»Všâ),‰Z}¥‹=G üË+T$ô‘ÈòIGg¥C!Tt{¡Ÿj¹dÂG–Ý™e¸—FêÎáŖÌž]Oj3*×ó=zdt¶öÅL&—jáF®˜¡ÞÄÔY)ZL„vÄ%6ºÿzÓ¶¹Ýʵã=ئxâ¨çÄ3ÈëœÅgî_^Â&¥¦ßzÁ;DÊ^›ÿ„K-…pÉ`ÊM$B¬ÊÕúÛ©VMU‚\Ž¿¯+ò],†:Õª˜@¤!iÉÆoS‘ôJ²HJ¾9ò½–¦I«aB"WJù&ׯUKyœcœQ O’! jÑ+Z)˜Ç‰‰(ÇJ·óg°‹T§’^­ã-[v«Zr ÷w³Ò“›#¶ã€a¶}¨ç#‰UF¼# ޽bÑÙðC`˜ Gà™‘Dƒƒ¹×r-o ˜Æ!BZg‹¨Žá@m€Z@Â"à‘3¡Îp˜Øß¡Ês€êPGŒ„r  L¼ˆ`E…Œ´â’ªåb¿˼eœ¢F ÃK ùd“A±,aÌ>(u'{D¢©ËÅù„á¢Fb0À0HJp¬2aÓ±xÊLÎ[z÷¡AN +âN¢² ŠŽnEB45K2 ‘¹D0"Ì"©1Üã"¸U#ºô ”‚ÕÃH0@~¨ ÎBc:?§zÓßhu º畲¶¦$Q%_ªcB »¬«¨U¡¹ÌBÅ‚2Ç)½"!“‘ƒHÎWF>O‘Ý uÀn…ÌŠÎfZúˆ:NÝSŠ„âCWëE*÷ð†BB LÁ怟þ0E=,¹vÂv2j^-k[îV=íŒdK‰{B„LJvwªEJñÍâh”d†)&áƒQ PÅBs1öi¦<Êç9ÌF)C›ñ$4: dã1‡ÉDvÝ‚¡m…ÏzZ*ˆTEG³B„vÄf䦼Å>ý)òø8«:ñ~¢(¬Ün@`BB ”ªÃA·¸X¦ZS_ ꫆æp³ÓC Ì‚ŒÁŽc¶¨ÅìêAQ>ÐŽÏ`r†™ ƒP‘!DPE3•Ž3ibž”¤:”IðGr„°H1Ĺˆ`BqŽÈ­ ÆG¨w¥4@+Ðä8\ œØD.Œé_EɆnC‰[yU3aÚÔ ‡r÷@â+8AFC1&LƤFx)†qêŒÂJ¶?ÄVÉ”¢”²íèb¤˜ RT3¯Ì8ZZJ: 5#@¤é•‘"3óˆ&!L«¸H·pŽÄùÚn¼»Q‘*[؎—D»rj„ld;P¼Qè*\ªÕØœ`ʃ`‚DÄÛ™¼ê`¦˜Ac½Q“A  ÄØÔ‚÷†|ƃš2/ðÅMÖ‘ÕB ™Cd™“y D Ï"u!üXÈ+RÅ•.E"š–dA­)Íá« Æ´Šü¢ 9eáJD>°Ì3 ûqŒœ•L‚£“ =@Å"ΓŠb%…!–4Ÿ‰pÒ\f`ËHD&UåeU“Ïý€‡ÝE"å0ØÓ¤=OÙŠÈŽÃ)–¥„VrBÌ<È"*D)†aj˜˜Ñ’ %cïð¡%Pn™ˆ`ļÑXhÐ’ˆe;0A)Ї:<8J!™ptpÖ teîsvIH\$D"Eä7¥n0®XzÔØfhð›@†2L8R#ðµJ‰Ä0¸¨1¥&Nvˆ×kPØøR|!QÄ!¡B~Gž»?´ªG‘×E‡!"Œa‘æ.ˆ‚E$òÊze ­‚ˆa÷ l!þˆîWϳ •‚3„˜$d„»‹ÇEIUaÎi©8Dƒ>XÂ)¾­ˆ„*Ðvð¢'VÎM˜‚Á}¢áHAX)˜D"àÙàJ£H€D¥RŒæ[9ÓÊÈvâ(*px ˆ€³@l€A '5 ÿhХǛ…}ÌJ>„2Ã% I†!˜˜Cb%P£áº„‚¡7L¢˜´~ab¢pKÑÅ!¸'IHQR!SãþDõ¢A«A1)ŒÎbŠ©Ò<û(á R âC”»Üup€d¢97 ä `A˜l6½ËNÌ"œð‚½AgvãÔ8E%z”•¼æëÁ )Ç”ÏJ\kj½w®3`5{P36†Ë5sº$s0`mÊ]ègà²ÆVõFùkéGuQ„d™b™° ¯È`‚ å–µ-Æ&º†+ºš¬îa)€ÊÜÄZ1Ñl ˜Œ TSBwˆcàör»½Ì$Ó0 ÙNÀ›îâ,áŒØÑØã•Nx}=xœ¶ãVȬ«B«º÷UK•SHƒ Q†M8¶KsÖγ§3¯º·­¨%«‘4Câ"{Ý]*WþD×Ë{Ù2«ÜVFÒÙCÿî\¦-³VëC˜S#- 9¶Ë0®AÛGH¹,‹Œ>íMæÿü_; †’ùMïü­v—R-…ê:Høß‘QF3ˆŸ\1ª58媖¬èŸç2•ÝÐoÊD9™'Zj¦ßÜåÑT¤”EÇUæ—^©Rt‹s Ù+´ˆ'_µ×(ÑÓËD7›e¶™–§}—b¨‚&‰ÌNÉq… sŠò¹iôI™;‚´Øì"Séb6Z5½õoGÒ˜…̇~¥ý½uƒ tò»žä¾ãU‹Ì…'¦v-; ¸­Ì¯F-LQœPCaFȆºÒŤ.ƒDbd*¸Q\êï7”Ã#,”ÜŽ”ÌgA Â@+ó.9ëÐUŠ\8/@d…0ç|"#Á±qÂg¯™°Y°Qûˆ3ƈ‡ çiT˜2l¡†ÄP©pl&„'èvçür Â3ŠtGåøÃSgjt8¿Æ@a#@•‚5#!‹„LÈB©†)9g9± ’Mb¨¬9»dŒ·‹_«±XF€EÐ⨋Xû„7"¨E#…!0Cs@À—#°!Æk D´úT)Y_ÁAõGô§S„v±†@SIœA¼óh‰HÌH9_*—¯ 28þØå!( GPa²aclf/fe@BáMáVr RÕ.ÝDöL5Ìte%ùžg9@ŽTÌÔU`}ïpê!R4j Ä4Ep#†hD&€ˆ#™'HC‚ëy3=  ÔŸp¡6 Å,jŽB Ä iz_iepÂ6G/LJR”bö|zA„!.Ÿ¿jf{¶0€Ø'ŽdXŠO CUµŽ4*îXvQjvº—‡%(Øc8ɸA0ÉmÛú‚nŽ€’1]—¨| ºŠV‚¦Tf4œ€¬L"þ—eçÕ(‹N…ñíRd#A‚#pÒ„0”hb‚6#(ÒäqÄCâ¯Aè5.R8ã)ÕÉÕ¢È1°Ì£BKÝ`GXÄ ©OÝ1€Ç¾¡ù°À#¢:¦æQÛД2ZÍã‡Füpä.øC6ÝápÇðvb‚rJ>$ bÁì¨éÜd  ÊœKF`C(qYQÉzÒH–ŠÍŒRJáIÄ¡0ƒLì &˜ßuC§yN3´êŽFŒÁœ'çPíÿÒñ %Äå„åaTœ*!B¡Ü•†B©f CH„0Dè0#K,PˆDÈÀ“•iE9E§R+/BÐÂHÓèôë:39˜IW”¤"$y}‘è#c’p¦B&3Ô|†dè¢)9PQnUc´R0`ž2 D 0™šÛä0J3NhŽ Â .n0ÆC–Žœž„­tW±ø°N!Ib¡¤5C`f@„1£Dœ©S˜ú™kµ Ç8QhÒÄ|©ÏC(Cƈâ,=m,¤C teñÇC1 Üa€Ñk`˜|" 7õQéøQ‹ÜpV1¼s¯ø¨¸0™† L°Ê5åF(?7ÄÀ¢Šü†RQ« PÀBbóÄ!~Gc¡ Ž8«c¿ãRÄoÔÕŠnÂcUñAªô¡-8áiʬûçR“U¹äc°b956AfDUåÊ'mÈ0D6´»Žx@‚‚3B»&sØ ´~# -*cˆ‹ŒêH¥ªø(’ „vŠñI;°N@Ì ™‹ÌÐßT BfÔ!žþåe=Ú´ÑT;À;¨Z6¬­ð£ L5 ßuoÐâ¢(!†@N9‚ øt)™˜Á Þ­vrã6er HÕVÇ¢<)ÐJ!9 äÍ)ñLÚŒ„`D B³ 1Ñ¿ 9ÔUÌKxîÇAGê©I{70A9Ó8e¡ „!Lþ í¢¾Ú ¦M($|+yÅ’l)ô)ŒíXE_Ï×à§‘ÜB»29˜7QŠ¥QC†0†Ñ›qpÎ$ÆÚ_çä;c‚É{­äB¹kùE¦A›Lq¢!†¤œdµx>´„‡@ ™ÂŽžuä1†+È"ÿÛ5¨£Bð0™Üc‘À¨B%¤¸b•Ÿ°¨FÊ&¹€ŠÆ©—ÒN³ƒEVŒªqg-ÛЗ  GQ61°QDc õ”DC(*Š5GsÓb×Å,É„øˆÄ)=Fl÷ÌcQa½P¾—*8êNùbÚîG@œ¢Æ†ÌjbQ†Œ1Ä Ö8÷¼Ü\=ÁEA騥=½çWØRQº‘ œA„2HcC¢+Qó™p€¡æ˜:)ÐGE£½¸7ç ‡h@Œj0â# ˆðÞ•›) E„o…@ÅG„¶h ¤x6Π东ƒQüWLvn…ñ…üÇJ eHÄ¨Í „5 »š¿F%ªãÀT ‚¬!¼«¾y(FA‚°ˆ`!bD AIb¬óÄn½^”d¬nŽÄû¾RŠgäöŒÄ¶…þ")/ø£–`¢×5Wˆ„wœ 1¡ V7 (ψ¬7¬°a!HŠUÇd$¦IÎçJ§V0Ô…c”P¦ŠMLdÔ>1>çLê¬jgÌ>:ºa”L¢ÄQ  a›RM£&Щ^ÃÇÃf z°´sƒ·š„øÂ@nÞ€ÂÁ €gÝÐB¨a¶©AiޤzçéÈQŽtÏ„4”!›œMa© ¬ê‘Ì íná Ì™]Éœƒ(Èq£qŽ¡ד¦a(墅8SJ«(áTå,PÃlæ €5Žå@MÄñJxåVƒ2°P©ç˜03wŒ# Ô@a¢*œm’ æ TN"qBá>q‚l¡‚ãÐ^M0££t,væn…2¼C¥";±Ø²˜FmOtåi˜åâ­]ªbñ˜¬1>Ô¨ŽT¥ˆ‡§µ-‹Á*!Jßd3Ì•*<¥î˜dÖª¯`…|MVÄ“úÑ G>ÍAªôɪ+YðäEˆ ¼Õ_)âyȯõÁŸq–›G¬¿ô,š«Keˆ~6fW˜ã³$7±j¶¬¨ ¬Jû &Ê…k"~ÑO“ßÝqLç¥R«Åá‚#Q„ªÊ™ÿù¬%0ŒI4dµ(ÿaSW¸B·')| ÌU¹¢¢ È*ç4†}“²Òvåj‚(]½Ë…É ý­T¨„Ä9ª]òVòy[˜8§¾#Ë´OGô#ë”öÿm7‚Sµ]3$R ¾S•eåP–'¿ C5¦[ê1ÌÔÇíB'P¦JX)O¶}ãÙ+FZ-ÕE“)ȪoWÃÚ´~ ŸkŸ]„¹Ba%0ûsN…¥¡5~ÔQèåªÑÍ„¦æ¾°¥6î&}¨ƒL:+ ˆßþ#â9姉¾d¡f±çVá;žBñ¨†fŒýô¥9DBºá}"•z¦¶{çû’•Ú5•ò*ùzVÔ7­Dq»Ö&o­Œ^^1¹KåŒBr§©ð‘8ˆÅÌ×°Æo1ܤó«gKþê¤~Ö*³ï²–³§Y´œfÎ8««vÝ!…i5 ºæJû=¬ú˜¸¹Ò3Ý×¶»U…ß‘Nm]9ܪ_)>‰¿cØÅPR•½æ¢à‹¤Ø‚¯/lɽjÝèEBbó[uÒ­Tý—=ÊI8”f§VGguê¸åü'®ˆn ,8¸Y”44\^"¸C!`T\QuEqb¶B…¢Öˆs™j¸Ã ÿÊ1pÌ4de0`ÔT`È%®43Ǩ(…;ue7C¹p·ŠaCXLtSŒ$ZðH5Í+‚q#xÌ.\È€E§£ Åe3-EBdc Ó·SÌ*UW#`¡òˆ ¼V¤r‰Ä1xJ2ÒaYT‚s4Àö¡ŒÌ?(‚TCA+¸¬Þ Z0ÊÅ „ ~ø&…tðƒ XvÐÆák#Ëø2)üb8N(¦²9 ŒaÍsTÁ"â0atÆVl@×àªÃSÁ‘$CQ 6~¼Ñ¹$ÃB›3XÎAaféLC¸õÑ1\B9WÆ1n/¨“P…&L0Ž…Æ•ÑÆSc9؇1M—3>RJü’F{®4Ç£X~´ŽòúâX–ÑY…2°°l Á@2Ëú0BlœH Ó˜T¯†`ûTÊ «ŽG8õÙ–)»˜ZÊæ!1¢ÙÄ'(jÄS©¶h‰˜Ï ü˜Ñ†â,îc3ªÅåó0B&⋉é-»æ‘Ç8¶QŠˆ3ˆµ'ja‚ƒ6 %L¬§k‘É91 ýHïŽTæQ…,=ØL%3,±@eÔðþ“3TäSh§=ìfC6(½)b+.Ä!„DNÎÙš¤\¥&æ‰Øéæ˜Ùä‡ ‹DMëÄ¡)]ìA«+ NaL“_GR¦PÄe#ÁF8b&”vÔ ˜Ê¸}ì*ak iªZWëÞbq2˜Û&6Q4¨•l‰w7¹¯É¾"0å§r˜á¸…"Ff°!`Æ ÷!"´~ÉŽG‡Rµ@âs«óã“&¹b¹LÆã@‘„;®c¨žFG1â*øÉÁ+‘½""›MÍF¡†U¢¨C”!KªCvã½YùLH‹s*¶‚3 C Œs;:g=E97ùœ¡Uãç!Ȉzi 5H1M‚YL*B¢+0ˆÄ^}¦ïÆÙD*z&#Œ¸"ôURf¤! =è£"K¾ªî½ÐÞŸÓ ݹ²â„c)#BàmIúB(¶ò=P¯Ø¤-u;EäÕÊÉÌ ¸f2 j¨¦$›Wu´ŒÈ/vˆœ¶1¹GéBED¾ŒÂÄW‡2 J¨®¼L ˆÀ®g sÃ¥&¢t#`Ȉì4ƒ gÀŽŒæI{˜ÁG‹CÏÂÚB‘ €V*’Ÿf‹•£© `€ÄX€£"ß¶¨©D2‚³fXW2 8…2`ÐÒ;‰Ä •1Á»÷­+Ë QJï›ÂúV/jÌ'^"IŒ0ÀÁ‘ˆ@Â1,‚ˆ “ÀŽkYÒS¸?JCRîÈRÙÈDŽƒ×ašS»åd"03yzrÀêse;%q“aEC Ì&+ ò†0@‰Q‰Q_ˆäµUøÕ†íJJœÈÔŽ?ÿ5þµþÙÿ•g%kzDÞ´é!ÊòÀ' ù¤BÈj9;³Þ§³=)dD2ÙügNͽԠ» IB5¢^dRo !!ƒ!åfª5“0³ØÛšÎ¸·j—ET²[[(òÊ\¡êšrJøì¸ç£— µj⊵AÉý(¼Ë $’ÊW$¥ášŽ).¦2í ƒEÜ;[GÃ}#Öh¼ Œ‡ÙJ™gEÍRÙ›S=NH¢° „²Œ çi\Ü'dI"üK"HA¼$,i¼F¾U—«aQ˜TæâXºv<¥©SfUß5ÖÏeÊ<†Bq’¹•:èD -‹|s‰Ü,Ñæñ ñ|×ý…å8 p¢G’ †wZ=úJP[#ã>M´5õnFÁ #O¢L&0¾=ÜJ«ÎGŽ!‚‘ItNlìúÏ– ÿÅÔÒ‚*9.¸¤9ÆA Pu(YÈ£àjW›U¸ýéÂYh>yxþä¤d"4áWÏ‚¯%*uMO>7TwšYY[e()AÁXãWJ(0„ Ñ~ŸŠIQ$×O®!'RàL´H’LØXØ|Ï WÔa Œ8F!Â;0ƒ”ű‘´»¢ìû|-“¥ ”Z+T@Šç(ÊkzzNq.uÝÉ|l5‹œĹ¢j­›_Þ%¢ê´löBrE8¡Jâée<Ï*I=sˆ{ãâkKÂ:{Tß¡„3ˆXV$…ÿ“ m–ÂbÒÑôk9IüTwÎÂz B¬RÄ3…=/'K•ªt·Ä—mæL{~éä"øC9Þ ú/i{ÍBqY»è.ý‰A®$ö®œé#áE™²å(¯§-õÊB}õ±ÌU>³–{ÉVÔKv Ììrž–s= gÄœpІ²FjªÀóCÏ‘AE›?¯&ð¢©É%›Šâ•l¸*3мhÔ#Ør¤#rM”Úáê×ïïç_TÊ®Ìc,fçÄ !“”½²sÈ´= ô‰²[BkI˜–³ –}λwö=š‚5“/妉öa‡’¦öêœÎˆ”LçR¨Web+ A*A¬ ²m)nQÒ¸ëqi²ðLžÛKf †lˆâ(£¤R#fâ6;s=¤%ç_u•9–2ÔÈgTvˆÊ8–$îÊ&žcq‹s •‰¶ž†ÇŸ å\ÀQÆ…à D›8пÃ)ù…xOPÍ5á!.%(ã$©G(æ" í¢F-X§»*Hªâøü’¸J‰$ŸIgA bS©ÉŒ#^d1C‡"°+Œ¥a…¬²ÉnZ~ë4íq w-š«3n¥cêÓ#nT¨…@‰B-IR£=¹7ô5öµÚ q¨‰*ˆãã¸ï7ØÇu0ÃÖ˜v±goˆX”4<µ —iÍuŒJ°îbI\@âÔþ1Åz#±·««¿åÒöÙ¯çö.þàü2²ú¥Ð®ÎÀ®¶ìIFë^–Ýû(” „Ü) žé l«æèæä”§hFna•_á #—ô&izJ`•„ºg“ÌŠ15¦öÑÅê‰*qûá<¦ôiêBc{Öì¦,ƒ(c·A‘n¹ÇüšŠj&J5*µ¢È3!¹²“xÔ^Q°¸["Š©x£Š9a”7ò[r½†¢VªDº²ŠD |~++/©P; ‡˜¥a‡Ï¦Í™LúH?õ¾LaO·’…·ë©eU UoXŠ‚ FAPcPG(}ËZ èg ‰È´*YAH:0ÅrÐG1îºÃýÄ‘5[IDºŠN.ŒÑwꈴÛ,º%ÊWª.ÀÉ@PR\’@ꛄå>r“ò}Ñ&Z7µpi.éeÏ>®Î…;kØr¢V‰Róï¬B)ŒÁÖïÂdLyvÝi±*¼2̧A‘8"HÍÍ_ ÓE“%RBKé# ºŠg…IIu.Ræ#l¢]髵I ÛÏUâÑÂ_âcŸÊÄ1r†:æ§½Ÿ›k*÷’¤^o_ªó-nEô$BJÏBz‡QT„D1$ÁpßSû¼£Æ¿Ømó* Rqm¨î&»p>ëò†?ÄŒ(ÇiÜl’Ÿ Ñò<–I_ΣÅŽ‚¦„Q\ ÿ=æ)H,ÊG%q6È”5 Ü’ï‘ÉÓS©ŽŠÔ;ó ¬)ÑÝÝ,á9âœ_òôðôt–,O2Y«WD*8Ìä;qzd[“nÞL"˜Ü3Q¨Ö {Ó‹É܃ëÛE dôAÆ c…8’Š1 ŸSM$õmMv¡Ydi™åÎsËšÕ²ÄSUeb98¿ýŒlÅ:Óÿ™k¼1l&÷EJ[uh"È9 2W«Â©œAùñmJ¡BR½^êpR‡9‰2N¸ÚAò&I¦ä}¥Ðd&ΈTºïDR›ŽìµÚ#µ;¾¨ÆNZ’„z$σÐhx“àŸ«)»Â™üJµ15Hu ` 4¸aÁ™U'^L—ž–įO‚ŠGëÙšbCÈLrðB\¶0ˆeJµ9²¨µ·ÔBt»]'Ìi +ÐEŒE…Y,æ&íLœðŒÅ²º-Åb|— Ñ%¸û¼‚ì´6!Ô‹z­¿rU:Ü9&xå@­b×ðjöí^"É¢°Gñ„5Ë‚5¸3  AÈãÈgÐûId·HÊÌè¬ìý)è,·›ç¨-ûÜ×ܰΡ ad3 äK°Â8ݧ»ul”kÑçnT¢1šå!´í,K#úÙš©k§ˆ}_ÖïÚ‚ò!( £Mb„mš—¶*.÷„Åš2!æœF¤Y½«õB’Vuìôq1hSÔ0€È¥¹Mê)ÖÔo‰58ôPD TÊ&ˆv¡Uý6Ÿ4†PÁµ¬ Ã*ˆô­ðjŸø‰ÃÅݺÔI…’¯rôŠ:d©å_)Úe…!–ËeVz‡òpŠûié¶qË¿W®ƒTÒ=è2÷êñ>¾YDa †{5ÛäXi72ÝTÄ)R/+ ˜‡­oë1S„Pì(ãts0„.Ò„§q[6¿Š²øž¯Ÿ„7Púm:¤ …[Ž(#Ü„Â,Æk®Ús„¯½ÉV骟jËøyP‰A@@è[N®x²ÉaþKø\¼µ›¬+üœUu0Qu±~tNr¹wV`⎦-Ü­]™Ûibпa®œøÖºñäAUõÅPRƒ¯d|™Gµm›„ÑrmjR|IÝ,Œ¸¢)Å8¹uÁ©AÌG>Ló%†2–¤ãýD#Úß’S$H­#/šVc1#)b?Y#]X)Ó™Ú·üµé¯Ý$Ö¿ ØÓ¨¨gU:L‰RÿadšiX›]çI`¨"³>-¡Ã¦D!ÌËOÚWéEF-8²^mv <˜íÍc‰ÂKl©/öÇ.û!SEYHÖ¥b½Õ(ßõôÙ1܆è‡S‡Q‚»J¤¹ÿº‹ø~P¹~’ëo”a$n+c˜‰8ààEiw“Sÿ-ÍP•‰¤9/Z}ÂÊ{ÿQ»œÂ ÛD1ÊF9EöÕÿ åkž£D¼K» ,N‹“íH:JÕÂë2ˆ§yÁÈÒr ƒ°Ao)y4‹”ÿÂcÑܶ†Ù;¸¯še‘D çÇ0Æ_9—´®*zØf¯-xÏ¡míÿÌc·ZÈé×´šh´å!#¡VLyv-'—0ÍÄ1Š„`¦IR®†Õ$çÅÁU}H‰ôMiÏUË×>öIT™öÝ=•Ä^5²ÜDöC‰’…ô%ÊG(8QB;?Šfân÷kyRV²ÙWˆ1}>„kRߟ^­ó©*k’ÇÜÄ$Œâ–éð‚u*;Ò×H³p¥–i¦K¡Ð*|ÅCÜA¹D¸¿ZŠ„†’~ÑèF”ÚK|YçâБ¤›~ùT¡×œÜdƒ±Ó48ç ¶‰ƒLci d,½$…µmÖô4‰RY]t|SŠB `ÃŽPç>¸ú?ì¼}ê—iooIimñ«”sLFÌq7Ž9ûÉrWNEîlüÇ!«öú2 þÿa{L(E¨Wnï©a…gàŒ( ”¿ÓíkÍ‚Wú¸Zvf1b¨Å˜ì1(Lô㾫Q©Ù¹äcH-N§1R•Äáu©*’Ãzï–åbS ­jÞÂçÐgó†gÈSSdég‰]Zw7b é~æÐY-Šn‰Câ¶7½7„sYîe #˜d”Á E¸ÂÏÇ:²²e”ÅÏÏMórü´§þÿx¾Ä±@E1îb‚:‘¿ò–æÎúòlõ!þ-WαJÔ2LÕG_î9„#ŒbL§#;PË5Ât·Iþ,´lסëõ”’ì²]tU 8 1U„òú“eêô®÷„ª¦:Èä~!£‡"ýª¡îÜü„E!^ˆu1²‰•’Ýkøµi%ãX½V‚1Ã!OQ”#Æf0ÅZ ŽÆÀ×–¶úe…¶çáxˆáðÝDq¥I•t†9>ºk¦HOY)9eWŠ&ZÝZØô_+‘|9ËRp…îku%¬ÒRì|í2™aF9VÊIé2¨2þkŽùD1fêi©Öb!žëÇyšµé.l×ÊŸeb¬¤•É+ì…c˜™{¸¸VÄ¥SÛ²ý¼¼‚ áŒ@D+©‘lmU­r†àšC^òú LB.’¸JÅñûk3ŽeäûJ’‰%êlQ:m»Ô,_'¯¦•¾êbe8‰ìQñ‚‚4BQö]6Eó'»‚Gš˜^jÙ{ÊÝa "^„(ÃÊí—µ”Ê)A2|>ŠÜ·¢sr]J¦œ©Å»¥‹!QhŒtìr…vK¾ý´–þµ+,Jü{Þ‹¢¤èQ]΂‘ÖUω\!ª¤%HÚ–º„0ÕÒ·Œdœ²:5(%µ²zÛâq¦ñê[‘Ò¬saÙôÓ»×v[Zî[#­\•Ueb#§i´ÔŒ;6ì”­ªÖ\DL±ˆ1Èfs°«"%LºRÖIõ´>ѬIÒ‚§“1õ~`@x¢"âõæ®7в6Ë_[Éi:VÂÖ”56Š„ÏëC P`‡icŠ*-ÐÞÝ…Â"¹·èº¬]nþç?S?¥ìÛqìb pQJSƒAŒg>Wl–ÍߦÚý×ÓWQ}»‘SŒ¨WÉS"8Dò;JD#‹Íœr67Ý+„J~ü_¦Ê.•Ìwœ‹ÚNaòbÝžéâ±Ä1Îd¨•Ñ>i;/Ï!wÑŽå*x¥žQXäDÁ/•ÇI”ŽÄ¨˜‹bý¬JÒ_-;µ7 LtÊçRœ…aŸujB)-ÚåC `R™È2™Éçê5kÍõ>Š5[h[2”!zÒÛoKuÕMFLÞé¿&žè)Š1ƒ!TÍ"`ûñÅO¦Ø¼¨:}%©e>±¨5±jc¸£Pr7x@B=t§ß¬†©pCâÏ…Å2Äšùîn1ª7¤-˜á r£”ƒŽª¨õ,®C®ÛϹ7ìžÕÝ›ZœÔÞ\*B¥Ê 24aÇ:} _š‡ÅZ‘°µ?ÉZ+ÉÖ¦šär­RïqB¯—Sþ¹28â¶>pN7ÑíõÛÉd)…•cìÌw,Ì¡ )ØgWb…3…oï/ÒÓ‚hÙk}¤ 'ËêÕJÑ%••ÐB–3ßÊY‰vÜé3 :Þ‡â-Hþg"ºžRPVŽaÝ?M;=‰£Q Wñ•ÃáÕjÒ=½¢a3zðí¥7<¾ÛÆÓÙõ7‰V±{ÏC¼T*s÷-„*È@ËeŽ!ܘäN.“¨_g;ÓK²å+’òÉÒ{ì×Ôê § A+ÿÇ¢Èɧ~N) ÂQ«JÓ—iÕL׳–!(žqÖ¨I\ä˜G!V¨b¶³>ž%æ%w{л~«l¶“™§Pæ ¬YÝhl ÿ~”%°”UëI›êâq­¢P¾´ åHˆ§`Ž‹Ïfs1ÜÈŠ].—¶-$½0å™Ìu³ÑÇô×U¤S†(É!»cèý}'\ý´fâ› â¤Eˆêå¹{) â §g'fêùÿÙïn¡ýó[Iv8Döü"ýz„ûÛ¤5IYtëÔ]"l˜B”¦! –Z‘eFLE£ÕMeó—›¹ôgZPÕ‰Øl9×PGN2fÝÁ.z¢JµBÌÉüÆVín.™ìfªe™‚(ÏC•MV \é¥30’€w`KP*8œ B‰i-éFeÌ,üOüÁ÷Á“ ˜1™!‰–_DbR¢­”„Xt[-.Ðçnä‘{u2”«Ûg `Ä ] „(HuÍv!•XÅCQPQé Ó9 ›¥°¥=È¢$j#á‰Ê,~*•2‘vB!ÍYc_2' Æ0ƒä†BP[T3¡aé„Ox”<†ˆ4jÝÖ5bÌpŒÉ„p… LELV¶Ã9…e ±pó0¬T¢%nqQÄ$9£ºQ*Á;·ãV¥ QJÎ0Øbîd&i£ˆÄÈ× pІ2ŒrÖ”-‚ïÁ0¼ý ‡=,$hhA£ˆÜ&5]ÁXqÑCd! ˆèHËB0B 6¬Lɸ¹ÝH×wUtéy (èu¿põ©DéÔTQ: ¥@5&q†0Ã8ƨF,}“7!"PðE@¥ØÆjhŒd*Þ˜ìe5\¸l »å1•<™¡_åGn¤¥Nš–×®ÐDa¡„Äu1ÈB(‚¼j$xÍÙ+SŒÂ"†D ¾|ÈÇA0€ÃÄ2ŒwzªHHÄ]GΜ©Ð*ã/ z´ËQ Fqæ1h twˆcJÂ2SE`áø»Â2Á†»¯2rêÄ^ÇåÇìÚ†EE Uª°¥NDˆ‚4ÖåŒ`‚CA!°Û“~Ý«f?S4Ï\Â)Ô¢“ @èøÄ:tq2ñDp`‘9d‚óŽÉ¡i\#fT¦B–`#‘ɘ4/Š!†23ÆD§¸êÎŒ¡9JaL ³Ü¿ŒG2 nêRS›  13 Aÿr ȰA ®ïÒü dÚ8,b)à<Œnua @€¿˜C)3°Pœr ˆƒPJ‡/¸‹‘!-0êÔÛ€†„*u~9 ¬ÂÒ4z¡NbK JS e1ñi‘ˆq¾€„X7A6AˆbÁnõÊZ:R‚Èpˆ@V0ì­ìRŒ6&SL?ÄÀŒ@j8l !õ1#!B'pE(±Ã1ŠCà£\½»v›ÒLòçãÌ0„hD!q˜A¡Ró.T8f˯¨R}™…”¢›Ùâ.àáØì#0VèÔLq0ÂߎŽÂĹFI)'eUhÓÕZ…ü±~¯UeºñS3Kºb¨Éjßÿø¶"H›º—µŸ~Ôú…­JÉr.ùDa)K1Pw*Ôc²ã(i(ÿJœ”­ÇJ#{%,BÉsEB¶ÊÅ­ˆU®EõâØô[ÿjÚ“™rTÙ”íÉ(R3gwg±D¯)J„%Ù…cò3Z¹{_I¨%ÔDÅeê©)ˤ8GW+º­ è¦v°BL!s«ïÞ]1›>çÍÅóçy3tŽV«—Ì«Šñ m'ŸW'†}Ê6’ö_ªÜ륬ÄF\) `ˆÇÇE›Õ ´)ž)V›‹$•æóhÎë÷”õÂIÞÆÙÈ!T+™H¤ëˆÜZ ÅñLê‚ ÍŽEy© 'cK†a–Ø#8Wü ”hV6K‰ŠìÜH!$`H ±ÉQ†CŒ3¶Â—ŽŒX ˜ PÒ¬,e„E”fA”LLV] Ê£E#º|†©|õN¡°ŽdaHÁ˜° C„C0´œXTβø<ò”wuå$já ¢!èÈe`€5R3w/û q c\,$\Jó1Û ah !Ú@šðf1dO×à‡Æ‚¿4ʤϫчf„˜©¯Î‡¢oÄ Œq)ƒâ*ŠÔyÀDhkÏ¥ÞŒƒÀÅüHoМÕ@Њ3”îènA,/;Ô j̤11 >ã¤p¨Äá)‰blÙ_l£|i‰ Å âvg ùjoÑ‘Q ÞAº´A  ƒA˜`šÎbc˜„„ãÙQŠvާa`³ fÀA×BÜÁ‚DLö‚“»„"â½d!Vˆ†LvM»©Ó„tNy C¬D:%–©øt;‹?+eèl_O–¸#éw—ê²èõ8bŒb‘눞Û#±¨V&‹º˜Ûn¥ l[ gÞ‘ÑýFG"QKA“Š¢¢êôûŠçÊÒ_Ï[54‰’§£kuPÏÍâ±ÄD¡IyVTAœê^ Bd ݈ÿžˆ™RñþtJ®C¾ð‹@KRÊ Kº•Ó;S"×4”ts…VµhWˆ»½Qž@ö–‚œ¥Zpþu÷>ùh̪ÎK‡ŠW^Ÿù§FÚÕf"¾J«ÛaL5)g×8âŽ)üúF)V±$âSå V­ ø„è”õä6WóŽÖ˜YŠì}0¨##š£»Õ ޏŦ䓤gÏÞffzÕiû2â¨ìd*˜ÏÞaNT ƒ·5޵D ŽÂaD“xHA æcQñƒñ¶q±À$PqÎçŽr-r5@äe%úß0Â2Ô"0" Ž*Ž«XÂ# “!Î]™àðÁ±Dä•~¦S„ÔLRˆ…«¢œ9%à••ÌIŠ ¢) 0‡_a·Æ •ÌÊ…§(Æ ‡ìð;'#$Yc <ÂD#˜€b ååWwš)ÐN2Ls2ÁFöe40'B䀨 Ø2¯Å˜#Á½>ìª/݈ânŠ&n†F=‚r¢Ž ž uC7@‡b¦Rã¨SS¤`j@Ã`žDøÈD0N#Ò=žX"˜_"j¸r&fŽ@uÿøÉˆÃ¯N¯UËEO0è³’}Ì ÇkõÑz8d‘W2k´N¡dk¥UEAˆ\!f&£œWB­\·Ãið·coó9ª´mç©6Æ £Ž™ÄϨÒQé*µ;2Zíê¨ãa÷‰8IKîI%k‚ÇYJ¬eºg/–ú‹ž˜‚cÒ7N²¡"- œÜ¿­·B©Ž@DdIžF_µ0ºMÖ¿l–>:§;ó)RbÝÌÍíËUõ{Ôjà”¿P’ Lö:uI u&ÜÕm…#Ø•3"Õå/~x:hï!eiæDÀ»j>¹1±eÉÉ2‹Ê'§Üò.Ò´¢]èä¹d#U³(–'¹†9'; ò:cÒZ¶ŒÇuá èóÚKêj™ì•aÙG,†%²U~Cëˆ/;aU¸†‹/"ILʯ]ÝK"ó wxݧz¿ŒMsȬ†ÂÚ$…îä©:†Ý¿‰eçôa C”P„ª#.í½©ÈcÕdóÿ$T¯ ®¹—{ž‰›ºç1˜EFæÆÍ!5*)$,‰š><Õ¦;¶‰tê‡lôïÜYΉ8p†L!ãíbè»äæ&êâ«Ñ•Yh…jª†G%Ä‘)wЭFÎ"Ü}?ª’­•j©x´”¸•§ Ãü´z¥ˆ[“,‚2™ôBÎ{m¤T_]N-F˜B2OGµ/c«¦Nu ˆ_^!êÔ(štUʾÜ×D{¾kBùj˜RU±Y ǵ¦—9¤¤k3°ï"ÊUg!ÄKgŽÈ1{±Ê–²!Å«Sêú–Âáhnò+ŠúéBÕö϶V+pé#–ì§"ø™Oêu6K´ö³MÉ•F‘“ÄBŒâ‰ÚC*JD|/¢.£=<.ú“·òU¨Â³ÞÍvöÌ2H¨‹ö©§ ”B`²i\Í•öy¦5šb2¦Ü‘D;jçˆXèÈ”\í1ytn>¥ù¿X¾ÒhÝúä½ÑÌ•*9UJ™î „âûAh¸T)}wª¡^rs¡¢I|’‰ýˆÂ­V1H"ÑñÚ‰]mÞ%•Ý×v†SÖœ7¾ÊtGß%K…¦%iUª¯•¢ œ“5]ÜfË=Èr'”Ûä²,ëéL¬øËüo™¶å0«ÍV.µ–¾ÕDæ^E™•Û¬«øCm>«´¦§pÆâbb§(d‘â‘fr.¿™]:CL–!ø\Öô1iRrsÑó¼‰g[³]XâY?Û2…5I‚Ìní2†Å*…(toJ”Ö DpÅМ70Ž& ¹`í¢ÎEáŽgV+…OÊ‚nH>`¦¦D3ÐÙ‘†ÇWB˜äaùJaLUÂqABp„aÄ7JR|a8ˆÒ‡Ž@ªƒ‰Éˆ¤ØÇz…~ã$í‚A ˜ì2L/™®XÎCg&![TçÑ0Aú¸ÈÔìâ9Áå12QdÄx„‘‘&" q:q FŽ÷â|U‡e‰Ö¬9/$B%) .ÔLS  Üz&œ®äÁ2ªA($ê’&˜’¶ØÝÒU¤È£·T´ü¨¤‘qçÙÚó[”jRÁÂA†‰/EYi\<ÔaÍÒ!µ^L´°Ù9Þ6ˆ#¨¢‡jJ¤7ÈDDçÂ¥‘g/†h¡0\cß¹0/±è5SZ¥£hê„ðÍe‡xÀ@`焨BŒ5¸$Ôž•µ,1eT+[+)q¢ÎÕIÆd«q_Læ^nm ÂHéN9IDòøHk|qKœ)¸åDc3ґœ "àH’f d ¦!ÚéŽåž'VKr›¿87›Œí¶Ú5]"ÕRW(À… ºôbÕ°l®Žµ_Oß|ÆçT•xÉ0ºü9ŠRÔÝÒšñïç:¤Â ŒYL"^KÚÓÄ¿–tЍz©R¤Åš¸BñŽ¥`çQ$³U>¦Ûïpr®ÜÔ""ˆØoÒ>дBó”Jþä·Ý­Ie·­“ˆ3x¬ ꃮšÕ¥&® ©Z‡òi&¥q¢–Wc«”NR£3™9tS )I’±Ð§É¯æ™|¿L”=ÔÖƒ@Åi2½Ê)¨$[ÇF¬š4<»šÈÈÉÝ€’Oj)RÔV!9Fº/ ¤ERyF2R‹º˜™®M˜Ô迺_ \Öt-ÓÛ’(w9-&1¤«Š ¥JŒˆ‡Ñd¼’Ä‚lÁmÓ¢µJN~yyÇtÇ‘(ĩɨ⿠ž•ªþ$ ×ùüzÕ D#5WiŠÂŠ@ŠZÅåˆ#,QÏ¥`£)Ã|nÁ¡I°ÎËN(¯¿É"Ѫ†V=(“ìÜdÁsÖRl¹"±Šg%mϬ‚”–M‘íôì­ÎR8Q‡#èKmPÞR™#€`b ñE $ùI$ú/HûÊÆÜ.Éirhˆ–µœëAS Æ|Þ™ä*•Šwr§•…¸Lyr·-Ϊ&í©±É0Dó¤Èµx†Á «:+*Øzü%Iˆ‹KF÷àó÷™7.R“.9r¤ç)AÈßUkßBqûœRnÓï,I ¾‡í7ØÂH™Iw3WÚœQè€@N`(ÀP Ì«h@yè51)â¯ç Ÿº Ž3 ˜)ãfJÕ•ÑÈ/ê¼_ÐlÈ"ŒÈ‡Â8Ú 0cæðæfè2Њ¼5¼(´vPj¯‹ÈSÐŽ0cŠFøryA™Lä£dìF~v Œv£ˆÃ@ˆèWN´r„Êb ¸½HÝ© KrÁFA1 ÝØP𛑂,/½Œ&ÞˆrXT”%g’añ:.W0 X @”Ä Cåàâ•h©áTŠ«A4¾29“¹û/*EC((ŠQ°c ˆ²‰" Â}D AÂŒì5¨R‹èê\ ݨ¬ãmJR›3@„A+&%ÞˆhAã!Ö±a:¤ùÄh@õÕŒYçA˜"0$Ê_ÊŽÅ@œ3ê8G¡KªÐ´œ ‚rh3‰Ž u;ˆ.â˜"ÈÆÆs ÔGÒFF!ÆH.õNÔéQ‡X Š*·¡L Ë—dF „(‡±EvÍ„Xè–¸Tã$1Æ ËqÌ% ÙB¤!H3!ƒQ3àµPŠe´j=(vÅÈ,22 +< œPÁÄ PAÂHš*£.(*3!&UÁC:œR™„ R" nBˆ(&4`΄}_0‰ åQ4QOû(?9ƒ±éµ!A’}­ˆk$ÔÈ‹Gä×”Φ(ä2QÇth–4ÂPh†2›“‚#3¬4ÅÍ+å%ðôŒ™Ì$e§‚â¼1‘!*\´µDQ­·Œ¡ÊvA9Œq© ¦`‚R†¨ BnÜc쨈OØb«ŽïØut Ìa]“r 8Œ?¨ @È*Vv¡ mErä]Àê#§#£¨áJè@‰Éz¹¹¸£(‘•2 ¦üԂ⣃•0;0›"­—…!¯0"A;b ˇ:ºó3P]—:(!ÌqQs:Ò¼"`@€vPŠƒV5AŒeü­ gлÙúî‡!» f`¾XËFaê0„TL(ÁB•ÂtáOŽðWV¥09È丣!’Ó#•~ãÌb1‚áWÙ‘aGÔ¢“°Äg„Ñä,¨å¤9ˆÜ2‡Ç;zw3„RÁ°ªiO ס±¹Ã&Â!&ŒU£sƒ)ÉR*¹Päz¢¤7¾l"h¤+)ʘ0Å% F u'2œ,JG°Žs cáNp¤çA`A­r©‚s|¢™†¨0Na¹°iÜb§v ¤"É‚=@ä­Jl80Œ0ßÀ@éÁë “¯ ÄYt?rŠJŒæD16'͘AŒ€lËLÔOØDÐ/aD(üËTê"ÆZšÒâ/#ˆ¨Á€Í‘BÐ忈~DJ^_IhuÆ€cA•D2*ăì`$]`‹•"*Ф¯˜"ˆ€¯$Ù±hÅn¨ Œè.¡Åwë´Fc˜#¨P½œF+;Bò‚ Ý r U¼!ŒªLðåcƒ3WÄŸ hg# B?*Ô2›³³ÒvE"˜´O¶—ž¨ˆ¸tå?Ú«7àÞrØÔàE"®ìʼO»¦8Œs¹ÌgfêëŽTcé5Y3ó”œû#»ez‹gÇ£¬¬!ŠÌþ‹ôKóî¢jPÇ"Þ/ýU"o1Z»÷¥\bˆ¥W3)<éS:Xç7OzÕQ ÔÞ6ÿíß;+jEj/ ÖWMDÑÜ*Ô!¤Kÿ~·ÖÞº¹k)[Ûß2öÁÒîæçsTˆ[”B®ùìpŽcÊ\.VG*ë£ÿü•Aˆº´Ì•NéÒ?±øÏ+ ŸÊB.eÄF<–Ê/ØÕ^–î1‘oÇüßÛ!z…¡ÞB ²>¿èŽ*ÐV&¿v!ªšA<_©Š.:ÞŠ²,™+z Ε۩„~9f1¼Ÿ¤kà’¥gõ©'Kµ­¹¬ÎLÜÊ­gSUù(¾R ÁHŠ_z-ÈB6%r®j^Dý–üêÃM•`²Iò¥ ßVŒY^‡dv±­õ󪲿D!;$ÂPˆêI ÛV²(ˆE#3yLñÄb–è‹¥["±)X”ó{"ât¢áhé)3j±L´5QHé„vJ¶¶Y{; ¶&%u¨‚dké]¾m:INaÊ23úÊUf}aEDUô¹]%åïD/‹0ˆ™|=>ÓÒAóÚì7åp‹)¤Dì–B¨¾zݬ_ºr‘[Ó}\¨åaXT&ë¢ÌRÎU2ÉÏäTö-‘5Õëµ[Qy Uçô0ÝoT!V ¢ò–‹D[lœÌX÷™ãÞü⟧l¼¶õU»iν”÷‘ÅÓ¤FqøN7Æ!™‚g6ˆD.,aNÒ5qÁó1FƒZ>|MVæFp”Ja%∄‹CäDWK!X°¶¡ÐøÁ D? PB°‡€Ðbª„°/Ê]BÁÛWr;L8¿!š²Npg!ªLäë–+?‹x^|qXSl-RpÄ ›†Èf݆dÉ•¬…ÅáÍv(®æÈF#>)Xº¦ÃSȵù‚˜Q± á” íú ˜†oǃ¨bq„†*ñÂq.RÔ9´>¤OBÚ%žµcvWj ywÄ´\›Êƒ.>#„!1šJÖ´L!Uy ¯õëØÝSØFR¥Ÿ=Sh^l¾à„*ÞÙJ.î£UÝ©ÜΉ£ÙwÛ(¬GqåD'Þ­„uÜß©p™HÈ‚2¥·¿ÛSNÖù_*CçÛº„uñ-‹»›9.„“…g³(©RJ¡„µ)Å&WN…LÍŒWyv–ÍÞ¹BM[ZK*œLGDÅ SÿøÉˆÃ°"N `ÿý…üûúßû…³’½¹¢÷Oõßy˜†lea‡(èGÛÞ%¦½/ãe«y³®WðƒJ5R‰Â¼…±„"‘|—–O¡µEÀ¸ÃØ´˜ž”- V~«óV“"t0 µž€â1%Y”úì–çwEŠéÆêV~÷®[©K‰l3ˆ¹± Õ5ÊLb’;Æ$ˆiKÅiQóKea×*H®ôªarå'½è0‘Äp„dIÂÙ )v& ÉPÆ’EÙž‰ú%¢_¥I:MÖª{II˯.(ø/P‘aD«ˆ@WÎqˆ#¦°i…%]<ô­g–Ie‰§Í—•‹Zð®„c£XŽæ+•Ã¥=„Úp™Ú|×ÃWÙH³i,éAb‘FCt0bw&_ØZ’‡òLŽ:¨cKâyCYBIÁ.þE-J}_vndg¹ Qª‰bëÊä _¹‚ ¥.I~Ý¢‘–ûëy¶ÉmÕÑ«qä%Noàr:8Äel!±kR¹7{IRPe'‹ÏSPÛ7åÙP*úÕ €VeöpŠ0ah&ud½>ž\Á¨vyVæô/‰#â œB€ÁÆ›ê³*\Rfö•*\ò\Ûý&¥pû‘(.…6¦¹|Vµf)¦c†sQÈ#cǧƬ=H"µF.-•W—oHOTñœŠ¥¸¡]ÕÅ Ij»&´Á+YhY,„”{—¾‘]4®YÊÃVmó2Œ…ºr³¹6Š+cº–IôÛ!Oùšö‹¶C.ÒÜ5Iâ?²ƒRX`BºÖé-PÉ碩>1â¡ßJå÷(ï³N¹d˜ôP¶%4N?*T‹B!Æ[»n7Ŭ™º†.PÒ·[k\k Ú¤£á†P§ ¬OÄ3]LœïEtL2NÇ¥ºl¼Öí¯ËZ ¥Ê¼O&A£z ‡Ã¥|xBÜ&WÝI±e&#éM²ñ¿×Šˆ@Â+9Nž+åÒêapÞüLˆÀŸÔÄÑè…¯v%„ãéÒùì(W)™c"–C rw„ÌA¡~• ݽkúÜ«¾¤¹4c0ÁÂP|°ëç++«é—¸”…¿Ž¶µýbV©ôz•‘].+e+gA„ö9S]ÙÌÅZä¥çדMÞµU19¬NªUÅ™sD „LY]C¿a94Eí67˜™ûÄ4˜ZöÔÔçÒyPcÌŸzS¾'׉—»ÔÉŒ,#98¹’V`Î$mB“È_’ûZÔ†©p„Î †y®&»¦'ÇÔYòá×Ùù†¼”rèÖR›qþ¤âQ¤&Jî0ÀS=`ƒ; ¡/>1)Īó‚m¾¿–Лÿ_´Z¢T`G žq^¬áN´GÓ’¥'’™/ŸZ[ ¸"PœÏ­¸”'“= 1åb„IPuâ6¤ºô ·þ{nCÂî&Õ×êÚ²ð¤!A‚‚?ôá‡@¬$ő鈎6LŽ%­‹Âë‘hÚ¿ÊæÅ£!‹+(ë‡c¥ntv×AªˆWE’òÛYQÓ¢!‘¬ØÑŸ*¦_.ŒO’µHSU>¶"‘He>Δ]ˆU«c Ÿ˜o§!;tCŒaÎØróµØÄľ¶I¨!Äñ(Bº¦8¶éÖ¨6ý¬Îwˆgˆœ˜æ+'´D\k5/zM’¬fªíuQqøøFIÎYL•7•X‚399;W$+ewïV›AõjÖ¥ÆÂ%=ÞVq8€áHïHÂEñ,^[sr“3IOÉûèÃp¼ÇË[5N|Ã"•VÇdË­oYvžF?z½2ˆ¢ÜJ*v®yVaX 1™…2“‹F¦›æ ¡3Z•½v•«ê¶îìj¶¹”A:T„#x‰Ä‘U6Q­&¢¿ê+“eZ‘(f¦êû}ÛVíò<ƒ–dÄv¡ÍW$åÜBØKLâ÷qe«Ê¬"‘qŽˆbLJ£òeHfqP›œgtNJëæT¬åz¥(¬R¿n—L1q…¢û¸f(PäVÚŠŽgäÚIcJl§€„ =@P 0VÄÿûZ‚‹˜fx³äDë6ȵ#µ™×d!9JèfCØÄ'´Í1º”)…|% 1·î9’5VÝÔ%Šl!p’b›LG§)Û$0Äó_h®JÎNçâ˜ÅqiÊ_Bfê©ù6ùÙ®Ô1(2ãœÛGdZ+8*Å)˜ì…W3ñ«Ý²¤‚(‹¬©}û†³¯j=1j^6®þ'{ëµ9ä)œÜIÎ!n×*¦©FA’Që‹BµêOeCȔ䒻†"^™Äïd••PŒÍDïæxšeE|õ°Ä%èZ"n®¹JÑ/Yew:g°DBq*ÜÓßU†.›*¶ÒMÈ){H(äi †31\eÑÊ!ʺ¬§k/ÇìÚ‰A/%õ©¯^.v}PË|t:ΔiqpCœ;òiÚ¦'®\T ®Ç¦adWF!Wé W³²N‹N"¿Î‰<-!Ôe6Ɇ62Ca\3% !±JwÐÕ5Zâóœç+:ÑÆfÜÓ:BÔ ‚ƒ"‘ˆQ” €‚ŒBATV ùå¡ÔpÈ!iÀüˆ8·í( \a†úÍÜÁCN€Ǡ¢éMKB0¦!›Ð©sG§e«G4îaÍx Ê7L ’räˆaÃSŒ*‘Y )CG>â#uTƒº¦Hf™ÆgTåF(…\‹NæŽ fŒG$øV0‚˜b3`™ID€ˆÁ: ü;ŽðSò.-;„qÅ(ø•”®Á¤ ©ù· Ä1†#q`$RðT#¶ 6f{ê5Ÿ:' Hnލ¬†ì‚&Õ—ò{µ=N{¹*IrŒK"l©Ñ̦gÒ2T¢§ Dã1skI¬üä"Ž„–±á;ö‡ýIÝËESßÄÄFAr¶åŠGi¶DŒvUüäùN©ÓÚ•M«Ó39ÚÚO¢Sdßj.nþŠÿÕïú/Œ¡ŽvOe_Ò&+”B )œE£¾b&Ñ V¨”n–¾•\&¤NÏ®¦êŸQ„-]U7®ˆ†EÁT1Òž”qû)+žßbV¤ˆ¤È—“‘–šä©Ø²ßÖ‡d“UÞí¼§WÞb3¹|Èbd3_(¤tÁpÛLÞ]WU[Wdÿ*'%œ«ß“-"")„u2fp[Ù’#«a4tQ|j¡I‡,¥ ånýï§wLr1‹Dc4[~jn­eEuZó+þÍ}C,A\‚9¸®cÑÎ"óü’zyYÑS¥­­>oá'Eõòù“°´V¹YØÍuI¦Â~«¯–ÄSœ’i)e]¡¨a͹ìTW!NŒ”ÉŽNµ\¤ëÒNħS(1D(¾½ºÜ[ g#£‘’äµH#‹®r¤§òí$7Æ&ú rßÒ’¡JJôLî·"º£;Õ—Wx™*T¹¦ª¾výhVìO!¬'é¾\¥Â#—…\Lµ«)T‰QQˆØôgº·IÇMfÔýþCiÌŸ[iõßVœrf=· bêkY·݉¢÷vŽS¦™¿òTšF3ºJ+¢#‘ájS,uJ%OCwä5×%;B{µ·–‡­lª#àCqo¹ÙÌRòl«O6©Ûß I¹JÀªQr¨Å¡" `¸JÁ„œÂàŒpÃS9]…¾ä'ù…U‘ÖÑ_M™@¢­qLƒÕ)Àø\T! "=R‹˜¤ Œ­“²( ‚ ¹©©Êvñp¥ Q;êì>áÜ…g ¨Ô„qUŽDJ@%ã/_Íê à†gꢋ‡Á 0ˆ6)©ï˜úâ+ A7&êä1C$'5d#Cˆ§)«ÀÏ‚f¡%¥CŽK!¡²%f‚`âç/ h0ç‹ØÊ'Çå–Ù°êÕ”o–ê}B. ! =K†6;øýÉ ÇãÓžžô–™TE e#$•‹A †„àE¬(üÁÃCÕ;Ð?C¨±‚ œ *®á n)ˆA«ÄÜläqÃ#>ßëÞ[XœÍW×ö£bUb$l]Âq¬§;ñÛoðµÀ´­q,sDo[ç×]ÎS%HDBQdreÊ‘n¼më^£¡”T_Zm­ÙMc!E`¨)(”ZÉEôiHF2ÈéIMéÝH•y(í¾’cÓ×j¢ø»'k²ˆu»‘Hö¦k¨Ä;-"f‘H§HÉú­‡/˜ä÷wc8o~U=»vΦ³B!*]"ÓUeìºÔËþAgÜÔ¢3aI‰˜É^~æ;{‘HÕ21 'g!Gêý7&éÅLÉjY6ÜãR7S?}Æ3šä„•ÖJF¥øR®­ Æ6†Ÿé&_ 38¨¸¶"5IÒ Š!æS]èW©´Õãj÷±y+Å&póñ°‰NS(ŒÉI˜TŽÞ‚¤‚Ÿ"¥››è¤L©lÇËlŸµË7µ,{¯m^†šî ÷N°Ä §­esw/·UϬÌ:fþÑM{R¡?¼SŽ[o 8bS¢2–¸~m|Ó•K¥¡½(¥êVò¥Iˆò§«#Õ%\φ T²yrÏJ ÊÒ?Ó{¹7}÷‰²}ú•esg ‚¤ ‡[& BQÌl'E)k(…JDŸ ZüO˜ŒéÕ#pL¥.5% Å–+D#µ˜j!óé0EØ•ÂH4µ:]pßóê!bVìU*Íä1¡G—ÎÇoÞR”É_äJ¡-?:%+ôñÌoû•ÄRR¡S½Iã6™B«¢aœ˜œ˜ÈW±rHeï¼ôÈF—oØB¥ó†r Õ3ŠÕ8§c! #ŠUUTˆLZQÖÊÔæç—8¾²q¤ÿU•7šÊvœŠŒøBs)Éïú"uURŒj×IÉ˜Ž¶!­®º¥*:“žœ”bh†¡>ïAYd¶PÛÿ×U‘üø½—#„^¡ foU”ÃÛˆ·¡N¼Sbô»Ý«˜É?æªÚ‡Ô8Î"³VÄK ÎDÁš ¢!›âQiœýZSR˜^¦~‹¸U1+ãiÛö_ÑT1ÈÆNÁsÙˆ¨ç!‘f¦Ü¢ßRæº#`îÿøÉˆÃ±%L¯YŒC•³Þ´#L °§»êx÷|pgéOê5•¼jmêJ ‰œÒkäABe¹XÆ1Bˆ¢Pµò¶m+´½H„%[KÊžýʨB²ø(Aˆñ<¶JÑ4ÈÜm2{=LVy1¼i)ÑýõÄ¡ñˆÞ­SùJ2 p+ãBc“A‰Ñ#j©´”Iôㄊ´ nd>ˆC¦¦.0ƒÝºìwØV%-¤%Q°Jm µíÖ#«¦vk„EP›×1_Ù•Íe¦¦L©(ž6°˜?H51N´Î‘÷)¨ü½VH†`‚_t¬¨ü—ïÞçå.^©Ò0͈٩·¯+gÔ"šÐÛLΊ!…%ŸY*qE gúZN‰Nòké;T¤) MJðÒKÒ1›3†e)L2¦®RÜÔvl¡•œêµ^.ßIL»ÔœZE*…Úá‰(È" vº>5$1‚’‡ä¾Î(—o;º›·È'Åêj\²ø”lA8Ũ†!Û¢•}i©ƒ?>ò^þ©µ1ŠõÄEST¾ö‹‘DN1̰½QÎç`çé$æ™ù×äOM^kãL¯ÙtKc4Œ`ìQ€‚ ,ÀR”nôzoæjaƒfrdLlç±ÿ]–‹ª#M½³bœë)HÂðN¤é¾~?ÉÙ3®>ræ±ÈìÛEÝ7¥Tb "ˆ.(r•éCVù"#„¢¡)«Ùl\— s]\éü¤TÄì´™ö"Hs ú,‚1ÊÊ7a4³•†ZQBIj±º¸KKk_ìK:ó³Žâ²Li º/{âR”Ç)s°íD‘s–+•´äeìJfo«7•lù#9*"a¯íˆg1ÇÉ*"Ÿ¨Pç(ÛƒâÈä !‚g¦ŒzÂ{ôõT7Cµ„âQÀ¡…Z#ùD­0Fa‰^†+¡ îbaR/ðÚcT+Ýñ[°½ˆÄ(`g|1„,¨AÄ ˆUý²ˆŽà;ˆPG–f„QYÍB:é0ƒd!û²PApý(¬É9ì•EȨ €úì!ý‰Á„@ ¤PÈйî 40¦V§‡ İB 7@H2»øbçä!9r”‘;&"ú¾Ç)Ê«‡" 0†Rô°ÇC!€3 Ãx3ˆRÊbBòÎ7¡^q" 7CéIWñʨ7IØn“ˆm™fv)LtÏÛYÌûQçô„,Ê!Ìã0”À 9ã:±=× G\Õú1¸¦¡º]]}oläCû¹¥eý]3Œ:J¶W_ZŽòQñzŠç~©ë¯LÒ©\ó÷µAŽtœe–¹‚!óS¾~¢º nd#7“M›{˜ŒÖÒTWªxuKvJWØžJ§bãt¶ÝÇoÖ«!Z¬…&'ó÷~G0S)Ðb‘éB±p')9¨ªÊNìujôøºUÿDH’ÝeT¢{¨Ç™ªbú¸¯Ë¦#П)*UâY!Ž+\µúåš”–ÍdСF2ïoÖøjWžu+û[fäl6IÕJXJUUj¾šÒ,펑§qOCiXGê‘I³ûŒÅ˜Ÿ`š6×ðŒ.űݗ‡rˆŽ´Ú²jÒéØ+™VG!0‹ŒÛ^þYßGo¢÷š‡7®ˆ&?œB¥Œ+˜¯GhBêf¨º/5s;q½—ÙÀIæ©ÔqJs˜ëC%)ä¶Yr´qU“‘¿j4º@DKÊv[Ù(a(Bq邘êõoJ;÷eÎùOÊmQmDÚ¾iêêªòùy®ÆC†:UäF5e¡0oõ^Ë­IDɬ¯Ü\?åeËbk/©d/Ñçi)Å_|(´¥Dõ“Û}L2Y%r{ñ:L¶­.Ãmh:¯ïV*f­¿ÅB˜ì”B°ŠÂ¯ øµ1U3RMv«ÛååB“qNš¥ô[囵Yü©2ÙªÎÿchY~Âh˜r§0¨Ä!QW«qIu”¤KÊR«ã+iö›œ¢*.žø%,ŒÒÚÕªí)Î"H¼b¨ò³2/{h¿¼›7n@¼†K’‚ÞØt¹&S r ¿…”UÊñ*ŵbYÙP„ˆÝ56äÝbñ-ÞÚ«fzCc8ìÉeu–f×ZÑ©‚ìÍ3“ŒùºS+îWë£*ît{-btJnJ+:æ>õqÚØï|Ñ\梧ӗÎL#XOÊÝ]»héíïØ’.Y¥là ¯ €å4-g*l¸•‹\F-±PvH;Vm›‘ÝT/mxÆË RQ©«9ÎR6}ów¥¾ âËBgï¹\Ζ!,]b EË:).³®‘ˆßBçÎõjÛÄ+rÊ¥T¦ÔVd½™²{º˜².qnN[%ª\>ÓKZÞÔÿe‘å£Î#…!–# |i_E™ëÏÌ\ÙœÉJË1)hJ?)OJpGÄA È3¬ 'e:Œ¨ UБ¡Œ»5¯Â ôHÂßAÄlg+ ÅÉ‘ÏqEÊáT|E#Q„20€!ŒV*¤ø;ò T”A²¡DµqŒfàRøÕD*=<|™ Œi†A–9"V*—ûŽÙæ­ hÿ^Zœ"x2€Êã Œè-‰øôq!ÃQžamŒ¸ z,ÈÁ û F7’fºÈ4kdДÂò>\H2$6!ÞŽ Q@ç(xR@ ˜j=+ „@ Ó Ø!#m Ȫ/& ذâ¿3„D'!V†Ì“êèŸ0Â&pŽÇ2ÑÍ!\rŽzu<ÄË63Ã""U"0U)ÌBˆW8BgV8b`N ZÒ"Rˆ)0ãa ‰kµÞe‡èà³40*±¡„h#9—u˜HŒ   d)„Sб"ÙÄJp^tÂáXb°¼w@óðÄ_Jœ%X eq ÁŽ‘¦Â³…e 7' ÊAÂ…ÙE3ÔT¦¡‚0HÓº…ÈWÉØHo*bà°Æ!±T» 0 ¨î9${.êp‡ á CA3DÁÔÔSzÝ©» /18©™ `A±Œ*Ôôúò˜„e '’C‘ Lª ¿§tªîPª›‰ãTÈ ˜@AÕ9E7ë±Íˆ"q;2Žë Q\‰D¬d#c<¿'A[Ó B Åg ÞZ1Ê ¿—(G&â92pŒ \©xÀ¿âŸâE þèÀ¬/†=ÜK>x2Cc”D8Âã9gÍŠ![>ûà/!E‹Äù™Qá3îdH ¢‘˜J š~âäÊ7,€£ Þ!i_ VW1ÔÇ@‚8Úl1„"¶-bˆ™„F%¿ŽÉƒSŸ”ý\ÄdÔ)²Rd#` ‘·æ4 &¥" ),Â𦪧k¼HäÁ6® ÷CÔ*E"›Xw?s9XõÒ²Â(JcfS„F!€‚tYÌr %U_ÿ,欢÷SžŽ9j•0BakˆÁlfA¹Á94AÀf­‚ްS7dåbÔîoú„7/Ša0h1Ò&&n¾)¦Æ`Ä™CÑzåîP¤°…0¨¦Q0g^gÅl+–†!œ©8‰"á)M¢ C£¹¨üÈ÷z¨„9¬Û]H£² …j“³Z¼»_Ý%5w _’½_^l5«ü*H;9¬ˆCº*jáÌ`àÎ1×*'ê[HÓÍSÍ™õ7ÓYS^–“©³Ä8ªŽwÏVt©7Es‚Vïëönãþ.©ÂHîÏ+—ŽT1 oT¦£ñ 0¥tÄ£õN]²{“‹‰Ì¼ŠŒ\¯!”DeDÕ#!Ј͡þØY’d$͈—<žzâ>~DhY^WÎb)ÑPåæZ¨‡q)…û_ûág­:‘®B{9²_G‹BzQ‘†Wd#ŠÈL'#zY¨&g_®{.æ. ¿³_µLDLã‚\dmz#£Š)Œ³ ºO•¼]÷B컇˓e{.ÈÆŽy @Ð Š»Êe2z“#n+‚º¬Š…"(¬zB›¨Ä ÃFæçA!Ôd”,tLtÑçTÎW0ºS˜«òò !c#tõ™F®¢ˆ ÷£rô|óÔ Î&qxçJ0@M’# >hd•°…áPd 6ÁœGÔÜA(Ï_ Ì€ð`á"Efëî8.Sµ ¹u(Å"²É˜0ŒÃ0J"#ÜkøLa!ŽF@½çEØGZ|ö©J$s\«Ô”F5æ [†#K"JÁŽ2dSærî9åèUJ×ÀœœúšmØ`Ì%° qÕŒ µ9‚vu]¦@‚:1*U‚0ŠRTLFè¨ ³gé;;KÔÚ¡uIδµ8¶„òJtQYyÈ*Ñ„ò¹TiŠLÞÁU‹¼ƒ§þïÖ£Tɔڽ§)V Tü“„0„#è ­ŸI»!³©²/smjÿ›ÐTE"q+auta9zTB;(È©¦Ajô_#®Qé׬„z¹ÐÅB«éð¤Ç*ŸŸZ•W­P©DÛö-v«½LåOReLÔ}B¼Â]ŽC* „¹Nꤸªz*þj.ßÕJÃó^ Iö¹cß_Ç#15_b± ôyE$Ä(ïr¦bSõ–gÔ””5û>ĦZ¯·6a”Ž´0’ªÕÈ+ã®2 v*!NR»º)3{üþÒˆ3:S[†=wŽ3²ýe"Tè"ü©Õ‰jnã‰Fr°úÞFZßÚ¥+8«cˆ`ЦA‰ˆ,ŽëZ$`òf‹P§= @z.–‰F,¢)À0"„ï»EC3bš¥"ÿ#^|a¨QD,#‰d`ä25ÜŒeyTeñwGè3-ˆª)ù‰´ H#c!)˜ÆÈ7«BAˆèâ!Éø{ðsŒ·)8+¶ˆFAwq0˜APAŒ£A‚Œ°º ¨'¡‚V=2»E¯4:ÒSI;5 ¤†ôb•LlfˆÙ+Žù£˜^¥Å¿uÅÄÈÔÆõ²ÀÓga!1Š/(‡ É‚(ñG©å”n@…jÄì"U†O´*˜â¿%]ÊyäSL9b† „Ö­è 0Ãa¸ÛöH›¡XŽAœîœ¡Y”$ªãÃGb0(G;¡ˆ â/5 3¾E£Ò‚±CÇA•€³˜"v/ä¬`$3Ñ„FT HXÄB`“§uvqê8HŒÿ4LËAÂ%,KÐw¸€’Ÿ¦*‹ùØàQ}ƒ=áÔ Ì¯',‰¤€ƒf@Òç8â!¡SqàšJüáŒAÊFA(ö`|Øin „,Pm›q‚‚À¼#Ž¹Ü †¦Õ £ s)TìAC„é!õ,ÁÙPË„½¡Ê!(È0š„j}HØlÖˆB´<>…ªÏÔ¬âÇ*3Îo Œ´ËÕ€˜fð""ãÓ“@œ2ˆGåì声¢’¼ó ‘Å@"²r)7o@D#$ !߇`ŸÓâ¸ÔÃDqq‘ļNôe†¸hJòV‡›è‡3×®qr,ÚêÆ a(øÑˆ)Œ"zbŽáÈJÑxå`¤ÞkqáÚt´Ì)ˆJ„`‰"×~ ˆ1²“¼Ê.Ý*6²Jn!‘ G¥¸²ˆB DÃ@"ÌÎåb”¨+±Ì%ÌU”¥7è˜ ª!§Ì†s0aèAþ-Æ`bOÑʾw0´Ž]Æä`ÅÐØÁ{ƒSE­cq™Ätå&â°xÊ‘éÕüRDÝ„†0F&B(`zXF`A75­2vƒãæôÈöZLfƒì8õˆÊ‘AØ“0ÚCYΑ†B¿×Œ^FTèéŽëC™ÂþS„ÄB_O!kJÊJñÈ`310Ìf|è¶)s¥b&õê¾Zêbßž Š]pá¡VD 8HBc¨Q˜Dju!‚:§r#ò^Gð=i<ÔÙ¾#Œæd7!TC˜™Q¡>ïˆñpé׊DÄiHá 3q#FA› ˆéáNf"„i\ÝY“U\(DŽO8±É—¢®40˜F 2TJÇJ>Ι6R ¢¸ÈGTz¬Â¡1ĤQvÇL&a ! £×5T‹QùPäð€¦ýÅ–#†¦â L¨ Q›"Ó=*,Z7ã#Ò)5"íVt>2¢"0ÄB6¡’ GȕٔKøÏ¢2’4ù§¦&g†®Ö^ðŽÅnEøf¡‰“ÑcünCl[‘Q;.¥º²™•ˆ¨&Rns Ð`ÜÄã•´›)±È}1j× ‡ª=rC6jB ‚q Ä"’È"pF´Ù©“Ô2~ÆznÁE1×ò!‹Òî¤îhVåG¤ê¾ V=X"ü#옊b!†0ІqP޵Ì8Ôn%:×UU”o—È9€»ó“ãc Ž„ÎB#pD9±Q¹E®­È-ÀDI5ÄР6C^Æ'9…âŠÆAq˜5ËÄ@…(QÕ/Ù¶KJÀÚb}ßÈRŠ -‹§U n—œ†‹Ó‰òÑ•uyŽ´˜ˆl¢³’t¢Õ7ÕŠ¨" ; 5úC(‡¦Îîeʳù©‡¥·êÕLå§y] jСŸ eîÿ;s¼•ôð¢¿èÊ“öøU;Sèw(”òý¦Í”ìc÷HE`½øG^ši¦™ª·úãRÖŠŠ ªÏÍÜ—.ÈP‡RÌz Î\ÿ£3Eb"ç±_”‰EE3•³ûÎe7x¡Mû6LwDRTö¼&%› l C‘)YÊÄ=i™²9„JðŒtžÝ1ˆiõU½Ô#ñúÖ§R‡¯=†QY¨R*RB¥JÕk"9"&øK<„)tÈDÔLµ˜_ìÄ!s¾¨®‡æ+oP]‘tÔ±^ûb"}Nɵ3o”Žb©–@ŒQˆœE9„7«¡„ÕB¹mºÌƒVhu³ÿãÈCßWwm›CŠJ)/rý•JÈ›ÍRìÄUR‚6mO*¥÷ íŸê[%Y‘3ìç]=hJu,ÛÞˆ "áinÝ#G!P¾9Q1[9(B!¾Ë!¿ )Ž…ë3cö¿¤sT!L2ßWÕ×Ú “SÙ܇Ě«@Ï%ˆýj(QMb¡0¢b¶J8CmºæR6_ÇbŸVë½´ÂHåfíÊŽïòSÍ!Ñ­s7²”×óyªº¤¡Ê*¿Të‰TÜcc2Ržî†‘}ÄÄUG®J;zÿ§Uœ„„–‰Õ%œ[X‘°Ùô"¨Ÿ,þ¹ä'£ˆDº-²¬„Ü!Êvâ±g"RA„oé³)—22ÙŠÂïîͳÍ"´¤®s¹.N~г«K™S›Nøûù¦úû´ýþ2³³’íª%'(v(æøð†Lnb†8ÉŠÚ²Œu (—¡…®®ÃÈDLd`ÁÃgí³vnÈ“™±ŠÐuÈîc™NÔAÒNož `Ê%l˜ !•ªþÂ&0Qè2a”E)l VaР‡DdF7Õ¸¤¹§nôsi¦ã F®0©]£ŒÁwa©ÆLÜ%mQÚ”b‘^ÊÛ C+9…Å< ˘á8O„(Ö1D”o„ ƒ θ=ì³P€¦g! ÇkEµtRV;8JP!DÎ’ 0c© Csg1D1 Š¼)`.£¦f ‚X 51xAIiÃ5Ž™ÍN3¤©:“úVE;HÈ9&%h6DÈÁ3HæJeCÓLœÈœFLî®—$a.¹ä)RĹ7^ÊYTK¢ŠU¼Á$ T'›Ô¹f•ÏåÿJÂ])rýV…4 —E ›äB­£{=HLUç#Īº_z>î¯rÓz­Í*:ã)¨1³õ.Ä Ì.­1ÍäÝÕiH2Ór”dnÝÜj–bQ¹ñ×}øëU›$'bÏRSÊŠUú-(LÒn¿QœÍR®]¹u• d'¾ì…˜’h›Õ§ªQJ¢Å-•ZÃv½„õ¤…Ó«URŽ­¤G˜¤Œ$¯G<æë'vÿLHŒˆ¯B¡ÉbI–Ùͧ{’Ö-Ѩ͞™BDnÔ¨ˆÛóCb‰VáJDCñp‰Õr“Nó *âMb.n«',‹¦Ë…«Y¸êTÉWD˜y^K ª-“JJ!Í3'×\b[ kÞOÛm,F•$Ur"'r»[Óò¬EGEÖ-l÷w)¦é„Ê/jé_ÑÆ4òTÊš…×HfTâ„ùXJ%oæø[È0"´5”¶TlJ…"8`Á¢cPºh³ôPeJÆ9BQg>)…_|\Qp¿gbY b Á_½åw8¶.S¤=øNÝõˆlê*w*;6»P”pÖ5TˆqDzT)¤,Ê[ÿÖüg)Á0\1J[- Í¡R €ã=$C%\Q|]µhÕ\¨œÆ¢|Äk.é3Zå”ò5EY Æä¤"ƒ ¨à‚‘¥‘Øló`/ÂBV ç>aK[ÆaMr’«„A\£eªÚ£ðþJY]*ÁK3Ž¡H{‡£ ‡‘‹!¿Ica7æõöò°¢Ê´A+ô”Žé®|‘vŠ2‚Œú 1»G°W *ÈÖ»,ÊéÛß>ÍÂOÖŒl¥ †ÐÍwQK*¥HäW—$¢”çò¦‰Šº¼òU"žÎô½ô´¨üA¸A C€hmÍ,!M&L\uÜj²@l „Õu­T'a*¤*"û1”åºb)錹µÝµãOÂÞä30‡-_¤®Õ„!¤À©’Pì=K¢ßÆép\KäÈù¢ÌªÎ_kð‰ëtë!ú‹…ç*˜PA¤ù›‘c Aµè/õíTœ¸ô[;YëÁýÒ1 ¡…BïH„|Ñ>Ùð“œÅ[š„½RÉò"fffca.írº$¦A]ž}´æR“ÅL™ý%T¤Ž§Dòc•qj‚ç­:HÐXÀ 1¢ZR?C‚œrÂÂpbÅÙG# âD¸W×;’~ûkˆå,òžö5—pÖydf‘÷Ù RC¤RDÏ:ÝÛ/!¼Äº­ÂÞ’|BJ-âIú;µÄlpË(p@Qát¡­¥·q„k>\'(óO¸8Ô51DVRHzQ¬ÊÓ”3 ‡©Ì˜ê”¼¤ŸÓú=Ñ%þ¡ò—eËJ’M|–¡;Xà™(¯Z3 |âèt ÅCÐÛ\ ¼N7L«÷7š"º$V©Â²¸ˆ­i×2Ëù5[ jSü$SЕ#\¤ Yæ—ieœQæxE 8 òÆ[I4“d \ {CŸ„âÒЉ ägÿdUÉ<½$Y Bëô®ÖxÅrïLg£ä…Õ±Ž9*%HÌ+´š®TmV(…°tpKîËþàTÑ„wµÆz&¾sP‡t®íén‘PÙg5"£$å☊8ææQ;¿[Ì4¬G¥?Þo͵ƔÚÅ!×b½Ç @=$Â^ &ÙJƒUI)$•„SXh'‰u›Sàˆæ(3/²5Ruº.¥%º”LR órV‡¢ÕlAãü&¯r™¤,‚C€È×WGŒ.å.›Ä ÇˆoèŸ5g¬£9FÊ SNæô)rò¾¦ŒÂäQ èø2å"~¹”Ò›Ó ‚T’JAÒœ8Å’MhŒ†3{5LRùÈ¿­ÑvzW8åqÉ“Z^ù(îs|…¤—üy+± ]BŠFz“Ü…*Šó3 èä½B.;ÏtE#!GúP xJu‹ÚtxŽ)™«þô'u-PAUšAÞCi†Éha‚-”ù.šKð¦É½ÉîÂ:…hö0u"¢HŠBU› µbá7GºÜÓ:z,(a„I½ôm(‡Œ8ìÇýR¨ËwDúdüÎÉgŠ.KÃ2[/+ú(ßË•æ ŸE(Ž‚‡dÊ ä?©‹ç²9*™bV,X£”z)‹«dLgò7p®D y$%×*û¿æM¹´,KÜ*÷7zE*éýhŒ’B ¡£Kµ 5r5 i£rZÇá>$¡8’'C òú®Å]¢ífpÎÕš#Ô­¥ï1LjcJP´Æd-HiÓYÖÇÔþL÷ÉQÓÄu‘j%.®|Î#ò“F…çÈ*ÎÑH1B”$^w /u%ÌæWA Çò—]*ÈbCSÕ‘„bÜØÿ¬0¼+áo—þÊÏ¥tIlÂýâ/¡TB¥'Ää÷Í ¾ùëzªDaßÉ,Þg²Íì¯Ä2™'80  ï¯A(©z8ñZ'VkÉÁB¤ºA6%OL;$^;mš9ŒQx$¢* )°CÛÞ }ÕYú-ûÐÓÂXÞ|Ê/|­âü±€PqàXXfjB¦©'Ê4É ¤Ñ¡î ªi6ÂVõ[e+-f „"Tä¢ÑÌæö»9(¢QBÿ‚Ë”‰v0‚ A‹³BaE3\N”ò¶Rf1kuZ=6ýä«¥Áy2ää)ß;fd·häçŠÛ|ïé ŠD½_Ê•9ŠADì©IbŒõ•¢(îšJ #Èoaë¸QÛÙ 8!'Ãaëæ‰¸ ².¸úÞâvœ9DE¡ëbJzÑ*iÔòw7-„®â±S¢ƒ"ˆéN?ªÄå:ÓrÞzÚ|·TNÂ‚ìÆ¼žãé!Nª[’)TB}ÿ÷˜BDùæ[Îó¦e0—e”@ý=ÿøÉ˜Ã³‰NýÕ~¾¿OŸ£Ñ·êöIü´ÝÐpÜÿÔ†fÄæQ¯B‹^˜B­jŠÛ¯Žõ©Hžòá)‘y1+‰»ÖÁŽb±Z~ÐC2¸es2¡ÚC ŽÖæ­ý×1÷2½›- ¤»“2¥£$J_‰EpÅeaIËAw-¡SÎ @¥"?vóîÿ|£±ÇwˆB‘âSH„û!™Hµykô*°•ÌV¿LºÛ+»[etnˆ9‘‰è[Ë}ÅÎ)3ä)ÚùèsgºÇ0ådB!Í^J£*ê–%ñKt'K”˜„½æyYdáê˜t0…óÉCYˆâ™†r¹ Ze¾Y¥0££¦¢U»TLßâß^2ˆ+—ðÅoãSñs3qA d¥o•ëmÏÅuF‘¢wªZŒî˜W·gï&M„^V¬®êéõÚ1Ä;S,ƒ±˜Z SqŠA6†VÊnu\uÒÌM¥:x¬TG …2h`Èðy;4´ F?Ça•NbHЬ°ðlÙ‡Ñ MTry¹DÙ° )œÒÒ£›˜„Ĥjíê`ÊnëLŒÝÁ‡¢˜D隌šGftLØ„Åã?Å^T4ti‡C–p›xg(ÏÞª!òÀ” ¸guO‚ìéš³ Äj\UE„ Áƒ¢•‡{Î}õÄä ÿ¹ˆ[+y0æTØŠäF øDÃ1¡k—“#„‚34![s="˜B˜„Ÿ*Èq’¼”¦±ôÒ< õþî!is`Ÿˆ"ûh#cUU3`ÊÜE ES·Ä„ÌÍŠ™k »”N­èhBƒˆ!D€ÛbT0Ö" ³ZOùÄ,ŠHŸS׿EÆ¥áÖVRV˜Ä#¤QÌLÀ‰P$Å¡µÑ™%°$wå—ÁÑL¼$/w/GµˆX4(™…L?ZÆÂ\!e0¢c›‚ „C3­n& 5Óñ‚ 1FÅR•{‹I’fÜ= ¥s¯Q°b²Lj¥ÛìRÑøÈÒª£G‚#æb ‡žÀÄ@ƒGÉ ¸¸a ÍÑËŠ¥Nv´e/Mo0C“B<#Š9#å#2:+ÎÙ|††Sâ6 ›ž,=Ì íÈa1Üêøqäh%¨¥ô¢Ðç3)qAˆ) ¨ï‰-5!$ÐaŒufÓÌĦsK½B/Ÿ›R|ߡŒ]GxN‚ r„C”¤€ÌäDŒ E~#…ô d –®¶¯ ʽjN/äÂ(Ô‚lwB˜¨;Ò4‰`Fw­˜Rì%—  eˆ1SÔ¯ŒÖc QT9úôŽn]•Î `A&£ˆÊJÍD 3•† û61%ZÜ·…õ\¨BKP^2‘Šh@B ”„ŠS:¥ 4Á8ewª ƒJŸêá †m* âŒ(¢b í¨9§Ã‚¹_~ ÃÇŠ—¢r1x ‘H$°~ê/@×é‡ÔˆÑœÆöȨŽ`ÇN"/›ÐA 0¨;¡Ô)é f(C†ù qÌö]ä¶Âa…7SGttœ0ÆÄp…`ªÉ1Ÿ U'= ÓL `áP‚ÄUÑtsBVˆDã'¡ŽŽÚ¢ ärS0˜È@Ä5¡yƒ! i Ó\¨pÊr½õÀ~B”…ÔÄÑÔhk¾Ñ–$0#&”ƒÀèá1ÚaŠVõÈâÃåÐ3¥Ì2:øÄ_- Xjja„`›†_k "‰+RaÐæÇ«w!ƒî£˜¤,:˜0‘NÿŸ€áH9€ÀA;å" VÐGJm(ØÝÙåìLea²â†"˜ü¡IF.U Q7x+k— QA”½=ar˜ @!ŒÇ^gc `l¯U°…qcw`ëᄃ¤ŽT;ŠFTB„A ”´A:9zpllcƒŒW¬#Ô]%8¤ŒCÈ 9º» ¥VñPïbŽ-Š4a qü72 ƒ œÐq8L¦¬­ÔCÝ¡ #œNˆá~°„jMOC©Â"30(CòáDæ#Ðã—ÑHй‰0Š˜ ”«Ê$">ƒ#1:¡ ˆJZk_í„lFƒ2Ër‘МkZÕ ŽÀ€–ÂÄwS!ÈA\e" Ã'Ž£ á+u¤¢ˆî `b «ÔO£gbz©ÏSú}%§Å59ÜÑ›ÓN¼=âÑŒ0‚5¹ùh¢-7¶Á¤Q÷F¬®‹†7ÂŸÒ È02¨€0 ã*,dU1 D`Ĉ\£†gUœ3²‡&H\ Ñ\ŠŠ©ÖùÌ,@£s&£‘—™hÁ2b˜ÀÈ ‚Ì#0ƃ÷VÄTrNRže†ä$r˜Vqº×=¨BˆA;…6q„5Be äQ¡Su2Ï})D‰È„¬’W-*8c+†ÜF*QØ¥ÆQˆ¢4Æ–~!GÔtPäÄajä'ʪÎ/Q3#ŽD–Ž„#„ B8ᖄրȄ¶'£Ø!‚$£S(U=.6è ø ßLN€‘Å^¬6'Ph>-Fªˆdô‰ƒ`¤!HÈ^ÏDbuçDªC•¡í…"®téDŽÌ§ÂÇr B53;"”jüÕ¢4 &¸±ŒüÈ#‡ýÛ gÏ%â¨*`‘ ÉjB’œbƒÕQ0eÂ8Fæ)¡ áUT& ƒÆÝéñ9GrŠ#¼PD0LD&pªò0„8Œ@n„w·ñi„ÁÑ\ÁðR^$Њ&Sú£&c^)T®Êñcñ±ó'õÃùEýX¾Mg%;AåáÍó" ëTR…? õ&^¢×ÄÀ²Ûb R6LjÞ¶?ÊÖÒêþŒ_ (rœqÆÑHüâ‰ÜUc1Y«Æñâs§uyþÎè÷“()ÊÂ0ò’ïÉÍYÒÙ·b~|zݸ÷åÂB±é…—M µÚ 0` `À¨ ÞhÜîÄ3ÒÒx4 f¿ ëQÎqó<¡š[>lÓ275'ü´¢ˆ.R0ÃLK©.gñ¤“Öæò7 _&Eî} 6ÊtÎ…1Áü>ËF¤-,Ú¥˜Ç;I3èVòÈ…=°˜N’‚h¡=p ‚7­$-_v)Ä+*\­¹0‰65=ÁJ„#¥x²ÂÖ¢’oB¡®Œr¹X(¯¦”B”¡†føŠYð¼ˆO­Ë_‰ß= |ÜQ{:ŠG•V+j}Æ#!$r{“ )]/‘fQg¹ûÓ´MÛ{‰§¬¡Bà&poë ?‘W³¼‘ü–y];}JªG=Æç5“ÙDm$V!ŽCÕó¥ó±Ú2ar/³NI‹öAˆžBJЮS(!ˆo¦·¾’{ÿÒÏ"éÖô$eí.JX‚®æ5 „-–AÎäböTÏBˆö IžDµpÚˆõP¢1,-lñJ›46}WÉc,F ‡ÜîÃëUYg* Mt¯êø¸Á[i§*ɺCÅ®Úw3=HÝ«D×!M˜åI°:9BŽ)¦¹\éc¥5î.‘\JǃtÀB?…ZÕØÄnš¼FÒ:T²6Ømæ&.X²+*Õe"jW™{ÑEKõJR’P§0ËråŒàä¹~ì6h”C\ç­fŠ~&Õ-]“ÑgmÎQD0å ¿4Ážú•%)AK‰×y²Ô\ I‹RJÈ™´ëýR­ œ$Ü)$!…64‹½ÙFÊVÔùeÂÔl#ëÝêÜbá¹Q#1GdÆéKQ÷£<‹1C&å¶’PüغÌU¹ÉSñÓ2ïêæNîT_ª›î£Úz£‰ãSM Ò¥Žô¸Ã½++!öym4`¤/)ƒ£ŠîÉÆ¬Æ«æ"“M])ŠÍƒ´½B¹FËV¹uÍÌ5+z*ÙèfÒfñJÉ3ë1¿~E£–#äâY±™‰ËÓÓF[ŸÌ+(–1޶%&¶G!}î+ùrÂDZ«.>Ñ"Ï(ÈÖĘ“‘TÙªƒ“H[ glÏŸ} ¸6=5R­*r0ÍcQk‚Ù‘5x³8§`ã7Ø‚n‡E¡Ë©ÞÕ̉Øj|¢é+;«ªû×A„S%änZ©j%,Ûœ+ŠÅ±m£Ôc=Dã-*.ãmT§ S¸êp‡i;GI7| F!0ˆ”­e6?›Î.hŠÒˆýqN@—«ÃÈhµ’AW…ñ„-Ε*zëõÚ+¹AŠQ»­T¸–LýîÝaÜ;¡9,±:4™ŠE'’wž¯FšS tá­¤.R]æ:.œwé«™2YÙYFdG³Y&vP™^³£”ˆŒfS’§?‹Yú?X«Uø…yL³-ë->Ê\* pÎ^¹„4©üçá©™BjÍtK!H‚P²8ܹ “ŒRyÔ*jÒŒZ-¨ÌªÈ«ŠýÅjÝšI7Ê_w [¥ƒuúRÌÌõYŸ¿3ã‚eh¯ëÞ…Ë’«/­J¬v»V»§[ˆ\G > wþß ­«Üµ= ËzZ•ê´Ë÷)Ž f‚s\ƒR{àliŠWT_úÅWgJb.ò!‘)dЄ£Òfä&ê–ŽÓ•~Šd®¦>„úr.ê©Kq–!îK¯øß}+ÜŽæ(¥9¾&Ûdˬ¯Y¤Ëûs™8õ"'7ˆLÞRsv²òÓ÷vÄf4BujU]z·’J}C4¬:,µf'Ð^.ìUü, ÜRœ›¥7#Qn®;áZ®ÉÔ%Ós¨Íç£V픉’7§­ÆËã÷Ò™®f±t2Ð…A 0š¨sU"i‰¦Óeî@±ûgOªŽGÂ(÷ÊLõºCëú)yÉqµ¨)Jõ|À˜–ô²šBœó b ¥„éO˜™.f&Èo¢ q8Fö’C“Óè>J ¶8ÇÔR¸ûjñ.¶¢Eë)Ðn–D0ÛLVÃ]£Ù¹>É2’DÚhÒ£kRbì…„F5ô™ßÌe©Ô†c;È&&Õ*´=›P­‚#kˆëÒ‹"þžÅ˜»í¥ôÜþRJGÇáÉVÞO½¬ì]ì/S ý+ÊôwwS28‹¡‚*ªÈf¡±iq6§±ïA-}¸3¯ìR/q¾M“xç7æ;.³û”FnºïïU‰p¤Ü3¬˜×|¥Ý}=®¥9ÊC),«¦Ö«óf>È[»¶<˜•vªÚrbu?pˆsP„©äT+ȉÜÔmJUéÏöåé ’*·R™YÒÉÝ–IÓÉ[žG®“Û>R9 vVzãcç·~²ö:ÑæS@ †.Zƒ®j›D¹TuçÒûRCÈÆŠLDÌSPm~ILëBå §Dßn•9l•º8¥‘ Íê)z¼•š¥8‡ªiY9®¾³æ×1p«TÌ# W·O!%6H_ÒÛélÛFòë.ouF\!(’$Èë¬_ÁnÄ‘¥D«UÛ9jÚ)t‘p•¡Ÿ‹T3T„;ÎÂ8÷jŽõ)ªÖöó,­U¾nY/Û~$üîRäG% ‘M¡JTËuQŠ#QrF!Iè‘ÓØú[DÎ-ßEX«!G N&Tl—mSûGiÕ<² ßGYK†~ÍID(Uï‰Äç4ÌÚ^Õª|Ìr‘ö¡q?jJŠ,¨Ð…ó­Îõ÷ß–¢SÅAÊó”Ü.õr&[ª›ÚäOL1Ȫb,åÂé×鬞@¬‚aZ¥Öìê–¢RˆsëÔ&£oqNrE €Ž*YÝ¥å]ÐÜÜa× @å+Ê6É_’¶\µ˜’>ã*š‹Ùµ¾iIÊb. %Y­B´„´©Êâ%Ǫu+qväTw#­-£èÕšN›‘]±œvçíA(lÌrÖíYZ¡IDË¥Ÿ×îºÂÙmcËï+éí¸k.ÈÕ…‡+Q•Vø»qñzä£|«r3jïTZ?öã." ÁEÆÕ¿&ÒÔB©S6Å‘«ÍJ)ˆ)±‰\)Ì¢Œ¡­D”j3b9|ø3U>÷ï½uªÞJ¦u̲³ÿøÉ˜Ã´œN~×?Â_ÑÏã7ï÷ûU´-ür˜ŠgÍjt3á…9Û³R©çÊ•M«*¬¸´«ÄÕ}¡è¶±µwñ-›J§«f‹u'Õ¶I È÷51è+•YÈEBu)©å'˜¡ Rno*¡rµ³±ÈB1 dÖ£áY‘½v‰ïsäâ©M5%N¹û7vz[è¨å÷—™DŸ2úfc ÆG-UögÙuÓÂÌþ*ˆ)B¦qþ´ÏZY]l„Ê"¿†Ây¬ß„ã0ŸýqW dtÉ®Y ¬k’Ä2þ×Ù K_JÁÛír±’¸g „¸ZéQåc*ë­Îöé$Î"ÅCUÐgT®r“<øc©U4„)Sk?iªÂxË|ûxGÂV• E5ûÌþ„QT¢‹‹‰Í¦¥…V¹æ)Êõ7!ÑåúéØq„LfzµÕÑäãvÔæ ¹ËÑÆ‰‚v¸…E/Yܨ¨ 4TDb/S£ÆlC¯ œFåà\*pÇjFûGÆõ¬Üaz”ÁÒap%w„¬m„삉J%¦ _îG3^&³Ó¹J´dJ5ؘF¿ó°’™q E´³‰y—åÍ4{ Ϙ<$ PYNÛ¸½¼±Ý× :¸é£‰FAúû¸I”lñ¸!U…¼÷@L HÄÀŠ‘çBp„3VUÄЈ‰ œÅëù-¢ªˆ% ÊxT…üÉF¤;9ˆÁÿÿŽKÐÊt :â KpZÁYˆæP5¤1PÇQº©ÙÂæÒ-gdt9ŠBiûKQeíÐr UÇnÑŸP3aŒ®'#d‡ÁГ†&a„d·«!ÈÅiRØšB^BnG…ÆH2‘Ž$q³#©X8¹ò§­»ÁG‡ýæíXÄ!0еƒ&¬Q 2A%Á4(Ê' L„0‚Ê1&+”1‹Óˆí”®Qƒ3v‹xCÚt|ö„Øät~èîŒfC$ÈFh‰ò¡á†dÔÀ¿ž#¡ÔáØd Œºâ)TáD†J«\I|Df0£2±¯^‘1(‚=/`¥´ÜA=@Õ[x"5œØÈlTŒ7«áEýÒf¤!чyÜ5-7%Ç=6Q‹¤ÁÈ'\ Ê&¨ÓâÈv¤9|ÁœlÆ&«Ž‚l$ä¤ÈO%ãv"Öxâç£`Æ3¾¤<BÖ]¬1‘x…!™"„¨Aœà§®1½ŠÂAp Û’U¸hÒÕšÃДažGPGUUDpJNz:ò=CˆÃj³ù³ü!ƒ†éhÎ…c!qXv#;´'‘4€Q¸ˆ˜Åa4\TlØÈA!XÕvŠq¡ØµHÁhˆHŸ-2H¸Â‰"p6\Æ¡Ž(¿Š$ÈuмîQòñªAD¡*¦)úx23& Ð "&p I%Š0ÄèÛ9tv3±È#¸åg­õ0C(B/ü«ÒVu+1´áÁÅ{á ™‰Å4#è,!RCQ“ª2Då* ` ~LÄ(¤ à ³¾NE®‰cỌß1ÈÜÌ ¡DÖ#÷ªÐ±óÆj&"³Ã’84‚`‚xÌdˆ¤´†„¿8Îaü‡&$U1¬EMŽ9Õ±¡ˆœ}f:8¯4n¤Pâ‚—\ „^)· wS0_ÍT+Let)ìËMêH€ƒ¾b<à„dpHÒñ`„‘¹KéÊ!LŒ"Ô*¾eÓ>A ÉþÖ¶#Ì"º!ÃJàª4„áxÈ %RŸz‡W c§™ £§‚Uîä‚<3ˆ@…Újy‚ŒZ ÕÆæ02?#±8R:eAŒ‡&ÑÏÃ#=*„ª)‡ `Æ'ª3ؤ! cÁ•Ò †q­1Œ—öãrª1#(ü(q‚­Ü2b1SšîJ(”A·\bƒ·c¿ÏãC Br¢ÉqðZB53h21Ô$!³ì(ÌD—¨&>Ñ^néŽCáý#ºIš@ÁMST˜…D ™ôç ^KÈŽƒJ7IP3™Ùä7ÃXÔîN5¹áä+Ì») î‡Ôñ1†¨ œ1 ø°‡:!Fˆ]&ËEù ÆÄÃ;e…š ‘îv À•ÈB‰…Nä)špÕ âsó¡]MOGt`u=鸄!'b•=:¥T”ÆmKHV'ag‚ f@f4¤!Žx& 'Ä%4â<$¡ŽÙðʧW-‚Œ¥½Æ*´„F4" 2Ë†Ž°ÿˆån¡œ`E gÆsU8Nf0Ì(Š!¹ªŠ![$rà³”E«zÅtï…y 10fXeã\ÉFÄ„Wiª FbÆ»×eŠp†>ŠŒnâ10‚G§hÆ6"¦Ù¥2þ)0 Œó”;s7´\ê$Êj¡”¹å©×°C˜ƒ(—ѨÊõÅ9Ù¸`ØM1=1Ì] †rr\fÅ ´Ùš!z]r•q”ú;[X ´C„†eäæð Fe-ÐÁ –¥ö(§z•!E‘ 6ŽBŽ„!Æp„áL@“æè†¼^§mU±Vƒ”¤JÁ ‚¬B#ÎÅ:”Êâ†r ˜Æª¾”žFÈŽdRffk„N‘q…¡ÜÉåø¶(¨®#“`§§ Ø­ðGÍïb¡ ƒ •°¨ÎM˜„&3Ì +*ôHXs)Ûc)¯Eô E3ˆ”Ä‚Â8 NU}„(LR©\}̵:b£Åf3ä¯Y|ŠAœŒJ" H£°¿© ‚3 0%Š›¡ † DÑ¢\©jpÕXãx@ŠÓàýh‡Å* („æD‰ìJP„+G#Ò)D®|ŽŽÙÕ3í3ñôo÷Óû{ÿl‚Ð0‚ÃË­£±òŸ½³q¢W¸ïkÊ s SVÞAO‰½ô¯¯…K–Z%W̆Y•ΰ‚ Q«[q1¤÷Ô®ß^j%ˆ×Nâ?‰LH‡Mô0¢² `écßË=)Y8Íb«S”Ø”Óri¾µäø‡¼·å¥9Þ½TF÷¬¥SJD½+2Óæ‘‰¦0Æ) QÔLµ¹96©dkLAÐÁŒŒ-ç–5x”½*ƒ3±…‚y.î:×jc£GUkÏJ#U2ƒg»r$ä3Ú_>³ V.£¦—D/ª¦†“U>n"ógÙTEŽ+ѨE\ä7w¶‹(€â„FìuÉ©âqå:£‰ò^»ÈL§õÉ“<áMnAßRWÖÈ£rÎ*³d†ÃêÐq,]D „8ʬ#MÇ%oäÂ࢘Ì!­HQ¡íÏKÂÿ¿Ì™¥‘¨QÙ®OkS ëÏã~Ó<ˆùNܲ ë#•¸–^Ö,ˆÛg;pÈwͬC~Mèi5… ]&#¶}9Xi©ÞBuXd*y’§ĵÌn;ÝjåûZê秨¦^žÈk WSQÑqJ0Ëû«Sw Ž_+˜„*â˱:¶(óÓg"Vs˜u°DI0›žÎZQ»Ÿù¹1ªÏÒVTâ ¥JYÊ™Ç)<œ‰R‰D‘r‹‚YòBgê÷eNøDÍrg>ìKRò1•QŠ}p£±o—cן5Y‹­óŒ‰[w60¢%KF!Þ„wN2êEå*ÑR¬Ó3#ãˆó Ë?Òø™¤iPGäo¡~“×™tå –DZyv¸xܼVÏ"”­9Ì—J•pÃêLmæ«û‘,¹WÌ|½Õµ)”þn-šøÜÚöî)…3!†2Kk_pøG:Øä èR‘³&ÚíÓÖ§B6ÊauÂ>^&lÅ— Ïb=X¦E®V[Q¥5=X™£•[E‰Y.é[Ðc™¶Ýå2\˜Y¢C`ÔórFS¹Â C ¼N+ûÐù¹E ºÂ‘jÚÞ¾ú¬»ûOëyæm+ÄlÔbsg˜Â&fØÌAËd]“ÍôÒz§:PGøO=)˜"¹J8Qh+™¯ÿ^þýE¡I’ †w¤ÛSré™TV¯ÓÆ!Oåb1~¤K=ÓmÏ[5ºl+,Ûœ¬¬#ùħ!Ѳ½êæUILbíæw.ÏÖê[}T¥/çêrPû¤¢oæJµD•N™Dº¨0²i±²F\iê&Ï! ˜‚{h‰â8ª¢IóˆSÂôÙôËŠÇRYjyšÎ?CVÚ‹Q&WìØ„.)O¢ç•^¨sÛ½©Íû¨ý×?#…+¥„y‰Ю0Ì‚yQÕ4‹GÅ'%•“-X8Š¡¦R³îPG3KÂóˆô:Ôì!VÝ+·"­Ë®^5Èÿ>­›³”ägæU¦T¤óÚÕÿDÃnç:JäpÄuj­‹ý¦&^ÍA#© Ò!S _¥eÊo !­Ö¦u³Èiˆ!Þs és«'Mm‘Ù³d¡ª•Òú×DÜC5Ê#áŒ:Rõ”\ž~K™ÈB2Î ŽÅD\ëÅÌǾ}—×j“Kc3ŒÃ•ÆqJr[ÒªôËúßÄ+eyZÄa¹ÕÏ"k“ ‘DuL94¿­Ì$I"l¢…jà«!Z†àc9‘™È  nÄ8ÉP­Y‘yËÌåAYÌ[ ­‚¡QÃÑÚs a£@Œ ”_ QXhxRíY‘<:q0Ä£ÃRÐU{°B¢æ1 JA<£¬SC#\)^¸®Ñs™e("“3¢,Í‚ ÁÉûÐÖ† cø6ç œ.(”3ú7Eå(qyÒ)•(˜!•9¦T-ݬ42¡È×lž-~l~©™mÀÎ# GÆ3aÌÀÜXH5åÁùs¨ñ) ŒjÁÊ_­F´4f'ãbâÁêÒl¦1éP"/Bâ¸^V!eAêA†³¯ÌÐêFV¹2¹LH.ûÖ &3Oé… œˆb2PÜ AL‰ÊÊ’B''WÿdÂ`Ò’*2,ô0Å¡„*˜ÍŠ¥T+ä"kNέ•DZ¢†(Ï9‹Û±^nÒaˆ0qŽÂB>îËά@ƒB, ^ã;RX<+^Û79Ä(!±Ou2]Ì}„d£¢¸ôR æFÂ(†¢‹cvê„Q0ÀB;÷Oh™¢$ÉL"£yßì*º8C‡Ô‰ø$`B …&b¿ÕM‰0vµÑ©ŠäàD!0´±é©0"!seáHHë¨e"œsÄ&½iHtƒ!f!uÂ$ ·>3 H{°ò_QpZÃPgg$;p…•ü¾™™õôz(ÎõÙÝJÐwRî©n&#;Y{ôæôf9o%˜ú‰Öu\jħÿ·¶7j)5EQZ©{c»>-URç!ÉÎfC×èiZÉOo*ËëG>Õ0×Þ\Æ¢”LQˆ!¯ˆ¾Z³J‡ß™*¥™}2Êl¿NÕ-î–‘ŒŠ*r%ŒTuJ4ŠÜ|1h^vÌñ mñqDI3pŒÄ×­]-9"Ý®gûŸP„¤Jo5È&_7e¤› | O=Äks«Fç¢jû‘Œj˜UJ: éq¤CˆÕdÅîÉ1u»¤jé¨Öê/œ²)!WyLù¤>׈±tK¼‰ÊŠûBç]«µ¹²Hfa8¢©}åUemI‰¥;¯_†h˜ÖÁܺ 8gtž þG5[ÏO¬?]áV‹ºx°¼èøœ_³#Mª"~9‹õ@Çv3uªŒÌßrᜊ´ßožH˜S§^—(Fö®[mYÅ’(p‚Ü€V„›Ê°óÛW²)܉‰º)xþÆËu©åÞIJV@Ά›9Åbfï÷Ñ\jL±ŽrŒPå9c^“(åV––‘_οù€hx0ˆ d Þ ‡ /BA$§Ø0ï ƒ9.n'Ì+kooëç*6ß©†¦ô¢ö‚9’d‡§Æ!Þ¶Úáv^Z‘d¥û]l}£„0 !)4€£x}—~7jX"“<@ŠGv’²ì°JåŠjÍ„%¿Ã»(‚‘oqŒ0,h 8!åÉ\~ñ”žÞÐ8ÀLa!'èˆ+›ÂwzJ<]õ¤Ä¬Ú®Ü!Õ,„—2Ä“W-5F"¸ÑÿøÉ˜Ãµ›Nÿÿ›¿Õ¿ï?ùÿþ?ÿ¾'´Å!”Xêòg™ gÍF`„1^7##T ä/G&dv£™¸…Á]KX¦RðåpJÆö”DæÈß ü˜L@¦9Ìnˆ/Ì ƒ!é_¦D0 ê@ñƒ1ˆŒé…8ê§#±sç8«¨Õ®9u˜¸Š‚ #- F0† …ÒBñ蛢˜ñ£Š§!H‚~Dv¬nFãDAž™(oDPÌpÅ›ð“—Ò©c½×Ï«éø?"Б†q:€ä)Ȇ¤v*Ý21ˆæå&¨G B"ŠÈC #=`ÏpBªÌùΖ6P©ÎJ¥””Šh†ñù 0DF ˆofB`…¤/ ¥ÅÊxLõx±L+¦FeN§`„¦¨øLÍiœž}¨BÈT/¥q&FT3ŽWÅ ˆ¨án`…ˆ*æ2¡Ú»Îü{Q2£*--NC0…0Œ› • #„N&D°y´ÑBËTÿ§¦îaÒöj8ŠÈB6li™ *ƒ/4@¾¨ÄnAJ>k«?ýŽ=•¡ Ž™C´áF OòÖÈd61”Žˆø‡{i°.„apw”¦r+UQQhCœA“È)›òÆÄµÄjJ†rQz ŒCpc‰&â¡‹„ÊCÄ;ô1L…‡w\¬ ÓĦոN1€ŠÎPÄ`†Z1 „ÁúE*Œ·”8÷8'áȪņ¡V© 6N @MÄp^€a }$Ž`.¡°W«!3Žšœæˆ±\y"’ÃØ¢©Ï3#‘'7íЋ“†ÄÈ1Ä5Á¨3œb"^ú˜ïOI"¼Tª/¢çªŠ †' é(Ù„äCEbáa& Îüˆ0à ¦=pä!B0‰QXRª³h Ë…An²!†3V¡¯Ì ŒÃ^mÄÊ.û ÖU5SKRuäAXŽ&ˆ®Æ& àŠçØtÂ0£Ó˜¿d|¤¨0–£PnŽxtCq”eb+¹üéB´¦C²¬„ª%J6þG ”l¥|§1½"jÂŽçá»g./fÆ• H óL1  ðÀ+%ƒ$±NJb’œµ`æÉÑ'Ø[ë,ÎYÙŒHæ!H‹¾†1Š“ƒFjÖx„@Ô6&µO³„&ˆjõøS5 èथGuGd0^â…WF€Ý=;!:уXè†0€%õýíc(4]ui+z¸KCK훌ògg[‚h¥Ä#1á„FÉh&›ÐÃ@ŠBÊÑ‚(ýUüü*››€ ô“MÑ*ªF6%úv‚G*yGôâ`L2'aªø@‰•ò„àíR˰€¢;q;á¸Ç³È„(' Ì r f`Ä_Lr³ƒ#S)ÔT#èî;${Žì`–æ„: è@&Ã"Á„A‹¯bQ²üx"rzš$(UqvDÓ¨ÎÕ‡§t·‰ ˆAÉ_¦Bè{nH€Ž¦5LBËØ”&ÐYÆa<”E1^Ð{s(C" %8ÏÔF‡1CÕÁáx;Ü ¼%!’À|î Ï¢ÁŒa$HsBn%£/1M ÄL|Pµ´L2â¦ÈœB°Â#íz-”Ï‹G_úŽW<&!ñÎ/œ% jI ®€†M˜1%àÒW…L!!H½ W³t D¨a‚!Z¸s+à ¤ cˆêär Ø|Ä3V±ö›¥¸©@È4 "A ¶Þ IÎ hTªjÝxáÄTBàÔ2ˆRß•ÈOHìY™ÁÔ9Î*ñ2ŠQÐâ9rˆLÜdpA†ÔÊ ÄLÎ0ˆ ÷ d`285u¡ÎÇeæ¥fÙX±0®QÊ[HFvMA7XG¹­?+g Ò×3šîB˜'Ær¨Ã}˜Â ‚8päÁ%ÝBs²Óƒ¬qyLªidVŒH€»Rƒ?-pŒ#DRU¥ÄD¥¥¸.ØÙ¡E383 ¸18 ,Ð@¦Pj?Gˆ& Pã*W8WG5Œƒ @‚“1ê¤23” ÉÁ".ÀÙýP+9 œ÷átüêäVgœvLÔÄ5 … ºP€EðsBQÌŒ1…+•«(žC<0ÁpÐGuűŒ¢´¢„쬬¢ ë¸DÎIˆÜ¼æê@Aq3§Ý0E:äëà@LÐ: ¡@Ó@£ãñ•~\ ŠMû³“QoQ|ÖjXõ[a:®V3:×隦B£œû¤U\DÓ+S¬Iˆ¿ÆF«Ód"ÑèRÃ*ÓÓ v0¦Í•så¾..¤ßür3­³[c… Ƭ‡IS0Ç*®¢Ê’5Xè\SjvjQ‰O̧}}‚}úþ…À€`òYÉ’Ë“ówüpi¼˜ Ãø %ic[-ÒGŸÙ®²”sÊWò’ÊËflÉ]‹¹¥ìsu•·W‰м¨íêÄ ‚8 ¢ÀÕ1Œw‘În©„§I¿o>»Å.õ3¦ñj*¥Ï¢WÆ8‚¤1h¦!QÒ¤ªËƒÉ3â’"öÎg¨sô¾JÅ À°°jJSbŠp]1³¿4JÍZí¤Ü8k‰wµõL"ÈÊ–¯SÈ#»¸Å_£íbÂŽ%©Zõ<Ó°¨Ó˜Â¶`5Âph²ðe•#ÍKç/¨GŸdh‰(ňŸ5>‚QpCó­ÍµT¤%s«HÞ±ª…+‘"ÈÛaDõ2‘Z¢[—HÕ3"Uþ'8 ÐX€ Z*Í ¢&…H¯ê´pÀáT]ôDáWÌQ„<ìX²äï½ I‘a›É%ÐY!ñYäk…Xã¢Ô‘ ø¾»g70‚¡ò!´l¶û©Äå=G‘×ù´}¬I­B)M*­šÆ®¼C¥ÎìÅh‹º»Ä´„@‚úJZ4'*’ɉ…:‘L3†¶§=d",ÄYxmf«å'ª9ÍÙ4“–ö‹¿Ž©*+m¬BÕ¨ƒ&„sŒñ¤³Mµ ¦¿tQžÃÞ^“9KºŠf’¦¡áf!¸R˜ÍiV­_ªû'Î#|›äÜÕ6eKŠòÈsTsFJ᎖k G%ÖË7Omšäh) 9˜y¡!e˜Q§mB…pàQ³å#aÜ«‰®\z=&ño5\A*ŽNÐÜLÂÝטd¢HJѤ6ÔÆËÑ,#Â’b<Æ»8à”L¿hÁ ä–o3ÃF”ª¶¡ÇΓbUìN¼Ðž%+'EDœf_iO ¬¨îV4G/‰t=IJ%Šá ß2„|¨ã·_ÃDž¦ ˜eCËâèH’xVKÔ¥UX,$—Rc½\(ÂN†4É•M·bO}z¶çÎü·CPBÖ=Ä ¤;zÎ2X™0ñ!º].–ê09 X{ƒË*W(ëõB¼sJ# £ãˆa ã¾õg:{Ì¥®¡°ó‘ß6O®.ôE)©Ê{¬tðÉ MD [³Qc! "I)scVJ̰‚ÌQ¦ÒK©ë=؉A„sŒy´! ,Ŭš·k…I--¥¿Œ¶,¦ÕR‘6ØÛQF䞌8”À²Ý+i©„RB_#=ÚalFY)kÆ–`‚m¿zbÏÒ”ü“•G3³¿6¦÷MaLy[Ç.”ò\®2tÜ+t¾Å^1nJ‹žúu´öÊé*´g˜Šn­M•è%©… Ep  ¼Pizy¼(Yd‡A ª¬c—–ž¿¢9…LµeR-äv²|—kiué“ô˜¹-wÍF¡3×ÞŒív!WÔ%ÀÃŒ p¦¿ÃP’’J=Z©t ²*‡q$½—¸“Jã  4µªð³¹o?Ô–ÿŠÛÅctè'Å1qé0á„PA—Àè'»®‹ ’IÑ!B°áO‹ZD´ˆÆc`“” 0h™ÀCÚÅ›–©M*\KÊÔEƒáĨ˜ÂÇ>¹-:àƒ\ÃNXAvt’Ä£XW¬R„jlQký)ûÆ# 1\“$|V­È˜H¬Ô9JÃŽŸa'cX\bŽ_»[Ôö=^>‰öpËúRXŸ-MÈè_Žú<ŽØy„~J¿Cš!Õ;©ìBŒò¹äó Ö¶I€±AÀË qrד´|y4éSÓúÄêF{°„KRiG©œ—Š åyI—K>¥‘Ô„ BÇ w::6Ö=ÔÑc½äh¶­¡#Ô£<Ò±‹RB†yO‚õJ†SžG»+t²³SÒ¼B’%CñŒ…­’[-Ì4Íb…-:,…wÌù fÁF‰N%²k7ŠÚ.F¾&&Éqª{³ €ç8cG¨©Ó9è#na«åÖ䮉®lA,E©%)îŽÝ‘Ÿ0RW°eU˜L‘¤&Yÿh;À´±fb,QïM—´…•ìG„S(EkQ²Ò¯éU³&‹zYçöÍáXu½‘¤ ËrºT&Òä¥O6äˆõ¤EdµÍ3Q\R4·ì¯p(…¥%9ÎiRY'°æG¨Ìï"äkËXÞA'ƒ$ÉC–›ÉäeEGk%{Q÷iåöG¡PQ¦|«U´åt•q¨]ˆ­Q®=S¯#- ÂÿåBiUTÂ$G˜”¾b?ÈC¨èÂT­ã\¤öJW÷©}™ÃÊN¤•C15ùOf]¢J˜‰V±A„¶D¾Ì8Ê·) Èó[þ…\£ÈÇC¡Ž1Þî®BD+±÷Ïù›|É fù0øª[2ÓóótÌ÷(ÂóE=ÚÆê­™9 ÜÈ-«ê¨)iPP¨n­_$‹Xæ˜OŠÊÄ™^=ù5ÑÝ_R_ ©>¹ÕCܞט´LGXŽWa¸Ù§IXgaÍA8´/d.’™ÎU¨eC™r,ë„­ÅÚÛ$ÛŽ^uVpƒ]ÓùêúÄT+ ïNb§ERÓ*I.ÒGĉs–k)‹ÙwáæJ?‘Ï#¡Ãˆ ý>*õ†y‡˜©3¦=tý =!ï*Š´º`E”ð‹Ý,ÍÎêùäNª³†BЙCRA£¶rÔþ'3UŠèò­f©H1øÍâŠ+ÖN¹:‚ñ, î˜Z˜²êIxoˆbƒqI‡01,˜1f/ù9uš!ù«H—1‰sÈ­Mæ=‘gK!Á ¶éTø!Jôš©F†Ù|7©#ÚF;IU9ðÃ-)}ù7úF"¼8Èa „dåÚ¶e攞µóRÈ¥:*Ú­ÄmV2ÔíÕ¼ÍÄäu%„ D©Ò¦› þñÿøÉˆÃ¶0NSÆýiú8÷ôµów³’mÖï—s×úp†h áâØ9Dšm,,‡e¯ÅI㘌ÔGn?Ë´/¯\V ½ä:oÄådõ–9´Kj^jÚ÷»$ÕŠr£Ñ”älά1MŠ#âØ(ç7xBèmÕòNR Y†â=¥NlÍFªŠùÛèy…b–G12ÔYïM”Rô—¤ývµæû*G*3ÃVÁʹ÷%V^–ô<–˜r>ˆ}¿+ÿK¯1QË(Å(,p‚Ä•]pbßZ…ô\2ð¸4J&v¹å'Ä-J$Ó)’Ÿd<är:zokYc±ËH–÷‘Euòéæ+v²èéý ˆ’9ÃŒ"k1XOAú²Ÿk“jäLϤšâÑT«²2ZJ˜jÌ—ÞÓªO;–®²¥Æ4­bWMrEsÅ´P‹Mé Ûä<–¹Öä¸Ê¨Q3ûôx“rOa:”* aÙ“ÑËí½Üâ¦iªBñ±+J¤­±tdÒ"i!T`¢|J]$Æ*œšJ šòQëX±îà-ÊgWz JZ«cW¤Š·¸¬v‚ ´ß"æXUÇ©usJ|òIhù;šuå5—yš¦•yOBq)•ÉÜøJ;¿»1õ>«ƒ4ˆ£ öûˆ†®?_TËÑHr™éÛYÚ›û¦Ö¶Iò~7{ŽWb0Œ†_¼ÂŠ×¶–c Jì’ñÒg÷ûÿP¦VÏ×½gìAÚì«cЃÊÂzËB\0ª;X«ýBiO;‰t}ç˜V±ÎéF(Ô¼b§"/‡üúŸ1wÁu d)µ £~º]E+n奎ÎsåV§&W»tØ6ºyj®ŽÆr/‘Ds˜B CLGì’!ì˜sâ–æo!õkcç&+ëý;É¿Æâ¼…R)*´QEh…0a(]rò¼‹C:к.£ñ'å µãD3JÇ2ÐCEÔôfw·:ËãæÒź2 ›·õ»'è{"&"y¤„(2ææ˜_ªˆÂ?.òün¬È¹„FjüV³>iIìbŒ”]öåVt&•ìíü¢ÿ£ã½—v‹Ô"m«Ôt†A$&éóå92Ýy¾¾cÕqM­IR‰ì*̪Åh¬2=ÉÈJ‰âäÅÇ Ì¢2.+ªîäèw%ëÌŸ¯+'ò£Å×oBsÄšjûžGF{,ùd)Ä"˜QÌp¢N§f2›¬ÛÏé%vÿF0¥µ–NI֤צ(Õî$ü¢ìÂ(¥ú QJ»yI#b>>´Ée°Ì+‰\0Å ‹´Þ(»J¤·ËÝXªŠÒ>ÓôIñF~ü3Õˆu11ËžÂäªé:ïW®qpCPnÿJÔ÷&Y%Fà QÎÛ7NBµLÚÞ”7{PBâ®®ÏÍÓ+Ó(Ms˜MaþÔGÔ¤iŒa‡œØ)¨Ë|›„=2Onô¢ÝB= õ°Ÿ/p´.E-—²jIc°wÍn+ò·ëÉêjX]û–¡q_Eä»Ð¥e:”¿­³u¹6“Z$† èt¾ˆ‚‘VWå%Iî·'Oôù«Â(ó:¼- Õg+ ƒe7l²kÜ+&B#-ÒyxzKm¼\³a{ˆQI’ 8•LŠy™‚6œTŠ.Èñ ¥¢QÛ±Y—L †Ä7ðŸzJ3‹×!ÅÚú¥ ¤zþkú˜šÔ‘ÝW(•Î-üÏc!%y‡`€@¡‹… E¥\µäò럔l½Õik¾Ä“"=æA-$¶b¸íž}ÓÒQ Fy™­Äy‘¬m#È!lß™NGòDAPV1‚‡Jv¦pj$´¦Ò[RϘeÑ;ÜHS'±ÑÍÊ2?–„ûr¡Œr3­ûÓ¬É]®³ô›!˯„#ÊG –c—U.\ö|ô¹‰#”Ê'^ª‹%¼ºÎJ"ô£©K´3ðšÎF9\V÷¦îÐÿBTBÈßß'Ý©ëÓê’#YŠäÅ#ŠAÍÿÎßôëIzLb­t!JìšÅ2uËÍ=Ñ.˜²s§Qårrµ‹½®× ¾J-þ_9÷ê)SYh/9€â,‘ÎËÛŒH‹Fâ\”åcm$Aðo0³¦7X‡!ÃŽQ­ÅZj-tÚuQ&Ú6&®™ô¾ñI´iÓî'#‘+…†*“jË3úaP¶.*&’…º=‹˜É¢z6e""Õe@ŽÏ2‘ùº^?ïËJÙ*L•¤$ÎF9G˜Æ`àq„¶™­û êRÈÙÛôñl&ý*ÔúÓ0ú­ç¹–ª)B žú!0ZÎ!›3Îr™ˆÄbªÈ‹Érd¸Z/–¤Ã“[VG(¤™ÕÚ–g5+rsOad;o BdLÒ™)èTä•rÇ©œ# ¯É×rV¹#m¹Iêb˜ùq©ªD#¶ÓO¨sŠ÷6ΉêB#ûÒêÆª#dJÏËŒcmØâ¿ùe&*Ô W#å¦^±t£LµgÊw9ñò©LZY¸ÊE:œ¨R©ALtƒkv³\I_üö:óùõ¤öOq Q~ÝZaÄ ÁŒ‡¶ú‰©CñߟèÃU±£úBý(ÆVòLþn©ËD ¬"U ´xì1¼UuR_eÛTÿåÔM§ã°³GâºfaM§[Š$gÒ„ÓçW‘„~£{[Ô‰ŒA[[É! SML»4™´TQ„(Œ­ÎŒ…r[稵úÞ‹1tô¢¤äͯˆ/‘3Û$Âlžäw…ªåÄó:«JY΃¦Èj0‡#i̺š!kÂH/jŸw¬O+álºSqPÉç¯FÃÖír #õ@Ȳ«¦4ˆã- ø-ƒÄòŒE™§¾ËZÐFÕ1Bº•Ú2çsPêâ?“nš²|”ì‡ìqÉF!DB©2×]ßÚ‹íÕŠšœ—’øvíÅoLÇ£UpcÄ;ž„¥ÚFV!Ku¡i£·”Y…(Õ-T‚)[}hñ¨Ólàâ‚Ðάèÿ&Û¯Zq¿j'Ób¹‹GÒ)í¬Gõ¡HB¦„<ÆÉ R[ŽôW}bá/—ø”R»aJ¤ Ê&v?ò*Ù÷C‘<ªÍ+* y·nößb ¦2½C•™gU°¥*ä!±æòï3UìøœþYyäìXV鿝ò[­V:êàª8Ã!w–j/k© ¸RºÎA u£7•ÛÕrå)ËTb·!n È2øB]rŸNqjC]srZ¹s'n;\©ØÞZ=Õ\Ê"È´ZpòÇ’Ã:-˜êYTüµþˆÿ^¾¿èßùçÿü›h@* 0ñVä/· ï¸ ×ð¬"–ªM3Ñ)ÄD#Ë%]y¹Š!ÒkO·kuxd+—”ª.iªÌ+â¥Ò­…¢#öϸREÔÛd÷ܧŠÓ–ÎäBŸ)T­bŠW&õJeÂQÌ3¢Su’š™!Q55v—›ëB lÕ9þøá¼d³?=JB»í6Šþ:JÈ"áž•êh™V¹=¿û·;u8ÉK%qûâêŠê\¾²ék#¼CrõÓÆ2]ÛìqQ0µå¡p‹‡Cbdt±ž¶D²›½£VbÙMúµv\Ò§ÙhOenÊIzÐAÞMc2Ú–K«’Ld”«VÄ-Ö„ ji‘§¾Æ!©!FN©”D÷E‘„EZ‘ø™YHZÉI–ÆÑ¿è¸ÖÏb+ëaY„Íñ›Cº^ò+@Ñã B À\8°ðE Œa&¢¦2Œ#6$6"En!Ü*DPÉðB B…éez‘3ŒÕL]È1¹1¹LÃ<+/ïWF +¢v¡TÎ!JÌ"ùD-ªðìQº1DÔliFêu €@DG^àŠ¸£6d ŽÞs´#‘Ö‡…!U„$Pª1ƒÿ A0$vአ="Tv´`1Ìñ²S“F ¨W¥Q†Ü\tlEцd8Üt¨œ0´»0€ˆ!g±¬â壂OÖóŽ ü/±)÷奛(K]¦B;D4G!©€ƒ!‡H¤ BåSÞL¬Ý’UèâsÂ`HAÉ3©÷Õ˜¨‘L+ f ˆ È`røÉKL2„X@GôA3N3ÊžàN åA®È——[R¦ 1`YŠëÑ6*¹Jlg©!«¨vF¥€¨Q’±y2‚ŒVAgâ£ÑÙ‚EŠ%Í æ&¹PŠÅ&ÁÈëmÍ‹y‡ç:ˆ†¦{È ¾‚"¢‚±FÁ+D"—S¦#®=ÔLàâñ°bâŒ@‹ pM ÉBjj‚ê]Œ¹ÕBeCÑò0>ìûå ¤Kè%Î)|tÇæu [¢øg$ç0H&@ ˆˆ!„y>:±Ø„ýrGup¸sPPZ鈪r©(DCÆA#æJ L‚.á q•C(BEw¨Èq0’R"¾v)°y»#—KèS¢nÊa;nÀ†2ÊA™óa¾]éQ¼N“­w† ~^Ü”þ ØØX¬à…64%Ü·‘ŒÃ9ÓÚƒb؃"™âb…) VÑÈ-è!ùøª`âeëh$ËÄPæs6”'Å5&Ð2ÎQª059Íšº®ª d/¶"LJ̦1¹ŽË„Uçá2˜>’e䨒’`›h3)„S| ÐRJeÄ;zrâ›ãàøÙ†‚# Ú¢Ê"€CLJuÇRœT60j*‡AÅ¢òH‡9C’äP"‘Ñä„&š…MéŠ3”QÑ×Lj$ƒ‡r±óÂ¥á 2e*"•`Œ2ŒŒ^0fp"pBÛ—joHÿŽëoSJ\5mUÕÉØlKm¾fR¬êFÖÔÔJŠï*\Êá"•nÕz!sL½C£»“;h\Kmízo“({ý ”Ù ÕéW8‚7”ËÚÂ*@¤±×°ØŒ»QÛñ ÑüTâàìÒSŽ?|Bš0í³¸ÿURuŽ"UŠëŸ’-7±Âw‘=P¥±¾®‰¢¥ÓNTÒ¡ Žu"Ñ{+EV»jwž†åBýu²ZÉ£”ªªèr3b£”OÍô«Èz©k\džÃ.SB¦[}J”§ê§ê;>ˆ¤© ý‚¡¼ÌY¨]&d¢*µ×ëf##Q6¤:”èžüv×!Q F³lÖ³]Ï8ŽÜwÞU¶«v±\‰E3WS_þéÂm”Ž‚kPõÙº§qPN¥2QH]S½v‚‰kÊ„8ÂÞª!|@ŠRo,•¥-G25]Oòq?6È„ö­?“ʾZœj•¾d"ˆT„M+˜SÐS·gJZPÄ#õäßÑjÙš¦õ,¤Ý“xÔw¨Å;áv7¸R¤Œ× †¿7;ú?rHª„gß ŽÔ[!Ž#ªÐ£S%Vò"^mLÚ¡Ôö—oÝë!Þ1˜E%Õås"ŽR©ç±djb?élœŸª¹_[O~= §§+óboHÒ”Ž*9¤Fù] eˆK|Âã0‡‘T§î}SÙ9zŽÆhˆŠGËo¦wñ;·$C]ˆéŒCæiÈ™Ä(žQÎTÒ‰C÷faVC‘”˜m>H^Si)âW—¼ŒU-»äæWÖBÈF‘¦B ÕLRx‚ðŒ@Œ4…‚g+lÈCŠ[#˜Ñ#4r–¹øŒDã"Ѹ¢#jE‘âË LHøü£ŸZ ˆ vùi‚F1 Q!.€ÔNÃROV®µ>Qñ¢XŠx*b&äQ FÑ)‚Íœì.iñkc ãàQAª!9€–`€˜1ºupdãnªÄŠsÇ÷¥kÜ‚ðëtï‘`@ƒ<ì `‚@`„Ä f(%¤AŠºá†dWÒªLÄÃ+ÒÔ¤6 ¹$XóCVk™!̉Ìf-ì‰ö®!L%nOÚ‹Dñ©Æ©8ˆr¿´­ï Q ÕÑý¥‡…& Cˆ‘:.@˜f¹3^$F­*!~Îd{©ËÕÆvtb“¸XN&Ízšã`ÃP…j!¦E ßœvù•×!R5`GÍHt¥%213^(Ÿâ~5y!ÞNŽ]Å`È ‹g7V1Àf .Jæ´R ÃŒyCÄCÁÑuq^Ýh’SZ˜†3cDZÆ5d¹Ü¡wªÙ>ÞÕpèx…”FÏpˆb3‰ÃB•HŸñRõ°C\(¡íÉCúì!ÉD½†)â-(àBBG耄dÖ<‰cDHX0\d6ÔSºDøƒqié)+ÖÆÂÎÜ©¢# cEÝjê(J 5»¡ŸÝl`áˆÁº¯v"a¬~§Y‡{ÑØ!²2Ű®ÿøÉ˜Ã·•N.€Ù@IàPXZÆ´}5’`÷sg‰ ÎL†$i‚VS¹¶®BPø«v ÌÔüQÉ„w ho8"T|H ç äØÈP%•×Å£˜1Ø2†v;xÁ‘™únez™Là/žó;kP„;T0A FDô l† CÇPö]̽*(R•h‹ÝC‰ÌˆO‘â8„3Œ0Ho¢²Rbj.ˆÊw!“÷‹¬á‡Dƒ4:ÕLC0ì#¡DÎF¸Ì90â§;w°Îc;‚ÁŒ˜P† ç Š6›4UYxβá9D~5þÁL½Lm¶@ˆ¦xCt)A!%ïÙø¯Ø Š^¢LaÇ`ãE‰Ø#"l±X€Ø ÄæÏH" ‹-Y]J†g)AK`ˆ²‹œ‡ç€ˆ¤AhÀ! †á–)Œ@™é«HÊ1 åX¯Ýܼ¡á:‡ÙURF1qף̌/ÃÑSªo$ùbóGƒøL6o ‰PÆ  ¿“fï2<”¬ÃEèˆôà\›ÕáH€˜ p1cF‚!03Ñ#D°§S—¦‡’V·äj女@RZªŒÃf±EÄh2ÀEhènÜNÌÄ#‘áÔ°Â2+\a“×—JèeQS“>äá̃Ž\§a´ÁεµSº?Á&%A‚âc!ic{>%êˆÁ‰Š þB0=`e¢?GW.„eŽlá)’//è×$ Au¡]±Nµ»µ¸b+}‘Æ„»íC L@¼äõʃ à‡…))‡%=¢A‚‹¶Á”̽§ ~/9/n°® ÐõÝuV§† Ap¨°£ÐáK:xsÁô;;ÞlLƒj‘ «b4I«˜(×Õ!y+°äR‰’XLOPŽ¦ä¡ƒ0@’£ƒ2LQÙN"ônÂnþ—ÁŽëuHíøƒ¡,ÔHÃÂ> ‰"=ÛšG-aq V¤þ3œš4¤Dâ(Ó † Õ5 €©74SGø-’“⇹Ú'Œ Xý ö\Ô‚yœÐDŠ1x&Ãwx¼†óþg °Ž˜Q³ˆ$!Q¼ÈF;3ΨèeVÏÕÌ;¯¯ÇÜÊõ©* Cƒ°%Ð& a(!Q1Cfû£‘ÄŠ˜?ïþ(L¤!B~âFÛ!*qD¾ òHxUS²Û:Î0K $èB0ÙFÎh=Ž"¶CÕvôPÐõ´|Cð‰rϯ@ÆAƒ™ ðF4&y˜èkímIØÅS@s?dSswIÂ<³Ò°E1”!E‰ÒGÊq…I„Å'—g¯˜ÌèEŒFR ȼVËÝ+‚EvªÖ“;<1TG -»´ˆ†RJF”hF¬È¤V½" {B8EvˆõÆe†ÒX«Ø[{†øØÆr1Ѿ#%"GdÙ• çC¾Eeø´Af¶ãGfyi¿ ÎJ‘I‰«U– AÄ^Ÿµ„äTPˆTAŒ90bTeôЩUrÖŽ}EÜÄ{í£#Â8Nœ#ñM“ˆÛ Ü%NܰC“ZZ¬9âÒ'Äš&^ƒ„"Ó¢ Z&.”RDU¥HQ!ÉQ×’:«ªÅC c/RŒQ‰ˆbÜŽ)JUÐsN”‡V D0!¹’;8ÜcK ´›² "b}ŒS³O˜v6.g(k©Ñ7ßeYQ©ÔàÙj¬ dE#ˆù ±òÆo2pDÔ>8Œ˜…c`,e@Á¬ª”fÅÆbã%F:)D!ùœ]Å”W49¶¨¿»eAZ ØŽ|! Ž®A"9Ob%Ãë'ZÜN!Q¬”"D„ñðtˆ©Žîv11áéž`Œ…DBi€`![,&ÀÈ©…26^ýHÍéΤ€AØ'sˆC?tàLdS°lÔDB„% ã2m\SöDµÉTTñšº_”‚2•E5Ñ¥eu<Ç€Ñ;ˆBdá‘"[VÁƒ a³ÁÁ“ ÷wMc!)PŃ«ÌಬÇQ'²dÿnUC)] £@Ä=L1AF9pœ ܺ!y‘Ö4ºÐ fâd°0Â…ÈŒCPtÜB²W@®$AÔ•¨‰e žÑD/ø„b•NC‹†EPª+¢N"I‰wéÌ5\¾ ŽÆó¿ €Ôw8s GWf±ÓC(ŒêâÉy„»-nq>Š;‡üZj‰Ñ`@‰õdV+-ÙyôRµ(ŒÞ—#¢ŒæÛIúbïÓy$zKlŒa^Ÿ\÷¼¾Â,˜äjŹ,Ô#=[F!ü¹1éÚG&©Ew±Q;ªvõ(åÔQ†gµý"%0ž«#OKðÄ1{ZA›3Ó>¢.^•¡D.ù4Íþº©üUCkD+u;YB TöÆ1[bë;áÈK¢Þù!f@Tª3·fV@Ä*OQSä%7v­mÑ…2Eý”0˜öÔÓ.M×Õ)]Ÿ0¬ÈšRo÷²÷¥ÓR\17\T!ù³¢õT+”¸9\9)¼˜äLH™2KJ5—qºcüä%YÌ–#/ˆaÓe¢IqÇÄâŠD.3R©Ë,¼FDµ ÛTŠY?eLk0®uæ§Xã5"W J7òžvÞZw×Wñ(¸¨&0-¨182œ•íÅ:CªGËœ3¯è"³¥ SÙU²óc-(¿ÒeBUAõ£ã­ö¾´=Þ¡S¹î±VÙ½‹{)jT²ÓI¹ÝÂB9®´J…]§­»áÉS£¾¦ëÁ4Ï„VöKº1‚t¼¬Ž!j!æ v†÷IKCš¢é?¿S%˜¼›A’£1Ej. êÄ=ÇsåÄ©?*”*)Ùªˆ¶wbeqÈ%z³RÒ0îÒUZmÍåÖMr# Sy-a¤nB–T#=Z¼©Ã¢ˆ :PüÖ ‹µ­´w8ÿm~¥¯î-Ö¶ÉK6XK9¨–å¯.ûHÒ2}…ø¸T‘ªMÂÑT¯C¡žeŒR…9Ÿäc.v1ýnUÌìO˜µ5¶4¶”²5Jê™’vå‹bë Î1UTg£“‡ú¤Ê!q¿ñœ¼WNäa—ŽH­ReÅbá‹R_ž»Ë+œÊgNdÌúhÛ´'®æˆ›|"ÑüE‘ôF&ZeÓµH×E¯Ö…¢¶írµÉeE«lþèÊMòü†™Œ!jøJßw§b-Yb¡ÚmËøL¯ºX‚œSgQôy ƒšÅoïâá<Â6•¹Ä|g«%šrQësDQªüô¨óTOv,ÄGå=F«e0„L!‡J #f-·J¶© f²…É9c]îο(·%™ãÌâ”ÙÞ¾{±[ofç,¢ï…à¼(E¢òõÏf[“.DYW6ÔÒ!y¾§V•Ô’1ñ`³N¶w‘5žÏœÎK²GFS*Ö[°„)YOçñ(<‹‚•e}ì@²äʪ6j®X¾NÕ›lDÊÌÞ'!9²UvvŒY‘í‘*DÕ"HçyR´öZ¸„äz›• Žè3SËšòPò­QUâ ÅÜÃÊOR]3Ž—a1 38â9•½ä¡í»Bµ„±Ë:P)7E±«cLöH¤I†¨¾”ÉjÌS-õN*ØÌt»ýzÜ,©·t÷j—{H˜ÿ1|sÎ_LÛ¶+b{ˆ¨a¹)¶})<΢¹Œ]FÇöÝwºää«QÂå‹1ó“Ó™hýËÎf»¹MA;I¾ôi…5ι¨´¦£+”•-$C{qõ±Ž–2Hˆ!õÛ¾tiÝNþbS ’þÒWX‹S½‹þ_&SÈ„w^Ê^SÅSg8Z¤iIÌüèE±Ÿ n/fîÒ«²»k–âi¤5å¢é/+ÚG÷5EU i—¦éZÍá±êÙÄÕþQ ³‰Sf´éAI*¶— êʹK'iœBï­Ok7»PµÕ5ß±Ó]yQD6ØôBûUkvYËB7·Í”庼æò,\~Ñ0®äf"~VQʱ ËR{ç ì—QŽB‹ˆ†çù…äÑÛ1l”ªHÙû˜b•äÂÿ¢ŠZ™ÇbnIrcÜ„aœk•)—öš¯p¯*|"6Q&"!ÉéNáùW¬[ºJV^ÿ$ÅDzTê1S”µ¦IüX†j±¹ëbš®ã¨@¨çìåý.6Ù(d¡Ú•dCœõYhZª‰ž-Ì•M*T)  ¸ý $YXÇËr ŸMËßê§9:E­‹ä7½•lŽQdT•,;T¤c³±O(Db–É•ç+ÏË™øÝGÑÇrcEv«ãÑðĘk¦JþÜ©JçÿV¥GB!vÎìMÔûºu¡w>²u0‰dF(¬Å‡‚ô®S¨RªG’Œöø’/(qKJçìŒ=ˆÑöÝÐI€`±°@‹ å):ò,©qÕHoeY϶J…lF'²Žz·2}ˆeF ¾µO”î‰Õû‰^/3ñeEËvȬzô< ðb›¥)‹¡ Ÿ4Èå0R¡¿öÿEõc-‰³K†pÍ!†¤Žts0Òfˆ¦ tjëzøUQ£ÏÂt ³ƒ”˜¼s/F7Ïq) f )“ýª&н¤¨Cùµ‡Ò[P¾©d%œ×#Ü|¥nÇ3 Àˆg¥³Ð](E¨\6Ð^hh,@á˜óŠ+%³L+ŸÏYò<²}‚+eº%gŒ2Ž©¦Lø¬q ]ïg0È+L¶u‘ÇÕbD[›±²6߯\¯%d)DÁ8kд; 0ê(À tHÈdz¯…ƒAi 0/”s …eì!VîC8g`òòiøÊ Ôô¥DÊ-‹¥‘bæ…«e‰EHò¼ékª]ü2ÈXÙ Ç,‚ƒ¢mJ»a;bÀÿ`å#pen)Þ̪Q®øâÆòk'½_dßûÑ„+:RòZ_îæ4D+ÔÊN<æM V +Fšj òÏ À!C{ƒ—ò€Ç²‡vù)¡#[Ô*¨åIñÉeN×}Ä©}»vZ}²ýƒ ž#L!ûŽ‚vÛ_Ò2 Ån ö>˜3ÏÔÓE¢È7=¯+Ðep f]™ù,@’’Aø’˜Z’'q³„2 #X—£nnÜGåórev)2søÖF=•_uM÷±Æâ½Ë2i¤0­Égû~ ¬¢Î00ÅãLëÅO.sß¿3ÅñyÞ&ßÌ|%ÝNùáF%!5ïÿHÁ‚ŒžJI¤,Â`‚bmÚ¢+RPá{Ä\íœ/®J§Nñ¨ësž^´µè°µ¥ –MÆ$Ó§) ‚»JÜ2y¯A1dAh”gÜ‘bÌìK¦ c5ÕW·Â?„B—ºI#Á:3à3xàCÄ“˜úJì³-ß®ãYzG¹VîqZBoK¡jY0kzV)ß 2 ÄS •%äçÄL3ÙôÁ(¹È‰b2‘84[\ʺ‘M*9"¬‚ M&YhR6žèü’Ég¤y¦E¼ŒØôZñÍ”ˆ)vÂŽ#/ÉsiªRFWÿÕ峉Z0¥ð¢Y&I"‡žæžù VHR”ÂÔ£Žû«Ro8Ѳ€ÓÍ`…ý)_îÙÎ FE0åw~tJ–åˆ4‹\>»zÚÖ¡(mÑoûŸ¢¬8PèHZpÑ €¬¼(â…LšŒåž\.AE¦ÒÄÉ–Ä)¬G QG‘d©1S-¯ÇôõÃÑ …ÞÊG/®­QŸ øN)´9¨o¦Ko +G˜ŠÄH„ )K7þµ,)‚ŽïY„§œEë¯Ä ¬_âD’\¼¦ Zr¶¬’O(¯<@¤Ê )øº´2fègv«LqŠa™k.MxÓøpŽ/J@³(qŠ À“T0¿!­.‰åEf\É¥¯<ËWñ­ŠÏ9³wJ„3W­ÏëCŠVÆ ¶ï1CÅ¥~“ D=Œ9˜")àXúðf‘&Z ¸k`¬´wa»Å˜ùóÉÐÅÿøÉˆÃ¸Ný üMû?úù<ùùÎûS³’½º"ïOôðåyHn`óHPA1ÒÁr¦7Îæ$R1SyiÒ1¶¢"u m­%?Ó_ŽÒ>«æ0å ô‚JÈ0pQ^l%ü‘Ä U:‰-6ú݆—²Þ¦¡$Ƚ•A’náŒg<¤¯cÖh8h“öÐåìN+ˆÓÍtRœl4@RÈ®•7Énå®U÷*™¤»ö¦Í ÒN‘±zét}¸‡WŽTWׄä⺠}Þ¨Žú|ë:…Q …H`‰"¦´eìEY†YúÝŸ<׃€T ,-¦â… OÉjH«°°¹aEÁ•-N”8ìˆG‹ÓpéFé„v´€‹VâŠz0äSí…Éw»­ù'Ïò3Fª˜¿GÑ­T¾vè(­ƒË…1ݬÏJ.Z>"äøUwôO¯#—z+aœU Q«Ïµ*m]Pè¢~6Kªj°E1?o)l•„aH0!‚F’wÂ¥®VϺp¥g»”Ÿ1,I)¨Òé2%‰F¡Å£¢QÇ‘nàÌÒsßíæ¦7ЕÒɤB÷%‡IÉW â"° aæ»9>.pqÄ’—¸`F‘£äH’Z‹Þ]›q‚JDE(…A*% ·Ö{ £FÉróÌš·œ_z:Ši& ¬d;röDº„‡±=EÀ 3Ó¬´’¨abˆ Ì e JS# r˜}9{ïIAwÒSÛRÄn@„-8Ú?=Ý—”“—"5(îr“;†N@ˆ„“‰1)1…Žî-üƒ¯+ÞA|V uQ¨`ªÐÄ”±ò{EÙ31Fß–ÓX¥ŠIر3d;œb½÷w˜‰*ÅêCL!¨çï‹c$îú†ÁÃÌF #?óh‡ B5ÿ9ʧ Š¿):Ÿ²×á+ãhy$® s{0*Lh¯aTrŸÁÜî+íøµŠè–‘OGŽ(² åkÝ*µi8J‘ír pÊ$.ÌQÒ9 ¥ä‰OE¢Xòvèsu›0¾Km¸&•'C#3–2súU¯à™&SûOåòÏ”Õ*V:«Ú¡$ur¶+Sâ×ÄêOb F ¼·.aÑk—#»’·¬•âí ¿Å- ³5C&ù<‚·Œ?%¬Ž¹ÔO¡LEKTåqÒEËÖ”¶2ÿ[V´@EþD’µ¢ä Î Qcÿ+iÙ᦬ZÉ¡Tõäý;X#Œ«ì…/ˆšç]ˆ‹‚§*T…¹b ssÍØZ·VÒIz_×$›äºT¢*i~ý®AòW¦ ²^SW¹Ho¶õoO\Õ½Òâíç¬âÇ&•%BU. ¬N) UJLÎ×ä?_vH~¸ƒ7ÒÈ7 Cèçʾ!æq V¨G³ X¥r­g º°¶Ç·þu«”¥9edC-‹RNX…QR„/¾Ú!}…¨ƒ1`¼z÷T@ˆ!¯ßK7(Ë”(ÎLÎN­*¶äŽSˆ]²fy´ÒÛÕ'žfµ…¥8Á @¢<¡„æÉ”êS¨…«ÓhµV¹ùTÔ4ÖdÁI‡Y7ì‹Ï¦Å'#rKœ´=ÌA,¹‹bg—jK¡¥vS÷&b܇w÷×Ô~ݯׯD³Ý%² ¨…"5¹tÄK5‰Ÿ¥¿¡KÙ=”¾ÐŠìK›äÞö®ÿUtàÀ`sZZ‚¸C´"%$þ¦ªy*lžöŠ:`»½Ö£¤V1Ú©Ø" RØ÷F‡#&´þ¾#upÙ’Ê'’B1QBQ0Rzé’Á€B7yU"•dšÓhN¿}¢ÞQ,•‘¤bHJ7¹Ä)^ÄÊ¡dê—õ¶ÌÌfûusË·±9ñ(T„ÂÜÁ"!Õæ+ ‹&W5Xªxó} ß_½¿)ÇaL´!~1l¹§t•¨¨”ïöþ´dÛÀ«``ûBNY½ŠÚ‚ðK~dãGÝ «î&ÒUF)?ÊB ¦˜ç´efˆ  ƒ0˜>¢áÙuSe4äØ^Ð÷½830böhg!é ‡ZUÁ“<½)ý‡ˆqày°A’¾?1‰y∸ÕÁmƒ¸ãpuS…@@„ ”NB)wZ¸Bæ#pÇ&‡Õt‘¹ SNò@ËBnƒ(æ[„1eÈ10J1ÑaQaðF™ø¤*QØë`aƒ%§¼~8P u4æRÝŠÜ#öQãÑJ)à¢!Б6΃ `¼üÀ‚f@´wtâ0±%0@ˆaÐ÷2Q˜!ˆ3°ÇÇPZæLZÄ@ 7 üÕš~bˆt=v•Zœ2r!4cÏ%ñ©¾§ÕF/-rüwä«H ¢°ìQ˜#mrn¿.§*¥ã¤]±¿íä×díáŸÓ»n]=qÊEñ5yÕ5kÎRWŸ+­´¿(ŠG)G{˜µF×ã­YNÖ‘¸n‘_´µ[s Q Æ-í[ù?‰&È’% 3ØN²òýèV.’…´¹2±}-ı ŽV[¥×X·M©3+j1‚0¬•j ‰Ü–æmÞª 8QUÖ͵¿Û ö“ë”qLÕ²åxMajmûû楳T¡Î#ù‘?—ºJPîÅi¾lâXÊÂ+ùÌF]çf6_%Ý–¨¡ŠFæº&©ršù•ÖªÊJêW÷.†.0•9Ž^~•4­VÕ Äî¶ìíÅæ3òÝGÑÛ™(fY«Õ—f5D¶’îf`ˆE8ÎíÜï’ÞµÇwZêÈŽ¨Ò¿©cÝ3/vÔm3”ÉÎ!´š5Õ£ lòˆ‡G²ø¨o¡)OB ΉÈ9RMšj2É1Œ8•Ì­×lêäVçS§ê] N¼„\5zåõ2«&QïGÑÝM·ñHúëÙ#95{»FPÄòˆºÿÜ™âS2Mg+’¢ "ZÅüú{>Ðê†WåJi³ë¢ó’u¯<õ9ƒ&PÅvÞ«±Ÿ†ÞßCëˆaS´#Øw§ 1Žƒ¢iµˆŒ‚MÜM8”PÌMF9%5 m™Ö•9i¾Ò—jÞsy‘èªB—»F"9,»G½¸)çùr„&¦;£šÃ-Já”a„q•®•ñH"[ŸT[Œ´¥0¦ö½OÍŸÑ\­Øâ2áEÇ­ ×FR_iTó9}WŸ„}ëO­h÷]­rYŒ23º‡…Z¸tÅL÷!wïT®*£±…F®ÛÁ OÂUµ*ö|¯”çR,…Gá)14ÅDC䤠•L£PIÞåO ŒÌ‰ÒÛc3G;ö>Y¸MëW›ZžqGÄAKªýúBXËÎ6'P"҅ߣ!i¼“iy„'þäi5im‚¹ÌÊ.W9·é$Úµ)„) !ÌmÍÍÜ·â“xލpÊIKEü%»ÓMãT‰¨++X\©Ht±ów ]¡Ä/¾Ùå-¯n²¢›¸‰¥\£Y×Ë BñXdfbˆÙå¹’ùZ=ßV†0DÞt•/ßæP®.«Ý“ñÌ¥bsUºÞ¯"â\C·:UpzFÂÖ™¸´Q)LÙT÷çÜq c«w±E'æþ—í—%EòÕõ7·{ÜžliÓŒª„Œ¨JörÙ0„¼¸;„gù/Jò§DRˆ„˜EÙ¸ù»„fóÙÝL&7|šÊÆ(¢­Q9;¤åwÇÌêT«Q;´ŸLIYU[Ø…SŸ¢äÞ^V£Ð´×YQHïÖ·¿ˆæo!…#\'­‰Åoªá¼dɬ­¢}2¤u/>9‹ˆZ5ˆºäsšAôÜ1FZ&\ï’=»I)ŒNfâ+»P¬uݵ±üËŒ ‡2¢æQk½‚~“å`…\‘ŠSÓÛÐqÉí§&2Äs2wYÊŒ?Q×Iª# n4åd‰,й-«ö`Œï“¨…E§ –7•¢ŒA˜Žr‘6ÜÞE^–!¤F\lfhÝj]RF¯j ‡j³ÝÝϯøÞ¨ó®ÕOw¹0··_W\ !(•@‡z•‰§Ü¸¢f•nVûI%0ŠZö‹f²Òæs•ËKUÄ¢î•ÞæÕÉ[hþëT¥)ûVR#ñ“ Ok=ˆ]¤–>ÔL]˜í–jNr;/! !‚0çTylf!±…Â9;>E”#z»˜¹Hôû3ª©«–ÞTC­q¸ÜÕP±—uò¾ÕÚWî¶/HÍ“•(îZ6z³PœåµQ(Ra­½‰¥§©Fu¨†§¿ •˜ÈÍš¦Tí~Óé¤(ƒ«$¤c/^´1žÂͦêö}°Í]È©93Ìe[¾¨‡!ˆÌUÝmZj=PåR¢ÕÄ_(Á#¦óL@¦Wåâ±zÔ3„¨#= ÊÁ˜ƒÑ!ˆc'„P@:4A2Hy:Ž|(å á[Ò78ÄÛET ¥ƒÁI‰]¢:Hˆ!£vpCˆUg‚E âò‡!ÂcFòàÚç~!±ªl!†)•1ˆðþ @Œ„&!ÆEÊðùÉÔ–¡Ò“9t[N.¦¤”"„ƒ˜|ÌaÁbôuS3Ì)ýM ƒ¨`3Ž,ÀÔ¦ò‡5¡ N*fŒ(xrl îÄâ@Ä£#ì¤#„ä!ˆMÃ+|XvácÇÜ@èSSDÛ³HçAFBÜ'B÷ƒWÆD!l+@ŽÛŒ&|s 2BòùÇ\(N“ÁÍŠªœfj%P‡sîF¤Q†á Ì$6bÚ>©Ÿœ£Ð ÎÄ(ØÚ~cÍÔrpΕ¯ nD£‡ŠaŽ1‡ìo¹{™8ŸÔ1Ä¡áB,ްâ/0®b è 0‘·hkMZBÅ‘0J&&˜eÔ:—‘ð ØV ¨|(ÍÊ9…X&ZŒ!‹£ȉ¸b8žA°;! %a‚†ÐABÉA`PªÆè…A0Ö—²ý¼û&ZTÑ!ŒØB†+¤­†pâFVJÐã9cÈ qÅ•T*Ȳö`BŒo†£UP¨@‰ GD£  ]¨EOäBòŠ:pI%~Bz^uwáU£‚_\Øà€­¸C²`dÿøÉˆÃ¹N†c?Ø=þ³’]Ùž§˜ó@Óz  †hæ½3WÈdã-òºµÄ#* b”‹D}}Ê}<æQBˆä«-I{D¼ö§QÎ0Ȫ)¡<[ÃOX£ˆ× á "bRJ‰’rk2ŠŽGAG ‡Aª' ¥¥©ééæ‡Ë¾çÉl“øYŽÒ”`@8Ä>kK&í¿ä)RAKPÃ:‹+ÈëRT‹FÕo?†”¢LÂD'i, †2ÙŠ!d©ÅVÌÔ>ÞÛÜÄ R2‚RµŒK!"„©ÕjÍZ𻬠E C2’›Óg'ÅŒwXÌAžy¾š÷“ä';;8G5?FÊû³!–‰¸Mñ(ÃPÞAÀ«*ŸòJŸJ£(¤15¨øHۮN2Š›VÅ[RI)––Èr„ƒ‚9÷…y µ¿ ü´q[>PÿX5ç1|¬!„÷9×iŸ&gL0*ðn÷ˆ&Üö1ô†[’—lî‘èK¦™pW¦ß’ØÄŠK áB¸0, &_6Ú·tb¬Wòq•Êúøe~eöï†4CÈ„»mswé{œbÎÊ'ÍI ’à`@s §éä¾PÙ•|\;¹tVþ‰ñ+µçÕ1ÂQìŠß")’#·ô1ѨùoÔVQŒZÜôš›º¹íæ)§>nqJʈØs´¬7ö’ÐÔ20’  å ‡êæµèÒЦD"©Îõñ*‰Rf%é]ÌÉÍdVÆé¿]uAÔÆ0’ž.RZ”ü·)W¦-ÙÃË^æ=VìºgY…:…–LrI&W“{0¢2 ¾”qÏI.*´çü‰ŒòSŠQô¶0þZÌm ƒ¢)é5ãA'øC«Ô€UE²ª—su Ò¹]¶éV qi[„=ãMâ^²EQD(…1°[O&Œï²Øå}¡Š¹äNYÊå^Zµ/˜\RèºxX˜CšÞedWT) VG-וe=ŽÃ™6Ÿ‰¹z‹¹nAjú„Ësi•1j´ëB© ‰Ï…~ä)ÕnJTŽ¦Ð®R+ŒM[ùó?XâGu$˜Ÿ±÷6ZaŠ:|b»þVÒFúÒöýÓŠ)TEñt[+rÒ¥1‡-„’ú\5RSGMzeBq޾ÑO£GÐ\«NݘBmË©Ôé{‰j4¦1”B‚ŸnW’iñY–â°GRa+ÓЊԱyO[ÉRáC>̧Y É´v?ØOÁ:Ñ)X‚“ÞØÎ`„-ø»óØLU¨ƒÁÅBþlA8÷Åô~ÍwK(˜/Ö9d‘fcxRˆ)% ©NZv{-¶ÜLñ å*êä\c V”2©Ø*2už\ý¥4Ž0Ê`b<»iËŸ'ƒZžWQHôé!Sª1¥!ŒÑUw–™ä÷;2âL6OŽnDºLf3ØN¬{Q‹A uu…‘‹ýïû-_˜”3a\äjž}›ÇKP¬wÉQÛ6ÊIdoõ­Û¨Ï~deÅÊ–UÃÈÕl«±ËGÞí-º•už F ƒÒ Jôÿk5eyÇ-RU‘WVY}Ù´™¤âДBé¹=Û>‰µZ.»êo2ªŠå*g¾ÿUý¾G{1J¯µ§f“]¶¢Ô¬):ŒE>zf6¯‘ÅA…€‚žN´®ÿm|Í#QÍ.5"õëøâ+)Œz?Ôº:Xé2c|‡¦žìW)JuUO¶I.OG?zNšééÃ1Õ&X…Ú¯/ã¥EG.â¹dã×zJ²Ê¼™ÉÝZz "0a$eEó¨Ý¤:ˆG#ïàŸn¡©D©S…©v£çšc¬Ä(ê;ˆ~z“ò¶‡ÕZEØËËë«I{±j™¶DTû'Ôùª«R\UsYþõŠÄu ‚ݯDÝÂÈÊ2ŽIÙNü»’‹D_)ÔœÆ-ÔBOi¶Èè„âœÁTl¾ß2»´±ñ:"¯A«N¦S(â)¾ù ÛIMÔÔ0D%&®ÞRR‡c©9(ŠÆH‚ Å$%a ÉÐë\U°ƒáA”•=yÞôñkV¨C†=JdD‚ *xlˆ¨E°ƒõ奡èE èl„æp‘Pä裼Üf†Q'¼°™›pNÎ8 Aä}™¡˜Ø@ʃ¤6C+2NGö‹!% -‹)Ìpbš ˜×a3”Ò—‡ólÐ0!°GQh(®¡xE1 ÔPG3=5 ·[Ž7+¨P…¤âŒè Ô"•’{×)ð¨+Ìæ‚r¥õÇÜÍWa‰°ÍF:)ÏÓѨŽJ‚ 1ÈB²¡Ì}‡cAÒô2Á'ÌçGU%‹Ò/)Q,Uái½oêz]ܦ»*«7½±‰Ds¡† ªÌ¤õÞ›u e¸f•0EÚR[á/JmHsŠ‚ü˜Y U©dWrU£ÌÍEÖg£qn§«)*F»-йUM5.75n—QŒÑZ΄ã×͘嘈–=™ºþþébP¯)P–^)iæyd[HmTÅ)nÝRÙ Iì[[“S$e2Ì)1†£oí76‘îSy·›P/—bFk¡Îd#ú_‹\ëÒõ™fc¬R3‹/msßÌ¢6q‹ìC²Evܾ ˜N?Š¡I§\º¾‰ÍéiÌ¿‹åC59ä- M^Éš©g2¦öoí÷öÉ#P¤ ?é,ö¢uSPÕVòsŒQB¹›¶¼*¡Í1|œ/€î` "` )h@ .±ªÞ?àO± ²ánhœLˆ$Y¯«g!P0üðQЦÃ2H(w!àœTv Ä'zA†@‘Ðc¨c £ •¦ÏsAäƒÐVsŸ "=RŽ•ÌÜÕyXæ†",ÊNF†ŠÒq™H©Û„ggâu‹B|~pô­ÓÒs)¬.Ì›³>3±ˆ}LN%aZ@LÔB ”0Sc¶ãwÅx|È £+óÏT‡Då%Á"Cö3‚PЬF,¸”0lDµ ü+ƒ ÉOˆPå”bsâñÅ@|Ì3Ü ÄÝÁö ˜C›5®ˆƒ@•± ‡ÎÌd¥¨9à•‚Îs÷ÅtRã?X;æ`œ× ŒÂ‚0Â0CªœB™¢ ‚1FaH× ˆDˆ=8ü„‘ˆGsÅ¥RDzC^¨StDˆö•¨€€D1p’­tlcî \pÅ}h®0tfqBp…Æe(ÅšŒ  Á"BL‰Ê:1ÁœýO‡ác¹!^”C :ˆd6(wVa1¾£bˆ70…H±œ Ù `dp Rª¦c£ØvGBCcEŠªvá•vH!:Š&%¢¾ ŽŒÜŒɃDIýí„@Ãvu8¦‡‘EX1ɪâ#5ç‰ÒòªRHD 6°”"9£F ‚;OÚÄêW4LR×Ù¾1òxC"l„ ˜€Ô¬¶ nèÁ„ÌãŠ( »½ üê†F}ðˆ…AÄC`- Ù‰‚`»%ZÉç'ƃb F ƒõÚ‘Ìø7Bú¤8QCÅx ?yBЬ3Šañ5dƒ4\~ „‚0Â…AºeÐa™bTÕ…G+ ªëO„pœ˜acØR:!‚(›)¦ (Ü ƒtS¹òí\ùÕ„%ü_>73©ÌR³„"‘J2CQ IN€ŠìPÂC™+!U mTƒ¢…ˆÞ!^Ì‘[fzBhRŠ„±—›OÂä61 L¦b1¸D ÓPã–ªËÝGu*53º–:"6n&j]x×\¨jEXÙV>`æPÐWƒ†ÜMp¤ ‰•ÕA»Z0ïÕ– HjlA˜£F0Ì#÷ä%Î3‚.¥±;"ÄÞ‘é|Ù; ñU¨.Ý\ •ê•Òºö;9iBŽ‹²í5]Ý{õË1)«l¯R·ãÛˆÛ]© »ÿ»Ì\JŒf©ºŽ*',dèW”F]’Ua‚nß'”¨ºç/¼ÓaÜÞS¸A9xËjM‰b+õL­úZÄ+9â'ô•*½=ÊDw“,ÔαY•µ•»ØUµ6T+5ëcWôˆFµx´Úl_]¯J;©IAÎ+ ™¯(›!ä^¶u²&ù)ç¦÷SÞÜ›V‡ífS˜Â] `Ì*¨¥Š;TLb)ïE †OKgf²¦æ¯}eݱ ’Ñ„­¤„kF®DNîÊå &Ê#0•îŠ:õ(h¥:[…DfLÁH¥Q*Ll3”ÅêUP²6e ¹!ÔLhA[@KÊxPS$ÄKH!&a's̯ò-T )ŽD˜?;ˆ#ÕÕÄ1a3ሀ†q Dª•B j('Š'DS… ·yÕ\`H•0¢Y‹m98Ô…qaž‰7TPÅh˜a°€ãƒ KÏØ&0s”#3!JJsŽZ†M)%uU°ŽœðSáM‘-"1.Fd¦ºc@ß¶ã 8î¦â9þs‘ÈAÄ2²9TÄÌ2Ä8ŠR¡!“øuÇ LAJÜ*…p¤Á ˜Ò™sVT†êçs‚\Ž¢Qs±GI™*ã$“¦þ‹›`ÓÂD’:¬£xµâñB # ˆRÁÃ\R¶35 RÆÐ¢ "ü[DCìýžSãÔ@­Ëé ¤¤äebfA†„0¦4dÑNtœCsFSQUéœîR?Cù0@ÎYV …NaŒsÝA¥qžÓŠž‰‰ gŒ…+Vƒ©:ƒÕL¦1Æ{¢çœB2صœ¨å%œç0°ÀÅ6@g Õ1ºHÜ#ù]àøèºìä \8KµE’ ‚B-$6ÐébŠAÂ4³SOGx¶EÇÀØ’N¢!_ç1D,tÅ7|‹DG!Ô¹ÄbX‚FN@Ð!”™ D¤É€N#Ô‰ñS ö*®ÙÑÕA" zb9…%Dbˆ%ED­!*#E#'2ø)K&Us GÌðÚ: ŠhMJmCrã")Å´lhB!*¡L+˜P­DA¨ÂÆ X8„2ûÉtѤE1è…$³˜#±9oÄuw¦£Xr* ¯Å#ånfø‡P…ÉÒä0vêDEYš"S(Å\ bnþàÔNI†ÁS"§r¡:cþ¡AÂsq‘NJ›Ýà0Fáƒù!“5žú‚2Zû•ŠEäÈv:Ø;ÂÃU&âg1J‚`»F¬>Ùu3'¢=‹Ì‚.B’ĤpÆÃÌ0ޝRìp™ 3©I/B¬¤¢¾Žo2#]:aˆb$®Óg'PŠH)Å„ˆ®Rèå$Ã!TS ª>!!™D,l\2±ò¸e™¾!M‹Ã#‰t)SXÌ´³)“±Y)*z3)÷EXsØ`!%~6‹ÐAH-°%Å„ @f|ƒ„·U² #ÃHè®P•&}5ECÑ#µ|…Ê„cò;$›(AŒ;GxâfÁÈŽÐ;º¢pUbÈÎLdôÙu¡„1Љ‰Hl1ÓȃÄT~ªŒb;cj%¢@jtaCÖ„[ßÁÖàÍ¡øýqx(‰†CŸ•'Ü¢`40N@Ù("A2÷Ê„H§!C¡pxA„¼/D§Js Ma%>f’¸†$(°6-C"ñjÕ¥B|¶R9ƒ̬6MÙì¬6e|•Y\Ï9 b DÔ@zÿøÉ˜Ãº¶N÷€²ÀMp lžÎ´ \Ö°Sî0q€ÿñ†OyMÄXW£4«Þ”rò„(2´ª@‚0„\"!ÌáSĨÐhŸTÌH¶ó¢ã‡¢Ñ ƒu3aȱB$Lõ0lÀ‚vP̦ÕòVœI:¸z[5x!Â0(Ç6êÇ+·jC¡ºpÐ @œÍÈ— Åc©ÌhÒ£R ©Ì8Èé¢g~,òUÀÕµX (ÚN*ˆZŠÈ®d7DHá8Œ`2 Dͳˆñ‡aA;G‚Ãú9ÉxA..2¾àçŒDa1Y2_DýÅŸˆ]s¢÷ü¡¦Ç7p‘$!'39)¤ÍêÖ(ô/¾èé°rB60‘± ŒÈWÂ00ƒ(B«Š95Q )ñj—ÈGd 4æŒ$„q#`°îID"„$U d2JTjAДüSe „BDXˆ°cå,ÊB96Ô–³ÃpÌ^ä8פ¢bàrúˆ€„ȳŒ 솴ËZ5DXnш„âFÞÊKØ'"·äP!xb¸eiÂ3X°èS¹NakçµÑÐq.Ú°´CÔ)„{GmŒ@!6Ä (gG#†r™ÌÈÌ GP(R#m3L!Úñwƒ A†T £ 5ÄŽÿ9Èø¥³ zQ‰#¾,Ž0Þ‰ÿs ?Öœ5ÌΛö´HcŒ#F¢$¢™`J0Äæ8¬Å<–e¤~¸¥²:F00‰Ô(˜ͪ„Z¹C6wÇbE-„JF+¶ZÆòê±YÓ3(dó>&%ÿIÈ—kG”Å­b3¥s½Î”êa’Y‘‘˜íÁus5ÐÌI+¯gY[ìÏG´ƒ#zâ®u˜¢¦,^7oQ®B¥ñg¡D±¹]QNDäNä*n¤¦c¤œç ´äʨâgÖD]Õ7Hw¢¤‡ûz’)Œ¼«Ë¤í±Jz¯¥Z¨­-ÍCg™-žèbHÄ|í.o·\ÍŽeA'W[¨«9KI6‡ÖüDù-*Ä»¡žêåµ”Ž-BdüꢑêY*†ïŠQŽº¸ô{¢ˆ+±a“ИB¸ºñ‘Ÿ.ŒùCeêLëÛ5ŸiÞUD9È‹”áÐV²©šßtŒÜ¡T¨…ú ŠÔätOd‘x˜©?Òa «Õ¨ž¿S1«]:ËmÚ§!h¤),G(DÖ5È¡U;!Gâ ›ô+nÕ­Ÿì“eB.âs8›}”úÔm2e> ‹˜!EֳبÜ1˜òŒüœ0^»‘sLB¿4‰ÞƒêåkmÚ¡rÌå‹ †¥.Âu5)ÒHÛ…W$E)ÖBz.„»¬æ\r!Q üìÏ)it‘ÉÊÔš‹¾¥ïï‘”YˆG$«XÉÞMݨ•åNEÄûȼÒ,B¦Ú‡Ö,Ç™ÛDÞÃ`ÊŒLø®ÝK6KKí4œZbœv:¥Üìˆk”×V•¸ƒ™‰# ‹ÕCeЖÀÏúººÛ®·×î),T½\šØEÁ“ûêr“ÏdªeXÉ͔7•—½rD^cNää•ÿþ^L'ŒV=iK)ŽJ£}´ª§ÞLývÃY}ÚÆªäɼÃ$î˜ÛT­ ù)âÈdee2Ù*»E¤¸(â…á †¦½„7l(‚6¹ÏG|¢{ÏSû ˜ÈÊÜëjæ\¹G7ùQ>þ1•bÝÌrWŽÁI›b• jan9òLTµ[–Ö1Z•ò°Ãi·>fJáIÄû0¨b-QVEóÜ¥ZHoLªP1V’©Ã=PZT¥Zvoö|µ*®onR楩ݓއ¹:´|½˜4d™]tŒê%ÝÅuª<ŽeŠËúS­3Õ+:«CkYqâÏL/µ GÑRÛú¢ä:“PΧ³)øWj¯ªO1"<ÏV+—%`©þl)°&¬Ž”û5âÒN•IMJ­öFc}´Üvõ[,A ëî)UDo{9‰C¾çî–êâ&'kŸõ4¯%ݶýS5 QDnEájÄjîQ)¢…W‘)ó È^Ec eQ’aI5¢Ýœ&à„æÏ–úü¶Ç¹ˆdÛIf: ÂYcR Y·²›!ÔV Š‚hÁû-ëÔˆçc ’áUPdáQL”•Â*|“¤µ(óZJž_T.ÊKL¼oÍcG…æÄ³vÙØNR ›ÒŠB¦±FUµ³ä{ü&ã¹ø¤0¦ëÕZé‚›¢¦¯…5±¨»â×Guà“ ÷YC›)ŒdióŒWd!Ð#ÙpªV’šœf‘®ªÍA'+J&Z÷V$ûr XÛ‚1Ó‘&.^AÅ%HÁH«´ÂÈGõˆçk‚„LZÙXÌ´q}Æ)Ó»Ðãæ4¡æ—HZö½šDcgêúîÄÎôl³×¡$B56¤ „R°ŒÉ ê #dž¥ùdôĨùú—1Ó'S¥£ìåO £#׬çn!,)ãnIR¨D§' wtjj[ö´"ˆÔWV±s™{uÛˆQJKiGJnñR»·ïá %s&b9t#ŸQaHZ` ˆIe:+NAG–µ*É—¥DÖ ¼ŽÂrPØ7%¸'ù Úy§`fR‘jSúµHËz…9”ŠT±~•û¸Í´çk£6­šMmÅl»9»¾ ãÝÓМÝÎ'ÜQôG9ªB9ºR!µ…*olµjѤ É{íYZmó3È„9¸ž{rU‰œçNn© á0…ÇqŒZr™I•‰<¢ ¹Û™Z¯ßŸr ä>U,ME=®Ã˜oÝZˆ…. 9ŒQΞ^3TaG=37ós.ëCîPF=UÉÚn¤÷«Ñ,9ø²²å¥YMÑÔdªN0¦Þ DôRd;'Ö!HúL¹Iu×o´¬Ø?ÐÊÉÈC\‚5|/%½›Ü¾»qÛ$r/í8+Èê—(†}a …Ê÷êj‰Y“n»“Q/ÒUÓR„e¢cëTÌJˆÞR”¨!íäÌäC Ò•4ÚU¾¡$jôØ·¶X§È¾Ä&2 –¹ÍѶ壼ˆb-¤V—jc™nUAä *_{ÞæÄò•xˆzQ´–Én”Æ›“YÒI³5 f¿¤eFÁÐcô¦˜îô©H·Ä2û²½Â²ˆ¶}ˆ‰/EÕ™)EÕxú&p˜´®„çIU¢©þr¹4¯Ãjerp"x#Ð# €Ð7ú}œ™l¡B÷Î?Ì€ 3t0å ž¶óù õj˜H§ÃéK5£³Š'Œi™ho|–bëâó6$¯TCeÄ‘9%ÌJ§sG¡ad5íTÒ뿲uQEj!ñô¿­fÏcey¸®õ[E#ù1å†3âÆ&àÚ7y„F¦‰•ÙtIß„ý)¨ÖFZ]è±Pâ q‰…B&çé +qMG%IŸôlLò½“ÑÒQ}ü‰†T©t‰º¬˜;p©šl$žùèDNtZ½î­¡;m̲£†$vŒTÔ{¬„»'/Ïm&å_¨ÔTçÖɪœøU£Õ´Å¢‘ä? ê †rªU6‹U¯wm}KêËÌk)%=GÔZ±‹wY›·WÑ Êé)¹‹Î~bæu uŸ¹J—d_sy>’:Ýn(Òe”È_]åc2ÂÑ5ÿ²ÜXÃ),Œ¦Ä‰‘>$²EL›Šã ±_Ýhåxª•j‘¹Ødq](tAZV!*˪[š›¹Ây¨V²èûŒÇe[+Õ·®>—Éa$>Ì$È÷I5†ý’Vôí! Uã.§œè!ŒãYçM¥ZZ„kÜhHKÌRö޹fdQ$˜j”ã7Yì˜eFtcãlÕŸŽãH=eLaê-?½•¥$dŒ±Â,ís C ïœ._YòJU®=W'JˆÉêʼnAì6&±¬(E‘±oSÎræ û©åñûá¼Ä¢-Å5ÔŸÿJ'HBXÒŸ%4FÛɼáÓ/”BœÃ“èN¥²*œ(£Ñ›‰TªË‹bèž,{X2SLP‡åm/#ë¾Ùó3ŠÔI ã,ÁE˜ÁuP~¬”¢Ôû”Q/žæ©$01#œ€¥‡„ E+A"úýŠU1ýeÑ­A*Úò].ОMÓ; b"˜‰Ç#Bý ÄÜËÌ©=â`…¨ÖæéXc$%=À0)p(ÇO×&ß®³øž€¸=GjvÈ«ßîk[ „äÇZŒ2ÅŠ–àb- „4ªŸÍ–†º±ô»¼Hƒq›ŽE&%ut“,ΈÁ°r©,)ï<”’{˜’ ä¤ÍÕ.¯~. «â. t`Àä¥*ÖDakÃÉ€eÃÐnyH p§nÐÏÕ÷ezY ·Œak`X€<÷µ@£BlHnµéy Ë"(ŽC0ƒÄk­l¤~•¯¢Ø×ªjñPú•/ñ˜ÎR¸êf(ânÆBp¡„+Îy$”o¢ a4Êztº¼˜*‘ÁA³ÒQ¢}±«oí áˆ´J™‚ù£Á ¹*Öô,#lDtŒ8·ä0@`)°³¦ÒºKt" ô‚DÀ™{ÊË')IºÞ52ú×q0ì Ã‹l¢Ú4‰±M#IØ—% o6]JJU´ùS½l2(P(+Áf1-Ç%}¢¹8‘Ú•¾žKhD^÷z Àóó]ò×- <…;7aG€@ Iï8SBcVÈ¿ZƒŒÁ¼"a‰r÷"vLئ-ó“3ÝÍM¹Ë c©lQÜ\3M ºßì{HØcNZ±f,ÉWœC«zz«å3™ÊŸ Ž|5bV]¿UÍYÁVà‚…<²›bmri›”BíGjÆÁĸðærÆJNÎåwµMÝEW-IJ38…"‰çÁ­P $yBŸHÈÂ)Ê0€çH»  ™IXü –kB9hV_‰óE¬ìC–þ?¯ás¯ÞYP RJG÷ x\‘Ežù§¯KFZR×]UcÍvÌЦYN@ y6:Ú~E–UZâëVsð>ű;ºÒ‹û‡r`èbäéµ²k¨Åî9nÊ×"AvÁY¦¨‰Â¬·%š„ÝÚE…Y¥”ÊRPý§˜Ôiq k¦æ±ØMño{› Mt¯„$ÉbÓ­Ð@¤²Ä ˆHå dó}:bÛØ[²»q_“ÝÆ(ʲZ´ž$Ó qðYÆy˜ âwQä‰Î>ÉJ‘NS¨RâIÞ\yˆžêtm•nkØÊeDD” @(w…‰ûKR(ŒAÊ„œ£ Uùo}q$JÑCA –<w¹ªcš„q ´"}à ¹P§»SÔZJâVÍ Ñ<ÿO;ÿ5š½S‘ttc¸(¡N“Ëu’ÊckcÒ†¨µÁd^¥@±5ê7q GÅ:]BŒv7/bs¥´’˜OP†5v’G)œÃ0‡-yPZ1×ã<  ÁI„˜Ž64âvP£bê«›¢ö ÞGMÒ^¥aäda%aBS‚‚©ÂT¬\çi~û†#˜– ´O5ÒÇþínvÌ‚•"Ì[¥dpï"9h­kDøHºP¢æÇEËZ/ØxÉfÕÛÈFÄ'.ŽHň·Ji®Ý¦ …‘Ì9ez iSŽÏˆK,Ö%xHIÛºl>kJbÓªç+®=F¨…öÁMŒ)C¢é<ÓS–€Õ *È)ªQ±ÄYSHäQnY.š€žG ¦!b®ü´ Á7›"ò˜¹_ñ;Æ•ýwè0T!Ü0“’‹“Qª¼‰®Êñ0›éò» Ó[*aŦ6ЪÌ@ÀÀð»|4e¿ìÊb3 A¨–EËoÐÔ/7õÁ ­èá2ÊçHË¥ì ?ÊA…ˆ¥úZ÷7${kÔ×0”°É2Žœ "-véKÈëÙÜøcžß ÛÚH¨Aº½›O«S”CoŒW»‘¸êgÙqëPƒ,^!IÁÉ:zo³Œ PA¾Ð! Mì6ãã ëJ‘õŸ'‚ÙC/S! )ûOåüºXEˆ‰¤nK ¹Õ œ!®¥ª÷Š%J#]92¦jÈÉm,©¢pH=Z#g§Ò6<ÏAe #%ècö©°5fqÁñ†u¹Â‘…ÏŒ»yHáž1JªC0»[HE¾Xƒõvå ôSöKKJS¶=¹e ±Ô ]=c9UY§{=â©)“æÖúÙ'Ö„Ä6ï9g1ÀÀáËðÅ,»ŽO™¶ÊA„”ªY./IJ.¢+ç—ˆ[ãS5@~¯ÿøÉ˜Ã»±NF%À†5˜‡þ{þ,´ <æzo&„Ÿâp®Dê‹Õ.ñо³‹/"—•U„jb5ˆ…:¨!Œx.3¢ÉR´åä&Ù̵)‘lÙÌb¿4dãÙ³¥t^9ž˜+ÏcNã}µ{‹B5óÊ®X³m0Ur”çÌ%-—”T+færÉ^R ÚJO¯;|%iF¯š(‚™DÉQZVô£Tó8G‰w!=©¹ÊRT‚ZW0†þe¶¶bñA=2kêçtµséøwÓ5QKcz‚„Bi{dþ¢UÐã ž”|£P©Ñ¶˜ÝEAhW3*3*H¬æ"K€ÊRˆbźþ­Šf£å¹–S umÇ*^ý§5©øÅ%(èasS:½©œ˜d8’Xç ÅG·qb°€ª£R¦BÓ^±¿g¦eÐÄ>ïkN»Øm.3ÿ ¦Wã=Ò>¹×0µ+¬G8ÈcïhŸQNíG«HW|î;öé7·“_*í%ä*ž»„K2[ï2Û–ÁPŠ­ŽŒUSÙݵÞîAŠdåüulédVÅê=d¨¸tyfÛJ·2ÕâYò«¶2±uEÝñÄ!yæÕÎr1Ë*`æ¥ï«Þ^p•J³Õ.b*ÈJÔ “5k.“‰[¥&9ѶEtOÚId4„ñRÏÚ^F"Ó¹EÊsÌdÏJ:Í-æ8E¢*nb— q¤U§ëgo:~KPË{3#ToÖ5´aNTâa daäÑÞ")?]ª¬ÄÒjŠ”˜¬1;èñÊf®U™É¥)ŸžýÖ3•6 ¾k¹ I÷„þ† ¨+- JmlªO™]ºÜåv"ÜÖ¡¨^ ÍuÚ¢Ý2éO]­?4¥bçY—(©¯E3mo˧®¨U]*üì*ò iZw´Æ+<ЬªCõz«òÞ‚"e™7LùLµ¥úÙÛÈvd±:k]hs0–#K3äÏis»5×uѱÛ©Œš™«Mé{y âJ-Üít½)B•óÌŽjŽF/ERˆ©æ›²Ê)êG±lB›)ä(ÜD5\é‚Ò„Ç-ZÔ—iJ˜«V(ÚUÔʹ ØRò?¥¡—Ë’œqJ’¦©%Þu¦s ˆfÛïZý_Αs¾µdb“´D*“ÈEÔÁË+ªuì«0RáëÙº®©›¾bÖº_C›ÈIìÅ%ÅÍD/õ},Er­…Qh†£¥WÄr“lè‚ze>aåmƒ£÷ŠpUG‚‡),¨Êùý1úãÀÎ2¨Æ8IÌAMŒq†oJ¤'T<¡PLn© ¸jŸJ¶+ÍD&̨`ƒ¯;‹L4|6e'º˜ß)yš!1* ì˜E3Ò=^f†vj€Â6áÇŽð8ÜÔmTF €’ˆZ%TϘ’T-…+AAf¤<0C¯ZhÜ\¬Øl£g á®ø]bÐØTä†"'Êr”)à#!ì~“˜ øã"˜A@âlF‘Q€âqcŒÎ¾›êáõœAœü¢sQSž›èNB" ™ˆ¦Êã1&a7Ç<ë+aDÕ$šRñJe/ö•5+[w:Nû«â[NA“ 1'B&Í9Tâ“‹é‡"s6q<‡K›:²em*ÄÉœ‚“ñ-Фä-m^Ù†#-‹#,™™w&!9.f"ç­©½ºÏÊc¡ž«­¢b:í· C¼Ôi‘q˜Íך¸’6bN‘ ¥`Pņ¢ÙÕUNR*ãT©Â”ÀœüKehÔ|úŸŠzfg°‹'7«ÌJ¢®²¢{"¡J)ˆÂóiFs¢cötÙQLS/WÊ’…Lãôüç;d_,‚'$»È{û¨b›¸T¡ÛÓ‘:Åd\Å‘,‚µ„kLΡ]Ðþ\³å“<É‹n®ãÚJ3„¼zmØä$ÈgE¶âqw]"-Š” ù—Ô)j+œÇ p¢!Êÿ!€ÀèXA“%2‚>R²•³I4€TÁ@PÅÅá­MéÙ„&è¤þ¯¡J²D[!†T\ÆvÂM4¡pF  ÑÊ´h¾>r#ž»Ö0Œf)qS1ÆêŠ# ÈÌl7½SÆc䃌©vB…`róâ!ˆ¨ °¦b Ø2ÊPF2cF@ÍK¡ª{ *1#bA”„P¸ìaF²¸Gu0p•?=QvèÆ ®¡0s;ÔC˜” Èè,kc”ÁˆÂj`äõFð¡ü1f”®Jû’¹”ð*<¬¤D̦7`”Í þ‰‚ „x$ —ž8q gêQ\âÁI3V ˆð5!;[pA LÔ" ,».ÎËa™¢;ìvÈä™fr%È#·g‚)93¬qØ®gÌÚ¼ÐÓK9‰ùc9ÈÚh‘ "Ö>9 ©QèJàŒ¤õ¹6AP™hŸD¥4†Ã!õœ5nƒ¨r¸8ޤt=£±ÛæFFâ¹`Ç0ÏÂ(ÜÓ"$KÆIÐ*Dœb •½hŠ˜¯‹ÑHj!D?ódp¹’G;ÿqDz¼AÄâhÊ‹d-—°ÆQª°B’#¦]ȪæQ#à…Db| ã#Œü’F†c ó@‡5q« IÚE¼TØWG Žê¥åq5]4PŠr'b0€†Á”‚8G ¼È®ý €Æ l7Ä“§yÑyù³zú¼û—ü‘}”YÉNão¼yÄr<ÜÃ6 P X¤E%Qéï¡ô.톋µú̺íêÞ¸&EEœ·ƒˆ¢H‹<’¥ìÖ)¸¿Z42Ï4¸bO+Ûã*H݆*:Î@CQ„‘zâmú «~·,6ÐäRGñ¦ç~Ãö¶Úž`€Œ^½Ìø&©¼òˆtиÉ9E6–Ô òêpsX²˜š,¥KYé%¿ÏR£x¤•Úíb$!DO˜SØŽwíN DÜÙ>I)Ó™ `ÄV{ÂNqv/·Ö©Ø%)ܲÆß±ÅÀ®JO„- ×. íÍIR_Ö¯cœ#Ì÷2Œ †{YöRçµD.òæ„Ü&Ãß(ÔµjÊSq×$ùWUs°™dR ©u)y¬&:fì¶9%.ÊWKÝwv¸¨²fi&ˆíÿò\(ÑÖÒ§I°ÜÔA)³ÔÌ3 ¨ç½J͇óPKì'ô·ȵ<ø ‚Ô‘RÛæc 3Éo tlI‚þã²VŠëíU6Ú?Æ·¢7æ±UØÌÖTuúYŒ"ÚF AòÖ‘=Sš«F+FˆRL=Û"&¡e…þALriE •–·¦±K9ºq”祒O‡Z›³-(îdp¦eFQ‹e“t'›¤SéenzSðŽ˜&¯•„2sÐSŒá[º–3­‰î/·¿/JUø¥‹/ÑÞù¨zÙÇU8EuŠCfÕ{¦äR-œäŒOñK†ŸˆO5ÄOº g;Ôt_Òsâb;;-1ÿb#h_5P[­lHŸ\§'œñaˆ‰WŠCػ奫%wèF±ò¤‘]Šˆn2‹ŠD㇯1 /¨¯ahLVbª/µ»1ðÖ?Vx„‘œå'§lšÃzÐå˜q‚-O)ÌlÊq¯8ø[jv:ÊãÅ¥,èR«â§gyJüMâÇï˜Â“YTÿ÷'Y$aó¹ÕßÉVüÇ;{ŠRÿo³ÝBíXG,Ž*±ŸÈr¿õÐ ïdö:§'â%H- w£ý^Ý·ùlêå¥'›PGd ˆ¤çjb¡>B$Bn7.Õ*I²»þ&1•Bƒ9‚¹Nüþ¿J\÷ ´ZŒca*J ó±ó(zJi ¾jÉ%”2)ÞF/J÷:Æc1¼“K‹ø%ö©a7²eåÑš™nôÊ(pU44‚Šbã³RŸsöçÔ5WÈ*ù);ëÜÕkµÌÙYA°_(S×ÝÌ…_[TiTÖo»{¯Õ|Ì‹,‹9’#žÂi:sJ¯vàÊ+í’3a;„ÎÚ½êIlõ•+ÉR ŠæcÙÑ4¦¹<½µy%—AZXÎÃT£>¨¡è¨Â ’õ D,©kǬrîèbºkÌ¢\&Û/Ù¢NöWBÖU«,¨ÕUЊ³<}µeV„z¿YT¥•ÙAŠGG)Ê–OeTì\ß-ËšÇвãE}jÄr¬ŽäªHrÑb`×?¥<«aÄ«˜ÉSjCbjã ÆÇ’ÆçZ­-*XpaN‘ V,ìV¦Y„Å»'Q¯UÉ_Ñ8õR(I3³§Ý3»­ ÇGR ²&³„ÕYÍEÄôÙ“„zÚŒš¬Œk2úÌÒ§»ö¡‰Çô& ØÍüJ %Ö!PÅÛ´Åz"a,ƒ˜J4™_.¿+E,£“›ãFö–€˜5¥þ‰nÕ+ÈRLÒ‘ø‘ÑJAÂ.É•BŸTMmÏ©“¬MªÉ”T«’"KBÑKâ9.‘ ´hîw™Ììsz”Ïl’l7¯ý¢Üc¨¢9ÖŒj¿- ¢ WÜé0Þ­ž‚%æl°Öm³7­ªz6¥ ¾K.Q O£QêŸH-æ&É+1J)HZ¸ê!³X¦¡Vs>¢ËŠ”cLN ÷¤£._­‹¨íEížM8×U*âk2¶)Êée±ÙÈVuUÆJÉa¹ïerUűAAQ%èŒá¹qbÓëBÔCU¨­œ™¥ã#›¬R1†ÒÓœÜÕõ³yT¤+Õµ)#È0Ò’ªêå6.XFu¦þ@ZÇÿøÉ˜Ã¼¤N»R`ÿú÷[ù;ûÀ´í Ðs—’Šw̆XÀ‰’Žôâær+!㩳©T-â&ÑTîËT…ÑG£›C¦rR4‚B…vnÌèE3*0(w- Fw†q©DE8 Î1LX4@„ˆNš­„®ç¤Â Oz/gr‰ßAÜü¬„¦f0D¼ôwYÐEˆ Á¶íȸ·“7Ã(h:n†Qœ%PÆS–‡BA”€èQá] DlågF¬)׊ãa g)(ÆÇ§HʘEïL"ŒUÃáp¥¥f6·”4è°2² iY/1 È$&*èoœÇà UZyÅWuNZ™LŒ3p:œªõdÞI‚VU ²àCð‚ã*«(L‰9 ÔÊ›8ŠAU‰„£Ås$ñEp§>V@Äà ·HÄ&Â!]Îå`L “ºk=ø]KáÆvzE¡‚(nœ!  i à67)¾¡AbŠƒÇŠr+b>C\¬O´Á ¤‚,…™î’‚!PÕ£‡CÐHˆ;w,¡D&`¸R‚–ÖÑk  ”Õ©ÖŽÏQD(ÌG7F¤‚#10Bl:ð°Ae'ÃÀTR‰ÙޱKÛ®âÁyy%&A1ÃC_ÃXÿ³ˆ™Ž>:—ˆ“ˆáð å ˆ¨ƒ(6à m—9Dˆ †Cb5„ð…˜·#M++!_l@˜ À KŽ~£ö(sV1 Kþç ±à+”¯½+ʘNt¯ÂŠ*Ì’ÂŒ‹½aä^ro¯“™š^ ‚ég7gßË×{c}èœãœ€Ž1´œO•–o9 rM£™ w²®ðÔ-ß9ÿ•ˆ÷J/²1Ä+'V™†œØ-‰©«#çå3µO~9’ÎBå¨\¶’–aÆ R ’œ©‘eµû¿6¨êeç"1íèZ.Ù(T"U+¥¥,d1J!tKîá(žè§-dE§}éNõnªj.vý|DZw{0ÈÇ Î!DCNj§Ž`†Gµ[ªÿŠòª\ôѹG¢½{×oX„IêÏ™ƒ¤ƒ­[)ú…Êž¼Œ1NÖO_b’ŸÔztÚ)È÷:\VLôj´´\ª Îujá©¡)-d˜g3:¥Üº5|†QÊ!Ç;²îöæ:XÄc»b›f‚ý§µ/ÝØ(L¦cÒö½Šq”ã°B”¬‰«¥0ÎÆ”•d,”©•V#ÜM¶äKiJ*è½ûÅ5DÉGuA›‚mêÁdù¹8e“ùeN.Rì”[J!ˆâ0d²ºÄ2šèqU°Œä›©™n¼´Ü»vŸ#iþˆÌ¦Î Î‹¤ðªfA!DRqW“åeNäVÎ|§øŒ™M[†}«"1½wD3%‹WÞGê¹i©&±‰Ù·ÄckhÎ9P⢌Q|œDçšÆy̬ºQV=WЏ¿^¶üýï|cò©ÈM3ã¥éJÇU4t»ûUFs5 cˆŒ»›GïÙ%ô·?m6Ô*S—Ý=ë’¨Ûë B9‹ˆäD¿?¸Ï¼‰gLæ‰Rf÷YÑ{ME±‘ûý™õ,UË‹å!$’´Ýˆ¤ïÜßÔ/É¿¿¹¹/ÀÑ9#^êøwI ·¨€ðf+Ëj!JzÎL%*?èœ{gÊéÍï¸z‘IÛèR0"T-¿šw1‹Â/§rr E%IMTÔG.ˆ²;q” ƒºÒ_<ÿê’sÎW ˆæ_ÙqM©s0ì)*êAw4¨3Ц¸Ýëæ*j‹Ô¿Õ‰¥6ÓÿìˆYBØÔ©®ª®b 3˜†Tj(¢5Ëw±s {ëJbLBk—VmÞÙ*&`OC³»Y•ÛWk»CÏU3ä”Ý%üµ~ªùSYÌ3ÔR‡]]ìeNªsXîU«“ƒÞzÎa‰åÆo(¤;ûÝCfŸ ©Ë¼˜Ç±)Ec]j[‚›Hä}§ó!ÊRªÞè¤$T!åW¹¼¤Ý./.‘¨s¦^¢ÉY0®iˆò;‚ EÁôÝëÙ."'ŽÿѾbÈ2‰…’SÝ…3º¥ÅÊ¥=ìLË=”˜+z_1UèúvJˆkתæ;¶šŸÎëÎ…5WÄ2΋ñ--?bŠ’ ¬{¯î,¯d%èþd8®8íd …çÎ8ŽT%4–Ï¢ZE‘&ÓmÙµR1•™¬älca¦¼_™Ç3ûjÊX«qÈr8›N©zŸ좱]·f©>fâ• aí,Û\žGŠêÏíåÖéVTU£íH&žÔ‘æiDF²Y O¹•RúÒE1v¡µ‹¨©ìƒ/ûu”ÉÈÑeªÈm5‡{¦6m1t•±v¢u îÜ–1j‚È&çâx’–ä^eWUÁPWú×dÚ<ªváPQøõ«b.*¶b!9×ÓЯ‰_¿žîW²ÝÔZýõ Ò–ƒÿBÓ~W•\ƤOÓ`™œ;!…•ÐEñê>ÍòÕ¬BÊJ³JC¨ªT# a¼–Íí!*ЉïÈ\ Ò¹®”A‰+™X/Iœ’0ée^ÂzÉ*z.f"jöE ·%•qš*Lܘn“ G_Ö2Œ£˜gˆ…žÙ«‹Ùtë6òâ•ÙÄÊï«‘ªØi.i—,IG¥Ä‘JÏUAuýy¹²ê|Îr#¿«‹d|´%—ypˆâÑ9”ŒÑî{>#g¦zþ Ô1ˆ+DEÁ)õ¥ÓÆ=–¤ï·6Q3œsNô©rçéAaÝ‚%Fzé-CPÛE\û¢ÐŠÄ@‚1ËRjÏÏKãuCSbÐÁ*=lO!ÝEIF‰ƒê¡Œ@©ªmL%”ÄQ WDDGõ_ßÂÙ™šrŠÄ\÷É>mµ–•[,¬)yÓeO!=Þa*ŠË&—ªÁÝ1)ZÓÊsÊÓ$†ÂÓ±ð…³È–V£)©µsÝz¬,«ølZzâ=HR޾jßOͺ÷C”B â‘ßt‡òcsóv›×ˆÌ´¬’OˆÊe1šJI\B˜…G"ÉJíÈ“±ÙÊE"RëRr÷uä=]hœîª‚miÖé¤[ÂFdEÜ—&-W›½}±æåÚÊâ ¦uãU³ØÄY™I\üd¨CÑ’B:Cò?ØLúDJé¦v);%“¤”¾„RT‘LB/¯²"¯)If×-VÎ!‘³‚ä»Òä__¨nÙ}èT)®šzs%ܑɎF4«"ˆÅâå}uÊäaÙðùy¤¦ÝÊwcf_j"qÓÕÝÍ´r3Âq©‚opª®}0]ëû`DT²ãµW=޵L)ÕJó››)¿çeºŒRO]|´& â„NTJ=yŠŒ¹éÿ|ä ¬R¿Â~þY-9®Rf6õ5GN\æ‘^BܾÌF‘6†YU{½ô•}ÒŒ¦#ù¡/ÕÆB“?oY–d9V…GÇ*Ò„b­™t¼¦dþ{4„ÕmzÊÄá*ZõjKgt2}õø«Åc«òXôßâúX†)Neé/Öפä#aŒdC×yZ—[³¢2³mÉ)Ö¯«™Q=Dœ ˜ÙÁ1j£J˜Éû©(š±QîJ:JìÛžº9$YÛ&IÈÎ$Ç*iŸölÝ䈅ǯk5ÖuÝBŠ=Ý߄潓ÖR“–³1;ý·ÈÇLSn­ êTöÖi9ç9êüÔ÷¢5•µ¹éèê…‰' Ù3Ôf⥬¿ì•¥C½ÞϹ·vgÒ/3¢ß­3¼Âé šBkêQLÄ^%V‰„ßì‹…cÕ˜„”åÜwxRîUi2í\„ß­D¹KŒ%$§:ìªmÅ8ï—-‰ºO[¿|Ä>6“ÒŒk-Ó«k §ÏKW‰¬ÓV+ÐJŠ‘Dµ4È»C7r³È¶Nwú§¶ûéR“±ÈéJ\Ö%ICUìý¤¾QK]…±" J®½œvÍY”ÖCWÁ^Eæ¡öl#i¬4°²ÿ^‘Lù›”/8ˆN„B <7Zï©¢Z·ˆéàˆ$hÕ2ÕÈËl!íÿ“Œ7¸î!†)=â4±‡äf&æÐ}þùhb*”ÄÔ-;1IA¨ãO*Y>Ç¢p¢ÅLóÑ3Õ®†ÚÒxK\AÉÖ:ñF$ S0%†z"ä~ù1"ÅèPqò ä-‰“…QÀ€U†‰4ÔàΛÂVõòQÇ!e\ÂPé‰ëÌZg>F„e”ä3J™zýèÔ®c CD¿ÄZil<œi„0 ›Õ–,ü:-†WöS Ÿ!L@µ¤Å‰Ž/IûÔ ³E’XÛ0§_²'I”yfçB8Ž¡EKÍÑ"ða‡aÀW‚Á°8 °M[ÀX€p+„¬T*È(DÙÔ•ŽB·®l“=¢¬L‹#R„–HÀ׬aÍ]…^˜)‚`À  \ˆ(™tÒä$ÓAŒxÓdHBD d¦‡ƒGô 8£Œ@¦n±EËJcæ:S§Ù'¯œŽþR˜6ýˆ÷FòbL{Ü—in!únÝ/Jòñ²:b5FÏ&¾:ø&" 8ƒy Õö‘dž)DFä@…•g6qÔsMÙÏ5ET„þœµibš†”«®¹Tw+Áêlïäd¦+ØCѾ®—’†RÞ":–íjOPº yj×ñæUKÇ"¢E§²qŸ96ûýþy¥3¦ŽÏ³qÓUUžUS—W óËxH8$\w‚H“ªØ¿mõÂWºhDúëX„íêÿ(VÔe î¨Ö|¦‰X™}¡ñv$S›`80˜©=+ÂìÁ‘q÷Ëo¤Ù4ô(–÷e˜~ÃF "¬ÿ^ÎÛ«WB¤iõÝìDGlž3{-†÷ë*¿©0BÝ$  …V9GU0µïåfèÉ1c\ÎbibÂlï•m»-YÙĸ‘ G% íÔµ© Kòü?ØYde¨S­n“#OKˆ¡o%Š+‹±Á)²NP²uS‰ i…SÍ@,ÿøÉ˜Ã½£Nþ~ÃP¨×ïï‹ú#þj´ ô³"pFm lçìU°” Š‘‚# â}žErdX ç¼zøã°<œdö@ÜC1•©Œ¢lÝÖ 72´B¬¢MÌsÁ© Ô܉óâ c1‘)ƒ†ù\. "±>zE–là ÐŸ­µž~!±Jˆ!ñÙZ Wð;NÇR?g!' ;¤*†áŠ8ß^b%c2ƒñ¢dù‡§1YŠuh}ÜÛ£•J -ˆ$¢AH6xƒ( ¡CˆTr[Òs(Bˆk ˆ°,PFh×|Ac› #àYøƒŒŸÁ (f™AF‹DOCJ¡œijœß±QõÊ&Ä9ˆ•Vœ¢ˆÉÞ2Î «± #%¬c41•õÅSµEUÊÊÓê%̵8›ŸúɶŻ–U"é ›‡.vk6ÝP…ó»Í²åZªj7¾3ʼ‹}œ—_)Y#4Š+udL·e„l؉ßȾL£½5Û ÿ¥z;ÄbÕÖæº6¿©R6 Ê…×ÊÖ\h"ó‰! ®í"êô”vV‘ÄÃo,¥EÛ åj Ä"úW/ã N|"R[6$°ÍU¿îïoé_©xˆ-J³Tïl ¹]}Ût±Š!T„cÒ‚˜÷éu ³<¤²T:ªv¢ˆ =ÉGjCô96ØÞ¹c›ê1hð»çÚ ‹v!-:ÕÔÎÿ™Rô§©)¢“Ö‘”B-’¹I K¨®†R4œcs‘Häîbú‡ÂnHz&-¯K&:ÿßθɂ!,¯WD²s!ç…aȼ<¨GWÊš‘Œ½jZ:PòߨFí]Tß]*ëcãZ";±‹–°­A¥v÷C½ø®¸ŠÅÕb-WÄ,评­}ж½g:lˆË<¢ ¿]Zö:5êP©+bm—üí#­dß#("TBIN ë|ßYpäZ)‘ŒÎN¯ál¹Ž©yDÍqIÑ2Ž.—ªûVî}V]“1dFËì´GþÔ9d·ñ0WÊÄÎ!¤ yEÉœŽ…)¢·¢ñ‡LE•„œòpÆïSxZçf¦cÉù_J úB9—g¤q—qh”íáiì"k ©TD W7ê½wß/a…•O˜Ø¼—3î[݇:ë7dšÛÕsk^§2sŠsçÕéT¸\3Ž8ì¦X‹âl–¹e¬zç.XÌa^ãÍM•í«tܲg7,Ï ‰œ\Á dIDBQtßTt‹¦ä‰vcX”b-éüõgµäsDL¥D,Öa­‡gSŽBÎ@Ê·¬õ÷g|l’¬‰K±ÄûùŠú\®`„rŸßqJ×HÕ|ôMUt^Ê) m[ɬæÕ$bˆABTìáJ} ~yEW$rC¾Õ¹¥§Ûõ†ñ&æ™Ä;a<Æ"»¬ìÔ0Eº2²”¼A.‡“š\í |ɸKQf¥RG<æ•‚œÌµ´|Í"WÙN¤4© a %i•o'h“­-Ç(‰™fw>±Â¹ìÅYuÿ¼|êi Go>Ê\º"!]mÇÓØ2¨ºC-1B24ù²ºo¥ bH“2)Bí0VªæØUJµ‘Pýò‘;­z!ÉØ‰NB\…ÄÅaÊÖZ‘UBª6‰CK]TRÒˆB=ï/î*J;±‘Ï)Nek "·‚ÕæedGV¥ø…ÞQ¨=3¿è‚•“™ñtb© TEX‰µ±ÔFú!”œV¥ei ÿQ©ÍšÜ-bUlCõÊ1.AÜ"Rý*ñhò(ÁPdÚŒÉe¡¯«ÿ½E¢e‚ÃgâÑ—tXŠLýò;JYUÖôQV„¶·ñŠ!2KUfbP7%FÅöv=Œ§~²Ý3”V´…ÚoÐa”†EKèa+Öþûh¨ºz+kïØU¢éPÏÃ1ÄQˆ¢”å50ÎCfŠÇЙ5œÉi—Äÿm–”frQ#2n= Œˆ“rÅ(å~S>yä(p…¨™»ˆ;::ßZ…RS‡UÎ㘞ûë‚°bÒúJrgöè©N½D"‚É^¯x´:È#åå9P‡9°|gd³Vúð]IhmÖËúí5Gf:H›ùuk=%’¬f Îa¦rú7¥=B—F¤†?šžBÕ³O´!-`aW\ƒ™Ör¤òId]û™0C§êùõ‚I7¹qZ¦V#ø”Ë2• ëà ÇE£˜A‘ïÛ’IE©EL˜&ýVl ZDÌW(ºSœŠˆæSXœ#¢zzôÁPC’Qí}RŸkæ¨ÅA1œFDýE¹¹ECÔ‰¶*̳Pzq‘7üanþ_מ[IŸ›V숆f„q_ÕÝ%[·W,£÷ *2òJþ«IŸ—óHÞ«±R¡oÁO‚ŽkˆM<ÈAÉ,¹¨èY |Rûšq+ º¹ß¤ª  Æ(¢” µs©ÚWǧ è¸U©÷{kbníë×̵J·J­¨'úû æFº;urŒó­ZN–©„fZå&*èö¡èjS ÷ã¤éårL'.-ý6¸”DßNT1NÒi ¦·§­ÎR4®…»NâÊaÔÜv0\©Û—“ÄýÙó 0&!–‡å\ÌFçÇ’úŸÑ<È"\ÈÆ«ŒGò2±Jõ¨fu| L²~0n[PåÅ峓‹Ü¶²½Óð¶GCµHÞgd¹P«›É§b 7„òhùô±µVæg@¤OÀGÓ·ÕÛéçØÇ!o—\6Ñô|áÛrâ.Ë*Sƒ _3¤ÀÀÿ}gläÕaª‘¯þÄ1^Va˜` ð‡X ŠÆAÅšÂ>È“y´@’IDÑiG>ˆ·z”_íñ4m/ãá#$É‘ QŠ95_3á—ëg¥9”èAÉ2ºŒJ£ÝZ™ª%«jÚä¬i¯îjåbOì¯Æ&ÌÁÍ @uKB†1lJCù[Èjb¹¸™÷+6šãÉP¸"Ò—‘…öÝŸj0¥ˆÓƒ e˜(ÑœŸÏ&;eú IÊ`„ŠVÀŠ*ÄH÷Ã/TE!éüq5+ƒÓK‚Ð $k¤I Êõiš¨#(4’¹Á ú&œ ¬P+ Vއ•Å‘0X±$@¿\Ã1Ù¿P!NrŠf ’iЋ])òpÇ&àgN`ÉcpÈ f ¢ùú“E±*Î…!‡Ÿ3ýð4^‚ž5&²Âe‡ €"ðøs­&€­‹…=²LR&…µœã8ï\jœº´”ù¤¯(5 •—Ž2B1 r(Ö"Y*›ÆÖÔCÌáÜÀâ¬Zöàá‚›¸3$PGé¡G2ž:dû¾-+´ì·Ó?´¿ðÞo“›¨ör @Pg‰HÆóW%µ¤áe%'M×Åsh¯KS²´BÄ3BÐ\eAÄaÒ‚€q‡qBI6Kq'ú‘A0âjL W4 V ¢i‚Z9êºðÑSR°“xM?¤¿ÌQ#,n™.iEK˜(N « —¡>$öËŒš]n”TŽX·´dжÙ* :®“‡°t*IrýbÌ*¨=s·œSèÏÁ´¢º|0€Á[a)Û§­ÑzŠ`K#‚¦V¬ åŽ4ܾøpæIÅ0‚Îmº D—ZMß«0¼µ9„Š,¤Ó³mÖ“.ÇݬOž»CØ­8’±ŸÙ<êe¼‚¨/÷ ,‡¢œP¯=f”aƒNôœ`c2aX"JãiéöߥHáx¹•ÁøœYC[~OÊVHQ\QNds qµeΘ„¥^ÖéDõ¾VŸ@Û¥Õ¹TDÐJËõèî)³ÕŠ€ã :H8‰CÅdœ ñ£Xp×–d`Š2 cŽBÁ “‡qt1ÏÕ&õ3Øêãì–‘½ç¸X±.‚ÑÑh¸¥YÊfh `¢ò‡eeÿ‡ù;ÎĹQ#¦$ñËkÆ»G´Ý9L(Y[”¼’»ÈóÔjä± C¤Ï‹[O0‡T˜¾8 à³ÈF=K3,’ÐæžK‚ºÐ(„¤½ l*¥°\µF1LR!ÄQ ƒŠl¿8’-Íë9lÚÛ%|"QÞQôJ(½¯{Ö%«¦%ê$Âà‹ÖyTç?MUÚ5Péb„ Âyëy!Àå5¨~0aL§q Edæ——Å ~Éb!¼ÒÒxyb\rÛ°J…ÑI Ñ@!ÂŒ,ˆIP5ÉÕß"Òbí}t¶ÃZþï--)÷’3Ð{ߪMa j̤œ( ;0bñAE<>„±0-ëæ’°F18!¨0 =ãNÏQp{8|%ýZÄå>f}ÂI ¶MhµKf¾XTxÀPp]ø¢ˆw(g’%EáŒé§:¿ŽI°&I/EùGí¥t¡ IâçŒAA5%6±ÌÔ(Qü9È'ˆ.KQRµq P§h¹ÐàL……W`K›v00ê’9×Úÿ>Ô6ÂÓ¶í^ÀÃq^Љe*C…ÿ¡„ªÔ© EEì¤Ã ¾n!'áø³ðkZdùþŒ,®"ýЋ0¬¢ó_MaB Â,œXÍá»IRq¥)Te8¤1B ’êr}»©­.«¬ÝXΡz·‘ÚþÔáš’ç`‚aÌFk1Nùq(}¼z*mïM§$¼_2Ÿ\a³s/NbŒQ—„3ŒÜySEÙ¼ºVÿùs€¥05n0¤ÁJ&…¹vyßšˊM&Ôc ­Hx¶©F¡°¶W…C<ç〠pHÒ£¾\æn+^æ µÅU0ò½º•èž{_¶m¤ièÂ%¥ «‚HKÈXw )8Gw …–°— Ž@Å£¨“Ê9 /3Ç¿ÞcFh…¨ž_Ê1$¦1i¤¨áš¢©Z ¤wpBèš ¨Ë‡Z±ˆ—Þå#™7ü‘x˜H—¢,J\}Ÿ¾*íE¨åÉ,PÃËš*b(ä˜3Ô}LaÕY BàÊÊ9P(À‡—*#ùìI+qfYGôâqf<´ó…ðµ,Y8F¹¡^± 0(t©ø0¤€‹Kb%jþËE›öš¾ºMI2lø\—6Ë¢HìA‡C(AJ(1Å ÅO‰'"6›ì„83„rÚ’ sNŸ5 × wïÔ^ˆZóp£txjmGûáç—ß³$À¬`à'’ 3»Š0‘0Ïõ»Q vR65‚T=~þ¦½i ¸5 èIˆ ƒ_þÄ”ÁÊC:È=Î]Áœ‰˜Dˆ¢Wü탩FêP-iýyÜÄk‚—‹rãVË^<&(qrØEë°GIQL“n¡OUÖƒ³Œ®©G Y çn×í{ëÓ¸J½t$°Ûœ Ò0µ6HN¤‰Š‹R¤«çÈ!VW”ƒõD­ž¥^ÔPŽ(Ç;Sd"IlL¦% ¿I^DºId©üÑ$–›Þòšåq €åOAœäY±Ž¶ŸL²¨ÃÏó-*ö ½¡4|1'¤ÿ%%hd¸€†AÎä”jEÏ/%hMQ‚„9)ÊØS"›ÍÊY>sp¶=ÞÕ:£R- Oœû$ƒÉžµgQÈ 8 (Øm¨ÅäÃ\YeXè• ãÊò(× 7mŒ<µ–HH¼ðd#ÿ{=(J5Ò1Xu g5åhcöUN¢ÒCÃ<¡Ñ'ú‡f ®¶žo®ïr…%èÁ›;úy›%¤ÑiU˜]›YRDs]xrPéÕb”ƱŒtuœ¥ì¹M„6P_ ¾þihjÂA¦ÐèÂéO°œ‰AøÔ©j¤p©•lHè;|¤Iì,R•Ô+Œì£IÎF“×}FµÖu!«ÏÃÏQ¶Kd’¿dÑ^áÉ Š‚C §³{¶Ñø·Ùj$ñ"p‚³ô£þÄš­)"`œZ’j¿È‡Bƒ…2j„B&ôI)09ë˹Aƒ18®r™WJTõ\‰Äš(žóqIDh¤©n”ãüJîü{O5ï,RéqÆa†8;ÇÊ2ƒ>Œo(…#V«„*”ššJP–×¼Y"X¨»—-zmžbÁS-ža\`µ`Æ yO˜!5ŽŠr]f yÉÎ$˜âW|¨½¢Šs:9µú’ý.Ü—ÊiL!L’ŲŠ0ôY‡z˜!ø¢‘†p竦7ùmcÌû4¡º&ß òÉÏzi‡í’ϲ&¦kñ$SŠÇA‰¢³Š×Y°¬"¹År;Ã=ȆúHj9.y)‚ØÅ4{ÑzЙ|Y;7¶E1]Ê0ƒ (§S#¤ËS æì7…ñ£äYJ! sØ~ü5fG•KÅòHº9 (¡P˜p®)²ÀüÿøÉ˜Ã¾ªN®€´@;` ¯ùçøúwý´ 4ôš@¦ðo臟ÕJ`ƒf е†)¥êb>ø^¬ø¾?¨­P0œ$zô„ Ê dxA Œ3DP–tÈ)Nâê¦1¯HC¨ÖŒ#L 9¨J6Tå"Â4‡!ÑÔ1-Ë*þÜws£•@ˆc Ú݆äUÈ·  †9$#\Tªøe Âb‰#€ŽOÐ Bô1B ÑÑœ]‹ œ|DftCÐ>fƒˆß;qá@ƒdoœÃ{(`q‰Àcæ1°í[œƒ19\RDtmФx)8"×+¡„¦57!B¢mm‡Ä£à~`à„t9ÛÃÃ1Ä¢œdš¢‚&)Éf0ÐK°nµ .*—ƒX%ˆƒâŒ)Ð@d©ƒ.78Sy^Œƒý³Õ¯§óîü²˜¥b¦8ÅÊ«ñXD©f&È™Ó\ÂRÒVõ|©¹„N.»½*ö“d9™h»Sk¡œF"Û}PœE!æÇ*•+ýꮈd*9)‚ؘ*«yú¥wå¡W3Hü×)®ë?nоe­LaNt¹Ãã½Ìgn%Y‘Õ„R=»sÙ[Œ\Qrý¨WÌzj ·C †=’£üöS9‹nÄ›¶’"æµV"¶©=yGü±Êç^’·(…s‰Èʇ_)yŠä¥íò/Q/µD®UíETÅ ÅVÂ.‘ô‡9 ºQX©s]Õ^MÌ©LIÖ†BGm®-ÅÜl9‰EÏ÷Fy0üJ«h_¥0éÛE6¸›‰bˆ’²œ|”=LŽ!Z¬U²YÄo:¥D—í_ÆGtuªî8Ão›_ÐåÒ¥Ê)ÒGUgj¦®~jõÉ­ùËWV~ôç|¡7ü•=Ý)\òTF­/…XŠê‡váƒ8Ä·Ê)¶Ÿ"9Êõ+ص+¿ íBÅÔ•ôg!)EžYí—õÉ¿˜šO£!]ÙŠ!–»fYRÖUº“XG "`©B™éAÆ7 ùëKsñQTÞêMÖAYù©™VÞã©„mÿGç®!MÄå0€Lvt„|EJEÄ h(:Á,CbkaŒD ç!"…®ê‡ „ L+s¬5 Yb`![ðÈ„#æ`N0“±ÑŠ6…QN«rA/J±’½ Z.Rv„2nB!®UZ#$ Œ`ÿµ 5ÉÅtk*ÀîC°ƒ‰SKR†t+ "1£æ0DpÂ9X âƒK XØ')dáO"xÙ9QŠX±91†b ‡NÎ ñ1(Çt ‰Œb¦]¤ÂV3¢¼(‡Âs…*¶Àü¤ÁŽq`¬!à iUGK Ò ŽᕌH‚dÊ^üASôŒ‡*² ÐVæ/+Åf3Ä~:o÷Äzgé aiõyÛZ¸«"ñVÑkYœ«¥«ßõìS¹õ0ì)[$1ºt”ªë‘:έ‡|œ‡eÂ~˜Ò—ÛqòŒå£U,”»P•Äü»—¾”çwyU´1ÎdaÿwhÛ¿1™ÙI’(â%ÕA>ñ«-PFÜ/e2—mÈÂÔ¤M2èWiÓŠ²JÞ „ª¸»Nc7û&J–ÚÖŠT9³åB5ã]yiþµ9UyÎQ1¨›‰*¹OÉÚ“/5—éÕóê‰*ÌFûq}-Õá0Tµí™†«–¡hM%=ä"òQFªä¢ùRˆ¤F1eJ¶¯X‡)GNgÊKÝÅ\þ§iQÞ–fc°»rmÒ&;ÈC&%t*³=‹–Dläm.æÑH’8’‰Èd„:/ŽCÎvE\äžE`ŠqŒâ¡Ü4%…œ!tf‘ÈÆP¡¦*uæB§Å4"áèzYrÁÉÖ_D@Ø62³jà¦rN†”2jØÔ®(O’`±fÌ­¹HCÄÈv ØCfeqæÙâzj!‡F^"¢ŠqXSäÀ1“•ÅÎrT·Ž)…0„APâXè"¦í¶d\ALÆJ0ⲩo¡ËyxQ”’èä IBåXë+sƒ 0Æz  ƒg%Qwà"s1\30Æaƒ¬U¤¨RÄQ"'Ædn¢4¥Aè eÅ!DTlzT)†ÛŽQÑI¬ªNÌ2a‘[‚º‹4•AB¨ª`Ø0äB† C B r@Ü&b‘‚8– (DÈ3jyÍr ÷Ø.G1HfT]·È)aþZ`C€”Ç$&içãˆxdfŠÆŒdå2ÑUhÔ¡m0•åÜË«âL"b#=Ï™ ɃԳ aP1Ã*¢ô´E!cø=ÊD0䃋ëÓHD+¿fì;¢'1Èâ9DG fˆ•olÌE1 #oMm¾ò•bÑá?³Ã¢\e¡ƒ !“C„wn~r† Ä´"ÑŠœŒ?äh† &(‚P™ œ`Ž˜ãs¹H$¶qF,B1I¨ä¥®c¿å"¬¨lˆàš@‡ Cç8rRd˜º‰"|ÈéJb È™ÐJ„%,hÔ7í‘·÷ž`9 Væ~ü’‘p'P—Ä¢ÑÈ`Ä̌Ȓ¯:Ï©…Ý<ädœE?ZâR{‚Ž=¦2¹žðˆÌld†)NC5p¨t I‘ndV7 ˆ„ŠÄíÊJÂnrý—ˆ-!Á•a ÄQaýíFâ 1@–7Bq&Æáœ„1ÈnКüº˜8…Íø®ÂÔ¹!hV²ó¨•†• 6!Vt¨9ƒkF*  ƒ Ô¢e1/å^Àæ¤á D3¦¯”VhõL<‚MxùJ‚¦(“<‡¢a5 š BóÌ 8æ¹Ñøö@@1`´¨±bÈF!é¸d0„ì†@N¡1E¸/V¬[Š äC×N™¡ÿwý%úåù÷Ä÷*³“ ¦$·Dt(öxÐe)X)XE°Bh‡t‰gò»›¹›ü2P¸A°øY«6liïĹ02Îf$)… Ã…ZPBÖ–Œ]¡R–(eѳ[}·Ûñú׉ýÖÓÂ×\I„‹G0¢¸‘Œi毳;FŠÌFˆoºy––Åí’ÒšÓ()ʯ1 ×Úx¶È¾•¡‰Š¤5K#öeµ C DAÚ!”§d5JšVKÓ1D¬äEŸ\ø´¬å¡ÿPÂ|ŒÔ®Rö5˜é38ТqF‡5 ޹Ö9D³©_ ƒu°agþe¶XCb–b:I=KÄÓV$˜7„©O¾TYGAV@bÙk ÄÕb¯éǰÛö½ŠŸÕdMÀÿ»¨ -T” CD@f™ÆKÚ$J}æ$Ã÷K® s/bÛ”ùÁ(oÂ^¯3—PBM'“/$’ýMõE¶P® ÷pQB äyËÅ žÁ„3|Á¹TàiKv’ce°Ø<·)šK.`œã]éá9Hîa”ÈÌ)²N?!…BÊ:'ЇT;1„N—lo“U%Ͱ)bYJqxØ’àöÝ!q\®Ÿ}¯`cbV¢$wO*cSwNR¥æ/_ËÎÄQµ“tYe–²$л¥#á;ߤ`éQ”"!R!è³ jvsœOQˆxUPÇ-ïUXÛÕ,Øq&á’sJ›~ë“2–›-…·¶“6ª;» Õe:!à UG_±;‹²Y†z>Ì´qvÔ̵ç®$—4äÇPB*69i7l]iVIJýÀ¦'3$䲨">׈? o=K›ìS¨ÂÑFÕ¢0ûzB|kM9?Udh!ÆSˆfȧme±*C¿”cŸR«²{®bg‰¿ÌÕ5 %à´a–[¥ØÄ ArœŸæ™ßÔgA±\‚.+ÑýHØ»Ñ&ªߢ5lÿ N^´&k†X Žäê“·Ì2~·RÅ©G+P¡Û‹išZP׫¨ë!J‚{Ì·îñ¨lÅT¬ä¼†ž<$£½'«¥c­¡F>X@F„ òx¡Fÿ«þmŸ‚¾ø¢d&·,„’ÃÖ'oR&ïæp”(bÐF"ÌŠŠgÂd°Ø:hæ@AL ‰D£›¶ÞY,.HV’©"'ÈÔj‘:\Ý„„Ò.Ù U³DNx¨¾’;¬¼’¬ê²c´r..K϶›ÂD¤ÙÊ G„(0ú.hËiõˆjJ„1c¥Â!ýJ â’ªÐWU(˜K¼ÝŽ=9u?ÿ¢V¹ÕÃèhXÂ2Û!…i\QÞ„˜•'UUJÂÊPÄ:tG¹îKx›.˜ÂsL´Ï¨i„Ñ>%¡ c$qcÒ¯b v;X¤¬¤„cÈ—1¥IMÆœØDç©êÔ0TuG‰F‹ØåµŒwKUÅ“ ²[®âKØ‚"ÇŒÝAÆ:KIqg^›œ¢ž@œ©SôÒ#ª–JR’ÅótJÿµ[QÎòˆë3ƒƒ/ ¦k‰òP‹ÔÉ €B8¢ˆ­Jíjö*Õ茦Nªsµ˜¾ö©âÚ&ˆp´ë»W%e“‘R*t8@P¤Ÿ­V$Þ—7–"J²»RËd“©’÷D„š–(ûÒE 0W·˜·$Ò?'”fC?¦HcÝfÃ/Æp„oTý-t[&\¼'ª:]9ÉÖ¡éN?ÀH²ŠrÇ r*1„hƒ\Œýs’á#È ŒfÇê«z`ÏW}2EÂXiä"S„IH`ŠJV(‹¾ôΠѣªæø„¡¤f)¬ò6*s8çCÑùMJhŒ‡ ê3¬‡¡gžÖÏùô´Dô1ΞlÀ¡R(Ä NÉLФ2_›ØÄDZMýdÎÑx%²”‹“pz«¸f¢ ¤9¤æ•BlIºâ‹™pîRˆá”soý0õãá¹²bÕMã:§9”±­ÃV¹q¶Ä´‰ENºsŠáÆZ¨i†³½I)9¼GR=“.·¸•A¼òH\‘1iQUAT¼•$ž”¹¦T°¬S].êvNA‰pB œ»šMûëkv?è§]Œò¼‰‚WâÅâ©ÂÎã–ìa#ñÉÕf£¨!|aJ°8(q©¾"_n5>j¯Ì²²iõbph-VUž>ŽK±+éU/ÅA*ýB{•ˆ¹LÑr,Wuü;ò‚- ‡Á¦ Y?s,8ެáPÅ ÓRöŸ¤Ý†¹èªwT)q\vVU1„[»PŸÇ äË›÷.EÞAi/ýzRF7‹GuaF ‚²ªw¸µ'üȯ0£Œ‘s•x_ïca6½¿ëÉj†O! rÝ)Ke|¶%vØÁ‡¶ÖfIH8u˜cú-×Ô‘‹âžêDQr…'•j]Qö,yŠ"M¥W&aEܨ„)ÜB³«DZ˜ÂOe\ç£ÚåíM6šò܃µæ8û"²Í[ÀšÇŒØJ¿•zŠ)|ó¶“”˜)“1Ê8:„­ÜƒkëÜha\öFëÏl— æ¿z©.R‘x¹`‘\±‹b–VB#x–,G¨ž¼)øâΞfHE µÍ%#`Ù”h¡CD9S·qåíÙâËJŒœ…¸œt Ä*ÑHGå$`¢z¹L|\`º^”þTº÷«ÉÔ›ñï%vÝüÓ´gqˆ9Ã!ˆ·^¥þ%äiTõD d¡(TÅo^ßÒ_ ÕÇú¨î+ÑÕÔ’ Ca1WÖxHlñR 9E†r‘ÐÖ]™*ˆË•I,Ó>Ø—wæÆ,³Iz»Ü^<åÌÇ:q+ÍJ¼‰÷3¹Û׆K*gŠjŒÇGbÌz˜Û›‹mš£Øóq,:5˜[sÊÕ Q'É|rcSÍÕDÿQ—™±Ò1fWûÍA‚Ž¡)ÉGîV¿á—„2r #ϤÓÒ|6ÏÜ…e!ÇFÈC2­ )1»”«ÇUY®â›É2;f¯ä‹$J°J4¢¨C4¢}2‡¡6ÐÑbPª´”Išr :œüâ2N0(«¸`³_ÿøÉ˜Ã¿­Nÿ3ÿ‚ÿ³ŸÓççô/ú÷þI´ \ðš ®ï÷ï‡GÖ†DQfLnDH‚Ç98c+ÔÆ†ÜÂÐŰXê%&=UÂ1ŒMe!×PgªhÇB°¤0‰3žÐrÖÌèÄ[qÎ܆2–àV*LbCÄ‹ ʳÁ†LDÌ*­hȆ¤ 1‰tsŒ"¨Š³b…MÞî«ÊÏqÕEUi¹¤AL»´$T4b Â;kÜhNnNð/E$RNHSªR0j FùÜ,˨4£J11„í+º AÑ”›‰Ô2¶±»¦1ÐÖ‰‚Èë""<4s¹Ê!Â2~ö‹ŠQ˜ˆ 87‘TÄÌ Õ8#„,+5 #y…SQÙQ`áX„FDì¤äðBB™Ü˜gš ÉòV90Êj¸°ḊLçó˜"g7@g&”)1»!XÕ…â Í¦©×Û@ÌÃZT£ª¶À ˜`·Ž…CKR?4È)ƒÕ8#˜D»“µB‘" q!†©Ki„)ˆîA x¨(™•c«ŸŠª‚@ݧq;ðæù% 3ìSù Î Aµåd gi ‚Z0ã ¾0@ O sçBƒQ±¸I„1'Â‹ÇØyyQç á¼uBÁ;QD³²Z\w7£r`†zIžt¥ e 1Bn 3@„DÃrq«Z#Ñ‚!&„:(Qq‡9Dt€°{TÓ«ˆæ2'b˜È2HÀ‹+ó•bB hËIÙXwä|'L+ Áˆm\è‰QEÒPK“„J ^ Kt:¦ævè$«•fYƒa„t«Ü©q0ÖWz:9×ÜàˆM+…5yqACÅ5Ê­M‚X¤ÌÈŠW-· üWgv;Í„Ämq”Œs?΂ˆÃfÉ ‰àš˜¥8›ÌÅ"ÚRl"b‰Ä(®|´h¡aŠærv\8å¸qŸ/ Ä9IÝ4nÊE1 KA’HlæJ­X– ö&!Ü{Qx²ÞFß“ƒf`à ‹] PÍ 00:`r°…™ëFñON’¸k³Z‹ØŒ@1Ðc¦Fȼb¡X)ÀQ‚2"ÍÙ =:´ Èba¶ªPÐ"² ØD¥~î µ1QÜðêÍ¡ Ž5WÐH Ëô˜˜ê‚ Ìj Ï…@róÝFWW›,Sa†:JB5 £^oö‰@Et-úy 9ƒ•™ÔðQœ˜#äŒj»°ÀG%"„2nÝQÆ{¥ÆAM°I+Ÿ›Æ d' ¨lb8B;c„ÄÈõ:Ñ$£ðú¡¦AÖL}±D 1L”5Ms Ðâ„02`+ErRÄMF0a‘H0 @”r<È`­1nå\ÏÌQNw;Vu™‘¸f.—UŒ+ 1Â3 ©‰å®â”z¨˜Áq$ Yœ‚Ö€f#òeã »&½Mì®T [‡œþ–ƒ(¢¡¨A˜ÖGaPNjŒÄD!…l¢(ËmÚú_Ûë½_fm¥¤r»ÄäöFTÍW©™^¤&Uˆ%D¦êÓM¬'­q,÷ÕÓ±{P¡‰ZS5,µÁ_×1Pc- „'ùq CqJÆÒÍbf— S+‘KÊ„9d&.RùùEdÂg\‹M. O§­ªJ£Ž•Ò0æ:ߥr‘4ÜLV©&)JoS_ë’áFv¹-L¦mqKd"åÒ¦ Á‰9å†Zf{¹žŒ#*KüU"Éý{Ú~Q—‘øDª&Ñ|¾ó#Hœ)E)î3;“Í»I>¿Ülæ7>+› Iyž©ŒaLML<Ì¢ù$uÞ«ä¬}FQY+%åíÄ!Œ¬!MI 2ŠåS©[¨»ÞÄÚ¹ZT±ÒŒùCRó’qÑO&ëJ’~¤‚:X¨T+!Ј2œ«]v‹ÈQ ª/²ÜÅÒÛI~Ü L¦:Tƒ×*" YºÂß>BÏl¨‚ˆ*%…Þ¯Îã(†O™·³ˆBîy޼ýÎáS!]‰úß™þ¸ë6£gjħÖOÁ*­EB¡„Õá^ÓPa‡¥’Â/%§:Pzg}+&í¸ªD NáwhÌöd(Š!Òîè30釯Á[²”\%òPæ[O NÊË»®Tó[7ˆ³t²#§P®ÉJ“4¤‘Âû¤%íýº99•SbÖÔÏV"ë u ºµL¢ò?'‰âá95l¾šÞ˜|>i°D‘9E3[daÌK- _#J­:S¾N vf)•°[§Í¤åîÿT¨î™“ÙP„¥5†Q“(æí³~[|¡ˆ#%»³Ir cWÚ-‹¤Zî¢ßÏA¹¼A—…]©üÁ TìÓ¬‚ꨌW';”çbæ.!GÚZväÃzD¼êl´»K'ŠM*ÛO¿Gs Ik-Û³ŠN)kôqÜb«­ÒBlÌ£­,@‡s¨G‰JŸÄL¾ n²ñ­—u©þ¬æmA:¦w "™îAÆBˆ¤ žDoºÈÉÒc^Ò ‹ºILBˆ¶¤œçMýý?½G ÂÕ‹<Ÿ]E@v^‘ ‡Ï¶ÔÁ†Ãú6rwéné`ܦnm©™j¢mo)•‡»|P„ Äc‰eœÂSEfÉu3Õôâ)[Ó¶LÚÛdþ?îi\¥%iŒW~ÞÑHäzã•Ëz§Êð‚¡Å8RáõÙê«”&êš}äâ;Ÿ'~¾ÖÛq–µ~NOu E9Åo_«v4îÁE!0ÅeGÒÅL«áü§eÎÔŽŽ«û\÷qv‰2­ËËÏþm{þMèRºi éM²¹\ƒ#M’¯ºb­–„3¿ÿ$”-¤›ùµªœÒø‚c–µXäç9ÊGBêÔS‘+3"0â!7=*“¥'“ø{R‘ŽÌΤ§t¡>=y×ÜŒ+[YIÛbº¤Eâb—4œC (QIRm:‰Ÿ‘è#&PNÝ“;Òï—ˆf}¤OÊê-i?2”õ«ùŒ¡Š1()—7:ò_ˆ!gAZŠÆ{;'ZžÌD7£Ž[:Õ«Z-tÔP†QPì­¦g˜.ÿ¯ˆ…YF"{§0å”Ýòa>mÏÕ)e}I9ºLýÆ7ZfÊÈõ‹#D'4e…fbw‚²‚˜ÙÉnÚQ{¯¹Ày<” Ã?*sæûjÉí¹z Q¯{åjÙD±ªâHa†v©9æÁ>ï(R-;šBHgH¦ ¢{'WèÿÒiŽÑ–ëg ²»³E/?ö.ð›˜è\Ôù)¤YŠXËdâ+´•IUÙÐuBiÞµ\#W¯K&Qép–ügt©3æø¥˜Ä)Ä.ìš!‘̼Off¨·á•ÑÄ\´ÕjÇ<†ôAÄEê]•ìgö0´ÙªÂèŽ#qq¿Ï:9¥]Uð¤AË&Ç.ÕŒúy‰•)>âºIø'êKÙ‰J ³ óŠž[м®Ñe\10´5‚)L–W”/,ÒŸËæÎå‘c9Õ‘¥$‹‹+LQ¼ÒÞ=4!GSJÉNÏ1fŒNd âR "J¼…ê÷Bûs‰*!K•“%^ØY“<øO"Ê‚Aί'S³â;HŒ\K a!SZ›åX•´„ Ì2ÈIP…`WSRcê-œÍ#>oq íC‚LßÅûIõ¹‚íÄ)L·)´Æ«`êºBXøåŠëc% …þ"¥­!¤&¥Û—†FY‰g*ÐùC‹¬]4²RóˆÖ'¬Ù^ãˆñ*j»±Áræ; µ.•ÊÌE"è³ Ï©ë't˜§£ßÄÛLB­«_ë% h‹‹J‡?²¦" ¢IÔ2´LúTÜÂL"¯Ö#G*Èz‹±3âüIŒ¹ÂÛm“4§!$E™d$„¤‰Ö%ÝùÚSH‹È™¤6S.ó#ÌB^¿‰C{hˆŒ2…%´¶ÇÉÊQÜ•Úd‰1ŒpBPG¤p‰}\B„¬ºV;9BB®~Í0)ðæà1Õ¥~,ÝŒl˜l2aË„„qŸP ¢*åbCb"aµk‘Æ4„ìƒ"×MÂusb% +"8hÒŠcªªTÑ—3„`”Ä r– ·‹JP‘e)‰ª6 Í2û1D¤!B;T8ÈêâˆXÇRW¥Å¡Y„ÁAˆ)Ž‘Ÿ·E‚„(AQPB®&TKÁ@¦Q#ø9QA2 Á•ž™!Ž~gCÆÀˆ6'VšŠŠ„ X˜rCoðœi‚DD{y‡2qœ¡ŸA`(‰±F¡8G; ¸{°HÎHꋃ2ˆhˆMP1 b¤ $:ãÅR1Ûp{Ó A ªnëj0GaÅ)"ßW‚7x‹ƒ•2·i°˜‚£­d‚F¬€ê’éYïCŸäF:ŒW•$LÌÉ”c)—ÛP–åQ„²=Oë¥%Ü·z1œ©cxœ„Ôe+‘o.œ²ºŠFyBEÉÐ¥´…††‚PRŽA C[Ї@Ä÷¨Ü”ÄéÄÚ Þz¯F/?¨žõSf^Cf¹PÂïìÖhD˜ˆ*á•*ò=?gO0ÍÂìvÇ6hl¨a1åz {…Ìá;¢®)ÕµZT!\ÄßÇùQ Ë©*oC©3v™»B÷’K¿+Óìõ"™ÂâÓ¹*ÚäV/¸r¯%ö¹Ô§PEdþ\Nê'­c¯ë’ÊB5Wµx¯ä1¸ÝÇÆ#I—iU¶¤””VRêŠ6_YÀ¦Ù¨°º3eL!Þœ’y(¢ÐÙÐñbyŽÙ'+/;‘Ɉ˜!n§Œ\ cÆ*-ŸÚùsDdRжÕ­V¤Ü‘ùÓM–«WÑäTðºÉaÖ¢ …_]*Ï1m€ÔÃ`ƒ{ùlÜ(ÌPT¯å.'ÓH'Œ#3mwµC²´¥1L›LÌo4ÉHëáÉK8…ÔÎUþ5\·¥Y†™(ˆRí2[FžF™gîfàj"ajFNBNgŠüÉb•عCÜg¶œAì@¡ ”ûŸž×&é¹hZýèf‘n »=zÆAÉB}ˆr9÷–¸-͹΋~îõlA|çvG;'T&‰Á˜AœE‰ÿ#OR0‚ïÛí‚9$A|Å_*ìÁ(=HÊ0( -¿J˜³ŒžrÃØ\;æé6m·‹$ùB¦ÄÊ—ôÞT×H(wŠjЄQ\Áb œìWëºkéÖö%]ޮʵ¡hVZÜEùi1ò„(…µB`^¡!ŠM`B*IUu–³CMáGPÓ"A0l¾ qQ Ú”Óür¹ÛKFÊmla(Æ‘í¸™Ìéòfž¨è舩+=@ ˆÊÌR,ÆÙwÎ#Ô±ˆ´/†¯$¯ŠqkNh”ú*r9 1šìq“UK3]êÄ¥Ö¨-Õ¼¼× £BfËvâP•G¢É}(Zñ[g«BdÉ(—iË”@‚ øëÑó)'†t-ÏN§©2 á”+PMRªÐªër¥E™+ÿ½^j¿RP”4¿fBl„~ûXåp,×ù”-ŠQΔVccë:KÅ(”Ÿ©?^йn¬ˆ\Ì2Ýi©‹Aì2B‡bZ–þBjÊ~oF-Æ¥¼U¤ëµ*PþÌPø‚H{ˆšÍi//F+Ôr)x jF‘ h›5,`#ü&X‘"ðU8â†vŒ1O˜¼]ÁlDQ³¯ï{ªÕöŸšAy ô¾~*!¤a8’`@„ÚÅN•«I)Ç‘è9HBòžÕíšl¥Òç<¿ÉO%†*%v&„t{Ö©)M’>$º§²¥pd+ÔV›šíC´RÛ‰ ŸÉJÔ9òIÚKÒPrPûø&•œÚkí›*·\9›÷ßšeÚQL3PD`™nu`¨R Sl‘M„ÕzK†yô‹«k3QçYê2ÿP¢T`IÂô˜RšÅYjΉëEMé­±)Òcæ·¶ô½¼Îr™³ê¥û¤¢$B±ŒQsÉ*`‰cj™°‹c¼‹Þ3H¨E¯†? n-™ÄV¸×úïmÒ«<éD¨@ yí¡ÂÉ/L>ìˆõšÉ.7ȯã»FgBû g¡Åtêrêˆl6ç.HüJa ø¢a鈩fAVo°"óÌ#síĤé!ÐQîÕËZZƨ„©iÅ%°Kùg[*3™ˆˆeuŒEA¯ŠêøoBÙ –qT¨3íÄ”J ¬DŸ‡º6U”º[’i~#]ô.)`Åw­rÂd²óaçL ÛºwÑÎì˜" ÿBŠK¢s†””UÓ=è}ù³NëDlVK*¶,ÇÖ#° @Ô‚lÆw¥Ía8ê"TrÝ‹¶Í½¢íFß$i´»r̤¹®¾žÉT´ªå9*#LoS¢gØ·¶9SiOR°£ÇN)è‹Ea¥^KtKíZ0°µbÿøÉ˜Ä€{N„€×x€D€'h° ä´ ìÄXxmhMƒ_æj’%CaèOÎ"¢‰ÚʬEÝ~ ë„ú–½jê+§Yd’–Åí–&i–ÒU‚.‚ÞW9Ê DMNr»¥œF¹ Sk—é¿øÛJ}mRf.Ò.5x„HuïªÊ"{Ž3¤èD"}¼Æ÷[±³í&ÉDó™ÒsÕÉRçm]LRfo¦ge}&'œØI(U‘Ej*JÄrZ»s“&-Gu8¹¸5ma·þY9³–¸}®ŽŽ9µ±˜bÕ¨BN0SŽW:-ßfÖyɶm\tMÊ“‹‡ÛSPŠéÄÄuîkS d­Ü¢’Î&²T®µO¡'a SÏ)~îPaE"I%çôÎU»iž•ü¦{kPNñ©ßÏv¢z5:Rfµ…Q›Dj$Œ“²]2¸ýÃáŽ!ÒÆýË2¦«à’Šìˆ´¦ÓE:ªü™ R IÑÄ!\è–ZÎí¼]1l¾F ÏGÝ‹¶”NàÚ¶²>‰“fxêaú5¼£ (Câ#5œ¬èëAÖQ†jú¤YXºª³ö÷íòNÒ}–K½÷r†¿Ñ’©„毭Ì^ks1Ü¥ ‹wYZ„V9‚,¢Œ©K}ª#¿ip¶­›¬5Gî¶qnŠo’&\O9ndˆæ(Œ–V¡‰„Ü"Ø“5˜Ø¤Æ>¥ªë‰1}ø©C¾’Ùiÿ$ QI‡U+wH¤åo(£ŒfL]úRU 31ûn›ºŸT§‘è]¯e¾ü™›òeÂ{1ÔÚ6ª™È\Á„Cís¢9J²wS¼âŠr}¤µ:ÉmåUtòK‚e3©ÃdD¨L=ªûÿ¸“£¸c˜Cë¹Ñ„Bê1Ó8D¥=*†Ã>u>üAy°š,ÅÄh²F§{ S²”WÅvR¹¹j’QD ‰…ûZTá‹É#˜ZV™š–­XV‘Šˆ±ó;Œ¬ÖÆ~”I ®.“ˆ›©ŽGJ4è;39Yw2®8©¿|)GWµK–¥)CT²›Âò ÞK8Jxé0Ù‚)Ìî¬2sˆs ÷¦êÙaN"7mâî.œâ*,’Ïz¹Ònù)¯âõÅU"yœ"3b+ ¡ì®%rÑÜ×_šÛúÈéýB÷/i¤Â£`½GtÿaLûÅ¢#¡ÏÂJ) ,×2ý½D,ú-Œ#´„QËoj0B{É̉c#–ÈRÒøšUÍ'4'®219…TåwÓqIšó”Lâ§Â*)/M·°¶#ai›¸¹¼MÁ}ÄÚÓ ±fb1Y%#HRxRŠÁH!Š¥m…ÍENܹKKÉÎôN­Höüj#- V¦\NJXM]·”}ZP¥QI¹ÁC™XtÊ£¤+ŠŽ‚3˃Þ·áD¼å£vœ59rõú“7fç3fËS”ÍÍÇ? ¼rR•s§\@ÎâwÙóO1ÎÝþtECÿìÊkÐô&0¥_þò2Ú­®Éô»°Œ+u·eG[y•+VÚë2Ú˜ÅYÎ&ù}¤Ît#-˜Æß^ªÿL¡)M8ãŒo™.£çdRÕsÝÝÛŽf)íÊRþ"9Ëﵯ~ax”{xœËWÞWášr*™ˆÇNdÖŽb±J˜ˆ]¥SÐUÔ4òm‹Œók»Ó"î×Ô C/õT§Eôgk°‡s1ŽÅxNݕً‰¨&Q5òŠË¥×õ¡^B;LòP•aEEŸ—,¶/l¦—t*%%J¿å°‰‡F¡J„zµ\‚ËJÑQµØ¯¯@ZWê­ëùV×ͨìÈ/ù!Ea£% ªÏŽÄ wÊ0DZKIVDé®Z}õ/B¼VûJ2š·;jËg9PûºÍtâ#„)6Ý]¡Ñdb#šŽk-e6›r¢‰ßEmÁèÅÓ …C-®\õ÷Bý§¢ÐcöVP¦"5p§IøªP­ë§^ ž3¶p„Ú/(‹‹J}…Êm—ûf"õéDŠËêt9„äÉ•f~R£JȦÑE.K„T’Ý~Š].z÷ ™¤ô¤†ašÛ#ÔSza\rŒ7šC.Êê]0æ«–åìOÌÄÁªša%Bsn¥•›©UW\ôr« ë^ï#ÕíŤOL*ig¹Èr}‚¦êȽÉ~'9ÔuloÊ“§¯úoz–B‹s"š¹Û2ƒU¬ž_"UËÛζ4‰[)ÎJÒ·UfsT5ž‚¢Ä/v±téVGWC5I̘ì¾bgñ*&Ö5½)¥èœšM§hƒ4‚zúqnþª…Ö*»Èè¦>}Ê¥HlF8Ä¢7L2T¨îùt'#Å}öã6úàŽæmNªéröu!ïèD͵ê2 Ý(²º'!ܧOWÿ¡Üè‰âñ9é+íWªûÏÄ7/³µ”wÛñ¨]•2Yv!D*›1’ín_÷Lß™uO»×yÄåe(F¦³`â0ž|D‘µÒ#%†µMÙj4•P‡#ªk]q³Çs™®¯ìŒr²úåUö”O­k~õåÿe¢çví)ŠD ©c­›6ExdÇF%\"ø…sИýÖ›¾Brc1,_Õ›ŽT)5Mî­ìtÈ".?¾ ú„nÌÊ›ëöCO|ÿ^o#Œ*Eo17;’ÄÿÔ)ˆf˜ÉVY6½–Öbñ¦w¥¬¯vãj¾ÙLòäZd'—ŽŽDÈø¿‡|*¨9ìù×öbj#Ê1Ä!••ȧ÷äõcnˆçUþùPBW %p²ÞÕòÅ`Œ½#ù’SÚc­tòð¤q]Ü¢œ¤oѯ„èƒÈ|%ŠJ¥ñ͉=dÔá ›ä‘ÖÞ£’ÈÞeYiHùÃß[S/a(lÅ+¶d«Ëº$ÌT|‘Ê ‹ì•*Š›b]l¸½ÅÖµdí‘?·ÿ‘k~þú3Ì–*d„îÂòå-PU1YFb-‰ûx¾\öºèJ}ªù)9ß]D˜AÄ1]:Œ¨r±tÝÂgáÉ3ësž‚^Zð™t¡Y&JX+½7±«%Æ"ª|­eÞ’LMšµB³¨+³ #Y[=ŒaÒe»SˆÇVzÑuÛFµ Sf_ª¹C{ÿÒ†Ì~=˜ì9‘ ¦å$RYR¤[£9™q¦]ApoÚ›¿e=˱Ü©‡ê©G¨‡,šr]¨e©jZj¼œ]¼¯T=,—Ñr<›ŠÃˆE žtÑ ËIˆ"Æ[«JU«ª§FÓÿô»™ƒ0¤JšHüøâ»;HªN÷Šõšôôrõ*ö‘øúâ³’Õ¶"ïYô(êùH†aB È8+j‰`ÖËÚñ«]êê!婌f&¢f[&!9sË£u,»²S^Ãò¾ás…æBï£ÂŽá‚ˆ \“,ÇaDæE1ú±¥¬ˆ±ë›NM%Å{³Ôl*)b¢ aŒ±ýqj|Ñ=·¬ªB0­B©B)GãyOÝA‹N.µ$˜zfÉ&‹a6W¸c Á¤–1>·Ý蜒HK,â˜Å+Ñ ßÙ´³vŠëF:Uq–M$¿4ò6¯%²Xˆ*ÜBÔK&%D%W8)B¶¬Ÿ%Ÿ’) a»@ìÈ­$ÒÉH“çÖ'wé–dÇÊlRÝMsŒ,¯ §¢Ž”T‘׊g²+rãPa A7 ½‡¡dm;æ·ÃuPßϲjB‚ޱfPV7÷Ÿä„¥cwwÄ6sºËä™|Ï8„4FªQ…MÜ­{iÝò/Ï^ޝOÊO«IyަŠ€ÄxY@(@Œ0AÒ´âgóÅd±ô˙ƖIª¢Å›+Cn‹æ”¦eÌêkúÊ‘p®áH"¢dënïǰ˜^ˆK:Ц0£âãÄ#¦”Ý5ªûœlGûï’áuÙ'9Ð{gU…Á¶³uú¤YN`㤅9„qz¸ºê"ÓNÊ"±‹Ttkh—¯1\ö÷'„BŒÞºQˆ oQH[¸‚BV'D¤¥k¸€åë¸ç[¼—‰jËÕ®é›ÄÏ!É·Z5‡.”Š!ºíFc ¢J1¦3˜­AORÏL­~R]ñ„3ýú‚X%Þœ§ÂŸØ` Á„ÑB'í©àÝZö÷VûІ̤Îù¬Þ²Á*Ò„8bÊ]zVIýÚi„ª4¢õz§=0Ÿ-gád‘¥\Ë6JB±|j=m…UÅCUÛúy.iÁbÛ³+úI<Ì1ë꟭Å!ÁS™*ÌGæ·Þ¤¢V𓉮·\8É ±Æ<ÚC ܹ½åéÛ\(m–‚Õ²ˆ(©}ÙâSƒvÍ`”:Ñå äLØõ°¹È§JT©R‘Èï-pn'=—þJ2)ÒB%=£°€ `Ï5%v$B5£VHY*@­²ŽÂ\pÁÏ3Y ¹%z?îÄúý«tr’ÙK‰”)ˆ’‘–•-4ŒúH‰C˜3 [¡LÞÅc¬> 7›Æ^Nâ£ù¼ÛÖmT¾„Ïíhâa¦¤Pµ×÷úÑ+\ò&I”Í´‚ÔÓ Ä){ •' %¥„²W;"%}©[q”–émÔ¡<îH†ëH!„x„Lý§} Æ*©¹Qõš-û%zW°Ô¨\\˜†ïÛ}RèàŒ:c)F+Y.§·Ñ½èŸ•ÒK¦,S‚ Äb¾1‚©ÙõV¸\Ñ<úÖD³Ä”Ò² GJWÙpóSéæ½Vä±N9T‰¢ žj®Òe)c$‚6¢»ZÔ´Ë&í k~PbQÑm‡" R4ÌVÑ¥+BØ{ì’M@"ÛÒ9Ä`ÊÊDɯ ÇÖ–•õda(‹F/°ªäJ¦›li(ª‚Bœ¡™ÑÒÎGYŠdûIAùtBWT‡_Ö×%(¾j×kßC°p§ M1Е‘í§Þømy%}ï¡gïç„(ê0À€ÄÙq‰TT‰Ö®W cÍÝ- +nÍ'íÓî“1ˆ L¤£˜Ä9XùlÄÓ¨Fú‘J»ó%r¤¾Ï¹6ëÞ›r5vša¹È Cf;ˆA‘0^_F\'xû{c“¬‹C5ÈŽÒ”ô/—>•£WÂWõj~W„i »ï>Ú†¦ãQü!Eq\š{-9R­ÌÈ2PŠ9øZ/xl¸´"ØRu6×Ϻzó÷lÍG !F*5´TEÌÿxX•°eÞ°`C3V!M:’‘º6]É(”'³)KbeU¡x²z#ºZ¬ˆf8¯u+!’1˜O¶ë|Ž#~æäˆw~3ìß# ³×u*;ƒˆ@âÜ#-褧÷Mú·ÎÍ’˜}}3ÎÆqŒP Z¨“¶¦ÉN«ôO3õž^Ã9­.^¨š³n0AÉn)PŒa­ÓH³••ªŽU4äᤫòO5÷­uzBpÔ&œ4Èá2q©dqêŒèÜYJîÝ›>Dã$íÈíÌ‚*Š¡ SixRÙ«V¦ imËSaÜe0E9 3e­%/«~k1Cijç‹#7‘*£U¨ÊŒýÓT¼ùÖ!Ò‹CWEºÖéß½Mô]TÃ:v B?„­ 6Ë`D®¸¡Æ9‡9KÏ’ä,nž'„ÞnET¨U!Ø"œÅÇ'¯cÝw?b£°*¦ÈžAeÓ9ø\É8ñ“ÅúЙQ*dˆ/þù¯M… !‚d`èͤ(þÁt]¹¹-’ìŸæáý:E¸ÍaB”‚!‘ÙS©˜¤cYvÅ® ùÒY剪5‹v!ätK !‚Hc™dcš]*äFJ5Ž¡Œ… ¶ñp=¢}"qíU³Ü´cE7ˆS Ör¡ S!~b‘¬Ä:2¶‰»Ò9~Å•è:HäjBa.³:Ø[5¶+ܺ•ˆp¤BœÄO'|´ÚhY/%h™)b9f>]®Êd(ˆº”NîTÜçúº…_]ûÒåºæRÛ%¦‚–bY")Á‚SÌÅ‘±%ž%áfı(ë+ÆcŸºZF‹Ák’îe‹¨ÉîYȲ!ŠÜÍcÔ•mBP´Z¶ŠRc0Œp§Uwå6¨Ô|)dý-a”gv.Ó¡o²he ÎÔ¦7 Þ,ükñn¤²Ò•¥¹OÔÃd‹dqŠ+„ŽÝ¤ó8—zWRÃ’ÞÕ.•nÅä•RÁAD>dQއX››ÂЧJ!<¦ÃVÿx÷‰óZ³{T„: +¿)*Ø‘és±LÈ;ÌÆJˆ_Aºƒv Í·Ì'ç)ꃕè#JC 5ÂÚñ¿¤áÅó˜0Èg…8ŽiȲS¦šIðzb£ˆÈ_aèîT@ˆÌ®dÁ5nB³ô·,¦Ù0-&~:iS % ¬0–5i “Éžb¢\S'sªå¼Ö–Kôøõ«a›H›Í#îÎWÌ}VG ¦´¢ÊfºXJRs9R¼CJJבûQ¨+b¸4‚aë„ÊiЦºÅe/g!¶Õ6ȵ"æïóyfÖ¤‹V,RQÞ{hDÃÔ|»¸µ„Y*lÅ(¤\2J±J éj%Å6&ýâPndÂ,S݈û½•‰zŽï^ÊÌäT)ªúT"”*\Ý"ÌaF$D¥JŒòw¿ÑêôŸ¿;›’3”¤»Ê8ˆD®“¢ì”ôê Q‡dÑ!“ª-¼{V}žòë£<ÊbùÿøÉˆÄÞLýý$üáüÇüÉüÖüå´#$)/ÿ¾êÈòü€fBiʺ¤ªn¥ë[^õz;!‹A7©RŠvϨÌrYÌþVg B¿É.XzÏÓÒµFÄò“Шœ˜µù—tT³£n]i•r+n£JZò)&Ÿÿé!ÈT¥Ó]È(çqWYÊ‚ÉlÆ?3Yñ}‹}’˜ÔÿC¹ÇØÈfY)ÙVg{*©¥ýA-õν•=Y äAЇüÛ)uÙšÕÓá-c*9m2ìÆ"9ebh°¦f‰—2lÕ¿.ØÕaK/Õ3mMK7?îƒ) ì–V;Ù2ˆëEr¢zY¨†²±ÆÊB˜õR¾Êâ- ‚•ŠJ(µ7Nç§¥ ç¹Hq8áƒïîŽ%oO›è¾ZJG¯Ø§føŒÅYŒßLã Šl ûª¼‚(è¸/×6‚‘nô_©9b&’er˜å¶™)_A$¼Ô–­*á‰dJ¨…Æ$…ýÄ_²ÊµTWJ&ûˆÜJ©jLP¥ÛW+ôÇ©V˜6³QB0Å; C1R‡&ç£å±‘líUÚÒz_jôvgH*ÙÄ["Qu4aK·J²[l\1q¸Œq R*=+!!kZa)ÃUb3?L¡”c¡ Bk'68îòV…¿Ní’ˆôqC.nPÙÒtj´˜j's8Â][ÞRÈäÌ5Ù3ÛF÷©ÄKqrŒ‰Éª7µ†%˜D*y uÅW©Dr[¶æ¬]°¦Áè0p‚ŸP¡š‚é,פ]ã~mJYʤ‚#qs½T¨éÚôôßc3Þ•·ïÔîtæå£9ާ[2fy c<ÖŠ8 Û^ ³KËFEÕMê4ÇÆBž•.òaÈËþo«˜¤^s•®M2Üˉ²IøôN}«o|8‡9Š!‡!LTM¥á2Õ[ˆœNKÒN;ëz-‘#¥^ç«§rv6£2 «µR¾ß*ÝæÖÍRsÎW"r§8‹÷gß“6™L¬ÈªÒ!ª!Y={’†äÚàÌû%¾š&cŠ%⛟1gÒ~ä˜ïb’Èû¥ˆ¥ËåãJ×^SèºE™µˆ¥Zåçe{݉_:W Vº%It£´‚–Ĩ,»!O6`PP¥^áB*nH²ÖoïÚÔ¿Z÷)Ÿ¸£â»–¨žä~„§/ª§¼”¯änIÕŠÍÅVCŠŽUÒÙS†$´¨(FépÂÓåÖ¬ÏëȨ§êtÙùÙ³šU)yÅúêÖ2%RÌ ­sâÉNÄô£õxÔ|wÙØF9HÌÊ—®úSÑiÙˆK˜µšÓ" .ŠÏæ9È”G3-î™ÂÞÊTZ'««úé2Ô>mdzùœåM«ûï¤3è[nûÓ RÌB™.êè…¢¡Ã¡$Á”ÅÕ–ö—ÅÔÆ* 즫y¯™&Ö¼ºe³Su1ÌÂ6sÚ‹ s] *fâbˆÆ¥žÌæª ¨^ÞMME²¢¦T‹ï®¼F™ [ÉT{OR­3n(Q'qñ:‚à[b5«l’ʪ„ˆžBUw²˜E%äC¿ÑÇô»¸Ô­U¤ÉæZ¹Ö¤/¶‘œÁS÷„@›˜ië5^¤b“¥_BSxøþs“˜GRûYÕ9¶é)Ègˆù­µRo)$“)«B“"®©Ì#1Ó5‹¿žü•cªÝdIŒÑoN8ÖÚ*йØìe‰a1'ÆS¶¢X·1åK¥ë}5½ØÏ”FoS™îETåZ_’6¸÷òBåW#™R´gt˜+=rQ×Ãd±vÙše!˜*XÉžMà”ÒÖ—ßZ­¯îÅC>¸µ‘fJc¿&.µÝ žžw¸uª3ç?¡U³ÒÚ*áF c$»lYp\âñJQŠõ‚ ž„–²r—íªü6U½µñ:ëçQåçs"5MWÔ§ayrßµ:é^dæi¨Ä6U³[ÊSF9¢p`Eÿ¯4.ê#© #y?m†ýÙ=Îåò©\uⳬ)PgB:bwžÕ¢Éòk}ZÔ{)†HU™[Ñ)ä¶W“FR„%”Ä:š’ÐŒ×ý[ŠÑËb‹Šÿ5w³¸DÒÃ+½’G­kJSóšU–V‘™ˆ²¯?1ö™›)é¼ä3 `ˆ’8TÍõœFb}Y ÙzíþL¢:˜Š†W~&x˜ZÔ\?óÝ…ZÖd2š…Nîc0Ì96¨ùºî·#ât©!(d÷%‘[ÖLŸ§EpgQˆ) Ý\“멌‚˜Y¨0†ü‘k$”²u<ÜŒ^>¥ {mHž¶jº¡æ]É+¯ëúç5wgj–ata”ªMÔÊßu(äw«ˆ9yëËN~ôéÛË%ž¡x×EÌp®ëîØšún*«™Pªp®B Â>¶RöÞ´Ù?÷×Ó#Üqñ|¦¦IÏÜT¡ƒ§º ˆ|Jþ\s˜Œ™#O’R_>niʧ*FB–[ZmBé)ETã-WUODutKa+¶ÊÑzcŠ9Ž1–uL7¯«-‰´kš…“ëÖÚPíelm¹ò†|Rù;¾“Sš‰—_¹(îüù‡r¨©âf ›„ªò:å9ŠT™˜åOéV£OÕN-w%âÓöІ¿§ÕtAÑ3T!–RñÍåü\J.Иc_ªô$K—Ÿuï®ЏçrnÂ÷Ùò·»­B6tC’‹[Yˆ#"*ÛÍë¶1 ‚ùˆ@ÝÞÉY0ˆgC7N²-“Õ_×å?¶Œ²¯ìu^ÒÿuMówõï©™f+ ÅB²k–UúËEßjb*Jb“¦öaØtq]#+ñÉn“>©ÉþPê—ÆLËqB[¿»j/wU¨›ÙW2‰êëq7½(LrHÒ¹0¯1õ™W?œ(¤NSœšùÆc¤Ñ3L¡d¿§V¼!ˆîÞÔª{2étažÎj—¹Ì"óÈÉ(‹˜š\ÏY¿üÛ¼´šë\íQØ÷NϘ «÷uÿ¤ò»[P¿‰ŸA˜bÔPÈîRFO~#°ÕÓŠr[›Ü•n¢ÕU—" Çê=ß=¶‚¡åÊëTò&)êø¡G @€W ?‚)tËY¦¯½­£<ô‰‚I‚…\{ë!–•Wþ⥕¥2Tç1ˆ"ÙŽt™¬Låuµ^óa-_ng³9êtLï3c=óŽb”Pì![jož4Iƒ¤Ôàð ¸x¾¸€¸C {AøRéCŒßbcU®´dbQh!_ÝŠAÔvˆØLm°¤§#bôÒk¾µOb™ Këe2Ö­ªäý'œ\OfÎû8ç~Ýß³7L!ˆ|’;œ˜ßºDjÙœVzOϬæY^Å¥:²ëg^:¯ ÕS2¡ì)*ñÒË šÛ˜rObðîÅrìÉjÂO¦ú¦:íkZݘÎM5‚¢•ÆD%æ”rŒPÌ)ŽgÔBÑN¸—§9³„»þ‹j.q*¦‘·Ù:¹Ï\Ì#*Ó5õæ:§2ý•¨D1è¼bˆá {ˆF³2¹íœý¥ÛïÖ‰¤DG%$¼ý-ÐaèJýêZc¥\#Ž8‹¯*ÉE¼é’¥Å"’•îÞ#²WöÝzS¯ÿ¤°†d(˨]þCÄ3Ô„Ê>úpŒÁLA[í~ÜL® ív\!½#PM¾"®iˆVe,úÍ%w=lÈG¡——W_¬Ä©Òâ*½«q¢”£œè¥2¨W¡†Kø·Ô6$üÆ_Òv}pljHN^Wr![‰ªªºÂŠs&Is3SËFç:”êÅæ\½>N£V§Çyi™Yª¨ÈÔf¹õÏB›¼´*0¥(!S–ˆ\²RC³*]lIÊÕ7.2ezã3}_ÿ÷wŠÄâæ¡ ;˜göäUíF©Ëv•&L0®E[9.evŒ_¥xŸMü%Þ¨øß^¶& Rʇ0¿A*^Ï\Æ qÃ(¨Ë©ôÒ(ˆ+Š‚y¤ÌK¾¼KÒ´¥ç’ÙN©Š®oó&p¤1Ž•:QS¨R‰ ˆ Êr­ÿÄÖ«áDaÖêíi?ÿ6mÏ~;°©¡4¶åš„ÍMäÓ›N¿G2zûõd=R)ÆIVÌfE1Z¬–aû'}+ˆV³Ø]Æ'Ÿ5D¢L±—‘6Ù×Ka 1ÎÕU¦Òþî_\¡ØŠíÿÚ·÷—½‘æª5Ë×JºŒÄe¶/#ëL¢q wUZ½›é­3¨q\â «m-kB~¹ñp„ìûz®qv’Él7ÿøÉˆÄ‚×NùÍúLû¡ýkÿ9™1Ô³“–)»}0Ÿúˆ†gJ­W|Ê*a»)†e0ä Çüá.Õ;ü‹sU…©õí[0žÉa|ä³jmQ>βj÷û”æ(PPBuGC#¬ÖÔ1U³"`Ztž7Éb f©?8ŠÖú&}ÓóØGA(¯@Ç":¬‚Ê-]b–ª¦ íþÿu/¥’EÍ›«ÏÖb!Ô0#´Jˆ“‹DؘlT0Ž«óPõúÞ…lo+ÒWMüM{4‘?ÿ¨PdyÅLïÅÖ #§‹vÕ“&ž4Ô†‰AµÁ{):ìz @£BüÏ¡8Q”>u1é”9N‘’CîW‡>gmôÏg%ôLP¾µ!³TÌ  § þ_žÞ¶0Ö­i‘¦s†¼Åª]„fƒœ4 ÁY¥8¢T”,¥Óá_¼GºØ¿ÆÆi; m¢ª…Ãòy… @A…ì3RgǸ¦8G>ìý“Œ¸¼óš›Ô?ʺ¡$xÎxAÀRžóÌO§-Z‚S#R»&kq²ÊÜ´rÎTg• âHù°A¨3â ‡¡U솩¤X²… ¡M¾ÁÉ?ÂÎÝ“ÄõÎJ!]?‰lÚÌüqöÂÐy ¢šÇ°ìáÀ¼‘6sjÈ‘ºHYPÈ­Úl O¦ñ —j¡À@CâØG-á\A¼˜‚ûÛÚ&&ªšÁªRx–Tg3ÊSnðŒ%È*œ²e ªBøâÓfðÐO) p‹`”fM— èMB¤cÀë Ø£—ƒŠÿÜEÏë|ÓE‹ÁÓJ¦Ñ¥yKˆc8ƒBÏÔ?%B£LÞT9k¸<¹PÁ†ËË"؈ª¤Òá™P²ŸvEŒ¡`Ge›ŒÝÏÏóZߪbŠ2ZÓlûåzrêÝŸåiÙ„FpRîèaù4¶šæòÙGì3$åj² zuW˜"¸Ö³ºþ?O3ÊüíV)œã”†%.ëÞre,ÆÞÝe$¢K\5ÐÉé'­ui^5ÒˆÂ4a†je×S•ŽâBÝM ‚†°R¦sZÉm’7HB»…N$ àãm¬(´è¦ßª$›¢æ%|^à’™·^ª˜™E9d0ˆP¸½Åh¯DŠÒÔiœdÈ”kÏN.¦}-M O&Õrê)Å)J×e8·F³îR[ÞÀ”’-þ€2uµV>X…ú¹aAVœ1*#H„åC?¼Þ&ÜÃ3Ϧê㌧Æ!”ÛvÙþù!˜E”áAÙ%š9øöi:|'yÌþ=¶Oœ!„$Ž´û²å çn3ÄJ®ÓˆÀ/  ûøéú-ü.Ú¶IÓõ¤g~ 3S«´}©îêv1˜ ªGfLæ•¥*ÔWd ›¦Ïücq÷Õ]i~‘%©ô‰“5ÊolÛ*Z©4£¨!œÉw²ô¬Êâ³Q¤Óí?BÜÜSR’W¿R˜uÅl®‘áPæIõ0Ô7º•aÖR0…Ý{põUL¢-þƒ~™Lt Ò¹æ5/Ô£¿6&í;ü†Ó“Ñ!©ÀŠÂÓ—ˆ®uÊÑ‹®ø/¶ìÛÊM6r§[µzöÕ°Ï* Ffb•6“ô¯*P!Â1æ!7Šl³iПLâájؼN(ô.ʺ»Œ–tu±z‡ìj1+Ä*Š®vÿrªpË2¢¶ùôÛ¦·›qr£¥óž¨u*Ó¯DgL¡uï}NƘ„¡4W)8¤¼ã¬éΚÆ«Va­µ×~Á$2™&.ɳä]n ü¶N)øÉÝÉ ¦*mqfrЇîz“7õö™[-~Z×-Æ£³ªáI ×FŠ®bê“ÕZ†Y u:«ñ:üJ:L§Zº¥Šò‰›6Z¿1¢ŽLsÖMýz`˜ù•vÜ®}Çôs…d¡–Çy‡!H–LK$‚=],´ Ëãÿ=ˆ¼÷FøÝQ;‹³ éöU•J Ú4˜Ü¤9N ‹´W\ù 33XEáH[óÖfîãzãã"öóñ<Ø_™^c­_ !qPç)‘Ee3Z[/NgDíe[š—ÒÛ¥ºü¨ÇdýÿÜV]Ÿªq~Íb&‘uQ^s¯+Ce¡Ž‚è®d+°CiqhY(ù#nmJ¤þùgÁ)jqZ×qt±‹"½Ûü[©"v_}"<‚4¤lÿÌL“¶TòQdÛÓR–!HG#PŸM¡ 0ŠÎ®²uùÓˆ¼¨#ÈMì·ª±KÌR°„¨nj_Bcâ:ò—ëûmW¡(âêæU¨CTÞA˜©À©3"E«±3REÞÉí³S/ ¹½ô ²ZSÄ“âEcá_Îþ!o“ØÄ`é8ê»…WC+±µZ¨AδÞÃÆù2É”6çëáš»¦ÛøèCÃzª5&¸Åb<쳉! ¤Y @¤!§à¬:gÉa,ZµE;îªWa)’ë^å,„¤Â&EÊnÖS¬Q"PŽ;PÈsÝ’"ìATeo¶IQwÒl¯&¡f¥f ’ù,ÆŠÕRÑbݽ6©N (­2ÔÊR3E0œk£r"Ä,öü´œ|ÎØ×}î´Þ¸*#:6KïÜD%ÅÔ̇ÓõKxD‹RŠš(çT–FÛ-Ú(Šp—F¤›ET§)}f·É”⎿|U‘¹SŠZp¥2ÔÂ{åp‚„b}¨ÇúáQL¸6ü˜^¤€ŽøVìq-²´#¹œ#|Ôç1WtÒ#xÜ~"eQr³$÷ïÔ)vVCS¦;¨K½,ŽBÑ8¾º®M~"H¹£Õß•,£¡Úܦ?2Y÷¨{?ÑÕ0Ô(¥þ×±³[6”5éJ§ž„+÷¥„æ²#ë„ Äe˜‚nhAJWES]Fòl¶lN½vnѰLçÂzÎ%ÌËçÎ4¨3ˆÁÙ-´ïc0fL„ßl«!ÛÝÏ$¾ÔK¥/˜Þ÷cm¯¡’Í"»¥U¥®ö4ÔX¼®(LrP6ŒkfsŠÅP¦ÿÉ3¼TZ™Å 8¸H”òÅ,žÓ„èI-ÎMïWCµŒÙcs`¡ † §1Sªgˆ§(³Ê5{ü•¦Þ6»tYi%>…÷³¤·â «1ݦü è£0Uä.Õ¢C 9G¹» –[‡8W¥m)ÎÙìnÆ:¦–‹ÄûÊ]$³ÉCÕI„Á™Ä>;ÐþMç0¦Æ˜…e1«TÕkÌcQL¢ìOz)rƒbåä¾qla™kFFG”ùüÉq1T§p—£vú 96ݵ>¤¨|Ôá; 2ËÎ>ÄI|‘‡%•Ýël2u9¬”=¢( å±.!¨z%È/šìÜœî{Zƒ3WhÝ“<ä9„Þ4¯<ŠÒ¬¬vÊK:>e…ZYùùF[g{‰pF U‹KÕ° U ˆC·oO˜ù\ëRš§ y¤¢ÊNh¤~µ¬`r‘Å ˆç"e.0‡[J®póeŒRæévÿÊÛ/ªLÿ¶œ‘…`„—FœtF”ªÂå½ „qd°ÌAäû3=ìbù„µX¯"W{eN‹0ÒZ•öº» V-ÃyšBßf2ðc$¹–t®å)Œsݹk§±šu i1Þ[S…9+–D[Ù>{rweç9ˆÝK”ÚòÕã8a:&–Bê b.Ü!Þ),ú™›YÔš7…%Dîæ6žŒl; µzøO4äEIE{ßêæE9Õ›…Y—ÏèN·AG$ÔáÓ£MQÌ´˜¦B• 5ëÃÕ¡îÌ"Ò/åo ç AMVÖ­m¡=Å)ˆ¡ 4Éh!ÎbAŸÔò¬L¬¦VX|'ü²ýîˆ*gú£Év†8Œh‡siHvv«½D‡!šôa ×ÅKR³Vº„ü6x§¢w•Ñõ|É’f1&åXãVœ¦ûX™ì*”æ<˜—bªÈ"ˆ´yÓœ~‰Øÿ_â~nm4´Òx§[æZe%^Q¨Ò¢3ðvîà ªôò­(š2Ý Bñ…>¶^rÐå·½'oˆ."©ÊÞkìú%5&¨LñZQ.©+a°£Ù-3V”¡š“Ög·Ï0èJtSú@Í3Âp±CŠ®Jè…ó¦wû3RTu%þ©ë⸞Ȧ“n3¹(¥RÕrkç’&ð0¬Ñò©[I«{ÐÆ¯qÄ]6=®Cƒ’B¤ã=&}œ¸]¤!^¿+ ãü”§9šJŽ[I%‘@‹qRZV B:t‹È¿‚ué­!7i¯½´¢ŠÂæø„)_„írt²:H¤ÿ‹?z„ «·5û5hd{š# ¼ìBð¤˜ÊÅZy$tâ~)Së6k&›ºëÕ=œüK¹ªëÂ¥]HD« ¨I”®ä®r.&Í=;B:nšãz•tYyüá;«àÈžË\yŒ¤-yŽ#¯Ä’¹L0ÌÙøanä!JæµmAí<¦¹ªWé©Ü*sšO¤gCb¤.±qxd%1LWÖQ8N*uÝ”‚˜É,„*Õ›Ù#x÷OÃtªè}òæ^‰ñ«G lÜ ¬lAšbþ¡±ju¹®Tvr²ùŒÿ‡ŸYè'>Šæ™­¥PaTD±‹ÝŠÿøÉˆÄƒÐN©J§Á›3ƒ„³’Õ´£WMõày q§¢ læe®G¤ÂñÖ„I¾S/ù”{Oc¡Q¾¤a (æ:OÕ‡ü(JÔ„úYkL•’=|ý´‚./´ÿ4êlê–³³­V(:dZº¤úí )›i;ÞÉ¡SMpÂ3r9ä­ux<ÖÊ!¢°Â(@‚·ôâùNº ¡1A=ÉA|ï~ô²&×™„œÈT·H¬ØŒAj¡ˆU'=Òº¨„šÌ§ÉŒ\@„Â%–Û»ÌPgœ¡Àp†…žòª¿ÑÿJºõú^ÛkqŸEºsQÒ›!ŽÄ#-ò#Ë3rþÙÕÍF¨”Bé&ªŒ[R“-|Ä"–’¾ÙU%ÄXà `!«ý!»‚|òanTFüýƒÔÅñmd'NψX‰è“R–bQ½ ½õ ¢sÚÊ1šÅ‘Y÷HÍçÆ÷Oñ˜YïY gòš®q v sXŽ/0߸e-n\ÇEÁ/ŽæTL&ß.ØnJW¬f»†I×ëò¤§±Ø3V¢È•Õ#—Ä‹¢— èxŸÚLŸ®Ò-„)Ä; ¡UŸnå˜'›êÿûM{¼©8¹†-BÙñÈU0½&-$,¤椫ršS±Ôå.œaª³Í=ê"?œ!ôþbêYkLiÏ!©@E‚yÀŽ/0ë¾õJº[Qåý—½›ÏiË«X¤#HdM™jlŽ ‹äWª9Ë•ea(FáoK9 y9‹Ë+º‹GæY3Pš²Žaƒ€áO,Ĥ™4±9<LJ’BRk1‰DN×[­jy“YC‚"¢Ùê»”\š­D ‹¦«S«¶.U‰„[ˆJ§j‹O¶ÌObBÃ8)È€‚Mö.žiW J?“õ99÷PNÍÛ¹„Â]>çѪƒ‘$`‡flJ2PU‘‡ÏÚ>ýLŸ‰!Üu Ï„š^íêeÆ2E;ŒcˆÆ Â’…ùI‚kæY¨êj½&/üQybb‚Pòý¨ÍÙØj¡TÃF¨”&ù„E“ ¸!“vDñéý¬„°™ÎX£8(B,û—C\`¼LjTB=- h%ÆyõéLì­+Zé©‚ŠcL× Jˆ-W?-_¬gѤòj´¡^IÝ~.vy¨Ç8`` g½à¥-»2%oˆƒ·‰œ^âJž$²ÞŒ¸Ü)tOu± #“ÙÌLäUî]¡«oä5Ú–$Ã$¨B~É»‡‚ÔÍ! ‚…"ÒR*A.ÕÁêLl«‰R}IM¨¶¶i†A.ÖkL%˜´¬w£P¼õ"0AGÚVE䲫×9b!L#ž¦Æùò~7êy“ÁJ Ä Ur­j½¦ÌË–Õœ–d~VíÆ—²Q^MÃŽß%µeÍiÒgAœÄ^¡.ÅE/ÖIðØ"%Q½}=¹ø™+H¨(!Á•eÇCiT|–Ëk!ÊçŠ]ö¤$·ˆu¾ÉdH®"&Ýú†˜Ê8Çz †#]’Ü’Ä-[lµµ¾¯’­»KÍQkÙ¦Èá@aÚ`â¼iÄ¥a=QÜ›½RËbNÚ/ry¨ø©ºˆÍPÌïܸF ÏÏëuC= V½ÃewÌä©%ÄA¨u$ƒåjžùÂ܌˜b …–ŒկV‘|¸CåØž~âkµ«‹UÝÜÖJ¶sÔJÈ5ˆuƒQ9hwƒZ²æ×Òµ„lÊb{Ëtä¥05ºY—>˦(⊳*Ç$­ô&|‹NÍʧ3­ªùÖ!NI,I Ò·Ïñ?³ä=B0RþL™*Î"–«ŠÎ#¿Ô¶¾{n^×1®{—9ÛÕ‚1‡/–Á™qÂëÙw=ô‰Y¶'ÍYZRBj|Æ‘ŒŒúÅÞ¸rÅ 9É&Ä2³J»¨K%£79%z³‹VòP¥¨z±¸5Us *Î öŒT‹C‘ìv®ëÜÿ¢>ô·*:K!èÉÒž+(ÄóXZ!Tî«L¶sNLa~”¯Õ…&t·kò UcÝfœ¼©†K(Uá@ÁŠ.СZ˜Fµ·ÓijªVŸzñ¨}R·)·ÓY¹$ì[¨‹±A’¯Ó½Æ$äß!¬$¯ÖE!+ÄDã±KfÝ“li òΓ–cŠêb©•„FvUêbS¨þßQ,îß&°®„²Jb{´‘+Û)ò¾Aµî[ÆN‘pÄáÌlj{qsR¹tŸ¼d²å¶–çOÅ«o±óói^ü- f \ZK ­|÷±1·÷mœ’7¥Gy5Y\”#;0”ÞªtrGª!,sQS ûž6Ú¬š´N%Ræ)ôBúÚEÍõM Š`ÀÀC56§-îÚ%{‘ý2›ZIÂý(7”Õ_¢X„¹÷w³ñ™‹Òæ‘Ôª¢­Y‘d|OCLݘiŠ&G_ßÞjÝ;>ç]bˆÌîë;ÕÆŽKŸn¿4k\”!¹//$…wiLæ\.ƒVÁ$A}¬œ–ñÚBU.R]LÍFR£x\šŒ_£·/e[¦g#{ŽÐŽaލ¹vVta¬÷•1œ“—Quö~„šmžälï)I‡DQ Y×Ù(æÁ g#•o¼'¨ÌZÐDÚzƒu)¿¢Ðÿ£ŽKpâ7kNiu1jô&7Ფ²D•³ÆßB•½šR–câ9Ò_µȓ ˆlÛ_ ǵèËåÂ’Å]WQd5ÓiÄäÞb¹˜s‚!+@¢9-"×bf’¯T¦CÉA¸³h¥Ç½Õ¥[”{¶ùè”v⪵ƒéBØe³tŽO&rés‹"ŠŽ!E?ÏK[]ðt•¸qÕ’tª“¨j®çÈØºÈCù[Mÿã¹Hê(ô-š]f,í)*Ô‘§&¤ŒtC!±=‰¨My~*¤´ßâa[=õ]ŧC1ÇLRqJoOYg[±µ,kZ³A!.aÆ›ðsk¤GÙI"Ög¨)œ÷dâ–äJ“ÎiJk?l{Xc·˜ß5þÚ?Ò„]((b¬¼âˆ}fÁ-D#3a»-ÜõVqÎ%(¦WeõlÄyÈ×FC“'8ˆ¥2©3²ÿôûI­þI ¦NÔZ'xYOëÛR¨s”âž@:å/u¤—EbÜLZÔ-oÖ ‚nñ;*D"1(ÕVë=غÖE:TF}xg£: —ºšXd1ÐTŠ´±l,ÚNBòTr1Ö‰ïÈ¥k—»4‰A%+1wdJ“·T\!ȤõTÆò¿ïü¨•öj›qb–¬)ì'‘ù11‰ÀO`( ܵ.€À¶„˜„ ýÎ @;ý°Ïsw¨Ñ®ìÿ®/L6í¸»Û•éPÄ3‰Iõ¨b0“P‡2õ®R4¹:¥®ÙÓ3fˆ9ú³Çgû#£Üâ“•A\eÓmE L‹½Ö5y}N'RÓpÝ"åß>AU);ص­ÆqìtöÇD¢ /Ôq†Å­ÓŒÎ‹B¯bŒ¡Þˆ„)¬DªÆ”ëßFÿå3KiWœ„±8¹­òj6}iâŒòVV£ÊÙ½W eÅï—W|öÔV‹ÊB=[Œ †w^=¶‰E]‘Œb>\R¨»[½Iªamz1kÏfrzI<“{½Ùj"¹lÔ|ȇj÷ƒŒWâ"»ˆL”¢‡;efÀ¶ÊÈC䛆8OmbI Îë·VùTfú¹›³®>%Mª,n­SQDÅj|—’T¤%Dfru(vÜ"ÖOPvJT¼[›SJ-]î*5'`"Êb^ §?áP€‚¦‰Œ6É[I§³{RCM—·C_tæ5’cnÝu*Fz êDWþÚ®RŠYÔ&R„¶Õfåv”‚;áÈq¨9]ƒžÊê%º¿e cr‰¤›\ê”9iÄC‹‘Y×¼Eχò·¹ŠË«";xòþé?„B=ÊJðg8ÒaZ¿ÌÙ0c)1!j4’-³RŠÈSóôÝ»ˆ\ê™?ìÈ\̶±Uª›ï™žµ/„Ô¢ÿ¬´IjX¥OiÔŸÚI—ÆL–Oì¥W,"ºÝ©ÉJžája“/þÔPDZøb§Ä´ìÍoò¤Å©sHÔÙ9D¡_ÙªR e!ýª!{S/F™Ý±¸ƒêU‘y­¸m©ç] Õ^+ C¦¬ââDZ+œrÙt&6V¸û嫉†üÞßa-œŒ6»¥sJN0å/èÁ7S•¹ÎýéHò1jnESö¯+ ˆKt{! äóS» èÊ"n9ðobÛIM«ÇQ:æU¬FC ©Q½äÎ2 J# ¨Õ¤ºsU¸vÏOÁ´‡bIˆò‘<Ò˜BÔ„AyµTFe[é$ÖCÖˆGÛ³Û*F-IˆŽTÓýÄ)»—7®üq¸³{unÞù¡Q6­!×S(9 LAAUO>sÂ2¢+ŠDg+o$•cF§“)¹…Á*ðš!W~øùTÚ‚>úÑê]á6­üwWj2¶s*TB>¶‹;ëûÄsJB7›5 þW¤Uò~Ê7|í¡}œSlæ©¶b!”¤*SI­¤áˆ%oã–12•ñµV‚(™ÿ‹ÁW-IÌž‰2ˆZ•†*úï×™,m÷¬«…ÄS.yHd©ÕEΩ”D%uì^Ã”Ò é¶Ýüf^^cñÔDl¢º¤Ü¥8UEú”r‘ÞÇ-’&u–B÷{!K®§£UïsiDQÏê‹f¡Nqmß§aHU[m)CQÔa—Fñ¬Ø+öy©™r\Õc¹q[»Éw#4¹B¨ˆ{b¡Ü¤¯UD`É~(åeÍ‹h«ŠÉS¤¸‰ýQØWNƧêªB$¤£êñßKD+¾bäÊS ‹´é:™ZKµzCŒ»CuÓs3]¢’‰øg)JùFŒúÏ{LÂÙóLDrkÞ‰õj ÙÖ™vBY‚”S::ã/-(5Ï:=>¬C9Qµë'V™ýÚù{=T¼¦5Ö¸_!\…R8EçÞ«PG%¿ÏVTܱXD¹qšêˆo1LÊ.¿g$V…ÌÝÁ¥¨’*6!mCD"ïÛ_»”ä/¦é]†0ͤuß¿¼„C¯”†NE^e=kûÇj¶uÄ8ŽE6ÓÈîFs?ãëlT1Ô„¥{‹IyìV73Q2ÏCaø‹W‚\.23´•? šµb¹;ÇbSŸÿÊ_3íIqXÄ7¾åoLfÂÐ{x¸Ò¸¥TF~Ê’6Ê….r8Œë\(ÒuhPöö%Lu%ù8ziŒÍÖ*³1ÇeªŠËm§:&ꯥJjgy3Õš†¡åqÔ0è¤ÍR›¤ƪˆ/=D,ÅIml­µ~Œ´Õæ)èá|´ZyÃ/!Y/ÌbIÇÏά¢æh¦0ü¤"½ÛF+¿*ld:ùÅÚ'k:´«”²éMIºÚÔ|êù­“²q™ía2ÍÆI‘nã‘D/¶‰G.’ÞÜ\º”ÑP…¥SÓ߬r¥6u[œr;š§WšK»ðIh”±\+ؽ¤Ù-aÕäµÜ¼D)½÷û©—zl´8…¯ã)î*Ñv«MBÎFC]SŸ7Þ‹â\BöÓ“¿X艆!$ùŸÑ µw œRIÍ9æŸÈ‚¢H&™IµÇ\>bŽ ìÆÑ1ÈR&PJûp÷:!‡ñµ¿sh¥­­q‡x£7 ŒäM¹kÙDFË™6õse{)WæÃâ{†N=ØZPÊdîËSƒ/°IŠå½ó¦üEíI–ÒSȸ†k»J!’¾Ì+1Ê'xËåúǪLߪ“-/ġƠ¾F/gjb ä½STÕF¨®vR9W^[#×ñªIÈå&©m°UÕ~#v»CJBj}%ÏzÌý¢aSÂ.";öjÞh×vZce“;‹#;½Ä¥*) Ü;SÊÕ"í¨ÉÄ í"‰g²I}¶!ÜÜèG¥Üˆ”º+¥R¨¢2Ò¸rÜ¥A?<Ã÷³"Þ-ÏtºØ]jv;¡l(B¥v ¦o^d9±:­ì—>>\öɹڳSŒ–~ “ÄEsÔA—µR[“½~—+:éž[x·?oûóõ±ù‰i’T|ùÛn Çg™bœÈzÝœ‚[üJetK—Î.÷&XÈ–oA†H§ÉVj‰‰Œ†K6¦]h‰bRÝ­¤›æ•U_î‹L/6í†gSbX¢–œ¢•Rè3²œ8—6U"HòN¿)ß@æY; 1;Êót\-!‰EÓ)ãj GÁ…˜…íì?Ðr Qôž‰Zÿ¬ø¤9‰G#»j:¤ê—5S4ÅJ —òqgZˆŒ·7 tZ‘jD™Ej‰ÎB‰#S¶ D;a³UË‹¤TdÉw¤¥ogˆ™³Í ÈŸS†#¸A…Þ@ƒ'ôŽA6–nÍ0õ®¬Ñvé1ÿî‚è†h÷bŒjÚO|Ú®Ù«‰’òåIUÂPÖÒûÒƒƒ‰›ì*ª8Á®²=ß7Bd_î«õ6Ü›Ÿ6v=*b³‘ƒR.H*Y%³b*c©±).VŸ‹LêÜ^°ÿøÉ˜Ä„gNüþþ¨ÿoÇ_ìoú¯ÿr¡´å@žñGñ†—Ú†kéÒ¾+‘¯ÀšIZâ7qØŸ5H:½VãR×§­~B y- rÓô8#§)W=L$¤õ(©ü^bf{ÎüÖÜñ›ö¨ÇY£ÓüÄ©jå ¹lœv:³³,§®zF¯šä3-¨ÔD¢jp“j·é;SLÒÑIUŒúZ#ær+­‚¸M#rÓ“Þ‚U9ò‚bÓñלÚ^L…#¤ä*¬”ÐC)ý "\þc£oLU,–âÐ’Ú¤‘Ãu-AÓŒr¹xÌu3\…U+Ýùl]Ü·&#rs3¬ØYss(Nt9V•Т'ªR;éX)5<ÄFµ}õÔSI-vU4¸™ìÂ1VÌq\M(@Ä ³]ƒ™7LÕYHs*ó²Ý›¯|?Ÿ+½¯"¢‘Ë…I—WØá~ 9ÇÛ9wqd;Øn«]kéÌù^Ùçæ1J»ÄÌìâ¿#Hœý) U—|¶DVªÔÙì2u«¥!§ùèvQ=‡™OÇ:UIhÕ.WD8«zP«Rÿ)˜ø¸½¾L~¤—2·m\Põ qŒÿZˆ…Äô*ˆvJfØRÿ}HT„ú tùé\¡î¹B¤¦‘ˆsXÙQÕ–¥C¹ß×»Í\lÂR¶Ävæ%ÇIHOÓBì– _=ÊCºÝë*&îónvŒ‚u1d¯cÑ”ÍänÓ$¡ ÄÇV)>áÄ2­*Gd[¦Ú-õÓä¬K±bþÑÌ!öfˆ[œ¤4¸ŽG'.7(ÆËE­ ¯z7-#WéG{©ÑÛØ‡!DFú ‚69§c5jc£L*ñ5}dêX­m ƒR.ƒ@«Š!‚ˆÌžž"ß©@Å’ÛÆ&r멹Ìd[Kú÷V>‹‡1¹p!=)Èâ…E’æUB-z¨Þò]è ]&ñcB+7&JæX!Õk²d'£Èœ×L•G¢âa-’: óù_(Vu¾ê'#Žâ¶9œµT‹å;‘HR¿•¡½°™Id¦{o ¦GzýÄv¤Ù³©*AŒsÓz‚Mì;i¸äZôl'á}ÄrrzUH±…\ê­‘b.b«èœ)ªfi«´Ä=þþÙc*’ÊsÍÇ8¨·¤Ä)ÔN%¡Š+•¯b{6n¾ÒÑ¥×±Šl\V1NaJ'=ŠÎ\³œÕÅIK©ˆr¿qpš¥^ •å·SÝŽ+g³¤‡nï°Gn1_ï_¹ÒQÎé´0†1G‘¼Ý‚ Hí‚c †!ŠÑDT9˜€ÇŠXS]‹°2›(‘ª2„Å™ÉÚˆãW4Lcá&¸Ž:™D+¹…áÌ¿© ìÇê3„Q›òb+„(0C˜#ôžî;AK¸àÈæoBBˆëtU%å5@Še…-Ü„”²;Eg¤|GƒbÄþAÈo ÆÚâàÂ¥S†G*rQ\9¢ƒp&àÂÓ(dÈØÁië ‚¥â$ƒ…ÅdJx±Cœå4Aø…3n`‹i+vg»Dá‚a½H¨V$[ëmAxèQ„Œ0$_4Ç$Ø‘:6CR‰©}ŒJ(cØb$ ´ðw•Ž_ìf‡Øù‹˜£#R‰˜b)…Ÿ3N%¤RTSÍÛwE¤…3q ª3¤ŠÑa#°žâùàIÈtCäX¬2& ÈÙÓÂ5ð™ˆ0€˜@‡9kŽüâ½g"Ï’a @ÈíEÌGðB8„pˆ$_\#³=àbá¸D‹~ÅçùÁ!0ЫcØ]^;~gÀfbõŘQC9)à‡Æµ•ˆÆQ8†$”Á¸p© =B™…aJˆ?'v§8;Ú£qc& bS•ڲĜ€›"V˜u"#ÓzDª8«Dƒ QE¢q¦àNBñKN:/`T¨3B3,QÙ_q3£ 3ŠÐ“òGÜeC“CFP K þ`h˜ÁŒ‡™QÑÂæ<úDr;˜2Þ‘†ïXûUAöLÑpÜS[°sïMI Íj’!1Üv- Ä ¤C?jY÷Ô¢¤¢ïe „j½ùˆ¤JЪUzª»aQ÷ó ͵åt¯>M/)ewäÇD[‰.'«®r\Ãf¢•iš¬Š[!i'Úš²56"®å S“Q„Þ±ØÈfBq<ÈAoqLW#lÌêô]¼ß&jn¬¢²'”Ϭ>§é‰rô‚1IÙ¸Øó¨S0©3«þ;…*[5ÉîFZ IY¶ÖÉ…:Öÿ+¨¥"/6[¨äÕ©¼¨\<¦%‹.ºôÿJ¹Õñiec;\Ô3å*)Nõü(9ÓŠ!í%¶)Ô„rëiÒâaùX”>2‘ËF,Ÿs"Y)Žˆå-(/ e’£ ÔÔ1&e1)¤ë£ý84˜˜Ð䈋þÚÎIWnz^GÐãì`0¼ÿ¿G¦Ú¨A’± 1NÐŽ#»1ŽR«B&+¢ñ‰—ÎéRÞƒ|(¢KM,Ü㫨Ec a‡,AP#hÌT×=]<“Hõ®ñøq‡%º6É\&‡Úɸ“Ž8¬%H ãb\Ý5.B%·³„âÕ¬Sg/²% øo¦›žï* 3•¥9S{ë¤îÆïÿ’…«vYÕ¹ÆGü'ÐN˜ò Wá'…#rÅ”–ú>Bý33D¾Ébb¿÷[ äC\ôJ5UÂ$uÈB…ºöÑ/ÜB“4és´ï¶A;¯Lj,üìu®qŠÚ#N}[ݧ8ÊaQÏÛ⯒^m+æ\DIzÜh¸-ÙXùw ¥,¬Ok1 Â/ZS”‡©V›Y–©4¶®&lý²YÈQÇs…O £9ˆ¢#¢4„i Ū¥l‘\{qabA.ç$=%ãÄ£U¡!% H¨QÄP…IÔÈDsžDÞ çê”1*´$ÔY«v¤ÿJej9‡0#‹ ¥.í‡.šOúzâ5r¥ÔPïˆä56^&3i³j˜1Î!„Ž®ËEªã}:ß™|¥¥àGåÊDª×‹‚æ.¯áƒm¥ Ûžw÷”Ÿw!¯¥\[fƒÏz‘Øñq5ÒöTrë5’FÔhÎQÜ¢¥ÐC,ŒùµÚzŸ«b­ÎßÿMîîRæ ¤îzÑ“yu.b1HR²šë2¨Ÿ¾ œ¼*àük4I6Õ-‘Øêbc¤¯ŒEq¦|@‘j’‚Rè¦^Ç£ÿDË`Ü.d›Á‚/„iÜSl1Ø›v"ö‘ ªŒˆqtõ´–Ÿë-çÑç©Õ¨…AF+rƒ1îísæ6­qãr´*˜U;е4I©BMJVA´åD@¦ ¤Ì#Ý /¨ó›èlªÔ£z¥Õ»þË‰Û©ÅæöósèâëÒ¸…ÎìÕÒeœrõŒj¦X¾ÔÿC]&I ²[™¨ÈÉeù܌ձ4õÜÜ–i9}„Ä¢1q]U9DW³a7"³²”ˆ2º¹Ñ)|"õÍÌ[-’Ε‘S äË%Ñ[.-Ú¥çÕ5ô*ú¸B.‘j")KŽw¢lcá¨õ4–îzÌ„2È»(‚ؾÎ|/®û©¬üÔFrhÔõ_<ö¥ÿ³0bŠÈ“3Ê‘ÛdïîZ’Dç(ÆçÓ§©¥Kü؆›ÂvÙ:“¯ ´*(ƇC*–gR 1ó¹2þØoçQÄ[¬í³ËÈM m|«uQ qŸ[…Œ¸Q³[ÓEÅ[“buË3î‹RV¸Ïrz£„NW3/éÙ>žÕI³Ny£ìƒšÂò²‘(f"ùµí3\Š"=wŠ2,CsÓF&TÉ"¢&3w—§ãò8õmʹªYZéÄGºÕ0¥»~£‘U…+•–Û½ Æîõ#ˆ§sU~Bq’‰¼dþm)®o¹ó§å¤¦•>ç+$Q$bNk5ÕÈVš¥ªÓ̽Wã èäQÞ†ï¯ êz ³#ñ_× eªúf™ñ(†”™E"[¯ C(šþN&3S|CŸ™$Fedªö-w¢ÛE¦V:”½aG9×1QVgâ )†¿ˆô ·6aä)V¦0¦rÔ²áü«½»S¾âVêÊôl.­×³l‡©µ$ŽÚ#U1bp”g¦IDåÌר2åÂ&™“¨SQwþZç¦*ÒE1X•MmoocTýVTT¡·kdW:ŠØVæ>Úš&å}š%LºyÝLÅz.yÉÚ$ŒZ’†IVŒ3m ØúÍB.–œëé¤5•uüˆ#úõDZj‡ãßzœìS±Hïsg2H\£¦{Œ•Þ‰µ/. Â'9Je4ÉÂÚ˜”{ÐI›*X‹{£'¤â«½(J›FÂU_PA "ó¬Å¾G’zˆsvcvØc¼ªÍµ"æ}œIXŲœ[~ª—R"©Ouó Íf®‹"¥«9ʲK'¶ÉÊ–Hâæž*(¬Â4á6²ŽN=¾Ý–Ý‹9JËŸ0Šì¸ãÛòØÚM!%E”ˆa–Xï"ï´Š»t;µr–üIÖÚ6')·EV˜Ùrö7´åq†0Pç^#±)&à‚ÒaQ¬¨%D¬Óë}ÊÍ7‰Å*ÿ ››uH;JFûEˆû^CëYÙyl©mÚ—Ëf^ µ?ºDr˜`¡B~ âKœÒMµÙ]§õl#”Bé¿%WSñÍa†Y ÖÕWxIJˆUˆ"ÝdÉ-ûJv¿“Ì6â5ŽG-$¶…!$uí àrX,¡Ÿ&9+n[T"ÚSÚY<,/ ‰ô"®à§õ-nLVb%”g`£ŠbýÚÄ›ÍF}FELm/±Nn¡JA ck ;HÛ2,…sœŸI¯%½4"!«^"ÜŽ¡«©5I:”òŠŽC:ˆ’+æEe{¡ˆDÕ¾K}¿”Bz½’×(Åd‘tXóOV•%¡¬¥Ç!F î¾u7·Èÿbi¨Ü»ÏELÍ—¶,ßPF<½ž›vÒr5*Š”0¢¢„#µ~LC}è®…NbØû•yS+ý”Ìä;÷I!J²^ÃÛûé¦2%óԟܤ§K…Û}1[ÎÓãˆëÌXÂVÆ,G©yÒF“(ŠzÒ¥¡‰0¼L"åîúóQQJr\Ç8)¥Ð¡‡Ñ$V¾rR“)yíYäÓŠ°½Ó9äAÅK§˜íê…9ÐÂEZZãµ8óAbhÞ&Ä3;ÌïTN„:4…rý\å«ÚªŠÈŒ/Öñ¥Ÿlí!ÿGþUa í^' t÷)†fVX‚ÈAP¦áÓœÛ]Û«Í].I6Ñn9ÊâRÉè¾ìƒJÄ›3n‚ ·oQ 1V଒[c¡[¥ê¿ô´V[,ÔËRr›ö¬ÿ9*f”•¬bˆ8Á ¸·^7¡›÷D:óH¦üM·bt˜›Ž¯QR¬ü(@9Óí¡Yd¬Ú„Ýþ»lDÒù’íò·£tâD^îR¹WÖ¥9EO‘9l[ð%þOÚJÏaê¢Ëf"·MÌ B& FLC”ƒ:ÂhQI¶BKSÔZHª‚ãÿZ‘>^(Øn+¾Hgå1“ —lÒ8·89Í/c†‡„‹ t$ø@R”S':ûQv)D@Ýr†uö+¿»%<‹±¾²ô^?Üü¢×¶äUù6«žüD0\TjÂä21)îr«‹7ÚµÊ{“°´ ÂÄ(¨¸[OJ§PYÔ¥®QÔDªJF¨ÆÑ1<"”ϳÿøÉ˜Ä…`N@ÿø¿ëïŸö¿ûßþ‡ÿ˜´ TØPnøaŸïhì…{a,ÇŠ.Þ)âï0„|Ö‘JJ¹Í⦕s×ð¼R²Ÿ•$q|‰"ådæÒ)¦ú.f4Õ;9·Læ­Õ2² ª’7Wý~NmÁÎQMÊïôơﳋŧ§mmÏdÓí¸Þ¹w3¼vbºÄ©Þs(”&•â+mæ*ÉGçßY½†Q~–V!‚È|ÕêÅ9Y•…Õ¨RzwÖ¶s0ôW+дG)>…Ç8B§vÊa,5³HdfÄò=pRiŸpþÒUñîܯ¤ßQÎRäÜajOV×$‹`θfDš•ÄVJ•/H¸ÆÏÆtãJª‡‰t©ZC™Œj¬îÓ³\M%ÜÂÖÍF‰ùÅ®•£)Å9ID呹måd÷·+ErãP¢8†²æÑsrÒJ"õoR&%7P⊿n«¨+X¬ˆÑ>…ÆÔþ›9mïZtYWQL’%ÄãþSQ7’‹YQ= FÁˆÕšc¾ÑʪéÝ„Ö/©­‚ ´ª GõÍ,Í!J\æˆëäáÙø¦Q,ïUnJgå;l&TÇÿlØ[W´fDÛêÄ·$R1ûˆ$tT?:ÕXBWÄÑ„ëÇ ÌžŒ–æÇÍU.©S9ŸIÞˆúm›§¸i_Ér!£ë]ª­*/ŽF-t.®!AQ2­•lOÑ¢àæß‚"3•œÙ³yשVÚÕ1ŠÚ¹¦lÉë8\BôAiÙV—z BºuZ:9Ýlé"K…Y 7ê<¹B=s¤-¬,”Ä¥kˆ¦Åz»5ªža÷šC»§‹1D”pê2˜Äßà‰tb±"“„Jd‹‡ÃO”ÍVSq3º¨ì^¼ÈqñnŒÒ/2¸r)iÜÿ§mqGg“LcÖ_Ì%¯J±ÓwrCq=š ýu‘YGTÈçK“6O!¹áY•%9VJgÒ[j>:c†3j B­7Âä¢]ev5½b¶•jÚµ¯³;ˆy‘j³0S{©z…WxÇe®ÜFñ8Âþß+Z‘vÊ6Ñ…fcÚØ^'1ȼzÊr²±…].…9}Pe/èL÷«´É^“ß‚t‡!JjÕ3Ò^l'ñ¢"®Ð­½Ìù\ºþŒG]#Î …#}[—Œaäqq „3Šzi-Éssà­jBØ«¥­êTÃü„ÛÉ÷|ãJÝ‚Ž)ìq"#— R­6ÌR§XµN$ÛÒ‰¼ïífñIÄí‹«úfÄí²ÈR¥Ê˜$Wè›RRÛª›qK••*WìjÓ)¾ý*½5YÈ´É:©”£t„o£¸ëD}-QJ¬÷3¥ÈG££-½è’ÔVÛ½E'1ÖÝ÷"qù-4}j¯\©òHv¢ù’•½ä…˜Š1yÉEïQtb°‹Ã¡LZ”åEʾ=³3Ÿ‰5‰ªY;–JV§Ñ>ƒ2°ñ‰0ˆæ¤¶¡ÈºíÈkpÇ\›Dzky» ÒRÂ<Ç‘ZrqQJ&Ó;³²ù,æ¡¥o²ë-Ô…qÎB6 ÆöL'>9츙Š+ýdº•ñ¤Äù¾©É‡Ç!Ü…g~,›µ)ÎG[0Cd×S¨QŒ"ïÑÙI´!ùžáq-D£#§÷úvRYˆ'pçOšíQ]‹QLZÑl‚n•úƒg"oe3’dZÿ&±„W¿I)PÌRUM–ÄI TL_—Lr“/•fe##yi"r]—õåKiX¬‚ƒ ‡&ü*z8•5ÐÉJæäN}°žb•Ÿe:ÈI©…(¥CŽy†%_YxNN÷òê ͤï~Cÿ~PûÕ•ŠRaçoFqÎìQV¨œLÁTFÞЉ©Lru(£#v!Ù)J«*úîim&=T­š~F³ß] º¸+º‘jʪé+8E³ÜÓF¡Jô~Ro¶Ö•}lŽwNâ8ƒIofÍÒ+‹E†}dz—äˆk6TŸ¦Û¥÷Ml+ÝeB]èyÉf³ÑVR5ý⊻/«¬ŽR'Œ©Ôדh^¥l#¬Ü¢I”ô/§v…•ÔgJþ:j£»OFÇÁ*B]ÅŠœ‰CŽæ1—ÉÄ6I™Ø´Z²íæ11rUc?ô”¸’²}Rɬé$Ì«%;ÍÒ.ù-9å?m’å„@κ¸ÎååÁÝ>Œa45Dj–šÊØOâ²&*";yG¹šdB ÇwCW™yõyš‰—>WØÝ&3T/ Ó»nœîGJŠUÚá³2r—pÍ„þQIËúæTÄFWEÔnM*k2Jqvjsk5~Ÿ²Ö¶Ÿ„!;Š)kÝE7Ú…:Pä1Jwõ)Fxâ¥qŠ(¼^BÒêÍ´JÙÛ¬ò/.¦°Ò ZW¸‰­Er9E¯‰ˆ­,¼´óSo2ævgg5¶Úq5’è2$D)19|—©8!LÄTD!¸$%¶ÎJ·‡}“Ñãmè @ï%SZÙ\ÂV›7䱟šÙŠ„{–E㥠1rU2Æå#¢±“œLE•²gô·n“N‚¯k†zÊ(vßÇG¶u4MÄM\ûÝÓÞYö/ãÊ]îuo+F4ƒ´bYΓôÚR2ÒWëÆés…ô¢IE—R—t›OÖfº?9PŠ!˜£ ™¿t•Œ+ÔN¡hÅcøò›í-¥§ëmkB£bJ©µ*ûh¸¦ Œ8P(Ä- ²MšÃ<µ4a’‚_”ª•Gúœ !P…6±í¬kì½,Ùu”ôûzuß ŸO:sþTbV!Ã'sÅ)¨Î"·ö÷þ4Ú=±È2j`[‘ óÒÓ<±.̾gœŠŽs¬o-ÌTBb½ZE²÷RlÌ“ªø-kþ¤œO¢Q•¢'¡DDݲoŠÆ^J†Öc0ªE§?ZYœeM\ó;´0`¢ÏL†j–Þ–îÒêVâ]SÓÒ%{~±59¡’› ŠˆáˆÁò 2ÉõÕ˜ƒýëÙ»0µ7#P}A8¸˜' œ…±¼)$E ®r0ÁG ƒíÊúÌ8”³Ü‡òý¶ùošÜ]&ÓœÛ2E])^»-™F"Ü08t„¤CˆKwOl±MLœû²CŠDÜy EI.Wg9…dˆ•÷ŠÞ'4•µ©!"š’lJoÆq%{hh¥´äˆdñ$`¥`¯"óHÊ—J(º—f-©$yI¶,A âi GÚ³\­-ó!M*Â)—¾êSªÔPŒ~9XçqP´Õ¹d…Ý5íôÇßï\‘Iq5ù*bõŠŽ¾dŒÒ”µJJ…ª¤7Oò^Ë8†b­3/Ï·cA’ªPè'ñ ¤ô$õ®ù(Š1êýGÙ«ÏØ–”•¹êçs2ÈYIßÎÀ1º‚˜’2—$Ëi¨BõpÅÂi¼¿»¶Â=›yH·i,ƒ 0åž¶)äÈ7´¯[ ^—ä\$”IJn£1Š¢b“w‰w°Åá@á =¥ÅiiM?åÜÕ¬c¥\ªD÷5VCE`¡SÒÚVÖ¢¿Ç©üûåÓ ½|¶fÃ|ºK¦¾Y†f™hç0Î⯈J#\ˆcz¥^ýz\¢ !ŽQdñHBv‰%3ÓF‘ÊÅ.†%P†±†–JÅZ^·£©šI Ê’bzß~J›èÄo­7³n…¡.™+JsŽ#ºO²Ñ,Õ^“kd0ÇPž·Ä:(ÇÑ.hªA>`®^<…Kyu¡ôHíV£¶fqnÅØØÙòvØŸÉÅ™%uá ™ÄiŽs¬Üâ~l}|ÞFwü-È“hÄUOM¥vºd0 Ão˜¤ ‚‘&Ë1hæá|ÞÁ~Xk˯3sU”ˆdšDeM:ð…3ÕÎ}ZeyyMغiS! 1êN«1 UâùŒ¥8U¾YÌü¨³ã×)ÅùœõÇ«ß/a/«#SÔÒGV•,£­,k(BH36-XMÞø²X£ž²ŒF‹óŠÿöáî. ØCKìˆ@ħ,¡áošètxée>aäç£ê¡èÂl’‰¢Óô“Üß’é‚1æK“‡'îæÈshÓ%ÂiÔb‚ßjBgBËëcèR¤„ ²A$*´ØT¾«Í¼½Ž\)þãϹøåßA™2yÉfòz¾F*˜ "1íYJˆ‹Û­×-Yr—Á6 ˜&%î2°¼g31Ç1Ë/hc•ÝE¯%J¥rn¹³ùâÃÃàë(Ü –kF$‰sS$yÄXAƘ) †ßtÁ8²P$A0¼¬ôÏ©ßF|DN;Üp@V$•RŒCz?Së&‰++ÏlO¦H|ËnácËADæ vˆD3fáPò-‹i,i­Âcë”[P¡oÕ“ÿEÖ+5z¥b ÌÏÕBˆ(#‹m1Œ$Ê¢‚k’a¬Y_ñ7nGËÿTjï#.jVzšjäVd‘ˆ0‰Šºüâ®Úµ²§È ïOw_¤e”DtF¢ç‘ø± ¼€Àr$Æõp–¦ª“P‰1iA,ÒMˆµO½ÏD3w²E_g«1Ôåc›µU««I¥m¡b.=ë£nS«b~ eÑRBiôbŠÆr‡VY8Šùé¹Þ…j°—OF¬‘!+“]ϰڇ;v®®Êq%z8e"¬©9ø¤7¡Oç’º¡›+¢Ÿ¶Œ!¨UTtÛ ¨`(@T”FÛ­ö/¼Þ_5–ë‹å÷Í,ƒw)tÊ"Ì䎘uÒœÇâ¥lË‚J÷øñ"Õ—Gʸ‚XM¨núi„±vä°åò*š)„qÄJÉÓ)ž¤Akûcò`ˆ&’DÅ –È•,¾Uœ•¡öZr¢(œXŠ‘Žƒ.*רE÷ÖNg2u ©o:HÅWlME¹ ¯`p@PrÃIQÛyvòæþròm•6æ«ÔöÄóç¤Âwgâ:ˆòj2SË$‹wC)†å]löQø•ßóRý5?ò½ã5ra…³Ç œçžhB[£ÛENÒÈ‹¼,’Avã0ûK$Od5š‹Ò.¯SˆR÷D3—DtÌåš™Úz…)ÿ½)ˆâ–vFñ®JÆy àá'p¡ ­ ü6Ó1±Æ¨¾£PJÚ¸-é[?XWCíÝte oºbŽs¶#ëÙ¥ª(ƒ'´k5ˆ…ã÷Oá;y—·j#s WK£œb¡€Â¤MHD#ÖTëÚ[·o’Rï¡Òš&~e7‹þO-.ò>?&ÈÙufwUåó¤‰]-ËNO&»]qV0FGÂí’F&P‹ãALú;=e”ü±rÿ*½½ÐÂT‰Oª1¾MEÕC½rE ”b™ðíƒ :eTGÿhë+ŸÆ«bHÛ•ÅjsàŸâbúýº‡|k _Ëp(*‰AÊõ¹vO_òD3x„ÝúÇ·T(\’Š=(r$Ëp™Ë«IØ(‡'(Â"8¥awÿTÚ½#"–¨üÜê¦B–ÒxêM‚¤$h¢¯ñú_hy.\âTº—‘dôž¡¬ØJ!˜RY:ä\k b5ÉíTÚÙƒ°øõ«èK_ §Â:v6H|bñ=C 9ƒÂÔŠ]T¹²mÒPš¾¼!ëQ5ú´ß¶•{…%“,Oü$ÊRNR:á#.¹.wÛo2¶•©Í*4ˆTGTÛtk8‚­¦[£‚Vø¤Ãbï6Ú϶ÿ³›Ráq…¾ÒuWÕ¹0åS$uÒHÜÕD³D #ún•·%‘RÃY—ÄËñ­·©+û3Y¸Î ‡Œ CA7ŠÂìäk_‰v(«‡dù¼–zˆ¿}O5,:Œ>ÿøÉ˜Ä†iNÿ^ÿ„³Ö/ë×÷›ýAÿ™´í ˜@©ògЇ·×†Næ2r˜ÑˆT¼7&¶mÈz q¡\õÇ@Á‹ +„@ÇGj D0Œ˜ ‚ rþR¯á§‰ŠŒp’ ,Zï†Ehb/=41D;!ÚŒ á‹\–‡Ê‚£TbíÆe1ÆH Z:">ᢠ”±Ð<¼Z )LUÁ± *³ÆÂ‰O‚ˆDgÀa ¯¼/vÁƒ ŽA_ŠŒ9dÁ9503š0”u&À—–¼TÂ$AÄŒbžÑRO4CnF)X┆A”Ä ÊZ")äš‘ÜàIp]R£„ ò Jì ÎÛ ‹p‚²~„ ¥ÁC\"òËi§Ì¢ú£ Ì(Ñ-: \)Œ†ì”¢îmÍ9jT €c›§!ÃDÄÛ:†5Iw(f c§ˆS"š0SZ hÈ+1”1›,¥0ëZ†‹µ”B•rƒ«™#PŠb˜)Ñ É<3g€ÀA Y5Bó¶"0â9%bÕV ¡O˜ØŸÝBO7‚¸D/ð Á Åf‘:Þ3Ú£„ÔÞs­T&!R™¤(¡èÌ@ɹ©qÁÅ.0‚9¥ ­NÚ¸Çâq°ÀÌavqq0Èë¶#IÀBÀq $G8õm‚„™€ùJlACˆWWÌŒÌ6æ„Erþâ€FbŽQüÆk9©y “þ$9 £_ôãcaˆDkü¤¬t³{&"X´(€Ä†…àÝ•·Â°q˜ÐÈ 5¸³ºÄl 6A/+>&í!Á š‘Ô¯¨¨°TE~Ò%…(ÙgÎÁŠ– 0 J!Ý«b—Ã&чx®[Wf/°¬¨ñœ@f…CÐŒbM¨!©¦Cs(TÉA:AȨR¨®ö˜Î‘È(Ùà^µ80Bxʰ,Z!-ŒXpB•4±¬Ç2 dŠÃQ‚1¾!©˜£;µ‚¢Ãè¶²õR‡HX Á–qEC˜• F32 Mp…BsÜG"`°]2,#39G+ZÝÉœÐð,æTäT\6Ô\ È»`fCl˜š´"þ⛌՞Цt}5ÌB«GA ×rfd·(û#0ÿ—ƒb ffã∠ÔMT" 5ÀÇLqeõKGœ*(_9ÔïÈèä¬18f „'% œÁ0Ž… ?ŠH~£ôú»Â+UŽ1ŒN=J21…# ƒdéþ3† ÂD?,qc•ò%¢;‘ Rê€f49l-9ÛT Wç|÷¤1îÇÄ`Á¢L#„' 11©ÌC?SËœ@-WŒ0‹0¡ÃF^b`"6/ZB Q*©}Aˆ‰ü:+9¶záÜõgÄ3*ŽUªL»#ä,„$ưˆM6`„`Î1 2·"‘±H¤\4t~CªŠGA5¹æ+ja˜ž8툄õÄ‘¨1PEh!g8DTUñ¨˜B¤ÍÌÐå~ø²\)T{o(\ìP ÔC0â"AD(Â#1ˆ33§BU8?M÷•ã (´áC 8éà !ØÔ` ² @ØNJ„( Dï­Ÿ¬ß¨Ÿ ÿ–Ÿ‰ÿ|mË9(ܺwoKŒŸ¬Øfr‰*AN9wX¢©‚-KçóõI!,]g¹¬í„°’‹þ[²äU£‚Œ·DÏ$d“ôj_f±18•‰òâ0ÆÕ"í²E‹"õOc”c*Hï‚$xŒ¾¯¨%VFÕ·½xM#|•©4¶»XéÑÈ(Ì ¹ E§àç6ö¶TRZ_ìmÄ\oN÷2Yi^¯6è‚©HUL¢Jö¡ÌÊT²·Ôß2꾈Íî®QrÕÛœC¥&1ÌpÌ’ö¡‡ôJ<™'ÿëÒe¹KE.¼µ6¬Ñ ÌŽ–B»=rÜdЍUmMá §q¸Û5#¢³lRܹ{hÝÂØ²K‹MnK1LaŠ`¸Uìašò{ˆê’ æ?(,lxÉ“SW„ö_1;„a‘R"Pr¥MÁ7´bÔnôiýÛ“ýˆµ·'qj‚&v;ˆ0 È OAG©W:ôùlœô\›+SMí+ä”NAhN.ÇÚJe ¡ }iˆIXBŸŽ=‹†"£ÕUi¼^ èµàÔl j¡ˆwARÅ8@pÇ—%+i®VÓl”Ìbsz0Úy¬]û”æÇQ{Wªj­#0!Åâ–‹R’˾ÄÂQæoîÝn[ÅJ#‹l/P§+k•ÊaAcfvQ¤%$–/n§Y‰|DX”D˜j4…^YJ'#fåÌ´&s]øEQZ¤*ŽpàˆžÒð]¸ûïÆòú~нj8é6t¨œ©Àœ´º8ˆU‰ü …IW|'ª2P_èOÚ™Rò¶ld"."ÑdCÐÌDñ*…wA,¢*õo”ä)hÝcý­…ÙPú–Cˆ¢×è±k¢v²®„+Μ˜e©Öå§kk³±œ%yô…‹&Ä|š¦' b£—ÿÌ”[ØŸ)®Ž¼”R§r]¿v4/fV’çá)ˆvå}v!ZV2•Ì!RƲö³Hè½ôeÇ2fÒ„Äy‹ïŽüø"¹N*Š êo¾N…6NÔ›rä©¿+nŠ’>‰EÖ¡åoä/¹4–îV ‡!‘1S)Ôb}§ñ8Ï+ÔÜ÷ÈÚs?_ÒNgØ#ŠaÎ0aSñF!>Ó" …3í9ZøÇšYaNbKŒCYhAmBQ Fv¡¶¤³ä32*e«º‹¼ÎÕ¡™j[¹lª#|„«â BÆpç^L˪Y´ééM5<žœIÊV\Æö’2p9ÆõL½qlD»®¾ÅùÚfúŒ—MÒ"ºª&íÇÚ·B@Z Ä‹`ÌïqÎ#™ÙrB,‰ZŽŒ¦#"[¼”Jô¼ÚB2–•—¬Wwª•‰v»”e[½GåvT}VtÔ_Çm}î~oôf°©#rœ–WªN•âUõ; Õ±(Ôý¡%¦cD'ÉËüÝ™úÕRQ\å:ŽW9It+X_-ÉVÊ%¶&L^ôòZ÷›E²ï}¡Ô¦(‹ €éZÔ¡‹l±FŸ£—ëUl÷è,·8AéDj«kó?Ø•S vkh̹æ"4¤ÖY”Ó–Kë‘/–u':—TCúåÍ3y”:ÌÌ žGe"Uºä£IË´Â!FÇ›/nÕ-PîD0ëZI+½5ÅTS¡g[)åb¹2fòšQ—m˜ÉåjåàÓ—ù(,@à„‰ÂM¬ÁˆpıH2ý0‡é•µníÎÜôWɲßu]Ù8µ©øÏbqŠÚ볕ȿEÃeDs®j¦ò¼â\² ÙA¶l²Ý¶!®˜D Z ¨Â+Ö)ª-Úbñimß]’‚n.O)¤è6ß—Ü’/»GIT![$L#¬ˆkMWM^2#šŒ=m*ýû†D"kìQLDÆŒÌþâ½®%PYÇý°Yï°W5+T¯ý|¸Œ5_W8¥_윌sL—¢+’Åó Ûß3›:¯é„T£6Ûy²®b£‘Æ'¹¢¥F@‰ª-ݳ+ŠN¡×Ïm¤ÑñÅ}‘¢.]ä-o¥E“Ì"á–d×R>¡Èš¦GUÃØSNz˜…êaD÷¨²Ád° ¥êÌ(Úå,„0G˜âÝK%?HëDóro£%‰­^äÃVßßD3ß:DÍ”ªuvdu'%˜Ä:“Dk¿Ùä~)–eòXLÀŸ"ÐÄ»5 )<Ä«P«B9QtšF)ǾIí¥Ì©ýTNlÊIÚÒ&aVD(D•µ;L—9nôåÖc1¤Tgµ–þ-8ú¦ózùtš)u…aâ(O$Ã6+¦7JN¢b¾ô´¥ªZ×åâ=F ¢N&b ÿ™!;éù–Z½Î[ êX,ñÿøÉˆÄ‡ÌNMAþKü”ûAúhú ú³’í¦&Gy ¶zp†mÇËË‹yš­ŽQÄx‰‚,Ì`‹;㉠”QnÝÞj+WzÖ—qÌ—eÉNáQˆTfYŠ{›7ÉãxÝm•l]ö¨žsUw¬‹fZ‘çFÃÎjI¼v^â9¾¢Žà…ršCj.W<´NÌ÷°’½âó—ó¨NµM_¢wØÔ/=*iÍb-PŒG:Êf«1‘å-™S8ÂQI”¿RBÕ^ˆo+ÐD”̌ɮ£)ÍAêþÄZúL“^ž¸{&ÊiË©‰‹FÍUy †TZ!ÓÝQ|–^=•Ñl-^}ñ¤7¥j¾ßíV2ÅdˆA‚¯d‘šQ±-Å""\ ƒXî—ÿÓR…«û£*T)ŒIZ;Ý9yÚ¥SÈ^bá3{9÷ Ȥ¹(%šDr*Ф_L°’A¡8NûÊp‹£Vpõ·Fæ½@b)„Cq¾Ée8QXÕb`ÀíJ=sr )˜áŽ[Ù²A…"9B…l†? ·€·ì1PRd0(iÝ¢vòŒT'm3â(&Ü&5!’c C:‰Ì÷lS WcCvˆæJ%0Çq½È…9 ˆ‹»„ØSw!pŠ©8Î0¬Še97ëÃKy”š†)QÃ:"|Q?!2€Ú0¦ŒŽÌC„ ¬W rIb.|œCÄSQU5êU#¨ÑC7Á87äÓ Nà‚ˆ5±5v áÂRŒFdàC+>AS\Â’þ6£.EÐþÈB?Îbñ=ÊŠt…I‚3-–êÕUŽ|Y–z‰U¶bÑñŸ®Ó¯æ10‡c76mìÍÎri°EZ1Ò…©ZÈI•ÌøE¥…í6¥¦tK?>¯Ìk&Ñ‘8k=‹%PŒyЉýEF±H‘NÎbÜž|¥…­$Á´ÞN˜k½&m0‹9Þ2:¶|¤r1›¨¥•yÍ2÷ÒHŸ¥â#¯ˆ`†u$ÇM`–â_­‡v–Ù†h…TºzãÐ&ùÔ—"vyâ0©§FJ„Ob-®÷ÆÚ“tûßXæ(¦Bí¿¾8„[%˜``"t“Rg'Éñ$ÔóÖ$ž@p³ä"nÈ0‹Ç!ÀÎH îuà‚D“u;7•{4…-K¸KØÛºšÂŸNp﯆ß «,iª¹J8$ÒÅÑþÍ")YËŽC®Èk› ‰£#ŒpÁ*BÞ@åBDzŧñJ2Ô$Å2J«ù¤ùeÉðð]µùeNc‘îS— ®ÝEF£H[…/*„8Â,CXµ°•ÈBQ¢<à†\Še=ÈÕÛàýKO=çüQ‹}- Òµ^ê〯0G¶s’O\Ì'Q?Tƒ\² 5Dñ-zÔ‘ec˜mC·µ™íqRCŠ Ú¦Α?(i+{ ¸_b¬åH¬f j èeÕé)MKZ¦þ±ôû³Ât `JâìÖóc¨CbÀ àˆ$´jƒÚª Ð:Ò$©ÒÄŽ8)‹CT%œº}ò}F³Êb¢[)3žÒquð+ÛïUîVYREN“°çÞ¼<Ö‚Eèñ~3ì°ƒ†:k¥¿Tû%mŽÝ·!H¥s-º•5l‰œ¹Q¿M®›;Ýž8® æ%.cðiˤ¿/®‘ŒØjõ§—‰©œ^4ìC f3„@S•S¼‚šˆÙÍJ='[à+ù_¿:--]šÿ³qz^ŠÃ¡Øuº|t®,‚–rÌQù}ìD„B¥4yn9˜µt.á'8ႵUTö\È“`½5üjü.wÐïëËRd˜q³"bª¿oo‘h™ òwEcÌþòIÄ=®ñÿ,’!¸”¤Žá S5‰Ç;ª‹†…\ËÜ–Þ_y.’¸08GÏP§ñ’t“ƒS8µ'J„ç‡q¶ÛñòÚÞîÂø#Enœ(àøˆ!LÇ bVÔ©òI£F˜(Ãõ&û3;™¶êSR\ëu)™Z2’uͬ«bqÞ£UW…£6a‘^õBܳ¼È0BEIÎ|¨ìBÓÚºÒÿš5GìÄ5DÑö~›I"îêârÂ5Üঢ†g2rOS\š¶”LWv[¤­<_5´oÿ›d¥³û…qZ”º¸¬WÍb'§ëTtg\¦%ÖS쿾O!•Úå¿ðµB…­9R"Q¿Ójø–_w'¾3 d;»3+*ˆÌÄDz¾q,Cç¬eaKN¥3q½çZ?÷>†11­üõE¿¦3%DFfÛðW/(Îã˜Ä*[d#zÜÕOöñ楢ád^mæÌN¿1ÈEÚiF› z¸„K9Y$~QJª±ïOtbŸôš”êw×âUMqZ+9Š@®R¶Ä>ñß„1ÈqV!úJoŸýmÊ*nçâ3ý)‚! ™Õ™ÅáiDn•_ Tžfó¡ ÃQ8„$0OD'ha)Œ8†â*©U{9A¯mÁZÚv/ÍC1„se\nÍÊ„„)MÂ>ÜŠwQìÒèÁ¨ÀU;…1µ:µ:«Øƒ|¸÷ FA«1%2f ¢Ù£›DDµH窻è*ŠÊ²´sW,Ã+EªH ‚þdgjˆ7|!Á„ªmĸ‚d&ùB3¢ˆ,5B…ãiª‘áØh‹˜ˆ 1CÆ7±Æ¤KDr"¢Àˆîç— ÝÜTW)†Šáá1Hœ„*0ƒŒFj|£î¬ÈBXrЬ‰q„c@v:lÅ LAœ¦ï\PîÆ!w^è`ÄR“fRF(jHe䘌âÂr•KlÛ­`½ÊæE ˜è¥¸‚Á0Ó1B›Nxj€iL(ãuP®v#bX,Êq’ˆq:âÐPÍV(ûÂb ÀNõÔØj†wNÆa2ªÚ^+ÕRÉ ëG«’¥ÆHÉÔ8‡}—”„Ö!˜Í*Q‘ÆÙ¨!hIá: ]µÉ?x^VaW.“ BZ‹:†™7ÞADÔ'³ñ‹ãeá>’:Ñ„Š³Ö¿^vŽö‚`‚-c©¼#8At‚™bô¦b]Ú&,>r ß°^îdbJ`‘9ƒ ™Ö+¬¿Œ¡-0A©ÔUÎÎ6¡LB!¿RQŒ®qr£zÔNDÜê}áÓ„8Ë鯣§”Ôé“`A !‡+ƒªQ²ƒR"bð¬ß„á‚Å@¤3êÑÓ”º—±€‡…ýŽ* Zðº2e`ÅGáJªw¨ØArPaˆ–ûÔ°"Ùå¤!˜"ª®îîb!®¨j¨H(щC,e„™{l ÊcŽ`£±¹ ¡å…P»Phb‰cs·O²6@"øôˆÀÇ ÆÌ•”2Ã: ˜Êæ÷ÕÅ/Æ©‚ŒaÀ’0+D®P«ŸL#×›ƒÿ=åR±Q0GíqÛV8”x% #±Éqsf¹Š3!#e‰ÆÔ 0ŸÁ"zU˜Š2L)œé[º¢£8å>‡H(¬šNŒ¢0Æ*ÍÇ= NA˜0 ›ÐÒŒÈÄÁˆAÂ5ˆ!Ð^%ܦjAO»VÕ–…Îü>3ªpÄÿ¬x¥î!‘Ó*:ˆ$s”¶uö?½¬Éf¹NJ·ë©È®«ÅDÁgÏ*¡—Ç 0¼úLÄ;Î)œŽ¤zQŸ–k‘²E9©Ú¯/É«/TïC¥ýH–Õ) ¡UrþRww¹ W9yºPD«âájíBV¥Š´÷¢*mS¾…â–èk­5{Èý¢oÚ¦veæ¡{÷±œ^`‰+°­¤dÿ"d–+!R/mˆ¸9Åm-QmÄÜ’ÒŒ‚(ƒ8ùŒXÜŠ¤tz(b¯&ôkÙ¹‹¬GÒ ŠõÏ“Ýp–TŸ5ñ¦#+ ¬ã=¾â©ÌtÑ(ÎR¾¹e þ¼‹îS¬˜®É²™-“*èÓìØRÑXS==I=ézqŽCT­ÖÇq:¼âzЫøçUû^¹FL$Wr|ª={ÌF8„:i"‹Ö“ß£Ìøä' ‚~{„Vôõ—¨µPŽ9ÆB#—ª—VZÌæÛ*‹âT¶¥š‹ôQ-žÈ„ª£eŒ9¿{‹ÒciB Nr Üæ#}\£nihc¨;Ué¯-íV_5Y{h: σuvį;÷ãÜDõþ/×.TÕW"bˆRºm<ÍFNÄbŒÏÍWc¡i#¥ºÛ'+?å+úñXMj GRèªìÂÂêT.¥Ý«1ÄØ'®ž‰dOç­êc"Tä¤Ä2¾*½8GãW¦f:æ²vÓo'g"jÚÒé")äZ´÷Ãìg2™NÂ+O§ÒRGJÔŽ_LKw1ŸoGßß•±Ñ‰þc ]CxŽ’®,˜BŠgáÊ_#ë‹Bbª“v3‹÷ñ\)Ôµ¾è‡ÁW®!È /ÿøÉˆÄˆáNioŠšsîô޳’õ­£¿XrñøxhðõòO2%ó½ß Z ÈÌ¢áÿeét+’”2'oåhÈÀ$$ƒVÂÙ”2NqZZ˵ã‡;"»ÒIUqÔBÌg%©R°¿•5û]¾?\‰n­t¾uå`…2HÊ™î¤"†Æ=ÕŽRöq®·²åÕT]‹½ÝÍ3ëªái"ïR1 rU…™ÎìBÜÓE#Òñò‰œtE("WfK’º+—›¿:ïƒÑïñê(r—Cà™Öô²Ûž@΃®c:ÊX£„) ]K6í.04Ö¸â!ºÅ%,w2]‰¥>.[(n¯æZí‚“X²$ÊÏüÕYQÈ·'  b0Wx©ó–ÀŒ‘òœrYÄ ÖP—ºÚ‚+(ú|¹âIÆ߯*¤0Á‰ Y™$Z†þÓ¸Š%Â&MÜgâf<Õd|4¸ÔšO(Ë_¬çòíjU湌Mv×p‘BÊS™Å6ä]jÔ aÂT_nù˜"s”©¡BÁi"*†8‘zòšÿ¾O,“ËY@­ä•Ÿä©‘¬—¹d ¯B9•äjÜ}è«gïŸ!§æ‚53ÿŠÚ¼•/}cU³5šfÁÐÖrÓÁ{TdÉiA jD1¯¨‰ˆÙ4‚÷£& öë-ŒMž>Û½Qp²bª/QÖ@¬1Ƕ 3Ó¤9bM(èCé›ATÈä(•EÁë«YÂm°úlê¨T:“IùÊ¡PC¹#t¼è1ÈTÙKöPÊŸ>%Ø­H–¿.Ë)Ê!µ”*ˆNI#CìQB90[¼!‡9S²­c+Ö.Ð…-ije%dÒMœxU_”È”ÑYK ŒR ÕR©4ÄœT³ ÊéB¢“„÷/郎ì6ÐFÖYUi*LaC B͘ ¹Þt“‹«ýiOQ)ù42{d™- “¼ÄºšvΤ*Ѳg#Q=}¤tÔ¨ÿòI ¾éL*=rÈROBDJ–’‘êÜÑEGoû …•’ØfÃ)gÚSkb#*á,ÔÂñÁ$ÈLÍ!Ugý­kMv%ÁKßBÕŽ*rs7u“v³(lAÄ Wà‰(C?¯Ý³OByfñ´^ÚeLbê+cNRJ«‰õÇP•(ÇJX¥[(gä‰D Æ+œûxÔÉjíg^†õ†¶˜‘ ¹ a¶ …ËŒ«:î†dN1S") ôhͬ¤M&î¾Oái­‚jh²ïÓVGÒ¿¢ ÌÂ¥'!äO b½{&q‰Ž%ƈWœ\ššŒ’Œ¥‰%&ò¿µoô=§©.ö{ø~ÍGugÚú¹Q1DVâEx!¹±«)¬;ó6,nm¼iü0âêvèo©nmõˆ|ËR*cfŒW$ÝÛ½“*ÿV…hµÀÇT‰¤ÊºÛµ¶S GUõžî_Й}Éüö¯"J3v#ˆ¥3L\Ò¿{±ªtt"ÛqÈN¢‹ÂtN½fµÍ–2Vö.>áÈb¡'9-yŠ¡f™ ˆò´Èh‹E‹+(GŠ2-ïKd_%ÃóàP•È‚ii»€¥A$ê)=…a…˜CPµ3Ô²ñ 1z9IŠÉ˜b+ÜmLRä[G¿±ÞÇ£ßÔýgU“(XªÐÊçˬ¢!x_iÊŒŽ›Y†3lA/^"§»½y? ·Ñ¡(K“Z×(‹Ëµ_3z£û9.8óˆq’NÅw!…­¤¥¸œVP… Ö#—êq$¼§H¹ä'mVd:ñÖR´ˆïR]WB^8S–YR˜§•Yq$ãæi·³1´±‰gW­;ò)i?á‰÷ ÌyÞC½RQqŸ¼Ö³ô„aÙ ¡™rÞ`‹®£¢Pô·`^<Ò c¨Å‰M02Š›uÓ:’VJEîé"ªúP[8‚¤ˆ®>Mòڼȿ`‰*o)’Õ_Yºñˆä¾Zåö¬ç?¦ÙŸåwò;Ø‚º¨î­¥°»‰BQ×kJähmà‚0^®p»Iʉè"‘…c¢9HÖv³P‰e ¸úÆâqKV£°Hì%³1—ÎRu餯7ŽIÒSïË ´ÃˆBIîï¿¢—.¢*HÖcƹ&qR3oÉ¢æVJ …Êøú|ñ„âb‹òU7Õœs(B]ˆDT¦µHyœžq›¹bºêWÕn®m%º'™?– ¤z0“*ì÷5_³Ê×Ê_;ØGG2QŒÊ®-ªyD[©n—PÄuÇœfIVæÚå [÷솕XËòìÙKò‡fE*HD´³Lm¿E)©#ÖÇú BŒƒ§,ÚzäŸbˆ˜[äjx’£Îk¤ÖÒÊ…¯‰_„N'“âšdi°?Râ8Î^=±_ýý¥ÓM$¡C7_tðŸR¡š…"Õ.J$ÎÉs+¬Í!rB&_³ërÄ=Vʼ!YÉ£c$ªD&7i(j-œé"íúÛ *ÞÈmMŽÿË‚«!®J‘ÜCŽëa$-lüºÚ~CŠœ6¬çî§8´É%¸ž‹ÆIF$R°VGFÂ>˜•usfÄR{Qi_ÌØfûؘLø‡ÏæÁ2š;Y*P”¦ó/ cå+~·J’œ²2bh‚˜¬Snx“¤‡Uat Ë: F »«ýûCfK$’YôF¢ Ký-[‘t¶RPQ?{¡¥ c{¢ij' âF°ÇÕ‰Ø wˆDÎÌAMQ¹IŽ* 7ñ÷ÍCžKžîÜö„5]pïTÌb¨Åä¥)0Ž"æëw‰"Ó1kCõãóA[W ,^wbÈ™Ó9QWnR®QK¯B±kYçIÈ·vÜôŠÖÊïŠ[§¡Iû‚õS̈ Jk¾m|%ËFƦ(J!ÂNTÇ*9B¬¤<û#Ì]ööÁ2vgÍ»æÆ»^Q³?´¹¸mFXËR‘Ì䩼{.Õ#¯¢±Œ.̤5‚¾Ìo/ëкή.І¨®Vy„¾× òì5)^S^˜Q\ˆK ‚+)tSµLVˆ×BIHUåö¡¿iÖ¯V…1³2šjI@B»ñ9éb-uþscß„u…â#j‚H™Ò…õ:¼f™ä¢µQ£Ín}Ç¢½q¯æ¡ÐT •d&ºŠ!'`Ï5>e'-›œ‹G÷ÎÑ|²ßŠ£‰?Eþ¦ÊºRfö¬rÊd´Ž%Ì€¨C‰ù¯JVR:ê¦=–ÂgS»Yø´wÞ§¬ò¥ †KóÖGçyZÃãre©¿TŠþËì¸Ç3°LÅB¢˜¨{ UÍFâêÿ´×>ÖJ6Tûų̄tRʻ廮E,ÂÏal¤f#Ñ|ÔRÔÿ´ÿì€ €À0 èh@ùÑ5qaÞ?ö ï° ý è˜\÷ò?Ü–&ÿ›å/>¡ß7e«;£fKS«´)hBNIÚÆÉ(êMR³:)µXŠ{¸Îœ²„Ío Ù¶0…­,¦¶›¯§B<ãf?²ÓKË1Q.pìè‡d"Ôï›r(†E¯àë}c¬âQ‘3mâÙ›ñI¬ªÓ„6¶áÛ(žaŽr!G%3ïb”Œˆì]oÔv§Wì”uÁk¯¬æG’BzÕ"nöáž©&8¢¤‚˜ˆÕ©ePœ“±ŸPÀ¦!ªÄߦ®ö¤î×}«ÿík"”•·2e ¦\'7iЙª†L™j"…!Ì-˼ϛÞçV*s`¹ò̹lˆÛS}TÌÄ“;ØåÎC&œé`¢ûír¡÷Ûät˜˜JlÌl^£*¿%Ô›øŽŠöC&{WþN2]9Fˆ0¶>}q=òÄÚ¶H_"ùZÙëuãê)ŠC^„WJ[PD­k§¹S¨µ¢æUȓڔI¹ÌÌÌÙ…A‘Šä¢ 0„‘´äÎ¥¹÷%öÚ§K„Ýâò)Gá*\Ëôźa˜áQ3ñHD©”G~NÓ&+¥‹|£UKÄÖ`…'?xMÝÔ­ %û2ˆKaŠ0Œ˜s:àöŠQ!7LæzáÎ åßðŒµïç²áØQWÛ_OÄ/EšÚRžZÑ»)BúJ¢böŒ) Nï”Äd)F}¤Üt*ÓhQ|ý{–‘º¾UIéfeêg¯!*Ij7RR†8W3ÛÍ¥ Æo®ÊéȶÔ[2´kxþíåÂ.ýz½FæEr㮚]6(ÜèA#ö÷"Y=Ì©éU!I_Ò’mÿ—jS˜QMòírFF=;ZVVíª¨_7—¨ò™ŒžEr'²œU3ߨÛ;Êïrbö#«\˜÷âå9×jÔ\Û}ưìîsÈò˜Ô¢HåM­¤ܘ|ïlÃ~z•Ê]Ÿwަ©u§·d‚ˆé)µdz8¡XfÉj̪å•Óù¦«ŒfV•”RLöåýbÑ4BbÖ¦‘ä-“?’»\¢P©øM*7˜—BuoÉ[)Péd)äz:„¢:®Ò°ìt’ˆ´1 O ž©Âë6dŠšo£g…ú/3ڣ岋τ=Mõ¥L—,¬‹Ä<‚y(C²»µEz×ÜRq<´Ú®bØØ9Iä|1ùfÂ]„1±\®vÆâ!g|~"6èÚLO² ¤Úná-,ŸÿøÉˆÄ‰æNPÔ9ŒÛ2™³’ð—Çòà¶ü(vYºƒˆ´Í©þšâ QVµÚ`š¡ï,À®÷ÑL®)ÝÞ¡ÛÝÕÉ4®Øs ;Žâ¦¶±ˆ.,Öí–Äy‰Âîùþ<ÚàÉ~Ë"Ž™D¢ Å0•÷aä+`–¶jL¢wuÞâBµ?ˆ›N±½wU©g²;gÌ_+c‰¥Ê<‰b¤ÍÆJM¢‚¡zT©d˜ü-È¿D«'Qšjtôëñ‰ï¬ÌS¯–E(Í)!ÌJ5H¿JE΄T{LŸ‹@0BˆRé䪯 M^ZüŽ"giLÍA—’jŵ¿?½ðM~ËÜ@ìµXˆABP£»w,‰3TJÚ¿ªy“‡mÁ+ꤥæþ®Ô•»Xb<Éc(Uªi’¢]•è#ˆz*7¢ó+×q‘È͓ۤ¨k!Ü6É"x”ŠC”N¾ržÓD¼ƒZ`AÐäâ¢N) ØÝÞÌ´aÆd0áK·œÎm. ¶ËÛ50‚~˵é$ÀV1o¤M!vóŠz½Ìʬ.½ÎÆ(+˜Zwe³Ê®ç¢÷ò4AP‰þ^MÎî5’Œª‰­R=Ö®ú½ô¿ |Ï;Ig``FJìqÜ»¡‹\ÒcÍ"r?ëoj)«Y´’kú&¢Ðîë¹Iå(çaPM:ˆ¤ñùýÏÂéVFt `ìUé¼[UìÖÍ­‹dÇ9¦;éÿ)7f(’R&ß1J„1ŒâA–ä+òÚ)n™íË-Ié¯UïÍU=$¼mºykÄ+/¬áT+yФ|ÒæB#f>ëK—•“Mº¾_·ýèËÒɽB’BÊpGÛS΢ÒÚ™TD^#W·F*GAÐßMæA¹b”‘Ã%8Ä.ªPKsýú˜|æÚj!Ù´E ”%B+`¥Ur™°®c­ÚJw¡"šmlråÌîfÝá¬ß·²ŠÎÔ&²–¤)V‹vµK‹õºÖìS¦ÈŽ £Š_Ï+‹)Æ)¤›Ÿ·¬!e>ëZω/V±dÖª>®#¡Æß9˜Š!ÆS«³’…'¯u~N¬«)(¡ÜG DÌϨ˜½‡Ö¯‹øÖ R!P‡&ÉÄ7‹]—©hmg! ÆK(Œ Ì ŒFy÷&˜„Ez‘ó$‘®GÊ"ËQnØ×¼I±bÍS³I"D(„v"²Ò“¼„P©†ã•Ìù6e݈v’‚ÕµĪMñ;î¨õ8ž±A è-r­²QQ~™ÒcœŠ\ìuwˆ(¦ÖIמÁ•dÓ%2Ÿ’nÖA0sÉ¿OÒ|‚û„¨×|™„*Øé² ¢ëLZDjŒ‹iˆq¥P¡ÀªAµbÁ)%"þ8‹&"ÆìRÂÐø$7p®â"+ˆ¢TðଋD6àÌ`ŀûaIDAf2‰ÊèœD9ý#áœ!À#Cn B|-Á-B/˜ œe#î ÏbtA6Jý&ž4 ÂՃܢ¬Bx1Ã|Ê_ÔŒBW”˜Ü`ÉEáEìÁ°ÐÕ9Pæ—/a œˆšD ˜ÐyH´WTD Å •Ê „`A‡ÈA¸¬ÈÆ'óÀ‡nqˆ¥ˆå(QÐ`NˆZ98*NÉá„ÆeÆB F)½ˆs48C”QBfD0×§×­3„`Du4ò8ŸÌ…¨ª| EC^pçD@!èjØš @ÉSÖ0c Ì™âWÕk"— „¾ù…Lj V ¢Ì10DEB:1 ‚ȵÀr»x1ÄNZ Žø§GS5øð¢¶€é`„Êåà #Ó‡CúÆcÐe3á" mC0ꮬ‘Ø  ŠóR*jóˆQ«3&#§ÑKÔ¢.E—J«ÓKK Èjá°fL ‚2bÀBˆê\໹k$”ðñτո@B ‚LîÐ"…bå §¤3¿s”àuö6X=ƒ1'æ!™ð”`Èä@‚tf1sCUÔWE ªjT:^®qª; UÎnÚ6œé¬Zð´¸ÛBeS9•ñki1®Æè¦MªåTd9؎ΗZ1Œî%ñ³6òïæµ$”z²?¯{bé¯\ëªHE9Ej2ˆQª[T‹!(#1Vô[·”Y‡LËßÔdü¢ÈëW,©9ÛħñQ0¢O½ËOÃ8„ÕJ¨Äú1ˆ)f[;©i&k~ú™P"sÐN/e ÚUö]õ™èºv%y³DÞL¹‹åU1:„©›ñUsSjqœÉ)fRÔË»~–Äm«²Ÿ×š»_á+Mù"Ҥɯì1JÆ™ê#ÕJ©·c2Wû©òlKnõ'Wæ,¥?¦hs$—Ä™fs8Á%+¸D"ç!Z˜>ÿÉ2uò‰Û‚zDûÎÒ媜ÊÛG"Y+u©„ÆÉÖDEM.¯imÂP÷rÑÅ)·,¥½ŠËca ”»å1Â’ŸI·ì„-YW¨Nb”Œòß4ÑžwÅ:‘¾D½µhÆC%fSµÉc7„K3?‘E"Äó‘PºyëÏ2ªoUÓ$Íwté³­®„tt)“ÞÛšÁH×"r—÷… U—=³ögÃls]=Í.lU-–®«Ò¥;ï™ìøéeI»M![“õ—‰#TÍ´+ÊTÌÂT7çŠPB Žv™û—VÓurÍËé1>E#„+”V\ë!š„{œŠŽN‘ùUë[ßö¼­¶“íê½b+‘~¸õ~«,q äaÙùÏDUB²?9oÓä¬]ýô˜BfÕ›Mž²œ¦*Q·öÚév»ŠªD->/㜓–â5Š=ýú¤cd Ø®&!HG£e„Ù1x®‡Ìk÷ë f?E£—’ØÑTï) +iA¡Ù¤r ò“C:º“Q‹†žÖï¡–JŠÕ{VºeêVõ÷¹(¢/"¡3k[‘çD_+âõR"År¡“T¸Žgªz;‰…æÂ¼•dõæ%J«Nóãæ­™Å×Ò]ÂPB金^F»­XÆÒ+¥D#…V2^]ÂéÕì![ü3º—Ó]©Ù¤úèYŠþÎ"3ŽñHQ—šrµL–®Š´w#é)oétÔbãß%©OEåÍÖÄÊŽ9¬-)¤qˆÄ*Ùy¤Eú©ÜmˆB'­}.‹šE•8d3­ñ›0BQZÄâQ=íJ|”:Ê"£bZ¾Ìdé *¢Ð²•Ìtözšõýó*¥èõÊñôÌÕPͲúi·ˆP;«öxŽU% ȹ´vBSD;fÖ‰y+’Áêtj/)xÂÎB¦dL”7 LÇœA 4aŽäwÁ2™“ó˜q£Ž`#?µ4¡ú š*@/ …¹a”]F •g¬]i9ªrœ…Â!ˆƒ †W ãQˆ Ø4Pp¿³«„Êbʰ‹Ç!»Œ2šÖ318ÌÆnm(¦d@ÖÞç,:ò)OŽ·¯µÇ¾á AD4 ‰™ÆxL†ÁRk~cCd[àV"Øù„¢3¨ÊEð†oTˆ§4æQЧ^s„£$±CøX Aªj%á„߯rÆ-?*”¨D•ë±TÑ®8aÝ­f*DUÐQS˜üAÙ©NˆìÚrȨ¸,¬åfÏ"?ÎÿøÉ¨ÄЬN?#8@‘ , 볒Ŷ#Duháù`†l$“Uvѵa£Í0‡Âˆ*R~©äZ¨ ÁÊ›a\ݸF’‚½ÚB5Ãùäæ•¸³‹Nä–âXö»’Ž á3FáPwE·UÓaþkV-A g>Eé©ÊëåP§…dÎ'· âŽ$û¢ …rSlçG;o'IQPö˜¸ãE7cré\ ¬Y3‚ĉÐâb |<1ú‡úR’G½YÒ'tF7"ܱ\Ôc(EQD/ ’âøZf—eðH<Ð@Á¶pV’J9°¼•v”`|msŒIytMx;†SÕÈ;þ I«ð~*Õ+"æ"•¼ŠlY TX«»còQÚ‚ÓΆӬ¤`‰3Ô>’LÿPµ)4õ ¶½•yàÃ/½®ÒÁ`,x @Ç—ÁC; ÑŒ>': –«²% ™ (ŸœZÃ?ÈÖ!A®à²B6SÄÒtŠ”K*« ‡ìº=«=Ê>¾Ð“Äj)a:hBŒ¶@ ËåI\¹JÞZÚ²Æ al×ÀZµÙF¤€Ê-Gu˜äî-¦nêJÕ¹êEXYÏ=¡­9Ò\TH £ˆ–ùx“KPB¸¬A@ÃJÅ>å|'/ü_šÚCôò¹‹:©DŒÌâ˜*–ŒU§"KÝ6m¢ð;¨ò: &'U[¬ë"Œ0,ò$bP'“îÂ`êõ; „e¿Ãñ®”ÃÔT B ¼<¢]Øb5 ÇY!‘~ÆüÄå"YœC‰¹ò‰=rŸj®Âz0B¤!Õ@@‘3bÀ‘æ”Qu0é " 4ëP^Û—æ—Y¢PÆK{•7ˆ2òÚC4W†(³a9þÙw­’îE²2RÕ%‡ÕkJù„å.^¥¢ŽA[º˜4uÔtŽ1é9®$µ¿bý"ìn¦Ï{öˆ^Ìï,…rvÕÔa` S8µšw´¢\ûBX©ëG“צ¢˜$²²Ø’7—Ôþ0``W‚ÞÕÃ:°Ä£ V>æ ³X“|–)ÐN9…«­ƒ\­1ÐîîBTqŒ¾Ú•lú-"xI‰g´QlmYDô½k*‘ùëq‡«dcuTLˆ±N$Ç(ts7u» –“µ„ë ¢žRgI9­žÆëäÛ1¡×¶¸íª¶r‚½JŒ5HÚEQ3$£ÓEÑX"‘„—M›‡“`I28¤šÁÏÃî `,KrAjÂh<ˆA5ô©J=Õµe1çg¼(0¥ž¼¥–¤ªDã'£h„åæ}Ü”^ÚH¹¡.£P%Ö—+ŽÊ™"͸Wb+1´y“¦ÓïWˆ)—Iãä±&4ÍÙÎ}DEÚ­n›+ʡٷé§6¥'RX³.î²í¼û9ß?ŸVÿrʱ\a-K%msD ÂŒU£Ä6Úá0‘p´ÌozŒŒ„[c0gË%ž@À¹xÍ\7‡ úGV^\y-}¯7·V…IKŠû!¼t—­'CaQзnÎ(„Óè“Znö]ËÎŽ‰0õBNÂ11¹ìD.Q;h,É{§Lþt„˜þú3/¤xŸ5©ryM£•&xSšA7Ø,$¹0Ž=|©fŽ2†(²ßÅ5º¼'.bé×ÅóõaE´…c‚®Õá?8Û]t²SÊRÊ7ÐÝZªÜ[¥{þš›\d[¤zˆò˜å@ A–I$]ý*{ΊZzì“'$结‹æû B žzK¡B¨Ã…·'ªˆ‚¡MgU*‹Õ(¹´³4™{Õí9xB˜QhMi©'.F`  ¤ÂÌ¥Úk’KUÆÍ•0žf+ªXNQI1Çq¿$jW™´E!,¶a+ <õe°•7ºXk«9>‚L#­p«Ï! 9Xtdú³m"¥|¶-ÖH‡»œIÎZ2P†£Ð®Ì¨©aª~èË+¡°ŒñÌ9 óqè/Æ’UºóJè·8`zbôËBI2Ü|¹ÈD©R aÛ¯åÒÐùO[“fį Ê¿!#833m„Âì.7-y›Ì4îõ!®iÂpÊbS8zÉB¸I 9Ô:ZlF1Ö w‡t‰¢Qi® ¼‡f7éãTgÒæÓG¡ýۻخÑ’’EšÙJT¡Œ/©ÉV¢WÖ˜‡)t¼£ÖMr·â…9Ý« . ç£%ýƒqÁ@2dIH)vZª…¥(´£f ì10«"èW»ßJf8P"Oðëóú .ÕÕ HˆŒ©HðÔ˜ÅÔDOÁöÙŸHðc‹%J´ÂýBŽ‘8BX[+¦D–»3ž¼Ï"{6ñ¤NÕ••¤'«ñhOb;¢o’Ï•(˜%>M„¹,âêVxƘÛ6zX-AæÍ;z¥ gqC%gÙסóÞtèÍb^ƒož«“™äJ ÇÉ…/d쉩ÏÚSœœÆ*7Pz!cŒ]¤iB}}šŠ#¬†øÖ¢4qˆYÜR #J$Dºâòé©K¤ÁùúSØÇmC “Wïé¼-‹_AÉ´4Gi3JgäêQ.G Lþi•‚sä’`ìêµ&ˆc6è'ÅÓÑföé `À ìí MOIh\uêBóF$«+?qH"‘ñ{œÌ bÍaÚ¿2HZ]ùUDu“£À’è‚Ë;F÷¹t˜V©L (“Zã·P¯„1EgŠé3¡ºõÐßÔ«‰BìIK~‹¢–Ëd¢áÞXCÐ*ÇjU¯0k–Tã–ª3 y{_;KÖKgÊÁ‰.ÒxúBßdþƒR“)„pAH±|ü‘,÷UÆ %‹Š^ÚÕ›Å# %™Œk½\Ž|&?&\o%9ueᣚ:ÇèMEz]£—s‰cPÿ„X‹qÒ†søÙþ̰‹1…­—æ‹ï¸Ï^%*„ð¨Q“N]qgn–…Œ~àu&¤•y÷’¤ÄB“îôòôa%Lœ“!&YB‘B'µÿ¯ã ºGjQVO³ÜJ Šú{µ'éâ6«cHAUóêZ°Vm8Å5a‹V;°Äô‹T̨“’”rݬD³ra²›=zi”¸E¡èì¥EF™(U;ÃPÞ²fÝÅFÎBÚ.š)Âz JÁå› ÈþR„Cu "Œof\˜µø‘>CŽl2eŒšg³€î |P= $ ‡&½í-2H»¶úÁ‘C˜>pÑ?‘yÈjÅʃbAVjr¢!BB D7Æ1{E1ÚÜù¢@¦,Æ ÔY8Na5B Ò0qÈfÅAóÁG1pÍòN¨íÉU ˜6¦$C@œÙRÕ£6F>]éÊO £‡ê Ѩ±RÜñL 4'0¬Á3^OJ0¡ 0…#Œ™âr+ב’ðœØ÷Â7ù&£®4C- qK ã,P¥ì€Œ@LÈQpŽ”ÔH Ã”Ê A¹ŸÆÂϪè¡ÁpXv*©2)WœMs(5CR0@Å!ùvFbš†"øôÅΆ¤`¸ÿE¼9JçÀœ!È2µ1Á•Ë ZÂ\-+XÜ3Èw#£áùeÂ[Oª½H#ШT¸¨­)\æf2Â8N ´HÐ|uãs0dbPŠÄìZH ÅÔèàÂcŠŽÊ¾A%ú$ˆ·¨”à–rjùó²™EcËCa:V™´d2¿²©”)„.æT¬Q 1XÕåÔN) VôÊr#™vœžGÊJ\|%ÒÊÝ–.±žëæÏ©ñž ‡eš¾?:ÈÇ×»¼ÉSk‰-†ë¶wˆøy‘UÙiÙL]Íì\òÍ,–ö%V§f%Ê+TÍèÆ±ŽœÛ¹ÉâPˆËekÕ\Û©ÈÂiÖÄ>2謥cÝm1¹$)Î]#ØÂLøuÊÖ¬‹Si—ìC­|ÖôÜE±´›b¾´?¯]M"&/'ŠGM§Ë1x¥¢uœü§æÊ™<•ÝcXôÄ¢¾¥ÚD± ]ÁªYÿ¡”gbñ¤JŠè#{ J*‹ƒ%ŠôuÛT½²µ¾z§o]±lƒUOäòki§Ò1jÎb³D§ˆ\q‡!ßiæ+™NwÜÌ÷._Äõ|ßòð¹«ïÞ˜GÛ©èTá RÕ]õÒÄUG1\››#mžæ=3º¯ö"Yì-n¦â!Zœéšb×…³›ñ•ÿ±…ÛˆÉ*§—bµŠYÎ$‡&¦Ù;%9F¡»ûQTNEÕíç}y/ÓµplTTÆ×(Å|B™öÓ2µ&; îÓÊÄ#{¯/ÿßÙÑ'J6sZ%o[ëQ˜¢¿ ~§>½Ó/ýý f¡ü`®ËÄ&-Y7tS1TÅ:çÛë#î/·ºœ²²1šôÃÔ˜»ˆDê=ª®q_ÒŠÍ•¹W7lóíCµ¤-mŒ×ò6§]©¹Dc~²–Û!'“ðUl8å=?.\ãtå%ØÆ¢ˆ+–”UóìêÖ[w{ Q$3yÿ6ÿrIµWߣ*ˆkm¥;Ï@â ˆR#Õ¤gJhTAtÒ,¥ë)ަU¯YpÿÄ¢-,òµÌN%3?‘LâÜT»ä¢:ÿˆ+Ä¢ùVT"¨ËUdq4›‚®Í´eRÙ{–‘¸cd÷³gHê#…:üÝR¿Ef¦¸p¦¬“‚ úô){%g¯µBl”į§QNÉö¶¹»ö‚ æÉ”™’l’¾â*r Ó±{»ãо‹ ¥µ¡q|„*gôÕáÕîÒÅ5ÖR„mkWüŸÙ´KvûQY:ž u>µ "ý d¾Á2Eª®Ÿiîó)7X!XÄI3&¯Û*zÖär×t‚縧ÎA´£8#BV"–Ê!:^C5ˆ šÌe–¸¡_«äëmÑv¸* Ù†™IüVw†ŽqŒ}:aâŸð£šøÌô{Á§y'Ò˜Ú­‚+ð—º1q0ùº‹L£eûðDmÑŽœR¥$…‘ˆ¬"¾!Š# †¡¤ýä{c.ÚEEÄa’`JØ™¿­¼n{¯”/;‡—”©$pQYÉEô)ˆ¯1“ñ„\’’&+$¥CjÛåÜ%7¬è” „è’êó-Qƒ-‘É’ϪAˆfß9רBNÏZØc ´›NDJ#\­ÓùÊú]ÇbÐ%î8Ì'äQ 3WùÊ+Z½Æu¯î˜9h}b)k[Q…!¦!“eª¡>¦åÉ^Z¯;e4JU4EZDL¤Ò¡=R)¢½Må*©l¢»ºÈE4¿†Lú2R‡á¥ÜeÛ)cv¹I`ßs…W¥HŠ3µ/Ž1 ´rr`«¥F× ‚j«Ìz’’®¾¤­o‡ë¦u:ù¬«Ÿ©vâ¥S4Cª›Íæ!ňÕwÙV’aV„R%:‡e|Á9q›ª^'šÏwÔÂ$¤¡ú™[±U{H9¬ˆÃQz!J…dCàc›÷rA%1IÉd!Kªk^JJÔN]Ú”E,“îT©S2³=\FÒËsž¢ åvmÉ1«ÜgZq.”ëñ h–ïvBazˆ"Ç’‡Z}NCp…1ä¾”Èf^þ ªBÌäY=6Ëž\¥Eð©R~ãW?¸–©Ž÷Õ÷êi7)b±üQOËrŒFY"ÿ¹P\ž¨E)|}~ÿøÉˆÄ‹èNù->;:U¦X³’…П‹s Òz  †|X5*9äü#^g˜)ß]>³VJÙÒ‡é_¬wœZ%W1XïBÔø¢NݦB¨®2“·6Ú˜";¶­•û—¼Ò`‹LLÞñN‰“\ÆÚ±{ëGåf6m7=ˆl¯“È¡ФiÅ?6¿—ÛÄvcJGBœ&¨.ðË£c··™—µÚwGó»¡Ç`¿Ä¯Ú‚Yr©Ó¶ð—WgË÷Uùí#ÿf™X©9®Ür.R®—dDÒøŒîx‹"ùQi\Ħ5œéS­Ø×D¼õg<ºÞ¢]JÉgôU¢è¾­P¢ˆë¿«lƵԄühå«WÂ¥Ž­o¯K/ŠU V”b•dCв6fQòKœŽ§Û˜Ub›nƒvxë QT}:7 üžc¤R>‰V%æµ´Ñsck¬®”%\s™FDw®_,èñ+’•>Ü»¶—ІmUÖ—v‰œ§w|ýçJ9DAX‚ee”2Œ18QÑJ.š•ý¢0ܦ«Jb’ªÔô Ä?¦X’a-9݇ŠA$5]>N÷]\=ÑlYE>m܃>XÎv”ÈÖéÑ m”§p™¨c^¢ªáGÓçþ† –QšRJ‡fcJY¦³©k’@í‰VIŠ!©Nì­§&«Œ™W”•K1µ[šþƒèeº¬ŠÉµ//%5Ù0R“ïvV\™Xöò)FýM +ñrLyçéJ‚ë ;&ÑHs©QŒmbUìzúMæKQ„²±RùŸCH¥ PÔ1‰.u<Òˆ£µ=\Ÿ‘·{Dâ¹_+q\ÑÝB1GxYÌÙHí Á]dþÄL©´Enì’û-Ú§K%TÅ’§Ôâ‘5ȱwŸdñcâJ" †Nçis°ÍŒÂfZF㾞U[ EÍbésßìtï)sÑ1Pcgþõ9A§]E²3r”t´1c,çFý£7çUÏ´¦<Î÷*!OåËSô¾LÔ3µ–dâ±QðTY Aò=¹%I*ªÊ!¿¨ýsQ¡Ì—]øØ5$߀DÕÁKê©Æ×Û-zaÉHLæg"3cJ.®ð¤9½½ëÿßZ‹GЉW£PÎC‚:§ Ÿ}ÒÍIºà¡V“R(bP¾Í§ZYt5èBU’3ÝŒ¯`ÓSèÜl¤²×S5(Cª™*ŠÛ©/Šq(b“QSi2k­Oo­æñÅ)J”t Z}%{­=g¥ ÒW6%lQLî&‘†óÎF9ªt>oÓnz“ ¤f•I«ä$…«*`Ív’ÊÓ"˜ÔŸM×±ålìó3E.ŽfRhˆŒv0ÂrUÓ:_­j%”uï ]Ë_ü.:ÄO+ê]Ò?ŠŽŒÇšòQv˜²ÊWµSqí´3çÉv,¥1ˆõ#©%éi‘ˆÛGk¾µML¹•å%u'r;Yh]#¦cä…”¾Û­ö¨ß't«¤¡ÅÌZ9J1Á‡'Dáϱ1¿fíï!”É;“T̳„¡TCK½¾^ï[/™®µ?/PâQmÅíiø!PÜ’•G!¦¢h¥qRev_Ë1Õ95¯Ún>.Š9@¾XÖ–Å1mgAˆ!]‰'RÃÞáF*­5Æë\Ub%Êÿºn¥^¹´2ê̸t÷!Q»Udz"qHe'µÖÒ‰d¦âeBÝ®éÆETÄ r³SRì´7f'm™W¿ù+³æ“5R¥dªq‹š´²tÄ(ޝ‰Ân*oH¡[…!è›ÉßÝcdÕˆ•d9ŽûCe=ólµ%6ÂcQˆMÔ+ê*WeUÒÊI„aWÕd\çÃçߢD-j|çéGâc±úݹb8dG‹Q ]RÓw= )NŠuDªŠôF¢²Ù34Û¾„í+‘5)MZ*QPA)‹-`$³f„°QÌÜ0©Ó- ‚ûÂ.áéuŒ”³_ô\?½&iüãK=¬ ª%%Uñgξ䬄AˆP˜ùvíÓ¹EÝqt•Ë÷Íñ˜’Š£ª»±»rïD”…t1JŸZ M¥m¼Ù’ ›Í*©ÄS'z¦à!¢HìÁ®ôG§¢Hò>ó!úiØØ"óPöå×w¹Éfc­ð–ÉŽÏ…bŒáLj°I†Ü›_ u¹Þe–œôEb­Ôÿ¥§þ}a6È©B³”—J!>޾"Jeò‹ÙÜJ- Ú‰­3ÊÚ“H¶jzÙô–AÅ F­°„M¦qð^¥²0Gby‡Eå”…/½‘…"W§ýû¢|ˆ‹‡O%p…GGª_kÁ!¢ÒrL¹Â“ÊÁŸdy eVűÚËaÊ·ÔCŸðoi8ò=‚3áwú4s%[…hŽìùùº¸îr5 ¬ªüZ‹UN„%“é.Ò†âPçfçtµ=}[ÙJã%_¬b7üØ–Óyf!òEŒ[/•C!uÇ yïÆqr_#ëªG,æê(²e$^Ó‹I3q%ˆ¢%ÄKŒe-5Ò‘*ùŠA<Ê®Z#âÄäÍNʽ•Ж2Õ¸ëžù†¥¹7fÇ{¬¼ëWJ¬u½˜¶M¬]zyn¿‹æ¢ÕÑ5Ô¸n¤ZõNG´¥VƒšÙ¼•ÂUeÓýê9„sUîsЂ5Hi‰b!Ì+V7Sn…v«{òé’‰ñVdj®ñë[KMaXiCµZ+Õú)dTkΊBÉ UO¡ªñ3¯‹Ga’U¦’º„Ú²r Šc§?b§}ÌABQ†Î65esÌS—xù{Ø–Rû‘ êÜ5¨Õ³pÌG0êäû³í*üÇÚoM,qÀ„­Ê)‰Ã»TµZfŒ‡p (>LÂC] é¬ÜÔ3 T„ê %I´–›Äd™ 2ÕŽ€‹ˆü•C†e‘ÙQTÓ¬þ@•ŒY5´¨a K¾+`•Èä/as1ð”eÙŠæZ­j²ÌºÌt¹–«¾_é͉UT˃nÞi¬Ã{Šb;ª1*%ûN¶„”‡®Tºr'¦ ŒCFJçSDËQ5¤â¬R'aXË´lAþÁ/-;; Ga ËäZ+Œe•LK=ˆR* 3s†Ûj©(·®´Ì}ȸÔlÒÅsaI1ó»„ Îdì]µ·óô*ƒ9ÈÌz‚T½T%ÙÇ5„Úqì»tŠÆj7x_âçeÛdñ4(ÃeAHܦN#´×*ÊP@ iç”dš\1Ñ Z³ôΨØ~§~o?T?»ïçÿù‹ÿÚ™©ÚJmÎŒA7ð »ïC=V[áöªçƘG^j71 ßÛÆ ئóÙ.jEÞ5ûssïB–çÄS g!ÅeµêV•Ôîü}Š#嬯W¶–3º¦={q‘ÿ«#Þ˜·K½êåe~!ëw¡œ¬AP©ARŒu½Ic•‘ºÒ”†mBQŠ/Kõ‘É„ïRJ“P½¥aëo<ŽA•5±JU¡˜QYª­wBªÊÚØä¯©ÇlêÏÙdm4·òsÞ’É~ä³ëþª¡¡È)‹!½Äõ œfoô1’”Ú“\•wLNÑ/A9·»UR™yð¯a7*î1ÎbQ‘®¢c¦R?²SWòF©³g¤¯¥ ‹51ÚoÖëzZÖ^Ï·–bL”&uÏí¦z´âvußx¦0¤V+~‰D»k ºD96ùJïÒ‚yªòÛ_j{6Æ,¢9EKÐ{‘&f˜ˆ§z{-dEú&ˆe–ÃvПAº©÷%o|Ú«=¾˜tÀ„«gªéÔEŒ´R晌s¿æ± ¤B¸Š¥éh¤6ä¸gw/Þ­NÜ’Bn¥œ¥ÿb­FäxâahÉ1B–'ýžžS’ŽÚô‰]Ú¶‹ÿ¿ÚØì6æc­ C§:çT)F+6§b6É(«B‹¼äW1*& ôž¨˜G­´ÆzubiÓnµJQ‘¨ƒÄQ|ÞA˜B;ÌçIKµyTeîãvmì£oo܈Q²ß÷L6´¨ú'ï%Qóu{‰â¡U(¯¤¥aØ©våÇ †9[ˆ~SuOŸ…Õ¦þÉ-sov¡G»¤E‘ÈõB:‘<¯çu‹•-SÊ­ÊD$Ç­È…k÷!4Ÿ¾s!ï•)ä’ט­IžqQÛ†³=wJ±æL•sdX…õ¶÷¨âY7‹õ¦¯Ö~Bj6}]”y*ìG/*NÊRÔ„¨æK8é)Ÿ\µªóŠÉc¯ïêê÷ËoÚi>üKt¼^z:ЮW- ¥0ÊÕ\Êe-‰)DvUá‘’ÄÕ;臢k…›ßøÕ6•E&Ò»K*ൻLw+{ÊVU ÅH­*ç°˜V³p©ß!-fâ=E2ŸD§‰#%Lia;›ê]jùÍtj¶ã~¿™'M"ð‰³£Ì·-“?iQˆ(¹LÎËP^Bí¾^&¦…¦.qj"•ŠÆL¹=ÝÝ“„Sœˆ¨èeFéTâÍÚ±DeB²K£ÓÊ¡ æê®M-âõ*B7kr'_•ü«3‘…™´©D¢Ä(¦}|¢ W)U]—-eôÕ#]6–þí Ú£ù:ìõtgw.—÷rQ,üTaUÎŽ_.WÐ!†™‰J×û©èR~iÿMÇ=‹…TG]¶©^­©<å™JRˆÎŒ¢«œÄ]O-1‹Š5Iz_1ÝJ…%oÔøšÅœS$­¯+íc9Ê¥kˆÒ£²Vã:!¯äõÜmÏ2¿?îoRêîrŸk,˜5SväT²zbv­ñ fnCO+„\%ZB&UäP•YU3fÃiˆò_PJ„Ý¢êé‘M1ˆËŒ”MšÂ±´ó=ÈQËA….mH"Ù:‡˜¦ÁóPÑâ‰fía¢_ëÔ+]õT…¤…µYFúµÊBÈÎ+¾Ýy˜æJµ$v•¹ÈßI¨OvòÒ‡ú_S¨ía1œ- ÇNCfº=l˜@et8BêXwÂ)•-B‡3Šã£q²¹uíÂ.l0[m x”ojÒ›GåÜu¿½¼B¹BN‰*Ù0¦o1E@ÅuGÉF¯¾h‚ëÑ Nb%¿úJWJΜBM!Ez&ÙZ½â(R¸„¤EºW‘”-H"Û®T—5Sõ<„Ka&i~AŒ•É’TSSÔÁB\ÀG ›ƒ4ÚÉ"¾ˆíèÞGv-+‚ᙾ¼ûÃñ3«ã÷•ŠufùÙœ#:Üå+²#²ˆF#ˆ"‰¹“‹ÈéZôÖ«ˆ¦Kù÷M­e¬ô7ÚrpQXƒnn›|(ät(„%)[?˜Ët-âÇóµ»”‡í#´¹+¥o…Lò}[PìßÁU«õoÚ˜²!5E¸¦b/U~˜Qî@S ªæJ—œ–/Rý! nJ‰ZíÒJc®Þ³Ö~±-É"¥­nȬõ#ٌڢ°¬Œ‰ƒ9‹YYËnÔ!LR+Dø™5=g)qxdPÿÞ­¸güÈåk¨¦ •Œ¢·ÍéF}-GjVGYŸJ‹5˜AìÎÕ]XjýxäC䋿¥)]Ëu«¶Òºçªí¥0ŽÎ”dÊÝnC˜B5µˆS9\æY'ªs:Žz}Sæ¥ƼcÖD„Q¿V¼J‡'öõŒ)…[5XLÙV£8Dé?ŠRKHÌœ“ÿø™ôÔ¦ôêýYŠ˜¤”%_v‘Éu9ž¨@GŒ^îÌW1ÜÉrg½Dj)ÿzŸKN²ö²Wl•§®¹ýúE‘6ý©µB§C2üåw¬ã›ês%Yô‚е’èŠÝSaÄ\IµëI7SÜÿ'uŒ¾„þóUSTéúP«„”E„vð‹Ÿ@b$3¯`£ÂÊŠ\5 z´dÆEƒ…AÀÆ0ÜA —¡")B’NÄ¢Äê `î°`¬XlÓ1œàÀè¡'vÀËd"ž5Rr`¹©{0‚’ Y+™Ͱ§: à­ÌÀQÀã¯kŸ `‡Ïá¼ I‚@ÄðuÊ !I.¥‰†ÛJA”KíUј2°H<;¥ f(§áéfõ Yðƒ¥*hèÆ!„ã$dI™Á Ù˜ªå:A…F0ÓSŽe'‹U‚äBWUkÎQˆ6ÜRb ‚$*õ n7P#Ì Aàä¨ÇÅYòÚ Ip¨]˜LÑ\@ÄäÊÌÐåÌ.N¤èŒ¼9pTy`ÿVÿøÉ˜ÄŒ_Nüã~Z¿2?¤¿ÜßõÓÿV´ ™­ðò†§Ú†O°¥Î•Qk† lC›×q®¢¨zžL†"c\‚©@Ì ”ÇCqWjÕT‚!1MÕRñHYZv€¨”ƒˆH$ž† gSe Èž3a @؈'apŽ úÒñEZlÐ1º*©jô-/Âó\ FT3›8CÆ£ S0Èh1ÓY2ŠÇf·ª…° ªÀåH„üø`õ!†!KMÝ\Z0À˜g U+£bA@€ž¤‰Ib«®h®­bÁG/:ã“Ã2‘st(™ÝÈ`ÃÐ0Jf(®ª‚ao ÌE-.Hd Z c½~2 p`@ÈSÔÛ¡fåx‡,B|©]EMK´Õz¿âÖ’2 „$«a1wGo™tÛºùí•å¿*Õ„Zœït]ge8•mJ´Ë+Ê’ù¾Ý¦ÊKZd¬è–µYTÿ/6X¥ÖªVs¾iÞŽY8¦'³J“•6¯¨F]®9s„í«”AYYŸiKIKâÙXªEÕ3û­™]uÉ㸦fwtuÐ´Âø¨*¢«ÒU'x·Ä’~u)ŒÉíA™y·v’¶QÈdÇzJ÷Gfg¢%%m!x­Â¸ÆG)Ÿp[q¿×•”“#®VIö›”GQ;Ù{± *Ëu¡ µÒ'ˆ!N#©dý©-jÛêüG×û1->Z5m\mÇDõ0@¢Í_f²~·XqÎ*UY.Û7^KŽµÑ²ÌS6-©º×ãc¨¡_Ï_*ÙµùÍztºB$‚ŠÂ¦.þ•DF‘* …S»3ù–J'Íþ’Ȥ˜®J×'Ñ)‚Ó¬™¬r²ÕÕÕɬE!Ø@¬1IëµJ•έ ²“ŸqL•}”„‰ÒMÝ¡]PV™èª¢"š‡¶ã™B³ â•Ø˜›«fÿoz•ùÂGY? mãH]•òËB¶%1éŒ?î|¨gV}IÌMµÛ®^6—ÝNR2œ¡JBŠRòhÔ}ê¡ÖêÆÒ [j_vä¡Hüoª–@ˆì´B°ìÊÅ2¸E»£ †G/+ßå¶ÞDYQ¾™ó^y? ùÙC¨*陼;yD§ì¾Æ3ŠÅ"ˆòßf¢âr­LÅUÏé<ÂóÞrØ‚#37òÈEÓ‹Ü9èqD+á)DŒÂHÔÇ”ä!CpÃÌØiô‡‡Ýéÿ"™ÊùUÈ=BÐOЙ…04ÆðB’8ˆM€Æ îÎã iÉœG/\‚ !v¬?z#‘•™5Þ b0Ê!ΊhÀ#ñ‚ajtrT_MÑÌ/¤8E&áQLXJCÈòšBêéÍ ³W‹û¶ F(؈V. Àl d… ýé s9¬ÈÊþ¹”\ƒ-˜tW\b%Fx„|´B0ÑlbÔðª,Ìc†-箣u£±zÆ)¹< ³ˆj1 &=dÐ2£Kd = ­ÈN¦ˆ½·CÑÆ¨s8Ø¡¡ÎA3Å®(YJ%ØÑñA6R¸b Y ýv# Í,ZR=Ò>¥ÜœsX¸ð&þ¬¨¦aEhž1˜j(%;¶ !Æ=@à¼T „”n‡j:(=Ä„ ÍëÜb˜bÌCÆeD´ š ÕQ7êE6eÕt}cС‡%©DqÙq†d&0ª]ˆ "¢„Sæ9/ b€ÐŒ…gú˜Äcs{fŸÜWú†äCÜÅçJeÄ2¤uBÔPE2ÀÊœC™•€6B!BŠcëZŽs}1@+$q£0+h €Ì!t1äA Ñ9BŠQ 1¹†‘Edù†Ô#8")Ì 0 Âz ¤¢—µÅC€”c êx`ŽL„c]ÏTH4ø—59B:÷ZRúg§ܘº,‹w¡)2øËC2˜—×>Ç´ÍQ7œÂV­jm"“<˜ˆ9é5©ú|rÑ5ñB8¸‚Ó¿j™aŽ"}&BQ6è¤J?¬Í›òºŽâ›År²õ¾¨ø£¯Ü¢­/ RU½óØ—ê~•LΧ¿]TMµŠc×(S=“•[3žÂeAte¥{¶‹Þs¸özzµ¼ªQd¾R„ä!„^ã£õ%Z.XB­I)Š#Ó:½|þ_½7kS½Ð˹ÄÇ’¶TI …vË)_TÏ„/•Íïºk戂£YÛ^‚Uw„n(B‘ðïDØ‚+ð™{wÈCªz3°·Ý"ä³w_ê¶ìQXLZETOôßÅöy89%zë”­.Ïër”È„ê©PLý+9F ÈzrQ°¸QÜ­_4š”fµ!ªÝKç¹VM*U„«‘.w‰Ÿæz¨ÌSíÖY‹W2Ñk"Þöª©xƒŽe>Ó-/m§‘(sèµEeŸ sMz½EµãŠJ£z?š^B.TêĦï%1L$¦(®Þ&´bfü¬Œ7“„l¨¸”ÁZùÈZR¾Æ³¦›$ˆ#­W¤(Èã_%T±R¥6 «ø” ‰6•7m~_Û:Â+÷³ïŸã“(!ÃÓ ¢ß|aîælÊFÜ~ê!«A†yö´¯*ánpY…}<‘*9ótÖˆ†2$Æ9Òs ·¥™Z\¦*‹/YXÖg3´‘^Ïr“kçe(ì„æ_›ôGi„9Z¢ÄêUí^2\º"Éeû”µ£±AÐ’àã¼PÍ»s³ž¸ƒ´ñ€¥'¡[íhj +ÔR#±Nõ¤Lº™øG¯|û—Ž·©.i§¦2³²ê(Ä%6´kýÀÄMqbV s}AJ5&2D›¸\Ôˆ„E!—ká‡êæˆK–ALi†JKL­šEÿâSH·ZaÉûüê2ãú+üŒ´àPa>MâtPê5¡ZdkFˆA +ã-F)Ì,öûª~mHµDN ÔC5hD|QÔ;_BQp ­¨¥ëW%Ÿ´!tC,K³›Ó\õgî¤àygÀRÀ:@oÿÜ· 9/Zb_ð׆ ‡ž gä½SR1ˆÁVf²NU%k6Å$u°È–M:#k“ËÑ´¸Ë#0¤ÒS#«'>ò´âçã7þ7k´©U ¸•dgG†D}ú2`…¹Êæi´Ql=Ÿ<Ò¹6åú?¶›~ëùòh¿dQuzîs)”«)£Ã<è:»%Ä¢í ¯!krHš‡e'£¡-©{ýölµ[}êåÄ:ÌyÛ z9æ{!Õ´s0è¨r¡×xëóDöÔj“úN-ë§£¨—)bÔv²øÊc6—½úéF˜¶wö¨•oQË"z—r–o!jZªNHuÒfI—£H.$Ÿ‹ò†U ÉÖòGi¥-ƒ  4²kŽ-œåMoæÐÄ{nk‘x/V÷Ëqe壙GQŠ+±°œmR3HñÍç…$*`bNL|ÙyVBó2ܪéJó‰2q‰RæmnýSW9±”§ÙFÓM15äM$W/ *)I ú1("ˆú­í¤‹Ì† ”MÓoWeÑ=mB¿5OvùV#PWºq˜sB†}3Øœf³–‡ÕVz3ùW^«¸ôÜÚÓX»’пĩN¶74œF»FRºY\GIЈÄf)$jÒ—JF-|-K[—ªœ¶Ò𲓠ØÂ¬B|¶»R‹‰ˆ…gºëçSHK³ÊZ‘jÉŸ ˜‹ÆGCKdS7Ï‹¨ß¡"CË£¨í”!ôµfYª–M@™ ¿"PÌæOÆO„y’Zè›’cÞ,™ Ëj¢¡ÔäbŠ;ôýoQÆ4Å×b4Ã+¶‰GgJqÒx­­¯´Ldv1&T][,Šj–\6‘Ô“2ÞŸåÅd³j9–èI_$2ƒ.¥èÚV²—¹z¤tBÎ}kíhø´„¶Ÿ\”^ºYÞ͆AZªª¥ªŒn±8¢E&©ùQÜËëÖ^"ÈOYjz_s4—©Z6ˆÌrq{(´#é×LyX±„â$î´E]¢ Œ+yŸ¸JxJ¾œµðÓ ÙFÅgB¯·%—I„ßÅv¥_]9½wŠã§ ±ž‰Ü.„¡b½ˆe•:ï†z0¤å6ûäÝI‹­3zÞÌ6UîE3+Èá+rЮ©By;7ÞÇtõ ŠYä&I-««š–l3ÈŽU¨Ÿ]= ÊE»"„lÁ'$‹ÁŸ åL9nA=lÛsXûer^¤»´TDÅïOnZ#Òl‹Ürvé2Q^뤡fjšV¨­§ò›¹³R“ž«„LmÖR\“œÃ„bTÓ9äM­oJ ÆŒz¥æU¸B{á2ù.+aÉRU‹f”¤WºHžç[3z-tù‹ÜdBõÉDYµVa3ã µ´eTCQÆ÷j³ö‰P½˜)Ü®Z«u»jb—‘ˆžZy`¥cU:!¨©êCã1ÎIÏçµÂEg¾ñ+¡½¥©jù¨T£ö¦7hªÇ¸¾0®¼‰ %-DhŒrë–ŠÂ7™VŸísñ}´´è÷J°†ªï YÚ‚±œ½ê”®]»ÆúYšåMìVn¬E6…ƱN¬¢@î~IZ2 Ái´w²Ó…°˜½Cx/˜´{‘‘[2ggâ‹UyäE°®aœƒ›.-8W¢uë‰Æýô¯+ÄM l#§ªFzŽSWŠB'B(¿/ïØó;9½uZFþÞC},Sü·IIE•JúŽdd#­ˆå;}õò9ÖáxØI¹‚Í ð¥-š:‘hçÄäôÞŽî( AeȬýt0^'ë¿’è«ùiâG•ƒ Ô¥¸zDÂURBÙÅÎ×1FTº™Ðª¾Ãs?„M¸\,Y õk$•??;LqDsÅ_u@€!!û&"î $Zï^AÄ+ÓÆ·s !¸_ý¶qKL,Á¹*ÄS—ÜÕ2H´†xˆ‰…êËyhq…ëi0h¡äBS[>„dËd˜U `¡†y§ˆ¢^W¤$Ë­]û ¦ÒÐ¥†‚ÔD'< Q 4TÜ=ò3zHæ˜T Á :T¦êÜ”ç'¿}å&L,Wú—_M€Š2°†l˜â©Ç- B„¶§Ï\2g2) 6©äš øv$·¡%¯DzQ‡´ÁŒà @0¤É$£I6(YÚI0<ÏwKkMËoUÑ”išu#'ôçQ…1ž:íEDÚ4Kl7I ¦fCÜž•¼BNÔ¤´'‰Ÿ"¬‘K° æ@pà $(Xk y° yî»4‘ YãM<¥îæŽ ¯®LÐÜÛ¸m«Ì!…uOHÂJ|h…ûsHÞ7$õ)Bquä/ŠäÅyŽ`ÿøÉˆÄúNÛªÍ jeЀ³’õ£¦žüyh¾z †tBÙKKÆéü‹X‚å¦ÒvÆa·WËÙò˜PæbÃ\ýÁ$OŽAÈ’­c°Å„#ÒZlÂö¶ºx‘¼VÁirNq$ g„Á,àö:¼,fBô >œŸÿbIMœnþ(›Áf"mª9å ``“r©²æD˜8Η]ãÒ‘¡#ø í.–°ÜA¨¦bp„PŽP€€ ôð î妓’ãÐOí­ýÔÇÑ…§áWö²7uGts)¹D ƒ b4CظvÄÒÂW Qe ³×)WÐÿ’È|uÂ*HV8ppeƒà˜^&[høi%åá Ëê)$5 päêü¼NZPš1Ì•å•èÓrÜŒÂ"ù:y¦«Pd”+ñ·½1c8Ë'°‡@Œwtîr•̓Ë#ŠR:\.µðÜ(ÈYRIÉs¬´ ³žÄÂ"Íñ:ß"ÎB÷¤¬sç #C4ùÔ6LÎ#rKè#T] ú^zc¡‚Š`ã H—NÆ)þˆô¹ÊM(V7^H²wZË»B蔚-CXÀ‚€³Ðv/dqÚ É/xm„–CŽ‚Rt¤<ö*]f• ìAš h$¯9i¢%K =í6‰Åb r!&m·ÌO}ÿZ6E9Ù…*…²ðî᎒£mÄ’Ø·tÒ—%á£Kàtõ²ÿA÷od0XÏå8((ÍÒÄ/4"d%…ËiÔ}žX’0ù]¤P‹ó›a)ÿ„ðÕü䌷K)ڤËÂdPDû[Î'çÑ^‹A G6‰V0̧çáQÀƒN[Ëëzr’x—r´Dcÿñ¯ñ=ášèSY*õIh R B²5ûþ,‡»Hi·™á2ÄQÔ£ŠïJN$…é¤{7çãÚZJ7+ÔE}Ñ‚9–pŽªYuŸ«dÛÜad3]âÙJÒH1Br%e§îQNÒª:Š14ßaÏ`¡›Lê *N‡ï-cŘbÝîÖ‰.¹Mq®JlÇ10tˆ8xú Ôî7R_çT¡F®¼‚Eâ] Ìû^Œ5Ìs8üÃHO8(è"ŒöÌ|èSŠ˜N·RÐÕQ $ìåúH’P‚èœx‡‡0@@QÆšƒ±Â_e±uÓb}£Ú(ÀsÏF7‘(¦;*‚!ºØ±|Ãê$·H§)Npº¤Þ¨A´XÎ<™*VùU#Õí Ù»r×d$®  1dž¬T 'ðÕ¬£»iÛ O<ùK©JbÐ…5ë,ÊR©<Êbé]ÿÏómJ&J÷œ‡)'AŠ`2 óòlEz·=çHýufkìuí9Bi1"åÚ»¬6œR·È'A¤Ô%*ñÚO½k\ÒRF8M°T‘æ(¶bQ »Q#âß´5 :zyãÅ®qdYKBòZ3X*0à9€±áy«!Ǧ öƾ?¢¹j<·&"fÖˆn-̧[É3âЀ9 \WrÇÊ„s¸ÒJx'ü Pßhž×ÄVåC’¢ðè. ³ Ä-HR'%qËäÅ-_£÷)gÂ;^3Õ>+T±âçî g&ºÖ‡̳&=ÇÑì;°‚õ¢X}þ×vD‚3Ìïý2Á€€(â ¸!­ù­4Dˆ5Ï䦨µ6¾ªZŽM’”Ê«­Ît•„ ë䚜ڜˆ%’2Ôš0VŠ 8$lÒìQJõi¨wÿ¡JäqW8†iÁ€à°±b$“dA°•ŽïŠ"Mg•˜ñˆ–‰xM&Lг—è‘“Š® r….Ùb“†¦íóRÆœ¨)°$"ÒÄjà‡ÄÄ$…1†œp âĬrÒòw›ë‹Mw^¢[äÙiŽD~Ý£øÂÐIEz¼a|ùžˆ!¨ÇH)®)°',^9¯AXñ¬‘j÷$žK¾ùÈ+ªLV‡%¾-UA»t‡ÿRV5„-âJlª]œÖ ò¢Ä–¢)¢¡•JB79eº é*X¹Õ°œV‘uÕ´–HŠ2…P•Ž@Z É™÷N^É8”⩪éˆ]¾ 29F+œâ¹ M%ôŸë’ )§´KŽHÌv`ç3Ü—^•˜Ÿæµ¥v·a»ËæC@®s",nŸ–üåeþÒ’Qæ'£ÚŽa™Keq™õs}¹ÐpÜ-$¤K'”º¯:Õ„¬1Æ|Ý£y.lÜ2#PÚyEí[fµÖmÊXÔóŠMžË9(ù/¸Ó)ƒ¿9PQVt‘üø‹MêJžùÈ[aU+¦Ä2;hèësj€¬’´‚Ú–ÕG±íÉE©‰ð…•³‘Ô! Q=r å:eF2:¢ìè8AÝz¶˜Yš¬rÔ²'¼Ú.¤ÑJR*ܬ“q) 9,·n¯L~%KïBÈî†={´4ÑŒ)²!O"š±71%0§fxg9<•Z¼š£ÔÅ©þŽØwÒËa<˜*‹íå1B˜AÆÿ$Pa¶cK‡•…ÂÜ·úZ“Åœ‚—1jEA[%+çQ.Â2RcJÏ"%VbV¦…÷ém{ŠbÖ¬ScUkÔ³—eB©åFŠ1 {–6Õ*Y<»z]ÏGÚRSð‹¤ã‹«ÌcI ±dî­ü’ÑãÊv %Ò‚"§XüR5PÀ£ö¹&¬³Á¨ M‚¬è#lUE5´ÝØLÈ™õ‘ÖuöDç¥B_|Ž‹vjøÿ6öÉFHdŠ)F?Õ"¬C‘"vzPJŽÒ9V³{µªÓZ7×2V¹=¬dN)$‘*!ŽIU5hœl(–lœœ´à%øÔ Ò7D€Ú?ÛB M è¶äxDþ f¢… ¦m Ý<žÖz)B—tpRŸ)_…¥w*ÁHÍ£•}sŽä["áǼ½¼‹áDd4ﰗÇpˆ‹Í¸š+œçÛ $¹8uúX;¶(D–“·C~§'œN&ÄJ掻†Ñ?­:fxÈ))èa÷?ÂÝ(㨠Q'Þ]…‹có';}UV‡^ª%%¸0îIXh[‚µìÒÒà¬,ñ°½ܾ#™1ÜÎÔ!luÊ|bˆäe©W DÁÈ´ÜM ÇU‰@ƒ øÖ8ß«CÖ®’ø­ª—MòœQeɇ/¥Z&H ê— "Ï|Kž\î™ÊPçDN«Iò÷Q,k.‡ráLzæ-¾âŽ=—³Ç´2ž]Ù¿rw[ì¦ÄùqD9¶cQ+‚ºªU),Äá>’S{•¸¯tÀ£ü)0XØÃb°Tt‚E%З½×8½"0OÌ:sv§~ío¹Ê}‘Ç£}…&2èÊ#ÝÈié UM„%:àÏ'ØF’|9•×Nì3Zœ«Ä뙹 ÔÈ´E9f¡WÝ—0·Öß"^Õœ‚Û®emªþvÊ ‡¸¡†nhB¼´(‚ü(0ìxcƒ–x“XÝ$¢C ÕR ™ùÚœµ5ï¥zÊ"0ñ=bryÞöÒî¥4´œ1Ž9ë×I¶%D2e\"w2 ¨sóÅ|\Èo*Ši+”?Þæ!ðÎŒ ªUfÄñò‘¬¨!橃”K6w˜i­AN˜.5;4S°fï_CÞb”†Ò$ƒeŠv|EaÓ§j—i›Z†!OS$¶Ú[ëšõ┄¹5ÌĤNìõÔ(S²|áN™<¸=¥óóÎC TFz[$»Q¦¡„<µ™Jµ8Ú:sfµE`öœÂ¶ ¯²!‚çBã#YRZ™Z'é&D’Š*Öuâ_NüêŸ f£áRæU–ÕD’zT‰Seÿˆ&Q؇+•NÙÓw¡D ÃóQ™ÅIV«=l˜Fl›È%•¼]8áRÝ"º?ØÁ»ÆRÏmUd!eGw®©­ÿ%â ú& TÝFJ4¯ŸÔÕ­+Äû;]ˆ(±mJºå&Mä˜xÏ1Ï–¦ûŠT£!ßÕ½Ç8[Ó‡gýGÒ`®º•5M«™¢•¨Í=u&/òPgÒ„nêHÞ¦¢uŽoGµ«ïCxUµgŒ)¹*”Rq£2y½+A’×1¹…IíÈ(ò”¢7/$äÔ#×^ù5NæÊLU­jÏìt§øÅz=«ß!Øìå}v°ø“ŽcÙ§ej•7KÒq,t£.ÕLR›ÎÆê\B`ÞöêyÅ%D³ˆGòÛ°{š^å2ˆ%r¢9c9[¹œ…Š#pœ9nS'åÑ>K1ÿ=»!_]“éAK¹Ì!DS–$ëbXÿZ¡Zy_"´2Jürý+)|Ÿ1R¶\ËíÍv%ŽAM”yD¦/ejüe".îJîÊ!KrŽdÄõõî¼Ukèåb)2cÝÖ\üd[îv’–LeE+éZ‚ñ„Ô÷çÈRˆTâsÓð¡ÊþÇ~ºˆ»1´¾{¯‘MæÆ¨Š§ÎFçZgK©ì˜GFE‹—ïÜ"¦­$;Üìêù"Œ¾G-y¿“QJÎS-=·½JŸ¬tRYIœ§L7 ¹¶‘7 Œ!” Ò ù…ÊôœàlÔä‚*>WMxÙàAÈl!ô¤Ùe0*9W1Ù‰@Ä @ÂŒâ¥|A#"ÊaóÀ±Œr,AHäŽ"‡¦l P§Œ–Òp¦Aà´{H36c¨èá ‚Њ%+ °Šyín1Ëýú«%‰e’9Ds ‚>©Ø¼2 —â8°‹FEC¢¡&0…Š_€B@„H@¦iˆtä" Ôz~pÏL¨ºÃõÁ ӱ9„BŒr‚zldï—†' §>¬ø9ÿéï2b>çe.0a€0!†/Ü<År3å¶ ö:éí‚%Üe¢Â1«UPc°Ô#X> Úª;ŒYÃæ€¹ÎRîé¦jU&c½V £@2&BÜLèѬµ cÈBÐh—¡ÜðZ ±‰,°Ç3šˆ1Ð1ÔöêjM!ꑲ”©¯ýõR®y,nÕYD1#ˆHˆš¤>{¹ÝZEm-íį’LÚTNZ%½Ø™Ø£Õ‚I qgS‘…ejó‘ŠQl„õ~î”™L$Ýïd4¤JÓq>¡9FQ“7(TAl·;‘K•‰ŸN=WýQ/ÝZ£‘Ú´L–üŸ!G+Œ#Ðçë}Y¤k c¡y-ý_ÒÝÒ‰ºö^ë&®â°æ bÆ$–âÉ­:çŒÖRûóDßÙ{}»hU¢î¸t%×3},ÇŒKŽ!<ÆV¤ÊÕ¶'ž˜êÛ´Wü^>ê•—qËM1ã ÌuÊoêmÐS!F’>lûmûËÄFI‰]¯`Ÿ¤â¥)™MÖ«™ˆ’"•¦3Q(3Q(¨âؘ¾Y˜StW‰R- ›ÊÿøÉˆÄŽóNlòM]W*³’}ÑŸ‹s`Øzp`‚Œ^Ín៾5S%–z”(‰1Ñ „ý)oF=ßKˆùMé1ç“0†ºêš"¹C‡f±ÌÂÖ” Må¯Ï-f{ö3ň:ÙŒEç«ìCÕ¶(ˆcs‡8žK2,¿‚ˆ²òÛ‰«¤NÛok³Š¬2\¦8DL«\ÞØ£Sÿ”Þ"S”ˆd92oÍõ¿z*JPŽpUpMà­ž"ÄŸ”&É{”a”^û&>QLúµ;ƒh••_·q<ôH„{PÆrƒ8ƒB÷¦T—áeÐýS‘¨‰ÜÄqgz™ú¸KÙé:K§ö#¸Ì®·*‚(U»_oU{½ÌÍìN#»—ŠôšxÒI硌,ç#"úCOÊg«È[­dß²ªVÎ%£àQ›³f½UäÂò3ØÕ}U‚Ž;|®¥¥x…¡75WU ‘,™mÌCùWiC©0Œ‡Ÿã_)×’S‘ÖµßÉ/§×=ð—4©‡j G³Rž—G0ä'ê«!Ë¿»æí¬„dé±0~*-«±I´c¡U‡ !‹J +j"Ó§ºöá?‰§¢$œÆD/}d1D0d\)P¤ Ü~‰^c%ˆÝïI¾®A F"=Š›|¬?ëäÛ³¤Eª"ABœ“BÚ)S³0ymkc:/Êí†zšˆÈL^ÃfÒA|¼Oz¢rŒ"LY\ÆG3¶µJÔutAŒrŸÉbhðò}ÆXI6É]ˆâ˜a ÉÞ$UbI¨ÇmˈM“h©úfx‘ë09øi îZÖ^r¶“¯?¬ªM0@‚”$Ü“‘KVõkPÓi››>\ê̵yÆ*0∳ˆja’t-”jÅþâ)E¡zÁt4ûµ;ö_?¼ä3TEFÑæÉïSª¡Â»&£×I9"^ô¢gHš¶›qÊŠ®òâAØ+Õx(Ž{%´m¿ñìÆ™¢!0%õ´C¾µ±*ŒQΓ™B+²=5±²µCFÔ=ÒIàÍí˜ôó0ųäÄÎÁ,òI!L÷n³0Ç ÂKÜw\~š³fE”ù­¦dÙf¬›A18¯‹íØØÒl.†h‹ì„÷1XvˆIpÞ/3ŽôV8C™+û‡-cCH!¸4´E/Š +8Ž´Ê½Ñ „Á¤ZÓª§Ü‘ªQĵBß)e!ŸcdØJDLaÅb,ħæf%͈Kw󯦿‚ýJ‰þU¥C]ƒ­pòíÄÑÆ”ÙÒÈÅÞ?µêYà’daš²f–›¡Ù4G*â1ÄV¢\1é‚ K$‚vYkkè„A7kPÕÒyÜÄçÃ6  F8A’ÏÃHׯ«™è`”?í¬5Si÷Ƨ«Yc0ä+ÐYÙjÑD¦VºŠ'+|Sº“PdHBÈØKa÷ûEA™Ê"†8 T§º:'XóW¶ÿ-+SÈwjâ`£S 2¯­-ê.Û ÈgögˆìW³˜F „Sq÷ù¿wÊQ>d©EX–(†³ ’Âdþˆ¥v"X±–Ž2Õ¼ôÜNMq 'sÙ´W«éI«iJ¹6KÈäÜÂ7á5¿,W°®9Kâæ3|#ÑžüºÈÏ4³îлŠb‹žY^ÇHÍ„9ØfZ+˜’½ ¾Mw¸Ùšßy¡âÒ81ï.˜LÐQ»ÔFÛ#±‘”Òe0¨-ˆç^!u"q?*›ä—Í|ڊŹfåÈU(‚•XAÊIvµÝæÓ a.þŸ¤KmNÛ¿”ܺ•K+±LIцS2™J”!6ùØKSOb’…«—žDUæfÕNMÚ˜#YŽq…(W,üA[»Ñ©Õézå¡ ¿~I>Ý*jKG} ²d.œ®„÷Xƒp‹Ô#+fÙSÚ˜Ö껞ˆœ­"&#¿—QÓ,„¢,¢D(‡¾–ü}$g;mú©¶Úcfñv×eJ¡•2«ök!$rglÌÎÓ»=‰Ý³?3Œ–§IšÉƒT[ä'Y}³1Q$r±J9”3ˆ M Œ36Té÷á躂-Elðß$Ú„n?Zߺ¦s=Z„-”çU`®wwd«vã6§kWôΕj*—ÔrY10]S ‚½Ô‚*Î]-q3¹2Óø”&ã)åêNëÚg×B¨éѬÉÜɨTÕ©L©m-ZÈ©”¸ž¸®ÂÚÿ¯×ºñ-Qyx¥Ãƒ/ÇàwB^³®Ý¹ ‚ö3ÈGGº5÷£4|XúV2¶‹™¨’+••.½˜1i!ë¢Õ‹r{Èš:©S:œ©d‘Ð.Êš)˜*|‚È^yq,ÏœIpò0“ ­Œí¬õ! žéCŸK¤+"2=Þ¥Ã#©(¹ÍÒ-Û…¢CQ·„ÓÍ#YB÷ÄÂR»¼ª8‚9ÔJI9ÈcšI6Ÿ)­[›å“¦Ó¸¬OÛÚ¾!Ž„]mDßK‘“JB"¾ë¹ æãw«-&4…¥×™Ž™â{ï‘{‘Ɖ;DòrÝ„gǮת^÷Ôš\Ò“ÚÇ=“ÊW% b'Ùê˜âŽQµŠ«­¦7~zi£R™ÅÊYx%ÑʪæDF0Ž¹Æ½wÌRË–ÿ=軪[ôܾB5eìfQÖÉýF²8sÙìÈÍwm#c*ûS‡¹nR»Ò‚·jCˆô|_]Zˆîýë# BúÿWYÙ¨´öÊùËaë’t„òCTˆWˆê26í“ ”n&ݱeU$W©=×Ëdt%¬=˜¿&š–Ru (Þär: bŽÇ" PkÈB??©âk³”ÔYn&RØ#9)jîý„3ã²ÓÕDtÏ!˜ÅLürN´Lzo½v…9ñ=ˆÚÆŠ¶M¹læ)b8ÆRY+rWó•³Q3Ÿ±]´Lƒv)^AxM#Ç Š¥têÑu²UäÄ#êGÎâšE·'ã±d)0]åÆÄ"®-5ˆbìc5Ú)„R=©¶z›œØ¸Ér驨F|_C­QšD2hÇçä­W]ž#âJ&b{XjþܪÍj.•.1=/B”ÅòªVÇA\ʼˆKiÔB Äû…I¬w~d ËOÃ.̃rYJÛ•%)ÍVÒ7êÑMÕ3ñÕQû˜”.%’¶ˆ`B.³ÉžK†¦¹ Šv!†z‰Î3:ãlKÛ„[‘E–ë×J™ÔŒ% )JBN{UiõVsÑ~®ªd_9Z”osÅlâ÷,‹·l‘ûúªæF)gRPƒ«Uý³²ÔD—~€´„ˆÞƒyQÈ?&E !ò¹¢¤„(²M‰ ^¼´ï÷ßú«üãþ\ÿ9¬¿á¿÷BK*f¦ˆ¨~ÀfFk…1Mop–ãÇ6Î9ŠDb6kWº×Å}rLúˆ]R/`w·> j!L2œqQ ¨ßA‘ÔRˆþæ{f3Wt®{³šßÔqÞüüÈwÌ3Pv)ÈãèäTö{ŸëJ-R6~Ìñ˜¤ú¬y/e{`îò6R–Ç ‰ºPyzøUñE3/q­=5‹JÛ#§ c”Dg¥*벆)Q—Ÿ·½{›“;­×Ëri TÛ¡weYÆaM§:}DêH2nÉcš~VòÍ2"Ö©a¦ÍØò_Æúi‚[ŠÜÒUþ‹†d"¡tbÌ“ë…N5å%/ÍŠ{0¬ŽŸ§›K3Žê"ëí±Õµ©PؤøÛDÈŒ*Ô„BS›:•1·\1 ¡ ø•!~­¬ƒ”ê²#M_E‘I…õêzŸåÒ¥iF!¹Ÿ\I –Ì5òôb”WUNìhšÕ-P*g]œñó;íÙ¨V)8²#²8†xŒTE!Œ—'»ŠMãîZª›)^=«¶Ïªjv¡k¿ÏC g⛫CŽ0#ƒ¹4Ÿ¶‰B‘¥U4È¥-ª.Iû¥Äœˆ(ÊU2Z–oªðupD©inVzeˆ¿û=fÅ® $¯ÞïLª1³óÐæ;ÌütÒeÌ9„Q™––ò\LåDoÂûVô‹Ikzë"ŠïºžIR"•ÊuqO8ô\vˆè1©÷Õz×ý-¯¡L—j¹:LÏöaZUêfaœ)eø–lZeÈ2‘8‹wòô—ÍÆ_À’‡©Ô¤|Ü"Ë›sÊ’“+6}ø’yû 6‰R¦Éy 9·¾Ãwä5ˆ §|Ùép‚ 3»åííÊn…«}a]BZØPû<º—(jiW­Gc"\e}æsÉ+8…£F¼„¶Ä£¡sHˆ§ÉÚªÇÅ7QïEW»EXìÕcÍ%SÊ—N÷ôRç§eoŒ]¥‰¸üÒ•¢TDÎÞˆb¨Ç[xÂU"] Bådæ\7ÛH„Ñ$KF¬„¡šÖS ªÞ³8ŽpØ¨äø›mÿÁ,#Ô•äežÐ´ãí#ÔÄD.2XQ#ˆ“‘=^A3P©†;†e¸NÝ’lª[]¦JÓñé£lSFläªbÚwd¢™k‚êH6LªÛ”!ÑMä¥$ÏͱHæ#,e¢~¦Ð” „d•IlËiÏ"'±­è&K˜Fâ°¤ZÔšÎ/R…J²®gqœÃ„j/WÚ…| ëŽþòT! ÑíÅé$¯ 2^Û¸RþïΑºa ·³œ"Ú–•ª¢qânf¥¿R0Ñ0Ÿq°.bHO¡eM£’T\!ËÌ·FbÊwÔ|ªs„Æs2÷½Ý¼JAíTœi…h§R§a6R¶”­0ÛA½íß•âR¶©ÐdQÖS£IyR8r9Á„Å¥UˆT´¯e(ñ£e'6öÜBÞ‘~D¢‘Ðè+aG@á‘Íy1ÐÈ¡ŠVO-äÉ+̽˜Œ_¶K*¥lL~áœÏêò±ÓÊe%¹êU£)ˆ¨Yì&­ìþw¡I…~j%˘!g9h|%ªÈ§«zN½Q¹J­S´EÆ#Y…®´£" †1GK cºj­Í{–Zb­`”¿šõé*s8óeºÄ£àÊÏ”âðcq“èZ¡6‡ â%|¢:Sé÷µ«i—xÅ£ÊåD.kYgj9¦q•L0…«û{¦ˆþÈlf×NÔO¢/­©½c1]pÊb_b9½½1Ì1«ýôj}«U›©´]Ë}Å{<„w+f°W•Ý1QͼÄv¢{4¿X•%… Aæ‰k^Þ^I¬Þô+Ø¥Ì|(ƒˆ BùÉdñÅÄ*Y)÷Ÿ±è7ÝT£åoÛ­Ôå‹r×ÚSó‹FodÔ±7ŒEj£ÕV%)÷:šºErWS•Ùy¦1…QÄ/ºæPª)“=ûÇÍB‘Ö€KÖˆ‡Ûã²°Jfœ¨ãQŽU<àÂ1 ìr;uî(\¥ÙˆMb^¡ä’”"\ŸˆJ¿Õò­úœ‡9EUü6\(q]ÝùH‰´šA»ä÷bŸ\jð—1†þD\’ÃŽV„qS¿%7´]¥éºãb£õ‹Ì˜š!+V;êévD[TC1÷ÂjîfÔMËóTÝZÛLüʬ…3–c0VN\z&Dc˜ÏÕ½±úÉgѦØOÌ™täÂÚ¨IY…QØV‰Ä5QȂ9Á:ú´ÝÊâlßS%,²=%d#´ +3éhØUAŒ+¹m™['?·¯B­½'ŠC+Mse1Y»Ä ÅOµryr™Bšÿ²q$-¸÷e³çÑ3.@é2¸žqÌ1hXŸ’´ÁY¢Ú¿AT…—oóÛ'ËÁ Æù7‰L,‰+sPî2Ñë³ +j#˜Ex•ôteš‘ }‹Åq‰M¾®ëõœwV$óPccª?¹Ò@Ä‹A¯N®™üõ±³OÈœ÷M²+`_Zd˜‰š½ft!»·M-3¿·Äo–غ–%)1h˜Ge–"ñÊp‚¥DÄ+9Îr²¶60ÿýJ[z…!ZÒe¹šAh­µ{AبG¦vDQ§›ˆõs•Srn¨×²DMBe]ˆ//D#»ÊâÊo¿Dw#ŒGÁ0Ö°´É3ët7¢Q›kþ!Æ>•æ3x§c#¡Êr½Éå̾˨¥þlˆRë2²Ke"‘©üåZ™Ì0¦bŒË¯Õ¥Í!Ü#®4ÔU¼kÏ.þ/TQˆEš/æ÷¡±‡Ô*ˆb/¶(sŽØcDi™G"n×E(¯4÷½R¤ÝÚË>ËL‘žˆ¤y L¯ˆÜå:%Y[˜¹ŒÖ“å´Ü‚Ï_¢ ŽDU4¸w@¨žºÂ¬«æÅ«ý5úô£4®T/_«G·2+;‘ B/„sA !œµeUȤVVD¯ŸâËyñ›Ö„;¹e´JÙœó!˜US²Än §0Šas±ŒE‘ï¾Æ'`¼ótÝ”"¥M½Mjö3œr®í’S+ò¡ s•“NEÄy­ÕyЊ;ù¸„•¼£ÌR #­Ë­ÂÄ)ÜdˆV–Ûõ—· öòj‘žél–´ŒKˆR!æ"Ч SÅd0‹êQN©JQj¦¼¼l©} b¶|³[ %G㈠Åú#XJóLaR̼ÌtÖ­q¶Šc³½¬yqiªû™¬„)ñzËÄÂ4íBz”è)\®ûu:ç¡«{SºÄ°å"æÓ›²KRÔYXÂ.%¼´2h™ÿøÉˆÄôN Îà·ýø»õkó³“m|«ö˜ý¶ùm>Ïs9KUYˆÌa¤ DZ:’¡åÿÑZ½l@¾Yƒóxáu ¬ú’7sCιìF)FËcXK*2 ´9d^KÒí{«ŽLªù 8W´ì:Hp¨[Ùò©0`ùJRIÜTî“?©Ëº&®Kõåg±5KŽ÷aƒ'QS‘SåN$¥Ûãx»NÙ$‚Qµˆªd”âÜÌ…ˆ*¯Ó¸z—£)ÄWnl&†^?^ß]xâÃÞq-Z3hQC‘ê0D (‹ñ9#Š>âdH‚1·2ãUdSIIs¿ËœÕ¹l•î%Ä0Pe«ŽÁ bÕH‡S¹w¶ÜÅ“%±ý&XÒ´‹0²„Û7°†Ã™j)%Q‡HŽù¯™Ò Ü~W»×é-¡íÚpö6hã(T‘’"88RVoå¹\[šúÌÙí%Þ£H~4-ÅÙ"X-ƒÐ\.=Ú!ŽÁƒ!í„Dâ`ÓžïÖK5K# Rþš)cAE݇á)÷ ¬x«lð0¬@9„ÕœYP-O…/³žÌ¸4pâM“øqQxUD Ìx6‡YÎ<$ù,†ÙOqCù²4Yn–?Ë 5ÎQM ´ƒ^—ÏÃ;µ;œÀŽÈ9Q«w¢.£Ô—U¨˜J:{òÒ#–c–äZ`•4¤Š][®5—¥JÅ•)Uü’§ˆdYþfI [u!£JÌMD 3Z )Ž3A:’Eï´Ÿ]%jL³ÔL<ͧéÉsDožLv™8¹$QñŒaÌ8(¢6˜PÁ BšMÃE6H7I¤£„!…Ãèl¥oeQºNÅ:Ä$Ã’T ìv_c8*ByùÚ€ðIæ ’ÀÿA2xÚ;™ è áaâG %Àn%6RW§‹,ЄüåØ0Â’\x—9c‘FP@0€ ã>Q8þ©Kü$áBTß©Šq”Ë`D-²Æ¡£›él‹7%qÇ ”5C+œÛJOÂ!h-\ÿ$¹â$. À-Á„5"ýEÐP8”¬à¢5 •Lº–{!Ã>¾-B'Dоâ¤Ò+©ÜQ‡3© “(í„û?Bl–5l_SFP¢1“Ö+âÏÑ«œM/ó\‡j‘ (ÞkÐ~’«¿ânGi¦¥Â 4/­5Ž0uŠViÿ{£˜áAAO”ÿøˆŽk„Õ$XÑ5fÿ¶²Ñ„ 9°:]0W$*Hžþ-´ûêÈ'œœã!˜dñ qªU†,\$DžÃå%*ì÷Ê"È;Äù¶/@ Û¨ïÓàH" ¯•” C2P".l‘m,è6åj¤B}Gf“ÑF“:_…ÝÍ<ÙRmØ)H#ˆ"Ž8(¢h†æJlñ¡¦zúwÊ+ 9p¶ø$$Ô$³ZÂY"§d¦òLèàG! s£š>^–¾ïM®‘ B :ìdœÄœQ)Ò¾—1Þ£u”º%Ï¢Ú£Df—¿f êÉH” XÖ’L6 ‡S QHQZÜô1gá»$ÔÑE# ¶é)÷»“#“bît„àÛz8 „q@B Ê ä0±¦‰îž²FÕx¡æž‘Åèú²ðPb”¥¨Î0â°–!YÈÂôBêñ JeäÅ¢ œÔx‹,Q®ªê„Šþ3mä¹Ê¬liÏ&Šl £ýaÛÄ0q@ Å„†Ø"Þ\—éäßTñŒ¨×„ÅÒR †Ô@…)Éû1½6§TXóÄæ8œÏO!Ì.ó«Z®œRФ² ³%°‡ô*žÇ*öPÖ>‰Ñ£ÂAdÕ¬'}ïBˆ`Âèf)\Ê¡‘ÇajO©°±uNLøúQEj¸‚/7-á60BM¹}C¢y:un¨Ç‹>Ë-CC©öûÒI©ñí ‚{’ Q rh!(±$‚ÆOÿ—elÙ™i¡MbñP%M4÷䥦/óÞd$†D!bŠ@ kIyÈ:E‹hÒâh&B3hÉzh@ͨòKù0ö>$¼¾˜>UÎ(@P@ÂŒR¬$ž.ô%Fø\ö©±¡O9: RNFX@Æ' ¢`Pqd…ÌzH^W(.Òˆ˜8ŠDZó{ô,Ð-D´Iè!ÛÊAÒ†8ê(²&3ù¥U¦-«ü´L)Z«b‰Ä³†˜S¹&þ‚¸­M¤ä¹É¢€–Ð Xø'Õ×QV”]%óäë¶P·ùî%]ŠÃe± ŽqÊEæZ¦i=ü­ÙÂÞÂJÊÞùd ¶«# ˜kÖqBÔ‡˜¨qj1o?N³wþ<(à ‹,(=b–$]@ŠŠ@émùIDÄ¥>áRtû²7ÐÖ„uÑÖ]i ¿è4Ráð a"Œ©¾cÞŠx>G/ƾbW¶|ê;P\ŸCQ/= •‰F’[O°YÌA w/eC”)Áš2„ V½õïËCØ‘¬t‚µIôV TâõCä¯QKt¤ Z%~$¤¢Ä©:#×bÚ[snÍ!øS:C0A ×nJ¸Öǧ˜mÂÝnSûOöè´À˜yö8ó-Ô#|D:ˆ‚0o !Ä ‰·š↠¤{æŠ3 M”@Nì´iª¶Ymò+»ÅT‚0AJ :± ü Ö$Z‰Ð“Õj¯ƒ60¡Ρ"ÁG<ÖÈa2¥ÚWJ} 4L !ëN™!ŠqB]í~¾¿Òn‰éŒÂ„8Ä)Ê‚­¢Ýø@Ùj\óÿ9KYayd_Â$\*.øC¦‹ò'"D „¬háJ gÉ}écûyÛÍB‚ƆéÈi6?ƒfTáÒüçýé~ÆWß«ÿدîãù'hBoB ½ÛP¯ïÎ òp KÐÈÉ}B{ÚœD—ãs±NœQÅ1’eψwý [½¦5–Ü–‘hY)”œÕK×þÚžÖõXɤd©Û…$Š@åTI|ŠvÆb•;’I×OZúEþßc êÙŠ¥//º‘ud98ñÚôçRg䟬"â*Š‹ŠÇ*¶á.¡ë´e³ÓøÚU„V šÖ¿ÛÉ^YJF&U’³R² æ26˜†a ‚³eHeÜí9b5Jê½õÞ¥e¼´ÄLB§Ýb×-v£Ä£ Éd£'¤J-Îr"ñ “{ñÝT‹sK¸ù‹•Ntb-•œfþ˜R¡ÚÓ¹_tUÂ×ZRH?‰L¾õž[4ª¼L”dÕ]ÔV!ÈÕašÇ.#uˆTᇭeá.Ù©‹/·¾XÜ=«#¢órú¬¬#ú¬¥‚­b:æãëtºZ/3î÷'­©E#6•Õ®$ªŠ+xÈ(©fÞD©²mÚ¹…Ì«OöËHI lW±¢&½54§-ØÅBÝLþžIÖ•!ø¶°˜„¹Â90¨g%,¦(‰±˜BEsLùQ2Ù¢Š7bï,ÒМøµU¤¿Û–õ™ŒTƒ¾‚½k© !.f‘:ÉFBYKíG%VéÖ'#íS>Sc;e)w¥Îã!lZ…&åsМÑJ!TBÓ…¸è‹³åuÊ–Ü±Š©dXßKr¹”ƒ¦z{ñÊ\-,A—›hÄuEÂØk¯¶QENE£±Õ v—«!D‰NÇ1zØ~¶Ëe²õtT·kâY¹3Îã•®ÞILQ c™ØCs1Ì™"~]Xýø\g#Ž![‘’••‚{Øà &dâ(—ó1Ž…‡)M¤³)(Ȭ¼n³ŽÃ jƒmU S£š´æ‘À·”€t:}BˆÄkÂ"¶¬a*QZëÌb°dœ|ã° = ÌOoBL†¦C+KHHc†º* üF|9FtOÙhRºøNÈ¥)»™51 6P”mÀTN•‚ ÄSáJt4ˆIùuÃ:‘í®ÆIC”s‡bS"r¨sÌOZ±ÁBaÈÅcúmBQòb5Â1Â*3~ ö- ΄¾p(²" ñ‹D¹*0d@m Ø ‚ÀƒÝpù„!aÔX¥r±S°ê°¬Œ]ã1 ªc¾¼ÈB¼Î"KÆÄÌáM!o’îSÒ1ÞFvEii ¥w!ÒV¡ÊÛ…m"+ë¡«N‹¢Tå•Ù8`·ï!\ˆR² Å^G\ò+3q9râ-ò]Ü&q&bÈ-kI6®b\•1%j3ŒGíöoK)L»‰ó.wâÌëÏê/&ñ:#5:ÉD”ÖŽé!%¥ke÷ÍOoô1ʇ7%©‹RÆB‰·Â¶Ò…”oU£µ^Þ·[-#ÊBoÖRû3 Ë®¯QIKØÝnµ¶*UIW¡ß‘6Vá¿4ªé¨ÈMßᔄ¥¿(¿¢w¹*b¤Ö”:™‘J§8âËqȽù”"]~Gêe°ZYl¸Í6É瓪ìŸa +K¸B«)ú«qJ Å¤­B4Ø€›òý/2®d‹¿M©Tž>£ˆn´DƓӔ²¦L£›kK¢¶{Dw]ÒÑ‘½8sE¨Íb°‚>½–tçkW©Ö®ÄzKF¿sÐø†â›dĺaPác!…W‘¼:_ÑÆ¢Øuª6寖›Øè!üÝjS¨•AÈÚ)¿p–ê¿×Èçr‘êÉ©›(*xµß¨øØÿ*F1 wI)µ—3UlUöÚÕ‹}áÄ"=žÛnæNmeçuSðºï´9lâvÝVM[™N/å ÞÉ#É…Ô2.µ?%BIèlbáJ#çÈ–(At¯äg*‡ªéEnTo%ZùÚRfMT1 —^ˆ*HoK¹n-ݱ.#Ì2öUóö—ó"ßKuˆ„^n¥Y…2íFôÖcÚ3ЩQˆØ.¯³XWz ”}ÛzòÚ`ÅA·­勬Û5*fªAê¥Úôµ˜J}H‹»Á)£¤©ˆ¬ùwÄLM•o)¶”¹FtòšzÞ®´š‹oÚ©–èM’î¨eŒ1¬Â®ÖÛS$Êî)ºÒµ"+›I(á‡þŒ”þ˜fm©+ž$í/ø¼ûa+NŠýéHŒ»löYŒ•9r„V1nj3-f[ÒÎæY .ˆ}¢ŒßDÄÎŬúW¦„R/úƒeiDc5†QQÔ‰“8„b²-G)Ÿ÷|drœÊ²GÛm_ïJJGÜj»;Rûqˆa:³cÆ]åˆSi1IMÔ €Œ{$E.²IÓ‘XöŽR’¦­ÖUdì)»©ÈšDbTŒ/ë$"”IZÞ7Â(™ÅrjQÚ¬Të ;CIÊ2åô‚ˆM¯¢7þð¬C N$®—ûÊõ¼Q¤eåŒ*©%\ên·ŠÅn%H÷U$‰ 'ÖH¢BÞ(césDäDò*Z¢:?dÌ¢=¦ÊKI ƒåoͤï9Tº¿V‘|ŠV/~bÑ3Ö‰Mc냜W·oRÄÖCïÛZ™ÏhÍr¡;Ýk| vyøåQ¯q/Õ°È%(|Žì¹Û‘ •³SMÎa™(Å*^»´ rR•v¤÷ì<ע-¡¶†V÷å2û“îä?ó12'ÇS˜røYÈŠIÁÄaž"^ÓpÂM6Б ÃoœL—nõä4y%Œ"6*æAÌáN³Õµ÷lvJ "—hs£qD÷A /ŽAãÓüaIº§R¯ì/N+çÊaœ[ä/;D’pAMóË2ÌL­#‰"™kÎýRJ÷*‘åI™BK%14˜Zd†}šì+þ=$¤¦hœ8Wõ;q¢˜HÑ¢ (i*íóŒ÷ëä­\o¬Ä%Êä—Ùeu²”ÏØkfŽò1yí&*»:cWR&5e> §¤§;¶ˆ¶ÕÆšFæí “õ²c.Šœ’2íȳÂÒƒ.¼˜ñ …¯ÓÍC¿\ã`Ø!²[¨­§*Ta^y·zKuYR„múÄèGýÈáœKðîK!)f*–gÅL#ñ*˃î¦,„1SÅäún%1þbŸV*)«Lt1LVœ)E%o\ž•RŽ1±hqzDÜ™ÖÀÂ8ñiiS´I%ó‡—¨‹eÄ]MQAtZð”¶ ÿøÉ¨ÄêNøÊøèùùùDù¨úfû޳’Õ²#×HôPôøÐrdÝY¥,V¥wÞ¬»€´@žÑ’“¯jfVyI¯ Ýî#Œ@8ÕÒÕLãCÆ”¢ƒzB¥ @pKM„!r……â)›1=TœD´a7fÊ5 C°`MaNQ3kë$4‡¾*=ä ÈIWl&Ür¨ @8? ù-$$i*M)™ÞÅ߹矼$O:Z$å­¬¤_&„2p@¤œ·6Ö%úáQèÕ–d³œóŸUø(íÇŸŸÛx˜Ÿ!ÎŽÖ?ªØZIý¹Ñ¡Þ;®(Ô¥iIéb5­*0‚ F °†ºÝ“_ù:Ø&½0®ˆ‘S©¶=³ ‡ÕÑô|7È)h±j!É®Q QØp$C1ƒqÂϦSºØ«j? >KÄ¥•-…¾Š¹-g^Cœ…dRœîÛ¡ ;è>¦Šiim›Ñ¼bSÇ…eXS=™EJ5ÍM(aר´e,pØ@¶¬»u)VF!3¢IT¬ig‰l@rš"{¿§E ‹{ˆÄ+‚xNÉD! é·oPðòÄeÈ„\ ÉeRµâ ™Ç”ÑB1N² ¡p#,?k¡&iŸD5‹ðL,k`(û×diˆÑ¦,"Ê w.q޹¥"g«•GHMª]«çÞÚßì1‰ÉR:°ê!JÂ…Ii8ì$y£ò˜]h¢Á„ zÑÂoCl¯éF+›2Éј¨IOk^„ò2·Us`U}ÓÒ\¯^BybÙ¢ÿmkȈd"PïqIjµ¤[øS/ù`­i¶]×!U™P#Ì\_ÕcÔªòž<¯ ˜ÂJM6$¢VÝš„T?W¯'©µ~ 6Ü‚>³\’1¨+’ÖaaG³en+Ú™¶mº„CtÂÇ ÂËÐñ"V¢“?5i#"U VñÅA sækPªDYLjÊ& hí!DN<È^¥ä%ùzV¢Œ¶(”AÊ%]hJY¿î•­,e˜§­Öîj&N!ŒªÚ žô·e¼m)R!Hƒ˜E%¨Aè êM‹¶¨IâĘ Ris¼¡’3¢'-a€£BÂØp¢uîÂõªæâ´Aî†0¼ß`Ô6Öo <´%ÆéÒÊ#Œ+؈Ûn°ÙªbØ|´ÝaKah+È,ÁŸÝá$U—MGÆ6ݸ¶µˆ";ø”ËUªLl¹†r‘¨Ô¤Ò\@—:ÝÚ ŒB¸q™!¬†,‚X±å,ÊÈd6Ré{õ]KEñù¿d·Ð˜\\Õ9†1=…8b~ÒÈD¦Ó«oÔ¸¥áRdÚŸ)ûZ‘éñn†« È—˜·Ar„LS H¬1›ˆ¶k‡œØ±(ëaNeÁ”«B1a*o•®@ ¥Èš#qmc[ú± ª¥3äg)jmÚÚñõM‰xé*PrTÙ™SÆmB(E…~”n$\ièÛbÞA¼ÝÍåtÅVAŒžüTBÈâA^Ô\˜Ó«Pº¹îA•S(’ø×’˜>¨˜J²˜²4ÃQ$+(!…˜™ùm´øEJP+1:)"L¶{¡ËD¡ˆé"Ћä–ßAµÖ Ö{‘àªúô^.Pj ’Ø|…‹Á¸7S@Aª„&œ!(9P7Ö0²¨Šõö!,+ØbÙÙ°K„š‘~x·±$Fá‹U2ܤv{§» bŒyÞIõ+©dÖÅ8î¥(d•°u^Ú–Óµ|{”Êõ!ÄÏ—‰ò«¬©! ;emµoõeÂêˆ)bá"iÛ˜&H%—GQ[[AGߣÛäs‰Djo署ô«®˜ÊtMrHG p@GûlF2ã ÕÆaÓB턘\µ$&¶ I3É*ÄZ§¡9=KW˜’!8‡]J*¤¥îõž¤ïãçì—ômù´üÕ~‰?e?Ë BÊJ-'¨J~f¤Ç2›š…c*Æ/'¢IÓ‡9ëoæô¬òÚøÓcu“,mÂ>*uA®G>*¥’æR¯©À„K1„ï·çŠELtâçÖ»ƒ›2·M’ݼýßaA4žÄÓ\m#îP΃Äyr‚) Rœ`­èÍEwfûC¤¢åôéÕÊo!„3Ýÿ%°o>Ú…Z§tT‘U¤C) ‚ÎV%8”ÖÓdâLþA6¸o$CÞ÷r.?jXþ¹Ä£]ÊúOͲʵªX‰zwE†m¥_9ï.p#¹Ô¼aÕå—tF$" ÝQ”œzÈ×zP¹qJO:ý3²¶SˆÑD/=W'Sw)Åe|y‘S \\¹j.ÚTF’‰(¦ßÝ{©é·eДA CX³/9kÇ\«ò6á5~}Æ^z÷¦s Ïuõ3ºy žÕ’‡avrˆŸš¿›¢‘„JH)š{pöÔÁ„ ™®¡ ÉsŠcKæÃ©ýe1ÔÅyˆBéJŒ#ñ®µ#‘L™Åè^ö¹VãÕÞ¥üþêÑ×É?Ö5Û_%2»e¾•ÔÇrâˆC/ÌRF]BÎR$Ìg­õDå>cýi%(4¯%Ž!hJ¦ùèÙ»@Š(De‘j'Sžê™¯E‘fqW©‰}²Ê‰„Òç•¿»‰ÈÕ‘q¯„ÿÚICѳ*wD%3µh9dB*¥"Ô Æa8ÂPÿsT+Ð"òò!/JÛÌJîò‘‘ˆºÎL—©¨f£y‚'3|Î;:³ÐÉbKue-ۨ)"Øä™mÇ¥/”=×å"gnß/L~Ä®EhŽJͱ}:™Kº1~´æ!ì‚ :¥+}ú¶2¼s„)¥¢QÁ3–â†Ud§SE&ó0U9—)ýK51Òáå·?³+†ý¹W]\Q™¥í/:*í-´É£9Ƚ÷þ¶Ifaž¾#¸‡áPãf®/ˆå%ŸÈ)2»,ÈR§ K}wü¹j¥%Üfަ$£cSIé2„£¢&»ù~úØVZäBföÒŒjJ’ç¶.`«¨ùˬÔá8¤Foµ°¼›ì9PåÎýÏF×k±BƒUÞ¼ü‹†*˜¤òj¶P·5ÝL›/W’E!Ž2l˜LîJP•*Gsã9ºÛ¨ŠT!Õ¨¹¹äVªØ…++ÓäÁ+oÏ:DbÝé^¯Iâg¦%L!–EçB’„çÍË0¥e* Љ§•8¶¦ñV©¿f©ãv·¦ÖŸf²ž¹NY›IùDV~½¸˜daDЏE Ë­Å¯¨Ã.…ÒŠ„Cr=ø]éN×?黯µ™ÚبV÷!ØaOB´gï[N Â«‰z+!|Ï)ò~ân_+â©BŸoïÒ¾íß,¤õ{²©˜y>µ²îÖÈ*¡ÇÕ…mÏÆ)sl„)´_©X:Ÿ;,¼Û'2)|ʸ̫·=Skå±l¤Á "’d ïD=q˜C#{šÌïcö%#Ï”B»èRµ7wÅ:»çVˆCÌ‚´–¡ }YÅJ ½Ñ[T´BYZµ¤ÝiU£Þ„u#SŸVñ¿²çÅB”¾l÷¸øÌÁë…;”…Ûr0§™èA‰0•µ·B)$[–úuYüüšZœÇª¼¾ý•åÚ(Ž(¤E#]ıs­ºJˆvb×h‚"ì™”Lÿ‰ÉLæS%X·­ODÆqh¬æÓq ®…v&7+ ŠA :--fêÛYý†CVö÷S9ý[¤ÓŒq%3P‚UE ”Ô0…RŽŒÚµ™ÂžÕ;•¡ëÑ:AŽêÚC%$†ìQ¢Ïa73ê%J†· oHµ3Ьc5…:ˆÔ!8j0ÃÈËW+÷÷æ«käÉ‘ [ò0¿BÌÔJÊrÖã¿1ná\as°‚ßkLDôc…e4óKJ-¥Šªjaüt9ë‹îBÚ¼Ì\„Æcî¾=sÄ2ˆ^£±×˜dÚÓøa ÍS T<'Z"»×xÎL?2¢W:¬äA„r¯ß¤©'r%ÂŒ‰Ë„R)d»E]¦P¡Ho®¹ Y'¬ŠªžEœß=•›3ÖË5w'!Ì´¶¢U„qÙÕ{Lés”ÆëÏ…ŠWnÊ UáoÔþ„É|ÃŒ²¥F-mªbžœá;:0c×N+ÐRbmµM—Dò'QjozÕXaõù rtÛAÙ0ý+ jÃýzˆ%aËÑ3UMA"Žp¤ #|¸t„)N·"u¥Ýi‘øê¼H·ýuò¿•Ì¿› â„–ŠB…{Šl^åÍt9Ç þ'9ð›sˆuû¾Nƒµf&å³Eª*ï3*¿‰„'}X«VýÏ_gÏz¶á—Î&džR>óŽbŸMIŠ/2VFÊ¢ÓýšâÝÙ¿W-Jc©ÒïFf¾[Ù©0ÁÄdoÌèE™Î~ÒHÊÔÄZµA`§ E!/_ÅÜ-5"—ˆ…@â(ŒèBa‘°ŠàhhÄ|†]8·þ3žB¢#\'p¬ÀV1ñ>û¥7 OTr¡¨b­ÕÙ°Íô ôd.1²±”ˆR(A”Âû»Pý€¡¨c1мã*àƒ„‰é˜0# 5ÀŒ=‰’6(ˆax~œ)û…îª4.C&BFÈA B{•l%f¡;ÖSœ6Kñ„³Pî€ZŒ$¬Ò™Ä¼hê79ª¢²Â”c†;bvÍÈ}r‚Xè"°”z—SœC1Œ˜TU£?‚Ÿ‹ˆdEx/HÈ„B¨ˆ@À3a ÐŒ hôX´ âdµèä/GÁÕ\ ã.|zNBã8ß‹Èv‰!YFYYwÛˆôWR¿:«£¸…¯,бG%Õ D#i Ó=uû3¾V‘äT>W-]_g‘¥ @‡ó1“HïÊžcJæˆÔ³.kPÙ˜ûCy­z_«B©Œ\é~»Œc¢g‘ÜfQ ca’ÍÿJó; Úŧª¤(–©ä£*5 yxz' îª$øZ³ñPŠÂ%eò®bQl¼Í´»ú‚–2b“ú›K²ÕE&Ù ’3È¢æ¨ID{"p•±1\ÍŒ&WF±.üÜ~¦6ÑHºÉù‰®z±ìØÊD•lȬۄ¨´M²¬W;í¸ýå⃈(®Ä\Ì©Œ0†º…ÓL¾IK´Â Ráözm:…ÌBåu^Š»ó !\î¤|Ò „)Ô¬ŒSTAžùÝÏb;"*ÀõLÿøÉˆÄ‘®N?ÿéþòýMûøˆö$³’}Î /ƒó äyà†m#¤vÛŒv÷5G!P„)ëªÊ}+yõ[r6 (Ç óй¬ûnîÉ,ª´ª­‰²åþ"Ìj‘a‡*v•fÙég«5 _%j²iÐGjäJ´¢9?dmH€Äc{¬“jÀ™))Q]‰T¢Òº»„¯fÞÁ;bjpŽ%‘NO1„:!ÞÕÕÁcH¦f7m“Ž—!Ž+ˆ•˜ØRb”BÌQ‚­éAÐØorU*䪣I®Ò62K%¸I!£|Qõ¨Rd G­Å[¥Ä{Ä÷v’T³”WÖ5 »ø…\2õ ¤ÞÝs‰T•TS•_jœ&kavÚ¹ÄC©Bxíur-Êu ¯£v2‹TlôŠ6`‘»AGBZé¿/©RÊ=kKR,”£>¨T÷(‹sñ5"³xpp:… ÅÝaF®kͪK¹|öz0xZlÿø…¨K¬„¨.¤‘GP‚W¾þOºQ‰;*“IÄOh99hq¬>•oD0„±d-˜«©ŒÖ^DÚ+e¬¶•d)<¶èòÕîâŠöM–•æJ:ñÖ aŠ<–´a‚a¤"š‹Ê¨bÖLã^²p2õ­Q΢冀(å00æé»ý1)¾Æ"}š‚k Z¦þ7«eûMåyÙb/² 1øÂÄcˆÃ±ËÒ)ýfBqkZ‹ñdÌQ aýß*&ºèÆP@g I'^¾G×áÔëf±‘j:p„¦ïu·÷KÒWˆÎê„ÅU+ÎÅ!N£¬oD7ZŽUñ¬œ%a;R;3Y*”UôlÃHµ1HAÌÔbʦOÇ‘ZFç' ”BÙj”Ã_à’ÆÈ†Rí}³F Í* ¥î2j°cu¸FrHç-6Hƒöé^Ôn'Ó7êù”‘œëµ•I³$™yhj©K’=ÉW:¿¥¥OÖý9Ýý…ëqq‰1e*¥Íò‰úò»Ý¤ÌžñFt‰)D9$S•y´ò­ŽHÁÀ†<õ¨ÆþÑŠûG‘y™Y;2”–-é\Lß9_TJå+;GwÚ–lMÓDiŠ”&$Ô^ŠêwË ®#8“ ¦¥YØ›Tì­„+W¸kþ&о)¨A컽.+?o‘Û±Ö„j512®g!Ìm—ŒdZ§*çµWYžšû^) J16wÔ¬ÚC~´¦`åÛs)‹ÅdF"j¥*zeø”.¶¶¤ÜaÒÌ9Ø\®Ql¢/8„+=ˆ#ç¥]8Dè·À¸5=djUÆ1Sྻ÷:jS®ʘ•çÍRµlz±¢´Cªû‘x†±%qQ3+»ÖEM«ˆ•k©.%šÊŒ¹žl<ךB þb»™åwN±4¦±JãWŒK‰‰„ZWâ¢òúj“ÍûLQ|çòZ«ES½?¡*ê3ìcËÆ$åï¯ö™E•iÈŸwÙ•*)q-•þ®q<­1¬ž-­ˆ·œçGrÑ?y–®•F±|©äލâTöÿ§29<ŠVë/¦~Ý*BNê§Áò‘ózUk¨„]YVÈßdX†ÑHBçýH«ö#¡¹´j”[¥ž¨›øë…¿÷ô¼U9¬~An%˜Š¼!Žš¬g^Ñi\™¥4©2-¤ÿÒ­qJ ßBew®ôC™“.u°úÄû bÏ2g…©6D‘q„±q V»±Þ"ÌÈ%ôº«¬èÉ•"’ƒrõÇ«–1=ýyZM½jUq^)Sœ²«±9^Âq:Ü»Br×*´[­Eßg-M+vÍ"YIA0š²=E+±=LùùÝ1õH1¼õM¾ö ’ªÊý&!6Å‘(Î`­+z ¶ÕÇ^d™fDG²ûM¤ZáE’d±0Ë2ùÎ'—8[«”ó§«{›Ym.þKÒêaŠÙKÕ52WA "¯ï‘é%îes4S8Eóµ„öŨ·_èZѽ’L% ädK¥â‹ªª+ü›Mý¶bP¡ˆFV~PòÁ&–ãºA@¢ zÓ)ôr‘ÊãÏ^¥RÏAJv©ÕÍD“5Ÿÿy\ŽG>K‘•RŒ©%×ÑKG.l·.£xAN8ॶÛêx±­,z()Vƒ‘k‘Tˆ‘ÏÍÄRÒÿ·ªóˆz‚;Ñц,ˆ-QäMFõô¾k“ÒÛ¬ø=HŠîÒ½MÞ?Š:J ¾üîäTÂl·‰l¼p¢…;ãhöïÆ³!=Hf·áä-†Qˆ‡B£)h]Ä!0ŽÈØôÇÏj•4’hœl½ žôå3¬!EVψwÚ×a-Z^Qƒ¢Œ^[fèˆD§/*q?M}´&ì˜ÐðKJ3G˜BˆJ j=ZÕ7/{ó½jI„nAœx͌ӎé1Ì3L5S°JR,X LÝQÉ^-þ©*Q¼WŸ‹9@”ÖìÌÅ%HÄ#þÿQJJ—–Þ©×^v%Ì(:I÷XA·ØCE!jõRY[”ƒ’È”½¦à(0$|C¦×K;‰`VyN4º8‰NîÏ#j•‰ú£Ä´q?FI=î›è¾öNÕr¶gô¯Š{³ˆÅ É‹ugR/RH—.ðw/Hfšo<¥ÑX§J9 •W‘+E˜þ“51iŽnƸL“µùò ï†%y7oƒ’D2¥6˜õ!L(1'²Št5V‘â`,@/À €ñaH/Å(¤•z¨ˆ…f„ñ]ø‹¤ù yØœyfý „ÏAk.(^k0Ò#”‚(d:ÌèuB)‘‰]'?hËa¼JÔ°ÒÜá<¥ê6 üÕNH®aÄwO“D´AÜsejÚØ' qéfýbwõü½ÿ+ÿÚü¿ü?øö½¡&4öÄ+hB, ?3&!f+ f÷»“ÝZ¯U‘n¹«úè#¹|ôù.˜*ÆÖߺ\©"ª)Ý f¹3™HÁ’„6“oGt”jÞ]Ú†"þO¾Êµ ¬#¦)U×tjÈÎÒ)ˆ½lÙ>ˆ\_ÒÒ—ÃÚ‹¤»òsu­Ø·ç:){ó‚™|}M)‘N„c‘“l¶¶™¢Ž’2Ò½ÚkŠÕRsK½UÚ3>«+ˆ›Åé?}R9íëŒ_öS(‰cê¾®bœ´OÝ|ÉK§|¾WJŒêVì“ ßA3l”èc%Y•ÕŒÅ;=‹ãPRŒPÆCÿR½3óê/9ªÒPÕ–tZi$òL|µZˆË+׬¾)PGunyy«+:Š‹†ëè»&VD c-ÉæÚ»,ôíJ †;WùEæ}òþív–"Èäônݼ¥ÅŒ‰rúiÆhªÖº¹A 7-36¯K#½[ò_¥ýÐ!† w#"íB:ºÈÄÒ;§ëv»Ú/K ´6 Ml%–„.`_ÿ÷ ¨™‡ÝI ª*j¥ÔˆÊoÚ½J(ÏQZ®ÆlošØô㧊ȺÍ÷]å¶S·wœ†os's„Ásö©Ã.È™b\ŒäOeÃ2zn—ˆa\â³ÙI´_DCˆØÅ›âÞ—™¤IÛªý.ãúR‡!Æ®½gb°¦Ñʆ(Ìœ¼|Sâv!òöÉjÛ®l¥Íýoß³Û›Ifc™$|'ê") ©s°g—“(ô|%HG+™Õ‡î*BP¾kl‰†%[•¾$²aªüV!R‚.1újôpŒb“Ï«!H E;,ȇ wòó<Û„ÔÕ³Åóíë]ä¡ÉÊ"ÄM0„b ­êV…z3îŸÏ)Dÿ®ñ«Nˆz;ѳì*=Ëf¯Y(9HáKFyÝVœfUTó¥„â}¹*û#~žM-¢9d&ÎéÂÝ<ëZ“n’ì‚ÌZcH²fÓùhèœAR’y•k¨ã¶Ñÿë!©D'Ë6Ö©lQ¶ídì×ým!ôôÿ³,‚YóԊæmAB #©Hy Ý×lÜ›'Æ^ÊÎúâI¦&#q]mNEçñÖÎ÷:ÄL¢úš¿êC,ävfÄ£½›I/5H¡d7Œ’ŸýHã׉ò—•5e«·›ñŽÿ[Q˜š­#ØC”ë9™*ȱ )Ãoƒʦ;17ë-<ë5Ówž,ÒÔd'ß–Äš›äô¢N÷GøªW‘|⇊k]J+³²e®ýM,Õ^Ùù÷W—¿\ÒÍ-”+¿DbZLm6qÕLN!×-AW’ÌŽˆz§Ü„™ŒAxŒüG#rÈ̬– l!j²^øyO”™‰2Êm=·X‰QQ˜”UÅ2\Å ‚!ÅÒþ©uw˜!ü¹ÿi¦™‚9sé“Ò•RÒò‡µ ´¼¥Å÷ âÉÒŠfæ#O?ÖèI2—A5¼Tsù ÏjØ#½/Â…*?ðåæçR7óæFÑÖ™„{¾Nm¸˜ò\1Nõ©PR{NôÛJeËY)‡'ÖåÖ¶KЬôã]JÚùC«£Aœl´±Ãbrsé¥Å¹¹®DÑ7~¸Ò«.ã·â7 áR:0åÔF"ùYIâ+î>PÊ®­´Ü.âfî‰ÏO."“8§bän­|¸Ã F¹}ÚDöãé‰A¨S‘/ÑTêÏ»M=$Z¥¨1]Ë_ÔahJaÎ\“ éTbˆûÝñ7%W]¦ÐÍU*’Èb¢Õ˜…âpŒˆñX‰Jªì•£”ø^®o•ÍÒb/5e˜®ŽC9ÇB"7ªÌ⇻&PËrbû “u5 Zѩ؅§Z¢;Jܘ¿7 bB"¾*®3 Ä‘(fåLNkXŠNBÚÉz/µTF9”¢~Åí-NFG>a|¥“rµGÂþ©Úí¼•²!q]Šþd~¨ÊQÍ3›­øŒvåTËb~eö¿¾E2e~NkޤN9µí;”¿ÎFW²jõC²VÃ:^K`ë”YR±>¹Äÿ"zºIÜme¤ÄößÊë^ç{PQÎn“ À„:ˆ†|Ëar™r "lcZú\Ñ¡*beìy]j¸R%í÷lr¿IR˜ˆ«#>v©! ±ÄúÑÛZÙA+‰I7DØJïB‚IZnÂRÝ@ÊCGI” ªžAFQ 2ˆ¡Ò.QÓÇËY$±©öáx×mßíá4Ѽú„SÛÚ†ZîL8¤ä¢»üŸæ b­ %ûôn0’&!ý0ÎDMÉÍmݧ“«!¯×®ã)*šd³¦rXÖd†ƒ5 Sˆêú¸w)¶­–es~†§Þ¿¾‚>4—ü+òÌ0¢2¯ʉêª!µ«TuÛÊAz·öžr×”Œ‹Dâ>M±7µrîÌdZ3+6KŸDh£EÛþ-(wÌ šÄÞõ•Ìb ‹M&æò¶œìäc|ÉB?þ·JßÎU£â¾zâò˜„&áq‡"Y;̽‰yYL¾ÆÅ“½ªcrj“ ôå¢Ú}}Å×(ƒ-h}¯’™Ì;]Ήªú洙̷I5uÒLYu’ôZØL7§ˆÅeº÷Ô,`®1Ÿ5Ñ+‚”u•3›0ÏÍËr;¦œWTx¾Õ2£T¤G¥&éYVäÃðÓR˜ô‘Ú„mVÑ-µSÄ;¢Š"ãmjD5E.”šß•Ê>ô¼»º_ÆÑÿëE¸Í1Æ‹‹õc!ŸÎ QRù=8ÌÌÎME¶—–…å%›,LºÓÉ_7¿gAÔ¹' ¤ò%ˆfüíO:ó¡Ò¥Å£¹ë•–Š¥f;;·„ÎÍùOg(dî&<„R.¨å¤”RÅF(™+íÕ¶™G§W&eIUy —©Ì¥^*Vƒñ‚¤Š·W°¹kWÏÇ™®aËb'7ž¶Z™S½Šeb“b R£4ÛÖËÉbÈCŒ]& Ù…Ë ’“1޲¨ÉλÏ2íÙ-ËkvämKRÇö¦·"ˆ7å}T(©RE-{+…wJ£Yìžû…µú‰iÏt­–mVÔ²ÙR”þM.yÝU/ؤ¡É«”Z«ÙœF9—hìYÑt”Bv(‹ä!ÿ†®"ܽí^FŽÿøÉ˜Ä’NýÝÿ¿žÿ×Oî¯øwüµþ£´ ÌÏà‡n 8äD ê¿'™¹*:C1¸…«R&ƒ\Á?ŠÉvE™ŠÒJGÎBMNr‚ü§CÁ0AÓ©ÜðΔٛ¨`l ù%c ؽ‡B•ÝŽè}¦2r^ƒ˜®¨äâÆl ˜ùHìdÌqºÀäŽa;T fݳ·0QAƒ†”4Cb QØ®ªæ8O ú"×^!hMƒ1 JÈÅ4b¹ ùÊ1ÂѲ ìyÆpN¤D×8bÌîtѾ²•ÖQ0L!¡˜¨Ôã´ÈACÍåðX{ßB‘‘_AU Œ¸Ô˜D-`[¸Ü1„ˆº˜¦T¸ôâ#ˆÎbÑgŒ1"Á¬p…2 ca ÄâxHEN¨[LqÑŽ¬[Ÿ–ª!¬œßˆíÑX²µ=âü2™`+Ø”ŒädQ ‘Ãuâ81 0‘‚KQÙA HrX®àbÁް±ó£`Å2)#iBj ´ÎäHaÚ¯™Ä§¨¬Ù‚(#T*šŒ@Ô‹ExAX©ˆq RT.øéŠ‰Ù¡2îDcViAÀÅÇ3=$$¸@Z¸tIc>%1ãÔ8ЈLh'BÖ² øÃ¡'#³R¶†ÁœÔÁòÅÊBv"„„ uÀöc© ,1Ì¡r%üCŒä3¸Ñ!8#D¢Ï9“U:зf#0fÝ óˆS9)'˜5B ä!Èá õËU,64qxÈÎhõrÄ„%ß³9I…ľ7HµêI³ó1™hûm¿'¨®*Ît RÙgÒ–FÊ*,#m ˜M­²úÍR´‡²ó“è‹ÅÚqU)\ŲúP”YÕ—35›Ù_Yˆnôõ,Œ3.´¬´+‡r'³ë’é+y½÷vd¤‚7¾æ¥j}ÖoAT¬VáÎǪm¨Râݧm#æV–¦#v1>íšB=Iŵj†L”êÃRɤ A ÌKŒ¦gïJu„R©|âÜ!DíÄ)÷ŒÌ&õ˧%ˆú\éiÛCJÒ„´éj)tªYLÄVª˜kQþU;“݃òsŠÄ32.“·?Fs£¬¾›ÉmÓݽtn’«,Ë_6¨NFÒˆî(¬¬KóS¨•“åL_Û+‰'NuöÖ})1ÆdÓ¸¬ÄQŠjC;YR¬b‘¤C*T¹F¯ñ+¥|&P„ÆËº’˜3S· ô|ŒåäCÉRoì_*gøS9¸ô“’…'!70ŒÈ•:%\Íëî$ûZíbxJø˜­båñzè~H¤"P¡VubV´o]V9ÈdÆwúÓK´âq9Ìì~+ [åÌ•³KïÐï¨R©ÈÓ­]l[q%~ò‘ÝRŽÕ#ÜþÒ5¾’ä½*ÿN3 |µ^j}N‰dt•Ò• ›}fÖwb« ¯’ …ú!#]EM4Ìw"–Ézîâ[ü(emt,ü*`ÙŠa&¢Î·«HÈÕ+jªáÓ^ëŒC)Ì2±UzÒåT³ZS7Þ¯ªÃGú…F—aUº–Ž¿0‡R\¬Æß™ÑÉP¦£DBJI÷Q•PÂ&ôFVÔ˜û§qm!ÛÅE}œê&Ó8y¤å¨ûd³ªVšÍe)ÿ&c݃DHŽTL# >akiîˆ"Xÿ¹qvô³XÚä(¬b'¿„5EPêói¨ËÓ!’˜Z˜zV¹Cõ¸ìgαo~Ò‘Æ*“d# ë3•ÄwdÃ./æc‚ˆ¸(ŽýÜ&¦Å%©$Âéܧ&ÓÍ\K–Ùú63…3et-G÷íˇvl%hìÞš2*cý°¥}rH¢Œˆô˜¹©Nk(†;D´„ñ–ØMÛ&”N`ÎÏÆé‘VÞŒ‰%$QØ[6±2y|¢1;qðDL‰^7f ®¥#=¸ž­C9Ü‹)Ÿh¦1qÒ¬…¡"­‰™ÙK½%µPèD}•$9˜øWäÙ5(ˆ§ÔŒ;G§IOÊá‚ÊA>îçðƒ\EzÀ†C‰BT t,ÀæÒ3 Ål"Àîy¬ †73¾º±‰P „‡c›˜PŒA"нH–…)æ† ’‚Äôl#Ç"Ôåb‚GC0N…‡¬Kå €f9É Æ<àT¦ Ñ:1‚½¨0ÙȲƒU*pÈÎŽbÓ(¥rZ½›‡,=EA^¬¤á R·0DZHÜ/®2±‰ý_ŒbŸ!P!¢Ösb"˜ª›Ú;E@HÄQH¥“ÍÐÕs¼áÐáÞ”Õ#:,¶´•PÇ MœNe3 `Ä¡2÷å5‚.Ã$ံwO—±†UXÌÅ+èã|seÅ>QÊÛ?}(¯–À®éi>#l+‚“"Ä$Óç3o²Ê«¤ÜLóÛÆcô9 Kf8¥=$S‘ ¸Õ4­ÖKä­± J]rÏbKPþ”Wpû+Š´¯åÇ1&È„}¾fŠD­XEöÕO‘Ýä#؉Å[&Tý·Š¨9ñ1Oɽ»ŒEÎ Õ- ÷{˜ç¯jÊD'Ö„1Tëe9I¯T9DÉØÃ«Pøµu»LÛJœ£¾lªcËïÓ«—ï1jéG¥Œ‡‘⯥yÊ\¡Nv$ÕéXÊ->Ì3ÑoÒl‚W%ê ªDÿV´´Ã™HÍw øJ/z§9΢±UÚ«¸|¢(ªª½ëAŽky‡t,Ýò ®çä¹6l\V2«SÝ®_ÝâðÔ>dB™ÙùèBùQ‘}"2§KZ8·¾iF!û–Kò¦KMÓ]ïa tm'Ý%Ú8Pã©~‡J5¾SºMª‡µdÉqha «w²~˜½_(ƒ2")•DìgcZèbº¯9ӫݲ¢]A¢‰A;kI„ó.1)¯š@P^®Ê˜òÖ˜+„Êt®¸%©Z/‘Ðvªf÷[»Îc«¹]Yo^ºÕ?2B+‘5ª”ÒïY9N‰ŸÔBÚéŠídÎ#Šî*ü!¤GÛ­×j®:'ºØ•’,œÌ¢·µt_AøY5Jè¤:PB'´´ÚŒvqlàçrߦ <õž¤C"4Æa†ö&LS‹x§ *‰kÚ‚fÖÇ"(½–në|—²7‹mšÇsyÐSç=T´!Ã"¬…¤­î]?ÙÇÚ÷öwœŽ¸<þ |hßg&{RœõÑ}ó`( Ðrp*óNßB#îÓƒTýšS…¹‚N‰Ì¿²Ri¤ã¥ª0¾FˆC/¤ C£WB¶záFÞ Ùäüu©m‚þ¸èï-Ï@Ûqj¶WG‚0çql²J°a¥ èìÌŒ³t·>"¥.Z“"Ü&^…HŠæyЛñ µTi“ý‘ô ±o9J“2ÖàÒÏ’.JšÍT6?®( DÅ=j^ψ ª¥{lþ“RÁ °= 0ÑqÅ<µQÜÒ"‚ ; 'ÌB p‹],ÄÙD ÙK 9½obÉbâ“M…{²ÇIØ3ξ•÷g4¯§$¨ˆ©TRá(yh—Ä¢¥0ˆ‰Åùy§|Šœv‹:ZY$m(SËuón ¥Á\þ@…´ÚÙ®eY–f–“+HÂÖ¤êðem @…³Æ.*a+„€ð6@cB`gùj;e$âÆvœ9ÏÇŸc¥{µ‹ê7 p»ZŠ¢±åJR.èÓ#¥òÖ®9’qÜ8qœ)*•¶$ƒ<¤÷ÒI%-^‡·€…Zésí´z‹R«-šf;'±|²˜H‹Ȉ1½~F .è¬ë㛵 Žk rï8Rr‰’*âÐ=:'<ÎNK=æʦ[ÍTa¤àx-@ Å‹]öUt¼Ì¸“Œ* "ÅöÔÚH,Œ„Ö=$Â[¦LÃȆá%Çã\Ž!¨9!Œ"8]Cµ í!c,¨3\_%‚UäÙ$ ëËi›˜®Z~P¢:W"^2­R”¸¢çpÞ¥5‰FoÐòZ(uŽ­LeKÔ§Z(@tpmY_lê³Ê9†r¨µ MiVY² IÀ+ƒ^Â%Çx˜Ñæ¤Aé“L”ÌiÖ¢v•ϣȡ©\ ˜%…ÃZ¼j«í+Ùƒˆ)%<¢Sœ2Fª»Þ¯PŠfÆ<÷ž_áRÌåYm=oy–½#”T ’…­ WöÔÊSØÓ÷?']*nµ&|¿–C_r>Ä •xEÿž‚y"-I¬)ÆD<¯ÇÝ¡>CÒp!$Ù‰ÆVI'-I D(@¡+•Ó9‹ª!+‚P&bú©Ogh›Öì0Ê6õ¯wû>UEBƒ ­INB†tªADÉ.Š_ƽ²n1ð¥¬NkZ¦[Hu¢Õ·Œk ÃܢЉcË:PîõÄ–QB®^¹Þmdˆè ¶U†ËbÄØf ‹aíÞÔÙ•Ôâm¤€H € ›A½Ê‚Ü×zÜ0Vˆ@q`,pBM 9–j‘¾êÓy(6‰Ö0›”è²iGúáD²Åi9MjÖb³„,RüfÎp¨ç{Ô§›ªîouòBÄÆR‡œŠ½†Gnª„aÛÌz óO²жkTš$Ah!¿í»Ú]£§XP:Ž/ÞÅ0N #D;JK(±ËÕ7,Ð6œ”×'“5äs R`aT4ñ˜VÁ\_'4EÏ!¦½¾’›½éÑ*ÿ•ÔÓ·´ †)IWþYÇȧ5¢IFjœàS”òñ¨-ãÉo„Dé€ÕžòyÙrfß GI•¤s¸¼aÂæF¬¨½nÆÅAÎÍ@¶h“‰Å—AžçVbi­‹1‹Ž8Ÿ3ƒ8Â肆Í$,,H€!Á°"»âzND „` Æ…Ó†-î;‹‰n ýÞd›æ¸\Q¥m2 J"I[s¦•Ã!ÆõHÎSƒ–+äé¥8¢4…ª{˪„<\7š‰1oŸ[ИÞcªL9 ”sHžI‰F°Ö9,Axõ±„”ˆA)ùz¹¹É¸ãÉ`‰”Ô¢Ži\¹¸ð]H¢0ä„݃àñ`Ú8òð@Isä{8DÏe”˜prMA™›{žA¥D“÷vÕ«ÖŸ–§þÂQ∔iŠO!PAšÄÚ4TœvŒ@e- ´­OÔÚ”†°J*Þ#˳j_…2˜ «z_^‹Å®’†`TíÄ ÿãv8¥¡½U~L ^)4‹ô=Ïõˆ±‘ãø%¸@ŠcP†öøž&¶(Ë­ù·¸Ü­âG_ªb„:Ï©f*kVÑIä7m_W“ <–Šly;R’#Q–äSÃå-š£Úü8£¬c„R›½ü-G+gwEn¤˜-¢Ú„ƒk<Œyžã¥I)Ì*L\Omåœû×곘Õ/Ôæ]SviÊ"ˆþ¥®/ý#ij¦#8Ã2±aÔKS)$³†V“¦.ýYßZdB˜*  $À†óB(‘|e>‘PRF´²qlE¦ÞQ¶'‰ßò-&"ëìA†­0œÎ+EX†\V‘¾g·š†Ñ»Õž-)[ÖɱþÉ!uWIê‘ZÉ…Rm˜3\¸N;"]ÍI¥c• )è,„w¢¥ R³¦×DÃmô‚¨0œâ©)âýثϰŸRЫ:žTFðâ•ù]W]ˆyˆKˆLï¢¿Ôøl6^Yè¹ô GÂaTÔUr$B>º”g)ÆS ÀQPN&Iƒ‚txáo8ŒóÉ¡ùíä:%G[ ±6Œ•&*™ÂdÔÓØ§]H>—R‚òöB“jd"éEÄ™É"I ŽqT¯žrfH…Ì5­Kyéô1MRa+X«Ds½QÆxaƒ´ÓÔíGªÔ‚ÅAn½ôRp•ŒZKè2ªïð»- ÞS¬¬`0‚¯eUïvT¨å7vzyÔªIh¸cMx•ÙŠ¼É’ÎYUå-Ñâ<†ðÕWÇ%l),˜ßqjØ´CyvËØš”Yk$Äc}ËT³±\ì9¤,¢Î5‚Yâ@·¨ Úh£à$ˆYZtVº³N€æªQJqËO‘¬¨ü/÷\Ãî§]3ÂV{KLJ 0Ò2Ô•*¥ØTˆA„Q%AÄc1îU(´*jxÄR5®= >F¿4îÀÜ(hÉf–湆BµJ¾ÖaQÙWËv–N³„MŒyªÒÂqh·9S’ÅbQ’OývË;Ä9%]Ü\ì”ò})·é×6™ò⤹çU ªÆ`Ä^8Áˆm{2'TEîF!(4§üm°ümbt“í÷^E:kY;r3;¸ÙÊCÆHŠ`(p ]{®Ù$Y°â„JÒ?àQ—kT Ç[ Õ6ùfW9H•­O!õ TÌǫь¬”jFÞÒ®»a™:yɯÊR¼í÷$î2(v±¤7—NÎÖ¥äú’çÒvå½8ªVT°e¸R =-”"4e$R¬‹LmÝé¬d~É+ßÖ6ÑËÂ8fZ¥Y1ˆØWºôÌ §8¥OÛYôÂNYˆ„E={°HI»R«µ*i”‹wcb‰ÙJ¨IÎ!ÅÝú IÆÇ6qìšJh¢JLsKÍBz·ˆ>zG¾[ÿøÉˆÄ“ Ný¶üæüüÜþ7¯';³’uÖŸžsXÆûP †vå¦õ Ð\”*F¾LcWFK³¥:¤Ê¢$6¤¬e6´³¦YY ê©l,ÅÝ·½m–·ó}. Ä)0ʱŒÅBJ—q!GsÈZt9åɵÅÖAÿE¯œ× ‡—u™ D‘¯RÌí«ô‚7”Æ#5 û4î#ɪ%vB©KQ:æT—Ó™²Ñ)™9Š;ÎgBQ,ÅíÙ/§Ü§Hikz‘¥+J•âƒ'ˆ<³ º›dÎY 2~ÌEUÚžö ÓV¥P¿[µ/± "(Æb*ª‰+²â¦ŽvÌ‚^ù,¬Ê©Bl¥µ)+*„¤‰Dû8«…ìq…]_ç}±ìDzeÝë–¯mRµšCK‚YSxVâ°uf¢ŒR˜Â«Ss‹¹žÀ”çÓsK„õ}-Òu!?ìCˆ0qå‹XfpöqXJÊs+2d·£“—c|ö¾ºç±=i2¤D‡Q³¯jÕ*ʨ¾`ƒ•qj¦Úd’í‰\¯WKÂtëþo…þËcYJÆJ1,I§lꞆ{¬…“%ÐbSi'Ò•q5¨„]v|9=,c=€@æà–Ø‚F—Ä¢«^žÚå™hÆuˆ;…1Ÿ¹dÄùO¹©o,¦fskw"Ý=Òo´ß7ûšÛ-Ëb2‘Œ‚•]2ÇK«Ê‚Œ·&C;û/>ùnÜÇë&R³Vóµéj BÖ›šÊFz& †T1 òo7¢Ld÷býRC”؃Èß²d©DûYngÕY[¤#ŒéS%—«ZM,¸oðŸJQÛK33«8„F)èU­é¥ī5rƒJqŸ5Í.›ôñ2·îܤ§AU³]$UB¢„8(î^Sõ«¥‘—>]F½MÁ ¼¾B“ж./o¶ÝªìDz•„~OmÉfJì6âÕ¶¥¿…ÒoWºÈ¥yRALfb.˜—VÅ!1ä"ÜNš½L+çS$Úy’UnG!ñ+vdi”¤â&âF|¥|¾).3XzRµÆr›š*è Î1lœajcP]ÖD«ÈàÅ!,±‘Ññh„m¶&²é)i/U#‹L¹¾þ)lÉf(ªüœëR% Ëz-”Ê—y‰‡N¤{q)OÄj#d—jk]p¯¥Aˆ¦¢3Ö¸‡‰æ¯[ÍÃ? ‘J÷#Y…7XéºVkYPea Ìž„ªk—”Å­èJË'Û­~ÚÑ:î1R|PŠè2*Ô—.epã‘ï¦t—h%ž&u4Œ¥ÉíÔˆD Æ´žœîÄå™ÔFªR•“%Òté¦2¢b"· \KT¹SÊJ”Œ»"tbÑfÛJÈUB+NªBÒÛZiiÒëñ©ö+–¨!–êC*¨wP¤t.°DìÄ«ÏEÊPI[ÌõnjTZòZ_QÑ|̇DòÚgÜÂ6RGˆ·8£™’Â#'¦³ïÕ±)sUi’|›#6=K˜ÙD/•)’h*«’ãójä¤nËÇW’R[v—íe-Û£"JTDÍ*Ýç)eá1³^úêºH¹yEGÝôÝqÒŧM«¬9ufG)*ä3×”"›j"2¤¥çÅd-efC£­œÄNÖzŽ!ƒ˜a R$e.;ô~[L,{æ½35?*!}(*Ñ8c;F‚ Æ»ç´ÉUÖ+•Xë´×¾ú=j†I¤FBd •&»H;T!…rÉ‹Ké­Á+û#Ê^”²&™ƒ FwWmÄtz§®n”¶ZÿÒ£T•2˜´wòZDËÏ‘|·÷å»Ùj¨¥r­¤B’H¤8Òh€ì='¸‰Lš¬×i»4ËvÚ!­ d¢_<ä±C𝙻S¡ ç1îžìS]½¥ôìÔ¡Ëï*7¿·Z¿Rw1’­c¨“¦¾.W¤æßÖ«î<…]©ä+i\zÅJ.T¡N0#˜FÊ‚"}{Ÿ³·u¬ôêð¤U,ÍßDÆÎa®5¹èfsn¥š¦ð‹QØ¢¹= ÌÆ©£^I~üͯÜQ’Ta}uW”žç­èzI³Õ®vµ$4×òaö‡H„©S9ôGŠCq95HfÔiG¥PQVBÝOQ¯™.T·uˆœ·އS#“w8µEuDG+Œ§VVb&S°ªFÖ{ëR$“hˆõ¥ÄZ•®¤WyŠpèY%¹KZÖ æ+èâ¹ÒcëÓµ)½È¼5¿êã‹vâ-1G(#ª¡TÕba+oõO5ç4«Rä¹ìG*ðF_Ÿ«êÛBL5y•*©Y1wð¿Ïlšzß»? Q^RJÈ’⼎ñÌ€¦«ºs%—ê'z*u ½µ‘ìâËj}"WŽo™N™ì√M3®R‚H18—¢'®Ï¡x¾_!ˆB­SÓÜš|Ô«Nq—Iˆn1ê>¥0ÝmW?åwöÕ])1;)ÄC:jðE˜£[WLMkT¯!/…j›IÊõ§e«L6"#—ÕµmtGªr™H: sœ¬C–äÝÓWÍ3’BêÓ—u&:©-dªUVÈõÓ¯œ•7o"eq•˜Ä(®Å,¢±‹Ê^‹i¾–E¦ËeV‘Å4‡°È§%BpB*ÚED.ñÆÙµ–Lë‘{d,ªîbô¦â ˆB¾õh#©ÞåF2îD9ÿ½ºmkob½ä«Tîï- ÅRj/1ÉEკq.—Ú¡Erkm‰R& ÕݸŒŒÔmÖ¥²QÝZuŠ;’œAÜÙæs$J›D|ãXç_–kRE1ø”NONÿDŒžvj¨ŒD°šmR 3ëêJŒªÈ!WϺJž§Ù*%y˜¯£}N¤uzÊTOõÖ·›òÁ–“Iþº$—ä)‘”Z+ÑQÅ9ª^8ÅfrXÅSɦki=˜›û‹®‚êýiÂY9Q´´ˆQH©L©ŠQÖG†oËÈ1`WJ*æ.î˜cqïŸ|¬bß×&SC x)ÌÁ‘8æÄ7+0Ã48TÍÃ,0U€-J1¶‹:¾¤^„Æz`¶oØ|Ñ"á= Q;XÀ’Uv± ©ŠÌqØXA"‰*XuðÀAv¢rÇ‚10!J¦S1LÆÏÑ8àœBGB˜±¥0/qU\‰2­ Ú/6]´c0ÊÇÁ„D˜ ˆ!\W°€ÑˆÂË\LrLD0lQçÁšeîÌ&9]G2èrËŠ@®§Aœ!8áA$d0Ô€ß9A8Áƒaá QÁÿô& D{ zb“VȆÌ-1Y(6ìÔWyö2²B|W2¢Ô#Ò¡Rè2 ‡DÀÝ){„žøÈÄú$ìÉL¢±” £n†u„1E\¦-ƒ(w®úàæTò¹qcל EG=#á,/näu19º’¸Ì7@CAüÜm´=@É]ä„lîýœ…ÀJŒ#ý†%R#úž %0ŒÜ"v”R s­3”Ãâ©R• ÂŒÈáŒlÀƒw \Ü©?khoC>òa_Òî*þÂyð0V £éa‘£ ¯JdÁÒOÕ¤„ˆ¦f Ì"C'­2˜ˆ8FÅÃzB¨¥›SÀ±Bpê)h§Rn5EØ"ˆ$¬=â” Éx(Éã ‚6½ØÜãmâËZJˆŽA,9)UN„b°­³!;;‘HjBŒvÏ)Hü0Œ%¤X;ÑŠÔâ‘16ÜròÖeèuÁÄÍÆ*ƒ(WE‡ '̺JfD‚ ´„/=8FìcÁTF±DC·Ì386±„ ä+×íJW2¬ÊS™uÙ0¡ &ÃC†¤2„A(É´¢˜)¬C¥XðèÍX”â)”£„  Ì( ©K(@Z~x)GS”jSáxü¶£²ú‚#Bgaƪáƒ^aÑ("i•Ì¿*#jp‰C6'Aˆ0õæ³/c°¡Ex!Å…TJçù¸5P¢—bÅ!j“f0Á¢¾$Æe„@€›qX~Ù£)Š ‚¾ý×*\'‡gcq\$ 1…c£¡±Ó<À¦aȦ§:šQdÂ2b:]ŒFA!‘N!Ãl)š AœBè)JR‘yWrÐêZ!2™Ž ƒ `ˆŒD´Îe)Ð(\’Äe8qÖ) îœÌäãã IxÁ tƒŸ?bGê|N+|tÆ!á sÐÎÄ¡ᣆ2˜$X#ò¡Øµ¯€½n®ÅB½H@ Ž D6jæ°nHXâTr ¤PÛH:jïB­!1œ¢‘„sDR œÈ3"\&1¥Ÿ)ö*Eª¦IÝð¢/¦/Æ0¥h TUädý”ò]¸ôÚŠc¾ÍéqÖßJ؇lcqB Í‹¥ïqÄu¾ÐC$~­2c ^¡Ú­5é­e­;5û[¢\ýë´E2`¬Ž®V!QžÅ#—„(gFôn}µ9Îuó^•TVjh©ü¦TÑD#J~­ÅER~+±él)VÖý—{ü„u3æê&r”…V;4äJ±2žâ–¨ä.×StµF:—þ×5ÈB£Qó.Ä3×hÁS5#ÝèÒR”­×O˜•NÒá*¢Y*1ÉõMË(¦–èî‰j•Åk"®1*ØS]OŠ\./å+)?hEv3Sèó2‹A1XØvô5á«›ª"‰Ü®RDþ Â¦‰HìßøB MòÙ ¼„•ê8…6/§QJ\2ÓqˆÅEòŠ­’l‹f\ÿøÉˆÄ”µNCôAÿRþTýpüÃüa³’½¾¡¿psHìùx{d=RS{ †$ˆõŒŒÒ)U°Z®+keû'âeI¾˜Ú×"ÌR»£È_±îæbfe1Ù•0!= + šVòsujËD¦×Ì!T„üQT*{“’Šsa,þ!î¬*UHú„•8Cü˜j)¼Âr÷mþ·&Õ¬LŠÑÅT-P"6¢Ó±ö•ôÕ5¦^Z£(Ê”5 Z6DtEä1žªÌº×©k¥zÉL&¡x_þͦⶢܓ,„Nd2‘–!Éf2˜ö[Õd¢ñߪ•Ö¢ØõaÙJ…åÊjmÅg)î¤G墿§‘~ÍS3¢ž«BYZ§®—QQ?…,bÊÊ””±¢’¢š„+Ê›nÄA¸M;ûûyxÂÄ%IEî¯]©R£Š¦j¢ŠK:e=x‹:A.fj¯^Äê¼Þ׫ê3k¤¬\ê.¥ª,ˆ#+̤gi I<ËߤÃ뼄bQR’'bµ’˞ɾIRDl0Öeš.IÍè±^©‰d1Ó5Q™tþ7=MÅ%•H6±BN²Èƒ–â!KµOWÅÄZc<ÃQˆ1¬§UdGªÍRã’Æ©÷BØ•+ÑpªVLÉ}E«¾KBï5xïJ‹Ä%GX¨¤Ur$‚û83;ßL–uª¨•äÏ%Ê‹K¤Š_/;ÿíkŸ¡IG$©ˆÆ!šªTùøžp’±d-NÙ딡f•Jûý3Œ²””Ksû CóØÊ”O(ŒÊM%xz‰¥÷Dg•¬Ë·hŒÏ‡Pìd4Ž}²•ʾ½ÍÙ…SW—0Dw>o3a Kxö³ØŠf–l2Ï)8aH!ÉØœH|æÔŠ€ æ,v€†úV)k„t)r©9”2véÆA„•UEQ !‘Ô' G$ t-;aÑVpDã;d€ˆ@B£d!<‚Ì)¡‹ÈÌV…kXq‚¹bŸQLãS: EnjFL0´ÓŒðH £ £„™úrwæô7¬ª!ÇÔoù  b(MŠ@ãƈµIŠ š¢˜r ÐE^V(oÍ”l†ºÀaÌY¥ÅŒíØNq!È(HìXꮊ$Qä(aE3j@b À(0ä@ C´wäiÄ„ÌÚ“A®ªaHU$ë¡Ä‚qFÜ Ž «’ÇF¡–˜-EôŽj')ŠÄ¡‘†%¦½:4LBŒ.d æÕáÓ$1ÙŽIÉDìM/_”º>t7Ï@ƒ|"3U†;¾[øˆìM« ˆ3R•®ÅwþPµPpÂKÊWn 3ñÜ­K:5”lm;R bÛtK²NêœûCsIÅŠ‡œMJjô¬Œ¤ò(«šn¦èɸw‡ùm†FRZzÒþ(0Aéy3äfˆ%B~¼†8EID>†ãŠAß).*¤„úöõkÕêuÙ›S½ˆ‡»É”*XºŽiÝ,q aÁƒ°O”0ìZ‘wÖCDËõ·gA]d5FÁH ‚ƒ] WJÃl“Ë\„ Bïl†¹ÎR“7eÇbgĺpFN_]L“–¥²ÐÒzÕMŸº¾L[˜„_Éw,Ì)j%¯×qEB1‡@¤“@®%pSM~.7L¡flA°‚¨Ni“‚w‰_ä¦V‰#B˜õDÚ~ŽK¦ÔÛc¹*EMï<¯-›ýÕ™Ñ3m;Ìò±ç‚^HD@¤Éòš`qƒ¹š–—Bï~åé’ÚJÝ¢8Óµ-ÙÌBW)_WDQÒ’“M1—“&Üž˜Bú ¸-éªÅyë„A‘D{–³šr@®áqZ¦QÍNÁå†ÊÅ ”w5šçElŒÓö÷Lšé÷/º¹ÖÌÉêdM9³"\ø% ´Û¤Áª^¶`ALÑ g‹¿û8ÆI)ç«T .ËמaŸí'†ÜùÛãoXÉ$\t•¦0GÆQÕ†‹XÂ:fÕ»ò¢P’'þ7S1Ë—ÅA=WrÜ´*©DÕÛQÎ9ÒaÈep€Ž“_!'­íJ{ ~Îz¼Ñ“Ȉº‰žVª‰ÆÍ©  žjŒiÑHFa Ä™zõLDÏïïÃjL~¯;¦*¯Ò«Ê{9«ë@" ÏCjòn“Gà™kjs1SIÜDfmL2ñ0@ÊIpqÌö3ˆ…ú’«ë—¤O ~ÉÛ¥­¦úä*ˆÖ*D-„颊}š«`Cƒ›Ñ#4Ø„Ÿ­·nü,¢"Õ)JëW®WÑ=jäM²Äã:b«?‘j{;1||Z̵EIÛTÂ?<Ÿ[íE"ã½aB˜Ù ™˜YÑ-/KŸa1e¸åQ™æ-…NE9jEÚ)/©ÆDŒ¬‡Î£éˆÂt‡æüKè•,Iäîâ6”U÷¥T‰‡{k!G`ã OÕ){Døyö`„ÜcsøUÉËÝKÔÔ'+ªDµE9I)C4è„+l…Òj¾v)¢ÖšÅk~ÕÁNÈ8áyp{DÁâÝ¿D0F ˜ËvZžÕµ>‡êñ¿šîk3Èk.T˜sœÍ°ãŒiƒ9 â7źwF}ṺJP̵–•íÆ:.¯ÝV‹VÜë(®wÀ¢œvºˆ_ØY¥‹žb-ñ âqšAÚdµ !¼NJ¡kbÞab+\êR\•!Q¥’vò‘ ¹Ýy6¬yM2 ‰5q¥b> bZåS¸Pdûðçìó¬’Ë=ï5En@Ž¢ÎoäêÊÝ¥*…1âèÁÊW)iz>bTÝÇê¢}¢\ý¡,=3“*øâ™-þ¡1|áÅœÄYÒN*×á9PÈû¨¬AÖŠ.‰#ä]WõôAkcžtŒ¢épAe6pD/³óï|ã¢ïk²aZ«”àÐÏþÑþeþæl?Áßí‹BÏIª‰îô¸N~ fâÈnS›;ˆ†rÓñëJÈžÄSU,AtO¿æ¦Ã2=î_R*1 rظÿT+ùÕØ‹)>sÖõ¶ûŠç1¾m½U×U/äñŠEMPŠ3ÿð‚œÚZi^ÂÚt¸›z*ÛºQHrýõ$)ºíaJ×Z"ó1ÒªþX¤W¯í3×Fcqºž\¥B>ý9Òf 1¾¢!Öç|´ù鯙¶CëÛcëMTe¾©Û„äA„Fo8‰éˆ¾ÆÍÐXˆÂs·WŸÏˆK©*™bòª†VÄÕÏŠ’*© s3°Œê_§êÙ´R²é4|ê¢léZ6[ ýJ´ËElõM'>$K¯2ñÛ5rˆ®­½1Hé©^0º–M"Ós¨ã_SQ&Býõèli¤ÍЂÀe†(}¸ÜSCƒE˜‚U¢r^Æ!36ò@Ã2¸¶ðÊ› áêUñYI e@ª†¡…hXRm)GšÐ¨´Ð¢¾ºP÷üôZD »R ˆahÔÊ)`4ÔSaº‚“À #™ƒ+0ø¤¢H3ˆ€=1VA!”{~Wîá¢Àák‰ÚååŽ(!7*Œ$Ôa†ŽÙúe1-ÜÈi'BŽq×Ô·Š2A]ÝFj¡Ên"$È1 ÙF eR#„3ßBH2 6Ê.耱”‘ç(Ê&BEäÈ% Õ’'e& a‚r(ð –߆ú3%…!ÐB9…ʆÁn|&lϽˆûý VxƒÃ.Ì8Ê>Q†±ô9Ô­YMÃ3±L¾_-žtÛÖlûT´™ånšÓá”éäö33nQDdEPD!\d"%laJFáu”éæÔ¥…ÓV‹A³'¡ TÅnÏ/¹pš¤S¢Xœ1J!…©+c{WΦ2ן¤By<ÉBíóC°ß{£·#0ŒV¥9¹’é‹gÛ™Z‡ßÙ ¼¬1*|«ET?J*¤*ºmEó ¨9ß×ëw}s9÷‰ûÒ‰T|•ÈVÕ«L︼AÊÆ0Rqª·u«åô4•µŸSh%ï~lëî[ИT%IC™²Li IIµ^d-HæMÏÒˆþvCÙ}Ý—)™E®!s×*!|µŽDĤÕ5]l“z¤Eë•÷qEk•9G'6D1U¹HQÕÉÔm°\Ö ”ªã°Lr ¿ Ê¥Š!L‡DÆÏ @ClŠ6Ñ_Ãß„-0eÐ)ô#ygW1A”‚ñ°3^f`Ο&Æ# H!A ­Âˆ"‡F†ý ‚>@®¡h¬H$hójû‹o.SËe£ÙXPg9‰¬¡b4F23`& N2a£VuŸR3/@ð¸ϱ"ÆU뜋¥$>& †1!2&+@îéF©(2 ƒ¼b”ìc ÈLÐ –‘E!39#—’Œ!É2=Bê ü´Ò µ„¦Pq‡e‚Â%›îKE¼E‡â„5U<9*„@ ™³Æg 0H!¨@F ‡+a¿ÀÜ3Á^X¥)u¬Sòý»šÆ!ij ç3Âc¡©+ ÛÁÒHŠÆ†£¼dž:)Ô/ÜA¹Å6H¶1š› E¦r†£IᔑIPALQ¨jgyk9ÐmfÆ`ÄíNõÞ‹UÂó_«tè{f‰U¢™±Â ÝC?žÏ$[J‚ˆ½X|*Õ!D„"’m)”ÈÍŒÈTÁ³ VqÞ?>hp™ÂŠ;¹àäì ;E'À­‰_;JÝ‚0ª“µ©†[MÎÎYHv1‰46¯(³„G¬´mõ%€¡ƒ“óÙ´Ñ_ì>¶É'Y›¸ ˜,A—ÐDá9üî3‡¡#ÒqøÆói©’³g¦Å©¾Ûž„¤²ODÉÔëZ>¯•Ý™½ØÊ ÌÍÕ b/¦Ë|±¼–óS¯¸´i×dlš²KÄ2 £nóRîqŠs%sF|âLiÈ•Ÿcgçb”£µT.K»SS²Ð„‘S–€"Ö–Œ#4Ô¬%­&ÛÚ«Ü2vÜgÝb¢T³˜®QÂAˆôÂ2ÔzXM/D ãî©WibYó{*$"Ê¿9¬c !Ž S/5O¸_ÂÎÆA*-\Ú­éä>=åËF#úë-U3‰J¨è«­CðâYö£ã\ŒþCö{È:”º\Ç$´INÉÎ¥@PÇ5Bˆˆõ ý5/™±¯$QDokÑäM1 Œ9™Æ,ÐkôB‘h½¸¡$F ²føŒu­"Ï-hIV‹M>Z–GcÏâ-Ü…0¢¸™•[¶îå(Ìõ¼´-R§\…ÿýf,UÓ¶£Ðؾ½)Nrê•}]nî13ÏùO/•>Jw&¢ŠÜSkMTÝú* ôbqXÇp@0¤>æ9h–.q8–ñ¼ö¶¡Y|UöåÚ:Œ:aÊ+$OŠ®ÔKÅ-š¤AiO/ãaÏ?Cóï’U×ßbµPgcpŒt ¡ Sˆ# ‰Â˜¸S{‹ÊÑfèLú°C«Ù_z‘®W)>ëñUÄVò¢«yŠ·£#²Ž24–„á.G(ŠÒZ´Ê¢Ê¼-xÓ.º’¸Ï2®Sô´»Oß´·¨¢'­#$Ì·´J Ká„Åʽâ·£¼o#=Âÿ“ZN­ôÞýÝ¢lz˜’&è‰ÙU‘HP1Q‡âúI*„­M¶Õ*…”ÄRó­ü¾œZ²ç \Vv×âÙzä)‘©=Eª93nO[K"2 g£¾ì±R…¼›…½JŸ(á°BËS —ü%+÷¤}Ã-™i‘^Éd1PvŠ3G„ðíbðf=VW$–JŸê_ ê5îkß(ŠœïSjy˜‹Äª$Œ Í ˆ3u9fU›Ë«=‹d?øÔ„¢qHu‘ÊÈ~CbQÅUsâÙtÃPô"ˆä8Bïÿ=*ŽÎyOßâ¸ævòUÞtOؼ.àˆ”C‰¶2I^rWzD­_Ôß¶½B ‰áK¢k3(ÇIR(f½:R±|²Êß›Kyª}MsÐY%¤KÚŠDäS-šÏÒ¦¹T‡V*˜!†9hAJ¥X—®fOcÑñ¿ko[b%uoQ¬)•Тá%“/úã-„A{$©TìeKŠIoúÇ$§v\ïEÉÆÊ ƒCXÉ|äüŽw“ì2a.¯)Pº6“¢M!u¨TìDÔwQŸŒ€ˆô“ÊšK”@ÍŨ¹æ”›”qr>RMìg´ûÜ«1\Æ‘0Sà¯3Di)EŽ$¡ÅÝÔÝäD1o–Êj^vNDi³SÈèèŸÖÃL×a*m©x‚ p–ß’Æéç7(º›2ˆÇ1Š:9$¬ËOšW”åÄÔà‡R}#%NÜ×Ù¦êm$ït«ÊÜRâ5Útˆ)*±¡á}peuÃ:ÚÔ'.5«õÞ¾SxüîŠ3í»ÈÞt9©¤8­@ì¡Ì j¦øÝê0ØvБ/ÝÖ¢*YÎ…§qKd'b§s½Ô™Ap„4‘s‚‘¦RN‡Î×,Å$„¨…²×„ÂÉ÷¹Iu´a”'"é(Þ6H5ÃPݱ0T¡–W(—%N×kŒõ(‚Š>dl{9‹´[»äü–Ïú?³Ë=©3­5Ô™ÒŠ(ýwº©Îþy”Œ2ÆcŽ„j¨ê¼ÅɳÉë¼,ò<ˆª…æV*-Íéi—Z¦¶ò•ˆ ¤’ßJÌ9fê NV^r£–$„]YÝ©ô³ˆ–9jËÑV7ÐìŠi–Y˜ÒŠŠó¥8!‹<ƒ’@ƒ¯27PÚymcõm&Øy· r]\ ž¤”¼­fÔ¢³ ã±DŸä‚£‰Å£KSYÓŽÌ£'/e‚üÅŠ¸žÂÖæ• UÍc ¹õaìó L7’kyÄgë8ê1U¯ÛF–èZóm )ÔaÃþv+If\%¬{Çߦ‹¬¶.Ýjj “¢ŒÞr 8’éjSXEw’ÈÏ]\Á".y? ÝÙG¤«ª†L;ë‘Ë¢L–0£*ƒI4ÅFÊ™%Õš¶ÚÝS»¦+2ïò\R) C,å°´ÚPÅ8!ŠÂô~HAU„£}c|Ê2Þ+U„³¿%EÍEä×”cŠ•šÂøvBtšÏÙób鈵"£ª%ª3G<¦YÑÄ|¥ŠþUú­ª¾}.;g—©%"õÊsÞ0Ÿ×VJÆ.X‚ºß*ÞV`«(ÉÄ¢uItB²¼¾6Iz=šŠJ{3/åÐBï[‡u!ù'ÒtG…;¯|›[œ…guÿ¯;¢/‘ªî˜Z·¹å盤Ȩ’–ÁH#ÿبeYPM­…è²hÑo“W%Ú›ú1Ò ®yUÌ¡Œ0òÉ:™h ¨•Ú·T”4Dß )º[I×WçäÔFÀÈ”/ [:TØ„Œg;SÊLýá·>Öײ°ˆS.ñ»¨Ä“9î.3Ug!1ú÷&©M¯=Áeˆú©u,ŒUù¢^¢P›&Ÿ¬Bâ‡3õê‡N±J™%²'m²j\¦ôÃ?ëÈQU¥A@ŤK©‘ŽrIó%;qÔ–>–…ò]@´*ÄUI—íz¡Je[;h«r·¹†“KäBÌ÷oOÕÒ;NK‘ý +:4Âu«Ì@§Ll"+Š£`LîÁU?®ŒÔ.Xš‰¹³iv†‘Æ5 TÊÆ#YVƒ~SÆÛysJ”j‘–E‚½†iÇs¤Nu•×Þ$¦¢k˺mŸMô+/ ¢á¦atuÁUñ,ƒ,¦sÃ:Œ«£T«9ýÓ)ÔÏëjZ)ªò71uª–±¤T©§D¥äO˜ŒŒ”úæfXÊŒ_æjŒj¦Í! Ñw9ª´@N~‘¼¯)(Êü§,f Bwþ ü=üý‡þz)¿•_ÏÝ¡çDßs@40>ä3Nûø\™X3‚îRƒ$ÁŠt2~y|]WÃÃ*oAÚQ×È&Z³;8‹7¾'”ªšÕE{³´ÃsÕ±[V›™ý…ý/°£A U¤Žêv aL,´éÔám¡¾„“Z]ûé=QJjîõ :§û]²WÄU)HaYˆ\Ò¨ÈE<üLó™»r;Y¼ˆ™ç–µKäGT)·eátT ϬEWK9œ¿òcº-yüQŠˆ.We!ujöbq9ÕæG\rjý´„Ê©+œ~j³ØÍe^úéUÑÔVå*²#nê\çzZvXUʉԓ­¤ÇfUd|ñjÛ©dNõüZ&|„ÉDЉ¦9Á_s”zˆ³°„tEy FT&S¦7Œ|ìïMy¶~1#YdäéD8C¸’œ'Ч(˜L5/Æ+Ũ€@„“ž¡H¸&7§€˜ ™aÖ­·¡˜¢ '…µÒ|r1à05%GB’ ƒ(1}ç3Å:‚«Ø& ‚ÀëN‚($bÅŽh `ÄB¡ô GAƒŠr|3d<B(OŸ ìáÈèñZäÂ9ŽA_ £D„EëöŒ®¾ f»§âV"˜‚¤Æq ìÈÜn†^uÃGé|FX¨…$CŒâmäŠ@œÑ"£6`ºœÝŒNoìTF~pX¤0'Rñø¿  `ŸJc§‚‘XŒŒX`¦œŒQ"!µa)’5)ŽxÞÛ¥D€¢³˜ÄÈîØl3SrAÁ0Ÿþó Ž’” © d„1Ä$š•¨àjK,\bCAPôæìe”¦:C ­ V=øf¾"u=‰Ì"Œ ãÔ Pz[!9Ç+Þ»ØlSg±™\x¢ Á>Áþ:ƒ1‚ª¥Ä`diu£81‰t ðÇ`ºq¨3©¸ÐVY´Z黯j#¢µÈªLF P%$AsQˆ½ÊÀ5Û£¶¨JS9Å”c^Vh{)k»âm7ОÖn3™] ÌGd(Â- ŒÑ„14=ŽÿÜ”ÚM•©(Ø$Ôì|¦¡WZ…DFJ\•R¡LwþlEU¦)4gçï[dÜ!˜„ÑÛRèë+üˆF–•£ŠŸ•ôÊËaÝûäÓ%ÎqîíÂ’¬ìæg:Y³q(…·2ñX̘%¶7›Œ;¶ªcíô‘ÙÓŽf­ÚuAjc®"½ VÒR§ÔôÙ[‰O¦©ª‡å‰323‘üKÑùÜ¢T«ÒP:c죊V#zeN»Ë¢Š¹¬!…®ÿïDFZËsj–4ˆœöùw•Yr²§¿HB;Ø\ëÅre0¬iG åk>„z)NL5(R½)¢*²Ú¯|›³Lõ›ñˆ%¨˜‚éˆwòú¨¦,ŽcyÌG£1d¯§~gÙEËüÕHÙ¸ÿL«“PJ©Ÿp‡I*òIö:&<Á’n_MR6c#ªV¾ÿ©Bª{Ómv÷ª°R*Í’¹6iŒD?ô‚*?âî Áióc!ÈAÍvÑß_Nˆžé¢uüävϪþÒ—î˜õÅ¥#‰þ„Í2މÔY𢧻¯\e~c ÜCH*SF–È–í´Û·—i´_—ÒÄ8¢ö³|´1Ïç¥%2¯¥F3šVp†.QJ·õÅt³—"_G1ÐòvÅM°Kå3­ù,•“ûÈW©õju!$Ì S!NcÛ’‰!(†¥÷HÍ.b²çï›Ë'…§ò!7®îQ:Ûb)Â3ÜÛ#”tb-L§VÁ ä#ë¥F(Iô"y$Éet>ä²QèeA‚Ë+ã5­º{¬øÕÆõ"‹˜c Ùì)ÐèÂ/;É’PØòólêrËkùËN”S¼JŽMì£1EÔÉH曃nôÑ—YjeÃÚ·Eöz++º¡2mêr¿£Õ±‹=j¨Âº¯[’¬Ã í*qÅ!žWg«šGwtbômíåßô1o/[5ò¬åZžµ•ÇGLÅŠÔ&Tä:T{…”¢IU£7åœÖ±(ÂYÐëB‰úÓ ´Ô¶?ê‚7k“óžªríËEBëg ŒéÕ…GB°tº•Ð÷ëõQˆÅýLV3ÚhÝ^ú˜§DY«ø9Lž®FI1 0ÇW2qP͇(¥!ü÷œþJ:f‘0§ µ—ûrì›KŸ¤yh‰ÖÖ§³‹1ÐTl¨‰Å;9×YnÆ2%ŸøÛ"PÄÂMÊ% ü´ç6w䤳›_Y½¨åuo£œ…+{±E%Ët°‰Bãa$VWdçÔÜÂW ¢Ó$ó.©ü·Nöì•Ô" *œ®gdÉ3ÈÇW‘œr&-vŸõ·høi&ÈNZ/rr]_Å!‚òÝEi "뉃óKEJ c®~±ZÎCÔ“§ä5 §Ò±kNæ¾Ò“Z™½:ÈÜ~6q;‹v @’‹G0ÈY˜ç:¡¸vú½™þ“)E¤µgeË*K&!L6d‘„é ![î*¹žÇetc‘—b•Uòæ.\ìw,¸.W2JÓ4ªŽ‹”d¼¥n°šÞ¬)†3x»+Q<–a„Fi ¦^yR첺t¥ž†ê¦Ê9¨i)¿]7äŒí´¦œÚ•|FæsÔk.?%Œ*.ÊC³6ŽR÷äb©Hi‰i'¢ Ú¥´’êŒR=¯õº«é¸Â7‰ÚaÄB§(C*9„¬Nrærîãe¿‹œ›–Ñ-§Å{v¶éƒ«. R‘d/X‰¥SL3ù†än°ŒuL&ÓãÇ –ý£rÝFýßÌÿýÉ>”ŽÔpþiPÿøÉ¨Ä–øL G@òc¢½ÿ½´#$-/7Ðièù|hf\ƃ Ö7ÆT¡\¨Äaèb»…$Hš)É^)V_ÆR‘,Ó3óS|‰‡ß(™A$G¤:*n¾r8t pC M«~Þ½¸bð®S9Ó\©ËoFv“w5ºE”UwËP†±ù WOlÓ5 zÖio(£«ÐU‰¯;Ÿ9¼Ñ|šþ;ûÅ€à¯-zqkwiäÙt´œþjhêv-L#8dmÀ¤b!¡"H§¯Ý_ÌBPŠ!±uÄúv2i¹¦YêŽq©ªÌŸQÊGg9ƒ¹1~_‹È4ü…Jƒ%,^ò$‰\vm/ˆáØ­n­…ôC2lBõšC+:ýß]úë9‹APªžšºjüø=Š‹V• ¨J Ô¤ÕÃRöj®y”DyEN ¦ÅÔrqÊ7 ‡p·³¦ Ò—*w‘húimjZ’U„RÛ(Žóv°ÍDLQhÚËGs8Á„eâù¤G®.oS;Eg{cŒ6õ$JŸI¼T±š2g½©dL@Š¿m×ôwÒ¥¨¹µ¢]¾+LD1ˆê‘·³^OE¼‰! g8¢)T¬Z›I+ý4Û}êЄã‘h2è3)ˆt(ŒI4›n&7å(÷*Né½îÛÖ­$è—ÙŠ¯_@¨W9Ý:šéû×FaHa‚…_jéh÷’µFýá‘fb¹¤RÕ UÉ-•¥ ‘F?ógÌåÁb;yH3;Ù«?Ú]ñÊ“,èêæ](™·Óæã—mQG!HVæÉ;ÄÃß<˜¥Ö†©ŒRjÂ;qæiˆ²‘<8¤ Ñ|â³I™\êšR™Ð[ä³54✕Ë]®”n;s3£aèL”ì8ÉJ!H”ÌÖk[º‰Æ:!x˜þp³ÈP«¾ã³”ÿ”çõNEÙ>êcЧÂ`¿ÚDõK)L˜ž˜©d—ÏØñªSf0‚ ŵ'1ï5O›»7¶¡ Uø‰¨Ñ]S¥’Ç1‚!áâÐ9Ó§Ó!PßF”²¼Ü$¶è5„òã;BgR!>ºªcÝl9åLC9ÍÈIö÷Ê]iú)6™gi¬…|’êÔfŒcéKjåÎèçÉ7µ™\–caÔsÒa‘ŽTKPµ-¥vÁ;ÄÇË“†ŒQÁÅ¥]2IºŸ«‰ä/Ë‚ ¨š2ŠÕaÌ+Y#L‹Hˆë5÷5ls·õw ´µôMÂ9ú–yʆB¦vþRâ+Q©ÌS…{}Uµ÷¹¸m#<Ê#7½Ž6‚],2 A »NŸÔd1Ù+ä;ï{´¿|˜Æ0„Ì« U²¢”®†êR¹Ö0®i30ÁÄ&ÝTúlÚoµ6LúaØ!90cÊ[…bÝ2PEº+tŽZùéRj·úÅõÃ`“WPbŸ«s?¯³¬ŽbªJW’ÒjÑD0eŠçT[1ˆ=ol4¼ò‘ù5 ËæJØb«ªÄZRZ!—äuÚq\¸ç+¬ŸMÖ=½ÌSÒˆ ¹ÇR›.Ý%>ßÔ‰I(`¬e–Ä*Ûu–ùŒ4žˆ)|îÈ·y ";º,EŽ3 ª P¾­¹ú‡?júïâë©'’Ú¡*È+ÄC™ÜžBá4‹dt» T» Ñ ÊDEùéf•=2”rÐI«çïk"ñ ™ªK 1TîÒ%lZØÕbv:—íߊHîDc ÍÂ2ëìÌ!8'ã·-b0Š€ÁÌ Nr2e²ÓïZJeŸ0ù ˆvêÔâ5N*™Œfz¥c"æ-Òòc§·gÖÊ-9 âïe¦þ ‹™T¸ìbQ¿„çGq !ŠÇ)t®?}ôÚbK2éTŠ›«Amb…Es”‡§b¾¹ÙèOd¥‰11óž™Þ7¦±Vè&1K"ˆ¨r¯¤›OΡ¤[ŠwÆJ¢"¢Ú‡ê娛ûÝ|¼£!Ú’:ݸgN{Œ¼F¬›š‰JÔš/3]‰g}&¯RÝV)»ªºSQ›ŒS¥g\Ÿˆ²¬Ä@ƒŒæ7™(G’ØJ骺œµ-jj”Z+êñVUÑ‹"åˆf&¦”˜W”{_ˆëW짯•(ÂJk7PTÛbÑèoÁ4¨W¡JC0¥Ncªì·_êÓf£wÚ Ä3}IÄ^2:ER¼†v.ÑȈFZé2¤Õ+'ëu­L¥oY·Úg¢aVV)ÙÌM>–Ç•X„!B9Èb!9º¹Ì#¾÷NûÌ_6#áYYЩÄ?»ÐF±vÛ„N}Ñue˜lW(dXŒ¬Ük…G]Cœ¶·5zHS“€¡SFíï·¯ß%‰™¤¬.f§`!Ëžê3®ô"„n+kkÚ©Ž\)ÌýéÆç«-?äÑ©„3&·ÅA8Æmÿþ&áRƒ+Ìv„JþN ×¥$'‘Ùðìåo|Á¨¦¢uŒZ°„õëDååEqjŽ\Fäìíf+õ 3S¿ECδ³Î,Š’T8J̰J 4¢XõÄæ!! \1pvc-PLa$„(aU\ùÕ‹D¤d' ú?>(¤ æÅ 6)(ˆú­PÀ¬Xt:}¤qLæ5‹ÄÅ ŠE ©Ä.• BS3˜,‡ý²»“H#R.KIâv%n"ëÀˆz;,”ωÙá B‚x‰ð‚£WARÁLc-2L0ñU‹TÌ¡…’±Äp•I8@ªÚŒ##kº£,î ‡ ¢c·g%vÍ'N#ˆC›Pˆ4p$D=4[¸ECbÿ£ë± V42ˆòž3µ?@¦´ÈËL(–ÖN2˜E0¹;þ$–樀c€40 Ð3°nb;Á $ÿx•Äl2«ÙI¡Ò¬QO®Ê˘<"YQyä}ìê¾"§_í<‹ÈÌŒ«Zo´B](1v˜ãŒv=´ã™¡ü!\R2—ÎBY•þ•Õm??îÐÿž!l„VL½H²²Zëe[ÿ(WlÌæ*-nS®Nd}DÊ û›¼% èâ:næò!ÄòRÍ•[:Ýq u—W‰AL´(·Û\«õV3(]-Ã_ibñ}·§iÛ+‚zÓ½¬tÎ¥&m˜º¼æLR~1ÎSyÇ+¨öY6”Á—µWÓÓ.ØZëéæêl¤{K-¦%9œBòÇQ›?J)‘éV bRº–3)²qUGGÄôÂøÚ·¦µ…!Hn§c¦×³óø¹ÎDMÎò#_ Rº[¦d6 `Œ»Lœ‡¿$0q©Ñ3„c©\. Œ¨ ,ÔOL p›–© 0Æ$318#² 8Ò ¿yËÇT(°°ÇQNy¨À R:‹çc)¡nÁ”  NðA ‚‘€DläÛ ®0"ñG÷‚DF ‚”Ⱪdîv‚ Œ,1FÊâ ï¬x!B DQ ‚ÁLB+V &ôl QŠü“)ǨÈ"îD$ÑöâÃù`B3oD`ÁeæÄ¬ø‚;2²óì9ùQ=‚áðhl9Îy ² U p„U©†ƒB†]Q„Lëã»`Â#!B1jœ¨éÐFrª™=¬¤C“ ᔡ°•iuÅ!!CtІ0b;©÷!AˆÄ)òjaç\³tÓêPÒÅÌñ¨¼+2¸§*ôlD;U½(3¾,¿¥-Æ¥2Ч?I‹,½­;oV)6‡îöŒf;Õ,uud‚˜Ëu-Ük'-+ÝkâŒL–\se'¦7ˆú´÷5ÙŒê†7>Üœbç-–ÎŒeö¾1E;þÆ:ÈÚ‡D®9›DÆI ÃIÇBöÉtD/ûÓë·Ã©È¬Tçj¡Œr9bÄ-*‡a,›E¾=¿%j5E–RU¥¯ÉÓM«Þeëa.·J3äÜ1æK}ê+\D,õ¡šåæEˆýÚ¾TTQ(µóo¼ò7“Ò¶}WjTÑ7ìö#ˆÆGB1˜²·§eßRxœvTÇê(FT)O½‡#)*ûæàF+V5ûLZQ•º´ÕFøh¿¥³´â0ÍĶ™Lé”ÄþëVĪ“w-¯×NÔ"åÊã*©®²"HNB)*¢V]#â³óJÅéi™ɹ,ìœ÷¦- MOŒÛAK¥Ô³é7ªˆÍÔ1‡Åé“HDT;ïmC« ÙaE"SíØû!¼b.å WÂU/Ï—UI¶Ë·mÖ0Q•WJ0ŒZíD„&qNÓl»å}æÌrírWÒèZæâXøÏ"¹¶Ú"qÕd1Œ}Õgj“Ø!…Wk©R©¸r—²cæ/VNN¦Éý"Ô·ìò¯W)d,¡:BHù¤N‹")Õ*ÇN˜É”‘ìŽVo\µÒÆT0ZµùÎ*á8l^Xª+‰„ѵ "© úfW(‰¯/Yrƒ–Q‚:ocTËCÕ<™W¯æˆ||¥s ñ Œ÷ÁHá25r Âx¢±„Rp``Œl"ƒ3LŠ/ú^§ŠSô B¥z”.:¯ RŸ ´ ÅìhD0Ø#rÀ…L‡pDZå¬2ˆ¤á§3;(=B§ÎD9d‚þ\P‚·F ÑIÜ!<Ì«ˆÆqƒG3ã °\N«Þ¹Žðü„¸°¼¦R©Íƒ…´  à¦Á’B±R°l0<@gS¸!Ø‚äÇ .ç8òPÑ=ùÉHAQoR„âiÈ E€F¤Ifgˆ Âêäâ\wŒÅ"‰ËQ,~9þæ;7s¥†Eæ`‡fB÷˜0Áh´€‘Vs … WCò‚Û•ŽT6“‹jc¹0°ý˜#10!Dá0@3 Ç4qØÊ (ØzŠ«¡])ïjDáŽÐ98”‰Ñ\»@J2"4¦…G)šîB)+œ£3' Šy^[о$QH+åøˆr£„0¤&°D|…# 4£ A£S;uN¯ Pú®1ç.~_Q¢ã~8À©£\ì¡ ž#8€’ˆQ. ¸A0øˆ•(Ã=qä ¥a #E „h]Ìä‡õ:•˜31*¨„{ã %aU’‚HhB¯›·9©=Wd|œoéT¨ℂȩ},ƒ"è B'1©)¢åå¼pž‹¥T*¦µU2å s!F"~Ý0’ó@D bP™iœA8-9*IÂ(ÙpwŸ)~óù Šj.¢ÿ n DBòÄHÈm£æ› ”@H·”‘9Ñž9HLÎzv·•9·­Ãed q‹PÄ 0d LJc7cNv)y{5Sh9Ü©cã© ô:1˜„•* ”IÂ.`D´õÌ@„ÁrZC1)”:£Òð·#²–/•LÐGqx‹H1 Œ£;ˆŒK„JìLÆ|ÇOìL»ÐG_.!=è!8Ï.ÔÞ>WA Á J$0GÀ•…™g¦ X½Ñ–NŠB¹{D¦nO_ »0d"’ kÍŽŸ!±“¢³ƒtåN7ÔZôÂGÌ…ªFH(ƒÆ%dH0†ðÇh%©Ì²â³)ˆæJq2²)ÎeÄrŠ\”c‚à¢9ÿ´%B±c2 L¤0¢S:0OC8Â2iM‰3 "ÓõÇ»qœªt9K·´³ÈÆ ˆÐQ3Œ™xN 1X D"¢üBh'þS ‚ f®yK‚¨âˆ†Œåña kçCä˜ÒTƆˆÀDÅèGn×d¼Å׫ž)iâ’½QYÈ„ü`³ç¸5a"˜ƒ 2›„b1@˜ÁŒã.Z)Ž,;Ô©…ëñYK”¥RñQR!1ŒìX¨C52£¨ØACýˆÂ):Gç â˜D—u§°±óç&«rCw¼) zWC(H\@†S†ÁˆƒŠLòÿøÉ¨Ä—ÿNÜL­®˜k!³’µ¹£gAu¨ây8†t©÷j"¥Ó„Â¥L•\ÇlÂÔ.Úê“–V^I<Ô"ë$a K·féH÷7-Ý ).ž#y~Cw"þi%HADÃÍLÅ"ËÇJ)·¾¾eˆF/Ú7—ì%« ôdS†¡¯}9¢" M3Ñš´]YTã‰!Ö1B•ù¸O5 ÿI-‹ tÁü½5è†# ò›PŸ•æ«Ü¢q©¤ÛïÝzäýc#¬¬E ‘§ó1N€Hó ‹ ÑýI0»¤ò Âj +Q‚£žRfÖÈŽ“w¢âj:òiâ!˜*ÐÛP´$I7;ËF”˜¤M¥Ø×+·¥ßD!¡À8pÀ¶G¼Pd­o6÷µÄ©­Ô— JnÌY7Yñòa¥N”‰*Ø®¡*hGq\Uß;"¡嘵ºeÿ ‚Õù6È÷¦úñ( ¡Ò`+ˆ Õrtá^Ád™oˆrÈIöKÎK¨Ã¢ý¨LMT¯¥†A„ îXµ¾Ý‚† “Eï„Oí=@ÓÖ€§5&˜MbTš|ýœ*Dö@â_‚u>(²5³þ´ñ2~)ixA7$„zx•69&(Ça +(žº•p¡Q—mæýi(jrjBðY]­O*MISúÕLP)Ä9d(Qllµ,é%›Q0û@²ÔÍ+>"i¼÷æiÁ%%Ì¡‰$¡_§¯9ê}cH¥x#O!<™T§X„Ñ['ÇâÚ-VJTqÉsQí¤ÚÞ@´ -ì¤Q8‹ßÒ ôá.7ŠÉÍ!£n¬Ê âŒ1\{;U‹II"_?Qb{Þ8~§™œ!N…ž-(fr6KÅè‡}á\š_;ÙIu½>ÞZÈvi[Î%´OÊNS2>¬9¦}õ–1ÊïV¨›/š®Ž0`ÞrhÝõ Í*`¨Ä./c$(04,J„>ĺb„özÑÚ°Ýäµþ÷~ÕÕ'ôÉZv–cPŠBö#(£©ÑÃë„GÚ\l«T—µiµ”†œC£Í´0äd ¨Ð²£ TaMœo}ÞmØO›ÁPU˜A.[p>WaHvJ¹2Ÿ8Ò¯‡fò¤‚\K2ñÿ$¬&UCúšá&k§™²þ-Hã0À 9cBh‚›"³.•wóS-Mw‰;V(ò{Q]3ƒÌ§°ÂÔ±fÑâ„OAŸÕ³a)0äMKZZ=as¢-bÚ~cB¬4Gˆ Hõ×»tB‹V§¸õ'¾ê$™)uxÏ|ËÊ%TªòâlÅÀ…Ns•øBÊZTÒ=ét¦)†ý­Ä» D»ßéQL*…€Æd¬RJ+¬µF5%¿5þä[ÔYm”•rö-%Uv…NJ ÌXédAóÌ(ò'_V7âàœiêiÔ ¨hJÃ^J€¥{Œy# ùügžÈÏåjþ.<29{†ÆñO(ç±ö”ˆõ2Ž×J;þþ“ˆîAËFÁ°{%窩$V¤¸[¾%B5›w­¢˜¦)È&³ |•xJ$U6ªÉKD ã`™?ýÙIì&"üx„¢è£§:rSÅC3„bc¥ "­9ž%ÜsäÙ"á$Gœ1iH²Ë®Xǵi§Pº„iSžÊiûY¬8T#+~ËÅ¥Ó qjbÔ__§¦²2WQ÷”k¡pâ Q±E›ê’),]^gÏ*?¾8¬Q@EÐ-d0êŲ)d#á~‚í0ÚI½ëBjšÍöQgŽk¦‚•ža B®È’1¤e¡Ó…íߧ寲šsu¯zjPCx$ {߯ q¥N2DyVPÁ®:;U²—~ÔÖ øùÉö¡„P²LiÎoD÷—Í'êçV÷ò–pUÅbV²,9p‚óKc;’VÖ´=Åp§` á 6±®cy18š5$á7¾rXø_=ªZ=~ÂèÇÔ ¯¥I55”*ØE!td0ƒ´BMRcH¥.WÍ÷¬ãA Pyd’°l ëZ«”;8©c߈¢/f9ÓB 3Ú Õ !9,šZ^k s¨¥Q™µ—å@A Ä'¬Ÿ‰»$zN8î^%E‰rÔ„Õ²Ñ51_¬²) ã„"¾ …¡Qj¼Ü©m¶XJâm+ºfœËD.Œ¬Ê¢æéŠæ )f.âwµIê38Ó ;Ù7•º©<¤Å¿ZD«Lʤœj‰I•Jf, ©ÏÈ;|Æ¢Rî,îÑ ¹¸/›”>ÞØ“km72Q ª1+A)Dç1@ˆo,ƒ]1¤¥¥!ŒT Ho¿a"ŽÅ´4õñí+ÆE¬BP “µˆ*ùpʦ=Z“6X¢H'^у]>¯M&ÐÖ6J‰³má%ÌáYr¾u rДÉz¯Qyïå³pƒYùøÒ IiÈ‘.¡Ë1ÎsbÂþÞÅ»RÂÿEûVFäÔBwi4ÂÅB³£Ü²=JHŽPaÖ£$¦TMæ©]hLãìþÿȳþ_ën×™þW³½D¡×ëž§j›e +,ÅäÚ’‰I­õm)”ëA4hט#8@Å,ôºðÅÒZ‡Ñ”æ’JÍú ­6ªK Qõ2f(‡(:³/0“4é´kŸÌ%F˜œ‹ÄWÀ" PÈ$ûh@ùÐ6FàÙ¿­ ‘L#¾l¡”…c‚ Žc†µÎ#”åmÔ† ß}ÛDh2hÆ^et)a]*7113¿ðS÷_Í$@…d?S8ˆpØtò˜$@’¶KÉ© ŒL¸hb`Ö‚VP…GÈ*…2˜ 5©)Mê0¦«•?A8ÚxFP™9•*Ø@† AƒIØZ£sK9RìµÚÄU/U°p¦y¦ˆ@žßz”‚‚ j"€ ÜÊ)L¯™C~:3",€ãr@¦¹ˆj%‰!CoaŽ@ÈÔta Àhà3ñ‚©B™D`”‚%Niƒ'3œIó+³ Å¡cœáK<_PÔBèà„‡ãà mÁ…D˜ ÆŠ¥¸Ì&1yUÀ¨@Êd¶/‹í.ª£#/2ÕßHÄT[kâ™XG‘Œ®C'TödŒŸÊ= e­S=—iOòÑEΗ}SÌ„lâW #*.8”/“Ì2uäáR‰Î=DFç™ÊÊc]³¬ê¼¨þÉþfB£[ÇÔäÎe}ÛUn¯¾Ä{\„qÚ­¿i uT‘)sð…íeÌjæ’®]:jVN¯IBUΩšµR3Hã3©T#.íj!áœs éBÔÓãõ—þB}ŠM#OVÓSÝÉ]¤”k'”S.§^†" ÛÄî{9ÊbÊlÛo srJ*ŠDj;½ÌS¢˜!8–ÿÅlfï%)¼†DܨI=–¨vÄâJ¶æ¸…æêBKŽ÷êá)©ŽÇ“Èëþ,„s‹byõÚîvAê¹®…îHÄ¥5œVÍID~j%(ÄË쮼¿¬ÈÞ©‡ªUÌo&Ò›ÎV¡ìÔŠŒo±19Šq÷H˜§%U9" ÖôíLkŒ äÆ9üßšuÒøŽflþÑ7wÏYÌÔ6©R?ÛÕÌ©VOĨ‹!NCbÕ̇°åUGfuºËý”â&å4ŒL)©„VbL¬17œ¹ÎÊr1ß’G¹s0¦šLAU?ˆ©Ù¾Ëd e'&Qõ+]J\U9 ¯S*ß2…;‹ºä©m©l$WwL¡H“çf¥¤ApgK± Cµó–•“x¼îLdR™°©)¶¾¢ýH*:Žˆ3£„îóíB­ýµÿÙD?KQV´7'(žóÙîæh†)Ä/ægóHAL3!T‚úm4«¶ùˆ:uãL‰6f“DZ÷šõ¼ìQ_¯“ë±]§Må!Qdî&)³βÝÞêgµ"•ª_1 úIsj”Q^B¥s¸Bm2ЧW¾ý&[ß%\˜¨›B+JŠQ6Ÿ ƒnS¸ÝJóRÒ¦–ýžÊ Òj·8²5q(D2jŠìØS‚QŠî—~“ˆôÉ0Â¥_»_~çß™MƒR ŽbA„ôŠ©hÆ@k R¸V¡ÚÉ ?)Ož `b¥'Üb ÈÉ_$TmÔ°xb¬|8´*àèR¸ÔV-¼f1 &c 0!±ÑÅâ $pQKAŸ;cvÆANÁJXyš &æB2U@í„3TXþÚ¡ £4NsrK£Rh‰"ñ ȈËv‘H:©Z‹$«ûöÒy™„"û?åpØêª§D÷eÖZ£jmU„Z)%—5½0GÙðkæÑtµ6•jäES%ØäR”¬B™ÔA cŸ~~Ú¡IÆlä%Äá;ä´ú,œ&ÈÔ3™V¯Ès)§ªÈ£8vöÖ[r’×ZfÛDÊ=tØ«ruÝÄB;È»/á*Æ!œåJSÏÙ´Æô&Kj’ Fkد!Ë Í®êÆB·ºuNO+²¼'”XùZ²ÿÞÔ£i·0¥;c\Ã3•ˆAFäwe3H¤j­,ùbT&5ªÛï¹½ôÑËÿ–Ó©YëU-¥}KYS*»FOcU|‚¹U;©]ÆAHTÓX¨Ûåu¤Ji œ‰ãˆìo›&‹×îB¹ÊÿŒ]Gµvb˜T̳ ÄÓø¥*>½Dw©¸èU%¬=ÓZ—ߥZM·fYº_/wVÂSjÓ̃fŒq¨•÷YÛóY½u[ž}¯þþö ŸŽ`‚;g2 í%Ý*D5ˆ¾•<³Ï5Ne'Áoä# |qwÿO¸Ôã(¤•’!ʧMjê&oÿ oÁHDàöòz.#œÉª(HLš£¦tIV¤Ñ<Š÷ÍR› ÷ÓM%p%“•Dÿ#+2Êó°îGaœ§*Nâ‘„egæ½Q‰¢ï¸äf´Öì§ÚÜ›bw<…g\okº+J¦w)Lš˜šVt||c¸÷-®j~”L0î÷'}N»„×ðƒ=WØs»ËJáÓ liý„+ãÓ0åwUÊ0à„SГ‚9[:ä8¦ÞÂízɲ:æMÿÂÒ“ÛåÝÖ×Ýwo¾ZC"¥ÄQFV)D‘LH‰ÁVè¹jiH‚¾dŸn¶ÿÛ¯.PÈ«I=Y»ñ,‹˜úSuŒÙg0¦Vµõ“0øÞfNßޤ§ R3zyDi¬ñD$uëåš´&Úó GËËY/n‘;$ å­T(§õN ¬ýiŠ÷廃fce+\ü–l7-©¾üÃ>¯òc©Ð)ÔD¸Ž"]}$"úCõ“=jó­°Û~ÊþK–D9îùiw(ŠùWŒ&":Se*щMvQ°Â5‘,Ýg&va¼E" Z ”1 ”r¸Ú[þË}à Á ÷#iäîÆÂ¡`¢ñÙYõUèc²o9JFi9 …­Ïmú+ÄøgØÿøÉ¨Ä˜ÒNºÄÀ‘M³‘åÿ™ÿÕs€§|ˆ†w3ljX›ÎäI$XŠõZ˜NI¦J›˜@èbŠ”Ut.™±‡ªš¡(îBçЄâõš”¹2Lâ¶B‘ÃŽ0(%ð£¬ð²PþØWW‘ì¨EÁ;®'nãã!Nª¯KäU㔢7ŒQ ìïŸâÔ])u:ß<‘Ôvëú¸¤ã6˜•)?ˆî…¸¬S®¡ø½SQÿõ¯(Jµ<ÛÕü¶-{IBœ¢ˆÃ6{ʃ£0®†"ΦeN´µú¹ž‹ùŸ¦ç1ÙÇ(.“Ϙ5ÅÙžaÔWá‡]9·M”¢YpþÌ›µAKݯÍ[¡fó¢(›§ß&ª©bg5B˜„B£ ‡Û¼ÌÚÛØÒ„ËQ‘¬Õ`ˆ®ÜE3ŠQH „ME9wÇ¡¤ÅšÉø„Òì'v²ñ¿ÞéÖ,éÌ÷^EÉìôv•L¬ ä⑥—OÊMÍZ"êq Œˆg·u&šs+PÁ¥žD_ŸX퉤YE•-¢V„Ô¼¹¦W*¡v¥ä¼¢2xqÁ¥GŮɵä Wð.óHêºor{zCR£pŠ£˜qœŠ!R•'éì6¾¹¸”¡ú›TÛ—Ož–Vºp‹9Me¢¦"TªFrˆLÅR]fG#+ì±^˜„rOº3¶9i&ýgQ,Y¨@ÀÌ´ˆR||_µ‹l™ûä^^‘q-!®M©èùÕ¾;QɵÜB‡¨ˆšÅÝ¡Ô|áhÓïmÁZ$E¸œB°ËŽî‡%™j_oÓИÝFÌîMRÿ|L=&Î"²0…*㼤e•*d»‚‘LUšÝÉ÷(BqëãJ.u*¶¸£8Ùl²¬hY©w,ÔÐì;AˆS!]*½¬ê¨¢{+Pü‡Ôc—ŸtËm$ZoQn[ª£mÒ¡ÆËúØ7£ÆqÊL6¦Ë!f¥j¤)(BsäqÃŽBì|á8ßý„Âjá°ÔŸäî–ì%$EöBLÈïÇC¥<@…C)Ì-‘(r („–Ô±^½J õh×A j2ÞX˜Ò­§?¹Jæ9ŒJwU¥âæ "Ì…iLi ~¹UçúŽbïU>´‘|íU8‚›”Gu¤þêžE²¹íôøVv¥ßÒ‚?Õ¤ºodì3 ATD)Ñ+sýC]ô¥·÷$¸&»ØJëS‹üŒ+w¥yKr™>¹cQÕKâœdié~ñ”ôÊ¥ïŠ9Ô„í˜ÿ· Çš¨qL`â q•­›ì>Ú!ršŠ£c§/QNG—e/¯s½ë»ylC”K%Ô“(í9Lœé~I(§Õ½ZÏÇ2Þj¨Ã;2Ê*ÓdNkHåU%‘Fjâ1E§‰¬j±<½¶èj¡dÊÒÏíö&!…{«‡"—H*Œ&TiVðŠä=[뺯Á=#fÚè‚x5ú¾_ Ä wI•‚ŸóÈôrÓu±ùËvÀq18ë-ôˆÒíÞ©Æz¥whB¹|*ä’éŒÁPÍ—JÍ‚¸/Ó†$Ì£ 1D[éßmE0‚„d­ÈvEÏ-©ÇªÉ0¸ÙM­?ù*/’˜‹;}‰7±údã·ý[Œ±‡i‚0Œ¡b® ÖBQ BôD²ªS_°”¼´B?}”W"<Ìš ÜB½t£³í´¢ÕÛÃŠÒ )ºŠ®Eª WQžTª§WÌ\Ye[«SI~ùDC~-ÒE•2«GUªþ¥ÊPÚéFÎô&—ñ‹¶ÛUWMφ­tÔ¿Q_P¢3£gú®©}F8„\J ¦ uâh`¤AðF?ü†mü³„K0×V4Ób­zÜ:†OAF´¯·ÿIäÏ÷¹”Žbâ³Äü\Jvz]=ƒYí²•;’ŠÕMR¤ž%ÂÂç¡RÌ": :Ž^ͦ¢ˆK± %Ù%Dw›É^5‹­ÜMšÝEÆ·fsÈʾNÒµ’¤¡¤1Fš¨‡3$æÅóùÙœ+ß‘|„9KÆæ§ ÷žÔUm¤„p¯1C6ºY9èÁ#޾öe2(Ÿ™ÿ‡áO˜öY[ˆN3yP‹›ÚºòDœzC-‘Ðæá¤Ú“i#¬êR‰ÍGêT@ƒLÇÌž&ý¸Ú[ Ãï cÓ†Óø»NcY7EK•=„#õ>¤ö©]ÚR9Ý„b!ÄFN³»›Û©b w‘ÉŒô– ö!’Û9‚o–Ì»íT'§•üˆ“EÂ)ßöÄêe•Uu—K…z‰ÍD¯'Ø–!³òSÞ½aÖûV²–çG1Žgÿ<¯´,Uªe˜Œ)gÕý¢;ÔŸˆÈûŠzt]%1‰“;+JîÚi’‚X©ˆYlêã7¨Aʶ ‰ÕÛ» ˜’r¬Ó1Zx“I¯›' êBŒ(ÌSŒ ºÛ\­Ilú=h’¹¼†FŸJÊôId +Sbc©x©ØèÈ–9 J½û'¯¿}äoÇ*¡†iK´µ“Ôæ ¯¦1Îü‡©ó­~ORb‹Ca†¿}³ü­+m—UžQÚR[ŠyÕ"œ©CJÆQÄ\Ϫ> ôVÑ1Ê)\Õs¨—–m·³ ÛA˜ ˆ9,Œa(Mnä#µŒTV2æÚAè%~&í*ºQÞ¤«;vupÖ¡óˆY]8èŽ&¸uqiÇ ×AÓÄuÔ/–ô%] (Aòa‘Öõ&¸\/*èZ°{ÛòÕJú'º;NÆet_ï­ê–fE,®c’äHvâ°êä"¨–&y(_aNv|;%mKE…¼äGžqØ•;—çÏ?RrQ*E»‹B{ó?¶Ð¶õR(œˆ›F+”äJÒf*.tÅIJjmg’iäÇ»¥Ä ©hÁâ-*6,Gœír˜ÙW¢W+f«>ÕF‹l$–‰|öíMb-•¥#1 u§Fs̺.ÔÙ®gõœq”ùWOÍ1,ÜäŠp§BU|¸‘©·ö}R v‡)ˆQ+ÅÁ /ÙߟŠVîämÿR—¿$"ÐC+µ>¿–¤óž”[1jºv±šBš!÷GˆIÔ%ÅÖB”‚¨#§I[¦¢P†¦z¬E]7¶`MN²Zæ³ P•M­¯ªz¤j+Ù5%u9w˜ÙQ&1gvˆ¨DòDÑRçEÌÝSu*øÊÌÌ(î+fgÄáéñÕ´Î(ÅZ¥}½³1‰2 Å9\ÜÚùýœº¨†Ê)Šì´Rø‰íœj´ÝÏŸÜç!ý ”–4‡Q ß®Ä(‡)Èü'>•ÙN #¬C­-ÞÞÕ×òrTœ·ñ:5·È_ÄÞV (Œ#gLmêwíÓöû+ýþÉgŸ¶OÜ­¡§lÛ„S…„'3]EÕ·(ǺŠèô1Ž"õqÃIJ»˜îOÃ5’Ô)‰Ê7qeñ¥JÉÒ˜—¨Ò‘­·9Ê‚™“hå.;ÕžQH²Dº[³V¸F+ïțډT¦NR6Çod5Œ•ëz´LT£êºóéÉ&RC%õŠEAßÚ;²ÑÆ1|îV©SK^SeºF­ù%êõ©Yµ_ÿpA(ŒùÅA…‘Ø‚±DW0R‘˜ã¶ÎMg"±Sɘèo•){õÓ©M¦œ¨JëÑHÏÅÒ¨ùµ|qQü®¬^êmR¤ª rªævN¼ŒwGÍOmŸoc"ì‹jmv]¼«]ÄSľ1RûÌžÆS-LC—›TbqUNÖ0žü‡bi<ÄR(›^ÇúVõggöÞ~C|½vB†1ÔÎݳv‹!‚ ¤&½¤i(LG")-&¾­i*©©…³t¹ÒEr¦Hüw®0ÈUáÄ?©ùdM¥Hè×JzŠÿLWR;?9HÆUòÄ^®ý0µÒ=/K¾ikuBº´: „"YŒqaëäjÇ*m2ˆ•ÂiòNs×p‰²Iµéäj­®´%Åc­ˆQ‚)…}gŠÄ쨆í^Êp§õ–ë_ê´òÖ¤¥U^¡"(§Ôgf¢&-HRc GLÖ§âóSÊtºLè$Ÿ˜´1RŒB©7x½Û†:ɆֽüG§°GOÁH“ašÇEc ¼…%“ƒªÐêcšB?ôT- ‚#¾OæÇ›{º—±[’ ¼?£ùÛQ¨¨*ˆöíÈ̾b™1Ê'àÄÞÔÜ.¤ÓI—§k·ÅU¶¢RÔ¡Û1JRµË—EÚ2—i”Is ÜA ³f \†gALí$…0¼ŒJ‰½N& Ùy,D|Ê&úŠöÕ©’¼ä) )L†Zâ¢ð¦+öÎOÛTßb%k’IIx—¶¤_ûw›¤R aƒ,ŒAÔ’­BNrÊýê§jj)ÎLJö¯’k ¤cbˆS¦fmõiˆŽ%Ba5„#jׄ’ªNÂÐc*D-K{“'"zíY–Et+#”ÄÒ]¨Ý÷^T#%©¨’#÷'‚ Ri»q•_íÄSeÄBE…|Ÿ5h´"K]\D[#÷všEk;XB NÏÄT0¶;§ÕÈV.RÚTRsĹì­Ù‹E÷‚kÈIoŠdDršJ †Ò½HÕÚ?–Ïüó Œ¸Nkì…R¬qËôèR/öÊä¦,äÉ­ág¾©Ž^ò&%lÌJe‰E(çg™–WFfN ¥lÚÒ’1Hñmê´´Ø/KýTid Ž=~úêjœŠÉ`åOî8Çs 1QHS1ù*9¿2ŽèÈØó{U¯~ÞßNôïve¿\%G:}¨‰D$Ìb>mÉ«%ÈJ—ªér‘oD³–vîCŒœÿ*ÝçzðÉì»Í£[“Zs>%‚U™^VÏ§Ž‹B1ˆŒ¨›i˜:y驎ƒÛ5ÞVÓm­“uú¶)¨„˜jìõ*I•Š*•6¥l¡)ÞG2ž‚¢oyÉÊG—kLÇþ-‘öb·UêO É¥«Щ-CUÌS!¾Š&Úÿ«‚.}½ŒWÝÅÿ£ø¬w]“œædŠbH‚(˜²ÕKšq.¯á÷,ÊP´Cz…÷ò¬Mª•>_¯Nk´’2êåq·^¶’S¢/ÈzŒÒI¶‰vAŠ´‘%Ret™§2ð’¢þRJ¤B¦Ò-SMJ³ü\q”Ç¿¢aVË¿O ÊTqPÖUrv·®ì³ÏtÉ‘K³*}³X¨”ŠUhžCs—¬KqjÆ“KÇnb×í†OeR%JÙ3¹fq™DBˆ¾Õ¦U¨!sknQºIzÔ÷§r¥¤ÅT.w±-˜Q]YÈꌢ³bvÎZ¥Ô©Õò³ºBÚ?¹9&ξŸrM—Û’å™Z¯'¡¹ŽEdfdg¼…Ê~£TCOf•Y9ùj_(оäEçQ Î]:wôÛOŸGTay)¼eߥ™QB%ìƒÊÔ0Ꜳ¿OÙrìGe§>'וö«ßE«±=ˆÅÞ ¨%dyºb¶ãJŒ&ék£V·+U_°nùŠR&‹ˆa'¤ÈŽa„JS5*ÓpWu¢Y’„Ò^l5»N>6¢‹-•Y÷í–ï9Še/¿¯‘†V)Æ9 ¢"(‰òˆ`’¥³…%OÁÊ!X¶9hqíH$L“¯¢ ÑŒ1D"G¬2XHoUÌc cµq>G7dpâ ƒlBWPîƒØçÐ'ÁˆNúAág#ˆ£1rXÇD ,QD*PÌŒôŒ#@µÔ(Ne25e9bî29->ÆŽµã€Ja=8Ôà‹ŸŒƒl#LR"«ŠnšPæç†¸Í3²àêƒ×â7>pMÈú8Ã| •D1¨aéÀVìb H#ÂòŠGb7ØêÌJ ¬bÓ•Õ…Šˆr2PEl¢‰ÎΑÆq•¸2†Äˆ¢ ‘\«„Rx3¶b)Oá˜Äc‚@‰ ˆ¸C‘ï ÛäÙ²"ÛAñÙJ3ò—¢& Êj¨´ÁèbD‚L Åm cƒ!¡ L8ž¡(6p臃ñKE— LlHw¡ádb.É™ˆG—ï&dèF@ÐC3&†C,ÎÅ*8Fâ"û9¥@9‘AEÊÓ7hÎ ˆ B- ƆB¡ DQŒ "œ!“BP¡Ué¡”¡£ãニó°«ÆâCµXCÄ 98›„VSgc! 1`Q\ªˆ$ËKnEïã—bÇ^PÈI‚¡áUÚœÄC`n¤–‘(N d†!ˆÐiHƒ1DÊÈyÝn¤¢15KþrL.l€ƒ!]bAЇìȬ(N°vre3%“ër™pã ã(kÂh4˜œ¤æÿøÉˆÄ™–NýCúÕøã÷¤÷.÷oø9ùJ³’uÒßyõ(À{ †iM! æL»¢±7V¤;„]² Û\Ñ)ýü7yG©<™’¥E© Ч¤ú»âˆ¦5å‘ "²'uÚ•AY4ÕòHÅEUȼÔ"4¥WûKɲ^š0G©¶AwK8tŠžU½9NE9l®VŽÕ2"ã“êš KR÷Æ¡âi<’ù¦9)ôÊñårµ0»&^)ÞÃ]…â8¤e^fòC&&)¹ÁïÓ_Ù¶’W¯“5.ïÆÝÎdòS$2T¤MRAÙÎìèê(”K"¶v˜º4+ÙüDøþ\´\IÈ„Ú93鸒;×ÖØÉ‚ „mç_s«2Ù/¸"© ©×òÅAH& ”Ü}ÝÄÂSÝsÂÉ¥Žù!=0Œ§w0’–‹v3¸EôÛ<‹2!”쨳ñ-Rq ê~礪ö/ FS$£§®w Æ`U¹ ¶‹Óé.aˆEFD2ˆ·V×3‘gUåR§I˜´#f7ÐoNº«;õ*ÌVä]¶îå»×»7”¥³u&^[-‘¸J¥ )glé9me"›ß‰ÿâq+(ËO¢ñnæsŠ£‰†5èA b©<ö]ÕÔQ¤/p•ósRŸ*á3³ð´÷«˜9",šÉk™J!(‡Å'l”*ݰÉváµSPÑÔ"4á æÛY/b׉ä#RÄõ'I˜tÄU!¿Ë¤Ô¤u&noñløF‘ýÒËeãyªŒ*%Ÿåù+†œNJ:9ÚÃc’½g9™Š^Es<ÈÈÕ1˜ìgÖº”î)X¹”‘{ØŸ5¯†±6¤úhžõ‘?Ç©6…â·•w YÎVj.¡dd± b/¢”èò·Tõ=pÅ0¦HŠt>æñü”$‡ZQ"å9TgÖ&‰NÎÚªå ˸Ü%O¬±b,Žš›¼’‘B×ð]ÌÕ®f§}òûc\g tMu(ë!œE9nÞ…s”¥!6¥•ÝX¦úÿ£0O¥3 „§½W¤d;sÑÎçq6‰ÏÙôæi3[¨˜vòµÎOi[Ìäc UûÑލ´ ·v#H—¡¸¸É¦¥=?$ωek–*µ[ …Õ³pƒQ¦2¨Ž ɆJ設Nâ8Dz…8.Â!„R XNÀB91˜ì€b –·Hä‡ Q:+ðîqNçÂ0$ZR©Z Ͳ¨0ŒJÄT@÷‹œÆ(J÷Óõt¼‚hš`„#TœrBšC!¹Ì*I†PÞñ[í]Fda£|¢W!dr#„¢¦$I“c9ñß>`_…«V^5Žr6D#Ì Ü`¡²ˆ3‚Â^K˜¸õ\îã¹WŸ"Âê>ÔQŽ`„a;dö+a ³ž. pi\2‘W€¢#à ¢;ú4AœÒ¡4Š¢ e+sÀR)AR HÈ>wŠˆH3†#]àHàqôôärõÈ‚%p·~ޣ΅r™“Ê’©ÌÚÂ1“?¢y^ÉèÚªäÿ/£ËûŽ,„A„Íe­„¨ÊD©Œ‡~T#ÔËe²¡êM¾IR/µÊj3½^î‚©˜¢*U³w“ŽŽ¤þa´¶ª/5h[U²¶Ê?1v¡œô_§,©ã©,¸$¯U.«!ÞèK‰Á7ö©¼š¸KÔœ[™(V![¬Õ Š2|æŒ0’›M•°šØLzÒ™%\®Eá.WÕÂ!ÞDj¥‰ã?¬ˆ_Td2õ‹•¥³èÆK6öÃz°Í“H”*Òè¨õJ\¦lÒi7Ó¥¹Íη'™&Ê#'нAHMÃ1zöj1Žº\Ö¡=t„'•›­¬´âß{“ŒÏwˆËõJÌ%%Ø@¢‹§sHÃòQ"…vpZÚˆë¤&fÌ]–M.e Ìν¶©}â-•Z»¹Õk¼ÊC9X‡æ¿I+%\R$CMóŽôÄÆ—$ëQ’ꦔ®Wd榽t•üý«ùY°¾´Â°B ÇP…?w2ušìrêMG"YQ5S~-t×C!Lw¤y4qÍrL ÂÍRƒ&ÈZáÈžR)Ö[÷å鿬8†ê2ÚË B„b•S4ØK£ÔÞ+,¤*sš¡¨Rè3&ežñ%©¨c=ž¬îCt¥ÿ¦~§¯I \í¥lyÊæãçñÅgoAt¼ƒUœ_¦ 5‡(#6Ìp†|D|µ‡_S}‹šòIZ‡®”×È‚+å…GßäÂ’ii®†/ŒÐª¼qÈB”t*¤kåI_Ïûy }ǤšdW”ƒæFØì¤$Êî‰Dy6ªr&²\ë(™†¬ ¯±Òeœ ðjt«É°p Á˜-:! pS‰Ùë²YY³Y‰D¾tÒBR 5ôžGÚeQ®¥tQJ»×Á˜:q;+. ¸¬½%È:õS{¿€­gÂ"[=ýŠ3‹•GãK#¸ß¯‚ð·hNå¹°ÝA‹Ê:H›gÃŒD1ÌJý">üÈ…ú,Ñ% ASªF•|ã å´˜”„‹àÀ†ڽxaÀÅ톜Rƒé(&¶é—í´žÚ—´haÇ6ÕȽK½šÈ›‚ز9¤{¤ Ç.Ó¤½¢… z1S’4×+E“ŒgF¾T¢U†T¤aØ)‡'›Qiï¾Z¼;è÷$ô…õ¼€¥ZýÎ%¿±ø¯ÇaʱtnÁJÁI!Ѧtz}€‘"\ Ùwqâ 0h-§/‰òz‘âäìÊ`ÏcL˜qÆiÐÓ^¢9*"R‚ùvg©d–HkÜ ¢­m‰Ò僼DyLRLEŸ,9*È–é&ãV£„qí£°ÙqŒOÔwrsÙÐéE4ˆÁ†Q2%šµoG÷Ó×i6DÑYN²˜Næ;ÙüB\U‘käò7™?(¹r”mäƒ@HYØR,±ãØs©3"uNpòå-wh§PãCùè\ 2&ãËÔÚ’û&Rk^OW‚Þ¥¸åânŠäAVµ0Ì 0y«"Én*6”¶¿§ð뤞å¹:ŠWö²) bN²›N0‚Ê?“å?§kTú¦l¼÷ A7‹S:ßSŸ‰:¦•Xe u‡ûŽÄa‡5:$Û4´Ž 9mä`‚ýÛóÃO,rpè ¦çÌ4Àq /þ-¡( ÆW¾XBþœ2aOÂ…Pú‚ @ÉQÇ«ŒP“ׇ&&4<Á"ïú41rœ°|^4" L‡´q °š³óH7ÄCÑŒÔHè¦]訔DÓE&—Õf6“/!Å'Œ )؈FñNT""¦&`¥wxJ!ñÂ:¢Ð¤<]"¸Gfƒ!A,&Œ3ÁŒˆ(ò<뙈F*Rè}Ô¼Z¤NaÊs°ì!š´-D(€ÉM}ïÄó‚)!®”×eEC\l@ΞEìbÅ zøuaÇbŠB²Ss;î§!4£7!3ŒaŠf"SÊ ¿`´qy1ˆåáO8æ0è…:¼Œ€×#DSUá8ßa‘%HÖ&€Çhú,(Ô! ?AˆAŒlw(G7&ÛíÊNl,õq [¡2š5A5©[0Ld¥0¨(oíõŽ®{÷ ÇQÉÆJ'îûvdCZ\Q00n#ÿî5ã ˆxš×­Ê"ÔînµÅBÐÜÀg ž ¬fHÀ·©0ÈǬéŸâ2‘Jµ8ñyPå"pƒ ÌþÒF2RaZ;ƒV%$UGйYŒƒ;Ï+YˆÆ6gÌBWbC1Þ]›h¨¹‹©ÑVq^'c TæDf@DD ˜@eÛàÅIm…j©]Uw(exAN´ i LhdÚÁ¦2BÂÉ‘2F­ ›¢²bbõ&1xƒ¹=N *‘Ô7ä/t+-i'¦† ÈcØ„¡>kf #Xt(¢ r!‚â½=çÎíù€¢ÃóΘ5-{r®LÀƒQ+!ˆ¨Ì0Áƒ:9ÛCñLö§I]øì!xQN-GÆïTHC ¨¦`¥dË‘°HÐÓÀÊ#ŸB‚r›š^q]¸ÈTˆâ^°dt:˜©OLFÖ/¬pg¨Ð0HlÙ~B1*+tnÄ8Å\/)`x•Âô¬v*8†Ê„ØF>A7cd72Í=‚(Ó êÌǧ΋f ˆ?¨@F!‡¡_|1¢G<+VÓBÑ è}ת N)‘X"wì÷Æʨ–¹p傱\gd{ !‰%&”„4{¥5ÆrmØ*ëzáœnyÙ¨•T‡™ÎcËžð‚ É‚0"‹{kUãÑÍ€…”•Äpã·.Ž ŠGà”™'!„2R@C$x24NÆ~‘†ý‚¾DµýwpTp­ÐH[GŒæ?Q”’ãB"ãˆ@ ûŒ`ˆH˜/§$dxg¤ …„r0=QHQV+ÐâípUS…lDbÖl% ! 0Ca\Œ@D ©ó´/˜Å”ª¶$pè(9GVX!º4SíÈÔÇ¡±‚#Z2øÌ †cás¢àÌ܃À®äH!Ö*ÈýŸ;ÑPg…§=9”Qœ×a”0ƒw©œaF·̱X‚ Çä ,“±JžÀäÊ/+— "M¼+—²1Œ'6A„ DC!IÉ5¦ÁœB#‡à·f à´DÂN^$°âñL„È@#c¨¥ŒjƒÀŒRT³2‘„âÄŽRØ6ª" ÖßF"‚ÑDa]ÚHÒµ)È:V56 Ć‚b=c‘HÌ2›©Å’©òªœ´»ÿd†¹À©C` ÛD%Ñ¢œEĪ¢¸{r!- Ž´[a\!ËßĦOI$™0N|¯0ŠFHX…Cat8A$¼¢48«d êãá¼ø¸…ŠâÓ~„ƜB#‚EhA ic'’¢1Š7O‹0bp Pú’•Ô‚¢æ8Ž» ÙYÐÛ1 BŒ7€ÁÓA+6Y{!Ž£Ã’”ÎçoÜç4`ºyñˆÂ $d Jc$PÂTB²0E[ÞaС $;±† W†äŒqÙð¡ã}£(GfDÕ¶œÙ èÒ„˜s\(& ̘X²…UÎð§|ÅcñZ†R—-O0†õD `D:ˆ J4F5èÁ‚›TeB©HNüºö”ˆ– ‰ú50Á$ Å! !L… H9ÈhR¦ñµrs(N¦º3ì~ ¤s)´‘»PIL”Ö#¤6Â`ÂÁ™­’£! 9E*°Më´S…aÊüùÑäØ0N$¡˜—ƒ©€01‚ ð€Ýçc¡ÁÊqŒ@p*“ÎQE ݸ.Šn¢‚"eX @Q¨Š&Àœ Ub( š3ª)9 áÜq%7AÌg´Dš×KÙŠ(ކvn!5”†݇!”™*E>ã!„! ¯å¢‚ACŠ´úó2àPýÕ …l"˜]E )z*¸„€‚ È2 h>AùY Ô[‘kf¨€r• 5»ÌKUGÎìù@Œ› $äAŒ c² c#n#ˆz…ˆDꪂÜrI3›‚ŠÍñwŽ~$S`‹‚V‘ã¦1„ rGТ|ƒ!‚‰’¤ ä+ÄõT•(J>„¶-?§Ôœ ‚ËË0˜ÊŽ&f©C6âŒ'2ã,^žŠ)SJaÌ8Ú…+Ž …ææsa8ÞeQÍìɪ®åÚ©„rø¼BÅÜrï¡Ë¾’­q÷кÈr˜¤ÿäÄÉ 8ÈÈN"Èçe–—Z AU…OMü˜†êŒèäÖDº²É®éýRáduù¦« 5XÏ´µ:ÛBÉŽåÁLã‚aÈwâ²wR­š!ÖD]vü»«k?½¶Rs!4µÂNA ]ˆ†ÊÌÄéW;™wˆÈ”5J#.Q½·-›©R¢º«ç¦*ù©h¶Y·’ï„dô¨R2ŒA(NòáB r÷ö"Ùr˜w­ VË…'-y˜‰Û†IÿÊ÷ŽLYš¼Z.›Sp[0ßg!¡5Gr‚.«3f•e»›©GÉ)ó>y †’"‚µíU¶ Š8‡ªìAÑÎ×mK¹*¹µU)â8†À¥éÿøÉˆÄšŸNèæ^æ¥è ëÂïqó(öš³’­Â!Ÿfô¸Õz8†f2ˆSðæ1à æ‡ËRÈ]·Ëkq~’vùŠbj¢E±Ã8œÎ»Õl«CÞÑÆ8àjW*³…õë!ª›|-hî_Ã^Ȫӊb•BŒQiÒF÷©;)xžm@—G·uóòÏÊR“mZ B ˆÒÆ2ˆÄ¥^æ @†m}¶–,aŒH³Hí¶zmq"õ2TP’õˆ%‡ 9…ÔÿX¡”“üb2Y›bEƒÞ‡¦nD°ÇP¸Ÿ8»!˶Ó5=†aX‡>ÊaA†t§i,o&iHdiÑV&®=¥Â¬™yÒA^ï’;+ÊçuÝÛ6b-x[OÔêr`«©! De½:«Œ’µïÄ4eÈÍB.•Yþ¨ b¼Cë¨åÌ)E¯ÖH}££Q΢œR…!Ås˜aÁ«¥MüÅ/Öj 7 Ki jXž%Я¢Ó™Îìâj× Q”‡dß QB$ܦHž!Øl=\à¥u•ÈO“ñxYZFÚŒäµdTE­cí‡¿š„“ a‰üÛ.ê Åmý«RÒY¥V¼GËžc˜C"MD¢-ÊÒí?úLf;˜Kwlj5÷‡¿Pp½XɹQXæOP¢ å‡e‰AA tɯÈ-é{¡6*ðnsL* ¹\Ê›÷ŠbR¦½PuN°;œlD*-L{Ò¸XôÙˆišEdŠ"™ 2ŠÕªSŒ…Úc›‹˜öî]á¶TM#rY)Ãj¥" Œè”yR¢ (Ä?âUéåi ÛóH÷(S«ÉMXõù…·cE–J ¢Xƒ†QB…0ñ1‚#+:„“m[÷ræoDÏ‚Säh™þdª:bøØÑ">„P æ _NVv¦DÌ®ÆUY‚âqÆ“ÝKy<§m'£˜íŠºT”öBqÂÒM,Öî 90™EnwªUº¶,‹ŸDõžWªÈ®A}7ÿÿ4㔢]Œ-0Ç£§Zìx“H¢¯Ý©S í3hGå²BNS—KßéjO¬•RéµËBaßÚ5”Óy1Èbíª¤%ƒ°‡d§ð ƒ-5_îªU¤F©Œm¶}>óØi•TLo*0‘Jr÷ìk1j%òÊ%)•¤¥¢'%n_zRŽÉ<ª!×yLR•F)‚yž‡¢kõ+tD)މ„¯4“Òt òî¢ÈÑiPÉqXQ‡ ïÇFU¼M?K%*ÊÄZ®û#úQX•çÌÑŸY…IÅR~-ˆÂ(ˆ»ZÄ ­26Š·.uÄ“jv '):ó„2å2¬ŒøɈ¤õš‹6Ú[ÄB+ŒÙ×~¡¦­!舚„A–*˜káf1HkDEIEeóÛ_ŒÇ7cظ33¡HëP‰Ë[ˆ9,±×d–Lq½±‰TÍcçÞQjH¼^½bùœišÄ9ˆp£„“æUIUylÑ Ó$¡Vm뢉¸þóWæâ¿Š™Û—YGO*þôó%=/ûJZéb틃š*™IÅ­©Ž½g‘È™®»Ø˜jQ&Oå)“ Ó¸A‰M5$¡hµ´;Kyœ!ŠcEêÚâNˆJýí-–ŠO£­Šˆ„Þ-0Åt ®G¢È«–ãXœ­ì³¥ˆP‰Y/2V±j³=8vvðEÊ"7.]ägDúÚ¼ÂHþº»Œ‚‰ù?}luuµ†¨e”©V Ur~’ì×/b&¬¿EbÏw95iA³xEFr:­Ã-ZGä!êé8»— ”%Œ6šj¹¹:æ„­ú1xcø¸j›ƒ”§º ™8–·ŸJÈûks«J w§Å;(÷¦I#þ•[§”¦j¥Éˆ•\»ÊK¿ ·J¢isdóä Ã²·é;Är.ÓY¾âyÕÕè{ Ä•3Ó5èè:ØEËjò”—Èžþ’àž[­‚–ÏÁ© p,—Œ:ÈÑ h“ój-Ži(=ßÄ%Ï‘¤"ˆ©O–ý[”µT”b: ûbžæ»5G•D»ÔŠŒ§aEÚ^Ü«­Bz¥tÔV™¼§§æ½ RÓÙ¤D“üÊú)hJñòùçfw©ö–”§"ÔNi]$_]«rŠª…¢¿‘T@GÌ jÂrP‡¥ºÊe4£Ä AÄKÞ±·X€Á¡%Ë1ºhYoô 1úJÍYÊf[C_Ù¾Ïv¹Ä8èC¿’Šö÷) ÜDc„ÎŒƒ[[Ô’ÍÞº¾gFŒÎv ˜–³x@³ºõó-âùè(*kÛ¥î8!ïý´ü´o"ر˜ŠM—¡ŽÖLGǬ¢HçtœñM¹Š«Û™˜¾U×AÌÂ<(ªA©wK¥"-<´¹pDKôØÂÌäÔ­"ÚI Ÿb5%›¬²¬Dª¥Ô€¦ Q¬!ɉͫo[¹L”›"„3óÖ³ê>”ÿIª&T± gj IƲìd2’¦U‹bQÚ~ò¼…(W“od`Lbï®Z}Öª;ë’È{d;u±Tœ¥©Là¯Û[ 7b#ZÔ÷wK #¹ v€‚Á&(ÅÖ¡¤ÒN]ÒkõÓT£‹¡5¥·ˆT,Ø÷´–L²&§ ;ÈrPS,«öKc^F±R"”¤*£2¡î%Ë›\F¡,I„¢*m¹ÐòšD­Öz¥˜&™ÙÈš²bÉAÌEPÿo ²ݼ^£)ˆ˜¦fÆò輤S(U\[¦ò­´”$–švîv3ñJÎ!2úªG"­éÅñI NÉ2kqIý÷~ÒwBʘ…ef"."­<Ä-^e3-ؤ0d/è‡?—)ÃâOßLôãÊÖ%YË:P2o~_ݪ)0…ôj´…­Ì÷òœì’ÓüjY3 ô{bàæs„@…67©uäUÊÅC“ϲòiÄjÂõK˜wZb¯3ÊBïr½2WM+jÚö{g&°MO?Îñ°½¶äåã#UC¼ª Ù*è_¸¸ç™,B‘ˆ„§D1:­¹7­O­†&¸ˆó!…lC™q e¸ÖñF½’·h0➟§?¨âwRþÕvÔr:%®'FC4¨h[ ¢Õ}¥›«[a=yêˆÂ¸¨“0ìaC.åfk!0æ§O¿´?àÏó/úkýEþ}ÿZn[QH÷3AôÃ7±³Wê:ó¼Ë['÷sÓ(ÿ¯ätäJæ!©å+t)÷()’2ÙGªŠÜr›uˆþ¨tå¥-›”3ñ¸„N˜ŸdM Ô!7øB0f¢©D©D!®úáÿH¦[JÂzf2™4Ñ;2DŠa¿9Y‹×=·ñpêu\¹ˆè(b³g!Å'{íÏÅe±Uí«ÎZؽ¼Ù;ó}÷r"±s&Å9S7µ/AXT”×鎖*œÖµ}Ä:§¥*Šv«”Ž"t©…B5 Œ¨ˆ—%|йBT5™¨ ”¦I·{58¸c1nCMRLžÂ;¢©z΄Wìÿ-єχCTEÍš‡íB©Q¯õÇJõÞ:³’†—ˆ¥ò®àùo|}SìP‡ãšÎA’F§ÉŸ1T‰ê•´äæ)DÂö¿à¢#;X¿o*ˆÄ;ÛÔ̬b2+ŠÖ)±n6ù¥Ìj9K½Š7Z‡'j&ÞFHÎ…ø‰VÈúŠèã‘l¦O)(ŠTìµÈqªV<¤äôÆ·‘ITÿ©IRkªÖ‹b:¥Ä­&}:a,ºTΛí¨Vb)mnÞ°¡Äî=½¦ Q¼^u)QNjhó•N¥35ªV ™–ÎÙ FÒ‹qB±.ùÔ"IJßÁ>ÌÈ“0˜?›2žÒ‘%¢I¹Ì„D‘ù&"Èô:TØQ”ÄCy›+¸¹GWÚ§òI9ð»²J>$ššDAHG¥ÌŽš#kîÜšO'æPè{p¥ó>-t™©CŒŽ§’!Vg]—p¤"п‚m™«JO7]NšS7ÎW´©ÑÊÊzœƒŠx‚ Q1™dö?m¹è#ˆ„³-ó²¥.á¶š)dZbÓ@…üÅõß±IôÔÂ3§~fwQU‘Š˜§våz´ÌDÝFBaSXË!²íz ßõHäóUê\8®R{*WØ•YGWlúLò¨Þ”VÏ._ªÕ(æ"`ÛE6`¨r{·I[ÜŸ„U%)žâ2±ΨGºï’Oc›µ±8#-ÄïìŸÛèZ·]¦ÂÊNV8Cá/Dê"”ºiªQXÌz3É3”^L÷Ã&­5™'z>¾ÎC žU{'­¬uÊ•‹s —ë‹ÓÉŸ×R°ìKEÖNSõx†.Ï­„#Èò5Ìnär9Vf못‰ûCõÞry)æ[£ÊÈ]­çKõ6ks˜¦*O]t‚øþ•FKÌC2ä„r¥a”KÒJ{ˆ"YȪÊPˆ;¤¦æN©¯û¯ÿÔË|C)*$ä¹×xZca-<÷0­3½HòºÎý@j.Â%Èòb³ÚJ¿yFÕÕ«&ᑘEçK#¤Úú…táh”ªiXaÏqeõÊ! 1˜†ìüx†8ŒzÇDb1غ‚IÊk¶ïñnþº•t³êØ®wÝÜ“XËdwC9âq˜ªqÈR5_y¼¹”¢þÒ¸}Sr_Ѓ?IZç¢H•J%W’Ï8…Z? u £¦*\…ù-íD#W‰C?ÒúMV'2øÎtÊBò^Ã0ÊXýJáId.úÜÊJ9]š0ÁÈNûé"$©‰”Z âT ÁH.ìÑ u?-}¸“%dâf‰KtÎ03”ÒĶç\SœÛU¼…2LKo0ŠwT­2Šž%1Nª¸#êy”C9dnSÕræBˆj*¹éîâYìšš©®™¹¹}(¬ß¨o? ”/?T´DJ• Þ"ÅRzPîWÅ¢U3iÉTh‹êC­í":«Q+\V)¨Äh¼j™¹iäôâ' ò_2tå²~/JÑeEw/œÆwã¥ÌGŠ£LnÔF+¶Ï4G3úÖd].(®ùˆ¦þJ ¶­]yÈAÐåû嘅:Ô‰W5øŸ$¥;ÞôT¢à‰sbâ:Òȼ(©·)¤ã6±uëOCûeΧÌ=ÌTqÈjcöò‚й_Ì_Ê ­ÙŸãV¬FµjG4Øó56N«”¼¼Pبßiv&rt€Ã—UU^°PŒÌÁ±(j1û²!¶.(ÆþrlÞyµuµ;©ž¯u9w_CjŠU·®GBPQX^h¤~)og2nQL6~;!ŒL¿;L³ºŸ±ä÷%|ü"ðɯAá3˜á*-²š»»o­ŒR«Ý„÷¶L!„ÞB™f»ù8šôRŽ#/#÷ñÌ>$E?HA y:+Yå+z{¼ŠŽ!f·þ-C3‹iK¹=r¤›A¹¾ b $")|ÔÈ]é#Z‡*å 2ר‹b‰z´ “Ò†2KL!ä¶]Ó®ÎÇ™JÊîGí1^Y0˜&pf)pÄ£ö¹ã•pßäÉ ˜ÅSQ£•–Ö‹[ÙѰäFÅ£9A·‹¼ñ\UX¹2sܑӵGSª̯k R&UÄÞÚõûÞr™Ô¹znDFBy?ïcû¹6ÇM°@Æi+„\»†BR’! Q†Z^£ ‰–)j‚Y¸t~¬Ø¡eTMÙ¤Ô”ø¥c÷bò3«¿J¬t”Gñ NÓŽÆ{iEkkašP®Vf5*MœšCË@ºYûa%5i€Äcmñ8M\ˆZ×÷M¢8EíiÓŠ:ŒsBÌëEÊ¥û2!‘Q®JÞR’Ôq–]™–’È+´¶¬ï¹(äÏ8£‰j9—’„²ИÒ¸rRMæ^ÔÕWÂX2% sq\äR¬þbk›qf¬Èë&¥káÕp%L_7¯ò°äS­È‹F3ù"!7jì”)hÛ+$Æk1å"¥>¥DÎ#z" qD2#ºbœƒ! ZiATA·è…ªÉGÆÞäÎì«Ut#•‘×z}4Å.RI?ÚäAÎnöÔK½k¿™*NcðÔCˆ‚º>ï`Ç!ŽÆ`™\ÌÌÉ™ûØïÿ «Ž¿åtÜa?þ¸‚) GªåDÚ"Œ\JÔöÌçÒÝÈêÃTœ&!L}· ½åtÔܱŒg¨AH–c°féHüת֤,¥£!¼šœjþQ:JæájÓ7k¸Ž ä)ÜJ’@¬†gþÎYLC> ZëåI3÷gâú‰©Š•Vº&ad;ˆT±1}œ‡[uly ˆŸIO= ò¦æçâL:]ËwARS(¤LÄmû_óµ.»CwG'n“ *HMû•«èÌ™¬1Ž¥bª7•J/Ô¶§ú!2úÉ®§×¡¹ê©†õó˜•QQœ‚Ø‹#¹H•—<éÇB'n6ÑžÊk)ÿøÉˆÄ›˜N©ƒ‘ÓEå­š³’õ›?Áô¨|hn…ŠÉ¸'/1†’›\ Ï&áwÚ‚eQŒb…)¨\$J+„\‚… +žtø’X†¦í³™¾#4¸Ô!¬Jëß„*[Sq÷$QH|ß: §ËÝ0¼–ZÒ•+iŒC…(Í%X‚tù{j-X¢ E*1ÖÍ­«ø]5 CóÑD"ÐÌ9 d0eÎá™vl•´i,Ú¨ˆÆ»ð³éÎG—hm\çîååR˜aN!Ëíc¶d÷¯ CYC)ˆö‡;OZïKç÷“SK"g¨éK¹ÊIâI昵%©ÛÈë‚·±lÉt¡ÓÄÝÎ!»äÁ:îðŒC¤ ‡’<Èý+•þ8¡‘¸ó¦š­ƒZ©W*+¹D1&3¢#¥¸WRò#ïiÅÒs‘T©ž•7xõð$Óz”Û“ÞÜ¢¸æ9B T´BpX–C"HaS î¨Vûï—ßO”ž¬¬jè–Ve+GAÌ”2£ ‚ׄUÚQ*ÇêÄw“ê!— íyès|´Ц3•ªË´ÂVoiYn ¥;\*±ú\¬%ÿ±:•±]”Ä3»1L£„týG½¿ccéNmäÝNGòþZ7¯YäÓÓ÷2„H2N£ñ !eòNgË0G!˜Gµo2;¤}ª•H†m)3y™2¯¬šˆCóö§bzÐÉD­ÒCcc¶pÜ'±´÷nòižì ƒ±J_ä¦í,Ij‚¨)–ËG¯´”‰d‘)…º2ƪr6Ñ&I;' §,‚T¥®í"-ªZ¬•-o½Î‰FçäÕ¢;ˆ"ÐAcþjHy(ˆQ¨‰²¯ “c[J`›ss(”OC1ȧÊ9*A ²ã_×hüD'¢‘ÖF\bµwîüôè´ÛW²c«8+8×:))¿ƒ5O`¬M•P×ù©­¤ ˆUV8WÔ©•¬©2NR šp…Ê.o옺Eº™õ8¢èJåye¼½Ê—Âgº\CF aLRëéONË–ÍQÒDã!ÂéíÆçÄÇj*½¤Ñ½øÄ&Rí93¥“RûMç2Ù „%±-ýGÊÙñ%k%³VGHæ#ª÷˜¿4JÔJ£\âr™º©´zM‡.&TŽl«UP‰bgAL2•|uÑ?7ßö{5‰Åd"<ÇémŸ”äÇ'ØO[a1ËÏáq‚ûs?„à¨Û¢ BˆãhŒnÕCw‘3ðG²^‹D;2ŽÔH"¦?¿IOgò«õ¬ã!’:£^L“O&sz®ºÁL⌄âQñ>‹Z“ªâÕnÂZ[<Æí%ʇ?)x×"QjâU}…dKQ*.rLÂj1»¸×ÁäWù¹v«§>úiÞgX‰(dTب¯ A9T…ÃC˜r.'…NËX˜~µ‚b<…âVŠqVÙVSÕ(ôâÄÚÌÂ×z¯Øªwó?¢c Éò§!ùcÞ˜Ê<”˜QÈaH’ª^·ºXû£‚ީ鍙%{ªÖÇc¥\ÿÄO)Iùrº+1f“×”œ›FªÐÔ²å±BøšHÜ…oíiDAS†`‚5Vô+sc—T8çbRrân²{[æ,ÉË'üüü«»6³ÜªÄjÓ)ÊTóUïA%Qæ|ב ‚êÙ]9°Á##qÉô—kô)‘>9¢Ôâ­in¥²}ÝbbÜÅfv*‘ªU˜ ¢ˆÂíP¢Ó«Ò­¬~c1l­7üÕlÕÖ’zG¢l¨(猋gëU“{â”ÅÔ¡ËCyÂçSP’j2QÉÌGlÊfn,+Ñ‘}k…¨²8´.§(„#l‹¸½I*â÷Ò¬ñ¢$WB™þ•ú~³§ êEÑ‘œO6 ù§&!ÈUý‘vœÝǺ¹’vT”ÌÄòHO¾òÙµ´¨Úý¿Ôÿ|wB-|²®2«±ÆK0–-J¶­|ÏeÁ˜ è2½Ç#j„ÍŸ¤Ù›sRB±7ö#êYˆ… 1Ô¢9w¼Þ§Õs©0†q¶Å‘)Ÿ<^ÕØ›i£’L(í-5ÚtÌðS™êã]íàN7UèøBŽïDr¤ê17”å#Q5|v’ÝvíÙ»³Þè„nCîÿ[dÐÒsílf•&QQ̘OFæ±|PQTò°¹šëOdleŽƒbÓéëm›õÈu£‘ÎÔ&”ŒÛQwG©¸«šó)pAQT‰].¨¢mVÅ(¦t¾VÉ×–ŒÞ" ˜"TBQæti(-í7 rÛ8Bx¤=ôò±”p"4L˜fþÇoù=Df³®“:U¼Æ©;:IfõVýŒBLq M­ûjœ­årœr)ˆ¢?[OÚ˜˜©f]t‘\Þéòo]èÙG+õ—І?š¾•Ý Žb9XµO^áwé@ø/­8’¢z0ƒP‰[r¿É0¢rÎÆÃ”g|Í·dÜDÖíLu×<Êé%È*LT(˜TV£'¢z溶Zˆ„—¯äÖNÜúf>•Ή×)ØPª¿e±ðßwú‹çh‰)Êè.M÷Ìzá?Ú|Ç\íâò¢©BŠèÛØV2s_D£? ŒÎ´ðé¤(+#âîfÖãÑñsˆ¢ï2´’ý•Ž]‘†YH]})ç“ìDâ`„V/"D2¼Gs…|X¦¦Øœ_eÞ%–ª­ï¤¶WÁêÔûÛDÔªXšœ(„ TdKêdÂõ`ÎaÔB&¥Ó¯Ü²#•|‰RîWšÖâV{%Ûõ†U>(gZ¶1èdã¥Ç誉sæMF¢ÝèTªx¢ZSRBßÿj¶a^Ã%]';§’O¬ž¤ñ<¿Ej­ eÌ8ªA‡[Kª2ãk‰É¦ùj˜)¤¨âGs¨ âÓ 8f‘€ ÆuFªüÐMŒÆ@Â4èÖúü!ĦpÎCˆ­i\V|4 „2?›­!¸¢S>Ú ½ÌÃxU(P*ÈWሃ¯(@¦AB1"? +áqVŒ41…àÐ`Ô‹’.ÇŠ˜`Kœ8„Q†e Fâ9¨‹¢ñuYDŠTYH ˆH!”ƒPÂa°µ)f*PœÈAÄ£añn .Z#§8îWÁv.ML™™©¾j†[iÞãÐä!„ƒtâˆX*”šbÐŒÄÅ £pÐ;¾ÃC@”a ?ä ¥+ìµ°4¤¦C~&  Á‰> š…òΘtGÞr«‘–?¡í2wú¿üõþLÿÿ}ÿº_Û_ím ÿè\»ÅïŽ>|>>À2tÅL|Fˆ8 Å0*Œ~0Èh!5јp˜dãw~­l5E) “nŽx#Òâ&¾¤xgî?!ñ•|‡ãS¶œ!+ƒ "¤{G×2¢ 1©U™Ê©råt ù Løœ‘Ì1a@¬àÃÃÌ5Ôņx!Hªn´qI¨=¼EpÌaapAÉF ÊB0n/(c5`9ø_h0Þ¥£†~>S?#- Œ\2%°ìrЄù"X$<\ oA&”A0˧ƒ ;Ô0“ë¡ÁOØ`j­ÃŠ!¨+ûøQˆ%¦8Ƙ58dpj\Ë ¯CÄKp⎱ ÐÕã}ÇWCb‘µ&Oà€b!]CPÒÀâ`F'!ð"iœ ïÙ’9ЯÈ0ëÁg50ø‚´FB¼6è¹!—3acv? OŸ± &2‘„¼"cOÏ˘CòeÁQXÇéPÌT!´ æ-! ½¿!ŽCôêæ™ˆ~¹Há”%\ÔæPÐÁŒˆ)1Æ…Bmˆg§0qŸ†“ܦ jpIxœˆN#DQ±±K›ÖUL¦J-aQ7$AöA D¡#/t¡z“ªœ^Ã"OE)”r:A Ș Š•l‚ Ù±0LA°O¿©¨›©? !’¿ÅÄaxr$â‚ØÆa 1D¦* ¤ÁQz‚PÐŽâ’ˆfƒrÇ¢A2ôN ‡1X©Œž@ÐvùC¢Á!ùªš-,gd'6pˆizw ØÀlÆwѱ’í¢‰^9‚£žþ†S{øû07A  Ô”ÙFکб…!Ê+,"5Ò¿ŽY%PŽ50C˜+¯CPh˜ŽÎ2œ„& ÆFxa;pæˆ`$0Êò(«Õ„{Q!1-CƲŽÙ‰B/-Á& Ò­ÝwVÂ!TGB Á0x‚d& ‰@ˆJ§#˜3¬9@Ѫ”æ(Ú©DbC‚ÄGÃa`ÏÉ‚0Â;z4|"²Ò£Ñ¢´Fˆ¨3;Ña\ÍA“ lÜ…>á±™'Ÿ1|ƒta$"÷¡KçF5ó"suîlVÊ5&PQ$B‰¥F…¢8DK©…`…1 ŠGN(¢ÄèW"ÓB‚ÑU+;¥ 4' ?B.â ƒ`‚B J†àA~›°É¾0¼]€¦6É•X®ÃÉ ‘=âŒ>¯ €ƒ9Š9- ±Ó7ˆ!ðÑȃÙ`QÜ]±H±F¨ÌsiÈ\w$#t zq œ'Ì–7TteL M‚8³Ã0Æ a ‰ †ìä}s(µÏH†ÄZ´*qÔ-Øc±(ÌQ Á Gç\a‰¬Gõ\Èä(Xû¡QúœaIXÂðª3$dÆ{Qƒ%å#´í&1´!&#ü|Cؤ‚Ø@„ÔåÌÄ5ªÎ$UÄx,P„’•â¯a’as30昌f*ã+Q™Îϸ7f&o»1sí‡v#É‚YUÐO+ܹ) 9Qš¨»fÿ*roЪ©o¯ªI˜ÎL'W%:û~2Ñ ]V»$¤a ô7e aŒ„ÒúÊ9DE±Ð®¥§czmy<¨A­BáF­ÐÎkîÛ¹éçf3ßÒ‚µ,¨s“Ó^aÑ;~‰;¾rÙÓ\ü#™bò¸oD"tI3÷']Ñë[|B¾–øD¡C”Ίœâ¸Â¯ù],$•YŠû ù¤;“̈́ƨ[ë]ˆÙ^ªwíñŒE«!Œ+Iï1L„_©Š'ÚÔb{nÆý½Îlyh*ŽÒ?ç-x+H¡{6A^[~D.ÍÉEMöOb³Úä2ú°¡J„Å ƒXê9Ò̶÷bi›¨ŸˆAW)èQ|:íÄ¥‚¡F27 ‚ NŠÊM{ _A2q׉Óñ;а"”ŽÄˆ®¢áê ÊZ¤‹LB$†HÌxáƒ;YC`G¡QK\t'%sF N ˆƒ!8c‘£:A‚-°Ðº«D#›ŠBÜçÀa$R28¢¡1ìNøHm%;„N)“ÕlE!DLfšÌ­—ÿDgúšRâsíˆÛ¬ÚŸÿb,„¾áG£’‡Nì­òÄw»\Ff´B\íeXe@‚ˆìŒ¦Å ¨ÕÃÙƒzÔ‚(”n’»øzÏÖöòߨ̻~gj§ é¦.9,–"Q{Ê) BÑ‚«¿ «1Ô¨S?®¾…wîJ1òcXç“)lâÍ×û=Õûù¹›3®92¬qåêˆR”‰ñŠæT½åiØ©ˆzK2‘—7µ³…ß!U–lÙ†²ôáŠfæ[ëÄ÷L©ûeJ½í»(…eù,gvWùŠõ“©ªSV´L¹Eµð–{›ià>}ÿøÉ¨ÄœÎNótñ³ð•ð9ð›ñ—óô«³’Ä!‡jôây¸†@`Š! ¢*‰jÈcù… ¢: 4ÃHDm*ˆ\RqzäðŒÛ9󈃈¸ŽM͘µ|¬èÁAR/JK3@"f¶at¬ S#§ pht ]×£äL£‚lØP‡×p‚ŒfÁ†pC¤Ò7daqL¶Gª ú±'ùx}ÜÊq¡ ÞÀ— ;-"N6†® ºê!S@aq(C(Áwîæp"’òø€æ§Ü(e3(CŒS ×CA>w >(Ú#`¶û)ÈÊ%@ÌeC„.@T¥@ãb“*" X ¤C|PÀà2«1L9’|ù3’fSa`½ŠÂ²Ô9 ð\1LŒP„fy!Š‚‘ÍÉ!s±ubá…$AÈ%èäu`´ý&I(fÉ ¦ ›Xè¦u *AÒÜ&FÈ µ…b§/ £¦)2±Fn è«)–”XšVÅ š Šø`P‘0‡ä70œŽÔŠzr2ÀËÃ)Ä"—Q‘ÂÙñ`Tq†  jS-BÀ'¬½øÇ(ËÄ8 ÁAÌÌÆ£aòË C<Ã.rGå cr`Š„J1Ô@ä‚8ײ4ø©©¢HÃÃ;ˆ{†1Cs"ؼa¤EA”r2°ðÌŠ‡aHàŠ‚Tˆ¹ ‹%D¹ˆS9‚¡úÆæiTc×Vy´BvpeIQ•3?2âäÅÙ¹"œ8M Q#£ÂŠæ^JCJ ‡$…¹z„o¡Ú‰Òqp­¹ìêw ¥²‰)ú§ö*ó2´\n"QºÉò>„-Ÿ‚s''3¸“Ÿ!´gòz›ßÅbÝU*oMê–‚¶¸•röýKÄh„Y‹:-Ÿ®{T5¾n"™ÎãÑìz „»‘IE’ ÞŽRÎãŽUÄ£µ^È…nnÆÇ¸ÍÕP³¯¹jRú§uZFJ¡‡¡¬·²ñê¬McÔIžÑÆLv!j½pM]LlVâ5–w³gs¹v%®@æBñZC¬K Q—Ì74~+µh}r‹!¼„ùSÊÂLâµÞçÂmBXC{$‹´ÌwŠFÿt"g(éÆnJȆ @Á Ǻ‰=…Ì †ÉãÝC":‹Ä"?!k&ööY$;È“éF›‡HJ" ^ÙeÈyï09ƒ´W¦ }“²,MÂ}ÔŒ>Б d3sÈîæœšå(‚Ýq¯„·!WgD[’·NZ Éé"‹!r”ê¢äÄp—jÚ$²² Ò8hЕƒd‰HÛ„–T ‡(‚ ã¶$q‹Šª$æ¤¢Üøz@–àÂxÄ0Ò>n)pRep¹¾Þê#aÎ3P¡RæºñºR¤‡ñØf ŠÓ3yq§®ËKuH§Ä«D=—<[ÔÆ+¯¨ŽD)ªm— êÉSΚy­œW]y’q##ôºÃ)Á‰úq&ÛA#l€£’Lè}U„ƒnÔÚìEŽÕIùL†ËPO15Ëvõ%×&ü¥bË!L³Ät–D‘µÞÓ²©X¨)ܔԜŒUB]„“¨Ÿt;™zbnYž%ïHjÔ)MH¡Eq\ë%ö8Ó‘¤XÁ"V‡'ËU®MžŒ]$¢pâÎz¢"jg÷–u’¤ã0œN+Ž¢q"^HpdT#ŸbxUQe¼XÙ–A"$¬æ8ƒt•zË£­ðÔZT²—÷I?T¿i$¼î{žaßn™žyYt¯Q˜+Yô c à °Ÿ8@&lX8f˜WhÓŽÌýydß—*ÔGÝ3Ø%N$£XŒM k±ŒÉ±q)F>k§Ü´&Šäi³ž¢–u¢:>¡q0Ì–³½5âÜqÔCmÅr,È&`ÒÅ›ÊÆá¡3Ī8¥¥Í9ù¶â}ô,SìN©rmÉ>¨ëXRúôÂÞd#R„Ý)™%:#Â4áÅ]y‚M]˜ÉøCŠ‚²:Öö’’ÍÉqY.W¨äûؚǑ; •ePŠG/lÔì±gäo ¦IamàA„¤Ý‹­“›ŠYØ@Êñ6dÏšàü b;RÐC~å+Š’|£ r6‡wÀÈĆA+!LºJ§3ÒÜÂy¿âyAvŸUÿ)[BÅtÒiÎè RÜä˜!Ž)^Œúiä’Pë/“]–2ÁFšm¸x)†‹ä²È÷–˜×êX öRWSŒ›f(Fcq„Zó_÷÷óáí,¹9™Xe¨ZKfrÿêx‡b ñÏdÀ†8 yä±.¿“ÒÄÚˬ­oŸÓ:˜ ™‰¡9Í«$‚DÙÚBÍ!DŸ·7öN-\J ®¥™ì?hç‚’ ˆG¬Z¾¨:oÉd¿Ú‚2ƒz1HA ›{G…¬"E,fTÁÖèQJCáF¯ØìoÂýbÊ?ì’5“_ôµßd¤Çk<‹„Y–Ãd‘ÒPUêb ,CÍÎKÄ! ò{Þ[aM)ì•RY“ˆˆKw­·'¹A‡H”ÙIËL–h Φ¢j oæò¤3t¸¥Ô¡š)D=¸¤ú éÎùz±ºÎZžÔ¶© w‘7Ó›hFs8á¾U*¦¤õzb(‚x•Âð•ªm.ãz Ž”L@«AÆb±fKá\0Ä8œڅIü"àÕ„#†<R4x\o ܃c¹cëD!ìíò’ã è‚†¯,®ljúM,Ê‚»´Á:Åãg¹Ò£‰¢i?Í3œsxm:5R3¦^s¦‘ü‘7ɇµMj]*:ùÔ(€ŒR£#QÉ"[ÍIdÂO»“~ ¼FSMÛôÚnRÃ̺3TF²ÐŠf˜0­ 0A£}e´Vç]êÄaª ¿dM ë“OJ¡®m•·¶ì\Lv…#¿9Ä{ŸP^QœT²V¼‹Z- ‚p+äi¨-«¡î̺ɒy$¥'"¿ :&õbZ#Ýí"‘pWua–¨1Ç>ŠRËK2mEŸÑöy¢’Î÷-¨& »Ö e`ÏÄFZ¯ã:°8G J.Ö[dÉ Üä¥L8k?RO—‰õ7†"ðþd±òõ·yšë1ˆT–…Ö#Nˆ!!L…Jº`œ¹K69ªlç¢ú”NÑ.u‘8Ä ÜÞÊAc*Ü­Æ«hRÊ»‰²d|ÊÜ™„uâ2™©ßã_ñ÷úþ ÿ´E€_O–ƒö¥2d >'õ9ùðÍTöÖ8BC]ª«¨)Þ‹¶…&šMÔ6È­bîgæÂt%Ê2&TŒê³y—e:2ÚD\«’«K[¡J7bn˜ªcØ”L½ÊŒÅ~÷oa+Mj9ŒF×Jßv•!¤Ot£i‚0”ü")T£Õ ºié×(ŽEo.ü’¹LšÃ0é…·À†^F±Èêú['èF#ÒL[ÝŸÓ’¤¤™Ö ˆºz#ÌLÉ «†b±U³9(oU㈵]R‡.yJ*]ÚLÂöDQUš·¥âQÖ¤—Võ·y|V×±±˜µ·άuRµ›ˆ;••6ˆwuÙÞé»›Ëþ"ŠŸyd¶¦Üø”«¿?ß{šÏ2êb£Qˆ.ˆB„HìR­ÞG`¢28Ð*KbÓ×nˆTÁFÅ¥™Ý‚v7 Éç]jwj2 ëêR„ Ü„TGMAMÄ#A€æXæ ¿g̃oéûÈå. 2:®TÃdØÉ‚P0ÜdìE¦˜Æ`5s„ÊQÇ”‡íE˜® xé[ã%:?lÊ@™*™a°FA‘© ÄBª1»bjÏd¤Q¦%´¿†@Ð …óaår #†MD8ÀT"ÐÆÙ¯²ÐDbdRðé«(Š"®‡rÿª £cÔ/ÈA%%b"Bb -·9.c m¥:Ž+ª±(1xÔ…åö9:ÅÉ“'4Ɔ¬Ã|"(d#1C¥_¶™IÕ½µAqÝi!̃Þ/&!ACV2R„*ò™B¯ËH2 e"Äc."cBAéO…¦Rüê^ªwzŒ= ¡éJHJ"V†€È†DøL& QÕÐ)Ñ!F…¬?AáÁNPz°É9…ZðDl$ChL¢p„f73S3¡w|Oš: èéPy´"±LT‡¯¬aƒ 3ðîËÕ Bµ5U¢ÌPÅÜiIL c8EWûÊÅ"¦ñ…Ž¥SÕ_ÁŒ¡[ì† APM†Û%Æã@b7cúiS÷|(µE©YI²F,¯uc8EMQÄëÄ¥¬¦zÎDx;RX˜ªàIúè4V<‹D18!•„D1o Š6M `Ü܇"ŠGøÈ…&aá—:LÈä2À™Í¤ÝàvÎM–~`Q@Õé„m ‚’ø¸FU0øEåãNU£‹ÇBR²Š`"'0ÕýœƒAb é´!YB2q`ýˆC:ÅÃÌÈÀŒ½¢àã8B5n-Bñijá‹L1ƤTD¤ôÄfÃl7›#x…â"ëPås•/£îFŒnä‡Qáά†ƒ\Ù* J Ç‘S) 4 pŒ°ƒÊM•” ªã»‘Dd¢Ó—”SøA!bP…Ì–¤]„#X¬"!ÎÜ0•˜á2Q»PØgã‡JhÄHˆbe-¤Ç'0žW(fèrÇ HtC †+03ˆªÓ#Ð"2çL¼U8€˜#aPÇPU†¢:a¿ A zãf+±Ñ2AŠRÊ«ý£¼§Ô¦Ç†XÉÄqFFÆdjÁS­ëxA@œ¸r$d¹Z Ø%Å2y!r#‘…'ÔÔæ ?½VʆBÌ/5 Á°‘ˆC‘™ lCfD9>•ˆ·¹Nj•|x1VtÜîÙÖ!ˆn|éã(ðáS Lk”§ä%¬ÀŽ*õÕD»‰OzìCã4 ”»²ÀR6v(‚]Û>C³a60‘†?rPNaBcä+ÞÄ1ŒV8¡EˆíùÈE#©\Ûff#SSBšA‰AÙáþ“Œ"v/ç ¼íÍ7\vÜÏ^3lÉÌ30Â$Ø.n ùŠ˜ÂQ?Š#”ÿÓ+nÂM÷1%" f(fj÷e+.A¦ûúW‚‘Ó ‚™Ð‘ºD"…eÈ!{ä)CŽáÚ ®¬$ŠeŠŸ‘CW°@dpÔ¡ ”e60¥HA ]”1Š)G´"9fÁš¼@NÓâ0öƒY‚ 0ÊPUY¹ihÁ³íŽ ‚¬Æ%W;!iÄ1T„4¬Û™+V¦¢l#pÇ0(¨=B PÁŒµÙJ0«*0Àg΋T1[Aœe¼îü§É«ˆd…TYú3!÷RD ‚JÉIô†q˜hg>¼W­¾jÔ ‹Ë65JÄÂêÍœLeSY*a«ªeKq?*‰UÆdm9$La(‰˜…ÌJ¦T#¡Hï‚IýQE‹#í ‰" Oåëò㬮uñ”¨¸…$¥¢Tt ‡æJ¯X½©Jê/R|ýë•;qÖ]­»ü©Gaʤ'q9\˜Ö™úœ¢ ÉøQR$KÅÂâeeº½»Y{ÓœŒòknHÈN©Ì;¼ñqž!öIÆ)ÞœŠ+ÒWD+õù1²ÒC# ›f£S&ÃŒº—W_-žŠû¹l c•ðnÃ¥ÍJûœš«¦(¦¬º¢0ËÈB–JÖaÂõmžqÄ;M‰'üÁy…e¯Ôf~óÔ#0„Ö ¢¥?¬2Ü­÷*“KZ²© Ú“• „eÂÿJq‡Å&njŒémRQÌw? öª²*IŒÌ–­ð¦©lª“”ÊZUHÓÿsR¥#ŸÄ"×”„^‰o°Äþ©SlŒ*¿z.™ ¨TôWEõ¯‘†k†¤ÝAPJ0ä-vw nDš±†ÓÐFì üc™vLµÙ”eû™ Æ×ÞhÕ˜U ÄĬŒY{ÊIf¡ÎÚQI¿ìÇö¢§Øb0’Y2D6ñ’¥ò*M•2`œŠnqކ£ <~ÅÔJ¸3šø²Ü8§~Û<\c©+áÐrŠš$Oò"’"ä‡8„ߥ)åLB GS³‰'¼oÌ lÚ_¿4óù R.Î+-­dj;MÕ9¸ê2áÈ"îZ¥íàÍÕ°QoijŽ¢|+!è©_‚µrS"1±JªÎ¸®'ÚàJHÿøÉˆÄŠNÿÿŠÿxÿ’ÈÄų’Õº"póîyxysÝqOœVG»˜ÕýŸ‹bÒ30™ôÎüÁ†c¥†S‡Yoªú ¤…Òû=B I¢æG¡.¥y¤v\É,GH‡ñšåEó©X(“D´Qf£)®êè•\“‰Lì#(!ä^ÐIb_ 8ª(#GžÒM¨:‘l.ªŠI}zDÓ…%SdC£¹Q.±IýšcØ’++Yí•åz«Š7ëæ ƒ§ ¬ïM(ˆ:R¼ö(XW±Ú¢Ë•TwT{DC²Œ+Éo­¨.vP†kˆ¶Ï¿èÉÊA–ÂÔŸ¼ä±Ä ycG˜ÑRH…™2eû”—´ÒxQÈpã$Ð,÷´<€PT˜´ °¥…šê’øPF–`‚•ñ†“¤ ›#OfG,‹Ù£+–1ŠwºoæDß+ !}Äòzyî݃éQ1¹…ÿc.í„tEi¢z¸ŠP… “Ï5•ÂeÞbü¥(R$µÂÞØ¢¤E BAûz_ ²10‡ ¡|ZlÙ‚©Qc,©/æ_ãb^й[HWПºN»}Ê)Þ‚ÑM·Ë1u”ºä;mnLý&`¤!†ñ8T¨Ö@–.d¶V"ш~tñ¯cÜ’1Tµ6ø´ÁøÃ!–aà.JQ$<µe‹Iº!Ä ÔÌ·°ëHßëRÜŒRP™˜‚Qt†;"SZŠé"sC%tO)’É"‘ñ¨M~˜ØÕ)Äf[R-éG‚ 2$B1$Ã<¢ÝÒ¡ófIRcGn %7Þ ÁJMŠŠ—‘>˜B(a[¤§#c&î&…78«l (Ôü ÌÞa$IKñY)ÍÉõ«ÐåœfŽ=s&"Ä%¿¨þÑ…YßÔb\¤£\I „úb±ê´ìù£»5wl„u•Ni$n ‘º.b®S°RNR†)J‡ž%¢Ê0㆑IpŠ?‰!Þ’9ß…M¢È5 Äjç‰F „%ÙlLÑU2£=ˆY“Ùð_-Kš¤k¡»wÈÛøÄ¦}Œ£®È¸—ŸY,Q\ä{2öi\Æ¢UNb!¤HíÓI!2´Žq “0ŸX¡§¯Œ#EIмYtÕ±§) éSìÔ$ˆÖODsWTû®¦QOóÒ.Z‘_EyXÉ#U°òîu•BŠbi•Ôüg-0Bº¾9j\ºYÐ#kq8¿QŠæóîJ™´R—Úº-VË!Wi“¡‚‰Ñ1ÈRJÁL!I0‹t7 AÊäA?¥]8.¾ior®W‹‡·59D3³©TœBµšÃøÜQçÏ–ÿiMÄQÑ0ò R8RáfѦŸt ƒªùLÕ%„ȯ?ÚPD#°Ì–a§µ¬’VÁ•;„ÍJ !Î`ÀbYk ÝMV©{‰fåÜU¶í ƒ:êW’þa q¿y9H+9%1›V©×¥Ì*èÆ¹ö¿û5Žv¢Kä®KÈ©øP¾LßNÕˆk8²¶#ÈVyDÖ‰Ò›ùCU5Ça’aï–ñ Ì#)Qg­,Ùšf.KR2«8B§Å§&ê;ÄÆ&„ë§íÌêc5MbeV…â?X†!0\¾+—nR=5毠G@„A« Ñ$ ñÄ`ˆb•…—[5¢†&]]<£‡i=bQB)Z·Ð¾^'â a‘(Nzî(ˆB» LÉÖÒÊÉT,c1C_†ÔL»"œÌ©C_©Nº˜sÕ—{ øC1ØUyCóÖÆ”Æ]$zPºÜ›Q"‰!«ºJtÿ%(0¦@Lß–&¬!ŒB;’«a­Gç¦XBT…W?êµ!Š1 ȯ¼|Ŧ“³ ÍÇÿ·2{ÙM–„)“0ß”B‡%µåtF3MjÔÜ‚ë{Šzâ¶¹Ý9ó…ù.ÌqUPÇ/GçÒ…™xTç¡=30µPŠÓ0ƒÁ7Ë}ǵÈÉ#˜ýKñ/²T¶’’ÖUœf^^®,²¬µ<α AÝâRL!Q…K7ÈJ\tá=X‚ZCÐÙ˜—FL%_Â"¦Üšì"²~žï«B f/ ±­\aBé%­—lã •¤@j ¹}.ˆ´#!¡S=}”«+yËôüÅQ‘ Ÿã¢11z©R`­Š„|Ì+çSBjÚ´§ñ Û’òD‘þbÒGó#ÅQCùòy.ŒìT¢ ¾ä.> ¥0²¥¹ñK¤ã4V©I­Y§åˆ¨G•ÐÅQËzÄÚø*ÄA‰4Õ5Äû¥Â“ Ì·ILàÆ@jÏÉ_ô•I®EuQ tu§úˆ\cȽgõéî¸1ª¸Q%‚=×ã *¢/2yìêþÚ„ï§2?øŸêßì·ò›øûÂýúZ"zLôX··ÿƒ;íƒ>ÏLìWצ,Ž„¶Ð¼jaHU®¹("߬)ìRÓ¢-;’Ñ< v-a/$)zÆd̘è,·.WèîÃUö·5Îõ=¨Ø£¹ñ´¥P…&{ºàâ¶—ˆÚvÌWryò7dNâitÿŸþ‰UÚûº¹ÊÈ…ˆ›ëg.Ž[Tb§–§=z)+qy¥a$Þ^øÈjdÈZF¯èŠ¥ê$Øs¶Š“P d}ÒŽ¢TŠ«Tˆ^Å1ßb•»LÄbt®)i¨ÖÝ?VWïìY&ô)iVe½bÛ•õ Ž"J²­êÆIdC¥%3„¬Äìê§ÁJøMÌ»©]-ŠÌüTl$¥bê«t*loõE(¦Gï[5pB#æ†åKW×ÔϤå·µX†˜µBÞh®ú‚&5е~Ç*òŒGÏM'¤ˆ©ôE1Uˆ·fð‰Ôª3Öæt—LFÄn–¶.®ª—Åw;чÆ^z!3»eWˆe–I!6‹rŒÇÊE*}{ÌÖËÙÏÚâS*Ó¼ìg $Æjm”…ë•JÙru4eKä¨M©Z_z±÷u œR¾d§9R'¬¯û‰nÛŠùNd+Õ.u±ªäÊ*ާm!ŽÃ*4¾)‚¢ú: k𵩙âg2W;v|±é'9ˆ›~áb9‰"æ3;±G3þÈfTx‡Oâ,ÄRœÆT~RT²Tm|³**[C1ȉeζmh”R¬D×Ôd†EdÝr*¡š¸J9‰œ•ý÷¢u‚;õíÕë°B›Yjl¹ÑÊÎ¥rµôßÕ²\Nf´ãQ•ìõ¾+?¡¤É1¨×ðüTQ,?\n$¶A#ŒCÄ Ä«1PÆ6gA+7÷ ÌB-u8Ô¥f Åk.j ˆNr;äÊÄ(¦ª2 g×à”{TìL·aLQ¤…UÁ“йE˜‚”ç\1 H™"DãÒšÙCsvÐ8—¡* ¢Ó_ËYB=±„ QhA©*(2Ù@ƒ Š3!`T£ ´CGàS ˆÅPBï0Çî"%9^¡– !¡ ›¹ñ ’”#`Љ@hÂr$‰SîD‘‡@½[ò°¬´ó…‹ÆèZ) H%1~1[œ A7jŽÂ0˜!Ð=c2‰BF?Ÿeq|%dp„Y†êEm>þ¥Â'µßŸÖÙ^& •±‘²;RLAEBPŽW”Q[˜àdÈØˆ$rZÔP‘42d Í£{U *;2Ê*)Ùv9œò“°ü¶”Ö³Iéäq™‘ØÔŒaâòµ#Ú¾{Ì!ƒ' S¾RíщØé'(âúÆ•GK”h )xŽC&чž>2^¦°2;ê$ØDL£˜„3zòŒs¹¸0 •9‹ŠQNô‘b“vut@h1+-Pî• d8Éß©c„]¾@ƒUP¶‚a²¦‰Ò˜#0Îà F©ƒpŽÄÀqJ8 A•ÈâüæÃ z‰X$u9‹çâÿd[ˆf¸ì6!8AÐZŒ¥8Ì`e§(aªaÚáh?»½wD«é(bŸ @½E/aˆ „L¼2Žäpc^ÐFÄL8X .HAæà†м˜`rÕ¿îÆCzáhÕ¡›2d*4¢†+°PÚrŽL&/¢‰Ùxå•N/&xø&­ÁˆHŽvR¶zÁIÍF 0EU9¢@õ—idøj’èB¢êîADß =pÙ²†|Q`…dv1Ln$ ÇgÔñȽˆ7®d=E’ Ѩ`ÜAQÓÿ€ŽÆqRtxFd"å!–sB)£q a/ò›„®4)H9вŠ– ƒš#—RŒJ,x̉ œÑ•)„%˜)Z  ì¡˜‰·A(˜ì¹8h¤¤Á´hqËį‡+R‘G‰PÚÐÏ@Æ'«¹¶ƒCª…á;;h1>]å@¤Ñ¬hxh005@®¨%Éå<;ˆ£ˆàŽ_äÊ/ìæàŒ=J¡&À&Ð P¡1;S‰ØC¡¯kHÖ…µ5%„¢‡(­Â'63)_28VZPv@@ )$$z¦pKL…·ˆFBÀqÙxÄe…Pìøl –©Ü)ÌiHÂQ S ¢d€3qÆßWr¹Þ$?*Øö0Bð*Ö8¦ÑŠ3ñó DhÆ"¨+A|«NÔʉ¡¨B#&=2&!ÌŒwÔ¦aúìÆ&sÊ µ9$#™4¶!šFÚDz%ñ¸Ëïz ‹äÄk"ñ+†®;qŠcŒRšªëõr™è†ú>9|œÏ¯Ûâ7D}zðÜO¨®ЧÂÍtaêÅ‘ÙÅoò0U´¤©Y*õ3QD”„aKúú¾Î!¤µöºM”}¦ âîþ» ‰Ø‰'¹„Ö#QÌLjØÌ;¥eC3‘:–lmôb%ö»QÌ)Û·¸n÷‘I'D£p›Ö/j%”왺šölS­›þ'ÌEeíÈU²Ø ÿR f}je›t޽›'õ[ ËI é¥ÊaIúÒ;X‡(ä+6¾6“΄E-$—è3Òš¸#ú οUÆ#;y*Kíèj”‹Bs+,w;Ÿ÷ìå) ×E˜G‘_Ñ%L§»ZU¶¿J1 Ôà(ÕI“)*â‡Ò!™9ƒ0ƒEd Ñs€F æìB X´ À@%3‡qáÐ9hÅèDæ¡{À=Ùg<:ãŠÓ¹ 0ƒE€ Ub‚hÌ^ÁШÁQpk2TNò†‚+†Ã •Û˜aÒb(T´èû À!®/˜NP­ÒW^B`o¸ãU1Ä~R*pƒR´uhÆÆ”3±0ÂQH‡‡FPfC~ŠMgtL0®ðtô¬:Ä%RÖ/63¶°)„ 0€O!LTd"Œb=:ž×¬_P#™0(¾-¦È†|Þ!YB.U2‚!4¥8«¢1#|Ävª„¹Q:!ÒfC2ƒƒÕC˜Ï<—1DÁgF±­ÿøÉ¨ÄžÀLâ“ ÿdý³üúÌ´"ÜD, g‰üPg9ð½½e'؇)ñ„Uò£²óámŸêfÙ+(äB˜!ßúÒ6Úš&_-W ÇÂSæm]a®¢„wj%è/"L«ç¡•øŒb „îâ›m²Ä–yÇsWx) gëÑϵ½Öìô)GBºé #Rï_úo:©j`¬ó…wš·¼&mm5()lºNM"],òô”^ãp¦£ãî)&5ÕÊò1Œ²„(S’§ÛÒŸ¿®ÜMåÁX ÁL%{Š—®’ã曨i %mùQ BÚ¥$‰A\ä*Ÿ:É*m˸‡W²†bLz˜j¸³Q.«¯eåv+î¿è½õÿÂ*f¢Š,¼´aü²HÜ.˜ñ]F(å"/„+¦ÕwµWÿz¡8O2ˆ^ù¼ò’mZ¡By÷µBåé!R„¢˜â9†e0ܤJaÉd©Å0…HÄ1ÉÔ¡”'ÖòáÐELÕÄg‰òL¯|匌ÜÙ´9MShíȶl ò™xª/ZµKZ¤I|È ptÁoF8i¥Ýz}ª–!R®»_¡hú¶'eR5„&»È­VsŸ³ìf3GäñÑmì¸{úQÆí£h™£u&t9jFN*úRÇÛZ¦¥,§ Â1‡ fñ>ìDšÜKžµáÜL¨ÅÏTâWÑÙD2£Dá(‹3¿® þmN#ˆ2í{Û$ü I>!Ö–¹ÄÍŠ‹Bé)VeÌs9b¥V„[ëoËMåD8®b w~a¿¥Ñ«¨ÌÒ"óþѰîdÂésy-ÚZ¡dFÒIcóµJ»µ…"EO·¶ ÄæÑ(ÇQP1ÃÕ“Rî@»=¯ç³m<Ù‚k'I·÷%™®yC=ÝÞ\ævä²™7D)›¬©áìŠmÅ3‹ÊœŸ)ÓÖýò~K‹üÂ£Ž¡½Xï/5J{_ï•q’¤+„Š!jØFffÆ—/ÞéN[.´´UM7ßüƒIEµDÜ.OrƒÚçGÁD¤õH¾Äªˆ!*(Bn ƒ n–ï¸Â&f¹=º”‰jÌõmõÔ¨²s]=Sh*‘‘ÛÄ2D.Q~Oö|–ÊÄÔ¹Ä2‘IO©ði:˜²©Î:-±ã-È|µż‰9 Sò¸­!9¯ˆQ\r ×í:Wp”s×gºg rݺåï,ɸõ‰[½’­B1Iä¶6Ys #0Ìqœ¡œ¤d:“v‰ÛWä5BÕN³)»˜Êw+”—ŸžÓ=DSPž‹N†!L9W+K9_öãÒÆ÷ß1Ñ8´Dm»Q+¥É…ITDÃ¥’LJåòT$B ‡*à«2ýkº\Ú:>æº/v"½6›¼‚j¯2&OµlÍ1 ºž® EŒã9¿ô¾"³a8ÊrR1Ð¥älêñ®ºØZamšbè¿4Òð@Âlˆ )ÿZ‹‰ÊûícœÙ+®–¬´Â“ßæt}í“U(Ý­z ÑÆ)©…ÏÜ„"ÒÛǪ‹+îi”B¨RCr,¬â“[XÚµ•­OÊVþ½fa]*^]r>‰µä­´Õ:ÊÒ:„[ª›‰„sšV¥‚à‚±Élé; ÅOÌwÖJ/“üŸ±Ñ›3¼ÇU7fX‹B©]GTÎ#¢v±òeºR ´e30s8á:ÛºL­1]Ýõ¬š·•N„nÕ]%J"Õôà cS+ÒKUŠsIÿ1Q²”|û'åò–y>ÞLN É›¶MÅöä’/†Vz« 5¾ÌŠ"”gÉTS¤`è.[ªÈ_uRh˜]õ>ݨ·ˆ§+r2ûY;_|›ú¥*„K5Ôî©ì­”¡{d÷¥b3Ùí‰õ¢Ò¨¶\b.]d*ëi=«ßÉB$… ”A Z"··jÒœ{';–Œþ¥÷üB×¹ÿˆJ:Ù4„îêò­JŠs,ª ¥i·ôBÈÞ‡aIf÷%˜R£˜¯–ÞæÃq› ¾¹6ñ¥úˆjb”¦äI‰b/ eõˆ*ÐÖ™¸ÄÇqѰŸ®éû‡FrÊJ¤ž\Ã}sˆ¸W!Ë!bŠCjlj@gƒ8˜'ˆ! $ˆ˜É¯iZó+D[ÔsÞG?8“—C28JðX½üe#(€ÄAAœ¸PLv”2‚8Ìp 5:Ø Vg¡[{tU\{˜ƒ:©;{¼¨7¸"1ÖÕ°ØjA^|Ž6Ê…@O†‡Tx¡©DæŒu8ªÌÎÒ„#ŒjN³2(áRGè ËÔ… ÏФ‰H)ر8ê´ˆFqõkÆi„fÈNnC…Ai3*6Áш=ª†²qº2’ùø!Ö•ùÆ@Ÿ±C—£|…1ã*r9¢2#ÖP ŠjÊ*A|Ê1àN1K‘ªaB(e) 08ÝJò°;u7¡F6…(èDlÞˆwd¢r=ÔûZúy›œ”˜0ä¢À¬2ñ6!8c(Õ®aÁŽK*vk‘ÉõŽLdsŠñV=qÅ&Á“Ä»Lvè`ã†lÁ#Õ„ÌT/Â0EzÁ$ÎàÜJЩ֓9DCÓ(þÄÅc™œNCA°ALgˆ*tÎ#ÁØr†1z{‡vH}’ùBq6zW!…Ès ""„S5,â' ÐÔ ò880ÂÉÁÂ`@ý‚ƒp­ß•˜I1X!e9_%£aÜÁIÌÈGýœsYöœEÄ¡‘ÍzcŒâ<µJ,QÓàÄcˆœ1¯%åÇ&M9š2ò$ó;a¤*ÞäS˜Rq½Q>nüqšké”o=×é¨1Ó82%q¢Œ‹Iq–(eÁ]¬qñQ­Ãj2„,•‘I µþæ)œFMX45Ĭ?ˆ.ˆBŒnÁÐŒcìt˜¼ Ÿ­#â‰ÎÎóTÉH@Õ|=NóU2„õ+|6æ(HsaÃÍÆ9ŒqT+>c{å„X¸$>ÒrYÙœÒÜ78NÜ‘9sdÈ)ó-"ÞBј9œÉ?ÄOÊÉŒE ;˜#w€Í¯V#¬µOŠ@)M@–ŒdzC¹ Â¬ @àU. Ê °€„rPw•ü%Îf(#a„-¢ÈX=G;ºˆ´Hqœ`B‚ † ‡ PoJ?Å"wü»ÿ-ÿí€ ¿þùOù ý¨Ø°·‚þè<¾¼2 £ƒÂº õ«„‚úaÁGds+°nWF ;‹ €°ìV¨0‡b8*8Aú#HÚëH¢Œ0@&àT~ÁG<¡8'!$rðq¢!Îv AŸj=ê?S˜¢' &bQD„:ì“Þ`È#6£ŽªÄÅ X3K t-2Œ{HAkKCba@Š ŒŽZ•†a…jCL¼$ï{N¸E·çq‹´'K©Šva ˆj5^5ò|3ƒÃ%™]ÊßÐCÑB$PqJzȬhÈ1e%m 7 ›˜ ÆGDwW Œ Kù„AÛ?WÓ˜ƒTnĈâ¶õ7L£u@z‘y]˜kUÑÓe÷cZ¼qÄm+Ÿ…+:·öú$ÕÖ(Rí,Ñ*)¿„“_HGŠÛShGì-KA ˜®¤¢¶‰âQ:­æ?‹zYºwW2ê»{ÚˆS+¿ï.1:…)ÌV…ê}‹+ù1Æ9úÖÄL®dÉ:_tjRÿ‰¥Kj+§u_;7ÔW^Êm)núÙžaΕsŽ·\/0q“ÎA_¢sÔÅN9ôµÞù©¼âºÉ½®zËlcÅ•äd+25HϘBŠ<úùmÂ,ŒWâ«Í„£ŸhÆ1ÔD±éæ“GÎÊ“ŠB•d’J%“ä™qΧ$£6°\²°"IÉ·1›Êƒº±ˆ¬˜ò÷S !¾O#á-]äJM…kQØ»[]Ö¬ƒœv:.þ+pæd”¡„"ùóÞ¨>£Ý9ÒŽÊܲ×$t6ðìÉGp¼Œʉ)±…gTžUÆ1DþĪ’#t1ph”ŒQ°†*ð¢g‚(A A äKRŽájDÌh@¬UTŽÈÇ6‰Ž7¢ QT&V»HR£Êá”ô&àâ“Ùœ‚ Ebà L [!‚†B(Œ¸b Ǽ~iBA<´wßäCóc ™"¦8Áz‚“]óãC%qÈOÆtDuƒ[º@Œ,?ÃVÛ!ÙP̯Aù@JDdÌ0ÂxïœbV7Ë1F.Ä¢é©ç D+^ЦCì-bªs!”H741Ïz@0`€‚I±32"¸½ÍpœuoOÒÖ9ÜF·îä0HŠ¡i†â0B`‡Ä(* ÀË4oˆ—šçØPD¤ D™1Ö•áã8™¨ƒ.ýŠ/“”Ä`A "jœÐ5" q‰ „áHOd±»Ëó„ø ix  Î"Š…*(Ÿ:3០ä 9—‘Én6A±”ÈhT0±F¨1‰\¡ë‚/ífNt}ó²Bc.$•Ù‰Ç!F;T0eÅw~3Ä1#Âñ=„â2ÌÌîèB ”ç _.A„0aÄ>Ùê” ¹ kLAD/lÁ²þ)GÅ).Ó«‚¡ PJØütq„ zs»OFÀ0Œ93B ½b(d.PKªŒBËS’…ìüƒ ÌÎ¥;’FV8Ë¡iáÆ] vAƒÓ¤¡B(1⚢vK×¾ Trƒ'ŸuˆÜÏݬ"HfW} D12aÔ“º­bØ’2HtA¾ßû›_ˆüÕjå»jnêÕ¬Qkü‹öY…s„g"Éþþq) ˆÄH§Ý–•~:²È⩉½¨^¶nò²v*bÕOB¢¯+)뛊ÈìûâŒ#àš¾Ÿ7äæ-‹mCJWN©Jj1×Ò&¥Šr°Ò'šÿSÄ\ó“’V; ŸB»µÎ1˜^×K«uKЦîü#×4—L\Î^Âægò«¾ƒÒ›¨“hŒ D°‹äˆèŠÇB7ÛèΤß7Ê®LÂlíòmuú„ ¸ã² ŸiK|µF ÿ±†‹Ùá…äCiDk ô"=ªa—¤¡Oµ¦‘œƒ9¨Ô‘+_ònÈåÜ@…Šfq&;2$•Sˆªƹ„Fž¸•JƒÆ,c–®- ì%­Æ…ª@”žî2oØ\Ë— Ä Ã´ÒŠˆ!‰È A/H&?„\bÊ œDdZ(9Ö‚ ål¡" ä°¥*¡©Ã:|q6AT-´†¥4oÓ1Ñ 8c™‡èá†Î à̶Ö\覇R  öðWÇ ˆÏà¦qê{¨Å€‡Æ££Djˆ ¡~(Œ™B+&'!3RUˆ¢l‘˜˜]RK¥1{rx|`C)Xè)(råxÆ¢ŠBƒ .“¡ƒ"|eµ‘Šâ pè‚#–¡X¬ ˜È B¹Ð…%D¢ ¸‰˜& ÔÔ1Qñk(p¢"¨ä=²9N!ôX±P1Æ!Ô…@Â1ÑÌPÉ™)2Œ\ùˆÄ !† ûŠýHF Ì"’æ…qËʧ2Á$0¢º‚º» ¾(lDÊvn2JDdqŒ ±G6 !ä-géÚÆsÚg…]„cAò > Õ‚/ Cx §µ¸%O˜d²Sœœj ÍKó X£ÝÀÜ'.;+*ˆ2™ŒtR¢‚Eñ19lQº)Øä® CJÜ}” ÎgX_ª ”7Ôgº ÊŽ6 @us}ÅGsfFŠ%\_z醡¾|íÝUÊÌd·lâge‘““L34Ú5Æ'B…@¹°ÌýÊÃÃ.˜:Œ+ìÒiΤŃ1˜N†¨NÀCÒ. jDpäðH5+á Žw#“²î°enÄ‚cÒ©çR)%hQKȾañaºkÆTØ'(gCƒ('MEXÓÒð³êƒ:ŽãÑQÃ(c ÄJÎŽŸ@Ɇ28#1†$dQŒ,d@Ä(7a–qX‰W%4Á‡®á]áH;âª(¬á¢2<%JD*`hB<L 0A¨ÇÏËÿÁ¦z\ÄŒCu7 äð±{&×…WÙÌ$D¡V4£<\¿ÄL@C+UCT+Ÿa€ƒ+ÐZ+ºáRû¦~¥Â)†g“ @l4)2%ÌУ*R°…7Ë bwü*Å®f¢#9C‹eÜ„`7B–lÉŒ2R¹àèÿøÉ¨ÄŸÇNüÂûù”ø‡ø(ø“ùÉû²³’µº#LôøåùP†`¢+ètøÍ{GûV~s#.2%I V¢^c[KŸ9¿™¬éƒg³©Þ)¥!&/ˆT%Œ%ÓaÛÆ ÷},¿Zth,׳&¹ŒBÂPÀ¢ŽÒJ¢›kǼ>Ü…jÝÙLÇÎ)‰)«r¿¹ZõÉþNÂÈÎ"dŽC‘êï(ä§s^ÞK ÊöI‰®c#wX¿%Y¯Ê+\„(‘³üX¹\.v!ây¦<«Ë­dsÙ–¡ctÒ™ ¥7S´ ¤áG®5Î8çš}a 2‘Äù)n‰X°ÿ¾ÞÅz$D(ØmIÍ7OXx~[9d„% 8Á‚7ŠWF~—äÍÎù~÷·÷”ïubyÊWA‚èù~ù¹åÔ™XÉ)ÐB²›¦ßË’‰¼[»¸«j/­©òÖâYijRQ´ƒÈF±¸–Ѥ[V 7M%ÃÛ"ûçð’F ÇCÏY+”N†ìš(2!ƒ„›¦éþA+m€“D3màíiAJÛÒ––I7 þãspÇ+ü†+‡k”™UʶaˆòX/³‡,E’ÈäÖ‰YÉtíê „â êSð‘_=,ä¿W©S©lb™&N¨UjÝf‰%o6B›ðá ¥;ˆJžd!,ÛD£Wº-#í¤°¸1Ì9BµÊcH5•¼œ¢1*…j–Gýòeíhn s[h¶¢:PFŽõ­úNù’š£³Kƒ9Ã0és a?ÏÒa7ß6Ø'è·9"-,B ijß®kÞêİb½Ec ÂÏ'´’WG0-þSPÀ d÷ÂäZeFù/]¥În”µ Š:¤rŽ\o;cœN„’ YL“sð!n²ƒ)Ès9R+(¥ qj†I ¯nê[$“³àð´P„‡ªR¤Öç(@€Q¤’À°²Þ*¤÷¬ÍqD ë9 0XOJ †´j}xÛâÕ;i˜˜¹ÉJ`JeåËêÔOT(eЂM4E÷)Éçõa 3‘/|ÒØ·’~m•Õ‹t5Zɵ¬/ ›$‹*TK ,±t™aVÒ5Nxq³õÚMçPPéŒ3 #Ð%V»²aëSÁ£q‚jjHcY?¤¬O`˜{Ñ÷¤c°â)ÊÎr”ˆéFÅ*®…»ò]X¦Ä' ì!O" vºDßBÝßñ¤!ns¹®¦À&Y;pA|mo÷sZÉR×§àT •;Ãüé˜ lZÝÀ¥!ö[’y¥‰%w®… !Æ*”¦•¾âE&%*T^°ÓÕ݉"A/‚ÂØ½º]…+¡âä]7¢Q/DaƒŒfÌ‚ ƒ‹Ï»ÔÅ+j J…¦^U"è©@‚3s©cúßh¡; æ«-#Ù`(d$-ƒw§¨ŸÌDŽ :Q<ºJýËa­4•\½‹œ^DÇ ä32£zeáGÙr­âÅ{ŒB;ÑeV¢CºµbÇIŠoQ·/™õ¥&¬Yc…Èšô†p@ )ãİ`YvD–I°µfe Æ`ÎBŽ(Â''F5›öôšº|ÃKŽtC1·.^Z¿^Òé­MÒÔ=ŸÙ@¯ iNL¦„!Xé¨I¬ÂXpAÉ"3ÓHÙçëeÅã ŠˆËé¾õQjníî“K ºMÏg¼†0ÁTT⬢ *TG˜€+8hæ(ƒH¨}«dÜ.§Ó}¥âç‹…Z0‰§ªôÈ<š6Ikzç΃-D;} ´/" TlouÔZÈèê+Ù+é¤)tºp™»˜8¼ûBó)ª0õ}T÷-çänaE€§¬²ö­ ñ|Ÿ%:º¦ÞdÆõ"åftKn“¡¸±¥Ÿ§1ØV3©Ù!Nò¦‘aÔÂ}™×Î?IWZÿÐI)I¾Û>ˆÐîÂö&é2ùÝ(ìÄShÇK¿Œ¶"WÚ¸5²N}±0ñL)ÌqS‰ßKS‰‹j5ÑêC(ç:'ãI¿|»±,Ä$Æ"—$Ný'ä—@Ü%³úˆ²¤’AÓ{¥& áü—NiÄo!c¶qD[,ÆPFÍ¡r¡m'¬”ËË’µ¦]”PÀTiêÍxÛkŸš'2ŒS‚4¨cq1D"Rd%Í5)äÁä>>YØŽ1WIÖ-X™eËI(.R#cE2r¿›¢ˆ–LÂ~EAB©ÖÇuÏÄÉ9¯šZ «¤åë‹“â•÷Ï”„ÐlÅ¿Éæ*P§K4UjFl ÄV‚T»¥^ª˜ý- ó–D¯pÿIªK.:%F'vÕ¬>,×—‹ÙO:í ­) ñDC:G&“F75Ñ—qžÊb„S9Fì¶)XÄ—ï'H¡ÌO)’ZÏÈi$YÅŸ "$pàs»ÖS·—)ýÂg}& z|Œ+í¨£­ˆ È3ò„\ ÓP&H‚\è)üDq¢‰dæAH/ô"ØÕ#ä|ÑøjrѾIüó­*ª–cYJb(’ñ©\üóч(G(Í$Æ wñšÆN¦å»¯»äâ*pŒB :¬Rdþ×ѧº!/°“cÂ5"ˆ5„!/M¥1èÁe"ÌÃ7–Üÿ.všóZ‘8Ÿ¢e#Ùè)í(.šÒ奭ýäJîc²‘׌¿Y‹™4È®ï3¨£Ôåñ„¢9b‘Àà€ä›î9Ni l—¨7{•z˜4<–é6_¿tQ )LþÂ-³|Ô¡½´BÑÖHè!Å$Éc˜‡=G’CÌLL/µqƒ‘u6îÚ©mЛzŸûšž&Yª§;ªXÜÅö5]FP¢ƒœÖE VºàÇÛT´å¼™Na÷Ò_ÑÝÇëôßúç´õÀêïïÈ ÐQ"¹Š!± ’%C1§õw#ðûΕû”G"¬0X1GjcÞa:V†€¡. %NR(ˆ1J`+gK A‰2^¨‡#(ÆS8¡¨€„Q‚©þ¡¹ø2ÀbÓÕ8ÏZ(˜Åz/4™GwS± ©q鑈Ñ/†p”^'æ'bLÄ)—r¹ Â4-êfÝD£~/Û¡µd ÓŽÌ55:Ñk ˜'àW¨¬À@Ìj ¢œAAˆD& ¨dÎ+ò´C(ØJAqÕ^ž2ð“„@Œ¥$‚0ÛQ|°Ab\C…,-äáJŒãd¦},ÐB„J1¦ŒWw-Ê`‚‚&6C+>1éX‹A¨Âb „-¬¡ dŠGz’ÑÛ¥”†]yjdr¡h§$¡ÝHåGC—¥3¸Z+~! Lƒ¯«†3bF€DCaóQˆeR)(ŽŽ!{%Íc±Z›EP€´+¼$bš•ßðrdˆk„Q;?^´Ÿ°Æ2 ™ØõTHíÛˆEèäPº)–À\!9†Ñ$RÄüÕ…¨„Q†u-s¨ˆ$ÆnkŸˆ³(„˜ëGø;^gcДŠÄ$âÐðqŠ„Ì HÝÌm‹®0 €À­„¤r(\Eq8gËù‚î4b!E¾Ä í†ÐNxE莆Ù.½‹X´CãЄcRˆÑˆÊ´B‘Äp@a¢BùuÌN1…_Ù°r¹ÄžGÌxB‚)B*š„b`‚"ˆ(©AbW) b;ô¥:Š£Dª¼ª%3ýsìÁ‚ FQ!«á\!;|LÆhbQ Áç˜õB—‡4À”ªÿˆ‰"x”ýzF ˆåï „#bCš07  ¦8ÆÎÈ™)2‚8Ó)i1ÛöÑ6ûËŽc™Ž4Ǿ!XõÄøƒs@¶!2·è*}ˆ£ÉÆ;¢WÇÁ%㈶T(€Ä9¦0ÕvL„ÄRjÀC¹ØrY„ê*•ÙY499,0ü3°E‡S& ŽCž‹t]ܬu$‚`“e´1(†”Ò†Q1=Â;Œ†èôM•ùÅe§Íp¢‡ pl Ô0ª«¹lôf'9„ Wµ,3¯t ‡ Cåw''®1mè¡(“„rCKØ¢16¢ŽËÈg>CgþkT$sµQ‚fbÎÿ†ÃfqʯÍÌ1ða‚óàÁ˜dÁˆÌU¨Øo‚Rbþaž¾\KYQ¨qÛ”¿rmQADâ=kuÙ A™†Uî¬!¯ëŒõ UÕØ4ð °‹Ò0þ Fʘ²vc ÜE3¡ªaJÅÇYѳ7±òHîŽ'ã ƧZ¨WH*U1õæWÍÈNlF8³`†2„Å:‚CªÀÆ:¢ŽÑ±aù äÅP¨á“9CçCB ‚^E0×X¤¤å± b8€¸zâ ŠÅÜBWÁU ͈D™ ¤œ1ë½!« €çwÄ9FjŠþº¤¢$ósa?xXŒörÃÀ§`¥‚âtp¨A€Â ]zpÄ —53f{&%ª¡Èbô²…±i=2 Ätñ´…e2AAˆƒeö[(-:hù[A¾¹ÐÊkå/fA»C­UPtFa 7Ó¶”5?8ˆ€‚­>¨dJ¹á•`來r¥‚T+«k Ve±g;3D Æ„:˜†–„…`BÉÍI½HPˆ±Š¶+½²™ ¹i̤’¯Ñ6c#(Äœ!j¬AF"”ÎÎΤS*ï×ÂçxG ˆˆDD6‚MBeØ„(%VÀSç%HOP¤â‘ÜäéÐ0â'2œÃÖJÈÈP£¦26óàâX;C˜e0D@j#4• Æ!6‚=Kƒ+ ~#æ:êªW 8Œ»üˆý8cH¨4)·Ä ³¹ˆ<œ§0Œ9–o(æ BD‡Ô¬4kÈ ÀŠ4Bb°QËQ Tb ÃÒŠéûî£]jêÂa!÷nÍùMÀ›¡]˜Ï]{mŠAÆÄ¤DC!A´²Hs1 ž°)Ðħ7ØÆg¢”¢ôO–ˆb’aÚ¹ú°!bU3(„˜Ü~ÜC£”¢û<-Y’0;²LDuj`D„ÂCz…Ѷ"1fì8ó!DeT9(F+2P¼a¹®Q"¹Jrj|›v3ÍŠþÈw ´b¯d÷gKí]Xs)VË©I;©cJS*¨RûkKÃ:P•³rózÞ‚ù‚”©vZqŒv÷ÝÕElyXÑ:¾¼Î3d+à²æõ"?v0„m¹h£œS. ªœÕÜW¤E"n?‰”ÌÔÙhù†Tä•QruWä[Hò \“Õ«J>KæM fÅõ­.æ'³hƒ§£”¥ÑH8žX«)’J)“±‘¹T…oÚ–ýlB/ïÄ¥÷ë3©Q*!U ûi‚*aT«ÌO~Ķ ¬‰SmP¢WëFR&¶ÊC²OOI’âÞc™¥¿û"ÊRH3OÔ?MB–b½'âhÝç'^áëdq"Ðå~£·¹•ÅÑSí ýÒ2LW¡²CuÒåAbí‚£}E9äÊã;7í ©ÒVþƱ{Ë#BçÙÎØ·ÈŒ¡;•H­£ÿjãE2!"HûkqÖ’á–_Ã8JÝ7¡…Q6Qá†Âlâ!¨gDÈA LKˆjc«ALÓTÉiL§œòk™:‡"guÚUÓg Þj©s¿l©f!(%ZEÃ'mr;̌艌þ U5\¬›ÉX›¤'IaN_Ôé+Ò¨[\@AÎMï™…’ƒ³ DËtŸjÏV« YFQ;îô¯LCoÈ’k4‡–¼bfPbOu÷&ê‹#¢—ÜŽéïÅ™C“ßs9ZËM29íü˜SùI‹D9xÅmWëý‰Q$+e0G–-;èuµåa’µéˆ\¤þ˜tµ (í—dÞp…kÐG/ú€srÿøÉ˜Ä ›Nÿãá¿èï¿õgù'û™ý1´ |ð0Ço¿Ü?Ód»¼¹QÒ»EÕ#&E¾œQ9|TœM•wgÔúÌŽS¿ÙÙ ^-ÆòîD–„\Ã?ßJ¬«´(‚(¦A.—&#‘ Êá j…zoΚ!ÐkÒ®º,K:SÍ!Òõ‰B!Õ7o¢jÏÆBoýL«MІJ†è‡+|Ì—wj8áÛ”r#(µ¦\¯Ô'U·¥ÄUmwöǾ[wU‡15&)í_ô ‡É "•¿ËßÓ+Ó¿©âÔ˜£?îërΞæ©C4‡ER1ª\lE^k¹q0ªÌLÖ ”›ßÅÇÕE4·•?HÚ•Ç&•2y-FççüW2/Vó˜¸9*NNÓë2Wd¬¬)Ò˜ôiw ¸Äµ+fÚ}}3S?õÆ­)k R 8B”\јI›²!\ÉvÇ·\þ&£U}s¹ó7ºÜý³.­Œ›S&ܧl©³¿_žÂžŽN#ª“>‚,ÈMê¡2Òg`¾™P”N:ßß-:“³Šao·^eˆ¥*®9ÚUæ$ô4ƒ0C­µD²'LMIõë½ç·§"j3*HÙR{^.VöC ƒˆSê¿fvZåÅ›Å"‘¯û»Ëß»Ü÷É ‡KEî³}¾yG  „±G{cð¯1õ8îìNâ£í)ÿgzCǶdäeÛ,çv.¿¨ý¼”YJiÙS訌ŽÚV^/Q0â­:›¶S¿j©ÙW £žoÊÈߦ¢ï¿ÓJßÂbm°‰«ÓéaÈ8†1Rbª"k'§šEAÒ㡟M$Ÿ“„Äêvî¹oË7ÌßDíyUW}Þæ$D±b29Äg][dÄõ‘üÎc–R©P.tJR–#ŽÈåô¥Ô§&+Û¹íœèvDZQýíßÊt[3Åæ'*©PÔà @EÆBÊŸŽÒ*“ÿ­&k0†¶V§uâÚÄCP]“‡YŠwÌåGdLǡޮs¤qWPº}×¢9èNÄUñ?©EFLÏíµëW0ÉQãLÖJ8ª6•†xÉ”!6ßQPd[ÙrKËš§F½.ï^ì«þÓ}اÁTbÉ›RªÓÅŠÂ LwIWþ¢wbú¥L©Ía o6S\µ¦ ¥a1òœËùNNÙm&Žv’ S;ûsXšG ÌUv©ÙwmJ:e¿¦Õªî9Qȵ䮓»b¸ÎçQ”RQ5{¢3{z×±kŽJ:H)Ë„¥©YmÚæ"ʴ啨¿f!\TñÕ Þ^Öú1ÚB´!ÌK&ÈÄ•§5*ö±\„[ºÑ[¯F·%kËõ|¦¶(_ë}Å@‹¿[bÛ¨K°Ç(¢ªwî>²¹J`!{ɘýèµCaqÓÕ†ÊSdîæµLíôö+ ̘ÕQ‰ŽO2±ZäGUK©]Y(ÆÜ—ô¦A/KRçu/VT.âùW{C«Ÿõú&ýf:# J œkZ¹äìD¨ŒGkÔ„2bÛÙrÓÿëªj;«ZÍbêIͳ¸Šcœì”: #’EaÅG!V‚5‰ÚȽ{×i‡ôϲ9ó3½Iëû,­à¨A3ÔB:J“­MÄ\aJêt#„,ƒ«›”¹ª­éœ®KòôÒÄN7JC£³ïÔ-o„ñuYÊžŽó9“Í)7Åâ–2•Å:2›ä73en»š·DÊìÊîqѲ۷;'±”r:®>7e>ê+C2ˆ¾m·bžÚ§•-wæu|‹·òõW+†)b&P‡UR4BˆF!·¥i˜ë´ÄDvo¿jTŒÙý¿[àøUeêþ¶nI¤I…YW§wù%¤žB¥5‡8â²:ÈæBÓ²Ìíº,‚b¢]T¨dôž[´”§¿1Œ~?.?¿z³Ùß]2ˆs R:zaV„Ú´RgB´ï'—&Ò›ÉA|»lsL²>_R—ár÷QŽ0†:r§ÌÜ*Ê#˜‰«¨gt»-Ê·n¨ž˜FN…íü¿™iIsévSWµÝ¦‡ÞÈw& –±ÅouëË¢ûp¥VAJ™ÃÕ,ä?¦ñÙw~D¶¶¢öüöž¯DIK;’¯øô8–}k!©øâPk¡ èüœé‚!¨”ý§‘ö›R ‰•Ñt1dª5›÷ð‚‚×[d ¦K1JÔ Ý.'ãÙR!Î3;vòñL&Y«! œŠþD\mE“x\B%”}Åb™ÊŦ’UÒ¤³ŠGn¯~/–ºMÒ©= ©•æ.á3É–^aÜALÈF+LÊ„t·(BL¨øÞ\äò%ŒL.§ïIÂkJŠlKjkMÉ‚#¹lL\’µÊˆp†Õü¹FN"j#%…ÞpĈ$wâeT>RÈP» IyTC‚EG”H1ˆrãè„ ŽÑšõA`Ä}–d9—(aqÅ\‹¸èL (”#&&¡¾ôh1„4ƒ•Â)Rá‰h£òÇï”íñøùO^öB6§×aqW»Ä ˜O@EhøÕí* v;PaK–TÆï,Í RbûKV‘«‚Ÿ@U *šc5Îq¡~*ªF(!#Šl¦ EBclAŒ„$¨¢r›¨Ô@ÈÆ\SMK°AºáÜæ ä¢Q”ê®Eé) CNE¬p¢±F!„8âå!0Ç(! 33 ÎUƒ¡Œ ƒRœ˜•¥9ÂáØè0r Ì© óð½Úˆõà ‰Šn!ˆ",”sáB“‘¸©¶W"”ŠŸ¨n13t]…zQ¶Dx @‚"™ Jê9Òf¡ 0‘¨JãC¦`BŒ;…-¹'© UG™¡R}·Ý3FŒcp]Î`€#3±•ÎPâ¥a BˆÜæêBW8èb/¡6AØNîu&1bÍŒLƒ"‰¸‡(ƒ¾öGí‡á9Î`RUERÌ4pÊ”ƒáÅu0ÌFQ›ÝùC ÁŒ_c*Æ0¡V*ÅH#üMéèºB5²#eÎf+gÞ™k-3)»´L¢s@œAˆv% Üa]Ï¡ö†ÐEâ$…} \Ÿ™2™ØÆ`JÿAúUöóQòÃôÇùVg% «<¯Iæ¡…öà ÒÖŮЊ(×Z= ÜA^Ìeí:‰BÌ Pb¹©B ŠA‰ÙIn<„âšAô’çíW(ªB,´õÝG”FîjOA¸È*ÜS +!µJU«ÛÐÈ„ñÓÌ·"×Fí®EÓbÍSz$Ù!iµ©—âv])¤ÍzÕ~žYÕ‚"°Ž¢>Y)p’í).ŸyYÙXŽ/µèêË_7]Ÿw=ºw²ºòá…!(b9d¹ žü­#ÿË„õ)ãÏÑaÂhÑ#aŠÀ¶Ñ‘¾¤dB&çÑN ég1Ç/§Õ—ÚÉê7²‹ÔúrŒg«êL3ŠKoV?D‘^T«¯½¦s GJüˇ•¦%…LI%iˆÃ0ΕÓ^îœ'¦òñ¶ŽU—žTó^¤âSPvôwê´â§¾™ÄMУ¬QΛJÆJª‚ÚÕAǧ›G„´PÅ ìb;èD~ØV­¹JjP[Ìâ“‚-Ù ³”E³>žÅl<ªÎÖ©,æV³‘7PÍ[" º NÆY|½Uí£1 \Ákø£–¦$Wr´Aº2NLåÃå-{´4!•Öp¢Ò\a|×2ídY-'»o·p:çµQp¨Y‘œ¤™öúb.³Öw|ÕÔN9+ôúá ê ’=˜´æšÏæZË&p‰]ªJ-l±˜ç(„ªv±å‹â9uÐ)M_¬E«<îÇŠ.'ù*•–Õ*¡ ;ÿ9RˆA ”1)Ñl÷å¿ÅIADTåeç©ð±&»7*ÈÕmª+) è1dÜJ¿ÿáti×]Ö¦¹YË1F (@¹%—se\º§LÚOÞ«tX½8¢¤4´#©3›IwIÔªÂÑ?‰ÝÇ) ž#‚'YsùœìÄ-$>Œ]¹¬¸eráGÔØA»šC¶irûÒk>}“U(˜;ˆ/ö:>Ô´aúpÇ58bÜ;çùIj-(™åEίԉim½¾!yÒ¥ä zbŠÔ9ªÍïÑX)Ȇˆþ® ‹ÍU|ry‰òüIìÆ@ß—sl¼¯ˆJÕ‹Ô4˜ šR(‹®#™1#1Þ…Zí9Ö8Èí½ëÝ«A^Êç´˜³ÖÜ ¨'©Ø”<ƒêVrö!e&ŠLJ …r#‚«2”OÜæ­9·¢ ©ObUQ•ÜÔ¥=m¹Õý''Å' ¼E2Š)NT ×!IªÇ4BdÝ"Å\oõé¥ý³}d}×Z­ ®AÞ*1x¤¦—I…œqÎZ5 5 ìfwIä­y#0‚¾¬÷ið¶q¨ücðNÏÓ38„·M‘6l;ԢݮœƒŠ ¬Éc4廫­mh®ä}ˆ­kµH|ÖE¸«ikk:æ™ÕéžY“ÀÎ@„q¥ábá #wn[·Œô~,^ *½„Ô.+Vèb•…-RŠFÓsZϬ@©*¢•ê)NêÔL^£”‚WÉM¸¢\—èR¤¨åESK²e%–ªS~9͈‚…*Ùkh‘TxϾ(`Á+Pvì"¹ŠYmúï’ñ RŠ›,˜•¤]9‹dï{Äâ³j¹(ˆ¤FdÆ ÄU™l\ô©ŽÕiM$“D¦ÄOÉ•b6§\ì%«œ³Ô ª™ëŠ´r-Y2"MÙ*sñ|‰Áïåû T¡Ì¢.jõ0ñ;ÄEi*ÞÛ˜#úúnMZ¯]âšb1 õo°Ã5=•Vôýc’îIŠldsV§áx«G¥8½Îˈ¯œ«V)Ì!AuÿÑÄ‘(ÞŠlz¦Šèˆ},÷û”ÇêØ¨Ï´é„RëEbÓ5-Æ ÜœS!8ù&¿« K&²Œ¹{óÕˆ1ÎÓ*ùÿ„;»ûÃV”Ò SQØŠ–áFâåk&:9qu‰U¹…jÎc¥•ò÷~Ò¡Z.öÚ¾£…ú©}=Û–ÛÔk%<ÞoÊJ¢™00„!,¬UQVÄz® ÞyIc{û[rþBÿýØf‘HOÌ«øK¬´‡!Š¥R§º¤ª‚J¬Qg^I²J™¢²˜J9)w1KqJ¢]3¦Z¾I dJ‘·J:”’h›d³PéŽ(CM¢!ÓQä›ú¥ B¶(›»™k^ÓâÊ›Í*V$“Y.1ÙtѨÉåb¹a 2ULée˜Hĵ³‹Ë±?ÔA>øvg¬…•,ÆO+~_T´ÌU'uÎk25‰TÔk’u$ÅÝz”EYÕkU£ ©ÙÝA´™¤£6¾Llaˆ‹òwS é^±]ăŒ…6Ž0ˆ¨¤úÑ/b)O‘3ù)ÛˆVÑòÓojy‚\›–õ±Å ä^Ì$E‘.{2®s•SÓì>^Ó¦“ ÊŸ»Kœ‰ªæo75?yQE0ŠdΑ¹r'¤U^$ÄÒyw‘V*˜·F&¢&‘n‰† ”6-¬ôT"»ìev¯Õ’ذ¸Óê[¹r!¤9NF˜•hi‰MåDÜ¿òñë»L^ºY ï›ÖZ%*_'ú]¨AŸÎ8‹’ˆæ"…Bª!sIW§™JméòlY®g0M÷n² Ê®9=Hü'i1•Ò«‡JÎ3¢jmTéšø³z1V«dÚȉf!W™u÷ß|mš]RmÆB±I½FWÀ‚ný™îvEË!’°‹kOBT#™Jbáø ´¥]ôïkűbHø®_Ü)x)*ðìù‡=PíB3·1FN‘{0™ÒóÅß‘ÚHœdBÓKrHyé%Ì®»}ݧÍWhË~>­}§0B† 1GÚ”òÝfq(¨)+!+¦"M­+_/”Wa´³ ‚‘–CUíAn½Uñ ¾Åò%Ùh×·313Rž%I…IÍì!Œ‹eªR“Œs›»2–¥<2[1 ¶®â{ðN“¬|²R†ò°êUC¢ƒ …ä=?ÜByù/C]¨òSä§ÈêÅ[‹šZ]y8üë­èV¡Xf:uVcc>2¼‰¹gÒ^êÍ,QŽzË1Q¤æ214Å\¶“‘äF±ØUN—××@ë…o*ëÕ_S5‰…K1õŠ;™hºù˜®ò`»wÞ'D.¿|žuÅTFž‹§*«‚°ÈêÜ:RãÜv2q ôUÜê<Ù­BQM­’DÞ¡Ý‹îÏZðYYÿøÉˆÄ¡>Nöd÷”ø¤ùú^ûûÐüг’Eàǧò˜Ùzp†xd)Ê)ÚQÖU Wº‘ËÄ6­´×’Ô›PÊ}úZ½SL¤)´•IÕ‰ûÉdºA2'r”Ïj¬Ç%sý‰© ‡Ì8#38ʸ¼B_ͨ”M>7•-N<›Ä¥ÎÄ1S˜él18˜Ì^c¹-GŠZ£ݹn¥ÄR¦É—½Ú•ýÜ,ßN³Õ;Evrƒ„cš×!™=ØØ%ž…Ó+µª\½z_‡»v$†Š±§qjþ+YTöèB’!ii~'Y1Ãfw§)Þ„MeÎQ„_9Ì„_Ú”âÿ~fæeÈQ$jÖöþ› üò¹ŽÒ ¡J`ŠB£jˆ#Ø´ÝÕåÒ×BÅÜ¨ËØY×””ÿ²•í§‰BYÖ®3ŠÖQÅT§œB§˜—ë͸5*þošYïóºJ¯¶q–Éå‰AºŠrÑ.F:æIÛî…!œ¶>·i<¤Bü}g&¹ŠwU‘fbytJñ®y(˜Úµ%Óž„NÛí…³c5JRNVö¥Yp¹t÷Ie!Qr¡pLpÔ=ËÛ%Õm½¶Ã´ÿJpŽdGb‘ã0äqJ Üä‚¥„'Ÿ\꽄°ßö¾úQ¼Jê{XV±~ÇÄë%‘V„Œ#r–S^èb®nóg±ÍiZUn©-ÎÂ4®­wc.R½‰AyÍ*eЊRÜk&*xkÄšÏÄݪt;¡Ç«¦*}OÝ×! Ï*µ•Wñìt¢5¥^Gv¤µì¶ žŒ¾”*JшqE¡PºÇcäêBmˆË‰²O¸âë­O}*b­ö´™,_C3A )ÔFã‘ðØ Ý­Õe+Ù–È„Y‹R 1(gÂQy'æÎA.fŒíEªrˆI.O5}·ÔÂ’«F•‡J‘ìókÕC*Š»åŵ(McÑ/è!$"_ÖK²è˜ÿr¡ÛYdX¥"Ýç0Çi _bwbµsë׋OÕ3+áOc}IBå2ôÛk¶)]æ1!¬byJ©¬­VR–Ò¢êZw¢;ÐäŽM¤±“j%*„ÙW““™Š«³4çþry|¢kUjTôò§- E%1=ÚŽÈí"â÷‹9<ž‡¢þbLŽ”ÊÉM9 jî2d‰ÌÃ+§O#:TI ‚¥J™ˆÈÕ#;ѤÏ^Öªn-y{ÒÉ[Ar„™g9 ª:­×_$\V=›¥{ … ÈWå3Ðec†R)—=t¿7 ¹”q‹!} Ž‘D“¹ÐA3+ˆ%ª‹´hŠÊ¤>+÷eÈS1Ä)Œp‹Ž/tB0ìõɃ: áÌÄMÐÂ1j¥2«q\‚·sF°…ë%Ä)­BÓ¤¹‘…„2Æ$Ю + P…Ɇ8‹õE!‰ë'ÁK "‚å- ‚ØJæ‰ aDˆÏ\BˆRUtˆ6f½72“… ±,”^h¯ …ÌQ(¨}PV)HXFM,¦C~eé† ADª!Ûð†pÀ¨ùˆ)•3®lKŸ"·å~ñóA†EàÐ3 Ù—2ÏÓœBb8e$Ã8޹¦¾²£ÉÔ¦‰”kÕ•—Ynþ´²¥Ù¬ìCn²!Ñd+=M!2©éÙþ†f”¾ïJ2²5 ŠôFÝ•QsrˆY‰…/§.’éèGdG/'ó]>屺„âJžßVTAÌ*%IL~³ÌÉ}¨¾‰#ÅfLj·È+ Ò•îÈD»FiZeË%%XFªªwgäµ>ýra¶KRU-TÂ5Šª€T§` ;*îý'’yòÄ#1§:µo–¯Ô®Å$º¤!–Æ+ˆ¨åIÉ\ÛÝ?H{®ÊØœ952Ó[º5<Ä9²¯0DZ)5 ÓK-­ÛTµÊ\a¤.ú¸k–Å1HÉ*r\”-?[ [ ¢Ž£)H+9I$Ý6 à—ýmÆ•Dä\KèwrÔ 8ÌljÞÔѽƒ®[ˆå*XÞKýii;>©eF}© #9QÐQ.„LT[ÈØ’[iŠˆD[š‰Dtè¬UÜÛZM *ìKšä sg?Cæ MîÎç–ZBIæ ¯R­Ì:÷Ÿ~JW-Ž»)|cF8ÂrQÚ¤>nwÓeÚþfõ$­'«¤‰aæ Ä‹(#8”zÆ‹EâPe Ò¹NØw»KK¾ä²?§P»A7µR—­ØáÀÀÏg¥‹Ãƒkx,5˜Ä° ÓI“ÂhP ÄÕ­æ’¢ÝÙ‚d²“ŸNò%‰LÇ,q‚ë'd=3 —ÖzPÊ8æ¯f¡Ëwõ“SH(É! "9Së¾\?pZvâ¹o4jyÅ?VCfJ0P ÈÖ îj^ÈU7DìZ'µeâZÄÔ†ñ)"Šú(Ó•útf „ ž ^:˜h¡FQï.ÿì\QD÷¸¨(ƒOºvð„,‡ß\äV9tI牘=­¤¯Mmâê6B 2ãPäŒ (©²Xy#œp‘¿™z°ÅÉ8‡ ‘CŒ ñê(É]¯ çü“˜®ÒO&\”‰¶'ÏSFG¾Z•ˆµfr&Š“ŠR ‰£jT»HMôC¿”\͑Š p‘9¡‰™b%ç’Çâv’ìs­ÌŠó½EÓij {áÓ§m CLàŽi´¾Š2áH‚CHQPù³tNy;Þ‚êÊBˆqÑ—Iù³-ä׳§õF:˜Ã + b9HËȧ_Ù*I=´‚Éxô§»Q6b¥0`:­Š0ˆ7õëYÿí¬Ô~)lƒ¿ðÛLtkXA^.U„Ø(SŸŽfs“Þp!¸¹LÕ¹$c_™'O"z瓦b´É1k|;|œÂRþ¸›Â—tI)˜‚›ÕçÇIS~e#«¨ŽfOXæ ea‘â2´òaYÎ~.¶ˆYZ†Fáh·I¿ù)J>eZHf‚\ ÔA¤"g?]™}.&eÅ9UÙ9{§Ú÷éhÖ&)«ŸÆâ(ZÞ¬Ëì§Ù°”cŽNÔš9N2ñÒ«"<ƒ&ž²#ÉEpÝ…U™E7& Hmß0{Í©‰MÌAÆyd"ˆÂ ©õ£wÄ´š©ïWpRp®1z`8Á%Ð`u‰‹•­+»º…¼³Çíb &s ;˜0dŸü©&=Ä¿F%CS#àÖT 9D†‹lRReê·£ã=e ÜÝ84þ­Nç¦%ÎjG²ž0 „ƒÃ´M• >kRyN‘mÀM1à ,¶´e=Y rÏ‚ 7ʆSEOóŒe3¹½ª¯H”]‚æDÙˆjj‡Æ¡r} n1¶Ü©ß7°En Ç&IA È+å(†‰Izôô«l'59`ò÷„Áˆ4S‹ŸD3030M„›RAV8™†·=:UT©ÌP‘É"Ó#³%5K€§Ðâe1fšmÄö–b„°¨ªŒµ‹…™]q·2¢M4 ¶Š…ˆ1 bl0ÈqØÜFÿÔ”QÑê…qr-݉ë0ñ… Є_ݹ²LyX|daÄLB8œ¤C1‚|%ù‰7†à……0rÅÝ2ƒ¡Áõ\ª‚™R ’ÃÀa1‚¸Õ„ QòŠ(‚ìáÒD D0ÜF¤|Èq œ LÏ`Rsnb>%T«®q1ÔLQ‚@KÕûÄ .tvÃ9Žò$¶zFB¬E1ˆ­êˆ$N7P È1S2êwüD¬‹dõIêf8¤œ9‡V®£Ve3T#Ó ƒA-…‹ÆqñuÍ@l†z:Ÿ”[žÑÅçVz0ªƒÆ„ xôÄ@1 Ô×£z7:kƒÌæâˆ$ ¢- e%/ÀBKŠDnm«æFßR†¬ @¿Ø4‰k4$’¤f¤‚˜åmÞåqÁÊTÑÍ‹ÉÌk1)ög0 C5q7Á$Fww ç¨B¡å­—-ˆ b¤ˆ¦G˜È¦ ”„!BGˆ¨ÄvŒ†z_Ö(Ä3FAkbYóÖŒ×u`<:ò¡ážZGå5ÁžLÄ—(pÈFCoœoBdâ Bƒ Qt¹„·[±þ´K¯r=G øÅ{ÍÈÂ[Ý.‘ƒ©V)Ć :(ï1Rc¹å\… fGB!¨H Ä!•ƒ bk’ç>éz z*‰…TPؤ©±`ªGa ç¡òëkQ¢”åö4# pkÓ«18F LYSlÊ/™‡¢Úðê¥ÎñëˆntV#„ ˆ @Ò|*Rd2õ-!XeJ­Vª^aů'Í 6rÀªÂ4(•ˆá:BT(3}9é È!hŒÓö©Ð‚àŠ˜vs‚Èã~U;£aÆèD!Ñ!H3Á˜Â!“$ø†£ÉœABB”XbfvEqôI·ü¹œ+Ÿ¡ÂF)EK±ƒPA6 L"b™è‡$½!Œ‚úR·•á éáVršٟ¿D†b "êˆà›ŒSrbio¸Œœ‚± …Åèà •ˆ°#æ.ÃÍEQH^„vˆ´ô¤âºÄ0a¢p©X3a® 1Z)u£Qû8ñ#ŽŽzãå‰Éõ3á v$ †cfÁ ÝÅQ¤&ñÊÊtT `~ XˆoðF#`¾ü'å'L²)ÍÜŽjM È¥Bn6!P!>e^2Bv+‰:Þuä+QMz® U—A $.Añ0ÍBu1’‘ºˆ&HËøfµTa‘¯Â(C_ç Ý_,‘]ÎãPCr2a”— F¦Oâˆhk”ª7-?(ñð©HG9n/¦¨($'c*dDCn2vÙÌÒ ¢F¢Ì+ …ìˆ'd0¼„'JΦBRŽAsc rÚ‹Ó*ZL„@ÙÐDhBlf"1Œ‰‰PÑ Hr¥ÁÑ–3гqQŽšò ‰aª4" &üíšaƒy¯xÇ}  úrA3W6¬Djа%à’3«+h6T¢„‚Bf/`e ±Ã‘d¹¦eÄUùÍ/Ž„¹Þ"jÖvhsRá8Ö”“("£ã1ƒ®FÝLäQƒ†Ç¡.¼dnÒØ*Ò¬1DjíÜ%†aeí)MðÅ4ðªd62þÎs5ÛÒ:†¬±¸oi'E"#ª3Qî"FA(r_ôÕ8¤z/1b²šFˆq %Øeý\"£+d+¢¬! JŽÝ©¶9Ž'ˆ%)+Ü~!KæŒðެЙ] ½É¦NŠ1'0˜ƒ Õƒr#„'aWK Pæ’¡Ñéâ*×»*šÇíÜ&o!™¤hUf·MLeŒÂµBºD ¨"–’Ô! ­K§2¨Ea“¾/DY¢YUsÎH&Ì!4YL¡Q–«gœl‹D^!îÈ¢Û WF#âh†w´É8œ†½7ùŹvjKR‚¡¯ù5 ¿’¾ ÷™LÑf*ˆô¤˜c8䱋¡ˆ;°£|4F¡)âcž×嬋ÜÁB`äü5CtB¬¼C:qØ€2{Ðì¸U¢V:”\ z}ÂN){56EõŽ©ضÿe•ì”ÝŒ8Œ¢"“ŠEJµ5Îìf0¾N ¼ëCæQì-4²’ÉF»Y´¯S}Ñ…I>‹ÇwGZÉT™$A;zùp!.§lÔ¨_V y™Fn%ĶKhÒŽ9¸`(xðAà4AÅ›BRÄÝÒ–Sµ ¤:é „­ -7aùÍå½Zó 2ãp<ß#:ñ Qó|=YE"Ä•Ê2WRŽçóE¡Dˆ!ðjŸU™$ úœ7K÷ªŠ¶îh‘h—òN·0ð¬@@‡cu˦–…””ÌÁš¤B#4ËaAKA«!ÔäI¦Wn#­ü'Áç‘B¥9×¥éŠ#Ъ N'W\íucç ;ȬÌÝ1¨¨³ö M­É–äãPg:]ÑÓM0Q“œ@§ë·à‹D°8€ H$@Ê4±€LÎ z{T|"È•8N<5’RZôªZgW vÁˆ‡:õë9z,´ƒNšQL$D,ŽD¸uÍñ‡gí&ÏÍ!Ôgf¥ ,÷± ëü²Õ$eØã˜hL¢¾`ÁðÓ®£‰kõtO”a‘8£^¶[.j²|c‘¤VûÛ“—¤#ö¸ÎDIEk5M’KqÈ…8𜣭´Ì’iKCù~¤» ki0¤$zq+Ë©»Ë"¤Î;]ìK¥^ïÌbóÚo;Êé)wo· ÿêD–‹Î/óm‚" Y´%Þ,^(!fÝw,†eÆòÕ*Œ\YL·JÈ”¹<â]µ:•j¬ÔJ.þ“Hz«ÑäÒ?*è¶¿TöhŒë†2!îô‡€pDšåjH—·Üõº…N](\ª)ÏÞF‘?ï×·I»#¦ÐC™¤*¥HŠ“9„ |*¸„ )3Xœê@‰PZHµ¾‚_T8åóÙ;éXØI… !xåážDÛ‹²HÄß,ª©|ðÆ²œ‚ R¤BкÒô׉êò0‰^"Œ ªmÕ}‹ö†r‘*szR¬ŸeSÜ÷"ÁÁÎÖKœšZŸöU·DZ'eñ¢ÝBݶÈo[ñšCù2vig$uʈB ˜›Y±”™áªˆµˆcŠJŒO%¥˜r \2R“œR ˜.4öVbfR–"†I ¾/Q=Œ‰Ñîša¼ØÑ9j \Áó \i„²Œéþá9î’h•jE'²XîU”b<Õ¼ØHΣ…"–Ø–Üs÷bé½2^R¨kb!0¢Óÿïe•Šœ¾rûZC‚Î?Øß8‘¼DSVIL"³‹qESjÖöÖ§ýb%LP‹Å¨´ª4¥ü&ÿ3Ÿg¢ÑM1sÍ1ŽÚ3BP¸ŒF9„á?ä¹10ŽÊfeÛ¾’J ½ÓZq"Úz¨r’v„zþŒÄ$ã6=r„zùè[¨v™¥Í&¥¤¡pãîDÄ–Òì¢>tFDÈU5ĆSŽSò bè'fù|d0‹*"Té!‚”›%0»‰ÊE;ŠSŸ¨}‹Z£‰˜ˆºE¢™F F¯ˆ&vM’é c6ʲ/LzZ‰…ËÃå å,L6Pòm%2‘òyòË÷Z—ôHâ]§H£'VIß|³±°LE¦sfm=“É/ÖWâ4§£m‚!•­ä%O;*wLr4Ø… »Í¸H¹‡Ñ1\„Ã¥ÈF$AB‡®£T0ƒ:Äm·g>cø]¡Â.kRQlJ¥©¹¿Jl+X‹vk?Òõâs¢˜·—WjzöªDÙ¹Ygg9ìyE0…Yšanné! `p ©ňÏêÄâÕéˆÏ„ÖD™5FüøÝ.\Ác)ñ.+ñDa f*å …oÓT˜Íèis?Ü‚«ø¢d¢uSª¥¯é-ÞA¢2˜cqO:É­~§±­u¶‘Ê‹ÞÔ£ÊÖ:Â2Jý¼ëëúñ7._uFe) 샂d•$ߊÒcX—ÃÊ×J#!œ³ƺD!â‚ —1æ"ÍRz§šÅ©ˆ¿`»âP'iæ¦ïº±DWºäiÞW8+s_-¬©Rà˜ow™½8E (¡ž# ß]\Í”G7˦y[,|ÇÌå[æQÒEY-OêK½‡J£­ÌÓ9SU1ëZgÉ\Œj˜¡Q’´nY¹)­B˜WÉJ0B-(ý¸âµ˜B¹„(¿„™x„$N!:dÏZ ÄÚ>Ém²vê=Å‘~Š—B2L4ÉëEœ«cŒrqðÂóP´âù7¨JžISÊŽT¨â‘/A³¯8ëw0# 'ŠW–\¤äg|F'B-‹í*xèÒu Irä±01$= uJû}(´*ÅgE¾±&'T/à-Œ™ÏÄkQ ¤;¦åBΈÚQƒƒK#·³¨´/«éž­sÔJâ=ðÕùá~¤±ø‡{ê+‚g¬SUŠAJ5Ð¥_³Èr{o ؽ 뤖.Ó«­®ä^B“7M¸ùZëJáj!YÕ*õ”žlT!%<î€Ï µ/¨R(–ùwT „2Ó««¥>»ÓÉl—0Ý=X·Q C£P˜ÄW¡ˆU‚ÇÙZ¤Žý5ʤt±5_ZžÊ{ékkÖØZ†Ê±ÑWHÂ9c0‡â=ôù„wͦ¥´åª‰)°G˜U•hƒ þºBHE®½Ü‰TÓ5ÍÕ§éLZ˜Ó§2Mg¶~ý³2Ëè‹rrÎORõ¸mRH„qbo¥ _“Š[9žÈ7ш‚ŸE4£uõ Ò˜€G^›GþÛ­.e¶lì´ÒÄÂgô”·ÓÒ¨ÒÄK‘NN'1ÖÁ˜¦s»qj…î]WΣÕ&òæ‰sÌBè0Ô^&­JåPÇjZŽžÙÈÕœµg³a f%Î$åpEäÞ‹÷Ö1jT©ø‚¹öóÒ|²Š¤#’Ø­èßÕãcæc/#)5ä;Žr’RÔíM™b6ƒ°#Âuc˜gòpk¥ŽéÛ­¢ÚVl$²>~šn´%…ìo>*˜Å2rSaõêW˜¸" Sq{È+˜w¯KñxN2qví9¢4‰mqd=lRãg“_hž^”MJk®Ìê®)‚4µ&Þzì’ ‚VNf÷yVÜ\¯þØilï±*æE¹|F”²†PèaÜtb§*a,ûŸäT9•©ccÓÞ_ññEº¢c¹(ÏS\æ'l€¨àB€PÃý¿ý_þ7ÚNoÍàQ·„ÃGìƒ áÁN5j¦C%ì6!6F‚8³¢# 1.{ÓС!J?½\ƒ¢>,;0>ÊÆjb‚(‚³d€Û,›`H+_´hBwT¤Q ‚1ôS.ÎÐLÁ gVeJ˜™è䈷C|Ðb³˜‚† 0j£ì ˆã‰ù„X†,+Џ=Lœå9©È¼ÄN/FfÐÆ1Û@DãddAFR$&*)"©B¨ˆP–Ûl­ :Èn–6סô)L(ÎJÛ@ñ’1Ð0¬“¶¬ŽJk€Ã/‹kxVì$‹û‚3 µ`ÌP¬ØoŽ.0ÔN…„±§ U Â*–ˆ £2‘Š`¼Pg쭮ϮR:#/èƒ[4¥Úå8…Ó¦³+QJbâŸðŽäʼnª¥¨Ý¬örӎ胩ˆïfrˆj5n19•·IþI e&nU:Rѯ³^]‘bícšè›2©Å¡2DrôŸIX#«»„!µè÷O&nÕžª"°ãbÎ÷„#¢“œ•ÛgLéi]š‡Ç]oz`Þª{-2Bt†q„3yØH§s”ÖˆýżÔ{/ãV¾öÒcè„›õjF~ECK[$R¥mYœSª ¦D^ì^ɈVDQ•h"uZؼdsËD—¥îÉS·iOG B§‹žI]j¥ã“ 5BC«å˜ „2îäË©‰©U;XÌœñÿi³1©³Ó9™|¹Mù2N¥0«â Íe*]Ýg0¢9OªÔ"•ÉA{®¡Gx–›Õ•2ß„Ürõur²’É}ãÜ#©~B’g¥«èÅSQOtk>‘õ+ÒËe1ÓØ„$¬ÂýZ…£¥Åü}̪-óɬŸ™ù)þìšeö(Å93¼c!]ŸTfb‰|}¶›°ÿ·/?ÝåõýÌ®ú£ŠŽâÆ2ȪVG*éˆ-SÖÿ½nfl>³i›ýÔÂãM":”’},byhåVQyÇuK\=QvY2ç2¥É|ë#®Äʙլœ&Û)îcRRUdL%«Š¶B?¢s qv¤Gc¬BRf+ «z¬óçÔ3áéJæ!^mõ3^­¦ò hÛÖe¼©¥”(£)Èb°¨bÝ‚•0ÿ¤¡²ŒI4FÂ^ÇÁ«µIx»5pcnÜDº{H¿QŠ;LD´¢?£­_ÎAœë2rù‡á:‹ÏéNÞ)S•T#[iÚ)ªúja:šƒÐ¼‚Õ;0øöAN*ZTÖ£J2”§wТ˜³’vÞs¾õÑmœß~é7ðe%¿:ÙÎM²öÓÑ,a‰¤Adè§.βjc(¶¥Ëé†Ä†7rIJk‰EídK…³¸G±×¸Ôc52·(¸C›º`ŠÉÊŽüC<ÿ1[‡~ÁÉN«Sý.éBßEâ~úuê|í7'ÄjÑM˜èåQΆ1.˜„‘‘”‹÷%›è”jwæÄ~,ñ.Ç–Nç1"IV²ݬw5`¡9£\À…è¾fvÙUTk¥ý¼2 »üÏM«dC+—LDê+Ì¢ŽÇ“Hº„)dú¸Cå‘y:Ï=)<êLÝ}©ƒi7#5mcÍ‚«·6V%ŸF^Dz–‘ ‚¡e”¦Z1C9Ržö1^­c1’i9¶m¤ÖóôÑ5 ŒÍ$¶Ò’‹¾EìSHGê⊈Aã%ÌìE#ä†ü%ÿr?ÿ–J˪ۅm™'S¨¨á¨¿öóÈÎ첡“̢̀7—ŠAgj%Õ7wÏT%¶l¸êÔ¦^”òh–a£©7ô¥nW2cÌbµ†DAX¨<Š+áHÄ]Æ. K>In&ÊzÑ¥ÿµ' îùG¢_ÎQ[È#Æq‘R‚<Äuj5—QLËN¢kéšJe)ýýÙÇä®îÊMojtª;§³wéäê»±’C’‹œŽ¸ÃŸW™Ž#fÿÔ­bˆýÄS¡1¥…Ati¸< 2  ü1Ù@Œ …I ÁˆÐ7Ý eW+È8É q‡ç¾Ü¾²50"c„Rr $A”$´LTNÅD¢Ê0Ô”î,'&ATÇá†Ï·!1Ö O^— ¹™‰S®' †·ˆö²äêÅrŠÏF¾¡RH­Gœ\PKÌä ÉMPCD£`Ù3 `‡4”2•¼•˜(¿…M܃ rPr@®aPÈ1ÈìƒQ Æâh!ÁˆmQÆlRÎäËuµÊåµU£–”¦®„¾`ÊA#bx7®l1A™IˆHeD18ƒ¹qÂ[º“GtC;pz‚’:T’±`ï4¢f ²` œ%B 7 3ÎÀˆ`Ì2P‹\À/ÏFy~N§õP©EG6¤"`Aêúà‚= Äcƒd8ŒT›3锨]Ä\<}Ÿ¢Lr³Äˆ:•ö2±Ù†9)DE0ÿ¸c5C˜àFBu‹H阂!¢wR¢!õ‚ªªLKš1鱚P‘qœ%5BnˆCñ†DNW¥6½®(éÐeý׳!:"aÐc a@Éìi‚ Aºjú¥Ò8êâQê¾;«˜Œ/æ£T3ñŽáœ ¨g N ©¶MFdȼY!™x®;?(°ì¨qR_9e°†.‡‡!™FVaBtPcÐdêŠLdF‡b™½×¨×'ßeÒg‹Ç¥ŽýØÄ0¦.ºØsås„JüÎ ísÓÇÔlµ“„ãaåK5­JÿúO…®î½8Šç#îhŒšŸ½*­_EpA Tº8ŽAMEC'¡—Èj*ݑɥßFΛø£ÚÓX»ŸnÜFoÝ7:ë±Âv=[\(§.”Õ‘l0Ì!­¥1$tÎ ›O;Qí¦Mù1þeíŸgÅÚò”Žõ®ô…SêjéœB9Tu; WÒ©ÕDUu-/’µé%wl\7¥rQþޤaw¸š¨E¨F!VÆAºôkn4×5„B OÄBs O ¶Mnîds--ö5—“µR!W”žþÙQ~ºÂ©Ã:]Û–ìÂ6-¾DS\Õ-=ëÖütÕ£÷ ês°© ÿøÉˆÄ£0NøTø…ù-úMûÙý·ÿÅ׳’]Üž¢ó8Êû e)1*µðI©L!]ˆ%' r ãQA¨©]ÿÓ'5JªA¿íús NÅL2ЋªÒ~— /vÔb²‘èIUi4’k rüâ…ih¢·ûK›B î®Ø^-Ê ‡¥äFÞŠö! bùÇ ™4YÜfþCù«Ñ}iž¦m¶!¹-tÞÅdÒ¢rªL£0Š+âÙÞ%ñ>Û•²fíW\¹1upË•n"œ¨NnA_³µRrÔE× ©’¡‡âÐÂ~6L|lDô©[ï“üç)VaLt© ô=%’Zöùp·LÒéÎÇS™Sc>Ѭõ•3l09a@¨|>5íAH†.Ø]D²èjRÞo|¶b¿˜AQ #­s9üD9&q|œƒÓKŒtF¡ U•h‚(‚löV¸y¬Ø)ͱÖJQø&o¦ÝnšVÑЕ>öõ•ž‚`çÜ®gä—ÃíZ¥@é**ÖDíÏñ´M2+rÒ½•#ˆJÑÌTuK£²ñZjËõ+“?Í"ØC°¨ä?u[^LG´“ç‘©RÑâåÈr/¸V!IÍA¨Y~|íE²U{Ð…á¦E_¶l„Ql@„^ðW-¼ú¶u±Y¨¥;®£)ª´Ûigúбw- ˳^ÒFOE°9]ËJýÈ,\ê’!L¨NËv%Â]y3¬†"­6â˜sO.ÈTü4†ïÊõ–ârVãôš-·%J­êwåC*â6ÄZ„åH¤*¢feJ@Ì;²ÓðFÌÉiÑ2¿qs¦¢Rw»¼Å¢¨Pç¨ç“q6ñ[s}ÉÃPGä,¤z¶z;¥Or1HC'w‘S^‚WÒ‰˜¢>­,$ñkQù-hzx ­ó8ψÅn"5dyR…+U¤¥dKg”ä²ËŸÑ-®d¦©ö[¶1U¹«e„e!5¯E6žôi¦C™hóÜÇ) K¾µ$t®®ˆ5Û5~L%nãˆU0£;‹»¬&ü»5o+î5–µùAÄ(\(¢1ÌFÞ¢}0ç%EE'x:¹Ûù„NuUÛiI>-rZI&ö>URE{©\®]§Mˆåå.­4¢`®uJ*зZ:û©‰D[›RYZü¼VåYÒª™ê„¡¨µ”˜º‚'áÓ0Z³§ÛñkB¤v2uQ.­¸>®²ˆ)óûÛ’"§ì®^v÷¯ý¶KÒ^ ¤½©åSÛvŽÒ¢rW˜å1上šbrˆU1Xv¡ßU*«:ÒÝ}·ñeéIDEaÚ@¢ÌÕ® ‘?Ì›·E äNÆiHKKóDV²ËËN9Râ»’L”ŒE²ÌÛ•6k|¸¤­ñŠÛ}ÕÅ%„”Ò«xƒc…"†dýÚ)FͲ®"×Bcý´›%ö›²{‰”ÓÉUþsŠBTu‘}*JåÒ\ÆsÙvŽtœU»aümN6“‚;*Ô¼‹µ²e'¡¶Íÿrªj¶»VLgzINV±ìÄH‚+"]T¹›Dþ3‚£f˜µnuÙ‘5¯ÉøPœóý²ŠÈ1Ý‹0̨2Ù³3#6¤ë¦5¥z™÷Âå9y>PZþôˆ{0!¿AB­8 V*˜‚ÌMVá/Ì£Bª6R‡SxLÇ}Ã!(É‘WõÖ1t+"±C-ƒˆO‡!Ì)™±¥SC¦3A 9šˆXaL¥µ@u«Ä "³ T—›‚˜‚¾@ÐÄJ `6 >ƒL@€ˆÖzM!iJE*ê9H-‚ÞR¯RtM‰HÄVÃ49Y8”JÊk„ Á? ý#Z• )QPâÒÁÔkAЉBl¤ R8¤ÄWŃ“d!X$)´ƒ† R=ŒÏh🩊 &D¬,S”+…ŽåÁ\R ;‘sB†¢9`Ô„j™A•"a˜F߈!z}ˆU{ú€ô¡øêqÉFK“5: –.cR±¨R7ˆ¸Få"(f~I357Þ¯Z#¹h‘]•lSÙEÚ"ÓˆÇñµÚ²åÌ[×øÄ”ô£ ™J ª¹ƒ QŠ–+ó±Z¨Tr”jñ+š/ ÞJûjo¥kôß;]R¾\´¡g¤LÄ*å<ùºË㦗<…zV´‘ ‚VèíK]B²¶¥Ù]ùHÇUAä#ª4IëLK‘jJ¦'C©JbHB%[Ö¼WG-+ŠœFÝ8Ÿïã·9ÿŠËönòò4¤:>±ºî㵕jêBc‘Œ„%ÆR úuûÒ–>i¶O£%øOÙ̘ȷLÿшéZ‹`­…eóMÊÓ.:éÛߘl­ËnŸn詨3Tsüä÷1_Δ!Ä'3¨Ç"åA]71¤R—øòR+=ed#77Y{Qá@Ú(s ˜dA“>Ù !‚¡xzDÁ"f^N'€B‰HN0ªQ•…)Å ª¼ÛÀhE3C"b ‰€'¢e·¨ï‰ J0¨•ƒŸ€°9Ï"áJ(¨Â/3°Ôg‘YNÚ± ޏFÎU1ÌÄðA’•ƒ”®lGT&3›á41…F#á*˜ÎùÖÁ!\ìp¼%ÀÁ¨â€aŠ1éºn‚ Õ L`”…6B¨* E  ª¯ëŒ©!Eâ9 dt83šp‘ÃCEzkã¡Ì`R!l¬Z1êµ°P2È!Ä@ å¼€+Ñq DˆííAšÑœOðC¤üˆ †3Òì¦)§®Ð"ƒœO.¢’„F3Ùê0Œæ¬²þ;a^­›Ú+ˆ•e•¾u*Ðûo]#ћ˻[ÉTæo!x’ ëÖ¥ð©·!F*JU¨®W´‰ºS«!qM¤LSSé\Jáé2LQTg') ÂÆ‘Xƒ îQIÉ©u¢úã>ÿMò³[ª6Ùå%Y÷0ÍQVb]±Ê«&O©Èt;ûé¤]å刨Qv¤)LöO ü§Â(AuISUd?úÿµ¥J[¹{ OiU{Iæ0¢—‹_ªŒ•*!QÙC¥›6ýÇÛ„[­‹×1*üÃr=sñæÚ¢‘lÏÃ7¨ÖBT¹!l¶ÍÁØå+1=B†ÿÜQWõT·'½ûÏC.ߌQ.<ÚäB–Lvá ™,Η#£‹.·ñÊpÊàÿøÉˆÄ¤%Nù­úÚüŸþÓ>§Ù¨³’ź"‡`sèêùh†LLËrj’‡ÃCRа(…¨X™AÄWª¤F£nÆCh7‘½–DQ vÃ|—g ä¦}ÐZQcЋ9È‚èÇ€2†¸ÎÕNOÈ(Ú¾ˆD(ŒÄ¼æ¹ÄŠìŽ‚<î#`½% àŒæK„±)+!ˆí(~X‰Ù”ÔL LX…Q,­c Y.QO9ƒ %ɉÄÄ4ÈråöòqFbŒ|NBÖ(‚ÄÓ©!ø±…iPR(‹ÁDÜ$pަ@œ!X.o† x s (g@‡»§vá Ø>ˆ2Ápç®zq²B‘Ä(e4MÑ»™LndU$FÅ „Ééó±@H\•>vxÉò놜“BÔ>=ü´-ã¡|«¹B/Øè“<ËGETäR}MÌj°Öz{a^wvÚ²¡KGÃÉëO±®ŸAÊ“¢Píå,†OwD%î‹Cr4£H}¹¨Éd¢¤~±y÷„³ZBêyÔ˜…¨”1¥3‘‹e¦= Ê”Rp©#Uz·(ÑKé–*êb²¬RÕü¸þ¨å WÜt©¬„¶êg%'¼U«µÈD#ÑfoÖt2ÌM̺Å3YP¦Ê:%¬FZYäâÄÊæîØkšë‰×–D¸³—dy؋Ŧ-¬×J¿•®ªÚùJžÞ@UJçÎYe]ºrªq„ªÔNNнTd½Å+.He¬²KkNFÌB`Þq R9ÊI«š9Ó<¤3šRÖ^ÜI+ð’ËP…x—néèAæ.¬Ý9(8…M)ŽZIOzÍò ‡4Sî&tÈ!?v¼-Q•s(F¹HÇPë"ECòÊ™Rˆ¤¢"+HÆÅ½/.šù’"Ú„k’ŒDk¯›1K¤ó;(ŒÏnvK¯öÿAzæ—À¢´ò­Xç8ä„IÒ#…,ÉÌ%Ó©úŠI˜«#é8»¶ÉcCÃL`âO’ÒKeÏ9O!".ˆ!”y\2qH >(–tá·î醩HÍ1=¦ÍJYóÛH“N‚±8ÄR¹;7wÄð…OÏ©‰C§ ˆ\¿Z#åÕ;’áy二_-ØÕvÔݨ’‹éõ- d‘,L¤ö7°þ%¾Ü,ˆBFD¦i ).÷czT8Ö"]ŸÒwü ™=²ækËuòês=ÙuÓÜ“9Fk¡•®1 I L»Æ$ʧ7Ž—‹Ù‚ñ>¡f$ËŒ ‹ÊôrŽ!½‰WÒV‚™ù×{\í}ò܉»M6È·Fs•Šä`Še«¬«:fS¿+1i© F¨J·iZåûÖÚ>{0:Ðtê9EbòcŠ#¸ò®­ ß,§¦ÁàÑbŠ zX(Õzjò¥I:,0 fZmu ¸¼’i‹õÛ/¨‰§òâëØ½‹¦R5˨#ÒSurˆs³H'©,Ùâ$„Âî|Ýîä/y=zåM“Ñ È3Éßå@¤Smé´Yß3fTÂ%–X)lj†Z-EIŠ—5 ÐÆòdæ~1]þÍ9º#r R±)€–î™'’§SPÖRŠGH¤J¬K­BõOåÖ¹Øä¢û‰Áy†¢~¯ˆ$ª—]c™tão.PwJ¦hk½ U4Õ?M™TEãù;ÄF«•¨¶o¸“ɦÎøÜÅj¦Ú¡eoزÜCƒŒ8h—$W‰òp´Ö&ǧZS!ʨP¼¹c’QÈŸ—ÚÉžé\mΪ˜‰fëý~Zfªex¾Má뮨‡I]j’Œ0¡F)o9Œ)å ™Ÿ´6P´ǯK%Íf® W7½+%’µi+3Î~fD,„¢#¥W0†Ô«ýn•úåWÕvE÷JªÄO)E4¬ð‹ÅÃe9ª"²cê¥EöÚ“V-Oëå£bžÈ¼&YLw_uäÞ:•h²³ Â¥>دv\Üºó´­ S êw@Ä`f¶cz „­ ݹLLAK¼UŒŒ«Bˆ;åEƒ ¢…9àŒDRO¢Ä¡0mÂ"Ä^â 5Š Ž •P‡¼ Æa PÊMÏCB$PE¸…Îâ~ërõ?6›»EdlÊ*ÑT¦A¨R3Ùx!îÕÅÚ<"¢Í̹³ÏWµ‰‚ŸÙÃÚ3;“ÎÄ"ªÚèB;’QR(ô7éÛd•ݦVù+Ùdc8§T½ ­¤ö(bq”S¾!6_ý÷+w™™¢~v&áìÅs”U&i„ã4S‡WEr"v¾êc±S‡¶&Ñ«­ˆÒ1›üª·é’Æ-ô¢j)–‰%žÎlÅ™ŸV%rØÍ­•;sn?r5bH…WÀ‰Ä4Ï…/•ÂŒ¸ÝfþùJ«ÚS§ìãxßaa»T¬[¿'|™Tªób©pN*®si Ø)“ôÄtµ¹%|ôönj¼$L9N›Ä)›¶˜#ÿù†wñ•ÈÂ[™¸ÚÊ͈äM›‘hêqHŒKdÙíµb”G3ŠBiZ˰ëGYßåþš¥–ZiISXªCÉ\NÄj¤! ŸQ•ò‚ R¿Ìr·ËžÓè¹…ªí%®ðÖ]eò•™Œô]+b‘]ó~íµÇTEoÌ"¨ŸmeSNwÒï vb‚ ‡ «–o}·¬Åsüò=ôºi+³?#¹Y/q×øË)5XÂ*Iu33´ÉL’®D~ò2“÷æUóÒÆ—î’qËç¸BRÉÊ&æTÊÔ$B®¢å±LþÃÙÄ!©n)GU!"ñêœ[’E†Ø¦ìzPKq‡B*iUÞ®3K=®žoAK«­V1·bŠM£i0ÕÚÙ`¤O®Ž´ûiÈþf9É5?ŠëIZÄO±xA0Gº'Ht«·¯ñ°•Ý+Ù½ÓGM©ç¥ºcÅ4Ît)ÓRš ä+±œŽ¿äÍÝ)݈¦GÁ¿2Nî0èi3ÕZM£?Ñ‘^Ì9›¨†¬Y ½kNlíu5KEôf¢R’õGÿtö£„•Óû¦J³"|ˆ‡*Ÿn⛞íU’вœBŒ«7ë‚= œKöÑ‘VAÌíDˆ)íNÔAëÅaÏ5³XöÇÏSkÙª>U>Ž+Lž¿Â™Jëdl_Äw_ô!ËV·ß'%tZ‘{·ÛXô9Dn'‘‹º>DAÈãuï"ºýéf êßÏ0¹ùcnI‡R_܈¤@­:‡)^0Á°ÆpâR!² €•0š’ˆÈž)Þ;-1ÆS¸§¨"š:fö¶é(¢h#¦8k‹ŠA˜Ã‚29 öR™ù#v)¨´Ë å ³š†"2>6¿"ô,ð…ÃÕGÏe(O²„8&Îþž±P zĆ„„Ä¢°Ôݧ ‹×YP#åpÆPí˜ô©3 îð†G6%™Bå!Œƒð UMŒt‹µZ º\ƒsNª`D Dlðcx•Psª×â/àâ‘S°.R;û %0ŒDB6J\œ*F1I¸8r‡91êÇj;Ñ˘ƒ3v‘ˆÈ2: F¦òM¨YuN¬…‡õæ@Ãa€“Ž”A0lâcÀêÁÈ)Ȇj~W»R.§”¤1HFc Ï”#2žeM‰ºjdÂ÷6NÌIü¹\êqpŒŽùÉ9›44G ÆCUAä>ë2&n0|7¥òqƒ˜¼A¡Â_B•Ù‘j8C”RáËŒ„Š,.% e×2 ‚ˆfŒ41±Åœ@ІÁà«„Úâóƒÿ•8Š GQ&WÀ‘HÃ1Ž "‰yÈä°BèMy —”ýŽÌ¢$zs3´” 0F¬iˆ´+X] B·e9xáMß”ž’˜´Ñs±¤0!àÂokíC  ŠQCŒ,,Rˆ!ËiyÂ@ÎÏŽá‰Á\HˆaºÑ}(<ƒ"U C‘„ !‘6†! °“é‘)%z*„DV­Å¯¢~|!„4'k„Ø@ñ¸O!IÄ!‘P”‚°åc" ÍpèS­€Ôl•rUQÔÙQÝGäèÆA/åÄ0ÉóÁÙL)›2E‡=R0%F¯E£ Â)‡2!×Q8™aºp†)c¦Mý] ›3=A„Q ™óˆŒ ngQ\.ÿøÉˆÄ¥"L9 &uÔ ´#” 2Ϥjxÿü8gͦ¯uí‘ âeYÊ•¥sœå*©Ž—vºöxÍóÓh¹ïr$¬ª~šÚ³“)V!Â=Øé¥ ŠA2ÌêÝYgͩ͒©L Æ<ŸùYíMÌLÂû¸¥O¯ú§ž¿B1N- D'²9½ˆšg#‰”Ñ£cŒ²[$)$¡ Dwås@® SžÒl.[¥Ëô䣬„T›a/û;–-zWåWg+-?Ð!#Žc7{ñ3H3åjÉS]ˆe yíOelö&*\˜AÈÔ$‹Å2ÜÄÈ|2ÑÖ-WÚ„ª’‰ùô‘2Y)‡ÊnaœÕsˆíUW©duC?Ä8ë¿K¿{!6–$— !b|áNmi…E™4›T0ãŒYŠÔ ¼Ç?õ}MgT.½:$Ù÷Âô—þ"êèî)†!”ew9qB±ˆl:¶±D7nñ³xë*£ß6Oa\±ÿÙQh)Vc¯#Qèèr;QíÌ*i”2i¹Ï¡M—í»5 2Œêë_bž•÷¯ŸTkíª”Ìë¨á6µe,ÖúWê)Izû#Ä#fq[ÅØ` zŽ+ϯˆûý¤R ©OÜ›‚åÿâuiÜåNÅJ-×Lur’e(¦tâ5Dã{wnTKÖ{¨EÝ®Üьڪ¥³¨¨¼ÇN4¿_nøB-˜·ê[Ä­)¸J½°–Uh!Hõ_+.SŒ…e?0A´]A3hZ»VØmþ ª<Ÿ¨Âc äõ„JŒ£ˆ (‚“ºŒTÜKëù´jJñK^›¡?!/•”ÝÂ"Ì’*yˆË)U‘“•ê„:~'Ão¹K÷Ÿ[Ù;/BÙô†)Jé§F¡Cn¬¨Ž%Š"våÔ»‚4ž ÜIWâ—ÚÓ#áÄ#x–TÜjqJT0®oŒ§±÷örârÍ68½X¦6V¥hدD²â„2¥*ÜD¾«‘ÍËv6á~Ù~<ÚNî7ó¼ƒlKˆ…E#¤A¥\ùëÅ£#>-Pª©‰^ãðõ§1ø´˜ú!QùFO"•Ÿ—FPaM6lîÇÁ¤ùqÉ¿ó‘ßs%b?‘TE³S;êKÄmº…R*¥Rº|©õiÒÑ;–m/ ébÙƒ¯@ŒãC[ ‘­W7VL·H¤y²Õªµpi?3+^jŽE2U”¨;UJ¤~õr*Õ•e7ªü_‹‚¡‰-Š®Þ¦)„ÂB”’.q,7ý¶-3.S…#²jU÷¾tØ&rMÜå·,+;û¿­Ÿ÷©ƒ d%%c–™iÎÅô*HÕ3aë®_¾?´Ïf˜‰Æç å æûùŸۅ<™¯FOÝ’ôçB‰ŽmnQ bÿ­\•U9åÜbZŠÄuÖ,ÄJø¬á­T)ÖBÓýžŠ†Ê:£ Sg£Ø‰ËñPŒ0QÝUµ9„Ú×$¡¾ç±)ž[}ؾ[(O%Q¸dŠR‚•-ÖNl‘DÃw[l£«ÉfD!¨Z&¨…8§sˆìMZ»î«$qÿzšK_ãI—º×„ˆJ®¥²èœ‚4Å(„¢ÙRšCŠ¢Û qSs¯è%–ç"öRš/¶*n‹»„2 L䈴éh9ªÙ¬PÀA–[NÅ–Õ½m\{)†¹ÄBF!3Ù=SO®ÜÌÉj+;qu9FâQùZv³*¾Æ­b–† ®:ˆfòœÄLÑ‘L!Wyl„Jàž›ª¦ìý˜¸D/ ´Ý3¿¼æ5–‘ß|®¥! 3”¯-[O[$Ë{T¥B©‡íâŸOèäùžT­¿ÿƒs†r aQPTD%ë<÷Χ–‰L*g#ˆ¯”ÔÖË©O¨ŠF0åò¥™˜·éZD¦ºs¼³j]²ŸçoÚªª•ÑB)ÖöFR\ÆTt±SPI'µíe¾*êgÙŒº²9X‡aÛÝhnJ2_N¬Ûèù"³þ“[Tì„üÌ&ëÑ9:Ĺ^e”"b#'j³-ehÊQ“[ㆽ5…ÿßÝy÷XÉSe|I7õ œÇWç)•ŒÅq}HÊËy㢨FgR¡„t¦˜²0Èo†±†§èˆ–iM/íÏÞºÖño(íµs„Ö)«Á†â$°t3ˆáS FãĦ¹”U1N9Lt\€"×îÜh™` qƒƒˆt• ÉÄB.A•æô‡Hr> ª9¼)’*ô4•Är˜ GÅ&n0&Pœ!¨1 aŠ‚1H.7b{¼j¡Ð=eJ]ú–£•¦¦†r!Ä}»Ba”Å1˜&`¨>´ÎA÷ÉÅ7ÑèÆE AÄä$₹JQ…"! CŠ 1È9…¸ÅܤªDá_)¼º E1¨Ø13œ2s_ÅEPÔc#FÃáq¦Q<<^*ú{ Ž±Wºz¥ ¥e|Î2™ ”ù%âaÍŒ]{î2ˆŠMIÑ5TôTc;j›)ÅWr+-M‹t™uÌö,»eõÂÑiSÜ´d: ÿ‰OÚY,ì"Ѝ pÉ„úÿY(ø†¹2Éb!Ÿ·íûlG]¤j¦¹jPÄ91½›‰rìš[°DcÐ¥–¸* _Fb&†r•)ÄN›ÏQ #¡ßÙ]<¾_Ñ1sm—¦6õi¥£Ú‰ÈB8…\Âã‘Eeñ4ä&¨*'ñB¶'–sé+vªq ŸYÛÔ²)Ví«¬'Aë¦SËR‚˜†b-ºn®Ëü&Y¤z˜ê´4WÄ éLO!ç$„qȆ›·œJÕû&Þ'»„C7:0µm¹ê/šìÂê’¥ ‚![S“†YE ÈÚŠ?ÇÛuv»Ó"m×,ýãlº˜ê˜”Dþ¥ͬ¶O«ÎÆaS6ø"ú(ÉêMrò‘8ÏÆâL ´%ûڳѿ’æ G)Zs®_^»“iê†~2{’âSÛøª“á’‚†*y‹íÆKjͤUG(…ªëë=ý¹»ÛÕä!] Sqé‹EéØ3}R(ˆB;6-)ͽöÒÒÿ«vçó,W2º§¤¤×¤£ºñnÅ_)Zòqˆg;n­S»92›Nøem›ßX‰Èó)VYsD“[„á †…RV˜÷jyø¿¶öá×EyÊ]§3‰ºJZ¸ŽK ¬´»úûˆËût9(WaêÉ3tí!9ÑX—TÅuV:é$‘שjð´ØÕ|±lØV‘1‹Bwþßþ{þ­ÿ ÿfÿ¦?Íïå ¡(Å›‘}ØJ>x3²tÉ•¬´¾¾.Èt¡]$"sõ#“nñÕ2”Ù„+JÍíZÅù4Å™¬LÚ-?SIV;PÇreˆÇréVeTͺ•¾Mê:+œ‹H“Vø)H¾êHŠ_Ä2XV©–©VºªîjXå[ÆFÑùj*ç×µeRÓ‹É#wm˜ÍGݬóêVÊÖÙ90*¡’«c &Ýn†cB"j·”žŽS™ì´\5Ç_k»X$³O©EfzŒ‘gÔsá½A¦t¡YêË"u‹é¬0·)HwC¹JRO=¦¯ŽcHŠaTKbo-è!ך™qЋ÷¯F!Uuí–Tä=ªÇ§"YüM± êòY¨¹ï†VÞì"FÍšË^ÖárÕ²{ˆ"”Ù»ü«Š)JW?òJ0ÇJf"™f»;O/M"2íääôƶc‘°¯#+H¢Žtÿ$Šëlî"¦’‚f¨Ÿ–êKnˆ#&½È²¨UÏOF^ê”@…)&é¿K¨Ö:‘-}}±R¿oõB»å&Y]˜˜E1Ú¾L¡©ˆçzºZž#ÜCˆÅ=I£n¿:ÑR¦0ä*Ò´&)‰Ç%›ž™eÙ4¸†3¥ßm§'"Ü‹fBýɪD(ɉåªîȤR>#Ä/Q¹X¨…iÓ¯±$›[׈ëGTÏo'.—6›ÎuR˜qš¢íñ™Ì)D1ý. D;ÏEÌ©¤¯¥zuιÝìeO}º&kù{‹’(Í”Ís£D¦±ZRJ(ÁÉu3HVüÆ3šAÒE?5|R鸓ÎÞ/Vï˜^"&Íë)×ùÛIÆBâùÛ¾F©›PAMtîÎnŸïöSÝgCº&áˆÂbKRFg3;^î‘Ø…•µù°U) ¥é9¨†^ãŽWT‰å_«q6fâSOô¥NË®åyY:”©J¼Œ©3ˆ!‚;rªg-WjŠSPøüvLas»¸•ú–í~mÒujäN_9Cñ[H^ýÓ¸¥7é0¥ùÊÿôÎLl-ê++{sS;ý$„#9D|Y¿8Qb‰˜…—gyy·ÌŸLJ¢¼’YuWÚ³9ÕðÄ;r—gBW¼QL„êÊÍ¡ ZÍê(QÒ‹tS.ÛHUÖ¥ ãÜÔzªûh\ý›Ðú£êÛ”ëʵ¥ÿDS j®±¹œìVZ®ÊÄ>zžã¢&I²óvÚøw}^+™TšÙé¬Gˆ¤q×’"¼…ÏÍJmfy]S)¼nÚ½\í©UµºŠEºc–åÂí©ÔÖ×tù‰ÉÛ¥Y³²’Œ SŠé’§\‚ˆë‰ÌÚ¿æ~YpYt›&Ô>~+¢’“àjýÉ…^*ŽYßÙD©ŒRFÆC÷JYŽÌI ñÐæ¥b%Å`È5n,ˆ¿äf©,¸"kä›Nº!Ò¹¶ÅBŸ]+r¶ÊT«¢Äõî÷všÉå"ùYJé¹u§®Éô¾*vÓN¥¶µ¨¬Å3¬»RÈO}ò"ºh‰Â›»Q}Cy˜_·ÚÂÑ-B¯¥±¹Èrê5^UqH¼ÝNQˆ¨LY{oJœ§Á2Ep#½œl ö‰Í¡DÔÄäf T¶(ƒd~±x^ïŠ!:Dô1âü¤¦BV†/D¢1˜ „„Z¨ Aé† (aŠuíÕ•˜Aa$tÐÜ„#ZQâSã Ž”ÃÞ9t=„†b 0=ëJ!ÆpJ(È@Cˆi\ÀÌf8T(Ƽåf¼ÁÒ:¡G™¶a÷=…'K·qð!ià"·À¨gQb ¼sÌF+6â?÷±BpµìBÅ! C ¾²“ì=‘*)‰B0‘Æ`dC)JB ÀE§U*ðp¥·bº¨µOÁÅDb5Q…·3 ƒ%A„ËyŽ@Ä"qÜŠHhr¸¥.µ4µQâ˜1×*á6:c.ÜÃŒßQUæ(ö*!(F$3»·ÁN;Z €aŽBtB>¨H¹ !ݱÂs!cu¥ 9hB 'È ‚®%Ô!„ °‡ýÝȃ!©`à¨QÈqޤ[ˆG}”+;°f1?0†dqc%A+×UHe¡£;âTaÅv2j‘ GGʇ'C ¾ Žh ‡KÄîéq’snè†!|‰‘×… ÒŸ‚lE Ôfœ¡²F|ã›1–*ñ{V4dRðÔ(ƒ! B!¡3šˆ¢¨QÞ*ÑEÊÄ ^ìv(w÷åÅ0”b1Pc3÷¡ˆŽ£‚Pî–ŽSã…%&9„bSPîÌ\2˜#³³¡éfn#Žg¥KnÆÕ?Â\t˜S®/–)XΔr§ÑRqËJM…¢RŒ½Çú«^½éˆªÅ#©’äQT«t°‡M;þ䨔1 ~={Ãд̧÷äÆÚ×çªHøRQ2PÈŽâ©EpÄ¿}Öb1 Žrâ”E)'ÂíQ—<¨G|©—Ú¯Šê!Ýz¾Ô&®]Äi¢èI‡©ð#ï%ÚwKo]©•e¹Ø¨aTÈK(â6¢úisèÌOK1VùÛûjorÄû­ Tn¥Du’1VD¼É’ˆÛ’!_•hÏÆ“›š’?2iw›Éøõl- q‡'#éÚ¨+ŒÄ¿V@DܺU÷2ù‰Cw½Du¨‚-7;%J•hWR”ÞgáHÔ@š}DÆÇú#Mô&£ A¨é3òsµ-Š*YÊk޳”Ôzc£lÎh¶‘ °” è¤r8Œ£%¸Í¢Æ:|̤ùÍ䟔«ß ª"ôat>s]É~ÁJ”AŒV µÔÙf7ÔRÿL*œ_U0qĆt]ÀX$p1:†fÂ¥AJjõ †ìø‚hå$BBµ+èÊ`nG*h\»‘ƒóáS„šŠXáCB˜b˜aJ㚈l0ØÁB †š­„ô‹ßÁõ¢”ìQGRwÜPâvÉŠ f=¸€¢š©¹ ¤„Ä(Zk»ƒÐBuT ¨B‹ß^XÈ"—˜Á Î,ZT­S”9ž°F"ÐQáB CaoF¼`Œ %©ŠÄØ;P ŒBé9 ø£ˆàx ŽÍÁ˜D.\‡ÿøÉĦ‚Lú>ù;øöüöõ{õ=´"ŒUªg‰ü`e‚&4F6aC;ÿVÛPnmƒ3!˜°â7‡¦•×”¥( sÉÏÁ0 °Œ]2𣎆ã:„Hœ¤„7Ðììv¬k™ªbqeÅ[‰”’Š3’0†aAç!Ç£ú“@ÈHúÄ@‹¨0 É!,0T)\§<.9yùTa´°8ùÒA£GŒ‚(Žt DIDT¸Ä•St´aœ4à ]RÁ9ÃP0f‡qŒŠäSóã‘[+™D,~N°wèt“ (fš¤_n²ñŸ`Ã*…`Æ"²ˆý!‰PçWèäZ$ ƒ‚ H$@agº‚¨å¼yÜôê À†.†Ä#RäUdæ1¸Üµª¦Äª¦cVPC`&P‡~T ‚ú§u8ü=%cf(!Ã"rKQœQQ7"QßBl…ïÁý…‹Mu¶phà|ÏŽºÌ3"\õÌ!ÊÈL6jEJS8øFLb40šâ™x¥âú¿ÁJE ¹R,¤¹ÑÛa‚jžEr€×ôƒ@Mr2;„wlG>¡Á@P¢ÃV£0Õˆ aÌÃ}v©Æô2Ö'9Û@Êbr/1XEi‰B;âZD ~ZqÙe&ä-sŸ€€€Üw!…1sSj"†U É̆Øðsá‡$:€£Øˆç!Èñp"´x>¦„ÁE qPÆ#‰J­˜#¯âbNÕFC†0À‚ÌC\Ây„Pçä):«2b2WãÈ7Qy^ÉÙ˜¸T׈†s×EâB«¹ˆ% Fb¬bé«HË™ €€1©J3™Ì0Þ°%Àw-¥ŠDä2Br@CsÁT.à¡P Ù ¡2þlDÌÝ9"D!*z÷!F†º˜ ‘Pƒ‘Í&R(ªç\0d(ø †!‚±‰beB 0hªœMHÂ|ެ+VâЬ‡¦tce+uÃé~Ý”T5ƒRt7™diœž!¨FÈŽû›A¨b¤*ވ磊uâ„8«Ò£<®mECÈ8È Œ– ˆó¡È’ É> F4¡ zliÑp©ë”9ÇNˆ|SQ¨ˆÌ»ç%†Zã‘‹ ˆBƒ:n8ˆ@Üvû1*‚P‚rx¡u6:Úöô‚ଠ&#äÓdA*1»DNT>°a 5 £†`c$#g\x¦ã¥0í®eÜG½K…Ñ[ÝÆu » ðœI"© £H̓+?Ì$"B ØBï°I¿², ƒÔæLÕP1úýxl$“Uúú³».L‰Ø…&Dñ1ÑÖu…)Š>D&Æd‚Adˆ”ãÛÄÎ1a3[Bc1±(ê)‹)ÊpP¯-¼aäc"v6ÐÐND!ÓiW½ˆÄ hn7dÒ ù[Ö:UAœ„8ž3àì1"ݧC†\@æ+JסV23(Ý pÜc+<«ßNg+LÓl&BÉ—Xe±ÙÅ`sxœ’¡¦„akÃ÷æ+%cFF¢R›Ñ…ÄS9P»¡^‹¯Í7Y+ÕñÃâA’ÈÀn äÐØJŒD`\ÈaS§ÈÄ%¦fÃJLQ•ñàüZh|Ë‘ôf" ªlOíKõ*0B Ú’ œKPá•zAìS}Âi¾6á겎K1ä1™†ì˜‘ó"¢T ¹7<ñ ªUaZ¸Î#ˆYŠr:|d)²"„ñ•;ŒR="1XRR(ÄÖ*hXÊ45âA=$¾(Ñi¼3Ì\ÂÀ«f!FQMÆb!™áÕd7Ós»ÆTx°Çf…¦”áC<æEÁO aaãeFpB01ÅXI r&˜œ¡gäRQ!Czj“DdYØì¨.’lE˜Éܬ…!ËèwmÉÍžºî§ÓTfR5ˆ¶-(B÷3·ç+±‡)ñ gs,Q:õ‹='ùÇ|gEda{ŸI DøáL¤ ¬5kñçÐ@#$Ke'œ§uÓ_‰ù]óîØG˜¿Ä¨ÉÝ@Â>‰¤DÄÁ JuÌ^§uZBû±“I"RľOÜ}ô :´ù¡ím òÒ’n8€Æcy8È&RH’rM·g!—©f¥CxK” …eÃ9ó‹ Æ‹6Ë HÁA^²È)˜´\tV?<Šç(+<áÇ-yëHÛ„XBñFëLiqk”•ï]†)dºª1$ÏÊ0Š¡ (r½FïaLTñ%Êæ¢)f´I{B͹Áœƒ ´!˜Y­zEŸâ€ Á–(sc Q>ñ£Ëm£á>–õB0ƒœaJŸÎ!‡ë_3œ™eµ±é%ò–É$a„5¶Ø]“¬S}·Æ$§ A¾q\KôŽzÚûíbQlDïžÉ„õ'‹ÚnRÙ3™„ä¨Ê …¦1È‚£ˆlÉ,¯ÿ'¿aQÓw˜¤ÆËigÆÃˆÖpP1Á`KÀGëQºýÓaÌ×<$Yx3¿ÎÃ_\aÏÄ> c °€€ À5@h!†;ˇÉH*ȺLö\ôöó¶ò±ñöñ‹ñj´"ì@¬hhHü|€fîD3Ðgó aJ—„q[ ‹M›©©rí¬)ÄSªïÚIm¸EröØp§Dõ»OüuJï{sQ.Ý5;”™»Î!Û[Ê1Îdsf'©*¿Sûrj0‚=„§‹}A[M–a/„9ÖÂ!<Ž­«‰ÆF)N"ÆõΘOêê×›èÆÍ=©Ÿ™Gôû7géêU”Ö]ª(®†YJd~Û%ŒçuyÙ _ÕuÔ6æèeÌÖ!§Ùùpèè–¬Õ˜Â-¯’i¨ŒËÕzªôBæ[~YùP…õ(Š”\g¢”US±ˆ&ã´J±8F·îD“p ìj}‘‡8UYRæÛoíðf™Ú:¹ˆ…RÙûûÐÙ%5 \bq¤¹óÉž¸Tj*8ÉUÄÁ˜¦8U³éÉT2]\z´×¡zœ+Õ…ÜÎyŸ,%äžózʵM)Œ8qÃë/ò­þ¨efÞ=•Z…á·9Ÿ¿0”v*Q0ÈvÊæfU«èæNò]ŠE9ò´Û{Š‹J%²7˜ÄR+ºê§í3˜ÂܨpˆÍòö7’™»¿ØÍæoדS”&»[ê¶æŠW(AH);1…3©ûQ;s·„ì…!rdÁ³mXòM³%×.)Ž3„b*¯Lkzë¾Ä(„A?il¿3u RÝHtŒî„¢ÎGm\!(¹Fö¥Ð’é¯Ès¶$B¯"ÓøîõŸ ´#”QCÇäÌMÓ4keu©«*×눤m©|›‚û5UlÕ.æ8­¡Quê2xÇËëk#¥:ò"½qîÉaÝÒ·ÞÝý5Ï-XvC‘Kô(‹Ý&šÓ½lE2»RôÚ¼þ¨d3“KŽE]d*鋯H‰¬•^b5é´I+ò'¬ äd¨¨—¯r׺Ä2Q|Vr‘‹­Nl#W(ÝÞ´5÷?½Q%Æ{¦XªšõN:”ä2"¬§dò2Ñ3š´§!ùÈT^©y°R½*[p•žn•Ȳh¢ŠcŒg>¯²&bÙŠ7<Žø¯ä¿ëq}®b»}¸¨¸’úËèªj;¹*ó7©¼—“”싞ØD ÌVW«±8ØíU9œ†:pW™°Š´Ñ)’[È~+¡O™_^Ç£ï>¡ø¯‹ÄNK«=#³¤dÃ,â3œ‰åê©O×ÞÄ3E;Ñ$É©ZSQyšcÉÏt[6rÕÉt1Hfù,µú Vv]Aª І¦à‹žbbyÔa•œ¤r¨çl´$0H„6¢r½”½¨@Ä"A €­f9¨_NOÙ9Ô+S)EÇ "+ ¡tÌD T§5c#œÂC/[æR²Š40Ä +Xh~ÁÕ…¤‰Áåâ}”Šv=Dè™,dxW*!LB³a9²|¥ìÛ›¸£Dš>~B¡üç¡IÈ¡pŽávf1Ÿcˆ¥lL˜Nèr›Oè8ÞA~=ªL AÊEà‹0Q;B\J jÕ„V&Œb6ÒV§d#Q)‰„2! K®"CCTÈ)¤'˜“ nÔ¿s‰àä8¨¬2†AŠèƒ dTÑaX„Sî$!'”æQX\””áoˆá(΂!D܄Ĩ„1 2tY¥#0³”AйOJ„9ÍþõY2'H±¨ä˜ŠPÌC@‘ äQGÃŒ ‡qþtsHÕˆjØ3//aĤÔa~ü†KMÖÌ&¥Pœ1lsÒ^X1HQ1†>ã6&;TmU¹ˆYŠl\ùÅ#–«£ªÕf¡FÆB€Âa:LQ3Œ¡RÔÂ’"x…eª]¥ Gxl B*C¢ E7b 7¹½é0…—">JÂ6"X.Á}C|OIp•}B7ä':Ô¦ˆ£bŒ¦ŒÉJhRP‘ʉØÎk`gò Ìrm3èPІ+Z¢g;ˆ'§tGc•Ä„ÑMŒ1¦&q¶$Gª(‚†EëÿÔ7„ë1ȉƒ©*9IóEq냉Ö)$K*úZ«dÂ.£ÒK2¶÷ÑYUUÒ1•Ú‚%7¹ËÙø¨AþÈfÊŒdÄlÂ+·²œ•ÏF\n¶«Ž®‹Ç*3ù‰ˆÄ|J]~s4u$”É’èIa/D“T:>'HÄT¾/W8„|aKò*=4&Æ“Î)Zʲ1[iŸ†üSï(èI¶*éä§>34MΈôì†ÎÿbªÚ‹D'»"a-´÷ïw3 Ç‹£†!±¬[Iö¾÷XsÍ‹B’¡¢ÿÂÛëAÍ(‚ !óð#˜Ë»”P¥çaqË6’„]š4÷œSÚò)›}²…ÆŒÌ2Zk‚­­Ì_Ò)躗?æÝ<ÕJI¶iì:##(ËG/ˆCóõU‘ÄYFª%¥ã¬Œ”Þ“Í»µá-æÀe§òÎ)ÊìÐÃð-ìudÚRŒ×khC"µÃ—„’Iæ¶=ˬmN! 0a€ŠGÒ3¨Á\R£>NZUê¤ï¿}iÕñ,ÔÊ­³S²¥Œã E ´­Á£Vë¸{å…ÝJ•NçV¡Uk¤­Zœœgìä(®„Lš½d-´&›%Â÷¢os'Éæ0«¶nÁx­ …ÀxkAÀïÕ¢Ûqë/¨„2\0±ô;,ô!^ŸË6œé€"@~ <HU'Ÿä" œ“€ÿøÉ˜Ä§ŽN…€&¿ö?æßçïîOô¿ù†´ 伡@Qí¨qGðnÕÌYzŒ¶åª—ŒÊ&©Žµ­Ã¤Ä"¡Î¾ÛEYE2¢î©ˆ‰vZ}ÈĉZ1ùηVl·ókçXƒì.§Ý4y.ÄAJ%‡þ\:øBŠEYh.›Ô1Õƒ!2X‚$´¬DmÂ8±njU”!<¬fÉé“gÞªP¤ñ“¾µa •eÆiH-|1ÔK΢ &6‰ö³.!itºµd ¨[Õ å¢P¥Ä §+Üvi!0¦CZÁøZ?{/ëµ™Ðÿê÷5ržæe÷‘ѯº7%j¤LÇ¡?:¼Íª1Ñï+·è§# •}L̲௉BR–0É^T#îªH“xðö¨p†-q„YöÂ!-çD‰Õ)k ‰Ôq(l¼éÒ(óe6ânË7Ôb|²•–O3´oD°¤AÝTˆe ¥æ}CqœD»[êTÍà¬ÚüÚÙ¹¯D*6Šë¸‹#{øå´ãäqLWò%=xþÄV5[„L#ÝÑq=fÌñN~ô‘«J12‹jálÅc‹LSY¨þ0´6>”ÈÛ:'Ц¥J‡²ÓÔƒ+Ö€ì‹kí-WÏÄÅjã8£SÊ‚ø_Rج֫†2w C$B‰,]RjEˆë»ö£¬§«†#a8Õ²B2e_ˆgQò(ºm"*ÄgE˘In¸j÷¸ŒŽ£]L$ÚŠ»”Ž#YGò×Sçq ’ü…1+K~ál#·aZ7àŽbÖaMbª™Y+tª¨TB£[лØJÍuí£™âUà NˆÌI-8R ƒ±U(:,µ#=0£®UüÝ­6 ã!¡ÿ7‹ôVb,‰Q„¤é¸û+ÈÒšV`‡Z®T´½è©ÆTØ0Ÿy®¢ñsR¹JÄ¥î(†Ç8öQg|0Òœ§ldËSÈ•“Arã—5"’Ä  sÂU¨¤ß¤‹%J ß,´ ™Ö­ó_©À¨%)“9tâbUQY’ýAJG…=!믩6uª”ÚÈ“1–%ZÙyêÃrÈ1akåLnA VJåp´)tǤ¥û$Cþ#X´2g·r‹ml¡ µç(dPì–Èë†r-ŠFù¹ÃØ*:ù”àŸ¸Ú×3¹ 2*ÕHœ”ˆ¤®«H˜t(Ûª\j`¶QœójFBdƒH”dX†3%…Éõ”R ê! ŒŸ$Nl%éÉi ¹˜axµ¾Öo±Ìv<¢k•ˆŒ› 9šf©(™W*ë†å¢),þÔÓêq3‹iZèŽ\Ô)Êõé nꔄÅq“:­½ØtÏ%f“]¹Ø¦#ˆ#òãš…"’\Ì!¾Eå}sÉ7DÁ8I*Aɦ˜î‚VV!ȨŸB®hËs4ͨáΉþL0O®×fT O)îï0¹ÜI%§¸îŒÖ$2åK+vqÖÅ Tfü*ÜÛÍDvnú7y®ô¡ d¶ê‰ÇÆyµ1H†B*Y.vÍ®²þÔIŠ–Ï)ýh!6”¸t[) g) ÌÉ”íz»˜V¦oŸ·¢çÁd|±ÝÛÆ¢†Š8—B#¬¤r­èf 3„Vš%éöõ[;j‘÷×ON›ÙÆBD"wÙî+ùìp„‹UžÃT¹f¥M™Ä»÷Ó •ëQ¤-H”J#P·]ÚÚ“Ž1†/Z\7]YŽþÈèbÈÖáx»7ºs ÚæC¡zÔ6ýjõ ºçé“7š’í$âjnÄBG«eYÍbÚ;((Å+Èß­ÎŽǾšÜ‡ÞÍâ#+g;3uæÙñXQÊS±ŽMD[Y—Ðæ(ãF¿ÉÒùW¯rw˜Ae6®+:fQ·”‹),‚–§{£Ü¹‰”:é¨]5JJ©îi˜˜¯ÅA(» G W«òíîÛs‰>…ËþÀý#(‡-š¢’âzR‚!ÐA ¤ªD*Eb]ÐeÇTÚëz¿ÊªÞi:Jg•ú”ÒÑ2“£½5 ”)sH£•cˆ”Y9„‘øœwÊZµŒ´­o©Äoâ1Bæg;kZˆW„z[$ìg"ÝWÖfõ=®Í¢gtV±¢©‘“™ô–וŒu¶R¿swW¢ÚÑ+›Åt©URçÿ{¤ûÜC†‡eZ‘ÙLeñ¬¨ý„VtÃ`¦åØ-)t”îé·òî^·»¸ÌöMʶãYq(QVè©em/°Ë!7ðèD·ÍÍdÂY*ñþûÜ“yðírµW©æ¹ˆgór§_+œ)DT‘Ì ìóåÐk¥Ôƒ¢´Õ–‰mëvöaKWù͘¢QæsyœQYÈSã¹1ÔRU DW®¿Xí«Óm-RusqÇ»ÒrwvæšK³,RœèLÚJ\s÷1 J ”)Öþ\v¡®Y]h%ÏA]P˜‰¤$Ø'«Ì'ù4CY BQ:T£´‚×ÍuPï1 Ó›=‚>-i¬„eþB#ŸæžOëÒó`®Íf- õk±W‘LDL±D "ºeg)9d+2ªÈ¸L¾Ê"ºâl²üyîÖGy“¼Yxµ;z&QXÂê\ìã„f·ð•¡²g¸ŽÕVº‰Ÿ"±¨»+L²ê!/Ÿä=ý´‚ké7Ï;äRW{ò`ŽT!”S¸ïùTO.5X"ÊJT_µšY©N%(ºKgïU„‘'s²æ*N¯ÁE UÊ2Õ­M1EŸÍÍ-‰ÎœHØn.¿w%‹\5„.95 Þ)E[ª…a•X×ÚD¡rbœRŠ©šòf(Œå5ׄ692‹èÚ ¾Í”&”åö-1žB’ÍœF©é§ÏAÌÑ…(¡SÕ^gcYHUÿJ½“Íf"’õ¬öÈZô¶_Ú½æ&ë¿“´U2¥Ãæu[- ‘çY dL“ªŽ‹éWu«Þˆ%âSfò‘b"émµí©IÁAƒAs!kAgAbAWB¶r`´Ô¦å>Ï?3PÍ4kÅÒ¶OlÊyî3ÿT…\"Q f^!OIwïO¦;šo׫!ÜÚøJE&}ÑKë¤S›¯Vlß‹#äA1rs•fyŽpÇúCZe°¶ÉxÛ ¢6C¬ì ¦_ˆŠ„­¦æZÈêÊÇ+e5j9,I@¦Öt%6À¯d¸Æ€¤‘Ndb“²\Ú {çÚ¯v¤ZàÒúHµÚÔi! ÔS ƒ€àƒ’|;`ë9«!î?¹0õ_¡ Âí*~FRv¦«ñjeYt$Ìdº¤¢ …íæÚù2ÉÔ÷Ü×òñŽÈo¤›Ñ9É…šXG`¤)çÆ‹õMA!ÆÑd¤O ª¨_I¿6Uz4ÖÅK™ÁÄ0}<Á!Ù~Ö?ÂrÇûâ ²vu׬É-$vaÇ4r)Ä„H‡ P‘z÷=‚M·Æ2EsV:–# Á/Á“((bcýøv_zúHAhY[)EH¡hö;qµ¾f³ž^ý4€¢ŠŽr/X¢VU>Å“ãZ/”ÌbÇ¥„ ¡ P[ ¯_¯&2_<ªT©VˆaF2ÇuœAŒµ³ëL“K˜½›¹´7Ò™$z’Š[å{xY˜#l9†P8 ;ÀJ¸:)ƒZSY6m[Êj:&91ÖRI?S8yT‚«zX¡€B¯ÆœçFÆÍÀ©#ŠrÙ²ÜYGÓüð’û/vPþ«MG)S‰…32ŽU(¤2‘ zP—†ñ,’àûŽYSí}é¡# ©æm †*žÃšÈtF¢uîoÌW&%*™:ˆœÏâ+r‰/’uæ*¢ŒƒžrÑÝe›/x•\9ç"Â<‰eø’TóÅÁµf)D†S² Š D§(¯ôŒ³‘K’R\°üˆžµ=2¹{|Ú‚Ÿðy)»\"š(à —‚ˆ™€„#M’P²aOsyz%JU¥j­ŠˆgÌ×¶¼bêôVÕrŽ‚²£‘eZ¾ä¤½ùÒ·¹ÇÜ—z.ut“2GR8%æ¿F/dI/Rµf>¿Ú¹&`KT­-l’×Ew™œ!b–èãŽc½5Üäs «]ï-IRõ!§Œ+Ð.àÔkk% ‰õ•–(“Ì,¦zŒß•¡2 ˆ½£mê3Œ„±7¦’cç!‰CêiÄ+çú¬GC/®çE´ëî]åòo æJ«å‚ª|ø\éM #ÙO!Ë ð®(Ïv3—¢pŸñ(ºJ&$–TydsÅ©=¥ó“[†u³Å9t®¤b˜ŒR‚¸Tìr앦—húl)Š5X¾óË= zx„´™gäÜá A@¦PýC¹Ž2¿~\Œ’”‚1ÄwcÒÄ ´òjíkK–‰âeô%êßrÿØç+QÅ2$äéS¹Ü`Cˆ=Î ãÐB$/£xÛÂWb\L^¤¬÷³fæÊ÷r“ R€U÷çIæ_6ÕkÔbiªiö¨›MÏRÝ%kØžÙÒ-Nüùêèì!%~(GÄ#àKT¬”[—'æ}='!ô¬ñ<¼ å(,_¡-AQLP‡%!H“ƒ#«Sô éXÇ‘ ²É@j͡ȗ½o7HÈ‚jÉcq˜u80aŸ¢N1Ë(Èÿ]óë—¨@„ÔÎz­ßkCÌøEÔÍ©'ªPŠA…N‰an’ÈPña¦„ nê0ÒKãœE•Áy%øa©‚ð_3²|n« Ç×ß7DÍ[-KEê×eŸ–+Z_Ô>‘ÈiŒó9El9ì‡2; Š0 Á» ^bm•ƦÓì/¤‰¶é4RΖêpÝF‘%*g8â.JgAÔR´E)|¥¹,I/¢k-HéÝ&“s™Ôì¹y›8µ*¬éK£›HÄIv[üàŽ#yTn'Q1‚PY·`3¸E”ç‘%{HÊn«ÐmŸò-[ÅÀÁ@é<5ZY2b8©W¨¥tS† ¥šàe«Üìom³]ËjØê@ÂKnxZé Z)ùK`q”OœQ‡:chü=,#‡9MM$Ü¡B—´¡*Uœ—žö:ŒÊÄúD#W®ÄšŠ:$\ZTê…T±†5Ï¿U#ïò=d8¦q ô»»}Co!h¥Ô„üé#à¬CÅëá&SŒò=eK‘IåÈÄ2Låp0e„´ PvT‹¦þ]“ètȯ-/]-A%ßµ'¥[nB»èsêኳ9™Rª cyv©[¸BviÉ5IúÖQÊù‚Uê„r]Z;!Pn¶qG}2¡éÕ8… ‹·‰ÒtáÆ1B¸**ëQl(™yí„Më?Õ,x¾<ÐoÈU…ÛPŸ•ˆ#± ¤j TIy†Mf‘èü_á5ÏÔú–¢ÄjZßKëP¡v—¶û Ö;”£ t,Š3ÊMļy™â#*J~?”ÍÃLJP,ç=×$»IXw ŸWÅYˆR‹ø‘kѵVEɆJ™#̘_j¥ \WœAE37©žƒÊN|T˜-.MÐÚÅ¿¥¨H––$­H¬¹CY3Êâ<ïdAÚpP(:Íp ÅðǬºz U7•T½Qª69·2µ´ô ˆð ÿøÉ˜Ä¨£N‹À  ˆ(´X´ -—xÞî÷Ü—І{XA )ÝŒM'u“ß««8¤G ¤rcñ,”'¯¡1Tˆ–.ùw¤²YõZ± ¹Mô«W=Ÿë´ãõP1…ŽL¹LÕ¯V1Qñ²1ÑtÜÄ{ý#j#?Sï¥N­¼…™þšF)µœävÊ8C1•ÊZârØg ƒ*KÅÙÉÊn”•úõ(Võ)è.?¿% Q–Iæš…fbJ8C šYˆ·¯þéÉp¬ÇU&¥5h!f/½(_ TÊn™[dÁL™-f­Ž]òEfš„´½ùœÖyc £$bÈG)'Ñ‹„×à0‚ž´–\´ºX¼\·^ìÿJˆüâŠaZ†1N”ÙŠ•J»¾*I{{¾¿J[‘ÑQˆ¸Jbz!¨HèEÒÐ*È1 Ù¶ÄL·ÙÌ5b’AO Õ¢ÿ=(riâŠÕ}Lóî`+'öÐÅÂ[HUzÉ®¬ÝÖóê/ŠCŠ8/åJÄ­¼PVþaF^ ‹ïö­­ûCÑ j{“jl‚'ËôvDõ1]б„SŠKª×ºˆ Q‰„B‰\­™vX¼#n‰¿œŽe¢}ÙhôŸe3ö¸„röÊ36½7l^¡Î[£ò{æà¥1÷­”ú0geNJ &Ö²…rl•áÈî¸tæ›ø”ÅÉ.ÍúÑXƒŠéÏp†E½µDz„˜€ãCß–¤¦Äìè¹.?ÙUúnÊ´ÝZÜSybˆB³•ÂÆs MG0éšYÊ!•ÿ*]‡÷ÊSl©¢o™†úi9¸EçÒ¢ss2¸ªaÍkü‹~TKŠ­ÂŠW¹pIЕk§”¯*“[]É·ÊSwÏW)+”Ò“ëLˆDý½ðºiTœPéê‚ó^¤•qNV¹ˆ:¢÷Ýȶý®«¾¾Å©ÿ|brÛ¹‡zQÛÆd*dò ¨û¤cˆ£qQ‹j­2´ÁÞ¼ldI0Ÿœ[‰æç¾Ú é ©T,ƒ-Õìê¾žŽ•s‘[.‚ï›*¡ºÒc6•b2 ¹Üô’è*÷sTQ”ÞíÕ&që7â¸É™Ao\αÊw^µ3Ûø8C!Åf'Ú½/Y3ÉS}N7©>õ–ê­Jä*jµÔŽ!”¤ÚQŽ1 tù=O17¢ÿ†!VÎÖTÙi&áS–¯»DB;àŽBˆîÉÙþäÁ ‚ŠÂ,«ÏŸ×Lmçô—ÙIŸŸk+úܶÅEˆÈ•¡uw(Z|úZ1hæ;{QîŠCÕ´*ng8…#»%7÷^÷ÚíÖf1ÓEÌ&QmOîÓ±Îw1YeFâ,ÈO-Nç1™<Ìþžö{þ4—S2ᄳ3ìœ3I§Á½(RœÕn²"•q.Rcšd¹FEïöº%%Ô¯SÚšZ 1Å-:ß6·ª³œ÷¥)¨,™ªEï’´#•ºG¯62Œ9ŒvL´»øC”9ÇSŠo!÷Ö½Ô6Ðõ_Çý­1 ¨.)=W1ž!Œe±3Œ#Hš¦eò91Ë3šËåÑ'ÐöÙ )dãõšÝ,Å!‘“ ×g¨¼fº˜ïUDzŽúF4æc{5»‹š‹’ 2/µ÷«¹D™ÈfþB$©­Ôý§®%>×¥s*’ªLª´ÎË­žª1E^ZVB1DZh*iÉâp¹kâ®X¹¿„Òº±O‹ú;”Ta½•øG©~ŠBœ¤ó79²ûݵ¥ UÒš½m©.S”’1÷¦Ù­Ö ÁC)Y©CçþàQˆäzÒF•}¦²XíÏ–Übú!&! !ÚOßãgŠa ã%²›Jªs–[{k:Uªß†—*(ï‚¥¶¼ÍRÎc­_÷ 0ù©e{“‰ÿ’×?Yñ_ÜÎ…")˜Ü¿ Ì Wõº w¥EÕúÒ’íLºÿjsV¬&ºâwrÊ ½›‹+ äŒ¥9jCÐËÎCæ}_ßuR—Ì–Åo1™ÒÔë1%}¡^†'TÒ5ñCRÝ&M˜5܉#u;Ó9w9LDùE,úGF2³ÊŽ˜¶ý¾ÒËÍû&v¡31 ò@@†(ÁîÂ( ­¼Á O2Ó‹˜Väuàå« Í2|㨿;+ý\Jdcˆ@˜åôl39ñA`TB°Q „ ‚jEåVtõ£lŠˆ"œqͬ)¼1s;FHˤR"Œ/äHF2È5…åê|¼V´AÊÜ™¨& „Ajèå… ƒ@Áÿ)h(¦;0Ü@åʽØrØ¥@©‰ôæA©õ($ v¶ Î ÇÕŒwÀ´È%bi‚S–Ú[4$:1#ˆ¤J&(*‡ ohaµ€êR˜ô ‚#t @èñXlC ØÏvʽÆx/8ô,uC Q&0 ÈÐÍBTÈ€ÀÈa 3~FÄ7E?uwæÚuh´§?»­õôMkS)+æûû,¢4Ær Kòü‰¶­Ü¤¢=‹j}¬C … .Kâg#—*)ÅB¬bÞ›ër)3¶„[áüÓ0‹+²±·kr•3Èjˆ¨Gk™³w¥Iˆëå²ýdšÿ̇r»·tòqR‘æZ…o#Ýh1¼•²ÜäÅ1T«¶ÒRL|Ò‘z¿Mü>ùUZ-‘7ä¾ U÷† â*|¯r:øa ãº-3+ÎÎ\q¬½Tå2³Ó j•ì”9EŒ>O§5ýZˆ¨ÖåNÒùuålOJ(×_²s´Ê³’Š"svežŽ^'"m~le¢?ç ìRK ˜u¨®Pä{»Ü›îPŠÊšýž.¶'S)&¿•—H%KN×€“„èj•çP&Ä`"^!ÚmÛŒaª WŽä舌Œˆ^Ä&Ï…¢H2@”‚ŽX¡Ó|&‘åż¹‚1ÄëÏŸ ÄIÜ XN ;q ( Qza’! SáÈÒAI°'Z¨Œˆ0@C»qËÖL1ÔÂÉB§ø†Š-µ„X-}’!VÑ« Mßce#´ª`¥œ„ Ù ê•ãaœAß”ƒ(T?‡É×1 W®®¥‚|±P†x‚JS\L“@ØdÐT©ÎgP‰Nüs‰ñÄxD'¡‘ŒÁ™¸`Ê€…RÁ‚┸ŠÜRŠçè ~¡ỹ„暪×!Œn Ràµ`Ìa™J/Nñ#ð@ï¨ïrï±ðtñ¿ó‚³’È ~s¸×zpl$UôÎÈê9Ôó ŠŽI1¤¤««ž¬ªQ>L¢•’)Þ6 fYèÂý~rlæþÖ#2™Ç4³W‡! ¯É˜(¢ŒôPÌ+Âöaë®Ïš"±K]äeéoIíBFd#T—$Ä.B•.t ( @°KÔË–±Îm{,k¾qí2h¸´ù0»3Tj2ûÕ ‡*áóÆ¯ˆÙÄ¢/û9\råIªl&{3¢±ª¥Ê’sn¼Ï)ÝÕF^ËTÎCIŒ´’ÒR.ÊPV³çæs­Zª~Ô“Šh†áÎ:åU¤µo·Ås/ª·Sj6Ó7 ŠøÃýøb¹dk•š¯ä‹9 ¤ŠÀàªl8ä–K•oYfm¦û;*¢ù÷ õ¥M_è„BåDæ{7±[¨Ž îÃ-Ý4­¹5±püW:¢V¯lªÊeÆÊ*RKX*z5‘ žZFî;$Tb¸‹îë'gºhMT¼Dr9™aGjM¾¦±¦'‘üÌE›[ÓrY±ü4zÈQ´…G÷Õ!Øç¹ÙÊ ñ=»ÃVmŒDJ™K…QˆÍ»U1 E ág¼£4ÂY+Í™iDÑìfè™Ü´­ba ryS)ÌÕB4µ\Ü™œQ™˜­F"“mRÝqê/‰S˜¯# †þœS•ªtš§Þ-Yo™ÈV¸ëîKP¾[¨ÉöÌ©Y#èv‘çŸ{u~¬Ügí¨¸Gn{åý&ŸþQÛ4±Åî)YÜÉ`Hßb•¶fª×žþLö*òXA2²t‘-!й$ª„³ŒRÐÊ:šq˜nyú%Ñ_Δj½÷L°LZ££“‘4Ûê¬Jhãɤ©» ¬ÙÝÑù |-Ç"i â Šs.–ÕÚµ›b`­¥ö"2ê=WKE[¯ÂU/EªÜo7Ë‘nQŠ}IºØëUÏÜ,F…c¨¡Î䥨r"Ê\¯ë»è¶W÷ fÞÆoÁv{L”Qj+!ëâ<ªâ5—¾zµ:ÅW=$ä鈤WcøžË«½AZgÊ‹§îê#3D¹>ä¹,M(ÑÄ5PáÍJ‹‰,ÈÄ3/Ö„q,ÔªÂ'…iÙ²µ\[Y*Ÿj1\ËÎj †’ Ÿõ댋¹UóPÅdVc\ë2L,%N‹ØT'ñx¸F"*'œ%u#_’T-*ãvîC{V€BÚH—"‹g}§G=Éf®ìäˆLób;UJm-{E ¥—5‹”NA;‡«ám ´ …ö*ÒG‰BöŸÌyËÎÃ*Yf"+¯‘Ñe>ÈiZj×,Þªê.Ò±dµ±Üf.A lzþÂŒ… d&'¼B»£Kd¯‹F¢V-r™m£-M9d?q Œ£%öXGŒ¥bXÜdQ’&•°]cúÿÙ )Ã×MÊ·s ^oѧ~bÐNJ­ ˆ¸‰¨f^5[Q=PO>檑,gyêbŽWUÇ5&‚UeòHI 1ëÔÛkÂ}&·D[§PÊÒ§»‘N¨R1PaÔ6âé‹åy0ø‡gvö/žò-ŸW§þ¶Øò™ŽÉ©ÌPq•&Ú¦6SoIÖÉTI3PtME*¿&Ù Ômé0Y„q„ å¶RdîÊŠ•©<™Ö¤$öõò¤´åMšÄbrèÇÒ»«2"‘xD\β—ŸÖ{‰qMÅ ak’Þ””ä'u΄뜈]TK”ƒ;8ïÂUb Ëb©k¬ŠÄLµ ‰†&¯*±¦¥Éä#9«B——u —" IÛO+„:³¯”é<ÝTˆa›ü%¢}Dˆ„•UÌ>óÒq%YL¥²Ý¿9ÖQ¬¤k޽oØÄB·Î¹tÆ(à§Ü<®\ù(&³Jš+¨ø/µqvIáqÅ´keG²Ç]2FÞeyÊ`‘hU°¹"æ× ›ä¸Cú®~ËÙ™ÕÕeú5œÞ"Žr9“}ŒK¾­u&)fKLXÌùk$†Ó …åä§åp”0†Cµv²:#]ؽ­F¥<Ñ8B! ÇEBªæ*ˆÿÍCë!ÜŒ „2Û8Â&Èk´¤çTÕ³f Hõô ÚO„F9åvöÂ"°ÏB­‘¤bê„-(~t¡˜Žÿ¦ïW‘‹1©¼”Òóµ_ä#˜äÍÓ!l´+—5Q¹Ã$¥{®k&=òšA‚'½>„þû*1YÙõ3§¢ÉVåÚ“¨ÙDfU3ÌÔ"îKj[¡'o …0é+!»ß%Ɉò5UTˆôýS—´N …q<Ö_ÒJ¬åg7(!ZeŠXM¸çï©Föýrû\ë‹G®ÚŽKö|Ú!=ÖÆâ$U8ƒ*á5ÓxÜ®¦AÚ¼4U&¿óæTV+¯q)•²ìUR¯S»‚íµq(- ’g I>Ó¬Da›¬žE³È$‚ç× ËÏ+œ£Y)#×Â¥¸õ”-]_{»~i¦¢Š•ý!HËb®¯Ã'X±]b4‡YåúyÂq ”%3=µ•’­Ô‹·äôf–ÉÅOnQdJ%×8NפUëqÊÙ#XRý²ŸÊpÁØ[ß4õ éu5——i«Tgë$‹µ?çØôÚ Ì"Ñ\„±w‹ÙMnµØU0…:XEªé§µ—ËÆ>‰ô-É¿L 4%aˆ™Š@õz˜Í@úØ3¬¡‚‚Œ L3µzS›Ã•êøèºcö“<^²æ{zÓ· †B«ÕRæáysYE{—×4žÚ[‚! ‡H´=|„MiXÕþQHTÓÑô÷8ÒÄ’ÛK»í´-Ûhƒ6ÙžÒI*Õ¥ P¤4ºåpœˆÉL3¾»ë›yicRXò`Æ_úR†* «ÜzˆÁQÄM:Œ»üDQy¥eã륵œbñ<”¥+Ιúò&™øF¹tÅ£¥É”±©O”r•Xq”\6ê*nˆíâ„#†ýÿ”Ä,‡Õ­†²¡Ÿ$Z·å¯õñj³s/•H¹w³î¾›{÷]LªB±µ:FzqË’—ñ*ÈëB¢óëLý}9‹õˆFþðű5¬ší¢6ÉY˜0ê9JÇy·³‹¯YèâË‹÷Ù¨ŒUÌÌ ^Ÿ~äv¢Êb¢‹l%𻬸’=”ÊÍ©¿k-êî¾#D;uÝœw%w²·b0ã+¢£çÞÖíüw]Å*iæ×NE}±Élö¥Ì×T¡9ùds›™ŠÜNUñ¥œÚÔ¡ÅvgÚ9xMº N«–‰mºiBSµ "*e²‰µ¾’Â,TÖÜ]^êb[up”+ó¾«õÚÝT…ÎrH•B9›ÈÅÞ6p¥˜eâ!F†CKê!#aJ!–Ÿ’§bÖE‡xñƃœ‡ÌÌ!·q(êl„i€¼G0{L!l„£ˆQï5Žª¹”€™±AÐÃÀÔÉÝ0¼PQ 0ˆÆ ÊéTÅ܃€H2ÄT­Gü+À¬RÔ”Å$­E)I¬‚”ʵ†Q H%p®Œ$¨¤(HZ›ÇìCBIþÚðvùL¤ Š3l~R2 G ÄY!J¸ ?v3s¬T?Fiy0yHcú™ Ž6ÇJRŠHgÚ¼¢¤pÉFF†Axªpd 0ÆÄƒVÅ%ˆ²Þ›gªŒ:êyšµí …Fb¿×!MH2_D0Je0¤…e) 0]CYÞ £ÔF=ØÃ0±Q'ÆF¡ll¥ ¤ ÏÑÐvC¾œcT(Rv•L¡BJEjÐecs…ÅG ˆb¢ª‚0LÆs$!ÆU„A‡1BPhÓ 9J ‹ k¿*^§ AÁÑØ$®9ÍH¤JR0®jdÙ„oŠKð`$0>h¼\à„$C:‡já¤8l l x  è÷ÿ‚ÎJ–üŠ}7Öcaç@FôqD±ˆNɹ4¸N ¼³æˆý©sÄ!.&­ß¿T1k©šÄ9ºùÿô#® å83 –°„¢Tˆ/zæ‘ùXìa7fÞh”ÔÛß}èTó¥Nä: ÄÌt³U‘E-j…-ÑÔÈZPMzü^k±¤?¡ýtŠv«îVÌ6¤ær¬ìDâï¼›+Æ,Ê#½FÒf$æÅ?Ó°ÄdkDJ©¨j çÖjé–¤ñR‰+¹ N=-|Nºm–sÅk²$„(D²sëã¶³!RVÕ6{~¿ÖI)Äô^¢/ªúÒÄäÍó9 AŠDÎã8ÍîÖJ©›ÓúŸëTÌ¿_¶Óy¨Ø¨ý&1®Yff“¿Ñ8‚DdïbÝlöZ.”[«Aªê¾åºuÉeµðÙG®›.Ö-R’HÍ¥ÆåÓ:ò¨©9$=FVãâRV$§ˆD÷VsY)„-ÕR©æ¡R} A4šÄ\GIR¡P©‹’1,×jÿIcÈ’3]1Ò,üQ*•VQîzCé‰!u37ô™ÛE¦Ò5÷uj¹dÖU2Ó“4•&-—n¾)5ŒC—ÄÏÂÙ®.mln1s…¹y{WñÉGñßJö*¥說š˜®1(Ì¢¯:µÙñ+Ç~¢âSSøÝ$V,EA ²ˆU™~d"UàŸ«åäçUw*7X_Ûr±Éd*–R7ŽÒ‰d¦4TUh´x±œ±‚ذ‚¥Œþ‡¨¢Ø´Ï¼¤ºPæÌt“†Y V“Ä¿›Ø”5r¾üfñ$\!¬×^=!³Ìp8 °˜~R(H$¿ ópB+‘e&ˆÅwÂ×{µm²ÈÍæPGd#Tå¡^ÈšžÞ.¶j·hW:ÛMA+!4’M„s¬wa !UbU-Ô"õ¨hÐX/J5}©„(ࣳZVc,«óM% âðß5=‚ŒgQÉ$£¶ˆ Qx›/¾àÝï®"£ý‘7$"JeÕ¤]’Ï!%ª–Îì§9.j'K'Ú‹aÈMÎÄT­¶¹Zî)’[Ky ÇCˆ[±!ƒ…0qLSgØWÊöºíKrÉRËçüZä¤Ê/gœÉsC!Wè Ž »åãïUF²TÖs5åb5–ßn¦%ŸêBŒR•b1Â(BÔñ´¡iOI3…Aó‘7 l-Û]tï\u &"ààPÐ ,(9†¬‚Eó_¬uÚ ´²–ŸÕÕ0¨‰—½&ªÜ­Æ)yÈ1ÇqÖ32Þw1 NÉ0ô)PJoZ»K ìm¢¡‰ä9ªK!(QD){ɘ‹4>Ü /¤*Š¡ÈÏdIÐAõ­yÞ•ÿéÅR¬A\dm"næÊA~M&Sb…£‘J§©\+{ÑSMÈB"ÒØÝŽµ?R¬Ê*û1H(™z¯N’¸ÓL_uûÓÅ’S£M’¸Ÿo9Ä%N†p( XÄxxûƒê Úü구ÕÙäWs\yç}׈ÝF¼OÐQ0çÄKˆ… jH£)6dIi":)a)Rì´ˆ^kãæU¬R$˜Ê(€$˜1oœ5¦Š J\“p#G$¥•L¬å¿ä¹a¿îäV»©”…t¿vµÿ©Uf¼ÊVy.b Ž2 éõ­ôïCˆÊSÂqÈ{’L[ªk>$…®È‚D¬EKq–ÅLš·šX•Q…ê1‘n¸Q\q („ 0(ÃDéAI…+O~Â[új f„¼-è!ô‡¶TW`DmXçšyÙ‡TJJâ¬ÔoóéßÏç„Åû©zEé^‹qG0¬…>¯Ý»­Ù‘„ú|˜/ÛÇ%ÆšU‘ ¾\.Ê©"JÕ€À澆¼CϦÎMÆü¯Yéí—½%D%(´«aj饶ÊI9å(ìBˆBç’xGªv”i^ç…ïÊÖ¥Z cBDƒXs˜JE'°BXþrCqzÕ”‰ç)—fcJŠ:!LY´(ܹ«l&ÿ˜•(U(£"‘¸NT’Ly«K]Í1õ®E‘ÌE­e¼“µÚëQt‹€Ãÿnª…+`´ìÖ*Ê‚>Ô…©8D™ˆä¼½¤’Ú:†ž?•gaœ: OŠ pÌP8å4ÎJÆ£Ò¸a(jÑkàÐxK1#Ja!) ã¹@­—\Ùvb%žÃÒ#« dˆµÊ§S›ÔÔÈɼ6“ :U‡úb1O¨¶^Ð…¹%¡ÑïÔk s~‘öyD5‚°8<™ÔоY¶©Ó–ëýKà‰k Ÿ/i¢j×»õ=IRŽ@Ä[Š;I†I_Œ¸«žÏCl¹=<"Hø‡ù'‚Âtƒ¸Nar—8zùÄ‹z)âÌ„I”DR1ꃙS\fï2½¸–=:´£¨¨9‘F:^³hÕýü7©y%×eDŽVàzCÙDvÝbH¤( àÁ…jlµ}Õ} ›¬J]&6f½õäJ€¸ÿøÉˆÄªNûûTü„þpàì²³’µ½¢/cóøçùˆh¢OLÀH³ÏJé†PÎî–ƒˆrÀs44P8¦¹$<û±ê_ š[f†`D’ý`o#ža Â!»!¥²Þ©ÁXr;0‡dÔ-)ÿÆß£Oz¿ç”vÈÃj˜1΢¦Z³|¡UJµ4‚YóBü·²ˆoËÏ£ƒ`À0®j£ÔT¬·ÙíjO?!gêáF|sJâdÄÓÒ‡›ò™Ø2+hQ3Žç¤‹qf¶Mi%ÃìHêà—Ãn–âÆˆKIÌrü¦ ‹.†eûÄH1”!é‘ñ”Š1Aˆ`¢¶ŸNFÔCÀEá{ž–aŽ5̨U± Z§Û:Iü,÷‰²e'܆òwIŽr -cŽ)äSüIiJ~þˆý 4$mŽù/}¬ñÇb¹å••Õ© C”†Å(QÝP¾RÛ»%“¿ê.âTI ÆQCiáÊ9RY$N¡<ɦd,¿ñéûTH²]9<Ñþ’éaAÁÀÀG5n(làI"|OüÊaHÖ»)ž„[¦Õ½p_iM®×ŽAR‰s„Àã”1Ö ‚+/ÅÉ~]!ú<ÌE·ù:IòÉ@i9ùz£QßI)•S„ûOÏVJ©+¤Î!žw]H2"ô†§MC“¦.—I¬"]ÿ‰‹LN½óîW‘e”·/!×Ò„*ñ¾Ý!D¢PV^$#•Ðm‹_žäÍû<©¬S”Œ¼µE3Ü}–]‚à~hý{šVE,¢ ˆÎy2zM\á;‚Æ-¦M:^Äq&Üý½ÜT˜S$¬«ø*“шÄàå(Ž8ç*i}JH»'RKÜ^&õx±W°‚‡)öÁC("UEÝKÝâ|ž+ß Ë»QºãiåŠ2ø^ø[¢ˆ§1B€Ê¡®36ªO 'É窑Ýî—)ë•ÆŸkZÒØ]ÈNxÌ’C(@‚Š(§IP(2ŒšQðŸâP\z­Yd­SO7c¨H-³îYÎQÂ1Dò%ÐÛ.ijé«qŒ¼ƒ¢©XA½Å^ckÓSÇ1q¯@›è1ÊB¹«þO¢=DÎ5ô%GòaHÓ.Ùƹ0#Ä"œPpà ñ ßÚ°“BÈ//‘v•IìõGêQr—–z[¯õ.>1“’Rʘ)“Ì +k8T™r¶êMYr:¼’’Ùl~í‘r$?üŠê`@Œ!€`ß19Ðö…ꪡ…^tøÄ¡boøži>?b"IfÍýuMC…QFKŽ0@¤8Ê2E+ÜžZÉ_Jol½DΖkHæ¼Æ ‡ÑˆF6‹ A=Ùƒyde9ç6 Ì•YYf#y+fßÒQ5MÆTÊyKDQJt+–ŠK¥›= Q.¹ÿ„Úk¯â±2˜˜~gÜÀ¯S‡Ža>0!ÓÔ±&¾Jµ½Äœ¬d¹¨'-þMÏÀ´ÐjI9ÏP•ZNALÄF0!N(8û„©t½a/.×åe?ü<°š*Ò Jnm Â8ëtù“#HJŽáb!E!NâTœ&²DüÞÃRÓ\:Ü¢ä•PÊTªPY‰dyP©žŒFkCw¥lß.¹ I0j(*8Îh¥¼×Œ&é‰zIÃ`GÈ!è¶T%rõé“ýòôZ¹s–ž!' „ŒÑp`…ØqQÓ '˹֚CûRG¼Óþ>K4&í¶#¸B2Ò"E/ ˜¥Ó¡äÅr»-MŠœ|NO¡0¤ª‰E¹®e‘B¹Ê¿­ŠRº«Xz,Ò¡j%$Á¹rÝU&¾¢Û9+lQÄ@(1Eˆ(¬Ïµ’Z¶²j4Ì9Ÿ> ©’`ד‰cÊIK“e¨ëîwqÉHB˜ 8Q«¢ö>xÕŸíûœ¦ûek'£<'ì”J Û‰–yݹI#ó¼Å8CÌí2ŸHÝAyK÷ý®}}˜qB düòEBi J±%-#<Ñ Í§©(§DKöVÛ>ãÆΣ0€ 8;‰Êåó¶½»èi  Œ¨ú“ÉåÉ«ZÖY-¢¹[ÙyU rÈ‘D€æ>Ü(îf„Ÿض—Z1´Xi½öÑbåª%=b™BQ‘Ê0‰2T­K':ºQŸ¤J¡i¾ød¡8ÙžB'sùaÇS/wJ¾#'¶Õ²ŸYå ±+KÙ&S úßgžbrÑJ0Pp8BØ@àŽZ¾’&%q¨ïÊa FêZŸöµÿ;¯KËCÔÖS`K¤G0ËátJÁ‚•ÊDaˆbOi$ÓæÐ‹5CsMi¥¡{¥¤›e1EC'¹(hBv·11‡1 ”II^VÄ'q3˸ݻˆJp„ A¹«b™ÉXÖ5Óì‡S˜&š’½…f?Á¯oÙv}éå(‘0QŽ)¯;™³ËÝ&;Œ¶SSx¿O“8±iyzÍe<˜ÄÍPíâŒ{!Ü@¼©¢${¹=löâýk 5Þ€“Op¶Å±$`A(ƒ©š VR£c± —"®Ïe&ÿòý•o2y —’¥F9È”Œ¶N²=¬&Z7ËCÞÓï^»¤4r1f=–D#¤>ª@Ë#uƒÏÒŽT‹-/cH«r*vn-eaL1N_…&˜´QHPž‹¿WØÙ*`IéSq¸G? ?ŸÊ'÷ã$(@80…Úl:¤i%‘œ¶2«:ò:P{t¿õòdÖ‰dÑÜ·b1ÅNg[© 8¦EõÄLnÝA´JFUX]Y¸.Oò„é/(ó± ìK=D>Èú¥(!2èd[¼ÂxW”%y˜VÂW¾ôAYçÈŽM3N‰ß‹ò52ܵg±gc"ð£9õVX$5%BÍ[܈*Ì8ÁŒ‰èÊ)JŸvÊßÈ_µlÛ{v®_ÍY¡1è×­~Û. À…ij± 9;ýÛÿ•G€pa Cà) Ðs¸jÓ·ÀXÿlö´Ž0ˆÿ~œ¢„:zñJ„ul+%Ÿ‘ò߈n;ØJÒ=eÞEtÙ¡síSáøªc‘Ÿ vqÌ~#Ý4LcŠì)¯ïÕJB©š]·£’ª²Šâ¯ÛoØ”: Rdšy¬_-W9ä —¡\g#×.Ù¹ÆÃ4)[„M"Y÷ÄÂò­7)Ä(ª¶ ŽFu2u‘78Ä)HÍc¹QË#hÈeFêÿkˆf¡7’Ôð»\é%'8Á P›7©‚o\’Ȧ•HGT%Cs gW"”æ©ÒÔKÉ¥N(•£uU=ñ?‘¾i´ß©Gb¦¦(žÆçä¢3¯'”ìñÂ¥3ØÜÔÃ,R¦3øØƒòYf¥w|F¹L®Nþ{vS9®œr(¤MVðB R¹½eÎ/ü¤â¹žµ‰,Øo=؈Íceö÷’ŽÁ[ü´Tå®r™ÝÙ¶ÕÒ(¢¥]ÎLq‘TëW š·{<üÝ*:Þ«A\$²³êIbŽE%zï”­)aYJž3ÐGú©™H–j¿[!Ζ=çm¦m=»"Z«ÎݨEJ/Œï›RŒBN)Ȩ•1ÆgóWª·"©ÞÊ’tÒÚõÖÄñ È.Ÿ9”‹.qZFWÄÓ”Êﺧu2îØìÎ3'ŠMû ‚6ŽÈ„îòµÏÂaßK»×§~ïÅuJdÚ´:q ¯ô­lã ‡B#½ØˆÄ÷²°òª/y7\×ì7&ýÜA ¹Ú†B!׬YXäqʲ ÄbHþ8ˆDv³ýB]“ž…¡KP•õ·š«¤f4™Zá{<ë­÷’…iˆ”LS<Ÿu[E;ŽtÜ&üƒ0Ìžˆ#¹³ö‹ê]N÷-kúK³fÊYš™Ö&Ô¨ŒM-erJO2˜†•üÌ"·­\¨bcJ®d_êú}Üû‰­|‰ùªr©‹brš‰1B诸â•Ff•R†,bSÉDiI]\oiZwvÖZwgÌTj ^Éͪ5HbŠ=«V…Bv]Ì›(£˜éå㙸×Q  é‹„ßwB¢+óÚ”®2W˾Éßjâ}ß Ÿº^s—™XîC³ˆNzY ftÏ•ŸÉöѯ5±S”ú¼t¾L™HÞÅ8ø˜¥Ô`¬ŽNjŠ"èî¦*ÿج¬¥Ã˻֮’™·J–ÿ…ß'áÒçRË}ãG8G]òâ–Äå8ëbЬ„6•ê¹BUôL÷ %”š«»&⺿eéF‘2ÈD÷nߪ´Ž½´Òµ ¿St™Z³ÊÍG)šgìE$©ålÂÓI&؈sO. ÌF\0Ä+ëŒ9 ‚¢†B'{”ÁS*Ì‚6°¦¹h¯¯Ä÷ÿ%e¾is¾ö« Ë? ”nÙjVfßt‡9TÝlýs¡†®«w¶ه§+‚Ò”å˜êFÿÓþ û™ë/ÐÕd-i[d³i3§ö1dd"§*!“Úck¶'â©ÊƒŸ [ɘFüÔìÞU5Šädílk/‡*E+Ã8‚ЍtõÔvS†RµÝýÊ›MËYPµµ¨ø¥¦çïZÒå³:Û?fЇ;z®K>•† ì#¹Äw;bˆÂ‘D6: ÉÞn-’âq=þÒѩŤʓ,E*'¾îü†ã‚ž„åã ¤W•ójqÊÝê‰ÈÄȪœy-BQHR¸«O§6eZ®pŽÔ0þtÇ ¥/'Òœv×!ÕQIï")´—Õ)ï²SXÄbúr’É.eЋBqÔG/¥÷lDQÈu²±(Ä1Øw#\ÊM¯Ó’çÏN‰Ù”Ò%éùœN§¯¾#a]z•G˜§g£¥TŠž©Ï›æ±ÿ/¬t ©‰Ktú’)UÖCX›¸¬BʤQ‹e-$K¥ˆcy7èrv¡¨]ÍqN2¿•!7y*6—I¶Þ§¡±'ÇÂýzØo“$ûUª…îG@E˜¥)H’'°ë!Ê×LåÛ>:+òöô›çôì¥EŤ•Byâ9Üq·?û;H ¬Œ…D1»Ðb¡WXÈe¶”«IšŽ]·ÊƒL›Jœm¦¹ÄM®£0”“7&f9gB­½2B±Ód=]KB³˜E0Ì–SÖ…’„móŸ¿I•¬ÑdÝ©9mÖog§ˆÛ¹ÃFe r©DcŠ!Ú9WSuˆéV%Ÿ¹ç͉fÿijÿ¥uÖ•lˆY)D#ª« R“¨¶\3Å»™Q;½,˜ó ½»ª„ö˜ÎQ1ñT­r:-©õZc6ô.¤Ž’5%k¿1K(c&)”Æ2pê*§ÒLv—ž"ö^¼|4ôŸ ÚJïÎ~MâY$[uQêW#ÇVLÇ´®æ+ú‹†Q7–‰"õ *af®éÅÊ5™ÙqQVÿüïÅÙÎ*]T‘pôVœ†”Ô‡\[!§fÉ_„qs)Ò’Ì–*êþþª.‰¥zeٛȣäqê_' _)gwW]°„’ ª–’ÛŽb'óªï{wÉ÷íõ"S²‡¡7|¤DÒ7¢˜‚ˆS£1Å!JÄ+% …ÉIÖ/rj[û{äîÛ!餥5Â"õó)ˆT1ˆrk·¹ MuZ3ñøì*¾YºÜes_j+©$tq³ñÌeY/[«[«! FìvjÓ•ø´è£ŽCUT#Š'Ó=™Ý¹ Ž1×í ®MÓ­_Íò(NI§áÏz%ו…1ø”úa ¥­(ìOÍ[±71V»&\D<¸:ßïJMÄ»™*çBˆ‘Å [ÅÁ³]Û¯·Lßó®ò]·¥üš¦²'ÉB"vˆ•F»]…#…>šf£yŒ+Ý¿2)öŠãeù<œJ¡lÌ74‘äáÆ8™s˜q]‹iŽ>v £}žÍÆ"=jRœE;ÕËZáÏŽ~§X£»ØFgªŽôKö©*n F!‚Œ„Þ£½x—Â5¤SªØçK$®äûžÂX©¼¬bɪ‰OOÓ‹Dd?²d„¹§‘6ÂTë~ˆQ00$4“–“eœZ‰~d+)ÿÛžrñ“qýi"Y ‚3Џé"RŠê½#Ñ–#V‡Ñg½§g/U†,‰+n#öhâµ8À³P 6î'0ŽØìõ!¼.Jµ žR,¾I-{¥SL#£Œ¡Ì3,†gô]k ”!ß?à¸ú¸ö7÷Ìk"û%fy˜E!RØÇu)Î]~»tÍ•ÌA4µb&HI3ö½\夯UA„ ±…©“e©}ôµEÃ…_\徑"­=–‚{]”­DC~YNBÕtö銿ù·?eú¿×cŠ9H­ù½LÒíÚÍU³’s”FÑ\e;õ¼ŒbÓ Bu>ÄÓ_úéQd- úKlÒŽ¼/B2ŒÏœÞ£,p8âCP %iÂ~ÖÚQ“^ÆÙ5m „3meh(ìdœ¯¦…âWÉVdT3úIÞ-"Þìd K0Œ¨è˜ÖCŠ…k/%96”½5Úœ3Ü’ðÒo9™‡58o´ÙâüŽûR‡@†vd%Ò‰Œ¡)'sgUÈÅ©¿’ŸûÕÞ÷mi¨”R#Jõ{¥J’.¹…K²µ\µD‰Mûf¤vR=y;FÆÈ‘*ò*ùXrúÊ2u1Mô³‘]–Ƴ¶jãÑ“Šdr-R¼z¡Š—~FÚjç'g­MÉtí¦o³3Øb½Ô”‰²vKˆ®TCà ¨ÎvO©÷´Fê!Ó#iĪÿýIéÄOö¶IÈ4ÕÎZÜË®ö"•ÕlÇÀ;¨Y"‚!æÄq&º©}=­1TI¶[É4¤w& ÛŽ)\+YS¶²]£œˆw-M<»<´ƒkÈBå’Ïåc ¾*²ŒsvPÌ<Ê!ÅʗГš»zvyÌEÏl<¶µey[jU¿;AH²Ñ‹íL®+Ü”gÕ7·Ø»†Ñ4ØTvfíÔ!‚¥Ó(µ‰Î‚$å{ ÇY›ê%ä·¡óHM¡Hœ´úIi®eô)Ì`B LÍÍ=z˜Eõg1]¦õn³‹Qlt"JUVM¸Œ¢µR¯ŒVrñ.ôZPžÝ­•R7ïgŒTúPžZé)S̸V;¡TTº o]¼¹µ9JP.U}꺶õ6³&SÊy2’Im=XZ¹ ®7)ÂŒ SOYô¦Æ>ÉZ¤‹võ\¦É€±$ÀÌ˶z­Êrˆ•)'ðŸïØÃˆ¥VÎÿÒmYøQšÇn®ˆ‡J'|s1™J*ìf«5•=_õð´”w.ò¢Síyi–v£½O!…\…T&*‹Ô£m5ÛôYjÈT&å)¹¹gdÌÝ—ºWJ¡ ˜3Ê— â‘“Vs)éu*ÿé°½…‘¦f”z0i%µ…d7Š#™ÎçôwZ÷íô‡r˜²'l5*]£n è’È×STJ31‹Íƒ²'¾]a°Œ…62æý†OÚQ«µ-ˆèÖWsjöÖ¯Dª¦y\ªdþN(ÙIÊ’,¥0^ê\×su ¥<ìµlÈoëtJ$‰H‚ ÝDui¢‹6ñíæså6Dä7¡ù²…ü!VçráJ:`s[þñv£¸„DFD²‰²×ÇÞ©])újÙ4­#õÙ¡HJ&/òpGòÅ^NÚkÑ7÷k3~Ú…ä5ÛDt¶ @‡gw²&„E[îÈô[:w¡sÖ-,lz™ˆïLŸ£yg/óHeaî–BOb¼ßÅì§Ÿ0„gG‘} ÄÝ´–C‘QõöªÎ™Ok(‹!¥w^î^ O¨W#ÏèúL¿$ÊUdõ}ÛNAjjú*Ñ>êTÒÓ-”oÑlw)\d1¨NmõddÞ·dŽ×}s\õXÈd+7ôÛËFÚ:ÛÇRå'Øž{Qá˜ü!ÒBˆ^¹êâ È1QëYŠ»™çÎÆ8œO"e?éJcŠ„¬ªCd‰Î…#%8ß!% æpÈ\¹»SçpºbñpJgçÎ_"Lò¡\b:©éŸj å úömm+¾î}yô—{˜”\ÒH«Ë#z¹Y=ìâUÊçzÙ¸RЫá*ûÚõ%}¨•ia‡@på)GP€‚”@€ÔÆ!"† QaB(.Wu% !MذS øÔˆ0¢¸¹Œä¸•b(Fb(vúG åB ‡‡63Ætc6Â$Í ìå=˜e201Ì(çąoFãA¡3Š’ÁÚìAPí÷´j3lß.°E&'MÉÅÌ~u,ãÝ37¸dF˜¶ä$A³l§j2ÙŽU‚s"ª¿]ñ—˜o!*DC~„0ÎA°""‡eh|tW«ƒ¢²1 !€B4œ¿¢B‰ÈÌP‡š:X¯WŸrbŒŠ|®™1§1‘­´ ¹(D¬, K;Œô“—®Ô€ºBò»ò E%àE! Ä3ÊAF#ú“ Aamù ì|Uô؈"ÑjE7ñÁ1'ÔA”˜š[”…¶`T,P*„£+ne¡ »MGF›\Å!)F(€× v¢¡XéùFT9 ˆ æ ;±CØÔîÎÔ Eæ4á… åE€”Jã+bûÏì+!ˆ„ø0œˆ„¥C ‚ Û² ¬ñ‚†úƒÃ ©HP‰ÑxíFpŸ+‚åj†™œÃ>ŠÙue¢ó^aȪچµ·°L‡ÛS8ÚÜÂS¤¼gQâA{ýù¹‡fÌ„¡Ÿ3Ñ<¨Ý"BTÄå™®‡]›¢ \›œçP¥1„À@ËÑ©ˆ¤r)Ÿ R5(„a6E `Âzœ-¥à?ÀßÏOâï{÷…h@yõ2oàÿͱ ·Ҍ2–ôd‚KA¾Bm^,,ßÕj=|9ŠOÈž®ŽJûeˆ©`Æ Km®:ûüƒ¡û„è¢ò TibK»FqZ¹»3 ™•Bu1óü¢œ}§ èŸVü&w ®0‚£äUÝuáiUüñÝÒ”‘‡.?øÈa¯N$Vä1x®W:£z÷äãhŒ+ŠÇF{%ârD5qz…z)ßE±s;3ú~qUï©Ã˜ï™—ãþ0®{™Y75–îÅN+fÕMbŒ§sç) |îFÚìØb+V\¦©5³ü„É­W¬õ]*c¦Qœ„8‚š¢TËZû³VÆ‘B“Dú ì7a6[ Äj=ŒÕÔ!Ón¾œ¬ißVÛq‹9«KÒ†I+-R4Ö[9O=«LÇê2cÒè"Wç*ã¿.ò«åÌ80QF¥'’$é˜ï»¡#óøqE–«Å¢Ô/Юrkñ•ëbì¾)J{‡rê}EìB¢Äb‘*”¥âÐÊŒã ßötF-ÍŠ”?~¶œ¾×[;Tmc%I¥Ì(ªJskÊCÊê-ÒBãzª®³1©¿‚i{æ²Ô™W5rmõ?›¿LÏÒ8«†I†R té!œÎ‹¡ L3ŽÔºoKµ£q8Ëd Üµï–ꌟíÉ:S¨³e_Sè«»Èåq šO2î(ç§ùYl*3wó¿ŸÚ¾š#;({7Jåû§’Šg?Z©KRœS ŒB—¥Â«wT‹¬2®_Ky~^×ÇWú!ÿO´­×IäÃ…jÊÊåæ¾C¾´¢:&PR\ÃŽníÔý™K%³½¸é‡Ï¡ø„ìŸh|¡d$œJ3ðŽ+ìS>îH^K;ˆÊQ”åúÙO‘ÕhV©múôLìÚ¯Kˆ\± ÍV!}vN•[ì15m¥u… „<—B·ó¸»Ov¡GSyé—íö™‰bã¡éU®"NÂ*ÎZ*Ñ ‚fLŒ¡L”rŒ#*ŠB.œë˜¬ÜÄ ³×¯«äì«×–”–²ÄÞ]ÒÑÄ?•Õµƒ¡yT†2Xr3rW*bVahË|ECz£ç¹u¿KAUTæ¡…ß%Z^ä×R—î'p£Zœu#7²——–ÓBÿ)–ú7-%ÕòÔBûm:¹z;áq›ÚB¸údе©Œ‡C—>AÝ)ƒ˜ëA†¸#w4¨a|VÒ·”Ýçã­—­žljã%Ø‹Ø CIf±?ÜÊaÇiIÄ„Ò2Õ¶¯TíKóÔ¼oÍÖ}îÁÈ"VÈ!÷ŽwFÚ$S òXR¬v B"kͅͱ–žZj΄[þ§¶éäZ¤½rU•ßB¤öÁÛ—È+:ÛIq–)Ÿd!ÄJèÅ3+º$L¶W+Gü¾/ã›ea­%5+båýˆËþWµJˆ™"ã8T:UQú¼§defê¦ñ—Xב*&*ÉœÂòˆ–ÏÇF2z©Û÷Úcb(ÏI‚-Ùk¨¢“<ŠW—Û̾^ý9þ'ýq‹!|¯jN·PU5ŽÞkµFWNd±W:@Ë"ÿH†Eÿ(tÍ–4ÆâKç²g[ºS—FJî-0Jï«–ÊŒ‰9;ï#.± F]Û;¼É’ÿ\)Sh–‘+ÚÈ%ó8¥gº]Õ9ÿוÃÚ…±<ÈûCºx«+]Ú„ºÉ?B—)õ‹d\~I?Ö¤|I)ŽL=ŸÕðŸWbÏDñJObíwNc8„tg”Æó"HëUî%9³íjÛÊEMlz¬\7é;ìä3²ˆ:Y7yɉ…PÍŽÄeauH+žµ7”=¦_2¼„‰Gú Om+`ÍG~w”̦ղu{ªAs…ta*âT„RëÌSny™êä(Å`pç/í¥HBD E$+I·‚ È0‚ƒh&'AÄ'…ÜÂ9Œ 4ƒƒÃ¤Ñ Ô´ëÃãáQHÃA"#1v+,7Ãb1†œn%Á"„¥»¾ÙC¡P\4<øs…pv(ÆæÛ,¼…cFV¡ Sv7E Øs]È8OòýÿÎÄ!¨Iª¾F&Eï•‚P$`ØŠh ˜È©S*˜HäF¬™EŽsˆê;ôR ŽÀWU2å¹B0Kp+(„„Q! }È8ƒf„r Ìþ{Šrä"5h]‘šVrO* àÔßÑ¥j¢+A3Ü0`„$sj‚èMã0pV%Õ¯Æ]GBŒ°|ª»c8š_†360­›´Õvèˆ:R\>s_cªµø˜ì‡1ÑMt!P‹-£Pi„ÑDC4W¶ä¥Ófχߦcõ\N9|½Žr!\vqÅšiÂ7Ô-!'‹â˜Bÿí|šÀÄø–Å¥Œ9ŸaHƒ¨„<’F9-BhpHNô_Cœ)³¿Màƒ‡&þØAªïÑ.Œ XLq9¥v£É REšl ”¸WyDëˆÛçpÆøäw2£ôõu×qeÚ+h…Âbù–Œen‘3Ù¼+X¾B|PzO0Aòôa‚‚ r†àòÒ <šuî«Äˆ!Æ>§‘ †o3æ#ˆçs3Þ„á*P" »nËN(wFEÙ^" ÈÂÊF¡J…²8z0$H˜`[޲M!êG¬ÓXÖ—öö'­–Eö—H¹" %Ô*îÃ>›#&aýP©è~¢Å5Tv©î˜B_¥Ó†­¢ˆõžU+4@صÏi{¼G@Q†e8d\Ï„ž7eN7¯%#n$UCLÛa¡/g˜*sLJ…ðâ”W#ÃÂ^hUsÐ¥nˆRºt0šËaÉË)N­ KiS ”žJ >PCÞ2V$×Ù>Ygñªl˜ÉHérD§C•Á;1Úw¡©#×X•ÏÑ(U]ÃRCÈBL˜üªÎ?¦\²H@è9ÙúL–J#V´,‡Š ÈfQ&©cV54n«UÇÆ e\ Å"¤ûÜ…˜D[Ì]—òCÌÝQ'õ”)ðD"Ô‚Š² RMB3ÆgQƒ®…Èâõö`<‚Aæ» ä%Fâóëø³j#= ’Q™h†UÁHszÄCo:­*l¦y. ‘T#ôç*ˆûQ*Óëtû-4¬Ž¤A{È–Ågw¨B‰Ä,U¹âVy¬¶zÝ5ï^¨*R$•ÿñ\*8§¢‰}Ò£=»åCNTvQ±qôšû Œ³P(ÅÐCì{|´y¤a;&JG‚ªSÆ´×ñcVöžS'“&.G *”ë•L2?黦íÉç˜[ß…Ši5ã1nX¨”­hÞ”ŒcE%„Y„~ a%‰j ¹%鳘0pᲓÍa&…¾óe3gó#º16I’¢.Z´ëÆ)Å&7ÏN$­J½É7P"ŠQB¹Klñ"«˜–uÌ2ˆ¢õ$ñaàðß `4Iæ šs„2>;1²µÉ²~^ÚaBL—y(Wb¥A1¸ùBáöV* ’¬ÁT‡Š"•él—RüÛÑ)ç+´SàÕêA„­ ¢Ž vHµff$.·û},‹iÏÕ¾WBáx¾‹!O!(•Z:¹ÌŽK‘R™ N&ÄÙK"ªµÍHQåY§!JÒ¹Wm ‚jÏKDÐJ“lKú¨cLB”öæÁø·¨{˜lX…r…e¹VÔ!5 æÃý°/‹R·*Öf1¥8Œt Tú/"!z. CQµô¶;b-aª&P„ °Â™]Â! ¦Í´˜Bb[Ñ»ð™ß3OâéË@F±WÃjŒ„w~EŠ÷9ÎsÕ·.µd[£±ÜQLSˆ74Z¥?ZõšXÖˆGnÃ83ŽºÈXû,¦¤ôØLûÑsKcœƒˆå2ˆg¦™UCYìÈÔEÎz:]hL”.Ýá8Y–¥”©AÔ“']¦[ ¥>—ˆSŒÅÞåºjðš4øü¿b{eWÓ†h„g2G&w`º ä¥/èôW4GUáŒqˆH­* XìÚ¤jî­?`JÂM@‰¶‹EE9,÷íâ a3ïè#šä©rŽò$Cë+2áÚ×¶÷Pó¢øóÄaJµS+]gSs„¡zó‘#¾ß/•0„x™HœoŽ…ŸÒUHÊ!«œÏ|¾å]¥©K_T¬Lãã æ\©p“UE_]Ú–w„IÊ#iyÇ5Ý›-C çJ¾Éˆý×…É¡f‰pÆ%üñ™Aë8Éñx˜%þµŸ­œh„F¡Ê)PÅr»2òŸídÿfi§UÑR‰DÜ1ê›FËõ­%já C¥´#hæ1‹Ò·ÿÌ‹Q) Nþ>VÇ?ðßþHˆšø´ M•ˆöðï Š§Ê†ALÿ¢mc«Öb1Ä‹9…B% ”•Â< •/퓈µFNá,ã(ƒº ØŠE«qÃè*ÂV$ÈoaDš§51!4'¼ …ô* Lã9JK‚8ñ±0ì«`£°ÖÊa(# HPŒ¬c3 bLBéRc°ËŘ>ì↠~d^¸X²Âƒ 8¥L ƒVÒècEÍ™J5Ä Rj…‚¦ØÍŠ"}©aÞ³˜×D¹’ȉ€Ž Æ$c!âÔf±D"£”®c’E)¯cê,Å<¢öÂxîLj CQ ¬Ì`'1¹,2A¸ VÓIà•GîáQ;8#Ú@®>a¡ƒˆU=0¸"£&«QˆX€*Rkȉë'aLû‘ò”3˜#ÈTçzý Ñ &š¬# A†dj ˆ ÈÅb(nKªR£¬²ÑŠz¹äN¡‰Œ\Y!ƒbcÜdpn„&ú‡TˆÔ”QóºræLÜ3¸ÃȲÿ ˆH W¤|PJí, øhù‰Õ®úl†è&”ì<1Ù‰ª‹G0PÕ¸!Wñ$£7 ÑXðeÀFÈÁˆ4dUµ9™ Ôh0œq½vØW k ‡2TWÔ¦XP‚Â1ÃD40„¢y8h„0Š£}‰ (‘b(ÇV*…å˜vhœ!Ñ(²¯~ÊŠc&®Q"¶G«­32¢Q*Œ€Ärc~ˆ¥Å ¹¬ó¬4Ã)‘а)qÈœ'(¦Â8•Fdcv)¬H1Š “#“:ºŠsÎ+j}G!`惣,2“Â3lf0€‚@‘úМ3Æèµº²9Ee£1‘˜#=!}};;X!±ŒB‰) U(伆£x©Ù½m#bi&øZ!/½+Î╟š°Ž!‹„e!0`Ü#°Doûu øapÅ&Âȭœ®³5Ó¬"“øC“AÒ8La&))šêƘ†NƒZJ;9Y”‹zç)Œ ¼ÛGÂ…©œ „¢" Á¦Åg ŒÕ€Š]†Û‘‰Æáê³ ÂKPEVxq@FRºvTS´qŒ"„AHsàˆB Æa‚ aȪãa„4œârhÇ¢ŸìPò²‹éÆÄòã¥'s)0Âdƒƒs"†b ˜rqP¤å DÈGÊ®?hÚ°Šž>.d<98æXj à*…+þ¨ÌÐ$Ĉ¶ž# IVX5 ìÌá$ÔCÜÚ¼ÞQ``(% gT²°2`ÄÐ8JÆ„W}t §!ˆ"þ¤`qBƒ¼Q‚e4U/ ¨ØÕ@ÜÂˈ H"üAŒþìƒ#¸Êr>·‘PŒ51Hþ›SÅ9;‰ xÂÑs‹5ã: ˜Â°Tt3ÅVŒQˆm\º#~¥øaÅóu–â $p‘ è^á#ZyileÁŸ†;Qh¶ çzu-%Ÿyüs5zœ’°nÅ¡Šgg¸… Š+ð‰¤Ééc3¾üí÷#IÍ–?‰”ÅÕ[‰šÎÜ2¼¦B樔VÁšpR.¹é»ÒZ»Fˆe&SSÝÐò©B¹mg*LM_IÞ–¥ø‡wIkmíl7âFuSR´QÑ›*pÃŒo9ÔU}·´Uuoê9Žú¤¹'¤I­”$7SÊ"gobóÞžJ”B*k+|‹ ¦ÜŠæC’Õïøcßô„½­èÆmItÂ4CfõlŒ ØÆ"÷¹¥ù©|¯Bbù\­½K•§w7.nñ㵑ÜìgoëòqÌÊRga³¿ýY\ë¦Ù;û‰Ëå!†îˆERQégiSšT°æ2a~ÞÒá-IÜ]'á;¸Äý \Ëbd‰Tª:U)Š¢*âJB˜ÏL¦f^‹U2g[t«­Ùr±Z‡`¨cyèÖA MáT²¶²ì±&Í4͇öø†Ö+POÜ!Ù’%Ÿ#.•zVò!þ‹R»–Û‹¾Ù•aG[‰¹K£#¢Œ v; „¨Gô²'»oœÞªS+æ%>&––µ_HÊOzq·_ÅE"®û8DC2ïÒˆ(ªšJÛÉžä3%WŸÖ’‡ë¾qÄeôîÝïEVz2ÎaÒåJ"kiÍ´Se1Hò‘”¬^ð¶êýfZµ•4¹¥­Ó(Ç^ü¼k›±ˆbŒFü’‹¿»Ša34ÎR ÏmC9]Wr§8¤]To6tNËÒ–½½µ{ž¶}¥f¾#9°ó @„™‚%†G\/og~ieFrs§7÷ÁhL#aUIIû‘[!ƒ(ÈžÇ2e¤þÃ9ÇÍÚè©Îƒ#/û„ÄN³ÏYUx‹zöÌC ô¥oéJcæTµÝÏ) ÊêBW°§3Ï!*sÚ„ôavˆÄ•¶øO>6Ö·nÒu2¯âßwpšÔy+ÕˆöTeˆGÚvTŸÖR”Bù¦¢ï`\¢´2ÑŒUß±õM%‰GÔƒ(„*Ÿ±:B¹+ôÄ#6HZY²/bÔ›¾tÅîfÔNæT‘ÛqXÝÏYG iÉE&á/ås/ÌÆ!É]ûóç;È–)\ŽBñvMúáÂî¾'ÒÎTóž³öt›F0aδ!^#²êŽÅ¤S)­xZØ¥ò%ÔE›Òz|¼Žë¶#:•~…ªcÓð¥ ÁHÎRdÖNä&ÿ#£ò>íP½ÙöDJÛOEuBÒ¥wrÏ%•ÊŒKù¦ÚTDú¤…õ¦§ ¼ä2JFG)(ç¥ÅêAÈC¬¬åV’MƧZKÝjæÃÖ­Fù´õk?e®*ÊšÖKÒêRœR³½¸¬1FIÖ.í^¯¦TÌ-H5–'¥lþÌD»±_¹ð'ÿRa ¬•ª¦½;û‘W’taŽõ_íI˜Aöw~þî¢PVr·¢†Æ¥6Ù*XŽ‹a‚=IøFêQ¬b± AEb Ëg߬OÅ¢ˆ¶OCgﵦ]UŽã)‘{1.F±Žì¥¿Ü¼ŽG¡ ¤jÒ/v*ÓԣΒ2)mÏ–b@,hÿøÉ¨Ä­YL T 'T®#½”´#d1ßžlìüˆf½-ïJHmÚ4ÓaD*— g3y¼ä8Ÿl{pžôn0D˜¤s;öâoæ&mä +‰¦½~3JþÚGàjP^ žm~§ ÃuvËQJê¢r²ÞG¾¶ï/£®%;õ Tñ¬õ*H#Ý£‚–F¼·ãSéJˆ³r­Z-¶ô÷µÐBG­ê1éR&M˜ÜÚFÉ¿ý´+¯fò ßÙßÅÇÓˆš¼W ³ˆæt´›IDB¿&ޏ]Œs Š-·,]¾‰\5ábX(Ñ' #Õ·F¼±yß~ý(ì÷øAHïÑŠ¯a*÷)»#qõ9üÙbDJ,#™É¹uªµBL¬4ñ.’ϰ_v1ã‰4\IöV½vB£‡ ‚m blš-«X«âã6òbE–1B½¾QU2…9 ˆ‚øOΑ3y|B9læB—aSZG¡2S‚•©Jæ“}ò©é[Òò|À€e—<§›ñ¨5] U4ŠQ\W)Œs#=[_èEG>—x“î{”»¬üiB£EÊÄÄŠ¸H¼ý'ȲßvËÇžRÚ²êí;8«Fž¢—b7u3HÜ×]Fñ3)rÝY³õ·¬Q¸}Ú“)AØÄCŠ¡ê.–œWAnÕCiŒ UŠZu·RNúý,ðóN ×ÙwfÝÓ=­z>uiÆB ¦"*Ž‹U‘¬UœÛ&ª^Ò3¡©A‹(`‹¤ñ(êßÌÑfÏŸ¤„bƒPΤ¡ÌÝ(©‘0œ^ÚŠá˜п9Dë0M>ŽJ^ª¸õñ©Îá}º¨â"S”'u}¯OAF+”©Ôê1 ­e³fyB‚ ÄÍrËÒlþ·¦K~Ù@ˆöCJbµ»sPÛ_ꇃ¥S'Y¤_±d9x’LQ$D9i||BáIWÁ u9L×ZôÙ’úH ‰¨„ׄ[ K®ÖJbÑäv9†(…GÈþ©AºT_æE6Ý\?Š˜cëz·Û¨Fú×mbÌâÂ9+Ýü¤«®™fpZ†eR¦¶µÆ×BÚz„‰=è ô"ÈoºPm¶ŸÄ—EŠDùq¥H©õw9WIí(·Ñåm]ÒQlÊ®#r¶™f]q<-·íâ’1/͆zŒ3-t¯Õöým¦ bÉ£Ž^Õ6>µuël£,Ø0W2½ô/[Mˆ"#ö†c¤”úbHU‘ª­"ªÎp‡©JX©A0¤—4À½Q;+FV{2ò8¿\ÝÛ×Ô’ ®WŽC‹3®SFe-)(Û¡%Z—;÷ ¥jÔH¨X„ŠW}Ƨ÷?¸Œbõ“Ȭ‚Ôj[DÊ”‚%ã"‰/q{1¨ø¯YIS¯•O5q™«äáðj$Z— ˜!JR; Ç?%U´GCºÄkŠŽ×IÅãûy»MJíöhIeqDÞ bˆ!lOã_0õËQzªƒÌ3¡ÛJ—QLL¯õ6º„zº“·„3ŠAQsˆ‡ròyÅèÚÕm0¦ÊO“£ˆ¢6×°ØùgB-ˆ¼p¥"bQú]WÍ/(½y‡*‰Ú2ˆ6fŒ¥¥6D.aªˆ‰=nS l¥’Š¢Œ’å&1ÛÜãsÖèT®/eëCåé&å0 ÅDt”¼­ÒV'®å|¾ ÓŽÑFsŠC¼dFßwÂe<Úôe@¾øRÙ…S ýâ)ŒQ:™ZcØ©ì¤ý:§¥ ¢T&ÍøÔd2NQ£;ýC1s6æ‹a*]C S6£·ô'·´ž—Ú–ä©ìjNÑ.úœžAdÍ)w˜2 ªõZ*§Ð½Ó_+.Oy88‚50‡S ŸÅÍľ5 ÕF:Œ3:dŠtÔö›y.²¾ì½öeƒŽ’rÕÔŒ}Kæ¿I¿ßôWwô*4„ý«mþuõLPSœÄçs*×;S‰ògÒÊ\ç©N^rëækžƒÊr¡»‡Ãä"Š?etŽçA(ÌGÇK©GAO©Ö§®LJMÒbDÝÍâ‘ÈDáµä¼•"ž—Å;ùL Qâ´¨©‡J›6kÊÒ•X™2nQ‡EÚäËS*1©•½¿!Q¨ô²TV2eá¤úï­c¬EPŠ(C± Åvñ(Z\jÌn¨ò°¢·sÝêEïMi2-—P•®¶Í+LsYô‡MÈt2ÔEÞ•\†`f"´«“–‡ôP¸6ÖNš¿4C)±òé0„^ï7ózkô‚±Þéœa ȃ?{š…á[QH÷¤¶,C»•fT‹çv2M¶î6w/Ë]9´óºˆY ¬¶³äÂQ(e2¶§…6!¨K &¨è~°îBüÁ5þåãêéT‹³Ñ%zíZr™Üu#¹Q”äL+„ ‹ö>ºzgP/ìÔÌ’‡É QÖBOA&.üÛë¿'Ú…4¥ÆR”ªR™ª®ÄÇõçÓ'µj*¡#3–MI˜DÒ+-+LôOL Û™¾«#ˆ¸Nï,Õ–(B÷lâµÌ)ÅV¢q³„®ÖBúäê¦k¹4Œta*7‰Õšï¨O¥¯S,fÎqŠ’¢–F²ãe‘Žý+Ç~\o{Rþ×Ût[Z(b ÞW0©]u£ÓlM=ôL1È*UNM± ä²”ºN+"–'R›†S #ºæqÇ+Чܽ‹ÄËî žÚ†™Ó×xéøµ#†ÊØU(‹Ç¶%„*éhÿ>¥sælä3q3e%·Ë̾ÏB¿Ó¶êOAŸ$‡ªLbˆÎU«Ëu ì•`ªŠ/2Î&-¨”Ñ6¿jý9„ˆ­>Õ»^·¦~ßb0S)ˆ…C„ge1^دG%޽kÐWç脸o'H†*Ô¹›»Ì†÷ÝÊrÑÃ3§(²ZÞ!‘d,"qD(ÐUËž¨o7=µtªÒ=–Š¥{:³÷ßKÕÒ¦ZŸJW»¥¥ †|1Œæ1*ä˜)ÌÖô ÅÞå§Ð»á~Ø$“l ç» ¥ºÔï­Ek~gÓ ‘QTJ¹ˆçz­[,Ev¢a>j)]ì×bHþ{££/ã±8¶µžÙ4µ4‰¯rDGmf^nÊÙBg `¬2 ÞQŠjH_šÚ¼ïv÷o6 ªO.Ÿ;\™†Ú¥¼òžÁ}(dM1Ä ‚H‡3ÐÈA‘,BjH診lq)Y4|©AJ_ÂûîTëÛ hœJµj2JGÎ9ÄôÒ¦÷«¾;Rò ¤¤èR„”»];¸r˜üûû¬_ÞDî%ÔÇrè„„í‘Æ¥ê2Æ`‡ b˜ÛiJÔ¦8˜- BkÐC¥lÂ÷úBüà~{ÿW¿Ïìßý¼ŸhAÅ7áâÿÏO± ïï#–•þ÷~ò'¶‹gf%¿:wz“æG"[[ØíÅR«Ð/f,D-”Ã;Q§×].mQLÔ^#¹‘¤LSõ´EIª TÔÊšÁ«kêª]›D'¾Ö»IIR—Të3È|r”މˆ*NB¬­åü›’—^#˜®ýýÇÛ_­Ãn.p@ŽsÓ*WRþl‡3Yè¥+niK_¦tÊüò®1bmt¨‹¢c*´˜Å]e¦gHÜuPŽ¥êj*öXS¹Šm¶±-u'ÄJ¦*òŒÒu5 ˜·Ìà ‚¤VGJöÔ_½µÚR_Éϼ×Ô%GÄä3)4ÎVJIÃA“‚¬ÿŽaTš†I•ìÒq{®KæbˆB2ù~¯TÕ®ga‘J„bSö¿ün¦]2è÷¦×åqw„ éC Ø’q‚‘öÈ!V(Ôïòr+œS"ÞqYÆŒhH&¬¼•éÉE@@"#JÀ‡ ¿ŒlÅ1B. L˜B‘ pvŠÂƼù¹W½…ô^Ò!uéã]—2ÐRÃ2,{L0 cÌd çÑ‹l!R8½È§ïÙy$Á‡%Dž2Èe%äs1 PG…¥½ ѯ=Slæ5㔫ô˜Ê‚‚$"Ÿ÷ ¿8nvU.)T„ ƒ*‰xÓŠÖ a; Ø'ê¥|Ö#ŒtPu[Ê´¬ä@à ŽP‡Â6!ˆ›ã#1eD'Qÿp6"ÁÅ$nãŠ*)¥êÌÁ éí³\A næ˜[5Iödrù B$•œ(Vv1‡s }ÌŒá¤$¢ #Õñ<"К%5V«¸¹¥¹m‰•)MŽzwPÛ!‚bÊå"y8µµ:Ê‘-OÛO»ûÈô'·ÕÙÐã4t JŸ 'E`¦";£·VÙ&ºòg2]{ï²oââ²<ë…;jþ³P©G„Q*(ËU¢žd•ج.Òâãž¹™íŠ?-JêT¡åjñÑÎèMk˜Jw:lëZÙÆ*2•D£[-»\¡uÕßL7ÿa¨)d"!*¶êô”%ìÆgv'ÖZß3WUÔRS+\š„eÑœÎS)Ï1ΗO¥‰¬JÒœÈd?í3ü}%q%%©½èr&ýˆØåS¬Ý¤,Š·_eΦ¶º‰­=ù5ÙJ‘íÏ•ŽCc+ °Hb¢H§ ¬’ŒD£Jnµ°¢R ؉ûì)ðìHÖË+÷¡X0*KH%7ä­Zâ0CѸÁ¨0–¡ÉÔÃNâªø|s!Zµ÷ôU 91˜­:³ü4’PÔlu9ø§öÄ"î¶×ÐÂiʃ˜Fš_L"%9Qšj)…üâïˆ1K‡ ®æ˜ÃãÔ;aŠ‚môôô¢§ÌÁH;WhE$21Fˆ„Äžb­2‘ðã)(Šr9à¨/` Â)ò±‘1Ƀ˜r2¢œ  *x#‡Ñè夿â:9ÃÊÆl CÁš›ð‚¤ä(kšãà‘IÝ7bœˆçäèŸG§`tQçæ¬ÑŒº (ƒÈ¼ ¸€‰¤1‚pŽÃ6EHcÄAd(GGʨzw|!áèIDÁ [T°‚TÄ„W\ÕpÐGµ±8å~A ;BêëÚjr„”R„4 ð Nð0× Vf¢š˜Ç+ü ÂR+â•ýÌ@0ĬP¥[׆¨ ÃN‹B‘Ù\ÉKoÈ1Z¨¡`œf L Y˜#&a—´„~'Gh·XlPùP“ôÁp„4ƒb#˜S‘Åq(0Q F*ŠV‚;*Ô¯ &ň¤ °HÚ©A€`ÂzA9)a@°yÈL¤d°pñÑS\R…Lj¹éª¥Ï?f·ýü!j1U­\ÓŠ©YÒèµãÆ|2¨ìI)Ò\#‘vâÚD?ïì|åªdßZgµŒ†arƒ¥“¿ÇÇi¦ B:Ûß.b«w UÂ’Võ’&Ì‹I})ñ³ÚD+ßO …Âæ:ŸØçr÷ÊwfÔ¡Î’ŠÓ;œjɤREJzS°”«Ú|ºdŽUcý¹´Ô}bÙ± É<÷Q9Ñ=Z›n7¨–g”®Ôd9_QTaEZ¬’‘IZ$®r`×î{½››ÛJˆêÿŸžØ#9XbÇFlz䇿ªDj-÷HÒä+—ýZqÞêucyëKœÄ|ÆÈ»”eÛu‡N;ISæ=އ}æˆÚbß䦳§)Hú/Ó—ôõdjU)SkÝ%f*ÌÙ½ØÈA0öˆŽ"Z؆d"ãCPÌ•&vr²‰[”û ð™Â@ÌpCÀ¸Ä¥êÔ–Òø ¦ Dàî(ímÈ'£ŽØcXs’¥QBAX”3ÔeT`„ ØA9ÊÂðÍ×Xöçé‚A*9㘤w5‰ž5 s¸ÑS‡ŠbN?9€ÂQAQ -R¨@F \Z@1ˆ"ѤlóŒJ :ÿ‹Ïv£p¬\1ŽœÊ0À‚@c %…ÔGÍC†Mb…ÊôØ|ް+„‹N¤F(œº&F¢ HÃv6è‘„Æ‹…xñ Š„¢"ÎrÔƒÒq(D[òqÞm)[h2‚÷\¥¯xE1Q°C9´a mÊÅæ%T¢ ¹2“7!ñNÝȰðCë.ÀDL¥øSj¢%T3" ÜZÈ4 da¨B­ý9>Á\@ršb¡‡äBˆ¯Îax‚±±‚1 ¡Š4c¢3BPÅV+svšçC¤…TýLIDR‘™|HPAà!F ÍV}>ªXQd0`Å8àáxa]Z˜-âp 0‘ô ¬aÑÂJ‰gd–W!PFÁ¥ËN@a  á³Jû(Â) ŽÐ…!rŽG*àS -ìq)^‡xä#Aº]à ¸Ê k©ÀaJÑJ…£–UC#Ϊôú3†Ê8ŠÎ"1Áø£–1=`øX,¨Œ¼ET‚¨ƒ0cB ˆû!†&c¹,ÐBñ—[‘è˜sôÉÙÿøÉˆÄ®L× ` v —­´#4(/Õiü@gÒ¦ÁøØL› ‹6»šs!…3ášRŠSc6f.õWK]üKõ)/Ðp„.dCµW¬RdOÂôœO*”¬Å,ª¨DJ#SHND µ~‘9Êd^]^ó 0¬½Íìþ}ÊÉImùr«Ðâ%*N]%è\+Ðf!I9C˜ÂzFØ™·5wµ÷«¬õ2úW_Þ”¥2aB÷Ñ•²EÛàœ*è9̇C5ˆdfES;»j‘])ܵ¬ö&Ü€ˆU9MÄ6!´i­—§e žR©UH0Y3h¢UjÄ(…{ •**4­»–ߣ38…% ¬l¡6%rå&M²âEý»V<ÒðS(¾ …(Q‡b=-Bè»q0’óªe:yËaV!1ŸÞššZfm¤C|ºä!zê¦B¹QÉ¥ö:È£•‚ŶQܶýúsSu/^¨a„üXë_QIDl,ŸzaSŠù¦8ƒ9I—6U¨éTÆÎ©)#QN–{Q]b‚1IÜê©.e¿¾_ÜPb‘ȶôª+`H7 FácŒ‘]È dÀ £/6ÌÆÌlû€„å(º$²KM(¡……¬C…'°ìfzÈ;¶©HBH'!÷…³g‰:ê‘qn!Q~ª(ö·óLÊ]â¡Â n¤ ÆÔ¡&µäÌ`©Cï&걦:iv,$Ö‘s vM8æ‘‚˜S\<³b÷×ÿ<}þfÖ£Óžxð×%&4’RVœÂêÆ 3PÈY§Ïþíû&8Ž¥IH¼ê…í£^š¶}¯2Dõc"r¡ÔWGy”ŠÔzñ+ºøR(œ›+!PGKª]I†½[!Ù_ ©«C*-)4ÓÒSdá³\Q­^·§·’œ·!k¤•"™Ž§†*‘gpD®ÉaZ!ðƒX•ËMN²T‘{÷…c¼Õÿo‘XE¸GcÉëÎ0‡/ñÿëVý88€¢2uËVE—e‹yusRîÂ’H‰’ÔàÄÔÿâ?ߟéëBP9… ×~z}`e†È8EÔ‘„;Æ5œŸÑ‰ª5ˆ¨¾·â–°²•RòèVˆ (ˆB Øü#Е£6%í >Bªyž¤f§3¦dC¦Rmv¤Â#œMHÆë‚Â6¤:rs€’%8¡ ÀÝHðƒ$f¦ (%Æ %õè^NL†ôÅU •üdÚ(Qœ&`"óÇ`jŒ# 6}È®ÇÛ»–“B½*—'.ù†@„Ôƒ‚ ¢b¹«ÀOÆDÉâ©M1S û·G!”"¢2lVGf²"‰¦ªˆ@IÐâ‘YƒŸ¦‰{Œ+c…ÂÈ!QAa”Ó¤E‚„œÄ!T øÅ7óîd2ÌÇA@Ê 8°ÆÓ¤A¼X¦¢) >…:— rR…~êg²¢³‚‰¨!0o°Ã'î¤J11µ"Ê¢7 Ì*’œ‚æd — äV>°×¨CˆV¨¤ Rà¡òB£³ŠFÇN‚Ñ`´×©^‚82J‘†Ôl§aàŽF¨¶¬þÂŒƒ*§‘Ã0"Q”6rhaˆ%nAª•¨ôP´ÊeZ9ÞÁK™©óïq8”Ô12µ›$ FÉ\d””ÄRätHÓü`ba7G0È&2ËKlQ36 NS€áŠBœRð`ìãÂ>eõˆ;Œ@@6  ÂP­‚(ž:¤˜âÜâ°¦AG`¡‹Åa„7" 0Ø GC¸a ±É0"Ñ»)TS-=s!¡4ºå7£~9ÐB5F:•þÄ ‹ºÚˆ%”ˆµz)(.QL„Îõ}}Œq,é®R²dšÑVW¸½[jzý‰ÙÙÔÃï*®iœœ~ó²Þ·Ydç)‘‹¬—o¾­ÂPŒ’äô%‘¨–ÛØØ)ùWÑDGFVâH[pæL'²¥“?•øN¬š•sh¯§-gÞõ-HÊ!DZˆÈJJy“×[½Èžü•öörÔì#cÞ¾ÌaM¹]+ÓÝz£Ñå¾*÷›52BÔû˜ÁI_øÅ!HÞVåv9Tc%׊˟[”žÁ|F«W‰ÿ²_Zˆéž—%Œ-¹8#D‘Ì\maCœ2o+ÿ*`Ãô%tÜχU¡mŸ&#sõ ¼^ÿR޼rØÊÉl_ᛆ®mCšfIEªÑóî2©A™×lTkA9,åÚ7ŠVšZ‘M½JF=䦶I„òL¼GgÏr=2ÁEsá dk„wg¥p­#ŸxT¥{ z‹•~׫HÈ¥»9zú)DN´DWaDr ë²òg,N÷+í¶¨@–É8•gbµâïMU°«‹¢ßTÄ\¾­RqˆR¶é”%ªl ¸;Ôëâ–ì‰RŸÈ*H„Ïó'™éJ¡ÈõD4׋õ•ß~¢ýÌ1î¶>ã$Š¼Â¯œ+ˆå"У.i6švâè‚~KTJ%>µY,ä= ÛW½aG\åJ"`¢¸ê©DÊ2-h¾I'þ¢Ä«saé«W—›«ï…LÅG1S>‘»yN^Z…²+Úõ1®'˜z±3θg+0åR‡(‰E¾cï2P–©O•µÿ<]µj«bílš"—\\FrœE•G ˆ¢±.Dª‰ª×sVÕÇi”öñ=uJÕRPÔ¬VÆNsQRw¥”ä:‚o÷2 ¿÷|¨½Í‰œz"ä\So÷3WÒʾ'WêÅ|e!Õ8ÔCscL¦CèS(Ħ·†1H;×­ÊÌd,1ÔœâÅÑéü_]Æ&cZ¶Ý¦|“<Çn5“̈s©’å*Ur­–¿ù…(RÒ•¶õ0…ª[ šÕ}ä±7Y#_®W ²õ˜b£a‚‡s‹¾^–îÕ[yøTzZ­w]3×wfÛ%“åiëÊø­ò.²¾¦ñ¥Ku¶#ŠŒ§'2•ê2³.7p‘“mB±7…Æ&!r g"Ò‚ eÇ’%,VÔ…TæÁC"GUPÀ˜` BbŠ)óJ†«•kb™(˜ ¢öÒBÉ!̨tÐ!„}Ãa'†zSž9ïôGæ@<ÏPíé?¥Ãa‚¶j'"˜vz¨z†@1¶/ÄA¦€f5n˜* õ 0B‰‡ðá 3Cµí…3ô£×‘TZæ!‹š³M³wH)„7qõe7r´J§Q°Ì¢œâz—óô#ˆÇÒ¼ÌDt¹‹ÚEÎ!)c4RkE-ZÚo#p–ß±Lè|'ÏOò#“•3˜ï”;¥Ùt†¶„,ëžZ³a™ •>,¤^Y›Î',Œ´z£•Quúv‘›Ÿ?ª.âç2£RÊJ¾‰CQÈ*ñOqrÆñÌ*Oж^íª•mù!wž„:¢ívÖÄá˜cu•TB¹’º’<«N'œÌ×67’¾5Ý·ò]ýܨÅ"0œßfú*ÈžŠc˜D"z̆D¡ö}ü³a–’¿wmN®]¦UJoÃXUa¢+#|…H¤A Ú‚ãfrYE"ÕmµŸ¶­ teÅ#U=°‰k¦S³ „²Ò‰Â&Sí»L­Sž¤,GçÒÞË.êÙÈWwyÏGêÌéÿøÉ˜Ä¯¶Nÿ+³¿òàð X ¬ k´ Dïšðšð‡ô†ß؆@ÍÔU lzwÊ(ö4ÃŒ†™UØŸbŒH!‚`Ä)‹h»P7'?@(01Á¡ãºþ*?33e²ˆ)356Ú6Â(”Óö~!äQØå)UäÆpƒ2³sà¤üC1 1)»¢ÂÀ¿âè)†9É\"#åŠr.˜‰s L"QªµD ¬FjœççyH8žŸE*˦ ct´–„ÈÈÜ3VC•X¶:<žÝH`b"è¥BÍhÐ7²<$Æ á$:AýíZ 9@¦?1ÒÆQ„r0«…Å4(Ñ=ƒ9’!ÑÝgC—‡H†@ƒCRw}]˜H# ‹ˆ®Ñe ‹8oÏ9ÈvAðª¡KàQ¢’ 9 *—â €búÁŽd 9Â38…J:@l0!§q@©Î3—2ZrXídb' ð‡n”1XCƒ(Spêå¡sˆ!A@´ª‹50Ì„a„¨Ñܶ3U ¢)ÌèfeÆ-¯Ð­ÑM¢#8 Š¬$A¸B1GAü‚™ËÇ€¬E„9/eh0¨ÕD1ŒÁŒA4#Ò¡H#@¾¶b&aéjÇ2úÙ"¢x…2  0%¹©•… M[â©zÇDŠ ‘0FrŠ/!V„ðdñšUN‚$ 4ŠW)% Ä@D\ê‚ãä@Á)KzSœ¶uûFÝŒ¢!DˆV,;®<«n8c€ŒC@‹`¦²†D†Á„zªÞ(!”UÛn§ÓžŽI+ÂäñÉÔ É\{t¬š„WU"½ª}1%2ŒTc#QWí^©éQ,Ô7ìc#U¬/MD}6¸vjkÂq"#è÷ËMK$˜¼Ç}°ê›B{þ©u ‘D#'‰uÚ d^¢ÔµZ)1Ó]W«¢IÕò¯„wŠŠ×ã-ÙÐÉq•ÙØGE&X´u¡‹~=nmëy1_(bW1u})UK®á Šü„3šŒ!Ñ’Œ{ïÜ\×î©×ÊœíÈj¶"e®F©o²ŒCbIÔ×bMc„®ŽU=ŠDAjc™½Œ!³®Eþæ¡vž¸KúÉ„ZˆÔ^¤º¨ÕÍDJqÆ}U´«1‚ÌbˆIЬiù‰uH©Ëyÿ§}Ür“¿tC_t”ݪg"ȸŒË&]ŽWò:¹ñÎÈ•gOÄë5s±ÚÕ9þkX«¥Íf'ÕÅdv­9d];Uμ% ¨ûœ¢–ËV)~Œ·nɈ–V¸Ûªøì‰Cê ÉíNr‘:¹÷±zV.©nªV£ø—ÔT)Œ(³‚rûXDÛûÓH)Ýdæot´jî­Þù”®?ªü¨FÚ“qÌ:ׇs¿+‘K´8ªIÆøâ–ûxˆ¯Ò†FLä. çGsÑet±¤“;tGyÇ÷ˆÆ­Ur\õï”gZiJFN*ª#jw»éD©juoïÎß¡Q;cf麪Gô¹ˆU#ù êW!“¡qY—Ÿù¸!l¦íÙ+&6»f£''+å²íeª$ýïˆ>Ñ(y‡mÑ*S¦MV!­QÎL¯‘p)JJ|aÄ—º¾êÌb}Y§Ü[S(á’+éZô­(å!ûSÒÍdtLÇ]gÝeEÿ„T¦•Höâ™p7°GBî-TU¶ƒ Š^ò Ô&Ec¨¥)Î-lÄMÎv»ðˆÌ~aH72aMcWHåúˆoVú˜¯í«´Ú5hq ¾zJã+´†Û1›ú›Ô.["9¤r3ÕŠg#b Ëùf!U±0O‹T²i·èÄ ŸZQ Rò"›3JB1ŠëqÑP›Å]Á%òÌ£†Ù8ïLGÄÅ“ŠRU¹:¤§‹” ÌWÌÕ¸ ŽŠ…ÔÛj‰ø’º© „ÕXt!iÜ/oØ~°FfÔáTÚj5e³]óQ.Ë^)σ9—³©,‚¹‰¿S”‘l½®PŠ{åÈ2ÉäÚa)ãUšo;ÿ*ªŽ&WM"W„+ÑÌþGb3~§~“N„~S¦ÿ/#ObXglü±0ôŸšìeqb!ÆMåáZS †#ù,¬"9:¢ó”çO¡Ü¦¦ÉJRÚ™Zcj0¥m"m)Ä÷m¨íÿ98b®žü˜ª?Ñ L!MRr*2£‘ÝÆga*–T7éþj…#.ùÄÕõ$˜œ¦qrÂÓ%#{¸Gb»úâ¹ø_+•³þå º&ÈËMdãyh´­tŒ;ù„+¡ #aŽÏMNDzÙZˆv“ºŽbótÉ[d²-ê}z³s+Œ2"(™F_-9$>ý™v°T<Þ¥¢sg"Ù¨UøZ‘R¢HC:‰òѶÅ̧ºb¤’«ø´±Ä&ˆ|Æ2ঠÑ„,l`‚0|§ˆv Á½:]žç#†.‹Æç)ÎŒ;q) ó Áƒ¶'l (ƒP—¥Ã”VˆUY GµEz·~Eʬ‚}‹s$ `϶ù˳OAs T»(!Nº5W±¤òÒ½ý9?Ö†cì’:>yã€Mõ +uúý$öb©Êj2ýã`J*V ßÁO)J)t‡t”Ã9Žw¾ W¿UòÙ!Có+{Öòèý£ú=Èâ4ŽbÐLõ¢É9…Z*¦«™·§ÃQÒE,ròžC-‡æ­[B Ùè28 CSØ!D¤½z}5´Š“«µ!ênÌí¶^[H­ÉÆ[ã«¥JH´t¤d¹Èbóòïv·ÛYüÝ£ûb[k 5;„ä(èTÚ:æ Nר·±¢`…@¥\4_·Í,šojðêMißE(‰gQVÎöM¶KO§ÿ/5FFj`šR5¸©-%­˜©NeŠ¡]‡ Uµí`Ó¢Y)Õ¡ZÆL SóQ¯¨6AgÂÄLnĹý‚–RqŽ[ͽxšÁq‹;4A(|Wñ– §= £œdò ‡j =%È`½!sj Æs”ÒÖ½ÕέVåKº÷6ìGÊ„•œEð¦q§²–£ß¢ÛvC 䥅£&>^Rm]DòäN$)Ηˆ‚)éßäò¾˜Í2(ÕQdý.ïוšâ8T©œêª[/z\ÎR8£*Õù-Aq¹2Í]/6¾É,ñ9 #ÑœP‚e!ÔÖqOiµ¹âhÛ[Œ(Œ `íÎÝ&ÛCÒ—ò’ReIWÓ¯žªœH­e(D£“´Y´i)k{”G"™ J!Ž…M9¸³hž‘8$D(VŒ…!sS¤å¥0=‘ŽQ“l¦zÚÓCMv*Í<‡)ÎDíÅÕ^1®9È(Pá’.Ý™¥µ&ÌÁÎ…(õ54µézhô”Q’Ø)[•Œ"N¢Eþ¢É¢wsGÇIË‚üž{U&;]îûJ³:<åÛñœ¡Ç^sÂbÏZÛ®qdžݨ‰}!¹Š¡ȲíV•ŒP…¢ö"Ú´¢} ¤\ªa‰ó=„-Û²iâvÓ&W ÄaŸW AH…iÄa (©>Õjø’.IWîMLíÞÁ#ZILZYdrŒÇ^Ž•T’ÖÛ=‚ø¼q1‚J)±3t½˜KÑjÄÄ¡lôI•êÊ9%l¨žŽÚºY+j‰Â–1j½D«Š[´Æ{Í9ó¯‘%Šqs$ŒP‚I¼•¸J…‰5jõ¢…1„+™CèO’|ë÷`¢<Èø‡Ü]ˆÚ¨ bè0¦(m!Þ#qmDÂU¥L!¤-­’4.Î YÁÔBœw×R"Š÷ï)Wþ”©Td[3¹—±1éßB…õ̲¹¹œò­×Â8è´˜DI{~½Ý’)ÍŠkR ËKÖ)ôWµÚ„Æ^aÍc !I{PÖ¯·1JdãÔÍÚ„ µ%b]ÿô‡YF)RB7s±*Á ”‚±C‰Lt)ù‹‡Â*£›Sõ­„î’òɬ.¨gá„:Y‚8Å0LÈ«4m-ùöï‚AØvY‰îßµ³‰Mn\¯¹å&¢H´˜ï¼«c­ [š™»”«óSÍÌÞ³4 €µ¼ÆÿôÙxŽ`£™V§jP)«O–óÒRÔ¡Œå9znÁäžÔD%)]WZ«Q|—TñŽÁˆfp94%Èw·Í¢SR¤ºP…ÌâÖ$ðÿPŒya]‚*§bDqxIŒ•«Ë¨*% Ê´# ”IyÏcJ¦þÓ­¦dÌN[2¬9C=M—WÚÛí*­»òÊ)…AŽò¥vZÉ[qFge•måÌ&®ña 9SËUÛ›X¤íë/" ¿ˆUˆÙ(BÅÿøÉˆÄ°ILþ ÿÔ‘Þlܳ‘ý÷›O°ö€yþ(g’¥n³Ü­ êÌp(+cô âÚø(ãÓ âu^3b C?Z\ÿóµKµ1ÔQU+›¼EÑ…0@áX²ìC‘k§>OQúLÖ&v«~#­>ÚZ|˜;DjœšQ@¯$¸`ïôä ’Xµ+‘ùÎiKŽK#ÆÒždZ¶”˦ETZ0ˆ\o%È’­Ïiºû“v³”W­Û×xF¾µ\ÜÔ ¨S¢N½ëR/OvÕ ÊgFVZU*——}…j¤f¦ç¯-U©­UOS˜QZÌ"³{ƪ¡m}Úfz‹ìÔR_¸I§·1)U{!V@éé+Út6Ü—j,D(ÛY£TR9>¦w¾–Ô.•ÑŽ :¹)B²ì“2,ø‰\^îÚˆ¿©ÚM72“Èûµˆ9“ˆ#¥Á0h\¸æ ;Õ©½Ô”b§a M–% ©Â3ñ¬EÒ1×µîÊ`áHãO.L]Ãëa:Úý»W‹Š'ɸµ6#HsJTé(†ýy‚¯×¦§öµnC•j=¨‚•ßyß³Hì¬rçÈEbï­vªb&Ú¸6¦Ò™”Äœj±Q V ¯T”e*²~‘3éúÍÛWäF¢}Ý–˜~ºC¯ÅÚ¦bü‚ó!˜ÉvªŠ`¬@`AD‰-LƒBv+}±Ñx˶‘ôÿ°(Çúð͈E‘fªžÊË–%ûJM™Â7±Ð‹j1…’R:ɦw¦ޏw9J)É}´WDÁÛ¨wîþ„+Õ˜&e¶¾Ì¶Í¢∥Ç)ÁT·xÄ^¯pnú`L×+}„JOU⻡$™ÕyüÈüGwlS,.¾+ˆEïÌJÚžNœ]+È\ÒÉ%â>’ò˜¨9 )Œ!Û&±UÂÑw!?“OÆ[½îõuˆ¶sU÷s¸Äã;[O'o)™ù¦wK.ðŸÔ‹Zð¨RåQU4Fr¶'] d*3»£ç^6éQ¹s'Wñ•HªÚ²j˜)7äN=jºbÙÖ‰–\ÁWVjL`ä pGè_™~²Ù¸ØCã5ПrãÚý>eUÉÆ*íqH’…B÷u^¹¼åt#—u֣ɸîŸ÷D''”›ÍVâî`¢9oEÁU^Ùo¦’¬D³š‹J>âèy7ŒJíÈt¹‚ŸÌ3˜Gj½‰ûBÔL&Þ¸¼«*»>¦è˜ÉTU•>¥²1Ä”C˜Ž:\C”Œu©ùfôš½Ë”›È¦]»½Wg–7‘ÛpE¤bÎà‡ Žq$ß}íé&â&rö—¸Ê†krÏBФզê5†„Fâë*£Oòá;•§S“6_jº™%n6žË„#ÝjgIŠb”…¡ñ§é‰½Zûêv!ËÏú‰C#ÕMU¨Oº¹rWóµ•Hå#ABp×´Œ³u¦:j¶Ý•I-/“MYäÑVä1œæïÊòÓh¦G²ˆéÒ’VÌëIÆ[‰íìºíQ=z‰ä;Bm.Ä™Ò͵úßʘÏTTÜj«‘K±§Ü*fLRª*:R- ûÝM?eh-…åà„Æª©iZáâ2béRŒ}T‘Q˜bÄyN3I¥òŸ O5ÞØlÙT­•âV4»tKÕèÃ9ÌvUó «…-˜•%÷ï­­ß„©Œ"ûŠönMj©˜¾TØÌ‰¸W§;fy‹öâf5É•M-yûÙHºØ" ®”\Žž¸ëff²e&ÌSseRõdMÂQ „-ŠG'~ßêd ŠŽfô-•´vpÂbI*ü³Réí¾ÕS7+•¯´Î Â#”“)¢œC7JO·×Ȳ:¥ B;×q±s˜Ø# ]{&-bÈA†VRâî噑»×=(…«\™ÄÖs»\òM &YœI„9b¹Ut‡YÃ(ãI[©¥›3­^#ˆžÄ5/&ü‰2oš­ÕLLÚ¤c¯ D±Lp©Ïn‹yy ¥ê›+ã+—»ï.z¤ùclÓŒc”‚¿¾XF×\ æÞl6tåtá ŒšcUøï…ZPj¨‡j(Q_-c)ÿÄ?’¤W¦5IÅnêÐm³Ð¼Dg"ÔÜBLYU<ÄaHê´*ˆGBåd¶}ê…|ìWjzˤ¦’ ÎAªÉ]Î b^|Öì*в¹‚ )ºná‹%¯§r½šéÌ‹¯|Kt^7XiÔ¦v;„c¢Óã[ŸÃ6Õª~y•ûˆU¯Õæ-Hž¹I‰Ó9LÞ;pœïWÁì"±jª¢V„œ¸)dBYí‚O^ÈžëÄ;‘J• ¦bŠ*$5©‚’NS¶Ó»ØÎFn ‚orŽNÒïöÑ R$"7‘çT9Gu%m¦SÚº õÎc* UÌ/&V´'–™GªF8„r‚:¢ªbñ<-?¶ÂÑC!(«Êr:xVÊì¾› …B‚'~ÌçÙO½EJ|„uN6ãÛ¿9”íëò.Sr…D&©ES± Ã’dr&È–¾ ä5_JRí=ò˜—®î"²>»Qjq">çÙÒTRe9×Õ‘fÓÌÏU:¢(' lÜÙ$©1£•Š Ž)/Ÿœù ™L)Ð!ìN#õÖíBe:­¢¦™¹ïå˜ÊÞªœÆBí«”Y L§Ì]%º”·s;µ„Ü“PI­B2ßS;˜‡vè"H!–i){¦rziûžD»$ëÐ|2ŒÜ›,³)\uÕ‘˜Ë*bŠ–3‡m h…@”º!«Q_YF=Y~kÛOoü!r†Zƒ îî!Œ!U¿w0Îý/Q”ºåy²¶·LAß"¥KÕ[ ´ËaNò+«cQU<²#¥5|I/LLTû<‰ß&Uݳ „ œf!†a;BÁ\¦sgc M¢ ”+Š{é±›k0n ´x6“A %/¤~QÒ2ˆrÂ:,+ðïW”ØDgaȉRÚP©ìÊgÆ—#÷ˆÜJ<B2Œg†Üað^½ØÀD0¥ Ú’íˆÑ„¤ow+•-åLa„hƤ340+ª¾2Áhª¢Ö:ÓÆcs- ¸nø0eC0Å)cÂ0 » Ãå¾;8vÁ2Ž=> c± DR Ìq3aB˜2ŒXf¦x°É rcÐ*Š39È0ˆ Ä9T*ba»ñDйÃl× ÌôÁÅÁçÉ·­ˆ <Fx „±´ (‘Czù¨ý7þῘ¿àÏúH°Ïh@©Þ51Kà/åO® ñÂ"Uè)‚ÉšC2âTA…*q­%¦j%tÛ+6 †j˜Ô¥èF+;y(^Áy3:ÕUì˜Ìã6µ“;¾¿­F¶¦¹UŸ’ÁQ‚(Ëš%h².1IÅ:£9xZV¢v³I¬Æí’D ¨·B`諪¥ã7zúÛ(ù!¸l"- >‰ÊÅ­Q*‹Š„r Žu1¾–S±w\ABÕ’âñiTì虤e-©¬#,ߊÆsoÑ,Eâ¬Åt#Ù$%¨r:9ì¦UdoçÔòž‰ùë•‘ºâ'6Tâ:¡úzü¢˜w²«JzÒjîÚÝR%Û aÖ®µÿ××FÏ\ª‘VŒ¼•wvÑóQa º¬)g½¬äƾ ÊTO°E¢£Ž+¡»|Wy¸†£f%ÄR¤Ü¹´é³Jíü=Nì/ÖûK%)R*"¾å S"+ Ä0Δ']ޤWNË[sŠ„_ÌÜoCB‘vãTæÂÑñDO¤)QM¯~â"Ò¢æPšŒR³5)”Ôæò1 V±‚Œâ¯h¾ï×B:23w>Öd²þK¼Í'¹”ÖìˆÌ‚ ±\r_{ÁŒ‰s0”ëÝÚõµ<"¬õ õx—°‹Í)YŠORtÂÉu×Z !=pö+Š©|ù¹dwâÍ£Îr‘ˆŒÆ¹ü•- yrŒ)Ä‘3çï—žÒêÙÝLËD7Þm^²ïŒbŽÏUÁZ‰wT— qY‰A.dl¿TzÄ¥EöYŽeÄ A]+ÔHíÚË ÆT¹#+WKZDÖ4¥z‘—ïJ3O ~Äv\¡H23þ”Ö°ÞFYUœäS/oð¸üT´£i)šÎ³£º&½̾]þÅ%b ‹W ‰L{T\Y‰B’¬’.U²¹¹ßA9ÑxD2„Z §_Z!çUê#¹J¸~̵©õùQx¸W”¯Ì †QrÙ ¯O§Š R²lÁJN’¾_ÓDã;³ßH@#Z6Ÿq-±…c2©Deó¨k¡Æ}±$-Lôr8™n•¼ÈND'9GI_šBq¾¥}côAG~â3»ý \xŸŸÄ±9U,Dª,”¶—…Ç»J•Jî]L£½‘”¨®J:P„©W”ßµÎç¦Q("±l‡3§{ÄC#’¨qE(ƹ˜©'ìý뙥LD!ìµ8^)ó¿{¤$ÄâåM·Qˆ˜ÌH‚+\ÙÇQÙºQy” «²¸V8 †B <+F`dÆa "T­G§J ^ ÃT £­b9Ê ÂBÄ:8fԌԼøÂaŠœ7Ðû![äŒãQ˜Òø0ÎN „š ˜H¡û×S!Þö Ðä¡x.ˆÂqM H'C£`ˆ%¡ ¢m‚t;¸LÂÞL¦ B» жA>YÐ F59´X¢…£›>2û²ˆÅoD8±ÄJ‚X:²ÐœÂGˆ¢N¼©‰QV˜ÝXª„nC‰£³$)o œDf6f®(IÝI(ñØJh;½Š¨ë|¤Â ‹r´"©È˜B²q† Y($»£!) ¼ßTä!LuÇ7¸Ð1€ß hcBU=^.´12²†ªZ¬¨¥+ŒA‰‚C0æžçΠ`ƒ=W4ZüË£¹âÃ¥:N ÔMHËÅÇ Øb7ŒGQꨵ¥3 œ¤)¨¿ñ KF]Ø A x©2$á«‚ï(ŽÑ¹Ídà« DPƒ¼iÂሤDA°a‰X‘„¹z‡Cº"ÛÒG+9Œ¤QÛÀ¹Á&˜Á=â¿ HFŠ%¬ªgV— ¡c˜ŒhõgæC†0a›Z+ 39„ ‚ÆfRú=ŸÂÄ¿')œ¯ãR³ÎÔ¡¡™&ØZXÂP‰=#,ý•(`WåÅf45Ê¡Z Czt9Î1BaB„ AB¸YO„5'gðŠ v í!Ø9 ¸nÁ A«yÇB2-™BXPáâ 8¾ÀCkTYÈíÄ5‚ ©[š ƒA%¡3 G’:AȃëÓJ=bº:á aÒD¥ªh!ŽÂäÈ?Ë·„Oà¬wccdq‘ëN6g|hÁ ˜I™ DA`ã…é–ˆwawDö 7èð˜„јÎ!Ö^  C5 ™A‡˜+ó?‰=¨ŒdWC+&Va FqÄQ„ÌRvÎw²t]\…(ß‘ÖÚ4ØbQK”xv± ¬§ë2©ÎURmùk"ŠBnc„3ˆ D== /Ühc2•+§Æ^0T<7Ft—A”ÅÈPÈÐÄ£‰RT©Ê~øƒrêœÈBü–§¹Šõ dfJÜ2¼­Ý©äR...F³¯áa`œ1„hpfãb8ȱbú&‚fc$ç\¼zço¢“à™9*Ñ J3rjBÁ¦ÐPä:³¡ì^@ª:x8(Cü%!ˆÒ©Ø2L¹HDC›0—§(aòå㘪aä9;Äì­çLF1@œCnƒ1q¢½¼‚)àªp0TóvÇ8î!„ Ó„"Ö¡°ª#±£ˆâo‘UUÖ(> RQŸ„ä†zŒè0Gjd4sÁ€AG:¶DªÁLˆ*Ñ 8qÊ‚§öˆ0NdÖyòR ‹\L°(»‰à • ܤÌÐıÁØÆBR“¹„(!1ÃýD*”)«‘¥é Sèú›1šrŒ@Dt ©¿eÌq €ÃaPà«ñáKÒ  J7ê¶Ä@irêÁ31;p“Ç»˜Ž² EÊ£È%,½¸LÎ ™Îu(Ì"!7èp˜Aƒð·J8[ÐL)| fÿŒ\b»0„Ó —„ Á[*)tg;1”ʘQØôS!Ff€ÀŒ ÖE2jñä)(#¬B¯*»C”?ÉL¦ù * c‰ccª¢ Ä ŒFøU(f0{PÉ56¿8ðTõ\ÒdV)oNJ1˜Á„sF G@«'T/å+D1?©×pÊÔASÒL G´ÿøÉ¨Ä± N;9½ÞÆ¢˜ÿɳ’]ÖŸô8Ôz8i*9™ž–Á/¦ÖÏj½ª[£Ìˆ1ç_"Y¨YYÇ-•*K³H6Ô%ÞR?¹r£L0O,¼µ£ai͇4ÍVA”J#.Tü“=C4ìØµÈšÔorUQDzÕDÍò ¤³–…Ê"È-ÎeÕ!¤$ë–R%Ë+%H)¹/Š„ãJmÕÒQ‰9h†l2ÊBÿb-Í£,â³ó¦'„»E«i%<¦ô5ÆÍÛ#× ‰qffäÙP†½Uç& ]ׯ%¬ò7T¹Ä¦£ÝÿL²+i«å©tuã';*å”G9Îj=Oö“bY­µ:ȉCQ†…z—8ü¤Í믑olMÓ4‰"rn“p•Òk–U‘Ê«ä£2‘›´mæ6gݦYH޽ž…ç÷ÔVy²ΕH‰ '1Æçv$KÄSHÎŒp…%hÁ‹œ ´1PAÌ<¢˜­IÒ:f¡˜á8LÂ(‚:Ö# P™ Û YàTŽO¶'â'E@PŽQ¤q9Š1”dlÍv§OÆH1H‰ 1ɇÔ’Teæ¬ PË8S QÆþDºK ð]‚L„ryHʉ†b¦]ê+<8Él&âALàŠl3çä{”œŸ“ˆÐžˆ2! H«‡B»€…c‚n…‚ 1B„çZ®sZ5Fb±ÕÛskˆ‰F, )(¨¼7ÀŸ˜ƒ³#¢z'¿s°æ D¦|1FCXô` Â°ŽlLR8p#šF¡ºbÎAÆ)'§óz¨¬ª¢Ñ 1vŽýì˜)d_Ñ3Ï=Ý.J'«(­ê‡wMV|6­8ɬrÆj3-|û­©E9Y®kL.é*ùV˜ÖT!1¨J¡Õ ·*qW“¸š¢¬„wÒ\Ú´¥‹äJ¾LÙ¥‘s|åÅC%-wÔïe§#²jJz’ÄÍe!‘hËÔ>§æ)‰r’EJ7—µ5ÛÅJ-U³fÛÜÈDÍbéujR‚ž(¿a¢’ÇôzúT;³Yì}^ ¦³'’¯®œÜ©S%ÄYXL)µ6‰fJÈ{ËžøœWÇ-G«s‹eQõz*"ZËj,ÖN[¶PŸæÚ>{É0“š„­žÆå‘ Êae+ÆM”úâa°M/Ç$¨·rY:BúçÌ÷ÜOÊ– b©±j2 PÂŽË I›¤ Q~ýÎYCXø-ÆÌùIgFÜáE÷ÊŸjo#\ý!\¦ ®ß]“L,¤¥Vƒ b,(¢œ>ó޾ß]‹¼Ie…ŒîâPݧãe.ÚLÒògy8:˜qÝL©i: bPÖ©òójb¥,ˆJYo¿Bܳ+˜`q >JåÁ¶NhyäðÄEð…s±ˆÔÑÂÕ§­Ðµ.wÑñ-Õ5µ2)4]ôî±æ-½W‹¤^S)%8à„eßò<“Ía&±†AÉ;i †}¡kô‰Rùˆ˜§}ˆ,~I­eó bo6•7i^ÅÖ&n©Vªq™„,è*•ÕVGõ-DÏ Fæ­®ÌK.ÄQÃ1¬( qV,e/ß0…þtPà 1Æ;ÜÉi 5K± # (^JrÄ£6H×%6N/®ÐŠ‹¥†¹ îq®:QÄ”’“!Üfv»`Ä®7 \ìêBg⊇ëM-A©¨G&I²îö_ÊQ œÇ1ê:q*2²;6se¼¹¼›ëÈœËREŸ%¤K@çr è€å}k¬ÿSßB¥ÒpÏØb¥äL­Ãƒ¸C“ü½…œ’¦P³KM;`¶\!jsUçÂ#™TaÆARÇ­ÃÅáås¸®10®Í¶Æÿ’ýyŽGZ cúQ9©§¶¸ªš~dDcˆ úº|¤.ÐÉÑ TažâlêÁG õêO®Qs´Z kBZ¡†il!C82é¢E>½ï:Òª)Œ8ƒ¼VŸÒŠª1vÔ[Ôœ×Á5²‚Y•8—JUìJÚŠÉ»¦—褈U‘‹粠ûƒªµÞ+´¬GUˆìsÁÔM±Ë[lýëg$;ظqz%3lävªÄ>Ëš©¬’¥˜Î΂¶%2ʪ¹G\bÜÉ}Hhƒ É¿ãú=âhÙ΂„Gš‚,ËÙMþÛ©g¨ëB´2ºÈ™ÊcŒxرÚ«&./Øæ‘Šý~žm±&®ˆ,…{—l»†gN Æ+'S ¥|K™ˆIˆžB§}jkå÷Î’×otw?íÒ}=,ùvŽ›´"í~Ki­ÇK5 SPÄvaÅ]:Æzh"e¿µzŒ¹Ä [„Þ8B›¾dzõ­ª5I1œäŠ‘K+ô2c±†äâ÷®ËF—ÏîçJ¹hZó—›L^Ô¦ByŒ‚-(er ¥Âùòäf©ZQý»ÔDÂg¬Î¾ÔAÊ•Ùj¡rà„ºåR†%Äö½WâgÊÝ&hƒkmô£¤@îVB$¤ÂVâS­Y$ïze×XÙå±KßúZ÷òÙňé;ØÄKB܇v¦)ޤ&HfT]ê›:KUmJ©1Q_‰ƒu‘ÕJ”qÓLDÆÁßÉŲ±ŽŸŠ¾Â£"ž«‰×äR¶»Nô;Œñ1Vî,Ç,kœŒí‚a²‹ÆËUϨOåL²£10Ö[¥FÜ”GAN¹öqX±­ÆMkíURžˆµ­í‹5V¾å‡vv(çS*lÊ!hUÊ·Fn¤Œ-i}®}Uú÷úˆ(^K™åßã ¼‡¿uõBœ2°c)­¬ìza2i;{f%·,Þ^7Š¡Òû-N"¬•¸Ç#tŠd\1ˆEgjI{ ¿,ÞRSË1ƒqKúÿ"ˆ”_"|¢8ʾÊÏi)%Ó¸Gbà]Eµi!1ˆÂ!Üå‘naÇL?H¨†Z' *^Ót´ÖæÏ¬Ÿ¿lÿj;:_¾\±¦6!ŠCšewfC'n\G2eQ«œR²e*¤5?¹{mÃGÔsZï„R‹ÄŒR«dÊ ®‹µÌ:W/œ&«H¬Ì²÷×t÷/©˜M“†zŠÍ©²"è²I§^mw¿¾%¹ªAHKRd(ŒÁR‡cœJ%Æ# ¤X õ zËÔt­I±ÅW5i¶X¶Äs´Œ¤Tˆ¡›³Û†"Uïu¡ä¹N"å”ä¼¹Z$”¡¨ù¾s®ÛÍNþ1HµáŽŠ‰;;ÒB­:5NI«. ƒ2ÈëWå>×ö„&¹D1Rà µ[•(Íf× ››B»®/£}1é¡kgvúÎGª¤)Y;t¤EVÄ8"s-“­Òl½üM§2ù©ô …V6Ɇ-–°ƒwf1ˆB×Éu´­+Õ—DUb¹6 Öʹ2·úQ_Åga-ŽdSîHv²ØÇ^~ä"¥?ÝÕr°ªÞÑŒ6Û,þµö³³-|–FGâyÑ´ß´Z%Y*¥¥eD¯)tlÄB˜¼Æ3'5RÎæ9ñ–ªøQQh¨Äµ’—“Tž‹•ôée¨—'®¤1(™ Åæ2A`ÜÛêDJ2™ DEG¯â9 «„_cÂ(¬®U¢; ŽÉi…E­ˆôd ÆànƒË„ƒ.2 áXNDùŒ/ð„=Üâ)¬pÌ®² † 5 QF8Á¢>iL¯0£A«!ÉÄPµwdúÀaÞF#HÂ!§Í²3\Ÿ)pYF>°ÝP۔܄5©ìrú8b’g1@Ùá RƇ=õªx NUä…ÍÌ †²äÄFI†;Ç„QÎx¡IB1TÔMÇW!$3 Bè༂æÈKð犛¶zÒ‡æj…Y̦—„QÅä˜f`]dngÐ`•¹DMÏó˜ ¢kÌQŠÍʆ1Zá‰9Â¥T†ct-\ê A Žq¥à¸£«¤EvߦßHnµî 1„qAVf!7ÅÝDMÄìùª± &¬5±5!‹['VRLS:N|C)ÛÃÍ‹óñ†…WID‚ ÄwŽF´Å1Q½‚+UàB0A\'檣t»LÉA˜æÃ½Z±ˆ³„HXœ™‡áoÞ8ÄE ®©Ü‰Ø" è³¢! ¶‡oPÀ ëÅpÎN!E‘žÕÃ"Êc0Æ¡lB> ˆÅ®骿ͼ†®Ò¥1²JÖEZâ·»ÓËGß 1Ѽ®¨®äv_iY]ñ‘Ï.û}ÞÖ¿ÓRŠúú0¦;Iôê2&"Œ‡3i1+®Þ.•¥!wD?Éûå"M'˜ÉRm§ MˆC*z”ÛÕvR5„vÙy*•Ñf"imu;§}Êç‹læW^96ˆ’¯jRÏ©‡ÌBiò!?ìD%gõafþo ž‹w#£ ³ UB11¬uÉËâã,r¿ ¯å>»Þ“Üaé†rÉ×õ"ïK{pU¾Úƒ‘qø‹Ë–!8…s~¡û»ëáHéÝDü&C¬ÈŸ¬æv!W§‰Â:+D¯'§þ¢„D"“Pç¾Ñuy%|‚¯ò:“Å"ôøQäIøeÒvçÕ?¿ã‚*ÖS#ûÄ"šžaâȲQ}™ZjêœÃZ“¥ø¡#‹Z/‹5l(οCŠXNÛºWžrëúU3{ðbXKíDl¹Ú‹äV²p¢øÄ›õlÛT1 b­Vn¨Š£Ú×9òNfp¼ç褦²!©B*è% T¬•*qo]µ\®éJˆz]L'ÄßË“ˆœÉ\Çâ16œ®öUÍ®•I‘j¹>^ÑUjF?T¢š­6Ï—B®Ñ$vöžwuâXÆ'{2{"58fI~ö*C`²]G/‰¤¢\Id.yU&âœSªo½Œwn¾PM[dè£}‚\ܺ¼¶–CŠÌ…+µ4ö-uªºNÓ×D²ø¢·4¹&¼µ „{iRµB£•Â&YtÔJŒ:j!ŒN±ÿøÉ¨Ä²N¾ ™Ä86ȳ‘íüÎs ´||…š•ê !Œ-SU¡m#2`‡3ÏôñxÕÃLv“ f½AÇdD) `G½¨VNô»VÄóêó6¾”¸|%š³W™Ã”ÙS‘¤±ŽÂKoQGY·•Ůҙ2Ûk’%¯¤[5Lf!öÅ^y|L§ Õl•nþiLrLï(-¸^ö°äfüÒc cγ©h®8Q&Ób"P¸MÛ•tþl' ÕŸ ÷ÊTé .æž‚ŒÃ†R m ä~+jIÉùÖæãæÝ9Ϩ‚ÉkQYN–l3eÜQfw¾PøÒøÉam–Uù S ¡ ã—2^yÛdÇÚ½Uш_jðj&99·I÷ÿÑvV©ód^ñN³&%¬…c³DÛ!‘Ü¢Zå(¡¨d,-«qH}š]¡²ŸuI¯‰¬†oKº]Žý*Žt9¤Ú øüÞ“)[mk’R ù¯¢Ëâ_ò¨Ÿƒ*IUŽP£‘&½)V å!¸­L)D ãŠ!¨!¸Öl ¸>Ö–©Cœ'•2M}6ÍÏ6·úâ§"14j¾‘Yõem®JÌ*{q©žQŒ­†'q3«¸¥û½4˜öãoD¢ë»¦áI‹ú!ƒ‚ô¶ÝN\ÿõ}&³¨¢*É ’!ŠõÔ¥³1Øšô4¦ìô­‹E®VMîâ–#ùEÓg"C”BΚÇÓ•b†l>²5œÒ‹Í.W"+3Ìæ¯V®CˆŒˆÉ^|e°aÒµÚ.sB0¦»ÈÒJ »;T²ˆùl/:RÊìnì%¾›ù½)S‹/ó!TÙnŽ’×qÖ…2”@’ rí`r˜ÃŒKÿ#I>¨Z=µ}HÃw±H{/•/kmß2¹N»Ìa¶·cXNNOzzº•{²d)gM#ÜUQmÃø¹W‘â3)'ÒnÎ îL¥k™2ˆq‡P¨óh;¤ç¹Âóîªç"ñ¯¨¥}zLçWýQßm" "…aGvrÆ%OâDËËLy_$QNe¬Ÿ©‡Nä[ˆë‰ÔN”.Ñ‹¶<¢vKQwObáHÜ/J(+ â+ei;Š(¥ l–s®}¶¥ÜY]¢µ6÷jè¾”G%*»{üöˆ0TËç#ìÌŽAFÓgÒ–ï×T+e[ˆI Fö˜Ú_˜¿bدՉ„¨âµ•,u²É%I34"h¶µb4Ä!Îàî“WÝ['i.y(™UboUWçÄÏê #ø«ˆQ1·ˆ"P‚oÉuQ%vDײ¹R2̵¿ŽÃòØ'¶"z ²“Œúç·ÛuQ ]]?h*HR 1YÅBîBŒÒ%Ë.¯òl\ 3ÒϹ«•“OêœBHJ»`m! ·#€0ü ŽøZy^ש§j-UL*¦‘»Ù$*Š&"'¢S¼÷Cx˜Sõ&ü©9RƒPM“Ñ‚„+m5{Pä)’Ú&P©†m‰D³°¦]$›lì4‹ÕU)+¬·(ß5Ø«eÔ¼fŒÈ±ÕˆÜÕäTM˜'TÒ=žëÔ.²ba-2šÉ¢ݵžÒH(‰ÕwÏÚl„3 £crljm†$âpŽ !MB(‹-WVëÄß÷£¹Tj¶ßïÜÔ¯ÓØñ˜ÍÊ¢/w!E'¢9kéG^«&m¤N2iT±¸qÐØ×ca·2ŒçÔË¡lt3ûä•­D —듚¢ˆ*B8ŽB"ÅZ"“—¹”bg›t%U•7d¥5]Tɽù¼1ÐCÈA[Ëy…9Uh%¯Ü¬&¡U)B¬dW3ø’)Å~óiĺÝfÄjöô¾¼tž”ù3F›²ŠêC+õ½¤Eá†! ¸œŽÇ_#u«§aÑ)¥·[×äVѳ¶-VC^šá–ŸDÆû‚B„bºÙ3¿HøÙ­{L¶‚{&—› ÝB.ÿšI2(€ˆˆ(ž$ò-ÎAQ«% LÛFD‘H)Æ 8²ßgÖW>ù4©µR.ó¿þ:[io½h†S§})öaN#â~»:ŽÕ-jSEù^ì"TC¹o—o[PÿíCã¥QÑŒÄo. …†L–<ÇbÊ£ŠYGlˆ¨Ék—nôäû§¾z¾i‹ŠJZµS³óé¸R™•Nâ"/Rb „|´™oÕJ:c«Ì# jHØ•;¡*¢¢¾iTÇ"á7Ëá3j¥7£er\6¥]1×ót& ªò5L„MǤ‹Q›Ùs§ÚâI®;2×:U»I‘'Wzÿ¹QD@C8G³ª¢µjýóß VYÒ‰ýÛÃ’w§‰ê]k¥®5E©ðR†"·JÅÉ“ÈdÉoœ'òdEˆÉò¾(b¾ËU6–{yÙ3F&­*œ’þ`¼þ*wLl~ÒR»1èb:¹\¿£ÉŸŠmL%K0Š#ŒóÊÚcûoöpÆ!SfuKÈÓE…¨q/èìÒÊqTÉ)Œ!ˆ 嵩C#5ÅåçÖ^ejWé„»¼ÆÌ/ÓûJq’©G*NêS]ÜsG- ÷¬×{¹ Ò ÊB'*"Ô‰š+]·Xó®tjµ}ó7hˆA¨L¢™óõÕPÕO¯bøAASèk ‘”…{?61VTçDëK_ó<†ÇB±3’Ì— Ñ>E~D÷1È¡Œ(a'3òìL¯hOÞÆ#­ÏÇ£üGbS7iíµÄÎê×IJ90’¢x’¢yˆ·žÝÛG•ü잪0s–O g{`E±oÄ¡4Å‘<íuå^5H•^òÙšqðKyj!A—6а®2£Ü˜ÐóR0ã«yž’Í’“ùÂfn^ž÷j™5„}–Í y(qðy% VtòŽå8ƒ¢KÈ:5Ë1¿ RæQô[dÕrÃ.o[²ZØÄä³½QŽÎ*\„v"Û–ø/%]™È¼Gâ<¨Tz7í((Æ:¤žÖd"’«ú&’Dg­¯ÅÒ£¹«iõöT¬:»o"jP®„J9š„y rÙ¤ÛR”eÕ¥L’ΚEÈ“RV(™ÕZäƒ* BŠ©¢s÷_{8œÉj=.!öë‚5ø' XÄó3:™ªÞV™!æ!²z|¶!r™B¯y†8Î’^!Äa®ÍSÿr] !hRªž)1 !p^Þ÷J"Òã¨S)ò×:DqŽˆ!2Ť÷(Wµß5„IØ"æe–[Võ&¦ZNÿ7ÔÀà ðÜt:´ Lø˜è¿p_Ùˆ/Ó†m•“nο]õªH#³I¼6¤¼É2y¯AÆSI³V–šdÊf%G«Í÷8“Í#ÛÖÛµQT(q‰x¹ûë‹îr³•½ ;„‰²Ž2‰7PýŒaD;5ü]|oŽÈ¼ÍKkî‹èé±Q´|z)ˆÛeòMa†:×6Ç|E«õY8³B·í9–—¨eéz*Ú•üß—÷°Î•¬Òœ¬‰@…÷üU7Ic•}Äsïþ~dï¶îÜÜ·¹Àî@HZl®YúÒaнœT}S„Zg‚ZŸTŠÇ(Å(ôÙ \ÑÈ%:ì³!{È)O¥?©r!®ôÉYµÚùtMQ;lG¸!r ‚Q]èø·C1çc¾9³Æ¶MügCe©)ÅSr.b}mÔâˆZ[ªC2Ь#Ñ;˜Åm©Ì;Š1r­3ïeÐìÌþBaЮ['¯¥m_lG¶KžŒA*UÞ½ù2„AžätC*¾%•ZµU’þq„1¸Ò¡O§Ü°ªi5FÅ[qHœ¶ÛØê›´aŽèêÔ …Öªn§(Å!;qL3!kw$ä‰\DTÞ¼†3wlg¯mS š­2¡)ާm"Ó)EœÎ—{®ÞÉÜ›šÎ"I¦âÓ“sû ¹Œ®›d]¦“¨U§b.-õ)DzD˜ã¾`˜ ëss9ÆjŠ U6ø$)!-`…N$®ÙÉÿX€A¾JúWÐQ–I¡ó0­ƒ¸w©`¨:a‚ M½h(°ç  K•ˆˆB%Æ Ë”Ÿ>„+FÁ4eÛÕq`FÄ„…ˆ&‹&Þ)abò Ö‹ÞAÃLq Ãø}4z†£p½Îb%¥¼ŠèªKÈÍ BÚA5c¥À$‚! 4bŒ™ ‚œ H™Æ ì/W>|¢œN¨E¨C`9Á\¡E™|¬@… © iè¡3jã"€†üAy>g=Ôƒa,%ÍÜê;FBNÍ6ã¹1pXˆÄáOxI¡P¨RÀÁ°lSÎH¤ÌŽBòS òwfô}TÄFN±jÈŽ0Œb0`”% Ì‚;oŒ¤Õ¨fiGªT±Î2 ®îÌ2¢a / Ž# +" †¬w^>P‹ÈôlÄ„—U7¹A–C* GŠÑŠ‡ÔˆÒË”:Qg‡Z˜¨‘¶–q­JQŒ²š²j±Xå\‡"cÃÎÓ"ˆ)¡ÜŠ£À̃ Œ Íw-LÄ1Í»š$pi<(¡YDB¯ †A×”ç;§4F¤¦4qˆ ˆº UH Ã1шNÙÅ•ÁF„b8x®F!‡Ç2„bÀ¥' %%)¶ƒ—ˆb‘öÆg%FôȲ°…£eˆ\ƒ„ ¬j8o‰C¡z¹Ž°œLq©10@€Á!jÅ£‚@ˆ† £)°¬GëCUDáÊ|"‰ÇWÇ…B+ ¥ÒLG ¢ H^ÁòR ¢ \‡MÄ’«ˆ² ø‡¡„ì$è=|Œ,=r‰—ü(S…Ü ÆæÄFŸŒ%aPêdŒ`˜Â W¸/¼,¬bµ|¬S-ìà…E¥~N ˆAÙ\ƒC2‘T"ˆv£ ¸ëB±jJ£>LèUÂçÌB„"`ݯfP`D2"£¼|HBÙœJˆrZ Œ¨Ë̪¡®+g%\ñŒ`“_Êð©È.§Bs (F;PJ[ŠQ 1¨„ß|(ŽÉ}‹¬ô)¸™h» ¶+!1À„cÓð‚K$Rœ!e¤:óð|VP‚ *crÁÙ’¢71°ñFa²SZ#ºJO#A Q"¨ÉvS^ðËDxM²§Å­ì1 ŒNs;:Ah¬|Hú€‚)ÌìÀ„A…0Pêåa–©1Á â…ÝØ„§ J_˜q† 10LL6'Ì0@D ,Ÿ6B$ÊOawô¡Xre(…_ØZ@è5­ "T¹ƒ á†êaX„6QH†Ø¥¨–]M„b*‰œl?"ˆBê¬bœ@î*Ç£):R=·ô‚2p„Ãr.T2¥9X¢ ƒv˜TãúPÑ™PPÅ1DìÃ1¸ß ‹Ú¨@00ƒJðQÄ’ÒÿÙÊàï°Œ&ű•êˆ6äå`!ˆˆ!вsLØAQ¼œ>xä Esq’×ýŒ‚ ËÂb£("2£F,Ó¤ LR,PMÔ½ jÉ‚Z3TÕ9”6#ìÅd8ñMLžegJÔƒ#l0‹r‘†0@•5(…Hɪüwí¼Ž= F¨ ŠS1F˜¨(؃$G$ƒgG(š%eQ²ªfæœ'™ÏPØ3Öî$%tøÌ sVD›©²#\wìTa£ˆTêB™`€A™D‚©Iƒ2´ ЙŽ ¤Î¬9k‘JBÇ4SE%Fš…!ïA#QŒôȉizþ#6MÕ )&%j¸JÅ’tæ>&¡0ÏŽ¬:ü@üÿøÉˆÄ³@Lûgürýïÿ™%a<´# 3®oÙjòüf¶òCÉ)̦˜D)ˆ•:Ló9˜iv`ÆQ)—>î2/¹+]ùë¹fýÏB4Ž„[&–¶ZTÁ„%«•í-‰Eê+)„IjØÏß'%hê1Dv ä:â׫ÅÔ‰RÂÿŸé(GÿŸÍ#Ô¦8„2]+œµ]Tíò§Šp¤fˆg;ým$Ûi1¨CÑ! ¢=X³–icñÕçÝT1‚Ž9‡qYªŠ_¯[ºK>ëö¼Œ¹l¶zÝÄNÎfÔA ®æ+Ìb„<ÌÅ}­ãKowŸb \ PˆC`„U­¼º˜Š¥ ÜV•-Rû/×MÊfÂÚÝzi•7lMê ¢‡ŒÎLH‘ “˘W”Ì2û±sOCË…ë"]•JDwÐÉtG’4'˜Ïh(éw8ër{Ž õ LýYÆ" }ìjU}ŒKg k$¦µõJ"–ää-’¥ÎvÂv1¸¸æ§Ó”ÅÒX¤ýËŽØË÷Æ{s©T‚;ÎTÝN榮ì¼Ó.ß©¿}v]´žä!мœ–-½)¤v_¡ b»1gsÒÞÕ¤Ý6Hª¹§†}Õ#Kza“§ÉÜFê\â+!yŠòÉÕU®óÒˆæï3V²ç3ª«»ÙnL£ÊõNP†W[•×ç*ÅÄ’,yæ •³Ž\pÃŒÌ1—³ êüø98¬#¯FZ1HÌj]Ië‘9òæÔÚJa)M…#K)<4Õ+–Ý8éU#ÄCÿ»¦˜ÜO«º•{£¯e~¶—ÄTJFw2J¼ŒWª,…¥Zw"›õ®/ Ê„ô ”›4ƒ¯¦ÒØÔw:7ª¤0äÐfÂÛ¼NM]íáŒG#Èbí Úyh„|ä)CäåR/!ú…ò¤ˆS Ôék“ê?)œäò0R'µ¨´Å™,ÝËꢈ™ö ½¶±i~®ÅC°‚+ø*R˜´¬Oz")Ô‚8Bœ8­¦¨ŒÛüý›ÒMÝŽ’f.9¹‹Ò¤ä¢m ›¤#=\Ìè’9e‘SK-oÎÂÅ¥B²¡Ç2ÊT®¯¢Ýœ¯#ñÓ1´¿B1IûÊEJz4»ÕþzcPŒÆ Q‚‚vÖù^§D¥ÿ“;„QIÒ„Yñ§ÎúççÑhs— á ]Ê˲Êt"sÌ¥JØ•#éC«NÔŸ™\þcJúÇÒÕ:’ÚC!IºO}3;"fsœ”qŒŠ„bdÜ<®MïtM˜a˜â û|•¬5ê ôâŠL±Æ*ªpÅ»“bê¢g-÷oKV¯¢ù¬Ü¤:rTìd{å=së•«â%Ä”‚AÅK§™7ÉÝjRDˆÄGhÞœ¤Ú`™%ªŒv(é!ب²Žr¼NRSõË[ví7™1?5—QSN|>LK.©©ëDJ ƒˆ²©Ì¢þË4i褶¢»œ C§¸È¥Ì_F©Ô˜¤cúëõÜÈlû•˜‡&´šmÊP¶ÓöbÌ+Lä)¥1QK]¼…Åmà ¥B¯!‰Rÿ_»ÿLŒa‚¶êNC-2Ÿù<*PäL¡ˆùrñ¸D¢”bg>ì¾åÄ{ªÓ?WÏ‚ñÜŒ>¿¯˜þõ±h·Wk 29ΛÔ&Iâ!"©Œ9‘%amé)pQ‡(¤1‹ª†D—VšW*‹&º?kcêiaR…yôR[IÍZ'ñõ7X”a„AD þÝj×ðKQ¬ægrLÊT+ I³™9“Iæb±G9÷J)È-Þ„Åú¿q¶æ÷¶ÓÐnUÜç"¤U£‘‹^©Éd!ŠH‹WkÉÑ+P…Ô¸Q¢Œõ"•¨›…SRª¬EÌ¢[U8OWèA5iS×Ê6V˜fB‡QJäZNM®ïî÷u½}uÌP‰¬C:%i¯­äªá +U¨a›ôÉy,–3ˆ„dÎ&¾¶YªÉ‡Â7§]ÌÞæz‘ð\­:æç%›cpŒèbÕ1D9$r™V™\®éª²¡R! ¿¼Å>õ©ÕB„MD! šÞGëaêÇ1Թǩ°Còu$ ™C“#.8Gxý |‡ø`€†“ §œ¶ÊNÌ"HKë+)ÇAMXEò`”b×$ ޜe%Q B¤G*ˆïàâ/#±lnq*ä:¢a ƒlj‹Íø>fJÃ9 RAyDÁ’qµ¡-WÜueÓ>‚‘ѹ/;V$:d"‘1^Gß*:Õd Æb *P°¥Ai١̤¸Æ‚^AñDæÈ031gSNPÏvÊHaŸWœGx´¼øèû­£TH´esPÈ24q2ghãÊPÁœbåÃ4èå®]˜bLAFô‘Jz+ ˆv‚-Gæ z#Œ ¦ÅbÒ²¨BIêzÈID`È£03­Aç®AÐTÄØHŽr 2LütŒh”ƒ›fÊÍonÙîæ7 ÅóêÜ' ½ Šv%x²Rq¹$AA ðK’°K[ÑÏý[Ñ ¤c"ŒØÂ®;™#„ …"ôtÇT#²)#=r̤.ªsQ™†/ÇÁ ?S4B ƒâ”ŠˆhKêsì?¤’ «œ N$s Н$d‚0™¼,}•eshhc>zÔÙáfeC ¨äÐ%m±JŒƒBa ¤B&„éÀ©µ7Œb¤6Å›˜.@°ä#±‚•œN°¨¼ó6äU“Wr aqM6âs’4W+U6X ²,¼Ü"`ee¬n­YîúM¹^ǧôc8Ed­›4:*gkƒQ‰2Y’ž@¢5ÓnM:2=†ŠE!â'A+-͸ã¨%0¿AX'lèAÅÖr ˘"¡GÊ<.e7!VaLŽS'znDÒ÷ ÉS9˜û9HXù©1CSá©)ŒÑóÀŽè´¤,—#’ Ñ» ÙFчõÎÛ/)Œ•Éšx\Ê0éõ³g'¦¤Èr™F¡ÆDŒƒåqG5‘Y Ðà òˆ ;´!8@¦ˆ¦á ®Â¦èçû0â]añZ©Ðj î€sŒ(0 0Á\:sº™aH¶(I¤— F ÉHQDE¼t.¬o-:°@0ïŒ$Žü˜þ- ÿŸÚ?ó?ýƒh?š<)ÁÇäPž ˜Wwdã9Q6‘áÀGlxã¦U7ØC23ÕÇ/…¢vDst‡b–¤9 ‘†„‘-"1©"ƒu×¾lcZE±e”T'¡`Ô›‘Û¦ˆ¤¢C^ ¬´DêúŒFgh‡ð°AÍÉY„LÎRR‚l ¶ÛfÌP» ¡"ÊŸµ3â;ñ–C „8§Euv[9ŠäÆ)O‡?ruŒ·‰)Äݳ„ªÈŠHF¡0ÆÉò”jlíŠ> £!ƒÿêq lC¹V¸ƒ$ÌøN¤ÞÒK'¤~eVDëÄ3) ƒù[ÁŸáë±FãÄÎÝ *³c&$Ú‚jQ©90Ýv¤`…aW…Núfqj# ±ÓÎ8 jL.7Ä ì~Ër Áìš´b`†ÄÒ#v)òÆ–‰á È+‘N9š²-Lfçg‚ јd°]+aAúA›´z‰ï­D¢3_PàÃDò²p@œd)œÛ±‡áØ„‰ð¢¢xfC>Iž6ÈØC@&]ёƓCOLŸTWQVПÅî+‘†0ÇD¬¬A3i6s<.õQ `ê…àŒ±šƒí0šò¨@F Cd®© TR™:qç9Ê1ˆjǦ;9Áraˆ!’ÌQ™þ@d A‹È:ñEoØßQïô±¨×TËBÞF @e€6br^‚1ZnS]FÛÕV*g5Å?r bEa¯ ðŸ9 ¶ ù‚¿¨a/ &ÕÚ„A:Pŵ3 D2$Hâ¶A’nz秪ý3+9AF>Æä„Zí(É 45Ê1I…ÉÃãl!µþª¢Å„§gô‘ÐiÊŽò{Œ„#êÌ&F‹6“awKØx E¿R%(¨ìœ Áµ]pgdQ ‘X¨4 0¨¡5Â2†ŽŽ´mFp€™“þ®ÂTa2òƒ1úw]”åŽc‚”¢ e®¼FŠQÒ“8ôÆ b4a˜CúlÁÑÄ6ÄFED´ýd*ê_‹º^\«¸èŒ½Šä´ªa,QÒqQ±›þØYXbL-IŸQ+¹”NƵʶ–[Tìr„bö^„F%‰RŠÌBÙ¬5$É\¬Åî)ÄjårĤ¤R=jN2¥ Îþ´JLÒu¤ún®ö“X‰E[w­¼â Êsgˆ·"/Š#´*ޝTµ˜ªêd!š\Ç·u»Óq¨¤ñ¶õunWæ;9ÈJ½ÞFr¥ßL7±®Ï˜¥NGNâR´«X‰J¬¿bÝ3R]»êûšbwæî1Úº±WÛÌVëB¸¨~9(„û]•fUä¢ió8—Ô>нƒ}Dq³,S¦I¿t¢ Äh®EWîžÛ”[¯Ê*ŽG~T6˽•˜šß¤Ö7-´»YÐ;‘ ƒaPŒHJ™ØÝ¥S«â\K¤r‡~ƒ5T ‚•k’YÇE b‘qQÅcÌØÊ CûU 4eÃ$fˆ”ÉõÍAŸSSñë¡’#"ÚέÁ0Æ,RÍð‚ŒJàÅDÊRņzº s¹C³`©Ôbu?¢Ždˆ"1 `–¹€‹ ‰\F¡!ó8N=[ z«¸‚/6r¥ vJ!åcYÎüŒQ.Á"a‰fJa€”ÐÐ51S@&QêW7áâÒ…?Ó¾®B c€B•œ0N¡¸`Ä T"a€‚›ŒC$ HØc1uZâ¡+*ƒªR“¯wîjVlF~O‚`…PƘ¶D`5QŠK÷ᘙã~ª"H‚6£»ñ9på¦%ÕüØê‹DÄ#B R&@Œ"Tæ ÙD×ya§‡8Vöƒ«1Tôæ5I\IFá›gs Ýœì¢ ÉtßÔ{J¥(EÈx]›ÿP(Ь¬ÐA%G˺øG¦Eαr1À‡"¹‡FHÙ3Œéõ sAqÐÀDWêNi9Ú„]„Mjó&òu@ÏMT0Eg"$‚ìt'trüÎVWÇJ¬(•N¤ÊØzÈ03VS³ä¨`¢0›"!L‚äÅ3,AKËéaÕÂw žœ†¨‰A€Ù†ã7T@ Š8e“»§a‹DÖ>°“ˆ[Ñ•Èã8îTŸ—¢˜M•‡³GTä£ $Mþ Pd k޲VøI]±cYAc‹zÂŒR ðœÄr²¶g°$00Â@„0a©0­› %"7|(¦nä ¸šWp¡Ç1Ì¥©”XQ  oH¦ŒËf!±)0h‡=,‰xžéªâ0¨ ±ä;„†ઋ‡=*>’„w7ˆè\„!D!q¡ŠÈŽè< Y ‰Ü8§Ä‚iÓG‡­m¸…¤‡! È&ÓGdÃv„rÒ•ˆÏR¤áLsÜbeÙB¨Ç„3µFÖyøoA”B·a E"뇵’ JBÕO›BâYø!Ø‘.aYÅÂ" HJB D˜³ 0¤Áˆ@Ä·´²‚BWQDM+Xï1ÒŽ¤"&â ?úᱨŒLƒV™Q‰Dîà# ˆçZ„(ó•‚0ô+þÆ9o‰š×iX†P€…2µ®™‚ Å¥FpµØL ìC#;á( ¥‡q0‹* EzQ+²WÑÄÛ("†×BB:˜C ‘óâÿØcá?#ÍkqL(¢¸£¹Qyr|&ê¯-(Î'"‰1Œ Q™+ ØÄ!±?ø¿e¢&~Ç‘—³´-aÛ™ƒÑ e º(Æ7áùX÷öÍÛ ®§Ì´Qf†i‡X~gP¿lJAz_û÷¹än3„¤å& BD’°ud ÆÁ¹Y¿cX%éÌæŽåUè!•>MŸ„Pa «Ô@+ÆŽAqÿQˆDê0G¢òÇ#!àCÀˆ4Ðlì”eBaŒŠn)‰GVIƒÅ$" œõˆ" “ˆ;žÁ”9T¤Ä"»3·m-Wl8kDb v´ Ø•‚ÈÈL!õ>Ù=­,„zu¼¨•r·^…B±Œ¥ô°˜ºG) 3׬ʵ?çv²[=hÄ¥è~Å­¬s‚%Q8»Z !C)»O¼ËÉ›r¨¿·UŒñ/Å>m–O±„CÖ@Œ)Ra~Øå£¸W)˜íY)žæíTÞ©Ä¥…ÞÒhÕ˜GJeHD£!HEpŽ*%œûnfg\zÊþOÉk×Í6̪wª-eT2Ðg+¬= uD2¥ÈÝ=zšëoÛ˜*wæ;ÉWÚê¦.ÜpÂ+³°³Q˜ ;Y*rIOòZhÏŒcôb üq7úÎ2”ˆ#)*×[Ä+qh1ioóûe_4„\¹)š£ÿá.äWÏ Š–ÅÃ\A‰íâ¾TªØÎÌ»RjÕðªtįââb:º…—\ÂmXL …=uAÐ&W!ˆèÆYb…p¶ÈÀb5E Dˆ…ñ´(ÈbQޏÛòý#”P—†F-9t­ 0 |– PˆxA ôߘÃCÓçwŠˆ¼Ÿ'p/G‡‰¡øÆfk(¤l1 Ø–‰ðe(”…C”ШAm( HSåÆ¼Ý©º³ð&Š¢1Àî ‡2ˆ98Øk‘G§¢èÒ¦@Æ©"ÆŒ„© ‚Ö 8]ðb #Ÿ+0p% )|dj#üj"F˜)ÅBnBÅ‚ !Dþ;û MñÔ½GïÈ‹s™¡‰è.á{‚ ŽFá ÅXgChM* Ô¥˜`1Ð>IÊö ¢°)ì–ò(ClÁîm3­=£;Œâ!‹I›t»¢Æ#+»å:MÉ$B:ýÄξfo\‘Dl¥'k:²•=Ê)Q÷ÙØêâx¿­L¦ê˜ïKR¥|Ùð˜+ø„FºV ˆc±J»¬ºŽ»TNW:fð¬Ï¯®šUÏEüÞnNwËÕËŠNg91^ˆ¯_]#f(rýoäI‹\bˆITÊžŠ¥[Q+b6¢™2ôô¹çµt Q‰·ú¶ÐŒ9SWÅwòðÑ9æJ:lwu«b“í7aTÖ6…@ƒŸdšŸŸÍ¾*”–þ!ШúîŒûw¬ÏÊ’ȯ”±1PO¦+.ÔÒ/1Ëgôf!;ûD؆Ìw¨Ëbd¼íG‹—¥&'0þߤ¦RÑDV)õ3DK ²•HM¥É£"J£EüúÚÒH…YµÍ¨˜/IýxˆE#9Þˆd2º”!ÑB–êLeq›×ê!lú¿BW:¹Ò#vϤÿ_Î@æOÇä:zU.®µ®žä3›Csòwˆ¶§ÿ•dÉs#*‰#Þd±‰Œ¾Fd)¢Óïè8äÃ울‰‚”&ÐÊ+—J–(cq’D."Ì"œÖÏm{WGiX]þD÷ëWLŒ"¾-!ÈØö+J—Z.œTC -ÿ4®äjb¦l’ÛWÅ[çw)9:ŒAUÜoDÖ£ÙRFµÒÉǹ°C+îµSª¥7 ›_)&z!$Tâ=QsV“ ´hÕ]¢vÉŒ"Wûé»n£Šb¡p%Š‚¬B•’¯]$u•Šš1UÓį~%"Éy"Ê¥¸Ð4'áK%)B†rNRg9ìæ"½¦“ÄÞ¦¥sÅk(ŠAI;i˜ï(Z>½è÷J9,˜FôÃiÒÍlA=èï¬ó;ÇCX#òDÈm6~¬ŒTRL[ex†/9N¤jÒ~¡ý‹iJâu¹ßŠVyê`Ï£(B Ë –$e2uJUõIž¤¿Då‚^²‡cפ @dgJïÍ<=1Px5ØÂš!‡Wld°V°®¤7§.#ö‹dB.ŽeC*ö*í™[‰|“)×ö®uÙÜ‚ãê¥U¹Hå¨8ä õCm'û_ ‚N7[¿.齘”<««¤Œd2HQµ¨„†£ú–¼R2ðÉuyF× g@Îr~s ˜]Æm¥+ {§âŠ*ê"ÂÉ4—4N›':ûB¯0ª¢Œy9›h|Ѿ—æ·b܉ˆ‘ :©Šå!hmçò‰UÅ»yºU»<#|¯ì ª¶&¶*tq–wªo_âÉzJL‘|ëäU»^Xºæ êüÊ‹~Éä%ÜSªÓ/ªÈj˜\¡ÔTşﺺUb®²{UÞ¿& L´2=f”ǃ @âÉYUC+ʤ*Ö‰˜«ª!UɹyòzõØÇw’¥³?Œ[Ý; SIm(¾|ñ¯Ì† —mt²Î ¹’QÆÇ ±v›%»dbª¯½”²w´ÅÉ²ÎØw9ʤþçÈžÒÒùÆ'ãKàÈRÑ5d²ŠìaÛ|§)æA5©Jðo¯ˆèJV•4±bÏü~¤YK*Ô…#˜„z"¨S*tUÔµœ^úMáäˆÊ¦ ™Å˜šúÈôª#SjÙq$u)¬Q¯ï;OUsF8£…Bí|\ $ô±LU+–!¥ëV–¦¿%Y=ˆŽ÷¹*º2ŒL'K®Î-KE¡Ø9¢!›™0©åÅ!‰E3Tœ„Jpü§ëëHz‚$ãQëõÃÂÓS‰=Gx†(ïVZ·â=Ñ㿹̚nç['Š2ÿºŒjYèÉg3e®ÆÒRó]Mª˜¾3/SK¯Ufå„:\„Ð1¹¥¡ú^¥&£õLÕ*D~°¹%¦ãc›G! ’оôR£b­r´eL"1CµF,É-ÝWJ㲘ƒ*­ßrû”“uè´:êGGžE¦Iµµ1%jÊ÷!P„cU²T…#re? ù왫˜"T«ud÷¹­‡‘J«Õé1Z)s<5‚š›[+QJaN÷b„½¥ ™îVS­ŒÞ÷Ê[Æ«Ñ{LLjbDmFµÖ:OÓ4¦È*ªåVÕ"¶zs ‰e28È«¸¶¶exÕBÝ®Õ ”Éëž]þ‘X„Ô¬ÖÖ"á&)*sŸñ–©4E”!¤¢u‘ýtÁ å«™¶–Í{1õNº‚¢V¢JjëR&8‡“Œ!?-õ¬Þ'aJr>1J»_¥vÙ6½’F”R™ vªk¬”=¼µ"5$fC9ŽiRwîµ<‚ Cš„ éÅÃGãÔmÚ˜¦±]‘ŒŒ--a§žJ+ìò¯ºŒš!s&YôgŽ’¥OF²>ÏÄį’ÄZ¥Z§Q6æâé0…Åc'iµ(B‘ˤëü©#UêÊ œÁåÎ%íùÆj¹.+èM'Ó6½ëP•Z²Zc¯²" 9M‘úZõ D’q Vi-#µF%¤ŽXüg¦gqx0ûÒyg܈­AaŠU¶È}¼{_{‹†[8¢—l×k:òCŠIÉeDéEɤaË175–ÑØþ„)yø•¡´Ô¥TQ‰bç×´Ó¹0ÔY¢9Ð pR…ù$é&tÒOFtñÐïŽéÚ'Öž7ë{Ý,3Šßd˜MDg–¿foa eQˆaU“ÕSHèE F7HÌi*.Þô5D³‰ÌvFç]?ÔY§¿þñ1‰G0¨œAN˜ÒaÈanfEd'Ÿu×G«¤¯Ë‚5H¸Û½ÙÉäÍN}-™4ŠS´”0²—q²ªÆ¸w{±cM[—(‚%]ÎÎ'“Qé'þ¶<¥\Ö"Y…â©«.X…ÊñÑœÎÄ/4‚ITh’ŠšÍlD7®§®uœ‰M¹ÊŤ’É6ò/çˆáˆË¯D*™•Xs…)®Cò|Ï–ö¡D" ëÎ[¾ ×JJ¶o_Jå3M½´r£U3åk!xÝÅqÌâ äiFIm&ÉÒʼí8÷*´ý-3=?»0VPt÷í]M½V\ý;;̪9‚L†UT±½HÄA‘ÅÉÇvþ®Klëb‘¢³·sÔ]ž–’K˦N¶µ„Idcºd‚¡ÈáÙŒ§^tÊûZ¯ò6" úœ+úg—vÙ¥˜ÕÎLͤU[¦‰¨’W=Kæ „ƒc‘®ù),×/)‰vWTRïÐl(²šÆ=]fMfNÊÐØ³EÊ™D߸†b«)¥T¡hBÅ8¡ÖBÝÅ ˜´¢d˜ÈÈ™lÃt¿Jdß^Rá%´m/±-D°¨¤6{Hò4â Œr+Њ}1çÙ¸¦)ËW»ÖDñNn»ôÂ9kÉû.çÅ-˜Ü‹&шãzRŒ1uCŒdAc`¡ õÒwÑX’±åKøø/WJQŒìD±öçò‹#ñEÜ|dT¡Ò‹k©¬Ìëd˜2ƒÚSŽ>w¬ÂàÔ{gÊÎÅA”é]-KK,MÉ˨x¨ÎœÓ"¦†3#wsã6¼˜*ñ(‹¬K±~Äÿ’„\ÚØ—êÙî·Tvm²´”ê-Ql+(Uc'`µ=:”§ÑY(•U”Z?=³ö‰O*QYWö[äQ«lR &΂$å«zgXî# ®Ó¤Tt!:G' ³'äLѪzS,)“ØåÝ'D´Ò\Ü~ÁHÜdLéI—kj Ž!ìs\štÅVWŽÌ¨®]ÉØŠd·UA~ty=©Aê˽®õ©8½FCñ<ù2™¸0G 9Á„­¤bÏ›‡ÜÑ^â““k¹]:fÕÇ!9Z† k"1¼µVU©ÉRjyˆ£7¹'4B ”¦ûE"–•'Ün®3™dR IQ¤—/4ÑòZ(ÐÊ*ÿøÉ¨ÄµLî˜î3îdïð/ñ†òð´"ô;-·Ýêhì|°f¤3ÑPu¡Úwô»)ÍZŸÊ)NŒPãi$¢E)žõÒRËV;J©“{;Û’åþáȦ1„9ø¾–ë„­Ž™y—±U4»‹Z²„#o,ŽjI»¨ö®ìåÿalR)èt¦ (ï™®c *‚¹=<~¥§Ô~=u‚8SôÝP¸kb-šý+r—AÅJ¹Š®š«R)Šö¦ÕUvªB®*|ÊUY[ÆšB˜…äd¶ñhEýÙÊ„¿+øŠÖª¦uŒ¬+„0(âžiþZKfdY™¹Â§=³ÃæÂïùN?¥1(Œù]-µÉˆÒ™ÿo’å‰S_p®RL9éW ÚŠ”Û™¯š‡±9ÐmV"¤¥õ©qìúôJØÜâþßs*Ó j¬ì‚,Š´ Þ9Rà †‰§!M²mËÚ›š„)Ä:yì5×𕬛&´ŸÖ_#òJ*Ü•S†J²Äs ؉äônõG±E~ÕN˜Œ=w©óìÁж¥PE”—-—6Zš‚qn¸rÖr ƒi­¸k«Pºä‘ww®J]»|ÊwãªnôzŸMÚþÛ),…žõçK©]̈*T­* ¬äôŠ)m}=;«a8ïþìr[Ÿs»mįÙì¸\*XB Ò©¨‹#HúÍF¥VGMú)Þ­*¹Ó}øJ$¥;/«¹«et±9µP¨ËÛ>ÍÄþ/R*AdªV„Ó>²y±OFç7zÔ•r¢æÝ±¨½]â+‹”דp§týß‘‘UÔ139ŒF Q JŠc‰Î¥nïÖ§W7©û‡;uODå·d›DÄ­]Îtœú† Òª eL5äDv^ªó-ÌÎzj©]ˆRz ýZ‹j 9/®Åf]CNF¼Ÿq¸û"ñNFqHíæAKÕë ­ˆê~sêiU©;+šdS¬J››Û¸&w¢/…ä+·±G2PB,BE 8¡¢õAQ«]l„íÉSyÑ.oBa{÷»Ø´ìÂÙ|TŒTyìŠGwÞÜR—Ý«gB)ˆuöóùVáV­«ªÏÿD*¢Ö‡mþ‹'Éô̹ÍvxF\ëˆÒ1.–jâÜÔâÑ~‡Bq'GfGÌÃ_Ò"P¹mÜKÞƒ©‚f¢l©dшŸiXÏ(“!…åâ\Wkd¥-ÜLoÓ•Ä=sicoSo½ŸÄÆç3§½=jTq]L¨ÉjPެ‘"=ÛÊF/àÉŒ•+3ãbŸ&×¹VâLšRh‹Rm°»|ÕÒ± ÈâEˆÖBãylÈ‚n¿Þü´c(ÏR–ï²/ò÷·kÖ¥ªíì%G½' ø<²ºñQ*fÑD `x¶”qïRkôû]˜Íõb!𼙉µå»º·‘U^ä1“*•RØešäöZ®;qnÍ„gmr«¨uE¿™Ô^ôy„B*3¯?Ë$KÑ…sb]Ë+CŠÞe+Ýÿ*»µ£Ñ¹ßÝ15ë­9I‚ãv‰¥Z=7*{¡Ùµ'*t†œÉÇIt»‚­Û\ü]y³›kBÑl¼¬duÖ%ôµú‘?ôl/Š!ØþU©žDwhÉùÊBã) !æñ•„]\ö>’¹„öÀŠDÌZØÓ1k—¯Õ[î¸ì) œâ7.ȘìÕÎÚêa—Ñ7ÕäSž¬iªƒÛ=;m…"'Ô½•oO}*G[XåQÌ4\M޶ðñ ‹£4]ZŽC•@îD>ÆNB9СXMÔb:2çT3óc ‰aA>'EpÏMÙ>ÂSäQõà (| ˆ*ðC"ˆaãhddSåҊŦE´Ã9¶ ÏdýŒlUõÇÍŠw¬1Æj#‚!?H Ô#ˆÌ ñ€ÀFçIŵËÜ´ý6:¦A{Ѝt{ö+ˆd$î› Fñ 6#fB¡ûq9èÇ „) ‚f)È}€©ÜÛr=Û¥„$3Ž`. zs ƒ°ÉHDTTÅNJK9öGàbÊD •1ùêèRiSè( TaOÄ ‚†²‚0Ä À\ & ]±Àºæ¢8ÍìÇ [û©ƒ¿Ä)1ÐÉ @¶‰Â RS‰Õ–¦Ù›$ œ 8Û„S+ÍIX{9(ÎB(×—©Á@QøD”êd4 3#!Ä!`R)UP™–’šTÂɽ‚˜ª¥`\RˆsqPVLÀ”ÍC1ãd2àÔˆ‚c l‚rA– ýÁ÷ 0 E¿CTŠØû•v#„Vòá0˜Q˜ ƒ9²³¡ˆ‚:šÃ`’°b‰}ÿ ËûpÈF mB›„)„0”‰„PŽÎ%a¥çQñÆgð¸T0,xÌÁd4‚+tè7¢œ¹‚¨ÈÁ¸4¥z"-´àÇ1œl¢P£ Ac^Sß%Z· äýa]–žÐІìf!ò He™£9—­²Ž!lC‚q@‚Æ "Ëà¤)3×Uƒcà‘C RŒa›æ&ƒ »»Œ¸iL^”³3þޤÖ3:˜uÔB !™ä”c±Â°!‡â”Âò5÷u{™F)Î9ld£i úB‰]tæjˆzAß{£‰‰+>1S˜„Aȼ(F`0AŒn"¼2‘’[̾‚Á–`´è®Š¾ìA” bŒ"°©ÁA•¹g=Æ*×+lÝݵ°Y;$Ê*vå'Ô%®§ˆM3Ú„s „qY91«º•ŒÓFÍÂê]ú­½î®Øfá٨ٴ”í¢Ñ•š—ròd”ÞGï=”\ï#P©„R£•E%LY‰#ˆ¢ìd¤ÅÂM܈w¦‰ÙÁr·¶¼­ãv—ú«JŽPC œJÔ²”¦8â¸DÄß²­Ë"¢¦ÍNßKF¿l'ÕðíÄ£7™ÆC0‰U:b7§POW© ÍCrálKš½f«³"¥.¸ŠC]³ûô&œÌÉÛièijbN¬aö•ï™}Š*WJ¾3ªÐ…d¡ˆ„ú<„^¹Läì®ï–šY2N©¶éS«k/ r ¤Ü©YH§EŠ«¿TÏmù?KÇ¥öJiº¸%IJ*GÛ&uÊ¢!¤:¨ŽþûZQŒc"˜š8šnê¡϶2Nôÿu“?Ù¼”uB(›ïŒ_BY]±$Î6.ýžäUSmÌâÈ„!½éášì×sE»ãªb[ÐÔÍJ®½{Ö˜ií¨:‘Rƒ±½œQGÔV䯕’d!ºjçVŒlpžñ(õæú±×=·ó)ôËŒ£Ž‘•6mJŠ®þDfÆ%AB#aªF£Ññ)ÇD+2¯ÉjúQlm\DOÆdcÍNÊU'QïE¥¼‚ªQØg"í°E©ŒS CµW…"¶è•UJ>ºw&?eökzÅ –§/¥V!†õŽE­ ‡Iw0‚ìO¦+m³(+SæŸûH«Úˆå(ÜKj¨C) üþ˜Ô»ˆ"   ºôaŠÁ åÀcœCÆåh(NíCŽ2УvÃQÊB£G Œ@×¢ ­ÄÔa˜!ISã ‰CÔ3z·áWÄ8‚ðCŒs;Wg¬è @D m‹ƒtY½t‚`´)¶åH6R•ÕoäRM(¸£³)¦'ƒ™ŒÔ281ÑæÔ8#yô?0J8T˜!Êw0"©#XPÿìúêNߺ©±OkÄy5+pƒéÔ³žÕc/·Jœ1,œõµúݯì®MϺÐo§àC}WŽåÚLP®„"3‹I(f^*{h0ˆá0¨g¤{oK¤çÑ;6F¤Y¦¶×2"©ëÊ´K’"èéR>ò·*kR®]S¨—ÂW#«òÛ7œóm¹ˆ¯y>†bU¹E'Þ»e¡„XŠWëJBˆå×T¤Ž„9^g£2ÞGÆ>e¼­Øäd±¤ÑyÍ£»³¼¬.rŒ²Ìä{6ðƒ‘еQ… ¹ÛØÆÏäªÞ£U•¨&³ß°j9ò›w‘·•Â;Qt+£G(¤ þt«jqJÖ|ä&¿J§Vì-™ýë#H·ÖÇ]—WˆÎ¾©ÊÅâŸT®C”L‘Fu)~)]2;%ª'æTÉhq`êI*‡9œóô§|æ¸ÌÞšS8ƒ&Ë3U`€€ƒp£–—­°ÑHŽÁy©'¡ÏárÛ ΈJ O—¬A7‚)™r 1Ñ!w…BS‹‡¢ò¡U )¸ S˜@i»•pbÅ3ƒ8b„ „"â1¢/ð ˜ÔÄSP”„|ØG¥î’.½¦4(PããÓ 2°;„Fã Y02+A™™ ÅAT¨uޝâJ2„xî§qÅ*Zß<¤eæ„ CÖEá !Œþ%dÈ ÁO2WôL!k÷Á(U"¢ñÐ@ƒ=9ÍÄ…YAÌL͆(ÃBbp&¨.À ÔdžB‰»1ÅWŒ„ãÑÕ¥ä[H8ãÂ!š*ôbp'ÄDb7µrF0„/ñmð+&4a1±è:¬JŠSZjR¡ƒ ¡Í6g„œ5 ˆ60†ˆ+,È­q©Û¬)w/µQJQûÔÎ0æ2¤Fd¼ã¢ d âV³<0@f14{Ô7!“ȽÓNê'hU!jò”RzŒpØmðd‚S·0˜`â2ˆÔJ„ v‡ ‚¬ÁÃÅ«©<ÄŽ®8ƒx´+²2 Íy¸¤¢C †fAEÜ$d¬ü·< U¯GáW¥)Å*/EZ âqGTÄÁêž Úƒ!4^ÆÌ1Œ`¨ÔA‚¦fBé1ÙÇaDµºQB…QNÁY~ ¤(H AFIÆâ ŠЈ¬Æ 1¶ÿøÉˆÄ¶[NýáýzýFýDýrýÎþSþù³’%è?¡t ¿{H †hútV'eyÈÜÉ¥ÚU:朞×;ÌÚÅûnKŠFÒgP•BˆAHÉÅWÖò>UiŸe³Xž(¶%V² "!÷í6¾ómD±{bܾ–* GÁ #T#¡œæ`„dœÑZ‹]\.’a¿X ¦ëÑ·Ò§Sö èo]®?cJ’±}înRD&9eÈR·¬„Äñ^„#ˆ=Q=ÚEÖNÔ³æXñ "8„Ù©ºûÞ¼¥òyÉÈ+ êëî^Äý_^·xü瘪:òæ%QE_G¯þrU(ãf ’l«ÉŠ–d ‰…iYN¦¸ËòÜÆ1y3ËÝJws}9zô7yîý•®y¿‹F½ãt+æwB¤ÏþÕyÓ‰*y „V\* /Æm"r#ý(·arlàÊHPZP„D‹H¡Á¢’‘ÝZE5X%¦D߈ŠÌüðçÅIn´PðµÌDÑHŠF‘™ˆ ™„e h™1HQÈ Âqè=(JJ¬øë‹H~¯+V3k禄ÁÉNæÃj®FCD"á“Vã$Aî!t9—„WUÓ¸¤FVôŠd Ã ŠS.ÎF­ /c¡1ŽmDD$Ýâ?ŒHgh+¹óÁÄ’¹8Ù²@Ì#† „1™Ffð­uü(R2½.J[Az=?[‹l„ƒ8Š2q¨foû÷L„a8‰ùŸµæâb˜J"±—F]i²£1Ã8×¥àtp¢A í‡Ä HT-™ª/›t2˜ŽŒÚÇ”qÎI˜[jõUâ[H…jàkCTd¡àÆP “âéqJèq$¹9pTÎ(Œ¦)z‡³‚Æ ";$¦¡Á"Ì”©XBƒx*3Œæ×ÈÌ(¬Ô‚ô¤tÒù:›°j±ZÈ‘)>,Ð@Çjþ3‚Löפeƒ ¢ŒŽ â°ù #dª‡rÒ–ÏÎȹD@œ†‘·È! ’´ è±dpÇ(`*ñFîÚ¸½Ož1X‹¢ŒˆÂf&Ç6 ×™Zg$JªÌt)A‡osb ֤Ñ’Ê"ãµBøÔoPtT"móŠŽdƒ !ù’Š8Ąه#®öª´™ pÎEè9CRQü)8Í„ã ã €"„| ñ½.ê4áJ0ÞN7ˆðu«ú$â'b¥!0bÖU38Œ»Ž¦e&¤âlD (‹¡˜ …ùÈPÓc•MŒ)¦3ùW”h Ž6:ED`DÛõE™:~¢[5„L%#!±É‹¸!Äè1ÂÇOéœJ•H\ݳ ÍÙ½aD:¨Á(‡„<Ö§ 0£oZ9¹Â-\ kˆá;ûG¸bQ )ÚdÁßNFäx‰ß# Žíû0q ù9ŒV¹QI/63 Åm ) 3ò:G KÃV,Suö3’®m¶*c‘(Ž~;R‘T#Òd¤d0àŤù†ð Âe_•›y;XÝ)°kŽÅ-i›âA˜‚§ÌBfNäB)«Êq$ ¹Ÿ$£fÉÕº.”Cˆ«(‘Ñ^½Š0ÔAÃ,N7 ƒgb‰}¢É“’ŠB=%DFB1ò”&äTiÈ«{ 3¦@e7æ¹N%¨„$;”BŸwGˆD*fÜNŠá9 CC‘z ¹ »lbpÎFER)­š0•¢/FÛ5CsU$¬„>—'õ½Ž! v(CÐcšÛOI2ÜŒ­DX°S’óUÌ Þxg1“ —Z¤ôÌžŽn1‚0ó7"è¼¢‚™n(r¾sU9Ì‹å°Úµ¡7Q’áÒ®ɽ=ÄäæÊrZã<ÈU»´vv¡Ð!¬/Zêda×û`”,†ó(ªt£ûbq˜èbQ÷ó˜Éè“—7ŠÖk–›U?Kä—vŽ‹­g=6rž¶òG…Ϋ&†" Pá+ì¤q-iÛ%=‰ˆŸ®Ú­*·¹)Õ:17)N½^ƒŠÒŠTˆŠ9ê—©5‘žæGîÆÛ;.q¾±­{)†TäB#29f^Õ“OøJ*ö~ÈÈØ#ª b’ãTG£Œ„±èªwäW¶‘r»QÍ¥ÌäåÒ¬„¸@ ]Š'v¤kAãMP«Kä9nQȉ`f@HÚî)üc’’jZÖ±Dçˆ!¥íüLÒÎÚA6´Å£ãTÆ!L^; ”šzJ ²sŠ3º~+ ½oû(¾¬åFUÒ“¼³ >{Ð]ð–&ají+ÝÈd:#{";vyd#Ì×;Ý‹í”*‘êû6AT’„ )¢ÂøQE?]! H5!J#(eP2l(©!üöŸ™ÉéË'Vµ–š4'Áƒ…JœQèçMáÙU›‹XËçî_0…C¥ÈžjJA [ÑŒ¿årj²ñ{-¬’¡ŒÄmš„•ôO'S±³ßÍpŽL'¾ÔÎu:£a[bÓTGEK ˜„>}f–˜¯B6Ål¸ …2  À‡ƒÏÐ,I@ 4×±‘ä(ÆÑBHJ”Dw¬‡,ƒQ„ ˜Q¤'ùñ Eª±?‹Ïîß©^¸FËQÈf» «BÅ­bM5‚1DoÁPÈräËX‘²(®%'YWbdßøV3X#‹>£ß.©õ”òÓÙ4[¹®gVW¥²¹Yî¾ç»)Q´ÆI‹!ÐHפ ^“M{‚6¸…¤´ž5åFòQµGÈ@Q¹¶ËAÜÇÍ!°ž‘j5¤“¥ëBˆƒa¼è¥u%L€²M©DfÄTa˜!]{Zh²ŒïZ6ú騡DyÅ×ÍÔêE"¬„œæê¢ý²Ïúº÷¡Æä ;mEj) Vn1ÊûMm8B¡Dy%½ ¥«Ñbäµ’<ÄëFa@p1@H}F?É*¦Þò}“{Gv‡RSe;hÂO-QITjeôÖdôÌN{£H~ÚÈÙLòzÚ–j IÌB:š}gšiÊ…ò•úSGã\ O‡š• ´‡S­HE˜² ³0ƒÅÝ18’–€l€@ !ð(Ð~´n[µÐ>È"_TpÏ”äF¨L¡…Å€øò¡ !$@QJCg1jEG‚G¶M!ƒ,wæZPNBT­AF(ê<;ÔvËÊQ  Ö@ÓÀ…a81F óNBÉpPy±³b-,]&KNe‰{èJzüö÷à#6kÄ‚z¤Ý)¸€0ͨk£ˆ+ËØq¥/„épxZˆ¥:¿+ƒÁúQÌ@»BQ€Ì b:”ĵç¨îb‚ as å*¦C±5TœûŠì¹\©2B·ª@Ô7Æ©FQŽTbQx¨…Fzbab‡»- …ð¥q[}PˆCp¸Ç 0ã³C‚d@£š˜SöR5B‘5qÚKÛ.YW >p”hhóʇ4 ˜D2$@„#ÊR-(Õ0Ìc#VÔî8W/ÿb„ŒîGÅââÌQHþ0a½iÃ5n΂0Q‰4†fBÚ\î0ŒM¸–5U&U`±ð¶F4‚\I-(ZXÇ0b„ÈìoÆÆ#¾; ]œbœrðÉþ—wpí£µ‘C ð!E$ƒ@‘¹Œ@Á1†>Ú”iB&EÒ„Pàáj‘ʤA Ž˜P°…ïT Á™iª˜ 1/êˆkL%4r0Dí:±La¾wwŒS—Ì"ù!ÝDa!LÜq\ôÀˆ€ˆA‰Œ©ÑÍ¢ ²C˜@…ØW Iž“rçO…8‘Fä|;"6c!\ŒÅ;‘J©_B)ѳèV2¿¡—†’}ÊÓ¥·”…"j¯Z¿Zö¯(ä:´ÅAÇ}~¾ØV1ˆÆ"ïâø|C4ɺZ¶• tÜ–‰šô7Õý+èGZŒ²\øêo§Š0ér$±/W©„ÖsÝ´ÎV6ã³óÛóšÚËÔ·Õéô!:”_G]Or„Kœ…a )êmR±$Ó(P­þ¯„½#Ó‘eê­ÆóF]=äìÆjåC꺞R“¹3/©ª"‘Lï#Š„LZ –ëªågu¿fé¿Wb}wI$›† C™wrÖ¶]qy\AS´Å#eww’Ô¨8ªŠSÚ˜JB{øˆyKjv^Õ©„C‰µ¥4…EÔÂUÒÇká(ƒ•nAÿ)Rˆ¹Ø‡ â…)EHFqÚ`ã… ÇÂ`f %ÝV`E ž†âc`ŽèÜ1‚@CÁN ³ŒfÖv8ªëšè®Ç?Hc078^g¤ucÂ|È £)å/&5ˆÅEá˜ü ,a3x9‡(sª¦²•¤°€Á†²ì!0”"h‚ˆ¸h˜e-Êu–å@xs¤L@¥ ŠUä@F,né éˆk†] vPCQMFR{‡¡¦b!h Nü•!h—*⩹ëŸÓ êôŒ6ü¡ !H×;¼€a‚–ô \- # GW¿+‚»774ä ÈU´œœDÃ6c@4!:“ÆJ+©}âñNÄÈÁŇÖ@èrÁopˆ†Ê…“Ø%022¤iƒx ƒ!ØâV5„ š¼šãUà°ŠÂRÄQÇZ?d+KÍÓµ qpÀGfœnRŠ â`0E¥ÒRŠÂ;š„PFÎ ðr¿ð†òœG\³2x6˜*r6Lc£*ŸH ì~C¢B¥È”Ê+bE”À@×ê„"±™Q±BA R²¡ Ð1Š ¯L¢/lh¸QßEéǃ0\~r‘‚ÄDD¬piÈ„\ÄÆQ©ŽG]aÈ™S|G9`$â<½waû*CCNB8O‘á™Á¡ÁˆÆ#øÞ†dÀ5*ºõl~IEÅC^WuSèFn$Üža†5ŽƒãV „SX¥TLÄ£V ‰Añ 9‰8¯D3C’@¸¥úó³O”uMPðT q‘€JÎ Ê› X 63ò¦(JsƒpÐð;ËgtÏW·3ˆs¦\Oˆ A@Í‘ Á3"ÏNB±PWR1ºe¢—âçÎ N¥ 0 T!ð¢/4À€ê0^{+ãC †ÛAtB #šIÝåj%)¬BŽc˜Ò¤*3Õ‘ z ÆrE{ R™ ©¾C0…b$oß‘‰{œIˆCÿ„J岈;‚@Â3â8…­° ”LD!Q•@ŒDO9ÈQ`¥®1\‡"¿u.cÞ‹Ò ŒD ˆ ̦)SJ@–Œ†#†êžŽDpg b‚ 3IÐÅÞ£‘R ×±5 Ó¼™l•ÈŠb÷«{Ê‚¬[zºq%™™‰1Ð$aôR\,’©N¡åb„“Ò† Ñ©D‚0ꆢ0¤¤‹Õ,ï#°‰Ñõ*Ë”5…Ì8–‘DØÃ82œCiaT€› JjävQ´6Mq‘h¤¬T¦UPe¦}C„Qž¡®, Še°Ä>‚û¦5¨Yn"éS¨È1›Áæì'X΂£‘ˆºíøU͈Dƒ2¢1¹dµC11‘ž9½áHDõªi¢éÇ¥w2âUF^衸fì\Ä‘ÈLÊ–}: …btl˜ˆW%#³fa¼ï‚ffÞEViXh©èž¡U”ç!÷eB!Ý9Ñ•™ë™„Ä#I\÷&Pˆ•Oó›EÏÎ$Q†ÃD®%ZªÑØc‚&#CŽ^Häh­ÃÛQáÚšŒ¡ÀÙ”½V$"4‰N4”"ˆÌ Vî1ûˆÌ$‰NX&˜È˜¬á %Œ$q’9̪ˆT1–ùÛ±C°*LªÔv³rs4*´n‰Më­ÁÉ™š¤<ã; Ì’‹465 FšÚ-ãAƒPŒb¦±Ýj‹óå8ûÓ`ð±H ‹Û „r›ø$ã •¸P¹ÙÁ°l39ò¹'Ø4™9Œç3BDl1»g1žš:5Á| ã vîMÿ,q8CÍ̦ eo JÓKÿøÉ˜Ä·þNÿÀÿØßêïö/üþ¥ÿ­´•*“Ðñqo®‰§ÏB«F!p¹TjM¬8hÄ(B{”r¨ôjƒ!†°ëx¸«»E¦¨ŠZ3þGeP'­‰UöÂÆÀO²N/â ÊÓ=J;?S¬1 &ÉÜ+ÎP`B Ñí‡ËA80A!] Õi‘„c¾wXFT0üîèt7â8A~0äh1°½µ˜Ð™êšÔaIŒÄ„ª…S;(B Âc¼Î¶(Œ @Î0KQû5º¸¹Þ,î ˆ&áJõìÌE¯æpÜÆ qXE\†[Sñv\رì+ TÁ(JO£º£ "Ý7„UÂQÈóV$‡vªD¿`¥žª  iVúœ 0"‚‡6S0bMŠª@øÇv«X‰¨^{Ð@Æ!„ñâÇq«0j1 ¨‘BRv*Žð«Â9ÐëOBj@‹‚ª„Àˆ½ ó"5Rç°˜Þ-)54fS—œ˜@@dELZ P$ !¡·B±E¢Ãùñê[—c±Qó±ï>èÄÀÌ­ÏáFÀÄ1ž¦GN>fŒÞ Rî°Œ„d"•œ*{ã#Æ$2ð‹ÙÛ½áMª@™> PÅ#:†-B⥦%ðÑÒ¢÷Œ±%ÅýÅš33…já0ƒfãECÂ'0¡„d0˜BtD.3LÜùrÑR²•Þl)‘×_¶V#2 D-‹±‚(F'RÓ?dž©kG®“s2ôQ´!Íåá—‰ÀB8“Áa"Æ.¼áÖ¦"uýQ!ŒQÙ¹ÄKˆ€DÄÉ_aÑ„A+â1,•[¡LZÉ ²ÉÐÌA‚CZˆGE«Ã‰$ÄPŽrÅUQL»¨¾?va ùE8âS˜aˆ@ÐY" Lh ghéì Ôš(«;ʹ°^¦\)Ö[j60™ˆÝPnj)G[8„†÷wì#yDZ Þº6¡?!‡"ªjÖ3º¸«X‰äÂTŠh4gS‰ˆÁ(HBtbÄR# IÏ]b8â=ƒ…Þç;÷Æî ¹bFÆ!¦rІÀÔÓ©ñ<ô¢àŸ8W¿ˆ¸1@bHu‘ÈÔAe [0A †U¥à ¼aP(B8"áĉÐä$2‰p´ÐcTΊ’•!…tó™C›á1#£††ÆÀLðƒˆ£„¹†1ŽJJ®Äv:õ‹†ø(§æ©hŒ1)J¥v˜ 0PÅM˜ð­ˆ˜¥Âø¥Rc—vFsDM†pGù” BP\dnãŽBI‰ ˆˆ/ïú8ŒÊf R¿ À&ìÊ0]N8Ž2+ŒDBõ2ôöLR0B3r¤Ci dÃ*N0 T+e$?ËL/?„\g¡R…$dfÀŠáV€Ã D€F·«½… ¤ÍY³ááßgÈ?B i ØH&W„Ë™C^õ\P­5!zd0E:êB>Qç0$30Ã1ÐpU„&Í´€/ÕÎIY@ŽU–¢ª‚pÆ(× HFŽ!„2ª.•! Íoá^%¢¨‘"‡…BL :¡Ä sáïl'io1©AÏ9JIH‚ƒ ðQǰ"0†Ì#Ъq„80Dÿ Ž‘Šªr2‡smˆ¾Ã†«ðÆB)Pûça(ÄbÅéú‘JN‹NŠ@R|oª±³ ¤533èP`c3lq"Gá0DçÁÜóBŠ ¡îQFÄcDäQÜG0Á±³0Æ»s‘~̈‰ñÔWsèFc"ذ487vä("¹ OÎ:½ËmøéÇg‰Ç®a fQß·`…HÃ`áºx,Xjhôä/.Û†#!š³aŠ1ÑXdõi ÌÇ­Õ–žT³´”åÁ–Ye×f1³|r q/©AEë9HœQðèª&c숾ډèÇĨDT™Ëª‰MtàªþÜfœ¯9UPÖ¿´¸Åq™Ó¢KAq8®¥% ¼û™ú&‚ÅT¶UT»\뱋µ½ðÄ¥ŸNÔ+Nmˆã’ÍÈñ6ªÇù8b‘ŒJU;{à¾+δªjÖJä\³ÖìÂÈ·U.’…$A\ŒŽ©ïo"Q6ËëfêÕ-cïÖ—.% Æ(ˆ™ú¯Û[½Æ[•—±/è.-r˜¿©‚6þ›í&qvés$B+6=hÊdo1Ðèµä0¤¹-.§ïvâ”d’ä’ÛËIL¢1Îò%¼UH¨t* Ä"]=jø?RÙiœwZ³ÚK]kØ‘AðL=sÖ1ƒCp†C¹¹˜”…H°·‰ä’1CëF%#ÈsÆ ˆ Ch ©Ê¤ Et†Äqבú®z5…5Á”x˜ó&„ߘ­N¨ª.â/#ÙT'8Ȥ 0@á¹]‚2˜·a„'EPÀƼ€¼TQˆ›9 / ‡ °„Àƒ¿rœÜÀ@LA‡4Ù2‘$ì‡-r﬙$®U+`J‹T3 3A:TØÅÅ RŠ!ˆ÷ñÇ…‰v-†ÀƒÛ±q ÜŠ‚|'(ê,¥ún3xÇ/qd6¡™ÈŠ—™ BNh!dZ„ú Ŧ¤©JÊ…=Žâ ‚& ¥;Ò@Fž¤d,"Ê#¤)Ž'~-Â( M‡Ž¦ôpÆp1Ê‚ê¦Pa$A®j\Wâ@»`Á)†«$:¡I¡‚‚qGW¨ @O ˘ch»‘‹ˆU@¿ƒïLPdi‡Ç @¦Â¡)¸¬‡Ä29†°ˆÅk}qH0CÞW-‘EiØÀŒÍáÄÌ‚¨ÊÖPˆA»9»oŠª½[øUgT‚ÌÐ&H|06 K¾AGU8FéÕç:.±!ëŽ`C3 Vã8 Ê€ |!¬ &«ÕN1>4òŸ|2{×ä$v0Äɬ"?VÆEnœ±]JffTsý?åX‡ÂïbB•Èa€J@Ÿ„2Ö–iÌÂBEÅ?péL@mÐô÷8”¸Œ¨¨ 4ûþ¢ÎI·X{þS̃gé@<ÃÐÄ›Ub—KcRÃy˜-5¬WáSž¨%a% ,x´ ©iÄ:‘õ#ü¶é#_”ÂZ¬=b•ìRñB2Bá#ú¿‹{èÛ\±‰/ki¨Êô Ô ­âWަÅBµ2-ÐVnÆ–,§"—k2NÑC" –¯³m1ÝšÅu*Q1I´­Zº—”ÔñXϨoO‚T#ý5•ZD:»WéÆvGþR{R‚¥…JF‹>0Dñˆd‡ÑÀrMMKd_’{ɧ™=Ýx¢.¤*!–aÕŸhëç«!1¹³X†”¼C̾˜Aº¢u|þZñ®®ä%QP£6ÃMˆ¨û3sí¾’Ö´øŸÅi~…?1HO)‘²*„^!ù³ed+Ȇ¥.ø™Î­ý«D-Yª„Ù¯×b« Rqô!Á‰(‰ø-mKì“:uÕÆ¾¨I#íQ|–3–¤G$îbðP UNBáA+[VÅñµUMŠ) …ó,»S««^NŠö1RãH¶´Ñ†½cñ<ç*)H/í2z!~Ô;:é2²á·ô›ÂãçÌrËER¡*˜ÙŽ);ˆ©ô^ÌC¾%ùŒ‰FÄI~xH½-Ó€áØ[Xqe¢×a¸,Ø%ä ˆ‡àŪa“ÔôH˜BˆŽÍÝ¾Ž¬ùæÿÄñ©¹=<%RV$çœÅ 8Žj‚OàÁZ&!Þ`ÀbIyÇ®.Â}·ÿ½SèB„MÒÎ2nºQ¶1t¬…î}ÓÐŽÖ÷Y µ£½üœ¦¢fbµk;¹ÇS…¢f ê%æ‡:P§}Â0Mß 6Xãq^Ïæ7±˜RÄ#iAAÄ|2Ÿ ™³x¹67ý¥¡fË,G¬çâúõÒ†î„ñ÷-ʧµç3Lt÷*œŠaWl¿-qžÆw~ªfg‘I[ÏtBrXûíW{œèÂ9›5õ>Ò¢²¿:ÓN¦æ§ÊC3LåAizIúÛ¥˜¼e†: ³¹˜K¢Ò,ÕÀÿ¸Uâ{+âÙ ÏC)ƒì-1œåª \¥ôµfd|¢ÖA*™Æ×µBØL¢!îqFPGp$þ1M7BŒq¶t˜‡ :¿0TµkÙ_¦’Z?¢:T×Y.$ÄÉæË;hˆtÚ ^Þ ‰ƒ5¬NÊZ¬ÄßïÕ¢e^ìê@Q‘òò1Ð]7³=QÎseÉ~Éíd7H>³q¦ÆOpá‘îã% %ÆÜ¦hÙ}›6ÆmÓ/©ç%I•H.¤Ý`F{=›§/ JŠ_U£5˜RR)d¦sW 2!—EN£ùqÄ©¶FvÝÇ¥Q/'s ¤UWBi¶~s²¡ñ¯üq–M%‹fPd^-2'Ëg_žäø¨!ˆLOJál[K÷ënº¬Bq<‰"Ðì)LaZç·,1¿g²¬ÄÌ3y6G™ä±¸˜J—:M¿s1\u(àáÉ4~1”w݈v£ÂŽ®Ä)Dòeäëuk_fÏ?­M#ƒÙŒ*&iÜF˜K¿ü¯çQ†»Û;8§ç{ì·ˆ¼BWiÚ‡(¥0çG«ul'½,Ò¦ÎPG2óT¤ëÚÛ¹Fêéñ­ìÆl÷1 Ó¸`Œ•ÙVjµ_¿™Ä¤L›êñSÆ¡6q0å…gmr~ËC)£™DD]c$•Ì üˆ"~1ÇaÜ“m²D¨c¯1莛w£¡®¼»¥÷'')•w½Â-Õž[™¶ÉA‹¬m]lñ -oˆ©aNš}¹éߢ©M]R˜b„ƧhÄüÄËß3­øûM«]”U¥-ÄX#L¹MªªjÜ–ÌâP²µÄôªjý×y9íÑt¶F!.Š1ÇkRže»Xˆ»sIDs²úz¶-¯¥ÉóIV\­Ù–·j%D)YÈöª³§©®Sé9HMÝ" ô«µ%_ó»-EÐEœ'›æKŸŸ Õd!êÿetëKäücPiw¬‹Yß8Œvc±B»˜‘QÑ?ÌÕå¦ÿ>‰Oýª!Ÿbݪ§\¼,•ÔqØ"DyîæŒTÙyõÌed»„*­EÄ?–©'© ÿÊñ±ZG¼Ì¢’Jõ[.󰆡ЪÝRõŒ½d"¥5-äÍ*;¼{½D(§¢VQ)Áb.Pj§+ØS0€Dq%â6‰*á#\[m7½,Elú3ªPÎ:´(Z{2’‰¢T˜ˆB?™¦ZHzPNJ>Òæ…FbˆæBñ”éµ#eNRqNµ­"RAs«Y0õº/“W5vEÒ¾¾!ªëR]ZBÆ^l¥UJk-QJÏßbk×Oj}êâR˜+.{†©˜cÙ^g#Ò¹­¥ÚÏ!³$ÂÛŸîJµÎ”A”T1AœºÈuV­O¤ÂfS1W•oU#©ÓuÍJÅ‘ Î:]ìS:‘7ç啊ös ³4«Ù‹ßÃÇæ4‡÷¢J‰ÏQž¥ºÒúTss’Wëšrzú$íåmÑCa-æ¡f‚bÒ˶WåýÅæLy gZ(ªa˜`½äÅ-T½4…ãOBR_h¿¢7JXîaT…eÍÜ1üº!;0ØŸ<®tÔ5kµ¹mÓË Kª²g–)ÜÅ•QÝæ=ˆg3Ž£s¿q%¡éô¥· ·ôxÉî}2Ê$‹aIâ,©½È®¾‰»„"Êω.ö ¸m­6¢Qè‚­^Ê&$Ç)†òYš®! „B/\Mê$Ôß_wFñý•Â.É:H8AÒ”¡‰È¿QjÞi36‹7—DoÆA×åz¡·¶¸wyRä}뙌¸»Ü'b®‰F"ØFçîKUÏÈ$„Ý7Ì•#µHÉJ!)?"”IFÚÙ¬µN"«û?œÅT^E¨­:ç½ß##¤Ïæû§¢/¾v5˜‡:äQiÙ}D§^‰ããâIh„r¦*©Š1Œ)Žòídk—úMÄéÇu£QwH¨i4|Ëû ºê#Îd)æ+{• N¢‘c3ŠaŠ—Ã’g¦ùø¡6ID¢c3–¦™åg„$¤¡ŒÊJX³%z´S3÷?ؾÔ{0¹/ Oë—–fR·apbE²žõK)šCÈÈwkê}jþÉ’¶É³|„¡Üã7T±Lg +OM¥ä£Ü­j¾˜ŸÚ;HÕT{S[´§”ª#:ÈwO~üÎ!HVöeg¸©#¯¡oß™MmDNI Ó®»mý({{ڨʮþ'§ì2‡°¹o©b§’d›ÿøÉ¨Ä¸2L4Ki3bÒ„´"db©0è¨î|Èf‚Up¹Gýy3©\Tå˜)Ž8€¥rɬÝ_üBÞÔèµåºSà„1Q¨B‘Di(ü›^Ñ4¥Ê=ˆE£:Ä£šëçÁ=Ñ^•C ¦U1Ì™FÊô„ ç‘ ²Ž ïL«JýûíØÔ—÷Š3Û\¦eB¡ÊC¢É³¸…ÅJؼç岺WT›­uf“Bi½ËÈøbzùn¦µH®•S/9Îf²{% 5ä“RÒ •ýŒWB·4TÊT½ F$žz[ìzSH†£`}ÈáÌ÷ʲÙ^ºÿ“ä(s½/!Yõ»µ~Ç!}&®åC²}ïýA¸¿!=ÖŒ")5-¶=ì¶Á’¨¶E~ö¨íw².I+ZŒ0ë®!vŒ´}wE7·y3oQ(%ä,ŒÂ%Ea0B5ù\†¦“-ˆI){n…ºFÿÌžB°å;Ǥ…sKäíî©ÆlWzºç—©ònö“hIJFŽtÏ×"%+;˜Dà‚ ™œŸJñr4öËÛqÄI8Œ¤KŠé+¨G «BOz,‹™ï•%ObU—4ˆ‡Ö²çPÛ”a4ú#ÑŠîe(ùb¯­F$â ÅgZ:nô“TòÐZøŒ ªgyB4§Q–9Ü6Ð ápL [‰MµØ’gè“Ê ¶—\Í¡4“¡®Yˆ2Û¸Pèשùª„ΈG2Ê·*¢ZM\>SÛ÷FK8¢¶œV%H¤ÕQÛPË­]š‰QR‰¯.‘¨K„9î¥!¾T1(ª”&)ùy?²Éž_JYÙŠ#Là û=,·A('Z½–¦Þ¦‡„êDfAVã«=$g×£Ÿ1‘êR;c%GÊi°Y~Ò­ „âXé+V(—U¢æ ÉvN¸Ãå ý¹eScá~’ê^ÕÇ ûÛb´®Uz*û¸Ä”d“þ­JN^|lµ|Œ+æQèøµWýÆ1w²GÄË2±ÝFÞ•MÜ"wB ©dUÜÓñ-ZÏ@¼¥*ÓÒDvP©*xªgHˆ¶ûŠI{¨‚æåëö’žÒV ›äÎZ37“c:íb ¥Å±úTšŒÕÄbº Ò‰i¹ó’ÌVTlMé„Bës©…o:!³± Ä2Ûm§‰Bb„'æWæÕvmÆ_|Qf‹¥NÿáxŠ3Œ!Ê)/&PGÙ'ñp§ÑqRYžeÉ¥¡X‚ …Ÿìï[Q¸˜¨“r½‰œWKoÂt‘¤YŽoþQbvœœ¸¹U^: ­1؃*‰S1MÝZ[?¹Ôö¡}P1;*ISŒG‘ÌVª'ÌE«ù0¸ùJ.T·nß¼fE´GãWID9,ÄD„¢ñM‹ŽSœ*»xbâ.å$¦D·Íæv6hÊé¡/QÅr¢‚8*Ò\TátN'÷ïu_ð™¥u5sÛx–J3‰Ž£"Tr8íê‡6‰^+¹‰8B* Êêö§Û»µNÇ)Ÿ=Ý\´&^¥ íR«j§“Œ¹D•MY{¨üR–îQÍ¢µ …GÚ˜…nìD&®Òl¿%ð˜¼Ç~0C†Dþ26Ö¶­kµÜO#Š”n*Îãˆý%:Åí]æ¦'x‹Uþt¡O&=)/lŽÿnq k”|eô*öa9RÊC rŠ#9ŽRŸuÙi——KžoÖu·¿~»‘˪uô+œEÌj3•ˆ”ÃHÈøþcÙ5ùVªì½F)ëF‘-*Ô‰¹…÷–ºîÇ9†!ݘŒE6’jRÿiñeÖÒøíé* DU³Š ¾zNìøØ5¼-ÿÑŒ‹†¹¾öÆ*öS±ÄFAŽ@¬ä}¡ÍS/ºœ‚¡™)=_&ÚS$Æ‘ŠWâjæ0©bó[O ‹+Hœž¹ør!Q$'ý÷T¨¸R%3YЖTWKÊsÆ!¦¼½/æâæaØ¢;¤Œ”üLµ©Õb—0⪪J2{ówÓ^v©—7^„ÿZ´Õ¥¦[»¨•*o)S>ßBHÌsUEc,£2*õ„ÛîRAUÌcT&WªâK°±“'¼ì®E$uÖ¤62"AÒ(–Å0z¢, ÐA™‰¿‰%/`e1[ '9WL-^°V ÀÂc!Öá w \£N7!»&4aS¨3ˆ«r™0Ç”EºœA #rš#…U —8¦€A31¼{j–š“$ ‚jÉHѹ:Š8…¹Ièâv¢¨ð¦k50 »²Q¬$(ÎzähÎLÑc™Ó’a—Œ‚!(I‹<¥r´lLFA˜Ö¢Ì–Í—„$S…x=daP£yr9/qÄînkˆ@b€£(ˆž¸‡è† 31™HŠåR’• ƒP†0ÄDi`­Åê†ìwÝŒäTȹV‚ßéɑý †;(r£! „pÌD¡&ÇÇF!¸@–CÂñÅîVÁ†ÆR ¡¯1}ÊSzIž ˜Ý OJdÒQexÖloŽ"¢3Œh ¸` ÆÓ–ácô ÍDv`ËSˆ/`¦/ „¢Fµp‡w9aç«RŒª (Å蕲)¸!Ä’jcp…Hèq„D½4Ä™Ä0¶‚ËV‘ô ÐŽÓdØåb’ŒC$åD 4zîc’§%0ÈLÄE UFS|ðE`ÅiI̾\šˆ‰y %Wë‚sXÆÐ2ƒ«Ç<eB&j†T!2Y K¼¶38Äìˆ/JŠB(„(ÅÆeæN܇búê„T8‰¤ÊÄ#Õ9:oH‘¨ÅQ˜ÿ8ލF¢€ÕbšFH voB ¥™&w+ ãc˜ø`PŸ†Ì,­ -K’b%¦Þëlq°e"FT¯é1Xg BšòS"h?!^å&78ÇA”èýœäq*B†¢2êJ5Ùïn7,VŠÊA—Cæ.½”21#v·­¤£á ÆXD3Wn\9„ìc²ÓD…KÛ‘¶(œÄ@³:»Þµ3ˆœ 8ˆb1UîXÅØFªM‚‘É”J EDjG‚;â¹äýÐQ·T§'h>$'£M'ÊAF):r!"Ý1X”ÌT+DÈu‚2˜PA˜ÔÈ»ÐS.Öò'8À›àL€&0¼ „µZ¾”ÊdgyÏÐËèƒ-s¹Üng቎"›4ŠTŽ\qFìqcð—×Ç! „ý“l‹%Cø–’ æF÷ˆÕ‘È=P÷ÐåÜ@ÄmðÄ1¯Z#J€¢LhjE{r|¯ ó ¦ Ÿ¹ØU&“K@IDS ÌÒ0²+ç°äC®râS {žñ¡œÅ@€b˜3¶¾q pÄ:ЂPØSò…B¤Ž¡{\S¥-Î ¥&&hHÐÕýG¨&3%#µ+<4ï#ÆPSU N™˜â9„#) 0#ÎÁ Š£0tªaÕ)ˆÅvüCU´¢@ƒˆõ¸€„„Œx ¢‰Vx8BÓ¨^"ÁóÉ1$Ê`L'ìHi´!]3 §åÊŸãõ¨åÌД*€l S€a áN€ãш1ߤ3°B•° B0"ãìU´C¾"ˆÌà„%ŽÄ>“²‰A±ŠAuœÐ°Rý[Sè#ç; xC¡>(jD¹€Ã;QÄØAGQD+âÅ`L¡“¾®Á=52 ˆR5!ò0­ë8„qgp´² §sῳ4΀fH±†Fm ¼Ê%3W1BjŽÙê³NEz)1ã°¤}#‚¤)\è €•ˆCW¡ÃD#ùn"¤ì|¼#p‚…¤@‘xèc6)Q(2ÅLœ÷G*…å&! „ÄôT2 #: Ã(Ç£JÄXüÑŒ›£ ãËAT´¡…Z Ú„0!‚”Ô‹Q„Fw4ƒ1„~ƒÜ^çTA‘Jô9‹”ÁHâ0‹Êa¶Bu2…W@BN Ž50»acóæ# N«e v Ñ“ñœ3f7MID/BÚTB[œBGNR%>âÖ)>è #”@a‚a“æ 2TZ`„OD‚2” *Æ[‹¹ê>?3‘Jè‘1 Ò¨ƒêlG„/øAÛwHˆŸ”¤1ˆƒåÉ ˆÜÆ"‰”ÐBj'Âcˆ©:µ…3ÁøæN‘ê9û&Qv –: Òp"šc4¤B ]C‡eŒª÷þú™Q§„`lb…FX Ì 5G¨j„b¨P¶fN­Ó3¶CDþ²u%a[?b«ÅØ51H‚HYk!Ú•PÒ–¡DÈ'V ø'6nôõ3b5÷1Ƨ(™‚¡Õ~z‚‘Ø lذ‘ˆ LE‡„ eŽÕ AK;aœW;) xTOR%0A1a˜Û2‚¨à£)„‚=Õœp2¿t !xc³aHù¨&t³ g ”ð± ­Q=2á« µ RŠAö`h+eA¹ `Nc»(A¼ðáVl³þ|:«àkB;™;„ BxZ2ˆALõ)N«c>ÈäÉWUˆ¬Aå!XƒÈEf\À Ä̤,|ñˆDd¯Ìˆ$«åz£ùš"‰§xÎQŽIFŸ!Ù(¨‹Æ%j2ŒiÛ“Ë^)‘”R-Ñkráˆsr„ŸQÞLDljaˆôSÓÁŸXÈØ`·EJÙ£²ÆCDOS˜”A÷ƒŒR£®u/E¤RA‹hÄÔ@"ÖBG ©ü ê!ŠaŒ$ÅC‘E;€­hÑ–7eL°aÑŠR‰É|@ÃþÀQ&Z1i3~œpNÄnnÆ„B©f†&º0“9ÈD£%6PÎA˜È± §¾/e@æKF+70jËcm\ή”zÅA…`œeb¨ªc˜ÌæxÄ'¯ý›¹¹¸Üƒ¦ Ø{°ˆ©±†á³¥: xTm†5Ú¡’•\””Ê"É9ú¨ˆ"«D -#64|S … Å®f§Á‘Fï’DŒÃ!bBUo¼ôÚ‘uzU¤QptLÀÌ«erpMBÄD‚ ¾ýég2{ÕnA!ÄAH‰*îŽÌذÃ2BJàUsЕÈ^1Q®4iq!nªbój8ea§ÑÄ ¬ôvpDv!;.)\ç$¹â5 "Œ­xÏ•S¨ÊDìÜŒÆâ$A˶Óñ H'¸„‚tüÃ`b[έÅnI›Ü1Í­)ö# –ªª[˜¸¨£  ÍïŠD¥I]Ã’ ˜19”è(,/VˆÒ£ÒXÕ‚#£ GZ®·j:&ÀŸ¤R%%(b@ÛLæ †ùœ°v/øC`ÙÄ܃˜¢ %sJ 46Ð¤Š äj›EŒÁIö— ‰„¸¬.#(â#˜žT&4%åÓiMê{Žîì?1‰ Œä®4a5AHú @!‚Dž®t ÿ¤éª95I2 !±¢)‚’©Ì‚a¥±áÆ…ÈE*790B‰B°x[¼1Íš%q—ÑsSR#1‰•©VÑÜÉ3¨— ¢a|vjHĈç1ÙÝX(gÀÅâ….C28EȰõšÁ8 1UFÃpµæNg£sar…b™2“r ºÆJ(Ñ˜Ž¡ŽÙ© O¥8)2ŒÐ"6þ°_ë˜r(!EÄ9…R!cTƒ‚„>;0á bÍÐí(g3Q+‘yIÑ´4Ä4Î!`·˜VSCÌAÕ¨í‚*1ÌYâ¡E\BAÌ“6!Š”Ë.Þ5Œq €æ¼NèbìÚ²„. ÐyiLBÈÔŽÁÌ8e£"t@¦qD+X' Š%8ó¿1µj1k<1k+%Q‰˜S,*s6be^õH!Â3œCÓr±&1.)B£²m×Z^’5¸A¼s-eíY §Zñ˜×jÎ-LÑɇ5•ÂÍDMò¿‰Ìú.r9=(¤_QìÕüGò¹t„ÿ)Rr½]ô‰Š¦&ýãZ „!8¨Kçó?äé ÇiÕ,+ cL‘®år"Y½ÑXI8/ ÙF¥{PÜe µM&:záôašE²’!çz°ª©#³Õj÷®p¿º¤ëðÔœ´%Yåmˆ‘‰ÌœRY½°šy+IP§#fÇAÄ øWò¨ƒsýV·%ÕDbÃj­`†zk~/T±|n·)ÈÈcœ2-„>kÔÛÌÈÉÙÏ„'™X«„i­§Nnú‰¨}jQÕkÌ!ýÌKß”RøªQzU*Ù›¶Âõ1Êb¹ôõiТ5«\‰$,Ú)Ñ%:´…A„UçDŒcÛDv’EsòcEÝÚV2iõoµ/5®¹L © `E$™Mª™†¡g™7xš BÙ"å2a±v¤d*•Œ‹¬¡®w65Ss djZùkÛótŸ«¨_¦æUHâÆ`ʼ8Î9|í%x·ÊK%eb@Î¥žÊFë!wÒ®­:1zmG-YÖé4U™nö5͹]¿½.>¥;œ§G}=S<r‚ÞÎ8M6õ³çÚÐ2oŠ×z2±BÐãóÿ Ð^¸ª””dŽŽ|L „c +’&èÊ53ôLÊ4µ6(¿:„,c‰ø ººQîZ*àV PPæcKXÅÑSWëßLÂk÷Gµ&õ­ÕÙ®q…œšA0e¥Ü…\¡èª"d©I­JˆK1tÓQå¨Þ`–‚´¦@‹â’`áFéY”¶FèØÞl/Èû-«³ ¥Þzšõxˆ‰ÚTÆ*ûÕW$!6W®‡a‹üXÑoã£ûL.Un„»«|¥¶yÇ4(P,¿(„‚“R†çÕq{/i(þ!õS=]—‘|EÅ$&ÿÑU s-0ÈíßÒRŸËb (ÔOZb ¢$Œç’gÝ“‹âxC³dŠV~®Stë©Ï´Å RwúZbÑ­êøE;œ¡˜¯Mþ’LÉÍ`¤Ws˜­Tä˜LöY„yʆÔêJd°ñbÌ8¶ã‡VÑ…2¯ABž‚˜Low®¼ÅËïùgíÓ’æÿgÅ—“¬~jëÂ’WK”@§;‡|tˆ·#P³x¼Ä˜jOA(äâoÉï·t K€^I¬m.QMiȃšç½ˆòõÖýSwÉ3ùšÉV™ð¦¨¾))€ "Û¸9ÞAòû‹\•âКh·Ó—?HÌŒRÛdÊF)EPtz<î¶6ªaÞ¥]JI\iW[æPž‹¯”JÈfêR è@‚ÖDUk­V†DTÌ%fž÷(Ž%Ô†UÒÓÛÉ…í¶RI„!L“ A"túw/©´”mÎz®¥ GG: 6&³åýêjÛýä­Š"­#]£5ÓDË´Cs—5HÙaÄ3Q¥ÈÒ,¢<Å¡B&Y ˜Wºžïrí?ôd”Žb.e¹døÿö©ï*ÉI9HŠ¥*B8 AHÿ#«á¤CU^„'Në|MS„ ‰% nl}b©¥i pC]ïpÌ–k% èÚª¬¿‹%;‰¿-G¢éˆº#ŠøÆtz˜\d VC²3 ^ì¯EêDpJ4.Nõ_ŠjnSIÜå"#!ˆ0ppUøÜ+\¾æòâ/Õ)Òa²%Ðëm5Iz<ï´mmÆ»5wIB/9^Í¥ßiFDç=ŽôÖtI€£Ѫ*°Ù¨!x¾ídê&wUñt› %üÇduÌcnùrKÔ§&"þ¦Ç™bÙÒ21ÐCwöÚEy…ºÕ»13j¨(†#þoI[ÔÇí–bR‹;ŠäZäGcu:†ê•ýD[¡g‚òWr”~v*&9j[ÎÙ+¢ŒˆAÒ¤F?¶gì>-¢m_Þ&¾õKä=Ÿ _Ç9ê.ÀÈ´¨…%)+!I¬É«ýº%t˜Ø‚#öS´¦•¨êSކkˆ¸»"ÑÄ Ï0‘p-K.Ñæ™«¿Ê µN±ËAZ!ØQ*z«ü×½¦›àÇMúÆATµAt¿GÄ §RÇY“/ì§5daÈJL” ÜV‘{1_!:{‘Ï2 é‡ª)°!â%„aØøö#aQGªÙé=\F±HÏr)†åÜv©(^G`®Ö= ´ ¨’çc–Ö¢&î:yèן¹I˜‡d‰ D’xC“|B­C”B°v*D¿èìÂñ qr¨#È®t\µM¹/}7±‹íLn‹ß’q"ŽQä39œf-*{ ‹ÕFåM-1dL"ï#Õ¹HÄBϳ‡KïNô팓‹dæÚ±=w»e—±¬¾¤óa‘ž‰b‰Qˆ9†öÙÈ­y)~²³RÓ'©îájÖ»ÐlÂNɃ‚…N‰q‰ ”ˆ÷BÑY5ûÛ4‘pÔ ?µª5ô“±†b0€gu·gî´ET#äÉCcd“ü£ ýb³}e~ ²±„ âSeÖ»¹®“!Ì0PB—k2¾Iv>W7Õå}ä*o}\#® $‹úKj8[ßÉ…-ˆ#B…$Ìr!†ˆz!ˆ‡B©¬ìͨÄïbâþ›×=’Ì Ç'À8 0¸H¥|Z⃌ôH¸ AûóÃ%á*›Dij ìï—Eå>,ˆc(Æ]Nç+Щ2‘\'ãf ¸j1›Ò¬±Ñr”Ö #¦c#„:}—øug̬Õ6ª&a¼W" cX‚0ÂÔ«è…&BÒï çݸˆhbbRt«B£*eñŽ©ªÕjC@ÜNEFZ“(…Â"ÞB¹"‰ü…ˆ¨ŒˆÐÌÙ—nB»•¨Bø Æc1`Ö™1M»ò„Qræ`ÀLL};œŠƒ—”‘ Žkê1ÂïNÞN†„!* Lˆ U¢¾ATó"V*;Æa(ÐIs,ä9Øeéöˆ¦:©‚¦8”C@ÒÏÞ˜¬EˆJ éÆ(KgF 2%N*QBçBæ§™”&D$A¼¸°0SwîU(!ˆÙÞ¹¤tb˜ôVº J3.N1ØEŽ™DÈDQŽ#ŒÍÁ¢„äP‹ø/W:<$ì.Aa;5¡†h9‡©ËŒ±d1BFüÞXã‚>«Šd†twÈÓCÑ^:¨G2æTá0F БììŠ3Þ«áA>¤\†a% AЕ«Ô)# “Œî„‘…B‹\èv®C*55PÑBU2. EºìÊ4™°!„‚æsñËEÙHó•ñ‚kXçBÆ;w*ž‰Œ˜OA:!)Œ|ÝQR$„Q£ˆ)Vÿî|.Ulæã˜4yÅQª…+”CP΄."˜àG11šWåO”CåEˆ7b2F•оš]‚gG¾×GVñgj\ú“egÄr ·Ðg`2”ž ¢0Â6Ì¤Ö ^W±DY¸Ú·F|ÐÊEDw9±  njD$‚ø…*K!8C(؆Äû©¡…e•n3£ùMØa,äùÏ#†þ¨UGÈ HŒÇÜ‚°ËðFcÀø–¡D ª³3î­¼Üb›ÎÝÎD ®d²æÐÝTІlc0!cD´žÀ¥¢;SVÃ: œ«Äj§8à’©„ ¸¡tJb âûŒÇnd t”Ä£ªÁP I dèh7(¯ç§Våã¡Ë*b3G"90B‚Vf;ãÑ(„‰ÂìÄ@ÄŠ/¦ôCè8Ëè`ªtLcT=£NŒ Á”b€:ª¶ñZýœŒXñŽ£†R´à‹‚ç´0TÆe  Ë Ng0Á,q„^n! bAÚ‰ó°îžWq™Ê\ÌO0'S)Äc¢ºÒ(–1]€‹$EìL Ä‚‚8Ò!§¨"bˆN¹ÍD¸¹¸N%HpTd¼¡M”pÙYŒ¿Qh`ÍÑP€„Ç#qÊÇŒ¸1Dúë–ö1Bu5¼aPs@Òg ¤s HEÔ¦ …‹Õ§l?tLè ‘ö”È2"•ËÚ0dÎ0µ Ch øL³7W7ÜB§°ìâkˆŠ"·‘^þ|õFŸoÇ\R!Ž%ÉŠo²vžC3Œ–Sˆ—G⤔ìb;iõW\?‰½‘KbÏ…t…§#!m!›>®a™äKŸÛ¸ëb¦ùy5‹Øé¥½tF:o¬r2^CQ==ž„¥µ";׎©ºñU»-_0®©†-›¬£ŠýæÓ-Ùì5\67¡­…­Tº'éo^M% Ȳ“Öó«‚ír9ÏU™EûU·Ç#Vr‰šqXŸç7#·nÚÜV+TR&Û!z¢@¾j¾-^}BLÌ‹—ko ¯ëý›¾Ù™cÛŒEÞ•ÅÆ!‰ ‚:ÛÐìZ R­ÎÿÎfv[¦ÄL¤BJa‘?‰Å®i„»(©ªø•©¦Ô‡ÃMCÕ]¨ó3 _º‘»H±FY\BÇ&ªÐA“¥¡ˆõÉÈQ3{[›͸Åvá¾R± dí”%*œ^¹ˆ\ðE]T—¢ ·Ë¶_)jWÔ{ºë ´îpEÞ[µmQ‹Ûqzn6™å!RJNc­«„e²÷}Êvv°v^B×pA6¥š„#K%u0Y1¸z_”FZý•²ãy~¾ùPÁLBŠ„}†O%ª"ã£/¥7‹ô¡èJ5¿ZtÉ´ñ…&¥¨˜M·7ïŠ#)–Ï©j톡ܙÌ)oÕ Ñݵúz Ô|²a'3$&6ÜO$“ZªëÝaS>èAxR”—ã +«?#”vK··ú©:FóùŽvve·ÖŽ=æÛ,³RuzdÄmÚ™kÂj?ˆý×) “¢Ø‹0¥¥ò¯¾wBÛEB caf;$›ž ŽÝÈté”&sœ–²…t2UXέÎSá>Ïj”ýÓ)ÿœz5Ùá0áLN©™ˆGùä¡$ÂãfÌÆeˆiLÌäVzÌïˆÎ!U\…ç;j䄲=ܪÖZÒnú„ûn¹~ü)ÌOJ+eÈs!ó[£:yL¬¢îËFsÿP¦_¦úÑ(ùÍ®ó5¾´:õ袉ìÌ›P†¾$¥UT)LsQn%æZù~e_YȧÅÅó¸‚üJrŸðŸ¹žŒÖ•2U[_+‡‰mã(ô*'ô¡Rr‘–ñPïc×63s;ÒÅB6eÇe]rÙßþ´’´ ˜/e‚e[Ud¥§¹:¼U;qE#1NåÛ¯º“»Ïƒ/—Ê" 'åUÞl?}¿øâ¡ïO(ûo!UˆOªC¸¥£g8‹\ê­ÚŒ›…³ Âë™Mÿ¢6s—Ïä1ŒãËöÁñôƒjö³Y$›Î¬3ÎÊ—Â.Õ‚= b1b ÊRÑlVcýÚ‘÷´°õqrÕAÏ›ÉR­¤7 É¥Ê×9òeK0ÆJÐ"ùrŠfÔ.‹jkº«ä£f§5rTvkŸ=<§ ž§†Æ˜U'Y±bú”d¾Œe$”iqä Nûk‰)~›æža ʆ[áh‹óu…¥îR ¥;4Œ"­hc´ÒнVËW3JÅaLÈe0™Sñ¤ËÞ’àª<³J—{q;Ôí¼ß™áÎZ´‚£­ 1ÐÙwñHWªuÄ·ÝLÑ©þšCæs‹ÿ6r×;ÿd@¤&Èâ{9Ôs°üÄÿøÉ¨Äºð|—¹ ÛrxÂj"2éŽ;‰ª'•`縵t¹®¥æ–áò³Ø/àÅG%B*Ÿóu¿ì"si{?L"òÓƒ³·Q¤ WZ›Ù8jS=SŠoIY\«e«J¦aͺ\o¡Å\„ ø¬EÊRXóòJº¿ÕL„,ae#S–:ÝI2¥ÑÕg°‹¬jçøô ê’cá«5(—Rí–*8Vðº:DyD¿õ Ø×,üd‰¨Õ­? K¦ØÍR ‰1‡]žÅ3îPâw)ݦ%È‹NQ.ø™B:WX›'ó)ç1Ϫ@V°ã…zK¥+µJ²ü•-rJfˆW§«D£SZÛzñæ,qÈ`“ö•¥jÔŸûL‚®ºvæŒîu”êÔÖÔ·JYKËëÛ®R1SKQìš3rÍl/ÙJGj¬¬umâ³ Ÿñb\‘ÜN|¡AÉf'{´æá›_zW×sôJ%’Ò‚´ËM-)| iræ\eÍtOß×4ìâŽ0‰ %.)¢Î$Ž©W I¶ÅM ‡4ÂÈÆ) ‡¡Ir’‡ÁßXi™°š+¸˜B{o51žòtš5=P{ˆOpÈS™|ŒôN&ÕRsQ5WQºBæ¿{É}ö¨žÆ[]E( ‰P“åÊÌG-?ÑûPܸbØ‹a+ËfÅTνWêÕ,¬’ƒ15Úe'î’ÏÚï=q Gy’ƒNY¹]âù¹³ä%ˆAq‰w1ÈÏZØ»ö¤£Ù^ËyÛ>)$sC<—®ÒQl‰ ºEqÞÉ=?̆R[+é/ë"˜!jeÉVìœØªµÿ5v¥N1˜‚žRj„¨ükqþÃY¤S+Þèbº# š%$%Vˆ%uu(èQPÊ’¥ á…ãôj9oL¥j™Ân¾Áo_…Z'‘3´DþZ2=ˆ´-ÊôMŽ®”¢˜»²D”eÆ’ªCâIx+QŽTªLÂ"ä8‚b¶·'¡g›LZ³Õ©e¥f–øfµ“%*AÜâ™\±”ÒØ‹/z ×ëž­¬(¨M"¬ÛHŒ–b ¿ ß;3ûÙM;ÈZyòýúñNÜ]«ýi¥‘éÅâQWæYLÐ(a.НÏs^•Ǿ¥v´+“1¦<¬)Ó‘‰Å¨¶%œÔyåXÇC—EÔ áTewi» Åä]Å\ÓΑWúô‰4jœf&|¾-'UÓ.˜¸ß-Zèc¸Œâ”gÜ"'¢‘«OÖzûeG½îDª\Š]fÂòˆ#ÔÞ©èô:ZFr9B95¨ï·óÖ.*¬J+òq#”U-…S¤­¤bqÒ8òš¼/ȳ¼jV³rÌÉäëi³O‡-Û©v•&ú²’Ûc66·´EUnNãÔÛ6³L~%Õ„ ‚‚…>,£•©—V¥¿›*¨N¢Ü[úªÒ$§¡·^ŽNnÌTS„ ½Kœ‡Ê"áç+Õ-ÿ¦*'Åkxº%O!…¢RäjQ’æßVc5¶6›Õ±ldWÜ)#¶!hÜ–iH¤Jt×+(Œ)-¶Y¨™ÅÂÒÕv‘v¬VIÎ…ÚÜA<¸—½ºÓUáyZ(¥Å«{‘~A®6 †<âež‹˜+´©UìÙŸÑ„uyjZRœz¿æÞ:úU…Atë ·Rœƒ Vâ§±ÓUþ×%r¨wÆ"J ¥ª”$¼ÖD¥MÇÊQØ„J’¦ìÒˆ‚Ó²ü]«ÐÿJájúžËî:2èQ £ÂŠ4nR<žRÔ¶§meB—è9Á¨›j/iŒÄ_J™LWÿ“9wˆÌìR”¹‰@Mßp×I‰¦!ê§[){5êÆ\&¦*Ì÷&ˆWv¨Fд;§Òæ2MéuijT—¿ÎU©ÜW¬•¶ÒÞ^$µÑ lÄzÑò½K º«R ©Va›Ð©æ© :¶øÉGS#žº™ÈÔi)É ¼‚ÈL¾ž‚šÝõ\–a‹~8AÒ´09Ö„r úÑ\²‘|"Œf‘ ~¦¤»îÚ'ÈeÂû´VÒâçä×):R&ëù܆”b-T™„Q] OKiKê(ÚmÌFÓ¼Ô> mµM—ÕÑ=16B‘§Êø´KVy 1ЮaxDŒ!g;qƒ¶ÊÛx’§E‹¶®/am{už»×O®•Þ™ §0­8¤Oõm#8§s¡ÆSÆ´„•­vìoÅ£nÏFÙ1×íþT—t‡ËlÎ…Ie|ZÐÉÆEtîJ¸¡ž™gÑ–Dû·k6I^»m ¾¼êT’†Õs‰e×z9ŠWú •÷ÜGÁÓ%,B(¶çt¦ ªVJ^y6‡ÍW^l-v„‰÷© Å©™v¢¨ˆÏIÒÎj®´¯¨Î©†]>ûó$ŸA_‡Ã·Íâô‰2™ñÑø×Å©ˆðcK«P¾åbÈD°þƒîïEõZ[ÅVo¶ù[ Z‘>¢ó–SÓõå]©žQlæ[PKLuÑP¬DM:UGóÒb¨–²T”F+ظJÞØ%†˜ôá{ÉF3ùg±}”R˜¥BYèâ3a,0Œm,¤$ÅÞtÉïT½.y(<¤ÃWjF^í\ú±¹°©edN¢ë/DC¼¥L•+•KëæáC•<Ʀúy¿ ˜oËÊÈÒÒç£ËÔºËÄô'yBZëŒçVó"R¤S!ÎUѹH’¢•ìdºL»”ÍÝÌ‹ŠE±vy¾Ù]¿S]›¸MÖQêÒ&" !Æ Ü!F×b”G¡Òã™müW&ÿ—²¾Mnt#Ïüâá1D.móºÎÌX®®vº?¨ä"ï³–ðŠd$Ä2=ŠÊíÉzç+·å%*6Z™% üµvt#±;»6νžÖ*J]œ¦Ob&YH£!ID]Ù–OL½döEveé&›Ï%76Ö'¢U=j›šMŽ“S1‘êTJÆI’¤C‰ÅuäVö#mq—××n56Ø­TLß/ªé–±*¹hAìÔzQ0æQR*yq¥rÞ…9~Ѱ˜Ñ4™!*%{núLÓ«ÄöÕKuNü¤1ŽEÕ´®ÔFÑ™Tœ¼²9*WÑÛjs§æ6J&ô˜.çQpšy˜vÁl‚;ñÈî"˜B›4ƬÌA”ç»”RÓ<‹ˆõ/R´ï¯J'=õ™w¾‰Ô/qfB:§ùH3 LIÂe|õe±y°)…g-ËmÚd(Ô\]Ë‹ÕßdxØ~bùhQ8Y[ØJÿ^W)B Åjèƒ ËÞ# UG#‰FŠ—%ok<Š6<—.—ö»}'ÐúEe*¼Å©(Ã%%=&F ´=ó,…(⎻º_){Ê\}N&~¼õ®«šë¦ÁìòÔûv¹ì1’ëí ÎU2fÆK'0„wÙ=Óˆ™CóWi¤®&^”ßVñ“ØsWÉCШwEU(†%18Sˆó;rî½J‹„wÈ*r¥F›åÚ‹ÔÚ1WðZ´½qºg+•Nç¤OQC8§¢T®S¼¬!ˆÚ›–"¯§§m¼ÕL4ž_ª]O»Ä`Ÿ/臣{P*Jù†UŠDÄga^ûƒˆ"VÆuz=õpAèE! w›¹î·Ú Q{¼Q”Èï|ý¦ûDw;»c­ØôJÈTB«œÇ²Wòbx—c9 2} †y8^½ªG¤¸è|¯V¿oaxŒÕäTÎaA\b¯"§È"HW0ÆvË#í?Íí¥Û…šÓî*:·òÔåÁúLßœ»Ž‡*:Fò1B˜…dSؼ„¢¯*%Û3ßRJªmü–¢ËÅV²'³uT›œ×T]ºyPÞ!Fg,{/§o*ç9È·kVÄÞö›£DßÌÅÇþôù$ô¯ž‡ks¥ÖVFV)ÔBÏA:‘9œ‰÷SæÜ´ZzÅÞ·ü™£\nj“¢ÒF!¿0l$‚³A—%OCìŽeYв”³û¨‘°åo=ÑõÞ1´Ï¨Åë}+Â~Dc%ÌL¯}ݬËÊr!nøœã°…ц^:ÈFÔºt¶!JÆss Âoš±hôBó×ÇÇó ?Ö¾éBЦJzDN)2öŠ÷{•=‡r37¥s—ë\r{fe*µÒÖ¿Ö©ídıøÈ“¬ªs±hTb¾‘j…¼Cre[láÿøÉˆÄ»xLùFø4÷Á÷Îø-øµùL´"ÔA¬Ïüç¹ ü(f®´\¢]£¹DC}ÁÌ)ô»˜\¦~ñ*Žäâ[®›O‰_­~”ÒT9ƒ§(¢2*Òݪ¥“» ýùnr¶!Æ8×c¥#’ßJ²‹¶Õ-©J.—ŠWLÚË\—›½”™˜¥œÄBv½)Œ˜•(Tˆ£Š¦0©»Û½[å6\ÊrNWwK4®¤)„)°úCdÞ¾Yaå’@æcå!Œ"Trç rPJj'©¢«©}låw²af„µtîO1O¤•ñ<æUG^£TFbTå;ˆýÆ¡ÓSÑí'qù.2^IeL*'²Ù´œ´8އQö»"…õR1¼Õ:Y¯‚^”KugÌTQ 3™¬+Ù‚E½œÏ™½JÑqn1‹×¿Ióh_ï§JÈdYY6×R0Œw <˘C˜±­É„nw•äRmIuåEÚ^w(Ä9G%?ÿ‰ŒJ¥Ì”\býx¤Ãþõ?y“HUÐÎÊL™˜ê`‡13]È\^émFrá,½G«‰ž¸½M$òY ¸"”¨£¸bÍCãRÊŸ$œÙÕoÃ'yÙÄvF£é’î† *•j”ý£gaf©sHvE64¿]2-9äá”J똳OimT‘$²ÊWAœ+è­æÄA4½QoĘ„ qÝ3(u'’‡.1¸•Nby´º— L—¹j¸Èc#•pfÂ5³æ.½Å!UùèI>–!›ME¨!ÌTq›—?„Ú~ªLËüK”QY%R×ðMÝOý°úB ”jöUJ¢ö!ƒE¶zT÷Íâ! ˜ÔLÞÒ¢š¿»,”{¢•‘HPŽ`„*Ú¾a·}Zq8¸;™ !ðY¹mÄÅÂb#©ŽæZ7U¦dæPˆD÷¡ÈÛÔ÷S#P©C3¼&=û1_ƒƒ‚”ÂS•ˆ,’z\÷î£ #_¬:ÁApᨄœ*‰F|IàZ(¨ g$)¡V/'*$!HØ&±²À»`FÞRBC•<*H ª9¤ª‡Q fBG§ vn$@çLÆ}KØŠh"1ŽƒC4$éø#ŒÐ„ôœFö˜ú_Ü/Œ"†)Œ(•Á¨Å(r‹*‚S•ÄᬈU) XÒK Ô&ÄÌ¡"1ŒdÈÃþ„<ÿF†XÈ„ÅÇp9BƒˆQ?ÇŒéˆ0 Ã`•m¡Fb †ýшŠð=R¦ÆÉ¨Vëš´ôjl™¹9›·_M6 ˜Üc¤2”Guï}ˆÐEplLŒ‘³W UÕáÕqq MÔB‰ÆŒá1ÃÄÄ/PÄVM› ”’ ªe€¨¨cŸ(Åg"H”J‚JVí«`…G5SÅ·I(º• ÜŠ°Î›´D4gAÈSò Ó0gè"ܘë„BpYÎÖu„X%K†0”ÖÝÊ3c…WXB²h&b’üÈŽ6:<(¥RÀoI‚êLGµY2,qƒô<¦¼áFQ¢Ä LzèLôó}yÑ92 n!!Zc’/.>|h£ª» Ä„ÄEn‚,ÍÆWaT3ÆB`†±`™T:ûΡQФÁ™‚)ÃNŽ‚v+´74‚´ÂÕ¬å£/¬®C¨B;"r¼´“eÊhŒbäŠ2¹}:™Z”’‚‘œŽSƒ‚†,%'òîåãÞKðŠêBê) õ'&/XdÄ<žRáhf‹+’¢H1׌j‘’Iµ‘—•©¹´~{(‰Y2¬¬ÔUµ3ÈA<<,`0‰%è·šzß Ê¸¹ª†xH’L9Ðödo$º‹!þŠå;%\RQÎb9^™©ÒeK¨ûïL:œÛ¸Nÿ£ÿ²?Ìà¯íßõ«ú/üÉ´ Õð÷ȈÔY`N#ˆgxKúC„™cêœÄbÑ—Œô™\ÄADÂPEJ?4ˆ H™°Ä&`ݺx™ÔçÓõ:ŠV°9œ íLåC Á €ÂÓMØÃ< Ì2QÞôÜ Ê,ŒŠ+¹4dRŸ )‚⌠!8HhÇãŒb9 ÄÛP%Ãù pDXPD'S?HAœäK:¢Wêr>Ÿ&fˆJo¨50“Æ\ÄAŒQ‚7#Èw•èQÌÇ=uçr¥s±öA"6Ç6¢0B „PE¬±0`‰ƒ ´pŠú" zÅå C >!ÏBœN«y…R‚HÀ3f;Uƒ °!"“†.q‚}4ÊÎ9;ƒj‰”›éÈt¤ä râ CK*ºtePcÝ8dÑG »AF¡¹1ˆXÒ Ã¨*Ü92Žz£8õQl 7 ‘8‰ø1ÔAøÁ¡ ˆ Hh‡qPnîp‡+nÊvSÁaÎC*w1ˆHBóꙜŒ‡¬DÔB$ôcÓ#R*c#R“¨”’säs.,ýÔ¢nTœ…’>Ãw"œFp†…4y Dá™wIQôG¥8Cª×ÇVµ_Á}ª€g „!LL £!`Œ¨é„ظÄ‘cVúŠ\?qwÅ  ‰JôÕú¬8 ÄY@˜fv„fæ†LgyŠ@jnr£ˆÏÇ“ˆ8õ\la ¹L‰5Æ“Ht„œÖRÑ`D™\"%Kêb`˜€”T™¹+¬ðvPráa9Ð;œØôµbùœà€C1»5€Aˆ+ô0•”`Â!ÇâûÕÎùòÎe)Ç…) D†TH‚Œ6g:9 ›4 †(Ç9 ñ0‰ –‰DaRæu”üNXô!|I1IªÃgá5f&ìÂ`“›!ÃbF&ìD!ÍK!ÈáJ sUn ê¯õJÕôÁì>2c)†¢¨Û0Äd3l!ûn7 ACÑâ‘ÈPH6œf9ÓOHw°ÊŠc*+Æ•8•‘ ›[PL#&ß’S+ 5§CìÆdýTÈ£Uÿ‘OŽ©Æä«ù F¼„9¯{‚@‰Ú(Ýê\Rª¶8ÑÒáÜ#„¤ê=N"!˜ÆAˆèx1°£DÓ•Æñê‡ð£‡rœŒ¥+® œóŠˆáq`ƒ!‡ è2bmD-Ä„¥1Ø'2Þìd ð0æZD7 ׿×Kªåš±n(¤=„ƒ<ÑÂ%3œ”4‚Ø`‰_š#8ËQÜsŸN¼²Ö™CîeE¼)„Ì2B)£t ˆmøAD¡„ðŽfÉ\üoè°Û·µfñBŠb‹& k“ü’ Šˆ˜vA K"°g#agFì†À”a „£RÁL•Ÿx!õ.Œ;ŠaWC£v\B@@HÊ:ÎQbSJ1¤¹ÅÐV²‡;] ô¢ ß½Á0ÆQQ„á811ñB#éDHÁÄÌØx§–V±+¸51O—¸—9„Û^¤ Â0ðF œV«Ï%GÈE(ŒÀ˜0 Ô„´fÂ2ª%øV¢‹0°ÆZ)ÎCCRåÆ ‹yE"…§è'Ãf¬áp~¬êBT¶\ã8ÂH|eÊNF 'a‡¤Š^U¢Väâ0Ä Ût.øÍ§BÀ ʪ)hžõtD„g0œ‘V°¤YÔ6Q‹)„‹‹ÛiBÞX0ç3”j÷Ô$‚ä S‚ MhÀN…j‚6`Ðn ¶(œ ÎnU-"‘aIC¨_âQVŽ` ªÂ¥X—" Ìtx+”c*&´kŒθ —‚a‰ƒ"dr3,‰ø¥%7!x½Î~,NG€ÊL „ Tp–ªq˜4Rïæ*)šB…ýtÌJȤP©ÆÈFÔB‘Ä8T*BGÀj ³g@­]²-Þ(Ä‚räâ99NÅ!ˆˆxÜCÏ–`E®R‡dº[‰ìú /8Æ!\ÂCq Á‚C8AâÊÐ!.´7DAHîúºÈR8…tfŒ##TVò pÈÀF9ƒG+‘4+ýAB^RB)Õc ÔÌQ¥b”‚ ”B™:Z…AX´ƒ ñb榬,á.# à WU&¢Ð!?'(szÔ!ŠFwQh`Šdû9âì œJ}­@ hn3—¥WÉN'¥8Uf79IL¦>´Ã›*¢M„ ˆ ¤‹%sJ ¢:ŒV瀼ª ˆQÓ ¥á`êT ‘‡ %Ú=‡CÓæŒ“S u[Ö4ÍäÙF13Û(î)8¾°Ìç ¢:H”ùzPK˜¹ÑÉ0‡å ]! °S&˜ƒ3ºsB0êC8²ª0î§ ÝšD!ZÈ¥ˆ¨0寷ÅX&AŒ…—±È\l2Є) aBTÅBö Ãh”b±^©È,bˆ•Gé(aÈ,b!NgA“ØÅìv™ VÓ£# †#‰Çâ$Te„8¸FŸаN+ºØÆj1njV Žƒ„‚i0R´^Dn„̪d׈Ff 6ƈю)š …§Òr&JçP°ŠÑ‘ ½ŒèFˆ†P’Be ÈŤx`!êÓ¡Ã{ "XWf7ˆ1‰ôj›/†ÅÂÃÒä(¢^³^âc™Lެ_ƒ\j Y‘PjYQ¡›  )‹¹ƒÆAFA`7¾DAEdBÔ}¡:’ä©c˜÷ˆ/b* ÅeÂá’¥G"¢Òâg èC8F>Ebfa²«gcŒ¢}³•)YÈ V÷s7$TèA7A¢†h¥D•ÈÂâ'*WN Ì|¤Ç‡ïZI˜Q¾v¤ 4n2„!3.¥&•›ÿøÉ˜Ä¼ÏNþ¤?fß­¿ØOîÏù_ýÁ´e: ùs GÏK‡h&nÅ„*XùL¿@ÅAM'|ºôTÇâ:·ÅLÿÍiDíæ¸7A"U9P„!A?&XAçŒSttª…é锄DCvR±Ù™ 60Ê£8¦: &„:™ßA¶ÞÞ7 ~˜XlŒŒÞ..&v÷n%Br—… Iƪ#ÚhJ! (Õ¡Œ¶µñ…Â/а®Çñd¸±3‘¢™ C4•í„0‡ú`NA¡«Œ‚èó(ÙÄ4‰ê¹S}˜Éð…þ*ta5%+ˆ¶P ¼j‰XË™j¦ÎfÑ9ÉÎÏ&æÓNAYU+•5aÁ9–eb¤!ÐÌûXv7d`Gã3öcËW4f%$öiRãÈ;rc´_êzÈëb2J ƒŒaØÇ!Æ5åi`!— ΚI^òÞ艭)rŒF#P‰ X'0ŒK›]<Øç?Ó#´[Ù¼½ Œ¹[Åêà˜¤WwV7”GD4þ¨è2R:#2P“†¦FRF8N³éD$ËNŠæ:Çð+˜ªE”¨ˆ½tU 4â'10„¥%à˜ÓF4dõ”…(Nbµŭ R.1m„z ÕóK1Ù1”dåAaŠ„3ÌÐâq¦¨s!aö©ØrJS~§¬zá!8ƶŠDfE žzU"Š‘ç¨¤q3!0‹Ž£èvfŠ>(ZÊÆ’ˆ¬b¦CÓv!²d i‘7#qÏÈ¢„‘Æãþ²\E!€G¦{”ep׬t*ºˆ^M âÜ5 Ëzœ@Ù™â¦bbq¤¡;º‚C+ ê;ãÁ›M«vóãa‰ÃN1¦ÈT ²o¸ùá„!ü #¬ ¤6Aj¸TÁ“ ¡8À„DjJd[΄1B»ª ‡ £ûä* ©Îgswûó¨b Æû=ôŠCT3˜h`e"—÷q7&l ¤"ŽZ´j5bŽiÚz?®õA $x*#s#)Á˜†vÞÖ1 Ô…$Rì2%9mS ×-~cø¥G r‹íCñEt&`#!ЏT|ÄFßvŽM© N¬®t±ˆæÄg's¶l×Ò”ÉÆÊZ/$^Ž ‚ÁZŽÊØBÕ0Œeä;zf R ¸‘ˆÑ%ç³¾ÜcÝ;a3‚œG)T¬ l@ÔˆäŽÁG\?Eûè!Q\]Éäa]a¡ŒoDQQ:±Œ†êÎAÔÆ|'%ˆ- :¨~‰™Ä̸!®T(öšvHr™PäÅ}ü“¿Å¬h ÝFP¨ªÉðÆ1´ˆæ+^ õH¼FÄbjN :j pCF–‰ @ŽÄUJUê2ÌaÒC£º}Uªrv!¹Égá›!B4j@C„¢YMÕ(Y `ƒî)é…¸µÎˆêϵ¨sb„£bU/Þ ãJD5¬R4|‚ª82ˆf^ËÔ4â!#š±H"ÀÍg3ÅeE3åêi†:ð‰\9¬¡»Â7†c,LS¤!ú†­Äð<…= ¯œöRgG)Ò™y¡6eœÎÈ#CS%c*(FF”aÛGÚÙŽA %/Œ¦D¨µ'„d%†­BÍG‡(Hȵ’¶BÀ¡4¡X¹Q¬…pÜò¹NrDjd8¬¼E1“Ò=PcKq<€nDOØ¢60Ôæ(Ay WÍ!*»ª:Ò} ÆŽs ùDn™P”ØÂ)>‹†ùÌ£riÎH¥¨0³3”¢Gà…c0æß†ÆQ20Ô„1ÛêŒ~œ´<"y¸…ÂV-)Ÿ™Ø#âvL@‹AªÜ‹Â 6œƒMÓ™vèJzň‰KDÙÑ8̰E¥ØVA7ƒ»©`|©@Ç7$5ÉPÁÖ'Õ‘Â Œ$ìEGqÏODPL¯‹-«»líTr-Äõ(™0)BHü¢û)˜”ìzjš‚, QDR ñކH*âñ#¼n /“ àÂäˆa11dzƒ7 ØÌ*,»NÆ:1;¶U(\DÿBCÁÇÈ&Ùbf CaNΊ@ׄ`DÁÈÄ·†7Xÿ81Xçj£@ýñ¬ä!Úö5’®!•P¦I•µ"¨¥30C>x fx†è¥c(˜È6HNZ'ê(ÄfQlI{ðìDOé\ÏbÓ,\ÂB$c#ûF'uUßžr« †/&b1×`ÆDk9ªä ÉÇ™ÉpÞe-µÊ¤dbª ¹¤TFP‚d@¤ À•`Œ Á…ÁHbÄE\O˸ca/e夯$*Gq‚QÅ5FàôñŽj‚PDƒº1—¼fÄñ™ ‰™„1Gâ=1ÜÙ„{ Ä-GÞæwqH‰¡ 0ÕG³Q˜Ãá ÍmÄE?Kˆ<I¨˜ª„Q 8QÆáxºl?ÇPÈè§PB0úæÍ“ˆgîÉPcTž ª‚ C':¹É“+æ@3‡ò¶‡Gó•LeØ0Õ%Q)µ @dˆ‹Ä$¾ a(©‰„EjldŠÚÈ(•QV*ì q\•GÙvr„Uü0ÈA–RQPüÁ@ȃXî¦_u ÉõtLÇ9H@ ™]Û2î9¹ùu Ю¤BAûW#© 1šw?7W¬0B&…§Rˆ ˰b;S˜ÐÒ:îbòÑš%fœƒ KòŽÎ"B3 Tð#w ·½üAÂ8†c›œxr2ðÜ &¡JnUGe2Ô‚jÈØH®âŠ•©ªQ´S°ÊÓ|1(" Žl!ÊÎÂOŠts¥„j…ª:€U¨äEë`BaÕ±‰æBrÛ Ã`gBŽQ‘‹s!8£QFíc@Š+º1˜ÓtœÓfLŠœ0 Ô†tpÙg%«mE¾¯éq¾ó`$ ñþŽAC{ç„tí×é6J—ꜜEÓRTÒ]û+”.#Ùé(³ cKtêÉó5‹‚<¯%Éx à(°lŽ1WF—0¼²Å4CªÂy*‚ý`É¥«d•yo½£þ‹¸„ñ©sLO*5•nöo*.Œ¤-Q(o'j£‰É*Ò®Þ‹!-Èš–Sgé[HÌN²_KUö±åXïA ÆóóV¦µvB{ö—d)ÛCèfôFóä‚FQ›JÉÖZaè×’¿ù¤Ä”–]!vÃÞ͇.LX@áò@¢—š¢Ë”µÄ”»”%² ý©_ä¨Ýäg¡J3,CÞ˜*ªIÖ„oJT6m›Sê)=MWGãµ’æ*³ü'ΛQ¬2ÂAIr³ÞS[3~Øø?å{q0QU–Ü5 ¹=ÄÅ *5hÄ·xåz´Â8Æ‘(Ým•ñE«o½ÖØÌÅyèL¤j ájÇs˜ cŒ†Jo¥z7•ÖHŠ©é[úC§ö!_ìÇabêZB$¦ø©B0®·'¡ßÂ]:Dr&NÛ,#«ZþnB~-Yå +˜Ã…pKÐ÷ñjå™(·_ÚXzGžåOµ,SÝerJ–M©¦¥!Ý:*j’V„æÃP¿Õx™ÛÄ­ ‡YP¯YwˆO5aX0áLŠä;'mšz )ºÙkÊB’G$Ã凶&gÙEv»”:Õb°ª®EA‚d×Zc§yfºwm+û¨Šôá)ZÑ ÕB(࣎´±{¤•¯Ö–ʳ¤!Ü¥/›W„YÒVÊÝŒ„ÖKUÑ "½×,iK¦~ž——+·~Î)Ù®¥ñ&tô‘*ÒåɆ|¡#´àƒ†s¯Í`ÂS«cÉ!¬ª´º¯R¶!+Äõ?/â.9–ˆLù–˜Ž1Ù´¤• ‡¯5.ø"™Çün|ñSOx´ëµÈßQŽQ £„*uc˜¹«ÃQÒÝF8&beÃd²ÓÔé4¨åêiÙ­êe!p¨®Í9E'e6ÓiÞÒÉ%]e>Ê,¦Äã;÷r6ÙÊ!Ä ©J0Crp†¹8åëµ-°¶® zu¨ ÜMO{³-Ýfj¨„ Å•¥"ÕZÕ-£Ç¬á›ƒØ8‹ˆL1¦cÔJ ËÍ^ÑËU‰GsjÑÎJ޸ʂão> Äܵ®È{?«’Žxˆç,EªZw£ ´t!g@¤v)äL²w¢®åCH6¾oEj¸¥ÙkŒýÇ3gÆk¸ ¦^œÉMÂ`ñ´È"ZÈ›Eý>kÙ9vÂP ˆ–=}–V˜FR¸‚ +=¥.'}ÍSj­ˆmÅíÎ!ü U)öv aX*ÃŽCF«³Ë#æI‰¡-Êœ_™¼æ²çPºb`…Œz¦«$©TÜõtqýºÍz§zäL6îyt«æ$a¹jˆ´fë AQ…•ç!ƒa+µÂ!:Ïι#¢’{w}8bå—1vffiN™0…T[¯#·x”UŒJ—>/ÆãXºÂª¦99e— Æû:)EAHæ³÷¦~m޾‹3ÙAîôü\B^·£HÆGì9vRºPDjóû %n”M :˜cÚö˜„sÔua¥¦X˜>›h¨;ÎÈÁ½kÆÍÒU¢›ÖϨ{ wûIO]íùÉdd©_yD)Ä#"GˆÜ¨ÙA0åš,.ÅR²R—ˆ—d|¦wqÒÄ p`@”Ò{u4÷Ê¥kizE‘sþ½äÔJ?\þ¨tÇqRvƒ‘yÇK'¬=H»¸ÒרgcÑ¢%TüÁ,„Ûíè’  á•#2 m5Ûho]³WËT…›X¥ÊxŠuŽ!‹~”F“ZÄ-I(Ïa¦Ø·•œƒT‹3% ÄÙ×R8A §:ø[äYâh¥TÓ!Ü(£±wVž›}óåö"ÿ’ÊÓs{¼¶WL*“w(•æA„K©B1ŠÌdÂl¤IZI‡ôÄUÃ5Øköüíÿ´d1Ô Š4Ò0!å-â‰dàȊјOÒ[`™]ºŸý¦l!ß—HfBPˆTŠU†8„ÃÝë•ÙÅÍ?…ÔiQúôuè½jqõ~BdQ•A• âáMÅ5“j¹÷ýóïKTÏ!E&l…1¶^HF#ÌF÷]Ka‰FږɲÞÝÉØæ" Ýa¤·É.î–Wf `RË*-14Ö©*ô}2%sòrùäÃ9\2TK±’Zy†á´ÉÍñNu¼BHû¦ÃËä"qpnC¾­¦h¦S ÊnËgû’Q„Ì ª|¢á#T¼«d!ì­È7ºÞÇì^Jq$$’Ƚ.3*Q5$@©qÎ!ëîYjMbÙ1‡-—Ù|õP,|Üü‹¤$­r°¬`¥q~õ+æÑôËæ.53¶ÓK÷a[Tƒ—6J52ºbÑL`¨:ªèÌ}£YZŠžÚmûQ}—V¤.¥jmãa½ŽD¡”pP¢;M+Åê—ÅöQ[óîÂÚ€^·Ùh–‘–qp¢c–K‰"H[(9ÐTõ+ðLCÒÛâºv£ërUûlÄd:‘²pò­,§Œ¨ð¬|˜SÔjÕñ‘¸`Þ56» fò’9&b¶au¥uÒ©…"L¶;”)Gé<ž…+Ê&ÎZ‹DB*“Î-mµ „S,D¹]D!ÈLÆRwò +ÿøÉˆÄ½jN:º<§îÿ þ8³’ïßÂr°Ã{€ }D¶µ9j¼¨RU}ù›˜âQ|w¦xÙŽµòB;/Eºw™^×ÌjédJÖ|ŠˆÒñM¯0ë+˜3[áòd˜¥Ç]bÝ>"åDÇ®"Ñ«zÛRÕ¹©"솪¡˜À¬1;zTsŒwÿ›SºN´G/‰“Rêñ^¬Ùͯ¼w0qJq+â¹R[ª~r6¶.oç¼ü¨[#û$EÂVÍ)Èa G"+¡Nu"òT£–Ô–¿½.1Ü'Ö¸\Ö:b–ÄÕÇ3g r6I(Äp”"t–ª]iŠ{L¸­a¼œBÊÓ"Õt„F Llf£DLgüÿdœê•ŸMáf± ¦§õ A‡ÛX¬7å Q¿úè`Ee+ú¥ ÊJ§ï­ßØ‚“‹¬œ7%TRÄ'ò<Øöص+¤™ŠÄzÐü”¤@¥ñlEÏ CªbÕÉžˆLk¢˜Æ²P«"Næ1ɉíªÜÜʶ£¹½eîªN¾}Pµ¥Æ«*eìÄC)]ÆT¢øA‚ rxýòpÔQ©¤¡¿yò½èb·n¬Êõó⃠X‘lTTmò&wÔg- ·Ÿ0´jqs{[NÌÎtt3Tg"•µŒÖQ¦‰RÒ/åÂ8My ÒQJJ7ü®¹Üü3)ÃN¬†e¬ÆD½¿þì¨F&Òu%¡%w¿Ðëfã5ÙܽëµâZºÜ|ÁÕéôu óÚUÙ0a„,ÞZ–×!‰Œw¨wOÙ5¶¦¥6”äßK›ÍØÌƒ1““\…Õ<©éùˆ‹GR]PÈ!˜¬"‰5Uª4¨Í3gÏ¥‘4ƒXÿkäÚ!‚ùnŒ‰lŽS$bŽRÓE\z%´*뤡±¿Y0«DÁ 3H*¥0¨bSRι[’ÍZSO‹Ü&!térÛ·ôª*¦°º†™Î8†Rpš1Žd»J [s¥‚Ö³¹~ôà D˵۸댥ÃS Åõa¾I)ƒT¤=:§µíTÄåN/–â¨2é‹ÞÝcŠ’“š´[¦zJÞ}›{̾ô©ð‚/#¬¢edIFæ2¢½S#˜‰'bzŸVœ¤õË'Û=,é#f5ÈÅß¾¯Y ÄÛ•5ÎF2õO‘n‡bŠCn?.Qtî5º’T¶ …e:.#ç·{y×pˆVb2{á“ÇÑÚm^¯æJ¹¬=3î#Ê#‘ÿ´ˆ„ªN³ó˜T˪zŽZ®º‰ÂIcNDn/rõDs²èÅ.ó«·3ÉBµúü•µØ#þÍJ6œÎB’ïF‘¥(!ptz,)H_~Æ«k‹q)ÿän E¦õqûÈ«\÷ªñRQÇd•gôÜ1ý­‚¶¨ÔÍ÷"òe·1j!ÊìOZÊí·a4L·7B5WæE^;ൖJ¹8Z’–$E¢(rµ_(ªf1b»7 îRä¿øõƳÙ(Cs©!vNbs눻ÛZ1©Œ²r²ÞŠDb©”+[VˆÙ¶# ‡Cjdí†N½uÊýl)y9*„_'X—}m)fAHGj%ÉQI«µ\[ýu4Ź ;·1\‹ÈÈ|§$ʘ9ØíGºþ%–ùÕôÞnïÌ\šj%Ñ “)LC‡*XT Ÿ‡;¯²q·6»f;Xz¦çà½náëRÊ&Ééƒ6ˆôçºiœ£¦ˆÐTôyzÓ^Æ«÷¤U8‹aô©rYN: Ò„ J1ÔœøµÃHª¦Ò1ÿMQ-bø•¯åÚ!'FÇ¡ We ±2¸2H]lúâsáh¬.e®Ë DâuΚ¥ôªë\Í¥Y†\EbýwŸ)]V}ɸ'w±JÜL=Å8¢#‹W¡H"Õ ôÑyuc!ÜÂ}‹Ë¬WCØiØVÚ\ªÂ}-Xšá —rvDWÖ×É )T§âЋȥ´ÄÖÉzÆ£v˜Ç’Âñ4íVnEr¦˜1…òÆl|œüJv³Ð\EÜmÙ¢Î&¨pÄq2È7ëhaY)±Nfi[Aî#»VV¸r·•¬R5L0 C/8†4ÙÈŽƒ““õÒŠe ‹=Ä”™†%xÅAõÌ„£SÁH|}d 5¾@ˆ B NC1Lç˜"'H:RŸÒ /qX²‰Ú.E KFp†€A@ØS!Ù ® ãYaŽÕØcÂŒ(kà`@f´àðreï¢Â š„Å„1¯C‚Oš¹õ« S•L@Žo„2XhAŠi¬å1Fa€ÉaDBt¬¥‡GÁ‡bŽ’¨¥È4W>®Aèœb„!ƒ„ *Š0BpC%~‚§É JSCQDZE @†f3 Pi*Q9»`çÕW)–¹kƲ»•©7’éVºkó QPŕʔ Žqy{Ñ{Ÿ~Òr˜•ý~¡=×èš‹ºÍ"ÜsŽã¦2¬®ÕyH¯–,ÉÔ<ˆ~y~[ßè9 bQ÷÷ŽÃ Ø¿DýÙ”+•rRuQZª¯vúŸ‰fª¥[%ËA*C”“%ˆ1H*˜TÍrñi›Û¯Dëògå ¤Bf¼‰Î›é\êµ'9é^% Ò<ÎyÌó2Šäz%J„wb4´‘Ž)ª¾8º~nmcm|g9©bŸ3(¼/dÚ~)ÛÈ„\«±FnÚ÷ÕˆŒ™~5ÐΈw/ *=‰ÈΆr ÎôfãJEg¡·~„|®“µ­h´Röå²!GgA•R!‰åÛ9™ý¬¬–ªú(´{V A^Z›’[¦Ó€1°0ØÛÿ³ÿ&m÷E¥l:ûÍö¢ôÁ‘–"„9Ïņ‚ „ ˜FœBÑŽ2”Ffl®Lù!XO´s ‹Å4èœõÌ»¢÷ jQñC<Š˜ÈÜ *C¦àBÕ&àš›fkÕ˃/Œ|ÁRß­2ÈÒTñaÞ’PÆ&!$®Ê£` ÚZ^Ú¦ÄGm`@£'™ÕƒÈèDñÐR™XRáØ˜&G9 ˆF©ÒܳƆïn ‚¬*¡Á¤çüÈn%uW°™yyM‚‡¡ÈS8Ãpƒ8N«Hð€va!‰™ˆfÜçHÛ$!ˆ™J¬C ºáPâÄJZM¹ŽÀŠ ÑD±Ñ= "ª P!Ù0®Ç í‰ÈÏÙ…°Ҋ!‚‘¿jæŽh¬„­M¤š«eAq…B19“ðE¨ßF!¨™‰w«Å³Žî¤ÌèEÆ yJEbÅz䀃›ÇpùÍȭЈjï…FƳšsTÑ„e"QùJ%! ä¬ï®xr) †X „*ùzd½yžd"$ÄÂo˜µ„°ûÒ1 ‰ö¡sÉ3†e@…2kAó”RèÄM)L°‘Î_Á3 еÓ`I‘2TNh7¯©Èl ¸Å×Ò¿éŒAÉh”zËL‘ó‡òàD†ª%<Ö"C†T§R¸Žá‘Œ¦MkȪóCbOsPŠ×,ÄÄԸµHˆ3:v§)(†e9ã¡ `1ÌÌÇ!ÎâˆkØ €„A~™Nªi!¹–]ÇGÌG1“ˆz¦PÉ]˜6¼X"ÆŒA èU+v×EǬ0ŽAgø®*…D@€‚$vs:ÐV£† ÃRl;og2›Íõ p•‚“̈ÂÇ ¤Ne7C(¦*=2rÌC°5 OÈíœ8±ø‚%Ó4…sR19\UºOë㘽hR({ÆÄ0Ž‘³wÍÀˈå¯BëÃù +‚ÅàƒnaÝ€öf`†Lè¶—; ãnœW…lT^Ô‚hE3‰ç1Œc{I‰Î1>{V™Ææþª”½f"A>Ž<"G"" âî ¤á¼ œBA(Ú¡K‡S ˆRZrCª+¦ˆ"JË0·%À¡¯ÙÇ\Y)Tl ›€“ƒ!nÀÈ1¹Š ÐÍ £Ñ„( ¥qDKÜ‹m (¤<¾¨2©—Z¯À†@1-ÅžK°6‰\ä¼CÞ) ­ŠÆ4˜æMÞAB$¤„/uÈË‹U¯2BLjq\Ê0C ¡ ;) ý‚A8 ¸ox±§©Ë¯óÑ{Gæ*½|s òù¼J—')ˆâg0DÙZ²pJ>ÉR%Ë-|›RVÜIYѲÅÄ.6Îem]˜É"¶ºCj3‹?=HĺÙ;Ä“’’*¨ïäÒïT…¢¬ë¿šÆ";kmפ?³Œ…¥4´]•¸¥9ü…^ÞiŒÙ'q\E1Ê1h¹ÖlâtÆZÞ.e]¥½9hŸ_P‡kí)s„)ˆ+«ä3‘i´¡JŠ:Ö©Ñ7=Ñ ´Õ"â©Â6Ú¾AÊ¥n”ÌŠ²0SŽO}ít.X޾“ßíÝF¯~iÓû’Æ;=s(¹½æS¿7ÑéB}LE/Q\ˆ_õ1KÙj‚ŠGI1\wV× Éô6ŒŒoš¾[¥ n _°Ó/zÑ®ÏaxVœÄªYU²°Â³É J¯ `ÎMLŒåÂ’KÞÝæç±>&?ïOâC o´æÖa3vlA’¤¿äÉM†w6 ÈWRC¯0@9ÇOY@Âbœcðö² aøÂñ“DÇ|2"„U_ƒÚ@Ü#9ÂqÂÃqiê0OÇÎ*(!ñ†SX1·hĈ «°V43Ö¢¡~Û*+2aÔ¾ˆ)³”C 0Ä휾у04@:([TìRÕ‡´H!ð„‚œ4“Ò0ˆ,¦Có›ÎŒ R‡.feÄó‘0ˆÄR½™ÆhPЯØzÕЪ\¸ç4** /aL$­‚„(B”¨˜DDÆÄÔŽ$ hB‚*ˆ)S©pŽ)§ÖR«Ë6J`ƒâ…5†d&kD@€d\ÈжÜÔœÝOÎûkD(iÇ ±k«ŒŽ…½ 3 EŠ‘öô$ÔEá“'ŽÆ‚†°•Á"1pí9`ˆH îzRÇçq2ì §jF@±‰Æ¢-€À`hÉè•å}‚…&êRõ:îGV,‰%ADbQ¤W(@TŒ S$ïkœg:¼<|C$Š1‰>ˈ'LÝ©¸ÊÊ‘Á*6Ëyz)4Øy\ƒCqôÒ„áœo’3BhË„ilRÜÂcvU;?åU Ô®ahØÂ ýE;M¢²‚ `¸¡ÙD Á†ê¿C ðž¹Ù›Bª­h@‰££ŽNF0& ĦqDNÊvŽ‹Rì¢g•E⨔¤ Üç^E@‚ ­L¶yüÈÙ•—»:øä#a®WÈRñL/$gH?:¨´Š/ñ`a82sgÐgÁäÃ0F b 54/9k¦bƒzŢ㰔î8áò„ ÆAÝň!"û9±ˆ©ˆ2æÌ^ÁìrµGC ˆÁÌt ‰œ´$eÎÎ91Ì4%ju(§%?pLá ÑLR¨ÔiU—‚`Á |åQÛ,ݵ/Ê¥åðâf;Ò©ÚÆB`j ù¤2ŒPB„h°H# a¨sÀ¤ Bs¥Â"qñ ÔØåç§Z4Õâð* ê†"¢Ögí+7®³P× ¢_‚›ðEkÿøÉˆÄ¾cNû©ûúKù¶ùiùqùÈúU³’=âÇóØÆû †fJ#±Df©SJؘ‰­´ê·/Õ§’²J¤Óú×Û"ƒˆAP)N)÷–¤Ï«j?*w’ä ›ø{vq[ ×Oy¦%D$¬_ZÕ·,UD£ƒ1‘^Ž]ÓRÌ˵£5+Ô\J Ka´KªóíûI©·l9ºË+³œÂT˜•r å£âTþWå«Qha%5NmF‘èå¹=‘°Ÿ¢v4dÊæŽQQE'-<ß½w±®„"[ÄLdå›’ÉTÈóAHó“<]'î¬Íè_G~&Ê,®ÙkÓx¤Íâk !Gÿ;«{ú¶=ShúÏ>žM½¦&—hé#Îu•ÌU3œ–Bˆ‡DÍ_©,WŠjq:Ü‹Å춆ö¥Ðõ6-8ÞE¡ !"(¨!HœŠŽ‹uAW¬:…È:N\X‘ÆXn „ÍETÂÅäïC9  nDaÅç±Rêˆp‰Ù9PB˜¬àÉV"äsV]J?"*XÎ#)¢…r)…jG œˆ´%bnc¬¼š²¥ŒÂ¢ð¥] aB#„Ê3á N‚Ò›¾Vb‰ÊŽˆæ ¡ †Äd4µüATö…!‚.'1Æh®xÔgf!PÓ5tè¤Ì…ÁYïPP°£g¬׃|'brA‚fd!qƒÒpÇ ¨¦û¿ø,qR•·D½·²%”B§¢!„6 G݆QhWc­»F*,5¨è®DSqŒL#pÑ!÷#( vSL2ˆ×)`¢R¾CˆŒLı ’óìßÁvCÆ‚v"‚ò¤éJ 8Ç6@Èš’„ þTíȾ'ô1s^§ð‡'á‘aʹq*Ç †B`ŠGrNÕ"Cf¨1BuÁR¢”`â„Æ1e!ÈO+ %)º9>o`¤#°æ8hÂ/˜BÇZXFq왃tB\?Æxuãh#b0I 9˜æª1úbd„í˜è’å]©LÄD1˜¡œ61 ‚³õ j¶ªâV 9› oIT#˜C€ŠÄjˆÆí±YHSu7…WÂöº®¨Fj‡jQ“švcÁKÅ`SBƒ6Z>:L¬0ŽDB iƒ±b˜q(6:!6';–TbóøJÛ¡Æó‘³!ó3ü(%#‘¹‚¨‚ˆt¤é¸VDbã2Ó!¸5"boÜ˱‡C*NKX(g#!¥“ØpAH¸#hQB Iа`­ŠE r v$!j&Bñ†" ÒÃ/HÌbB)¢ˆ.Ò¬_kÄ(nPE!¦'Ù œœkÄç Žg ®ÊÍJ¸¹Z2ðÐ5ṟ4&aAŸ£0AUt*N‰hŠG3ROô.úª#¡VØF”ú×I &B¹H]›%!‰3a…y@©m$3shR;S ÆÜds=å—=J 0Ù Ç1RŒûŠÈ$PŒ©Ñۙ؊mñøpÐ’£ìb «sA‘\aÁ=åBd"Ý4†Žõ~1¿Í㚪Z ÜB£‰FY‘Ç%Ô'67UŸ(‰®ÎvY•›©«Ä¢õͼ”ISª¸ï‹Ë©÷7¥õ3h†_{%·ÈÎîFET_jk̨f¸…²2.•½ðlÓó‹dû#³3ƒT\]&‘Y>͸d:®èEô×òS„¢ËeªuÄ&sUÕD$ÇM© Š„>›®ôêžîœC=X‡2Š/6Ò~š-èF'Œ˜€‚¹z2É÷ÙF±‘>œ—IW%ocÌCHÝD‰K¹›°¬Ä_Bzf•êÚ#PúÔóÕ·*¬¡8bY"pv¤Ðš$n’Nž›OÑG B9,Ê„©7e©°¨eéPF¸@C)e#ýˆÖü¥ܼM5=õÛ¨õòyT¦£ ‰ø8OF Œ@V%);óã‹hßZÆ—´¡ˆvEu¼Ä6ô½%VÆáBÑH§!Û™LŸþHI2AÞj£#ø¥(ÅÌQ¦¿Ê çbOY”ÊÒ•BI$Ò|€( ¢ÉâT¿‹h,ðX÷šC­2¢±Z8Ww6´s´µ1LÚF:w+5›È®¿¥!W][ºê—E”ùèB¯‘e7sÜJ:m醒& #íˆc`Å^ø„JÒÒÏ-ékGGc”gÀõ¢½{v¬™ètb€‡…‹ÀÎ&UøÙrÝ*Rÿ¨º>Úµ`¡ž-×PWM6ï+4¥8‚Ž V­JE§u­I<²\ËÝ1 e¨å›3T\¯>©D) AÈc‘<Ï1|–¥Œ•­51÷t“hß]¡)ɪó–ë:®LÆb´æP– RÐôH5m-`$Z„ ‘çh:†P®RaÄõÕ7 åzy‡A4»ä¡åóNÜL_ÒXJQ,O6Ý Åd+‚ŠÈí¨ ¥…NHS«4äYÌÍX°³c©3¡ ,*d²XR¼þ‰1©Ä">JêbsnØ£P]&Ÿ #­ä^¯WuUׄ][öÙʽ,•ÊJÒr”¤ P1½­:¹$À´É£YJôœÅbÓ`ñ>@c‡¥*äÒÝYË/²DCÊò¯gz;TøU29Ëiº.ÞJÌŸd³k/B D   p)ǧ’I¥ÞµMé&™m½æ4¾þìJT–H“vH„å§z E*mÅ¡îT¹»)id0Ìˇ.ÃBàÈŽT¹ííS1Z›‚»µˆå-•ö6Vx.ÎÉäJ¡feÕ}Ï®ŠŒÓ rÀ¥#Ï“&.ù&òõϽù’7 «ÖZÈE˜vDñÊGßÔéuw†0ÈcŠ:4Á˜í[ž‘§´Yïò- R¡× îc˜¤©¬‹¥WbOoˆ·ÎP…i–¡^‹›õ"8©#7"q]é|¡d“‚œ±$‹];”µˆIÝÁÁBËh R|zi¾ÚIjÇVS š+G-éNE4‚mfåÄ]±ŒnWA Å(¡JEZ ¤WáO‹]®¦ % #>›qK™ø,iþè†7C2Pc†9ŸÿÆÛÚÈ]tÝK,yéàg JJ)ÿÔ0”V]¡Õ‰Ý4©ÑëÄ(¼œ(´$ù5ÌC_5›Rê}lNÂñåå$¤0ABˆ9Î!†{2–Bz=ˆŒ\o£%º%y(‰SDÎÅbpëÿèÿºÿÊ?ßßîÿ÷u ú)ð‡Ë–<¨R¾l2”ÇÒA3MMd± ¿ñb!qSøaLœI‘{qAÊ&0Ñ÷éŒV‘#™Ô9@«Ó§SSRá›ôh1íˆÆ1l¤1´ŽO•9Ld±óÁ_Áˆœ[ˆ Œ„¼?Tf(¯°ÑñÊOÓ…CuqUˆ0c‘jµÐ#ðÇ$)!L‚. Ä4R äÈlH— ÂD/21-aŠd$Ä@ïε*ø)ƒêŒc‘Jâ¬#m™ •… J  w´@CüʆQ0]³1‰™Sì¤D а ×¶„âN¼íÈg28D~zwÁT4ÔŠÃæØäì—¦Gô´”•‡X´Jä(œE¸LfU)Y 1˜Œ¸‚ËF¤>ò7ãB1I͘ 1¤#•Z jgu'NêI@Pî¸"¹ÅV$5˜D*£pD ˜$'"0M07“ Æš£4A~Ƈì#+b¦½ça* òÂ=øË]É¡Ä0ø/†LŒ",°Ð" "*®ÌD­ ¿U„ÕÊ&as¡Âz' ± l .Ö²P‘X­ xY)S ѱԨ#[Çêdæýf÷3ø Š_ó†¼]ÄXbGËÀCHC†,„&a¢–±úfÚiEtZ˜á:¡;ºSAx)q4ç"(Bå8È ž‰AGe0‹H‚ ‚@©LF æpÝ­"±§{èS°³ˆIꟳȃ‰MÕÇéÛðÁªZA– 8O½S Œ¥7"$3Z´ÈÂt Úú, ¥‰¥(¡)ÐãÇñŒ!ص‘̧ ÏN•”D}ù+QuÚˆ x¶3— 6ÉÐ!VA*s«çÙóÚ® ðÁ0ÑæqA ˜"(&0"‚ÏbR>¥GþÂúJï é ]ÇoàÇ졹F¤ ›˜Ì(h† ‡b 4#S{ƒ &Õ/ð=\3W‡aO&ÈáÊcˆ+¨-NÜRÅp†+º°þ°¡ó(0KÛpC° B a8ÇÜÙ+„ÅeZs¨;W‡qWÄÆlvec„ˆ54aVÔÁß)h‹ô/Uš)ag“|¢ ’pq°†`` RV`dL*²Qêpœ¦ò°®pÑ‚^˜ÄCv!ˆ1UF2 ëUÝ/(â‘””ÕÖo‹¼öªN;L01ãp€À NBí¾ M]J‚ŠŒb²Šì„wZ,¤¾¡–ÆÌf"± dcbç=ÁÒ=s±z Hwó¤’DÁ‚\AA1#"+!-?a ÙÓ–@Á…!i†Øç?Q²c³)‚ ÂŒ4¢·†ÝJ¥ã]V¯ÙØDA ¥¥Ðņ2Š#²$õ˜h¤¡÷\¾¢‰FêëÕÊ7YB·å~rUsÌa(blA‡ÁûÒiï<(ÐúC!}¯{hMK¡¦ b1€‚qAŠ Ø{‹aØUÙ» Ÿ p™(¤ ”e"ÿJ'A‚"&®Šªè­³”tå… „ìp]˜S­L!£÷É¡ 0dr)”Dˆ ,UÕÙÓ#“áQ19föÕx »"ÄŒ†Î ÁŒC/G-Œ)·îaÐ=ÃZ!\~„‰i¼ öJLQ™òï9SÓ™”\CñG$H×H ![|­‚#Œ><9]*»ôÍ’'©CÒððÐQ•ŽÜ41H¬ ¨aS?Bnà– Ù"ë!Lå®RÜÜC4 ¨ÍF£B*ñy°Bç mÄSo…Qya)†¨a:›i† ̨œ˜ir }¬–F¬Hè>y{Ô(Q ŒŠ¼„H1+ xžÇýÔBµ˜Ç¬‹b)c Q ž¢ÞH2EBDhŒ¨aM ˆ*ÊŸ+4°ä¥jEíÅ6\ Ã`ŒFa‚2•3H9ŽåôìGc×¥)Ä(™LN°OØÈC0ÄÉ•!‚„¼¯ê ‚„öÔ.ƒ:&ê‹›¡R tBW3ŒŽÊ'¥Þ©jЇ2óqçŸÁ˜t'=¦U`iAÊ$ª!é8J@„øÑILˆg唋S:3,½Š¯Î&ÎÆ5 ¶ŠÄùŒùùÔDX"AŠjyж’°V<#yIИÛ1ðERåÌú9`Íù­7Œ*F_±vÊœhCrˆ‚ꬂZ7û’œÐ~S`å1(ÊC Å ¢„N¸Âs2P„+a‚Ý‘†¨©…4Œ‡.°‚‹Œ%ewê…'7uˆRaH EC ¤#HácÒŠVnJ驽¦BßÒ!ŠPÉÆoÉ$@Ñ¡ Ìp‚~#°á¶B“ìJÕÛÀŲD_R"‰Э…(j ÈLŽ%†ïJe¢ã$¬²$i ¦Y IŒ˜q 2QüBŒ(”äA=`× ±ØÈ\²Ó‚2+’$¨A,>†4\¦G $×ì¾%ˆ½³QKçíÍòó&"à‚„z÷5ס¡2Ã5ÕÍE%(³ñ˜­…)È2B£ ‚ãDv‡¼Q Õ\ˆ52›Äâ£ü¤ežÁ° ¹ÑVtâ<‰Rt¬ªTS³_ù ¹¦.¥;hrÿ7• ûR#†WUILn‘$gÞ÷â oCŸyŸ}ÆD+’'’Mr=¼´¡ Ë_xŒ#gûJ[Õ‰«DÊ»·3=*É«¤!HÚäE¦¹ío’ÄÛŒÔA5X̦ú1Ÿ^ON ¨˜_˜“ˆË«Þ®•Þa˜®ê])Ie£¹T©šÞñcÔ˜Å:êê“ÅJ:*ÔÔ¢ö1–~DººénÂõ›ÈN(›‚â‹Çbãâ 勵•Lѱ#.S‰¬Õ0®óíÄSsŠÇÖ©’îÁ“^1PÝQ%°q™$šB¾~´SþaÅ&ybrµL&Yû4+ ™ìaÉLá—‹¾”^“bKC—ëfa»š¦L÷!—{í‚­Uû“€‡ ÿøÉ˜Ä¿ÆNÿ+¯¿äøOÿ€˜Æh´ ±p'úO܆p”í;‘дÔ2ŽE3IÜU!ó—%¥±ªDsã' \þóÕ–Ì+°×s#1‘Ê[¸‚·ãiuP­¶œïŽ&5E0#XÈìŠ]üâøþ›%ÄR;IØ«„f§w†¡-ìQO%͸üÌÌ„òЉËyTÈ\Mõr¢R¦#áÇsä–!/šÊH¥×µ©J¾CzÈ"Äe,Ú£!ôY«~ÞDZ¥Žt“…CwÄ©ˆ„¤ÉZÂ÷¤5¦°îdѰæ:¼ÅF› ©³ø18ÉtŽöã›lô¨ØèŠî"óÈ»ñd ­N´TノŸÑÅrE¬¬$æDÆ¡‘-:ŠŒ½Z+Ñkêã3’Š$¶Á˜HÔ°¤tk/\¯$• VËçË–=Ê¥†Ý ÃI+B±W¨£fìÉU1ûÉ)ƒŒÿÒ¦Š*~)‰”8Å©µ"‘…Mw‘²Ô°»b„ðæIb9bWW[ßIú‡:Wƒ(艹.d‹ó3DILR³;Ú¥D6s®J¾B 'TsÄ“‚MJas% ¬…sä›!¾Ôþíúp2$³a„o­„*r/1H‰JDi4¡‰Jô]p¨|bTDÕä¡1ÆUž¿ªHœ@8hLq‰yJs‚8¾µR;ggàﲄ ¨JØGù$ç&Ó‹×\Í­VEšB-‘‹>ЮsÓ׬t¿S£BêØrºæ–QÝâÏá‡n¶¤ŒSêSŒve1MiøŒldR)ZE÷ŠtŸGѼ\”©¹Æ¬g»z%±Z)qøìÍ´ÅB;5ö˜þ¥9-ÕLx:ÀƒU€¦0ÃZÄþ@ÀBØ!Š:)‡#!˜ÊdlLQFÁC–'b¾M¸õŒÈ?er5éáJq;*<`¬ÎÍ b(j#ÐÝš"Ð(¹ˆÄ '(v"Œ¤ØÇã 1‚fAÌ*A¸v…#—#AãØ‹A w!rP­«Šèa`´Â Lc:(C)F@Œôµ†0‰LÅ„Ì ¯`c9´˜ÁA÷¥Pñó䢯ïc ‚B†-Ôƒ.£©.Ìd¨+jæ‚"²ô5Âêd8L”†V Sš9©Ø²AÆÆ9G6âºa°œW€Ä™ÚàD©IYRDd@¡¡•ʲÔ1sž÷M±ú¨‘`4PÄ„šf¦Ì  !¶yTQ4@$1+"Št|…E*°s ¬R“r jMØò°Q·ÃJ1Û b(1ˆ@¦øü  Î¦2»ês (n››GP…³mèÌ‚H?ÀVZ³ˆ¤„¦¨Ljtg Œ1”جHCˆ³©(Q¿#}Å>80+/½¯¸AP!^nÆ š4fÚt%ÃT¡ –Ü öD,?^ÂÒ2´òÁ%>@¡<#aJå† š¼@¾Vm“`" 4tŒæ# !f"„;4é…”j ‚„QDT|ôxg®*JDæ*çH¨­—JRpÞ’œQà´KG¡},d äâ&. ‚ÆÎ†Æ"ˆq Ì(×V;18cØäè,:ºYC‘Qqˆ}¹¨†üE°!á Ë ®…ò3C g¨aIXC¡ˆD0œƒ!~:é!8Lb"¤®™q0t$– Z…`³>×68CÕÖ1ѽ ¿Œ|˜fJ[ä­Ž¢D*8ìtEPʬÂ6ÃQ¨‚1©„²(g Á˜Âcª8S œê£…nãÅ)ÔúˆLá;l6 h_ÔMnÞäб¹1¯S •0ÊÎF2Št(„D " Ðð¨}lîe4¸ú!Å0 •h±PFú ¤9™Œ;?cHdÍ‚’½ƒÁ‹Ôá!FÂ=x^00$¨¸…3a{d0Jc%Š… ä*Q8ÁXrûÄ,°ÅNK‰YÐqt…¢J¤TI|BB““›273øPÀ@€Î™@Ê ¯Ž†°VÌšq-µL;iÕQQŒ9!e#+‹j‰yÈÈ$…5Á¸™ØLz¨#:«…é#õSš aš¢„1gŠ0r”C C¶ +fø”"©9‚­×áN‡½Nz8hü+$¨p˜Fkššþ”•oAŸ‰ÿr±šò Á†:æ–Òãæà„Aš„æV!Ê@\[`¨Â9òЋBµÙ ˆÁÌ% «¹»$a ±=‡EÔ:CºpX?m‹Ý@Á9.È`@°ƒ"ŒÌ"!·(È„³Ú¤9 LÓ-$ÊŒ¨Qnðª0߲Ȩ(èã!iU®gr —‹hJøhlŽŒ0@ÔüHDÃþ̨…27i¬lAî+Á NÜŽ'¼ ‡Ü©XÚc‰ÇÊ”AFÂ2¤ |Ç(ËÉð=ÄJ/8c€ˆø•+0å0Ã2Lˆ &0HèŒNPÐà56ã‹ðƒŽô9Np¹Üê¨ Û + R<$¨†Ô'ã DR!â” ’°èCKnl ”Ìû AŒC c"â,ðsuBè7~·ÊuëjÆ(ŒX™҆@cšÔq‘àí(@£acŽG7d C1F-"M @'FîÅÇ„ZD9?R^yé0ÝPEpG¹bQ¡Y-@¤/EA„,ŒÄE;C Ÿæ¡  XÓEGaR©8¬(‚NtX‡kãÑûŽTqTÇpC_˜ÜÑ›ÖO Μ^æ–Ç-ˆUÚßÝ9¯Ý^…i0‹epˆÔtŽOw3©FÒQ¢q‹C!¤·¦Ð¹—“sô”½hÕ«"’™3W~c`Š!ȇ)ÊØ‹V«* ûJ•ðåÑ´…'¾7÷˜æ1U"™Ët•ýp¸êDUäM*“r}7—…ÒKDQT…"ÔT3˜BJ¦GR=Û½±1¿$๊Ù^/ɤ֠ټÛâ1’Ä)FF3|¤Ô;¹ÊB§{8w¦Òr\Ÿ|®âõjzaˆê–FgãžÏ/¥='.Zrí1 ZÞbQV%»Õ™Ô’7\’1<ÁVG FcÚçÑD}©º‰É¶Æ˜‰^=%âº?p›´LÉ$|r¥f²Ó—Jå+•ðóï?ëíéwèçïèéêÝg%›nF^—êÀòà' ̸„üë˜ÃŒcØØ2)Lga¨ÕÏ©ržÈËÛ^ñÉŠUÖ¥uÂñh—õ´Lä(uª­;têe26Ó'i Szš)îć y­šQDö"«òˆ#Å#BߢZW(Êt¤]5_é¹Û‚)š´5ùõtÂYTï1:mø‰eÍõ_"Œ'#PžZ‹x•ô"j«:}"]ÄR¹“-ÊÃŽž³4žS®’VžÏ`—§”7œT1‘ddcMUÚdØÇB›:kÍq¨E3*b#3k*±H–M¢¶zªšôO#bHýÚÈ&Еk\k&jp„&òÒ? ç.QÐúÁãXØQ–'rb’"mK´al¤”ÝÈfÇZh“„ÖÇ/';ÇVÂÜìá\!'Ó& L$'„µçÐ)A Ëo‹—Þtf\ÂÃ,@TÉwäNág[aIŠjÙßd’×8ˆÕíCa2ʨV”œz'‚!Šv+“Ó«Â!Låši&îø¥îÜJŽDŠfIr˜Ù9’‡TÀàW$³…u«å•È“M¥÷™§Šö{ërTcy‡)¥ÀÄÂØŠAQ2LæÕL#›FòáZ‰?‚s}%0É;œõ’z†a©WAJs(­È<"Š“P“ëÔ"þÊ«6Ù†„M•nÏ;:™éþ¨¬=&JËöùæÃ…PDSÞO6ZDªºÕ§¼õ¦Å­†:Bi¾BÄ' R…Ÿªc°’hÈÖä2…R‡È¹Ñ9nõKÐ]ü?¥,÷”ĉ!¨_!5„šªzŸ—¡©i;lÆxÅaM¹?‰K­ÊF7Õ<`)XH¨÷{Ša4Covù}(M®¥gz—ú—ŠDÓ—UóI¼t†1+™*ÔÉT"ó‰M6¯V^s#˜ä'×*ZÜ‘‹‰‹q„;xˆºÉ"J™+Ñ^žS/6e Jûé:ƒ4‰$©Ò¸·a‚Üʽo¨J%…sØ“å«ä³ˆNËÊ…K‘^ˆ7ýdS/w Œaƒ²ÿ°RáuS8Ø\¯ÙÙvœ?ÎÜEÔÎ}Ú~|¾í­Q“‹ÂJWŠâÏ63;ݨ*;‰´"¬¤çÔ&?“ÚxYTââ ‹š›öE5Õ–œ{&+G`ŠË!)Å÷_%O_»×Lh‡)w Æñ4„ DÒ365U­jñýåã ³ÚÖê3cç.ù#¡µÞ N ’–²©$<ýȹ–]7D¸(½L¹tåæwmÑø'“pQFCbµmòP™Eb3{™œ=6º|$víTï=×3ƒ×y¯Ö°¦Hœ‰pÓž4#æ aì«èª]‘¤µŠºBftZ4—{™ å¡FÑ{jDbeÕ¶©M¦š¯…¢I*Œ" <4°ìf`ŒD{? ÝU%+E5½í|ñ {)._÷-ªæzLÒ·ÈiI Ïgñ‚Ìëy/Õ ÄSH²>`¬}ô¨ÛfU±%E*¤Z ç¡–cï>& ½SÔ´Õ¤Åó¬„êçáÅ£WÁ'Dä1^¨¥J%eu¹¨vP‹‰Èú+\Cãy;dLæ¦ÅÊË>±¯#HÉt¡-G뮵B7o~ÑB‰Cj8¹S¢=P×NÒ|йØ338È!t˜t;+~ÔE0“¯Îµ&Ëô›M¼\É*w¨CUe*U§‡ÿ0®š)v,óÔ²³¥<ÖúT"hûÞÖÄ?5=¥b4ŒB:‚ Ͷ!®±’‚ âR‡Áj2ˆ¿VÌ&â'åM[yçm¤† åŒ:”²ðìW¡ Uk54ò‰åú{ÒU6½Ñ{˜ÂM„æiã’RÌv™¨B5Œb±Û9+E=Qóøò›”†òšr^ÿZíd¹}È+T´s-JÊ⤪#§Þ‰)uq=*Æ(ÅÁn÷R•桵ìNÌB§9JZ¸LæÉN_Þê/¡ÇBŸT´Ãr“y(1ç9'Dò Ž"«UF÷‘ó VLWM&¹¹Å©}d‰|bP¤~þM¢­N·QØgšJ.òïÈfmÊØ´½ŠÖZÕoÕôåQJɸÆ8`aùŠÿøÉ¨Å€LŽ © Ö—z?Þ´"¼J«ÐèÀø|ˆfýaZÙ•6Ó©Ö=$¦±IdìÏ£ÊE"!_N!‚PäØ÷é½y;²‚r%Qää#!ó¨Ûú¼æª­Ša ኡcyŠ•‰›™l6Ю"c©wäíçBk ‰ˆä;¸ÿ…J‰ô)›y‰»Ó!DÇ–dwªÈýÏ1.c ECwét|(†Of  …oúÈÛjâW„ä§­d&‘SólTLÆBïæÔØÈVs>´%ÕAtüîC¢sæ š«;1©r:aYê¿OÌæ¨Š2E*ˆ !K$^Vm÷¨ÌÔ_×K/U«ŸBé0cü^! J2¢g™wêèva†gŸ”Õ×GúJýBȉڂҴ­"Ü0柧9îaÝ Â<Ô÷M|#…ê å͈wãô~ûfzëˆÙ)IGÖAù 0æ ÇjÛH¶zµÕê§(ú·R†Cjˈ­ŠS1‡8Ñ/dÂÍN¹;¾éëS% ŒfÊÆ>b)ÏŠK.‘O‡ë…(£‘Ü}BŒúÛi; ˜ÛeB Çm_o¿öÛV|î™ÉÉcÈ9V‰š–NGE³ˆÊô#¾cPKÜŽµÇ/I,èˆaHçí'®:•r”mr¯„"²kïÑTìžÄ¾SkðÒ5ql2ÈF"Êw ×WÝJ”Me÷¿•W— «½åE%tý'™™WÜ_Kzh£§9Ä=¶ËéóK·Ù¶Çú}ÖF¹36†LjL™V¿¥R9áÁÁ%à¡‹¤zØÆï©’è?œjõUx´ÔŠ_K»¬êÂ*•Žæ¦±lGÝ­;4J‹o¬Z8t}-n©¥ÿ}ÿÎY” ìÅE"gâî–MÕRRRQëBÔ´7ôËÅ4©¬µ‘,SúqÞË™WÖ¶j‘Ì×Dw'*È›b·•Ã’I¶*`”Ž_–zø °(úzœ¸¶ýÔ¦ï.§Þ”W«9ƨ„ÚKfÓì†VKl{¦ªŠèV•ÒSµÝæ"yÓ¹„Óö÷&ºg£§¶qs\Dd#Œ* §,ß_8´Ä'×.eã+òfÓI}LýÖtB—$¢¼ä³”!,Ã1»õéš„úç7+/%&mÙ÷«„“Ö}{°Îâ¸Å@â|ݬ˜êÄˉL6[²\IΫ½èFtõ!LL1.@G:Eù(‡BµNÅ>úzRÖ%rhÍ­.¦ºdëQ jŽX‡#JAÜsŠU,N½Ÿ Ò<¹̼IL#VËÑ‹¦ÖɆuzv?uSÓÌéŽÉ›ÌеnT&ÛQªŠ¹ŠUº„ëb—‹ã¹Ní!b/´ù_g¶!Ô×g#ª&ºU­Çá­›V£òéMU!›Övméb-Œ`a$DÙ´å0øTlzŒ¹ÛßóQ•6…0ËÉ`„D¯%MF,…ÝRUräÝFÕÛ¦J¾J^*(çâ4ŠnBú)Ð:ÄFZÄÈk%.jŸ÷ó=Y}ˆõÑ+Kê…ZºŠÊ:u¢¥~J:µóÕë Õ5Ÿ”¦ìH®tB+))KÕÆFª*SÆ2g°Dä_¦bÞôâ&?™uå:º1µêaÔ­‡a`Ã0¼j«ú{?%ºo0“#`˜å¦éø»äA ¾/¡”ª¦QI­‰Ä«Œ:ë­ke~ó$ç5‘Ç%]sÙ93kJæÚ—µ\PÏQP©"¬Ù\™|_Lª²U9t”V¢nýwHÉdC,¾¾tyKȬb»ÂE¡—ËþRòï¦ö±¨¾ªý8”ЛigÇ=LrÈt+³«é^Ê¢¢¡˜’"è¹ ´-/©âº»þ×›yY ŒvK¨aG! þ]bfÛr”…Ïf}í/ÐÖl" äa žQ³’j£ùŒU_æÜ¯-¢ôå9o?¤Ä¡ê»”gR!Aâ7ˆ¶-X®b¢-hë±{Vv§Ÿs‘ðš)=Ö¦KÙ1KŒA„fqpÕ- oÃ- ¼·/;²¦v²¢æ\É"èþO#JzK·ŠfUk/cÓKÛRÔ”3iÔTÚîµO„Î$²KqŠä±˜¤™JªZ»séü’0DŒU¾šÈSbAl´˜Ó¶6/Ô•¡2¹#q7Êuz„qJ&{b~†yUÈfNóïÓú»—BÑÜ+²J”Òd¢%˜Wç[üœ~&y¬™§\×ñ+D™™ìB]ô­S;²‚‘Ë™´\ÊjT›Ì»¯Ç¥*ò·)ûÒÂ¥òBœ¬`Å+É÷"y(çm/#ú²””4Û_¹OCÜ‹´cÍ#Ì_W9ÅRµ˵#¼mFßÿu4Í’e3j¬R"NéTˆ!” Œ‰Ø"ˆÁØ¢*§Å‰"¹‰¨ïTcŒØ„UÂ’h4Ç^š»RY`23X1S›6Ô˜ƒq>ˆ”SŒ&¡Îq$~ŒÈAd¢oUŽÃ¯EV>ƒ‰@Éb‘Ÿ| ÈU zñ6c‰²T c)!H3;º¢+¹¡ŒR`Š/l=U#}¡©D¬GlØOÖØ‰Ìþ²' ±y^ÃvÌÙ¦êD„df2âv5^•¹…kb‘M1ŠÏœ¡JGĢ4äB Ã#Ó``°+EðšÁœ‡(´V )g ƒRf#:2ŒkîD™[˜ÐÜa~³˜ÿ#!Ø\†‘XS @ÉŒæ2‘ɸ±Ž˜<|Ð!—DÙ%ä3r"PˆC™D$•Ÿ¾IUF¼1F1YâŽc›ˆ(É„C% šƒä>Îe†Ì¥GBK³§(h¡<(dVè÷×q1Ž‚¤8GDÉ,EçN:1Ž èýü,˜H3'„,®zU{3ÓrvdXƒp”ÌCÌçT!‹ðâGŠ) 8…D¤äqN‰â¢¥t…$1áLBb‰Ÿ&(@­–«qŠbä=è¦c+X°œLæ ÉQ¹¡,¤åjB¼MÒyò*M\@ÿszÍDÅQ„(•7¦BrÙÙÃÕpŒÉàÍr%ëñÉŠ&è½:Xn#„ò®Ì„I8eN¾¾U•‰À ° ´ŽÏ‰Eš–„Ÿƒnùú ̺µc)[ä“1wIRR¤©<Í•Mm¹ÐÆÂ¬"NæIÄYÈÊBwX©ZŸvÖê6}±FþÏ%(N$ØjNšq™‰s•ÓÉÉ‘JT2ô¼\+É"gþ­¯t#+ç2÷*+rº8c›*™Š¦#Uë˜NT–Ö‹!³é­¯ï••Ê-Ž @è¬B˜ÎfÞén«WÛFá&¬õÝÒÕ¦"º¡®ÄF9Ä:Æb¹Å2'=ÈÎEÅ&[s{_+ÌgT¥uk2uTˆ®µJíeªÏÜŠ„_ìäºbÉù-·ðŒEÄ¿Èa#µÖ¸K¨î#% ¾M¸†zumUñ3éÍÔjTŠ#äź)±µéd”Ϧi.EõìL¼ãòº+u6šü{úvv!f*•Ú)œí#ÑÉRür æ8Ž¥u§ 6;2«u%)ÔùVÞLéy+”ñwÍDÄMOd3툫é‡ct6Ó DRcw%R™å×D‘l2L†Å#عçyŽÈеÿ\§¦ üLÂòé…:¦-¬d$c9OSÙRêû'3öW~ñ:|W×¶¡NÂbç‘AH:º-IÐCÄt^•$UÅÌ\jêékS®lZ­µk‘ JË®R4¦Ta)Yè9U(_¡¿ÙAIY*®ç„UëE)Â*†IY-„X†3©1ÅËmÉò-t×RÞ…‰Oý fî+SéÞÒèZ–ec+ÌW+¥?PÌŽ„ÄÚõ²nu3|—Ä¥ˆ¦&|޾æµÈeÚ= „0¼wȆ™ÊwªoP„õÊU_*ýÆçüëªjÈ:qŒ!šEŠà0ˆds ÂTäÁÖhæ5î‘ÊLS££Œc@†œ¬ÅAŒ18 ¡ÅN#â‘Â.8)J:»Ž’êñ0|´¡ ceœLìñ@™ôw8¢Ò‡"œ™J<å‘H” H­Ù„ÜD4J™B2V3teaúƒÒ,íÂÇ•³F¤Td`’±Ð0˜F8‚„¬¸ Ï”›d'^(ëJˆfS! Â-'.0B gxÝDæW œ”G2ÉŠå|Há9ÌÔZ3ðÄ@ʼbˆˆMDØ{£”ddV ÍÞD¯BÅQ:†ÈÖ¢B0o a"n4¥J33MQJâñØ=FœÂ–>Š×ƒ „A™-l Bóp‡Îaëš‹H{FAQL¤íŒeàΤ"¸‘#ê=SaQŠùNU"Ücøõ1`DÈ#k÷Á „†Äjæ'{HØ}=‹¨AhÏÏ1hC ˜ËIb‘yœA`Â×íb ê7àèÁ4-‚"e~ð^!› („xR•…ж‚R!iÆ  #!/ ø¤$N! ZãB+ªî ôCpçPˆ#9U˜2C‹û‰Ð`VM°âx„P50DfõAK±B7톄b·ðPpî4 †Caõ4MÒXS;4½«ÇpÆd%±9ËB2aħÒÜ% ŠÕJH­¼/sr?R8v!Ê:-½Ç+P®*•ÓÑ#&j¹dx›šÄ! iʤ/ShÇ*e§.5 ê·"r¿V¹Ùî¶ÚúßÜLZØÎÍÕlî|Ê0¦v*ÈÔlUC"Ö¦îâr¦¦˜Kuë5[:Etsº.¥¸Q9“ kdŽqÜËúÆ¢*±î4«Œ\«a_ÙZë—ßÚ£¿ïüªˆ•fà NÄL±ôœÑDXs½×иµ4êvv3ÌÉ™\ÊÚBò”§Ì›iõcÝY›ª,²—Lä25Œ\m“hc­[XŒVÿÅVE´‰ç G:úŠÎŠwº˜šŽáN#Ó÷©Ö›ŠéD­°­Av–Š& ÕsyÁL¤cÑqø`0Á&úJ• `Oè+•[3Vx ¨gÏþ'FÁH' Eø$Ì”ʳŠÈRñcdzÿ‘8mé Èœ@†éS³†èɘ >=(ü.pˆ#R©‚¢˜„Ä @€ÑP³ Ò"Fq™¨Axú‚R„˜æ’…ÊŒFT—Ÿîã6Ì å87&ƒaˆìS 9Še†H]Šzvx'€Š“åL¤.‚M±PÈ%”àÆåTÙ¨è˜\¥6Å*; Vi½§¼a¨Ææ!¾‘&"¢P ñÙJ‹ñõø¢F¡sz°ý”ÃVŠMB>åç¤SŒŒ“(øÈ“Q ²‰D AàeRnBe†Ì«º¿)çíL‚â‹À#ÿøÉ¨ÅˆNùvù\ù¥úLû9üIýWþ:³’…ÍŸÿòöù8@N7# ¹)2Q¨Î‰ôÔv+û‚"¦d0P8†øK•Ü‘xÓ2¥"a9T1ÓÏ2­/êmB)1 †F„UaÈR³ÂŽ b fáÈ`Š(Ü‘Áö@ºÁ* ?#‘ÛO²Bƒ aÌ0¤˜‚æV32™A‹ ]S(±…‘&âõ˜~CˆvÃ,ÍI„% ¿pÖ‚xŒS(3–ˆ¡ pB‰Ù]Ùгb”Ÿ’!Ä £ÈôùÅGÓX0á0ŠtlÄA FN6¬Cˆùû;ä#ŒqŠ›¥¢2ª•\°ƒ¢w¬†ÞˆØœÉá¥$ÛÓˆð‚âNÜÓ©˜ÈÈíÇåÇPAa2Œ<0ãz¸†ª„•PÇÕCaÍSz1Žö’·ör]F˜M”•zÕ‹lŒ¨b9Ê^_õß&ºõoí&f÷¯TšY Y[ȇ\÷rØøZ½ú)8Õa" ¤TK<«E³P‚NZXO.}ä}ÖmÎeAXeÛlTU’¥ÌÝJ´Ïí×)(”xÂ1ˆ\úh&ðƒË-׺‡1 ’B<¨¬´+§È%+Òní*ùbá”ÉR¸†Ïþ-(Iü—%Ueq$D™5_/Rȫݱ‹\(p¥Ò `jÉó_‡réæ}Z‚’d#¥äV†›:gIK\¿F´ib:©=’AQUs¾äÒ»†ÂîÇ8P¨z†ýì-ðR9ãÝCÆ(*}¤$Zx¢O4Óôð¢ QLEµV²5™Öd ˆ;”ã/ruOM$†Õ³¶õ â )h—˜Ö³y‚y-¹HÄÆú¨Ú&é?}”sESÌAÏcóÉèÄÿç©zSY¨ÂŠiÕž£‹IA“‰XaÁŸ‹<{K]‹¿ ´eJ¤É}Î¥ #e¥T”‡3µõˆ¥s†? õi²'TB5åß~°£ „’}˜ `#47ÏE²eÿ7yEªU]«w’xÒ{’Ië–Çér¨£’Vq•*†qÖdu-†Ï¯by¨|5—dVr9ÙÕ.r¼ŠØÔV­rÔbO&0ÎaXRáQç&”\J{!¡(]òõMf:š.0Õ*‡1©Ô£?]¦UbœCŒ¼FH„ªKL‰¿ÚQ4˜D­Å)[0³K -x»ÛZ;yDxÎ(êú³Æˆ‡(‚H¼Ä9æ*¶^QKgA¥Vg±ž!gZU%%æ4¨Ù“{rù>5¨7’'éÆnB'¤AÝôóË Ò öñBúÆ FñŠpÓM#ÿŽ)…;™•f$Éš¶mZ2#Šš†%þ5ÂñygèM%+HfW›¢¬¦¨GŒ+øBˆÄc…¶Åž±râøÜcvЙŸý+Èì§ÔªrN«è¼ãHT¸j–“š•¯üDT>'œâ0Aë9Þ‚ç›+Õ(qÊ3ÝZ½4XXHË¡ãÒ³=šu ¥QLS!²Cªy &z:Î.—ÆÅ/åtºRiÏZi(.rÝRü‰éR cˆ!<”ôOÊêRLm:ÈæY~ÎjË‹‹A11Ddc“¬gêl(QJu¸^“r%F±4“Pk.½ÈC׆•ú¥Ñ(Ý)+‡)µ’ñþ%j¤u—Þb¸8@Ã82åªqÿ=åÑ%|³§Z'Å8ƒ`Z&W¤‘e}Lrb!”ˆ²† Êc2põ=;õyI1±ÉÄNØTÓ,,‡4Ä¥Ø1ŠÆa–âžcÒ–¬–’¿aô±¬ bÒ#HÁ¸I.nu@Ž;­žg BΩ9¨k:Ji\škàíuO¡uïÔæÄ\dÕEëB+—²,¦a‹qÉr-Ì<Õª4X.†ÒâŒ"QŸ–†å¨§ 9æ¿øò™¯JU´sÙñò„™ªDjnw¬"Îbƒo“ÅUw£%_™dØœá? Òü^‰I¿%êpÉA^1 Ç$†k+ë𜇼|¤„‰”V8Pqêºã;¶LXÝS‡IÚhµ)Ž¿ú=*¿L ûEEâÔ«ëšK×oD,¢ú–WªšU”¯=‹É<­ç,!f'¨ÍåAÞ2âLSˆäœÇÏÜéÖ@ÕŸ¨ö4î! &Ö½¢O›~û]Ø©8PàazÑÀ‚ ʽ{G´Z„–…Àõˆw‚yR£§3 {å æX¬ŸßBb|äÔþ@Iéñz‚Ó¡qË*ðÊèþƒÕˆb”²—Ž@… g r©É!ÍÃÆ’6'|kS“ÜGS4EË!–Ž"’<§EÃhÕ'o:ŒQóÖ¢}3#î¦Óº—|uÆå+EP@RD&uL"l÷ùD¨AQHÆ:b^SvBDÞñRˆ³Á gL$¼ÙY+îGñq¯¨*ÈAì|wòcÊ6–óœÈR a-—1T(£*yüò]‘e»idù,~Áä3Èò³¦Gy< A¥›ÜWÝ%Rµ'Š„.+õÔ7膥2æ14·7ˆI\CÔ5”§{>ú‹Y¾É´ÑlUŠH®*eGzó˜ €Ù$ÀAÊ`³Ar5¯7“€N€<@$8øøÛ~€‚mÝM®?Ü3ð#õA@žN3aN&)cA j' (£a%\=¦w9/#n#‘ ÑJæa0°?!ìv1˜ Y¼g±Í^$AŽSICS AMFa¹#øê`|ȉ\Î8ÛÕð3y8…1Šö¢ D×R±ŽF´­TË9‰°hÊͲcäˆ !½¶*Æ„Ý˯l£˜¬fBÞF!ˆuÄ'ÜsÉ¡¤Dâ ç=Ì ÈC¨"%8w(@@Ö0Ñ\X£<_±­Ò^Ø<Ô7 ]53]™FS;@¢Aƒ2ËÄÑ y;XãŒEû˜¤ˆÍÇ™X!‘y†)—¿æ+B\‚óàõB–ŒìÞÆb]þÄ"™ÚF+5Ê$â") Ô•OYh×»eBþÎFY †„‰›¬”Š®t'Ë©¿êÈHQ|ÐÁ2›’Xc¸Lh ºDá¿Bø«‚óÑtŒ[ ÔÇWÈp‚ & 9ÌÈɈÂCÜr¡æzaªy‡p$­à‹ƒ*ÑŽ$C°ì"“"†ûuQDcÈóÒxH&cä28ÄäL6äjŒLSº¸Šo®¹Ã©XòŽçž“Â7(dD Ъœ6ìEI›ŠPI3(B |̪IœBlÈn:o1¬›¥Ît†§Ak(‘*ˆÙˆ NÅa†ƒ¤Î¶U-%%i°±ÃºÐ ¢&¨až^IÆ9"¡!:±ŠM§cT+†ÕY †_[’ŒA#! Y38U RêéŒrÔU´GÆ#ˆÏH¹mh Ç L™:¶Ìƒám¸²dJhsÇY`˜‚ ØCg ê³ ˆ1! ¼(@,¨øPí9)W_¢öªJ ð":l3=53_Q;*³ÄdËhÐBŸ! ÃÀÕÜèзu9…"D0ª>îÅê+r×))ƒ4Úˆæ \€œ„Aµ”ÁY‰AHâ5¬¯:¤wBãŽÍšWCeˆðiIœfŒü§ã“21 øA2 ;œÄDmˆŒ üR¬Ã1ÚÀ«œ÷!Aµ%X8„dEuÙ†“@b?¥3Ђ\dÐGÄ_V6¡N˜£X%EaJ:îé3ìäåv' [j9Ÿ”Û3¤D4ÄA™ú?B©ƒÔAUÈzDF›‘¾WÌÄ0…Í¡HQ ÛJý¸ÿˆèU6Cn¿1F§½E耊ŠeÚ)MX‡âûÄOÞ…"R)¹¥A¡™ B„V^™F+pp”IŒqDTœ´ÓˆÞär5Ä É i©õR—шBœÛK ®7ïŠ!)Ù‚¢„Dæ©Yq“+qù‚ÃÐÞuJ‘Æf0A^-ˆ—b‰2™;ðâ[ÎåQÅÀü üø4Íž“Tq>B&Œ7£%P„¨BÓn¤î™qNކ&è¥6û ˆ!|‚·©N†jž9Ȉj’qDòÂa¶è¦êõt·$9ùÔ'0DNÂuYÂ@h!1Ä¢q) 5,ã@”¿­0êo ÆjÈ"àœu«EˆC°a…vTªžgd£õäþÑ]F¢¡‘"¦!‰Bcc R Ȧ»‘“ ð­HŠGjv…Bf)2N"]·p*zBiJa8Dè¥ÕɈ¤b#cÆ0È`´'OKeá?$8DâzÐWA”ÂT±¦6Fìuaȉ†DE؈HAE´r c™ÐT+”ÇÁFJ4#¸gp„¢"ܽ#hïIõL˜OT± Ó0lT.âB«RJ† £œ&YÌvsá°ÄVå°–‰Ø»õ‰UÄ ˆx;¥Â=ƒå‚/3’˜¤C ‡ËOŒhbgRq&BvZTÚ2¨â!DLﬧfÂ+s¹N.ÀTK•ØÊ4#„Q#tD!T¨~‘„$"ÆÀ¨P|Ä2`‘6®ðœR˜„vAjÍ@ƒ}¡MÌSÅÀ0"™~“‘Òd~Ť2B5MŠ,Æz^uU1‹Ñ‰xšQ[8†QÖæ0Äë0eÂQ´æ"0$±!A_¾òöé _3¼©´Ì©Š­ªÔgåD£&5ÑÝ|´æ)4NÊݺUë4¦‹¶j[nc"¦œ®Mên•xŒ§U!ïÉÅM!¬ŠLæB“‹ß8Ã:q1æaËÖ%*ýUb=3ÿÌr‰ÒHžT?ŸSØÙ|Û‰¥(Ë}%rB"¹ÅM”w¥?ð;)®ìaìlÒNÇ)“Ýæt9þÎ…ªÌÛFËS±ÿ§Í#%9½ìç­\µ¢¤VgQ”WòѤ"éì„c=>Z¢ò^EgÂaÆ7®½w‘~NwWfîË•©Ï¸ß”ƦXQÙˆô8¯Y3&!׬+ŠG ]3Y?nµì¢¯¶—Š„nû|¥Dd¿Ý=ùŠÊ×~_F2z3:q“y¼b»Ù¨Ô”c›ïÆ(à«D.9[i¤Êiݪ|&»y%Úi»ÙØÞâŠùz ’^¼3iC’¸èro‘2úuFjZltˆ0ª|)Ç1ÂKkð†B†+³‰¬¯¥¹¨ÉÕ‰¤Îÿó˜2%„;ûSa1jeva e迵¹æiVü1'£Tî8¦i8gGUQpƒä­DD®°Ñ¹NTüq‹Éÿ§Qe¯{¬Ê"%*9‚ËM˜ä“ raxòqÑ™?NZ5këtß+;HQýB"²Ô®„^uCŽÙôDa0žºA$‘ü¦¡¶¢–-Ff–¹‚Gîg>ØuµùmŸjMúôæ)d³ÕǸÌjH0BÖµSew°¦ByB³ ½s­†Ö°‚¦ 5-g?ƒî0„ŸdBüC¬[éUïôïm©IžU+P’\­(ôKÿøÉˆÅ‚ÂN‘ÿóÿœÿÿÍFé—³’uÓgrðßú †a/—;‰#è›ýç‘Ý•Ÿ]‚¡jk«)JQ$é'ïG:p×jQS ªé‚×Õ‚?¹^àâ$ˆ­¼ša,JVˆ³–×Ñ+…ÜÆïÊ“.ÃÌ„úðrÙ“OœY9F]Þ_¶L9šD¦!M>¤â80(0ð4iCha L<×ñ—­r••a:ÿ¦ÝÝWÞñalaH®áKîå"!J¨®ù|*ÈbæÑ–Íi] +h”e½¼Ég;ßÏÒS2r´?’”H¦pÀ(é™%kB-ÈÁÄcI¸§!B¸ç_ê䞤^EëFÄÏÛø’álŽI^…ÉOrDLrKI=*+%z+rà‰fñ‰†ë•JÙð\”„P¦3+¢a!¸Á/»"ñ)·^0¾]Rü™aW /’Й͈¬×uR ÍŠ"œÕC&¬ÎÙ5Q‚Œ¨æýß%Ùf\«ý ¢gîÉE£Š…k~´ˆc>"«0ŠH¶c¹ç;e¤˜—¤M!æïФ­†Ãõ\)\)+®DëŒ a+z8†qCÓO‚e Û µ4Ho«‚¿—2™þ¥[9Y·õ r âŽ" ûaÔ äÇÀO¯j¯â ”’ëYͳ×5Üá +r*5‡ ®Mâq›%cÑ{)ŸVÜÆ¸LÍJëB?x¡Š_Ç•âÝÝ"VÊ"¶GRö'®[0íDü[ÜO,æqSÆ2] #U ‰Œ˜!&uïÊ~ÛˆGcñ-±*}˜®Jr¾êä6YnîdÇ5Â×þfl¥Eâ0¤j­IW æC ƒóuh‚=Lƒ#|»èD¤C§“|ÛÎßF%~BI#&†Å!Ä9ŠkÉ6m »­:Z4¥ªU<Ìuä!^ÔADt@‡6GÔ¦ñf#åxZÏ\P¥ZZ‡“šuI<¢z÷‘Œ!•.¹n„ÓÿÚv™¨êÝÇ‘¸…9™i^mC1Õ‡`ãž¡(rÚeògbü²æÓå§²ªi(:e‘”Å9ˆËRS õ÷7Šš‘¨¡úˆvÞ>d´|ðdŠà‚›¡4§>Òw3P2ÊýäÒl!-©¬‚vŸö[wî±d-†Z£' œÆm-ÄÅÔý'§ý1QO4eAR’_ûGYLÓ²ÝÜÄNg5º”´g1²IL»?Šä[xL$ÍÖ2Üœat›ÔÍ÷a¹ âjʉ¦+娉IN2xÇ»†™’Bµ}Qy½0í’Rÿ]ÌÏåãó{ ÁT]¶ÕPÄ%„­-”©=]¼#SõHÇZ&}™-–¯É‚ g"%Bz–tO_JüÛâR]0R¯êBårÞä»›”ws«Õ#‘¥l.eéKqïù(§äeTñœBÊ+QZ—Í#¬©¸¾¬…Z`´kWÖ.„èÔÏ¢×}Eþƒ!"±ËUj˜£‘ÝH1Ѥä;žõ NêÕwdöË9|–#:Ñ(žJã²¥°›BÜ …|¤™¤£ò÷S¸Ü—ìB&©PÈu5™,»ÑYž_‘JB²Ô–R£¬¡)NÇÖ#T™aù)ÏB0d#-Éç7®¹t; —£æKu d¡~qè´‘?p®Ba9bý4Â'HD¹ô¬ÇIQ[™«*ûýIÅ¡ )/_¶ ’ ÷¢H¶íeûQfŽîÅñuF!ΜVÚ-SXûZ×ù‹Aâþú¸Œ*NAЇմ« ‚¹ ÿ‹o%̹QpŸÚ®è_µv—ò'¼J±õèñÜ¥q”â¡ÅüË<†f ºñEꡈ‡LëËå“H†*‹bÒ„×OÒÏĨ‰d(ß{éP`Ä*ÉnûÕ w…t9©âqˆ®‹¸IW†+y©‹kk\Ï#_¹B sŠ35¥œRëÒÏ›õol¦KVÍØ£¥eΪ­]}/cX*2©QÍü"ÊEK×;|×{]3o-*.L,é‡BS‰‰ÈC"E Á\K !E¸Šó_–ýyPØma(Åßm6Zí‚”E¦‹QLìþEë²ó2”.’é—N®#}ˆQT!Yꛦab§.ë• ôL””™ÔÎ[ô§÷Ï [V¯æTxD³Ê¼º„à@<†ûWÀýûB ÌÙò†6ò€,þ¨gjtu¡BºõJ´4‚3²ð¤)ðã·6.ß}öµú®âÐe¡Mzõÿ96&;’®¢ Áªâ Dm ®KßäXÊR÷ÐäañÒüÂ>›”"jiMG¶)Æ_SGôŸû'(©†{o ZrÂ#Wˆ^–¨³K¥lq‚’bûÝUÄ,§ Õ[iM{ׇr 5lŸø˜”Z…~–‹W²_SŽö6,qܲcŸTS\ª›nT‘Ø”1˜sbfùΈävJ¸ÊG9„ ›ÉÁ+^a’¥K‹Þ7Þjár¥l“™8—’Ÿ»#$°Vae¢†0ƒ¥… 0¤R¼«êcíd©ª¨¿ZÏŽ%4‹M Ë2‘•zi –µyçy…B_s¶¾KQIDÝÛñO 9‡RÌ^µ‹— šËF9%NãÍß-± 2¼¶­¹O6%nJ9 (Ĉ¦M•°guEÔ+¥ùÝ:o¦yIJë–øoah¨·ÄojVƒ5 ƒ›¬q‘+…aì­…£hŽïS9b¬Q¿·Jä dDa¦<ŒiU¨\}®E©îE_á|I¦Ÿq“íÞj"3>%ï)HåDR%ˆ"P)ŽÕ;®}T·6› ¾?ÙXšYEÒ|éñ¨ïl­JÔc?Q}féi>1UˆLÛ Ë^û,Mt MJPÇ)n¤9¹Äq=¤ŽM¡t‚W»ïK»nl¨G}bØl·é%äˆq*Övá]¦Ê”;$¥2lK#7»ÈwKAr»Jö œsŠ¡øœïòrxŒÝ • ê˜$Írf¦’»ÕåsŸ]YŸhŸý‹F²]xÊ Õ0†ôö!~3ñ- ŠëˆkÚ^1)EcÞ,ªþÅ:ñö†¹ÄcõQØ¢”‡yDF5]Ø+s¿ÜŒ×³;IëåâzuÔ¬-ʦD!Ÿ/ã¹$Ó'ýjêcaw+Þ{tó¼ô7…wN")º"&0Á ňa¡ÎýŠVMóŠÉ™ø[ïõ÷ kªYçâ·×Šå\ÍR$£¢+¤¨WI•?íÖ8Èe)ltÈõñ²Úš/ÌHþ½Ci?¨OQ¹ÊQ >‚à ¡J™‹â&磶 f•JVÌ»¶²˜ä‘d#9‰1 #¬ºËË.ÑÏÝòñbO¶‘#Sí…ᬓó$Í/£B ®ªƒcL•ÑAb1•ÙO<ë¨ÛJ+¥kŒoŸ|ëV×Ë9Ÿè¸Rœ¯·çq©Ê›˜D5ún|ÀûV+ÑH¤²Ø§Íñ¬Â°èT΢±ˆ0¦''©Á+˜*ˆj*"h”Ó3M† mFÊ+•ÕV!_õ(’ÔCW' üÙZ×/ØRÑ3ˆBYÐt¸…jT 1DâÙ¸Ò…`§>Ó³e¡·kÌ´§HcŸ¡x²°†Ü¯ªU™Î‡+XŠG /Ff­£¹Ð…yzÞr—•BĬÆqöä-©c9o8R5J¬ª#ë$¬„ÅL¹Ò ›1x´‡nŒb}ªMÌ3µ>ÿl«»æ[3°JÝâ–nÿ!¤Ê×Í«nÔáZËç0®rj\0Pª„ ˆ\Âަï Ϥ¼“Ϥš™r­öô¥/ÇåMÃJBö*kÂ)Ê!F,É’_¦!^ÂÃùsR¶ |þ!J¿)x½eÒd·ŠêßÅ96Jy›ÊäiùH‚nýébvМˆÄRÊ£8ÿG”0ÅBˆb<2I0ûR²¶»K}:`²è´ù.ÕuÌÕJØu¢æŠWR î"Õ½(—lP„K5L,´Â(Û²MGœ¾ò±KÚIä郥ucm‚)ô£ª^ŸÔº„Öc¶.gê„á/‰rˆŸRYKLBQŒé;„B*Þø¹1Ê!ʉ—”\~©OÑÉæ¡QÏ^g¹1)eÆ‘Ú#„ŠËVD5®îû¾#6š„¥$ø÷Ô㯩:øÝGŸœg#)§Bg°Ã‘Å©‹ÔÿÍå+RúÇÕÖ!Ût”¾T’$æ¢Ì )ÊèrãeP¨F*ÿ©i¥£U3á)]Â^ûž'§ÈÜ‹G/»È£œÉ¤%†~9J#¶JMkúଣK1„!h#&[VšÅ!‰ÇvBèå‘&¡$Tè™ù^­Qœ¢|ñ%Ãb¯qX©}e0„$BR=:äd«éÒB3”‰Ù'Ÿòz«—eÔÄsWjýôÕsi·›HY—ÌåN+—H¦ÚÕ½œæÄ'wf—DòãPÉWLË5IRúÌSº¦eU½ø…1}©­ùO%¤'ötÃQyÞâÔ½öüäR™Å—\좚Â1S~)edUßjš?ÞZšÝ]åÚÒ¤#7Ò‚ÕÐâ 1"ÐW؇9ˆ*¯±–Ù{õ(«îˆA²ö¦šâÐ|:Ô”×”BÜŒAŠŠ—LIr©Ù¹Ž}—„ ÙÕÇoMKÓu³´‰RúÈ‚!Kª)œAgæ¥ l-_ÿúl؈Té°›ÌþÉ•~f(ƒ3Ê_IÉdÔ8Ç“¬U¡yÿ¾Úˆ¬Üo-$j<ébyˆ;zýeS5X¦”_òÔLHÞ>²ÈZ±W ½”;]6BXâ¥]'[³(g²[Þ¢­Š¹FÜùfnךTã'fþçQ«§,Äë¥Eé19¡Ì)˜Ü”­,B2ån³Øl–¢XŠR²Ó륰ƒtï©78¬9þëc¢} JR^§7ž“F–»jóÔO¥MBYˆÄ)…8¥wg)Wäåv±ò­ß5± §üËr¹G×´ˆ Ff°ç1œè3ȹŒ*º~?¦Äñÿh˜¤§Iwµ©wù¥H… :rRºBœV#åµ ï7m;m”‘º\âÄaÙµB©‚¬ŠÄ+ìöt!u¹—ØÕ@¿4øMÝÌ]=wúŒW³£5Tâ>ºJ’™æb*æòc:7Ó¸˜ç«ì¨Ô£ZCiŒdÂ<ªÈ‹þF󱑜„nvþ6¢i©BÔ…ëWz†b™±O­ê3„)\fÉZÄr;2yÝØ«äjàÕUsµ·éÂ÷5þ·éhGu;¢—ÛFu!S¾ÊE:YhJÕ¤RRŸÄPÒTGé]‡r©—LÅ(U€gÿøÉˆÅƒÅN÷úÿvÿ)ÿ%ÿQ´#œ´’gùOøÈz˜ÔE(´'‘êÚ-T¢¾äY èó Еþö7$¢˜9A Œ^m$·‰JEËê#Ô~ó92¤*S{Ž´#w-ÑWó¨“D0 èß#•»Q›”ç‡~ÄL—‹òÞÑ6±Ÿ!\v0RØ%$*6÷êu(b³5Õœèsí¯‹µR¹øƒUˆò;T‰ÜaD)Wä6‰•š'R—H©æ±ÄJОEÓÓìíaÊ(0Áž¿AÎÙ‰³K¶ÍlOsx¸5± ßýûù;{U¦!J§Е#ﮑ9îçåÚVÔÃRØ-µ¹Õ†)KD#µ\©EKqÇdE‰øÝ[ý%ãiO¶ûòT¬´"w„Å;qÜìÉÇËz{;ò»¼¥Á‰é/*Å]dš- ŽËBñ|Ûjõ/ö„ …gIÌ¢#ž‚U&vV«4¨u¨F;ròûg9X’hœÔÒÿÆ®õj¤]»ÊT"*tÏRýµ3hè¤E+UD²y/;k-ÕÞ¯RgSŒU'œÔ¡“íÊþ›g¹uM‡ùs3âÓíˆ"*cÌq ºëw»¯›r•=Kí‚].íÈÙ¾b.5:õ´>GRŒ1÷Š)å_G—-ŸØ½„¶éº]ÞÞÂs-ÉÌC­ŽT0Š)Iuq¦C+ɇj5ôß½ûˆ‚ãª,¯tªÑ5®ÕP¨uaŽ#Ò¢Ùd“¸¸6—)l6•©6“0¬‡oa ^¥¬ÞøÔF1´Õâuª2ù¿ˆ+q ÜYׄ0éõg2bS7‰jž ªô;r5†]e#Ky{«¥üuN%ÊÒ]Q‘W$γou7wŒéí]1š„Z©%Gr !ÆE%Pê¥x™jä³±‰cYÆúß|&§f(¥aÎìs äÿdo·¤øk9æFï"E­d——2ïrU¶â"'£™ç TJØA⿲éÞïÎúÕôÝÚÚ= §ëZ…ÁX“˜ÃaˆÂ@…®ISSL¯amš¥Rª=h±¯dZo'!Åcì'ª•1Q;Šur>ZJB`KâjZ¬Ï‰…eS‹¬šŽSª 0!ÍMÜü‹‘roÇãm*B¥Ô‚?:3[ŒDß§‘™UŒ¼l÷õeÔRéô™ô¡8ÚœFÏJ‘LJÃ0WŠ‹Áj†–—K“ý"!œ†2UŽN'epš&²œš!DZ–KA•œ×Ò]gB’ŠÞj[‰–SªPŽ:ÕÝ/ói…ün"½µÇÛÆ—÷—¾ÊɒЧÃ3»±7ªÅa>ϤB1§#ÐÍRõ0ÚJÿñ4…ôÜÅ*=±uð0е%j›–6Öj Iò…ü´*ã½’FâHiÊ; À ¦'íµ´¥ÂÿØ»tó-^M¥ö´ª&lM)AÓ„%jÖS"1>ÈøJ¹ÏÜßò÷»T‚,*X‰TòùÏÆ2GE±¥;”„21¹2”&!h]­}¾¤×7tÖ©Âw,Ÿ„0ÊÂ&"3X¹t“_û,©Bp„Õò£ªPÈé1 ËX×·$».‘‰Ÿ9Â7•(øL´Mð÷,ˆj* ΄K¡HE_‰¦ÔK–؆ù1¨¨‰Ul¡Šg7!Œa] ˆ°°Ç¤¤Ä£w(z<2–‹0Ð@œb(EŠäq3“1 ƒP"'ÅÜÇç8*þª¥Eÿ`Ç!ô ˆdH11™!Á8ÂÔ˜…^´%ƒQŸ•ιÉH¤2 †L èÁùŽŠa3ºÐð9Â… g'pGA¶Kµ"c—Q”"©–µÃVƒ‚ ˆ“߬)£,–C¢Àʈ FoÙº°:ç]ÊzMˆí4ÆpÐfÎ0Âö„Q¥ J½e1Ì)¼vA eR-m1[Ì¢vèÂ虢G„:&3‰×š"”ôÊN¢]Á  ;±F0¦fÝŽòÌtº¹ÁŠ]Y§P]Â.‚‰#PÄCfÌ249ÅÄvP¿”ÙLæ!A> (b†œÏ4!ÕÿpŠõ7 æ¨ÌAò÷)}6Fv,b’ŒA6ã4ÊH3Üè<.@¤|RÁ˜j#¿ E°§Ë9]‹Hʬu`æ F¶2’qíGh¬æáœ0ˆÈø\¤?aŽ´¥1YW!JeQ™‚ÎÃ!¸b„÷… ¦P¡#92+\B ¿)bL´!ð«Œã$æ£ri–;u x*I醷Q œ Ô#•†‚™‚ôB8ÏRœÅd\Ê‘]ˆ(Ê%<ˆBôt,v¡YB BHdÒƒÃä8P‹æÂK¨PÇecÂQ kuÉr,ÇV¿ùÎÌæï”Þ‹F=@Ç‚a“C®‡™QDW¡=…ÏÌ¢:IBÓDŒïË2y4ËfÂ.0Š2]È"9Uvö‰ ÀV­69„»Ê×R=¹}â);Šw^uЋ+ÔÎ¥¡YLµCL‹„â…µ¯SëÖX›±LVˆîTŠþ´%$®µ2faBƒ‚Þ€Å~‡¿MjÐS”¯ÄÕrP¾œÆ¡îˆèvE”¤JrýŒ´åœ¨M²3Йä†ÄO]C½ÚLGÊ%ÉÙm ºÆ@‰!@€9 ;êWÄš€±ep0±ä†dH Ä8ªjÉ•’+½‹ñ}(ˆIôšˆ^±1m3ʉ!u ©/-ÎØBL]1îâù $Ÿ²™TiÀS¤i°xxƒ ¬Ò bÊ®bÈ„µ;ˆL–‹W|Éf&nj dr¨‹ÉÄ~=•rI{ ¨Rô”Ça«ZßpÐö¸ïJÊ! 8ƒ0h·A#ï<_¬…¥HÎd×ú^45¡@ñ#˜3X(c!ž¤ÌdïM§º«3Ü|”g!²#ëÞÉåW“´Kõj¤#±«'P®Â+xÒƒ5è-g‹Ó^ùçtT¢nVsò*Ûb´¯ ÚçÆ?¡’¦3¥PG¯Ëà±ìá‹<&Y¬¡PF礢…bÀô²˜‚xÕÁBú4Ö¥æ½DQ$‘»´¥NÂ}y1|U"xUp¨l&®¾÷«&Ò¢› Ë´O&’B ‹„Äe –ã%0úÑbF¼¡Dam(ÀÄ6Êš/ý¥-+QWnS!)]ZP®EQǵ$+m¸õ½h–)8Ž•9Ž’W ’×lrn¡ ‹[fþÚ•‘ÆÚá îAœrÆ 1„4œ¥þ—éÀ(Ð@~á €@I6ƒý¢‚Å~nòQùpÊ…KФ=Ib‚  é~î±×³ÿéÙ!0 d y•DFܪ,ìÑüíS¢•«(š9!“ Ì6 È©S eCî•oõµe*éU±€D$B‘°D3-‘j:vFÈXJ¾þû¨ÔlïöB ¡ŒCŠ3(ȸÅL‰p²‡ArÉ]sUE«XœÉQò£{’0šU}ŒøÉQ/ØD‰½q…D1”"2±hXÎpŠ¢M)èîŒ*¼OŠê_FÂ8l".a\ÎØA‰iÏÅ8b¿#îuþ1KÍè)Fr0© FÅÕ(͘]éÑ—UJØxƒþCõ.qÜMÌF0„Îe ø„a˜Ã†²…ê¡Ì:cÚªETBlÆ?9¿c Œ0&Œê0ÅŒV!ÈQ{ÓQº»Fƒ…¬N'Ã)³@Ë ¤gH Ô†0!¡’2ø=#­Ça¾ô„$ CµVá°È–ì±–3Ê<ˆ½‚nU%µîƒ½Œ@˜0RpÀÀ@Ô4A+8¼å|ï‚˵Xøâ!®`MT8§`”PŠÂÎŽ‚ÆJ…!¾otL‹BÕõéQÌ'°§;¨ÖËŠgeËŠaØN"éS»jÏV‰¿&¡ýö%yØšY>µ!ß•8‚¡Dc’A«¹•qŒc»{IÊ]¦• " ÏgôúÙlqÅ\ýš˜¬QUÓŒ&…n@I3x‹L%¨‹ÍJµ_kï©ÊÌgLç°‚ª]#9Ï’ÕÔW\úª“ì”L-Ÿ{5ªÚºêDcÑNk2Ó]ªGQˆÒ8ªUÝÍôäåÍf>ßG©µÓª˜E¦_ö‡f)™„Ϥ«Ó12J6¦Ñ~„LîÇv3|å!YzÙFQÔÄ"¶«ˆEÕVlîBeë-v–>µ B}äïÍèõ™F_0ÁÐÊO¤ªîb° £­RªˆAyHîÆ¹4CV_úØë^‘lêŸ#×î(²Œ7$„!¨Š™)T—m%©ŠS‚ñ ã Aãc %cdš ù!³V°ß‹W±GŽrB¡í›å#!x):°š C1³! $Qz‚æ #$4¾ª)ÕàRFÒ»bAJ%ÕÄsRÔ"‘¥(A<ŸgÊóƒG Hc‹:M 1L §+Æ6a. ªx¢_¨£ ¤B©ËYÙàâƒ# Mm;j†bq…òCþÂu ß¡Ô"Jž‘ï`¤2òz‚/l?20ÁJÆQ"üCSGoáEA^gÉÌLøpu¸øc„ÈC û² R{Œ 0ÃW›ƒ0 hã; ÅU)0õ› $à¨,ÙGí†&Q]Ù…Š£r]EÌDb¬+8„Ù\Ê“róƒ0D–þ! LÐâæ)ËÓW<ê‚7w+†ŒZ¤2#—³ˆPŒ“?˜ðp¹0‚t+©Ž¿œQ2aTã‹ç3±™F…1\œBÝÈ0ÆJ¬úŒžÉÕš¾o†é_`ŠcV)¶r{°“pLA(~Uâ“J…E:½å4Ærˆ¹ŠÃZá2šbbÀÄ7KHúÄ¢1˜-ýç tA(GÈ!ŠQ„S*>&]:ŒD!–'ƒ(ª~%²œ‚'Ú‹gÆɆ•. S©ŽB³Ä$c2ˆ…®¥cDùCñŠ:BÖLÕˆî{¦ÂÑ ò$’(Á ð·Ì`°@ŠGRöëÄã7*ª© S,§„PJrp‚R"…W…¸Ÿ4DÈÌÀc D"‰ÈnCŠÁ¢b¹ì9®*þÐáÑøêñÉéTö$ RPÓ•¬ò ÕW*l©{ Zœ?9 !š˜¼@ä ¹ÙPPÉÔdU.q¡úb§vueoÑ”¸#äpOĪRhÙ$6êb #”kÊ…"¥é\ @İ%/"‘Æ'$A0ƒeJèéáP¥ä Mà¢ó‹EpÎA‚Væ~2n™—YˆPNjd †!MO…6ÂãEB£*Ã<ÄPÝ„rt-•¾¤r’:eÎ*:ò FÒÈuñŠa¯!ŸŒKÐ!Ñ A‚* ¢vŠS$Ñ.Ôƒ ,ßZ]é&3£ ´Åºˆ:—±ÆcðÕк:ï#" Á:™®MÙŽÍšG*Ðe6l[³ÙÌñ„m+V¦1(b¡¥$$C„Ù„]ÛºˆUŒ¤‡*ðïØ“SVêÌ©ã0Js8a?&eS ½…ªŒ4!„*Qu2°–¡ŒŒÄ" T,(XÙŽÒdyŠ‘ÑŠNEkzµÆU 1bÒÂë@‘ÃãÈÎ!" ƒH†PsOƒc71p3JKäô5a˜ £¬»Œ¡–z¤òYX‡a0PÊEeøª6FdÃQ·gS)blÞÈX‹¢µhè,µ ×Úiǘa”†æ,§Q"܈¬^…Š]ŽsÕc(iL²³Â™[ ƒSFŒîÕ@Ü0ÍCQΨ(ÐÆâV¡¾6'#,3NÑ~TJßSÌýŽ~©÷.§9xpâ~H%”ß!YbR' 1N•æHD0AE ͚љsQm‚Zllž½$„κÅ:ó¤5`†Åp߂ق €òÿøÉˆÅ„ÐN2‚~2ýÎû¥úù€³’µ¼¢Yt°áù†~ó-™h„1(=q‹¦á]éˆt¤ÂÈÛ!xG$¥(èfï²5–&Ê»µ‰âÞBÄ5¶dbXC”/ßüwQ¨pñk„];$}{_s[¸µy%—nº$ôj!g˜QꢊÛסÅSœ…Ö•Ænry+¢ÔRZÕ¢Ò¬˜Š¤lfa{fÁXtÊ e+(@(waQZ^¥âÉÄàÓж]•”©úW •èW˜D˜¥ ‹„¡ä3ãÓɺ™J"HÏJ_ó ZëÛ¸Úé È„iò'0G#%_^pƘª¡¯¾Z”õBTAdyÊs)Tj™G ñÖ)åÒq{)L7_OÚÈvÓ$Â%;^Éžß#m_*?.ULR–Žq•¡B¤Ôª¥„‘(‚“.Ô¾ùTïÛ¸JѬzº-›ëç0Ô˜e(ú—1EeÆ(ÄfcÊ«5êœÎl~¤™¹¨\Õ•ùlN*‚=™ŒÀ‹ƒœ®è¹.v›¶ÿSi¶Å‰ hèá&¹\ô ¡Ð…¹”B¬A\÷èPËu¢=e/ˆY&‹'[ k×óo܉Dˆ¨Ø"ûõ ŽÃ´­ÇCƒa˜Óu¦´/—¥Í¤û³‘.ªÏ®†kÏcY[ð§¹PüæBK•Òøu©6ÄÈaEÊž©ª9¤¼Q4vúZÍ{TáÚ‚)†‰BË,^Á>ò õ<ŠUMdâ3ˆŒÇd©®~r•žUwœ3‡¡á‡7ü\”ZÊÆ×Ú¼GrH²È¦q㈠j mÖ(Yxöjñs^ε¥/ÉÒ„Ó{iv¤+C,Fʹ9<d\÷9r¹ûdèJóáô{T”8¥aÖv#¨¬tä*JtRÁʵJ‚é"H&²òß~ÙªzÒÙš×/‘!’BA†d¡ÒFÒŠiž]¹,‚Öz"¹v­’㎧,Š8üÒ3í0èÍœ‚œ£‚\(ƒ(IÛ#Omþ÷«ö!z$¢<‡æeW(bŒ*[½¸néi–î ëi rœÇA]HÏ5Œ©Û´±y(Ü<‹±£V +4zEfÁ(3²…©d¾¯¯m6d¹I* gÔM%*ÖÛÚ¨z½¿õ®¶ uŒ0Ë ŽªbsÐ[+ˆ]7çéšb1‘J%?Ÿ¢‚ÍÚp…µ¤ E ¨œ'ÊÌ5†ô$ˆhµ)FÔšaØ„¹D"”…ZT²”‘ U%Tâ+Qu;[ò„Ù&5¶¬L¦šO^±°Ev‘ò$ÉA’ 0Ò†Z(²|Åêms¶[Å-ˆîôK‡um¨—r?·È§Ôç.4ªUK·dÏw%¾|’ÉhÂPLÂÎÞ­dˆ‰9"™Ç4’'¤›jöç«wæõ˜ŒGáå+H½B¢“6I¨Ì$‚å«1W YŠÑ‹bgRɤ‘<Ø^hlW ü”)hÈÖ ,šÆ0P„žÃ*yøCe·/®‘9-˜Ú5G<¯ªz««&¦Ð„BÅ)EW³½è[ çÌÄf«%ùæ­é+}áòÙýDp‡ÊQÝèâÀ¡ƒòŠN‘.5eÕUÎyäW¬m†¾ÈCÊKÛÄkõt§.Ô·t,ñV‹ÉÄÒD)0“ä$–Óµ:…JÒïqÍÆR“*¡Ê`Ö¨PåE!ÂGŸ¢i1e¸•­µˆCØøÒeÔ¼YH¶1j·!ƒs˜âe70¶w>ò‘ïC#UD*åALæ¡…Ïlÿóâ’ˆ¶C;ñ}´–ßæü7eÛ’Séj\ªÙLè¬älU‘ŽUÕÝWeKÙâþ´¡7ÎAYÇνʲ6¨Ó>.ÖË3Z$µ‘Ð¥Á†1ÉpËRÕ¯OêÚ•GÑ(t\gf'âõ-[ªä¼¥âeŽý$…”¾ª"„W:Œê„D^ÙBi÷]‘i¶ö»#9q6—YŒv (¶`©ü{ LÕª¬¥ò6°»&ÑYbR©CX¶N»q_(æS»Ž¶ ¦1ÈBÑݵ”Ö=ø çœËöÉÌ0ܼŒ[yüh™[¦Áb‚:wbí2Ó~­´•³õõæ"õ¤8—C”W‘”‚ŒõJªÍ™—i³šTõz;™ZÆ’Ú®í~œh‡Oeæ¤Ô=Y”g µ)_& Bdm›óìÿÓ­G£(SÌ®*zQŠw¢i^‡&`J©J²ãe’¾+H¬ÆCpö’'öÈ]÷eAŸdxSÉ-.jdõGaBP£„ ©Ê†Bw2³óã–q˜Öd¥ú×”’ä×0˜ýæÌÖ×tÈÄ ºC©T•p¾Ò,Ñ$ “ f×è¢Ê×QvýOÜþC!JTáÝWî­\«ÔlYMJ *^ôÌê—ÊJ:#>q\•~ËcÌbˆ”1O;DFêvZOª¹óY)Æ‹»B L"ï¨â§šÀ#'Y ~a²QëBBí†)då”›Qi‘7¢4ìlš¯Ä?2söÕN¤WgªÌOÉr&yd5YÉGâ’Æ9ÉêäÄH¢N‘\ 0a&ž$†–‘4¸Ä*©-(”6.6¹+OÞJ1µ®çKŒM½ÊódBˆð†,îcÓD:²XÇ P˜ñÅB=‰,ñrÕö⟄{A溡dÂ_‹ú½AùöWqX½ :zYó:†•)Qq‘E c–¨(Ã8b»]dpÕ,6—ÖºmOížJd‹=S(£†9ÄÖGe#q$¡¤]®·Ö¶m¶Òk ÎwzMª#ñrE¸“ã6/q]ÔêZ )lMÒáò~wüžD®ç¡ d—i!BÐ``BÍAÆüÚÖ§—«#µF¢íèIƒqµi*ÊÞŽÚN<‚- `x@0hœÿï´ 5–àÚñµ‰·Í†L¡¼ BB)Ì>ÈR…)HpC¦&AHB¢ çý2h98˜H»4»âU¤¢Ú™Ð^3'ˆPês‹]U쨸ÜÊUS4ƒ¦o Ô‚Q&`ˆ„(Ñ‘ʈJ¦(ÔO‹˜ž÷-äP@D PÐçW'± :“BVçkUV ôñœÞ a¤:hž/¢ e„Ù7)‹MôƒŒOÀ†> iA¶S”â.`6#˜wVš¡V6Ø/Ê˺Þ+Á]¸TжJá8a…!ˆ¶+Fu7&[: ã„æRøl) )±|È#n|Í]þá!ñ¾N´B3cØ,=Žªa”ã~x(¡ ¿çŒåÌ„f£R«\ʈf ȸ`B^·%6°OÑ!‘ŠˆÌx ØPodÁ–iãRÔãÞ`¥âáW$\|L2nÀƒ`ˆÃ ŸpA¸Øä†£!-@WîµcÊ?ÌôZ1¡êܧ98cV„™`ˆ Hc1xè¦Â¯æÊÂ8˜ßQ¤nçËT0FÄsbqã´Q…zJ1Z&¹^‡{Ù+ŠjÄDÁ ˾!DâDdú"•íÊ*¨ÏŽ<P}cmÜ7¼Í¸A@"¨PÀg È£_d¤‚°AcŽ.=¢×?7æ|LxAدÙ~†@l”iÝã‰_ÑuÙÃýTÅheL>ç°‡bZ"11޶`¦`‚+ „!"º, &ŒÔBh¤DÔ‚#QÍΆXD1§ªä(I> _Oj¿¯øRGŽØOMa1LÍ„ !46„JߘMÓ8iÄå@ês¸þ¾GÆS œR-ªAÅ"`ÃlŒ¨ë†q–„(†4Ag)EHbD,#Ä¢«ÀHÃAе»WMŠ1PBQ3- cŠ0>Ì LJ!˜·`†B1È1 !ØÏØqo.1ÝËÏ”å î€ðv9Ñ”zœÆm`€Í'`à "¨2LÁ3Q+aNÙt§Ò5ÄüA Xáë‘0Àn†¢»ÎŒ8Ò±)³0uR§Q® F&#eB:3 V£¸Hc9+! Ó&1#ÔT%}:fØì°†ÌÌŠA˜$HˆÄ€Ä:’å7xF›R¹Hx`§pøu»éI … †A©†˜0¬ÈA0"ÈÒµ±1„+AK :]8¦s.UU2„´ÃÔ2áˆÁ°ˆ¥,z[“ L8–Å AUs-cŠÄhGz0Ò™$¬3ñ»˜c¨0å€|(Y;EáŽ'”B„Vœ! DM©Ž ¢´·žÁLæ9UOP(^åTAò0"¦â ˆË†0ÃSd11êFfΰýÃŽÙ%*ŽXÔjòà¦)‡Q„`dejôv‡"Œ"H“)Ñ -õ°‡CoËÆ¦7މ“~$1"óµF/´þ zâ ˜%¨dlh‘à$`e ¨C ¿þ¹×\nzVœ®‡ îôhQ ÜŠ+œ¾¤"¹UÔr †b;ܵïAX»KS~‰t©)O§%Ó½°ÎZ¦²C¡Î#;¶–ë¶5Û*WF2ZÉ.=7ˆ%7^êE\nVã+yS¶Š¤LFÛ.k‘ ̼Zþ"–‰OK2œš×X«Å–0¤e°ê*”·ÕöN4Òo©E-«'g’ÿ<_Ýöé38äÈol’2áÕ%‡YJò¯«ó×Ö(èyéžìºJu‚#’‡•f+§ ƒœ¢Lž+]&¢;¬Ûl5“Ž|+[BR^“ÄÑk^u¡ñ6¨¯J;Uâõ”AN•äà͈ä;&“vÜŠFõ¦Bcœ˜# ueåY=³knµ/ìi ¸öÚßåÏ·dž¨uB‘ŠIÏSáØ¥t8Tœïˆ„SˆÄŸ…|qk%_ŸKLZ¾µ?R¹å®+$‚1\æm}ÝÈ„£)ýª‡:}[×_Oßú›)¾Å [— ÚetZžÁƒ„URòÐɹºX‚ )äÒÕÙ>¹j EÙ¡Ìš…£!b¦:s²ü”u~äé~|ù ǦÕß--é‘É+$‡9Pµ@Ã0È )„BH˜žâò «¥Ü:ÒÿøÒq‹•½šsýeb³á7P8áœÝë1Ü]mïÕ;ÍTóZN?vµ;¬Œ¯R]™:„dUw9‘u U ×4ÎìS»ëeÎÉ7] غ”$ÊÝÈVõåêl„Ä‘gG5M½ÒnìÅ3S{B—é~Å#Ôge$ÌËzÈ!†#ŠÅ2ØE©¤­HNþ(ïU^IïȲS³¨´Å•ØN©”ôh˜8Wb¼‡8G¨®9¯ŠND¤ÅRZÞg.ô”¤N_7Å©’nì¸bóÐS&˜E•Dôå¦Ö(¬Tá[|­%+Z:õISˆ"d‰¦É[†Tˈ3’r'5˜·›©ºãvž”Û4’äþ¾M½jm¹Uô9ƒ9Š!Wlâ*yþ@©VñÉNM£É&¡jMBåçfE÷£îpÂ>máH ª´ï鯉 å®qœ†Ëå+’å‹úJ•W·QY[ˆØªWÑ®Zÿ™/«ÆZK1]LìÁD™©-äq]*|ÉT¡_ù/‚F–Ø1´§ãé*^“åºþËÞØº¤2ÌâŠ!TUV(e5(d¢&‘ÔœŽÓê;·VO$¤¤ŠE¥NÊnêÑÙˆQL‡ Ø2âÇ“¿Û´tþYÂZjîõ©öò4Ù‚§ˆ†™UùÌP„KñL9ÔAÈú‰ºÛ6ªeºN«¨ÿÕ×Ö‘%®*¶ë¹Þ¨A؇ôÿ½ä×Ê RYHÚ—ÔEQ¸¦k-  ©–#¢Œs);5Ò;Ÿ4–ÜÒ_ƒæì-$µŸ˜©åܺ°Á³*éË1…§9Y6dª¥ ŒÝê%52©NûÔ^E¬ô×á3ÈTb;é$ÄiÎòôŠ$ÔqM}Tú¦¨–ß1Ü’FPd­ º=LW;D*-+ja{:OÜm'¥ .åtmg÷ÊÓ„]eB‘“¹œã•ˆC VõB&3Ÿò˜ø·ÜúÍRÈ7“ðL,ÂXղ䈻wDEaÊv[Ñ3¬ø–o[¢á1V¹F¢Úþõ^–âÌù¨aH’°Å 5¬ÿøÉ˜Å…uN4¢À΀bà.@H  8´¥/Ðòó×| Gʆ|Šñó¶ÅbÿoÄft?¤9D¨E/¦n®Q^s"átvfÄCu¯- ÜŒŸ¦Ó¡ˆødç†#NsW(˜„ùUÐ'ýh~ßÔ¿·=_l)ÈQV¡˜È®Ç8½âo%òµÏ¢»‹#Ud¿£5mr_ÖjµeU6âT8€¢ˆŠæ9_ÝÓ»—ÿh~¿ÉÖãcU¸Uu'Ä\Ì}ï'OÔ¯ñÔš1P)Å!œFAN«×–zé«Fmû™ûŠ´Qˆê*©re1Œ„ÄåÒhØdqŸO/¾¼„®ž’=Þ†Öœëu¯®2¶k]ûVFfDîwvbaN},M[[þKHš{gê”ä6Êì!”Ç3é*„ÔEK Þâ?3×cq»'‰mþ”©þËV3º¼ä)“ ͈û[•½ÕÊf+*{®u¥¾PB6 ´úTT|±ª8QŽz†çUê¢+jˆYo{íél¡6»Z0â;m3…;°šî3§·•÷·xÉž4£¤ÉR§²ëIAj_êV¯ß›ÞÎôí¡Ç!ÒŠP‚GäF!Ê™…ökª“äìh”¾y ÌØ‹‚.56ȉßÏ’&¥?žSˆÌ¨1F¢PÌ…¬ôÜ}*lœÕÍ¡ý¸†"qfÊ)GGzª˜‰£U¾‰}pÝUÖmãÈŠ…¿%D!ªÇSÓ‰I𴯧^VˆR©ª½³Þ×¾—ë²jálrLÄ8Î9HåiNé èC!ªL’Ï]ŸG®Ó¿ š[šßWv)34g/«éËÛÄB‘ÌCŠ´;;¸†Ÿ%@¥"œ…£…æ*%©Â „gW±EF¨^›ÁR(á¾8DëXã j1ˆ!¢0˜Úí^OHd Ñ¥h#'#Ž:]\€øµÊHŠÉ A”Lʆ ˆLh #0hQ!”°V º,Õ¸[…8ý7'¶¤:î(Ža¨B22š—ºó¾rò"ŠG1ß&äz“˜0˜6„!š¥o:…m9Ž…ºüWÿ%ºÒ@ƒ A×t \’«`ÃB „PG¨pãñAjBÑËAP€H…! a¹°!œÄ¿`ƽœVQ‡ÓëEþ•  BF1!ŠÂLèn`a:b 0c;¨·^(Ôjrg$Iíê©È AˆL3¨†P²p²8QSØ&ãQXÔÁ— *»‚++­ †fõÆë«Ù9Áœ@ m ô s¹Ê_‹ ¥L‰ÙPäD(™¸†Ád2!3qŒ‡TÆr0Ž¥P¯vQ˾«MbŠ…bÈæP Âe04†Ÿà8Gh>VS±[æ§ÌAQ h‘°¤¶‹£¾*aˆO\Zó.®{(”C1Œˆ¬°„UDãpÌÃrFgcœQB¸¬÷À+ŠWœêï†lƒ#'Ü4‘«÷LV‘ðÒŸh_*!Bûa†è‹ŒÔ˜!D@NC †DUÎtX]Šõo)…–W 0ƒÀˆÆCbaR³xgbÃ7bXr?Ê…)ÌîÍpgÛ)025VÀì YDŠ Ì&bëL˜¬)ÊŽeb½®PÂϺF¡F¢:51 5°€ÇÌ­ÇÚ–US…^wTë‘LUT[!{#ˆ$Lf`J@f@`#Þ‡UçÖ÷ˆrÈ/ÔŸÑK‚ð… œàN70%¦ ‘‚ Õ"ñuvÅ¢¡Å ¸ÍRTè2Ý:FˆH˜Ä£ „ Ãt_ Eª(X«Õý-†Q;ÿÃd`A @Æ0D „<)Äåus…Gr±ÉÑ—² t_ª¥æSAˆÆ"‚Naa’¡Uã®3¡oñ ÛÁ÷¹[Ve¬ ðhŽFPOB*¥.qHQÙÖ*#t&75¦u[…£+!„F%2|LÔÔFc)’\T+¯žö¨Bø@r¯ÊC‚aa¡­£¡©ÙÑ_5ìÊzv?»Œ{Î ºØ´a#ÆNa"Id.„,Bר7q¤”]ÔZYÛäa„£50Ø1 1FGCŸº\U •R£3nâ(2‡4™á 9²t6˜Á°5—°‡/ÇŽrŠ<;¡"2Ò1Yƒ'aY¨A‚ AÈ쑽œü±Þ ùÔQï­HÈ”£á"6€B>Â1† €La…1¿ h8宋5,Db)9+ªŠ.2™ˆ'ü¤Â ‰òê¡Q1«/',m\ ›Æ@®ÉLC7±§ÚˆJ¸âÑQ‘P¾È)Ó„å=<›¿EN‘Jƒ°æ2F#ˆTº¢k»=16Q0‡ke,'ý…Jb›~Ô"uÓljrpÏ26°†V±œaK…í…³â+M¤#ýd²b#ÄìÔýóˆ†G*©D1ÛV¥q©Ú)i[è‹¶G—©1{–!Rô7³^*ÿšWb‘„(fQ]Qú‚u¾ïy'Þv¿mDmZuÊl'!ÔÊ¡UnÑE;ÔAŠ+Rýfórc¿oOšþ±oR.ã‘Õ,b´ŸB*=dTÍ×Ê#»s *’ºE[é±M󲡷•5Tëɽ[å(ùL„ßeADCŒ-ì¡}h'û;²Ú\®—èÆ^þËÑD7ê Ô§²ä9–_N;.ªï?•ïfCñ7XÞ›ë¯|× +™Š¹`éêÄoϯ ëb×LÝ.¸å-õZ$-0QI&«¾Þˆ2'cµh32°‚Þ³\u2Ú—,Gje–‰øŽžKní‘OI8”¶eW"öXƒ;Œçau,ç÷3õrC”ÒZÆÛÓ,”+5Û¸£ºzºÉ„£ª{)j”)ˆ]1PÒKTœ—¿ŽZV²µÆn®2V©™b*9B:B­ªvs[)k?9‹A­„Ó~åP©þ¬å+®Š[\¢ŸÊs‘iqC Ë×ßr!ýÛÍ!ÍAÔ‡J±-KÖ鄽jˆºÞCºÖºø–*— BLi¼EÖLò³FPËä)2MÉTrÛüä(F»ªl»:<ôî1Ó ¼S¼ôÔÞ!¸öû,çÖR#˜E)‰¾J³3dê„Âul[M¨ÜËþ¥Þc¹;å‹åûæ‹çOè[é£ëìÎÎH÷¤q÷ÌBñï$Ã’¥K;좻R†%Sö’ËOá:±¹QÌ.uyˆ’9QÇ"î8¯Ì]jlÕ÷Ê~οMË ìœé•ûÙnîYx‹†[:B¨Ú%–Ö•37róí.I=ÎS\‡UQô?EÈ©CfJ`†qF¯VƒŒK«#·ŸHæÉ椬ÌC!J)TSٕ󥩸ªÜ´<…"ã¶k¯ÅÂb¢§a ù=I§Æs¯Î8Qžã W‰ÚCžÔ®?noU\„ ÞõAq¼…'‰[ªb±ÄÖ""˜R)WÚÌ! ¢ûÛ$Éi†)_[Lk2ÔüúšŒYPd”e(ã„Br†~“xõÍÅ?ÔÛÍU Çw{ÑsáŸF혧aT=Ôçr»ÉK6j³fR„å· o/$Ä¢à#W!]?¾OïÆºøŠDsmÿ‚3LéON/÷‘tSÑòèæô£ÈS Q\W«¯ÕöEªË޼ôr»ãÓ}—UYYfrHo¸Ühþ,¥5ÁJ@ªÇ;V#G¾9)Aj.r#²J\å²µ¶j¡0HäK,UÕvÞ§JçØAC2È8s‰†Ç{R›îo.X‰cÕÿKó`–{=×®× …9”{bÄ6ÛÕ…ª²g¥D\_î]²–­.o!†\ŒýRxV(ïbv8ë&WÐ\~êZšzaƒ9‹¢’jÚñú¤Ye¨Rƒ‚8ê!½¹‹šÚm/èôIu±Û7Ë®–‘²’*Jj®8¢5!è9Sôv+ŸÉçY2ü$¶¡š£P¨*ùœ’÷ïÖˆÊÒ©C¹8P…âô¸Ø=tŸjžÆÌOÂ) lÆnxÊ«•WaFZýúóÊ9OÚ1sËËZE¿Ï[i4Ìu¹È"e/|=·C¼‚{œSŠ9 ™{‰Ä¯½J$¨rÉTt•…­ùËmúïS¸È+ð‹‡$¬ùçJ¢:”ÂžŽŽÖÏ8ÛÍìIE:Y¾B~ ’„®%|¤äÊ=ä¬'Ù¼¢Y%r‚ åK'ÖÛK/*PFæ5µØÚŠÿ-»E¥¸ÇŒWJU%*Ê‚»ÑEu¨Ü&Sä/(O«1cQ0LLžÐ´ ¯õÊÂ0Æb(ˆÌ§¯ž¸l|_Z–£Å«„„Ÿ¤rzb¢-‘³ …J¸RÖ!™Éú·©êªeËhüô°k&D<«ˆõÖÎ%©G¢Ž0c8‚¹m)JÓ[ÿ%õê‰)(‰Eõ¹ßMÞ,¥Ú¥HšªFç»HnãQZ"Y†9†WkÕ³iÍa=r…Û Ågg"kµzzVÒã:©3Šjº¤³|˜œ“ÄpŽÂ¢]ðf' ¤ÞÒV’¤,¤ªW˜…BÕ·ŠŠQ'Y×=+×W(»F]õÈ)âžø<=- êk`@„T‡W=˜E4晟u¢?¦Y—]+[Wšü#ÉRke¸LWãmËAZQ¤'!œ¿T|>Ê25DÃÓu<ý–õBÊUŠ2B+)4…KÖœSm¥™¶î’‘3î„ÅÚ!•J{«³¦\äD2ööêþý¼Õ[⺜ҳsá_A1÷s1ÔW!‚!*Å•íŽÛ¦w/ŠynK°Ÿ™žQÉ”žOªPèË5“¬¢”z"mwµ¤-•&\a˜QXcy?N²M%zÔ „E;ŠÂb´‰–6¯˜‹Ë¹{ªÈEòÔ¿˜ºÓ®·/L^›Ön_LldS0U3«•Xé)nÇ5iž‚±†sWÍ¥¨—›ê”zˆ1Òí⢩d.>µ‹•;%µØŽ‡s¯aµI·ûr÷UT-Ñe'Õî…:ˆ…*‘ #»D ™ÝˆJ·ì®ÄoLz4HšE&“ÄD,SœBÊ^ Ú©2™U–ÆûU­³[Rgo/Q3ÕTê„$‡,ñÑ%!¿ò¥ÅZ"ZäâÝ‚•1¤«ÓÂôûü]¡ea‡:è®1”â"õZJ-ÈòµRU"Ä8µ[J´t3úW €aÿøÉ˜Å†|Nÿÿ„?¾ßßÿñùÏýOþ¬´R(þso¨ˆ'Û†hE+mÛÓ4Ê!/WêUFÇRµÁvE"Kø—C}9+GµT“^^!`¹éc¿N0„&ràEJ^¶ãYEm\c>•±Lo¶ 8êY©†)™ZŽE) óõ DH·Ú DËo¹ô••ºæ5ˆR˜ˆvúä!h£ZO!ÚLWs¶õ>›þ$ܪE¥¨F£”CîvÕ„aMžŽîS­ Foô ‰\þB—v Žä…õ ¦‹Ò)íî¦tmò2øã#éd*±+–Eë&©’Ößc•:]c‰M² ´ÃPw7͆Ÿk8ƒ!§½ŽWxÝÌJ¥î§R[ªtÍjzí·TEe2È^Èw]ô/Ws-¿œ…)iºö.›u•M]&Hý{R1†i$úŠ"4KÔ QQ­ìÈÅ®0ˆXÔL2eBzËòÜ$«pŽŽ„1­"ŒoëôQ.F# ¥Zj¥¿ƒmÔâ ¥*ˆ0HY¶C.͹MZ¸ýSâ TH"¦ŽoRP¥B¡™< ÙŒ¹ˆDæ&Ã$D*üÔùŒrêq r‹øf…B êî0€˜XªfHü™ÀGå¡î £½AR™”®˜*àJnª Š Tp†)”I­†ÊdÂUÙ)Š’&þ¹i B³˜›`¿¶"ÂŒÈ&ð\¤>^+Æö˜äÊkyãow‚9ºQ„©0$>¨fEå¡,Oìq`ƒ0^I¢jO½ËLd¡1EXŒ1vñ¢`Ž DUuLGâŒÄT²—ÂÃ!T€†!JäfD;¹Šb¶t#@›„Ò Ñ‘ˆá—ÛÍÔhÝ”Š Èb•ç:Kˆ¢øpÜ‹J1ˆW2ÄÊV5üD!6B—0HÎÒ(ÂUR¡}ëŽfÇ." ªã>¸ètU*4MÈÆ› ÃkÔ:e#p†ÁûŠ"›7¦dâò;,u ,0!„ÚuݘPC=ªÝ‘F‚˜Ôa‹šóLQ¢ÕŠÅ‰©Q"RQØç*($!ECrQ„eƒëÇ]àâènNJ®FV9L+ʲ‚€ˆ $Ð\¾ÜV0ù— æi‘Fi„L…ǽÅ_N­r cvùÇÄA…ª\]B:šFZ%‚JÖ `× »\îW1L+©êe•‘HeÌÌ!ÍòF0Î$f ø;CAg£;°ŠiH‚*ÄIÉeN˜NCt;ŠÅÇeZ… C¦âa†@†Ê3Þ!ɰ…6ÃL3M%BQ!Š¢œ8´XC$£r½LìÀ0BÖ¸ˆ¦#x2˜¤8ŽQ:Û" S +7vý®P"örÐX­Ø2„ªðSžÖd„Ä­Æâ|UsõЃH âcb05‘ØqLW„¬$á=’ $vj‘-,¡åõá ÀØ gD/ÎØâ1©XEôÎÁ.&.dåƒÑOá‰C#.U[±3Ï7]©˜ƒc4§®ÕÉ…Ñ3pÂd2T´ê ì’'¼íѵÌRZ˜Å@b™ H2‘R?:•fÁˆòW•ª“§[²•Icb†¤Baجã¢q38åWäƒ!„‚•“Q$ŠPpÌÄ4!©ØÊíÀÛž ä9ÉQgs˜nð"1D^G€ÜA+Aºs’|Cþ#Ec—K_{+Üë^!‚ŒÄ 8òµ(¹ƒC\`´3Z§Bø"ˆ`ATÄ,B’•ßϹTÆâ0Œõ\£n~õI؈¥‘]»ÉZõ¸ïìs±¦™ùõŠ´N»±.B•3äRÿÒs.E¯Ô”=ìc·ªñ|O•y}*¶m•s‘Îg5jÄKöÄ/¸…TÒ뱺µB!.îü%¢ôJùŽBß•8ÖÛ%Š»wgS ˆ´bëeýœÎäû:!i¬"½_ý,RnŠsYµG¦ˆÖT?ÿÄ"=|ÄH¿“„TáXjYe]ÌÇ6U=:ŒNŽ_É-ôã¾í[Û˜»îSï)—2Xƒí’ ¾)Š/ÌhÚäG›E3Y.™˜A)µýF•J¤CÒX§t?hŽ‹¥zuSŸyŸ•ÕwEboq–ù*Ì­œÕaœ»‹¹ùÍYÙ_ØÂ1 DÕªõ+‹eqú`¥S\öÍjã\d<®do;¢ÛÈ*M™ætmØŽêã©5¥;fÑ0ÓM*]»5XÉÝÓ§ºC ÙL\z fÚ réuû{ÌfìÕï1[¨<¢ Ii줵ƿs•¤Á…ß×)ó. ÍnÊ1mG)7}Û¶®d"wåÓ®!,»–zá*`‰$Y©OÖìw×C”|J'Í_Õ«Ôv­¬0CóÚ¢8b°QŠÒ`uZ=Új܃#h„ø¶ÿb0…ê8Giª"ñ›Ð÷§•fà¬ÆÀá²Ü9Mú–w;½$RLÛ³Ç2¥4R) ª¦áI~›ê1ßåî;²G~ñ­Esí„LRÕj!ÑE·U³¿(…WëˆfÅãR’b}È#‰c+ÖÖÆ¥Ž)/[ç-D7%jOâp:<:4€,€#Ð8œ–-¡"¹?ºÆ‹ÌÀœ3Vò2-„”ßöžxL ¢7ðœû¤²È‚—Ä"Øa˜WõI Ó3bR¨RZ¹˜£?(õÙ¨{›Õ¿=h½*U¸¨DùP¢‹gÇ%ÔWˆ— 꼦¬³gé½j¨ä»Èé‚'vRbx«ä#Q²‚Œn%;7äFª‰¢Û«SU)!nK&o•Œ²2œŒ"ÐŒÏÙ%F\Bp¶J*)(o?–2fœEgú0E¸–zYxæÌ_z²YÕ÷öö&—uµ‚X´¸nBÇz»{=ÌŒ:© bá2ÜQnü}^Žò1¸T:Ç& ›ûtÄÄ©¸‚=Šj—Ùý5BÄ{™§Û{–„EF¡ĜՔÃaXZ<:Gb ØGj†;JeÄ"™Â”GG&C#9…7T+)§¦Æƒ?å=P¦ì Å `œ&ÈDƒ–R„¢e„B‹L(Fà”¡©Ë™ÿ>PâUvéJaÌHДd•›7T1ÂS`•q‘B1ñ°p…5XŒÈû÷•&¦,µ¨HÃ1%.*#U:Gª¥‹ŠCÓIJšËBš¡^A3^»ê!^B9K˨ß#QŒK¯X¾NÛÄ‘GÇSbQóêa‚s*ç8TÇ_+ò>WP×,¢Y+ KšúLRU‰BÑ!¢½±—Lb µmõgAÜôIÙ•Eþ/2á…Z–¬^Vâ¥ÅlYIÒ©ËË„DÒè²½N¥1)Âbcrâ­¢ªRÑ*]FyÓœ™©¬¹Ï¸ÛC ײÒÅ‘¢e.ˆy½ªBY|ϫǔ÷b/”œºäÛX»¾ñ–Eeÿïį¼—.(DdóЛ®"ŒõãDYÙαfä¶dº$Œµ\VÄGÖU¦-Ûʽ¿Ì,ÊRØJ› Oc«kQßhúŒ×z°–\¹¥%‰Fg³UƒŽ¥n]·{o+„ ³|iEskr#²Ñ1ä´2’Gšë¨óˆä5Ëysbœîó¬CHP‚åHÖëÚz-¬ÀU)(ê¸kµ¤·¨+¢T—-@ôšQ •¡ 1ìwˆË챘 „$±U)By²„^t©h´>$Óo+žœÄÞ™.£+¼àÄXyas’qTWDM¤Ô£Rá‘Ï.÷ù°Î¬ŽcÑä*BC–çë,da” ùK²^ètÿN² r¬Vy­Gw-Ž)ލ,0zš¥D6¯=+rƤ¿àòçOÆ®3?Hç­ž'iŽ™ìj™yO3h6â79'NRÑN¥3B)<·”æâ—W¥%žç-zG5>(D3¡é/½²³´„2T8a¼IVpóUëÇ;:­3(1 2Q rÎ|«PJʈoÒ)ìž3ë~®‹5©ŒÕ!‹rC¦fÔÕ‹Ádx‚ ”"¢ JkŒÕ½rM¾V÷%MB{üÂç,é‹s„(J/Ì,Žwgò§+P\­tª V%ú ZÂ+%†ÔáVtdbx¹MŒñLYPòÊRÃpÿæ@„§ššÏåTV깸…:)œ#± {Še"Š\'Hׯe=¯JÂä(æ{“m7P¼´(Ïňs‡.^‚/”Ûø˜­ì¤ƒGõ޵³Ùp† Ŧϫ2•T Ð&ù„J„¨¾Ê19ž«ýæ»ÜšÁ,.P.Ò°F¤\´ÖÕ•E~4Ä c‡s}édý%­Zyq&³Äj•W9ü¯T§µÎÖ=‘]ÎS˶æÎät$Tp iÿøÉ¨Å‡šN|}©Þç†|•³’eÕ§ô0Öz †m ¢…[0HxÙìLRÉFtýÍ Câ&’‘ˆ9Êäï’Wj–eE5L·Å̉üßè²Ôß¡»²‡.š!…fä#P• ‰!7U…³»‡ £ÖZ}ªB¡X¼=ª¨Gb†A‡†ƒø))0ê(A„ 7â ÝË}ˆu§T“d4…Ît×i#-k5d£Ž2”3 æÓEau LúòG–¡T¬/år¤¡‚±}frG0ÁàhxÀE¶ÈC‹tôúiwþ·’¡ê‰(“Ök/œd«ÚQc9C b%½uK5% ¦’æ¦G¡}$‹D4¨¹st Í6J+­Œ3û原Òì<<°¡‚½²azù1F$®3{”Îu¨¤ ÈQMt«BÎkrQ5Pȇ¦‰™dÛžÈü”!ˆ’ —gã E%kôhÏÔ±(ÛlîÚwjþ®Ù=ë¼aEXC¤Ñ6̸éaðŠ^uàÒ?ÏXAAB—÷$–eJ2E‡bÏ-ÜŠðƒ*³N7+Š…Ìäo8ba3;‘rÛ‘v™Ç"Îhà #çmõÛqÒ ’¢=»¶” RLœ‚úÛD öR‘ a,/Õ¦¸A4.æÉB¹ÎB8û7î…0cN‡YiŽD7Aï‡Õ"mØÍy’ÍŸâ t)‚a·$!à ªgób!ÖÅò!5Cè² åó©½tæÛšÆŠ! qÉÝ4YˆAë_7 ybZ`CynÏ-¯B+‰|¡n’ Ã¯¸³µtX¯ DŒYIZÄ¢Ö$º!·0¬\çÛÙjgƒÏÖæÄ;që´Ú½™=œ,‡>¡l6ÙDbЦ8P!g…»Ž‹@FL[“ Œ÷™šÓ›„ÂÚ‚åOR“F5j¾Ýª—\bÅ©«M(RV†–k®Œb¶QߵܴìC—xC (á]–Ã/£ N“Ò‚w •Ë}Û‰*V[ù")Ž«èõH–^±Æé¤ÆL}9,{ YVRj\Þ¹ïaʼn<š³7 «~yöÔ$é ÆiJuÂOÒnO(3½‚JÐßz#È0ë+±ƒáyl%Vã?³H'E¾Q(1FNvóûé”®"ÌQ²* fMkN‰ “Ò5¢Ò"YËÇ6y%Uiò]iŽq‡&±Är2&`jÜ[Ò— [Û Ô¶äÄ!Ž ²¤šZ Ñ—"žË-ÖÌÄ£çç) êšLLmk<«×[‘ü]ÖuL”qäu”ÎF¨½¢Ô‰(Vôòu7_Tl¥«‹#œ8a¼´©_· „ÑPpý]ÒBxŠ(W%ß‘<ª(¡’Â[ltn>c3­Pš§ÿ< –'Ø»I¶«eYÏ!l­+z¡Qé5°u ª@„¡˜˜/÷íœQó¬O}I´2LÄ;®¥w£†Ãµ”Y2öÌ(é½¾Ñ)$ÈC–1µÞ–Ý)Fpé%mUäs5K,ªÁ(Ò!?†YI‚t¸ž1LQT,ç©K¶änG÷ÂÖ”ôu+ü‘v¸"à‚ s^wP¬!Xˆ&]àˆ!B6`”^y[œÔ±¤¢™ð0³¯L–* ²aÈÙ`ËAy>J]e?üÉTí\=»ŒGåB{s|¤Ô%È“pý]‘e4Tk®‹³ò åK&ï4XÍG|Œ-ònÄ2Oi.™i‹§-äOÔ’Ì_óÄ$†ï7›×]IOÎS%Ùê‹BÖ†J§ªæùnøbå?«)ê¦)šsJì¥^!eA˜ªat.j•œdP§ŠŽM'"bdéÇZl•¾n´e9IRá Šò)µˆèBev5un-ÙyÝÏe„/ªŒÂ•Z¬VÅx¨ê¤òOF¬óíj¡QGÚýh‹ŒC”ó>˜dŒ!ßД)¬¸DÇÕÆÖõÿÕMdº“†)O„(â ³{øã¬†MÜ|~Nê‡Ú×bÊFUÂ)å-Ez«è´*,ª´tzòX¬O}Çç5×ãeu÷…^2x„»¡Í"ð©B #¤¯Z#xš¹”ÿ!ÎÏ—òmh¦™¹BÞÚ¸•IFS, —fäqŠ)b¥’âitöI¾Å«ËíF³×–ÏRŠaD²ËütèËòf}G#½ x­C,Å©7ˆeÞ ëõU¢”ÎPËq•µ.n§PN_l¶ZY«¥V2‚ ÈM#”TÚÄ£Ö11K¿ ë s!¿‹^ˈ‰uÇmNÃʬÜi„RNz»—-lL W˜Å\wά4saVÈì‚2”Æ;<ë¨fCSÿÏÛVðG¤Ãõ+ݾ˜ä^)$ŸêºYÈAsu„åuy^UF‰Bn+SEZpx[þÃþÊÿ1?ŒßÇÏçí¡g¼Ò„›‘þì9¾Ì3Ô‘([®£o”(Žnþ-û_•2Œ^¦W•½êÝSzà†%~–…*ÔT¿U +)dy/RôÛhè¦G!?Njéz)Ré¥l:cQ2íØ]1iWÉ I'³Ù‰•™ŽÝ)PRáMÝ£±ÌOLO.‡é29û¨ç®-yŸÇÝ®Ù5—l¤T3­gö†Z`VÝ)+çÒ.b•›ò¤¥‚¼ÚÒžÿMúÁXÁDs|O[&àÇäqNDEo¶`ã š­i],†k¶ÌDå œ'zîß’µ§­{$Oí›'qè*Äb³EÜ£¬‚o R3Œtq¢¹NØé!ë‚ ŽF+Ç“(ê„)¿ëÇçåf“óo¤(ŽeÇËé|u ‰‹fòó§óH³\B µOâ‹çe»]Ö/W5LçQÄQ‰—]äbÅo2}‰ßùI$O#ùÚÕ®]䑬“)+QIè²’_YAËË×bò3©.×· Gs)PʺG¯6*݃•\VJﻫ”2ý7ÁrW-*I,ÛßÙšÙEÿÞNâˆç)Ë^ó<‚3é“ޤ–©Û™bZ}o%E*±¨IÍî1ÖMg&Xå(æSá0ë'P²8Ä3oÉ/SŽ«¤/I#=Ò¥'S%*Láóóë˜*‹Q;L—î¢É™õ]rUUzªuáJþ’~æ˜Ç …LD%y¥D†k úöN'H„ßÑÉMôjâòוÞÎB±Édϯ!’G;1ÝÙèËÉ*…±k%oÄK ⤻˜[VšŸOb­.r‹ÚB‚š† (Cf Ì')­È$OÍžŒ Œ BQ0OU Ù…·£=q¢ñ™9ÃS±¤ÃøÚ¤#](ŒA„ᘂ H˜ý!A(B`™\†W(”©cªZƼ ÁKaùx‘©ƒçÂìYФ®w؉E#@äyR-(Ù€€BsAða«!š¬£y¬k.À­jÁE!0™ÑqpÖ¿¦ˆÔ,8D)ABer áéÐ|¸èŠ&l/‰Ð1”mÕy¨DÄîA‚´D0€MqHÉÈ 8€©Ìlu$¡àÊ»Å*Ÿ—4@†hÈRªÈQŒd ~#RÁ„ÙÆFêrÑP# „K™œZÂ#(ÀÀ8[ë²V€‹ QUs»Ö¬@" -8ååTϨA3³ƒ:ëD\Ø#¸DLzEfЩ@Ì8O™#8Â1†\3è(PDr^èBƒŽ!]•½QÄ­©P©Ìm‘Á‹ËÂï;Œ&æ(Ñφ†Í >V>†'ˆ„ î@Ÿ äÙËrÊu¿1Áù’$”0ÍÞõâа%„Ç~È!_J0œŒarÃXAŒ ®+’¶c¥nË>*V®@@ÈÕÉÕ…„D8e‡áC Íx¦H6"ð”°¸`(Üà…fŠÏ#Ä<ÅaÊ*pÂFL1þA<|%/ÈU!qÓ @¥Z‹r˜TEÐÜà FÆA”«Ÿ±˜ÁŠ—J-ˆ¿¢!Tµ¾¾JÎK©Ÿóvæ+!‰r¹ÝdêE¨cnD¡ì9 §EÜk“…þɤò Bè†ü¥Ózû†}c§±?2…··6lœ1õn”!½îå«–­Ä WEí Ѭ+™ÍbÝ}È×ìþ*¥¦ïß¡tV½)f˜f&ò%ÊÔ‹¢ã™1n…= •éZŒ¤çËóØêÚ|Lqa<¸WtM²'?ÙU‚ª¸DŽŒmä™c9ˆªf#éiF³”!(›töݯ=Éú´©,ŽbYqõ¥k³õ+f–¥IPŒ´'–„JWº‰¨û#¨…,Ì*q™æ3sB2ŽZÛ ý›¸@79»E梆ÀkÁbªd6Ép4H„`‡Ê¬Ç:„#¨ô(¥pªšR„2çBQE€@ƒåF"Î f5˜æ †Í1‚8Ê a)På/8¨÷I`FpëÙaXÈ ÍšÅàÙ‘Ì U2œ&6ØF›ž1 ­ñe[dŠÖDtµŒ@Dçû_SȤÖyœ•S¢`AK%hË~äe¡2R10žÔ¸&Ä·$B[3QÖU{\ë"#è?­Äõ‘„UåÍEoº U¢ĔϔԮîó,iÒ¤cŠAU[m m¤ZŠt§"‚¹ ¶£Å+y¥‡ é‘[JzZ ”ïw‹Lq\¨D¥%ÌÈ„<Ö^ÔQ£9ˆ) !ôŒrbˆU-¹‰ƒ\”ÛX—žZdÁ ⊅ â÷¬½^./·óÝŽ¥ïDœÚj/½B¾vµFB³œC9Hub©WÜ.“íÊo_1èB)èj8ONĶ'eYH)+Ž!;x›­âº0‚LŽFúÕ´†çîíïc8¡DCIHኯìDçs›I|­rœo)<”Ä3%ÚäTòRë=6C¸ÂŽCqCg‚{Ê_}©ª}ïDä^õtã©Ê@‰•&¿Qõ˜Û»0LÓd»T$ Eç[ZÂãëo*V'[Ë]!LLÊNew¦c²qÑÂ<®´IS‰ÆT¤í¬­ªÔCS#}-PªÓrºåe2S!ŒCø¶!x«µt9îÅ_”ô[í½™›£•ÑÎÞ½ŠÆ2ÑHåZΉtÑ7[V˜ÖËÜ¿íwKëm:Ã.ZJ’©Y–¤~Tþ§5ˆÌ̾+ѼRˆÆ(¨o&²Ê*‘6·™†~òà-/8¢9¨ì˜þ´)-ÔÁ)º´w™ÔEâ¶©rÕ>-V‹Ï]"ú´C }Íe9U' QIÞTVTÊ÷æìcs·-âä…šœC›uJâ¥DB6ÜA¨OBýÞì•nb±°öŸ–eþÛWÄãdÕ#U>·7º_^²=‘›ó»š»ÈO' J(B}$”•µ(§Cˆ/åB¹ÓŒÅ-+Lþ¦)‹TÓqv‚fj™hd³Hê– ËÄ¢-“=”¤5…*±Þ‡-ÒU»K!(¤•q;®oZÕ³•–Bálbm6t´¥¬hè2•æfbòÞdÌl~Q®þÎüšE= „y2Åë‰g·'&jñ6˜Z·ªÑ•ÔE°®2S~z1Žô[+ Dó-P¬Ä²YÉf¡F-™„-_é¿Íí'd»ñ\fˆn2ØôelÕSП‡òú¡Ëf¢¿óQyYØÕg–û>ÙP¦!W ›qØ„<œOìvªy’º%-«‡L/¿•ùr¯WL!6©GI ¦Wú½“Hf-™H%¨Y@¢›ùk2!„¬Q‚ E|±q^…à,!ÉphK+Ÿ…g†q¤¸Î'³Ôƒ¨ÀMý‚™ÔL<¥>ŽRîÆÔ`‰¼PÈRäT$k”Ç1ànÁí¬$*Q± CÄR–ÄDúí?·y˜…U)Äb;0—mÆ! 3a—8åŸÊE•kš`Ì„`9Î9‚70C@#¼, KRŒý/tE­  "×-A³´ äXAÐ]¨¾ÇÔ©Ë q\£±bö¡”0c C4Y•Û2 2Ø Ž*” sH˜ «Ã–‚âblñËÎF†EN·d PŹD(c^Ì8„ùµ'hÌЉPP`RHÙÄTl¥£ÒžPèJci¹c…!þuŠ»`›¾ŸÂe凋0˜‚0F@†sJ'£#"aŠnÃÜëå•¿I±5ò…QÐ+a !˜ ƒ £l/Aì}Ú)ØR¨ççôÔ†„‡´+°¤Jfd Á68›cVÂeLJBIGX «ÃÄsêˆ!jMn›7»=<„jb¶5*HI\œÆ»ZuÕdÅ[*îÅ•‹…e¢J²!ÈVµ ÛÛTMz·g7þäß/EÛ Ã B]4…Ò+iÜJˆ“¤e±`¸i)¶ÂîWõýi奭Zg>b­µþ/g#ˆc¡Ê êá ®„MZ ¤1JR9™t˜¹üù‹®ÔC6»×›ä‰Æ”Ap†&¨™oýVQT‡AS‹©]â°ªâ+H¸|ìü¤§Pe«óE£*o>e16éc;Ð^ðÚH–/ÐÊsŠ2ªïÛ©›Ä C‚°¤ß¥+E[§TͶ׭f½ðµ3Lލû7_ªŒ…ru*iädiЄW[ˆC*+]›¯dÑ2šedf¢¿Ýf¼BÔÄ;ÑrŸòßG\Äda4Nmn"7SyÈà¬b&¥ó«FáDpbÞÛCêÝjÉ™åÓV_i(ùJíäO;Ü•) /*°‹!<´býMf^~mApZg£µï$”—2îÅ#âÆú ²++‘ÈE‘˜êQ®b§ŠøÎB …u9DЕ²JSˆVŸ™V¥¤®KUÃÈQÆdBéní”R³#U!þúY SŒ‹”|îíŒÅU?†Û¼éRn3û&HÇ+zµ©^‹Ü—QŠr¯G²õÎP«(ˆfø•Õ7$»›©ÎìW¿ZI-|d;â7Ôn-¬EñÖ1Šœ$í"»ÂŒ¡D¸È8†F8«)zMêúÞE‘ŒL®Ûó²·MΡ2gà ‚ïW™Mb§Ÿˆ¶¶/HÎê#3™éì?vTŠÑqÝ3?˜¸S5óò‹ô&Ê+÷ëóùbúX¨LÌ9 §j…E+TASeÆó%Q³öÝ%•LßÖÚKçâ-Ó6”¶ï Ä¡ p¨R)SZ›)Ä+«½ŽlÁ"Êä4Ÿ,šžCq){fGO¥/üÏe!ßÈFjö*¶0¡) 5êDèÞMì­Ø`ËÇ̰¬1üE(…_ÖŒê{_>çTFó„EÓzk¥âD­‹)«ÜqˆDmÒ¶=˜Ä ŠfN1|]mëLv•¬9>[OÕø¿È·9gü#Ŧ{à®îS‡25XFGUä¨e!Z ÁŠ! ,—§Å­u¸†ÇÆÝGŸWæÏ)Ý÷ ø–?£ë-C†WÊÄ¿Q‘Øêë+ó}ܨÉ(¤) Ås ZZYd’æ ¾”5}û-Z^þä+ö„‰WGäœpbQ»Ö–¢P´3ØM!ðKSç麌ôJdßÕZùtwâÑR bõ SlD¤Dˆå¬@QÆ$ÃïNÒÅ“1•*VMw¬^óžM¡¹Åîô«óÈ2ï®û;<¹YÔ¢s¶QÌ˃˜*¯†Ù!TcŠü,gÒã§¢hä"&¼•“¶Y¦‘$É ÊjÜD¥óÔ£#¨(¡˜-*–l×V¬-çm=²$óñF´ì¦={fTir§H§+™š¿Ã ´¶øêÒ4Ç s±/­óô“úL(ìý³­yeë#…A„òW$¬¾å ë{¢ÄÊÏ$…ÙLKou¢ ­(Ê;7ˆ£:Ï $ü`¢§qJåì•Bjè^e_Â'7uÊEw ë1>Ò)Éô;*!פ˜{ô¼]+ñoS¹å“μHŽúbO1Y˜aǧ)•!’•¦XÁHÿ÷4‘&¢m°ZÕ‘J{J…k|×)6°ÇB¨ZÈ+™XŽìŽ%¸ÖOEê¯Nòbæ‘sékœ‡?;I/×èØ‡j\8‹Þ[—iÙ’çÇ»¦eö)„nÓ²öLUC¥U« µÜh’æä–Ρ%°×y«-bWp‹äàŒâ§™×… 3›œŠªæIBwäFêm­ùQ_$$†ôÒæ$ÂМԷñ+ä8#ý:ÂÊ13ù,™SfjŒM稶 ísH)(ã˜c! ìÓw}ÒÏmæ¸DE‹M­D–”Üâèk§%ngÚpC«3œOûDÅLåÍõ †¯ ä’y˜”û•k­K 9í’ÄBQH‚˜U¥ìÙøª¹ãŒ5¥úR|Q BGµ¬Èô΢¼‘e—s’)‚˜¬BíqéI¨‚=ʲn¶îœZ*èªõˆ‰W”â‚”¦SñRÔŸ?H„¸¤@Etžõ·I¹×ÏVu’“ÿu_–wQHGË[—Û† …c}vû÷ÒýTgÓi5©|)SEd¢Xìs®±ÄaÌf¥7ò^]RŽÅËqf¼Ð×ý°âˆ:¶þRj—uYK͉Älé­Ê¨:Ñ6œXE,ËS¼ª›3±[6˜}FuC‚ÖjtL%¢W·Uer[è…•± WÇûn}˜aØB½Ð–1Ue|òYÈ1 )¢k®ùK6êù%I1r¸™[Ùl^ÜOßß§á9„3);êëåûá¿ÞGÛŸÙëÙWÚ ÎLö:¤uåƒSäZ¦a(#PTÊC˜‚1g¡n÷/¹1“½,KQ¨×ÍgyI*³>ˆ0úEbæ"9â“uÛñlujÙ&Ôþ«¯'Ô&/¦Õö&¹YJÛkÄìžÔÞc+¸9Š6R®;mrú“Ü_ëv=Ä“²æˆùB™ÜöX£J-Ñ$$dÍ¢L´ ’Æ+H¨ä¹s^†5â[‰w•û}TcD^2u>DDs•"(?xáÂÎ*P$]ßÿËÚ„©íˤ̪ uþDq5ËE8‡i}L;äRܶ.|±“P{®4¥4B·¼Ñ 1ÄOJr*œÛz„š= Ã*‹+>rý<ø¿ÜËÑom|,æÕ´ÁJ2ÑŒ]fbªv¦PZßFãrÎT Ò¦L€Š Bȸ* ƒù÷¥¯JË$ÚVsNf˜ @«-¸!]$ð¯®FF·6êÁ GljßNqº’xôyF)R0pë÷8RÕE&-½:ëI7KÝ0ä.Þq°Iè=ŸÈ^ª2X`QÛ9‹WE>Õ ýSÔÒT}ÅJÝ(‰Œõ^™¦!N×t LÖŠÎâ¹ÅÑ G§¶é4%´¶¯úõm!üi’sªD ?Éd£D K4"$‚ëV=LÒAç<ƒi2znW7*¶»ìc¶‚¼D2>>$[ü/×)227)ƒ¼¬¨cÊ÷ÕbæÊ© ƒ”ÚÑü‚™¢Hp«È"‡ cÓÁ#MB1éäÝÕˆøEFAM”eË4è^&I[ø¤Ñ¤GV¨Ê¤s•¼!D\¥ËÖÏÌk É”±"›¢ xõŽ2ÉÔ#ƒÈ8Žáþbª)()eÖAß]C©¢ü[[(Aëz5d¡ED‘¬^*Ø)Ga¦)#˜‚9®ú­Â©ªK¦oE Öz =³ñš§/rF*ƒ€qZ€¦(j˜3SµO‰çÜâå¥ûðÎ[k<²ŠYIu,ÇÑ-j<­0ìÆUuŠrdOËË/Ћ\üÙ´¢i'k†øâ3¨85¸Š’…ëúå1_MÕšæ“ÛâW& ¾AX± N~OyŠÉÄ ‡B N(‡%c.E/½~Ãæ÷3’“0Žvo×AbEœd~ÜÆ¹„Q.vg¥Þnš” †yѨoÞ.Qж«=‘t8ΣÝHI5ˆˆü,­ÍA»³„~¸fÅèF^z¾²qѱ 'š€ÓÔÄ ‚ =&q qø#óØ:ÜI–Ó”Èv¢ww1O‚åO%^Q7Qoä$ÿ R&(ˆ+ŒÆ¹Äc¬|Œ{‹g.>ýÜäåÈ$ øB“‡G¬ï €¡•)(eÙc n~c[ȳjSÂÒvAÅÚb}¡Ri&KÎñ—y† žj°2h¢•‘’PŸ…Ë~¬š4ž5xô?ˆMÐ×­ü¥Š\Ñ£§0S¥Q„\SŸHç纛 A;è)¿”«,Ä£Jyfb t BˆERœ”VN%T’‰…­èoŒŽm¦Öúx«u°±#^Yë` T›Zˆ!ƒÊþ…œ®uÌÅ(‡Ùê3-ÅoeCðCR(N1$¯KD­á-b-¾¤ÂÕù ’¹ ‚¨…޼Y™e3C™"O2Ž¡§š]6}'Sv¢'ð*ºägå,$†Xí±œR¥Ÿ),LɣƚA¸•ã®BŒh•5Ð÷kßd^Ø…žä„Z8¢„Ìáã4¢Ü¥¡)bO(J¶ÈB—yèÁ3‘Ç@„ áYgTZܺ’TÊ9õD Ø“K5#¤¿IÉâ¡…g´^n•:éj'z¡þ%…ßéRÛ%sÖ‹YÊ„vx¯¤89 Z°PëáÉ1fЦÅi;úö–Ñ:€U¼Qj „ÁüÆËR`Lj20P8@çQ G(SÊGDÆscS¦ âawo¦ÆkNÉE•T¥›‚0âkÏ9ª>eÅÖܶÊÜNËu¬Œ("‚>&ú§·c“Å@Á‰0T)¬÷2Dºí"ù«}Öµ¾2û¸‚²ÔÒ!„I—°NÃT²pü5ö†1°F™°3*Rf»ÚôŸœðQ0•!åR¯…ȵK¹®íŠÈˆêôɦ/W¶c8Eõãu;JQmˆõÿ\Û_NÚ­ 1$%’# Ë(Õ%ç=Î¥ÿÞ}êLB££DÃö¶,œ$‡ÔÍ+ÈA Eˆ#È삪…$ÍÉûNWõ>KZÚLV-A7e±mfJ ÏWažU*³¯”ëtÃgá°Ã•§I-i)ÏR@Û9ÿøÉˆÅŠúNúÓù½ùRùwúúÏûÃü׳’…Ì _}s¸Ýzc˜@ŠT †ô¤¿®Ýßd9õoÿ\')ŠK2%¼‹Lš«•ì{3”þÈÃÜÎ#ùÏÊ0¥ª/ ,™YSÜš€P£M¿_r—õã²J¾¹E&ù8Ò~ßôž0“¢$W˜Õ±(¹‚õHÅ%lÔJ_¹²¢\L+DJœ®½%Šl¡´Ø¢¸®å9¼™Ö¼6_Bý¤³5# u˜ÜPÜ%•?I1V†¨Ä£­¤§R„V­5·ÓˆI}e7õã2óÇ(‡}°—2Ý‚ ɤ…É«]¤RÌÕ3¬–¤5¦%7`„0g1•–§¶U0ÊNÎ"éXVÆY jô¨FOŠzy9ˆ|J1ŽPbJƒ1—ÛÃ;¨¬µ­yoIbiºTÅ8ŒÕ‚ü50M´Ä9 cƒ¦ƒrËכĬë# 1–u)U\Ï[/®"ò[DiÞ0£$&4¬zÉhÍÂ3»ÑTúZŸ÷&¥9‹! !š!; “uŠYÝÆ1†)XÙ¯kÍz]ÿ*.Sˆ”Qyu^¥°Þ;…EBÔM-rkUœ×,ì”êªk…ZåžÒÚ›uh„† NÉH%"ÁãhqÌS„Äb®±mê7eíe=ĵ`螘,öòVíGh"9%ï '_~Å%@ƒŠšp¯‚ÈúT@s i{˜›ùò…¹LçjW>4K\1ó\!ÈtŠÇáp÷ãbØ«)”¼å‰!,ÂyëKoß”çG°Ž11[í{Qé…à d]/®ÞÙ^±ýp½pæûή#X‡ßÉ?fB-@‚8 `Ь‚(Y*ˆ6,Õ*щ5Kǽ¨{Ì”[æV{J„­1:ô*j%>šl™Áš éX·}<•'Õ #I¹,ø¥zH#0çRR8½.i&òðL#£ð©ÍRF½æë!Óp00”ÅxHMÉ#Þ^aõJ!T¯!"!rî:¤Žè‚\œXà«kp;,\.«JÚ«vIŠéõêÓôÔ¥N¨C35,*K!‡!pä^WÙä©”­—gkÕà¸èd¡ÇVU]ÂT©;K7E>Ip•JXÇ^lÖÈÑåêˆB‡)L¢*lÿ¸Z¬ÃF²»ÕÏq+þ*}f/Kã8š/¦¹ò‚¸×Á*Â)ö|[~bÌÅ[ÖbnÞê²ë¦~ú4ƒ¥D©f3'Ç Lc¡ 5DÊÿQÞˆ+ӂ쟣¾‘Æg* lhšI}(!(¢˜b ú“xýB b˜†GÊ—†–§ž÷ÖNToíÚXT9ˆñDaÚ-´Y¬ºNê]iMGt²¸®ã-HyÄîT„Á{ˆ–—ÐJ~HÒŒ9‚¾)>I÷BLB–UÑ%­ÒÍqj‹A>ýX–¨Äû!ÅgB1mÎL2"ú]uF!ÙHåR?ÌLÛY¯Rñ/ËÜ”Ã%ÏZ«:®kZN%ãSäËJ5÷îæ.-Kߪ…=Ì”c”â:±¦ósõ&5>”n5™¥7¥j”}5²¶zÓH߸vN%MÑXW:UhÌ„!Ì“¨"•e¬ù/,%VÊ¦Š¿çŸ)!•Z ¤•ÅC¿Dz·iš'lÕÄÛ!¤£*býµ·R™7½ Þ›DaÚ(c“»½ Ÿi‰`ˆrz#Aâzu¶Ûr QÚufÜ|Ö²uÙUÒëÌYÆk·½&¦©Kê¨d*-‰ô®å[ܬ•™åF‘ºæªÙO"ä´»‡Š´Qì:”Â# Zæ^!2ˆ®ÆÉbÕëóK¨¥E8ç0¡{n$JüOÜá½b˜ÊÎ)‰´}›7øº]R;7¤„¢áSa–â©PT ‰!̃¨côøBZØ%Ëb£%Ê‹Zmâ_¢XÑÐt©ÉJ'ß),©E¨¢Œ!\˜±0\úµpžv£ü«I‡‘”ÄŒæq †'™1NΓeœûXµ ZmebÕ"ÈÝãôKÕBqN+ ÁF1’Cíð±h_%W™*#XIÓ­ûU¨•n1dE±ŠgŠëö±Jç>ãò"ò!lªÛÄßúq7^Vc)JFå‰Á;×Vb…v 2œÿ|I4{b…àžTv=ËÃ5QèE$„¢ŒÒ‘a¶ûØ_½U1’äÆ1Nw0äS=åÍ·tœ†ëZ$ŸJ㪈¢ŒX‰“¾¹m¢Ï-þWËUŽQÂ#ÈiqÈ~zy«éa8IJËN¶¢IJX檤¯šÐĹº„L¼|bˆfB–61©4±«vª\g2N)DM¦¶W_°¨J;¹x[ž%‡í>X½¤ÉÈ27¶äný1RáX®ŸíGûñUHîíjb®êÙæz¦ µÜÜ/±›C0ÅIA ö®Ùfé²¶‹ƒŒæÂ=¦ó_¯†|ªíŠæ{c¸Ë*²ÞBÙ}܆ŠÃŠÄcäÛ»iµôCe2Øšh‹2©”aX¥f ~ªø·’”¥z•E„r¯Qtj³/þÎB‘ˆC¸”ì]‰œF$b¹Kb/ f5RdˆB]sYêKa"®†qÞO±p²u¨=—Åb)ÓØ§Ï§–^Ó´šð‡LM™<Ç\—&dÄ(Îb8äô—§µ3ŘáÒÙIËóò,9È;yL™¸Y QÍù¹%4•}ŒqA"Œÿ‹é-fyïœÔB­Í!²Ä-Ä®§"ÕwÃãk"c$c´Dó4¨0p(‚[XEÐN»¹¥Y[ßw°Ù.¥»4£“|™N0`Ž «ÏI{$¥hÄA„Ólj[ŒjQ4eôa šJŸDZ*3DUÒuw>ÍÖb­F¢ ‰.7I2œg±|ºØròTìó¢ßT¶Ë\÷LM­ ”v)õ’†RíBf{õDÕ¤d/Úc{é"9©Ygå\b²®¨‚QVŠº8§òûcR_®ÍTÊâ°Aˆ!tþ¾*6õñöæ™Ó½«óœ„f£¡W*}o.^ÙÚš¢94”G{n¯¦qU0ò¶”L]=•u+Œ¼ü¨Òè”ÒÈ|RÄÑ{³?¼Î¼uw_ÙÕj¼SÓª­•ùsIpÃèpAˆÜVNõÝ!ŒË‚‘µµ¾/МŒ1}4†µbY›¹(rhE ­*q éaÐE­)„Ùñì+úH2\™ÒÒÙFûŽQ‰6¥YçXÎg³=+ÿ(â©ÌErO±½6Ôë®3¸¤÷®ûѨJ„@ã ²a2K ý¹½®JŸÆ×Ç5¢Öö$…OeˆOêd…r½fz!rË·‘jUr§½ÜÔ}!6„ôº˜G +Ò&™kzgSä 0£ UÄ\ Ãý¤ëÿ–Œ” „à(¨4¢Eñ€Î L[AÿP™ƒŠŸ+üˆ}pe0¨. ÃvriX’ÁbY¤ªDĨê2q®˜Â.îqÕ<¹ ðÀŒˆ7AQxm1Á<Šl5på8iU½J¨lÌ#»­!'1‚r @ÆA¿ 5ÀÌ!AðòŸJÇô޼"›1 R©aÑ ÑœaD(' :pŠ$pÁĤ¸g2!•Á„IdÈb#R™Ã;/ þ8ÈoSª¨,æC 8üh#0€¬A¸0ì99&jæÑÜbŒ[ôÌjMŠ„sa6€Œ«”Èk›÷ (´„â†tÜx?²gJSE)N+Ì*®‚&4H1šž rÑL„:! ÕÔW)äásò/R„u«O´»ý¾¶?CŒlw’‰È\¯aDwÜ7'ÛS ÚCшgBTARÇ.#íÜ£ÉeñÔíÓ× BuŸÌ¯l¼ùÈÍTä'±^‚ß Rˆ±Y—އ!)Ë뼚A“¸÷g=鿚OýýßeLço1§/>+1*QˤF¬g"ÛßôÂS‹ªý›ã›šQ=ègkSÍÃÑ0‚ ªaJkïËÂã.J½ÖýL‰gÔIuä8ÅXîä-38¢Ïüb;šÄ3¾þÖÒ\Þ~æ¿÷³ s?žZ1Ê.ëPª;3jˆœ˜ÿåÅ*-ÄN©!bbÙiš“f¶Œò+".u$òV¢éÔáÑÝ^¢ùåÞ»½)¤f\Åt¨ŸEö_µä*† ­e(‹ÚIŽÄ¿tî újâØ˜,”"S=I”:%zc%ÖeGÙ9|„½1Ä#¯YRµüÏŽw}Ê K2ªéŸdCO òÆo0«Șù!Š÷±q›9 ØI«’š±çÕI™ü¾ã) ŽªºLAìÇ»8AVâŒËOžø†nšœC5ï_TÒ¿§’Š} ä"Œ†uÅp†SZšÖAñê)ê…Ý …¥+‰›FÏ#E#ƒ³&$~lãTïÇ!ï•âS½”ªïȇ©J½–A ö”¢¿[è)™ÞêÕ14m÷«É¦²ˆÉï!(hOÊiZ¼d3Z€„fDUêcjý(R‹t°¤?¦zfÏN«BÚšT)nUþ5JÊÄDÒõS#N¶B;e8cý?‘p»TB£Ù©a?ñŽûgvÃÈÊG ‡Q[ÍŠÔF ©0F)¾(ãl©ÄLTGE²Ò °åTÄÅDMäUÂ&cþ,c“(d‚qÂNAta5‰Âp†#B¨Q¢pel£$aƒª…;«õ þsÓç$%è@†Üñ0ܰdc0Žd àC:3rkÀ†.wéh˜F+D4¢T“n† aBoŽÉ'âöB%¥$fÝá8i‰„POBa'¬2cλ®ããØ*•éÁˆ“÷ÑÉÄHC0†( ng3x*gÇ‚ !ƒ¢}ÙQÇYƽÎd8Ák8Ä…³S…8·˜Gh\Æè .fd `ÌO  AÎRˆ²¢ðe¢ÁL†™ÉG‡œÂ ýIB0qTù©Ü1äqHŸ¨Šƒ‰D÷Lú Ã`ø+Ã?!Ê`…`I¤qÁ¾wuDJäR!®È»¡WnBU*ˆ40R¯`õ„"1•2˜"‘BA8´¬èzŽ x>Søj•!=T€jlái0ß>¤Fºèk³B™@•?O»§PA¡Nc“ ‘Ø$A1çÿ’8í (ìr˜Ü¦Ã<)ÞCCŠ+„F À†„ Æ9Y©Ÿ r>¼]š‡=HÂQTÅ G§§è°ø¢)…HH4”¨fÑ(B!D¤ÀFŸ'Â~¶‚&ÃS˜ )…©Êqpâ-!xý&Vrª¤ß@L&øQˆ6Bq1+‘qS*f3Æ3±ËH8A¸‹ã0£ïŒ!n3ø[!†O‚{†ŸxÙ„ž#f"[ Ç9¡ [ë$õż!hìS‰WŽä8‰#Œ÷(Q3!`Ñ÷”xìN!žº0àÖBƵ+F$ÆË±ÔfTõ‡üÅ(E“Ò¦â^S1Ì]פpm Tˆ±& ³ÊXÄ f.xÁQèF„$Ê‚8ÌAŠB”qÊê66N¥r™Tgw’ d1…gæ2úsJÓ `WvÔy3Ä}¥·f˜}sÅé·Iþô6£TƲBJt8¦ÛHÉæ+¥jçG~ul‰#l‰k–D³_"è¼óS©)¸ŠqGAåì‚2LÚWM„‰U𽳦Î?ÔHRqM:…¡ìC…m9W›QyÜ(‚¡X¤É*[I-ïö”ÜÈ;¶ëÒå,^ë!ê‹V!U$jŸ\›«rü‡A[ ‹J ÄQÈ)¼¶bYý‰Bho±ù¥×½%yIˆ¥“o´´™sk³´äY Tt^ ¥¢~7(•9LFí:r‘¤Wk A‰Í£Ar¤úßÖv"¾dº{5äj!ªo Ú”}s±B‘,­Q(†™šBT¦”ÕY- {]_)1¦`↠åYÐSyÇ©wyót¿Í]&èKv!Õ¼õ-½úB«)ôƒÙv9DQ®¤´N­$ܲ'¶¯è¸ëÔUá$-Ý\Ìpb9EŒq.ճɘ#QÛ|¦“†£‹McJ¤v]HbÞŸbWå%‹1“v•ùëLãæÿj$‡©N0Ä TD<É©¨#ÈÉ”3áˆÁÄ&ñ+鋜\W…ÇÉð×¼´q\R _Z¡Ñ#’§<…½DÛÓ±Ä{?©*…2T‰eG˜‰ å N•P·ãVÙÎä›è²‘⻦oÉK}K¯¢û¶6Q/ÔþΩ)ì->O£?0Ô&ä‘duˆ)‚Œ 1ëê#–ŽÍó–ÆþD%ž‘°<µÛ“Ú“SP¬Šî´BvÛzçU+ì+™Z…ß§‘¹´KлM+Äo2èï8Š"+ Ë#Š…T¨µ/S'Úpò>J&”L*—´Laå}qfvqJ¸ÕÊìªY™5-bÕ©(“~KJnùŽViÌžæ¢,ÈVmF‘ÉÃíGæ$…k“)K\›G»¨ÎU7œ}¿TåAL`äÊ¥Ex¥j´°o\ž¾¼´k5‰K !ÚuêuvíZ§Ujš„|cÌ/“TTã9Ž•m/å NÚD‰ä"{± ‹ú«DÔA¹7SÎ^%‰ü5‘JgQÌyJ[ î¥äk›’•û¨+½tû™m2[Ybǫȶn²ÎŽ+\ç² Õ“×1P%ÅõÑt†K. ¢5Ä]Wʦ¨ô7[>F³ú¶Y¹5–Ʋæ<²šÒk1UF3.¢hÛˆ11žÉÄolIuKrJÞd)ÕÊ´Ž‚ z>!:‚koH®Û¹õ§v£Ü› KŸŸI‹˜ÉtN:"qT˜¸bÂ#”«BÜZ7&&µ[“³ý¯2q×c «ng5,z˜¸^Ñlj˜ñÒBÝéˆ]?û½ˆ÷mcyna8ŽCµ”®›¼f®ËE13)”¢ü¤«¸†"È×.UVÚÊ­”sQöCHò§/›$ɱ d"!1vƒãprÙ”lbâz½MœED¶]P¢õ¹þå’Å ©è÷•çzy˜ÄlÔý~ıP‰Ê óž¯ë"ïªg1äÒÝõ»{•{D%Z‹B㚎uD®CjªÜkžŠR™U1TÕd6š÷I[•‡Uòýz—K=jüZ½™„-•V~ÚëJgWiO½µWãY²U”˜ÜÍî·]•Üš]¢u99êKº±V”'å»% "ʤ¡5¦ÜÒ+¢û*U´Ï™bX計¤½Kw¡F ]Îä>T±ŒVRê›×­±#ó¥®÷bB‰øjfRÕ­›L;{˜ÅO/ÊÂL¤ZŒ å½—7Vü%ÐDê®i|G‹Îµ.4øJÕ9n9¸‡KRå;pdFR¸ÕI©lÊsryYÏf÷ eæ@æ.R®×£rÈK" …»ft†Lç?›«]S$¯§ù¾£LÏ¢¡@  )íXR9릭i}åÛ9…³ÐåòØÓ¯áW˦H¨)N£ ƒ¨ÊPê³rý‘^’UO–îziœÅeKE”†©Bw¡ L¿¼šGC¼f“‰êÒrV¤Ë5E?é_cQòø‹@…‚ˆXñg„§JFØ¢hc“Ûr+t»µº…” q!mh€yÀàHÑ…,m)ê")Ò"¬Iƒ}ì|é9Jb:&Ô…&lcr°„ÝçûHmTSŒjÈØ‚ÂJÎõ ó0ó[ÁÏÂAtþ (L£JZS™Ù*±F:‹PÕj4Š-ÈV 7Ðz çòøœB°§HVg &Ç9Eqo€‡›< ¨g³ÒFf°0å‹+‘ÏÄY\Â)Ö6kÄŠâ ‘2È÷)ׂ-ɸlgÉ$qel¡+G s¼É|-eAȆ aD-Å¡S‘6¥½1k}@ X(ǃ‚C¸Ç؇ú|kI‘i a‚3M­¤½¶Æ¼gçÜ„(¨¯Ji‹Ö"Êá‘ÓÄ:LoPÔñ2$™1±ózjk’d(‘¨¨ÚQK(B{Á‚èsËx4,P1Æ‹dDiwg!ˆ ìW‰Ô4f¯# CÔ·EåcJM°i\'OšÖå5«†ˆ<ËÊ!nî8£*"ZYj0ë³ I%ÐB ¯8“Æ‚GÑV\8ÎÚd©R»žDYÕÐJʆ_²×¥ÃÍþ‘KÈô’}¦‘¼±Šœ‚­¨ §883^Išª:ÂX,ð%à@*ɱ Y£«C‰í1eëO]:ÁDlß•sÔÍS˜þfœ]²I­{ÛNÖ®Dò5KSâÍåÉ‹" vÂm.nnWû^ÿ{˜M·‹Ñ8 €(ï4Ó$Ë%‰nlµn„}OL§ß¥+’®Û)c\¬¶ÚLjT’æ)L^g%Úņ¤ôOÒn4„ §Ó¨u`âoú¿c@a`¥cd2¥â¬¸6÷ŸÂ¨z(—¶5Nܘ¡ÜÁÏðÓÊ[•Š9B•¦Û½ ­i¤às‡½Á·Æñç`…Vh‚¹))¥”´X—2až¥ÖеNñ¾ÑéCÚŠO7ÿÑŸ„måaQÊ+Ê)Z÷=¬Æ>?¦+Ñ™$0¦‘™QHëw#ãÐŽ*ÊT-ÒoÁg‚¥iP«€ÉÂæe0Ý·)"iE¥(E•C‘$w”:ŒŸ¤jù;ñ•ù üÖþ¤¿sßËOîOû~Ð}tüEÄÊžZ'ßB(e)Î^Z€ŒÄ !%ö…9.BbÍ×6)—ÇPÅ‚I‘B(&‰µ»µÃRÒ“2©Gã¢*¦*Xáµ!²)ª”ÙS1¤0È#˜ÊíÖ)*dá¦7æ;e±RŸöˆF7»Ÿ†ª–ž‡+~!ŒB5¨u\z©4l„ŒÄÙ%¯TæÑ !±ƒ\4?^E!Äs‘ŠGU‹K*+Ù‘žËC„ ¡ïXР 4‚%‰ÎYë†ÌšÛìîÎ=UvÆf„Vz5ÍÙ«+›¸ÊL]ÎD8Ì‘)ª&â jÆ ÃQR´Â„4)Ú- Æ+V;gZ¨ÌµÝi»ê~Ñã`ŠFdbYJr±†ØÈ³½ZÎ!ÌNCR—ªcRÔGÂɦŬêÜ–CAÄ–‰àd˜ø˜ýÊ|RÔs!å㸰C™•JªÎSŠ£À‘‚H7©7S°Ÿ‚jA†AjD•lIæJ"Àª¡O]ÓýÒ’¶Tý¯Â”Ó06Dd$ˆJ`Ð$&ä+ © ÜJÌN5¡Êz)Ý¡³=0¢™Cª$ 'BWªa '˜8EZ%B‚(ˆ"¢¹ö—ˆc<ÂÛ0™Z¥'n°9ÝÖH)–bµX¬s×Ñq”‚ƒ¢"›pÀC 6²*0ᄪ:ˆ”èu-œÁ FÁÙéŽrþ À†¼6PB–$#bŒôgx².^6Å(åhfJ™ PÎHKL C#óÒo Bcœ¢¿gàÒ6Ô1Y†Áó2²QàS-¨L@dCðà¢ÿÎ1mHÈ[û¸f š«yÙLÐÈØ««¯D¨0Õ¡ø¾˜2,Ãdà –1Ô!ml€$'qµÆ! Ìt¢“RÁJd %âÞxø‡±âì7¼¡±‚Ù“5 X`&$ã%‚ØÀ“4J0BÑܪ]‚! Z^êz)#QTX.ç œÀhcx@J†ò0•Ð`„!3mƒ„㪊"ÅÚ`¦íÇCõ‹nÌ7ÐÜc ¨1CŒ†C i+.èEdpÙÜøSÍÌÊ,× Ç2£B9QÈK†-C8„‚Œ!ÚC Ä1™3eq WÌ8­±¾Võ|Q3‰7ÌHÖ,7œÅL#A’„j¤JC@ÂmÃ>"ÃjK4¿­)™(y¼o¾56ågj©’C ò áf-ŒaÓ¼CІ0Ž2¥iªeî–Üèæî6+V&ߥ\ÒÓÒ•]£#fÆ™\k–Æ)Å"¸Ä)LšlhÞ…Ÿ+ÊÍNµjۂבýí줹o¢n7!L¨ë¨TbùÅ1 ŸÉHºg æ|÷z—1©/옽)hfó¿©Zm:˜„Ìr¥¿zˆC•;±ª˜â¬¬QÌ*ºÙeElN!PN>–D°¼{ò…«‰û+n'åÜÎêw*wo# §b W“[±Ìn¯2)ÉÛ¤+vù·rŠär6ú*~*·*ò&{q´L¶œ¬êùÖF5SŽâ®c)H©Q*ÿö$„¥y*+—d“ˆ>šO«cZûó)y;'Ùñ™Ì¥#QcRr¥Ý9"ævóÌ‹©˜BñúÕ¿WW•ªJûsõÒA_*DZ/ƒ—*¬P£¡S©ŠŒ”㊢aÓL¥¡:–Ñ…Ô“=žÙ„VfÁp¯R»ò²!Ggº¯¥IŠÔq(…Ú¥DGÕ´†sŸº—›ù•G/¹¿I~Lßß­ Ú:îq—³³Ü…]QÂÄͱˆD+$‚6X”fö¦QI¶ïµ”·“®åïÆç2ãÔ‹K0C¾Ó˜ ¡œˆû„o£åÅ"ýôªÝKê÷_-«ÿ©“#™v„oÂ[}1ijkµ}#˜©k5ÄtÏt0Í”va µt‘PäC¥%¶>™u^Œ\‹=iôûMY½Ûû:„TÇå¹ ß´ÎVª:±¥ DýÃÀOÜÿøÉˆÅŒèNPˆo'þÇü`ùÿ÷­³’͵£OPôPïù†hçbÇfˆ0DdˆÌúŒRñI‘‹oKsÒ=–®šJv:!¨ªYHXŽqx6Èa9îóÑWÊçû”Hñ®:å2å"Lä”Jmf.lÈ`£5%* MN¡‘-è{ØÞ6²­ž­),E¡¨€}z’%Ì1Ë*•=GPÍ”ô­ø„žkÉ ˆr¬ÜS«Tb-›Ä_Bž ê W_ˆZ—u"¾…± €“3y|£D}T²a³kèÝã1B,±t`y#Ÿ+Â*žôÈ$ûY/b™Xb! 옣¸†ï„”æ¦D=kj›ù$uZº[^¿£©phËt®”œ_Å–ˆ9@Ì:˜¡>Z‡·ŠüAÅ$Ça¸Ø¯|-È["y b‘Eá?jJi»£OÒÔUÖž½Ý†ˆ…©er¾ŒcÙRÒõ‡>œ«B(@ÜæLÕl)Ê…g¦u+ }†õ(DðÂzÍ‘‚›y€§ e)8Ýé,¢ÑK}¢ÄÐq—ºUKdd!'³¢ñsnE3É–XÅ‘¨ïdÚòÍí¤ň٫FlÂ{ÙSYê¼Vˆ"£Ä=DIÜ®¿5­”-lj=îÆ=ÕhR5‹fEí!H+‰¨B ±–!Œ]T¦ö"dÅr¶+'idNbƒl‘‚;Ú‰¥¦ûDªdäíŪoSÁ$­2ãxŠ9åmã²\£µ_wÊÊi~$tc)ܶ§ï±gHCA“\(º~¬–S*ŸiÙÐàAÀ±°a—¡\²‘+6Y ÖÂÍÜÃ$â#´â> ïEzé^¤XæE†¯ŒRJAÂ+¨ïÝ­ŠoVÝ'±÷VçC¼@A‚f½§ÜZ'ªH(©å¤ššX[ÜäÛp‰F÷$è(É*$® ÂE#í)žSý²öCÈjBÝL1°ïç$ÎZØY ŠÇ²J Ä%vë4±/SÒ„1Jrˆ5È! òâTYë[+ZñŒ Tœe•sˆ³w!³GâÛ—/žŠìš!¬'3¹üF:ß/¿ÄZ–…R–ŠrŠ¥“àš AëBÕ‹S‘Å™iÅ2R†Ò§]l|×ÍuâIóÊ"RÚê£PʔåUã:*<é¸ªÝÆR!Šèž–'¸ä³«‰Ù¶¨ÕQwS¬CBJ"¹-ÿXÚ,• U>Zý¾¥EuEºœdÙIqåÛë…øÄ]c<„.¢Ñ›8OkdObv¥ÙRˆ«L“‹Æ reÑEQîKfa³7¦Ùð$=T¥.â–D)‰êB˜³0íz]dEÅ–žfÇfJ«Pö+'—‰RcVüi„Ëæpp‰Kà¥åÈ™wÕ£+XØÒ¨nA9(¤ãÙGÙ’+í‹TÒŸÒæ×Ë­Ïõ¢ŒÔ+zºÎ‰tÓ–­Ö+†0Ê2ÒíWYSbúéé¤ëæDÙlbÈIK¤îÇÇ_ÿÛÖk;ûQ<–(”>Hó"Y8f³°Å ¿ÇÝ¥ÚÆ1dV*bw ¤ã$µQ0%,^­ÌX°kDê9R¸«„i—Ò…$Á kú Õ¥=¤“BÔá^¥ÑÐW*H¯ììëòˆûŸˆR¢ÐŠÏF+Lj _¦o V­â\…;YDTtÜýRs3«¤âb*Jy›½h×§þ& ‚4­Õc¾V®k4†9ÕŒ¤ánM%JÉõ©Ä™¨Úñ1Šk²˜þ–›.ªc¨ÃaûÌcw§¬Cñ®9Ñ% ºIRÚ,?ZRRLQÊZ¤èM¹ Tó‰D³KÇòÉ•÷ãq{ÎZÈQZrJ +UNVah£°Gé»m|éë"-æEñN™Î® a½¼¨/ZºúT¨êØ2¢t§² Íú¸CMce-t Í2· „2…WLïóλzÐH‘áô!ˆÔñG(n Ô5HÂÉdB¼¢Œ8R6˜B½‰»d­·'RLZj‰Ñ¤±‚SÖT{-ßÉúÆ9ŠSÕZ3䊩•óD»RêÈÓH¡š¨²¸*yPž#Øtâ’BˆŒw%FIÅ”\{ì}¶Ö‚úõJã\d»TÅ ˆÝF¡âJúrù«p¡V:™<±3_ߺ¼Œç(Ì,’4`ŸE£fkþ:ybœÇAj[.$kÂF¯ŒœlXŠìT£\¨8B:ç¯í¨ñ.5ÍÄ2QµJ©By¹t¤Wýe¡6ï\qA/ŠÄh¾5/b'Ú¬F,§J4a„=÷Õ‹±iŠÊ"(ÅÁ!m…–[H‡%ä1—%]‰ÙcUÐdI^á ¿DeyP—ÌY¬If¶Å;§¥ÏÚ &‰õ“[F p‚‚½"¢Žšodšéº÷Ù-ôvKÕÖ©Âah\WF•ýP”) Ç;Uj¥±ëâJÛ½ÅF;t˯_&l˜ßcYýd¹B "“ÇÉM£WçžMथuL4Œ"q2ø®V/«¹ÿ%>·]T¢”íW÷…®ÛhÒIJè´³¿U)Ërf [æ_Jú?¨ŒõR8á›6ÆÈÒ:m20E>¤¿…£°‰â”åÛ¢×FÛÍéÜrû5Ê»µ¦[êò6zþ"˜Í!Ö¥Üó¾÷—âZ£U$B½…i’pAÉ5Eõ$¼ÜCLžØ†ºI„=ÚÉ‹\ÒòÇÂOwïçOD ‚)´bYPèa‹ÌT†Z9Ðg@ɳŸúsi»©[ÉÅDTÇ$k”¸C‘7J}Äßéw‹¹T2¸è£–L±ã¹Lå°†Šn‘;¢—”ç±²M¾j„/QGaÁæ…«m"õ:7ä†]e)Ѭ9¹–#4†œ§Î¦Ñîž¼¬Ì3HW(ŠËCÌêÓ7ðúÝÛÏ¢ç^œ7ˆ®Ìœµ=6oö»ùw z¸Qe£qfÎZÅÅzÍH«¼…&`R^›ÚíR¼¡N¿eÙÚ†°ˆ¤à ¸—ÿ ÿ$ÿ:?tŸªKBO ŠW'|‰ý8fïüæ§u}ì峅ʪßFrk‹k4ŒF3ˆ*½™;;Ùs)Îz ¨ËDÅõ¥/™¿DÜ+¥i‘4ÈΫ¼j­¿8E×.õ*UlVC&- R´¢1Az’–ÅNïÍ3-…Â+ãVžžzÖKÊgV/â‹·ÕÂ)œŽ#¦¦xŠAG^¯VÒ;½"#¿ÚùÎô‰yN´ÊÝ(r3äJôˆp©r¬ÏÓT‘m©"Ò]H¸ùíµ _· þåÝ\Êþ» Ê&~ª"ݲwoB# 3qJ¼DÓ(Aˆ"M1¹Ô0ém¶Šß³Ñ|ÙíOzédÃwþIŽÞÌêÄl¾ ôQ^Â(…ÊvŠgTÝËoU,*Ô´ª/ù+\ç·.äÂy+ÙÃFë©…U~{HƒQ(Ègmka0—YTÝÔw ‚x‘j_Î¥XÕI"S‰®·f”Óñ*¯ìb\èèµ·fY–ÈÊRŠ`ͬþ;³ºÆR%¹›Y­_¡=Ñ;I[Í‹ûògVçz=Eà–Î(!ŽùÛdªÐ)Ftíe£¾Ð¾B èéJúVª¸—¨³´É¹˜åK¢¯”ʘJ”âªñV¤g’S䉹š\c{Êâ©öÝ^-°ÞcU+e:j}m«¹´ltÔ±ӔYWEneÈÄ#+eÆW;ñXG.VÛJ1ˆ…ÊmHÛŸZiGËeéê¥×)VÍ÷ä¢N;ˆØ½ŠR”Ë”æ|Zz;“œÇV'y¨zéû†°†™]¯u±,S;²¥±hæ[³Låd”飿ûSŒÊ#f»óíz=¯~\ç®¶kðM%ÎdΟªæ)üÿîì¥7_ì¦1Q3ŠÌ×7„I†'>51 ܪˆk1u Òe'Þêã=K³?Ñl}k&%Öä9ŸHÖ8ÌèT‘jïýBC2K¦7a„i+…—Ò„ç&’œ‰!ÉŽ{ŽèŒtŠ!̾ ®eÊߎ È<ò3Âò›¶öÂ-Úצc™I±h¥C¦kú1œ§&cȵAE[$i-Ê»B¦(¤æÁ{n•e|í&’™Bç ×¾Ò®Ø~&a–¼´Ý!qM"©Ü¬Ç;3³3fªœF3—Õ0óP¾ÈúýR>)e¶±œ‚êÇ=m•×@«(!ЄZR¬¼Vî!üŸ½FA´µ¥Yõ¦ÿ¯ä’4+ž2~ìNQãˆTP žˆ­™›d‚~„2µÄ @b"Û‘ÌÌ¥+€Î«âœ/Ü2>qDgNw&ÄJl¤B€ÌßÐÆÁ¹Í2ü¤¦~§²øhv*%a« ÂÁ95‰!‘ŒCvX#½ÿÆ!P H h®°¯y{‘7«A9 'aµ”ÃwI ÀŒ „1‡«!†æ1±Žå¦Š"„ A }"Ÿü-( bŠ@¦ƒÁ;-ʃ„n¡) F@B„ͳb7M^¥|ZïÄ”ÅR–¸ƒ0exÚQ°L ˆÄf0í™Eíè1‘«Šáé.~wÄŸ”Ñ8‰”è?S n96¢5ŠLA§ˆ ¸k@Û ˆ¹ Jµ§ç)òâàåê^2)~< #ž-a(×°Â$ˆS1 ð£šÒN‡C ¸ä~(ƒ¡iWÊ@cƒ–fÄgÄÃ&9 SøP’`Þª°âU1ä>!Ú`\*â‘+•Õ )Ƙ„w*Þ€Ôc°Ú Â&dàÚ‹Î @„1)_ÈÖXA1½õò¡Ê<øS,“¡±}´0ä vÌs5¨Ãº[Q ð”m²Ç™ÏÐ-‚sVcœæc A2³pÑ Ê51'çE+¿*&[½u@P¾ó±­ƒçZ.…â3˜äêøèÄ€ÆqÞ ƒPll$Òˆ 0B!6¨B­$gàœ1MP^áTìr¼(¡êw5§¤#2ª¶H©°dhÐïOÐ5Yv# ø{Kuʃ+Ü®‰ÀŸ7'dpx‰€6 fnF9Q Œâºa°`ð¿ÔËôTÎ=cŠR †) ;ÜqÝF:Ec Ë…Œd dB2æL@BÊ1¡÷u#p‡ŸX‡*®sáÜv¾œÁdÐr¼ÂKÇä #hÑA¥Á$¡Q 3ˆaM9”kéâv{ c¬v31rY 1 ÂÈS± ˆtu NT(e¼å )»É ÐØ’ƒØe¤ð¦CÛ´X\!LA,°º‚› H2Jˆ÷íñ‚9-­8´à¼gN8)>ewÄÆR؃!Ù8†úÄ Â%1‘Kˆ'*0’8T± T.–…+Š$2 …Ë •žá %1 s"ºP!”ÇrDܮ̔Qm€ÏANW£)âá…p+Ñ:t PjJôˆŒj6a’Œoƒ0c9«V%C¢ìOÎã¯R%æÅT䦹¤“6 éD LP†0`ÙKµ †Š15U1Ĥ•aý‚÷qÇÄF!”Û.s‹L°A°#A1©‰F@‰Ì(Øëîb (»¸9G¤©BŽ‚rn°¤ ¤@Œv%‘ʦÆ›>aQb¾Âb™(…0Æ ¢ŠHNã‘QDqsA•Ü{µŠh7Å*Ñ'â„4 ÚrAªE0gÅn† ïêá£Ò¦d Ð>{†Ly †5·º‘(½ÃAe[P}v ôó# áæ1Ä,© ޽ž”He/,‡‚‹ƒ$„q~Hd †0£ F"9qˆFb0¢‹ÔÜåŽÀqq̳¨@=!ÿøÉ˜ÅMNýD~ñÿ¨¿î0X̸ˆ´ þ™x¤q톷Û¶…-Þ®3ÈTˆ¤twª#åpí‘·yÈ"¶£TOˆt!+?aD#­™ÖkÑŸsIríÌD¹3rû½¬™Fíh‰A¨¤- )é‰f#µ:äe%·sÏýEðÙDO_(–cÔŸ¨R;áRï+w±˜a¶ºî­åjµ4E!sJËäû3½w"Û‘\˜B«ó”ɯ"ÓþBã)Ý¥W^•ŒÂÓ2ÊÚšåÔ7ì”BY1—¨$—ˆÚ¬I;Ÿ"¤fÕãØd¡v!)Y'¨ØµB”£9IÉÒ=R™¦QW9ÍîDd¥«„7·¦vÿº7ò5/V8ªn×6mEUaXмŽìC+»ìºšúšL¥&4‘/øä• ™âU¢ ‡..ØWH© (ŽŽs5«ƒÑ]ᅩj*¥´n&öÔÓå“;Yñº†£ýhLý»ùJ¥$û Ó¤ÅÞ ˆ®ÇRÈ)ˆwdFÉKÏ벪{%Òeq±É©NÕDíVvšS»…{4š‡Oÿ1×&8—NWr<¨Ê›z>¥YsIÅÿIÅÁ5˜Æ¡ÎÔÍýFs¹‘I:ï @‰O½¬ŠÄJ¢wÉîª/¾ ¾,ôímMëäT8ÜJŸ# *W(V)¤b•mtMw*n³c¿'êœG’ŽR–o±¬"ˆS¸Ä¯›{…²(†´†R—ÒÅ­ÿ̧&]‹yª‘¬¹!“j|ªÕ¢Ä"hºR%pºÍ‹'÷GìïI5˜ã¦óL÷U«²PP¬cµ…3fpAЬJk}aÞ²ßGvá©Ê­òТ@f˜òqÑ8G ƒ©)‹ùÌáìˆJˆƒè&!0„¸=`d„>#:tÞ¬í",PäÂ0‹ Ú‚!”QH éÔL6….1C…Ys¯4àùX¶I“!H×~…ˆqŠä„c(€¼´Â"@@`Ha Œ,ÍÂFSpD)z‘1N¤‡@ôß œØ¥#\®…J# ‚¯Ò@XD ˜é06¬äzÊ/# ²b–2$ûŒ‡A8¸Ä1̦8+Œp‘DÀĈ: jÙXÂÁÙ0I|t̪cç¡S˜jÞ‰ç9ÕÌÅV 7N €Ì:0 6ELÇZĹJQ†$ è…È5#Žå"ñ ~Ä(`!CÒÑ96>F±ª¤PÄBÕI³£-I½ùNr·®ÖBÖ›Øz‚.LBÒ§Âsq(d ‚ÒÙ„!—U¨åòu?½ðã©JS59µ_ÜÔõ'JÒµÏj¦¦Ý¿—Ë®™u*¹lçdK<¤2êàŽŸ»’RW¿²ÿõ A%Ù6¯‹¸šbipšä'ó0ÄFå"¢e«EK§ùÃl%3á?½Dl’¦xÈJ(F™Rzíÿp„"\žBöɨ]];³h¨vk‘K“5±Òd²TÅ_F.4²[~§^º™ m¯éš™M©Ž„Ô(‚sÉä Ⲇg2¶!–˜ÈBc%Šä,—-9f²'0³7ô–_|_áQ6McUÄN%úB£'*62•‡wµ¿dIDÆáSðÒd"þá‚Uª^päl 5Œì8­ÙŒˆLÌ‘{ —•0lSŽ”Ad†ÈŠ¥*¹êÆ„…3„òƒ‘{!a¦)¤ÂÜÀ€!„p731>ÐùÄ·a¬q•Y ¼îêI– ŠÈ … …!’A€ÆuCäFÈ=à€•™ +ùMà&¡Gf¡™Çtz¢NDêƒÊPM<¨21s‹±Ó²#˜Ð)y `IÇa wfà9¥ã ,\žõqŒ£Öa9_«'ˆ€‰‘¡é18G @@CjbÇ)X’!ÌÇ˓ȇ4”)q@ŠÎ*Vç27 Ã@œOŠ!Œxð C"=0ÒÖÉL£ã²FôVÙKA1RTY®å(”a!9\‘Þ3SÎMF@ǰ|Z„ÄHá¨j£D5J»…E ë¢Ø8ÎÂk')8J Ô0! ÜàÅ)m™.P¨|ŠõNu(ë‘Dz33˜¢øç¡”Ô”%ÍÄS*§‚=TxÕ Úc‹t9\H63+ A¯Ñ¹ƒžm”nÁ R©[±žÔŸ_ƒ6 è9F,„ˆ°”Àc kÕÿ”œ13 ¥1Xa™‰øÇ9…0aBJ0Æ$PÇZQˆƒÔU:ß·ÖëìµÌ`ØCá…Eøp‰BÂ0"!dskùC+*¤!…Ê\_¤‚†>ü‹Ð¤_D€ŒÜ# 0ª‚Áa‘Œ|#ºã¹©ÆîÄÃ`œí Â”ª  ÄÄtx28ØMSxoé ,ì=˜Ég‚‰r•X}Ðc‚3™†kÜjðÀ‚F@«ÂÃGn®ê8´á§±¥¡ßn°LCÕ,¢P ÎÁ1œ¯Q/C¶0 =òè f˜Ãg-iRáƒ-ñLqÜ…"ªµun@€XÏŸ8pÆHKHà 3‚(.¥`Jå~e¢^Æ7¢³± J¡¥TwŒ0ÇèzPøªg¡ƒ9• ~PQe0•´Xç˜ÆŒãæÓjnaB†!‘ Jb":m»+Ô6^‚ý˜qœ½îT{ƒ¬C ÏáGËÀdÎ…r÷tâheÚ!È\ÇF„acÊ‘K¢J…ȽÝÐÍi!ŠEÀFA?ŸÒfb ™”!R@³ŠP ²ý 0Žx«¨[hƒ©È¡&BÕx‡M³VœÅ+9È›±…#¹•5’‚b œ`ü/2pFè>3%ÐP?åÏÇœ•®<3“GoÍ@ˆ3Ñh¦<Ç2Æ)tÔ[oÔ…IÐP…ö)F%Ý(~=Åž%¶š´ØX¹Ú£Ýj=ÑAt䡞!장ô+ñL’1Y FÙiõðÄ2ÿ[…k¨¦&Úĸž»¸þlÐÎ1Eg'E4©N %éÌ÷­±‚¬DÆYPƒˆ¹~Ú Z;ö›iNÆfFgUºÄ9]%´¶® 3koçJŽ´ç^Ü+òdU£”p¬wD·z³-–JIDc2D›–®~[’ÔÆ­¾§bå–%Ȳ±" Š¥bC3§ª–.êuoMÿ%Ôò)Æk*ŸM™ål{Œœ ’ÞQ0¡ÕãdJRÈÉ®ù$žJŒ)o¨Û.žC2ä¡h‡nÉ‘“L¢-Æ‚WBêY—Ë©Úñ¢&\|Mœ›J³8Õb°¡À€cÆÂH´ <Ö‰©#a©M³â=Ë;¯©’¯IÉ ‚·“_ÊÞç¡îBÊ-ÉŽ\ª>‡Æ­ šD'Ft#7E¸‚‹!»ú ¢ˆTÒÔ”r5IX”ï!ÞK Ä9TüÈ#iµNmù FÍsó%ߊ“1rüè0…¢LØ»Wdoz¤spíÂq‡y4×X²_È"ÐA:é1ˆ5&—ÊúÞæôªîI%°GÔäÊ~dä åäï÷”¢"•6¦)RpÁF{ËEI›%&)?1>­Å=äcMYM{#›ÊÀ €á ”ˆeNª ójß(2’ÜËTZ–™*Û¡<4¤r"¥›¤1F0‘OÂ¥=….¢³[è³õ&G°Õ^©UQäsNåÛ’8 0³PQL.²(·–L…© ¹wyãã¢\ÚfOªÈ»¢ò²Jä)×V˜™Rú0Ÿ.Ï KL0£ÞºÏÖ0îD3ŽŒ•öo Á(†ÉâÊ;ÌÑå‡î#Äý&Ò%T)u-ãDv!Vk‘˜¹Ôz¤Y|Ôv±HåòæÍR-Yg4ë¬-ù†cd„ÂBl“Ýe3äç0 ¨¦‰ƒjÒäÔÉhb8…º…-ôž:zb”}z%8¾N]›¦ëÆ0Ã93ŠÅIPÌ|Ûv}L¥ãÖC„¿$É{ Ò9ݾF¦9U݃˜dc>Uc-š¹ÌÍOôz¶yQÒÄbS§vÈ£¾Tœ´¦½Ò…•(ae%*ž'\ ¡üíÂVBÝlGÎb¤Q¶k¿?eˆÛ‚¥úå9Mf÷ËÓ¹«eÒyäTìbÕùOŒ‡jñ®²H´:]q-"2öïqHbïyêíGÑÍ‚âM5¸íñS¤Hà„¶<Š\l¡ÄüÎyªG[}UâH´¡ècN\Bå+wJ)G”¢‘<ÇÊ©ßýúyf²ÖõS¯Ì¼(ÚâPJTò WÊgjàtüFõYpmN1ùè¡ä†¨‰ƒÞÇýxªä4BŒEsˆ„¦5ÐçiVÈeB“P´K_-r9·/rá 2Õ[_ÅÑwõ¨V™ž À¨'$Q ¹ìküÔé󼞙’Jç±^#™(•1¤lò÷elEªJNK5;‹ö´ªÇ¦ýÈ4D) „ºZëLÁ 2™Å+ Œ–+jt¢[=("Ì•wÑäR[×VÔžWâ³æ×ÙÙð•Öø«r(‚»m«å&””])Î%ei tUð¸Èsó¬ê9 VλÅZ¬¨”õZõQ¾¶¥ [‰rU+ÈSQ)qêܧ{‘õK(ã9ÓY[{ŒM5Ô¤ª™¼ç-ùˆVö—Dé »T¹X8àG¬X!Ä)%mZ±7NNãO»!Kƒò—º"HýCYdZ+ØoãJÞADR&/ÄMUR–ÒU(MÒå1,é)ª_êUب²(«@â…EÄä)¦lÙpüVL\-dÎVj/ðµ)ÚÄk¯Z£¹¨÷µÉ"“Ž·"b¿\\ѯ™~Bz©rä«RC!ySPœ#Üê”l"å×²ÝøÌgþNîë?“)ÏZ*ªÙ÷÷ó&+7· d±¤Ó}û%EèE_‘èêB§¢U¯AéI/Õ1 Ç5Xä9 ÎZ=YËE„ž¢zïq,oƯšT£îJ·gf!ªˆ1KÙg ã„qHëä(YEÞ=Ÿ3[·_œ|¥}<Ӟ̢%ÙÊõW²çñ?ÖÄã»""äõ4Ôv³¬è‡AÞBa,jœ‹—$+!–e·¿mŸ×ó—wS÷''’È_bHòª©:àä°”_¸Õ}BÐÖ-š)q~SJ^jg­P‚å9Y=âe„ˆ…#Ø·gÝíjûÓ‰d]¥Sˆøíª¯G¹‰ÄªZrÔª¤q&n"jPžšIY(¥F)'7²Ôjìûg•H+]¬•dFkrRÒÌ5K;Õu9³p„[y—¬ÚRÝRå£ßɨ­EÔÂ*íÚÄ©;u^ΞŠí£¼Éƒ—•ª|Q&'Õõ¦fˆ{}×yé‡-„¡fQREi [Œ¼ɰjÈKœ‰Fì&!d<¼¼«—Z&´ÉQÚ±™sJ¤zQ=µä\£ñ¥Š\#šÏÅmä3H“!(ŸÄ£k–ŒK1D.9¨ý¯"´çáDÇÎÌKL¿õÖVw …8DõîË%ÈtoKPÚÙ&„³‘›7k‡Ü²Y(c ‹ô]k¹K‘(dÊD ýçÌË…¤¡%V(š[¥(Íϵw‘)UÁ«Ý ˆ™×1eg?.#–Ê„«ŠŠj½D%Ë«N&t„ˆ–$ÇAŒ>‰’­ŒíÄ-Ö´AvÝ®(¢Dä{ ãU‹”ž®Y±j_Bʵ"9ÞÈÆ11„/ò›ÔBj’ê&lk¥.4Œ]*åZéíÉØæåÚˆ[ˆUZ¾cÜ-ÚDÄÕTié”ÿ§‰¢_ Öj(ØB TÒ¾c(ÄYDQ̾&áäòÄlW"+åæÔïá¹®Mrûç"W]c«Ñ–±ùÈÖ™Su}P™çÜEÅ1|¤¢ª3c%%Nô§ Þ„.¶å½wl»6ºõ3ž‚KÒáJ)Æk!%G,Å ÃålKzib,2íË“ VûRÑ< Yô‹ß26© Z¬¥¢E%¡YX®øÄ[%ab;±ç:TÕJw«WI@¼g¢n¹I õ~˜’m!uWÌÛÆ±:Ʊv‚Y–ì‹BR‚Û"ÑZajO<äyí”àç Äîº1hè“]f§! 8“6Z?œÃ”-¤•¹æö œçMâ‹"GwŒQ$¾pmB´“z ¦ºçá1>‰•M𻦦ÓmäaLV©ÞÌЯ+±R•\¦EqT"K¥ûEÚÙ¾¿Q‡þÝÓÊ#œ@;YaC„ó:ZYD«–ÒWaz¥bPÊrê(²…¥3m­)T‚*£±0ƒœ*]êr.£?ä»%¨&•âÛ]{¬ªª˜cmÑ„ž†¦¤g(€ ‰‡ò;“gçêçåÓ¯d^jtÄõ”èˆI²Ö"B¢L,)¦Ë!k…†î 3‰œRÝ¿tS!ìT—òÄ-í1Ü*0´€ðÓ€ %AÀòOŸÒÖzVMЪ‹ÕQîÖ&Ì~bæß Ñ[3y¼Žšò™8QÎ#ˆ1¡Z¡4al´Ö:‡Îa+%LºŠA²ÕJ2#±ÁÀ¢Ë|Yx’Oµ0ÒP·P汪â«îăÄç8Õº™!T×e*¸©à¡ÊárƉéåÌ3X´©*Ö—RRÖ˜²ÜLH÷>?nJQÅ ¦´QÎj\Ç´²ª–!,ÝgýbauËÜî»”Ô#‘Î ˜MÔjSòˆG³H\¨ÿ -UÎÔ,)[á+ÓPÑÉ¿ HÓŠwÙÁn@ÓTƒ OÃlÒE‘VÏ8Ô]”ÖC.û—,è3Œ¢cûÄÞ¥f.ɼ´yJ)š0œßSlBËuUÈ“×vÀ€§`k׃/PPf¨€FÞ© '\“|O‰MFf Hâ"jíúõ£Ì™é™…_&ý}♤´Q™Ï"|‡Í®épæ†-VC•½“yb†(«9öÓÞÆ²>Ó–Nu%3™„!yà 8 /H%èb‹&¯r©$b^\}RÚ'\Y©(È©*È&enyÔ‘„)›bÆoÉa>W~³‚J©c×5[å­Ò0P`çžxÁK[u‰[¯TÔClh¥98…~¶Ûtï⋱nT¹^BÙ"q‰åad R"[U*øQa*Ó6ΦcÊMì`NûI<øÂ¯ÐK(ÑE‚Ì$]¡!¦GÈUk’ù}6&²© ´[6ªFAðÕÏ–¯eªpf†rKÄRI¬;̼¶/¶ŒO½mÖi¿4£…QvÄQ8úƒˆpóSB>RRµ~Œ§YYEÒkËòîé’ÐŒƒñ†™—x‘1;«X¨ÍwÒ/¹³±k>$D%ê‹Ëe½KV@ÑŠÄ…Kd(¾ªÂë-ôeõ ÊF’ ÕPݨžËb[ CXI’ÅŽ12‰Ò1ÄGo_VåOÞ’RëMÅËÚD+RTI8n+sây(Åe׸¯#÷[d¥VäEöµtd®oeE»Ý„[Lƒ¬£ŒnŸÏÚÂ4†JŠýÅ©¢MáÄ&pTa=‚ZO•u&°|ÊÊß+H½g!†pGŠÄÙ0©-B'*·æ î¢3ºàšLo…úæ°¿]*ãK2ÜWçM{­Y½.k$‚•ÍÜ0† ØÃWôòûýiïŠå2%ó …Rhr¥Î•.6ÄÖÅ)7?}9+Pÿýg{£\ürGYGYH¹GŽZ7²W6©W»†‹xºpZÎ{Áœâù ’`EXP Á,)‰CoÅ:TF(]¨&E¬gzÚ‹OÛ?órt†²%ÓÒÌ£ ’‹cEJ(úºT´3“ד9n]+%Dí­N}õ"äƒ<‚À‚uîè&]ŸÔ'Š^B\ÒÄáíã`k{¡‰3æ:ﳕLD»—_ö0©…3Efä[ ¸%‡88©,zÔT¥Ö¤ß¡b´`ÃJM¦ê_mHNË•šŒ+ze—/M"”I›Ø˜”O)½øÞ¦Ó¤ËÚ1L”Æ+m0¥§À6¿öêçïcõÙú’ý[Z ~LäU7tÂoñ ŽS ìøæèöÐú8f2N+w`íF!/( ÉÖÚgè!ˆQƒŽxW¿˜V$1XpîzkÄn!2\AÀ3‰‹D˜O­p˺ÖK{A³£QÇýHKaHKDSÁ;»ŽmÆá%¢>"¡ùXÄ"Zã\ÊÊÐ * ™€3/wUï @ hÁÎð¨9Á`E@rœ5ƒ[FOèñ°NÝÁ ¡ž'Ñi‘)zÍr\?)Hâ?˜sZN1—‡œ aŽ”È¥‘ˆa.3B½DÇ«”èdÞ+ÕzQ¤º©³¢Xg1…£ ƒ Øßz¢1DÃàçb’­…gN\´ÊKNC8 ²]˜M ÌÔ(ÍBPv®Bl‹ãm ñ µAš¶ž˜ùiž‰SšÐ)S35@©ÝÌqF¦!#!0 ƤT!b84Áˆ«á]㥣 R”R»wùC¢“ÄQö)#!f1œ'ª7A„"$AÌÕB´\+™}ÝØ†7)GŒ ¹ŠLÞÌcD>ÜFÍ•€„/z´²m©¿:ˆhfw‡uŸÄƒ‰çu"õgò)’ S)®gfˆ0Ô&†‹)5…¨Ù4¼¨ýEÄz((‡ƒ3E«WX 6'@G .F •Þ9 6`'á…på§ðR Ù(Â÷Hs”ÎËÐÂ0F1š ˆÈˆám"‰ÃŠ@pdâzÂÅ9‡($—mXN…-)ˆ1!ÔåÈ¡˜GE½<²„Ñ•™ H Ä@ÐÎ1Ð@ ”Ccò`[¸™….:XMàWØA*…Tâ‚ÐÔÁ&fcWÊC<ü4$9òµ+óòWh'&μnz^‹Qݹèƒ"³nëˆRnìÈ)O!DE©C]ÔbSu¿iU±éI'°œÈüþ}¤ÙEuËÄe½):ëf›Á…ZTŽá\WQLü„vž_-xº¥DgÁ%ÎõÍ‹|1j7sW4¦ÑxG†ÕC½.)„_!É%¸)D+ÔRó­J¯Ìüöy©\±¯Å«œŽù–•5ìêr^U;·1ÊÜ#¿ùλ[ZŒfl#×ðD.öz*ž¥F!u|«'òc ŽÒ®óÒ‹Î…?2a¼[ij.s­ ”b½S:kàµ69]—i~Læ?±Ïm×¹­–”»½Ê­1Qò¼W憛ÏvÌ« æZk÷£y}Íûkº½±Œc–nÖ³8UGZ¾'wEb:ŒÑ³ÈG?„dQËE›¬fÔzµË!mA]ÌO!Oyiw0½÷mù„ë ΃þ–RdŠ Žt/ŠÆ}ã1ëȹe„Í2g¯±„‰ßÈO¦ï‹oE‘hêN-_•6à‚›PÃ[J8Ž©³=GÄ{3m¿Žø‹[mv/íÑ{fy›âs¨S25ŽF×â™XŠqßÖÚÃ…?¬ä>㦸ÌSw#šù![r¼Â>ò2:©¿÷ªzR«ú¯U>¨C®â têÙL”q‘XÁUC¤Ì¹j&ÙwB}¾²Dâ-Í}-ë «bb]ð¸¤D˜¸d"ºšÆ :Dã5”ÇnèY¸¥Bæ *pÒÕ«›Þ´.Ô_#ýêÄbÜÊuwæJþTTQÔU£ŸPk‰Sx‡ÔÏ.”ª’Øåp%ת@Çyü³^½”O©·K&¿³ªÿD.uîB“DR5Žˆ`¢ !ŸTgûs BPF;ö•Äß_ÿ´=å舵ÆR&~¹VöT+…C޼•$v4î#ê§÷žìUW´Š¹%êíBa ô.|d>¯ŽEÁbù…B"u ßLr" ªŽ_VUÕ㑞Õurgך¢!K—³Þ]¡“ø•lìñÚ´+±j|HDòŒA ƒ¦WF¦I¥EF3¢“Ÿ¾¶[q{r¹¿A=ÊÔjÔ‘QEÓ­˜„d5RÎFc®•öjö¬éæ1¨eÛ÷Ÿ¾©ÜÉÊVFY ¹ÔrXº¨ÌA’16§×/#óœF¢V½o»jŽ¥ecèø%rt)$¶ دBè³²Cq µIðN'1†² Õ1 4€†0L†¸Ò¹;PÁˆ'¹yšxGŒNW ué£~QlÂq¦„0"‚Mx$4Ì*0ÈP"ÑkOc_ˆÝpçz£rÏ XÅ"1+0ÈÅu;6RcLs©ha É’’=tB(†¬$UPU⸦|ÌGòJbp+0#Æ‚c8ÚŒ„k AŠJÜÙÈë/!Oó‘H…eÊÀ]û Âõ(ÆÝ§`‚OHv>ðd1–G¸Áâ#d¦^aU”T^Ðn0âT41?ŠBó‰†N“|ŽÇLA„¢˜»*Ý@ÅÑý¢© bó™$\TGŽWÀžÿøÉˆÅáNo>SühA $³’Í·"ïYóøïy dâòÈÁxÙ÷Á{*à³ø´ ’¨`£¼J ™„ª ¹ÇÿÒ•qÊjMÜ<_˜rR>=m9Gu¨×~™(‡04j@îåù‰oT¦=3Ž–­#Ö$“›‹¦ï‰ciŠP‚Gpš+Ä…kîg¤ÌEZµRÕQþµ¾ˆrÿeÓ™¯„K´¥+–‚‡AÌκ_!UR•øò]åy¢½zwY©BhL£0É4‘„ƒËL Û!+T:–qSºG§Sá—‘Œ1ôŠ ô*›ÝKÄOˆ÷u"”Z4ƒ ’å­]®¹X©0–2Ö¸æáj5eaÃA æM=™«z±qЏ8a Ї!µ—ñ#-ÞYQúœ#¿Rï‘®Çyt+5ÇlQÌ7ýtòÚ$¨3Æ)r±¥ 4’ÔãB^¢–uŠã43ó4UÆ#šC-0Q)\‘0‚Q›…’‹†ì-9&§gm÷¢öÐ{¸€Í!UȈҨfåÕ/ݪgÁ³£Î*ð½DÜ!Ši8¡À °ÐÀâ¼±ž/ºôj ̾ëé—šYw0Ñð³ÉEgÆ=‹ÕÕÛ–CˆƒE1ø ?Ç ’l5cBðà„´¦®YI¡V˜²óÇÀ…¼p#ì@«'¡+EñdJU¨V‘ -.ÑáòïÊÇê¡S$S,ˆ…(íìÄ*FDÙâd+“G¬ÓJry ,ª!ù&CÑ:0˜r‡ 8“]£؛$¿O#Ë!R–ÃÎÛ$ÙlSâ¹ÎTËÎsÞ'O¦µ‚_6tKœ;a 1Eþ +³ #ÝH²PÅ­$ûE›¤Ð@…´ rD‘é<Ö,õµ—2‘F+¬ÙuBËË!…»ð·ZËíCÖÓ8S±‚¹Å ƒ¢ËJ)3†zÇã`¿t$‘‘áû&tãr¶Ó„&›êξ£ŠV±f%“ƒÉ·¥­Þ¸ŽÖ/kÜŠ3s`[ÆAŽÅš£<§áÿiñ'¸Á 5­>®¹â÷_Û³˜ À‡çÉ#UîÛ+íO9*œfìE·NìÍÝ]J„r]0Bc©ÞÄ£’„j­„Åxï!ÛèIÅb‹LÆ¥¸þ–棨p„ õ”s·rÂ[ë´šRÝ~«:Å,ö_AA•¯Œê‹)¤‰Ú/™¶¯Êc9,µ7ø gFU×½0ñ¢:9«ÈÅlºkùÌ%¯0¨F1D.vŠ}}‰%M£¨£­Še9‡OçQ5Y[ÉÑ*Ÿ_ëw’DN01HYØÏW¡È2gÏ×gARq²& kK9}âÒÜÂs讽£BœrˆèBXpéFH¤ªªåå>‹Ö¦ÛMD¶Izj°[,µ$u8‘ ê<ƒ¸f1H"fìBçšäÿ’‚m‹›úNj(äeO+mà‚s-„ü¦)‰´NÍ4„¶É™-×µ34žÚ»Gʼ+Q™×pÏò VbäûŽ8ž2L'ZUÛÂ’véÕÙ,åYK!T²? 6º-­]y9DÂWy½—É÷\f(cÙ-3Ü©Ê8•]ÄAÞ©!,T;§¿}{ìļGâ’BP³(‹|BViõ´¢Øf™ö¦H‰‚ rñ}iþÖUÈEZ””I$.ÔNásiäûì]¶ô-¥NOZ+ gáÁ…`ÔaÈ¡‹kKB—‹nIž<{8EüK6 ÂŒAZÜÒ²-p¾n©¤s©’®¾keuÓÄóq¹³ šÚ[—EIÂ¤Ž¬¢‚8DYv¥y ˜²X÷®.’•Uè™´Ò_ˤé pŒ-ÄŽÕ©¦kËZäÝÌu¡)v q*>nŒó!ÊßRNb V!nr1iÒ¶R&úÝ«RôI¾Geß“$â=Ÿ³ë%—”L!Ë0AŠŽSµ¨]4…§Ë‰1‰®XƒT¬bSgj …è‰#UìܕޑpM%­Ïr0dö.ý)Øc*wzo™ÊV£.ô‘?$+Ö÷» QY×hœüÉy?ë*„0!FYH×\˜” –i4¾MI=í’VÒë`¸Ù²ûNñ’(U«T# 1‚]S)•ûIvWêdKGu?T¾7”øXaî¶!G!ÌJ¼ô¿ø¿»Výý;~¾cv+sŠîâ8@Œa=sMôêµ¼^ ¾»âXÒ¥k‚áoÅÞebŽ8È%;¬Ä˜¼¶£Ou*¥È"/¯ZÓS«®•q¹¶‡.`³…Bß6 „9ŒMý+ÿc!7ˆÌøt™Q¹Ý“ˆ0 åŠ MÝ^&šÙ{³JôQ(Òé+‘m¸ŠîÁJcóàw}jIÛo®Ø0SHjð¦ä»ùØÁÇEU¨dk¼‹·±ùJ’ˆñ‰ýLE¥"Ò=øk í4Ëe²©‰eŤr)n‚•Rvÿ3'»ÚÿÌÈ2ØÊ;•ªœ{1IÃIIFQê½K@òIø¤ª©L(ë½CϾ¶›ivˆúqÈ!tqñRMMÏë&­xý-¹2Qòx›Í+¸ä1Ì‚LÒÄe»v?ªòœAJûY«/å òKSéq!Ç9ÚÞ£Šº´ZªeÁK).¶iºlóE?ŸÓ8ñV1uöêìØ¬™TùÇC©NnÝ¿±A“ÐiS.†%XÂcÛ£CòýQB(aÈ)j!«ZÉÓBPÔ5˜_7§¸éœ-ÅAPF(Ç:gÔŽVé !þà“5ε2 û¹²s]wéñ8%U.Â"6= Œz¦jÔ`Ã¥.B-Öô ˜ñöÕò؇"Ž*LiœFB!CËb Em¾ q,!Tl[i+…¢JSÒ&ëøŽÃšc–F˜äww[Ûk‘ë7sÉ­îA„œ£­YÚÁêœ1D%˜Q ;;~U2Ü›¨u©ý[#X¸4›B.OKæ]QU¥lvñÖ")äM“9ä*ûPø5mý×쪄$â¥Æ!ÞcTQ®zæÓõ¶ÆÔÍ5 #uTŒÕÜaÌqüJq}Sî5“ž¤¹1§Þ^‰™N ÆUÛÕõíRzɯ¬®DŠP8Å{\b•EO‰¼-±†ã¹¤%„-E^×ÿAt\|/2}q…)ÈçúšîHt#Õ Âׅǧ(õMNg²„²ê¾þÎvR§1ˆªE‹ÏKÎ%s¿’Nû@™‚PrzM*× N_Õ÷ô£Ö~¬õû™±É²Ö2#¬;ŒB¤@QÈ”˜B‘J­'Öù>ÈÌq­ÙŒÑ‰Ë±gûÒXºBð•NÖö;"òc1”RŠ¥ñ2üj9»öݥƣî®D±N¤#ÕÄà†öO ½öûxËÛº¥N™î­G§(Àýoû×ýkÿ $}Zy „R7—ïC;e6ûŠ!Þ::=Ź*uQB¬ªÆ!'óPÿ‚ا¥Y÷ý˜½}µZºåo£ DláÛDkcµWyªØÕ&¿ÔaV¶Cú½Ñ]ý˾ª™‰"W»sÈÖ"Ð!F9nô±3£¡mO²s6¾åÑDÚ3ù¥v2•¶ŠøN—ù[&Ñw|I" ŒÄÄÞg®Bkñß$2ÕL‹ò 3¬VR¥žõcÖ”ªÉˆÏLJ²x¾†›)²Ó*„Ã(¤¥¶ª„M9±(ŸZiœèÛtAIÛ#ˆ¤âѰÂZ.òF(âë©-Èr‰NáUj‘+ù%jU׿eë„)¶¨+þë«Ý~c\£:ÔR…L!¶ÍÙ6Y å.ïOœMçr,^R×#®%xër.n[ŠÌ`Ã(æ´¬ÎÆ.²Èþ«Å©eÝ"KÚÝ‚ú)Œ‹ÇkšÙ‰o)ÂþÏdh#²­¼Ã ÉïBòR½RŸ—jNZ­ô¥l-ÎvmDC%n%§Å߯±EœÊ"SHbÅ’å}d:¶P‹v˜QÖ2¡2rGšÕ(¥ÃŠF̱%ɕ׸ènå‘OÂbÍÕI>qÔÊ|aGÏ·;SÈbÍJ”›¬§uºz%Êp6ÍÂÈèD(…uù¨vc_ÑE¶u†}§¹?ndÇn-¾ª˜RJæÕòYZW'¯°‡Ne" ½Ïûö2rÓ>Æ' QN­ôÄþÄDª5‘”Rì„!5 %9*¶¥s›I¯û_l:‘ßIµ¿»ŠÍÈCInÁâ²ð„s¢Xâ:×+“™;V‡";ˆ²[îü”éTlLDÙÿÌìM­Ò>ëGºDŸ¸:ú ìýa¸]®I]Å""¹ZðÊÛW m%Û–aN…M4ŸL® âü`£#&"‰ÄÂt/};Öƒ­hrŒc^ÌŠ×'×ÝmÌÊȾì[„lFÞ¹s¹]‹‚Ë”£#‘н:y™(†2X×6·ºD銄e‘Fe¼mS¹ò½N*-„wE¬”f¯m4·âvöL̈OWõWAQnÂ/ò*´LâÅÛãë .^i C×ÿgQ”0ÅXô$#0ž7S1"Ï@ŽaÐÅ!&‘‘q‡t£3tC\c‘1/ñã³X¨ ®áÊ#„}xüK”j7òvX+‘ÜÛH²„ht46z‚›Ô¦êUÚˆ$æPβ¹™8ŠH ¹ÒÒu0áFÍ![Heˆ."¬É‡ÂqËž„0ɹI›î%4T A0B¦UdÞÌ {#3¬v³ ´­²Fè´&+ˆòáÈx0S]©³ŠD\BuGuƒn£róf$`5†&Ñ)GbáiPÔ2ÀÜ0„,qpõè©Ã\ä'1a¡Ê"˜Žæ‹Y –ÒIaS1›!² mØ3(á`£³ŒGEF3"iDU‘Uý¥a8a!Oh„J™Rd%µQYX%×HA 8„ ¢"±ŒÈ8GC{»¼~équg(¢Ã ¢àŒPCâÐÔ…‘Lä=ÆJ†cÃã³àÆî~#F‡R‘¨ç¸ÀD˜¡/„—ãuQ•xC1"ä3ŸQªD83¡ #Qã}]ìŒC,?P£Šˆˆ®!¨DLbíœb\5«”Dfa¾MÉÈ1Ðw!Þ(ÂõbÆ€£5”e¤:)gÕiJ€äV¦ÔçW£}„C0‚nP ÏùEã€—à™ xÔANT•Á«Â@Í XWåü9Eå”ÌÄ\¤C+Ãgäðvrø#†Ð¹I¶z‘EVNH33-ˆönÔ”ÃcÀÊé9Á‡B¤)±=ü|qÔSJ„S·Pbˆ@ÀJ%Va›¦MI‘ŒPÝÐ(†9LÀP°ca±ÁÊr©ZV]E(žâkÃñQ…Ý œGdS|åìaŒBs…*àƒ É˜Ð¶ùœfPÁh!ÆãLb‚„S˜ /ØDaC‡Kž04¼˜"˜‚q¼.¹€£d”l˜%LXƒªE@+*©•´m¡£Ï¡ ÏÈF¼à†„©¥5aòªÌ1Œbr¯eçX;¡Â@a dyCÞò&2¨¬-” d¨VP‡¨Fâ2ôS2ó|gC 1 P§,}KÞBœ+.8ˆ‹x.ÊàÑ‚2„ bA3 Ç×€î½ÿøÉ˜ÅN%©¦ßÁoÚ·ë×õÓû#´å—`¸rˆOÕ†}›çCK'f“rŠ!K‡ýkeNEÈŽ¨Òmcµ‰\P‹C¤‰Cý+Šùég°­¡½Ò‰IdîÅMSŒrêivýC)ÖF³$™RºûÔS©Æí6w¢±<žÇ²õ|ªëç%w—ËÏ}ØB­TìJÐIM»IW¤aF|a4¶ã’ë1"º¡Ö[p¤ü1|æ#í‹v5¤ÍÛØ‰Ö&ÉÂâ`Îâ+̺oy—tCX¤8¬PÈT\7³#¢ˆQÖåºÑÿöoú¡tÌk=m‰gZé$u¾Çk•1¬ÂŠÊö/i^WUM:.ÿ›D;~³± nË"ë§#­\&ÔoÜ6Q Ê‹;eK—¦[sÕÎ(­U!?y.cÊ D-rO è»vuÒÓ­é{VÊgQ©Ñ­{[¨¥öÒ†#%{ÌÊ!:QŒ¬z'k›ÐV`®aYxÕ´b\û´êSw”¥gß"’+³™Ñ¸Ùù¥Eb&éèÜ­ìdè›NZ[l‰+qV3”lÓ%Kzr ¤Ý9[³]3É/á1$ö0…T~sŠçíÿ#W{jâ–ã-ÓdÑ(ÏÚ¯VÂVˆb½W>"§n'{)6d2ÙJ´˜tà äïEJ+ÄÛL}سSNˆUN(¿Fîzáh"»­Ã9/F¹\wËìýJaÎ37¶êSàO©|‡Ü¬èªz܇gAzþ‚m¾Ëì†Â’Fâ":[~ñ¦‡C\›¤Ke3cå]$‹S©,^tÓïþgî…Ó‰‰„Oöû÷Ùë¶`ŠåÆFüÉ•„h€Æl¢ÀkP"ÊÒ˜ ìÆD¥ S|8´èz´Â(Cµ …õlØ“"Qä „ !IDxˆÀÕMB 3s²êHÙx§+‚ aïUS6æ&£]B@Ãx:cÈ’Þ£Ô't"Õ ¢Z@Ó¤"ô¢S¹Áy°¯@‘‡dC2©P˜! ¶6tâ^÷) ÌA«w?b^@Qï$ ƒpÚ)Ô„DŠN“AôäBòÔ¡¢‹XkÌÍŒÆYAÃ&Ä?ã¶Ra8x~˜‡@»ò@£¸d2a‘Ãàêb˜È0Á8DJV"¨çr¦zrŽ#6C¨¸v‚«{ˆ6‚3B!"ò|3 (!'Äx‚}ÙÂò•‘ËÓMKÏë~Ö•¬E-ueˆÉä{í]¦”¤°Ÿã V;ÿ;¥%×Áß9Ž*¹k|~âð­ëª•]m¥·732Œâ/"²‰Êºg#7HéÎWYÑXÔ&äÒ›è¥Eã[zõ¥nÜQjMÛI‰Ÿéþr) r˜îZæ(â[´Ž@ªf!w>Måk™ùZKžYÒd”ÚoâtÎÄA3I_LR gO]Æ)]n܈¾û+0ÉäÓ{jÕ uÔwK¬Ö4™MFi V«9Ù„Â×Y5*f FË¢b½ÿ¼ì3LCœ ÉTÕóŒ®"c¯bFC“k~ÆÇÎÄmQv'mó+—²=ÈTÕá2™U ‰¥AGBQÄ©Švÿþæ_^¹C”Ä'ËlíSmÎINIÙS *SQ½.‚B¤Þõî†iô+ ö ©ȈÀ1ØçX”ƒù8ÂXRƒÀu¢¡pœ„±ºR– sˆ~ìD¢\3 â@Øg X#3ä|k(Q—˜µÅØGqTã³±V‰DÃT9• ÁÂ\6 FMCv°ˆÎ‹O5ÌEn…è]:S„IÙÈKÓFâ7ªN!0Ò‘ •ÇBœVL¿9qƒ'|çR>C“Z#eK¼y‹†*°¤JŒÃèÙ†( ÀAœ!)†¤†ªºÈÅAÂÊ”qfuW8ëJW]'0+XÚfD3¢ ÀˆcNÑ9:F#|œ®T^¨W''ø'&Å#Õgvå¡ÚKFËž¹x3g°$)‚Цla¼Äs­fã8_࿘ ‰Œ)FÏxŠ…4;2°A–ŠB#NÈh΃‰á ±`uËh)XýÁSÖŲ̃ˆª­ÀÂ(Ê€jž¦£§  !/Î`¬,PÓ '@GZ‚<ñâÆ 7süƒÊ}tºyŸ•ˆè#]¤Œ¤ˆ‚÷8† ûð„3ñC¢ Äo ÈT¡o±LHÆ æÛ;h`#ˆqÅåRBNlbX(äuPRg”¨* ]b39ž01‘˜ Œá“-'´‡¢ ëV©¸vnчzÛ% ŠåC¡  ~Õ„G,†¡‰s§¢ó‘L%HDh¸uŒ0±E„erhL*)é8§[8†+¥,+‘:i¿p”B¡ uøŠvè»k¼‹¤>•Õ©ÎR/_œn=¨±?mR»jN)Ä~½”®™„ ¢«ÕHe'ÅE+T‚–´Gcã/jÕ¹5 ª¤îÇþ§jvE9:Ÿ¦&Њ B©ï~†ÜJ„!I´%¢ËŠE®gœ§;t¨Mf¥\ä/ïÙÍÅ1"5»«ˆíb'½˜åŽeIIÈ—g#ŠÃ™²ßÝDÜä%â{’E'^¶ÉÜ®ëû¦‘é-Z)NHŒÌm¦{Ô®QØŽ[!™LÏj4ŽfÕú“®î3†¶ ¨„Rùj$½”Z/êû¡ä¾ÕÎLo!ÈrÕ0c"~æ‘6Ä1JT"æ%$Öîdͬœôí]õvÔ(3ÕQ!Xã²:8ع»c»„~Õ‘)žÕIÏ··[èMåwC= ‰M”•íײˆ²Â2–´%50W¢Ùˆe¹/b°TÞ¥×P–Ò™ªJ…™Å:hßn!ÖÉŒ¤>ò¥NQ #&{S)mï:Õ¬Oz¾f¶ORjý|Z Ò;јʸ6ZÕ^q©®ªA šÄõá ¯†#Ý””rŠ'³ÅÅ)d&‚¥-Å® æK®™ó8~ï(â°zè´EÍ¡…",¬ìÎ%±/ŽÁ•'PÈ‚ÚÈB¶>u¯ÄLœ‰ r¯ß}p¼p‰ÈO)šˆ”ýú¨¿i+Ö:¡|ÎcºV¯Bö[±ýÐÏg3¸¥¥_Jñj*­(¨¸Œ’¢n[ëv¡HØF"2”‡! Gâ=¤·Ô+³ ‘L—º¸Ç¦S€?ùÿó@À<€R€Xìäk{hY¼¿ÐÞÈ¡ž/uOT(¤d;Õe¼/Qc?%ŒÚ<¶ÆÑI€ ª=rfqX5AÜîJwû~ ¾J6šÕ[âvá;"(eF.½u ¬ªJ>gNn››dSbeÂuI#fÕÛÔ€ŽÇ¯¨‚›#ÓÐ+ÿZßEAÜ]/Žƒ"èõ=àŠax%žË·®Q„j;œ#*lòD¿ü´žÃ*> §!6ü"aN!B^²È¬‚x± 1,ØÔI.3*7í}TÏÅ^E¥K¢±y•ii8R‚%ÒAŠT“×¥0\/[s9IýÓ0(ÁŒ:”R›}‘b,ÉVI/}L­ú“¨Èˆ†JRZL¾ãq2e±·qè‡[#ØÒ’Ëú-aœi¯ö íâeeqNb¼¤WQ"ØÙå¢Ô×d1ʹݾþ“IlRª#5¦“³”ÚEé#& ŸqHåxŒrÂ}2…1ëK2{Ÿ8P€@0åüÑ G¼òÚJëwjåñ)¬ù^嘵_S8\Û~ô é@E2IbÎâ*åïËíƒþG*s6º¹’¨53µÎ(¤š””Çd¾†‰´¿K4m^T‘Nf£úL“–‚ù)­ŠYöo'7‡S6e Åe .yMñ–RYNâ¡lôÉûïµ’›Î2ÕÒuB”¥#~×G,u«÷S¯N¥R•8[7ro™ällf.=lÃáÆ+È®ÈLÇR¡iòZÛŠ™x„Ö¹Z¯Iik?šd „g5 ¼’’âuõ¤Sœy šzß #eqåQYŠÄ%d`B…ò‡ïÓT¸ž&®äIãm¤eÕ¹R»·…V¼MšWÍ=8´ÙìÏ¥Î/ì ¬*®)93vMqÌ3ïÅbþ¾Ã°ÅãhØj|’IE¯Ù¡;ËæÀýA e¥Zc⎜Ìû_¦1„!“þòò¡1QÊáJ¸éˆªE2Où)™f+b;ënWäž˜Ùæ»™Ü­˜_r¢5‹äYVV»UWY#ô,KЃ"ߵ¡¸¥©ï„Ò­ !Dq\eÒfaÏuÑLÚ |%·ÖÆ0㯞ø÷NªÙÅ!I+Ñå’hÑ:c÷åQB"’vïøõý8㥞VÄ!x/œâ ‚ŒV <-{1>Èut³ÑþøüªÖRñíñéÿ.Q 1ß‹¥¨Ýx'W"®-(()Æ2©ŽáÙ_Eññ³Ý ØR¨‡ÎÚB³÷û+‚P^ ¶c¥uè¼BÊþEuÄ~RX–°],´¢J‰Zö"¹ÆvFêo~Éc{$¡9ÊÏäO0õéÊç-M¸ýEÑÙ oã†s·1ÕÉi|Õ:bOAn¥u|§©!ŽB¦R•­6ë2ÞçŽ S¹:ýîçˆmgpC8¨e!ØtVþ½+%òM!x™éVªw× fQ’b9L¢^ô¥v:Ýœ©3ÌÊ•Úe–CÕ~‡ùëz¡Êm¾¸äWF°´7¥0Jc¤î ‡§)Ö‹‡Ìµœ† Šâ°åw%/˜#Ž®M’„K—è,ïGT*H¼p”¶™Ý¸Z>11 ÜþS)Œá3è%íüæªÒAÅ )Ìôc¢…´”Î)pmY–F°ù1zJ¡ŠD³±W–½–Äz(Œ!MQsS”N ƒ:Ýø­jïQJsæŽþ\/ýë…Òª:øâ¨Â¹Ù9èzR-+¿ÍBñ?j¢ôRIDxN8–KM²”蘖1Ï*¡*K<…©p¼yâwKýd)Hôª§E-+JQ޾G¤F…9ݴݟ˦ðÜL¢©VÇEcù,h‹ULäv§Ä•½ôå#¶¯Y÷12¬úõ úKõ,RU¨“˜á‡?ZnÔV£$ã!SËQa°' ëê6‰žî*×ÅÀÝ&…_s(j[n¶%Ý.ÉÕÕÏE-ÇuE·yr³\ÑQ\‹¢²¶>”µRœ² 3Q‚¥ªÖeÈ—½uy¼_ÇÕMËÓ^„‘$ ÁCeû¶DRæfÃÊB¬Ø´\ VfÂÎ×y6Óz]71[EaØi&µ3HÊ´‚‚¤Vñ(4„æ-½¥9È%-U˜„á1ñ‰«’²\Þa¤E¡µ†WÏY d=^Âù}{7·))!J„)MÕÙ»°ÈôRˆ 9HßCÕ6ˆYs19ËeC bÓÜ$²!^JÓc¡PÚ|qFDÃh–£¨ÊêDf}pã™è¢˜9²a´¦ùäõ¡\ÈJb.#27«K­Ûþè–R%ËK¨u°9ÈùZÓJ¾¸¯¤«£5)U«ï3ÎË_ï£`œËªñ)8¾’EŸØ£7±B”u°õÿ²´F^[v¥eÍsˆ@„ú>š™b<ŠeCÝEáê¼ÙÚª÷L¨´iOlËQãU‰uye¤#ˆqÊQàŠkÖ’^’ÿÐRˆáEj¤—‘Tw‘ºÉ*ؤ²¬†¹>A Ÿ©ûb-n ŠM8y™Ø ÆýB,›QŠô<Ô4A4N.Ñ\Dk\²Öå©Tªâ;ë²|¿&ªÃÊ”TDy_åÛH‡9jdkÍwR!ô)™ŒZšÂHZ•ì-…œþKËdÉ}f)êR~Ñfö Ò¦É}Ýi:ŠV-æëY-íéQBråÃHN›”ÊÙ®!*iEñ¸)I0ƒ¨—!4å Ÿç—ƒ0””ôïSàŠ'L/|;O"ÁmD†àðñ€(Ð;@+$à  H€ÀÐà;@-BcÁJ×!åœs!X¾e·%»Ÿ%sRä!6X‚â&Rª´!LÊ@i¹™P"ŸqóˆG9nẆ+ uÞ1É÷s!ˆ0‰ù¨B>E<®ä#²Þë …câ_3²¢ŒÄÄe³6;ú …"f2ø¶¿«„XI¦¸Ž‰s'$\OÙ·2jUz)Ä´!Ì!ZŠ‹¤s2R3B4C%Yk!6Ý­ç ˆs0œ´ì®çâúÃ42°F,}W‰‚ N~Í^ ×C’¢õæ{xÝ›V\‹á©‘3*µAw ‚i¯,” ¤Ä¢#¡éaä•„²70åµ8C4gâ²n‘a ¶*hQ¨–êU”ìŠÑ)«ôFù>Pš© † É`ƒ3Ÿ‘”ÿÄGJâq'´!0^b "=Œg¸"˜‡P§æ‚"B¥`ê±Ä3.«»3™x'1:R!©i44F•+¹óò¿Y„Ùˆl…=Ÿ; B.¬„.˱’]í2šÌU|„Ä2¿Æœ¨D%ÄS3隧㌾¾hNǽâ9B… b÷ÄC˜ªn6BFJÌ\‚‰ñMñ#±2ÕtíIÉÃ-˜UQ"4“Á ¹IÙ Î$ZEÒ¹+Œ¦ù(‚2ˆ?ñÑU|c6NtH%EV‰›3¥a=ÇÊd¾Å;üA‰ÈŒÄSA*…†tÔDÚ”*úlo§^-v2„#[ŠeˆÉzÂcäùK)2;ŠšDùU«ˆ6Ñy xƒ ‰±'0NˆZÒ’1þ‰sAU@ïù30FüåTº †VÆ8’Ðè#’Öôž4öb¼" Y+#*{ Ha¦+;6[È,Y]ˆ·ºÄMY lͽ¬„‰îÌÈJ‹—°Y5KÌĽХõÌÐDÔ°½DS" $°½Ò¡–¤ 9ÿüF1Œˆ&ªôq˜„‚:z`FPC×}aëÎZb3BzµÏc´Pj „‘Ñ>¤ì$é™E3®þâ)‘i¬Wèº=,¦ü„SytEÊF±ÔF¡ä¨”–=!ˆCX-DÄ&"ÄéÜ¢vh È’™j³Q®b‘UîÄÐÄ*•Dp'£±(»'5Á‘"ß*“±*å¡:‰Ïh]W f `ŠÝXˆÒA''XÐ"–zŒ^®ªLš*"®Ï‚8„}0Še¬HDQ9"ÿäMf)žzÕ‹v¥.ú4cQ R\ æF„#Qªi:,gM÷J2eÕM¾!Ú%V LƃšáYÍY,)‘sÜr9Œ%hõb‰Ä%fj·k­ºò€Šjô¶@ÚTµkÅ1!1»Îeß#BÅA›&\è°eÛˆÊö‘½l›V))W4ªc² G9'"/!Â)&E XcI¼¥ï2$5x¢F½kR±a”ŒI÷èŒÊKÍL,õÑ’â±oéõåt̺ôHЈƒ‰9´Þ“Í3i‘Uf"©Ö]Yî‹ØRq"3(Å5F9<ŒwStÊ„LÝ{â"šúéàŽMLÈÇ©ÆgÿÕFCZdúõN›·‚æ¨FÄ$˜ñ1lb‘ ™aŒ›Ž…Ht™èÙŠÇ”£:e2Q%3q­NŠC-2M—úŠä>\Má"+G²re5檻µˆ‚niå&ÖùÇ!ÙI6¤Â1c $š ì9œA—årFL83:Na^B´äèŸ9nh ~d1%Åw+ H} ' G®F([J;˜j0lSC ‰U¬_¦‡[Lš9†¢ÑOÐoº…BU;oŠs™CN‚¡‚`/0b˜4 `BÒg0(Q ŠNê;Á>(àˆÅ9ƒ+ŒgpŒ~A…¬Á”9±­zG3 çh €FQjF@‡)†¢á‘1ƒ†kJGQqWd‘ˆ2ñÃÆ_Æ)È ”A<*oE ©Ø#r±”|B¡ÖÔ«ã\·+DÔ›9Dž „`”HÇ „dG´ÄnâšÖlì#xõí$ò«•+ØÐÆÂF1?×Ó œd ðˆÌˆQ’ýU*_kqâ%ÂYç3¥³Ž`‰¬¥x|rEØÂ˜¤IÝ>R°»ÒcL~þiùИå¶0¤±Ì02!D"Ö ™ÕÐÆ6 lJôN ÙW·&a9MaTÌ¢1SËNEš9t””#‘^ˆF‰…4&±ˆïÚÌ¥‡‰©™£íÖ‹—R^ÃË_ÐÌê¡•rŒk y)x‹Ý±qÌõ„"¤pƒdñ_³y‘*®ÑH6U`&gÒmh¢š’ EI<%­Ú𯕙ÍÔÕ¶h[£ïÏÑ$àya#Lx».1M†$L„<õŽÒÊ10ÈŒ(–AëIÓ½&3‘bY6])‚%ÅdH8„S!#ÜžmÔK^©–Ë þXäÃXÎÇQ¸f3Á=wª®íôâ@Ôµ3 ’4–‚c 12JÑ™8ƒ*5cwÄ…h¨†qRj±6MX;"–°!‡µ³±‚!ÞÍ0‚+ÑTâ#¶Õy²s ª*ˆ"Fåd1ŽèÈ‘z£™§¸ŠCnwB)>‘M i‚êBŽ!¥ò'f ¬d°S,ÄJd)9„ËQÒª÷eán1¯ß„™NL·@FjâBb6=hGå›ä9‡*Ÿ"öúd£™«ÌѱA¿=g|`Ì*àoã' ×gi£:Ö噘Kf œ%Cè ¢@HŽ€0OK])&™wSaDŽьyáÑȃ [.z¥r!Q¸Ú ‹Ç\ÔßlNJFÊIb3z\BÍZ’¶£d"Fñ'B¡j‘EVFr¦CW:êO£ ÓÄ‹Ž!= Œ¡HCÓ_ºkªÄ ÎãÔ\‹Ä) iq÷˜”ÐA‰Q–^&Š&ÈñýlŽ­¿/G^F ÌûÒEeCb'"PŠiùM„-R›Ù˜›'™ÌŒ\±*mIhM1‚TÙÇ ÅJWÁp¨$ÅQr±…KõÁˆ°ÆŽ„ÚQ"| Aš§_ê9bty&Ç">D"ãäÄ3 „æìj1ÍÉιtB)VTí‹m)jñ¹‹Á²~–emJZ!0A2ò·°ŽÚrá Ùê˜vÚˆtÐlôÌ ÙÐ$Lš:GÂÆk ¨D ð°¾* Ý„F™B§õPÛ÷† ”¬@oúŒH÷ØV”ÏaSéhŽ4¤óS Ä DW L"À—òÏ”‹.SKΞCúùŽhƒkBK,3‘òȆñp½(An#i$>ŒÔì„ ¸ÜÅtÍL$ ˜ˆ“„Bb¬êuðY^Û[ß©NYª„ÌäQMÆj%nO0B$øšŠJG§é*VçÞíDA¤é«0Ñu JÆ)X³}¸Ú­¸¬úADR©I%°G299‘ šºÂ…EètÜŕ̊EÂaŠ! CÄZÇDÉ‚S@¤€v1 uþÑâ#’Ô®A!‡ï>莟[˜%tC¦+)O‰4oD}”Ï‘í^¿¢YxŸ.®F"X ÌEbnÏYÕÑlÌuI$!¬ùV¼+Q%ÂzÊÈ[”3%¤c@¡Åh„½ÌäZ˲ôÃMÖf„sfö˜2‚ˆ‡õYw_©SLLW­¤(‡¼èší9’  ˜ë©©Í÷i;ZÎz«`Õ’D‚*E•húR=q J% JB(aQE'#6s]/32·•H왲N¨I¶ýW:f2¡jy‡b‘JCåÌ!{&ÈŒÄV©<¼Ææò8B „ŠblåOÑs˜ÕMô4F#ºDJ§UbE¦Æ2¦û+¹×î´´&TE2OõJ<¸da#4\j”¼‚·· ˆÍ’‚;¹ j†dÞXfÙdøø]ø‘ŸB[u&‹äl"rë’Z{^‰! \„ ™*nb3ʆ]â2L¬R¤|f‰ëÒ?+Wê>±—V.l3ǧGI!¢µnÊÝÈ=C§Ja¹.¯fìu!ޤjH$%IDóÔ\ݪXb:¸ÔHëÝ+nÕX¨ŒQ–ç»ÜÒ(ŽÙÑhJF]ð¥Vd™ÄÃd#3u‚)ŠÊ•Ì5NÏúŽHN¡†9±0œˆÖúv)Ÿ¦¨gÝ'ü»ÖÒ‚@D4ðÙÈRJ‡.„!!Ú2†ÊŽŠÎʨwLF™ÄDb•U²Va ƒ!*U”AXÿœ‰Ì‘¡Iq¤°ÅµI&ÐE+^“‰S¬â;.fQ4DæsCh\ž[ªhÂaˆZÇ7EwÜhÄ'ŽNb¹•#áI„VFœÇ–gB²©s Es†SØDµúžÕxC32'̃i#’ó²²ÌÙYYrÆÏ½Œ@„dnÙ‘”X=CŒLªZ‘;Q«[¦‰^î߸š¾äzRØ!L„r|BˆÜEnI¶äm‘¯(³¬Cù¸„æ¡3Qó·ÈS*RÉÚXTv..¹šÆmª¾J½ä±6ML6š ÔN'G¯ç@hwÿøÉÅ’Nþ³þ¯þËÿÿvÿõ´5Ðô¿Å‡܆Me¢!”ÝY”“dʾ3¡%™&*%fùY<347e©Ó$¡Ú¶o]<®ÐA1¼[™™Þþ´f|Bm³è­¥‘½ïȨ¥±ó>çTŠD74Î$fK‘ ˆµ…œj›©¯‘•n¬¨øß–››d“é™zA$›5^›•³UwI´e1YàÆ$tmQP1f ý$dŒ*u<,'W;^¦uÞÂO“\lØš‘Zbq¨A'©ˆ’-'ûÖV’ ¢Äé‘azÖæFŸR\ÐÚÇ×ÁÒæ,ØIXn"æeëõDíy!l~ÚåÔKvÃ7"”‰ù ‘¦Ä*Œ”CHŸÃ¾¨4”NDU’RRþÂI…ÿeO™±:¾ˆÛb$Ÿ|Ò5øY#BÐfA„;"šqu&bè\ùídFGNGpê#gLq©„¨B+t‘uP™ò=·)"åõ®‰¡ pÖ«)#xœA³ëÎÜÊõq2*îñÑDY«VÜĆb-b12‰‰ûº<%§cÓxæ&=ndˆ­D¦êbR2{³^†T"CeX„yc:Æ)›rY2#g^u]ÍPE'õ9N‰‘ÏlÈ|®fT@ƒ#“S ¤™‰þ¶ÆY*«rÊœK¢a™ 'tXÕ'DÔž²1ÆTº¾Deš'0BSïoª´§uKŠœ"3)i«UÌ‘‹£ÙÑr[BÊŠ à tÌEÎD¯TD=^L¸ÛU#>eJ*A¨bb#a“!ÕJÛ«V´ª'"^Îåž0›lŠ\‚MûJBìh¼Ù̬°›¸þ=»˜‚C*`ʯ¯Iˆƒm%Vz¦sñò ;xŒ²ÒdL¬V' &ÎÒ±·mÚÈÌtRpO\o˜#\Å»º 䡬ÌÉ«MÕê.SQ™ˆ—Úß~J™¯úYb& ‚úØË™Ú³ÇÙ"e>›³BEJ‘ØÊßÃt«b4fDÉ6"‰eþòeD¬&LîÑÑ•IVIº¬ä¬ÄäŠA&È$ôv1$£TȦA!²©Œc!EhX+‰ë6ö^Æ¢’táþ)§5±Ã`†5ÌœŠŒÊišÆ^\¿WÚŒÐëPiÄ"‘ôRF»r’—Db\$C—þέ¨³˜Fá){¡Œ’®»æÉUªÙ±$^_}ɾ†øJ™’LHûfbµ6œŒ†E¤ù“*)žÒÈê'bw¦ˆx£)‹Ë ‡oé»».ò Ã2i3oQÕ©Y´ÅI 4BÒ}ùæ";Õ#+i‰˜œ•!º$ˆù*%Ø£óQˆ¤óåÂðDh©s®·5tiá&ã^q ©3â"7r4us21U/Ÿ’™f†÷FµH­îæeèÕ9wә䥲R±ÙŠ˜­ðØÁ«-"éÖy"ÔÑ+1ÞHž¢FG²$‹G'JI$ÏâÅtBŒÈmä²lEIŸ¦e¦f)m‰ZyUt½ÐMÅ2ˆ#2°c¤B$Kù2 Ù×eu7$²!‰Æ¸ËÖg“&oö¦ò¢±v3³»Õ&jÖ~hŒ„ldÑS‘Tò4äˆÐZlJ–a"vB0ÈJÚ—MÆ_$å®nùT‰:ƨ£Ór[XKäHCeJÑ.C@Øš+uIP‰›$œ\Í¥­Ò¯eîÖ.]ó9jB7@h"UDÕ„1|¦ÛŠÆ¤$µ„>›¦RåÑ5¬VßgêÃ/¥ù¢]O±‰¡¶2§6BCX¶‰–È6KÚÔ÷šËNôè±-µ¹Él4æÔ͘ÊP‹Ìtó Dƒ)™&¯$Ú¼k;ÛÖ&ÜyÚ9Ë‘mhª|Âo ñ·'·¢´dÙðOJÄo’-F¿¸=e?ûOvÉæ*6ÂDI¶dÃɆØD—.JHÙÌrw|úΩÓ-Å©ÆäävSšà™–ÿI¬-©n#²lE*C {·$%&ÖžWR’ÉHEVd1 vU1„Î\V•^·è}&4µvT‘ŒD¸Âcj¦ ¶uq–1ëÝd!×ý–ùövXcyÈoɤÿ¢uÂi¦©Ù³±ï³"1 HŸ_JÆO™,!¶~­qEW’SÓEÌât¢m-¨`‘2%dEfÆ$ªicÜhs+oóËo.·ÈX­\„*É­AˆÇ‘;ôãó?ò›ó+ôó÷ßû›ÿÂÐ}ª[SÓ__l!}š^E„WÅd!BvHÅÊ|T µ\H&uºÆBK!ŸC$ª°º;"PNµF ¡ZÃ9Ÿ24d^ðJÌÊ`˜oª¹þHɶFÖ¤_ê%µœLDŽ•HOPB§ÃFô‚'³¼AI,B?䊉ë!uc2±ÊD1¾FA¡ ‰ˆ\œËДJ)!ˆÆ&½ÖõC"hª¾HLIT‘c)/i:<Ïçk7F ˆ¬§%"†¢uÈ‘-24gÂC.­¬½q²X¨nKÉi„!Išîe†»CN´ÞR6ñó»BWžJZ$K¯DdÔ©yh†"'3ÚŠj‡ÏžIŒ†Rb5RšJËI ."3½Ì"/Ì6¨Ý*ÇùæØeí ‰[¹$ÆvîÝа‚&!䩳§÷FHÈ5é×%O)#Fç“FrGhØ%\³»F2#vŠJÉ„LÉ1$™nXv-,KHTXÌ™;FÓÌ¿âFj “•?q(Â'êk¥{®c%M™Ô„ÆìD¬k\«t-˜×ܦ‹fvΊ°E14Ù±Hcg"Q+WEQS¢\išÔý* Õ&‘—sA´"“æÄv!¨Á‘–ª¦##Òå^“d¦É¼ Süæ©Û“jÑ×Ú‰Dvnž!·Š„S¶Ã¢DZ ­;~³åÈŒùWduµQóZnˆnÔÕ5m ¹¡ ‰;˜„Zö¶-ÈJI#»Vóc%¹J<¢Œ´¿M2ÈNCŒ†o*‰š'b4æ)RDtnEz‹f…!E^&BR±ž·VX¡¡ ˆ#¯/â ›©qaˆ¤GHTÈT‹330Ú²3gKÒ_]0µ¹+vt+tõ¾–+BH†3x& t\‘_ëÌíjª“¤1¸w™áhÁ.ÄDd{¥1Åè0ÈEüÖ&'ä—‘DkÖHN|Ã)p¾â\rU fBRLZ½uo{ŠÖ® ~„VêVHNHAÛ13ÕƒoI„e Ý „ìK˜Ë¯Èš+÷‚%‰¯'E"ØUޤß!m%éFIò襹*]Â#ræóXÆ&”mš°eÕÄ ¬TÜ•:± ÜìT|¯U'R¶1ŠDÛµFŽ„cNd„K‰ÖŽ˜Rd„tÖ™|ëÝ IM˜‘*d ln%lª“#Z½’çl¦YΟò\0aÑTͪøt%ÕÈ…k·/­Ô?ä'Ä™$f£.“„ˆ2·0™”G‚q/T鋊†C½ÔbºŸ Cä2´xæ÷¼#²üc"uXF»H›¶«úm„愈‘µg©StHÂ8Éì<ÙYThD¼m¥L¤•“Ûf1<Ä%Míd]¼‡OÙûEtÉ©)¹Ý^·I‘ÉŒŸq2LBE–±ˆ¨7¿DÌ„6ii=]7¼\ŽÒªï¡‘uØ‚FvÄq(Ðe ®!&T'_óµlŽ™’+ëYe¬ˆ! ")©7D³ 9Æ ¯õIl1_Y𖫈j¼Â!«£S?BÛeäJKT…~§õÆ$ ’ò"A‚îhÄL!™)˜‡¬„$E'Ë£©õ¥G5LrJOM$Ueˆ%'âg¹H!šâ!ùjX¥;&;U2óGÙ2RvûÄ”Ú[ }GV™°›‰Vñ6?\Dfíщ£1øŒÆ’ó·Rw%V9J‘ˆO͘R‚Ò\Ý,Æo³Âq%ž!n”•„„„·w%79m\Vt¹/ÓvnsÞ&m†ŠìC34$ˆóD6A•P½ ÖÜ8‰ý­EÞ.„5Þ„×d„4d Ô‡®®H4-®$¸ä%7p¸Ú·6ÕÐb”Hj’ÕUWøÅ#SGeŒ—6ÈŒÂ)†£aˆù$ÄÌ0”މ±ùëÈ|x”©*ekŽ4^Œa¿$2ˈ2{)VÔ2 Öl¹Î¸ÆñX±£bOv3€<ÿøÉÅ“N‰ Xн ‚0´íI’˜Õó׫ˆ¿Ô†Mã&7L„gV>ÚÍr"¿ý1 óL‰¶~ºùY 5MóÒV\FT½;|ĆÌÅv€ó. BD`Êß+;„$ È„hYîŽJù™rn¶ „®\F7j†få1©É·°C<Ú§Ž´ªaòÜa¥+¼¦JJ±Ÿ}#,a‚HüdM†j¶åh[V#ņgñJ5±ÄÈLV÷£À”dƒà‘"§b—Ý„E´Ì•ªÔ?5ÈNÊNh“™””¦!)ÿ'ÃïÄ\‰Z¡I¹Œƒ4ä4J%S ŒÙª¶¯•ˆcb´Jª^)^+ Ð̃oœ_þlE0ˆMi“#+!‰ÑŽRJMÂc$zªR{qSxÜÊ„‰>² &Ø·iQi¾!HEýnÙirXØdYÖ&‚Â1ã9?ÈÜÇú¢õT„‰5kN~‚_ÈÉÑ!™—½®‚a-±/Vjýädçâ‰+½ÝÑa25ñW#³@ˆÑÙ½$nLDÊÄVD-‚ÚæSΉ¤‹™ÈßcW{‚RZÆkr÷Õý)-òȨ¯‘ Ó‹1™[V" $bG:õÕPD‚V´¢…uª2Æ7e#ž%BA°i–J±r-žÊ´åœ¿r\—äšõ2µHÑ'HfBB3SD¨$òshÉäX[×Õx¼%¨LË“Òv^¼ŒÉB"}u„E›L‰æëá~2‘‰P¾'¤á„k~„…½õj¤!$Ýš\»¥ØªØÑ5& ¢’¡8’gB¡°„“º£èd”„ªÞ¹Ë\é1A•ˆ¯Q=hc#˜ÈbÅFØ$ašô¬)ÝÕ*¦A“:ÙêÚ1i¼ðHLDñ¹9Så¶RMZ ]áQÐnƬˆù ÄV¿š%KR‹fâ!„F”°|¡dèBd3žèJ³± åd7¶d’?#¢÷Ûù¦Ï:%颭Ÿ#1XÝäŒÈÃRTˆcܹ)>^•\JN^NHNm‰J´øBCcY%E”ŠLŸE°Ÿêd=f*ÒãXJÁ#mQ*²=¢˜ÆB^#A–íÄ×±M«ØB7Ea—õ"^˜e¤écÞãÆ8Õ‘Ž¥v¤wœÁ‘³¸×_f6b32 ´Ý¶VòbÇíZ„eŠ‚$†ûwæv©Ë†KXWÊf†u)l†Aó"" ‘XéYedsU.Ìm᱋²%Ì4 Øí•°‘$! fº#"»Z¶eÌ…}³'§'cÇìØ˜žˆ–‹É¼Ö*6DîÑõV×B‘Ir$Dý#£Q©oóU©Z:]~°ßäÛ+î÷ºáŒÈHO_ò¢¹v‚ŒC .TäcTû£ì¤RNHÉ©VëØ†©•Ê%‚=†@ÉM–¡o“¤óP\ê©ô7Ss"×=7I±!:™·3TÍ1â(FTµ¶ÚdLj¢²µ‘)›%Ôæ_ÂM2 ûJ¨¸UG©2IØ·eŽ1"*¥#GÚÂA6¦T! Q¬ùZ½Œ$Õa+9Z££rOJJ»,ôf"•6#Â"Í–XÒWR#i/2â¿f³šYÌâs"eMß&B«dcC5ÂîIù OÓy)SÔ†0†Â¨dý³¹JHFðœÄ<=¹óeoÙÅ:̘HщÕB2Âć?Hðd0ß©— *ª 2¥GV¹‘®c2ÅB^ÈæÛJ彉®G½1¹=rÔ•M6&k’’?¢¤LŠ_†>éˆ"B.„Z¼š#0”eB°7ÞÙ72!C«+·ôjCÓGý_*ìBbE…®’±¼lA£»½š~Žv•‰Ôúô± ,‚ýC‘±¤®ˆèI± r7¬Ý»ô}^Üg𤘨-:s­i5˜D2ßWß9%!Ù"l”óóVkØR:½¦Ìf@ŒÉ™"ù¦ ?Â0†¤"(U,ºô}²ò1ÏPXB˜f!6jÌM¾[r™*–R¢R©:׆½”ˆ”ú“ûÌ šä#FÊŽ)6!5T&ª?8¿rÁ#™}E®É0–dêÑ„¨±dØ×è$ÈA¶‹ ñdÐÒ܆tL3˜i“UlÑy~m²Õ‹q¿èZ=ÇDe5HÊè±ÑÔÁÆ"ˆlt3<½[ÈlÊ'™#Õ±kØ-„ÄÉS5\Yjo?©h‚2*‘ZŽÆË«T‡ —tÓ ‘È!ù72¯êˆŸ†Œ¿J^TIk^C9—Ùâf1„0×={‘u ÆMZ­yûÓÚ½,Ä[ÕU=qLc Æ&Ãr">zldÔ„ù²L¨Ò*Óëymõ¦ µ¢F&¤³!%'Ë„ˆ4­hˆy?uÌlLÅ(å'txØ Â%aj)ÔJ˜‘‘eèÉÀ   @ À¿ÿVƒÖ©ò_¾™÷ ëû Ëª³lÑ&"6KV©ªoq%ÄO‘j]ÒàOE]ß:Œak±júŽâ7lTU47‘í÷ `Ù4ªA±vd4X¨I‘¡!3Aþìœpª¢HxSd–¢;ó_¢|™©½Bú5Dœš¤J¹Qj’Òú“nLÒ(H¶fYq»`A‘ |…"¿}d娒}“¨¦DhЬDšDhSÌ®.ä›õJŸÉ%G™n#N0„쬃mLÎi¦â+Ï”ÈR¶ô(òÊ_‚p‹ BV‹•„FÒã\hH´ïáÍm[ôÈUû¢² Y1)&ºmþCìT£YØhÉQ?ÙMˤÄC¡¹ä΂Ì5ʾ‰Ì첯Uº_˜–Õ¤'¤ˆ“&ÆÛLN(“STó0‹¶¡#r´·¼‘aýšš¤i|)žËl]¹ „×9ŠÑšU“) • ʪâcÛ„"yÙÅL"±VÓh´ ÃEjÁÌÙcwä[Dr*3SF.ÆY[è®éugŒ®‹M}r­J©W‰HéH#¤ÞÚChdAˆÈŽÌL!•ƈHD±œF¸¥1=…Z·”öëšd= î&Ј™#N±v]×7a* µjŠ»ÅäÊ2)¡ª šÁsëˆm¡"T”Ï•ÓÆ{-²‰H&D’!{ õ‰#Ìg!¢¢÷‚ý±H¤{‰¹Œõ- ±2±9¡­IP‰æäñ-„4føÙz3?C©+M[¦±9–Äð¼Î›yê~ˆâ !’zLÒÂ¥ëL ÈM;c ”¬Î±Þ$EFhä‘¡< NjzùÈDfÉ4¿ %bFÊã:Å$Ÿ/²·ŠY^Ö#³Riê;EFR&¨ÑÆÂK!´É1J2)i§HFE]öŽGIº¢(·äFÙ&˜@™*õÄ)[˜Â°±exÉýt©ÙU©M¤§²5©¶É&`ÚoÚ4#h¦°Ë±Œ2[TjñHeeŸD*&{VÜ\ÏŽº¥„†/Q4*L"¬Â óD2Xã5Dh!I1M7¤N&_­¹bÃ%Û5T˜—Sƺ½˜×JˆlBš×ìb É ˆÍÑ‹H­•Î'ËÅû¯¬["¹c«/Fѧ!ÌŒHA †f1+AWú+ýԋßÚ"j´Qö}d ‹Ð#¹Ù”½ìñHeoz&Â$IHfbÉ„tÝ8ß!´ýtFtå™u;¨·ý¾Í"B!,3‰"¹1ÌÈÑ`ŒŒ(¥ƒ“§V秊ÌxyH¾¾Û~mlR‘0‚•¢3L•´2ÜS{íN†RtM¼w{˳82&ÿøÉÅ” NLkˆ©Ðÿ2c´M6“Ø×ò7ɇŸÚO5C 3K¥™eúõ,8òظ"de& Ûæd"•]­”G핉TûAßS­µ¥»d¥ÝÑ"BôsüÃcdZ7fOSfÉŒæ×ùSeðó»¶Æ½Z(ÉMºâPÑ D­XÒ$}שga¢K‰XÏXÊÒ³y„†š‘Lž \ܵù_å˜êý¯bŸ~&31(cr*I™¦ÙðœÉJ;ÇX/¤HYtdÒZ‹ˆhß„DQJCO£-¢èº-Iİ‹—´bF3c<ž´¿ëcD‹‰˜"Rÿ:õš0ÅJ¢&Fˆm¢v!&Ò#•,&_Éí*—¡#Ô|û&.HÄæj!<Œ$º‰u̬µB°Ý‘5¯=j¢$<Ñ"93kX«–¶)ój³b ¦í9™XlÖær´`ðø¦ïA""îKg5î×¢ˆ b26ÉuE&,‘D\éÕ«g#¡:!“¡&V ¾•“®•„Û(‚õ.UAL¨™†0ÌÑ•VÅå_ ¬­D˜HB MU§“®F½câÅ%‘ñ¯wWj“5µXŒB4.5&´„ùÂ’LŸä°ÿè³×Ê‹Ð[ægÜÁÎD“Æ„©ªN‰¶Jn÷@gS_ašÙÕbUM Éf/«ý4/g‰DíË’j7M¢$5MÆÆMÿbuì¦R•:æ;ª9 +ÖûDÁ—lA¢tØL¤º]É­åµßšó#¬<­çVº{w"A20ÊÚ9*"@ÄÌM 5ëz4b/„ùú 9úùcäd#'~q.ËÁƒÞÍ-t!2TF\šÒ÷,Ì„éWE­Û¥f¶Õ¦ºÉ±Mk.ªd'Ÿ*îô\êÈlaåe¼’xÞÝÆVE<—j4‹þ*ä,r$9Ú‘†dÉ šfBEªmIÚgTÖ­x‘S©r½^fäò¡*Ä0Œb ‘M©,ЃφÍÿv¨²}tì¨kjB?èQ³FÍy”ž5DΕ´r6F¥•×Ö µjˆŒnœÕ±óBJA™yêV™®$ ÜÙ‘6" º0K£Q+’øïaT©•c©-q™J2£“@ÈEM*^Dø ½iX_£|XµMîåt‰IëÄj«%Ärt1ó5#âc26aÞV’ô¦±?T‡h‚t7ú[ÊÚî‹Ú¦>uúO#Y“¢T=œÕc ›¬Cb3Z"„¿­Ow÷"\]Õu) É+1 ü ˜‰DFÙˆ>Œ¥È"KUªÎèj…ÿjˆË%iÛT}e©M²$V¨ù&dæ‘a)7#vl›!)²K=‘qXŠÄ*_éacFНº&5¦¶ÂÈÑP&2xa#_ÚT²Q¢·BX̼ýÊÙc<Éã\4êD!S=Îѱ§˜ÉÉãQuÏ•‹¥c%j:t!þ±-XJLÚÜBV<Ô‚t؜Ĉo[׬ZcL¹+&Ó£y[¥©î?üV‹ÝIPÆ”$µrÕäHA-a&5íTH'E“vdhªÝŸ—>3”ë ›‹Ù³‘K"#˜×1FùÌÌ!‘¶B)Q{²îÕ1SN¿Ÿg!‹2\Šçónš HHDegÄ‹-ÅCd¤¤†I¢l͵¢ÙîÖ Ÿ‘ßkvT#Ê]œN˜‚$EX£W1ˆˆNOÞ’²3kcÄ4Ë eZõS=r¤IÙ›³¬Ì!!ˆ56ØL®ÌFWIÈBôfÑÿwt+‘j-FFTߺÃÔtc3FaUËÝZD3’¦Å9,5"JبUÿ3u„Tt‹êkFõ3XÌÅ%oüOÚ MÂI‘Ës"òá„öÂbB–ü^¢ò!#¢4X¥lÌD l&è:ZL0„a¡ˆˆëQQò5Gv·^QOÇ©ef‰´ÄbÞ¦ž¬JÈÆf`µ.t*:CVÄLO²=)u1T¶ ‰øJÒÓ^BÞøÒEÄch‘„TʵN¨j& &"6XUþ ¦Ú5˜•úQnq*£¯› Ó3‹Vµ$f3e&ÚA2HFKÔD#EÈŠÒÃ&ܱ_’Ü$NMœãß+á›fd¬Ðß—vCScÉ3o¤Æé$¨ª¶ÇNažœ®K q+%½¹ Ä•¶Wá=!!±>„™/mq`™èšuQN‰¾‹§[ÔE‹Z.Ä ¦#ÙkPbŒ1Œˆ•I_±#14x«ˆ8´Že+FÑ…• •í’Ê‘R™Œe!)N'¿q’j¨‘(†Î(¿ùC“ÇW%×$ãÕùmêVOÁÉ8<-rj44PJƒªå$@ÐÝX±ß*âèè!ujËÅŽK9*ufQŒ¡½1tÁ!jFl5"ö²2ZÍ}¤ôŠï^GÙrÁµÇ¦‹U„äCQ›4ýWÂ3„›ø®Ä¬„.˜ž!72tb¯¦Ä2–_ ‰qbTiŒFº¶›62\kú‘96þ!MMi>ʼüÌ‘´ÖÉýè»á„´Qôï¸FÌ Ä!—K-BD@ˆ–ÚKUU½ÜZ$‰—|þÙÍnÆ»ˆÖÿøÉÅ•NüªüåýBý¼þLþíÿ•>´mc¨çó7¶ˆ?×[F°µš"$ÑÛPÕ¯ÓÅû>óOª¤¿!°Œä-Öé®#š¤ã|©Ä¦DB!>F^B–9cÄxH‘".$°‡ÏÎi) ¤Ê#·H#ôtÈLI²û:6…¸X“hl‚KtF"T$ÙØÊÔšL—4ãÌIëöô”4K<«4R_´DR1Ž}Ô‹Úd…É2\Ñ!0Érµ¤m~“4lE¨ýö! ¹•"fO•²fòHÉõ"\ÞÆÚZŠB C3=C¢m"’'DD!/̲´}D‹'¨œˆ«a?›‘KB£ÈÖÃ"5óÂ&XüÈ1¹–±zÕD}»:ô&$BGÏM)M=Ö2j»“ÍsšÈL–ýIÉ©p³¯Î4ä2²çÄÞ:W¸‘› ˜ÚY*&1cx&ÂvHžLHeÔ·þGghÚ»$&,l‹åË6¡êù‰¸–·K†A"¤»|B+$bˆ•}ß½ŒÇi‘öK–’ãÌ'…:g3§i·ÓíˆG±1;me„9?K“¹0Lk<«¤&©i4j² £i¬BhЭæE$ø¹ªµø«…"f9STjq§¤Œäµ,©<Ù5LÒ±a¯¥T»1*aØØí1˜ª«á“‘b\À•ÍHœ$‹¤!3µˆÙU¤¬Aâ± ¦4JÊ‘Q؈‰sÃÖ)ˆ(Njªý•<¨‚tf¦=ÿÒ:bb©Ø¨¸a*jÄfÉåT‡ÂRDJœ““fÅ4•E–ÔJ–òæ2#éDLÉ[&¹ÔÛß.ŽŠÏ‡¶Eu³â›'|¤Ú Â3T\¢2ëx“V¦â1’;¹†\ÃòLH—ß|^úC+ãLÚc9EÕ©6dŸ”DȆ@”ÒÑ!˜™Îè\Öw]ëi>l·Çé½6ƒøÝ- ‹8„®„L-$í ÛFÛíÑ=_ÑúÒ¤!ò]¶Ù鉎K§µ1¼väÕŒBBÒJ„É4„«‹·^Ò%ìËóv6Â;ï&DÍ$G2+î3¥fÂ32="²VßÙ‰’mÓsmWLĦåzLA«mQ,È&4¥»$*k–Ü’ê!’üV‚ºT{}#C~"&Ì;m3šŽ²Æò2·.šº¼ìß!O3 |• FH™Egl½i&‡}BlÉLddÛ¢LÜ—v¢"žï‹z Ì!ìŠ+}¤VZµ$Yµ5A4dÄM%䨑¶ýÕ3:HùæÄmq ¡¬¢ÅÇ¿5öü!‘Õ[+%&ºµæÙsâ>njg?5ú¹GìÃg7ˆ"›ªšÙ„a!“"3û>NXÁ„Œ^2;¡ÑnÄLZM¾Ð„bëRÅfR¥T¤M*çF)RÁ&7!œ„mhœHR/#761+Ïb³Õk«>ffb®åÒ =\©§¢$P˜„Ђl®Wl•«7G‚OÈþÕkK‰]ûT3Xl|Âa gCU“ÏVÔŠ­nc™HÅ'LSfAk“#Ö·™6ŒýÔË]ªtÊf›Ü^¦B ”[jFȺFi±®iÏfŠõbØXlÄñIé'ªþ)šýD!…ÌD”JÖ¶‰•_ƒ+hŠbGëQ¤c(Ò-GhDxÑ®NÌÞ“ôWÕþNÛúO£ÍtH–'dÈeŠLfkX‰Ëî2ئé-oj²ez*[­®™Sѱ–Xˆ!;|h1O4ÓµÄó"š©‘Ö.e.‚#í265dv“Öè›úf}؈µTÌ¢7â½5ôS°±|"2D̉k{ânm<3/˜$ciêR:TÉH•˜¤‚jë]Ô—N„ê©RÈ’™ ÕS\Æx‚R´Øµ¢c J·–©°A5%âE†ö¼$WÂCa8‘“ŸÕ•˜ŠŒ°©ÕÑf,h‹ÔÏõ4©¿ªÈÃM%‘–fnF:›#ed#7"#æc¡Ñ…›Ïb[—­YÑ5t"Þhµ™³xä#æÆfXÔBá#IþF1?û¬´ÌkÕûI‘3H’O3·)y¡~77ÄÙˆ,š¶ÊŠ™¡ºÉé‘L„f!Q,ÄD.ˆèè´C9Êù!:\ª“"1‘ù—‘Âþm ÌZ&Ú7g‡]Uˆºï:ójBSÄ·³$„2$´›¦\E‚22®l"î…hdÔȪ“ ʨw_I25‰R3$}Þ<‰ˆi6qo1¬Wu#!5K“}≕q˜5Åä%®H'û4‹U1°Âk<ÌËÛÆoÙ;-“²öHJ¬× …‘¬¤4‰y- ¶ˆIIDBäí%ðKSå"]»^¥×£§Jµ.ÑÁ+LOïÍh¸ˆBgLÌÉ2%.ÿbbFTZ‘9Z§ºÅÍÑÐÇ€´€•ZŠŠ@^9·äãíÃ*CPÖÜ&O1x^¢A0“f|_Ò0ˆæ"e¤ Å#¤>–Vƒ¡öl”Ä’3-F‚T•qïašåxý¢Ì.F˜/ÛßJÉêê†3bt©PІ%›B!(‰7úDÒJ­H`ºn§s™L줹ëÌX†H̺Mâ M:3†1ˆ…K8‚+ë´mÚ’ŽË—l˜!¦·¾jПY'&6ËHDM~¤‘4™;Ì]‰ˆ¨©³Ýn‰ªáql_ñ±$óŒÓd“DF"0ŠÁ0ˆŒæ H²9®XåQlN‰É±[ÄDd¾ñŒ¬Ñq§f‘>"¤iÓý¬’²‘\o˜ÄiQ¦”TÞùwYò-^5JijÙ™6ñ9™Ý"¦'âi˜”¨ç¸—ôuùèJbõ+|Ռ٠ߗR“d"‘›ÉÄHÒ·±„皉)BÂv®ÞbÇYâQ 2Ô¦Ó’%• fe¢*2$bC²xhcf**Oj_Z*6Î䮞fárdŒ1¥ôXß¶27[ OQ31ìÙžèc ¶••̨c=½+±Íñž§J¤"ÖÃc0‚‰ÌÞ\Œ$n‘yôK´Ò(ïnÍð¤"(º9‘ñ6nLÂR§a%A©?ÆqfHˆŸ÷‰44Ä)!Mz&Ï_ÅõUšªI?º¤'";%l©Z¢|D*.c)-‰ªó6¦,i¥÷©¦×Õ©_lú¿˜ºâY¿‰¡´ÂI‘¹„x†Ä"©“7uH#aö¸R.n¶2Wjt“´7!¢5ÒL!zCIGö§©ïU¤BZ†RNÕ®ÑÌ‚ËÛ/®EÒâfž<' „R6Æ0ÒFB$õÞ! ªy:–0ºzÐìWx¨#]æ#EΑª¶IK”Ü•>¢]<™#¾A–u¬¬ßg½CTë›itO3B(ÞTÝ£Æ5¬YHÄÞDö²Km„ë7´{®#/+#$HHËN#"0ђaÿIÑ7´ªJÙ‘mù ­o¯û+_òåºÉ™÷ëZvâFð@›©F Bb’ì,†‹[%:pMoîç|b£W—„†"T2â)ˆQ–š“K++;V\Óe»2 EÉÅblbs*'¨ß™Ó–ÊÑ;¢7±L¤ÏÙc lȸd1ù˜M™¶<ªžÂ£ÔZñ¿¸/ÚÚ*øJtQÛí#M“üR!ŒÎŠÜÖ›n—&">DÚyŽˆÛ-y­ä‚cvNé ·Z31|^TŒKB¤ïQuiJÞÄ©ùQr¦D©¸¬s6*%zµH#TüùH&Úö1½ìƒ\.âw.¶µ­Õ‰\±ÉÑìjÊ…K‰‰Diñ• 4E´Ên¤f²ãÆv´ÉjRm”òŒ2#ZÌŒ„$f‰ 6Ф9K䨅¾©~/®'WÑ&ð‰¢"‰Ûa ÍQ)ÓHÏDiшG¹DL5hÃm¸Ñ1MœLˆ'–%š­,êÙ-ÅB —Œ”Gu’u±.äDUF£-¹&‰ ‰DI5+LdSOû÷ÁúɬCLÎ’Õ;‘ÜNEO4ˆÈ#·«5"í ‘qÎFäÉHïÔ™fƒ"Uu H¢F”„TèÅêäìÌ" R‰FÓ‰mèëÖ ÉV'Þ¹É]ï‚.FèÐÞ#$ňA©$Z%J}D¸±’gõo‡æ·7œ"1 c>’Å#®•̨íQ„ʧsªCëNÉÈÔÙsvœ‘Jhצ%[DVþEtè·FDãTÌT1+ ˜š®í7DB2U¨í:#’Â&™Ûä/º $›L÷TÿS!YFOqúr1­&⢒27É žµIá.B¦2/JˆùeäíÒ±rÆT d¯ ƒYwÉé‰/X‘I3 ËrB*¹Êfâ\Œˆâ¿BRK°Š®ðF™_úo¹1¦C­ÕRÛF–õ# Ê•Œ5)PlF\YZöèÄ#ÿ­N¬‘Ðû4¡Y rBCR°¦]hƒM¥pŸi†ÍÝ4¼éP™³B¼¦ý24v¨ýßR lѾ Ì54ŒºZ&ÍãoðF$UEðN“]o$iyTd»ï÷TŒ–YQù+„-JÆ*øh£5ˆ¨]_5nš]}ÉSM«Ä—Qn%dKö)ï™6rD(× hÊ+—}&ÃA¹‘v°°½A½)¨’£)!Z­NLÂA6…¦ýn¥z®¼ª†±u!™î”‘¼ÂHdù6“ÍMYtÇ—ÏÜhB ¨–ÓÚmŠÊ™T‚¦È†g;“1¢½#^$LÌÖsƨ‚3zÊM˜Ú¾ØLž‘«ÆÞ'7÷¾}‹YQßV^½BkZ:hAÉ[äâc,CU$²ÌÔì^­6*J‘ö¹âù±¹½+‘¸Â4eŒDJÒgÂVˆiT–jž4 ¾¤|éÈ<òöÛ’Mÿ5eø±&#b%nJò4&¹ÈÒ“UbR³Bh‘1uY™´;*²Q}ÉÛä„lCbÓ3<à ˜"øµ½bÃ*ÒÅŽbûÒ)úœ™´tfÙúH“æ ÈÕI\…a”ÉÒ©‰-‚!9•žšMm\ƒZÍö•µ#åŒr)"lÅÖc'#:üð nʹ±1ÈK lLVt)=ûˆË&fJéD:ac3veöY‘¡.Ј=›kÒ^´Š¹Rø¶ý"Ööq± dŒÿ´I1 %2)™Žaò ©Ú ¥S-*+5¶b²/'"R!Ñ#b§V5TÈiž­¦n·fNm„MI š£(š»H±#Fõ`«Åù*FÄóN„ašñ'EA) è&4Ð艷!ÅsïÔµ l”œŒ”%2[’T¦¨$2g$<0ƒNßåB¦MH1žz®i>•’ª.qS’çk™k|vXd]œ#~Ù7©‰™˜Kš¦cB\­ öÒ6œË‹ˆJ¢Ø!NlŽ}l¥ð 6æ‘m1¶O# “¡ª›á’aŒwâæÛ[ÂhTÆ{–Ü&¬Eei†òâ2í b˜A5„oÊ;ꬨÁzûÓTߢTsám6akcöÎ$­ÒtC©6¤mbz1“S#œFL6RÇÓA I ¢­©céP¬#‘Òmº¡ ȉ†‘‘¼Õ¦Þ{Ô»2Ì>_ÙXô•H†2É’CB98Øeõ©æriÉÓÉ z/l¨¨µ ! Vr¹-Ћf(ÎÙ _W!„©ÐŽä#Ö8Œ†XÜב$R/õÉ’&X3š<2ßëE´hJ.+ú!²m„F­¡*ÅdÄöV>ס{ß ÑïJçd?Î4©d– ­mF¦ ‹q›£ê·mÞ;E*Οå¯T”ˆ©¤nD¶GÍ&Cxž‘¨D‘wÈAŒÂX‹`†Ft¨±1%5o´…°ï\«™Ÿ3!”…*Ñ6¦1 ‚dB&–RØ|ú³½R#÷.±Íû—©‡B ƶ·a†ÐÖ#ä$þì°¢¥Õ& æ1UÆ# ?FÈ¢{ÆŸi†$Ž« »¦·dɆ'‡9 ¤ÄÃ4fsAIt”•é™.— ¼ü‰©S{A UPjuºUÝfÆ !¦×“7%b^Ï>l¨¾Ëõ.x†¼¨KmTÉœÁé] ™2!AÍq¹£Tû,h<[ ›*—V|œ]é¶5MâdOx¡Ƶ`†–!%E~b³„ov%! %ˆ´ˆ2*j'oWú»/SÄiѤÕ™¯ÆfŒl&M™B2KôŠùŸw랇WI©ÙìD¡63'ù„ ȇˆ@ˆœž.˜ÌÀtðEh=º’&q‰è_oϲ –R9 dXMef ™lb܉ñ$31„È)QIã«Û£9u„ž_ÕN{ÿWcF"IWª™2 GEÍVe6#vñë'µ¾%» úsfMøNõCÚb]ç,Ãí¡¡¶io-U".„Äò4Gö²^È4Fv÷%+túZÆÖ8DbÉá.ÁËãm*i Â0™E92»¹ÄõNÛ|­š”ó†™E)Ì„4âOMƦNHDâõü–% %%½ë6TèdBRqÞdzT±Œ­¦D>?ö,y PbhWY‘„‘.>Äb$*fÑT‹¡VTÛÆMÖÈì^FDÐLÄ5ŒU÷ ©PL‹´Ú-TWŠìäj!'ln¿÷\XF!ˆ²Aqu1¼”Õ ½Ý lнL!"66ÓfD×S©ÿÙZ* ¢Bøe$5e6Äb:hÐÌÜ\*ÕìV‹ÝÐf¯ Ùq‡Ê•H† Úˆ­ÍÆ7#>5žÒ®ðl·ìe·JÈBdnTÈÉ"xÙófdßüâî™OG!!ˆeF&$V%§mŒÈÙíÿ®+”ÕzI{§¦D"eiufíŒD>%%z¢1¯°RgQo¯¦FlSb3-MÑÕ9†×öQˆHHÄ#å^N•a$ìu"#"+ÈîTø6D%ןUÊA4%B.ÛCQ5L³«”Í“' Èßä’'ÈE¬ù‰4Ã’Knÿ#iŸ’3ýÕgJ§°L#,±¡: «&B0iÉ}¾ÕaašG“Yµ#ËüJ¦FWH@‚U.™×.hSD1H› ·ºM¹f$ ™¼T‘¤ƒ#7V©Ù Íþv.㮾¡ˆ’F;ùF£$bR>ÔÜDÂ)ùT˜­qY#xˆ¨Vúe2S1BnNŒq!+kFW··ïyj¿Bi§ ÊE´žé¦¦UÊ„ Ätª¬#¤Œg×LfÚÞ³”É ‰¨Ãwõ:~š'fè—DFÞ‹ NЈBôoæŒ!§­ØL!©¢óD¬ù¤Ò¢¤­ Y"D¬„Š*Ó1&¶„"íš®r!’å©rdB±®Å¬­_çd„ËV0„JÛ]«X¦äÝ'DǺ­õ¦$!•#3-Ëqñ¸É“!c¬™œ¨[?éQ ¦T¶¨ÄÒLÌŽCRiû"¨í‹ek É®å»ÓhƒªbCTõ”HÆ&‰§~B­h±X‚~u¸Øž¤"*,",öˆ¨E!ûëªÅÈG|œN®HÍ“¡Iê*$ I«7®Ñ1ª$ònb÷)®Lˆ¥ŠIoˆääH†Î£¡|ÈHÄËÑÊHÕº šÍIy6¶7%ËÞˆ‚m[GçJDÑ3)˜¿qqŠD¾ ›Õ3gÉâM|)´hˆ\&KȨ%om/6ШIc:!3w³6Y 2K1QMXIHyZ_¢##+Ú°¶gŽìÑM™’*Ô ª2m jrFRÉjµ’t""ÔˆK¶ÈFK„rt„0Œ/GŸ¢zÊB*ž¡ é9ö¹ô#Y—È]šr!)<˜©2¨‚ *a#¬ÆäýÄb“lxGs´K+îŸXùÔ³4‚j²¦äÊhÈlnÆ$™ž\¹Q ©±Ì]SÛX¦ÍÒjž‹ìK²¶,Éš+Hj¶µókZ"Ä)§,ìıST§ˆETì$!?%3×ma‘&4i!\ËEvF-º ¹ÏL ¼¨†H…nŒÏ̓ư¹Äk¹ WñŠÞ²Ä)ÄÆ"&þªIÚ1–'ŒtÆcHÿê²)¤hÍêÒ~•ÐÆfUÈ¢)5TbO%54Vr¹‘5”Aª÷‰ibÚ1‰Ñ6Xè÷¶&»¥gÃý”ˆDO¯'%©º!HØb‚¹f%îÈA™rª£4þ˜Œ‘;„E»4ý3gFk˜~°Ùegš‘*¢ Ö»ŒäÊB‰r›f*¶]³!˜ÙYÝ“XÉš3}V¤æùk 3¼˜ËqbŠß_43ºrúÑmFÔÐeE0ÄŸ£¡a‚vfD³¥¤[¡¹Z ÑØÆßLœ¤ñ5 ÂW9‘ŽÝ&%¤ŒŠD;·T‚*›èÞØ¤b£"ÒmмÆF´„:TÒqŒ÷¡«"kwF!±;)®r#Ñ3Ø–Ÿ¶Èíbü•ËŒû¬·æ«ÌÏÔ6SD™JÄÛ¦ærVOȃ[‚^Œ±üÍÐÕŒúËOcÅf×G&…8—Äš²AâúÌÆZOFוÆEÚ¦'º'h™iœÓL‚9Äî3öôlBnÓ·:'ÉÀÿøÉÅ—NAÿùÿÎÿ¶ÿ¢ÿˆÿaÿ(´ÅO’xÎô_§ßÔMbDŸW'Oä¦e*.Z—ÉUĨ°JçÜÐŽ›^ñ#|ƒ2Ì•dñ!#ö8–Z•íùQŬ»Ò6Èy5 IãâX]LC9~TL™34‹°c%TÙ+aB2^Ñ^•É<]ãÝéýF&Yò €ŠÈN•†æeMžš›·¾‘J…, ­W7|K"E0f0Ù‘˜D žŒˆdËI”n[ݵdf{'¦*“rüNHæõ¿M²ÈNC5¯î±¡±¯œL‹ Ã1·t& HòFÖäÕ,sæu¯/‡TûÄæsT6ÐÜGÍñˆ7ˆèÃq%2BüY2HïœN•ÇIH¨Èa…½(„‘˜•¨bÊbL¶ñ=f“+rÂîÑ ×$„ºK3¹.%m½%VŠŽ•Ò«u%bmU Ì Ÿy”HÃ! ­1ªèŠÖøÇôð¶ö 2[}T„¤n–„ãfªF•?)›&^_?gËÑ›î2l!ŽdŒ˜6Æi0ŒD˜ŠŠÉfÛºÞr+)2䬉m¨È½ˆ¨—bA âØé²)gRm2Þ¤«{&li,B ˜ÑÛ ûve'J"7ØŠEŠTU˜y¦º,T³L%‘%l”JB[›ÙºäR"ënùäÑGŠQ û4A<¤"B)­Æ †–£±2}ŸÈäþ¢½žªãNR?ÆéE´‘¢žR>± PJKFTŠK+!L4b#˜D`”‡ØDdnÄÏWÝù#O:玅ÓÙv×ãÖÉc!&lTÏz D¦k"•TžåïÕêâ"¦Y ’!3]&2Lˆ#-'b$nþ•Ó»%³»©®Ù½ITHHŽN^.é®b@‹ ½i;¼U݆M̾¬Yˆ4'#q#ecFŒùPnéæVNþæ.ÉÈþy­„Ä“KC3º§jJ‘;dr-21ªz§_¥ ådÊHJJ•¥­Q4>ÃDí§îµ}EÞ6¾®-T[1«æý&Z“!54l(‘R¶>oZÅûV¡Usc‘—èD*ˆn™†'ꌕ;C—´&'—š!‘³$B’Þd$å"vù/Ô³•’‹Â÷-WHKܤL 5­ÙBA±‚´cÉ š­.C!㢚BÔ¹¢è¶ÂØ$%Λ"åÖ4¨+3&Q.tY^4fs,* D!.ÂDk¤ˆÄõ ˜ºöŒ¨§¬_OØŸ¹Ñ#6Q•«+q˜Óed*©l©c9ž*r…G“ˆ7|ÎÔ@É>%°‘§LÜÄ b4¥å5%Xµª2怶ÐÍOT(ŠK-Ëp™¢êDß­D‘ºêN\jõɺ„Ĺân£ †Â ÐÛ±‰D™)2V;•'nB*ýe|•ZÔæÜ“)XJ“kŸbs8„ˆ”õÍ×¶ÄSªÆl FfM2Å”„Hk„2’øÁUD4*µ¿©C«'ñ:YiQð‡B`‰ªÔ4ý ›†ÍÙQã JÈ‚WáoÊbBD×siË2'ÙŒE­½WDˆñêLfRä%åh¸Ž™ó1$œÃFbBhG?3LfÊFdeL…WãëTPVèM_NJÞ8ŒM8Á¢2^%t˜ˆ¬É²¹ãÔÓ¿ÑÆ™ùHnšT¤#—$fBA) èYbS;˜ÂçP |]Í 2Z“2!.l×DŸñPÚJ©±=EµtºËˆÓ²hˆeѪæ2~µTBUådßX§Ç+ä…FƉô\AÐÈ™ãÓ‚&IäYZòÆiµI-%Öyn£U`…2èaâšÕ›Ñ5ǽDUŠXèGÕ}«¨‰ÄÛL$¸È!›6$*‰h–å#-iÖü©‹¢"ô V®lh/˜RcqÉa¿N›öÝIœ‹Y+¦”ãHbõ†¡%Äcv!•F"YÕ³L˜ÿ"¬3­q®T{72]U#‘Iº°D"¢•kWÀ„~ÂèôÌt) Ø@ÙIò_ÈH¤ŒBdI/ˆØÄÏÔH¤å¦MâÁR™™Iª:F„èµ$×Bvò)Qâ«Ã,v¤¨¸ÈM*tŒc ˆŒÍaöä¢ÕPšÝ­ØòϤ¨N‡æö¸ÙøF‘µÄ˜Ý%S)>R$.)•®Ižž`L¤"î2i“ ¤¨2"wb2$YæËÍP«‹¨ŠË*9£E|D“2q±3¡µ‰Ì› LY®mr¥'¦ù&C“êû-‘¯¬BRö¸˜„»™-ñ¢f¢XB4°¸ú°‹âHí—™‘…•+L÷#9>ë;Ou¨Ñ #3–±i±µ .ÝC ó¦uyš,wÌ]”º3.ü’صÄK t7Ra¹‰‘ÖíQÙYåó É5“BÔ68ŒE2Ĺ´ÖT&%[ ÎwTC}ÑLFU.åŽÁ±£d#j!݆F±ó“j×"Ôʬ¬÷iÈD±¡™z—lÉ2š¢7lÉv¶Cû%\ÄÙ¤èûe¨È*F¬…fèßSìšjC#þ‰;T-ØE" ”×™Y²ÙÉŠÓ™ªT)…ŒlŠ#oV!â'à—ÿ^;2Bÿgÿ—Z‚¡I¤kx÷îCGïC&¨IÖä˜÷¥jˆð„­–¥Æ*î×\ÚUoш6µŠ—Ý›QˆÓUb©1Òt“Ò¥¸s““¬ì5Éêfkd6›éH2xb!Êi›l0„Þ º{¢]þ$™}󸈛䋮=/Ñ9( •Š’¢ v cd!!qR)7EPÍ¥K–ÑÓš6×¢HU"¢¯‚aÄÉö®SZ’2 Ûû¼&ÕHËëþe‰Í™‰v_‹ É„ ©IXUÊ‚ B6†ÉläÆHIÌøëiYÈHÖTaPµUÏÑD¦Hß·zÚ³ó0BT¤!ˆ’z#R;š™´V”lT$̵jçÅš2ZÎÅSí_ ³¡.ç#™Q«"­znfD#o£"YÔ•è¬lN¶ Ú J¤E¿É«Ä$EŠgÓlD¬—4Rdø«z|2ýnõ*Â$^·ÖV›qaW3Z÷¶&õ„ÄNцäó“#¡$ Ó%ÒïìÓI•wÖ3ä-×ßp²}á*sÁ4D{Ýc6ÈÒšl„äV‰îMDNäß ÕbœÇ¿l†3Ò×5dû¤Ði[µU,ÍnznDkö^`³ Š$HŽþIˆ¨D6|߷õfTFŠjù±;iôü¯¬Óõ<ö¢ìïFEopÍ% lÕÉ)ЈOÛ¡§f{ë9¥{ëŽÑ‹‚ÿHž¾q2£,Òˋƕ±0‰v4©²ú$…J$!ªo'Vt^}£´Æ« Í&¼Ck:.ÍÉéfb¤"4‰i z¼Â¥¤4%è„ù«ÈHWxÄÝ!´ˆ”# B½Ò3 Â¼%™['/kk¦ÇOºS–¹Qé ß6$cP¦°ÇÑ &ÄérúfÖëº1~"d*&C‹6êJÚ™…A‹,Hê–bŠŽa+-Tbˆ°‚ ݰE¤©D~—“çM±1´*:D+¾ÑÝ ˆ’Ör}RÌ~Û0”››‰LÚr+Ú¶ IëRˆu|äû©Ÿo¿•n…í;ˆdñ n†Ô‚4’ȈYšõèØDU×%§G¦lýŒFúüŸ3,Jiò™µ°ÃÒõš¦è˜ˆ˜‹ŒF.x±vTíù†–Ô¬¥«Õ£MìJ^,åtäÈ‚c#mFšŠ‘$E"#û'ýM㊊˜Æ—Á³,¥†©˜š0H'YrÙl簋᨟U[Se˜‡„ؘD⹉Jèíé³#0Z:ßÝ‚RhMâ12¶ñMÕu•5x]9å&’^Ù#‰1—ÔV¦–Ìh—3Jâeº:›Gæð%Ç+“¦U¹k«x—HCzK{b±ž!‚ZöïzáºFEGK cFÚ;Ú™DŒ­g¼äTH’îO¸•!ŒµFªºcb""%ò•ÇiIœæÄåVm{õBvðD)¥aD!’ÔD‹r“62Öj;…Ò­ÓiÊÙ³'Œ¤4'0†#;ZFHkÒyf+ß“b›£Š'µÛI`ÐÝ^訑=èZbb&Lk«Ý`Ä6­Y[Ü!ˆLiÛ³#êÅÉÄWöõ.¹¸üH&d­¦W7b+&Ô¬˜dH&’ö‹ñFf7ª÷õå%7e˜+’UU Q‘‰='†\!š$FsJ%Ùq&U¤V8È%Š[—ܬõL¥D"5zT´ÈDÓ4ì&‹WøŒr[©sI5q1>üdLÚ’0Oˆ¤®C»2µ2z”Ï^¨‹ˆ$jô´m!ŒÌ„±§~p†2"$w[¹EXÛ’r«GÖ¢„eÍ !%2sNÛ£sO¼’-.ÔÙ!SUˆ­!'|Äš#jf¶]žlEd!R§:/TÅä}PD>È33u± ¡‘-gmà†å×¾j%fB4‘"ÞÑ9’âMã>¦Ø¶bš%Jm¿;J“¿ÆÊcž%&†oól‰²JˆÉ’©!cšÄ6ŠG†RÛU¢þUÒ5Ô¦×f3#áoF”œD215–N^Hn“"ß&Úé3$¨A ó"22¤)¦cŠ40jz´Õ»÷ÞJ¨gg¦Ä,-$¦"6#5WˆHSa I>Wâ€_TÿøÉŘ-NÿþÐþµþ´þÃþ×þãþá´ÕI“PÅsoÌ÷݆O¾ •T5ûçf4µ¶‹vŒÙzta\ÐÎœŠ¸­“ÄnÄÑ’8ˆb[, ©º%Ì%QÔlJð¤j\½)V—µx±M¬ˆÁ½,`Ì-ÃZŠ&$ˆª‰1Qc]áY$k.Ý‚ Õ«Ò´ÑÌÌí'±5Z! &²zCˆÔ”¿Éd÷sʶmãÞ&[ê7‘QÝ!._-AÌ#Õ‘¥Œld¯± caŸ¾™Ò-G´†³Ñ ¥w—#z¯1Y^MÓjm[¹¼zF2 ̱´ŽÌd¾“¬˜E@Ò¶ÑMãY9»«HF–­Dv‚3<ñ Œ&öêêó"LGU꺚D4Î¥Y¨Ë³m$Q7©LÆ«-a™±­6¥èL#ht©êf –+ð½")ýb1aiˆñéQé£"3{¬ED¨iµ¹n*c¡‘'Cj™ÑPÙ®RB˜MŠXKJ‰[v‰Ygæ1R3\Q©zVe"RAК1lÕ˜¶tÔ®5Ž÷©ad5Ni8‰Ù!M>WкxK¢hY<ü’wÆ©éìZ1².D%!žV Ÿ†ÅŒ·ªMX‘P­Ñ¡ªóHÔ¯\Á•qáT†Ú6c¢&ÚΆJNÆÌWG†U&y|äý½¦?n°Y ñÈÖÿ+©‘7BL ¡Ãy„ŒK•BCN–"¹Ì'Êñ"²ºÝ‘29 +Y×risÒÃÌ5mmìþD[ Ëñ¬eÉD É*³  ‚?푬sÆš4lwvÐÑ›':h©‰!IbvÞ%qá®ôFkUÚMlLí1ã[FŒ&†HÈ›ð†¤Š»T¸&Æ·¬’bæHò†\9ìBga¥Ö&©šËºªµh"ìݶ:©r1³z‹Ê–™6¿·é©d$2çXXJCË”LÑ ¹Ù¤üo2ó+å³õödRhõé—dŸ4v–ALb3B†!Pˆ0˜Ò°„³f÷š¡*²·'°^µ!’ÇW7•ë%óŠT’ÇD%´D ¹9ý‘Œ2­S7„û"ÙL¾Ø!&t‰ÓÊ“{W²Ðˆ„¿õß ‚_•) ’lž’2cÁ–$¨’u|—?+“äsˆí˕̺¤©%UQDd ™3ŠNˆB3»R_ê[Ök2¿éV„íu…NŒ…(—¤‘¡uØ$ Š&v_²ŒDbêí2ú95¬DVz…¡,d•¾¶uŽ’ ˜ŒÓ¬6~˜FÑ,#dbGR1ò+l•e·hûd÷—;z®Ðˆ´‚SiFfÐHiâÄ+!e²6òwaDÓ9Õ*!ºnF#æ„1KB\a S©²‰Y;+Ÿä¤ð¥Ä{’¤º¥¦+ßÄI±1‚áXËñOÓj' ˆf=DE. ˜oˆÐÖ±*žl«ã:?t\¿• ”‘[äñøÌÂ%m„ÂJ˜btLÌlk$äYVÌþ¿É·$¢ú”O(ÑJâAµNmö!'±š ˆÊëŸÊÙ¤•393™Rñ“¤¼AêŠkÔ—´yR‘pÆHDf%ÛQù 3IÑ>h­nJ¼ú*.žEªZwV™9?Í4››¢*0fb"a¬a:%M÷†=ãš±‘;ŸxVû%$%•*+N¼øÍI–Ýif6ñ¡rrÛ:3(†jªVt‰Ò¯$B.蜫vGU¯ÍXF4\“š“ÆV¦la7ßOB'½)2gkIÉ~­I˜ÈFÆh¤©dšu—{üÿªýd±ñ—UÅk>Q1²»Iy©­ öE¬Âsx½®Ê„eO¡›> p†Ì…¼\‘ÄÿBĹš£Ö)³«mL'M™Ò™"ˆ23ôvzjfövÂä˜ÿŠü”Õñ=a,jlhìÄc'ɰDE°l"¦øO5Y<‰;í`•K“¡'Zƒ7NÄ„ZD¯„—•†éµ&U]š%toµˆÉiuÄ(ÓVÍÜ»/:R}EµWÝ”l1EnÙ‘ŒÄ¨lÚò‰Ù0ÌŸ+£ÏïG|TÁl9“ôæ¬ÈІvC±T¨Ö™ž£7È.„?Ìf~VìY6öñ¦¨Ñš"Ò’"#ô†R‘#:¯DÊB3 ×# ‘4o¤›tn†ÌèUŒ,$ˆ{;tQ”HDtZ˜›"“˜×ôÔ{¹&ß ñû*Õh•…ñô•”„ëåad±´3¬3i•!˜ÿNÊÓT±ÄkbUb¢Ó[¦SÁ1ÁUÔ‚†\ØžODhål„.ò§r"!êxkîõv¤}̉9ߥÁ"Yt]™³õÆA©M•¥ “hH“Í Š“HX\Og‘×ÃÔƒK³3#CdÓLb i>²O6DÿWå³aRµBÛ‘®1¯Í“ÜŒAbFÓ£Å!PË3vÖKÄ¢AdN‰*=gÂBÉ•——ãc®v§UQ+*"[NÍf&¢:JÄÄS%¬lèÚ/‚oÓÎ…ò–3ØZÐ#)Ç„ÄZ¤ší'ÐHLœÈ쑳mÄoÌÄOh“e6JºÄ¹i¼–™]dTZd%"Xè=hfFME•bc#é|²%ëï#Z–“¦„½¦»4RhÝgc#>b‘ÌKHä†|Û!tn̺§¶KþÒ~Y}ñ}©}‹}šÚj¢Š Y:æÃ_ïC.úK8ˆŠÆ"²ƒié1D°«dAn’_õm¬•.•»)7m6Á³äãÞF#­%NÒúÖóED„ÞnbíŒÛŠ$Ù'Fij ÊŽg"èñ»r5|}«’Èæ³©½ˆ„5&…šŒ‰°Â*‹¢ØíÍ'Ê-„—¾[’¦6h|‚TµXËdRElá)>öÉÜ›1ò¤›‘ ¹³7‰S 1MÒŒy’ÒEdXtAë¢7©!"1ˆÏš¡´emå¢5T}9=å4©¨„ù“ìÐ%ÜÅëÝŒö‘‚Ái'….nöÄtD ¥l²lJFÉÊ^Í2#óuÊ‹Q±¬"ϽeF’³•ª¢f¤BRèûxÑ=¦ÙZCä„ÏPžßÚÙŒL¬•;ˆ”Æ.Å!ßA™K){’é„ñ&ºSNš‘wm<Á&CÏ®™Ãf¦¦=%éÕ1RâòíI†inÇdbí„„LŽ"l¹»F=nšÔ‚{íWNÂk‚è¤tæ"m~å-ì!.Þe‹±•óÕŽ­ƒA¦L¤v5ˆ'A‰I’$"ºDú‘ª(¨…¾7T"ÔéUM…!ˆÊZ•Ì&"”ŠjžþŸêHBQbëx•A>Q!“w6¡¶7$3³ërúšÕF;ÒDO‹$¿¤w…r‘׈ŠÙtød‹+M>›Æ6^µMÉÛGvB2²&¯Ë”GH•*h’Ùà—YÛÑ"3\¬›‘®EZĦ‘!ª+VfÆò šÍ’,¢x¬ñÜSR1LÂt{ªµJ#®ŒÈÈ­s9“–ˆÑ·wúÌ~!Œbž¼v„„;;Dt»"ˆD˜”ÝòJ‘5:9Ûùe# º9Kcæ eR"-2¥Üg»¡©ÄE»"×ÈCX]kòDM›¶¹)t¤X…4+_-­UK—18˦ÖÙцrVN&B"dtI ¯ÛbŒžž]Íi™Z÷« ½b:%ħ…1ˆ²NDÓõ&³Zuõ†™q+çÈ„6K˜L”•+56’x!TЄj­Ìdä*‘º"~ŽÒjžv'’³Un"ç¦ÊŒYŸÎB5fB?:b%·1ÈC3Xz£j©³hEa'yÕ¬VóMÑ×'hµXƒ«q eÂi%K² hš.ñ{¤ØnµңΩr‘dÙ5Fi&°ŽßÄf¾Äö®.k¢J¤MvÞ5ØË-+%5­jé™Ji’l¹\äB7² ‡Ã†Ø›ÎèÓ\k*Lס”\^dÒ:¡fë;Y±`Ý%°†Eèˆ5Ïä%šÎȈѤ”‘¦WԒ܆#µºTéµM•)%w¾8æÌ ˆñЄ-UC¢™™˜½šlvDH³JÕž~š¬­>™S؉žÖ7v1*v+\F±†6Xt-C© Ók„XïÜÄ⢠ÇEf¶ñ­hÃb'¡$ªåŠÊlF¥Š¥‡ˆ’r DA’]µC HIÑ’éÉȾsrT±­Xä䯳³"XA)WìöâiàѨWCÔt|b’Rž3µ¨lM[aœ“"©:Å‘ VDß¼º!5ëD¥ñÉ4¼FDrYªQ®Ðµ8ГÞIâHfvYô|NSK“ŒnB¢¤nV@š'!h•+Ž“ÆAÝ~¸¹Õ’’)•Ÿ¾#Œ]gIS³%¨¹a ¶‡g†\ƒ3ÇÆlÓ3§xˆ!IQ$DJ®™{+5Øë«¹D¥V­’šæAÌŠÎŒ¨ÐD#2(…Þ)#fl”¸ýÄR:’¶æ”‘eeɆB,G„e‰sÿò•LÓynÊçÔŠ”‘™ÛM9~­¡$%ˆ¦-#¦ÈˆU^Nׄää6˘3#;bl´#ÚoÍ¿7<º\¤»ªöb«Ñ ¨„lˆaŒ•l¸šÍf2Ú4UË=mãH¢¢´]°ƒ%o/ÊÙ%Œ%c$eYJËÍI‹ Ø‹J–ÊÕ Å÷Á‡ç^ùøi’DÑBÔdÐÿ&Áì&É6Äuá † ØÄžd ¹ç&!ˆ¨õ5ËÒ"Mäa›,]ÙãtBo%T4£Lª-n®ì­”±[ê*HE0ÍѶˆ‰’kÉk­ˆ”OVý¹ìHC$nM‘ûö…dˆ™TJ'RDú!fäù:µþBf—F܈%L¦• B7&”ÅO˜oè²è„äë=±(‘÷‰ŠF2£Ü¹vøüÕÔ#¼tK†{ì²EF‘¢å0Ø7"3&BqÒÁ$ÄÕJÛ%hI·—ë&œ™2dtUYKÄv–´¹v!2Õ‹*&ßq‚#rá©*푪Da ÷¶ò{ÂEIu#Üy¶HeÝÄžê©Ä!áI;̦VD—˜Ø$øÕHd[EA|£v„±¡;3!ŒÏúQ¾t™#t[Ô™(³ÊÅѺýú¶fbY´z÷’¥i˜mp¢Òö&ÆÍ„XzŒ†¾æ¤ìІ$óµÙžF+¯sxºÕ·T]’¼#¶í¶ ‰¡²á ¿7dœœn‹¶YVæ/]˜¤Tâ''9¥i‚jÍágÔûÜe'ô¨Žˆe7.¦ƒTy,ñI„0ÖcúµHJ¢ ³š¡ugEN’øM¢,Ì£m '&’Á©m²ÅIÌ,REr·L•Õ‘Q×.øÙ˜Œ'„”‡®! SB#5ˆŒ“kPºº-k6G^j%±²ë’%íÛrúEx°2§­ÙNE$ ˜HÂRc9­DúP˜ÍYgU¨ÚÛ!HÒ¡$Ž-¨Kal¹%¼…"„c|VfEY5Ó:.hF‘¤ˆró#‹¬Þ1sI<ùH¨ÌDUKzse¤Â26b£94¬÷v"jò8›ô#}Ë¡ Œ±fIufDåÉ ÒÄ…¸Þš¥øE"W¼‘·Û_ìHÚüL“¦Írô[Ù—çÆÒƤ¢]Ò0‰qKÆÌ°úV:3r•%—äÑw–N¥!M•Œ•1A—ÂÍ:u_å•¢.û>Ï-̶UˆC³fIVFÂîèÛÑ× vÝtæh%HÉa²ãS_I6g+4¨²$”‘c ð’ $‰f+ZFa #kätdÔ•7 ÖÎXd-eimrBZV<,””„–X›µÄca8€šÉÔÓ$Í%É’«Æ³äÆòÏH©È|×C«’’&;VÞ[)Eui†Ü˜E‡³„èÄA1¥¼ÍLc2#9í/GîÁ$“¬^³Š™E&̘]Ɇ—’J‘ºHæ}àŠftꨭU-KbÖä †%d&^CF‰#*%½ /eüͬgÒ4‚ä¡"„dË*oQ$o#ªVЋId°$2DZ„3b¢¢áQˆéSàÖV[U¢‰¢uÚµµ0ÜÙˆc-ij!M :ÕAŠ’}öm«˜©ÎÆjGYVaˆ"³‘ÐjÚK 4!ˆ– y+a›êÓ×Wã=ðƆ[ò*Ô1%ã"®ƒEc’ay„…RÓLÌŸ‘¶¶5ƸŸù•¸¬Ã ^B‘ýîH6N¯SP²“¦ã#¢ÍFÈÉ3"bE3ÇNÄS*ª±¤h¬áÖS=#AçjA5$¨N!2}ÓⵄÝVV"ž»T©ßæÿèßí¿ö€€À%3öƒÛ©q¾‰÷`öû0ËÔÊÕ4Û2äæ$|Èå”Bb\LÄÑ<îÕ/!+2FfÅŠ‡h…¢¸ÊehKNŸº¢N‚ °Dˆ^ÒÕ’PÂa!n«4A–ºöU”NÑ’“¿-·S5a¨ó²ÉÌo¤Zš”¦j1™#ô½‹t\ ÂRnÞRB³Âjki K"âä–›ÝPŽèÊÌDH œ¿?š5OÞl–Ó¹fC¶BúI6>F|ñvhŒdEcq»7ߤq¡ÌMMilÆý5{,Gi¶u†ý{å1ÓÄ[Í"aâhF®­Æf""4ïé´¤6Bs¿_Ë$Z„¦dî>MXµ3¿FV^߉ªbJ›E4©7bL¿3"t!f,V¦ä%N±ÐšÉZq1†B9§ms¶D16ŒÏ)L„ýË ©ò}â¢c®éºþé6#šMÄmæÍá“^Ûc'%µ?jƦ&¹*ˆðµ"þ˜$bë‹ÎÎZIž“ß×Q6Ã`Ì3w]êC2%‘®®f„0§¯ô:òÆ…·ÛEy¡ Ì˜#U3ÓÒÔ¼˜˜Ç­š|“Ò¦µšËË¢F÷9¬Ól‘¢ö#Ö’vk¥º›i–R“)<“ªÄî±f,ÃTÔ¹!³Û.Â(˜mF©ÛĆž«+dîdb®ì2¬–Ùæ¤*Õêð뺙ºÑD}‘›}2\lÂ`A'îä°ñd54¦X’ªšâŸÅ6TÈ%÷+&ã‰nõbº.qÕ¼F“¾mÙYFf7ŽV޵9 ›A ã)T•\ÉkVîKodZu­Ï÷”ÈB½šunÈ%.¢f#g".b²* †ÐcRç¬îr£Ø„"b¿u«Œ3Äö {íüÈb!U®´MÊÄ&3!­NæqŒ˜ÚGF·š¡+°¦Ì{<Ì&FoüŽ{U77 †dЋVF“0ˆŽ« , F–é]³ Jþ©*³vF½oNU#fÍ™“qØ™ÐjŒÃÝ”³Ê[•Tˆ•A§?w"§ÊÅEEbLÜš Œ³’BÓ¨”LýbzA.L$b:1/HVv°¿¦DĤ^%¹zœWÿ•1Ì"dnIUaÄ2‚<xÑ„5ã%Xÿ–¼I3‰Ër­3¥#!9öÈÊ"`„ï-ÍEÆahʹê¢ö±‘I_‹2„¬ÇVU*ÂhhÛZ=%ÌfâOjCÔæ¢¥$cÆÝ%êþtUrÆ6ë S×»½™W2`ʈ†afÌ3 –ɺb GHB±<*Aìó!\èíyãMIáâ±õ¨Øm•«)t"60BÍŠªÞ¥K¤JÞ™w÷Ä6RxÕ$ÔÊnÏÙy‚dâ'ÇqdEÈ­É3y¯{›J޿܈’AúL!ý9^#¢ `Œi•õìlA‰Í d‹W-­¦õc¾J«Š¥3Ôx:›!%ݶI5¯‘±’e3Do#î÷3÷˜Ì¯:D‡ì˜i2BWÇïñíQ#æåˆØ–™–3clFIÑ.eŠHb•š5…dªÄÕ =UÛbJC2OŽä†F5ɹҥDDè&rÌVV²‘:ÍWîÚY ‡“p‚B ðŠÊé 4E†é%~©¶)étÎÇ—£îÑ9#ë·°äQ<äA6S y%k”—"1ÙíYŠ0dÝZ¬S'Ñ&ÕéWƒ½)«†„¿…†¹¨hˆaªIªÖÈÂ*NGÍЗ ¾Ñk\oŒ‚&VJ'y°F˜L%&‰ß“)²Ä×õ¾Ô†fXB ¾˜‰Ðg/vÇvìD4„Wº“üM‚YäoQ[DÂCÅ*M3EžŒï{‰Nîݶe¯X„×¹¥agh& ‰SKZ2e%vL¬db#Ž£¾%©kFÇÒ’!…û $U퉊¦Ti’éÙq¦žÂUeͲX쨌! Dd¦2ZTD¤¸Õ³¢úDþÔ­ùá%Dª"F‹4»{q€–Ŭ{ã]³¾2²º«dOR" ‘<Á 0B J7È„dLUЂɓEï➤FöÃ’÷vBTYY9¡”ÐI%¤ù¹›³Xd{6;Άm¬2 †Á1´„¬ž?ì©èÕ–ùät)¾ù½¾†¹³2é„„db2Ä¿e#vEªúµB&B^K·&Ÿ dFÌÖ+G&%GhôβSxò{2õ´"¶D:‹&¶ë‰ì±.äöj_ŠLcF3+¡æF!#Ö;-9Ût–P‘’üã¢NƒÚ‘Rl·„MÎF‰U¨„4½z#™¹'<*`Ä`•ZÒRÆ:dZ€ Æ5ÊK¯™áñ¦ÝÐx¿¢xS,‡M7ˆÄ –B"²Õ b3 ŒC5u\iDvÒ¢CDA«W¶Â°«´öîjSt!¥Ófå*Ÿ¶¤æ35Bœš‹ò¥Ie¤d}ÚœMÈä ÆÍÞb'Å\EÌÍ Y‘~^1v_íÊЉ©•ºvŸztlªÙ0·¢>Å[îDHA¢€NµÿøÉÅš#Nÿ$ÿ$ÿ6ÿbÿ©xí´ÅP’ Øs·³?׆HEìŸ"*K\OÛ‰ë§M Ë!\…ˆ@–ÔôL±&4K[ÎŒžu¡L®–SÔÞÅÂ|Â’¢È‘É¢l4éâ"ˆmîdE2‰JcºDÈFœ5UN„×)³+'B¥: ¢fkeÔ™LLŒuG­gÙ×7.´KQ^d‰3ŒnA-hl¤%2S Íë H›LEyËO™ºªém$™¼ÚbŒo¡1F7å½¢ŠJÄ8ÿÁåDþ¥Þ5“²9a7!m”˜Ì½É g5yÔA:jÕNÌhŠ–¯‡%Üœ–á2W®òöd·áe,¹‰¹ CR)¨„šì7¹,$R6ú1¦2¤~œ¯:T§Â2GÂÜÙ¦ÕŒ0ÑšéÑ^Òbý„ùÙþ‘TÄ?Fúö˜Ÿ›Ÿ¯cHD´K·Þ 9E››®Hf]<3/N&„+RµCßÒg+Œ$K}Ù®mæÙV¨M±ˆü1L†ÿøòég­þòVîÅ¢~”ÈKå€ÈCt%ÄNN–ýŽ­%òã&UìG¹Ð•RÓ92Èo·Ðct+2ä{¶ñŸ¯ƒ@ŠºI¨†‘„'c•dch—ã© ˜“ÄÓ”ìA±JáPË9öm;ó q3j%VÉM’Dts6m3Ù3S:<¸¢NúgDX¯§q”Ó}ÚĨC9"JEIt¹/# ‰ºvÂn²ÞÔT¤m{ää]Ûk’æ®n2+*b14ÔÄ‘tKµÈ†°Hb¿ˆÜI{1‰ÎUA=ÅR¢á¸¬ŸÀ¥æ»uäã ÿ ٢k¡±¹0Ù#S$%ô–7) ’:E!\ZùІZK²6HlBDª²¡Q¸ŽÆÜÐLA_"FWdeB1žrb"Ì­šˆ!Ä»é]„x’›EzÙ4J“Í‘,•oY£"ì+#);)" “‘¤c»‘/MI1´'%ìE‘&Ðs†NFs)¾'›‘œ©rIZ¬¾*ˆä|NÊ<¦I™ KsçXA›r²ÈE!,2’Ã+X‰f4ɯßZÒ–.hb6¯ q+ù›ÉŒ­£?eV\ˆžcOÄ&Iá±¾TSTŠ4cmëþsâSÇHÉú#ZNc͉É7a¶ƒàŠbFv¶.^›{Ýß¡ÿ‘§”‚CXl%4jjBlîM˜L–zÿL«\d†}¤Çl^ز\Œ¢2 —&1{®4ÜÉ„l›z‘*àœÈ×’ÆÄ‘°–”},Jæµ¾]|,qqóîOâchº²S-bC&fc3%ÍS¥“³Ù‘‚AǪLwœÍQÛ¦59bÇ*‰ïSkÎJk3F*Φ$©Í);r$L·ÑÓV¨„Ä3"2ØwlÔK UÑíüŠKÛ@؈Nj鬸[™)’’½ubø¯vÝÿ¬œ¦ðŠž$ȃ!©‚A•·ËJédÁ&”üþ”¶d*_‚: Äcï+AÔÙ¯*±˜ša-3¹]¾&’fªfÔešù‰›V`HÚ'Õ™ëKM‰+uç‹!99Q25ýÃOªbWOò,ÌJ‹(ÄÙ׸™ T„dQÿC挞56‹z0‚ µož9Ÿ²ÄN޳=Ž_oGwåF@#=EÍ[">scCrFH³'"4Õò§Gf*•ˆÅs#B˃]2•¾HDhÂu„ítyÕD6ž/hƒ@Ö¤7eÐÌÏ_\¢g$ΦQU¹7<*ݯ™·¸J™®ÉA,›–¹…IÐÑ–÷Œv¦$©] Ó1 q1 ´T¹ÍÉ Š,êÔŒ¨/,lJÈmETÄž×&šÈüÈi ¨™»ÄN&L©&Y)šsJ‚_ˆDȸA¢¢¯Ç‰[cEIG®yì‰5“T›ÃvÙµ2a $ÄHB"ÒtJ„ü…ТGl2M‹¶†.1¢ú‰P·ùÚk…&BûcÑ!ë«+Ô`–Ü£L²¢.W1 •‚CS)޳b\vA„ÔŽNÖKˆÈÃô öØkúáS¢£LÓ"1^tvîRhüY¶’”H²F6iÑÈ2$ Œb1#cf);¡/Mo#•Ù.,¤&Ÿ µfHÂFZì™åìÛ¹3h‹¶Š³›ZeÍž¤LÓ!¬ÆÉˆØBgA±%|‘‘IçwKÓÔKĤ1aÞ·%±›^Eé£.\±i ÙÖ|·¬"#£g% Ñ™švØ ¬ƒk¯i;™—wŽP•ÚÃÊ%ku‘_^#mzÅ2’Åh„YäÛíL\Fb]ê"CvJÈâ&5{¦ lÍĬÓ[²é<¬Šì¸N§¶F]šï†™véÙbCvÌ&-•›c´ó5³å¿aY÷³“nObxj3r. nÜÓ qö2Q]ö­Þ¤G)"YžÞ¦ŠLÈdĩٗ"·EÑ$âýð‚SÞÌTÏè–"tjø÷#Ãf'kFÎ…[¯¤d•L³ ˜‚VÖEA1„Ú ™¶:éSÿ!©gå2u…Ì»¡IzHcZ†Cdâq-äc1!Hl™*ôE"ÁE#PÍõK•"$îÚ}ÊBhŽ•lQ¦!7·¶¾DÂøV]èЕ8¬„pl ” HrÐ|ìS"õÉŸtÿr"“&n‰†Êƒºn…é ™i ²;TÛV!“ž"š©‘Mä;E*mˆL¤) šëqŒh1,èæCL†ŽEd$iÈ<ëë=UŒ>/%6Å7M$jlIMã%É’úœ—Ä,·5V*âÙ1“,óˆdf^û!ŠÍDX!ëß®+)5ìù\ÑŽ‘Fl—²}ô ˆÚÈmÒX†Ê‘9§óTAº$³+Ê“xÄÂÕ÷TäE‘*‘ПwrCÜŒm#Q²¢M†„DѯÓÑ-lÄÍááuú²éáp¨Ð°‰nðGb£I”™a„GÐH§Ym—R|¶¡.r±1ˆDwõ1椑­Ÿ" ÖÛÿ£ˆØËR£(ŽÈ…Æ‘$ŽfÆa£åïä£j2TVÆ!fDT±!fC±Ä×ÁZhé±òЇµÊe…G7HǸ3a+g]&Lf†ñ8Djˆ—¦gTd’"õbeb2âÔÿ57J]#!Dý]}Æ-êÖ§vJLí“-™‰ºE*63IˆOh¬¨4=B ÞÖû:¡št¤äÕØFÄ{âÊÈ雨<¹8ZRCWvˆGjy­D&ˆMBziÙ˜ndf1–(¸Ö4í_WfDwHNЗ«.³‚j‹ZJHè9Oã^ªÙ †ãQ(ÌeG­œÒ""*Ù¯‰Yø”ö­)cûñ ZÉÈ“!]ŸŒD±$V­OΓ äñ‚J‘ ­BA"¤èèjf±µCL‘‹297·ËvtKV¿ŸÆ”•P¾•õˆ³Ód—›As±Ò!«4¨Øžèf »´CÇofö‡ÚgxT†ÿ%{#j­}O ‘Sã",#Q¼†æÌš¾ÑTfEG‚êÑ1'©Í)ïL R$èÉÓÍš4®‡Nš›L鬌ÜÉЇF¦ÜÙMõBDIª­ãËŒ%Ýrõ”†ÈjPb$?K¯DœÁ¾¿‰´ï uR(Ùî|BÅé ·r ”†!´C"ç£$GqôÍ©j£ôûruìtLÏs'Û駘ÌfˆÐÒ*ÿa¸ˆ‰Íé"7Äí¢bIŠÚ&åFÂ)+0\×ü³\“‘ÁrB] õ{4d 1?‘ Éó¼Ê&]k¦‰.G)Ã2¤éN‚$2¥“Z¦¦$J*Ud,IôìDÉNìÎ$!„1>¦fÚLÂGEr!, œ\ÙæÅ…'t]:¥.k9º4F"¶6›º‘ 6A•F/¬a9jÐ0Ùbº5î”#_ Õ´íe[ÞL6!"Ù/íUšÈñ¬i¢ÅofE´Üna-!ÄÆ°D4IˆÉ§š¬­]ÉS"6מûH›ŸS—ÆF1ªz‘¬É?:M–Œ‰<Íúö Ý9ÈkÙ2egùo$­OiêR²¬èWÄ!ü¦1¤Â~(ˆbr2 ‘Vä³ú~ÌB¯|&#Šˆ‰:ÌÌ÷o´ˆËˆæS›•è••`º»ìLEè­:)2š’ÃFAíA;þ"r2S2Ÿ•R›Òre%&\Œ]âX&Ä âDXÃhPU7m˜Õ©»œ°‚3)ñ¹¡·BÞNNÜŸÉÛâÈš ĆxÍ¢ÄT••.²_¾Ó0E¨q}VäMŸù«äŽef)“Úª¼‘RÉÄù4Œ„ÄÒ±0IH#’ñ„ e]Ê-*YÝ7Ñýï>*ˆ‘”èJ"˜Fj‡a$H˜’DâTUgÝ3±:)¸ž#™J ÕIa·aF’+†2ž.:ž'".Èë[!Pög®‚ñ26‰i¯#)/¿T “ÞDs‰Š‚ ED‰Ž„A1ÿ¨–t ³Ñ'›-@¥,yú‰HòbR+~ŒˆÑY$¢'¡/a­DDÅH6ZEGÛ7×tgÆ{øÌ1PèÍŒcÖii3ÔçqîÖúdl‰Lê>'éé–ËÂkHNÖSvÕ‚1aŠ"s.bzT´ôJÜÿf »RW«‘H˜Iñ'#Âa˜LĽÝúÃUg‘¤+Z!Kš÷cCbHDDa!›±L‚39%rl¤!ÿ®GަÛg —iK;.´Ä‘)Lo5ÙòÆ»ÔN%hH#S)·º Äc[s˜–½íùc~‹ÂáQ>„›¯óf+ÍZ19Ræ`†jßiOµ°¬}“¡»%³LdÔµUíL‘‘ öŽdÛ) |#E$<9Æ@Äf(vH»¡ ÔŽL·Á+1>ÆbÇ)¡%J!¦9d„ÅÉ‘ò-+R óì¾ãVªD2È™»‘ÅôIS>h»óÉÌbL䎃!†)RsD2e/SM%¹ÇjIŽU”fi’Å.RCFõ%$ªÑ¢ï[É)Y6MŒÏ•cH%%h¹2ˆj÷¼¿³1U>±”GµYMxØœûÿøÉÅ›$N™ïM²m«Å´[ˆÚóGÄWÜHÑ‘Dœ‘º³)¾,BDñ­Ä•‡Kµ©‰#x#QYŠÒjÅZÚŠšÄ/¹IZ#¹wä~Æ­ªáÕU„H’M“ˆÖ¬ºRÝJÄRNaœLL«J‰3¡!2¾¼Ý|Ü·û+2‘”¬ØB»ÂŠÙ˜ƒ#.ØA´ø¡þèÕÉ\¯)$ÕŽ¶ ”‘5{8Òk"ò_9²{ÔJ˜ô„[lyªÄ䎲Qª!£C•:TÌÑ2ÍmØ»ÝìäÙtehúœÉ V³ÄD&mDÅÖ§’Æ•l†„B³'}Õ&„!lÄgÛpÓ"樱z ½Éw*ˆÛÅTK·ÃsXºˆYi‘`m[¹šå½2)Ùº:L›räyîÛ‰£.%3i¡ ïJˆÑ'Ät°‡ä}f¥k‚1¼Ìš¯¤#–æsB+=Æ+v¤û»rì&C£äKš#¢SjˆØÉ’µ0…ªÅÆHGd;ECKꓪwä†V!"ªFFoœ™²Ci·È¯¶NÙD$$”YóõtÜÒ):¹*1«®ŠÙŒ©Õ ŒüH„Û=­•Q »Q ÉåÚ:;7k¶Í –ÜJÄÑr–é-ì>tUö!+\ÕˆÄÌÍ&CHÙˆR´F )톋‘yí·‰‘±]0HjNO˜•]¶zõ|°ËiL‚¤¨– ¸ß)¡5éHRa‘Å6%šˆŠ ‘Ûòx{#-rvX°‚ $ˆí2ÙðFW°¤iËÑ3U™r0„Z’Ø®!2ªÖ‚¥'!—3ZˆØ¬r¤F„!îùêÊ$Ä‚**éÖ™+ŒJNæL¾uçæöN‘ZuFUEFÙ»Êß-™7tþ9-BC"ÚÌÆ%b8mɈË6ža,“¦µ"!Òägr.µg\Xml*T¢Q’%,…{ZJGdhÔј#œƒDJâ!¤,ÚõNiBÈ¢tÑœ²‰Y/o"ˆ†› Svmã!£’#~ψ« ¬!l[/"¢6ñ5ÆŽN‚"$Ñ”Ýu­KÈ­ÍZ´b™¡‡i²2*ŒJß;ùSÍy¡wŽBwRë%†"'ÆS V¥3Ï¡“Ø"ueIeÑÄÖ\5%»£;5ºL€˜N ß­9ü#[Õ±:2&Û®!RIY˜J‹Œ¯øMc ”ÊÈÁéð‰4Sr3ÉÛÙYÎ_²x«!)dv[Ö¬Œ–7M(H††l#(—(ñÄ™mèUf†·¬ˆ»fZfÃdetK£v°½µ’;R¢­iHO–©œÆ6¬ÈfjFƒcKZ"LBÎóÜTTŠ{â¶RZE¶Þ•–Ó!24lA½ ""-šbÌFÅ”Q!šÜMâL#+E½ê®ÎÏlSxÆê„Í¥Uè‹FÒ‘¹R¨ˆÄé;ÈÑÙΚüûúÝI  ³¦&š KYÄb[ã;4]%ÄhM[!-„âKûX‹UGŽ–Eâê„^¶ M-n†+Ó ÃG˜ŒÒ¢l¨]ºeMªÔ]—gÅ4¬•–³!¤) PB-)ÿŒŠgÅkæZ·¡mEÄEÈF) ÙkLì ‚w–˜%¹hŠÎª„f± ŒäŽ3hbØŒÕY. K§&½I„åø+>ꬷ/Ó3ÄŠéI„†2TÔ©3š©.!RôÉ{ßüJ!tù£A+KÎýwY5¥7l'3äûl»FB§D$µEÉèÍä‚F•Æñä=ìŽÓˆ[¢fcÞ‰¢¡ˆ‰[šlŠeÝ0ÙYÐäD¦%RZÊd½ÙªbúÏ”úfµ+ÈW5ööLDÌt5 NÉ’šŒÃ=Fâ·ÉMÌV$ÉHÏJör²¨÷mÔ‹$ôfD"-+ÊK#·ðH&ƒHÝö0GVUgèì4HTæ+9ºQ«TÙ¡ó›3ÛœªØ™ØˆE—­H7vHi‘ŒNÈe™¼Ldî ‘š¡–£2ÖXyg['[Sôèǯ­> ‚”„h5íÉO©„dHBÙC©*¤‹á«FÑÏIÅUæ/\õ„#L„”½ …Â;1^JFuÅQ*E9H*dg\O´ÆDìJ ýdäʈ¤ÝîFN޵qoa.!M"$ÍI[RI"‰kÇtK¬m ‹ûíó1§ÈðÌ4YqŒ[Õ¦•rš”_ÍoiáQX¬Ô‡t" ›41 LÑ]½©x·M™•³ôè#kYc]3Ýå\&äÔÖ?ÆÍ:j’쌤a–*ê­ lÈËzÆ“ôÙj¦þL豓 '˜K ÈF*X’Â$bÒ´$ø„mST#—˜â5ĵœÐûÙUŽ1äY*û¡#TFNfˆD!£ˆ•·l×v8‹ñ*]âTçjTkÓ€ À°@¹¶À¦@†€[À--ŸVäz3¼ùïáÙ÷–]ÛR11? ’w;"Ë=!l#2b&_‘Ä6lÉË=!ˆ "Ç\¿Ù>îWDz™jEa£îÍÑ,ÙH‘X"rÄÓæ#ï¤E L¼•„F6H·|yS/Ï:\c2©:Ô¡2ÑHE©é‰*ª'0ÄYŠÊD^ÈaVê#']»†Ãbªk/é\ï`l0‘ÑmÌIÝÞp‰ŒD†ˆímt»z¸È‚"Õ“69¡ ÞxDšÓ˜šI*vb%ïá%ÞeâŸÛa0Äæûl.ia#'-ߘf¤ñrbï¶ò¸„T¸…fÍ:nˆ„A›5l-‰šÅ$%>T©ÒöT¤IS îuxAÉv~Έâc=°”$h&ˆÓªx©¤J´Å—¦Œ½¸Lóà×À¨ä±š´Šì¬Aù8!cÉ´åAˆÉB·93wú#*ÆÂ} ¹¦Y#Tî™D°•’¤yŒKg6Xʨd£¶¶õðfe3'eDù_Š9 l™”hÏŽ„LŸ¤$t ȃB¥38‹ÍÉȲ½7ŤÙdÎÉÚÓNnÿHN„ˆZØA¤ECòúîHÆí2Fi¤ä%#Ôø‹¨ƒhè×,®ù–ÏØ‰jêHÑ·×¢C!rÅÈÛ,SšÃ8“5Ý­#=,%µQ˜JGA„èî†"x¤Ì¢A:;²áI2}±—We¤'ï«>&H‘’Ê¢d¸ä2#:F7Ô”Dœ=T]©Ú‘&2 ‰£âXFu£ò$”A"ggIr jÞD“Õq¤ã 1‰]´$†ë^Å&l¨2nlجä2ª‹JçH&¤¾;Xb]¾•)é.‰ŠlNgo h·‘1+“Fè¬è‹—†f“‡LÄ#*çr™+7ƒ|•0B—XŸW31mé¦UÒIì¶Ï‘ÌÊ[¬Ù°ˆÕ ¬‰IÕü\¹’³ÔìCÁ6 ›x”"y6¢ä‚">F=¨V׺ý"=:DÄÝ.b!F3ؤiYö6UTˆ–=Y*BDÉ$S' ‘! ÌúÝÒ3$]zÔm²Ç˜•ÚÆI¹›í’µD­ ×µ9ŸirÒ+JìÌo'íç´Ï¥ÌÄ%fÌø“Kã¦DNHÐ’Öu´ï…C[iS4#¦O›¹—NH„ØÉ´á¹Oær+öúM–·×ZE„¤Ò"¦íÍ4°Ä¬knda"—ªk”ÉJSØØ‹•IÝ1dÜedgXLHÜŒ—–lLrïʳ֩ÊÒ7¨”GŒæ1ƒ6›6<¹Õøé*v'‘>}Y&1Q°ˆÛ˜×U»)ù?i:7Õ~Q~¹WEÔN!$a»#dÌê†lG* ²YåÚ+Ìœ›E.).F)$»vŒÊ›²x´—J1¢¬õº;yò¦w'Ò#  ‘¶aJù$KÌÆvÓä³\m7û‘–#q2‘˜¶ìµ­ØŽØ„~ˆ¥:\g˜‰#ðÍøƒ5‹fÝôNÒªë™›Î­ãÆ „ÆÆM‹¡§5¬oDÂÑÒÇšÌñ¿kýZÜLBL†B2ne–Ť"…݄˴Ù‘~¤Q9­‚Aè¨tI©SxUi“"slíwêÄäŒÙP˜Úþ„2*=4'Y“\•Ð^ºÝ"A¤*Q·íM?(ŒØ•TÔJµº7[á1Šat{úhMM•PŒ'ù»B“¦±q.¤mÐÍñ‘y²eD+A*´uf§Jb/EnN3rªÉk);òâÖ3¨Y¹L‹H$Aa—eVüœ¯IšÊÆ™M0ÆÂo²¾˜ÇÆ"R֔ɲg­_š„¶WHèfµÆFšT$ÿ‰aéÉþô„”áIh¢INâ1ƒ>ÐHäjC9]ûu¶Çj¬¸ˆ$²H²©¡„I‹4Rq*zñ *eU²øFäÄ4&|•¶ò¡º>±6Eš ´®Êò“=Õ<Œ'! VY$S ¶b|yò6EZ9%„`’&ñ’M¹I‚V±NŽÎ»«2–| œž"m±½Î„›7ìâb Ú/%ꬿ²Œ½Åã—&h=æm&A„Mf2Kw &³'¦¿6ØŽ”‹Ï‹’T¸P樛û˜·)´2N“²³²Ðdc:$kš$4Ó7FHrlü{ù*dŸòÚ¥˜¶¾¦}q C&%¿)€ÅnÿøÉÅœ1Nþ,þ_þµÿ)ÿ°6«ÿ´}dèørϵˆ?׆Uñ4©~L1òd̘‡ö_6#8”hligbR7&i‘¼…˜‰ ®uäK)íº®–1¾5tt¨Bf”OÄB¤SvA,Ú¢V$ÂÈvfJí_ùj[wÄ\e1ŠüÊ„+ëªQQ˜™:äi?\©Œƒ{Õ$1«å» c“d:+|H‹¸ÝÚ’FÓs¤j5¦5ÄòX×§Õ .'#|FFÚØ‰¤D”…öSd¦‹!W"'Ýu¨äœ™DÝ¡•õl‘±;.*dì#—3¾ÂjB>ˆeš¢}JˆG—Ýм‘4\«®è«؆t’š;U‘ #4îFfnšˆ|÷HMÑoIæ¿›v•{²¤ò®)"-Ò'.ûÑ>"$¤dM¦Ú,]¦Hf!#³t'~õCÂd#ÚäOñU|ä#3jdäÏ=# ÒQ D¦m9ÈØ„ÐÕ²¥MìÝöðÅb—^4]\‰È#Õ5D÷°Þrb"¾‘¡ªûÄ…“±Z¬éã•-ÙªyHRD ˜ÆHé®dË$˺¡ñ,¦ÎÖUV^nLšF!3µ¹7÷HÞ‹lë¡‘`ñªÝ±‘nŒD`AK TÒ21²·SükDh&ZÐÉí×y¼JÁ³i“ÇfŠ\‘¶&«èľøÈ3ÜK©Ó„Â#|k5eÏl%Â{züöÕia½'6³ÜÑ®‰I´D·BCÆs-#¦\¶¶Á3RNö»ÎH„š¦Ù¯ø„þB‘qe‰‹ªJÿ’µµ(Éj&ÄwMvJ‚ ò0‰EB}©,²:Gkõ­çtæFëLTä¢Ò0²‘ [òÜèb$“|®£\Ñ¥ˆÏ·æFÅa•ªï0†"cf¼ILŠªR ÌeÓ·.× vÜ¥zv˜Hµ$«>"XX˜ñ$¶”Îlm[fûCÆ&"B"%\ÎÉ“³’)J.%°L„§ERV‰½#ÏÍWé²XOq-‹›˜Ï…К=ÈF¸C!<«lÚ4fÒL„-eDË7óèšéÔ¦UЬ¦“×–öc[8ÎÙ- õF ImDëR …ìˆß"!·"E$r54˜cD/‹Ð¤ù7k•ã‹–Љ»FÓJÓ¶töF@ŒhÝ+1<Ñ—é.ÂÄMT°†í¼tÓYØÞ2¢.J•Õ2£²Kq—Tµ-#h!e'U’¬VÅHêÄÙ ¤užÓ–{Z²lšNœÞc¯$¨¨3«UomÑ[Mˆ·ÙõðÍÐù<# Š™ì%†ŠH¹‚l©FD§*¢Ê뽈¤nIãÊf9cæ[26g¤¨yã\ß#ª|Œ™»c|¨„[®hÓkÈÖfïBh•.¶ª®‘å΄v‘-°ˆLnBqS) u¦ ³~mˆè¤v)¾™î—ˆHE%é-z^ÜBHB"u9kNIÒ&U²´sÏMëò!Œ7¦bK?З2 M ‰;tÈ•6msšòT÷føÜ¯r=Gdë0•:"Ú¿îa3.þéa²çœi MŒÉI|0×íBkÂ3Ñ)¶/kúÍjñ¹eóx¯“o}'”HÚL“?Á%A’.ù/Ĉ̟ÿøÉÅ6Ný;üšüûÃû¦ûÆüü¬´ÕI“8Çs§Â‡wÛPªÈË7 i·jv1*«›1«)f†5Ž¡‰÷Íȶ5ã!¬ðB,'c.h›u›¹j,Bë„ÎÄ„(°çc'›xÕ‚|í[«n'Ä<ôÄŸñ?iRü̼6hŠ„eHñ¹™N“ å¦'‹ã4h…Ææâ¥“FnZ[!F!2dq²ʼnZ¥è‚}R·ÓˆÐ²&L{2é±Kµ‹É#ìâdta ¨€‘ȪetfѸ†¾ ú±¢²7HÇĬåB¢’)HŠâM™i ³ßÈES —¶Bh‘cd¼LVÂ]±D”•ºú"Õ“é— žRg$D°3Þ݈ŒV‘Â[ã²: *cÇ)¬y ¾–B`‹Ç–¡nF%Ä]™á„!¼ñš JHL¦½&ä";(Á3´ˆ/ç‚)Bî]ñÆl;Ö°BˆšöŒ¼ÆÎÄT#– `a²±ÓƸ٠q|銋š¡iìÆ%Hí C ´¯;±nV܌ɎÍ5„íšÈ­'Tq ÅC“ÓåF!1ˆ»Ø³XÃÅÄböÆ|¹½ÙS=r1/‰×äˆHÅ$Væ´Ó&Ü‹zâB z¨’y‡CJ¬eJGý”ÂcyàØ–Ñž!/Îú*–{qGCdÒ'3£V˜H|‘)¥µ°">kv1› 餲›vêèâ$^ýˆ%Ì6açÚ¡)™ ðÈ…SôÄ#fÄN¯¨ÍFéz"´VTV$Œ³#ÆûòdÐ[PKº•†#JhhÑ Â=m!‘:ÊT­mi[,Š–=UgEÛŸ©FUß7܆%¦-„$&ƒK´Ä2Õˆ…FÑþ_KââËÕ $,ÝuíFœˆA¹©ˆ© 6r!•ôÌLÏ~I_e\Ú´†®ý úAª·.gØy.—NB,6EH•„ò"¢ ˜A+eL?í5r+Í)¥÷d—À˜íõXŒ´Gév¤ŒnˆHC©tÊ»e„“2âšâ‘òÎÉĺJdæ1³–42+á¤Ê)µ'­¸Öv;7„’Cí–äX‰bÚê‚èÌGˆ­ôê´ÈBUf#-•#y’‘D™3 ÓE‘ª„jwéW^K;eF|Çc;Ô¤WјØÏû#FDÅ!È™¦ùænþDï]†|JJµMÄJlA&NDˆ„ÆîžJ¬¦³MÑ^yÔ¾w©MÑ‹ÉnV6¶zDþ¹±‘šD˜Œ'¸5%ÈÌBX½¢Jb"FWìç¶**¨ÒÝ) ©„UÛ›1Ã1)&«[ÄFü¯R&}¹ˆ)5ЬìFU\©\™xƪ1;C)Ž­õ‡È!n‰˜Mj‘3+Ä:-¿\D Æî~bS1IºÔò;1‹§©’Ñ ZyšbçEhmÜ—qˆkn9Äó&šk$2ß&ª/: ­F•°™“'L‹I3O1]#|·³…©âÉ$Î~xÓ}KY'"A쟌¦V콚¡9¬DycoŸÄÁh³0Ìð­-_6·³ã¹QµwJB>k$!!™!‘¤|ÄQ9›k²¦“Ó¯‰Ù»Q0†É[·)["&•ŠF¤5–ÛRÚ©¼ôEU#ó ·µmœJÚŠ gr‹M F463$ŠD™¥&B>‰)\…~_‹ß“­ÌPžE×]æÈ¢Rçɉ6nX›©«1¤ H™%ùRRdÌEAy"´Üéò×$ì-¬LB®ë³Ö÷Љk†Ê—2H»7Ù™ÑZ µWstg/U1MœZFÁ¡¢A ŒiætÔ‡µYjÒ5庼ªHÖ½*hK †O¤$ÖÃfZù ¥’EÍV# lÈÂh#é™$HvæÉ®5ˆuÏЫ:+v÷÷Ö“ûª5âbj&a¶viHíÚh‰®ˆËŸ¦ÉJýƒ“};ºâ"Zd# ÈÓ,Ùö]¢-H†S}#-Ï®C´%¼#µ&d–^f6E›hLfZŽI…ш«J@„dwêËÒa“ÄfMµt='HR*Œ³¥k²<°†äçmˆÔŒ€B[‘&Æ‚J¿Ýdlø¼R©q/AåXˆ‘¶-C1´0!&Â41UQy)¡œÕR!õ{ÝÚa AŸŠÝ ™¬B¥B£2[h½ ºhL:5µQ–,1-gæÒh&2¿´DGBµK·Á·O7Ù®Ü'`“úýv6ïQóé‹4a h\«!3C6©z‘™— =!¹°‚R9¢v„2µ÷™: •¥+-[MÒþŒ¬{²fEæÔ‚’t¼£c.£jgñ[“Ι…hEÌByœ0ÂSA‘ˆ®Ì‚Fç7nªäs÷a+÷:$ö¹",CUäcU˜Dm0•^ÒéÌådwË Ù‹Z3MHLŠ&"@„µmÑ£.Î…ˆH¨õlË<ûÒˆ™™k&™¶0›ÕœÍs$:EBtf$»ò Þb´Sh”ÃÄASÔôDFBŠÜ”ùR®wb¦}-ÛfíŒM«ÌbdéIЉ nd§*ÇNJ¤އhÕÝ8B~yˆíY†7Êa*›"l­‰H«cÈý,»õfŒT‚ÇTȪ”š=Îbt‰HDIy$l‚›ÖÕ\šs‡ìæ]CL–©~"L³$µ˜ÌŠÉKq¿çؽ;ùøG÷ûøø7ø‡øïùnÐ|æUâoÕþâÿnF…Gµ¾‰—äeʌȌ~C*'ËJLmöaU›}©6ÿf*w$D3$ÌCÕš16&FëéÍggOWZ›•DÂq1 ØIwÓ#Ë“Š\tén¬s–í~g·»Ÿ!*.Å£6ØÈˆ‘+=aƒ"5&´k#ŒH®RÄã òbhz™=©J³F­‰²Ò/K§IdÕü¹ŠC*"”E4eÓ1²a¼3+*#@ƒs6»²c×ú×0•ÕD¤wXÚ3ò®¢vrMÈ%ˆ¦a•¦%Ö4ÙVtzØ‘1i |Í„äÚDÃTnÌÂAîéÎökïM •õ^FB‘diÚ(ŒBê2ˆ‡ÆdMçJDp™TϲšÄ×Ò%_ÐB&w6a"è‚‘Y ÝeÒxÕj”xK‰RóM,Ƥi&D3±Ää•’°¡ufت“Ïa&aânÉ ¥ ‚*’·!1©=¸ÏÚÊ¢WHŠæ’4+ŒIa<創bâ5gC Iû3 i Oظ„lÂ6/J¹Qy5D…Tóå2¡­sO~e<É|¥.e¥d"nj"<›¶h• ± ÍHfØÎæšs} œÇˆ¸çÄš÷F)í‘f‘hÊ7fa¡4J`×zÄö1¹uD&©É7¦˜eAš µ;ÑÖ“×ù2½O²I;˜‹ßH"óà›G´Ñ7ưԜçÖl§JÇgž H-kFÝÚNA˜£‰‘R•>ðIUž”`ˆK]âÁ.Ö{'1 –ñqu ©-' ˆÃWkc,Õ²3TEš5*+te"ª$Õd2U%_›èC?NÄ6e<j…Õ7ki’ÂÏt{QÃ34H¹·HDªÚs-E•V1G…Å'%äDôÊÈðŽÉÒBL³Ì"dÿX¹³NYnéB0˜ëS/Qˆd‚c"s^Cc:ïcx×)Õ>EêUm¤j˜×ÍîËаd®ÙM#.BRDZâv®³Vt¸™cw!œVv­2!„™Ô„ÎoàhŸ÷ÎÚ¢¿-Ò!È‚¾ž q5O,LJÈ5GS–*FgæmìºGIJŒ¨´lxKŽÆW2ýQα*dfìèéW,bd¼%#Z‚¡MÆÌhšöìÄæ\†‹dò½É‘ÕêhGKqs*¯k±µÍ&*# I¾ÉÉɺaû.ÙäTuª÷±¸ˆÉ^Q"½’òK«6å‰TŽik\Š$"îj—á³ëÓUÛz±ŒÓ)y¡ÉŒ0„u©«ý†âkÈm1ÙŒ­…CsLˆRïßuß±þ-$ý<^FBÊBNÄ`”…b1®f!C/iŪ„ˆ™šuÏ<]íGbq®|ºíé:=¨ßx%dX±®Ù*èÐLÞ7C¡65GÁ2£“µFô™Ìy…Ó³¢ˆä¬A>©$….Œ›x$ÓÅmdjTlk®}"·U³x"3g•’˜•ÄÄHŒ Mm¶D¡¹ž<°~þj"}¥ŽˆZ¾]»'KجdIµÙ—v’ Ù)ÍÐÕRˆHgF7™7Èfä¥Aþ«K ßÅ)¯éÉ3!¹¡6%Q1ÙP¤x ‚gäÐå»´”îÆ¹ód«Q¡´$Äx[üb§ˆ$Ÿ™6ZøÄ4GñÊD~«£KÔÓNÙÓ>¤ùfJœnц“v˜n„ù’ŒR8É*+m‰/Ï J†ÿ&‘-[xú¬7¥â"røîõš¡Ñ›&Á'U˜–dh& „"fÄ7Ì¢f\Ü‘(õŸGfÌu-íE:B%$ÌQ&B¢mŸ%^¿ÆdojaØD¤ÓF–›r5`FÈ·åŠÌˆKK-ÐEÐ…yL' ͧ(­‘½&„Jd/ónñIÉÉD4vˆG¾–Æ%ä0†Æ…ªB¦ìÅÁ'EúS!•—ÁU\‘ •—½™†‰{•Èæ]&%3#C1ºñ´1ŒˆÕ&E)/ZMÌ­X‘4›,RUBAÅDÿøÉÅž?Ný}ý€ýý®ýåþ=þ·ÿL´=PÈñgò…·á†KŒ”‘ÐAŠb±™š$3[ ŠbqÙê½â.$eUTʉiÚ‰Ò“E"%jÄK ´‹g¢µ=êÞæ«-IJ ß96èb^ôƒV.Ze^åD‚uB”KSÁº¾Œ¸Ù2á 'T#%B9 4¡°ñq=Ê_W7W †*d‰ aŠÕ ŸKðæ@:±U•ÕFF#• B÷Sæ"&\fMH‘愆Hœš"]§T‰íÓ7½‹’Nñr4M¸„­«d&¢XI;ÓJldT/lŸ®¡ß¬Ü‘/¦!BlÊ‚ 7HH$EÓ*½íÝd±\Œ£{th›mMˆ H›¶ûþ(äN/4E<ÙùJÑ–£“©˜dhœÆ#‘”IövxÃò¿ïìYk¡Eµˆ÷A‰M²3B"›:YGK„Ai=—¶QŸ9Q䢟b„B ´œ"&F¦4'-ÙXWqUˆHÁP™–4,|Õ¤D2S#¡‰¡mìn?}¶B#°N쬎CöDgfÛûa—!X½‘ ×!3û‘3̈çqØÉZA2çæÃAU* ñØlÈ2\V‘‹ñ­d¨ä1Q!R£–©RTÊ›HMË·¡0BeÀ–d6BÇÝÏÒ¶H¨Rµ•Õ]%Ĩ%b$h"[ ÌSÚâ,íI%ÒÄXW’úYò1¥Ñ&D4èD ÜJJX“Yâ’üôêê"B©HÐÃ0HA$z(á)ˆ­(‚®^ƒUÓVÖ’jŽÚxT‘ j‰µÖèdž!“ó…²äfµ¶´Æ 2—Y?e&À”Þd+*BabVœÉdJ™¾MEÓ’¶É£vØØ…Θš'# ²èÈJó½{Ÿgq ]=ìÙï”&ä˜c5»dr§¡HÍ<ï½êú!3úQ;K¦7tí £M »Þ@†¢'—ÚY˜bPå¬& Ðf*s%"Q•+a"#fC¿={âî\m<ÈS=j•U“+¤A1>ÄH½¨'0Mâà ,ZÍ[*¤›Ã1!; ÝëŒÝ “ù¼ŽÄ¹W¶„¨è^ÓFŽÉ ªF—´f÷ Ág̹ ÊS\³Á¾ý•™“•`€Å¿Ü®zØØÕ™4)5Xâ[eNÖã";?ÞE'&´ù 2MY›ÙªnÈHÊ&LŽÃbj©QI—Ôïk‰MÄó}ö!°&BÞ’OY|F#;¦9[Blij8š³la)˜&4+ ‘•%a Ö -…ÔÑå, ÙeÒ_ìëã0B;-ÊlµØ™|èDÎ̹q3el¼„³e•‰ú%Ë$eB.¬ºéíTõJÙzŽbC$ºk:¹yŒHͦ‘’vDD3𑍓šó5!×q¬I÷l•.uW¸jA7íùÌhA*6wªF!7á¦%£zéIÕïÌA£V䓉S7¤^˜ˆNX×~S#ù$—yŠìviµæÏ]£hPˆµ”…©;&Øÿ^ÍL³£ÇSjDŽº%Ä£2[äÂY¢}FîGd[ÓeµÍ™äÌba ±ÎÑ–\Š‹Pe娞¢ øCiɺw—ˆ›LH©q àº3ôr*9:¥b¥÷¶d›!S’“ii9oŒÚ\HMa™;!m6 3\Î~[„E©{!ædÑ ®¤‘ƒÂ E9-‘“{I–ÒcTHÌ‹¤a3‘˜‰ŒB<ðK*Hm_Q54¹"%BïE* c—±UˆÆ[º£Ä» ˜NÈPŸ;)ˆÅzMeÌÚ›q"&Œ—§BTÌñ7Í6´¾V$eÂ:t±;õ„/„Q“ã dÌi•IÚ‰’y¥&WßÙ<è‘ÍmØ—&Ö"‰–Ñ#+±Æ©dd­¿Sh“ÂwÞõÊm¢²TBa«$꽚dä¬BD—µ„{`O•Ûa"᯿¤þ„…e••:­ÂFSÙÿ%ËI Qcª[30ŠB™¾9Rc1³'Âg\ŒL¨úOÚfO„äªÙ“:VHZxÕ“Ä^ºv„%ùv'—M¢¹*üÍΊa<ˆÜCb2µ%žDkŸA2•r›¡ÐûH£¯¶ ¾H2¦Z´‰á “r3›¡Jå щ¢“ºtÎÜ–m,ÐÕ’4D2_Yd´·Hf«TéK5Mû™'"˜–Òöz"‰ßlkö'fÓ%Du݈D6êZ­3T˜“#ÈDMj ;¤bMøN’´3ÏuLNGLTÆ”½•θ43Ä'(“¡”MÛ™©6Â*3ÂM´«y¯¿ ªzPÕ¦\ÉÐ'FËëvxiI©+:‘6Ê¡N/Šot1¬"³lˆ"~–tÄ»OjË“wˆNÁu U—‘·‹qUÌ!%·X,©fýµo¥ÍŒe±*rn¨a“~$Ú’i\•ˆQÉ%7û¯ Ú\Bh…£_#H陹gÐ’ @‚G„ 5ÈVe¤™:Núñ î¦ÙŸ>unM‘thû)š êÍnâC"Fz•]PÄC!ô#,›2'B$T•“‘H$&Žs¼;Ư­,„Ö‘2‘‰FfJ®†"ÁP&vë<Œ,¸j‰猈2j5øƒ¤4Š„Õa 7Nk‹’+xýÚ#noRŒÖÍPÑi Žh1yÑñis&tQ1ÊA_¨ˆ)& ŽðÀÃx„¸‚Š–Å$ÐK0Ñ\ô„·Ã¯Ä'¾!œ°ŒÌ©®…FÄò®tJß‹¡ œLÄF¨Í{Íö Š…gÖdõʤÞTå!H×|3mã.!•½¨vÜE“ ˆ¨{,6©„$¨¬‰H3QÿøÉÅŸ8N¢Iÿöÿ§ÿWÿþ¹þ|´ÅP‘àîqW·Ç׆II=f°¶Q˜°‘«ÆuHÙ ZÊ|3FäCè†L‰”›¤Ý*_Y!×!ÑÜ›³9–¶¾û“æ!Lˆ¨RkÆlº.Ì™êcG/L2äZhoŒ¢rE$A¿s_ÂêšRlè±v•ºçfq‚2RÈz¸j”š“«“r·i DʳR]B372–R·$ã!1 ¦jÇÞÂDÙa•òí×+ÇhxOˆSˆÄK)Ê™‘DÄEš÷Ìžº4oÄŒ%,ŠÙâ:4AµÑÈl¤¤"k¶lñ2vºÞntòæBMÏ’&I,*mY¹’à¹fÄD†UÎÝ:i܃wuÄ"éÄíU™ö?äO4„þ¡Ì5Gˆ,XukNªÈâr1\XìÑŒf"§vd#ëI)§ç¤¦U»™Ï4±ÄF5ÄOm_²1†#ÿ±³¼DÝ5NRýv4ksõ2êÍB!9½üDÌÅ„³'²˜#Ä/;úäãd’ÖĹ̙ˆìHßBd÷ˆN´„Zu)ñåÊIÉD&sx|LNhÌCôM2 ‚áéøÂlJ¤µ×Ö ‰ÚWÖŒ7[{“‘U ò¸†K®ÿe2d ÚDâï Ê!ˆÞ7:)I†É´ªâò#DøÙ‹ª¤ý¦oÆ4b2“‰ß§2„§$V;32féÈUp½XÛf!¬?å>ÙŒt_}4Ð˧dfâšÁéÍ¡:¾Âõ­’± C¦-+2#„„&‰ÈÄ/ð¦Y½Íìn*¿Ffòõ›¦‰6íuìÔ&‘²¹\š+L"™ìÈo±PÈ0™r^ûa£ÛMZH#U?òÇçf)¢7jú&¹I° $=¶‘ •¬$cÎJ%ÉÛ=•“·øNÍvɱ=·.nÄ)¼Ím¬¥¬Ž×¿b[!1?¶Yq‰bá#Þ\›gcYiM†­ˆÿV¿·mÖä°C5§­±БYbÈGýTh¸¿j´›„Ë ë¬J¾\bQf‰ÙµF3#˜„m:jMÑñÔ»e®Xx{+Dk“abqV¥¾“ö«¤’­æDò@ŒØÎüF È̈›èž#>Œ!zå…ÈôŒˆ!°óFzŠa~¾ù‘Q—þyo‰2#JÇdÅ:,͘@‘¤ÕUÍHŒ¢2ÔeJfÂ÷gÈ7fèž Þ›©&mšeYsªÚêbŒ„½zyÓbÚàÚI"2ý<߈C4«–lFº*´"¡ic.¥é(GØ„”ô1bäë³L6FfÄ6ÎRr¢ÅˆBSAÅÅR«´ÄþšËPÕIÔÖƒn—›üa X0«_ÙâA6ŸÀ•ó£3®Fkq‘ˆa R*h«ÍÊɰïsh×ý¸fGG"´Í™ôÊeÏ ÓÙõŠ·f•)3ˆ™ȉˆ¦a ¬ÞXXÖ;¤BF]Ò¿~Q$F‚2\:—‘ˆ ñ$',¨DË1´#1±'f`ª.Q Cd­Ú¹æ(WøÍ¡¹VšÝ¶.¥’b5dFÏ;}c<#ÿ" âfRÃd©`ŒÕÙ¬™±¢}ÈÝòÁ*³Áƒ)o±ÿ°Fˆæ„ŽÐH¶ŠÆù­i4â%¿º¼¿DDW“‰Ú3‰ ¡™¥™£„k¤6CóÛêè¿nß-=KŸÁ0†f&H¥âÂ*gÌ›:kÎüKM‰rùeEÍ!‚#orÒt2šzL©åV^úCæLdy×j&i[\xÎ"2d’Y1PëU;5Æ&çEÍ£*!™²uEˆ‘ CEX¡Ÿ–Üß1ŒUut¤²36Åúoʹá1/ZùXü}ÕHë!)Ö‹) î9Mbâ¦Ìªm«kW݈܉0Õ ê‡2[\žñtµ …ûÃ&ffCk}B#›å$«ö‡Ø"^¼¸z*™ì˜o¦|ŽfDÐÊf"):õgÂo%gBï!PŠdr ×TBcv3›‹‘«(™S!=,XRoQ¥irî¨UFƒi+©±ê*LB4nN·ª%A!s©«g•ˆKÂI¦L57dlI¼ù“ÈHÞW·>\ŠK8ÌŸ|®Ë2V#n5.¿vÕrFlN$Ú÷Ê’ïŒF·>“ ¢&7´XÈäf!’ñÜfrvöH–\ß‹ÜRRJÖÃzg9>’¤D1*Nš%cdŽëŽˆ„*Zd†~š“"åOVÔƒÑY|.T'Kk]Y³©Ýã®ðFËMQnزÚ4a!1"1rG%®ŒbUåqqm©›ÅYs× ÎN̦LÜɉtOj!-òHQ¤þ”ª|%C«4hÆañÐ…%`ƒb:ª[ÌÄ´ÐÓ*ýq5Éɹ HΩÙ*2 çVv/ýºWÙfvH–eÜüV•­@Ú#ÑwNtÐ! ›š!*4WYð†6ÒÕ\LÛŽß[ü‰ÑÓëØÎdìD¸ZB ¤Ãk!3hE*ùIüÍ¢+MŒ'ÿŠK—±‚1 8k«®3)1×nuû‘e¦§Í›¦N¤+"7†Ü¹$Âl²/¢2 UE§žC2x±e!Y,ZèEl&30‚FŸWD͈‚º# LEV¢kv¤ïˆjŽˆËŠéâ …\Ùab1$ÄÏ L°Z˜$•ðý"±ò)áŠb6±H%,$!Óˆ®Ú9&Bînéy.ay6˜n+fù¿b}É[TÖ*emÉüD2£%²L’ÝB]äfܬžÂ[©P°«ˆBëhÕ%‰y‰ID"D)ªfÐ1ç‚÷bi:cF/õ2´v°FŒÍgŒ†V‘§›Ââ›ó7n¦ø„¢˜ŒÉMÉ5%CQ.¾Ø†Œ´Rª¡?IRHøÖ{ý0ʆí«+e7Ù±“ÓTW÷jŠÂvCþQ”ÙÓ3nÒ܆È4›ÌGœ26\G¡ŸªÙ‰,ð‡H[¤TfxÑò¢"±™ ¢ôÄÊ.(ñ-&!ÕObÒ1"†D¹'kKç¢0Öát¢yq„µÖ$6TŒñ®#,Ë鑲‘b)BxFŒ¦—bk6BbɠО»Y¹Ÿ"ȤҌ•*|bFèeFM ôa\–Ôè‘1¬ªˆŒÞñDÙ²S"؆ȆVB&#ÌÁ$¥W¹ ¸ÎJ¾Älc¥B" ‘ó!V¡Š•¿-WC\¾lSÕÝ‘+JÞµ@Û ™1 hÌDªÎÖ£e¨‚<ÞºGȈ¼O¹Æz&Ä_1„Wº2< Ú—’ˆ„ UÊûQ¢« DeîŒÕÈ*°’5cy¡S,"š L–0šÙ‚h’t%ÑéÅI ©•’ÙëïÑ.²l“íã·ˆ‘  íDi$PˆˆðÃbU.Ë,’2h÷ŸyŸG¬#:{g˜ˆFÂC:/iYY…’¸¼VSg7%ŧædcbI›ÈK„B1Z*yfbU¯P‹ž¼¤‰!Šõ›'Ä b9Œ• }åUM™½ë å¨VªT¤}‰NˆZÞ„è«=È„îÈÎŽ­â²oÒ¢T¤EE¸jBRIšÂTцæ!§îî"Ñxˆ …ɲW˜"²ER(‰‘ŽgSvßwùZ¡¬¨-î";^&‘ŠM“µ6' Ħ½fF#1ˆÁ9ê"7ú(öödo}¹êü·Öï#ˆí‹r®l˜ÀDìlN²'…V¨BDA^|¦””\]a #ÒìlC†%5Ù+rµlí iÊw¾ŸûjR‰+VñCy'Ä1a̤h,W#TK bM0ŽY0ƒ••²´V1Eâ’OÖG_ ‰ñbª ‹—Ùḙ¦Û—Ú¥*ƒâ,'›³ˆL1#m:2ä¡)ÑÌbcž(U¾š0F&r¹ÈõY¡i C1I2Â: Õ‹ú lSN™’ñj’÷°†TŒ‘ºoq6ÒL7[{PÐß M„U"ÞöÔf3Mþ¯Jwò7¤æ5=¦R:"jŒ†‚Ñ µb‘Œ6bÉO+ü×ÉMÜK!Ñe0JKSä+DÙyĤgï﨩Iømñ.BXŽB¨‰w¢°„I»«ØTbbK‹üM2;"¶ÆP„?¸c#,dëÙ²>:ª,5å"$/.—вˆ„IDFJwb EU%!)E_§Ž.ÙkW#ÔC å>¡‚BˆBc©‰¥1î‰{gk膉sñæ}«ö¿¼‘¯W¡* õæ¤ qEµzFb&JÙþb"#‰²tѪÔdrzÂm>.Ka90']j©Ò¹Diçc÷êd¯y±“ /U¹yÉSU%ÉPœ$tÌÕ75¤â2 ôÚ,Ôwo{ú#;ûV¤Ì걓Æt™‘ šsD/_žG`NÖ'˜1!XƒC8Ä„.ba“„ŸÇxB£Ô¬-[ êåhØHfw$AºD¢m*PŒ"×"î”Û3³^S¢c$r:snÂ_ôb.R¹÷L·!1ÓbE=”òìd$jcq• ,Yæ%1%éÔ¨åB|¹™Ñ‘‚MÏ7P‹ä2Û7EëŠiñÛ$µ®#‰öË3™{43#6­ÎN¢‘MÍ5Œ‚»É·+ ›IL¨ªÐ"[è‘B6Fè°JBa#‰*ÉŸ9á#.iö Ø~ÏŽ…°AM*eЦb6†ä³ИäÈNJ’;µ1Øv`•c)¨Êdè†\¤³^±é„M’m„¥¥þâu ‰‰¢¢:rÅ2Íz6ä¬ÝHE¸ÄJÕ´¹Ñ­LH— E¨é³$fQ Ú›™œ©ß¡»sß™!ÌJ$­ÈÅ.Vc 'ÞÁht·Ó%.DFHv•‹éìÃvo:šFGߢÿ¥ªØmŒ_é}„6"¶!.”O‰Ø\Ýj¦! µˆÏO’£+—¤B!Ú}gêß¶ù –V|lµ![D"/\³ê¢VC}t"Ñ õÊ2S+E‘­„Øñ<·XUO:³o/E¾«’’3~ f*Í•c]›æ]†¹°¯‘ ¶Ì xÿøÉÅ …NÿÐÿþþ^þþîÿ‘L´¥Rè¿t‡ºŸÚ†DÑ?ÑJƒ[“”ËRRKйöD‘¦$|I ö‰ÐŠf==¤”J FñéZ—FàÑD¸ÒoªÜE$JlÙ”ùÚ²JÙ—ö±T]Rˆ­.WÄ”$aS›ct ÈÏë"b äôš‘Ù|óJû{ ÑDU"ªäb¶D›I2[“1£¤„V_ózö‰q’ÂF2G<Ú0Œ!¤_òó#2-‘H*Š—·š•¨Õ ¤æWD`ÄFLÄB q¡”\o9IPIQ%÷×òw­Ê–¥n¾Ã$¡3~/¨„•jŠ*mŒu¶2«D2bø”—Ó?øH„TŠË¹r®ù=““—I3Óa¡ö„’Ùh„RsYtöÔ.°J·Ü…ùUiÍ»:>É¡â!‰SÆ :ÄN\¤2\I"y:¬þÖƒOdÐÐÿþj"#§ki´Ô„Fªµ–ÇBͯIz)%¤ÈBz¦"¶FCT7H_¥eÆÈ´/"]©•³êÂD]UIxH&‚H‹s$'b-n–â«É葈É2:ŒÆEo£;1ˆB/"'eôuKê6Œjò½¢§)¶TtM‘+TÏš¥V’4I¬V<ðF‚±[]gkccfœ¨æ}š’ldc6Ý*žªaZn2k.·¦ÆÍcSB\C§R£9äË“â-d1“Y^‹”H!#6jû–¹$Äa#f^J1ŒŒ»KÞËY©©"«îËÍ«íæ–£uµ26EÉD' цÓDfœyIXÏ»‰'xœ¾¤[6‰¦6B÷î™òˆÃ#Oѹê™,»ÆD Â3ý®è“l#'%-eÏR¥eñ¬•VÚÓ“ñ:g™Ì×L¬=UN„ŽLoUtiÖ;+ì†ßBRdXÈf+lí0Û³ñ¡%œäq¤k[b ÒwD·FˆÓ9ͼC8ëÕŒ„FòeKòÆe[p©ò,*B1–?ÌIn0“CñüWŒó¡CVH \:á**¶¦Æ’´&WtÆOØ™„ÌÒDèë™ÑÔ“&ß>»ªRPÛ63²%"ºxD-¦Fóùt!]ÿOâ;°Ø!<Ú¿QbbƃUpe¥°ÛÞÆ¨™'GUiŽŠXO[FéêšÕCˆVùµUeI`Æg’¢²¤CB ŠK=ñ²/4NJIk…4ä<é3ž“‘V·ÎÐÑ,ÒÂ!BÌu2H‘˜ž4²1¢eî”$’²®zÈ™¬5hŠt1Ô¦lHCZ#œ«YћԪ,ì4—Ÿh[½+?Nl¹IÕ-2DÄSy#¶1–DÆÑˆ‰röæf7×e&®ÕÍHíýKŒ®ÖMµ¬ã¢nȦm·ÔÄa(ŶÉ"²»$ð®D€Õù§ªH±’&‹­ãx÷)‚΂(»AÙc¬) »»vA1ƒ#.þ£L„{´eiD}X2BEʽ\Ù29#«æ‚#NÚ‰dx#OÞTñˆD&Uo1a¦¨É‰mA$üf‰išÃÙ"ÄÉМDð¯#tr`Пܻ›øä4AÔædhøÐlÔ7p‘ª†MŸSÂnBÁjB¥&XFb^$ç“"eèKHF¬ŠLñ 1ŠOˆ¶xÒuÌL»%4ë8Ç“iKy-±žQ4>èB?+fXÌÖäKóPKsIeÅ™2+S®‰‚mrFwS•¬!#±û: ެ—­ÈDC5è²’ߢr;)!‘ `ý2-A&\ÎÙ÷T }M‹¥ŽHDCrfcy’Ú¥|&³Í§½9y-"ÞâúTtJŽ­&–—‡"¡1DÁ}."ÌŒF­Gµ[jé'ñ·ô¼‡T\ž–©~“g¹õi¦æÚ²ºõa2s3(ȈLÕ$3!gQÂ6)©:lì¶ „Æt}'v›ÄB „e“mkU¦b3|Ð×B'¥°ŽÙ;!3*S‹²‰YéªjíIìÈÍ®%¦$gŠvÛËŒ‘ɾHKN‹“üJ$3(ù+q´D·¤DÑ)d†GÄ ŒŸBDTØDÌ¿9$ˆå&V˜ĉh¾E%$)·Å“bëk!Ù) ¨’ÔÍãÏ ¤vm°Ëmb%†ñ¾f ñ8» Fpõ›EUÙ9®"»"n\JMr!™ãÙàÐÛ²:Ö¿0Ï*1¹gÕÓ™ã£2UL†¯£®MŠB”·Ô+6FH†¥H!ªYˆ"®É–’äÚcnÏqU?R2)=hÓázG‘³(ª%TV…M_)$å¦fˆ*dþqíÈ“ eÁ™±œ¥5Oˆ¤^C:i+!\æ¼ ¿¾ ›W vëá£OQQ$±§´µ|e5«—%§‘¬Dd¬‰IZšÙ\›¼‰#$7Êþº]ÔhÈ…EIœÂ3{õôÈ4f¶r:ªä!îF\IXâ1‡T'ÄI­é Tˆìís£®è\Æžåš^ÆRTÓ´¬"N™$‹q1(Ä ôn¥r²t§”¥Ë¬º PŒ,Õ_ôF†ŒLëˆÉ¹8ÄXB'ð»îÌV7_Hý¸Ò[¡áÍ*Ö%çÄ3[™ Ô‹$[<ÄÌÎK„"¢;gÊì¹#›n‰‚ut™0»Ìþ©a«Ïûœ—bŠ„p©‚­ä­E‘ÌÌ.:‘ñ~”†«<Ó¢}‹[#¤dº,##EFÿc´Årï[3 °Ï¸²p†L°ÊÆäCB3">¦ä ˆ”e" ºé¢ d[ ~Ê"ä°B>Švò41ª ¨‘s5DdŒñI¬|£"JO£Ég%™¹3&)‰¥Ó |¢ÈO$銉žnéùª‹z'¹s'¥j£+±ˆbVK"=ŸÞÂÜ,^”òæ0˜ŒvÃi»¢ ñk2eŒÈHÕg\‰ò|„¢®ˆ`òoPHŸÚ¦¤"å$v~äýõ]Ñ¢Ó¦vÅ6*gA‘“&HGã XÆhJ–4ïÒLw/¯µÄ©ö?],±U†)±DjfmRI©7 ч&chŸG­U 3·ÊKŠ’ǵ8š°Én¢¦²+<ÏŠÈÚÖV¬©,!£'þjòØ'2¤!k¹N‘DeÙRÃ/zéæå ±" FdœF‰¼ivfA>ÐÌÈî¼LB{ flŸæ¤‰Xâ¡"Sc{YYsßþ¡R\—{i(NGl™ ™*Õ\‚nýa’ÖX„‹B©’ÞˆÌÂ1òº'¬ŠÕ’: eö4Éä&bâ‘DâBf™ö ñ‰?(Ú1za+'’¢ Ʋ­Êäèô3Ñ=¹ó¨w¤ñ¹Í¢\HÑó9í‰Éµ2i#C¹~gŠùÎzä$&‰·„Tξ1DhÑÛÖ¥F*èÌÑÓmÉJ"d'ËS$ 5}0Ðÿ ¯^f¡Ç6œªé0•ñ“"-å•ßHTäµÄN“Ä|¿=YªLGGI"!4B±D\i™ š«#'žî×@0BY#¨ê%6ŽˆLLÞ¼ñ´E3’ô\„.LFÅeu'2ΆCTˆ·\]£v#KR¶Ä¨„.üŒb³êÓIc¢Î]É<ɲ#[#B꣒; ÙÔ&1.þ”ŽÈZMÓCu_M1òÃÄa$v†nz6dP˜0™ÑY}èS© a’êèRÇ!'‘k¥F3©)/24i*WɆ/ZI!c‚hÛb?®’Ô„ŽÕ2ºù¾© µJ±’¢}ˆÕ¡1ÈŠˆX°ÅjR“þV䩱å>Z…ŽéÙÒa Y'ˆ‰96f˜Â|B@„Ó£I ˜”ÈýI¡Þ™!ÁU i³x\x¢¾Æ0w¤*tl ÓÙàA"ù›¤×ŒºMÅåøOY‚E/i'Ú/Üb3tÄ? M.¬‚;ÆÆ‡CNžøÅ6m¹ ­LDäR%Œx¯½ ômþÈÓŠîa)ˆ&a„Tm·(b Ø vZ“?—)BæT’¥GhFŠùÊ$퉚6¾Zb!M´¨»Â¢íï3Q Ù#g·4b#Žhd¯’ÄÅ#Tr‘kìb™ûÚÌ»´¦DÅ2F™YRö“Ãd30Š“g²ž êñ<#^‘šbK¡dhM D×ó4Pž‰"9†æ¶–YSd:¤ÐåMšë1oD´A•FćÐc KU>Hµ5!‘½”سŽJ'%×DVc1 „¥'úDÈ#F]“SÖæÏZ3dÈýV†1mƒ1ˆcÙÐÏÓ“³1 ʉ‘¾%/Ñ“#9<·hìíR6ž”ð¦c¤n5_ô„¢AÛ‰Rˆ„$Èf0’ÄÉÒøJÉÔˆSW׫±+?3’ÐÏ»Ì6I2Uñøo †ã‘è™XæB¥3'‘ã Ïhf ŒJ˜—EhˆA ¢{Iê2#Áì) „VŠC®ø½è„´5A4]µ!ŒºôEÏž þ ‰œDé|PHdBc D Œœ—Á6)Ééµ\]#íÓºŠí-Ý.Ne:r5Ȩ†mb’ž d’©rËŒBol+Å™~äj I…S¦R,#'D’óÛouNÕ•¤3M•7Üa"ŽùˆjÅÅe'…‹Ú;16ü%zgª[ØÛ ‰RVêÓĽ³+âêtb«JI?3Ïæ‘œbdEËù·˜1¾G21uèž&†c³7÷r?["¸` sÖ¬ÒTT3¡9´$ÉIùê$»ˆJŨ"d/\EC±ÈÎB+)SÙ¢¢ U+&RhÉG4b‹îìm‘F؇Dvœž2Ć2›«/)’§¤ÊÿøÉÅ¡‚NˆàúÂnÿÄ´?èÌòoÏoÙ†Dõ:þŽ«‘<Ìœî…Õ&ó È2’94§+13˜#JÒ£>*&ˆ&]Q‘Ý9ÒtTá 1å’UéUD§ŒÝÞ2K’z~X±BBH¢xÅ'õfc «'„ABêÖ³Dծͽvu„aù^ªÈ𮼩TÞ9í¢!ÈyßÔ40Ælž Ýjˆb"­¢q³"S¹ÔMX„~­I\f ÙoÖ–»b£2iØ]z‰ oFrbxË™I›-3+¢‘D—H˜këtáy’U@C:LxKld¶e6»éŽ~È…Ï"£aËLU'uE‰lÍtûØÌ$F7)—µä dÊ’LNèŽÈŽh z5ƒùŒS!£Ý«vÜÄäe©c"'55šAhѬ‚&^C®ôJ•&x¬^ÔLHŠ¢V¦3}vvb!%WR«gäN]‰¹9m-MI¦JÄbˆõ"KdJ¸LˆrEÅÊB6ˆDì²3 íµJ‰¢¢­Ú ·Dgå—¿|™6^Ä×UÃBc$è+"[}ÙLORéƹ|ãmoK—™oôÞW=úè_é.ä%M½$±Â3 ¥A Q‚5¬¤IÓ&n]Æ„2æLWPòæñ&¹þæ\Ç4¶•&ÍoØgN ˆ'CªÍŒ˜½!“í¬i…O„˜ÚÒ¯°eSsæd2KHNˆTŠD“þœÙ¥3—Äuz¼=DTµÄZ‰ŒÄ5•YMiȃä¯%%­“NlbrVeXc3)‘ºÈKE/ÇéU4Œêªž\GNKzLHäDC\Â;„¦6gÚºaq³ÿÄCx—'É™A"£ð“ôTF£mº {³ÿjaê´ÌáºF+£¤Bš‰’¡µ"XÈovɳ¦¶‚*IYó$’¹)0“S¶µ ˆK—YÐÛîņñWb®;©¥D®B¤TãÛÌnôtkt¡± VT©õ5oYï"JR}ÉéR¥¥.ó–Æ‘5!9Ftª›ÉŒ°lÙ#]».N4 àåfÛ!Y³IÙ¨ñ&ò§ÆífÒ›c;Œjε¶ ”0„Kb8‹éFö–(ªŠ–x"-Ú웵Á Æ'"c.l„ìÚ&ȹté2ŠôbpwD„¸gEÍ+4ÕQ¦6¢ ‘"\¥Å®^„&œjd×OU2šÌ†9´×“Í¡1,®–›ÄSwÿ•û&¹!”˶ì‚mP•}› ˆ’ô…ŠŒ{j’Ô¢.Y¢õE&V¤rŠr’´ÃyžY„¢ 'ä…’¢4Ó‘¡¦)7w††Ï¼”К·â1®AúövŠØ…ñ³¤ç~½«§G%^°OˆâJÇ­®°&†xbøüÚ"á„#l©tÆSI’Ä!¡®G#TuÅ»­úºßb¦ËúŸ:I¡’Æ LÑ:TfJÆ$†{l*²Ö™:{5DˆuðÙ\¸„ÉI˜L‰hXF±I¦‚Ù)׸‹Ø•Ÿ7~hŒkë7ñ©ºJD ‘†ñ$n½q40­XÈ3$ÌÑ—$Ì´Â#¿Ìl…bBÕœ˜¿ª+5k®-áÙæD~ÆÞ®!&„D¤´ŠÄLÀÐI9^jyÈ©™ƒtäÄ¢™â‰fm|¸&ŸiÌ_/dLUó"Eelâ·ÌÒA’ÚÄi æ%£3\&ÄÄÞy4Gš©q:ÝÚˆ±9‘áÝB"¡¡¢#»h¼%CYÞ”¿YPD¨½M¢‹QðF!<Ì¢&ó“R‰ šaoÿæ j„#V-uéz\ä3Mub£èO1ô"§#Rý/V#6^»ääHEÍ6ôï³Q¼4;KË«éü3SK˸‘ŠŠd1#d‰žâÑÊΜËrÄF*ÆÖÏyýÄ#6íÓ2¥Ã0•Ò(ÈÒ"H#ÔB:rèò–Ê€É=D±ü…¶17¤DƬ®Š„Y `„U®žÌ¢0²œFdÙÑ›ŽœÏXÈò"³6ί)P´¿¾ä!R(QtèK†°‹š “'Í"«2‡“´©[ªªÑš™´\‘Q¶SCuØ‚"ÌÉd"Êb Š*·ð† ™Ó¦Ø‹Crõ„D[Mî«™-ÖwÁª.ª$K ÆÄ¬S9«a›”š! TÛÂMÄ}Œ¤”|~ƒ‘ „ĉå{iêÁ˜FA³§mÚC&&ä¥#êX¦LG½ÞÌIýip¦3šDË‘ë!ˆ‰m*ª]–´Q¹¹º²:Wú•±KÎé–EKŸbŒF¿SÇ2"ÄvµbbNó".äž(î†7EL”‹j+*5Ö“5¼ä6ÞIˆbÒ’‘”¶Æ²ó1L«TC#± Ì…Ÿb†ddæŽÉ™UU¹ ´ŽFÝE¶;‘tÈa V¥8¬Úh‘-æoÈþ¢.ݲ%‚{¸…±þ†37a&1àÆ‰|yI5B¬v%Â7Z÷9cÔ#f|Ô¹VÓbj§„ÿq±¶ÉF©¶ÈðÄæìi‹–"R*æ‡e¨›µ ªäˆ¨nÜßúÉ£-‰­i ¯xDa=¨Í–©®œR0–_>{«ZšØY”•™cùUÊÊ’""I Mшñ.kÚ$ÒgiWÞUÄRQ.ûtFEÕ )# ÒöٜYÈÛÊmH[mzlj„äNýýQýXýˆýÐþþ]þ‰´ 8p¡ôÿ¼‡ÛDi6 ¾dUÈÆg¯Æþ1’§ýÌv¦Ãú QDtWK8´—çį̀ 'è„k”äé³Pˆ¶?­-OÓ¢Lf6Eö‰IdÙdÍ< ʺNsâbXÌ~^NÑlVYJ%F1‚3†æÈÊÝòÈ"Zб³Zu½Èõ í/ïRggè&mnü“ܰ"r+â>ÌFÞ*ì°‡Ž’®@ŒDĪb'DùÙ-¼Ô’ jÎ" \ȉº'õ‰÷WT…m‘¶ØaбÜ¥ö§‘æÔúâa*3%ÞÆ)I#*ê˜Ò)†‚ J&¹±Œ–W'a dµ6h^+DêŠ#vy™H½s;»ÌЭª+a¨JÄé#¾¶Úñ²ÎäK&ÃZ¶$"‰±ÿJA“ DLÓ¡*DVÎó*ð†,Tx¡û<*¦ÂÓQ4†ª™•ŒÈ¥ìÿvÓê’÷%¾T¼ßVÈÜœfa–Δ¦UŠ£³OÓ“q6tq_²ÿÔÙT¤Ìô„LÆ­É ¦äCäÑ ÚÝŒ–0‚yÊdBHA‰3ꘑ’‰$Þ¤*¿ˆ…ou~Í™iòÞ°SiIÆ‘ö13q£ |‚"U'Tº+fClÙYtT•Ú¿ã¦DɌ˜–®)°Nå5‰ŒUe%µ¢U”$ß)´Ñ! DÚ’’â°Û±ê|XAL/g!],Ù,…tCiEb,K3V¯Fb$ÐÌX…e‹dzÙ4lRš+Q$Œ&$èȆrŽŽ\ºõi¸ŠŸ´húÑ’{ÛÑÜiÈ3I¨HeURgRG'tHß3ªªTu ‘°´©š¦t$ÌøiJI{:ÏŬ°HÈtÛ-lÂ9ÍÙe F±®hIÇú°…÷³C&H‹ÏQDJŒˆ³R£-Û¨ÙHú š%j‡-#áq+Üb"»#šdµ±å‰èÉÈF ¹yÈÞófKˆ…WKUö‰§wYú“EˆÐ˨L—”ˆZB¬™}È%*FY“61¦i˜ØG9ˆÄ[pcÔl‘3‘Õë·¼ùsŪU_‰PêÄDŽ! ²R.(ÑvDÊ$&*Ae²¡"/ÆFøf¤°„ÄŒgë%HF. ¤ì[H¸=nò.—^µl)‹ØDE¾‰—v7ODMqL%¨Z6#¤˜f}«V¿ÊìíÆÜe ‘'¶ÂçVZG¨z7·óNÉ.ÐF&·D}*L?¼j×ôiY! Ìh•t%Tªèf’.ÆAš-5¹99gl“²‰£R²XC;]’èŽÞ!¤òxÔÑï¥éecËjl‘M‰vHcrtLz+$"EI7ð™]I*"T&ÐA)‰bhVéuäFÉüˆmSY¾gWkNˆ¹ªzÛXR20È%i+ ?²‡$û9„í–dˆM°Ü’Î4×±²÷dJ÷+ÈÛùž/#â.&Ÿ‘ ž’ˆÉŠi‘ÔÛ"T1V3{Þ2uN‰Y‰AR³ψ±%XÔ”\ªInI Lb–0M!Ⲙ™KŽM¾DòJÐÓ+Ud—›BQxˆÓ[cú~R†ÎdJ‹#gR\…!7– ˜—rq´K…=y¢KÊ–FØÇì'LA‡ùDÖp™Ð$¼.‘ê~#ÂT˜D‰ãEIá¢"1 0 RýûC¬]”Ѳ'®Lù1Ÿ2†•Ì@ÔÙW*0½lƳ_H¹ç…t¹"1ªFÆÂ[RÂ^‰{®“k¸T‰>V¤)̆շžã"DÍ!¡1xDj>dkÓÈ¿s%¬o¥–.¬L)! 1Ö³ÅêˆEˆ|f)‘ˆ¥67â!?$Ëca—öU•b.TNÒ‰¢ó!ÑlÍ’D²~”“/æ^èì™Â_2Öˆ¬âER'•MDhnH‰é¿ò3*üä¥B¢ÜèFT†ä'ÂhgR¥3f¤²ÑK:åG0Ö~11"}Èݶ:“ lb&„Œ­ÉŸçJíUb2tò–·%EdO„7Œ×H愊X™äAîrŒW¯È±cŒÚ’ • ”‡Ø†•>µb#&´™²<ïjª1•Ûæó"1b+4ÊšÃ[*[ÿ25K®xxã/êB% †KÒ eY”ޝVô”Ö§ ÈÛîÞßM ccßK!s£OñVˆÄ_1™g˜•̹!ÌGm¢,UD!ælfEˆtš"ûczÌjf R1„ Už¡ {òfýŸÕ…ÅT9»Nƃz•ؤÊ×!ƒa3!9¤›)&c¿~Y4" Hò»b#Ø£Hݤm‘Ü$Á ÷¬©o¦d‘xþM¢wBVhÊâ6dUfR{„ºŒòIw”óÅBA!“˱Ûz¶{¿Jæf¤mHX‘È—ïm4ú®þzÈ„ôŒf“VkÊZd©¾˜ÎÜÉ¥–AN´‚C&!.ÞÆU:**³”ÌÕ+y™´HM s! Ú¥M ‡Yê’p%âcô÷¡²Ôš’2Th$ÂdÎ¥ ¨ôÑ›’5f[ÒxùZ“4‚‰i 1'¤³Ô• ¼|â/GJèÞ’µ2büoD†1˜š‰dFÚ¨rÇbfšš¶$GCÕ¶¯‚lÜLÆ! ‚m¡”ˆäVf©Só“¥6$zR±#1IújŽK¼ÄDB,i!:)aW2b ˆÛ¬ ɤ"ª\ܲ*‰š÷Ä5JºwìC¡¤ð®E'êÉy#'š¼èÚKâcDÈÄ"-Ã!’‹Ç±l“™“C{Tùþ:‰IQÙµED¶v#HÌȇ®UV³ y{«dKW ZöÊJ|†@ÂŽC$ü¥µ’„Æò¥ÂsuÅsÕ|hЗMÍ-533,®ÙLN«Ý-þõ«/b©P†"·ÈFIa¦ž˜ÆÐHA4„Ä--¿ᜡ1ÁômyÛ‚}›Iv¹TüF‚%°°ª‹Q«™“Y±"äQ6íH¨Ó*3$©ÔXx—êHÑHØI&,åBÕØÛ¦lŠmŸÔK”M[§~q~6~)þK~”~únâZj¢Éäc9[éÇíÃ(Í*ܯŠ]#!Éåƒ;2»!Y„ÍYŒÁ–)'} ˆ&Î!à±^¥|„Äa’œïâ=ùä´m†¦!Óù”ØP!5M†»?,kªÄ‰¶ 2´·ÂóŸ¢ È‚R=”Tè² ˆ¦Œ’ª¿òË•<¤ÑlìX5£)–DÌDs{ɉÞ7—N ŒH‘÷MORˆÆÃ}‡K…?ê®MLbm8(Wöåµ0Ø„#‰¿×*R¨š‰jOyc⪑‚GN É dĸŒz³§^C hÛ|çÆS×Vþ"sˆLUØmälÒ!3 xÞ©PŒ–¥ëɈŒ¿¡;ÂoSF&3š¶õU/ó d# Þ=‹ñëô^DT"!Çâ÷„¡r¦0É#ÕNšf1Pâ3 o¦‘'‹¡©-nK˜?êlîðèˆjƒb_ùS¼c£CÆá¦¡o·­§Ñ‰‚n]ý ™!$ƒˆ"zgñY‹—ò6‰Ð#-÷"W\É! LŒ'çQšÈt!ñÒAø±h²ùzûLÌi‚miª7nC4°ˆÂ.ñWtER20åÜ„yPÚÍH`„¯Ö%c2|dÍbŒÿÓâ²"Œƒê'ÎxÔÅðÕ‹†©Ï^2=(’ÈAéUî&ï9†¤^ÊHL$±Jˆ¼U|MÑÑXY¦V®¤ Cá.êèl]©4ù$mtˆÓ¹ÌKªÈOYávstÛ 3) ‘•~nñëjTq£&MÆ™£Ù•[æ™X»Õ]ÿÂØÑ53¥œDI¹ ŠC`‘SleT+ÈòŠÒBhɘí¨È-Tf{Mc †u«q‹–¢X¹ÍcÎO{øÆ¿nÄDÙîBE„Õ¹4C«$$+œÄ“:"du@Ž„! kò4_ž¥MFË«û c5¾&V‰»,ú¬)Œj¨Ú§C7DïF%bPÒÔ%…Ö{g†Ncí1’%Iï¤GíJ[dÆÌH±Hñ-äíMJ•;ºö¬Mõ¦,¨F&"^&#edÃy¶DÝ21ê¡;tE¤¯e­v«ˆ}+q[fLcj´‰Sèˆë J¢*Ê‚§h­‘±þÍÛøDòV C"Ä»˜­]n½1—Vf4¤ÆL÷,bí³fH…;„í–;",¥JÉ¿V¥¢ÃL•e†BA}†! „ÂÅ­¢«TßfO33Z2V©„9 rÛ ¾›3.5ΔBDÕ ó]‡¦Áép–o „%”Ä+l×¹37T%»«‘Ä„gyôZ™ošYbdŨ%ÌÂEÏD¹6ÈŠÊVJ”œÔ\ðNšEgu4Šæ5j]Dª„ÈB²Ba:e¥"˜îê#ÕüÂDê†Êá;*©6“¢}D˜Þf˜ìEy›‘KÖÏi,L«ÌÝMŒB$Ú#iªMÞ®>ÍG¿¬Ä4̈²dÿb#vÏb,´á›ûIrÒÝŸ¼!8»¢n‘UƒTÉ„d+dë‰j"f¢O#¢g-¦«}ÒcRJ"~‘F¬Œ6¬‘–UNÔD";´ïÈfX¥R)9Ìdð)þLEä-2“IJƒªg%D¦+ô>ˆ2‰™9†ˆUhV‚l…Û3¢T¥³3gœÕ±±IwR½,è["Lw¡”„"&4lcœ‰F!,hhã(¢ÔÄÈMÂ&MÓ§ED%؆JC£²ÝQ¨TØ]‹³)j­ªš9*%µ¦2ÍÙìÆ¤ÐÌøì†¥¢Ø{-Ž#7icq&hQCb J4[#/B]ò—\ñU‹õs'¨¥c˜ƒ™«Ø•åd"hnÌ•ø¾{’’Lhb>&‚3Gt$dXÑ&þØiýEòälŠ˜„)2,XE¤‹±+1:3%—RyW± œM>V¹–ú‰”ÒÏ|gLé=õZá¦äëéñ®›ù¼M¦»¿®LÍ;dì£A«2äŒbúÔJDÓ /G²ÔaWŸôÔKyRÌ‘ l¢2”ÄdRÏ»h1—­ ³·°Rèéßµy›™•‰Øk½t#4kc%wnvŸ–­¦Y#%KŠ#19>"µf1çI>c¬±gS-J~êÙm‘±6ØJÆhFœN¹Ë¸ÏiØÙµ!jÚõ"‰ %A¶F‚A"òB3 Þ&þ•p©}§‰DilyfˆÕ$$B9¯Y^Ö¶#mo›;*™Y!šëi0&'M[AÕZIâ&-5îblHT¢bëáOœV×IÙ™¶š$už¬c)¶ѳZ–FmL´ÄyVÆÍ=#i4jþœ‰ÎŠÑ™ÛÈËžâÃ…½HªkŠ¢ÒÐÖ‘í[Rìdd1£6s'K'n«ÙDÏš¹&Væ45¦­;/½ïdŠ*jhS{Qlo7heh† ÉFˆjÝLȨEÿ£=(ùºFìkHõð†ÄU\œJ‰”èˆE+ë]ýÞ"“dˆ¼¤bªv HG’òcš|g’ºÄ²«55‘̹&©{9¢F­©x‘¹JKˆ”Ý©YÑuY©-ë1Œ&v›¿N˜˜ÔוŠÅ‘Y>Ý©¯o¦hÊÚBTì7[µ"yguÝQ‘™^j%·z©àÌIàˆ"-rtJRȉ”щûUG$¸„æt†¥_D#øŠ!À¨bÿøÉÅ£ŒNuƒ„uV.ÿë´eX“p£u︇'ÞLðªŸÕ•sÃ*GÆzžÙåÄ 5ˆ–ÈNI¤6J‡œ‘› Ü®8÷¶éLÍ»T$ Â"oŒŒM‰”¢IÏũȄ¼Vä¹LI•®vÌà j! WËj1²)73:¹sòlHÉZ²H$Á¦(µZͼ˓¬yJ«’JïÒdÌqPFÕH ¹37UÏWƼ“{A¤Ä)h¤o†ŒDò“nÂL‘ÈÑ3íé®Foi˧t+‘QL…eÊEI‰döÒHE'ñ ¦™©w2"¯uÓú#J½&„jOÓÚäª2ì¤æwõ]âþHÙVТb»®ØÇµJÆ2˜†‰šoö¼l*b+­d_[§,¶9ŒðJJ#öƒv fCl]N”¨T—ºV)þÄ™ÐÍ õZ0Ì!˜É¶vBF*ôÆ ­ÿ­MXRýk)3m©-°!.$ nH4ÕH2½Á5[ôá{æ1µMu˜ˆ‘b$„Ø1ª\Æ7­b3³a¸û£]g%ÿ¡ŠÙÑ4ʳŠ4I£¯³²dzêf^ï¸ÄNÆšüT"kÚB±ïäR1°ØŸÇÝ™€ˆÒ%"ÉmÈ•®Ú©Nßi1uÞš¼±‘˜HÙ/ÜŒÏþDE~!ªÕ$‹é¯–MÈÅÂB2lÖ1·9)›²‰†¨^è¨óxêºåj¤ÃgA§#„Q;ke¢úŽ$òݱÁ¸²52ã$•º„en6BJLÌ*Óµl³1äÇL†fˆ±ˆ‘!0BÞÂ&Té:ä± Ü[—&E—,l¸®!]˜l°F‘»Q9žCE:ÅF[Ølò»ÜÚ¢íDJO´”Fo?‰”˲gFëɳε‚&Í1â›/Vê+A/V\j“uðÉ l'>ªa2;c9!«.Baf˜ïÑ2Ea3Kj}‹t§›üdÄY$EÑ%×¼ÙéL5Ó¥`Ø„D!ˆ7Uýa™36»‹RvFÒñ:ᡯHÕù³,BB .\·õ·g&{Jh×fTÑ,‰ˆIšï™0jFi’ÅY[øæâKå'¦'F´¶cv5Q‘QÔŒ,Gì^½,…eðV¦j}„eHˆƒ4e–dä!›o•“âb!>ùš^t­\O“×J7.²ÖÓ1ŠÙœOj*± sÖ,ü‘9Èf"Yž¤7±Ÿ=³öf$«ôÍ3hCA Ql!çu7äfÅ)¨b Å/ù&bï©«vehû%a 9‘ lw°gi3ÅØ”—“;#šb ý¤ÖhbÝÿSM}d1 Æ/)ùÞ#§dB’¡,21¼©¢l¶I¢¬ŒßÑáº<ÉÑTÈ„ahbZµ®Û×v¬Ï Ã#SD4òŽˆ›ê™ªDÌ-TŠ©:Ø•2,ŽY òIM¦Èª—¢fǦJÐÂyY/cª!/{Ú Ã$Èå„$%Ý3:›™÷,±‘ÕØ»U›µêÝ9•’ÉB¤Åß)‹´‘—ÀA¢\D³‰U Ž^2 ‘}V2ì…K";vD^ïÕ7—ÄC£¤3â£(Ž­XÎèctm4VO‰(ÉĘ„ÚF4Ó$);w®Hk•Õ|÷=¹=V„vхЄö^*’D) /“¤­Ð™îFŒrìJîR ¨!¡"ù"¨"Sr¥¦•1Ò=3ûmȨîîÖ¦3aobúÔÉf¢ Èɹ_Zä’£ §ˆ0˜ÕiÿÅ« æBkê$E„G4¹ÅÙS˜WFâl?HÍ’ ˜…Ì1´ìgjÐFö+œ„ž>•‰›ÍT¢¥ˆ¢%+˜ž“¢‘-­”°ƒT>”Jµu¥DìIúÄàƒ2VOà“fx«„ÍeUJܱr“VƒVˆ„i}A‹ùÑ%VQÍrz¨æ÷ë©a†‰¯ÚtM“dÄ­äÛFF½ôt*Tß4Õ¶ÆšY·„fÅ­+:‰æ,ŽH‚T£FHÄIÆ *tBCQ"~…ú# -Û™ñ9 ^šgñ×d3MI²6¢CiŸ´ÆA–k¦g™ql|"Á•¡ªFè‘ß"°Ë‚&G]œšz¶ 'ظ‹«Eɾd˜b12ŒD6Ã×31•â âÑiZ7§Y›øºáHˆ¤U£Ë‰˜Œéð¢UG$ù¡ kYwЉº³#u¾ÔÓ!ºº à­ŒI1>°~C“§o]D´Ò%4j°ñ© $`ÆCxŽÞ%û|D©„¢²LK¼„F‚/YÈ­-Î/äÆNJc&)!|üË}–¢v½3›—ö–a‰ J‰Ýº‘t¤bB M ‚ÝôZŠh$f;*ú:wüü_û‡ùÿ÷ÏõòîÍ ÷é´²{¨~€3?2ÉÿèØ·ŒÄ–-ìŒ0D&4-C‘õºÒ“¬yg/web猞±ÓêØl5%K®H‚õ÷swÿ»LÑÕmÆ7'DNf£55­Q±¥†\™P—\º-¿ô“Á6GN‰÷] ‹N"ùÈ!Ž+“ Y?ìÎ4\ÆCWŠ6f!!Z›‘ÌäM•ü[ýK©”œÔݼ©ëس$büE¹b¼$FVÉNåcTÝ Zba‡iÔԌ݄M„½JBÆX‰µ²²ê!{’1c”U«Ÿ3X@‘ʲ!˜òˆ—l„2R)¶­¸‘"ÕÀEcË3횢A•ù5L[#cڌ߮èÍ#*¾zQaQŽyfú G“„Jl™ Äñ †Eè@ˆÐ‰sÆ'ß8†t-M´!4W7׊Sæ–³!ö™Š·PŽñiˆÂ%]„"ä6ý‰FûdFÑ»YöJ:&ÌìüHMª&ÙÔQ3œÈŠŽD#öBâb££#‰‡ˆ¤G"¡ñˆÑ¨DM4ƒ"™"-",E!e3"—¶¶dðRV"ˆo–‰jÞA©KNYÛýBbIÚ±$ÅBõ„B„4g$Mò¢^t©½"„$Ù†•ЍçKÚ¸…–M‰y9; ‹²[B¶äö+çbÖcT$f‰ËªÕ´OÎNm‰»"fxÔÍЊj’FìÛUÖ$:%ôý M5øê·ÓF@B" HÞ77Æ|XÆ Iwˆ{ X̺ž9†"‘"%ºÇó;ã¾Â+v„Ä}…¾¼ë¢!?%Ó'f»DkÄD ŒF`›´.~Çj%ŒX®´Òž{%R<žöÊζ@Å/™I ’؃ºÆQÒ ÈÆbY®Íâ48HVñ9sXõyvÝð¨iðïUtí\Â2rÊ"zQp’FfBa´Ù5ï3¡!„é£bEOÑ-µ#5n™ £²¿‰ ðÙùõÉ_¹UGß0Ì%½ Ü'µÇ—iØÄ&¨‰~iSeG¹¢O ›F°C3!“È?#©S2_æèw%מߟ›$tG"¤!!Ús1˜˜4FƒA™U‰ˆ‹ínÅÎ̃HL&RxzÒ'¨×H!c9ø\§‘•+ÏBÿÈ[Ý5LÈ‚2Q1Øä4{ Á!–NÍ èÏétHTOQDR¨Šøû²å©º‘‰*+³¡>jDeÒuÄEô€ž7"Ss$!³Qê¡[Ï*„Ѝ3îæÏ#5{ð„, Œˆ¤ºÜíHf›"¢@‘==7†Ó$@’\Žô©TËdOi#wMÔÞmšä.Æ"E.!ÉtC•ܬˆ…¶§Zj`›¡üÃ|hD€‹r …I{„øÄÂ"“”d9T*dò¥¼D&Ó6ä‹Ù„TR!-”Æ]&®g½ÑF¨HBDè%\tzub L¤Fƒl…lž“¤ÕJ*ˆBe)½¼­ß)–LÚ¥T¯—*Èc/ŒÌ¢ÃWÉ…¶ô^j¤áR$0ŽÚ™FB^œƒD¶uö7ÝQVR$,²­SDïS{ÄlíÓB©ÍìFMXd$dö19¼ÄÁ˜ËYÅ®ß|ŸŒªÆLIUò~R3ubÿX[AoxTý: JDÑS5È`HhÞ šc" ‹¢Huee ëÊDOÅU4x™0!´Âhø¶±¹¥Z‰'a‹¢ó¢±W JlÄÏ1¬^a2â1‰o$˜JA¯Z Nͺäf²I䞤åLÕ##j…/öiQ,{Èû=ÑèÈÐOÁ7E ID¡ ä"í%Q}ReDµ- "×D6d;© Š‰„é>vž;eÝÍIz™!W¤(›B`HEæ'^¶‰«)! :.Mr'>º#É*fÛë7\¾ß=H$šÌìJ |!žÎ‰?Ç$6¬ùù¡) iÖåÉ:Cl†dHß4oS6uêË]*-ŠÜŸÏtè‚]`¨ÔE MVJieM'ɈU¿t5HN6µfo:]y™‘ H2wEÍ{Ù˜¹QÙ"6`˜ïèi’lhAB|“/LJ\¼ÊU’±õO”‡Ú&ÈMŸTßˆŽ†fs(ßû›¬vŠä)ª.˜•£ÿ“ˆFTHÓe¬nˆìðH2*èÈÖ¢ªq²Ê[ÈJØA$)ºcŠÌ¦ý”—7þK.EJíš ¬‘´U02Íï©J°i§#š ÄÄýj뢱Ó³¥Ó>¢å”Òó2"møÊ‚bdô‡¿¡"óä„û°í1’˜Ãl'úós)ŸåD:WC”¿*+x­ó>¥>@ÌO8Ä4I—}Æ*Gÿ ÎΤ„1•‘Í–9†¤F%‰[{’ žz¤TŒ[×ÑbÛž,ІØmv$Ë'A’ˆbË;/¤Dø„G¢«bEj‰cY)OˆáŠÍ†í õkY"jdC'qç7h±ñ†y¤b$#Œz÷hJ{Œ”¹ÈÆ2üJäF‰1ØÚäìFDnÕ‹ úæQ¢‘-.lM*èK ÖdÿŸ<ý5™“Øhž–´f1 ÄH47ã)ª"§fTÖ’ÀŠ‚“3©{±·rh"ŽT#4”××ñ ÅÊĄڔZ‡6ṿÄ̯"Bk„bz¤‚7m M¸§Ï)’´2|‹º^WäR/1—7ÙãÄQ¤[ åêªÐ¤0„J<â7Ö™H„š¥4a2¶ž¥IsÑëIáT…ï·SHI¢i9ê¦R LˆfK½dîhƒ2õY–1°˜–}a!1®U4‰VtñLTtL‰ D·ûͶ r)’³†mjB¬aG¡³9ŸÀœåœ2ªE7á ¿3XŒ&3ìÌ»æ"'ñ­/"æ"~$A\‚H–ÏN±91uj%ά•]wS²4|l—‰)XEjjFñ„d×få­P…SЊé1ÕÌ&|È49XÐ#rP© ®Ù:„„t.äLL‹¢jâz˜ÈDB#<+itìVÓ&ÍKjo*4I´)#IYÄV*¶1½B™‰^,Ë\B üA$4P?z™fÉPÕZ™5)Ђª°J[éQQRBvb§#mºHȰ¤2uXœÄJžT3KŸ|™Ó#•Œ†geä ýªb4þ~ê+š&dÅ5›d®fäU†­±§¨3°ž¢µ¦V.êlbLÁ”Å•LUŽ@×! Bl¡1Åâ´¨ò5;t‰ÛèkXšOÂ/„55)rµ„­yc=ôÁBä•”©ƒ6\ĸm%²ˆø…1É[aáÝÈMÒEm˜‘ ë© ›fqm¥iôCiÐç4]‚VJ3D±»I‰£`‰‘!¢Þkêº'’çD¢XÞIY"#i,lmOâøèlkiû ždB^Ò°’ ²#ˆ6õ/‘Q5ʤ[„#9x®ê³!Œ3íeÝ•*Ò:7ÉrÅvÑ&E”ÒR§·èæC9‹‹Ú+vM+ǹê’+4&¤ÝÒÄfÑ"#2%IW<°£dUíF)Ž»V6f¢x§#A l$Šºšril>b)ž,HhÚîIWŒÌO zh’¬’³>WtˆdŠÝÙ"´•0¦ÂhÍœ¥II¢–ê‰P‡b"´˜ª9I‘'Ì /Dœ–|X\Tö1;KtF_šˆÕ² QîÈ´‰Á$}2þXˆoRË|¤Ãd™ÑRÈBTýJ(Ý>ÈEo ÖÉXgïˆdFÁ‰rB3tE¹™œ„G5ã­GB´A5=ýe‘IÔ$Þ2æ­Û¡ÍÛ£Ç;³b*DЃ•ü2"EÄ™ã<ÿá*¡ GkS©-œÈ‰Š„ÒîšbT˜H¬ùM‰RøE§ŒJ!,‰ª2’,æ_™‘•”Í‚DJ,-B12dÕo^¿'$|úBR Ú*œ’ˆ†fD­‘ÑÍY$}sgO.ÌÖô䙯bX2÷6쉔mV×Õk”…†‰¹O?†¨h®iñ Xj"7êM¤b¦1>'†¥"Ø]Ui Ø„hnQ\•„7ôÑ2zÚ6êNOÖ©Hli©†åBžu4a%±š¬Lš «ÑY¾dZ­è ùa1§fMßtŒ$ä+ ™¤êƒH5L†—ص¼ênmˆË'§C·hEþ¥"c™¥¶I‚J”ÈÙFìõb‘M„ šWa>dbá³0ëÜÁ#D+D«ÎÏÍ粸œ©fØ^Ó-[×21J4Bh—·b04DÔ¤é• U£6âm.⪑#Ë*TüŽ6m,Èñ¡å,â6ÛïÑé"Z—ndÂX$j],·¢#%T+L|óÃM¦fJFíâ’ Á ’×4LDiq:È£õv!”ÒÑP°ˆ…ùȘ“•†ì%™ÂB¡s(ƒ! ɲ ±¦È‚Ém°kÖ㹋d-ÌÔÚe²ŠŠ®*H†µ¾ŽÈTÄ×2Ôµ992 F3H§‰fÈËœ®¾Þ`E?ØÍÞ<%k‹I UV #‰-áoƒ ˆd·E½–™ ‰À #`1à?HàN N€JvƒØ¨¢ž\ü@ÇûàË"åyQS5ÊßVRº·‘Tȉq˜„OMpénE=ne¹²H·Û¢:Dõ6fäÌ1#/Cãj†4eHÉ*)Y`Ï´D6&$Õ—”…B|Ia‹»z‘MÛvm§âfôùq¶a0CÆ&ëN[7S’™*gþÍ-æa‘[ªÜ{Ó—R‘‰•šZ*M:Vg!¡¡ AdÔ×hŽEÞ.&Õ ^q­Þ¤†3364%Ó_‘Ñx›7Q•­ƒíîêÿ̈ˆ„M’{ZFÊmÂ%”Ý‹ %EÞ£©>dBD©²ˆÈj³ÉþlEÕIœê»c>RÕò¦=)8ùæØ!±¡3¡2-¨#a>Ér5Eˆ(‹r¡7"6$A) W©RDæo™-”÷R6ª÷aµ*6ë)Ò“sM÷ËÊ’’AÍåA'5ŠHÏë˜#Ø)šg_ëØ¤ÈÒ&†gZY•#òÔ‰WM»è„s§ÆFœ„’]ŸNƬAÄlÉõ…GÈ}äII“mQ#žfOÕɨ1‚|ÄRDúå$Ì‘ f¥ˆ¯¡ëDË2V1¾F˜â_/JH¤„¤™ÑW£ÕT…³ÂJbA³‘Q"¾ØdĤAšɻج§E% r¥±ÊDTÅ3Û~a4Â6ˆÓ;;9ˆM͉4Ë>¢»£3 Xh!Õ„ÈI„IPɤE3ŸÍ±K&ÑI5[]Ñ! õ¬’&LGÝë'8¬Rv„æÔÑñÄÂúŸ-D4B ˆÌ¹,NÙÚ›$ÙÌÂ1Ýv 1Ìί¬#¢ÜÅ‹BBLÑo#Û;)áÔÄ1‰&iYP’Y ¬D¤q¦"›÷±zd&ØCG§xc̈Xì!zY¹d§ÄvÖ §D„ÂÍJYA$læÉ`óDœvž’H”š\q.ŠÈÔ@’Æ C.N6IK.kd/¥.ú-‚I:c‰|“WTO¸¡˜†A˜T;þÕËD’ÍšÐN–FNS4Ÿ3""[ba‘ªËJXÓ«Ü„íýZMÐÅ'†¦¦íÍn_Á§¬„ÉJ¬ŸÄ¯¸Ù˜Bf&'Ü™)Ø„¹ÈÈ$+Љ]I÷x7ÎHöqnÅ„¬UÍKˆË5™ë´s‘A06BœŒÞòxÝ,EB¬~6¡KÁžtlñŒf®–CoÕ²ÄSB"«-GŸhf,%©æ7n¹(à ZÞBÒ²d¥/A´ö–ºæ"²6…·´ˆD,!¨‹c°^FWY®^•ÑÉWlh1¢•Ì—0­f•ˆÌD4C»žÝ³–Rv-fH¨EVâfRŒ¨ÌKƒxÍøÑ[““» ì6Y•ѨÚ1’’ʰ¢2d熬Ì$ú:±“câ2ÞŒIíB£ ·A¤ór"C(„ÙÔ™—h¬÷M*˜Fx«á¢Hø˜°µ&AÕ F•$˜EíÖK"2¦`šUÔœµåµŒDÓbJ2™ næ%Š ’ýïè„•:Aï´ˆ„,{¯ÑŒ{Z9)ˆÌ5bå†#ÇÅ›µB‘þ Èž±99#rc6˜ÎŠSÆéëˆç[ÑvìE)ÙÑUH™´"«¦)S®ˆÌ†5dV¢§ÂeE4{)„É?NÓµQ“‘›[BuÓeŒ¥þìî)#~M­®ADi¢Á2¥‘#Ô¬†S.kš¢¢ŒúÊ-½¢ÃFB˜XND¯RŠBhM„òörK¥± Räâm/³÷ Éç6°„6?LÏò3@‰š¥êµ4Ú±&O=ˆÜvƳ‰±x˜KtÆ,o’W#¢/öxÄyIÊ…ý  æÈÂ.tbJ@Õ:X$ÉS¿d™eÌöµ_Ej°œk<åÃèfŒA kí?ÉQ#‘Ñ$„F‘{{ù’èžg˜Æ‚"0›YfÑ+®¯–ÂÚ ¯¢^#!ͪԌԘMÏ-Yí¶lÙȽ–#ùU+lžö¶.I­ÍšªÌ+#¬.«$1e'E’"™¤½±%Œ3 ´ˆf’bþ°D•ju"34ëºiªå:+jJ‰Ip• ¦­³7e±‰´GA••Û¥H|‚ˆŒ•4ð­[ïr(‹ÎNT_¶½"Õ…ñµ;¤ˆ0ˆ4¬%ÆÙ¢v¥JÎ4Äù&…ÇšÌñ‘-\š&FĈ#Mɬ$Ö1Û4“Ì)"öŠ7D{Ñ,‚7dˆŽ‘_+/™â#ÆÜÉŵ*%ѹ•º^#“3sÙPä,ÊšÖë$%¯‚õÝ#‰²#t6Ùߤ©†Â Æy\—²“6É;äB&öJÚ2äJ×·%#)›¶õö:O,…œÒ\¥IŒkz’ã'ñÛæ¸Ðˆ˜M6Æ~RïHB.—i£å/Z¬’·™ÒGF92 ГKR‘®!9‘HÞ„¾R˜ä¼ß3±Zß+P˜R°Õ³ PÄ^ÙM"ZÊ.ã|µ^3´ŠEÐúê"0ÄFÄI´‘¶Vâ# ‘S,,;HE¹*2â§éf¡11bYrN±|’VTzZÕ…ñÌЊ$iM‚DŽÌ `ŒA‘¼©$¶5oªü¨]õTÌC‘IÝ)D¶ÏHb ßÕZ¶a5LSÇ‹‹“a<9Œ3è]â93ÆFÈ›®åJ”ÑȦÈ'\µ<ž¤ f6ÿøÉÅ¥žNÿ–ÿ›ÿ¾ÿçÿþÿøÿÖÿ¡´ÅH“˜Ëq×èàDÈŽO Òæ>¨f\ŽË]nÎÖÜŒËl|dÔ¶'¤í{ „MPDgÿÃTvs."Dßm÷'#»²’³®3$Τ²1õ&O™ã’äýeÉŒc!Y/$Œ"2xÄÑ:VnoÄn Ï…ð©'Ï¡ÑbAYû)6K¬G)/c,mÆôk±! pÊ$&úU!IQ²d"›¢îÉ¡,R,Ö~ŒfõQŠ3(I”‹4:•L˜fBu!‹YPÆ"Ò”IV}¼¾¢1œú£ {è°È½ëcvø‰ÚMôOØJ3QzvgR`•|åË/€Ú2´†_]¤þjNÙíg‹Dœ‚ ™£-Îq’"ÿ}#¥–FÃa‰1x Äâõˆiu3]¥#‘µCÄAµ×ÜÚsT.‚ÚF(‹„ÑOí%‚KêÓÒ¦,êÍ4vD„f2v…e:rO¿„þ·µ—f%Öª¦”Ë–Òm}ä%»ecüEÍŒIêÁ±V ÝX²? F&µ©/ŒBT«"áÒõŒ·übm‹”jÎXRG²“L­RÒõÓXÌ ‹ CH^Ù—©t²R¢’“L”D½÷õ²8žI£ Ò_ Œ|ŽD‚~r¢M%Q¤ú!7!ªTDÝf%Í ‘Iž¸ø¤»wB“Í”­¡#¢)¯øAŠ„ÐšX„;*#…„‰È¹“eô†ÈH½®Š¥Ë[)êcܦÎeæ.” ѳT'òxMMæÍF&äS¤vQ"6.2]"â­6Õk‰I©‰ÿ7$B#%ðÔ4ñÉî‹£DD ™ÍÙ„IÔE‹²¸Ï]“›dzrÔS-'„^\V#¡¹%NQ*'B––—cÓF@ÑIY¼vT}Ûœ’÷Œˆtìب™ûfN³.Ìr"Ï¥®FÛÝ4ªLÍìâQ2šÿœ‚tJ ‰¤í¹ÕL…rÁú"³±"¦øA²BuXÛ$Ù¶Ef1«´$bú؇vèG<È„|¿×_+M“­U2Jh"áqH”Škóa5UÀˆÏÉðÒ+gÇö9j­O¤U)9/O»‰ÞÔjYП%!4BÖô˜‚bV°Œ‚2¥¾\o"© .%ZDFCöJj[8‘ùXÌ2;-d³Âb"ßqŸ*Y>ˆL53¢Šn Œ1¶"ÓwO!&oV/­okÌ©šjœ†ùª¶98™ q6fóÒÉ™2·YýâVõÝwd\„È¡>Lú Ë_ĺ! Ù.!&¨å5±HœHØ¢S+-AŒmr]º)Š©»4ú+"®.j¼½М¦ªôW%dS¢Q$äF¹qXB5bD¦1²¬“B=—7f|‚RCšjñõ Â/9þÖL™¤z¬Øˆ!™¥r–²¡»1ˆÞÆ7l²!ÜÉr<)©´v|®ŽRQu#›tˆ#Y<}‘1ª"A6I¦±j¤Ñ/17W–_V)VÖ¬Í<­Ù—±¦oZ± Ò¹2´7¶¥Ù¨œ—{Y…Æm§‹þá32)•<‰ ð§úäI·¤†B‘ë,ìÙºdÂm´ D³±ÔNÆCn«J—lŽš´6¾J¢jµás1]÷qr“Ù|]k7L’²‘x·jÚlEo!:q22ѳD3³óôûäZ‘•“ Ó1Oµ'R}D/&I‰f.ŠY>XB’ˆY2¹Û42)ªQ°š®‘ò1c6Šþ昉&.dâÆjíõ¹0ÄcOÑ«Çé'…åI§‰RmLŸV:Ó²º&iês¡‘¹9 !˜ÄR·Ð6•dë¢á’g„©UÚ™¾Îtüécù]c̦%3#4ÓýÝò1—4F戃T‘ˆ×»ÈLäŸjÏ=ës“£T«—e®îhê4¬„1Žå?Z!™M­¤51žu_ëR2î¶T1£3qÑÞ!'g~˜šÿ›žÿ¦ÚŠžÉØl8ÛéóìÃ&uÄs(†øøçQ‘3Nf¼­˜%ÊQak"D‰eêñ“lœÖÎA)§2Âቌ?.|ªÊä|Bvª§vUGA‰Þ— ªf7»#"c¢æí: ”ŸGT^BŠÒTfA0¤d¹JL¬Ü#.R¡×'¨¯©0¨´èÒžC)žŠdc\lbêbKDAÈU;k8‚1ìYË+‘I߆C#$4t\m‰Ò£!­•ˆ¯Ëk¼vcôD´Sõ!ÔÆ@޵D5Jc/ Ùñ¡yÝ"3 ÿ&âñP‹9Üdp—²ÙÔ*Šw&ˆ„ت¾þ‹^î„Oh¾¤Ã! "Æ©eÚ†Ur‚f~kœW¸†­IØ……5&ª[ÂC ’4…„ˆË5!!M„ð½Wšˆi>±ßÄ„Cå¤e$(BoWiðØCzšº•¹]ŠÞ«t¥*æbf³u:ŒŒÍŒ6BIVš™aá1¬dÕ¡nÃT’a5\‚&aThÂtAaZ/-5w±Ñ×dL^«“.¢!3ZІÉB!^“£¿v5fÃB{OŰŒhÉQ¹4A”KEäjЩ`ޱýb'–a÷r˜ÅCÒé¬ ŠfD6B«0Ä4µIטn7<ïBæBk(ÆK|ïí4K#B75­ù™ £·%JõPÄITm¹±©1®S]vEËXІ3E~º-|¸‡LÚK¨ç[qSI0ö"i„ÈbsFª4d®B!vQ*5¹ÙÑRFELëd5BN‹Ìëé8µ ‘е‘;‹X„uÈ# Ô¤!Å­{a>ZÍ™£hGA$ðôŠÑÙ,Õo‚nL|Š‹§B-wÙÊ”Š§J­®©)tT°Ã°ÌB]¾Ç6 t#'Ï!¢¾y²’2Ê´éñÍDˆ„¨•nÕ ÚLók4yZ. ÚU±‰›Íéël®#FÆË^Ȉ°j¥$ÛŒ¥lú$ʬaYK‰Ð"6 I[xVÙXGd!QQúôå•ZræZÃ¥ÁšÄ)>ÓL3Æ3s/éY—$—>6ò®Iщj£Ì„‚4-g¹P^‘-&fÞ”¥'&­É„¹ŒFБ‹$1‰òj%ìÙ'T…¥'1.­ÚUñð¶RbwlZ”ÃTE†K&ó]“d‘›!Q!j¬F! =¯êº™1 Û&n²Òv¤|Šñ(­ òDÌår¾»Ä ÌÆ~HÂ= NOä!«t]Osj‘«åñÞÛ„3&0¥˜Ÿµc1‘FˆcËÑΉÉ+}›§ûÅ…yhi XV€Œ„ìA¯ÎÌ¥ÌPÌ'¨‡–Ø^Ç™hýmCEb!Âtñ—Ã$ˆ2ˆ„e¬›`ª¯ ‰‰©ùŸs[£Rm„îIY—„ÉŒŸ«ø“$k!¤7‹‘J–)¥!3S.ž¦Ì»r*!ÓÎH#«ö·71µ·M_éZ\ÚÖ!LœLÐŽc¥–6HoÈ®ž^xw]j4Ë–•ˆ@˜†¿.5*²ÛsQ˜Ÿ¡kb œÉ-±ÖjBBtGF­Ól‚§MŒI³™Þúéüv;äÖ4Lï¬4¦AŒbOã}~ Ñ…„%ÝQqÞLÝÞ$cøð‚7¦¦¬º†fAhÕÙ¢ÄTœ¿rþìŒA *{©2bh222'M$9]”—ïiz‰XènbFûˆ¨h‚ÔŽ»×"“ýMIÈìU+ž0‰Ò³#xy‘ެI!¹”Mo+“cæs7˜Ääuü±‚cZJ_æƒB›rjJRJŽrld&„ÏŽ›b• |½ˆ¶›\w*¨‚ Ÿ2£Öâ]R5ÔÛFx8ø¬e’§[Q3rÆN’µdV'ÇFã!¹ a GªY»¡™¡V©)DÆ"dˆtbÌHd$Ŷ#ª¯"+x'©\¿æL#DéP™>baR6Éa,!3/¥‡ãt¦ÂE”*ž×6l@M™¦cÿk52Ã%)c=)YºH°fˆk4„$3DÑ¡"M¶ÿFè$*E7=SÀëD1ˆWF&>¾™!+„A9»ªªa™®žüB¦U÷ìb Ú7¹}ä"6²¤2zE5“«‚a#÷}×9r„0†$rDw.Q²Äd5¥‘-úFA/½Ë $i‡Ùª˜‰­ì3R+øùÄ%Œßùoãb Iuø§9EÜhȈ»¿Ç”í0Œ×šTg¦EP†C3ØÚi#„òŸžc DCbuo‘tÎÜŒ2dBÆäˆ†¾úU«m6IŽj™ä¬Ý‘qB Ͻ«n!F:)Ö=W#¾uc!3Xª©kHª˜È‚ —ŒÞU쌈Ê,-Ï  Æcv‡øÎÆÄedTã\7È}Y†IV/ÎKXÕÎËß6̼MŠÚQnØÌ†ö“Üäq›e脞âÑf DS\Ž›ñÄ¢L­n\ŒNG[êz! žZÉâ•.»IHŸ1q#ZùkcY¶ÿøÉŦ—Nýóýàþ%þ¸ÿ‰Š†´•R“½ô/ćÝMÉÆÉƒ?"¤ù–¶“N•ÖÄÐÆ¤v¨Ë¦§òýñ› a£0º…ºžw¢jI£*£"0È×1"TvÆ6KãÕz'6¶Ú§>_æiIŠ„U±FgGú 7'L6¨ýЧ+1Y±’3nɦ6Ùvž’¼¢T¼"$^\D%©É„VJ—­ÐBëÙ ŒxL$+wœy´¤Kuc3'ov™ÎbRtØ‘V®’êDLd=ÌLLU3ÛØÂ[XUÄ#/Oˆ"D½+¤¥¦WcZ¶„TÔˆ3ì`Z¥.ˆEû(’ÉŒßvD Öfƒ#")¦R“Dû†XxB&wt15ïØÈâÒ/!r®Þ—´ÈdBAÖ_DèŽ[5&ÓcK’‘[V2*%qRGB:×ömÓ½"¼2‘wÄ„2âP•~ˆõݦl¸„ÅÎÙ²¼˜÷S(ÈšÑ"eÉ0^1©È•¤1¾‡5Ñ*6aZÛò$"ÔA¬N²U†ýÕ¦¤)ý"d$hâûÙÜÖº"bÔÏIŒh¦üѱŒŒ#g##"išˆÙÈ’œzìµtlJJ¨ûÚÑ{â.²£¦„èh‹l ùw$7Ö4Ä]£b+IŒã ×&b¾!¢Rä3)P7E-yZ•èÉ*Ä"e[¦¶ýJaaF#+wSG™d˜“ªJ4ˆ1žFj¥D—ý™*F[i›r"v Jê†Em„ «“dÞ¼}PÛŠÊšÄ#ä-™as:’ò+]´GRDЩ >û‘DfbB"‘IÒz‘TÌŠŽ„HýnYjµWÂ'BâèÞ¤£%M”ù ïa6ÕÄøU¹udzÓ»ÄbÔ0Å^‹÷ÆŠ# nZa:,: B"nŒuÙ*¦áB gåB›kÙ˜ïaSȧØÃWì°S´5bB0E½³åÔÂ&dA¾6ÚB4¬fLgij<ÊÊÝ‘†jZMżN¨´œ+Z"!êtúø„™lXHS)·Au¤FÕ³6™½g QØmukçK{“;Й*+,#ÅD¤¿S4 ›RdŒêÖ²‘îDTë /A¥ù¹ÓÖCBÆJKÄSBN+1¦¨@›Ç²œ²"¬ÚJÆê$ÏüÍ^l²¥#/Þ/^ýˆR%ÞéÝ-Á-g–¡ mCÆÜÂ~ÄdÉÌ‘üЊÚÝ®U‰HôB”Ï¢ŠèõÈ‚éjÛ”â[y2+[û+d¨˜†òÄd"ÕÅ&FØÕJò#YxQrëÎå ’6åbïnŒf½0ÈÒ© §“ËÑŒ›¦xÕ,R yâøš!PÚ˜¶RcDÔHD‰‰Ö‹¬• ·èЙ0jt÷x™•LÖÇ%7 „z–™?¨³zšÄ »éH&ÌÆé’Ku£"¨ÉÈUHišÕʩќ¤d£~'¯ ‘ÚQ<ÌÑ <ý+k˜lëU°Òå'y…ŒÄD«à‘+<ªFC4œÚ­¤A+“:>‘æì½ú¸Ú%^©ÍúMS%$PÙVDbcR"Ü&"²<ÜpÊ­ÓCXLÏ)ÊIîhBb,FèÍT#´»fÑ#§7dGˉU/N™B‰ÕøfB!Ûµò§‹QÔd»Ì’t˜™£}‘I˜ŽÛ¥l—L×Ņ¥© -Š­rÊÄæ])Œñsv,$c g1‰—*¬,Si$ãR<ù˜‘u4ùHÔÙµiRKDØN±ÌŽÊ»{Ÿ*‘Ö#VÅÂqUî°ÔØ$¤Ú²D“žökMšÕ²§2ÒY’Wš‰ªÌ­õðÄLb" Ú·iM›.rùŒbVjcT©d©ˆßýìürv$ÄwÐÔÖN‘2iyŽ'B1¶-ÂcQ¢“oì¤i4ÑI¨‚ù"îT‚D™Ä-Zü?¯ Ê2!c®#êI‘Žc7"\È͹+f$¢'Ï%7ží,ùz>.bbn•™òtåÐ(ÍG1#seŽ„v¿ï³dè=¸˜šÁëÚ¨X#™ ¤g4Â"!Šocç) b>7>TЉ¥ š%éTwB£oâ1‰‘r͘±]>A37'f&ј7»Ö+1¬MˆBlµ"ØNˆuwxÆèªØäJ©1 „¼¨G«Ù˜„c\6Lb2Û)LH"¶N¿˜Íñ[Â$‡•iÃ6héRj‚}•R$ëë¡d>G%6‰µŒnS«#vˆBa¿Œ2êD*TõLDÿey"BºµFí·d…¤c4“˜©Äo©BX·Â}ÂöS+6#‰c‘[/ [1I\ÌF:zo•j/LêD3蟥#ìšå³¹bæÉôŒR2dM×"ä+ĵ5DÄl†ÒK/äR‘#îBcfRO.R=H—´–ÿH”%ŠÄ§ºK ³¡˜Ëpˆ•nJEQ$ÿdz²£y‰gƒZeEöé_0ÔHŒèH!P1>rÉxí¶'Ë;LjÅá’é©;5Æc\ƒJÙ5LMFÌTÒUœÕ6²ed-ZK)†‡OS’ìz­é”\È®¬JΉõ¡+NoxͶcc:œÕa""•*p˜hh x= ÷éܨ“™>Ø3~ø26ñ ú¢n¢C ÜáfD£>>½‘" Ù:›+ÄBƒh‰jBÈDÅ#õ§×ÏŠ¨X‚Nkéæ…dÄÄœ’tL Ñ'1C}#®NìÓMyn"’³^n$VBḊtf]I¼"÷½ÐžŠ.]¦Ìzh„¢6ÍòL¸@ÂB:ÓB:2;<¢Íþ#êX!ÓT¹µzØk â®Ê×A–$_¼ÅëëvêbtÆDl›iÔfðÛ 1“ìÌJ)/3ÖŽl¸«Y­Î+²I°œ7• ÏÃMÞìÍöé|¦Lù1©Û ÊàÑ4aн9$ØÒdBV\Ãg'#ÝPBVÙ#¾)4˜‰l$Ĥô© >c¦ù®ÓtÝbÛ5TLCç„Ñb0M3£r ®TB@J—)6µ¨„Üxú(O oQv!#“²ÜyàʉÆ! :Œ!a- -A £“HÊ9ÉÓV •IòsM„ß;`ˆ¤†gßQªŠ‘¡Ë Ä’nEi dd„d>#FLУ&:bmY’"?­Ëå„/šdzBl,6ism™²E2&tCÇQ%r:MÑR›™ýd¢+N7J¬15o„bÅD[Ä7Ü‚¡;‹üH šˆ1‹òH®lB)¬2}¤¥弌.ÿØ«!™ãrLé6Y˜ÖjÌŠ„„ש15W Ìk»2®ìgé™3Ñ—¦OsSL†˜lhÂEb•¥,hØjFÆ>£#1µ‚f0ÄTZ—ådëíM"‹ý¢½êŠÂÎ(²„%Æ›bûƒdØl"'ÜÎ! ‘'ÊÅR!¡álåt­q%ŠÎ·J‰[Ùî•Fâv¨[ÉKâ›!±„˜ÆóÞ•¶”Ìᦒtb×eA$"¥Ì¯óÁÕ””Ey”Õ* Íé E&ibr#³U^DªÖ0Ú¼¤Òââdˆ”ˆ%My_lC!z>©R±·~$Ö)˜B~N‚Z–ü‰Rô†ÄæëwÝþ:Ó’BxŠm2çµ´ÈA32™D¤*ù’îÉ"z)ÏÇÌš‰JLo¤a²H%×½ÖN2Ìÿ©$T4šx#^Dh—N5BméÈì,QÝmõÖï²T…ãœUû&™¡M4''—0A¦4Tô†ÂN2’DVͺÂËÈ#9‚êï.Íåmó¯ªfµ9*#ËZGNh†ŸZÑÛnMÒˆ›(’³JBlIç!¢Éì©ØˆUts¿¾†'‚I_ñÒÄ!Œ†oñ.3 ‘“ñUQ»#½Ö®"ÜB'Ó¹$ПbU1G‚4ÈY Yñ&ñôs-à‘/7·¦ÌE¬¨IêhÓckú¬úq§–/®P¨ÍX– ™%[ÏŒâ%º×è“EÕ§ ”œ*;%btËË-†Õ,¤'ªn‰‰¤Ú§Ó ÚYJhÍ•8–1(ßVv-H‚IŸÒ.¨·ò+´R&T¥…’&I zBµã7É!+e¶˜FFÚ¢&JlK±½‚Bë∉Ӹ‡ÚÅœÄ#Vt]vVtE55ÊIW©·Ða+‘HmI ").2"†™_ֳÑcsS½+Ô/UT¬íçP‚DÕ¿3]90ÔauF¬›ÈB¾5íÌœ©M ™4øòêƒ6Nj,9)œÑŠ*â=cWtÄÄh2D4Ý•†}¢0’rÄaÖ·ÙYŸvìYG¢!:7ÊÏf·STRX›jŸ OÿÕß0ƒµñYš™ÖÆÑˆTr"É”›)¾ÿ°ìˆÞ´Ù!IR.dQ3/'pF äs$WbØæE¾¼BmHоQ—r²ëá´óCØBcäKsdnÙI¼¸Cf Cg-2³CùQù0Üøê^í*&™11 êORÀÒ5„»°Bß%–ÖJ1Q ·ÄlDY®Ó;ÚfÝÆØ¶ÊS£AZ–X$Ä+fÓ¶Ht0†ŒùÞá}ÿøÉŧNþ³þ…þPþýâý²ý†ý]´ÕB”ˆ·òßÜ—݆Yâ"³ •ä##«(¤w!RÅÈ$4!¿;²tåís%BItd#!“~MŒ"m2æÔ–E„ÊÄ»ÙSò@IùN’ÓG²ÎÓ]bíÝ ò&†gÚh†ýcÁ‘ª%Е«Ö¬$H…Õc9.>Ûg42“XRTó­Þ¤é J÷¿—‰›¦Õ +›O/H‰!‚'ȈrkØ—'Z¢ Þ‰YI:. H«›¡mÉáñ(È£¨´X¨FÁòOÒöy ˜Œ1–®q£LeE»m“XÓbeíÝH6D£åYìŽeîYª“95RÏ*f?'Öõj SF#xF Ê…ˆŒDŒ4!W7˜úåHf2tÎÓ~™–Yå%ÄÍ/ufgD\Ž´ä$¶fïUŒ„!•9 !Æ~“fBÞA «êÒ.ˆ‘¹*CjŒ…ÙÈZD})£½UäKHˆË—ÙRÖ_+$l‰Ì3D6‰^;Ö#‰Œ‹œö}W*"1†ko‰Ù¦ºÌˆBŸdbï:ò£ÛbU¬3µ)%Òã Œi•—7¤°!ÕdÕ:#±jÊÐÈDõNŽéʘ”•>–©ßÄ’®Q¶üÑ0ܘ‘³|m—b‘±É8¹T×oäCeë‚#EjÛ‡Š6N™®Eà·q$>%¥µ2¥N‹+XŒCBˆ±e6Èâ23.CE­È6Bt‚lW2>÷Hê—ÅØ¶U/_ ˆø¶}XA¬jöÜ̉R‘PNffo£‘µdJãÎvÌÆQ­Ž’ænýH‡gN‰Ô)4l¤ˆÙÖ•’d¡&Xm¢µæ'b$¹5RÆtxIê$ð‰!;u”“‘™ É_wðÕ£‚^I[¿oéPU¥©ˆÌƒ.ñÜŒÔhØm‹ÉÄöúm&D'’ĤÐiÑå'j’¡j$ñaRÔ¯áݽ.!¤ä|M‰HBÄš& È®4¤WÊÆ$êÂ6\dgq–Ìè•Râ!0¾ùá ¹Ó•¦øŸ×ÜKk'†Tt¢§dH‘^ç3±„„®GÚ‰ Ï¿5jŸhÛlÚ«ú°ôDE¹Ï|uX5« ’¡®˜‹D0†Ñ jÓ Fl—M*& ԰ɤÆ´ÚšvµyÕ•—ös~*ÒÔµH„yZaµwdl&†¤UFMŒé™+—/Ê¢P‰aX[ÊÕ‚]ˆw¼CÊ„D[ÅSh#Øš#/Ä˯KF‰…™ŠF&mܺ˜'òÖï ý„·²E8H2æ–KP—ZT#­î“»Ru”Z›• ÌV^Û†m…†ê#16!+®b D¸ÍTÅ}奸i¢;&3rs„†B "êÆfäþ"1ÙV‰ %ÈŸìÐØ·£Z¦/6ùÞLƒ)Ó–)•)&2}Ÿ µ(Ã}FD&TØ•¼+8n&©g‰YµÚÊEräÄRFDFT§¥J³\ž¹ HAŽGxœ6nؘµ[2õA0‹ _ÐËÒ4tè„f٤˥0š´#u™¢ñDÈ\æ]íÆÜµsXì˜ÍhŸ¢ãì†EA¥ºˆJCÕ4¢îžS!ƒ×­•¥1„gKÄÄW“hV/܉ó\õÈÍuC[‚I"9ªÚ„"XäDËZŠD†^÷ÖèH%r(—!±CÍŒI©Ù%ñ\Co#©}µÞ¤"Ã]Uäii!‚¬†Ä<¦a+ c"cf¨F._æ­v#i$ˆ¥‚§êªÙªÍ—O¬{³Ìääd ½Ù¤Bq0h—-À„%2Ú"º4¶ã-dFt«)dÏ“:ɾí¤î‰u¥âg °JˆIÿm(Fí‡M¢Y“Âéìé5I¦£!žÒJXÖz‚FŒË ™.fS(ÄàW@ýæ­Hš©ú=‘h’:Þ™4ÈLÅ$ˆÎÂ:t™~b2¥†Yk£.&½¿’˜Û×rdaM¾b*«vQáêÃtg–ç¿ ‰U Ô•ŒÉ£2F&‘Xfi„# T‘…dŒÊø¡YzuŠèº;¦ž¦RiÉÈc±å™˜ÀÆ­óäòAT™ñ+qjq*mF‰/úÒaðFÃD¤¶—¨i¨¬ DŠ¢³jÌaDX¦†g!ª½Õ$_šœ¼­Ðª«Ç+\EÜ’[®6†$üŒb6µ#`„©ˆ‹É‹ó4to]NhB)õÐNßT?[ q,&Ѽíy9*ÏÓ Í¶ÊÖD½LÄ5]}\hdã—XlQ §Ri½H‘Þv7^ÃY´f ·ÞJÆ%„ñ™:ñš€¡uîséôéHÌÏB4f’™¸ƒ&Ë6Œ$g¶!bÎGH˜’¢Øf|#ª.&û«^ä &kJY_×!…ì‚&Õ$õß!„& FÖ5%Mt'XFgq)SêŒû¦Z·.²&5%ÌŠš‘Ý®ú˜jl´V2­Ö0ñÐ×2—P™/m+fI8Э™—ßš›-Ž×vðšôb'uΗ²)˜C_±‘ut%SQ D¨ˆnšyUz3öÑO»§ädGŒâGΩˆÖ(ÝW¬ù’´äkNÕuM“+hÌ2s$6âttdDë ˆŒ¨ÌÉåTñQúA9Rå~"ò3\G2D3ndÊF¬òcb6XùV¨î%;5Ħ¿6Y„kYÄt ‘½#3r2úXaP†t¦o¤öf#F¬‹Zñ«B.[<ŒH‚¡HB4Q÷œû™:Q’£‹¨1,2e +OHÄ·Eb® ¤ ¦tNÒB«òìl…Øemçv!ª†èÛ­2‰Iƒv(•¼%dÊ™•‡&0ŸR2IÆãõ‹/„ä'ï"=«W»Ê…ÑïW›Æ• 1i„‰‰ZP„½ ˆ Œ½·]¦h^Ž~¤$M:)Ò_Ë{èXB&yS+iŠ¢§›¡_¢Â:¥J݈¦e%û ÍÓˆ‰ÔIšCîÂBس‰Ú•Ã(ú<äHÖ ý™±ó"îÒ™{,Mk9øR¬ÛäÄÌÑ£“£-$Jƒ”‰êÏ C&Ô…‚Å$7Ž34bÜf qK=Mõn™[ÊFš¿ö°B£üÏâº!³~ýL˜ÑQ ?! éÄfhµö3$\oë–‘Òþ·fEä¶?GMXŠ!˜ÑÛF¢B1N‰£¸¨‚udçÆ¯¦®FìDýÐÕÙu'Èô×è1•éå,K©oÆY"‘“4˜†N5&혎Ji‰´R"¹_uµ&>¤kBG…OH”›¤!—’j”ú7d6Jó”¤Fúã2¤­7 é¤%Iû›´«¢3©&Îܨx¬›£zDuc1½C4$±"N–™L𛘵 }ÎÆ¹Ü›C,KIñ–Y7Oö'¦0¨„–«6d,.GžV?Œ$1Jß4OI ޵—2?†Ì°ÚTI÷mœŠ”“dlŒO“:q ±;bwq¨Ÿ U’#Ñáa]¸C6Pº®‡\ÌëŒbûFE~ŒA£Q¶=Išê”—ünaŸnfɾ‚·SdÄR"BÙW˜ÂÔi{¿”ªêÚÑÍä›X0Õ¡Laˆˆ2øãCtVDÑÓsçWhdÉo e~ËTƒR2³åæ=¬7žþ¢IÎ­Ž²‰Cr$B’òâ:TÈj"5ðvX¬Õ$•õ³Rfí‰]+ݓ߬TL„997øD(„¤ÂE[Itf,×ÍŠ¦@åÿøÉŨ½NýžþþÇÿ˜{Y´4 ©tÆoÚ†F܈A8—ƒã䆤Ѱ½?ksÕghD$ßQ34¤ÄÄÝŒEh™¾ubýwR[$TL¼YiÈ ’' Œ FRÁ¢7/$eô©´D§«¯I9"¸ˆbD] qè¹¶×k‰Ó"š®/ïõúL©W÷FEÈ@Ž)¤ ÚÙXÊxL#D„3 Œ‡G©.ˆ¬ÎV¹•´­VÙ^5d• î×KÙgYy Ó2O•·"¼í¬¦4b F¨¤‘ˆ›HfDØÚwËëò}à¬EöNŽ}ÍY­ka™ÍrçÓn%èÛËLZ˜Éĸ#!2!†bv•Z¯tÉ) Õ\QÞéwCäx°ÆˆÝŽÜà ÃCÆ$#ašr¨VÂ>ˆW¶+sÛú»äE4ØËƒ “Ær›ÍÉ®®œƒ:£ÏÖLØîEÌèB ¥%dt6mª6dLÑïµ'¢Ú&Oi§’‘[·7¤ÔÄR"B *°M˜_ºØô$6½Kã'¢ž¢L‡ ‘Dñ3eb¤B H’¨Bl"ÒAþH!‰ò*v–©½rß„½‰ˆ³$Ídÿ*ún˜ˆ¨GHS¯M¢\‹™1!â/± ÐŒ¤ ³ Ó¯i#ÈÚ¹KʱŠ=…›©S3#H!ÙŠÍ™ І)4µõ¥+R6¯!ª)”‘Ä:Œ ‚– –Dæ××=îÞ]b½¯’^RÈ"‚7¤$ÈV¾¦FVjIŽŽTÝå?knCdÝ+Fmqbæ2IV}rhã­Êð‘71q½~dÍX٘ɱ³–ªBcÇÈ2J걧ψSÏÛ1"!¢¦`†¢¼äpȆ âí·2Ó#xÒKóͼñÙÓ³2á-j¬Ä÷õ3öBhžá"¿3”,D6Îìõ ÊÖ ±ê2 ÎE†è1ŠKîrbNÉ Ïiöù¡˜—Á9Ÿ±1wc ¾h—%¿<)Я…IW/™ÓXðšfb7Y¡„0‘Ì+XF­*ÓC%¥ã$Z+L…lVFBv3±÷jÙ¹ Þw{SäXw…¸›RE±™ˆ—T…"0Dº!›tFÆz#ŠJ­Õ1c¬©Nc3YÔ„]­ä!Ö”‘‚gågÐJŒˆ‡Aq˜¢²• ÉY>S3IZ·ìü!¡yÎF½ZÏÑçb%«)L„éˆTÞ\˜Ïa25#1ST_\qcÚÚ+£ÝÛl¢G‹ º)³bÛ›311ÈAŸÒ%çdPV¨3;Sst•ØÊDüg|4\U¤ˆG4LeÿÆŒILDhE#2#e É¡écì+*ß­nTÃ,ôÈ#· r¥Q ™™T•·‹•Ìi—SDTˆlZ¹QLfíFŒñ ¦°‰í}×GlýœfŒ#øÐ…Œ"ɼj,¤ïL‹&hF«ÉY-kyµ„„OaoÔÂ#©¹–T•±òò [R®ÚèÍ#%˜Â1wȬ2)¡¿”–Ât°•9˜}%Ê‹rÐÊñu‚! 7<Â7bbÕ‰tÜd¦ôtrôTýkvnÙå:1;dÄX‰"V]²Ñ“))/ʦϋ3Y…¨†F=±óØâv"FIX„TÔÁ-DùÍýve¨³|BBÊBDDË5~MÄ" ¥#76·dŠOÓP\òÒjM är;Y˜3\üe9"b1¢:#ÏèDÃÇmwä†äíÿ÷>MB¿„#VÒ&ÍI A²$ ™:ó+Y&ˆÄË•Òs¬¹‘jtV„Hªv1 ªS6Oy ž5q)îDO2A¼ð´$ͧäi‚VÈ_‹m]ž{‘ô§¶ÞÇ¥hʬD11> 娌‚ÌD¿ Í¢ ÎnˆF´ŒævCiU 6ˆÅÍ—:žÍºª¢¼ØÔ‡&c2ˉP‘•XL‘):ŒL§ÖÊjzHCY)"[\FÙ³©mdJhLR±«'ffwFTZ¹Ùl F˜Ê#“Óô§Ó%^ÔÖo*2Ê‘Ÿâ‘ä4ÌA6Ó6GâFå*!²LC‰rÅ$dMn}lˆÏÑ#V~ªDM‹ú<_Md!¶Ä(ÎÜRC0Ž3Ể)&‰ÓFeJ´ÊK<ËQ GÙ" µŠZXg¹c(†ë¤g1— ¨éDd0ÖÈÆ :"¶Îèýr¢÷^â4Õ"÷.dˉR úŒ5#nC.j"'B¢Ö)R±¾¶ÊÉHÎ4>ôÎÚ}µNd$‘7Ný#ü³üwünü•üäýRý×´ÕD0¾r·Û¯ÝIˆõZ2&„,†dJ‘qÕòR³§Ã"È«—Ïýè̳™\"KÒA-ïÚÅ÷„dO¡3tFÍF ŸGŠ2S:ë¤B:uRÈ暴‘§*"";:6Ò'f%m¥2iɈ¼W±“Ä2ÂrâÄ´—®³§z±á’§æÎ]ú¦óVÁ9:0ІVÄXk‰nS5Ù†•Ìòv¦5èU®IœÍ‰»XÐÖUøì–]‰¡çÛô³®éÛÚ‰¸†|•¦1¸Fd#c ß–¬m¿¹yoî2%°hÕØé \EÝdŒ®Gb^ÒŽº`š 玚À“æ1(§&îEäÂVh"UˆM•)™­¥¦Ê!”D_ —bÝ$*äÖà ‚ÛH»Íå9(HÆèÑjÔ1PI:b$F˜±a'¡'lÄ&Ä®™-4cùˆœ•R|ˆ™‡ÏUTúŠD#U®šTæí«b5†L@°­—j!M]¾[ d¤ÈÉDƒÃÉ›oBÇŠk²ÑÅó±qU>"#œžˆ$%µ+1Äh™ý[I?±3";Ok<7DˆjÂori"ùªÛ¹,w©ÓL>”Ñ»Lïë3)'1H$U!$™©Ê¥D•gbf눌ÈÕy!^ó z}W+XY HɤäÉCC3\¬tÉI˜LI~¤ªE„,³%F59V+£.ÅÉͪIæ*›väÃk¿ÌgËa7±;re¬HKUu2 „*<úuJ•¶6ÈÄf—»5E¤@„·–›L+›#!Ó¿-!ûÛ¢ —IhÜ™B"ˆ·V"$#;/&S31íEÓ.wéfEîû#F³¡>CŒS­ÉÝë’5~º4ò‹˜ÆLÜÆÖ¦mscÄBgkëtðC5²~ý;<‘½Ýš6K™)'šçÇzÂÂÉ"§ÛR4¢>4¦~Š‚ Ä$Ô‚Ó0²Ï¹–‰È…tD~ulÕ7É5—k|DsXÙ[a£òäD-UDr¤#}ñ3oÆl[PFÆÝ4¶Fl–*g^»£w$M¤2Ug±#Òd~¤g”$ÉæŒÖÜÀÓL³ëcJš¬ngÄ@L®s§"Bh}ªB!I ”ÌÈSR5Òê5×lNØê7Rž÷"Âz ®qˆ’ü"7|3KÎÑ [ã+jC?D®Ï© TEH$„eDˆÌh±¯G«gÂã±-+˜LEŠ“ˆLf§.c!%Zg¾ýŽIñÜDR²H"ä°j™ÂSFè ÖB"‘ÒêÎ)Þr¶â!E#š< C Ó"›±£&µŒŸ ™“B™-öµ[º±%ÐlÔEDeDWÛíÄù¾‡ö’󧞈ÄR˜ˆËSÑ‘g6MÜEH|âèÃ\Î'!È‹â¤}\R&·!ü„jHäÿ‹d׳ª"‘I‘Ù ‰×³+}R¥ü–î¨Èn’wr2t¹Ž¨”Ãa>CEfkç}&vfarçl­•¼ñ$ha5MCåV'ñ,¥OU5Ë>‘ÞZ'&‰å„Éxˆ¹GMªDbT+á(®ª’ú¤ ŽŒb“AFé_£Î›†ôˆmÄÎG<:tðÃ9&Ob£Ë9?S0»XƒÇA§"¢&G`šª.ee"ú¬EñDÚÃBbönß²ü.6ˆ†`ŒXD´¬žXøÌeËÎÍðþ³y 4ƧhJlC T¤ &u&¶¡}{¥gû‘>±2^×"$‰Æ¤r#ØêÑ`…âk‡õÓÒ¡M™®Ñ!›®d­ùŒÈô¬ChæN½ñ9W[§œˆÂC6ˆì›?èa.H%d„#¬*.VÈTÌÔ°¦BÐò"X#CvB Ó6öRRò²™^ꮕ^¶6¥MNÂD#/KɪòyHˆ1¢s(õÎ4Á5"šf„©3Ý:šB‰·åQ„FêýŸä51(„¨åˆo—Ïû’µXÊhj¨Èèë±42V½‘md4ÈD}"Qd˜œEòÂ`“Äy!RB£d6F7²Is”­0wFbg¨U”„È$E²Åb¬Gá["s’Φ؈ÄÌ'ŒKb\$q ´]W*Úêtßý–¢CENfL™—3F™Ë¹ SJ4ÚéÔ»môí¿f¾cR ‰òJþÑ«JIs£Ò¥O˜ÆMd}Äbî¼É!1’7º¡2™Wyà˜Ÿ'd[íkÝÙ“LÉÙ]ŒVÂ4JµW^A›ˆ˜Ó×eµ³'툕|žNN­+b£5Û™L°”ìtæ2!*“¦†«“½Œ©õä§¹¥%½ ¶h&ÌRb šxðº`‰?j¶Ò™”ª¼N$ÎNÓdÕá“\­ŒJB\,#¹õž$*Y<ØšV†ÉY¹45ƒÑ u¿^ë „H޹rE]᱌÷Fš®Ä„!üˆ¦ævt•+¢¬•k\K:brPœìÿøÉÅ©ºN.݉ÿ|þÕþ0´íB Àr¯Ý†gßA˜ê{²lIΑlƒ#+DV†„Lº¶ÎcQÌê]aº¹¡¬I7hß¡4n½\é¦åÇË’¤ª!âÌÄ -¬°‹#.¼#dø¬{ˆ2´_lìÕVþÐF‚ÒæZjœ•JÆ=¤FÒù·Æ#dyØŽÊ„H#¹º%dä; Úß¼ý£"i“©>B2C"32¹YÉ "Þ«YQnçJWi´©˜H›ÖþÜbVO41zT$BË©&z™Y¡˜ˆ¯£4”ˆ„f¹aÖ•Q¸Þ§ »—颼LŠ–gÈT´ÌlÑ 'ùñ)2%ıɤ‹¦„&‘º\Dß4f*eKUdB õ s÷¶9—VrV„LÚ½DmHŽ™«`ŠHš¿uiX“©s%N‰ðìHE̩޾„¦–GüÓDœ'!½w¿bˆG#\#%ûšïJ˜Èg2¢u¯1%bK‚U…„”CædµËÚó?5ê[zR· d•‘aM™²V,FÕˆëWtmîÔyò ØÑ¡Ql" ížq‰¾\Ñ»Ö'ò¢Ø" CKsï-A1‚WA¢s•ÜŽíLÅbÕ-A.ˆÞ‰$%0—"MË¿bª¤C;¦Xr±Q‰¡ŸR6k”4toa£2Y ?Tb.·CŸÝ­°Ø4E‹È·Á†ÌŸJX«[[Ôõì¨Ë•¤ä˜ˆÐ­ÈE3c!’(‹Q±HVVK‘Û¶\†ó¤2*~o¤U™QÅíµ+Go¡‘u但$Ô65¼ÆÓqˆ»™åa2¹ÂsúÈ)n1IcbgNþÎæâ¬Bظ½fm°è³’#à•†ú™µ 1§„ºÄÚòR\yò>½ˆZÔ dÍY‡Åì4ÄЄ‚" ËÎQQĉ”¹¬ËH—Õ$dGéc" ˜„”–$)¢%ÑáRý1->IÙÊ$>``ЇmQÐJL¨E"#%Tªc¸º¥+ ˜Ê‰c­ Œ½2c‘ ¦*ÄhÔ[¬^‰ÄìJæÊœtVfÆd¤©ê¬{8Äc.D‘\¨ŽV¹!V×FDB+ Ù!¤3ÙÈìÕªXëû«º°—*ä•BmljBîa FÃæqMN’jÅûß×®+“a]H%"vb|E6BIâÜEò!è‘(•ᔪˆšHa) Q¢Ä±ÉqAª,´„U^AQbA„öÌ2‘¢¶fkþæ‰y–1Ek‡Ï/ízj[/DRµÈIÚåhA†3J<•1k!“Q)4.>oäKˆ6ŒËï a ”uÄ‘E¨Ê¦ºÄ¤gw˜„õ0&±„¦DD­Ø'-¹Ró1†ü΂èõrôÅ5jh¦êWð•&È"BÍ ŒìtTBlK ¿ÌBjlÌKY¨‹mc9—™Df,wb ¾Œqu›mâ6Øç6m²Œ‚:d# +kHVY+ ªOóª¤"-2œ…Òqd3O2&Ķ•=L$ÌÁ ûdÍÜGÍ–(™¦ŠâçI-¹òÄíÉ1®š©-j5¬ŠFìÅÝ’)Ó,ÆŽé4b!m –d'gCÞ¸¸mS4cݵÞÍSª&! •™Zš³¡l&6¸×\xÃdÐÒÙ"IªêÆX/iò­ h9_ìOï)¹„ð„Œ½M¤”rôLš†—¶„=©Ò*\DB# 3"¢„Q'„µÖm¶S,š.QµDXˆ¹IÔFHûCLÆIjf݉òGgB¡ˆ1;)ÒÜ7.|e9 Â\…27Y‹Íæd/ÍL´ˆ‹ÚÙ^˜É¯„y)k®hÖÓ&¢[´$B`šÃÄxfcDdÉömÖí7Äæ2”ÏõÛEfl©ØŸ\Ü•&Œw[Í•÷6ô¬“\ŠªFÂw6×c$éf}ؘ͉ìòÇV'ä}<¢1;;‘É&±Ûg½­AV:â*ªtLt­ž|˜–ê”ÌÆ'„¨hÄȾ™! ÉbR ߥR2 ÜFȇKïˆÕh—WTh±˜eB¦F»:|i‘ç’ò3““F¬™DBk\Ë≱EÌML_$Ó¢m‘udn–ED× Ò‰!ªZ'µ}5L×uø†—ˆ½¢ç"¶TÄI²˜œ‚öDž¥Ÿ˜†2œ¶ˆFÞ€ª|1:- h>Ó,†ˆÐÆ™^å„¢&ŠÛ"£5‰·q«-ŠO [9ÈŠ3¥M²Ò±×‘ˆRvþ9Øš$ãÄfKjÌ´ÄAT\Âxr£2ÆÉWç»®T‰-5#t!"v%2£ ý,H½¼Hý¢eÙ爫Öæ!·rË©"[tBeóÊrO,ÑÍôdÌñæC!ÌB b™}—tH…jÙÄ´ŒRRTnÒtˆî“ÅÞc".‹³H³‰£!.—µO¡;F‘»W¸+3ýUéiµW%*TÌöÈDˆØ›äIˆ„4<ô‚ьԒŠÅ‘¸X)$C³b‰˜Ì|I^«=³ô=41:_ å!6­M­ˆÝ®›GjQ>–]½>"nšF±tf²TÁ¢¤„2y}fK YöLˆR¦%Ƭ#‰<ÌDM1¡ÚÑš}È›IG«h&7ËP‚¹ý&N£jlΖ‚7{óDR!•Šœ›Ù˜Y›uò‰u#m§o&­á}ái:%"¤*ä¶DHÓë…]¨FFW¨jdÁf}(•‰.ˆ€švˆ†ò;_X„2åQ'ªry²K„“t5©{mȬۈÂq;;õþ­óé#D™5V›Ì‹”B"FHdF¨‘µIÍ V&Ø‹³s.²› Ú¤ôiÒ°’W!1—z[fAû\xÂw²„–ˆhŠ¢SXˆ4ÖcHåmGxÜEmT×/k÷Y™ÉâŠt¹<Æ*+Y.‚ ™wY}ˆ¦5™ÆÜˆ›Ü{YÇ[Û!'‘s£.N" l]„4©Õ¡Õ­º2liŠgŒ„•¸Æ%h¤=‹…DVLgoJL¬º0±ýIð¹0”É‘HL•I›± ©!I‘DVV‘kóFt‚$j†ŽœÆ«¢L°L¢ »Ô}Ñë¶ö¤ïã¶ä©¤ž’˜ˆ2_Hœš/Rcr›¥q›£¨Ð·•+±ˆ¹­œ™Svã u#!?Ðþõ,D*,‚~K*!¡¢)j댂 —DêÆfϲ"m8N]&††îÓ§ÐÍ”h['nÄT"ÊrxÆ‘ïZ~Bä°NdªŒR£½UÒÁ;¹L„&‰f¬ìˆ"%S?Œ’§évÍ”ŒXÒãèt±*e1¨cD"ÒýßõŒOù7°Új×}bšQ0ÒªC­¡‘ ê ÛMÒe;Ú^WQU§SHGñf­=ñÈ”"c.SÚGûvb…ÔØCl˜Ÿ¼ˆ!ŒFÕ—¥`„gèFoJÇr*Nõ ôôMA2’U|‘¼!¢,¨F#`†gŸËÌÚ}uS11,ß¿)™™´„2Õ­!žf-åEs Ÿm=%éZ"¼æ5Éò<žÿU·I›L3c!+»ßÑ"bé&!‘I¯âY‹É³t´–ÝĪÓ7AÑÒ¬Fg2à¹È¨YRšš[a ÈdCƒ\äeè‘{%;)¯9NQxŒ"%,cfRfDÉ:Ö©—2/J̵EZL‘p—WÿøÉŪ³N‹ÿõÿWþÂþCýÝýýS´ÍE”X«ô¿Â‡݆T‹žvÄ‚f&°ƒW6R|›ïQ_™iÐùBB%ì„EÔ#Jovi3ØLcŠ”ùô"íÙ–ª–+Wª‰%Љ„¦ÉüTžî”¨—’0O;~‰ Dcw2d›²¶r¥N…A ‰7ÑUþu‚\k*ä–ÅüÝ¡œ–fÄB÷ø@‰|A$˜¨ÄJ1W>“‰XÚi\Œðd¡et6nŽ© Ùç&u娙Sb̤öª{â¡*4ÐÆ"4gI 9±²uRhn¶Y=©D·ãY Êk¬«*« yh›³Æ[‹™‘H*¼K :‰Z|ݰŸ1‰ #t$VÄ5èÕÍôT¥…bä,G¦éNñ£Â‘›ä³Äf¥Wã7>þ²Ó]oAR˜Œ@—D« Ù¹iѮܬ"㘻)úÁ:‘X%iÌò5ta?R#ÞHÚTIóî|ŽÍ˜‡Ö$+d–ЛbZD̈¨%¬ö†™4©u¥êUR±5½’Vµ‰ÇüŸgBxBÅfc[IwœNÛ¦`›Är~2Åy4¿¶‚hŒB&ˆ¨R6DUÜDµ[l~Šô†„,ädbëÈ}Ms&AŠˆÄ‰™'Q‘IYîó–$:Ä\¬„MЈâ6²™Š1QLfV˜ŽÕßœÞd*G™=hHYÑ‘IèRˆêÄ›ªé„üÑI—«"ì*ëöÅl؉vjå\f3$•2{Y;ÁQlÝ7Ú±¾¢æÕ„w†Q§TˆN­7ú*!ËD)áM£ŸêN/ôf¸ŽÂ(ØÄlH„&©U&´LË&¹ÖsähabV©<‚iZ¹&†ª…$óWËÇN4– ‹×çBì2*´Ã")Œk„|šå—vYXIŒ,ÊoåÉé[2fI6ˆŒâ ùHOÖ¢%¶¯õ«}’#­'ÐùךÃ*f ˆ¨Œdš˜ÈbeD¢7µo±¶_*.>°’ëÕ•ˆLNz†ˆ.TÒ"ND‰tF"Õé¬ð³ úbH! ŒF¢$H!9¶¶²“vv~ýy6›1^"Uq.XBBJ£3o; iÏÆAV«'x‘¨»[k^—,b_ Ð…b†%6ù+¯%’ d“½—Vftňdâä6rÂB7µ˜‰RÌ‘ßôD"_VîˆÑ¨š:ˆ¦&|†éBTÈ ¾3Nš©>*62vè…±1–nÊ„)X—u2£ò=6B"­í¯øL”’þš–bD|ÈîÝSÉÉ¢^‚ Æ2„®I™X„dO0ÄòˈWÕ©e­é|úø¦"3NF$e¶L„1äRq/XƒUÏ tX3Å¿² Ô0Ö‰ ‘‘‰jD½Uv*#êZ“‘¸×T’CxÄA‰!¡„汊Òx_’ÉU³êš®(„$..ìȰNaM"29†k ‹£iÅÑ2Vâ3cšÃ±uA"Xv{D׫ÏÉZ“©õ¢f°„YL™©®¹·‘ˆÁIÌD¤æ“Mɳèg¦üʈ©`BK擱Ð&ettÛõ÷ؼMÚ! >_&è‚Yû2]¼5jLÎb1Ý-I “¥iQ2¡Iïwe2£]HOª"¡Lœ¹I†TxÑw&LSË ôÞRÅ‘D¨Û’ÓSI‘›‘\D›T_›Ü¢”&i²(Š›&¢v«Ì脃y\ª©µos 9q)ÄæÈëL,Y³l†ÆnÌÄMMO¬ÈHÕQP¤Ñ)S|ˆâÍ{*“¨HŽžÚŽ´£eZs¦H›C$YF2dBV¢)¨HýùM4˜j‘§ÕQ3ä$5tÕ³|¾cF4M"±¦^ì\ÌÙº^Ø» šV°ÐûFb Uªµß­é»ó6HíHh¦ÃíœÄ"å¬mÒGl¹Ý ——§NgEÖü¢„Ú‘Òöm½¸ž»ø3WÊ¢Z:nä™$!0ƒ-ED3ýZ±Œ¦kÑlÝ_â±x™É6ŠmNk+U#a£]J]Êœ—ÄžÒ|Fi’[‰Ø6b=Wüf.ñ-!-}äGj„Ï]sWžˆÓrF2}P̦ö–’¹22[ï$lÎLÏ‘LLo£$'y°Õ“—)S<0‘£ªö6ýiIÄ».3QGiЉ„"±UñvÞ²0Î4ºV"E¬vD:a3Bê¶ý2{m+EdÉd¨’Ñ£0ŒÄôfC,ŒDZ}ZžÌcuWw°±"0·:&ͦþS1'Ø"@‰Y!LÅ7kÌñkÊAebK=&h%Õ;D¶GÍNЍ²ã'¤ÍŸLfh_v¢&³¥Jé*Å+%¥%é*%Ì™¨¤R·6¸’ÎTÃq>Í­k’5ØB*¥}ö&Û ”…”â!Z¼åkÈÆð©‘|&Jvj×Fœš!39¸™6r=G¤Öeff$VìA¦ŽÝ‰RCZKÇ—N÷¯Fv¿H3æzOÈ»3LœÌ"Tºí:b 2׺{—&)žgm¡4C4ÌhRF¦]ûNOwêo-ñ3Þt1ö¤6X´‚Sq* ‘²‘Q*ôJú\×]3HFM3j%ù¾nÕ¹r%ò¢©[M•2¡j™1£¡"*ÆRDΊ‰5èž4dòjÛüÃVH™ù³ení”OhÚ^ûcü±þJ ÊZ˜mh<ú¤'±Té_‘ Ï» ¢z‚M½ywB0d‰ ›•}Ú'DlE‹giúa>Qˆ%OŒª—Iܪ´hmБÉú2_Qˆ3æ5JëHFü¥&›1°Ìšfš‡,”¶a3F¬fH/ºj3lgˆ•¶#üÓ5c—9$!*ït±çýŸÏñX†fÄW$#âåäH&ËUÅ"!Û¡!mFTEý`ÿÆH–öŒ%2Z$2Œ©U¬$ˆV± ·lÌ„ôŦÑ*×JŸýÒôhb ÍÉß1o«2ÎZF&§ó#–hl‰5Ú!„DV³¢ë ë2@ØÄˆEOù™U«by7QÆœN–èD"ü…§Ïû˜¹ÇÕÒ¥&jD B·!¾„#JNÆÐ C|“]µŠJ›ï“zG,*g7N};·N¬ŒŠfD±>Ñ;_ñC'2!wJº¢æHlÛ7ì¶Sœ™,d¸OO±O–+ajq¡‘t[-DÓ.5†1±ˆŠ7ª°š±·Š™wlª'NêŒ@jqh„òV+âÌ#D"öFvmXO:¹%ò›f-¨BMRLšä4¨ð¬¥r®Ìé1¡¯Ò«#3´my‹Pb'ÿQ®ÿQ«GùK5õ$u™Q›&bÃ^JÍ‚~Õ¦é[kRÿ ‰¯­ÛbS;*¼)ù5ƒ1·B2Yšêt`¸±ÍL2¸—Ëa±=©oœhI411aÜbJˆÆ4ŒQ"OõKù™ª¡ÙH¹5ÇG«#èÓ45XåF§|ªæÆ0C2ƅˆÕÜ‹{xDÒ9 åðІ:vІjìþ÷wL™©;6…5˧8Í©„HZ­„Š!ŠTø!4Aµ#ø„-ä_g‰°ª$xw$DZ•eeŒƒ©6jjdj öÒ}ñ”Ͳ1šúdzQ8ƒ&»¿u³Ø‡lB*\±k&'EÈé½Åöíàž[ b$ȆOi‰Xgÿšd-Ìfë!ˆÕ}‘¡Ä‚”AfМœÜô¿Ý.“JB³14™Ñd'JßvR=fdf©õ² f7"üþ›#Mêf…ŽK•oeGDfè2LZ$©ÿß9æN‹ÆD]ÉÛ%Òp‚! Ú©š²¿yJ@ÐË®ÝJ™Þ­jDHÒ1ź6ÌE!aˆÑé‰äÆK…u3%D„jb-;éÍÕÛ¬5½}ŸÚ& ‘HT\Tbé2m’13vÄW)ê,‡#(‰È´Í£þâVÝÄ)Ý)$gRkRŒ'D‹¶1ç-ÙÓPÚȦo~—|fRg©$R“³kÔDE%5d*dƒ{ŽÕ½¯j)+6¦óô'$T%3\—JjNö«j–´z±+Mâ=Ú2Ô¨Æé(Ý[ôFMXdf°•*ÈÍ‘k\_æÉ'Ľ‘ Z°¿I„É ŸÚBË»&Y9½M8‰šâÚ†"P˜È#ƨMQ÷B6dfT*¥%D„Ç;—'XŽŠïQ ‚“’^ˆa""aÓ’®$Í6RD¦lbäÆÒO+šd)2.YªJ†FE/Ñ©tTÒ%o—çKa„©¿oZá5".¬F#²’¼í +™Z1³Äþ®Ñ“²GwŒã%Tä2I”Ù ´ÑpLEY Ëó§¨Q˜Œu}ˆHåÉ„Óc3dí©.äÖ"„[ÒÅÆ¹$œÈ¹´®N&X¬Ä1 S±¿·ú“YF©”^镤HE³¬B«BCfH!!Œ‹-DH*ˆ·v"ÓZ‹¿Q·žJ̾#Rç¤f$ê—l#´š&"¤Ïˆ±—Ò F„*JfH¦'Âl"?R•}žj&„/Å’[¢ßhf¸¿6™ÕI‘!ô&ÉW|‰éF¶ÃVÉZÁ½Ó‘i5ÞFbM’J\ë|‘¿3“¤¤*Vz×f"6í[Gh!‘¦Šh7„”ŒT«|Gh¹É%ýå*b!6‰nlokÑÒ¢G&Y$„4Mzg“ÐŒ†txÙ6VqÆ»U«H²÷ÔŽÇ”ŒOíÉ ¸Ýøƒ!g¤.*rU9Ù1sÝzXÞ£¹’")šˆÊÓ236¨v$â*U‡òs;RU°XÝ‘ZþÉ1“Ù7lE&.ˆŽÉI5rî’NCrLFf©®6™)ˆ" )Wb·Ú³ªÉÕŠËYᎷܙ9Qö« 16dFK„”$d“,µ­é‘›¹ît‘kÌ„©]uR †…j±¦+rЦVÉ›MʶÕæNŠFÓkÈdæFÄ&Ä#¢ÍSxоÆù#²R'ntÑ÷ëuLˆÈ³FNGšEl5f§õH»íÊE·.ÄhG¤72™Ò™™!´û4È:÷7ŠùY&NˆÌ”غE”ž5›„”•g:-P“»øÓïŒ2íRÑRbl# Z£T¶F%ËY=G‡òâš2O›eIRs:7°\˜Ò%æ„wŽÔ›X™*[¶+n#!2µ†DÕþ5"VL'M5×Ö*YÕ«-CÔDì$Ò:¯oÉ ·&ÄMÚ³ZÜœ"XFhk–çié¤F»¾!ɶi-P_‰ÿøÉÅ«´N<rÿ³ÿþ{þýÎýµ´e^’Ãt¿ºWÝD’nê,¨Ýˆl¥sévã&»×c·e$Tb6±˜o¡x0„ib{êòYN’™ú§&©Ÿ4ĵí2vIÞNèTLŒ´Î”¥H$Ò9ŠGHˆD¹ä @mfdÇ”DB¢£Q*ëuZ¤ã¦i È©¼É‹Ä‰“©³fBÅdØ•;Ôþ9 ™*h,!9¡£V©ÒR¤Y¹(IbŽŠ¤% ÄÐìA[¡#kâ™"²ÅHŒ• le&Ðu³5ߢöÈ@‘éI$‹fn%dèB$\踈¦Ì™µz"ÔënŒ‹)r¶ÍÁÿte"KÈØ†H}BôÕ$eI嘫š’eLêlÌZn#*“M°’DÔÓ¬)½Fq<‡TT¬zKJL1ž)²Ê6Ji ÕIt–*h%oâÒfFÆ2ÕÊ­Î$3U"Α‘újÈš‘}¼‰S"¡ŠÎh&$ÂeZÖ¶HJXº7B]±NªI®¥“˜…KF\©5C¸x‘£f Ëw»¼mI³Y³!ySöE0ÕðŽ´ã0%Ëq´åLK#r6bJü-Ù¯!.µ÷”‰ö! ýÒ͉©$+nˆÉ´× £iˆ¢[^©»a—er^ŠM{ÙãSd«ò˜‚iý%¨ÖVÊöq Óvûz4´Bfóû&a T˜–¡L„D{$vCË{f5Éqæi£-3ó\eIŒäVnÛ,„ÅVÄ~VÄU^d&cÌ„¢ÔA”Ø$阦FSîNÆbIØøñ;ˆúБu¦¹#^–’hC7VÃ4L²ªý¬Ôä—¬¦®Š¤&B7Û5š Œ$=ÓÉoÍöÍ”DH‚ÝÐÇvˆdú¢’.Ó^ºSmZ¦U°D¸éõrd%–XM³‘Ó$蹃$&Ÿ©{flF_Ú’ôäo¾«7%3(›7¬ïV «}|„ˆ5ª(™ ä“s6D©2NFlÊÑb¤#’ÖäÐ…¹ðŠÐÆÓ:]¢]; ZÖ“.‰‰ ½!5<ÜÈt ˆÆ„de¤Ï¾êÈ"(‹¤Î¥ÌÐvH°¦BL‘å°&†v´Œ‚Ò îLÐVd¥G“Fò£ú¦œ¨LÚtZ`„¾ÖKÙÖ›õZKQ?µ¿®© ±*1®Â"‘r&Jc[l¨Ý%ttÒ#Ľ,Õ¶‰j¤|­¸"B(•R«UÊ"·F#|é..VHOŒFÁ#Ruúâ}+ª 0‰uªÖùà›æj3¶Íâk걡z4d‘Eš¹ê‘RF™—“ÿJGŸ´Øh²hÝHo “D2ldc7;vë a”Ie]H¢Äk…tW4|oò‰¢ÖDDDRä!+! 2í«ñfÎÂŒd"øŠššSm³›´&jAÆ¢º:“’"žöGÕu®ÉQ¡ÍT‚"!œüg,W ÄJˆËK]:·}¦Ff!i!(ÐMuDÕ Úãkk)J»²äc:Â{ñ“ÁÄm¹d!-lÄ™´Y|Ê„‰œZ6k“èîZJ†cLÛ$$T77<ì†]D#xÓ²;¥}i$‰u¯²‰ýÒÿØFb—™9 q²w|ûâ›bdŸJBvÝ’“ÕDÝv˜Ô‘nÖVt!1³?Ž‘Ñ)ŽO|ÞÊút‰š^AÊéó1†ßÂ×h$b2%TÕfñ*7ryX­ÐFõY˜›Û£XjFÒ6VÙQúi×Q½‘$¯±ÚDÓ¶ ’VÌ&C2UérP»«_SÍ—¸\~MSÈÎ]EæQ†­q± I$­‰Ú*ÅjeMHNÏžŸkŒ…D!¾!¢þW2’ëK“­Ÿ'ºV¾{ ðÚrFÉbQ©a bè«‹–£ å:&¥ƒ"ϲs•\O„Dâ׎¿¤sD"‡fh‹¦oUŒÂE2ØEº`”…txj‰Øg~&k~äì¨kØ„„û›Èˆå2µŒ¦¹mb 悽] í‘»~‘ç/‘ ÌâÞä*&1:•YzC Ù±‰DõÚ§¬µ’7¥»#¡òý–‘ÒêÝÈʬfZ[1¯°’õ»ˆÐ©ÉºÁl6&Þ#1¼Ä&ø¨D Œ2"ívdR)"ZRÔ¹7¹’½î¶H’ty.‰箂ZQÎNz¨Ìc44&\# …,•*3a"̺U“w·Fb'[b% ”ÄKóÒRÄ5×r ‰t¢êFÕiŒq+Ûi©5hö´“YœµDÈh„‹yë]XD4„]šÜÊɉµˆ2$ˆÕóåÕ3Lm6ì«£E± ÈÛ?Žþin˜©}Šß eÖdé°dÏQnþÇ‚rTJWš'I!X¤Ô‚>Ì1DÛy”×UDÞ²Ný#dû#§£’š=œÄ.†A U d26GB3Å!»ãŬ…™ˆ‡š›"6ù)¦j#f›'‹ŸGBè×›XözÛ’Æ!SÅ7lFœÙH†¨ò&w'ˆë^ÄÛ$ò›6ziäeeäfÓ2×çK¶|»ä„bî™"Ê`ŒD*Ò«fÇÈ"ø˜K2 Ò-b(ŠˆøÉškvt5nÓQ_ówiZ6©âž5#­†kÉ ›Ö!7†Ýl7iU¸´$޲Ä6Fkñí#Ê”Ÿ-Dè©6X¦ŒòÜNŠ]‚2fˆõ#'Œ‘\…vN”ÙwvDàÐ À ` € P`àkAåV1 ÷,üÐoýØeQ:ÂDGGr2²_~…ßæb,9ì”BHŸHÁ ‚LÌI!R=¨^“r–ßÙÃC³CøBê!ŒÖŠb µ¨I¼vtéÅçGCd•™bl„ÄL™ò´b2ä‚6E³ãÛSLR¥vÝyeŠž„ÊÌ¢26›LdæD®å&ÍîiaT¬0? Èu’Ê®A3ˆtt1¢Éç¬$J&x§FðU¤‰šÄ‰HÉWÔ„YîÑq[¡ £Í±$N5,I5*!¡¿„25ìM¨®æAžš#Úæø®™ ‘­%/Ê¥.¤Ì»¢W"*ßâ1‰›´KÃ0‘1ˆ‘96…ó•œÎeÅ»_Fˆd£|ý$i£&ßô!%d³_e–”¨,¶N3#JFÓja²l¨BB'» ÁŸ÷\³g¯HDÏbÈ]zÈ”ÒB5KÙT•HæB6á½ýð_Ä"ÜÌÌja¥–â2 ñÓ$MŸkäšgeEìoS›gNB#;  >E'Œ…"Ô±N•$ƳËê,z¨@È"Hv¦ò¾j—»ˆ&„T¹7Wåä"éŒ7‘Ñ¢¤@Û«•>:RHLÝ­HF††L®] ,·ò]ɉè·ö¹dHL“dÈ.ý›+e‰qÓA••1¦õíØ³ss¥¤ÌBJÄA">53CA>|+>uuCÅV$4dÊEA%ªtVvù Ÿ„A‹ªIeʲOÆ‹›¡N!¢!&a OR‚18M^RȬ·’¿êuåëÈù5äæ&RôÉÆˆH©â°Ì•~m’¾Lõvdú™:¢1‰Z4T#_"[ô¨U,í²s=¥¸·Í§‰hD¤³QÉ™†®““äønš%CÔj¨d#‰‰« Ú‘u9Ÿë n*JÚ鑿–蕆3•”‘§ÉÙê567…3T-B™¹#§Hß›Ó=Q“[˜œé™’»*’3êY™»–Ž’WdìË ¾^‚Òokd™Ó®HÕ—ì6d‰„2JŒ'"+Š\(§Èª“³Œ˜ž§¤3¶ó²¡–‰å•©î‰û¤B·&ì$%Í-2± mÉHðHÉ‘ž¹FÓºš=êV#²¾HfSÁ²rr+»h„E¨_¹©¸Þeß(“"yK2„èÙ&‰ A¦ŽnõMmiˆÖ¯\jú-܆äBÊ5än‰¦ÂD‘™6!†ÉcÄè†V%EWD–Ý›k:Z%Š’¡XjB1 %*‘$}ù<Ío:~Ðä¬AYM´D¨ÐleÝH›#6«xO‘ü›ê‰•ˆF„ZÛn³VÌ3ñ ›lKÓòFw]R›³ñ›.*×hZÁ’„›jdÉ:¯k¢OŽd-òÇÞ“YŒ’¡µ¾;/™ ê ‚Q§òyrjå&¡:ÁÍ=Dz„ôd¶òcÒØ3¥4c‘ºd1 *D¶i”äi®vò_ºCV©+&qT±ë阻"xH„EŠè¶¯V„dÌ’Æ`‚U?Id N'«½”Ëd "2Ë™§Ñ•xX›=ŬÒbùQ|çhv§†LÏìHŒÂg®JÂGd½Ê±Z¥Œ5Ta-å%BMúaQ—7")*éSá33§ÉÑÉ™YÖ+\I Qd%E«Ú RA ôä2^,DƆDŒÆzA>î¿YLL‹rizêG·2DÍàHèf³Üb#eKrx$ìò“Q˜…ŠŠ‰É c#‘—{`‘Pœ’ä=ªD)“Ò¡ÃÙ“ª:0jÝÕmŒ!\¶4Bê”ì……º›RF¬¤`Á“±‹“·QS"-TFÈÞ[XŸä×=¨Ì½®Ad¨n—ZŽDQ,c!£$ãy;OÙÅhË«y¦‚6B*œ*eÜÆÿ¬Èë¡!&"4I!޾ɗcjc."Rö³fŠ!oOL˜K–Šš ¢äâo©÷B¢uŒ6T¥û³¹3Dˆn%¬ÅF&•Ú˜…RŒL%a$a’™T„¯ä–¬±!²‘9,ÖJ!Ÿuyl…tmšþÂKá“6f™2ÌêøDs|ŒyӋȇ.NH¤2[i‘cJg¾ÂZÂv›ã“XH©n¸“ÿëÿ¦žA ¥=f©lK;§Ó1="ãBb@ÔhT倰©ÿøÉŬ¡Nþýgüáü›üœüÝýPýà´-4•»ò¯Ö÷ÜU ·2ÛZÜbmIÐB²’QžOÙ*7ZŠ!bÒDR?m°™°žˆTÎãa§tvWDséåUJÛXDÙ:Zdu“`˜J%3láÄc"DÕS.S?®1¡sÖMš*hò™œÊg¥]¾C•aOÙDdˆ‰‘Wã"MDNÉCÅñ ™œC";úL÷=„5D&[æg"Ó2VÓZJtG"Skؼ¼Ò‘›­Vô˜a$éÅÒ‰SÅd&C«¿Œ¤È™È&¢Q›%"!ɉÕeHœŒZýPÌ*jEÂe˨Ó‰“Ÿ"5bMH<õtdʼn²ugžÝQ˜Í ‰I:!o¶„£›u¨Ë~øÍ:ˆD\,“]QjQuÆh¬Ý5Z£¬Ím}Ò£2IJ߬ôBpÌA®ª„b±ô”têöT6"¤l”¦Ve ‰ƒ%or7"LÇF;tìš«Yêâo_“éXdÝÙåýª]L„w5 úÖ½34"Q$r‘*b¦lÄ—Œ¦JøTr!YždʹwˆXˆfv%½–lC£5Åe¤¼„íË.½®#"}Í—)‚22yÎHHéV3Dhê;34T1bÒ¥G%%¾1…ù3ÆòZ_6‚ Ë£ª dăCgäìÝ2Íbü¦F-¸sTSiðµF&Ë* ¸H$nJèµ$½r#ÂÊídŸ¹¼XB|U¡¤fæ˜bEwF\iLµQÃl‡t/œ¨bXjEñò Ä" ÛY ¬©ªˆD3–OÓѪ™SRÎDzö BUÍPxÎj²ìC$mkmœ±·Bu„Éíý(¦¢l²•#©s=z@šß¾•;D ûÂo“¢\1÷Ѳj'q2r(O½äkæâ:b5ÙOÒþcîGC:9MDd#N7AI´FcT ­r)ЫPxõîŒÉš®¾Œ!3¢A›²0”£#)æS!óz¾ò)]ϺsÉѱ?Ê7 “‰˜Ê8¥ãedƒrÁ{xÑ*+",ˆb! Ý—š¦2&TD…Õ™û4Gü•'»â!•„T©ö1Iav••«uV îr=esI›ê¥1¸Dâ!,-•$DG¦7ι\Ò°Ö™bȲxÅøÙ¨‚!oÆEªšâ¦¿kºáDñD”¬RšU«‹æ­B;ÉLÌÙ[­$ˆÄDʆنfWø„ß¼Ì;"o]3ŒÕ~N ˆLô¤ÍQî5&zäŸQÝ•+ŸÖëÈŽF@Œ'ÙµÒ &Hdâz2 D.=çA µ¶•¥1‘Z3÷GäÎ"´53.]Æè§›e&’ÏAH‚v&¤`"4%!–1²x²úÅÜë‰"‡¼¡2%#ÔQa ¶¦v›åµA6TN]Þ®Z†6xFì_Äuý›*“ „OÕ)ÈBôÖöTe錈bMÕê¾l•Rç‰H–Ÿô@**:1¼½.¯2c †–÷æwb“¥µòëc'ŒÈäm™6†ðjMY“,6H½V¦xŽ™1µT(¬:ùMÃ4f&Gx骚#ŒS‘¨jü,µW¥4ll¨dòFn¨!˜!”¤B$ªbÿm'<ðA ß!Iö‰SÝ F™Ô6¡¡J_$"V1•Õ}§ªìxÎB$ÖÆ¢³ZjR\\‘¬Hn=X„]vd"µ5hì¢úÄØ7kå/®ºÜ%"£Ò«ú†®õrB&%Œ,93Bdéë !Ädõ†!ˆû":ìi|£ˆæÉ)ÿÈËÂr½˜µ÷º2zOÊÊ“$ó|uÅÆa‘¾ž¶ƒJ14l±Ñ¥ 3Sï¿GIŸj›Õ íUŠä#b J†¨BÃoɦù‰"_VB—o×èˆf¨ò¤6æA°˜™IÒR"D ʵÍE骞vÂgf¹ž3„%µ-1b@Ù õ• êŠ&3–EåÅ’!PµS¦$EflìðH3U˜Œ‰¾O$ÊC"Né^Ã+û:þM®¨³B\J]àLu¤^½pˆISXE]R•ˆÄàÆþÒEM‰„¦Ä—Ýð­ÙM]R̵[t•ûA ÔÔdT)é!;˜FÈî2¥È’ö×FH×Rehö73®k.û+a4j¤ßEA¶JÎÕ¹’=Ú*±1ýUÈMtfGŠÉ.fdJ3ø‚JB©¼yK½7ë±d£ÂؤÈd”ýŠ&"F ije1Є­‰¨­‰gÑÚînß PêJÈ”ÑI­ñè†Èó NÙvµ ´ˆ–)žD"R eØ&_ãcr™òšð‘ÑÞØ›lW“>tÑ·D0•gÁª ؇$„«!#¶ÛE¦µ ¾Ì­ò™¡Jåh‚g3µ'–í h"ÈÏyX“%ùdUÑ ŒØl&²°Ì‚RZÌùñ ¤TCz¨–å÷æQ¡kœi¥tù#¯B,b·CÄÎÿ‰Ä’vª Õ¦R¢£4 ª?IÞ"wŸ4TIÐÔ“3©Ú›žf!‘ ÁRÄ¢x¹Õ¢8NŽ£Lø›k!¶È¨ˆÞÆS¹tc.!–'ú/"fmMÂB~ß+Õ†[ÈJ2J\Ï;ÜF!Ûaš¤K]Ä!5ES9S]¼èú]ÉãÁÌ2èÄUJfÆ„7mntTHÅdJùWIéQßsíˆT{ª¤ÚLFvT ”U¢4éÀüÿáÿÅ¿ª_’~ßqöƒ×©’gWúðÖû°ÈÞצI)2ÄÁ!YHÁ)mٜ٭Ïä³·dsb™²±FRJ†3–c݆3%Qr±E•+;§É s'ÌÄ„·JÜßZn‹—8B­ªôGg¬zðf¤=E!¥Š¢vÆ!¶Ù-äsD¤&÷Б)œÚ7*uÊ„|܃/NÊkV¦r9ºÃDR$"Ä^Ó |”Gr]ä‚vÓSs¬Vb³dTX¯á*ꩉ¢ ƱÊòjÆ‹ Šù#oI:-„äøI GŒ!!öv­LDD+Ul’¸‰»ª<®’öÈÔúj…rnEˆš2`Ù:Â9Ù}Ë5T1ª+5%_“•Ƥ‹zFnâ7¸íDöªª1ÛÉÒC#vi1sVcHVÈ­T’"MËN—DϹÎHK›ÌòŒkÄC5md…W1SWJEË-t}RÔJÈ«dñ‹¶c%Ê£HA1¡*6•ÒN³+—µEŠ'ZŠ1a ‰²!¤LÊ…ø"êÖ›öÆnÛ>¹‰ê\è¹b^˜ËÏÝ5"±2Ô&Žœ‰d>¬‚*¤’H˜×û Ÿ1´Õ•däG1¤Ï¹‰%/e˜–Ûw?é©ÌnZM²I,ÙDÄjeEˆV™)!?÷¬Ù&¸ö)‘‘’š°›%•#%˜E™WhÝb¾Ób\´š§5Ö’G¬fY¾$Ò†ËtÂlm’>¬üWÄI|Ó£›b#BRa’9’­F‡Å30ŽÝ2—ã™S)YÜŒrrNO›èÍ­Z18ŽˆFŸ/%Ù|DBšÒÔ¸i>‹FY Š·úbR!,Š`&2´’²""¯’Ú„„Vy•Q „‡7ù0HO1!×;¦ÖÉMS-òù0Ä‘‘™®ˆÊMVi27‰] »R6O¥«/µÑ%×#Ìd´•™³’#vÙ; Жo2Äå¾Ty%œ¨mãRJÙ¾Ú"âiÆ­æJhh®Ýºšj¥‹5H¹‘&±ÙT”BÃF.Wêo¡¬K÷MvñdªÑ’ÄO\Ž›Ea„÷œ…,"mù]‘ýH¨HĹêR„µ²ìE+Œa*"äõ~×¶ÔƒEJQjÍL6KØ› ·ÊæMkSohÉŠ)`NåhBWS2kYúýa2“1 YPŒïâ0„Í›¾,'ö‰îTæˆU¦¨Û‰lßÔÂ,e'¤ ÏúÔ" &çî•4¥#(‘y’!>ƒv.ÈCFÉÐԮƈÇBc )`êŠ$˜‡5FÏó{S·Œ™™ ÎeîwM[ Ôv³WC%Ï …ÙšBv+²T±™§¢ÇdêØGbY×·2ä¨ \b—B¢ò3/ Ö>%•IYïf‡µ——ŒÉ“14˜DÙJDc|µ1)y*jÂNÚ×pc+GÌ\JÈ}û$4ÄÔ̹] ±Z³QÈÖâ0‘ÊŽ¨ãà „ ‘ ‚UTUk[dÉ´ŒªÊˆC“’œ‡•.ìI6vŸíó%¶Œ²Aƒ!^ÄËjklnÝ–EO…-2‰ÉèƒÎ1.qmh˜ˆ‰Œ·!ª/ibÚ™œyæ˜y¥¢ QÕº°Ù ——èŸPi5‰!щ×Á䙘Ã"6¦ò;Däîô™ Œ²ñ_âM³·ñÆìd‘ڈļßîÈ•°™êQq‘ ‹%R‘ ^|yö™„c!‘º%—¦!‰aÑHˆXÎM¢¬:T#S² $M) š“RA›3rp³áŒ^“Qµ¿)<*±ÈÕ;'5O2Øô‘V"# ÊÄ ©P„· ó&Âeè·R3Œê8›GÂBÒ)oG&uRBi”Ðé«åɪÊ!Œ'5H¨Âýˆ‰Ò Òê#,*òT!fvZËIa#Õ¾±¶a‘|ŒØA>¯Ê9²~jÓ¤ôeD‚ê°¤äÌB5lŒ“.;l­Ð”%=c6B{ÿòˆ§1K®THm±Ý‘®ábÄV—£æ±P‚G[“Tò*¾HÊ4WA“q#ø¸Íèk1=!”šJq:a¡£S¼{"b)!dÓb*x¨ªO¤C&X">²$7-ª…R£š7ÆTíÀ‰%bµ¢!2åJòlŠÛuwäHYiS¬o°­ ŠÆÚ2m’ã’a‚wš°_Lb+FSsLL•\É»\I™”ŠM*Q$ŒJóü‘…44Y"bTÁ;eð™%ÀŸ5Ä­¢¡Q ó:¢b˜¹™í# íN“ãÆÆ‰év¬Zç½â&iöf¨šÇDâGš÷LÄÈŽ…j‘ñ4&[ˆ#$Ò:YÓfÐI,¥½ì¢èÚZFÔ­2ô‘öÄf›¤4 ÒÄŠä÷o ÐwHŽsZf˜ŠŒ\N–ÿ4Í"¦eY_r8µ¡¡‘D Ù 4”&5~^3T!v™ß+oŠÓß!b":ôfô‘ ¹FäRfHacÄHcåÕ$Ñj{·ä¼&d™&&5cÏ4G¾ÃU\ºÙ‘ÙŸ!XDÙ“¤ð¬HÙmhˆ*)pÓ^ÛÞÚÕöý6GêÌÚ‘‘,Ä_I—›áZéM£$É¡ ;l‹4W!Œ*>‘ùÉ3¬Ë=¢%æ¶W3WN™ÑˆY%¤šJ‘fLib+:UFäÒ‰›tHºWr:Z‘ÍWÊѪ5–™k59µ³TGGi[2µ«I/[.¦vÎC43;* HùÐB,²^½ñEõ2‚tJRm•„ETðóMÒê„Hô$&Âv²±[xõjÖ©£'ŒbŒWèè“t´}óL–;¢"ž3f¨D›Ô1ˆÊ‘Q„”—Y~R,¶rˆÖW3!-¬žîúÄÌ6h1+6–2Š'-#s;6%ýSr*—ºG1;1lÓ! Ã+y»Ç¨Ö,gðFÌdÁˆ`̬ÿÆ¥–2ctc!ŽÅÏ.>Oc|‚FUÓå.ž¤F»6I±(‰IuÖ X^­‡E`͉XÐÐf–²²•ÕÊEn½ñ)%a*9’$¥”Ù–×cM2á.o1•1‘5HŽ&74o™’–¯dÅE‘Ö:¬ÈÊj˜é:$ïÉ6tH1§fæŠ1¤’³æy ¾ÔGBä"øRk"\„âf‚¢‘ŠT­w{’·Œü‰XB&·tUvG&¹šÊ22!´T]¹9‰*ôÍ¿½–{L!}xÍ’Á“ueÌ2Û Ò»OùbM3ĪÅH„¦È‹©:f'•kŒ"?­ŽÉýt5´û‰vÆK‘šhÈæ…©r43cEÚ2µMüôWt}mK52™ù,œÓ±Væ1$l†]X‰IÕ4[‘ªìo“¾M=É.åâ5EÈ„'2úÎËÎG±Õ‘„ˆÌ²¿˜•û\þ!„kŒ×tB —"Dm̨¥2J/¾2]eû:ÔBZÕŒ¨LlÖ$‘{T\kº¢˜ A4É$ëï¦Þ%Äà.Ô‹~+M)¿xV•tÉ£LˉÒäèK¡I*~Žé®U¸Y&F#rd"'%ö¤*%@Š%ž!uOR7™¥N‹ÑãµãmXÏ!ŠòB[„ɉÈÈš3+»Ô/|x§L@”F!9Ÿr·éš\&m[$tÐÞ™‘4ØšgzòÖ@³ Ý:Ã%Ç.ÍU™e†èCa‰¶ŠÞÄ[§fB3jft‹iö‰wÛR¡ ’Ût&“kòÃ/‹¤9 ”È7KšÉ™…Â$ò¢$&ˆLR¥èBªs•#­ØLšW“—ü5•ÑÛ“¡¥±™Ö*Lè""·äL¢µOŒÄgÚÖ’¢§ª3äÍ9Õúø½'#h„‰ÖýM¯¤ŽÚÄJNg!j!¶^´‡÷u“³ Y5R4±³‘7Å„’~ŠÑ l®˜„[ ¬_YÓVa7®º§I?äidNìLŽÑHUÊe‹Ö3°Ù’ E#ÈÞ÷HK ‰ sÙ ˜Ó‘2: &BþSD¦ä EB˜DϦRW¨ù5í R r{«oy$í‰ñM²UDyÉØÁ.ÅJL¨É‹²Í¥I\­”fBF˜„ìo#ÕÛwÜ!½ã`Œj„½] ýÍjÔÐl!žçefW?%.4hW%Tv­˜™c*VOW§žc'CMvÃêò1ñ²·/„™9'¸´±$Jëa£F&Èîùo¨¤¹DEÈ3Lf\L‡e¹åtèËÉQ*ÿbãþõ.2I·ÿ›/å<2CFŒ˜KLßrLcXÙ$LT‹ÑМÓò*7µR¯û#å¨Ö˜IØX§1±ÇÜÐ"ì†ìñ?ûkÜÊÄBBs¡ ›·)?©úvNŠ‹àÉ<¤1¦„•’Dùqª«šY8ˆ¦D"Öé34êUdÎBY~š4˜¨Š¬ÌC%••‰Û©Öªšiä44¸nKˆ5vÞÆŠôXh*‘6ÈDóæ<õ]sd5#M³[Œ‡‹ï"FˆHN—‘Nô½˜H•°ÔÛÒʹã·FjÉ‘Ùú—«eLЉq$h„MˆgHäDFd7lY¦ÕóÂQ' ]Ö›B––})) sDô©¬¤"¤Âq¶¾ürùSjd‚1´¤©7M_Z©l”‘ó2öW퉑7!Y&›8üºT#ˆ›Ò ‘.–HDæ!„B*ˆÓ6Œ^ç™IÑô–èéæw©R ˜­IY›´±¿Ö!¡ÔgJh„ÈáuZ³4š&øŸ½tqAæf„ßœuSÿ·R*)¤b÷\Êc1¨Û ”‚!H¯Å‚|è̄䨋²K‘Tö&JcI¡t½$dŠ5#tDH8ð¯ùR²3b5ŒfBwÞìÌJj˜ŽÛ²¿žë_!­ö'07€=€?€=€831Ú»‡€|¹?ョî(Þ&Dˆ„a$E[ „"楗‘õO’›Èu‹ÐnÆèDe\DUÌtÉ 5v"U#ÂeËìwDJ°ÒDúš6fL­a ø®™ÈÆH°•ª¢2rý´,ÔLÎ’í¹1ä$b'(U'aŽŒ±ZcK(ˆG¨fDÇË5F¾lh\¶¦×oˆDjÑÑóßí;RfK™dÉQQ"JmÍ‘q+d/èh"{ºßËJ"íÉ 6jg¹”“TH“Ý8”¥n¢—4“9 Lm.e1f¸‰Úñ2Ír$&JË›Ñï"H˜Ï`VdÝКí‰Ò”C\D\o"ˆÞ43F\ËÔ³!SFD‚1´ùñÿa‰Ä¬Ì±sþð„ár¢3}Qú/ÿ)#D节1âr|ªäc!!¢4þ²Ms[ü™º"˜šŒˆh.ñ=Ä%PfØV´·höÞkˆ–d Êšèâm6Œ&a=IFΕ ­¨L4G–/ŠÆñ8L‰â®·)ˆÌ’™ŒºÚ°Ü•?]xFŸÒ>©sê"X4L裕:8 ¢Hµ*Bl4Ôýˆžtn}í»*£ÒH#©°’xÆt®¬roà]k2¥} %ÍönEdÍf“±¡'B!“ˆi:Ín\$–¢|ª…*’Ä—!.)1µ,ã"O×}ÒF\ÏígºYÄ›"A“Ï1 ‚!I2'"0Ò™ÅNÀ—•–iȪ^œÉ_e7÷êè¬ÉM=iÐdx•-BÞL„zg5ÐÅL&0‰|"ëžËa(‰É\—'¯öjºVdC¢x/¥´› ¶æ$BCJWcZãLË¡¯‘âUù²6„D%çšDBæ.v¤a#e$¨Ž™vÛkÛx•™+šÓ%ÒªZf˜‹H]GAŸI„êù£­%o.†Ò·‰É”G”L5ÈÌd½k:eUjÙkš’|h3–\Æ.ñ{1ªUL! Ód~““ 0™Û’T³ÙÏ’ˆ¿&! É2äg|&¸ôÐ2VXÝ™oÏËi+Vût7d‹_‘ØÖÍÈb%ER:tâÙ­Jnë–ž+"j¬Ú¹ 9l䨶ÂÌXØÉ*Í¥Z¦V¦Á³dN¬ägÉ›:lƤÔb$¶ü­UP’É©%¾™W×eN¡¡’´»'´’L&A¤â#V§ÌJ*¬o}æ%„#ULq+ª;uÌLÛ2nM-­cfŽf3g}4æ-cÖ°È£ˆ·HBTLM,¦$É:R%—çéµ”ÛsWþ&ýÎ_Ü ™DÄš¢\˜\$#eÉ&ªÎ\¨åH“5¸Bic,"Ín¬² Ff&ÙØIaÈ$_=Ò BÑ'¹ªgÔŠ³ˆb šV~‹X}ß°—¶ÓT½¦]b)Ï‘"-A!,F%%6÷3ÄhÓ_ÖB¯BMðš‘}c U¹[ëqr:|è2z©VxfA«o/eÕ¹]Fdi´4%fL•UâHÌ•ubR,dýkÙó12Ö³­}H_„ÄF‘„&\Zœ"‹Y z¤«]ÍPÇT)+ä ÔȲÏT‘ˆ¶¸Ø‰Ð‚ø¸DÅñÌ“ßÓ5‡[Í"L„ñØÚ"¤²J³JK1#~–¼CäYkÇá˜Âo²d6Ä­|û„G†®Å¾ðñÕ<‘47|íVb#šBÒ)ŒËlG†Ë%""!»Â:9½RÔðc„Ëò„1¹ •,¹?ŠA‹ZE:®Dª’¬ûص9}tcÌœ’K‹! &1šôže2χå’Á1) Ěɹ5UR1cAšG%oz-ZêÔ{°ŽŸ{9·\Dn4Ã9ˆBuÆtfø±Ñ:=)OˆÙ –&v_‰¥©ö¤ Ùá’ì*%ؒȬ_T’EˆÒÁ¹·ö}´£K=1¨ˆÃO‘š×¹ 4!Õi5‰x–RTµbl„ØŒlÝží[’6¼Š‹êä˜äB?RÝ oÈÓ(º±23$³MaIY#è«H¯#n”’5¹Æ3%Iù›"!gA•20¹Pí‰Õ¸çyé¶ŠÊsFB):3æ& â~L†Õ’‘yzy²ù·lŸ!2Ø„H¬ÓmDÌ×+\Ç‘nÐKè¾îѺHÍ~Ã1S¶ÛDb²-ÃiËâJ°ÈÄÉ Q<öQ% Ùô"I² ìý-TVC:lIÛ‘bVJmD+;*uÖFNM— Üö2%왑‰æ‰V²GêÉÉR5þ3Ä\Ä]]Èm¤Bìšäh™!í‰ñjSYï²TÈŽŒNÌÈ+!›:|™H¼Õm™é|TG$ÎlÉõkIXCo bsLÔ³$‘’?µSÐÍÞт۫+eB&Ñ#k¥t;¢*Y ë=JפoŸ:E23„—2wÿøÉÅ®¯NÿWÿvÿÿ¨ÿÊÿõ&U´%b“h”vÍÿâ†\‰â•‹Z!ˆØd"ÉýV>Ldi.A›Žt¬y•«0!¯Î]:²F13™`¦š“î©* 1%#µzn —Jhi’‘_z3O˜Õ&BiªÈÎZôÄ4Úýß U¨™ P‚¤Û¤D‘?"JÉY1™‘z[U—-K’²¡!莽IV" „æ„ÏU×È”Vi˜ÔŽÖ+ÇßÓ" H"yy>HeÂQ7hÏ,'IýTK1•t+ST‚1<,¤'…lBm£+ßeÓ¹º2s¢5®«["ff#1&—¤RF«:HvFV⤖ŠÊ4bGÛ×ÎhÃD}ŠZ¦ÈŒÈ“n…W§õ)› îu}.FSÖ«Ã@Ž–J¹×2mØ1¶Z‹‰ ËZ! [ MRCùÆ¿RŒêFQ'Sµ–²$0šWHçÙbÜ$ Äìäìõ]ØN›¢jÐK©ó%½‰RÅD÷”ɽ7k zCë „@Ûg H"bûã¡Îæ6m…¼YOªjœŸä"ýuf·ÊÉrefk&S”–„LÓ_h”͉±"¦ n†„¼‚mþºO_2FÏ.-¥sôéHfnÄùm¿·L‘šlë3–êž4™’&I‘!3#^L’UjE!'–Lý1Èý&ù"´!t~“ªHnD›h‡õSˆÈ†ùmZˆœó=Ì –0M…§jf{[3Bää‰eÉ-"M‚._‚3”hÆ5r)f’ÈÌ~y+mV·"O!Œˆ6þ²Ýé DdVLÓ¯T¤'Fþ ±+'BTe¦e]K³Ã0Éâô)wEªž‰tÂI“Dd“‘”ÌÁÚÍ BµÆ,++u©å#ç°”H‰´µ[ ©ÍS’ümÚò=².ÉfUì«4ìbl• ‡DÐß!ÓeëSX´Þñd—" ²Èç%Õ ™Ý4D%¼Ô’"ÊÄÁ'”c#'ÊtÄ11‘%¤Ï‘rœ•*­Æl¥ÌAî! ÿ!4Øg‚dœ¤iˆT’–°ÌDÆFUÿ^ýL¦Cfë®â9$mXW!%áåFód%¦µ×a…¼dÅ¢!”˜„n̹bÇ2.ñ qH»¦í¼×’i[æÕ Æ]»* f!X×IU›×Ò2HìGö­Z“hƳ¬ÌIy ¼7ɧ}œÒfl¨¤-%ÊwŒFjA¦_"D™£3F'ÿ"9aª1H¨‹Û»yV"*Q-L›ê¬HÚˆFV°‰w$ñŸA— â ?GV.nBÅfdôéqµZžLŸ‰È••lݲ ÓcVEÄ®G#Q†™­Þ®b$A5¤7¥Ž}¬úÇ7©¥«ŽÑ›ü¶d}Lb}U“$éÂ"5AÖh$õ4̈hIJˆ¸™x‘šŠ_Bt’â©Y8¨«‰gn'¹Gñ<í¹GÍ™9¾JˆÃB2dDIµ!‹£ÅÄ}™‘òÆ“qS¤ßlˆ-,¢ ZlK,#fì…ßÝ„²Æ$HS»W¢t ɹYÔ∰տ¤F4r®âfLLµ .DÓ)¬Nèþîºhþ€ñ´k’(«u‡ÆàMDs&.S<Ù4Q>c´"H«Ф³¥}Ä#äÛ[+dú Š­D†$˜¤š,2³))ÄxV£2;YI§JnÆŒJOlRfgBz†“‹ÞÆ‚$Žôùjhé·ôÌÂTä$äJ›¡¬$õêîë]?J¤ºf©‰<%ÌFÛš3#I3t5Èö:)$*Ä^tËʹr!Q¹ÈÔÈ‘tm­AT¥M‘>®—*†„%‚.2 ëIÜÕ‰Ó¿4s>¿Uy^öÂêlÓZ©Ã:mÈÔ„B!²\’ìÉé™»hVT¹7Þ'İÐ$B|kÔŠ‚lÏêËÕIY"¢ã)—„Ý27]¿72tÇ’Æn’ÊÞ"#«&ùš ±"S%¯_-FP’3“ºF÷¶¤÷t¤¨¦4d\žsL²#ÞWôixË0‚a#ÅL†š¡DÜ6A•™lÏ4­cÕá73.ú§ÐÉ:ˆIÒ©M(–™EÖ£2«Z3$«¢ôÕõäù46‘µ¸ð“ñ#ŤÊH™ç)>}õ©Ù²c´Ò!,K g…¹Ò6fk!Ÿ#O+Gý$@‘Vè„K 1PèYéûÂi|ë4"LïQL­®$g ÐM#&ÒÁªõ¶©¼S&û+.nü¥’Œå‹r阉•ÿFS]׿»þɈÙòjA©Š* s4¤í:ø¹ŸbvÂÉ’h'ôÕ¼EùÙ·½oÚè–oš ÓG¢ž7LÄ*s±$‰‰´) ͘…4Ì»ít'dÚ}=F‹„5„û²²ÇR+Ù“I«º¦ÖMPJŒK&ÑÞ²kjš4ˆœ’jˆ¤*lÂ0ˆJ´–¤2-Ô™bÂB\ª–"é ]ŸdŒ»æõ¯¦ˆžu‰‘¤ªÉ¦ÞÍb_(„&‹+FˆF3ÎQ6:_³³‘L©:jhˆ{IP]ÜJK. fES~Tf¦þg‰SÚíÒlj¨Ê›¢'1OS„&jì¢(Õ[ãØ„‚I‚×"vÒòfµa Ýœ™’ŒHoa–¾DD8hž>ó›-%.))$2-Ìs˜2Ÿ5ˆa:Ç)-Œcz©9‰66&^šÖÉ¢µ¨F~kªçГWT°ÄVrZ„eæ¨ä–Vš¦ÄÂXµQ"dT–ÑneèIÛ‡gµFȲ3.ý·Ù ©—KÛ¤äC¥”‰ÞD}0ŠZò¥Ä½­°È•a$„ÄvÈŠñ3äÌì&mv°¬EýC|é“Òc5¤I —kuê·uÙȺèK6“=Uì°º¶ˆIRH—4t#"ojž!:„ŠŠ‹Ó¢&„Ní^tµS±TÛËs]Ñ!´å6D‹ÐToéHJF3& .ÌLɸKQÙJÓÿå"j&&™XÝQ#u#¢¶ˆ×Õ"+'SzšÉ1¡zQŸòxÖÖ—;Ä]Û!1 „k¿dL­œ¤ŠÑäÄÏÌR"¥gb‘]HâeDÔiI ÈíDGD—EˆÊ±µÅ6#Ubé?3C¦d5Ú£"²DB’ã:&ܰE©‘DuS£ ’é©Èɉ½ÇÌÏÎù*;6Ȧ­½Bf¯ˆž*X-%Bò„¬2dO˜dv°ÔµkHì…Û.†šcü´“Ǩ64NNÙûäuTM1íHœZeð×WÆÏºåŸ(! HFÑ.¤1Þ¡¬uÈìÿsZD#Zk²øß_«Œƒ!«b3[‘ã1¶u„ˆ—ö"–tyc&w¦ÆÎ½:ä@Ú»!½ §#m¡ v,Ëý™£''ê°¾7Í~ Æ6£Q|±c.ãÍOé‘î„ß§"Öf’¯ú›]Œf£B!‘’5.õaùÜ“V!| ‘ hË Ù‹Da §]9m§+´$¬ˆÑu„óÃÉÍr¢Æú²d¤Í„ ÒèÚb6¢¶¥[ZG¯5˜ÌÛB=è2MÓÖ®1‰B5-;)X„nzÙZ›©ß•á*L®A ßB„TL1'ÙRŒô˜‰!¾êIÊ‘‚wmâG‹È§ÈšSd#£¥—¥bœ”ˆÌÖyÑIì¥ÚŒI¢¼Iø‚ ±É†ÂChù¸¨dr¾"ŸFYQ1'3¦o˜Ð†DLÊ•|CÄÓh¢a ÎŽ±"sÕxˆG)"\#2A ˆæÍS*¿±bßQkµËFêÛO:`‹&˜Idä]šHÕÑ"_V§¼3W¯# ÌÕ2úF#d&äóíæä¼Œ“[®GQQ%tŒß“2²d![9¨±ÜÞr³fGEB›„ÕOPŒJˆÿÕùLCGYTHbÿã£F$®È‰ÜÛ¤VDÃ8ˆÒ(ˆ=+q4Kˆ°U¥ÄºäÌRš±ÔÊKÞ5]nËú!˜™dÙa››) tzDf-ý—j‘ó‰64K!;1 Ú› nWK[#~¹·["uE;òÉD“ZJA¶ÐfÌ©&!7HÝŠD3AÊŠ¼†wE\\‹ØÈæé´3ܺtCvÂ¥¢‰¡*ÒFaWi‰î˜Tìb]„"!%²·Ž™1|S·!³ ¶©ØÝ9)†d¦ž¡ ˆF¢Á«?šéÑàÚ­ÙMQbþˆÚ5OLÉDM³ÙÄO“2¢!£¤ï‘’ DrºAÿøÉů¨Nÿê7A</´mU“ðœuËWá_#"·›"Å}ôµ:ÍÒ*çä#"š%#gB’5JÆLMÚäD4õ¥‹ÔÎm!ºSÇÔ–ÆÈ¦+R^¨k’‘>íÑżFDëŸe¦¨™ÉÙb#3ˆŒ\”ØÒ¡2òhŠ‹e´HO ¡þ‘ž2KmˆYQ¿'DmD7C¤FiÉ4;‘)) ó:Boj¡š\“N¸oçQºbÆ™vÔJjû©²k«f‰Éʎˉ7èKù©Œ‰š©bã²Deg'“M™/=’¢Ñ ¢·L'fsÇ HbC\…l|è†BvƱÌìQ9¡¤Š—;f Ùd¯£bnéù/VN¤TI –<¨7Û!±.È"Dy¢Fæ$h²“£%ÅýÓ¼lŒ*í©v5j¦èÆÄF'fÄß-ÕØ³VÛRÕÜÑâbrÆÐž*F'Õä9¤hœ—5’ʉu6!§""'c'Dd]åI)™‘«Ã¯="ojg[P2/ª• “#MÈ%ưŒ2øì´L±“ræô”I”·¹Œ$\V"5œ¿5·ä°^vMÓ“çNtR¹:r­93’O‰›Ö0“\ÌJG4lÉ?N#¥½ˆt•ˆ”R/–’žžPÈD¢Yl½ ƃê@•ícóÞ‰ˆŒ±¼š1ˆ–I®Gé™d7=)1£É•¬DZŒÖ¬H¨¬Í„ѬZþdjt\äNEÍë-´¹ˆÆdhf¡÷"OÌ$Dþ3Få]³“ zÿÑ™˜Ù`Ÿ´#R'‰ª!®ü´¾®–ÿšìE'%;9>fB!±œÙ ‰uUL!=U#3¼ì×ñq*³è"·D½¶¿²T3ô–¯v‰±²Ä!QaPŸdá Þ®m|T^Īí2³vïVBâ ™®ÝgÏQ ŠÛÚm&­,•?dtêälDѲÞeFø¨K£›cD>'(«16æÑD­™J’gˆa„V&´¤±ØÅ‘4#²úS*DBR;jDñäN1&Éia=$¹QK¥Å¬ém<³9‘ ™±-#fŸ%¤±.îéX_§ªÓ3¤½1 d©Ò×Ë„]‰["ub£æë«yºBöÖ‘*R7$ ’¹>Ô¨ü#ÊÙ¬e‰–1–cg‰XØË2\J‘’{%–±²ÖµµmZÄx­£C‘2$´¹0‘4uG;J¤LH„‹sôµñ!&A®"|¦KUÉS¢.$!Öըϲ7v†;)¦«]°Š²³q!²1:Ís`ž†ºB4 úm‡Ù›"ôÛtñ#=[.â£bVì‘—„]a2h„¢XEnØ­¥ °Nõ šë‰ Ú‰VRdñ 1DÅG’R].lX¹óB_!MÉÑJ®‚o"ûÉë1íBØR¨Á1šxŒÞÃ7²]-gŒmkÖž*aWã$"ReˆÌ™ÂfÓ7TÈBbƒ»˜éºDxþȺ™[ÙÒ*¢T!›C!=‘.NÝPˆ™b/~dÒ.rFf%åÈ–K³~½k"3&{Hý¬Ò’Æñ1q§^EÎºÍ ÈÓmoôÂ%ç­t‰±0ÕŸ|!ª©Íhˆlåe¸ÈúòÛtБ1ˆ‹æìŠ!%‰FU43:øíÝÍ“Kn-ÉfãRÆDoæÕ "-,¾›±Ñ.äJÓ7'ý˜B@˜‚t؉¯nâ2áV0‰Ýæ!V¿ÅkZ±!%5*s0†mqKÐMHÝè¾ä¹ úd:,l™ÜdJþ8C.¸Ä2r-ÅÑ=»¾dé4Êž#>D"h+Ó;\ÜÂh±‰½‚Z¼¬ÒDØîk5„ŒcÁVÂDw3KɄٯgMÊ„IY4Ý4'Û}3¥¦ÊÖ—ßšm•“!6MårkP¬Ò±J„V±kèG²iáf'fŒ˜Ä}ÙÍ0ŒÅ9 šÛg±—9*vvŠå‰±‹1½&­ýñ½Œ¤V—hœœ•ȈžÞ&ÊÍDã5c:Oq"fÎêe™N…p‘š¦+ù1©Œ˜ÊÈʼnVR1#HÑŠ­v;å—ÔL¦ÚÈDV÷O)‘tŒB.ªÉ”»ÒéXŒ«6Y³iØÁ>µ(ÚÂw$Ä ØCj²ùÇeF!ÒA£´ù`Ýiï¬Ï¥'2ÖDÈÔ„bR"²8›5ùØ‘±d%ÛWä…å‘ ZˆŒIù’;rGNI«#hŒÖ÷ÌŠ¸ÈzRn’ŒºÊ‚6Ö&$k úƈä^N•"’¤ROÚj_Þ“bC¦­k¶o+ÏâF}º±º/͹bp@ X ˜à`@ý îk¬Œ…[­>t.$2F^ä,GËRß·¬ÔÅŸA:ed$ŠbÒïRí &-˃m4&„¨‘‘R6ùâüø×%[$òn· —!£Di‘&S#XFæÊÐhÖo‘‹²’•©HS|þ&²’'ÄBÜVí–l†tŠê4%i=ýæt±ƒ!‹Œ˜Ø„r2ëoõ¤´Ÿ›£ÞRB¥"s*BÔÄßZD†˜Ìjf"'©m÷Âß;ªúdz“M`„!ªTfhDa†dêC:Fî½çÏå¯ÑšLžyYofM›c;# •I޳5Û±ÉP‰'8™W0ØK[é;iÄÕ£¥%M_®º¤v¨Iɦµ³¦í÷yø\2²¾Fk*C[n!â)Ê“efÕšåè†!/ËäFfØEÐkÑUÙ#XíYõØJ‘*{¢:ò»-ýˆÂSBDc#kO–F‰¼º:D%X«ðÛ侯q3Ææ”%é2º®ˆ½[âw«‘扵Þy–¦ã1±æÄÂ4ˆV1RV&‹:ú™ê=™»+åÚã7øé©1ºš´Ì܂ʥ‡ËªBeM‘£¡uozÒZÙ®cJŽ5TóhŽÂJF&u-êive)57Æ"_Ô™›q¥DYñýrž3&VJF„5OR¥V‰té‰Ó¢Q¹ â2VÍ®ýÙD«çgýu̦ÕU˜„ö&‹HêL#i£5EBIÔË_"èNqnè±™ÊÕoLÆLÌh"VwbÈ%jH YRîìé2é§|õ Í&¾m2a¦4‚BjMSzub^K³èâdDv¸Þ!]R#\ÊÉ`Ñ1!µãu‰—îøêè±5°ÊHÆ5ÓMp¬ ÉÛbL„‘UW@›J%™–„©³Ç†Bû’•»ί¬J݃½¯íÌn¥IÆt“X­‚j’Yî© ‘’Ë‘M‘íDGÏ6S§DѲÏçІhÒ‘“øv!™¹Ðެd7¢RûQ‰'îUQ'ÖÈ#çÒTÔl4jÜÆ3æ›}ûl‘ÙÑc«#’F4l˜G~ʆXŽö¤1«{IeFdDL±iÜ«fQ‘”Y[7F¨D²Q"6þÏÙ÷JEg'!"YHÀضVtº¾‰©DŽFMD„ݲS»‘)d?J›ã¤Vž˜ÛEvv6…e×n݉¶R6Kª Tª™ŠŠØI¤ZÓ™y²4™¡9‰µ—Íá ‰êHÐ"G*æ%ZšÔ\¯¬ÿó Ó2$4“`ˆTg4Tú¸Ç1 !£f»g~¨÷½Æa픟l™+5ÆùO)诰¨°Mè†D™+JB>R$[ ¥š#L$æ°g!|KØc1V¢Ô_{9_&&b ­„‰M}2Í;Öäö§eÙUHbbg;öueâH‘U”„$†$ËQ_žêQ†a4¹M=MÔÈ1¨“ u3¾+r£ö"B*Tƒ_~9r)dM§!ŸlÚ®DA%’ED #RZÍe¬éz””1Aªbd°uǧ¶A) Ñòo*2XŸbM§n¹U• 3#bb%XGM+ÖÈ^$"¶4¨ŠÊI¹–Q‰tuT+Âø´œ”ˆÃh¶[2‰VJhÄÄÝ]äuõˆˆDAMp½µ»'eŸ5D$⤥"uBÄW¤|‘„êI3EGßf#64Ší\ÎI“ÕLHþ²ä;µ!&äFE}#j…l"vi†¤ÝTM>!mí×F‘ЈݺßèîHDfÌòÞnɪôjÌŠ„ì¬eêŠD™„ùTjN]Y9¦ÄÑä§–èÌÚ‘v%ftÈä"GjNhX±¼ò#4‰Ü—fíBËÄxé¤Å¹¹“J"‘0WMñçúçƒ&œŒèW&ÃFl„‰:Ë…Ä5E6!:LN/Õ7Ta„ªŽM"$¨IuG’b%'²1c´då×"»˜•…ÌFø‚>s;'Lƒ±>´ŠéÚJLFú">7õdHŸfÉÞ¦C")RÛWý\í²Œ­ô%Ô·ZjbWÙ …ÔInÆ—4„¨Ñ’ û —_š~г¢[á2"Hkgdˆ’:å&r"‘Ø’Â4shÿbý ]˜*6¤Žª*-²ˆD3#,neS Ö'¤F‚KVzI¬< „où ÄÒ1JEŸ¦V7né§!É2©SÏj#K+˜ÍÑïf¶f"d"FGó™“Ufb¹}UäI; ‘.fdˆRFJ×z½¡²Q:Vh¸ºôê¤"h¢BŒDÝß’"™ FÑÝz¢“Þ¿#¢îS]ÑápjÒñ©¥D¬g™wgBÖØÑ¡‚L/ÿÅ"§ÈdßpMÅ;x˜BJ†' Ò¨éÅM‚Ü„¢µŒõ3çÜ$sR3gË9þTèJiZÚÔ̺ù÷T=4UÀ•±#]dBÍQ*D´"¤â"²O ç‹J…¬Ì[•¦ÈL‰òm*ÛЭ#]‘#Rh˜¦ŠÎ_)›!X•±4‡IHËÉÑŒB2$Y fS9tV#›Ê.²ª¡ªLLm= ¥ }¿(†"ùÈH¦f%kiñ:‹V·*0—ZA®Ñ«SD$†Ý<ÜÕSæ¦6±r-ºk×b:(Ì"™¾4~Üú!+ÖÌ.SK½ÂسJj“F-»L²ùÌÄ´€‹ÁÿøÉŰõNR]Iÿáÿ«ÿŠÿŠ´tØÛt¶oÝH†´‹Ñ™»ÜD_Û?vÍwë f²¡ˆxÍH,eiF61"~öy•NùÔµõ97š6,mªÔ¨š‰f‡B!¹&äIYÌE'¤­¯ß0ÖѦNäÅ:,'Ö˜Üí**O’è¾Â#h†D"~ÜÕ\¶¦wfCeÃ=îC]• !DV™s#³<öœŒó³—/_ ›ä'$qAž§šñ›Õi¹‰a¥j˜Üªè¯É13‘“B"™1‘YxœV;i‘d$™ŸJ艕·¿±”‹z´])!"Âå;i*x¬5fe4ò+!¤´Nó#"! %Y®j‘[XJ2¦îL­ž$yDÞ¶«“þ•DÖ2êD"sœÑ£j1>\fA6ž¤ò¥K~víZѬÙÍuМ™.3XdjÒû‘tˆ»ytä¥KM¦r&CLVÎéêMnݱ†LëêÝ¡Äý9¡´ec4£R-TÜf$R¤y÷Q=J'/YrNÆËw!"1S.èˆn«³ÿIQ ÷5SrVil‘¦úéšhÛ19«*ë1n[sä.þƾè³.䘱l›6"£SjTxæÔÞEbcÆrq2-Zzʯª,Å›!ŒþûQ7̇Ì"q’ Ñq¥"¦5þv†$m­8ÜÌʲí2ä”FÝ K‘Þ¡1¬ë‰è·ORxb3ª1]j빦-²5f\Ò4ÉfÉ{׳f%Ñ112©;ÄbÒöÂ39%kdæ‡ØV$'“µØ^5ÑŠ$È:ò5|ÓCV›ØÙ²A¶–)š¤¾º~Ink±cY*êDŸ#: „)W©)„u†È–‰‰"Ê“ª«™é &|ˆ4DGÞn¢6Äe„šã*„2™ühÖ•ºXè甪=MHìè$·í‚6n‹±fC&ܽ™›Øë5BtEé[Áºw»‰É9%$†‰[hÎIÄ_%&d.:ONZT2;1I†V¦érTNé„BH×"­ñ2i}!äc'4"&R¶º¥¦kµbK³‘Ÿ$ÈFÕuãb™Lad•5ÿJ›+æ™´Þqë.É—lÓš4ˆ”…‰ÞZ‰×s¤øŸE7„2(„ÉX²´ùÕ®t"ddªìóHˆIP“$!9ã!&÷š|òjŠúí–ý»¿b%Ü©H’†bÊÜLKC Tš˜¤ÝñÝMÕ,„ßèiÓDcÆj#u&m•7ÒëpºçÓPËÔFí}ÆäNÉ¢±²$bcù%…ÂM¬«û˜Õ ë!¡'y•‹e»k2Ï?ìÖ¥.Ä „ÐEÛq†'­â)Mì|&Ͳ¢vyHf$”„X¾Ù±ˆFC³Yˆõ SCåMD–[&¨m2»>"àL&þÖ×h6L=é+©’Èð@MÎJ˜†6A¤ý¶êò+ä=¤[ºÌ±ærÔ¤é£n¤nKtÈžæHNà H­¾±£!zÔQ'3S|B!:d‰F‘©)z%Œ//¤ü]¦èÐFŽxècd$!oZMV)%ùf£v‚,ºr!´d]ŽDÆ!›Æ†CMJßš¿jÊŠ®Þ=•V^×d¬fd½íb!¹##’¥ôr++[òV1‘8Xpxd œ¸ŠÐwUæA£ Õ~ü¿‚¨l$+M/Y P±HH©Zq¼‘wdBIêê†4I’A;½¥¥EÄ"N–&¤_¤Þ!ˆˆˆ²æØåiÌô…4>FKþÜ’{›s M둪ª£™3D2!)'îV±™‘µ&™~Ù ôé†Ò Ô—s$cý¡\Lj².¸&dTö²±ëMûæÕS¢#"Svƒ›®%2’8š c¥‹?›!4Á=ˆ6WDæxNœ¤ŒÐŽM:î«òXæŒè¨¤“.#» FNF Ê3*!qE)‰K1šãòá5Þó³! †Ô«$½eöÎþ!ˆU#çOù4™•#mÐy™”–3b\#G¿èõ¼û2mrÉ º<õIRŒ!¡1ò)•Ø$=Dnˆ²¤dT0©Òšé±")TÊ«a˜b*";EŽ×³RtEvtúËÝÉ ˆ"5Ò&¦þ:2ÃV\Ó÷h`•2;O‘åê­gS%q‘™n‚•š’ÒG3Ø1•ІC'{×T:Çó™Í‚HÏ‘–|Ív½þD2é»y"G—¶èDJËäFÄI„$eü*.†°Î±GZU«'J• ƒoˆfq‘7.>è°øû-÷”„ÈÙ%¯¢£+"6ZA5väìY‘’øäïÈn¢ì³›¤t\R+B7ˆfVÌa òB!ÐßÛ»ôhíÄM«2 I«O#Þr\Æ6JFO+¦iU—EQ²i*bÍ·`Ñ>Sy$ð‚çtJ’¢A ™™ýtuÓcs601ã=J½ïðII$'V*.ÿêNI£FÐÒ“$\[ÍäyT²åLÑ™ÌD‘‰ÌF1:tÄßœX‘w>16R\¨U®Ú“¾‚!“ô\ÔDæliãT׸ý&+é%Ì„º“²“í٠ɆhFd6Æx‘;²åʆ±¢$Ñn»Š)elFd*%$©â/D#ØÆ"Bx…ùjÈžÞŒ˜¹IzD<Йæ6D%2 ’wÏüX™)7ždž)SX™º$HUðÖ¿æI–‘±†1:¤èê%¹™¤e1ùvým´BDBK¼D‚½¨ŠìÊo™1 äm%]Ö:¡9‡îÄÓ&l†b&#—+¸ü°N°µdѶêªÙj1M8A«„ž«Ä3È„”H‰ˆÏö¯ûÜjì¨Õ‹q œ˜‹HGÈÑ hÖ^ï|á%6dLÝJXªE#le ÔiÛú…‘Öæ½ KLO5¸ŸejL±P؈‘¼F³Åæ×+!9 K÷rذË3hÒfÙK]b“fJÆDF!UÉj…ÄÙi‰D$©YktÈ„©[’®©Ø©jø&3TÄÙi<_J]îuLÌD#&g§Çñiµ ÄH‘˜‘ŽÞuHVhé°†iõ^gBÈéu©öé±bì­L¦ðOʤ2[Yì~ɽHJ°„0†ó,*Ý1i™¹‰õ;¯Ö_­FvU͘t1©5H›o[.ñÌG$)éâMŸÆaÍ5³ D‡Äë .k}%JÌJÞ̲#²Xµ³OÉY$H‘3ë_x’”¹žæ"öR}ŠLÌ®ß3TDk´è1b«k•Þš©!“rb[õoŸ]wg"Ä2µkLNÚtE'Jš"ÃAtòM™£“Ò}ô­i—^ØØÄÉ4ý†H‰ö›ô¡ºù6˜¬ì™IW­.T–䉡ĬÈb)4“LH°ŠÏÙwOþ—Bä‘t>R65„O>Úa†To“ç’HÒçÖ})0³ ’w2$BÆz'é ’Ê‘#¥H“¥OÖª}”‹‰¢^#¦èšl»{‘‘®/JɵŒBTlÂm²€›ÚÿøÉűòN\¡ÖïÜ“i´m”ŽÐö·¡¯ÝHÃF’ÔÙÚ>Qú!YUÈÏÉ(Ì$CÎÕYâs’²2#o{•ò!º>V2 ªþˆ%ìa‚DèÕ:§¬“g‚ÅMœüzJDc¢5!5½¡+'ßIhÍ7–º,wUŒfD/~¦tä¨ÈͳHKYäå± Ó©d›)µỉd¨åÈÄ⤱k+uSQ6„JƒZ­'OaA j˜¥’çl‘TȈBÒÄ]]ú‘#FXNÕT#sd1ºkk¹!,Rì†Ú-a ”•Å'ÚÚ^™‘$‹ñÞT^„”eV„E%´×s>"a+OÉØ‰åÍZi) \Úª§OÍ Ã9gÉY™6ùIÔ¥yå2yhªâÏLÂI«D%Æ„ªM´3é©-jÛÈo+™™Z6ÄgÖ*lÚÚø^¯OZ)F"5Ik<\;6v’Ó!&es'D,#Ù¶©q†ˆÃcD‹sbUœ$gwéÔ×JD#¢QÑý;\½Ò„mYºbôv˜Ü×±v4¯™ò#"Fve¨æA%$1 Úb&”Œ³xY½…˘Nü­ !ÌLI¹É3§ÏX™ 44Så·}»JÛm±+CÓè0˜—¢#í)ÉrTR§„ÇUVˆ»]¹_t­ ‹Ú¡3:OvCv±.ûĬ’²µrNLcI%#LzÛ:rÍYi2„‰)‚* N¼D’6VŠ­µmQŒÕÍq=ëeÖ;j!,EMIuv1?:úNó2v9£,åE’ë1´hVÜ“Ãos3\Ri!ãbÔeâ÷[Õ6°Ûci$›s §‰„Œü‹Ú— Æ¥-UáõæGÍ(Ö7mî••§J…WÙ¡š’5I ÕHÜ™ª¶,‹ërSD’H™«û£*1L‹érfÅÖ‘r MZ·vY’ÌA,rÄl—fFAª ‚#^z‚LÍÕÕz¿­tĨEY±>Œ³£ô½ „©Ñ¢Z¹6·>„D†"“[MrdD±¡›TºârSk½[vtRde~*TͱwNÒ*šù ¤gf]O¹ 2GÒrTŒ¶Ú"$• ‘„Î=ƒ"N±De¬õ&FËHÝò’¼¬¸úvWÛ®"7Ò<ŸµY›S){"!ÚÂ%!ÒhEJňl•k¥n·Æ¥IŒ–¤V‰+§BÕKå1¾,!½™HBI}DB"d'êebBD“øLi"h±±:¡+2¡–’´½ºI2H–¤7#è{Öݽ4l•²BVHO*%jANCWXÔm*쨥á»ÎMQ6—·Èµ’#ž‘tdKd7ó7ב Jæ{¦TшȌDÞ2ä*f&Ù Þ¦Ks¢s´¦b©4„ðID믾ó4dTEË‘}^Œ‰MQ+âë~k:bÒc'²¥äÈeV¸„鯨š7HVlDÚþ—´VeÛË{]D…Tý*b¡“¶¬˜‰¾‹•zt&YtÍÙcMzb³a1m›úe2æ«hš<ÏïHCT$-÷ˆºÕF-ÒX‰"êJIÒÊÞ¥n‘ŠÑ—´šñ±¶^œ‰IŠf•¥¤6% 6fÝS©—ôœ‰ôY½3u©’+­HD‰¤ŠGq¥F­l“3Í&A²Y=´mœÊF#üí¡/1’¥æD÷ÔùKÐ]M|•^{[™VZÔ‰”•™´˜n2d% ˆíT•³Eˆ».ÍÚ=²S2[œIÍó#‘PÙ–Y6NBg°˜FÓ"q=‹u¥d*¶ì¥‹~hDb'–˜ÅHÆÍšÑͳR,ð÷^!†Ÿ[sâ–"©ŒÄßfnœFAÿAþSýyü¹üû³h;!ñ¬ío7¿º ›Ô^dȵU6Fgù®È…œ"3kßüœ•tNFõ Íí'×V&Mòhß5Ì\IŒ'Bå^„­­¾[{VÑ*¶D…­‰shBcY%ÙYzسÉôI[šK¦ˆF)2P„oâTÄW&ŸVŒþ͵S¡Qº!Y7ÍrY„„܆ÒEÈñªYj©]k¡»ß‘£vÔÙ2CY²²4J16e[Û3䤚v†T¤xE­[¦‹°™-Ú79·!KåDjbe1P•bP‰Óÿ‰›;æ¹VMnæ\ESD%Ñ"™ügÈHÊ­Ø’[õÈ‚“ÓL‘¡m‰á&*›w“±—-"Kž›iuJ›¤óÐØþÔ+ ŒjÚ¡³H¿ÄÈ«RÔŠIn ›NÄ­D„ÉÐÈä‘&/F…§ÈÞª´_HeZ"ru#v4˜†v©ú›áš›ØZÝ(²£ôZÈCö7Ú3SÄœ2!» &_Ò±¼§ö”™Ð¹‘d¡}BlþTÉ^ü—ëÄh—¶z#t§QHñuŠ×ÖâZNÍ•·7»ÙÌÉkçVÔÌ\GdJ†².3“[³´’*•"lJÄï´fgµä&Ôž"/«FŸ7T„QJÚM^‘ÜHºçù.driûkÙµm ÷a ñõÆ›Ì'a,DQ’¾ûfÜ]3J*RÛÛ5Ö9‰DìK‘̤ŸD„DRÊÍ&.²>k6n—N†ù’Ø'JE®o93ÆT•ú5‡®uHe¹I%+$ ÎC6©BYa·'åGñ‘OWädù‘{3vDâTHAŠf^Šhèº&'DºtT2ø_M rdІ"´¤! JÕ¥R?Ýx¬Ó~É)Š…4gkfvÈì› w©Li{Ò(¶|Dý‘-´IóDVì3tÄí ¼d.i$IU%ÉHO¤› µLˆE'òY{lO'‚lÙ) N‘p•2.ÕPZ›õMïMMóëÓ¬NbhÌ0‰-ZE$øMÙ©¹QòXY¡6<—w|Á"3¶‘"Ý-4J¹¢XüÂ:}ͽDB¼û®«&ÆdÑH¨\ÈíR‘5”lFZ›h¹Z×:£3Dk¶&$ËÑ éª&Gägï$}àÍ’ö,IŸ]‘## +vRCVñè„Ñ#Ä¢*©}›4F«˜JÅL$Mé!Ý,5ÔV Œ7ÿøÉŲûNIÌbí}!ÿä´]—øÎö_±†ÏáLNI ÿô4$õ‹òäå¨fqh¶,HAŒ‰›Dlú´õ'%]ášÖ*ù,¬ìš§ìÚúd"g«!¾Y„sYS¤µ®¬ˆÛ)/Er0F„NiåˆN„šÕBI9*iVcHŒüªÑ~˜Ú´uó$h“ä1V¢YJ$IêAËôù÷ˆF„{„O¨–Xä¤d6%C=s± œ’æ÷wRL“£©gSF2ɈۺÖ‹# „Œ\]â“ é}bµĕ¹ž²+,a1‰,Ÿ?TŠDòøÇxñ^§‹#6´"-Ñp†ÄÄXL‰ «*~†D\N†÷µˆ^±{È"JLÈŠËå[rlI»eTŠ*s”¤#Ëò§k`„$Égê,B'S17©eYó6FŸÞѺõ%ÑjÔÎÛLE¹+·Äk¦Aóo5Q¡î†2Ñ%4·f¤âfN¬a3u6‚ê|ØKvÎ^…òí~¤ý%Æ‹ö"lݦa¦Ì~¦ ŠÈØK븓¥Y®Ù›ÝmOtѬÕˆEE÷îÞT ñÒŸOsÛ‰£DÛÓDtSvs!?Ê„ïÆ! òg7]ÔŽ¢MÆ¸Žº*~¦1‚n¬‘-{­}}{:’:i—1rΰL'ކí*¦¤æÈ„LŒ”ŒlO&Rfgt›ÌÌä×'%|,šº.&"e×>ùpÐF^•P”](ÙQ#îB-Ó.†dØd°kLRr$k¦¹Q.ÏþþT¶ù?YÒ‘‘#B2èäS0—šé–ÎÛ#E&Ú?*m0H›OÒ%4*MTEì†E&ùzUE›½idJH‰íØÍñ‘øž´fmf«o%fDk™ëG© ™‘JÍ ¨%›±÷ˆÓe‰’Æu„Oлt»"H«c#s5&DGJʘˆ œ&KgtŒ¤dÒDÒW´¦ˆÜš™Vçl€‘»ö¤C-·!fè· ª^Ù:9 ¥¯W%„[SÂY0‚3 P®›|f6ÛßÚ|rD½â;zù:}r%YPŽÉMBl¥%:Á»Yuä‰Yš²b*TÍ.F6ÊFFÙ˳ª#)ëªöù]E²'jÍÓ"+‘®aºÌ#=È­l%eí YæjŸb2|MoÈHÞ­IÌ%MÑÝpº¢h‰µ‘U£.tjŠØM¬È›+ZÉR"®6#*I§¼Ð‹QÒܦ]QY ‘jˆٙmI‹‰9‰Y2yÝæ­ËO‘z*LÉÍ`’Û „¬!³>T“e\Wúï›$R_´MÏÈ·bHd—fn_ÆìH¼ˆˆR焽ÿ«k´fõ&«daªÈ%B&ÜÂ;çhdþlë²/DÊȤøHÍã2Â&Tšh‹‹}Ìõ¥Õ“äN|K±&A¨äæ3PÔLÚ;5’±kéI7}ÚzË·fÓB¸‰‰eVE$ŽJ³é˜–VB4ø—#BÛïª"ôŸBu3?O÷j’J©i¹1,S J«ØÞÑŒ¼†uTˆD3A9y*]¢Db_>æ‘íQ´é]Љš-÷ZN&Íz Ä„›î“F¬‚lHtç—lL™#ØZô÷‰v!„¼ì™ªseDU'»æ~™·ÕÉIlEIq 1ªNÍvºü­ãELÝvŽUÚþìM"fg‰ÑXdB^©ga‘­5kͬ» %ÃB¯{´›·ÞdCBXÚÄY™î]>ØA‘:gCá6a2ªÂWv¤™•Ñœa*؈EØ‘}:Ldß1ºæœ³Ë¢Ü—fh¨÷fèTæè†ØBb]¯ZDɳbM"riXÈ´°ˆÏµ†öÞDml…«HÊĨ‰N»¢$WÄA˜Äi§Â"½d„­0›ˆKwÅRõKWé•lêßEYDFi؈ۡ!¹½T»ªhÆN—tÓ¦ÊÖˆ–!)¹>šˆ·»æ˜B#³Ï*Ò¾¬»q‘¤y¤Ø`¼t°ÄéHä±”öQŠÑŒJ™Ú唓l¤b3ÛпÔ#\Ý6šˆ½‘YÙlj%"B Dˆ¿¿®jÜ—i®¼•wŰѺ©&ÎÂClÖGg‰ýAŒÐŠlC~×ÛÞ^Òæé1lèú§TÄɵ×k<–™M3] ’%¬ŸÆ­•£O¡™¤º’W’F'Ù ÔÈŽŠjV[5µ‘ÍÍ£I]½ÖÏ)FFO=KYkC#%eHD$h¥J½-Q›MkRR_’*³Ï¥a1,'íùj’+³VÛBᮿœˆŒC)Œ‰ésKæ6]àÛ+•i'RVgËÑ«*“eÖ&“æÁ¦i‰HÖb* ·©¹]¡ ™«}¨H!•ð¹šTn&+*VLdI®K˭̉¦»oRdÈËkx$ÆÉZ!r«¤¾ÎŒßMÑœ©-ít˜Oô ±>iˆ¨2rÛ7xļÙõë›%×iÉgõHó d•çVDo²¶éçÁ¡+A)í¢Ô1Uë³£sFÈš´îªù+Vd·lÑöLo“®¤±ãÃ6h漚2fXX©’‘÷‰Y”ÛÛQɤNOž%"ÏDÕ¥®I‰#K :ít’Dïÿ_þŸüßú_÷OóÿðÏî;AÐZHÛ‹ß{úho~d±šÊ¨EK¬ŒÌÂ1Œit#õÄnèõÍ6«ù9]|ô®ªB7\+*vj‘LˆØD&†KIQrûÍ3þ¬K …_3]ncÓTO0±RyŽY›™³9.™s×ö W´Dð•/k³@ˆš41Ë3M2¡1|Yºb#B<̵õYÈjŽ!&°”ŽðšËM¼B¤&~ÇvªÒ½£@rÈolG7Gb±$&}˜ÏsUùÑ|ñ¯'¿­‰PÑ$ HFo6õˉÈÝRC*ØÚú‚þ‹äÉï+ -„¢D[„fhÆÍM/b&7|bB4ßEf¾U‘X½1„?ã1 –\iÑJ„ȉHùBD¤C¥ÐÕ ÷–+룦\E²¡½ÖÒt¨B1t]c]´W#C"%FÑ&̘žX…HFnýå'"xVÆíÙ“tïä%TTLÄófTm?ŽK Ù],iÄH¦šèimÕ ÕÌÄ©=‚ÙX›d7øÙŸ|EoV&1j‘>Ï¡S{–ÅMvUKö¤Ä¤™ŒÖŒÙåjJ‰Q²±»FGD¬´Ææt“‘¦&õbg˜ÃT%T›:¢ùz­ŽŒÉçèD‰.Ni8ŒD°3 _xCSôf¶òÑ“míìŽdA’ÚäÍ[F_çóÂn“"²ÝæÈÝNÐJÄdÆ­ò!ª¢iæÈ2ËfÊ–ïD¬ªŒ³eÖ iö¤FÉDN‹<ª•z£Ç1¹¶L—#e®L¿Ýá¦ÌÈš:ˆeù¯bI–e MQèš“ F„kº´—ì¹¢_7°'ŒÈÕ•*)"º¬•âÂfJN”O‘ž¦ZmÿFzÞëÉ<èÒ¢sa>g†ä[¿Õ› ‰áYRèÊ–âªb¬˜kb=#ÌWôÄÕššFäT#mÊŲ$VØJùJÉ[k™’(™K)›ÕWŠžY´‚rE5C·DÈÏZ!ˆÆd^Mæt›O†'IM¬Óº2ìiK6¢"X´O½Ã_ÃXªš×Ϫ:V×fh×Y؈š¥\Â1EHX…C±{[¢ª&4¤äeÞ¥ñu².A*ÔùwL!§ì¨‚IÚ¬UB1˜kÙ5鈓÷BeŒ‰„HD]ßúéþŽeF¢.3xÂ}ë6yW5]%Dâe5Â2zÅÓgD¹j+"H˜†ð…”Œf™d̰†1 —­ÂŠºX•È›æTV%¬üªšjñˆ i6zDœˆ¤¬ÎL½¬W\é%fÈfñmC{*EF0È"_2xÏ—ï½z“›4j“$Ö/T•¦34;üˆÍ{6]¾—ÇJš Œ$7ÈH%kPµPª.6røÿ;a¸µa„oz'[’MËLVk¬T„$ªÙ›µÆDK–ÝþñÈŒ‰´!’ý.ì«ò!7â=­‰¿²¡Ø©XšR„#üŠDÍw-ñ³æFfûR ÒÌÔ×RLš¬–ËSC&„»Gš‹…B2ƒ>kÉM:Èy¼¤—òݰ—²±¿MSÓ\‹Új"ˆbµ„´j’ÏÓúºx–§B ŸFR|„‘‹»RˆK¨‹v]ì%M%Y¡bÍŠÌ„ûDIјúF1Ñ;&þË´¯ì[£“ MÚó²ÿ0„œÏb6úÔŒRËR2¢ä' "X‰a±¾òTée'Ó#A/Œ–ÛR5'AzÂd"25’Â$G«Ú­Vˆ¤N Ô‹wF¨‘I¡­$ßâ+vl³£H…š-ä©:š ˆRN#FIÉÝ+Éé HבçH‹#ø¦ÆTìƒØF&¬Êm®ÆQ7*£ë7ù~3Iº¥­âG’‘Єk ‘"­·*-ú\þÚ@‘2¥DjŽÆXÈBdhD%6HØèêÛYuÁUj•y%iê+GºLÆS'M1*7âÅ{•œ—’—T‘<%¨PˆiºÛ¶6lZ‡S:I‘÷_4¤b[%1\KÓ<"ìUFRMZ¡’YÍWŒ”’FJƒdɬš¼´MºŠÍ›DÉcfFjO£ê¤V¶ÁÖÄEOT¹Tçm©’³eìM4øÊ'VTb$eB¥3Ä2±T'eŠ‘©£#{¾hëDŸOf˜­G·¥$/‰j!jhJ¾:Tš›$Œ3IšÏÖ£Û|^EDÓ&¬Ió#"tÈFZ¨ÌÈ#L¨µtÙ åPr’¤–µGº‘±éY¦Æ6dé6&Mº2þ¯[ZùlÚˆÙHœƒeËj7Õ ®J‘‰ª*¡"ºs-\õ¶Ñ¥dB`FˆÉdÏVUÒý©$I ê—²Zœ‘µèŒÕFùv1X¨»"ï—Îɦ¦Éìd‰:f­Òã äéi’üÚÕ.yzBFk¦F ’"£r{µdv­Í 3\z›¦ Û&¹»DŒM¨B6¹…ÿøÉųüNÿÿÁf½ C[´= ÐÂø“‡×݆PÙ$šlG2îÕ:0’4^úÍÛâwG­´™ ¨ŠŽªÈÉ¿­>”Ér+4ÌÃjÚyÖ§Hì7Ù”×^±‘Þ‰ÖdDÈ©[Rk{"&-)HúIJ¡?%h$16žú׳eHÓ"¢ÆÅ¾#oýœÕžË—¦l¿ÌÈBΆlh“%šL·'®&“2k;èØè}Ì¿BlŽŒÚòQ&<~û ™I#uªÐDíblC6é™j\„'DL,B!¬Ù¥-þ ’‰¬­B"W©üvÙ²v†ª‘?ÒdUY Ù›'«Ä'"Ve/’·Í|Uh$oL”¬]±$h«z­U˜NÒeÆA1"%ByxíÑ"I.IkbæëXÐMô]VB,Lñâ5DF%|Ðd1+"WDgÒ^WÂ-W©™2&c©:'äéÒºîa«X÷oêöT1scÂhnD|–\‚2’’¤„ÌÆTMÙtsAU쯒he©tq+±-I¤$óH¤%•¢L¢l½ºX\É„|ñ˜Æ:¢ïÍôÑ”‘½Ñ“ÊDÚ©Õ"™ÝŒh°ÔbRk†ô„r6ÅÅëHÕѤݾ¤N‰˜¾ˆlˆ¬ˆ×"eHõ‰ØDÅéa ô&E&}Øê\ú)˜¦ÄÈÛYq_¶HåÕ¢"XÑ%Õ!ž•>ªDlšËq>MI Ê—F$mÿĨ"fbI²îR,¨ûÃVȬFýWs7íÉâtKá:V!$IåšëSM/LÍu1;=®û«&™¼3"£A»¤èY=är"#d¨†‘¥a‘;y}^3Tâ¶HXˆ×®ß‹)2Vˆ…Ct§œÅ2¤Öë}¢^‹ ¾cýÐD1“$k²d%k’¥m’:zBXÈÑyìN…EÈÍá#ÈJCK>E«21³ïf1>ŠÆäb³a8³sr"Jbg$‰tý§ˆ*£wl†UŽ“""2[اK²E6t|IŒÎJE¥²¡º{kû­6Ã6Û[ d'ðGy†Mò›ôiôý%6û=©ÌdŸË«GM(ˆÛ²LšUm÷¼•Ds?©ó\ß$ýyŸº¤GŸ5$D¸È¨©»[-†6ÚÚ4×[7ôM÷.µT†V•_A‘¶–?jƒÍÙ왹¬J!5&nžTœúd3FTè–Æ’âŽïM”7ŠdV[³2,E›ß ‘»H’úÂq,'ÜéÉ ^êÒVöq›ḻ'k2éÙ1 ·c2fÑ2([óüÙHË»Íϯ! ½ÌB7ŒÈI&2"/I³"Ôä1.Žñ::¦¤J“Ô¸éfennb‘‰t4/Ëý}£2Àž:^D³ÌEÅìÓ))Rºl‰nÌ„–èO™ä¦ObŠ–ß˜ÅîÄ$©ªW:eŽ]èN“CQµ‰®T$VΚyjÔÛd.$í­q®[jx‡‰¿36FLŒDVTû¥Û›“á¢DÊ"ÞUèªFDbV/[‰_’V°Ô¬¨†DÝ3d×üA_FBçÒÚßÙpI6äIß{zR4%Ä‚3S3nteÍÑ*¤ÜªÏ±8Ü…¾óÑíÆn×2!¬KY[*2)½É4¨Ý32ý13ÉD¤È²@Л"íÕÓ‘yVfDë•/*+ ¬¨X’#2îΑ¡ ¢NDFZuìóu&É›²Ho18‚/ÅF1ã"hÑa2¥…»*~P…Úw6F!³#¤É¬DJ}(•’I³ÒŸ´ä¹%T2×µ›ßP5/W ˆÊÐL–N†Ñ°“ñmÉ6ëg-:é[6ƒ#*F¬©c&JÛfbMvDªëäe-VhL\Ji쉖™ÑŒÈ†½iS“™4R=¯dRyzšÒ\K*lDŸe‡xµªÃY„b!rÉj%Œfâ>4eÄôm˜ÞJ7I™Ss‹÷!ˆmu«2dµÆ›&‰‰‘d¤~K¯oYSC'[Ñ™‘X…’ro™ [¢·ñ¨o¤“ÅåÖj4fDëÕ ÑŽÎÓ¤b3ÚI:§&בSš·4&o¯„xÏa<ńْŠW’cT"jØ#lœÚ¿(ÈG"Mâº-[™8½È Z]RVèˆNÝs¥i<™±‰’§ßŸ¶$5¾F*&Û'vµˆB6¦»!Ôwì­tÖ'X訔•f±ÌŒl¤g8ÄOß66Xƒ-±ÈˆºÔ«”µ1L¤F&ÆN²kI¹6ºu–qré¾¢LE$TÊo ‘|%ÂÈ“H·bv^ÖHò³iеs.†Ú7$Ägñ^ÞÐØŒ„½ˆC.Uu¨ˆALJ¹¹¹!Sbkbô‰ÖEù˲&‰1&¨¤%“o}„Ä"H‘6<â?CbAH„»uR<à‰šfK|]Ñkö*XÈnÝn.‰Dþz7ÄŒÚå²xëÖ4BII̤¾*p xÐ@XÀ0x… éììnÆ<(C~Ø2•D'U.¢æ%éüÆbŠìÉ ‰`aq,µç¯èŸO47uWOÉ0ÈcF̄Ċ#CæèIåíÕ·æÒrclÅ©EÍ‘¤VfgÕ ãô}4ò¬_kB#]µÎdi¦Äb>$gjÙeÄ%êXÚ6²RTy›Ì!H3z®ŽÙ¢´TD{Q%e¶4±mù1ÿ‚hIÈÓ´±šZiÂoJLˆ©¾hŒhTÔÑs¸Š­¦o3JÐË_M)Ú¤ˆK´‰µ[ Ó£1’¤ÌíÚ%d.ªéóëÍÒaÐÒ ëJÌJ‰ïDÙTž®ßµ½¤¥XµJü"tꈘÎÍ™-Ù¶X”‘Ûx7kß&2¢B‘¤2HˆÝ#D϶俢Îì}òêK™=TïDù2žˆNÕgÏšçÚ^µ3d\2›¾y{ølš7FHÌõ&ORb_Ï#Ü\óÛî빤e­©)¶"VºˆD‹»yêcj™D•?5ú!¶ŸÍõH©djEC+EJ“kZñ$oní*$j&BîÚ7…•¾"XÝtbfJ”š‹¢TšÝÙ‘´È–ZºÛ"Ê.Œ‰dI癈‰“ÊÉ1;éá6X«t'ñ.JBb%j„ÜO;+fâhצjâC !h!²D3´(¦H¡- ’=p¹7f'Œ e¼‚Pk,…æIHpE…öZˆX5™# øªÆ“@Ž¡€´D °‹@TÑ…Mf(aUJµƒÉ¥¤„ ™B"ÂX¢3%]!†!XPh$!eá4 ç4[ARˆLP²ÏDHBJ’6„.i ™ÈHG¢ŒƒaHÖâ‚4ydˆÄl"@„ݨ,ëÙR$€HH #·HèœH‚"ÄcP#CII‰R2&Ò„J I64e‡(B+leâAžÇÌ ( ž@%MPNfV…5Y)DÌçXT»®ò–TÛkëBFS!12£Ý9=–I¡‰et‘µ•:ë²2m„65IF—Ó£YÝ‘$}ž/TñÝš¶VÕ¢7Õ¬ÔFQµ¨ñ8¤V±4Ddän½k2›I–S!ˆ„2™[±éõSÈRCNÙ¾kýZù½ÍѪ´¤2£ù(Ѳ™ÑSùpÝQFÕ£xúýMÞ³’)ÜÊgÒ*ÊÑ‘‘•‘[¬¶#Î4ñþˆF³»dq›]µÌ‰1V¦l©Û‘Í%j‰?x± ûÓ) D$N¸…ΆM؈šFd¸¯U–.6éõØ‘éz7Ab&îÉ^\ÎIù=d†ISõkeEV2¤F˜—‘M×ê¢O]Ù+B™9{R<ø>Œ­«HZ$f쮄–ÅIÝLÑ4™-%»Õ2tÕP̃"OzBä³[a&M›ÔéÅf¤÷3zjL]›KhM·zî±’¥Œj²vÛ5f‰æð•H³˜„fRKÆCw‘·úC5%®gÝZ"<õ/ fˆ•M¡/ĪKm~›²!Q#RD£â²#]¾2CD&nÙ6’¥ñ~¤d‹ýh’Â,˘ªœO A&y¹XVæ’£LŽ–F÷£nΑ¯4ÖY™±‘Õ"+BTþE%ih½±¾äˆ˜¡Õrv~l¤D¬¤b2D~{o4Ý!µÒÒhFL”Ï‹ˆª¢fÄ$é]>oQ$TŠ+#Šˆ,cé‰êôoúcm£"è­¤\Š“Ñ%Ÿ>¬a,b¯4D¨«z*bÌFtD†„†ðëë)­*J‹eÕ’Ö»”‹£ËƈB&$©eÄdÑ«Á ­¥”ÒĶ–ì‘~Ãa¤Èhf\žKj¢žó¶6µ¢b*b¬¶|„-ìH‚xBiàÓo¡¾÷ÚK$‰»Ü$ìÛfuœ…á&ÌJKuÚ©”M‘eÊŽŽØÎÕ2ionŒY¾‘Â4è¤fµ,×"ÚJt±ÙB6v0‰·{îÍH"iÄB ž¢I<‘$µd­¤6¾äóDûü™$ÄÄþ(ˆNškìB;·EíIOvL‘ò"·ò¸D­dƒX$‚%ÉêROYRFMöHÄ®ˆÅ“¨¤Ø™Ñ<7(„KžfÆxÛ¥ŒÅ&¼Ýù©–¼úˆÈÃyæiÄ» )Ib)’^²h.¾¥ÅÔÕ”²<6C[~c7$æBÒRï3"KNð¦fýÐÛKîÉ:ÄB&äˆFb£B"¦\Ol)_¤ÙQ&Ò§m]Óµ%âyDHšÙãRs^™Z+]ÊK’ø­¤Ù[¥b"7b%¹ /Œ‹ N’+-Êš¶çdÄZ¶‘(¹qÉhý ˆFÍÖ¤È5ÌÞs§©‹I¾Øm¶¶#b#³‘+%°„\Ý“#ʱ•’“.•·YíGKˆBFXDUŒ›+rFV°ÔÉRJä©ÝÓ[™šåðÆ'°¨N—–šõ/Èž Ìiö6GõM’EÉ’Sa‘)•XÖBx¤É u»«·KÝ%Ñ :ÎØÕ’“£Fc_Hè•6Ek6è™2É“kb²}¼f„ýÿøÉÅ´éN Jÿšÿ þ­þ†þ•þÓ´% øµx·™‡7áX“)‰RfÝêbqI5¨‰¬·#³[Õƒ-K9’¤³²*£$<-DMÄBå…Óš ¢q$“ÖŸ²×ÈHÌA’fªj{Ö+k¤dv2ç›ó3$œ©4Â5J»9>+½H“/‰F^ˆ3nÖ™!µ&ÆÞR!:¾Á¡|DÄRTTïÊçfGH%gNÍ’ JË,nž6#D-¸ébúÍ á :XѼTåÌbc4¡³$Ú®¥MÓ&‘“$[T¹KÝ’¶½2D\‘=›^‚Q“6BJoÆñ'Í»hɨ¤“̵ñˆ•¬7›ù’#»J¬ f„¥óN‘5«r¼ÈºT ˆBe’ ŒkPþÛy,nt–1™»g™fÉ?͹„±–²JR]Z™}Ìf!-슨y|Æ]q ѹ¹Â7iMk"6.w› ¹Äè}š³dųäBΤ†#sY¨‰Ä2y,4ð錑´µrI¶TR³O¾‚;T¨¬Ä’å¤!#kܨÒ7T>b«Ò“#?¸Ñí÷C6r ÔBFê›Öš}5â#fc<]ŸhŸ“$]>fHTÑ$M2'©;o6XQR«&I#MúM&©a¯aK—b*27!'¶I&19‘$›*i§%¤/&².6b&ˆXÒ-ù¡1|¤,“¡ljBîˆ#D}†­´6dÛ ‡J¦‘+™&7—udª¯¿‰|ŠF4D4&OçÆ±äõ—eõĪÈÙ{rC!“÷Ñ Ø&Ú†#5XK»<Þd ±]•í%åOitXÌfD†ÿ*K ˜¨‹‘7¢k•$%#k¾´ÃSÌDEÚ¡–j©ÛRÒ,2?3±<|Ya'uÓ1Ç‚%²BIs£ljxV‚Ää¢ÓglÝ8„DféV±È„'ÐКIê=’æ1gíÞõIRº¢¾Íì¡Ã"Ñ4lìÑ ”‰H\­ØÞ“MŠJ¨•’¦^\ã³T1`FÄítzÊ«1>«¼£fíÏ$i¶›ád]»G–1$Éb`‘:EÐú:Bı´Bví:vX’ZHâ"JÍç‘cX¥Ì×’š »ÄǃtKÌñ LÐOw#?­˜FD{§Z_Z,W»lÝ$FK~”ì\ú„„× Oñ3ÉŒ&­¼­1»ìxÊ7QDnµÈbM"bEÿ_»¹%lrEº§Fг¨_f«2 ‰‘ùª#.ûÍÙšÃ\Ad´„N‡¼Æ¨Ììñ¢4iI–RV†RÌ©j –¶í•—·’Ö퉩’öLÝjw—nK™3„º§7O6t”ê!4‰—M© ì™ëª+{XA+‰ã&n%5›v,ÈIˆ±¶Lʉë1 æ1²n‰'³4²µU-È茒C¥¾o1©»¥ûéIþLÚ&¨`ÛH¹ÙÿК±½c2“µ®6ª®]‰Z£½N"®×Þ¦U„ÖmŸ³fä'Rv&ö7fH“•!£D„ÉÌ•rÆI!¨–'eÑ»%V¹fΰ¤$ÐŽŠN‰B#ŽÅÕÞG#VTÆìš/ó@•¤Ö³fD6%‘œÔ‰ZdÄLM:Ø×:E2ÿ¥"²¬•„Zò3EF! Sºiác.F2´%"{´êÄJF†KÛšåÛöÚ“³+o‘žý‘+ø­Ùnˆ_<.”•ŸÐDÈÜ•…Iº=Õ!4KüJ‰‹uÊ™Y) ‹XbG]‘[\D5ÉOVvøÏ.º,"ÿÕ´/C3]eaÕ"Â,+I+®OYr™i­rZ‚b ³-bmz:Ne„M‘šòå•i%b•lµN‹:Éhhb6˜É™,t¬™6¶}1µ!ŸâéÒä4‰§ŒéS3®ºe$³_*¾Ú#F˜­ÚجdR#š3%h#K ™¶Hµ>Óm•’V5f¨]li “²èŒŒ·#rÛ÷%n™ Çž4CuÃT6MÕÙ·KrTfI2"|Ba˜†ËjFfÄO‘"ÖJŽD¦d¨™Ûä|ŒËúFaô¶ÜR13H‰²~Êž ÈTæ“tˆñZ“!,OåîF+K–b0jöÆÿÈŠh›BŸ,#V‹å¤¤+­äfm:òV¨™üTc"0’N™K”i)`Å×Â&#}¥¬’ÔæÊÆâ&!dZ“æå&Â/cØëÕ;³D“\ƶ)1bB>'Ây©/±Y­×+\ND}¹âO6ñ&²ô©›ÙÿF"É9¦²Ò§×´ä´†ClIºT¤H5b%XH¼/$&î¨Ýnm©Z‘“gÌ[>djÑž"ÔšI ŠD#m¨‰£õI…ÙˆE,m®]['Sj„¤¤ª±˜š¢Æ>%ë®T‚mêâ&w½Éef!»ÎÌQ9&nÄÈ"|nÒom¾.©&f¹6A2•+d\NgêƒT¯ ¬±ÑÉ9;;X¢â Í“²Û2eûMrˆ’ãÛÑIa™);yHm4rUÉ’]äÕéÿs+=2:Ö¾êÐÑ),:A ‰<2E'%‹c ”ˆœ‚DÅELKÃ#éWY|²®Æ"‘éf¡±|•²FžˆŒÈÛ§‚DÛ2:øìó\äÈÖü×zDé$7E¤¹'4d½5N«ö®ÉfžæäZ×PŽ© kxÆÜ–¶ŠÙeÌýz¦eÖ’‰œ“艒=ÈFêÈéâUŒ–úOu©² äl2b}].V¹Q)"ògÅêKu´ŽÚ꜉IÉDHKýL»[š®]~ä…hÔÓßMyZkDÌψ†tfÉ)+<Ý#ï ª$˜Ç Û±ò7-Ñ16hk"=X[±e¨¢­fIšÄDa%˼J¹39))3Ê·kbÅXJIXlƒ&RcBÊé?'°éõÐeE¶¹ÙÈÉ7ˆJÝß1©sSB5'ùΩQ93c-’¥eK+DÓ:®—ÍÊ»%z•¸‰®ÒšzFl$¤5T]"ݼŸ7Õ¡U+¶_Óæ˜Í Á˜M¨Ù¥,«Ø×rfø‰Qž²¾Z}K¬¹4ÑHI ÙÔÝ1˜‘‰­eó÷IN»M6™—™6š1Mˆ&lضU‹ôR¬èÛíR¸{•°­6ˆÑ ŒÉh›F"Åú“èézlF•ˆd´‰]9¦÷2%É ôÿI9óEÄ"Ï™ —é†þdJkP$Í´µ­ØKÐŽ×.¦üœŒL‹-uµWNÖ&Æ‚Ció}3§ÉÝ& µDÊD"&Y:¬Ô¨¹•QiŒ×NEf¨„dÕ™ý.3§Ñ•,"kí{-EHá Ć%þæ_–ÊIÙ):bº-^½æå7kÒUd‘‘̘ԓssÐé$ÿøÉŵîN#ÿ¸ÿNþõþ¼þ¥þ®þË´¦ ÀøÏ‘‡‡ß†8OÔV&¹³F‚xF‚CÄB.Œ["^(H€Œ³z uB#FPËõ@¦1!!ô²¦ ÁÂz&3…‘‘#>È¸Š„Ž!‘ B±£71‹¤R$°áñ, Ä€¡(aY «”Xˆa"›Žˆ¢[IåÑSÌHé1‹ŒìÉôD²öi6 •¹ªËý=5Óó®^CF=Vc"ÌLšydûä&\û­ofYž¡3µ"5¹ìDÛüE"4¥Ñ[ ™IôÏ#x˜’7ʉYˆLÍq>ÅVö)¡Õ+¢û±–k2?]Zä“lÌF›î˜˜B#x¦Ño–µÏ˜“ŸHÓéÆfLÛ!؈‹çùŠ‹™üvÉ^3ãTEí3xEÍ»ÄmÆÉ—¥b 5—|¯šÖsäQf¸–Lùy‘D©¤Lé“ʨòD[-©˜Œ³¤“YÉšrYºäʉÛdëq) ¡"Û"q’)©¡&©m½mž™©:¹©’Ô^Ý6Õ¿tõI‰öêËš'ÒR¦ä\‰b«$5þR 2" HTçB,£RùRT‡ýQúÞ%6ì‘m uoªV¡6¬L¸®‰/Ñ-O6"çݹ1˜‰²\†܈¨îÊÔ‹â¡ã%Ð\ª‹âKsf!òCkÓ4’6„ŸVF!Bûr–nIJTFÄ6}ânÕ[K?4‰ œ•lÍVNfæìDZ—ï¨BÙ$ÈßH›%J½'"®!‹5B~—¢D›¢k Z¬ý/…JÚvm£L™WdMs*! Z7§ŽÉ5ä¨×Cjk§®‰t"¤ˆ#biV}swbå‘¥–ÏÔDÜÖÍ™.D‚“Ë´F¾6 ¤GT;òš ‘#¶Œey)22Td¥HdˆFA±ô±;¬ÇE‰e¨äc>ëQ³Û*Q1bæÌzJ)²Ýaý'–kˆBBHD[*'¹:R¢Ã1b¶ÏUþ[©¨ªûœ•bkÛĤEB5bQwúCslÑódëHo™´dQ'ïÌŸ'‘n)4jm´ží=cµˆ­,d’ûZΈˆß~ÊBe&H•´Ù”Ï÷Â<»ÚTÖ<ŒÉìí&+âz‰C3F)! ]uªÏj­Þí6ƒÏ³"ưGF”ˆÉLDò*™¶TI¦µ‘õËjnÑIš(¢xÐȦð‰²SxI%{V—k™ó":âczŽCVìDv¯PŒÈLŽÆŸƈI¦ù=®]v+vÆBDÙªä\ÛuÉñ-Èbrdš«¢u­b ~D­:ì©Ñk “ÞŸb6µ‰RÔ‹¬$2£¤]8‹‰iž]ÈÔÈÒª>¤²dŒÃ!­¤èh“’ªµÞl™‘~K<‹/&&Ž•¦ Šäˆ2{L¬ÄTŒœJ{ÉU¤Ù%Ñ'#Ék¤Ól™¡£17mSì*äoòMW-"j–¥“¾ItãD'©š#%¹+)Jd^ÜÂ'ûƒ¬ˆ%4­™Õ=„× ßLr-1#R¢Ë~d¨eˆÈ¾ ˜–Ò2[ãb[ ¶g\¥èù´ŽFíSf%\ö"'ݓˮ‰¢·O°©^t%i×L—_™3#åÒIkd2³krÊÍ¿½ò‘,dm–|D,KíÄÛì-äíÑhš9¾ß‘—<¹%å!¼¡+/Lžß>iP×ZAQjfT4©’'¤KHþsá|²æðÍñŸ&B]µ%}}Ø…J–ZJIy§ÓÓ6«Q:%Ó0„‚h¦Ê\oZùbd­õö# ºšG¨ˆ%×! OIÒ2'IJ²Ö«*1_²LÒ|˜D²K팄ôŒaž¬&Tõ’b‘8Ì8Xüþ‡übÐr¶ö-IáÞT†F$xkü,)?t6Rl¨EgÛÝîf«v©Ú4÷5²z™ÚrffBa?ìB1{çmPÚõ*öhš9²nèæ$ÏãwA(ɲL$d»Å¨7„èÍ¥F©™Qª¨FO¿¿5ºöJN’V&_î#ÂŒƒ7’®#üˆlÑû6ú¬!#³zÔÝ"ªq&Æ©ˆN™kuòk½®_b ²+d‹34F¬ÓGMÆ"$TÚi¤¼¸žTTùäÙ:] 2*Êo™S˜Ô!U£*äX#ª±šÜŸˆ‰ˆJÊe·Á ‰Ÿr·Ýµ¶vV¢R¦¿"²IJfdLDÉM’t–¸6Ú6‘ß[¤Úñ-ªkHæ•¶ÅÒdˆZˆL‹‹¡—ìΟYLn“ÒRò&!’¤ÍZ§Ô©½Ú{â¢f–eK)P—°ó$$j–"ëdejÜ—‰¼êˆA„Oòø"d"Lž"mÆE9#m»Ÿ2[–èL³&„©rmywmù)ÙuAv—Ô‘;%K´K›äºYSJ´&]U.å„ò²¤|BU",Ñj6m3¥"3wެ%Ñ\Ê„ývÈÔ—äTÌD½˜G×ïZ:ëD„ejúæ¦DÌ䯂TN_]aòU4B¹¢íú®û&µË$!“T©õû32èJĪgK÷2=žl©q¾wE"'$Éš>ý¼ö²–t27­´I¶–+n‰ªfjJDf6š+,l„ä²$}ö®‹º5]$5„æ'õ<þE2$fÔŠöTJDZ×›†ÓYóïkj$¤œ›M2úµ6¤¯Ó¶s'¨“*#A"ÙI˜ŠÑO3m[q˜DÕ ®‘£s1óX’cΕPÞzé cªxçÙˆB.Ehˆn†èŠ˜»O_rC&󧋦&ÉRLk6¯ÒgO ñL!érºøòu%Ó•6“%\…9eßtL™žr£)4ú6ŒŠNÉ{‰&†!ˆI-nÌ¥6ñ D©&ÈȘëeíi9S8™ªcEëÍÛ¢ÎÍì°Ùc©º4V˜’¤v2fEßÔ™˜i“4k*ø©T¶ÔFˤÉêueTÑæ$ÚTˆ½,²\HN¨E´Dò±‰™P™ Þ±mÑÙ‘ìNÔ„}X¹ò¥ØðÄI¯‘´œ…¬í~òÜÈß%òNŒÉ|e1šn‰º“dA§vVkÛ´ÝýÝåIŠ˜k&™¤šï§ãiÙ›L›‘å[=È]4‰Q&æ^š1&1"{T‰6cF°ò[m"M¢¢&Ûu6d&¡D‘“"sn™H—bö™Uߤ5¤‰"+^„Ûi³¯ofF¢DrôÄf‚%©ãlˆúýv»ö|Øí–_‘³2Ì%Ä×94‰41…šFI樻?Ý4fFðÎkº!>ŠLÌï¦fν扽ÄM$ÑÑÑ:Ò!#i„¤Í­ÑHª°°‰>±-”¹F¿‘ã'˜jˆŠÔ­U¿‰“CM“çL¾D&2$GÆ©Y |ƒ6# ±¶¦G¨õÜè«ò§Ñ‰,ÔÛdÉ‘VÞ›1Ý©bóhJ•f‰ÌŒ™^ZC,Ü‘#shŠ®*{d" ƒf“Q'´Û*M! †aBÄ9’qd²¤‘LFA)"Z ‚!‚&¢2J Ÿ ñ£å HA /,ckÈ XȉàÆâBß!¼ˆBL*؈¤4,I&,ƒ$(Fm0ÊBId(’", FÛ9‘Ū´1E HFHˆA`˜)R&©X<%ŠB@b?S” h(VKØAÑn´¶Ô˜HÓ ‹!&Q2ˆ- ¤‘@‚l<‰gš%8AÌàÁ Ð"5 b - „±ÈÐŒæ@Õ‚æ’€±øDt"(":Mt!äEm2“Ú†iÿÔÙéP%˜·!±“EEcoº{2ô•žm–csO ‰D„¬š‰õyW%äˆEJ”êH„¨["rHŸ¹±µÓÜ™ŒºkÖ{I<ñvEžÝZ.fÛdÊÑŒ“XL‘ų̂†¸Åµ:ÜKöf× Ù9Ÿfc"dêÒ;_cÝj5%­1»*¥•‰´d³Í¡&m˜‰òÝ)$_Þº¦Ú¥¨ˆ‘ä„gF)'Ë2m·²ØìˆÒ¹"blJ&D3˘’’É¢dDòB<ÑHL™7T] RÔŒD5¨›UVÈj¨›×e&A,bŽ0ItŽ „²iÂSˆ#ȆC=7‘yf9!*Æ "j0 hTªBI BR `„I£0"™ÁÁϸC`²!™,Z,À²2-bY-@‰e Ä¡+‹ ^*!BÂÏ,(–†IB$1Z–L£ÇÄ—ì\6¥ Lq dJƒ$ /4” —Â(B" µp#=¬²j´LBÃF‰Ú´DäiB ‰d`‰’j?L€“8I€ˆC,ØPH¿FÅ©‘avÈ#òcŒŒŒ t$D’ Éá¦@”VˆÊ4å,)™X%>X,Ú ŒaHCB„"“ ˆ=,!B­ ™“òVB’#A0KR¡É¡>ÐC°Æ¤ HJ.D@œGâÑ:Ú˜(Á{É„J!?žpÅâÀ²dÐÈa %"ä!Ìk£ˆäLüO"'g0’‘Ý,QÂ"‚LÍ ‚”ø™3[¡m&–Ù3e°@‰’h' .o: [ÌÑe0¨(^VD74:XL! B4°H" ²h‚=†‹Fïï1""È¡ jGˆ0¢.8B!žPDÐX¡3"å»"Db’$T&*dŒ Ce£Ê…I°A÷!DÄ(™ ™¨ˆ7‚Ø›`‚“( ʘ¡b dI,©x-D¤;GX>yBN%0ÅúBDв¡&Ù„ž¥m¼ð’XYY‚ÎÚâ묤e¨¨DTŠh—I[æ­[=¥Mo®ÉX7vm»bBZddºÑ%›²fUFFëvDždvóÏ<„W’Ê׳xSLC&¨ž2_rÏrY˜™¯4žD¬bµ"xÌ‚Y™Ì%dYWbJ.éâµfNœŸ\’ÈšvŠ¿æF”‘r‹O&Ú¯ÖÚidɶñ›}‘‰I A6´³Å#GØ‹÷||ó#.D©c"]Òh¨¨™µšdD*!¢Ý1ó3³µÉª£¡·4ytÊ6"¶&Ñ:fX…U¨E«vÈOÅD+^Ñ´j´‚2&Ká$2∠H ÉA^BÅÁ‚ÁjBí‹åâ 1Ë7D&0µÓF(Âá"„$%a0A ‰1’ Šl4…ª˜Ë¼ AA44Åsx­…÷ ¢da [¡‰ ´âa S(€…åj] ðŒäpQ”ö­'>,)$$!h AÜÑ ‹Q(Q¼ü$$g„F† ßHP°¨X1kƈЦd”SQ"b¼©9¡D„Ò! Då)É ˜h‰C1BaEhJ,É¡ëB2 'àƒ²K0„ dF( $‰¢¥£B¶A=¤B¤”h£A Ó’Äð© Y‰Té‘ýˆš¤í$ØjåìBQH,€‚ „X‚BPŒa$5b™h‰¨ß%l<ò(³q’L𤎠Hª,E2A6KÝ£;6E„V𣯶Xo¤È‰¯4&TÉ<ÄeeU“MNédÓdˆÐD"9ZTà€0àP@þ/û[AÀݘŸŒGŸùn~8dóÖ‘ÕJ•òLÈA2db]f6ĉWtTºÍ&mÔU¼™:ÔÿF&a:)+Aˆi/}£šéËVÈyï"òjk¨™! z#HH‰—¥‚W“v~¢Ô&ÿ¢´¿cM½•„b"Â*³F½›e_F'³fµ$äRBK¯L©9›¢4K‘óNe¸˜Í¤›“²eM˜šTFßíÑ".’;÷Ão¦B§›U”ˆÙ-bOô¤#k÷DÂû{]soª±u™%Ë20b$ÇD‘!i¡²­XX[µ$¿Ò:'3äLJbf2L‰„íˆÁ ½³¶Ý»lëU[§¨]ÛHÂmì$¢"èø<-ªÞÌBÄZZ!¤xA ’Q‘h'‘…ô2¬COz1ë,H²HI±0‚á ÝL˜™âT¡¡%!x,D%Á*–"ˆžÌIJi9 „°¤Y|¤]à”3’’ÑðôB€’ð쉱ag6B’8Rhg/Á1ÔaL€„˜JH=!´b‡°d±# OF-µ‰x’„ˆN "Ra//òX!~:Ö‚.àJ LF!´ÔÕ$þ„ÌxРDLò £!0@[ñ"¢´”›‚Æ"Y1,R…Adh,Q¸€ ×³¦¸Æ,Aqjq™$.KHÇ“"q…’sBE ‰ kB,GÑq!­h‘3 ¡–"gàˆÐÊb#bg60,‘6µ¨¹‹@N$…´(ÃkóÈ‘@‘Ç L… H·f h™)bvCC0H(Hw§ŠX,C‚S,"Pâ2tUâP®Š "U¥#K wã1™bYˆÂxA™‹ 9Abh‡„B&”“˜*' ØFŠaP¶XA$ С’VJ&}ˆ$£3jšdL ´{$¤‚AXT´ð JþÁ x”™ð&4‰$!˜¨ È‘HÆX¿Ò±¦TY§Pb) ÙˆŒ$A y!E!†ŠlBR¬@¤ ä8„dG’ЈRô‚ ‘‚‚THÖDѰD@M4ш¢Ëb{>'îL!DAž(ŠH€¢ ¢–&±q·&™ˆ("H#CKP’cµiDAÑÁ¤È Ñ“#  `²eHA €X(H¨-1¸HcFw“GJÂ5­HDR)ItI?*ÖyŠ0²‹^D2H”T+R"{Èç“)6fœõ±-F=¥­þL&rnšêœˆL™3%j’[nÒ[ÅœE$&dE±ZG±†µ_6H…MUl˜K³!—"Ô°d¶ ¦D³BÁ+}™£b6Ý[Fª"«m2_XNÖýšË%åtv’VrRrh„™±"Ô¬I­ZŒžê»ª´ŠÈkVL›%4=˜˜ÈjKÚ›Ù­¾Ô‰{åÓTÆVõ’f‚'Bg頉ѓ4:bI‹‹'¬¶ô¢:FaR#jÂ7Ð6¾¤&;ª.‘ÚW6©üûÑSlÒË7ÛÆb4¶9hOzN‰48£œ1"A ‰EV˜B…ŠšyñM”v+„$ŽŠ†MȳIl&„@!"#j@Y'â6!/Ó‰`–8L$¹‘À~™8A¦,£È&„Ð&¢!ŠÂƒ'¡+ T& ™Aj ¡"‚ÔÊÔbm‚²Š¸ÂH†‰‚(E ‚ߊÚ„ $$xLž…húôJ)A "" ‚ˆ¢´™èñ}“"2^DJ”G‚¢a”Y‰è14YCŽAm „ E¬¢@$D·Â‚ùd«4Ò$±iAhF¯%Å‘I¶`…½!“@((#c‰›‘‰d$$^ˆ!¸ˆ@× I¶B…3BüvIvÂH*$ÈCú„J 2ÌìŠC’¨š ¤E!ô¶¡PÔSÐP±¥„Z$ ¤'ÄMˆ†¢QH $Ø’ÆÄ 1AišB2dpÙ?Æ XeTDQ!"@¦L0A •6™ â9{@”rÑ ¢$›'­ ¶uÜaá`㨦QƒP$…ˆ P†)! ‰a r]’Ä[3$È”%›HeˆQbcq& #å¯#HAÉ Â=ö˜LDŠC#µ˜$E “‰á ­L\,!º b›…T,)ÃQ=ÎÓBh†Y‹kˆ‰9 BÔ@™ˆ!*Y(’Õ¬HL\a/›OÆlM"öa›‚'"iŠ‚|! K¼‹àŒ˜$‚$D "ZbA0HjaÄX!‘…›ÃêH[Ûš (ˆ†'¡BƈHÂRÀPŒJ‘!By&!äRf  ŠB'3˜ ¥Dp˜n‚l0±EºhV,(†)Q2ˆ‚È""2xQEa´? «ú ”Ù" Í‹À–X³ÊÿøÉÅ·àNPÿ×ÿhÿþäþßÿÿL´ á˜Üyoÿã†8‘z B<hÅ@L‚z£v Œ $ÙâFB‰(F ŠòX!ôBÊæ%¢4á[ÏE —³()8Eö+A0Z+Ã&®‰DÖ"±0KSBe H/Ôsr!¢ÄjdIJÃE°DNDÁ€@Dk Eâ tÛÔÙ+LÚÄQì(Hˆ0¢.ZRj„ƒ$1= Q4@¦AÙFH. " ö¡Œ:S ›/±…Ùí…#èÀ‰!Bøˆ‚1 %„/"cPWF…BË00´‘IÍT$"Ò11 ÆEãFFbä^EG‚ØV$Ehô%@E"# Q3U˜L“)‘ Z·è ‚#¡9¢M(‘;UM‚&@BRx‚M”,"¦Î+,;,ÈHI"S¢™ Q@%ÙaÁR"`gd=öäÁ:A4 ¤&¤‹d)bí6"Òæ”İžÄ$‘E D‰~Ø‘ P‹7êU‰’¤ .&Ä!‘"Å“0FOÐŒ ‹fãp†DG!!ˆ×;L—,Ò¶!4d j"𘽢¦d„ µš<“FR¤DM¬ºÌÙÙˆ“UT±³Ã¢hÛ’´ù¯¬ÄMÒ -%Öd#"5Ui•>-ü¤„ÅïY>”ÍZ™,dFÄb{r,gr\}$ž>“%R%H/dˆ‚%a–ØHÕ=£Æ&i(½§-:f‘5düœ„œO`ŒßNèE„“RhË)j.fOaS|© °Ë´b@‰É”–5Iq¬×„hÏãÿ¾¥û%"stèþøÐŸt‚Döõ)µ&ïkC4µ"ªa&h›‰ã#U´i#z-I±"FÙãm>\Ö%úž¥Uj˜È…B)7o 36ߦJ‰›¤Í¨› ­p™22‹'ÂBn‚ÜËSÐ@Dé@¾I•Øyí8QX"S1@‰ˆ&„…!Ìí1CÄÑŠ= Áô=%,!,Ò]B°‚ŠcAà!ù9ž™lòG ”&BŽhP–aà–‰ilm6S¤P‚$A#A5Ôœh@µ«äGµ òcîHÂð¡Z P/°FƒY ©¡X¡…îD,²,‘/% ›"ˆCnÁ/) ³% D¸Ä™ÑK"a $”Ml[ Ë#ÑAn¤Öð“3Y‹ÙAAn8Dj†‰0„nÜÖÄÄ1¢WˆÑ¢æ¿u*&B&Þ³Tjžk}Û6™ejÉïUJM¬›Dö§‘#$b0›©£)ª1T×oÒÔFÒ’#ÂÅ^ûEE!l%•2S"âT¶£?΂6YZ+ú†Wë‚}Ø™/ZI’¶ÓTA)¥lTY|›k¼ÈEÍ=¶}ëäÑ¡ˆA¬k õFé)™s¥n©44_¹©d±c"-Ùž‘³ µ‚ ÄB9’6­±²dD\ BÄBô4“%¢°B€¹â4£øA kŠÅK¤:˜"1‘>…!FBj˜ L"ÂЖTHÄÖìÍ‘‰I„4|”ÇD ;…"& ±0‹³Ü<'IA¼ˆ@BãnB@†Ú"#ÓÒ0G&2q‹E¥ ,#Q#L,–m`ºQ!ª1&B"ABS²Q‹2ñcȘhH*JLdH!F²!‹¸M hD€¦#M1J 6R æI†\òBlr'‰ fA—Bˆ!*lƒ#Í#M™A 9¢@±-AXTJZØ#R‘LøiŽ:=‘¨E±`EÂ$È‚À,€4ÿøÉŸÍNÿ,þüþÑþ±þ þ£þ½þî´¶œ)µõW ?Î8‚ÀVKDȰ™X„D”0„kã I¹‰ HÁfž¦‘ ÅÐ"Ä!‘0ˆ4)³ò9%–¶Äº ËdtP† hD>á2"*6b –¡ketÈŒ#x‚A„‡¬Š!u¬^ ¬ÙÑþ*#’H׉Œ jÄš,Ä‚" AY ‚Z¥@Y¿3Í&Bj(H Šh¸»0‹â2ŽP$!~. &"Ö¨”#EDFµ™±-&!!ˆí^t˜‰H!É1:ÄàÝû D‚‹ip!„‚dd1cR‰ šÌˆJ1Ñf^x¤„:D!i‚bÅ Â("![AcA °­ ,k(]CA1&GâI ÃH'<äY5ÅM„ „³"à),I":1ÄŠ‰bì¼¼*X`–Ö†DŒLBdƒ„$FÁ4$G„í2&"Ä"I4‰¥%‚iD=JâiAT!X ‰ÀUM™?Äf væň$"s`°‰Á BhÒ ‚Ý2G‘³R±"Êa  þ bÐQˆÆ½|Ž8Q½ baV„L¢Dn s=©‰ zÐ@H&¶I" FQµ^!R2ªÅP›? á(¸Â:Lq %‰ÍA0Åc£A “ÔBbB¡6 Å¡$qijͰ‰RX•’ „$ðË4AEù ʈÁ6JaHFÐUÊÊ„‘Sèa,Û,Š4Ã.#‚‚Ú!áaR’i@@ˆ+2#&.Af3¾ c-…i‘j‘BLW˜‰",-(I;Íq H‰c,„±9ËBYäðšôpdè˜ÄŽ@Ü™-\±LZd+Ò! eˆÉÞÙ†Ò-bóA ™ÊX„™9'L’ã$Ä9@¤±s~„AÈâ‚OM©‘aÑB!…¤LQ™–ÄÄúPBF¬‹(Œð“Ò!KD‘DA,*4a_˜ËŠRf2e‰„-v  &bÂFS™$a4ˆÐ>|é ¡"PôÄ” ~ÍFEyB1 "‘Q"‚„„FD„DìäZK#‚ðLö€šJ›ÃXˆ dÁ±±ÁAdÇ((‚BàCA™bBy$[!ÚVL‘²ÂòñG(l’"y(„ÑQ,H,FF¢ N–ÀEÄD#LÂ! ‚2qÙ*6Å/B"&Ö),Hê-H‰0.B!³DËG"‰•2uˆ-ˆˆ¦­D;Zfb@Åé¡äN"Á@ˆ"B_¥‚,WJò(›9!coˆ”X@ˆ,”èQB˜˜¡m cœôD•å"4‹JD'*ÂbdÓMö€ i<ŒÒ… © b!A “4Œ–„b¯S7HÉ :|"á,%‹ˆ)¬iE(蘄‰$$&DbEÔ„ ‹RšÛœ™é8„Å£k­a”ÈD´ÄIªˆ!HW2'„‰s8BB‚YÜ ÑÄ ‘Åœ”,4i˜!DÄ!CÍðDÎË ´Ä>Õ¢…H Bˆ,I‚à'aBBr$‰0øŠsjÄB,ÅQ8"€šØµˆa~S5©!Œ ÀŒÂ5hPB*Hˆ ÞÊΔ!L¤SM #$(’MÐÅHXÑD'¹sTEÄ}?ì²¢åL†”“äÛIˆÆh¢"M&"¶¿®½ê´øË$ÙågY ‘äÄ5FÝ$¬É6eŠJË5‹I=Dóf„f*w„ò|J†Ì¯*]/’zH•¶ñæd¬µµ½uäm]³TÖ2&4HÈ»4Œ”ÈŸM¢XEJDÕúRÜ”«©‰FI™QsM_Ì˜É ›&«rVN²2JÊÊJhoY96„ÌÄ\M«Óˆ…[n]~ˆöÅ%RR£cRTDÖKñã%JI×uÄD“ãI1—¢¡—JfD„1 ¡™©dä½¹äwź“&dàР€@ `ÿÿ›AºßpkŽïùÈa~b‡ÑcÞ’(^ÂM#$¸$„ Xz‘’&“t«9š<˜#Ö@" !¶b‹AdEt!LAÁJ4žM ¦¼²tJ8Œ ‹&-PË)[‚ Ö1<‹P™È2h„ô8‰¢Âqa †Öb‘"™‘8CPHˆ&bze D‰ÏÄ#@(Š`Ði£ ±ŒÎ$®BE±qB †Ù„ð,– Â{(Ä„üŠˆ%Ç €‚UbG±ãh[(Zª ±ŒA+À’ Ú !Û±„“"{j!löBM A ‹H,FSÒÒD«Îp”ÐN ‰©1BÂF…ñ"!H„Êp•C(Ôah…±<*†QA´jê4b4Zƒw„6sNA! ¨tˆŠ%''dš bðCI„lŶYbJD$„ 6‹HÈF°HÂG¥6·^ê D % ù¡XÄ“"ÃðÉ Â!<„IWˆŒ‰ÈŒ%AeS"HhA´ƒFª`‚A'ÆH‚h-€‚åy)Ô‘…­¨T YŸ¢A ¢!V ðY±+ “˜°Ð¶‚xŸFQÁQ¡é"&‚  ²Ôê‡)ÈF‰Î,Ò“kpAb‹T„±pJèZ,’)òDH˜ØB2†HŠ „¸r†"-&qZo&ÂI4ÖB ‡þ ŠI`›AA`‚-H‘s"”„E#`˜‘3ǰ,¡eÈÊ)ž mc$-˜,²MŠ¡šÈæG„(&¡Dlœ$ #Äi¬P¬#6 Ï‚F(Ì!p Œ“a‘À  D {)A²dô‚Ї·tšu "R a! “-T‘Den\èiøy 2‘ R#-Œ,A)QÂfÚL%ˆ\ÙsY—GˆDrbb€H(†E¹v© C½…I¼É(„2%5^È B$[¸¬ÄLdIG£X!ÄÔ„ ‘@"Jz¤çU£„h*gè‹(È=&$"$Z’»“ä ƒÓXA ”Y” ,D‰ÂEPâ…EˆX‹Â$H :H~ñ2–´x¿ˆ²ÊZ$(E&,#T"´FP¼˜n$LW‹œ(„„à’Œ­Âˆx²žˆ–‡4y† ŒG¨‹l@R$ˆ )†‘  3 `Ž8‰µÍ!m&bP°‚Z¤!T'$†ý¢j âfÀâ/Bd‚DAnæÄBS õácˆYç4 Ђb„v!b€E "ar‹M‹PÙoаÄÍ÷T‚DPŽf HUÃZ’bhTSduPH-M F&Â’<²P]2T)F2ÑnåQt¤„ ”‘/ ADáäÄHe¨…y­M2ðD ‡ö’ ÓPP—"@ˆ4öÔÉTÄfÞL $:°°²"ò ˜¢—ÒôD¨†bÚ<ŒE (,’‘"Bf£Aj%ˆ&j†¶àG 72#,dñ!&-x!J$¢!1aLÙ&‘4ø!-BHSD¶”SDbŠ^ØAm'PÆU¬•d a ”¬È&Ó!©£zQߌ%!PQ ÑÁwb0Hš!E„3#$ÔÐ*F$¤ˆA5) L‹Õ3ñJ¡8¶bx†§–‚+ ‰  QH¡1DªlÕ¡a3$¦c,A!ÂdÑÜ" … ü‘ ME ˜>e E0 “‰Ây· ¹¢($[ó4,I"eMA‘}ŠÄg!BDdz–ÄÑ"B…†jµ%…A'•‚Sò hËÐ͘HB¡1, )š ‚’ò3˜“¡BIÂ&PÍ&B˜L„(®…!‚Ñ@BË=)„‘2Iˆ¤"Mí”%¢Â¢ƒ ‘jBTÇ€BI’ „ h„æ„Á$÷ï&ï/h%‹ŒÈ@HDÂdY­pHɰå‘d ˜/}˜ K#…V9BAVBYC*‡ìL Ì‚Y?)3dšS#A¢Q:_Å€‰ŠIyB„E„6òpŠ5˜ÌhJÚ x¢´d‚E<ˆQŒ$Q‰‘yY Â9a*PBL"!P±‰Ä¶Ç‡l"*© ­P ˆšÉ&L’PâÙDªLZE¤E4À„´(F$R‚†áQXÌv>öÌÈÁh*Ñ&¥!F!‰F/pÕð‰Bʱ”,@"FŒL% (¦ †¹CBJÈh·:dE·@JÈ,2΢B³pЀ*!`T jL‚aK„FR/£ \Y£;3Ä!ñHAm,$%¸D ó“oãa ²4!ˆ€PPX# "û"* Ô± vƒƒ IJ´¤…äƒc³ó+¤È˜=Ô±bB©)K)D‚ô&9eµÐfd ï‚:T UHÆ´J1^)àpõàž lH’‚- A"Á<‚ †jH$! s ß’1 ]¬Ê³Âa)H^ƒ‚ЄIf.ðÂEJ±ÁeÄTP˜¤Aµ£±X‹II¨Ña9 ›*y‘ Ó ·äyX(…ÅÀ‹ =ÐB°I“Ñ )$š$±´X# $ "ZÑÈP^#Dy YVª„Ûd,$‚p…”"» Ù%•{{¿ˆÍùµZ¶M{f")º¨—cRf„—ßlÎE'¬µ|IõtI̺ßÈfL†A7\‰¤!vLEe[-xòhFhÊÚEt¹ˆk ›ÉTSih“tw×ÏÙ¶ïHÂQDFJâbnŠˆ2$­tÞ˺ižªÄtI¯V‘“DZ…b4"*yÕysyÜÔȵU’7¹ ¦!£"mU§kâ%S2MÒÙ<¥¢*.D]uµ;´Ù#F“­G#C'乬֯A#1‰&ѵf¶d±›FŠýô&¯yP—=ÒÉ£ÜÚ",Û&%\‹ùr¡)7FôØ0HA!ðˆ#„B¢BQA#;† Šz–mä‚LaB 0ˆ¥æ—%TÄÑ žbhQ‹ “L „‰ˆ²„IsT“cPÙÓ% À°’ÅŠˆš5B¤% Ë`î!<‡%7ެ¶E–ˆZe‰ŠÊI®E‰ðÑäT$ÊÍ_¦O-‚™è2D˜Ä“c)Ì"”‰“à”ÅÁy#jvA¹M6®H‘VF¸ÉhCLÂT-@°P°VQXBeqa…$Ä%(*"9…#4üY ¯D!?´Åko\D”±ÀRœd,‚"%ZIB‘ äÓÖ2'b¡A3ÔÂL€EÄɱ (QÅE›†\4b$}pš „BxŒP±ôP "EÍ ¦a¡Q‰N$c|! ¡L4c0„P²Nf$*™$l(„š˜ˆ–ˆIY9ˆË™"$C‚æ<-1!©¤W“­™aVl¨PREˆˆG-\`¥A G‹=$b” ¼# &˜ˆ¢„K‘ ˆ€©'R‹9#G¬HÈM …‘„Hæ¥Åb{µ‚7É ¤ZH"‰H‚&# Öˆ…D=YHBŸZ6$2(¸”dlBeã‘m’¢#c‚ $PX,"H†K#@“REJpÉ ©}¡E–„ÊI H³Ž X²dµ3‹!~ËTe±ÒBÃpŒ" bˆ ˆ\ˆb a A 0 Š J1*H!)(r¤€P#L ` @¨D & @–„5”,˜DÂ"a‰ƒŒD±‰@‰ Fdˆ€A@!gÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¥õ€Ü­€o'ÿÞZ ¢ñFô0|hCø‰ad„NžBÂÓ DP™,XHÑ„á:ECÐtÔäbq %“!!0H¨Ä…„5"É™²ó…$Ô˜¸Ân E¦A–Wip‘2ä4ñ ‚Ù ¡ˆÂP/ˆ×ŠIM˜D#PÙ 5@N9„&ªjx"ÉÛ ˆKT¦! °@\+†Œ¬ƒçËÚ,ŒÐDSŠó± ! „i´Se TPÄ4È KN.Ê HVQd)ÒŦP(³~w¶º$ øLL’.$D"MA"Y&5àC9 —†ÜD„yØIB," T•‰°ž²°ŠƒÐÅ£kÈ¢é6P„‚…’Ä ˆXœÌL0ÚE5 Œ#‘ˆ– ¨"µ„d¬I,MD"\œ¾ÂhòKÍh‚‚È= *!‚"51'žè¬LFìe—X™x‹h$Mxe b#š"¶žH„ÄSB5B§^AdBEâ4&0ƒÑ’¶#b¢•±¢L¤ (‘… Y5Ri OÜXX‚$9…•øH!9¥ ìRª£O226A°¡¦sØD(¤À©L-Š" †PHIÈõ¡(2cXû “ÚÀX&’hD $ÄÐI:`¶@ô0K}æX^‘Ai0…IUI ±d7dH؉SÌòåâ ©â„@BlBYå^¬˜l’sˆ†OP(P&‚œB, ¤L±J ‰b9¿òóh`…ˆß"10„DPH€¤ 1 D…@šé™”‘ Nò& ˜Ÿ¢r!`´XfV()Cz¨J4Öd3 ‰”P¢! D± …6l”•Ë¿ÉáI$ò\$$aD\B,A‰š5‘!"!ÞÃKNq‚B¥¡DB""$G¤\І)Ã#ÄÀœÞ"ÒYBas¬²eÔó 7 v‘BDBˆY„ˆ±ˆ¹¦•9Œ&7™„,«Y,D€…Âi"y]{$Ô~6ŒFF‚ „"#B0$   œ# He›i‹Ká —XæPNåÞ²A V D.rLL"a4A S’e¢` E$…-%‰ &d[{M„ÙDCN“D‘[N ’$*… ˆX,&ìÈbb2ý õjÁaHŽ ‰ÄK’²µ´7Tä#kG£DÔr ˆN@¢X²!¼„$l­$179 ˜–& (AAj¨^‘º¬ÉPI42HŽ¢Q YB&¬¢"<˜"‹ †Q¸Ä†T°!.Ú,CqQ“ˆ¯Û$ OyPÈÅ´N,‰v†!‘2ž“Áu›;1o„b“j\„ÉÉ "h$"(/4Œ!4Ä-5DŠåÉ&†ÚÍ10–G,$‚=is+#F9Â(ðùAš‚ „‚B#‚‘’. ¢ Q„R&AM°dÌŒ¬‰¤T §­1(½ ž­JRRÂ'„„€–#$"X‘ˆ‚ &ßö˜Q{‘)í¦–D A(œ”Ũq ”1„Þí5BA5+bÄaD‰i<& •íŒt)šx," {ŒXºAL‰!µ’²³‚×MJD… @NÈBBD‘mF‰¡ŠQH4’‘( ›º@Æq…ŠIQy*œ „"Ä<1”=„ÀHBÐ(.Y«HQe Å<Ç !,+ØÑ RY%‡‹&PDÂDh,Ê©J-ˆˆ!2O0ù‰‰Ä †¬“iZä wDI,EkZòæ‰'ÚØ™³[;OU’24dä”…™hŒ†é¬ßfózEG÷æê—3䔌ÈÍ‘&Leþä¿·µÍHÕYÅdí³XzÔSM Q5N$4‰®l×­…©šíªß¶ÆzÕ£eŠ[ ؈ldX«ªì×@™1êäN‘7MÓk#é2â¼äȇH!*á*Ò7ÞÉ$Æy­)0ÑȉK[ôÛ'†êÂ^¹¥„_ºŒ—M ›ÐyI´©IÚXlš*Š ’TãË—‹–hD*"yÖHe.Al1J Pð`vÐXÔU€Ô‚€€à À€8€Î9„ë –;i¤’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$’I$ hÿøyÅ»ÿBØNminiaudio-0.11.22/data/48000-stereo.ogg000066400000000000000000017055541475701111600172400ustar00rootroot00000000000000OggS&¡€cŸ;vorbis€»q¸OggS&¡€cRÉ ±Dÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‘vorbis4Xiph.Org libVorbis I 20200704 (Reducing Environment)vorbis)BCV1L Å€ÐU`$)“fI)¥”¡(y˜”HI)¥”Å0‰˜”‰ÅcŒ1ÆcŒ1ÆcŒ 4d€( Ž£æIjÎ9g'Žr 9iN8§ ŠQà9 Âõ&cn¦´¦knÎ)% Y@H!…RH!…bˆ!†bˆ!‡rÈ!§œr *¨ ‚ 2È ƒL2餓N:騣Ž:ê(´ÐB -´ÒJL1ÕVc®½]|sÎ9çœsÎ9çœsÎ BCV BdB!…Rˆ)¦˜r 2È€ÐU €G‘I±˱ÍÑ$Oò,Q5Ñ3ESTMUUUUu]Wve×vu×v}Y˜…[¸}Y¸…[Ø…]÷…a†a†a†aø}ß÷}ß÷} 4d  #9–ã)¢"¢â9¢„†¬d ’")’£I¦fj®i›¶h«¶m˲,˲ „†¬ iš¦iš¦iš¦iš¦iš¦iš¦išfY–eY–eY–eY–eY–eY–eY–eY–eY–eY–eY–eY–eY@hÈ*@@ÇqÇq$ER$Çr, YÈ@R,År4Gs4Çs<Çs@BDFHJLNP@OggSÀ:&¡€ccs¶,#'IHHEôüýÿÿÿÿÿÿÿÿ/ÿÿÿÌ4ÇânýZ ÂL³¯Þ6oÕ $ILf&S ©öBðÊv]ø]ì<‹?‰§á×*ÌvÐŽ³ä›>+ßÖa¶{úI•°qm|¼`´A è P‚ `phk+) VÈ5o|ÏVÝÊQ™uE±eV–Ì=á»Ç³ýÕºÍ9Á‹Ç³ýÕ>º^S¿Õ"1K À´7Ô´ªª]Q&±ºûû{³B„DÑ+kjIEF]9¹8ËÑ¥ >`FKþÚ¥º9“4y‡Ñ’³Ku³þ"i ¾~KØH5¦Å°Wô¢(ZÕ4Ö¢`‹èP ++zK^!õRxÀßN>i«% RË~Ô~ÏÒÿ†îÑ«eì÷,ýèn¹¹u£  ·0ÆQ«VEQÄŠè(²Ü‡k†­ç×I¥@ÕÆŽL‘°ØÊçËÚöÜhö;Ò*úVj÷çF2ß‘V±´êP~«÷Nê„È•„½ý Ó‰ø Ä܆c@F%")I«† 6j±±«‹9Ôvƒñn ÞRóª6%icBDÓÔÈ(b1TL{¡`À ¾}øð‚¦‹‹JuP[*ª¸]@b¨¼Õ'盼¯‰ôªÅ´kíЀ ‚31H qýd÷zc0b -#€‘°Ht8º¢B¸‰Ÿ¤?ûh‡G rÒUÀÀ‡cdl`BW(‘ –l{v‘€€A~÷~E&EîÒ:Smx÷~EEíR:smø¢¬FœV*+5ddN)‰âÊÚ Ê Hí 0ÛcfÞ á @einpo#Änì•+}C¶hSDÅŒˆYAÌqÀÞëDM2 & ®Ÿ¨lÀJŠ˜¶Èˆ”¨MVmƪ ¨äšµ:¡Å$ªÐЋB¨l€c*ı,1¨+˜@²1B±-„ VõX46Z=hDe‘ŽRp±‹ð@ŒˆP†0ƒV…¡B,ä´ )²=¿¨ ‚­¬"Ì6÷ÜXæo!) µáÜs£Ù¿ ˜¢QB­ø¨!eq² ²xw5QJz«¥wô.l~Öå- )ÈQCM+£²Î ‘Êú”̵UCÀ;æüYv:¦+*à …Õ9AE1,Á@€úZx%; ÑØ„VÅ4'½JÔ4­!*ÄØ59 €aJH³èEhw´lPÈØ¶lÚ$kS@<7(ì"B/p^ÈN0Ò[ K"á*1(L(´ûgöMdÑm˜¾1 À?±Œ ÆÞ$¨ÐR h&¸}bQ0€Æq ¢P`~ ~%KLÒJPæEƒï¸ÂÕ.M¤u+þÞTë„(æôµ/@¾ä‰ `«÷¥Ú  @$T J)¸?;dÅC¿ÔG® ®ŽMÔ&!‹(B]Q$äã*„ýLÎb¨è¦Š÷x‹Y(B8ÁúÂJ¿€K ¼ ‘ušʰ (Ûj*´!d|¼`Œ%ˆj@Ù5 EœÉI"lÉž þ‰L6Üë@€{yS)iò.ìoƒA(2}ÂD Í] ãÄ6öú9<@FPxÀ"À ÌtTøÀîB0A²•¯„Ža„£C% H=%€ÀÂ>Ý ó'&iŽB\çâ\t£™A;Ô§øŒ ëPfE]€dT(Úû¾û9ÄQT€°““”íV5A– @ ­ƒyûn²/!Êrh±9CñghÜ@ë-Æp ;×€ÍOÖPAG²iÏðž,E`Ð*QòÛ· €Â¾,_]rÈm±ñ@ĉ|hYAUÈ"Úb Œ6UKØXP¥!H”·”'Ë”¢Ã7^4ws Ÿ $„©ÅÃq¥IÔ0غ b†”lB …@ª…ͨBÁ£ƒ£Š“cÁS/Ù¤í@AF‰ ‰86@ 0†`Çê0°(^ÝÀÞ<fšÄI7ÌþMÂUJu+~˜(2ëVT¢.ä©7=-Añ¦2•‘ ¬Ün aß| k&È À"½}i££©4%cµÇV GÛë6±ºA£‹– Ƥ~²è0Žà‚ª¨"Ü…8B­g ¸bˆ”¾½w\_R R †y²ÆU\=l«£ê*‚H¸¬£¨™ìALÀÙR,€*tŸJy#DqÎÈÙ F2ē貮 0rÔT­ &‚,dp˜Ø`KÄ@h fdj¶ÔŒ5„² FÎÈ"zü`i[A;°– °A1V@L@À` ÒQÉ^fÿ’ šSG\WŹé†ÙÍN”«bB½ŠÏTŠŒ“)꼩{¢ xÅ ‰fß×Ù6‹N $$¢†ìÞCk¼–%`ÊëW« àT<­ªõ˜ ¯"ŸÄi©n'@E«kŽaˆ‡Ã gºhÐ’~§ ÷1¬†2P'ÆöÂú£-K5•2ןM*A:Hhf(”ØagªØƒ Ò™KUq±†U×UÐï)ŒfIÍz(…Þ~ p¨›w_‰HdQ±Q\H  @õ@Ì 6\ ‹aRÈj‘--€0@‚èEÀ|Á_ËÚfVè¶ÉNꀌ‹J°Q, @•À኷Y€sÀ€žRþÄJ$©TP¯ñn:Ìþ!‰¤5%rýÿßXÝ´Ÿ€ÔÄ€£0=È·v´nˆ dR”¨T@r¢¢ñbüÅ"=ðˆ%©h¿‘ ‰T;¢ @äéÆCÌUÑKI±¥Â”âø'ZÊãéš1¯:f”èzŒ_ìZˆö®EcP4Ìa³ª> ËÊS0@$@p=Ç ‚¬µÉa×± DCüàBÐ)L?n7` „ÀÓI›zÈiCêÊhT’Û¡… FaA ‚,Ùa„f@O5 °B–+}n€2pˆF´Ð1P« @ @ ~ÝÀú7$©VP·ámºaæßX‰4ì©ø äj‰UÉiÞ3Gõdd‘ -.@ÿ€„uó£ípŒ Ê:-ˆ8á],°ãZ·-)x;*‘ I§êÚXòq€à|Æ µo†˜BÕdŠ¢©ÞQp B@†i”qFb^öqÀ6½ŸY AU° hÙàlkÍjj€ËM[ê¤ È£ä”Egç6*ƒA#NÊÆ.€DU§ýjZžVóÁ!^$« –•GOžOŒØ,!Ðè’;VÇqØŒQPDÉÀÑB («³;³é¦¨d]@L.$Xˆ ˆ.ŒöœÐ?U`YH Ð }‚ºFO*À º€4ªAÂu¸Ö0’i*·¦ï (Ò÷4é“ à…@ÀØ `€ €ÎZ} >ÇÌ…¿#2"]]”šâÜs üMDztIeC}Š€o±é׊ê$SU•$JôHâ SU Å(¦%a_XDnÔÆT ~&B˜Bî®c³¶r !1‘WÃò¡CýÚ²Y}âÓ¾Ô7\Léò¥Ìu ÃלpFlü +XXšè«Y– #X.O ƒ•¢$›r€n½Ê4Dý1ÖÓA‚àB¡€x†ƒÖB`\?:×¼íд¢–0çÐÊéµ”õÈ¢Øó3 ·1gŠ€X]U¥\@¡g±uÖM9-uSAÍõ¾£XuJ_©Á1Ñ(+¹5K2™@lÞ9ÇPÞRëo5²f £º4ÍBãU7¢^¨ØæÙSÄBn»“w±kHQ •õ‘(E.Põ ã Íd žQj…ÉuÕ±ôu¯(29²!U$.%…&­a`ÏÉN× T…`¯Ò"üî^¶ "VqðX’5df€¤% :€l+€–§°0ä9úyüGwüs›xØ7“«›0Eb÷Ü û'†ÖÔ¡~ŠqÐ ³‚Tê`Oã 'ê­Ê⎶łջˆ ØÜǬƒZSѪ$ @PîˆÖõÇIðj‚íKÓ9m$™TjϹZL¥!A¼c+ô5}0ÈÁ¨Á’fRE‚¢aÐ Ô¾]êOlP0Ü„¿(lí1ÜT`{àIçLCI¶KHÀ$u’ 1LÖ˜@)¥à‹¸$k°1ÖdР*$ï +M,$· „‚»‘ ØH‚ !§MÓ}SÁ^+šÅuð°,ÀJîa„—Dê€Úòmi`=pÚž<þ0ÀI^×?# knÇu+ÎA‡e~b“TYP¯Â ´ž[K’µïH'‰9P ­}úû>:˜Ô:R¥(JA´fÐø’xmbcP3§$u òGI)vÍJûWBhcÞ›@vâ5Î3€Ñ׈/è¢ÉÚ&À>PüÛ6æ`×L?ªdõúŒ€ýΙÚçX xT€!C;›Ì‰  š„œ#Ìh/8~_áw[¡¨¦‚Â@<Á/  Áè4X@#ø¼ ªÄ€=A­G;›pF @9$ù»%T芞ÞA#+ Ph N ¢X<8Àx èÃLJOggSÀv&¡€cTÎ`ÿ;ÿ$ÿ7ÿAÿ2ÿ:ÿ6ÿ5ÿ øÿÿ ÿÿÿ+žÇ̪߱RÐ÷aAM1ï9`ÿÊЪ¢^Å?À-‰>R7gß$ÈÖ ºqbˇOåÛ*­ @WRÊ °ãxcÒØŒŸAP_[·A«©F÷³+òÍÏ’‡° !3/©‡bK@tÿ_ 4¥N¦¶¹¿  ^ $Ÿ³ ‚‚%9Ÿ&üaÊ: –÷,û$ÀK͘—R$·uWTÀ. ”`-šÔ9Pé0QΔÃJ½)ÈìmFh%H ‡‰)}5 »°j²HÔÐcÃ’aÖ,"ÉPØ6`TAÐb ]æ²Ä@ˆ5bléÖŽÀCÙÓdŽ#P^e–ÝÐ…*³0 €xpÀgà娤lEÛDA8ÀŽx ¾ÇÌ[›µk.¨Ûp°6‘ˆ¥}L¨Oñ0®¿{ÄÔ-cñ+µoÀ{j?bŽ™*Eg®ªL¹$2é[ë;Õ®¿¼ 6Û»zš Ë;¯ˆøä©m•¡±> ɨ `iÆÑæ’P¤6eõþs•VÁ{5<%} HÏî5%ýd~fBCѪëlº; I Û»&ªdŒŒÅŸ×Ô‹Q o8Nˆµ°u€±¨€@$ŠÊFŸFÃ}J ô ,€A°[À4IrRÀ@ECÚ¿!-@Ð7Yˆ«HZ#@1è€Æºà=  ?à˦ù½ž+ Øô †5îóA“3ˆ Õ€€@`žÇ¦ü”¡b‡zóžCÊæ‘TéP?Å?À§PÔ¦X Ú5€ÎZí‹N€òä6G§Ñ£ªÊ&BRè °®˜¸-62ÔóµÅûwç* û?¶øÐ8H¹y2PebF?ý× ZÁ4å"eEѸ@ƒ¥ôÖ¹”íãË$ÊhXL+h¬n¶EŒ½+ËUÁÁŽM.bXƒ´¡Ëw€¥"ØMN Gª2ÄÊ9ʰ1Ct†ò]@€ Pù± 4T•ÕM-ˆuƒœPAŒ.D“¦ÔK0 È”Àf À„ö÷ 0hÅ!t(š0€€€iÏŽÙwǘÿîgÜØùÇqØ«ýxã {²ՙЇ  3È b›öÒ ~·Rþ…¡JA½Æ:çpëß DP­Cýÿï°¦ÉØ°kA_ûdS¹ïÛægE#,”’’$$JЬ@&†!¦a7t’š`í þå êr)‚‚¬sˆ@ôì`æ+ßZŸU¤ª! AAÔJü÷ºH;5o&ã´>Î (ÇÿØ`d%¶a¿ Ñ3sˆÅ•êîM@­Ö¦½Ž-AA'Q¼Ë©2ëô§c6ÄG "·<‡…HÁâÎMTa÷ Of3(Œ6”ã°PË#atý‚^Ö haz'‘,Š2Ò¨*èõ-²aƒâ ‚v %ÿf¹ (`Á2`@7ÂBC´ Š mZ@ÉD°2´Ó®:- pØÅåíõç ÞÁÈ_°`ØâÏvDÂmXAƒôeÝ‚JžvrÀ¯8J4&¤d (Þ·ÌñÿA•ê3î-•F(’4”„z€wKÖ*@<£Û…Doß·­™!L¤ª,¥‰ P\­·¿¨©)Ðh¹yåå³cU«LXmˆsî@(#*qɬrÒ‹§€p'6jV‘)i°SÉ»±;à ðA}X¿Á¾Cû‘]kG+\­”l,¼h…s/S …Q@²6‘…1Ò98·ž'²³âÁlKE @Dݺ'µƒ$!´›ša$®˜Ä‚78r~›™[r ´ 0è"†Ã"#Ë +!(€Ñ)†œC €Àe×LÕ4ˌ冟9ã°å¶±G$¦þ´sgù{Œ;‡í…¿k;~ýÄßå<äbJ+Éò% êi@{ ÇÜÀþßqG( 5Å8æðàG‘Ö ?€:åÛu€«ïBVCîcޱæF ÕÈ9óé­¦ª*ƒ@RCrÔxûýìê[nò䨵*«+à_?"U¡7-–÷‡,—Ó“…†PP4æR (êø©UQ€ŒaØ–ö( !HK`¯“¡§Y@­GQÛéÔ« d¨Æ:$׈0¿uzÝøà)‹àç÷T5ØXd¶¶›5¢ ð*v³]ßâwBB4йK†ˆ7ZÅÖ @²¸ÓHÀ–Ù&0À`D@*( ²§ú2¤špFžˆøœŒ$ ‡e޶,.àÔ¿ã]Œ}Ãò€áÀ*˜÷=À€Çí 4é}s>È úȰþKÀ¸J‡šb s(ø7¥BZ«L¨WñFKÏ¢ìÕ 9›³&ŠGMU¥2“ˆMƒm^W3êãíÔ¤î{q=çD°³·˜8à(RBª†ÜoÃèlDÔÒòŒÉ—¨±Ø±ª†Ð€Ž‘U`¯0’'65ÂJ'Rì^p*kLi‹C°k$CK`Pˆª¤VH*ƒÃ0ÂÍ|¤ Èà0ŽK†ncé®@(‚¥$ò¦!°+/`÷d hw†)IX÷ù|Ön7ž6u±’²B`€Õ,a8 Ì–, °^  °bc¶õ‚…&‹DµO@€Â~ÝHæ¿8EPÞE7’ý7.J‡:+þJ¤8Nˆ¢žw5Ê ˆ“a×mÌ aá¤æP§Sê¬Ùµî~öÙ ˆ;Í¢öà7|u“JtTˆ5&À¤>ˆgh] bh0«5ó¶$Ø2^…ÐUÃÄú¹³6@ qQ1©5càC•P˜ªÖÖ‹h V7TM´UAP±À2H@@³&€Žp€Fq¨6ÝƒÕ Ð=äM€ OбhÇà©^ÑàœPc`þTu€Á LB@ÅÊš 8¢¤ X2 ÞÝøÌ¿A ¡V\‹nâÀæ ¨6¡^Å@P­ÄÉg½k‡¨}³Aª§Ó§¨–™“:P(Ï„1Çrƒô&}šdÞtT³¨771Ð7€¿8ñeµQ%‹Rê¡;)(x¬ÇB/}€ ˆ`Û€¼[U¢€.¬QD<(:J\3« ˜:D­‘Á•Ra ±Ú –'È"Í0 bŸóKá¶#¨Ö*@ ún à su’mPÄR9ã@"Ú… 1@dl€Á–¢©‰›b „(ìŒ"ò®+€¤zmX%´€Õ$Í€q®$"©DÄ” *1Š `Ý üÂ Ý UÀºèF¬?!Zĺ*>ƒpZ!jKe€w%óv8®‚±ûÌóŽa¡©ê˜”µ¯ÅNd{׉Zf_1*G‚Ws‘ê •Ÿåé#ê „þpP­ û¡•ümKuS›Q ­bqÀ(ì¦Uªú[ÄL¬54¬´€MŒEfX‹*"hZϪXXÞª¨¦ ÖT%„Æ¡ Ãi±·°c° ƒBßÍi€ Rqª @. 2(DI(A`ÈÂâf”(0v±×!é;„&i—´Ä{€‹• \ ;Ô6Є`‚ƒ^þ*-¨³b]tƒàwp†² nÅ•ŠÈÒduó å4Ó¿ëgY @¥VëÈ „fÏÇpÒ6ê!I€±Í«Sš/'jLT:C±1çys·§iÈ÷©#' qSbLÍ^›†BR€¬©ª P£Zñ‰M5Ö©¶ÿê5ìöÚg“„b£)¨¥‡‹ªAÔz…ÈÔ ì¬ïP¨Hª 2b‰‹ ™l ˆ¤"X¿ïY‚uÌž˜x¤’ˆV lN ·’$¡ lB@„‚Y 0¢àNfÀ X°0ä …‚Ȥ€” tNÅP À`…qƒ˜h ¤D‚BQ2AcÛ£qPLŠÀ  I1PþÝ0û;ÀÐhÚ£NŠkÑå~GH‚*êÌø¸3Àж‘ïsx'uÍ10‚HšbÁpÜV Ìl+DÔ÷Ò¤œ Õ?ŒK4ƒgTEŒ>Ô8§B•ÆxƒÎ¤å€ ¶PDOë˜nçdÃúl¨ˆðÎýn޶IXã$ q@€àì%ªŠà ±‘ÛëP vgn™âÅ -éüYh*™8Y¯† ySZ†6”A\ÕD.,0`X† b,žY5ˆ !°€ªá5(¤ö)¿QGP€©°p: (ðaþžÿ!µ]){ØK±Mº±üæQª$ØKñP%È2@ýš÷Tä;€Ö1è™ [¾ú9²CC% jTT•[I1\ý›Ív)E²½{*9؉۷@7#Á1àz•¨€”k$3º¬‘È:íªtH£Y‚¸mèu‹´ ƒþP"CÏ:(œH ÖçÈJ†œ1G V”’&Ü2åa¨ ,'“%€`£üÁ«a`Ó‰3 ŸUàÐ PÞ¥ñ"(ž} OHvŒX6 $#!_¹Ø¾`KtmA=€Ê … mh’çIB@VlèU乄Љ©# ³€c¯Ô`>öOÁpÃ0;©-ëœgóÀy phz‡hOggSÀ²&¡€c`ú¾éÿ(ÿÿÿ,ÿ&ÿ ÿÿÿÿ!ÿÿ.ÿÿ#ÿ$~ÝÐþ78CG)V{*ÖI7ÈüM9A•{¬x=€;œ«“{»A-Ö>}æg3Bª’¢¦ˆ5­ $ ýxÈ6ÁE“ _cAæ ¢½ÓànoD\0P‰½9s¸ÑKZPF(’K}HS³øƒH Ë0^¦¼Æ)‚Àïb  Qw ±_ŸõIÎA þ¥2ñ¿×ª‚â0€Åí(ÚÓYÄœ‘0ˆBbU·¹ñ2@ÆA`EØÎûðEÁ÷–û•² M£{ õSŒ‹n$»yºDh› ö4~€¬R%Ši¦E¯JᆓŸ‘bWˆÎT²§nÀrχ÷ÃQ‰=!UR 1jîbíüµ‚ów6ä~UiK™~Y qÒ@G¼äŸÜŽ>¯„2J±ñh¢€ ¢%l=‰ùŒ§S7VΪUAâØÞQÔ¢95¥,@­1†ÖêêUé »éˆò^`lØ¡%ñ!¸0 `Ç[`Hµ&1èÐ 4gJ¥ã¼=„†ÐÐU-ödeŒ˜p`%ˆª¢<Ø ûö–ñ¶6÷ƒ…¿ _ B0ÞöÜøìiÁP­C}ŠoÑÏüc™AP-ÁžŠ€Ï!Êš €õ>A¢>f“Û>×|N_ªÊL@,ø)Ù1>ÔÑHÏ%³…òMd7à°T˜PA¸©%áÌQ cù$ÕÒ(ö‡À›4óÖF0RQÁ`½‚(0вßìüÖpˆWkA ¿À²ê+aö-‚(˜% î€G¢(\‰’€NPD <¨yA}PT€–F‡` ¢–‰Çž^ {Ъ U¬`t‚`¢`êc@Ð…%†B€éÑÚ Mûø7 úR¬À\­A²þošY9ë  `pþ`–^(aƒ$þæÜpàß4IP£[‘Ö§Ýh柙JÐ4ÙžŠ ¦MQÊé 0Y™7}nÓÊÄ}¦:»uF ö|s´VUeŠ5©Ù®œÄã#&:Iš$qúRÅûn "=µP"ÁK [TÕ­DUè (¢shL¥ÆÖ˜Vt¨E ˜k 2†€G´+¨7Í¢9¿ìVs@y2GUE2€±…>£0`D¬Gl¸91ؤ0Ö`Ò=" ¿ÈáA|&X€ù@ËX»z¸?  {€ÓhèŒb¿>ü‚aò@Ë`IZÛA‚À@Ãö±ï"ƒYµ;6þ9[Ü?õþü6î,;œá<ö‚Òµð´# >ÇÜÀþ/. ÚBZ·b]s#áÿ¤"7‡BTŸáD–éä!s~×oNBë«GÝJ˜ Qa­}ïð£"ÓPU—b*j“[šç(Ä,*a6i²ò«ð"nfm\²q'çs O4¡‡±ÉE•õ:uË£ šoÑEEvf#ª ÝŠyG;ÙçŠjoÇ”*°|€‘$©Ô#ÑP!D1‚.Ëz"SfBWO‚`2PâîñÞ€ ïDº¦æÌ Zj¤焈fÓÏs¤@ìøy¾ÒcU¤x@ øX_iW9„û)íо°ÝT@.Ÿà8ö-Ô?ܰnjaýY¬»ð…1‡-làƒ¸ˆ¢T×~÷Ü0øgíJA}†;çFÃÆ¡RA}ŠY[ÊÃv|Ê)àøôŒãÓïL°Û:‡¯ºZBª,@¬¨·²§YYÕAâKˆôÊÏÖ,¹Îpt­ :í*Á‚h,J^¨1É * A¡ÙÉ3aä:Ô"c)¤U Äj–!ŠZ&Ö,g° §69.¨”‚Me–Â¥èabtRH@EDŠJcéWË´ŽáÅ¡ŒÁ±gg)įA‡@tîȱÀ ¢ˆr €ÎÖâx0Y¶0ª+%¶Ðë©´S@ &*Eô"À4Àódf lï0°Àp‡Jc` >ÝXîKB)¨¿âtÃÜ¿© hÎöT|`Söë LO‚©‡wUQ¦,€±¬Áì æn#ªO(”%¯fÌÙŽuxYHHêN%Ã×ãÏZÄ‚¼5ÆŒ¢>°Ï¨:€  R¬>GÅEVUж«%¤»Nñ§”BeRØ(XÀ”@!º¥œ¦páR—’QÃM!c·ˆ§(™HLL>OW…/;hÜ€#û¼‰´XJ:Dx¥€vF>I©+^]… !‰ÉRJhøQ~€·1< àÕË耔³µ%¬,XÃm€†æî,²Œý»bzŸÅ€ƒ³Ær3p¡EÀ>Ý ·y„ õ7ÌA7Èý›’×ú+þÞ;L‘eöB"¶Y?‹Ä«*3 È$’@”©¡T|\àŽ^©ì$LŽñîJ(1 \(€pÜ€k€!ÅÚŒÅ5+=I øtLýQÃRÂÉŤ­$xj‚õÂ"µ`€™ÙÖhF»éÀÀþP´X‘°ÕX,¨~bÔv\äªaw>šÇ‘1¤.h%ã†Èu€˜8ƒØˆƒ¸Ý,Õ€6# í[˜R%c•暥ÖÈ!DÀ#¾u®%qFH¡ð_`ÙqwøÀ; xŽç-Ž~ ~Ý û7%jt°§âtƒðo€ Z{~m’«Ó\ÕuGü Í~szkÅ 1U•™Hõ[;sÍÅ*§â±K“šh;Y€bÎA™aÊYñY‡šC¯A¸>ÅrC @LIErHVX½ÀgPH¯I _÷MËÖÕ¬¨º¦6Û5 }Pê ¤¯ì±¶ŽM‹(#¢eâ¾Ð¨Ãô,˜*ŽÁfՂ܉`¤ê9Æ £°ÃaEflƒìz( €œA0€CŒCAdP`$0KÓ Â@Ƴ|ƒ@S³ ^91zÒà°~õkóÄœ´klcYìð¸c1mB‚BtTH€~–ý7 Ï2&¶§âtÃÌæ '¨ÑÁÞŒÏ ¢NiŸX*“·žÁc6ßçì63O ReA@­EeØ;¤1  þØš3 4KÈŒŸ3³Åª4t>/AœÃ§§Þ°4‘ùGë§D9ƒ|y€ItVuþ í³‘Ñ{@Ì,&à&d5F±›ù œpK“Fö ÖH+Q #órаhàVw.ko´ Rq²T ±œ‚BqÜA(‚Ò âL(±“í³‰²nÎ0Ú¦Ÿ£§ ]ƒ¯µpVòÒ%š‹;4¬L0ý¿)¥Âîmk ~W°QJ`x{Ï î{6ÏåÿïÀX``ê9€Âì @a>÷Ühøo ªt¨¿b\tc¹ÿÒ• R½õ"õºÔܽkå rà¸#¤ÙÎ ™SÔ¶*RU–FL/[^,BöÉgE“'úZ Ó‘ÿ"‡¸›P X)² ev”@À¡¦ PF¸-'‡.*„± I²à$hÑ6(PH`ñ„´‹€ê ®V=GA°p®Ô¦. û7ñÊQ¿òEDlTE¬8 rÙÀ¨“¦„[%Á }QBF(4jpÙ6Œ°A?€ÜÛ(6Ua$  ô6€uøà[Ô³ÿÁXA<2c±oðŽÁ³€ 0J‚>÷Ü Ü<B)¨Ÿq.:<Ü<8AI°—âàÒ·èÝ€> o0ÁÊ}>£ÑPS–   ƒ@ ߎ‰ †92*…Ìîx_rÁ%˜hî‹G "•æ…ªB-T?³9\‡d ¹Ì2º€€³«#óáª*S„\Q£n7œ%PCcK|Þ&d2@×#õµÓëÂp9fãßstÃSÉG²ìÚ®¾Ò$Vg¤€*£Á PƒÚœû<{ìFzV`P•ht4 € †¢bjÝ‚V ƒ@À:—A (`@Ap áP(€Z×Õ ÌF[BýN׉Pê (ao@XB!L]± 0ƒK.¨ËC rƒ€ *¸ëD 0À@*‚wƒoB0‰ìI€Œ ë˜üxAóî‚[ƒÞåé­}Üö›8ë0ìЀ¾çâÿ JP¥Cý wÑaößA{*>YT2N–ªðY> »8<½ ˆ ¤œ^4Ö1«*EˆÄÇØ®ïVp €æPÕ¬«{€x õñZalS0 b˜ xæèáz%dŠñ™Y9·fY€ Cêf>3àGÈGÎk~ ½ªÙc?¶^þ"ñnG ¥®Ø¡ h)ë†Êj509l0x L­йXVà¥[)Ñ8üÕˆª‚ÀÄHY jè÷8*®! „P2ý^ƒW‹i#JDlhH½Py…`„€G›£t3!˜P@§À¶·ý6“…ù0Æ›õìNË?.y•ÐæŠÀþæÜ0Ø €µ ÐhÞT¢¡PÔ•Ìn€‚Um&‰ (õ ÁtRcF;¬û¨ !û%A‰ &·Â½ ‡~I¦0°­o `A4&ª¯ÊÖTe5@ >"È6!icTÀ&„é eV% @• ,€1lc-õÀ²lƒÅcpÜcŒ‡h±U)uÊþS˜þǦþ/Q'(…´¦˜NüO"j uß ³*Ë(³™¶bCë½Ê4øó3 Úц#¥©Rª‚@xã}yñyÁEïΞTÖϱsX²ãßPodB¬wZ "F²ß‹y=Ú"°.Dvå{^‘µzm™Œš-"Ý š¥ÐD ˆ€ÃØÐ\-šÞ°vSñk×ÀE{<][^Rƒ @‰QDDD4"§¨„Œ’|ñí])ˆ]+`¸¤EA©(A‚›$!PFB;B f’¡4 I °µ^BÝÝX!c¡J܆¡€ÃóxcÀ±}°ì 3XËýž‰‚HMÎöסhè’ó5¨«:á$ þ׫ íÆ uUìcæ~+ ­í†ãd!DdY©&íà~'uÈ0/AÈmmÌŠO¥£S¥%D±–¦ñÿ:TL›úØÜ†$káa.ó›ˆãp\¯Y›ºZ²Á4¹>Uò–T@ɳ8ŠP@ŒAÎM(ˆíd]ÙØ4ˆ`ˆ¢K²-’èdÊ2È8C!¦##ÈZz#a­£uc´—d‰&W@6–mÁ€ñô<ybž'Œ1ÆAc`©báÕ§&  € 1R€‰ˆ€…ùÄ)´^‚¬‡€êàAðôÅ‹\a0É+ˆ„‚÷ÜHöo\ ” uVŒƒn4·y\(” U"?€z!˺ˆ³;û±Œg@^ Ç\g¸Ã UsŒ©L@ á±¼v¸¬ŠøÝlŠŽí+*Q Ïî#h!ÁWK› J ÍšÅ$$Qq€0»¨€–ñj –0[˜Þ“uÖ ri’u]#Ý#"­GlZ4ª'‚ jÖëP´2b7 %+2ªJ+zŒŠÀÛ$bÔÀ€ö¨‰%c¬¸}  "€ Bˆ0A@˜‹•Ô‡€ JÆ‚B€Ò>,2Ân´·÷ÜXøoB *t¨¿±-º‘¿éyíê§ø¸õ2Ð +ä¾çcnYC‡†’$ 45xõiâL¨6OÖ‘†RJÕ‘ÍÂd×@(£IiâGìXH cD†: ßÌXfüŽ…š.xÀJ‚˜kÎÖ‚Ú)p°¨bŸ[‰ñƒNµ©ªÑ¹#À>¸ Ø»GLUc!0Rä¾"mtˆ‰s# ‡w¼6X$¿>HÄjßÁUDÔYÐù€Ž °A Zÿ¤µI0‚u…!ÜšÎM> @Õ”yû€¼ˆN@ª HžØƒl`JðnÎÞúÅ ]tÑ»À°xÞ³¼ãçá`$ ˆ~…Œ kµ²G}ŠuÒ¡ìßD"ÂU©¨Ÿâ BŠšjAûå»%kDV¬ZR\€=ƒÛ££cR“ˆ xÁ•¤ßŠj9—6±#]´«'‚†çLßn=·b&”€Óæ| "–c+ª+'Èàg*TâƒuB´S 0wÀ¢Æ@¬Ó¬@s5ŒµAMAÔ0Œ K›¥Š &òdáz€Y™¹PŠEF.8„öF¬Ø 4•†°`îÜÕƒ€Ç‰ œll Ê ˜#l †P`ÁZ4Æ¡@ +ÀŠ&R@D¤ôb­Äð̘óŒÙ„Kp¬Ã`€€ žÍß‘–±4§rÐQÅ:é°ìŸ¨DÂR© þ†£Xm€×'el7  ÈöákN|„ª H@µØÖÇklonjŸ°ÆÞ´æjP@bP°X £‘C àɉ“ѲM=9h8¶€€MOLJՖ2ú¦ž.dÐI}1ÀÆÙˆ±[£Œ½¶ míNëbŸÕ Ö$`"ª€U<[lUôð>·^@1TÅቢs¡N’ õ5F°2.ƒV!1 <{'!–ánX€Rª–S%E,…! j“!¬ŸÎ10`’HQ´€€PˆÍӈРgÆ`<Þfö-.¾ðë@Þ–ûMHzô ‰\ŸbÜtƒü¿ *9ÔOñðNæÛ<7˜uôô•O€np¶È;ýÂI¨ HòZ@ À!®Un`÷âÕ„}ÅfUøÌgDÔÛHP±ÈR&mÂÄœJYöú<ªyyAÉEçú“rtÙØ°KÚÂÃÊJäRÐY3*<}ˆ¸½²®ØFã \Ì9ŠH) T¬*ÙÚ mîc¹ÓÆ@_…-2–£Ï—´(tÐÓfØSèW‹¬h6@ ZŒ@+6@Vþx¹É£Ç˜1^,*ì #žÎ(,@€Ú… <ðœ»ä¬óp0®À=à7þÝHöß”D¨–`OŶéÆòÿEA’öTü¼»òIp00Zòè_ f¦JÌIDiU%`’&  ˆn¾}mv ¼åp”7æ”jÏZ¤†G%k—C#7βYoref¯¥\m5¥¼²†”¦µ<êMGŒû*fà!”™ºRÀ¸š7jHqî¨"@Ø—§5h4€Uf­ ª±vP—0rÉAµ_QY 9yO)¡Ôá­o¯Š&i³Š! â&ãâ§ vP‰ €¾3 ‹ñS‡B’P 4Õz€i( ¢7 e¹-4ÁÊ ü™Âz`67¹ü¹{÷Ïï|x€ €.~Ý ügB‘¢$ÔO1NºáÀ¿)‡$­ì¥ø¨•“µ ¼|·ôg¹èX·8ZX¹ù|¤4EÀ«*E@BREmŽÖãUÌ>¦nµÞäÙq5ÊÞpÈ꯯U…˜%4]‰[»Eð‡ë‡Ê' ²–LœšãE0’0Q‘c›Š`Êt€ŒAVR§Ö¯’­ª-øyªaº#kŸµa*œZŸ0ÖƒôÆ¥ õâ½No“æ¸d;RMƒ‚ €€ ±Â"fX•‚60[õm ZT€ƒÆ€ fÖk& ~PsVƒÂi›DªxŽ€a,ã¿ðëXc¯~°`€´&¸þÝHø_DP#¡>Å·èF²ÿ¦@\Õê¯ø Dµ*N9¨ð¾ô¨&E m¹A2ÇÃÜp¤ª «¤«ßŽÉUA”òaä”àŸ-ÁÑ Éó*´Âh Aý]Ogã¦g­Šލ‚®7O´Óº *HnIedgÖY (zp cXÖê@0•ˆl­³¸C¾_ 0P$ÔDÌè#”4’A³‚pÛ †¾“ŒÄT7÷`%Á›!YÒd—€Á@AžI„^TXÀ±zo“ZCîÁ€` ,ॴ¦)5>´ÀqøsÔ¬º4ø«|g°,ƒ0ÌþæžÛ<Ò IÃ(+Ô­ØÝ`à¿ ¡±È0õ3þêTë)@\y§ãû`Ðë>Ç&ŽSU•L$⽉Gg£ûΘü?׋Ö”Ï&5zÉô8;ѾY€PJy:qî ÐM–®j=c± òs¾gAÇb LuŠ 郭X}£<Ë@ˆÚØA©×Õ—-`¨3JR@ s©‚Æ”qÂŠéª BA¯XÔ& ñ'VÈ|Vòô&q”ôÚ þ enà`ÀMGˆ‹Däõ› AL²9€$õ¿ŒC@ @,í’Œ2ÉЀ€ PèÂM`û€÷—öm gb­ØÀ@èL1M^·Ü ø?AÍX×Ü ó¢Jí¤@4¾QÍòhž£&ésÇ!YÏ ÔcøVªE„ªQ‚ÀŠˆÛjœãg Òİ~éj:Ë×Íoó™©2ùž‚â{%ÒŒSâ*5nŽ˹ (‚„ºI‰ÎÆ ¬ÇžF{øx"I™hq""õ~«6TŸz5¨¥¥Š`àä€Á! H¼·ÇFÈÁð:^ë DúBĹ$Ä%äsüàº)ïªÊµ ¤$Y$¾«mPSÓ ‚ì’!¤ãæ§QJJT×,@šÌ˜VˆQ”&tA#ÛB¬ñ@Ñã0.|쥦˜$à1` €ŒÇ² BZAúÀö4ÁÆfÒ$ ~÷ÜÀþƒºviA]뜵ÿF #ÕÖ°CUñ(êPm×S-N¼'Ö¨_RE"‘ öÑVœÐL#D ëœ\Îh§,À”vDŒ~{¯“ŽÖiÐQ *¦B1üÜ5AŸ ¡F¯~"⨜ýs$H¡EuŒt‹~µ¥ìX좾Æ@h¦EF£zìÆˆ%7€–-²3àöZ,¶:AÂ~äe1®T,"án?Ýr(ÙÐ6¸M¸‚„:Ô“i«„ùY™ ´ƒREO!aÛÖªƒ GX¥ë$é¡‚KÇ€•k x]èÅ>÷ܨýo€ B‡zçžµÿ 0”u+þ‚ ³úm‚“¯¿Ÿ¨Ô¤ˆå ô„8r›Ã|ª¨Y„2Å€@ BP¹ÓYƒV²áôì(ÛH/ÔÁÐhAÊ„(!ÄY”i+€á†«ÇïÈTÐr°* U/„á °«£±v«9j űB¦€Ða\/¬ôºTHcÐX$)¯Ô9Ø¢*t”¬½@ Å…þ¬ÕaÀàÄ” #6¸€Ñ‚@ië P’êGö 2„P€—v €d,ˆ Ä€L_(KC†9¤$!Ërv@@< ÀBx<àð‚àH€`OggSÀ*&¡€c0¼<ÿ"ÿ"ÿÿ$ÿ#ÿÿ ÿ ÿÿÿÿÿ ÿÿ^çÜHø7† êo¨{nÔþ•ØSñpWi°)Ï´Î äœmІMUee"¨I ¢Îin4Ú‰íM©~\u*Ý •áTYO6L‰ ;H@*Íþ Â_—PJ ZÓó=Ã3Q#“ ©•Ûä´k5þÍê”u¡EGâFwÁEQ Ö¹Â %ˆfU„˜ÉWQÄÈ Õ#»ƒh C„¼$.„–¨Û+ÓÀ]ØÐ‘Œ@ U媣rj]™wö,ZX!.À^ Ù:§ï˜KUU $€Um«'€!>îÀjF#·üÕ² 7jkÀ"© eàxrŠ÷ **£:îKSžÕ)µ{; ¸ Ò­h¶g7ÀZN©cìYX5Äìl¤» ö¨zˆ@ !טFZ ШX,‚f™B1M~ƒ¡,#ˆÞ`€E$^¡ Tw?FŠAœ¬£ 쬅,DcH ^4€”í2°Àò÷%¹n€È ì@ÀXnV7o ŽÅÝ ÆXxž·€@|”E'­ uþ×´þ¡Ôm܃þ™‚*ÔOñdYˆÖ±¬hŸ˜€h×ù´"jˆ‘à°€¢§v2é è´Ï‘vfNUU’"  ÚoÆ£b]š±ÍÅmÛküö߸*bÄ@ŽŒ^«A@¨ÝöRV¡Æ‹0±¶m0ƒL!°ÎdvÁš½eB Øÿn ˆ'ÑäUMâÇq £·E ªQO ²…åa=PÐ]w+åômÐv€€‚Q‚€ÃÝ£ÁÄÝL¡56Xló[W>¤a¬>$×ÆÐ‹ZÐB‘ç¥ðÀñ <îsî‚ohž¾ÅŸ@!|€, ~÷Ìü ¡])¨Ÿb]txö¿¸Bhì©ø dµ§…(îìy"°VžUž9f‡VUI ¢ÆM®g¸œjùjÚ~f[l?,†‘‰ýFäÍfÄ[+ŠÚf‚qw-kP¯3Ú4Ìa~ ⸼ӋJ†Š×B¼ƒåýµ<ù|ŠˆŠžZa9RX“X`¶˜) ¡jÝB¡XÊ®>§ ]Iˆyàe½àÞúÏ ~ S&Ì4o˜§lŒMR'k@€Ų ÚØ …¨0 $ç|5mÁ±²ˆ#Ûw—5 T“’(0  ,̃ñÇzÿ¼ƒaóc=Îöö:A€ƒàî 6$>ÝÐþ/@P%qÛS1N:<·yÔ ´6{*~@:5âpâqtÛ)מM2¿ásˆq‚U€+Œ ®9#p⺥šÃÉŒVU%!Þ˜:½‡ü[#2§¯ 14¶qB¿<µæ(!« ßFô âmERŠg¥´øéa˜·‚#°^ ¼ˆÉÚ~çp C–WÆN2!GQTïzÜh€Ñ*VD±X@ªGN~>€6®büK2Z2…I]`‡åý@2@ f*U…mö†Ð(Ôˆ pddÀ%uµ!A.Š@] @»e°v耺#@@ÙBÆ 0¿ ÀÿÀž·o}Lßã=Îâ=€˜ h OþÝ ÷7H„jö4¾I7’û7 BSs ì©ø R½©,k"N¸£o°è[yœ=ƒëôÞ…(Ô”“bäòjúhÏÉþS{}XÄTâŸ5lCyÎu=‚7Dð"ýÇßPP ™ãÉG‰›¢¹„&xp¨g!vj¡Â^³4Kê\@|dÍ8ˆ“M3l Á{˰F°¬`YScµ¡:X@@ –Èfhƒ¤ #1 ŸÂc”N^ÅçW*e¨ÈeERÑ "P¨ð@ŸcN i@ëê:s˜”`( pa^ñ9Åc ÇØòÛP ‚L ØÆÂZ€sPM{€2À>Ý ü7®• ê¯8'nWHì*%ØÓðxŸPì”=€ B[œ18dßGg 9SUJIE¹ 0OÊ(ß#ˆùö`žÅÔ¦í«JÄ šv÷@XÂJqE$tô›Š0r‹3]vMÌO|‰Ð‹((q)¤^RÁvš ?dE)OÖ±tm/ìµ¶5P1GAt€^›#¤n1 ÌÚ«ƒÈ>1ðB¬ JÃRPÀ­A늀š°nà,ˆ•&ÀQaå‰V( ¾, `aT@ØlCHit§H@Ó`ÉA…}Á‚6x€`T0ÅßH>®6’6fgù3îøøÇ¼àu1Ò$p žçþ‹ñ(uŨÿâQ¤D½ŠÏ@d)NM#®z€ü €Á8aÌ6*ªÊL@E½F5ÓÚ?è§:YýhÖ/ÎÊPE³æ¬ò[¸¾Ïœ…Ö'¨3—az†Køkp²…Pι2¦"³!Bˆè 0ê;Ê Ä±Þf\¬Mf@ŠÅKê,("zƒ¨„yÝèïĪâz{‘¬ Š ’!Vd„ÉA¼kÞƒ û)žb¯»ìpÓBÙ Óä pSÀ€¨„B ƒ€"T h7ƒ< $PL¯ˆlW28‚ kÆNÀ8Þ` À؇°˜ºp8ca\cñ†p°ã`FOý¤ NÞ²ÿÉÐ:º!ê¯Ø÷¦nž æÑ¡~Фž)spÊ•»Ÿà4ÛÖTÖFµª* '5c6Å\[›øÄÌô6¬+~}Ç›¾:MæÙ›(RUê8[W³N7psOLZIg“<—›¨EL­Ô"$Õ5€!ìÉ܈€­ªÆ”±rà Éð`˜•°)h†“ ÂPæ“f2’ºìl‹2¬·EI¸TÉØÅȉpµ£4d9$„¯‘À^$BaÒU% À¬«Á¶‘ B[(h{8«LÀ`ŒQ`,½ôí~ìqÞ šåÃòÖX;Àp@~Ýhø'* ÊUƼèF‚̓P(ŸAFm5Ôê¸"ZÛ‚1£N,Zu $E’P$—4ç d9Æ"±zê$ 7<€‚¦ˆEXÎ*áëŠPáN–åÌvT1Z™m’¶õ àÕl«$ ¨âF¦ €eAl] m“˜`nïjUhƒèÅ ¼º@"èzDo›%ÛUˆžŒ L²1 ¤ëÛ ÕЂ ›ª!0(,m)ǃn«TøY("Å@’dã¸Ê p© ™Ø€X ² >Kw&6*Ø)³ˆÍPVÒz`A*´×# j@‹"~Ý0ü„@¥õï¢Íl&ÔUñDY<1—5G”!#¨ÖÉš ÊØ/š9‡wÒFÅ!&€¢Ùí9HmôåÎÉÚý¹Ž nÙÈ#ƒ¢‚Å“LguñlØ)ÓÌs-ÖÍÂÂzo÷à ÙÄûç y ¢ùË.CÆ÷ÈeíÐAU1mªâ¨˜FÐ1(k 28VA¤AŒÖà€^µ0€A6ž4È€–ž7–0¡phA£•±Å"À`ËDŽ‘@X‹PäÀ‘à~”‚.Û74R¶„$¥,CDVUý¼j§ 4Œ¼H«À@HÐÞöÜ„ÌæAÊMÖ¢›˜Û<¸BYPe|b׫tB5^“YÖ†X@q¼ísu4RÑæŠŽ@DÈ{î&oêê¢N×5õ¡Bw%(O”«Ú¯Û‰r ³d›šï+O «²ÀËZÒ Dšà ¢?œ4µÀb(µ¢A\Ë4mˆm†z°íIÃøhÄûЀ @‡ÐbApWÅ4Lh†u‚…0Bø§\y¢WÛª`@Tð:ƒ€ È*À±ª%-€Áá#”CëÀx°AàÇv¥h6Âb @R»ù¦™.yrºŠ€mˆ–#.€ ‘ØÌT(—"€P ¢òZKAÛþ÷TþÚ·uRü‹)‚`¨±¢®ŠÏ@D)«Ef½ïjT¤ŒãÒÊý€€‘%âÚêCÖ1A @¼­æ|û!ˆÞ9‚Rn…çdžµ!p²u-áT#ç+4{+àtb–rxzR½KÙ«%:åñà¬ha÷Á$v,¼³Ô(dr¯õ[ÊÈD°¢Œ$…=D‰°…ÀKZ”ú8Õ [„D`°hNí»…5EUÄhl@ıÞî8ü¤¡=Ér *V[d·Á°‚ †È¶C C0Èj( aœ›~”:ºU•Ïô=OÉ ‰¡ÓRRF²«Tà‡:^ç܈õ7† êVœ‹nþ ’¡RA}Š€÷D”§àp=#¶ $cΦÒê¨ ‚TT .—+9‰YK&Ì4©y#©ÚçŠ8$äÆ-%ÀPBXi^»õâ¾%:£¬±=¦r)Jâì³IAaÝ('µy*BßLäaý,=ŒõîDn(…<Õb{¡P ¤ ÁYȧÅ4æÖ ´Œâ©ï? OÇ2‚  QB‰Lì. Jœ\Ô÷ˆÿË,åRަÖ5yE— @ˆ¢1±9»$pÛ%‘Y1¶ŒÉÓd+Üd+Å»OQEºЂ`°hzjCèLŠGî' Aãî  —­> †qP/XÊØBœÈ €%]UÀH|Ë ð£P!w~MJÙ´tÄó&Œ Å6éÿ¡È{*þ ȉv\¯ó¾¦B1›#'Åر¯Ó¡UUB€ …¦‚Äî­P§¼Ê½Ûз;)Â`'ciDnvTÐ$»Ô#ÆD@-£&,(×[Ö'd”>QÃj&Ê·Mñ¼«¢VŒÖSIѵ&Z;e"¥HA‘žFªñ”6–„¿ˆªA]ÿÎ.•ÓBÖ-bEˆ8@¼ôe7åÚ%Œ#†åUOU¼¼`Ð*ª‰ D’€,ï•„Û~+²:Í¢ PRú=å4KhØ0„  e`ú 0œ©7æ÷wÛ>`‹jþ‚{öá €cà--Ž&y €~ÆÜ¸Üÿ‰JBMñºýè¡M‘Ôkü¼§[«Alè†ÜN€zÎlš…VC)Id x”ïH¼SPÕö\×òeEý'¦¼†‚GZ’Dcº qàÒì}:YN¥œ2.8>Ndû"æ½ÔU›^GƒæƨŒH#Xo°=©ÉWR¶+RÀ-Ë—IS^TèO†w¶ºIeðóÓ¯¼M]cCž±«Ç`¾GP‰åÆøþâ–Ð Ñ;—l2Êžþ‡fN!Ñ ͱÁw˜‹Š €R%ÀÓ2ìI%!]WuV»ˆCB0' Àþó8rN®,RݰIÌÖÚ¶ c0À—{xd?€†ýcçÜ`àïˆÄì¥tO¥¦Ø¶Ü¸ÁÍ—&aêØ]CG­øQŽVùPó @fæc4D^ë˜2Å €(¢>º&ý)r÷ ‰ãaVVÓ`vž‹ ×W%ãÁ5x¢%×/ ºë€ª6%ü\PÄFT$Á=Vbc‰ÅÂ)k Œ*4^»tÔzõ$8D‹ž–"¤tC$cÉa  ò,¦[ÒrY´·×‚ìThÓERƒYB(+’ìVA6”B‹b!Jc\I M6!÷‘0N€Ô"¨ 6º¢ƒAã¥*‚°*"¡pð±ð*õ^R’`PVÄ ˜T²À¼s,Ri¢?„Iÿq“ù&‰Ã6>øT~0¡5< ±°9 üî³6•nhr­p'䢷ß0 ò¶NB|Ð!HˆP¸†ÏÆ›¶bkÈ €ë‹§|4.²£$CQÓÖÖÆΔ® 7: ¢0z¦ˆÍ¤)`¬˜¾¢¾ïTM³Zoº’¦wI/#‘/ ¡G`‡˜FÖuiQIÊ$sž£wØÉYÑ(ª†@íͨ†À EAh!dáѵ¬`I²Hi°X²ˆåBƒXO¼^rØ1`±°Du€«[C!“ °Â”HP‡Ð)*d“02Á(D ¹B+3 ФìiX(26‘u³ò€À^çÜHî;B*ÔØ¡^Å;çFÃ?q„¦¨~‰šjN ÅÄ,Ø´/@^€ô3Fƒ8ZA0 @P¬I%Çõ”HÌs4æÁ|fUÍ5 „cglóB6*aÎS(V$Õ\é0®%«š’èiÞ€PTj²°.˜Ì0¢ ԰Ѻ–P–Û¢ si+ $¶€U±à'k¬Š P1‚R„ mDìc@ ¾Û\˜]7 Õ¨°GFÐ&ÎAn–€eìˆìÕ`€FÐË%TyÂùl„Õö °œJd˜³QW‡– q!a"‚,p"\àE@bUy ÀQB~÷–ýŽ0JË:ÿía¿bÞsÃàw eAÍø j¢¬-2²€GX¬Ùм-À\°˜££[ë´”£ëÛ*1’Làr]b+Â]߬ÔÀË~îÞæ_£„ÊâI!Ì F†Êáé ÙÀO©ZÃ8hŒèÙÆ(T®yÆ¢¼æ­ïõ¾qWdÌ`Ž~û€¡L‹d:•Šq‰që"±Êœ;R7¡ €2jGû±D3DÙ…@F Ùf{.Mbc4ËÒ†Ð#ç*·F û|ê¶ZŸ®|Ç@§ž XЬ€`5`õ45h5€À€½ZÒ0 ^÷Ü0÷+*¡¥ÜvTÏ!ëÏîB-S…)ˆšñ¸6UV"ò°NàH\©BÖŸþ]L Xs³ö X@äg@ÄhM#| 4 n7Î;moÊ3=[šT|ËÚL¨?”M=«±ÍÞ{ 7ӹ爢RŽ‘e‚LFæ¨C•T'HªÂÎeRÄJèÒ®T‘вQ@°C°"€gMhì:¯&(¢m„FP Å ¶ö–V“Ç2¾Ír' €‚,lÄšoÕÔÊ Œèk™Ž‹Ðȉ2Lu€€(‡`5þ ·PˆÂ0aÙ€AZÓTk€±à* 4^à}zÀ1btž÷ íÜÈMöžCöï Ú™PS|‘*1ÕŽÈZ€EôZí` 7  È †˜s J‹' ’LQ|ÅK~·N )@da î1^ò…H n8•Óˆˆö·2²¬‰„;XšWYµ“Ÿ\“ãSàf>v}«û³]CÙ`HŒyuAQ´³©›’˜~Ò‚ 5\xBc™*i¾Iƒ@½ 0ƒN0"-‰OˆhÂR¾ í4`á.¢“¬c°8¨ ÅnŒE°hÀ ŒI;’ÍÖFÒTT-žWP”uQM¦ à€±„}Tg&€Š ε À/ñê ~çÜ0·y\Zu¨[1:”û Óúv©|õ)~€¬V¢R]ÂQ”ó¢¸áJ ^Àµœõ­Õ­i( (åvóNVÛ&õÖ÷ADIƒÓìï¹^“ Jæ(-ºJ ˆŒîyâÎϸ£Ý íf±£E êŒå˜î(« RËyÿ} Xžè¶€¤Œ/ rPˆœÖ"6XŠÒözb[ XŒ‘Á ÖlòŒº.Ä™uU@଱–PpSey“hE`L#"3J„ XF.`ÉtÛÏsP€¡mˆ°à°pÇr9ÀÜÐ.Àâ`«0©ŒE5n3 À@4>çÜHîoBSiBÝŠyСðwŒehhÓ†ú?@žZdmψºUœlç(Ÿõ/òD¬ˆ|õ ¼`i¦oÜZ )!Š@ÃôqÝm‡Z1§ò#ç­z‰ÑÄäKÍþSM8zNZÛv8Éç“@w€Ð0åÍñV|‘)ŠkJ^w ä¢QÓWÈ ¥yõEö&Pˆ«$»ER D‚+Œ´E³©ÍB‘g–Â-YE@@BELFžçÌ¿7›ZuUhŒƒn˜ý)™¢±Ô_ñp° nÀ)@¾Rà jе3%Ó–*A0 32Q Bb! ¹¾7“0!¹M‘T%¨×Þ³¿ê‰ŠeÉ@ݧ€ >‹Û9fÔ¹˜O@C P›;Fs}ˆ&Ñ?XxŠnØÈÉ™7Ça“ÃdãÁÓ¥k|½Ñ8¯\j00q3€J° D‡ÒA¤ÁoG\Õ®†Z³ºèŽ#ÈXUà Æß"´5Ùaƒä B× ÷@*X”´¡0Q 0¬Ž2×¾ŸŠC” éQ¸Ç+‚v¦ ½6X„n7P+€€·¬¥>­Ãl±,À`X ð `OQ€~ç–ùŸMHdÒüØQ;\sn$÷o¤%šŽ–<êUü¼_K `u«7 ´€rÍ:dF AU @ªÈR€¼\ƒ¤œk•WÈNðÅMgú‡#3‚7F¸£*öÍC¤AJðàcÏl€†Ô7!€×aBËöÒ²Õ53) ×éì(ü홇Rmá'.SP•Õ›}G 37°`Á†­)3ŒšÂ€€–倾×ÜÐþ7QL¹ðê~Ìkn$ûo(¦i4¡>ÅfF_ŠX1‚ˆì?_= 9ª3 óYKµVUÄb$4L¯Ç“ÅìcÓ·žû‰0Bz”uUœ“n˜ÿ!™¦L¨[ñžId%‹ÔŸ|Oà È#k ûkéâ• ˜°Ø’àŸVM´¶sûÙEk{ÊjD%«S¼GñÆq8U¤lôCÀ …ÈܹW %äâ°„¼ßM¤j:X´ÅAÃ<ÒÜaO–€0 ¢BU§…¼b•@ c»>äEŃC» ݘ؈ ª-4‘(cºÓ0–Y ؈9\hH0‘±€Á»TX€b4(Fp¡¬ 2!G€ÐÀÀA/÷ÜHþOT2C• u+æI7Ìn>\0CéPWÅg@YS¡àNK,òÌ6·zÊ,Ä  c»w¾Áz úÙÖŸ¨N¸m¥(e„ô´µ_ÝœðnÅÔ@ñm1¢ÆeE˜MfF¼eÝN²Z†,°C a¨QöæWåÐO5pp#³iÖVVŠŠU°å(Fƒ‚Сɵ@2·cZT}†á>,bªA"Cg†Ð#2d*Åñý(‚M<æâ -Z"7ìÝ…C ä°È=9j±Ðm€@[ T·ej¿—dï„l«„.àR„j€•ÅàP(þR7‚¡L\ëSÌ‹nù/¦)w“¢ß6Ïû3aê´×õHXÀ<öÝÏz×=LÌ’ì¢áÓXƒÚ_ŸŠ®ç®ɬõìÆ—ñ¥HvDÈ>x¿ W“ e´ ª’,Œõ`é¦R(˺¨€’d]'…F¢˜6…#D¢²1¶º@+†@`¬Õˆ­È*2ÒË»Y Û ¿)$„”uD•Åk9­6I™íáiäÈØiªÖíßÉèãvQÁ‡Û;­Ï˜az*‹€æø`€[ر±Æa 0À´ð‡Ñ€—i˜R8ÀÃã9Î8ɆPž÷ÈüDZ¦ÕjÓõS¼‹ËýŽ‘ÄP©ƒ= Ï ¢¦Ì©Ùxׄr‘m¸m@îsŠšÕ åU•  jý ¹TÃÙë!n¸æG¢!Ú¼!ÄIö%ò €/¸ni‚ž áÁŠPJF«^RRqЮ´È*i ‘¼ÆÚk8gÆñrcWä\Î0’ÔPKL´Œ%Z’§¤0€N 6L¥CAP*‹ÁÆÅ7j§ü°¡8„'ä9g3³CÃŽfíŽÔÀJ±‘d@ìÖ=¡xÄ0 lÖ¤¦ ´áDEÉGL;T[´€`³0@š-®ÆÌ,c@0ä ,Þ÷´ÿ¹ ˆ¦bA]ÿ¢yû¿ )* ê¯ø¸ƒK.Ü€ÄKÎU|kª¦ª`" B@V»¡ÒBtœ[™æ Êìë¾ÅÁ ¹3Bý ’ ÞjjõåèbÄD̛⥠Ä䦑R3Xžê¢üôs1M)wZ1ågË+ÒxÊh”ê?¸^çþŠQï™ÆS2o8IÂb’Puî‚”˜8‚„Î'(šänˆHæLÊÃ34i­HD†ÕªvRt`ŠæIÒ"•4k®dN,À a!*Í\Y\KAVÇ0“-­wÅJEK¥ö¥ bZ!³'Mˆµ  ,à€8Ën™™õε㌩µ8Pà8s†Ó„^çÜHð¿ÉЦ qNºAî¿„EèHöTü€P¢~)ãô'”' 05í»> b¶÷~0@>¢­…©*¥ÐÑH…çQol=oH’íéž 䣞«ã?FϪo?ô%…]ÏjPÁ6ŽÈÕhŒÿÐê.ìDììÎYbòØÚÕÊÞMžtM˜" ÕJÓØQQÕÞLë÷¦·”i…np\J\‡R/2!!BˆÞ… !!Œ^·„ ‹d9N¢‰\wÙ€=IÛ8EÓ ¸c»L\­@m°[Ðö j,Â%Zó»W%t$¢ˆÀŽð ŠìB€©·€<ÀB ày¨*ÀèÌZÿÜÕ³¯TŠhŒf¬w d¨â`OãàîÄ‹4±˜ /¸ˆÄ·©¢¥U•bYB‚D’,|n Õ I+àöÒ‚:fº6/ôÈj¹@6º—NÐZš~¡|ž@!¸5ØÁœ‘êˆÇÓ‰²&êLòºY^ ÎÊRó+3½ãX»‡šr5GÖµ‹˜éb~QA) mÚÜŽ®ˆéÊäP©ÌéWmt0Hà.ÞP Œdƒ†¬"PuµA´‚€“†,AœIÌ­¨ÐYI©™ÀJXž‘Ø,HÓ±h•©&¦=ˆH¶äU’§Åj,„m°`¥!—Ž8#‹M¶ÌxSÛ…f1Ì >Ù°e ë,`ñ H`ü€>çÜÀþß±’ 4ÖE³ÿŒI¦’ÀžŠÏ€8¥:Q0?àuÈ"/@h@²¶Uñ U¥$¨fïteÌ›+Aó-`n# ØQ¤*Y’qÊèö¹1 ¡ÊaKr!®&½™©€:«žÞ(E3þF{[Ó WÙ=¨œÄû?y0]rvÏÜÙÙ{í °ªÂKM«èHá½;:ñFYÒCñù²Vçt´Õ,ã^@pªW0¦ß)ÔÙ¼ 8 @Ä»JŰªŸM•ˆˆ3˜] #+%!òD xªËÌÍøþŽnØ€n¼>½/›’€>LsHŒˆt#Ϻެ˜Ó„Zz»°@Š[`ur÷@ÏÊoÇâá÷.0‚Lƒµ÷O!ª!/Óž=šü¾€;1Ù`ݱnGŒºOÕ^Ü 7ö{ÏÈ® âAhÑ.…©{ƒP`+S!3Kƒì0v‚‘6X`€_.•¯cŒ1¸3ÀÂpoó𠼇ØzÏœ10¬³SÒZ‹d…–Ž$RwüW#ŸÍjʃ^÷mÌ¥(,î7íûù˜…2£XÍ>oËh ±zæ\o^±R³ÎU±BªF¿ÁÒNKþQèk|Hm‡‘VÝ0RÎü@l{Þn”R€çíÜoQ•ÖOµÙ]îüKrg¾åöW,9!ŒºI·³¼ö4:KþƒT|õGñ£E?¦á{}´¿£fò~DWJa®{…«Ù^çêømGYçwÜýq·ŠðØ(«îØ(cšÀ—òäA¯ù zöyâ´ÜÿŒøR×püƸî6wÙëq#[F%¹LèÕ±MܼחS3õû•hi%nÎ÷åŠÌΘÓÄüEwük(â:}Ì£–þãiÓ†¶Óœ1ŠuÃL=¿þªwÍÂT4å¨"ÅëÌsˆ¬Ž^ó)“Áfï°õ‡Y`p 4J þç!åÙW‰”zÿ{åß÷tJ«‹°°àÛ^¯«$âzæm(u­ù8úG‡ŽŽú]âR‹QH¹DЧòÜ'5$ºôVgþ\^ý¿í`Õt„JkÑo;ôiÿÈ“þ´É¥KÒ?™Ä6hDTµP”*”šéí,° SE#¬Œš@^­;!þ›1;ç²Åv OggS@Ú&¡€c á4$ÿ ÿÿÿ"ÿ&ÿ,ÿ1ÿ%ÿ6ÿ'ÿ5ÿ ÿ ÿ ÿ'ÝXþߪu¨¿b]t#¹ß†*öRüDZQö²”‘«zò `ö|NsRSªª*IZ.5áÒ|¤¹Ï‰&ë€}¾’Xª‰6(ˆK‘(Ëìåƒþ2b'm>Q¤»©µqë&(’qL4Àˆv:ö(Ž hFÃb@êu’°®+‚a¼lê€ÏeÊb° zÕ´ëiÑ*FH——r¬•©BŠ0ˆäH°¸9ãBEÌÊØ`€ I0D—Š-²d"cƒÈ4FB„'?ëCÛj›x*E4„VSñ‡_ê(l‘½,ƒlv‚"`ü'ë~áÇwË@‚³ƒ)Xxþ þ¹ÂU¬‘PŻ膹F%144†=ŸAä)‘Zï«9CF€CI=hŸ‘O_ñ#¤i(“Pk»ØÒ´µˆÚçñ°²Eý æªÛ÷¹?NÁŒ E]e¨Öt¡Þe(ÀñWwÝP*¡/|Š2DcëjRÑ.*ØX -;ÒHƒØ¤sÝSÑÊ Ì¢£DF;ŽŒÐO)  )„b!—…y‡@%“€‘i)24è½KX@BçX ÁH ᘊ¶Äp¼P¬`Ó2«CÿÞã5ÒůîQ¸B`áí³¸®)f ÷›àé}7µØÄó€Ã€` çÜXfóHÉ45&ØSñ-º‘ÜßI¤\©Æ^ŠÏ@Îk²™å àNA,z`·:È¿úuAѳ·\¯¥B8Æ´zµÙ°Æ —ƒ¨‘­6T©ÀJ  £¸þÔB 0 ^éEô`¡ÎÞ ¦¦gå¡jK™Ò‹N\Ò¾œucŠRZ=(© ˆÚ¯‰Ú ’ÀèϤ8„ˆ€²F"ƒ2‡ ³XÖêñÙ›ž¸"Æ+êiJ…ØXÁ°bm|Œ,€@€±šó)…à™0by{Å„µºÀ¸Áâmç-,Ƴo ¼Ãy¸çÂã©p ÕC£¾æÜ¸ü¿A0T˜PŸâtxæ¿-“Ähê¯øÊ1]Qž^Á©ªí ˜œî.ö0ûž{?ju ©r Lè“SyαۿW4W¼îwç[l’5QJžnJª–Ùh¶¿"lû¼@Æ0Éâ Q5¬ P?5f'gš1³"»VI p­s ¸¢êª>I10P2[U'“å10Ø‚‚ˆ@gµ†â",µ¬Í ÙàÀ1`*iZ\€(8Њʀ0²!ËABT„˲àYÈÆ°"”ͪP°‰¦GàÈ´€ï<ìAs¶×T!…ckÞ°Ï9÷pŽ: öÌS&€À^×üYÀˆU&ÔOñ:,ø³C¥{*þÞ•ÔÉB€“dâì ÀT¹'ù^E"—ðP©BФÆJøRcÐ%£Õ¥84ai½ïîB´Û ˆq6a{zêך74¬Ë÷ò‘ªõçõ+K{V‚ÁŽ‘ªcg€nóÅz4ÄrìD(}ÑÎüPFÄAY¢ÞP£r HÏÌ/TÛ€TPÐä)`@ X[€6Q ‡9›B/ ¬åN™ÉqÅ)ò8•¹ŽPÜîÏØA¤;[sxºÉè*¶ÜN£¨hR˜‹ Rd€Jƒ’`YíŒY€†„¤€`ºrC&pkÆ€‡·À¹T`Z†ò$‰>çžÿ³3•õW̃æÿnHb¨PÅgñìʾ"NÜÉ¢…EûHHõ]€È“Ùš Bª´JP)ÜúÔ秉$¸6§{±j×¥p0Y ¶=§ãŒ†kÚŒ•ƒB÷ €Nùñ>ÞpP‡‚2Y—eêts2ãÏô ävO«²2æÈS˃dg'é " hUE!'{jTí­¹  cJöDOŠº“ Y9 hZ°b '¶†4b\C ²5™€d_";ˆ£Ä “Š]V gLD¦³šG#ÂÈÀ¶LŠvb 8Ê”pAõeŠ&4TÊNqŒ±#s®[Cüyò¶ƒ€Ã€àH§@¯$ ~ÖÜÈð?‰D´®»u;ê3¤=7:ló`ˆ¦RBý?@Ö-²÷EÔGQ‰k%8ºán$1è­ nì¾cÔkµÊ’"^ëåöå\zeõ§.Eã>Œ…×2«IFùü'1KÌlö¬ä¨-þ˜ãT=Ì~<»X*àÓ4’¹ÚLü8@ÉJpÌ“ëzy¸Àr¬ñêïXöÀN÷«Ù0¨ Ûè±Öï´™ã½Ðêèé¯T\‡E%‰CN !pQ(' clþp4dfÙ<¡`€ó(*-@ÀØ€P!L^,a@†ŽTk5Þ+†ÜiMFd8 *ðXÎ<Ï>Ó¾ð¦z² ir†Î ((€ù³}üb?)(ˆbgŽá€B žæÜØÀ¿‘Mµõ)–=7aø‘‚ÚJBýÿwÉ ‡Eûì–Ïé=M›©*3 ¨€’@y™šéÄËn®n" ›Š8¯¬•S™V¸¦Jj"„0µ1<°&‘…èµ ѹÐîYƒ«)GZÝ“göX £.GÁ`ÍD£Ä5P ׿±µËÂ(*ûc°Î­ÀII¡[(òu]¢ô9-šD{6]—.Ãø=y½,¶D(Ÿœß‚FÃ`:¸ÁN„>RI‰ä€&˜JhGF€`°ï'È[w„``œP› ¤BÁÉiúݼ£$„Å G€`@=ã÷-c½ÿÇ™àØ9¿O¹ÇàxÇòqà h±Ãx¾æ–ý“d µ9¥õ)®A7ø/FBR_AP?Å?À«ä• оá¢Äæ;FM«ªÊ$T@‘]€ì[›Wá蚥(•íÛ_fPõ³˜¿âó hÔZ HŸ¦ÀpÆ3/P·ïYоŃó6zÌPÿh äÔ6\žë*«éhÛºh±aì‘.ñ1K@IªÐPD“4ö‹¸XÓˆŠÀúkÆØyÅ9èðÌ?¢ŠCýπ㪃å €÷ëie‚}L&Ú Üs?jÂLMU º5½éZ³˜©Ñoµ<äiƒc¨NÞä»TN;T=n •rîœ'À ¾õÓÆ¬ì¼‰ÏÎr-h•§µÕ|¹.…e% £ˆ*ba˜ ™±Xx?6Zºn¡M=ãÜ‚Êy=³Ðd=ØM©Ç ÝÙX´¡¹›гYº±Ç= ˆ€Š:â$T8ícêÆ}.v‚¦Gƒàb*Ñ XÑt0µ‰4;Ó` 2aÆÑ Ôê(°`Ìâb¹5µpÓÖ³Óç€"‡à`9(qàð`Q` þ¶Ü ø?1 EI¨)®97’ÿ¿ƒ€èõ“ÓÈCQÍvÓ•ÒíÐk {§`Ÿ¨ÉGAµ’ *ët”¢S}G‘)׉½»(>/›2Œ’\EÏ‘ƒ ‰¦†Ôü[¤ÉmPˆ¾É–ÓEªT‚ @Õš1òšÐ‰´Ç÷xl¬S>Ä´¤%XÀ ¨ŒA:òîzÜúÈÄÃ ÂØTÓi•…­¥"ˆHB° ðêÐ`íÛ#¬$C¥„uNUÔ¨Iˆ 6ð¦–ïÍwõÈ¿õ›þÝÄ®KËÌ€5–; °WrÓ™@Áhì"omfV zp• @ ^Ý0»y\TéP?Å»é°àw°Õ ì©ø¸ƒEÞy>üpR'Vñ Ò²Ÿ8PŠ`L©©H±TÄ¥³Ýj‚H5*  mö â‰zL–ØÐ<_öîÀyY«D¯ì$@O¹>âÔëm u8ëu[ó´â"5ºQÙgYé5ºC10Py_¶€Ê  A%;2]01xÁÁ`5° *d’Àb ÚÁ2¨E ‚Iˆmâ´!%Áˆ1B`ކ¬iªœ8ÄMc0Xn <¡[X2(ÓЦsL¤KRÁ ÐÓ¸{80Þ ÿv—ÄФì¨WñN:,÷'d†RЍWñR¬ãò8R¼§Àh_€¸`qr̦BU¬Jˆ$€‘{§vNBq}…@~]•ìS˜»n¶a!¥g˜ak HÑŒ‚d·OÒH£g ˜C.d|P4O& ê-ë£ÎÌ€€°w ‰,°PÎn¨JÆJ[,^X ŽÛ‘W؉[¤¦‘81U.Äbg›^5o€!Ö /=ˆ2,XH ®²lD^åÊ€*dBÒa@H H´7˜¶šâQ',¡«<ÐlQ?åBŽ0@(Ð ¬BVèâ%àa8,À~Í)ÿ-X¥Ò¡ªä0šUþ]*ÉJ³‚zbúaî–„ÞÈ|›ÃTЧ:U 1 ŠÍ¤}¼K˜€žáXæk2© ôÿD¦i8 –ºâs 4ˆO ¨¶s¬HHÙãg¼ž%§ã—$aX®èˆÁ°„®.íô6Z¢ :[M€BMÜeÌ€*jbò©R0ÄQÄ‚ôý©bá”ìÆ@u%}ÙÉ$Õ?¢˜¶Œ÷"$ —1/. Ú-•¸v{1K•„ûgïÓ0ØÌšhX …Š%In@ PêH(t2ì`-€]€Ðàj  OggS@&¡€c ìÉÛ‡ÿ#ÿ.ÿ'ÿÿ'ÿ(ÿ"ÿÿ ÿÿ ÿ#ÿ)ÿ4ÿ~çÜ ü_"@† õ*ÞA7ÿ—¨€4Ñ¡>ãàÀìä}Ÿ~@Ô=í=Mhp :mû>§ùAYU•™%=×™ít‚ý;O Ýhðt…Zî8ŠcvÁ¸Ï}|z Þ¬‚42_ •H dò’ð^yÊ?¡H—º àò @5¬G…8 sȾýRš„!LO‚  :àà™¬ˆJB…®ÝÃ;]ªˆ "Ûû;ªâ,’þ¾²ÚÜ(Bõ…l †NBàE+CCÔÂ9"Ó¾NÓ'½a deˆÞq €¶Ù¥’c¡0(°£„°ÕxÔ!¸uçæÞ¾›Šs.Ø2xÞsô ŸÀÀ[`P~h@`Þç ÿgwA4• êU܃eþ¹‡"S‡ú+þî °6 Ûžï«oÃ˪*+ŠÈ$K ÄšÀ£“¡ñØ7a+Q€ö=÷•Õš£O€Ê”°}ÀÀÀ8ɱfæ^±òÙcjx63N†§fú_ ”A梣\ù§‚Ø¢‡€©e½úÎ¥¯'U›ÏŠ«ôlÝ P°Ta8kG w;õFU-m5qA õ u0E7ÿt$üÈÆÔwˆé6_¼6Øð†±¢~°T€ ÄÈ`!cA…5 uÖÀLG7xR5[ÁKÓ%~€,Ô>•:’µÙ=Y C œmÀZïyËÇ?˜5³õåW—†m1ð`Àæ61«ˆ,Y4pª§^÷–ÿ7B×\ ¡zëœÿL@P)q×§ø ÂD‘ÓõÀ]1@@^HT{>†ªJ—[ašv¼Ù=$= òA{f+ÓÞp*w½£³ÔWû6ý<3hxu ¢qãÝ«Phѽ³Í‘–PƒOL8³Q‹±Ï@”i—Ùv`óÊ̱¯Q­m?fU ŽCiÐY(%¢™F''ÀŸ ê;µÊ…{~(hßFŽ'PÈÀ’ R)œDQ(Bˆæhc…E€g°rÂÄNÀñ-ž'Gäé$ ` #ä ”P%`XÃ[`¨7=[@Ñ j¾êÁ‘õÎ>à ;Iß"0`sTwÀèþ—Þ¡JB}Š…Î¬õ?Ë•¬C•„úŸ,ŠŒ°÷3wÒÇzAïB µíc‹SSUehö¡ÙPá'D½‰ÆqF×['JÑû–rÓ¢®RôD-~ÙDÅëdÁkñãçŽnJ}8%Èä¶Ù<¨Ò½¢51pìŸv•:4*ãç@cµX«{?î4xí;¡ÎÂEµ­¢ŽqÊÕĺ5À1Ïbi}—½»(ÜLž«dk½€Èªå]u²qm¤E[/“.1Ø mÙBÈ´JÚ¦*DHÀÂ`ßškïU °<XƒÅÀ6½õk¼ó/° <°4€å+I†·ä¾çTÿ÷P-M‡zsÎäþwš€P%¡>Ã`HOO>—ÿp—ô$tºè¾oKï¤á¤”†J%„€þÓ&=6ǨÔ?ìÒ–¬ŸÖ7¤ Ôê¤íÿdA›Ç9šÞ@ðÛ¡„‰äÀA!›"+<ŒæUPÅÎÍCpÌ3ǽw”;ÄÍìÄ`ˆ@2Å.YÐ-’Ò-yÖ[ZèŠÜýiêä£ÂP6“Én*é"„Üd𠍧°‰…AZa©À"D ƒpË( » /$wˆ1•óØ ,rC`2@5·AÞ€‡i¸Ç\cе™CBÂ]øýa?†ƒKÀz,x7™Ž/i8ð· %Gå P~× ÿ ÙšJS¨×¸çRÿ÷P -Cµ„zÏÀ¨?5±R§¼?5*² )(/@— ¶¬Í(‹ÐP)™@Ù4÷/!ßc"BȇÕ~@ò ùâÒ`$V#‘ßÍf”®h”©J½¤TÃ-ê;P|¥Ô‚=©3rìuôtòÉ#ƒŒØ£€ÅÉFÔ$Ì÷—FOyw!S!Cõ 13™u3cJ}ŸF`ÙmÏéšÐ"Sz×iwÙ8ìÑQÐ= Û2€MTØh€Š`(‰*QVSßÓšV,ÝdY .¸:)&«@ò„] P@Ê,n‘ê¶±XG.š&/ó¶~ÀÆ;xDGã/€ÂÀŒ  @Þç ÿ沈•„Æ¿ç õ¯­84>ƒÌºÓfÆD àõÈ òtÛ}['§UU*H1Q²‘šÖµ œzmS1§ÁŠÂS@©¢¾Ü0¸ÆéŒnÁóR Rûû-$£³i©G‹ôàÇaÒeqv»h@JíìMjÏúÁcä€tF’ih˜N6Rií[¢ ·¤¼ff]Ü£ Öëg¤#DÕ¶ XT¼¬4eÕgâ‘“Sq³R“§N19JF€Åp q€1465d2¾¢·0gD~Y’„—ÔàÆf 8†Úû›ëNgÀ-7 ÀŒá€W2Ð qÓpJºQ0^·ÊÿOÑ·JjŠÍaÖÿµ!ÐZ”„ÆÐoŒ,åáÐ:Î4 o”df<ìcóm¸U«*!J% H×׋#öëköÝ!ocl¦ûÓlÙö­Š™¡*r€ç$‚jr´Ó+Q·0ë3v³t€øÊ¼hE…“gt“2-!$¢('9àõNÀoèLR0FD)ôJwÚ.øúâêlìwlÀžo«ÿ.À^x稷2—Išqö§/{&·m¯îX"BcËahÆiîz´72Ô(VÊÌØ ˆ2J‘’«IX΂Ýý°8ÿ¦ñ€åé9fk˜d£y¸£±‡(@xªƒ>×Ü ÿ'ÒS…õçž üŽ‘ÌÖjBý  Õ.ò¨rŒì#7"Oœrcì˜ †&bLiU• ‘µÒ_3½Wsªg»>ÔßË67BÉyÜV¦"a²±NÊAâlÐz3 ÈùÜ^UЏ•JÖ΂VƒO¹ ³Ñ….€IZÅ¥c‹­ˆîNHà`KüÎðqkÖx–€ ¿€ @8(Ü\ÞæÜhæO, &Ô­¸æÜXþO0-iÙs×Uñ°Q)cò¢zó@Û$ÌèHș՛ iN•%EA‚Ç$—¹‚½œ/CãcT(ŽÓÕÐ0±FÛÐyOôêf¡@d@ÖFy1_!r&ˆ‡ùÃ8”²<†]Ì7¬°óNœpÉÆí:Êæ Èf”õ¤xåþ[zfeJ‡º ˆè»‘Ñú@@)žž½±™hE¨P [PœŠ$­!adË ª¨쪡K¤#[bÁËqbPH À8`Jã °ÀÔ÷ÝGú ^³Ö,„e8,wüPüiá ~÷Ü0øgTT*¨O±Î¹aö¿8ÄP©C}ŠÏ@VQŠ|À\Xr°g@îsНÕLU)&I`DÙµ[ë; ?=vø„çbBYügÓœ¶NDu¥M·!÷Ö<¥” V"MÙ, ¡B3)ÎÈJfEžl¢ U(E‚Ú^»b2Ö/w ÕÌÂuOí­[L2Ý©¤ÂªÐ6"V€yg_”A²l'éþe$k0Öˆ„Š–PPŠr^  ,°`9´ŠîŠl¦BÉòq A$ÀZ˜–f”Úbí´V‚úè7\M(ûÉçÝTHR Jƒ(pÀÖ8ÀaaáñÎá–a*™v F‘5°øÞz€„n©dl¹$‰B‘>×ÜhðÏÑBK™Š¨)Æ=7šù_×z? T"¦Íeœ"œè9M§Þ'“ ‚.@\0ÔùoṄª*ÅŽ@•dD!Ú¿=zn_Ϩ¶™Çë9j¿ ”£úPšx`‹Fwe|ŸIÜP |Ú(ßLèK%ÜÜ–»äº3ºz|.8pîAmÕƒb–¢*8V—ÎRQÑ’ZC°‘$*ƒâË!P*ŠxI7àœá¬”@*¶àŸ:—%È·Ë ” ³ŒÌÐ×*`ϯ"Ì\³¨€(BT>@Ä€õ0 KǬðCR.€)0i{•õ@` €»F=#fÁ0,À€sÖcÁqž`LáÐ~ÇÜPý_¢Ê4•:4ÞA‡ÿ C‡ú+þŸ"É`<A3Äùä¶ÏÙdR5ZU Wj @£nhù^òøü>ÕLN^öªwäê}¾+Œ0æ;­¯ÐÛÙuZõBi}…sÔcÉzŸv Ú#ÉÊÚ¥à´j õk8O†²pÙwð(”ýKC«Ç'›A "iÅÁfF3àh%Ó…NºTîcäy]„‚é…J 'Ì•d7ƒB_@Ÿά1¯ikShïšcBkc%l @ ¸R:>BƒzA,(?àÞ±“eÀ!˜‘0 €¤Æ °fþìÜ0άe€pÀ8÷„ 2ðxˆ;€<žÇRÿ'ÀP:4ÞA‡ìÿ"$R´q;ê§øø¼14˜Z{­Ì¥Ã¾áȃåî‡ 'ŽZ5¥‚¨ô~ÿ_ÿ5ÿ?&þ%¼Û†úËïã&@ ÏP@¥‚phAQÈ%y „Ñ›•í΋š´&½Ô꛳ù¿jËõBŸOªÄʶV¡æ«þ°"ÐyÕÓëÐùW« )Êw:c©xPá]$µŽéI{:‰e¿a4¹ºû€.*…«ã^z! ‡vB}o¦MWÀÈÌZŸLCÀÌiæ­å*@@D‚ xÅ(§Œ °À 2€ -3c €YÝ-`ÜK³ÁŒ0È@RrFg1žà-ü™LyÁ[Ö€ƒ±` E’<h0¨M ¾ÇÌ¿†0ìš]k)O¡nãÞ3Ÿýw´ÌÐ^BÍx;= ðèNƒ8¤Öä èØÙæô¢§R'ª*ƒ0MªÄ¸t0 õ=€Q?<Sfî…kG¹åÑ­ª"á%À8†éKžo½–ˆR)Tem!ÓEÌB|ÕõË€èÏ&ªk¥$tkj•ò䖌ڲ¦·¦¹³ŸãiAbvœ¨ßõ”7@¾Qˆl€˜p#)DvhŠì³=~æîŒö&ùê± u>”G†ýX`Ù /ýApÕ @FÆ‚%UÝdÒÙÐB‚ !×€€ó‹ÿüyîà¸D>I2OggS@R&¡€c ‚ÿø­ÿÿ)ÿ,ÿ3ÿÿ ÿÿÿÿÿ'ÿ ÿ!ÿÿ/~§ 7€¡µ$ÔW¼{ÏüOÜŠCMñ¾V-æETJ01uW,ƒ¹}@\0„ŸÞ³›b¦ªl„¤æL´ÖŒƒO2ôé¶iQŸÖõi 4Dw ªL‡©eä‰Ü«’&3”HN  adà ®ë€Õ<ÑÓ’†Ú“!*~ÇI =ÓçbµbÒ BHP ‘§¥TÁ9M…r²2MäùR— ѯ%ÂH±ªA$ÏË&9„dßd ×ñ2¥«Ks½ó Œ¶à=k¬jE üpN¯Ø3‘šº ¢&bïVw¡l/ €w °ÏÃãòÒ[žwÞáñ. 8 ¤~0  Þ¶Ü0ÿo$LK•J!ꪘ×ÊüÏ® MÔŒ?€I¢ÉÞ£·\F‘¾WÑÅàH.¶0[X*ÐÅ«©+tRÚôœ¼÷\ ÅdE À´~°:$kÏìs;ôõ=·Œ¥;³œ%¿fü>Àí^'——å̸|ä´»[?lE0 U/ɤtݸ„(X…RLd bË ÷ËO$i7j!ʈ@!HT'¿á‰Ó …BË¡]ÊDª€X`˜÷Ø1Ç;³ö?¶‡‘-ûɶߪ?÷ðàxç >À×tE[%xŠV’xt+Þ¦Ü0÷?q%(‚š1m¹ÁÐÿ‰lÅ¡¦ø D+÷t"Ú€;±ùp¾‘×f/1º}ÒVN¬ªJ©ˆñŽÿ÷×u2@ôŸ9=û Ù’àáôÐ3³k‡ØÂò+Ý—OÆ@N-l€jì÷Z–0¼p&ªî‘A¨ö›iÞ J âGiª·¤*xøGUP©Lín ^—ºÀ¼é!±¤z§”Ä;NwW–pØ›¡q7“É5äpé·Þ6°¨ÊÁ`æS¡axhܱb-sW¢ˆ€: CÀ¬ÀN—Jc"À„.(‹‰m“€$E …çXÎq À [L«gq`¸µà Ã:³EßvM²TòíQÄ›º]н7ÕÐÂAÿ*¾çÜHöŸ)eæZ©C½Š}Ë ƒ<ªÆ\«hrCjµbô“¯WgÀ˜3Z_£EªJ›’@ìdЦq¿.Á¡„µ˜Ù³3ëßMÄ®útîøµð*âPÔÔtt`ŽŒ¸AÝXößgЦ4¡^Å>è°àßMU,M… ´#;“£ý¤ÓÜÆ‚¸÷ ûl«¡PrI€T¶ëq³õ:šóƺŒWN»‰÷Bž2Ö̜֚V·!Aâ7-kßšµ(–I ªà²LìW¾„4TQÔ³­RÖ:HŸËJ7£Æ$éÀ c³×hÊÃ[!Æ2AQš³#ÁXÿ „V°À¼{4˜¢ƒ–ˆ #¼0HãKëŠÁ¼`dFxãÂV¶[ÀBX;2‚y³Ðq]Ú C'9(2J¾Kð¦¾dÓŠ˜NÕv€lc‹„C…+„ôàËp#n<^ÝHîß„M…õ3Ü=7 ÿBI¨)þ•âð–#'ï`€hcn@rŸ£3Ä×jª ïª„üÃRC{º”¡4[¾Ì¤@©ßEšì}ùÁY7Í¡ÊuÃ#°¤„€–,AQ%$!kzL ¨l<3#³™„äôE/(V› ¾s V0¦²g @÷ïZX¢QPu*Fc¬½(bj†s ŠÀjæHÀ*xƒ‘¦ò¬=4€™¢Gˆ†l½Å´}K@Yv³iTÎT™GyˆK„pE` ˜– Ò²MGI$R¸ÄÖQŠ¢{[6€l±ÐÍ‚,XÀ2X x€^Ìîá‡ðr Ý ¿y0U êS¬ƒný/¢)5ãà€Å¾`.XrŽQN¢*H @P™*fúãúÓ(l5Kÿp(à/Ÿ‘`F(‘‡: 95Î÷^}ŽŒgrªA‰ £§Ù‚Æb¹ž]‚|cjÁ ãZg¼—œsÜNH-ÚËê«m¸Ãr)ôAD :UÅX[³¶nH\# Rªš¡PÐ*à ŽÙÅ6,ù]0Ý ¦¦†,ÅšÊ|šv²z¥’gQ‚›•h¨[ëãX¤‹ê¨ªOp ÊQŠ–J*€aÇ`»Aþ+ ¤Y¦ÒZÀÀ;xàp<ðà“^ÝÀþo I–¦BBýë dþ¹d(5Å?Àû.ô¤ Hr07}@/ß—Él¤„©*$I¨BEDt ”<â\ÚlÇ !»¢ÅæÎºtK~¯PÛ«\<#ŽD=©Jd ²3ÔHµi n¢ç+x(Qg ~ˆï¦qy§é{V˜†Œuºto¨ 46m9PÜ:Úv‰*P)Öµ›D!L;@mv§%|dÙAÒ‹L cStÒµý¸€) Mt;Ë’âM F„Ñdšþ2]¸nIÀÏe[ƒˆ, cE%„Ê@öŽ!ŠÒ6¤ÕºcZŸßE‘PŒ² VK¹ˆ ^—wðvàp0àýyp8r(Öƒ >Ìn“šKÚQŸbtxðÏBkr¨Oñp .@kËG}DCUe&dJDIH=@ jë“u'˜œ~¬5#Èa6P¼ú§g|æø¤›œœq¯/9Fû×–   Èxé™:oÜ3ZË ˆ•Ũ¢;ö<ýȉöô²Ϫ z£klÒßOÊ4 ·§—oÐê%il¡œ™Ü¹«ˆ* ^j¸³{b™ÂTšþr_ólÄ%DÜêö(°A(ÙZ+dEœËB HKv¡ÊX™b!€ÕB}TbŒe©…‘b6i€‹HE­6äž:7"ñFº€n>e=(㺧_úËp'[d—横¤LËm)uÌ3FO•ýM¢£ïÙ Ömeµ…dMòd$t)Tr,šA\žÕ–Ö‰‰§3Ue&´_×¹îõŸŠtú $)òØûiñéRk”W¬ÞÚKÁäÅ< ç%#t{6T‘¥iäéá=Gbüœö¡e©$úÊ\’,Þ}·Sì‹ yŸP”’hzå%iÄ[ÖN1ø$é¹4]J[ôûƒ(H PqEi„K/­@ªj”dy%*¿†DPYè,lüýV!’AÈ:‘°Öw¿º^( p´ Àà±ìàìØÙ ðk-ØÙL µ‹Ô°?X@J°¬&F Þç ”Í7™A—ÚZÜõ÷ öÿ¦ù[‡J„zŸAD«neµgÊ6ÀÁ» 7à€¸U2Z'êÄ( ¥$H⺃pdt–ND~¦=|¿¥W»P±Ý…@³*žìö®ÿ€â'´ç ÷†8Ÿ) E‡|û´Ó¥ ãìš)Ýe~¥d¦‡Þè;lö«Pì~`¬• ºÂÙŸˆ±R ¤õËE‹… nÿ ’D%¦üC®ÂÞ+„¨µgæä4ÀÖD#Ó¬;·1¨ÂGót„ g´éªˆI­¼*áVw7‰ne³OHÎid¤Dc¨¼Lí [X„‰I!.ëà9ï<ƒuÜ¥¿ZXª€$çÚSY{5°üÃlKÙ?™KøÀp  `OggS@Ž&¡€c ¼´G%ÿ+ÿÿ!ÿÿÿ ÿ"ÿ$ÿ#ÿ)ÿ ÿ!ÿþÿ^§Ü û⎌ZR5Å8æÙÿ@¦âPSü€ˆJ­ú#Ó[¦Z»õp•±î¼ £@P5×IVU•*%ÐÐÓ`öu ¸GR¾qŒ’–™61t¦Xë"À§û ^°4øÞÒåk›ºó3-ªE}΢@Ñ …¨,ÎJûfLCÁH£÷£tÉ?õÒdZäå‹=&…×Ô ã#1ˆHÜE>ÂæúVo}¨=}|¯~ßÅpö§ zÆn&¶Ò[¿!fÿÀS@çÞ‚¯+˜F®»]†+7ÐB/ 06LB‹j£»¡+(À–Q6˜^€‘`:iôóa5Wæ­÷ëë8<ð80hTñ<Úç¡q´ˆí,Ê”AB£(°P^÷Ühî¿AlíM¨³bscù,B(÷R–€irC¿AžLÙ;þm›#¢b´Q“«(’°Üt`˜íbå­SeüùHÕ°3b6N‹¥²*=WÓý›mõÖýÌΠ(°¾Öé¤ÈåFPiÀ­Ñ ¨àRöÛ¥¬¬Ç‘rµà‹«r“6€ž ÅT¤€‹"0™R`['†ašu-‘CË4^µ Éevµ›´iZ(è ¬óH`;‡-X1 AÒ: ñ¤n ÆØ€’­Pô$„@C êÉGh›…ƈÔ⊢A¤F¨Db 0gh7U%Q,çÜHð;¹†j _ÝŠuÐ ¬?É ÓT›PS|™Ó:žš7ó~à΂A€ö HÀ^0Ä:¬3¬$•€¢Lí-õW44ñYÿ}%âpHš ““x‹­YßVê†>sXsFñ†š‡ªJ,(”bÙ‹Š‚âÆú¡ºHµø$ئKNÐ8çt8Y9ˆEmJ¡&;[®´,¤lЬqÓ dc¤à‘() äYWã°&)T¥ïI‹ñJË#7M"³® ` #jÀàѨH]  *"±qÆZh"€:É p“fÀ Ä6ÂEJ,ÄH0 he°FŽé:×À{€£è¶€ãF0`Þ÷®nþHWR¡ @]ã Ëüc±‚hJ DMñÒ´1ù¤Œx·ä0èíy>GÅL $ A•€xÄu™U&K³f¶Àk̼ÉB}‚ÕöA|^f¹´Å–-Ê"2H€ö’ IMdxŸ· T±M×× A*…"¹æ©V@­ÍKHkHI¯6‡u-Å€*Šš ÈKÚ­Œ¨Æm "¨ÆF#F0( Ð dh `@ éB–b`D(LÍÝEÖ{ _%Ùº á²Q€LŽ—HIaHÕÑ]ÝÖ–_£BVVH²æ• =´À€Ì~÷fÿŽ‘5&Ô§TþÛ‚jjŠÏ@q}r¢~™‘>s½£L°O®äº^cs˜¸7 nX’sŒá„¶¦"¤‚,@:êöážkî@ÈÀ$| ÚÚ…4ÎÔRoô!¼2™ð½XœJ&4ÏGªÞ,Ø1Ë'íé­êDŸw7î”\¶É@fÖ~… #Àè;Glδ P*@Ló¶ •Â¨DæP=€ ;éÔ²¾5’É>ñzÕýz˜Ó™ßÌfr‹ÇCìÉ£é@ R÷keûpU#¤eõ½!„ö2ˆŒÜØjÀàá— â.÷Œw:ÅrÛ ,<–†`€&w`€þÍ燵5¸¯(õ*ÎA²“Yääæäö¨Oñðîáõ‰½7€É ˆ|Q1ó„T ˜2‘©ÊO¡¯“½PsJçÙ÷#›Fõ£H82‚‚P¹PU=»Ð\o*…Âù3 `BÝùÝÞ½ë >'\ç…®#%àø:‡À]Ñõdç«^Ù–®Ð=d.™ð@Üu[_Y̲ ¿#£!¤ûÞ¢±Ê`™Á²{"ã®ú MT0Š«—ÿ XJ®ý‚¦$cô»mð7j0FÙŠ^@™Ø°€'@µ¤Ð«‡àBD€ 5.šãxðŠ댠m.ƒŒžeÀø)øQ$ž÷̇›oÆ@hiC]ã C›‹4ÍÉ¡~Š?€*æ'ª§œ“ãC&N="§æ,¹ÎÙLL¼ªÊ ÀEHˆt›Òë'zÈ}\·ó;ìžêD€eK1î[õ®„ܧ‰?H®Ê,hŠ:H)½ðlÖ0‘T`KàKn~êÄ=ˆ©M%çZä5ð;e{0ö”ºPÔ¡3<.;>» Âü•_ä@¡VQîèÏXLM$àb b¿v­’ÝIì-Sµ0“D’·‰>ÃÕkõÈtv„„‹&á]æÐÃýRo3„7A.ü?Ï:ØdMXИPd!ÃÄuODÆ$0ưp¬;f9ØäÌ … 8k`,0l^ذvðž÷þ=³ ÒZ턺*æ=s™¿›É’kºê¯ø8°g@ÿ‚¨4s´ÇZU%PJ¨Ð™@‚í³ÉÆ8í¸?L)dˆy*3/BhVáCŸ7ôÿÒ Â'ŒÈútÉdû`ÈÅü(U²õhXC›ÉrøÏ[nÏ‚\Ê\}Á"½Ðƒœ1¶¬Ž&–µ*Ûs2#ã78û¼)CB*èšV1Fr‘˜Ó´(ÖÁ@Uî0ƒú`u]ì.IÂÏICH€!‹¬Ô‘¦®óN¼ÿà…2 LD òˆ'´€J¯h)á ¡1À²X6§L`@`€Ü@HcŒÆca†z‹¹Î;Ö\(…™šZnA>ç–ù7jµy¤ uUŒ{ä6MÚ·Bý Ï@•jÎ…çÜÉßÖƒ¹×îýh8ÑPSVP1å8Âbˆ˜ËâlöJ혴H!øgìžsvÖ"þ±=P·(÷ôlÔµÞq¹Y‹3Ë]hZ5 »¦–™Ò€pJù“&ì}؆–&¥ã½CBáÎJ¡Ðáɘb¬ŸIA…¡¡4ŽL Âìp+*”-¨šÛ•gD¿Yd3 €t1”/›%CN.ª‘1 /n ‘2ž €¸ÅnL€®.Vâ¡";ÈÁ6`‡`PO!°0o0\Õ$ Yà!þàñ$¦PšG¥¡¡À¾ÇÌ)ÿ=ªˆ‡ÅjwÌ\øçjû‘:ê5þ.’£]ôSqˆqà p?oó³ «!  ©dA2&†n½ûF•œĸt¨²îåp»`ro›=¸ò‚7Ì Í f*¯4Šñæ<÷ý¶ó“‰g_ cÎvˆW[î–” ¢‚æÓEŠðŸW©ïqwÒj€7Dâ賆,I€ô”Á?$.3[6À<_!s™È‰öâ‘'Úß@±ø‚E4ýo¢çê™csXæ¿ „¦]éPS¼¡Ó .Ä´`ßGÇÔ*ªJIɱéßZœŽj _ÃÙÚ0{¨+ªö¦åP4´©ÓNð–¤)jN³¼„bJYY M€XéDRssÖ(GÅ?À$~²g@ìyG[Ç*¦ª” À5d"Ž+@œvk-3ÎÄJ¨ç³íF3ŽiøÚ„ÍVÓ‹Bt]=P¦ÃÅýF¡ÍPKÀÆ·LÏã¶a-¼enB5,’õÚ „K;™çtß…,nõ‚¢ö)ƒ£A{ŠRr¨Î`Œ²,–€Ò-èx#àdÉO®EÆäDaî[ÍÚT/ãE@6Ü ‚1L\Ui:¹ÔA€D"#ãpmlA(HË‚`u€S! + Æȃ@ò0€[f,†³§ƒÁ –¡Èí}pÇ׃ß` Ï;þY¯ihtL+`)4M§>è´ÿÝU°u«2¡>ÅÁf^ý»¶PeB}ÆÀ$Ê"îªÀ´΀þ>Z«5Ç©JJ*€9wÑh{ekŒµvrÓ°sk Øm ëNmzUÃÒ•Í™jÈx M Á9ŸY9Û!­ç×èá˜%†Mž?yùþue³*\°më°ÑYb,;,Ò°VibY¶{ ‹Š#‚$ô!QN Ýe»´B¹Ç ²0¦ƒìH2¬=2vÚ6¬PÌäÉ„¦ˆ %( F4tÔNgg [‘#$ÄtÿÝ€07dÄï!(4†Ç±£|Ôeœð`šDØE“?¸_1Pá` 1ž÷Êþ)‰¤1”£G½Š}ÏAå¿XI4%¡^Å@[¨Ùóç–WÖûzwA4À< ¤£Ý·uT×\Bª” IBoð¶éúï僭†¯*âtäF◥ݰ4úÚHK+4°{èª60,mPØXŸÎúÓ¼ˆÆQaA(ç=éƒW¯ gnxŠ]Ï œ §eÒäLk4„Aš$ÞO ¡ær6ÇIII$ˆ @Þ©…"„äN¿µu€ºA(z-Ü¡¹T}i©EÛˆ-…„¡Á{cƒ À ÔŠ$ $ ËžHö•‡èÕvÒì)ð,<°8oàžç0ÖÁhüeFÒ_ ¾çü3€Ð¬ë6ü9Õˆ©RA}ŠÏµÇYv‘ÓÜkÊ… Ð;Ãy;b»¡ªL)@3W:Éú¼”@ÜŒ_=ÝûÃzjA¹©gzoúêX¤QÝ'hÌÄJðîò×Ü0ûoŒ ¦*ê3î=‡‚Õ ì©ø Dœ,Nè‡ò$ÀÁæÂ¾ÏÑ!½ÍT•ƒ$@o¡BruÜûœ”€«“ð¸HÆ^›¡Ù"{•ðÚ/ʶ¡eÖCyà‡®¯e¶ÕMìYJL)í*”÷¸´Û¯Ï™Þ]9tk†±‡( QOÄþ«6s1¿zB~¨™9ÖÙ*sÒH =H¶Ìá‘NõRoP§UÃÍÇe¨I Èš%FP¹”v3 EU\±ö¦/k`– Lm+RQ¢—žª°\°úÔ@c‘öÙ @kv«4JŸ¨Òb€= ¡ÂÆðvŒÙ2¿Ï ¸õ—ଅáYÌ,,ê$)#V‘`L0!¡þÇÌYÿ³!Ñ2*þ vØÌØÿܱ©8Ô-òhEY…œçuª~Ál¬<Ê ¤:_[×¥Ì1U ˆŒ„¾ƒ˜òÆWáý›ýÏ pÜ Â^^BðÞƒ;ûä¼®”n~p_ÚÁ÷N#cMgþ7XYG‚SxùL÷[‰²xáý«Ý¿°'‚ã}κäS™>öá: ª•Š¡*šódO’*ö¹"à¯4´ô6|«g8 ý㆓ÐÃÌ$I:VMrÒŽN 2u*m¯šA`<”ž¬{OÖÀ‹{6÷ >ú¢:Û1‰(!+&”Ê0Áde[€–†Y`0 EÞ×ü_ E…„&ÌõÿŠ1U š<0™ý>dÆÄÄü”}ÛF}GÃBUY¥ ÄDw0Y7é¼Á¡´ÆkÙ*ež}"ËGÆ¢ú ‘ïYm1¬5ìôç5×Ch#Þ&tdê; Ò$'¥ÚÃ"ÀâihŽ~¿\HDÑër8 ,+¥)m­…FZ"€î±ê½!à×.‹¦LMhƒÄU¤X†°:“œš‹ndǦ ˆ qñìR'.s€,íï4 ˆ€° H`‹Üï˜Äó®P@7Ð4WT4]ù²bCIk^ °klqv©?êwë|̾÷àŒ­ôS.ÀÀc‹±céLúšFÄ”! ÙPvÔ_4 ,—~8ÍðS‚е+ ö¦XÍp#Aäö!Á^Æ?À»Ž¦¹€8#(èmÓÏu„E¡ªÌTHEÖ›ðfî  ½ Ó[ÊÓ¨™'“L³! ˜)Ú”xÆ¿7A䘗¢¤Ui(¦™ÅM0–J–} $juQå4ÖRlÄŒ c²0 œŽ×¦ €E—j`pþ*Ñ‚ˆ"­!Q@Õ0”ð ¢¢ )Àûa‰1ȉ΢eêÈ«ð„TOd¾P !v¢¡•Fóº°¹Sä¡,$ž$%@  ä%#ä„‚”•nês€³Ì kló±å–y׺åk †X  ‚ Þ'Íf¾7‘¡Ý(°7Å6éFó¿ƒa¨]`/Åg ¦«N™Å©whï¼4ÞG’⫞* @;¶u1%•È:Œ­wìQ׳@lŸT¦æ¨œ%Ð?`–OȪ<7Nƒ<Û×".Ü4²@ÖÊZƒp˜” $?÷Ø»2耕»Ì¥ª56£Wª °ù­{r'&Yï8UpV•`‹Ï,ÂÚZ€4«±”“òÁÀz!J,míKU<±Ž*ŒÀÇK0Õ.–#0³ŸB‚,iB,Ø€V¨*´}¡2j ¸;0€ÐÖxpîÎòûrø±f³3Üap0SÀ0Œ@þ' ÿ[ˆ®šƒ=Ò!ë¿QMí{S|™e%jÚ¡¸ð~K&âô÷&9:›ÏékS6Bª Å¼v¢‰ÚDè¥m;žVÀ39îǶÏ-åàËÓwÝ\áŠh„‡:þ¥ê„9®ck(¾EÁ$Û·eJÌ-ËJifýE,OŸ\™pP…*ÓÖŠ£»–Êl ޹YÁ†š©”ÉÉý µ¯»WÙ¢iB[ !ÚŒ6î–UN´þrd e}šƒ(,,“²—ohà•bÈp QßúºAP„‚6Ü*Ha080Ü/?çÍ ý`°Ð0 þ&ÝØÀÿ@øÅ¡>ã\tÃÌÿÄ„*õ7þ$\ÛžøÖ‰J¼©*É$ % œyw@ç{nž§ÄÍ D/K6µféÔ†ì"”‘)(QÜRE“—~îNgËï¦ìÉ:’ âßÙá@TW`xr±¥5ª¬kT1†m„ùRjõÜÕ.Ò•e‚¨¼TT•ÐÈÙÑ€ÈȤë:h´ß’éo=}kFä[ê ŒÂlBTÆZ `0~Ë)²„iyNÑN€TL  åÂ@8€Ñâ[ ÄP¡X†Q0PçCí;¨wlãëp0€¶üàÄþ&ÝpàŸÒTÔ_ñMºÑìÿס"•¨Oñ0Aʬ Þ—ïSlì0äxº/@ì3obæjU•€ I(ùyëÆÐ!çwùà§§†×Å œã5[_$/?$ç·Tö?) …¶^Dñ<×@ áhLô5d£ÂÅœÂ^…(ðIÞõè`@Lj\÷~E»Ö˜s—ø"èÙŒ$ˆ„rGêœw¯‹”ÁÐd~é¢㎣>2Êl‰FæÜ%Þ¿cwq'°Æ¨œj嘥oQí1ìõÜÀÔ(ôk y ]"#B-TY82&)^ì?´Ô˜,a¾P(”€¥b’€0ÀÁp×,j;æÎì)¶>`0ÀàÜ9 ^ø'ÞÌÏPMPcœtƒÜÿ†f> ü‡úbû|xg.x è¶¾1g,rŸõuR«ª*j ±Ñó6µ¼´ hMì‰ÞBµT ýýÞaWŽîσ}çUlJFªt®Ëh‡›Éü Ùb´‰'¡Í:ÃÌj›º+w˜Ã#IAWÖ_¹,bv×)°S‚ñJ“LD}ppIârÊ* ä·šh&¤ò¨tÙ(¦€qrÚ,Ù-ËŠÖt—»o”¬o©N—@¡F+ à‰—À „ˆ¬ Š,¾ K-n«‚Æ€À@cŒ©^áÎB“R|<¸ Àl;†õ|ÝMÝ}àžXŸã!W ÎF‚OggS@&¡€c³tóÿ$ÿ&ÿ.ÿ:ÿ7ÿÿÿ ÿÿÿ ÿÿÿÿ¾öÜøìÿ *~hJŽp½Æ6éðÿ@ع ¡þŠÏ€2³Žð´^€×I;ˆ• ]€Žû£u…¨j(À¨Où=s²±Hˆpd¸ÜJ@- ”¢vE½GŽ_›Å©¸ÎÊuo¯­•xâë©æ3îlò3+ÙçQßdFÍ¥ùå,b# ñ3ì—½ûE¤`¹žMö@ßzK D¬«ƒ ;’é@—2i(Î[¤Ô§›Ýköi×=àI¿nÛnQ%†jd¦¶Ôk£ihŸX¤u¡Zÿ/Ìà™:Ú hdK¯‰îŠ(…í†@1„ àAˆ0a€Êm–bØ{w°õ‚xx|b(*9keïÎÖr—ãí¿-®fÞà,(ÎÇÜHþŸ ‰P#¡^ÃtÃìÿ’& 47Aýÿwùð–T:tºocŒº2,TU•D@ÌÞêêöj1ÿp:2A8|Ó‘{íºôZÙï#\>¡€1Û‰äS'PЂÇÝ$/Ìæ±zÿ`ãùúÄ €î1FÓœ–¥€g* U¬qûh$s@ü\_B€ºRE=à´i¼¨cË )ÿÛ$§‹/Ë&b6œŽÐ!¨ }¤Z¨¢´ËžS©À×5´!«râ)ÜóÔõà“ ,ZFi´éèžÀ 7@¡´Tô U’Íj  ÀiÀ#hVaoá·Æçƒù`Y®fá1ð† ¨ìàQ x!i< ¾×Èþs A • êU\{ntðƒà'©à‚ÜõõQÙë†í?½ãµ@ {:îû´Äu•©*¥©BU+í„9ÜÐ3âÀÊÖÞGk·NS‡ý^ÎñGfsáËêfçË Z¡½Ç@Jµ§€l@»Ráfí-ûÍ”¢ŠÆN)Àb½ö -1ˆ9Lwû¯˜‹˜è[! VYZ* "'– ¯=ûbR‚8Ö Ÿ¯Š• ¹ @ƒÙá0)Tþx¤¢DÏŸKm‰nxrúžüBuü«mWƒ ¼¾@Oi3€-¤Ð·y籄€^Þ¥¼Ø Å@[Ûo+…¼4€¶òj\7?õ?gøñ7ÎûΘ€;8ˆ»: ëð0ç-‹£åÑ”´î&ê % ÇžûŸM%´îZÅ}Ôk̃fþ7â§©"¨OñOÛÕ Å¸«RG:½¸|šOß–jUCY(fåõ½Ø1‘pêÇÄ‘Œ˜ßóxpÎtmø8š ·jþ´AŸK‚âkƒç4Ôr"Œ“ÙÍhôBJjQágÍùæí÷˜NºÈB& ôC¤‡í´# T~d§„;`@÷b…ÖÍ‚]¤uV2bòóz‡cT±²>›wt*éöÛäfp2 q€‰ò sþíÜQõÎkˆÇ¨ÀPààYE:ÇjjPBŽ…€2Þ? ØÐž  Ð-#\ØYm.ü”-¾å¹}f€ìëp€¹,:Ü5º.qç½3ÃOœD¡ tù^Ó Ÿ!о¶ÜHöÿ@hæPSlcæ7LHZ»*OÐø (ŽóaÌ£9pçoÀ³^8Š«µJkU•RIP’!šýÆ =]âåÊñm˜­þÇ‚dùêo‹~ tþ0hi}vÇ‘Ï"dJ7´\_Èf¯¢ý·Ì`qæ5¥ªªI£=áôõKT¹Pº=?}Ç+ž«ËëÇÐôr5y¡.u"0Ä%nï®NÇ4ÎþºóhØȆófýªJBàfHš¬ÄoÖ'rÍ ØZ& Y—/²¦Þ˜í>gWU¦•àuŒh¸/ ëíô$J! @˜ ÐŒ0«²)RZà”à [A'4¦÷8ß»Òc qyãñ<|yžƒ1~zÀÀN]‡™Qö—@NMLÖØü<¥ÒqÉõØ ¾þ3HÂÒN)D]û¢Xÿ ®’ ¨Ûxí^ºžnˆu5 }¬sf5¥…"¦*À´‹ëì¼uÍ.ÝŠM+ºÉS{eÉJGu40£À¤¡¯n®ï}ŒCQuk](©€(T‘ÛªqD‚ LqŒKÚu5"Åe⺵Kw–P6Éà`¡ —Z¢wÀ‘VµN¬¦„èÐ+€°0ÂB 6BIBÙUl#P$á­e~E†#¤Ü…K¡d›*0X ÁÌ­¤¢Â³"æØx(ÒöË{¸²Œ¥€4’Æ8À ‡J@ŸC^“>'Ýhð7ÀP³ƒ=ë¦ Õ ê¯øx×½†”Õ’g@Ӽɪ È BÈ龚Ɍ³‘}ð;!µÔ¢‰3ŒßBðn£÷ " š— lZc4dô&5õÝhøoP‚Jê§ø6Ý„ìA JBýŸAæS§gDàªúÖmŒ˜Q~¨BÄx—qò±_€Èj±úOì4½,fG„j}^“+/Fñd©†Êï•=!ßݹtæR¢„±]ŸU̺@b5k.ÙΈïÃÓʤî h2üU»ÀHM-Àt‘"YàÀV@Dd ƒ ½0 A VX:|e}©ŠÐÄ’`!€Íõ@/ï½Â\•¸1^W`zH*ÕC­8„}ZE=¢½Qܹ"ˆ@Ѐh4€8ƒaÇ8ppw ¼Ýh~ó4ÁИ&Ô­¸7Ý ³ùjJÐZÊD}ŠyÓBë¸jIQsS7¼'ÍË´æŒ é¼÷‚1½¯Y½W€€1Îî£Usõ… ¦;ƒ·*⨕uF–Ù‚ Øä+ŒÏ›ËÝ®£¨äÚÇSܸÏÈFÈÛªdv0„bàÓè¥wꩌ!\+ÊÐñ²€”W3€KoÜ`aòŒ °PC4Ò €¢¥‰pûmDš Ó†ÃseP!D÷0 vÁ`É¿ ´$5ÓLI„ Ï-êÅ„+½ûÉ28„J @Àм 0Á «z#@4àx0ÞݸSTëP·1nº±ü锄úŸAf½Ã¼8)ïÞ­ÞÔ°Wôœ¼ÚƘõµlj* »o(ÏjOP€ì¹WsS;Ç’/aº–wÚIÃÒY½ø!OOà5лz¦SJJ˺éßÏDŸ5Üx¼ªÑŠx—œ߀Cïùu«\K<ÉöŸ.ÄPÚê» R/ @µÉ"w8K«#aÐB«†Nc‘³XÄJ°I#‚+€:¹½¯Ì„À&«a]À‚ŸpƒÀÍŠ{Ú°^5 Ó°6#ËÁx Ã[TȰb±š ¥€¤ÐsF…àE@hñæðpÀÞ ÿl! ªu°—ñO:”Ùül¡J=oEÝI³Óvœ ν'ä@âÒ– Û6êG¤"¦Å²P’€œ€Ùqç}™n¸üö''“µ°ñô’£FÛÌ ôKHºÜýæªðϼ¹ñT„T|c5OD·ìò6áH(É ±]k[ÝA€ëE', j4ñpàä=©%•–y‚ + N»h!Ñ@j|š“š¬fu¢‡s¶2ï’¨߀͹˜Á„¦0Ø ™F&ÇCá¨oaD‡ `AÐuÅ[ß’€•²æG€Š€>°` ®\,@1s@€Âƒp¶®oy^@€*ÞÝHþw Õ ìMq/:,³ùéT*°7Åg UÞTÖ3ap[qTûæG[â’Z%™Àþ,&Ý¡Ÿ¸êJ.~?/¿À¼8=ªNˆrSPó~Z’©oÝ9ߣ -/@™wøNWüpLU™¼7çþïÇü÷ `ºs*cÒŽ3ê›ÆÁÑÈE^-ç¹ëmùsWÊñö¸slsBWÀyÓ®~Ã41P nÒÂ, ¬Vኀ dµ o³`/‘o *ªÄ‹4 ƒêwQt.L€êü¯ K1 \Àóp'𯂿ÿ.j0²2" FMú'!†y¡X™þc ‚HÀäÓ€‡%¬0‹%’áL3 €ÙB Â@‡Mc¹3Øsêƨ¿¸àáëÙ³0,p €3`_þÝXöO@P-¡~ŠsÓ ³ÿL­I‘=Ÿ5ÕÌòH €÷k=«ÁXzâ8°%c´bæDª*d“F¯véW@faÌÍjª˜=m«þð®ýØy*; Ç”êÁ¢Šì>^°ÂØNUïr<ÔEÞd^’h ©–󒺣Q]뛃” û¡¸èD >S"&& ò?bQ€¾F¢£j B•=È<ô”É^ŒÌt_3âºU7I³Xã„ÆøøDî"ÀDï• Ú–ÀÉÀ_÷^¾í„F†¬"’ ”5Àä€L»Ïvl]hÌ~éî6cv6žó@»JþÝ0ûoÕ쩸6Ýøü?žPÕõW|†`º2wÝÐÀkj;ÅH°]vsŽKq´J€&1¸•5ç~€Üò¡®qÝzs@âïÛ ¨÷jÓƒÈ~¹D€îQ"Hšà¯a¹wŒ³õW¯³ïÉ>@ë¤6û2  Ùl^ÎêTâäÄÀA„j8Ý–ôé%r ‚ŽÖ³HA—n:uM ªeØÃ„ºqmþ¨Ô6“3²æ¸Á‘(΀yHih, á³D1;Ûɶä;/¿Ô X2,$pv?õ×hfImb¥O)‚úÈÀ0¸áêx‡ÚT?3ôPh8ypOggS@B&¡€cˆõE!ÿ0ÿüÿÿÿÿÿÿÿÿÿ2ÿ*ÿÿ)~ÖÜHö‚Atí•=Ï ›ÿ?âƒJ‚ú €×÷ÑÌ·]+ÎÔ³cúUXÍT%‰d£¶ÿâÀΊvã)Á³á#2vè%D°]t¡á›µåȬ€°Qƒ‚éÿ2V¥mÛÃç¼gÆB¿¢´?û‚ø™xëfÀš5€ 1ínMœ‰c4»¾¤Ÿ0³ŠÎs¸±ªŠNêô$œ»žï€CU¿üç°> @n_[[zB–Ý_‘Ç ð³QDžLïi@Iìåoï·ØÞôÑg€É; ƒñÚTt " À;€â±’rE"•[¨"Lµ$ˆ«ŒÏÊüï)Ëõ—7ίßò®L EÉ:ëúuY¿,4¡¦G‰£ðp=þÆÜ„ì!}¥){¦~ŠoËÏÿ«JQ­Cý‹BfÊ@fþt®ôçl;œÐâU5•®$ ˆÚé9‡Œ cîý챓cí)@u?"‚–v£²ø‹U+¿}šr(ät,ϪZQQNb§äÀñ¬ŒxɰªVºg5N+Ok *÷¨N5‹5LAv„-ÕOu»ÊÕ<3†_<ç™Z`¡±€Ü0­,mBˆmU 6¢›­Ti~ކ߯K+1 õ!ye€ Z[¯0–7À ¾ݸÁ?A2T›PŸâštãÿÄ%C•‚ú+~€XõcT"{Ý’b»¶ë“Tê¼ËhO„ì&a­öˆ=&Ž›eAW•€€Ä`ëJ·Mæ¾>í<ŽWÎFârÔ6=¾º‚*§9!ý*íÍÙ¿56#¹ ‚‹H›‹Ÿ¹,²æc Iɳ8Ê·æNTޮݩÆnÙ­#0„€˜mi4@䚸ҵS…Èë Á@Xh\¶†AK…Ô~´ŠA¨-æTÊeÀ–ݯºÉLKwQ%j„#ÂŒ,ÈznɶJV# Hl…}c *|hK°Æ4ªÐÙjF! è,0$K€0±¸""$zTAœr(ÇôÂÞXÞ€Âï@"þÝXnó  •:Ø›b›tãòÿP!Á^Æ`º¶]Šâ$Âõ'7LÞô5¥hó£ØöÙá›ÕLUI#£¦s-ú_e9¾ÇÜò÷Vû²?Y¯w#*øÉÉ>–7‚©œ«­ˆB$¶Aa%ÓúWƒ Rþ¡ Söï]ƒQ  ?°(…8 g_ÐÚùdƒ²’ f­ <”! -¡ËóA`fdcʤ/Ò;+\e•Á \ó­– T=§{pB +LeÛ@C F€AÐZb#Û‚/Phr¥2ùû Û…€0U±ˆ'@¡83€_xøÄðx÷›³ŒÛßt`ϹÇq(¾ÝèàïAûP`oŠiÒMÚ<¥• ì¥ø ¨Ó즖8 àUf{…Œûê…Eo›³kª0ñªJcc÷Og'~€¨!^+Õ5¿¸c>ž"Èıvæ¬ìgª;ùOëXp7Ê„nÕ KÕsæÂ¹dFw9¹¡äëO]K€Ô¦­û~sPšM_@ñìJJYŠˆ7£B7 ºÞI«€¡(LWš4p[ˆ@Œz'ˆinâŽ/P“ÖO… ˜±*ÿ=k L¢Æ@vŸ4 ‰l@L›D*>o 0ɼ)Dæ‚ÑÁTp#ƒ…̳p€$9`œ¡{¬;nú*€‹sÜrèóÀ²ð Ýhvó¸2–j¥{Sl‹ntào„¾J½ÿïãèeRñ(åÈ-Žæ°JOH•I"Ȥ‘ ¢·Ž Ѧ2 Ìw*/æ8è|Zze}Pp8hh˜@À Ù´k4hyNá =Óaî ,(4 ÿîN :M2ËFC byF ë–!Š“R>S赋Œ“w#nÒRtYCÁÄ–XÀWc ´BÐÑË‹¶ÚAj íP7 î$6Pae(éʈ`yr‡ê B¢AÒ4Ø æX²!F, ˆ2«B* ±@¡ìªPÐÞ`ëq¦Ïmñ`Öz㿇åà`Á=¨% H~Ý0¿ùšÁP©ÀÞߢü7Ý *u°§â3G'ÌG9pÇ€sX©÷"+‘'³ÓIÙI ©0hŸ<ãmk ,,ûÄN­¤6>”lÈø0¨7½qì°]•¢@}Ö$—2é.Œ€P&óÝQ¼È“6GÖ clatù @kšüÀÃPqhÁܬ ¡„Å1¬_ÕªDë[ArÖÄ ˆ [8\P” îf+5—m±ááP©A ŽÁÿb!ó ß‚¨ ³3ànŽuB"ÄÏ c8‡štVh0_`ßþX{J~MÛ1œû8[惭O,Ày‡&°ƒ‹>Ý0Ü<8A¥ö4®E7.ÿoP‚J öTü¥iVkºƒö¾AäèíézÀñôïš<´ƒˆöÝoc:< ©2‚ ó™3:÷ßÕTæ;kL´’ÛÍphGÀãõâ0ÑÔ±íUáºHD@¶ãýØ{׈Â(Ð¥×õ\Lz(°Ìº§â×f ÑãpÉJÏMþmd÷V9JšàAdÓƒˆ–ÖE@U¬:½Îìl X‰ €÷ Õ0à ª–Í”BOháü–Ö¦‰ŽMª0™®}¸$=X€à`” =x4+ ´­@ƒ`DkÄ Àl_›˜ÇqSι‹ýÀ÷ÀÛË]}øC à7^ݨõ?‘(Uê¯Xݨý?A@¨–PŸñÈòDìgÓÜÙKè¶íssÈRUU&PQsÙ3%½Ùˆš´êçõjµ&Àš‹F½2𒜰ÖäÀ_¢H- ý;= Ft£+åök”Ãô(B†púy«òÑZ7vÛBtÖ}ŠH- µÁÃr¬æ´0e$ Vª“¨"/-¥  уˆ¦^!½ NáÎâÝTÎ詜¿€å qêF´" öb,,FÕ•KV>KÃn €@ 0æ‘p›’°„”Bc 0‘à‹á.è÷½=îf†Á[;÷¹Ï¦ÃYpŹ| ë#ÐCžÇTÿ‹”ˆ®B*SŸâžsHù_¥ ñÈjEÎ+iz€×±<‘"(nÀy€Üü¬wQUÕ`Àfk®ïóõg@?€‚LGZp3J…û›Éć€G&‡ ðf`¨ægü!-Ù<ßÔ®6Gœ«÷x“,Û?j7]±{ þ×E5DŽ/ßʹ¸2ŸÜñL¾³vz¶4cf&׊A2Cwu?>¥(AE9J%“@"è…®7ùÊÂ{oÍé)íl¯‚d1¹ÁKa•rˆ0a d2ßBˆXBF€,B$ªäÀ¦F‚MXR¦µ©°Ö@ Š<4L/x÷Sîpqì×e€½<œyžìà>€'¨‚$RB € I÷”d*¹~§Üˆú?!¸ê.Þ%7bÿOBYj¤ê-~€8²ºRýÀÙº8¼K¸|û€ÁúѾ¡ZUU“ uV5¹Ï½å¼hZü1WöeZ˜H»t ë›[Ê|DžÞ7ö¼rÿÛÃÙmÛ§)ø/bõt÷û×e±!Ÿ—Û6Q9½†ò0ÐU’”¼ëØ3$3ÀØ60{¹™>ÜÐZ5I’°EgG‘4áðkEêÖÒ0@ÂpjÓÀn’RØ@ôâœ:â·®¾b¤tÙRŠ  `BT®VEd)K•Œ•˜¢Ô$”ÀÖa(±¢t’‰,‰" °¤@A<¦‡ÅÔÏ-Ïìö·îcððžc„ÀŽíe ‘!¬,‡œðG0Í $L!’%@€ þöܸðW$†Gµ[…ªbœs£™Ÿ„*á£Ò­D] #Ê_"¯¬×½ùk[–Àšö .@ÎmÎÁNÄ©9R™€¢œ®æô+¸1µÄ0­ —f)€ˆ @QŠÇ(#§’‚×X‘Ø2ÈFÆ2€ùœ€WSB—[* ¸aiEbH§©SÛæ3ÑuÛOâNlϬðR¢JUİ6-Ù‚Š¸Uô‰Ô”!\ÏÂÁJƒ!'è¡M(7(€ÂX7)HR/° ’ ‚Q°TƒhÄtZ‚ 3ÀÂr“†åš4ò€nl°Q# ÈÀ…@Cˆ Œ!=È4xZáòrVc·p!Q84%%;CR€¾öÜøÌæA…¡Â„:+¶=7šùPhu ñð6{æ2Ì%è'(¬”/`1Yî3ŸÖÖf!IDÊÀIà>ã7ÇÜÐgMR÷q™Îhõx«¾uzºàŸ´Ÿ €# å1q™]G˜–‰ÇN¹kŒ‡í’÷ú›ª¦ïÑ@¾€$0ž8K Ääæ\MÍÌ-PJeÔ¤àø—jê"¬­UÙ”Z3¦E]ê*ÆF»y•B_¨€(kT#bP+XÛ1Ëe'Æ Y–c±ÌZ­ C(Ô!P(4,€0+ €CÈ>U—à @c€”µ´ ‹.X…Ȱ.Ö+™–@+РXÀ ¸îOggS@~&¡€cRÝ&5ÿ%ÿ+ÿ0ÿ$ÿ0ÿ%ÿ.ÿÿ!ÿÿÿÿÿ"ÿÞÖÜxûŸA *Ô­˜æÜÄì?c£T(¨[ñÈ:sã”mrpGÏ`)¾BœÏ€˜Ã,…Xœ eÉ$€Tt“ó*šùwáû枟qt]*|ÂóS¥j^uiKùwsî „’•0Ö Bì(¬‚ém¸üDfPLüÐe$fµñË#hX Šõ™€z MÕÇÙU5QlUlU£Ð‰Šˆ€}9 ÈÊÆ êcúÎ!ZÁÀõæ‰ÕteÊ¥É8AŽ!A¾/°ˆ»YX@Œƒ†(´ö2ø X¬Ä)ýy÷¦DÖ(n…biÀ$pÐ0_ÆÝŒ*iÈÁÜãc8K!°à`°`hn"šb°(ÞæÜhöb„PTîÐ$®¹ÑàŸ1ŽíjB]ÿïeÔ‡+yzg"ߦ?¨$…*« jÈ,ÅN/aäij%ŸŸ·GuÒÕöTó…P2X<äâïJ†Òô²¨‹d¿;@€Òµvô°/Çoø#¤àqê ö$ŽÒa“Þ{]véè Ì;?[MßÔ.‡ Þ+5ž€ÔRÄk¤„ªQtØÍ®€aŠ(ÔÙƒßô¢˜™ êA—xye×}€­Él2:”m™)"dv@øú+ô@°¶ ,µa´c ° ¬°q€Cd #*šzàŸxf,¿5ÕÖãƒÓö­%Ý â /¸ ÞæÜXîß ¥Cýßœ ÿ ÊP&ÔOñ¤˜<1ŠÃ}‹Ž€®o@ˆ 4ì#™>Ū*+“ ŠíQÿ5:-d¯‹gª©›,:s1­@úiÙo›vN¼{›Ûä¯z 'DࢣçWA€é ‚GÊ[O†’%÷ÏQóvÍ8 Tp,I’zm©žÆ·ÝÛ±ywá/e¦LY-AÔ‚W‰ÅT­–1CÞ꤅Ϋ ”¢×ÆS°“…¢Wî>tØû­9…øÚ¦cìcª¯!Á\Ã(+4‚UÀ X,T @Ä â¥ÀÖ]Q0BA2¦â)Ý‚‚ €Ð0À.ì/˜ñϸÓŸ°À˜Ç§Ã¿š+{à9“n¶ÓÔ5†‚˜¦¯ &¾æÜØÀ¿QAP¡C½ŠsÐ ²ÿw‚vê¯øÔ¶ŒÉyV¦­Ed9ý¸öý…-‡fìa²ïxå6†§ÈVU™b@è¢n¹LšI½=N¢15Ì5çT-¿@\íïýKžôŽÏ@Z¨uËPCµ˜ÏvHQ<ýî( ù™¸Ãª –Ê,¾”Mëí¯êÑ{ö4¢°y•¡ïHÜC$ûJ;²J¬U"»ŒYp÷0UÙMÇ"‚H¡‡ðïüM%ÉþÇ8¡Ü0M`]ÆB—‚Òe·ÃÂ`E,0ÈÁϰš†D zM' $Ý ™zÀÄ2a€0›k¼‡›Á oܯeÌŽãÇ2k°Xfa¤.4ß  Ø~æÜ¤üÿDI*ÔO1-ºqÿE€Õê¯øx·äÔLÎm|A\€{ß:ÛŠ“"RUŠII\DM`[ŸÙ1ǃ0˜:XLs™5¬»Òø^á!×"4{Vo?À8š½ù5¹gjöˆÌB>~ŠYÃó¦È:ʲžF"ø1…ÖŽ3ÞÑ…‚ ÀW¯éýó¤ô,E…öêﳤ¥èÍ0™L]£‡mýú& "3‘V*³‚[è-î¤o»Ñ 6±ÝàK @’¼€2Ùî‚­‚ˆž9}:‘r°¨½2ƒBÄBÇ@˜€ŒÉ€!‘š%€ÙÃ+ `™–Ç F Üç .¸ôþ<ó7ή/kŽÉûïà83 pN8.`@1÷Ü0ügP‚.)Õ_qMº‘ÿºTHÉ]ƒë§øh#šš‰º`OÞžÅ@î3Ÿ›MÖz %€‰DÚÓÒãy±^–›.úV;‹nŸñ Ê\'–œk^.m¾§$L`4vJ¯ÀÉ¢}V(pô\ß/“–ïС°ý͇À7Sj—XJ}w6ëKJU«¸‡Ч»‚ PÍSte¦“V#¹\¶ßQ~îô4†’fÀŽè2RNHä¾]€Ñ§þów6~g^gr÷5{¾ $ö½1 ‚pÒ—ØÙ4>6¼¦e)Hlƒ ŒÛa—B@M…@8â„´ $ô$=0u’¤)–*œ9Øñ`àPÿÀ*ø >÷üa!AýÓ¦7ð¿ÁÅ…PÅ?À'g!õ5@ÿ¬Í­¦"Ôäˆ ¼êmߨWUf’@ˆîc#n]ù>vζÏS!1cjU)“Y$ŸBa¯MóôÆ i[0Tö|4˜$/Óq©qÑò~2žõêðh Î¶|¹=Ê  aú!ž.§‡³(#¸crD©ÍV“è”}’w×n¡1]â ãËÀ—:3Þ¥ ÅjBJ" ™UªfÈÌ/>MÎ^D&‘dò@@ÊìBFÀœ $ˆÆÆD4 Mk6H€CXÂÄ…Ð µ²7Åyžà¶¸º˜óÁ÷³Úï¹c¹ ‚ÞÞÂ5àp€B´@AþÝHø¿‡0ÐZTÔ_±mº‘üÿ .À¨ŸâK¶§À´E!]žöiEì `~"™ «£¤~œ¹®¾Vé`UUB$€T£2\‚<:&ǾhelÍöŒÜÕL<©–8Ýç4”°×_ÞFol~bñ’a´ aäUžyÂ/5zâ”äŸá´S–‹yó® Ââg‘aZ71Å(¦pqÜ’Ó5}ª¼(IÎÛôæÚ¼Qå0ùÞTìfþ‚1îØûݵPäAPÝ.@€0c1\@,‘€PÈš·€ pE„ äT xP<6) êÝÝTìåóŸ¯ø}öw®¹;A{À%Ëœ<Þ7x€†þæÜ0ü¡84¦E7–ÿ?B}†g ·¯Ê¢< páËØG3_¨†²®q|Õ»u‡ú̉¥Ñ›àô¡±r›Òë®ù†óÜ© Õé³;y FUûÄϬ&Œ7'î§ Ý¯ÒëõO’eHÂNLX+ „(—ÅàÓo|ª×Í”HSÄâ\è>+ø˜q,'þ\ €œk ìo·Å7¬0W—®r%#8t“3=µ/²}×=ÜJc˜0: À‚VínÜí!÷rÈBŸöQ©·D4 ±@ð€†Õ$²Ö†qˆ¬g €^Ôj4Ù;$i(ØÁ›m &Éb÷p,`ù\`¾8Þ1ŒQN‰R~§ÜHæM@P%¡f¼cnÄú_U jŠE%ŠNF(⵫÷Dä®wçˆÅ"×¥mÄql¨** †½ûùdW•\×I'þ±Î5 Ì'ðE5üx5¥3n¨KgУÕÄUKf‘þÛ–lìx…š™eª\ª…QëZŒÀ_Š‘/«¾âµÆUº(=rª  Õ–r¿( Ób:GË€ v¹é0gú½ÃÐIZ`Dz2P2ÉÌxò6Ù—´Û^Ã5AÈM@3™Äx„DJôUeaÔÀŽ À @q,ûà±xÓ ÖzWüò@ÒV±ðhêkÜ «[ËV8à"…v¾ ´þ7Õ쥦þ3 A•„ú+~@dd¥uÉÔœ¤òÃû$U¢LàFšmŸáýBÊ¡ª$ µù¸9¨}.]Å®g>Å6M~féÃÜ 1†Ô²Žó»-Ñ&a˜hÕ^'¨éUÞÕøIƒ4R¯ UÊI#ó°ú›l ü襨 O ˆjR§f$E ‚-‚@"D!Ä­{]ñÝ´$› +¡y`Ä¢tÉ’ ßͪ, …È$‰|ÅyHŒŒ°±E8$âù'3QÁ§¦ïãßâÀœ#€ ZdYƒ„À£8~\Ë9@ðƒß^0†Ç2ÆÈ:`ÝHæ¿  ê§ØÝèÀ¿Q%Ä ©0öR|r9ª‘ñ ÀÝ´ ú ìr‰mÍ*D)­ª2¬x1ÏÞîY 2(7XžìkbÄ"ýù4YŒ66²~Œ°m"îq!B¤æ^ïÄ$@¡ÞlNu6¾÷9àÑÄ+ÊÜcGʰ¬ÎñsI§Ð!÷ï |¸Ë»,ÎiV(ôŒÌŒ. ¨Ö.Õm!(h¡„Üñ‚Œˆ‡@LPÅ0 žÔBh8„Pž8+ °mwÖ€½#² A,ŒB„€0½T½žXAsbQc†Â* Ö¨wÍßc½Ë ²;†÷À ÒcÀ[À;@‹þÝXvó¸2Ô˜P¯â[tÃÜï#×(U¨Ÿâ3à¸%N–â#Àûšƒ%;ð¨ã)]ë~n©æt"ÄpÝL•€!÷ÞŽ;}73 äܘ~]CÎEËÿ¾jNìV‡"fzy|÷U¨–!2EP哵¸‘C§×ŒaÄ…¡×6r¤KÞàªêiœM©A2=…AæjYòù ó;·Fä–[Û±µÑ!fÒûC"yD ÷šk^rKžxÐ…CAÍzÒ³ÊܶŀɊc´a±§ÏZ˜æv2È !Ѓ%IÀ¬ëEH|T°ŒÉ¼Q28, É’a而b­{Ñ‚7`ó‡ X¸< P€¾Ýøü¿ AP­CýŒqÐ 2¿#%AµõW|™Ïni©šOÜ‹ÏPá/®îÛ˜õa\ÇT™€r —o©‘¿h% Ôæ•MgªºEí^>ŸìÒ"Ý~ç{¡yõ?O!ˆ°ò¸Ù¦¦U·)XÔC>{N'Öâ•‚¯IhÀtaÎDÇÿ¯î|ÎWgqv€ç–Â0 5ÝPô\QªFìhœ¡U MPªýø_›¸»cÀF ʽ³ò’ ’¾HŽÎ’nâ'† €öÄ•Ì]Ðì°8Ë2Tcà–ˆˆ,V Ž `îd ‚T«"AFcL `PÀb€ ÄrÂÁMްü€]öpƒ‹ã 3ÞÝøÜ)%¨R`/Å³èÆ ü]B‚½ÿïé9"V‚ÖG pÆ~TÈUe&‘@ˆ_{¾ÍBh¶¯~£×5eg ±§/¼(T@)!î)-G-ŽL˜&„|Qi_ß-[àW%“5Z…‹RÜÛQ¿‘9¿ ó…Õ³"ÿ« ™t†0°.BpƒëFt¾)uu:€8! ÀÛ†þX†g«€„Èjy»&*Ç¡l0I)z¶Î ž’ €b Ó¯º'’g‡F6HDX@}HúJh€ø©ÉŠAÀÒI?ΰéÄ| °êyvǸÛY¸© ÀÁ ÞŸ±Žáwëó€0OggS@¶&¡€cÓx#ÿ+ÿ+ÿ!ÿ'ÿ/ÿ3ÿÿÿÿ*ÿ/ÿ5ÿ-ÿ,ÞÝ`pó4‰ÈíƒCý×¢þ+A×`/Åg@ý2Æ)YàÖ7hã¾€ÜpØómn>sRUU @%+וÌÚ©2@¹tLn êb9€ž ž¥])íÔA9‘ÕдYÉ!xò7x*Î>šQ6íí©úø/@ž?“0^º¸^*Åè°þXÐTötýºlЈèW ï!»@ ”¥Aˆ§/¢9D2DÐdù4RÝ´¨Š†—/UtP¤ˆ!dÌTØ8Œb¼}í@}J$cQô`@0¡+€0+Q6%j€ —m¢ƒÔš  bü º±N€a@@p™†·s»uø¼–÷ÏsÖŽåv°°Sô |˜aÞö6¸y&}¯˜PŸâ4—û³u‹èÛ'÷1P?Åõ'šBF y—å¨Íwâ°9ýFêG*˜ ð°3 žÛÜJ‰OEi(3€gÿwó>Aæ2{œIñÁ‡<Æ•ó ú2|÷̤]}]ydëu ”XPTç_÷’¨öeÒ‡¤¯j3<^ µ†Ä—”E$òrí¤Š lÁB `Á‹QºÖ.Á€Æ{1sX5 $Þ›…ãÿµ;+ضÀß ¤Ó~ß:½¡¨“íù¯wY¾ûû“W$@Îi+ßî6%`ÊÈÆàÀ€Ú+¨;ìÀ€Öy `>p³²`S ÓÙôÖ]ø¬³öm.Ž50–wKÁÐB¸”’&€¾öÜXþÒÄ£RB}†ºè¹ÿe› ¡‘ ~ŠÏ@kM«\'´ë¼3ó K‚8÷z ûðÞ»,ŽWUf ócZ÷>vL$ ŠÙ"⤠…÷…ŠÆºòß…5[›,§5$( ¡Üœ»)™í4úu´‘é½àþ.»‚3žîó2y«'„"M—yïx‘¶,k‡!6^P0½"Ä D!Ng–`81pÑçtTUï]d÷^4èÁê9 \’9(pwí „€¿–ãÆÇÌOh|a,°¿ `á°Ÿ¯‘Z$²+B ¤Ê¨%€h D­†‡Åüc†³ö¿³v¿ÇÂ{»˜öü£€¸(ÞÖܸìÿN)¡¯’PWÅ6鯲ÿBþÐRhƒ=°{ë†6ôïTÞ7•“‹8”Ý\ÛžÌÑp’ªâ¨ª$$ˆ$ƒZYBG›¢¬ÊíÚeÍ€ÿàÁñiÜÉe£‘?ù[ö¿Š:›[hˆüªD¢©:~Z½Yo² CÞ&ôŽ Ÿrn^Uµ{YòåkHáÕå¶X¦³=.E…Oûæ@˜Ø4;³3qm¨kxIDZ€ÕÞ|4g¨³‚€ŸaŸÆ“e¢Ž §à_rÅ0¢ƒ›:väçT‰ ÀÒÑ4*`Å C@B 4@ž…0Û_ c=þ¾~™þgkëóþ|a³¿ôÄ»zAÑÌä4€8B%½‘,!b`·Ù\Yƈ7a¨4ž)€¼[D=ìx߀dƒ/Xƒ=Ô…üÕl€t!ˆ@ p![w†¾U¬ŠsXÄ JW*Á‚Y°Ç2Å”å€u³i,,À Ë·¼,¨xúä޶ܸÜÿšr‚Ž´fLKn,ó?I–H“ÛHkÆ7dLgèdN^—DëÃ7¯ÏcMlÛî׎šWU%D™* Rˆ\ýM?Ÿ¦!蕦›|–NÒT$œWÉs9|xùõˆUÚN44»Öš·ŠÓ­Vg&[Ìîóf  Üñ)µ>Ü –?+„ m$´¬à5¥(˜q¯º£¨=w7¯Pàc ƒÝ²ð ÀÀq, ˜=@ F–‰EH¤°Í X¡žÛòº€]e `ž÷ÜXðÅ¡J‡ú+ÖA‡gþDÀXûHöTü¦Éb2DÔ$¹rª¬Op÷Vn0û6³vTݪ*³’ˆa´õá”$‰Ãð¥G×°µk>g‹Í  >Dwõšcyì7ÚPo+µÚõާ›ö.q›d( ƃñ3Ï""±ë>ûLì„?è—A$¯Oh¡Œ#ÒO±Û5UlÈœzjºðhQñq—&M„(KxÚ՘ʭr¡2#ÇÐ83gÚe÷T!o„€0„"lIÀRÈÙzUŠ—JA0€… â߯ƒ@ V@–„W:h‘8€ƒ9_x³ï¦ëËk?Ü;Ö}€åà÷C)Bà$þöܸìß ¹ÆTž†¸èFÂ?A0¡¶ìMñDÖ™˜åX‘Ó¼s_Ô%#ÀD#õ.@î~¥çÈÄiU•€%8ݺwã,NóJÐIòQ§TEj£|-*ñN‘é´UðêsŸÑèÖÉP2¬.×`úÕ”š.†‰(Tf;x2ø­YZÁ¸¥ÑtšüN ûj`qˆYY°Óv H´¾]A¥b0š¾=¯"ÀÔÛñ{Fw„Órë¡Ã€V°B„Ðñ”zRÄÓ`ã1,ß(Æ9 °ƒDÓî°…r0 p‚ì&D´Œ(€ŠÐ4 x`mýÕÀìóŒ ÜÿZ÷X00k$P| >çžù7„¾½õߢ ÿ ’ $ÔOñ´+7Œ] ek¬xË4Ï%™ß¿î§¶<&ç ´÷}›ÖJÚÄk¢€ª4ûËÝÖ¯;W±n‰êÅlÎ/b×ÍÎooŸC,ø½”cJ ‰w‘šGO>û^Ócå`‚yè3åb¬Ï~ÉÕ(>-“ŒŠÐF Í€H  ë5Ê,ôpŠóÛ"†>ÆQwÉ´%F0Æh„POØòdœKå-&1í9ÈœŠhiïÌNî#4Ó1/`/jη!qy€ *†‚–ÝBm„%£) Ä @‡AÀc ,@RP4wÃŒ? >9Ô@Qá@7tЋ¾æÜØÀÁIëìHëU|ƒnÝ<É Eµ„úŸl×Ùýdfy:À휂Ô;Ê}óõÓÄ ªJ$TƒÝŽó•ëHý"ç‡,yöå,ß½Bî6\‹Wï8对Ļ…âh¢ÞÓÔ)A6Ê¥l"}kÊMr6÷– n­®ÿiãØ ÐmÜùHŸÎww/zÕ¹¬Tؽ;:Y u$“F)†ó½-ÐÑsަˆ-2¥,”*¶ìŒB0ÐNÄŠþžê»ahoÞoíú O œ¬§± Uм€"à|Èfnz@ ØÄá<xAJq,ö»Úh‚’Q€[ieX^ƒÙÃZXvùO À‚ ˜a â” … p~Ç®þ3!WéÐdà‚ ‚* õ)þÞ÷*O“œQÚû‰œmVk«FH¥dI¢NÀìlèá6 8&x齃9’’Я¥1FÑPÒŽÚ µ+½àeÆ[÷4*lü®"Vµye¦O ýïÕRrÊšE*°bàO¤'ƾÀaÕÂ:J›¥£öî™úö èÄw[òYkÏ€¥]ƒµ*½îïHÅÄ?õN‘ÀÐ^JU—p7°¡oÑ1ŽxÚÙo;ûMþ£Ás“Fs^YDiBC @F ‘€Àr‚Ð`L† À ¦×a©h °áàpPÛLÃX °YßL€"!ðÀ#—¨¡×®Q8xÐ^Ç®þ3‚’Pw±®9,ø7HB­PPŸâàÍ8E”eÃT¬/7 # /äs6•t¬žª©€„×+ˆ‘@.jÇo@)ˆñħ/÷×Ò1‹GƧE }?¾›s €c9„öYWr±Ðüå‘™è€ $‚áB•YÌ{ã˯¦y¹Í´—/C”u~ïFJ V†¬À0–‘£WâA±m­Ð®lH¢7™ÆêÍ 0’þo‘IŠ«ÌŒÒ°b"~•â"› ð߸³k“dB¨‘0¡AF—* Þ—B’¦z’Á`@F °B`Y Hj °€©&÷LÆs׿áý³€uðÆy,ÖxxM¤ˆ=2†<)&- ‚jv€ (²ÇÜ0ø78C£‚ºqÍÚÿ ŽÐ ê3þNÍ %Á•ý.×F¶Ê’jŒöÐá‚ß¾áÖ­€ª©2 ADÀþ•ß»Z€êãüù\ñ§!xÀîRLË«2ºÞç" Îà¥à¸ÞŠúÐa[QŠ/ƒ-á1ðh±NÂnéö0S¹€ÁÕ'@˜–vnÞog•g+¯4™(EexßÇ© òp=KQ5 b ¯5 Ød<Öi»pÈ"è ä*`À0«ˆÆ1Ád(ØòÒÛý.7ãDÀÄ” úÁAá4˜u&¤JÒôôPB*pÀƒ¼‡ÂÁÝûf   tü­Ý IH¾÷äÿ j‚úòšƒÖæÁTëPŸâ $Ũ´ nŸû¾sâ})*@Üb­ÞÐåm1磾„Rå ‰À¥„+¸ÙwQøbÿ¾Â㫺c£¯Ù6G"ƒMr]Jè«QTtrè•V!w´eûOòm €Ê fƒÃ„(öÑèÌLÅÈá÷d2×uKˆ[Ï,ÉrÝ *íÌì !û9‰Ò=õ·GT·FÀ` ¨ˆ(bˆ°þ€Ä À4†az-4tåLpìËÐb `V誌CL8ÁÊ, À-EI!Á Š˜µ@ è‚j7 a!D šØkë¯öî÷¿{cêú»=þ äáÖcÀ€3Å‹ °ÂPX†;OggS@î&¡€cû±Å‰ÿ9ÿ?ÿ9ÿÿÿ%ÿ ÿ"ÿ!ÿ'ÿ+ÿ+ÿ0ÿ>^ǰ7‘HYz¥‚ºæœØÿAÐTÊÔ«ø8ÂÎl&Àä?¿/Öá3¡ [c.@ïµæR3omÖT• ɉà2¥Í2ôôp†ëO»<¸vŸ¢ûÙòa‚†žˆWÂÅ`ÆãžLÜŒ†L® Á¡‰,mhòyOŽ ¨f àeJç1© ܸ´;8£@`q½totɦï3‡DÔS;ì×V: Jò[ˆ.0+ 1Z…*  Œj:T©O”À0QŽ1`Zï¶-°ø5 "ãR7hašÕ´„â`1V2b˜×ˆíŒ½RÙ †µÁ+ ¾­ˆK<< šMëø`…1üýSø·üÁ6 õ$€âA0\0h|J;H$€¾¶Ü ó_rIÈí%ÔÓšæÿ‹•šKÚP¯áЮëPï‘§5w®À¾&×;àݷͪµªJ‰$Qór¨¦âÜàò"6P%óNŒ!Q‘\â‚‹Í5iã}Ahð´- ­XZ²>Ž»|š¾±²¾‹dA¢‰7Ë'‚œ~ݯ#7= ±ýª(`3>~?k(¢JñR€À’ÊêÜW´<*Y÷gPV@•nÈ%T[ €¥¡ø÷÷ÿ1¸žóH‚ ‘P³eˆO†‰>C“¶dl‘ÄÁ"á}˜™Ê˜¤÷ ÈJŒ¯-€Ñ Ñ€ “À3r <Àûý&›wpÃ˸: cYÛÆL f p×w}x:øû6;ÆØ¤Žt Â>8~·–ù¿Ïª8ÔŒeÌáùF$ˆ¾=÷5Åg ˆº™§êN¼n$+ÁpJ@9ó­­:±PUÊ$EàÃ~aÄžÿfƒrhåøLcg L_Q(šûz ÄŸIu<´´ØC3#TCô‡îÚP µ’Ak}ï¶¿÷l5@+ËöKÛêûpø¼ëú ®dCdþEu€´¼Ž˜bfV¯øùºEÌ—ŒD4EäÞÝhøÅ•hjÔ_qºAøoH‰• êoxbšZ‡˜0qàu¿×©ô‰Žúè¶mÃç³).±ª2I`t¯ù‹‰d àÅf.Ÿsz²Zì<ÀؚèHÿÜþR°9Mòƒwþ GGŸšá@6µ¬ƒÏpSËÑ›RS‚²à ?£H@Wd)¶Ô°bg[OªCyªd*RH)Ä‚nú{AôI«‰ ò™…ÓH+(gÀU‚Xôsc›’Îw¼@b‰]ˆXk©Ò¢éí ’°7^À®‚ v¤fÀ+à&€/-€i  ãÌð!À €Çv­ßa0€1¾ž}ãsGïMû†C½ó<À 8ly^Ìü”„Ø¥ÔOq.ºaö߸ ¨‘PÅÀI'ßrÝ0ügB!j•T¢^ãtXnó¸Ah×ê§øxg“”@å âÄ£¾/„ªÊL$ºe€pr2}<=öUÅ|`úú‘¥¾=,9:³ü.H0‚q½f%“È$Bh]mÏÍ• qèëGâï¹Â;ÇYD)±õþv_ ¨•òFØþq¶àÀ¦üaôHz½sQWÉEÀP]Ã0Ìð®Fû¡ã8š \-ã– fYИÙhÖì)å%š‰F`ñ¥Ñ ´¡þ+B„€ Q“« ðØ2(¼/ê+áLéDµ E`Lf¹½¸`9ÀNþ<3žÅ³X`ámF@H >'ÌýÔüЊvÔ§Êÿ—µkÔ_ñDN7!N2ù€wˆ6§`‘àà¶yïC5UâõÎwz[¡öH@–åæ`BB u‘Ꭼar˜ 5~Uîì72–q(âËÄ1ïwi"ݶZ÷7?ßÉzgkKUÛ ÞÒ~÷’^ˆúݧm}Ò ,K­]Hšêú„H¢P4Ù xÚ ²R…@(ðr˜ H¨_ef;ÈRçžôÛÄ6»ìE¼0wo6a0Ä'o;þ b—& ¬o£©°(ß`Â.Ë*ÔŒ,`­X„Ö"ÀQÂaM5šŒ008|ÙÏŠÀ µ7Û noß½Ù×ÚÞ"1[À`Êö€ >žùŸ !I5ᮿâÞ3cý &ý´ÜšÜgP?Ãà=×ÈÇ€¸ Ú×Ñ™;¡CUY’€¤ìPÈ€ºy{›=HjU«ÒDG•I¼×Á–&ÓðGc»43H!ƒ ½ò‘!!çÚ"Olr¼š_šIx8• ‚êûGˆ–.uñR"(“yäúkœ@ºó¥ô×Ë©!ÉE@¦ui ¾ëŠ (,"°ÝïA8 PBâŸz°Ã$~E¢i59¿iAèî§™Q³MÂU?OP £¹‡t‡Y1˜¡Ü„ %p„XaÂØAX3(eˆlÊ1Œ)< fú;ëìÌŒ±1~]~mûgä••«÷øCô  –ý/ÂB†*‚ú+ÆA7Ìü︄PMPÅÀ#Q{óÁý§2‘Â’ L¶Ï€¸@Íæ‡kš©)SR!Ð>jøkÎÙZ¯<5”Þ§YA‚£sÀf©sQ“ÿf"DxoXK9ý,Σ ¾NGÙˆ5«ŸnÑìlãfß<’ýýl2£,^‹©–2vJãºb¿3èìñ°±•Œd‹âì ³½«F,Í-" fU'r’1&Џ¥œ+  ØLQÐ æó†y½Cæy¶1œÀ@àÒL% ´*%%ØÐܶ´h­ˆ•`ÀXÃÙ£6xg¨-ó?ÓfªþÍJUN¸`RÛ3.ygÙ…}·8Å¢³ûoDp^ü_àò§¨F¨O1:ü@~ 5õ3üÞKÔ27À㸹o££N,ÌT$ ƒ@M5€­54›Ò(«OIµXš '“hiöß;bh·7 „†ÜcËÎüî§ÔѸh)‘à$@“kôsTv¼í®ÐÎ[?êq4 ›þÞ¨[;FRèaÅb¿©Ð˜¿M¼×,H‹@¦PD„œ'3"A¯Ö_6zÐûÜ2r5@þïD4Þ´å}‘†§ÀÕÅJ#Ìœ sr'9u¿Ñw@Ù)´È„h)£Ê;,@FbAŒäƒGŠé @Œi è¶ð#1$R‚e£4Páu<IAþÊpïd&]ÉðšÏ ½˜~wnsv‚<nÇ-Ö¶3¼}0~c~÷ÜÀú?Á!TÔOq:,ó Ä­PŸâàŽËà,U…êtÜæ– «“ e 5"DM†iL~V'U,øº<¢äñÖ½îÞ“—½ÔÁ>Oðèf€¯½€2h]¿¬ ¾e!å'Oê’¸£‡ÐWö#«¢’XÔòB óÁ¢ ÞÔ©_.5ßä})·ö*¤®&ü¶Ï¶a`lä¢ÍM¢:1C½|°»üã9l9sØÁrÐu„â1[ׯošHz“-Ÿÿ-÷R}r÷µé~x7ãÊEÜÌ5«± ò²XÀ’ `„@V/0F˜ à °$‘ÝÝ[ @ýÄÍ<àkl;¬Q‡l(÷4°ßÝ5`åÌöÆŒÇbb®ø³Î+ ñ´"Û×I¦$@OggS@&&¡€c§« ÿ4ÿÿÿ&ÿ&ÿ1ÿ9ÿ&ÿ2ÿ1ÿKÿCÿÿ §fÿOÄG«´BÍøÖÜ üß‘bi媈kŠ€Ëðæ[mȆ*!*TˆJ F¸ôXFù»Ùª’:®C3;es#FÕöȾۮ½'5åúa4äÌdÍeÇ•2/$>b{lur°·ŸOK()w’|¬€=¾{FušUgr?n×)^'çÞšgH¤«›ü–IJ'Î?ΩØp³W¬¥3{ñ¿€è´|A|í¯èniYšï÷í‘vƒ©¬Ú=†öÛÀ ÍR ‰÷d ,#”ÌÜ ³ª’§L#äZAX™Á¢E@0p‘½o_Áso‘\žåæÍ€Y`ï!Y¬Â =Nûø2¶CÛ—6Kª­5%d$Þ×þ ¡õ­e©P?Å>ç@æwÂájצ õS¼±Ñ÷'LÎÞí`/{bNŸeÓ®…*Å$u­“»†ÄÄd]ýµ ,†]-©NÊhb@Ì_€ wl‡Š/ù˜ÊY‚ÙX{!@*‹÷ Òä0 ž½YïL@Y¦ÿõI:E=,zÌ;Ął¶œ$ÜÓ®õbà8uzŒ@[À>5Ò‚¸pçZ÷®cHby0OAæYvbZD€S°mƒN IÁÙ3)”WéÐ60P° íhŒCX= u+àŠX³k¾ÜXL¿!œ„ç¼ðüØ?<à/^@xg9Å``$>÷܈ý7RP3Æ97foT t¨)þÞ·1¦qD]Üں܀ Ë¾hÛŠc„@ PQ‰.”l4I­-@^˜¸44‰CHeâ/¦ &"c‡P#P¢ æ3  åÊKkùAc¥õJ»·¨Õ=·u/§hˆ,{&.ñšU—iˆP˜÷;¦øÙ¢zC  "ÖKkÅ€¾Z­-¤„ #g2RH,¡-ƒá ´CÍV¶È¡1‹‰„ ăaA "BH‚lLHÅ™ƒb0À@/…Å%@ÓÚáZ`ˆÞx€€å`~×ÜÀú`¨6¡þŠsÍ ƒ¿ÁUiBý¿’7È÷ eýn·ˆœ´ê€Øçœ~u"„†J)AÈ$“òÍTÄsÄ¢’{†KÉ¡Dc&]JËô¿ŠãLØ=wÚ‘S0SH³†9§íP#@öN\„²6¬9I?D²ÈÓ¢¨ÖA·.öG/™sœTšCV°Š`1ˆn¡Bª Ä(‡‡QÙ³4À†k#Í; % 66þ O–h “•¨4™Ò³Ü×"4^™ŒØ,`0€ 2øxa&XB€”¡½£‡`€€t`Š=à8NÃ6u†®æÓ0¬}ãqx8fþðР‰/øµ•±=ùIƒ0^צnždµ})¨O±®9Ìú7I"´ã6ÔŠ€÷mV²”8n£Â©Pv›Þ{¯âS9RUU€L$%€@ìñåhV‚yÔ¬ÿdÅw¡^³[—=‘Ç¢Šj6ï¯À• jÀq{, o¿8¤ÝrÐU[z–AR1zÎ.+Pø`-Ú@Ë´{î¶·̾£®Ú…â°¸ŸGÂ~ú€‚UiSñ [ Véù] T¤ÈsjÍN`nÖçô}šÞL‹å§ˆ ²Fdžk !d ß²£±Œ ­¤ØªŽ‘P†,¤@°èÛ|V4 8ÀŸÃÁóÚãðxxíˆ@¯!q3~·ÜPùgP‚ÆVP·ñ­¹qáÿD¢V)eê5ü¦aß Çƒdêâ]qZX³ ŽPâñع釘¦5Tƒ¡)·S> SªóòÑöÞ›Ù[¢ƒWB:X®»‹ä¬AJÒÂl*E©Nj “ÅM䤊͘ԥ­\Þw<-@ä˺uò‚½O¬{')ce$EéyävP`@ {ƒbQßKâþŽXèÆ&Õ5 ¹u>Y`‡l!‹C@’X ¡ãS ôcŸyþÙî‰×E˜DdÀ†·|ì<·1”À@¨)„Z•ןüA¢I“À8 €ó€»/*ßI£`¾Žá8<ƒƒ!¹Aöš9 åÞè‚ABÞòÒDi˜(>·Ü ܃ˆ¢ná4o¸£oðmã뺀‰1gÔ¬*UU 9­Ò×$л&sEvzð @àæ÷Æ‘&wzräÒÛSp²G Œ2³»½-:vuEׯ7¦TSû¬"Gjô.$ÍáÇ÷² B0Ü¿0‘ùuƹ­ÐäÞ™ïb3ûúGD’ŠiŠg8h HŽ–d÷Þƒ®v˜”8Ræ¬`¶lr€{Ù¢/Ÿ„ˆTADŒ´ü B”=$`€£ýäI(0ªI™Ø À.YÖDB$ƒAÂ6ÃB «))føqeQ2©i`îI†ÁÇ,–»Ã%`°¸€à9±6®HØõ€²=•Ë ¦¿„R B^Ç–ý7*}k+eêU¬snþ3„õ3|@DMUž˜g¯{Ž-Š&¯¿[ŠC²³ghzxà¶çk›âÀQ Õ`¨n7£¡êgø‚Ñôì˜t»š’d€Ñí”èU?&ßà–c®“f][<^Å/-ï÷v0̺+⊶ †íL‹ ê,kÙÆªB©wouçz¥©3—ÀKð¢m¯#H ÀG¤wYgxPÈ©£¬D½`}b*Q¼[!¨WZ¦ ,LÜŸB Š“!È7Óx(&#ø 206{Xâ„BÀ(*0XËZ,2ë‚ļ7.²®¹÷yñq|ýle‡·Î%\Gg1 `Ȱ‚ôA)"˜  ^Ç þ'$inŒzãœÃ³ÿ;jZ‹#Ôø˜$ÎCM€‰ÚO›SˆÌoÎ[dh^ßgúÛœ£µTUU¥¤ rG7«ŠV³;W©í­ÜPP¡«Æ(¹Ýo²]ýý (k!gJfp†ÌD¼LèúŠŠ‡xñ2å%¢0¦éÖ 1e²#É”&fŠBw⌷ÿ/Ó‘Ñ¿A`n©—ÈŽ RbÉÊ?ªC_o &û¡´6¸ó¶˜¬¦C!  %÷ì™aZ382qG2  K¤Ðaf¥ÄfÐG#Ñfé1Ö"› @Ö8îÝÌ{ þ§çÖ–¿Ìóé?áâù<Ÿplry8³S»pÎ:Œf¶¢PSä-°€@^מû¿¢2A]ëœÃÃÿ+•êªø "뙈<.2îY ÂÖ˜-Y“zëPS¥%âùiÄŠ³+HŒÊaKbÊëë²Jòì³M ±æ£%4Mçòä,h%™6@ø}ݰVi7m;ƒÌR[0õ'¢åøaè^›](^3¢{Ô÷fÊ…òì.)í'Vؽ£õ–!4Pök£%†Þ´4 ,£Q { €`é—ÐÊi(¾×6°yaôíÊTÌ]?Å»çÆòÿXBW­«xíi¼±b[)í;" ì³! —XEªJI¼D ÇŽíÆ:=h;G)–ø³sœô DÆ‹¹Kr²6¡ôÈŠÈê}dŨú3’#:g`,¡T¼s&¤Â€!êá¢EtÈh";òˆa¿¶å ˆšP$£O,"‚Ñ`²Œ$„ï‚pP-,îœZcAPª{mSWìT1Z‚"‹¡*¨jˆ„"!i™,—«AÐ $IVúy—G4!¨Ó*vE"tµÛ¦ÅÆ©À€ïp~kaÝsw+ðq Ó0ŽŒ‘óñûÖ_€Ò¡Å4F‚ƒ ~çÜXæß¨ J¥õS¼‹n$ó_\ T(œê¯ø "Ôd1"ïÅ4`tzgÀ&³ÖÈB¦ÒPf‚ÚŽÝî¾soc$ @¿Ž"ɶ2ŠÉ·œ¦e¨RжªáZV5T(ª9Mýlz>_¤­þ’¨N ^%íHÄêD©$90!°vàì`ÀÏš PPʾ(áhÐȸ¬(…!ªª32X&®³S"@‚aÕg(Ra-”a‰ˆ&D@XÊ68”p šÄV"›Èp=›ÉKÀĸE,¡ÐÀÊ’DCIHxÆ @KÎ>ÀÃp9$Ùgózê‡ó¸zx X”OggS@b&¡€cÕ€Ä@ÿ-ÿÿ$ÿ)ÿÿ*ÿ%ÿÿ0ÿ(þÿÿÿ ÿ>×ÜHîß š”qêgŒ{n\îŸqGh‹e {*þ*õ«Y³%Š}Wý€%a¶=ßFuˆ¼©*- âc^-,kÀÇd;v 2ÛñHp(ùNÏnªrª}CÇÐk¼ÞZ{÷HfN3#‡^xv Ð+¯:¢ÅªS3KÜ>ˆz›€¥…—J0fGòÞB+¥M£Qì²FD,« ŠªåWÙ…D„™°XªX x.< +­ÝêPg™Ôê%\„WVËÝú>6TRÔ”Ô‘xŒñ,IEð0Ó {ø ÀlƒÖX7òŒÖ r(°B‹;ð6½ç™ ‡mtx^a`Üz€n"# À7R’5]ÞÖÜøÜ¿‘0T›P?Å7çÆò›GÀPmBýŒ öQ¥6†²¬œRuªè2‚Y[/8ïDž‡øº#S!©2E œ]YÎX·sXfYÛ«'‰gXÁµÑ°ðip)'##¬¦/¥ÆÁçë?¯‚H(1(Døc¼=•”'ƒýôJ±ÂªdÝúQl¨\¥Î™L1]dÝ CmRQS3%Z2ZM€®×Ühvó„¦Ú‚úïœÿ*u¨Ïø hê-"²= ð>â4acÐÞ÷1¬#jªJI&IzôÏ›äUÆR™®ðsO6ÍO"ÓØ¿JÈQê# z¡ÍO‡àÎìZ+|f”åö¸—ÄÔêìBaðõÕ( İ„–í: wʆðÐ@Õ”õ â€zº2[Ú"ti‘1EÂ:KL 2[Zyí`pctTbÂCÇÊql0ÙFu]f çTCq;»ˆm®FlÈa°ÀˆŠ‹ÂÐtôbW5YÂ(‘çH¤Z‘€‚PÊDâS‡ÀƒÞÔãÍÛ²`áØÇ9 ð¯÷ƒÇ€ °À“ª-»ä”€¸€ ž×þ}„d+U&Ô_±Ï9,Üü )VªtÜõWüT‹"Ž3g;2eÔ{ëŒi wfÛ²ú ¸Q U& @^Ô"vÓ¯":­ÎƦ!ò%¸”(Û݉âNʸi¡š„Š1#Ÿ!‡úP·ÞÅÛ¯h¬|EðU"I Emï±®Õy÷–Go윶žòAÓžò¢oÅ¡´µ„dLÕb‹ bÐØ€@ J†ZmqS¹»¦-ÖjBþ  ¢D ¡Èî™’á>#"oª~(CãÚM`$~xûn½ ¶€l –0À Ø@„ÀÐH‚ â,€q™¶ ü8kôÙI3ÀOžðãbøX€¯Ç>Üyà¡Db’’g  4D!ž×Ü0ó¿œZ©TP¯âÝsƒüÿ²ˆ¾}H¨Wñp½¶•GÁL¢(îì$aòÍ[£u¢¦ªªE&ÔjM ë Tsæ0Øî%hðE¨"±›JU­hZZl­à”“<¸ÈÜý¼õºf>!;k…0h~½+!’¨C¬›+¢xÃXs”±Ê,êž„Ó]î)“ŠPêVÂA×N—¥#•°‰ÒiJÌ4 bÙ`ìI“½@ˆÊIw ¨MNØó/vBØÎgŸ)„m‡€°P„P Hq%Ž&îH·jJ1 Y„ÍçØáßê—²ü{NŸØ«„b€¸Ö›É¢OÏÏÒ'¤’•¨Ï-¹ áëÀÃÑ£V¶¹JCݬ*Pì€"dæ¤Ð9qÕ±rÜ4×J;(¼'u%ûΙ¾$JHÆd'PœK±€ ¨ÊWy¤!ÆÎ™53¨7W "O‚=|^­i T9…+¦I5‰#aN ˆA¨ˆ,–Ûx±B‹÷Á–ÍŠFâ.‹±Â`‚)¯ 4`aü;³@ó—\Ï•{²Ë[Ê.š×åqØ{Ƴ)"4gZ“|X%H¾×Ì ü»Wb+­£“6æAóÿm]¢K×ÚÜaGý?ÀÎCu*E‘2…€âÍ;üt;þ9†ÈIÐZ§ªªR àuc/ç$Á#¹¼„nIIæûlŽâ4¤¤"F¯MTbóÄ “#ŸNjEÈÎ@¹2b1ýµòÐ oã„HÎsBžºž~ʘ "J%Ó°y‰ Ye36†h £õÄ4c‰îðáð5OE1dñfùtáß}µWª”¼QîsÜOÎKÖ“d [–. Ƽz…%.Fa¼<–ëb¶ `ˆäÖ@-z x Šåp«ÀÀâŽ3¶˜2;€ÿÀ`Ùª?àMáÆÚ603¡ph{PâSÞÆÜ`àŸ }+‡ºÛšüŸ(%¡É ê ½ÈÛ¹ .j>—±NÙVÓ„¨ß‰†ËÖ(/¸‰ÄW3£¼ª*«$ D5÷š©ÎYW¶FO뫞/Ñðßç¼ñÚ°ÌoÍ™ }®äP¸³þ±õ>?ïöJÍ6´ŠH3Õàþ¦yÁü%RéR÷…UhF¾rvX¯§êíwížºÆ Ñ„hAn¯ì«ÇÏ}¡‘obØo¬˜i÷ûY¯¸ÿ‡aË\EæÕ¢óož¯>l$d¦Âù53Þ¨·‚-ùªTç×½Õ9Mê­BI IÀA`„ ‹ S Ü=à Þb7¹~w ÇOöí˜qÝÔÁ|að¼;À†³XüòYtA- €ÜBV€àH^·Ü0ó_pjêU|kn˜Ý< súö³”¥õ)>ƒ´'Ê{DQÜ*°\`ßÛAל(­¦ª$ÞÛiôåô ôGZna\­tž “ëk*Qßm»ÓLÈÑ´Ù@‘«Û#ãVÃ&pe¦6. :AêîVŠ% ° œŒ«DPՒĨ)¶…ŠCHIVÿ;“ljº¬¼‚| §*.þÓÀTnBGqgÑY0ÕD9ä|Ìô$õEˆì2=ˆ–––¦.ŠPƒÈe$g#·clh@¡Ýéµ£˜Àر‰ ð=À)¨R—!«”!Ÿ¬*i°Œ7Ú²íAw¼› lh(‚…X‚`ÀúÛ‰£Í ü9h²+xð@ƒŸ –ùÇÎR„RP¯â]t£™ÿ‚ ¨Ö¡nÅÏ~fE—9Šj™%[¦ÓÞÙ˜mnÍ„%Ž:QBÌ$ Æ—›fѧ²Î‡_>š–Ý£k:nŠvE|NËüY‘8eÛ'Å«çøOš Z÷?±"‰–VÝ ]bü*pªWÌT*ÅÀO®çW0Ï$ãVz†˜×^C ›,”¦c£u  f:Mj ˘h‰&)Ä4¸ ¹™ êZ*:$m7 Ñz;ÿîX9KƒÀ° û0¥Ó,!à ´ 8,K<ü€؇HÔÛ@1žžÝ<†Ò¡^ż膙ÿâ‚ Ô§øTätEdf\Qj…A xãÎÀ^€ÖhæZÕT½*3Dú¶Éu\Ÿìgx¹Æls¨¸[Nío¶ a¢u1ÈCONÃÌÑ`[<±ìÂðYÅŒ‚zø\Õ D¶ZqÑd#¢%Gî48=æ–¥ ž]G”v“纒E@¡^18ô…Þª H }—fI‰#@9ÝDHÏR‚¦xlçY!dN»(‰,&LéN½€.m&  ´í§UB"pJVBe"ª* KC T M;ZQW€BE``‹Å>,‡àà€@>çܸðß„ T[P·âœt#ÙÔ(¨Oñp^8™1¬9ªÓ½_…SFHàì@®}÷ÙoNÄ›8Ue5òvõbLeÿ˜ã”Îz?ï#bz¿è‚Äm¶Y{¥Œoˆ¬-ñÖ”µ}ùa •¨Æ8 j¬û+bª$…2ÎD¤# Ó9ÿJP,³Aô”É>¾„ H€¨€m-Æk«Î5);v$—Ý4¡2 ®¬@‹R€0¢€P’D–T•Ä«éSRJ9D ÁV`HƒA O |4Ù8jÍEïÆ( 6'à%+€P  Œ€ë¸€ÍXœcà/0ˆ^×ÜH~ó8 5:ÔgÌ‹nù/!ªÔÙp¦ À½ˆmfâÛŠ¯c‚ª„$ HX†Î¯›­•æS@¿?hÜUlo¢G$ÁßK¥®Û’©úh D¬‘¦sT{$‘“&5/Ð mùCþæj›ï4ºñ´ÓoÎEP@e°Àã}[‚õÙm€³n½UHD#,6XVJYj1`!0uŸŸôrTéÓ‚ªÈ•6Ôn ZµÙà°‹&BC P@¡ÊD)0Óî1E5ØÈe@’OŠ]P4€)G¶œ,Fp€ûðàŽ{¸8À' 8@Þ÷nÿÏ’ª%ØK1:Ìú_.Ðj‡šñp|\8%*—wö@ûÄœ¾£5¯ªª¤D\·‹Y¡­ñ¼ ÓåHÕ€\jÁvM²1Ýo›F!STíI1d!ˆøc.€qš¬&Ê%š-a]Ûàƒ·ŠàjX·´Æs¦F—“Qj•÷Ä 2ú@$SÈJxÓäcµÝkè]ˆ0$;G=زEàBBtw¶+©»È•/ XÄ +M캧E¼úþûNvæì›tŠ€|¾—€µ‚ +ÓwÔnИÏÑ€÷û¾,Â7N ¤g=…$UZƒ§‡º; €S%‚€‘'ìf°0> Ewoªˆ[ß}ñEM‰–ÕfzKÚ˜«íeFiÛ1ÍÜ"¾ÔyOŸR`†^°¦s‚$ ãÔ.I€"¨  xP®hIµÎjY‘±`a¤²"0jYG5ÂÂDÉ`F$ª ‘MÐ €ëÀXŒåcß{Í9Ö/ƒy0u?VÏ–½Â8(àðHÊáG ¾çþÏÙ” ­Ô­øÝ`ðß !C•„ú•²ÊãžCË÷”rÏÆœ>Ì (åhöµupÒRUŠ"–Jïßúó7#‰dçxrŸ^¢¿½±Mfç's…¾fÖ±t»›ÛŒ¢±ìC Ò7 Í|ä ÉHÏ£!»Á† @\§!ͶÍR¼x@âÀAÙÓI€÷?yÏã3sy©‚¯4»e´¼æͰ®€Ê ¯D™¯KV¿ßÁÔÏ5ds¥R3êld!c³Œ0"oÉSUµ‰J"I]Q/¸ˆ;Œ- Ȭƒ… eˆW0!€Ú(€sÖ`¨§þ]¾wÿ»5üp¬)ãáy`ý0o ùBÓ5Pkø¢þç´ÿ—]!Œ¦TP¯btX𿜡Ѓ–àP?Å?À{d'¡Ì{F`÷­ !”0ª*+ P3ADúî¬c¾·Húú6VüÆ[xí˜o6³VB÷>PšázÍÜH$ÕOÚÚØxínÜy´ôYžƒ*9z/¸³g•ÔNZñóù̲E°¾{Î Íj³9´÷Ü3û~Ýø”°X9û„jáRÀ¢êÊel•Ðá månÀÜF2° û½ãJ¶Á¯FˆcâÀ2Èöͤ16‚C@%ŒC ‚R¦˜ô º…Ð p ¼£ó¶*cWl µS€€Ç¦¯ù¨—€€qµ&³ýp7™&ñÛçøÐä4Êy¾Ç ÿ÷¦0Jc)ã4þAƒÿuWѪêUü\©'Öѱ†Dqå=iH±©à´-ßG}ëPJM U²È´™jªe’0}qþ«%¢"Û$4Lˉ…ï<ì;@Ö÷H~¿lAas O€‡¡çõèŽ9/ÜmO4> c²² ð_AIוÙ'—M1ˆ$€œ]„¢\·0ç·U-04+™t^3jdU–L„|¨ÉšŠ]L;!Þ«gœ@¨±lÏ vwN¾ÉK²ºB<ºþ@r@ȵ\? È $ÿÒ) »SÉ‘²€ñ:(çÝ`8Ø·ðfìÏpc¸-CrâÌDÀ:3€cÁàk â@À 0àÑ`p@Çžý?tç·Š\qẠoÍ òÿ›.ÍCÝŠ?€‡8òt.zFˆö Ÿíñš“@>Bs¢qÎF~?Ã½í ­ªUUÉ k@ž7LãÏÉÆf’^·9%Õ¦ÞIIýÿ/ÕvRÏ ÅUBÖþÏd° ˆ‚ó4ò&Ǩ. isÀÀx7°Éœå aJGJÒ´ÿ±äÆýyX>‡wCi©ñ)@n˾³»:3¹ÀÎz¹y9‰Â,&ÕÎÒ»TáiþüTVÂéšb6Kû`„©×=U(<7‡é°M*(F•æ~¨ $Ì.‹?Ʊbl ”’€@ÐÆmŒ„ ‡ 3.@*\ÛŽÇýÇØ&ýtì&çßmÄoŸ:Q¾$¨´‹Öðᦩ±Œ¡½ýCbZªÂ  þl’s~Nã‘L@œ·Ü ü¿Ïh¥‚òÖŒwÈü?OÈV‰Pßð°kò‘<'6yù @óÄ¿ï]G›™UU•–’ Ë„éß^h½Ý7TÒúáœ=?rUzý_÷š ¾ c#j‹Ýä°$‰8yÍ<™8OžèÞ6·7ÝöI@¼`Ÿ¥}±í(ÍVà=<é ¾¼O²žc;y±e€‘ž%³|õŒ\*C|G¼ô-Õå&içÝÔS»ö ø‡ù7—É©ìÓ“ñ »ŸÌkã“}õïî]`àì~[‚l,ý¦;ŽÓr‚’d—± 3£D € %² =E…É“=ÁlŠK@犛&âH€vüÍ÷™6æïóÇÀ1ìæ§1x‡ƒ¸€Ñ—­°5l= ù²D¿ vå³ê©˜‰02˜xq×ÇŠj…€¶B€ ž—ÜHø¿#C‚Z±o¹Að¿&”˜JBMñ"V‘B»|}ß7?ÚšQUÕª$¤å0Ü«ÛðüËÌzbþ“‘c†=VF[SóàsYçÙÛ™­hR‰ã¶q5u›èÈqPÊG٨بiF/òï=!àUˆ@ÔYÃh í$·¯H{¢ª`„¬dÚDKRˆ¥Ò¦Z8 i[U]Þå¹ÌN¥„i!Ù.-cÛ®éLµ¨ÕÆ@‹3 @ƒY-¤@AÓ=^ÕhÖÕf5‹$Ið™± Ø iQqåAOI‘ H'Àà íŠZ´»R0X¨D¡Aê@˜– À °½˜ü}Áàxï~a-@üåÂ%À¯áÉJ¸1`ËÂù³ÕHu#œ]”$@^çÜXð_P ì¥ø÷Ü@ù/8A¥ö4<ƒˆùÑ©"û%À;ôS2sbŸs´â¥8Nªª, ýÄWͺ1d%@Báλë[¿ZB-B•0z Ç÷t½¬‹.¸ƒ]Lu̳Þð9 -9ê™Öׂ¥Q´Ðý†m@`íXf¤gj $iÇzõ0¥H“t£/¤¨4èu ¤L`¥–³¬$ b Ȥ«D´Nˆ ‘`ÆR@(@ˆ@y’SÖUXÂŽ…©H-JÀçÜh¸yeB]ãžËn mmB½†gÀ>y}ÚÊiÞqsØèC^€Ìs?:´J˜UB„˜IXõºÏè8Ö̤àd¦â[=ð¶M‹µ'72U_WÜ9×Ü¢*c¥øc2qûv*_8…n%¡XBû®†ÔÒPQ]÷P"‰0åª0ÕËFëžnW‡ yÁ` , zR·›,QÙ™*Šw£#³×J‚ÓMOvÓ-(¨¤)¨-6 * À¶Œ+c°²"€Ê€c Jª"„1‚’ÈDÊ4(@h[€jŒ€»CªÌ÷Hß ` X‚¡Â€®ˆ5ư£À$Ê.º=p] ’!~çÜ0ÿo\0TšPŸâtƒÌ¿QIP¥p­¿â«=éZ+wáLdÊÖMïÌ€ŸSàäœÃ!¤x*TYI@±Zâ£ýÍãÆ}Ã5Êø_ïOÌñæ(ÙØªA4çUë‰s¼ao¤žf•M­às¦ïå0\5 %Þ‡ÁègH™q†| 0Y½hÃi,`2—Ò6nÂEÔÃ2 Øwê2öE÷®ÃxI1 #5—×&%Gá}$0QâĤ™ìË•LTŒ®©¦Ú ‰‘ ˆ"r> xå=U@`e ‘/ã‹%’=" ´ŠÒ‘'#XëÍ»çÇxl1õ€fõ 8€™ž×Ü ÷?«P­ ^Å:èFþñ5!¨–`OÅ &joX"k/k+懦i$ZSï¶u2¬‚nП»Q‡º2TU% @-?ºÎÔª»MµN­‹ä(’â ÏzT£Š·q’jÖ|Ö{™gµÓˆfb6xý\¯b)´¶uG$­xy›º¯º]5À‰{a|*Ä28Pv ²Ô‹÷Š,VÌÝYj¶ö·l[°àôT+ý¦+SÄ/S³§J©– –ôI‡ø`º1³‚ …—"@®ÅB’k,À&hÂ/áV€…M2aØäÀ °ƒ¥o§~™¿åÜŸ pëQ¿€ýõ ã0@t€*Êòªh'ÝFx ¾æÜÈðÍ’[K7D}ŠkÐü/A„ú+>FýiV[¶NxD l­˜ˆ ½çퟹêTUUATcáã7¡ô Çý¶ûuBF=⎛ÖÊk‘䫎h¼zÁObàaòæ“‘/ Ôv6Ž=~~RC™ º‹éV+Ñí¡Uƒ¯¬Ýó3Áè—Å PrIcDˆ6œЖÇl ŒÀ¬• ‡.À#ÙK(}@ˆ,'ëëžÙeÖŸÄ)t/ÓMɳ– @O#- 4b,@ ´$°%äÎ%$ÃÛ L’Þt7 ã«lW ,Ë_8‚À÷gLa+à  ÷kày€8}I*8í”^×Ü`ðfª%Ô«÷Ü`ðŸAB´* õ3|nŽÚÌ,kW£HçÚõïh Õˆ9WQkÒIh•UÒÛ^Ç•ûVocÊ’Çe†¼û{æöáA(ˆx?rdç5•yäß>¥ÓLÚJä–þ—‚W^-b"äOÞ%J°‘Ÿ!|w&(÷8´Á—J¤0áÜ ½J[@T,–òP$ÉdJU\í8»¯ñwÜU²·Ð_‰XˆÌKµZ¥Y¼º.Žð6¡X<Œ„°@:m1c$zÀHÍ÷$%lðÒÈH z\´ Ð 8ppà±À}½ÅÚŸ0d%S“Ÿ: ëªNÕ&Ëu°<æÜ£d“‚·QBÁÞ+ (ðOggS@Ú&¡€cz†\ÿ%ÿ1ÿ-ÿÿÿÿÿ"ÿÿÿ'ÿÿ ÿ1ÿ^מýŸ8Õê5>ƒÿekŠLÕê§ø"ªõ«-­Ù)UÇÑ÷É å{2›z%@yÏ@œ™l¾NR¹Ò j•¢”€HŽo±Ëõ†ã\åsò3zLJ©Nk-´œIDtfKÏŸœ'Ì#˜~Ò[*ÊØÌdÑýÑXÁiVÐS”™¢rïCÔõ•Uщ<|ëሠÆþf§²2À,Ýb2R}Öf“nfèûœ²FUcº!4a¶¯Jµ£çvðê ”äËž[þ­Á `¨±‡® -X±‘xõ«pWR4““ò0ƒ \‚Ì(Ϊ$uP*þÞ̾¹™Sp%ˆ8< ³˜¶Î Ae'ƒÈQtc àÖ¹Ÿ>Ø·ÎhH¡ªªÊ 嫹©ôçr³t€¨›Xë4øVÉ¢ºú>!ZòÌÏ xdcyì ù¨x §l§Ê©%sÉfÁšî½€R¦Th„Œ+˜8—K^ÓYV§žòóñ‘ÓÍŸÕ­hp”XÑCÖ!G:}K ;¼Jn~ïxP*‡¾L•gXŽrON¾‰=`šû‚”Y;îO‚m Œhƒy5`@P–™x!Q*GÆc¨=ÉRÅ 2K;¥!©ªE(f\ÂêA=C†ÑÏú àŽÁ9¬?]'¿8-Ãa,°àkÁ×»[ö9g áí…ˆ_G‚d;©Á`\âþ†ÜXð] YuUˆ»V‡Ü û¿/‡hK‘S†Zñ e‡ Ü/ŽÌÀàçÃZ3SUJ¥dz¹ ðc;_ûtà"á0™8[ÌØœíeg÷Ösö"±=úõÙ™'f‹Ï6R<7ï¸þQ¨(˜^_jÁŠ„E÷UZD€,¾C¦þÎKŠúNç;¤Eø¸Â1Ëô±¢–êz\©<dFôˆ,/wU:¹)ˆº÷WD "X5¸þ§H`ØKûÈCØ­` H m‡«0+€ÂØ&tØ¡ð*#@»´âÐÖU "h¬nìÞÄ&ÔÀ€¬áÞëνÁ>ü`–Œq!(-êtw‚`p¤„&ýßiÎdqI>Çܸÿ¢BhÓ²B½ŠÍá™|+˜©‚šâˆœ¾6iGµ¨‘ ‹HúÄ;L<7ôIÚù_'Bh‡ªr™Xäp_t~*ÜvM3E¢ÍÍÛ!älËQÊmvF!2‚[+ ûƒ¡*ú¥ô~X vªg‰&¡ß!ªåš06¤›%ŠAÀøýŀݡ„νƒB‡îJphPP3´¾pid 1]`/fÀF¼Ð,)'"K+“*g sTê£RM-‘¶íc BJD€TÒ"–t’Àãò wAðž À|8x€û"+ 0úÙ*h1û°‚2È þÝB°U®4¡^Å?ç°ðß tM¥CMáÆ¶‚vôHýwË›®’ èíùLeÉuBHUU’@±\w}Ìj‡mjÝ.,ö¢ËÊí‚ÞtèÚ 3sÞˆÉêÕ=Ö®j‚vn”° 0ÌnAÕæÛ8!‚i© I­v¯ŽÒ<¹ &æ~E QƒµC·I têL‚­AõÍJ°l|É*š#;jÂr{•Fã4”äQ“e›z ˜Fd¼ …²…yBBÂ*wßmúˆŒ²lC+sã2¤$cÉ.9€m€xxx¿ï9gÀ'8€ó¼¸d„x8 žJÉ$À5§y PaqžÇÜhæß³¹@µö4þ5‡«ÿ^îl¥t¨«ñpò鄲°ä¢þ{gܘ€”mÚÛœÃZ‰£ª¬,×ùúZÂÍð‡*=ƒ7jNxùн’äé·¾žP”Ô2fâÙ#^PÛïA;/W4oI²àV=‰tÚ‚ (ëLèn–ÐéYXy3M’Êè1´ùЍÖ+ ôëkè—D—ÿ¨XF¦€Ø–FÝOßM-EÕlL—´«z´,d¤‰œËJ¯Zÿ‚Âf`1¼ËË”f `wˆMƒWÅÀRÔ"îÐiÄ&TJµ®¸3äÀÎs Î\pµüÜ»rŽðà“D@t{ÀhSQŒº¨0ÞÖܸIP:ÔûšÃsÿø^’(J‡šâ3½ÞzÊ\ape Ä>óÑÂsRB*% –á›»Íù‚Q bÓ¹fg5Ú(k(0¤¦ÿé¡=¥dA¶Èö”½³½éαNK€iÃû—¹íDe}³°•\p¬ è<6·*àÎêžÓ‹z…bu3ƒÔžyz F Ç^vÅɬe/÷÷FDlŒã’ Pq¥ˆ%ºLÜáÀš2ãØÌ€òiYÉ6 ¿§]äйv•¸‹ú`² àê VÐ"9¡€£z„;/"ð° rUâF&àTàxðÀXzùŽ0K(˜”ž÷ÜHîŸ[)1U)æú+¶57aèŸ)ªu¨Ÿâà=Çgs:-jhÏ9Ûz%®Ô0e("2%óÓ}ØŸ¬¹dß7W/‡R³SU‚Í1!¾ËX “$P0¢¬½.òßœ¬šc¾P¬Ê…‰ –D*ïéµ €”fð«XÂk<¬êh¨ÔMÃcIé1WÝ=3#ÆÂ“ö,3¢BÂX)0íz«­Xx]Ö½5€¡GL‘¦{E²&ï­C28À ¶a @¶©$º2bsŒºƦæmˆÓ¸ÄÔclÕU} ÕÀ»‡ñ8; )’f™'îœ7¸ÛÂÞ¹±¸¢!a€º¡HÀ«  ¤xƒ‚^Ýhö‹ ‚j꯸çÜHö¿U.P­Cý? Óôõwâĉң¡“IY{ŰÛôµzJ@]UeeëTœ×ñúÒÄMþ¦5McûÔú2á@û ïÑêÙ¥NÖÖÓÛ9¨sõ)Ío/\ž2êãd,†â¤Êr)˜e `ëhÂÒÝNÛ@%à"Œ„Š@ŠAæ ää+…ƒ8$@´æLiVR¬ã‚d@/SJ ZKãƒ×bÜØÂØ¨ QÈghø\XWèEÐÂT±’Ë {ƒ¼AŒ"d€·>Ø4_fv·çÖÎŽÝfêÃ>s¦ØÁ Ïpì/ úÀëä@^çÜ Ü<B¬Ù¦~†;çPø7&r5ãQD+,À»­us†¢“оm@µ·¦VB¡¤”$°Gõó†w4|SáˆüÜßÿ¶3*F½t%øÊ^ ¥tH2¶Ë€è ZÝ´b(Ô¯ŒuÛd—X锾¹nÔ,zMÞi(CíÎé*Óä Õ~:MDC¸ö^Z0VŸÄ(šžj:Nj‘Ĉxe±Ó-²Â„¨8i¹  xÀ˜®ø5‹m„žz± Q,€u>ÔX*˜ŽÊ*º* ˰ì›(ý O P>ˆC”k[€V‡Åx†áx€çðÀx@—3Fiã^çÜÈÀ?Óœ RAýßžöÏ4%¨QPÅcÙÑ*uC÷™«N©Èz2ŠT=´Ú¹ˆ¹èßÙö²¡éwŠ™×›PtYM¡çƈTŸ£‹ HƒÅgz~ünÆ&pŒ( ÒT,aQø´ @Øqßàìµ6,¨ã²X¡U ܾòZt5&ÖD6jcÁFZÃ( +¡n`Ƥv¡íùó·5}iòoÔ3°SoGýð4ÿaæ3K1H ¾· þ÷Y‚ $ÔUñ,¹ñCÿw\à?ÔŠ?€ Õ8<^±‰tæÖ@Âì †·VÝ9TUUJ€* ìùãÛjElˆIÞGâwõ “I(T²]kCmþx[_ùôw©£¨Oƒ_B³Œ|Π¸pìâcÐfï:)(É€)$dñœ†ÒÓQ𮝼‡-Š{4:ý M"Ê à H±TÎÇ  ™žw'÷Šæ¾/6áP/±@»l²š€#ñ0¡¯ù!ƨΠ0³P ÐÏÐФÑn˜£ xˆ"( PALR2* Ð8Œ‰`ÖñW›æ“wë`à9’/àpoÏã’Ãåc_i°ŠÊ ¥oâx ¹…ß”a*Ù[‚‚þÖܤà´j ê5¼97!ûoPJ ê§øYVï/ž£ýÙCîò‘Tàµ;ÎK æع +Š˜RT&ª¦kNùäÑäaÓ ¦§Ÿû®ús^ÍNÈXЊÄéûqÁß}*!WÁE»ßý#À{Šªh¢ŽB¡‘JJÃHLÈ;å¤"øéÒˆ‘òti†ìŸ*YZ@|F¤½C_Cæ€ÕÈ2í'ÀDh«¢¡O„)´@†@áiLìÞñÙ(!¬,"ˆ¨"1('2º`þrjb d‡±a%J) $ˆ^€Ç‡…AÆ,àÆXlÒRÔDBQhšš€x8&èOggS@&¡€c¤ä¸Èÿÿÿÿÿÿ)ÿ)ÿ*ÿ9ÿ+ÿÿÿ ÿÿ >×Ühþ߸a”*w½ÆºèðÜæ IX+%Ô_ñ"{=µó1™õS±3\}óÝÒ>Ñaµÿ H@\0äÖÑŠ9!©*S$ ­üÜAWÎ9ÏeÛ“u-Ì@rsSIW  šâkÎpØ¢K&,Ç,ãŒÙƒægõÖ\Q(©LSˆ }× ǹPm PhkY 3Å-×z–ÐáU]vFj}L-1Ád'ivD‰ ò°ÙS¨< `´"ºÇšì5½,š¶Å@•€¡ÌB,,ê‘¥^´a@»æ—GCT¯`(0´WÀð°€Áâìa†{òà…4”èð(”Rþöܸìæjê¯Ø'nýc JA“?À»»vÑ9(Á8¹ÍUÛAlâU•€$ª¤‰¨?v3Ø×}ÃMùÄëk]ñ>h\|‹ Í&RLèžÀ,þŒa‹éX˜Òý²ó‡ÚÇ0¦¾ l‰¾_hhõd†–Ú­>;”7"¬»a}“‡*BTu{1«ŠLTÔ—‚¡Z˜Š·ˆiœ=-XÄ–)c*:™CjìUì LæÚ]e–µ!ƒîêe0Å4Íê Fà•"U#`ƒ°M³3PD¤n¤€ŒŠAÀ ˜\8€ã΃uxx`y(÷ÜXöŸ„*õ7ÎE7šýÇ‚!¨‘`OÅyZ%ɨÉm'"d6!Šzîì:á‹Ièí3ɼµ´¬ª2 A%iÞ˦ì^Þ̲1æþàççþ™)%Í‚ˆ$¼ª¡×8m—Y£™®o/B¡ZYøæˆkЩ!@šÙ¸]2Ê%s×¾ÔØOZ&3,=q®[1 €ì þlÀMPŠ\¿YÝrèÅZ Æ“•8l-².®œØªj —'ö³HBËBÂAˆ"B¡ÀÈ‘PŽªŒ‹þÕçäܶ‘z¸“èÖVUC²{2´"Ë €ÃAø÷yÜøp 0?˜`Ï ìø¿…Ààh3 -…Á Þ÷ 7? † õWl‹ntàß`ª$ØKñäÑ3§—–¨³§ Ç)Bêµw+ÆQg† ç Ë hbŸE£!ކ’ ‚©±ýìó­:”̬ùhö“}ýn¹éA¤Sq¶Ag¼.ðéæé'® YƒAê&‡I¡d·žqIE¨ÅÄúT"óAu¨ìÝæØëÈ©›=@µY t7£Ľ.Ãݨûî© ³vEUun_ë©îAá–‚ .²@ÊP:*¢á cld@ H$"BÒ0MŒ¶$ HèV X¦"¦àr"ÈB.E’⡤5`‡óv@ PõdC’Ømð<Ö&8ƒ;0X˜ÒB~æÜ„¡ÿ"%ÓTëP¯bt£Ù®¡F½ŒÏ€1j¢ˆÈGïž×€l»Înù5'tŠ…VYI z°É»Xé UÍjCzý#¢êþ ?—£ÜâÆuïäß9Ÿ‰Dúá_g.B%©Ó‚m»§VƒWõ{+h¡J äZ/¡ýòžÂÊrÈzè­$–È©d5Q®ôÚÃÈ…а^À¼À% lFñÕ e³›5h*éXB0Ñ›Ý7#ÏÑà ­ÿ’Áù²PÕ‚”J @šÕŠ Éç a € °¬åXk6d–.èvAþ“,Àø©MÖð,w!°u)qé Äí >çÜ0÷?q*%ÔO1ï9,÷?[2jsI¨ŸâPÜP¿B”íyÝ.’×.?×]y¸Ê‚4_‰kiä¡u2ÏgÛ kÊL’‰9qOƒ:&¯åÞ®íg’s £GOöâ#3{ü‰1?«|ñ²§µ!ä×V ÈÇj$%ZÒOÞ·êfd_#¼Òyt2ˆ2h42‹ÒrgÙ®‘DâH_ËíÂÀ±2p,'Æ+Hì©=˜3 hA)Î̽CS!“Ós®´¢¢4© E ‘J#A BEWʆfì~!ŒÂj¨)h[°…:#¾¯ßͪ®‘³&Õ}ïö;ãïÁ8œKà‚**ÿ€wb€+þæÜ0÷Ï(íBBýÛ äÿ´•ì©ø ¤éODÖx¯S"$¸å–ÏlDÆš†R̪ÍFŸ¶Ý÷™€rœ7F“UrSËèþVÿ䤉¯IÓè÷EÕSúݸ¢õ_~U89i˜gk³`_å´î-è §_^Åø“ÝûéáX û{ùå&'´¯2¤ÃRìúÇE4ŸZImŸ‰E°ÝÈê­ŒDG©Åm¢@ <%F¼ŸÚŸ ÌbÀìs»ýqg6§|"²P ÍîNW  d0‚ÖŽI8Ð`„ „B¦ eUP„xà‹ÃrÆ×лؕùaàšú Ì«Îqa·ëÁmzÑ0Y%€^æÜ¸áÿŒ[ -íQ¯ñî9làN7šÛQ?ã7Àã\Â×;úàg¡Ë8çç0æDœPSe&@‘ ¯Ö¤åÛ\qÃØSö^ZÍ)ÃF'&ÇEJ©•<i×;Ùù6hõÜl« ™ðâêS`ïÒšº/ëÇÒs•!‘Bd”<0„*ÆZ‚ØdËbS*âQÖì\C–‰¢\A ‘„³ì÷¤S‡×cÛ4Æyç cÐÜøi·{n_Í’0~ým`±Ah•8;;°8)´¸CêG«"ÐYÆ”Ø(5ìPë0v˜±sÉì°µî×Þ}>dwS»‹,Úã6 øq}Ô4(™!ôK0çž à žæÜphóI¨í[1×­Xç–ÿoWIP#™ë§ø¸õò‰—6ô.ÀuÔÛ#꺡¦ª P3² "¢è†© W% ”ê&Tˆ‹¾š%xï:8!dñPˆµ¾‹  „ßЕWdŸ»df="TI\Õ„ärò¡ž †íD38iX4 ò²À—®¤$ƒþqí*¢‘ ó‰le ÝÑ:ô›1eï°?U{XP»´¹²é'µâøuHÕl.!2éašÄ"Z… !>κWLDˆª0¥p†È1ÈÊಠl€€6Ø('(#k€ˆ¥ ¸±t.`À¾eÛ}· ‹í…/¦¦ª$ïb³ pïÏÂ3`g´–ÉD”&˜äŸR#Œ!Ý¢†:€ø0€¼ŽPì™”q¢ `š ¼Š1¶h‡€›ŽÔìe]H†bÀ ÀÊVÀÖ:vsÊR2@E p~­Ç6,ÀK^äÕY1ð8òRa` €¤ ¦;z  ÞÆÜøÌÿœ EÙPS<[nlØ¿0ºvÜáGÝÅdȉ}Š È½ó©¾GÌÉ||`À6|›I'ÄêHU)¥€àúæÞ¹šœàŒ®ÿFn5õl×ÈF7‘ºüÌËýÉlìGŠçî„9²ÿ|I!’ƒ*åß"uР¾|‘Dˆ ‹*ˆ|çêC¿Òü6LGº@_j0Å•ÈÍÌç›-v±†IAëq!èÆp+t#IØF p¹Rz#SZ@XØjk•hƒ™´b `‰H `$  € àË@Œ 0$ 0ÈIB¡BUGEèq-!6«Y×¥À"‚ƒ†ª½èno¾B(JËXÆÕ­ø–ùouÉP%q¨?@d¥RK:.êˆò H)kÞ"o$‰„Cï¹o׸NÂ1€@hVÇÜ“ïa˜Žwÿ–¹s–hÜÝB!æîÅl­4Hó¦´ŠÀ«ËþCÌ”Z{Ï?]¦* D-€XuÖÓ’"”:Š£¢MÊÂlÔ ºn˳ T)‡u‹PjÑ- LhÃ^±H… à¢"€À ¶Ôt÷²:È Ó¶1 ›¸žŠV°lˆÀ[‘Æ£ºPZY"²¶eKò݆¶bàHP@H …d` õž‹m¬’ñÃbpOþæÜÄü?J Ž2¡¦8÷ܸÿâ0”‚šñphUÍÍz òä+²| „xØ/@ÌæV<]Ç$€ òØ^{îë —¶kM¥{¾vïZUB– ]£ ;€8Ö(èòe ÛrüFÅ· ¯~§ìÁ‰[BýG^»@a»µc‘¹R|ƒš¨Z®w•´Ëþ rÏ_‘Â"3@ËÊy›DL×OEÖÛà$°hË`"R# ¼1ÌŒ„ìWOê*f°:ô¬ 0†¥EOû…'@Ì‚G"!€LLe%)c+0@±®íoK6H€@‚ÀaTl€õ¤ÐÃ:à~çÜXæß=\Ñ:Ón(En¼{nlà¿Õ”ZB’°Ö ?€SŸ)ìÇcwŠòγ /g€Ø7'í0—vt `€Œgª4ßÎõ½Q'öÇZ2@©&pýJsœÎ4ŒlnçríQÉ’3‘U R=ç@¦¾%–?îMI§ ß„4è`¿ÐÕ*ç´OA9œ;6¤ÞÊS„”ªKÜ…”±öîh3ºaºÕ2Œ%„DÛ–1Ó„#KÍ€M4M„0¾zÔ¢CH#€ìt¥ -ÄFªVZzÀPõ£uÀêu€ƒ(ŽBb;Á²sOwbD$|¼8^h5@ OggS@R&¡€c‰èL7ÿ!ÿ7ÿ&ÿ*ÿ+ÿ#ÿôúÿÿÿ(ÿÿ(ÿ%þæÜøìA:Ú„ú㘟ûgB™¡t¨Ÿˆzš¢Ñï¾lù:ÅwTˆ–*K%€ØœÇg£Û ‡0Ž:coûb*Eéjë&º«I‡XP«QZ×`’úš§Y½ý~.䞈Ç6t#zŽõ)"…–P„àtyWÆ€> KìýWTÈŠ hÊí‘ A“tÕJçkÀ¦*®^ ÅU@Û…SµÅÃ@ -ˆYsh D bH!\8F²Ò‚P€¤€€Ð àð\ñÎïÏ1ÀaAˆVRà%ÝjÚ³r) PÞÇÌ«›ïÒ’•¦Ñ S¯!Ï9,ÿßÖ,Ñ´•nŒúóQ ŸÛcb!ÐoÚ\- ŒŒ'Dß9ÎÏ læéµ-„za”¥äRè,ÐÀU‘1pÀÔMA+%»†)XÃ녤ѧ¢‡ ÷03“#Xå`/Ͳ.BH @ƒl ¢W5FxåO]hÜÈ 3– ˜´…“€y°,`·Üå¹2æ.Ö2Å4à¹-,üs4¹2UÃ:D«¾Ë @jRR¾ÇÜÀúŸ]Y•šêUì{·ÿgwÐJÍ„ú)þ槔ʣX™‚|þŽ^B›„3Ï€ö˜³SÒNꘪ²€"!†ãÓ‰…f^ÝX»î;YÔÔ‚ÔÈi…³¡×ùL×n‡{*bÈspà“0þv>ë~š€ÖÕšˆ˜ ‹ —ÂÀH¯¿ÇËCñ(< À}n/™ÍeU€IÕ@_]Ÿ*5‚ |õ¹"w±P°º¼Ð[4¹óЫ>}¥†‘ë>µ ”üjê—xYüYw½m?êbÙØ¬Õ*uõ€P€ À„  <8Œ¿p¼ãÆ–óÁ[;V8nûÀ0ëÓ&<ºÐiàøZ‡B pž×Ìýs K ­%¡^žg.óïZ§†’6Ôküǧž2Ùã”yÌ"8«~سo@J¸á* ¶}ÙŠùf‚ªª¨6Õ[»G?:óoÔýÞ­1(H­JcoÈoNx·Éø8ÃWå*fˆ9Çì䦄´0:5"BÃm»k ×ä`dŒX:àN^@Öιù%–'ì3Þ´N) íh?±¤#¯nOy¯¦™Â!j ¨XЯ¬£D¬ €.,X ‹eÐJj˃Œ(…ëáéÓÿfÀ`X# p C`„„ÓE,hˆ…è9ÜÀàosµû­µf^x˜†þÁÌ8@Çqð›©l| 0=~×Ü ÷¿î% EI¨[1®¹‘ÜÿÙ²L¥lhüÈ ÇE¦.‰ý.›ÚCÑh€ó#Úg@÷m÷Í\KѪ*åºJ@*¯¿EsɽûØ–ú—›(š¸üXØαo,~9ò~ê2-H ÏIѶ4þ6 Z‹ÌîLÃ6\Ø.õ‚Ä,¡ÆúVE ,\ØÙw^ˆå áiÀú W¢´_*g‚\>©“¬Mº¢á€ùB2 lÉ£-phPÇëLUž·”à–%Q”B´ «@vL ´[N×W$H‚„‘%€R/@4‰lÑ@WÚ‘i DØ¥P°8`à/­_ wøøÇ=€s3&àÃí=ìQA¥GÔ€A™@q…¬ €ƒþ×ÿÏ¡$Ôû”ƒÁÿ=\B¶’PSüQeý’¸1nZ8Ú†h‡0{·ÍoÜš胀Ý/@ãÛŠ™Y¨R•$@O·Ó§\ ˬ÷Sz‰wgxóüïCPÚ·xÇ…½Ï¡“óïO5CPt-±0u“}ã8‹¡“ ¬~{¦ ´¸"ˆÆØzëÄW€Ð‘½ílØŸ\—wÀºµ?S3\Ÿ`ÖÚ#ÏÆl@XKý'û÷Í3x¦§*X{ˆûge° ƒþ6L„:Fh ÙÜÝhË0è>·–ùg€o°›X‡Ü üß‘Ê4…P+>0oÛÙh‹§«ÏW„ ®|y@âð1|‡§+¾*(¨0AAA%Y+C/íÄ„û¿B»NF›V£Mÿ_©onÐjåŠ*ª|á}îñ@m­ØïÛìé!÷ËÖîU$"ò¿†ï_ùê²ÒÌÚCugŸÅ@Ÿur¦Ó+„„ñ÷¦¥£–^<öcžGB¯c¡Ï©šÊ½º˜ìO©75ÕÙ8^Ï ÒðˆP ’²U!‘èœÕ@ 0(2’¢ 5¶16Æ[A„ËE € 3  G(86(‚bŸ¡Ù¯°ÀXS €…00 á ƒÉHÀ@~èfý{"Êãžs£ÙƒP( jŠàpóÍÇ!òpX'Óv NÖöÙµ7¨à™Ñ”¥Ï—’)ÏÆ…’KIÁ¢úÐ@\ûáÚJ‚0CCK¶¨‹¾^4ƒ[8Ü6 Hu‰6ÀŠEU@­«œË°`H¾ ‘‘±#aP‚Œ !Ú1Òiuî8†!,KQfÀÓÊ£”’ñLˆŠV Y0*@6;zù°,r,3£ €( X@DlrCJ¨h÷Üh~ó4)Д¦jŠqÐæÿ)P¥CMñÐOKó¹‚ví»åèÑ‚m û6ÚY‡:„  ˜IPB ÅQubc´½:Wì-Lè™VýŸóTnW½jLðzã„Ù3 yog)Þ äb4;Ð…×W»³ú 2瘈¨–€jÚ{ÝLä}4A Hˆ°a–#ÙRB‰f¶›UÛ ÔÖ¡ªA,h;%+vf¾“¡„ YBuíA$[‹, l™@êÁ2…ˆ1@R** €…$ÀÈr ^l@G- b€”Äh±Vœ°‰'D<@fA Ü*´€‘? @~çÜÈпç4JSeA•°º±Ü§J¶R:ÔOk"²Ô„@qõÎ./¡µÏ­­Ï„ñÞ1B‚ íÌnË/%/$k'Âéß]JÈš¦èéðn’ÞkCÛ”"Y¨ö@¶~ïOEK‡·lêq<õêîHl~z#Zõ5Ví,£Ì Šï¨Õ@•¢ÐdR@×Z±@[p¡°"´Fåa°•TA4µdPV ˆ†yi³”,äUd!ƒfA+ÆÃˆeY`DiÔ®Äé2ši€)lŒ…%Q(!L#,ØA¨¬´¬€ÇƒÐàž"6~×Ü óï¦B¬”MÞžËÿ›€¡Ò„º76ST<ôˆ¤WÞ—².{’…þ˜ Þ†úÌD´* HèÍém¬5„áÊ1ÊÈ\ÆÆ¬HOwëEy31q²ŽTey˜}PÄ `6oV³]—KHÁùœ@-ÜÂÁáÍQ®á wZH‰ ¹ª Ó9=À6!#¢þÕ3ͦw}«Tl¦;‹ÒœªÚP ÀÿÇH늱!X‚ÒnlË9­|Ÿ!¥´ÀÚ ¬µ ˜Qš¥Z‹€ØVaD"à\†7nOˆu   £”26”ÎZ€UHVäi²í¯4ÅÀ$ôdƒ !Q9À]`ÀŒ<<\âIp ÆÀ  Á ×ÜhîOT*BóXPŹèÆåþQT £f{žˆ:Ç™ÄÍw´‚´ŽˆbræC¼ø¬µª*¢ÏíÝT;GEˆY?Ìô”¨ xÓ?9ÕËÌ¡´£;³¾M– šeå³Ñ¢PT` Ý79ÅÖ9]³T":Œ°¾N°I+ã” ÝÜÀˆTYÆÑ†ˆ‡Öb"jTX³µ#<`èÊ?BDYÆBˆh',‹%òŽÀŽ ‘Õ„,ˆYXyµ ¼tÙƈ 0¤`%(*¬ F¨°M­À½OFÈÁÇ€ÁA"(°Ix>8OÜó¬_ðÉßsàîWã8v§Qþ×ÊþûbÚF‡úû˜ƒÙͯ[­U&ÔgüèeûÅ~ÂáY e`O”ã xؾbº,Ž–*¥J€À°=;ëÌÜÅ>¦Ö$µ¸ï%Ëí¢Yy’þòû˜¿UI!–Û’¡8]/š«ìЀcÞÛ´1™z3¡¡1‚u“&8x:µtÉô’”ôí[EfJÙ×勨0„+BÝ>”´Ó£ÊÓvæ!…!¥®[&ÿÉt  L,¿_&o³´·KÐZë]BìQðÀ`Ù&ô86ÊøÓÞPJÀ|¬J?c‰ç …QÆ2Œ4EžSЍ L˜¸(²àìïÌ¿voÆÞÁÌskÀl³ÉE"¤öED‡âZ4'š± XHþÖÜØÀæqÁPeBýß ø/.‰©RAýuæõ•ÝP Ú_΀rOfÔIˆ^U%K€ðòÄŽiŽ)t²AJÆë5xþ€¥"žâÑúL±Z“QáÚ n¨÷PEúœ0YВŲS"M66ìS1°JFT]J)Ð"þÄ<ÇæÎºÐ]¯rÁ]o;c¥3V‡€¦1Õ{ê!5Î4]+ÐŒÓo[V`c[`b´Ú}éó`y] ^,'wV7Æ+à‡(C„Â@#"6@¤q-TÄÓIRzYžd °C[ · ºÖy¬;¸³~‡Åõxßø`9œ;Kh<­mI `­P£iPOggS@Ž&¡€c*‡&ÿ&ÿ!ÿ6ÿÿÿÿÿ-ÿ&ÿ)ÿÿÿ1ÿ1ÿ ¾×þ·:•:Ô§xמýotˆÖ•õ3<ƒÌ¨[-ȬðN7ôI—?ÛrŸyfž6J‡ªR’IL3ær–â_€pdL ÑÒ«–½4.Êè¾ÂmÖ0ŽI˜ÄæÂàsËHíËÕé" ଜ±*i±n@@^€f­8,Ž(TU `6'¢o«Ù“„ óâìÕ|ÈÙà¶MôûùÂÉQÅQ%4­ ”³,x|À¢ ý'=³@{Ó¢ÅÙ× `©ðS­åG‘>:¹Ñ¸ V5G¯ÞÆÌÅ ¸µ¾îvò!Š-䳬‹ZO (¹{ .¯y&!rÈÔYØ—B€Dt ×Y…ŠÔîŸGÏùø0pȲò±Ý+Aìj ZR€µ€5¬±&ËÚ-u£Þ.† ¬0 ÐhÇÔD 0U€H~·Ì[›/# ]»TÊÔï–Cê?w#Ðch–P3üÊÇ'|Ú~>‰ïßÝû·T²Æ ä °€·//`Óú{­ª²*I5!­®%:{5;Õ¦šCó—‚VžgW*»óžÑJè_b¼»¨/B^*S´s&‹”ú³ÑB½b]ºõ†;ºóqŽ×œ& ¨õõͨZö;ÛY@…ôy¢-,þñMöäj–ÄY^¤œ«/d9$‡Ü>“"þ¹:Qv5¬Ð€éhk‚ÊጠŸ¢¿ï÷µ@‚çuéÁ M3¡… d@È zal° d-À˜RÐ^lÀ©´T@B¨ˆm ÷ð`¡š,80vÀ6Xì8>à`œ±ØÔ÷¥¬T% p]BCƒk˜nÿ>qƒÆ°CÝÅ8æÆl„B“5ãàÔÚŒ…‘"d¿L€}ï }¥Y§¢T2¤K€}?ßüc‹¢Ê_—™ã%k0cÑ€Ž%z¼naç‘' *3ZJv¨.Ú<¿’“V R6†¨‚ˆ‚Ë9Ä (!Ƴ½ìÖ¤gõ¸M-Æ@Š‚çhHeÆQ,6´„Èþé15‘äÅþOŸu·:ƒ¨Õv/àIK# @ „[Ø€ 0$PÉ0Œ ·JÉeh‡ˆ0 Ô-h08 $½À@èE–XV`X‰ˆ4,pÀ`x¡,¢ò!}#¼”~©ýwÓ„"¾çný R¡¨¹ƒn4ø7†NjÆ@Ô­:Ù]P`¶>jý@k'½G¹çû!±xb­S QJ’ Éu5ݯÉ=Õ¾ßqœeåe )Ì:Š›7´å½ydÀXÀAI'´GÇþå.áµJ´6IކAQFp°³Ì„ P,ÖÝ ûšÀ+2k×/=ø,_(pŽmUZjÇ"³D »R 4F¡²×wDÀêˆ#‚±­Aj @$´B!&ã DØXšÔ îñèÇTC€Ü-ÐÆ!×9çd^ t ÎEàF {X FµŽ†^yªÀ0Žà@ Üà((þç ÿnj”¡¨ù{ÙÿîÀ–©t¨)þŠJ••+#“³ûÏ7¹é$ h?‚2Ø6Nº¹Ï¬QñNÂu¤„X•DĜà ;½‘ë8o­hóAH*í3ƒ3.³ÙÓŒ`˜¦f`e€hBÏ’•³3v §ºC˜*ÙF£#ç\ƒk Ü)k5*C † £0ª¢±%ìÄ•×K¶ÕŽÑýÞÍÆ¤˜’ÄÊB(†HQèš À"ÜEªbƈt¤ D0 ªñðd6@ˆ26 P`À8”Ù¤‚‘(´ú%©<€ðC Y…M¬‚ 'œ+ƒØP6?Uªu( ׯ¾çÊ?¶« M&Ô~­éDívN•<¼ø ïÃŒ¦Æ(g>*r›)m©$ J$DsHF·{l“Ü¢E@U·&ûëY²/‰@2©M@ýJ _úm©ÓsüÄhÜåUôج®ÇYc5êë–%®”$˜ æzd0HèXÕ(Å óô)€uht£,f&Ü]pÌrÁØç,sI¡ó2®‹¢\€G%¦—XÔ˜Y ZXdK×Õuý¿»q²R0Œi,ƪ[dÀ‹·ƒ a¬vŒ,l € bÀ+ X@#¾U!‰&TçXÆZ{AËð€£€ ÂÀ Vpˆ€<‡ËL¨@·ÜHþo„¨² ~ŠmÍæÿBКºaêoü˜˜&+…‚1yg? E@uú3÷m•r"^U¥J¨H߇;îr¢¯ÕòtMµñÁà{auÊ¡CEŠÉRBãÿBŠ‚'Õõ“ ”€ÍtÇg‡KÓÍeüøa6Škdæ‹5ÓP†âé2ÂûÑA3¦úÕHÝ]/ Öh’¡ #7 Ý—-JÒ(ÄOµN!@UÜxÊ`IÜÌRtß*Ï5„@Ù¶ayýßIy½ÕJWlcÛà@"„ ºb("K;²d:ÿœ€MìLZìJ’T>4(ÂA  Pxv¿î\ʹ|fgñ‡÷/,àž¾{ìizß)<´ ‚•¤ |ê%^·Ühî¿8 Õ:Ô«x×ÜXæŸéJP¡Cý@–'jõÇ´…²$h½„sAì¸f›Ó†E„ªª¤H¨Ú”Ãp”êá’ ¿Ü¬d¼ê8ö¦Á¨´¸Þuþ¶‡ÀvµòÊ™) ¾’€ã#ƹTÄ,2¦>.ìI¥0^Û´g %€d]Y@¢`]R’1²@>IÓ¦I!ÎR'"F,F”°4Æ4îêY(+qeÜ0Ê73Â'n6Óønr¢Ãs)%d©-ï2šîá"‡ 5á/.T¤¦RÃè4!N°KØ, €ö.ˆÝ¹¿ösv©3›ºÏÛ|÷ƒào/–¼F•V¯žÖ$‰= #þtf 8@¾ÆÜX~ó¨d¨2¡>ŵæÆò›ªL¨Ÿâ3HêÙ™¢5=À§àP§øºJ©$ИÒè:úFUâÄ_Z•›4¯wÏ~Ÿdjår¢kŒPºº §Cø`2[‰•öAÊvC8¶Çî”%TÒC—>ióÁ(Š4IœÕá—yÓú{ƒÉ2AŒiŸî˜4ÎNˆ5ÊxŽeïF,2ïI[ b i=ôô”1YQ[”C#G@(ϳOOœ2Ú >P˜V&ô™iõ¼0‚Âih0´¬ -$¨q8ÜS¢Jµl‰©+ô¬ÆLd˜Ð°ðÀãŒu´MÑ)îÙ̓s<ÌúœÚ¹v9€ ð@àåÖF€ ÞÖÜhþŸqCP jŠoÎæÿ'jJAÍøµ‘e$%²úåã@ž° ]߀S€ØæŒ¨—>)!V¨8½×xÛ˶òá«¶‡®D„>¿Š~òÂ.©ÂØWóß}~ºGtTíœx,LQ3 €}_ûòÆf§y=©]ÌBÄÖ[£k÷¥«—cbÎ:펦@ ŠÓ ‚l{=-Ö%ÒÛBÞañKuIÝðMàÖ¬]cË€€¢Î`Ðk;_ÓB23 Ô $ !#lÀ¬$ BUi–| èâÇ[8€ 0¬ P£ÐA8J;AD»@Ár8<ð€0Àv²;`ÞÖÜèÀ¿QÉhÍiª¡^ŶæÆþOJ”‚šâ„ËzVD%ë)™ëRÕ;{ KÀ! cî}Ö†@!UŠb@¡Õ_%×ÉÖ{wsܱzu›u_ΪÚÍ(¢"¢zgNDÆÐ¶…Âß¾'P&¤SBžüü×®(iÊpŠ=r ‘D,Y¡*Q­W"ܶ¢ ÀÂ| ¤0£<€Ìtõd:èhvd!MW{Co¹õM,ùÖÈ0ÂB `ÀTÃÒÈ„ ¸1#™wg(€PH::Kë8D !® Œ\J ¡@X”HÀ„à<®ÞÃypøÇ¼ãà9Îq°T æ¼ö©5Ѽè^×Ü ÷_„`Fi'¡>cßs0ó*ØKñ¤yµþT5ïCijÀjQBÜ€ä>f³QÇT•R%4zœ÷¿µÉ 7¾! E":¦³²Ù¬#3{?¿Õ\ðÅOfð[›¾j,E{¹¨G£Vf24ãk)G¿Æ|%æ!š È7›s&ÁšýS‹n¬/PÀ{ ff#”úÕ±œfÕ æ¤†c‡Ò—'ùg,1À0Q/c¼H6²úF/\@žP#Kíhe%B†±6§Ë*’F$cj¿jCÖ°Ž 2n­ET]< @hàa‰^dd+AEà 4 <Ëbàb‡aŠÏ}nœç±éwÖø˜ù>x¶pÊ9ðJ‚Bÿ‘@1€^·žûo I5º1ê5ô9ÃÿÙK"ÔH¨Ÿáe#7Édë.3àƒÕè²ûiVwh¦¡JI2K@„èè fdÃX>9šôê¯ê“=›`œÿ[›’ÓòòóæTrYJѺ^€ç~Gì°ù燗û~·Tå÷šæ²:ë$Ãá)ÞÙ{´ì÷m5xõ¡î4“ëÕ¹Ö ÝÔC M´Ò~cs±f0w€{ .c³Xnóàn6­L&•ÝY",(&±Ê^„A%BÅIöZ @ØHÂÓX÷ h%X wBƒ¦°«(,0Ö«áÀ¸åíý²Hòh05ŒÂµ Å `Çá–=®?|Ҩߢ²ƒÈË#ºU@e#€+ÅÐéΙÎûÑO’d2,Y]ÖšöCj\°Dt2A@ ¦š\ £â×Ô”Z†¡fÛžÿ>>ÉSÚ)L'šD"žâ†Hj\vg9£´çꊞP°!²Ü ÔÂîÓæ8ÞOÆ«åx qH €×Ém¬JÍ5‰ëF"¤0ˆ3@OggS@Ê&¡€cíLcÿÿÿÿ ÿÿ%ÿ&ÿ,ÿ-ÿ=ÿ3ÿ ÿ ÿÿžÈ´ÿÛUª,¨Û˜çÜXæ¿ÄJS…úß@TËJ™m±»eNžÏ|÷£Þu d ©ª¤$¯-´aäýÙå|èŸÜ¿ ó.òÜ_Ÿ;üç–à‹Šx#äkÖµNU nd×­š„uMJ‰Õm]J Ü Wå2‚H àÄYSx# `ŠÅùl0`5ܲ*dX9 HºjHgÙÆàd{  ºP)+aAA炪AÂزcsË ‘‡J Èôëÿ¯êÛn «>tBšåÐ $cœ`YxÖÁ8Öºã¦X0<D@cÊÐ…ÔÕ,ápžçÜpðO: Õv¨ŸâÞs#ÿ¦`hì¥øNd¦Èy+AûŽx í`æ­ë4#¤JQ$`Ú`B#˜=ç¶¶Õê~e8…ù]±Otdà ƒÀp¯)ñŸ[*÷šAÿ^%— ð)~f˜• ,q 5²Fg˹V´ªt€`R'¤@º‡ÇMW  Vx¥m‰1BöRŠÎÈìI˜Å-@ƒC¢ìb ½P ʵÞNÉ28°lfA"ì%$ä4–WÈq`T¨¨Ä€T(z$¦Am &$10­™ÍG’¶x`×íÚÂ|4~¼w†…³$½­4ò¤ 䜆,~çÜ0ó'Hƒ*7Tïž 7«@¥u+>#É¢îdyð 1 @ÚçÛœ«ÖU·! ¥XQ¨sáÍV€êêÿÖäLŒ yލœu_ì¢*‹Dñï´oáñ¢êÐRt9ö’B1nˆ*ëÝ =)²Â\Ö­¥’€:j}Ù¤Nù cp«š,`˜å¦"#$ ªNDhÁ$-wí—KrY%e$£ª¥6„k‰L9Ø( ©Yi,äNä T#v†llRUH…$2sÅÎ4PbªUrÁC#Ô"Ä#S 1aU Ã,,ð˜9À€â““òóžçÜ ü„Ay@ãÜscù?q ZÊCãˆ,¦Z¥ÐLì¢weü`ö=•EDXŠtŒ „Œ%çq*¿×YâóÁ°+ÇŸ8c±€IÀákSU4¦²h/HFgr/²å–³%[è™ïs,DUcÈuoPu„!]¹†ý°oÞ(‚zºÊÝA`¶Ï˜uI«¦x®ö£Å¢Lä*4ŸOÙÝÌ@„*­l쾚™`ƒ‘‚ˆ[@½[@h (™´+ÉY”pŒ ;0u·­€0Ó¹¸5å"„» o÷dXiÝÙ°V„‘V €›Ð€ÀôìIµûMPˆWºHÇÜØÀæQaP醯¹æFó#„A…ªŒLWkU+9+¢I‰˜¸rÁìÛ:[ÓÐáD Q!IÄ´=¬jÃædô2~ÛþǤ¢Þš)?x´VD¢ ªÞñiì3îüp¤×ýkPe§¨÷ñÀ³[ ˜i´I³œ …jíõ¦*XP?A¤Ë«®ðÞB+H~¦}ÑÂ]EŸhT©›€°&ýê €ˆB°(š¤‡yn§÷au-åV-!öXî¢;ŠÝpÒõ4ÀbçÜøà¡%Ôg˜cn˜ý7‚J§ú)>võD™Â©ï0¯I:AÂtηaeN„¨†J—¤{rîb]¢ŠŽ8Çõý?+b51À¾Qú ¾£sfÁш@ÈãËŽ)ÞÊ<Õ9<¥ˆ@É@Ké#Ó€éVÏâ!g¤àÝHå]Iöv넽Ì|J/;ÚŒuSGtسH ûŠädµe—T×—2w+Ôd!6å<|ˆP:’|ž´ÁAΙ>5Л–ÑŠˆˆ0Æ€j±ØQm¢™†cJ€,"š2kÒJ EJ E3rÆ®5pv xÈ¢2ÁÝcÞùc{Õƒ±`°(` 1€ á4Ìõ ¾çÜ øÇ÷U ꧸×–ùïtˆ©%u¨Ÿâ ¨_×呜¿[nlµHqL>ñéÐßó–nU«ª,%@#AÛô¯ïþf³oÛ~¶³AD…@èf­TŸX¹`Q 浦‡ý2™¡„Ѧ €h,¨b™ j {Ê­k•A8úB%„÷wTípÝX€mö™„ä^— ®¼h¢°Ÿs÷`ÿQ¢Š’,ÙA)o$kåpî†a r`'+…ÇBúi"e&×öb-6H`c÷jX…ZЀ¢ F+KàÔ9€Š JÉv”FÂŒ#›0@¨` À¬ý7øÜÚ©ÿØ|Èå8<¾œeðxÎmæåi!¢p À~×üóDC•‚úçœÃsÿ>²L)¡~Š€oÛ‚þx¼o>ZñbBTU• )€KŠ èÀ4zøt0ÿ"õ]ñ½™ë¶r¦Ubk7 ÄØº¬1–°µj3†›klöøX7^ 6˜%*㨙oÑr³­£ˆGÊ·'‚©èd¯®Êù§[¼–éøaæs/‹šmôãŠB²aq–´ ¡äekN¤»˜yÑ'Å‚AKwÞ‹õˆqä=ì#ÛuQƒPrƒ0Ø‚Ð0ׯ#±z,+€eÿ° ™Ñ P™ˆ/8Í   î`Œ ‡°–a„`€v-qf 85c ˆýÃry¿¹@1Àv®õÁä ÞæÜXþM);×§x×ÜHîvÄP­C½ŠÏ€öM¦V©·Z/âÀŽ3`ómk³TÕšªª €Ââþgø½g!@Š5}˯ˆ^G½/^r D:²¿¾"u{;àz& $ÜêÙPYÙ‰¤ ;Ô†}=©¶ÓØoE3Sè~£Íä‚ö¡½‹`Âr^ÓK)IÈâæA ˆO:õ™GN½×4‰f61 •–X‘v‘)ßœ«ô¾9Æ…HáBÎæ/@‘¥D €²Y( `Ä6“ø€,ɲ „ JëjaA&ŒÀ€h…V `u…lzàfF¹^~^·Æð{¬K¸5ÐVÐ@-4Än(­Šo¨`^ÇÈþo*ÒO[цšq޹aæÿ!~F_5ÃÙË™ùãÂÔ¡gL­÷õ±®¦ñ aÕ‚‘`ö ëëVªJÓJ’ˆnê v“gµ±ñbÔµ"yhÒ}œQn’ÓÖµ·)çåÈ­oúQËôS].f–€¨G H_ýuêCÈœ Ó Ïv×Bà]™› /Áݰ[W¦Ü”Üÿ¡8ÔÏ”ø?A"ºftè¨?Àîíãã–ékˆêò"gpòÚvºš³Ùp©†š*¥Ê$ùY×Ü+»îcº&pUm2C ø€V‹ÌÆï¾Ÿ.Ë"zd¼R¤²ì•öÔ•¥¢»€@¸'«~¤Š9Šèlzä±ÒÂÚ>ô$A",ûY—}‘ØE$<þÊ+­Ì;Ïê•h½û³.Àm5páø² vÊÕ<7äÕù”$çk©£ÌˆN“,;Ón¨ X@ä¼Iý¾†¥J%¾%lä522rØl  X³ÌÙÅ‚ÞgýöÁ™Ë5,û— ÜtEˆ)`Yóî-&ÿœ<°WXÐ|Vh²£²M¡CBZ?ŸŠá‰m>ÐX …âdÈfm#„¤Y£6 \n þ ¡¥= Ñø2‹"D5i1öm«-GÔ£RÉ@,Þæ0z[Ö„”jñoås,L.7vG²0·I › ÀêÙʨ(e©Ö¬4vv»¦ ®H:üݾª¤‹X,ƒPUÀ~Œ=Q†$ƒ¢ E˜½¨ ±3¬LÆÛÒ;®ØPÝ–¦R”*^™F°±aR«'^YDJ¸!aǨvU*#ÙãØ6‚$IÁ±I ù zÕf‡€@0a¢ÅI’´‚`*ñ¼Ó¬RŽhI’ »Z !¶mp pca`ä`,ÒÔú0€^Ý0ó)…ÛëP+Ö97¾cŒAI¨~€¨“;ÛÓhU§¥9Ÿ°’^ù©¹=À\°#æ6½+Î@йý0Øû«¹¢†+> ¶Nù*‘f…pÆ:vK»’ @ñÞ ‡µa3¾à“›^’sÁ+åDÅU­0|ë7Îrš±1©ûælž (‹U¡7DqT@\ º$Å)^§”nà &}–RAЃÛ0@ÑÆ ˆ˜ƒVÀê€Y Œ-¡UšÂÔµ#üš®Y‘ÐØV‹baÈ‘eçì$D±Ûä“LI ÀX ᕤ,^çÜ0ó;Ò(4J¨ÖA7’ù(‰P­ø‘§È¬·PÜP+C–Ó†íxwóš ä½ÐÄ‚Íת™+„xÐéÍÙo°2·{3ÐÊ{ËVw~²­7IUñøèšiy¬±ä²ßðòÙg“%˜¡ !zÛ£TB±U/Ò3›ÈB¡9‘j n£5òh3ó„¶46BtöšpÛX4%!6afÝŠa€(^§ã ] p2ÂQ‚bLóäÂfÕBq „2.%2Ø Ž2$¶[GmÁÈ@‘\b[,…þ²NA‰Z0àsHɲÁ^÷ÜXð_¤`’V‚Zqº1{óHU’ ªŒ€wŒÚ5°¤öPîÃÏ !ޝ` " T,Q˜ýY;„?X¼gߣ"ý½ì<ˆüË Çž{Ài€¿Ö„ÑúëžÍ°:p±u©IÒÁç?O»æ‡SŽ[£@*5œŽ¿A:Œ½ûIÌ`fì;r,jiÜ™@ôaS#uœ„# Öÿ½ÜBbô#R6o•ñ"M.‘E0Bdd$ˆ.%e«8ZuÉɵRçjy5-ƒL÷ 0ˆeÀÈ æÒjC`«,³´Âkm5rJdP"΂ˆ©tU`0`OggS@&¡€c©\òÿÿÿ ÿÿÿÿÿÿÿ ÿ"ÿ)ÿÿ%ÿ;þÍÛ¿ƒeôíÈN®îE‡Û£’(ZMÔ:)|€ÔÕRYs­‘šÊ µýáÝžu‡\V€ŽÎ»÷6ý¨ƒb©êÁi/჆ÿã/>s ŸßÕÎ0»õ§!¸vGÕf èãsâ¿ XAǯëv* 0qÅx÷¥ ais6¾¶’’¼”Z:@OŽ2•0 e€z'܇5T7 Μ%æ®"Ò€€Dáâ 9 Ø9Ô`5õ&œ²é}°!« žȨ̈®<-² g ¡•Ñ€!¹=ˆ8ù„/,€F°±bà0$ cR˜”b°ˆK%…^E&ÂÚ%u{Ô­˜'͇¿‚%ÒÚ.”=q½ŠÏ€ãBÄIeà½c>]R{¾¼§¹ÏuÔ‘8N¼ª ÉZËÝTv”@#€õ¸Íøq)1¹Ãíú›*Îß‚*6TW¢š¸A ›|Dè®E&@´ãÌ¶Ì †D¶¹ÏJO*P¤›‘;(ŽÆ¬–ÖsE O+½^I`Btל= 3 Ëžéœf2ʧ1M…‰¨°©Õ@¹K®«g7`›ÐXÝ%Šžž5j:µ°—ŸÄé&‡›TBɳûw¹ Ø €U¬ C؆ZÜ0”A2zp#4Û0ÀÀ~ þÄJ"h uU¼“ 6QK*Q¯á8Žˆ¥œ¾Rž>YØ_¼9Y† 7­'@×Ö¾ _'Ã"#¤1Êö¿wrO{©…ÚÒO~ò†ÔÎ3>[ÔÈ1†¢z!ÃG6ïðoF‘N†8ŸJð90ÜY;Ù€–¯ßÚW3dæx“Ù×$ï튌$BVÛcp H$ÖM ;ƒ€AÃ'¤3EàÞÏY![˜w9D1Íš@Ü¡ W$0É€ÜnÀ""²ºÀÐ2)"†‡±ª³bË "m{CWÁýŸ…È(°Tè²b° ?-À€· ,€ñüŽ1DZÛ§‚zߦfÿÆH"ii}Š€Ï¹›Ë”`-$IïW¹Ì3 û €§É2W?‰v*!€D Z®yÝYE-@pì¤Z^Cùûw ÿ¹A|``½ >46Lá äŒ5Æ÷à@«W¶{’ùÌW öôtÔa“¤N›‚¹Tãê47ça^ ˜íp³õÞì¹£%ZLsêÙ+O€”ÀR"1Àº×Aë:ØAéÄõŽ-!ý–°è³ÁÐåBJî$ĪbW(&PA«¡¡¼4Cxª(“qT"ýT… @eq²årjßO±0e£\|NCä8³i«ˆÂp–%0]„@ÎX£¬ •¼šiÅ=älê_{]`•D™“°È¸IOb«—É>” ƒËT`l ¢UtÊÖNd3‚ x&ž$@ñàs AX(v] >ûà98@)(Kó %$^¸Ì©ÿW»VP¯ñð™ãÿñ ª¤qêS|`ôrÌŸŸ "îãv %ûrQ[I…ªRJ@1lmìÇÃÔ%<×ð*-}96ïÝhüñ2Y êã6§¤Dco ºÑ§Unvfª¸ë™+PÀªÊ“€$ ä˪Mwž]–Ù<¢[š@° $±n/L¹”¼ŸEDDô zÀšè‰¨ðU[JK} y­ *vh†Õ<‰2»ær’&[–öÉ΄°lÙ°‚e‚Fí)­d´¨Á1<¨V @A@¶`í`1<€àÇ[Ó÷Ã,ð<örjßã™c ÁЊ»-†J>°þ‹J‚J] êS,„æ¹ÿ‚Dh(õS|‘Qˆ23¦¸ã\`Å~b‹v˜‰©2@mrfBûð' @4ÐÿŸ—*#Ù¥Ð8žL0¼Åzœ˜ÖX £1–Ãø¼>NT]óûK«™‹¤6ü})9p†¡‰ŽßùûVDã©=ÚŠi®ßµT϶œ˜2Î{&bZêéõ Àm̹߭° )N5’•ÀEñ %Ao9 Á†;Inô)™B¬Ð’‘pY¡ô¸ 2H`Ñ„Œ„IR1¤U1 j“’a%¯­°8l@ÛñçxÀâL°kí;ì@ åQ>÷ÜHfó˜”+tÕÔ§xÝ ³yT *t%êS|²z"Žšg2jîú‹Ä¢gäü³oST ¥Å1UŠI@P·†Ã›Mïjç¹É„^™²8‚†’0‡¯üXºkvZ+7+Ã=ŠW%ä €÷þÃ9%ä-·¡?.geê´IWÌSÛQ!â6ÝNa)m—©ã«ÖX…‘g{¼£âÐ:M?„ŠnráaFÈ@Yø8º)S § Øú _†À®ÃšÈDu‚ ‘ ¼ƒL! È wcËTJdBƒÃ$;(Ð(iàTª^ʃ@…EŸ®›°2‚X ^V`×€YÃþ¸Mðû°[x€¶0 À€f ~×fÿŽPÃÚ¾ì*4Þ=7Èü‰–2”U% ë¶"N9vT|¶I_žEùn[×PŽŽ0ö wrË7ïC·„ B®$ ¨[í¾î\zÏ¿µæ“,¹g;¨MÎ)?5ˆ iZpf¹†û8ßþßt· 4º!_ìSšz4Ú¬’s+xÃÖìÁáÌ3M)ÖMð3í–Þ‡!hQMKÀª%Ðý»IHé4ðfq¨ÐzGH EKÜÖ€nà†by·Èý2_ ò.,A`Q Æy8ƒxÄTiVP0`E•¹–Ÿ÷š’0ÃÏÛ*@µ2R@U¢ª¨¶` ƼÀe[\¶ $מù#z…u+ÞA‡‚?úv:Ô«øx§òzˆH0ÁjËÐäÈmÌ:qâ¤ÞTY2 â‚r€ |žÏæ}ç® +Õºj#oÉÛ:ÐE}Ïu¾ê µèø¹yÍ­ WÓi € Ø7¼:@þHdP¨Í}0Y›CÐ%oÿ[#ê“I¿¡ì ˆ3%Ð àJ ¼O)È2ºß 0Ú&í9T®T2a˜à¢;ÖwL_‘Z2÷g   ¬UB6.uap†¶ fÀB€Á&!\d±xlq€Aà•I=°À$ €uhâ rfM;Ö¶‡1]oOÀâP€·c ˆôOr98K¾×âþ ‚ })¨Û¸Æÿ3„J õSü´.àú¯Þíx·TJY(ž=ñ"€k{Û:ýœôPU “–ÞÞSËÈŠ ®í"¦G5rÉ6xí§EÊQJÄo€è9)eóÊn!UÞõ.yôö±KµùÍ/’;ZYœ)Z:€ÂB­÷d•¹]#” `Þ“£ ÖUûŒ Qm* ë¢D`‡Ëkp–ðZ#ÑnX-DŒA¶Š{…Êa Ø€ø7"¦²€^ÝéG ˆÄChUz†°±ƒj‹Æ@œË@Ñó òä¨ xõI ¬â€Ã8ìôl±à<À{;`¬gX[ñ°ƒà .ë1MÔž×äÿ)*Ô_q®9<»y„!Z_£Cý ?€ÏŒ ûÉw­þi;ž6¬LðpraƦÀÑ8r߶цñ¡¡R% ’2+§–Æä:y&Fù¥i Èù|߉;ìA‚»+›Ð(}P(rZ „+ËwvjhýNË(]D@ÅÞ¿¼OР.b¶VƳ™Žâ›ÇÎÓÊòæ öùÁb@X³Äª(kWªƒ¥¨ŒªöW51HTU46ˆLœ˜J ï§(s ê??ÔR82fCìVB!e“‚ŒbˆhKT$ƒi"á”M„FB –À8 xöËè3+³Ü§Tµç]ÃŽ‹€Ç»ùtuŒ­÷ããó=¦ò‹wú@J ¤OggS@B&¡€c¯Hÿ7ÿ:ÿ:ÿ3ÿùÿ&ÿÿÿÿ$ÿÿÿ'ÿ$ž×P6´DÑPŠ ÖOñ®™þ†DÐZqýŒ?€Voú'“v2&>ÑIŽ€'}“A09˜6.ÀƒÍî‡O‹£^Ui%  ’Š:Žº~kÙçùJ–kۜȘîߨýÕsØi"‹xí{ÅçœèpÁydzÖo®¢c¨Bq÷“NLòìQô`Ê!ÓÈzºÕ‡E¦mxô²L>~¸€ìýÞ ÐîÛÉWÙÛRÁRFí"ôhafÐf#"’¢£¸«E#H¦ièi ‡ÉÄ0hAòŒ„S%ˆo "› p„p ` ì:Éù‘ 2ÚN c6a¼ÃóéküiìL^Ãu.v±¹Œ.ܘáŠý‰AÜ p´~·ÌÛc%S4HOP·ñŽ9ùkˆ¦uvêSü÷æ­ã-Ù—·¶¯ø ´ôÞ€w@ì Ù¶Ú¤* ªì*@ “zl¬4ÏÎ!ÔúØá›ÏüÌ»%€æá†›™Xh¥©Zð$SF¿³RÿØ¡`` O‘»Õ}|/hö §7<ë+G»ì~^ÒÔK@œ¶Û»Û×ý@À` Ý`ÿÙBzË6¶±a nY·Aj= &¨ÛCª°×è”`4Ürõ©Ø5ï›Av·÷¨âÅÆ„-cáLÏiÉ<¯QÓº“¯";p¨ÜJ+Ô"`Í£±ºõÖ ;éí;¶ñÜ@9.X\k<IÎÜ&“S¬ É}-ePnâ@ÿ Í7XT<Œaef H!3h v¹eª;Ä1O…®Ÿ1€ÈBò@F2b;ZY5P ¡$@G€Ä]b´€«È@Aüx8ûÁëÅøc äÞVV2ÔÔ”k#ð(²[ KÔQ¢ºR'å-ƒŽF†ÄømPÈžÇÌÚc R]SA]ó˜ê?“Ib(5Å@5Bk›'Ö"ûý{èGm[.n,*@¾¸¦ÌÑVKWU)U ±6öÍÞÇ™'~'šhšAª*%eBŒ®×šÞHù¾”(h y@²óÄ«x$g ¼Å5me ²ï’|}„C‹L 5(^Ÿú ÕÞØ-WC Ç§I¥ë£H!ð®%6“ È:0·rh%ÀD1–),bÝPÞ˜%0¾Ã¹¿zï0Ik‹äá}FÒHÓ[Uܳ¨çIÄ[2‚¶5×0´µîNö~ôAQ·hå¤fjVÆÒ­Àe¬UµN !8îB€‰ièW‚(÷I+*ç—t`ÀФ€¶A ¡Y{!ˆ >ÝHø+¨Bõ)ÆI7’ùaêL¨×ø dýš5ßxϳ< J j@i÷ ûœy*?ÍIƒ˜4èlµÎÕ= ´¿æ-#½ /mUb:A†ÚèFÇì_N‰×€!;7(×ʳ3ÉC^Ù¹&F£ü»†@Tàç@)g;eõH Â,@eaÓFuÈI,Sd»6HR‰:9`/ªD6.ÈA2è‚« 䚃T5Œ@UD ŠT2rÕ €Q4`Œ‚à¦U<½KJa*Àþ^V.€ª¤ ’‚hH6zªb9 °qÅ`ÞA”"ˆX‹rƒip*hV'ThhÂÂ)˱Àà¸5 þÝhþwTB…U&sÑ¿#•¡Ò‚º*~@fÝ£®&*o‘ÑC±Á Çï9IŽÛkö}Ÿ#¥•­c $âúÁ9-š™.?:÷Za¨•¼ŽÕ>Ž·îú *ͨ<]–lß0|¯qNuÅf€¹ãã`ØîF»Q¢PNeaÇÞ3vÐØšÙ!¨tæ#Ûäi©’úú Äd»4T£¬ n1¬?`cTÐê„’?z 8è8ÛP" ª5ÏÛ(„)°k%à')€4ä€cŒÁ!Lá(›µ! €˜©O IûÑÂáMYÈÖ@€Ö6P …0í‡À(ÀÃ8ÝHø'jqÝŠuÑaöO€¡±L;QÝÆ?À­eðë²7 È}wz—³#‚r $ ¨”°Ð0Xœ³Ætƒ! jqŒ+lÖ®Ò¾ÅW0V¼è({ÝpͧO*‘âcË,€yÒ€ P-[§² c¡Ó =u¥ ,ò%ÈëMÝe Ó EhÅŒ=5¼$¥»0¿b†1¢É0 hƒ ‚‚™+€¥Œ•k–"e·ÊQ>h;%ûÓȤÓ7°[û˜‹Yˆ ƒ¯*@PMÐ) ÚªX+€€1@o@B‚J6T ,t` ˜|1¾E Ô)B@A ?> I€%l+€€<þöÜ`à'†vmÚ£~Šqцƒ4—öTüL쉥‘ÞŒ÷ Êy@»k^@&Èõh$ëžj:qb£ª AÏmquïÃæ…X¿uƒKwEAe›Yb/Õ"Á‹‹©Ã>4Ð 4{Ù€‡ømÁó´@Ô|º°N¤åÚ ¶: -!º)ʓˎŽ`¹Ú*zQP°Ñ5³ÁF^Å(@ï¢NüS6LjûP´‡)x* À`ÿK°}ÈÁ¬<$x6ªØbÖŠ°¸˜ˆ'&0„ìñ+4ÀZO*01`À0€ÍäÛœ6¬@!ÄLeX;ιý ð¾æÜèÀï¸d¨6™ê§Ø&ݸpóàÕ ì¥ø Ä´å6}¸±ð^í¨•‘@ŸDÿðos¦è¢„T™ á¾/Ýù9ïßõrì ^sÚì…^Ä#UÌÁtd9EM²÷SY• s¥@Ye‹CSyræG õ¥¢ý[wQ2FYSÒÙ Yì_ì÷=ƒF+Ž@ëKìÁG©€`{¯uÄQ~ªÑytXf?mØ—Bi²^—¦$x´IP(Šç™{­ÝZ@@’®œ@Ü•®)‰ˆñ€¢!Q ‹p€W è!ËÆ ŒX;1x1!H† €0¼Ázûÿ=lÀá<þ=»x¼P~÷ÜHfó„ Ô˜PźèáæÁ ªØSñDN¦úí,oz­™£vL½xÕW%Dë´÷dŽ)æSÑ^U¥ h²Ë<™iüe[›CìÁö5l;ú¦xŸ³Çm&ø\Z¡hŸ}š úuضG2f!ú3GîŠÉZm’Cy¾¾s*Y¸‹ª‹½Ø8<ÃZ aè RäÂ|¦ué†ìÄ+P¶¦>¨˜· èV’0½XV@û2!vP°P×|“b×8Ô`ÙØ f€)F·™ K*@¥†xK©háˆAƒe脤´ —HXô`ñË|kö­ŸZ˜aðÀ½/Ò¢xþöÜXøÏ ªÔ§ØÝøÜ?‘;FAý€[;h;°åsøpâ(•xOH•d$’ „ʼÍ+{¾Vs¼õÔ øI7ê/álCÒçìè‰éV[æŒ-}q;fss,>$)ëÐE•cÚÂ+nß*@¯ˆÈÝÞ¨ ÚÜ1XÕP4´­³ÖÁjuÅ“¢²@ Üöaæ,@‚¦2­+ÉÆB\*ÞRˆ#´b|mâ“Î*$a6r’v š¦ák>¶d€U÷µ‡3ÕK› ÀÁ¯NPð\‹ŠE“`°¸5€¥€IB 8t8´€Áøæ0ŽYçbÚëyX,`Às0ÀpQM¾²þK„ õ7ô=”ÿ‚!¨VP¯â3E©¥V]€÷)ât¹àJ]. ò BÌuŒ1²Š©2“€–ØÅ«‡<è9}w^7íA!„+ÃĄ̃¬¸òØ0qÛœ¢(×Bqç‚f€Œº£jìîÍZRåVOš_‡´5˜(½íÔCXfµëNÁ37KÑõó jøqIHR5–‹lnú …ݨΆáUs4T°Z]Ú]L k±ÈðGpêß)À‘cŒüL‚ŒcLw? /ØzPw,‹1ˆ.€Dà0 C% p(-%À cT„°H0ºõ(¨8ž5~­s.öódžÍé3Æaà½/³((L d‡¦×Ü óo° ¥l¨W1®¹‘à¿Aµõ)~€˜®¦¢×B´orMÇijßsÅÔA@Û>üžY˜*Í ÀCrRÿ_ÄMh3:Ò뿘§Nu·‘ç¤8jU»hތڧ}Ñ¿!A,Î…m勌ýZ‘Ö¨ZH¤óý°Ë‚É] ¿½bYp|ˆ¼¬}6$IL‡ ôÌ0;®C–×™† ÞÂ׃ _àL@al܇–Ï,`àJlÑFl¯   ;W‹'×3òA!§aò"ª®“³Nhm`•ô‚h€¹L…²® H-€€8°;q‘b€!»¸ç™âèÖr–z pü`ÁŽ~¨n °g<‹³OggS@~&¡€cí48ÿ ÿ ÿÿÿ ÿ ÿÿÿÿ'ÿ#ÿ"ÿÿÿž·Êþ3Í ^Ò5Å=æ†öÿ’¦DX«•BÔodŽ~¢´_¯l´ò-FŒª¯*¨ª’ ;ÇøhÈxÛÖ¬Ö Î.?ߺ‘Úô…Ãɉ߄†ë Îÿ¹!j^µ ìm}î ƒêP¯Ô—E™¡“-Dá(Xæ¬3¾RfHª-EÚœvY’%bh•Cý,ôÈýUטŒñIDÎ@"“{!;‘1²`ïþ¾¶š\F;AÅVVÙ&„* ##[@7IUQD€ ŽÀƒ R„X©à2 €¬x¬Àx„hHêZDå»yd(@^ݸà ŠÐØ êg¸{nœõ…"¨Ô¡~†g@M™Y‰ˆ¯“¢§l`ÝDƒnMœ¨ª0Œ¶+a,S‚ìÁT£š—ÚüF ’Ʀd™s j=ŒjÎA“ÏÆšÁÍ—èL€ˆ¢jJ]$XA.$$h™*‘=f°¥w*%joΦCÂBÕ©·‚‚)±X-¶búî¤Ø»W!‹Ä`0€ŸXƒɨåUQ0Üm°Ü#W 6ˆ¨Êú1^»€–À2¾­òöH…ƒH˜I>³3lÏL€ƒCØ€…Áb°µ(8/féå°p0À`€…TÊúmþÝØÀ¿Á *Ô_ñ ºqÿ%Š r‡úÿ—6°Ÿ9sï³L«ª2“€€ ‘ I´ÃFmc’×È|ÌgoW¨ ›å褶%5¢ÆÄf’6IÖ¥úúÓÔój­Ç×|–<µ¯*á)#YmU°HÁQ±>‹$+4Ag(Œ3ÓÉ —YƒŠ¤ÒFU,`´úô‚ ÷ÓM«¬ ¨aô¶M »†Œ€©7 ¡Y}ÕãÈß rI«‚H'h…º˜0Zè+ŠÀ0ÌÓ$Lžjì&æ]°p6>’'p cAÃjÈX#„å…À ¾Ëb10 °À}²Àü€^Ý0÷ϸT*¨Oq/ºAø.ª$NõWüDD높¤ºßGÔ @ !µ÷Ý{©‚¶Re€‚ Êšž3ܨ̼sä[·«Ì#äÉ”.¹o»±§ådJ£øg€pÔáΛά.ÿƒŽT,×Ú9ËË;‹¶Z„a0 Zë…Nœü•–x2hšï¬7 u³„ Vð2º¾U¨äÒêŒ|þyƒ+ àA}k0H=ž,ÑXk4XAʤ²^ÑŒ4Ϩ=XÚ‚FÌâƒybq@gˆY„”7³_€†#@Kth¦„,“`‹À´Z+@\‚aLÃÝpSË<³c ,3P˜~Ý ü7*ªÔ_ñºAfó¸$hÝ öT|ÊšÊv2LVn'Á‚л8o_§ø¬)æU•™À´ÆLöŠÍ€ÚgëÆYÆSJ©»õTí@½Ç¾†ïkrñ\F‚w÷n˜þ¯ü,2-2 Ô ^–£…|aIš€eÛÚ(¸·ŽÚ‰áU¤˜š|Ø‹Üb}€LÁŠ7€GE†1æöy*Y7xU€F˜;A ¬¡¶c2DQhk;h@bX²\"‚¬f$°²±!PÐZAÄb ð;î–Ahˆð –ÀÆÐ‚ÕtxÁ£€k‡c<n}|íÏÌÎ5Pç*7ÇᬠÃÀbÈ“†€®>Ýhö¿„2T*¨¿â\t#ÿ¦)AS*ÃØ›âÈ8a=³³¬[“™¡ÌT.^Uå}PóµïÓÏ)–´HU™Iƒ†˜BË[vIÎã@@€øåB™K3 —nÁù“Ÿ³ûNÍ2Pàì@{ðþW•ÉD3` þtöD@"-zî\²ÐrdÛ[ æ±ù€ž³"DúJZTc B· õƼq¥9‹C, h+¤¡T`$…µZ4€,d%ØF¶Íf‹È1ßï4#nÀ€ÏGJüVmø»­õëÙØ¹`€öGÐ [ù> càp@VÀŒƒ—’@^çÜHðo• êUœ‹n$û_\J‚½)þ^]Z ã>ýNÜLU™¤‰DJ4ö$µX_èò¿œ€àÍã(†²’Ãm˜’Ç N™µ^Nî\›:;8ÎŽ 6`ƒ.ïqSŸM›'˜Î=Ðç^Ò"’&A1~hÙ ŠÅâvöÝ>tÔËé`d¿$¨¨½#zÝ2¤0£SÛu E3Rbd³)uItÀX*d&­›´BGB£‚¸†°±¡ š±„-„‰ Ä@À@Ð!€`€PHº%DU°…@›ŒèU0Xm` ìÁ^ë§þ€AƒÅð†Hþ÷Rþ ÔèP?Žè°Ì¿ P%Á^Š ËŠxtȘþd,C1Jpò›× ó£Œ ª`/ÐÈ|ŽT©ZSU@“å ƒרÀ›}µ,™ãhXÁïo\S„Ê£ ªäÖ{TƒóÖ!4C‰‰ægGf& ©ÅlbùÈò8ñ~­¹RxŠ.m<¶ ZFìBÃY¦º¿kÀjªf´’?yû`„~ƒìdØ8—Ñæœ™c&TÒF¤•x}*ëz & ±É! ô†\¾žà LÀ€‚ HáXR€ B rmÒBÈ Tß¿ Áœ‚ ìÀÃ0žX€3€Š*¾äÿIмËõWŒ“ÏÿM@¨Í-í°§â3ÓáY5¯çói3çÌŸuÚs'áôÖ©))xI>Äñ…/§W €±ì¹¹]èA ÖPRèE­ŠQÌÏu—‰‰HžÄ?9IhUÉÿ¹ƒq ì²ÏÓwܰ933•Vб?—WD¿¡Ö5K)ôàxt0‰J`½àrºÈ˜s1 Ä{k»ï„btšh,;‰Ê ³dŒ#P˜ªtG R==G-©®{Ò#)á^Éu³ën&`$Ñ6£{¡¡,Ø‚”@@„ˆÈ[\E€À`ÀßüÁ6 4€ÅgîI8 ^nB…2Nýç¢ þ JP-ñÚSñpcßA^Y æ^µ=N+ÁãÈmúÜ/h„WUˆ ‡îóÚà‡ šb]CwŒª†X ìƒG ó™JÊóuÑk òttì.²\f<÷tOÕ­):f_« 1ЊììG&ÈÇ×oúpPbÌš‚p™\6—­›k O{î{¸ëJ¶`,¼¼é‰@ðšîÜATCê»3ÀÎî°¬Õý >/e)ÉÇÎùÉ€RL0˜gÞÀ J,À€`%©Ð 3SŒà³°‘€p 훎EX˜¬ U°À‚Y·|·9åŸ ®¹ƒŸ þ–Î3£¦þü – 9¤õSlƒn\æ4´D«¿âàÕcm»Xàí~r³µº#ÓP–$)h¹´.?hìr˳SÛ Hñé&®3oœŒ3õ&e7eû“Ê蕯(q¯¾p¥¿’Ýñüðt§ê¬IñURûÀí(MÇfÇBÐĺÙçèÌÊYâ’ì¨Y\%2(,”û•¸Ï0CßZœé3sÎà ;¡«ÂVî‰ àv‹~Á‚±ò•ðÚÄ{øŠ’XmZ£) @¬" –ID‚ešÊURdÃ@Ȉ–kè0ÀpûÀÆCôL]À° vÛ °ê‘8€Ç>×Êl—ÊŽšbœr#Á?#¡BB½ÆµmY÷D”5S—.fûåû„\Á¡CÀÀ¾o¹·„T¥ËÀª3þKÒh¶·¿?é&¦Üò^+«H"Œw†üŸ÷!O:›aX™É5XÌÏå¨b |Ë­ë?©ô²ÜPþå§Ëv‰Â£9ÿ¾ÙaÃngQ‹Üj ÄÈíL*)@C¬e‘‚5A (d€C z J€$m`CPŠR1"J0EŠEI °) i4 í Œ±e…¡™@–!)Ž”ÒCC-xÀ–¯ à°`A6™LÒ±,î~ÝHæ¿8 ¥CÝŠoÑüÇ¢JЬ nÅ@Ñ4dµö(aÝñiôäº%ÙÌ:ÄÂF€@2@¨öý6Í{ú~)ç#}1_o˜¶©ìŽï\¼ÙÙOéÜ´S&ê3 ²5%„;$ça/ =ný8RÄÔÛ„Hç‰e9Á4QT¡€•ÔÃY°¦ÍzQUíAôì®b•:^åU‹†ºé-rëC*ÇÎJ@ð”@€RœkkÚQ´/ ’±0ˆ¨p PiZ¦1X@X3 ?€A z»ei)NÕE‚# IE°€8HBЄ #€‚"p~$OggS@º&¡€cÕ$†>ÿÿÿÿÿÿÿÿ%ÿÿÿ(ÿ!ÿ%ÿÿ>ÝHfó¸2I•õWÜ“7 „J öfü¼ OçK(Rœyû˜£®CMUI ‘¨ Ôæ £Üº|jžò0öq“¶D9Üßz€Á’5êÉR@UÇ¬Ý ¯þ쎹¥nÌ,ñ“F{h™‘†ü9ç´¡´èÍä1ÒU—r[ö.0X™òÔ†­`)†Œ‚@K˜kŒ@‹°À„RàÉ jòLn?`Ü»¿Ad¥¢þjÀbLƒ…ÔtLv'• L¯«€é˜Ácß¼È hÞÈžçÒÒ!h¢€¶k·0mý:”%†o0x›á`ÊþN–#I•²£>CÛt#ÿEHHÐ.K êS<ŠÕËÀ{˜?C´€¶Ð%`*ö9FE©ÄšRB$™býÝsø¬Žú¯ "ÈÕ{ÿÓð¼Q/ãÛ|uêæÅ™2qs!بa®ÆÉ1r&óžîDÉGL«Ä 6v–ÜÜy²%Ç>ÏèÙïâQëAA’5èµ%"l̵ަ¡!¬ÅZ¬ §õNä4œžD½A–_ <üjWË`EˆdÀ˜49?’²|T,Ô‰-`kŒb'Z_ @p !À cÀ%¢h" ¡jflí,Æ#ÃÀÚ)ð@A~ §$áÑ>ÔOñnºAæ¿”@’ÆäƨOñˆ,©dõ|`¥x-ÀääÔš)š&^@@ª`ðJWkw׫(€ €Ò:Ï'ó2 zM°:&¯"tBŠv"Êè¤ÊF]µ0;,‡¨îœS¬ áçïYÔ²³éGê¼8‘ •¯Ž@`o˜ƒÛOEÑd]ƒ/úLÀÂþTF*¨T°>’ÎHÅs8 J ‚»O-ƒTv¢†y®B–ov´I¯!8lV†?z’PñžýA#ˆ`ëïŠJn0èÒ¦•ÕR1D@]'éÀq`Àð €Ýhð§±Tp¨ŸâÛtƒÜ¿‘B» CÔOñ™ûtõèÅ»{šs‡½˜FÈ' l½¶çc³«'¤ @hTìq:ú[ÎSåš]â5þîÆÌ!/~tpî80×{y3n"ŽÔ3̼Š1¢ ÏI>Ê”Éi0p> ÁÜŒ-ƒÞÛ2Ô7M‡ B¡^QÖÍŠÄu݃¹ô@m_•Õ&ˆ QZ0¬4-g‘¾Ãn¡Å†ÇØö$qt…”CFÅ{ÓL?•âÓ„Ur5Ú?#¸3Š@·Z…P`{R` ᣳõÙ²vC*q¨ AU0ð8ÌÁ×nì,ÿX°ž…çð Ü~ÈüI·ˆ¥}+O¥~Æ»éPö¿)š“ þŠ€w(>aL`©¯utÛæð£‘µª P¨€™{"uÓ^Ç/¦ŽŠŠBü5ïçl æ›z‘¢P0‚|Þ´–É:s90]™³á¥§g”ÑjE$Gcü£ª«:){ò$lº¨N!€Ýµy˜¹™>—Àþ.vÊÁÄþ=P˜i1ÌÚšé´"lò^bÊ0ZŸ(«©¬,‡` ø.Ã`¨Yè"‰:Mèf4Õ‰Â&&¡A‚`a5€a€êsŠIxJÚmlŠDX)@ T72¶"I°ˆãP8ÀrÈžó6—^­;g€CŃp<~ 6)Z¥qê3ÌI‡å6k—Pã“Yt›5§ÖJô«ïa58#/@{ÛœtDDK(” PÓhúúÅýÁ ~vòÍ'fì÷f¿ÇÀøÚÏN,õd®€Zû4^«ÚþÜU~Þ*(É©ìÇè¤VJ6…¤nÐ?D°’ï‘9s[N­ÎŽ%5ÂCþR4ƒ˜\ ù@ØÇŸâ±åBH$:‚Q­q3ïÔd¡5’‰„àL4SÛÔ*‰W€|ŸZ&4 C’Pç <¬ €%`Ø•‘`”PÏ•ÀWRΦQûààkp àþöÜHö¿`¡ZA½Æ·èFóÿ¤¨ ¨¿âà®JÀXqÂ"öÑ1CŒÅ›ª0$k€( b|&ËIøl} e«-nòE£Ù ©køÉãú*¤—J<í€2D§”AÍ9wÊŸµC¹Ëÿ[LÚ&-šÖ<4›Ý‡ÊS_#9¨Àßç@Ÿ»³Ì‘ª „=+,moµ‘@Z’¡… d£o JÓº 6!b †f E×½f‰éeKYö=0PÙcªçˆÁίÏÙ¯î@>ppŽÐá­ÛÒ›Á8ä0€Q¬&Vœv hð°°lMÁEà4Ï?ÀN €mŽk±L ð VoP>Çþ•DÑšÜ8u× Ÿÿ_¢ ª8ÔÏð°–5¯N׋ö‹ÛwùV[§õ ’¹Žµ&Í1U%D1 P‰~2Ëäƒ;ìprôµº÷bý–Ç9¤@5ónâ¼y]1gÆÑâç7xh¦+޳VL°ãV[öˆŒ¡_uºÑóYTò¿Î³Ä3ãg…ÊêtÐë6\Ñ/Ùn'"dK€­Lb  !òR*Õ0g¸~]MÚ­Æ^èIÏ&ãú*×Àù,lQ“½ãbcs6צd5Ä. º´€A(„4†R’êÍ5š¶Ú*,6d pcëî½ü³ ¬µvÞagÚ± îüþÀ`àHpY ÄÒ$ `Øfý3B•¢}Z¦ÉŸsõŸ)Ò«ÊR¦ñÆô¶¿8¿ä}U¢›É¶zï³Òa‚J•"€7¤.!ÞUo®£­ãþèars¿>•^¢¤õ±µéÈþJ@½}›Dòªµ$·¹Ãí9CSÙ ¼êWF&lhuÕN"É&YoXº{Ý¡(H(!²@ I‘Êz—Áe—2Û+Pí­ûf¬ % ŽKpê"w‰HÓE5Êx¼NâénqØóZƒ*v*@`‹^dhè6b¤DÚ†¡ûÿ$d $" €u!­) ·Ø±Á·ÇwL<º…TæÉØlÃ…A:ðG^ÝHæo¤Qhµ 1¯9<øƒ v±CMñä8ý8ãäØb¬|>ŽO¾ÄP”XĶùÙ†Z-!Ihõ/¿]‡ûŸì†ë˜z>*óX;¥u/€ÇþJ5„­EH¬ËZMàö£J¿ô‘JC( •Ñ´ °snK2<Õ@Š¡È ä¬@8顮 ÀÓ dE©BN5EI´A ir‰e`V H \Ær`˜t—p,2,,pAËF J¢'‘Š„.i*°@`5„ÀAdÃ2­)7htŠe0‚õ2€šPÀ Àžt8l‰ Iª¡2s9ø´ÿÝ\r¥®LýuΆÿFª@éP¯â º3Z¹oM¢8õ]:–L !¤¼0ø÷mÔF42 ¥(!JbKLÝl¿þn>;cëë =Ú˜| #t~TÅ÷•¤E¥±!hž-Sï}nàE}]ŒÛ¹6yüÀ50G@(F#šÙ›;W¬g'”µ¢•F/}ééh Æ5F, lŠm™¸Ï€€" èZun¤*€LH e¼’„øQ*CÊ Ks•pÂrŠx‡2ÑÂÔ  ¡€R+¬…6ˆ† Œ€Œ­=Ø\òDÐ#IuKÀÀâE­Xn§hÓî;¶x€ƒ˜SqPèÇÕC Ü@>çÜXößHÁH&Ô_ñ º±ì‚JöTüLÒÄá:ˆ7îìE q´·mN«8næU•bT¨çõ¥½Klfªé@}v½XÀ¾ÏnKvöõNRƒ˜)!ÎF)à/ì‚ù² gg½d$éJ-¡9æÜ°Fh *Z…EÔJvV66M¦× ]nÐ ËUàV»æ!0mu°Œ¼ÂôÙká%AÕˆ-Ű8l$´³{RÁ ³"Š‚€\7éG‘0B¿A‚"$P0Ø!u· …¡ß7ÒûVÒˆh:Þ;ºPlEk h€ Œ¼æË­k`Ø38–˜³8o€[@ã(òÆùS˜~÷Ü0Ü<„@sšP?Å:ç†Ù? ô­iAý?€ºÙ*ŸÔˆSRfÓ@ûÄUŽÁà˶Î9¦iE„B¥$¡ÇJÜߨûLîö|ŒÓjs‡¹’q3bw@àZ̃ÀÀ(Ò¹ïËbSwŸÆ–¦Ú,êcÛëm85bï:¯oâîY©ìC&™ŒW0à÷À ЖA»Æ4J” ôªs`˜‰ÿßh'Ö°´dØÃ‚²ÌûWÐV¡ø`*’ŠÎT£ªçÒq´ÔäÎ9›PSC+ ÃX4¸=ah!äWšFz–È46 Xy±«^!´ ®X`Ö@#f÷OógØaà<›8€€¾Q’“÷ÜXö‚ %%Ô«Ýhþp$¨èP?Å ¬fž>—­£èÖ(¯W4h=>`Ñ_÷}ø5Åj¦ª¤’€$ÚgæÎ?¼aŒGºÓ¢šDé ˜ó9$X‹WëC|Ï’|Ý-@[Z& `@Iú~OS·c‘:„ÂÁ~°ÂgcåQ+UD²0 &€¥Š›!®†Öžs:ÖK[à–crcB˜‘ ‰VÞvˆ„”׉R‡VÐ : @ÃÚ‰( šäR`åx ‹!E` –¬À€ ´†c0àX€Å¦i,–0<î;ƒ¿¾‡8Æžp–ckq`‘ $8Ð4pBOggS@ö&¡€c#Šfÿ ÿÿÿÿÿÿÿ ÿÿÿÿÿ"ÿÿ-þÝXî¡5%ÔO1.ºAîߨDÂZÍ¡þŠ€»iˆmÏG›Ñ® U%™H*2:PÃtŸ½aU?eÆ>ÏMyet0¯!qO˜{KPÂmaÝS½)7ÚvO--íhÃÈÍR¼­u÷ ºj`n¡,Œ§íTaA?uÇ—sIuc礸°št ùœŠ”s¦à©œ3œ/a]ç.±VATP\N7Ì Ð$a(0`æs¨ÜLœðÆ\»†÷Õ4 16¨UŒV[C™ K@ €‘ …Lˆ…$õI ñT€e°0]…‰… ÏXvjЖëy˜K¸$‡åË2ž{<ø{‹úB@^þˆ¾k(°§á.ºaæPHSwý Àª6ÅñÉtj\®m¸8U,«ýÖï wõgR€ ¤U]€j›[2kŽÕ1Ue`EÍ /‰¹‚™AR2¸ûœtšm-øÄt'|7EÕmão%Ÿl4 x‰WP áÓÁJZña ôÌÝ"Ýû4‹t&aUO–0&Šõï’[ã$—Ã.$¥HBh!QÄ5@˜s¤é5´*‚ „`4P- !]G.­×ÐÇã „A([€`ª‡ `@$@–Ã"! ‹d„ !PT Á¦…„ÐØ$ <|Þl[ì¯ûpØØMõ,rû8 D5¦^Èþ‰KÂÒNÚa/Ÿè°ìß DR9m°§â3ÕÅ´Ù§xŠWI ¬§èñÚ ¼¶¶}óuFÚ1 %À¢Á•s‡gÜ(ÀÉË_M2‚’%_ÆTá2©&7ûrÓWòBkÝ%œ‘²UgØÄ[¿-âUsâ‰o§TœUM¬‚¢ì¬ÝÍ$Áˆf“à— 6(B° °‰ØfaùÄ}Élrò›ô}“þ“÷ãY˜fóÀ% ~Ìn „*iGý yÐaÁ?’•êgüQSƪSjåä݈\õnëÔ[§€cÙömÚÔ†©š2H@%Ú4Ã)áߪ/Åê7ß[">­]æÁ¯Œ燙ƒ§œ÷¼Ó™˜5j6M y6UÿîẑÚÄ“Ý_Réûm9ÛÕlèÅ;öî5ÛU'ÇL”*Ôá¡îlžÏéR#…A羚×h¸´Ñ¿©åÉ;'^º¼c¶ óq.H…À­àÀmB¡!ج@n$`¨€bb•ˆBˆ$»½(îÄîpÖø0Öú©ññIŒý8Ÿ: @qà†ƒðÇ{ÀûK``>ÇÜ üg¤ £Ôë˜ùÌŸKÄGešâ(‹CôÓd^L¾ØšÌ7O¤Göý<Îåh+fQUBª‚L‚ŠËôý5‘ðÜ@ó/åYÑ< 6ƒ³´Ø}ÿEŸy•šìé¸]–· ÛË©ŸÌݵlEª„’¼Ïcöêà!g-Lvçê&?¿_$Ý×0n{ ¼·Áz½'ÖÀUÑúf@À[-‡B»€a@-‚†X9ð(™ÐþFB#!ÔØ€CKÖ¯írD¨éDƒ-€B½NÍpB °°Ô|òMMÃXîIÃ)ùëÞÈ ©©„É®˜èh P>ÝXöÅ ”\ºUDâ  þ„ˆW™PSø¼¦Ô\ ‘ ÙæÔF8Q!Ì1L„š@YnÓÛTîh¾@CFRåfX’º­QdïÔÊC÷™¥ØQ¶%u¯óíbm”rö~BŽè‹ c™[ÛÓd ¥ ƒ3¨b ™Ù³ûô’ c:„¬[Fžµ^ê´¤HQ‘º¤©w „WŠj²ÎAuj¢í¤äÕUöU$AÄ`" Œdg¾5 @ ˆH©Ôb b] Q(’ÀÂv‚]ÓQ÷)¢ìº÷)UGtL ”?dˆ¬€8 kP‰^`އ 0^ÝXîOT¹tejÅ¸èÆ²"TЗR¡V|bš2M×®èÛ>æÈ§øz/Ž @@€÷jÎn׆=¸I}ͧaŸ#iBðY÷8Ý‘¹"Û”Â$’(aéƒí™EÕúZ¥Gí_€¦¾û4dÒ HP zÖCƒ¹¬ÙÊÈ3 Ú.;S3Ò ÏÇ*3‰é(Ög“8 ¢ÝK(€Ì¶¼£ЖF ¨( €,FÅéX㙺˜€¦¤yA­Ã4ªPhÕ(€T- `0ÐQ ÂÆàÂA €Ö ,€"n@„€ŒGCäXÀê 1 †mس˜b* AþöÜXþw‚PÔÕÝøìŸ å@]> œ6Æ:µTÌëîÇ9qú«Q—  œç1ç臎6 ¨8wy‘ã¬U´õ²öøÖuü)ì PŠ ªTÈsϦáCÄÒ;ã~ô ²Îìûµ CØ@<Ž( Ð1ÛÜh¡>–QB³kTt¬úÖ.`Z³«X°ªx,X}]F'‚­€èKbˆjNj#€¨Gв 7Ѐ`©8#ÀÜÀÀ¤•1, ‚€‡™"B)ÓªaZBÀ­¤äR  ¡äÐ*˜V-Æ Z-Z Í `Õ Ž(>çÜøÌæA *ÜÐd.º±ðß  ¥CMñpe+›ïsÌŽhD ) ôÄÑÁDG‰¦<ýVDqh@d9I€gÌôÄ9¾iÖã‹јÖSCª§¦µÔ\Ö]73¤tA‹Éwÿ0¼pXžy&@®‚ÚÙ†b¦Ø*e4hƵ*h1­Ï•ÀÍaå›ò(Ü5Â`›JÏÁOnÛ b²<  @BžD. Ê­pý¸‘JKc•µlŒ@èèQ˜  FX®ܸ46dç·hCTÓ«e,B1@©à´È´d†µ µxÙ#†œ@¼Þ÷fý• å@•±/:œÿ7…Ò¡JäP¬H™#Á›õ¼¯Eµ"€˜ÀíâÄ>Æhµ²uŒI‘€@ „º·Ä9ß&ãóé6—„o Ác" ']ô‰DýŸy#Þ1 Fíg@Ñ›ÏKå¤q‚gC Ó·ÈäiîPôG[G“·‰%9ÙOkIM V`¯¡€©:‚¸m€Q©*=‚úZÓmÏjS‘z ))» $p}A ÅÅ(Haaàš›ÆôD(Â0`ˆ€jM ]å¼( $  T$_'_„1ŠAOl°,€qÂ"ÙÐ`¹=Êа *¶%0  ?Ô€þæÜ¸üæA¥,¨ƒâtÃìß Ê„:+>Gá4Ê €w‘q”%Xy!‘û¾a•)t.I‘ X›ƒ¹^ýlâïÖºâ‹Ì5ªÆO[¿ùØž´¨eðÁ¸É6¦{k±òчk$ƒeS ¹»¢el”³v"ì@ÛËc}Qû”ÍqD¨tSÒ¯:ÐK’CŽqÖ@ëtÞ D$ÙŠ÷U\®Ž «Á )ìw@ÀñµÁ ¨œ@°š.l€ ô/ §*tÕ%  ‰0½Œ,ˆ^Ô ´xB«""€–,ôßÍ804¬ÀÀ<€*žê–& ŽÞöÜØàß‚ZaªP¯âtã†ýBP¡C½Š MÉy¡Ž7û6î{€¬ƒg<<ð « €€^÷Üø®Õˆ´”R¦þŠkÐMúgz!é*õ7|§ûpjdQoµéIy5ÀäÑëš©“Éâé ÐÌ9¼¯”uU•)À[Ò0%Ü-8þ…9­AûÌÞh»£M¿¡ðv$@FCÍ%7U-§¥•Q£FlÚÂv72kAÑ> %ˆBˆ*]¿.L¬öV*’‰s"¨†$FK*Œ]Ûðá$¯ÄV]2‚dÍhÖÎÅÃì—áhêøa¤h 0™|¦ÅHW/N£¨ r€`B!W›‰D£Ñ-…bƒ¬Â@6à@¼Ï_ïpçÎõÏ»Úb­¿M,_€sãyGÂ0ÙÞæÜhþŸQ‰ÕJ@Ô­¸Ígþîa¶TI%ìiüÜõ cáƒò L3#kȲHU•P„$ÐþEÜò~#ÛÖ’Ÿ_;òD+ãƒã,uWtc6ªQ‹Gñ£/w Dî5õR¦Ò]áý"ps`Ó?ð!$·Æ2Š&¶ž×™n.ü•ù¡•àv&w`µxÜ¡Üã E H+¦þßNp¬?e1þNÉÿ<ìoϱ*ïÒpVž'JÈœžë óГÿ±x³A•×êï¹60‹?\aC­Th‰IîªÜû§%Lc Ð#3ªŸûN T#T,08€{x,˜Ý¯Ô´n°Ùæ `áàX¬1|H‚“H ì8 hOggS@2&¡€c cô¥ÿ1ÿÿÿÿþÿ ÿÿ"ÿÿ)ÿ#ÿÿ ÿ~§ÜhæƒPÉq­ãš—ù_£’ )u†Æ7F«=óÚdtãηڮ쫶mvøTN¢¡ªZA¯ÛÔàf»ßïü.'k—¦¡×0›Ð~ÓtŒÌ˜zÙEa¿k¿|"MÞlÐ6V¥ªè $ßÿ°åì %!Âòn(måðª•^Ô§³% q|9bã ÷W¤éˆÈdu Êê÷HKöåCÛ3©Œ$°jC×E€ygÅ?Lù‹ziÚÙ¤!sÉ=Þ:r ð?CCÏy „`Z’xL8I–CˆÌH’,Z`ÆÅ ±À%¡ ¥,°ÆÖ²6îUÉá‹íaj·Žeð0ŒÇbÎW{+€†G +Ò+ !s@ü-Ù €Z<‚~çÜ ³y¬FUýAí0¹aæo¤Tü ƾţÐAôÜ5€ì#fÚs4Ìmˆ… "66Õ×aŽ«OL°ŒÀµY[ykÕÖÀêKU…¦ý(~P#HŸÎ!¤ÁI)æ@H,Iùc¼p…Òë¶G«‹eÀFÊïiü ¡ûð§ !:×è…§:F:mBÑK BBæy¥Z@Hy§ˆ1¨ÁÁŠ$Ö2bì”AàÛÓ° !±¢IÈ ¥$ 6žlðjf,Ô6¶cÛ84È+ÂÐR'd‹µg¹Ò GbA•丂°ÑŠ@€¬[žÝ0÷'¨RT:PgŽç០JQ:ÔŠ@Q¿­To *‡rMè(®Ü °'Ø/Xû­Iq¢Ž’¬Ñ Í¸8k°m•ÎéUzIŒ±•Bˆ/1©€dÍôÙùc7`1}ÕS}îO¡@& ÊÌâÉ€噓 ªî âÙãc„²\§ººEYm%C0·¨`ÁZA,LíÚž3Ûª}ଠFPQÁÙR! h ”•T<ƒA6`ñMÇX’€Æ D`Kâ( KÚD¥(C•Q½Ú½ó6ìÅ@‹œ.Ë*Ä"`@]iHÀÁh ¾÷nÿ0U&ÔûžÃ­¿A 4™jŠ Ë"k ¢îñN½Íé PžöˆË`XãDO`väÈLî³èpâF80!¿´Ô£Œ w^‡æÝ(í|65*ðã䔲1ýq+Õ‰Ÿ㜤 Þ»•3JЬ×çâÀʦˆ‡ÈÚ^N] é-x‚fÛ¤H(DM@XÇB ®Œ)S…IcC„½WjJ¤d¶ÁUbÜûàv ×>4AÖTªôº ö¬«hŒ@5d¨ŠÅ, dv!dç ^@6²Š î‚ÀxïÕ%¶’ _ $+b=½Z7@ž÷ÜHø7¨@™P3öA‡bP(S0µâÛk‰Ssy²£¶-q¨½@,òˆ ÛèÐè býÍEƒik¾æê°¯º3•‘Pg¥”r­Ýsö6õ Aý§@Èi\­œ>&~ŽÖ—ÄÁI\v†$Ú« ¼\MA¨ÑbLÛa\ÀÈÓÁ­Rʱ ÇM”B ¤›eAÜ ãlC…ÐK ì€-+ ‹‘SA]\²åÄ\Üne)eh^ 6'#¹u a3Ö`ExµPd˜93Xöb€ XÒ hѶ*Už÷ÜHî߸(jŠwÐ þÆ 3´J¨? ÕתdDÔ” ÇŠ(%Zõïd1ä n@î}Y ñâS&@@ —¨#W29?b°ÃZ/‹Ûð£:Æ›®÷³H¸:º\«‚Ñ*dðqQÀhž ¸ïñf‡ú«O*@é$ÃSVUÛ~`ô2-¥¥È  !Ë6EˆX`úáz\¥ÄXRUB¢˜ˆ J˜ë÷´J]n …ÎXâ¶-tJlÓ®2Šd&#Å $8ðÈDЀ†YˆÑdIK^s<ç¢ ükÝFaiY•%‡]Æ„$ïžçÜ øPh¶ NŠ}Ð ì̓ ”5ŀΉPOJÌk®dп ¨ö!ª á)ñn€€ ™‘PÀû³—rUC>>%›©{§†âËO½d|&­ÐÍÓðiÉh7X€¡´ØÒã7 *\LÝxhsVËõR.Â9ç4Çñ ]÷¢rÍ,Z|´õ.ÔÅb}V”C£ÇÙ@f4ÄfØñ¥<v¡‚q=gCˆEÀÃ¥åUäU4~¼´ ÄÄ!Ñ .}ì$Ì…NH@Tl ”-ŒçA$Œh­,3}™Ùí´Šy@Ø‚¶°jYÕô`8逞çÜ0»y¤ M™PŸb^tÃÜÁ‰¦BLMñDY?ë Y3×8Î, ˆòæ;€ †¸­|æuâ[UBL`U%·Yñ§½› FmÀ‹ïœ’ÇÖÆÒ°0\ <íL$v¬ÅÆ¢dA7š¥o}ïü€³qüð¿ZѵZ¬Eß`d¡H+?t VŒÐ®Ö4ZJð¬Î݃dGL+ g Öà 鼦&˜S âx¹RÃèUo6,.1fŸ+ârŒrWåY–L`žDz’=4(0`ƒ2®*T6RJ`@ Ž X€@ËH 3,ö OÀñjð®NÜ?À¹ƒ'hAzsÞæÜpƒß!1”‰»®Š}ÐÁÌŸ]X²N ­ÔÏø 2Ô¶[EÆN€ƒ)!/À}ÃPÓ€Ù­õªÊLÐLòw–Z H@ßÅ}¸¡a)9*Ç~¸¯% ¡™½v³mò0FÑ1£\]i†ìÙt{¥½©Þ0íXKS2¦ý£Å®ÃxÚ–ö®ß5f“6J°XÿÅM†£¯b¸Ü ÀxñÈä*¥eml9gÑÄíê¸'F©µå"Ò­rûÀUÝ^:`Ùòº‘M0Dª[Wbêê|#`¦ ŽU€p $ q ƒH°…!*E N‚B:,pˆÝÈ¢™0(,–;¼Ž· Ü4P>ÝhöŸQ¥BA½ŠwÏäÿKÀP© þŠ æÇNóCžz¤q|'}òH`¥â“ ´l¹o}„˜…ª23€’÷’t;W OúÎHð'õY›3š$çp¾GË)§ã†¬JÎ `„e…=©-Ÿb!—…@úÁXtçºÃ¼·æ¦TÇÊQ´ÈæÉG MÊ¢6H¹ê›ö•ƒ+ iVmhÚQnp@Çù6¤ º‘ó…—–ã¡Úù”ÀhÁM!pMíÚq_ƒ&/PÐ aa‰ T΋´°öM$à;b+ÂRLÛ+²dƒC°¬ÁD¥`À` p¶þ5h†…ƒ‡â 1í ƒ^÷Êþ†¡1t;êS<|føO)ÉEéP?Å€ÅQ¥uQQÏbr¨]ÀpМa1Ç­Ö1U¥X"\•žS9Ò É“ÖÓåJté…‘úB1èQx‘‹jXE}¦èé²r¬Ök „É)‘qºhG õÊÛçãåUÙ¥óÙÆ£{Öí[Òȱ¨…1B-ÿãP§ElL‹–·Ày;R Ä=w"ÍM¼#ÄÒìg‹4¼(ŠØô@Éý\vÝ}“huSÉÛPÓ˜ä° ®*„1Ž;¯kí)"“ Ía®a H’dH•Ø” Óì`Š·o±vÝ3ÍŽ9l °À‚eëÁ΀4 HÂR‡D²€þÝÈà¿)A´®BAÝŠuÎ Âÿ‚D(õS|‘urLßeTÞ§Äê8‡e-\€ê¤::c˜øPUŠA ÝQ$—%;wì9xÐ?hØûŠŸvBèIX˜U<7zh£Qe¡(Ð(µ\ö~{ªa®©¬ ¯T™Ö¡] f>T²¨Àõ ­h ˆHšVØÿµf#t=ûG)@v¨+ B ÄÓ^¦=”ræá*+dîXÍdw·,bCÍB|c`æ­Åì ×¹IªrÿÑT Då»4TÁ^[‹UHL7€:Ëb@C˜”Q ‰ @ X,̆1,Ö…1`õƒÃÀg ÐïŠF þ×Ì+ÿm€¤Köµ¡ö8·ø)…Q[S:ü¨«ñnž—ôã‘;Êgˆ¸8~}Æ~9XÀê@¹;Ö–vKÈ CxÞíÙ4=3ľÍU%n»vs™ÐlªEš©d%„ù¯8bÕ&FgTDDŒ¢Üå±'ŒrHïN­wXm›Å ¡¨ýë&% ̹¼@ª_5ªqÑU_–ÉDy14ˆ0Kr#x5él__OX¥Â𠲏ãd:Iì{Œ½ Àà‡B9®Å•-FÜF®­I‚·À ‰Eˆa<^[eKDˆ €1€a ‹…‹,  ```(>ø¦ü`h+ÝÆ[Ÿ¡P:hý¡ • ì©ø€‰É ”q¾!ç5¯SÄ (çæ6¼5R¢ªJ’$€QoÖ5Ø; ÛéfùÕ{[÷`Õô+ ÿçä*QÅâ_R¢Å 꿨ÖÁu¬ÕæzU4àÀ½’ˆ)0#s¸Ï€œßÝÝ:Z²(.žÀOkÑ–V@Jˆ1 °AˆÃÚÕ bÄÇE)ÝTaÊ¡^0Œ¥=á•/ Û pÝnEiÀ(À”CEÔàØÎ*É °tEÜÒ˜mŽ0lz×C(( BcØ.p–cI pÉÅX|­1ÀB@þÍßI¹P4Žnzû¤ƒÁ¯J·q×Ïð€öAY‰ P{òu"G ˜¼È|6FDŠ9 Ç@À0 #~åZ¿±¾Ñ&»×ޝªì¬Ðêç’”UÙc$9ÎSÌï×Γ=ŒVÑñ3óC°º³Ï!æHŽÑVÖï:Âú³–Î5¦1ìMº!tø& TÝABVÉAƒéõmiB\ @$ÆŠÉ€ &&z¯€(ëmÛM@Ñ™£¦ká"ÍJcb5¢UÈ)à%BVÓ€Y-Å4&‰bAql ‚! …!%D ¨T@+ 8 ˆ™$`ÀOggS@n&¡€c!Ð •>ÿÿ ÿÿÿÿ+ÿÿ+ÿ>ÿÿÿÿÿÿ%¾žù³\2[¥Å\WÅ·éF‡þD¢iÖ¡nÅg *åªw¦Tx·Ó V'¨ÿлa@‚Nz„¢ `¤÷ä¬/£@Ô Û}áž蚦}7]Ä'SÍ;‘º›³ª*ã(÷TE¾â ,ÇÂD;†GU”"E»ƒFKxž‡1U–QCÆ@, \8"Lá]Ÿî€õ…®“¥¯¬Ïƒ‰k­+±+²—\Ÿ,F(¯›Œv<€Á°0 ŒÐ X jÁ†¡ÚÖôŠ Á8»WÂ×) ¯²ÊhµÁ^¤fY@, •…ßùV_-dÀ Ø– ,6 &°¥ÐŠ@¶—` àŠ>÷Üpàw¤¦² ÎŠsÓäÿD ¦(êU|Ô‰ò¸‘ïI:2)sÄ àךÒÖŠC•$@7bBhÖº» Jй-|Ôe¢x˰ڿt2ç’<(×JR¦æ %C‰6P† *!áæœµó±äÓˆ3B°® ¢‚Ö–(‚`PÔ,ä‘eY¡zÖÀ@ˈ*ÀCg¦Ej˜ª Og«Â€…SCf¢P¸¦c ÷Ë;:Dˆ‘¹ áT*¨h%VYó’–0@Ç„îìnX€&AvcŸ1¬By ``–la¼Š±§ è < ~÷Ü0ü7B2-V™>º*ÞM7Ìü‡ JB½ŠÏ@V&²NÈ¢ð>Š„Pl“û>g늯i#D@ˆ(ÔôFi)&‚²Ä´›`ï–mJBáZè@pU&Ví\#ÇvA_-·Ðìx#/Ð<–´‘ËØˆ˜*ˆ&6ÚAšÊÊû'Aš ágM$…bäc,h7À t&Îó³ƒ~QP}KPIö`?… Èt´„ªÀ¼ _g&Ê ƒ‚p¹½1”fEöi Dz·Zzˆ0(7K œx) Â@¨î=ÉÔë¥€Æ …BŠ€zpÕh•2ÁЂØòb88€Ä Þ6ßS"Š6ez§Ö¿ Tr°§âàŽCµ˜}Ÿ£†‰™ R$JD¢@ȺŒ{“E çê>KÖ=›Cª’‡0iŽ;‘yé ÙžIv¡etLbÞꛩ¾¾BÄì:!$ó¯t0LÒ`Tjm%5üLs%Äܰ:.¶»à°ìaÿ UðÀR5ì”ïãL”Š µBŒ,y'ÙYa™N¢€i’ ÞØ@ß“6Æi nG6๠!*!Rˆc–Ŭ.lƒ dPÞN7ÝI`,Öiñ±Œ‚€. t``ê,~ð°žÅ8Ö~8`p°Ç½ž÷ ÿÆZD®V{¢úë¤Ã2ÿ‰PÉÁžŠ sª¸ž)o˜XÔDÜá†É+l\ا€w£²ªJbO{usˆ¬•ÿø'ýq-µ¼³ÍR€Ý0Åã#AQC¼f /s*’å¢òÔ_·á‡M¿ŸàÙÚIÖïRê}%Øf, "ü°g9‚*€®~ÉAñ"¡Ð¿Q§Ûèdÿ°±^å.èJ·µ7.ÎÉoKb—-@>² Áõ6­Õ´ÓÆM q_±ð‚,*f¨­OË 3Vp%Ði ,%S!xJˆ`!tá0Ì×Z0Ìg0θa±±vxo †ƒ^÷Ü øŸH±¤2u+ÞE‡ÿ!!TØSñdž<'ƒì7eb^@Ì€'ã@€Ý׉#ªjÊL Ñ=³gÁÛH"€ž}bœ£Pwo´”ú9«¦¼œj6Nxº¾ÚçPá>þ%Lû/TÙßèKÎÙ{§šÒn ,­›ß BY¶¿;€¨ @˜š½¾» ®™²wèχÝRŠª¯Ë'ʘ׳w£êVÆg­KÝ[Œk@3ûöÆ­± € ^€BÐ’Ë…Ðò¸Àª€h  5¨3žªD2M¤˜BA³ºwUʽ)÷DšÙ¦ÕAj Ü%¥ÛcÀðuÁ Ë- f-šç¾`ð†eÇ¿û`š$ +.O(~÷ÜÀþŸHÈ•Rõê ÃÃ&ˆTÉU°§áÒôEu¢£îj¢|~ÂÂɸ‚€'®ï n?ꦇªª)“±êîc%ÿÆ—re¥O8¨ ® /¢M}ª«¼¢Ù¶')¥?FðoSås EßYàVþï˜5ûÓ%^ÄSK@P€P9Ÿ×(u[–ž^¨Lg_e—“Oõ,‰P Oß?Åä”úH€‹dªYNô6`ݸÆ#.]2f§%àyLËa…"ë\Á‚.U°|ÙŽ$O BrW0~ŸÈSm!„ØHœý¼Z1ÁP<šbmî)u[°°ÓiLOv¬¡+a*Iè<û€³8ˆÃn_žçþÛÝB,¥¦Æ˜÷Ìgþ}ÈÐZÔL¨Wñðî|Ž# Úd× èˆƒ|Þ†k¥4”•$€ö¢À2% –5ò}N¥òXœÔ¾Ö­®÷añ[| ™Qí$¸a˜i¡¨‹â‹h9X òIÞË ¾Ha¬¿µë9§j]¶ðr6ï-äI%Y”­<ü:r„Н3½?ü"ö¤¹›C‹9îŒ=éê²h•Xþ–“ ZojT±@Ð O¾cù Pœ†z^`Íh‰À¨Š ÔD¢ênH2`£LʹDŽb†Ä55Ì)A¡`‹b!`ã4„àdá³@_¤€ ª pæ®S`ÁÀ°6Á@ªN‚ñòRÁWp>¸ÌØÿ³;Å¡fdÚö»gH[gjÐQS|Q›u.'1™:nEë`«Eñ øö†¡ös´µ6TUƒb€J;a¼zö×Üæ' ë3ŸL ¬¼Œ‘ŸïWFÐRFíë£@€4™g!LØœ»ãé2‡âËsG%E=U×YM¾¿ïµè® À¡'4 ,[Œæã˜wÜᦋ·Þ&J¤O“q~áÅo³íª-†Ë[­i˜ö®÷ïÊIÿâ¼(ë**Á¼œŸ9¹±lÜ¿LÁÚ¹µæŽæ$T»ª¨ïÝÀ)Às-1 Q6!B 0àX‘$±….Z€(@!` p2–Ï4 kØalÈc-Ë‚cMý1~±àXÀB@;Ê4ÿ@”µÒDÊ&iÇt… &ÎT•€€5Fÿ$ßÁ;3g;X{=$ŽNµžzoS*ù!MlJÈ]å|ជ¶…ZÅ@¥ÐÅz¶L€XhÖMâŒý¨•{¹hbê-- Š pXÛ °ä^DbVeV„„Áâ(F¤°,È„X„0—F¢VMÿã"„Øx² êÀ0%.öCÀå ´Š4ˆ»XðpΘzÛÏu`Œ7À À P žÝ üw‚¬Ô(°7c^t£Ùl©@†Ž’`/ã3ˆ¨§ÌÉÈÑà@ˆmÛ§xŸM!(ñª*%@õïýþ!]¯H@¯™–‰^©ë7‹ÏèõÝcÍEšÌN»†©Q^MÛ›m¶ë³¿Që™,ÀF«Ф‚WÇðêk€ºŠf†ÃùÄRÛ¢g¹!Bël Iµ=h— ¸÷ºˆ¥š‡¢2i·¡ñ¶æ§„©ÄÚµ ¤€/€/FØ2+ @² ¬FdÛ`Y@8•¸5åp#=a8c ÒU €€™W´ Í Ñ:µh#Ì¥€A^ƒgíã‡÷œ¿Ùf°;ÈáìÀŽá €€ã$(€>÷ÜHvó‘Á˜U:ØSq º‰ƒÿE F©R`OÅ@{í,Š>mÛF5î‰æ 8üžûá$U‰é ¤*™\$ˆøòNÞOcÀ´‘`˜+X*Àccš™ÕÔqߥE¹Œ²pM*‚´/þAx¼Û©A!Ê,;RB ¨òt'e}t;0´iæpøÎî{ðô,( ²% h¨ß7¸W·Qwס 2ÌM1qÐ º0´iD£€mÔAÄ«h¯òŒ0¡,ÂÀŽÆÒ¬€P§¾De(˜ˆ0@t"1’Ì sÒÑôàÕyŠŒ 0Æ Økp”Èxï—Ç>¬ã.ÀñÅš"ÍÁøÔ àlC>çÜhîßMfŒJêUlƒnt`ó‰Uìiü<\ƒ\¢DòÈèïɩĠMUY.! 2ºj²Î9lçu&)â­s"ÂõR­&%x „FO)ÚU« sŠfH]¹#>ÊþnêŸD@¾ÞL­ŠN¶þ¼!Ì VÈž hý!Ñ ]ãc[;*séÄhÛR‡*âz"ô¥¨ºªˆf}ßy\‹ˆA¾r¢ÀÒ°þ ªX_–š¸ãÉ‘ƒ Xk@Tà.h<9,_«áÙæX B¢J::ù[h+Ä/ïŸÂ <›lNK¬ ÀÄN wfŸ™Åc <ðí÷ˇ  žç ïÂ)WéPÅ9èðÜß`ªØÓø žÜ‘¢œ¸“ă¼€míst8q-BC%Eø ¿ßƒ–«¡Á®-›ì力ˆhíBe¹ßÄAüï’\µÞ„t­¤äp59¸’‹‡Ôæ]?d™y¸ó¶b wš|nS|V—0j(3 @ fØûºê>D½)çÕ}Б[L<4ÌT…ÄkÖ˜£”λãÅi|;€Ä„k*@*jº# §eû߫Ȁ™6î,$ï¦cnkv•M@)çºPeŒ}ÒPæçYxŸ€°'"u¼ß;5 Ó^r@Œ# ×4õ°¨ü=ZiF#9€ª´Xa’ÈKuôÍ“Dœñ½'`£4È €£EÀâ‘N Ò!ƒ)@ ƒmGcDÈ*V•4¨_€Å +’„‚á© ïf]àYÀŽ8Š–ø€è çÜØÐ{34¥‚úã Éý·Bg)¨¿áP¬×[íï¶@ûWw0Hò hïû6† sLU™I ÐωÇ×F¥z݃é¸$ñÁÔT®óZœŽjgQZžs3É8ªÊá@o.ÿÜÑ®"œ6påHKSÉ8ÖÏ­@)±î2X5À×–ûŒ’öÍSQ¤5‡É˜s7$î¥`¶Ž=%€€"`÷Ë´e,rK=8Þö¥iSA9@uæîæ9¡@ª1!â¦n,׸‚ ±‰…ê&³**ðbà}ÒÊ–(u–Sï?À± ›Ð€Ö €‡vÚ½©Ù)šé¯)^€÷W`ÞÀä°¡(ÞÖÜØÀÿEZ¬T Q·bÞsxð¿7¡è¢8ÔOñ´'+"ŸÍ{&ÊÖ´m Óß5°T‰8ÎÛómÖ‹™…ª¨ ¤žûâKî˜%Þ\¹÷™>>¹æØÚhŒŸu44¡~¦ª¸uO:×Gѳ'2vf çºßA‘Ô ùRQ`†šy²ÿf'ºw9fu]y¥3‚@ÆÒâå«Å”a÷WEAüÇt ê HØntØŠ Ü¿… ˜c‚÷òu ªK3F,vµÓv2{̵£²ìï(°Kr\0_ã¾]'Â/˜6ó½-Q§*RFȬ*êÀ]Ȥ$`E‚Q€MÀªÀ˜kwxÞ}‹ÿz>0Èòð ÷`ÝçààÞHH¬(Ð@~×Ü0û?«œ RA}ŠmÏ ü38‘TJAÔ_ñÒÉJÌ­¦8~º–úQ\LBÕw›Þ)%x›XäP]€HæhéRžªR‚*z÷„ùz;Í.™ƒ ©6tíݵè@ Ðt1bí©ßî°W\o–Éž((˜ÁÍ7X}ÎU·8Šú2n=¢j„ëQнgV¢@a!Cˆ)ÒÏ€(¦Š*"﬛"âó/ï%¹VxNg+AÄ5Ù”xòpAáz¨Jž¿ýLí”>»ïh²¾‚ FX$3Óþ‹@!6´-À€!¼J@‚ d,œ@\É~0¡”Î0`gض#Ð/èG|¶µÀQõˆ0žw á7‚F° Ÿ& ¾ÆÜ¸üÿŽÄP#¡nÅ5çù#%¢6·£>Åg ëFL*×Þ'5—¬Y‚LÊA\€+OF}Å—Ue•‚ Ù²>*Œn"èâîèkïï'äO;ò2"8Pb œF ì}¾m÷ô_ô\8šDe-I³ñÂ:<¨Ùz7¥yׂæó)Êp˳JÛòc Ì¿r° î¨ã°ybÝVh$€ýT|Dœ9 ü;Ú7CŒ"2½&9mÎ.ÎÔ¢ýMŒe˜%Òò½'Ô‚J€d C¨tŒ m$•" ò!É€dc +dòérM,`€‚ Hºq¶×³¼a§¶8ã]êÆ²—1ǰÆï:ŠÞåþ8Çàþu\Ö¢M!(@À­d+-â$m€<¾†ÜhþŸQAXÛÔ†mËËýï ¢FAMñ Dµ;«òýd»4ºRlg@N_ñ­FŠªRa’r¡Œ_Vœv醆ÕÄWJ)M#áêô3ùü5Š [’} ¡˜æJ…æ\B’¬#/%V¥®ºn¶’j:•âLçxò3Óãxúÿ“¥þšcZ”öØŸÁ`zÞmM[VbRJš~¤+—ý‰Ó{b`®Èsé‰)’ºÍÛ U~1{îæGT#FEÐãH [ "0€C›B¢ä`Ç€šF°±˜ D¥Û,¨l @h É]Õ*P­ ×NÝî%€ÎdžâñŒÅ8|y,þbEÈ®tn(Tt‹¤7´dz€C~÷Ü0ØÁ@éBÄ‹׆9Ž\Lp)‡)cUP°DÚ X22tF¸Žþ¯¼ßr$€Ð$`N€@Žä"`¤ÓツV}MJÛÉÒš`&”£€XÈ Š4ÐB‘`¬D.ŸçX,ôÝh¸y eB“9êF‚Íc¤Ò¡É3Ȩ_V¤(À»®1Â’ îÉEž»íc8iˆÑ D@@;Ž*Ö¦yÁJz­æ¹ÐñôЮKãÃäy-xû±‚ªzŸÈKרÜ5ìòñ6ïoÕ¶¥í77oP/è<ö§ã»( ª±>wUv÷IÝ<ÑX†ˆñ·RVt©†º ¥6Õ ê IöÛT9Mm1h”Ì ‰hDÕÒÊ0¨’CU: µt'”Š4Ð;Zƒ€B F ¸P1Àd˜RÀˆ Hþw*ÅLjN4ÏíuÀ2ë x`pX~÷žýc˜¡ÚRœºö¦Ã3ÿ1µ(¨[ñˆv©.YÖ¸»”¬Alû>¢uBL›©Bh-b†6I»Øxx°úª`ˆÒ¬-¤ðº³‰†„Öeø~qm«æFÆë,Ÿ9±ŽÖüuƒFmVpwVΟK=ÖèŠfBþžpË1Ù©Ëúµ‰¯ÚT„6Óm¶j£ÚCæU ;M ’1‚˜rDÞQ,Û€ôn2† p_ 1‰½wÔÝŠ†^!§{'#è¦ kšZ“EƒÜ&>+Ù-z_Ð|5Ú Þ×k!3M`€t§¸‰íFp>E‘…8P˜¥®ÐÂ.ðà€^çÜhøo@ ö„ú+ÞE7’ù/BÍ{Sü¼]̯Àõó÷5£7r’rqî 8›ÏÙÖ«Ž ¥™õ\e¥­¿ªÂÝs2¯‰LÅ»š!¬Íµš×ñÝK/í_Õטµ›Ï|@  J1Öž[‹‚!^ Kam•J"`P*KG1žÝŠ hš=:M T°q>´ à–½¸èô2¢E0Á©F(p·æù£Ò„0È«'¯«•SX€i[î\èH3L=—sÈeN,`T#| ¶ì8\F„˜Òˆ1¬À è²Q)IEœè ÔÚB,Ù à;E!Ù ìyÿœ€ík¹çx·ïXÜs‹ä= !ÀÀž×Ü0ü_‚3EéÐd:<󿤒– .õS|"J'DY<àòZØ÷|õ£®K…†RÊMõI–²¯ß‰$uÅ:9íÔÄÕZN!´£¦yúìwºHÚ\-’ç^½aï`g늅"‡\­ØZd€Òzêqv0ÝLÜk¾†TD¬…àŸ)uÌÐUƒí9&‚ÒƒA}ªÇ·`zÞ€äw2C–[±Xáz‹¯¬óÞ—‹8€pÍ•2[l“R¡»'˜±±;§‚\NvU² Œ€º•5HV8@&Ù±^Šú_€œ8ïrzÜ" !Ø2€‡" à ¬±°à÷zØ$EBÖ•e©X°Ì:°0ŒÃ¥yxÀqð($‰0ÞçÊü/µ šä9‡åþ… BBý˜Y'O5rå*@qq%/\H”ì#Zséª*@%1aØú¤aqøó»™&ÙŽN5Ä/Íåì —Ýg*IÉH„R2ñ(¦ÚhÉmñEQß&+[÷ôŽ–·Þ!ª§M0*³„Zj'x£lí,4Ôrz voßÌž,jbL2Ë‚UAŒ±¤U¤ ²èxBlŠü™{·%À÷6v§ü3nà~éáÞ’Hy¤š ˆ_Õ‹ª¢ê@ÀÚ"Ö€ „¢€“€U``H!(± °€L­;ìZ÷ÀínnòÏYÆx;€-{˜S;Œa ìô ÙkÅ»$H@¾×fýï%$[›&MæœÃÃÿ†°V)¨Wñp7E $¸ ¨$TûÈjNªª\DJXÈ©ÊÆÅkÅæE=NýÊSµj2•úÍQ‰ÔBH©¯€ÂÕá³% Åg¾èh¯ ¦‘ÇÁ |îÉsšÌ;0%µð’ª{¾'žø^XJãOf  Há\uE-DQGR@ƒÌlJ„:ÝuRÁ"“ŒÃGŽ[èÓ=ä«1™Uó´aý.¥¨äØúœ:foël@$Ü÷P"U4f+²gw `ËVD6¤ ˆ}nH¸0ÂȬ°_Ðå^Ãê†^SØ3 €°ÁFA“Š‹Å{ÆãÞ¬-è¿…¹ðÉ€mz]ˆ#2eôh#0ðšÿ¾× ÿ÷(˜©A§Ésxöz‡(]•‚ºóÞ·Gq²ùã»ålऄL òB"÷mt˜ReÉ$±­Á:¦­œSn3øU—ê39P·má†qbßH¼¾YâæA|ÙOB¦z˜µkmš¤Ã“ÍÝuQ5s VÇÓâv¶MQ=uÈd™8PÑ+«—QîHUmu´q‘F¦üÎ(½nÜEüÒ*±&ñìõÀŠo–åä0º6šNQëFh5` *ãý`“ùƒÍîl=il[0F6Æ’ VÚ=W hP D£9TŠd¥êÅ€ aШX.¤#€–uÃÚ ¬±ÛÆ,LpfÀ`Ùcls¸—¦3/$¯ù•XÂ5HØÌÿí²R¡ nÅAg.øŸ- ¨’PÅ'*9´'¦f!Ñ*A^Þ.ð@ÊPb߯¹â¥eªJS@1Ób‚zjا]¹Ä•Di3ûáÔþÎ÷[L¼?ÿˆŠÔêœ9HØžÐý*ˆ”xæê½™q:»1!ç(ÑsYä;ªÄdÇ!:¦1ÖÇHÚ©¡üö;ã+c"†ÀbÖv}ñùNõ€s†ÅÌÀìõÀ<%òbÛÆlyeɯZª(DŸ:L‹†&° žäúE$X`d ¯¬OéòSVËàÐX,P``î-p–…ýî󹺿ð˜m0¿°µsOG悱pX§“5.,ŒüϪ"pPOggS@â&¡€c#\³Öÿ*ÿ?ÿÿÿÿ%ÿ$ÿ-ÿÿ#ÿ%ÿ:ÿ!ÿ'~×ÊüO ÜŽº*î57°ÿwT TI¨Wñä¼Òª$eµÎùr8jêé`Wï|A' à뜭eaVS•43LÿÇh>î}Rºþù²|OÒŸ5ËÀI¶µIÕ{ ·ß»ì-ãâ)R ¤Î§ÎÀg%&H.:ÿlÀ â#Ðßɾ§…NÊUsxgudZ]#’4k5W˜šHàB>½½ÓÈ€…îUpõ5;õ6%x謯¹#>¦*­ûŒæ*‡‚Øé@±¤0àtElÀNºÔŽ’-ˆ,HÆP ]¢€ Á†4=,€ ” ML&PžÃ`랢¦ `®õ¦þ̧x~RûÆWü0ДÇR½‰Ä‹@< ¬¥Ö€Ü¾Ç–ÿß[R”„ºïšØÿ{5ˆ¦e¤1êUü<÷lV^]W yíì+Àvä>f˜ ­ªR$ˆHèŸ1\Íõ^Våz} ê‰i'Qï!(d&Ô±\Ì%ÞJ;\ÿ\u>:2’%A]7T>oО !}G2à½HîÆâg¶¡ºFfHÄ/«ûükü½ µêÀõ Ñq­”d1FŠ<ó[5Œñ¦ê"rŠE4  -::h,¢zÞWÃdX`+q´@ZÈš¢)0í ˃l˜|0¶0¢·OÜ@ü_7½È7 $ -5ª5bm@k,„-ÅÖIj“/ÈV,h Gˆ0…$ + SÄàpä@ ”@‚~çÜ ø#”šËÆ>èPðwH)*M¼U&Ï Dy(‚õ À½ †€Þh]€ð£>ÄWÅñ‚„(I †97­“p½¼ÿz™°WÉ s§’ž,•-%ˆ¤ö;*|&¤u]ð†K7rhr»žQyÇÎË)±DœZUT/#`vÙ•š™T!ë‹à±S«Í4„0x––° Õ¹¯4*V@ö꫚ èaƒCK „{ʵ½Wè°, ;*lEP,G¯$ÉT›^ šš§`š9 íŽ‚¦Œ(ÄÈ8´dÅIê’™¢%4hÀ@  € ”› n!Ÿ‚?ͪ¡ÞÖ6ø+žciº=ê5ÆA7’ÿ/A¥‚ú+~ E±£fdëä‡2«s NL}ŽlÀÝÉÀ‘èÌÐní{Q­ª2Å •—ègÕ“Á¾Ó%¸9ýBì9´©“MI‰æCŒŸ®g÷ÒÓD ¯ìÀ#òÊB ,BF^5¼`÷UŽÐ1~ÖVuÏ!{‚•u“APãœ3ª}_up³Jè³"ÖzÙ–ö¡l€Aˆ%¨ÎrŽi`wŒrÖ$±€’Äæ\ÍÒðÒ㊤°L$ ˆÄ$ã¢ýf÷Þ„âØ!$HÈ Düy-!)Œ“а0ðËkátý0ï ðS0 ÀÁ[®‰„¨>ÇÜ0ó_¬ jå©Mî Éþ3á•ê¯ø8î¬Â3 ў控Åe@o»`hö½ÞÓâá„)EPjX©\c4¤¬ß½Ï/ÞT¥_U€Ã¹+79cfvÃNRyæL€ {¬Åu%íðX~‰úCê–: ÔÎ8+c7E²<€(¾ ~ýö~1 @FÐ1Õ4å*šKòÒ4*Õ1wÊ*€øÞò¸ƒj*ÊÅ()f&ëy#Ф—`Þ3ɤ‹±ê€ ?Ðe¢WüùXîdO»°80PZ À‚mßYÀ3­,’ ¼z 086`ámÝÓ ^Çܨýo(F+“]·áºýo(‚VERÛSñpGIh_€rw6ÒÀezñÄ"ŠVUVI@P@†Ù¿)Zÿ;K¼‰Phøv3‰ÃZ™ÎÍ}ÊwŸ0áJVsy(Jñ¾H.apIDÑö<7É|®"¸,NåÊtÂj¸Ñ2ûÀÓl*³T†È[Ò·k0 ¦eX¢-ÃÞÊ§Ž‘[smö'2—#Ý=&ÙL“¡°Þøz$ ‘ͤSóÿÚaëN§^R˜}D ¦{ HÅå6({¯ïS05…(̾UÈêFCU( +¸eƒÂ‘€­1ñ²€Ihbxÿ6iˆ# x°–¬u¦xóY`Ê-0¼ϱÀ8Ÿ¢<ô=ÁÃ&0^×Ü0óÏàÍ êV¼ƒÿ¡%¡^ÅH¢Ú‹ˆrªfÈQ‰i€‰úwõHè¹ç>±#§6©RÊkÌ.ë&ìgkötÛ„œìý¾_GX.Žöfç04>ç¾.gó™^ Bîe‰†e0‘@ÇŸþýŒ´~ôT’Z)ôðúfeU7¨ëûÍH¹ dõ2‚SŠ>}vÔ0Xß ¬V&›o€²Î×½%êŽ/Š;{ð·.*¨ÈCg¹e¾Xc¢§Í]ü­|£±Ñ/V$h„QÌ mA4‚ @AI‚°0«0 ‡1Øœø,xàâøçÄ 8Àz@ƒ#T265in4 ’PžÖÜèÐæÁ#WêJ®õë Ã6ßÜ"C„ú+þîöXŒm-ÚàÚgÍ‘‚6­R €P@Ñf¨{KK·È&xtCI§f§Ã»ôœ­ê 7«¤©z¯:Ýû <„o2tTVsÍLtÝîÄW+¬ñÍL)•÷Ôˆx|ƒÛ[ ÄϾþ,`Òà‰ÇW ’E§ŒÕ¯òÉv¨ræy< ÒSõ’1ή‰é”J5-«Â¼® ÿw<]ê²Uô’â>5s½óÁù…Ébq„%áÛmƶ ‘8PÐAk“EYÍA(êH ä+°%zˆ@`h0ï/$ÀžŒ›dæ%  !Ë>ÀÀ€ª Éu@ ¸²þ¹5%hN%4õÛ Éÿ!!”„ú ?€@{Þžl!]o=JàS‘ • w  ô5Q£êÕ”%ª~Óí©%¼ Ýb»±_êÿ­UFé]ze§Vn ¹ê…S)b{(w²‰/ùRRõüèó¨ìÄM쿨œöFýW·Fhœì¨ÏÏ–É{ 4<݈”¹ÜÊdŒ\´2eÈ]S™V¼Vsâ·i/Ùƒ öÏ(U"\ 4 ´ " B$Vj,aþ5]3ÆT0n/bÅ F`(„m 4$jA¬JvDX@/4¡EÀÀZXÇûñ£§;`üsâûÝt$Ó,ükÀ°¿Ìa‡*¼ ¼øAJÀ>·Ü üg„M‡úŒsÎáùŽ’¦JB½Š€ÇÁn3£9Ðp¸ö€t5yr¥‡êD5Ti$ 5)ýõúë?Y+¶/ÒªÍÿ=ƒÝ®¼fååãüìÁ_óN?î²TÊ|È9tn¹ XÇ5Ôð½&BÆ€çïImÜpD·Yxvñx¤g0«ªûË%Èñ Aaae8,ôuPà¶½W\µç€íã!R¦j”<@›ƬþÚ–Û0„Hi¬Dæir®7šÅð?q‰ˆÍQvÔŠoÎ óÿ'* ¨þCÍøÀî)½º9”q%®‚Þ¾sî ÓûŽhUU•Õ¥ºÞvÀÁï“ï?~ÞͺwºéU¹½Ëíùd‰l’³D¾rœ6%Ó6›¦MNŒJ^ësVéúãv•aèØ(g_œËH €<ÚhGß‘Šl/Ûw{:A ¦â耙”&V ífèjÞ_3b šcö@W-˜žœ„ÉAVÑp‹€ËÞ{U›ð.rª ¯•`ËTÞ9£•Ò*°X¢C˜ d °.`±J2rQ%7ZdbTëŽzŒE`ÈàAèÐ!U ã¶+YÔå*ƒH‘èý`Tfï¿E8õ;^'{Œ­ ³ÈJë·¹Ž'®8ôŠOWƒ0n`l¯Ì°ÚB ZxÀyV;t1”ûÎeì®+Ú(ÞãjÁyÛoœ{Ì \yËÃ;pÉq`/ð |ð"ÀX´¡ h C=)@OggS@&¡€c$Vlàÿÿÿÿÿÿ#ÿÿ/ÿ!ÿÿAÿÿÿÿ¾çܸÌ!ªt¨Wñιaþ¿XÉ”ÜEAMñ Ld¦EÔO­ zû¾Í¶-MUU ˜ÔÜVî–ãƒY•žC}HÔ_ì»±ú~ïÛ«‚ÕVZ÷‘Õ†éXyÒ, Ô2×xªH‚b>µ”HÕ8ØÉ×i‹õ«DÉÇ2ejFTm–‘ *42Ðw"&f•5¢k.:CB-¶ìEä lŒ!€±‡ÐBÒjd(ÕËR„H FFFØq¶,BÞpèºÜÇ3±6AªAEAX XœÐ· x<àŒgî >çÜXöo…*êUœ{n,³yTTšP¯âˆ©ReåhµO»vòêX'î<¼6Ö¶§ö {£mÕ‰SU™PEߟað7s™fÕ˜G8UË\ý£Ëý=?xàFB³'ŠÍGÃÜŒÝ(,_~+@ˆeuCh›Á”’ÿg=SE-Cóì†À¼^U‰äfD”PQmÍ”)@D›¡X#¦@¡W<©PpŠÆ(CnÓÝ´ÈTFÁ÷Ä È–¢©¤,II#LÌ ,CX£À²„Ml06  L *ÉêÌ HBV»Ÿ«$ˆö|²ÆàpÀ-Dù H~×Ü0÷7*­Ê‚ºç  ÿ±¨ äR*ÔŸA¸! íˆÖÀ±¢Þó$ öÑV´ª‚„bâ©âhh’ú€˜6~6íð'!‡Ñ@…ÃzM$ª ž}ÿ E üÛZ@¥8ö†42>›?}x¦œòÕÙààÌò]Ž¥T:ªÙu0¢S‰°F¡ ë3Ú”*:ÑtF±Ñ´˜4£ ô:…NݧŒNïjúEÃ5 «"Õшì–ð3à-+lI¶‚€trÛ‡n ¼#!©úÒD2),iÀ N ÀG{‰qb؉sö@d Æë‚p `À8x<À9À#(>çÜøì?w†RP3ÆA76øE(”DÍðÈñ¸8”ùëË\€rŸÓ'm“€ %^ñ–5Z›@ž·I}k˜—úä´ ¥;èF€bäAtn'P)1~dWýlÏ ]%köÞÇÆ|G–ÿ\"‰eØ­ÊL@ *yuLwTbﮣ šëÚ#ˆ†ÐI5D¢Þ(= C¬i— A)X–8#“w„ WœüÁxÏäŠ{&`jЈ-Ä•X¡É"Õ%[ÚZ$Á(EߦĂ j2@pÚ€kеb‰€B0„,O\H$~çžÿgJ"´H+Ôÿ ƒ™®ÄPjŠ ¬´Ê ‘7TÊ"¦åû`öYÑƒÞ èÈ}ŸmcÔJö‰1.“R ¿«¹¼c#¦÷a¿¶šcøò?ÒÒèpo³-Fg6µy¡ˆ(Ó9+GÇgj5r¬_€ˆhB 2$O³ï,J“½h~u;:¢J[ÔÒÌSv¡ÒŠ—µÀ½á©º!—ŠF$§A‘D¶2@؉[Dòl€FR,°„„±¸ £Pu‰òí,ꈣ R `#i„j5ÉTýó{űcDc–>3"2‹‚øhÓ€dhcPT‰M„à’ Ã(,Àa‘®>÷Ü0÷߆D¨PPŸâtCû®$¡µhI 5ãàr¦… ÐeŸ«÷mk‚ª3@Q ‚^ñïŒwè¾Ä,&@ßà,¹€öÝ| 8nêhpblÊi¾ÁiKù¶k)“Ÿ~ÆÄe¹Ü¸îÍ û3«x0†>ˆo<:+nΈ­¶¥ Ð¨õnÔc´ì]Ðéz—ÃE¦;³‰Yû²pQʪ‡È«3PK€yv³cÂÌðÐ^,!°¥" öé7›"¦’ÉC8"€ž¤é¬,/ LY„(²# ‹Øî¡Q$˜Â X !À4Ó ²à¡A„@¦‡öj hpüÀi8 €‘t!žÝ øÇSJP)¡>Å;èÙ%‚’PÅÀNÎ/O€CÞ>'pûëqzû>êÅ»¬%¤‚$ÉÔªÜÇ£BÈìcSŽqy°Ÿ­ %·÷žüŸxÌÙzOÙ™U€œ²Á§÷ ”›±t}!ÊÊ &TsÙ €'gžQ <¡gO°ó•‚º³¥«j„¿ø|Õ›¹¤Ä£bet«7¸œ#õZZŽlþ°¾6‚, òÊV?dßFRÛ9Óz¬2 *9«öÐØˆ`öÈ,õ5ˆqýc@XQs§¨X»Óu#ü›xüK_E(º; Kh˜ÀJ'À- þQènß·ãx¦þüpÀGÂPÞÍÿnhÝÚ•„zÿ yë¿% Z‡ÖâÈõSüÜc"Ñ~pjsÁi`´c˜k"Ue’$ ‚ DöO&øqzßËJÍg² ޵«Ÿ¤ÙÒ+Î;!dYò“(ú…VüqUælªÂK !£ú̸ TßQg¦Bô3òr™ËCk;Ë+C&âM§R »xl¤¼9ûÀΗ–Riš&'É6ÝFZ@ßTÚ}êä<å(«Wµ*2d›•O¯h%`=í7¹zÍj@EÈ“ç"kT4BŒð5F°m ȼ1äÊÍl&S’ñ2H“2t)²üNN»¥r¥*£bÁ‹PDpðù,þ`ýÃýX À¾Y`Ç †.Èž þ‡BGuþžƒêÿ^RBWkUêSüT¥“ãèÙµÞ8˜\ô.ÀÉ}¢:1×­ª2 ò¨ñ¿…aÚ•éÚêþl¯öµ* üå³€'€a½úRš¼ð2шº~6]†­ÝYß…>íþU­##ׯ¨NEe¢ûË›Æi¤×šO¿Z¾„ðU§™PG·Y<Ä6ïžæÚºc 8E²qµ¬s,<:¿¤^x<ÃñZœ˜,;%šÅÖð”‘&…MªL+ÃÀ$ðŒ%;„ $Ø p’e9 Z À8èÉRb§™…1óހ;n®ÏD2$¨$ ¯ ¬X  á}˰¿s`,Ëürö,@¸¤ ¾÷PÿgW‰´H+4öAÃÿ½«€®¢’ ~Š?€Z|ªø´Ñ^„OGŒ~î ùhVé@…šRL¨™aÔqܵ ¡ç-ÓýäÊ-ûÊ>Ù—{øì¶‚§x‚»eº>(9yÉÎë–P>‘þkú±Ÿƒ}Yxk(¢£ÜnÔ¢¦< ¤^º­à¶L»^¾ê…wMlâŹJ„\ݽˆÛ4¾ô¨ø©PSdô³‘…’Ú #¨H&ŽˆA`ð*ÀY(Òåš}XÈ…-…‰È`…„ ]û//¼]ðf³_ß=4w“‹8ÎÏêÑ™°mÑy¹ˆúޝ.jýÙÃå>Ýß6ÙE%ɃfÓ´œùñ7™ST—ÝBÄÌa~ƒ-úi@`,)k¶"v•ºòÀÓÓNÊjêD.€ŠéÝÇnà%Œç·F=XcÇÂ{KrSMí¢Æ~š1ÃÀ34ÍŠ`` I£% q´ÚÇÜȰÿÌ^ÚéPS¬kn$÷ÏHe†Vu+ÞˆékcJñå¾u´UqêU•’J   ¾neÑ\‹»¹Ý³îm¼ãçÏ‹wWììŒ,¤²Þéwðsìë*ƒ½iÛ6¤2î±lEÜ1·?â*†{(O݈*Ää3Ö¬¤‹a­iDæñÜ;Æë*‡xìY²KÏÍVUÇøß¡N`×&önÞ.ƒ„P09Ž‹¢L£ÓWb°íé¥)8 ›+‘$@€V#@«ÛÎR%Š&Û! @¨¡hl-làÐB”„´ ¢§EXà.ë0a¸[¸±F=,k  0 QÎ`!䑨SÛSµaT2¢Œr žæÜXþW+´Ö.-¨«âžs¸ý÷1†)Ê„šáÐeŸ<ÎãS‹ˆ¶ÀqÜ€,9FDÃjNH•Ù…öпËüTAFûš6Å^ÖYY}ÿ"Þg!GÇø¨‘§=%æaQLs"QKHül°°ô¿ ~&tÒ5½w1ÏVE_aŒ¸€Û¸e¬ÎZ P‰Mã# Q©€Xb…„­‰k™°²ÔK@QF‹Rc ŠÖ:>£¬H¬ €É'ìSÊ.òL+FBLˆ—6` VPâ[4†H!(B”ˆ KJ4 6ƃ֤ÈÒÏ<8€@H)2R`OŒkþæÜ ó+¹¤fËN\S¬{nÄÞn0 œ*¹¤Z5(­ó˜îAyz%¬`¼qiËzC&P²šE¤• 5fÇ`Z…¬ÎÈ`„l$²$8lÉNN>ÀˆÀü Àü5BEOggS@Z&¡€c%´Šë7ÿ!ÿÿ$ÿ'ÿ.ÿÿÿ+ÿÿ ÿÿÿÿÿ&ÇÜHþߨd¨Ð¡¦ÝHö¿`ˆ¢ZAý? MëÚ¼ºõç–ä®´ž;К|·‡?äc¢¸(o¸© È1m¸ÂU•• €ÆÖå^‘ÿfÅís¯v«­+ï]×·$ ?M(˼k¼r£PùvsC´Ä«G r| d%vÿÞ쪛'$>?)) %¸JÅ``;‰Ç–i¦AÆò¼šØÀº€ð„Œ=Ð9õ:±$¾4 N}Ç~ˆÓþùô“ÅDk‘ËT´{5YbNbbO@4n¿a;„ip$‚Œl¼ È¢Êû¢é[ph;¶ åT€e;ÃZvMVýŸ »Ö²ƒƒ¹€? o‰@ ÈfýÏN0~ öxçÜ0ó_€¡JAý? Wõ³QWFNÓƒyÙžê Z·‚A Õ–¶VCA“¸ûú×Èåî61˜'O|&rÙË¡ãK)G™«\fæcãÀrTyâ3˜E=„tÎ3„íFh»'+Ü5ùÑC/Üq—Ø5×»ÈPµ'ƒA,$íÇE¥¡Ñ1#‚ÝĪ>aí½žð$L²=ctíj7+, ²‚YT¤pO ä¨óJª+îêɪŒV33ȶ1cYÐ ’‹D x‘j aÀŠì,V€A¡°F@R€"ÆÀ¬±ÈÈȦ,†Àƒ­ à8^Ç–ýk…¦J‡º*>sÊ?iÐZT)¨Ÿâh]½±]- Ûã¢yÚß‚$qÌ h¼ÀôL±pUUR‚Õ\ôÙœoy†5ÊíT^;E[5þ“ck¡@þ²LˆzKXMtG;2K êš>üµ7w…†M/—{‡9?7®Fw¥˜´v†‰¼)t<-˜ÎÉP"YxººÐ*¸‘a-²4&ÂÊÑ–N@·†êÁ.ă«$0&4XnCnHon6&š–¢^h|ÊËx£hAŒÜGXÑ49„^×`â²²Ú T4V0É­ö€` mû…ù˜2ïûÙ7—_=žÃÀ;»€…7º\Ð[@(þç ì?»É]k*OP¯âÝs0»y„%æR© >Å>{¨¹ùMåVÜ|œuÔŸö5ÁÞ¢ ëpz´KÕ­ChTC•IÐC¹{¦ÓkŒýçØô(èiƒÑ··æ£Nð2ŽŠz·.>C _mü¶ô}&®XZ‹ñ̘j}³úLÞ|?ØìΞË+´W?±Š`÷xí°ì2¥‘õô!-&ÚBsÒËRrvi sü–jRX†°Ö tÇeˆ„†ÄñOÒ8¨J`%FIPS!Ò; ·x8ºÂ„YEIÆS„€ \ A‘ÀÀcô—;˜Ø Ù@¿mΘ’ßÙ‡~óeQaÀr)JJF@þ ÿ—ÝÒ‡zÿœaøw2úÖ–vÔgüÜù 1ˆ оaAÆ•5 U¥˜DF@’LuÒÖ‡’:»Šæp=âã®Kœˆ îù¿×ÙR€Rs=(íqÖàÅïUOœ‘·n÷3,o–Í’Kȯ""rPYÁy ¶¥Y²q „2­›ÉQÈì c¢¶P?*½¤‚íMç!—ö @LJÍ`\梹t’o–š†Ìý,+@Ó•‹Ní"÷—Ûˆ“Q1·‘!¸ž‚¢h¢Éò[ç/ˆrn“4DaAÜ“–®¾Ÿýt€Ñ@Ð&xT@ B†6×Z`. XwgÙ™qØŸìkƒÞ645ÑþÝ0ÿ_¤AŠÚõ*ö=óÙÍ÷fַ΂ú>€zÊÖdÊÖÉ«Öì‰â¨„81Ýç³Mö¥-€D\‘‹±¶@äÆ#[½µ"GU)€š¸\“ò’îÖg†$_(Rëþ¹ÿø‡EƒGMœñŽ}Y!¯I Ð´V‰ dFælñsD–44P¿[°ù=ßždt UaBü³lȽ‘l¯ 2™´gyjr= к²l2ȶ$YY™Ž”J®b£T5c¦'Ô(±@hdK¬h1`+ l54 ÀÈ­À.  X€*@ ‡ó@Äb0œ=@nfa±=°cÃÚs`ËX,À! É@^æÜèàQƒ”¾IúRSL{ndàŸÒ4‘=êVüÜ×5MÀ¨òmÔ$³†ªR (d'‘`^ÚßûÕTãŸË… aLµ2÷Ì‹ÈûÉ®W;7‚÷ž]cTr/àp?hÚ^6âȘ*+ÕŠ[gîáþÝ¢„†Ø±¸{䱬©=¼Úú*“1Aï…(èÐ/ =E'pf²¤•lC6?XîiõØôù½å£$X·tޱ`ÉY@F€øã%o;ÁLyß‚QNx¬fG?å]Ö8@ÑÔ,êPÀ…*Ú+fÊzÀ.30pã±ê1°Ö°`ÀÖX p@«Í¾¶Üøüÿ‚)B·çnœcn4÷?Ê Ò õ? òÈ¡GÙ3XãQ 1oýùªÛ³ ñŽÙPU fÀ8>%;¿bx¿SK“úÞ.×V}ÝÙæ’0U k4P·WŒÇFÍOû fËëÿgÜBà´ÄÔY;žWÅ6MÒ!¡¯äÔ?¶QV¨¼˜¡Wrë‰H¬%ä"ÁtÁl.3‘$Sè!‡(.p˜®Šr9i³Ž@ˆÃßÓcÀcëºÚݬvk¥IC—‘áÛ*©À)" 1B€Áë4@ÓM,»ˆEÀ‚mDhÔEƒ*töYÖ-üXð(\ký´fƒ. 3,¦ëÇ0Ç‘ à –„²!e~È÷‡&Ýù‚”mÒ2#‘ ¾×ÈýDA×þ5Ôm,tf2¿—¡usÙPS¼ÑZ) NˆqÁK“gY’U£Ž)!J% T­uÃsfλ–9ÍÑÓ8ôÄjü9rî¯U+MÍAÌ’¦¦ˆI¦H¿ƒ=RŽkvT/Ê|ù3jŸ5«(0¾s¥’ÄÂxo u‡19 ªÄ°™˜&΢…Ê IÖB7.°·àYTéGù×l,Z: 7h#/0,"ÖD $aŒ…’Ót¬I†zXH€P$!‹Ð2p%@¸#$BI [ §–ìKÆB^d$`BøÄp8ƒt*€£”¼,L0¾÷–ù½„QššË°sM1ï¹uó%a×T£p®ÿwñA äàxä>Gx·u¢$ HB€BÀ’ö@w†Ú—EÇ×R"(¶/Äc784ô™kÚ÷›‹VÓÈTÄ Š£½ØÓÀDCºö¾•–Å̯œÔñÅîYE03`zzÕçÑÄÈþ=7YÈJ&J[WZ`Kz-Öw©0£bH–V:x*¥˜×⬬c1Ó¦OàJÑÄÔž§ü]º—âR#!Z" ’a8€ Ð D  Õ#+T22‡÷  ‘Be À:ò°a@°À:+¤€`p Þç–ù›ÌèªM…¨W1:Lý/¨0t˜Ðä(&RàŠ‚Áìû>G«aQ%D À4líÜ¾ÈÆê¶§¤—€'ž¼Ô¾ €ï9÷Î8•š3ÛµbµâÍ!qöÿ²òU Ý#… ¬˜mºVr[F´!HiñƒÕ(FÙmo‰ñЉt}A!lož+\ ðîŒ Ø•ƒ*(k´±sñÂÐÞg-‹UeIÀ(ä‰qã™yæç|-£œTU)%j}¿L¯²:âkº%à‹·Å¨dÝ Ä#\fçk”Û+'äåÄ|Ïkplxa@FƒÌÚJa˘àŽõ"i.@î^ÔÖ׉ª*å’€t1Î;çxö˜ˆÐì•ûèÁ=V'õŸL¥‚{Ùc ÈwIqJ”d‡‘5´ÆJ Z°ÜžþÓ´ ušÙ>dÎa(èôþ%Št<ÓÉuï­·Adi˜… ÈÎvYu'€YŸIœy7…æÞ ø.¾55ʈ$O5Œ8@€™é݈&?…@ °©èÁ‰ °y<2‘ ¶‡*\ÒTC "nð9K ªl&„в¥AÈ‹Ô àç1fuð;¸þ`̘{nîøK?\. ž4¼Û€x6 DOggS@–&¡€c&ηÏÿ-ÿ$ÿ.ÿ1ÿÿÿÿÿÿÿ$ÿ'ÿ8ÿBÿ>þÖÜØÀ?ƒ@hR(Ô­ü$B{é”Gý ?€Ú&íãVuä›wX*È ÜgÛzµª*³$ ’ýÅvŽš—\j£èr+umR\¤L\§&³Ç×O^JNÿZ x â*d?WŠÃ¢\aähWÀ|…Š9iƒÖ²k €'ë9ó¶Rê+,w·‚LaÝ2øo­6+;êªx>ðϨ€ •êgüqz– 5Ça;ЉrâéûºvÇ1¨Á{>ESÅ‘BTM%e­Û§÷ß· á0xêFùÏqö߯óê©Ê³"M8쟚/î®/„D7{FBS;r.ÏÛo&YbÙÍcçÇbn@Y}æƒO‡kl2éc9PÉÒgöûu« kdB ©©¤†'Ê{…ò7 Ž,®ÝÃë¡Çň¡>£=Ûô®gÊÄ‚‚ˆÉk€báõE-¥¤Ù¬’Rt¹Z 7»ª;I1-ôC ñÌ'æ# K£P”,Öa ’±ø`:HöEfŸ¡Èå,ß[àA¤8Ga¸>מù7@P©pªO±.:<ó?A!TN5Å?ÀÝÜZ蛀ã¨.Xä«Í¶TSBJ’ лyõäÇ ³GuPüæÌTðÿùÁÊÒ-þé›L!#2¡„ªÌW>â{Ï4ú¦Ý¾€õqk,5‚DÃ'<·E:ß[˜nlšŽLs:Í[f/–@Œ:çÓx0ßiü¶™V*½> ¡tR·¸.µ…/q6‹†ê³Ÿ]ÄÍ¥ªÄXÆœ/ªBkŸ²”ÖþŨ dŽ]&’ûÁ( ­eÉ(@Ð^ô&š=¢0•6Ò ÷A°`jŒ`1c­€  À&ÀÈ’<à@ =‡š8ààxþp…ÇoC7ðpK€hÂóÈ£9À~· ÿ 14—D¢^ãžs0üŸ S•„úŒüí³>8<ÊGxýS¯ß[‘,@åèÈbÔ©*+Å$f©¿)­>ý邯÷Ï3Îô—ÕîÛŽo³1î+ Ï‚ÐȈ>ÛõÉ#É>t!çíçKqîxoi·®åðX‰ûn5­¡`Qˆ¹æ™Ì½Û–»¡OÜ©ƒ=€ü1ÓCÂ*XN»bE–ù¿Ø½Í[ÉãÈgs l€ÉUê2BF% °€«ÍÙ~\»øâÒ)JÜÈš B¢í®„•8¦×`c£EˆÁ ^IËž}„™@`06ñˆÅ8óðãó:¶ÿÆ—ÿÿh®î„æ4 búá‡9áIH @!A ÀûwOã¬}ÐáÚ¯Ù’œûjò–ôZåó5%„Óµ ^éžMQM" ”¬Éeà ÆÞò€¢agŒiø€Šª:Ö•V’xAÒÞ¶®-ä«GnˆÁÌ>s½ò§|0‚¨Ø´¶k"ñôm)€MÚºÖ¬·*( R±-€e%Æ5ìäÒ0@[ZÈDÊ™tØ&%›Ð*‚L#BuLØ€BP…P1´˜KT4à5&,j* !3 ÞcDC ±X@´–IJzÀø{' ÆËxÀ€Ç¾^–ý7³ aOÅ>éõïÖ@+ÍÁžŠ ¯“=b>[Y¬ù¨tp“/?o1 2%Œ{ì7; û>}‘HYU%`sî¨jÚmŸÝÛ=.ŠJÝÇŸð|$F É¿£züçýƒŽï_r~bçl²D=Å~[iÚK{+ºix)ß *X™\_á c‰ ¡›! €/LJåpj1åY2 ^Æ B§sf]D6ÜÖC€Á‰È»*I ¨Æ¾åL7äãê Ë|+æhS…hïÐJ³v T2ûW1€VŠtholdóýù d dÈ`wÖyÖ²Éu{̰`0à8pþÝXø?„jõWŒ“n4øÇ£¢ÕÎõWüÜ­Ïä>}G½K; U%€° $,’ðòbáußZ‹`Wu¦¬^s–F?žŸï Çd ºÆ é()}+~‚‹¶ ob4toT餙#,(Ôî9»ÀŸÿÉ=Ç ÎÓ˜4E­W6°צ®.8uk$è€ jr ×€öäcšX»“À¬L»€‘9Ç‚ÒÖ7îj â®$‹ý¨Ì¨4Rj*&ã%)COX³wN<Pv-’–æ/XŒ"b¬Ú,€¦7ïÒ¿2Œm! ‰–À`á±Ñ(K O Ç9þ}„uˇ³w÷¼g€‹qàxÎB>Ý0ÿ_:5ì©'ÝXîOÕõWü™E”1búã͘g;@mý÷ s`u[Cl[ž×ºNLUP¤Xk·sïÿÏ͵*Òí²?™ÜÛvQõ‚3æÊÏc„»Þ[ÅçªP¥/ü†héß¾Çc¢‚¼5Q¹±_ɶWšµkHÈy‚ÂÑ»®´Øzê wˆ‹2UL^–Ô­)œÀUƒ§´dšµ…›m Ä.X‰À.Af£Ȱÿ5b‹¸9‹`"K2 XJŒ Ä@h„€¹2IBM $P8B<€1€ ЗÔgà¸àóš÷` ^Ý0üŸ* êo¬“nýg<ª8ØSñ¤²ˆú;àJÀºé§Ú´ªÊ 1öîá–v%"%ÕAëî,P·7QÔjwiãÙœ 2“#2´âN‚gç2¿þØ û_˜ S)Lþľê¶Ï0çT`Z\ðãÚ uÍ~‰!ÌTp8'ð°ë:0ÍúC¶Éž»‹ÆQNÔ}žý€˜^^ {H5•e˜Š¶è½Üêý Ó5~.7TlZÞxž wÆÄP; 'Ü’"ØÂi  Ü– º 8„hó8ÄËVÎîíSk ”6P¸±ŠEfбåwrü÷¦ÏgÀ cËãnÁ8@€~žùßD™ª9ÔgÜ“ËýoÊù*ê§øxU£Ad‚ˆ3àÛ PMoÒµªJfR&\ ŠMŸ©÷tð£ Rï¯éÔ±ˆ¨šcÕ©¡¡ê™1×–“úêXm~ÉS»ž8#¡NÃìíi¤¾ê­½úM'w—ùôŠ/†Í^D©~VcfÉ݈€0s¡é7òñY•èÉ>:zð±2cËZÖéÎe´`âSqKDáGÑ´i-«ÈgJÇQÐ)>bè·ÓñÖ-¸F¬Š]4`:쥀z´:cÌ G$¶è|ʺ Hz#L!-€%MÜE8k¯øÀàá'ðž‰ý~ÔÐácê^1ƃtöã'„^çÜH𿦡­È8õWŒ“n4û øÿ¡~Š€»„"p|hŒà%A*™•Ž%cŸ¿÷mÓyzÔ9D©]tc!dÐ’;€ð"56îƒ*³ ƒT­¤c°gªO%Ñæ¹a4ò-t1M1M)!Á×('{„p Tˆ ž $-¯„%Dz0fl>Ì'ÁÃß /mN/³ÃŽõº9}ñix÷x‡Ãòãaˆ! ×Ü0÷EA†RÐX–ûPóCs‘5õÿwH8{Î^paŽQǵPS*²ŽÜôoc'FγóSdìfMÍÍxúK·ßzûL—ý¢¾}<Ê8—O?|H÷àW3ÇØÈž#ÛGXfA¼U烃|ýôg°Iaï>†ksöG·5(ëÙ­grí3íKfH0tW•ã®Ó²–ÒUp‹Øïß8·ÌËI®žòñ׋˜™‰cwûåé7¾…ø:Y°%5Û基G}˜ü5S€×¸·€¥î1ernNòÄ–|v,°$€ªƒu_ëLDÇÏœŸRZ„6 ó 8 ³„VP‹Â!k€5èN¯8€tBh 0é¨/Œ9ŽõþxF@;5uíoŒÍà—ÁÂÂ0Çá׃9(Å„*p…p'½¢ÝÒ $~Ǧü_AbcJsãŸ3—ùŸ5¤õU\¡µþÆ?À»~—Ä=ÐÓÔ`ìÉhã64”RI®Ho€1^Ö͸§ î‘ÿãJò¨º&»= ²néЇ\¯{Yf¶j_ÓÅÿñ gcÄ¡5ÔÂ$g‚¯…dÊw^jËMLüÉùŸEøåðnm“ùùÐLy3 ˆ©J±{òÝPSÔâùÓVÕ݇ãýÿqTçìqÓwM:RzWß¹e@¸¦•ÚEÁÏg“0¿ >WF™’*&ACX?p^í÷&ð{CgñÚÑü)4„+€˜Ð6$ó êF‹$·MÖÝ ô×°6 àñ<û8A¾`ÙŠÒVÒù-¦  Ö˜µêïÙY´ñ5eÖŠÓY Š—Òõ°ß‚&pÖ0OggS@Ò&¡€c'QDÿ(ÿÿÿÿÿÿ ÿ-ÿÿÿ(ÿ3ÿÿúž×®þŒµÊTÌqó–ÃùƒP¬54>ƒˆVØ=Z5ÎØÜr?ZqÌT¤J™Ë@¬¹BœáüC/ ¸a zo L,ûÑE¿¿Ä&áIeV¤70P#¯VQ/[¶Õ)¾þ!‚€£k-×’(2W¶žceÌÎ-ö=V.’ ÊÖ½÷¥5öQðíÕÊ]}<ÛLçûÿWšÙåywÑGL2Ž !Ú±É@R¤ ™SãuΈ¥ "$ÂÕ%€PŒÖŠÛÖA¤úé^VCKB*†»GP5„À@@蠕Ʊuœ\V*ÞñpàáàÀs·€eDŸ JNŽÍcÚ °m¸ pH®H ~Í+›oH‚*×úó¢f6ÃPeB½ŠyJY©°["÷lÞ“²¬÷Ž–APmyÌ6²l&¢ª Š8¦7W“{¯}޶ЪV/»aj¢kÙƒèI§$u#T ¡<›€¸CB¤@BA]Lç1‘R@„*%‚˜…áæŽA$Y¨çÃ,ÙPRkÀ–aïuqŠXo[*eŠJ£ªbb # ¸“ݯ0byBDObP`rÂìì”!¡4¨Lp!‚tˆJªT{C…C€¡®“eâD@lIN†A[°´¬–‡Â0°pà àI€ÞÝÀúÇ6A¥„ú+ÖE7üciJTRê¯ø NÔ#‹SÒ$ÀiQRÇ3;çô³•²J@ÌOþÇ< t 2!6÷i<Ö7(ÈÜÞkÙ[F «yßÞWŸ^zDˆÂP|£e¸G3ܶ-ýæs ~ƒà@cD¢§„ñÀ2Z†]ŒVF€U) ZL8G– ‡°ÅªË––Öà+ƒ@ ¢1¶¢À¢l1«BôGP ŒÓ› Ô€Il;°f`K©dÎ 2t4½—îkƒíU°Nè¼¥8Þ­Œ”-„SFl¼ ßœQšÉHà\Ù)C¼Ã˜5 þÝXvó *M¨Ÿb\tc¹JP©À^ŠÏ@FÌÚ“ïã(ŽYtŽ8D÷3íÝ5ž*“@¦Ä\¸Ñ;¹DÙ¡Û‡ü@+‹íB÷ÕÃ3ýpê¼ÔçÆUwÉõFƒ’d jD¢à ö!D'ˆµb`‘1Ð%c7"óxƒ³Ü!7èQ Ò ÐbwÔJaÝÑ«„1`Ñ80°1]¹F)É‹a¥@£Ïa;Óê= ¡±Z+°Ò’3ƒÝãXöÚ'HÀ0½ ˆà4€Q „ÖÔ „xŒT …&ÀÀìsÀõÂ[oŽw`8 €“°¢€þöÜØàæ)ªu¨Ÿâ›tãþMƒ Z½?@YN¥i 1Jbæð–y®ßð¾QÁ„Žg@\ ™Óɰa" % ²1Jꮲæëþ¤ù4¦i÷3!ýö›ž-2Ý1eyoh<¥=˽Ÿ R|)fb|™ÃÚâA"ØüÌÔ|DdÊäú+ÔŠ#Øá<eÞ&"kUÐ" Ô†„\P¬…*Œ^ØTŒ@xtçf Bù(¢ dµJ#FE°@6l„N`e®¬5ÀâD´Œ²AV2C@<Ë2ÂX`Êí i*½X À€$3ÐyQ¾¼‡?¬Çà€³¼ƒAT~÷Ü0ûï ªu¨¿bœt£ÿ¦I‚ ö¦ø 2O}4â™î²ošÔ¿Õ>ýVZ¼RªLo s¼W×^€L ÿIlôâP«xC|² !l_ŽKŸÊË8òÉM!²vV04tÇ/Êbä#õ Ütc‡ h{ÃãHiFGpñ@º1ϰFq¨çŠmܾ£"—mFã¨ëg!ÁbR!Õ•¨Öd`©Àkö\€ØØ*ô·Œ,„CöÕë`°C?êl¡²-·ÙXÄqŒeB§ƒÚ Øq˜ÛÈ€HXˆBˆ±.ÂÝh¡¨¥P Ú¥å6`½åþ˜Y¦ìySæì,(tÀ™ï`Êl8>Ý ÷·‡et5:ØSñ-ºÑ¡ÍST+°7ÅÀ˜ýhâLÔ¿ó ZNžåž{?²âŠ×Pf*‘IÔù•n×ÁÛ`lŸRÙ÷âJâd„ %š'§/Û±¥ÑçáÖ´¼ü4H&Iñ¦6ÙtP.¾K<ÞÙòçl?æ/ "Ç3ˆ é`TInÓ ~xRNË)Kè‚SQæY àšÒ½ 1B’!So‹t&t“”u#zpï@@˜h(Õàu½‘I0Äbü°QÁ:‚AÇ«À±S`ÌÓÖïˆ§Æ ð.s¦¡gÇ€©»° °Q%€BØ{F tUBÄgÈdkÌê,fp,x@~Å^ÞÍ[›/Ïpµ‡ú+ÆA7’ýgº!¨’PÅ?À»ŒUG˜Ö0 ç;ÿ 8ÿ æè)A¬ªÌ€ŠH°ˆÞ ÖíÊ/‚§Böÿï­Snœ_öø Á šÝПš`‚–å9ªv7š À×9¹£ìR‹ÛkŠ?»ÈS¶eÉ«ÌÖóÅçãßUÅ^eÀ*Çk%òr9jÉnŠšŒ•pV`HjÇД™lZ¯•)Á¦gú3fÓ•!ä ùv D(ÈY‘w{¹ÎËCÄ'X ÂLÜ@u ”TŽ“*Ã÷Pg˜|§±OÈ¿Kƒ"` *œÌw:6¬„<ð ÅïïOÿCÑÀLoS;cßo€ÇǀË£P ÝhøÇA¨–PŸâtã³ÿŒ ¤ª’‚°—âdQ[ §l¹cEÉ3/o&˜œ¸ã`šÕâ8•¯cøf²UU&€´“CÇiåØdš0Ìj=ù¶Ÿ‘^â¯Îê (”“@©ÝÆ/ ³ äø~E7…\éÚ Oä vÀ&œðøó?âºT³;ïþJ"rhz˜óT†Ò³’+P kãγ*ðìñ2dec¦’ _AÏ*51€8{gõ:ôRÌÚ̬EŃM¸’Khã#°€C´W ¯„,Xœ– òJHôÑOÍ~  …€M&84a È¤ha{0†óØþ·øsl0¬± ‹Á µ° þÝhøÏ •ê§ØÝhöß  ê¯ø DSYó(ÜñÅÆÚ P^ fN?¼˜€‰TU$€(Ù4µ·»Îz€æú/c%6[¹É¬@I÷¡¸óÝvÖ§Ó'xûõPl["üýd£<Ç"»º¾V'j²Á»Æù®HKt¤¨@FDàð²UƒÏl: èj@­Äœsô`¤XITˆÿ×_rûÁieäsŠdir®!¶J›7.PC&jº̱­Ì„à6Ñ 'JÎÙ\3@Ù×€± ®ÁUC¸ÒLjQ/Ä@VÑá—¢ *WèA¹Ëvq•±€åÿ·Œ…ëíß”=Ð~xÆ -žÝÄÌÿé?JB½ŠiÏMÊÿï4G¨âPŸâ3'ã8ncZ€÷uí')"AnÜÆµmÓ7"BU%“H¯Ñjêϸ& Þ>é= Nn=¿›ÝÞu#sñœ–ù‡Š${òs¾`#”ìÕÉc°Ô5ˆÑ'¥”}ÿqg ²`0ùØ ’ž¤¨8p;–½¯½DB¨»” gu‚$ëe† °Dau6lÃò…pÚ„œÜ $ÁÝåU@†%Z¼³^—Î~ÉòO’»ÄìÄÒãS¶4ô 5×8; Kœœi$ŒÌÌ{«:è€=))CY€zR„ì‘­Àô>Œ 0ˆX<f9>áývçrÖY¡}€]æ<ÀÇ8þ†„’§Ü˜ú¿C0TJ+ÔŒmÉMÌþ¯ g¨”P3~€¬”¹ek¬ˆ˜iZŸ^ÖŠñå¥oS4:š2¼ª*E»RÚÐ:ÜýŸ“îkk×8e‰ƒµqÃ<¥–†€òürW»?L² ’“ðç'GÌT5ÆH·¢Ï~1•ÆæQx)rhàF]”Q$$ÿN5Oš ÙÂ]f>"3wà0ÝÏéDß—&C¦gŠ5J@/U+Ô=˜—j§7Ü+$›Ë;J9>¶hñ¯bÙÝ‚¼7œ$’”p HZÙß‘ð[ýãHà±K ¸$±%A@„ŒE$„ `(^ºHÀƆŸŽBað°ÀâøÀ±þ :uþÀ†¬+ÿ»6$?€ osƒŒ£™è.lAø÷Üøì¿ÁÊB¸^Å8ç&fÿ !På@½Š9ìÈ2ŠiÈè*E)'ï Ð)¶9‡“u+N®J±$`¢±.ÛÞë¬ðb›·ßÁí/[«Gÿ¶×< ¢’ì•*Á¨È¡6PT’ Rûr‹±8óX¨(45|¸YèB1˜ú¬Ð$Fƒ à£SA;Ë8¨€9zˆTw`HÁH4ŒK±Q_¶cÉ„¶VD»´¨h¤,b,€ÑÎÍʵR:$ˆbŠ,±«Á„–X ¨)Å €]EÐ Ð0Fê ðÜ:ðÀ'0 ”x%#EŒŒ¾ÝØÀŸ€BéÐä,º‰Ã6+CéP·â3àÆ2—Œ|.À£ƒH(’I@½'Ó‹‰¥Èð"%DÀŒ¨^ï:G-€D¬9F†Ö¥¤ô:乌b{KŸ¥Th_¤¦ãÞà¹Ûw±>ÇÂ9©^¢®Û" öüãí…‚Ü®am1†8\T«d•¢JŸö ZU%ÁLü(»µË40Y]w$´rß0÷µ Z$$6l ¸³›k°\ÓóÌ®ÃÊEÈrü[µdi,‚€K×zX4Ém)ú K2É[ ŠâÊ  0T@Ê”€#ÈŠ`+enl}Q Æ09™–rS$§¤åHiwxµDcW)1€únNBµJ Ÿ0f±ˆ›åŒÍè+:‰!î "š**ë\jD̼- tŒbýb–AqÂ…=ZÀä©c;”w6­ 4˜À@Ø@†^½ûgÉèºð­(`C†€`ý‡à 2¨C³‚<(ÉZVEƒ°‡OggS@ &¡€c(aÙÿ ÿÿÿÿÿ ÿÿ8ÿÿÿÿÿ%ÿ#ÿÞݸܿA0”õ*ÎM7Ìm… $Ô_ñˆò©Ù“e\¸#@„|À”}VG]ŠòuLI}9Ψ@ö¾Ííl˜zÀ‹ÏÌ©ž¤“:ô|=øçÆBOH€HÄe¦€?Ã={ë}Ù7VÌ"ìÆQˆåÎnTÀŒ3yÎÉeIÔ}U°ñQÐØè KÖ€€¦‚†ÈórÿŒmƒ”Ël„¤³z³Œ•M¦¥„”V葪 d62`CH@ „Ëh$²LVkÑr$즢’@1`$€F-ºº Q4 ši"ÓÀD¬¢`ºpÀ(ÝHþo‚*ì͸&ÝÄ”r‚ÆRfì¥ø0Q½¦ê¾'³< £/΀þ6Û1˜ï ™² ’@ß R©‡±å`½®Ø_…ÖrùBÏrrt4&¡4WRVG ±Ú¼jsº¡D·D¦¸ùåS§´?zoÂe¸–ð;…7Áœ[†Ãšâ9>@SŠÄ½Vò*ȸ›10°TJb…@€¤˜,Œ *Þ…Òb*—2µ‰®ŒZYø|Œ[t{°ÂLÜI2ï¬ ‹^çÏR_<Ò+ ø P€€« Dˆ+Xðë8÷·¦Ih&a¼þà ðϨ쇀à~ÝÐþ7‚*ì©8ÝXö¥C¥{)>æ¥ÜGÙëx¢9)S€}·Q3çôA,Î$¤Ê @TÌŽ¿çïïž "A”`›SMlVÀ‹ÙöJn›oŸ‰?\¬‘*ê!ckÑAáåœ!Ò¨ÆjhÐ]Ý €Ù)Üõšj`‰‘§gÔÐçefŽ+'ú„øšuÆ (*Áõ©NZƒ"ºH¡5À˜Q(Ù¤±)²€ {íNŠ 6'„y@¡ ¢¢ÁbèƒÁDž^$ÙX€!4 $|Éúþ#(@pX¿D&$ PEÄxADC¶À»«}ìÊêaø:ç¹qÛA<1 v€ þÝøÜ?J†öT\‹nlðO íR½?€:i<³²(ë¢]Ó"¨~êŽÎ'ÁŠÐT3ñõ­±Re÷·oíBÃZ!¹í7ºittŸ›{:Ž‘Ì­’Ã|^uª{j½iQÉi@Źñ\ÈD_ ê¯O{µ*bûKLõÒ™ä^‚Ö!§˜R¨†é1ÆÀ’䚎ÄÚ²,iˆ#°¨e¡e8ÅC¶C¨%÷•`D( :€ˆžìÝÀb°( x°Á,V["È10؃¤ê$1é¥od#ü´pÛ·”½—xL ŸÙžb[<Ÿ›XÇá“xà‡‘žžýo›4¥´Gýï¤Ã3ÿm.¢‡ú)þîø`p©-/@{ócøŠŒ©JPpE$€öŸÖ=íQ,ö±øëïçoFÅ™Óò—OÃZÓ#‚ô¦Qu¨‘óóƒ® I 7B£´“¨Wq.ºaøÏ…D­êoü´ƒÈV½# užýžvǯS°zº~'sÎuóZB¡ ”m{Ë1Ü¡þϳœ¼b6nJmRÐñrp*ˤƒÍÞâþ—R•;Š =KH…<¡ÖàKW€0s1#‡Yan_þuX`:©uUBS–0Mu­ Y "´0ô0Õ+(™¦„Y-‡Ô/à$z²Ñ‰8`åFEdt¶6ŠZæU¹P@@ ®6RïØ ŒÇ‘—c¼N³ ¨"µÁÄd€²›´È5£†µ„À„ê© ô·¨rX ‚8p”Dr ƒ)ÐPÉ ì‡Ç/ 3À80~÷ 74ˆÚ.%‚ú)ÖA7Tÿ” JBýŸEQ”‘Ó¼'[ó‰”%‰‘Þí(çs¥¤WU&IêEý>ãíê ÂÌýßè_[ Uadίĩõšì>´R¯Z稆òº'UÝØ#GÜPvqÛ'Ù`ábVdý÷Úøv§¦FGê\F; ¿MlÙAÅx‹àŽ=äñèÝ“ãOqÍzZN0OƒDýß0Š «Z+É’Yùê¤ ÒAš~M@ˆ+ú QW7JnK†K!êä a¡#‚Ä+ü-œ¬¸" -X#ð€iç1€ùä ïí0?Üg°~²€ÅÀ†e v €€~§²þ+k;5ãÜrë¿Ac(¤õ?@•X'2_?J¹ÂkÕ@Lºã0VÉpjõcfNhŸeª*U2 "{Ôœk°öTˆGýŽaæjß;|HƒÝU•ɹw‡wc¹º92?/Ú¬NT#ï—‚:jþº'Àû&‚F\Ê^Û‰íu§ør÷ —£.ìËxYâ)Ú/YUpŒ“ïÎå†2ƒOdï7WV‚åÅ4£—=ìIDî1 {t—ÄŸ Âw7èS1’:KéÕ·AðþZb@ @+°ÀX``e<‘B¹èABkR†òóÖÃX`—Œ‡-ånôE}Û©»ézÏ–e†±˜cƒÆ,@I&ÜAæcÅ…D@$Ÿ¼¾b@ž×ÜÐúPhlÇõ7Æ)7>÷'`Pí@ý‹o@{2²YûÙ4˜Þ-д|ºÍ9Ú!¥8âU•R)E£Ûn©>Æì`öQ{Ô·º«a–ééüäpZÙ/”2}¬1+R&ÂTcÃôì¬ÉqÇmC€PÏÞµ® *Mï_Š @îÖ^tPë¼ (œËŠH(—Æ Á©Ö@!#+­@€@˜xBaˆ L ¿bPÇDu&)A´ˆ0K°®¶A4aÀBØ%Ð#`U†V ò­ðÔÌoV"4ÂM‡Æà`Y`œÛp>°õÀKŒá=Xm¥‹)"]ƒŠ¡" ’€%ÞæÜHøL t);Ôgx{n\ø+B(ú;ÔOñˆ¨Í~z“ONx‡I]L&˜×47  ˆ3H1³éE©ˆÔT ˜TÈoÈYÿ0ü+€˜²ä-gî$T$Òªl†n*§½ºÂuJÈQ L» O†½ ’Ãu;_rADÑ}gfØèã2%Q‘tjL–Pm—‘@_lƬ¶†2ðI A©' ‚~+ lQ ]T²t °3ÙV*#4z@‰ eÍ‚¡¡³†Y ÔBZÝb J‚hH òaÕ›­¡A(¡`…h A LÈÄ탥PÀaØM0xˆ&e€T~÷ÜÀúTÐUZP¯bt#áæ!*L¨WñÉÍÖéÉ2jZ Ì÷|ÇÓ™(ØO'Ï€Þ¶ç‰øŠ·ˆR¦˜ˆÓzZÍÞJž’ÂJc»¢”ªÑ=Ûpr¯ßÌ ©„sÿ0Û•613þ>U´Äræ8æE¢ãúæ 0?níY;Í j%<ÁS©‹ÑEˆˆ€a!ˆSÔ=“7‚*îJa‚|ÀBCÇ0%+ÅÙ è0-tX ÀÃjAAÒ¡dŒPdƒk09i…²()K—Š‘˜rA( $@–Pˆ4Àˆ qáB‡ àÛ ÀÀÁ0l„ƒ   þæÜHøo LR!¡nct#á‘’*%Ô§ø¨ÊL“ç5 n|oëh+{€2ý€io/`š=ómVUe%$14n©ƒÑž§u¶Ÿdü÷-a¼)eæ½øf] ÃÕï€@ É€ºMü¦•ÉgXÊÖÁÔn6ªÔ] VG€Š<ó{›`†'¼»d:·´ï¡Ä WQh‹21Až2ÃbAcÁ .é»W {nè€Ü€ye'd$&,x ë_Ž—DB ,PAh(c £ twb`Ãô/€‚*ˆB¿#§CÀ øÀ8ÌÜ€=fÀâ{À+Kâ¢NðPþæÜ0û_¤ h—êªxöܸ¡ÿb „’ S¯âàÎsÀ«uN¼@Ê}ú1†X #!UŠIT€x±Ùtjþt§ÇÏMÕiŽÌÐ×ù¢o2ÊG%n™‰}Zó9CqÉ%û·o Ðñ>ØPgQVÇë,b;†)ÐÌ4¶X{–²@M¯Ê –/?¶n$RÇÎB+Äì{ k)•‹JpÞ¯ZÄ”GcéëÚ¾ßFÜ`Ó@^o !o`žywãúî†Þ¹.Í áVA 'V@`ôv'ØCh(4  8‚À†š¢šà0Psè~<®aøà%Sž 8@ˆžöÜÈÀ¿@t]rú¨×ØöÜ„üÿ$‚HJA}ŠÏ@^ÌÃÍÕ À;´ÚC¬ â ¿où˜c„8 Bª„T îåÿԱ߶€8 DòÿßÊ U碛ßò:°LG`wñK}[G /œ:|êE È8ÑÀbxß.w•Á’žÛº’SÃfó,Id£(L&h„LŒ"â ý5!(|R×5Шc-D”´Ü¼`TRc„iÖÃã°ìçÜP-È$â| $˜ÓÌ‚­€3’ ìÆ…!H å­LPÃÆ° p€;‹0¦ €–!w°Ž/°Ã뙉Ù4X»XÆ/À€Ã»).€t°Ä&0rÞÝXþŸ ª%ÔgHsnBþ¢‚ª$Ô«øœMô]YÖ; ú:šî8 üã÷bJd <Nî{>gk^Å eŠÓŽÖW‹ê+㥭»l éc•.[t€Øþ‚¹`{ÓS)a˜É!ÈåI0d¶ ×møÙýQE¬ Œí+² Rꘀ ûFÈE!Å`±^‰ @˜#-°õ`XÅ1tÕl28ÇN¿MŒ~Ã8æz!P8l 'i7¢ £I¾Ó­„í4 ¿E­ a[ÉX¢,€!Ù(¶-P hÀ@C³J)uS‰PŠ)`0,÷´ !¹” À0€"Àî#(‹POggS@J &¡€c)¡Ú.ÿ,ÿ"ÿÿ/ÿ?ÿÿÿ!ÿÿ%ÿ.ÿÿ!ÿ1ÿ3ÞÝHö¿"Vq…°§bt‡þ'½!Tp¨¿âà®úáˆpn»±¯ÛLÕ œ¨)S ù òøZ¾ÎR™Ï[m Ó…¿t[6r¨å0Žƒ‚VLî™}ÛíÎ@(MYÜ ú§”Y}³×±Õ5:ÿ¾´^BË HˆUMu8¶^HËä@cʧË=›Þ ¯b6eMýÅÅ €Åç!¦‚QÁál‡…íöª²;o¾É}`â„–‚?m¡”,"¦˜ª;ÀÅ=’stì½uï_½u ‘;~kÀ ñ<,@B,[^ `´`HB,tFš&$ (˜ôà´akˆa0õÓ¥Yñ{ÃÝÐÉoàý\ŒŒ`€UÀÝHøÏ º‰·þÆ·èÆ üã E¨æ`OÅ CŠœŸ~{L ÙM}M꓌CÀ’ ÀØ:K ôè®F„Ø‘¼ôØ $ÐfíN˜X€à³»–xPˆC 6€ÁÁØä@HnUštvºlKÆž p¸C1°MO5'h˳°_ÞÆÀÇF >ÝHî¿„ Ôv£ÀžŠoÑ GH$u]G½  ¯u¹æ2&H&&&Aõê ncns›­ùPe )šÿL#=¬ïl#>‹èéýaæÔk%‚ÀÅhY~¥þûƒ¾ú9@”h¥S/ÿŠ/r*M.ëõÝðúbЛӣDÐÑâ$› ÍÈD¦ŠÁÚ“³HD,Ú@ )p4ãžP”A# V@#¢·Rؤ¹ît&   ŠˆuDÒd­+íæìœ„Ú{ jQ@5. 9à3$vŒ3¡>T€Šæj!€ÆÆF¬jÀ²°M“‘šVX¬3ä÷¿¿¿Uo'zyn,¬…}àüU >Ý ÷'.]»Ù×§øÝØà¿ P­ ~ŠG1Ѹó·8I‘Û¶eÓ×Nr%D@‚¶ÕãøÆ¾†›¸ÚÔæŸYÑ[£(™OÊk¹æ^¹=­K?ŽË¢õ”nHmN€—øþ`£à;ä­…ßpližƒ'P<Ë¥_N,Ó£èV]&XΪd²ma,€(«†&„Ë~#EÉn‹ÈŠí>&VÒ4{õ(-2J]Õ¬‚€E@mÜú Ie[8Ó¯F€Ì „ãÆ€êe@B¡Áx³'Ù7 €°N k2à,€‡[Îð–(žÝØàŸ„®1•=쥸&Ý¸ÜæATI°§âà}2VAŒÇç äh囓iYk^U™$*0õ@ôÜ€keL A¥.gÈ“átÅÙ³êÖ Á¥äƒjYòþKa2䄊t–ª6N¿öQF ³¯/Ü“ê8«)o02®0*(…éÌÃX€šXíEn-.=+g !V!Œ…JE,ë£AÅhÁšR,QËGcˆÞSÛðP &ïãkdÏ%k¥B/°QXßf™}pã,ÂNì „·Ä”š\ë@‘ :¡L(¨L ІH2=X€TA€B–Â`jòjØ‹íøðSv}ݱì(ƒg|y  Té1ÞÝHöoTº*¥{)¶E7Èÿ ôJöT|rr"ã™RÔxOÄa¶ôy‚â¤ò• €(¯^ VoË9ë ‡†bA Ôî?6;ö”VÈǸ}ýµ‹‚¬µRÌΟU:rœo¶7Lîäþ ¡ƒ“@@Fã”å.7/ƒ)êRÑš©¿™+`Â⡨ ØG\ÿã$¢Ïؾ"‚½{½r‰2z »àU_Ñõbú`À¥Ö::Šf<ñÃ×!ä°ÞàÉþ¯Zt@ÿºCt à´µ ‹–˜cÐÚcpñd-|²!@Q@Ç!„0I-€…š ÕŠ¦/e;o,á– ˆ+xµÃ3° ‚ Óhv ¨|6õÓûpv¦1Ê´ÿwŸõ €°x~öÜ`ƒŸLCè»”õ7¦E7~èß´@„ öRüjC±ªÅõT§}Oe<&{€ñ„N'À Ï !o§wU½ª2jÃÂÚeCxKÔ¶dÌQM•†[/õVGÍ¥ÙÝJ­\É+2N×VšÈÑ^A¡ö?—'mO-¬¸Õ8±@ÊÕ¢® …Ùê×sˆK²(Å"´õ!v€@’f沑MEˆQòÔ„$Ð7Ð÷š.ÛdxÆ$`* Pb€sÃ>qÏøú'°€ñá½A +Æ@X—ø’Î[æ(ÙÉA‘S‰ÒD7nˆ©àvllÐ?¾øÜŸõMƘópøÀ{†݃¾æÜ¸ÁÿÉt‚ õ*¶A76øÏ,E¨äPÅg@ÝÔŽÅ €;Çâ %}Ý΀³H¹é+ŽƒŠT•)Pµ¾\ig4aH €èK,ý)Ò‰W( cݪÛüîhTxmþ¸çâάJ¹I4·ÞÛ–|6nÈõkÊŒ7Á5£MôC•°#?ÛÕ¯S¦@sJÀŠÔKÑ¢€‰Ђ@gŸ=E¨u€j¸¹Âž êÜG°ðò ™×Øp ر±’Ñzý¯D;RíÎ_Ãw7W3Öä0­¨æ,€Gežo Q èM‰ú@€å´jØ.C€QÜÖ’ƒNQögCíuÎí°¬õÏóxL·8 ãÎ`p$þÖܸì?£NP­CýÛ —ÿÇÓ• FA½Š?€…ˆò”9!&¦yOFŽÐˆWxjiŸ¹Í9gA5e¥™ÊÚÙØu§É!Íw’Í·^jÈwωï1”õ˜•À±Ç"JðVO „Éc›–c,Óúsß½˜ˆƒ6Íꃚú¥ãÔô¹¯Üž†ZÁñNÃÇyê⦡À ÀÈTö<Âت;]4m°h±-¦¼Nå6–á‰d¼ñréØ J°¨@|z§»Ü$cI.§ ›ãÈ „ HÕÝG{ƒdú˜""£Ë"Ð#шÆÀР ƒÃ{ïÍÂÃsøü‡!3èÍÀøÃpxÀ_~ àA† á^pÞÖÜXöŸqd5J ê3ü=íÿeWE¤JõSüÁ8<}Ê:w|0Vï”›?—1¢¡UU¦™òB†ôL»ØŽ"Hö¾ïYÛñ¬£d@ª5F‹(ç§²·õ{d`¤…Œ?¸~˜¡m•¢7np†„J|}Y(¡|„cÌÃ`‚Tö{,É ?¥: °N3ÄN²7ë>ÙS`Qû]‰ Ž€*‚vT‘’B,“±M¿Ð’?2ûk£{˜(ÀÐÑ&×]=½ß]ÆUú‹Yã,ç ƒ°¯õà“ G!§DÀ+æ ˜º%„Xi) PG¦ù`=‚¬Ç&˜`›Ë 3«~Øuÿ¼·œ%´°4ÿÆ:y%¼N4OggS@ &¡€c*7›iN ÿPAC@MIHÿÿÿÿ#ÿÿ*ÿ!ÿ!ÿ<ÿGÿ;ÿö…ܸì¿Û(±‘ÛÔŠcÉ©ÿm[É:¥¸fü¼&òrb[£ƒ\@¹%[[«VUCJI€Ð:—‹%]2&Fïl oðçî9gµfH ¹º žÉS€]cå½ðZÑáwýâʈ[somúÝ¢ê6͇÷mij©zD¡³9 »yj¹Ïëb[qœ»Þ4~ègGcÂCÎ鉕}ã=õ@ТkU¡"¨ý å  (Íö»’T…ï»öÃÔÓÝÛ\¢‡KôíaA®ºgg÷–ú"‹Ã~Æ+Þa ú€³o3•£¼¦`Øô¤hP÷ »Ž—È”iõ4NÌA£è,Ëã@ (ÄŠ°EŒd¡`€ÈH8€å,†±Ç:·`0ð·x(Ú‚–üš†FÝpáll#3Ë<¢ fÍæAÙ`üœªwäE¯þc£.Ä"zŸs×ÛŠXÄ©·®ÈTAã°ã‡­e¥ã"·%É›×"jÎ?®¸‹}£p  xu 3hÔA¯ûŸs©…ÅÝôúÿM½š@§«Â;Ýáâ¶$ÂŒÀ,¿·]_¶(ŸÈpíÞ‡mˆáB ªùákÊr@bJwüc@Þ¹!÷ §;ÿjÍœçŸÝ{uÕ%Ù äá iä«£$½ÎuNÇÕA;t7Äu *åÄ|­iýÞc(LV}ÿØ¡ûúh—Rï_"Íýþ×@qàÜõ_‰¸RÌv=wRÙwã‹·-âÑíèÙ<ú`VŸ~ÿà#È)u‹c Ò™ÂU¨èjó£B±\Z ÿŠnýoB„j¡òêÿkñtc׎¶bØAÆa)‹r¥dÚRÓj]Hέ 5NË ³=À´ªˆ6’YG’ZÕÊ\Z}ÿF{èŸ@ÉÒ¥Õû¯åÊ_@ìo°J%‘ƒÛ™šˆôêd¡j•Ú…ÏòÂzés]UIP5­F¸ÇAEf­Ý à ‘ >ÚÝHþ×&¥ oŸºêS\‹n\îO íÒ„úŸÁ¾¹æÙyqÜQàÖ2hƒ°ûîgEeiâT•I &™•²©k9AFòeåpr:9ïPOªí»·‹Z릑—xç sϵËP®½|Ç7!ï~â€z'*Ãû=]šhàä€tܹ †ŽÌû3 õb©vI웥ó=Mla1…€4¨•P H…ö/“£íˆéJ)¤(¢$LiÈ”h”akUlh1LÐ &ÌS6B€, |#"Ž·•N!Á>BqÈd58´0 GM… ‡:t8 4à¼9<‡À²Æ,ÞÝøÌ‚êS|“n,ûo€ F‚=ŸAÄtÕf—Ù pgFbAjoûÖV­© ’„à8¦í%ÏV‚¬Œ{ž6g©?³P˸©*ßÁ¨‹¼­ªb‰òëq©O)¡ÀØ(à®]Éë1+PÀQ€™ûÒV Ÿ´Ð¹ÃÎ2En •Ñ&at[4.©XÁ¢Â=U#,ãÖŒ`²© A @@ÑédrVS±“¼,F†õ4Ä@€IŽœŒ%‚p$‹  ¤1 ÊHNj'&†$2Ð!ØÅ%…9P(v¨!­‚æÞo;<0p À/4 ¾ÝÄÜA™ F½Û¤7ð_\TI°§âà}¡8‰* Fo›ÓÓ¾•T5”I 2‰Qˆìï²ö]ÚUeiZ;ÓŽÒ¿Âüi @Ý©¥eûÙíãqÊÞmd\F®Hñ°ÍîXîÍ ±H‰H>÷Ü0øg DŽR,„ºë¢ÿB%‡ú= æ&uaäïÞÔóXí3 nÐrúYoBˆ7UB’I@’")Û¹ò—VÐ’¯õߌ¸ |¥A£s?J(Yë)gs{É b”¬H˜[‚¡@%+ÕxbV)ÂDmØMŸ*_€"L`[ÑÜ8î¢`d³"¨®ÀLµfr¯R÷@ÖÖGT œ9ÚíÌYN£Nï„⬠ЏSkÝ`V“«BK#mî­|bXÒÄô@¥oLWEAaaïΞ6 ¬vP l3vF.„(RÙš•å)w±¯ £·ïÓûéZÍ‘ª²à‘ô¤9QuXÀ\¯µÇÄ“xs½:þ%¤4íQßçs#+mï4igðq(@·?+4$Xy¼t’‘÷e-P¨÷WÒ*ïÍÙ9wgç£]nòãþB@¬GP¨@UD½f™é Áԭ͇ˆÁº4³Ü4‚ÏãÀC€æ;6CÖ'úEEÄÀɾ0bc€T§ó«°­,CÎê{%ibí+’Q„ h:Á Çû@d¤®ìÌ DR! 0„`© ž_fá8pàì¬0ÀðÅ ‚5’¨„¾ÖÜp`óB)+»^Å6ç†ù‰W¥âÖ§ø2ê‘Ïj©NÖ#ì¬f…¤xW=‹iµ/Àu»o…(UU– @† Îo±RRµ„ÓkßÓ«˜Léõ…cÌËZcAáÃÝù²_íîísš8¥zýäV²Â¾ÏdO5; ÿå`Ÿ”ú¸4d¨À»ÆÙ™Þ¤ëÍÔ²BlôÞ.6çžK¤]%JÎ=6+« k€ýcô!Õcf2°ç,K‡n€ʆû¼ŽLëSyþP (‰G(V--aÔnD†JJ…19Vh¨® @$‹[pCÙ±P(2×ýg™aúó€½ðXê Æ3åíhþ’ŒCÓ¬Aýk>ÇÜ ü/†jõ*ÖA‡…ÿ‰PÅ¡>ÅÀÆŽz;Ó¼ïzÖ#Á^•Þ8»ïâS‰9’¦ª¬ êLeÙ¯Û£q&g|w‰ŸÃ ¤Hô¢«5cú¼þ¦W €ÕãAúûm€²!3 ¤i—5?@àT´ tî?jE¥™n×—W.©Ê|Ó_‘U5Šb2vܽP |!:¶ÊtŽÕ“<ÉÌ ¶pŒNªw—'+˜:" œ$;·ÙØgVW§’ Vc-dg#XÄ !ÑZôá®TÐ@ƒŒŠªò¾fe‘t:!N €ð‹ÁZÂì眷Øt¼ËïgXé–áXx¸Às(M@•€Â%o*¡~·TÿM’ŒÜNª¦nãÜsxøo±”„úmtóñ”¿{&O†=Ä~r<Ûö™Óá„M¤ªÊÈ éjÖ~Zwr—µŸ7­JZ#à3EUKÿ–²1C; 7dš3Ó©ù¦¬Z$µž]b½g¿5Þ«-*±×æÑXÞbà¬ò4[ ².àI{dFX¬Ò’ — åêüfºL‚éÎφÃû?Q4£ˆJª(ƒ ©@êðhA-•Œã2Ì`ÅàP¾@B ^°ærÖ2QZ¢ì #ƒ°pˆ€¨Àh€àx° †qÿ± æàjÜ‚|„;pu¿x¸BIHšä’r©Þ¶žù›j—=ê6¾97 þ'‚jÿï[SÒ8V:ï dL ÷Ýû9FVUBA1$*‘X.Ë:ëdÛNö yXÙæÅæ‹†‘ëzUx~ALwy‘ÜÑ›¥X?ñÀr½õ·çÆ—ímd<³óC+DýWfe/¥Dé®ó™ŸßoBºm4t` èù5í~à–2à íbk×½ùÁ©[à®Ôðä›Ù•D_€KH8 Àd€¨ Tƒ2Aú IܒΉÀˆkTP (1ÂNB0øc‚0RÈT hhB*@`ˆ12rpÈäÊI¯*µÀ€ÿî€á°€í˰suàœ.œ@$ i0ô$™DhV±½’sw¡â€|Þ¶ÜXðÅB¥„šâZs#ÿ; TI;êªø R]âi'nx;Tó±*F8uºÏ|kkÓBUe( ¨òÝô~ÕVvççŠÏ§?d¨¼cÚ«˜XÎ÷Jг‰â5E-¡Ñ”ƒ‹_9j™b"¿ì B YÑ_^iS›(.+Ocà `.õéÁßd˕ғ@ñº€®’iA€´PP&áÀö Sz›O‰OĈÙ}Ê,’ýj"è÷…^¥Äd]ô˜ìN*ß"2ÉŒª#´§jNýüÐ$ÓƒL“Pè7Í5QÑì pMá«  wÄhë·lˆ%¨àh¨Rì‚Z-’‘eA5+Pø“1–ÁÁ<,ܦ¦Þ–}«ž»³ØfÀ µñ;–­cǪ¾³ý‚ÁePÝhô/I‡vgLE“`Cà~‡Ü ø?½œŠ VœSËþ—£om õ? =SfÑ‘§#÷¾HˆÃ)Ws—ƒë”((çle 5uU% Í Æ|lÕ\FÌsN7]›=ìçòyò[ÕHðÒƒD¾d‘2Ð7˜‘@ÐÐwzxÛÜü””En ý¼Î¶Öôá³uCzAÍN{ ßšu£óÎDHî:V@Ý“Ç! ® è °Á| !Y¯N´$»ö8ÌNÛî!hP[y&çË]ø;êõ[î%+Aö'aWI–[ìû¥ó‹ –(@:0jC§gÕqSíú}PHŒ °ai@س2€pa <À[v€55ba5E& 0Úc‹}Uh0ø¢ MÚkd«ü¶BÁÓ€øV@UK8ì@QžÇܘò%ÓTšP·a¹1åŸ!ZÔkü¹Æ‰©¤uE—ìœ3³zºªªÊ‚ˆ Ñ¤»ÛåOµ\ç˜<ü§ª 6@ó Àr³") Y2bQ„_Ú1“–‰a ¶îh…[Ëã°¦E,¡aY)Ðî¬Ý‡ ì»OÁôÓ â*\¤®éRÆ€TeA¸Wª`µœpAÛqëËöñV©ZW°¬C’`ÙDÌãÕlC@I4@Sˆ%mÀR(Ú9>~ÿ+€Æ`Ãj€¨­°d0ÈPc€¶„#9ÐØ 0†Y AYßë¹Û¶0ŽÇƒÀ$i¾ni¼ƒOË,ÄÚRÞÄ sŒT©ªæ„*Kd"d©fÒôñÚ­*÷3ì$Ñ¿K¬ &’,êïã¶Í×Í»3ñ_6J.ÜJˆSH#PОâ´£$T’8ÊÒN:·¹¥uEÎpRÀTL[o#Æ^èJIÍ£EhÑ©J¡W]Ó²°j BYICž„çÂ$  @§H`,$Ä­‚×cÖ€‹†“j0(l€ad AÎεíVúK¢Èî%ç(A¾]’Ƀ‰BLF˜ƒj,Eù0˜e¸…Po=,³”NM¥(¹@ >÷Ühø?Q‰h5ê§X÷žù7¡v õWüqjU¶ ''OC:¾ñ ˆ“·–Eß qtY稉cf´ª23]I>jć&þ8š4 =\³az<íì-kƒŽ -+­~¼Hýœ¾™ÕÃxÉj]s€lýôœz ú¯7BT $Æ`iÎà® öFAê…ð æ-²W¨€WÀ`ŽãtEq?D&BB³ªÊéyuíÙ®Éiªu)/Ÿ{JG¦êTè“§²=51‰^rkwú¿ämïz®L#äÔ‘QBnŠÍšà>Þ9Ι5ö‡wα¹íÌN³uáqWc €3}âÁ”~þíZ=ë¢Ã3ÿEHD¨â QÅ?ÀiÐà o@Û~ñ‚M¥ªÌd’¨ÔÌ•§,S‚CA@f‹¸|­4jLóðG¾²®æEšé”ÇÈÙÑð³(¥†bÒcwܯ˜qAéu –D†Ðç=ˆŠ.E‰téó-è2Ý-D3’ƒà+mCÈeÒ½Y³=Έó/·çN¶]ƒ‹‘DV)6à67€‰ÂXê¦_{Ÿ–†nÎà0 0HS$p´+ D_ø»@q" ȘâýÞm; °XP (-`‹6œ†Èl&|ã)°aµ ÛÀD ‚ :©0û‘ØÁrüÎ9;æŸuáõ`XpEž þ‹‚­ÅÔOqNºAæâ ‘[“ þŠÏ@LÕ‡¶y-À;DA”€ºÝ/@½áá¤â¨ª$1SEsΛ+Àˆ;£Ó0ñ©™êU˜žÒvåöw4jp€„æ`j¿†·z°+‚X ~&eEh»Z°u/ê°ñ¡Ò=–žgTˆps´Pdo‡=uT@›"›t'c´Ã3 ¹>ˆ¥YúAÚ=­*b ©N¶Ëqó[#uˆ„w²t•ld Þ·›ob2É`\J“ˆ‰ã¦ZXXT _EÙ–9ô4` $è„ ~³ 8ÀYÞZàOv¦&vœk ðøZoX X¹P€>Íçþ ¢¶O‚ú)ÖIó™‚´?tI„ú+~@Ät¥ÕË(¦ê"£þÑM@To Z ¨ã ¸y 3>kTÍT’”^®Un qÿœNyz°×"Ûd¢8÷ú`6›¢—ã…íÔ„¼N6uêc%dW‚çï(çdåóe¼ú¦€¡h]VNªzLÛ¦®j¨jZ@§2´$`ú½…œB=èÇ(€@£}ÖŠTã¬Â¾Àû­į̀ØÌœŸ½_Ò ’èïÎȼÃG2Ë=O@ª/cft€ @°!h==Pè²Ø,“PX#A;¦ ÕÀøÇâ4ÌÉ`”Íý]qps?~õP0äáÓghœ#ÁCzgþ–Ý<Ò"-7§´óÖOñMº‘ìÿ€?T!Ôßøxó ‡XàPRø‘gÀÃòmÔ|4L«$ (”Ù>Mpø1-@9Ï¢nìpÔØi¹ ÅG×FdJÇðJè{v…1¤«`¢s-åKËãÍ¦Æ¥Þ Ÿâ£”„ÚxXeôfhÚ¿~ éå¢çõÝõ^ÄêYo ¢ ‚ß¾‡Ä"#xwW1¬;4†9iº5Ù@%¥à€ÍI¬ÿªŒ~¨YpžDTûÄ^ékV¼L%𠋸Â+´jí˜*l*naÓŽ%ÿiR@< ‚xlÀ´‚  »ÎöúL`3®†‚àL3ÃVã°…7×2   >÷ ÿ @R×%9ÔßX7ÊþóÓT#Ô_ñðî1/6ÇÀ£Ä‹ÖøøÁÜ:}VJ0 K€¨ D¿ƒ/4Syë4åb^¿†Ûµ2ö×"YÓAè‚èÔYi…v<®º|z0X¤’GùŠ¥\𙆨ÂQÓ‡w) „z’¤çsvyØ;µøá ¦O¦Mv¦§ä›5ú¹–ÞWôûùYÛé2P’(UÐÛ `<ƒµÍ9Õ Ažfq³¶Ð#`DªÉ6r>n*©®9¢÷×€] ›ã•¨-i˜E–ì¬Á@_¸€¢ú½Ú°ª"s؇ã±·“bƒ¯HäÓsö:®xý‘Ç?<_JM0>÷ÜHæE¨éPÅ:é°àâÚ¨¿ñ(OLÚ+îHÐ&¡ûÐ}Ïgf k5”d3åÆîeR½LwŽ#gvŒǹ³ðý§¿C]éŠbû*„‚/OHuøƒd ¼j¯)_Ä)<ÐÖ Üès²ø¨€B%îÏî0x~æÊI}]€8|ïä»J;0ýC¤CVçÝ®Ü<å¬)"é¦nOQ g+`…äÕl€5ˆKÀ¹ÍjÅléXgöâËtv§€¡'X0ûü÷-:2oÑ `½ F€ò”€€° ,¦À0#(œSNè¨%bf€ r¬Ïq`êÞÇÜqÿ Xnv®êúÆë³ç÷G,Úãù…PžçÌÙÿíˆØnÈN¨>ŶèF3ÿà?à?Ô§ø8`P^€Ùçô%ÖPUŠ äZHÌsá™–n¡÷S%,ÒÙ\˜äB0âÁ_þTŽðÌ‹ŒØëeÝ3íîÙ~-¿ÂÄ›¼»À†† Üg‹»¿Ù?Wôå’uñþT÷z é]„¸5Ò÷ZW¯]u€ ¦Q32ðhüÀGƒµÞdÌJÔÐŒ¿Qlî¦ëë ùçnù V«î| »°ÀsxÞGŒòš'Ð<ÙC^·þO´öèUê3î1‡øÿ±vÉ©5ň§D¯Š‰y%èÅý“¯}ýtåX™o‡ˆ®šª*¥LˆéÄÙïVêã ®AÍÁØßÎ'ºÞ ÓaN ÒØ1™y>³‘<ÛIN¹`# ˜–ˆµcOA”yˆÆuú8òo½R\}{E±^6¡Q°€(lÀ:ºÐìEag ¢¤lŸÕ±gzVÃŒ«™øw§°¡9LF ^-ö¾\E„d%ˆ"­jÄÁ¯­IH€m2@zÆL¡pNW[¿ª{ȃÙ@8S+4¦wfïþ8Î%œ«Å•²áÏaÿÓsη﬊â±!ò—$ûØšZZélT2P ¾×Ì«¿b3ÆÚZ¦õ3æA‡¬?‘†)WûÒÁžŠdô2O`ÌàöÉk»^eS@ Û¦îL¡h¯¦RR€¨ÔoG{quÙL×'F®$>†ä§’q æDUŠô ˜f.EUÙ©ˆBÛ€ê;ÁÈåò{Îå•:Ù®‘ºóqpÀ@Þ^µŠkš'D )ɶFŒØh«ÂØOjÒ œ€ß…Æ!•´(€b±¡úRM`€–!Ÿ}Õˆ`h-‚´‚ÅÄZû¾ÛØŽDjÓu¡Œ§>‚‡$ -`aa,¸â@Ê8 À¸qÏx°y M:ÿìÆûømÀ€gÓx :‡!U„YBBx>×Ühö߀@¥ õ)Æ17ü R Ú‚ú)¾“…ú™77ν—k™¢H“è$ň}ÎÎAL›SUUC2Q{ɾm›îè8ÆÙÖ ›¨ÄBž1R-†ÅN7´j·Ï*8ñ- ‘Òuð©_Òå>t·9 #™[ƒt€ª.äìD^´ô…ÛM—"°I#¦¶HI¬êZ€™X’†ßÍblņÇUè•AÈSö4£P‡Ü`@LŠ:6ÀB'ˆn HP±„` I)#2{šˆœþßtZM²€¼…I N‚2tbDtØ0vŒø)ƶeí¬;xÖÃÿ°›˜ë«vèId!Œ‘UpD ;KÞh ~ç"%7‚¾}Yê¯X×ÎÿNfª-¨¿âàûò4QF€£+äèŸA2“6Å1©*¡ HÈ ’ Èx‰flÒG?‚ÚiŸÇY/æèÂyñL³‰ëÉã8@u4¼A§Æ™8‡ú‘ °ÁtˆÙ»! jbWÉT·ãÿ”ú;‘‹±tÝçç` œiSæsê?ŸÌiEôˆþHŸ!A2du@HO!”ú¤Û €-P0Î ìU°À}„0Àà>À¸ëX’SÃâ•®tâ bð“΂ŽátF €DSK74mƒ0JCª*VD†À. LÃ`þ“¿¸Ž/žÁ:î˜áþ! €1BЍµö’þÖÜhæß  ©¦~ŠqÎZÿ E•‚úץܭÖ%Á»õ~P¾ÙJ×ê=.).Àu`÷Ã/êU•) PDÞ9¦(3!§ÈZû´Þ£˜RPÌ53¢?tûÛÊ?›è2ŸÉAQ©÷T9_³ù ðÁåÆ.Ènà÷gw,T%–’’yTeÐ({9×›Ö˜·±²ä¥"[rÈVô€„D`䀴«A!D­ÁX «€q†#3Àˆ £LÄvp^£Zkž…¢°€ÉõöïK ˆÁ€•(H@ˆ !HBÀ* †^Uºr•( „@a,Ðc¼õ<þì5˜CÁÂ6‡ý›gϹƒx ‹ 0gBЗ xOggS@ù &¡€c,ý¢^ÿ8ÿ>ÿ!ÿ+ÿ,ÿCÿ4ÿÿÿÿÿ"ÿÿÿ>·ÜÀú/H‚j…¨>ãsû U&B?€*Ù—×@ô·~¯8*K=h}‚sB^Xœ·os× ®ªR¡‚PQ‚HžºZ—äìû°÷wêéÕ.p{¯ÊM?¦ïž;èÓ·e.0•‘äÞ'/ÓRrÑž9RëK”1Ã*šbåõoQ ”ôÙŸÚŒä(udüà–xwÀPKL@ÐÆ„ƒË;Ûr é.•§Xâb@êßž—ë À`bȉPÑ[ˆž>oLb`j¬Ÿa¾ƒ({Ñ’ëL–-…®šjüí7?ö ìtØ`c% …Ê^\LY¨ ØpÞ`ãÿÌðÜç7Wϯa9|>6S:çp‚d¤Ž¡nýJp/³é[’v(Dz~ÇJÆÚZºqýã–³ÿ:AkL¤õ~p8Ë+-’“Ÿ¼8l'(^(/@î`Ë|/^CUU) 5Ó¼®;~y½+Ï÷ìÍ}ºJâØ¦„7fŽ×æP2åºy¼(G„ ¡y—]À ÿi€¥Z²,«2–:9ÈkØ­–%!]Ïý< Ø‘ã𔘖ÆÜµHi´ÒµŽˆ!À°ŽyW (çˆò»NXWÅ}Øôb÷OÀæÁº"ÈÊøÍu¶²A°a‹Ðà_¬µ«‘eÁ* ¤€#€“<`Ë8@„Æ!8›xƒ ¡²P…C-@Pd€€]ð,ºøÆ¿™•æ °Øç‚Ô9ü v“G ÓPi€ŒBP è6âA€b@>·ÜHð?A JAÝÆ¹ç†Ù%¨’ê¯øâPWŸ0*Gˆ1F€ùôwö-"‘û–϶›HM•¢Aå|06þ·Ü¨ý?Á [A}Æ:è°à¿X ´r¨¿á(Zõ:œòpW:#ûÖµ­mjJ©AÜv…]ý'€F1]o?É`b”AXœ×s¼"ö“5ª,òL2ÔW¾h1-õÎ ŸÅ Uµ·ƒ}®‰ÛiÑ+ E¾ö.^þC§ƒYdÏ8·ÞôgR—°—Æ35z4 8F¨ ¬Üao£\•~²+äùü42ÐÒ", 93`⢪ئ‘X-d€Öº÷é±ÐÙPO7rÛ -ƒRÀh½à«0^Ð75€˜Y‘3!ÀPd±+afi,`YŒ¹‚™ÍöÕ|G~)ÀÍÐ`Í»Y쳸õuYëÈc!…PÈ`@^ÈÌpÿûTZ‹C½Š‡O[ýßWѵ“ÐäpO‚‡y´×9DuÕ¬ª”DÍ XXœ­òw|27 r5åÉr Èþ}Z ²×IÀÔG·‹Ø±{¹÷¬3w&@¸Rϳ¡q„þkI âÝ:Å€‹´=ú VMÍξ^ pÏø$¹fEb~KfÙ3ýô|2ÀB¦”oÉ% qB… À™0ŠD¨Ê”Ny°Ue Ñ‘x1!@ 8 I8à¦y, ~ ˜)wW._ϼ…q‡yÀÙæ¸ÞÈ‚H€›FuÜÓ„.»/¢H¥þ§ÌÿO—J$) Mþ–Yòÿ¾PíjÆ?À]†#¾Pst¼(7ïG«fUUª’€Œ‰\5 ®Wµ¹²¯÷‚”0í`h}{zbÈâþ)ÇÙ} ‚×óŒGꎌšKs[rÁ÷; )‹ëuYì//mèš'–ªTë4ÕV· 0ˆ–~Xk@wðòvXØ)“jÌvlëP:t‰(‰½1`âp|2q#A¥éëãØ^¸ìá¾ IÏ×H¥$€£zNÂG]?"ÿ£Ø‚L_eÿ'ù]WZÕȤ&L€2i°Ö á|¨À ¡¨ìQðR ‚é ‡ €˜Ú.àþÆÉšÞ+æðçÜñ7°àj`˜bá,¼Ñ5¢\Š{ Ü·…ŽLÒ8ë°`Á—0ÉDˆ$þ†Ü8îÿJr¢(5crcÖÿëHSµâ ?D?k=9RÎÇ+ʼnc1çœa®RQUå ” ,9Äs›û‹vmý•†“ÆßO¾Cì Àx•±î ½« ªß\6^æÖ!÷2†7KŽˆ0“I_¾žHI·HŸ|„¤»E_S‹<-‰Š¿ÏAîîÍc÷Ø÷œ)G» E >š÷ôR„l[3½¿†Lbó–jyφf(Ï@µ}0Ëøý|7+ÛÖ*¶æ‹Ým†r\“ €0DPX¥¢°`Õñ›•N9U8€Œ$ðÒ€¤ph‰p††˜1àü ~SÀð6 8pexŸ`s¿Ååpøfš3 ïX¸€‚Ž ¹}ÍÓC“šñÝиbêD;Ô‡ø þ[nØJ»TƼõWÌsÏÿ—Œ®}èV¼õWü€ÈU£”YLö²42…"9œzël>½¯1“ªHÎ{lÈ0O¼ÖŒÍiùæ?c£é#é  ÎPLŠ)–^ìÏLw=í|&Ñ8>Aê¥ÊÐÃQç=r­Á¤£.°T¥Åå-W0Ä”6Ò‚!­ØBƒõ Òµb&†ƒÁD¬(mÄP –ñ(›rŠFŠË4¶=! Kb‹J݈ބ'q CCD>Ó¯}O¯Ð’ ]*6ç˜4³[ùQT!ñß`ðÖžÎI¸Éì¤sÛs—`˜¶xtC? %%XI!¡~Ýhæß¸3bµ©õW̃n$ó7¸@µ öR¼¡Ÿbrà˽¡Yn£íhhÅQ%`ÄÄ:ôd?ì ­1æt î ¤ oØšMµ"²©'&ªÔìŽÈ‡ÇTí"Ó?4.h5iNw<û<©Bd1¤ud-ª–fèàýž|(«áNÄ$ëUe‚Ä„AªŸ`¢Ppi ¡Ï8´4Np`È%4RO'£a¬ÊÉ!H–ij‘ah‡ÈÈšÀ‚øzY”X #Ð$ˆ0 ¼òbl!EÉS†ÝËÇÞ¥£Û5 ,€ÁA€FÐ4°ð ÿ Ø¡pï À-H~^ ()`@žÝhðRNP¥ƒ=yÎØÿÆC ]˜`OÅg@•‰.£ðÎÈ:$ŽIèý9Ö1"ܪ*KUpÌËdQÊÓ}Ôî`,F˜Œ©uv®5n„ì{g°]‰r Á¡ûl³œy´ajpبÊ,çÑݺïr-,…pNm&leQ!«~OènXžâiDÆËZi“y5ˆ@<5QMoëÞ4ˆŠûH蜒¤ºHÄbêÐÀ!¸­²ÁÂÄ_ùm °1%˜©€ _‘Ce‹E‘€Tp@Z À æPăeìæ3_z_ÿ€-X ƺŒ‰ 8>ÝØÀQA4Õ:ØËx÷ÜXö‹+C¥{)Þ°=ÓŽ64ï#‡2¬9 ³ÍÙ ' UA`ê‹ÏcñuÑÆÈá•hÒ¦¦R¬†“üoÂlYWöŠ6Ò)±œßïEЧØö\Êè’ôYµŒUÌ fLMXDã–ã –§²tå0榣±éµ QE󤇊„êÑ^«E§Lu´6È3QŒ ¹¨Ø¶¡Cžõa@ u<Ø «-à‡ X+Bén#Œbd#pƒÓŒ $Á2F’‘pÇ‚ÇȤ@ä_ Àx¿}‡Øé ÿ{ÃÙ©ßî˜Rìýð‡1u&tŠ þÝ@ùç®N.ª$ØS1:dýc[(A¥{)>Êzk&“QÜz ›ÏÑfm¨HU%5öºÝµää’AB@µ4¨Ôëx-0g>{ð޾géé®Ò>¼ksSÍ• P¡ìÊÓ{:ƒì¦¿xÒ`W¡iE*&¤í(Ž‹¼gˆLÈ”RGu°«KJð®î =Ȇ ºo²A–AÉ3 G†çºãLu¼ÈÛâcfÞ-y ©EÂùfƒ[Xd8VÐU£x61„’m ¼ m¼ÈH€°µ°)la–Ñ ò ,Z,Ë = Øí:Íî²õ2‚êá•¢`,oqÜóÿàíu+Í÷föãpy`(ϾOPfÚCÃ~çÜ óï’]Té`/Å:èF³ÿ%*Ô§ø 9åP¿!ÏÞÕ˜Õ ¸¿Ìhï3‹pÐÌh­bHªì}>Ù;ú$€Pi÷ŸØª½ Ã8‰cXŒ6k¹YE+ö^hÔ¥ôâ‡ßN˜Í&rÀ²$º²Zƒàb(¨ôa†’ÖÀ\› d( ž*¹BCk.‹L Èhw¤0)˜ñ,ïÔ IÁb4Y†¥Yvš=,Uz«‹Âb%usÐÚðSW›Œ¢j•M/Fx[ò:¥ÃùYÎdD Pàùˆ°Ô&‰ ,§¬° 3ÖH¸ ÀXÃÚv‡f¾ÍÀ4/ Lx_è¹;Þ)a0>ÇÜHæ¿ ZF§>Ÿè¹#,BcscÔ_ñõV§ˆ¬x”ý€A? @´^¿­m¶™x1WZCi õã¼£=— )@"{³©ƒÉ8F› ¢½#Ûg¸çÝsöÒüÆ)h_-·Áór¹!¸×  /‰Ñp êÛ_f£.(èû?ŒƒB²îJ„ý BTê‚·0§²…Δé/ÿ ÂÂLÖšÞx‹X:ü®Q¡¦ae$ùDËÐyk9¨™¹À#,+%¯²TU×Äñöxé ³Ê°ì±ú‰]aIÐPA ¶¬+b›ÌFývÕP*žÙVïà¹3øÇ<=à8@çþÖÜXþŸQjt¨[± º‰¹<áÕì©øDÍÔ…Ú¨™T‹Hhû}%[õ€Ò¶a΀Üg}K·¬¡“@2Y‚Õ¾à{üŽÖ~““Õ{ýgÉ*VàÑÏj:ɽ aãOêÕ5²‡rzƒ¹féŒZ ;ÔWtã…|Ïv†ùÜíàäS˘‹®BŽƒŽ\.º*˸ÕP«âD&VW2 ’ìuiŽ‹$qî‘) J€¬›7J`f,–xÁ F­À e• ÜÆ|4ì±´€š …ªÁV`°´ UƃM`d(ÃØ„à 8–ë,j©ÄÔ3,îDZxÖO0t1B3ùƒOggS@5 &¡€c-»Þrçÿ#ÿ0ÿBÿ,ÿÿÿ ÿÿÿ!ÿÿ ÿ*ÿ@ÿL~ÇžÙ< £´µéðBýŒqÎËþ3áU:Ôßp³ÝõÞm1M’ vcÙ(UBU))å2ܤóÓcjýCÙ#DŠŽ¿ÌB²†X­0“¡Ø{!‡&28 ö¯Ý„·ó «ñ~¥0ð3V ñôlÛ¨!" ÓašËvÖüš®k_4$‘YÄZ®îFÙÖÌxX–r”Š)B…†¾´+|ÆjŒÁNŠ)ëÖCN ü¬0°NÝy'×Ï5z«Êƒ€ ÄB|¢§B,ù"0 0Ш6¾ÊF@„ À@ â0€Àò0®g増³cŒ^áLJ-»®®·ðñ7ìõ$¿Â`õ3ˆPàÑÒ ÞÆÜ ¿y„$„v¥ì¨Oñ®9<üßÃ%AC)ãÔ«ø˜XÐæN²û-8ëÍÖƒû³F €ˆ ¹žÜv¢Œ¼‘æZÙg^ò&ž§–ù¿NWb*ލfì[fƒÿs¹–¹AÍøØÏ呱Bù»÷Îkõb}™>Ø/¸ÉdmæFªª¥‚¢$ˆ>,–k»qiTŒ—±Á¯ j=|ÄÐÌs:ÙBG~±ć|+h• P†tvìrÉZq[ÆÍ£õaG×>ë!ê>û lßg§Yfœ}Ø(­ÿ¾ó“!oöŒ“C|ñt%åÓ©I¼¹vD',\XuØs½eÔMFsñƒ8œ?2árñ›>œÀíïÈ}_BH``ˆàÔhP”BNÀ((É)ˆÀ㊅¨£Pˆ0° (4Ð %†ðÀñ gÃòêÿ;ëÙ[À\çÌ€«ÐâÖànX$ɸ®Xxä¨Z`ÆÏ«@ír4 $ü KØnþ¶Ü¸ìÿŠP¥ fŒ[n¼ý¿ƒ"TJ¨Ûø2ª95)œßr‰}×ωkns„wâPºªªª¡T¼÷ë*ÎÕð$bM÷¦R]“q­©jNžRU5ÇŠàWÂDU|kN7w:ÂÉ’ 0Ô:¹,(ªO£Q-çÈEãNV7®ûëÖËÐv±æ½gBD£ou¤ˆ†à®Ð1d÷¤ïó<’8X¢–¤@A,YN\îîTcx¦ÞЀˆˆà©õD•(€¢2ŠÆÓ)h†”h©e1@`KBx mѧoh Z(à¨@*¯È† B)g—³Öo ›v`±1S›c0ö`°x¬ý{ë ¤A_wî5,…îÈÞ°!Aù’8ÝXþ¿ ªt°§bt#Ù£‚¡JAýjvfØ”!Šéî,Ü ·é]qRè(!U&ÈDØ{ºÓ I¡ÒÖ‘Ó÷ÈXPÍ2sÕO­kŠë œÓ>ÂCŸGDÇ´@‚j suu ¹BíF5­žòîRM³‚!–Ï%8ëCv³­y5 Pê3ÇvNÁèÊ£g,‚¦XÀN £E¢²°õ}8EY£mˆ@@É ZÅ8‹1OUáüæë¶¬\j6 @ôºHµµ …V–`Â2ŠIÒÀ‹ ^`—àW¬+~1g €+åp<Ê¡ ×K,QÞÝ0óßšÊP­ÀžŠqÑü/] T+°—ñ2â¡®H •VD"eÍ{Âá€à ‚öКsÐNÄ¡¼ª0'_Çf1¿íÔ/ëQ±í6ÞXïH°Y9T×oòBÒ}_S²j¡–ø:!n€¤‚z·:[¢LHÚS–'J`²ÚUrÍ-°f:€€:ã@Dû  ”¡¨NЩbm !2(F u6@@ÇÁ§!‰-#££%‹Øô6#9À'¤ ‰¤ Y<8,U£Ë+û‹è²4X‚<¤w¨¶Æ"€<ËaòÁ øö¶üÿ"|ñ@àú‰Þ0B‚èÌd~ŸÂ4î ê§(7ß‚ öRüªµ§MˆÌP-”!´ßr wyRñNœ˜x5Bª’€˜3îáÉýÒ¢¯è`‘^鹆WçÙY9ÐtëÁî¿0e:C*r.*ó{Õ½E103?Ø m†]Öí/ Ø[Ý¥û»vž„ö8^1دFIAÄEÎ~˜Å¶æ>­€Œ¡Ä­üQnlc,X3Çl‹«—*ò“X ¡€06OŽy‰TÉ^v[€ 2d4:Ë€´ Ñ{ïå9ƒ,Üä`Ȳà}]œ‚¸.@{‘EȪ)3€„Õ°åJæE%DfÎÌÛˆ¶˜Çmc»6DäÓâ†H¯+YpTÑÁ9Ò¯«r >Âáùý”Ýûy"Oð0DÀî•g!Qøª.V}e •ë¡qü* ÕÈ…#HBNOE€æ ˆ³ÚÆVTŽ*énœÉÌŽ PVý76A£*¢LQ–%` `È·”Æ\µˆ‘Ad´PÉŠ1¥OÑ  †R„«€€Ý´øfd]´‡„Là.9`€Å†þ÷nýÏæNHUê§ þg+PÍ¡þŠ€»ê숙g­Xˆ§¦ª²$ª„ŒL @ùsæÏf7½¨Q4nÊ k[ÓFÞøþ›ÉE‘ªAæOÏÀÃyñÒýt´Nðç ›hïíÔO?‰²E¥Š¦OµÒI6çóçô¿å½ñÄÚO¬Þíã@Hm¨ ¦¢h¦ ¨ €@%•ß¾9=J âÆ†3Q>‘ôûÁv DÈ_±‡¨šíø~€BÀeB讪òi47=iF !ph džNKÛZ=Àh0<®î°l.ø®~ç-ÏÊѱ°ÉG0žçnÿs/IP­ ~ŠwÑáö¿']TK¨¿ñÐo.óD#oñ©Q<ÝÙdƒ‡D¥7hÝ€óqÁ|Dë:˜cª*) rsKëÊ-= —Vû×äåÓ[(5×Ï_¼ï'x|›Rº ÈèüõŸM•’ ¾Š!ä踒Eîg&aí0€òú:?ëÊ ;iv9±º×m£ÌUDKIy!F¾ÏŠ¢*dŠPT,XÔY '±‚ŒîO|Èdhdh‹ ¤Š«ˆ0Æ “Š c!r4ƒ°€ ,@+ä}¸ÅÈåÜÕbÍ‚m´B€Çg½쌩³zœOõðiÿ žõÜ€H`¾×ÜÀúß› ´R)¡nãZtãÿ7?T ÔÏø ¸?9íDÐZïó±>³ÅÖ‘yî±ÍѺN¢ªª”$-¯sê’é! @ß}síf½Ÿ-'KàôÅ®W9ë2óuiþñhæ.Y¬±V•íwúõO¸Ó%Á*ºCy"‰ ëq¨€¹,Œ}Sºu5‘@ßEx6 ‡Š,c‚ÌZûÒ©ÐÿŒm°² +“­€eÐ(cY¥“Èàh/: €$À’ j¨pàðpÏýìàãξ?ö<ê`uP€¸t @þÇ r?›Ì,íF·¡þŠÑ|nóÝ!”š öTüÙž×)ˆ8ª…ù\­ïÒc‹v® ÐÛ÷1G)bbWUYIÄiêOï6\Óiy-u½Q›gÔkæP¥ÊGNsšJDLíšä‚>Ód˜j¨ØøíÌøÊöx{ »-g³?CŠt=ELÛ53‰ ÛEQk … µøb;5G8$ßÃÚ Áêî…´~I™f,ñØõÑvߘ-A'¹1SÃ’H¡p˜B‡Be[  V°%zŸ4-¦mûóc¼Yà 2@AäÀã Î׌å÷ëÆlL¶¸å¼ƒÇÃŒvn°ã& Ås0žÖÜØàÿŽ1­ZB½†:è†ùÿ•Õø¡Š >ãèñÜi¯»æ²nûq6”hçs&ž& ’µ‘¯76Ð/Ï€ÜòÑŽº¡jª€Ê¿.ÜWÝõùg™ß´IßÛ»Çtû@¶„åSò&‰–•§ï:0"¡ê=¥Ž¥Ì†"ÿ±I- gg£e㯢<t\.Àá¯Ú„AŨD@A)éÈLæÔ DŲ…:}¢"4YÚL'ÈÂfžI›Ké®h½^_@“\Ã>]m°A†>D<Œê4[`„Õ^mi[Ï’€€U™!€$Ùt=´8W¢ –m¨À ÈI"Ìvˆ>ØÌ)ÿO#ËP5ÅBg†û\B@(€÷«Ù£ÏÀ¬¡\€r›6Z¥ª¡$dÑG˜g‡ÖZ#„R©Ó+7˜eèTÚ܆’¯ €Gâ*"ÁÕ‰€ð‘ ;pClRÝCÊÏ¥NŸx»A‹ˆÅ¾À2eí†ãO9¹â<–¾M–™ÜYô³ Àlç9ÊD LæÈù4ÅL6û¹ê뻪v~þɹ"þ.ÜßwúmêðM3ì¨J£¤íÁ¥QnÒ+j¨ßP`!'tHQ‰ÀQE˜VgÌò¥ŠT~Ä Ì™É¢òîa ¬†»?<¬KˆRMXÒ‚xmXñ 2^‘ @Þ¦Ühî§”(k‡ºqÉáö?ƒ ¨"¨·ø˜j®®õ›ž\ùñU®ÇoÏéÂP]p1¾CSªZU•” Hóo»ÆóÞ¶%Çñb“žÉ"Ð9˜^³'¤Ðt˜]R|k«"ö!¥T¬z©Îf«!ÓÖW†ÖÍë¯þ}¾‰¹¦Ã_\fwD»ñàŒ5(·ô6I€nÿ÷E+ÿ¹9øÖýD²€DÝ»ôÕöïCÕ g«ó“Óܬ„*¿½,½nžäͦ>ô-à4l´ùªaϽ»³Qï à=i@¶hìøc<a`ÀI#¾AÚ5(ô¢N–¬Ð*ÀÄÀâÁ°À‡·_ÿ­w¾ ¼kzh È“}·¡ú΄¢š™6_ïÁÛ¼cKýL4RQ\˜‹Dª–§Ð%\õ3¨Bv§]öé—?ÒéOggS@q &¡€c.–C±õÿ$ÿÿ ÿ)ÿÿ!ÿÿ"ÿ+ÿ)ÿ5ÿ'ÿÿ'ÿ$^×ܸ<%*uœëSÜ[n˜ùg„¨Ô¡~Æ­±×&èß¾€Ø¦ÖйjJ¹J (ÆÐ¨¾ÄlÅ&zjt ³13WývÙŠ{ÀÚÜœÊQUS8ª£´ó±¾I¡5²|ºÕ¹‰lPW•‘wÖ¯w“6BEwH‚_ÍèZËûZÉá\1í ¢Ù6´ÖlP-"PÕ% E¤Ñ(Ø>‰Ý‹X]ˆqkf *^¥TÌ:/wâQf§¢•L @Ð @RaƒZ.h= ÷ø%¤±  @€®4:N• à6L¸®¡ -â™+|+äCÀn?‚¾a¦µþ*Hš‚N{±á/ˆçt©X´C½¯€UÙ‚BCÒ¢ ´ ²ž÷ÜXö¿«œ­Tê`OžçFÂ^áˆQjÆÀµÖ¤•ˆDq¸³—0´!/ÀígV/Öl˜*!f ˆ¦ R^Æ©oƒd›P뛉š9E#ÒѤGÎbÎrŽði"¨2.âïo¥ß<Ñ胱åg›¶Sw×@¤Ï6žZAvÆ+Ó]íä) ¨>€ÅSB©QD£ uÂ(ª5wÉŽ‚ØZŒí’€PA5S4] z@Fª4 Æc/šÔ|@ !°rLB ŒTÁHŽ"–€€(,drˆ  §BÁ˜îIÀãá÷éÞyÿ¼Ã{0(ã,È×p^÷ܸÌÁšÊ„úóœÃ2›G-CµÂ©füö‰¨F–1ÙOË8ŽJÌê¼EÔ$€ô .@îÛð¢¨8®ƒªP$ QV·Í­^ooÿ¿†îmSÚöÞÚÛU)ÕŸÛ·ºi=/MÑbÈr7 ®ú›9 ö<åà÷õ$Røa]ôiwìÒ;ê©`"¢Š¾V\( u]¥‰Â¹½#B#®êñEܲŒPà¤ZFj˜IÒ>ï%’Q´b)iÜ8ÀP…øŒ4edd2D„BÉ_LÞ€Œ … €s:“Þp)À€ç8ðÀA ¯Ä¡#Õ9>÷ÜXðo ŒRsBýïœd7"PiBý?€ˆS höÄ“øÌH2‚ã¼ë È€Ì÷1|ÍR¼ªR´ bDú5oyцý`Ýjäö:üð¬ùiÝAœ1üιêl<ÓŒDK»šÉ”^ äþöfÛ! ¨iˆNŠÂjQªJʼ%ÊÙwKÜñÆST÷³’ÀP§Là}Ìipi¬Š×jÅžIY` Ì9“¥žK,dðÄ ˜\ƒÁ‚±Ü†¦1†scâY1­]c;hmˆÑ” à²ƒî¦t?rh‡ª(n#`9¥Ô€DÕÌ  ,øÄ›“³`\¸Lß-à]2¸²X¢{)§¤Ëun!üšžçþŽ@¡ÚõWÌcn4Ø<ª UÔßøäPÖÔÎkOª;“@œzû†…ØòÙhYÖR¥Tb2>¦H¶ïh;ì)Fhid¥vðQgFý—¤¬7‡Ïd)FÔç–(XP ‹÷Ž)I„'@< Å Œ³+,ÛBç£b3#¡Âb!6‚àY´Œ ¶õ*ÝÖH‹1†Èކ‚€–¸"R}ö¿x'Ѐ±„Xà@æ68\02$ÈÂH`³fse¥H'û;¨ÐY—™Œ 5ld%£ÖÆc0Ëœÿ¶–]lá þ0ÖÁc}1>.y€Ð=ÓdJ‚ÄЧcA¿€Z>×ÜXîŸÁ *u¨Ÿb\scÙÿ‚T(¨Ÿâ3„Èš)|¸s:AîùlëŠ#Ž“LCë2 ¶GÙӟ®¬€ˆ 9¼¯eofA·.˜Úül£´â}ŽX_;`¿|ꔬuW'½A\“yZw{œö®ß4"M‰:”±Ä !(;·jkÇY—íìሮ:-E°´@€}n(‘(Ã-H|y au#ãý¬F¶,# ‡é±³ÒIpöF¢-e®(T€,‰ý$ hU‚Í©æX/âQ¡ÐK@X%®‹‰…¦Vm*Ôn0¨Áœ5½ èÜÿ4TæuÞÆÝ½ú`Å,xpx`€ÏÆ@b€ú€¼³õ`Ç~×Ühþ_݉¡Z‡ºóœdþ¹¡h™ªÔÏð ¤zÇ©ÝÜ€W+NÆ\ÖüÄL|‡I±Ue•€Xq*ßûsLŠL {>µ«é' ¾‹ZfÚ÷§á׿²Žeè„ñPš–À3–Q’M¦ï›—%²Äàg3‚Æ€¨·WS)‚”™oA ]$¡ó*2,žµ5û¥,ƽe9[7°‘'¿±n€åu0‚¹cÍ{ «˜ v2ÛÑ;?¢Ä*Vd‰8YK‹OôwlX°zWD5×û³×(©k?ì[äe ÓJzHÙ ÊR€Xx[‹{ƒßê±?maá={­»ÇòZ»Dû¤Â€^×ú»¹a¦æY6Ô§˜žûçr45êoø@P>+[…è•G5¥˜[2‚çoúne|Vj€´ ª™ûÖ‰ A»ªÊÌ]£Ç*=šè +9/ªMéçΓöÿ”BýuwÁx[7¦h‡¿Êä^Zå`~ðhJŠAðôNïYzö§I›1º/…Mõ£‚… ‰$úÿ2#AÚ‰}Û°@þ®*­GFÄÆˆÊyeYs0½Y£ÓÊ=joÖÖ`À¬5¾˜ö"pü=ƒ%+×gÑgD@?¹YÕ2êuËDÙ@l–˜íÀ=3VIX…i' Nà°qé̦|ÇÔÛÜp¸ì&¬àÑzàòüÆÞÖÜhþ¿¨2T+¨ŸbtãÿBí{þW>Nˆ-ßÖѰ°LU IB$È,0¢ búîùÁÃ,BNÎÈ^¹µÕ\¨CõÆ£ñû:šÎ+9|˜=Ñ#æHì‹S%ôÛc“…ÅÎÍ›€ùƒK{Ìføp|ZΰÀ¹ü[yKÚÐÀ(Ž×Ü0ÿ?QÉP£CcÜsc™ÿ%(BÛv¨¿â3‡1ݼÌÇw~øhödÎN—v¬¡¦ª „æu·®fšñ„Ð[7æ¾ù;«)ÂL¬KÅr0S¥JÚ+róyèÙ'lДÔíö–Z©SSEÇ]ÔŽ(E½ä–{h_E•Ÿ[;WÓg¢|´ °—F?üGaD²?Ñê—É­;BÊáÕg f)þµÀëf³AvÙÿ®<‰¥à¼S¢óî&)¨¡[97€X@oT‘IÇJ&ЇJ€‚0 J€À Y0´ Ä, ¬D ÄÖ€…·lÚgÙ¹ø~aÌ  ’O•P1ë †Yfy"80š`ó€“7ŽþËóš`I_@)žÇÜ ø¿V92UJ¨)Þ)‡gÿïÓ-{BÍøâÚTÖß2Êxö‘ùcﻜsyÿhh®·¡ÁÅÞs?›U<íUUM%“é‰ãÐÿ•.–¬ásðƒÅ5ÐU_|¶ãß^Ó˜£ô&Ê?«•"ꈷß*‡è¸‚:<œý‰¤*äɤ„öÔÏôR‚Döµbñ¶o²‰EbG”1íhýü„ÁÙÉôԕ׉.ÜIç~¸äÐ7“A}ÖhòIõ—ܸüÿ¡ÂP jÆ<åðÜÿDaÆRjÆ2çqKByE‚ÉWߨqÐaª!IDêlŽ¿6j¤a{s>²)Ï_Ìž‰ÅµXîª×Ùé¼A6—k R+VÊaØ5OR‹HMzüG5;Gq8#³ HÄ»`úчc8Ó£åŠÃplŒˆãp2ÌRVÊtÎ~˜Z ‡áºÎ^”¶[ C½Ž•Øs²Á˰e‹n77j»UñÊ8{ÖØ l»zš½ ƱlƒÎóÝ·,pL(0àи¢lýß®û/ÄŽHe¨Á€ã2íuîÂÔ¤–HÈ:Þ€?÷8X܃ŸÐ¥ˆ4')_²@¨"ÉX*Æ@¾€ˆ¼ªù§dI‚ÒþÆÜ¸üæA”÷šäÿÛ]0E™P3þ2Ox;"‡;z Kz‘ï©¢A«Õ%Œª¡$ ýî:k¥m^‰Í• ¶oŽ„óRR†3Ô¬ŸN¥È¢ÉZ=€¦ƒx7 Æõq¨™ªîþ™ú=/6 „ÙÕR› AÈŽ^t-æ±+¥pn:q,ì„!‚N7*@¯#HàňÄ|fWçÜ)!R_ò("0 q¡Ðœbm‘ÁˆÅdÙ†À´12ÂÄ8 1I ›=]žI„ØTU&¨BFV‰bJMl08’À² ê2€pLÀ 8€ oHy´Ë€—¸“H,Àžçfÿ½¤Õ:ÔO1﹑Ì—€¡ÆT¡þŠ€wŠS"ž€ þ>ê9L]QȆª¤H”L rRÈP¤Ø¦íZ¨IIž$µŸ¬R™sÍñ8æj»Q2Úkˆ²îçTÄ÷ì™*kÔŸv†û5·ÜøÌ¿Áª°§ñ ºñÿX\ªLhòYGEP'Uë+WОºÊpÜy^ï ˆóªJcšÛzPro¾™µC çŠ`âÛ“Ùµš)ã¢^Te6@5IÀôó<¯ã¬{~= oOIuŒXHQ >‹>l ygeT‡Mtƒ›Fñde˜iÛ0h4@[­R-ÕŒª±‰ ôàI)¬X#ƒÃVÂôxµ~$6 #6<µžÜ¯}dqjÁXÄ šŒ ˆ06Ä`Ê É’p”@Ô¢uEà0 €Öº ¨"€àp‰ÃËO®<à<ð8ÀsÀTTAøÁ…µ˜té«Sð4¾ÇüswAк!ê5´A7!÷¿$BÔŒÏ@¿Q=:ÄZÞŠšÔ€sz7 ±åmé0'¦ª„H’B(7¯®¾öÉ‚Èj½¡ý6}Ž{2°7¦£ó‘sò³x¢LðF ‚7Ç''u²j2ãý²ÛiÁñ,~¬††#Á’˜‰Žh„Ü}H¼H^µ>*3äàÙË# @W«Á²µ$O¸c`VÀëV w6Ä»£GõÞ-”{˜†^‘2fA‚bFèË=×H ‹€Å„HèD$FPSÆ ˜XQ¹Pƒí•©ð„0 žã¦@‡ÀÁƒƒïð‰wxxîòx¼îààL!À>×ÜèàÿD 25¶ŽZ·ÂtØÀÿ²UB†¦’¨5Å02¦k§ˆ¢Ú*"6d2Q{g „ö(óŽðßU¥(û|YÉwÑ’žÜ½1&§#ÇÔ¬ [Ê-Ššj;dx¦¾²[È«öo¤¢¢l~÷ɦ=ˆ(e׫ž6EbÆëÛÜje“Ywøv¥U8PÜkÙ BPÑ$F ¶2UíAb‡XÂ@&àP‹ Š Ù(îfÆn‡‚œ“€¥£ %Bc$€ƒ«¦Ér6Ø€5,°ic†‰ÅÆUd%@qpàà‡+³®€ÜÁÁG0è&2P`uÕß@(o¾çÜ ó¿Ä*$ÔOq:,ó¿ÄPI`OãziÚÇ…r‘’(ž{ç‚ ½ Pås¶­™šJ–$F½ÍqÁF+;ç0Ž=‡ φ¨ç·C71nR³¥’r:Â×ÎÐÓÌH–qÏ•@H¸×}¯éîÖ€^Y› 'ˆeD{Ì|üE”²º˜=è‘3MÖà57 ¹‡.Pmôû§>©t&Ë”öTÛ ·»}í0‚¥ãu%kIý“¶b0íA,à «9B¿,X`0–ÁØN\r@–ƒÂÈ«BðhBŠšB€@TY£‰@ Ø6õ?í¿âÏ}ÿ˜M’ÍK$›ÛoQoœŽáÀ&S¾÷ ÿçTE¨èPŸbtcÿKRAýÿïkQœH ¼g@Û6**1IUC)&€t"* #ÝIb›rnÌJŠVÖ§Ôc4³Y58F LšOÑû-(yŒr[^èÌ('@FKqíà;"1–Ç“ÉCΘÚ=t’ïƒòÝJÎ6OêSÌë½RšÝœ„ºÅx¥  ªX&¬_#ˆž*B$rnÁ`¦ÉžÆ¹¿Da'ÞÌ8owç2iQ¡ë‹Æ` ªF0îÅÎ „0‡©\ <‰’ìÞß‘R• êR%Šqᢠ–1Ü—eÝ¿¤)6ýÐÌtÙ?{ÌŹƒÀÀCXŠ~çÜ óö¥ qÏ9<ø_¶P„* õSüE»gçÀqýGžÔ=g~Psüö>ÐÄÚÐpÅ õAN;L‰ 2D%c¨,J@7~v/Ú^ÓŠZe.³oŒr¨ ‚‚ høÛ;ìÝ.ËSe|q±A06þ3ÂƊ»Ë("@Ô³e½…/ýœj¹õž3Ûžm´¸@w†ó¶ Ñ/ÚR©XX €Ñ2™Îéâ/”8Âã׃êç8ιµuv<§Ï+Öïv9î¦5]ͺ{F/xÎÿ>;ÛžMgÎïx% ŠE±% !J‘. E >·Ü0ó¿#¡« ¨[±-¹qÙÿ+€µâ09Ÿ¦>#‡‰T¦± Çsïyœ04`ÛÛ¨¨j¦ªT*©¼¡Å7ZÇû µ²äJF¯£»¡½cG9D FjL<ŒÜ°{¶®rÀ{è¡í¯‡[—àø3ãÀsàCFeW5Íã[·Ì™)¨¨ø0\b5Ș@~÷Ü0û_T2M…õS¼{n$ü/* ¡RW¦þÆDdÔ‰ŒŽ e*f¹FúÕwáá$@Fh%œ½|ú0G™8jJ¹$DmƒósåZ†“Ž1×ì’ŠÎP€"ÆŽ¾({½9×]Üñ(„ç,BÈM ž<Æ8„Q1:ôR`¨‘u¬”Ò:7%à…Ým,¢ª¶]² ´‘ ¤ÏE  Ö5|k›—€œÁ6ÄS XªÄ[¢ ˰Ê+”–*‚TP±A ¶ˆ*  “hbÀ}±è®f"Šˆ:2bQ‡ ‘dÉ Q1€ÇÕ €êˆ©CÐâa8€ñà8ú ¯öþãêñÿ˜ÕžÓ™ùõ>á=Ô´XÝá^îÆ¡Úo6•æD¥ƒu{#AÄY ªÒE ±xd|f’ä´Œ œU7ëzsYgÁ¶Ån0XLZu‚´òPÃŽ[cѧ;㡤d"‰39HƒB-u‹T/âÉ¥—Õh„Œ¡#É 2‰¶¢ Ð`e4D²#(AŒ…cb#“CJà?ŒmdÁ„ <à \:ðù8žÇxà@À£»ÙÛóçÜøÜ¿Bª,¨Ÿâ›trÿ((¡UéPWÅ´2îqC8q·•˜xîp_€ÖÜVñu(íf„T © Ž6Î…5ÎWùº5¿Ÿ½—Ò­ãMëCÎ4g¯ªšÚÞŽ ‰?v€¢ô6ƒŸØìŠzȈ†îžÜ=Ä€¨§Û v¡;a͵2É¥z`@* H©‚ŠÂ>‰B%°Î!jQ¥jƒ¢ºöN lšî #Â!2Öx5™d­K* zD¢ÆˆHv DÆaÜŒ¤än%mÀ&…ËÌ‚€ýŸ  ˆújà®.à|€àÁ㽃㸱­%(ÎQ~ÖÜÄa›G h5Ô«X7Ý0»ù©’¬ÔN°7Å@Ù+Nì1ß9pýÏ9f€HÄU`“ù>GÅWŠãÄ1U¥€èj@ÎôùGzô—°ý4~\=)¯ŠØ´l ?eµÍGØØý¶×9òE]ðN†–ì5Òɵ^{ïp73žr°+ŽS‰…NX¸¥eßÎ a©Ø€1À{šn%Ò“°RuDkÝ‚€@ÅtC0å®@(_`Ñ&î*ËÓ¦/å ËК°, ¡PN‚ À¸ ©$þp‰«$rg¿l @ô]4Ox ,¸tpÌòSà°fëù€ð‚z€ŽžçÜ0ûßšJP¥Cýã¦Ëÿci b{)>¹OžIÜe× / wÚûh[v#SUJ@Œƒ£I¡e’ô÷†Ž©w,§O´Z^ƒcÚG³´j4CiÆÝ2¨LPQ¨çšyÔÄÅì' –!JR6)~°WM ¸qæŠ+©›Vƽû7P{Š¢ÐšIp†ÝHÈ{ÅâEg€V…K Ó'ÂaîIÛˆ Ó¢±L†iÍRö6­J´b$¼ @j1²G!²Q –ÃpÏ=¼ltt°Á€ °ØÆi¹ cT©Ŷ5ˆð€5%À‚zÎpŽæãzS°ÀøCJðÞöÜhæ¿ ª%Ô_1MºñùƒPÍqÛKñðªoœè, ÷ˆ}Žè‚­ªJQE• €èncO6Qµ2¶²ÏÀfÒ|{ Àr¬¯°ÿRŸ¦ C=·ôÝ´œ¤AF½yß½:5üD®õ šá ÷É”,´…•.)z7A³G¨;=ÐÖ t›@ö¡$(ʯÀNRˆh¿÷ j,°©u ]5·;ÖÆ$»ºÜ±€l·Qv#ÛDÄÄÀ‘Ò†B,¤H f•É ŒXh Œ ™áÕ›PŒ6#£-2B†”Czqè\¥Àâ8°ÌÏž1p°¦üÿÖ+,U°,>gƒÍ$á% 8H^çÜ0û?+A¥„úï¢ÉþÏj Ts¨¿âàáAŒ©L@åêpî ¨óYñá:qbÊ$@•v:@/;ígƒú,Å0JÔ"©åöò‹à÷‘·ŒjÚ¬y $Ÿû ÙÍ¢•— HX J=eÈÇ|¥ÏšU¼ÊØÌß®SºòK6.¹àµé! xùcѯÅÃÚ§Ñš¤¨8f /‡, 2³¦˜o1Øêqƒ>ÊÀJ ÅÔR¥JÞÈraÈ$B]dr«<å}¸Þ f±t]+¥ +……qåuÈÀ6p`lJ#Q¢¡ª¢¾™5­(`x Ȭ[IUe3?Õ@ïœr€{X8w*0)OggS@é &¡€c0KYÐÿÿÿ6ÿ1ÿ$ÿÿÿ ÿÿ3ÿ)ÿ#ÿ+ÿ.ÿ-þÖ>°y ºÖT6Ô«8ÝhöIB[ØSñDžˆBMQÏð¤XvŽàzù™ÐÊ ] µ&_[·Ù†'6Ë4”TA@%»9ç0£±aæKä:Ó©«k¶uô¾74¸|Å~ǾÒ|&‡Z´ÀÊ :æâ ¥0Åú€Þ«„ÒKñÃ}c‘Ò)Z&1ÙëE‰î@êõƒŒØÐ‹tVô[‹îrÞiÅ០Ã:uhèdÄ7Â7 Æ ö04`BK¶Vú¦‡9C¨#6@$5´xµEÐØH2j„  Ã%iS…vÔ´ÒZ+ Æ/‡aÀû[üQgh`Ì$<›SÖXØí5ÃX¼3sþq§¦ à‰~×6ðßÙ%Ñr•R@}ŠyÐ ³ÿ3š#Tq¨ŸâP<}¦±{TŠ8”æ[ ¨÷6àsfáìèåsÔ‰ aâ¨)ÅЮ#Ñ;ÇÞÎì(s¢Š'¹qZÍx1Fâ%KU~–¾„¦Æ:BäþIŠ/ø ‡€0A²jñ)D|iu¥ß¸>n\øõ %Uƒ_ï-Ø©ï¼c’=ÀlÕ÷–‚±XmÙÀºå.Á8Ó"@–Nf²N ]J )„£±`‰^MGÄ­þO6¿ßlXY­ƒ†Ð5-ApUÔÊ zÀ³À[Àƒ±h½[\þÝ{³3õÛE$MÖ)˜XÿŽ^î@Ÿp$| `*à ~ÇžûçV‚(jÔg¬kü÷l)±ZAýŽ+9?Ê"iM=²0;ô£´¯\€Sû¥2 ¥hI@f*¹ÁÆ“L2AòÊÞñeœzÀ¬6«iõ|ÔÓÏôD…bÍ. ãæ?‚¦1ž9ø­º6šØ¼=D*•§Z}Î-N“Š'ï=ºz½©cÐBæ·VÝ4Í„˜Ò´Ü¯“­HgG0êQC”’¿¦‹º Q§dRc€±I)aDD ¬#ˆ¨ÐÒ0°VBÀ‚Û !€œÛHJßfjdl1€T’bèR<8 y `ÁD†eáql½·x¦`Ív‘hv3õäôä síßæöZ8Žá^ñZSi„~(05k6 Á"þ’(þ¦–ÿgÂ¥+®€š1N9lðR†hŠCÍø•¬¦Œ§E5Âcm2Òd¿Ë`Áy ëØò6s)£‡ªRA3€d|È}æZÇ•¾ÓS0£‰ÆÛN3Ó—w§P6—Úªßü±ZEÝæ´è.[È‘fÁ}(¿ŽBZÄæa‡Ïw£œ– R(笭 °UÂu,û¬Ì{½£Ú$ó¡£Ù6M„ÃЇÓy-r©SûçßÁ:ªÞŒÁ2¥·“|³ª’.¦ÝU™–aÜ÷FÓçäÏ«ÔZ脌dÖÞ[áëæ´dêéuYÝ pÉàl` 1 `ÈF ÀÁ xfl€ýcüÖyXX°8,À¼Œ¯ dÈï‹úí©|Ä_H¨o ÀÅN)h¡~¸°þÛU:®u—ƒÊ?/áLR:Ô§øÊãÚÉj«i…£pö6œÑ1ZSõ„T)cXlh—M§/|Ü}ãÓÒbŸhS?V9n­ß!ª[ ’vëǹEErÌjûŸYrPõ­v~ȱMy€û*T)AÏ2{Bç™xRغ%©$€ ‚¥µ4ƒ˜IÝ]ByvÊD:60% «é4" µ¾‰35-bÆÓ 0ÕËÒsXG  eFË"@Ø€‘ɰç%6ÃØ,¨|EÆ xB! WAlvª;6ÀªC#^œÉþ'ývÆìÞ 6qžy‹o,€68ǨÐ|©\…"Z@`³"¾² `¾Ý0÷7…@õ)þ9‡[ÿvX)jÆ6Â[Eô†dOó Y?˜±÷mŽÖ¡®W0 `hÒ±ëMÖM%:¶[­ýûî±›“ãrZ áxQQmš†í¯Ïb1T{‚­”RÁ®@ lg¡Ò¦â’ ãd" Ø—Tna±Z+jÀákÒ &SLC‡ˆõÑ¢$Š X4K ØÆ¡ 0’Še[¤4ÊUXྠ!@+r[=íý-y*À!hEFÂ]X² ŒWÑI¤Eƒ<-HápLÊ‚R!—”ƒ¯¿!4àiXÀ+@€áÇ?XR`2~çÜXð7!:æõ)Þ=7šý7(c–‚ZáDQ9œ(q¢}\xº²á€ò“÷Ü9ä H@nùhÔI„øL•‚ˆ½¿Fƒ£“l´-¶š;h6 ýØM¾ºØ|1";Ûqª…|,9C–¡ õµ2@Q!ˆš(›b"h{—û`ìßT]’KC3O$E€At¼7"à㪨µrlÛ®S†±’а’( aÅ0(V``¦½àÀ M§c€L)®õ6C¨–[y¬è,iJ?k'dÚˆÁ‚u@ÐUaD€¼ÓXˆÊâ ÈZA‡àªˆÁ0aÏàà^çÜXøoJêS¼ƒn$üÇ‚D(µâȨ=åj¹£lMŸnÎAZÌŸÿ¤Ãiû1ò@¸-@ÇmŒQ_×¼cª€àf†;½ª9ÑžÇ1¼YZ}|ûß]¼6ÍÖËì=‹­.A ^T‚‰…,Âɵ¨Çk$@íø!툵åœÛ†±ud¸P”QÖ„¦^Æà ³®Øˆ ˆ;‰\c !¼¦ˆ0mx€k¥ žµE§J¡–°„aD`0€5€@†X²P)„† W¤ms(ìITжŒQŒ„ ` ¼™¥h¯WÎ ¾çÜ Øür—Pe)¢þŠ}Í rÿ¼ÄTjÅ@M»šÇ)™ãlþ¾Ô®î r›³µá$:T•€Y€¢‚îxsKô”½J_º7]ƒÒ‚bk“°l]F˜e¸1 d]lp™].Ç !Ð.qkwƒ±îrÁê„^÷D7„Å _%ýþ‹žé\")‚ò ô%°Á¢Ã - ‹‚ÀKãui E¤ob­NFIÅ{…“ T¡Þ¿Ëì{ …0]ZŒÀPu/H›††X ¢¹µªˆ-(­)Û#bP`(RT@œˆˆB¤`<€ãÏ;ï\ñðààñB~èÔà$Þç´þ^.ÙE•ö¦Ø÷´ÿžnØJ[›PÅ@Q§tTȳ$_½Ã‰Ãžžðø X€)@ubŸc:¸²¡ªF‘5AμQw¿‘SiFF_¢ÝÇúØLOf©Íô5/38™¿¶%j¯@깑\<3"÷Âñ!JK€QZlœ{€*)¶ã·W¬÷5#­²µ§&†ælýxSË7Ó3Û 5%R2B*â5¤¢U \ž-U`¡“JÝFÕÛ`·àÇŒë7@hÏDÿÐûxŠ¥i#€Ñ°ÍÈ'eTuã¿-AX%@„˜ ) €ÐÜÞ`~ù7ã<Øÿ}Ëòw1ÎŽÛäÏáøôÓv]|B4¦ànñ ÄeÀÞçÈlþȵuîn…ú÷˜ƒùͯ²b™Úv7Ný?@NL7Í Ž‡­IŒö7€ È=ßÛ–rЪjH<€·êýͦy¦÷¢Ÿ!Øþp€¨öç²J^ù­¯˜É}r8æ,ÀA™£7Ð!«Ò"Zï·úi`ð0´8û­gºigƒ7ç“êVÔ+lG+ž0aË®æÖpå×%Bk²+6ˆdˆ-IrùG– (!4„ª.¹¤æÏT&YX4rßpØUU ™ÊŸH`!ƒCH¶Qò¶›ìôIì™TYä¡h‰(`E`°L ÖzÎî 6—ïŸîýbð†±ºÎ2ç`|€…¿–’\Ä ,+ çÜøìÿ”h£” sÎ 3ÿ'6!E•‚ÆføëΦ̋lI«ï̧Ï>sâäô¯¡ªTŒøkG·þY{Æ0;w¡v/cõ­‰GÂ->iO×¼j³N)Ä d”£µl@ÚsI ïUâ(‹òÏ"ª?Ô„ª”Ž)˦iæØïÀbF/Ût°¬++½bia :)uv'!5]´Áú:7jŽnR=¢÷à Þ«±j lž#…c$!ÂP )RT#&‘L0È1Bcc¡R‰Á”lDbé“*@VIPdM00``q À f‡ÀÃckyÀ“Q:eå_ `xzÆÈHïž_P¾ç°ÿÝ‚v%¡~Š{Ëaê?OYiNõ*þÞmGÇÇ4 6?ÛRâ¨HUU%H2*8 *;Éé*³¼x=S˜H¸)•qåÉ’ß= S“9Á€¢®¯àl+ÏzUÙaÖ{©1¹“d}ê:¨ë”JS±ƒç‰.ÙdßZµq dt: ÓË”¨ºÛ€»RÙÀ‰ Y*±tðºPEFÔªÌI€¶¦A,(¤‡ézlÕ ÐWTûàl,r3BÙ€ qÀÐbXWX0ñ±"Ð" ©DºGª´ x£ ÈÂ.ž ÀªdÀž€žYƒzï>ÆÙu5°OC ¸CÐ1fö\# †p ¢ôJIÂ@Þײÿy –¡FA}Š{Í¡ðŸW(¹†*õ)þzm™QH‰šo âtÏóá;ˆi™©ª²$zļùUIí(¶ÖÇìñƒõ‰mÐìÏÜñr¥êwcL•0õx œ#ÿë#–™9¯ñtÐ֘Ѥ‰År„ÐØÈzÑ->Hî¢}®ª0]¹Bþ¬ žŒqÝ:Ÿm£äFªÚ)]YŠÖ:,î‡ç@¾>Æ%Ä‹Œ0¤)WéÃþÌ!E–Œt…û€l€ÎÅ•( „)õ6¶‚h@†ø{½wNhÖ³?š@ ÉÈò] XƒxððïŒ\¡SV~ÿá^¯ÆXÖØl`XÁ`vBf ·8/M²ºQှ·Ìýw6'hM…PÝŠwÊáÙÿ½º ¨Ò¡¦ø¹ŠgçtÑåQÇÜ'æ!¦É@ÎX΀æ„o›J‹ ªÊ*@žØùªd'l?Ë©ãÕF—̾é8GG¶:/®iümSÎx¼bö2Ö(xÊÖR’0ΉWR€Lð¶ß-‹±Wé¢FRŒ ûE^ÆíLyÓPgªŒ`ªs ö†Œ¼Ä#Î’5ša‚ÛÁÀŒP‹¨ãŒr˜eç£êν§z7Ê{2ã„§òÜ×ZQ0.: 4« ¤QdAcn–1PX8 ”Ÿ A !VJCçàØùEü|)Ö¼€÷~ƒÇq%ŠG« Y·Áˆ @À°47€ ¬W().oOggS@# &¡€c1IÕÿõÿÿÿ$ÿ)ÿ<ÿ,ÿ-ÿÿ4ÿEFHDÿÿž—Ü û7…Ú ê_œSn,ûo@¡ö„úoÄÉÛ+G1\W¹À>­ëm„T%­Ì^Œ„)ûÏ“G{#çZ”pl™¶>ͼ;Ä;sÔð[ú†±·æ](5£±â† ¶Õvj×>Õa@¦ùIS»DDDd€ñ1xÝÔĵâòÆõ0Þx W›Vb@‚%ñ%vÿÓ7Ó£/Ib04ŽñÔ˜®5´Û #°1Í¢èIВ€±$+ -*¶þÿF ©ª"D’P&€@B0± ¸©°]" $'ÀÀ-wçÞÇM€ËÅbx»Ìq¼óð~`Á€BÂW}»Ëÿ>ó¸$B@ÔAü€1 ~÷ܸìA2tèPS,l·þÛ¡t¨j2ŽÒ^ãÉ­{îGX…`'â"°’ˆvt ÍZ'¢6[=Ï¥ÔKpñªJb À‚g6³½™îY= ·[IK°–g>O%Z“ÁÖ:9JžåsPUU’}ö €Û…àxª¢è~ošŽ$Ò†ÅÔ«•A\ÃD˜é˜©Uô\˜XÖp ñ( ˆˆ2FP¹›‰R$,,ã`œ)WÙàPã²IUKÕ*‹IÙDÜþÚõ®¶r‰Ü@A Ž<âS– U{³°*X¨£!@Xž÷Ü øèIËN¹nCžs¸õ'…¶2íQWã3dh×Ô´Ó¼–ê‰qÚ€Ü÷ÑðA««‚‚Ìeõw{·–“UHÈþC2Æ®2ªVôˆ‚„0¥ï®€ bÅ *§ªo0H¿E´o£uYQù± ’zrü|¡ˆO™íE¢Zw dØïÐæ­Ž/s›EQˆlP`Õ°F±÷üG!¯Ž‚H’Âñå@HÕVaÄ$ÐHF24$ɬ©" lHÉcûÖ@ËÄB&£Ÿ–±„!.ŠDaaW-Ðn#s‰X$ ª-ui4qPi p@d¸vŽü@8oðX F­àÞöܸÁ¿q£PTóžÉü»:Ô?`Ö§®Mk<ÌÅû­9]Ú@Hˆ ÐJb­Ö‡ƒ$D ‚€ç¸|nûnqœ7SúÉ Içú¯­–gµŠMµ&#µòšê8ÂT|4rñ€ö†ó+92^"NHQÙˆ’²Ž„ʌҽ6²¢Š“F‚޽ý: ˆ°h¬®;¹õM±ÀØUbDD‰©®êL¡ÁF¸ PM½ƒhLæDr!$ Øpi4)µ0*5Y1¶ e9(€9Ö€ Å@ç òÏM ¹( 5ã3‡Ú›Ë¾ìÇïGŽl ¾å6Û:©5hU–8¯µìMJqåÐ˽©#ÁSÉ„¶Æ¦:C´ô….Ó½ö#NÁs|ß9<Üz­‡®M’ðÈš¡]$-[ûj/ÎÖO2–Û­ªÂÏ=ÓR*—‹AÌkµ– £ÕÅQ$,eѪdç)"Kf·##èlË•‰’ AänËTžžeCB¨]0YC!÷›#3àqˆ†À ÂÀUª&i–PŽ ¢X¶dWäLMl€Hà)Èi­*T@ÜO]?žçÇàáÀ¸ðÞa€D ÞçÜ øÇ¶ ¶P:ÔO±¯¹Aö¿}ª@…õSüÄ´eÍ›1·”O@8­3 ÷­mÖaâÕT*I@PR Ö#e_= Uý¶r'šß^ÀΠgS›#O.¾šüÞ Á­p†’ ᘀµJÄwq±òö§ò>¬ ¤õç’’(„t‘#Ùûº,j‹¢”ñ ´Àdõ+®, œ¨´&ƒÅ`4@]m/eµDIkH)ž85k#ÀUÑUóì·ìs6õȉKí踀UÁ5 T hDõYG]R  ¥€ `:¡XI¦WÍhb unž‹ZzßYP S0Å…<¬¤¢#…Ú(Q4­@â¾×žùç®03W+¨Oñ9þóTCÖ©fAýŒ?€uÿÔñã¦(™íï~8bÛêkõ©LUU*€eÒÇõÊ?*™ô÷¼P@†éÕÄž±° L9ÂìhTK‘.mÁ²>¶ÉCHŒxP*1‚Þv.w7–“ª»Žy*$ÄžëŒ:ƒ@tX›{R{ÃE³ 扺A^Ñy J§w$Œˆ2SêˆA6\æè¥n*ÅK¶ÈY …T.´%@2ÊØ`9@Öºì>SŸ³‡H¤€H™(ÇD²V‰Ä9 Š„XC‚"*„…*Èa¼µÀ,A¡€À’xs¿¼çÛO3þ™j·M^LÉÇx›g¼™åÍš,„!(VPä{•õNÀ 0EÞײþÛ]• êgØc·ÿ¹9d™*u¨OñPÖcO\È ®ù\š&&m@!N¦ ó~ô·Ü[…p"­ªF+“ à|ãz>õ–uã‘K¶†\1èÿ¦ò2gþÖ÷!š q)uóÄ–´»¸:ÀcÈf*V&)ˆ—ÁòøqñO–Ñ©ß!u«Oª@-×< Ô2b±á¢Ç« »È0št,Ë´ñ(Š0n¤Ïð^ølW7œúéš²¨2ƒ $ˆ>§ {*–FC<ˆD` Û„„üW—`F.RÄ–² "E¡I¯îÿÀÎÌþù|4 ÅÏ××Wœ€§‘¯æÆ€ ]°ëPl£k-¤”.CÞçTÿÛ¤%+-¥ ~ŠÏ¼ýÏÝ%¹†RPŸâ3HGOkK¨¼w?L±û@Î]€wqùú–0ºBh¨2I\?p•¶Š?#8p¿³c8¤ѼWäu² oÏ(iË »Šx; ”¾Ï·Yûwäø?«êå/‹±Lë{Ц¤yRZÓè‚e!Ê´ÜØ{`¶BÖRTãÙAOPD—SNy)}ö§›ˆBÍÔœYR*Œ;@°³#ĵÉÊÔÉ H˜hNLNOÂXjUî7‰ ÁÐ ±‚ÆZ°Hå€P`+Àˆ#Ý„”¦t¼Ÿ7t ZqCåȃÃaàï=æCó›/äTš´ÿØíÙ†ϲðc Ú  È§… MžæÜøÿ%jJ‡Æ5ç&üOf´„„ú?€lŸ’ANÓ>Y“û‰èÉm?‡vÝ0Ó€U±t<ê=Ï¢"KÑ¡ª ¥Ârºþ#þõñ›„ú®RR>¾4^Øó>B’JNŒR¤ Zm{+R‹r)Hýbh1R/ òX›B:rMhó+ oÎÒ FÂ`ÀhˆgpC¥ˆ'×ašYb Ë2ò]P?î‘¥³F`°1w1Œ{Ù™J Äët.QÏ[Í`¥9Ì,¤£ B4]H0]r€Œìg°àH“t™² U°Ò¡ H‘Xp,ff°a~xþf ÆÚ0ïŒhŒ]0X`/V” À£CþÇPþ{l¥ZA½ŠÏ|æß« ‚* õWü<Ê^>qn1¦éš sé °ê_äKÌQïFª¨ªRL‘%D%À¾±‹¿ÁaåZW¤Œåq˜‰Ç¿Ÿ4|ºZ hÙ aìÑB_¶‚ht¬;B=&®š9]V€âÃ÷¼Ñ°>ùºÏm4srË›?£þ…¥½Öv´¹'ÂØ³âtëx˜m@ eÑ5 ˆ?߉Yš«: ;}£”³bg¦5ƉÐm(aÖ\Ž Õ0JYAܵS¤ûÜuJ+‹À oB€ö<8B½eÑzp7Àtˆ0˜ŒŽîB»d `5 4 €·|ÝáØ¶²ÿ{Ž6à€ùWšpaBy¥ ž¶ÆÜ û_D¯z[¡öÇ܈ý¿ƒ ü@íñðÚ'ï/¿:Ëfïýþø=×¾ù`½÷6à”g`Jß¶tÔ@¤‘H5÷™^ïáløí N >€oÞ½`^Ú¶¡é÷p§C³ï½ì²ˆ›~ú’ìÉ>#">OnB† Xvä+,µa èÓ:çSè–ˆB9p}ÎÄ#“q^×ÈèBëÏgRß[@ËþÇËÁo˜·±‹ÒÄžú€á‡¿ p6)¦uÁÚ]‰—å’€¥“™TõI!„ Ñ*hÁxè2¶EhÓ`šÛÞˆp( ‘AEQB'`( Òz@¤@&J(@¡ NwÿkKùªÑ€;¬îøq[/qC ð¼¹¼ÈЭ逘VÝmT,RaÏ#öòúåi­ŠÈh@U¬7m…Z·Á.QVËÿˆ§¤«ý /­å~Ä®Ånÿ5à<õüò!dN@§î½b7\ív.c,hóCA‹‚Š‚.œBÁ²”Sk´ Ž3,S…\VÅ?üRÿ(«dVu?n$?äZHN'_ ,Èñ|Ú(ËÌ6ÒíâiÎãïª0WFAQ8ª¢ˆR‹B¿ÎÝÏòä¥ÿ·Œf ~‚|öÿ€ž.˜´–ÿ©¥¸‹¿HpywÓd Eøæ¿ÿlXÕJU3*§•kD Ðj„p lÉV0ÂjѺªáÚu‡ZçÜøàß Šu`¼{n‚ýo’+”UÂY”§´N­3 7=®·hjËþòÜÈeÞÜZ }Àìsm˜ëàZÐŽ¢UhkùwØÛæðŽï~õwßþšÿ:?µyn7g’½ä8-ÉqúxÃH1l"ßóx•éõçS„’\QQ¹ÓY[iD(µ–MX(®ðžd$O.BDýv¥jÑ €dÅq:Êa…ÂØÏÏ”µ®c LP2!(4D²Zh#†–Â)µK–é¸vBƒæõZ /ÀÔSQ HÂÏР”¶p`@„P s›à™”Ÿÿ•€‘ Ï€ø0ª’ÌžÐHXþçü½„4†&»aªDâœËÿ‰Ä(Ê €wx¦(h€6ßfÖ*å:¡›¢*–]@ª1ÈŒ®äŽUÛ‰®_g¥‚Ò˜-_{@XmÁMÊʲ‰Çˆvf;oŽnå7T–}ÓˆÐ}Ñ‘µÈÂv(bqpf˜ˆ½ï$nœmjBt•„ +@˜PÑ!,í rkÛ… zÌäX+‹Ÿ™` JÂ$‘“¤ÖâŽc|êF!TÉ ùû»ô êœãÚvSbØ6K ‰ôì#à"sç`DÏ&³T#ÉŠÖ¥‹×Œîʪ^€D}O €qF(§k:‡«è”³žŒ])LÈ‘c㮎*€v)ä,XÐËU„JÀp åÜB*LD m¡ti^œG”bdK·m° 4@Ø&àÀa*â  <:h;þç6ß…`†Jê¯è²þÛ+J{*þÞ©¸9DiOÂ'àjú=í ZUUR V „\oi航ߩxVnœ(©LÌ‹¼%T¥³’W$Ð#Pʹ­_»L‰ä,lT;Й*»I9C!mv·Qg–EÓt%ÀæªÂÖļ×÷{ͼ»,ä@ž88’%"‚u0 B$‡ ‚|ÖÑ. )¨"º±€b UC½Ÿ)à6Æ·ïì^X ùEFÆda{!DàT†¦+™Õ ¼—q"­¨®Ý•ˆå¤ì– /(vÆÂ <86Y c˜‚ ÍýÛ|!åä P;Ø©õ˳ *%r¤ þ×l¾Ê•¦¡,°§â_t˜úßJVªt¨¿âˆöÑ)§XœÈSŠÈÒÈhãaš÷Šj1§ë A£Ëˆ-OÕfF¸ëDU%KiýWeÈ8þ?+™jÎe!¤ë¾{ïUÛîüDw5CîÞƒšƒýR|Û•XÅw¯J"¸ ;%à)‰$4䞟m9cÚ DWJƒöYƒˆ€ À¢×e¤Ð’Ô1 %NùµûT’CŠl¬YXC¿‡”°OcäÀj>ÂRi8D‡TÑNbJ–äbÀHˆ¸e,P€ƒTb@‚ªfÉvYàÌðìðýÚñç¿vô½il`‘ 13(‹p$@~·ÜHðoÔ*-¨Ÿâs£Ö?–†Ž4¡þŠLo]&§R ² ÚOßÅvS©wpxÝ,ìèïùï®…šª2 š”éˉø´X‡fòÝæ\ýýzÈKÖFs ©­¯9†\ýδmWî»Qùù(Aqqô¯Xž}…¢´šŠ`—¯í ÂJbÛU÷ 0éDl×´t7.ècDëZçàD Ô¹Ú/N’þšÆ<-ÐQ "ØàPû-H] L B’£˜#ÉYjk»þ 3€°ÃÆA`Þ)04€°­84¶…gxB R®¨DiE”H@€ƒyeÀ‹¿‹6ÜP,oÉt1‡³,A¿;³5p`gºì†ß¤‘Qõ¥dA¤S^×Ü0û7Š@µ öT¬ƒnݻʶû¢©Äb^ýõ½ 2Öhï,z(¬9x¯QÉ>{PÿLÎbJÇf—ª\íå×Ñ zpjª h¯77¥ö5õÉÒ³±U÷( ›4"ï ,’Â’GZ[pçÂû» DlƒƒÀX%„Ézdd…„äâøQŒÞÑ×ON$l €°¥ÐY@$Ó¦iDc+R9£~”@†B!È0@ €÷¼ùûªsÖKý×áÇf{ðà`“c¨Aã>ØþÝJ0TšPŸa°9þ·º3Z¥ õ)~ôr õÈv<Ñr€ë ’éC|ŠŠW'ªÊ%A^×¶ªMûåHìY~]®;öAx-A?ÜÞ±º%Hk7+€f#{ð«ÇŸ¸š¬ïé8l:^’7ÕÁQCy~qÕ*sÏô®Å ðÊ#xuÁ"[IX®"b±¯"5 ²¶¶BÂÊBÞÉ©4§$@¨w?4;äJ1Y;”sØI,ðáÑ`dÿéRÙ w»…(Ú¿‚`²NÀÉK˜ ¼[ ºŒ™èA)Nð€ ß-’¢s€êÉ‹±±f¶ýXÀÖóåš]Hš*¿mšŠäiÒ`þ×Ì›_jÈ*µ´n{)ö9‡…ÿY©Ö¡þ†@¥y)É$¯½ ãTv1IÀœ¹úiâëʪFH©5rl£_ ³bõiXÈíûÞKKLÉ ¨ýÖâC¨^x¢ÓÇT2¨;‰@è T@Èëêk Óo–¢ÇU\¬¨Aѱ DÅ3ê‚C·jò¼‘¦@tTêi’¡a,Uw=—*RDp}J;‘D¸òÀ‰‡l"# ²L78–ƒX¼Ãçæ‹ý<¿ÛâÙGáõÇÙºi¸ê+¸<_ D¡9Nš† [@»BJ0€^‡Ü0óE‚B¨ãœæþOÜ@¨&¨Wñi]“™åŽEŠkë8ìt߇Ï"Ä!ŒUU¥‚R¬¶½ØU]ÇOMšçÌ _^ÕzÑÄF›‰ 2†¾¬Í dL@s³¹ø—¸ó÷{<ÉÅDh¿9mhK¥4ärÖ¢q@ÝJID¿ÿrŠÔòKVr¥¡ÒÕ#CÆÖ4ð;ŠJci:{ ”X2ÊÓ3«r`®‡Éf߬ˆôž û)NiïÎ}—ë®ûùÞÿ÷ê»kïóNÖ›"Á©"íì\¬÷B)BOrH¯€@ÖPp†a çÜX~ó å@•0º ™”P†ê¬øxeæôÁü 8•o›Ñnµêƒ¥ IÑwækO©²Æ±jfœiF?ç/ ë²lÝQÚÆ±:af.p_ìÔòwZz˜'3Ùi>uüÂÞŠýF8¿’óUÉ'"Èj &ï™,„ÎËôU³€d! òt &Åu ƒÆ¬D-FlÕí W 5no**`? WðõŸ‰ˆ2 ˆx=<á²!…ÅB•t¬©:a`–€Ì”mÁ7Àe J@ LÀ(4!ŽÂP *†lk!  @ã’H€€ðÚ‡Ñðm“DÞ÷Ü ü{: 5ØS1®¹qRB ÚöTüÜy2äxìǨøškCC)ŠäE@(À1>Ìm#eÑ™âºå`2ÙÌã¢DVZ [‹‹hÈjºJý"+ìò@©ÐrÉô»¼ï_®48â°GmŠžkhb5DH =s—XÐ"wœfM‚B綃(Z°ä»Ö\#PŒ"ÙRQ .EЇp€8@@¯Û`ˆpÁJênÞóÚ€R„.¬ä^@R.WB5èÉЀÁc@E|2¤ #0b$,%!d*?úJˆ ˆ@4â BÙf‚1›ÓkD“ZT€bÍ–¿ïük†å€ñˆ¶”ð0 ² ~×Ü0÷gJSm‡ºïšfÿô’ÕÔ«øÉgef|ª¬Sh»Y dÍ[”Ï 6‡° ½¯Y›JDxUšb€L£ÆÆÓû^+L›Œ[Ö.˜w…¾sŒxÕ`‚{tÊ™Nªo;Ÿ=B%>—)BŽªÑ3×rDŒ_X¢ùr¡ÄåivD¶ç.„¶*¡Ú*Œì/mPXf±&î‘!_T„<ºAqWôÚŒ.™ï˜5Ô !$DHȵÓl°ë r5Î}>ÓݶX 2o1>Läv êQ-†A€,CЀ±ˆEOd­:µ0°„F¤›6 ô®J€³p {°À1`0D¥ JådzÎçÜXþŸ)J‡º÷šÃÃŽ&J‡º?€vÔ´SªLª‰ÖÁ Iîw—Ó ™0 /@äcT|¸a­’A’2MÚßõE‡xE=ÙÕw{› Ò}%;Z»ÄÛ ³ÌÇL§«Ã^.FÏw~Ø>Jª!çº Bv¨~.0”Š"d<ä9_ž ÅŸ*ª–Ôˆ0di…Hèc b©¢Â=~ãYm¨Y‘ØJ@euÑY`‚Pô3“w E5^=Ó••‚¤A›È8œj#0‰DീW„($3K,p :K<© AŒäЖ½J˜ÀÐ.€äU«/†ù1XÆ( œÝ°caÀÃâqÀÐ#^ Un§ú5OggS@› &¡€c3@§±ÿ"ÿ5ÿ-ÿ2ÿBÿþÿ ÿÿÿÿÿÿÿ~çܘúÏD0T*¨Ÿbœs£™ÿ¢J :Ôßð D¥R¯H;^›¬IHàÃ~ä¨x!(QU•II@UôOÿSì'ªd@"æS;.êgÔõQ|ЇÊÈ¥<3ä*­ÏAŃÙ÷¬»ñö»éz£^lß[޽¿;ïW»“õí 2Eéì­8tžhhL#?$  ±x¯Bªb?¾ˆœ||½­ªIc‹~NDÑ€`î&B9š–»A¬Ç©šiÈÅBD,$œ.b#MÆ CÃ0˺ӔÎB” \"ÎÜÇ`žôv· (t6îN¨2±I@ŠÛ€°côõ¿üÇ2÷—ÓÿÌqèH¿:zÈqšv¬Í‡p©âw/W€Š¨BT°¾ðë­Ø;Y¦y¹ä»’c4öY'ka™„Ën±K?C ôïç]@aw°}Èðt‡]´Jœ@yß=qo½A XR2tß_Û¸a9!% tŸ`Ÿ 6I BeW}ÀÜóž¨QYFó¶! "¤Ê¥ÈØ63t·\ñСFƆ %`\–-Q£‰%d°ýãëRûÔHâÝ l³BP U¥\·ÓÿÉÚñUªI+«—kÌã¶Ì 6’AÜjBØ\Ç®ÄÂßAª±€áñJ eô—ŸD@n@¤¸Üÿoƒ¶¶£®Š}ÌÚÿ(¸BµjŠ7úýÑ~í9Z×h­£µ:iU•lÌ@­vM›DË‘!£}»ç&8}œù"Gev|æàËäL°Õ‰D q×`ìì23D²ï+  DTeÏh»H*C2°¨%H¡—htNƒÀ¡§è%Ê vü.O 0Õàal vv†0% Az™-ˆ–Ei0´s ¤–B#œK$¤¨•Ù`°£Bf@±m#âÕÇvº¨BZ‡l“@¥éàã3þõT€Ækè(Êrx À°¾=»Úl±üðAøK¯–R@Š–¾¦~Ç…FÓµâtƒð;F ´ jÅåd™õ†ÌÑ÷ا·òÊ;äiŽ´õ/ÀÁ½~úÒ)á‚H%Æfš5ùií]C©6Û†X¶÷ê°& 6 ÔYƒZzߢª’³ h±¬¼¬3 Ý•yPXg=ë’X¨  öçtpsž%°)‹ÉÐcµÉŒÍbl,L„©eD\@Eëé ÐãF´€$)EÂ2 à ƨ™` e$TE  ÐUº·°Ë‚ MhT£ö}3 ,„l5pHf1$È ˆj% Ô)Þ÷´¾FêÚ‡êªø¾Ò°vI7T߀8Îxv™y2ø’ì»;>uÎÌ* zæÌ&s–qØ{( @ŘÝ\SÆ&<6‡ßÉäl¡®D—ɨòƒÕ% utˆ”9Ñ ©Cí¤Óa²“€Ù½^ʬƒ1ÓI´…4dxU „RÇêµÄÖ&`@Ы+ 0 6«D02à'+´ ¦màpƒhiĦø€¶n µÄ€ ”Â.Báíï’ †„d-¨TmR.2)Í¡›ºÔ`… XZÕ¨` ÒP-``Á¢Å2.Îp€…4 p^÷ܘý7¸ÑTÚ¡I]t#öß! &ÔUñð¦Î])V‚\ mÏ€rßv?*3Ó!Š‘dR €éÏJnnËY¾OE,ó92Jv`(7c^ÀÈ ’ý↠ Sžq´†i„Èy–¨ßÞØ.wìšÊ™Õ NŒ THrݘ¬‘ì°q¬ØC– –Y-…ß²*XìùÂ8 e„B À­€î«üóîØ6À*C-"•L:$D`0¶F{d™<ƒ€&²‰Ë‘ x@è‹“8@ ^ÌüÄfLÑÈ=A­xÝ ü!ĺêPµYÔ¯%—ú7×ô³w*oîvÄẰÈ„DÂ6¦k©BUk*Éø®xïO²¿ïù¼…’ã‡]fH¯¨M_ž¾ñ„†7_ `Z¦ ˆ§/Q¡wŽK0À“ó¨)¯‚ˆ"^T\ˆS‚¬R¢vä(‹;ÎýªˆR4~U]F35aýÒà ՆE"6ÉÅt7ôAþ®iCì ‚ÉÅôú1Ì Y BA€ (ôvobE§Œ Œ7Ú +À@,!ƒSÜÝxmƒ ðð¾8 ÿÑÜŸm zcPœÄ†… ¾ný‰€IZË„z {Ó ¬Í£TéP?Åg '"Ô)µ*?¬f@}¸zÆàÚGWón£¡„ÀªTž¶Íÿ ²}Šè^Îæ%ÿ¬ìw4 Dbe®:͞ń;ï/k;j1¹î0ºÜÕ jžw2°ÿ¥ÓS‚Aùϸ@ ñ s C%ˆ*fF+C*n´ R@ë×›ŠŠQŠÀ001`Qy™né$o@µ(Tˆäc”Y5„ðW£ PÑà0;§Œ‚d9†€ž v*@ˆ ê")DÐÆ€ƒ1ÓÓ^bJ4€]bW ²TŽ:Ö‚Ý€±X`þÝ û7©¦7ÝHø_¤E’ Žs}Š€w¨óZÛZ  \g@ïm0‡_›Ê•ƒT& ‚@FíÚú}”Û¢ŠR?Ù·rbª”~GÆvÁ#¸I{Jðâ4W;/ hÕ7̚؅£a¬ÍˆÜ €{~X[m)û,Ì{·½¶`œ‚˜‚mWÙm2}Y+b3\(Lí°X5 ‘ˆWö”=“hÃxŸl+ÝO¼´Z–y{3åFT Y×A°Z°.ôLG‰t¬WE`A«€ RAÍH¡–¿êéØVR@4ÀAE6Š Ží ÀÂ2À P@ÂÝHfóÁ$¥ ®ŠwÓá™#AšâPŸâ3 ŽdqYàݨ=ŠP¹Aß2€ã}ƒ4°o3±*<€ŽOâM}Gˆ^>ƒ˜ß ¾ˆÖY&VZo´êgÙíåŒW#ˆªZƒ€Ä^8¦â,”^ÎÃÛ–(›Éè”\bý7 Òx³U,Vap8|õ‰:p@AÕ¢ûjF€A ãŽb‚a“"(í=3/´¢’ù^1=Ÿ àÇG‘@UQ@À¦Ð}£#âà a„(–ˆ2$lÒ(trÓU+´¤ HÔª¤‘ÑAR¤‚S‚BpC@8PÝhøÏ˜¤thœ£n˜ù7¤( õ*…èÇ'ïܽޑ™@4 ¥C u`Ÿ‰OqTñ^•LÄÖÛmlνßÛ] ìíêh¤XŒªtWúR·· \<ë…LpTÐ,“îl+Q»YñMRÍSå1ñçöÁyd×…c Zv”„×;5hËÛÔ ðÔ÷õ‰ŒzyVAcÀz% ÐZÁbò¥YþSËjBaD~AA!LýB €±5ˆÖ€©MoµÑó䀈Ac0 P¼Q ¬ à!c7¬RCb-’ž2 É ÀºÂ€,Ýhîâ0”‚&sÓeÿU¤hIõWüÙ.ÒÓÈ|³B¤úõ§2’uûŠ© –ÅÚàë °m>§]®WU €Vðn~Þ¹æý„û]f'“üU~K´Ëî „ÃE—´’6LúÜôYRèÉþS´EÂÅ3uZ*%—ì«SÔ$Ȉ %úãVÞ›¶Š‹hÄȤ„¢¿:52 À»|Þ+#`Q±…†À¨zßZ ù$Ó:Å   à­ôGÍ©ÛPˆWW˜§ jÏÄ˃ ³¡ y G’ˆ ˆ ÖSSjŸ°X,_fkÀ¦<àà<OggS@Ó &¡€c4ݹÅÿÿ&ÿÿÿ'ÿ/ÿ&ÿ:ÿ3ÿ5ÿ3ÿ@ÿ9ÿ þöÜXøÏ*uh|‹n$³yHR© ~Š€ÏP÷¶E+Ázœ@H²u!1¨˜›y±ªÈ« @"“ DGãpU¿ŸòÔ«W<:1GdÆ Au!BX],ïéIÀöS»`Fuµó= ‹b'ŒÅOóÑå£1‹£C^X`ÐŒòùLg6Ó„ e_]Ô”¥¨(Ôiv”«¼½£@1ÓéÁzÆ'™DaÍÁ)0ƒnÉRHшԡDZ­ Ѧs¾y˜ ·ÈÄò—eÄá ËìbZ”„ ÁB d´ÚQU,N ŒŽfÒ{¶´* @l0Ø€ 6 ,‹C:R^·–Ý<ÆÚ>Ô[ÌsØ#!ô­©ì¨OñRF9©V—™­u]kâQÔÊL`<=ö ÔlÛS‰]¯ªTèÚ$=õQÒ=Í-[j†®­Åí,³v•™S5#!Þµ¬ãµªf…•cEõeJ ÛcÚ´šI =XeŽ{h¨ÍÊ­ghÖ_Ïn(¯%1Ù[„v"g;XÃTüN¯‚ã™ìÀTBã䋵"*X+IO_•ÃÿìO˯Æ£b"²jê øk‰]€- C¾$^Igƒ¦{ˆbH`"0|S#&&Ð$0pn`Ìô…¿°³,¶7±–û?àü\ˆ:R?`€T;‘Xþ× 7 ÆUmBýï Ãs›Ç‚*õW|qEQmå A$ýHר΀á}(eUUÉ `lºÔ¬o¾}ciÄbökÒY¬©¥e3·’¬)'1£/ñúàC€>‰$šóRÔ"¡ï·ÈÄpì#«1ªFïXB·ÿëV@¡íhÔ}oæEú0!»Ü¸{}@f¤Ô¡Wå8²Â+ê dH4𖪳ÃV徸é ÷G™Þ¦!:²å fXìœ^©QBÈáHl*m lT¥¬6òÕ¹Já„õÙ Ùl&–‚@–B€N¬³î½ìŽíKv¼³ÇÏ øpï€Ä€AÕ8€"žç®þM’ eAó¢Úÿe(êV|‘5EÄiåàÎ18 #ìˆ}¦jV—é7À‚$ר÷Ž+P¹ÀÞÁTjµìñ™ÇO]‘Òb6ˆÎaS܃E)*‰LÇ]lë ¸¸b½iøbØ£ {Ç ƒúîq§XŒPîRwœ aiSŒ`+=Ä6– Eh^EI£²A~{Ÿƒ- llªº«ˆ“ &†Ñ7ÖÔº>cw„@’­Âàj…@”±)$àÍÈoiH•Œ'‘€ÐXT°Aô8`‰ TmÛy€p%°X€Dg>^×Ü ü\ Ò:+ÞA‡‡âJX*u¨×ø8krj 1ñ.eI&°¯c­¹}@œ¹ísT†m¡, $DpAÎ%¯ç^þ¨§Fã¯ïÕw£A}ðlª³òZ¼½ =1ËH€4‰W-2W3„ì¡gP@&ÁC ÂÂ1çñb²«ãží8QVꬃå[÷¨ÀùéMçT ŠÌÙ^dL;GN¦ÛCÙ8Üaw~¸ 0ZP 7ÀZ¬– 3-3ÑeÖ-=$¡®0à@¬(?AÑN™0t„Ê’ ÈQ”ýzNˆÜ%¢•1@Ðc¯Z~‚@”ha@!åª ä\bxmàÂÃúP†=h§(€q>×þ޵ 5'Ôg¬ƒþK¦þŠ?€•Øí§òÚí$ha\î Ø¹ öÕOŸ‰ä$¤ªJÔ2A «Çv4Žw£a½q›(¦X_k’­dËP‰ä³ÐÜø<«‚lÄåfâ»+(PdÌ|_Åìq©zÆŸ¤E!Øî Ùtÿ^$âæç²@é€Å¨¦([­œEܲ bGĦç³!@1E¨twMCh½G‰TH¶9U„Y ðSH <Ã^&¿ —Ó¬ Ž` ±†|-@18dŒÁ ÀZ "@´R§°› 4¬¥ÊX¬Öô˰\0hd¤€³€g7ÏXüµ¶Yçz€÷XŽªÒtû„ä©^èž×¦üD Ú„ú)æA‡Ù›Iè[GAýµ{‹qQï ùôöÁà°æô¹ŸQM±A«ª2 È C\kükæË>ä½8”ŒOËœË4ä(L?ÕºQnè¥2•fuçÎY ¸üX% h—A-9Ci>WA³"ˆRa'@Ï™LŒ¹ô–Ú:í%¡©p‡M¶WD°3G÷tŠêÛF`*…Óà#‚Ò×Õ«šÙ„ š®%È_Ñ È#€ŽIV„#XB°E²!İ"HY²<>œV*°%Ph1°b0ŠpÉb°{>a0e ‡Ÿ¿pû›þÝLùÁ[p\XðTú·žÙ6‚†7˜I˜‚#`=g(la#d¢3…@BÈP€CŒ,À`° ‚A6ØdAÈ„`©h0d´vcyÐŽÒ‘•6L^œ- M°8`¶½[ÆÍpé–å0ÖÖ'ð ç ŸH,ÅÒt˜Y`Ó¡}ŸW˜W$‘Q²¥š^·nÿO%¡¦x·²þ' ‘– 5ã3 RFY§È¨¸;U@pò€äÈÈÚ†Z¦ªÜ HTš5fÞs€ÛíùÐî¹ÐýU„Òë[T)^ ql«Ø3¯šÏ㜡8®ið„|²ZªÀ÷ÒÒóí•p·62º~âvÚªht݈t»ræÓåUÍ¸Õ T˜ßë—]K¿u/$+‰“†©å­ J‹'ÅÿeÆúŒòlâ„5†^)µ3&Z·Õø4`f.ÍIþY°X€€Ê“!€SPÕT V`aƒ w—EÈ'™# \¤Š*dÊÃAA*δLRZ,¦Ñ``kgÁ¸ò»,àðÀ`}`iö-‘È‚G·Mo@Â2Pâ ÀJÑ pÐ<3^çÜXøÏX˜¢t¨)ÞA7fÿcA4ëPgÅÀ<¡rœà¶ÎSM´š€èsNÄG5ª„I¢éN_%ÝaΤHÜÖý— !AÆä”ˆG¦ãK±’.ⳬÔúã®Å™’ä~²”w–ÀRãÍK4­ºã û,C[C;iz–k Ë2`›*`‹€uÅ|Çüí7ü="´ ä³@aˆ , Ð B•Ð<ÿŒ–i<´Z R¶MД ÉX …°l£€’敪fâж¥¦=Ô€ö„6rûæT{7̀Ƙ `‚ÀÁ0 DÅxU4ioOggS@ &¡€c5ßÄ©vÿ ÿÿÿÿÿ%ÿ)ÿÿÿ+ÿÿÿÿÿ^'Ýh濸”ĵ®ŠwÑÚÿ%hQ]Ú£¯J‚“Ó¾j²}8¾_O€&F½YŽb»«;óù š$Þftm<Ê+ÔLɽ˜:ŸUǤx’:Lè²kßÊI]b˃µl| cWÁP¶w2F‚*'‹èðOwwß!6ºS(gµÀ¸Œwq¨ˆ hÅŠ Å“n‚!L p`{`’Þä Áº … >?²Ô³1½v¾“# `•ˆ†B .¾Á–X%1›@4„‚ÕÆU*iµ¤Ìp£7¤‚ÐA¬Cà  ŒmÚƒ" è °ÝXîo eB]뢂0(ªDžAdÍDdQ(Ïîê,èûRn©Äñ.턇'Œ€Ptiã±^Ý6 ~6v gu !—ç>5ÇÓMï»+WŽ[âû„f¨â)Ãä “tt†µˆþ @bqÂ/±/ulç ðüinÀTb\×X½GsÕi%³-‰Ø'ž·Š‚€Ú „XðRÅ#¤€ª€z¾Ò£¥QÊð—¥™Ó@ ÂeJ%¸,Ú€ K"á ™°€u‰ànÀdz€*¬šùB :@DT°$°Ü-„ XÇo‹"@>Ý0ó;†V ê¤0ݨý7†² ®Š?€d }ÏÁM&ÞÓÚ5Ø\žÀJyÄžÌ1R̉zñN(Õĸ›.=Ýb qÓåš3° ÙÆ4Yɨ Â1³0Ÿf•ª ¾oì „YÛé6l^ÁÙG@¤V=Û+ZE2déþòÛ/` µbE@hÎ’É”‰jÂH ˜`ý––#ˆ*蟾XDŒNÑ $h}À —è*ݬ‹™ÅXôëB£€nWÒ°$  Ñ,Ôp I›šT€)¶@­…̧: q ðh@¤¡Aj оæÜ¸Üï Ínhò6ÝXø'(C¥õ*þÞQ‚9ðP„òäB½æcˆB¼8´9Š$š€38ö…på&Šº}3ª’#5³WsY>ŠŘ" >;¯MújÙœSrø¾a¸¶%BÄ– ž6š­£yrÇ‘—=!ŽV’¦Å ²“±Ê ¢ ðÌJLðTQ¡Ö¾§Հ PJÒB¤¾GM×ÀÊ=¨€ªe‰€šÌhàêÁ(æèlÐÈä'¡ €adh’†¢ñ8€‡/ nR½”RÙVNˆ N𠉀g lJE*!Žð@0^÷ÜHøoP2¡ 87Ý0ûoB@ô%¡ÎŠÏ ]­¤j*¦xOb§mâkÐ×ý ÷m›áàÅš5@Ybº#Uc d_]›*ï°@ÀŒ M#Šë¾¿?—aê=€Ä†@ÒU ñQF 4³W®V‚Üýà¥ZÈ{@3˜Ñù——X¬Ù­ì^š}UC ;{( TàÝs¤ŠïôQ‘96*ºTB,­çÍó€úX’Dcv!Ä9!.7Ô €%#™@Vp؆1€€h R”x@@²°€Ìä@Ø cA%2)h˜`•ƒ,¥a< ~÷Ü ³yB‰T+tÕÔߘ7Ý0÷ßXJ$•ì©ø ¸^Ì¢Ls€÷uãk廀–ŽO€fXûð)–ªaª$ ¨$Ûì ã‘^ Fݶu#§”,V¯å*ÍÞ1TzÓͲ¼a ‚_Šæà“„$„Y äRÝØÅÖjhŠÇ°3Qêa÷ XR –©"aTK.Çk*ï›:‡GY€k.ˆ² K7ÐGùÏP-˜6^5øøx(Õi€ÉɺW|GHÇà ‘ ‡Òà 4¬êf@Œ'Q&¤RL 6Ð 0ˆX T€€w€ 0;~­n‰(¤6€`€a²ôNëÈhX{?ó¯åÕ°8< þöÜH~ó„ (ìi\“nüÐé‚ )%ØSñpg|úºï{X뙀˜ëUU" II €è9èÞÞ˜ÄØWPʧ7ŸWYOr]|Œïi÷¹K˜ðîž©¨¨qƒx`õùòCåŠÕ’ª“ªM×[倊n”&DGÖÙÕ›€Ï%Œd»ÆhBµ7®¾° UL»¹–ë?Ä0öhNÓ¶È…‚›ÌH¿õäq¸(D¨÷g©PvÍÄÕ]‰è‹ÄfÅXñ4Ѐ Â²J#**ØÄ!Tg¾ÓA«5¼ (€`% e£I €µ DEs%À @éoÈÓ€ ‹a%tÕàáÅq­ç6\¬ñÞ]9ïa>ÆrhÔ¼à ÝXîKw‚*õ)ÖE7šý/] :F½)þæ ‘5“ϺãKB'¬ÑÚæ³›x'&"¤J2‰@YëÄpÇÙL¿å¶mÝâàû&µ~#Üj;'_vò¾5Ï[é=7â÷2ÍýÁk ­Ü7ÅY¡›ÜÚAOØPT# Ź2ò+¢ºNËS+¼û:)ODê„q0¯¢ÎYrW†0´Î1¤£jÛºej S°FaX `§3¬1PS¡ÆdãPÜgoLDg*°È뱆“Pˆ p· 1 B°§ƒshXABà4"!-8¬A(ÜælcöÇ?›`€³ƒ®~Ý0øgºTJ°§b]tÃÜi‚ Z‚½ŸÕ2œˆ('ÞOäÍ(³Ëª.@î]Ç©BE„T™€XÛNé_ýR€¬’†!šÞ|F½sfSe'ÿÙkþL=tÜè=jZßH&'Ë6I-õpoNE¥ %ÒL9á­µ-NÔXµU¡2§Ø0$¹Úó¤6Ò€š5*ùb„á£@¿]EñÞÊf‹ùüPÀä{€@%Ôf\C·ƒˆd "\‚ÈhQÀÆÂèÉZ D¤×eRR[‹‰k{ªQzU¢¦àÙž6SkÈõU€áR±8çñïlYÞ,}`çóÁÞçÌZ›Ç-¢o,iº }Ðaöÿd9¢«âJÔOñ(6'~€÷óõF†ÏwÐIáÄ>Çìpűª*KUG‹ØÎâ^P¨o óÈð<ýÈ{›“cÍô•,áÑkñ…ÜßGÉ­/Ç<´Ñ0Ý‹3ì–hUìýö¨0É Ëp<]ÿŽ(@PžY)Û6h ;øÍGF´w2Ȳ÷VTZ›ä|‰Kr ×¸Ó`T €ˆŠì¯FlB…™r’îÞG0ˆ"2u⸒˜ÉÐnx«Löä3=‹©ñhPa` l`™€x¯ª\;ʧ nÐ`&‰@Fà€AB`Øúb`¸ã\<‹½`<Àâ,PG7q«ü ÐxþÖÜ„ìÿ’¦ˆµ¤Ä¨ÛøÖÜøüÿ¡BB]? 3«™ë”¢ÈŠÐdë™6ö>üåÊH8ÎÍΊÄ‚RUI B]íÇû|»îüüêq—êbª?ødb"[DÈ>œýÆ6©EÃÓŒ‘$ëŽi*@ý³E ñPëVuGk_çüÈØÇc?ɤ,7(‚œx†%’ 0AÌáµE¬ el! ±–Ap *Ó>/=16C•ä87[BDô‚aDˆLa`Þ˜¸v¡€Põ `¡Òb0Îa P’J‰–‚F=ÊfÞó)Ï3€ð00¸7¼îXÁÂó‰u€¶ÁiÀ3°‡"ݸì?¡BBýqÏÏü3¡D‰•J{*þî&eX#Ï€nÛÌÚ–X¼©*3™@ #A”ÎŒ‘æµ€2‘ÏÁLÔ¾zïüêhl…’+¯*ØÊ0@iȶS2–ln‹ˆ%ü©kØh4ð¬Py‡Tê'ëòHϵk p„ÎíDÇ_½ ­@J!ßJ¥–aDÐÐ’ÒªB¾-* `Á|ûhÙ0uD€B¬ {ÃZp„9“Ë™Th 5…Kކ6‚6¸ÂÀÈdP% åÎÕ¾é=ýGÐ"¦!xX &°BBXE ¾ì[Ö}¡{Iê¬ë¹À¸ñcY8,ŹèF²ÿŒCP%ÁžŠ€;Æ`Á8w!Qn~ˆ†” e€H’¨ rPw1gb•‘P ùZ‘mîšq‰)á)¸íV:”°.€úæç{@‰)Q‘"™›ù•°²a¢å #/@¨¬ø†Uf •bЏdA@z;Ûöý/X4ŠTÂù}æzm—á> ³|`bsàØ–3c‰øÎ pϳ 6PfQ…‰_õÊc[JD/Ω¦„E›©hÿñ.Tà &>à›:x8nÐñ‘°°ñ¡mV`I¼àŠ€‡ȨŠJN·gó°€I€žÝ ÿo‚–Ñ¡þ†<èF2ÿ%” -ØKñÄ4mQ¦‰Ö³Œžû»+a¢ze‚Ù/b›Ö¶&^U™ ;^¶[+öëÞÖÓ‰»TTÃKµÌZ°6ºÕ,À‰Èf®®/1éâÀêÅÞžî‡Ë:cR,2œ1ëÒP%D¹õýÕ~`yÓdØç¥ YUG`•KlW‡“Ô5"³!ç{^=@‚1$¤Z‰´•Ä•BQÈ…±¡ëKœ›šp`Ù &cV‚TV@Ö´¡1ôšÆk h¯ Â4† °  !©UÆà´ðÈ€$À"`X`Ü2ìäþ¹x€Çc™\R@9 ÀOggS@K &¡€c6qƪRÿ&ÿ%ÿÿÿ.ÿ"ÿ6ÿÿÿÿÿÿÿÿ>÷Ühfó  Õ&ÔßpÝhîßq‚¡©t°7Å?À=‹Å Fûô¢u†ø¨†²  ’’@zÏ7šRg.Ý n³¬ºnô ;ï^=Sà}kï(ŒùWªcÃhÛ ”:±ÔðÚÚB:ðOޤr«ã„ú5hrM ” n@ö{n±AÞ“WÑ´ ˆÕ@;Сê³4ThÎÁ±_[ 'áWÝç¨ xjM–€,ÝïH×b¤ *PÛ¥# €z/àC0†r'å†SÀ DBɆj¨½)!Þν‚éÀø$,ˆ8  @ÈÅT8l°vo †ÚŒ ¨¦¾¸WÀÃóááXÀ)CPÀ( (è°þ NP¡C}ƽè°pó¸T*°7Å@„Ò,^+ÁÕ¯k¡†X ÖüÄ*M>G2lXU•IsÖŽ‡àÉ^Í_ýŸ4Û Ì¤ž€®z% ·™ñÃÐ>KÃLÿ4 ƒÉf<¾2Â> –é4ò'òZì-]µ>îC »)‚º>Ý,b/NTªlt˜-Q½Ì­ôjkì ÊÒ¸~‹»l0 “‰ÿEƒf1*@ $Q­E4ÄW„‡€…°¨Â ý¼³48ÓHÒ6ØðBÄR•ÛØ€[&-Œ‚â ÜqB °ID`´ À(Æ2à@PÀ Ë:l1u( ¸û]¾€Çr˜©Åƒa ”%¸–H^÷Ü ó_ˆR© þŠ{Òá™|”"M%‡ú+>95³SDu àU侎+@ævZæÞ'Ä´UC)€bâe†c¼¾@úÃNÞèÿåz1 ½—ùº°¨G1oJa’é5HqzóÏØi¾ê[mÝéøÑOKP³4Žá-6ß>“¹!e£WÎ;Ü9QÓžeø©PDÃÀaj A,¨öFo=3ÞlNà›úHу ƒ $ݬûrJPÄZBÔôtvÞ#€ÝÉb‘7Üqƒ æÕà-,d€Á m(àP=88(À7|%Î3Ö( Ñ5tÂÍÅñpÉå4îYܰ>>B ž÷ný$B‚úî¤dÿ@èöR|2NÈ's‡O\Y[¸/ ·½â#•˜w«ª$“€"Ý{ãœø ®§“ÍùZ‰ÝÀýŒ,BS™ll}ö-R4{õ‹rr”á9W÷"Š@ãï›î•=C/7.»,Ïö„†…!_ɨeÖ”"¸E%£KþÁ:Â*UpBC“H+'¥»¬é‚A`îl°„l‚ºƒph¬OÂä`\(ÑtâbßÄb™+š_aº«„A)@@ˆ ´@Òð@H–úŠ$D,,,0›lN{ÿþ>6ÿ«¿x x¬SÀ˜îHØžç²þ ¡1ÔOñN:Üþg¡£8ØKñð:Žòí#Á~ë Ðá3hÄL|ÌÑLU¥I€@P˜@,¸çõ\÷À¯ÐβäÑkŠÔÞûÀ3["Ó@áå›Nˆµ Ý÷¬M¼ÞZœ¦è+Åœ7AtO©?ÙdM•|dÛÞôb÷ýKG¢ÈÚ Áˆ‘±¥€øOMˆ.gô† r¥N¨“œëp€°A@BAˆÇ ¥l˜hìA„ µõ`Uè{L(òŒ%l®‰€¹“Š‚ XV * © h34µT® A` Kˆ¢Å pÈE XƒŽc–5ÃxÛÓõÌ·›æ¯fÎÔî|ƒî€øà( >çÜ0üŸ *%Ô«øÝHð?AB¨äPŸñðºæáÀ>¾§.0ÂO'sF³LU™$$Ú'èo—74 üVÅ…fºQ pùSD2’É5™Í‡ËI\WkUS¬(CF3ëUpm…øÚ¼Ü›z:]éŽZnÆÃ³â»®7ï×Òn©€“¬cïUÞsfN8¤‡ÁŽZdª’Œ ì-À/Ò:vf‚X5çZ:Ël¥XbÊ'„`¡ÓÑØ„µB ˆ1€m“u‹žµÛ*i ˆ Öb–`–4ÝCe³/|Q`0Dë`ºú*ɈÅèXÐXç`ÀÀaÁ›/°oÎ*=÷¬Äq¹ Àz€ÊãÕo>ÇþÄ&ÂÒ¨<…šbÜrÃà¿ *%ÔWx²þ£ìõ–9qàõd¸xÜÆpp›¾kø¡¡ª¡’IHñûp»¯âPD?y–¯o3¤<ÇlJV2pßê/‰@]?>MM†rUïï:0–ÿîËLÁZe~;Ó5€¶?³œªÈ‚ ¤KÒX¼±¶+/®èò—dFÆ*¥Ñ¡šè;bË’Î*éƒ7,––Ÿ°Në›.õ±™A ²Á $Cäá[\Ð!ƈL¨`%§€” `¾°$‚X[ÆP $V/cÁ6! ²|p6d@&›H7IäiƒpZV†À¶–ƒ³r€10Å›Ãî3ÖZάpa@pä«MŽÑ!C±Ð ð‚3 ÇÜøü?Cµ‚š1M¹IùJ·£¦øx‹ÌÑlÈÜ—;¡µÍèÈ"ñ‚„‚3  ŸbtÂåÛ]ÔIùqp·Ù§ªà-ÏMHH¢;v@mþfs]Ä ò6³’FjnOFËÒj?Ñ™ì!´Dˆ—{”,KÀ,ï,ôµ¹ÀÐý… € UsIR1q|3£ž@p,’¢3!ž©j ‘\L Ù¡'çЗ²Øœàf¬âÃÐfmÐôj¶C£€` ¢AS7ZC¾e Ñ€6ó9HJlÀ#t`‡¡ž‚±mŠÀ‚€þÌÁ£!E`Ó_l€RMd’~× ¾C2B×Þíå@“<çÁŸHc¤\nY ?€ú˘gž~@F¼z³NK‘ žvÀ\€Øf3ñâ+´c„(•€@¢\G^¿÷ÉyšqɸóLƼë]ÌAOŠÕšV–°Ý©`¼áq €¡¡³NŠÌˆd劶U”O,%¼eÕj{Ì÷•ì"çXyE, ŽØØJè¨è X¶,Nc@‹‘,E\Œ°"ºŠ´€–”¨iÓúÁC(€l±!8¤BÀ@ °MYúôÀG®`@ØH€q+”C`7îH §=?ˆ@6V 4£ àƒ€c*(Æ*áaYF4°øó¾÷®þ TYP¯âtcÖ¿‘.Õ&Ô§øˆ³œº:-‹«ó»ìÇ V·uÛ;ÛŠ#}¦Ê @ “†Þ¹]/¯¡¨ñFqpb d_¤<ßPN¼mS…¤ðéódÅÐÌÛv©¿V=öùó ªö(µÖÞ'NfCþBóŽ;Ozÿ³œÆä:c„'LWD—‚uC ¦7›Î”µ Ä’ ÔÒ)Šp Ú‹õD@@®¸Å…-ŒpNæâ®’… $6(Ä@E"DF6„B!`• ã"ä=znëf ƒ G`ƒ@pBQi›ª ŒhD`3®L{`-€ xÀ!¼ô€ð^Ý0ÿo„$(êS̃Ëlµ•ê¯ø (B¡å4·³àÒètÌBìcDà ªL‘"=Äl-ÖYôó6šþ$¦ ¶NÈ…Õ—>£>ŸMI4psY|ð ÄSr±»ç @%ºÞ&u>«“K3à›åëÄœÕ6¿ R—ŠÎëpƲo6{íõÙ¢*¢€ª–…¹@¾Òd2š™Áˆ¡‹«@¨ÎËÃÄØï$žá„†Ðœ0aE„BX |î®ÙÈ@2@%zI±5{ ¯‡Ô†`hˆÍR¾°€4t˜¼6´kPŒ·¡©kÝÈ€ Vôæº~ µд„0…8ÔvÀA=0åî–€ë€pþÝHîo¬!šjêg|“n\þ¿„$¨–PÅÀ¹T§¯IPónd}bž`F'í' ×ãfÖ›˜o’* @"PZe“»ëÍ›•ÚÚÓäMë¼;ÊÛg"žOÐèÙ ˆÀ48³ePt¢/yÖ@6)¨{2·m‹ `AJ ¬!lRÙʆ›iì(Ï!½Ýá?¥ £@¯F–e šNVOZÊ º5ÄQ“ °A‚1çÜX`+pèÖâLP^­0l0'€xƒ iŠ‚òí»,Dà×*Ô *h5c„Rná;Ý×ÈÍ…ìs€ã,ãŒá·L{0ŒéþÝh~ó¸`Ô*õW\“n8ìoÂ"®Æäö¨ŸâàŽ(±Bï´Õ6mz×k«ª$H* Ö¸<\·ÑlLäi‘26m/„>+Ø?OQðušA=ï×DÄ+Öàò6 Œ6^¹=édö±‚Ž”VÀ°Áš¬(ÇåPannÃ|ÕéÅù„§´@eaпµ Bh!1-€NMß›.åÔSPnÙÓÔ5,kAzöMEÅûôr$ ›ÃÜLÆ€ÂÉfX–ŒÝœ X bŨ€”®Ë…Îià- Q4œ¤W#`C+ñÄbÌ;ð _—À±€à0€)~ÊþIÂÚ¾%Ô_ñN:”ß< ²5'7FýØÜèÕ"UŠZp6ykÇ¢Rû 8ÿµ˜2RT•I"šæ3jS“Öa>’n³›£&Íé¶_|œÙÒÍIä»*céíVÍ2Ç2”øРY¦WË쎂 à_;öuO¤¶„Z@£îç"  ÞãŽ+PA(T±‹ÝÕCäÚ(qôsžI0ÈíR6€*d¯ƒrÌì*U0À€µìŸù°c°¦¶ ~9»ê_dz.žaز”€*¾† *¹GêS>·Ü ó_’eÚZ jŠsËeÿ'Ɖ¦5L¨1¾•CöJÙʲ—Üg_äg@3‡HB4T•U2  Ès½yû+†ƒEžÑá^õ^Ä:ùŒÍDmøYM5’LLÌ *d÷ NGŠÈ寗(ÎÂyYŸÁºÀ«ÕQ$R¥mðÑÆÓ‰¨gêºifÀU›ZpÔbÕÀVzi¸·kÆìÁvl×bN5C¢Ì(¢lWCsC“´3;#äE_\žâb¿IhÀ݆"(( D! LAh[2@Œˆ,m6­"!Å…`X° µЋ°j تì`-ÀÃÙ€µ°°ÀÛ:Z”mÍþMmvdCшÿ ˜Bž®þN&•¤¨Þ97ü‰‘FQÐøx¿íº(€21Vû ˆ 4kQ1I vBÒ’2@ÝÉùÃÔ÷•¨W;Óqe&˜1$+ž¸dÿ÷ Pù‡cFãÃkŸÁDš³wìØT¸Àª£V‘ø³Ë}½‚ؽ*lIDeŠJ©Š„d^£Â„leÏä"K/þ6^”jqLl,"´^`P6¬‹R¢1¹‚ ,ãªò’%žÃ!@HÑ, ßYÚ*éV¤êÓ¸#¤êQÐÄ–& @[4VÐÌ!3€ LiQ´x’–Ü É’ÐcCPÜŽžÝPý7†2q­Oqï¹½y@ Òĵ>ÅGEŒgÍ娑ÁüÊ`âïï| ¾ ÞÛÃG¸âø*!Š€´Ñm®¶]‘Ú¸f¸0þz„[g¶O–Yç:fºäv‰%fh­–›Ï7K´²¡âÁ–.Z‚Má (ÂîèìÄòŽBÙP¢¥‰CBꪇ" ^ËNË´Š±àЧ…a#Ó‡ã8~ß0O•‘[`ÀðyKH0¢¦«È€ˆD c¥Ù£ ‰e€* Á­'áÐt!‰Î* ¬ °`¬i'0©"‰UÞç.ß,ÈñPÈ¡xHþöܸÌ߀@cYìzßœ—û7B0©V˜ ¨WñpkÇaµÏ€Ö6;lj&Ž7UŠ"‚(dèíÙØ®=‘xý$PHˆ÷RœV¢š¦–Des™¼Ó vã!è,Ç«.g‰eTåE¦{y1^néÃ|—úTG‰Ø•¤a4 ÒFÈ"·Z‰ C¸¡Ö©p(3¥+i@X*Ç#a»¨„ U,¯ ¤#ÐR*º ×è. "zD†=ßed€ÝE/F#@Õ‚ ªÐ P¯$‹˜Í¾3¬Û7Ø@· Àê)!Ê'ƨi´€Bl (U+á.€‡ T¨Ózg àøØÀ$òV:=~×Ü øÅ*íÒÑäιa¸y„P¨° Êä dyäP=%gÓøò®h}:Ű0Fï Ø $Û˜ÃgARÀ–]‡£ãÉÿewd®Äêéb°GiŽUùÜ©êlB•ºC+âÄ=¦€ÂÁ÷_9H‚”`Î)åð¤º×x4QC+Õ p`G©³Y=©.- ÁT¡v×&V±X …ãÚjˆ-h µž&É{ D`¨=‚AEx”m€Và÷©\ãP·»–X¨t© N¬Z Ë@ÜbA; 0 :9·N ¼ tN£üN2+Ù°ƒŒrB€e9 *Šˆ´EX,x€Á¶…Ÿ À€á¥X¶n HP^çÜhøoê§8Ý0³y„©¶ êoü¼—u“;Ù¬+´/@§mŒ9Ú,œ¨¤H@¢"èêR79‘™ßÇ ¶pvÚfB&¤BcÕø¥zHOª ±$ׄïüÏF¦Í„±5¥)ENÉ9a‰©‚<P˜8û*+_^ckhØ0šÀª™jbâÏ“ ”FÓ0PP "ðm@¯Bwö¾ ^g™hÌ>(„©¹pÓŸ €€Ê¡nZ@xs¶‡(V&bXEc°00°2 ­)ŽcDDå @PƒCóíd£%cq#àXÀ:°zGøâcÚ>ÝXæOpC¬r+ÓݸÌ߀A‹U&Ï@d]«¶ªìwÝKè#¤Øö9Ãg®Ñn+ @j‰?ó§ ¨q׿šï/Ij@ð«ÿneµÉæ@1s^ûM…/-7âä1iÔÉS”°“`TýéW¬×X¯ÐöáûVY¯ /Ðùz-UÏwκèÀB¢Ÿ3@èg„‘Q𑼦X H(šYÙmÆEh2GÄÞ ²PÁ‚8ÕF¨ ­^…XQÀˆÈ-ò®h[€:GÁ/¥µTD# C6…ÃÒ` ç»9ÍuT`,"Ä€… 8NÔ` à€€Zë€f÷ÜXþw@)JBíp/ºýg“B¬EI¨ ?@«Uwql?=Ak\{ÿ¾±ïé„9PÌA_ ™Ó[ëDˆ:äÿ•zúý„áµ~¢ IöêùÆŸ¬Ia!d[’±(Ùˆ+¾.Iª˜hQ!Û H–´öõïA.P†h]ÆT|@C­Q¸ËáFP ¬éÅS¢qÐ\œªw¶Áë”iPIô†X@™`­q C@[öÆÁ¢3%:„2¯ ‹Lbƒ X16D”ŒNË©(°wØçK „0 22g#4`;"~çܘú7„B١ΊwÒXƒ ” õ)þÞå©!7pܱÒîsÎ1G5‹  ˆ$P •æ5Ø:•Aqz’ƒ$ra1¾4Π2ÄÖI®•]†WúTS_Q_uí%çW°#5ix%%ìïS”‚ùzMR7²èÐPëMxDD' èP5¡c÷è¿@ ´ô`Ô|/êT2ú=ˆ[ÓMcÌ5`V© i8àÌ™Ž²mç0#ZoòÒXpe’bìcY‚ ]# ó ´šX‘6t ´C ¼&’P`¼(JRfLL¡Q!¡êÚt –~çÜÐúT 5íPgźéFìÍ#Q”u+þ¾p ï¾û1:X͉B,ú§€¾ž@¨U–:%½®‰_åã9ŒF· ආڬßúà_c¤N05†FIµÌØò,Šå.>93¹XßÁ˜”líV$ãìa Ìv`^G#ãTCŒQcw YÝsd~\…°„q+¡ðÕ*Hœ£˜:¡@"Þ/ÀF‹µ€%±X¨’ØIÝÔb.ÐA[Bó¸ã²‘rEÞ†PN`#€`XÀ*¦Ñåá->n/2µ*G*`"‡ÀT]¾VU" ØØø¡da !0 ‚ÆmE@®J À¤çÜhð7Eh´ÛÐ$Nºaîw¤$¨Ô¡nÅg O‘óæ_¼›q|b1òúRïB"÷1G+Þm-@@°Ÿø)†³ïPÿ3ghê‚—@pEªý@ý  ¶®¼}Èê; y7tÚIJËI¶lIk°æ¡ÒÆsmÛºHªªšéLÚ^¢R•÷É5f'±—äSWL!(WÜ  ‚%{i†`?â“µÞ °¡V¤DܑІ­#d°†Ýu**N¼ÁLâ(‡PA`Ða Læ8®£”BÀÖE¯B0Ï$B` 2,bAà vE0ªFÒ4€àäñçÜ0ÿ+…*êV¼“ÏþI(‘r….›¦>Åà(dyÅÍíÜrÉ¿×7ê“ ìZ:½€¼±.ìcø†cÖ AA #RÌᆭ• Ÿ9˜¤Z±_¹Ys²’}sÍ´N›ñc­Ž·ëf¡|*dAúUWü°uÙœ‘-]iüaó qx}••œyc)He‚q¨""»qóš±ÅNÉHµÐ'm:Œ!´æjHP¿Ÿz3ªÁ Li*U°¿Yà  VÁnƒ@aE]d„4õi€0$6 €l×*CULÂ@&ÃfÀXà¡<Þöܸü¿ATêP¯âÛtc¹ƒ ä ©BýÿwÙ1Rïèï³MÌ «`"H@³çãŤmN­¼JyÆvš°éóF’LH9×0 ûâû @Ç+ÝÌúWÌ_d¨ÕŠ /‰ªD›Í“y‘\ο€&cp jI¤¹p=\F·× ›XïØ6ôÃ` âR2-t5°…xh’Û8ÁÀÄjj—1«÷Ï “ dC¿2MŽ"îÝ@A˜å±O]ÕK_%)˜P`+`À˜ âVýB0`¡LkÈD2!En` E3À=lò`8PH^÷ÜHþ¿µZW@ýç¦ËÿcQE¨æ`OÅ­£Trª„Ö¡ Íä®hƒ‡­súzo¡Ž©Rˆ¸©µ÷£µ3—ýäæ}6|—¶ÏO'ÅR Èþ{¾ñ•‰CgÏYŸ§˜œë:anh€Î÷•ŒÐ’m¸\]¤B[s÷ ×ÕÅŒYžkbT ^™U§wÁ†Ü4DcrmXã¥Ð˜, F¹«Öy…è!OÝ?P@Ô£é ì¬pp8†âI)B²¾ >`Ð šºTÆ´ÑP‹«³ “¾¡ä”^‚DˆRkE"„LÕ–Þ<ÈÇï;;Â?˜²XàË¢<àÀ þÝXø?qEh+õ)¾M7šû_Àõ#,•õŸlM—³"•€×Wdp8ö È}9¼“ލª2 ¨tŽwÏô€ÑÄ6Ló/ððòDåK†l¤Ÿ€lŒK¹ô8:¬# £iS_ñÝ™Î*ýˆ!7}ùpèdNnµ2"rG«µ›–bÅžMlc ýGIÜšv—Š[ª $9° XŒ*E$bÈ8õ¶¨»Ýôt‡ ðèPëòCR?9(Ø7MX‰%ª‘@€±bqÌο¥{¹.>Ý!°`èË`è4?¨¶¨Ÿ‚X˜Þö„Àe À‘%„¢%`£€µªB´ÀÿáX†<–ôÇ †9œL{>àA@ÞÖÜøð:„RPSh‹nbæâIš¶ HP?Å?Àû¦}èâ4è¸Èq¤ß|R©‘¢¦„X! ˜ˆ÷ª®ï­;dÍSÿÓQN¼ñN_]¹L¿_4T•VhÙ».ÐŒ»,ËdJ–s‘Ò7Û¢Š =¾ñÃYžnÓ=ÛƒéîŽ8¨úµfL‘-E4õáPUö½3‡C”«z‰PS/x†‚vTäPÑÄÍr<ûµ÷× |ƒmÇ3‹€ mTŒs{½#` Œ‰"P¶3<È%qð&`#èCŠHPT´-g™ i‰„š¢µ@ j(YA €ÍDr° X,§ð ;$@Þ4X¸€µ©Á>çÜH°y#ͦ ¦ÇÜHöO’ZmÔ8jÅHu*â¸2Úy:¿‹ÜôwµW@’7•xÚÜG‚RTMÎ~hƒÊ±·TêÿäïLn®­N"1QI“R¾ŽU3£EÉ¢¥Ö¿2îÝbwO†H«Ì´µîÞD ±æQ£lœŒnz.ãÙQ´´då)änŠÎ~"C³;{ã¼ÛàÔä/*"a Ʋß¶ ƒ:´fì‚°%*Á²¤ÀPFûK=(ð «.0t€Ã Pé€EÂ.‚òX $jBAœM ‹¾çþŠ”ÆÐÎP“¾ç°àwNÒì†&€E¨Uf“ûCÌ–v&N…p ª$p)Ñ4Ïrm¯ Áz €¯‚p4›€¦AS¡*õfLóD®iŒŒ«&×ï×£9—Êx"üo¢me(Á+÷ HB’%5~€ Àìtqs: —m5%oJÔÎI@H)HÐå„ FNj@CÌÅBÈ’«Ñ°zñd2`%´ š(M4ï# C‚;.Ì£Á :÷éwØ™Äe-Ìti,z8a8 ƒ]‘FY¨#"JúuÀ"À€< ×ñÚ£,M1.“‚©m@W±Ð €•u@VÜB(Ç’ ÌÀFÒE`Q@E xЃÚª`@ l%ÐH:àOggS@ÿ &¡€c9Û +ÿÿÿÿÿ"ÿÿÿ+ÿÿÿ ÿÿÿÿ>÷ܸìæq!PiAë Éÿ‰K¡iIË u+þâ¼ñô0žÅË;‹õv[\àž[ÛÑVzŠ Ôøß‹îí~­S2é¾ÙFF†ä£Ïþ9®»ˆ2ºóeòkìñÖìº@òz„„Œ4ò±±„Y‚€í&š®t'¶Œšò<È7Ò³ö¡YÀ€?]8h*ˆf=›–`¶ Œ¦1BƒJ+¸« &h»§Ç,2F>bî30Aƒ„@ë&Ž<… ¸*"`ƒW#À­E€€@P¦cál„ –”X%Æ@ìÔ¸ €B@@]'-c™ œ»º‚0Ð @º¬­“T0.°À€A:’.^øÌ[¿G ƒJ74Bì_Q© ÔUñÈã(ò ðp{ñ¢?3¢´/@§ƒ9ýhÃËšc„”ÐN0]7½Eˆ”αklf›ãÌ ´‡º^Ð?ÝÏ`fmQÔO\ÐÞÃeDÙtÌàA#sѬ&t¹">R†Üàì—Y‚±r yç}¥qÂ¥Î%5è1ØX¦§@ójC£GaLSÑjwkö`,ŠA¦ç|´°D¨a–•² n-AØØX¨ô¨X°qb m@°,„m«Z™£RQD ÀªF @ÓÔìU# ³þÄJ€ $Ò¼@£ ‚RÇ€ÆA„­P0çÜÈàŸ šÓ´s®[qºAöwŒh,ÓÔ«ø¨¿)«ý¦Lú˜ LS‡ñV'‚Ì$ ’ˆ\æ·&·:§u£m墛ϯǿ‹S–³À“*ð(QW_×ê g î·){WeçîÛ;¼¤A@å½ãºI–ª€÷&cYÓGÀ?TÜü¨= &¼ì9PÏ5K§»f&–ÀF¨\ÕËÆÕ“õ§‘ˆ€^)¹Ð°‡]€œ@éc4`…˜$"•,T„RʶÀ! v]` `ÌxÀ8€ Ð(÷ÜpàßX)ÐjB“9è°ìïËè›K).°§â FÏÍØ˜¸vWJ°Ð?L]'ªÊÊ€¤zòÏ»{—ûHIÌé×L;œ^½í†öÓàÚßÐsôµdÈÈ®èP™|uFOzvT¹Y’Pf­€ˆ¶Ì –/Qä`?#0 ?¼ÃLàèš3Ì¥ï¬Q&ÉŠéN74¸„Ã`Š¥âÊZW¦À,—1“õ”#®ªì% "DÑÃUÓkÁdɵoWäŸ14‚s *ÉÄaáX_@6Â0ý „Ð3-*Ùr#ChTí‘Q re¹x,Œf²Ê^´Tá `6ÁZ 3`l®aa¨_€áyÀƒšh8 ~çÜ0ü/ $&4æA‡gÿZKGP?Åg Êj¡ÌÌSîø ~pz (ÃIÅ×1Bª, g®O—kœ!eéÛ,ÑÙ<õzbíªâxÜP±‡””FÕ@H¼% 20BƒBü¨Í kÙ[Y?Žñáñ˜Ç)á‰,ƒÔN*­ ìépšë#óí¸©“?yji˜ÉÐ-)³……[wBM[ßÖæÑFíñ[‚jÄÃÛ+S Xu Øø7à 0ŽÛÜOïB4@(h†‚ÜGM…ˆ  0 ­W ÔÀ@ 0åË Ô3fX `18ƒ0ÃÄÐX¦:ÞÊýss„©B‡&qÐü3!ˆ©B ˜ú? 'çõFDE“yµÐ ~ý÷4òXA§íä:’á!êTU¥$H€é¦'o]ÛæNͶæ8IÿIbòPq‘ÓƒÇkk¥7û?‡œgú‚'7´@!Î;zÝ9FÑQê9Èz-AÀn€«vÕw6 =‡,î–â]¢¨L„¿Ó R4a)Р lbNI)îŧ$ú”Ú@¤ ô À²AÃùÙ`D”¶N' ¼PƒÛ¨OK @·¶ÝG97à¦ã B0XB¥l@¡ €1€Þ`k15…a° , ØÃ¡@ƒï' žçü¯»ƒÐ$í¨)ö-­ÿ9¡E£¦øâ”ëõŸV‚²Ø]F¯½Õų¯x4û¾®V2ªJHUI@»ã‚“ZÖ̘o7Fs~6WŠs÷]&N†ý•qðŒÕíÍ‘XÿÜú 7Œçâ¿Z Õ&‚²,íÝ×›…H¶Ã€Žh¥«À’÷&ÑVŸ4 Í·ÍÔøÿqö¶ $•ùÑ;A’D„K61ED$²®C¾¾`g>4Øâç3ð/Õ¦ˆf¢—¬ëôqo3øXí$tÿ&á‡æ*ˆ$((âжèBÖ@0ed0¨ k¹ŠB"¹ÕP£  €$E¢IwöwÖ€€±Aœ‹à2aHW5Ø „ ±*Ì€—@cþçl£LÓ:Ô«¸çÜ üT)]¥õ*¾!3­ ©b¹È½Z 8¹_€˜£6L¼¬xU&`@ãJÿ¿Œ‘­µ)ÇnÀQöq£M]ok,ÍeTŒEH¸NA ÂÙ¿ >îz—lÃÒ°0$EäUn†*%(3ó¦@ç¨ Û5bhª_è5MzÜŠç ˜Áàý¡ð0cTmÁ¢èrÝA9·‚&X ²ˆЂ@ma›¬ë½ÀÄB¥+jYK qR¢Ð0 0MÆ6|©š†Ì¶…zpS E:Ð,n=7Ö›¦E"–@ZÙ€ }Ê q$Ød9rÀ k Ð îþTþ©ÐäØÐ¤:ÌþC£uU<Šž¸£¶è“‰<>ÞçP:Tªæ!fP‹)4LÖ,Z¹6AuÏ~ŽF_ØL´ø ›|]¬­Ü‘TžÑOF ’FHùì9Wàç.ºn6eÞ)9 ¸ði"!Y§£,?ëL»„köBØ' ÀâK†Ð0Ò4Ò×Çq0Oݰ¯í°xD£+Ešec€’&¦>n¦Ç Ì:hcƨ<MÌÛ#÷²R@(?= €3XÅ€&OƒxM@„ käƒrÚ&"@0ÀdB? ~Ýhð7…r J¤.ºAöO¤e†2¡NŠHr2¦Íˆ¬ƒ£vNà†É×[ì13  û‹1]“â) sŒ“€p´¹æ Nö——iMìGIù2†5ìз%‘‰QÉ*äâûñÁóOÈ77CIœ¬FˆÌì­iiF2çœã|v¤Ú?mÄM[ÙÏÝ#Ï­âœÔŒ¬PT… 7 ‚Ü€¬Q¯±4–ÖSlÉKcdPæ“ÄJà „­…Dû!çÀÂâ“Á@]gWIl³ê¤+ˆ,€%B¶e9ȉÈ.¡ó… iÖ†dP$Y Ep`ž݈µyÕ&Ô§8(¦þÛQ¶4U:Ôg|"ŽOç™™÷¬ÁK l»­xq¢QA%`´ÐFŸ†UãI&°pþVÿ5÷ì7Ь¬¶¤±¹'Îï2¡‰ÚOm û£ mÉŒÜÚ¬JU¼Ø!r¯Ò\ÇÏa±(Vj ³ÒYm*‡3Vÿj”’Ñ (èüT»¬AdØFpç€U HEÓ Š#…‹H’ W¯ƒ°`nÀ"†R8™¶Û)§™‹ß qš(´d¬B³¥’é‹BMOÊ€¡…Š!DàÆHP¢˜$"`€²PiIv@‡Òè(G±€ã`H €¢°ÿ.• • ê¯8ÍYvY‡J]1êjü€ˆiʲ!OÎ{¨D\+!ßR¾¿C06°Kº-â(/ä3f˜k.!UfäapK†‘q§1ðÓËÆS³eÍ,×i¢JrZµ¯÷•CÙôÎcOM]ÔDð29rÀªõÇ]6ýÑä#JIj‚eø1VÖ,HAtÙ»FŒiS,Ü«t€#@¦U ˆÕ JŠ ÝEB1ha’¾¼ö*Ɩئ ¶¡Ë@ƒ¡Ý•¢Ñ'™K3} ;;îROˆ‘YÈ2@Ü6!"ŒÂ*´cššŒOÜ„…I@¶jÒ¡~ÀóÀþ]âÀ€K€&Pž²þÆD¬VŽŽúï¢ ÿ±àê¯ø BhÕ$Q/ÀÝ,r 7¿úu¨xqŒ*I’¥ËÍá§å@R€¨]ÂSG26)J. –áì³^b_ñ]1CòÖ+¹x „ŠŠ9WgY8…¶´êïéšdöO¨$/+q”F5±:~¦ˆ™µÖyË È²¢Öj"ª i»± ^vš®(%î.½tÀ¨õ¸’U’AL=Â(òè:¹d`:KÀÒUPPíFú­ò–qU,:­ßC.Ro5Ž’Ñ‚9PeÕCÂkrI¯ë4,Ô] €-T!ú¤,!e ¬ R(€tà Æ•ç1ìÊÀ,@€á^ÝhöT+¨«â t øÇ7Q*9ØSñ"뉘L¢lYD9 &NÜÉ ©ú(/@¹Ï‘ŒÌèUe€æp$Æe¬·ßÏ6ºí ¼’–­CéÔ" Ált¡n®ôÙ÷ÆÎò§§@)qÙ»Á£7fO0ÓrTõiíPCc”Ìž¿´ÅËâ~8À=µ·½†œ¶€©ü”$Š&³³|í—z]³ÅØ_z$« (§:¶h½ˆEˆݼ,É *Â\_À2†ÖzV ‹Ô,b‰ÊþlAž‰Û€ªÝÖ7ëUac VÆ€,”× K+0Ø``1–z{M›…º†[0€±@'€EOggS@; &¡€c:¼ß:Iÿÿÿÿ,ÿÿÿÿ$ÿ&ÿÿ-ÿ"ÿ,ÿ+ÿ:Þ÷Ìÿî2c¨Q87¾I7ü/dª w}Š O91ê•¢¨Žt\š6,ßäŽ,Èpâ@ß!ò“8©*I@¦ûž¹š1Ñ•(;&½²&‚ÙM׃CÂôÉ„À('&*9î‹uZ¥ë‘[/SWÐù½QâC2©ÁW˜m—âG×»9V1J,XõêK¸ùòó5¦1ÐÚ³E™B÷®þêA´w'ì@Øh­f4q#Ø¢€Z|ÉÂÌiç YÍÿÛ¡h6þ•.aªf‚ü~‘Æ*X‹€5€ŽyD ô·QA±³y$Ð H`ý½&V–µ¹ÆÂ‚Œ+,3ÀÌ08 €?þöÜh•RuUü“dþ‡ò‡¦$õ7üvÓ8Š8.AûÔ;Œ‰í†‹$!ülæ„rR‘†B’%#áuIbp~îÿ ×WÅJ²AÅK†cTÜ£Åô†­d× W+= %€R»ÏfÐè‰)xUâ"ÀAΙÕl´ßÎÖ^Q"Cu ƒþÈ™I’P2®µºcÆŽvAÐMu† ÕU ˜JÏ-u›CäɈwLÍ/-aiªÌý!ú§¼‡1 ¼úÊv–%ÙŠ8ÄæxU¶ü¡ú%Ù>¤E옚 $ç’$&`,°<€a.yØ Ãææ4 ì`Ö^ÂÀÜœÞç–ùßg8A)hœ‹n$ÿ¿@¨&¨¿âȧϊӈœ*ÊŒ‰Ò õïdÀ4‹ÜóÙZ… K©*¥¢ã¼p‚±òúó±ÙHäàÓ?ͨqï’t¶9”†©,uQÓ%¸%h¼á2”©0ÛtšCQBJÕ|"ƒ÷»Ö5ò¾\«ê·æ*®@^^# 4-È‚>v” DÕà!HÎ ü¿ž™šßô0kgÉM›‹33Áмô@ßM­ƒ±JUì]l)’€PaœV)4x&Ѥ¬†&Ö÷„j„d* é d KŒÂ=0€±‹·l-ê!`c’Ml0Ï…#«ÀI<Ð<ÿ ¨ÌZÿç ‹èÉ85cŸ3üïË-$-í$4þ¦.{ö©ö”f/|çÓî.†ÄGô“©›ý 7á×ÝPU£YP@ž„ÐÖ0öqÿíÿÙçÇKÄ·š!ç0.d\ÒZòø8ÛBü.G¾Y+jrPáæS'åÏÀZdgè¸É$7>×ZQ«¹ŠCç:$µ2°0–|v²!2†ÌѨH)w ¢;ý‹C×Ú)!“ÝR¤¶RZz"42e™ÍéqLƒrÖµ{šÛ[·BwÝ"5®H€`PÄÐ'ðjáQ¨åÈ „O !¼à€o÷%P–Ú!PvÔUéʳà0$€}Ïâ߸ÿmŠmÏ2xã ¯¸0hSžÝÀÞCˆê´ó2SxŸ”‰ˆA´°g@“vŠSµª*I Ù!´a–ûÚ  DìÚ&Vë*f~•9µ6'ã4Ó…ô½†S¥xÉgöO°ƒLßâë¹X¶<,Ý‹R ¤[§’£ÚC£]éñ°þŠM dëÈÛd¢_;šB&|-$LGo_ËhZ¨G(Ñ K š†¶Ѐ bƒ"Úl¤ö­„^oÓ@^š ÄDz¼hDvD)^ó¶h0ª S`ˆ°3 ÆòcáÌ7¬Á X°Hž 7_"¡¥inõ3®A7~迸!†jöT|Š}ª“Ñ3'î 1æOÌÐy÷-]3×Ô”I¾GÛ÷ŠÙ„õ@’ — ¾(&‰$jŠøvµ3üìú ËÒȾtVPÌM" nYÑzHà fj§“+å‚€pµwÐ.±vé`ÈÃÁòĬ}‰ev¤pƒj‘”±³UQ—Hô¹®ŽÔ=D¤YA¤+£e %ƒ [“‹±‘eÓ2i¨BR4J!!Û², °÷¬¶K Ú£ôbB°0ä­¦€Š‘1°60q‡äÞ ØüÛ]y:*Á“^ä}Úv˜Ž¹·¯"h¸Hø,ë—!ˆ ¾çfÿ=¥dJª1¡þŠwÐdþÛ%ŒQ­ þŠ?mÃTkºr-O¾Ÿqò@ö èí‰o+^@MU™™ ¦ÝÇr¿ì¼„ûV­Ýr×Ü ü=LýéyB]TB.8×¼4Nf4ûľ 2Óþfý½SYíÊsÐ’W ÀÔëñBLvvƒ¢äëOÆ•¦|9FŠÒŒM­Â ÒåÊ9£Ä”d‹†0è¡„/úRf ‚€%¢LP"j„a9£nÀoBK€ÉÄH‹Y!„0‚l…Î/S ,Œ Õb:lbÅ€€ë3Îj(%¹‰ê~Öãº)"È,€¿fžÃoý3µà΀±À€‘žt’þð‹ôaØ H¾çl¾©²µ©1ÁžŠyС¿›°ÄT­ þŠÏ ¢ÎñnedLÜÕíEƒ¹í}ŠÆ– Â1U•LÐmJ"›0X@®7X«æIN<® þ“‹šäZÓm‹HEˆæ$CÆLIA{kCaÙ„NQã!Me7ÕL³·pìñ­‰âz|Úš vÑ÷™g1V HÈÙ&f€Îp«›Ib1‹ˆ»R*¦x·‚îF)´cZ¨kŒy«ŠŒ€EOÜ$– (`¥¡¸‰t*¤Ø‚IÏkÛb©Ȱb µ@©‚ã6üNm´  ¡AJä!´J}µ‘rÕ“ßXÆ1ã†ý:?Ÿ…‹¿¼ËܾWÜ?>yœqÀá Hp@Ás;¾æÜØÐæ‘‚i*t°§bt†ý ¨V`OÅ7ÓdR»t~?¦³#@.,öˆ}F;UC™€€ÎõÞè:˜Öêö¬“ÃY- X@ºjMÓk®¾f EWòP™*YUE dHÍE¸Ð†°9¢w@Ó<„/›M冟¯¼î°kŽ”FßnŸ‚§×„9 ,hÇðOè˜Q¦Ð="` Ù¸"(€Ç©ª\oLŬ%é',WãNŒÐ] F­„¼{@d¢ $K 0•PW2 a²Á}02&ÂR`Vˆ€å(´X ON`ê™%À{pÇb8¸i¢& xþæÜ0ÿwWÁ4&ØSq칉C›'9ÑTìPÅ?À틟ÌÐßó9²!ÍI¨ª”$àBBIDª€b™új Ë¥RÐþkZI¶M+­¤UC#¾ø@dd…д}ä ûà×Þ’l\ì,!CöÞS¹‹cl"Fpdœ$5Úc )( Ñ9ÃÀ³Ä6¬À%œé‹éWÃÇÝØsüñ>=caÿ€?*€(P üHd”žæÜøÁÿ‚`¨VPÅ´ç&þ3êU êoøX©~´UP¶ïX0¦LÜ'@Ç-÷cT'4«©”L@ „ò†Ažc²Š éÍšïË`™(°Ùi–¡»µø5—0ò99M€ÃÔ=u@¬!gÁçÛ•“ïl ‹(ÚEg¾¿C)r+:±¿r$׈3€È9-Ñ ÐÃ"ùt®Ö™Fñ(›—%’9ª\¯åÅ ƒóg?6EOm«á/ ºÓi ``ê­|ôÀ` \‹üBØF‹S«1cøe¨§#àYY €-làÿë\ ) ãdå€8æ¼s–.×;®~šáº7š¡˜ÇYÎ Àï‚(8HÀPp¤ H>çÜHøÏÓ@Ö¦F=מ—ÿŸ „\¥ ~Š€˜ po³cTŒÒPJp `‚H`YV½òa¨h—Šy\P5ÈÅÄ'ààïþÛ¨kôóÿªˆbª+XÞÔ.qYfôºOÝýã¹Õ¦ )ªc­A-Ńšÿ½°ô¤°_ç®Ìè±$B¬‘f&#˜¢p¬­‰P ¦X;{VÁZ&gXi¼J¢´1É®Û(€«ÓÀÕ3t’=Wg„‹ûl0ª¢°z: À `ì¤Å PF¥¨*âòïq#ÖjÒš a °¤€àao³ X¶Ø|àq|~`6<Ø]0|·{ýZŸÜÛûpgûã“ç(‘ 4@ÒQˆHÁ^÷žù/* ª%Ô_ñí¹ÑÌÿD„j õSüÙº}ˆvŸÚÔWÖ´ÀÔ•w}yGîÅNÙÆ>ädßó12O«…ªR‚L1v½Keœý~Û}ÓÄöbåü—Ÿ‡¼×ɳ–uËÑü^þ_F™L°¶«øܳOSV¡3~¾s—nK*³r7lX:ÜfY·ìl<¦ á}åz`)GÕú’–C³ŸýÒý=„ˆh𢠯F:OæÁÙÿ#düdñ°‘¥è])È ­`BŒ0‚€à£üc‚ ( TR)BIÝ Ô!B¦ÁHíR '.ð0àెÅ?Š÷Ün]3v¯øÀ÷88— â‹;´•±ì[Í|›/i¨åÎi0N>Ÿm$^µ†›)^¾TÛ`Djmáo£ü@1MgéÙk3_Í;ÌðoÏUTþœ}ÀËš qMæîÏõùûõtÄþuYJ™)"g &„¾õ#K¦jÒéÝZÓMÙe7“I'ÕPI?C±´p0Ï/Ç¥ó[Ô^¯†òo“kÇ3<ÛÎáíË[…›{Œ[Qa Hß7¼lJX+ݶBA(~Ýhøo¥©1¡j’ݨýJP:Ôk|™Ñš‹£éÞueC&ÈÌ–QQJÒ$ âÇs–] ’TG[_Èèx6W Ùôl½ƒeetoÖ–§ƒá³5S|#šv5Åtp¬<%°ÔŒJ^$Tmo'áìG@#OòE¤G"7rЀBHÄë‚ âŠ`ñ 0ØL”`phšÐW‚¡56X‹7ȸĦcÆëj`Áféö+ 3hXdÒ-lºŒ(Ó€M7ŒYƉö^{D¡O6ÔRZC‚ª )qÈáåÄ0 žçÀÀœ€‚ðÀ¾'ÝHæß=`´Ò¡®Š}Ô 2ÿhï’ ÔUñd퉉"Sk~r-GóˆSϽó n ö 87gkâDÐVq$Ò~ëÝÎt·fWš‡™ >Ç䨝N^j1L„.œÙæˆøž¹V¶ϵTŸ‹–BëKc‡*Š XÏD+ÝFÔº@rY)P«€AP, ',g£Øu#°,̬— +²LI ŠÄ€M#U˜BbCæ”Ø°´Ü€`¨ °¤±dUjGK×û h:ÃìØˆ !2,F‰B±´3„0€ >Ý û+!©¶ >ŸéF³â‚¡Z½ÿwÉÕb.ÀÉ=ï?D5Ë”H d ËzâßÌIêîÙÇÑøÆâÛ¨´¹6àðB BZB 䨨0  Ù̘‰úXó*ÆŒ\~h ìhЇs3`ɘšP|¥@ e‘Å”Ê÷„ þê_é»…*uÛî`hšÐ¾6RF®&ZC½úÉ΀4cV±FË K0 h»[´É3Ý¢ü˜,¬°Ö"‹ ÀA#°ÒŒèPøI.Lƒ«ÄÐEã\0 `èy›ÀC,²¬ ´@ˆ Œ`ãŠð¶Œµæ|x à~÷ÜHîO@P)¡>Å9鯲ÿL¡J‚= €;6½=ßFfÞ\ U• H™‚Ùvåá-‡ºb ꌮèü•cNÀkvÙ<2 ÑÀY6ñ2iõ°c„l¬Yä¨r}3ô@A°t‡;ûLâ¸`5»@‘s’À *ÅÆ“¹Ý­WyQ™ 0,T`2U‡AYhZ›i€*VR=`´zÁ ¥¬F@‘ˆ8ÂßÁ6¼Î©ÑPç]†Š@N2F,˜Q5 ‹¤’Nc²!,°­`‡ý6‰rù¨¢²½‚„eA†£ó"ððÊ{‰÷É <¦‘Qo·Ø 8~ò+P¨!>çÜèà)*u¨O1OºAöŸ#)*8ØSñ¨ßÎçF+&§¦Á.óz€koy_Õ7JÀ&àÚ¶}úf)Är¨)«°D?Îû„!õlUvrŵq‘Ò•ô‹3­ Тˆ&y¶ ZR‡1ÉÇÓÇL@+ºnÏ‘¸2Áê¿K6Ið¸?éy!†ÊXZ€F·£éS™P°j)X¿ÎRdùÛ€$–(€eVèp<<.·1žc꟫…9É$Ñàó™à <à8@Þ× ÿ• êVìƒeÿ—„@¨èPŴ韂œ÷“à 1Í€/$Ê|ßÚŠO¡BUY’R¶6µú¸IMgûR»ß5þ¾cRMùš]³ÈØ-ù™ZAƱ¥dDæ¾–…Æ#Û“XÜÑD@í“E@¡ iíF»¨k¿vןê F‘«Pˆ4#™iSzl ‰©‰FÌÀ°îª`@¶KÛ€cÈžÀ‰ëR–Š#¨‘? Ë È0[MÕ’ó S¹â%Á1™ €ôª‹ 0ª ‚ˆ4@9^²“WÆjÊ ¢dÀ1  Ýì6Œº|‹ú{A,f–}ûT\”HHN~çÊo$QT+¨ŸâsXöß ªÔgü½“Iû.\@Ü0ÔÄ>¢CLLñªÊ4IRB=Ü´ô}nmìIåƒ ß~žþ-¥Ô­§c@EëÍ=S2]õžÒ0‚*!–Áº ‹–Þ±œ§a)™‘¿>+¹›]6€}( –ŸJßq‘²5h¨äOýH¡*dU«JʵTÍi’¹Óicjö[¯h8X ´DtÍȲ–Â\Ù⟹ø>]hÀ!£Ù´¢“”Ó à@BÔH%UÁ ¢òÒoCxø{a´ÔÚ4ò"ˆ€!€„ã€#õX¯Øß·l]¦Àû €8'=L³ C°CˆÛ  ^èÌòÿ¡d]•T¦nÅ?ç ú? 'h*‰pýÿŸG9Gó4LÀ'"éMjÚû¾¯[B£„T¥2@Jè'2À\±‹öO#(½[“üêýñï·w**à õÕvý×*דÖ)ÝbvûH×=7¹zþÝ š«_ÞÝ•6ÙîˆÚ^÷I:€µöÄæ¶«ˆßvÇ$h%™‘ ˆ:ó"ÐÞšv:'w¸ät£xt#º}'ª|5J03y@õÉã‚bš^MÌáM˜*QbdB[Ða‚kä&ÛQÕ! `VmAjH–x¤*E@Ô5À&ôªdXÜ€‹B é¡V¬­‹ál›­ÙƒX`çÿ=~Þ²Íþ0PÚÅÔ.@ûÿúèÌYÿ³I‰V©8Ô«x×Ü ó¿F ¡´”‚&n.s"híiï¨dù¡ÎæBàìKaÛ¬ !Z5U$€Ï2C—ðRùB¼;à‹î£`íŸ0…î¼”²±œÏ% €Ô:g ^›Ï˜øéû£aï‰[¹ŒDmŸiY^–0 …HÇfA»5‹t­ ûÆ¥[ãnw²¤»Ç¹!KýØ T DuÔsŒG«Ü¯¸Ûq„“ùB°Ú`*ANXˆTJ 1E!—€°#dZvZú“€úXIˆ,E ˆÀ]l W  '$`sïpåžýàõlÂð2Í4= 0ð°à,€&aMèÒ’ (¢I^çÜ ÿ¿£ S‡úçš ÿ×H™ª8Ô­ø¸ñb«•oÎaŸ¿&se—yºìù¨›âŠ7SU)™ èËŒ…¬Ð°/l׿ ¥. L —îã´ ö+>ëýú4¦~7µ,³0<™WƳ×öm™ z¶\`§ìn[qò;l©°½vˆÑi:P„ cÜkŸì¥Ú. Þ¢ûK¡œ~éÇ~xú:É¡I ÔòºÒ>{ ´ƒ‚޳@Ít8í,xûéD+ˈ­ĈÅÒçXXP†P¾²-=,@AØ€³ˆž˜Œ)Dp£lF Ø0VÆ tfp‡ÿÂNüOÛgÏlÜëOpÌ€Û7Û<êÛÛ¢@6àÁ&PEŠC÷Ü û¿ƒBh.ŽP½Š}Íáöÿºš@¨‘P¯â ‹î‰Ö3—àþÄÕ°pœ½icš£ŠÔ4T•I‘PëôÕu”f“®aÖT‡ý(²—!hI#-é}ºO„2½(Õ'[ MW]9`‡¦4ÞEOlÝM®íÿÀ—×¹7‹õª(æ<Àm»Óù¢AEó\ý!Ÿh ªìî;Ñzª”š˜ÙgಽÜs4`tç´Ått P]z6ÊÙf¡ºoö" ±ò23T}e° qÕàÐ%S@ä's°T ‚†ØÀÐùBˆ\Xj Äb˜@(€™ayÆ`dQ5ûø©M1³.ìÔ'ojS? ëá-‹Kp¨Ò(üJÓŽ$`~·þ#J‡šbrøàæQÉÌ®½) jÆ7±³Ú(ŽÌœd>r;‚´ö=©‰C\kUUƒ)@DLZ¾Å½Œ¹½ø¼ñ`/ÖD ûÓg×8KÔÅŠhJ±8C,ÊF:‚¡ëEs)r©Þ÷íß[ž,­Ì¿!²ŠäÀ 1µb­=K•3,²gUÑø¦DD Ù—„7Ëàʨha@ظªBúMKK`)E$Î$°³0=¿ßÞ( ƹˆT7‰ÄuœGÅÓ ’òö´1X¢ÌØ(±‚ Õ ìV$`|ëÚ? M tewÁsÉ`À°[-MæãÛŽÀ’óCƒŽ€×&¾æÜèàï`”¦c4isntèO„( ê¤ø¸Xrñõ´/X"ŸQ1´zÇR H™È@®“cùÞ"ö“’{ÿZÕ;XjŽ9¢U×—^L·Ú«PU½KPUB”Jl“æŠƒÏØÇM 1NãŠ1ßï@Ù}4ÎgŒA _+¯uõ†{-ÐvÂqêxÀõ}öÀ‹hýjTrâØº5˜W¨ì§1+Åþ55·io€"‡7ÉZ¡@.‡Á¡KÑçN  ä“ \Šà ¬01¢ 3h`]P¦˜eª©‚é‹ÌªË”^ЉÝ2Ehd h¬±ÏÛùÊþ«Ó¹î9±1 ZLfe¨0ŒÀ –f¢]ŠBn€õï\ø+.¦ˆ”¸pékƒ™óŒæ@ªVˆ# ³¿¬RBOggS@³ &¡€c<©ºÍÿ(ÿÿ*ÿ7ÿ3ÿ'ÿ,ÿ,ÿJÿÿÿÿÿÿ¾Öܸܿ1’ JA½Æ¶æÆ ü”hªt¨Oñ‚|¬žŒ¬Öl@?ùèpB9!.!UV%€m±Fž“­9IÅðÔÿ&­ŒJÚ⇟ ²kazÉ.Ç|“^&iJ¢”cØàË«Ö<&“mC…ð ŸDE ´A²ðûh¢»Ù.{2?S@©ŒdyL:ËÏnm¶¤Þ$$Q¯Ýi²`„Òâ=kzƒ ;•y÷ V@ XÊ€€.|¥® üµC#¦õô6äûdé*׬;“/ cÖÝV™X¾ºN¤ëªÙ&²X  1û:aŸ˜@8FNbA@ ìóàƒï67ýã±X` =¤ªa'Ž›ï¶üè®2oó–­ÿ8¶¹6G!–dÀ ÃjÌ0‚c[o@@@ +€„ à°°lZX€}à]kœcØÆÑð2ÿ $çÜHnóP eB}ŠwÐ 2›QlÙ*ØSñpŸ`À×ýˆ}"W¨UeŠ$€ ášðèà³Í#Uo dO7Ófê§ÕFÂÛYÏŸ§ŠhJ†0”—b2?DâÆæéÞ¤ªÚSçlÁE˜H`–æôyH6R-‡Ö?h.–ÀÈ;£@ͺåìËeïrȲcWe«ìÞ¶òj:•:Û-J.Ý›‹5ÓðÀœ–;!Äás™ìª €$•ûþÎCv)\`÷n¯È¯!\¨ûä󘓌 ‚³Ž <”m.ñrœ)t€ÂB1@™€0f ä@¹–ãá€Á¾åÌ¿ü»ožcÀÞOYŠ< ~×–ùws'kS©C½Æºçðàß!@먕J‰ú)>ƒ¢¬³'µ(6À7ýEë Hàõ ˆ}Ÿ³BˆLMU (&X£þøR“4 ÐÓ Í%ñóu=ÍeиϦ Thd!”¯@Æy/€¤Îã§'´f¢y³P!×o0êÔYTÜb~ëÓʰyº\MÀQÃûÚå¯È7ÂØiî±lDí"AûeÈ…ðœ}ƒƒÝN ë<½ÉsÙ[Éë6kÄŸŸ ~ûÊÌ {¨"5t“Ñöu€mIMh/’Ý ¿ÂE²ë u†*?¤òŸð8ÀL&­Âb‰íÆ Â2-˜¨Q:ODûh† (!(<(°Åzûe±ø·‹Ý`Ü7=}%¡½ß„"!žÖÜXîß ™¦JÇ]ŸâÚscÿ ª$ÔÏø¸;à+‚ôo@ ¹o½“T­©)I€Q‘Ð8j4ržZN™€}%ÎHnnhº-ßM%Hv]*‚tóö„VDCÎ4Oö@ ØÒ%iH™£Óà¬Qý˜…·Ú{·&”O7±:;:Ï'}ö]ŸQd%z¥2ÓŒD -ˆL‹èK‰TžxÖöJ¼‚5WW_¡°a¨Tbödýtg#"YÑŠ@Éope#ƒà*ˆŸ Xà èBØ Pƒ"91˜2¢€  ÊÈ¢ÄF²¢@â %€¯ îÖÇ`­k¾Ã-ɦà \Ç”»HíAqƒ@À ×ÜHøÏàˆP êSŒƒný/R ADýF÷tµU¤úõï’Ø<¾Ý/XÓÌÜ'®Š£UUZ2 /9¯¡ÝC?éfFËY’†« žI/HràÁ“‘´nùx±_ Ö—!„©ñçJ†JntèµJ…R…+³!”i_îQ‰3ÞD‹¯í÷‹ îÔ+TUô9¤zã F/†a $V "X%Ö¼ Nv½Ô ô\­4` ¼X[,(Cæc¶ßL‚Ù@L4ÿ¨¡:¡%ZØ>'}[· šeÓ%P/B©€"EL¶“« صÀ8;—3¾ðõÆ\ZX×ÖL-Ï Æáx,¸êv?•—`IA@þÖžÿ“’DS­C}†½ç`æß­´µFAýÿŸj: ž³”ÖÍ9GOÆã7@:ˆ äß$÷NÄ1¨ª*€D–@@Ô+`Ž2Š×r«eãð{ûÆàán¡ v¼›RRŠ™ÈüÍÚ|P…Â*c}@R§åI¬7Í5pGô‹\õMãÅTšäÀ°óÏ •|õ\‡Ì^y7û®6ËÚn 0€5m²êÑPˆ±#¬ê®_³) @€0vË-*=€lßjiÈ1 £Ñ´ì²D(,ƒ „$-©xƒÀH¶D;¢Ã§J3ÂeXÔ à ?°¾ìq¸ÏÝ7ÌDZVñÄ1Œcïé¤I´(5ÏÞÆžÿ•ˆ®Jy*õöžÙÿ.Uh*$ÔgüÊ¢zr¥Çåg O'± 5õªodc _@ŸÜsQA\Ç´J™ PÝNm'¾/U¡ŸydfñÖzÕÇú7 ôhE@4“ýòqÛAzýÉË{÷°\òÕ×ñ­<¨Ø6ÌO¼ï¹†C€Ä_)s9¾,z›œp]ýoG¨TüTû‚J̇æI¿â|RŒ F·5úÞ“‹'Æ^ ÐôìçTN²+ë‚:óºÿ† œürýÕx¥@£I¸AQ1Ú²ÁhO´×Ïnc…M(° ‹€ A=ƒa1Þ»… Eg%5®†Î)àÎÕápRà€BC»hóã†/è^‡Êüï]!W» •¨ó”C™ÿûR k*.5Å 6«Kš¬Üånäe MþËë“þp9¬À èhŸ±MŸÕ¥ªª¦’@¨0»ZØÎûtk6'Ï'c©­]ém5Šdhƒ½ôm\JJ ¥ÅÜ~˜Þ£d¢èDƒÆ ©uö^V­5’U²`gôåY-_Þ_fàÝÜÜÃr+[ÐQoÓ"Ì]ÇÀþÿŽÝ]Ç€$å[EG'¹µ·?=]é~1³ç¬8û×ݳ¶Ò¯nê )áèK1LïÏ›ÝÊoîdí3hÀfFX^Ài¼cJèÑcÆBr©¤ÄbV7"‡.»( »I $ ±÷ëœØÅóCþ`ÇÚ©ã7-WëÑ@ÓýPnÂTš¤ü$P ôÕ2xšü¦ÉR+ß×~÷Üh撡„Ƽæ†ù<aäJK ãÀ¼Tbdb·}ŽA©¬ÔIˆ+I@CmÕ’¹/š¹ÿíß4ÙÓ›±tvØïl 夛¢±L$¥”Î1ívõ0D³3³Da/'¤+( &ÉA ÍØ»šÅ„~U‹M#cXkuÚXq|º:î=+ð‚ª ß¶Œ¦Œ(‚ ,TÓ¬¢8@ó"CªªÓºþP4#Â2o2éÉÖ½60àÀ¶,"l@dlJ*ËG,ÖTJ¹ö¨BÚ‚+€E U- ,p€Š  j!½À¬Ý2#õƒÞç–ù„B•õ)æ97’Ý¡3bÙ ± €À¨ær‹ˆv%7Ñ(`"à”*-P˜~“‰¶`>Ž[ÀÆQPœ?’ ‡Ó¯o NÔÈS/@Hž×ü hN5cÝs£ö?%¡VüÜ~= 1Ø Ðõ¾ÍFKE•" RB_©R'§®ë•º×š*úZÒLJɾ¸Ô\¯¼1ò!çt÷w „f1ÁÙKT[ö}Ý;”ijNY§#;k Sž ÎVwË'²X @°¾ÇeíÞ!W°Ë8Òt¸ô(É(‰Ð´Š2b]Ì Œ Ö) °ÂU ¬Ý`8T²%3“‹ë èkÑôM¹­Á¯Æ00™©ZŒaµE»:_`uW ¶SZ¨¡ŽmÛ-¤‚1ƒÁ¨ß.ÄQ•èÈ€„’K‰í$‡ (phÕ*,àà;àhpè´ÿ¹…Mq¨ÿžƒÖ?wY¦âP3þNÝ©6Ú1&^{—}­d È4»˜€Øó9NÄ» ff())nõ÷~?ð!ºÿì÷r,ªnàÀ½š6RºbJ[(%«| ¨ïžð-&ŽZ ™Æ`N“Ø [²ìÇqT@ê`ËÍl™0 1' l³hÏ`¬6è¬T@$µ.% Øbu¼^gJ49ä Ä™Ak*"<Ïž-Èëy$*Éh—HªÉÀdIav9Œ¦³Ö‘¯S­áf+©À€* ˜ÕÄ¢ }žCT?Z¡GqD`ÀØ.P@1DþæÜHîß ™¦R‡ú)î=‡‡ÿ³;EP+þ¦]œ(³î¢RÙýV« JŠ`É­¨M¨buÉdMŸéÀjèãší. !+Ûã—»z¬ßh…Èò(-ëóz¢²Ôr²GÌ•E€P_1Nô,¶Ö¨ÄQ\6 Õ)†ÌÈ–ztŽi¨t "®Säƒñj7D &ê(¢Ø=y:¯Æcå:€îh[ˆÑ²£æê!€)TNAH¿YI±p’¶ChmÑú3ê@ 8¸‡ã8ÏÃçîj^``ºàáïyÀÁPOggS@ï &¡€c=¢¾r“ÿ(ÿ%ÿÿÿ,ÿÿÿþÿÿ%ÿ(ÿ$ÿ&ÿ,žçfÿw&ЪT*¨O1:ü·I‰–¦8Ôÿ7n svßG‡+NjJˆ"I(RdýÄ•täbùÔ Jaöª#šŽ7â·â†óÌj[¤#c%{ðñ2 ð°7WZGÅu£m§žÎÊÇÕš-Uq¤÷R3+n¶G¦3~ð'£ P9{nqé¬Û2 öXX†ÓeŠ’Î®k;‰ ‚à3ˆu«Ä–âcÃ>ãÖS#p¾ßƒTbÓÒÌ}õK„ǘËäK|-’LüÀF«0d`ðoÚÄ&{A‹I^^BˆPÇj [È 24+0’>x`<`€wp‡ƒ2ð0 €àxáNœÔ¡Ø°þÏ.%¹š’Ð$š·þ×% ´6U$ˆz?@V*E;É ¡­k“`bßU  Ú,òÑÃI˜ª2%àÑßúM6þû÷q4~—§gN~º ?8ü€(ðWJ¶6$­‘6®¿~’‚3AÑö˜¦¢YU˳¥-•mwì){ÅÏöÄþÎ]A–y:^g˜Qš°¦Ë'ÚpI–g¯ã² BÑ]®X†¬ O×®Èäˆ F5H/ŒÇÜë?%0‹`”õ†TlS D`D @@4P:E­‚7§¾Ìr "mn –‘!°@8’cýP#ÒDPŽc×xà ×˜·oï/Ž€õ˜e Æ?¯†¤CÁAÎá>×Ìþ‰´È¨Í¥| Ô­Ýhø?Aª8Ô_ñÈœš¬¢ö àöă¹gçMqB¹®xU%$IL wS¯:é!é¢øË›”ÏÞ]&ŸBvLV øý }é€%ø¬þ~ÿGo¯nÑß“ÝÐ#ÉqYy§¢ìÍ+‰_ÛmÁŒ ·š¼{’Š*$ )¾kbHÉoeº 0.Ûg)wƒÐÝbö•€ºîL˜÷>wöêÎu¯êÛ—ê6@ɤ™Z.RÐ@2ЊMJ {7Óé0,4ð>!w€Û–{€FTX dÀÖñg,ðõn Ý0c]Œ;¸€Á@óãBS¹ˆ®þ×ÌÚÿ•è:]k)+Ô­Íÿ-5Ð:4’qêSü€T-²²Zl*óÉGS`œ_ÑÅÿˆçí³ÍjNÔ«*© Yò Ýz»¦äïÍ´>jæ•ò÷ièÝþïDÁ¿ h U¤þÿÜsæö®Ýž“ÐÉ »÷΂½Á2ée}OŠÐä°Î ±4ZËq‘…ÓÅrífÂÂÀ‘åë˜ÃâŽå/‚uwЈÊZ1õ 3 Õ/ 7)JÄh ,Ú‹ä]Ë‹´«_^´£"lVõ‚‘a`é,º÷#Ó,¸A  AÓZU6T˜ØÀ 00’ %Ü€;ra¦FŸa6Pó¸i8°  ¤~ÇÈüO¢h–v4Ù{æ”ÿéVB×Ð,¡ñp“Š<ì” œít ÍLUMÈPAzÀ>v4Ñ$W]Pí'Î㧆5’+!';_1¼ ÞÄgJ޽S Qß(„ÍÍ&­~ÂhŠ‚5‚¥vcÚ´Ñ-«žvʹ§ËÐ%ž_¶ì&úÍÆ «Üý¬q(¼‡mÚIO^@±½;9Y“9m!*>Œe Á<¡â¦g­¢†xqMo>“"›Fs5̺ßÂ}Š{F^:îØw°°ÿ"d@Ö3d°²„Z  ‚EÉÀ* ð¦ !µC ‡€, ¬€À:ï®YÇça‰÷°ÖÂï’ôò¥Á@Yî2ªLq·‘ þÆÜøðÇ•h¯’ª©)Æ17Áúß!JAMñDµ(²LÅëób[ÞOû2ÅâÓ÷OƒE¢ãºÙp ÄSĪJ)E’…’SŸÑT5§LºJÃ6Ù,_ìCurµ,aÞfZ‹ì´—P×}~`œ4M;Rš^êw³¯Ž ïò* øáû£M ï)—A¤®gÆäm‰wN×®¦»{oüNÄtKHþ^©N r&½ñÐÓÍThCÎFVÏŸƒRÈB¡ð k?ÀþÆðü–Þˆ¤fâF@¢BHj¯\lª*°.C~€xöa0à6a±xFˆm è-( Ù`ÊC°Sí¾æÜ¸a›G¦©4¡nÅ6çÆ†m7LSi ¦>Åó¨Wå“XbÇÓcþ Vf‚)£‡½½ †Ü†êL1n¦„H%IŠ÷é¯?’G·õò0 Íç·ï%ŸÅl> ðîâ”8»†y)n—ec )„àô1_$gäÐÚhJƒ3¾*H4 ̧½ šÅ:5”±e*:À"WÄ㇗;E6¨µ( }RÑÖðVa…iM^&["’RܰŸ©2>Rw²¡³P„‚AE´ªmD‚ÄÆ´'J¶V& ,H€oõß!R@PxbkD/8`À­­j à }T¿ y þ¦ü+˜Ù*M¨O±Î¹‘`óX˜*tejŠ ¯µ&wrVŽ:GßyÆö7w0蓃Ö¨.@Ž*-Þ1U $îþålmîãZmÍÁõ-D\[Wû×D)×I 6ÃQ±±›=Œí·/×€)„L¾¾‰‚‹{ ãIñ nÏêQY°j¤½’d8Í¥€XÁëÖ?2i ‰} ÔA ˜Í’ H F†3`Y^¬pMÇnù˜|‚„´°U8J-h·²"z0yEk# €+`´æª¬«BÈ<‘z(ÑŠ‹v(LdÙÀ¬ €`@‹<À|ïðX:PΙþ®þsKJø§Dí0ιñá?–äD+jÅ?À\ì¾Ï9;ÌA¼c @„ˆìJ0•È™m×EËy—$p“¤ƒf¶ÚŽÖxu‰ääÍÄÞƒ©ŒvÊøCz&Í0Æ0Á±ác´*ä9FA|ï`ÇgS  ìÌÌPŠäì¡õª;YÝ12[@a?­LoZ,F-‡1R뙜V‹†–©ÀìÑé_–y7ò¢ÀÊ÷…}dA@ØØàVJ x‰m ¶Þ­Š¤éËŠÛXH`#„íº|/ aËFRçÅ*¢®#³/¨ob­H£ÐÀ>øÌªÿíÆ’‹Ò¡I 3Oüw†<†’P3>“åµk­2˜¸ó©‡—ÌоA¥&Á\Í7‚vB„˜d¾Ö}3¤\1w`šï½0`W‹$á8—bûßßàTml†ä`Rl½Gô¼µ‡BÉà8u¯T¯E„<ç¨*xïUí,-ÚhÊ#}<ÄqsªŠÊ»´ ­`y+ ,¦? K ‹‰X«@-îºmD}h B ªªk åÍú ’{uÝ 4{ͨ'+Áa,"º¸hc0@E±t„N£;$d£ AÅZ)㟠D€¡}£!ês»ØÆ`Y"hIËÊ(À žÀ/ÀÃQÞ÷²ÿÛ\M•u+þ9‡)ÿÜ†ê§øx¯ØgÁà$‘Ø PhÀ˜Cü¬"SUŠPE…œˆÔàâ|·úöCFEõ÷Pe9û=6-+J©¼(–GB´=Ìo£Þ `¹bÍ §-H.¸½)ïé]ïžãÏI‰‚^þ¼6h…1‹àË÷ÁQ@dXãîça:‡¼¬EØI×=º˜YÂÂØ¦Ðš&èo0àv]PEÜI–#<ŒAßVd* ø Œ“53ÁúœNÀ¶$.II‹ôˆHHwEŽØ+lhDšehÊlŸËǺ¢Á&pˆ EÕ}ü x³ÌåíæÌtÀ€Ì#a’K4Ϻ{` ^÷þMn‰¤ytêV¬snÔþg’2!U+¨Oñp0`.@ÇmßÖ‰ÒªJ“Pe‚DŠk¶»—Öµ5-L5TR,¦Åªy‚e/ž\Ì*ƒ—î†F\3Öª'ôfº; Z¥£#­Æš~eiWK{@ë„ÀÎK#t®+ŒfÑH';?w¦§D]A±¾‰9ÎlEôünÞ"ºÙQö¬W*Ð-,tÑè™¶¨yýmzœY @Ro–n& *y”ÏÀ«°æå5€Dwúy:2éÏØ*3ÌØ Œ±Bk 5¿‹^l#@%c4;+×ó'È!6’K„„†td 8pÀvÙSv :‹çx2ªÁ Ú>çÜÀþg2AÐNA]瞃Áßd!7ÎTœú+>ƒŒúÇ­šdv€w•s"€Øä*˜ ãS±ekÄP§ªª2H`#<7šw†¤„3Õ.R%òÒ^ ³Så,ëo›Õ2‡ Pâ¤Âäñwx‚‚·œ&›9î~^ç‹ÝÛ·yK*"†¦ÓŸÚC-b²oK=ØÌOè" H4æ³—šhpš3å0Fb+(eýd¬NõMÖ[-EöÐ@Ñvoо+3!ϰj:ª g :š€øº°I ÌÒ˜DÉ@ÄÂFR„² j­èÒDùZD`Èj ‰À.6Ø_Æ'¯Û¶Ä~fízÀ·ó…µ†#:ùl ŠÞæžÿ/ÒE£²Bã›sƒÜ± i¹f*L}ŠÏ cœ¬L&Ù¸óׯP¢=þ}óCG¸­ªª2€˜+Ø/¡Z®@È 8Z˜3jã,(л+dÛvªþZ•¯uÓÏK)Sªã,8—/Í;C»…B¯öÔP ÒëF9L5”šBŠê\ÌõÈ"¹Ü™€[#u ׎u-‰¦Ä~(Ê9+ zi•­ k”Dð%ƒD;›é~:}-g™Eņf­g°(vËI:še*ŠÉ{!‹„è;Ul L* X€”È&ÒquQ]`‘À²È oÎj0,Ș­€`+ ‚hàpÆñðƒ¯ŒU‹sÀl`}€Å!O#8!„æTÝlOggS@+&¡€c>¦q)ÿÿ*øÿ ÿÿÿÿ ÿÿ&ÿ/ÿ'ÿ1ÿÿþÖÜ0û¿ã"ëü T;¨{ ÿg¹„Œ¥5êUüÜÁâP|I¸s†cLXVo-ªJH}HúRœ¿·{áÏVRQ<_ßS¡¹|öýÙKÉ_†–žŸ†üd*ZyͶ9!èÿµÊßxy”3ëN×$½aš‘{Ô‘ÅM]÷dÁ$ȶߴ{†¢%©´_õÒ#ðõr—3€UUМI__C0?'~\‚³b)A[UL´CQмÛ! ‰¨*ÖÀV"Ââ# ‹ ô´4X0m,°²ˆ0kl‘¶ –À`¡‚¢V@&ÂÂáu‹F-±”B„† l"sd l¬¤°h"`@PŽ30 Þ÷žù7®ÌÑfB]ûžÃÂÿ‚`šRPSü€ˆ©R}©ˆiQÚ1òêm¼2áäû_ŸU|¨ !ŠĦœÃ3Q‡-’Z cë&j®œrßÏÇ·o|ïM¤dêLSªÉã²Ý5·Ì+œ›9€R«Ih·µ'ûÃb ¨„Lò-‘>~¶†‘« )ãó]ç*ô5ÑóBÙ(ª®@–+C!Æ–Ê €hT%ä¥IÑa"C•Á0Î}Š ’¦~ ™¥ˆ¦ñÜ \3$h@T‹ b1ˆ5FLÕ}³Ò‚HI€ -À@Àrƒ_f@2ØEd€¤ xâú€à"ˆŠ3¾çÌü 3·†© õ*æ976&Ô§ø˜Dq”7 õñÊWb.@ë@‚ÙÑ:q£„T™b(”$M­ î yyís®qôɘí"©ëy@1’ø¾ËSÕÀ¨3; U‚šŽ\Å ZaÊ—ÉØƒÖûùÙÖc™åâõÎc•à&¦h¡Ä«@+¤ù¹FÊž3˜ {Â} óqRP˜¡A×T!ìJ"2dî–ÀX#5-ÂÂàM0È‚I];» ! =~”à’eA(‚,XX)€&,B##ˆ2l 4²¶eÀd : C7€6¡€€X÷óò,¶p Ü÷`ìãȦ,7 €  G>èTÿÛš`Š*êS t©ÿ-ÄP­Cý €ÏŽKT8‰õÄ(H'Àî³U'™YBª’"%PªuÂè´Ü€c$¼L®Áãæòé‰dµ.Ù;]‡šÌ´=ó]g{<üd1ŸÇ7zsiô ¿ •õl=àZŒ¡R‡‚ *±miXß6¡Ö¥:¨æ¼Ýy Z –* =ú†;]Îr)œñl1,kaí°"@8ÕÐ-$WºŽÖÊa_ýÅÃYþ­èdíOþ8€P¨Œ ^­1=$zZÆð©G/€Rðø$‰©ò]%É÷kl 0 8ƒXv`™âM/Àä`-V½h…Á2ŒM@iŠÞ×Ü üg¤¥5µõ3ì9‡gþ©DQ©C½Š7¦E;¼‘´÷}›sÔ‰øšª*¥ Äç¼²Žì§œNµx©åW[G‘£* zˆ «Öo_XdU‘Û¾™ÎY‘]p¼”HPu×>§Mªô@ë,§tŸE³:Í£['*™÷n¶ ZOf®Ié ê‚&@ÓXJ%Ò•¹8“Ô㆚lRá‰Ù z¸úžNvÑàWÂc[‚õ\0¡`À2 m‹cÙˆÎb„MÖÊ •d ·Š ` b„(ÀF%td €Žq%—£~gX<0ÆÔTáwüypÀ/»kÉÈB<)´ìîÎÃ^ÇÜ Ü<**u¨[1ιAîo2à U êS|Úk:ÓïÌé¿AŸd¹Xë”,‘tXJ™vŒ*U% Xí§3Ä ZGú†m³_}CÂ!Ba8ßÀ䘂 «|Ê-E 1`ñIœ @ “7ë(GæYõs<ˆœ‘Õ°Öê¯YrG½‘¤Ò³†sÌÊØ|°hy4rS !*5 @¥5Eàl»Œ%…Ô-9ÚÉ[Ӥϕ%ÅòH1Ñ“eÑwT /•ËWïUà$и…fI묀SÀŠÈlL†Šdaáü¯­Ð‡2Œv`Pïœ+;BZ@0pcŒŸÅ€Ú'y ~×Èm“˜Q[ÓôYi¬sÏþ3¤¨’PŸâBÖŸ¦-BždyÔžhk³÷ÕȈ6U ¨±{o¾NBSS®K€ž*Z÷;Nßs«¶ù ‹–ݶùóS¼§ /3Âöºø‹ÎÅŸh¹» Y’AX­:‰D(W3%À@Ë A©Ç £ŒJL1ž02^‰¹K\‰.ÏDÈ s%dÍ]nânÐÏûd|@ïçKôÞÒNÇ6õº-ˆ\HÈ8 ݈( ƒÇc™RÈæ†&6£ì²K ‰fäÛ6˜Á8õ ØÚúî\<® ³``m ¶8NV’dàÓ¼ ³@ þÇ´þ]Bˆe¨2¡nÅ:çðì¡RâPS|²ö(¯…4-ÀHÆÖ=ÜàºàÂ6£F»„TÕHXmiÖ¸t™‘P\K³*7¾|T‘s°¨ .šëQ.=æ'®SÁ{u³ˆ¾.2x÷øÉ-ß”)gdÃ{•` !¤£ÓÜg­(˜9ó½ïKÅ6ˤÂAë1#2E: ‰ê{D*°&ŽEWˆ\ž®˜TV]'hTì†Ðý{7¼E®Š2˨Sîמ£ØÕ8•#\3åX´b h¦õy€©¥Aà^(»-ˆ)‹@&X½š8#,@d° 8ž÷Ÿ<¼à9Çã €¾€÷€S <€ 1ÉR‚~·Ì[ÿ&3 &ÂwÍ!õ’I„"¨Ÿ¨7ŠJ;²p—ƒ%…pò†‹†"T~ø¶j¦ªTH±É¶u_>›ÈÐø3ÿ[©ÍjÎξ[‚„h2Ÿòo¼Õgð¦–Éšû×¥!Gà Â@XW—”ºÉ­tdó½yYÚ–Üíøu‹òîÞï“«Œ¥î‡;ù¡€!ºq@ß¹-âý(m“ð¾tOåLí¹ºø8{&˜.:âÕnÜ€ Q‘ÏtBO÷þŒO «9‚k–'¬,ò. ´¶±ÿµ„ PLOh¨“Rº®jm`ËØqÀÃQÖ€ÁãÇó ñ“;8ð¼áÀ=8΢?Ý àÌ“8Ô{B"žçü`BW£ƒ=ÿžá汆˜jØKñ?û³ÏGŠ öO¯¸|Ÿ­ETÅ«ªd@’‰§ëÉÁÕÚ ûÓÒé7n0BëÇ£‰M–´ªÓ,èÄEŽïì˳ÓlSsC£1a„B×|šÀ€á ÈSßrõÄ-exÿò’|ŠfÕ5S¼pl@­È…AXQ˜‰»Žz”S¡%.¬nUP5ž$V£®|47áwuvibdŠE&,¯&Xd­ØBtâP]Œ•B¬"`C[I¡Õš +;„€õ|n9¾Üùo¹¿³}qfÆÏïÛï€õ—º!‹1{Gr^'Í ü¤g„®ýH…¨¿âÝtXæo‚* öR|a¢Vmȸ¸«ß`½±Ø ðÙ / ¨¦÷~¢bŽT•D­ùf||Ü âú0ûdô¼ï« ¹ïu7o4¿ºòï'¼A†¡‹E3¤YkÃOlÒÐ ©\ï4SÀ‡ò¼Zx“GG¼¶˜ò@ñö0*H €[ÿI:XW‘­gVë.€bÈŠ®w™B4G‘]`”Àº!D@l¡QšGVÌD•½¶V1@°˜P=·ÁŒ(!X@hXpš;ŒØÐ84‚X Û?̈ ,0€`¹k0<[c <ààOggS@g&¡€c?R`U¦ÿ ÿ!ÿ"ÿÿÿÿ2ÿ2ÿ<ÿ7ÿÿÿ"ÿ ÿ~'Ý ûo\Z•{*îM‡›ot ÅÁ^Æg®MNîÂ|} àN€³íÓ׋,èR’ŒåÜk¥BÑ«­ïçê¬Î ï¹J u½~R›“μ4—÷RoÏr§ë¨t¯VŠ ,\ ¶£¿š ”:t9¤L£.C=þ’€f”ùî„#>˜vm¼lƒÐåÛ"¦.e‚ÖŠ:m¨’8ë`¦‚EÄÊ€®Á$žhPŠC¾Ó 7I0Èf¥`çÙ+|€«Ô€… ,¶H€!^2mÀ‹¬%o1¦`€F`…; CÂ@p5ð°‰ÝfÖé}øô ` À^–Û|W‹Ð0܆úߤfÿìE`Oã  ZÕõ– n¬ç}-òžU&Häz8{@¢·ïm´R«ª,¸È ›§ŠÎJ¡( ɧÖCû©æàgØT]Œ»¾«qóð½téì>*Ô™Ý>·²,g 5n÷P‘íF'P•í4!gJ²!š(”°à?÷)wl`½ü&*Jº „ˆž‚Já’#†fQ ¤j·0"¡f@¨hÁÂâÞ1äC²¢E™a´DbÈ@«ˆ¦#$Ô+´BÀŒ;n à0ŸÓX¶ðSŽèOóŽÇ³p (@!žÝ ó?»+Z©”P·âžt(øoÇ +©éa/Åg`Ô‰‰â‘G×þZ°çÞ›÷¢¦ªL’âÇ9íß«»6 <²[/6Ò¼6IDí]h V²ÄÀ5`)hÍN~1uûÙ«ìÒé$Óš::k)Äœù¿ÈÙª†Aµ–ðŠûÉaC\R•å^W% –“0YIdS ˜¾[Ž3ØkЪeáÙ1ØwOßÓðëÓ|S,›îTUe!$ ªV·Cp€‰€ ¿,£g¨´ÌÉ¡#øt¤Hƒ"=½)cþ‡«^î ý‘ Ý{'Ò ýë€!ê”çco£[ˆÖµvŸ0ŠR fzMD2¡uL €-,È#Ú°ž)rv, I¡BÔ 5‰Q-O MÕýyBÕª¢˜º„Âc™Œ2e˜âz-µ^þb=ɽ®ó& °X`Š 5©& › ì~çþ-嘆Ø ÿ«à¦VZ ž÷Ìg6¢6s{*ÆE‡ þBþè+ê¯ø :÷ƒþ«ÆÄJдö|ß|Su5”®n®ÞÎÚ—ê‹bÿìó&è¹ äÐ>DêxsÌov:B>t“ÏÙOì>¾(yûs0­nmÉoG 9=±NP̈Bug’Û¬»ÿ=¤0þÔV ç±Ç Í铨ÎÜÙÏ#PIí—çrÆê°€Ï.ÿ€ð$…N° "bá˜. ò#ñsÂðØuô#Ê À&át¼ÏŽfK Øh@@(Ü8gAmx9¬ ˆ€"¹ƒ€^Œ à'Àš¾¼öYf‡† Êbºÿg¿ÞÚ÷ÀzÿN1pð‚>×Ü0÷¿{Hb¨’PŸb[tÃÁÿ7A}†?ÀU—^ì¶ïíh5BMU âTdš@T[ëÃE-Ož’T„êøéèCï_Ûlœ$×2V(ÝÑ‚I Ö?ãÃ"ËÿÿpèGsIÿ¿ÄúdÂ6ܼÚœó?•Ù0¯9º„Œ‚¢ê÷ϕⲙp—Ì{÷!±8Ã>jQÇ¥ŠÐ›}Ðã%&h¯¬“¡’Xl³;§ßi Rv0y°ÉînÔ«{Y€L΄ Wh» €ÉÜ#6ˆ@]M¯v#jY0À¯b7¤# (ÊH&{ì•EYdÀLÓ° àÿ³xXÇ‹;?­Ý1›¦j.¬çý5tY25VIQòéIóÐÜ…¾×þ¹­¥¶¶„úùÿ–™“¦~†g Ëâ†YŽ^<àª*àöÊçh[Ój¨” u¾Án­?ø„ AÜO_ ÿw—­¶£"€Mê‚d¦hx7ŸWVqw³¡R ((7ìÙ³TåPf§í>œvO›ùÉ¢¤ö€,’;.i€©×)Ò¯n©ñ÷M€¢O+DÞØÀ¼Š‘`hˆl.ºJiÇóiI,rì‚¢,»F„c!¡Z= ˆª¢‰Iá#CÓéib,{U~Ny9à«ð*üCVÝGë Ø$t©Ø'/ Ê™àÝ?&Ëî=Àî% @.±(* éN€÷À¶_¬¦Òàª2³É-cá,Ëߘ"ÈËeðõL$”c§ €~×ü_‰€è*Hu+æ9Ôÿ!!I“´£ñp7ƒ†ú\À}ï»¶N”VU:˜€$%0{}Ãm܇ø! š»žø“ËÑûŒÊ6aá_”A¼Œ”ÈýŸ€¥¬9ÃR=¤fˆÚ;äQ1à)ž5Ê׀…ٛè²]Õ€ÉY¼=€nˆirå+Ô8oÜhˆ Úq@iuA”?ú.†ÒNæ™â÷{Vi{þ”’[wù•@Eôû.^¦«Îà^ó§››oÒÝ |çžÎ%ŰéIÞ-r*¡òFhªr/l°ÊO‚1X³ÀQ™È j T€ÚôRJ`@qê’ƒ  ñ|Œ©9Áqø| Ç`g\‚àl?×h† ÇXBŒÀÈ`F`Cd4,\(¥—Üxû‡bhõë˜Cá¿AÖv¡ ~ŠÏ •‘M“yü3À¾m~X[1 UcJ*hw“Iû=GÃà.´×Kª‡LÌo€¢iÜÑA?û£5{P;EIl¿šE"ËùïtqMUwj!/¨‚ˆ9„¾7íõvHAÀö= nw°Ï}öÒå}/oÒ—?º—(ᵬZÁLY¦öaè‰×d¹Ï¼¾yF‚~ÎwLy^3qÚž84¢ ƒCWh°l üº^ƒaòÁÔLUTeÝXCâ<Ò‚@<ÖV)ȈCÅgk¬ô†k†@&Be9kìï×›–i{åùþ—sÆ,õûû;ûÇÀs…«-&×S@2P€,ƒ¶î½çÕÊÕ™6 šåX¥ò„lh P¾Îož&¨P`OŽèð`ó ªt¨¿âQ´2[/À•_ ú ö9†7“µL•€fkÝ×fâo¾}šï\XvsúüG¨C‚Ǽ@Å Q7̱¨_Y¯ø,\@‡KÇóí1¬&kwžÆ“ͺhÚ  ÀbߌUy¢Ýë“íÃC¶âÞœS Q©¤ÛxQ- ´NJâ!^!¹¯Q¦tN‡²ðd³(ªl£® 42Zň`# Ý]M‰\­rGì°"œ– (DEÙŒdš”ŠF) ÂFnŒ(Ó*€`B˜¨1€sðfû_ÛN=¸ðæ †k>÷ÜøÌ?‚¡ÔO±î¹Ñð¿ÉP© ~ŠN+3O­p¤!U'@åË;#aÀylslùhC Uf#ˆ”Û˜¯Ë·åÛì¢"w­øæZ¼Ä%Š6^"mþ •‡Ïˆ†ì¼PÔ´MAäOo•RÐ9.á”ƒÈ ­ÉôxF{*Zå”d%F«¨¸‘ãE5dûÒŠPˆL•Þq…} yÈÀäZxX†™…5Ð3²ÍÞA£øt[ MñmÚq°^èêP& Õk9dV `0F 1†`°À±Œ@‚³–°a€Uñ’ %é€4¿×!¡•£T´a´Aˆ% à‚‡5ìßácú`0ÌÀØÃ:´ ñR¾çnm¾p†fÓ8õë ü/‚Ò¡þÆ?À«ÇašÐ^·Î1êÒÖPefÀWDP"3ßr'‹9à=ŸQhþŠ5…ܳ‹ìMNÔ^`-afèžÄ|÷ÅyÈOÛ}f%O·.¨ƒa ÀpplŽ×€•ÂiQÀ½#3Ÿd©L]hTA‰ÄQãn,êg‰ °ìe¹"·PÁ(*ÂÛzÐÁ± ad}…Øï¹ëC¯MïfýØ*w‹#–@ªÜ+ ú%ÀB„\/„mÓûû„¤.„C I2¢l `—Yà” É2 Š*48°À²ï,ÎX©Ø,SpL8 òà€>÷ÜHîOB2Ô˜P¯qOº‘àßåÊP­ ~Š?€yi*ë“·ßíÚ`DøÚ`÷YïÅÉÄœ¨ë!B @A‚“›[f½¤êBp5ÉO]^¯ŒéPÚÁp›sÖìn¾Ö"* "óó'öY]~}=Ãk—2"Ì?€ŠtkT8×ötß4¼’¯ˆrSaí2e PGŒÀTDèŽÑ/^Õ€ZPLÓQCH6ØÂ^QárP!!"0 )ˆØt, T(Ä }°# †GEè tL dà@0lQ" hŒT¢†°Ë<@:¸à@#ï7(þÝøì (ªŒ}Ó ìl/E’âP¯â3О¦¢PÍ| ðμ¶J  5©ë3à´-÷~XÆ5ï!¦HÌ[’uë~ÐTã´äÃ…É¢TëÐwPÃ-•:J>î?d?êFß#+ʧ›õÝEÉ:Šo0òcCLJ¥ìaô (8[3}{t!j ㊀ú$–cW!‹)û!ªÕ,d"„}j… bbjÿ²-M¨J$¸¬½ÐK:Ì Ò% ŸFT’‰WBŒ` ˜Jƒ@@¬FJÎÖ$Zp`˜R…B™ ¤ˆ¡­ %X3,ˆ0Áà•@P8 AOggS@£&¡€c@8C/~ÿÿ!ÿ ÿ ÿ*ÿ9ÿÿ ÿ ÿÿ!ÿ'ÿÿÿžÝ ó頻•2öØ7–ÙüB"Ôt°7Å@×OL\Yw¶òˆ-÷6ׇ†V @*"’ó4÷®=xƒãåÚ§F£C®d[ÅýˆdøÚ™Ë”aµ[VG!j’xé®`Æp€T”Úõ|4i°ƒÔÎUg1¨†¡Ûã…¶PèZbV†¢x*cA`ÐÀq@Ÿd` +Ô3¥«µMwb‘άVx%×ÞoNáãó8ÖäˆVˆQ³O³çèÁµ¦(€P qo„öm,Ö¥8È€4©jŒ»0 À¸j•,€yoœ©?rpÀ&X03hùvT25Ô®Oã¯ð8ðÏ{Þ þ}J"©VrØK±o:ù÷éB%{þo±O%^¤ò ¨ö}:šÃ%nÕ™ ²PÌÙünE™­åJõÒ“œŒuaÛä³åDi©P±7È FÅ—ê”Ý{¤9À2” J{êcÛô”2LÍ“PCh“Mœi,m¯Gø5)vËÌÇ ÒÓDÝžC&B\HÄ@”XŒ­Ä"(ºð¾{+/ÁaÕ#b¦/$2ÑNG‚«ÒÝ”_CaÜðã­Y$1P+ Ö‚µ@((1“}ŸL â[F`ÓJH!‹ ;YBÓj¡hð€ À\þî=Áç×]óR€üÆáy€‰ÄþÝhî¿ %Á^ŠqÒåÿñ„Cä"°§ñÈÚB>)Ä;€+ZÀ\Gæ}Ýñ„L ¨¶<¦œÝ²ˆk‚ìl8þØY‰MÀÙ,@X¹Í,+=Àï ¤ÔÔÿ»1S­ÿ®r®FÈó…ìˆòY]$RÆ@ ð,¦’ÔsE>Ñö1k()¼$¼´ÚQb aú¿Ê@Të9œuƒ@÷˜"†À–¢á-:ú\„y?Pn>„Rä©,dÉq!R!cÈ ¶P €0AP ‰â½ÀÆ‘À")­ M:+«€qÞý’¾XŽü½Ku7P$À@^݈ýo"Ut%꧘&ÝÄÁÿIo¹]ÔOñpWb+Ź_ÎQWéLC2 À2ذGu?æàI‚TM#•YÓ;Üu“áb]Ÿ¶ÊÆâ|¾€–nìßøƒ1m™YÚøFy=üä¶8l3[ç°@<=b‘à¢ÐFFÑ©ö¯ÕŽÇÔ;û–>³A))ò¹±6DĬÖvŒX6v¤7 B’ŠE Y0±î²G£R.³O>én•Œ(QZ@I šê@_aK CRU^é„–ú[V9ùKÞ€ Á"@Jjºt,àÁówÊ*ò§™õÝÅ`žu0>8 0þÝhø¿¡Š ~ŠiÐMÈÿ/)G¨ä`OÅgÀô¥}j¡uÀûM½6„;AiNT{Y#4T>iÊ¡Õ %ß–ãü-[ý>Ðù2¡a/h¼6êžR¼÷åÍ+^ÔxXl§ Ó;ÔLú{|,!jíUY> Q+MçsÖ¸¿C:ùõhư;j¡±Bga,#>R0mT2íÔa Å]ÍHŒ¼F»1,{5Òv‹ ¢X¯D!Ö¾??ÍL7Ã鹘ò§ùnÊ£ÒTZFV€Ü»ìšË„b€!@üô :(’ 8Uà €µÄùðv‹é„V Õøùº:±ö'òŒåXŒs,`N"™þÆžù/‚ÖP6‚šâÛrxö¿HCÐ>Ô?@q\OE^ ì8<)½üý•À^H”ÛޯѪªR¥((jcìKd°·{²çû³ZnÚõîþÉ´ôì<ÀáaÁk!þÖUÄ—vÝÆ Ƙ4É`¹®¯Ü®¬J 9®¿yç€Ò ãç}ÝÕ¶…ŒÏ£•ãû²‰²ô7@~‡‰†ŒÆôæëìIÓqx~žNffYŒ£ï»4^›ç}`ÆT± 3²—l¨öYXl\c‚ùné}ÑU©UdØJ º³.Æí–~×' ¤`Š~ȰH×Ϥ`†nÜÊ,d$Y@ dÖ ö¬E=Æî0<†7,Ï` ÀÁ6‚—$]`¤âÀ¸„ȹ½ 4ÁžöÜ„ 6BZ*tEÔ§çÜØÐß BÒ.,¨WñÆhmŸ˜ ömóYêš‘*E¨4Ñí;k>Ô=L{ãÔ´ÌÆõö‚‘“‘åøØW[Íì%‹Ü—)Pºk“ÄnNålmæk’µùú@ˆˆ€3þ>¡ Ú`±¶»ƒØ»š¸m rÊ••êw3ô„뀬Z; (¨K˜\¡È@´le%Ûy˜Ø'śɒzPZ‚ÉKÁ5µ‘@lD$BÛ€ÅáêP(B0Ç@“;¤ˆªÄ†YU¡(øÃ'Pt´T0€qh0…‘ æC€jMÀÀÃⱞáÀO=p €Òh`ÖÅ@™~'Ý óoBT,¨O±-ºÑ¿qKP êU|©¼Â|‹·¼wô“ƒðl¤µ@îsZÅĸ*Hq§÷ÍS›ú²Pb‡×ã %ïÁ0Cû–íâ I»LºÑ£* qbÏNd>U)^½½žú9Ùö•Ä_„Tâî¹>(v[eÿÜÆ¦“²CJÏ5SÜÏ ¼u—”Ót—•ºÓ”¾„•€·*¢3¥ÉˆÈ-UAÅF„.>¸E&»Ð[Ø 1a("Š=òËßýä&§ƒÉÖ­÷?`LF Á`X1b¨Õ¹e-X«A„Z p@s°Hðx~Ýø¡ßA”õ3¦E7ið%AéP¯ñBžzÁÛ]1îhsÔ[î›§ÈðK$Išú4׳þ.ÕQ¤ú<ÝoMãÚ~O¯¹y³x›Å8²ž—žÙ¦©@’˜Ç4V9Y2hôl/¹ÒO¼ÔVx•4Ž–ÿp6j‚ÅWœ¿ã!v:t§z¨»é}¯ R]¤G0Œª}Èn*C™È5a×z‹;ŠK€Áb¬Ut#(Á*‚˜"TA€ €aZ³sÏöŒÌ“jlƒC@;€R‡Òò eƒ!šÔE=€Bl,”*t hQÁ4€Lj €,Ör¬0ÞÝ„ì? ÊP¥ÀžŠkÑü›íJ{*>ƒÌz_Ø÷óˆSn‹Å9î}KƘV—Xª$ hlû}‘ídÉ b$Ðï[“×YÒ›ª ?ìuB0ï°N¹ù¹Eóu6|ÅÇÎ]ÿ¸Ç%Ö}äŸ"¯¢P7þä¹âšâmIŠ`žù C öfX‹nüÀß” ¨Y`ÿïúúI"‰•:¸¹sÚ J@2 (@wYA„C{G‡ äÏó²›Þ ûÕ¸9ʽÙˆdÓňÌËDÐè ¼í:+3UÕ@«•GUêþyÿ/|^9›LðH*ˆN÷2¶n„j¿óY–iCN×í¢Œñb¢]˜í˜ªVx9@è B^ƒ"MŠàŸ!TfŶ èiATP”=5æHAüÏ|¾$¶ z ʼnñ NØy"@¢Æ¡ œhÐ’Pî¨c ] ÈV€¢…È!¸ 8‘‚†;OÁÀDf?Öà|Áà($ö@þݸÜ!*ØS±Mº±ÜA Tq¨ŸâàjAû À•Èó|Ÿ³¾S•™$zrÐ;¿öØ_·‘z\Ü¡JHÖhT³ÈDðÁáù¢®êd³À©xÑÐäÕ²¦€ê̱“»Ÿ‹Å"‹ ¯mBG#P±‚„Á0#œ[$J¶€T1 ×]"Yo˜ùÊí:U‚f°jÍepë˜Ðþ~²»âžÀš˜"& €€ jÍðŦ@!zšÏ¿ÒÖ h ÀÍ”;ŸGÐ  ÙHIxgë(TŠ@ %& 0d 6Ööð§)Á݃b0 @€¶%µ*`øX|°¾¸¸€ƒz=Þ?‡Hb*žÝøÿ" B[)¨Ÿ¡NºaöŸ[€è*9Ô_ñÄóõfsjiòý4"Œ»éïêßø®ÉÌàô¤¹}@ìûl‡QCDH•$ Hª~wY¾ä„<¢ôZiw'h¼!Œ›!ím5aœý5«‘}!ÛÔeÈÁ¹Æ# ŠÈXÁTt¤ð¯h©W Ž ü†ÙÑiºæÞ¾?4Oè4¯Øã*NÃAö¨Ë‚m€½·¾¿@í›`ƒ¡-M BC… Ão“mdƒ Ï ‚‚ÐHÙ}&%E€:°œ‘¬2Á†¢Š¡:ÇGdŠ™…Ã! ,” €Ôš€/pܾ}»ü‘¯þ‚ ky§1  >Ý0÷_‚¶HÚK1Nº±Ü?–Vˆ\1•°—á(ÕŠ<ά¸«¸@Ø 0{>Ç4W¯ªL(e‡!ñ†9 œ£N'؞łcgàåäΗÍÖk¡4ÄÓømÍ•j¡æ½¨Å–H úĠľN\HSh:;Ój ‰|ÔþØÙ ÈöÞs‡Úëîâs äÔ P ŠºxÀº7©¾<Ó|Ÿ€O÷Ñ» ‡ ôH€EÊÁYQ0ˆ ÐIPTA`R„1\á‚ ô „é~oæ„7PîB´bà ‡A À¿nyØP3ï?}X;Î`ì,€‡A@ ^nÿA•„ú+ÖM7Ìü3Ý*9ØSñ„›«âÉq6§¼O¬ €x£ï„ ·o«£é‰%UBª$´G_ÆÙ5ßD‚èyç™gºrâ" #ém¿¬ž‹@äÉ7: •[ªŠí´—=4 $9àKa¹±ƒ”°õ3Ñ‚ŽnsTö°óëC¸P·~µP‹êEªå§Ö$Á¸®iTFb³ì_EYSCÅñyKY,ÊAGì£ô’˜Góƒs#”ô›çÖ •EW™Y̰Nuõ‰À  5ûˆ¾Á&qp‹¢2‘ê€B-Êd£Ð§ „`AR0Ž0À;æ€XXEï÷Íb1fqyŽÇ €OggS@ß&¡€cA›d]ÿÿÿÿÿÿ-ÿ*ÿÿ&ÿ$ÿ&ÿÿÿÿÝ øg•êSl›n\î?T ÔOñðzû©´ì7  ˆ}ŒáëàRUUDRp`.5ö”yvˆP$_É,×IÉ´!·Öz_Iž¯£©N3hyn¼®™ìÁ­õ]•ýŒ¶æDg$*[nûë#÷Hä¿Ø‡>ýð¶ïžåê ”°/»|]Uè$~í¦r§žïÌ#ˆØúé“Q•¦gâ¨Ê²QU1«¥êÀ€D¹Ô)+ddMOMà¼Ôíce ¯Ç¡ì$2¡›Ý´IÎ?#B˜tHªTBÖ@?:¨ˆ=’EWƒ†…48ËRAn=ðË ¨wœ£Þ.ÿñ€ws€)x €õ×ÜHð?A ª$Ô­Ý0øŸàªêS|ᴱʚ¹J¼¦²i5@«½_Àæ˜Ýœ°Qª BˆÉÙAVôŠJ‚ e9Æèú?ñöZ@Àp^ ë;×VAÛsÉÙw¸J ‰³oÎñ‘á…'ž&OÞçñ_ú{§¡3HÔ“-f4f®¸b—5“¢pèÙó’†8kcžkèf„‚—·ªÉ9œ‰øûYZÒÜh>C–z„â­©‚‰ûí*IÅËQ–FEócî l¿î’b À!%%.'zï~ûcO¼ R b³²ΛN˜$@hÀ'…vÀ;Ï®ãlÒ× ³‚…ÍOŒK8Ë<Ç0ÞÆÜ¤ì?ƒ24¦i…šá͹ñù&`ÚÚX ¹nÅpl¬]FÌ+ˆ‚ˆ©‡+û µm1Ä©CÅÓ¡JˆR&ДÁæÇîn#aöé¸'vñн‡ç˜ý˜Tð0Xw³¸±­~êÒ°²oc9loÉ* ŠI!=rK‹`ÀEÅ)BÕº’øY‰Ðx@ª_¸/³hì$|kqÆÊªŽ8 ‹®&33èd^#›_üŽU)߯ ¦• ¨[Øœ óÉE` mH  ¡€ˆIìþµ B'(6 2€”Ü 2Åôu;ÅÆÔ×c-@=€Ça@pd6t*É;{I>¦ø `^ÝÐú) µìP%¼ƒn`ýІ¾ìPü€ŒÚ¡(£ZLƒ{TÀÕšw+*™Tú‚ÅÞ€ /bNïE•Rs „$àµQ9ÛòŽž5þ7{}tJ¹K¿#_WûR¼ZZyÎnÓ`õÈá0^²é’=29²)4„pŒ¡Å’Íë ·7 B{ȇœ}φœU;× ¬­5kV5j Rk=  VB[HˆÓE‡ŒMƒIÁ.¡œD…ˆ-4©Å™´hŒaÏ^õƧH’šS™hï¬ >Æ‚ %HÚ`‹È¸ Ñä<ÄŒ±X `H0°ËtÈÃÞöÜXøoŒ( מ›ù7‚2¡NŠ?€é;ëÎAÞø^ò 1OP”´Ï€Ý§ŸÓIU^•% È$RöΉŽï)XÎ(NŽ'›‚ÒûŽTÿ7á„¥kèPŸâàݶŸ†ÃÄ&pÄÙÐĤôcÏKg™©’R$ö€k9øÌŸb‡(B c‘Èoúéï‘ýz™ý4Ä™ÐgçÐ.† ¢øÆ9"PÓÕð•™ùÄB3,µf@ŒGÓúË hÍ%ÒOÙ{?,ãÕ7°×­K á²k]ËÈ Ä§4 ªêŽTAh]à¨%™ÀÖr˜“àÐ4w5×4"L:£¯CW¡A ²8”¢®l?ŠccD@+ÐÜ}/u„t]CrÃñ!1·¢‚‰™güKê|!ÐÀ£òVÉI±¨gÑÏìn°ž} ACóþE‹À~צn£­± nct#¹ÿ‚TN¨OñPKf?ñêÐnýXðÔ¾½ „ÜÇôÃIøª*K& ¨íÏöÆÜîÍË^ºSOOež±yö>-‚VÆÁ_íégeB]4*x1^@=Y&à!HÐ Â9鎹é–lÄï€BXœÓjÓE’ï:@z'Û`:a‹§"„A¨’Z#Šú¢ŽXêiÄóÐOä„ôzzt æe¸—gTÐý R„( |>Q@ª€0,!¬€EÂÐâ,Ðp0BÀA ˆÁÀ­Ò08 €YïZîMk¬Áà 0Œ}ƒÆñU ú~æÜXvó$IÐ>”õ)–E7)÷Ç:Bq%ê¯ø B=¹*ê,€;R/žz/ “kÛë›Ó&Žª 2$÷Wnê;XX1$Ç?Nåƒ÷? SŸ`‚ÔrúæýñÍÂíM/ùóe“ 9ÄNeäüV•×@W´ý 8<¶Œ ”æR¹©kÏJ „Ð}ÌȤ²JJL4]q…^Œ6PR$|› È¡•u)'¤{:A‚'†âWÉýÏ™&á"Ècø½Ïô”%³+¨·„´€€`A%3©²è9ë5ôŒ odÛP  ‰£›Ð%ÜÀ0 ¦3?û¹s 3g îaÞÀbÜbÁ “ƒ'€žæÜ¸ü?£’HšJÚêSL‹nüÀÿ¤RTq¨Ÿâ 6„¨ÿd Œëï.žIûPƒõj_€÷}Œb£MC%I”öíOwû±OJûZ¯Çˆ Do'¤ÄЧÍh3ΗØð>õ¬+Pá7ªo–0J0À¼i™AæÛ$´ç _žÃI´%œ}ÇÀ%·ÃµãÀ!i¶;h8@Z·µà(ùf 63Kø²š™®]7õÄ ÝÙwƒ"Ëzê”5€ÁT0ù Á¡ §Á@YK„‚ Ý|g!LI !ëÔï¾x  Ðð¼ñXëq“»ssÃÜ9¶ÝŒ‡÷¸ž æ]&TÞöÜXöŸ‚ ZBýߢËýã«¡šCýÿ·Î _1ÖÙàìž/§/íDiUe0hY™ž»îO†ö,Š,†|Þ¿VÉ‹¿sÿªâÁh‚óÃÑD?Ùqù#MpŸn«œ¿×¸O l½c”;làªpèŸa2‹hAÌöóÉÆçÌ]7Ô„\×àÀDM†UézÍ‹ãù¤ˆzLûªO7íSíðÓôžKP[Ðè£bÜÇXèÔ7lE„Ã\¯ëix¾¡ª€‰B‘†UFŠ€±(Å-‰RÉ!( q"ùOpBÀ웋®غigþ¼÷ü–Ï3 ÌKg”3ÞÝhöŸQPÅ¡þŠqÒ þ'Í!´ ‚úŸ1Ï8q8àέ¤oœzɨÿy>Çt" êU• ÐZßþ¥·úÐÄ5ñç¯ÛH Æ< H}Ã#a`ä¯r^Žƒ¿BALð4•ÛŽ¥|¨žZü.esѱ¤Ï IE¥K’Å‘,ì}XZ_T(ÚÇÑŒ2ÈV3xÄtÃAyî2J,d9ôª)H\âØðùžiúý­1Iw Š¿z£ÎÒ&§àç$€€;w=‡"€xËa)ŒÜcø\‘ €ÕY…ER"iG5nJP&‘I`Lc¨ kªžËùôƒ™ë¹Û«+ça÷çó€=Ûì8s(€‚ÞöÜhîG@ ¥ ÉštƒÁÍbé’Ä®¿âQLüùàýBÿ4¨Î)°z/׿ûæÞÊUUJ©×Ë^ßútã8< z ìÇ5&ŒW ƒqÌŒÇñgäûuŸËT× `X”lŸuCªÓÖ}öocÙÖÜ‘ñ²õƒiÞ2ÀAgÑ·l}üòµK!Äp¦ÂÜ'ãvŒt;l^j¼F¦ƒè':Ç«²ûú¬r¯††)@‚h{BÍé:YÇ !4ƒ`òǨŒüò%ˆ®èª±PhKWPZ ³@‘ÀDœ(DŽ$SÍ—ä4ä†P€(\À°l{ °X[ 6}›Ã v €Ä'i@‚~æÜ¸Áÿ•ˆØª qNºaî%~¨F¨ŸâàÝsÛ õÚ'ÀÎé½ÛŒ™ªR @ 0{Lg2þø\ªŒ§{_?9Ô­SÜa/t:O“þž€G%j…ӑد“Ò5Þ[åT-™¥ÿ ŒòQ¹äOI€(l.Ð.è+ýîï*ÿÞÿK¹ÑU¨pJ(aì£@ ·èNŦ×nf?ìE6°n…¨ÍŒ3òCb 6@ iÍK&"ņ,Plˆ‹2HT@ ‚ m"*yó§M;ñà›1Ö¸AÀ"7pQ p¦(ØkxÀ åXëÊ ·3›xo?p/¸AÎ.€þ¶þ3HBnÏ~ÔŒmÎäþï(¤$4ùyh9ŸïœOÛg¬}ùr*ó¯êhQض1BvÕ2U¥U ö4sëV£o‡•jtòu¼×ùŸßœ<*aÞqB|TÿëUfÉßùáÉ.¥­YE Š3Z©ÈÿņcŸ{—}Pfc½PŸ °ÏÒN`d/#X·x˜“e’ ôY¥šL/U®—² âê>¹‡ÿfu­µ`(] Kl°°:ǽwœÙ¿Eà™EÄ I) °»è+ÀPNZè­ÕbÂ2ÒN ¨Š _Ui½ÃnqÆûŒeÜ‘À6°°ðœñwg˾„0»)Ä@ŠŽÆ=„4Ø´ÿ‹•:Ô§øüãqAP!ÁžŠ ÊLó¢ÈúVñ2.ž{G Ü€œûÌêÄÁ‡ªª²2€{ÛùÒôŒAê¯ôÅ(ÆŒŒËù1Îw ‘õ0ƒ £þ8Ùpua.Vñð®ói³qLEire§ƒr8´þbeýç³ uÎ+` k1[ɨ÷ pÖ¹Ê(X¿@½©îÍ ¶sÌ|ãN€ `_ÄXBàÐ $´‘€Æü˜ªw‘Ä)§ß3"€Ä©ÎЯ‡rú¥ÑZ×isú­_µ´Ñ°J…±!t Ĥ°¢Šv~2õþXÇrëb­;oMÀÔ×âÁ °ðb”‚o€/Q<€ OggSÀ&¡€cB‚<€ #ÿ ÿÿÿ ÿÿ(ÿÿ"ÿ"ÿ;BB@A?NIM=JMÿÿ~÷ÜHð_ „T­À^ŠqÓ 6¡]s°§âQLv‰n¯™!ˆ}”k³Ñ”ÒêHMAu¦–•÷‡9«O.@Æ‘CÐÛô &Ù(RÙ—O-©¬– W¡¯ÎV|-™ðFiÇ<õÞ·%ÖXc÷*NA b¡Ï¯Zå̳ÎBždÀà !|ĨF@ލFá’xJVƒªpBøƒ.ðÌ `½S¯B¨i`X€¼Bˆ”]«`0“EH ÀTŠÃó'o'q¶À±€D!€î–ж(À”UÄ´²8ðl~‡œ[j†®¡AÀ øp_°÷ÜHî¿I• ì©Ø6Ýpøæ)ƒèÚW„½blœ¸£ç<­þ èÊ ‰fޱÒ.±…ªR$ `Ž6öå?߸˜¼> î%ŒM䦒)„X½ˆ—½výZH×5§7€ hɸŠûlÚ+/yÎBÓÁœ3Ooi»ª« 3„cý¤°‹ðË(£eS&ØÔfYcLh8+ƒtwGW!@'º¼á[†§)f@=6~¿`Ü ”ª€D²‘g¨¦’Ê*€dèa +À”®P  a&€0û̇5G ‰Žç@8Ü™¤ Ì(p€}À2ÍaÚÈ?æ8‡Y/ïÞ%˜€ƒçùÁ:ê9àžæÜØÐŸ4Áè*LÔ«x6Ýø¡¿ ˆ¤9%ØSñP’²]·Ï-ß7•l ô§ŽÒh]€9 áÖ:½!Ä‹ãHUI€@¢—³æ'y:Vç¹iˆ¡Ï*…¼u<ùÇ׋[ßk–Q™ÿ,B\|$Ø^Ž@èl¯-àcY(½QÆDRR”áÑÂÉ­Í&ó^2E¹Ã‹îh/Þ;Àˆ Ã+nñÏ"ùÐÁÎQi^õ¼(á-SÀíGžË„Z€¶Ç[ *#&¯±árïX" £ÀH@@ж3´B sòoD* *pÑ˃A „…á!ÀùËÐ;€•xÀÜ€Î`€ð`S€Á ÞݸÜ?ƒ h—êS|“nÜÀ?Ö»@¨æ`OÅ?ÀkqQ(­þ6·1„hËĪJȤˆ…ŸU{WÂh¢(S?ȩζÃî!NGš7§ áD§têÝnk™œƒ9+aüéÃpÅYx­î}x«‚θ‰-î\RÀõ‘diƒÈEË}©A/ª^ õAÈ"j<Ê$$*FÀ Ún€x, ttv΀%+BDÙ÷å•p[ÍF¤$5CE}À®4@'àC”VX¼R¬ Qˆ@wu$° w €äÈá@ÒXË3<‹áó\<¼\`9öB>žû!j$ØK1n:4ô;*‰Ñum ö¦ø²(¬8VUŠV n|ò~®– 8$­€ò©1S9²Z ©ñ+'ZµçÓ×^WQŸeüU6j¡„MJÎÛ·ù2n˜¥ }Úf2¾£ u‡^TÁOC ò¸æÂ¥ùÙ¼úgÆŽŸ¯Å¾¥ÉoƒºÍ®Ô- óôÚ^šÀ(qC4dH…uá1`K0‹å£[ ¡{ÛR“t E@7ux:äEu5VÐ",K1 ¢#Z€WƒwÒB†_u@\hMBa$öÚ @PÀÃp–ñÌ7®¸âãa@¡'ÝHø?qÑU’"ê¯X'ü3 D®$Ô_ñGâÉ!õî´¸õôO€˜ùÈë¤n—ªJ@Á&ûœÁ™ËÐ4_]mL.g<ˆsb’Í?þóe`Uóà͘dšÑ³'åEEš¢\" %Jp׉ì1ÌnÛª| ¼Ì¤º}äÇÚ²}ù䤳èý½u“]ŠK%EŒ¼ÿÕØ{]á´¥«&Éœüj¦&£Â–9žÃ á>™³°?‚© òñ[æpÍÒë¬+X ¯A!èÚ³va[`’t)*0(€U‰°B €VT½Æ2뀠C0J ®À?Î`Ûfb1Ÿ¸ ®ùcðŸã8Ǭ (þÝHøÏ ª9ØS1.ºaæŸqŠCýsBŸìd8íñ{ZY–£ÚAI:¹ŸAך<ºR3Ue2¸ Ò½õÎwžæê,7ë‹;ÖŠàÊ’ÙÕ寫¨4ö—¼6h)ŠúÞ÷+'-½¬éä³å Wž:€Ý€E¦'=DZŸlW;ˆÇ'»îz*z&{„Ì‹ŽHµ ´èÚ U…“¨Œu(Giø³±B¶<Ç?›k·;Œ-‘C‡Õ!öÃ&Ýô6áC+=tu—áälV3$´‚! P×û^Ò”ÅQ:è³ÊN𣦢1b@$J€ƒxþÞÇy~¸i{03óYƒÇƒ÷xügñÆùÑ9Þݸìÿ’¦];õ× Ÿÿ_R¡’ þŠ€{N‚oüç¶9‡Ÿ5¦½ª2IHì &PKÇG_w³>¾øöú·0/zö÷†ïQ|üÜXÌ9ŒNí —( ñ‹2)ëc6Ðo:ÉO¼¬Oû 0ç§ Qn³®FÄqa F8½ª¬}·¡/Óï&xY¿e·ñ€EŸQ$x&JàÜ$¡6ÌåŽ^Á€CúJ° òDO‡­ŽÀòLäGœfJCrv‚Ø@CB&0W+-`A8¬fÛª70P` ,HkT h`†4’Z€uóžµf¸õî×ןL»;îžýøo<³\[v8®!ò` žæÜXþŸ ƒÈÍ#í‰ëo8ƒnÒÐÿ’r„*õ)~Ïå¸ÙÑ>±+í*8yþ:¡|À(΀˜cŒ1¼C«¡L1V¯QÖ˜ä¤1ØêÓŠ¦!|ÓJzz¡ÛŠ|. %{šÚô“!k[¶ì>ÍAá•P³ˆ`Ø^°4Àú—ãù$`¡]’ÁVY¿³!¡{291Ù2L²|£s0ŒªUˆq¢¥ÄY‚-]逨€šËaÛwxÛÀê*¾/b"¶w¥e@]‰U„$ d2®‚¡)°ñ¡ÑXZ 6P“¢Œ°`"%+j‡ÒXxàyçø€¦Í09’Çc9üxL£@#‘z#€† 6¶Üøìÿ‡š±l¹±ì?#%¢¯’J»nÅ?ÀÓ“ÑO;@´/`ª€Œ0ŽŒ±6ÅJ!UUIÀu庉ÄÑwÆ«Ú{®3¥ ©BÎ<ÝÐDY¥y$Ù¶…Ïçñçþú»ºiWôHƒZ8îìÍo¦ZùȾ±–º+)wyTu_ž7åx¬nE¼1™ÂÓ@ÒŠú‘ÞÁ½øuÁ=Äúæn£à‘;] ¨èª—xgÃÔ’E³‹«™'3åP+Ã=0 Îë–ék¦!< žœ©L9ãi,,›SCa#evŠÛšSNw(ãr8–X€% ¨1ƒw‰By,dèrD`§f;> ðÜÃÖ.0>`°¥E" 9iDDùÖv#sˆ€WäI¯þ˜Ýò#h?<„îøq¶ÔE½aØðkÍœQlæz;JjßþÂî|Ò˜øRšýúÆs£eÆÆXY9Ìå½GÒîŒôIËÿ¸±í¿`Ì“^ýq ±èOZ¿ø˜\a¸_Á”ôíNkz´sUÄá_›T3¿©ŠûÒ›pã–'è˜`Æíû$<ôQ¯üðµñß÷¼úãÆ±nü–bóóùGíõ¿†* æº9°gN­kó’öHï§§e—˜5€˜@– r𵿇‘ìI¯ùq;ôì¿!öúœ×þ8cë·,û÷ÇÃLî¶7¤UUåaßòñâíçõhCl‡,4bVª@¹ù¹Àá¸ÎDR‹TÁÞóPt›h-úk·kwÿ(ø½ÇA˜C1Ù¬áoW›LÜ.i«âb¯ÄQ†ÅZÉ‘)r掔C Vwü¨GñÍúWü\œ–ûQûfÖù§aZïôóÆÊ±Wfü4øU÷$õüÃRJ]Õ×JÍÂêHŠZUÕ†ñjA  ðTô·ž®tb=?fh,ýO Y˜´ý˜2ˆMü‰%ŸnËT)W–ðÜáGm¥z Ðù\º£=M5DPP´Š*¢´² ä 2tƒþªJÄu¬ƒ\býÿ›=Ë¿ù*cÕâ¿vCºËÜ0úí6++Î^8Üð1­•Z.îu¯Eã:/ªúHK!VT¯T«Àb…c¯a”LUGÍTî|>lZK~3V?üè²ËkÉЧþ+ %ÖcG™²›C1©ÇrMüá=æ'ZÈŽF  S‹Dà4NÔ…ÿDZ ÌnHßå/´?sX²€‚)ºðx° ;Ë Á€ÝXö¿ŽP¥ÀžÆ¶çÆgÿ ‚ J{)>‡þ¬ð$òñI€[d ‹zÛ¶OÑêʪ$àÅÛ;ö¼åN€ìo .dªa†£º:_V‹×Jkmãe`rO›7”We'N,yë/>Ä…"ªwý-…ERø}æîœºÜe½‚ ¨ióÍÙF7“+ mxOGb j‘E«QI‰”à)Cö¾ )Œ×7WÜ4ÝTMò*³DT²4ƒLWÁ` ^¦AŒ tƒãó1i€À€ —ñ\|†î½â0aŒ„«&=2"›ŒÉ`áÐ*° D €k·[à¦îÍýöû‹?`ãpK0 OggSÀL&¡€cC.×t9ÿÿÿEÿ5ÿ7ÿ9ÿ/ÿAÿ3ÿÿÿ ÿÿ!^÷ܘõG¨RPWCÝsõ¿ä†(ª$îºÿï®=È"@ å¨XÎ9Ú:SU ƒ*0êDº+ µ’~*Ÿ»]š`¶Á®¯Bl2¢0P<me[ {:W¤õØe›>Uj[ÛtYIëä’*˜Ëý¿½>¢òÎŽEPN²ÚQ'ÄIn_±fW——ôbÄ €ì}²!íÝÆqU%îH€éÛZµL(\GÂÇN@ ðÏ1؈¤^ «¢dq} |‹XŸ Aƒ€t e‹gL±3›j` 4È4¡±1+`@€•áÉ4ppÀ˜|œa˜X€,,XH† >מý7 "·e:+Þ97°ÿ'R‘¢RA݆uCæ<‹ië£ÑúN8¼»=­ÌpŽbÏó1[ó©ªE‚@¬t“¸·¸ÿRÕÞ^vÌY;­1Ù¹Ÿñ*ÉØWÎ%X4á%šà8ò#û%Cê™,_¾»ñÞ]?~Îôi‰«® /«Æ})ãuXh3g Kú@šÄP’äLéŽÌhöˆ+m¦¿@´¶æli-ô‚}Â{qèj‚4–»øgS¡ ˆ‘×X!@ŒµlaŠDæ6.” XuA)‘É–€Å6 ›Ö+eÈ5vSÂ=X¥`xÓVÇ °¦wkÚ Œ¸/£ãQìÀPþ¶ÜHæßC)¨«1®¹Ñà¿HÁ5:ÔOñp7'¾‚• nЀD³?‡i 3e£$T$¡‚Œð*îñ¶2Ù›õÞ—ò÷p7µX/rÓ¶> Æg2`¦™^™£ë‘ $ÛêlŽ®DrKNË.<ŸŒ×€€)ÄÒnc—í)Èyý”:_7°Õ+OÖÛATùb/-ðȺíшš T½4žŠÎP ˆÊÖv–ÇÎ}D¶ù/–¥T†Jo/ ‰¦ïAý|Dþ ¢o¢“ý|è¨cëJôë KFiÒà  ¼ ¬pf®ƒ’pA€ ‰Á+² eÊà&ÀŠèX •$ÿg·X°R¹Ià@l[¬‡GáKÆ[£°°J_ Ý€¬å½ö" NÂê>·Ü0ø7(CSèvÔÏXÇü•U ê§ø8FŒ|9våÖŽAg¬Ñ» Üö1¦8u «ªJ)IH$Êyaÿgà ¥*Ãý*4nÈž+FÉ™Ók“˜yŒïרvøF÷â5Ä㌕"9âßšà{d|çp €ÀÐjšÕú ËÜaÆÁ‰K*v•¯!ƒÉ²ÖGÌÚ1G@TDñ¯žfhtqP]³÷î–®{«Fq7ÁÕ@uêăEDEßlÍAÞ‚|ZÀ‚XUWI¥ˆð|’Ò W˜“ TQ dX„  MCqm°@€P¢°¬Dè2€¹WoùŽÁå‡Ý¶brêëï›"˜¾Þâ,,‡KÖû p%Ëò €Ÿ‰Å‘ EX (Í@¦þ·Ìÿ2$‚juû˜÷+)'¬][!­Ïðx#ê•í2À^ '/@ë Çxå£cdbfªª”’ ‘4xìz£ƒ¹Dj%Œ°Wü 連ê±ë¾ÈU’âÕÕÅ]¡ y뿌Ës;„Rž´zn,óbˆ¾5bN–#==^ò_‚8zdÃÅ6¿V|yf52¨'yÛY%#(ì±)QŠñæø~éAHLN ‹5)Sa\eÀ€a&2xáoŠø)~%t'ÂN1\Õª:˜û¹ wcrV1€ŒTiÄ`Ã|Cˆ& kUvØh%Z‚ 0iRwn!Q)˜ûàÃzË!à\ßwœý©;ìü²°? IP*¦Ë(¹a:ŒHõ 6@ÂŒÇÜÐþŸXC諤êUŒc·ÿ'Y‚P¡ ¦ø „i#jʨžð^Š£e R· ÐßçZ_'³¦ªTH€±hÑ»sÒ_˜Èê)ŠT”xãö ãIÔDoŽwógWšDL ãb8É\Î/§øµå-u2ûg±Y5ÐkN±Þ-îÚѱû§oµÜÊy$YmKé(³òB.ëQÁ 7ˆ@- µ¬K ßÌŠo?à( Mu1”AD.S®†lú¡´ †G3ZœAvÒ[AšÜ1æ~S†km°E@``Ad €ШФ!I“rÙÆÐ8k ’nžïð\pà\S|·>Nýëãð}?Ø]êF´A`Úpm`#‚V´êìŠN§ÜˆúÕܵbsãÃÿ5(A¥‚šâà}PÝÁ‰²¡}Ì6‡ù̉@MUU•€I!kr‚=Ä¿KĤZô’îÉÄÔiÓÑY*ÐéðD{¢%: ¯dxóŽ~ÿþkǪâJgq¨œ-‚:×9ÌÛ°Äe žWˆòÎJ˜ôAng¥ÎlPõòÝNRî@hÎ=/[ ¶¾ ¢üÒŒB(!'`÷n!LD‰ÚK¼¹\g¦âF!S4Ç ªÃv!bÛaÞvXOðmÑ&0,+ MJ@´À d ,à«F¬f)ä €ÓxÇ`Á–¼}çm_ØÃÀ, ‘v*T „Ô&$"ÙÇC¾À¯$^Dzþoò‡F2NÍX§ÜHæÿ ÊhN‚šñp  €tú p`SgXEªªÊ" \]GëÝZùäc 0”ƒ%›¯‘\ö~†…L¨’±)Âð3@ /¢gô ú—^©<˜·ÔÄ»DÈ˯lú'‹m¶°I¯àbm[„@®rûmRz8<>]ÙæÃ'†d“û'œÕÙYËï‘) ü¯0Šós”?k¾þH·?‚—ß‹ æ¼n"è9ÊÖ–bηL§²ÙJKO)H k¡p,+0 7‹¬nl=môC¶Á‚³,6§°Ãã` ‹™:?ýËdÍÎÇkç`e=ìÛ x…]Ni,>BÓ†R€ÌxP´HPž§Ü¨ý¿Ä‹ ZB½Å½å†êÿR»3ii.‰VŸñhµ³Ýβ}Ó̈FûÅô——µ8ÝÜ|}+ž Ç4T-H xkêëÏwï¸ôå¡•´þúêlšæÒYE@újþÉ®:á·¿kšòU粦€™![D꟧M ”³þ D“XKdi?ÛÖ´Õ§m¨pŒå“(" Âø?Û@—@Ÿ¨ÊÝWñ»ç¨Þ"÷ÒyRX™{ìàí"_Í~Ä;‡Ïw5°`»ìî¨Ð{–¨SÃ^B‡vР)ÚýÚ¾* ˆÙp" ÆT°ÍA‚``pߟe?¯è™Ôds^HŽÌönKXÿglrØÚ¤°êåDìq€g†$<À:–ž÷þ3H„*õ7Þ57bÿãqˆÔWꪩOñ0­$Šé6R^¡u5µ2ï^€Sû\GSˆÅÄ¡4T2“ ¢ïà½ñ¡imvÆèxLèÛ)e· ÔÍ@}9”Õ]g’ASÄ´Õÿ©Ä±%kêöYÉ_Õjt* &(˜ûÖ %„†õ¶·+\{i¿£ÏeÕÌÀY¥pÓ(+Q/]jj(ÌÄZۻȘ¦#a;*…ˆ`ÄÐÔñ4^å)Î8ÂÈ2€p@VÐYQ’ªÅ8ɱ‡ß †ƒXl(Gº¯‰„«N/R<% 0X—ŒG5üSÐ#šØ»Ï:ûá<Æ.$‚@̲hQ„€>Ýhø¿D€$íŠ „=ë ÿ$RTq¨¿â3Sµb›˜x¥]“¡´Z ÖYñY)±:¦UJ@ %‡k›ìV%€ó’ôíJF& _BÆ1F(Ðx|ov~ª9ÛŠ|JÎ{>t†“ô|ëi‹]ÑѶ:¶ïä‰Çq Ä4éÓ®5ÈK„b07Áz*80¡êS¤(1pÕŸ“W‘‰!³ ?Êœ¡f€¼07BÜäIm§‘¾û»©… `28Ø à4’Uj­*QÂ1€Á8µš6C €–D… )8ž%ÛxwºÿÊ™ìɪ,ü‡eàÎaƒ›ŒB: ¸@^ÝHø§” RBýï¢CÁß¹‹{)þŽê×; ˆ³÷ƒq™ê N¢rݦ¨ÂU'ÊÌ€H$eHÀb°¨ú—Ü»÷‡à 5}Œ½{ðÿàã–Üï;T¾°–R¼¯FQPNvšpLä òt×D†ÀÙ¥’?±Pûä¢cwq Û@+2….0³KóM”¢qnw ÔŠÌõÉ"ºŽXaʺ$ç‚Éö; 0íÙÖe•<—1†fB;6µ³!Îä‘©þ«@áTFØ`A(À H‚°bX.7BÕÐÓ Yˆ+0À3€caþ¿×Œ’ó'; ÆÕÏ`9ø·  öyèñ¦¢  þöÜ0»yPDh êoˆƒËý‰PDm¯ì¨¿âà.¬E7<Ññ´æ6ê3'l¡ªÌ$  Рâ+'¾G:5ªõ|rdÕ8ØSñ"ëLp"¢zJ=dÓk¢^ÂlÜ¿[š¢s`œ†E÷ °H9çÃM_ %`äì¼ïû•ÆûÅ »yc.z÷»gßZþÒg@ü°HªîüÅWf`¥ì®—Ü傹4c¯C0Ê*bÑÝÄi¥v.d5Añù\Dá¦ÒÄq$±x=8M‚Ëu``=‰Äºc¡Qv¨¡u|`¼¦L ´Aê ¬ÉfŽÉÎ ƒÅ±,&V 68·x¦X¹DooXÀ½@«Ü¡@€JXUõS`AžP!H-3 <¦Ó(Ý7»Š‚…ûbM_:†›3XÖbpOggSÀ„&¡€cD¢! ¡ÿ"ÿ!ÿ*ÿ.ÿ/ÿ8ÿÿÿÿ!ÿ+ÿ=ÿ0ÿ2^þï RÔOqºAð¿F¡êS|FÍ4Ì[YNðîò@F€C-­ ÐÞ÷Ž˜Uõªª };Ä'/¦]€`ëŸÏÚ ƒSýûâtsÚæ÷¨pŸ3¨æfò™M’4FžEÅ>Ëji\Ûæú*ö@²ÿ¬P¯*Ù £óJß•À7;‹ €`åÌ´LCºqµ–ŠBŽ6::»´€%°°®º7å€èúv:¥j±¼‚p(’ÊfsŸÉµ„K@H´>-dWˆx8Ë €J TaA†ÑÚhJ2&¬9ÒÙÚD&P¬"€«‚T €uãÀì°¹9ŠnÝ»30îœ0a€`Àþ–ÿ/VB’.EPÅ6èF²ÿ’Ÿ ŠC}ÆÀ<ɘöh’VÞX´°è_€2߯hƒ0†i(K í5Š­äß-Ä™:R»é ) èŠÕëøëÔº.ôeu_4E½§Ð|y^€"ËÉzfDÒÈûšwä(ÐæSøˆ0ýàóÔ+Þ )‘Mî·J€ø:ªÞ©FzFP!%,„‰ažŸ²ÑR®é=MCuß…Ä«ºƒ *Ô]cJ†,ç¹YO©A>é~ÙP >l“w !È÷€0¬Æh$'zXС@ºµ¹ˆµ)€‚eÖ¼ÃÁ‡} è àLͰxÎŒÉ`æP¨ƒ…]­Ò@º þÝ ÿo$ÈPÍÁžŠ}Ðë¿å¢ÖL…¨¿ñðÞá  &‡‡Ö¨.Ð0ǨOqÝPS&I@‰š@ æ’7³& b#îvã>~*·%¬‡W`@Áç0ê}€‡Éitâ1¯ÀŠ®6“ :Lh3Å"½ˆl<@Y{Û™¯ÕØc.È·hUµ™ÿXŠ]YÕY&Õ…ZXF¨¹Ž;ÝþxýñÜ`êNˆ÷$ñ ¥æ’# éœDïžHÈçÄUÚ“³DÅý º¸Õ «˜JÏ<Ü‚þB–€ÄS™æüh@äª$&2M~(€–h½€Hy€E­þÙzÆ4Þo 7Ó»–Ÿjh€“E6‡ x3Þu1"Íñÿ›.ü·Ší ¡þÆ»è°à‚B¨&°§âàŽ¾Á ‰þPnûÖÖI)3Ufj„qMÀZÙ´$½õ¥SŒ»ªŒÓB¨šÊhá5“é íëí¸%wXȪLzºÉ›;–tž@õÊôN×¼t…¡ø$àÖ¯IœFµ®4nÁÖ>˜vˆ^w$Ðç#þÄ~LÁªéˆÖ Õ¨EÆ¥d\:&x¼B@7Q©€Ü D¥Ú¾rFëá`¬°æP¹çSÓÔŒ§îXh†- Xª_?¨ûOnÀʈ–Pv˸CiiÚEGµ…Í)œ7 0o9 xO Íôïv6ðèaƒ3âq<7;‚Àžža„çÜ0ûò#WÔg|‹n˜û? ÅÔ:ˆ ~Š€[Ïâ#èáäˆ}úQóÕª) *‘ z ä¿ih«ƒàéäA|;;}¨¤PM__‰YS@duØB«É¤uV}xsÒœ¢‘£©Ìq"YYÁòfݸ÷ŠàÊ0½ (°¡žÛ2öÇNu29c û$»BˆÛ#°ˈ›È—ÓÈ` 0,?³Ç0¤;A/mæð‘°K|;Pb¹¡Æ€*b¦E_…̯~:YCH^‰¶‰•0w¶ÜkÃÿN“"@ƒ`%„àU`´œÊÖbhSuJDHCa€Ö4 çðl®¸]7³s#$N˜‹iœqì`Û§ ÿw ­!­PS¬s³ÿo€ ¡^Åg ¨·-Š\í›Þ‡pDŒ¿ Ïê38òÄ:FëÒ e•›Úí/ú &Áì`Ïûœ*×ʶ›ám*,i…q­xO»79.9L €xÅ0}§7Ñ8[ÔãXt`Ð ¢ß!¬EðšCAb„¸>DÔˆÖC°““çóÉQž?šùp³÷–Ö³ š¡ë<ã6{` “ŸUüûç§Ë ¬„Œ`À€ €Ä0ÀÓ4‡ ¬T!TÉDH+x À@âÀM~qØ|\Ô¿Çö:Î 3 ÜT%åüþ¿SËx¿0Þ¿Åaðz°›Ž¸CpHâˆ=(~×nožÌ´kêV¬{n$ü/H†ÖÒ ¨OñdUeUDñ}rþö{`â,ò´ühVâY|UY™€ˆ&[齿©‡3„?““ã5)´é׉[M°øÈÞ"Þ‡T§V¬©ÕõšºÊÖ%’=¶eWÚ+ ·ß¦YI"7ˆ%î¾¶B%Â(:@ó¤!Ç. ƒNjÈô$ †$J7 Öªs¯`«t€ÚEAOL×ÌL¥‘§¯6ÂàÐ+ˆUÛÔkD0 ‡!¾¬èÖ09A¢Ž$ „›"pbŠ`IÙ…CP,C '0$ ³y…°8ð¾‘ôI“( Q`¾ç¦l$£+jÆ>ç0õo­iA½Šo ªe䉣h=«â-é¿ G'Ò¡À)FŠ Ðßül‡8âhx”*€ÂÚWŸtnëܘ‹¹;š½ýÏZú£?é6»'OQR¦‘Ën]”×EŽ]1!®CTõñ¦ÛˆMeÚ€¨׳rJL¤s?EY_jã%@ËZLXm)K mT#Ì]EÄ8¡3¨˜Hi€¸Jƒ' U¡Æ1 @‚1¶ @( ÄD¢„(M¯¤"±Ç Ðí@*’RÓTn{b Ò8 ¢%7©Õ2Fq@RT0Ð0`†Q|)ØA…X >×ÜÀþ7É´J¨ßœü„@¥õWü¼·ÉyaÖn@YåÕ èˆÍ‘“TÄm¨*剠@?¤q%¿ÿ N£êÝò7–°Íƒ }Ýoɨ@b3´>-‘e²Í)HýW  gj$<áÛÖóÜü.ñyû/éÿ!È1ZÚ××Û…´¦;ËÉ¿èæö¬A`*úRS€‚ ,Ç’ ZU:CÕÌç¬3”imŽ;j:]Ej[¡ÃêQ“GÂ,¡1V6 a<#¼‰V ¥´ E¶e`´/€,$1¡@jPŒ`ÀËZ[Ë.[ƒcÃÖb`à€”tI ÇüJJBYÚÏ…´>CsCkó$˜¢æ„ú+~€ÈSeí åÔ)D¤ê"xãÑûFýtbÌÊ}Ÿõ¢áЧMU¥JhoÉ5w”Ùi9ÞææÞÃùë\0›ÕçñKïøTùغðI24°WA´&‹÷-íÂ- µrÐg9 „뿺×;ˆJÈá02E¨1A/¸ÐT©X@@»®”dÈg/j±päê;‚FV(qšè"Ï·’ˆÂqPê  FZ@ô˜$@lˆP(6Ø@¢GŸ1ÀÁ;¬– 0‘S»._àÀÀ°ç¬ñ ´ÜÞÇnÿ) K®–zëš±ÿ'‚õ*þiE1HYýô»¥< ëЀÖIZg@œÁн~®©*«ª”² D’IT›$•ÑÓò•ƒäûix…~ÇÌìz4 8½wH3y ®” áúyt\+E6íð76 gŒdWk¹²‹ü? Þb©0±¼I¹ZGj¤Z&ȈØh£5uQh¡¥B~øN•‰È,­Â¿2ÑøDä:P¯>‰„ºœËRtÂȤºï>;iºv9ùƒU5¼úHž&Tžð RÀÐÒ٩ɇI¤ œ`d 4 ‡©- l¹Ð+‘0à=‡Á‚eÏÇ×Ëõ=sýÆ:ö àcÍ<0çr¼Kìt Š:‚QÖ¯€#Š~çfýíF=uÍaö¿ A„G•b®ŸâDL—;²VÇÜ0üßA TJ¨뚃Á¿I¡]Kê§ø¸´ úàÔžLe±šªJU€‚H$Pfk}q2yMÊ ¡x1½#(h5ç”@\["¾üRÅ4¥ÖX`Á†lg2¤ €Óo¶l’ålaýp=iÔüžsi¶ŠŸ·…äÑ ¤(ƒM©ìŒ¨ÎI= ÛÛÐ*ò³æ*V"¨ ÀV«ÊÏŸ3™ÕÐçÙËŒäp¥®ZV ؈ß ï»Í\¦9û¦üyÉ '±b§ê,8kÙàD(]€(€ÙÑ{É$~sðn€kHȨ+ˆ"5öÊP¢š€‚ kYk¾Þ»¶¦ØßaÌc‡aË¢ ؼßä™Åïí°Osž–J;HX‰€-yMlBROggSÀ¼&¡€cEÎDšRÿ.ÿBÿQÿÿ ÿÿ"ÿ%ÿÿ!ÿ0ÿ"ÿ,ÿ9žÇTþO„«¤óœêÿްˆ®]rÄ ëÔ¬ù)ÉÑ3™úR׊ÓÏßyjGvpâú ë™o­1ñ Bª” ’@ãúÐå‡óLl>Û4¦Õmí)æâ¬h¶u«Lnóxµäùí³/ššªY ÈÉIiê(°±úƒ=T¨ß[ß|=Ý5/Q‰m©™.· _ÛÒÐùtѯAØÌÖ9d@#úë†XebÛê1¬P(þ?ÙE7UÔ|\çäë®ÿ0–„ ¾SdÖÿ.2´ŽhH”<ÿ&“ ]€m £Fƒ ƒ-B @@!À0:8`fÀ½ÁÔæòþ]YëÇÃ<ÀñÌ%¬¿f‰‚ªêo¥D¸m²Á^— ÿO\Bšf„Z1Ž9üH|ˆ½¢CMápgg7>í§¸ú°OoÉ+Ž©†RªÌB_"j¢-jmÖûÜCÇÅ,9‡óÇÓÁ±'/f?{ye}¼¿ñäà턚ž‰û‹%Ò4™zø¥/l=·Ÿ9?¼:ËÅR?güyåÌù: uôÍÝÖ³,=º˜>R`¿?Ib ²G,_O¯00 ½}>ÝW’‚ùxñ¬ ;ÓîÆº[ÿÍÚúçZ>×tgõOQABgï¹³ÑÛá 'e FÔ¾¯˜Ê}—I ²b‘eˆÀÐ-,y"e£eìdW[¥T倸à€;`úsľïçšn’NúbØ×ðÀX|]yò0-NB;Ä–‰keª›|°ô´j7aXŒ>c ü€>ˆ´øÿ½‘Yóß™G­x·ÌZÿ‘ 4’jŠßå…ÝÕÃDç¿ É߷;͚ùUUÕ`AY ˆ£þÚÿÄïͧ©Bz9tƒ%ñ¢Ÿ/} Š”gÆ9»›‹»ýÞ²£2zÑ¡'dö'“ý{—£~^4D¼Ný¸[ìü„³"µ¹vÇñ¨êCgêà™¶ãtùaƒ|å=ù–”O1£q|¢{Êæc‰à{.2½õKìsÜ}ùõ+ ûÜÔ¹ÿåŽzY”Ó5›ì}€Ê‚àÌþ5‡-–`Cî¡øwÛÝÚà #èBl@’̈TB4 Ž’8È´˜èôSçãÏðlà³ín¾é56gÚqÀŸ·Öþç{óàÀ ™ø€ 2?Ò„t˜ó¬Õ’ Æ2ˆÈáÓ*àÄ“œN~·ÜXø¿‰P­p׌wËåÿw\Ts¨Ïø™µqj&QY‡”[{S>¾rlíˆÖQUU•r™%É­{øíùf²ÌÒp‚O¬“ý³›ÕÑ\3•Ì-€¹º2fΆdW£~pÈÒSË‹ñ7¹¾i/´Pd¦H ãumÖà&Yã(§ Ætbp舰6õÞ+6 …)E‘I‘lI2K Æúu»ã¹gšÎ‰g7Ç!ÝKh`RÙ`wÛy¨ñÚÄF 0¯‘%†nF^¼šÆH †Ð J z\îR¡‹ „ÔàXXX6/°õ;Ã^¾§c†cÁ,8äo`›Na!€Ö0K ð€(žÝ0ó_ˆØ>ØÓØÝHð_T*u¨Ÿâ½Ï¢&ÍŠ¡g'fw¶À²Ûôm['êDM)&0´a/§öƒ¶fýw–ZV]Ã9ÿ26Œ‘bxÕbÚt«F&p“s+äZ8:-CD{8†ˆ@Ô#kÕ~2 Ö5@KT’XST|!ŠSphl ÓÓð!aU†–m0«±¢–)A#Þ!š@ËR´1!ŽbÑh"°‘ÍJ€``€‚²À lV†PG½¤Bk.YXQ°B Àø ÀînàΧ! _yÓM4Ëáüò`’€5„^Ýhö¿¸T*°—bÞsƒÌæKFª4¡>ÅgÀÄá¦7Dfní€!½ ˜Y³¦jƒ)3 Y%íJÎó9F ”±Mê ½  "Lª©$íœ\eT\9‰¯%ÄÈ!:¥”PN#)¡ø€ˆå‡£DDz¥\RACXÂøÇn$wÖÀ«)ðàÞñ C€¨ž÷Ü0ÿïÞ*t°7Å;èFsÿ­¦ U ê¯ø¬ÚzŠv‘c2£ _¿lBž»Ív¸BCC™™€ˆ¯Z])XÙ•¶²sÀoÓÔ˜N£ÙÓà €t«Zò5Í«H!³âØÌYÍLÜ"­ÃK—»f¼ P•õ§—X©P·Ì< ­)U±ñÁuõ˜pkVOCVÝc„ÜÖˆ[ÆYCá’§°æDDdüd®zˆ`E{ lÇ$ áÖ€›NH$˜Ì2VLí‰-2: áÛHãiAI€ÉtC J@ ¡zuÕ xp‚¶ö1Å]¢a  @E×€çõ–af¦øVÑ ÔÎçî‡~˜+Ï»×ÜXî¿ *M¨O1.º‘ÁÍ£’ J½?@ÎëmWCF»]{È“1 ­‰;œÚöÍ[˜«žª¤¤5½Ëmêm|cj—ì¯ÖZbt›b«69dz“£®ª¥Y'UiKg.Wˆ0ØÔ¬&.%±`)¼MQòs¶F;„xEÕQÖ÷” lÄvÆ•HXÛ WºŒ3´Ä–ý›U&é]„ȾˆŠÂ™êAýŒ™Î:»â)½¥6sQ6`AŽÆ d4BFfphX ÇÉÞ“8{étÈ-!L,´â`}Vc]k¸dæÀ ŒG*@y6Úð@ô¾×Êþ{…`•&Ô«¸–ýï IVª$ØSñ`•QÉ1žûjÉ“Áîsßó bWŠT•%P"Lôývf{ɧvÙ3%ìËš-aØnÝ·Ô`ߌ†©jH|DýÆå¨7ÝsNnëØO©v+Hhä¯|Oª€MÇ»Væ-N®âûTÊ“$ÆF8ZUÃfü =jŠ[HÍ"ù ÚªÊZ?Æ" Dl[YÕ!O~ ûÚëˆ3@ƒÆnËŸ½ž>EôöX¼m‘1Ò"”\oËXûMYÁÑ|‡é¢x.¥)©±ù!«ô\"ªˆ (À g`à3àÌün/ðæÈÂY`ñŸyk°¬Á¡Ô¼œ£"pD >ÇÜ ÿo ¥£>Źè¹ÿ¡’ã¸þŠ@ä¡-7‰éÒI¶ˆdòÍG ¯!_ÐŽ701ˆ †B>,²ÈÄWCU)貆¸Ò/÷2É‹!iH œx¸w”òÝ+}‘7=žLüŸL«•(•Çvòð÷ª hɪ¨§j%uLzÏ VE¾zD^·8ˆ£*Ñ0é÷j#ãš ¤Õ(k§ÍAB )>*ÛiYŒGA©6¨Ôè̬g‚L眳–bÌM$@,ÆHYVG3R‡r#Wuó´)Á ™§ @¥L,k%*§€$i1²£‘€zëX˜RP»Oîµi’‡÷pëÇŒ’fê}0ì#p‘hƒ!OÖZº¶¢ ñÔ5ïr£œ³íÝUX®_D^hZ2Œsl%"¯¸TFÐR@ß@„ïQ)p”uBXTUÖ}vÔÏÀ`÷£‘)'D½ ˜ Ø` – °Ç„°…”"!*V“‚@×Ú·µä¤`­@m@^,Mê×à,6‹Y1–€óð` à´S(—Þþî‹*õWì‹ ÿ]Aµ{*>Šiê¶v—·VÂz }¿:_ m˜0ôÈŸñ £]îL€ú×ÅõgDÝÐ˵``yO€Ô QšjHžŒJ(¡>-åä¦ðð¥+Ê$â(%ePš´ðþƒÙŠ®çPó» ‘b³ØÂX ³RÀXÄHõÜŒ B-¤'ÔNH6ˆŒ  WÕçL‰94Hä‚k26 €Ã„YR`*¥@@•!¯¶ÛaCDkYÝïJ¢y»Œ°(Ñ„®lÔ!@ À™>‡@ÑPyMÖt6 €±0`á³Q~ÝÐÞÏmþ` `–²‡6x9 >çÜHþŸqAP©Cýç Ëý3M t”{)~€ì§Ö&‘5GuÒQHÉäÕ«Œ„Ù€&Ãs«†JJ€6ÔìiÌ·îdX’nöì©ZpûOp ±¿4ÅkÈÕdñŠV7§.z“õGY½–åõôë´(ÈÞmH%Ë5 VÕ5”A5’ýNOn,†`r+Hä\7 ªìJA¬CU±¬ÄKJ=tUu¢úÒ¤¸›£ !™“vtýûÂPÝ ¹¯¥*Æ P’íSº˜²‰ ‰ÀÀ ²6pàøÙÔÌÎß\AbÈž}·›Ý:@ýswg<~ÝÏÓ´BÉP8þ×Ì/—ì¢Ú´¡^Å9èF²ÿŒ+AGK;ì©øÖÓ'5‘­¸!ÒØÊ”­éßmy" «tƒ³ ·í ',æ-T•’‚$‚÷Fk"ƒQµÔtÃ5T‹WÕ±9wvÑ¢Zªb<ß «šIû¬„ÌÄ™"24LV0q—Q@-²ï¹¢`ÚM޼¬ ËÚ6°ö¹;D)PÃÏV•'jGG)Ö¬B(äÀÀú(•U«Ñ=kOÆèкûÛogz7†"da~2`MéÖǪÙ{²La.ZËUÈ!—A Ä¢&)¨(à€S2€ ™ Ý=,pͨ7[A¶Ž5Ë>á?¼MŽÝƒ5`Y N ¡9 ÉÇÜè°ž¥ÌlÕ êS|ƒn8ðϨA¨æP?ÅqöÙ£ yrí‰,BdfÐzã]:<³!Z$´/@î³68…ÒªªdA9ˆî˜ÝÛü,ÿ]É1Ƥ^VŠ2¬LÎQèYÓ-–tÝzô¼ö†?.ÓÃØÌ9Hñé5TÙHa'DÔû_¤SEgVv³§É̳ÚÑ‘Þ :ž‘t¼£KÅ((ˆ"ÅÚ!/4‡Ël´¸,uu÷|„—H±\ª©QMÒI«*,!Nz{v ËË) -­ÆŒÀGÖ·¥hË"K @N!6S…ÄQ(@ݰ8ð<ã>ïpÄ3ýËÑuçÿYðiá÷^|2Àäïxxi þǰÿ÷¥ uhNi¡>c`3gýï]„ õ*>YÖ­g23½àÝãÉ>(}(/@ìycTÌ‹£ªÊ£þcÁ˨¢ý2­,"ßì¢`Ûÿºw×ó]ð|Zóˆ„R\<Ùu—ì 4Ýe8‹$:ƒLpÅ=™ƒ¤‡n]ÙóNLöŽ–æk»Ý~ƒà·¿¸h`°]rËŽB¹î2„€€ÖZ²l`Åù6¤Æ‡Îq¹™¼ãFØý\oPôÄFßJcˆØšX ›;øŸB€[v™ "€„9ÚÂ|I[ä-„Q #ô€U Fw‡âH–p.`ðÅû8l]³¶€Á½2p7 ЛSƒýÏï gm‚Ý<®YØTòªÑ4Fn@Pô –øðž× ÿgG’kh)ÅZWÅ;æ°ð–MI¬uÞ2I+÷ŠHÆëß TûžŒb2‹PU£(€’ 3KÙx»T#O .|7uÌ–Ê·œ@åbC?&•èÚ›¾X(VRú…žîP–(7àØIˆ4`÷¾c³'$pU—?i¶ª£†&ë“Òç!ûÎ7¿ôp/„¬¡_JRuP7Æ&ËõHpLÌeøI0wb¹FQq­$õ?gœQ]¿ôSa“ãø3ˆr:(ÆY*;mYxÁN®ÃÚã‹C|ôWž5±Ûá±h•H€T/T€YŒD…3%V88Ïã8˜6÷ž¿?ïúÍ ;8†³€œ@;À€DL´ú%‘À"t’žÇ²ÿo–ŠJBMñO™þ_÷„"¨)þëà½(Ñ|Ÿ;œœÓcÑ Ê3àÚ’µCRÕU –$€hf´w ¤rygÔ ôü«¼±9¤=¤ñºáÎF%÷:ß;ê6ƒKHû¼A0?7Àª/ãç…ÙPg É”z€ÓÛz¯ÄÓ—¨úY<ÿŠ»¨'Û‰nÕ;ÌþwTs5šÖØ^o/ížµüxœu^¼ÎvHݧ7ã~¤š/ оó>g™–SpèŽ4çÀpñ…`SÉvC2ÅXƒ ©µ=€Ha”e(cK0AŠˆ›°Xô& ŠŽ ޵cÙÁ¬$É QÔcòú©–}îíǃay8Xv.Ã-A’ @Rd‚[Ö--E _)ø©Vøa ž–ܸaÿÌr&´ãª©»Ø†ÜØà?ãB(WWK½Å7 O„2³l2Á!w÷ ûÖÑFÅ«©ªTUŒº=ˆÔ½Ûì QÍŸþþšZ‹«ŸÙÚ>[Ws«Yu½d·Ñ&*dõ†ä"€H%yÂ/' fuÕÌcÒPˆ?[Ð_:ouñï§ZÀüÉNEA_J›ÕUQf¤d59„@ùP“CQôÌë†ã±  ’ÚUöL3Š‹ X®IíšØ,À±Ë)¨¢Š¬@R@"$”6þÝ„(Z Ä( ßc¯áWÕ‘ËÑH(aF)!  lă·æëülýV^÷ê?¿ìwoš€YqS<€mKO~µ u¨ K’$@$«‹I”‰”Jõ-D4BžD¾çÜ0óßæ” uVüsÏþ·eB]ëÄÁ<&ó~7–„þ–û!N)q¤¶Aˆ¥(‘õâžy‘tSž<ÝOƒ›Q1¼Ìi¨.Û”œ1¶ñ€P,¶ßñ‚M*lÖ]d+Ø ˆë{¦²IÒ˜Jh1õ:drÙ£’ìD @“TØeAÇa%* Vq8Wú"ÅQ‚Å»>Y{A6>ϰ$öU²y2#0€ C 0€ip®þØeÕH8€³ªè_­t² šaú5TC[‹Ç Pä :a ð€ÀY@EoIä ˆ½ ž÷Ü0óo€¡Ê„º*æ5‡gÿFX* w?@ªV«‘Sê„ãÈÛP`Ü|k´.ÀÙÜZ™M[(eíñ>Íuãéß®ãå‡o›©ábjs;#h!9XCb†ãÀk©ª"Zw©^3¨æÚ—S(Þ" ~.ƒÌ¬”Sð–'ÈGo;uB!ƒíj'ã´ÖpIA¤ÖÂðY(ˆ nª'™EµV»?ÝÚI4 GU@”FFË”23îJ‹!Š@– 2‘†bX´n0°‡f¼ÜZ]%ÜÔÊ?)ªìP€Ïš"4=miÃÔö"ƒ(ˆB °éa°X0L€‡„ Ì7 `¸€OggSÀ4&¡€cG€~ÿ"ÿ'ÿÿÿÿ%ÿÿ-ÿBÿÿ ÿ ÿÿÿ ^ÝH柒 JBýóœfþ$C¥õS|`§Õ»râ„››=FØ<-ßG™ŸŽÈèŸݧ6¼6¼šR j$öí®k˜œa.óÌ/×ìu4EÇ6ã¤öÈÖC93¤–“£Æ^UryÛ?A“ž Yü—Ã/‰ t±g×…ídP#2õjŽƒ,ͼõ.S3LXtU«Œ-벉Q«^€Ü5E;%Àˆ Tº:«mð Á%*{¶a¨ xJVä"º@aÇ™ ¦l¢$µª{Ó_+£ÛäÆ œI&SŽl¶ $ŒÂPè1€T.@'f¸¼Æð–ÇžzÞìvVMCBnƒ7€]fHÀF` ¾÷ÜHø¥œ¡Z{*î97bÿwê¯ø€^øÚš¶¥v÷Ý(QÔ½EÂSBkúégÛ¶jÊJbˆ%ùZb]œÙ;×·±Ç-ØÛ¾Ñí6´›¤Þ×´¾æørîpÉtÌl)Ýt›Õ‚¤¸|}'{Lm3¸RP€-.ÅÏ€„vÂi̵E À®ô)+n›•ÆÄÑØJ*Òº0 ,ƒ F+ÒT;ñ˜Ù%W¼¢dU7¤$d¤–ƒ !XȪA0àPX \DE‰„$¥A (6a ÑoÐ 0#ÛØ¶®ÆÆ«A45‹ —Å3Èø¥þc±eë?®ýÏx¼Ùö©aÛ[Çc½9p |)=¡Š€žª …£¡¾×–ý› &Ô§Ø÷ÜÐþGqèhì©ø j+™¡¬NܘŽ"·LL}2òIó Wm@y86_ǵʩªL1 Íšã–dkÖ ¿ýÅ6Ùko+ôqè"¾54‘ܤz2œ…5£M-øœ³[?:‚¥ƒ«4ÜO4̪ýäÊdEðS½º+‚ÂÖ@TTðLÙ9!Î91ÐZƒ>Ü` H×Xp㌮úl„¥`AmR¦€‡;¥cµSŒŒ¨.õm„ÁMZD„@ÅB16€0!B,Ž5 aÅ¢h `˜”Šl÷³50hEPC4Ç,àÏ`ÖµÁ¶ó­Æ‹õ x¥p`ƒ&,-‰%þæÜ¸ÜÿD!”* õWlƒnÜÀÿÄ%B‡ú+~ DÔ8µãƉQëñ13&§ÞOƒÎÚÔ0g@5ÛÑuRUS)ÈɪµæîbŽ+¹7uW>-gâèv/3«&QÇT‚¾´t’µf†yJ€ÙP÷Þzœõƒs0üq.Q²P¹ „Ð PðC~×ÜHî®)¡>Å·èFrÿ; „J‚ú+~€ÈJ¥1q_ÿ&EÌJ‹×^Or3H¦ÌPíûhkbU ¥˜PñýÊá^“¤rì¹ÒI2ø ¿zU -©©f96Ù×ÝlãÉãܤ$n 4M20á`mƒAÄŸ¥‰’ÎÌÆn¨¾yÈñA€(«¾«†`€ÊŽ}„QhäPН;ž ¸Ù6öñZÑQäQ€cò‡ çÜhî ´´‚ú)¶A7–ÿ_‚„PMPÅg@´rÞ–­ €[pL¸Ï€IVocÒb昪"‚¶Vé…+Çû‚ÐZýükFqADX¯L¯?vn)}`½. ôDPa-.z¯CW¢üåhSŽËMc5¾6[ƒ­bˆêÖÈÄt†ÙôÏS¿¸"@{ç‹szÑ„;0Ðõ%³WÖvÈ’`XÔì4áRœ,¨= ¸D>?ïîî¶\K©8“$ÆÝÐÉŒd Y„Šh¦m0‡ªm`íÆÎ¤ÁF„ ú ¡l`$ˆ(Å@Á"ÎúbfÚ¼ú÷Á5ÍîÌéé™ws°.ÁcüßýâhñþæÜ¸üÿ•îšêU¼k„ÿ Bq¨Ïð ¤ã£ª”×Þ…£O2cÑNžåÞÕ¢‘i(ÅL ”t=•ìØoU“ï'û¶5"M±M/îß:è üµë¯Q‚[ÑG‘jΔÈúì8ã÷©ÊцÍþ§H(è­(€ubÆ#@ˆ¾ÂÓ>®`w~Âpô÷LV"Ÿðtå­´Ø6Èb…êC¯ªkÀ%—iŒùÏÄ~äÃ'ÚÃôÀF Ôû0ž²†°ÒÚøÉ>%Ñ Æ2/0€(ÌvÛP–©‹eÆB€9@Pƒh+4éJȦW¢Ä–Á&œW7m¿8Ë>³!·ªðp‰;Çÿ½™€{»àîùî’ËêhiïÕUøŽ€Úž— þgoTÔWìS*ÿ÷‰¢‡T5ã (·#ÏVüùs».ß>8ÛÈó'¹.@µw´BX´ªJ+KAJž€ñŸâWî/¨ÃN—oà%ç{8ÍØk•úl¢¦9”L˜‚†|ì*€úÍŸUì»7V‰Txw  ¯úhÈ"5öÎÅ{³´ˆª7WZµžÉ@8¥ÑpîŠN”øžö³¡Œ. ð²!…hâÞÙ54×Ou‹È )žhwßU¢ŠÿN ´Ö´AÆ’ñ<]n¦æƒëºJõ„ nöl’hŽ©”xaøR@ hlEà¬Â Ôä¢@P€{÷®øËÕçêlñ¼ù$ó²â|âøÂÀqÌ»ÊØ*‰—’Õ°2œ[šní]Oõ¸ ˆž×ÊÿŽ‚¾}[Æ©ŸâsƒÜ߸ ¥¯r þÆz²××™ÔÜu †€Ø7ŸµNd‰ª2”b#6²7Q¯ÓÆS½øE­sšý5§6:wn“×"æ/9vx“Ë”Ã%D# ‚4S×QÒ±Sdë¹eÖ MÐæD1ÛªyŠEwŽ1…;&q)2^À4®«…Á ½0GQØ”¸€³üž“„Á’, (Zc"ÁÄ`$l8Д¬ˆ0@ Uj§+!Ë2é®>™W?ÂDbdK¤œälp €DY `ÑP;°ü©7K<3` 8xœqÐÀ"ibcã:‰ Р°`^çÜHæß( ¥CMñà¿!P&4>ƒHõÖÔf¶‹ðÖ´o¤CšÚ@äÛjâÈ ë:¦„X‚XoõÞNORÉpÖ»·O”?0ÒV›Íqo¾¼È¢B:žNT_ðÚaBΕi$ÆÇK8šýsåçteÿð Ï F:vE á”úï="ù—gR†XžKQtZ‘‚¶ŽŽ­Â€Èµ°ƒii8 ªÞgúºÖȘ ÔdjR $®´+Œ*–’{Ç©dIùÿ-`;pRd²›HÕ°ö!ÐÖŒ &^ h6 E?™`dcüÝz.HÀÁp `Á tˆt`Ø þ½š TXP?Å8ç&dþK£UšPã .ë窈-ë“ÚÓ¶Òæ6ýp)ö¾ÍTâG”²ªªT¢d‚ ­ù9Ý“j!}®Ðc Õmöº§äy¯ ^‘ï|ÿ}Œñ²N¥«jŒWT¯²ã\muQÐ0EUó1+ 4JûhSÉ_ q¹ŸÄ×ÉYà@sµÆFz• ¶Ä”  õöÚŸ !ÇA†(ƒI‹`l1 ‰ € ‘%=9±b‘*»‚e€ÐèÌXŠAÍ]Ž'(ð8ÒlÆ’*°ŒÁF+(‹RÐD €ƒÇ|0lßû;¿vmðÂÄ:X{xœ³X‡ &O€¼ $© ‡ØÌgþn!…©Ú¡þŠÍ¼òïB°•v:Ô? r~zµ°äQœ(CI´$×Þs'ò òmÈ {>Z‘kZU¥¤$nÛå£?ZÏi“éôrÕOeFÊ «>K«+ENªu¸¥Š„F³õ МW$,…­5â\ßÃdIS½Ìšƒ¹?§ºo›С]:¥žñ€ ²v†!2ó:ÆFAÌwx¨C9#HAëàP(À#¤ÐÆ€å^Ê,ðO@T­ Џ#HÁôj¹åIÔV´R0ØIl)0¤Ôú h 4F84ÓƒÍxÀáþù«çÀ?À{÷œ{À³éÐŒU¤II.b“n-)žÇÜ óws¨r ~ŠmÎÏmwJ ê¯ø 丹N¢<ðîMNƒ xlâtËs/^¼“pÂ"U¥$3Ð}±;¯  ó~Æšxvii…¾F¶r5¾føQo鋉@Éý^P¯ŸLìkyºIg´ªÅe®Xÿµ\waR2¬GFT2%ÊŠ¥ Æ«tÈ2R)ÈA0&¾TÔ©0E‘LcÔ±šø'¬OEÅyA¸ £—›¦Œ@¯†Î1°Ñ]b-°[†»<ä @LÇIMÐj€_ "ùR…›éR‘ТìTà¶î¡þ¸m;±`Ìûó ‘Ï=¡“(cò¡ü I(¾æÜø¡ÿâ0T)¨¿â›srÿxp‚–”P'ãïvŸmßU´ŽíHÁüê•}Û6³Š¯˜¯8jJÀ$ ˜³77g?‰×„:ÇçD¹ãk’-uÂ\‘̓c•#¯””£Í}Çʪ(UÙÐYx‹+êâ)@”õƒRšPk@yÑ]a`TÚ¾ø{ÿÁx|À—]Ps“Z< žçÜHîvw‚¦PP·â^tÃà6¡’ƒ=ÿ¯ {jˆÉVVʪ¦L“%AªÑcýÓòEDs9Û4”g]‘âÝò$}k–c®6…òˆžâ¡Ï ‘™íÔªb½vu$fÁfD\dœKÅ%ñ>É’vInΫ Pé´P|RPö;‚Õ"ðôœ¡`O8@däÊêò¢Ë¾,nX,#@–-jy¶°mËR@&TÕRéU±KÐV°ìX¦c¨V±€…:JJJf»)¥õœD$ÐŒ0h ˆ , .îø°§6‚;WòÍ<P F=<³zËC˜½)dxh€f„çÜhîÙBTJ°§âtxæ¿MÕì©øxGN~:H ç€ò 8µ%mÝ'BU%4"EJзNóÕW¥)îò¹[³ŠgÔ+¥÷éA¯óYÕ6• ௕:žoÛúØ FIeݽig›qz Y+¦ÅÀ²cmà!„èj‰”áËÊÔpð¨Ž"E§<`}"O¶ù#±„¿ ‹DUί “`ìËQV)kÏ’mµYèÁ}Ç;ŸœªBFâ>i-ÌYÉoÍ“% @€ð.N ¹Òklpamw‡£"h€{t(·°€N(]õ6À6 R \ ;M¼/޹滳ÞXûóYîçƒ<<;ƒ…óà| ¤þÖÜhîŸQP£ >ctÃì?ƒ„P-ÁžÆg úiÓY® ÀUõö è˜{ßÖ„QC•bÀ—±½çæ‚ÏBó3sᵘRdœ%ÁI)Ae/yp¯QùHiÕQµ ¸:ò‚{Ryü¶¦·¯v)Ë}@‰¼h óå÷‰@äÎâC7,­´ô¨¯\ÄÜxûò ú^§MáÀÎKM¶—µø“CÀd°fEc‚îN¢2È€±gõjÆt2ó•,£;1²…‘—Å€ŸÎà³å:{Y´`EdÓqOYyË®†ÒXV@Ș@êF£Ô¢(åXª–ÅÖàË’«"'T £ñ®¯7Öõ€Ãý„§8P€äˆ´µLa% >ÇÜ0û?A TI¨OñÏ9hÿŸÑB…‚ÆÅq9)‡·+¡”HÑþÎ{Ël@çûêWºÞ¡ªZPÇÔ³í¥¥³M¯/—¥éYNˆÎ•*l%` µâlÝA‡õ.û^ÑY¶!©DŒÿ‰·í¢BT®¿Z¡€Xe2v¹8á¯Ã0™aWH¦ ZFT,ja8,ÅÚ]ØñÖÄ¥›ýÚ©D†·ÏhÐê¶œF#Í*…¦(SçthÇ›×x&JRxß®$Ñu-yNÐ0 ×£|?øàHS"€ÞB‰H=„„@Ê… ˆ»I„’ÓÎ].®¸Î;uümFÇxë“«þÜyÀ¡K¢á€¿Æ£°‚0tƒ¸1¸€µ¿~ÇÜ ü„BcGýŒƒÎ!eó]†@k[PÃäädý1)¹—Êhé]&W럋ŸqúcŽÖ¦k,!¶OjQ±yœùí4ΨTUóÑa]MAƒf´`½î°NxœjÅ9"òŽ#‘à*·‰Ð˜ÎE—ËxÁh‰ÚfÆ9E2Æt<ÔV”«Ìt5ΫC'ÆC±\(IIݪ Q’8Ža0ìLÚ†JE u JQ¢cKà"ØÃ.bL,•‘@Kò¯Î'GH+XJXÙ› 4’Š‚iM3žÁzœ=o6ÙñppÆÕ/<à̡٬Kb øè€~ÝHöŸA2Z…‰kc^tx¸yÔTéP?ÅDÊ:E™"æ£FD9ìä•ißUëÚ€œ…¼±o£S™Q%DH™@i‹½gÝ®£6œÑFs‹ÆñŠ˜æ“HN6‰ŸjA›¶ÏK‘TÇ36di4äHuYe–mBåë1q€„霓’} UÅÇJ @§urÅ8››”âtÑ ’úÑNy»Ká;Z# D¢œ2!2‚ÁPdáÖ"G=¸J MJ‡qÖºQ*GndZ¨»Ré´N@0 +ÓÅ´¬Ùy+Á‘¢ Æ`; “$¶00`[ôP&PH^ÝÈÐiT*¨ŸbtÃì?W :4ùZ‡›–‘š¢}%daA1Í•‡Äø/@Ž¡aŽ„T ( %q}Û}…ç迦5%„Dìgë4â2›Åâ÷ UÓ‹PÒÞÍYZ U;®FS#.«2÷>Ò-[ƒéF¡.(ÚrЦRû! In3b‘¯±Ú¤Àc¯±¤2ªbµõ‚ (WôŸR³Å%4ÅBw€ØajúÌBxï&@š(P  Äx/HЀ@bLBlBá8›8€ô¸ évàØáyÀy°xx€`CçÜøÿ Õ&Ô_qº±Á, 1TëP?ÅÚaþèоÊnÀ6æ/Þ‰x–^UY’ÀR冋ë†=Œ%¥=¿I-sNýt·i|åå|øwÓ}:îË(B,Q”³exÿYÒÖˆxÿ{@Èu8k=+Iap+Vëb Ȩ¯Ñh_®Ðè4*!Yg3@£w¶P8TQ0^-õTƒU/R7€È¥ÉË£BqÜh-ÕMƒ- àä!,l¨/UòÚÕˆTb 9­Œ{§ÅY- Û­#%hDc¬Ô0¸@ï0¯~,û3þ¬³Çñ8ƒe<ƒG ’''l=ÐCP÷ܸì?W†¶Ô¡þŠqÐeþ ‚¡ZAýŸˆiŽ+é À­sÂ2 ö¼ô¨8â¨×P–$ „æ}ðV}RIê‰9ÜÅ£+;D ©'zMÇ%ŒQï=ù™—QÉÎ*DÜÞj§›®¢å ÁÞÑ3MHAY»Þ~ DC×§Ùv+”sø}]ëŒõ{•¤£¡¡ {9ŒL‡Ð®‰\÷¾5ªÉQ0ÎÉŽºI0×û™&ÀÑq:„¨—)ƒ T€( “H³8Æ"®p™Î’°l1`NŸ Z:›£Z¦‚Ϙ—Z¢y;Ü6«Ú @ˆÖ®ÀÁ¾xn~ zìÌWlá!O!–€#ù) ÷ÜHþ߸`„JöTŒ‹nÿ55 ì¥øRÝy™™y˜ºZªa“ÁÔ÷ïëM9ï´èé ða¹tU•¢¨ñk˜R~IeIçëˆ]‰Œ~§¿…‰B 4[©Ÿ|]O¡ôrà4æŠzJ\ð(4‡ÛG ƒ2sææÝé°{|¿ô³Ì™žøe6F–…˜¼˜iE¡Œ’ŠO´v0"Ææµ£a§1Ý«gÈ "ÿF*œ3ÆÆF– º3=©Ò’bVEÜ( Ȥ‚ð>ÃÓ$XV„l–8 Ù)÷E3i±e@„íUÈØo²6/¥öðlÏ܃ݚ8œÅ3`ê8 Üå@~÷Ü üŸSY¤*õ*ÞM‡eþy -TØKñð^=ªƒ2iÁÙ ÐyOFÛ`:SU–(R¤ §w²OÙeuÜ®Áô°»{/ô$u2ñ´¹;nˤ‚@d4ò3eÚ1“\"°i¿mIê’ø)cXž#¢FWôú… ‰F.qÛ#ÑyÜ’±=uò—abrj0ó¼[MÔ5-źUL«Èˆd>½ ë@‘2•Z5KAO÷·6M×D°{Ü Ë†€ì°aÆYë™fì¤ še CG½bP*4ÝO»!©XÂéXèU$±B–Éw¥€€`4öqá™{óÁìLß3îapàph^ÇÜHîÙ]:RÙ)Õ«8'Ýhöv$„î!°§âà}E 6 í5Ÿ£BГRU–¨L…0µÜü)-²’iMÍ7ä( ¤o(UÞÆRJãó\°ø¾–tâ¦bµ'ewÍú‚Ì7¢€.¡»Œ×ç\€ ƒÖ „”ä|,f>µ­´a‡C(pÐ{Æ„È÷?Âv&sÆ.*ïF¥Þ¤Z¢bwÇ¢z]jŠU½NBo¹Iãz^ÁÙ‚Pøšš^wÛb¨f¬°5€ !Ć–¶.˜C…Sh%°a -&­QÜ`ñλ{˜­í põœaÖ3ËŽýÞ\`ÿØ„sÜ´Nྠ~מû_W“UêU¬‹n0ø¿R%¨F¨ŸâG5•µ#Ô¶Š8¤‘2)n<˜zg@³uD]“âCC™ H+ä­ª ƒsÙÁ®0¶2œ›VØøMjH³/2ïàI€~)*eòXŸAzÛPÛä¨nÎ:¨xä‚ Ov@£¬Ÿu“Ýbcã«ŒÌ´á ‹€LŒ&œeŒÚ¨ç[.5}6àµ,E.ΛÓv}e¬Çk¹é$aªÔ}Ôçmæ]SÂ"´q.ìî+x;]Cˆ0d£F(o¥Ô–ùöׂá˜&’€Iâ@@‘„m€‚ï€\,Ì¥ÛZ_¿ÈH"~æq/àâ sç†Ùå óI8á+@¾·þÏjÁÖ¡BAÝŠuÐ þg5­C=ø\µN@{³§0“ªg@·m_‡w©ÐPS©0J˜®I=, [§ÅkÁß𷤪!±ŒÏ2þ`G^e}Æ^Ï55lÛ¨cCÚq˜ªÂŽ¼Â ›ýjÉΠ‘Y…¨Æc«p™ïØ5‹q ujØ„  Ö“ÉÜ(H 4–c> ¡´ßŽqW-˽SQUÃì\dw‹Ôäºtíž)1T›8%ƒŽW>–WP8d/ÍÖ3IŒ(tá ú]iÎ ¤€"W„ÒB‚ƒŠ0ޖܱ–ÀÀà-ì÷ sïîÂÿtrëRÿžJ a6iÖÁ‹+þsxò$9ZÚðÎ…̇OggSÀ©&¡€cIŽ ´,ÿ/ÿCMDÿÿÿ ÿ(ÿ-ÿ/ÿ9ÿ,ÿ+ÿ7ÿ5ÿÞ¦ÜÈàÿD ÑA͘ÝØàÿ!~¨@¨ŸâȘ¶RßSkÚŒ]êDPÿ[wÙJ@gè]€îðÆÖZÔTMª  ’Ÿk\Yí°Ó¸ŒÖóÖMÓŸoûvvR|`‹4Çõj:•Ù’KçPQrè*Kº<Ì}ñ¡ä ÙœÜ]^™¨P(ÄÈAòYÚBµ¤û±WYÌ– @Lµ×vAª¬Ó©úšI”wlíùĉÀZ¡ÊHû½:ƒš| ÜwšˆLhÐ …ƒ##L$¬ªÚ¢ xb€!2,D†RCa @ PXn€ãXXÀlآÖas¼1.à³Ú± d}$ð'QÓ×c!€rE×àx–¶ÜXæ_¡D[‹C­X¦Ü¸ìÿÙÿQ+þæWÛﯟ(ïc±<ùîûs‡³”`é® ºå¼ÇhÕaªJ…* ×%›µGFÛÖ·³Y¾Â±Ã³¹=âòpÎr^é6ÿ¯Æ9¨Û¹Ã¯›ÞBsÒk¬L_‰›p{I|ïäŽud‰™³²Ï)a™d&Åž^ÀT€’áé2ÛJC'ð©Ï\6Ñ-|ÙÁz¶¯ öȰ©à•Ì)3=§¹sØ%²™s{H’G™¾aí.vùuí|{kº6Õ±,¥§Þ±ÀWW(Ó 6’ûaðZCÄ Ús€¦HD€6¬M«ŒØ0œ 3!Œ 8áÓÞ?à,bÙ¼[8,€ÃÀ¾‚å‚`ÀX‚ÛXÐ €V¾P9`rNËþ£‰»ýSÊl¥åþ£=zÈ߈Øk<‰¾úêf@ðCpC%QšêYè5×HbñÅ6w;©¤Ø‚•°¨"+Bg¸ÖnÄ›öõGY‡TV‹þ*è"ÝLƒñ‘Zú£ÌXÇü…’”³5µç‹\éYi¦ÈT K±Æ(Ðk‹£ôªet+ÉŠ‚I­.–¢U…ÝšÝÄÁƒ(ªŒkÎMÌÿ¤@YPgÅ?ÀW@ßÌ>·!^Š©è % H £†D*dl³?u8{ªëËáÌ„Õ2ó3%5†f¢å±¡öÚ|Ó¡¹ÇàdV_AårÃj$e.ûƒJŒŠD¹Pϵú ÃƒfÈQ£m2@pj”p½ŒÃ£©òü~Ñ.9€ª5DU…ì*Q—@ª`qKÍ(´1 Qf Þ B"h!1šP µ.r¹S®„¤]]hß%ÿ2Å„™i‡’X,€$°ª# A5 "ú( Aô­Ã:Ç Úd³ŒÞçÜHæßQaPe‡&Î ‚4š3”‚Zñ"rÔ©Mé¸ZâX ÈÚ÷ÊQ4曀ݶ9øÉq@ž×ÜH~ó1…AÙ¡Éžs#¹WWa*jƈtmúú(«õ#ËyH‰‰ò}ÕµÛ6Hi?2³çÞ‡W#–fŽ"P]Rol¿G7ŽÙoH4T•¾!îT!x¢xNKÝÔ¸D‹Ë¶sDwÕ‘ÜnÍAVè¤*ÐU]ß#CQoÞ?Ösaq[ *Cj¸|1ÀEZDfÔÉ@«Ö*/rÀ ½¬A5jQá6‚÷°Î.-j€ ªB ¨r[!Ë`ÄmQ±.;l(•´ŠìI¶‚©ˆD?˜‹¬ÂBÎÂU¢™q¡h 4 öhÕ ^hp¸2F"á àŽê-ŠœÞæÜøü?£t8v4Î57>óÅ…B¥Mžyj{ªG±æïŒrjÑ@òØ,ì>·uÔ‰‰£”A‘-ýÓÇο–Ûí™àøƒkzˆ¦¢+„’ Þ½ÈüzÌ*/hKi0ŸÈ¦Hg“¡WU ˜B˜4B?URÔiZtß›©Í°’dUi9¨Ä F%“®" ªx$‰ŠÐIJUIÇN)E¨ìj¦•bè˜Pc)ŒKa8m–HQ., î)ƒC0·Z’âv>i$»Š´r(6¬(aík’Ü;>¾ Y54ãàÝÄá´ l :žsš}kk´…ªR*AÑîC‚„è6¾Éš¼Í“†?k‡pG%ˆäªìA-9àÍ¢âñ˸øIÿlÀ”4Ø+·ÊYã²ÿÚ€t9íä%ZñP­V¯6X!™ZÆ”S(æ¡£¤™Þy)2Óå_¡»^Ú]ˆT柪j¥@´6ö2þ’¿ÕÄÔåÔâZÓs~Nfûy¨×Fvcc÷j2çÙ£ÜWÊHÈ(¤ €@×í#¡@¥a„Èþd± à¢×¼†¤€@4àÁˆ@,þƒK¸÷¼ËcΟ?Ç^|¼{ãÌ{¿¿ÕÃ2¸O€ â@è &HN{À7Bt' ~çÜ ÷?Cb«QPÅ>g>Ü|Ã’ejêSüŒCÅQ;3H_.à:o›í4s¢¡ª”d¨ ×|v½ÒéxŠÈ €a@µdšÿ7Ö€—)$v“LA9ï⟠÷NÚ!“ß%bg¾¿©ÊºŽõì+FüøÓg$|%¢ EÑ?é JÆã\½Væ^¥@—®$°P4x' Œ-%b‰õºg]Еð‹©¶Œ@ð,[LdˆB €s­… A‡d Ø0¯a ÛyopP˜3e*ö*¤`*¶3D aCw €04´o‘¬1Ô%0(\†Àð†áyîøWgƒn|s7uS†ÀÝóœùpä‡uo±£Téér0 IP…Š ~מùg „jõSÜc ÿ9 †jõS|"'¯=wDÆ©oŽÊè¿6`ÎÀ±ÊóQ/¾.q¦ªª’ôp9Ç¡£O&&Ï8±!ŠÄ°$T~kqKHK4Þݤèmº:äÇ]ÃÁÔe"DÐiaµ”‡öøs§c‘;לtT‹«k “öT´B,¬±%-€"Q<]Š€†`X»v+×$‡)>º¯¾Êr ‡€èxƒ¶4ÝI©Ö+½™j€{#8¤{Àà¡ÆXBÀBP|å?è: /  1 .Ç8ÃoÙׯLïÿpÿpMû÷¹µÖÔ,¬1c98M :‰ Sí’ 0€¾Ç–ùßOÁ–©F‡Æ¿å õ?ï¦l¥FB½Æo€^ÎX7e€ãôv­“¨VU#$ QBÂÚéð¦bí–xÚó³N^ÀáÌØÕAxêf=¾„½HÀûê¸C°ÔðCŸ`Q=mïùǞݕš9—÷ RËýìÔ@}A–õ´{IÁ+Z†™2n³G§ÝWî4.AÄYGÔ… ï% ‹›ºW£LäüN~Z•g·«QÎ@FCf,:“ä¨çæ)t)\¦«e€ª+üg3[¶°%ô )ÙErš¤pˆÀ` „šQÆP6€,á ¤û„ìMà Ë4ƒaÙµŒ¯u¬µv° Ôc€c1¬A @ÐÔ0À¡tŠ/CD©c>§Ü óÏ„`t5¤0u-Î)‡[ÿ ÔV®LÍøxìª,s-©=®Þ¿^ñФą̂.@Žft*eÊ$€H}HùŸ•æ! é]q|fûß’‚È}¨ŽŠº5ÍQ/¢ÚÆ…±ÚÌýD7åðŽÇ:>RP{M–r^5wË[Å7‹<·+ \ θ}<¾èm,)è‘*ÁuOGË×&¢ 8¡àr帬€®šYJ¿Þ‚—œ>3<Ä5ç]L7æ¬FÂÖW)BÔa²˜¾y©·¤‚mM  ^¥† Ó“"õ|¹ -E˜Rè²,"@ ]yD„€¢€vIvXÁwXŒéÁÕ0ÀZ†Ç0pä„°•þ@’`€›ÇtÒ’€È”´\>çܸ¿qªíP?꿯åþF…0TÛÁ^†o€È!œ{Opc2ò`æ Ø­£NÄØ¢„T¥J€(@Î1ìšÆÔ1ÌÑqè§TÅÊœ&:59lh«äX˜6¾j h•óæÍÆ<œ,±¤µ+XDÕë0ˆ…5&?]¤G ¥ÕEÎÉÐÐE;Ù/Z…1]Ò¤ŠŽØÀêEÐ^€< HÂ0F–H"˜Y¨B˜±ÓËpUš¡ÏZÍ™cE°ÒÊE@€Máöz”0·­$:ÀÈ–C;,(xÀ»3ö·íöA.wØŸZ° ˃ÀI¡ [À2@ÓPœÖ è‚hLOggSÀå&¡€cJœIàþÿ ÿÿ ÿ%ÿ+ÿ!ÿ'ÿ.ÿ@ÿ ÿÿÿÿ)>÷ÜøðEjŠsÐËþ£ ¥CMñðæ5 H­8fÎV‰„9r ‚`Ô©©TŸ|.ƒxã¿ P#Ô¥/;P-Š‰ÊŸl 3ŸMôZ‰|Gé\ø[£¯,fXÞi¥¶jÛÌ‚L«f÷ri+6k%D(P±è×èÄ€G^»4´¶*€1­ÓI‰ ÕŒÞaWÇâe´I€Š,JeQ¥ A–…«?h„¦R©áf¼mëBñ¢‘IòéÞ†xÙ!{;‡ °X€S„Q¾¤A¶–¶c&-ט;5"+ÀK1žçžûµ •vhœsn4¿y\2”‚ZñhÇ4›h©?M(‹±IÌãÊ ÈPª4 gâÝ6A $ >§nÒ`ž3>GK¬{ÅUS ó&‘D{ZÕ˜_Ý? Ùu~2ö%K&€1V¸ n@mÔUŠfÂ(2ݬÏ*’$[*UÓ&«%0®Ï‹£ÔqR&Úx¼Tš(Ð)–X§{B'PPE†D„x†$€k,‡á¥" W«4ï€ „ÆYJØ~%Òø‘â„ÎæÍa§ a YX[È !TEÆ £…¶°Hž¦,¡mDÔ½€›È`8Á+‰>×ÜèÀßÕ0(;4Ùƒ·7ßìÒÊ„šâ úp'JC¶ƒ=Í{‰S@Löàúý¾-;D#—$€+ˆ+Í~®“§o––×"Éî¡´g¥o6O}I¾„RŒâØw@¡S+ïuPJe<,Ák<¤ítûƒ#Æ)5l¦ÕýŽ S……ºH–%Œ®(¡,CÏKE…·•!s¦G·€uýÙ£¶Ñ'I/²ˆcÄŽédBb&—²œÇ-§wdNèÖ+!Šb€Èq…c\Ûþ ®1áï]ž{øÉÜLb¨&Ë‹áF‘n¯]–PdœCôê`¨œÏPZ|ï´æŠÚA¯!ÞÊA^%À }‡MwþÕ¡`á CXžYŽ‘6ÝøEGBÎ"'5AC§´TÈw0Aq Èu9´˜7,å"ã@m@4% `鋉 (+™JY6„ -!9`QÊØLT²ß AVœ@ c H´ P ÐaPĠТ%À?³°°``€äà¹k¥ñˆ$žçþÏÞZ©PPŸa9˜ûçV†™ZÄ&?€*UO·{2ég?xR,Àž_€jÛGëJ·ÕPŠE€ p»1gª”ù1›ûB`Ëžã}Â{?³S …v=‚ÑÀܫɀ³ÖeÒlR¿ÉÚ½Nf½4ªaœ-Äú¥¤•´hC¬m{Ç*épÆ&e‹fÚ;„ôªh 4’†¢aý)h61‹¢ë  ×ËV¾•}h9ñ§µB5€çF,ºx©Z =Õ ‚lü³™¦…à°ÆñÕ6ãâJ1"èˆ%ü€ 3Š @Š ÇPM,‘ ¼ àmj,'öž?ðP$ï0Àî—€6€ƒeÞÝl¡Ü°`D1}³þæÜÈàæ’™ªu°§âtÃÜqCP-¡þŠÏ@äiR}€÷]¼}ô˜ä¢½' ×rÏG”8…¶ª*E*€Ú<ÏE!0X_Q´ùB »©AâÚ±mºÌ㉬xòôÙvÈ÷ijFÃvê¯Ê5ÎxubGɘaV3Óê/ÅU-áN[=dGuX*Þ®Ô5K`¶9Àöu5€ªèFYg$z @´ôЖ\¯„¸‘Ä2É8±!dÕÔÓš†„ÀBˆ ©2¿˜íœ`TDÀ`{ñrîÑFšvàb:¦¨^aCF(NöŒH„‚Ž»`ñÀx p.Àsݸ¬«0ði¾€hAø~ç–ÿw+ÈJûRP?ŹåƒW“Œ\mB½ÆHkO?AÆäõ+­(¶Œ`Ü~ÂáI˜â)¢Gl`<ºUqbFM<±cêU•’*€bòëH\Ë5¯Kòá7—¤ ·+G– Y» =št¾;/^ ²8…`Ì}tÐR4ˆPpO1r4D“ŸC/‹™-¶á8þij4‘cì"‘®õbÔ h]K ÖÛ'0†ü© 0Ž© Èûâ–®!&ƒP ñ2±ä&46«a«!¸Fè£ÉÔõL4=%Ò{€ÇTDȃЫ pW3 ˜6z `w,¼}w˜›à$Dhª_Q¢ì0  €¾ÆÜ¸ÆA•‚úóžÃÃÿ9Cej(eœzÏœ¢Œ×«%Hn „rÒ5†ƒt  ×–ßMFª´#°µ Å Ù ÷QJCBlJ°¥¬1 `À»6f@ã„{ À )UÀcÎÛdùýáñ8Îà€áØ1@b€T=ÆQU,–…„ŒndÌù-YÕ“=Ea¸Ü øoG(´¥õ™Cöæ•bm*u¨kñ`sÈÙsžö ¾uâ@ A!%¤,I@V1/s÷ŽÎ16h•¡?»Ãp29"bÞ)h0Õ{ÜQ ³¨¯ã9è8»,£HWÖw­:"QÞщ x"ƪ̆«F'ÀÙì¼ÄJ’.¥FDiL‹¡²‹ªõ@û±L7te `Qb¶5è[ A#a%@!påŽ0íàŸ €Øµos~(ÉÄP8þç²ÿ®‚­´è(ÖŸCêæËqM¥CMñ •»xßÝss’8ÀÁ Ðßוâ]3$ „" À°XÇáØ‰!qJ_^Ñ·¯%³io&òÎoHFõDHOkS/©*‘³ªñü&€•&Ü@U"Û2úq­ôvÐî°ŠlÆ& h…ïïKì®ä Y»à5[(”f  ¨E&)3QNœ¢è*B)…+Ý x\mº‰(`Q“„Æ­½-¢€¡ÀÝ ZNÀ„¶‚¢éíú´ ` PˆfB˜càÐeýÕèQP²ÂÊJŠQ@8ÃÖÞ*T@±oEÑÃ(!Þ÷ü 0S…uV„æù¿ ÉPi⨦xW¿çÀ7× lûÖ²t"ŽH©$€0ôYÏ›ßöÚeô Àš)Ëc§Û=p}H|œ€8ÈÅ3øÂag¦BÀé+Ã;Ö?$‘•ÍìMaÍÊKÕߢˆ>­R,Ñ6ƒ(¢•ð4—´†Ä‘ÑJ"¾{NÅŠ"‚ ¡[‚²9ÖJPäÓFŒ§ÊP¨.½eƒÔ8©š¼y· º» ­îÆN#I!a`)±RÓ™%° 0R»Êtr: rl£é«¤–ú Ÿ¼J„c©»!P‰ÐOh*Þ×fo~–P(;4ÞA7þ·+eB“ÀyL³¢!$qø ÕÚ0ž`þV4¢¼þjÀ•rÏ]×UÎÄ;¦²$Ànô‘Ù÷µÆþƒ-|cù;ïÞ’YÅhp¦'×qK«ôa«=(h*šJäÌ¥ó¹Þ“D—ýXvxP¸›…Ûÿ±NkI:Ú¬l öÜ>oÐfÔÕ@( „,«… Q/+ 9ctum‘i$7D)­€iÛX8ñÜU‹¹‘ƒs°zSBÚÕ&G”„:b'Œ› Ї÷ Èd•%ì½Ù|-P`.„Ã2! €+ €À€ðÊœFóJ=/Zþǰÿž*IJUèPŸ1:Äÿc»:º¨PPÅ`^O½eÇÉQ[d{¢š)N¼—SvI‡t¨’0/ õsßýìBÊ‘†Ò”  "qÛ_%QfuëÇoO/#ö(æŒÈ')³cÑIˆ«,>­úžK-ÂòûlT`¬*ð¯ø¦–‚"ÊY õĺ¤"1!éBåÖn† €/WlôÎAÔ>_Õ¢újV•a%€Õïê”lð„*+‹ÛfœåýœÓ"¨Q’àŽC`èLãr Üvbæ:JÑ2ÉBÕÏ3ÚfkÓ~#ªC7„<ò^Tµ‚b„D`Î÷–ãž%MfR ÓÅ;¬Õœ3hŒYÀÀд¦À;ÐOggSÀ!&¡€cKq¡/ ÿÿÿÿ!ÿ,ÿ%ÿ"ÿ ÿÿÿÿ.ÿ+ÿ'ÿ2ÞÇ–Ý|/UšJ ê§ݸÿÒA•õ7~€ÌgÕ!NŽzS‘¶„ìïu"$¤ù {œÌ§¯Y*ñZUe•€â«qüƒà¼!ͤ9äfMjºžéêÚe²…Èú{¾Ø^Øä ÄÅ&ÎLñˆŽœTâü“nÊÈ‚4×ïÉŠò£|˜£Œd͸iŽGVLrÔ-ŒeꛀZg kHÎà'µZ›Ó‰Å²µLRšj¹#ºÐo§†4O|føa{FÄhÂÐ4¸êÁfàZQÐh hA{@(=U  : dÁ´Û_Àx7fÆ]ŒãöêÏAêƒð€;x/¾Öܸÿ¢’¡’CÍøæÜhö¿¨d¨PP?Å€˜VµXcgä´oÙž6 — ˜ ·dø¶Ä⨠’L€ ÷UÃpëŒÎ]i_-ÓHi ªM/ßÓø/Ǽ÷íÅ|+ˆ÷ Úç0(euô7¼Â¨o+#9¿[z”TÆåÓ£^%ùZœ¿u†X¡ðÙÒpz/5k‚PÆéªZGyyeÞÄé)O  @Œändhè7ž™£ek„a5À¢ú˜ùÄŠfYõM «4€ Z@°‚0i,V³:7Æ3þ„èèÌ‹X°ÉÙÚ27@P@•Y3XUÀ` êÀƒé€ ¾×žýoï’ F‡ú)îA7ÈþÏÞ$Bq¨)þÔS*ÒmF$­}g$ôL ]]€v>çh4¼cJR P%ÄÔm$xomž{HÔMÛ¤g”U+ïn|Þ‰ñ}u$‘–«ïJ”ô’)½ÏŸÆ›k |´Sé5^^ ÈÈÙl‡j(u)“«c@mš ¥ÛøÜ‰<&¶Í,ZCÚ˜Ë PT@k€ÅÐê®8×#R”¤ .h”1BsÃ]rÖÂêaJKUÍ ‚^Þ£ö²4¦Ø…OB€ÔM lÂÉ4‹ 10º¢nka„B.ÀzPd­xÀ0ÝðÒóÖÀãžÇ]ÆEV8´BÞç ÿ‹:CéPŸb_sÈúgB ‡Zñ(¶•à-rš`¸b® ûÜ2ßh#¤Ê3ÐÄhp¯œ:º:¾2Hz3I´1œ¨$‰eªFsèÏ^(¾ù¦:ÿX‘Á1 þäýÏûWtMV»9y°$h²—[ЉƒX¬g]P0&M×V1ìä.~½#‚¥VNfÒ‚€›’åÔâ©Íg‰Ñ¡*F“x(Æç¯ˆ5úFŠšH¤†:ÄÐòäöl¦Ï=“´ÄÓ,"ñª(³&  r¹ Í6H³£u¤P ;VÙœ¢H„0˜X™!T‚Cc\) Å.É6 Œ»dVwp8Àà“+ÏÜ8x @l¢$8 ¾ÖÜÈÐæ KP¥§~ŠiÏú/n ±J*Fý™Ó¨°g™Ayõ](ƒ d›„î7 È­³­C˜8ª*)„:€O¡ì¸Å[]GzºÓëkû ­Ls­RÍnµWغÙù·B&—b.³ yê¸[#—dÐK%€C€rl>âøåIÁõ ”…2~VªÂzZç'熮óàü©„kY r@°2F(” “aÏþ5•²ñ6Cg¦%Ó¬fCI¡EÅ05eÀ8p‘&DÄ CEW¨G„ˆNPe µ¤Ö†kÁ9]u‰$Œ#Ë8P(•¨¡B`1&„¢™ú žÇñláø5€u–ŸZ3ÏøSÇŸ9ûë\ñ8°¦ó)<H¯9–ЀÀÝ^ÇÜ ó¿£TI¨O1°™ þ÷B•„z?€¬ÖTÆ’e¥Þb•]#Eõv ³oÃǨxb£ÕTU2PiœÓdkÇ1¯ùCËFs¶Ãü°®N…ÐiÖœ‹ã‰­èÔ¹W¨ŠF»9WT¦BUìÎrÄ:ÒdõöLDö8ØÌ9ó®)Ñ×Ëœ€ ¿Ö§Cˆ0îM«Ÿ¤Á0Z% B¥x)]³;’iË$° 0àIˆ‰øŸ-þcaÿ•‚ƒ6ȶ`rT CËôš>ÝÔGֶ@Ô¦w[(‰*wµeÙ5 X(À<Ï’SÏš¶Ã›«Ù\L'åÞÊøKÃÙ$8>ÝaÜ¡ˆ¯° 0Q@@€‡&•zJ €D‚~ÖÜÄüÿ)ˆ¬A"h,snÂÀÿÁ\ê6>j×ĉ>_n pÅÃìûðm]—ªªRÊà¿ç y•‘ ÷yÿáUÿh<êꬨë›ÓŒÑú"«}rddE(?r©ÆxÚ]3?Ø Þ€µMŠƒL"ˆ(uÎ\UrŠò 1Ÿ šh†QÍ;ÓÌÑ6U' ŸìÇ%œ¸“6>%i@y]&ßÏ*²ì:¥èÛ‹!¶ˆƒìД¡  U>“ <˜ùvˆòI%¯‡lc,2kèKU²ŠŒ@ØéÃ5À1àx€ÑzUv ¤8Di(H%–´€ƒ;› so00Ã[ËšcüÂ`×Ö€­ãŽøµhXŸ(zmRz€ã¾çÜXö¿„2TšPWãscÿÅ… — uU|QV ;³hZÙ†þ‘ÀÏŽŠoh£ª„XXUÇŠ8ѯŸ\ÚÉúä^‰,ÙVL›O¦Kõnç‹ÏªZó:¶åZͺZ]ïîÈ 0aV`J㜮€(‡s™š¥ !õ,*&3QÚ°KÖ zU‘ôŠã.c‘0 # ÀÃºÆ  À˜¶?Ǽâ„lÀ6f¥5 €vÙ^”7„ š5¼¦T€0¶k.°À¦B!œo H)×lRP7­À þ ÀC€úè5¼ÜU@‘fýŽY(;Tä=7lUƒ²C•Èd¨)Ú™­l7p%Ç!•ˆzߥö)!ÔÛÞ!N«ÑTž$Ä’q­ñÿ9=Æ÷¾òõZ6ŠÍéå·“1­-oK1b¯›¾ùfÎE.5¤@@¢Ê¦§è& „Ð+-XwA(¥ÖÁ2QÈ:Vh8 rÈ"Gr2`“¹`xÙØŽ™A@ºTE™ I2`ÜKçï‰_¤v:¦Œ à02U¤J(02ÄJ8ˆ]‚HÄ2 Ð`RêDލ1 5²Àt %RA ]Ð6ŠV‘ŠX€"oÉž@—y" $>÷Üèà߸¨¶ ®Š}Ð ³ÿîî6 ¨[ñ èÕ³ï&rÐzµådB¬ ûžJ|C·”%$ í[÷`¶Ócä[¾¾þAû¼æ?¤D T—Ü+·€R¥£Ë„s_ï–lúQ¶|¿Ý ¡µdD F+C j°¬C“7%¸õm8Œ¿¯ëx  IäO{;€Ü q’uýd”_|Ry*"ˆÈB•`o: àÆ€-aƒºõNØ i7ƒ£¸^„!y™Ø*‰˜#æFZ:*º%Õ %#Ë6`ê „ &  „„Šx€àÀò,ðý¥ú^×ÜøÜ¿ aÐVn¨*™{n,ó'*šÊzbÛ‘7À­[Âzû6S¢U7Ä«RМ<;qlD×xÞ ziók˜ÆQïL£Q•E‚ŽÅïµ`Bßž´Ú¿°Xc NÚ3‚BÝtõ‚>—Ìí‚¡Ú¤ ®œ=h…JºÏÒÃÂr¼h w!מ@ ªTXQÄ]뵋X•£$ûˆæ®’¾@ˆ`ˆˆßHå]#:yÙB!,‚Ôƒ³l &4© À¨’lIS‰U¬†ƒFQÚ¹@ÛfXšÊI껊¦B¡a ´µÊƒ cQ¬SɈÇ; n௠>×ÜHþoÔC˘P?ŸæFƒ¿Á0´Œ‰¨~ŠÏ€5MmúM¾hÃ\€ÜÏ€ª¬VYUJ ’„™Iåür§> 3(4¨|ÃÒké­,Áô‚é5ݯ”rÈ8‡;O.íi5¨&ÑõÀ¢ˆ…ò¢Ê™mgÚ=Úl k nfùDÓH9ãi¦­Êdì­Íi T|m/)XÈLc-A¡2Xã$ŒÉ’X‚“;ïX¸‡DWrq“Š«0¸Zò|`ziUø³†d)` êÁ`Á5€qUÇhÙ@²k#`5}ÀšIX6­MÚ²`Å8p$Øû½»g|7 <X Ƨ릒O@ö¤/+ ‰U˜¾×ü»l¡­t°§âœsƒìßHIP©Cý?€˜¬¯ÒWn%zõÖ¨skpNˆ±Z+ž0ÖT•¦˜ FBÒ†rø«T]»ìEÞJ·C4ÕÐN ‡ÇUm*Ö„Ä,@ƒ@Aò0>ßÐá·œÐ8ÖŸ¸Ñ˜Rå{õ©&èDGͤD‰¼øþF4 I~޽9ÉÙ4DÀ¢Ð+¥èÆ«û^Z¸R›q1#/À²±È¤€âHƶ ‚þç­ {éTÎ=Ué—æxD h) 3íÁ¡ &³ 6‡m —Bv, à9cÊ+`£@ éÌÒRáKÃ×Lžµÿ^-fóogKý±æÁ‚% À€y)¤„ l RAžæÜøü?ƒ@¨TP?Å»ç†á?OUBhMê¯øxEmÒ.ˆ p.ÉÛzñt„ª2 %%nu¢Úõ†)NWzÖøT¼Ï`ôv ^‚ (ÆÜ#`ßøNH+,î•:Ç+“ø–ûz-JmK ª»Ÿí`Р,¥çÑ£Á¸ã …Öß“ˆS”õسÛucÑk”Þ¹»‚rnYˆ<,²´Ñ•ŽŒ ƒ-a " ÔœsNFG+îÛª·O×0§€rÍ 2ÌÞËãŒZldˆ—a§š BÐÆÄR ‡‚Á50âo#(±Ñb„ñ€åÔs Æý1®½7@Ðùãf°Ïqxâ&q@”¾#I ¾×–ý÷0[µ õSŒcn$¿y  պõS|Ì?{j!Å€o@û´Î°˜³5qÄÓâ¨*E)Èfôeü˜… *õnƒ)/úIƒÓ ”IB>S]†PWý‰afËæf2çJw÷µ¨Ì¢4x«NÖ¯—ï‹fË„Rú2ŠN»UìS€÷ŒBÐUU{ïÆì³ÎyŒ8 °Õ)#·¾ÊAÁxv˜³øÔ´LY/ã–qê€~€Ê‹i'%®’¦gÒã}vY!ä±Q¸ðÆ!™;™´\ßFØr€ vŠ Œ”8-Äj#2dŒÞ„Ì €$ùÑXÀ(˜Eäc²;c˃ý8ʇÙÞ\h…ƒ –R_ÉîBrÒ (OggSÀ]&¡€cLyìždÿÿ$ÿ>ÿúÿÿÿÿÿÿÿÿÿÿž÷Ü0ü_N©Ð:TI¨W±®¹‘ìÿ² ‰–[‚z? UçS(ª9á¸ô Ç+ߦÍHú áì~Œ¶NœP¡¡¦$€˜jîuz5üÞe;R\iLËD¿NŸ9åÙ¾.w‘yÇP4*±¨Úû¬€]Ž’P‡9gA:+—ìÉÁ‚µõù¾lI{5¥’4ص5A®ÜxX -"ƒÀrà´9ê£~¨2šÇ€îD&Ü襺cr¥Ìê\ÊÐB(ÀÀyG69„È qHl'€¥PÙE s…ªP„0@99AÓ“Èr5ÁðÇpøxãfØÕS°vX†ÕàvêüÚ²4Ð,B!ž¼žÖÜøüÿ2T(hœsn˜ÿ¿—ÈйñÈœN;3âàŽ3À® ÐÚçV·¡ªªÊ‚c»‚zI€×ÛÈèμå rï½ÙßÕÕk’h»«N7¶âªhöóÔkž&ðK;Ä&Mò[Ä[ Ê ¢‰ë"@ºž8 …ë:Ó}ÇW×;0Ï…";Én B#´aµF$#Iz&§ÕŠ3F6¿ÎKö0M„á:—I™dD@Š+ íQƒÉö‚¥YU $C2–ƒ!ÂJ’s*¨.Ô€ÉÅ/ PJ¤"6Nµ«€À !\`,çÀ2+¶X¬ú³sÀÃÂ@Œ<€‡u°Nò‡Þ."¤T|^·Ü0÷?½)2µ—P3¤-7þOp‚Ö\PSü¼ÿ_ŽóÎâ1àìÌCû£UVUi“ Hôs@Z;w×~Ç¢’ýl§ì"‰õ& äqŸs´ò™MGÛú±–’+ìß?ªg3,îß“cöŸ_<Õ[gá§C~ù‡uã=lÌ}€  ?ÿƒ(…/Sû[ÖY˜%`ÜJ„6HÆLó€ Hš"u•!aRfŠ<·$IÙß>üƒ5ÿC€j ‚dz¸æÝ ô ×Á±š #(€SÅSMÄBЪ~Б‚¦à´ð€—‚@@ Ð .WàØå@@÷=ûب6`¦hÇÂs;€Åð€`1Øö%¼ ù5EKÙ@È”@ü*’¼Ä”Þ×ÜÐú©FÒÔnã4þ57°þ hã4¹ÑÚ‰XΑ×Uo.bõ´·†€¦êTB¬Ëd­/×54X­ev&X–ãêë³—™ƒ×½ŒÅÜZKŒÀg›ñ̈)êæA2®ûÕ#€H%ª‚Y¯¶ž *K¡ij{àR‡^C,gµ1ÀÊûÿæAŶr¾]6¼;N¶­º…Š”g“­D‹l0fÑ ƒ ”‹pÅvV'(‡líæÒ&+ÔBkD°Û¶‚ë[Þ Jž”<ò_ÉP Ø&6€D5dZX€¨»\m|uW`³¥I´`8ŠHÒlX~÷nÇd ¥Cm˜nÿ+P jÃÀcCYïHÁøõ{™×I!Aµ£u³€|˜UI0F8"Åu‡ 1Ä×È·š×ºNÍìm̼Çk jœ vg^{Ï—L…Ÿ Bƒ\Š¢Ì E#Â_Ph>IÍó¿"…ÐT›B¨Ÿb 4oýJ &,íS‡ú+ÅF+ûß çÞ.Ìnmˆ¢¡ ¢¶v¥»Ñ~2JL%¸ |ÕœxÀc48PQ÷<˜ˆ&‡i(n‰FX¦É°Äñ­Bº¨×·jØšñÂå÷NVöûÔÞ ¡„ÑÿñO”" ‹£‹Dÿ5HÎÎíw¶C°7uB‹1¸Òî\°{,à5ÂTBˆ±˜lVKøäž—@Ô0ª\I÷fôë‘ê„ËH5(° qô7{–ÉU@E”±À!Ch¦ÜZˆ½’À$ˆ¬ØV‡°›@¢´€Ä Pœˆ¢J9§…‚<€;˜Hi¨^'þ‰DÓEÙÈõ*ÖI7ÌlžˆÚ êgüÀÎÚzOžwÕSƒ#`,Ð6]ö9·Qqĉá˜Hê3KÔ¨s¬´Tg÷#÷VÑ ^ÉÉÊɉÄ&J8 %{ÉšÙe²/œÆ.htüžòÖa4;Iò‹†œ%U4[ò—T4³líÕ’"gfuàÂ`Ý€ „¶@"3Oª‰žÐ²€ûòŒAhPÅEe–ÛhPP“MãZÌ;–ø ÿ * DèZ@8Fè±BL,Ó“ÓÆƒQ"¾”’²¼†I@Àm0@@‹A d§e¹`€5€™`9Àžû 3”MÚ¦Ãþ‰”¥õS|†Hµ=vY¶êxß:å²” €ž=#…-HâÓ€pÔ#_Nñâ¨W ÑÆçWŸÃŽù%ˆš€dlmÆû$½Jôm:€ª„tÆ@¥ÙöÈ$N\ËÛä*_÷(![È äœV”Ä®Ô+ÊÑy™m2c°œwô– æØ­bøcë¯Tම=1P?‘*6ƒÉPWˆží;ŒÒ°'Ý0ü7‚*õ)ÞM‡©›')*9Ô_ñð¹P§’R€qÄÁÉAÓº»¯Û¨s¢ª‚ $ Ð×k´âÆž!ü{žòÝõ½w/©ì“ΣäZÀƒe;,Ê Ý` öáé8è5©mR1_ëõ_?d©Çt26¢”²=+QE‘ÁúÖ‡üˆncÎ4†…¹#ß?3Ð>{FC-¥ØÀ\¥"²YÇ1A®KÊ€˜qBRVH}a&án´®D‘ò¾Á"q`La0 !à°@@ €–`QOÁ: PPæ7t„šl€ `¤Àp€±XÆ«ÞÏ`€ƒÀ>÷Ü0óϨa(qІÿŒJ$¨R`Oã31™yê±ÉŸ®öZ!Ø“AÎ k®°Úg Ú¨SœL̸®š2E ¢.mŸß´¬æèÄ$’ $ãþÌÛ+¨©s©Ö¼÷f£=Ðôs¼B‘↫Å«Z‹-œ­Äé jò;Ö·T)c’]6KJWo¹ý«³’Ó­º*õÒ(ƒ×Ç€'ÀÙÕ4+U÷î ×Œ²`P ŠYBø·7Cåš|×$[iÈ¢Š’–æË³ ùñòŽ„Ö`ž£1°ÀÓH`ÉZp( Y@&0,¨7XX¶nÔ'0ÕŒ©M°ãØÁ$a¡Ð€>èÌ[ÿ;DWêV lÚÿ…°T+¨ŸâDDD±Ëj›•|8×=pœ g*?iµª*3ˆµÒ­ÉÙ«ë±Lt¯ÕÈ4g¶§éì^•N¹$Œ~B ”*¹"lsE5EÏZUŽï®©†E0øujIZ`tÜÑÄÍÈKËÐÖJSÍ®>D†!œ:U{°ô5”ƒœ@‡¥c§S!_ŠÊÆ„{iûwvýrÀ߃¶ÖÀؼGÀ@f@°ìaÑ‚h¡¡¸3"wã d&rSs=X´ °P­¡G  fÀláÍ`mçâl}ñ}Ýt ‡=€13œfÌ‚« HÕ\OggSÀ™&¡€cMz=‰ÿÿ ÿÿ5ÿ2ÿ+ÿ2ÿBÿ7ÿ-ÿ.ÿÿÿÿ'^Í[ÿF(C•{):‡Â‚¡Ê„ú+>ÐÈ^ ‡’Œ<ûì]`qƒ¶½ý¹1CÄ©ˆU•)¨agç`­–Üšugß•¶w.}¶®}¤S+X^ü§f‘rëm¢°¨ì)ú‹(º3Þ UÄ´¤Q†LYhÐU»²þIJG_«Ï4L®¹U¤4ÚÓu1²B÷9”ª d5À~Y„`Õ`0Z«©(jvÔ|:Zôæx\`Ô*!ÐÐËŒ%Ãðß{+­•æ^$ ØT±Y&ð¾ØÆhÀ"€!5Ëéù`=ox¸3—oýî>ö/Æà˜Áü`àxȺ}èÇ ( ž÷ ~GH&õíC‡zï ÃrâΨ]cAý? Õ-"N"NÔvDLs€þö«÷IÞ^â jJsZ€úÔÛœÞB B*(ID¯1]­»Ñ}³´–ì,~…Í3Pv(!„^j’Ä?‰1Úÿ¼öÒéãÉ"ø˜>„ûO‚T Rý”Jóêê}~Š3úÕèTX<Ù\ΡÑÕw«ÑeR>‚ÕÑ0SDSCN¨5Æáš9«;º#|øÀ¨PC¨d‘âQ9‚а0€px€´)KN¹…€ 0l²0p,kø„»p€€<xN`C ¾Ç´þDKqu‰ê6æA³¿JXJ‡ú? £¶´*q8íÉØÈç íw8z±š'z2ÂÜ€S€ê€€p»€ßœÑ©ªM’ƒ[{…ìîá´+ON›Ag…ä>uÛÉ´„¨õ—½Ïe%Á—Þ`л»"ªP‚ùìmÍ:Á££I-¤×7œd 0rä=jõ¸JŸítÈÐ^ üÉ=J@¥‡wʦó–Œß= S‰’…g¤E$qEc]R¯°}fí7“1…z`_ ÐVT@ÖÚ™B,³dUE·¦â¶„ ›l ×t 9вN¨PÀã08<CÄ h €ÀÃãÁ0„Mð€YðÀiŸÔ AJ ~×P%Á¨]M¨ÏPçÜ Ø<(Ckè`OÅg ªu•yŠÉ;€÷Ð>ÑÅ1P}„Õ·½3Í>¦a­ª²º$ÀÒnvÖ5”ºdz·Û¸÷Ï ø/ø´c=pÌ QqƒŠÀP[H³°8¤.2éKrÅ/s šR~»âä¤nQ:` _ŠÃn´iëÛõßa5ï#ЕREQQÙÿd¾ GFP”µ[ªãîì?p&Š MqôïO<®)C : x ¨†å@< ê°2xC0ä ’A†bFk2D`ÀöÄ"XÀ 0 Àj°!¡bA(p†Èðæþ°ÀZg»<žñu,þl{Å»Ézȃh ðÐÄ%€ù„@P¾×Tÿ‹€ R‡ºóœÃ­ÿ NP5ã`j-Í,ŽÛ3诽‡]KÌÏà¨åº ˆ}Û¦ƒ¸S+E’$‰ª)ñFÌØsv0öª«A唃I-Ü?ªs“’ï›BQì³ÏZÊøhÔË>¤?äLj,z( ÄÈ—~=‚‘èvÒ mÐL7]ýªÕ9í{×cHnç 8)0ÖÚCP ùÛŽŽ&T$ÔlÐE]9îÌúI-ˆ¢%—½¦,£Ÿkˆ„¿°»ÁÿÊeëhŽ jèhÍ$€! %C4$Ÿ ZAÄÁh(Í`% ÁP2Ø¢B0È Wp<<Î%¯‡˜xÏâ)~â¡%ä! <@€~·TÿFJF×>Leê5Ì=7ü38A¥„ú)þÎD®h•Æï?žÌÓžˆ@b´×/À{>§ 7TUª$ ’Šæ—J/ñ™-Ì8Tðif“Â]u#tõOâû…‰M mQÈ{õ(ˆN¬˜ñì–3Yì•ådÂÆ-¡‰Ñç<€6%bm‘þÚNU3ï–ù,)未Ÿ! Ý*!"aºn@Y‘” ˆî ¶äë–ˆ”Öc\€~ ·hò ©ƒ¾7††?Ú-ƒõ™`ƒ=‘KÂC…0DàêÄñB‘ c‡¤PdŒ@Þ¶Z#¢€ è…`øÅ2÷ƺ«ßÔïÛË7¬c$Ø`ßà×ZðØ"Å8À5 ^· þ4HRÅí¨¯P×ü3R"E¥„zÏ Ôi+ŽOæ¼^€ÏkÍÓùâ(ÛACš _¹7 ÷}_ñn‡†RªPlk—Ú­Ñï\Aóyõ•´¿ 0öœ5+ËÕh·¬k޽”Ü”qÊÔ­µ‹Ä€ž“LÖ5‡’c~µM%ÏÈL¨5g½4é·}i5¡N^upr9G#nx= .0“UÑ÷æ¥ |e£'ÙÕÒÎÂÕ*`E]¶Z >·þĆ.)¡^csÃÌ?DR êU|á´0¯œÅ#€[O 0zîp& Î F>g£´i¨šd(Ö®¡ÎðRkˆr"fÛÓÙÆ' Û„ºBmoÔ»&®5F·G¨rÈ ±’]‰+¡iÐ )ø¸ëâŸÑl«ž¿kkw^±£?± eÄlñ(ö‘Ç‘˜Ö E`ê—¤ü#Ú˜VEР¼±\—”Ñ”‡d1¶˜Š€0ÀèÔ!5€Œ^ý& ¸!Ý!Œ}'3MüfwA†Ç†ñkßÉôu ÂÀ ƒVpØøöD‚o–­!¹e@©Y8üÚ 2œ'‹‚s3H n|.¶ÎYàǵ Ü‚4â&A‘d$¦±@쥨 ^·Ü@ý/BTK¨_!޹aöߘ¡f‡úÇ·#)¿8Š‹wÉ”È9°¶¹ˆ 1ëÒfªJIJ@ $—/¯mmnOJ.³µ»3 ð’»DÒ>¿³ªÞ¼“ròa"äÎ鍸ÑmÉQ’†¬ˆã2ÎãH)azoRÒ£-(¥[bçåB”­UIê™8Zß×K¸’j ¶;.¡…ßß(ÞÉž,…&A!5ÆŠÁ@âPé#ì†Ê €, ø —ewF.ÔZFH`!G–A VÙ,é³D Ýdäàè´@Ãki €€æXwÿ0¨½Â{N‹üšËyèçÌhè§Ëš¥åC€€Á#Š*X>×þ3B }5Ÿå†Á?#U(¨WñyiØúh,«¸õ¾‚žçÛh‡ea¦ªT(DPÈpÍè¯p_íå:è»3VÛq,п=³2#–ëUì¹E¨…uJð¤>…ÔæØ€L8.bJ£ýëÎÊ[gäðZ¨¤¬<õÅÀP¦oô ­Z‰‚^*îLR÷±ÌR2J»¡8­P°y÷µâ4c€ZóvšS#ÛZžÝ l3F4uh ¨";Û†©<¦å†Ð&¶°XÛ4`^¡ÖZ@´PˆeFQ)Yjk]HÔHj Í9¬A 8ÜÁ¬{k, v€]õÖ AŒØ66¿#@ àÛDx @¢@^ÝøàÁÐÖ:Ô«XÝHvó¨!ôÍ­C}ÆP›§Ì##ãôj—²õÙNÖ¿â1ˆ}¾Nê–¸¡`@šYÓ.'§aÌgìÒî™3ÂLɩ긵˜à>m3³ßF½/’ÉRãŒ_ „« ñÃs*ÒxÚ¥ÔS'@@S|iï–ç m²ÌRZ] éðªQfÀY †ý­V ÁbÂ0N¢*` 6H68”ŠœI\LH>e,Ed+@ÂàSÃR„ AKHh^Ûl`dú`CNT ʃ5³ÚHH$ Š bà€àÀb°šd>Ýhæ¿( øµa\tc¹Í£‚)Ê„:+>ƒT÷&•T$À«U‹ * :bLˆVS5€ØÇoó5úè&0u0K┣BPS@PoL þùFHA­‚ö9I窴ŸF¤ŽwÒr®ÙC+³-™|S‹U¡m“Èz¾ñR…T¤Í_•H“eY ²zès*!Z·4le+Äf}O ’]¹´Pƒ^ˆ*¤fBŒXK”47l¨»€R;Ýk ^D°cdâÐbA`cÑ4¬.*40Æf0ZÔô -‡ƒJl‚—Ѓ`@@ðG†1I,`L"GŠ)gBÆ€>çÜhø+¸B¹¡¦Øݸ¡? aå@•ÈP·àDDqZ5vÄowˆÊïIq2Eê‚•û¾¯­+~˜“p*!&°e[³ßI6_IÃìR9œ¤=?[½·.À?³Ùg*®E’ÆÏNÚ‚©µA­ü0h˜€›2dÌê‰7[œ9#þ*Û“ ™»&©X˜4*‚¼µ_©BDòB;^}ÖpsnS!^‘E´ïdíÆ Ý‹ŠÕÀ¨h hVX ãf¸!4³ܾ£˜“1è E6p¢1‚ì£Ðã³Sb@¥„ sð5dã RS " Ürp& þæÜHæ'RjûsãZ݈õ;Æö4ù¼Z1¿9¥E%ßæ¶m£S¶ŽYP!h: ¦³$4*Âk@Yý¼u#Ïm”FçAóNmMÛÒãí×ÍÄ*‘Tçû¤ÙÅ}ÜT=ˆÜöa©6×j:FC¶`a‘y< ¶Æ4hÖÜRJ. ¤*½îmAjzËE{v $êÒgyŽã³Ý%Û†Œ€@fÂSf5€Êj€H7 0쇑fÕtï¿%j6<À+äý€uh Ø]  †öU‚ev¥Và ¸ @D¼:IÂü p 2(Äh„z:4 !”§:´0Â`7°WH‡&§ˆCOggSÀÕ&¡€cNr0‘7ÿ$ÿÿ'ÿÿ(ÿ$ÿ&ÿÿ ÿÿÿ)ÿÿÿ>÷Ü û+ Ð>íÈUÂ;èÖŸC• uUüqj™YV¢¼ÉT‰‡ sã·ß×ò¸ J š=y#€Ü×mx_ïº#HlŸf{§}ã¿Ó l7Ä[ÏËW¼ZåÖP$ûkÙ`Œ—y¥Á»Ï^ŽÝá ^l­Ðf)UD6W@PæÅŠ>޽ÓcåÓŽCe0ÅÝnM—&Žû8ÇàäË,YlÀ¯,^¥«÷@ÌgEÀÊ`C¹&Y›Â""y@NâŽàb"NO×5˜ bjRlx¿ÀB˜€V+ `  X‚hb!0D+Ée„áàˆs V"èÀVDXt0Z ¸4 Cñਠd@>÷ÜHæo@ J·¡>Å·èÆgþK(A¥‚ú)>Q’ZY} pçð VŠ3 µíÃÏáD¼›Y(! •tVJƒ1‘úÇÄqm2$gL‚ˆ~½ÆT³[ÎÖ{zÜ +Ýf bïA‘îYÛ0'µÕ¤xk›ŽTÍb0ð¯“c“}H ««5Scû!÷4¢`÷º,T€'Li) †1 jQcU@}R` às7´’û:#ßv@1wò&A,ÁEB0ûÊ ®À°ÁÀ €-”`0™8|‘á ¨ð¥&"äß"©àµ,@†‘3ŒV’HÜ–©XXÀf0þÝ0ÿ'¡«Ô¡~†·èFþ¦$Aµ‚ú+þ*] š55ïãè5"×í¥¼9ˆ„@@XÛè N©0 $®9g9^’Óê&·d‡1ÛkÐ »ûѨ7Λ/þ°2½ƒµ x …Ƭ 7?õB @_艠µ´lÅ‚›,`Œ'³æòš‚P™@i>o€®Ù¬ÔdÚ‡.cžJ#‚Í5¹jwÒY ­ “6½a7õp¬.,dd€ 3Q <³—f¢‡BDÇHÆ¢Uðr26¢j¢A (ñÕˆ —@2 {`qà€© „Tä0€…'6 ˜|NøXNì¸z|pàÏ PàÞÝøì g”RPÅ7èÆgÿKB¨Ô¡þÆ?À#¾-àþ°+ó3àʧ÷Ó‰¹´©*ÅH$5 ²8`<ÌñyÕv%g•þZÔ™}Ž Þc†‰R:‡°2@ ÊçiªÓ-Tȶ·œž×’l„KAž^<ç›´Åc±9C@ä¨Å¸†âŸ:×ê‚bÝÔV8š˜Z€™™÷™µŒ¨ŽCCý½öÂ0Ødf]x äÌ%lh$¡Ô[¤„hd7SŠ ˆ1 Êž[`@:—“ AÉÄ‹@p ¬[ïå‘­,`Ñׯ óÖPgì„ 24`/;Ø}<¸ ß‹ƒÁsèIfž÷nÿBs*¨Ÿât¸ý_º#Q¥„=br²ð~”Å뉫ãèDÕÐÛò¹ùN'VUef@cœzÇÔAÝÛH €ìû}¹ù˜pÇBËÊúW·7†æÝPBßr–4ꂬÕp<»y<É”­Yjè6•NÖ—08uÖxºÓØo:{¯:£ê,Àj5ˆî7©VDN ¤€õ»cñ©! &s8«µT¥.¦Ø³µ‚(õa 8‘ ý}„˜ xM5ŽÚ+AhBÄÞ]- ¦ƒâ) FJA´ ­ã$”7!¤€0V Ù8(ŒÀðà¸În¬ÏgÏŒ®±e îlw”!P@>çÜHæß¨3TêP?ŹèF3ÿXš@¨™`/ň¨)C(ŽjÁqq¤7œþ~Ý®3B{sN¼¹Ï­Ã¯’؉ªR€õö8ƒkŸvçÜþSyömþÏጣ^ý%üô€ÜaÔééÒG÷:ïÐó¾î†Ïša0 Þk:WÙ‚ŠE£0XËoÈ›!ÛБW§C`䥜VˆÏâ6ƒl»x‘'à†mɑǶ 8*ÒÛWÍ»j°ŽDk&´ª³áLsѼ‚°a»¹«'¦ ½Œ«zY+lïd BEh”^› ÀÜ3îÒ cRéÏE¥”³æF x€CžÁl\Áí÷ÌvŸÁÚ²»;ü €^¾æÜ¸üÿ’’MÒ8u+Æ97.ó¿$¡)%ÔÏð ÂiŒyÀ»6ÊOB`¼謚ûQ³TUU¥$€t´¯°ïÜz¼Èzûôᱟ *5ëG½“<.£0üYi´y ÐFUxƒÇD.Ÿhž:SA;E·N†nµ÷¨ w;é5ÕB@{‰­&crƒpÜs@ê5³üW1-#³€f%ôOJ*SOá+&>JÉØtàĤ3!’Bš0Û“ÄÂÙ;*ø&)l@;oÖ;“úD}0 €–T²3©‰¡\Äã$!l“¹€‰0¨,ÔÊÀË”å˜ÌòcÖÚ1ëÒ\¼¶¬Á–?88¼%¤KÚ†dƒ$)¥q&0^ÇžùgB"­ÊŽš!n¹‰Ù<Ñ*$Ô]|àÚvkJÈ894¢˜÷˰ùZßÓ¢PU¥˜ êê'“ññ“ ÑeCl¶ûœOí¸qøI-qª¯•ñ—Ý•´UžŸ]ì_ùdJKN^Í‹!J(4ºs ˆˆÓÆ6HmMD•‚·F¢ü ØNÆ–ÚñtRWÛ†º–h‰@16Ž× j¢,i?º7‰ê"4’,Q%0J.Ù"Œ†1K /Ü‹#©ÆlÐU}qöHó^€ŠÑ°CI<`Д¬ Ђ””I0©Â]h,޵ôÖS_ÀûX:À,ÌP ˜îYBBÍ"ï2bݸ𿠠• ê§ÝXø_€ ­” öRü¼+ÊÕEqô¶u´ ¥¨*PHB f~¢b= é‘…ªÑÛßM¡sfð)!«”2€&u_màY›Üy´RREÉïRBK¸Aá÷ÊH°Šg$„€Q• Z;wlÁ2ñ¤ÂßÒsõ ‚º¾»µDBqE#c„ -êK߉ ÒKˆ( C„HH¦è¢*½$€1aXƒ-ˆAE'JÓi"óBBJC% x b ŒÒ„8X†08[Ã~x‹•€ ÉþÝÈÀ¿‘† RB}ŠqÑäþ TI°§âP§%«•Èéj4"útIR=ù*2&Éú¾yÆ~ÎQËT•$€ÉÜÝÚ~E¿1³©'F'YÙ„¿Ý¢z&€†f*# Rz‰åƽ£ jgÄf4ŒÜÚô~—Éd;7~È×™á.Ö¯(ð¼ïkÔÉ8¥­qTÎ^ÔžB+¸ë@~…¸À‚0’À^F€3ˆA60ìOH2»»0™¡[PôÄm@)E°L(‚`ä4¢ƒÂÐ(M`x‘Xedl®HŒR+‚XÀâpnÕOü5o1þ0X8À ÝhîŸQAP© ~ŠsÐÿ ŠP¡ þÆg §«Éqú2 àαø±]€Ì½ w8j ©2 ’@Œÿ§ž³ôNdˆ~[ůÇIÉ¢xXöK™]éUµMÚ‡“ TdÓnŒ{CïÙã)âê ó<ˆôpΠü››‚˜lTذجó¢„-Ôï?mÆTÃyñ¤"XŒ˜Q‘Ö„¦+,!yyòåÎ62†õ‘° Š @–²os/‚”1E jž`ƒÔTD»±@X9 Uhmü.p –*` ¬qÃÓÄx Z€€‹ZC@Õ]d€€(4K0àçxä½å°`ÖæóæïÏ{Æ€ p¬Ú ~÷ÜÈÀ¿ã††Ñ SÅ;èFòÿŽ© ­ƒ½~cä’Wƒ ˜æU*… ÿ¼mcú‘’UTBª*(¤ Éêßsή­Ú1Cwb…Ìõ ¨y' ð™Ò;)´à 3/0’mò¥[oõ/¿:eËÇ«P<Ï ÆÞ·•Ôq –Õ~ ”:«@>–‰yöÅ0k:òÖQtê QHX’+`Ʀų-€ÿci@ÀZq  ‡"Œ8Š :„\¶ €© ÂMfË^l¸…¥²ƒ°[íCn¡ZÛb¦ÉÚ!`(ذhÐ&Ö¦ÑFpôÙ]†@ ¹´µ€ŒQoí±böÿ7 , `¯v Q  < ÐP ¾÷–ù„@Í öR̃ ÿªu°—ñ°·2³u}€É®è8bŸÓQ«®Ue&d é²ökökz¡™önvW+ªX Ø×BGÛ ‚N=VÐиk Œpi5/­Póâf¶SYáýìf0Wñ´ç( °jcV2|ž ¤Tjˆ ÝP¢¤±ÍÚ9T†ª ´Äà tù ZÁÅBâˆÙÆëCD܈ ! ¦$ɈF tÐ岉ÛBi$BÀ&èõSöÙ¿‡ÒÜèÛ ”Q´¦~{(æ˜&ѳ„K@Eô‚ã¤eL €cÀ8XoÐú™Åày.†ÃòpýØ€ƒx–à?ï~÷Ü »yJ0TšP?Å:èF³ÿ%Š t°§ñRmaÇŠúõ{HmPNÅkg@ë!ŸL+mUUɈÆë“ø¶æ|ôÈ\µ.©N|ÑÛwòо\¢¹¸ÓžÓ>PH«QïFñÝNM ‹Cs~ }}9êO¬¥Ï‚ ˆÚ-d…ý,¢òÑ@‰ „·<е5vdAM× …lCÅÂÞ® UB.èAÌ ÒèNÀÌe k@j8îX¦2j²,!€VpÔ0A†Ì˰qÐ'} `âÔ}]%~çÜ0óÏ ªÔO±.ºAæ¿ *%Ø›âdÖp E妱C7rbÚ«ê[ä>sïꇺªJ2ÄÈl!æ$³;6z­Ù’éꣵGÖíÍÁ9X`g—`[—Uç~yŸñ€$HÁX{§Ð Eyß•t6Šš\ç}ÑoÐwŸŸ\ Iew„ŽANŽÞŠA ±ª›®sȧ[÷pÞò,â"“î݉䨨ˆ¨ žwÈ”0‡QÑŒY˜@– +Ã*˜Ð0Çuˆz±¸ ¨°X X €àŸ|”¯Ôn€Áá4¸eq<œåýZˬà]™ëW ó‹qàcÀâ„Á²(‚z+OggSÀ&¡€cO‚RØ©ÿ ÿ#ÿÿ!ÿÿ ÿÿÿ!ÿÿÿÿÿ ÿ%ž÷ÜÀþg5 ê§XÝhæŸ)AÐ6ì¥ø¸òKvݦwèFpU•%‰@¢DãÓõÖŒÄãÃhWGÔŸ3þ†©ÒJ‹±¶0lLD) ²ÃW[µ-åæ ôY)ë® ÊÁœœ¤ÐÝ,–V“xw€ŠÃ€êDåUuZâ¸ÿ÷€fê€~˜Ö@QíX «a\¼û7ˆèØóZ± U°êÏiB¯ÄÈPPd®   $e=mÅ\„(ˆ€ 5øyºF ÖXÄK  €ž—H³®-€ 6¸0€ÃzÖr/ó·å†ý°cÔ†Y000Æ‚4H(^Ý ø7„*õ3ÆE7–ùÇBTK°—âàU‰õ$e`=Ù/šuú±¥²pµJ@@2@y¹Fë_»[‡ìñ· Ç}~Èѳ# ^î€ÙeÌf˜v¥e§ÆóU}¯ÍZ¶ê«zt+·w/WMÑóêÜkZP°=ƒ6Éúω† i´ºÜ™*âµüÒ(x+BŽ@¼4g¾øˆD•So&݈5%ï^@-…É´-DBÐo=tx]ƒÒÒ·‡mJ=&sDaÖw“8Vƒ‚aÆAD@#`*AdJÐ2’&!?)hZÒ@wE#óTí»’ú0²@ÌÃ/€ Àþ¦üc›q¨VP?Å5èÆgÿ NP£ƒ= Ï€“µùpê‘úSw}ТÈm÷¢z'¥B¼ª‚i;2{Ê”`Y_­9÷ÃfÿXñp¿_’Ú#6ò¸Óø.õ{’*gXõ«ãŽQìéÌL»€´ßa¢'xgHÚ²^EœÂ!·vkY¿Å6^ÌÛ§ä  KA‘ ðt}\–šàm*S™Ó*‘Ñ&—ça1‰i:"0,›àļÝ$€(æx¬›õB@6V`€'``eð{nò à$¼$È{8¶Ø»)˜ÆÚ€u„³ù‰[œM\ÚµLpAxp>ÇÜHð¿cAI¨)Æ-7üOB´)+ÔÿWõ×~)FC:ˆ¡ªLQ ’ŠÙgÓ¼éº;?·–C3 L‹ÛA.Ëm‘pƒa…J÷h£sj úæ±+¼œ1×\cÇ]BãáöÐy×qøQ·vú£+4ŸðxÊ™à0ëÁÞÇnÿ «² ¦˜ÇÜHæßHª-¨×x£Õïï¹°g0{Ù„«×ÑÊ0qL•U ‘£ÝhðÑìë›ìŠÑŒÙ¼üwŨ˜Lü«ÍÄ-?Éîꄇ’‚ `ۆɠrª‡b ²¬°ã* 6¨Ç Ãb“€aÁgx´À£Žb¸ÍðÑ d1ZÉ쀑~çnýÆ ÑnCãßsHÝ< ÐÌ¡Vü¼Cå´ƒàq+üg@¹'ÙOÕAÇ 'pEÈ àãõ—éÛÔï»óȧˆyk´ÙnETX+ÍE]½îñÊÁÕ)b¯4fÒ·dO –Ô.B8ÝXkñdmRÐÅ%žµÂ ȱ£R³Î²ÝCJ%¸?%Üð ìí§U²G3…®j`…7Á‹Ï¸2UtQ@£€ þ´1 XeDzi²+ »O‘$@‚ß2Õ6Q2’j½niY(8A`a"°”ˆÓJM‡Cr‰i$KC 0HfVàep  ^÷Ühðo0LPmBÝŠsÐËþ£„`¨6¡>Å`²§²UïMÑUž©’ää{99/¨뀑>l[ÞP’Á†–Ãñ×hjv÷œDï&„+žå‹4U(ïœRÑ…±³§"C¡Š?UT,"9cmû ñ 0e€)eo«ã‰ –¥1h–DbA,”ú’JTT ^ Ë„¥]*OP?Å<èð`ó!$¹¬íR žÆàz+‹ò±Góg7,'¦;iýðâtE‚æÑsø‘Õ‰xÐP%I@H9»/K†9vÛÓ¾Ëïæÿÿz9Íí™ñÆ$(ä‚´»Ÿ)‡z“!×ÑÖÑ{ |¤(ÚÌtðž¡lÚYÎ' r)ä)޵;¨ƒDL„„«Z nOàhÇ@Fôÿi±áW63š¸Ô†×§»G!¶úX"ÒC7!¶ °ªAhBIXRŠaÐc¨vž†”ri’Ç ´ @ ´ËxxÇ™ÜÔ†X ÀâÐ4(^Iáž ÿ$I¢©P`Ożè`ð;j‰pU*¨¿âà•¢2d˜µ/@×7H@“o>ê@gUSf Pd `ŒÞÄ;†˜<À‘œ‹RzP„“o‚*eW—CmO!¨”B0_€¢”“™ )6¾d:ý–¢ ÁnAGÙGw@‰{*šU‹³mM±<×&ƒ­-¦Rù.¿ÿeFóÈ–ZÙõUX»DMiS @«_e·ßêÀµ‡Èðï8P•ZCˆÕJtnÀÄ.u'ÈUÙ•Ò,ÈÊ€–É—F–ÇD‚Ô°# šÝp‹ †+ ,!`Pð<ïrúrává1 ÀÇ0@JÀÝ ó;&,]RAýç¢Cùß)ƒ¸Ú§‚úEŸž¹zó€,îÂ÷Ð6öDWÇ>mÖ‹¼9RB6-í^ý;Û¯mŽ?òæQéƒ[(AÎj>‡Q¾Zk†Ñˆe" ¬ô aÁk<˜oú#ùRÆÿlÅÑ 9˜hõAqâÖÏ­a‘[ÕdÝ „;ö[¢˜3 P#sD`´GJÊŒX“]( #€æ O€Qè, ¹h¡£É_Ô9ƒ•åu!T– $Ò ™ MÐ@¥± ¨ˆI p„€”ØXƒ1TCÑ8fjX8€!aã1ó~Êü‰¤u]F!­¿!O:˜ù5DZºÌ„ú+>ŠRÎçQžx‡'ÖHÐ,¬5g@Ç-±é§wÂ1U%-㊎gõ¨€\¤5ôøÆÂ#qb®:iÚ ÕõPÀšÄ›‡¦N-áˆàI£&hˆ,øÄ&ãÆ@åí¨"RİõvìÎgƒuj쀥9"b º@ͦÐnîd‚„ÀÒÚÎÓ™Î.V´ ÛžPØ·m¢§¿Op83o×pæN@­AÅ¢ƒD'@Db0@dFîR‡ “5R*ÃäQ£a‰ƒà%:À!Ø0€ý‡¹àm¡~g8Þ€õ¼ƒ;vÝ0û_DߎCýã¤Éý³;HÓÜ0õSün(í²’Õi§ëúmSs¨ .ÚßäèdŸ@Œ«[>òT©TL¼«ªÌHqgO~cô™/ÿÜ~åŒç²¸@&åµ ©~6€ÛïÁ§ ¯{/v“Øõ)l!F ýªPK²?Ž"”¯ àšüÆ‘¡ïTfAF—``ô ("m"§ÒJQ…ÛU$+ÍÄ5q¢^ !Ì :¬a`Íɗ̾¬¾Œ×¤iÜ Bf#íEH24-ŠÁÒb5!Š8Â=Ç`YazŠet6 ŠœdÛŠ…VXÀpÉTí‹¿u9^‡Ç0æ€÷x€ÄþÝ0÷_ŒD‚âPŸbZt†þ'% í*õSü¼Óãú+Ç@˜3 Ùǘ>U°UMI hJcÜ1¿˜þÿ(X¾}-A$f j[2)b¤ 9ôNìÈÜdìGÚ'‡ –Ë÷ʤ›õOváÈ~ÄB U@¢†¹´B(1ê CܾܡC†$ö÷ˆ4þX ¬ª‹±¨Ø@½Ó2'΀ºÙŸÊx"—ÙIßpŠKc¡#€¤´ƒì~‡Û€ ë¾–¦Á‚LÜ8« å»`ž$Cà@-¦3Jï^õÚµ@‚¡C  Èèš 0p XöÖâ=pA“Ð0Àá pŽg¨‚ÒþÝhîHË•êUŒ‹n8ð_ˆ®©¤O þ†@u„±ŽO©€ö‡wøÔ‹m»ƒ´'ÀÙ ÔêmŒ9\‡ ¨*HÔ{<­†ÁÑæ«†ímôPÆb]gç#†K½ô7= &|9M–BÑc$ݸà¨4¡Ê8÷ÜX°y„P¨´ Jø¸…A«¥}œÛ樓!Ž8CÒAˆ™$J H ü&‡qm³£­)ËÑ,•ú‘®<׌N‡‚?{ ^]<”´ñ\e>¨wXÃ>cjÔÖ ^S3èš%ò­–Ó³…Âà#â(B !aTm.Ôžˆu*.¢{©TpN]¥!…®n€J‚4b–5Ç^€À0¯%R€IϘ*HŽShc£YBL&ÇÖÍÙ‚b¬²‚ÉM2@Ê@PÄHÐQ(‰kPBbØ€üмÀ  u ¬x€û@-1'˜~çܨúoP†Jì©Xݨý_•:ÔÏð ¨Íq8¥ND=wt‘´¬Þ0Ûì¨øÐA¸*E‘€¨=½¬…½= Ù„›¬©Ô;§€œïŸ·¦9JŠ4êÏüZоŠp­ï˜ÅÓäÀHwlM>²×nNkÎ@U™¢×™pP£{ȼÄêe.ÈЉ7Iä†\ÀSÓì:„Ò”} ׿ 11ßÁ&T-ˆECl=H؃ݽ€qw…\d× (¤BaCÈv…ƒÆ@†‰ †ò¤€¶©À6J¶/ŠªíTP`´àPŒÝ Pý?¦ëo˜°x\róøZóø‰.ÐxHBŽØfý»B0T™P¯b tÀÞ|4ÉÍ­ ¦>Åg NVÊS"O¼3U¥IàÎi9õtàµö6ýìÔŽ)RefA€ºí–`{¨{ÀîhÎTð2û6´£ÉÅé­ctíYÏÏßÔA¼éŽXE•·ˆ™Y¢?ñ0„õ=†&‚¤g9!g™àBÏh'ËìrëQªDº E¯Ò" ¸u,b €hU0b…æšlª€€` ˆJÌ* ©€¾o ¢@:@„ˆ;ÑÌf>~S6X€J€ ¨‚h’ì”*VÊ] ­`™´’XA¸KÝ `Њ @€5X@‡vàÙ{Ã×%˜«±$x¾CR  þæÜ0÷7Ö´¶Ž¨>C[tcƒÿ¦ "®R¬Lý'ôåôó„¢ßÙгz ·uÌáYªJà’$Hj@ͬ¬/ž&ø>§1}¼)ñ?q9@8=(Œ‚Ï+õ‘ôì¼ÿ÷ªš×ô”Ë? 4TEàÒ›[J/ª ñje6óÏI!0']†-¬ºßû澬+´A‚GBΞöÎäëhb$ D¤DĈ8ºªb!'@@ßÅ|!e5y¹¸ÿ/RÈ F1£B®I €gá«gž¦–ÔÀ„¡ xÀÁÌÆ5=¹%sjfågcÏ”|hHƒ  * [Á¥,°<ÇÂVÛñWÀ°ÃÀZÀt @¼ÀQ çžý h;Îu+¾I7šÿ7á­ì©ø(éÊé“C2NyHƒ£ ×n@ŠH»åÉÄbêU•@ ©H÷H9½ÝçZ¦‰ãÜŸÏÇ»wÑÈgOv\ñ•ßÛ©¦kxx⡵vxD̹®ºKÁ›Œëàn(´¨\_Ê(±D(+ÁA¿ä$tºó‚!2 š+C0çã‚ÔdhЪbÔª`YŠ <°.øî\3 @eò°³Ã;Í\ÚLGˆ{Ý&ëÍÑÇ \¥ÆMß#pVlä´,B ÕŸ<aü<†@b9$ò’ùdlãp–¢EXœ;0Î Ó—° C=0ÆÎb  <xž–ùgˆ®}q¨WqO:<øŸ(¢Š þŠ ŠÇÕ\µ³zT¾S…Cûݲ®3v€Ü¸…{ßçðÍ\×BUÁéÝ"æÕ‘ãt•£#'eãÛû˜p}ªìÍŸ·Ç oCøÑ' ) DäóžË®I\?~u¨pÝdíÅØ*ÄÕ·ÙÙˆýPžq!P ¤ðì **v8-HÓÐPBpjc‹>‘ z¤·X@ÃsA–zÙ¨‚b'`HÑ RÁB5!éã’§•¥®í hBEW»ûÎ9@ˆ0ƒ ‡ …Ð<ƒ`Àæ°ƒü‚MkÎ&àá À~Ý ó_„ ŠJ öR¬“Ën€=πʱ(ŽÅ$À›‰š´°#Í 8¨æÜ:Üf Ue€z1Þ4Gï”@ sHN¬™z(`ÇÂms楲¨‡é@æ7Q)k78œ¥DdUT”åó/"ôiÝhð‡PÁ¡þŠoÓæÿK(Bq°—â0MÆ:-ÅüdŽˆýìçO’wf ©tŸ‘(/b›sº•B8¦¦‹˜k½e”Ö¯±²ëå7#§ }_{²‹-s&dkÁH$¾ëç“>šƒŸÂY#ø,åöA *¾ÐÔb}2ð¹Ù¬0@ù|¡µÞ´½]ˆàe žúZ¥H[èääy L°~ŸOÙCôÆZXñJÀ¥@Z}Ó ™ÍMÆÓ€ˆñ­mPÅ%ˆr6*Ð>.B@œL8hµrÈ5a@²iv¸ÊSr‹\{šŽ0Ù (ÏL-ßY’€3¬Ù†Ž}þÝ ÿo0Õê§øÝ ÿ`~hæê3>#…z¶¬'"êÜÙÍ‹žtm æ0ž Ž©*“$`~ˆ14MÞM Æu{s?­Uu_)˜üq*¾šN˜1ÞEzw9â ÛkjÉ~Ê7„´VqûMÃKã©^0€ëxGä⟌"ôjìг¦䲚,µ«š£¹œ²ÔA#˜ì»¦â ¨Uî„ÑuŠC¢mÇ‹ZLƒŠßÛr’Ì™4Œ´›;J„‘  "fNc`ä #PÑ2,A`A ªÜ*Ð ±)†‘P‚\XUÂ,1ÀÃÀæj8æŸcYk\Z÷½wï1à¬pš…"@1~Ç–ùg\åÑZŠ@\Sœk üiˆÔ·WPS| M´;-ÅãvÆ“«p5°û˜r´° ¡ª”J&ÑÀI¼î/¶iH1Úaêm ïÿ꿎n.Ý HÕw˜‚⃖eÒûÛº¯Äûñ•]t:Ò7v‚"©xý‡‹©RNTªçºË‘îüD$]¯Ûòd ‘7›fP›ª:X†Ì[d¡ ZK¾J",ó,ªê Z¢:P»²ðÜcŸ«§E}ªÕ ‡«=¨mµ‡ÓU1H´R ØÝͲéÔ”H†(‚ÂÆQ 1AÚX¶âÒ`‹{žÀ¼ x `Ìöhùv M鬮€á ~Ý8û"„T[PŸb^tãìˆp¦©4¡þÆg 8Š8ÔÚG ðÞYµ–9Ð:¢^+fÞFXUÔPIhhÖ©ç#!A´Ÿþºû‘;Ä3îÍûfÎU²J˜^5ÂxƒÒý¨c W#@ ËèÔ nã…fpU %VÖ|»z¿ `×í Re„|ŒÂY°ˆžž¥À¡\€UŽ™ ‘@iyh*„tB§ˆžÐxrØ„†Z‡ , A‚e¤¤Å®NhM  »$`ÓØ€C€X@KPn»"¸y’H°Á{B(  pl(Ç@5)$&v``¬,ð(þÝø?Qae‡*`\t㲂”ª„@=˜¶Q©¿R«‰ÉSû]Ç)(7ÆhoHæ¨OÂÕ:q*X€¢Ú¹tg· ¼u7Áˆ;fÝDZ¯è)1Xú¼ŸŠ+¥(¹¾)à­i·ïáã)XªtÆ””hDU(teø´œ-ÅUZ¹§´$0ªÓQY'¡D+^£Û ;* ÂÜ€p-Øhº@äÒ…LšYAÈPµÉ¨‚!Ð V@°•pøÞ@¦9FæÕ@à€tM4€¶âj´P h Á¡ÀII^… €Gæ ¶F@1#»ÉÁݸìß  eAâ¢Íþ’‘Ë‚º*ü^MÄ4D•±ïc­xo¾©œ8FL"@iŽ×$?÷L~dŸÖPš6œ“(Æy‘è+-¦åê4BÂ6NÏóê[í¦³ZÄ" 5Ö*X ÚêOŒ¨ÓÑ©VÉû¯†]oæ¬0òCFHûLÆLQòlDI_é:0°ÒmZ8È:)f‚IDCˆ1ÚÔ6äzAj¦á ›f]RåB(Ñí@µšLÍÌÄ{5Ø +ÆàjG’]ÐØfÍ ¦@$ÎH62p7. /p¬mlÐb„, 2"€ƒÊƒD–p <¬&AOggSÀ‰&¡€cQ¤Lì-ÿÿÿÿÿ ÿÿ(ÿÿÿ ÿÿÿ!ÿÿ ~Ýhð'¨B»² >żèðàWíÒ‚ú?@MˆJyZ1VfŒ9P;Þê·ƒ9P!´å¾Í9g*ñUÚ‡B’@‰ýÒ«e÷òå};׬š9s—ÆËÓœ š}’LÕ4l˜¦®ž*¯v@ŽÛQÝœõüép{#¡•ôl‚ $F&VoÄéEw› È‚‹Á~sPų^(*ƶ:ÄëšNȆý<˜zåI}(€)ÞhÕˆjD‹”¯‹€ ‚9hiª Ä m©T:"CA€¡£’8­ Lžd’3N “pá¨À$%€B­ÅM]¡a¡IK¨A% X€p(['^÷Ü0ø¤B9P%Ý8ûßàeB]þoyÃd)8«¥jëévÔHF§§)·9Fˆ% R!Ð>·Kúª\t“±ÍÇÅUœ!9žì(¥àKhy&BU|ÉPÝ`ø<ÒG®x{hNšÙ™Ÿ›#©góN>§5Y~X d)‘YcòØŽÝFT(± <½¢"X—"LïÁ€& „J±^§ WºG‘hË%eV@þ‚™¡" !0=’-ÑMŽ€x:å0@:CØä€ÝÛ,Š0èš@@ˆœdƒ,Cá Æ1ƒX$¢+¢ÏUÀ@:€N | ¾ç²ÿ*L¨WqO:,Üw"B÷à¡l„Á,_ܤ`vñ¢Aªî3ídÊÆt}©®Ê8TUˤQÀ|ÛÎ,Ôd½f³7&¼†ì@ Ê]4Qí¶O›¤…X+)$ê5‰Ê²ˆj´¦Ðr6,USÔÀF Ö!"X2Ø èg"Äý“ ’¹KòX@Ùä¸Â$ •CŒ`ٞĭ =”º^ÈBB’·ûN1Ç<ç=`€^çÜHþŸ ÁPyâÚämºqÿŒ;Bq¨Wñ2ëÏwÖ,¦­ŽÙ 'ƒäúëï)óC(ÚÚÛœNÄ 4"R "ðq®k“MÒÜ=ôšÿt#‡ÒŽ•{Ê{Æh’Fçað\{0ØP°6;@ã–÷%‰‘K=ðHaV-I±†ÿUbÖ­³'›ã¯š(Wã¸wP!àëým°Ph§”Hrxu¿:@$@Ø,f² ‘Qr¤Ö˜ˆ¨ÜÕNsì° Ad°%ÍqÓ´Vƒq xÓf„†abÙN1<§Ä1@·Y—A©0€c{ÌÀQþöܸÌ?ãJX+•BØSqo:<óŸ ˆµ’ÀžŠÏ [Ó¿ØQ7ÍÞ—yü© çÁØæ¨o]*T•˜¿të> ó  «w—sÈ1ƒ/Û§Ê¿íF%FW‡$뾌 #|¼?4,øï-A¨1d åC3M±a ¿t Ùx\F‰îsÉ‘ñ}Z"œy蘹.6¤@E±qݤÐY¾"¦wfc5 ÌaƒU-V {fšH…Õ†|=°E£nê=céTï7)²?píBY…0ú‚)æz—÷J26ÀÞ®En‘ XQ $RZ5 çË?ÞxS‹ÀM¹^Í?ÓæXŒ‹qçïƒã6ïä_”¡ÞÝ óoHÕê§ø6ÝHö ñcmJ4Lýÿ¯é›æ–eyÄP±WUŠ "Prˆ{ûžï8UÂnH³zŠÏ½Om‹d2‡š‹Ï~êÄeSNï>Ùhl¾@™ÇÜ5Ìôv«#ÖÃ0dU¿Ô÷µ… õˆåîLn¶Xj½;0µ˜ý^ÿ[l[ È€™ÓñÅx!*ža³ÌSb{v)ÓõÆ­ÂÌÏCæ.1 pEäú6‰H9(Q\œ6“Å3úèö|Ù8°ðû"Þ ô6QÞYMkµ0nЃV9 Jqh gld;ŸÃfd  M,ûî¶\@`h€ýÈÝ+®Ï7ÀòÁçÜ„Üÿ‡¡S‡Æ=çPöïjÉZ4)hü­«ZžÐ#Š-pýÚëqB.«Ïµ3j”6"Tª$@UhßÞó2m‰ïú?bU¼µ+ªüµ ’Déo£WÎRÛgåRÇ­Ÿ!.¼3Ê¿c‰ ^Ïl!âÙ‡Fd§¸müV-â­I€;:…ª)¸z¡Ödå„ýiv.[†¢ñØ™³U/“Ù]ˆ(Å”:Ãóž«SVe ¨7w&Éá ÷A@2`7., –žRɬ ›îÛyfÈÂB"H "‰1$Ä!a°šÀ¶äÉÝT€Ô QãY8¶–  0`ŒG§Ô¨Mƒ @`~Ý ü aiÖ=A]ïšËü“”.ˆšñ"ì¨ åÉvžo'kó¼ëxò«»Ë †äØmD¸µ×1B ’¬?Íý6ÜÁíÝwý‚Ó¬ £ ŒøuK´ù_}n3M0Üf–p¶«¤ŒËoI¡¹]ÀØ‘( O[J2,9øi•‚&Ye˜)“ðfÈ­e’ˆh Y'51¢²Ù¬VX Q`‘°•‚ÃÅ `@ÈR‘P$Ñ"!Wäw‹°CL ´ŽQ% ¤F‡Ê ƒ0 ¬K!“–p€ SX°¢ ÀáhÊ` ±ð2 °ü(R¥×zƒÖ¯ ¦Òׯ¶µzÕó"ëÕww$˜Ẍ}Ž!r"^F3AB,IkýAXöKƒm\tËÇÙRi\¡®3œÜ·þÂpÄ%PWì_Ø«)æÖã¯Æ•á‘ ¦ÏŠ÷ÃÆa&LÙ …dpÕ¦³¦#Ê5󳊆ͤ[ñM2Ù €1ù¡[:-¤u©"(}¥‹68 X°XPô,¡@c }÷è­ˆ¨Ò’¬(ðDèš 2˜ »e´t„ 1 (ÂG©)@ÀÚj`$¯¡˜AR,+´€¨Š»Á àIÿ²ç` p^ÝHvóXÃŒTºâÔŒwÎ 3b­1TÚ¡ñ‚Ú"¦o2ŠàvÀ‚ÉA÷ oÒ&˜žª+Žø‚R„ ÀZõË5o:Ý&$ \?jצBåöVM§ÇE‡¶Cƒq¦o5sh‰‘ÔÀu¸/x‹k,=­»Y廿AW:—!§Q¼[²t1#rQÂíÓ×S dO' É¹î5`õ""£š–[«Q¡ÔAˆ!ºb­ˆiÞaáχN†¦O*,Å€CÀ‚”ÚEŒ “u¡·=Ó͈Zµ‰;¥ñ`í€ ,$Ú3Î+±‘&![¼m©€UŠÌçܤÜ?¤B ¨³bœsãòã(TœP3þJœWâZF̘Ç#Á®¿ÊÁÀÙ• 0y>Z޼u  U Ä™rîËÕþƒî=¬,Mïk ÚloÒùfzæ?ÙáõPðøRJôu§À§ž™9³v4ÍDh„ŠðÔx y¬èõêU ¬. 3PÜûýÇ Ò%BÚ¨èUX›M0X"JRÐ× Ä-–€E,Y@`¢Š5¬q€d ^©€ë2-h…"³áõ5Ej@ –€ÕSEÅÊô¤0 ‚Vâ4-¡ Na°€ƒ$ô,2 ¦ÀË*ÀrHÜPP´Þ÷²'Ie¨t >żç†á榩PP+þö 7,A€­íˆfVUH$¤ ´š½Â=AŒ¥m†´`†kòAIƒbZëéVÜá:>h o´eÍ› Ÿ#¬&È3ܶµ•Sɨ,ÈU€ÕJ‡õÛŒ,÷§@ù¿¬w|(GÅnÍØ«B¨»cY9 Æ,8´Ò&ÈqGöŒ"È´€,ƒC,˜y`‘‰¥Éè*ú8áâ‘°ñBÎbÕ4qUè°¬ñ4&«lÉ7Ú)Â1„"À!ŠR2‰e±žÄ;@KÀ3"„5 «G‹X€Gðƒƒ;xàøð…9@þ÷Ì¿"-34›ê6ôE‡²"`hÌq½Šl{µ+ƒñ¨GŸŒ÷§4 Ä`Þ€Íu€ê@@n³…bsLP€$4¾y›‰ß‹GÕ샬õ(Þ)w=zºÛkþª9/xÀ(©G›7>jïÍJQڊת"PAƒ]?FµŸ€”€k EQ§H~íË&—d`ŽJ6"˜õ÷¿VÌÕŠïÍü‘GBvï@ AR×½< 踫 „@κ4a´#,cZ±9¨?^Ë`@· »¢mé @v(  €€ €áL˜…à0€ƒlþ‚I6OggSÀÅ&¡€cRÖ0þÿÿÿÿÿ4ÿÿþÿÿ ÿÿ*ÿÿÿ$~ØÌØ›onÈÒj«nOT3>3áæ£‚ÆÔí¨Oñ "ŠãQF¦ú´{ɆAêîèXgÀ¹™ø¶n#©°îŽç‹ëv ÕÄã6µJS^Ÿ®¹{#—»»P)Ö÷àî^Áˆ› ;C²Dôgtuÿó}IÔñ©XÞùKâF¨ «B£²H“¹8ÄdE·BH J{ÿ¦o‚$T®e±¦â°êVñÁh˜"žÚ=@ºöAÉ«BŽA$»Z¨Y”e$¿ 7€0i¬£… ÖЫ dÈ¡V–,`»¡ªÄ YÀ-° ØzìX°Øp¸HQJ= <À^ÇžÙ¯hÙL7©Å)|ùuËrmd–¬õwRmú¸‰ƒl~­Ið;LçbžP0“9´ÖÂ.¥•g>3%¾r’õ|j,2îÁ´—Q€ v¥Ùý ý;&›!´°Z2Ø #V€àéS-[»ÜÕ„Àò†èÌ»=’ý X@ì@ €C€µXX°`1 Tï€>מý,C•nG]sÑ ò# Ñjk+ÄöTüNSÔd™Å¡>ûéѨÓAý7?×b$Ø%òD ]€³{6:Äœ¸Žªª¤$ª‰ï1«/‘'q¦%Ýû¢žwtª?¾-Û™á8½³«ú‹BV*›¥Ð,¥feh/èÍAFtACpf¯HÂzZˆ=cÌc mD¢“匹uçY–ÔÇTJ_œg/”B“DM¦áh®Ž ›6ÆTˆj› iC‡ÀRE¶¢Ï:ª@!¨Y$DF ë™À€ !¹"ðÁàX p¬(˜Î–Ýfü\ýõf` 0xXÆG5èÂ>×Ü`àß(ÂÔ¦ }ÑÁü[Hd*õS|r:Åõ Ѹ³hÀôÀ¨v¿v¶îPBª¤€šd_•u j[ÛÐãNˆ>6Ç^ì—ý}6Þ«P¥Ó™ŒAÀw‘峇2ëZ÷zÉÒû‡“³á‡Dí¤g °ÌÂ\ DŸFál¶Ï@ܶõETQÉКnû¡»;î ë5ݱ3èj‹—sExQ3À¾Šu~u %Ê€rXQK+f½0då„yQƒ5!`1nÙ ;£D|$xÀT4‡ÎÕ- Èw ˆ €5Á@à¶r*0ÄL0÷ÆŒ¶†‡Á¬z``È9àÁ79^Çü3BnåиkŠwÌZÿ;(¡TH¨[ñdQ¬Ú.LõC:8{ó>ì³÷¤ó>“ °ÏÉ…ÐÄ>GÌ)®ª*«2 ¨6orŸþò‘§¾IŒOí¼L*ë´'3ðÓpWÇøJš!G!0Ú) Ÿ>+¡ (yòÓ©B„2ˆrÂîÀÕÔ·2y‰HræÛ‚à!mpêÃmÀœ÷eXD0@ÔëÑ©2;Ç`êÃY"§6`Í’œáë7Ž‘÷a`®ØÌ²½-æ"\”€ò ±X1äîMt‘[\B(Jc A0b¨,‰ð3!!@Å@iÝ>.°pÀÖlé÷ñ;Ã>wc–± ÆË»3<ËXê Rî  ¼€ÆB# ˆ¤. þÝ ó‚4éPŸñï9<óoTM…‰»^ÅCLŸŒBô…Èvý+ ΀jÛ½5cqÔ† 23 ¤Á¦vdëTÛz‰Æ ‡ÐÖ$¬–®“ÁÝÃhdD* !ÎÑ4"E#ð®FòÉ€=ô%cz6Û’&í–ÙE"& R] (~ÆHcÞ){˜ïÝ´þ‰N#D5Ú·ßbDQ¥êlJá@†E+ ͈ °g³ºDƒ€F‡;8Ôµ¢é(ºø,Y€ã2Èx4ýXl‹ˆÁZ„—™M|/ù4½”Ôn°hØh hch%ʢ̰o%ÅWZ [ ‰Ø-PÀ}9 ŠI€CñÎæä6|Bé£PÝhöO@¡Ò*“»è™ßQÉP&ÔUñ)ާ ÕiòPFjªwþmb uÁ`Nqš¹)!ÞH”"•CRÜVfßfOëƒïµŽ5CPqm²\Zàr ÿ Ø½Þ 1›š+r  (ÍBͯgæL"HÀšcÜ :=-" Íµ ê©zîÚTÞ 7j|¥†4®¯Ö}3:úù­-Ô}ºE›º¤jh8ë®4#ÙÔw–ˆ`7RÁH3t¹¨8F˜}B  Ê.`ÊnP˜'¢+4"«VĪ@š(Ä€Cšyº“)m¢ã²üA»ià®R\B8FITvl3IÁAn„¤±©b©1 0€HXäÖS„b´j“àpˆÀ ÝÈÐߘ¡Ù„:+ÆE72ð7bh&NuUø*q>moGÜPeÙ'ÛàÆ‡÷ Z÷)X™ˆÐ ›_cs` Gܱåì5¬Ù§3†§Ðÿk_ÎßX§#ï¬â,ßsžv¢[¯ ÄB!~I5½î׊_Á¡ÔSÓzR~K–{ÉЧêFò­0„°¬dXÜX€÷ÇT¤˜ª€ëzv[¸MPA”o¾`ñ< K†Â’íÐbZ ŽM·0”C” YíIH$r!e–€?µAM<’P!cƒÔY³€J¸ #÷e€ %¤F–±€?’)U`X+Ћ€<€‚~Ý0Ø<™ ¦ ê3F‡ìÿv)ÄÚ”Mž2N)[|àjÎ4°_€Æw43—%Ý„û›ßÎhžØ¾¨¶Þy² / ¥€©‰ %yâ©=þÎoÜÅìc¨„ íé;åsüd{U&UP¬ D9*ØR¶Zz ŠHƒ‡ÅáµûF©eèÉr¬fd˜$P‚\Ù-8u&S§Z6hâøm|k|/RóYæ­‡ð"8¹PO&(™‚åXëm†g OÒ3)©ÍKÚX*‹dá¡A2°pŒÀ1 Ù|Ráˆl™7BÅ‚¬’«`´8ÀZ>Ý »y„!Ä*¥€ú)ÎE7Èþi!”‚šâÈêML#¢}âÚYm¦Ù6¦ž¼«šMv >ƒ8Ú7 IòÑj­%¤JÀY•q¶~ܱÜû¥0ö;ãED}˜U¹!žÎŠlŸßõ©•H‚JÎC}BtìPSBW•2žIBÙ|¶ïšÒz5}?¢´c“áøú&BdËÑ£¢”â(ê/Ÿ×e“   5j„—©,ȉ†žPqizââ˜AáL¼»0,@…›HœYƒ •å®–aI @`ŒÌœ„„…Œ‘TVQÂTPØÈH…ˆŒcÌ”n=ü<àÖ€Jì9͇ÿÜÝ MSJçºÿ¤CöÿB ~ŠJ‚úþwùØbL¹È ò¹yQµ²ªÊL¨3 ,|6¸¡8X¢œ•·n7äÐÑÞ¥èb «–´ =’OñÌÑ•͔·æƒzꊾìÜ =^+n:„Õ5Ÿp¡šÈÆ^‘󯳉–±Hša©›`å@ˆ\ím+žhø/_zò ww†ð> ÀZ¡†µ–VIwyN EÒ!U:­r<Ç:çWäÜ_MÊÍkÔÄÐbçbÉ!(-gd°E"H!wU*¥°éFc €b äÀN4Q]Ï È*)&Æ@K1h€a.˜Ùñ õË^¿i™Üoa`±ìY˜`a¨‚PàÞöÜèàÿ–¡RA“7éFrÿÒþP…Pã`Þij³~€ë7¾¯ÙwD»MìÜDâó˜£ ª©TA@%!ÃúæmWDKI¬zǺ BÆ¿¬Ú¸Ýp®!¡•2XóF0ÏŠŸhmjfã–ÃëVkÛ\tã#¾LIäÎ^Ù á#±PTW]Ÿ>‡ý·'­ DjwˆfˈQ5Ì*”(û7¢ì³IYßÐMž6îL™˜‚\·°éNÀÒA7bAD1iô ¬I+ãNäGñZúZeÿÊ’% B6òo€Qè À`·l® .dcðB‰"< 8>ø´þ—*%ÔU1pšÏüoº”?-U¤õWü\yzàäžÌ:I%„ÛPUj&Hˆþq}ß·cLG!#åp>DžìI1TàØ ×'0ðy—1ÑÓ _#×UÄ.ШëUŽM ÄþÕçΰ¼Bz§ ’E Düè‡Ñ3‡µÆŽVÄí÷åžÎïwFTÀ¶*Îêw©T2Ub'è')Òòf¡”ãu$‰r‹Ô©·P¨t²4•UÀLÁ4Y P“|ÉÐI‹5 `ÐÞ Z¾ŽÑHÈ8° P.Œ Ëc+fz@A‡2.°r±šŒ…Ű0žÅX˹›²6‰Ù\ L½‰‡uÞç ÿ÷®‚ 4 ”fíÿá`¨A¨¿â ¾EÙŠI0q“;Y¼ÔÛéçlµt¨*»$ 3{‰ßÚÛ6íåã>üÙL@íDÉ%8dd6ŽÝÅMF¡W‚_î¡P‘D/åÇî ›è½×±ÂÕñ Ói> 3=^HzÇfÒv¼{Šøw¼l˜Ðˆ s»gFÊ3}¶Hll|‘’”E¸«½,Àü=ºÚ1ÛÑm[Ip6¸?cèM¤ùÇsü'BöžXnÈRA•ð6wå,ò@ý|qdD (@VlcGK‚J R(4˜ÆÏ@&p@ºc”vUg ÞvøM– °wv 8›ÆbY¸_P€W€OggSÀÿ&¡€cSh: î ÿ9C=NJÿÿÿ$ÿÿÿ#ÿ"ÿ,ÿ)ÿ0ÿ2ÿÿö–ü—ÌI³ÔÀP+Î9‡…ÿŒHºÔt ÔgøDDDT×|æ˜,N{?sbOSjr¨ÿ¬e¶|4²²YU•R•$8ªN{јa8+:·v§Œkõ}½áL6·{ƒ nv FùŸáଉ]‹ûñÐð¢‚Gb¯ÀÍí_)[/4[³ï#Oj +µ€·jwé«´äŽDç>äì G ÌßK†g»áýƒô gfÿã|*»þ00{¦‚IpÞ>æª>gwçzõ_{Óç Ó@vO{™É9»¾ï‡+¸˜ªÉ¸JB„0Û=TF6µÊVÚé{,jè0Ñ4FÛŒ²cœPiÀnÆŒ©9Ü£~œz ¦Ø ˜â1¼DQY¾8xÉ«D“] Jx>wþeíZöt>«;þ±C|òŸÒþ‡a\azÓ¯Mé»-”× —øj—¸D^ª LeÏ O1…— ov!NKþµ%]ú—§þíñ‡þ`Øs”†Rê??~ÕRÖ“õ‹ÖÊîûz~Üi½dýûÄ’Ÿâ˜-¯$JýÿzÖä¦þª›H«þÇ=S3ñ'ÐpsŠ“m)j–Ì#Ò›IF^‰œ}ÚDU¹„òUœ(ó„u¯~”ÁB©d¡©Š$rxóäì>ÿœzÜêÏB$VËÿˆ½Wó s«å~Ä£éjþ1ðçKÿ/)’8Í=`k¸uuØš»¢V%:˲ªb (¿¼Q R35Ÿ™§á\ŠÆzÝ”ü? ÊP:Ô§8ݸÜ?ºP†*öRüì[>gëUéª*3„xlÖ„H$ Ä.»5|Ɍҟ/±ÒƒÍ–ì<¢ŠÈ.ìÌì’ ¥èrCÐV¶bæV÷o2oußÀù;d°ÉNI¶pPÛp¼]Ê|r4aBA •½Ò ³~¦r­tó*¨JÛ©I±ŒÅ€5È*‚L>™z0Ô*òù”`Œ ‚ÆH ’ ˆ1UƒÊ dPHM¼"T%r¥Œ5U²#‚! Ȩ( 5ÖVÂöûi&…H€$“”%Š@ÄPr±0ÀàÁ2@=;P €€Ì z ~Ý0øg2IŒV%¡þŠuÑ ²ÿ‰P%Á^ƈœ®ç|^DœHTæQ7qòæ÷Í 6ÐJ$òÄ>§ß:2SU–P•ÞoŸÜª‡nM+o ÚW¿|>A󱞾ú¼ŸŽMœˆ„²T.ž2RÕ¬iþ¬Úx»Eµ%ŠvX§ <ƒO×ÑF)'k»¥(áƒÙ¨šG€¬tÈdv­c GŒÚ*,.Ïc# !m˜‚ϘPD@ B›Ûv3€U–À ‚pÉŽbËK€d0} Þ œ” 5P± ¼V!UÈCH, €l4ˆd˜PÌ1˜3[c÷ÇìÆõ³â`Àzx ”x€ÝXö‹„VºBÔ­Ý0û'F2%4·Nb×§ø ä4Ūd.õÜq ÑCýëz¹åÛl[‘ AB,H q¸§€NÈ ´o°O¬Úf6‹!À@+®LÞ¸X©×oä÷V¥¤X‚õÞX”ú2;¸u£Äx›I[À¢Ã"ÞY8€Šûû¨»]æ¶ÔR-²h·)^u¤€j à¢S ŠÄžê»§)‰„|PÜŸÜv·ÅØFúݳ$"&¶æ­éiâzˆÞ 4îÌqØ}‡–&o„@¤É€ˆBH1˜”À$ÁÜ@V!d… À‚FŽ"`VXðˆ@µ í-€ ÀT ×`Â`0pxøó¾ì À)Þnÿc[DªTPŸñ º‘ÜæQ‰ÐJqêS|²R)ö.”€OÕ¸%ÈZ"Z²œÜ •çI§I,]¯ fŒŽØ9äèì€Ð"-onîl1ÐÝ×ô¯ûİ™A‚³[À{Ã$güÆÐ\íœâ t)à¶/Bß‚$fSp÷Ì=gÍt}ŸÑã½Êv¢¶€;t«à^ž’*h¬‰]eäj5¼/¢ €žy0Ò)Ù¬‚ŽB:&£NÀ˜Æ5 ^5S#Ї€eº!ЈT 9X74tôjÀ`¦#P…’åC @h À r+ÖÂló ÀóX °,yÞ’ žöÜèàŸXÉP© þŠwÑ òÿî 1TJ¨¿â3ˆŒ”Je pgÁ¢…Åã л`i¼cPNÄ;¦ªLIö\ùÖßü"€²µü­lu"Y©¶¦÷ñÄ™N aóCA(‘[ÈøÁc* ™Ò­ ¡òÇUCkfÈŒÇ5¯x˜RO—vb ytòöËJdí*&<_œûfƸ´³Ì4Jö=4µÞ¶D¨Òh*|–w4AÐʘb¢!&’‘Ä@¬  ²#<°¥ ysf tÛã}ºÔš‹1 `¦Q¦A*6`  ‡©q‹@ðv±é=ãðïÀ\Æ $M¾æÜèÐß *u…±§qºÁà¿«$A¥„ú)~€,§R´2ë!ó(¯ )ZÌ‚cO€®Çž{¿ŽPñNUUV:e” ?û³ò‘€ÅÕÂÖ4Q.?’“G“*úI!üU*'ýiõùÌD!e M­u’ ÿ/h@µ¿èºw¬lD,´õâ´øÎ9$t›ðZÙ’8v!JƒÝ™±€e€WÙX4†vþQ&Ø #†‰vch©öÄŽºlo À>›îÊŠÛ¸8^:'ô€Q P@`‘;ÝL4·n. A!Úè ¤äÇ `°ªÀè¼aíàŠ­£pó‡opÎL=ð¼>侮’ <Öi žæÜøÿ Õ ê§¸ݸ¡FB )¡þŠÏ@–5BŠzî¾ QŸ±§a¾#Lª* H€¦¾goR··@¤²?|,jÃAü¨<)Ö¡E¢)¾ ¡}V+È„š› M š‚ ¬¤Ï•ñ#=™ 9-ÑK5îÌHV°4b>…ª¢ë$6ãªn;³©Cq˜×5²‰aoJ…ò¬¶[/°×«&à YP7Õ#p HV9yœõ4Щ¯¸³ú†ˆ¥ßîPŽ­.À¬]!P`)Ä&@*¶f –°,P•Hu£Äˆ@  8ˆÈ~`-Œ}wðŠQ¨§ø εÖ={Ï6¼c:A q l€~žûo„-´†{*¾=72ø_\‘¦I£~ŠÏ ódDÆ$À»Ê"œ c Ï€~¾çcxW­ªRÌj®ÁQÅ<“H$ˆŠFßÃÎñ•sË(áÓ£X‚éñ¦·-K,¤M>×Áe2×@·õ]dnÆw O²@¶¿Wœœuã(õ-Åfm,¥@¼WŸïŽèf¡šâk'‰NLÑ=9º9‡¹x[Í„Ÿ™}ê'ñ¬UÑ bW67uDβî>,@Ó« @²‚œI\wW—zCt#¹ÃrΔ!€‘¸ƒ’HÉôªýädB˜I9š#Ú@¡v(4Áðé€=0ƸrçsÝ ¶~kLóÎã\²,`€f'`ûh.€žÝØðÿâ@¨ä`OŵçÆçÿ'BTJ°§â¤z£—2ŠGõG˜Ú¾“ÓÜ ô‰Alû£uXÕ”% šÿ9=ÏXÝ>]­¹þI2ú¼19áxnj¡WêwSxwYÅ&³œ¾†õ­ XŽÓ€yȱ+@çÓBÍåà'UqkϽYîïËpuþ[ l>"í^⸹ô7K~"ýЙ„¼|OÀÒ‡D ÜWæKb h¥u ê‹AmBªÆxæ¿„ªŠ¸œ0.'®{¡©´£†3C:Ä`âF˜g@œh€—‘ `F&ãC„¬âI,^îܲ¶Vìjþ»³ðÙ̳«áŒ`sùÏÌÎ%i˜[@À@£ @žݸ¡ÿI)„*ö4Ö=‡çþ[*‰­B’­õWü¼+b£<éì¢9Î^p!ñ™odX(S$ ’e½3½„ þäáêÿuç`îm~ÿŒø¬ –¬hnœûGñˆX4¾-ÙhšÀ²:ƒ4Y£>ÕoDz§×–·ÑY:lFrUq  ¾¯LàÖ}@X½¦sˆø¬ˆÖœÅ.ò¸y‚ an$+¤îmAÀô»@”¨d¦1šÀï.CMAuI²§½¸;Û•3ãf«µNŽa“ ÿt@™À¼L {€@T BB"–݆ô" 0xΦrØðäPÕ”OòìÞñýl?wåyŽçpÇ:®Zã¢S@!žÇ²ÿïBIhœcÏüß‘ ”„& Ú™­ÈØ7ÑåQæ7H'_GiÞë<ì¤o[ÍT• IIé§ñêÒZcôÃY]c;æjöUº…­‰B/=½”LAE%êÝÐËáþ}%kæ&?^D™¢Z¯h_YO®Q‹[)¤2ü‹á};W9}Ö!’Fœ*ªs’»1 î0bÏœ°·Ðô9q‚VNÂEk&ÀýO,a½Ñ¡)MBoèxhðUö˜_ÙPŒEëù¦eedh€%Ab €z’-c+MlžÓŒÇÁc½Eã}̬9ãÓb¾ÝàÌ 8Þ[;·3¿B(X³¡•i%µ€Ø÷ë7 «Ü£z’8~ÇÜhæ¿x0TšP?Cžs#Á?”¡Ú„ú+¾!S–¹†Ì©˜8‡ÞÕv¾¾FìRCU•– Œ·i·põ[b0-W>«ÛìEQ0®Ýg7®sÅȈâ}âchÙŸóJÔˆ6:2(¦æ5PÒT|/ S¦€^Ò!RV@Ô¢6³ví´m¤]ZÐgXÉ´d0!u­—{-IQ†a-Œ^ìªÔÀ(«$WlSM¶4H!…ÁD‹°mÑ”ç´ø#ŠîÖ¢ D”Hù¾£ö!`¤@ „a$±’,¯ÒPV†Ó Ö"£("AJ±5V‘‡ Þæà9Ž)Á{;eÙÂ;àÁ€N ¨U  #in÷^ €0¨¿ ²Ð Ý0û`¤vc‚½ë¦fÿÄ!¨ÖÁžÆgQžTK9N¸› Ú”ƒ¸ím«ïHqâ¶*H tkmU´+$ ñlÿËŸ{u# àÝi7”«÷ u-Ẵà+r¤íŸSÚÁt‹¼Wf£VÙ åËßæÕlŒ…6o ö¡q€™© I(*…Z¨˜„×™– (¬Ñ‹m24d¦YE #èË0 ÁŠBÑMw%3Á¶\Ö €£˜X¨Ê`@[¤àJ€µN@·v8H±€>$€õ†¼¢Ø—  ‚œ€‘ŒÐ( @¤†)3Ű8·¸=€c ”OggSÀ;&¡€cTåÞþÿ ÿÿ"ÿ!ÿ+ÿ+ÿ(ÿ2ÿ5ÿÿÿÿ)ÿÿ&ÝXø7(C• õSœ›n˜ù@¨PPã`•§Dq¥7ýð¾ÁY ¹U‹¼å¶ÏaÃ\š«„ €ú¦…èúÐ4JæÚ–ØÇ^ưŒ×\Ê­ŸñÞgºÆ˜¯PyøôøpQLx¨´¥"x*ù¯¢†…Y€/Ï< 4ÂzBjÇÚPˆµúËmÔK»x €Œ“€ÐÞ†Bñ kbÇ„ FŠÖA± 8ç«{Ú‚–Õp?Æ ^’"AD‰FNÃR±Xc4+npc$¯X@™¤`Ë@M,€Œ!å¨> ~€À ˜•~¼€¥ê…*­Àáà9v `À^ç܈ý7¨ TYP·bÛtcƒ›*%ÔOñp/ðƒ¸™ï³¾ŽÄÔ5U(Rjâ€úÞpg”ÄZš Lj‡Çéý§"ÁõẩHì<¦ê&04M±ú\½ •.`Ñû´Lb‡i ‚½VS`³H‡ý¸$`IÝjƒf¥‚ì‘ l @±TT${ J˜nÕY­‰ )‚XH9®ï:bR@fÞ'$ó†žÂ$¥]ÐÕÀ€Â¤€»à|¹gÓja׈^ºM4¡A‚1Dzn3€ `ÁPÀ Þ.’©Q:¨ë „Cá2ø¡PºL€ŒBà ®¬ÇX÷`ðÀ~מù/bÆj]!Gu+ÎI7’ýÇ¡Šƒ½˜S+¦7Eû~Ô\¼ë— G@nòÄ KRƒ|بxÙÐP–¥Þï¿¶q¼Ú%i:ŽA(Êxío敤` ž¶ÓFJîf{¨f®¤Š ¶>˜7ž º©i|¤ì>Ë ù™ÖÈA,®2j%QP6¯XÔ`×j-–…Z§Ä¤-F›"`Y¼~%‰£ƒÁæ¹îµ>é5dOEÙ"«ñq[RKŽ´*k ÇE–¬é¾J+F€—‘À‚U¶e@3?h{Ìä ²‡ÊçŽv tU¦”(Óã‡ìׯJ€ R Œ6pà<ŒêÀ€àì¾×fÿÏlm¥YG¨1:<ó?« •ê¯ø8…}Öi®†’@!½„”€R µæmr‡ú–c¢¥Rv(œ «v›/ÙömùñË˜Š¸Ìt2rÌÊÝd뼓ҿ›|oXáN/ŽVÈš;0”êW•Lk@{üÌ3&^VCèì,w.VÙMà¦;Aª™ qÔulgl}%] ÈúwY¢ ¶ä~h©v0ZK¥LÙªÂuW1™"¤¬Pë~fÀŠc°±À4bš&‚DPFò @þnÙFRôÕߟ´«Aê˜Ì LRYÀ @=X`k€µgaáÁÐtŽ?çp@`æ>×ÜHîŸ E•‚úŒyÏa™ÿR†Hª%ÔOñÐ{XG­ê¤Ääåûšh%,¨¶=#èZUec@îÿÝüow!G¾~BîSS„ì†Æ©Ä¾ ª½ó>™{<%ÐfjøŽê „ÑšwoÆ´Ýú(óß°²Áºuê2ÐdÔC°<÷f.δ„$“ ‚¨ aب(Iw!¾›ï‹0„žÙÛHV¤(P¦ù>HAÐÒR@zO×Oôª§ŠçD¦;B6"ígf#:âP„Ì6ñ<€¡‡¢ æ_)€K„è6Y¡Íb= ÃB—[@˜ÐxfoàźÿPw8«³˜ïXîbÓ`8vàðóªá*Ä¡áÆ þ×ÌYÿnÂu¨Ñ¡nŹçF²ÿŒBP#¡þŠHN«ä5©ýÜXWªM’½îAPCÜ<Ä‹=*„ø:±PUV&.nlQRÌIÖ\Þ„Ö&ïMµž¼‹ã§5R²<Õ*×ë‹«ÔôÕhRüsâ…ì™–Eü³on¦*ñ€ô"§bT½­ÛôÔ·E}Õ£ØBÎeÖv# PtÌ€et)¸Ð|/Ô¦N]Z¿¶ETÞ?›Â³ =EÓce¯-‘Ò…Q#«—„‘«"#X‚-t¡æf‰ °ÐÔE1ÃwÒ »’mHƒPÑŠqƒCHB3J€ÁØò¦†ôàcvϹcý6ö1° öá¶íƲøÀeþ ãý¢‹ ØÌ)ÿ;d„&iGM1Ð9¨þ︀P%¡^Å£˜èéìßÎ3ð[g‡ǼTUéJ¤ÞÖ$~Ÿ¨7V[ ø¬~f %DÙv¡Ž”€ˆ–›Æ%ôÞQ˺À?]°¢&jø‘* QƒB\Œ$ÚMM¬XƒËR…B…P‘ø|uðçŽ|Þ×;ŸgŸà÷¿³¦ÏòŽ À[À%#I+õdÓX&"B`„Øm…Ä ¾×6ð?gS„RP3þ)íÿö€­úv¹®Å7àøDÙŠÌ•©×Ãlûøu¶28|•S4ôë8ο™ü»¶ùRZgÿ`]•!¢%áænjµé£ÆÒšÀ,†…žäð]ù*«òóñP¿ä†@U"éA[UŸ£óC]ii›ZtÕ c X×µgÈY]©l¹Ò á)Ërá"õIƈ4Dî´P¶ò-zIè¤ÞAÌ0©œb¶™™ZÇÍ’0P5LagžËiwVî`„à Bä ðÉ¿žmÀ" H’áj01Nb²M‘±MU€C5ÐÀ80`Û€Ø\ ð›€Îê:€¶G.`+ žþ´LS&Ô­¸–ùa˜©L¨WñˆÌ]‰ÈJ½w¾mbÑ»-@^°ÄÖ (!üP…d­8¬C@Öz¿·±Írš„â‹#¡nN¯ŽYÂ’ôà· ¨[{à+| žÔyB΂ؘ!‡Ô›5``*—ö{1‡BãÃcXØŠtÒFHRÛªB•ƒ¤ºª¯%¡‘ºn‚05Ϊʶ»€Yx,ƒ „ŒŒI»L Æ`TÅ”„­Dn£¢®ÄK")¤"*Œ&Í2Ô†ÉXƒEJiÔU*e @’pþððv8€TòÀÑ'ž ~ņ†Ô=AëS܃eþ˜¡-LODÐz˜vˆSLJ¬¨3î<‚% }6Ÿ¥§†i™bšÐʈMÅýĦã̺8;bÖåÓ ¢ýÛëÝψÈÁëä8 bv£~PÞG7ÊiMOËh¥ wÏç´Áíw_%HFÑ1Bµ(!Œ¬l<_µžv0 c AÐ]W aPTø³ Qhd<|xrØ9%€& ,î¢b\c°XÄ¥'Ð)¤‰4s—$ ‹Kº’Y„Ó\5ªùÄF”Å X aºU4#f’¶]´âÏ„% ·ƒ˜ VH… °• Àè¦Z/Ѧ,ЧÞ9AbuYc†4Ôè{‚Õ^Cà”Jº°åDH§hP™ÇÙt;.bÞfEM0sQa¬p$ÒH±ª0u§.ýÈ轪óO4Ë($k2WDBI•e'xÙ„@÷5=C|«†mý^•aÑ%jÿxŦSpdDP¿2~7u¤˜0x °üÁÂËŽ5¸vìÔÃc½‹Þ#x ÁC.:á© OggSÀw&¡€cUX`Cÿ2ÿ7ÿ/ÿ"ÿ8ÿBÿÿÿÿüÿÿ!ÿÿ#þÖÜhnó¸3C¥ õ)Î=7ÌoU†–ÒÁžŠÏ‘Yé5ƒãà‘ëÇ …ž^\€¹à"ö‘‰ÔµªªJ’ÝÒÂíG1ó¤\žÝo×#•›¨å\Jó3•88¡»Ëç•™-{€‘c(±Ù±¤€Wî‘ZÍmO»1r§¡Ç΢±ÈÎI4¢`¼©2¼±©ËÈÇ^-®¸Kg˜ÖQ€N7×Y@ô©Ä}a}ïÞûnzÊÎ'ïæ,KþMUž·TDd6Ì~rc—â»ýÂâPUQ±õRBoˆ,€V2v ÏÜ™å5N1*&ç¼±4(HYv„0lÒŽ0d›–÷¶ì”Ô_Mã›Ö«Ûžñ 3`ç̲Ðð ª? ‚é‡]€€þÖÜ0ÿ_HQ êjœkn˜ÿgT"Sc+AýGó, P½ágoÀ@h@>½o]«ª*E@$j’Ý¿ ÝÏÆË߯ŽÒ¥O™ JܤÔ[&m.ö¤ÍÑõ ¹ òàÎñ¬§x¥ YFi¨wÉm€¶E-1à"×`Èze·<¦W4 ¬Ø/à¥ì,±Ý¦úo€R(y1Ãõœæba>Ê—æÛá=Õ¹Šâ20lÇ- Ú@JfHÓ€”}ÞP¤®Ç0”Ú •ŒTQ J  Ë68CR$¬@ C€Ê‚!µH%¼0 `ãˆ(’Å:à0pXga¾µ5Ákb ûXŒýz`,¼±î ÆtŠ ÂEÀ½ë ;¢LÞÆÜ¸Üÿ$ †*u+¶97:ð?Q‰lÕêSüÜÝ0}8uªÝOñ­ë N¨*Kɤ¤&¤²þìß5Gíd/-RÔ'WrÐë÷ïr3ì”P(ÂD#¨FÑÿˆQÜ;Ô ß¹ÞÄRaf</ •)lŒ‚nÚÈ£ZÙGA%¬dö#@Ó0~®ºä–Û»Ñá ›E»{þ„ÝB ®f´ «`æÖ–Ýôì±=Ï\/H¤’ÿOžñ·…P[§ÒÓ8 ³ïØVÆÙ‘{ÝjY0rh€c€t*A–Ãh7²˜>Š…-)5Û‚P«¨, ,¿mp\ž³yÍüµuàÎ ¼}oöÃ`f˜вLU=yivÒ%ÝH  ~Ç–ù÷ Á.[‘Õg¼sn˜ùçJ®¤fAý?@œÚÔî‚¢ò·'#’‰« v_aª¡)ª*•WüÞÍÞf;œ«å{„¼W¦o†ÎrRúfš•W8¨_™_Ý1ªFbþ¦hQkÉ =›Mo†A†èFXÞ!£6A‹,ç)4Ó…’ýæ&.^‰™¨Á‘1}%H‘Ñ0÷ê}G)b²"°ÿ¼Ÿ Ì$´Œ/çhuÙ'U2T騬S1¥êþÔ’ƒ¿ÒF01‚®¹j< ËS@ÛÛQ¨¢8ŠÐFš¤sd*,Ρ`ÁÆ¥Ëí¸›Øy¸OËØÃo­ $OQø(| š6á¾¶>ô'2#fmeC½ŠoÎ rÿ\B¢5åÖâ ê§ø)Ë}“%Žêœj8ÊøNjˆ~Ê;¿ëbØ N{úÀ [ÒŠZUM•b’€}Z£Éî²·§éš»Ûì½_¦®+­‰M‚|ÁϦâ…;Bþd˜ÄPŸ•f»3VëíÜ S!¨tD<Ê6vÏ’—ËhŸò0y7n#±z-Eæè2o?=`BÀžþ4Î ºÛñRÂàhûvÌÄ2i09Y ]bß»ûçÉj@!–"H8beÇ‹Ì4ý 䤹–¾„Ð2€É„Œ\(vTX.$£¬A¶Ä*€X»ç7ÜXÿþWøm`€9› Ë<ÕN.Üb¯ˆa­ž$L“ÐÅ ÐNà&H€>§Êÿ3]b;‚š1™Ïý7Ê Ts¨ÏðB•Ñžî]ÚÚ·‡7X‹ò<¾à6õ6Ú°U¥h)%HøjÃØµtüµ!ÏN¯:ô7fëŒNªËÁ-G³9C(Wúãoög£®íº½ÞÃÄ<ÀX”’®Ý¸c9oç=ÏfûÙ› äsƳι‘ùüfq¾Ž èkyÛõ‘àª"qVxk:?õ±è;¦ó­÷_YytÞ®êžõÓíÿ=÷ Ùeõ¿€P €b DÀ÷ó;ìd €\Xbæ*•³ )FÙˆcm¬Á„ãoxéÂPèH0p!l‡±Ö.à-;ëqÌ25õÀl½ÁoݱÉS`ÃýŸ$Xn(Ç­1_ À8¤ÛHSáð ÞÖÜ„Áÿ‰ d¬¥PSÌ[n$øÇ‡ ±ŽG•®LMñ ÈÚ¢Yó8øª‡||õ°ù>Æ_—vJHªK€Šayß§Ékí=kTËØÌGîXï­^·z/&­ˆ %Ö<;¢vYwì0GÔ~¤0€Ô¯›}í@ënTQMHñÑÙS©%ë7””$÷F·ßNLk!j2ÀªÈIrº¬¨ŒmBÒ9¦gÐ?@ÊA’Dlï·´Œ¤H`ÇE¹Ú±›U€ ˜HÀ#ÑØîp@BcÐB‹i5T8\@ã¢&†hI¨°Tp `€å`%×ö§ÚãveV# àˆÂË‹X÷Üøì?Š ¡)ê¬ØæÜøÜ¿A2C™P3>ƒÂt…1ë} àv[ 1è]€Ügë¶¥ZÇ% ’|t½w3$"$ üͤóBÏ[ Àq8««Z÷Ÿ[ ]ù€¤V {Ç•q* +¿äÓÙÕjy»J¿ÔÄR<ýa;P18Ç\nÛ²UD¬mE²\1ÓPã4VÖÊp4¶ '¹œ\a›EUœ…ZÚ`¨¢ÊB„„Òt) €ÐŠea0È.­¤œ-”`ä †° ³laL(#(&HƒABDˆji¯ ²Œ 0™@ Ë„Wžp°6€ƒÀ¹7$@^÷ÜHnó iBÝŠuÏ r‚a’*×ú)~ C³ú™ÓµC¨ÇUPfyÎâ‚%÷­´yUef€¦¥iKC1×èƒjJ»f.ul —»õw›ˆà 'S)ø@0 ¨”K‹DÄG”Õ¥²g4p65ãá—c§’=û±T!X7…²áW¿P ¶«óÊMðÜ–¹„Œ„õ5Q+¤gée”Ù‘k9Zpvu5×|üt™ÜgäÐ(€šœ>NËbd¯Q›d·Cl#c­¤¡*ÂJ¡$!‚Õ¢17Ú &Ѭ'DgF=#ŠØ4  4—,,àÀ ‚¢Î: à÷ÜØàæ)’JêV܃nûǶ¦DQ jŠßaZIïÎ5øBzi@îÛœQ+€d@D‚r\çZ7´_¤FT'Ǫñ‘6ª¿öÞ§ÑY~†Û #_n¾!›` (¨oƀǥ½|Ù‡Õ§ÑpÏ!êCköU«Éûºê¨Nª†;–Ö–Üs·”rÑÕpµ90 £ÕQw)Ø Äzï;¯ì ‡SÎ1zâë8-L´¿[0éÆHÊEíB0Â%x°ô§z?Hˇ 0ÀŒßl#Ê·AÍ6F "FA¢!,àN` çÜhöŸ„’PSìƒ þñÍ „’P3~€rbšœÕy=—Å!ëiĉ}ßóé}Šxq,‚„Àjâ-ÿãtNåí”Qöæ«^ZÆþƒ6LûöšÙwÈŒNÐÍß› hâ ¶4ç6G€ Ë,:†ÝþÂOÈS3ž~pN#ûL>vÞv(“0Ôg Í~4džM­¯æ8LÔUŶò€Hû²Õ ̨€øôÙ @%=Ç]m:ÔA£DÄ+[[óÉDUvoÏZ7‚Î0bèHJ†yãr@Í+Kv­‚"·X'íB£wa ‚ÉX0ÐIÔ¼.p@2ÆñÃŒƒ™Õ2@ÓÄ 1Àj phZõh7ôÀâÅÀ‰X©àž–ùoWI4 ê§XÝ0û?«JBMñð9טM âœz¨¿¹çkgÅ\#Œ„T% ÈЄHË©µ³W>dÿR?óÍÝçnl=%¹W™,¸F´5<ˆG7C®ç §xë×ÔfÕöHªšÌ̹QA3ŠhLÖ7¾&@AXY÷®¶Œ²0Çæç”‘½vÍå´bžVv§´ +`N3'å®êI˜hiÆ(è‰kщœQhР礔h×Úa ¤ò¥a¶“I§ @’PŠ:d@Â`ÅâÅïLG` à‡ÿ{U©«¨2Pa‡€à‡Ç{ûðØóqà|<à<Üy qŒ«þ÷Ìgþ¹Ü"4—4L½Š{ÐáÙÿe)HSÉ¡~ЦW¶ç9Zuë÷t¼ŠÉôb?>Þòáá†cªÊR±¯ =´qtÇd‚sÖX=<[dê@ªç}_¹Õv°îíVÀ\—âŽ{_uÕ×ЇC^-³©¢}i’.Ë?ºQDÂ8ûyH_v­*G‘Õ;I1qi†ÕeCÂÑ'ôŒ³‘“ öÒ"ƒ~ïªQ’,P”Œ;ß©D L#~oG, –° .ÿ41H!´ƒRR€Ú²…³È=b+Bª.5‘–¿†‘H…a¥¹ C'ìL0à,,g-ÃlâÞˆñ›† L `€Cè@4y¸CGçܸðǃ BA“<è0û/!¡µhnRœúÿ7Î9hïÛ]£‘©ª » ¨Â!J#±yZ'aöÒTDm^ôA˜mìòö¼-Åí€5Ðì“5 \:HóS±5£LìWÑC¯ãÁ:™†oƒ `±Aä»±¯CÂpèlÜ‹–`ü}V…™kë:p#ýèÂ’{€Œß—†ÁÙf­‘ð¥ Õ2ßÁÃÄXX¢ï´Pƒ:f&7ã̱Q,•˧i±ÐË+°I XÄDÐZÏ‹<‡œ¦ìáHÈ&  ì¤Î6¨P1€-(ЄE·00ฆoÆ×§<ðãÀÄoY0LpâFƒà11OggSÀ³&¡€cVOãòfÿ%ÿ ÿ'ÿ ÿÿÿÿÿ(ÿÿÿ+ÿ ÿ!ÿþçÌòÿ- ´ŽÚœÒŽº}ÑaÜÿR@Uê3>ƒŒÚjILðÞzC|*Á;‹Ø÷9:œ˜•0ª*S$ rDMá`òN$ Q}…£¾,P"¥3~ˆÏݯi”¹‡Âõ¡òÌF¡.óEZÝaê¬öTá¤V³ CØFtUO¿¦@boÅ8ä²\ØZÌxGyF%CzgäýÿŸZl<µlVú²®gWq1-ƒ œçVÄPí\ «Ñ€ú$9%Ý£aމÑ,"¹„ˆA¶ÉS£T( ›ãÆï¡eÍ„Ó Õ}_Ž ` ²Å )™à8cƒÃNÿÝ=à;{ÅÆ”uEÀ¸cyžó`F1Hw4ù@`Þ×Ìóÿ{³ºšf 5Å¿g^ùŸS=ô]‚#×­ø¢¶ö¨šä)]Ï'Q{[˜ˆ Ðí Þ·f UUfATž+…­^t›ÙÍà³7Ézœe{4l¨¿ÔöÀçT› €QTÈ¢Ÿ_<…6‡×™5õëäñÝçrÐO¹Mâà¢Õ@s‡(=?VË’hr›h$Ÿ<‚²{\é`'4)Xòü÷J1LÝÑפã2@±îØïTRÐE¿ãhTP¥YŠx_Þš!°Gɬ!s}«0F¤v± 5¬›íOÆd0‡·†…AÙ°‚fE 6BZ‹¤ÖÃ)|â°, Ëc—›ž€Ë4,˜pï fˆ,I‘œ6;8 Pž¶Ü„Ìÿ N %¡¦˜¶ÜÄìÿ‰:‘”D­)þ®w#n,2¥qùŠå €Üs›[Ë”tªJÑ*I€P%r;—8‡<D9ÕÒ¤8ˆdÿï’ˆs½lÔßlxs¸X šgÝÝŸ,[N×P»‡—Ëë$߬ªÚ¾„¸â²©1°BJRFÇX»E£u¸™Ã^ tõ!"ý007@@ ®X·ØÊ:p°ŸÖ&«-pðùé€eᘄ¤CL ÉÈ—F“!*¦è’¸ºµ~ÝHø_2”¡,hRçÜXø_’Pšr ñddYDF\-WFQdí #ÊqÀ"¶ £ 'Ri­cÊʈ¦q͘»“L2¶ÏqÐRÏ«ŽÈ:‰Q¯¢dÊ ¨7«æjVãºîƒü½>RöH ¸KUUR$ò—ïÔ Š[y~¨ÙŠwTó%Wè@!t‰ŠÄå0f¾JBCj 2º½P6ÈH=Œ;ÄH,ØôÄ¥vªRö»§ÒJ°…*"„SìÎ$ÔWZˆè(„°ì=[:'ò`$@1P%øºªÊHÂ"’ÖÕ€–@b€b0 ÁéÈ—xJ¾þkdôo`þæÜHþo€ ºèP3Þ=‡çþn$¦©ÔñÖ“Dy\<-A/ßÃêdã‰AûÈ}Æ׉‘„(dèuº­ÕåçZQÍ0`BÈí?5„ºRo7½o‰1ÞUyvÈC•s°<½j¹Ο´’ ivˆLcØõ½‡(hÙñÐè!2‡( „-k[23J±X·Lqp,ž&ƒ« ž&NÙ㩎 H"€:8lljé'5†oK#´Fg¦ o&:lˆ0x\ @€÷€î‹í%ÖA,¡Ü0ÀšZ½Õ– ˆbøÍFà6„ˆÿ¢´T H(V÷É ƒÿ†ä‰ã*p©2Õ8î!BÑKB .öÕ/¼qˆnNîµCpp=e4ÌÙ šˆaÙzöR3J–rÞ2'³S± h1*”D‹ À¬Ö‹ÊB½Ì!°D Œ-—Gs‘%¾¥-Æ@Z`+lúÕêEß%Ý R>ktBx`$ …#Œ@¡Š«ÆŠ,X0„€£Q0иárM( 7î‘Àžç 6O2DÑPÊÒº÷žCÁÿ$“HSRjŠl¿­]¬!OTokÀzr—/h“‰Ø÷4 Ù:á–*3 Ô· kg55¾±R%Ÿ|Kõá¶“ÝÀ[“ºC˜yJE[›ÑzRRÓ{Æç´€@¦Jý³@5XÚ»Bé.–’:l*À#ÓÂÇñó_Í…ÅYͼL@CµPR à3Äwk öŒDѸ¹lBÎq5Å,m ë#>ªu–Ò:žÑK-P¦ýæ•"*ªÒc‘XèlR`Ý[YãU´±t¾ËÓ¹NÌ›eáÖ›b”퀀‡%Œ ô‰Êt†kæ' êªSc A”2 4ìÒ ’*Ïì ˜À$ +0–p  Œð îËðc¸ÿ0° ž<8 g„òpÜž¾çÌäþȈ¡U§1/š ÿ‘~\íêUü€0ÑŽúiÄdbb·¾sMsgœ£¼qÈ jf7 A ¥_[&¦ZU“ê˜ýâæ¨™Í«±K˜!Í™®OªÃ©Š2õY¦™èðôÃ'™­–âø'…TV¨¦îìf&# ê#6jIÏEÞkVJô¤SK¶V>"@\¨‹B CuC7â’X+#Ý*¥Õ-H=™ƒî™…¦¨žSR@R¤7Træ4÷˜S;ÁœdëEÆ EŸõaÞ½~ÓÝ~íŒvØ 12*Pˆh!,A"ÛEš´B* À8çÞ ~, Ïb<Àcx¿£ÀÞæÜ0÷_0í$âºï ƒ™ÍO›Z›#­ŸâàŽ¢EÐ@ïi˜]oŸ‘o£æ„8BUY% '+t‰ ÈèÒËÍ(H=•få`§ç1½©u•f&O¯ÄÏŒ(gÜ;‚²Ö­Ã„à Ðh$šÎÿõÚX÷ÔŠY.µÉTŒ²¯ó÷”<~wÀø||nÏšëý/ú3jALé2Vê…RU„¦„+–´Èštn Õä¸ç:"q„XrH¬vtÀå4 âÓt„˜¦Ò±åU¥$ VÝ3VHïŸDHô{ÖÄïŒïå *j!{ÏlÚd Ë R›&gO1Z4çà§&ª}~ãÞó¶ÿ(*,ìl;„¸’›èÓ8,ÞwG$ã4ÈBtk -žA.Wf€ÌŽ×± !b)çŽÖ""2ãDóû8—³È°>‘aþK€(KŒ€EÌÌ@O,ƒ V@ »ýœ@Œ… ,`À°†ŸÀh0` ag€‘Xª*H8U0À9Ø´c±†åÆv½uXŒaÓÂÂ,à êR! `í…öž·Rÿφ@Šf 5ŶæF³ÿW A“àÄÍý”ɶCq|Gæ¾é‰„b]™@~Zέž2ªªªª@%´œLÅ”¿Bkaj|ú}7O½¿xÏÓÍœ!äžÓ%ãƒî‚!eys耱ÑûÒö© z25‚‡zõ®ÐµDFò—v»‡¥9Z:RLOêÉø ¾üú€ H©È´OŠX"uØ|m(òÂçþN v×ÙXóhà®l6Òl6L›Ê¼®V6¼ Ĉgšà@ J 4X"tZ/÷ ±@`€DÊ ÃÂp¬ѳ…À7€Mcw˜™á–€‡Ï»vw€ý*ɸ4¸ŠÑ±ófÅqiªþ·Ü0óWš*êUÜcn˜ù/&„¤]˜‚¨Ÿâim«…Å×}›s /„µª*¥LgBˆ%í¦l_-‹šµnÀ<®O³ZìŒ÷Ѿý¡Cö–V‰×½†¡ºßÌœ!5©¬¤˜Iâ©ú˜­BØx’Ì(*ëw¥dE© eéª ’¶A¯X ¦ED@Õªf"ÀY&wU¶¢ŠI $°$Þ=£ÕhÛHÔ´C"8\bë€(©!ž$V dÁˆ¨ÐØ|”·Äá0D(@ ¦ ¥ìŠ5"…×P90+`–Á-Î:ÇÝÅ^®‹Â¿p¬ãhÕr©!K‡Õ )בŠ›¤yÖ°OggSÀï&¡€cW®"1ÿ ÿÿÿÿ#ÿ+ÿ!ÿÿ+ÿ+ÿ*ÿÿÿ ÿžçÜ ü‹R´¶‰ú)Ö=7šù7B2IéPSü´ˆYLN‚hß~€\Ø÷9¢B¸âP%$™€ ¡ŒOzìçz„ØSö^'wÅna5"`¢æ•!g.i'ë@`,pC_ÇS÷6Uü ¶ÍD ÷É=ÊÃòì¶@W[BºÏaÍÈ`Š(`.S!pl£·8RŸAW6qÚ’¤y׈Hƒœ Œ1X® B€Ó 0ec-@Mø+Î]“‡HÐFbÀIgÓ Àû  Uƨ@X%ˆ &I6‚ئ2B€Ð¡!rX.xŽsîÀ;ž;€š{ à€=~מù•d„¡Úš1ð9ÀÿÙ ìjW)EÔŠÀM*y”ONYœÏ­šu®Î/ ¤qjbŽú  !Ž‚H >‘˜C7—s§ÔFìÜ>£¹½ä(ÿ•öש€NÐ"Z ªO ç|dØ-˜xÎÌ…Áþâ@ŒR9CD·FWuëLdYmÐF}êU›ÀI”еñ㦠P‘w7/áK˜8VÀ3sE‘,±^êÀ@ì€Ì5+Ö M€hĺǓZñbÂvðì…¡„– »!*WcÛ <4d4™´3Òhpd²‹Àyà¥À# ‚¾×üDh¹ÕD¨¦XÍñ›/»(5ã3E%#8<¸^ˆ£"û>gë æ$\ABL’À¨3½mÞ[|`Óœ¨Ü'.u¿1QB•%^µîIòµÖÝ5>©†”/à¶g¢>0Û²—hÛYa a¹¾ï©ÀSÇÇö^‡Äœ×û Õè& 1;¨Âج®³í ÉÈ^<}!)EwÅ€Óˆ(ç†îò¬¬ˆÈ €ä¦òbŠNRHž%‡j(¢^)Âp•Áز2€DûtúšU VŒ@.øê“ÈF#lƒ4°Òx‘*ÐèÅòx³ààÀÀƒj2^çÜ0³yŒ ¥¶êSÌ{nÔú/A…õWüʼnª*•P㯷óœék"èâ³ú×{IÝ©0(@ìy.¦Ö&)UÎó…ýNmôA“ËÙuóð†áßg£=³µÐ´ŠsQ¸v°T8%Îz áünu`}{H7$AXdÐHf;¤e}4ì)Ó6µº–)€Z)ÇK€ 54§ŠEÅ+óÎÓGÙûü(ÂRD2¨bbÀ‘U¯„„h0b0Ëœcl€U© fé VÁÈ(80 ¨€‡‹1;ññq>?y,Ï`ÜcÎà=ø<âÏ´â8®B“À¥ˆ¨o‚>×øMHèJy uæžC‰HkcI?êSüœºÒñãÖÉKÈvý;€¥Z¸-@Ìmd¾1½SU•@% ’Î)ê8í#Ê›mïaÑûZ¢áñ](ØÿÌÔIC>}-PÔWê‘Ð÷iP‚A T ;M Hkp˜ pZÀˆ 8+sú”Gµ´"¦¡¿7ˆ% @1_rC=jS»¦+ÿ×@(æ|W–vØ#°Y ŧö±Ãýƾ©¢dý'@â”2±ÏÎâ,ãö‚Àm#B¦ ÈáM&¸6iAXaQ\mYX‚ 0ˆÆ¸ñŠd°œ|1…yÁï¼]í;à±ÆÀpð CBQ¸¹‚:À#x×ÜÈà?£†‘šuh2Ý ÿ_„$¦* õSü¼¯[›hkNpô/XbŽ!ŠAzWU¥ T@$„‘ úÓž‰—–§ð¾^¾ö'ô›iiKn®0B9‡àøgAT)7ëJž(ø1í¹5Ò ‘§!Íζtœ1Mœ`NC¡M\•¼Ï. JlóºÒƒ}ænrw`9Ÿõø¸G$ã>rp“†õKg;KÒ”dç}P?i¨V!©ÐÓ†@& ðì¥é¢Ôo¯P‚`зÀ'‡×ƒm§Ã`¤Tˆ­ ‹B+ƒCÒ€FX6 È¶í«9 Àa 0좬ŀåbyÀ,Ü (ÝVxŸP R~çÜ ó?AJ‡Æ¼èpûß ­-ÁžŠ€»’ìøŽáÖI!%DI@¦€RÑ»Ñ1$6¦äú;çØ?~zpM\ä4dó„Ìøóð<(aÏbœÌÒ@Ôê¤ %I>Ñqp•'o5ºnÞ°œ¤‚Ð?q. "Ä @u­‘âAùjÌ?u—ý D,È6Ò2  ÎJ-î\D\ÓÐ8¼i{ŽÙðºL“’_©@ Lð \ˆH>ö¢(ôÈĽÂ6dL{ÀI&XdXev@,€@  =x3³$%ÀJ€gcð°” ìÀÛ©?[õ‹…á{ëÔ+@QHx¤ çÜ`ðßHA¤Ð êV¼‹Ëþc¦šƒ½Ÿ¨¬È”u^×zB±o@bŸ£m£¡ª, )›Nn6\!Ìžë'ì %HÙÁQO²SüöúI äÀ‚ôJ¿ñM\Œ¿/s¢¬sÇ¿5uÕÿ·¿›!bžÄ=¸”Ž]Ç-c·ŠÅox8Ô(º\¦t"ˆq¬ë"‰iæžìÎJ¦È„ê÷V³KäTgB4ÛÎai² ÁhRçé°–É °Ü9b0VN[!; $‰Ecº™EȶqÌj"b,ƒ1¬€m€˜º½:D X «(¡] 08ËÉòõ†ÍïÙò³aÎÁ­)°ØÅø`WɤãS ^×Êü3­¶*Åi¼{ ÿ'¡ŠCýŸÖ¡6j÷ˆêx?qÿ.9ùˆÈ/@3§5Bz UUÀ÷q'Vl)^)¨CpN$I zé8”ossyéÊwÉ#ß™^Âj^Èb[جñu|Œy)‹K§oXC’¹¥%ùZén&¦Y<ÀÊmë«Õç~ižqbÙÿ°“Ù \`öõ™“˜¸Iæí¸Ñ–ü#ˆ€rÍñØÛLV3¦·èKǽþþW£J$òÝ$è½»ˆ,Û"çdëÎÌ¢’¨zEC–H€¥‘qDp„lM)ʄ̅¬Á …œ Œ+BíyHáÀ’¦)¸Á²ó`kÊ`ùݰ0+Xf@6$±€$\*‚r '¾·Ü0üŸxc¨Ô¡>Å:ç†áÿÄ„ÖRP?ãD¿Ö“;µL‘9oå‚Ü7^Ýû6ÚºÃÕªªRJ™OÝñÞŽ7&KÚn²šÒ)Nwñó+¸i* ÙyÈÈw⫳¡#:ŒjUd3¥a:jy'iTÄwIÎn”áó Œ¼/Àþ i‹Rm °Ãb/ç Aéa´,Ù&b{sº[Mý˜~ȼºOlöÙåîEHQSåÃ@»gÓŒÝ4ŠžE„¶'^ÀÚOX^‘Z#F’ñ=•²õ<]4å*À]$Bc™•V*zAˆ({r¨.Zà„qFQ ‡«í ãqpìNq‰ERÜÇ·c†5îø8Ï7÷oP„€FÆP¤œ„ 8 ~ ÔßÁ"jó(°—±0Ú¿£™j¦ÂØKñ"[QFDæÉŠÈyKô¾lByÌPNÍ̉¬†’Ö_¾Åìs¡©›ùqZÈû0º}@A/n^gñú³U_ë'²yû)A&&M@ýÙõîN}M¬˜–µPÚtÜd T¯¦Òôö'~"ÖýR"ÎÔ[0.U²(OK@¯‹JÃ`ÂìøAÏÁ8'qæaÊØMTg~í-Ocű-%±0”C‚L‰˜&T1Y–äF•$r÷ ÂÔ²bf2pfX%Ì ·]NOB`§Œ-¢Bñ°³(€†›;w OÇ>8 Ý0ÿ'‚Jìi¬“þÄH¢©V`oŠ€»C,Èý‚%’YQ',ž* D¨ à±µ·„.Ì´¶*x¢i¯²¾šœØj¨ªˆcÇð@6¶+š—s Ä ­ñ4ffà×d/‰4È{vÍ’¾Dýˆ´š®÷Ï'5mL|³ý{×PäÌœ€ö;·*õ•­A””íÑ UÆØ"¬PZÍd ¤/mFf§Ñ„]Mû‚«ô “Ëhƒ.Úzb`@@ÕQÈ!AÝmÀaˆˆpÂF81QTØ€vgÈô;ˆSž R!p•k–M»5ÌýÞp,¨Ë€žÊþMI¤h7Ë€ú+îI‡eþë„æéPÅÈŒ‰ í(cú*Ù̳ pêË÷)â'ö#ÎÛwï;2šRA¨Ù=ä““S˜„ïÃØ¯.ô`3êË/¯ÒZS–ëÕAc®Nº6ØÌ¼]âTº¯}Öb÷'`rÖê(šÛo¿3õÛN`<¶<ŒÛuÎAv:A¡E—ïÀx V“if}º/*yÚ)F€·wì@²pÑ×ÛÁx—…'˜‰Ñ‹ ±¡+ "nŽÛð7c…ƒ¨‰²3.„bÀPÙ]\W§”ñnZH f@@¼Ã¾Á/Þß;ØÊpf0Ͱ ~þi ˆúç¤fÿHRÍ¢þŠÏ MFL+£2”pj?`NïÄÄFH•š·;ö­IH hæ 6µtÒ—­uìçk¨oΕ›µEzy²BÓ’áF…1AoÌîuþÄ9ÿá–×5æ£ME™cãBãcJiZì%M-Ô ^\¿YTí&£u>ô÷‡“鹤‚,Íw‡€\4+›äºN ²2*p>^‚ÍûÏ#E;‚ˆÑD1ýÁ¦¤o¾úB݈jŒÅ@p`ãoCBBl†¢\PŽ¡$Q2ŠÀ)VZÁv¼·­&P²|ëÚÏ<%à „RÃÜ–gp7 ›°€ŒóÔã<OggSÀ+&¡€cXhg‚/ÿÿÿ/ÿ7ÿ1ÿ6ÿ>ÿÿ ÿÿÿÿÿÿ%^Ý ÷Ï«$tQ%¡^Å<éPæ?NØßª«!…±§â`2d9oEL}ç]ß^(Î4`ÛsQG) eBT B»6V¾33³[~f|/´­6Áö³B®ùóºS$„f±‰búÖ§»gXc-ÓÝznÙ‰ŽÅ3{`5s*àþ3HD³GÒzž)?H¾¬Éq?œÙ}çH06â|ü§¢Ð§R€aŸ+ Œ„_¯5°%ŽÄõ;6Ö>´½St4¹q?ÜÂõtt¤å­ IYQÔ~éúŽs·¤?àÂ1XðññBÎD›¼ÊMÊì]­ÕIJ2k€v+«6À‚7†CYH\9´¨çÕo¿ÅÇ  ƒ‘/@âþöÜhö‰„¦‘hu+¾I7šý_~¨B°§ñp•¿õ@òÙ†8®WU% ’€ȲuF-Þòa’Y;jÏJù Þ;€Ñ•––žezžÝàéêÛ½þJèPYË;ïJÜû3ø"·ó¶êh.cÚ¥C­ŸGK4b²]ÿ›-–rìÁ¬}NûDâ@}•Îy71™+¾Ú¡JëÁ@)Ò£"=dæRm2{%ámW‡Sqc8çÍ"¥ÐZ׫IäÐYX3œ€H`•”Ÿ+Én€ 2"ÆZ€@FÖ-À‚)ìxÆ›6f]03+S³nß/³V0hYp`ñàˆÀ.^×Ü û¿ÆA‚ƺèPþŸàæ‡ÆB+Ôßø (G#êÜñ4X[qätÛö­mTªJKÀ¤è´°F5ó€~×·ùZ¨Û0ÄVíÂ8?æÑ%TÿMœÖž§h˜Œ‡ŒoܿڂìÇæšlÀœŠÁ&5(Fx •IQšTfM”Š_saèÜZ6&º\gW÷a°¿­DÑ €¾cŒ˜CÕ'<è—/ 6`ñóëE,l €µwSóTMS‹?ó4ËŽÌÈÙnçg»ÜÍ2WÈÇ;æ)íØïvë4 h€Œ“’b•”ÀcA€+€‹|­K…4³ ˆ"‹m`†õðÓÆâ¦ >f·[kز  x‚mÀƒ$€×ÜHö'” Fâ¸~Š{ÐÜÿÐÜü UõW|¡ÌÊõ2Uï«6šX¨a^€ëê,ß×9¬N,´Ê¤ iÝÙ´í‚M‘•¨ ½¦ô‚Ür »F,˜öÊ£x“ ˆuúù»:kF ^¿”—@±Z©VÐñU ¥‹LgG·î2cÄ€ýZ×ÔU$Æ ZðE£ åyoVDUªtó»).ƶçÙ]åç3£®@Ö?SÄM ·™È›48Øè3»ÂÔü:ɈµKVXÅúólHe“K©“+˜@+…À{°òxhW±tG@…Q´ DÊGÆœPðS`9ÐlÏ<–? ª`0•ç¼uxÔY55$i|€)ž:†Á“U‡FbxA€^×Ü0ó¿£’ c&Ô«øç°þ×]%Y‡€«âè_€2 ˆ­MåЦª.Å$ áÈ” ÜßpÑ•>ÙX0 ðcAQ-•!—Ðt,¥ÕIHA`4.@­g0ÑFÔ"Å—ëqÃ4/cbr–¤¨ MÞÌMZß_ÿÝôtJV=ÝØ(^gBú¶±C€PTy–ç÷=ჇN¿Ú&2‡2‡ÚIýY‘4hع„{~hOVfu-”>Že€µë©Í ¡krÈcÌÇ} bò'ÇÊI£­… ÈÀlpŒ@µR)@Œ³NWÓt ÜÀ ö¸ƒ÷(Þ®7\Ý].Þá8vù8,0Tš5sÞ`ç=”&$þÆÜHîÿiª$4Ö9‡gþÒRãphüˆÈû¢UTA¼ñ~ÍY°[Àê”Pm[ÛÌIDUU©J€L° íÿŒ?þTð?»óŠåçÕSz4­I²ß›ÁôÎÝîý.»§zÖDu»½Ìf%#$#¾Ñ§™5å|ݱڼEô<ÿ˜ÔE~Â?ÇçÎÀ’p'Ù 2”ª cyîº1 BÀ×Ï`TcÑ"8ll°Hn&0BÇr‡7 ìïðîßxppW—Á߸»gÀ@À¾eûž/¢ö€KëÅ"dà%¸D °N ž†ÜH’ŠCÍx¶ÜXöÿPjŠÏ@¬vã22N¸&¸Ï€êÔùÖpÃÂTUMR$3´ßútÔ=À:èø:o'Ûñ|&¬Ÿ/uö¤Õw>„@).›+á&ït¶6ÔQhÆ2滆ðúïŸù®y>ãe~Åë{)Žn†DðQÛÛ7Å€öƒÃÛ,-ÂjLm_xw¹ñ¤9hm<¤…â[—îD]âÈvoÄE¬Ãá¾Ë 1ƒ`hS³iå3à2²ýÉ—Ô9ø€"À»Yô° Ð Ž ³~”« 7;¢¨òÝR ñc„¡kK‹È’ª9E…©@ ’T8_ó€7ðöYÞq`hƒ1p€¬ è†Ì: B)襸 ôL'%|›^$…‘À^çÜ0ûo„$\UºBõë æÿD¸*ÔOñ 8Q”+¢(ÑBïédn!¤bl3³¶êÕB™b€U¹®«‹Ú`£]âƒÎcH¬…e¶ µJyo‹ñ–­®Xó¶˜j=2©ø¢_9ª† Ø-1оƒ)±Üä4ýe)¨q*"(RÂúL­´‹z1f<®êë@Sd±#.å”肤BP¡ÁF&Š ‰°ÃÐ& ÃÐl#AÙx2B’=aÐÜ¢ {ûF„`°mÇ‚ˆ^`Æ*ö‰d¶ ¼ó®níÊ…¤@ Ûœƒb?%(¾w~c‹et‚ .CQP˜GÝö „"L¹s@(ߢèl\5 $:iž2äá.tB¨LŠ`e `Ñ M#jD K̬2±Òûz°ˆU X¢Þ&y¨$d°@it#iµ Iˆ¥Oä·ä=L(&™èˆf" -°Ð…!ÑØ´›Bà ? €Á-Ž,°À@@ ->ÝHö¿Õ"¶¦{ó¤fÿ±} „ öTüÜÙòbiHÝO€{›¾Ã8¡ªª *! @ô’óãb¦²è ’ýíM˜¿Øš-2F~s8¯Î:"É8«¹‚ÁI5]Äúæ[ï)¹¨tvˆ­+¿‡`TÌ~•@؆ÚÝ(¤!Ôº iQÑ¥¸å°‡œ"0`=]³Mí ªâE‘i`´€j0b@!hE‹Ý–ˆ¡&¢ªp4˶ 2K‚%ºY1ǥĆ@ˆ ‚¬Dýý¹B@ ?"kihvJ„t Ë€'&òÀ þÔÁöØ3Ž€gy ø>Ý »y BµT {*ÎI7Èlž0ˆ®Šƒ=1m«¦duÊ4퇛úëuÞSÊy@ËÐZ/ä~4•KLUUI@Lh'92ŠN¨8;u‡„Í·&ãJɨ=“¨}"z/ºÍûµÒn)\Æ¡šy¾ò£$J@§Fªñ£xpQûNì¤òòÑ#]v¶AFµî„¥›”ÑpPmÚ¥ûöH'¥SÓ`¢0}ec+`1WŒfæ¦á6ë£& ¹#è&*$P©À ‰Ö àŸˆX³òušãM¢¢žd! 5"€¢U@„&xããïï™:æçÛLÀ;Þ þyJ‚=oÒæþUì¥ø¸c-€Ê¹3 ö|ÌÌ»tSUf2¹ è_÷8ôt° hvqw†/6½ÆO®õ@P_ˆÄ‡ç(åB´ ¾±è b¶r»zN§]ñJßѹ^6”½&5‘Ñë@ ˆMÇíó+°¨éacM}É=Œ›yr©¢½î}`à¡ :м«ª¨Åš—Ü?Àl»kjþÐñ>SWíò0YŒ;¾/ç—aŽ[Ö&še[óØÉ  A B‹²Ã{•Ž a ² dBÀ )6€ ø3À…¸Í;¼Xkjúù‚(Ï¡Ž ü@¼™ƒOggSÀg&¡€cYÙìOÿÿ ÿ1ÿ!ÿ ÿÿÿ#ÿÿ%ÿ*ÿÿÿ*ÿ¾Ýøüÿ$B%{*®I7nà~¨â`OÃ(bZ{~B¾ "sâôëàÚ§ïl-sì6·9œˆ·Rª*HÁRûHZQÇ2so“Jîr>¾6W”6þhHï»0nþU·fnmgÖ @žÈ Š&)rDUC¶J#e×òðj»*cCꪂï©Q± âÙ\4´ˆC4 yD€Z]%¾“X†íŠ‚¨\èkãCGŸvö}ƒ*‡¤¥ü’6‚Eðñ9|Dà¦Dš Z˜^€"0P‚ # `• LR ) aüàÇ0ÆY¯ï=ë±}áî}Þ³àÆz‡‘€>Ýh柩 ä ©öR|“n,÷Ï„C¨`OÃ3 R_–{àn2.¼`9&ŸÑi.1UU%$šàæîƒÝˆ’@¯×ì|‚7¿Sà¾móLrE½ £ƒ-þh€}ëw6ÏÌ bŒ·Ì‚YHgna¾ÖÜXæÿÐ.9rÝŠiÏËý@üH•õSüÜÝn‹¯Xà [Öú†ø5¥(P!Èý°îœ+Õ¾uP=|OJõxY˜ázm'ÆêÞi§ø áå±NQf.ñvÄâƒíuÛqÃtÝ£I0Þ–ƒ¶¸+. :Š©% Â04Vßd7E Äùò”³9WòÑw…èµ³ –ûš|7{0&?¯çG…ì6Zß/´Jµ³³~¼·xèÞB€™:Jñy ¥MóÜù&ÀÔÙƒ Æà XH Xò ,S" !Ô2 lä.¡0ˆØaŽì|¿Ãvm23yõÿ ¬»šI8lL]Ý}æë. ´ÀG^ÇÜhî߸ éª2U°§bœsãþ±h0¥«4•©Ÿâ±®`Jóñ%@½mŽF;(!"ÔT™#!.®ØýL6ítå,*‰v3¶Ï§Ã~¦÷e9]Ÿ0sp|v9YjŸw;ÛFù6]÷ì$ªÕÎ?N:³CuÂØ–Ö!¨©œŒÄþ¥¼ "ˆXûîßÃL,Ëkð."}õÒÑä¾!Å Õ™™r±)X¤©0&%”Q ¡|ñC<°áÝö‰Q“döt%µ?Ö{€±fì=sÚO ú-ü†­²%”áÝÈÀŸ(ŒX¦2uU¼‹n˜ùT Â„zØ”§&¶d2® ´§¹#AiÄx·9ÛQÚê˜I U5lF~”ø©ÍÉuNœ){•Ä6½ö7aÑØ€*w?YÌïäŠM¥Â?HK Ž4Hv¶ug7Š|ÿ˜é.¶ Zã…x÷ý1X£˜Ïw+UA¾]DAÄÐ܂ưPHq €lcɤlO¢ ƒzìEø4šiŒ Ô`'„1€…5P€-CËØ+%}X%À nJ ƒ€AȽ$à1ÝÀ†P$ ²‹ „4À@)0¾ÝØÐ¯ ª,¨O±-ºÑ¡?Á” MØ|›‘™9ý"(§½£@îùYK‡fªL†D7Ϲñˆ“i¹Öè®öá£WÜ™RS#fªxÚø_/j3Y||\/,ëFô:PAÃZÞ â øÁïw«60²É/ý¾Èƒ«jÊA€“]ÀéÂqDè÷{¨ ¢ŠàYÌ»ÖalD|œ1ù@ØUR·bµw¬Í$ÅÚ,jÓ$¢kë©A” Ý€-C¶ƨ °A¤0`X¸ o‰!`CAk!¬ºˆTm‰Nk0KEª0uM™à8€à(Pì”ÞöÜøìß ª-¨O±-º ù,.J‡&?€9‘&N•ê{Ò¬°j0*±m³~ ñY‡*3@²Ñ§YïÇnSOÒ¯ÕúþÝøŠ{í\YœKß7áù,œ¥Ø¯´xR>ؾ¶<÷€¬,ñ§_ë¬#•u'b5Pö…'·Žj#D}¨¿qeD¼JQÀ ê8Ùk" È 3&Q;~»_dŽ/†ÄŒ¶d:+×ÒD!tƒ³€ñÀIn­ha€Z™°…;@*Ø3‡¨ Æ4êùr !,œ*€™À€÷ï€Ç;À@1¤ (–ý#ö;ÔO1NºÑüæ)E¨V`o†g žTíb®O ðQ¶C ðp«”7ˆmvŒYóªÊ$ 4ž­vÒ]© FåçFNîH€í-½¾Ñ„¯¦rtÝ|äß²ëÕu—¦wi[À̤¾ˆì¢™-ÑÚ#ôm5´qÖÜæhIŒý¾µ*F©Ÿ6뜸ìç<×ɨb2ŒzÈ €Ö]ÍY5ÙÙ™ñEJÐ4Ž’74²ÁÐwÆåOA†Ì„0JðêÐs²èD@Ø`€B˜Ø"lcdh‚ˆH¸XP¼ÂÂŒA‹´<,¬…]ó5;¦Èà1Š3¼e%À#ÀÀþÝhî߸@¨P`/Ã[tãòÿ ŠPÉ¡þÆgnnÛ‡¹V ð¾YØÀ})ö=ƒr2¼ª*0ÜÑ_?¸d2né=å~4C1t“QXŒ“6ÅÿõÁuzÞ¨V§{£ßÖ•ã|ðÜ`4t#ÆXhÞ•Ø"³B„vSÉ>»eàâ½°º¡oA¡^ Lg*ø:}¨ÈdÃf3ªAD1l°¨ä¶vµ Á „B Ù•&@ÈÜM:†Ó$Z'zH2ë‘ma¬‰(„tJ‡Ê\­) [$ü@ÅÑ Ž@–´d!Œ48¸ó`A~¹7àmÿøçïÇÇy¼ ð`€„…À8*Á¾ÝHþw0U ì©Xݤ¡ÿ2×*õWüÜqÊ ‘BÞ€6 ½¦1f2®WU  ‰‘ g×]mð>ÑMã"˜ï o.òÅ5#<8ª¿>§¤Ó3 >,儌×LÑ´DŸM»c“b¨”(h('Ê6åó¥‹Åù '·m/=™€ŠŽ›ÐÎ89r[ÚP^i<ªh7‚f˜ÄSHÕ¦AlD2¬FÅP€XMbe2÷X1c°$ (vg„Œ ôÏ àú *- $:€‚¢Aj)d” ‚H@@¤Ôð‚`â ÕŠRêÀ`¬áÄÇ_Ëûz Ÿn›a€;„±ŒEÝ û7ÂTI°§btãsÿ¦ƒÔ¥RAýÿïú™U²-J}ñ"+ ö9;½ñ"Bª’ ™ôˆüqZ߯Ñxð䯔ö±ú¼¨ñ˜(Õ° 9 ¹È¢ÌÐ=|Y€‚èÐËNc‡'"DRÙŸc æàL–pA¹}Eµ‚l•܆ã1ëá!jègñ*&ôi×;VB±íC,EA50ëR²^±8¶šØÇâÌÖ^.Ãñ˜Ô‚À@¨Í•Ì:§j4¼ Å÷ÎÁ¬TX£¸‹™$;!pcx4X€á%âJ8¨`@ +bÂJ†ë2º¬ ¦@BX<(Z€5|`ø²,·å®˜ gp\À&( >ÝHð_‚ öT|‹n4ûo¡F= Ï@Öœ0W•×®l÷ è¾1,„WU™¼¹Ñ!— ˆ“ Šƒ3sÕf=³¾Ùú‘ð‘[”ôù™k‰Ó/=b °õœó:ŒŒP‹¯ËÒ¶°X§%óóÆV°Àée=*NMÍÁÏŸ {5j/¢Ýhà­¦ãÒe#Avu›dÌDѺÔUºFˆˆÐµöDy(væ>c ”îš=¥fé1yÓ€Œ n@&1„õUË6 È8›†Âà+‚ÀÈ ®ƒŸ 1Xˆ2F(@Ö4ðQÿÛòíwgÇ9À¨ÿïŽ>l$B»‘`/Å:éÁ?ƒD¨áPÅýæUœ86ÖR3í)RÝz^5Q}{Y qä&CLªWUfVä2íô!†.£ÙcnןiqåÐ_ˆ~'}HÉɤ¨z²ÑçÉÌAH{_Ò®J7àЖgfN1 ˆtØŸ`ÿ¾Ù€#V’]‰ôTøJŒ"ЧOSœbðjz}( ÎìR{‘ ¨öI¬â¤gºÉñcµ€"ˆ¨Ì)°N3)¤kÈQÁr«ØDñÞ@X­³iÒ½JGÚdÓ@ „P1 UÄЖ¡Šxð Ã[øãÎÂçá÷ƒ;ǰ8˜<Ç€GPþæÜ ø/„v)¡~ŠkÐfþ'¡Š >Åg$å]M8­q¸ ð.²zÙ÷>GG8”ªªJ–@$ûÁÛ?ü¼WûMÄ0äÈš3ÈL”.–¥¿OËñŽˆl{hö7Šr&×b DÉNß|_Q`m*!Ù¦ „X]gý8lY¤Ö.dø·F=m}ÁgÑŠzJJªt3ÉB1ß„JÀàÿþë{Û'9©ÀüvL=]0À îìirÝIíOçf×XªMÛ Ü!L‰À÷€TÒÿ >,j‚1D`¦"S ÀÍ6iI¹iAÚ ¨b à™1°gû9ì¨ç‡\ós»fð3O?xëÒŸ…‡ïÇá(Ȫ¾ÇÜ@ýo*XjtW©\®Oñ­¹qÙÿåÑÔºërîú? óÓó<™JIfûÇ&ªç,ÀîÞ‰&VSUUÉPÚˆïÑœíïàJ9ùij"^æxi}Øt»Á Þžè.¹@%)s¥ZUKrT`~ªc @ ]­H ÎU–µ$ q­ÀøC@Ç噸S0@Ù’rEÑ÷¶m—åT†¢¦V¯RÔB$ˆ4/ e; §SÈÜ·HZD7ŠH§€E®m'?¢X•ÍDhŸpÆmEvLÈx cÀ‚ÇïgŒÁ-eĺ·?žäçX؇ÔóbA"(¸x X}Ù`Ø„OggSÀ£&¡€cZ^ Úÿÿ ÿÿ'ÿ&ÿ"ÿ)ÿ ÿÿ3ÿ=ÿ/ÿÿÿ ÞöÜøü߸(jŠwÏ ‚?1FHÚ™PSüó~LJ¬iÕ"bßÏ‘1®½wì*@<Á".@œ1GǨ‘„˜ÅG³jše¾“»„c·_Kâšvå4ì§Ž™fÊ •Ø$Í)Ç0IFF…ŒÛ¸? ãé¤ßV#*R)DÈxKæ¥I2Ö <`㥦=¬ìH b7̪q°GÖ Öï ­€„£$b¹" 4]ØC¢&„~ €5K£š°Üˆ¼VÖOB€Ð‰² ¨V Z  , IH€­€’ÖbÈ›r" @`$”!Pݨõ79BQiB]碱þ¨4¡ñð”ãpx›`<ÿîÞžd(ƒ¯oH×7 ·9ÇpHå`®9F$ƒ,8ÿxwÞ­åÖeÝZµ'mõSˆM)ËâÆ¯ÁAE¾éÄ“"S >ë^÷ôb–¬ºÖD§eœñ+¯ªÐpvÚ· öBjƒxæFö·ÄïázNiÁbhEÅ€(QÂt¥PXh ªbˆsÑ2k Ù5L„ßÛAÜ „4xƒ21Zw Ú„¡`˜®"„ƒ'€5€"qáÈÂdæâ@Â^7P%C€ T¡ IâÃɰÖ¦W€P4àÞæÜ0ü¡Ô.© ^ãZtãÃÿ‚#´WPŸâà=*˜â€DÇÈkŬfø9R\ñªJ’L@ ’¥Çkzݽʋ*¾´QSÎ|üË M}¸ÿˆ’j›3P’”ýä_Û? å`R §ÞD—.óº03xkPyâŽ6ŸíÕÊÊ{W–͆† ÿ»jÁ‰ËWø~Òˆ,Xc\WKÆDJо?"„H=`A0ónG¿ ûã2@:út& ¤<½Dr–Ã6ð"[F²Á‘Y„’  ªX+ È~èð:¡"(ˆ°Ø’ †Ï(€àð€Ç8¨ çü‰•LYÚK¨×8ÝHæâŠPjŠÏ@E÷©ˆÃ[üfq`l®ç 8h´ó5i+fUUI‚˜ë_5ô߯ ˆë®ˆó¶^î e´SÅÓoÐÿx—{€ØLƒÇß wëDIxº{:2ªzu˜úv–²ªÈÆ›‡¸›Òdçh¨Îùq/ (×uv\ 9tnmënÒ…`aºÌE$ óñŒ3 Ô„Ö€ !†Ö¤b(Àœ‘ÀY$aJÎ]'%€ˆòàPKALe!R !Ø@$6H†X ~PPØÒš à0B° dÀÀàqð8ïòÁŽà@(° x>çü]tÑ.ÔgL{nÂà?CTìP¯âýšF¬~tó§ .wùiú<¾í}›~6EˆéUUÒ$àáv\o\kVd«>rpœ`=èÊ1‡©ýçSefŸ+zß 7 ù$ä ™#Õõ9¼áNÒóªS@§WÛÔXË#xµ‘XEŒ{T–‹nWEu_‹€˜$Ñ©˜ Ѓ‚a¥WA$.€Àý{cB$ ›n]‰,!z ]îM¼A "òv£.la4Vh°°Ð s@¦ ZÉf°U¨Pæ£_"V‘þæpy“…Z2y²* ¿»f:I1« ÖФ` ç¦4$º´ÊL @9 P¬Á B €V€ex)ëàqֺăãÓ}2ørç>x×s8Îñ@œÞöÜHöŸÁ I%‡úÛ¢ÃþZˆ«K’¸>ÅÀÓ!—Ú]ZïÒú„¹í´.@÷ ¤È—Ó³0U%•‰ QÍ›íu6¾—Ÿkö´+CÀMF¸~êe¥µA_n?¯2@_³Î’H@ÐÜ å¾`DOˆL1Ž)o¢Óˆ!WX9n4IU“âÓŸL¡5Üðnœ—µ«'/¬i!Û•xÚÝ„¡µ êoL“nüÀÿ÷¢Hê3<#ð485òèy€÷…u$À>‰sºéï{ÞÕ{‡ªƒªR$€¯ù¤!GÁ4{š€¨hÚïÉÍ>9ÎÈ”\ªø ñ¿g*½ÁU1ènV¢N !ˆ<ò¡Þ@Øe1¯^y¼éjuçxó9`à³agû"…>ã0àµj-‰þLÅÆ@êB5h"â„®û¬*†HL¼p†< LBlLTÖ¦ ?œºñìhª5£bذÄ3~KÀlÇ]0^cìÎbìP õ–‹ð‰à‘XP€mC˜ Ñ‚)¬Ín”¬î…kÖ@> –X9þ\á×[ûÎá?ßûè?ÖYDj€Ó~ÝÄüÿD8¤¨äPÅ3é& ûŸxAhB¨~Š@585£øL]áÄÉg$ÆÕ;š€Î Û¾ÏÙT®”Wd`Ôòƒošï$WÜöN!úô7Ð5Teºf™Ã5)‹¨³9‹ÚûÃÌØn€a—)ðËØ=u±™,P€ó€톅Öt`4ÞO íÌbÏvV©-PšÛ@5]b‘)ZV*~èÛKÃ÷¥å2‚‚lè_‡ïïxg?DœH ûí0%ÔðùKDÖ†±Z N7Ø  -IDj:8P 4Vj<^;< Ý(Ô 0¨6``ý[ÃÞ_W#ïvøã2°ïX ã ~ݸüÿ€à'©"¨¿âštãÿWhþC!Ô_ñð>wÿ˜Hठ‘ ·|ú¦ò5SSŠ ‘Iâr€™Ï^¿ÛRe¶ÉŒ™^÷Ýìœ y¸†fBJ+eJ#B©® Mq–.Ñë³µúšä±÷y>Æ[à‰ œ•îd*F+N£yÞ. #ŠÜávö>Êa˜¬#™ÉE{ 4wßïvÁÜOZ!kU°Ÿæ¨ 3ÏnA›Üu‹:Y{0R‘<'ñVBü`Ôб)Fõò ñª4¢‚Àú_8ÄÞU°ˆÍö r@ dÀ¡UB1@†0€G´BÈ 2lŒà™íÁ:fg‹÷ù–yþßðNÉP®§÷íû64^“^æÜøÌÿ$„’ИÝhþæ‡*„úÿ¯K" óO.@\€zúÖ{k¨ªV2 ²äXÇš_®J¥¾®™®ÓËÿz*¢€ée1Ð…ó› ðjQ< tÃwÁáýÙq«ÆŸRz~_  €+~æçËŒ·2¥µºZß¡Iðd€Š‚'6-& 4zö<›¨ Qvn_(ï}šØ¼o Eìï‹ÿ|ÓSÄ2%Ù„çAÌÞ ÃT×õÍgçÚÔ•dhåÙQ:U›‚yç±AÔ†ˆÌœ¼!g gŸèâHEÖÜ´Ó=á °X0´º A,Œ,ÌåÛŒ9ì[svÛ¿à6=<s‡ûP1_(8¨÷WZÙþ—²ÿ'@´ZR…Z19 þOTe­PJÔOñ–™V‡,/wÂúújŸnÛm³jUU5$ €Xl§ƒM²o]GÎW;¾çíwàøöÖ6“Ü Uùè9¦½]òšM¬ìÔ DP< ÉkzWrBj‘¡OkRUX‡™^Ê÷ÛÖ_1„høc:”ðxÒ“{®l`â R4^ÀÌES‡ç°/6€Ç¸` zZ6t7¤¤‡8^‘ÔZRƒ SHíÐPUI6­š1Q‚$&Ǩª" ¶ÓnZC1˜Ð` ° Ò‘ªRo»‚CÏP£@Ù¸z:ˆ) ƒá-Àæ×ƒ…ß³<ư—i 3€9 ¨> !s… @9H2 pt’ï–D +@Þ÷ þ ’ ]*¨¿â_4om B{*>Ð6‘Q%¸ñ»ï)£‚ð°Á겟A°e³¦UU& L›zKÍ&‹Õêå?µgýçƒs…Sƒ½ÈÞžYçµ}Ôtcµ„³ Qzê6»4¯_Ô‰4Í<âDWþËQÚ d cˆlÇ~_`ƒÐCúdÐy¤(“¯7±$”TŠBˆP”ÄPº¬×ã²e`• … b-bÄÂ@¯ Ú¨€"ÀÎ|TFeÃ’Î$¢ŒCAq%a´”¥*&Ë£G‹B(œB°ÝëFru„&Ì€F€Ë!ZC@5ÀáÁYÎ0çäØ^œ|<ŒÇ><  ÝhöƒP%¡þƹèFÂÿ‚@¨’`oŠÏ@N2[¹kÞíÜÕàÑNN€fÛ¶fBTÒŽT•€¨7êb÷†@Fÿ˜üz—Á*”û‘±»ÀW¨nà¾9‚%ñj>ã8‹œ Y7À673Z-cðëöH°c@* ›|o\ÿɆ†(4wű–å%e‡óȺ‚¾)lŸ®E Dvƒ¯»å¼·3a Qãr€ ™ ,1‚ŠuÑ vãÅaH! %˜ƒÐ¥hE†±ë~,ësöÐZÇ(ж@¢ †3lL}³e½Û&øF¿ÀË3¸ª· ìÔ³ÃAC@žÝ„& tURõWlƒn4»y€+•"ì©øèboÕGS"©Üäuݼo‘ÀñÛg@Ìmž¶Ê¡ª’5m»÷´¶Å‰¤{` J¡e´hT¥×(|!3®wñ˜Ä¦jT"‡“²;'ú´ëC!ëvšÉwô¥åŸÿûbŠuçÊäiè@,weAô¹¦–ª‡†Tôh‹(PºŸXý‚;a‹ÀJ÷¥iMšªÁ+ä4`AHÇÝ- ‚¬éíÿÀ° D<ŒHØqµÍÉŽ€Èià 0d»ÖÎ&°2 ˆªÒ¨€]÷î‚Þƒ»Âmð<ÆøõÀö=p ÈQ€hOggSÀß&¡€c[Àfîúÿÿÿ9ÿ,ÿ!ÿÿÿ%ÿÿÿÿ ÿ'ÿ.ÿ*Ýhî¿8U êV|‹ø Š®¡ ^Åg ¢š¹ê¼'"çA ˆÇ ÛÐß×¹5¥ž;•E@‚]乯2@öÂúc¯r/=ªÝ—ùÕµ~ï~z¶ Z¼7Œ‚x•ô朦Ž?dgË%¾,Ç<²^Æ¥. ìÛ€|'c>Oç,Äq7:\”jl)ÕØ0Dx gˆM ¾+Pè‰TQ—×CˆJ3ÈëNñvÆ„ˆoéA(Xä~ô  Ø`߯|^ @à A-xyWI6 ÉV„š(bÒ€ ¢¼ []¤Z: €‡Ç,€ u¾Ý„¦;¡VJÔOqMºÑÁ¿qº¤{*>ƒÌÚ–Ècós€w…§¤ãE©3`¶±ñ©xˆ¡J̾ܪ?³3& ²f[‘>&«h(§µF¹ûìüG¬+‹"­¨ÅJrâZ2w ÐìHˆ‰5 È@ ¼®!“w—Lå]rÇd-ÂÔt·Ìœ7!HíGïPgO´øªó›€ þyö7顇Š¡SŒåŒÀ‚º, hd! Dì*Ï  nN6ÐZ¹Mpk@P€€{”åxÆ%&xÇǦ/9åP€:þÝXöÒ€P3¡~†µèÆgÿ—„B(‚úŸÈú‘'j´7Àû”QTÀÑ¡}ÜÛ\‡*æVM !ØüV6$ý\i8U_T)/mš^˜O«ŸŒuu\Ž+©(yJÉnß§“œåOI:0„–RÌõqˆŒ>!ª8Ò*¾‘ÃcGG3¼·4B¿³.# ;ˆìW56 ÷TŸïN u 5“º""B@`Rï,`ã±?jf'3F‚¾þÀ H oûL3 Ó„c€¾6 °ÌÈ¢ Òx‡¤¼Žz& Œ04ÐäüRš0!¸°¡ Ø–L™‡#>ƒ€º†_ à/ú<À¾æÜHî‹ÐRÊNoÏdÿO„@( â¤êáfóú'br@ÞðÙ«NgÀuJ?EVUeeª ‚Éëµé÷Ù2!´Ë†;qÜÕãÌŠŠe2  Q¥Š6®Cˆ²ú˜ÚxÓëzð´j«ÉÞ'Ëþ­L“ÈËýuð¹‘ìnƒ9ú£âÔtŒLx‹ hRT(þõÖ’e5Å=·ÜS$‰hÅ"}6Ò6É<ÈÿêÁ ž[„5w>*:_3ؾÉÖ±Ò½À<$@•‘h¼¬½A»ôE3Â`E–Yw@„0Ðîw\ c8Ì{ð< Ån²ÃÝÆ èr€^§Ü¨ý¢‚(*oÍX§Ü ó¿#i]I¨)~QÍ|&r—M} ÷ÕºÜ N€{›£m¥ªÊJI@m×ð¸êê_½£WiAk(_ŽºçSÙ\u]rÊÁVRÉ_4€4ç§î ½8¤+;¦ýYm9¼pþ)ÛPª'’ñ争ZÏ[ç$aþ©ÃÎñ°ˆ¤„[ßIfY¦ AÏE$dÞM»Äøps ÁA]ómc$ÙLÝ6&óh8ë¿°cÎNa$uöxeªvMeK'ÐIcã©  uá!¨`›p~àÓÄ 5*½¶Lè •rÐpzÊF,]Ó6~ª6¥×ÀA[ÓGmr©¨AM(dm/ÆÒRÚBsj …E Xˆl2!ý($ƒÀ!Ó`e±HDˆ QB7•†8Ž01X Y2JVk܇KÙ' ¢¹•…Eìj- Î0 A pè4œahC±0axÖãxš„¢&Èàm²ÀÜc0C „€¤ª¨$S0¾öÜ„ðß J‡ºÏž›ß<†JêVü¼ÉD™ÀRê¹ÏI7‚XëÔ Ä’ "A\°d½V ÖIÅ5ç_Ê EdÐV‚[_ ”@.‘áï ]Œiun‘)Ý9¾„ìM6j}@V¸¶0}ÌÔÞGE7vP¹êq{at†L1b:"TœmÀ¤è,"¢1{˜‚A.#€Ô‡Ÿ…ˆ€bëU˜'#zƒ ­‚óaM1EÆØ)ÐAЏ L(!ÒÜfª!(9!L” ª¶iÅà!C@*sA  Òg‰¦´HTº¨É€’@:¦À$`L’@çg €U Ýhð_€ J‡zã  6ÎЪ >ÅÀÆŠ©›Ô .÷»Ëú!&¸ŠEîû6E%Öj("ô¶•Ž<9¦wîõm¿¾†¼%d¤ûÍ ù‡ùxz«ñ•¯êhe·ìÌ<ÚSiÚRj [Û@Éã¶OLÞŠ4ôÌtµÍ«t›€ çu¬mW,Ári°c àèHbý@p‚¢¤]Ù{Pô¿ E{ÞÆ¥ôÄ¢`Z…¢˜1´›õʰ!ï!õ’Í–N,Ú“MVï°€¡G šZ¡K³þ@h„ùòÄ>ªÛ¢¢†0p<`µeE€ >^LÓäAðÀl9° †¢~Ý(ÿ?Aª$ÔUqº‘ð‚ JBýŸ·\"øóÕ—ÐÓÛµ"$ärUIÕ{K\€€Ìž¯ÌÁö 5Ðñë ÕC§-€¨†h…¤A!çY…fZ›&A×QeØEw‹(™T,¥`òxjÌ’iAtØ„^½ÀâÎHO}màΰ’Ÿj B_Tð7¸Ø"oNwp¶©qÁÒ5¼U¦Œ+ŠýÑаÞYTTÔhÀ Iv HÏq[R ˜E€ƒ ÂÉÞzà=Ü!pì0[ ³zX`yÀÀ0ÀþæÜHæ¿ ÚÅέ³bÝsCûŸ1‚(*%ØKñƳ¬SÓäõÈ¡þsNî×{Ò›Eg ·‘ Êg}KW«ª¬L@CX2Ø ¡_Í|æ°B×*ã}º/)Ú"©âä¶“h:œ WÖÔ;h«‘S=­ö´íq*GÒÌ„V:û‰RáZw_ÉõÎR<Û³fûÜž €wt–° m|.DuÜ×$Õ‡‡MË€§Òa€0è´³Ia¦àpív5Ç¿=U†lÐÄN V+‰m¬–1XèƬ†Æb™e,  @ûF$$ËŠB ‘…ÜSv1˜ªÌl±†5ãË»cy,ËX«ßmˆãa³3å o^×ÜÐþg„T(%׺眆ÿŒ€ B¢ÖOñðz-Q$Ø3êÑ u”àŽ9}*b bUe•€ ‘IPØëÉǶî Ðëth^“äsÙjD&V¢0¶j²rìܹSÕÖ9WUÜ?(r %…ðé%@ØÖ^CЖAÌ üeÊdãtâÖSÖ<Í­j|eðŽÂ”ZÙg§BÄæ×ÏkÞ…ÝËÚ/ÂIÈ¡cL—ç޾äQ".¬ú•l1+AX}Êͨ›žì>W&pHS±µ0"`±j­m° Óó˜ä$lBèI–TTÜz°!”MòQARËÓpî½%h6asXÖ–½¹gf 78XlòÉ!Â~æ Ê£0•ì¡p0M~Ç̇BbtÍ-í¨Û˜ÇÌü›¯–Ô=jP¯âdÏE”ÙëmCΓäÐßÌ+y¥ƒÅÑ!Úš °s£©ÜM…*K¨´Z-ʼ۸ÿé>™u¬JS‚ÇÌ-Iý5ÿØCþ¹‹J£ÅQÕ½µ t‰ø\H†Ùj×74åòÎ:`‰\Z™OÈ\–j4dë4é{»G#Q·®[E âA«òþUŠ:3®¶ìÃB’“ÅÙOê ¯+ l Ý™S ¡%‘}„p6X‚À¸Ñ¨ +A1ˆâà $@0Bjgh€ÀL„#´€¦"½'[$ÀMPŒ1È )€Ä똱iXËôºvÁdô @ä·ñ˜H%?OggSÀ&¡€c\-u3ÿ%ÿ$ÿ@ÿ8ÿÿÿ"ÿ!ÿÿÿ-ÿÿÿ#ÿ->×nBk+¨Û0×l,B»VhõŸAª7BM6ÇbÆâ…­o®à¨y;AîÊêŸ3póƒ*±˜±ªRÊL`Œa ߸O¯ H ¾šCb.wÐM~xzpCò•+ïo³©ézn£'PÈY^”0_ç *Ar7ŒòS²—™–ÎĹ•Lœ·ùö h¿®’f±v‰D·¼¤ö2ß ã$×0O;¯35þ>]JäDµÄþD@€Ôä¿ $ŠÑ%Š„"0mMb˜¸À@ÿìd ñJÔŠTƒétPF` ÛÀŽ4ø°]i{qLÌtà4Öꇌƒ{ü|&ø¨£» H@ àI4Ú(^·Ü ø/‚ö£ÕUñ®9,ø/H„ÆVVDõSüN¦<š+¦9‰-¦Ú øüΞ³€QÉ3 Û–·#spTUUVÉÈÆšÁÝkOc‡ƒþÎi¢¾¦Þ÷%.!f6ìÛš =d·ùÕ‹Sÿù²P‚¥±>c”öÀ IS9¯“Jñ¶ûÕ ×— !÷z¥ÒçMÂ'=ø¾€ ­vOËœqƒ˜5sÿÔ3V¬² PÃh€DÀfÜ`ÓOŒ[X,Ö6gé4?MÊÙh˜¼ŽÔÖô‡²®¸³4q'h`°S¢,ØÐaÀƒY;À‹ òÉ\N™c¦ 0ËYêM=†ˤ9çdQT‹¦xI$± @Á!¾¶Ühð’I¤hæˆjŠoÌdþw€ ±%‚zÇ=ŸÛ"Ũy_DœÈØ•¸ p q{>;[MUU)€L)XÚr8çÍmê[Ùß÷p÷Ø»è¥mîv_iß3W¹ê¬ê³›­>xÔGvH.Y|¹Ïx ÄOî.e‹66Q⊠ËÏÖ}!·)9³÷˜ìðImoº@wxŒlôíÞ §q6™ŒŠU"È‘ñóè l…y‡âç€ Dp„Áz/ˆß™z’’®(fè<ÔWÂý]…B"€ó.ªï_IKYS Ñ vcBÀA¼I[(•ŒV0¨m¦^ýÚ›že¡mÌ8Ó,Æ0ì³€‚f/L‘v˜‰F¾£ÒDRÆ,“[ªôÀ(‡ þ…P[“Ûìš1޹Aæÿ$@ôUœ]Süq\¦ê<ÊgÅžyp™ ŸWF yàþ+Ô˜ Posó ›UUU£”õÓÝù~·º~¹’k}*zÐ9\ñ%olÈžòÎPÎ%2ÓfqVpõ¨ Êã©Î÷UuÏÞ‰RQkj½8\~V~¨äi4j³ï°¿è²¤n?o‚Ê “dîü&¤qn– ó¾”áÿ‘n‘”ŸëÁ `+rËI8ï÷ÖÍ×™Úosù.– ‚Ê8R±“U¾Ã*X0hÄ PJ¤hÀˆE‚µh €« ØA–Ð2Æ´,%a£onÀ[ïsá¶-#È`ÿ¦3xÀà-8W Ÿƒ$ì3…â2¥H‹Àž—þUÁÕ%ÔWÌcn$ó¿D• UBÍø²¬jíL§„}ƒ½Å¸ó­1êÒ®•P(EQ‚$jM³Í]GåǧØ,ãqöYT«ÅêRg,s¬²SÄm5‡éœÎ5m?) 2CD°þ}¨ ,Z@Tß' h‰V–‚a(àV4ÉÇ@¶  ö:ah B{ªèŽãÐCîØ3%kªvf•H- BsÑ`¯F($¥Ý’‚5(á:å§ð„!„FR¼øyØHØŽ%m»í#G²2¢ ‰¸¨"1±¨Eh 0¬×s8æ…ªàÓ.?àød‰*y\Íq[áD²Í Tš|G~×ü ¡viêjÌkn`ýO¡$Ô Q­ ™ÕúÓ%=«Ó ?\úçn@ÛY›Ò0UB”’$£îpÿžúcN·ò­Oòïû©µY §†-ƒÏ `Æ uÇBª¤x¿œßÞÑÜjUÿZ檢“4ëUÓ½ëWZ f%Óë¡,Š@  ì°D“©¥ (J[€iClF]0j¹Ñ 6qD`¸m«'( aC¯ØÀâö  @Å»M°L`gÎ"X­7ÇDEâŠ(¨6¥ |:<€pЧˆêºÈTŸ])¡÷žý#‘¢]+ãÔ§8÷Ü0ü/‚ÆVƨ¿â EÊ¢ÞIp?¿š/Úˆ ÐZGª1R„ c¨j0“I J÷æ8C¿m(Ä•¤ÖÖq¥ó<Ë“ŒŠÄC—ú¾cnxKú5½ËµXpLa{ؽu3Æq㪳õW%=ç;ͪ凇Æ{ĪÁt'(ú°. ƒiò$˜Bx–º nÃÄO\žaj ‹•@ÐØ ˆ€@Á$?cfKR¦å"HˆBRÔtâÄZAødðÔ‘aVu£À ¡A6ÔŠeúf§»r¨ðX  X€ñpg†õž™5ëí컩á`fM­50\€€4ìvà  žÝøÿ"@„*¥8õ3ÆA7ü×… Kˆ­!ÁžŠ?€§hbš¦…YûÃãF‹Ç`÷9F”Š¡ª’$*«c½v-Ççö^éâDêÆÎ0üõ×OæÜh”àË@3{!#Î!„М„gz›T¥÷(Ò¥t # ï}ŽGC6¹Ô-bj6Ä¥ä¶e÷n¶7Vq½è*Ó"Hª^‰ u0âªÀ.*,P ›påÊÈR¡ƒÌ‘l@=Ç0i ™ÉA9°‹–Hb5#1ðÞ ­€A â§T$¨àö7‰"H2VÍ.ʆH @=ìßó0klë†÷¸5kÀÀÔ¯?‚–`”H>Êl „æ–Æ©×Ý óo¡ŠCýŸbªþ2/T&ÞKŽ ÄIbðõ´HÄ>|#•8r¨*I‘€ˆOü`ÂËhk^ÉÍ6h¶d(­¨¢úç¾VR#+ýk(²¥ä±Ç{BÙ–°(ÜÍ.K­Î¼óŠfäi<;s³jØè|+O±2IxÖ²^+ë„ë i(Fû€‚ç»î uVH©:N}›*„hêuLë³m!{Xä8šZ€;½G,€€¡šÞæÀ™ *l™êP mdµ\Ô0k ;ŒmX­Ùm*5Ò £4€…dˆ(`ðXƒ cL/ œ`70p<H'Ý ÷_ H‰Å•¨[±N:Üþ/„jöT|aºÒᲈâ4€÷!ã §!ñøÄ v[æ-SkU%AÍ­¹ò#ÁŒð2ŸãFߤ*uœS²>ê°-i/ö^„RºN|°)­úë&Êæj'Eºvÿÿ7Ðü¹¤'ú¤ uÎßoÂQHu¤ Ë Ûç Á“5Vea;¥SñÍÀÖZ ¡#Ü{’~¿ZÅÐUA´&Ã.ß½ ãði:À‚Q4@È´ó8Q¾ÉX®.œ €Š$E"’i“–ÔB`P*0šHòÊãºÀ*hÀcÚ Ð(Ä"*T˜™ÅÀLÁuS‘[S ¦ÖÂà˜ÞÝpàŸ‘"U“õ)¾E7Èý0?M%= €;G¢@ÿT€¼á †=¾áF¨*Phúå—Ãyú¿“ xg›T³1„S±)êˈâC+‚R;Õ¢ûAj@Û ‚—åÚç?³S²ð":f'¾à÷+d¥”M╪×Ï"ª¼Ñ¸ïï·ÕTt\vMÊh‘5SáA Þ:Uy‹­±´ôGƒ«¬~„ ¹áZ‹E„VŠ(6¢àbrÈ9 +4t‘Çe{‹dë\r$r=# e€e}å V@4]RZÀdúÓ XMŒƒ6€0 „"$²Þ1BðŽ?ààÝ13±pw-<Ü]Ä`xp˜v@°|þ–ß üªªî.ùdçÚ){1SWÁ;s¥Ã} $I¦É# ?@Ù´È@2@…€BÂ``êrÅPÿL_»ÏÎâù=î¾\=O€! ^Èl ¢¶ç`OŹè™F‚Õ'{*>Y38´U €;¾| °Ø pŸAÃÕ‰ÍT•Ĭ¹rùçň^J‰{a¹±€Ñ1–\ù¯æ(±UÃU9ò”Þ¹ºnšKIφß+{_£Pˆ“u‚csŠT2…xÉÒ™ˆl¦Ûž5䔕*Ô夔ç™Ò/S¤‚ÒÜñ–!ä4µ¸úsfÄ7ðÂÔ€ŠJȆ¨86ÂÎò³Ä Š€Œ9s¨¼èŒ©)fÄ€Ðô~kÚ”PÀ­í6ƒW–àx“ŸnWq€—•Ÿ½/ƒ[cYÞ²ðÅ%,8çÜ ó?Q)ŠC½ŠqÑfþ”ÿPõSü¼OºC±@¯õt¾§ò|tD°††J&‚ k€Y)Ã7ñL ×(]¹çÃõ…h-9B)dÐ^{fêy²~¶ŒÀ¬O>ÝeGK´}m¢6V ¼-£ª³ÝIÒ¢ Ù¾ \au¿Ïïe“HqP“×üÔ­ËÖ0êžîòZIÀh(Qôœ·%_<êžT„¨Û³ Ã0Ñ¿q!¶¡€¬Á¾†X к& ä ²@“]øuÀÀÙÜC4@£,±Bñ±NZ:Ê`V[)p-™ØÌxwgu‹ì†ò’@í¢íŬuføä,,¾ ‚Ã.>çÜ ø¿ƒB( qÏ 2ÿw\!b;?€9RõuÀDåʵ(ì[>-|µª¡¬’€ W¯h^¢ù…¹Ÿcv¸ s5ŽÂ<h¨Énëê¸âyªvéúC™ï[º\t}ö´ 8=®¨ƒýú3å + Ø®}.‚í£Ï~Iv-ø&«µõÌõLïÝ]ÏM®¨ä>æà‰³XÁëÞý€áŸ<ï˜É÷Û •Ä̋ޡ®¢ÎÏá©Ò¹‘¡®F$èÕ¦¹Y²ò¹Ó ˆ 0/¯2 À` ƒF¶‚"“´‡¾ ÁÑ`ÂU@­`¡tSïãÛÏ㮌_O óų˜Áô1°žUÇ´ޤÛGQ|²¥Ï¨gŽ*<HOggSÀS&¡€c]™U*ÿ=ÿÿÿ(ÿ1ÿ4ÿ+ÿ&ÿ4ÿ4ÿEÿ=ÿÿ >·þ?‚€¤Åâ¿F\­ã’—û¿A ­„\3~€¨ GÅ'³ X­ö¡G¾¶Ï9×¶”8­ª†™$µòS¾âÝóMs‡›/]~p•q[?ZŽ\þº¥¹ûç °ýØèuŒ$Û8<¨¶sŽ™Œ­–ïg˜&„V?‹ȯI9¬î¨™¥£Û« e2pùµ Œúùv8:Š!J.ãßWçôœ!ƒ‰¾™Ÿ´W»³z@¹PI‚ßC? ÖÌI)0¿h=º:»ëš.3ô±Àç™ÿo÷*€# §¤”†õ8l0H‹жaÉF‡¾ÈyŠ*àÜõ\¾¯k=¸úuµk9‡,¬}¬g΃ Ô#Í"%MÞL»„Œ¡áà9®”1 êÂ¥€€>çÜ ü·Løl_Ô«PçÜHvó¨\U&Ô«øÊòÄ!çóÏ´pˆ|ú´ç¯ÈR„9pxö @ÎáÝŠR¤K{U’%Rþ„m‡ÿ9Y9ý›Ó«s¬ þ$xP›)Áƒ¦Óq¬™ ¡²¯›+µ§d|9ÖÆ wµ5 ]G®ë¥œ§’õ²Kát¯?>”äI¥RºšH$D¸l'@´bÁÄ+p "°É Û·½6€-áZhÈ„^ßZ[e(´¶Ñª"6ˆ€PIÈÍÀbZè´?°ðH( ~º éõäÅ`‘¬ ìû±sþœåá À‹Í3]‚:Z¦º“çܘ½yp2­P·bœs£ÖßdÊP&Ô«ø8bÚ!±ß|lÕMÙ(*èIyvO¦8u… †#A¥”dÐð™Qcg9ÉÌïz+ÏäþkR‰Y5Ø-iŠ –iˆÈ6û¥Zz¨Ù¤âÚ1¹¾®‚¤,€˜6YT²rÖ8Ûçˆ1öN¦¨Ž-—3 B`™ª¡BÙ:²Y… 3è p½&T·© ¬‘°–è¼Õ.€@!a:YHBƒ­‚^`Ú}ø ä´0ÙË èX)ì‚[D#VİR0­Ð€h€oކgýp§©VÑzt×ܨý7†Jê§øöÜHæo€¡Ê„ú+þj‰±bÞ&¹rönGQ“´2ÑÊ Ð¾@°ÏŽA{:SUJ’PQ‘c¨oR bù[œsYÞØ4''Uª„¼:톋®»x£7å1rX‰õ@Ð’¦Qðãý€8­wš¯M·?æN1÷©ÊPVåÖu³mÌ¥|áÈ`*+¥º8È¢EÄEÖ^B‰ÌT…g©Ò¢¿¤m ‚l*^à]ô C c„Öw‚ˆ¨F0 ã $Ö@b”!Ä€Dè@µžÌ*@+– €ˆ °¬ÎÆ‘± Çâ0~±ýûÂ-Ï^ÈyDŠG³C ^Çfý‰íË„ú+Î97 6‚¡Ê„ú)>ƒToîxv*NÜe;Zèa¥þ @îÛ˜>•âi¨*“5ø>8¨‘;ôþ]ëƒU6öúš!äÐüŠ+”nq1L QqƒÝ¨Í1H¬²¨¦Ý$¥”Y4Ü”œˆõ¶¡6Ø“lo¾Áˆ@,Ø&6[úÎÃùvX’¤UVì (_1FL)KQXt¸l jëñë„!j˜j *•ÎdkËÛW@Ë D9‡ ªÙÿœЀ`ûÕ,U «,ãZAmÀ€÷Ë2È `&D1-d•Ã{ï\Â¥eYº€yWÇí˜i‹wÜx2p@A (|ÂkD$±"˜‚ü0ž§ þKfÚµi…&wÎ ¬ÿ%„* õ*þÚÒZ£ÏÁë¯`к™omë¤J™@&™\^kÓYø#jHn®Ii¶úçÅîÄ—2 ¹J57*š”8+Rº¼š3Oa¶æ ú Ò<£/êä& OÊ0Ø‹p[M­œù’ô}Ò5²d$pVx5>¼ÀW«ÐÊ ›µc¦1PÉLÖÍ‚»ºqà¡ß…Hn„9Ä!‰ƒ4ÜrI”p oÏÒ&ó‡ë[©À€±ŠŸ3ˆ%X1h1€´¤=!dy@!ž`€‹`‘"¼6!pîø8€XÃ7t}˜<@[6ô¼a€¸ÀñUˆwx¸7ñÀhhà@^·ÌÛb¡¯ÖíQ·ñ­¹‘Ì?#$¢oW ê3>E9½U9e=ïKE%c•d}ÜèçÛÖÜÜT´US¥˜ªç„G ËÆÑ¿RIïø˜AÃÿ²,ÝøºŽ¡—Hüê‰ÕžNj‡²²Ó$=+è™^ûoM°ãå[K èÇþ§JAEH"#g”…=¬‡6œ <Ÿò-ªq~cÑaô;÷>å™Äôп¢2² †Ä Tü "Š„ébj··±%µCºUžx@ ¶´TNf‡d4TD°zuÀšPdÙaˆŠQ0 Àsü9à㛟`ë.¾U¸å ªðÍ ÃxõÃr‡¸&wÒCEFT®á,khÁPЩ±5^Çfý+šK¦~ƺæpëß Z[!ªOñDÔ]­ÓJå>…Üwû™&ÞxO*‹BT®áÂ\€ræ­/Å”'¤*U’ÈêE/o7§Ýû~îÊë%ßO {oëüžK·ŠL„<ø°lÖ/òÎñ¦¥WU±mQ-²x~€FœJ§òP.ºu í‚6Tè5/åÈ ¤1yB9 À:‚ óþØÌ'°¤ˆ†¸Á$ÿµÙOʦã]&=+]Ã)XbÜ2ˆ'* u† TÞÄÕsÚÂ]ö3E([‚‚È:ƒHZ™Uµ³p¿ýTüˆÍ=t~dÛ Á|ûÈR»’ì°áTd "ºFÈ¥:ãYÚ>>-“¹š"öËD!ñN„X>7ÃOï›âwô©&¬$ $ ô ÅLCb2‚LÆ¿/tE‚-“4…¡~Ê.áDuvÒížä¤\3`‰Ê˜Â@iä)Hˆ¦Ã@§ Ä4hÉ­îÈÈ82„!°Ëgöá}loméŒVñf6U@g½˜†mƒ1¤Eª¨Š$„?ACM ØQÃ~×ÊüßË@ ]BB“¼å`æÿl.K…¡ñ ZɾŠC¾M4y%/@ç<Ÿ­ªª*JJȯ¹msÖÁ]T¥—¼­9Zÿw=•xªì½¢ÇŽ ‡“¦¢v'¬I¾I-ìÛw¶"çÍ Ûbpm”þ§OŒäø­ü< Kÿ¬$ù6–ŠLTöûFä1!S"ºo\qMè§9Ô)ØÃLj¯)àÓR¸ÀKÿ IP9ô1QÍÏÏyOú:/¿ÜïݶBðÔz¢‘ #ºMæ=Þïñ,bÅ @8Uèn48°``´ˆ­,nÈ0€€ƒ(p~ç`àÚu†yØ}„ƒßßð[žmìu°î.ZK—  ß©ËT–• íDYüê>¸T¹ÿ¡‹ü·´Eï¿\3*3üÿ½T@Pý‡šñð>Ö?iìr—o“PÝÀ, Þ÷| Wk¡ªt(¤ ¯ ë¶¿ï˜B‚”ÐtN&3êWlìë'Jlës ³ E…‚J 3²8Ü”1—1uJ™“@=»tý²,µ{j üc{Šy©·]“pÕ•²÷õØHª¿' ¢—³$¦¹Û—´£Ùýƒ•Íše=ÿñ±Cìݽeÿ“OÞhHmB·ïÊ,³ô»‹û•Á÷.H` ©ÿpRq¢¢ÅP€âLÚ½Y@’Ú™‚¥@3Žc C&J€‹ÿØÂÊîaÝÅŒðÆÖÅ9ÈÙæ`°ÀãfÀáÚî–“vÑÕZç¦é´åýÊîí›ïP^Îý¥ªß½î›°–[]þÝK˜ ÑD5.J ® hhOG!ÔOÆ Ðr¦½Ñ­­¾[ á¾§p¼Ð7Τº~‰.ÄO§) }ïojG‘lKSî:Þ~âLºº_ü¬âTΦ‡¯‰xi6ň¡ã÷‰{‚"Ò—”Ú€t.0ì‘)4ZÉé¥ß¿µÈ?ìuhK4jaXDWrb%Œ3$Pf ”„rÑY$¥§±O?<ìl);XƬæï?ï0`ñáð¬Áš"u‹ º•Œ Í#°0P¨à SuEÈ¢iyˆ"àèÊþ·»$š·½ Î 2ÿØ®‚ ZÇÕ^Šo \Sõ¨äDBëÎ @ s›£¥h«ªRJH’¡‡A»qÄ´‰sOŠU¤a:Yj³×On2 NEÐJwbh4Yi– Õþw:Œ¥:% ÝQ]Ȍģ,¡€(cÔ{Å"ˆŒ€ôA/S‹¥™ð­‹L©¥ÆŠÆž>L¯FvHKlLµ±˜~¥Ð†°.BÀ¨¥ËÖwPDµms¥H)À¡A† !(ÚõT¾¶»¬Á)¢ÍåEÛFA'`pJX¨-VÎ_÷ïjêûÇ͘‰¹»¼.Ðs._Ïëàbé¦þ×4€ÐžÝHð_„ÒÚºbÔߘÝh濸 †jöT< ½^«ðîܘbЃئoÔ‰x*\Bª³T›“ÎÙÙµãRzî~Ý[­V¿&ͤås ÒƱ›Õ|dÝ9AS ð&§~‹ØTMÅ-ÇÒËž˜”¡qËžû! ÕŠï°<—¡ŒŠHXCçJ4VœÔ¨Ô³k$ð$I®ØØ†°ü&Ú!^+ ž‘lÌ@ È´¨Š ˜PŒÁ1Tш·QHÊØ¨J4ÜH¥‘¡£=å #@1¶ ¼À ƒ3åÝ]·ç‡û“=~àpp°„ @OggSÀ&¡€c^‚&[»ÿ!ÿÿÿ+ÿÿ$ÿ ÿÿ4ÿ1ÿÿÿÿÿ ^çÜXî ÁP¡Cýç Ÿý/ŒP¡À^Š?€rúÕÐE0Ù¾£•€„jns¶5kUUR$@¾l›îIb “ Ãuë^L-ÒÜâÌnìjÕo3ž$ùùTËu©ÕüÚš–  g /Í$«ï—€‘¦Ô –¨Š¹ïl¦ÛŒQÖF2 šk¶Ô,€!jíâ:$–±aÕ°ÑáU¯HöÄ€Ô õάP%ÓLCDìôÄ€‹0“uè–©¼ZAS$5³"¬$Ó´&¶…˰@à ‘O PÁ ºpö0T_4` N(H,ËØØ2¼ý•kvF¬Ô㹌½<ÖD’€þÖÜ„ÜQÁÈU:Ô§xݸüg)Aµ{lüTjÓ£<·¤Œºw¶–„rÛfG¹©jÊL,$“·1;þ8˜&¯®ÁêxÛYrŠŠ¾6ÓCfZ¥ry¾–íº |­’^FKßUD¢M-?`oIS;S5Mr •Á2¡w¿Â„xªÝéý½´e,è0U­-(ÞÖ·Ã:"‡×622`/€¢pî@€4+* Úƒ XX 3‘f¡q™p†'4ä7¨ûMŒ¨% Fà.‹¥b,Ð+!ö½(×€Û FBdL¸B`lK—, ¬± Ç®©©-¾š( (ó‚PÌÛ€¢ƒ“i€þ× 7ßJ04´iŒúæ ÉoÌP¥ƒ½)~€ŒgŸˆH«²J³ccÈo¼¯2-fæè ¹msŒQÂRTUR‚D“rÚ¯º}~HoËtLiAŽ‘ÙÔåK"?Ûúg ‚zšñ tíRáýh…ü}ç§‚“‚T~«õÒxÊ®×ê)ªV‹€8Þ3,3ÙÀÌš^# Uj0$ Ù‰$!‡–©uãA·Mh®·…@]” ê"Y™¸ ¶ ଜãÛ;î0ïrèݺú´öÒÃ<Ö<Œå­‡ƒ@`{$"À{Ž((^Çžÿ?û‘dÕ5¥²GãÝsø°ÿk{$b­äÐä lµ«RŠhm¶¡ýn9ܼ á½3 »Ÿ«ŸÄ¤“PUS àS’sÌû´ ?Ìxt´µšQÄñ¾‹ÛcS•]ŠZ»WJ˜¸ôNR¶ø3Ùc¬z „Žúh$šN‡ b§ä¾ã" Á ðð˜M‡ñÀ¢ÍÂ|ç,X3 i½¼€d -ššø’¬uJ¦ÞÇÌ…ÿû VZ9ÔŒ{Î0³ù),ºôíKÚ×UñE©H;3×ß-ûd v˜´/À‰{2FZUUUfP"!¤Î¹]ãLã²t¤™\•¾N7§æÅ:ìU( x»›ª’‚¯ÉÄfÀø H ߪO¡¼í€øK/m05¡Ißó T6|yòÕKÈ¿bÙàÇ×놱ʎîtQ•´°ã­3ª€`~sûTñzéI*õÁl{¸ÇùdøµtkgR{úº¬´'A`$ªëó k&É €îŠ aif J”ªŸÀ  6DmÖ&ll-!tB<0>‹ÁlŠk}\¸ ج°€ÃÐý ¨|€ªf’u͉öB Á’Ÿ(ž‡Êþs+ÁXÚI¤5cÞrÀþŸÓy´µ ‡Zñä•]=9Pô"%âÚí"õ lg@¶mKµªªÁRÔ¸ÆçY6[·Rsc‹ +QgÛºOL’”æ›±) à3Äz”c]k¶³´ÜŠñÛî¹EÞ¾q\)á>žº”‰Œ¹ôÿå2O舱³ß9^&”vW/Z’I†Ÿk’avƒÑÍõÜï¯3¤ *ˆ‘[ʈ®²Ùx²%ic¤“ l@ wQgo°mÆØ} Œm›òíEF!ˬ4%€ÍL\¦D¤0¡1FêAè‰Q P4 5TXp9Í"ˆËqog˜ñ€ÅÃ:€àþÑzPmRئÀÀ* ©æ‹·”¥¯Çš_†Xø ÿ; t¨×÷Ühþ¿¸dhÑ¡nÅ7Pž¾jŠ•Tú†Ð¾£PB^€ÌgCñl²^ I À uñîú†ÑÄàÚïú{joÊiäóq{=Í[¢ ½lMLE£,cÅÕFõÇØezNŸP{¶-Q=(û EŒ“BÆóTû—ÑWÓ <Ú´ÆQõV™BÊe:F¿„'q’ÀŒ$â€p,¬Ì– Ye2.jhÈ Ô Âp •’uÔ†Ezr}=‚Jc‰‚A„`N¦h³85L JÛÆ‚˜b@ÊÔ40Ð ,þ 80€x$ŒD~÷Ü óoeB]ó Ãíƒ!h˜Ýu+>CŠ˜.G™aÜN¥è±ÏY·£R‘b&5&¦êÖ·H$€þ¦Õx~†:kŠ|ÒçEÞ«Eº˜Ë1›‘z¯™%ʦ¯Z¼¢®œ¡Sî]„CôŠ5øäÚ@aR4M¼ãvh3Ø6„ýwV ‡î0·ˆÒÈ ¡É5Vh%}Ý^+VX1(Y%›P/"ŒP¸ߥƒ`lž…áAB‚0€ØH¿¢;TbˆIL €TÄ6N@£(0P²qÙUÈ„¿Ða¤x` nC¥b`’ü,xRþx_ „ÞÝøü?ƒTK¨Oñ/:üswI Õoý5ªY5}+“ò}£æFVо¹ÏY'Ä&ÅW•€ f‚ÒsÅÿ¿ú«5Ý?övâûÎ15PÀñe_m?M›>*7o´‚u ÀkyÖ,ˆËÏüZÃÃø‚ë)޶Щ Æ™á ¡±Iš:(¯dsÌ´Æ÷doó!€x¢¸(!‡s‰êP ~zŒhªÿÛ†ÄTÖŒH"éR!,ŠÞhÛVa@]+× (6c0Ìc±010²=XÏ ·ê¨i¸(0Ö `,èÈG/2#0¶Ar`*± *dõ5V° € ð¸s` €·»»Íáyü€÷<Pp@OggSÀË&¡€c_‡š#•ÿ ÿÿ0ÿ0ÿ5ÿ@ÿ(ÿÿÿÿÿÿ"ÿÿ%^æÜ„aÿ% Aµ‚ú+ž97>ÿÏ ŠC­øxK§b4…(oÀ@¹ç£­¥ò¤ª0“@Y… Ú̶²sVéüÑ'CýÊ/³D*åó¢E2ÉH+É¡wÌŠ#¾ˆ•Œ0±  <Þyd«w-÷üd‚cû)RÕÑk ÷KL€Üc¹ûvž˜¶eÎl´Ã‡LsÕb¸*h×:2¸-úè® UÒCêÊœ¨,Ñ hÆX]¥ŽŸfEMÍ;ÉP]êá*#0á¸W@¬6˜À 6`Ñ(­Å6° ŒV@è'ä YjK‹z àáà’Ãy—çàŸs€Ã¸ú€óÉçsˆ €À‹ƒ">ÇÜ0ûÏB•‚zsÎdþwBÔŠÏ@¬iª“™E+îl% /@œõmÓ¡ª¤$Iˆ—|îcëÝQI1DŽŸ½§  ˜az@Ôc¬Ížú’ƒ¼°ˆˆB T‘l x"$¤{˳†ë‹µ _ ç³FT3ÃM-W‘¦Ç×ý`­tþcA1¦é÷|‹M#€×èèK‹ˆ „©‰Y&ÑZг×Înpu:·Sz% ä%Ö.Ã)Çbl7f mÈñ\/€¨§€r¿#L ­BaKk¬†vÏu3°)N}ÆØ©l Z8ðÀÁ.Ÿ?ÀçùtÀ?à’óŽ{x¨OW‚!~ÇÜ øß[D©RP·q͹qƒÿ;„J õýÔãüÔr+“¸¬çÝãð©€ù¦òB ŸÏúaQZUƒ% ]!DOÑ{ïPÆ}w»sºÚ³ü®’Ot1¹:*Áðr㵬äð߼ХPPCJðÕA9:Õ‹Z`Rsõ™ozÞæ{}‚¢×K+‚J†Û@Ä{ì:™ÅÂ-1¸~õ„M Ò0«,£«F€©V€°¬¨’<‹oöaZÀÞ CvÂr®á`på>0— ^qõ-‚∶¤P€-ƒ&Ü$ €d{Û@ ĺ²{&²!€÷ðÅ{µ úÜ:ëz3þfÇ}Úµ/ÏS ØYÇÂЄmî4ä €Šb€¾×žý?O¡ŠC½Š{ΡÌÿa5~hJnŒz?€ŠÉ8ÞAùú»eWI@Î9:mû¬/–RµPU& â¿kê²ûècrzë/zÉ6 àyÖœ¼e–p BDÈ{>×;e°7À\­á£ò—m ‹ ”z@„äDr»âH6M´¾l}O‹Ø.rêU¤Ä&Ô§?×I;¼«ª´kËfzâžoUuÜ1ë§ÕÔsàPƒ¨Ù@MA=¬ˆ2¥ah©Zß‚âÔq\\Æ›|bk- `Õkþ瀥SL؈Ä&D4<œX(ø{†É„§aº)`'ää4ßäãÜyw¶ë½?ØË9A€¯) ªƒlѤñÀ-Y‘EžÇü¯;NP-¡>żæpûï8¡TK¨Ÿâà hC·m›³YÅ[Å›ªR’ÔŒ$BˆÜ¨®{ݧ«|FSïx”j0ŸµïV¬°Á R™Õg$oÚø˜¤oï”h§M6LMØú»5€–¡ë¼zÅ Cëâ Œˆ["ûÔÒ‰$¿úm2Ìä¶_úâÙå;Â^|ƒ ‰t~rp^:AûëŸ[3RJ†<Ì›Ízê›o¤v×)ŸƒëZáÕ@íl· ³@D§’ùTÈÙ£q5Ø seCE°7àw‚…#V0DPô2 €p€FîñEÏáÜÐPðé&FúÍþ>ï—À²mÞá‡&Ø5L$‚#!õP^§–ùßW²RjÆ»e>ó?»HS5Ãàp­¥ïX‰‹?ygLÖ4ÜBÈnuP]ÀßLߨÑt¨ª†¤HeÂ4c|ÁmN§yR­nÌ{aRž/mNÝøñ|껑÷ÇFY€…5%„¢æ JÖ°E¥„ò|³dï< Å—›_¬±fxùôcÊš”¦ò2W~­…‚š|?ø¾ÌDÏ̧:gˆ-åðQoÕ.òí¥G†k®a>r®ÛÞLçq¢žF#ø×x*ó9¨aï~TºŸ9ÐW\Ù— ‹5e@}1ÈX í ÐpdHá & - É J€$ÝÝ9£»ÖxäY¼(q÷Á €`Ì‚ä^f)ØFB·ÐÑ/’—Gµ×l ·TÞ×Ü üg\™¦J'×õSüKn`ÿ M¥“ëú­˜±®àà:}ëk¥ªªR%ŘÁ›ý·!˜ ‰1ËOC½`ºv™Væø(Éj‘Åõ)VÙ[çÍǽÛécÑ:hÖ/…i´;dßYÆ(O–mÂID`¸ÀûÕÚ)<]Ÿ¡ècÀŠô0-ª'ÂäŒ(ÅA‚»¢zµÍŒIA$̬áë² ©% $ÀJ!ì2-“­dµ®…‚O¨É–„Ã0´§  €!Uv¶-‚¶!ÕxE‡ÿý»!­Æ ” Û„Q€z“6LPcg-Ü„i;}Ç–)º`4‡õ€¡NIš³f ¨"(†=þêX’'èZ ½L ²´Ai•`çtnËQ«Z ¯„èõÌŽ¢¶Žçªâ#&¢L+cD†v PB߀µŠMBPÅ+‹€VÁÐ ªoŒiÃb¯%Pv @‰¥p(€P†4 ‹ØH‘…UÂD‚PFÄ"®BZ@”,°QÀ:©ÄYY†&@!¨¢YŽÇ"wµEÎ:¶YõëÊl²ü= 88³¼Á®×@øGªW@Û^, Êž×ÜÈÀæq!Pm½÷šÃó›Ça†Jêj¼¡M¯ G$  ¿Í9BÔºB¸ª*M‚PŒ¸šacÄYÍXc[K¨ÅÙ¹ 6ÙГ“›Â3«HV%¸>> "±ª¾„Îcjú³)ˆ¨äö7Ÿ+ èÍäÉë3p)gíi¢s#dý1¤ÉõE–£1’vÏ]†ˆˆÛô bT"Ä2zðBú3®µËKòª¸Bÿ) OȬTÛL70´º!00v”"éqa¹½ @C=JCȘ±WKȬLàŠ˜çà ®®W‡Ç{>pð<@€#@ðÀ `4bçÜøì? Õ ê§øæÜ„Ì?¡ÔŸAƺɾž‘-·6˜ °#­¨bQU•Æ€ŸÎ½{ÈBS‰G¤î£¡Ù£ޜꂦþI¾3x©w¥@!–¼ªñn<aYš™„Ô( ­Ég(¨:°Œ@kÝÂjË~n¶ÏßÈ!'\•  Š†Zc-iÃTLËæ5¯#;" #,°¾mKð¢´S“X¦mƒa¡zd`ÀÀT„gÏ –âSçÐE1P€e ¢¦2 ƒC± €®Ÿßþ^6Âx$ÝFX‚µ5H¡l-çÜH~ó8 U&Ôk¨kn$ÜSù¨º4mª¬„Hhsk£†Ø^“䮋é1cê2±GO.Át·ñÙÓå—ÓG*õÃ%T‚@uŽ(uPb0&ó7-‚†ÞÖ}ðò‹ŠÌg;Õ Éx1ºª'PôÊ¢ ûÙ¥q«¢5>±hÈøƒC£ <ö‰žÃã& vÙsa" @"d!ƃɲÀ>—¤B«)Éþú®„M š¿+o(X €– o °ÛŒ=LhßÕz ¼!,0Œ}#Â\H¬_M7i^÷ÜHþß”`šêV܃nü—R†jêUüÑ>Ò q¸¡¨ÓŽJ.M &o~Wâ‘€U1´.@äM5š©t£ª”$ºjKí^ñì­CÓÁ9ÕŒ:Èí¦¿³âEuîÇÞ¹mßYÈ9J³u%q‘!ˆmÁëðöÀHL3f#Ó>•¶± >”anDYÙBè9`l »‹Y–ê YÈe#6-P@\OÙ4×Zq‰*RV[){ [%s†¸0È “¶ÅÂ’Ø‹eAf+Ó@Ÿ¦${qŸÙRaµDÊâ’Ð `•¡ €û30À€[2Ëdhb gP ” pÃrÀ˜ð€cy‚ÞæÜÄÿIm#¡>Å6èÆÿ!‘¡FBýπȲ’¢| à=N ‡¤Ý·™·uRq"Ì”Y’Ðuïtö`FAð0–Íc;xT:ISû^Ob"Œ¿Ë •‰:¾Û½² 7ûAà…BgݪS§?QÉL¡ËtïÝ9ª®Ø&!–é çñH*="&J‹’É2 ÓêŸX ¶Q¦Î5"^`OUçÖ¼A{â}#œw#„eá`Æcá6¨ÔË*¡YÖF0F,– yw9€¢æ ÁÊcÐݬº€BÀ,3Àn +‡Ê[Ö\3Þ”ÏΗNR XÖ«Ö¾£ à%I@þæÜ¸ü?ãA(U:ÔßÝ0ÿo¤$š öRüʬÓN1Žû¡Ž3c…äÇï?Už ÑÏ€És?šJªF­2kÝì­Ñ=^NNÝï/ ¿èÙ¹—è_sçêÅ)+c›‰7… ½ÿ6P2R§R&Ë+11Š?:Q¡‹ˆª*îû€@Vo‡¾¿ÍH Ü€<©! JéýC2«ÎdAçR¬F  ›Ë½÷НHáëÎÏ[“30 ¬6!‚À©3u\؈ñÎ'ôrÀ+@;ÙGt#@—{$Ùå‚‹T‘Ö• –0à£`rèjþEsx«§€çßðÖã,ÖQ”D2 þæÜ0÷_5êUŒ‹nû7¡¦ƒ½Œ€Ûw ´ èê ˆ|Žúºbꘚ²@dBUÉЛ½tàØ6ŸQ ¬ÿú¨mýÀbÄÜïc$¸ ´]€ÀÃÙhm]ÊäÄ&…s§ak4©ð §»“‰aš´òøºK@¢ËâÙð¾$9óW)i‰.bqò"dÁHAŪa:9NoyŽC²#œE‡'Š4— Õ¨{ã¢!T£9ûÞçé.ľvÖ×–+êFYÆõ”µúÖv(R•õV¤ÑŠÙÀ€¼Ì*G–Wð|r¡$„áZ(Œœ€áËžÃãk¬`=ãzSÇÝzýæ( š=ÆŽc 0ã88/ OggSÀ&¡€c`7rY„ÿ0ÿ3ÿ1ÿÿÿÿÿ'ÿ"ÿÿÿ&ÿ4ÿ9¾æÜ¸¡ÿ+MŠC“»èF2ÿ‡þ»”B¨¿âÄ,ëlÍå:¹N=Σ¹2¨÷µÕ|¦ èÇ€ë h'#·횪)+ HN;Ê ŽoCšvŸ|lT•yÝçÿŸzBó·ˆ7¯F‹"¥XljêƒK.ˆWnüÁ*ÇéøžŽ’Vuœè]Õ—Û¶/ͺ"{\HIˆ?y¿ñ†ÑÚ(Ÿø/j¤GºŽü:öa€Rµõ5ô\Ì2NÑŠÖ¬<ÌÒ&˜åæÇ{‚]üz€¡«Î+R€÷Ó°U)’î·}¯ ,;$ЖMÞÕ*Zh °  bЕ ›‹q``Žùç¾Y›—›[EÃÎØzG_bªø‡1_ëáÀ û. å|,Ð<`žçÌþŸ½ ‚’ÐäŽ9lðo] šKB½Š?€ut2ò eQ½¬ ^À¾ùâthiqTU)%@`7Ÿï1ÌÝÜžN}Ìöúc‚¿V@ ]KNJ”]%Rž{4ð!§E¼ þïìdŽÝíØ tÝ¿GHSIÇn®äpý¿ËA °üâUƒŠœò©ƒ §ì·±M2[Ý?¿p6oŸ÷O#Ò=RÖ*üºTtxÇy£|¦0;ä}Ù×oFÉogǤÜg»}ÑÚÓîŒ× öÙ"O6w'Øá‰ÐRT %*é ËZ®rV@dæg8ãðÖ˜²SŸïwÞì§h¬Éh7,‹eÁ×Û)‚À`—&“lÛ=+à)%BÙÀ/ ^‡ÜHø¿7B"Z­v¾‹¹ª/€Ï;ÚÁ⵪ªLøä†áí©Îz¯QíϫպRMxKãС¹w«b”‚jDœ©æp®£S#ßÜ‹h‘À“ÐJ-‘ˆ!om:9{ï– Ã[€*‘H9EúŽÃØáP$hšòš}&·Ì9h®‚˜¨³Kž28ƒ⤟¾’„ìådÙC…¶ P Pwlìè‘¸Š ^öúïO»•¤o†£@’hàŽ C€°ËÄ!& m¨<$ ð¸Ë>Îóõö\ýû>Øäœí×ÇãÝñÅ×âÁÈâuH9re¹‡efª…‚«• p¤Tú‹(y >×Ü û7Ò0im Ó†úëœ ÿ€±¶Kê§ø¨S­:‘][•T}·•oÙ„˜ Ó€znÙèÚAB¦”ËLÈ ˜Ñ¿5æ×ü¦IœÊ&oÈ6ø>BÏ!ÃÌ*ˆêýÖÐ,HªÏÍýÀúØPõÂ-•‘ÁΦDA†µ"“A/x}áBº:f¤Ü‘–&`LjhÓ‹Òåájí¦ÅÒe¾#|Š` l½L=Ô&cƒc!“È # ˆˆÁ‘1€,lAl#£V;j5€(EHp$¸¼ „ŸàJÑ–ÃY¨7À¦…C€û‡ñéOc izòe 2,wH€—æÁ`\˜RW@-©@^çÜ8û‹+C• õSü{nÄþǶ U:Ô§ø (ëiME–³à¦VÊ䂞“ÏñNÄ A«*3¨šeÜwOgÏ(éVºÓý±Þød²½làž‡‰Òú]°ø®Œc­ hmcÜáï‘›8M7¹ @I¦ªÝ€Q¨E C#´É*Q; Zœ5Êö U[47,¿Ž P.,¬à[.,D˜Ó0Àš‘;Á@$Qö%n8D€`l1d†„,Bœ«’|äñͧ¤Ü`ÿÀˆÀ°æž’¼I$´ý­ZQp€ƒÌ28ÎÀ„b¾4_€ã“ƒd€”Ô5¦Œ>ÞÇ 6ß‘ÍmAýßœ—ý/FBkë SÃàò†`D²ûæ£æ¦ UUfAPL%ˆ“íÂÖ¢‰ÖX ÅnþU—}D߀†0õ‘M)þð†W¶ŒÎO²ëæ£È(C“¾+SK«;D·ˆ-ÆÊä]`!™1€v}î’fEꬓ4˜=h'¨ 4k,ÄtŒÖÅ!„±®€ôER¨7wÁŒ€ðXE„Á(‰)¤U3€^YÆ?{býó)€¨‚2X ÍîT¸E `.¥‚º8”"@ X¨Ž” Î-àÎì5¦ž™±ÃÌxÞ?¼—@B<šŽÔäbw ²ž×Ühöß­«B•öT̃n,ó華JkOÅ 'ë©Èž×Ï*ñ°5BRN~–¬€¬ªÝ†pmœè>gÛTZYU•!`i¬ëöœÏÝB:©¾ZcTÍm¬sÔò‚xÓ©;Hú«Ž@IûËŸól HDà ²‚ ø¤PþÍqZ)aZ‚ ‰ºjlÁ®l’HÇ‚ŠèÒªJ«ˆx dC cÕ a@H2Þ2å[z‰:‘ ^ÝàUÒ_ À7宀ޯŒàMJâD K "@º0M€ä#y‘–®¡g€À2.ýÌó˜õpöïëÃK»ößåâ£9\rÜ¥B‡â`^Ô´$Àþ×ný·7¨Ò¡nźçFòÿ¥AÐÔºaê¯øø´lYEÎA¯?»e>}ëD¥ ¡ªL ‚qòÊ€HkäS‰0•~Œ-» ùi4;ŠDÈGš%àÆæo¹â‹—ÒF«ö[ók‘â_¼Y5\¶e¯ä“K§†Y-¸µ…,tï‘§Å˺•'‚-<ŽL;W‰¤®‡Ã!™Œ²Ð5ÝÒ!ÈŽèYj)Œ;NÏ`3æ^Š7 !-L«Wa£0ê"µØÖ¨À[º„@hirÒ"!Ãeãòåÿ|M^½0„6B@*sÀwXl²L­§þûf óõÝVýpà¼áaØïdHJp¼ ^מý7†–RV¨«â\t#Ùÿ– c$n{*>CʬEDáà‘S ·hA\€Ýç˜m2§ªªJ ÚÔ¸EóI^&  ×Wo‰?#ÁÒœ@0Välˆ0üUöud gî1g–¿SÏåÎî¶}5—ÕESXj*¡Ù@ì¬ï ¨(ùª€ãÓo<ÍBpÔdA0h-¹ja)eÅOžÖËЇQÔûŒWÆPX«–"6×8æ(C* Ocᙆì¤é¢žOl49iZeXlÂÆ@Ã51²,S`àJ¦¶„ÔÞ-Æa,U8 FÞ€Å`°`{à ïa˜;Þ, Þ\ >>çÜHöŸ‘‚ªt…¨W±NºaöŸA Ts¨¿âBäiQˆÈVåþ8=j:®ŸxOȧ ±g@§}ÖÌ[Í1Bª¬°þíA^²1¶æœ÷Âïb­†gF:±ó=¢*!¤†›h7Å&ÙMS]H©•‚†hÿ9-¸1üïÄVALÒ}‚Ž<óÏð•ÞHEfÜX@Ì¢^ë ”÷ôÑßÇk,æ-e®\M($ƒ¤ìƉÂK`ÈNEÐîv*V Lu/‚ŽTÉj9¨Ç‹( ¢7®-Y…„¡FhíRÙÐ@G6 `%TРóâþÂßMµÃ>˜6lƒå<@ˆäUp^çÜHøÏ £CÝŠyÒaá?ƒ€PMP?Åg ã83…p×uÂ’/`b¥-°–¶j¨ªRĶŸÿ±-ñ_$@öŸÙ¸úؤ R$¯ªN6ïVMI—ó9DQ@­A‘öʶq߃”ž;2¹cÝqrÇ[¦È hõ÷Öð¡hS\Ÿ…„šê»Œ†¼6-(Û;Fï‘F ¤µÖyQ\Þ¶Èc¼'k[ؘ’1`cŸ“"Ä}e% ¬°žÌX Éd(ÕL§ñúfEí‡9”‡Æm&Ð`€0àvä *J¥—4® !1 l`U Ãó8L³3œÁZüùð°( <þæÜ0ÿ_€ ZBý÷¢CÖ—‚PÃÁžŠÏ@¼>1MýHãð~=u ¬çCžUîG} ‡Š×PIIѯáÅ'ïë‰!œè8¦& !#nZ7ìýJ5΋ž6޼ï±T¢äA0`½Î $MŽ3 RöÔ‹Æ´ÔÕ=e›ÚJûk;<\¸Ú0m”Z½²ˆLçØRûI ÌÝn’]¯ÍÅFÌ-ð|Råa†’2sÍÉ€ñäÙÓ¨Ë*×läõï¬TÚ)« Z "ug†×ïÙFñõôü½@ŒpX(%ÑUˆ}pˆ¨nI:€µ„0`9àáqìr‚&Ÿ¢sÀp.Žk¯†á>!<0ep^×ÜHþNáèªØS±î¹aø¿ìHè¢fB}Š€‡OÏ ó˜]xøQ·ÊR’@ @@/ϰRK!ƒˆÈÓ!GYQñ½ï9€Ê½îN0ˆˆ,ʉ˜1óuÜò%µmíº[Õ`Q¬þ´ž(¤ÆK÷ÙG`d­CÙa†:ÕK¹¾SËJx…ï3Q ˜Ï _þçïœÞa’#=’ôÆ›ýô†ä<¯Q#ȦiâàLÓ>I™z÷›AFØ×NA™-³ß—ì Ì «H0NñõÀU½l‹ Dd 8cðj_Õ­0´HPlÀY¡¶Pd­]t×[@¸÷`€¦ih¾0§7|jØcwÞU±µ÷Ÿ|.}ÏÜ-{5<‡€®Hq€†,88 žÇü?6Ud*qÉ…ÿwP‚B¨?@N=ñ„œú´-×¶Dr^¾{¾õãÇb18¶Íæ¦m¨ª™I@ožBrƒ#£H­¹—ν×eöxZäWPßä÷P*9=f¿Œ•j…‰ãäбÝ2€LɺŠÓ02Mô*¤¼Ëõ¨³š6§tÆKå8qq=Gt@shL´V{¡¥ëHgë§Èñ$‘ñ¶ýzÍîn×ã¥y§ÉuFô 5EJ9É€ÞB{Yèãó~ ›ß=ñQP@ /1Ø ²‡JÌ£ у”n¯€¬ÐÓL LËPÈ %ÆflP¹À^IKšÖÞpŸ[ÿés®Ãwþà­<à^ßù@›?m$cÇ/Y¥v/ -€†21ÜH+„OggSÀ;&¡€cabd´ª"ÿÿÿÿÿ&ÿ$ÿ"ÿ(ÿ ÿ.ÿC=>B>A=GEÿÿ^Çžý•ÌCû²Cýó˜fÿ!Ð\ÔÏø™Nó͘¨Iûzìø<Ì â, žcÒF\Z:"¤*% ²Þe­ Gí¿¯s˜fÿÈvk35›ÿ†ñ²í<ŋꠎfï ESû9‘B‚!¥yféô•vU®R½ßa¹°¯"ºb‰È jDJ7VÁ Ö‚Ý Ð`¥ŒQzôÉIÄ“Ôwö<û9›AÂF -ÓGH ËÌ‚á‘ïu–zC H[؉ ‹±>6A¶iu$rÍ-9‰’±Km!€¸åxv¹_\2¾À ¹| $™ë#½Á±…">×ÜHîo„d¨2¡~ŠyÏdÿ‹ ‚jê§ø¡è§VB¸z8J¹2‰˜æÊ°_€ØFˆ7'”R¥˜ºt¯ËÍþÖËñެÿ§mMSýÊÓPÕ1B {ækf)Ë]j˜e5Ësn–%Óox¤%nu ¹îKh×ÜT¥ó8Ћ=vi‘rëoØžؽƒxPW¢L»¾éuÓд%”M (C(°˜dsnK4Ô‰4 £ê€¢²*³,c0a…[È€(C`Î~¤U48_¦›@‚ŒP ­‹°ë ïêà­îl-CþJ÷} #9!þÖÜøÍªPi=ߢÜ<A•Žƒ½ ÈLÓÖYd\u#×<†&çï q"Y@lZ@î3kĸªJ)“ÈÍGé×÷«‡ë#l;ØS5…åz!4´LL‡’¬à<€¿9ì]Œ+¼Áãã<»Ã'ði›…÷¿R ·ÜXöojêgØ“Ën¾¹$¨–`oŠ€[ŒYˆ€˜ùpb®®†R H„.“ÐOcs½ÝÑVÛ*kàã«––£3GjäÖã­+Uö"RâPæ1éd&Êq,Π†¥ö/¸°v0fI{ß§á Õ+ö±¢B!Çð¹C@ÓÓj¶ YT¤ßó’Ž$D.Ñ44«õ ¢†Âæ]RÑbl–Sz(Z…s$àb†JlCͪÀù ¼_s;ä %ƒ×ì uô—’!„DC4Ìű Z€¥# ¡í½ 3x °5€·=4;iõÀÙœuâ¿ =kÎx\&XÜî·‹8 €CÞÇ–ý÷ ˜jL¨×ø7ÊþwN‰PÍÁ^Š?€q4)çºØ¦Æçºøt&ÀÝÕ ïšÁ¤ ÐÚçhE­VUUP fBÌl²øÔþ™æ‡Ü®j¾š¡£qæñ'ÿsŸ?Ö'œ? „"›Ð7v,+Úñœ'îœ÷›ì*ª¨cnwh­ ˜í«·ª}ç39Vn@&ƒ³ÒÒ- ¬vR&¥N.¹æsÐe b­5¤èh-]!¶Uô5lñŒ£{$K¨‹“2j…R¥—Th…©kV@"²…5 ·ðe fªm¼0@] ´„eš¬KÀ@ØÙÄ¡!µ€]ø…±Ænózð€<Øp€ó>·ÜHæßM¥¸(êUl›n4ÿo°Õ¯½ŸãY•k‘™ß¸ugÐbß;Z·a^UI%l¡Wrë™øõˆÐ;]npÏÅ‹¢ g{Ð4O¾ÃHÒqÓ‡c3œ³óNäÕhƒNæp¿Oi)CCõ¾û÷µ‹BAIŒ÷'Bµ1Þï jD0îPi´‘YÕ`&WÂÇmQ×ÉÁ:åTÇXF,jKÖb€e¨%ŒJÕØ²xTYJUB¼Œá²2…ò‰”TBn'‘±˜ÄŠ!ñg×q&€ `È8Šl!Àì'P€’+° 2R,ÒªÀA“€$‹d@,ÀðØ´L¿7îìµè¦øà=°<Ç9Á§ ðàpÞÆÜ¸Áÿâ03UëŠQÅ8éÆÿñ”B´*{*~‘OcZEV£ç ê_}W<^ ß1Pí=ñmƒØª¡RI‘¦WÛíê1¸+¿øc©¦†ÚûŸä ¯™¦Ö7FÙö~x?|(GdŸtc„Ïhß1zð ˆaòU´µP­4Ï‘½/UI/ƨ@{öÚ.äÊ·à;–ÔEke[³‡uÛÎÞRˆ¨2ût‘%yA^#rèCÇVžÑô.ÓWKH ZC ö±„@j0´±pŒd¦7’‘x†¥¯C4 BìÐ ,E Њ?ÃpfŽã‚¤«3å–ã· ‹³ŒñâZhà€œ.¾¶Üøü?Ó”¡FAÝÆ;éùÿÙ›„Ð4õWü¬gŽ|*Ý6kŽ‹éß—¹N&€xJâ ˆ=÷aõBСU*²§ôJí­ãÅ:)Æ}Lʺi:¸[_˜¶ss1¸Ÿ ¹äLÒgUDZ(¡T‰N«» ›Í3}Â{@ ,@ÄÕTЙåjä¶̾C· BÄØÜÌ -‰¿•«ˆt>(d€r’ÚãÑRqÐø†Î¸›t{Ië qÒû»¿Õó·'P%f…Ee¯XX˜ƒ,‚BÂÈA¨X– @«€(`é.:’àËcoÁOØÂ*Y†´„iÅ@ u°^ÕW "rÃ05M5PÞîÎCÀ0 ¼à!¾·žýŸ‚™ª%ÔgÌ‹n˜ùŸ”#Ts¨¿âzi‹i·ãåv&S3ñÞ툚°‚€êèÏÑ:IeQ¯¦J1E¦,·Ã§:­×—9{<ÑÙÆ{}ÿÛ`²ìÔ§ïŽ5QÁ²\- y¯ ßߩϬfVP¿è_P.Ó­&+Ê"i²9sPB ¼ÖÒÜy`ºa¤Î–Ð%µ0^jJ–0CDûªÉ±¸4B€‘Šª˜wFÔCÛ€‘8žšÔ×”:1"ÖÑž <Î4^–BËŒmaÁd‘ÜÊŠá@¸4MXÉD® ÀI—`pvÇýs16Ã| 詤ƒ y?8T€Àwñ˜r^( ¾¦Ü¸Ü?ƒ3T)¨×ØöÜèà?£ŽPÅÁžÆ@1ª~åέ&'î2’>ľçÛÑð„Ô”)J\ôuÙ+:`ç¾w"{I;r¡êþê,à¨gã‚D#Ÿê”„-z,¥Ž˜Ò]4¸ºi±ÈQ°|Ÿ÷ˆ€—‚ê~­Nè.ô}D´zhåöÃÅé^CZ†m.C5%Š elÁ0l½Cù \˜èÿ>XiZ´£U+édÕ™‰F‚Ìn­,*5ˆfPÑäL5i. ˜ÙQ×3Ìn€‡¡óŽš_2RÛh«×eÊ,Óž½$½ëFïâ]QÄ®w|µ 2 ¢(.øÓâ¡„0¬WQB´eˆ¨4ãº}e+,šâ¸fFYÈ€q@2]]Ùà¬åŽR =mÔÌ܃5£Ê›MYÛ•E2ØølÑò@a’¹©` ­Ë€XŠvÀ$@!@&±‚VCrÖ|€õÖ¸Wÿù¦ÌÅþÔØÞgƒûs›Œçp¾†Hð“Ò²ø(OD¨ð@;ib«àßôÊ?ö…§üA§÷õjy]N« à¾ÃÈ•E­GU:×»•+.Ó¢ED4IX÷RJ¥LfÆpVKÿÚ†ôLŸ™7úÕ’¿Eû ¢=×Éæ"BD) Àv»{uBnäFD–#ZOüÓ7j-¨¬U´€ªÄ" äŒ6ÀS çÜ„ìæA ÊMÞœ›û7¨B9Ðä°êNÊCs¹•E“å-°g@Ý*DaU«c„˜)2£BÄñÅ%Ý\Ò~´®3H'}jLzQšw¢ªË]ÈfŽÉµÃ¦‚f?™Áâ8ÕÑëÔ—®Ç&ãf0™. 7 2(.\è®8Ð22Ò°sÇV•#ª–Å‘öÅ´nMƒk%›PÕÈ °°‘ž0’À¶ŒJ‘J²*L©"mÚB@l sV86¤]jDk…t] c„  b@’02±„ r+)Y!e$ItTV ‘ÖØ€BVDLT Dd@Qj”Á ÚºF€E~çÜh°y…¶±l¨[1ð¹aðßÞ CB­ø¨QÍÃ#—r.Dõ§"H"ŸÛhehÍ1I”Ì@ôj-îùBÓüÃ3®qmOµÕj´ul§á†|´4s‹9PÀ—†ý@½FgIXýÑ[ƒÇu´-«?ª#ÕB‡ä¤™eM1I"jŠ5eœë¢À:Ë¡q  n=kpaDã nKh ¦Dî¥Ä«ˆl ² 8°€TÝÕ&ÀÆ¡€²×F@¼¾å&"} jƒl0„Kù4(Æ!0`áÃò æ•(ÂÉ ÀA ‹nâ{ 5XÖÆ °¸€OggSÀw&¡€cb:Ã…ÿÿÿÿÿ&ÿ0ÿ0ÿ8ÿ%ÿÿÿÿ$ÿ"ÿžçÜÀú„@…õ ¡ƒö¿{ÀP jÆ­jmµs·že>L®ùƧÞ#æŸJ@2§€¸ÍôYX¬âT˜ÈœqÔµ÷tn'÷š^·Ñ¶Žc›ˆß¨Š)Õ,~ûùLÛôÅÈæX§­´)äRC‘¨›ÏBFG~ÊͲ¢€±8({•ØÜYà »ç6&&B¸Áôj%ê‚jYݦËJ1Z W±&`f•“Y¸mðÓ%sÁþ” S¬­vË«„ pÒ*aì‚ ÛX&ÿ1ðÈ¢­t£ —9$v61ÈF„#¤Ñ²öIG’ë ÐÒ @@"  ÞçÜ0üï gëT&ÔÕ˜÷ÜhîÛB0CI¨ûZ¡ Á–ʳ÷rêÄÀ>Ð çX3'buÍO$QÒøãÝ»Ù`Ro\åø×§Ícµ3 V6ܺ^—ÕÌ> &ÉRŠš…"¶Ç^€Ì$wXâ¢U.Õ5LA R£€DΊcG'r”SòþJ@¾ž8 2‘ú:. (:µB •ÖPÓÄ¡ÜZJ N¨jz¾޳meC^‰-0>¤ô¶nÆÀ hT öK>Œ& £¸ÈY*H0ò]– $ ˆ…¦ß˜M¥, +–ÀrʶÀ-Ñj#R5€¬à8xR84)Zø²ÿÝ›²‹JêSüƒYÿnªì’ªÔOñÆôú¶AÚoÐx­¨ò9Û¨Š÷™*3 @)[Ý9ö]39|H>9+=ßÖµ·¡*a.Ó/ƒæ¢ùÙD¯à³T&#Þ«ñÙ•ÏÜ}û3[iµÇ²,Áß5ì†FBk¬}OÈÝZÂLÂŽµE[ÀZ•¦œ[À…V -Ô2Å èOadÜ-@Ƚ—»í¹Öê±ÃîF>c@”N KfM¨lš ‘-½J "ÉRì bHF€AL¨ôHÀk þÙt; ïŒ]ç À‡ƒà¯.äv×ÜHö¿ *u¨WñÏ9üso¡¥Ô§ø dN4}«G €ÏVÔ$€\0­8úû6FëV…PU)ÈEÄJ¾r7š•€ó4wáWÔ妅X©×I¤Ã‘RÉ!c*€{µK@kÈHd¡ÅÇâÚÏP%ª0¬W„¡d›o#ªl"ömÑB²e—€Et.%`± "¢j­ ÞéNYƈ÷@˜là»Y €.TaW(á¶VAWà݉ȪOkÀæßaÇtU É’ˆlA("ÚÄe„–‘±bƒe$BȘ @)UH)pÀà‚3ð—oß\Ø?Ç>Pp°iÁâMáBçܸì?U ê¯øÇÈþs/‰P j†ê9Y9Šˆ'MõØÛ+»˜c_ܺüf!/@‡6?;êÖjª”2€Hj{­nSržÑàWsÌTdÚ»äÀ';Å(–cÄG¦%ÙxPc¾À‹J´ø| T7Ù¯xa"œ¹GqQž0Üå‰A¤Ô«ùó!–»"@P*‚°ŒˆH¹þÒU‹'†ýö;6`s±e²dÁˆ®ëÝ@AÏ‚ 2þ?1Óó1bŠ0-›UGÊf0^±`€Á@Þ“O!,ˆ(ìB;´cØÈ­€p:d­q$à<@/Ã]Äõóœw<õ8Ü'†üÁJTƒÀ©C šZ€^çÜ0÷Ï]@–­yt¨Oq®¹ÑüÿœM …*õ)~´ò é„ßt‚8z›¯eC|È¡¡l *ËxÒóú^m>qjºøƒÙŽ+줸ÿ×ÎGêKö±/dD¼•Jɳ7pTætY v3±þü£ vÔø Cç™Ðc,ö€¤ Ý‹•0J—u@ÔîAHŠÊÙÉ"ãdâÉ„Š:¥LU&áTT²V‹ …h‹t)t®ýj÷ê?‚àÓ%qY ­+§nŒÅÃ+‡ š±±YI–.Ý4§ŠæI šM‘ à‹$ç™îÃŒëßù$Û½8,xúFÐ €M XÉž@×ÜHø¿Eh‘HÖó–ÃÿéÓ´Ì‚º»¨Ä'Çad„Üß}‡ê)`6³-°ß0t&±ÖQ:¬ U3J2„¬ Ÿh½ áª×Ãf»åt/^}SßG‚ï_Y†1øÒ É8R C~³;önæ'©Ï^À¯[¦ÀC¤™®lÛ+¦5Jì2»ª bõ\&“1¥E±m›rÁY¾mÞ7X¦³'KS‰Ž*ßFP™> ‘€¹ävÚ€ivý!gɹ7Š‘ŒˆKœPÄU˜6&L§, „% ÀÚ`ÚrAG=H Ë*„…•€< ¼e—5°¾œÿ®~¸­…ßâ_Àƒû™ÀæH†Ð`ƒxIÖ™ç½ì&dÒXÙžŠV >§–ÿŸ²C¤« ‡š±N¹‘ðÿDB)¨ß Ò}*b~1ƒoÞcï_Ïv=g@l£Ž¹b:©RUI¨ZJ[²ÏwõþÂï£e¬²F´FC>~ï³Ó¯€úû4‘ê×]VuUˆMÐJ<ψìÎóRêz3åü9¥4aŒ~µ;´c¥^.Dw¦‹¨¥¤ÓcçœK‘¤Æ{ Tâ;ž·jCjIþ¤À‹1†¼;»W–¾.®`ƒ‘®6`À"«1ˆÄñP7(t0­w ­7D$(VƒI@¤Õƒä W¶Ç –©Ã6À4àà ËÛŽŽwk¦2ß-Ì# ²A û¶±Å#…¤øû­JðÝ- -@žçÜhfó€RT[PÅ;æÆåþMjìi|YµMÊ|²±G|½HH°ÛôɃK’ÖPv@ìßlÍ:&Œ¬w7cß`?aŸxÓ²•“ãŸgPÅd~Ù/y£3+‹Ä‹{à(¤Žè€‚Êc©XB -aÍ®&ªŒj»6< 4b†eÈÐx±ÁÕa†‘4x‡ŒUX*ä`©Ö"†X·£Õ1‘{ÑOa,»Ê`æµÚ}p|–€t(!RUV*èBՠ䙯%-uŠÖ¶€ð¶<ð袠Èþßß;¿o,úb!,)àF`8gâÈR“ þ÷ §ŒBÍ꯸çÜÀþ›0 ÕÔŸÌëE;d.€w›z„h× @n[ªTÑ «"`I@œû’ugô1µäç^PU»qUÅÑ6É6ëYŸ.ÒOKA‹'‰˜F‰-¨‰¤ jµ´ç.ÆúGÏ6hvRõ½@­díLs“;(#T5´SŒÛO­4“‚ȳíµÖ[Æ¡»S, ®]†Ç)€6@Y— #Xd…ü”¬Ð¹®†Œˆni-‚,¢‚°fcÓ¬LŠY¥å2²”“.Qªm(ä5F,‹–€À¹ÃxÀ&ü©‹H©è`þçn~†PëÈUŽ õ*þ5‡ÿîB²u(µâàu®ö¸0æ fžªQWÌÄO!Š$ ôÜh°$Ó»–£ b˜â3isü@Væg,wgA…Œ7Øôb³™Éjüž³¦ðùi†`edTO‘F‹|ÿýi®11P ‚ºUB°ëFXc/¥§bª=//±,ˆÀ!ZaB BVKZ£lŒ†¬·}çÂ2ÆÄ8Ù6Z”²ÀÒBà:•°`!uk©r·† ¶°L,Ðä¨&À€€êP·4"®@b$ª€ ¾çžß|/”‘ÊÆ½ç¹®‚hJAMñ0?*³œÛdRþð.TN–öÁ¶a.@æÛè°AШS ± T ×<­§gk‘9¯ßi)h—ågOÍúȾ/˘b9éð"I/h!<—)~Çíõ E²“sJZ“ -°7lXM)@ϱüêý\‡¨2ºf 2p{¢MUÄPmÚÙˆ¢&=k¦ð"ªÈ*ÃÈNF6 Rˆ”¢uÜW€~ÌÒmˆÕÑØ")¯"´ŠMPÀu¿€RC4²ì  PдLBÄ ÍÚÄàkެ'P:ޏ+¡]@ €dBÐ+`ôÀ$°€Bo EÔ0ðŠŽÞçnÿs ­©tCÔ«¸çÜHð-—ÌÐÖ&ÔOñð `ö´¶u„¥ˆ$%ŽH•)Q@*‰øZ:3WI·xK\dÅ$øh¹@£œ¦‰Ö/D»Z–Á8A7è$Q³Y›y%IzôÉU‰Â_²º®»L¨ó©e²V.tä¦@ȺªD¨Ÿa¶TF)ôrЭÔt'¥€¾¶ŒJé*Ä…ÔbÚÒ}ª3]Ý@бC­  Ü1ãf–)ںϱ³£h8KÑ"!†Pë 0(#‰ô±L!Ž6Šb@ÐààÚ:ÛW¯ ;ô ×‡Ì2ɘò‡± ×BÒ$@ŸAÀù®Þöã~<É1` ÒšxÿtµP þæÜhþß( m£ÊØÝ„ü‰ ¨Ò¡^ÅG‡zK©PïDÅ3ÈŒ xwg? MÀuî|›õ™ÚI½ª”‚Éb_ÄøØvg†æçÃfßœ3g¸;ö@›‹ 4Øü§¢éW†‘Qü¨ù©¸V­”«Åî% ÀÌ:}eΔ¸Eäº6²úªºb€Òû÷U<¬­^EHPXg†hD(Oë9"’ c9^“ŽGrgb©ÎÄVa€ ÙÈRÀfƒôñõ4 ŠÝ}«@¾Ž"ãD•ÓcK¯è°`уPh¨ JSë,€€ƒpàà@Œ&D ¯OggSÀ³&¡€ccÔ¡àÿ5ÿÿ8ÿÿ+ÿ þÿÿ'ÿ-ÿÿ+ÿ ÿÿ%¾×fÿwº’• ê§ØçRþÛ¤`m¡§~Š9jOS¤hMÖN±Vc³SÞÏ”3€þØtƒ_€¯ÛÃûjJTUM™ðëógrã0^L»Úq_ûÞ›)ºr‘ˆI½šÛðŸK:ÒÎÓøÖX4CälD‚˜Ñé @QÓðBo¹c¦êœZE0Ï µBo¹C èÌÚÿžjˆ¡JAýë Ã3ÿC •Ò8õS|Š£ÓŽ ¦¾H˜ ©±Ï´é6T•’  ŒÙé½ùŒª$ˆ€À°öï5–U-«÷¹eðÚÈÿº}3‡§C‹G ‰€A]ŠôsuÆ-jÇ¡Jx(Žïâ ERgñqRÄ¡z™®{”d¸Í&ßÕnP™ì^e…Ø\ƒˆ1² ÈìéÔõ~vmÀEÖ\[>ÐdBä""ƒ F^„«ÉýÏ5Áë1,º*0!,!ðùG%hqE"¢¿Ò!Pˆ0@I›ÒØx@ô@@¸Àkp<³å¬ûð1žÃÃá<<oú„¦$žçT7?¥!U:ÔO1¯¹ûßKÚRAýÿoNs@z¸JBÿ|»o«8âÅ‹Š×P©’€hˆ^¦HȨíl͹7¤å©›û“¸-!85Ç?_0{%‡|Ý*8¶x9ë.×·¿“û¾Ìµû(ºÁýÙ-tH€M¢ûQ—= !wÑð  ±™Ø«9";û!€®õÞ!¼ÁUÙ¿ºh±ÔC‹L¡«â˜C a< >n>ÄšeÀ€€ŠXL¥7©„"ím $ãŒ7Ø9_Õ±,à cláÅ#fdJHe„2ƈF€€"ý+Œìë–9Þ°åìÞvOº*qÎá™z3îÜYÆ×0E¿YÌ2lAÙݪXñ` ã)~m)Ðã¾×Êþó*ˆ¦Ô«˜çžûŸ}‚P ê3ü¦ê)ãp,¥ Êo{ÌØÙÆh“:T•%“`i$0wÐ|I\FFa:¸ ‹+Û÷ã,%Rœa«n”}«F *{ymŸ-¥¥Ú´±Ðl„ý1›W‹»ÿ[:#cÜZõ¤9(H¯Z:#YlD¼*š%åÝÒ-@ï€È÷K1#¯Ê.z2Û³ô{ôaI~œT° BcÛ,bxÀ¦ 0V„ˆE‰b}Uä.!°½"–äJš´o#ÕÑ(¤…×즨 …’# À\0ÀÝãg ÷¹e×ݶà§ð¼;Àb]ÁpÐ,pSfò—ác$¾·Ì+ÿ‚V‰p͘§þ;]”‚šñðPgìñöÙ{b³_½Óù“€ý=8ÞÀ±ˆX5¶á«NÄ«*!J• ²&䟖{WÈ65ÜnMvºü¦ µ.F¾—ù⺽Ô¹h}¯hFäÿSÃÍÙ d¯. g&x 8!L‘T ÐAxTl§b²ñ¡Ó<‰ƒÏ/zEÙf:¤T(¢¡A¼Ó>`û‘<©é™‘2Š–_ÂDh³ŽeÓBkn5Ž8ÿ,¦o,¶ ì -ÀâžI¸¸u¥ª(†q€Ú!ÄQ=Þ1H-¨q„€_Î $Í€åì–U~±, žµ4À€)`Z©{©C!¡ ;È ›Ô•”$àp-€¡þ·Ü0»ùUnP醚âsƒ`óG¨zPÔŒß{pÙÛl#Jlt‚@% J Èëê÷ºéVfȶ_­ÓƒE|(â¹ts‘[\rˆ¤]nŒÀŒul[u££yR•œtIÐÈŽ­ŠÂÒ¥)+FÊ…©ÆZ¤õz ¶î”†t .:¯`CÇ5àг$À@¸zwJd®f=aè)E₨“®$ ­´´(y쇾5ÆnL -x°™Õ€ò3'hŽøN@^H %P@hx$DX‚€1¹£\ 05…´?€sïU@¨QÝvƒ(‘:b(;§9Ϭ >ØÌ¿OaÔ55XP3>Â?§â*Ê„šâˆÊ4ÕHd?æYLùîŽj2@qÎrßFT²%Þ‰cE Îöï[éñ8`m0ë¯?½ØÈS=Ïúô2’{÷ÜøÁ0ÄÑ¥›=YÒñ ëYD%;½úQÐQó+U,Jðv¦¢2n­ªEV¬ øye¨B*.S[0(‹×+¶ÂZ±`‘±>¾kÇàG‘Áˆ.äp(ª&ØHh(‚Lf@Ó Ÿ> %ÁË›« 6‘þ~³a)ˆ<¬±I„ÒR'w ȰȫL„,ðÈ<C ô$ÅÀ~×ÜHfó¨0(;4Þ=7’Ý<ª eA“ê=1mR\”uËÈc_¬ÌÀä­°tß·9¬®ƒZ'¨ š˜˜î«R?yöÖkÍûÄʤèërq N)Ù4€j­áH¦2!„ôÓù\IS-¨³Ö}ƒP°P Ío@[uœ«tÈ+€Ú‡rD!° ”Ï[(U£ZÄîD‘á¨q5@Ä¿Ù,§ pMŠ´ ÄÓeP±Ý Yàfâl”_Ňž&Ù]ÜÅZéhB_‘ò5 ZR6AÕ À®ªÐ€ );‰ƒe^0¼!~ˆåíþÇüÝUG¥ƒkýã —û/ª  ì©øhµTºó,ß$´Î€nûl}ˆYUUR‚—Lv09ßÉävÚl¸@Í˃lF§rñ½×eÏ B¶@Æ-Û3`Ôþêe¥ñhÚž½B^P /QúÄx¦bDÌz‘³¡JÁ°\›½–o*k7 ëq² 7BX¯tFÕˆBQWf‚†ÃFp¯éP•Èe,âU€Vw¡9 Ä-–ͲCC ¼Š¼ßŒkŒX C°‘BAJUdƒlºÄlHVÊ»! :T‘q¤B “TØSP¬Bðf¬ãÌ87þQøäÎm pëÎ,8ÞÂ0œH€ƒ54àq€<þ×þ]bÇÒ•©Ÿbà3ŸùwuIÐPÊ8õW|2N­N£À'|êS@*¡\½ðúä« zýrß½÷u¥PUÉL¡²ÿ·FýOAZ|©3+°’0 /fݼÑõ/<+7Àö-§¬áÏ}å®ÁÅÚî’¿&Æ‹… yȬ‹¥Ó{± Zgo]€Ð$ÍýáUŠð=w@h ú)á*IY#Ûš¢PÙ’Z(„5«íÊdž_Sk.€(VD¤,, Æ…äF×o™$Øâ~´ˆ~ ‚ˆ"™ŽAR@L v“¥lÙ¤…ÿ!Í–&>µMúîjÕP´L”+àaá8ópo?þ.¬ÿü»s—ÏZ‡õ½ÅÛÁÕûp 8Y‚p0þ×Êþw–3MéPÅ>èÁ?÷r„RP?àß0!cí”õºô È׊}ËóQ',µJIˆHqT~Læ2G­-öÂÆYMæÿQ¢ÀtRÕ¤F®Ê!áÇ @¦`Òo{¬ö dý»Gb²,Ü>sïXÖ€4$ ˜/'H· ®iäàó ËÚš…%Ö”,u-^£¸³šD¶fUš£‚ŒP¦œ+¹–Ñ% J Ú”ÀXAÕw{™‡šLƒD'Ð,w®f¨fˆ®XŠÀ`•ðÚ{þz»>àQ¢0 \ùí •£QJØr"«B^ „Ï8¶<,2ÅõBNNâ.›¼|"æ,†@ Ádæ{€ž×Ü0³ùÖ„ºh›쩘çÜ ³ù ˜¦æ„ú>€"ª×“ñm“Šv¬-ƒ+çߦô÷™wøhXU••ÀfWvòIì³+âŒßùɸܤ€ˆR†½Û—¡W‚®ïüI.¯¯´Í,(±#ÊȪ¥Õk^:WË(I˜Ý ΜAm0¨¥fât'IJŠND¦«¿{Yb£3¤ŽÃä šƒ8ë#‚ H›ÏºFaÓ€p R§g@,€ÂÓLžØÆCl)XA‹,©"ÁNd|QÜ*4.Ä2 b%’!Æ~*BIh ) #5D¸ccVÙ™@ À_†O†~3x÷é–¿ÂÖÆÒ9so‹K€IÓ½k’ o@Æù>×Ü0÷o‚Jêgœsn$óÏ`*Þšñp{œ°$´.@{Û§¯7'æª*Ó 2PõIÐóÆÅ•cº»ÍŠŠ·Ÿ“š.îLõ-ãâ«c¬šQ¨[ m»;@ËÕ.oÐÙGìÿb¤ÔN~¿9u‹ÔžÑ¸$ᔫ°Ž) Ö_€»£RÜï_%Á㨖+¤sAò}í€kåp›ú]飠X.èj·…ŠÀcàê[1PYƒda[¶Ð$¦‰ò6UíxÓnaÁ{uDÐ@E¥u÷„xŒ˜€ØJ$=a?r E9ÐH6 €à’ãéó€Ã'À€˜ò  Ó`tØÌÿž² ©ÛQWc 3—ýoƒ •Òu2|lœ»£$t¿¨òé+NÛ R¥h P2@o¸árÍ:ý• »*‡ÓŸ¶«[K7F†_±‰¤Xû§T¤®ÑБUåd˜}¡Z„7}£T6kÝëÉÉéÀJ€E®VÒ` 8<8àÐ0Mn@ PÞÖÜHD¨T6Ôghsn,ÿ?QIP%¡~Š?5µªVdÒoúéÙ ¶†Öè¾MßÑp(U¥”€U "´ð°)„L¶—+¦‚o1ª‚È=Ó’-ÇÔ—HsÏ—*ª XEñÙx˜¨£,ØM(n@9Òê7ÜDS W+oEáÕ?Ü)gí¡«ìº%϶”=92¤¨O–±Û ž´P½›…!*‰‘‚7õ'P,ØB£ž[C®ÈSQ¢| @DH%B!À@mϬ ›n,Hg"60@à°1`˜Ç‹…”P*a@8=¹ëò@”Q–‡Và㞸eqüßþÃl¹Yœ» \nØ à©þð@ë3~eOggSÀï&¡€cdÉ< ÿ4ÿ)þÿ ÿ"ÿÿ ÿÿÿ1ÿÿ+ÿ%ÿFÿG^·ÌeÇ3Bß®”úŒsÌ sÿL „jõ? ”•éʔꜬG ´Zï¶ùü˜â${:b›³m„:!dJ¹J,ð¤Øúî½zlgµý|ÝoÌQ¢„*³¸œ!dwöt¾â»—ºq. `)Á~vî4û|МCÎgãQrÒš©'mwgÇõ\DF${å¥ FÇ7˜),z/3\¦ä—eµ‚’€ @ŒœP9IÖÙo‘âqÖ•³Ït]¹W¸B³'{È7{ÂNaf8ƒeÜeÕ†T8²œ°)RJ¡ÈIP¶0 j-Ž~‚À@1 ÀÑ §þsà—sõùÝÌÌ@ÇYIï<†>Þ¸»S÷uÌ H?üò%@ò_’ THÄÇÜhøÐÈ¡¦˜ÖÜèàÿ‰°HÒ¨ Óø²mM»3ÔDHE!SÖ¾¸|.ÀæÛŒ–’Ò‡ªª’ˆbû¹†“ÜŠ³,£×]­¥~w*HKÓµ*ÅçÑªÇ *_ðj&Ÿit$ãèC yXÄÖRòž³+B½# ‹Ñ„Fó^í|; žE‹kàó*+‰Sˆòæ1˜Íò07°0è)ýÆ¼ŽŠ PcUWhVÀì±}hOç=×Í–Ø>ó&_A‹Dzúž5Ë“XÀjZÂOy¡Ž )í!E@…¨ydïtRâ¦R‚(ˆhph$ª*6$SæYþ},[3kc ø+¬Õgz$çĤÜÛÆ=õ,õA%?Ÿ*œHþçn…¡Á´BÝÆAè ýï&`+eBÝŠÜ­Ì<‡88“Æ´·@ bÏó!Þ8(!(/Hˆd@ýG}ÞWû‰·{3ä|†X¦’h®t`µÎ›>PLUuúÇÔHæÚ8r"1>ª¥¨í7Û<ã@«´ jäks¡‚EϾ® Y“¤U„?/Ñv(Èej– cÔ{Ñh) ¤(¡óœo’R¤lK!6í$èE€PÆaú¢ÎUq9À¨fQ nÙ0 P¤ÝªÌ—¥9Ê= J©Æë*A„t(dÿkXÜ!„Š0¸phh‘ÀQ‡‡ šPá Þ÷Ü ³y‚QeAÝŠyÑÿIP¥C½ÆÈSõeO»}cºKH®­÷uí¢Èd¡ËhåM߆“fS•€ ê_°ÞškáÛxÒ#wMk«L_q@ÄûÏwR(1Z”Þ'"€Ø¹V?©¬ ë0¨£ˆÑó‘ €Ô¾mÌbÇV 6€€ÒúZþõlh0Ò¿DŒ³:B‘V pd¬´ Z„X[‚Z¢ €)p›¤™ZvIB‹9^`êH –kБÅX!WàB U,À1p€ÀXpÉ@>çÜhæwT*MËØm¨Ÿâtã3ÿ¦C˘`Oãà€„½é·a£fµª( P)èWØsÊâ1©M‚{ªA·(HX5rFLIïp9´ÈWfÛôlá­M$ññ³ÈQª8Tw×aRý í¯º ‚Œ;ãÓ¼¡©µÞS™UÉh‰#c­tá©G0kD PƒE£@† 1Q+LVYB]äDV"A‹„²ñ ,  ‘#% ­§C€…ûìF°) Ò‘D` eªPÀc®Ã±€•œŽP SЖfÍÏzv`†±à0X ÀË8 >ݸ̿i*P&Ô­èn¾MZìP%ò Dž6!£ÈOÜÑJxLÂu´ò­­K©m"P h_ÚWOç²ñ¸˜a³î†ì½Éðõ§D–”2?1v½ƒ Y$Ï5G­ý%I¸]’ûÐ@.C!­à‰.iôµÒQœLË{e¡ét¹QDœH pXkÅ6À’ ()¶l°žØ`³ $AÓ$l¬`IÍÐu“%#EmYf‘ ¢[hq€‚ï¥ ¶“* éŒE*ŠPéR19òw×ÊA:‹ @Û -Ï àЫ¨@‡`a€°T*ذIcA×ÜHîOFQe‡*cs˜ýwC 4µcˆ:+>ÙëÖŸÌ¢µO¼Cù™‚½BÀ}rß:ê„„°†RÊ€’q½®fðJ)?S&½+i™ÙvîFðyçæEÂÖ%+¹Y¯‚«Æñ§ìÁdƒS*ã5äˆ9—sNB)änDÒÖ¥‹Ø6l&]Ž:Ψ©è@…Þwpn¥ Š¬1×ß+–0²«c-ÐÔØÊÉšƒ¬JŽh;+TY€&b妭Öä¬w,gW†=s³· ´ÉÔ$¦bõ„{þóh 0Z ‹p@#cd…r4P ñ\<,ú£ðºÔû „‚û^çÜHöâ¡BA}ŠsÎæþ'n ª%Ô§ø”E%#b¹kTGŽˆH ¯Ò¡6)Ž/@kŽÑ¶´9¦ª’"ÔËë/ï>SýŒñÕê¶^èϰ®ÐV–.>|W‚6§=„‘ܶ*ýŠ…ÊÑ·¾RõŠ·Òªrsi­¤±­‹P×]‰\žH7 ]¬Ó¹á±eåJÛ¶ѳH €ˆîZ8W°VÏ}ÁX9˜ñ€»Öl S\$¨f`Ù×BP¨î&é¹”)6BŠPØ„– ÍŒÁ‚5¶m ¥3»©ˆ¨¥´ÂÒöàHF˜1A¡pÀΰý¸[<+ÁÁ,‡ß#àÞ7Àá8Ã&À1–ÿùiöH,‡þÝXøEhLiDý sÏ…ÿx¤ †J õSü¼xn9É‚ó Ðä³­sÍ%¤* ¢°,lÝqµ Ú$—MEç_~ Ä%DðÖlñ _f’nh:÷õ´ì‚†•£Å׊=Çýúó–aÌmVÅ1UDîî @‰Öt,´x– aý¶¥¡qá \AŒÕZ@¼¯Y€ q0jÔòàJd½…B/޳z2^Wõ3 Ìú‰vwÍšVØ!t®#@|†B­Aàè–€DáB1j‹B# BXC}3™˜?v.3fa,à`Á:Þl@‰Àž×þ·» +:Ô§Øç þ;]u«Ð¡>Å ¬·NT‹ÚcÇÃÊÌ`Å ðteƒq|êý ˆ1ê¤R‡ªª2 h–Û^É j.Y¹ÆèWður®GÒ|¼ñv›Ÿ½è˜às™IKWZT!dŒG`ªìs yïNâ´|æHOnogfiÊA{1?‹ËFúãÂ{¹„„¨`¯bUÄ0²¢F°t€h6€æ¸! … FÄ€§–³¾ÃƘ™AB2×a Âò¸V@`ÈV€$S€ÉÃPÒ¦œHc­Ø d@"`iwþÞ»ƒý†±~ú”Å1¸p<~Yf€†?iÓØj.\C9üR^÷ÜhöV8B¥„úó˜Ëü/cA¥„úŒ?€ÊÍ¥'±×Ê <ºõÖbÌ ÐŒ9-\1!LU¥@‘à>wƒ%)}û‰¿fU=јËv ”2µ©‹8oI^«O· ^BÐÒ[Xhôw×3w5\ad¼ÀÑf„°æZ³]i ¼¨– é ’)Q½®¬¦ aóó·'DȪ 51> ¦ëK}S–¤iÖ  qññx&sé^¦/[&ï‚™ù²b´‚Lµ D§Áë:P…ÆÐ­Ô1@Ų²!'„E•`a1°;x7õŒi¿ÖÆŒýäpL‹÷ŒJà<ÞRY‘/JÁçÊþ! }{i&{Ë!ûÿl¥hŠCÍø@»Ÿæ™ÈxZõ>:võ—Ï”¦) UXäõÐÐäûècGª¡TH`öOnö׺ÉÉ¡ʵݟò»Ë™­'5ñ/A²•'¯å•è5*!…*9ð>ä¡XT 9Nž½tÐf°ZOêßÊ%±ê¬FæXŒJ»;;µƒn]2÷2¦tív° lMdt¿Cöm©Öýžv$d€EøìŒêª‰Én<=òiïÈWtçd ¸9ÍP¡Gk¯…bjã}J´<ª!iÌ@À=p€KTI¦™ òÐx^Bº†ŽÃöpy¹å’Ý’À`p ²°¢Kà@Àt¡ zŸÕjiž–ÜøÜïh)­¶· ž kÉMÈüMtƒrÀ;ìÛÖèÝâð©§WY{¶¯3 3ºŽ \%¢ì]InÕA³jP367Ì1å} ¢6ל¨—›-33=îy6’÷ ÒŠÛÕö«ÓÞQWµýâZ!86ˆÈòV @ç‘ÉR³Ráa1øÖSEìü¬ÔÒÍ»I%`ølâ“YÀž7¿¶P„u‹ÙÊë…ÄuNM.\pý¼À ¼Õ­ÛÚ.þv¬å4¶ €D Å‡•`ÑT F-)þõ¨$ƒíH’À`; m#é,R’µ¾Ý IŠ$€KBð&ÀN{óº (‚ÓÚ­Òx´cޅܤüW¢;”ö°ø…ÜøÜ;êuß`ˆt·³õ|Œù¼X¡¿ë·gÃCäÅwÓ AGÇ'0ûbíùÖ–j¡L’ ôK—ïárÿ¿FΚN}Øá_âp_Ý{_¡‡1åm4Ñ8~Dê}9ÝØ†Çïý°Ï ²ìî ¼ýÐO1G¶òä¥3lþ»;G`NÞmñÆ×žôÔÅ6ÇV=,éÃM|R€þ˜âß/ø×MdÓL2ÄžÔáyÔ™ÜäŸéá;›ó¸Š'Ü %ªk®I(3QQY0 UTT‘d²Š(–ÁJÒ‘EÀWÇ¹Ž´^Y‚ey1X ¡08+¨a€ÖÅ„Aˆe0(\AÔ€S,SF‚ §sö¢O]PÍËm½Ly%äž…Üäì›ÂP[PÅ,䦄ÿ¨MFµáÀùº]Ûw­±ñcÿÒï €4:EjsÇfŸ­eÍ4PÚ$¬Ç¥ì+¹·¯à®ðWO5½Îv9ËóÝåÞ»èÉÀezÊn”»@‘'”oýßé_ÄŽxï@iG¯X]é¦ö ßú肎Ÿ ÓP œëg ß2ã\³«ñ¶EÒD'ñ¶E…8Ì{LîŸÑ$LU®ûôÇô ùúìçe;mȾ7Ц¯÷³¯oº¸+÷~)F%’Î`ÃÆWÜ»ÿ<àÀbØ) X©=­€Þ÷\U¾þøÁ8Îð³öfïý rï Œ€Xa*,(fA@9!‰B8!-ü)5d\³Ú° ¿©DИ´> € õ¦_OggSÀ&¡€ce»Ô“ÿNÿ\ÿOÿ^ÿVÿeÿ\ÿ\ÿOÿUÿbÿa>†ÜXæ÷›P¨Ù¡Þbr“Ãÿ‚2A­ø¸² î}ÛG³ªîªª¡’à­;ƒaˆçá_îOOe¤d]ßœ 'üqåï¾]ìæ ¦zñ;±?NhS•#mŸm‘ŠkúÒï>]{{ßËÝQ±tœˆw¿¹E©@}žŠwÍ9êïvòð×ÌìŸwŸ“IÚkˆ˜«ñÐBÍõrt+,ˆšfÓwsæ&ŸÝCo2íC ‡¸ëºæ»<³»“BðVz>S Yï@ß_=–M_øŸý(®çÍ<+\øl`ÿ÷qÒŒBÆ_2Uµ )Ì:¦cñÚ€åÀç׎Ïc*_[À·¯5cÄ\ àý‡ÆÉ 6Çš¢x:è¾î»oGmTU•¢”b0CëW3I†¨cÐã“{^yi+™ùVeæMwgQwÑ)C6Þ篠ž¿’9zøþþP-µÕ{v:â§ÕOcØßûQDx¥Û¾û±Ã¹ßÙüΘ-¯›Ã‡€ÿ!*Ù½ÍÞ²Zêï÷3ÑÏägòZ+ž;¯CÍô0«'£Ì³ì¸÷ˆ<µ/ißö-|Eœ¸Íy+Éþ =ÝuvþÐÔÌ|§ ä- †~dIå•DŒ•eàÊßý3dPè¬J~ñ€aÁò ~šqÞÌŸ°W󫫳άS³»KwìÀy‚çðöÎÝNŽÏwŸV±£TÒ„ew2ZäÁA™dš0zIµ)"€¯rAE~†ÜHðÿt ÿ V Knœýÿ´I ÿ VüˆBNÏ^ÌûÆ ½9{ÎÏó®US¥T* Ž5qïÐrÿìÑ­êþzMG¹Ë3²ÏÕß;¦v_^­¦¤ò´G=7ã3—>ÿëØúøþeHêçé¦_Þ¿Óurɵ˜ ù,Øö¤Ò)¿¼Œá2E© úã0 B®Zl‹ß2ñÂà—Þ9>Ëž[#IG“ocÎ ýwçqqfzÖ¯€G5QÐÃt?ÝœÜõßÍ):Qª(Tôµ‹¢x_gØ‹€ï`äoHÔ©®‹4ô‡Äév¹Û´ȸ IhhX°.cß­Ç'Û×ABv“ùRàvΙƒ÷'x9àŠÛØÇY‡¦Dé PÝ I«h:€ïM¶è2ÁI  j>†ÜHæÿg óƒê µárcÁÿ›Žü_CÔ†?€7¢ïwývvgÈïy“'bæøê–óùF\€ó½aCUUUƒ@¬«;&G4ß-èÜάi°ï}ö|`ç°æä¶·ÒÿØ\)zt&ô 3§ÞS¾Èà­uÒsç翬º-õ­[ývŸǘÝ-göh~WiåßÒ§¯_‡ íÓÛÅŒ{¸Ò€¼g;-œn/ap™Þ̬ 4ÝyüüÄ5Í\dï)çÌÕ‰†œoÆs²ºª§Ñݽ÷$¦{öÙ†lÚU_ªVæÌ»ïïÿžkø÷ËüÂsIöÀ= ¾»ÁóâCñš—Ò凷—¯Ȇs  Æêeûug>\}®÷±y_·Î%÷swÍT´g–óì >ƒ`8ðpÓÀRò ÍhØb" pÈlô)Fh ê5€¾…Ü„ðÿäxCmø…ÜÐþ?¬Mö£ˆ¾vÔ†€[¿>}‘Gs„æ \1ç¨úUSUe–À”@çpV«a>wÃWük—i»Í‹^—£åß6 ;6÷ʘf•~©|³îÿ@¢éL[|vÓ@ß7Ú­fÜ=n9jÑâ>Ù½ ¢¶ç•¸±tˆxozob?Íîí Ô‡âƒ-2>î¯ï¦3ð æõ>šÙXúílqüû/° õÏälò{?4 {ýœÖç„œÌ äÐÐLuï'=¦õÇõWlR±>÷‹& Ìá@4slº›¿åßÅœÑs·PFrïQ‰ììLzÈïàCçM áÓ X°pçŸù¼bØ]Ï{_—ãò\@‡Û  ET&fÒ¿³ÇïòàXàžƒý³¨|‰¡¬V(=qÒ¾”Z°‡)O¨$`Þ…Ü0øŸMZˆŠ¿€¾jÅ*ä&æÿÏÈ€ˆøSD­ø ŒŸïï×îóJ-ÀçlO<{ÿmÎ߃fÏ0Ód®%û ·ûPËÞ¤NQ@’Ïí<€ßÉÀùeÈN•éµ3û «-È{r-„`9ÀQ1 °e1œ}ïÝ»ßæ‹ €à Óª!õ2 hp\XËãêÁÁ1ÀCZ@Ëü…œeµ ê@À–é3¹Lw€¤Š¶4^4r ž†ÿ‡%ÓUïjÅ)ä&þߢcÔ†`¿kÏÆ‹ùn}ëù¾×îï.~`Ñ'ïîÿ~©œòÀNXëÚgm  ”r|€«üwvžrQó™—ÜØè}›C°Oœ»;“•p6¦˜*ö!«{ÃD“#‰†+F¬”¨ð5ðÀ3€ÿµöì»ÄÜ3ãÎqy¸¸çéwÎÕqÛ¹µs¦g¢­ýM1uæÂݺ}tœÇ< y b6ºRþFö =çV=J(!à‘‚¡– _%&)>…Ü”Üÿ–ðƹ6¼Bn\î¢bÑùƒZñð>nžãO­~ÃË ¨n@w@¹o#*Ü¡ªª´”” €Ý‘èÝë1ôµ­uB- [-ùìg­êÓ¶qOOFqBÈ9´!#lóêàxe-k!“ëz[l¶÷w\gäÌUm‡iO~$pû}w˜Za•ç"Gp˜¶÷Í?=8rŸ¯×gy ´¼üL&žKø–›5 í¯x¦‰þ ÓFöâ7ýÍŒægv]Ã~{GYìžÔ;«Ï@ zÖÑ{}7uvÔ@ŽèêOË2ÀÓ3æûiºŸ¾Ú€ £ëÍæ°ùêΞC¨€ž\AŠÜ󋟳ïøÇÅ#À.¨[n±|¡½·ÖA±ã?ÏÌ”Áâ¾_¬^¶wíUß]‚¯wÎS€Pf# ÿªNhàØ4ýmv # ƒ Íþ…Üøðÿ½G@D½P+–!7þÿ4ÁxCmø ܽ²-Ë)€Ëç5Áñ¸ÖmfõS3UUJUIp²Sím£Ï€×íé`bŒ×ñéði³ Hnœ‡çwµ‡Ÿ•ms?}ÐI©e;¼ óqïÏ]-þ¾ß>#VûÒCf5 uÒÕ)‹QÈçʯÃÙ÷¹7L^ –LwiW§Ç¿e8Mϱ;ç||‹r&&Ù±?óçaÈ™~‹@dÿ=öþ¹î“lÌïÎþ3\³’ž¾OýíÕ0ð»é†¢e­©LHAÍ£· ‡Ë4Ÿ¿fÛv`|¿• Ð<ËYÜï´Ä 6h€g€+Ø4}ð9Ʊ¦î9ëíN/çó´ü~íŒ1X3þÀ‚‹åá°ÔLT’¨..”ã[¡µ\·ê=]ÁA R!È4 àÞ…ÜHöÿÐlú_¨ ÇÿOLi~ë ú1L­øúk7îÏ/®=¾E¼¸¸…³_ôãëpþº·Õ)*Yé2ú'=¹¥7«®?cÊî«¶u|j´m5 ® mFÊ_âhÁ\6Åë‹{™4áãOǹ>žF^gÔ?Ç!©è¾@tl~¾³k^õã¡óçLõù"ˆÐr¼v?»Dl£‹k‰×ÑÿEö‡ýãý<W7…®SdÖÕ½‚›þäÞ1TRÌ3uñ=Uóù>jàdï7ØJê!YÕ=×ð Ã2õ¢ÿîÏ—NØ–b{·€mr`zÍ Àʃ   ü¿ïoÊŽbð,N¾-ž›)ÄP™X`ÙÝÀ7ÞyØ™w 3Üóx_Àæ‚´ŒÄ-màç[¤É€V ù±û@ÒÞ4#çÀ0^…Ü”üÿˆðu(†!7–ÿÿ²?àjÅgÐìßË‹•òt€»ð©¢æ‡Ïo›÷mŒ¥ZUUU2 ¨uŽ£óæ»+À[=Ö›éûÞNð÷õë+›ÂÁ67ߎ¹wf~UÍϬ_£¥jDÁÂW$D¡Nÿ¶ìlè-¦w(åTÌs„ím×}ËçË…mض×ð§r8áz ½ƒtÿíúÌœŸ7ÿì]lzÿ1dîËo½åÞÌü€˜kIè&›©¼ùˆl*Î3gÎ̹LM%-rêÔj’¯€½c ß–k´gsÞïÀ漘æ®ù!PSÀÝwÐËÜ]ú».vÝ-Ï™ðœaN‹ë|ª>M÷!ak˜ä}uçdbþ™þØ¿Îiÿÿ™ýÏß=¶½Yf|]¹"‡w‚/›¦¡ý7.›Ç$*Ý© ‘hè:¤®G‚ÊÀ (¾†–ûÿ™˜ð…Z± 9<ø¢›ì7ÔŠÏ 7_ö¸¸2(Þ{<üa5;èhà´ Ðmß+jg¨5” U&Øæ¼+ý ï䀼Ö»üó¿–O +øhÔì{±6Zååšó³; æ.Ùû|ì_†ÛGk xÔ=cl•«<¢øaÐÓðæ~„íìȱêw{mýoOÒ¨7=õ÷JÊç5ÇÜ€ËEi˜¢+çúiJèm¢—Ã~óúhòÎ7ÀÏpþ !ïy—ŸÃa"ÜÕ—iÞô\ÈhNoþ¹ FìC&çz972°8;Û| û!ÃrÇš0ÛÏmæ{6«d`kゃÛÂQÿ]áÇ9¹³’¥ûÃ0†Oå9‹IÔpå›ü~ó€wà §xɇnh3êxgôýààgEøJˆ‚oõÀ€¨V!$¢4Ö‚ÖB`x²IxIOggSÀO&¡€cfÒ°íÿYÿrÿYÿbÿSÿPÿjÿYÿ_ÿ[ÿiÿLž…ÜÄ¡ÿgàòGÅjÅ1äà°ÿÃù¨óöjÃNøWâ8º&ßú÷¾@ÑyiྶÙv&ª U©R`ñÛ:þH1âfö´þç±Ùÿªš¹ðèSÑŠüÊIW·Y|³€/¾#YUŸ9Ý™ØaÝ/ôD¡b®wÀ%éÜŽ0{þðUl™Æ¿ŽX\·t<±1÷r  ‰Ø¯Þöýg_J…ˆc84☠*Ï­én\Åž*@÷»,·Ö.üy/ÀOŽ0‚úó=T•ñ¬uŠ>î>@wÃÎ~Ýè&Á|\ÄêßL„ßû¡C>} 08 €Å÷Ó.®Û[›c¯ÒMª¢äLÅÙ=óÉ=Æ4ç¢{ÿOÛÙ·ùi\ÿ˱;³nä{üÖ Œ;ËÃZ잀GÚ‡¨Î–Vüª4ŠÕ "¼m"«$¸„èô ž¥Ü¸ÿ7S˜È?8׌_ÈåþŸ±Jþˆ’· µáà3ï~ô9®Bw[_f_<\€úŸ²&~xŸi«JiHÀz;aÝ ö—ôÚ­W$ÌSpˆº»t’äù¬{vú2&»»ìÛ¶w È ”à£k]Û €¨ÑwY99ñÊVà KøÃ¥ªÛSoþ¼• I¼÷ õì´`FN_§ÅpË×euOÿL_™.§ n¾z<¿µk¹þgæïIM.ý䌮ãÑg³³òn:P‡¼ªOÙÕ3íÞŽ’Dîûÿ^œú${zꆖùnìOêtþ Sf!7aèÿ§#ÀÔŠ?/Å|ÿ÷“ÿYöå7ŽøÈ¾ÎÑ-iµªªª*༒x–ñ¤oéëÈË­sž`/ãqÕHGþšÇý´õ";h±Õßϼ|âÚÇÚÆHwX'Ë4𩢇ªž:Ì;™[-÷z~ì îdÎ(^ýÂoÅœr¾ïÐ…RQã—g÷‡+?f¦¹4&²Ç_΀¯q@oaŽª†8u¢grü=dïD2k23S4Žtõ6^ƒî‰-FJ—ýÝUŒÙ¯#ÓëÆ¡Â§P jíQ‘‡}Xf~€Éàã-fÉ$‡Ì*ßÝI 4õ§ æŠ±êÞ÷îâ,fgüYììx:·›?ùå¾¶M/N Ü~ÈPÇȧgÌ@;:2¼ÄåOÐ[uHƒ·7q™[`Z<…†mŸ=î§¢<¶'ÝFWÉm¸nÃÝ ~çÐMÓ„o§®‰7¥‡Öð3ˆ¾¯š_[°‘q¡ßŸ9så;±jwÓw‹oèµÒ‹?ºOÏ›ž¦{Èbß?_øu€oÀùæÎH° øÎîv‚À]8M“¼îê @©hax p°þZc {wí÷R>Ì8™^ fgï}ìÞÕdS_²öÅX[l{xàñuàÖÁ^Ž,¿¶ãG¨Hlg¹è(HÀ€U ƒð· pÈ_"¡ ª~3^†Ü ü3…ù±àjÅ.äÆçþ¿,•?P~XÔŠ?€ÖÃÈ•/^rÆËwñö9œÉ]@a_ëë£U³PJR à˜îÇ=šõÜú½—㥮îýüvF€Áã:ÕfÍÙv‹.Åã̸zØÇ°ÏáÌ®­Ÿ0´7TZ¡¬‰v¼¡IyÖVš¼PX#JÎÑ %¸þ…Ühîÿç`~ÀjÃ4äFíÿŸ…ø=ü¨P+þþ2_³Û»qDïÜ^yßù¦wÞ °?à‰êÜ}¹mõÝ:ÔÌ”R“€—³‚ì5n9ÉæWZ2¤#楗7ÅŒˆw~ /ÝÜð¥ÌOû£]x*{J¢¯óÀ k>4è0õÄšªúÄÔ=€ÚÌÀâÓŸ™¯å>x¶¹™6/¹ÍËñ¹LÓsÙO2m§ªÔ)Ç·óíp¤Ù‡}ç’U_•Ý¿÷Ï9§ä>;«»fà'ÆñJ+G`¾$?%s^H“j@} fÿç´ªè@|žËér}Ý ¹L' Ñú‰&ÏŸ‹ßó4ýÏPò™û¾ClS€É;J®ü²žÛ˜ÂÃÎØfú’ÿF'y5®™:=lø‚0>o³©wòd’ûŸ;¿ã\žó4Ðv6·Ç¹º?$iD3shÒ®[…D•%`Œ/ƒ•¾M4¼Rºò ~†Ü ÷ÿÄlòG§ú"ª ³›<ðÿ³\ÀjÃ@õ·-/ÖKOòûÏ™³Ëa¶›ÌþbFkf5œóÛ/.À»ûhÛªj(‡dÀ€Žmø—‰)¦˜Ãà]b‹ëÈ?kúµ|Î ãCuZÆeÈŠjȹdšë¶€Šfy3Ù{ò3‘ã¬TÇ$— OÔ¹Ï^æ©“Ï—äÆc;Ì`~<=U˜,Í=™IwÝòŽœÕµÖ;3}]»üá ø}1Åd¿ý‰{†„î:¿š®œ‚ÚßyU$½¾µ¢È¢¢ÓÀÎþTÉ¾Ó LΜ° O§.½}²çÖQü|Æp>úa|Ž“®˜€À ,üxŸ‡ >þÜwøã[lTÿcÌ ŽŸÌ)PÆWô4}qÒ<¦|_®ÍÇáŽÃÌûÀÞ퀢i£¤ßÙ4 <·DÉ섨~†Ü0øÿY˜Ÿ?P+–!7jý™‚ß|¡6ü|öð¥ÆÎ¬uÆìb7‰3³/îp Ê}Û™TMC)JJ@÷fnL:›¸›•~~íz‡ 6½ÅÒb­%ëXóOç}–E‡ú £¯—’s¡´ "@txç/öWý»D¾WŽðÙƒ-öžrç³ä¼•ÚåÈ!‹=/õÛô6QáùÝún ÊìÛä3ôPÙOG#l> —ë¥d…AÀ4ÁÂô¬Ûs)£Ú=³¡ófàû[Ú°QÍÉÓT^(ûÃÝóâ³€œçDMK´t¶¼ü½ÀqÏ<¾ÀD¿îØÄEg—]åy1}è™^xúm€Âõ¹Øqà¿Ûßbkš¶I’(¦¼bݹöàb9WøezÔ•R[faX>¯ ¯÷ÞõWœúEP²d·¨D¨!ÉŠI@’T–@>†Ühöÿ3äOƒ/ÔJÆËü?c"ÀjÆp{ñÃ{¬ó®þËÍû5VXAë«»ºÁC40ë6³z?B5BUJ)Iâäƒ^ÃßÚõ°WÒû©Ó®•Nk£¥][Šíû0§™³ã»Ôèå¾Ð.mž›dQ´S>-ÿ÷ëQuÍÙ{(â_ÚaËvþy ÿŸKò-IÒÍç9é-,áœáþoû<îBØ•ïðNu×Õ0Ñu™M+©dÈG9$]àùwmðÆ~½Y³¼Mܺ³hH ;Ãö Z±»Ú:½,‚%$@È€^†Ü`àÿfuù£ª¾Pv!7’ý¿™Æþ€¨ÿWuÒâÓ pÞ¾eáý «*e’Ä­˜tÖÛ!Ÿ°ýðË+_Æe„Ç5–Î3!9PàEÍHe؉t>ÿ`Ýt7›í±~|¹â‹çX”ÈNÊÇ¿ØáRññÐ3‰tq°»ÿy¨JÊëCퟠåOÞ<ê÷>¼öFÎÇSL±ü#ð·ÍLJC{îLj—É"Ÿã×çåþñï“yìÌ‘–í¯þýûÓ*<šf}³Çßÿ€¦.à9óê™z7÷Ð73`êïáóXô4ÉðÐÉ[$€.ßÛñÙÐ==$ýl5ð8ûí ØòaY¼…Çù!³wB/ÅÌ Íäï³³®#øÝß¾[Q?º #S †Ãˆ©Ì;=ÝI€nw±xÏ>fG r$5¤J%oè¬r$ÊT°`ys qS.xéš^†Ü8ëÿ锎øƒÚp ¹Að¿O$DÖùµâ3ðò¿j=Ü­7¼;…¾€ëm‡µª¡\I3Ô¯~ É É+oÀOÞ:ÜNöàãË/œ>HÖ5ÞS]艢ÚÔœ<Ë{¢ê²éÞȃ¦Ì#Íë÷_Þ°«ìY³Ò@tÆ„¾ëcKë\V}I¾fòÞ l—ÊìDLf?“0ùíÞ]3Çõù(*a%-`ˆ ²Ó¹ Š`zÄžžl8˜òýŸ–Ä°Î•Ç €‡ð ¬Eeœ xNÁˆº õ¯‘ \ʆ €ß‚}ÊS˜ÿ}ÿ>@¿Í8 þ½[Ö2î,—0MÑß×ÝlúUÝ»˜ÿ f™ý’ä°À4`Oã &¦@+lc—‘`ˆQVADÉžjUK@ÀÇC OggSÀƒ&¡€cg‡^ÙWÿUÿ[ÿOÿ\ÿLÿRÿGÿXÿ[ÿ_ÿ[ÿEÿT>†Ü0÷Ï]H‚jdª«›”ý¿£ Qñ§B­ø³üïùÝË÷ÂÍóÿø…å~T›3ºÿ½ë³.œïu„ Pœ3kÃêUU5”bØÏÎÕüÉGòºõŠÎÙ߯9~¿–šÿ»ªÏô€„™¿%aïaù+ùü²¯sD|Ò¡PÊ qìÈãÔÄö±ÃIÓ??óß/†ì_ÇØÍa——âw+Ë@]²É¾í¿¶¬_–ÕÇÜÀ«·í… ïógq±æ3-×õµ¨j gV=}¸Æê½§µF?·q²7Ìÿ7 ¾ð£ÿ8ûG&±_€s£ýÓµï4fÝwîs6U›‰@*µ¡XæÞ ’sf/``îØ³¿ð†ÇMqÇwð† ø+rS·¸à·v†µ\|d@¢tk…AŒ„…ð@SµR'VJ¤$ `HÐ>†Ü ÿÿæ„ýo¨ ÃËýÿ,?›¿6mmäŒ?¼¸=8‡ûJ¾\{·ŽF7øé/ïG½ß@vPRМ'ÜóÑYÐ0•R%à×›=f!øÑì´–9Îï«ñ«èßí×?_ºNÛ–ùhÛx:ÖŸùâǦJJòößü¤%ÃQ#Ä÷ËâEM!¤wU¾bb[ŸxSsÏêý ¼~lä[Ú¸­µAŽlÁVÄÀÑü;fLf>Ã¥BÀ,Àá$ðÔž"Ÿº)˜‡† #|3 9ìŸ0½S–÷¬©N\µcŒ‰b!íF}áͪ-6EWâ>û|*àÌvç™Üg¬!½`†«góë»™{»ŸøüânõôðÓrž$ù»òæ’ðÓI‚oy À8nš-¸W¯›_†bh¢5þ=i‡.Pþ€Ž aøf{\>± –ÜXþÿÞ4 Èñ¯6Rßîúza5C -Ù7[OnO¢·ìz.ñÎ,sšU½©¦<ù·†ÒòL‘ª'K bõë%¶ç2bäþ.ê&’ïˆ)²Üö÷rÈ lY`ç½âÐ7¼¯g<¹¹ÌN?ˆv¬&» 8“œÂg²®Öý³«óµá3Øðx÷ç@ÑøÄo3=ìYÉ ÍüüxHøïRÙ×5Ý0°~~€¾RÕó7ôTT}gËò–CÌ¿#À<ÈlüËÊg¨±¾ØYçýêY,ÀàÀ7¼5þ<„ÝTp5PRÿÀ‡ íéV‰‹¨Åzæþ…Ü0÷ÏKH´"ûgGÍx†Ü ó üƒZÉ3°¿ýòìì_›}ù€«< ¾`~»ÞBm5U•êJ5T3óy³Ö àuÎýØßµÐMæÎg­â‡rÈä5}–ó³>±ÇëžÓß«;ÀÌ-ÅZTl–KVMÛã³”SoÉ#ãëyx¸Ÿ¨ kæ! ð˜úï`[‡œ¨íô°B€¼þm‘,p'‚Ѹã¼G>?—‘û}ù™{&ñ¼õöó_\¸2gjª¶¼frà8§6=„c¶SæÈ„\¦¾ÿÔàº<»ÚÀÙýÒßÂÅEünf½*ÜOcæk–à³f t;÷Ò¶êxÀî}˜¦v€ùµÏH`Óì ÐÏŒ‘LÃÏá$9øË{ÀŒWS±õ`ë­ñ| ¬±ð™ ðüdÔ\ήNèwIäO„ZI¦)m€Àñð|¢>œ”7þ…ÜØÐÿ½•„€?¤µâr“ÿŸ–þA­ø¢mßþ8Î.ËŸžóÌ^ýeÈd÷ö+Œl ¾ÙödŽªŠo¢ªæªJË=̣Ě߄ãŽ÷sùÕo'•y^tŠæ÷f³ù:ŸOú×ÜäU¥ôXèð¢å%¶ÐAŸ\‡ióQSU_Çà4’ÿè$}‰ÒÐÇ£¡^Kðr&¾e‘Í|Æ|7[¾1ÁžÇHžs÷ôâ2à|¡Ðö;Ϻý’kÐ#[À=»”û™‚9YÌ¢†l(šb Ôç󱺎]‡mwÏ âÙ*²çjzü§Î¹óÕƦááy¯p°Ü%¬L †$q°6}ký‚J I‹’8³Z””Ô $~†ÜHæÿ¾„¢µÀ?¨Ã þï…€P+þÞ¿ŠÜã|ì¾]9{µ‡ °¯ÕPùÖ¢††ªQÊÜS÷pò¡7¯7ÿîîíþðnõñJäïÔh"^Ãh橌µôy¥P¿Ùö¶û’K?[LÞ}¬g‡TWÇ®Qom¥Wý›çƒ.· ï÷LL %Ëš¾´>çÓ4Í=¬W4ó²Õó/$2h¼÷9‰¯Ê»¾Íaû?$½ÞçžµE>8ßwws–=üŸß wŸ3u P5?@Î<qšs€Ü@­úyü²*~0ÊÏu‘Š `µA1Ôk0ÒJPElâvÎOe±cëC~1ô4–ã¬=ë8 Ìâ9f]Á€¥‘ô _f @X,O¬Ý‹&(M‚‚,MJf€ÂS ^†Ü¸àÿéª@6üAm˜…Ü„ìÿP+þF™Žõ‡w¹Vºýúý‘ËN4àÝS¿p”Û>·j»†ªªªª ¬>bÉ5ÄÓªž©;îp2Æù““%^;ÅÜ{jug}Òp¨@ý267¯v6G TB•‹ÕÍXnýôà™v~€10y © XP†_ôcã´¦¤±ú&É j"IÄ+x ~…ܤÿ?àjÅ-ä&ÿ? ÿAôE¡Ãg@ø||9ö‹3€»x œ£¦ÖÚsáѶ‰jU©0Š ÉøÜˆóf:tÀ¹ÔUû‹]¯ªxãS=­ „æ[– ß,çO†ùŽ|?éö³—«ì¦i õ ¯‰fãàÓüîßý~™Ð…$Ÿï™Dý­Öó?O|è×鬥SðÚðãžíi[€»ÐÕ?ˆ¿ôË%ظÙ9*çþª‰Îü´#lJ¹;úžé?ÿ<õÉZ;"¡¨9]Su_ý4QÞ…æôÔkr7É™úî݆ Ýúf%vn~ÍD“ØA䙉’¥îs€š^€upé8ã༵œÀ ë¶ï­aì¼q*Ùû^’âÔéü»®©cès˜í·ðæ?»bÌrlÕ‘‡whƒóF„ HXŠˆÁ H ˆ¥á†Ü0ø¿Ù‘¿KÔùƒš1 ¹Éÿoš0?-à+=jÃ?ÀëwãÇݼî./à=oÛF›ø%!³PUU€·m0î×Þ Oïf(Ôû?¤œK<™ÿñ4 Dyž›~ɤQŸž¶ÉáêAß½›së ®ß'_yæwaœÞó·ó‹ˆbß‹ÃéT"J[ªæ8cŠð†CÛ ¾ŸvÌáûð{Î$èA¥¡³Ã÷ÉćüþäxÌ"£uþˆîbhòÀôZÕÐ÷ÛÁÝ@ÓðÓ€‹áÎ@û䬂†Rpš.¦ùÃtÙÐÑálàq€}ï­ãsœž¦fîK߀þû‡m^Lðæo¬ÝYäf¼±|Ý…n ¾ùš„äm2·öÎ\cùd?ž{Ûž 4Ò £ˆ”Ðg·CFSD¢M”¡r²•=M áq†Ü ÷³Wú?ƨ§›2üÿKò§Áj#?€ÿ¡höÃë–@ÿü=¼ÿñ%9÷Ž/`¶`çÇ›o´Ž™†ªÒ&I^ÑÙ1üþÍÎm~XØQʽÚú{£¾Þœ}>Xrmé©îÅ¿ø ¹º÷™ýúPÂÖÓ\æ{k´Ú/[ Ž4Cöž†æ’yüøÚb¹t1¹Ö`’J—¾èvpÕ7æbù ,̱ƒMˆ'Í OöñÏ‘¥Ã—É-é×}ù«@ÿã¡¡Éžc6@Ó…ïüüò÷˱w³š_ÐOÏ¡3yÏî2˜é“òÕYóžöLßï^Ø'ÂÚ=ÀÃa؆¸ºH²³ùØ<ñŸNÝ¡þÏ]x1(%?ÛØ¾ õÔÏv·õýþî “µ´×0¦Ì9vA¡Á½ÓJ”[E$= ×™À òÑøÂ4Rcé. ~†ÜPù¿€^…èǵárãƒÿû€.DvÔŠÏ€—_ßåêÆ;€oÀi î6¢«j¨ É “y ·cžN†Î¼Þ·ø@†³™’°·Ët÷V_9x̼È‹ÉLÑÑúö¤ÁMO;u‡^ïœiÛ!jçõˆ†ºôÙUù‚„l›½±·~°M¾¾B©/­$fT:I°ýÞ¿v‘†AR` #ýÙ“ ½3÷R‰/èg‚Ï=?+9¦α*y™Ä${—¡µ¾“1ç‘!ØLSæ\ð— ”95( à÷0Àò{¦u:`ß;ùE¶Ù cËb€¡ ÏŽ<ÃÁ¸aP_|¦¬b×â]ÇX=Ñœ¡`kð 8 8ãI€*NÌc 7ƒ ô!%ÉIwWÕxq)£^]«xY†ÜpàÿæFþ4øƒZ± 9üß‘ðµâ/Æíå\¾<ÿî|Ü÷õÕY“öÎ~—*u8oŸyÛ6ª¦ªªJm.ýËéîûÇnK¤ ;Æu×åÈçÿ°ÅwÁჯÓu2ʽ-·]Õ&Žô ú8±«¤K(I«ÿô_ÙÄ$ÉAÿ{ª¬Gî ß^_S˜~pèo•$&›‰×­J^}œƒÝ÷Þÿ?ýIг~ÂGq:³Iz¸šyÔ>ôSd6bø’MÖ%N_Яöú© œsïŠôëBÀ+-’d@ŽÂ,rUÅ EÞ_:;ËdçÍrØÜ+˼à#¡˜áÇЧߥ1ÛïØÏÏ\ÿ.爟€_B›uË ù3ߪ…=EÁ$ Ò¬`‘OggSÀ³&¡€chUÔ Ðÿ^ÿdÿWÿYÿhÿQÿ`ÿYÿFÿZÿmÿ]~…ÜäüÿOâü@­†ÜhöÿÇÍO7Ô†`äŸÞcöuùáÍoÖO£¿[£/ß|9W{æððº>:zäºM¯]«j­²*Å$ gwÎV?ÓîTÁ©u…–oNýq”ô÷[È\ÒkNû{‘ö1D£×yД†&¾ù“g(mìäçóFMA0Ée†—óͱæõõçcߨB¢$èÉÙ&ãßòrˆ¢i:ïÝï/%Æú¨?=Tfwtý-C~ŒÉE¥,»®ý·°ðÚøÔÙÂä×N°Ö_¤úžòÞó,½¡ YNò–kh#xàg`,q“œ$À¹&ì*@Zÿ‚?üpÀâñÅþEæ›we]ÝÁÂd²­ÆUÓÃuà'ÉΤà™}¢‚f³'¦È®=³@Þix+`9`ÔŠ Ö¡ÜÔ5ZSª"({è#±[&R8B¡•~…ÜäÌÿЈ_¨ ÇÿOt“~d?P+>ƒYŒßÏÏR4-€[-ð Hå~êÙ6oU«ª”T€s§žÜ¿ÒÙVë¼ûPw¬Æñ&»¼þß®•¼?{mÂïžæêØÆ^ªÒ©Ä) û•#Ììäžéqäæ¾Èlj­Ô=í>-ÏÆOvïâÓ6~w*ÐÝ·gzúã4ÔüÅöÝûÎÆÖnù7uðáYÆwï³|­öòäÓßýôç¾_ºúE“Çг;9‡ø4@Ú§"ÏyvâÓt31ô®W˜ºò/³u·ìÒÝÇs$øë aÆÅÞ‘ ¼]e‡Nòª;pëÔžk XÆ~ßà™¹ÃÔ¼ûÍ$h÷Y¬«E«rç 0?Ceo²ÈÁ1õÓÚÚýöù¯{‡±xîÌ`ŸvZPŽHzÈoìQHùוؓ<^T`}­jš0NP¾…Ü„ÜÿOGü úƒZ± ¹ ÖÿOÏÄO+øBmøxe_éz綯£1jÕPU*$ELÖ{ßaØ>}tã× Eù«]ç ÍÕ‡\¦ö{å¾ÐxòߟáN>eÆ£ÛŒQk÷è¿6Xæ$ÕêM8óíjò ´ z:~k$àå ÓâÌp÷šÚ§ûz3×-óaúžÙêZ¼ü€Éî|&³‹Ü?›ky¯)ºó¤—~"W@_ ¥³ÏÁd¥ ÆO¿ÏúÂC^÷-î Lýùч–•^Ž*í¾ 4§Æ·ïºÈˆh'sfÎ/õÏ=ƒwp&D¹½BØ{ €)<î1> ¸›¹šÂgÓ3ÇÿÇÂ?ÿqY[fçÌÈ¥3ò·6mà?/x`ÇÊÁ98Ïp±›ÙÙÅËXt¤H°­á9*Yœ•GA¡Á&)†U‚€¡~…Üø¡ÿ³„„ úƒZñ ¹q™ÿ÷ ~”©üÙ8b 3HÏ¿fÐÿ¼OÀ{œnjªJ«Jà~¼ìûa²·'ÿyjg#Ÿ»fù0=8`Ç4yó÷N>@Â+MÛñ…oé–__à<·ü¾ô|䎻˜ñ„ýµï„0z¶Ân¤¹÷8uª jNsW¾þö¤ÝK’Ðèÿý³)b6î¼ë—Ì-AÌãUÙŸfÍ¿êgÉÝ» Žy7Ìwla êLâ?çïÿÍ€c¼U»*»“œpH}3šo µAA|+½À+5ð¦Ö»Ï;ž) 3¾»œxXìXþ 7PËK»)í}%Ÿ6F÷?®žŽK£º¹\ï;. ¬·ãÁÂ<Ô¿c„Fþ`ˆq¸¬œx aHˆ>a‚"݆ eˆ!~…ܤÌÿ3€o$kÃ3ä`öÿæ} z;ÖŠ€Ï…³ï‡u˜u€/Iv×/úk@úzŸm³†Y„ª*-˜ÀK¾$Àe½ò¬j'3xüê;÷«§Ä°6dò!¯ 1Z@³–sM­9¨QtÞ¾†ôl9vûÞlËÛd½â”`ë‘ø[ÌÌ×?šÀ·ôù?Nãþñfºå:Gh>¼ÎÏþ Àȃ˜ÊÅ¥ÝÅÈÿ‡¢68©†¼QwNÑ»½}Æø©æ¦ÞrN‘sçá4]÷ÏÃÃÐXƒÎ’JrÒ•3ÉZž÷íŸÔ‡c&‡Ü@ýÿìèÿ¹¦ÿÃЫµ,+yÝ|âx8¿\TÄœ=ä®9ks››s²ÔS•YÐ @Â¹‹>¦.ùf{eVþ úðY·¸ÇóÅ W¿ðu<ˆr$Žn¡«§ЦE4€¥“×¥ ¾Â€§d ~…ܸÁÿa ¨þ V,Cn4ø_P+y`Ox)þôr‚»¸;ã]ˆ‹sÖ†Æ;j8íÔû>ÚÖ«ªªjPÙ|}f†ÿúŸÞë×`µ-×Û¾¶]ý^¿çÌYSx½~ïz2˜åg>Í÷½WO)ÛÐIföÓŸœ*b.).o–0ƒëÄ_žùœ‹ê>œÃ09IõlšUõ«øÜí>çì" KÐ<$»©Ÿá  ÜU ÐMÅQg0  xÆÚÁã(^åsÚsÜË™{ÞÛ|¬StÆÃ›‹5 ñÙfÌþ¦Àñ ï‘*“lö#2…²‚® M¤ó$¯da@¸âzZe m:Á Epþ…Ühöÿ‰ò§¼ð£L­x…Ü8ëÿfnìo_¨ ßq¸_W„aÇ´ïÑ|ü³sàý{ÀÙ ÐmÏGë­ª¦*Õ¥€gt<7ßG§«°0~—oÏóïÑç£i kEòлߋµ£b6óÚ„iCÎðð¾Yë¹ï#KùFþ3õôZátTEOh¼» œãc>õ£šuó»v·,|`x]¹?>åé ÿóR©Ì>E>UoOúoñp—G¢j®r‘/YÉŽ~ÊÃ!œª†Ù׿ðn†ÜÏÍaggûšÐðÔ§ž“û;ò\=ÆôBßeˆ-ŒCÀ9Àæ¿ÿ ý~¸ùÅ•€áÞ{³¦wÖ[_ÇÙ¯·¶¶Ù²1ÃnÌÎæ¾‡uäÜÝ¥œmú?ë÷½ ž‹¿€]cܶó@ 0NK¢ü.§ì¡a m¶oCíZBëRˆ­D†Ühîÿ˘ŸIò4NmX…Ü”üÿ3€ð…Zñ UÕ£èñkøko6Xý¨½cz3³¥T™àÚ­°?ìíîîöþÜkí—žÏ;ÕÕ­sAkº#Å{ü®EJY¶ &â“ÿ9õ°`¡%ÛVô4ÿ,g8¸{Ô!û!眂ü‰îÉ ÓÅçX×ãÔŽ/rHdúP=}’9$ý{®~&òÞS’<|üU—}ß’l$ñ_ôµÏ¹8CK y„Œ/IrkvTÙÍ·§„O'$ ú¥Ëï©I¢“\¯!ükkĈ°ÔüÚ |à|üþ†.ÇÔÌF3åô¹O–çµÅ L2äÅ(K YTM7[÷÷×$æò¹Íž‰Ã255.‚rŽŸúŽÁ©«_õ7üÕ˹½@6õ ¡¾9'±‘’!hDù´E2”…Üäÿ$$QýA­X…ÜÄÜÿŽÑãOµáÐÚß·ó"÷Áo’ûi<œÝkãø‡o€Ú õ8sNo­ž¨ªJ©J[ ¡mbŒ²ÚŽÕ¯{ü¾–wÏØ×rhÖÕËfœ]ïÌ ßBYI¶9x&Œcæ ]8<Ú¹ ¹øçk»q(Ÿp>qùÂ.d>Ók•Þ?Ÿ½©ù„”÷'Ûˆ!€ÞÏ’Q6‘¿‡ô ŸûÂÏÕÙxnøYæ¹}$;î— (Ò¡ð‘Y=]Ê8œ,lôÞä~=•°»Sîê=$¿waA¿l€Ÿ±ïåÿ~àOüÚo.\ú‹à8ük¾\:Î.¬ñîw$h `à×þ“R¾@bàhТÛÏßR•bU¦IQÛª`5õ$†ÜhæÿÍæÒs­Ø…Ühîÿ‰)Ó„/SmøÆÛ/wû}Çû/ÿƒŸS·¦:â炇íÓ7¬ƒ°Z(­¦‚~œ¹Å<ÿ?g{e7ÿ}ý×ÆÃ»[®OÞéu×ñaWhéÇ/ÛÍÛFK-÷kš½öŽ¡§ïñu¿ù=Ý) àæÅzÌ Úóyï¿]Ç/&;Y%†¹W¯碠9ó|Öã)õýÑ{Ò¦*=9³)’ïæ™,ÃÞùy÷¥çUz]pùÙgcê;oè¹W(G˜Ž«þ5UEÐó³‘ñ\¹S}6Àðüc8Úç×ï_ À³|wm€×bî®k¿ñ©)L@ü$wÞr[5˜eÿÃ}Z»éÚUÝ'3¯æŒa¿ ˜:ÞÇÞÀؾ¤ÚÁžËú÷ô 0b ­D¸Jw[°œ†ö‚ŠBÆ h@DÔciR¡†ÜXöÿ³ÌO/»Vò†Ì+ÿÏX"{úf­?`íøËËÚËì,n÷ÚÿV+ºÇÿòØ7?j‰©ÕBe(%IÇ8ê‡è¶óïÇ󲫖þwKÄ-{qÇcþ}ÁÝãQ懃S«Qû %ƒÈr"ó•x3Oµ}¨P@m~vYÎa Í’âØÿî^w߉.JQW÷ÂLìø9¦ï™oQWi‡QÄlo÷1t-¿òׯw/Ïìl£ ‘ÙYÜÉ~{úQºM|D§êµ»Ã× üÒn ~C6“<ýiú4ŸDˆ.üU~þ7ëÏ€ó»ïÀ[,øÄ:·?ÆÉ™&¡Z7™rY¢ÿ$ÉÞ“÷[¼7ˆÚ\Ñì3ÿÜÙ_“.3?¹\@¢š™]0•QŸz¼Y ›0Y~†Ýd­³ƒ“û $Ð0ˆNPSÑ„]C)Á!cÏ ´jk¹÷è¦I€†ÜHöÿÍæÙjÃ2ä†áÿ3º§ð…ZñðÛÞõ/öŠ%—ïÇçÂXAƒkÑt«#,¿=¾[[¿ªÖB5TJ>c#ËðïÖ_ËIø¾ä?¦ÖCsrò ÍE{òû47÷û&]v‹ð{Á 1’>á’¿˜mï¡óßÙDfC¢ž#Aîãúü»?¾ŸOvøŸÉ!çéO:§™¨Ùi¯·¶Léi&^7žÿEfnÎçžg¨$þ=tv4œ.ÞfÄ-ØTU²Ä~v) 8@^cèædþ èÉÿVçTÏpíÒÕÑÀŒ¼9©_,8ÂëûyžÎàü<@ð`zÊßÌl­¢h`O}6|†Gd?‚ÙïÇôçÌý)“‚ÎNà‚qrªö| ˜õzo½÷~¿Èƒ~Œé¸cÌÁÒh†  ‚“€ ŠÕÅ…m `ÜÉ–¸-@ÀРOggSÀã&¡€ciS’OVÿ^ÿPÿVÿMÿYÿaÿYÿbÿZÿ\ÿWÿ\þ…ÜXðÿ¦Ký),þ V Cnhÿ¿Ù5ý:‹7âZñpßß{â;*xð*Õ£ËPµªTU€—`=‡áç®û›š=_ƒ…?õ+ôí²4n#³Ù-¥ìÛ;pßËm ”n>1€¯ôãדööyÕ'܈ԗèÜb$wèV ÞëöxOÌóµc*ý‹äÇ¡‡Ãóå}C¶>EÄåh:‡é„äøýƒ>JöÓ8ê)öA7HÍ!®ûOêš„—šÞº_úЇMç­ÉS;ÿ0ùÌÀWÏ`5€g.Î/xgB&ÍÎ Ï&Ì<ùg)0Í4³þÚÿü;0‚±‹e¬˜Þf¹ßÍ ÖO?so§/ÿœ›©3Ï|è*øL¹ˆs²@5Ô”(òmx0Ãï†7̈¹Ü²•ƒ1fÒ°x J Aà&RÅ’mÈ ‚~†–ýß»ˆ^ïÔŠiȨÿ?»Šßü@­øÀÿÉiîÛõeµ^=ØgwÕ¹„q¬àÌü Ošé½ VPWJ(׎½é3‡–}??«ÍMC¼=‘‹—Þ=µøh˜Í_Ž<‹ù~÷4óíÕ½×Óv§sŒ!@pC¹š»ôØ^ÏD°ˆ@ÇÇêåbr=º™êº¥N†ž¿K¦4*ÛÓy~að4Dÿ;θèîfŸö_¾ø²µÏú àòyGœw®ÍÌ"k¨*¥R€ ·÷4ǾÝ1˜tgúºr±·ÛˆÏ½ï9M†žû?¬²?z‹¨¿Ÿûÿ™ÁxCmø Äþë«yÄxµÖÖôÙÿ{5ýhX˜ª©šÒ €øË•aÜ'F=î$ Øh=f/[å—_æ#·Sa¨˜=ÝîÊE,rðž³dòíu¯K½ùvt¯Ó¿’¯ÊYÓl#Ù£þ¹C÷‰žº8ìX+³™¸dÍädtuwOþFâ8f³÷¿4Ù¹gÞ>ß¶x‡RLoéåÛÂzü–ÏÙ}f<¯É¼úÛ{éØKÂaïiJ@Fá!ÙO €T=Œ¨~caÉÑ" òç €•}0ðà?ÿß—Á¯3õÿt‘ËfãhoÎâc{§Æ»öòÖÍÜ_뿾»ÛºŸ¾¸JQ1MÑ$ïä™/ÎãB@‡* ¸QøÀc ‘/~¯ Àüž…ÜÄÜÿSPø5cr£Ùÿ§MP+>ùþy}÷ÿ¸ëÏ(€'œî(Ï€*­“ÓPUU•ñÎ]1«ÛÌxpº¸6ùÜæhûò'dB6C²YÝåÅç¬ë“[|(ÐúàaaöÚQçCð9»‹Î˜ åÔ]=ÿ™Â€z‡·:~g"øÃ©çèá¿;˜ÍïÞŸCCn—_pßüžçñŒeî¯|˜ãÍÁ°s¸|ÿdŠv¡ý&>yMífa7«)MsØ»×·g=ôp6O4“7Ý»ÁTNÕÏÕd;$€Ü×&™(õP¹Óô)xK †}ÀÞÀþX˜•h|˜)X×àÒÐO%ÌLÕÎÝ”Ù|阱Óg-v\x‡K.Þãà„}Ž‚²D¡«Ô?R }Á‘3Iëè =sÑØf(H*¤%»;i, šfJ^†Ühæÿ>Kdÿ¡VŸù‡O– 6ÿÚôIg˜sEÕvó'ýü¤5qÅj<ÓÛ™{0ÈËÿHìý3Óç[¾!àø£“Þvo0èÉ}Ëøššèce ²aö¡ó£ýzšð‚MÅ2€ø|{<÷$ûÛ醓@ÏÞ:- õéíå¥Í¼Õà­nŒýÌ€H½E7Ï]ÌŸùûúåk}í`ŸøkÞ×Ï0ë+«¿†L†¡ `zí€óg˜¿çýN°ÃO3@1ˆ1ãj¬ã/ž¿Y`ÚÁYX˜ªD¤|‘– Pü"$ù\4È”€‡Žª”• X¥þ…ÜXöÿiAõµar2ÿw$ðµâ3ˆ??þØûhÞxÿv¬/¶¸| „ú–ØÇ_l~x󪪪+™ ¯üÁƿ֮ìçÕ¢ëä3œ,°÷~™ýéó':öºF——«þ'œPàÍ rÙVöÿ¿œ4¢]²YÃ[šy¾DS—ÿüP ½uç×˯%‚ì%n`üxÞïîJWÒwÿsÇÇ<#ù¶‹rÜä|‚å8)¦"ȆÜç߇än(®·Ÿ¢_y^æ?‰­ÿ¶úd @ÖýÍ«(³ó÷>Zš$ÛÁÌáÿLA§XÖFä‘rSï÷ïa³%ûoÿ÷ÎÍùÃìÀùÕ@up‰ƒ_<Æ3+Ë.ÃbŽ»ú¥(fkúóã+gÙ,ôÛc<ÿØ­³À‡MäH,¢P Ì êû’LÝ@ÿÞÂ-Ö¤ôþ…ܸðÿý àjÅ.ä&¨ÿO{rèRðµáÀë¯5^¹g…ñO½ëŽ…ž”pî(νÍê#TU¥«êðöb“»¢þ3¬¡Ÿ™·ËWÜÇþwK‹JSÞ:vg±Æö­ £Müí}ðÍ\J¡(ÑìÖç_0XÔðìðåTU½еòÝ+00î|ê÷–&ê—¬ò’ï² ¦k 071¿Ž¦×Ù£šéS¹òÞù2<ÿ%ãìO;óÀ=›b~§¦r=Yi–Êd²*/'•fØ€ ’·þøúâlÙ÷=kíiV&ë/F½ ]ÈÝ'¦]ˆ“bÀ¥ÿþˆH 5@0l€ç¿~FÏÿ7If#ÎÙ¿wkká.yXë Æ:nÌà¬õ>ì¶cø$gŽ=8LqðÊx‰=uÎ ÐÜ|®ÇQKƒ¯ Ò$˜¤à?` ~†žùŸ»ƒ€P+Ž!7TÿÏ…€ ú1FmøxÍ{óªóR¾~¿u†Å¶VdêªÊ¥XpÏ|ÀplzKv…õýŽ^º†…ç}°ø7HA:BŠ¿á«óòx Ðxf>p™>½Z§ô*¹G;Ƴ}aÅHO,7Éêë/óP?üëÿyóz{z˜‡˜×¿´›I§r¾yY^˜-ºçƒ=éþÉ[«lúÒG)¦:ý½’έçGÑùþâ²6̰3 ¥~ùú¨‡x’N”ì¨Öë?}hîãLÀ›¼Vô«Ù„;ÐÉyÙ_=:H¬ãœ›n3t1!]ìÓoŸ~¦óiø›©¿û B*ó›“ù¨³³“`B`è5¦JMX'Ö°XøaYwÁ™s ûe§×ŒûÎÇäàØ÷ýxÃvb9Òä®Ïõ§÷¿b *5º®]­ÆsøÕœÅlêô´£™éåçüÝÆõýú{ví *L^™Ö·öf—T§Ø…mgØ80Þ¬`úÛÆÄ/Ì'o.H~A–rÏ¢Àí[04PZ·ð|Œû‚}ÿngÿróqe0³-KÍãÌ3îÏ»ÅØW9‚A P }ëóûYâE¾ÑLHJâ(‰!ºù„!Pþ…Üøàÿ§ÃøZ± ¹ñÙÿ/`~ÀÔŠ€W_ÿynvÜå>ýô>|fm(¥Á€|eåÄ ØnúѲM\ª)€#§Ô:õÈ‹/ûòUï;÷•£ÛOïžÚšSGÑÓž3åö]×ë3ú–7 $Å‘Åg»‹®yzvÚ_£#齋¿ÏÛl•½éËéׄÎ%þžÌ<ûÐgý+:Ø™‰Œ9&¯›KȾ¸Æ ’À&¹a~ SÓ3à½g|7#Ã60À8g¯wƒß䙎Øï¹löþ°÷fïM³Su_?ºßµaÛ}¾jÇ û\NI€ÈZÓú¡²w& ðéâr×Ù»ðôM&?ìJr“]ã3Ù5ïÀ¦Ê‚Sª‰-óq.À1e¾þf%4X´³»í²‹2Ù¢Í 7Û…¤ëîKd€¾5OggSÀ&¡€cj5ƽéÿZÿYÿRÿ_ÿIÿZÿVÿSÿTÿYÿ^ÿLÿ^~†Ühøÿ¾‡BÀÔ†OÈMþÿø?P+þþ|öÞ±qÆäão píyP޶MTU•C•x=gE¿{6güg>yûÎ œv4~ér¢(l;µÍ®´žÎK³d}1Y@Ž7éÎ}y£W.'¦¾½ÊÌy/‰Òh³… ·Ónô"¤Qý²õÿ¼„ ˜"èîÿ#œÁÞ,ýnù¬>ÿRªÞn—˜#ÌMF‚r†òãßæ,ažsß©Î^ÌJN!AN%=øÅ"Y3$š³¶vw"ÐYôg815õ#mΟòBù:½÷fÁ;àOfß{àÀÿæ|È܇žÃ/€<¿À¿Õ€wà=à˜^o\qÎlþj›©kfý¸:Þø3·¿küãÓÜ™L õ;ÏÌ €z¶Y,ð’…4`!¸!ÝÄ€Êj¢Uî%´@²‚tI èàž…Ü„Ìÿ0?àjÅ-ä&äÿž0¿ü@­øøà‘P§›Mbø†ª†RªÊºdîÕ°Ÿyt:~K¾Ã•æÿ=MÚì³÷¡…•÷i€ëpú³ãÞ² ë\]tEôˆ>‹+¶«qy"Ú“ª¯[ú<ý»Zð›‹ÉtRv|yÊ[¤pÿ?êO2ûll¾{–ÓoL”[}̉›|­;Ú[[¥‚ë¹;nIÞ©ïÝëøzONÔ EºÀ©¹â¶Ín'óã‚éKƒ°1 ß@t§é]lÆ>}ê›ÊÆÓÐC,¿wö}ûÑ€á²CÖà÷¯†ú €Çzv~0ƒÇ´µüýÎïNýüMÝ› lï¯ïfŸªªš¦™Z¶Ž·<†…ìLñå?ÉŠ ª) ­†nÄ'Å´ª'´¶ˆz`ìØޅܸÜÿ˜ðµârÃÌÿ›îö|¡6üëðçëb4­Ûë_ñnÌÞëWsç/ü¾õñǘí¦aÆXœ»<´ùÚhEj¦J)+@¶®\{_˽õÛû¬•½ÙÛéNhÁݦ}êü•Q×{Òhé}óéûuÞ#’7s€’›ƒÇߺ´ªËB™Œœ®D/eÂþÇÓN÷¦‰uº¶§Uð2ü•1»7 ‹k^2àxö+˜Œ]É9‡+%U5€r"³¼#ÜÙ{¼‰“» ¨½»Î9oíĨå,ßÃì [Ëôurj ÀäQæKÀØwôç쀦0à˜5x\ÊØN6§«Í3‡î̓Ì.ªÍÖuñ÷OÿÂíÛ*àC¶¸53ðçpšz˜¶Y(° Q¤ iòu h¶tÚâr YÑ5 @^…ÜØÀÿ€L?z9üø×Z± ¹Aîÿæ ¼¡6ü¼Ìƒú½»Ý>zúºšãÿ‚MÿxÎ~ù6ÚѪF¨J¦¸?£C\³‘³;—¯±vîî5øÿóôU1xd¥ËÀ¤’˶0guW|›ƒÒ¤cÔxàÀæ9ÅJòxj¼öši§i‘a=VĨíÑÞóž·H“ë6ØŸÞ÷?¼¼w¥Ã|þÃï®Ì:uˆ”ßúÍ;³÷¯l²mCôCò.În§ç0‡û%Tå|Ü}HñNJîì„§ëgïsÎþuNWKÛˆD$[zûÜ•ù5ž €¼^4ßl×Ea"×>çtú×o>ÓËJBÎânïàÎÿ÷…ÅÚÉØvÖß³íšì¼ªJ²Îú‹»‘$W=ÙšbðI=ìá€Ã±×ŸÅñ@iàè‰ áca"Áƒ4ôëÂИH྅ÜÄÌÿð¾PV!7iØÿBþ€/Nµá4£òaç]¬©ñ3ßçú±hh½Ûî¿Jp~O@ž€çç£ ­jU%S’€¯ÉϯɆtf þ²ßFÿ²;Ê}UøÓ—ôçà aä«•ÍÈWƼ¦ýߣ-ÞÀS¸|ùlµ19¿£*Þ³A‹lªÂ1ÿß«7o½3õÜ€Tgì1/DÈJ&_ÔÍN- ÞÚ.Ÿ½íd&ôÚÞþV&9'sÝù`ö$ДÙwNuÏ}U¼È§Ù€=p wu_KÆ‚Þ*ïªYþýú9ÜïCÈ×Ö÷øº„ÙÍK]ÅÐ×éé~–‚ÿÞöþYÖô½Ëkê?ÇuL­å€&ùÔf(²/(¨é©žÅnφa¬/`}6 => J ʤ ;òê†5àGÓRPp‰^†Ühðÿ³? ¾P+Ž!7þ¿/¤ÀÔ†?€ÆÊŸæû«óèÙð/¯ˆÏ/.¼ïàtÛ:+jg¨©R¥$€ùz;!Îs÷ûã˜3_åz)¿˜å ùVWBHû|Πƒu>èŸÓ¦ÆÐ_šýUìq5b\n}ñOÐÝ!œr¢"ýÆŽ ‚*>~Xlû–ä¹^ÔÀûÆ$ÌâNœØêÏs¿›ÿ µ¬œØ;Ù÷ÌØdÕ‡–ƒ˜>ci2ûW²ÉØIO65õÙµ0·b ˿Ƕ;øG&æo¯ˆý¬;[05¿° %;¡T¥®Ë?}vêÌl Qì?Ósø¾Ï†žWìl^D$áÕ0$͵°ËÔ0öšË­/¸0c¹q5ÃÚ ^UQÝ î÷>aÿ–Y4A ,ø`çÿA³8ˆÄªÌ—°ûRD¡Ñ’†¯F“:œ¥Þ…Ü„ìÿ;(¤Eü)S+¦!‡gþÏ)€4:P3~·ÿtõåÊ••+ÿ¥¹Ýýath·¯8 |·Ï½³Ñªª”J%`}ç–ÚÍñ®9éùéäAû:ßѵ¯qíÞ®#t#ïpÿsgÍ?I}ÅÍm-fÛÿ,kòæÊ_®=ÇbC 3Ì¿ù‘œàx¬ÒR¿=çq?o4Àn~øV‚|ÓÌú÷Ù§Þ8ž×â#ìk6¤ôÏ]r&À?1Ìý9Jï¢v öý;}ø¸ÙqwOo_È pÿdÜlê§ç'í¬1¦âHÚÍU_˜ùá<‚>½íû5¶Þ·€ç>§@-IFÔS†:4¼{üýãr›€ýŸ}¼q›ëÈá#¹ºæïÞ~å›ë±þËÁOë<ÏÎܲƒÏfŠ$Q)GBÒŽ‘RdØ9@ÆtK*,†N !°Š ¾…ÜXæ¿XCЊP+Ž!7ÌüïSJ´løµâ3 ¿X׿!/î|ñQN§»,ûlÛVMU)-  LÇ¡~¹íâHó}Ü:p››õm^ŽÚÑå1nW^mÎ~ªç›n=]È’³Ïò‹·ØØ!”Ã1ý\:Í{†ï<³œ[¾*Jßœìø4OÿQõ§w¾žØüù19„­òRžgƒÐ>Æ‹ú2Í¿O¿ñ;cµæ¿¯ê6oIÒ(5A÷Óߥpí œSÆgÍHŠ®Ãì3Õ‰©»êt"úJg2 ôd%b£s‚ãCΠä&« ûØ ü€<lìØ´ÀŸp~eý‚¤HR°˜óõ7Í‚ÉùؤØÎo-€‡eY}ÌÀqŽfOCùh*ÐRÆ-ô´^Ú`¾„¿ä€Á/< "~†Üˆõÿt)Ð…äÔJ¯þ¿—thÿ Vü}_Þ݆}õö¿/ÌÛ>ȳ™0Í Å>›qùÓUJDÙhµ¡ªª’%@¸³ý½~Ôqwœ/$3Þ[¬€œ´óå¶3C@O»Þ_€[-PÚ2•XLÏwŸ¼*†¦pøaßÎ-3hò°Âd’žýóù^‘ÍV=f§µþûÍ¿9ëgÝÖx$|Hò:º’‚}c‡P¾äçUha\´ì¿3vß_a G´6p2ÈÁ™Ùy»:Ý sŠž}oèÑ9YÙöO5À‡`v;aÆÀ¸ÿPô2$%I,D³\0»xø{üãá9˜k®ñfËqø@w¦/bWlÖÿ›~'>ufÝ?Ÿg=;ŽÃ`Â& Ãý}ƒPHúö¿êóõw:7op(ÒGô׉¾…ÜØ°îR èý‡šñ ¹I™ÿ§ü@møø„ó¯63h†¯˜Å 3àÅW7à Àµ·ÖƲ¡ª”-HSGßC'dbÕanõžŒóì¯Éœ<5äÌ‹¥]zßrqxﵟ5³ð™B¯b.)ßçD»Îë&Géëø½r}yáB-ŒWÓ˜üµ¹ÄgQÙÌÏ^P <¸~ÿ±h²“¤×.â¾ùP¨2Óùs28T)ÏÀÙ<§ˆÕE‡Í|ÃuWèTÿ‹zÊäZó¥÷Ïao˜¸ÞŸ÷4Ì º+sr¸‡ê;ÅM.ì½Ùá?üà4÷ü†&irÎùþÔPç $ “MÒõÉ ¬ïÀ:xsð‡.5̦yoè[Þ\x–aì K UzQêÆÀhs+Ð0€`¢|f€QhØ~†ÜHøÿ>øƒZq ¹ ÙÿŸåæw%ø€Zñô¼¿ÏÏeŸrÙDÜž™M1íçã=­ˆ3ömÎvhUÍ”2W23¬ÝNþLk}^ìÁyúßI0Ž¿Êá­-¸Ðþ‡QUÍ7\zJ1&ÆÇÝü ¾ø®ñ€W¦u꯫9×ø÷.‚ÒÞðËg“\>/Jw'3ëzˆÈnàsUâ:ÆÌÓ£sÞûh`ƒ™0ù²»'¾¬ ©,Pwh?ð¢ð$7dÖ>Xã*5ýH’ž¤/Ló2I§òU ÑÙìŒñ=_?ûû?xÝ/ÿìÃù êðkóé'ñ/øý–õ.ÀrÆ8SöëÿÇæ½é/î2vÖ¸àúLž¦NÖ¦è’û«Ïs?4•0 õ;l½ÃO~šö{èBàÐÙ‚VKá ŒÁ@óz’&jP;^†Ühæÿéøµbr£ÖÿËù]àjÅÐÏöã³Ç3ý‡/^”«½·n1qç)7Š%/À©¹µº´PUŠReÈ«ÙÙÌI®“ª‚q 1ùSfýþî˜eJ÷¨¥|<ýj{Ûð冼ȄÓk?>g𦇜»¡×öбœ’­±€XýGå%ýã/ü7D#_™Ï ½dpk®˜˜µÖ¾‰!@>.;dø[ªê.€½?i}^ïÓy²ñê>42õ«÷>ÃžÌ ÿù³³HwÏwTW!#¸ó[Zû3j:[r~›ù&$|þñËô5Á€éµ3L5 ø¨Ä÷Àù‚µHøN9xÇï÷î±Ãþov؆óãn7àÎ+pú`fe=ÀxÏ÷˜žšâ ;£&ɼ9IBÇÅB!)e¨=ÚN¨>†nÿÏÇHèš,þ VCn4ø:U@$üA­øøöÄÖÜî±9ôæÿ½®iú š~Åñ{øø°¿|~æmkáUU)UŠIàØà6¸+´f~ &xÿî=¿Ô“\9g9 ‹,édµð€¾LÆû €þâŸHÚ oÕȯcÚ–KÞ&ʨ?öúNâóåhçé·÷eïi˜øûZt“ÝGˆ´¿ŸéEãïøSçLž:›Í¦úÃùn¶'Úܼ`ÏùŘ!Á}yæw·~6L¼BñFbRœ¬ì¤÷Þ]ÓH óܕ޻ëÿP²ÿýªÿŒ–ÎÃÐl’s6ì×°ÿ +lÑvÀ%¾‡»ÇµkÊ×ÏLÛõµ¹Æ¹Û¶?.ÌòW>ƒO¬ƒ™ ïö\-’–fAþIë¯ÅQJ)Ò]H+&½KÐèÑJW%±à!@OggSÀG&¡€ck(ÍÍœÿWÿZÿ[ÿ\ÿ`ÿYÿ]ÿoÿZÿ[ÿfÿ[>†Üˆõÿt ð£Dmd ¹õÿ>þCÍø¸üJ®‹µ‰&å¿ÆøéÇ/ŒÖó»¯Þ%Æ>ê1GÃûj¨ªš¤Ùm¼¿i5güñîOC YŸ¥%ï§ç¼qÚ`ç™’ó5US4@hÃüópÉÄgyÇu7ÚàíÇ S_špbå÷> Ól÷Ûë¾ô¡w¢°ª ì:H.û~èúW±‡0P·cÆÏ—j]ëƒÉmúÊÖ¸“&ïÑÌ0uàlfίKC26÷f¥¨ŒeIˆ*ˆ û9vÎÙ@UžU·ŽÛû¼% WשÍèæØ) ¸b€wžå°áì_›°@O`=ÌŠÏ5À@->x£?P8}aÆÁnýá/-p]Ý%3Î=öX.0êpš:´¿“Î •É bCà$cÒBá³ä9ØV=9weÔkK oÌbìÓY¾ÞÿCªzyiot›¸k²ŸµVUÈM±£"D/ „•’Ðß>xU÷y<ÌllA·~7 |Ö¾¨¬?ß“Ù@“Øö\ÌßÝCöûÓgŽêÝesÂõ]ôë»UÐÞ*I“4cÉ©¯¸¨æÈ•ë†ÍP=õ¼u$ÑM“Ûbä6u™ÞªÃ¶³íì¿`ÿ»pk 8ž¡ûh~áo>AÇ.c¨×ÀãƒÇòœƒG3åXÃH†,ÂkNx&Að$@c  SRã@ÂE (t €è>…ÜäÌÿ˜ðµâr#áÿO7ùxCmø œ¿üñÝÅyôó €ÏËøÝ[ùÀÁšq›ï_ž‡ß³ÑÖTÛP‚9qhšmæöL¸ØvþIž}Æ+ÚÒÆgŸõ©ã)y[ÚÜú‚ŒÜÏ‚v`«iŸ%ò;$ÚMën›ýït6ͱ¡£þãž\ 6º¥ÿïêXÆH|&sÞ‡"3:ÈÌîÞŸœï¹¹ü÷ü;ÿí™ „${î­™œ½î®dΜñôÕÀa't<ž†CÙt¦÷†{Ï„•0l(8üb¾§zðyô¯Ü;è噣À€ª:¶ÞÜ~²¼Ã&À”Ãi¾ÿޝÍUÙ´k†âJ×¼Põö ¤§ß¹:˜!¡¸æ™©Úª¼â¸ىɪ©mžçùuÆ›"a¬1¸¨›tR„ a‚zæl¸§AL"ÄêM?^…ܤÁÿ7¸ýòµbrcêÿÏ„$_¨ Ÿü׳ßݾ(¡>ïçm»Tm(¥’)X•¯):J³Ý=@‡|Á3,ôn×ð¾ß Ηï]N!{Ų}öΤíÓxúÔ×ðþÇ´æÇú¨H·ç&Pa‰µJy•»õ.a£™½`åí'uM°û'Ÿô]ùhþà‘÷2eÓ¥Ý@æ™ó¿=2&_õ¾žãý«gë~!èÏžýLv|F@&ýᬣ“˜aW1:Ñ™çJ€ˆ›T"ü™QíäÞ¿¿ý¯iT $^ðyÜN€_‡Éyyøà›Cªå£©GT€àX,03ƒ€Ùv‚¦·/v`C?LWA2ð6U¸¨dw^@>$1Øë™rÜßo½ŸÀàyÁçòü`Pd£DÒa"^o<$" ^†Ü˜õÿå ? õ'¤D­†Ü¸ìÿOwñS¢ì-µáà«×þé6/Öl[ä»É÷Ý(°Âu>I$“çl g2?ËCnÃýo€ DDgXª4LJ,Ê\Tm øn ð2÷ ð÷o“€:s fß°~yÉ‘ñfÑ44 °Î€õ@!öjšÂñº¢VS9]@pÁÝŸ– ¬)¸/ìE(P0ÍMÂM—ð"„X* ^ÜÐ; , iÚ ¾…Ü„ÌÿÓé@ÀÔŒiȨÿ? ùþ V|ÎÆø[¼kn8Ü…Tð×À·gÀãÍwÔ̼j¨*MI*ÈíêÖ>‡çó6­è`ü6kÌ+»–Î0Ç‘ŽÞb±EJîž-Z T]ZPyðÙ_?j¸ûvo~ÑýD÷[µ¦ªýdv.ý0„œ¤Üiˆø´¨¾®ΔãyÒ°±£Oê§À€{â€Ùú½wôK­vôôw÷®°H®Ž°ç÷>âèçíÒÍÊüä“Twíºþ‡ëÀÀÙõ÷w}Oéÿ_;P‘Àøy@|#pz~*1¢6á+ˆÝ+vIAíŠìÿË­™`Hàô†l³ìƽeÞC ]ËN×ü“¦È¡Õ~Œ{ó¥Øs9ËÇ? õÌ阎DtÓ?ª$‡¦`þ±hIÉâÁO¥4HX4¾…ÜÄÌÿOsñ~ VCn,üÆÝä†o Bµâà0Ãç«tFqBßžµP@ÝŽ5m¨™* Àwç ·Ç3 p ‡®îù®ä>ß»+Ê9çò<¾„ÓáAжm™(]ek Å{E} ¤ChSlá¨ÝfOIp/¿tï'Ÿ¹ÿQw¸xêª"´Æùýͨ7¯&Ýš¦:'ǹhœôìÄíú?¤£o!ñ½šeo8Üê˯«;•Âÿ®’‚SšDÄìżíÙZ7'~¢÷Z 7MËíaà·?^[¼±eÑl˜{ˆRSžÃžÈsàÈ{ZÆò¼Û¾m›W‡‘=ç×oGÿàg³c€·¶ÀZ¦û* É…›;ãócññ̵×^Bfn¸ûœí©òéaF%Ð$ ]JVPí›-oî-ß±]8†1æ€ôQ{ÀG@Rº@²€HJ- Q=­@4€6`@~…ÜÄÜÿ}9ÐájÅ+ä&äþ'RÿP+>ƒýpWÆžõõoŸÂ_¾hŒÁÃî:Ìö//Ž/ÐãËçØvmÃBUU]%¨y©_îaŒçe“@ø¶RŸ|­ÊŽÞ^Nþ’oÖ°ë…гâ=OÛùAÀï§ì]Uo ÊðŸ¸Ò€ÿˆ äž§e”0 Ÿ éÃxñ|áÇxÓìãcOor@×Xx¼ûâç†Ü8õÿ9b7ú!Òß ^m†Ü¸ðÿét‡€?¨ó÷ÿÌ¢ãâý7%œ~î¹o»6Ú*%)JÈçñ Ïâû0Œž3™É º.ˆñùÓyŠw?_7¢ž;ì^žwZê gŸòïŠwh®Ð !w'óÆ[ˆ9ÙÙÅWïnÈØ³‘ýãÏô˜ÞS1s¦ÚÂC?]<¸¡ÙÃËtvu’î û­Ù3ïŸ  ï/ÈÀÙçñ’'€ —ÀDº-Ò–÷Ó™`A"mEYž…Ü„üÿ3¦0¿øZÉråÿ·›ßÁjÅg ¾þý·ãŽ=^oÕïÆ ÀL¶€ëÔÛ¨SµVU]É@ègÖYÙ: w¦æ»Â¯ œü~Ÿ]^.œþ6´tÕIyne׆—>iÙ·û­Ù»'rуÞç1ݳ›µÝ!ôÚ,ø]•Fò ÅÍýª™ò3o‰9¹8C³p¡¼ýà·|'“íÐßÙ3Û©Øh ÌÎëaéTUÌ»ņ·ïáÐå~W6<“{³á ÈgnP`šû¼‚V˜˜ÁFu€þþ@Z$@u»ØfXµöyk§|îÜÍ8^9s¿½sä 0OnÑ Ó¼}æ»çÜœ8[ô~7ÙdÕ õì¡Ì)=œaÈ1ãïÌÀÝ °Þv#Jµ¯Û™@Š6IÛ =4ÈQò8ôpÀOggSÀw&¡€cl²ÄAÿ[ÿSÿdÿ[ÿaÿYÿQÿcÿ@ÿ]ÿLÿ^þ…ÜøÌÿ—ÙÌøBm¸†®üÿ,•?ˆ¾&j#Ï€~ãkÿ—kŸ}ðùýøò›¤™Q6ƒ›ÆFÿË+Àûź6š4T-”’ª þL.³l2y?°;0g¹Ä_ÕóÑѾ§Nxø Kƒ£è"ŸþšH£;÷^½[ÓŸ=¢N;—Ý^tfŸg?8*Õßü>Düû½h­¬E“10ÎRuAEÔŒú÷®ËÜ.±sýœ¿§Ö‹Ú•kMýQk.¡ÃáΉj€åˆÉSä5ÿ>¿ç§Å®,°GšZÎ+ßw»ˆ{?¦ÚÀ÷¸ (¤*v¥ç$ÀoÀ¤)0~fpq·ðuÀ±Ï3ñ€Ï{g¿ýøàŽ©Ø/㸱ÈÍÅï³é„ 6k{Ž}|¹gÙ 0~]ê@3ôéd• ¥F(´j2°aŠB‘B~…ÜøàÿDˆŒP+9Cn üï‰.ZÐ5ãàcÕÙìÆ¸ŸsÃCð|æ£ÑŠw,–ªJ™2ˆðæ9}™ð0Gi/æŠ ÿt~—_4gvAÈ¡È{ß·’ýÙÇ6às;ttPµŽüîœÁÂæFx|G…|¤„|íðÖ&†$f4úîSÁ›¤Áòán\¢<×Á*Ÿ)>|ò ¹_U{Ìl“:.‹ÕìH)mI&8uh¦ökœ™§E KçAOYêˆ5î¨fr;"{ê/v%b‚Z8Hì³²é†MLoîê\ºxž&~“.šSÁ—½ãxǯ®«'³øŸlî»A ר,¼ïÜծʯÿÎÙs»ÝX´Ë;ù¡@üž4ÈNÏ ±|±ß°weæºu±`ç[ø`"dÁ¯^pò+Gøïàp ÿ{`œn»€|÷©î™âJjè¡ê%a3›5ÐC_óõPÿ13«5S—ïα¼»¾ÙÌ ;À™ÿ–Ãú=7%EDD—A„€,¸“/É.)(¬àÛˆ=H€)Ó(¾…Üøðÿ Rþ øZ± ¹1åÿË„ðµâ3àüÚ•kgÄ$À]vgx‚ë?ÙóÑz3Õ•*¥’j¥˜ËìßËàÀŒpÛhÙ•ÎߪôN箫Iüùm—žqo;½öÿk*6©œ›“?£uÿÍ›õœáâc·‚óâY@E7É».^Ìl¦7qåîâÂÏ‹™Âç){·t3 1³•Ç·öˆ´O/E\†‘ùöÆñå{ùÑ ¥«¾ŸÌŠ`ÁñS5ßE³ÏÌMäëbï$ÎÞøÔ|¡ßæ3ñ9ߘf?O¬ö^`͆Õ)HEŒ¾‚@QTAPP°†…A.&÷ã,_Xxüúø•¯1þê¦é \94¼g¯ìšÚ$ºyP‘Ùx{­?SæoãÁœYk­6Üy‹Èu0TªÒ‰^@ŠO ƒ”P~†Ìÿݳ zí ÷gC­x…ܤàÿ)H‚?ÃÔŒÏÀ]¼pwyÖãà à3èöh@þ8ßçh´t#B)SeÉYóÜ÷ø‡9™àyÀê7m¾Ô!]ÝÄ¿rpBö˜u­{sC‡µöʬeu·vþ;ý‰êÝzV<÷’“+[–\Ñøßž/ÿÊ ‘(6Å@´ òc¿õ¯‚L@¸nGüƒÉä%~/ä Û%Äw Û»²ªƒ‰‰¼„?;cöw÷}Š«Îš¹ççQÿ9`œÍÞiúçl68¾ØðÇnú¼{fÊLâ÷þ¹§ñl¨ª›Ìœ@âM¯dPË€Â1˜,€Š!¢ Ja¨¼|Äúº3TÃüPg˜â/æ¢f¾ýôg sþ4YÐ\|-Ũ‡Ç:oaQö¡ÊÇ‘!z:„cxÍHJAüµiý£aQ BCÜ@‘^†ÜÐþç#”¬t!¨Ç ÿÏ[2þáZ+þÞŸ?gÇc±šå;GŸ«^}ë°Ý4Ýû½ ‡¯ŽÎÀÝl¾c„¯…©R¦ÊÜ>ìÉ•M|cCÞŠ6©†ÓüʾrÞvÈïÿ5˜äáµÿF͹°|Û <æ_äÛÆ_$–&ihë[ÆÞï–Ù-ÏÀ¼Ã~IèÜ5ô]³íý7béýØ{Ãl`š÷[tì]Dȵ7Àþ`°r’ ŽXB<À[C¹È)ò¶{ ,Á’ Ís »^š)‡Éþ©¾z§³!33vg˜)ÖÍû"în\Acœ™­ï2%õxžÙ8kš™ƒ=Ò®ð´™@Þ*xþ +ð‚Š&«¤¤ÑÀ{P!P ü0>†Ü˜õNÿ¡VCn¨þÏc$ºÀ?¨™<1ŸxßJ«¿x¼¶€4^Ò‚î»÷£¡ê6TUÕe€J*ß;&©îWæ šè 3Š÷!D†9RÒg~'Þ·£]éîŸ-ëŸú<×ü4qñ­ÔdœÔ¼ý`ËhÇí©ªÙ“)'&™/àOáÑ$$YO8£=$‘?Êð6|æùÇs &óHùÙÇàxØûsö8MyøØac:¥ßýÑüzÁÌœF}ó}7ÀLù÷p€3ìæpvÕ!9?ÿ[ÎO3k¶`³ôü®@[Û³;ÓnX8…&0ŒVdâ•"X»5ŒÁl=v<£FÎ>‹Ç>Y‚Ï pÍìNˆ\•@j ØÛ»¤g I@ Éâ GWBÚ†ÜXðÿt·ºÂ?rW+–!7´þÐKÀÔŠ?€÷ÿúÄ×Õ<¤…³¯¾ŠºÁµïÓG›kÕTU¥2€èÁþ觬ö´\Å+¼¦ÁÆö'+fé :lÒ¿s§¿d& ¯œÈ&žë>Î+ôvS Ñfùó5wgÊgñäýïgšM×fïy¼CÜ}øÃêÆÿybNÓ粜;ÐzÓoe·òyé'êÄ–¹·ÈÑù¼îÞi&÷½ã¬žo2¡áù¸‘ª‹†ïçŸà¾ z†­ü4C÷¿Ïlÿ»ÈÉê=³3÷@™žz[@çÞ¾†èL>Ý¡Ÿ„è“IÍ d~ÞÏ€n (÷üÎÆ6<ÖøÜÚø¢žÂr@f‘?Ã$&¡žçp† 7›À%AìôƬÒ-FØù åO©¾Ð=M\ò­ HKå^hôÀ~…ÜøÌ‚B¨Ã þϽ$z€P+Åã©| ðÎÙÇòˆ†qGçmÛÞ6TØgª*Õ• ùmãÐ~âû¶—Úœ·g3ÜÏ3íëo¯ðéì÷|{Ý}iî ô®døf—Âý²NèŠÀV¬ú:Ciêù1=üŸù!@$œ~É–]ðö›…½Ôýÿ]ù×<§ßß ŸžcYlt•ãüa‰çË_ðD³7¿òç0÷!ùƒözOQAÉ0û[ ME‡¬æ ™ŸWKw#ÏÞ¬ÎÚ礙Õ_$M½q±_ý‚©?þŒX€ü5ÈÙ†l¨‡è€ÑOª0_;€² pnpØSõö¼÷òÊói÷?‰Á^ ;,.ÆÀ .9†M’†òTaï> 'røô¤WBðÚÆ’ባ\^Þ…Ü„ÌÿÓ9þCÍX†ÜXðÿ´»€ øÚÈ3Ð|jµ®¼ ð˜±6³†ôü:¸ç#Y¨ªš¤ ½4Dë†uÅñÕÎ8Óá Àv‚¿ §‡¿mo&…NhÁçÁ-ü§ûlt©–+ôÍ6T ®vÉÞþh4†X¼2ñCÏ¥óÀì šRx3€¤Á,}ö<ðé,a–!ýÖ>YóÌÊQzR¥–BÄùÍñ݉aà[q´<µÉ÷‡ÄSlOˆ!î`û~žîwwi qo6"G¶vé˜ûºM6ŒÁ³¤\Œ,œShÀÔVßÔ:“'#3_ºu×iø¢ÎT-? òãyòõ8?çä^^egÒàã̾ùzË|~ÞÀÅóÓ…²Å9Þø«å9ßÚÇ<`ñç€à$;áQh>yy]v `sÊNÔžÔvD Ñ€Æ(OggSÀ§&¡€cmƒâë;ÿTÿUÿ[ÿ[ÿbÿXÿ\ÿfÿZÿ[ÿTÿ`^†žýçYi½èŸÃ1µbrcÁÿý¸#à?ÔŠÏÀh½~ØA¿ø&;™¾ß433ÀF÷\ ~í!âȯ@€ãþÑ{®ë™¢ÈŸ·ù8Nƒ<˜ÜìáMÙú3„ˆÃÓ‡Iq†¿æ€!ÙðŽ x¢ì.†œ'7í4p`GÎAî³¢)L%Sb@€ ™f@ý¿"ä‚%©Ð1ÆçM8pŒ1†‘ôþÀÎìrŠ•†j\7˜3Ó×ùçÀß/€–ôóÝ ŠûhJK\Y€hC‹ŠnAŠèæ~…Üø¡ÿ›öÑAm†Ühðÿf©ù?P+>}þõ:eDï—ëõ·û4Cügáüð= ÜóѶdÕTU•Þò[ÇË:î¾{~1€çá8r­°Šõrß ½ºK}ö·>tn¢ÓwE}èKz œöuî˜ÜËï ¯“=lÅM7^s±OÇàb†ØGž*˜¢É\œÿ±Suø÷×ô|@Zf6öÉ’^[Έ §pä#ìˆ@ÒÎíZò ÚU+P9Ó%~™ÍaÖd†-|€`Ÿ³WêÔ=gž¨zS=ɦ²©™ªæWQ §Ó•råi¹ë,ÓþúÕÈÍɲ†Q1”b@ÀŽ12 ò±à÷幺™ `ú'³›,€û÷¾êg®½ œifXïàÖrÓöX8¬›² l è7OµR M*hÓ`‹¡ði ^†Üˆýÿta!àÔŠ_ÈÚÿ÷ÝHƒ?¨ÿ_òuk´6Ô¤*K€é‰1¾í°Æýv¿Àž>ÎÂvÈà±ìŽKüºN¾ÃèÐ¥e¡õÜ´Yz_­ûì?Zë +“[DW.Kcì~Ô<©¨öáÝõïá¼X†Ø]3mªÀO߯‚»ç÷ú2*|ÓË¥«\ÿtѳõ“$ÀîŸ úÞé6ïBÈNŒüÛRöþÿ’Šú{žûí{ϧàЮ¼ù7PP™Ó;cúÌ2614Àµài„ÜÓs: åŸïs¦çÍ,÷ÉÜLD%ÀØ9óª®˜Ž€oÿ›“;›aïÿNòWR °?0Ð@y ’€4™ Ž)rekx3ð˜óx ð±ªf €@ðé‹Jг+I¢o”8Yß.%+æ„]ÔÓP³9 2>†Ü˜òÿtâð…Z1 9Üþß'AóÏŠd­ø ìóÏ‹_çÃÎðØDÏôæKÛšQ_USUÊ ŠI˜ÓçjÒSlº0_¸~®1¬5÷ØßhWxí²Šß_žØS‘íŠbž±Ê7Óz£[ªºAÁYÄäu/¹Ëq3ºg~ðØ#%³!òo’s?Ö,æ PxobþÒ‡—~ßa0GùßI™;:"â°kžíÃÌÄxÈB?øvÿìLÈÉe.ÿèwþ{¼7{ó3ñç°³mìCá3P“y5?ƒæÛÝ!cVmÎèìæ'®ú†Þ·g¥N èÁL Œ ó3qŵ)îù=üÏ%a¬ðwð=_SA‚ÿŒk`à¹2ƒÇß/¦›é`gêqÌVpì˜ôë¿iÇÂÀƒWÏ@`#Àp#]* Œ›"të+PF ž…ÜøÜÿ›æg’üØQ+n!7.ó_ø1Lmø³áÝ›ã6Δýɹ÷÷ÒÈmÜÿû7@qJ\Íxä ŽnÛXÛfª¦J«*PÛÇÓöív{·ŠDwþð•— o£ñet…ŽmÕwòsÛ†yÉ]h%¼Ž…dÊWP±ÊaÕKÜu%àÀäbšÞÕ›e#Ššó »Ö|¯™@æÞyè 5UwzÛݨÅ1{ôÛt9"?¯ðw"²lGÝýµasÑíÔíóÞqÏ”;¸±? }fû4ë`gg½kö±¿(ó ²W×Ù¯Uçê]< Ö™òxÆ\±ßíËf‰(hÈ–0• ÚðÊ^Š °"¨2~†þ–°?(~¬(ÔŠYÈeÿ'Š?cÔŠo`ßþoëǵZ½ü¤þÎûœûâ¿v0Îf½ñç_.ñÍ¶Ž°ššª”*_qмnç¸ãf³u÷îû4ö[_¶!´ÿÕX‡øNðuF^ÚäSá´]´óp¹©9änôùà ‚_ÑT0í}œºvãLJ¦3v>oâ~­pì³£î@‰$»ÿö<Û ‡‹Š™˜’ÓÇ)Ø€-·ÌÖÝ󬙰>ýꢸ7À'.¸û¹Ù/zçÌël™™ÙphD‰ÇÔä)ü ººN T//à0,˜©“w ú,õÀøõðõ`aì+9@3I‘Ž=!îgÿÌ3÷wÓfðÃ<0ݳmmr¦w̆e“é‹z¿ ,WˆÁ^á²$Þ†µ5l¤±Ü$@cÿl˜ä6¾…ÜøìÿÓðw­†Üˆ½ù†:‚º‹|ô¼Ô{üýÜã[[Ÿ#/¾\74gàØœõ؆Ϻ4µPJƒb˜ÿˆ9¸ÿùôéþµçeØ>Ä$AÝd¢ˆgØ#´Ñ¶–}|‘íaåÁ“ x?þ™;9êB€L³š%¶·“n9!ÒM¨˜U6ÍÚÉ-¦7’÷tõij™fú(ݰ·“ÉÜ·uRÏfÈ¿í$K$RÝÔ)n÷ÎKgÎý 4"¯&ã y8*¾Íôú-&¤‡î–¾Íþ±ï}ÙúíÐ—Ç Þ•îOðÞKUÐÍ“Yü4{©ÎñÞú¦vªø8€ƒ?Ü‚QÜ•@^s¸i€s8;ì)Æÿ¸ðÉtmŠþ1MŽš!£éLláÞ[k÷f¾…ýxùeýV‘M˜˜Vi^Šé©iXÆ@;#q^…tm»TÕÀcR ~†Ü øÓÃþŒEÊo[om¤ ¹qêÿÓ•ZÉŸ£¡Vüì×çãþ·v^سîú`pö‡й«à?ƒZ³5š ;f¦ª”ªdiö'Îðμn†ýkñÖÛlïqݤ’tù&{ÀF}JAfØü [|{ºÌ×`ëý¤Ç·¬ø §‹d5lô‹ß>ÜÐwï‚‘KvïóM#™¸_–­£¶ê²Ž$zà‹E‘{èBR€7®³'<órKçú~~þuC\ Lg>çiFÝ•›‡äRº%ÀD1ï_ùÍÿêIö¿¯hOEè9ÍÁEe—ýbÏò’ÏñÚpù9<à}8¾,W³˜úE{:î°`±cÊŒ;©Ä_UàíÅ;+ï Ížƒ ¹À½««?6Æç¿kµß §Í2ôbyÿO›ÛS0…áü—=ê ¬=‰d™‚’X) Š ITyCT>†Ü0üß§‘ÈDùs­†Üˆú¿/ ºÀ¨ŸyÊ‹iVäÙ%À7çCu×éÀmzóaŽY¦ªÒeøÉܪÞÝ-;g ·Ì§ÀÕåä0Ÿu]ð]»²ü¤Ñz°J¯dxúÚ þ¡ Èݔ׋öº»ç™P‘=ÙÈg+÷:‘·­ÌE} *ó1gi›;Î=KkÀÜ0ºþÔåÈó44S=Ò3H6Ð?ãár‡0Ï_/[ª[-ìžk])ÖÕóñÇ~˜Hë}Œÿšå킌§ßæ0®ƒž'§’š·ž¬zãŒÍãsæÝGoÃþÁÿð2>T05ÙÀÒàÎK.¾ €W €:G«áÜÀ|¾eÆô`kËžBìŒßôƒ»æØÇ<,‡Å;ðæšÝdÔ X‘ÇJÀ€@§$ªšxUºe~ ß̾…Ü„ðÿ€€?¨»ÍþïSXøµâ3ÐÜ}yû(»³Àíl¿û$Ž×qà.ø)n‰÷™Òk„*¡RûÓ¹ÂU¼L] _{u'[Æ™ÖSß<yøgW9Q¿¨øm|ªL¨ü¶,q¶Òå¨ ](ƒ.KÞG:½w±»žY927©ÍZÕ$Zk™Ä€"è(¨¦õxÿ²½ ,ßz[æ£I wæyuOOíËo¡Ò œ¿¾¢5·‹×%‚øP)0çl sÙ³#Ççý»ÀÙ|»É­ ÀÀ×´À˜ñÌîÙ^×ß/ðÿÏ~ ¾?Õ„g®£@ÿ˜Ý3¯>Ïhða  'š„IFôšðÆ»¤H¸™¬d÷ší´rëÎÜ}`X_\ÙSÏŸeà¼}àÁü˜†&[ @òŸá†œ@¾nÀx„ŠõCˆBÐ4<Ⱦ…Ü„àÿŠ€ÿP+†!7.üº\! þ V|Æáû¢º3›ÿx4]ÀG¶f}ÙÖMs4û¬UÑPU ¥$äv9ý9_&â¬xÇè2¡ÐJøÞ¬m~8½@îÚà3ÚFn¼Èë;×q/{òv­÷V5kxB»<&éÉ%Ù&QópÚ¯~z¾jû<™çÓ×s3@¼åóëe’vˆç¯_4d9\Þ?Ù‡söNå}6«»ô?Õ>“W%Ê;§ÚÔrMðŽôÍ´™iíó—±³][œ±û&ÏêÛ[@vý«fƒŠ_P Bþþ^pÊÙç€Ãf€Žä‰%¦èºb‡9;œÜ.ÌðϺ»ï· œÁ²ÖVÿtÿÀ>À>àáÞ¶(颉nÈ€(ZéýRA%Ì=H   ÒwU>†Ü0ø?»”P+~!7býß,a«…øµâàò[/úë/ºÛµ„Û£×OMù÷Ï€c“o#¢™cJQªLœx Çvûõ{›wŠFû{NóŠ0Ÿ¸#!•Üd‰Í”Ó-þíÞ?þo눪Çc»ò»Lù±¶1oêÃÁÿD¯P“hEõœ¾ßëËGgç–ëúùïóþZôÜ×k5 Ó⎠­ÚÕê®oþUž·Ì¾d)W2_û£dhH¼¬¶|ÏÙTqÀ½é~’½33w·/Š7§˜ä3MŸ½,pfçºKfý§É„óÉyûÌ ¯+gMDz%€ˆž {”ž3€a1à&êaûAÒ±„NC+¦`j©Lfõk,Ø»‹w »rèîzè©‹}²ö2—v8cßüàþêù âYîµ(„ÚLŒñ‚«,¢G L ªH²!(ÊPOggSÀÛ&¡€cn#Âðcÿ^ÿgÿYÿ@ÿDÿGÿWÿLÿYÿhÿVÿQÿV¾…Ühöÿ :|€/ÔJµÿŸå漡Vü€FæË¢ëÍ]Þ¿æÊ»±c&5ù¯·/ œá.qæ¾Í¶sÒVUÕ$“žÞ>رٞïj‡7ÞGüùëUÝÝ17÷º:n݇ßs™:_–½y*›ß.”>\̰ð¿ü£R\¡â¼·ÿ¯ýƒ—RZœ¿å+No…t|’šLµ÷ã£Él`{û¸<¦§™·(=–'yÉŸY(? à÷L_@C6]ÀO¥f=ïwGåj èø_8™›ÚŸÃaÃÎ>7Swm¼ïžýù9¶šç×rOàÇù²íûsÏæ/Ç3Àþf ¾8g°Ó?Ì ÞÞÀéî‹“+=sÎiÜ\LeöL6›îʼÒ0ŠpvÝþÐÔýš#ŠÙ î:ðöÞPÒMâ6ø]ü÷JóÕx$Dâ¨` ø²8÷ `þ…ܸðÿ9b–ý@ó„Ú𠹉ùÿçÀqóÞPþÞmýDò% Žæ¾® ­5Tµ”`ðr˜+€Ä—ë|¨ óËh|W]¿ËôÍÇ¿!€:~ñE¼±¼3~›úþ]À7˜cèÎùžÂ1ôÜð&Ó/-ìy¸þÿö…çaŽÛ×çÔÐ:±x·fâÛÚ°¼¼LuÀd.¾hð  ”I¾r‡ éd{“Ó‹ä%ÓÛ—û4'oTÅ©9©MêÄ\ÅÇäÉõ$ì΄a¦cŽ g¼¾ažš)Îzë-âùÙþ³øù«]Àc$¸öj~çùuê=ÇÛ h àÞÀ;¥ aèWÔõÒOö†æÞ÷¯·u&=d7Q߃G/7ÅÀ´i¦ªÜSSLïªj“ù=ô¥Nv`2놨eáÀW¶4™ ò,Ȉr€¿Ô XâÁúùÑ% “VM~…ÜÄÌÿ˜_%jÅ2ä†öÿ›)ÒO!ù³¡Vü\|;óÕ2\ÆbýÑW Õ~†'ö5ÚTâh¨*%CIÝK¬p¼g_ýãèW¤Ü‰„Ï®´Œ N™úïš®­ßš¿Ãÿ„1xŸK7$¥=»¯À¹ù»uåO|Ñõè¼€CsyGèw_±ÈYªûÝ»`û>æý™‰8~” U Àt}Ó ø´ ˜&>[Ï2§^¡hozûf9À€¾æ4]gï¤7ìfÿÍzöÍ¢*«©a?s5âq&Ð\¨3Ðç®<ûøg¨ ¿Þ“×Ä)ö¤@Gb%ÀàœÝÇæF5ÍÔ=¦î'oÓÝ•ÙEWo~¿'w¦éµÉ‹ÝfÕy˜~ÿ]÷'››Ó‰Yüî¾Ì°Æß¥},î#+”Èÿ~¨€ììŽøR ,~…ܸÌÿDZøÚð ¹Iáÿ@ ýǹfüÞŸŸO®\«î?åÕøg ³‰d|êÕòÛ“Ö xk °uø]UUBªÊH^=_¾¦•w éÓ^Ô=¼öNO2¦³KreÌé:|ÆÇ4‡œ9otð›…í÷WøP‡ÿõ_þ¥c7Í—}ù×prﻉºb–w½˜OÝþÁh„&ýüÐ>síÅ(þßU¨ÌÔ$—É5ScŽ'g¨¹w†}'ó ²¨«]“l¾›MRÀ~I$dž9,ù°ÎØüž”1 BÈ‚Û ¾ïH‹H2ä MÐ0à,à-Þ²±À.f‡ ¸îÍ~Ù€€3 žyO³U¡"Q™·fT’Za†Cèl,`ò¦R…¥Ð8‚^…Üäüÿ!~ÀjÃ*ä&gÿ€ _¨ ? qx¸È¾^®«»—Þ÷$6îίú ðŸQÄ7Ûæk ñÕPUUÉðÄ\ÊX‹~g“.kÌþNŸç÷g¢ŸçšºÍ]Í·zEÂë¤WÔÏ;t¶Óóïþð=ñž¼÷^nû·ýù²E…?þé%aûvö@¿WÓAò¶™¡$˜ÓÆÍŽ ÏÂ¥u´‰):ãºóeõv#3L@’¿•=tåÙ{§Ï,•|Ïáï’?þ›2§2ÉXè6ÀùMñ»aˆ§Á^°B$ñ’BHhŠ»˜j«FV*^L‰4“§ƒvÖºØ8f-ØÌjê4ÐzŠ+>þÝwë­û? ,xØz‹k°È(V@S¤6"𠉾ÕÈ ACá>…ÜÄðÿìÖB+š6ÔŠSÈMÌÿŸ'hmðµá¬æ—ý{ñç‡'ãîÑ;ƒ3f~yËO…lùµ´øLU• ) –íù§˜SÉN9õéd›ã6áäaŽB~3‡ü®¿1Uÿf¶.]ÎZ^œì¥dº’BöK¿¸ÿÿ­=Ãr°ðè<[Ap'^{mkÒûŽ×?wKÇ·Õg  úZö?s»]:( ¼Íó¯çWî›2p@¥J=µ r³«w^ÙYI^ŒÊ3Ó=Š vƒ“Ê*&ï½gŸïò÷¿ÎÓ]ÂeúË `¹ @ ¡ Ì `뻉ÀMÛãgaXg]|cx‡ÍB?„‹íWï§³~Í8ûü¸XGí4Îmãa°üÎÀ@Yò@—ÀÍ«ì ^—­‚ô"íW v;8…ÜäìÿLB ÉÔ¡†Ühæÿé„€P+¾qµìó2–_]…¯OMñä»7ñë `…ýê}ßÛk˜†²EPmŒwy¬ û´ó7Z.'_{oÍÙçÓÛ—ó×Ûª’çr«‘¿ªkD ¹í~?O Í¡¼òÃ_ñØÏ%SAŒ{£r|¾h¦`™hËåø ¼i ˜ný¾!³o|¶û¸§¥Owçó33è÷o •¬û½S?x›¾š¡O Ôhêó«Š©ýïbíJç©Á'Ó©Ræd\ˆ&ƒI²öé×Yƒ\.z6âð˜ªu d¬êÆ*ä Á6Ð X0„+¡Q`ÀÀš˜žçùÛT²( |MQœ±¹ß2üç×ÅŒ?§òøÿYˆðµâ0^ü÷íãùóõ“Œ¹p×^ç¼£sÉ¡Aðîõ¢¡U¥Ì•dwŽÓFŽÓìkC:É:ëüक‰ñO¿oñ­zåE|²Y^¬ˆäüòqWÚ-92Á‹Ù÷uéæðìd:^ŸÏ17Çnæo^œtúEN•îö(††â;Ñÿ¤öÖ£]ÃûÏÛ ÙûAîmó¿Æ@ï}ßóÊ„í²î,ÕÆ º[§Y³áïSIÃ&xÝÜÀ,´lCYo?1‚ó»*•7p E“¨Áü•´Ix‰ EXDV(€¦ÎbÆu×XìÛ?Þv²În†.€©¬šý{;°üÜÕvübŒõpÞ¸woZé,*Õ@°ÿP€AXðb`nž3Êd‘ *T>M`~…ÜÄÁÿ{¸„€¨ ÇÿçQ èü@mø8úm»¹;`Åøü›Ï»‘ÐÀ>^cÄoš öÇw@Ó~TÓÖGÅQSU•Rð0Nø¡/?Cßþ¥7‚¶BÃË„ŸñíÏW(¡ùø»„ð>„àõÏóË.£]ssOKÛ:<ëÍmp«‹ðøÛ­¯–Yã¡g~;xþõ’9ó8 KË»ééìòó¹D³9Ãþýï²Ul÷·"Ÿ[ç P“5ßÉ–/“Ù¶\'“—MëœÙ§'?ˆ lÇ»˜¤§ºSÙUpö½ÑáÔÀÆ-ÛO€½÷˜Éb®þç\Ìl|³‚Ïe’C-ßc ðÔÁ€)ë¬-¶ŒMßòž[ž}˘gÀÀaõ»gxîÁ;ÃÎÙ› €Ç:€ L„U)éä¨ìްéjP¡€TΉà5 ¾…ܤÌÿç” 1ñµbrƒð.—ÑÉþÙ£Vü¼ßŠ÷7Þä|Ó†ò®¸*?†é° UŽR$ Ì.°zÙÀËþcœ=àí,¶ fyÝîÏAJÛzãk…q› šÅ‡£óãvä¢@+miŸœ“ G½/ºs~ûϾl£Êûödub‡õ}ô¿5­öÒ¢ÞÉaÈ[p•’íIÀp|·Þ“‰CÖï<ãÿœʦïO¢l/¹Í©ë‡ª¹7 s”æ¹ùýëzNšIØTÏÜÉ55 €ô0¹ìpë¾ðÚd÷]Çí"=“gz´¿~ÿ`ö+>‡™¢÷ìÞ³÷ÙÐÿfê¿l†`¾'Å0tÕjšœ?þÁ:×_N­T}*ÉI¦²~¾áüÝáwY—÷{ç;å»G3 ÎaPbWY% â JZ¥̹ñ‚n‘Y‰ýþ…Ühöÿ~TB$É?jÅ0䆙ÿ9¤ü3L­øMß_þq¬Û3yýÇ‹ÕͺÃeû½­÷›ì9|rª|Ž6k3 UUe:Ø™™f›S]ûí–ì,ñ·cÛm5¾²ºôÈ7£¨òCËìe!áä™9Šd¼Ÿïpê.F15ÂÔ1ÓwÿH~ï$»Õ‹ð\Ó°8t* jª7_ìÉÆÎ/ùìöÏãá%J÷^üzãeë îËå±åÀ÷íšiÌl>ô'R7 0¦;g“*%Ψd:Û“pê_?É?îž.õ]Ãì3þ¿:~öw€œŸ*Ú×·] ÞÌã:Hhà mÿŽxPâ`6\ðqv݇Ã^^e23&iX3æ|gökxë?~jœ÷—ð°‡<À ŒÔ肤¤´Ý$¯¼™\_¦¬Œ hn(ŒWiÏB†®üoffüX¡VÌBnBæÿ ÈŸAòE¸6|À!uèÿyùã~þg÷šÐ½j_ùIŸïc´m¦¦ª”ÑÒ1Êh¥a¸§k×]^<ýÍq =„üß’ü–>3a×;EÍ0÷tyš<¿´Ük;÷:‚L«þô$ı¼g¶øyÑõªLí[]\¨"9ÝêSZ]ßûð¡<ÞN£ˆ€¥V3°çìdÆã‚–O®Í¡ªcænæ.$×}áƒÚäœILÞmf¾êžÕ•)ògÃÁ€Êß”w%mHØpZEç xgç>Àhmc}ë©îѨ NLlˆ¦Ð] c8~sÁ3cXÄØÃ]À€;ww5=f=ç/wÞÓ&ƒxs9b÷=;½ãŽ^ϳxlãÖš_C¿4¡_)f €Ë¤èÃÉ ^g] ( Þ…Ühæÿœ*!àjÅ,äÆÛÿ÷ðµâ3ÐÛßrù.æýÀ£ùHÞ=3æ:$ùÓðɞ϶ÍUUUMRd“†Þ†ñ×vËnWçë¯=tthÛ“|õµwœ_såzÖûÕæìK8q•Χ~YM ðüXZLÙZ·Î”DÛï±KFwÇRöêi›L° ê®;‹Û?»‰>|y¹„N·É?Ž&z¶Ž¯žzî9­šI>úeË0ÛaÏâ·ÇÉçÒÓ< yu`»{ÁØ âñ`!L•¥/Ô“ø7M)"ý4D˜½9œä°“Ÿ “y¿˜aØþm€7DÁcyN™©ß¼ç=ê>À?ü{O€Ù¶˜¯}­çòn뭟ꎟ탙õçØåÀæÆàëTø:hB®†¦“÷ò§7F`#†¾KxÒØÀËHƒhêœOggSÀ&¡€co9ÚïÿVÿ]ÿSÿLÿWÿWÿLÿMÿHÿOÿ`ÿUÿh…ÜÄìÿŽ‘Dõµbrcöÿýv­à?ÔŒÏ@õïϯeàs7Öï$ÆïWãù¯l0^F>†oDÅQUU•PëÏæ+Ää¦nÕ`Þ}'Œk~BÜ!æô>¬ó”Yõæð²!¯å‡áÍ9.ÿã´M›§Z&tëâÄŽ½ãsTáÕð«—ãtb~‘Ÿ|ҚƦqŸ¦ÅÇÇ/‘[¿Ò@ÇsÏçf.ôd²Ë—ò6{|îGUátssÑ…Í  äí\1í®¹ûÀ¨Yϼ`ŒÌ¿sOw}zCnÀ =Qüö†_Š@€½Nߨœ[èÖ“=†6/ úhÞáü½3ÆÅbY–ùü;_ÞǹýöjÁ¸Ùßšc˜9ÇooOy°h;6wé2E@Š:3Â…–ÔÙS ‰ê¢% ßñ˜î¸eÀ~…ÜDëÿMÁøBmx…ÜDûÿÍ?àŸqjÆ?À7Àð½ŸcTmXUUU€éW æ:ïÁ/ŒÓDmô¥éÝ·ôN ç¢PvK‹dä¶þá»°øå îùaÂÿüxQcÿ-ŽÕLïvߤµgÜçêTœÖƒKäi<ºÃÛÏ-ùq„„Ï«4 %æyùç ·{z$ò9óÒ²ïdwß9‘d77쿞|ϧ*¼óô²µ£ûlÞ®  `u9€7ìt×ôMÙô=SØ4V7sÎíXîêbêÏ2–†ý‹~ TÍ·G÷Ù`Í>]Z°™âÔ<~Ë\ó³)ùNœ=4uØàê̬n©< u`øžâ×\¾¿mæoÜÞL[Ž.à-3ƒ‡Y©Úº<Ð6 2JIôOrd¢ ®lDÈX¸¡‘4¾…ܸðßQü‡Zñ ¹qöÿÓæåjÆÀ‹Úªm¾8üËW€}>Z¯!¬ª„j*Ä ±Æœ[°YÍ5Ïd»µÐºÇOH=uÕÍÑÔ)»†ÍÕþÒ* m^EK¼µ¦—›½?N''&?´*…†Slu¦«8}¡Š3-{[_ºu"(g!Éóž“7·6‹ËVµª<æôU¤^ÀÍF~Å3•Õ¹§8ä'Uý³Ð®Ɍ*¸üÈ­ðŒ…ä+›I¯ë]ðÔì®ßÜÅ}Ì«¿w*ù‘èíSÉÎBôÍ~š¸ä›D²C•2ÀæCJ^ÀÀW ø² Væ+@Âù9¹Kð‡à™a‡hàò;f©ìÝÆ¦vêr|>wãÙ6ð<à!Y ê…•é9@ ²À ®#É—*%IbLƒ¨Õ„hI²þ„Ü4Ùÿ§ àjÃ/äÆÿ÷鎴 ¨•|€óùÕKôêøýS-°n­˜ÿå \ÛÚá[ÓF¨ÒRR O®Z¶åÔ±_<ÿ´§==uæ«ûÞҴݼOÒÖ.¨êt ÚB¼9GäxNþöЫ{—®’9þéžEè;#ßÉìüø×) Ü»÷G£8q.Uš¬O°˜ê®þ“À7þU™ô|ê=¾ÿOw&Äþ62<¿ÐO±9}<ä½÷æófeUnÈØ"@žOá=ÊÀ˜à$§žé©ÃÅtVAnê§‘#!Ø‹ØÃ©S{X°X>ìc2J¼†aA6Ž Æ]wíþ˜¡ªû;·›Ž=Ü6çã³½?ל‡Å³,–sÖWyÑX¡œÒe¡ êŒ þZÖЃ ~…Ü„Ìÿ>…@WƒP+>!79óÏM tÿP+~ éÍ÷3FÓ[ïëâ/Wéùâ3áíû¿ô‹ƒñù¸´o³mX4TÕ5SA~{zò/›e¸~f…žòÉÖy9gŸ íý9«-Wlýùj…œûë‚)¦k7ËxÓ·«&p…àߟ¼Dérg{™~0oÇyÛŽ1±ÉßgÙwZ¸to'éö¾ÄÞ7ÅAþûýfЧÏgÚÿ‰vWgçîÄÞïT6М’éLðÎ~¨ùž‚âJÈ„s‘•ûádÆÒ$xspü¹¯ë< ò{ß*žèúäu@êŸúèà4 Ö»½ˆú ":*aŽkóÞ0/?µãà†âá!]®Y 캀l"ؼàÏ(’­ÜV€EÃ6>ºT‘Àp0’‹y"£…®#(A¨þ…žýsaˆ¦¡V Cn`ÿwüƒZñÄ/_~bþ­ê“ðáQryÞWÓ>ù @ Ç ðqšê¤m´^U•C¥€JçJ¿ºœ6ý"m¼µNð S½fˆ‡Âæ|¦f_(ífñ-9ö4‚{«4Ðõ¤m G¶D'Ä­Ô@÷¡žk±‡mTãÁ¿'_ÏÄÀUþ¨¨¿.À~“r½Ÿ-Ô½Îsþ&ËgŸ­Ìké»vÜKç“ó¦ûvε"Ôu@н»§›¯ïü3ùL/ïVþ9´ûz³êûóz\Ópöüѳ~%°ÂU€=ý´³Ü›MPÕžý¾dþ¦ö^Bô X¬ø²{ ørß/ε¸7s‰·0Ãlb¬ã18ت!Iþ ‹©¨HFf¢~´I§sʼn@>† ÿ»¤….ðjÆ-äÆ2ÿ³5ÿ­P+>ð~-uz¿"òÁмÈ&ûM¿ß מïÐFCU)5É„Èüô«9gnŽœ×l?üs7íÅkã3] ß¿>tãîax£¤Ç–N]¡,chv]ÙþC*õðÒ_‚ÓüBE8S|öӔ̰ßoO,Ûÿ Óé~Cp•÷nƒˆ:ºýí窪_h)7­§9Xˆ;â9¿æ ?TªË©ëD€fÓp.w6øê¤™] Àw@¿¹¹ö"+ àý§ð -¯K2ü`ÿô0@7 °€©’ h¨¬ ˆ)pÞA‚ ê°ü·µç¿ìÅì\žÃ~¼cxx(±,CíÀ­†]™±tU­Í_Å-ÿ”¥…Åã’¶0J1 ø¼þ…Ühöÿ\K!à/4jÅ*ä&dÿwðµâèŠ{£ó¿æãùî÷è? Zwï2>ü| ù‰\€w¿U;|«ª¡”IJ”tü²»;fÔÓkùcÃ0KæàœƒPµú›<·boŸû<ê‰7Šá8d-ãí¨@é;ˆ €iWË<û\Þ1žøKðjÅ1ä†ÁÿìB þA­ø²ÿá)ÏÞýµœ­óìáîü\\¶Þ‡8ü8Û}B°o[Û¨E¦¡”©I0[|¬Ñ:Ñe†žùŸK üA­Ø…ÜxëÿéR þ׊à,^[Å^û÷Wæ/³ÿ0ŒåÝëÏWn {€ïv?Ñfªªª áÕeo7MÏèÔ= ¿¥6ŒgY½ˆsÅ•ìÛŒ/Ù½ý’ì…nx÷³èß½Ïê* ?4c|xlð)ð­•ø?}¨¨×Qðß—p=?û5‡*YÊç¯`ÿŽ^:‡‘K²I|^?Äl²íìcúé9»‡¢¯,ʆS`qíž.ÓP•°¹OW}÷'Ç\zˆÙ›ù‘Ì;b²“Ý|ñGÀß ÷9â§ŸîïÑ Lÿºˆ)‹iì8&EI Öê6mЛ—ÌÙ¿k>î`öUÀœ/°ð`fykÍÆ²Æ[× i,‰£!Lô)”˜,’bуË0‚&)T²A›¾Ci²ÞE…ܤÁÿ½;ðµbrCëo)ðg@Íøøþí{>CÜíÆ‹+ŸóÙí/mÀ 'ÍÀìðÓ“àÅ»}¶úLU5”¢˜XÁí\ôñ|ÒÙN0ŸÝ®…üön­ò;­û,^ü¶O«åC $ØÛ€YÜ3Ãa³—®(}ͱ^%·\¢Ý~çã}h¨®Þñˆ»c¹"|¸LU •;žý`ß?¾ýý §‰}‡x~Þ.ÿ¦!k2¯ž[ÿ×¼ú3àôk òj~í;îÌaÃÓûwV Ι ªæº¦éöµ“5=|í´@R ÀÚ“ìfòÞöÎ'&ï‚ÿ¡Iö þ‹Ü÷}'û(Û†|o0À%›Á_þ[ë9Aü¸Æ~±TÖ´ÿ‹eÇïŒ{¿­?Ïôâð˜—ÓÜÁ¢À+ Sx! ùo/°÷DˆÐ #¡H(f >…ܤÌÿ€€¨ ¿±þgG"à?ÔŠG±óïPü]‰ËÀƒp}·'£aa‰©*e’Iª°«·¹Ùñ1Y› ¼t¨×køWl¥yæÓ~©±ªœÏMá.¢m}÷ß{ñ|ÿ=+0n¶ª¼%ì©Úè“¡ß“L uø}yóèI¯ê¦Ð´¾ÝT3_ž' SÁÒýî-àKsè:ç§Ÿ<âÃ}ägœ¡1—ßêV˜cTÿ†^Ü€%8ÖIÞh"µ¡lJ‘ˆÓ»/»¿Vãú~þpây¸üÿîÙò[Àá×EBÊá¼A7[Õík¹Ë>Úº5;d/AÉr4 µb牳¾÷¯¦{LZA-úß½ȆDòãz€ë ÊmSkúz jw£ÚãÓ•™oeîÈï½ç?HÏÏäø…óþ5þ+¸Ý@Ö¦ýô¦mÈ.Øu×[ï»§›ì† ÙÓüLƒ´ù‘¨oM§Ç c’{/¬ž7¦çà`çƒûw€ ’Ù_·Œ 7»qžýiw÷“;àøvú0}s˜{þG®n?¦ &s#x^² _ªÉ„ãáL­ŸìG6ɾÂ[+D´ìa–dö"øž)z‘OggSÀ?&¡€cpÍÝ xÿaÿJÿfÿXÿ^ÿSÿdÿSÿ]ÿ^ÿbÿU¾…Ühæÿ°Üü ûBm؅ܨý³?àjÅöŒ®}ïÌõÓ¹åò>èû€<øÞÀû‡€f_W†Z(¥”2ø·ã^<̾¿÷Z;âåóÛvð+Ž/+{mäÿö:¶âéʰÃİJÊ_þÌÍt¾cWÚÒÿ²ùô¿»èè§i¥H¬Iž@L]Þº=9Ûeá>Ê^€Š¦þü¼Ý“ÏŽ0sy˾°™MÝ¿²*¢”:͹'o–ƒº.±™9;¹ˆq?àçdå9s™þ`òk‰çz g6@©;9Ó?%S~ŸlPgƒ<œ4ÕQåT$Z1c*Õ:"«0¸ÇÏ×ï\>³9=Ö;îãjú»ç6GÃIÏ~9(˜N zÌ›{¿+̻Š÷éCÃý‹;ýâÚ7Ø|×¶!N¨…RjR@ÇAnc¾Ñº%ÿÌ(NûìçÀ6çÛal4÷\ºîáåPOísýS ™._£x¯‡¢áèB©¬üÚ°[b')Ë®Ù4³d#W͇ªF¿Õ&é,ºÇ'z4UçÊ¿kŸ#¿1ñæH3Ǥ‰÷³ÏTú‚†=3÷¥ÎÚHÛ;±éº½‘8k Ó›pþ3ƒ%bꌳë0®é6éFfÍï€d€¬wÿþ½š. ÐÄ c–î¤HðÉa¼ãÝøì)àzg™å¦]¬U6=s7ä°Ý7°Çõ×ãðÇ8·žaØm¤!Š_D‚Lý‹‹ÀsÙ¤ X€/¤°M5â$ ^…Ü„ÌÿÏQó¹ÀjÅ,äÆ[ÿÏXÂ|ÈxCmø f·{}uõÁh>|Zþç´ .Ë5çw/Àg‰õ>Ôj5Jª”„cʶgrüµ/tà`Z¬÷~[úÊ·/+ÔÓèú^´€wi5ä’{Úf2 {ZúyÖëÑÌ0× òÅ…TÑ0ý†;ìwzýMG?ÌÓ}6“yK0IuéPû×3rc&·ÞšÃ¿­Ø`HÙ}]²wVÔÈY…@n¶ë,Ù™lˆ÷p¿g­Î53mDý){æ2‘|Fà×Ãæ@ß õKîP Äñ {óíª+àç×þð8†Ã3¼Ã:ŸdÈÊêùVuÊöèeØ3Ýs(ýû (èº=kýäÆ=-wQ¹ù(çé¯ÉÌÌn\$|€™&Ǫ(æ_4\¶®_”Ù:-?Ò`¿ MÛB.Âðþ…Ü@ù?ì¹ý]àjÅ0äêÿKíxCmøÀ{Ÿ p¨ç¸ù¿o_=0úXøÃ{í?>.€4â,ï'<÷}kë}¨Y¨†¤p\߯³;œ9=çz‡»Þ}®½´H½“«ˆhZVÑÜý¡G/ £þ´ö’ î>[ëàz^jógæ€zº8”W(øí“w‡È§÷ùü·ù¨ýaäü?]|оä+f^Ò öÌUïmïé}h ÄÀ/ {ö,}ót>€ 90ÿ×0Wß(³› “%Ìÿä¾ßsøU€²Ø?ƒ‡;}e|Ö±?’Þ,ª=O »²U¸†Í³>œ <ügŸžÎ:¼ìd|Þ,vÁµÍµxüç×%–q=&’Ö€ÕÒQƒ 6È<_9IOÓ¦£b—0@ Ú’螅ܨý˜™ü1ô¾PF!7)ü3á|j%Ï€Ê󇵋³³Z€÷ùxí°š½Ü¨oàúðˆm ™U£ª””R’€ «÷ܾ}›ÀÔ7¸ëçE»¾qèÆÍ?ËYîBq³މ¦ä µ¦/ÙÿWñÝ(Á—æˆ|:ýöÚð7¼K/É.„¿0š2ù` YúïÓo…Ü~Æ.4PŸúû$I2qósÇ)åÉ·’0‰íÇþ»Aõÿ9¢¢B€K똰ÏM»¬…ƒ*—‰ciº„kwêô¦{§|Ø6Î%|ýœŸ ØÝ+–ä A+Õ Ôˆò÷¡€n` åwŒ±Õ=]l׿צw—ç¡Ê)÷õÏ““L^y®njê¼]bÍaÿ'¦ÆãxxXs‚nØz tô­”BØ +”Æ£g6I&ÍGA*‚R®}=@¥…¯"€Þ…ܨýs£¿ |¡6ÌBn4üßLk~|¡6< _#àõ¯ž/63£ŸÕ>VóV¯ª¡¡J1…•ócVo\»¾öš>¼ÝÆnq_ úÜ{ÅÕX¼'øQ¿t:¸Ÿ.ë7Úýœ¼DËÐ[§G³WôìÑå7œ‹%„Æ’¾ó;ÿê&'ø¤üÕÔAPáÿtÃ…¯GÞÇÐÍǯùøG‡& "/ן8~ùö»¯aeê?Gª29ð†§÷4-Oô<"Ì–ÅOÿ1¾šÜÃi¦3<ç(Í’ÝóÁà ø-ø3`™˜9ÀaUô§A`©åyü­ <$¬µƒlûkÍqÛgæZËásõÕ÷íXž«ky¿×Y×YÏ/»ìa0Øá,@€Íâl躄H›'é¨ÄˆG׆ï·–É€þ…ܨòî(ü Z1 ¹Qåÿéë ­àÔŠ€×œw †Áþê”Û x /²ZUUÕ¤dpÀsÿÍšçý[AF]Tåã£;Ö$ÀôÅ8îÐEZ2ãÑ€ƒ›võ™ï.{èÜÛ]\3ܦCÞqù®M~½§]ठJ§ò[_È·Ã#—ås}º´‡fZ|$­)vø Ó1Ç'<ÈÞ«yç¦F^Ï3ë§ãé_¤\QЪF4%Bù OyL} €×NÝ ó}=oŸ·shCÂ×µï›oOÈ_Àè À¯­ïÔ¡rÜ`†MDì«¿ü9ã'ÎÈpõ~õ!;áçèý€Â68±|áí›\ S·¿3ÿüÎ 0‹‚íåÝú1ãÏÕô±``g}š:JP«'©^`ɼ…Æ€(¤hÁª‰þ¹V–`ÛaÁ%è’þ…þ{ïŠÈ²ö¨» þÛQü‡ZñhÎþ»X¹ââÀ]v¬á*ªÁ¾Ï¶#ÌBU)5J@ý;kÇ»??J `ŸÓ]ù¼–ƒ¶¡ôÚÑÙÁ`s¹ýqÛe7Ÿç߯õ—½l†X·a•O Ãa!áÝß‚s=È-“û ¥;PÜÿWzË›výp„GSGÌÉÏÖÚ6û—÷fR?ß?ñ«‘d½…õ†gAYI/AÆVÄá+ƒ 6ËF¤ÂÀàŽžÍ ¾…Ühöÿð?èǵbr˜ò¿Y˜ðµâ`ÿþþâ—Æy“·Käóߎ ×è¼­£t„UUM2 À6F<>Ìÿ¯öÊ©ŸMØ/®NÃoãO(ã<ÁžXOÚð -ùl‡˜eݬ·?Øo2LéÒïön3ÃQ ë‰Å‡—´²ü¢Å¼óG_ÇQ[sŽÅ‡ƒMðËÉA8–ÊB·íw‹˜Bfø»šØûi~ò?ÏQ6B,ðnS^ªP*Õu>¿’ˆryjšW99]b¯Ñž>:³7@!—_ê‚KšFþXfÍȃTî¶,Ï3]ä}â°@ ªãÆ–án]¢OØl2‹bža˜„)Ød^ §éºþìðóß}ÌÆåú ÎÆ¹–Sèq˳pǾéÄ%4éa$œlìD‰¿4…01ßЖjˆ·3Ÿ7}L}?>†Ü€ûÿ9Èð…ZIrûÿ°„ýo¨ÿ?€Ðø æÿºçk­µ0³¡J)SŒÛ ýí@—›øñ¿_!?9·PõÏÏ57èúCžg°G©¿0ê|NlÝÜ¢qnP77lª 09²6a‡÷‰ˆ8M>Q}óÞ‘G3*U›·yùÍý"b&.¼9¯ï`óùcW¦ÅÍù¸Dhz€üOðÔüšªžÊ¹OðŸCSŠîdù¢DM?TÕFñæ(¾=MëϦ¦àŸ¿¼°w)æ ç¦&©çåÞÏ^»æ)’î¨àlb¶ 0¯4Ì@¹èž^-àÀà õ젩†¡Nþ hà2þLQìJÖf ¯vîÖ猳îªîšÎIæ•ÎdŽq šä=¤( ÀmrÉ+n5 3Gá4$KÒB!7ÚQ%YDƒB’Æ%çD³à¾…ÜhæÿЕŸ _¨ ¿³ÿŸ1•4o¨ ŸÁ,Ï~øï[çkÝ|nM\”öaá7Ý 0ûø~ß÷a>,33UVJ2 ˜'VZ¿o·î³ÓpkZËÓ(ÑõŸòù× yö‡Ì¯~÷ø3 ËAvd篋o&Š8F5høùP‹íD_oW¤˜'» “_Îãøéü…GعÕh…¦‚ùÏ_ßlÂaFdÚÒ/?mñLoB.3ñúÃ9]ïä†6u?uí?>àòŠ8Öƒ É4¢}~Á~yÞy©¿ºÞf¡"ÄnΜs`!…  géB¹{’áç×®ô€oH€±pÀüoÊ“7°f Î`Çé)è©oàBqüí÷Í¸èv­'àÚ™ûk Ü»`k’6(`=/ÚË™6B’,@Z †Æ@Ò`?-ÀOggSÀo&¡€cqø€ÒëÿVÿ[ÿaÿQÿiÿ]ÿYÿYÿ_ÿaÿbÿT>…ܤðÿø_¨»þ?cwñƒâ µâ¯~ÿÓY_·žÿÞÎú¯·Ý~ñˆ6¬ @ø±u•¬mÓ¨…RªÊß_·¯AŸ]n•Ý1Í,Î7{»ÃÕæ}FF˜/'lúKf…ŸîûŒÜ1nG…ŽöÅßìæ.À|(깞¬šŠÚ•\N\^W8@›8$NHè—’mïÌCîü\}r2é©cºèÕùü|Óy†Ïa"RúøNC{3Uªf£¸-;QÏ®ÚÓ"89÷Õ'k`þ{öUÂ|ý²vø5õïTœ \¾¾< å»HRƒƒ˜b¨¹šì†Ís“)ðŒÙ6³³p[3‰¸®c–ž!“iŸÎîþÝ,Цý¦?k°Í˜ùüŽéÉ¡,#Â¥ã$=éZVв¡–<%›L{K“†ÜÀú?¬à§tøB­ä ¹ ÁÿH~ÐühˆQ+þÞ]\¬{y//OÞå" ƒðüܾmÖÑÈTC¥JI8VÏóÒ#ÿ´à‡ïçð*3 •XIYl»íXމz2*9ŒO¯;]†Ph{E(9¼ý; ¨/Ô,ýsâaªKLDz…þYEq Ñ¼¤nŸ/ž¿UPu9?MÞÌ3ßÏŸm;/ !GøÊ½¡A&>*Õs^¶ÎÏí%s"[|ÖvO¾={Ç?ä 8ó ÀÏàiI­œ½.§æ+7ö±Kh y¢H”KËÀÅÞiÜd+ðç0€š†Êˆ;zÕomÜsÉûœqÔWäÎõ\Ú)wq®eïrk‹a¦ŠÃ©$›Á°g8Ö:›öío;‡Àá!be)Ye¤HžÌyg ’ûöc#¨ @>†¦üofÈðµ’3äÄÿ›Ûù](¾Pþ>¥‹¿icÞmÿyÈ1ñJX?Ûó†¯wLµªj$€¼+VópÀ†þ^Ϋçññí:;Ü~3Í_y÷šG~«hº>ë 8¶é#šr½èiî¡O´™tbÂÆj}žX;ë„ë\ܽÏoÂãïÿ<Ü7Ž ?¾Òuøuøv§¦hª¶þñã<“@$ßå9‰(–ú|W|îDˆ»é“öWÒyfQY‡yz*³úôT=qÜ_Ýû™ê®_żtíðöÑt™ÎL6vm¦¹æ-Tp%= ó6T]Ÿ§yçÀÀ aãWÝÀ~ìÀ®S_Û/lÏïóÊ/kñݹ»²áh™Ž ‚TSïsÔ˜|Œ µw¾cöÓ½‡;—$ê8]J­’˜ 0k~l£ûVÀÀ¸Qp%ľ…ÜXøNÐ þ VüBn þóðµâ`ݸ³’1|{»øáu]Ží7h,àã% 8}3 mUC)Z) Àwºݺ}n祢gï+vs†K'ˆ%¨–,ñøÇYÌêþogGÓC1<-“ƒ€N\ûø;6VSüï9ü¿=[8wï­YÙ'éÙ÷ÏâÀþ:óù7O4²uþQv’p6༲¶KÙñ¼eëvül`~¾sþä…oh—øÛFK~ŽUøŸ ;õv-Süú³ÇKV4Uµ‡ô gØ|7 o޵þ‚§å¿ ýóǰ€hƒ‰†"a„¬Š‚ ì&Ûò‡ ©ü}¾]v¶Ç æ9=LùœÄù)v¸€óà½}Él >ª¨#n ΀ðÀ@BQøÊoYQ’pÞ5Ð:Tx$ B(^…Ü0ûïH2‰¾Æ©ÇÉÿýH ]héÏŠR­øxšç`&†<òþ·ìcLo&òªªtM`õ0ÁºÇ1ÁŠÝó8Z딞XïaÔ}Lt¯búe—çÛ¡Mº“ÑAöpÒ®Ä|Û…<Î~R|:v¼`s >Ï..®•=é³Áðóþã¬$¹Í\4ßYDÑ?>-†Ÿæî/?l çêðˆ˜‰K”]Ü^üø3Yù|Î'ÈIþÒÏEõERµ§óGo±|nž q=ÌôÜ0_ nÈ}òmHöèY—hM? ŸÁÃ×ÿíSÔM}€UϺš_¹[w¸á˜àÖñ•3L£nöûsM!’ ò~P?ý÷·ƒÙü®ðsúû .‡`.? œœ^~kl¸Gx0<8Ç#(0·˜?²Áp6€+JÇ ºëP$LR^…ÜxûŸ1 óÔŠeÈAò¿GP+þÞò¦/ä2 œ»ß]€ÎÑõUSU¥$pÛë`œ  äêÏ“®¡WUÈaŒ§¥ÜYü¸¢pÞÚ> nè… Ò[¹Yò îâ–^ø5Ø<ÖÿîeO¾Ó¬ÏÛ[:réÛÒï°^. ]5*ûWŠ (¼¡ëÃÑ[®¿ œp:¹YÎHdããü®··˜!í‹‘£D°_8°Ãõ›|K}ÖI»òTï!{ýsvñlØù©ú©±ÀÞÿÂÐó‘‡Ï¦ƒ¦@°{ÁŽaêêmÕ¾h$fz@-¯TŽ8Z?J€i¦ãµa¨Ò‚ز°¹Ø^<Ü€÷6­IÎE¸€ß§îw‹¼‡ã~2ˆ‚؆ʪˆHkcÁEúªŠ¥G0 J±¿ ®µÌ±o€^…ܸÌÿl!!HóÇ8µ‘0ä0þ8ˆD_;jÃ?À'›×ZϘÿÑ» W_ t˜-Ÿ­¾­ª)¥Ê `èC®Çv@ø×¯$ê½/füC£Ç%‡ÞÂ)}gjø¡Î—Ò|Æè4·ÅCÒÐý±O7ýú¥«jÉjkŸœ~U›#s eüÛ=È\Šêt§$¢9Z6}B~ÖF碪&€ÍO‹{‰!rò°9÷_³›Üg8éykà:;ÚÌšÐ}©þ»¦8 \xÍ(v~‡…†È?'p¶z7‰Ö‡Š*<¾èë@@K0 ëÌ8>ÍÌo5í {;MÏ©Y€5OQj5€ • E’Dã.Úõ5+XֵÌýÓ3‡3ã¶9ñ­sŒ‰!vùúk&  8»Øbßßc’;I`£D:p`* –Îb¾ð VŠ ¡GønA>…ܤðÿÍ-Äo?P3CnHþ?±?(~ Vü|˜…“àÝ6_/ÛPU¥Tª ýÒ•[ä-ö¢Q_N¬Ÿôùžî½Z@Ç‘‡ #MàJ~ñ銖nÞ±z u/Õt\1;Ç Ð×ê#rö¦º>fãLùn´›ÊÛñ»o/ 3>-ñöì£'¼šÝÇIâu$}÷t‚_AM1G%ßȵ†º“šq€Ÿ y*s¿ç r.4$ç¡1ŸEŒ«éÎê¬yΈB@ý€Ž_ÏÀ$=l-ë«þÍÿNTNpþD˜âÙœ l€ Àÿ0ìßÓdÄD+€ûû;ÞÛñ·b Ž… N¿™ñ% |€Ô娙åûàôVìÅÅâ;»Cß{ËàðáÿÁc¶QHu«(6«.ª²Š"€šUZˆ%›Ô’ Rñ‚ŠO…ÜÄüÿ¥ò|¡VìBn„û¿éˆ$?׊€wÑ<ú×=³GÇ.ðÉxþi@Á×7LÃZ•”) À{+dœô@®M¿ÃäÕ¶m27×+”Mï2¶¹æ ä4´x› Œ)=4„|_ßÀPͺ͵…g‡y©ƒŽíkß7`ƒã¹§ ™½¢¡g6&~ Ù§ÿþçîýæ©<¨¡RÎùëÓxçuŒ±ÒªÜ[ŽûìB÷ίËq?Ý¢ Õ6–¡÷¦&8; )à+àñàXâ(`q°KÁ qìüwÚ°‡]_¢`¸|è5ª†ÇÅR£»xûÉž“¦Š|áB³''˜êþ É™Yî¡_pñ¬¯ï¤3ýhÿ4cýr4^5çøxÍÛ¶f¡ª ÀÃL°/÷NÃk:Ó®f‹—Xë×YÏOëñß:fB£RŸüìFp¹ÀÅãU|ØFµõ5ø*8" YÙ(“áÞ?hú{$—“K4ùèjÿÝTðó½“Ðožó“¦Ð<Þq´ÄOà./~1Ÿ4™[}øv¼¬¦§J4©7ŽúAÕC÷lNõÐÐ7 ÃÇVDvóhŠs£· Îîâ@6Koذ|ºÕ‡ßåI.+€_×a`´Â@20a à´àÆ Ø©snrœ{© SC®qg.®ø§Ÿ„¼¦I cÀPI^ü°w8à¼Ë1+cß{Úš•9ƒ=ð#ƒ€^Ò¿ ’¿ ´¹Ç^F$%/b)ªw(~…Ühð?|*«P+–!‡ñÿ77òü@­ø¨_óª_½GÎCxëo‚¯ ûîÛFCÛPIKz#Ámmvzýýá;ë˜o¦'͉¶–‘šWé-¥Œ7;Ÿ –™zª®Zª“·®M·[ÛÇgo¹z!œmr6Ñúì…o©·ã^UàcNxuHè×¾x¥HRýâ[5­óýå4xjý‡7$[æ¾ÈÈÿOÂBsº’—½?û{£Ù è $¹Î¥»&»nº àìÙË•ŒgÓ9Y ®)¨ ¾{ÿÖÐi6_ €/Í)ø5pþ{vÕ``ÞÂË82?rE©¦šÌ®«75_“9dzµ]=€ò[4;™s:;ëdnu5+55Æ v¸òç°yÿûi–1|XQ½ÿ·|Ì»j¹/:¥±h¿€{/g^Ò×üPÀâ,B` ޅ܈õ¸Ñ4o$kÅ.䯔ÿ77ñƒâ‹Dmøhÿý×yE.³y’Ÿþ¬|ù» @0:`7ßÏ|¶õõªU•J)è<+æßÖ=?fÙ}XÉ yè£ÿX9PãÝŒcÈHl€íÏ\ÕÀ«vwO&Ä—jhþ‘Ì´ì —|ÍAïÞ÷‹çàæöz] áùgrd¡aš3ÎÜ;¾…>îÛÞuõô¿¨\¢ÎîMäà ÔÌæ< kÕ{‰ËËÝÝÓdÓqò f_SGÕ\k?Y÷ÔÙ0M7y`Wõ4;¿qi° -H°Ï#Ð5ð]ÿ äs›Š®áW<„ аã9À¹qSçîkVÏ}ýå³ìOýÔ4w’]9 0oÒ;÷ÿùcî¼a‚!~žáQã@”…]f¦|•úˆPZ¿êü.€Y“´kK OggSÀŸ&¡€crÈÓ»Žÿ_ÿbÿSÿ_ÿZÿSÿcÿSÿ]ÿhÿ[ÿWž…Ü8ûÿ{ðÞP+n!7fýÿ¬Òð„Úðù‡ïŒÕŒ‡s€w9ú·¬ûîUÀg@5óÖ{ 335¦™ðÓ”ß1½_×s„ççJÈÊgÃÒ:™/Nÿ´YÌŠ¾Óß->³¥õxø™ëeé¶tÚwóã–9Ñ»”/õ»§ÿ#t÷ìŸKN'$¿¼gÉ_Q/¿I`ŽÇê!·6h:—ÿ+[àS÷åþ‹½a®™#÷T÷Ã<ÔÙ®b†*7<µÿ)ÀÑ[æ??ì8zyÚ9DýäôŽD²säßpוP•ÀCr<&‚7c¡½ š†JCç-(âË~gà‹êr–ß—œ]ÐŽ‹­ï÷1ÏÐÉLªvÜÍïÿ¿u$»AõÃdΜ3óï?¿¿‡ \ŸXÕC6µ+9,O#í×ÉÞ}Vh:î¬ÒøMçb€½gÓñµå]ñì„©,þ×^ÕžY³äÄ;ªüîøÃÌ dMvÄl¦úœÒ¼ëj8ç{l€ó¥i脜¤0ÌÕg’×사œ>p·Ì‡xûÞÔ¯«0^]÷û…Ì»‡Ù±'ëÃÀE'$Urð¯ðWlÞÿm#@"ð+€xiPWµ^³„ Ž+ãUôë!Y1:Y  þ…Ü@ýŸÇ2àjÅ1ä0ò³„ø_¨ Ÿý—ga?Ü…Ž`]‡Áã'`ûu{ÞFG«ª\v€9øÞæ­_æW^î¬/>&@&÷v¥õŸ¯ÜuuÇÝ©îóÚKOí¥\ûŸ-ŸéìÍì ô”K΄÷øÿRv·ºÑ%ø Ù×Cÿ 2“ûÇÓ2èòܳžzÛx‘w_¤s„@r½ôþÍc¹ïr7k9ë5•{@\ÅT€Ý—Ïf’÷4§O2ë¿ês w6jeìñÊÔ³§A÷s€è«€\²:¯sEo{°?®Î$1 ðxöÔŽ™ýrŒõzÅP£Mu×ì§š“õL’"Y+Áø»“?ŸËÇ'jö±á E @ÿ4˜ß’. 7ãc@þ1@øƒ¿‘Ì… >†¦þßÜÊøB­¸…Üÿ3á|¡VüÜMwpq„¯'`?Þý‹•ª“€× ÿðl‚Ç6ovQ@ü]–ñÔ¯Ù•»g$®ÏÛc/|.äE(¨<ž¯Ô’§·ysÑ-þiçÔk{ÿÄÏvòxh·+S4ì]wq:©?ôkÏÛ(`ŽÅxõrñµôÅ^л#{¾Gã¼rÍïgï!LÄ4ŸærãÐã[. /1ç 5ÅðQÎe ßÕç'û1ûºvÌv)a¢Ûµk4¨Oñž©ªL`×"FÕ¾ póo¦.ø?ÿº>ê~àç[ Àà1(u?à¶´Ã{³a2¹šÁ$}Lç<Ü)†HB(€R ÄàÚ¸†E‰P^†Ü@ù3—þ€/ÔŠ[È •ÿÍTù»ÀÔŠÏ@3?|ò2³éÏpƒ3ýÀ 8žÌ×hdZ5 U—R ³Ý´~ÛÆu ^/ŽÿYËHNÞå•jŽ«ž¤íZ_Ù wnÛ[½ÿ-(¥²¾ž¬á W9ÃÿScj^À—9,ýË¥èìò@Ý·à˜Ý—wÇø{¤NËÅ3ÔõÃÅ[$´­ùgÌ0 ¦ò×-¯Ì°än~ó‹šk‘/èì·‰ÇóhsxF>íj~ ÚU'é7ð |ØßÒÌÄݵ$óëÎ\ÀWÀ¡îû€ÿÔÃþ]Éw €©°ø<îÏËNvÆ…/J¶îs¦è}†¦ýö¼îãÿíë¦ÏOÁàôw•¸>»8Ü{ õSgØ·``¦°lýžYL× LëÁ€>¹ÎźÐhÏ[»‰Â* T@†fÿo¦ò3àjÅ)ä&…ÿ?Çï5á µâØï?þ¿Ñ{‹âŸª½þê¸}üßýW€}ÎZ[Sk¨T• À:bþ•LOõ1&35ORüF³£@EÅöÙ+ȈÊDAõr¿ç¢còÃóbžFžeýÜßSDíßܘs-ü…¯OYyXü!‡xDÓvÔ?s‡! —B’…%øºãÝyŸÝãzN;Ta‘®&Ò"€»†Ü-õp¢"g÷®Ã/Ø`%5p²ò Å :D{6ôJ_ vA€¼f> ÀÙLÿ |u Q|¾ÚjÌàçË ü9+ÞksÙveæp³ëlÔþ©òðVsœÛ/Íší¤U% x‡àrÓyzz Æcb(¢ Œ-DAr ¥Bù’®+Mž&„ZJµÐ>Q~†@ÿ‡?è}¡VÌBWþÉ1öw5øZÉàì˜<úæŽÕ øu˜u©ÑJ¥R¼žŽBàË´o 3°_Z°À=ïQí2¹táqô¸r.žQh<é¢Iã81 ËaáÉ øñùa§²á®§äþO}‰ŠY°aÄŠ+³ë?0›ßôÿw@3pd¼cF=˼M¨®ˆnêU=ì˜n=MŸéßMgq<1 “I—ìœv¾×€NØðüÄÓ·.ðÿåø*µÉ² ›¤]襻 «:@ÙÖ ˆ 4p@° †Nüü ùZ± ¹ñÁÿa…üÁœ_cÔ†€×!~yÕ²gà&{£aªªª”TA¾:`Ý'¸˜pûŽwo¦R¶û®ùå®W2! Þ¾£û,5ÿ í?µ¯¬÷¯‡¦ÆQõŒåš“Ê^ùÝÜø¹n¥» Žwü÷ר™~–œÅ%šÎÏ ´«~¶]YÒ8ÛÁ²€`yýÈç©ùrD§S®›Y+ûªÝá­åîš®¬¦wÑ+WèÐs¾P´÷)¿ìÇŠOæ]Í p6CƨÆý»ž˜e÷öÖ€,€¯€Íw0™€µPÓ‡ æÏñ¹˜JŠü¦Ùœð.àJfŽþSÿ.7$Ýݾÿ|c{;8Kÿ³µÃß-¦`ÓcßaÙƒ„hûƒ˜—#¾Û„üt\?dS"©pÐi>†Ì+ÿÃ’ægÂjÆ+ä°Üÿæ#ÿ@ö6F­øøü¬µ}?ýú܇¿ô0lïšpÿC ä¾ÍQ×T¡ªªL>o˜ÒkH¯µ3è^Y~?sçÊ/èß!k ÿMŽ~áæéfKÛâRÿ?Š´ÝóÑê_¯ÊÞvÎܽ÷ß¿b1ßÌ¡ln?tÏ1_æŸÓÖŠê<õ+²&g’ªÍëcÒ{r9¾¼È~á-ö¯:·Ø€ðÈ1i&aX:¯ÅÌ9ƒmgÛ JÏ÷f.ð¾Û:C–74M@)V° `±°þÞ}ìC~>ç³Z;zü|m^óy[ï¶28ïö16OïÓžû¡(ª»Éäi”Eîٟ+æ’›µ ÉÝóí:œ:yÅØ±oÖ3cm²ëÊq×%z LøâÍäµ#Œy ù$éFudHŠ@Žmzq€$¾…ÜXðÿ3K|`´/k­˜…ÜÀþ¿yÔ|Àx2Õ†?€G_‹‡Ìô³Áó¿{½\ß@Ãýæ<È pï6;𩵙ªª°ÏpÝgµl϶ÒêÉlÞ£†"¯X1*óqÍmvYF9½¼›…6ôІ ~b´êA./szì¾o/_Ð>MPúý7ÄÖë›B>û@àÓ÷îÈ&"_l~ðÇ7?_Ø=SØ5ªñeÎ÷÷ï²å!6“$þ“Ñ/¨œÏÞo–¹áTÆÄÄÓí7ß”¤àûãwhoàçKC†jˆU$ Sdü²ÇùqpÎÿµ½ä¢xL³:f ’•WrŸæuuòÌž65» uÃ9ìÓïعs¦+‰žˆµÄô|e&Þbƒ}wç-]³úK¸cóþñuw”xB]mÉliM„ Q¡ƒY5ÁPÑt4¦Å#þ…Nüß,äxCmX…ܸðÿ‰¯Éð…ZñðæâYÛŒ‡áù 43™£Â¡¦­*¥.%x¿WÈ1‡½ÎÃI—Ñ¿²ì¼ç"vž¡I®yOíÞ')ÈñâËÉÒý<?å®%‹7¼ÂP³+·£§\5Ïõ>jßgbïÜ £<6Oñ²§s+ÉÎ9ÿ ™YAóvÚýssJàú9êÞñ’óñ—ÙeŽ/‡ËÞŽdþ»ð³&? §òSpÇ¿ÜVÙ5ٚݰ÷%÷®0÷Ö¦¿ž˜ç) MæNHå<+ˆË°‡„ …ñ ¬FCÇKÌ45o}]:®ÜÝÌþÝÌÎ&™Àp7LOf°7t&°³‹áŸS䜤ç;}8E_çjÆÏ¾ þpý冀¿«Ë5>É Ÿn!h€nLÞ"Ë€ÞB Ù ð—èÐN¦.HQxÒOˆ†RþŸ8Èð„Úp ¹!÷ÿÄŽüO¨ ÿßTpÆ–fTX´ª*Uðœ0ç}¦q@ÇØòÀ2÷ú^srNÆyÒuý\¿·Fl—´Ó{¿Þál›2»UÃbXÞëùéuK2Y˜BV6ªÈ0¯ü-D§¦:í=°r$êȼdé"’~|m:ê–ëàMÓ1úúãÈŒ 2AzÊ;‡ÓµuÇ}ó?iŸ`5E‘qn²èî;<‡éΑ¤rä›™7‹üùò$÷s®)6Ö³³nj¼ëÙ_ 1ÙHˆ"ï,ˆLåwɃƒQkW¢³ßÉœ:Ù33MIõ°ðíïqÿñµv3wRø¹Ÿ]ÙéëÊÊzö<»YjZ•@aå•ÐàÎOclr]á4„†S¡ ’ž@çbŒæBÅGðšPÈGµ’0OggSÍÎ&¡€cs:óÕÿUÿYÿkÿTÿaÿXÿdÿ[ÿkAQXž…ÜHæÿ°”Ÿo¨ ·åþßÜ®ŸŠ7Ô†Ï@ƯÏ.öÅŠ¿¼ÿÕ?wk»Oƒ‡Î€×çYaJQª ~¼®vîî†/HÐu¸_;%Y>äò±Á¥ îw£¸aAÉÃO/–¥ìrfĶù|‰@ëS…Ýd7lÙ?ôÝ‚ÓNÀþÐ?þpÀ쟃Å[/{~Œöòï3§ddd±Å¿¢Š)8ª°ì–z›Üâ9ß®áIpÄî_r_0ËÔ®ë)ºfwe’ŸC±ÏÀÏÈa¿Ò9Ö¼ßfOÚ‚ßYUËþTá7ç÷¡a'ûÁ_ï:èóß•ç4›víøÙ7öË3:™¢¯J³³;¹]ÐîÎY•ÁÞLJäâòöÞsÓÃt¦híq7ücá 8î˜Ü®Ðð„&H"Ô*©þhTþˆhnþÔ©Þ^…ÜXø¿9¡?àjÅ)äÆåþ7wéøZñp^ãÑ-šçÄùÿ¼wóÓ/0XîÀvèü% #:´ªVeVI8¼æåŽ>9‡Õ~³þ²÷ûwÔŒ§šGÆ•åè [L<%ü];{á!kR‘Ö—Í0—ƒ^J¡;3Ñnߦ+¼­{ð}3îòfèaß+æÝ_Çå\_½©Øè£Mìs_¶°?ç×Î]Sä½kê=ûž~U¢Ïý1ãï˜ê $´:$0*èiû÷ûÎô¬ïÔƒ«2ñ`Ïaúùw’ìîú:tÁw?3÷ts=ÝPÀßÏvîWðZ àï›k«Ÿ •ì§Î/6e=pŽ13.†X[tÓ§€{c€ƒÒð49¾ê7ÀŸ xðØý ›ªÌ•ºl [OB:Eõà7~…ný“óƒàÇ µbr£Áÿ¡ ýUç µâà€GÁƒàñ>G-¬#TU)€ýÒÛ0€½Ú·/µ:æ#—Q&»»öP”ŒÚÔ‡é8@œÌÿÄ *þ›iª IB7Jcõ)êF³ÃéOºÅLS¡r>ÖT©†Uüñe»i¼dKÅô«yŽ€ŽÝ&êΩZä׳ÞöÓâÐ ÷ý}@Ê &°Ü¯—{“Ïb,ûw„iE*ø|¡o\Ša€*PV¦wF*U¾Éæì¿ûE›Yt%ð–‹y™yuÙÃMÐü 6VáÊÏ]@Mmj'•— 2T1ûä—M6ÀÀûåþÝõm˜ÖKeùl_ÔðwH„­;Ëù±]›*ò>Ð0‰øgwûxþ.x©w[ÌŽñÔ{cgÞplÉ‚VíH?à´NzG÷T7²³•CºLEŸŠBPÆ´^ޅÜÐúâ„ø@ñ„Ú0 9¤þG—ü ú³¢X+~ïŸ^ý3ò—Û¿ÿíÝó_Œa÷Þíx·ä__,Ð4V·ä{ðM˜£Q Sm(¥F1ÁŸmÂ̧5ýíÄþ|˜æÎ}Ž+<ÿ“VË¡?«Ýä*y<ÎM7þ+êäé ŠN!¨Ç dôºëÞMö8ìð¯xÝåRÕ, üÇñµ&w"rÏ?—+“…ü‰’‰áÎ'["§á7ÏÎI¦yعßÿõµ>‡åPå¾~ú‚™æóÖ|‰ƒª"ú"+7 œŸ?þX­2”°©ç4ûÜŸºÓ< Œ:%üt( šyë.õ’zü`¯ÿØbXª³eþvbÈ÷§ÿ`2)'g~ÆéÎfòTQWw£ÞãÒÅÖ±h³þ+:üÓ°€&Å @'› –0ð ”3õx€@>†âþŸ8B?<¡6üBãÿòÂ×Úð0¿ÿ[ž] VòrÝåüàßüh;´VUªªŽÈ»X¡KŽ<ãW÷g_Fcþü~âl£¯Ò¢½\wRMõ:o»Ö5 c2‡—¥h×µäœÏ®l ³_ïa_êaÎ|›FÁ™'W|>0ÜúÛÓ¼y¬z.3—Ò¹(óÆ”0p`ûyd[Øù˜™ì¯õéó½3üxy‡ìL½“EíÉ)æˆ]Çùe™s§Àu„0tw÷S»]C’Eóv ? à]Ü'ý]ݧ€„½aŸù|é·Ú["¤Õ``jÔ.ÆsºÇiX4ÅÛE¥¡@ÉÎö»s®Î]ˆs ¯Iδ&ß9Üßýd5»º:]C+yT|ûó-ÌÙÖ±Á?ãì×rœ·µÏÃx0@o¡%H¦Wkƒdy:_&%Ä* @&E§d¸ež…Æÿ“©üèE_;‰Ú° 9ÈÿÇ1ü²/Ô†Ï@__O>lÍJ€oÀ¼@|Õ÷|ZD«¡ªJ) @w×¾Z¦=¾$¬0ñºpºØÖœ ô¨nŸûBÉö~I8çZ71ó|ç™h"ZøõôyìÏÂ,n“)K1¥¢”z½y|þ]¨NN*êëß2 »›ãŠoý d¾–3CõegÌsyÝ!À[¢j›íõâôCñvHgÐ]~Þ¹½þžH UÈõ>œ«Æè§Ùž¹ôÆé7ŦÍA;ó<õbŠ¿Š‡*o( ýØù´ØÀý»sÙ1d šœþrh’ÊmŽÜûcÝ+3ÌÉ|ïÚüØ„.ݱÃÕ}Ί_3ÍÛqõ÷O³ÝºÂ§åÀožàÏ‚¤³ƒ¯“åäh¢ U%A`4ëtø“åxл4ž…ܨú³Ü$¼¡6œB·6çó£J~|X¨ÿß4ðîÀ=‡o„‰LU©Kúæü꺠?·1¿¿[ïeŸmŽ"ÉŒŒ3t¥r¬F hÍ%‡=WvdÇôùšÚÌòëD‡Ý<‹=¼o=óÁËÛÈ2d$ª[ÈÌã8\ö6Pb¾Úã9 <_ÚÛ?ñÈ^qºjß-[Éw ß$àÔôÚ¾yãµéGl‡¨2õKyÜ&I÷ç÷ëG^ŠÿOp ß¹£•zÏ:Ø™9ú ¨‚Ÿg'|Í ËF;ù0ì A° [x~ jÀ†§{·zØâQ s¢~…ܨõ3•_¨£þßtø@ò…ZÉà=Ùß~´ݾÔW8à·¦f UJ`>Ÿ§b`Ý™ÚbÕ\_ ËyâÿÛm¦sú“Œ^ ÙsÖ…ìC¸ï[‰yÎú‹´;ûa?Y±Àb+€îñõžA•¼kYW(¨^}¤ùr¼]=ðŽâÏæTôöñ LʯÍvÚÁåSšo6xad+^¶Œÿ^Ofg2'?ýUI¾1ô1SPëDÍ¯ŽŒr¿4oÝœHŠö•]X{oMÿ­wvà›€Tø3 \ "€² aA55>N@|Véqú ÓÙLTêP3¥üØqÿÛõwÿù3\Ð4Ɉù,*v9ûÙóŸyç47dOÍ!ç—8þ °Ç8‚ S? RLD{±Ú'ª±(0Â_8ä!§Ä+P’–…Ü€ûòæjÃ0äàß ÎÿQ+þÞãÓ€Ü|Å|šÍ6¢¡U¥”6¬ö¼VŸ/óJˆv¿a­0±SŒ2šh|mº>·»ƒë§¾zÀ4Pt;îššº?úÊ×·G¶~p‰!?½röMŒ¤Û”®æX‰…Dô„Àœ1?´,¶~á†Ô—÷xTS݈5=|3,òëЭÙNCUAó¬^Ö„ÉmgpÎåçés$á-¼\÷ÞDâ¡æÃ utþ†¤¦†§Èb”ß\•3Y™´‹ ûzJ»Ï“5cÞÓtG½çÌ1#ýlïL'§fÔ•÷Û5X_34O­ÜIaÞièyi Sº2gùÿaŽÛ5ß™úú¸Â¿÷£~öÓ ½{HJI¤}I½ë×ÕgŒð<þ, ¦ ó7½Å¤RMDɦ IQ+)z à` ÜGT—1 Ó‚Ò ¼9ËþÈ5§\sîø24ýœhqxôcù>vïŠ+„€Œn¥mSÇÞþå±óQ~ÿ‹î¾Þ&³]ð…‰?Açá‹”9‹þõDYö?̹ëa‹½ÞФºyõÁ®ÇàN×v:×¶*‹ÏßÛþ÷EåûTðÔ½vt©Kp9¾Æ—#……ßýÙ)¯Ï~ªÞÜ~çá2""L5˾=Ûxö£ðªœ;‡¿úEú§=T(¤Nç©sþ§ýÞÅË¿ªz¨K¿þù·¤œú/q.ñDÇŸ'þðûŸ¿çóÇ:ýÍôù²pþOLÝF¢¸iÞª _ƒ`ÀŒ miniaudio-0.11.22/data/48000-stereo.opus000066400000000000000000020317651475701111600174470ustar00rootroot00000000000000OggS›O!~{EMOpusHead8€»OggS›O!( ¨OpusTags libopus 1.5.2OggSÀ0›O!YXÛ]ÿÉÿ¿ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üûØÓ#.…É€—E@rL«|î¡Ñ«ûRðwÚî˜[tgü¿ûYqžäJÙÙׇß–‚t‘xP¹Þ‹7^Sh,ÒÈ“²Æ;áíôßQ$N KS¥AägŸaäµ:z±'&ðÎçÇFã~sÀîdÞÙR‡d™äUœirÝ–îØEÒFAfó²'tD~˜€±“o-‘4(T <>u+±‚¶ nÅÓm´É­o0ꇹ[‚ʰ™˜”6‡‚¼zËࢠÚÀ%ëˆX…ðò>ÎWªf+ÑC/èÏyÑ%Íæ“¡ Cà‡_"-¹ƒò«,G›S~}Ý8|ŒÊ˜£”Oˆà‰—”P_Kü GªÉ+ÎóBµHÝ@Ëá8Z Ó¾ˆümA7`æU"à_˜+hQ¦fá¨pèhL *U¹XëÏ dŠÍ%ñ÷A~fª#m÷ÀñzÑÐ토< ÓÚyÔžäͼÊS‚ËÇ%„oß»å´õõ‹ªÉº‚¨6‰jã5àjÇåíÐ2ü9ÝU ÃP ô¯Ú+yTÌŒ×л×"ù7ŽudPŒª -G‹Ù6T•Û!Ù5mØ÷ÔÊäÃ:W˜g7¿·Yn!@bIØ–À¶D¤µWùµ¿üð-ÃËšER¯ÃT%ÕI-"tÓiRú63H„%8‰SøV8¼ŸÒÎ÷1ŒëÂᤦÖ2e;˜¢‰¯][‹^+wiªŠÁVÜtâÈÅãó¿_ƒº°‚¹Ó³÷âü¨Xmq3x¨±Ý{„2G^Dt²3i.(ÆoçCˆ†šÓFÇ£6ᨼs>Žhc¼¯¸´Ûõ}.Âzt\ -N†Ñ4ý2Ê™VL-¢Ç/|F+ÔoÛtÆ’"È7PUrùÁPBò=™F—–`þ÷3Ñ`pDÈÉB~·àÎã™M}ÁèUêÉø1u~ ’j 'ñ®ñ×3 ú 8,+¯jtåWy¯»¤²¼xæç7+¼q˜o¶¡pµ[[×mš^Žÿ[1†SNèL|ó–Ï :tª—~Ú!G`¦ ê1™özüì‘Iy±ê¹íü¡÷Ú/ÕgÆJý¡6hÒyp"–u´éH4ìt”–ÚýÍÐ~LÀ{Si&€åúï\2ˆ[$ñ;ÁÊÞ#º4•ˆåÃJ'é%#ó¡¦V;¼íöŸ~jGôçð¯ å§#R „¢^|ï,E±ÿ˜¸S;©r\£–뇠í³[÷GéÏdó›t1À"i€S[âªLJžFšÜëù´¥r‡ÄmÍ«Ïa!ÌIˆ¢ò12“,WÊaŠ'‹URuò*ù•>W*»Ä¯õX ¢ûc°¬¾W©³æÎ·¶ÌO¤ç‡…ù0~IÃ0‘oa¯$-ÔöL·k±Dþ ±»*†_â-æ”þÇ}twÀ>±ž@œ·ö'[Û—šÙÉíã9€â üìX¬—á(UÚ ”åÒéé3´›à^¥Jaè[…Ü”Åvp^·¹b$^ݪV^›¤iÖ˜iêÛgÖávp†Ë:@w–Ï” WÁ©L•Tré Åy²v+w7ú²†³[ÚÕˆ ‹NÀêì‘ðÓÒ®†ãgÓŒ†Ïtrˆ<µML”´nÐ+µÖºR°bZq¢?ä©&UÉÖ•r[5XÊÅKNi#Oj¡NØPýwQùêšCcmÓV°/fünIØ;|5B/¯ý÷Œî¬¨÷E˜h«f¯GÒÞ´N‹{ß<ÂæY:Š sÁ§©á…t‚þwòR"U’\¾z:gûìn m*°ìV£BËr>]¼Ä­”)ɾ„•ÖYÔ‡Ø* üïÝ#š"­©²€5ßSBºÅÿÖ*ÅhœÜ*Wµß!ȽÇåÉC_ùìsxŠ‘÷à&º"½ ~V¢rÈž—±¿¦V.(uÀ`×z>’|šö,³àsRÍœ› -ZÛ[up`µ³Ä½¬éMá@›hgr¯= i¨Gío.áï3ëû•mßÞ£ì 2»Ì(ø“ %€H>•!Šjh­;ìLW6±N3p]Z¬èÏ` Ü{ž‡í·¿”A°s¹Þ¬ÉÉ©æÏjÜBÌÒÖÆÖ¦Žã—…ŸÐ{öÕ2³ý$†f/(J0ÅT<ÒŸf’/å-1)x›'O,„=ì±Ã«¹ .T¾å7‡çCÔ–s`4\Š7Nøµi¯ä`z.G~J÷¶üw¬úüð.BÍ÷Õ•£ѹd*­…gÊ×7ß!UòϽƒnÆõ“ÖIgçðήSUÈaNî¹êÇáSsí¨‚î©ŒÖºjIÁ™´n~=¼"þvW@hÙåÒÖC«>Öf $Nâ)©ì|8‡º•½ôýDÛ,F$šw-Ã[,º-žKXÇdìÑQès¬GÅU—pt¼ÂC‘CáyŒfsÎf‡Åuвn"㨠I1™°–Õ1GM”/_ °¸ÑW@¼ÇW‘Åò{¯¹J1γWþ´ŠÕÇÐAX§g'Ø+adW4»P24‘Á;c8mð¤m[Ò±¨<8Sl¼•/¹jã¬F‚•Ûót’þ[§>-{.fBú•ÇÊŸÛ»Ùé·p’âjµ20±º üïé®»\-βòyrÛŒ¿(-i0Db*tyäd•çh §µv ‡¸M9rïr“³ŽÅïZ˜^MQÍ$+&¹vFâÖs¤ìþÇ™‰ã‹•úåîÈv &ù©:2àe© ˆ“8½~๘iXe2"¶`„½æU¯«¥t½Ìb"‚‚¤ 7[s©}3–#ÅÀWÏ'£Œîëz™i3øçXCZ)‹oF^Wë^¤ÒH:è¨Õ¶N&Ï•ßáô2:Rn8èçÃõy2÷C>UÝ[,b÷›¨>·¶L> ÆñI:W–ª;˜C’­ýà Z£~ùú¿¯±Rï?€J´ ëjÕÝri÷_Gí#ú‡¿œ%‰$mX!o‹Ÿd4;÷ú´åH‰Mä—ªOÕ z üïÜý”ËÉ®bŠìhs =ïûX’Õë#3mTMú $‹­f©Mˆº¿¸ ¾x7ôÎ5)8Ëõg׆þu¸]1ïVå€_z5Î|°¨q¨ü“aÙäÈvþF¨ð÷Úv_RÓæé(´9%a•(½˜ cÖžfç¡N“h(»ì,â2•ÓäÈ8:æ{ÚÞçŽ\æÀ|@‡1ÐïØý]7´ ~ô® ¨µ¾³kõ²sÍëueõÓ6ôe¼õ:<ˆÜÆ{…ás[µfMjg&;mÑÿn;LMî¼Îó‰wüáiÜYd[™1ûÙ'Q1 k<}YÑèþÕY°qyàÌ*øÍ ÔMO4&gZ㿟Rú§ât\!F/ÓKÑ,Ž5Ρçþôz ü¹4ób Êž}; }hFÀM>@M \îÈv/têW¸cêMùwþd áù+F@Õ΃sðILmÈöYÂRé¡"óH;gžó”íDˆ‡Ê»ì™µ¸½49@0Rž‹$¥†`KÙ²À'£o•|{ÃîáIi£¨û~Ž\±ÒúîÆ Ã:»³¹žûøÏ”f&JuŠò ÝRçGß‘Q}}ÂæxüpÃâ/@qÔ™é¥vVc(”…5-ÉÑWV2·÷ÏF¦Fþq‘bî¿Ê I\Ñf¥¯*-»,¤¾Ú“’þ]õk1òˆßÎ_ú×#9ˬ^/s Cu‚¢®'QóPRSë‚…ßô‚s“h¦Žƒ³ôy`î’Í–]Í“!͵¸€dhÈÞ.üÁ­å¡ñÌA[¡«ûxF—d»½m@3ÝÂ,¥\OŽa“æX#è)‘RlA€2×rl&gU)+U¶#hm˜]SùSËOj™°@'6ùÈ>a] ¥Ì-õ wÔþÂsò|«Ë’6zeÉL|òÝ4àáX¶Žðïú|0iÆíMTn¢·è›ÚÇ›h¢,Á)†ôW…ny½ò½Kfij-ªáÞF4C¸.”óßvd8 ”ûŠM™øÊÌ¿]i† pµmgkOøújØXsü¨îmLÎï}ªNV [Œ×ýD†A¢5”Ã⽨+§ ƒ4b¨7)÷ΊÇ@‹ H½òõ€t3 ðÄT» *Œ"ž®’£CÂ1yßÚþDò »­ ™£¸'<ã®"úª†Óš"ß&.OggS@e›O!Q ׇÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ&üRÅçD=hUjÊ¢Hn½Éôw‹Ãku…ÿÙu˜Eb ¨wc¼ÔEDתÍ-„¯v†*Ð`ßý2@1ñŠ Õ«g}Ø%àœª%ÚÝ—8( ÌF]t+´¼»­ƒÿÝ(+ÈAcðÐÓ-¿«´–ËÎ_¥qɶ˜,Î_þÏ×à*¤øMCÝ4¿{nÚ#úxÞÑõønHŠÓñÊ]ü¦WÔFJŸ˜ ¾ ­}zK«äªI2‘ÙÐDZÒ¥(ë¥o´ªeõ¯QB_: š©²Á„ÜE˜| ¯èE4³©n‹ÕpÅpìŒH£ß+v ú}O$4/­mü¶Èj~Þ¥ïQ)N¼©ërÀùÑéÐ#þ_,w“oF%Pc „Ÿ-ö-¾ñRá|Ù§~U‚]å­ú¦¸ì¹MÎSÐjîÓ+‰4”Úmqâq]ÖÊÆßÙlJ7NœßjÓ@ëá8,l^´p·\Š·´p-mk¯€ù£ÍuLJ® DIp…òþÚgÝŠeÇðûYVâ»5$HQ-Ça-¨„ü-ï+4`[rá!ÍÚ;„üÖÙ<á”àçñà”(C•"²QlãÛ7c€Q1¶ðÓû»*G»¿šþz^H¿š vƒe#•ë¨5dCAªÇÝ¢&ãà.…Æ.mÈ…V½½¦´f ón÷÷m¶`–g+TJ‰.·/͸L£êŒ› ^ŒÇÔ>pû¨íɵôÑí¥0Fu»pµ›œ˜ÿ{ßiZòqûÅãP!¬nÇ@u‚6#n¼kÎ+Ž+ù‹§eÅi[_m €™¤òÞÛ¯D¡ðñõ,iüÙ>Õ¿{oÖ¾¸Á/"e¡jŽjšÞ ÉVµu ̆.¤î•Œozï­L„û?NÃáìv[N¾†Ë±„Ü"§}oäky곊Ê3ÏyÈRà»on䬅»Nñü® tÉ¡¹íÔHÈ<ü×B£45(eÄÚKHâ_JðÑN¨ÿWð]XÕÅõYªwCàoÿ¦]n£{v°jTú `€…Yç2aùâdR©‹;Ä b«:löí­W³Íý³ñߨê déJ£–Ÿjå´6h+÷¶F>…ž$3©ñH h‚õa&åÛTHÎWg^Œ_÷!^Cö Ý9¼·¶ŸwF©àsá¡Ì§Ú“PŒ`Ü:ò¨èYRR½Eé7-ßBW‡âlÌP…× Õê_•íi!*4ÓÃfè ö‹ÖÖiVE´'óú=¦*©A#³Å†ï‚Ì;ÓÁø^JÂNèïÏI”é§ŸÒ\æ›ЛåCÿ&>Ís„ÌNÄøFx‘å IüÚ܈@Õç¡@bZ K(´×Ü('=ï:ïÕÐXn›ÛCÌŽ3Ï<‘¹éRÃózŒÝçj_`Ñ<ˆÑ vÕ¾‹]“Ûš·µ‰ÞíkgOµ>cµñ W…œ‡O©ëû·8"M<¬²–ôtCÐOn”ãêÍ·îßXL^¸Â²¬™ =úå‹8ÃÊqWYŠ “Â9êrš…2óû±»ä`9‹+üý‹ßír¬¡ð!?¡‘ÿßûu˜Þâ§lÉÄU5æIÀtCÑO¨ –Ž@ØTC@¬|…±~¥]—ÖÑ^ÅèS ¬ƒÓíWkF•ÐT%>eÍÛ’ò’S#¾¹Ø½Ñܺ¦‘¦9JúV§³µµ ˆsd)¾Ûró08 kˆÖŸ½’Ö»¥³üÚܘ¥pû1_²sè3eÄYÛè­µ¿”í]‚AÈõtúU_Š·™ º¾çJC¨T¨˜U«áïXWU×cɱF!߬hm5@§(OEÃ?ûqjæ%1#E•­@»®Ìdêª[ôÔµcÊÕ".ðACÌŽ™ÆnF#p]H'}xž^á–ú–JSùÄ›…Q{³äί‘ĨË|÷2‰ ¤,`grx”;.Lmï† —´ÐÅ‚¯glyW—®kcEVLÛ…(T*Æf2i¼ßwñ™ â¤ý€ôÂJœØ|Ñ­q°‚…Ý‘F‹[M»“‚ÝÈYŽzF…#-“£Z+Ý X¸1®B2b!OÁ ¥V.Þ_©€‹ ã±W Xq†\ÚPc üÕɃäžODžð1£•ׯçlpÁÉ—™°Æ–·Ð¢ºQÌj·êôjÆ«Œä§€þšäÔy{éîOiK‘E• ¢-±eZ«x'¡±F’â‚ç~ÊÞ>W&òˆ ½®5ÍPÕ³ý*‡x;m×]d÷§«r#„È÷œÂbª:¨Éæ)pï.1¨ð¢l×™?ÍLðù)ÒœV)Kg¸hVr:|¯•ÔýOhµi‘xx¾}œ§iô®ûn7;õYNù^ž>D.X¯c£usY3€‘ž‡î&$ô**¯”ÉIµYð.µõ‡¢ÌU_§”!l–@ñ˜“SûÚÁkP a«Õ&¬0؃9 ûrn2b£Óá4/?^ÏÈŒWQ\™¬4=Úã(ªÂý®ÐŸnÂüÕZŸ'€é3Â*êµ]XíNRÌvòqE¹åCÆ!%öGÿò'ƾ-Þñ‰Jÿ¢y}õà>·Gà"‹úæœ?ãÔÀà"` { ¹'[€?ÜÏÚ›Æ2K` !.ÆÓO'¹ýÑQ½ñ—?Z›hÀ0ƒ ÈŒSVGªðÿ6Çâ|Ô•éª)æÂ^;›>ŒmâõÁÖ¯*èªuõ–Õ<‚G,O^rÍ1~o =,²m@/79!|L§ k“‘ÆWTbVGi䈋¥å³†’ >蜅ylKä;E0j°¡EìHz<–·cÎS £ää@Ò}ÿ±±^åËõEùƒ„&RÓ‰4;N2«œ±SÜœœ£˜è¹J$ʾy´pÿ«ýA7*˜Æ‰+i6Jü×Cp²”«Q=Uóùr¾ŠD~š7¶9e,Ö©ÝèuG;Ò½¤¬°£<畊m ų<• ~ÕF19TùX¬TŽbLùÛ¦ãƒÞÀ×aþ)Ûûy­ZtS?,Ê¿!À&dà¬%–ôáAµº“8;&er©p*™C4€Ñʾž·/ÏQQ§{ãT ûö6DL¼ÙBaÑ’r!OÎË¢ ÖIÕIò5JYˆF*5ÎòaWyÊ5©ç*ƒ«7z˜lðþ&f  ÿ±^ÜóØíÉv‡èR°U¥SfŠä>” %zª[…õ‰.!7ÉxŸLm2Ë>âW?ƒŠ¡ÄB‡÷–€XþyŒªÿ$oR¹°œÁ›²Do@k›M­P#"OggSÀ™›O!àÄkÿ,ÿ.ÿ1ÿ3ÿ0ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ,ÿ+ü×CJæõùD~{fÿDm‰(²öv¾fsEÖç<6 wèÉöè&B¦™á¦$ÉDO…+jTHt“,ùêdo_µ¿/^jådäN~KøOx/þF à qEkfåª,àq‚œ†‡âÕî…4;­ ›i‡ŸI]•²BhÚ¬ùš5ö›Ë&6£ÐB¬T>µÂ¸B:œ/$0Aј|¸7N÷X•W²v§É—\*´så¿ð›®î|’ZÍ ’ƒUÞá9anEYÕ¶le¸› ÊX¹º-™ Y]éû)²÷ q–ø$ŽÈCªÊí ìj¤Psë’¸FXšŠƒc ×OQ²€»Hâ–$‡WnÒÖ3_µ<~¸“V¾Æ’ü×CKF`ԅ¯Æ@ê¥ úÓsrC̳FœI­_ÇÑ|ÛRï: —V@'`ø5ÁÞ¼dQ YºÝä0L´¬ß+A9U¤ß:|[ËÂI@¦Å‹Û~[lNòUvŒŽùò_>á@\ÑÏ%¹ÐjÜ}D¤­›p+Y®F\Ò-ej«ú4ë²H_{m)÷ß2P/,e½/'M›y.Û²™°1Ä4Æ\ž¹ï_RU)aºÑYMa) 4^ÁsÑFŠT=ð0 O‰vª>°2|ÀñÀ–Ò,™³6°Å½¬$DäÇJd‰’é5Ü*·Š•/OÞ“n¹®½C$ ­¥‚$£pN~éCu»:º0-ä'ë‘Ï4ð½!ß7×]äÏ™”T$Tî“G¹ÌgŽä o5{²ü×Cò¯m’šµ•VhÙø&ýJèê"jÖÇ£â$3ó¾µ~É|Ýz2ñS™¼RîÀð `‹\¢‘”Úb•M?må€ÿGa%ƒ6k@K̮Η€Ö Gv‚~û‡V~[Sù\gù¯yèeçðÿyåC‚Ûþ0Uõ‚Øæy)ÛR†¶³[¦É:Yn—Òù ‡ýžž4îIç(§:[Lž·ð pø¥å ê3Èz†PVZËYtN½K¸ b¥›Ð8Þ=àÄ_:0v¤`ªE²åŒC dΖ]ƒØÖÒìÖþx\¬Þþé sôFk¥Ù»Ir·$6—°ÐÃG ŸA?ˆ3&ô ËýÌÌáäjÛÚ¨'vô’9¥п÷¹òãGËâ¯ïE;þÛV|{5+$‚m½¼5²ü×E¢ãɤÈmbŽ#é:#':¾Oö÷ ¨`sAÜÇÀ˽ æÐ꿇«¢ Ù ˜s7kÒÓ… «óU·–šû6Ìr>Çá§ÆÓ¤WGÂàlŠÆúÌYQFº,E#O¼»›ø]ÝéÚà 1ÛNËyä[Mfñ(KDš¬¯q22>É:¡ ¦HoÏT¼Å:‡Ç[ 6Gçká;•îµ><»Ü?ØàÚ{ÄOÌk²¦qüùG¢º`{“áËܵüùõýíÑÌu†}ʬàAä±Ï`Ð]}‘<·3ÌOQô3Ô¥c¯fºõ4pÊXMµÒly«êÄI†ÿèäJþjû Êº%T#¾sG‰þ®?¨{Ý´]Ϻ瀂HŠÎ?8 Ù'um’"*Vñç™ û[¥jüÚÜŠ»kT¤»…œÛ\gÑá¶CVµ÷$£Çö‹’émZbÆ3SÒà0?@¢Qz§E-,Yƒî©©ËÕø}\¢Y>{[3‡Znqð¶­D}Ò6¯yjr$é)Úëåa´¬ËiûÈDh>«‹Ñ(ˆ@%ùÁ7™¹ò ‹B´÷“ûÄ]5¹<Ø+¿ v]®$jQ`àr&ï`gO­â·‘‚Q¥´ ±ü7€'Eµ±~¡Y´`:JçŽT;0E_¦­ü÷(†CPy6n±/ÎP| šB óñ³µMQÉÁ/ãü¡ßJ8‹†Ù_Ï*\ÒÓtí¸fcU££ÃèkPk!=/NÑña«×#Lˆ?*&tˆ2ˆ’ÁÜa“ÃiÁáøñÿÍd²ñº_‚ŸÈ§”_ß·úü×D_¿ãO€+êÿ±ÙÕ- vþp}†Kri§¢š2ÓKÚLhÓèC²{ñCíbì[¹ßz/ØÖLCk|hcĨü®“{ž ]h˜ß½¥¶a4LTfÊ*Ê Êk-¾üo·¹yAçĨ ‚x*é?‹)ÝÆ¡¾ÜF‚ iy ‡äëÎ5#œjFѯ¡îþò{\¼<ÀC¸È&¤´½ŠŠÔËLÓôÌvÛÄ+s$ý…¡…ý4j’%(t‚¬¦%ë\ÃXün½˜)bœýÝ`)$3ÐæºÁÑémá¡2;!˜þ™çŸònÁJ×ê>‰ ³ß/Î`”6ÛŠ'<ÉEC_¡½ßI£CÐ}ïòÿ\ãzT̶^ _ªm½Êl!™tŒCq2èá§™éþc´’ü×D_Ä ë3,¦¿Uúk÷g¦¢9׿¶3K‰3-?F .’8°2ÓøiªÐèœèYE0–@vª M’ œDúÐz ‡Ø„fÐ@:'¼“+¼PAî‚G]¢Þ»öÐa¢GÿE™ÉôLÍ90 cO¸‚º âg’¼ÞtrM¶â å+AÊÖŽsò½{Ô¸ÿZ¸k½l fW>¿ös‚{×(KAèP³èTŽã;`Gä]): r|:ìí­ÐÙ÷päà8…èåèÛÉ$ h„¾6ã[®ÒÏŒ-Ïamüí!(²`gêk4³ÄÈ~è×U‘ÉÅ5b•Ç. ε­bÒª¸;ÍÕï·³§bŠ]Õ­#1¾³^@ÞÉü)Òýÿqà׃µòüðHo(à¿ÊeÕPÛȼŸ£)m:å)¯¹Šr™Ø|É´ˆN—™¨]= D[‹ò9͸Ffð0EoÝ4@”öÒù^µüh©ºÿìĨڈää?È·Ôo‡e]X<‹ïrž–hÐïNÉC÷ð€®¼üB_ “´˜ª!<ô$,€ŒG<“÷Öºº*Zæ§FZôÒF:Iïƒ!JŒx? Y›|˜úv?˜(7íYxM® ÒF[˜KšŸì½©Š‘¯/;hË‚Oóæ.í“›`âü†v¶Ьãý ®|u]žFVNãçŸ|1]{b$dkž~‘ä‚:HU ¯…D_%Šœ³c†%MÜGˆü6XÞ™Ž­†TÍ>1С‘ó‚±¼8/Êf‡NIŸZÿl üð.½pp¥ñÉÒêLìÝÆ™`¿Ö½$`ÈéF .6YhŒÅË+01ÚX¥2AÕ—‚ù!GŠ# è°¢”,²îq[áÌEµæaÊŒï˜SUjAvYüó¿2Éð}®F]S‚*a׫Îg @K˜~™-¢³~áy>2piæÔ!ÇÒâ»q›Z“‘éŠlb¸$ ªÌÏ_o1:c3¶4SÎóŠi—³µä…#ŽŠæ­d$Þ7ÈýÚÆÍjƒO35˜^¹}³‡›Ò|ì’™ŽkÕui7–´û²ÏkÃ`Æ%–ÒDâ«Èœ²H´o†LÅ0ö0wÝ_É:È6þ%‘¬7œôüVö¶¦Ã[·Ý$ÙN./˜Š¾á÷1) Åùû’cÑKì üð.2nžG .Ô¦yó‘6¦D„°•‡‡çxÉ ôÂãùÑðÕÌ Ks)øÅ)Y2ì:“!´‰C•¡ÐÙ„4º×œô-Ü\Ú܊hµ­ëc Üû-ß)ıû¦’Ð)*€O'UŸMÏ: ¨ª›Æ¾|.$*ó|"Â-h‘Ô»¶an¦0|Ædue“­tËe(|ÓäÄyâ! –'ŸÜ€14]Ñ@/²ÎÆWك ᓠP¹,sá¬ö߇…Ñs2ub‰÷ï>ü‚XýÙ?5Ë2õà ôà‘DÒ¾wEÖ¦¥U´•NŸTd¦ÐÈø+ÄݼÀÇøfÊÄ©+=}ßžYº¢I>ÙMNpŸgsUXô?Ú‰÷ïË„X|önOú üìšÍ-]É‘–ɰ5–‚¥&šÏwp‘“{eì%n*¼,eþ?®Â³CxüMÆ6åÊÁRŽÿ$} `•W•źK‡Ô7‰f¢é×4k;‚.ë’åp™êX RïW„éüÖ|mÝLxd=4'Š%= /öÜ¡%žíÍÇ.mÕFþ§Æ¢dÒ²é¾W$c´M_;ãúÏm$3˜!x±4±œgzTÁùP£—ÿ¤ýŒ¬jDHöì–zTüô¿ “¨Ån1Óå0qR•—Ã&Áý¼aÿºÚ©¶Ç*°˜µ: ¦Þ-Á–ÛŸƒ0²ŸvÅ: ã0ï¾2Ý«×iÒ·7­ÇÓcÖV“²áV*U:õÕCjÑPzO¨8…–¿Ø¨69Ã{Ou†Ç;mi%bü×G+Ú—NUÔÎÿžHí8§1ø~¥µ«~‘}¾4ž P"l]ðÈ´‰SZ,\B>¬®2dišÂÐrøX]™8»†È­ºâèpÍ#ºéÔb|wWp =Ûh&š%ºWgêÑì 5Ê 'EF9F1`v”¾/†jY˜¡°8~y»–´Ü™3iYqAäÝ<«INțٱ,"µO¡™àhˆ¦pêsù|÷ “§&ÄRÕ¤ÓݩإØ?kQKrOËÆd,µ7ÉókŽà•®Cõ à-bôUŰB^î§/ù‚¤V_ô­@Õ–'@î y[iˆ”.²–è´¶KµbXÌ Ÿ¨ÇkÏÝh}gœlcÔ œŽ—!iˆzNn™˜Âe—ŒìÉÍ‹€\@º—¶Jü×Fò†ûã݉íßQÁ¿›·³h%³37Oq¶2.³|Lt';5n¬ßÕµ=kVƒ>¤´”/%úÍuç•2>xJfP¼Š=~v[r½¸âîp¾Rºš3¿wop-ƒêhnïtÕ³KÐèlrçùÌW H|Ï–‰°-UŠ*Ëþ÷ï·ž-šìÞí•rx u]9^j}¿ ibÚ/kº$ÚÐÛ“ÅiS‘¥S]þ+8†^Ô“2OÓž8K¤¬oYj– r¢å •öõ’},[¡¹› R gƒ¦–O¢fÎé_ÆžIÈvX@ ѾÚk¾»ºÔ”駇’E¼Àð5S¬.ðd=Xâ½ë}}:Ë ¾÷’“'¹Nñ³fÕ±[bOggS@ΛO!Éîÿ1ÿ0ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ(ÿ4ÿ.ÿ,ÿ-ÿ1ü×Fñü>'ªhÄ{/Wà:nÄÒ`2æ' ¾H4w:U³Žºßc¹Œ²´=8Ä«D§ïÑz®“Šå2:’ÄŸõ4Nœ‡s8òžª $ƒ`hÂÖ¿gŠk³s2»M|Ì<Š|^cC‚X&<”sÐÕ‚Ap1? ‡â¬æò9®rEzãÆË–š¡@ŠÇ¶m ü6${@#ù-zÚÊ'‹ëÜd¾1,màŸ3d€W¯.²L^´:ôNˆ­2f;B@D•AÞM83ÞŒ ZM'"èxçÓqNãò·{W—_Wvu÷E¨ F5ßõþí²£~ðúé=2ˆÎbèüÑ—5|Ýn “›Yà˜€k`kF¬<˜¶²YËUº EܶF#æ•þ^É:V—*âÖå·Èëòü×Ddf 4òëd¸÷{ÕТÊb`&áÁäB³%ËÌJ¤µö3ø× ÈXû0’ø0ØZ˜ûZTíD…ƒÇ´@»·PY{לæ7}µ ¦/2 Ù‡ÏPkÆKše•£ tBT¤åoƒ[**‹ÔǬRe[RJì¥Ä÷ar^%7Uþu%;9L°|j‰?äÚú…-ºD—Æ2 ‹ÉÎbûíÁw“Ë®O1rέ;úûU¤Ìoâ>Ù) z¼û¦ŒµC!HD£DŒ™ˆAIe”ïO“þAüôp‚0ú ìZµv>Cø OCi6lJêçÎæ‹=ÄKµŠ”&ž2³àÜløó Ìbȵ‘$uâõæÚBŒïFd—4‰(‹ðq£ Œó¾Ä ‘–!þÌ釹büÕVq8rjV .+·ýlo¢»‚²‘–¨{«g^W©ÉïЪÄ)o¿J+öž£-äYç;ž‰ 1ðPÐ$ÿ­P‚½¯`w[ã¹9G›°Ûh]a¿)ˆAD¨»+LŽ`?›àÅ© 0·ðo’2z ‘×aX~ó,Vc| 1”XùíV1ßþÃð-\…÷ӥƿ|yÃc~îÃTlŸé¬éñ®“¸?Ó«Ý?­h´ÞÄÂ=¬¡ÎB4ºþƒ™ñ,´²¡©¡:VóG ¸/4±ë¡Ù-žïg–CŒµp÷‹ û™»Þxç¨åhÉ™PÅpJ‘¶Yp µë6½ 3 òå9·ê­yó_-§™ƒjÂ9]§(¤ð°óã"Ž3vTu£ð6í º®fWƒX’ü×CJ³ÄÃ4{†`à`ψ%Ænoøø[TÄ3žP o‰d…w`œ &„ 0Â;Ðn†qLI¶ý7%–µñµ;÷Nrfóû…ɤeð¹‹U÷3³#¤áEÿÿÃ¥Åþã<Åð³ü°Ì"Seßyuh¿Â®K lj·Ÿ—>ÿ܇ý²‡ ƒÞµ®‰›–Ÿ^뵨vn@HíaP†‚/Â~ž¶jRÝ…¿1Ð{Iè 'ÑIßåÞ]©œ¯ ­• ÌFüƒJ`©~WEc‚«˜¡ ð/¯)¢ÞB(m2ò7ÅØÑáÒ7K%&Ç„%ÿxyð;sn•ãV!6€jK,Þš¥‡Þ:É2¥¹’Ážäb©ø‹óañÁàáH—ÔuÛrü×CJ¬ù׃¸¨§³ŽŽeuzj5sLjÚ&ΔL(=Óì´yôžaã"•žCŽd‡M={AáÈjÙaÉ¢œý…a+`~nÙÚ*‹¢`´Ð¿3Áuœên±…ØŽæG3Ãn§eÅt)õć–Ú­ô5ˆœáYwLIr™9²ÈQ~ÂùÚ¨ø¤tÐóavZüw²L]ÜŒ¶HÐ"ã{a%šÌä!¦³P¡×ƒüP©5ær=Q ­ÑOÇÆ×¡÷ä n‹e‘ “ìÈϽgð±f”x$&¨p…l~ô3µJXæþ¼ï©aàë…K)ßN¸Q?ÆkN±ŒÃMh B¾LWAp2¨`JœØÔÝöïdÄí!:ƒ®Û3s|U&Ûü×CJ­|Y ršIþ„O¿Ù¬ øìÑyõ6 eú`û"=Þ{dt×J®ºsbÉ0RÞIºèP%"`ü¸e ,!Ê"´¢‰iêaÔ~ªäâÓavs±½~:øl„>êXI¬éͧ´§³1l4Â[jíÙØ?æðýyçà]ú”²TöÔ¨+Šù…¨›¯ÛGð–».eÜ“æš ñÂ……¹?«œHŸA_ãKŒj,¸±CKsÐð–ÊO‰ϧ•Ú‡Û.Ýiëj%´†ßGPèÁrÔˆà°AÃ+~¯TKª-*Ô÷jízøã-;"hlÇ’2&Œ—#ý"“–¼ÛÙtÔ6XAàMßÉnÃÜ™’z‹¯#I4|yëÈa«„é{ŒŸÁ ^á÷#Î\L¦‹ü×C[vҕн—ê¸ã³ ¿Ç?Kéø_­Ô6zbj­Sõ–‘Üp|Uhî»犧“øPIÁìë¬7‘0W÷ Y" ÓKûn5CTX$ÈäÒ;ê\Kî‰RqgçM“KËÇQ™:Cóc™Û@4%a²Ì z‘L–¼ßâ•\:‚XS @Ô+ú Êу¡ˆ,´ˆ&­}}n;¶á~Ö¹8tºW‡¾> ºü°6·æœ¹ðÑbb‹¹þ/{Å*´S²[=$¶ÍFUßHˆ„çö(ë @ê:tGA“ “ka˜õ0M84G¯ ºìíŠWEQŧ §åÑX´ûRRà&+ªäéÊ”Pµ½}þ;¯Â %ý·•>¸ð~zç¦ÏÇÞÁPÃŽ¾ýîò±)EÄ­åŽòWä¿–Ìœ{Íå¬/\úFhAªý¶JT«»SSKñèImÞŸx~³Ûª +O®WlžRó)Þ€kî–Åy_^Ïùò:x#=J@â¬xö±ýÎVŠP] ãÛèœ2‡Vh+§Ú¦ò™•K?dSÚΤû Uº6ÿÊ.¤`BPY v! ¼™³•ëÌS Úù-,¶Á‚¶)ðç¤ypð_ÆíD 5ÞE=®Å¬Óµ¯ÊX> ¦ó¸øš‘xp>ÞØ…°ã!ÀéüꯟìâZ]NÔ‘wJ%ÛK¥ðÜ)0¦›“>õ ÔdHZT+;’žgªÉ{9¶ jeWÔÛÀg;ÔÞWϳÂð¹K’`¯“.÷#ÁûoŽ©ðw"Öó¼T‡ôsÛæ— ¿î<è¸V²làC³;ï²ÝæWó%ëbR yc…”GMÿ .G´5ÅÕmFЩ¸Ym;ÍÊqÍßÊêZ·…uz †„!XÄXÂG d-†và·&› †%R¸f{È9S"\­ÖÏà,kfˆ•Cl5ðÆsT˜»1•ñ„•Èô¤U{zTZÂ"Ý—¨¶¾õ«ó¨=µDqç+ll‚לÛ5óÚDñúný…Yu9ëdøîp× ˜â Ì ¨óßTé@„wÕ³%ª üòHb ú“58ØŠzuæÂ›^G"”Râ–x©m—~¥Ä9¶é*Ó(ÒÄÎÅýí´_Q ½á i†ùí&ÌãiŸ†œ:x|êFî?ÛÄœ ÕÊmk§•œÅY ×e{ax$I¦®áál Þð´(rËþή¯Î4 8ñ&böüNœÄ9tìÔ4AY]òó0zg¨Žæ’ ×>ib’ÂÐ1U¾Ÿª]€éTÆ’1»øÅ=õ’Rv)¥Kø$MԘԵǰì*®Q±GäEQ +O~ kN×}Çeú± õT‡éÔò¨ÎZGµVßb4çRK9JmãÙüÎZXôaºQîÉ¢·r3Q†—©A.çM9üî$Ö²+Õ›¹¼· ()wþ]ãÎNr›ûrZ üì™?[OuÉH†[y´SmïëAËÄOl]“&Ñ)þƒŽC6Úc`~Ëá÷~=HgÁ1LH‹ ØxÐŽ6Ž´ÊÙUÜûï]'{ü.”ul·+.v_ 'aϺ?ë<¾O}Œš†?Gü\ù Ÿ ò2*AúˆÑXB fwÛ¼a¯ð/˜}Ï1+’90?öØïºåôo.Ö€%ï8õÊ ÞnP¼ù*Pãi½ÂGxÓÇ¡YN8ó2 7‡Á‹Nš0«É¯0sµCÎ #|w›;k`qâá¯#PÀH—#S„‰ÙÌóÔ]¡1ÞJ»PÁ3û¹‘—ì>™–T9ñdÃi½,úô¾ü-¦wwÉRLÑñ«§áD»#;Á’aåÈÇô²nê!j#QTtÏÊüïâO~Fwüø À ¢®žY}8±xr¾]xèx}ÞùÓKç&[(¡SµáàKȘⷺi啃jÀ-Î ÇøÛp³Ü€Ïޏhè¶®~ §µlèå"c6¬xq®×Eù3/'ã‚jn¦%ªu=é¤Y–í˜×ƒ¡pÞ(•xOv¶–S/àäMƒL”Ù—qøX&„Øø\ÏúÑ{[:;“IññWf4°•Ç7~c«C”¸®¥ª#ãG?4…véfpaŠÂP3+ÿÚ‰UK"w<¤¢B t'ÅFé{ê­é,;fµ7CiÞ?Ҳ⟓0³Kjð; ¬=åÅ{œŽþÀ#d±³¤Àl É-Ðí' ý9ôâäÁIû…¼u!Ì^ýx]Ä9‚ë¨lÒ}#öÚ(»¾©yj OggSÀ›O!%ÕPŒÿ.ÿ.ÿ,ÿ,ÿ*ÿ,ÿ ÿFÿ.ÿ%ÿ-ÿ*ÿ(ÿ$üí>OUrX¡y`pZ“=³™6²´f§W»Çc¹…ô#QI×ínËì›ðsƒÜ—Ãc³dË,9gO°ÇëÍ¡a#e+ȧyŠ…c}Ö›w>"›Ö— |xRy[û0t „À€±HíŠ,ª:ûo¶¥ Xž# µh¯ê€Õ±&w«÷æ <=™6zb„/õ‚© L8Uº¿²áÅo|%Œ&ÿpH},.)’>}ŸoUŸÌ8ú¿ÞL÷@Þ|ðeG—ûñ‡šaÉç”—÷“£Þµ)âè$ÒÚuhZœtGNËœ ™j­ó¬ØoÇí)O‹jÚºÛ8Âa–‰†ÓÒ<¢-Ë™p|¡ÞÍÃ-'E±èa°gºÔ° ÏSÈKÖÿíøA üì‘=Ã×¹x†ÔìBxk/è0èbåóéÛ’h|Lö„»U;{ÈÚ@üŠuQÑ/[{Ud¿¼`šö:,–¸të¿5†6y´puá/ ½˜Ÿ (L®óÉf:,É~ðÏÒÖFìŠÿë>›Kô¡$iΠMæÚ·Ç8­”ˆ‰÷Sȳdõú8‹A2]ª‰UyÝV㬳d}ªÖŒÉ¼é¶óîÁBÈ¦ÍÆý’Ö°1¼buò+¥¦4X7{T[Ù»ú@ÇȦÜÝq ‘ó—2O£»1è‘ ¿õìÛ ÎvB‘Ò×Þ³sÕ³xf£Jðƒ!HNÂÄžõÇÍ­m çb¹ŒËñ'"_`[—E£ˆU7º®QŒX|uç5ÞpIÿNO ´Ÿç€å üìœEÀ5F†µnC8‚gBÅC@·‰s¢¶PsâÈÎåÓçl0Óx+^=ýÍJ’æU† (NnT·'ÑyïÔØ\JfŦ.Å#¡ §˜:P!“³c°Ë#jðÈ9ïz”à “Õ¤ÝÅt p%/ð«Ðz ”3„˜MÛEÞHâºÿ-Ã?Zj^ºá3ÂË”-¢{ìEûWÄŽæNSñŠòß³aü·–ÀÇ}wÑ’rÔÍ^† ]¶X·>9Óí6?æå7› qΨ ¥×¯°A”r¡žþm]©í¨šìN9Kš¾ª~hdKxÁ› öd;6oÅ3¦h kÚéW§êÉÐ\+/Ÿ© ¶cü¥Çþ˜K86âF gkI›Oÿs°KÁŽ+µgˆ üð1¸!úÚ‰Óú.ß"–¦Á™ÿ%ca¶°`/;ƒåÐçО˖a•£yñÍGB’wö`EƒåooG¦ô9¤«r¬ |ãkm¬þ‰Q*yo&`÷÷I®˜Ïv6ƒ–Œ8‚ã.ð_{ÑrïAP?Žù«6µ×3HÏeÓä£ðVC¿£&Ó³ .feªÜ[ˆ1•7&„ÌAaâ**ä[qw§/ Jù^y¶¡±ò4ÏßšÌìªhï—·Kˆ)=ŸˆŒKÍ^ªòËÂüB~“$¿-ýX×Gæ6˜¢Iúuëg¶î‘jNÚ|ã3¿·µ3ÄAeDZùXSMé4²š¯MF?Eº`“5Ñ]$% ·ÈÂúÏ#ÐÏÞN›©išÖÙA1@&j­pZ üð.”ù8¹p Êv\¨Ëթüž^aºÄØ5ì¢ÇLû˜s¾OÜÉ>a8xn„RNùüvfË‚†OâÎ¥ÂQË!ÍÖtglѧe þBlã” Ï©yš¹ 5plêàå˜ç•¬J£i`D`'e'!=Ó…Uê®g 71(°Ž}JÍ‚ýñJ>, ~TmËi™›àõ.új¡rHizcŽî'3¤÷G¥âÍv2“ Ì[Dšë ^£Ì¬;ÚèÝ?³5sšA ‚4Œ¦ç9µg ̇™ª#6T¹÷/ìö"É2¡Îy“ÓðZ`ƒ+]<#m$\Ñ_ÌU!cE}ê…?¢Û2.ãþ‡¤Ûÿ|Eaƒ@–VÆjBZ}!þ>ËùŠ üí$í&ámÛ ÿÆ¡®™²¬/ÓÂ}†G·5Ô“Œ”û¨û¯¾Øƒ·%…ˆÙmÁ;œ>Öî `rˆƒ Mž¶/ÝjÑcâÀaÞ=#×Wµ…®ó@BÙ/€”­«æš/̯ä}´ÇEèríu{Ð4†MªÉd0ªè“KRˆ˜G7õK¿†ú%@±•DÒC¥²SóÑwhs• ÕÃÓ=íÒ7…1ÞdÔ¾[ímöž«àÕÜO¼D3ކ5â~Â]{N_v˜H™BéÄœ+GÕÎîÜ¿Fd{' ÊŸZ4ï²›Ã}˜«Eì¹´yøI ’o ʧɹëqe2ˆ°¥é( ¬Ðµ\CåVðÌ1y®CÝõI|«ë4ÉVÒbÎβžrŠÚ°wY±ÿhÎIãÁD+34¿š üìL¯¬½(uÈQÇ%¼«R6ïЂu´½6s³^˜¯Éì˜MŘjÉdšSÑKÿsçÀ1Þá6¼kd™kÖTx Ü×khÅÛ¬–„ÒÉs§jC]64Æv=ƒO¸ìÍpC¥ùή8lo·Öö/6&´.æ õ¡Œû[/OôÑ¿’§jžQL+3ÐÅÌŽ®ßLy×À/EŽ‹Ó l“Í#ý,RŒ[ýO…QÉ0©ö…² hÇ)¹T½H¼Xæ®î„}»ÏðÔt¾WÞS\Iõb!W–;"¡½êƒDÏ=±ÑÛøp5Ó›Oøâ]"eîyò^~óq¤¾ÅŒv'=,'~}›µÝ®˜[%êR*;y­¹ùÐ y ¨M* üÊ>Nnõî°Yµ“-:kÓ炽 ­ ðåÕ½è˼\ÖÉ4$_ê¢Ô(Hx˜0´äG*Š"ïËѾºrͶò!vl ª¡Ñ{XkÂñjrnÛUCvþñÞ0aêƒ ü,žÙ‚®›dô‘”GvieÛ«†äØkžQf4 ¸ ¸#µ¶¢ýE Ô}îXuæ3*g|@'w‚`Ë[‚Â~2׬¢7šõËš8¥0LB‡Á1L¾‹À2c5Ul2×\©Üà"Õê[€„š^kC¼ˆ•š’ˆ«umwÀÑcK“K^Iñ¢§Ýû¼AlSèjƒ¨fàùÊ–á½…·¼Ëá?Cxò9¤µA"ÖéÎÈ“‚å¬r¹·ÕÛ;7Myð%i GÝZ¦Jâ¸Ø÷u=T÷§Gmüí,¦™î>Ô°t„†tsYñ1‡c@5𜗓O‘®1ÿÜÜKñlcM7ãòþ#~:â%³¦»Ưø{*÷Ó1ßzžïñk1ðìRk§ª”KzÛ¤fK(6¼ÎœðY؇ŽÆZ^Í”âç}uÇMSN\cÓÁ tMgýþoóž‹«ËèÒ¾¥‘r³À¼6Ù!DN±doY‡êÖŸÁIœ¤Æ,ƒhm ˆâ}¶ý.£“MËÚ °ðÂ:›W¼ÄW0ºæ—1Ýè¬U5ßCï š‹—}¸Ì¾µuFwb¬r±|M"âÉ`­â•Ò4·“¦Ïs’ˆ_:>/$i c©çÖ´g†ù--8ÊÓR<1«mÿ·yä”mZ I™—Š üð.!yh¿ÚÍ›³œtã“YØ>òþ»»Aå«o}ùýàÞÈúáS±ƒ®T„ÆæŒ]Ù±°K¾ÐìY(2Þq•‚ðÉnZÏ”Ž ‡4Ç,E׺ÚHp´Òa¦Vpå3VAyÏA½ŽÐòÆPé4c(*b·=ÍQ’[8d[þ¬Ú=U[ùL–¥ô•ë—+íOî.ÅFn4kû'È0RöÿjŒ[-u¿’Ÿº̬møµ{|&U\Š µ_“l1w“ŠÝ09¶›ÕiÀbý¯áîœI€¾øÓc$BE³Èìv0"DtÅrÊ¢¡áí…Æ«wÿõôz üìW°$ìÛÒ¿¼œSiÌVï;Ö» Èib|T¢¨ä#¹×o>ÜÁ5u/ÍŸX¹F i(ÿCåÍ6¤HÑ(èò`Ý”íñx /¬ŸWÁ5ç&êík`¡µ d>>½Þ|±nt1 jP±!Ê‚Cµù«É W1²C·ŠWÈ2×'£é—÷ÍP@|ÏV(® t ¾K~4süqPç5vÖ6ßI±öilŸåwâØ]1q‹i=úÊíYk]6t»ùõçÜV‚, ¹±Ívñ@–ç/TyAº×Œÿv8²ðÎÆ†À'‘X×XÑòšïNÚ„J:C„/ØrŸ½4B˜D/tSxe5½nˆô²Üâ “ìÀßílóàÿëºÚ üí%)“ÿ|KØ’zr]–¦ïñ¢Ý-µkeÔ‹mè"3~s€ÿê,rMœd‹oVÌGé=½ðƶ¹“Š(“fìÌÄw”Ó"¹…Êá ãKKžš+ï0`«hjñÿ‡óö½¾q ë;î£ê–çÄäN½k#QtÂ'Ï3qšÄ†ð–trøÄÈôÎy=´óyn^Ì–w]mKL¼qÞþÈËÖ}÷Hå ø®ÙP3¹<ìĈ~aiÊóžÕmþ$íìÿûÇ#¡r `ÐųØì³ñ5õÖ¯Œ±ÈÕw©‘:üC-„JòÚâAü°†µõçßÜìÙ¤²™'i`aqÓ`{uâ) |«Y>5–ŠÞc#âã=ÓÏž°» üìWÎJ=$9D`KÅ·¦·ÝR¾u¾­ÎRÏK(Õ83 Hñ'¾YG&ä |. ¶czðF>ˆë·ÎlŒ¡Ôf¿MLd”KÛ!\x ¡¡ÚÞ ÁVN1‡åý$qRa÷~á£ÙOzÝd‹áàmO‡4´ŸCXX‹¤…š×N6p’êÛÎÀ²Í µo?;oTÁid!uÇò‡¥_¦iS×"úV]Q?à<êu%yèô"÷“`5š¶Í¬¥ÎL7ƒ¢'ñvAÊà•M?"Íõ'8˜–<çJomEuD‚½[<-‰§Žq@ØÇÓþâù2hQeJÊ)aà%]3˜CæWéñuvÇ/fJ±2ù“ã`pèˆ¾Ü OggS@7›O!þ^hÇÿ%ÿ.ÿ,ÿ*ÿ'ÿbÿ.ÿ ÿ'ÿ)ÿ'ÿ'ÿ*ÿ,üìWìÐj¯!,ä&êŸ ¸ÒëÑU”áî" ›ïE䳜ñí£< h^I~/h"]† FoÕ_`DºTÿ”ÝwNâ>a®YHуцŸ[b…>…ׄý¿Ëè°äí˜Çv}8ƒÜ§ŒÙ¯Üü—R€ÿ“S>@¦ã‡§ð o&±óòäè¦:? rw D”X®¶oËþ†1`çÜB«øIÌÇ¡˜d!*'ðJíJ‡edå z†à{‡84s…»W&ü"íþHyôž1) •¡(Ë¥árøÿá_9ëçã>mßKå9t‰L‚.>qè|8nÅë'¸Ïâ®[ÇÞ lÔѯß+k“þøD ˜x¿äYæFa Ù¥Åfôš·3~ºÊüðREþM~ü ’Ü7g@ÿKûÖ³L隺ñÖAG´Ã¼ ´p[ŸGüÚžYâ9G3Ý ÁžPÆs]ä¿“9‰ao!C‰<3tºËH¿ÝRA×à7­î1}xH+~yÅÁþ[LÂíh7’“×Ó|õŽÙ ¬•?êIð¯Ã6Lqe­Îæj¬ñݾQq_8õwmÂÁQªR¸Ï±§KŒj¥ 7´ˆü—mGza^*Vê5ç¨tmóA°í0ò½¼AtÄŠWIòÌ×@c©ÁPÝ/ò}5YŠâK²¯žˆ'^÷á³É{‘G&Š$GJ[öî+ ž{Xu³£›KÀÁ€ÁA1¬L-8:ûååŽfÕ–Ï€ufïwÞ-Ñ'edã³FŠ—w üìW´~ÚläU®ÐhÞÒo³ðïw‘Éì"¢uø—"ÚÐÁ?6¢1 £Šß\øØ—»vŠ87õ+¡ Ø'XqCdshFf1%=[´õ[jnè‘Oo)ŸÝ¦Å˜µu½ÑÔÔù5E¹9£}ÛG"@’ÎïYy´}DÇZ€=##¸Ûpk¥“¥[y(±’Æÿ@ÒuƒãF³ ª†âc·4Êdܨ,-x¸¥8ÊñYYqI‘uW?¤R†XS?ìuß•BÈÂ~Y R´]^BPRàÀ&š÷¼cJ˜={™%-8íXjK‚m+XÁ|‰#/ FÍSTO¨ŸKÏxâñ ’½"õFÇ *áý fJ_VØ'§uó ¿¾õ üìXBßáu°÷Oðô~l ÃÇrƒ³i:iëm,ÚcØäúl—ö­0ã',€'ÓCu®!1&‰è ȦärË+lPÍÛêÑPhýl£ÝÉ`•шÅ#I,FypwÂo(š õcè‹Ðûê @z¾úÊ üð-‚ƒœâG' {DVÏ)–ñ_ïH:¡% Çó`£~õ@ÑþbηHXJZµ}fo¾"UÙá¨@/¬–Ù¢íVÆ/md£¼ V)ÙŽàÎðëzuäå$Ÿ”îåìê0z¯Ø-ø3D†{/f¥ÐB±î%GqVnT}²A[¼³ÈÛøÑö—½hyó᧠ɴܳþYµÎîzÏàŒyüu^e.©Ç‹^µjpG=•’“¨Òt±nט;Nlè|è 6)lïæ NâÊl—Ý]cø\3ò²{ó™?4õg’Õd16½úÐóÖ‹óú•Dsyw\Œ©Gº+A£Þ6ÚïÛÖ—ÿ=i¡é²öG¶¨eÃãdTúç»YZujR@8z´•¹©¾FŠ üÅ?\[ A &DRr1ȶ…%·Ý´BjïCjï´ÁÁ„¹ÂÒÚ JÇg²±‘êý8«£1ezJ?mÅ›x*À£Ã^—.½·^<¦^gÿ·2Ü_ßlU˜uçò„ªÞÒ±‹P›÷,ùZ˜‹]1KGA7s‘ ÕWàŽCZ嬟C÷BxèY Ôìˆ!xh»eÔ?is,ß³+C/\¶BÉŒôÞœ¢^züÿ²ÂÒ/]Ù²G_ºRI³"ÙÿÔZÎåÄq…ê4ñž_4Æ‚€ZM.–hš½ÄúêšÎ™ÿ[»#óë•¿WùŠ|Žˆ0ºÉÕvPÚ?\¦—ÿ¹µY] ÖÄFí™K!)Ùµ6Pf¯ –pÏb3ô ¼øg€^Lö{ßU9Ndf Æ‹L™#†2.FŽ»oáÖ’¹H>¸ó_¾vÉMôc+ Ë™Ôn$?¡×V¶=üì›i°ÕUCÀäçE9rpÛÛiʸ…K{úªW#u¬lÀKÖ}3«è‰Ð6é•ΧÓDÄå6ÿŸ_š÷(b¿~LÎp¤¨ÆMÕ«æ´ä–«:Ø[/´l€Žy÷QíjI·›aH ¿Šý‘ÍÒ’…LÀ€Óž£±üÿ²lâd‡rÚ ?õžÇÖ&7Yírd´rsiZÁ¸P$;âð®VšLqO¦Ÿð®):êŠÛ{èƒTJ*þ:RUY^jüM^–ž[h Û‘f逳ÌÎÙ@Dý=o½Åx85!“§ö>‹ñÁ±9â7!~qƵá€raÞúvzý½cbùêDkE9󰀊íœk ¯„–ËÒåpEÔãù $ü’~ûFŒM¶8àfø üìQ]8w`0“^=*­‰3ìÏЪÐßpA0èI%üJ0ëtý5bäF_åUÖr­£[m¥ä[_:”q ¤n³¾Û%”™ZSt'›Ä¤“H³“èĤéµ5ÆB¾m]â5+D¤}·=„¥kñhÝYø!…Ñ[Tt†Ò‡VöM¡óEÑåóùCÛE%mç‹+ŽjÃ2×wPJ_œ†W+râÓðøÅu¢hEGôF-Ù Œ0¥­s|ÿ‘ñ!I§"Ð@ãÍÎwš=JÆv¥Bë¶s×gYÒêeÑzýÞbVÆ/»ž ms$D/zË…ŒŒÐçKÛVÏîèzþZl,8ëPxÔ¤ºÛ´dºKEsIdý( üð-D%w{ ÙÃ.ôú좔r[.Šé-oÖÛ£â9‰±|{Ê@‹É±M¶ü~g( &ŠCa^îÿyœ‹P{ó«wùiq•H ²úå_ÝŒQ2uäòJ'(„À‰Iócª;¦Â˜ÌðÎ^×;Ê §²‘ÜëµÈî¬.&úò–$³©4öŸÚˆcúe¾zx¬éUJ?µcü)¯±b«bÄâppàmK÷Úõ½`0¥ÁCu„–ª•H°*?®‘ n oýAÒhô¬:¹Ãç#83üþ;e- ’9˘¢$ÜKRP¥„ù•ŸØÐÁÝ Á̸“%’ìòê:l/ãÛµ:rÜHŧåÏ7™5T!@wD0j.Ç¿…}jí ‰ŠÆ¢ÊÙiNeþÒ+lùäfùWgÿÐr°N‡–u¥Û&Þ ð eoÕ‚'(ÎýíT¢}jVÜöãIxÆÝ€p"ë¶’ÜŽiZ7š±íy 07„‰kµk>£KÛÔ8ïd GwèY;×Ëwl¶µc§j¼ŠdEU׆ok˜ëÅ5ËIçËM,Y9©ÌûT5¾š‡ýdvØ üìši«hŒzh" Ö•Å ¹€LÓSbóib )±°Ýi&JCI+”b¶¨ø™2îÆ)ÙƒÜËŒ¥Dýñ Ö®àÊNPÙ3Rõø·RÇvB-æ‡9=-‚rÒ§âVâøºæRÿ–½Fµ·Bh<%¤µ†¢•ýË,ÌD†“‘kP`‘xÿÒŸ+éöÜQi“Gájäwšì¾ûÌ]ÔLPÌ€'–M~ ÑÇåú|Б٠{­¼tŠölËùmWC{Ž€•qfK:t¼Æ7¥ááˆ/ÙÁÝEÚ‚%pÅD¯áîCÖ‹¾Òw1V þ•ל‚0p¯Ýá< Ñ—jKƘSii€Ê`€b홦×`4@™l.J&ë\z)y«hu» 5K÷ßüñ”eêt~û¸ÿ;›  ìÙyCɇ¥)i@@â™_ Ð~PT™\uííVñÏã6{ˆÉæ.;êŽè?¨½MEH(ˆ· 5åç®4׳…¦(ÊpÚRì} UüóBJœf<òpÇØbR¯‘ûlçu/Ù Åî0Mj7ŸW†W¬n—]Œ ùI&7Š?<¢žÄ2|’_‡vºþTGJmÊ,üOZÚ8¢d½%מÅå”réŽr˯ٔÌpYLxv¯>Ø!˜Í ‹ËÊ-ñ´ølX =R) vîÜ·c¤Lk×bþZ×Y²™çÁö&¡à^$º¹J«jaÉÇå;æse1UÄwWŽ2" y'RQ¥Q/5ç¦÷ÚÂ½ÄØ‘aÎ.ôüð.3 ŠçÃÌû„ôTwèÎm×ç `e,)ØÅȸ ÔÂñ}\Aê˜4ãÂNoŸ²™Ï°|ÒPOú¾‘7$/„ÇÐ6çu~ÌÅ­ÑÚ Žû¸,µKÄïmøÐë¤v6¶SEȺ6|Î~¶`üô•´"NC~ (|®Nž"MQkáóœ&h+G´§IêúUœçT-h ÄáªU¾VéVŽLéЭH_ulG]£­öö‘œQTQØ Ð¬,qDo‚îþ«2‘žEk%Ã\½`^Iˆm5–” ¯ Ô_ùKBœØ¿ûî à/EÖßËþ–b™SÇ£©MAQ!ÄÞñ©ëÆŸ).ñ{ låÀËaH¯^;i5)Ó„ÜVÁ“â’jüì˜uðç˜O¸E.{·Ý q\Û¿¸)êØ°4CÛ"I?ÒÿÁôá]BĦ&Ylˆ›ÏÔ›fF™Þg‡éL±ÕçŸfº “Í-U/ÅHä.éç®;þ4r Ñ†ñÖ,—oïzŸÒg‘=ŽÅ0Ã×rRÁʻۀ.êWÝÆ¹¨2ó¹Á;š Óª iýãúÊ"éÑÚcJ™ˆ:®“ÕkŽȨŠ:¯ÝJÆ/Xó9‹xÀ}B>Ãn0Ê~ÑÇ0—óìÖ¦¤B ŷǧýH$6·MaíÏ`³g±UxÖ ˜gŽašãÁ3Çb¢a Ž}î—ªÕLwÁ^‡3$ÎÁ;È?Îyý•quq¯•LíÒ‰Zôƒ&ˆ),)TdBˆ4ƒ]~H¦OggS€o›O!•ÚUbÿ(ÿbÿÿEÿ ÿÿÿÿÿÿÿ ÿÿÿü왎º)8ü cðÓz¤ r1,¹|-”7&<·> gq@[YõnV\á|qFJHçL¡”…KYoBƒÜ5Лp~!úþ–¸¨•›±t[•nG&°á8A@êÈ›§WPòæ-šÔͼJ› Œ¯ Âÿù‰Ý©`ŽÐ4VË.ãÑȰñŒ•A$¯:"L¹Œo<Å”·B6Õv1Ëm ºÒâ,ß—à­—AÈ´»Qy³l9pÎÐN0¿ö~p¡Ñ-R’=JKîÐÜDúÒy©ìòÙTÍÜ{,/q Géz?uq@ätªdkš“™ Æ‡;¬—ž…Ïo^i¼g0°,xdËQ¯”–AàƒWßXõ™J®,íØæJEüÖÛa®o‘̈—’üÀ™Ñç¸î «‘±t+ÎÔýÎâš$ÀŸÓw6+yvýÕV]@8¾66ŠY¶ÌwrR™æoÞÆÀ`F:ÃKyÛ¡&ßëíÏË7 «Ç"0JD\,øG+R»hü“€Û#»T:]Ü·~u;š%êˆåØT<ë#£]†ºé½ ¬? 0 Lìg6ʽŸÊAI¨`öÊ6ú<>YÉ)šSTk¿ç¼W±(4õ5”Á¤T“‡—™6'F€ˆ_ÙdÜÊŸî¶ûy¬m?¦ƒÎj(-ÚlëGQÚ(톎yÊŒd/É)J,RuðV¿’Zyçš0ïP¨m]rCBï}Ëù~]CT0¬ÓE<¡:Ó–ü”®??µ'èraŠIÈ\g=ƒË4]gbÑphŽŠ|è'i¹g ‹¹°sfÓI2d¯9ï #ÆÆLéåvm©'ñggž­ûæB4üÚØæ~¨_ÁãRL®™qáâqÉ;k:Od¤гZĬ™‡Êr÷,Í9•6wñ¶/Hg } k6‚ë~!Âó5¬åA"šÂ#®q—QEIÜdÎýWH5—çK¶"T;JUlÕR8{—è}±ÊŠ€OWƒÆNü°'° ™¯+°„Ñ1~ñ¸ƒµ–¶:fƒØnp'ów˜dÊÇQµ|@w!·“!2ª…XP&Ží¾(YAZæ“i¬ŽÜÄ=YÃñH#‚ÙòQ3ô%º6Sb(•Zì– q‹_ÿ<é]ÃÎýà†¬ðàÞ]à°)h2œS¶íÙ4Ô–â߯²‹÷q¬ü×G, ù FWÿ ³T©[lêȨLî€ç* ã©ÒØ]zòùù]±'ø/„æv²¬-¤´Ä ×úó⿹®N%”è© vEÞr{º,Sþzµ^±­ƒ0¹«Cõçm5‚ôûò4_Nl;T’¿%2`V'æ‹3¢T+j˜ø6§}b å(q²4Sã)YBjų‰ÿžäVêÛÌ•ÏÔg.ŸYêN•–ù ›ÑÁè™r„ÎŒ'½ÿ»ÎòT™%"C*ÌrIó†üÕ€¬­W*ÕÇtù¨μpýŽõÜä®ÍÎí83¶T•òa+ûõ0ü+¾š•ÀêV·£CúÕ@WÇI{þCœW\(¦¼“Ôª;V=÷¢ÈÀ+u·‡Šmê ô,…u÷¸OŸž1Y—S(µµOý1‚–¢J¢ƒß‰?I%«üE~cá[bÑ·{þzGÛG¥fÄåß›Ä~ܶ…&’Cô7³FÎCò†?oF¿ša·(¦Tû°äÒ1˜—ù:'ÀHFí ¾ul~k|Bd<¶G71§ œu÷s]ºI¾W ÒFN>ŸŽ/¡§M€²ÒMÏÎ>•²}R­æA]“V¶’Y-ÜÕöf˜Û†üQýMñ€=Å·á—'@'ÆÀTÐnô¸ãÞçb»}+Ó³‡Xöé‹MâðfGþÃö¢¹2ÀCú½lÛV »Àæ>ô…®»•ûnfš ¿õ•­ ðX‚]¢C Å8é3À( ‰ŒÙÕf)ÎÁ9rG5ìX ùeã_†%bi£à\ Ô6ÉtkŠärq€£Ö8S%-7ï¹æû¾;:[­«2NJ°s=±ê8±ž†(ñš€¼`ÿBüÑ®âaxÔiªSx¬œ¾I˜ÒjÏRÐû1®9^q¾Ë æê` v£ 6ü¶åQ’k¨J4§»0¨Ö(Î2Óx|œaÜO†™±õ…^ ð-h 8v[ù_Àüdkêøú¸NÌuŠÎ¤ò¬~Yx:}âS<À)òå´½SfíS}îØÌöC½P¡VÓßÇP£F2”Úü\bâ®5h½.\ÇÇ!¾¹ _0aƒ¢2Tn–•i|„Ž×¥¶–üˆkÊ^ȷ̾M¯Qr í@ß‹^¨¥—Îýf06€ìëãÓÿÚ/iè Yì÷pm<¦:±\ãb£ü@ 9™r`p£ÇM¸7º&¦¬36ýØ¿gfhï•ètúø:ø"Þ­¼&dÿ¿ÕŸtdëí4"ØNѺ‹|LÊÜ•))ˆf?yn­ÝdöááÁÛå±Pàx¹HÍdñϹƒÁõ¹ò%)#üÕ`1:üUèlQ*ŠÑ>ɼJ‹Z­Ä)£•HHLÌ ø4\ºg†8Y•v©ÖjM•ÆrL¥¶½+}pM±½†Šä™¤s¯±y‘)1”sŸg»E©Å™y•P¿`"`Óiñ|k§´”—Qç÷él}²FåOÚhÄ’IÜ&ñFê ¯za Æ ŽÞ};EK{O ‚6*åÐmül¼$v¦2Écâô !Î3¥Õ‘Ši$“‹©, ÿQÌû@Rµ°rÕ«*â3%l$Û€:pËþ·4ôr4`nC ?PÔ/ÒdÍ^ÑAÀÉûÔ8ïî¸båÂ÷è Ê«v·{±î÷éùAi¬ ÐÅŸÐ,Êíð~W‘B=ŸnºjÉiàôT­Þ­ey±,‡Ü`ðžKŒ’°ümÔºIÆüdgFã$&¾¿=¢–Ÿ·ýë/e¸¾&*OS·=PîÕÃ<µJ·8nrÄ”$´ó}(w¬¹ñΤ­QMB£MOªñá׋—‘ óV£Äu‚ »êë GÄs^ÝE?éÖŽÌQṵšñÅžç­»±ÝÀÙ©*xdTcyÌ´é(SÞjS2j U$ò5U²m9K‰@ú16ó+×ñ,¶b2>¥Kå×”ÃåF/¥¦Ç£\ÍâýŬÒo -î¬]K‘½]º7û|¾2¨‡Ùˆ:%‹[øü³!?3ƒ´ ÂÈÀ¨>8°¤ð |ºScqWÆFXQOl`רä‰A_·¸žÉ›XÌ›Fò*ƒ§ä×µ˜ó-ÝN)ºß&ùU!+wüb‚ŸŠõQ`/e£aSiØÃÁá>• åršõÃ*ªât ¼8ØQ¤´“XNL‡¢õ¢È2xÖj¦@Æ(ÿó uS—‰¸Y³}“ö:\0Ãvò~J†tsžm :ðEýEsü*ÎS “§P÷ÅóËLj$ñáýŠÐÄ€‚ ŽøŒû‡nŠëfÅDX†®/~6½rYXÿ{pY”COäÙ9fÞršdé¯v«þ»ÉNÏ>›Äù”ñœñâ¹-ú‘°„D;‚nÏ»®ê=:\mªâŽ‹¨ž2ï*VÖíÉ[LbP´ý˜äŸ¸iúb·jĤOÁ®Ï”ð«XÛÁ˜Ù‚ÑÓìÖÎä€Ù®ÉÝ=Ý”ÎÄwµ56|ï­üÕm¼#ˆÅ­*ÄeÄŒ?Å0ŠRxyïÞ*Þ˜ ïÀ$„>×µÏ22Ã1°è½'†h¬è$À¨ÇYµjPEË7Óæžæ:FIßsªG[RÏ\ Æ?aÿú{Ãl°Ò‡Ç±‚©:Áeïþ6[!,õaû¡~./³é¨Ú·=׿ÐWNõ§ý=›(êë¿f®1¯F‹®–i"Pß))Uâ@ìÃdã¦ë:8&èØ¨á¦{a5>vgnµ6D!BX¨âlñà.ÊÑ?ÚÞ;|v­ w'a3LÔv8Œ°l£=¼ÖÍ!h=p@¿KÄz&ÜL­‡JD‰B'ÒhCÈB*ô‰CõâÖ8ßžl_è9·-’ þ|>sr³šu   "=žŒ†üÕZ9HõÜ›½Ü'WQ 9‚Þ½ «Àå:38%”Ÿ1oŽ|ÝJùÑ”îd‚Ò"ޏ<šda¾_Ùe‹~;xQ÷JÇr(øéq½ãõ7§šÅÍIóYJåŽ1Ò¹hîÒ5œ\Wß½’¡Û¢Æ|[Ì…xì=ÌR¼ƒDé%0@¸)Ë>: šF Òåöl€öáê=ÚP˜¡µÀŽÂ-düŒXJçôÙ rEpn2|l%¶ž¿uRˆŠ}Ǿ—Cd³_(0º¿'ª¾Ÿ»ß'‰«£•l®ö®ù|¥¹¾#èuÝõ${"pJSÕ«b1ª›ITŒÎ8q,;áÛ¥b„F|ÜÁêzȸßÌ„ZÈŒ†ü×È`n7?…!¡“BQj Š‘&Ó×5ÿ°ÀBíXÿêŒt‡?a¶.w9‘swfÛ8р° 7Á ò'MbðzLÔ¿J°M™îëR°ÙíÌ “8'M‘µ¨Œ³£ [ÆxCHYљ̩î¡s C÷Ýü:Ìß­‘,vg)x2W{™Ì“¢~„¥»V!²¶‘ÀoÍ´Š¥o¤U;txäØBµŸÛýXY¶Ì ž sð‰™pb'5Gm R"MÞS3p?²˜þbªí@æ¥ÄazÏ6CP–¿îjGJæ ”ò%hð¶Bˆ‰%™¤À¹VÆœ6„~ûg¢¦ÝAqfuÄ=¨µ;ƒTí\Hm¼†ü×Fõ@Ô%Þ'˜€æ½eÉwC]«ãƒnaóŽR¸PWÒ^Ô ÉÙ"¿ùËâ†û,¦„=dL ~IûUïú2 ?žNm軨ãòéý»•ž8(™ã±‡fwqéLcwc¬+yjË ¹fÏ"Ëé¹ ªÎúÝ"–äòo¦(…À p)¬ázýÑà…Ç(¸ÃÈ¢!}ælbÖ?¢CDKZÃ:Ôh? ù‘»oGÃûc¦"âøsdõïxØLžCIguê09()¶¼ù(œî^#剔$ãlbãb¥MhzŽÛi{ûRB±Vá­¢”†OggS¤›O! -$Áÿkÿlÿÿÿÿÿÿÿÿÿ,ÿ.ÿ.ÿAüÚØU~î½r C8]³JÃiÞ‚äéÙï¿Î7«Ê&—v ’)ùøÃ¡¢¿$1.ÖeQç³u\½P¶±—§"-ÈkTg’Tó±Àá-™; d:;ëýƓ҄ÊD.Ρ"eÈæÁˆ¡µËÙ®¤"_‘¬ôn.¶n®´p¦e±&Lìé{ri°šú9þÑ>·iÍj>_»‰ôåþµ«1£ô÷W‚À¾ Ü÷%î$åÂzøÌKHÃÕ“äû õ²§U Pµõ±Ê>­L¤Òî¤lJv„5¶ÌH¯¤WÓ×@dÓ~1Fq€J'`§ «ãúÀáåŠc;>$0 UÓÑ/ +H×á7Ž» SÆéTèÇ®x¸©J[¨ØB¦òÀÀ‹ð4‚ïó*¶$Œ²Ys7Göb˜Z-ˆÎ2êêÄÙ?Õðk.™®äëÊÒŒ,&cP™\„$èybUºcæ4z´xŽ)v™v¤ÔKÇìüÀyÃv‡˜1£Œdyb,±Á/þ\óläÐâ[¡å4ï:Jóo/’ÓúvxØaðÓk.¯—øM@“õ¬‘Þ—ñêXBýò=ÍŠ»¥ûk9=üdf9hq‰Ó¥âl÷®6ûOó™ûÍþ5XgŒe¶lb:Z²ÿ¶,ZÒÊ•^maÿ§j`Ôgvµ²ë—”®) ,€¯Õˆ)¹³ $”‡:»èÚºbMbáin¯¯,Œ‰ô©Q×n1g®¯OÑ·HÓù™‡oÖíBø|˜,ü’ ñ‚á‚Tpã£íò d j³ B]ËL@Tõ¦“\ÀèÐ_¡9•)”R­>Œ ‡u÷*Xƒ? xGvÖžŸNĵ2å(òÉ̃R««™©¿ØÊÓs^šßAØ”ñß»€Î„/¸þáÔï8•iãÝ`©b¤¯¼½€ŸÈÅþ3vÙ—ÿt®ôalìÿù™Eü×çLŽ/ä§×»! â²Þ° Wœ¡+t•Yi Æ,mq3™qëÄ?âIU? .ÐQijU<wµÁUÙËg‚7Qc}jîŸ`hª­Œy“P“n[Ò¿y–KK ë’HdǶʅ‹R£*.VDL‹éªÊ§1¡ë“-?;ŒÒ°ÿe´á`þ÷O‚A½Øs²ÉX8Þþùþ­*ÔíS‹ÊÈ/‚¦‡‡é„µ@…_\“.mÑSje[êX%G)åY·F)û’:t€±¬%µ?äÝåžíã,á‹cÿZZ/´Û2¥ÅÚÔ˜|¢æÌF•ºd9âßÔÈ6wx—=\ž¹ íxàEƤìWB´Lq¤—¤ëožR8ñÃü×FûôÓEïC›UrÏeëã‚n‡lýd0a(œù;)ôýF|³0ªÚ>Õ F”ò,¹ehhqÔœ,‰û_íìX ë2UÍûùY·hX7„“”®vÌ5šÛnñb–dc%3|œÝJvø)ÏÝïÜ ×`žé˜B|§”‹Ap³R×ñìRœíÿo˜ËKw°·*9„<. iˆøæbMßÝ ‹EÃmYïcA#“2Ñ!‡I°Íf—2#JùpŽÚ¨aJ¡Tšé-³'dÀM¤wGQib>ð‹ %GJäµ]µ.ÿ¹ƒ»L;»N1µm™Ýãµ~\T‰ñùi¨ò#½çÉ5ëüÕZDßðõÑwôa¶ù­˜†|0m4üÀk0qÀk·1UGœ“ªú 幨«=ncùl¬>köiñ½®êº3-{+ã.0ÌäaFÑš§Ö:©ï9”µ}Z"--öM®n8'@ÿvüŠ˜ÛsûÎÍŒÊ?QÈ7W¸ÇÂ&Ô^²œ¨]óïßaËeŒZKÇ%#¨Ž­Ûy>à-³x‰ÞVèöd´Kü×Dc6<6¾ò½åÙFH7§•ˆ¶—}MU#6¬¯©¾šo+'GñÓQ™àH¸4ÏÒ1#3r‡EÅ”‘¸Røè©06m2àe‹òÝšy:ü2ØÓÆÞL¹Ã­êŒšGèG$Œ?)%ÒŽ€eŠ.Œ½âé£ âìxwƒžWÍhÆ,ôfùô,ï#»dP†ˆq ÷š2àhbQ(ˆ…¯mÙß3üÛ•‘xã†0üì«ËÑQ÷ªí|ˆvhîõç# —Æ– µÌó(´¨d±¨3Y¡!_ÄiéÄŸ?Y4|>ॿsK#m­X È%C“ûü×FóöTÝ‹2”wF!ˈºƒò,„s*‰šÀyd‰T#+§ÖçI‘d!,M/ê™—ûà±Ôhð‡Kº!ËzBˈòœ[¦ªfü¢q'Wœáâ2oÖYæ á§,ß­æÌpPðôÐwVÒJ´ƒu…€§„¦¡3L(;H”’h-™¼š*Å<”UcO‡Ýñ©HîóÉõ#Ò ]7‘ü’ÏØH4O¤ióÑ^XÓË™ú¹ìù¼V™ðAîÌ'LY…JqD´º J«a i×­‡@+êï(ɯa”W_bë5R(’dÿÎ¥ÁÙ >ë§ Ë[ó<¡›xçJ/tuÍBÉüÚ#e  #/—wìÍ…"KüÚ|[z*yûjÆ$çyæ¯f)½j¨dŒoBÔÒ µóñ냫”ø2iŽœGyH…5n&§¼S¹½øŒÊr ì,RáØ¯GA„k¯¢œëiU|ä~¡‰„|ÿµ¢ÒªËK_¿hE„RO&¤e¨ªè;¨èA]JE³Í'±ÛzÉvò¯”þ —×éÀLwZºçC1xïœÅ ˆÎ²`’£!áÌÌš~²£Êøß õ^|<ruXºa5Êœ¸8ˆ¿oä“…!4$xʤÔë7Y-¦;¦šÖ@ípCŽN°~œTeôè²+¡¤e¸VîN‚ñ14©IlÞÚ%NŸ÷ñCt¯@qTêz¬Ø0ÌiÚåÁ¦ÅYiN俵ð˜¨ãTÍö¾n®;üOÀáøõ+KJ¯¶ßõ]c°6tÈ ³=¨ Ž®ÿAÇRFÇ>«©e|Fs+tiŸq¡ p$n˜] mž`øOm„Ÿ”ª<û´÷µ¯ÙiñæF¿Ál)+‘·ÊÊøEu!fJBõ€É^Wäåõ>;4†ÔsB[^úÖç!Šïo¢UqóšïÌ;!åé¡'ë¢ÊÚò }~Qnü:;þ²ÁáË4†ðp°øÔ_U Ub;gD/=ÇÿÈì®–¶ÆZ“ S~ÇIÈù“uñünZÙìÁ;˜¦+²«&1m$íPïìÕ;+ÇàÑ:K+óòõ!غ+M«òÝ£Sar0•Ä/¯9é^+p•ÔDàÅcz§q-|ÏÛzkI³Ñj?3y ´\Œ‰)¼ñþI¦¡¥|~]„‡¸Õˆ`æë¿È¬˜­´ÞìQÆ÷6®IÌ@°nÖ8ñ¸Èö#ìiå€Â:b6Ȇüp[¾ú¿‹!ÍëiˆG³i‚V']3·Š#… 1Ú.c«ýØÊòÀÛ€môù—Ò=6%à…- †,/?||U¨ÁQÅ.Lòåè·N.íýöZŸ“¹ôwÝ …[¥¬Õ>º¶)²ç©¸ ¬‘¼ "/ì· ³–‹pÁ»¬ÚoRÊd¡hfa?ÄoI„f/˜ø ù‚Dæ\ÜIP¯ÇX/ÙBb%¨“»fœœ³S,gm¾Ãë‘q|ˆ&Úì]Ï®ä)&h¾Wš5{ÿ—XV_±b¿ò0לּþs ÜPë§Ivœ/H”sÍô¯…:C9£–‚|g6S‚¾®ßë·G¹\ÇÄŸÝ.[+Æj÷j¬m>Gž¶Ñ!|O<ýú€ü?]óì>'uW²+,¡¦ò“$ã¯çIÕ5°$‚ ª‚¨p­OggS€Ø›O! Kè*³ÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ^ÿÿüך•ó…Z ÉôUfbø€LmŒ×'2Oد÷'Ï›R04:SÿñX×y³Ýéõäû|· 9uàmˆ¤^wŒ|™pôx]¿Ÿô(ôôD:RÀ/e/2”Kêy _õ¿ý¿Ó©–Yë4ôr‹ªfŧ ä'kã -âJIJ÷[Çsyå–×EÛ´u0wLÏ{ÓlÛ¨iÍC5ä¦ |æ·-w•EÁéøLöŸõ¿><ôÑÖmŒT¼2Ž©n‘Œ;“Þ]óÑÕ “äëH3`s J4Nˆ”0‹³ž?SÜÌK&˯ŸË^ËÏþÝ…ó¢2¡ûü×ÐYþ,‘ž¦‰ò¾Gje$³•Vz¬$dÙ;=.m¤ô}m¸âÙÐ*‹\ w)õR®¦ìdËÚ§¹ÞѶ'=yM’1ÏVo t,ø<ÊÝ|¬ç”pÓΰèÅO‰7ØJÊitB"- ùþ¦bÂIÅÅZ¨8•Ìšðæ®2$"¢ó_Ê+ÈjVdÅpy§«jÔѽÔXPìÚ ›º§e;déo£•>Á1¯<£Ù¼Ì0 «âîécÛËe̘x𑽍í‡åáOmmÞsfe i<Êj‚B@ÍåG‰ 3w)¢RXÞ*¸¿ë#ÚÜüÚ3Ò=^-fId² Š«U5s¯]ØE€#` Á¥mý!yíî™VÓI*£‚ËûÇ…yÛ¡Jk×.6ƒl®«…gA·ºpiÅæÏ=Ö ´¼íB Xö>­Æ³\ÌÏÊ{à¹4ysx80¨WÚXQHüä M ®cc[|ÑS~!¤mm(ßRw°c7¨y¯}ƒÐTÉmxì_éÓÚ4Wæ12ëPÚyÊÔW»xZÁS–ßAµÓÚR~¹}ßCî—¸þ¯5|¶êÓÍ“›™DIVs:•üÌJV_™Î.Þ›ö'}{)Ì&säÔxš*Îb(³„ИM›/¶~Ò¡u^+(%¹ÿ}a%ë{àfV:zW [ó!úâÇ5—{ü×<ã>)xŸÄ”øgßtH½ï i$‡]È?‰ýéÄ1ä,ß•Gï'P£ð§Ý™B54|8ÙsÝ>¢ÐÞ«=çç§#ÄlU2Yëç@›u®È¶{­7H!ú ÁC ñ±³.>Î&Q³Ñaøò¤pÚQüp¯tÆÈ%ÿÄ©3Oì*²d­\w¤œlÕ^ß[mo>šôýB=tŠù…µ•¢1³qÙ¢±èÈpN¦¨Ýÿ­ÉéVÏho‚ârg?;§ª)û¥S¾6Qð¹ÊÙÎó“ÿUÄÒz¹¿GùRò2Çû[)§7¢ºçTít}³ÁI8 4y}¨´ñRÖ´FKk#,½hæ"þ¥w’üë£ÀÌ—G<¨-˜KÔÀŲ¹:eð¦ð‘ÿn(¤Úð üÖÞvµ†ã*  eç#áMUŸŸ³…ì vâ¥ôMöä¢ „4Zþ¨þúäáÆóORß`ßr-;3¦úNì/6[)ˆ¾çÁÁ–3Õ\ç"ÈCZ­+=.tü³ãã×äîÓ¦-û‚y›Â!‡§¶]XZôwíàÎ+4Ò‹6’Tp —¸.™sÙê´ö‰ûE …Ob%bþ¼Ët{[= kê@SÈd—ûÍL5©µ:â„5Ž9›~P÷-Sõ–Çgá1œK¹e˜ º¬§Ù»ØéxÒò\Jwx °´uïHxvôæj ðlCê Iö‘®‚ˆûø¯ßåì·£ïБ‘?´9sf@vkß>r†W¬êÞtU'låü+·åJÓ»ˆŽŽ†zNaÖNˆÔ3üÚØý‚µ~? c×ì®IjÏË£J7‡b¼DË›6N•íOdI÷ê•…¢Ukçï·£ðn*Y#<ë¢Þ0™ 'qP¨€™©<œï×5“ùÿZeá?×ê­™JÔÔnê²F¦–Õ­SÏ눌o‡ã¥8ÙZ­,Xi$Qï?é‚LÑ ±Ï(üÊì›ÛM•exË Wk[`ÜeÄoÖõ¤dÕ\¶À>ì6º|ÐÏÇò=@@svð×½HpP}s]—+Hp£°9,ÝQƒñsôW‰TD¾Úµ[.*'E[ÿ³¿Å¹‘±oÐlDMxŒ"%…"¬rFʇãÑYÕa³øÁDÎóC0kϱÊèŠACX)–Úˆ-µÙ5~cÛ»üB³x”ïlñxÕ=*ªÝqíÝ¥*“2:z^ЬD“úR¢‰\ˆA· Üvæ*ÇšÛ@¥leV Ö‹LB|ºÂE8„×ëŽ\ØR/‘è|S/#]Ù%T´šbec@dzÎUË4 x;hÁU´Ì€¦®´Ç1pý7ÕgµºL‡øt H†Ÿæò”²ÝÏ-¿KÁR|˜É|ôZ‡âžTÇO„GÛR$ºÚ¶òZ‚Jl˜¦©FY\‚P'㻞C7íHÖ©G6ˆòÈ!@ëßGMëÿ$YžèXµ±0šqÄDD„t$Ô{Mš:ý`Õt5,ÛîHp_ìté}Ry!Å¡±×vÑ®c&sd‹¯1ã('w€V¶ÅÎÀ5Ôs˜êùÚ]J@§5©ÙZ)_ D]üwÁ”·ž_¬ÐñGæ"ÇwçáÓÿ;(Îá¶üĦôÀ-Ó|¨E FÕ½-šá´(ðœèÁ/m]õÅ”(2b#ú=ŸƒÖ‘žßhæŠ ª ¤¹'Øpcz’ÉfÄ»¸„ .øß’}·3GÊø”*X!Ô™"ò^ä¡-®8´n9£R±À{¯“9ïÛÎM¥èñÿXFG¥Z[:±6‹æJ&K K^g–hò /ØðÁP7Ù¹[ÛÚöP]䲞q /u#è¾ì 0Èó¼¶ZvÔÿýŠ“]›lù¬Aøc6×ÚüÚʧ1'È™w û–æ ¼…L{:-®§ÒY Í'Ð0ú’ƒÎ‹¦Z¯±,­þa÷Ì!;ðpúR¾Oë¤Ói È] ¹þÓÌßZÞ³úÓŸ±‘ìÔ]4„kclâ¬ÐͫŇâ€Â Tº¦4cå»Í'‘¥wy¦`̾ß÷ê]k«ÔóWŠp£¨«=`Æ?kg¶R‰4UŒÈÓ÷†ü¢¨Ò‡#àè²HÒêÞSk7L½¦±‰†·L6ýL⹟w]~líãÆ*¾÷¹w\h݃2X(¿­?Ö·Y£E÷îÚÌʧzÞYaJÖû 78ÐY¢–úsæ*#TgÒSñôg[#dýŽFçÏ,yxë³ü×Fú‰QÇ;øji峑 ”Ï®NšÄë­?}ÒöƒnOn•uÚ³ ¼-cS@W,ÝÝà‹Uf¼=áÂV„ßÞ¸ÜÂGv *}*Iôׯ{2 xøÿ%çDáo&ËvÇöê3j]f`.úòíhî·äMHÚi¢ºÆiv»TÄ!û,ë ¤ÕšC–ÉXŠ)Á[DìíUä­zÃ$}‘ñœP÷ dU{?§åÃokvêdT ï$ ΠUœl¥S6š¥ Jdè5…è%4‘™y™ ç*rïëö–ë9­ñ±KÛÝ9Ôö¢žržýU ý‚žÉo¨‰ß“6•–©œ]ddñ.§gÎ«OggS ›O! "ôCüÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ0ÿ,ÿ.ÿ.ÿ.üÚܘ©˜ö^2~ê~‚ç×/³Êy³Å|i{±à£޿ol8iÂ"<“~£Úw=‚!‹@O·Öæ ˜kÛ]aV\úÈÈï±€aI+äçòZx9iJkØkŠ™¾”¼~*¦)ÿr)í ¶%!‚$‹w™'[º6'ô’ܳ0)ìôÄíî†=£˜_8tpÌaœItŽ­‘Qx%úÎ&üœr¡‹ÙÿÏ'Ä k­¤GêâËê§±¼÷],86Gk{ÄsýÅÒAsB*)<<$îÚWÐÒš­Ñ µ;jó2ZÆ})@ˆU®1ãæIþŠ. ^e©¶ªœØ¶ê‹YÕkǮшpBó>›f§HbÐöIv‚—¦Pd:I+Eéñ÷s[6F­ûü×Fú‰|‰{âܵ^Øfà~Ú!íAÿ6kÄ‹òÕL¼addžÌ–ušÉ‚® 2¢3.GM‘·^ìƒPª¹$?LVI'ˆómû+ R‡›” ¬OC²¢<ó¬tݜ¸«<5„°·›_QµNÔJ#[±A{7 #-é »;Üx–ÀÅv€€ \BŠë3ÒU‹VÔ'ÛÓÏÆq¬R€Ãñ˜Y2AÑu%)Kz¬=@2á*h*󪓼:ÐWšd›H|kw™–÷Ïž?ÔZžkpœ–þǶͯÞZê{Œ2u2ôüú'fèÇ‰¤Š†Uœ·Ê÷o"‰Ë©}Oççe#D@e؋ߴÆT(Íçmâ›O÷±NhU›ÅÏý§ÄßpÖ÷nÉø3túü×Fòœª»Å#Ün?˜þ–!‚".üŒ@yÓüë[KÄ»ªdWï¨ 娋þ¯ {Ü®¡zG²IÖwšnJËÔûs _4e,“s+C¥vOìOxLÉìq$¼þ©å!d ¡{後:¨Iµm‘ˬ•|½Yw¡Ö÷H£ðói*öÐ2Ê–¯iÅI¤w€ÉÌlíÊÿG P<šF2ãS`„"zÀ³TQ‚Þä¯Sî|H@M1t]ÉZƒ`›©-""U¨;:4yç‡cûñ%¦Qƒ×mÿ«´7ïÀšë¤æhñ2ͳQÜî}ëéo×ɱóYü"jG   ¶ZE¼¤ßÓ´>É$#™ej’)~·u}Âqga ›D÷ â^5€¬@ÊÓü×Fú‰Xˆ ÑË€M†b=LÐiöeU)X_œŽ RÃ:s࿦€ë„=”M<º}7•W²ðdbÑÏŒtŠÌ<øwXÅêAðE˜¿átr~ÖYóZ‡ ®Oúœp̧òÞ|ÇÞuÙ&KÌ.#©¹Hœ±ßDƒ,™E=Í>@˜×Ò~qwùÓ%ó¿—FypP!/eñs‚X£Àù¯Ý¡?A?~U6¬Þ7ª”òu4É|6Éí:c(ëåÆð'\$0^é.®'2‹CedÖ—€Wi)/1ý¥gEZòàÔ$ôõ“G/óɈòRu4Ï }^ìM¦ƒÓ Yâ2nèA§ó¦û-©ÔGÉ4ÂŽ 4Ø93vOÛ*&WïïêCìˆYß³°|F53ü×GC/Ëe¥Õ¤¼$ßíÏúß[ÄgšöЊùÁ ç£Pôi9!à5$•©Z ¹>«¦®XËç(‰½pG7 ûƤi]«·¤ÄXàñ¾m¥Ú*êIkü×èðÀÊÞR˜ÊÕÎúzˆ ˆÜîãÕu®G÷/}^o^Úaô½y@ëŽ cø R£P¶t§fbèâ×dÅ]—ü*ÝÜÏ|Ã3\–¬é#“Ö(rØ…1Q;Ü»& ¶ËJÖšë.%¼ÛÅì™1°&ÏÝÿ;ƒí"’æÖÑïá¦O,²ŸQDªˉþ=è¼j¥åâ+,Òuû ÓÝXnøðÙë3zËä½ü®¬Äq»—¥TȲ…í+l¸ îÜu¹FYE¸ønæ“«ûñogÞA?Ò²bQʾ˶Ày¿ÔKd¦[ÜØA-Ê eÄÿ·kï‰_,7ñÉ›ÌÅ© ¦ »µçr÷9}ô¨1áÿÄ“¼Û²ZñÍB¦³\¿ò*ÚÑy~O¶«‚Gƒü×Gkâ9%^Pæp þ­w¸ xÏ$+Íx”äæNQÏϨ„½PDTFÚ«oHËîœÊ¢,4ÞêÕÏ X‰äójîšX‚Eé•¿hçÞ5“‚1SroAË­ªåQ§vöËÏD±$¤WêÃïÈ&¸½x±Aw‹ôå^•sCCx}¯(@«Ö1¯Ú0ÚŬ]a6ÌŸõ%9uåǸ/òA\»kŒúõýQÆ4Åc¸joÀ'o!6ªk⇸ÏO‡BN–™Ð|Œù}Éeòa/´C0èVö}À}¤Ìá÷§×DÛ´™WEŽ:1›jÖ±q•¬êHåþ­¥\óŸÈO/¦eWRÚ> â†w§¯JlуôÕÓ¢Gˆ¾m,C#y á¾¾3cüìCüÕZEÂ.Ül\‹ð5¤øöºn€à2 ßö P§*4Øj¹Ñ]Nq²!Ÿ¯åM®ªêøži²¯ÅÛUÄ+¶˜Ñ|ÇïZ‰ˆ‘^šI¹nh8íW†×TG§6½ºéƒhï²s+჌›6±âA%à19&þì2ê¥VÕû{Bo`ŒQ:À ís° Â;NÔºZ´n9U‰ÐØóínó©Gô" "ÁÉ™N߉‘pn»ÒÊGE×0êU’¼=i®¡ÊÔàY½óší³ä%evÀ§­ÿnBmÞS²w1ŠËlMŠm„ëlìp A ×öñrêzL§ È£îªË`ˆÆWæ"’Gä³xÙä¿°W·$¾Ã¤Ë¬î÷U.ûm©„Ux˜#.Û*Íìü×dðG¹»5‡×R“þ¢‰'öÐ*H&ÒAçy6R÷õ¡¾c–A¸¶i¬ñ8þ©§ê?Ѧ¡4îâ3zf¨wüP•wÁ«$2-ù+Ñ`òòó­<1²GoË,¶ð£\ç4_1EJ;I* võÒ¤¦Ö lV,Íí•ôÃÒÚ5èOGOO¥÷×Rê®.êÌvÖjM=µ‘BÆ÷ $Qh2|Mòlbª.qÓ7âÄݜǟˆ"¢óä,ñéÿ‹}aÉýÕ BØ«©´c6ƒÌ(ÉѦ•2ó¼ü«¬ñ}ÿt›PO›ÿºƒƒã;ÏÓ5ã²Aq¦0åS@ÀúªPD9þŽn®–ÜBç…ß›:-HÆ’FÛcBaDÄ"[)Ä [üÚÜˆÏÆ‡­Dšmí‹É)Õˆ0¹8ÈŽ´Ñ+ó ‚S÷æø;§ÛЋ'¤¶@³ë|`—UA×ô>ÁŠó#'Ô¸á^0GkùP4DDH}4ÎÞº_Ìä'X/Z =ÜÛ g52z!®PYƒ k7OÜœqö­C–äÃý?áÎyÉâKˆ:/©{½Ñœ&œžÇ¿êƒà~tÜ[‚Ÿ$ÓZä›X¡ÝZµBvó,Üb5:Žyf•tµ ›‹ÕåPe±ù þ*!ºâ “ÃK×µÎÉ-šÌÌé˜T¸>½måòØìÉ-UW{§ŽýsDéUï¿þüȯaâ ³%—Í-_ ­v¼zAGV=†:»aȚeõë.·äeðO=å(nú¶Kþ4ãK³üBi)J'F/vP ‘½Q¥—6›¤õ§#ð±+_´Äa:\ß­°½:n°ü) —ºi˜/z„i#|,]Ü(QRFúoà^ø³ìÙ>ù5V¢Úþ¶ùÐÓ¾‘-·þC<ÑySÜr³½ûý‚'›[x¼úhRþ£ÔJ;Ýøt‡•Kˆ uŸ‘²Xß#œ@0{d£)¹”7¸„Ksv}Ú‘æÈP¶Œ%jø&£ó’—¢¿£öû:„®?„ó•Uzƒ­ÀzÕŸ^Fó áu‰±ºEj1JkR‹Š+A#ßR½µ¢ÔU\ç‚Iß“SVì@ZzT&wO¤šöТƒVÑ ¦üg`¬6ùÑ=·èç”Vî ¾:÷”ltH Vîy§'™l”œ˜* õo‘& æüQû%%J-¼¦n™ÔJ«Ä‰–'ÀÅ{et‘’OG&£öž­àR(÷(¾SÂĘöTžîÝï0¢¬!µr÷ZòÐŽ”r¤oå²Á ª97?¢¸ä.ED†Éòq_ž1¾…&a¢£s*²†ýJâw›Ijî"Ð*qíãI™ Žf¹JbZCN»ÉÚt^ž°&à ô…—?WÕ§¬÷o@U diR­¢ù GC£êÒˆ6ˆÌíùÕ¾!–T-®®óÂKÐRõ$É–£ñ¶ çnQó¾¯EÚ ê8Y@K¢Ù<ï3UÁïÔª%…G·ØÀ[µìÄYýªgŨ3òðµQgkoeÏð}Ëyuu4Žj.[v’ÒS®k>I0òˆâ½€ü×2ÖM$Áü™“¡ÊuÄ p‚1¾h´”7#ö DØÒ³Õ•[{1z “¾ÙúÊûμ•n:¦”ëöët`‘»ÒTž ŠtÉ“ÅGŠ&¿k ‰xÖ°÷}@Aqë˜Ç¤©Í=TQXß‘\TM|‡¿pKÄ’s"i€é…g+ISØ'HÊV0[Ò¨!u\KˆªÜ9"*½ý_x}‹üwU¼[ ©··õáíÂ/ë“锺Ýö¾¯±L0ä•èHSq~nA¸¹_Ô¸¶v÷Ã1­p ®¤üelu¿‚QoÎ÷¯|‹ó€nýw‘é=ðçCN1.DàøC%æŠäS$ÏЊ*)âqŽ¿Èà‰}…Úy N±°—šëªÅ ’é–²™I³:þÒüÚܘÄ0h¹“Œœd÷ñ@óxzC½žè.£¹ì‰ÉKP`vº½3R «h$¼ŸŸe>Ê~ðó‘ ½G'ÆR÷G&…c›R‰Ÿ±?Üô»˜ü s4"ÂïØ.¸#œ('Ë—¹ú†îëÏ_îR¾>UWëX²i?C…ßÝEK¦Ãû¤>,4….X™ê˜«lú×¥DßoNn8P`d@ñT³gKÿjG\/Gñ!¹ótµ’²¡A4©ûŽáp0J<¡<â ðT[Ö#ö‹>ÓÎ?Õ&Fóí%Îbüí}w^Øžb„˜°«“ñ”"é `ƒHwì%³apEï+ßí Ã8 öÂ<_ëZyüZ‹ÌUpY»Þå4¨Üá*jì))ÌìÑ~¤U`%úOggS€A›O! "ÆŒ«ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü×áæNç5à€2h|Ö¹÷¯0Ä>ödƒOsC{|DÍ«´¼lú×,ÿ™iêÝkը󛥦W/ñŒé 7¥uœ 3~ÿâÄf‘j“GŒh_†øBDdÞcG¨‹òÐÚ±„ÊuûµoD\øÏÁ5Td\÷¬Šr«Ü r€-~Fpœ$ûÆûäô¼<í)B_vŽÓˆ·Ø¶íM´«v”u´¥3Šx™“o6˜º¯•ñ^C*¡Ó;„µ~—…àú"õ§G¼/wÌš2ÃlóéÓ¬çÞwQ×°´mñ1WÓ_QÁâbiüUwé<ÝzBüäûêgºÅ¥A`ìL|©`†ÝËT ±˜œùCÇäËul*ο÷òfúä™CæïG,úö‚i—éó >“ü×Fú´dÍz[š«áá)†Ç2¤CFO’êÏ&¬ç´á;§Œ#¸”µ (‚­ %ËncÈ<B%ŽÉåí'¼œyûÙ’ŸÍDC´$ÆXáæjo÷j2p]„wü/ÐZZ`shxœ÷ˆª¹º R3[ž/Ûñ©œ§Å¾z®ƒ¯hod \æऎ_Üq7khUþ̰“I‚iP©"Ðô®4©í]€;øÇ!œ”:¾ƒ„¸t©ð)“‡mn–WŽð¦S–˜ƒ1N€$6Ƚ ³y-{· ¹‹x×z|\õ²)© 9Ù§Sr…/PèëF®Q¯æøŽKzS:÷Ç÷³ãíís@DßÀM¾ÆUªI½Xw)¯íâÙ´µÛÝdIkü×CR¸ƒ‡‡%D€RUæýÙytƒ„&Ou“'”~YÖ3û~« Ô×ún¢|fW‰"H¥ÌxÖ &®L(^CÉܵ€…Ëy9qç˜!ÓPdØr,wÅ[ÄïX¼!<>Éé¡Ó*r,Û)1%y^:¯ŘÚÝ›dHëü0ÞÖÐÍ¡òJ>F…oNÿ -·ráŽÉo°yÊåíÎR4cGí¥û^ò½XKu@ oZlt~[¼MÈí^÷oåú9º«èàƒáâ$…aÎäŽ5¥0¡MS L’±!NrÐ<‡¶s|€‹P 1*=«n¦"¡SN³g—1-^,8µÞZÃ×iHÕ¦#–ªÏ'Bçå¥sœ¾4’_Aú07ïb¹¯ðü¦‹ü×G6Öá8ʘR6•šìdÉ´H]B`VÈ7w:þô¨Jémƒ£hû{rêŠWmæÐ™™v³î—î°cäð˜Jö`÷›[#.¸«ì`ô9öÌ«Æ eÏ5ÝGúÏbQÊí’£tæ¨xnwË Õˆ¿ö¸!Þ;ÙÿEdXÊo#/©¬b:‚ì Ô¶³è 5ÓèQ_[ÛߊÎñ‰×z3~ü&úÏì´« {J5üÕߘØ2m,qPŸÁãµÒ„!&uúÁ00QÉ«¿é°WÔñ²´”ù?}#I)EÞZ5ïeÿkXLÏàà+ÃØ"_Ìy`£Ÿð3ótbv(6‰U O„lŪm¬Â7>lÞ‘ŸGöÇ®â²öŠuåý)}ÂUqf|<¾ªÇ˱ت_ŽÐ'kǶ³ä¨qzÀƒ¬ƒŸƨ‰&[R%¬3 “üÕZ9)sÌ#hÅÙŠ]¹–ÖÖÙù¿;¬xÿ€ÂVÉçWF³†ì‹[n¦ÏWæðïM‰>±y$§éƒ4§{œ{šÐ»8éì–'OÏvÍîVx[«[úíQ ±<ÍÌjY6·){5öFˆðÊÝ5EØZ„¬jÖû³ÐrMoô^’cr½"*ÙérRëiÇÍCþÂÏ*zën5¹]D’¹¬ç#UUSeÉÔVÀkN*Öe‚ÚÂÙMo$ÚðX¤´¡žµ0'56Ü×òa[Ñí;Œ!¿ñ„Äh{•õÓ¸ßùeT)k쨛)ôÎè¡~£‰V !a3Áç[gÞKÝÃ>„! dfþ˜:Y:¯Ù\ìÓdI¹$‹Fë®ÂHÃü×BÏ=Õq‚I‘,§ÁÀñjŠÉÃøÐ0ƒP|<@~@(†\ƒ‘š¿ýu¬Gm†ÿÎYseÏ>ë>iñg/‹ñXTã4vø¡è¢üuë‡1û ,Ó£´„áU’œ à›c[õȤêÊ¢çÊÔÿï{S£ÚPî¡È¶Ó’?ò÷"?†‡ž f'Ü’BTinܽqTüÀ>WjA¹2«V#š–6ªº¤gX1ÚÜÄÂT‘Å~>¨Úy鹿 c&Ô![$!ÒÞ“!ûF»´Ì•¦N!ø£.Ò'ªP>¼S‹ß¼Ž½4þµ”V½*Z–Qzƒƒ<ø•áz¿\ƒwëëVãn³öÚîîÓÖƒRßan܃ÃäÃ2;«Xr„ð4=_GĤáœõ©ÜEb:þdD”1Ú„¤éµÀ”¾¶bˆÀxþÙ@¡J™×QJHhÅÞø|eTSÀ¹f¨‹Zì4Þùf5¬wtpÏb@pàÁãôȦu;Ä)¤V3£Ö,JT¥w¼Õ¾ÑoË=¬€'pI]l;oèh¶¸Iö^b_ä[660]e¨ºGJFkðŽÝdR@„oï:L7‚ücÝ“Ûáduå'ZCX#¬Šw§v©ï€õ'y‰C5ïÁ£fJfs7ñ-ØÛ;¢Y58£0Ö“huÝ™‚?p_ž/F/7+¦‡ð>ûA†­ƒZµêÂ0àÝõkPߦéÌC²ƒYÞ6]”¯èBþyK°Í´‡®qÌóËTŽtMGc×é$ñÕ-)$гøòš2Fä>Û¾L2µßÙ9©»Ú‰«dÅ KŒ-Pú«Ëüç%?ɤˈ]—¾NU‡·ô‡  IúÔ°Md'“YÈÝÚ×Ï>bšl®¶»¥0œÈè¹½øÍͶ -*F>ÿ»b3MŠÁàºNîƒ3 #§.h r×É~vS{²Ò¦«çi\TcF%>p [ Ū?©†*ݨÛ~†G\’“†Ó¿º±b"´._ƒ›bÄNz¬†ÞsËñbԫ؉¯Äé츣º«ªreEš—{$O\JÁ¾°Ù sŸ§rÓ=rÍ ÄÚvçB%zÑ£¶‘g.Z×pj$ãü×Gôi}K„/º(Ÿ†Þ™¬ž±ç’‰ž0¨ˆQ Uæß²"šî0tDT¯5“[¶Z8œ¸±2çæ«ÿIpI‘—LÏ‹éÃÄò#ƒº“Ñê{¾5މ€/ï€âZ×Ñ:5ÐøÝõ V¦„Oä{¦ á b¨ÓKo´µýÛBÕnq„V·ã\ý³þJKOggSv›O! }6].ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ4ÿ(ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÚÜ™(^G1¡ ôÄ+=Üå‚î<رX2ÐlAùñc ®?ÍîýŒ~Œê°š“ ýãš×Æ­± êìO€ãtM2ßËyNÂÙZ€Z(ŠêùÏå1G·M²«éöPD<Û`8á#´˜„/Ä/¬A,®(°r)0ñ=ñ”̽°ÉÓÊË؆ÌdI(¶'#Ÿ”¼— 3¼Ï»¹p˜?âxé3$æ±8(RÇ f&¦+£¡íbìÇ‚ö€K`(.Ó0:@cÑX: áÕCˆîÖ# Yòˆ¼À Ñœ†B>‰Ä NÞ©TF±“‘ Ó]‰Ùާn(Û‹ÐécsÀc+bQvÝJó«úѪÐjÒúÎŒCëHN”—Q •ÄÜj›„—nc*kü×G4v}ù4竬^;w{æë04èv÷Æ8똟ڹöäÒª~V?‚Kú[_ÝóVX É»VþŠs†bˆiþå(=”ãÉ/Dm‹.a~8Ý i[žÀK¢ñ Ȥχ(m¯gͤ}m¥Ü"n‹R—¦ äÝ–7$f(V)¨sÔð6âWr—-Äê²ñà”x:U7±ØÔ DFøGG§×¡¶öö üŒñ9/÷<ÈÃ÷ùÃwíyúè.²ðŠ£*­¥äÝ«6V7zbS÷“ "ñ‡å'ƒòH_ÖÚÜ»ŸQÅDçmí~úÜU6åÁy-è3ÂçwÞ;ú:TˆÛÃËéfXÁ½jœclÖy=å³r8wŸ7òüí±?&ð”`~Öš¨Éóü×GæÒwV_—>V<ê,‘ÇôÏPùܸU%«&ƒ“ƒ>˜biÜ7PayzWbU3ѱS- © m•ïpäHO µ²KÅÑ¥~}§ BÜ ³n]ÇùJû ç‰ #;ËÆä{Çlf1ýæ#KMÿÔ9•çDI¸œYr†„«Ø!ä9ÇZ¢"à$Ahk°´¦3ôH@l["£çøìÓí/­²,[š—Á]­êmGœ/,d ‡+1ù|ÜÅq\ûì„C •á¸ÕVߨD#ÏO× l™;½«¼é—2o›Æu_±B¨8õg­”Û õÇ!k§ÈÞ[ñnüs½õ¶íp³jM×w»<¼I%LçYƒi }M©4æBfúßn5«ü×GõiV>|ÔÙn!G)¨ï|h… 5pqP·@¥Í±%MHDíæ9õù?Éb°²('ûŠ]hdSÆ*ËÂw .ÜF è·± ìÓñ­(’6‹Nå”|Z&yÊ †ùFT ÿÂ÷e½™–‰¿Ñ;_‘R^_m'!ð”q—òeô« Ô’Û';ÿ ‹§O,™Æ¯ ³2nÛé|–c¦¨ÏÚéÔV‰E>¸µtwÀZÆ/â=‚~³‰M…³Ó]ž%]Ú$ˆýh̯…„Qþ†uçÊoUET£½ t*¸˜èÞBÁ®£Ï|¹RY,Útü£¸ò=Ä»ÇÆK‰vz˜ôTÊ8³ÙO,0t™´€)ü}m=mÿ¤¡»^ÛÿÓÓÕÎÚí¼FìKü×FúŠÇ6øt¹@÷gO»Õ×U4ï€vüSÊL÷FU\ÇÈÉðc¢›(ˆ€…/¿?PÀáßDÀ™£.², AÏ'̪¥'½­ûÌxÙ6Ó}\ó¯Ú'<6‘éKñ´Òb.×`Í&h¬âbÖgÒçL'e¤¹ŸLËß$¨u—ÈCMk ^õä'ò_|]ö‰y'etEÓÓERàu–ºRpúšß ¦ŸßíŸv i̲cplÇ>¹Ú­ãJ¹Iýzæ çžÎp׺øŒÿL tü®øP¡0+ð§|Ý\ R4úú4ðLúiõ=ÜÕ¼ãfþØ$È Ä¡îyµ*7£ä4öa¦îì;“K²oí³€]nÃ×Åî+MzãüÜNåT‘Áñ?-ê7}æ‰î(¦ˆ0ªžð[Œ;ªŸSŤl/¸ý$ÚÈ´]IJúÔæxÅ[$×0åæÚ*†Èæ2ßûd£.ð@a£òq­Üôƒ¹ÌÑÓÙÙOg»¤c;}w¢ 1¯óÂ@LgkOýNðØ ­;ħ?`áqÂÚvÖ~2äS¹GÖ»|#ÉæÀ•ßÝf>×ó¹‰üŸ™²Pb²Ríít=_mBœøR^¨:ÎÖἃIäÈGÅ]Íåýpk6å/0%H®=^öüTq¬ú÷‘…¸Zb`Ü ú. Ú|Ë[Šàv»öAxH × cGÒê^óñÿUY+gËK·@Žä“å¹hé>7´wöó«S[Þ Âž}ß³üÖµ†2ÜôøþRÜ¥awÔf¶à¼*•¸À£'‹¤ aâgùËø˜>â¥ÓùûqÅ¢êþgš£¢ÈÖÀ+meª­xŠS_­ø×ú† X´Ý¢“Üû.änY¾/]Áˆ”n|\Höø?ž}‰„±y>öÓç%º£´ ÉjQϽ¾[^¾ûÕc{ BÚüùF/‘r2,ÛÙ6¥ío9À[?b:A)€‰'ü×Ë{–¨±Ü•4´\ù–ÂhÎG·$=û—m€èQ=z$]kÁ® yôÂGzfèM¬MP¥]Hd”7÷†v‹°TepÔ60ª~ŽçV«Ù~Ù¥ÖȸøÀµI‡°ËÓôhGø7ø„jÞw¿"µ&¦ò’ ©'R¤ò† !PuÛ’B§ïѾKq´ÓS Í[± ÔCÈõżÍ#"ÇŠTÌ”an#ÓµnÈÇ-¥«sr¼ÈLy{T×H4gXäwS|ŒïwçÜ¥ÏH“1²g-¾xÐÐ{PÎUñaó_=½q®–NÆ›'ÀZþ¬$»í^Äý#ü×FúWG/qàH’ãjd±CåæMé ðøäsïˆõBª„¹¢ ò…ôgý‚à¿yÚæuÖƒtqQsW1³a?š¬†9WýC¬–öl¨-ø£½×kÇ E­÷û1Óî~$HÔÜ…#z){3—庇ÙCÏh°UÄËKÒs×SQ奖f^>ÿ<x¤DJÝg‰öÔÌß,tNbë•xÇ[´“gð"jzt­\paþ³D”i¾š"˜"»ê-a¦¼zÒS†‡Àb^Ðεy"–ˆýÝá솋«ZÎûÍS¸TUâó-˜ ±aÌ{ô]¨})‚ܼ¾7òtºDÿînÆÈ"nB‚ÿn~!Ö«iš}ù7%C9ÍÚ… }¡¬9 ¸±µü×a¸xbÇ®Ê7¡ôaAðíãÝ+¦.#¼í°ækjûSz‰„Ó˜eë×fõ¡"& \4HÖ°ÿë°FñÙqŒPj$x!̸å­ÖÚi°g;ØâR Yµ.yehGxêžéÊ…M‹¶ 7°l‹æfµŒ_ŸiG& ‚ÕÐ"ì!?­Zô œ¥ãÒéÔA=×oÞ¡"Ëÿ5"Bo<,c÷“í©Ý£ )BÊkUÚW¢¤åz¼eзq ½¤Ÿ289ÔðîôäÅï GyÜ59òý²Æ82“{T§”¿¡Ç•k$ŒËP)ƒ§ô¸™V(0& û¶HåtpGPZmYëEèBøÏ7Ÿ³óí3z"÷*sÿF‘ JwS»å¥þ©ÕѱR¡ ü×Fõ;›@I/5ÔäÒ3hÍj˜É™ ~O±ÉLk™ô eR±¿8˜S™ìܿϤ z2}ª…Ùû1ÊwJÌ·;µÞ)ÖHZíœü­š'ÿ—yY&BqªHÙË{–qWœ«š˜¢×:d&×5éïýåÉ·ÅüõdAú-ù058Œ=5;º§.÷äÊ) Ñw*Š‚dá²sÀ¯ò,Ž%8j’RŽZ§Žr¹­9ÍZƒí—IUˆ{ V{øŽPÉ]H*¼‡¶œ™ðkpwý Š$)}’ÿ“øÎ¾ø)€¼äõô»¿”„±|ê'±±*ÔØ"Ð`ÉuÓ.…÷`¿Õ©­a¿Aý­Íà¶kÝŒç–.•(‚”ÜZÁ1hDÐÙ`o~üt™¯û‘DÔ‹ü×Èç«_FHЊŒmJmŸ¹ œ j\þÏûuþ”¥D9²jXÒ=C_EÐÄovtŸ+îú`TƒÄ uW1W޶ï>àcàÔR”®b1½ä­Rê¹eÎ+Æ‘ºÒ.žïIìW„~æo+—ä€~¸@RÁØâÁå*"䦱4³(TŸ« $Á¤G ¬ºÉŒ…„ÁrÎ싲¼ ©(K¯b¹ÒHª¾„ŽÅF«4âÒ;ö‰~'³ÅpöÍH®¥ÞÒãóI" @óB‹#G`ÿCvêé[ÀÖN¤Vå³í÷ž7‰k£µPû^EÑÒJO‚{.©>dsÏçk$e\ÛiÛ«£{•÷5¯ÙÀ† '–}“`kCˆ,ÙĦL¾¹ô‚"èé|…kOggS€ª›O!¾ä@ÿ.ÿ.ÿ.ÿ.ÿ7ÿ%ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÚÙ»§{ذ*˜7!Ô›$ý.+i F °™˜- Özo‘ »ÕeDïµïGÏæÙ¬ÿhÐZÎê&ÕöÊ •Qä…=9Ê›÷"µó ”SŠ`` ?F¸KÀ܉ô$$ÇS,Œ±d~©žºA±¡!äëm6Á…Μ¨÷âgÌ̺0G¡l<ù‹·nƒÛ†¯HHÎð<¡·ó¦+)†õ½4—„-€²ÔfîhFûð\T”ÚhSc×A¦!ñž P_¯Œí[V~ò lË4WxÊ€ª‘±Âyz¯Œ7[À§ðéʧûTîèr™ŒM¤Eº*ét†0L6ZÀU‡ |2Œ4*6›×ëÒB`xFÜ9z‹¢NŒgÃfõØ"T½ηb:¹ûüÚÙíë‡éÃ6 8ñ«Ç+qi#aKd9K )¶JäýÇúbÙ4ܳËö{ÕªUö (`jK‰#ÍD§.AIï݈òõV𴉄ÒÁ#•û%Œ}.Ã1„|%$‡ç-8EvNϱ>Ñ¿m\YG~02Ö\³îaÔ Rz6šÄª%ðƒ’ƒÊg=ü³ˆ.a ¢| +”¥­²þËÎ}ž×ÁO½GpûêÞäS3¦øedÒåx3r…†S*ÍŽÍ8 Ú ¢•ç!)D{ÑéÍ”'>ú+þZ2–Ëä!¡¶€ ’13¬¯¸^2²¼#´7 Q‹”ŸÂà'¯è”Ïk—ÊÏ'íuyh¾0CŠbÕŸ‹¾Wôóšs4l6ítÎU£U£ñÖWü×DaU‡¡ÏÞ÷}ϯ ½Nny `Í€d êeÓaæ•O)Ôž^ÌùŠì8 õ¹]Ÿ_š áX@Z˜ºenËD­Õ¨¡›‚2¯´Âk™ÑŸlþ€<Œ{Èãu†c@PU¡”Ñ ñ¿L]þZîº,F"~GÊÅÚsâÌœ1džÉ;âë• mÜßññ\ȮԬ`b™8.ý’ª½ÚïdÃCR<ÅXl…\ƒpKž!¨‘îÀëq5¬A¯ˆ%Ì(¬{çØ‰d÷Û䚈!­Ã¼ KÜ b•øýóRCÅrþ›ý¡öêîeµz7ÊÁì`4ú\«ªkf­\'¬ž/pÓ~ ¹ÇfB9Y½t)SÙ/1{m1Z¶6ÀG÷ákü×¾j¯ôäj'\µXð1-eã_1ar»#‡Q¹…uµ;È<,‘“g[ô£Sþì( k”‡†Yt‡éÔ‚©¤,ºós­â 9^ïf0Á:N2ô;4ågåp|Ehy›¸iD¶Šìç—Õ( u«±pP«î’Ú3¬˜âÖÄ¡þ¹@ñ‡Ã[aÖQä/ãrH®¥éN†ŽÆTÔ›ñËÂõ™ƒ?ˆóî祌ê@Üu²l"v}>r›B½^ƒ‰ºórj®(y¾¼Ä±áxf#ìŒx_9Sw&gÍdƒ•ë‡Nüºî$aW¾¼¬èÈ©u\jš@Òõ*2%ÚË*,ÖNV%u;|wá軓ºÊV}n÷MçòruŽÛ`XÖ¥ð&2‹– ÄãüÚÜ‹I©Ó÷pù`•±¿tI/ª&ÝÇz Wµ1ôÉI*ïv+fPû†»í*Ù7^êï[iüõêË$p»ôue]Ñ›Á‘¡ô7Ô `g±Vy®Z·<.º½\©ëãZlõáÕ|Lïíæ…;J&aéëqMMxÓáù#iS•ù$yäñFí} C}rsüƒ‰ä˜­¼ÊÏq¦]y¢êœš[òQÔ¿?KÅ:É«bS e瘀l°zP±ýã[å ô¢PFå¸$â^¼…¾CKiFÔ©–â÷xc« '8¡34ï jHVÏì*Á£?¨ˆAÎIÏ uNÂF%.ÖÎk"J’Æbò‰QœŽ\™%¥ÀN¡ HìàP=‡É“.lËW¿³R[T¾­Àƒ³äø)=ºüÕ€¾2åµËØÆÕôUþÔ pg‰êþ&,|¥Úsí®D‹ú L«ÜN©;;¯Ý(‘ºÂò6é»t¯1øÔ®Ÿœ³'þz1nÄöSG1“%ÓÍÊ®¯Pé×êÅÆ¤s­Õ|ñÁùUÉÒàÇÝä&ËP g-O uf[• s¬áiƒO¿ab½WB ó((4¤R²‘hûs²ù>Íþ½û¹ˆÙ¸ÖØô$. ó>¿Ä«IǪ.Óµº|SWq¼ñ-íKBÉ?ó˜>ü¾JI¤b±Ï²9e[ô.EõÆI(NiŽÝ#Û›bÎÏU%gÁÈX,ìíô©v¦¯WÔÓû#–#ä² \öÅ:ü·3j—$]ë´Ã? >…²6㥀Šü×GÌœN[B‚±éľ-Ñû¯1C^k礛ÏCÈ:OHK×0ìâWi‹X€|q­Î жÿ¹ºW…r Í‹æZ (ä‹<úHØöï–ãÕÀwöû2ü§qÝ ?¿­ «¢–ºÑê|÷åàmyZÜAÃ$8ÙcË $ ð%¾€"ßÖÂx›Š+¶ZÕ4ã½È²YêQq¿ËÕ´e6þ‹°é€î°³tç²ÀÿuÂ7‰{¼N–Ìó¦Tów¿Ã²ÿ ‹×? µÇCC5ýD€d× ºð¿N΢#CbZC:é˜:Ÿ·Æ›Ô{ÜTBŸ—ûÑVƒ"ì!•b‡ˆ^ãU›O–vz'OŸaŠ!U‘ó}D6¼Íÿ4C{µk»1gŒιŠü×GÁˆzß@"¶ÇÉjA·5Û¨á>zå0Q×VÈìX`@Ü`µ”‘TÍâl–j™ÜWP-h¦h€šÅ„¦],”>ÂZªÝHãϺOÆeðj ŠÍÌ­ÜÓ/mu‹4î®G}¥‡ŸLv˺{ŽàWíÆŠ0-åéVêf6†.¢õ¡¶®æ«0&l—°>@ïïÆ`bÅoÚ€½f©ˆteóJ¸÷à“×CÄSëÐNÈþÍ3øÁ/kïb/òÆç¢âŽ_1„c‡Îÿï ^W Ä—@òk´r“+$8ÁÇ9swõ uõÞNÚN^Ý;Ðæê hŒƒÌ-kÑò2ÛEfžTó¯_³4qIÑG-  ¥ú°(/Ì‘w•f€ßÅ›¥rÁh2&Ìšü×Fõ=Õ"aèñ~‚°=öÕ´žcR®ø+.9Ai¡âH€ÕÚÕ9çÆêøˆ“Õ[]ŽHù¿×oŒ¶¸;ŸÇŒà äzË$ïÂ?@l¶Ü~…©+(Ô0[!uý ‚צ µ±‡°!0fQFRI!º—FâÂì»^A«|%E¾»o²B›Ÿ36æˆm†°ôÈæÚ™t­<(Ø­á+0Î&é†gj‚‚‰cæK Ó!è†@%ô:ߣ GκònËå#Œ7jRëg9’H4Bü}IJˆ„óêѽ¤Û’™ž"ñ‹žc¼Š‰ýlnˬ^‚³Ï5Li>3}æT‘ EÊïÒó)ɱ¾)ž ²«kômëRFɨWd7õ×ÊEòüÕZ<hsÍ­‹5eÃxþ“ž|ºÝÛí@ˆLª ,íðµKXëN­ÝݶᩦÀ ›cîXÙXǰD¸«=ê *,ñ:´ÉYX%èP Ò«îkÎ1ó["U"Î?”Ôÿö%¥j‚lz«È¨.Á—5 ðé*IA4?à ¢ãþòHëÃM©¿á yh Oi•$M Ò FÀ™NõðZ¸µšu¶‹™ªƒ¬ñøÆvB•ZzÍü}6ˆ¢ÌÝk4þ¯Í‘sÈȸ6¬“ƒßSH훂)à§Ð­ß5Þ³&<Äó°]³õŠG‹æ¦Xó¾è‹0ú€øŸú:¼ÎSÕƒ4-ö˜¦öBÄ¿6¥‡›Yd¬“jÑ#åÒ–áÆä$dÍÈÈ»(óßYsÆþ†.nü×FEÒcîgq·Óå4̆[uJ1[bÊu¦ušrÑ};{þ*+)ÞÆv°#á0p¡ ‚lßýÛþ×3xy×¼¸}<ÈÈK/8:`´þ¡¦p_N×G‘èíq‚}Všîà€×~_mÖ– s¼Úl¡jðOÃj QS9=vº, $CÇnĪJ‘†–AM—Ëý4ž{Ì\" ¾4ží`Z§aþDÆÆ¥æÁ/J²ÏÉa¿ëBü­×Ÿ8©e¢MR-ì÷½^tÖ3º‚Œ¹ãÏ”Þì|YÞè ,ŠÚC4Ø~KfHÒÿD‰Dü9¤BtÌÁb÷nä |¡êª¸¡’ìVÑNrIä}N”ưÝjyÅoÉ 0õ¤ƒÇĤ¥˜°è${£ªü×Fò„b!š2^'@úÀL}k¹†„êŠÄ×B#B‹\¡Àœ FŸÓ‹ 6`¶±9 Ù§¥•·áB‹ÃY‘Øè‘jH [³ñÛ£åî›x°;Q5Çd’X–»‘~*L•Vö¯úAÌæà÷ĨÀðwë<Å5Wæ’ ¤ êlµ”fjŠ›0¯”¤ŠóØZ|~· 9*0ýŸÜ·9½Ê<5¿e;ïD(Ä?éG‹RËPy6–¹g‘Úϡ܃ôYŒ¦Úm™à†ér7ò?£J’%dªl 𨰠1-~R™ñ¦‹N¬Ðæ_ûNº+öf3QN¿“{Ëà’ ŸMSp¹ÆG½ç/4uÔ£Y¯H0ªªng²Ü§d®“¨®Ù¶ßÅÌÊåjœ×ê!É¢ü×FúŒ•Sw`ƒÒhïÇQT‚ÖäÊ ìœBÁŒÄì$´Á((ŽGDA °ü-#Œ1…Û$€Ïu¯²ffî (f9íÖ#]æŽ\ŽS4`ðgŽÙ\?Gmâ÷{>SþVB:Kدc>ê¤ÏÅšCXÕ—©87°+Âò°àÞü0Ïs×Q%+Lxä3ªºB7C;UŽ ×W³Á¬å— …D³Ä'.;Æ¡Ì}’Ú{”ÆÀ?_ÍfgMâëÊ-)ÊjËèøj0æý{.}¸“3£¡Ò” ‰ùŒ,©Õ.›öò½u„}޹͎^gôy/d¿Îd‹‰›Â‚´‰SÙµ·]Aÿ,V"r{>RŸ¦ú†¸é . 9é#îæóC:­˜ÃØ~©#jüÖÞ|”ŸI$v›wp°•zA˜®štƒ_·ÝHÛ½ˆ5X:½”]:te1&Osþ0fg´ }ua²¸çsêù§Dð˜Än,“ñˆìf­eqj‚¹…„5ªJCÐ@ïpÒŸýëãoq,K7d­Mǽ}ýGžÝã¦eg¯1SÚZt:"Y>ÁøvÉŽn™ªÉUÕ®¬x“'l›Ó“v~hk&‚j<¢ŽvBx+êp´&!„Œ iÁRHi5£HmwázÉjähq÷üÿ+¶^;aòôã .5Õ5Ã>ô¦ßƒˆnú Z'y´fŒV¶àƒë!òmPiiêÀ9 ]üŸ×ۤ𱠸sœ&bäµ]¾4óˆûµ£LCyi8írÆ2OggSß›O!$PNŠÿ.ÿ.ÿ.ÿ.ÿoÿ€ÿÿÿÿÿÿ ÿÿ*ü×Fû¶âÊ 䟳;Ž[<Ô o?ë€xæ¶îªCu‡¸:G²È€ôó«uq¶½êp‰Â ü˜IÖ‹«ir©Ã¦Š›vpútl2ñ“X³nSÚ¹Ö‘P7e@íÃ4éà”c3Hãä2—ç¥çdd¥«'s1§z+ËkEÌI¹æÇ–©_¶ð9ÒËÄÈ2¡0„zóŸó¯ùw•âÎD|Ø8´Í™Ï¯Éʽ’NÉó£Î,”({1ÈdÚ·ÓÃ>œ›Ì-ÑÃõz Â㯒[óE*¸9S n'Çà°vµ¯ˆ§È~-Æb°Í˜Y[I®u˜Q$Xúd>kƆt¤¡ñ6QnèJìÇE6öļ"ËXÝmœvÖ ÉοI6@Åx1;Ç®¥3úü×¼Vd1ôîóI»>­VÆÆ ¸ïoð&UÆÖDÚۣܙ I·ŸÜGO4žë^X‰êÞ­,þ³´¤'‰å}Û?÷올̣ÉYè$¯ðY #2EŸ ÐmÎŒæé-j„×ZŽƒ7˜EøsÕŸÿ}?Ç›±ìQÄò6»Ç…hjÀ²ê£!O±¤—B+‰}½9s¸Z,b›ò--ú¼„.á tB)ÑfJ¹ q§®}X`1++Ìž „ŠN¨á¸,ŠÂâÊ’Ú^çöyî6P$®'ÍÝ!¤•h‰W=‡»ÿÇ“ÐDÀŸêxp…S^ÜëS…D÷ñ—,y—3ôˆ<®d(:’vHÓË@TüÅ.¶HH-æˆÑ>¸¢Ø²ÕìÜ_(À2:¯Ú Òü×V$a8fË9 áŽÛ“Þœj~üpëôa$°LŒw%ÌzJ¡S;ê‰còß+„lNèécFíQtk´Œ»âu`6óKðïáñŽ2SèùD;Æ–-8Ú†w4FyPçÏLðE÷òö–ËÛ¢¾ùšÐ¹”"RýÏÊU”õ9°‰!èÃÕÅfTHXb[ÃTAü·r¼íÕh-:.ŠMÐ/[ÉgÕx¼¶Ž‹5`T½qBCåg.ŠÛª%Ï*Fûßú¼…-õ+Ç: ¯´Çù%4̺Ç~©{©C2X^É{ÃÓ ÿy°¾S¶EÏx¢‚¤¡Nµ`%="¼þod©¦uÂÂjQYCC_©Ö\é‚ê‰Õ¬Îr3ï_ ¼O´V~:烀Iû7WsÍ`Rüþ4ÊÌ…Š9s?£Öàˆ®ÍoÌÂû™þk÷R}ê|´…_°ñ‘S.KÔ»,öª`­ïƆ‰UÜ@l$yå-&ÌêöpàΑQâ¬Í{{2‡t_j˜èæ× ™b¥®8ZD{¡ÏKïÙ’Vøòì+ŸxýdyN§•¢–ÊG¾AwýòÎx¸ÆV:¡!½n»Ë>æi‚GÁŒÕOÝUcü|?vøávEåÇV-À&yórFÔ>ø×Ü|_.©›’÷‚Ó4w‘wÈÜ|V15F±þ~ ƒõéuý²€„ÉèÛ¢ÓA؅옯èv¸#4«ñIúùÂûJDíÁ@Ž;&Ÿê°ô-($¥! ¤^ö‚ÏA~¡_ðO‚É(Zfâ° ‰<šKªÙ`üÕpÙ$Ú$妆cYY22ðï0x%Ôj-ù'¢ké«ä!& Ö¯6FêíaÒ:´o¥÷Ù‹¸”–>PI¯ð—€ïDW¡y×ÚþŽ˜°Ÿ2x[g·%÷#„SÉ‹w;N€tt©ÜÅå Ž:HÕóÜ%!é`9¸.|Ë ¥L”aðÖWóº÷éÞvºÔ#Fy ’1QgV¨!ºùÈøA…÷ry¬^Zq]§7jüèOøÅ@ú6ÔÉaxNSž4e©ë¢p©û¾"B6ØF›ö³VtrH$\£\Íõ„©DùFb L`¯æÇëŸ6L0(lе88U± s¨r“V¯L@ ¸È½¤·tdƒ¸O_œÑtoiÔ#03”[¡‰äÚE¡ª—]0V? ÊIÞ Hи$.×LâÎí¯Q!ñõW"gØê¾³H¶löE%½0úÍʛʜDåh¾·”=¡6ØLÉUyT¯A&Rz^D‡üµ»ãã¾àõº_*üå@ìip$Wv%W±ç½ Û’o¦«î±‹?ã(ØôáégÒ¹|òR3‡t¦Î @³ä]¾ÊÞ§¦„ŒPG˜a‘¿ç ’¥/Ö«):@kG¢FŸ¶J¼µ®JÀ&Óàì9€¯{Òæ÷”Ì–ïc\ÆlHÒÍR·Œ!lÕs/çIIEFÊÝõ‹Ê€{7RK6Äx>X¡Û.’ñÁ²´ n8:6-eù˜@A +"Ði¯Mt*zÕ‘…7˜áG½eeŽiPÅPK˜#)s$”!ðd* T &!ûW›Å3é+š®Ÿ¿h–¦Ì³6¾œ¯GpK»›ÞŒ²Vä]Ï^®Šé;¬¨póFݘèȺ€Òžd.~M4r§ýòÑXÿ4à¬âñ»ÀdûB¹W•ΰº¶òwßeÁ;ÏIEÌ´Ý—{¼à¥NÎ%¦ÏYQ“[¡_÷^‚ÿÝ¥Ï3â®ü周éo—”Ô}ÄÇ•Øþ´V‹r¾ äJµDü“Çþ‰ a.;ð—–ÝdôáDC.vZ£%»>›ù’*6‰Ã*ágA£Çg=dDo Àz¿d˜›%{¾ˆÕµ~;ðêy´*TóyÌŠDÄæ'4Tü–ÈFz‡¥Äíž?TW‰Û½„ˆüQŒÉ~-åS =žãžµEãäPkUŒwûÑ’Zƒ Ô“LMÜy'AÔ\á3IÜ ”’7 Œ†¦W² <å\¢Åt\åp]µÂɩ˽ð¤óbÖiìû°Ö]F »ŽõqœD6JØeíµ3޲ »æ}•†ßØ.x©OÐ9ól|øa€Mí÷Yó­cKÆ 1«Db&âø)F•-å~Ú‡%‚á-È$¨L}ÅDüÁ‘UîIUIßøSŸü³=Ð]«¢Ü‹„Žå†Â¸òŽMVQ4ö½>+Nh¹2c!€Or:°r‡Ö(IÝF™së·q¥@ò·&ÌÌ÷}磹µ¬)eäìá“`)¬?Ú–•f$´BFÚå¡ë2 öäÓBJímms2Ma SMïCR}šJcBs5}ĉV‹'EU°…qAmA›R¼`[‚OmgðH¡(ZÚnUΞ( í…YL€Wé{ŒúVnrQÙŽäƒGË­5ÿ!«DS¼¢NF×Ð1Ú“ÌŽx\wVa°VqEW¾Qÿlr[¿ª@Båeì­pI$tGDüÁñÉL©K¼U:«ä¾+÷,1‚V P_5¸Ðßb#PÀ£úaêVý«ø,‹`À*çî& åËùN㿨mÚôŒãeSAÉ™Ó2M`Ü߸5‘ñxxdž[·ùU=²…ùµ^=Übj­oé%üÞNê­Z¨ÄGf»ÈÐ#Ϻ嶀TPL¨Eé ŽÓëu“µwâ(Æ8ý'ï)VAåMd»¡Áùnç]ê¿4IÊ캉ÓoéI"º9ÈÊÞlø¿aêùF|Ý3³R5|‹Úá )Ê©Tçz9¶f¦ÅÐý;ƒt3:óPùo«§‡ÞÜ1úyí¯¦03R%UHš€?±ÎR»9r*ŸSÔ®­Düdf9~9‘L¬ËaÉë"É;Þ>›tÊÏÄø·˜¶@sF2ƒþ‹œ—£¢h2”ggÄK3ø®Ð@5“nq̾è¸Q XöOa}¸ÇŠêãéø„"—…+PÖX7-Ôz,*l½º>\ƒõ[PB}¶Ê¨eEèù?ÓÃ,’yŸeùPäd² – ÚÌx0`½8ä‰*L%_tËï›9ô7:ySÔ9MGÿ,QÀ`œÕ^µp7+DrWÏQÄ’Žc^›âœ¢ŒVñô§éaÈÚ˜ž¼)}W÷%™Bô…ˆ7Þ—¼MÇ©wæÂ]ž&Æ·µïJdBΕo7òtœûme!˜üÄêEj4Èü×èðžÁѼª+§@Š.=cP~jX[¤æóËìÏ¢Õ§ÔÝcib%òãªsœôÞ¢eûÖN´”nN&üCü«®DìRJ!_½.ONvü&Õÿ÷%Df“GÂÀw8±Ö%Éž nÿÅ]¢ª&6-£ðGð«ÖŸ¼©C³>4H%¹€ûÏiˆ•ÏÎ{+±–,i(Ÿ cüÊŸÁ6áË÷2eŸ¯yvnÀUñ[NŸNúl֠ˆ…Må;¦››„f·;Ü`c ½ 'fëOÎ;>¢ó‹/ÿÍÚ(ôãÁU ,œ¿Ù4qS_$xí¦æõ›õ&䇬Àù>B’A™OÉÀˆ’Ó“‡wòjˆÃ‘uCU†i@Ìf‹ƒüÚ”ƒ5‹]ØzƒŸå½ Exá2HïN›®(è~¿ùbþß±´tE™PiÓÆÐÀ È/àa:7”3¦\»Ÿ¬È×:&#Ã`â~â¡Pг¹Ì’IØî“æ,׊C ÚôH~לǼAo+䆂ó“ÿWbsV¹Ö6Ã&@½#¼‡È­=^ðVtÍ11º®ä{™zævô^#ö5¦ j~Ì‘'âüF-"¤®œNyÓ džÀþ õ ÉÃãýÝžâÒGœ¯5óG–Zèu+*æºK6¸^8Ù˜TÂC›½*›2½Ð²u3à °½Ð¤â®ÛXàÚ/H«?ùFî!Ë6þctÃ4ÑLÖÌ)˜Ç쩾üG¦&É3ÁPçÊØ<•²Œf‰o†!»~Y QB÷Kãä‚B—?^Fv•VŽ™f{‡u‹Òóîú_äç›5üƒõÞ/(ä‡F­™{׊ Øñ¹ðÝ=IÓ]k·¡&R JÆZeMSx —BçÎýî´Q7@ª ¬\<>MnSË~ÐÕôÞÃÓH@s?5úܤÿ_Jt=2ÿôƒQú>eï©TS¡¾µž‹T9 ˜>&qçoµ0n6m¤S¹Õ`É2 nZÅÕFf¤DÞC—©Úʲß}ë7v»OggS€›O!e«ÿBÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿtÿÿüup6K—çäzž’‘Èe–nŸï(Ï6ÈÎ¥Ø.ë ºLânêNþ„@¤=¡ç#Þ Õ·[3VÀ*V¹è(÷Q³ ®n׿ÛÙ:º§äCŠLêå^™õ‚p~CÈnaÛ´í®ä#¡}³ªåªsŒ [‰·›þë“•ªïZ¬Ú~?רˆÝ†´’!O«–öƒ.%-]ÊM•ê?ë©ØŒX¹9Äí’öyý7þZš†Øz 3z ‰sÝžþ¼WÉÔæxÇô™%X|ãW¼Ÿ$ëúâÇœæ' Ç VN/XÒÀÓ·˜ríOlZ+ÒwEíu€¥N[ÞFÖ:WH8(¨F}=¢òÃ<­ÿŠqaî3¾n‘€ã2äë ++PM[ÿeõpµ ,óûÞ™!s3…ÎùííØˆÛÍ,êù¼¾äô«‚-ÎÔ_ªÚÅK1“?᱘%ÝÖºôîT WéëzIK^µ±ª¡ Ð>phaüº üìWü;-+ý„®ú¤ˆ›à:©Ô¡ý|åG¸ W7éuãIæt%ÌUÆ{HjVPôËx_"ô8»Eü¦‘¹žÐƒ_nÀ…n¨xB|es·bQ#4·^/Þë“xQ—›u¸:mû q‡†f¥e²A¤ØZ¶ j­µ•töÞÁ¼¹Æ`¡˜ù³ß°Re¿aœCÕ…É^p1EóþЬïe˜6¼—"Ñm<DL¶^Öá7L²Š,”:%ñh:˜Ÿ{«¥Ó|ÂP9»‹ˆÀAUçÞüŠ.Oo‰6?~oB_M—žšÿx‰5üÙDGª@cmvkäuk"!‰Rï~5h8û,(¾„?h<Ï.³mµ´ »ú³ õkê üìX]Ó mŒ6ðͨéÿ—‰”;XÊ\Å¢š â b½)ÿ•“1îæ›ÁPûfZ’EÇy¡Ø²÷¿Í€ž8•öÁ¸‘†=õ¡Í®ôù•£ÒûÝo½\IRqžM×F Öl!'dÀ”47ûZ¥›2,/ ·=“žšy‚óüÁù'…”“n7°“¸âƒ ÓÇÁ÷ó{ODN~¬F»4¨s#G¤èt00ãÂnŠçÜ>–ßA´Îƒë¡ß =©†¸*ÕêÛ³ív§—”Ñè£:תÞ@ÄG©éR e¸Àêt'ÿ à$™EâòVÛUޱ™µ7²›oœÁ$ìdlCŒéÉI¦l+æ ™Ñ/DÿÓžÛ‘¿ÍBÔ nÁñCáäôL?½ïá¾wK¸DI¿ã±ÓÖ[‚5Þ üìXc qî›ÓP]F~j²gü4}¹SEü™K­DwÉ,d,?]E#ñèëÄød·e«EX»ìë~y""Eë̳ÌûŠÞ¼¢wm±FÀæZ-ô†  ƒ4ðë Yš©jG0æ†k¶íÖÁf†rVÄç*jàÁ Ç+9;Q{áÍøb·IõòDŸÄíãà~·í F×Û«LŸjôÆ3Ù”BÒÜ"‹¯ÌÇ4sâ€Lòß/„a± ¿ÀqÅ“ýt45ºX7 ,Ø)³n¨­'öÕ£›ÜüÁu¯@â=J4¦f—¡ÚÊÏ „Kh–7­Ðß’+O›ñ¸šT6µ üð.ü_e(7ªÈ¼¶)´õCIä,ƒG/ÈîFÊgѬžëŽ.²7(W´q‹ßv´ˆæáéô|KV¢f&ç+J·á*Fm¿Y­*°¢MTç‹ðÁ<º˜þÆóEû—rd¸_1b¹VÇ+tqîÑ2Å!RäþT ~Q]ªtFFãˆNËÞUg´W(‡Ž ù("Ê&„…`‰œ¹sƒÃ9牴͊ –ÙE+isÙÈ(½•q´!ܺ )ƒÂçüø®Sor÷ÉShôòGm¤V|Å=‚ç¾›úMÒ =½!¨ü Jåò·czF%‡*¦óæœ(ß …É9â;¥;Á"í½OaýdÀ(‡|nnÙ«ZÚgÛ)e×XU‡—Ùó\3_w´¦Èþi* üìzš ®4ÂtvWûÔ ºã/w˜ënpÖ¼XªzÃ˵)´¦ç”OS=˜=ÅéNsÓñmYF¡tú¿eÛ¦•Hd ÊTÐð…!4ñO™õÝkZSaXvº¾êwÉ“ý}Öã¢[w© \š üìXcO e‰q¯._·àŸéý£Eçzlø§ÏL"NÕ³¯Æ9Uq;ÇdÞgœù6ò?C[p𳕷Îa‚TóÍS›Ã‚%¤Yšè³Ó¼²&‡:±säüø”VL5ÒDù7öÚ" N^Љ>†o0Þ©û}¦è‡Ï±ÎN"…Aeø99ŠÓ:Wv½9CÒ® f¸QþHk°·SÚ„L0Ÿ2˜e q¬W­®Û]"÷ø×›ÚI}ó‰ôzœ,ú]9;twàzc`äüohg}§O9ãñ¼™(Ó:¥ñÖ\eõxCâŒåËrm6$.mòÜ*¿-ï>|Y{ð" à§°HEÛrä|¨-9rZ 3kÓiàlî¿„¸vß(e¡]-’gÞ“óÚM* üìWù㦃¯©tŽÌ´rƒuÜ|Â9~¥ÞWÿSL™áÅ)YJÖ˜²j}s÷»!EРv{}W. !ÜoÃnõ X Æ Ç.ñ4äíà RÅFŸ†s²ºˆŽ¾”³}iÀܶ›R†qÇVpßhBtÚañwøŽ5ê)ÚÍœP!Åÿ-*6¯L8yv®ížôl<^¡$¢ì©úXÊæ‡@†o¼gÑ1§vKÙ©îyH¦7–Íèp\b—‚>”¾ˆ½R™i!%#B=B9KÊùdßÑϨÌT™Ê®pûÅYNåIoòŒøˆb‰C*½9ÏðnÁÂÑ@>u’Ü „5íÎ7³éCðÞ îz'öžëßû[Ùåv“Bcx.l½%‰µ  ü×G %‰³oJ}´Ý0½ž„ƒÞÞr$Ô¤O1,¬|OŸå~ÁÇk¢K•¼+ ½¢Óˆ:Æâ—êÔPÌJpuÁWdNzFîlôרTdåÐx”®hç8:»9¹Ð*Ï©"x°ŽHè>ð„Ï›ò7b•DŸ|XT:ùŸAþºC„6»®e¾ô~³~¼&|ö,=ò» n‡Î€šL[W‰_YÍMKQàJ<œ<ÂÌã~. ýãÏ÷Î<—"ù%Éh ©|žª’†VXî6˹1Eæºaøè‚•>GÀ# 4нÒÊè] .EEZõw`II²Ö¼„„@ãÜнðö2^ƒMt·Š× ‚ôæ?Ó€ûäp'Ihýeæ*v²ª˜•Ê7mêÀÞÄp¥Œß™Î\²lèÒe¦CÀO;`X_eVØúôçËd¸v’íÕÖ#Y ;0|õƒ·’oâb‘kSfmÎ×ÖHN`‹¢ÊüÚÕq–Ìði®é‹àZ-tlo.pŠbh^Y–ÚA—´õ¨óå#`Õ…Y¡áÇÉ”8âµTx“€Rw=Ø ÅùP®ÓbË5w…œ‡þWW¶¯a^’ üµ÷Ë3P™º×c†•M8ZÎ…}V¥ç;6aÓ§bkL-Mb|\ë\FÒ¹Lר’º…³=ýò,Ú«‹ëg±uùÇqôPäÓ3؇¦´] On²ª`†aÊ« /šª‘‡€æ rÍÅÓü16ã0iú÷¯XV@µýÉRÔ×vï±r5¶­ÍßJhÿ•6Ä_k­óŒœ7ºi™”µ“š þ)%eÏÑH—|¦b)¯Zwüh²!7=6=ªÜqêükb22v²I;ѥÓ„q#`B7åp7+aòÿß”Uñ*-4ÄQ4?ÇKàOô=Ò'KãvÐÂl¼¿°÷õS Me²™žu(ç¬× Úe˳—®[Ú LüÐ!Ô"òÊÍB„f…ØE*³wJq7wµ"‘R ‡*•±íž˜Æ‚™LÔ`+Šˆ›Q8€›Àì-Ó(¦yR·¥D<¸î3¹F²JD8!¬/°Ì~”!IÝëÞØ°{F~Ûr3YôƒÃßP€•Ý{‘±ý-ÿe§z¼Ù[³Rsw²¤Œ`¶«Ê¾(É3“l>KŸ™ef¢­~¦¾ð…Ãþ9·“>ÖIÅLìÜ•z§KOggSH›O!L™Àõÿ ÿ-ÿ,ÿ)ÿ*ÿ.ÿ.ÿ.ÿ.ÿ.ÿšÿÿ!ÿ%üìXbüN޼N¥¿&#ÛÛûúè€ Y|BŸ[wåPa%±i²Ëäºón°¦K°k%’û=?žÏPïý·ÒË;71ˆŠ<”¿!:•ŠÚèË‘{Ÿãñ¶7ïd¢U›bÄ2µ>ýÝ,î(ë¬÷^©s æK}©qœŽ™Uß=‰tãØ×¥ùâ¾b§ úÚ •Æ-ã]Çõy%91Ý>—>jТBDC:Ž ñ£SÏÊénlaÎr’eiÑéHš7¹Eîy›lÐÉ´¿hhDä˜?𼝤º¹E°£¯í£S¤ÃiÆ ë gŠWù…Lkø³i0a}æㄪqù)w`uЈˆÕV`XP)ÓKÐ j>D}ÕÖA[âjŠ üð.&c}äj0©@Šu]Âj_õä§Bo‰¾Ç%C·n›$»M¾‘õo1 Ƹv)¾Ùžð”>W¨Nïï)™Í¡rà8^Ÿ@„ôÌå5¢tBYŸM˜¶Aªl¾æÔ;Z'A…·íÓCÎ%Ù%˜ Ï`)œøŸó*ÏeÍ™lYc»Ÿ*ð•:¤@ÈJ¬W|ç5¯«fJZ£ÂMåJá&öéû+õ=—§–_ã²Èø?ªdj ¶ÙÆ Æ‹6Ý—™Ü®^s‘Éd@ ßêLukIíZà ØZr<‰I®«/¥±›•ïý‡” 99•…¼m|ÏáL]Ÿ‰?ýEÆKJ€\ªŠæÄ/é;ˆH÷+Éü Pm† |¾÷¢õ¡©ÍÚݵ# ¬yQX§™Ú üìXºtñ­¹ qâ´Bñ˜ÇŸ$~©¸:¾È|½J“w­: ½l7BFzã¶¸ï± Ô¥Í\P„µ+›ªãb[Ï4#“‘ Qš¾¨d3#A|K›YҽΦ¦ÿæ~u ‘ÿrV¥1±½Êñ8Uˆjýv½üOA²Ââñ:i?}yˆ$|g"É£Cåš‹Æyµd'Æ\îKs4‰`²øYÅ;ÄíÞž/}Á}-Œ7S ñèm7¬¼•DA¹¸ùvÑdp¡L©#!œ…ŠŒLhó&†ª¶°Ÿ_ÐÖ8A¨M§^įÀÖ8l %»äNïÍ\fžÿ+wkµù™kE¡®žô{ñá8ÃýÚ_m.3VÚùºÔÇ›zɶ¢QdM-v. ©íìÐŽ†ý üìXbïH°fA¦b˜P ìÒºB^=K¶.c-FhLNœ·]ªå ýåj§¶V#! ÜsáGå;˜¹ß,¸@³€dÎ5m9)BS{®Õe‡É£8ø$ûµ+Ъo~ðKšpû¼é,—ËI ÈìjGu,ôXM'ÀÔs¶ƒ¡¦Šï€I0ƒe¶Ç-ïFúngU4…cØ\O‚2fL¿ÙšHjJ'“ý·œê>!ùF#4¬þ±3X lD›HÔŒ|6Ðc­WØ`iYMâ7o˜Mv>êLƒNPäEgwù>÷7¶y=BRi•ö áP\ùQ®a-VCeËÖG„ýnb„™¿AIÊ{}È’™ŸûÒÀé*’þpáÓheÌÞ·sã%µ(ñ‚Í,‡í¹ô¶ºJ üð. xÜyø™6AzË=ÞGåÃ[Ï×ð¨¬1½\ßÍN-¶¤•OQ[O4 ƨ¤¥Íá ÕÓÑ©ÇàtÊ'EÀø›üjXk1ÃO‰œ†6]Í­0Û©-t,î8^¥½óê‰ÆØŽ¡e‚XåÂMŒê¶À¹¦úðéoˆú&ŽbÀD@ÿÄSLRHßþÖ?]9-ïàÀŠío_ÄÛUoùê3V _,\ü8¦Å€•ˆ¦²«¥@‘”Ž•®tú¶HˆÌYE´›˜Aÿ¥C0ú‚FfIMz»©[pªâºxQÔ839Vÿš³ç¼Ç€¼Ø†‚q£Ûa#yÞ'•ã;kZ›6޵MÑÇ-;˜î!šó¹t¼âÁ0lbíúê üìX]} "«ŸÒ*¶K¹éHÜfÎ`ÃkO&î6“Ifc¼Š`ïÇcâ5^o7 ÐtŽÅB/—6Æ=<µ$¯ÊÕ^|ޝ‹\¼exó(˜:N÷³01ôS â8BC¼z póÛâTæ/Û@º(éÇÍâ,£®3ei,h§Ùƒ˜P,‰þŽÄh^ë|x¢…ßy§ZI™ß(Á¾íY+äÔâºÑëxJUå«&)8´"œFîÚ\“PK&¼ÏÐÝ¡“ǺüY¦%Xñ;´BUucB–"ŠÃ¦o`%ë)ÓIúöê àËàø©M÷ü*?*”1U¿9¾Õb€„>ÈÃºŽ ñú{/iø“€]%Ähcù;oÕ^$Hæ¾LµE(YB0«òê üìQ^ 9X\¿›˜H,°¼Z7;Ù»æv_GÓ£óhÌR5zLæ„•x¹I¥ªì(¦Ÿæ'Í9’2D¥^‹ßas>¦úûöúdQ­ kFlÚ¬Ëרï:h¸ÒûîºÒðñ 'ý xBPÇ9ÎÍÀ¹©g u¢åÒí›þBšÝ8˜)šÄaü=‚²”!wïC¹ä8KÒ™ƒØ±ó —±¯Í=zlçÂ?úx¾CAÎ×N]˜ðƒ³2¯}Ë#˜Õ¶ÇýÆ¥0òl¾«K°©qþßxg†%6|çÈb–Ïåm9?5QËvpñÀoŤ¸Ïnòæ£i6•.Ç­'QÑ¢s“ùJœGÀsó'¦ÿ |rR¤ùÂ+›c}/í È—Ù* üð-„”ÙY©S´RS5¦ Í«@7¦ùÁþ·ú:‰™H4ÜBx §›è˜7¬Ûú´Ó¥ò¼“[{H›ã¼‘<•Ç$ó˜˜ŠÝæ°ã&d #bè·UÖI1‚¡ƒM4uY Þ¸]¡BhâŒyUçmýn³LÙ^G­’ˆHS~äÏE +<üe“¼Rîd»}ÒÃE/©±0êu %ऌ&oL *ªLÈiÑcj;Aü!Ÿ¹KÀŠ]sñœ=+¶Sˆ-Ûm~˜ •:€éBNIÍôÀq²™e€XX5بÀÄ=jÉ—þiñZùµ^6¥‘bJxHÔ‡·mÓr^,ï‹ÁlB÷Ð[“­áç×§]®Àô3WaìñÂŽ=_Ïê üð. wÒ\|CuxÉ4Ù“Î"‘G“ñ?¸þÌÑ(V1âˆg ‡0ô™ÍÊdŸ‡ €MÓŒQƒ‘Ç€¾ñ×£0h€´2s9+ê¾çŠÖãëox">“"‹uÄÇÁ\ÕH3H„žë$GÙçñ —Ð5I[ƒXâü&üÑ=7(vs-Âý¨Á”mI£~î˜l¾¼§  ¥?º?§Îi?јÈÒ‡û s>€hï ûAùü ÇÍ’ŽŒ¢5²0½´pNwë®ÍMuƒ¢¯%×1{4$2:ÍdL4¦Ð ‚Œ×†Å½‡œ’Ôš üÚØòÙ|•?3•Ê[­ÒÀ¹=Ï|{wßÈçÛuó=\yk-ÿ *i‰ôJ¨€Ðöðé8B®ò.þa° áð‚Á CÛô=\/ÃJ‰<ëègnrÏB¿—¸XFë=[£ö²Ãw˜ž&.‚­Dšˆ„X#¹QàËkUç×çrý»ÌI혽¡” ÍÒÇxxB±:³3IIÁ É„Xϸ´ÕW©l'²•¼AUëp2ç—C?mdþ¢­GþM¶óÉ´ÿ@F>þš&n®ƒcÔdëŸK|ˆ‹úJøDÙ†Óc’¹æ«ÀeÏ ¹ŒÞ&æ±WI¸î{Ë+T0¤Ötö0J%¶K éÔàz-j`‰ZTéâ ègÈwåçaOùÃR›œà”Cÿñb HâyÇ_•ös~ð‰‚-ÿ¶–9CMfÚnÚŠDùc•4„fkÌA÷¥k.Û3KËMràt½ê†+ ¸±Ü 2€Î 'hÁ÷ìÍîÑ÷Ï? 2N”ÓpÚ¼GqlÇò‚Ùˆs«^kÛóAÝ’ü×FKù%e+Ãr˜£ba%òC9£n¿‰{h:Ê<¢Sf‘`Õ¥›l"ÌhÔ¨&UM_’³,]GL­m€Ý±Ž+…¼Gd&åF–…zGÜfï¾ÚºÖÌC[N½ L+Þp=1`Á0Î:ñ6„„ü“Τ I…|„s®kýFp±ekP%ó²çIK6é•$ÅxÅ„-ƒx'N0£û'ßÑ?1î7Ì3,Ÿ u‘==1÷+,ä=ÍÚÔ†î¯ìÂ_×Hv›)2Y`câÑôÁrø¿™`tºêÒ¿ wÅéXO1›lm<•¦“. \û@.i.”•iIïVíšUi6¸HN|Ê­ ¥!kòüÚÙ¥ûÉÿ›£í¿öiœÐ‚•«ØåíǵòÏŒnê­6Ûøƒ}ûC°}™ÖîÞOE]ÎÍ‚:”LÚÒHͬN2ËØ¢ÈË7ÞM~—Ô¼1™J=’æ˜ÏQk¾ýÊOk{ìFŠ9›ò§¿ãyõúŒxc5e†ò¹€J¶Øsbs§®ë'J˜ß•;Gô‹ðO9Çv¬iÉ1u«õÕønçìõáÜЉmÄiå›íXZ~»Ý—¿•Ù¥+,dï[ VD`=Ê!PÀAŸ¿bÚZ!ºgé.ºäq–§#ϸ½`g¦`"vÛ}¦¼ðîåÜ=ö‹ÃÄæÆòX°ø×—ÛTÉ®7™+ð€$®ýRvÖዜ2xÞÐÄ0•“ó²ü×F^6Ö⟒ç~t°èt0­Šâ¸g/ÿÙ9_¼yÆðÓD𱠼đÚ@sŒÞÝ›þ©â3®®W” \fGÓHºT7!ãl“åÔßp!-t—êÒÝIû¦Zk¥Fà{é\§h°˜‘ðžb*±H‚)A›³D’ÉódeÒÀÚá÷Ó°ÿ¤Õvð×bÉ ;Ëé&ë«’€ìSk€2±ŸÚÇ Rè¢í­Šøq®×\줇ª&¢ hY¹àòñ:‚(m ~DAÁÞ4Zrë4¢‡µßB2ð¬‡óXŸXô¥1û k?—Ót'i¥&NÙ=Ý¢÷kDÑšBå¹n‡NдN”¥6¸3 “ïÅjV¿ñ®ë¼“bOggS€|›O!QŒúÿ*ÿ-ÿ)ÿ,ÿ+ÿ+ÿ,ÿ*ÿ&ÿÿoÿ*ÿzÿ+ü×O·T–¥7„úi»%]éÍÅ¥îPŽüĘB« ázÈk5§øp»þãa°¿Ðuãó R9pW-°ëpwº»}Ç{fd Ü'hRanRÞ˜–ð•ÌdÜA5áj£ŽÞÉn Eg:€s%ÆrçG\›#ö°ˆª5QÈgÿÁý>Eåf0$…ÏŸÁss§OTQ£âQ’…5òM º„|úb‘ Šïæؼˆ™‚#UyZ¢HÖ‘5ñÂÌÔñ›#ï8Ñ™´ÍÚ—”c_d Ñÿ\8OÊÑ83±¿H çž4RqÔníK-€ü?(6 žx¦0M@µî~îñ 6ç ŽÍÈw¸Èf~óü×Fò²3]7ïC™§ò±’'ð×£&¿ÿ@¬;þ¨È‘FW$.eBê´˜Ùäò”Ýmé¶@´>@¶8MÚ‘¬7Þ8q“teÅ·ÿ¦–ŸàŒ“äSÓôï( Ðò\–åf®oB*à„ M?ÂÛoR½)42Ùÿ•à88Š”ziWÍÈ}°Éòä…Ô®–ýÿö/à[€‚“þÜÞð~,«ºšI¦‡ñTÏœ¯4DÙ•õÒªJÉý6Àv’•d» Þ%PS¤¦—ó_Z8Äu¹<§Q^ˆ·nT‚éº‘Æ ÙÒÂîósc‹C¨»_ —LªÀZ4÷LlË&¤·—#=~AÝìкª¿÷QZ®jm¬á[— vÉP}ÜŸëÔ©#D”“ü×GG§IÂþNfše+r\ª½ôÌÙ´Ô½4‘3Fª ¬Fø4öM±ž`äÇ2Q¦jmeP:°×q ¥ +=Þüðï0cÑ’ ¼-‡©¤ò•°ÖIr æ¯!mZyßìV˜$\^†»+ªm^I W=~F^Óþ(àæÚ•&”¦ÍþD {ø)i¶ÌÕ%ZfµÝ~›9™çFM¸[")"d¨þ+¡C$âîF6ªÕÕJ ôd‡£í¯}ùÀÈf¶ÜÝ¥š0oí¨Ôe² ïËÁ¿¨1A,3S²ÿméÀÆ“½±XïĪÉKë³ÖL´¿e4#ÂQ:ºö~iËJØÊ!Û@èŸX7µù6Øå ¿{0›1£øÒ<Þwq»Ó¨pF·s¦ÅMÖ¹e bqUP/Ql+Zì/†ŠWmÁ”{eà÷ÇS µWV¯731\²"Jë]€ú¿±k•0r142{wu>’C*”ÌÞæy^wZµ¼lEߢs,sZ ©‚JoÔòÍècöF!<ÝfçZÌõE61 +?¿ 4)ïÓž™=PqÎâWž0Û“Ô8£üב¼@N=QZ,´ Ç'/œÑ V ´ gê±ç…^:º»Tý!ßžÄ_?ðvuúÑáA&ý20ð$‡3ñ#ìÀf¡?<Ö1ä-ob(G¹…éü™Êc’•]íÒÝ£+—‹V³¦¨èhA¥¨>4„Hnúk#—,œ*Åilüd¡˜F SóL‘¶Áqp¦l}XÖ©•=êoLãöÂRö^vi”‹Ÿ˜¶ÞÆNï­£V´¬þcuFwíT` ›š•r3"v½’Ô@tÿ#ÎÆ»Uüí> à‘¤jµŒéPE›1¼‹” „ÏÈX®Øñsœ½×3P`¸Š'þâw9Þõ¿«ÌP—$à›Ýí]9Ûêsòwã¡4ß$Tzô ÅóMü²¿ä¶>G£:<å•~ H+e˜~–Íè·_]„FÿøœC®U^‡°]ç¨yŽåHC6úÝlXÓº­2³‰>ûMÒŸC%h·ß´8CaANBu y:‚òüËÌ€"°­ã9{:A‹à|4.ñߨ§Vçr«%߯`¨I™·pÇØ1_¾3ó_PöMI#V "@`SðBA‘’Ý:Å‘qM–…’ 4†¼ä!êà„ã¢:AÎÃé¼5Ù±äsþ€{Õ(ý} ò^Ô#œm™æ­¬ «cÃÈb‘ÖßEQTI¹Y ðŽzä·Bá0ÜÆ¢Íùl}{¿YÂS7A⨠´”Ë+‰¨ÎÞª…?ý§xAß³:›V¡æc˜üñ£Gªo^ ­/Âî‰c£IΪ€œÍù/ÈR§ü:)è³èo{Ö¤ý´7»ÑIî§>Òö˜Ä‚¶ÀŒáëÈM$>+ùªr™˜Ì¨«Åk“ün9µø· (•f»Z‚¥î>¤ó˜? Ô}¸Ñ•š&´-Y¯†wÍ»·‘—2tã üY¢^•UæÃQ;:Œ‹O©ªÜ®ûf‰|å+[ãêAþÜùЙcNbªWgï¯F‹øéýû!Ërt£ÿWW4êNÿ$²$\Ýv›Æ7›ÖDkìüÕZ93S‰­e“¦Ûüc¥ô~MÐ!òDÃo]ámºv ÔŸÃî|§àø¤ö³çC@¥v3õ F¡=:ºÍË©ÁBté÷{NFy…_x¢7Ñ[pé*$áñ>bg~Øs4üÚØõj+Øœôïì#Ë–!0G.iXÍoTƒ€i § cË£8-€sk& ¸Â耶¦Í#oaì>d4õ~8C0´/e¯ˆy ÕÕôYÁý¸Ö[bR{2"YÍÔCƒå1n5¾·èª!¨Ñ¢ÑMûe‹%rC ]©êrÌÊl‚ÿ¿ÄÀ0óþY1GÃSjèAe_³‚ËD õÅŽölÔI{g!&œösÕüŠ£ ß,“° ªI3â8Åõ¹•àÍãž±pÞJsIHuÈÀiÎN-¼½MÝŒ¿ûÌ5\ºSDAÊo¡ &\Ðnv+îø[‘©ìP}£/c—ôbzC®v`µo‰ÛBPeÚ¶ú‚ÑXí‘8öÛu‡JÊrg ôÚ_ìlü×Da6–øcW?š1þåˆÙûÖXB²ìv¿6Ì*y]Ö¸4%†¯šÏŒJ‘(XG+¥ÝRœs},P •[’ÿVš±u»uMé¼2±-Ï\<?ø{RºCBt×î‘4YT'x•ä‚;'ià•_Ü‘Tð,GÅß*ôO':Ð5Ðs:­|KˆìoKÑT‰÷JîÉæ¢§Þ —ñZ…“r®>ýï,PèÛ¥]ê¹±”ª9%ð^jþàòmqëT*eÏÒƒà]ˆh™ãmÜAÁ~– Ó•&+ERòÄmOúv$ä˜Ã{18 èÍ~ÆkØœ@&Îvá&µnø/Ý·êÿI-áïâNWÌcN&ú_ë}—›S'-o’Ãü×<Ú­ÅÞi§m²|ˆ’œÂrA@ƒ&xìÅòȹZû¢tøß:êg3Y –)v*·q ^€€™7&Îå·YÝý1¦¢Äa1³7¶FWÃî[JqÍÄ, D-‚“”3@³h~*ÍÐ\‡þ8úÛ‡xN«,ºäDXô±ð^ï\~7™!ÊwOªLÎyBéCã¶iôìåï¿×Ýú$¾ØPR˜ƒ«}gxh2ôJ«Ìƒ?í´MiH wIeD ¨G3( ­²ä¹ZxF¿ì ÝŒ±K÷¼ƒAnöï¹ÉU¦}YϹV!µ,x7P6Dƒ[ÁxÃH<:M­6>êN`œ:—%ÁS¥zp*ªˆYוM"6샃ÇÏv7­Ë`Àpü×CJóçÙ¢cÎL2F¯~JJ]ZMæ:£«Œ6h€¦oÏL–gBu‹|,6ŠÄRJ+²ÜGF ?Ϲ=nË*q@›ÖµÛÊEVHt¼ƒÏŠ5:Ò€a&^Zîø¶{W¯ÁXþ±¹Ïn©ô­ÛþÃ’¤rÂÝOšÝ¥ÊQÍ!OY̦BB• Ÿ-š¦SÏÌp£×œˆÔ÷}¤Ö+Y¦Å´¢dNd¨Ú´JÏn›­]>Æ·Dǽ—fÎ~0-.p„¸Eßp9®Ä&L`³¥tsèdLáM±.FŒ,• ¨w!B½V }oÙÈÃæ±|TH&9y‡÷ig+~†ú‚—!„þÑj÷e\Ÿ,0Mnd%CYÕ#žjÓ*@{¾r¨;¨À¯|³úü×BÚ§­åªŽ…ñ¡iùF€ø¿è‰_·–Ïú-oA¥1J#»a3Ú²J­êfˆ$±ó‘m) ®¹¦G-¦Ô{üçm^‰žM›ÀbÑf.û$”¡3¡å9õ¤ÝA$3ù"ð„7ÿ…w¤¬kD,Æ#þ |bÔrù=‡å‡ºwG¿ØRŽ j×eÍ{¥ÿ•æ+3ÓzGÈzÏxÅÊ©w ¼ÞR¸rrJëSиȊ=´ä1,bÓÌ ]Fú9NÃÕÞÿË’®-`‘/MB¬ ™óZ9M¿§—×RZ²#¼Ý ªèÇEgÍƒá ¸5ï› •ÎÎT—盉Ýhu•vÚ+½@}·S7YL?Ê»HªcZG¬À‘^«`šò¿êäv ˜S؆Ó6êüÚØSÁá€4Wˆç¥ø¥¸Z-NK ³ÑŒ†jòLÆò §eöÑ—¨ÌuÍ¡˜%,ÀÆÏ_xC0SØ]õvøÑ)”‚Ð`EdB2wGQ«—Û˜½U&¯n'mRÙ æNÏ[qU#&Þ"áL'Ý¿É;qi"k@aGè ³Ÿ¸um »”˜ž±>Äîj-zUWÈÛÈö¼^ëÖåÚ§0 ǯMGÔè¥÷ÿÓ¹f“óJoB=‡ó‡ßpi Ñ EFŒ˜ô"ªÒ å©cFO5¨È…׃:—‘—c±òÅš‡Fl¶ŽŸù%ô•öÓaÛ#²Qil}™®RqeW›¸)Å€elÌùîy2|A€‹‡÷GKòüR —.ŠB¯+©ö{X Ô$qUüPNF¶”Ø*³~5¤sG­ ÃS~Ž;ZEyŒ»;¹©áøhðÛ“j-…ƒ&çtò„— ´H6½í)QãJàrêö‡ŽõEŒÐnK¶}ÖF±2;/6µÏ3Òò-p‚¯æv ãq\¹ywŒcàº6 » hŒ‚ᇆTþ·W!ìC/%úß tm®Ýñ6tЀ„þZ+Ýÿ ©NyA”hK6£†.83Bvp_½Ëå‚ß{õž&£9A—5ƒ¼ëSŒ'˜Ü>¼˜ìzwXW`ÖBH*¦bB<£ŽâΛ'&œÕÃäзö--«»ˆòy»ò [)úxÜfaÍ<ü€¿ù½¹‚€A³»ÚÒ† ·ªƒwø»r ø§¦7ìÜÖQúï˜a=¬L-é­Ì*ÎîÕkJfuYEÇÞ3·“ÿª ñ  tI8q'®b~mG}Š™ü’ûHÔSÓ$YYãa^¶üð.ŒÃâwEÏï'꣦‘µ´E ¾$”üçg¬ô5ðo@ú¯PO3VÆ·©çu†s}"[1 sY£¼€“ö’ÜDÅx‰Ý†ïéÏnúãèOHGÍoEú„“ûê 3àïàv¿$ʦöb_Õú¥µ‚Z´×ü"ƒ…žÆVºLUc(]¯jöPdðg®œ©úRÓbÊ€‚q}-h¬Òi ñ¤ØBÁ¢¸¦e­R^¼~À+ÐÁé­RWnÉ9½ˆ³m:BL˜’`öÁa\¶{BvGêvÍpÔ˜úîÍ×EUŸàã]¯ÿѼíŽqÊä^3¡¬i¾ÖÙ™L½îÅ]÷Ô÷ܨÔ^b„}€½H++Éõ'+Ï®éíÌÕ †t?¶<€ç®û›ª;½ÙøàE!ßwí‹ËF½ZÒèÂÙÖ«Â žmkÛYH¼CˆóÍÈ8Z‹…¡Û Âa(EþRF3§¥ oÄoT Ìû›þÆ…0DcèÛ¿òOmûé˦¿àa0ža'áÂ,„ l’‘‡=×ynJò”.¹Ç˜»¥7°g«_?O€dÙ GøÕœêj4ÃXX[´ÕÄÊ áˆ œ!˜µ³§ºîØQ(W;‚²×ivÖ®¢;ı&[¼?˜ŒÞYÄù‚ïjtpÆ#"&‚Î3^d¦s¨°|Iàl‰ž!þÛIpSOo$¸ üì—Ï.D2ˆñ»Ì7†Ú€v¸Siï¼… w3[£æïìÌv$U ^WO£P«Ôöe+Ue)C4¦eÇ M§À-8.$df×lû‰SèÐC)>1XžÀ‘åäh·ÔæVØÉ:ßJv„Wi¹þ„¨L'#‹ÓÍ8–N ‹ 1µŸ£ôr– +ÓPf8tÒÊè#O*sÍ…»ûåÓ­4{_íâÐÓÙ ‘r^§¢uCóMä×çÜå9¿ܵÄa´eýûØÛF†«ro‰…˜èýÌ‹ݼÉ&Ð?Âæš´OÀ–鯫vÏ]cµÀ rd +Èüì˜+LÌ}++ ñÅ£'Æe nµ ~—Aìæ¿°ZLÐX×L p_ÿz~ÉB^o5Ý08§ü„ïò§ÈÍœTÃRUÛ´ÕÞσ‘ΞÃãVÕ…5y‹±Uù¨BaÚÉ9i¸üûÿq¿®:v°~o ¿”à®j¦A)$ÇH6OC)oK"”º5–ÂX\ºGZ™‡Ô.<°asáµ #…õíÂDãôDˆÝ¤ZEvVŠÆiîR&¿Xñ[V\…î' .–¡º»…¢cLgl|< “®Cäð%磉´¸æÂ’[{À,åyÂaŸ‡y`’âêÿưÁ󱮑€"DÞIGd3ýeÿ•ÂÓ¡ÇyØ^{¸/€qimXöÏůœ ÈüìQ; ®|0Ö‚#»ðnEǤ‘I¸t ë´ÀFªúÚ²Ïôý<èÎÜéCêR²Y9ƺ•<1o]ê -íÀ!þu”OÉÑ›¨Á&¥UñxÕçhw›BÁKLÐ Õ!Z2Ϙ›a¾<Ÿì$Ë}´÷Xú¡®M¶'ô«%î+uÁî³p¯¸'Jë.4­#Â|¨¸ZÒÛ¢áÞ©Á1ÈJæd`yâE¨šÁjùy1Hše˜Oå<ãgý¢Q7óægT6õ [x²©C7,$"Bºç ^Ÿ8‘\.<ÿœ—p¥×Äê3Î`óBœß…ˆ‹–£¿VP_Ï\ù£jqˆWYÔ ZUQv—bŒÙ-¹ø OggS@é›O!“}gÛÿ)ÿ.ÿ.ÿ.ÿ;ÿ!ÿwÿ)ÿ)ÿ|ÿ/ÿ+ÿ(ÿ$üð-@pv©ó:c ¨BíMÂ{™ÔÅM¸Ïgp= ;O¬æ‚¡çÏ „KGYœãJ rÛP`ôoH*ëS:é%‰qþuëF5wÚÍÝš&!œš>oêb刃%ãȦIú5æãxo”µ]ßÿ®ÿ &”›+^¾;…d»_›ë~cµrS´ªbR¯6´rºLîÌ,ø2†ù}Lu4ùoÔèÂO×r&³ÿóÇ~CÊkå—€4=»VÅÔ©Ùêð1-K™ ô (¿áër‹Ë‚ ¤w¤~C3ù'›Ux8CðѺË1hõÞ¹ãv΢\tQŒ4ñ³#ÜÞCx˜4³·ô·jÌ<z—'âJ-*¨{a†kß’¡^å§°L<©8 j¿Nj üð1Q¾D[S(agI‹Y–u ®¿äm1Ò an‡OŸ÷iJƘIΪ· ó¿Ô\(­¾÷(ÿN±ã” OR,¨ézS-˜Öøî±F2Ug¶cè·_ò{² t€Â¾ïƒxo–€¬íuÅ1t‹oÈ4Ä,.µ¨z¡ ÿ+Ïù¿# ÚÆUÏ ½¾‚¬ej½fBÞOœ¢)Òü|ן¢ Ý[ˆ-bˆ.‘ÀzŽ|J Ž~¦¤×^a€ ËKçÚ×1¢Ü©•ŒÏ~´è€ÐÃÙ‚ºÌ³3,íB©ÔÞ¥0ø°†‚>ý!ìömØo9#sù©bœZs‹Ñ¾ëvÖò¼ñm×C¯Ü°¿b¦õ=Tφús_]–ÈTm­ Qe¼OfùãÅÂJüñ¤óðkáS7ØP€â!¾/÷ÄdÕˆ-Mâ@ÍÖòÎhÒ?=ÇG~Ã_³¦’AyàÂãðÁKÓÑZwedß5å>w3† O¾üüõž½‰~(ˆF²'ñ‡XÙ¨)sÕżU©învÌ ¼6:Cü…òMÞIí)^Öâ™Ðá çäpK0´—ý‚2ãÀ‹Z;´ êÞ‘t‰åâ )öEž&6p©Ì!­#×””Å!Šžó¦xÆné¹ó%-ü¸!¾Â†E\#ð† Øö4@Ã:ò>.Û$S‘ þ‰¡ëcùºùøQããœÕLÄ5j¸æ$™(MÚlØ¥ž¥ÀöÞÛú—d9·èjÕ;V¼IXª×[ÿ|[ÜïT°31êüê¯pêIâ±`,Zo”?º_Å6æ+æ#­¸¦}Îp6xð ¾=ùÝn5 ŠÉÃ7^‘Ù,³–Äóm!'¡ú‰˜ tÙ¼ ŽK¹÷±”²Wœ0e™¸Br…«éQÃ2¾ænZäb˜Å C'Ó1Í¡wª’!Mà5“ßdz 9ɉ€þÍþ8¨Þ¬®ËÍOCe÷>øí¡ uqÔsßF0ã+‰‹¨ÈY[1úþA)ìjxWe’åF½wD2Å²éŠªŠ‹ó¡¸‰mMÿ²(„9Ь™!ØE¿ŽNû?Þ‰ uå• z‹h¡–$NRý¾SE‚noÂI”üH”d#kÀtL?BIÒù/“SÅÆ¦ äZ”ýàÛàNƒ†‚4ó v-S´ØÓLú ¸¿'9’+V¿‡¬ËsrPsüë‚ëf»®¹ºÍu­îÂtÜ'Æ 1{„žÏ‘Í &S¢aH”y`üGž3'IÒÎ :<åú:C@ÚPxp–e]9tš”‚o«\nñ™ÔˆR±=™IÅÕ†3Y66îq£4Ò“ÆY ùôª]R§‚³Ò–Í•²œQúÞÓQîÓ3Û@‡Ã3"Ž©×:²+ûñ¿T€@ÕÔ$ɯ³µ6fS“ƒþ\¯ŸÎCت´ k™;gsJ™Ë•ª+%àv¼ïvHk#ÐóâÒ1gé WÙ56œYؾEõæ¥mÛfŠüÁ’ÿ ¤Ó‹BgìóÛ†§JÆÑ¯lÑò _n±ÅðJá–•‹tž~7ä}¾©‹a#¬æÑ9ÑöÊé»±µ‰ÌÍ»²í£ì% øe“øüÒÕG€ûäéÑcÇ4ßÜ¡ß $åWÀÃÒ¿I5e›’_ó ahYdÇRÞÂëã‘Nèˆh£ ¢ª’6ôzÒÞŒà8×îmW5À b5˜ïùàÐr„Áãv~粕>) „^Ô,L_"ÞT$>•W2²»Ê“KT{väRU‹9„¼ßý’Ó2P¡ð6Ñüð.?W/¾PAÑÖ&È2T_î¸&Ùo¤EÊÜÎ+ð¡vÏ6·^=­v’Vs;ÍͲÊéÊßÈ?§ûßl™?ú{[Â6iøµ¦6†(«ŠUÞ."‡ÔÐVa6ŽÞÊÞùökõá´ÕZ&vÿŸCÈa5ÀõHJãKÓ€ÅCÔS׌–›žš×¦Ã»ÇGk¿ƒ„nOõ‡‘’`Åß Ñøë ÒôžÔÔ{V`<Y½cîvj±nsŸcK%1Û&_ ìC9Un†‘꨷æ†à¨!²¡ Ö»‚õ mŸÙäÿÇÅ("m÷¯Þg>áô^[–GÆj‡‘MqÇ“oEÏé}~ÂcGÿ/Æï œê§±®a¼9D®õ¶ï¯`H”ÎÅ:D3±²xØä.ô†âÐYmï=¬õ»º [c„B›þ¦)lô9ͯê²Qøµ'ª+®Ü²u™ûå_—œÔ \£çÕ¾+秃jHüì™K¬Ìú ‡§ò†0ß~ilÆGlU€ïB–ö¡*ðØÌYÒyÜÌ/Ã'5öÛ>àìŸuÀ‹‡^ï¹²¬ .&¬o·7Ù©~ £'Â~Ô&Ùš³Hõs¤ï¿5:Îw9¬à™ÞÓã«AÜÏ-™-€mv0ñ(ìjQêi…¿w§)çXök•óªfªKÃFÅs™Žhd#šë´˜ì÷ä£Ç„ö+_I' ¥µá»E-ì(НÍ$i¹· °ÛZ!_‘&)…Z[iÉÌÓ9°W½O)ƒn¸%ŒÒP$”xa϶Æ%3Xx©M7í²³K½tÖWrol'ÿ«Ú+ßHønBàéǵڌÆ&ðTn›D†p>¯Ð€w‡FÈüìXómmÝêȤµ•25X0—‡ í_¡så¬ÚJ—©R³p´ó5¸![1:œ#ŒÌÀJ áµhB=c9º”æ„ò>ÿs,B´«`7zï‘ÔŠŽ>±bów—ø…N8¾¡ìŸ=QÇ-hnýµ‰&?ÎzÞÌ­ÍãøVÿAæ‘][¥Xxi‰“Uª¢Ü ˆRêé¼°ŸT× í>àQx`ê*/ß„³¸HÆKù›*\Ѥòè&%Ÿ¸ó¦=LFz3D`û}¼ m×v¤LVqaWǃès‘ö0ýh¯kžÃ“ЊÎUm7'SÈ8b¤„cŸ‘eíÉU%dæ9µö¡V&„ñ"Òîép„­xç@˜'a7“KY?sâJq eõ÷ê ü×Fò²pî»2+A¯ðLAãHÒ»--SÊ Mä÷s¶!×í>d”õõú„3ŽoÖ!¬æ¬¡yÿU|ÁÉRvÓ<§_`™øL° ¦¥F ßìÇ'•9‰![aÂÍ•–z±?i@P»ËvsKü&>F`¹ªU‡üFY±.Û3\öR¥ÂS31soÖ¨.Ùhæhaa€-Iv"A§ˆ-@5šÃþ¦AÑ݈@,W©ÿP‰OS•÷¥ßªn”š„§Á}7äÍÎ rF$Ùç”·tËHºå‰TB`!2õq{Â#ˆŽy–rž:ƒ_Js»Üg¯VÙ&¹¨¬§Q÷ŠtEüì!—HÐ™åµÆêŠ“Ð§œÌêtáàÅ ò®w¸Óï×a]Õ+ ÎPŽZ‹§ÿþj ÃF1ÖQÏ7ìÄ6ø\–s4™¸zc†WI´±áU Û(AÉø…J'U«7¾ž"Õ‹.q®üÝ©2Ûsü×FùïF¥qˆ©Ý¶ìf ÂÊý`ÝÛ¶Ž&ew£+Žvœ-)ú‚± Ÿ¥.([FH85Z’©R¡½>³ +{Š•"‡l¦Mn”‚'bÐZÏ0¯³ ÿ2ak™’T=㌼ðX‘Ã×C†ƒ¶­E¯³Ô c¢tÃô-žŽZ0±¼\N  ½ÐÝHjR¡üHB^ak|§À“4Ðe®dÌCWEÒ] âVû-¡—­s!¸»òJY¼ ›¦j~8\³pHl›œÎß©´Þ˜v±2Ä YS?’I9r¿€™„F78TŒ¡Îξf÷úRE£·‚å`”èz ®35Ô¢ûb¹µ‡ì}û:â÷ê Ön¨ö·I=¢{õcéQR1ž+·hÇŸkúÓp)Çü×F^5ŠCù^.0g›ÄÁ‚Ó÷ŽTI˜mæ™=ÓTÑ™Ak«iź¼;Šj*RÝ&ᦩ½´Å©ÐÄMrýÚiOb­ ýÒý¤Mn’4䯴ì4à¿ÀëùJâ64Òoÿõ€^ñšo}åO®?°»ºK!Åئië¼iÝ}~I8(Àˆ äüÄËŒ¾`¯oŸ¶« p,Êî€ÝõSçCOÍ ‡)œ7@Y7$oÆ ‰Ä{WTÇœ!`Ü“Z.¿¹‰U Ü?+¶§Ù”v¨ÞÑ7nÄ ê3@‘êÔàà'=B8âçÚ„Ýâdlb9¡!ÞxÛxñl•¨q šº@n(¡{ÒéàåÕ–±‰9Ž9I%„~æ¬ýr[´2“ª{¥» ùÇ›ü×GÙ=87,©*“Äaœö¸M]Çn¤ªòÛþóÈÎØÕ—r—°ëYºë=…zÞä&“…ØOù¬ d;,¨¹Ð(VX¹ß$+{ñ»–·Ž6 ɯð¥|.N {œÙ5þ ñUB3^­«BÁ…ysð ®[u€¯^)àKS*\ØÌ# "bǯÞÓ2µŠÉÞñY/N(s\ +Ð){mµTÓÑ.Ýh?s"/ nõ %˜ÁÙg¬§'?2ú>g¿k±×Ƈ͜ÙÎ×@³éîn¾ÎéO?õ®IµôÌ^Ø¥— êì ü9Õ #×ü‡m¬0µ½TdŸ¹àFIl0N}ÒÔ¹”£ºI*mGÊÈA?°W‰´8×Õ,LÊ×ûHpŒÍõ{_h¶ËüÕ£~ EswÃZÓSùNèÃ4_‚Cü úÚ·s §º Äì÷s']O .“.™e9곊J>¾hvéíáœ=KθTRx­‚Úå|¼9C<Ô(x¼ÝºÊÓI© ~£}cCÇ•;íí-×ø°FôNL[,]Qm;™ZçÖ¾â¦h–ÈÄœ5H¤¾yN³k^òX­ÿÎaMj"IæJ±óä')s&üô\t¯‚Õã¿s `š”Cä[ °/ì7K3ü‰îqTʨBÿ ÝÖLÿ0øœ}£r/1Ñt«P¸-»„SYÆã^jt_BE–h' ïÈ"Ãäæ<äwÉr¢ük“§‚¹¤—õbNvï/ÿZàêÏsP ÉÃOggSÀ›O!î{Ìÿ#ÿ$ÿÿ1ÿÿ$ÿ+ÿ(ÿ&ÿ#ÿ"ÿ&ÿuÿü×Fñü žÛ"¥!ˆL×Ä3•ò˜C†Î1f–*"È,–â «xÜUF*kK˜\#°~¶ÎCÍ&–°aF¹¦äņ^[Þ©L|¸õÁa†–_Žlô:ÈßÇp . rÄïQ;Xq@HUbkÌâsÛ!$&»2D¿Çš¥‡It:"ÿŸ_‡q­Ž%©xp'ÈÏ` ÅVïþid|ߢ=)Xw¾%ÌÄ‚„õ㊮T§ŸâyÓÝ‹{&iÂÄa3ëùв3yÃ[@6ÐÚŒiˆ›2dÓ#ü×±$w)“°û”¯›¨÷à˽g¾-›èuAŽA’ÐhÁ ÷éîÍ7kévOˆÚn§ ø“p¶é«“¾0çLøµŽ#ß3,Õ¤ ²ï;Œq‘--H)ä³ù4ó꘭#É›¾Ò‹oÐvèsÖêŒÊUD?‹üQ؇UÃìÀÒõ€gÀ ¼BPg»~(ö[ÇÙÆ~V| ¸±ÞkîyàvÕ9ÂgrЋFôp=ThÛ˜ºcnq´3Ú …¢d_|°cò‚—ÕÚ Y’ý`˜¥„Ù*kKƒˆz–8ºÍyEù ¨¶œ“:¨ÊrËUØÇbtïÀ™^$ªZžM¥ŒHˆ™a ÏÚÀV“¥I‚NŸÞŸFàR×­O~4™¤ìúOú]¾5ï&ââ'®7äVÆp ºì˜ü¯TJÅgÝôä2¬åu«þ—"à<Ÿ¬—$[>í~½m‡ÀòQ~OׂYNî’lË`À¥z, ßè”A[*mì¦>g߯fÐ!%ˆ_áÄN©¿X°ë½FiK°yid²K èmßjÁ6§º[‚ƒòÛ0©ƒüÕTÚ8Zá6(+ »^Ò1b¯,6ÆÈ£ ëWiêâ0H';öÌyƒâ²P6]\î¬ï•ðØåô]¨fîòÒ2µ’öm¹þçU(2;&Š"î4-]œèDt¾ÅÉ)p½]ýÌNûHà@ÃËdA}·\W™y.Ìá*Ïõ?%¼T6~m†GëG) bBŠsÓÙbíÏúµfBÛÛ=ó¤8^‡_Æ]jǵÚtC«¢ˆÚ÷´@¤`»ŠLjâ/ÑdÞ²[oݹóE^Ì"¤oLó p]ÅàÚöty¬8xÁ’ÙªìêÇò†@Jîq+ü\ÁÍÅÙl Q½!bŽKíâÇî3V3ŒÕr¤Ÿè§úŒ*ÿò†$ü×BÕëh6˜ÑfÍÜTv§ ¸£•àêfú)ö¢ýbèÐ 18Þ²€WûÚìfÞdI»ƒ9¼úO ífIYg«ù Šsª±n†Í2ô™T»¶úÞ5ÜP+ÉZ„­ eN µ„êôý‚Õ6N¯³¿ àxËØZ¢³žî)ø[¿{ÖNHñ#ãèд®hHÌŒf_Ûoº‘KÔAÏ#œø|(-£ tŒ:é=Pd®_t7ËÌè¡äGÕ)òrÛ%NÉ«/ËB¾R¬l’(c *™ŽpRÍGÚ5dRêr !ë¯mòCž~œÈêtÝ2?kÀŽ(–½a!CúѤçúØðb\/ƒIáÚOO#|,áD¾r E:ÏBûúåƒÎìqM Z”n u Ð¥#üÖÚTT¾=§üs¾¹Ò©Œˆ ëý˜½¢øy$W5HÈ8FÖö?““ñ1‚ã ‚ŽoÃgìéx^Ì}§<âw4c}W6ç œü²Áí¿tÀªYs êÏ’›»Ÿ†6TUlY&úþƒnõ°ª.8¸øD®a¬Y¤'ìläžÅw3ÒƒÖÁñËùpc`§†l»ÁP(ä’h­F¢B)âh31ϥуÁ+~°a À³óÂ}¦Ôø\êòLq ­•8,«u³ëm{6óÝÊo&Á@&²(u!•ׂbˆR¶4óxv«B•-6 JüìWð„4×PšÞQÓeÐ6íUÏ"=Ä`’. ðóå x¹žž¥BLgec bƒE57 dYäÁžÁ@¼Ûã ù’¿|ñQq0‘ˆÇ@è \Ð囨Œ%µ!lŒ´Ý_õ*¦ïìãså(Îr6§z­Õд•zúPÒ³DÒMs§úîYÔýÜiªKlïAìêl‡b®rU¦ÃzcC⫪ÖJ üÀ+}ÄÊþV‰Œ§ƒ ýYjEê©M ÙÇ¢¿UI"vnmﻦjßä›üÙr]uÖoÆÍ+Uk.24|]•é…”aó=àß9ÅPêøŽèøo£ ‡€†«µÜl»ÉT½Ë·D6 ‚àe_íPGAç9t)‰„¢O]<µ*»‹‘aá+Ì ë°¯¬¸KgÊù6.ÓX°‹uºxB_ÈMTà9Žå·³m*ÌÇVÁëº{œ¢šÇ×ftâs‡Ü±cHÉQ|¾i€OÁÅIõê¥ó¡??nl·01gHe+Ú¹Þ2¯è.Ù>ÑÁmÝü¿ÿ|O’øë:•¸þjËÖÞÔ^Ä1=9£¤ß„Ç-þÖ1èê ZŸSçï–GйÊy¸5 ©—·“Š š=îDD°^“Ì–§-#_nWˆeóŽoÞ±aË^ãò¤ôëd`ÅÙá}Ø8g¬d[ò^ˆH”V£MDl?ôçó¸(­¿_3Ũ'&ßĘ`qÊ)¸Âf°].ÜYí+À4–7Cy…áOå¦/ ÆãJ€®Êk1ÿh >(ØM_ %Ò¦o¹»͘–0ŒNAXJzÈ›oUÈÙÁgwj­ƒûßåë‘§¶U®ÕÑfö‹ÄÙ ¶ó¨e©ê ŽÜ¯΄VâÔøí –`××b­º¨‰‡ ¹ Ïë BiOggS@R›O!(‹#Æÿÿÿ(ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÀîÃÿI7 ÙÞ·³;`’g¡©f<¤„§<ÜL;ŸrGºq¤ÓpD°€åU»ì·ÃUÃpݿз沵yl±¬Šù]ÄJ†IV\K2·ZH§‚<"Ë©ÒEÈü†{ÊÔ·\Y„Õ?ÌSõ”4ådöÙÇüMLüvñÓ+o÷r·ø\Ô+8n{¸ò±ˆB™ûüNQA»îɺemîݬäåÝ mÁ!è€8˜1hûŒ¡ÄŠ ‚$SDbÂFP÷\…/W/jŸ³shXsãmˆgý•ÔWPÉÒQÜ ž/vRP‚g1qcbÿmžÕ/ÑÎô›¬&c•ÝÖ*ĨH)…Ýó…¢Ë’­áÛ†ƒL@ ڶAü?T\§Ñaü.yãBŒ€Kr*íºÐ¹§“Sñ}Òœ†Bΰƒ¾¤³—ÖÏš‚4–Ï6Sؘ‡t¼]nX•Øõ6¢¤z]¥«Ÿ¹DþËÈ|^¶‚'ì1¿ö²6'ë›…nÅ kQ&ÊHëØqô¡~%µ Y” qü”¯wÒL|©'¡2ž<¾>D#",ا¯(D/Ü×R¦£÷qw8B‹ù‹‰Ýkñ`&vd3k‡tø’Ñ _󮞲ãF8k}TE§p Š’jTëУFIr=\NîxοvÑ+oÃÚR;êÖé]K?Ho‚*^“Òí¹énRZ&_øwmb]ÇüÚÙŒµ„}U¹‹Ó*1…|f eòiV÷X¦é}LäÖMœÛɆöñYÛ SPˆ…v¼tˆë7c4 AÚC·ÌTšØLh…üîy‚ÜþËX3saÑöI!Pé ÷ÐóÃ*ÿßø[Ò9Ép¾Ù¬/ŸŸÌçß))Æ|4óS»þä½µ¯){êb.?hØ»þ²å›ˆžÀPþÈP‰ - àúùGIÆ“œ4Ìl;ûˆÆMxö8[©Çà’˜üÅ0©‚~'W©ñ*y)»ÿ‹ªØ.c¹ëóŒ0ãDÔî1Š}Ù~{åïÿ:žî Àަ‹CùF©`¬¤uÀ7öÏ[zýËÕ—62ˆTwb Ʀ”"ÉÛÿÖ6Ø!6È÷ö  Yr…üÕcØì'l.›aêÞè}}LübÿÊL¢ÿ_eW*¹CssÔÌäd#4òë×6a!¥ö×ïmD­ìœ{fÆäx™åDÂFDâKÜí1È‚•¬<š GöŒÒ¾fµ½yjÊc¼_õ•¹ø‰ý9(¾+³õ¯Ñ¡ŠÒ¿!ÿ´cšõ\Ÿc¡þ'8ÊnÇ|ôÖÌÓ£·ÜÌtÆa¯hæu ‰]¡póW-»š(zÃmþãNçgš=J¿æ¶d~vú—±”âXŒa{}aCkE--úÚ,ÿˆ.H0FE°ÉèÉdÆï†l}0¥…Ôº©‹Wß-‘. zÌ6‰™ êÿ/6,oÕâ»DP˜½™Æ“Êû,B‡ü×èë¼*@î°Ö¾Ú \eUL¨_/è9]²ZîsZ+,…ÄÏ ³½”ÏÌÀ‚äFÈOštTIMÙux¾ÓïEšîrmô½ŒIFÈè|Ÿp³™sME×T•Wרa=Idü ¨Un¯q»™Ké˜EÄ“YsNIgì\QŒ<Ì©r¾QÙ‘Ç/&`Ø/´S_¼Ó9#ò3ªëøŠ:*Q>fëÏ_Ç—m[ŽªIhš,nh!`˜pÒéÞC¨:bÛ1Jîϰø§ÊS´ ÷bZžƒHEŽÙór_÷©©/=DÕ¬ÓöŸÓÝÖåßÞÍnò(ÂålE¬µP”§dA<!ë¬;-{›ØZpòy†2råü^©}?Ö6È{’Ú ¨‚ÍGû©ª„¥Ú†ü×DaGË÷¾H™õÇ„,¡éÍŠ€¶¬ý£âÔ,YßZæä™û‹gTfV¸ñY±žgÉ•æl6jÇròõ.†·NôOW}Áîtùÿ**µÙƒúÒ~Ö£"6ïÂÀHÄ\ä¼=QËÿæ² ì½µcî)|Pd̵=\£ýIúàL4%òh\YÀÁu§÷Æ1YyÉEA6/+¾Ù Ë iÍ7Ì2"Ç ëXZ¶~ƒ£,+WM’/Z×°òÞ.ÿ>H¬÷îȦ–ΛÏŪS ÿMΡ_¶I‹ÊF0÷¸ž-`q«âö|uÏßÎôÆ“ïAž¤MÆINm[ç# ùÞ£¤µ¾¼›™5-¦9uÀLë?–%_rõâëåïšI é9ÛjJ@Ínc•ІüdbYe îÅ·Ç'Îeç•DniAªZ“Pû+ô +„mí*–ý‰T5 |“¹ÂeHWiÆ7àŽ¼0Ogr—PþÈK KºÑS~þÖñ~£Îiw^½C/’ ßu¥-ó4&_F¶®Ãê>›¸&›Epµ¼XgþJÑkà•šÛ§È1YÛÀÁk-ÈÆÁàjxkH£ó!•œÌ6ÊÃf®âýT½/Y¥’¨Ób^°Íïž7ò'wmÉ–ìGjée'P+(.”{þ7æÈz#òE¢S Hç¬J/ÚHB\oÒ²]C2õaøò'MΛ™/Ž"èK®=0V6¬ášÌÐe÷ži^:ªQÞmÛ÷”ÅXŠ]·±“ݨbóÐ…s$cüF°KíŒúþÿt׋ãQ¿0ê^7’‡~Õünñc°^Ç[Ì­³ Vc Ì~§cfºežÕÑÉ·“ø"pZÎÑîÑ~J]_C‘¤AWN ˆ¬ø£Å¿Ž•¡Wi\Pñ»ðÙjXý ÆøW=½Ÿ€“t@«J,»)dê)`ˆ¡bü‚fÜ2R˜]2aÃ~‚ªbpŒÎî©ê†21ËAÄy€j ÚÍÏ™$£Qâ)$S\îFSSq ý MUCÜ7˜µ„ñSÁ…äãçÀÈÕ¯`Ò\h ¢´`âêõš’wÛúIuÊ«ìÉp9],½C¾ÎŽvgHfŸ+$ìBJáï'P*Ü{@™Ž·6Jáµ²Ábìü’þ@&EônúøÛüÕpßñJo@¶b0´"§VWŽy& CŒ@ÅÝjü Ȼѳ>”¥Û4É= ½ØG,‚/Ò¤?·—‚Qy|Îè"Ö)Zi³âŠ&7‚è Æ“¥wøNýM$§,z?îÞWöë=i*–xÑ0\XmW¶So@©ìšD“Ügú˜|˜ø—‹@5(↣±ÀpI=ìGî¼— šœ,Ëf‹«¶³ã‡Ë[|å²»…_bÇ¡@A”6ççIB±ôAÓQ]*¾³ëÒ* }¸]g™ß͸õ¯¶þ÷G}Fn\ÄN_C³ãÑ•–“0ä†NÜ‹‡& Æ'a›sYš`¹€ìhýé‡c¶O’Œ±Êi­âcù!*Z>S…2ZZÓ¬[‡2xÆwÑÕ`~Û†üÜO£Fd¶ÞÆÇ«vŸ?˜=QÖ‡\SÀ»Dr#çšœ!x^ä;/囎§†-2›0œK à&jËæ»¦ô´™LÔG Ì´XÖhm½Vß:>u‡íJ¯©¡d:w‰ûYvgà7}EÔÒMÓ9×;И¸TÌH‚$D–%/K=ë´~ÿb3ž(~õ¡h”9·C’D¨VIv%£Ü˯ÝÈÀ¡Ä«Õ7½Ë³üúz‚=q¯cý÷Ôû×ÂÀ–\R*‡I÷FÏ®ºÃ˜­On„î“ (n"ÊwÃ@£ ý· ñZAó{nÏÃí0@ìÈúZ­oáì?zO½RïƒyÙOÏAíp(Y¾Vç•d*/a¸%_}Ô,ÚEmIM'Ë<„ç‘C†üÕ£¯-Âê¿ Åºôë3žÆ«P:ûTõç«çR +^-êW=ý¢Mÿû -ÓÏÆµŸ„õíDO#Q›óðè}'N®û?$B¦ß6 y–Ûè+¿Š­ŽCß¿k8&½›W\m\æz¨\]ØðÈj·JÄûƒöqæ¹ âïη¥Ÿ„k%û„<*óŸ ]p.u_`žÅôYnpæ×ô¨ŸmÑšh¤=‰»Ë)2­Ú;ìÙà»­W-_ñ™“¹ày+xdñÕ!¼râ®3ot}²{K—¥Û÷gl‘9He–£KßG´àQº¢^å~H³ÆsJ0?Àçx7­#-­ô¼ÃÔ$Œ[íÞµ£–Ϩû[gìžËWy\iÜÆüÖµyX¨=Uˆÿ<¯Jx€´;Í`,¦PÆûhêC“¦ï~üIìx½ïþÿÊ“\÷±3ÄòvÌцzGA9ÞX™`8¦wA^cÑUÑiLJ4ö6ÁþáË<•ň®‘ ‰}êÕú%U–ûJ™v9<H˜gö 5R0ÕÜð.‡£ÇM$º”nK-uvÈ”Ex<$ÇYü|L̲¬fÍùŸ—ÛÝ¢f ëÒÆ«lâ*Œ±±°dUe/=lˆÈ'©.¨ÞVƒóüúR bA@ˆ%§ÆÖ«ï®váém˜iÜáC‰¦mŸ ”QstmÊ%Š+y«¦Òù£IiÅ$í*4"½ÞcRdw䟈*£³Û9Ž º5¥«Ûèp[°ò[f¨ÏÌgY-œmuHž3†üÕv^ÚÖ‹?0Uµ„ OraÉc§2¡âºÍ?˜Sx'5–³› 5nôfOh?yÂzŒ‚Ô|PÌC}åO{÷þ CÞäA•?dR¶p½y”iFb×ÙÏsÅ …Œ>“«EõÑ¡¶1J/ñÙb€T\ÍGÊDñ·³³œs·8ëà ÀZræ[¢Ep„sÔ¼u… AÎ.”J˜.5SuÕßY :i?áîÊÇèÞd®¿G¥wŸêçí.÷rád ÊŸ$ëXa‘z~ |ÄÝÝû°šÇmç“­…v r0VÌÄ)„…Ž?f¡/1 ¼/WÕwƒŽ&³Œb ÐŽ…À~ϕִ"ùVÝøïgL!2.ЫuËö"e[ªœVJ3ÞÅhtð‡üÁ¬b\áj4Ûxoh‡™"89—Ï’x»)º‡&‚Ê¥«a‘öSuwCÔÿ@> í@„qÀS MR²»þêd¶å†ê‰D2œ¶G¿^ßW"†–,”,vÐÂÎ|ÉitÝÑìŠaD¢<{Ü0ãñ ÷L4S­³,ˆO`U¸ A9uÌ—ãqQ&›ðy„2q„â¢|÷ }S Ç9¶gµ“àüW½º&lLO 7f‘‚ílÙ8&.`ï/ÞR.TËã-¸.¿Mhòã¤Xš‹L¹®â©•ÃÜ›÷ˆ$‹«H—¡ÃE›S`l`Ã$Ð`Å ¥žG\r‚á¯!Ù–HPåû½<áÛEž¡VlòåÂnd#(”Š`N‘kÖÚ‚Svìó£ÍbƒšÕ?TJ#aÓ«žÑ±MÎKZ ­5 ÉÏ/¯‰ûQt ÊþåÀ|²_Õ/+#ÔN»Ì&4l‘«ÜõtW—ûšÊòüÛw è|æ:ûÖNc·Zã/`„÷Óó3£6g}r˜æ~Û¿iý£F€Æ£çL‰fÍ€ã 3çþÂ2°œÑÿÜDÍÅú™?&’¥z#È×ÐÀ³YƉ–IpCÒ"‚üÀj"Å$í/•1sÄ„;¨CášèÂ~æ.§Z.žhû1 4ä¡ÇYÜóû‘Cíc”õìp\÷ÒºÈ ³Ú½u»Û.[4Ø‚ †6>ušÁ4oôáªö"¥Ú+Âf岕›õm'S(‰FI¿Ú’H‚Êé”ðx3.,kðèjº&FQ¢ãAepELïÓÄNáõWM¿yáƒ=½§îù;>`Ñ8i‰Wd8×ptøš=ÅßÛ>4ÃW§ †Cnâ±å,ZµuX{aîâ?¸® ¢ Ïþä’,“|Ö½j¸'OQ| xV)Ù¡°"º§ K‡øœ¿]ç6<0U.£èæhyÝáÃ7Ϫµ5íïÀÀ±ßN#¼}»N6\™Ú¶YTéì³ÜL‚üÅ8Q(+v¥¦Ñˆ\®ÝÉ[wt aDS ]Û.;ÉŒ±%œ3x·¹< ®g`]DùKJ“üÍ’Po€ea—5L’X'ÏNë[|áHV¨èͰ:DAŒI^º¢ þÕàý2„²)“¬3¶LpÙ9âòø˜÷@?Ÿ4y çA(ìqúï¸ï³ªöýãã•‚À[gýŽ×˜ibÁx“E:)²Ú‰+ýØÓ ¶ÍCñ‡Å€}"¦êùvŒjÊ*@Ž‘ˆðFÙ”=9_f9ѾØuöèºX*Yø‡A±¼F½!¤Ç3•˜*\²Ùò™«ˆý} •ƒû · t3ë¼ #`úH™ýB!×ï5 xS1ú-´%æŸmìð> (  “–HÆyƒüÀIlˆŸpJh%ïH·Iéu²n €0‚.“ã;µ°´õ<åug Éfì^&}™oˆZ”3.h S<­Ø?¬s{Ã^ãü‘”~óo¿“•±@·š8BWS¨cõAI$ ”ê–žíMgÆ!ms'Ô½lÛÇÖ–ß.¹ )³|Ã4«ó RÕ ú%$+š«µõXŠO\Ò8Ä‚fJ¯FÃ-\bÿ~¯c^0æÔÝF¤nN§1UÉ»ëžî2´“ C0 @ËmðЉL(©•Y Ó®¸䨰íòP@§ƒh¾ W>á{I!Ê)ºi´Ù¹þÖæîТa†v¿\š,×ll¯¡ÎÚú<óÒ6îçô·9gMu†qÜ–«4®)¿…‚üÁÁ71‚xGþÄGÏˬÍ{yh³JÇÀr\’®€ ¡ ³wv ¹~þ kŽûÁ´|Þàš„k¿{eö,isèâ§åÈ8×@êöŸ +7'~S^„aÒio™ šÏ?íp ïNôhÉüÈA¾ÆË¼CÀÓ=Á+y†Žoö9RjbñYCz¿-б#…··g"8<“ÕÓqYPeùnkS‰Öp.¸"aAíðÜ‘»¨•ÊÍh¬üs—!mD8W¾Clò[5׊®Ù4 L`Å¡›±Ã³ŠP“™øý®ï$ç)%çJãò¶Û˜FQNß¡|ZÆKÀdÿb€v6§2í¯õ(jø¶·G´]qˆh”ÖGõüÁî œ}B߃ ´ŠŒjËèËÏ<1F–¶G(H|oý …òm¨nÉœµáÉ„·žÁ„.o¯I Yˆôcé.ø‰@_¦7‚RBÜD tdQ±¥Áše|¤ÞQµ 3˽¿ ÀΨ2…cÞÞU.f\—<‡{Ð5Èd¯ÑÖ‡}€ôýü°ƒ߆áPî–ý{%_R5¬‰ Ø1zýÙ©g¹Cì‚n×9±E@4ð¬D0%þ›ü¾S4,å5Å£ãÅg´øi±É}7ÿÝD ä@ÃdKjN¢‡=¤™o åhÙöåôë Y/^ûºf«ñ ™ÝÁuIözÒ”à:kòØÃ=ŒjlU&àv/×äæ«$Çתä¸(¤<ÐõHÁÕº<ÔlÓÙ@øm„3[íõüŃê—$žÞw=,xs>¤·KEĸy#oå^Ç5V6VËS·Îynž[2¾æbø†_0~Ú+tÎ|4¬ž4`R,;èTøSÞo ?âúQå-ôfMXiÀ .4W.Ã8—»:\×ñò0öÉM¤ðü‹wWy!( ßþÒFá©àÇC³VqµAгhY%ê7ʯV«Á‰{Teï~»ï»ÞV K¼[þiz9oî„kŒê‚¹;y¼)‡àõšÍ,”õºâÜU2²Îé"â½$£A¼ÏÍkQ}ª“D‰2–Vjõ¥z€Õ‹xSŽúiA*åèâ '¿ÃÃ//ƒ f×#HYÝ öœÊ ù„%‰”˜7AÙ¨¡$þ0V_©}¤“$Þ#wÙàþÌ<™üÀᆀͺ`/*©ý ÍÝšÌÕ}§¦®‰³ê4Ý4._•xÖ´Ü{¨¹+ 0êÆû÷ÓK8x4ˆÕR2‹ BœÃ6Uûp[Ý âQ›ªóö(ˆ‘5¼äØÜÂȘ;§!á¡H‡sEýA2c·)ï¯Ð—¯ 6ë/Ò¥n’ëS–QÄve"²ÂqÁÚè;ZŒ;Je¨¨ŽœëB{]Ÿßq*GÀ1â±âï¬ÇòÓF‰éjÔ èÔ¢­»¬W0Ùœ¼:}¢(ƒHž;>û:ç·)xä—÷m¾ýt/ðÛBgí‘ÏK–’•ïù“<"„ åË±Ý À*¡AÞ#4¹Ñ‰ñh&Oàè(Óü*jÿ’²½aâV«äû—À'%üÞÑ7¸Z“Šôã“,Õ%)Á Ô‹¢ŠÁ C aºë˜­šçšW ¾o½¶Ö“@ÉǃE7M=瘳ô:XÌ7s¤L°‘øE±Œï~߆jX£š”|ËÆQþ"ª4÷‡báÒÜQ£Ns‡½›b'’ù¿3ìî´§‹$ˆît‰FSRŠÊ° ê¤c˨€‰~“XA€Š‚fŠ/êÉl‘—B ¨L–Q=Þ­/ðt¶N:õ¼#Ü€:©> ߣû5Ši<‡M1žÆÊSmú6¸x“ýYMäŠJøS¶Bõ+ùJróôÁöÊ~2Ä|¬a€*ò¬ß5[<Z燸‡•©üér@Íl±ö†Äš…Ù] ì¿\ó)ExŽG{锘ñjÌð>$ü󤸀W;zXvg¾¥xÝÉ«xÛê&äð,Ö‹Few­«päèA4¬D1hRƒäÌøUæÝŠyàf»­†WKµ!¸…ݹ@ àUÁÃUÏSÏ·ž§¤¸S¯•F˽ “ãüÔ¼å+EÜÏö<ùI«ü@$”Ûwý̾õš”=3‰ÝÑUVBnÚ‹*Z JYÆýŒ ¸v2å¬ü˧öm5a¯XTÖ8zGom.hªj en,ÚÞB¶H2¬>ó©¿ÞD.IóPýà•…÷Ž;ïÉ<ð²}æ ú ¹X%£ÓDcë‚–×/o%÷ßaŠEà@¬jâùÑ27`ÔµT ç]ŸºQ9”O‘ ‰¦âÃ;\#ˆsˆ`(p÷w›u/Eh Þõ,— !yüA‹v_Ÿ¬dâYŸ¦­Ÿšè‹ Ðbo2Tvëd&Œ›Uš!DÊ‘±Âkþ8Ç9ËFû9·0²ŠzþS÷Æ|úYSI—¦½(lGÏBêûÍh,‚×§ÃÜÜ3W´„½0Èf/qúP¡j÷Iÿ•Ðr\º.EêÉøê,»Â} ŠPðX\?D-eô9qBo÷ehø½ƒ£n¹žÐ‘ ÞÈî?X©0-IzÓL€¨Ñ=/ZC÷Õ´ÏÁ£GçŸÙ ,b¯èùòbþ–öýáVræüBi)~hÕóg2Ð4Øøj†S~¯iíZa8ÉP¨Äþ#õ;¾¼Þ¶º³á뿵6Õ«+Á•!@ÏŽÎÙ¢ÉõÇjtîzö÷¦ÒX†Âqc•:§ûnÏ<ÅyCû g®1Óžb/¢÷Š*~ÒùU ÿ2Nq/g¥u®êüYÊ) ìºGµ'izÕÍ ¢~hŽ:áá)¦à:NgY0}%”}fóDXRÍù š±«.ϧUÀ›²¡P£S÷È¥o[;N瑿Ȥ¬¼þ\ë¼ç°›ÍÐ8Ò}f#sf ÙÓ&> ôÞ3®_0"7ï”Ŷ°>ðj éÛ/”H餓oã›7Îs;½½œæ€|üñ~kff—“f‡´\q²ôÜ ²OggS@»›O!Z¡†ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü×W1¦¥ŸÁüÞö ÜJ¹g£©±=ã¼[èQã=¨înÿ!¨ÕÀ:+-ô #Õ@û¸u®\Ô¦-!ÆšiP´óÈ|yˆ×«>z3tQ´Ù$HD§'3P¸¨—^Z ­fPõ¹™ù Í»F‘¾S:°x²­dš¬äK0¯-)ŒbJÁŽHp-Ã!Õ¯°È‚3!`@•o£XÐJJ–tè{×úÍL–Æ[(zÄ0kšìü 4%œó—^É…Ì?'Z”J e?ãNåµß²…Lrä Ü:^§C¥>`NÇ»,ô5³¥áü¡6ªJþÈz| Æ·%©ÊÍÞ¦0'C¸”³"”7ß"G j10XI@rþ…’k'=%C{Lù†Ö¥©6³ÛûÛ…º‡üÓ5 €)…–êåÌã‰TÃZö˜4GÅ‚KêÓ¬~™Oö6óšNZM8GŠ¿‹d^¢µ¦cgîStŸI_c5‡ik¿vñkÁx¢ÿyñ3ÚýŒ¶c!‹(…ˆs ù_b_LI‰éóös•S R>Ë,pâk«ÎŒY£½íJù6½.;Fó⟀³+™-¦E¼pó†Ü¯¼÷ }?óYGNc“dZ€³–rå'·J88Ô¯ˆ²JÙn^ LÝ Ȥ#9H~Ì£~T%í°H£¢e§‹W¤Ð¹žžðëÄ·´Wú†sͤôµœ]/ÀÄÙZÇRÊ jôo~is*ÁæN¿Ù0zSáá<`KÎùX7h­f8£Â¢ÿºÔé iœ÷¤8¾iá ¿¦ü„áç==8üBhvįS`ϋܣí·×¬×‡žR˜a Á`ü6'-ÇöO˾(6™õíVà'í(Á~ ðñŒw{J( X¥]ÀÈ&‚ÆÜ$zÎÇÞ¸<ˆ”æH)ó…/aLgÕsÅñ§(C,’ýö\|_u>1/C¦f1ì$,0¢u\@mña£ž­ÿ4íâRHÈ× Ô,)B]ï–-„“Ü[fÛ½æq¤§@Õlë¿–7é´F¬DtH±4ùô—áç9Â|zò„`0Am¨×ö8´gÏ×'n,lu™všR•m°P ÊZǿȴºE1b©>±|t4«f&Î÷U– pn+”"CN­Ê¡Õc`õ•ô’ëõ Ë~¡­Ò@6gjF[¤¢G³[IwÕüß²o¡fÆ@9ºdç][À –€¦Pƒx‚úë½s,¢²Â8pJy°·¿À+L3z‚êõžpÑÊ7a£þ·¨ÖýýÂH Fp°,•†ÜÕÓŠÌúLO{áf;¦Í>ôØ÷5±ò´‰È¹ÊyL”‡žæ!Þ4w‘S[éž)U6w6 ¼¿ñÕKùn­·I›¯KÞH“|.±¦¬UÔ©\¶¢ÔÔÀ*ÃUƒ/™Òæ+’÷Z;x\Aæwå(TÄGeT˜ÒU§WÃ’¼ƒ¼šÊȦ±ÉLè®#ΕSéBÁ¬TQ¡(‹çuè²uú8ù”ª¡/‘×—iíÕä“L”Šl×ÿG|\-†ãâQ7¡øoAÃAppPj›â˜µ®Þ-õ®liÂ6ò©3-+ôMl«Þ,k¡©+ßH³ëÓÿa}á§¡Ž¼¼§ÎÓo1f<ö®*Afù¸4IõJ9ü§~l„‘av)#FH*ƒÛ ðæùŽ«ÂbUi(#êƒçÎRý»¼\‡LÖ@gäZïß{s‹ò昖_ɱäuÑ…EN'±ÍdüRÅ®°^ôƒë¢8‘$ØÔ0̰x¢ êû!ïmT»‡¹&LK¼¾{tÅ©„ò±¦ Ž£ndÚ£€‚MœF¸ü(¿mæ¹±ñ]šô|òt*¶p;P#.0úÀ9°ìQ"Q‰Wÿ¬þƒ1ޤJ5÷ùãH›¬ôP̬Ï(fUv88ä±Òå&À WÑ;4þú HxUIBoâí°À"tGÙMõM § ŽWø2‰š»î=ŒR:{¤übÔ)tž¿»¸ ¶6ÜÅ[ÌXö-›‰Aö í®0Ó¿Á“ªë»'Ëw] ããÖä³GÝWÌy!®ÏGBÂ103Óòr"ù‚üÁñÇUÍÓ$ÿÚ…–“ÚïZ)#ÏÎX·;òž°³z2$&|EwZ|$‡uÒO€ÀóÊF¥zâ»×ôÊÂ5´2ÔwÚ•.Ì&Àtňµ¬M^8}¥YÚÃwë#a0ÁížHD¼‘­ÃÁ«êâ™›èê¿XÌ3ðÈ„lþüÓZ?®%SÈžSãoDûÛP—&§¿n§úO2*5,xéòlæeôA©t!b8$y½Á[2#nÚ” ÓÕ`C, ÓW+<§ç8HÙè’o\cŒº‚™/Æç aþ#n«ûbí6$œ¥*ðÂÜÜH"¬ã8$©ÖÛG)òÁœ¿¯ê¯@éPNêØ3¨ü¸ØO>diµý|ã¾AæðXQïnèv‘6>ãà¥ï›0d‚ü¿ÿ\¿¼¥«&N˜LIMÑè²*.N­OæÎ&‚)tðûôï̶Èi£lèjUß©£ëvŽâxáê-÷òùV- …ÊÄzþ‡¿ÉýqJCé‘Õt[‘ü[ðélž®_d‹™N,ÊN±€Ì.1ÿ2$‚Š+îüw>°Ü&e¥ï °µËÍäÕ7qc|?;®KF¾2bù„¬–þ—ÛE$ðçÀ8ÝÖЊ2ŽÅSµkBå«Â?¢t-ªŸóî gÙ4‚úlgÖ· &C$™ªN°Fžg¬½Sy%È“;É–è°vPß4ш5xÛÕ&®hä~ej^)o?U– ¾±qÆnõL?Ƴä]H%é'‹²}ÎzfD›ÞÕ ãYVe˜ïÔ€ü2:߬¡þ¢«ÕÜŽ»‰,†·ki×K‚N»v®°¯x'.0LÕÞ=—š‰_Cœ•)jP$üú^o÷5,Zû?`†u8Ã’v(ÛÚ½ˆ»²o~ÂGÝs_ŽàüUXãpFæSe®n»‰ïÌÖž­Aö±¿q>L ÝÁ=$j`S$ 1¸è 4b½ gÏi| w&œ+))¦µ7/,uqå—Ù5æ“­ü^ë·do{«‚ê•{nü3Êèò_¤Œ­anß„mÞͼ-nvñÈ“”†CDÒ‚®žãÇ K½ì¼ áÔ‚aÂ3NzÃYÃ`êÏeý¿·I¦ô0 èú¼2ëx‹ýBpôe/Æ¡”k«$dâà̯°7Gb-üNv h¯6þõ R¶-xô¯ä—X¥J÷Ÿ2dT-r7æ¯VOWûžÖ˜îƒãž2ßbåˆøª”u¯s?øéæ+÷W,½'Ú¨ÀÙ4^î ³©»îUã3i7@e/–:ZºÑ¼¯Z,œtü.vfZðDPóV5¶`Ç›ß:û–šÄ[[‘ˆÜeÙ‰¼g—¤*[†jA×ÃJùB×Î…D.KFî¾4'Òo¡al×M*àáþO…Á3 ‚Ò©=àOHÝ‘ÆS0rs†·àwÁB]°ŠûZŒXêô!&ÁŸòi(¬R[Z+²GÏÃê‚ð”¡9r 7H†î±â+S¸ÍÌ‹òÌ9m|UxíšÌÑJp´/<âP=/7~¤‚-¸aª‰q´¥"O}–LˆÑOÈüÕVƒ"ͺ:›9ûïñ›]™%Hm½qŒ?öš‹¹ŸŠ›•¬‡æw­JRŒêeú².36‚ ¸nÑø“›=˽»†R÷ÊÐË1‰¶È,Æ—ß•sÖ»ãRµ„^îçžF©…·ú_,’OÕŽQáÝà ¾Ì>Æ_j‚ÉCú1|&Ñôæðú–•”©ñºk6z椮 ž¿ãRÀË¿íY`‹›ÇƘ@î. úR@rxC1Ú'Ïn{®sl¬b:‚¤ýëÍ?&$ÉU‰”’+NÉžêi}®¯½Â窫[E÷Æ¡¯9ªÖä®ïøß¹@‡Ì­@#óSÐF4A6 Ñ±‘àuèl7/ê—µò³,„†ï¡he?~óqJ¾ï¼’F ÔãÆN$cîB‡üSÅĸÒ$'çü ÃwgÆ÷3þI”@Ü”õ|+1Z«Šmz>á¥ì8 FÔ׬п<"û<Ê¥ë”ÊÝ€â-TâR -öÍrV ¶9Çkæh†jýÂŽ¡µD%K,äàÙP¾Lùß!™k &ýqi©tPǪƒÙßÂÚ-µ³xÆ¡¯úe›ä1"R™ÞÂ×þ©Ž¦V»óHGÞXB ´­4 ‘ɽŽ7ò\Ô˜¹£²£ øAZôªÉkè©÷ɬþèhidBDhžxÅÁ*C%êKã_Þâi‰Ñ¹ƒgÆ]›a;¥¤ÛH-Èâ@‚cêznÏf±4(q.ÛŽA!týfMa{uÉZôæ}í›ddÛfÊÿTjìüô˜ šKÂ{êôÇÙ`à/4ýGQÏ·ËŸ}Õ'¤ã/acZþ˜RÙÂýÎÁóO+ËÂâÚðÜɺÿäó $ļÿûÝ·Ë6$Ú»tx%öô½B·oòÛVâñ m¸æd'ü>eÖŠ’uú øé®G®ì•ÅOºÏPqœKöì©{5m Ü{£ÌtDÖî@Þ\mtæ«;,ÆZÙîzå .<7V‚Œ®à‘ßð¡ùr³e®Æ;“#¹C[3ôë¢/œ‡ß^[‡¤ûKÆéµ›.•…¸Ïâ'aÆÌJÛNÁEŠÒýBB&ŽÔžÈÑäWë‡íΪ”ûÌÖRg2»_¾? P59eÌô†›ºQ·]0KS {ˆo¨ eµ‘±ïYœ±x®šöïOggSÀï›O!¦Á3žÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü“3zw×®o µ¦§þW_;K¹¬[¿Ò`~»Fÿ½Ùí“ZYB.·}Óƒ4ãåñ¡ô~,ðã·y]ªZ%31JNÒýAeõ)¬æm¸¼ a¿oH$÷×Þd ¤É DùÚýYâÿ …Íý&à™fØ»l@öo tÕDZ¦uôc•ül!üSÅÄŠÛ² ÏdÛ7КqxFmö¨â7ßXCï¬Ï0®G{?]ç‹Ê0zúà 6Iè” ²~l˲QVÆÀãCMz&å~ÇÆðª¦)N({誦1ÚA{e%ŸÐ諒?—£3}§9ìV‹ŒIå­°Wã™îQ:Éò­nžIœ’8õïsS6 h®sJ¼©LÚ¨%¤©ãÞjÇ£,¾Ô€²6½qåŒz•@×$b¼MB<‚E"â;£è èµ \WódǵD©r’ÙÖº3Ó̼§ª]ì-Þà,<Š;n¦¸L‡¤p Ñ6ÿ -ëm'qû{î~P<Ú€‚:}Ô¶µ Æ~øòl«ÛøDaol~ùWAñײõñóÉyÏ4ÿNx"ÜRBì㛵üÕÇ_Úªý^Së¶þ‰~8t®ónFU1 o]·{°ÌðföÎÖÜÅ*àƒ´sÊÌûĆeø½ZFRLG°uŒ(ý5;j1ÇÁ‘…†Ðî²R½óCF}[<%>‡ÁÞá˜ñ­‰-PxÞÏfè×­‘–´¢epÏ„›]‚Ó!×!N¦.T °×¿Ú}èÆ­Ó7AN"¯mÕ­?ð-¯*œ¾¾!+Énïe2^…ìJ2èàINÝ'±žÿk—60,×ü%Æ‹?ʇÆ=ÙC›ÛAéÁÎ;ß}…Ýy¾~4C…âÎÌ’ÜÙ—¡m.8Y7Rò¹§ªís÷Cg½9È„)úÐašÿ$9i/úš©Éó7À/Bæ•déûiKHÑ+ˆÓü'QÚ†üE=²¶ð¯o@&P6È=ç©5z|L„I¿:ï¸2åßvôZ[>—{°ð’äØÐsiÈâaÐeB{{yízLý¾r…k×íþìŽCgˇ`„v–øäÞJ<=áiì¹r¢¢h&‡·v@¦‰/ÞµGŒ0ä´R\ÏØÀ+¯Ìy7ª5ôÿü+)õš>oOþÕÙ23·X=& €³ýe<Ðú‰³<©Š¬&=Ô¯½ÿ³><¡£¿kP.B¹@ÉmNUͤ¤ôÍ# eß¹„;Ð?[¦êÖ4Ù×ï–´¢5úkªD³I ­ÙA¡öÙŸZIé⪷w[&ÿóPžš-›Z:ëÎmáj/ÓZ]~N3Ø–´GwÂ5›3îäÏw À æ•ÿ¯Œü?Ú)ÓÃU…¹5vÁ`²Iîµ½“‡¸¹g`ûš>GÂEøf»BѺحU‰ÊbM£“J#mT¬„wÄŠìƒJ¢®?¸^°  ¦3Œ#ðóö|ÆõH¾”òS©í4޽LÌçÝ<‰¥ÐÙ³*‡Ù¤éÏÔZrÈN¦²PL ]:~À‘äÓ~Öô/@°Þ'Hw´¬r£îyâŽMÿù H×ÑßôêÔ'dë‚ùÈ–­^iÇjÂÛ6øÂ«A ëß?$=G$’M¬ ½MVQôH ¡õ Q[ß÷gig'E¯ÞTãÔúîêìãNš˜À<ÏO±äɲ¹hŸÃž‹¡BGoVçŒOb5ý6Wñ‹ó¢´ÐñLV18z¹=u}KÝ®âÝ‹ý¬å>õ»·&üÚþsøW´Ž„×”LS±²;zÎËzáV1%zë·iYÆúÝt Ì#)ÌÄÊÊ£.~ŠLìÆÊ]€ÚjЭ5mØE¦¡ãúŽ8]Jš¡c‘ Ç1™¶¿z&1»›ù]N¶<‰”uÑýsn¨&\rBâO#uêÞºòÇ\4âèi4\aIíUß ¦S‰å[‚ÔÖöLÛ<'´õâ`ÄLJÕ:€´x=.àÉFííåI‡zNù²¢¹I× è@ª®% ù ^NIqŒrdYy¼V+iGz¦ÁŸczûã}"Œ‹êÉîs ¾WC ÃN7%¥ G4&„7ù¢@ÏD™àA»šÓ5§bº‹ÌÈî²ÆùÄÆøº.F²\ÝÏöÊÙ:@°ç»åâ‡üVïCì‘8—?h#k7ó€ïÇï*èŸ}Ð`ö·XßFê÷©âÍ^ìº×F=BJ·|‰!ôåXüjP mJ\‹Ì2ß¶M‰#É'ó‰²ôÌÜ@A·S_¶‘XÂ\ŒÏrQµX+gÉÿ†¡àBx‘sÌaæ`¥y›Üb°ONÚ»ŽŒÌ°7¨¿ã ?eÖW²m¥’ǵåše‘Cå(åÀĈâk’ Œl<£]ȉ`r‹DÁ¬{P¸±>‚­³íËâ¸@ìŒQì.Žˆç[QÓÍH}ï­ÉoÞp¬¢±¾úÚ乿þäžÎ2 ¼>éX¼}ýo¦ÄÚPûTN’á´jk¬;^-ßæŒLö¸„3Ÿ½¡2íákhÚÇDìô³Ö|ÄyÕÿÚü\Äît¶¢ð¶Mª€Â[3Š$í. 7õ>ô’ͲŽ÷G€qÝìB¦³ØÊBÚUIw~*‚¦ýgpha¯˜&Þ%øh+çè0d°.Y§ŠìSmÖÊ;\À¿Î$rc®fëJ8Rs,„3{ô'®sœMÓRJÅx=@%³X*9æÖƒØ½%„QroÀï)·ˆ ¸Rf*t# “ 2›ôlçl’ Rê…ä]â ÿœ“<8èÀÒeÙôUXb1¥þ©nØyûz0kŸ„!òÀ¿Ïj|·õ9"ÙGÌDBÔz.ÜØ»½f.bÎ!tf äõŽM‘õ“jpÿîUHoÑňØÙãŽ'¹Y/ß Þ€·‰Ø& 3Ò:OoüÀ!›pË‘O =¢ÌÆPì—‰ßZ4Øyo—üD®oüâ°¥›Ø8ã=ÄýrÂÎÞD _ÒÕ2?U{‹Øþpèó°ŒaY ¶t&€áވȻKùšŠ‡%qÒÎÜÖÈÑŠF¤ñ"€å(8'FAS/ðÇ<ßZøM ƒÝò¡(8ÄUœvFzÆióêiD´fkúËp×þ:I­QJ5Ž9gùÀ²„7¶L¬¸çéÝY–Ui†Q.:õBW+„¬—Œ°jˆ=ÈÁ²h´s5%~@q‘͸ (,Ëû9‚cDˆÇ½’;Œs’r§²v¤âJSjf¯lŽPEÆÎù¹û–ixtÚ¯YF„ü¯ü3ÙDQk™ØÛÖFßR¨vj4«>0íÕôu¤'Û+üÁ]ïôiÏ3Ô§í}3‹©r¶—ïÅ´ ~=|=Êz×ÿÅw.[*„\`O¥O,–uf,ÓŸZ߇ „±û÷ßü=+(âµs4禅âã"hòØsî,Eªv=cŸÞ;ÒqÍío—Gp~hŠFúarèKÄ ö…ö‰Gäîû%‹{w†¼7 é[ݲ—µÕ¬ºwWþ[ºúlÊbz­ ¤}NWò8§bOŒwÁº/ìƒu7O]å[ó°°~ÞRií@osœ½¦òoV7/-†êƒ$J`9Ôâ2wh»$+íö¿p½ìpRÙüÁñÌgÖ, ÕC/…ÐÑjâ© Î@ÜÖë`,ñÊv ëQl\y¡„ö¿îm*UÎ\[¥¶8rž PÓ~û à$I¶Êeê³,õánbDéE½³Ådå¶…ËóÔÇ­'o¢l7 &ižª*/ zå?]~²qöòÄÂ*Ž—óì]“b"žÍ(¢“„¤z8[ý‰\×4M±÷‹=8B¥zKXÝt#¢™ZòG6¡¶(j€"ºsÚRûvÇ£øïS»(ì¢Ey‡‘Ž8xÈ€k]ÃÚW$Exß…y¯ Ÿue…Rb$ˆù¹I™p‚™¡Z¿I3)ƒ²»hdüò{jù¨Âó!Ñß íi‘€>øN’šT,>++v^ÆŠ!¼†(°Ø´€µOggS@$›O!µÞÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ;ÿ!ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÅ>â%†w¯i¢Bw!°;¤fÂ@6¥Ó¹>YE‹b~o–Ÿ| iáH²Ìj]2¦%BesÙT ”. ãö¼Z'Õ#ŒpûMs!Sí3v·ç%§(„¢œ©t>ŠååN«Ö…™Ž “Ù–45vj?Erw¶‰D,ô€AZ%ðû5úorÜ…±œÄã—|õþƒˆ3#õØ ÞrL¨ï©ØXwVðMÐnvã¤N5êêÔÏã-nàþÕ… e†¯™‡]Ö2Ôm[È|­©ãõä'üûæ&i@J6Ê>v[·Êñ.<$I3X(kÛæ³=I­ÉÊòÿZåXăT“ž²îµ<^€Ÿ‘øÒÜ’#÷äˆ][™°Ž˜à!·¶\áqǤ‰¸ï©üŃʴï’ùÓâÇ™êôÐýšÁ¤V¡’ú$ô£Ë1NÆ[ê|9™.gú\{V¢kx"µ¯ß`uµI~óçXV:ß*ïI°é³ž?`°ŸZDù«›À ÖVoá P)^Õ-Q]#МEHÚ3À5'˜†JûC®å¿ò‹ °âÐlДÞù$Ô¤;C޵Dá4o”Ÿ-¦làF]¹ÇPWvÿ0£öpðèBeŸÔt£lö4~ïn‹Ü †%ŠXÍjò“@%{ñ¯f€f)ˆKÆï}³LV4ùíâ0BÌÃÔŒ$seïÔð]_‘qgÕ9„ºÌm;Ò‚=‰êt”ɹ™òšFAN#RU2Ö4$!A¦Ï:d‰·z²IHǦƒýV¢åª?üÀ‘}ò´öIó^Ž#Á1k‘ædÏ÷Ík€Ó%“†u¥ Ͷ™i§ô˜ìm?o$¥éo‹*2Cf$”/Žæšä.üF:çlCÖ¤I:6hZÚŒ˜9rn½Å…T77V®ï¼d¹Bfï«è Tî- mj‡f›ÄÉ ¥£ÒË\š†‡Ly-ó“,]Öö GŸ!õ£˜"´Ç-Ibg…?Û\žIèê…AÌêV"¹òu  0øû’GŽ'ÛÍÿüÏrY°£ÎOèé)ø=‰Á‰k¤ã†ÒÉWŸmV¼À΃ÇVhU ñãd Œ…yµp«iÍ)b÷MÊOZÄoÙüÁ­Z´7´€®›vÜæ–Ç? ˜ =Ζ·Àñ@µ¡ÐDЈQR%(Ÿˆ}ißZd|ªâ.Âk×ÞJ;k©æÛ*¸€uìr“è<-HÖ„$ã–µ6<1±f$”ȇµ,¸WÕbs_3JãZ¾ãwÒî½ZJª8Ï`UY¹üñIþöŠ –g¸º„–a.,EθÿzDÄ¢çyGÐê9{ž=!Üb0)w¡²»QeOk²Ð8 Eôµ ý­Þe*®íì8ü€~æyˆßåŸ~¤·‹ë*ØpœÖO¶¨"ÈÖ½H{->ØÚļ΀Vn²ã«Ú¨Ê—H® ¢æ÷º‚8Ë›MœÃß2jë›)ëQ¯´À¤–«°‡r)eú8;Ž]ÉiÀn7ì8 ÐkLºúXmÙƒüÀYv1¿á’|CÝeÒêeó& nztJX̸¥Â3Úô¦˜ÁÃe Éèt#t¹w­Zd܆né!ç xR6dƒUV›þ"6%H–áÂÿ=«SQU›wvÛ0A½TR–¶ñ y_R¹YÔ¿À?Šâ5?ìÄXÔ±v¤b–¦EG`_/¯v]f¦t!_ Bèð)õjÅi¬ùWK¤Qâ&¿o>ÜÚ±zÏìJ%>i¦ëž„6•tÓ£Xzè#Ð6Ø¿ $»V ûhÚ—WëvŽ; ÖRŸËÓj"a];ôKJáçÖ¡ôñP™ÛhJ‡¶à^™æ2ÔøE‡+J‰6 Ë!!s¦­Ó&¡¯ÿV’¡e"Ð`ä(¾­nhöL<„9MóHw—ß¶”; ï« Ù¡ÿÅüÀ"»ÇGØÍX<ìfuK..!¦,] †‹?/àÉ%/†uì\ˆÖ×~CñW›j}„˜«s „MéÉ¥|$J¥­l„ýÉ•6‹5Óxã}Ô˜/´™èÇ•ÇJ¦ÓL­–VDF6Ù3sÛÜ"ý5ÏËhú—e.†W®Ð­tøF©©t|Ò{WC·ÀŒªtÒ8lU縈Ð$N<æµ&_b鯶Š;"›êm&£[-zÅ“#þdu~ªK%íÎ±æ‚ .´²C¿*8<½ë›./º[bk"ÊŒ…³/nK¸Ð ÒÂÊ—1i­Æ®Of 3y“tqçLA£”“]zúºž_XùÄ`¦†Žù¡Æ¬&bú›¯À3%xmüÁñÇ] v`Ë*[Gqƾj+OóÁhzß.n:- &få„)ÆV¾=]WžB¬H׺?Z|o.Wj_úú÷<ÕõœÉž«.“^=ŸÚF#ÆÐ3YsÂ’Õ¥¶oMºß´Úã 7±,ÿØü©°•ÕÅOÖWFÍŠà•Q9‹K””kvR{Ï[Bª›»—§$©ÉWø’k³Ò4V2¢8´U¾¯ѯvc`U6x/RäXûl5œoY…aØFHàÀö}"¨K=Ñg§*OsˆvñXLƒNõMêŸ{“B)ýCÜJÿж²‡qí,Ã"uS!h¼0thù<»„lÑ® ²yvxÙÄò­W7—D÷•t¹FíÊ8Ð)+UôZBâËd÷§ ÏSöB~ùüÅ8QåFLQzQ~…YÆæ6æÂ˜¯¼rDóå „×ÉË‚Ÿ¢ ` g š(’Ï@VA‰úš%,eÃYQŠa3$” ó Žu~B-(ÚX ÒÒíCdzœá "‘?e³Ÿ— B‚àÔ‰ëú8€ÉOúÆݺ±Ñ˜?Æ>T·z-+çˆÃVu|?™`n1ßÇð•››‡Êº¥fªÄD¨™ëíjæ`Ç~éÖ$wÓ(gfùÑe…¨6®zÐ>Áù8Ô9Öâì(}´”Õ<œY*é©6Çuê ð ‚Z á"ïTù`>fæ ,µ¯&y(¹| ê9WÞí¸D_:rª…pJØmß;Ø;ë¶rÿ‘èkÑ–Ë‚0º¸ÿ·æöKMÈÇ³áÆ™üô¥x î²óG|16ð>Ÿ:2ÌQYî»Å`€¬oSÍ@ ’`'¤{×~U¤@æœd«µ[àRæ¡p»‘Àï‘<Êà'(`ìF–šB¸ãoú‰Ç.…úAªb-œ²¡Ð[ŸùüVÀ¢¥•¬õÖŸhgÂyê©rVGj±žyØ÷¹DÿZñìÇf\.ÏÙ^ÆooõvÕÑ|ujú/}âz p`­¨Û”À­º(^гIW“åÛ´äå…=·uØTŽ Ï/äañJCôâ)ï¹1ðAåò¶òÇKT—u?y÷à šµÈæ—ã/-¼ªÁ”&wv†Á»÷²w褚¥=PIÇÑ|Ÿk·‚Nö< BÛp;"æâcÓ†MEo£­'n%)䟳Hšuºbœ³o’üÕmÂHϨö,{}T]¤ãØÈÁ7?9ykÞ!îü¯ÀÃ!4÷ªû4«…>³Ü“8&ñáÿ0P` CñÜs9àmäÒ€-­ïM%ðd–›M€žæËnO~¸ l<@j¬N‡ÛÞGŽ£HÀß=E©–l¸¯ÑÆh 6Æ…6…i\_Ó¿$ÀYyï;€$ˆéø© ‚éHΚe2Êd„ž–¯i÷0±/@ø®ÆyÓ=”Nz¤Þkkòàåž‘™gѼð‹àß.ŸºêrR·rR&XËDü4&ˆ¥ŠbæìrVÃ|—f«w  wWqc¸ëÑ€ýÊöˆªµ0=fúkn½væŒK¸{CRÙ+CµÍ†‹„ ‘ŸFL9œ„Ä1Ú[Æ^³ óDÚŠWZÎöÙÃypš [‡ü g=©¡zÊ]»b°ÅôÚÂH\ƒm(pÓ¤Ïm?Ëש‘ÇIJw:7Hu+XqƒLgÜ@³Ðܬ$P»µ²òƒº|Fj”ƒ‡ ËŠUBMÚòÙ‘‡ ¡(fQU²:i•g“­ Ÿ¬¼/ð2ÈAÕæZåM§_RfVLÄr?…¦À‰|Xà墳[8“©;uúFìÛ“­™%‚'”ú®]¡ºeN‚CÈû÷7dðÉL ÁM–ý²)™èa–y™¡ÿ½M“c­Aãs,Áñ,¼ªe­k/¨•Có8ßð’×ÉŒôè ßþUÇ£ú:Þ»H‹¿ÿ…¸£Ý›D4IýzW\cWòw”5÷õ-xYëKãUbätÚº×faOggSÀX›O!ÃEèaÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÀÖŽ“*tŽZÓJËšQ…ØÓb(@Ýaáf ø »”+±–îì‹G¤‚)ma-ÁÑ…¶wô9uÕaqT ðΩµº–™‡¥·¢€6Ðwé·ì~­Wªæ1½Ã©WBó÷®ØÛTyÒ„ýFqD¬\KWÂÅ,q<Öø×ÝÜn«›äKsIª `?ÂuJ€{Xç’úç¾Æ´ÚCï'÷"ä…ð­H8+¤ö}‹1üd²!²Þ5¹m<41°Ϧü0·.l×E² î‡èÿþ5( {õéѰËl–±’60Ó„˜(Џx”©)O€Xb' “ 0IþêyÅëŸaš ·Äh…¨Z·\*Ï®K}SN9ÿ}]À¨UÔwfwk’+‹»¶äσ+:ŸaüÁ¯ ƒ…¿tÀ«9=ç^8ˆÎیӉÃc’Œ¦ä¿¤¯¸=íÉÖs%…\ÚÚPì¸BdhÞS£SZÀ€Ò§-M‡Ó*LUâ—r€ñå´.-‹þ„Å«–;)•ǜЙ?Y$¨Ü6Î0ªÒ«2<¢´˜’: ¢ø®ÛíøÙj¦§Sw«ÛÍ[Ábqá‰RÓùÁŸ†‚ç835<Ò†p%¥ïSÌnùÙtxÉó~&µNÐå͸f;Gò§;)Z^Õ©b³‰µ°‰Ñâ8¦U1M0’:D¨æ¿,P8¢§)éÎ{Ü{Ô³›Fg|ÀÕ¢†böJÚF Öi$ÛEäŒfBÍɺ|$öÕüBhpÖ|aZ ýî\iô?*Ågͧb€K Þ‚±QòiûŸðÝ8ZDz+ñý5H5[ü:ÿH£KsÇ<˜’…÷Š+Y¾Ì8wh¤î›ËÁоŽ*V6m«i‰ßšç~ÃHpx˜I*U'|~ÿ¶ÙL©/°1ãlA)eþÔðÚ©ÙRVŠŽyK-ùƒ–9•ú”¨%§TaÀ‡Óéé cŠÊ¥ˆ–ÒI‚¶ÝÚBbeȉ)³îêÒû0’¬7@û}Å&­æ·ÎŸIõ´dùŸxS(¨n¥JC»ÑK±(E¬#W¥p\œñ““,hœ„ý±±¡©Ì¨;>)qú¢¹ÅîtBEý´,ÉŒ/5÷.«ÕkyÊö*C A–Ïi„ÖIlj¯É)‚~Ãv_É¿¼üB?,Ë=ú¦5¶°—²/pœ&kÒG`®•YHK]¤¾Ž€V½“g¼‡‚^äV4©`×@ÏäO@Ë‹G=®kUŒ­D²MÃîT‹5Êhžnód°„ˆoqŒaþ¤µ—ª†öÆ\N°]…{ݰù™xÙ}…Ó´<úXО"Y§E7ö½£tH$;®¼‘žë¿œÚKá™±;Âw'!•k³ç6¡±žb]ÿp×ÕÖdðÝŒ= è¡>!Ñ ŽÜ<'¬6xM¯Úýñ[ŒŽßpŽX‘«h®tw4ý2õÍÑG|BÕ³Aï\TÈðrM>µá]‰óëC¹åøŒKG~›Ò™† p×cÚÿÝæPxz,,6$=Y±•“ÙÆ”xàUÁÒÓM·¨M0ˆ—(žªÛBûcÛ¹Kš±dJ©}4n¤¸Ò€Œ±†lJ~Hk„R-}Pð(ž­&ÖÇÚ œ¯ í‡3Ñý—6«Ž“âÊ‘ eÂD"ÈMíHÆ‹D@ùäÚ“tÈ0í÷š8Iˆ*ÍÁ£T ‡-ˆã¥ŠÒŒqcN£zµÀŸ__Ï~L÷\F¬’M#s¹Š“¦ÃTxpõ8[_ëKKâÜŒ’Ö™X"¼ŠMñK|7w-©¶ÛIAÞ9Í¿Ÿb¿N$IüÀsãbr4Àð;”ˆ\]ƒ½ö–<òôéΊÜB‘‘ô¨¹"ä*¹•“”bUí¤{hÐ"ÓKºR‹3ò ͨzaÙNøÛ:‹F6 c󛕱šÍö©ÂÓX£óŽLÎ& i*ˆ0¾ã¸_&2”ã5 ¸ã2qÖÕbŠášyFW)c‘¦—`2 ìÕEqÅÿŸoµùèän¡ãÿ I¹ VÓÉø¨åÚFNü€.Ô1xxv£âmR¶iÀÔ?’éá\)ù~ͼ9YÖþ‰eæS&y{·Ê[Àjí€Sñ·ª¹Êãºà‰só…S¢:Sš{RÄ£†0ËÀâ UIÏCw GæÖ*½H|·Q—CÚ¿¬e·è2˜’kÖÔÑØ®ÊÍIé†SQÁU/}€i9il¬tb$¨¸´¼äXüS˜ä]b¬ Š6}¿ñ‡_Á}¶âynž—ÞS ’ Ú­7@¦ÉUäé¤ß%F!Y/zh³9Ä®Ì/Í|„Ã. 1 î; ¨£¡,&üX6ù$0™Åk¬üI-ΔY@RuGnÈ@bE‰¡bu<¯ð…Т‰Ï•ãh@ZæÞ¿þ Ÿý[VBË›¨âT>‡¯Íuƒ·Œuiü@D&°ò‰¾ŸT!ACìßû|èÊMÙ¶{9a¬ß>˜T³¬ü)ˆMNKròÐðOèÊ5Bƒí)ÝB[‰••Š*ŠõÛc=톆xäOߥәåHžñ'ͧOÃE%÷‡®“o,Å<u·_3_Ê£Àé.™›9u×<{©Ìá&ÝoUe OOggS@›O!POGÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü'ƒcžÅè=ÜâƒûÐ ¾ŽìÌ ÂÖH—¢¯ s)¤U9m‹¦•6¥vÓÑAëuIöÝKž:’‹&¿ 3õ5ÒŽu ,½Fšãz÷• 4×X{6Å+DÂR{e#‹hAx¯þ ¢7CÌËÔønI—ùú »_è0¼Rrê§ ŠtvÛ:~FÁÄnøº²ümÆ$·€eR:{¿YÁ¼[”$L ŽÜ« ne"öǘ î†?ó¦¢C°³*ÎÅ5F0·)OTÿ/>z®¤ ce¤£‹KŒg¾Rä¹±›'•&…½O±ZÕþ=îúo+ö{ºW 5àËà†îœm&…?ÖÄùB.‘gä.,[þEÇÒ”©*¦õ[dËæCÖéyö¦sòë¡ÐútŠO×”NZ%mø*ˆa î›8ªp/·—Æ¥fÏ^c'ÕR€lì%”Ùb·N‹Sm8¶Õü»Ë;X„LPŠÄlè„~¹Ñ»¿ÙL¯Øßs®*pö’Ð8ýŽäâ,}ÌüSǸäÙàca¤?H1We½¨Åmn͇"q†ê€´dÓ«–éŽ[SÀ΢­«õÑ2eÙœV:­q5:75²E€ú”˜ðùɽ¸<µ]ÊȰ~‘Ñ×€ü|Åû§ë­ÉØæÀîiYÄÌ˱ü§‘8HÙó§3t~„ç P§B_Ï¿€ObìþPBK<hê^{y:W`Þ—`Pø¡ˆHCý4±(så/H’ƒí$DèrN™(ãcÃHæjÍÙ” ÅöSÎ`ãM­êNƒ‰ü|1½"à-fzyz39P/—³¾ þ‚wÕT™ô}3EnÈž}„a®+ÒoG©ý\ø“0"(]sÃu&M<­¤0°vjÏ) }HRŠnþÚÀ-sBã|fe¯× ¤4ü-÷œÑ3­ #bãxæ+ nŠÁlr¬6YTx¡Á»ïjãÔM“M§KŒgèGÞ “¶­ŒL‹{j¼-–Ò ¢RDz*O¢ ÝÍùxˆÉLÊb2ß&Â0_ä2ÆH\¯£–«PfÅ›9 vä2„,¥º7%×&†‰"Q&E@$Õñ þ=71iEàÞ8M(v¡÷ñâ+?ÁÂ@² 8ØÛá1ý­ú:ù¶.ŽÒŽA—ÏF·Uë_˜S5stÑüÁŽÉ#uC·ÅùErç°:}ÃÙDÏÍ9‚ù$!°gý»4MìäþW©òØÝÐÍHk$ž H!M”æõ"‹„ö±`±±‡µçšRíÒïâÁ6Œ¬³ø¹Ž¬\ÀðSœN‡\$£±o3ð}Ïn•TüZ<)¸.WA`Ùï»BÓµq¾NÊÒpêg§´REÿŒ)Ka°¥]FóÅJ¥5ź8´„qãdì!q¾mbBM-!Ì_ gÄM‹Á¨äØìY‚òËnßöp·Dî</‡OØeËGJ¾7¯û0‡IÙ\”òºÉè’‚$–uUހßÐ"ë  ¬„VÉ€Ù¬x_ÙúÏYhC´=ï‹Oà$ØW„d3È÷`ü>f%mĦjÙ]eêÇÇ1ÀüÖÙ¬‹s…ä=vƲôò-9QlæðKDÒ65¶ñµÒ¤Hoì–sÆZ±¨‰ãíè†Ú~<4W¼"˜Ÿ‚z‘K×*íOÕ ÀÑNEé]a kðèNgçÒzÇ1ÉõI—cï­ªYcÑõÒ%o˜·n—o,kd2'0¤n ã@NÔªûD˜ÙH|É)?Cº:I–R<ø|0>iɶ{óÿÑÑl'þë®­¯p÷_éçÉ/´(õÊè4½œ•BduiõS@Ï:Žl`€»¨^î÷ãÏýθcÃs÷z„¸IQ@Î ÒÕôH– Œ¶6Ú‚¤Ë„òÙ”[ ‚ÉžÁ6“æ¨â'!•Ây= ýŠ8FWLû{Ÿ(Γzíý‹¦åg¿ø¸4 Öès†üÚÙâ9äa-;©C‘NyÒ:7|FüÒ¡BíåÇ7ñȾ¢Ý•ä™åYUѲàÎL²w{Bõ4 v>mþ¶à—y宽á¹ì¯'1¨õøåœ¦C²äøã¸ Ì9qèÊßþâ¨ç•\  >cÜ@EnQhÃ/?wðñaÈk!eÂ?„Ù—‡UOa‚š⬠ÕÅs£æù|s£¶7?ƒBÜþ€å&åüÛ'¾‹ÚxOÜÎ_ø! ‰‰7Û¯g£¦®DV³d|¼ÕÞøº&`Rfä™b‰ùoÀ"‘BÈHa™ß¶F}$AÊRZ†¨úži2Sì´Ý¨¤d½;AŽ~!«…Xe&£ÉJJ—¥ïOù̯·&øó”¥{WLa3k³ÓZ"éÞÿ ¸ }c{08c"3ir}j‡üŒÆ¢Nàîp‡gØÐ·RÒ7§yÍgsÉ0}¹¥]:e¦ô÷» „ü×Ãã*Øø˜÷øí|²+wê‹N%« Ï…¤xè©+Gâ úoy˜ø|,˜–;$ÅáLƒ•³ ¨ž £j&D¬ÕŠšZœºÌV åŒÉ¹W<§É~ÝŒy.ýîÓÞÔõ1ä^gW@èxbÿ ÏLÑ i»+äŸÉ÷AÓS”Öïuß?xFãël,\ˆ=;€øzûåM=%šðF”Yëü5wsóXol™µ³9EtkÀ¥ï³ð1üÀ‘uY~°c.µ'p%,CmtódŒ¸e’ n‚Õv2yyV’ˆŠ„;ÛC]ùè® Ör\Yò•o+žç1ÒeôL"i룶¢Z@²‘U Ó»¨î™šöS§aªT ã—V]ª(ÎgÁ½²1_]• †tÄ? Qw§W×ÌŠÔÝd˜SK}W€‹5m´‡<ý åËŒƒK#0¶BîøÌþ]üÿ‹&Þ¹l%:ÔV˜ö½.±%1qÉF9MÕ!CŒå·F:'<²…t:*äËA!×*ƒ£Àž*£ÞԊ߉ ×ï£ñ_¨S‰IaµÜ61AàÖ÷ºÏ@ø¤f• èÜ.Ao·ØÏ8C£i˜Ì黩/~oàN )Á1õ€Þ$ŒôuˆøE¢—о‘ͤÑ’–½5˜a(ÈCy£46 fµ/Sh'-’ãã|‹¤áXÚs)Ó§ÊöÑrüšÜZÑÒ›éU7ƒã&ø|xP´e˜±˜™¹æzQ™TЙª&D“¸)%Ù<»Ñ—ÅÑ%üÀƒ ê­¦gÐS?`%4̈]Ք߮ç+BÉJ-+VjàJlœµKÄÆdœz©Ì"Ýîh_´¨0{Ò/‰]ÜÓhH¥Ž1¹ŸöŸà Œ¡ðœ¯Œ®\4ÓŸù%Œ&°)]þìœ0ÆL*V²=…H“5 7¥Õ9è‡FÔ® LDqV_Á¦[H¨È–VUÖÖ øôZÖ·xÿžW6¦è·@=ëõÑæãÉòº%ïÒ›ºòü§Öp°Ù¤h¼¶y£œèýp`"NÍt4Ó Ò)Tfq3¨ü}§íg@}Ò„ õièb^à?ìë‰?ØÙÀ/SÕÈ~útxº­ -†§¥¬vóªpš»þ7¬4xÓS^Sᥖð.¡Wq¸+TJõü3Õà>xExc5ò!ÃÂá Ç_‰ ÙÐÜ "MejvÎ;1ëL«9ú9uârô»Q1zƒJ2´¾XèÕÙ…šR8Êð^Pð²~€¹¦®W$KêsKFBkŸãû· æWHú07c$³üÂ|Œ[oœ*¶>±_‚G…uç`Þõcc+|žð´ SG†>Êš²ðïE¿–Nç0è"’-1”AË¡'¸Ÿþ>sÞúª1ÿ@ZÅüÀ´mq\ù™ì QüñŸÓe•·qÌd­è6ÉÆ­óöé<ÎŽbß<ÇÔæj¾¹¼w_¡¹ñ/èKšùe?k?žgUŽ]wÑ(’®úºð kQšO-ší•n-ˆE£ª¤GŽ€ïÂŽ¼ÿfaÞêûp%;@¨c¦¢a=+z ­Ä;"PzòÿJâ[ …±8-¬«î‰Ò¤ÑªV™t¥Ïn)àù·0§ì¦ÿ¤š`°öJj§ía ,˜¿©“ö±EÔÜZ7¤Âú ß/$’Ý£×o\ŽT‰hî…OB4Tˆa=z*SœsšgÇCk$(„èþÚ•?ûÍvÌ—>œ­[ñ~Bí{Ó™Uèà ­ó"ÊÖˆ <.ºŒ«²9~Éd#ã óŸez°hS›–w‚¨ì´òЦ>ü,0ñWóõÓdC_“j$!Tilع:²8Œ×R>ÆüFÙÓ-¬·Ó±r.üY;ª¬„ú¢•Š¿ù–j@߻ҠÄfãD¶U÷dY&XœýqÏ"8š(…Ú¬¨Ñh„ЗLñp‰Nƒ`T="=¨ÿÈÖ)’¥êºŸùén>‰Ò>§6¯^µ\8l¸¼Í¦W“c*ï ¤óõ\㡘Á´ÜP ˜øVÒ“\ST—>\ª“òÿϘÕ· ”4-!î"Ëkm‚– ªŒŽ!פ^ ²Ž †~}„¾V±s÷¯3í¬St9>Í‚‡ø°ä–[šL”•µ •Cû¥$e?B¹Wº¬M¶ñKå,¬Ý¢–Ë7¹.¸ÙX‹Eö2Æ™H úÓ<Ùy#‰{ѯ¶Š²i×i‹ÉM€YÌËõWPÉaVÙ$øõ«uñ‰kü¯üúAÎkm9‹ˆ3¸í_‰öÊËæKÙ+ýó0A…^bŘàãjyœÃ­9PÔEÅ;®™m< K*[8o [Gû Ëg:.d¡o$(ïø?q–«S³t%©O¤ Ãk·…`ã™+àçŒò ußdLƒºÍt¡ÏOš_»‘EÃÐWËl(«ªTOeŽîÕk»µ–¼áǘI—á©õ †§pÎP‘^€è@¯ò`½!l)L/<ÔÀ1 ºÉoFº¶ˆï‚ípi„„¶¥ÐìQëê¶°Ö[„k’ê’f·áCur­[÷‹ÁuU'Ÿ5Çø²Ê0!)=v™öüjËúÑiÏBŠPõ’¼ûpz¢Ì®à´ñGOþÿÝ[ÀrþˆÔ”AZìgò:¯š—=þM¨Þã— nP›AÇÚ•ÄŠ†vx©•‰Ç˶´@Ùrà+Ó-æEv! a†€T¾=õeFŒAËHÈ;YOýƒVWÇÁ©å©mj”JÄc,=:OÙ•©Mµn—ÜäÑ›ˆŒl¢ýGÄPyòzç¯ß_Ô@3+FÌf¢wÒ,ß -³n…áÀ—À>CæÑ„üBh§ÅO`Ûª)ÄåÂT¾>º§—{Ö–ÊsD‡¤åóæ”K\ÇJqzLì/ÇÇž7ÞëêÅ÷¦Ï[ªÁsšvãåCí=Z _„ÉIî!ãÈ)J±FÝyQtì´ø!rØcŸ†<µ-Ÿ„~LüŽÊ]¦†wŒƒÐp>]:]•”PàwÔí9ËÖ1œÛþYL ÷ÖHwcŒMòô*MðnSçâ·-­ç1Îo°Ùv}Êä#U0Ä’$ödˆM‡~ÅßîeÂ=¨vøyu¨CÇ´Ìb, yjt°åx(*Þ âÎbjôø4Ñ(<º+ìÛ¡Ž!RdÑ´V±¨¼LÖßY{@‡¤|õŠIxÌ 5Äf.qõ,ZÉ£«€ü›´bz˜~Õ­R¨g¾üÁ® ¸<š¤²nI’bÎ;Š¢à„cçy„q‘!Mx†ô½)¥N™!t©*6² ;ý«ú½”Ê}õZo©ˆ{$ U/•®Ï€\šyãë”Êm·ìÈ«+OÁ¼ûÐÁ§ÉfRcÛ{@HN5ʨ`UÞ×ÅW&à´ªÎáõvôi* (žƒ5›ïí†}ôÆÍ‹%…ÿsb?×°c/¦×!ÐhØÎÃ>x §ÑG»¸% EñžeŽyLùÈ0"xkOÉ’ΠÅ) “ÐŒ"–Ê*9ùßQzûlQµ9\SS»V8X§³˜DåúÛƒ&åþ ¾‡«8RÁ»³œTÃOëΤ•iˆ„wÜQ0ð ã½ñi8iH— ‹‡8¯Rt1 AüBh†´r€5àߙ˭eåçsâf%­Â°£ó g\Þ3¶Ÿñ”'_émKÿ­ý˜Ï¹Õ€£ûz üñ¤¡m©5e{_ï¼ÝˆöÚ³2¦&qÿªxÔò,³…­–²©Ù«Vt2OG$zG[¶ê†€„Ÿ ¼÷kÑz?…2gÀ›?´ŸÙó>¡ÿ5i Gí¶=cÂï}âPû-˜<‹ ê¢ZL¶–…7û`U'Úð£\?Î4%'õv¦É‰/¥2tùT/UV™£hÁwÕg(¥ni äO> Fpî\¢ïàR±¿iô'ŸV³apVùó{ _=%vØrÿä•õL„ßvÔH÷À?‚ @whiG Ÿÿo¼Tö(…‰ÂÃà‘ »ëj,ô}ÜoUøÃÅ­#NÁ?¾n!·]Q>XrZŠ–šx9ðP)\y‹oÖcÛ:U’uý4üéĨ~|ÇÚâ‹å%´:ÒC'ê üí>F’—!µ#¬Çµ ¿ŠºZš;¥ho1°Î¨±<;ÀhgŽlý»Âäõ­¾t{knVÉ爜Ϥ+‹_BúþþÒˆ{ÐJq¿e÷ùK*›Ÿzô6•Ì9ÜhIu´ùÖL–#%¢r ¤qXŸ—«P(<À ÂN»`Ÿ U £jN]`wG ¥œšàN8­ch…{ž€räÉ®Úf¶ðpff­…\Õ4ˆN-„\å°Û 0hÉ.ý¬)…üzDÌ&oèå6`¥+NåuØ÷‚ðº¥*\-`‘—°>Y[_ŒÆ;ŽDY:Ì}àn쥼~Ûì‰á¼¯ÑóÌ®1@C€CãŠSdÄ©Fµköùq¡˜Hýdú¶fÛšE£pPŽ ô$ˆ ŠüìX§¯\§O×½¥ÒG•bh íO OÚ—ŠAµ¶"V+á¥!Ï#k4dùÿQïÿEn>K3€Ó‰e¦ZÈ_²hß»È ºR0¨ýäX¯¶v,4? û Rúz“ýB­7>³ÿøÁÌF­’¡x<ø ¦;»ÙÒ™³—…Xœä?$Z…­ÃmIÏM†q\| Ø6ŽóiÐmHVªŒyÐïa"’ý‰Ѐ™f®MEl"­P^÷&õU ]…ܯC@rÉ’8ðÒÎ sZO¨ ¯ï_!OéAÓ„N ±Q}ŠOî)ÜTìtí îú£J™Ä2º¦²¿“Øtò ¢–Ç ÔôšÙüdë])®)Xv÷º› ®·+rC¿²±€n7‹Œ¦|‚ÇûZ üð.\‘sMf«ºàùbWË…ƒ±0ŽÃ,ÅÙA¥Û—^cãV´µ„pЛæÚ±÷¢]Œò æLV,Ð?´qm¶ªÃg°s¦øélB`ÇÏòÿN¹‡ÀN|yÊLl•û/<|½ªm:á¹s=ª«³›º9×Y¯OtXœ Ûónx*°“mÁ{ñtÐÔ2u«‹9cÐuc©uzˆ={ï4¸‚^÷îa€™+[œ3!¶;U ¼ÐÈ“]ÑA*ξë’,GøOáBÓdVœ³LÕž±A„¨^ê©ÁÚÌ\£:X¾f•¿°‹ö±?X³ÁM?rŸP6Üß@¨/§ÚÚä·@B žÀV[1—$žõÁÇæÈЌ߃\ARrÙ¹s+‡ ²­ƒ³Íîòz üð.B©e³ßêÛ+¤ÊòºW´èŠÞXÃ]JõÐÚòî¨z¶¹shî5Ñ4a‘Ò»—k¿ó¨¯s•·H¹%Ozx1Ÿ!ô‹3—1Øì瀅>üÔ°oבçô,D–qjTš¨o‚EþX^œ|6ꩽ7‚ˆŠÄl1ÁØc\ÎujDÛ¼PólxrjmÂ&ÎÆ3ƒQÑî5˜ÙL¹aGÏe×¹·&½·ïn~“ ÿDO,ùH&B^êÁ £}kaÈÍ÷Uv¤Ä«Øˆ?-‘ðio²/¥Ã­–LÂ! Ÿ¼ggIÞÚÂXóè9¥Äëh¯"ïΠŸk§‘vn |p)‹µ~‰zƯ‡§;ÛÅ^[”³:ä@È.xt×»ˆQ)poz„-„1£ƒMëà°qÊ üïÂýn ì@‘”Î?þKùU3J¹SŒºVÁ{‘Ÿ “ôüÒ’õÙ‡ÃEÞ²«Þê‡Tô7†|±)òJˆ?íOç»sT#(ÒoKâKÿ÷v(ÈŠ¶ÝU¸À'‚À op~ö€å:»Ga®4ÝÓ¼Á@ï ૯è‡Ç [|@ãç +ò“I›ø0›%kJÒ¿rðÔ˜ž))U\z•oK«OLºL¤7ϹÁÎû"‚iõnÄ%ÚùšÎ&‰§ÝÕ  ÕŠ6¢¼¬›žh8ª†÷c¢0r^÷éž^9b•zyŒýÈ_Ðã\À…ÜÛ„.?IqâUÒ™sónŠ üìXVÔFp5[]æäIL>õS‰fŽæœ`D.WšnTÃKÃéÈ€øÝÐS3cô1¨¦J½fÅdYEŽ(œK³Ì8à}–jHéìŒÅùÍ =~ü¥.šø úÒ­Š{Ë |‡Ùœ.+W Ù&£¢6òyXÀÓˆYAŒYÕ ¯ÜF=@ýý€ 7¶ô̯æô^¾>²–iÍ…µôM,D~Ef+GY*²¥ ®Ë_“ñ‹’r‡Ô`镽‹¾/Ú‡2ºÏ¶0Õä4`ê!_~XºŽîr}~d:(ijý†Ð² `”¹êñh‰Hv“¬«áE÷øV=1—dëç<í«]˜$§FM’ÝÔvz»¾°mh1ÈÒôŒ²}âÊÜÁ.f‚†þÖî7 <Ûõ:¡A¥ÈÉ üÁï5yòZZ&‹å0]öÏàÄ“½Áªª%V‰“к7´ë¤"@àJ~):¨ê®Î ´›¥)ž¬Êù(Ÿ!I³͈®v¥K$*È 6Â;<…{‘ºÿMUï“/f‹ö.Óð’òJ«ŠhX:!,ëà" *ÞFä&1gB ÎÏ—¡ºE> W”C°ñ£F¨½'°v Þ4œ¿¦t×6lìæ ë ñÚëMÙ¹Ám‘´ KÐô/XËñ“ÌR‹‹²A]½:¿ŠI^%ïÌí'PU:p-Hè%O—äꜫjZ§Ÿ·þ¾ ÃVõ‘lO_´6R™5l¼¦=ÞF˜·Hmî×Hô‹ßt_3ÅùÖw2Ê&½!Õ7ݯ]ÏC‘“½øº’ýÈLu¾â!V]%O¦[/ž;~Ò#­3,M€{i$êŽEVD ÐüÌô N§Z)-Kñ“/.`õ ‰3ψoä‰k½­ãQà-&j|業®üñ9¶Í &‘â×™óèE ¥QéµHG+ó”c‚ ÕXQÛ™¯ÌÐó2Ÿø…­ ™A%އ ³_Í,y) ûWLëÓŒ_ùàs|è¶ÛMuŠc³øƒt^ÛíºQâñþ¸×üãÜf4Póv‰ ± „”îVÉ‹2J À^~iÃh=¢ZYñ³âŠ0¿ÙÄÆâ3ÐVUÛÈ×iÛK~gk_üß,I§[¹ßÉ|†3°•Ú[àóðu¤¿$и)E@ï¯Ê­¯WfÝ+n ø»Pz¥6²ðMÐÞíK/X÷3ÿa¡Õð.4ê¬Iv·£2„C¹ŠXh ÉHû÷U´ ¿¶ÑÖã#†ïÇüð. AŸþSCìˆL‘úÝ‘¯¦4—`$,g]ÛŽàk ¨|#‘ܹ•:[ÑÚà‘3ŠÄl‡Z•<àé)xYÄÖ[•Ò&ž=¼ùÃ}àÚÍÀñ¯GúÚãýœþr²–9üH þÄ<g\{6d» ¶ä00pà4bˆ·¢Üÿ÷(þr˜!}ò"K+uòêl6çr‚XË›Dã—3×…d÷ÚÃN "¹Hy¼YafwâÓÌ®iÑ ç#€{â ÀÊݰq ÌDˆ‡i ,5øA L‘΃w,C¨ºÕšvâË„x£"ƒ±=wTäX³®š~ûEMõµmÇM"há-*T¿FËœ*Q„Pb¯” ªa/ ÈÜ$ ¡Ù“ºÕ{@XLÛ:IêîŽ~‘¿€†“aŸ¿Š8Ú®Kà Vno>a+H7÷¨§ø»_5šR^„ýÔ d)T0ã0ß}UÁùª./·\>€ìhHŸ˜ã!ñ¶–+t©m&óßUö½c˜™hq½4©†´p n¦íÍQ=rƒ›âæíò ÇØŒ.Y¹BÛq¶,&lÜ®Rò÷ý½î%¨Þ´`Ûƒ°¦³ÚOggSÀ*›O!}O¾bÿ‚ÿ9ÿ4ÿ6ÿ1ÿ0ÿ1ÿ1ÿ0ÿ$ÿ"ÿ+ÿ+ÿ/ü×B©áüù˜*¿‚X4*UÌsX6¼XŽ,þåëÚoxŒ _û’ø.ç›ÙtÿÜóûÎ#~S±z‚³ç¤ëîMÖÉë¼ý÷œ#ek’Ü¢Á¶OU“ç„ýY<¨µþ(YQßÊr;o¿ÇàC¶Å…•z_r=¢È2mس] zÞ3ªÕy©gþ—šÎF€ŽÝ‹ •K›\E²ÀjÄ_ ™Ÿ¨˜kOÚªQa¨ÎlÕãÐ< ¶Íl=-„­¬m¾˜˜Qð,rõÍÐÆùDA®Ù[·qƒ N£K(»«‚.ƒËYÉÀúŽ}_üíè¨H1¢O@F:°`öh‰œf ÿäkŒéäËJ®Ç6¤ ÷~ØÔ3 ~}{“õYµð^ƒÔÌ}45JùãÍ‘)ZÚªÚ_]5 +1=LB ç“è'f”qQ»>S[¯²}ÓÕ¡ŽÞâÞ¿Zµ )EeX0y]ñr¼´˜c[ûêÐ)΀Å2m$ˆkH)0ëoÑ‚?é,ü×B£>¨-@ŠõkIÿŠ]8!,ªI¢ bûáÍˈ¶1–x0Ûôä¶<­’pzµ$ æw\ª‹ ðŒy“¨4ôÀq•ÃÞFáè®"‹ÂRòjðuj§éîN1qºÉôŒž&LÒã]¯ÁG=Æjÿ±Õ™ÑgJ¯Z8q›ö…4"‰±eŽèѤ3t ò7Y gš)?Žaüt sy'¡:Ú cîhUî9ý#ïn(2pgív@€èôF[S[‰V•Ÿ•º¡Ubš =Óè²ÓLíÊ%Cç˜ ãÍ/±Þ6.”­í„H;ö„£ò;PÌØaÀ»ê¨fÎû·ÀÖqhn–ÐzÐzð¨°jwoéù"Àôña—;1U’¢pí»SÁ-~L+ר×4Dü×BÖD;š¥îjG·ö’éõúí3®7a?Îàù¦ækOlNÉžTîÞYUYK5{‹b\ÕJ’n7}‘UÑ̽<åšñ}§Y„VÑbAž¾ðpi„ÞïH© Ÿž§L(o1N¢{÷½p[Ò¤}ÕnqÈœI~†jµjÊG+¹oO[b}¦ÉÅçTÛ1íx96*x $™q6áþº‚!OõjòibíE3÷¨@%4BôëUZ¿iÖ‡ Ž‹ØÜ¼«XÆæøU-2«Ê1{«‡§ªCÓyUz5imVÅtÐ% å­°‘†Î<g­uÈ/C¶•:…zZFŽ<,_!²q/p°-ó˜Ùš“«ƒÄ±ñ™Ga|ùSuM+ î­%àþ*úðµGtüÕT1’Öÿ¶6á‹r¥M@ïM>Ía xÅL.Ûùè¼&”áàÈ¢èŠ ÐeBꑉ•ôµüoaNF¯ä†V9¶.S 4-›ÆÔ`ühÀâÐf» å¿¿³¶Ý}A›è,iy™F ®¾·oL¦KùÚ"ôcaöC|I69@¸‡®D\J3þ´±ðòË0Uì’V}ÜËéTTÞòÃphÀÅ:Àî­k÷ „û´á6èzIЕ ‡Žåa4bI5Óåt‰¼q]Ù&FJçRB;lüœó^%Ö5í)©K§NI5»MPaB (0¥¶ÀÄíU°ø&ä¶S§’F€_ ¸Xû>â;´ë&˜‘€ßÒñ`ù„(½– 7J˜ÈLÏu=Ê!ìàˆù¤Öí§2Î{çQØŸ:Òü×BÖc•?Í&g²¢íåpýAECmnðµÕ‹Î\µ(è¨Hö£æ¨¼"_Ý''÷€•k‡?`Ñ`/•(o‚iÀ·7¿,ãÂ(pŒÍËðÐLqè°&»y¬“9"õ­‹ŒgeüOói”c’)‚ï2ZÁ»#³Bªó醷âqf—iLz=¤ª% Lí Š fú~ÿÝ_´Œ+‰;v&)W¬Ç‹<³Û”p3±…/¹«—ã©ÌGÇMEÍMyܤ8h¯ü¬ï0ø^èB¾îÖüF™oæ±l›ÉÞ#nÕ¼›ñ%„Ú”ãM»ãÝšqP.…jUNáY°›fk-úŠ¡C5RÅ9^ÚÒ”Óªþd^RÊS8TsŽ›ïºÏo÷lß1=AÀ/ï˜7²ü×B£¨JpG 8åü(¾ ÄšH;I>%L&ó˜âˆÆ¡ãáÇ{%ûb»Fž Ê£huºÿ¹›…^bGHE<æ,/©Ã6Ð}Š5ÅÆ­ñ1zD{›ÑñéJ´ß¬„›ŽPQ›‰ãÛ!äd×ñ¬ÓzË>©ž:æðfä³e&Ô7T*¸Œ[-QÜÃRq{AAö˜+uñFîqOäFI“‘i`r ‚ƒ7ÅA àÚ}ú^<^÷ŠDR/a>ì)Éè…S»H Þê ”ó€.ÙzF£ÂIÜéhHÓX’Zuºv,-ó*SÚZ7€×Ÿ_D ^îVáªè˜iB|ß]R "E!ÿø×ç )uÖeÔAB—-m«»o|ÇmüH5íÇ„Ävüη8ÓüÚ“ú¯×ò6®÷º`™ _ JE!À`ì%€ynY¦õHN±NQ„ÜyݲH„çÓ–R <]¼E×OàÅÐ{•õXŽ[Á1)3ªøÚå"¦s¶$y¡úÖÊù‡ Öd™]šÔ‚¶¯l×ÎÇ=§y[Ú C2ÎÙ!ÄŸæŠ>Jw¤±¦‹$!,gv¼1U}_ L†°C4.ïé}½;¢¢þC3”cÈi* (?6³´ %]¦ãðädiÝLÿö?—l$ uo þ†ìì?««D'iHÝ›~eHdá?@Ñþ#‚òh¬¤­¥·Z|fªš< µk}“²ù™µ Í›NEÌI)<ÖGsÛ‘GKPö­ÊÀ¾ÿ9´ê’tAÈ7§2HÜÙ ;üÚÜ™<•{Â(0ŠBÊ®!¸éÖÿ˜Ù²Fš“â×êxþ.LÀj°@ÿ˜ Í?ö86>'r¶ Þ…¾45TäÉQ¢ÅŒ»Ž0FÁ¦óð¢kŸ°Ýz®-Fa6ŸSo›À´ÚoôOÜÞ0ðÞ·ÞJ®Ø“'‘À%ŸVÍdâÎËkˆÄ¬>ÖÔnÆç„$˜“ÄÏD¯ý\Îæ«ÇÎýY©‚öÔ¹Y%¯‰o¡îu.Å`‹¼جEÈVÜ©òt1¥Üo |ˆ»á ÿbÆ]è ;F‚Ͳs¨tµôjQ S1~d‡ž^š×´¦H 'ÝjÄ5ôK/„³¿#ëz4¼j"âÎÑww'KS÷¡~é€kz€ÐdHY»×7mg$íÊÃoüÃÄ7#üÕÏVIc±u»6iÖÒ„Iõ¤ôŒÊ—QKÚöîö¦¤XÐõ¾vÄcï[4וo𤫩¢Ï¶Š6¹ËÕ]†sÄ@ñ4â'à h!8F$X õ¸ãE{7‡"¹ÝQZ6­i~Ô59è°í“!£´Kz•änµß}F4¯€M{ö[ÚƒØ{#¨ õˆì³F(Ìùͽާ§Vó—w^Õýí! uòÖg¸­C#göA‘Ò½Ñc88гÙðÚvƒd9³A"v±–ùž ªA»fÞ6è f6$Ñû½h ÃÂâŠm,DÇ”@åRÌ”üH¾ðDAe¯…^$Û/h„˜Ougc…Ül篱ۣý6Â2Ñð´ñËíÕ³¸Œ䘩üz‡k;©Ýúûªeì­ÃüÕZŸ'¦rœR÷6¢âò…Ì0üO(Ž #¬IÓÒfšìCa̾@’ÕÜgG÷§´‚µCÚÄÇ–ðñÿ•áY2òlHóÉ5ÒžæØ]Ç` 1&vhc,RÄý *¯„/ZPÚ_µ¦{­—¸ð hV>Užèe!n$&·î¢©ÖhÔXú p@$–¢ss@ís®ã(¤¥e¨gÊݽ?+­Ó¢fçL*@òá>²¨·M1Ï.ÛF_WqÏÛ¤ÒÓqÍ ¹è|&k—Q}"Ì#É–GRëÇgäêÔÌgB⮞˜3Ø šB³Ýs¬Øâ>˜a’TV6CKŠ[„ܧ¶ à¢õW-d‰È‰6“ü×Cp´Gãâ—§VÔ:õ¨ÞŸü8á<­ÐÓ3UœYC©›n1,×r¹d¶w…EJ¨ª­¦Ï!‹DU²mZÇm3[d;*aùM jM¤]ig/=§‚fï z}³¸Ô¬ƒ„‚¦0‘î4;D\üë‘/ö u·&–N¼™—Ð÷‘Ôtr–R«ŠbêV˜ðâŧnÜh;­©1©Ö%avâóæ>H÷¿ZÑ;6L­ŸåEÍ¡ùí °m1ìo¬l! ªpüüQ]¡eõ¨cô½ (Ùç‡ ~)nšLVÉIoÛô5¿â;Æÿ™ÂšG±‘¸†78oÊ3ÀÅHüƒÀÈ<*ÐМˆu ùR3˜¹¦„€ôü»Üh`¸‘ü×CV«mÇynΰIÓQs¿eævþ3ažòœ#HCûãÉÌŒ¼ÐͶB°mLâPOh:£®#-3Û.5ðInFºz$)ºº„vxJU=cË—ª”~y–›º¬‘dIE5q±F˜ugvuU2Çb‹Gš”ùïß –±Ó'PyÕ+’û¼Á«1`£Ûßøàº"WnÎãéi¬UhÉ~ŽÝ?£æ‘R;Æv‡ˆ›ì3-¢V¾,Šð¤*®ª©½‰ˆBa­´O"LçbD À%›Œ…˜”ꦤŸ\T1Ÿ´»³’ŠwKy*˜ñ­Ê‘†|y‘p2!Bµ×8r^M_oF–½DÃú̺vòc¿ôYZ¡?î\t¾Ã=. .‘ÖüÔŽÖ˜‘ÿæq áZLš ÿ4j!»ü×CKAü5®øg“Ätqqéj£òãFØs¥ °¿0\zªÕ„4]’^™¯íÓ%Hq¸AHJ6„(Xè#ÿ‡™¦­¼;ÇeÉ<Òµ¥ÇræQ’\¹%8}Žäž=DÒ¤ËO'ÖÚ›”æÒÒ×¢S9£ §³“©ƒúÿ³9š¦ä@³'ˆºQ:@Ùw‘û׆ʶQ J!‘˲1Aa¿8)žƒ‘ê$¾÷’+Ug”¨å ʼ×B6š˜¿Ú+ ‰#ˆñŒ³S6)ºi8ý (¾ìnÏýÏ ½“t—à YºãÇh¯ÙË»ÖzX,AååÞƒÁ÷~Úuú¬Œµ¶Ê¢v¦w¢tèàªúèå¡X=«N/±¤‰ùÓÒ‘žÆà[åT[m`%ðÝ„LÛ¸ô‘ìbÚèØ%uþ%ÜäB-üVY`³ S,ñ¢ÎÚúš¢´ÿ ÉÆ['"îãóÁï”¶6ØfÁ¹Í°*oKZ­ÊA¾ŒKÅÏšfE‹ŸuåmñÞãÉ€ÿ›ÒYô'|õ­¬žI<Ø=R[éjãÛE„¥´€#CE3R\_º. ×?[LóbžÜ^±sdæþý…¤€]Ã_.»9Ž—‘ù‡õét×ÊiÐ(ÿîà{*›ô½.Æe+w8¸LñMa™=ɇ1òLŸ‡ÂÓCì¿‘W¼g©-–ä®°£åÇ^ù+,ä±áUNf~š† ×R×Fôþ=V‚øw3¯(½Œ¸Nš¾Ða©[–+¿ ˆ?ºˆb\ÐíX) uc­³iy¯g¹( kúD2 ÙåyôDk“üÚÜŠÁ\] I9¹:D˜’왞MåäpP+ðQ¤ 6÷gk„o&L뢧Žs=a’«¢¿Vv&W-£Š“ÇÉî7blA-¬¨A_i ±G?í<#àe;³´HƬ_@žäŠÙEÓ´«¹êh3Ç}tš®sFÜ+Çοé`=† Qhªy(Î ÎM6I®¤ˆxhžªÔƒìòþZ1U“:VÜëOüµ£™8¥¦@/š²fæo½°o?[y[u6Òå–zêdp–¼Î)H.®ô‰Þ.V-I÷››üŒXõGIØÚjšV‚¼O‡@6ÊnÇÚ¶ijÛ`ƒšµò÷ia0!ìÍþ9â&U\˜¬ðȽ’;3ú†Xb94Ùk„„ÐO7‰šDÅÝ#^žãW}Ç”¹ºc+üÖÞ‚€v¿xÁàz,߃•ô\÷dŠàyQ:‰W³èçPYa`¼åxC¿…ƒ±aŠ’÷ó1 ¶Ïœhÿè>G0ó'iÏ©—ŒÍXâ¥0þ ´ðcsÆB¬_¯ˆG›Tù9N§‚F¢ÿé}ïøK/C&–ân/ݦ ›±·½!Ã9hþ|l¦’%{w’u£$1ѱƣù“i¯_Cd¥köT…˜-fˆÜû¦ÁnI¼µyŽ;´"—ŠZqçmî^°›UösjGÑž¦ ›öí.Ì‹ª;Fþ há¼}?±¨ù]SÎá•o¦ñpL(„Wðfhñ6¦¯op%Ü¿ ñǾ­ýxü!šµÛî„K½‰ó³ÄÉ&·jÿð§‘,;üð.ø€áƒÎùúUfðAd™{©Ç"€Ô…i&]7Q¬" ¢ŸË¡áýj¤-wÞO™¤UÃ~kÜ_Sw º:ü0¹u;ùàZ/ÀV”#@Uö¬/;FþÌ4Oc›äDd.PÐÕ3@·ôONÈ/]W’©ÁÆÊà,d·Êa¿ITL }™·8º6ç¿ …Ì®¡˜Þ©ûZ7=šÖ•¢(/¶ê+uLýÀÀõ½^Æ!?´ó Ò9‡¶“Æ€þÄ`Ý6s†gœ`ö»Ä +Ê%è×î÷8êr‡3åƒM8gº¢ÑÅîéÕ$WªI&ö«9Ër0Þ¢è}A<êGN@l»[ÕÔw,,Ķx"’)ÏEdz0a—«öð"¶³g–|^É2KÏÿëë)‘~é׃W”úh;;BÝóZßâÐQç>Øõ ¼K¦6.áë›IH¸5$¸ƒŽY°‰Új üð.ýßÎQ†ûÏ÷¦EGêv{y¹xÁLsñ쮫ìH<ãºÅ9_2½ãlŽ8¯ˆkÉ" …É8%jñ!•¯ç,¤‚xVýfì}5ä"ÚÖvg±$»hÏè(cy‡¬LÊY„¦Âýb[²LEA¿ ¡CþþEz¯1ŸGÛŸ%¶Ù‚:pÖ‰¨}¹çX4{ƒ;ØìÌ—ž/¡Ç[ß³.Ý=â”X)Á×t6+zàóCdÉYoEe#3—Ø’PýîÙ }á»}™*0äØñhm;¤ñøÉÍÙÌ–•à~*拳Xå6kÕ8{¾Á#:-¨‰9ŒðetßP5¯‘þ}nñ#šeµÐw=ìØAž~“Ÿ+o1¬êÇcUGÛÿ÷¹çÒè€×ã]»Š#Ê ü쟻à #à¢a˜ ¦< fi'Á²ç`ÀFÛ™Âa9° Íô]5 )pkز:%ôKÇ=PÞ©{ìcuº#r¿<9+j ÌiØŽ— 0Äá°M¦ é›qU¡*އjùœ­ ^©…@“ýå™Ô„Ã\ÊIïL"å=,>µ/W?Ŷ5ªd»¹þ w`b•µU%f¹.ì½á¬pÄf©t!M2nÈ ­4–§åÈÔƒm¦4N]y§Ùak;ŸŸ—ŸÀƒ§¡ç/Í©÷G&dìÂtE™Ÿ Ñí.„O2S;pW–kh¸5ñÇ텹Ό´wc31wÒR°°Ý÷IÖlœÖ’¨f~(¡‘˜´ÚÿVou|ÄÆ0ùŠšnš‹nïòÛVcdOý üð1µ…;⼯‹pùgï—"¢U"bÝJï®"•5tJóŒ&ð£&FÙ¶ÒM » &f»†ûŠÖÅx#pÐég¨Äb³î7d%®Î0N2ÚÇçOWå£6²Êm¨ôå w•³Á.Ä,`ý?cí¬«aˆ‘ìÚCìÁøû”©cbŠww-î骜‹ t[kPÆh3jìWðœ‰Ì"—0­ áû~%:˜­I?4£pOÇ#¤Àzr÷d ‰µ+¨pâÛ«‹ç—÷È‚–í`N@iÔD¿‚MÔ ß$΄ÏV%Dr@n-…d€øÍŸnù­ì'ÚZ(pȂݿqó zÏõ•,h•W 49GãŠf¥©õj¸k3œØ Úe´:$7Ýõ´j@"Þè‰i|`WFèSoöÙ&òýòȲyµrcôw”(Pªõˆ}IÚcq#¤9c)ÌË>ºÜP1)†]ÜÚ¸§¨1ÖIÈ4³² ‹©' ]²…ɧ]†g·8<“ë*s¡0RgJOmóõD¹ÒJͰ~aþ‡‹âÃû\ú‘«\ˆB3d4‘¯J~Mr̫ǯX/^S±+¾j³,0·¸6)G­}¶wQ³Ô#tºFô@5º»ÓºÂ„ö “¨K;\mühO_é€E n~¡Â`Öêƒ-¼~Æ‹ K[_9RÁâI×<ì—áqÅ©%`wB€ üÚܘÓ8íÎ7ĸxÖ&hˆÊܳDÞ v¶~H e8ÂäÞ¼¸ß{ŽÐŸ%j¼– Ñ8Ø—~Œ à •ü¤ ØYû-ÜÓÆõHc¼¿ÕJæù+éL*a²_ÏU4  ¾¶nLÔåôõ°úü“n>‘†ôÿòɯ¥PÖC1ò #™ƒŠœÏíö}{‰møˆ¨]Ÿ¹ÓÑâbP9m†œ£¤BBÝu®=¸CVQúvp…¸r=žØTáš`- _„ç­ —±¾7Æú×–L7'=–±ÕHº†kCÓ!{›ÒɪyC“Ðl¨·Šs‡#Ïw<À˜î/'»¹€r0$]U¡Ÿ Üq3e]­0æ¿~H0ul;¥u4íúü×G(Æ›I!¯Õó T섬5Ôü‰Ý+ZBj˜ðÚ/b?íUw­A"\€*dg眾еOÞñµ/_GÜó?Bø½QõÕv<<ýq¼vk»[t`BÃò»´‡¦hȃÝ\Î"Õ’rãŒV…ߊ½@©Vtõ(\Œ{v9È¢Òºc‘n1KŸ™ÿ†€ÇæÕ`|“~ê gSÂÛ@~73yþ>*“dëI’˜¤Z,}$œmµ_ÿ["KëapÁ²ÁZËcš.f‹S*ˆ°‚DR y¿öÄT_'Äi@¦ðŽÁ€cc¼&\Å9\›ëXºì*T\’FNÁÅÞÌM‚ï¶»;æ4Ûú ¤Áƒo.ù¹¡b«zúæ±éQïZ÷ óCüçG"üÕZ9-œ½wS­Ú×µTZÝ!6<äÅðŠû‘µèãÀ­Ë:ŸBwΦ¸CªÝ‘,,F¼¦9gLw£ÁÂÇ$”›£EyVŸ¶SšöØZÓ&íDÀÛ‚V’Å]„Š-‹Nw`h^;5³Èðê!÷1“$ iº+Ù·¡c áÚèˤ£‰¶'ïH›K>€~ál÷wA ÅaEiݦò0>.~‰:9`• &°ºå0ŒrJ„æ‹Ø™Q¿ÉL­™pY³ <ZX¢1mƒ ö±Þ…ñú*Ü-[L8÷k[Äõ¼ëÁÚ÷JWI)ÇÏ€ÿí·¡®3È`íP¿Ÿün1M˜$Zÿ™Hcswï­rõdËp&§úS»ó¯±*OœÍ|`Û´hêvÆ·±|Jü×G ;,KwS£ ü3“ÚNŒU‚C#¨Ê¡ñÕ§Ñ«.óÉD”ëý¶L&j\Mòí.j:°Eéa(¿QÜcóY¯ç³{.‘òØ÷*ÄÉ`Õ–8°•<áã÷'óelÝ.X1˜S1¿÷lËq·2£òxÈØÚü×CO„ÿ ™+“;U•ëw?·ê]d™üVðŸ8PòÉ Æ…Îú0äðB€Pª{ºØ‹yÛøî.ךÀnÐ\Õ˜X¸ÓÑ4(Ü瀌¿6ô‰(à€ɤ0Z¡šÒOþÚq €Ï$Z&:<°°ÝWº„—ĤÐbnSøX­žÀç‰4K]L $ûMÙJ ÄcÙì{NOü77YQxægá fÀA#}Ô4ܪ¿>k¯¿bÁí]° cé¦±Ñ ù¢ÓSnˆüï‚ÒúubŽ€‘ñoFAcÐú¸Óšç`k/$£Ý`³£ Z£vo؆x†?."DGß6®ˆŸdSíÉUËbKVWá; E@“GF.ê,Ã.JÚ‹ ؾDJÍ–¢ŽàÝj‹`C=~7rOggSÀ“›O!!€ Dÿ.ÿ.ÿ.ÿ.ÿ.ÿ#ÿÿ&ÿ,ÿ4ÿ6ÿ:ÿ2ÿ-ü×CJ»ôªT©_š¨&¹hlòÆ­+ZçÒj7Z‘ìªG‹ï6ZûØuY.r‚T„QФŸBn«Ä õÿß½4Vþ¹)_&¾0IUé5`ꇵ4Ë軦§ÉŸÚEY¥ƒcXž·aBÈØ›_¬n«îÍÔ‹W‚ nQÆçx3Çú¹ŠX§ò@tKèUÞ+~Þ€óûÈÄé2ÿRÞ»mê=i øPŸwñ•¬î·Xæ´ß+”ÀFUŸ{tâüÚ” î •®OìCÜñ9Þ˜8ENÈ¢¹3jÂõÌÆ‹sÏlW»÷š,5$ÁEõL2A³Yx{îL÷ºsÒ³¤- hfèà& @3 Œð„PYóû¡²LÀ¶ˆG•Ø·ãêÓ^1ÔØT3NkXi"›ß¯w1Ô--ä)hÙk¸Ô«b¶¥R£ò*d”¼IVrÁÍ~$4™‡Þ •Œk´÷Ñ’híÉ„ðnUÃÚÒh/ºüû™Uº©bBÖà>É‚Ôþ(¼˜§‚³àŽPò´ Swу5söQ“AÞ¯ÛwnÇïT¢ÃŸT÷rp꟧>Á ¡CX|Ç|Ȋʸ‚Ø/èà Õaìc2$¹Jq¶ûÔ„\ÏŠë“Î #XŒ4}5HTìBý$Ÿ¶¥Ã–næÇ(:ü×CTU çZMþ”ŠVÎ{¶º“Dúy6r›s&3#×úUõ‘R…ó­Ðˆ>eº[{d Ä|+“6Hç]˜d~EÔzšˆR‰©­Å–OQÀ$$uÀ,j,3ëaõÃ}aÀ}¹h3ƒ¢(ÿªDvѦqx,p `ðG¹ªU g\'a¶¿R£tmg~ÂÃé;Éf>Céê ~¤È9­’f5Þ’=Qöc€ð”\ZŸ»þ'è‚…Ù\Wgç1ïáÑÀJ´›®…r²WÂ\*ôñ„¥˜å!Qo¸z‰B>CHJÙÅ¥x]^§×; F“jü×èy™ ^´*Æt 1¹$fë ç: ~§…oüß*¶«¶£"Ü»5ÿ P@^Zk6¨™½]Ã;œÑ^$Óæ”‡Îð Þ<{r¿p1~¹.JçÇòAÇѪ3Üøkao#Øé@u4zürzer/Cÿµ›²€µ’p'œæ‚a?rã4ô<é£ïur3"šÿ) 4®™‹ª´ÅÝ.¹t³a|zónóÛøwã™™™ö¸P[I<ÐotRVÊ~ôº÷N!¥yŒØÄ”ÛxÙÞv†~Ô·Ž2öG2IÓ[T Íè_ˆÙ ¥ç¢åÅEZh‰<ÄOx÷5JõØš{ çz+¤Î´s8QÊü×CKv]<• ˆY9¨èÍp2R©mÂ>Õ¨Ãy^f€µ€7~Ld®÷Nl`ÛúøOv^Hí7ˆ#×3ê”#Î|Çu!8BÄ6`s>6§6 >Ä!˜c¬ìQ×+¢x°öPâ2öu,ïF‚,).r…Šsçñ™²„e›ôú˜ðC@sŒýÉMž›îõö죑6¬HÐ&À»ß=÷sB@2DÇ3ãL*Põ»'•ÂJ;QæûT²C™2{­ÄÞ"'…K˜@–&`€o†¢ÄÁ3 w)~ÌÿÿúLN6wi\q‹˜¢Íü¨4Kýc2´fšžË¹çêøU×¶[¹"G“ «Ä Ž•µå³qoû[Ý´Vƒ:©~‰ü ¨ p9«AnÅþÛ¡1î§E_µÇüS* º¬¿IX1&¢w†i]çÒ#pÿKÉÝsÕ¾}EZâ8rßLp†³æÍilzÜúp›>2î†iÜU¥eçwms”€ k™¬ækÇ‹Š€»þNš‰p9ÊÀ& Ò3Êö¥+à(š4ŒY¿øY Vùr ›oKêw£ÈY¬ˆ”2:Ç¡|aM‡åygÍRŒ[Œõ WH'= nÆñ½U=Ⱦ¿Aï»»=oÕVl>n¾ÃßÃEj Ÿ‰Ñˆ†K²Òr$è(`C9ޏ%*|=ÿ½üð%‰kXˆ¡\ÓõÁ¤_td¶¹ç¤jÖŠìŠÏíüð.æ´uüíEÝ6~Ýprà-ˆ\GGt…:Â÷8cïò*WyîsÊ®hQòaªªútךÖSm蟌´pCpísɸ‡óCþI||}eëà ‰ÛeØèÖ„SãjÂÓÞ˜²H×Kº©6&ÒB†µ›`2/›&_ÏÕz:tåÀ]A¡lóÚO„È…ÝÉ [,äÕm,|tr 7+åöG<ÍÒävCÛB±K¸‰³¼Ë"|ûkw¼`¨~jMK8²àÆÑ¹D¶u{ $¨£†?“'œ­~¡Z´c¬Ý’* ~¢àÓ¡ÞÔKž?†ŽãGüWH#¹h”^ÌƓ^øû˜~aáŠn^î²0H+×:å¹û.˜6è üð.(Œ¶lÞQ±.iðxÃmZgrÊ%ü·mðôxYM²yÒ€S3ò£e®Nh• Â³±‰ᇇo\˜¾ý !{†ËU2´ÒàÝr1™âR¦` q¹ï!"gsÝ»¦íþr ›+@o#Í$Åz‹±4`–îvIÀªS¾AApûR8•›Í¦¨é †«¼vÿo¹<ãjMÃh²jT+|ö‰¾’,!.Å'Zsáé8ÒóàgȰÏa|ÙÁÀzj­WWÿ©ÆØ~¦ÐFŠXºI®¯¶·¥ÎZÎKÞ'~1Ï­JûfúPÐöݦæßö¨n¯º+e%k¯Ð²½–Ü´¦sÕ™­@Jù8ôsR´ÓÊ7w|>à <ƒT¦7t”Á 8¯‘ÓÌ`»¼È üñ”g$C »â¥ªUIÈ“½zp MÌLyN[¿S-!Êâ‚öžÒ`•±ªG­kù.ç½dvÉk¶b$ǃ¹JŠEÇ|8››®Ï”K¡Ã—upÊorÆY3`Aü><¡(‚~_¾1 ž<;kyë<Ô$>ßøe“lâ¤Wp5ÚܦÝO<æËg|GíÁ³T€ùË…YסŒýOOýCâgÉ?w5qäѧ,àTÃ4å¶aÆm±ÁxŠÇ¦’ã«øÓù®B ±Em‡I}?Fë=cCu±GMr¬±îhã®ùç‰ÈˆSÂ@÷2;hè£7ò,”ý™UïzÎ'§qçÌÊ€‚(üð.ÛNÒJE‰óÕüM#Aà Ô§Jš¨ƒˆYCÉoÓJzÛÑÁZÞ ]ÈRµGHª6xöº ʯcPWM›a£9ÐÉŽ).Ø7Ë 7•}¤ÜÉ · 'SDOÐßÇŽÀߟc¦¢ÒnÍBf‡m»þã.Ü}ç;¼{öz€~®½ØYÉmâ]qR¹€äÉ eIû=3@Ÿ(2nÎ&PDPoÑî‘2Às“ÈëPoŠvG/îý’Â9DSfñ¤ñrÒÚ‹ªrnŒ×taâGú=úúuˆI̦V»º–Ï×7v¹ªÇ”¥Å‚•BÜO0¬Ë‹6¢×6¥U¯i7h’ãPwÙ_ÔþXÔó!ÅT‰îÙ ¾qóŒê4ƒ1EÚU½’¸$»+ξ ÁP´»Šüí$åR4¯«ˆ,ž¤LL Ìjî…Ü£õ!viåC^“àLXÝÙg)³€…¨þoà¢6(j:Ülõ=Ê|òSé­[5o1øØ“Ô•5׋\±á7ÔNKð…³šóõsö58€¨ºÅÄM™'ëùŽ8)¸Í.¢Z2zö5› ˜%œäPja£è¨îñšPÅ눸ôF^ìÕµ;àèݲ@u‹ÝÉa¼êžçoÛ (ˆóŒkàĹÇ|v›èæ*¼}KľÌÑç¬Få£à%‘•æbEÄâCVËî-~¸§ïÉÎP!ëšñoþ½¯‚…a’«)Lu¦º‰dþÑè˜g ‘€ò0þ5¸ÌªuåTþ”_8áºC.ç‡bÂú?é°(iÓ`JDkJ/ˆ·¤K‡“TL À;û>: üìœgB(¸^O5éžêöc©ç/aÞÐù-’æhÈ6*ùmÉÎñß1k"‹o•»Øá²jÌ7ªÅö¿ÜaƒSG¦tò«Ò%VµCG*oý-égáIo“íBË‘C‚äýñRþ?Þp]áyÚ´Dܠʱ%ü¶/5öê8üμQ“åbæ·nÙÍfÊߥ½Â®wò8)Üd åê-XYdR $Ô>H Aìÿ›]àáex$Hù™ ¥GT–Mù·T_p :Ì1%*óQ4Bè0®O:ð`}ß’=A3B°¦4"¦¶wsÓy?x¬MZ)¢O‘0³Ðh,TTh"²S¢ '!ÔAÿ}.šÆq(çyÁýGàb}L ªM©„eëʬk‚µ/’1èZè.L´`B‰“\n÷OO¾÷Ö8¡OñŠRÅÀ†¬/a~ù¶i€ê»ÀuÁ¹šEÍ‘6ÜejYüq4ÉqО=šáÈŽpý—á[ÔköèZüí'à@PhM âø¨!ogiVôô¨Ýµû‘Q)c±r†¬Gq¼\œTBì<’5û¸ß×9.3ƒùT1òϯšÀ?½¿ÃƒµCê±-ìwŠ üì˜P¢™ÛÐ?3šj,‘³OÝ·Ž>ýì.Á Q|”»h•²\&™½êbkÎ7Kǵ¥ì®›hióMˆŽˆž8ŽíÌ¿õ³ËgÂEÌ{úѧ‘y20BaųFõÆÓÔꌡyñKô!l®%B :;øÕÏ|q_º·q’º%ŠvuðºTÊv¡˜´”èé/$o;fùæO2è6ÿ&(z€ÚŸ|ñ<“{Ò"¦ÉœÕ9tÚ˜þ/lÊÏh¿%¡á25¢SØDU%ݽÖíÍÁh+Ú˜ K@0¼èkkéñ‡—(MsiA²×ÄEëúT“Ðá_À7&§0I˜ ¢5`c¡I?Ís7QÂ5 ,¾‚ŠŠqÓs†œ·üÌê“ ŒaÆž5 J üìQººµžY¶…R -Q^81xm6[DžÆÅËKÀ·œ½E2,á ËæDŒ/÷½S›±¯Âyý½–†ý'uÔØvÒ%)5ähb¥–v{ZÏ~ƒÁÊrÐT|_(¯®QÖbŽtÌ1©XÕUZÔN ÀT˘³röû²Œ´WaS“R£¯³aJY¥V};ùÑ}'=·n\§•€´ɾ/0yÍvÄ!EI–k³4… hÓ†ê¼SÐ!xºâr€k–½lJ±Øuɸî…#Å•à vQ/Ëwóæfºj†C /— ½w‹'Äö²#©@ ¡¢Ü¿S[âà}8ANè\äQEÅ÷@säÒ>ø“rŒ± üS^ͼEÛëê~•b³Þ®zVšÆöbÜ=(ôqò¡)Ì-|ÓÌֳʮú'KgkŽÎÿ+ë§vEØZ˜ä)ÂC—r­rðȈޘµÞ3GÓÜ7`LSÀ«ÿE·L˯€›ùBTpÎ]7ӫׯadÍ3ƒÐá?p|±E ¾Ø8×/ß ïx·Çé 9“vÚvü× Y^´]¦µ:Ë>ê—¶­^¢ôSÄjv®Žó#Mžz›f88½(!~šˆ0VkM}õðÿÁbÀÄHÄ蘜ÊMhÈÐûdlüŽóo²éî«÷ø@è¥o‘¹ää`Ñ|$-6jB«á›6ÿ5õÁÝcxQ}%véw¶ªá®Ež×¶½üfÑ©M‘¤ñ3êó$“ϰàQîšo9E1e’3gõ‹ù‚èÒ}×Rv«¿WŒ\äˆk1ý“‰Œ*º™¡½È]&¥(ùÊ ½BüÚš­Á,DEV!B$/Þ:´p£ŸT1oÔ[Ïßõ5{ÝË&åG‚ºž mÊ¥˜8¦óÁ5eƒ—à*›Ñ–½3?]AªDÊ ~ÓµoxOVý  l üïÜâ´j4¢7UpÎn±iøýä)‘ü-«cïm\mq$û¹ÊÊ|*WÞ½ˆà­f—å=~,wìkXn³Qs¤E4~C,z˳šsäQµëÈ v¥{§ÛÞ­ôV¨yÏ:  ŠvëÚn u4‚d?;å¸ Ç êu¨T‰?„ƒØ ¾Ka#›mJ“®Óîht ^%Ø…liØŸr³Ž«WÌyExRÚ ÌÏ3‰wª{JáœÐ iªw…š.¹OP{J9Q ½DgLjôÕú'–t’KsŒëÄ÷ÉÓ$š)Ò@KC5Êo’cÀ§´á»îB^ÆN=Gñç‘Òq.cd©òsÀ#ƒFÉøvt@Ô àê›Øµ ô$Ú+¶M4Ñž|g¿¹.mêüì™1¬U siBÕ3Ä'ÛY<æ Fß Ÿ'·À $ø’(Q,`Á‹!=°º Øaßͬۑ¡Ñ‰”8Ñ‘TLȰ¶t úl¿7þjP ‹ÏYÊ;‹=í²LzHv ¿W)þÅÙ‡V3v# è/WvÕ‹tÅ;çCD{4îtÉÈZ(°éò ©ÕçÆ­F©¯ˆ§×é¨ÜÇJŠØFÓ®2]Œ`” /a+š†­lPb%Ó$~Ûàû>cþøj6Y%$îq·Š¹H5{]P‘,yïu“fÏí®?ó¹Sp-Šgëáh.»ÖlÍIxñ%#N•÷2?4~iÜèŸP[‰ÀS@ Üëªêl ¬.³>à-¢ú45;!U^gWE: üìœGÄÉŽcšðüѧbyN*5¾¦ ˜ݽßV­Õ q6Ô)…Íà[ØtIÀ­ŠŸ¢i<ŒGBm¦ñ›\¶¶mO±TÄ?rÙ^·Œ™|¤Q[M$á俜Škø_„6tÅ&‰çÝÃÇñ³ÞK µÅ¬ ²… ­Ùšˆ½\ÁFïª×q‚Ø5xnî¸#Š„0fN°¼–$ñ2ƒ°óU;äŠÀ¶l!*s8áÁ'3i~‰>ö÷¯;~Y{g[zž, •Œ¹÷ã<üÙ˜,t,UŒ~½mõÞWy©8Yz-CE"hÅrÚ§xÜÓ© :瑩èöh„ØÖ7Ëïzùǰ™ÿýsõ‹l¤"*ê¶Ë¤ŽñÀ¯õèú'¯¶CI*ä'ä`ºŽ(-F‹k‰ üð. +QÃÿ2^€e=º×0ß-#Šç„höiwÞ ý½Z•‰{uISë€^øY{jÐKPh©\`O»cù‰Rh$û ¡È|š€9[µé­‰ ƒ2¨ë–Bóæ=l>¥ŠíQšê áÎèÆX˜Æš´O>æåü‚œeñ–ë1ôéqåaèáΕK˜„Ý‹"Ä侊ŠÆ¢Ù$/“ÒýŸ`ªáó +uìΨOYÓû§cZ&fº*P¯:]þH jÜKñ‡¡dü¿-7×ÇÎq*VçH6Q¹^aàÎÿì»Awƒœü±ÃvfXXS Q‹(Ýbò—"¿ç*‚:-Wäî±Ñ»ëÏzsq~ñÞ]ÿx}Oü·Ü’ºnúüð+Ѷ’ôË”èî‡óFõhádà,Пé®Cz|Øã÷‹[ØjDÂ;ŒbÂâ°—ëJäPŽîÜ<•êåõG÷&‡~½]ô(çD._ÆqO¤°¤T›"c.LOôšbÌ›¥ü«crŸÐ]Þë0]ó± °íÜ’YMOñ¯Äaž°6`öO† ¬Ãõ]Ö"”GÅß¼ý ˆÐæL†"¸ž´~Í ôÎ*þø<‡DÈŽK¥Þã§ÁòKÃçðD÷'­@„½\CvÓûˆÝ…måÕ®Xz䄿J©–€k$šî@ê‡zŠâÛ£ˆ0:!ÃYú,¨Ìå„K¡RÀÈ1šwÑ vIÆS"‡³W縙.f#H…´âþܯè{kfGÛùÙFÁ@SX«ñä²Z üð.ÛTˆ|˜øˆÌËÕÕYSJjõÅÉŠ wþ\ Ki´F—3Ö LÆAØakÕ<]êÍ(\ŠŽöñ ½hÄ)¯·ÕaNOº ¹Ö“³‡<þã§ÝÞe1{ÖtìnË}‹ò ÎN§A–^Ó}¢2»:i êse ¼ ´x‘$èŠ8>­l¾qìûØ>A|ÀWT¹w²ô%TS¥ü‘Ñažp÷â{"‘L%¨¨zYŸÓ^ û¶<“¡™‚²U‘ezõѶË$ÖØê{9Ohx?IøcE%uÝ.ˆžÒ”¬ƒÃJ/cWÊ‹â?‹&N}É»5×±7¹Y_{ôÿu®žÈKÝý§rKÉz¬$CU¹å`T%eÇ⥶ЄÁöM2kíø°ÏÚ üìœ+Í'eTÔ³Ú9…ÁiI™3jQ§,BœŠ£ª š®ÉUYs`°—fñÖ iMÎÔ@Ôl(½VFo|U«æ1‡x….ÚCrPŸ]ÙÇý 86•ëzž ûxG]kç÷çéã§3‰úÛÔË­fÖþƒ$…¨›ˆ*¦êmÍd1±=U®æÞ ÐÒ‚\½„]¼•6½k†³è8Ÿ…hú‚¡k,Á_Ó܃°ò÷Ë%¬0/¸õWx–†³¡÷íJ ¨Å*OggSÀü›O!#¤#‰fÿ+ÿ'ÿ9ÿ.ÿ(ÿ,ÿ-ÿ/ÿ0ÿ+ÿ.ÿ,ÿ9ÿ.üìi{E5” ‡¬reèÿðhÂt|êà¥CüOäIQ<¾h&q~¯LfðÙ¹¡„;aDÒyS’^ –9»Þö'e¥#ƒëÓA´Ù5Ê5¶:CôoÛ&ÝnêäïQÞ+þŠD«ë¬y³ŸŒ†ëµ9–ÚE  {³ÍLº£IAÚGŽr2÷Ôæ„Œ+Ë—-âçqŽÚ1æ éûªªj¹"\LƒÈVêí,ùf’ãcC;3ìv$ãÕh!sö»œìa’Òãæ9éXǯ¢ò.Ð7oì–·jE…ýðòƒÒV¨5X•8ÜåÄÜttîwàÕóN²Q²Æ¿wÞóÅbÔ_rrzo¯ª,G]N %ãçäs~â´Ô|Žg³·DÌ üÖäÏ2š_7È@T‚Ñuæµë¸ÕåÍ·z¶¿j-á´©k|»rh ”,7eæ2²R{ëfAXëè.X9…IìPœÅŒŸY"ŒÈ! ‘ƒµxží¶Õ]#2k†ã2æ_aYMÑãû]ð~<’ø /0Éʓ˅9ä`3;Dý~Â|U¬nÅË´c>¸÷ý…{£%PwQ£MEØÖfé2î–s@¾·Ê1)®Z¨›³ù±°ø¿ñ/wö¿ÿÓÌF‚k$uu'¶…†Å>ÿH´Î @˜:[˜)ê:uzþdJOAsQȯ~Zp±’.ašQm.î¢(©?ô¿­P^hˆ\j­% æ¹_ÙêÃì¶ §ÀÕTcè¢ ßΰã2\á1r¨û·OÀðò$a5Ú^ªK;Ž{üð1µwR/Ø™V>YÅ«›3ZÕ´;JžÚ¡È‹RÞº,ŸŠ/û´°ïkÌZŠäZs«up•&a!I²kYU½ø“јvìAÞMÐl>:-9Ý~—±L±̨êsKË5©uÞçNÉ'®=‹Üo’ ˜ù Q6‰Q¼éѾÅÖaêý°x`{ô¸.Ä2¨mˆý䲊Ýð*5[\§2 ¯VìéÅ·ïíÆÆyû»S–NyT$jvª ¹1Q¾oº@ã-úˆ%›½> zèJMê8ÃW7âÊÛU…%ÚýADsMöçËVæG»»ÿÜ›TªÚª4R $x[±Ó·i _üëÃàB®Y”wâHds¬Cã'WÓðíywïù¡²Ü‡mŸ#çn!Ÿy¡[]Iè üìWùez®fIMì:/!£ëîxáWbOm¡óo»3›„Ðÿ&—¬Ž {<" È[Ê¿a eõº1Çfxü3”š™\”kÂì*²méÇÆ<¨â¯Ým%¾+ŽݘuúÑꪕ¡l#¦û>ZH}@1¸©•¸²p‹#ò‡ènØæï<.lùoAþ†äÅ´pØRµoØ7 ^$ùûùYK“âëóüKƒ÷EP kSòISJ„„ƒÏ¶œ{‰ F&'‚—SVmR†6"éî÷¥¤~×Àýu¼S·#n|˜\·sÄXÎú+ZlU%2LÞ¿ÖinøýôÈ B9©ñÐ}mÎ) Äî*÷PJˆº2,‡¯ñïÓÒöY|w¬‡!(ùèEˆ­š üìñ7$â±BüäÊëšÌMÓ¹¢¡³€MEöc§ˆÐGj‹ÊQ<¡{­>äÉ•Ð\„¥ØÝd¯k*Œ‚ôyÒ¿‹bÈ|A·lÇàP'r=6çùPOþ^}p&ÉÊVl]¾ÁL€‰#9 èö‰5g=ó#ìJ‹©Ôb£ÀÆ¢N™‰<Ж»!.É.®ëWqýHåõ]üŠÞJ!ŠŒ(ï$€ã8—„ÿ8*Ì»t~ø’5~÷gô€< ád}ÞÁÏCÍV»3^^oâß,å$ø¥Ô·úȰS ?ÛéWÈ&¬d² ˆà!â˜ñ° Ûb °o–dGsHf¿ÁËÅZ"ě؜—KÅ` ¢#><½#|N4çæ–ÄÜ"úĶnŠŸ¬a d£Þè:üïÝ $ …º=Fp˜A»®„í=(†B—¼fgs¡M‰Ž)áúÊ–W¯yÍÁÒ]R@fˆÐëµëG)qua ±tƒ1~Ôá0…V‘¨/¡<´4!U=)Re<”ÑÃË/A{uIžä¦V¶TLÙ+îzà.âü”¨yóí+mŒ±ƒݨ×dBJ¹=5ßfúÜXYý5¢G8í­ÒéµS£1;­€ß\$[Ö)¥¸†wÉ Q—BR°?Ž“Å~ás00¥»ßÊÅÖ5 §~{\¨ïr.ë‹à¬wÁéaûîiæ IÙ®²/mhÌžÿ¤"¤f?l$5èÁçݾ€+ØÇãD³VVŽÇˆZsB÷dMÏMÂcy.™&¡öªsÑG¬eGµÝÜËdŠÕz üí;?¹¾tו”Ù5 ¹ £{SßKo¬–RKPaVg+â–‘”}½?q ÂÍk­¼Tˆˆ :¥ß‚jÿ ìÂ)ß™àþQÜåõ@vŒè°5ÛvCÓ(1êF! •©º¶ºtœEÚq·a#¥V‚QÚÐÎͽ„-F ñÁ°5¢ÐЄ7•ìn©Ø Û f”æ[É…`$ƒé²Ú‚ºBùð~ÝïÛ$r9_÷ý€Zíßr[§Ø Ó’äi%à\¿%Ë*ÐéL`Úºbp¬e³Qr±¥*ª˜\¼E1}ð4¾/ ðÒ@`üÜ>ÞÎRÝ¡@’êå ¾c(²§_Ýäs D1g5‘óÌÌŸȣ¨ÚäÁøÞ&}‘ø)7fÄ üð1fñ<‚ƾ[UOÁµZeÆ»9¸1’Ò¥ªßð¿Ã‹F2¾á,fT›ƒŽÓUpo¶W¨]_ÊÆš9Xãã§ ·ß—DXDùú¡aKÓI0i¨êw\Œ¿ï}W\¯Â"w$8ϸŒù<¢M®!·³ˆøŸ‹4¡ ùb“%ÃÜ 7ªu aUgXu®,Y®—ʼWzwÄ)ÙX†Y>9ýI‘¢ù c툷±qnŠb¾ žëŽ:Ü¢†€ãöÆ ghp¾Tá .Þ ~8+®ATÙ¾ñýÁÏÁvüŠæÔ¡eRÃò},Ÿ=-ëØ;d£“^†àOm?>Zë¦'(Ã(Ó 7 @þ,’p+¢[ÛOù?Pb™T™J­û߯L`ëǪ›¶0òÄDÆíŠþM†šüìi–ü>\¡ÓTnRôÕ·ˆnoä øÀTOK ]þÔŸ»øÒn§âÍeÏl4® -üB¨dF\£Sfx§T±R£#¬ë¥ã²)àíZ¿Ž 8°‡-­sÊ­|‚®n4/÷ë/1mÏèáW¦ôo¢ÓLÓh£†Ë?6PÊ €ÀjøÇ?G¬}#²®±:*œk­ª 2•ˆÇ±ÕUÚì÷¤|%²ÚŠ4Ã&10ð“LK!ªLw$OõN0”c­Y’îü_›haËx2¢ñ^F*dcˆþù[w‡i²ÁòGÄaÃÍ/OŽqmx$Š‚¬—¤]Ùèvöp÷œ¥ 7@ÞNŠÞ*4¡@>p˜ç9Gï¡DzN.¤µ¥Á”1—é!¶ûWjüí;?Çk³ùZ_: ý­sod›" dKÉ EƒМðÀRJ¸žû<Æþ—ö]<²´ß¡Ëor cèàm |œJ…—×ì e°4\y¸&~Yèoø„S0íÓULñ‚¡&åšy“qÊú¥µôÆÑ%-¡JĽ¹±ñ>¸üu©öKÑyÊR’—ÚÜ€à׳ZÈ{ç°k|¬‰e*Ä2“âšÊ.†ß·›»ð‡§‹÷w«uÚÖ‰³ÓÞé¡ì­…@¶Â8¹õ%–¡d(¬UÞ©¢Qþ@´Ùyj£ÔŽ`»ÈyÔ„˜!ư’ÇÝíä´-\õf +åãÙ5+-D>@ö ]ø ªXÇ.äJL8cTmÿâ{ò_¸ž§òÏÆRËÙDIÜ ‘Nž¢?¢Æ]ºü육þˆ`©j‚꺬‰:ŠöÒdÙC·nR½Áºuå²Ísa šÛ+gÖO àÌúËí¬ѹŸÀ•¼wŽºâç­y0A’’ñ®Jϸ\F˜'³•…vþt›(ø×)KæË tª7u‹:’•ŸÐN4"¸O-Bä´è(¾+Ðen@}×÷æ’…6`ÊFóDŽÕ9·ÜÃ,ÎCúÜ©Cz#‡žÊ‹z†üdfÁ••ȳ dÙ}s¿p¿V„ÍsÙcZiع¿Áùб/¹ƒ¶Žü¶~.íJI^Ä#KÙۅ#Mq5ް ¢Ï¸d.ANƯ‚C¼(,óM}Q¾øë΃sð ׯM®‰f€¥ ÛaM›!wÝ‚X€‹èæŸO¡›bª¥K&IxÚo[–Ëtˆ÷ÞåÔ‘ÏL?Ñòæ‰ï5ét¦÷gË*´Kôa-ÿZ¿U‚¶ö8W-ŸÝíç Q´Á£…ýyàÊÃAZA™WÁd¥EìƒÏ{¹øÎª‡¦ËÍbpuW³ß”œ2®²Z4L ¤r<‹B‘1¶ïE’æ–!óø2ÞÎïôÑ"éû@w] q=[üÕZ:fBÚ¢F kì˜?_‘ü¦)Ê7}™¼GVI—P4üÖÁÎÕ~3¢0D¿}rÈC¸ÁΘ µ‘½~¶$+zÿÙµ“Ù±™‚XCõ¡¾ù[/Eh¢ÒqP¦®ó3ý#¿ûŠB¤•ºÕ'Ÿç¤^¿.ÈnÁi*£†yÑIýmâÞ&ÀÊ µÌ¶Ñƒ1S×§ˆÑqX6¤”îTmø0¡Ò<ˆö;ÈH!ÿ½p?ÒÁmGèˆ$€` ‘Q%tš¸úÉO¾´_x/b‰7 ~^Zi£e¸K“ÞùIÞlŒ¥¨ÇJ'àí™gäß.ôZ²¸¢Nˆb¿÷.TŸ±aØêÁ'‚è±siY˜ŠÉ’–ÈÚ©=õ\™"†üÕZ:µ‚cÕ…d9YÍ #%´kÝ®—+ µ—àÜ!‹=EòZXzv}€Â<ê” ÌQjÙ{-{O5å‡Pv|ü·Å@^Ý­!Dçßfu,?Ý6/z­+ÑC6h |RÀ†‡ÒjæÎû ‘ˆÈçÃqŸ_ÀƒÙ!ã¡ZH¦ïþFÊ…Š³Ý]–”Õ©”¥3¨Xœ rAö›;g xéE©"…°3˜£t¤ÿø5DÊv/èH„£î²?»P5q6%™ž£ã°ã­@¾5K8àÕcÞ%ù{¯/wßl´ +æçwër‘¡ru$ø‡0Ä¢©åÁ_?’¨dœ‘ù¸OœèP¼r$¹kùõD–ÛÈ®ø,÷]ƒŽüu|W™X¡´›f‹†ücçqIÑ…í<ëb>db¶R%:úó •N'"×CdÌ>P]®àx .NÄ·í.&ïÚªº m¢!ÜÜ·3’ʨ|óºl%T×+ä6£M*–{ùGEî[)0˃ª6DÉÀÉ$ux‘aÐE›H {gÿõsV„…'À ·ah04öÌsk4X$†©œøc.u4ÂvÄR»œ 6ÇÉÊ70SýfõP)FÈ™˜vUOÚ°òÞhÃT§Œò/˜Ê9° sˆ=@\ŽIùNböOw]äUÔ\°)¢“Ì`:&åû¥Ý™¢—9@#.HAåF}3ÐpsöÉÕÍø”õÚÍÜÛ}ÐAH»å«Òü×èëêg•‰Ä%?jXJ[È7a Ó FUUŒ6|\uR0š&rýöm'ÌoR÷º<²äç•‘ú£X©Œ‡t×Íù,wørÞ˜%¶vØŠœ¼nÏxõ ¸3æ·úY¾ñ[_«ž‚2r2Aý¨Ì6°ïÊ‚ÂÉfŠÐ¾ y5L‘ÅDFTg Œ™É¸Yëï4ÄI“ú‰AmÚW"¥QëGàíßSý—aAZèßóä0¿“ŸoÇUÅŠdêSêÈó­Ù.7¹OûjþÛçšÉZ`ËϨFW7$» ܶמê¾ÔÁÕ=–e+g(f“zäZœË‚!Ò‡.þÁPMps%w-w¨ºÝöa’Hág2©hÊ‘šš˜TK@¹Êü×FõÉ„ðµ¶V€Šb¬£ŽY{‹´‰‹‘j8'~DÎxËÀæxÐl »Gj ^Ôn”pcþ­èŠRF={¹ð¾Ø°Ý.ºŽ£VTn €ÿ3 ¢CÜtÒw£Š[³b3rU6šC-ÖIâÃÐs«ÁÛ»ž£™U¶>C-¶jËoÍ=!²‚ìŒyÁlµæ=JIKgÃ’£ÀˆVh¬Ø¥ñ!îÞ§Éæ‘^â¤òj€ó (ò¦“³¯¡@|Gè‘ vÁ?=ó^!è”ðiJÖBäM&TìVõÝ%^§ÏÃôr Ãui¾Ë !õƒí‹(Ä÷Øq6­8˜»””æ?Ãê È Ÿ ®EæI]lØ´[W ”tA/aÐYENͳšüRãþ.tˆC:p%íc"Ò½EÁ¾ OÃBœÔànc$e¡çW`ùç!¦*nµ…¿4hKV9™;KµþôCŒCQ~x7º¡‰°~ãO¸Àn??‡Ò[Ä…‚ ãϺ’”ÌáM–ájÁÉéSài Å&¾”|oèUÀKÕöp–0³Zþsì½%à€»ÎeEèZ—Dz•ήð™ê²\(e΀ùç^‘HXI çdõ÷ÓÊR°EêTLn“$Ä&ÚÔ…rè"¶H þ¼e1·ŽIÔ‚s©ÕŽqlá¸M-¬BLJYÞ4$¬IÇ,±Qwl|Ø‘Â!ÏJªî)ÕUª ñ$Rý˜è;“uÔ AAIn÷¹Ò‹¬Ci”÷ö&éSŠ…üÕZ9(¨bÁAW zòßéû»Â®× PH¨»™ééEšÒ4I—aï“X»ß_&gøžIô¢ö”ÿõò÷ð&8ÿ+Î? ±š: j$—Ž x¨êZ«Š ”‰NOëºÓwˆåŽ>7­6:V*ƒuú8å!R8XTkS†•\:æôw±y²À*X˜È]€ËÃu¢ˆì[ãnL4éâd©:IøÐ?p½ÀÏèüFl‘ÞI›)MjÇ¥šyug„öâÊ<Õ…÷ÊÂÄo]ZÖhš›.n±ƒ<<£-T#Ú Ü‚™PImïÁ(ðp™Z×ñ±+d½å:S*Tü~/œJ’¬ÚEºVøásþÅÆÕ£ñ(“ßÞóôµ8†ü×b:Í;.¼Ê8U³.Ž¿QÖŠe¥…2<*¡Ù¡-C8IŸw[s=½ÀÇì0ãLÓòú~àBPÎ2‡ „¼ÇªÁX´=ù3}Ò ¦|g^»u:«Ðcê+é`"„óÅÕ¦ŸPNÑôµó}¯'‡s‰Yè¥a‚uºìÈÞE^¿ã::õ¢IX‘Ùë€ö¶ìæw¼Ý:b¿h=¡ùÑܤì%úÔCÿ„ø€"Y„ƒ’ötè+çÔ8á:Xm£‚ÃÊÁîc£oÉ}äUYO",ükǨnþG«65txí„Bãmzï­¹C[¶å­ ÑÌg8ÖE°†ü2Ó„tcÎz|Äj0“aõuÇIߘ[ÈXT~¯'Rª06%¯•"ÿýÎÅ‚ß}Ÿq4÷öz»m‹\ ¸lTȈúš­u$—@ßæUYN¨¢™@hêÀˆ½¶ã"·²'pªIý†‡®r6{o»^ç- ûôpïÍ &ÿSC”"¨†C÷ïª2ì““Áˆ´ÆÙô‘ÜJÇ’2’¶•jO‘¦Ê´3“|È[öèÝwZêŽþn1{Œõ$ˆ‚†Ûù=7.̇!o‹¬ÏÕ“HÞÿn{çs86æšÆ|Wi.¯ØÀO?:錫2½U¤ÛVp¬á½W/“b•&Ë0¨wÔ b/ÛüÁïK²o¸^ e~êá#ɤòïS1ª)#Þ—$´€øä,÷ -üma?K6«¿ðyn¸ÂK›Û•Ä?ׇðc갼󈛬Pø•²§©ßÇä°\ëŸâ±TVdÊ®qf* Ó'†÷I͸ÏðSÞ‚"Ö†U"|°üÙ DŒ§9†}š8dzØ·H²]ö€ö…&ïîq™ä%=Þ³C°JúÝü¶i7 àdx²i8‚qOŦƒŸæsÉÑ ì€‘fL{hðäÚQ:Ë58vŠ3è?A\šBé¦}¯ž^vÂî;" À…)¹Hl'Ñí£?æ­”¶¥KÊêGƒxF»Õ:LhŸÎ«“ó”BG¬»‚Š'£v¯P?v~× UV6ÃhÔøØ—T!¶5æ)h";?_-ºÑ¯ïúT\rxÿLø~­ÖЦ›ß¸·Ô¶‘¶›OggS€i›O!%7õåÿ!ÿ.ÿsÿÿ'ÿ"ÿ&ÿÿ ÿÿÿÿ%ÿ)üdfO_* øldár”¶}nÝ”¬ÀC=xr†FÌdàXnªýÜgxvOw¬Öa§¾X„ìÚ‡®OÔ5õ4GŽ®¬ªüœ2úŸœ»4Xkv éÚW@¯Þ´¶:+ ”™Þâ3;Ê+O›â&[©|¨ÿäj¹êUðÇ•o 22¦¶õ0cr ´ ¯²Õ^}1a{.9º{\©ã({3?G¢" ÿ¶ÔUªÙ?šR (”âHšO¡«”(›èÍôG ú:°·¥ãjYá¾ÜÁ!pŸÙç;=¥O!~Œ& #f›5þªÇ¯ãyƒr¬ßë,Q‘º…Àì“à V·cn°—# Š£´Ÿ¦Ÿì·fÕ6iK¬ÿÛ‚ÝÔÿp…û4‰üÕm¼RÕ íÝ©‘‡uANðf µp!ÝxÀÛ—}2Y}zÁ•´1ÕÔŸó/òú"tœªM2$Dôi|…{­ÏægΛJÃ_%éZä›#ä¡Ä± : @Ú¹Ã>/ú:!Óå¥òoaPh7ñé£ß Õ©3‘Õ)fcª‚Å‚¯žì‘H)¸u«ò±\i*wçûfÁ…§ÂÒ¢ ~VöíÝüpŠƒ\ÄaP¯%oPÛ0„íQƃ3—I5èduŠd fýVÏ#î žÖ”{6)8fûaÀG¤‚`·|:SÓŽÈŒ‰Žœ½‘€)§ðK¾3XÿÙ¹•œ=Š6WØÈy•_*ãø=`·A0  M¸_ É,LXõ†×¹ÎÄDonnêfXÛë@å@Õ½é­Ûpx¢°öá!ÊhÊ™¶&‡k»£)¡¿E€½µZs%ÜCœ®0·ßǃoÁ«Íj…gým¥²6%h xz(ŠevœŒ†ü ÉÏÕ'A9åR$aJQ&oh‰v0Öwn„@ÍC[NK  ¦E—+®g‚ed¾Ü/î>] ãgŒøRò~õüœÒÆÈ º/?y’¾Ë î2«Ž’B“¾0-€9åi>#,,r£v!í i'µ¼Á\–ßœx–òŒæ+/ñB×o¥í'ýBCª`Ë,?qÁ–dƒe@¼bš5$F‰ºavìÈ·Ø,…CÏ1+„ÍhÝÚíqMõEŒÝ¶ ý©¡¬Òs×ñæÙ÷3cÉ”êN´|®Ï™;Ç…(ε¡®e«'9œ1sfÉ&y™fÅ<ó[.A6÷VÍ7yí(zÄ2I56æˆW_ é*êC|ðvlBµñ@ÈB*î§]öfYüïï ÂzXÒ¦ rÒ¸—”6Ñ ºÊkfeSsui¸Ö/â+ÿÒÆœiÎ8xïØßE­l{ûöUýéI?úÙ8—ø,)Á7[¶ÊÌ ‡e Gü×Dh5Î57äÃM Ñ)ÔÈZPL§Q .çbÐò ˜…?4 XmÑU'4- IBAABL½$Ü‘3 ÀÞæœÐ%þʨ”“©,Cè7zÃ?ŸBÕ@Vd¿‚Žø?áå åWöãwî N]¦Ž>]½ùØ„EÆÌ×ö[Vê*eØA=FÅš°1¶%˜ø,Œ¯Î9k„îàåÇšéWì ù·¨¾èÄsz“â± ÉœçäLö_…MÅ_Û­gU¿Û§~û”׌&nó×ЧWñ‰³6|z0W-Ù^¢Áb½ä'Œ«Ê¼>^n7Ë}÷¥ýõò}ëˆÎшÛtüFÊä»Tƒl}6q^bjÆ©2Õ…X4„ çÛ6ƒ³ºü×Fù&bÚÄ}‚)?}¾7 ùz§'—EÞŸ@ÛZLb^œœêý5¢-ž{3‹Ø&ð¼ÓÆß`ӱĸ¥g°G‡:ÏþD:È凑ø<^ÁDŠTçh$/Ȳn”°p{ZÒwqT8ŸÈöɦ:Ò&Zæù'™3ŸlM·­Ä™“ÍË»¦_}ÀÌh_ö§²P‰Õ4(ˆo8—† é{Š,MêRc<é€Á ^I2Zø˜ZnPÄ÷Ú‰‰IÇnÜH Å}»<µjL®}/€S=b ÎeùÇð!ö¤Ë¿1ûHNÉñ™Þ"¼„šãG¿¢4jH„ˆÝ¹,±™ çÒô³LáäâO¤ïN…t> ’šñ ìFÕ¥~õÇ)®5ˆ‘2ü×çm»¼%Ð>bÜâ£ÊEgu—d3-Õlµ†¢¹˜®>]ŸÅ<óðd{¸_Mî}eðóïàöÔåYÓÃzœH¥µ«˜ —YWƨ ¥pm~`S–=‘A%nUÛ­E‘Q] Yæ‰Â2¸ÄNÄ€–Zâ%&UtP,{×ä–©È£nŽJð‘W¢0ܲ¤–öwÈ$NVš±€r‰y¿R‰Û°:—B8竱K©õk«ßr*\ }Äl‘y±ÄkJocÌJ+7øb„…f Èê‹™+áFkÙŽ£c¼Ò‰1,6´5¿<€Œ¯QššÒnùüËÆ4½£ 矵ð㬟—Pá§ÿ¢j»6êGƒK_T¬|Ls7p“÷Î3‡0ÔßÈõÂü×k_Öó[g‘q^ãó ›[ºGép÷ dÑÚà›øîC-Ç4š·8fô<@ØÖ±b¿ûŸõâÐõÅ®4ró°NˆsßÃ7£•ØÁ¤ÈgÑ¢Bž‹ó…ŒeÚû@p¬õán§,ïÊ£Ž Ä(I¬Aæ&²4ÔSÚß~¬ƒßÚ àd~šIÜ žÃßö¯£!ëŽ/*¢»ÏÚäEänkˆô» $%8!|7„:Ô7ûuÂ{б3xµÝbbŠ‹¬üz v·Î¬i6q]X©ù2^;‘ó6 –åa†.kq²mɯC·E¶Œí¾:åMb[V, Bzq ÒÿìàMür×nh@iÁ^€=wÚKÓçÿ¸"NœñÎëdKZü×Dar Y¨ä©Ä-Q:¨Ûeïù޼4K€\%öÈÞ«¬ÍòÌðª½n¢½ñæ :0B/ýŠ0þ>õ»áL•ÞW‘qŠ &–YCˆÆ«sh¡5±IOÑñ â¸Î­Ë°‹–øçP[àŽØF†v–tþ8/ò"Wê,Æ?Œ­kpCÅ ö~9÷“—haᇃ¢#¥ u‘™trU7¶´'¸ÞQ]4ìÄÓ–²¦_ö“ÿÑX–ÓÑ2h££OggSž›O!&ðƒ ÿ'ÿ+ÿ-ÿ/ÿ*ÿ.ÿ.ÿ.ÿBÿÿ.ÿ.ÿ.ÿ.ü×a³!†IFîoYúgÌ–n½\'ß ¢êæÓÚ³¡Âž°3Ãu.›(n·†¸6ŒüØÀÅ}&uºîTX6È/ÕÖ“}.i wÕ [(°YÐz«Å®QHò„`Ê$/]cí"–ÛÈeDìeÂ8^¹0KG[àüýhZ—ø-CELÛhÕ”T‹_]«j!T°ÏîKø§šm䢶Qc.ý‚;râ ÔxŸúÄÊ"Îé†îZŠQJÄÊÁbÖ¨EÓºéî…Ñ=–JùíÑBó¬†V„°ÌË/í{w±üÿ¿H±ÖnœY”ÇJ¾‰…c¥!Öùʾ<>Ô"ë‚’Øê¥(EX¥>àG+_³–eÞcBÒ'7l²$Œ1g³Â¾•TL üÚÙãÔÚǯB(Ú)ŽG€]Û¯°ú„,õ‰BÉ ‡Ä³¡Ñí™.2+÷³`÷Ó8B'F>àfuÜîù½Æ²7ÖÞœ¬ã$÷ìá¥.·J¹¨µŽˆ§v jiR'º«Ñ¾ü“ä”ËPØl`ËRUyCǵXŠ%kq½ŸfDyÄ"D!wŸ¢6YÍHëêó˜…–³¢µï,Ú‹æ¢0å€,‹|.Î4ÔÄ 9´)XÂ[(º~qi³´¸.ƒ/› AÈEœõ䤯Ê`Š w<+„ì8¤0ÈZôÈ‘j°5#j÷¡uî¯"Á;¸lG,®•ù¹­¯8ÅÅèW2Ѩ/] ãÛ¯ôŠ[ÈGŒ¶ú s_<ðÛ"¨ï­í¤5åûü×FúóÜä üŽ+Åêt;dnIâdi6Hn‘¤üž½©¨G±µ…{¬WÓׯKý8ò?øœÖygÛÇ”%µEö¢ãI’/÷—üJꪺÊ^™Nâõxœ»²X/ß¹+òã¶Žø% ×|%`ž="θ©-oùR˜f?4OX ¢Aì¼7ƒ—¢-èxÂG°¨’ ‚RŠqž…»ìÊVç©7 Ž­'¸}év"ZÉ̶k+$Ù´a³¦ÆSüبΠ’«¶©ÙÛ~Z ¦7“n*œ‚†Šä˃CŸÿw_oéi…ÒVßý)¸gi+º|WoÙkBŒUŽ ¨øÖ¨X…Iî½|4©9³Œ¦ÁFòáhm24;Ü8B'0þù‹,ƒüÚÜj Î}p9¯‹„’ïÁúK |¨ëš5__›³[(¨h/ÌíÅÈMNÚ¶#C™%Á¶ñó~!J9’§#³ÿaiÅÌV2±ÿØ6£çsTx,hGë}‡±Tç4POí‚`däyMp¡›½x+i;ߪĺã£HxìPUƯícÛœQôhϤT©å;¥ªÈZ—b\¤B¶˜U¾QNOšµÇ4ÑŽ¬ —âè8y;,t«ýx¸ 'Ã¥¼vž`%èÀXÔ^=¯¡W_ÙÄ;ÍÉ~!+;Ð]JJê+î*Ðò¶ù<ØX³ÚÔ´i7u?—6• WvóAè§îjCcÃç$”JzWÕÌÕ_`¬œRDŽ„¯dûs|C–ƒ¦¾ªî¶‰èµ!è§v^0wš3üÖÞsÇàÏqhƪÒªW§¾‹ši—ÎD^¡nù4õb:jK…ÄKÙÕxÛ_ú¾ãÈL]‚˜´´£ç«pWƒ£T'Å9‡«ÖnK=fqqtÊtÞ·XÔ3hAŒþÌÈJ¹'bøR Š€%Nt‡¡ùõîÚ@aÛí’z¼Ÿâ¨hÝdjíá“f:†c$F‹ç69¯w$=0¯}âú@ådl«-' ­+—É*8›œ!p,ò¸ïÖ²£yKw±|MtšÃ†zÃÁ^ê'AŸÍ‰½Y Q— Ž¢±ðœäN`+ÛšÌ š5™dS7¤íýTE9¼XB-03ü×Fúó½<5îKñÀWÑ’æ¶wâÞΑžSˆ6Q~®Nª¨#ÝÄÙÏogYEøÕhc3LÝýg§ž# »MNÛÎÔ«º^¥ýj¸È×\j p;ë:Y;R.ä;ýÊ–W†ãÑ/‘¶j#oº›ŽA'Þvû×»¶šŸ'%}åiGK4ÁoÃQèNG[¤ãï3€°£J1æ0¥2úLDiZªLjҹ¢¸ûâé$^Ëìd,¹ÒÒ¨° á+' H‹ÁÕ‡ì/âÉ~:ÔèòdX_½:UŠ’jd ቩ*ôqGS+­³+®n–å,ásM;+üH®2Jëw^îIÚ±‘gž »eþәظÆEHâåÉa‡JÈ Ž• áÀ¼DS²?Û³m%“üÚØýS¿]ìê'SdmªTZqچܸà D Ëõ ~¼ýý6©÷Ê%%7¸iË“Ác•C•30«ô÷“>X7 v~Á{W‚¥›d3»Iö9.â>›Á{Ò²ãÒd9Ÿaþ±Ú@: Öæ±E5Ï}‹9¥Ê圵uqúnJO% 2P Yk=A%[óѧ|nkXOªÝôAÉ“ŒÐúKN\žå„OHÀìRŸã%še>(í¡Ý» ` g»ÌíϦcÓôè~²«"†ƒ®”ðEûÒ‚w¸v´ÄŠauÞ2¡¾n€V¸C‰Ó™Šp_/2 vµZ5^žCBÀ±o!¤×J«± $ ìí]D€Ð[”î5¾ Œ#[ûü j•>½¯Ð´Í¥;¬„zw.¢ÀNçgâ+${jð\î»çw[(Ií#Çn¦Tšf eÙÝBõ<ÓŒˆ£õ™E8ƒÞŸÏ£¢âsVõ¥¶²IØ6ÌŸýFø¥ýòðÊ/ ÷YPÙ¡t®c¨¦›}Oj¯®N¤Ðþ:¡ã1ͤi¹m-¨êÜä—GoKûN¹Ÿ)¨Ç]¿§æÌMœPa¹gžJåEìÊÍË•¬ƒù¢ ŸOÈ×ç,Ѳã莤À¤XÌÿ7u©(‹ °h%eˆ~gO#áÐ#¦æ4ô6AžS+¦ï+YRˆ„†»3®j4´nòų;_ÃÌäƒÄ¥rSªe[AÇY¿øËÉüïµ=.~°Oi¾lÐÖ•½nh}±>`•ÜË£KA«JUô#)Ä!ɆЮHùé6®8„8ÆA9¸ÁŽp¡ÆÍ–4$Z9o÷2F-O¸ÉÝ…Š~ñ4ˆÉ@ÒÎ-R„Z«`-4ºÅ9¯A¿koÆçRªz !ûMÏøÖ„ÞJZß!§¦@@xñò„ÖÍÖýM‰á†{·î÷ð¤œò”ŒáÆrö,ï©É¯’„듳º¤4T¿„ìòíãÞ¡ø‹=| [5”c®þÔ‰#Võ‘»­-€£`ýüRÅ­–\ˆ4ÔÖ…w­ž{æêAw@\¾JÓ?@0Z'F;J{sœT‹H Óbê´8«gMÀ¤öDPÒ|¼Ü©›·OXmªG~JÀ£à 0ÁUÄÎDr¯Ü‘Ñ\NÖ l `(4·}bÙÛÜQ}ãbÌ‘~á«0ñ Ÿ+¢P„QLSØN´ ñþ–áŸ'wòüV¾Å’Ó+˜Pæ#§_ç3J…øÎF ð0°Û¨Õ…}ùB²ë¶±¿ÜÃN‡.xeWåÊŠ{ÚV{ ܯUWd–©\_޾͉¸£jDÈXf¦]míûç|Œ}½i#JÌ•Þ>‹Ëó'i¥²Õ¸×¾©®ÜúÝvD}’ø0Ý¡òæôšÑü×FóøÒ-,kÃAÛH€”)ÙÜÝ{Ä]x"ŠyÔBâ2⬪+®­j.°® å#+!}Û½¸È‚1†VèÍ&¯ÊÄž« ÷&1g£Oªƒç¨Å™ÅÁÓ¸çY/ÉS"c!h›¯±ž4Ð.bs:5fËߌ¢áU‚—’]0¸"'‹jV,å g˸ ‚}È{å‹u¡õŒtËÈIHõæSýJG¦eQQ¸pÑÜ,å*N>¡:>™Öq<‚ôÚ(Éžõ«ì=vô# J|C²œàôXÀBé‘3ÅjËtZ_œ”wsr2±J„áäSƒp‘š ¾^çk°‘ µ$o<#%î©o¾“S”Çãüv»uX[@¶yŒ«QB~ ¬+A}åºÚÖêV1ßrµsü×FùX|ÝÀ›’—‘Ic„ûI¸þWQã‘¥ƒ .#1áE\§¸I ãÆr#«.ÎFB!~ƒ­*þvo!$M>ž_;ã§ŒhÝÖ|¨ý´¹3—#¦ç·êäóÎÞ ÷ÞG™‹Êˆ-Í‘ÄÒ#ï'¬ôÍ…¸-ôݹ)‹º¾ã6J!x®[Kij—ë¶„‹©öiØ…cˆ ·øÖɲ­Ti|‚®ÿós+{tf7(¾X..cÓÓTw2®Ì!öë¼Ê§¥y—òR Ï%rç“úGŠv¶gýLߨ6}|?÷úƒt‹?D¶0â–9ê/á”àƒÓð@¶ÛüÚܘ¤ªTØ€}‘dÈà›‘ï¿Á9X½)2Éï ÓáúõEfGÇl‚€þüÃM,Š¿J4‚3PF£à­Ü„¡i [^ €¸ ŸÆ¨z^‘°/¦‡V0‚_¡¡At•[cÚ0ð7pQ+Ä'XV—Ä×z¹ÁîÀN'…Ä€lstI0oõºAá˜ô¬æŠÛ}]ém°E4`Ž–¤*±´›—Jâ¢DØJÉ€œ&0V1¹Áæx0ÅØÆ1©6.¹¡æ8’«¹ø8óØÚ‰Uü{Rf`4@¬¼\ñ¥¨vE™ùë÷ bÆtRo÷"h ]êͼP~ª¡N¹7KéblÞ}5Ò°á4Ñäêî”Hò·ÈB·U{Œ…9«ü×Fõ>I7µž¢„§mýï„ÝèéBDë#{@`F÷:ˆó“‹ÌÚ×srTè¥ Ý+YFÓWjúHh@Ë­›hð•ìo2á$Ãk¿T%WM¶;çqÃB@$ìÞLÞÝm9b-.ø×1ñÊꇣý—þÂiÝ_Z¯ëªšOáHJáê65é I6ƒÕèîÅèöä±è÷1É~d8 KŠ‚[Íû ÝB¡+µh‚¹É‘"·I!£G(-ìÂþÓ–_BZ]h­6&êcäBÕ@×LPúˆFõ>Ú$µ/€ð{Î…%‡*f)_oÚ©uÂ"ãö®Ñqð>š–ñDOù`¹–È|‹-îxXAGOâ4îh4%±¾‚¬\møîd§ÁˆGÖë£OggS€Ò›O!'ÅzXÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ3ÿ)ÿ.ÿ.ü×Fñùë‘n/æ¨í.Ç©’\²ÈŸ_c¹§þÀm+1¢„¯F‡©PÈ*ê·Ÿa!»Š*dZEÎàTG÷âX-ú|ˆµ+ѹ<ð™}ˆ.pü}Ýd-[”uí©Š´-¦böxÝÒ±ú¾e/t@ÐåBU~hÔ¹Pî Ój=ô'-_V¡’q"*-Eø,á‘¥¼Ô_9b C½Äé•Ó ëÏç3 ž€J¬˜¥Ô¥:ùÞNuR ‡O|a–B,8ƒ>bÒÄæê«\Àè§P¶ß‡°“²îŸó#g€+ ³ü Ìpq¼¶v-Í;;oD0 Cyµs­wÓ9Þå’6”(ÏñÁ8.óÊÏš©i¤Yp£¹ šø+ñtsIÊT IJZÊ?,_$õê1-ñs¥$˜ð“ü×GŠ ƒŸø§õ@)'Ð×o<7×Qd—¾w[ÿ% ÷£{K;›ÅÇ÷&rùé½ì° läéPFľ&€­d5ã6»~òþ†÷•ª‡8R³p®·³rßA¡~k N!æè6­”ü´6Çð ë.ns5âºmk}913ÿ bé1òB¼íTGÔ@íŽm•ùin£=Ú«×µ¦Y¥Ä´n[g }’­™¤Îð²´už[Œ)ƒ¶»Å¿§Àêge4¬Í©w¼^Ü‘ÝùˆA,KDY²öl«*?“Ì”y[‘ÖÎâ{>)ZÉ…º¶»¬ ÑwE'q]¸æËëK”Nøq·³._ýv>¬&Òé¹!@´&è»MV´bØ”´öÿ“³`XæÉX}A¡ “o¯,¦/4)üF»µAjÝ£4ª…r®95îó0—ñC8kÈ £çV¼16n‡‡ªùú@ñOǤX oøeåÓ(î´›ÛÊLÿ×$›Ì?¦±eX²™¦Ü û rmoè˜Uòäÿé¤úe»CxXˆ“ÓÐÓÄe6;ãM÷õ>E+»üÕZ>Æd-6Æœì–ðvm€`šq›U°—¡ý( ¬k %yeì‹€!0B8QÛS(>OýÊg…ïRw'öŽ‹9k†R–˜:}‡J!¢[\Â'@~þÈ…|”|[ 0xsÔB´hÄÔ$Çq…ÊÌÛ„8{“‹©ij±€éþó+E”CP=Ÿíˆ N^UëOÃt+›º#i\Á‡ØE¥1ó`_à÷jÖúÍPÎàÖC¨ëTD8ûÜzÏžJµe|¬êd¼Zs”eù)qÞ÷Z•ŸÞŠÙ^[Øï÷3ê›÷v¦p1´‚ sàÀŒSPöš½Àx ]©Õd…Ú\ü¬,E/OÉGK.nÎÉ{²Â‰ecT¦"8Þ/ê5Èôj@PßÍze‰ÒÂCÜÝ›û€Þg!µq†‹ùRF•Zâ:u;ìn¨SSýzcùÿ! o©ûí×/ï¤ÐµŠ„š<-–M'ÿÚÀ3ò䣓-ĦƟ°ë}ûé¼ÕL|³öý®×¶Àê{î÷E/G£)6ÅJn§µrYö6`B_„¹nÐ8’G_Šì­{‹!gŽ _ëi,CÜ“¼ëëØËü?ͱՋCÁ©¯Câ‚u…4,µ1§Ú#". §0[ËñTCLîÉÊÜÉ!ÔÏt¦3™Å‚ä°Ç*"­+ ma ‹uÓk²œúÀvɨzo¸E&ÏëRº^œÜØ.iÎ áÚÏV†y$QŸÚž[Ä2`¡’L=¯¡çuCÎÍ…à°Çyåôâþ3Ëþ¸gdÖÒ^lwÂTÀZSU¼Z’äÐlCP¬gÃj—ÿ qŠKIrâ,íUˆ+ŸÅ5¡¡h ñý|@ÝiäWÙlC‘<Ÿþm_² Fj ¬· OÚ™ø§yó˜ëVÕˆ1”ÿû]EJ¢ŒÜ{Z°¸Ò÷{¨‰”Lm#–/¤¾”Ü©hhÎ7esp> Ù<5=Qn9¸4؆üÀCó #Œ·ÆâÄQÇ>ç÷ù°ö› g†TÓ©¦h€—_Í®ô ÑÙ³Ô·oý²gY%¤¬[Ýé@a¹Å‰ .sé…Æs¸hì[sJ×G­q™pnÉÈê •#Pet±ú@”emN”½CÁѹ<þœvT6Fy.BoèÒf>’l±vàDEwKÇÓå€|¯ÛäêêWô»æßU<©KË÷ðô¹`öšÊ'!¸ãÐy§ËÙB 4S©Wé.þ„Z‹"±™lýCkQd‚S»+GÿuVõ#ý›Zr`°XRâò×ûLneË OL’‹H†ß;+ƒ¯ú!‘~Û‰Ù G4]™´²\—SŸ ÑEì³Ì0œÖ¸µü~|©³”ÏnB@mL$8øÆIžlƒüdgd©ÈŽ ȹ–öÆä³°5{€`¡Éa£±wüt°ú拼݉K`—ïÀº/ܳ±èV¸W{ÀftÓ;X;C9TF yóßå^gôÊs²CÿîŒf„}LrÖð(Ȩ}ž5AS‘=Å ²Õ›?azZÉ6ÜÓFÒîfŽ¢eC'ªžÙ"ÅÑ?”m)7Ö†’Åü\).úIì½|—º-‚á˜.õßEx²ÞòÉ}!. e[üß¾ G×;´аe÷³Žd^„w²D„ÚXÓ+ò¦LHŒ ñëŠ1»Ž­Z–>Œ¾,½?æI>HõÙc®÷SÍw:7D©ˆ©ÿæ…ׯóœÚ+l k³®´.^‰ÞÝ’MÛe [ƒ’E&¬ü×CRERmáüœW_ÊÞSÁb鬯d§ ¶Ê¿nÍ8‘?Ú\‹†0t̄ڌ‰ˆò¡¨ÌÝróÜfŠ0búJSs„¹Ù/þ±¿>)Ò?>ê“wB®4z|º”GÓ>[ö¶_K"…þw€&ÄâÃ5%«Bë6MïT,úÅQ-oØ •–VS)k¼²¤KšYÙ.Žågé™hOŒõ­îü&6*Æ+…ÈV É©§ I‡?:?ŠÕbÜ 3D¿Ð÷›+˜Áäžf±€¬ÁÒËiá­äz2|~µ3SÀ¡RŒýNA´bcÈŸ³ÈðT³©Äø[Tü âŸ.>6èJ“&ã½—F÷hìžP^£åð6EÑ+Îø7±Kòé¤EfsÁå3¬„u±„’*›U0ØV®åãJô|€wwx–,TYh™Í+ì‡x-¯ nõ‰C"a(á*?n<&Ëà2 òNl`+S[7oZ;‘ôb+wM ÅÀí.EF„¢W] ;…·/0±0þ+š¸È±ªb˱«AA†»ž½éÁ=ÜòÆÜg ©r*[@Ü; A³ä목˜RU‰íà¢Y¨²üÕZ:Ý€R!œ¹M™6òv,Ê¢9·÷⊇ȥÇIöZÇÅ»$³0ý9ÌaÞÞ¬mÒPÔ§²¤Ts…Þ¦1c¸ô&%¦“X(/ŸŽ6ùhø,§6Ž´j$:í2}6›¿<ÏØA‡´yåÒ¡‰°ÿç²ý)Mãôñö;|á­yt2Ÿ’pY«ârŒZN~ Ϫ¶<|Už°»Ýžct@7Ÿ"ÝÖoÃáØ+÷«‰Æ &9çéá"1ݺµk¾#…61NÀÔªÃm2ã<¢_&ãí–ÄúÕ[¤çŸ²á¥iû¸“ùü°%@U-EPü2¯N³¬2Ìåîvã¼tïnÉM–@uNàºÁœj 3¨ô5P^›’JŒè?ä˜`ÖdGbü×CNžT]‡”ØÂÆò­<ú׃:’â·éFëíª$r¯÷ŠÅNÞ/ÛR]×i}•ÂòÑÞˆK§>ïÄ»ö´YABh0ƾO«÷ žE™üüŽ0ù ˜²'ö7*ï]c¦@^Õ ÃUƒ&Q^*hžxÒzCZ§™Vz¤í2É¢™ž{Ýÿ°Xù^öÅ„0k: ÈÜÈY±$4+å˜Æêº?ÙúZŒãA½Ë6`ˆæ¤Çhí KüÚØõŠØ‚UÇý”¼ZÜ Ô÷.D>ÍÉû4v*ŠÇÀ¡ˆtab~9 $ƒÃh³Ã$pŸ%‚ ñ¿¿TÌ3}]8µ'Üý+PÏåižAÁ:Ê á³Þi?!ñþrº5O4æÛ ‘å¬2-¥Âëh³( ×Ù i¬ÃíÌýÔò™³BA‰A ŒT1ðô÷Ñ8¸IBÇç|ë™9),ç(Áº7âÿÈFü_ûªé-Ø·5ÁZÝ?,”q«ö—ŸŸˆ•€Ñ´0ýÐÖœ‰}bÓ³ýŸÖ¾QÎáÁmýAîG‰©èƒëÐÊ68&~fÃ5úÁ4Øqýj0½Ò@–¬(Éô®ÉóóÿðÐöª+¨*ÁÞ¡+B@ìœ;nÕMƒ 7ÇûO5E_~óOggS›O!(‚`ë–ÿ4ÿ*ÿ,ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÜOÌÙú©”X`¿ÅR1éc5ðÿðº9÷3÷Ô¡{h–õ|Ÿ}m £û/°qÊú5gI¯ç…Ú?êTw/ "<¦$Z ·‚ã»x æÍ®=³NF×^¾…èKR[ŸSœ€ø¸÷qþnÐ:c¯÷¿qAWÒVf¹©)’‰cŸˆ»ûžŸR‡):^Ë èR˜ž,Š0NPwÀqñµOnk üizYèpF±ST޼’³ÖÚ$Õ&ÊÏ}ÓTq¤Ñ”ma|eë}ÁXN%)—ðη³š´ó){ÿV‚X¥¦æyv `ŸÍkŽ„ìš0~‘CöB/U >–îg?»ï.º ükô¤ÔEKWÍ ‚ÁŒW»@`x—8–©Ûòhwr“@$íu~®£Àï½%I¨ÂëüÖÞ£†2Aë‘=ãÁ¬x¢0ˆ¦ Q{ĆpØóÕ Ï³°æå¤ÆÝö?SEÛö'Fµ¤CõiWJ}C§OøËðÝÂ_»?z×ò\6&øš§ƒ,/[¨ßM`ç,çXZs/½:»ýzG¨ïHÒòÚïÆæ {€ÜÂ’:€&Ží©÷ÏÈs€Zä…#š’£apS b‘b Û¿œM8K0]<ßDŸHÌVxOøí$+.Èr¬ Ÿ¥ ££)Y[úJ3‡„M‘[o&A¥2j~ÓS–²9™fwÀ“Û°ˆã< ´E)%+ØtpRjfÕe¹¯.™øÙ†DÒÑàQIæÊK hpÁJhÔ âÆÅÐTGQ " –TNÃÉëä +ü×èì‡Øu€‘ÎP¤¿h˜±Ä^i£M³gì⸹ZbÛî÷€°.oÚ…Ú›?tÿÊB-Ïi,ÇS¸ƒçËÒ:Àÿ#°fjBÐñâæÁu£ t~˜öÔ¡™Æ¨9Ï@Ð!.IÆ×ô°fcƒ¦çDD©NQåýÓö,p–nÿš?€ þÕ“Ó¦þ>±Ì”ÍöîóKÑï@Û«áJæ.~?y ¼¯*abW{’RúN¯rü„[N®mGæªÕ ÚÜêq;0ð»!ˆòy³’´ÍâÅ/ž9u£G[ïÃäQûzh£ÍØÆB”µp¯Kˆ>K—Ãa-q•Ñø¹äí)²|ÇÍ<°Ÿöh’:ûf ª×¥ÿ4u‰]œj+DK‹üÜ>ÉÏ òúV^ô‡]%4ÛŸLp¾+éè-PööV¯ØÇÈG¿ìOºr6ò)àêl»žz>5€nj³èMÇt‡S‹Ù+ç¶„BÞÒnZKÓ[î•âévÑVF€é¡Êú#(/3f QÕÚo³0m ”ã`%@ŒZxtõIÊdŒ¨z#÷ÖuÜe(^p,‰{ǬP‹yD)¸ÁVk,¢•Ð*$ØT$6ƒ$…/n:C0ÛNmþ¥,…P´§ënúå„CBæn¼¯! Ÿ3«uç 3¼}ôxÓˆÙXX•@‘À1~+!E£¤9íhMª\.‡ƒ—1Í™M®ê=Z'üP­^…­€-Þç“!Ý™¨ª£1ˆ e1|†ÏPÚY5 ¡ó«k¯ ³ÒûüÏ׊üœø'§ÊízƒqµÿofRçgœ¿Ý‡+ÉÃm<†GìyÜÞÀMDçŒÙ/AOz7‹ŒtOi»ºM\²ƒT\¨k¦ÛúkÖÂÊ•Ê`¶¼ÇÂt`*“ÆÏ±™:3 Ü¾?ìgÔÅÇÊf5?%¬#¤=P£(×ú̵Kæ‘ø³º(@Û,Ãþ9âÏ<3]ý%ed‡…´‹Ê ®ª> >hüÍ{bêÿí“~~ ÎÄ.¿ÓÛeÈDô…Ù¯"6‘Ì£W7ÈçõœquùâÌ‚ýWΙ­‚¢¤Õ¾¦ õ î‡{$Óå XŠç'àŸzµPB´*.w¶ƒc²Ý³RºTw’oŸÐ®Z¢É‚¿Ñ¤æ×å\2ZïxÎM¯}±×:¡¾*LÛüÀ«ë†ÜYã¶b¸;§7UhY´U,üo7Dƒ›É>a L‹)Á,‚%G[YˆÍŽ inHáÝfظ8C8fåõNgÜËŸ«ŽÒµb`@Þ°³ˆ¯\Ÿ5s«1îK]kÇSЀ£ éJž'2…VJcÀÜÒ ûpæé(Cœ—Õ,õþUæÁ-„=÷\xT6''>+…é>˜Ì,|Ò/N‘<×ù78ëpwì";’רü¬”Žl#LîÛʱwnb?ØŽsaR-®Uôjå›_Ô÷JÚ_ƒðd‚æ„d§‹9ˆÄžÔ‹¨–¨íQÊcoAP=¨0Ù ß´ ð¯’i@žJv¦ù8fzƒâoLk£Uü¢z¿öåŠ7DT"è)âØ|{˜e͸ŒÆÒ>‡«šO(Îu鎡̟SA!† yµ»C"kÐ\åë?Cò }¨«úÃwPÐJ¥Älå>—Fˆfvü;Ÿ…ºpîŒ=E$^YÃ#'.p‹¬Ê444ü×Fóº!ŠŒ¨l!A~B®’ü±4Û$ƒU´5¢tOTK{-žFEƒnè÷M,…ÖΗi‡¢»Ü]^¨Àº£ñ;¿_ö`‹· í¸ÂÀ³ö¹Ýi ¾¹²þýrÑ,úb‘±zâÑI <ÐvH”@7]ðf&Þ¼¶oÐÍð9[ÉÕÓâ‘ONük2Š`}œœ5g*}Øõäµz<b&`Îɮ۴±“Ot&aW™èN—ˆÌEÓ„Ï~ ÷Ó¾]!Ñd¿…ÿfRy·Ø[']èŠúŒf°nk ù=—!¹Οïÿ̬‚  n> bmv‰©ß´Ì$­ÍUkýdüúWsš7oAwÌ÷ º=Š;òÃFKQy‰;úäÖ´» Kó’Í ‹üÕZt«hÆæ4w‚ñï†Ù ®±gµ¤ù´Šè~mEkúÀ°”ÁŽá–²¾ ¦¥ê7¬.8δ°&)Yð6îâÓ9íK¼NL_çћ炡¥R¤4¿(ËÑ—tU„/BP´ícX^¸_°ZŽtÏõ¡5RmRÏ µV, ââîëw§÷ˆCº¼š×…¬””ìñ.9lFa”•Nx̰,õ ŸR£‚Å¥q'N`÷9²’üùªK°óq¡ºNôßÝc¡w™¹| ’s[@II¯Dh”G; çÑc·È=Íþ„ÄÐk¤2«J¨á¶R¤>È¥•ȹï’S«7•\§ð)% ÆÞF¥ª—&ÎĨnÍ{Âxà)¬¿ä4 ÚÖFçÏi åêü×G®ƒB£Ã%{VVÖ”'÷nñ¦6 ¯¹œõ6ì¾Siï?„àÜ8~=«´SòÏJåqµr Ì+7LZîÌ MŠÙv#.Бÿ…7R±pá±ÆgžÎ’z×ÖäN¹,Úv½€ÇuÔœ|Ì$nì¿)ðuÆ9CI~À”QHïµ%²:ïg^~ßKVs_פî5³ ¶R¾~B–?$weèž²‘c7°oŸððjàiY‹ó*ï::>†ëø¢Sæì½zdcŠrí +{LáÄZ Ÿ¢&ËÕ¯XÊW[·`7oá2ÒL^¤7Ö?Þ„­¼ÓºüÜz8ƒUßO’Žyâ°µÍËMO 0êÉm®2g&8hSfº¶Å9ô½• ¾ªE«ü×Fú¹¡Ö̱'û~¯¬,Rb½r* ROEê³÷нæ¹åïÙÉl³K^C¡>Å>]À55§Þ¥­)«®"´“vïÀyƒMï8)\¢k³±Xž ^Ó² ŽÁÒ€4Ÿ0S|AL^¸˜ÍA– eŠÀ|Z×Òª~Æò4¥‡qžæØý Zj2`½à%»·×8YBܽœ¦‚aç~~½9ÌÊz¨Žñ`ïÿàвYDýÊ ÑmÈ}¦ßºgYãf~Ї 7Å.nwŽ‹Ç@‹—¤»)ÂZNE%%Rî[4fq†~­œ+·_GËzW q÷„np>4ÊæßkQŒ@qÔ®@«OggS€;›O!)Än8Àÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÚ”ƒ/tdp6ÑUе!þ×ÞÀ2=tô ü8ñ_…÷ß9p± ú¡‚Áµ'›W5‚W@Ò“WtT˜XòOu£}ETòW“7}VTÉzý-d>uúéªqÆåECÿ99 §g9Y=bf>a&yl ÊÏIÀ4GªHi€Éo€9Ä_jË¢i AÃÑÞ þ1nY&ŸL{å<†ùFg®ÂÍ~Ú¯¨ŠoZs1•àw~ìCS”…(&ñÚZÛø¯¡•'9ûŒ<îÚÓÛ¤¹ÖCX.|Ã"R&åû`¦©ž¾Å†(!ûþ‹'Œ„¯øHèž´Bâ2lŸäŒwÁN¦Q'ï-Ð+y¶¯OYw~ÇXhªó3öˆ†j³û´ÿ¸NgIà6~+lªü×G;ؘdÿ}üöulçñÀ8¶P´ýœNO&dÿHï§KS£F\rD¡Rá}ÁŒòÄEó/ý Þ£[;>Dw%-1,¾Ê]âR׆RôA²…¢ñø*î~ƒRõÅmsWK²fž¶lÇfc“Ì)aòfvŸÇ{C7ðVÂãk›p— ÿú(Ô| 4]³ŸÀÍ•ú˜Hg%ê@ Aú~8¡aVsþÚÝÀi<±¾™Þ£z÷K}0Ê̘‰ÊMP T‡Ïÿíú|œ-“y{gÆŒuIÇE˜oP<σ—Ï1ßאַ`M³¢´¨öþŽxcÙ¯'ÅL¾!?JžåžàÏ|ƒÕ3úŸcVSúièÕØRº,–HVäÔh Ø÷ÖŽ…,Òü>âªrg'%5ÒÆ%çÊx³=f:*É\©"zLtúKy$°ï“AQ¯pJûù»ý/ là‰¹S~T5öúFóÄàm˜b,A<ÕÏ=ˆ°Ô’ ò#÷Q6º§Ú¨ÐUª,Ñò³•½æ™s°œÙP1’¦,DA§î}0M–ú+íqryêŽ[Ü×ô=”ÍûZì üc1”<ôfìÞ[*» z"&X]ïÍjÓ–ðæ—N ò³³)l†N‚Ñû 4Cʺ®³fÇ2Üõ~á(‚3h®zC"¨,LÄyu= Ó—UÓK¿ÊLâIÊmª½8m´ë¶ð{p©gËÓ]˜qÎÞ¾«qÁ—A°‹Wëdcåm :Q¦’x<öµüB?ÖëÓAó _Ë®aWêìÛw©‘õMüÃÿòAo·”ôúUNIEº³–ÁYÄ0m@m™o¤²Û@lªõjûI€3õ–§ïºïU¦€†©`€&™}‡Û¯\¹¨ ¦Üéˆbû§X2‚êãþŽÓ´£ƒ.\Œm*´-g@$䊖gk+–F7nõ¡<[m$Ú q] ”è¤UÝÛÑÛ’³çÍ€¸]Žä;êno ›k©.·ƒ„S$ßC©)½»'FiŽìæ¢m q.2.•à¬Â3¾S<äÖïÃù¯Ç–ÛB[}xÒÁÊ¯Šº·üaæ ‹˜Ëü&"î¼\£sì=´¬jWL•yöAÇ_…xÊš¦×¢¶r¹hCÅúZ;†Á0þîj)_•D;°gŒ¨ç$g€¬ƒz1±„MèxaÙk/·¤IÍTD‡œjVOl‹ƒåf‹u¢ì«ÆrL#§15>2‚^˜ …ÀýW'Ûï®_gaæÀ'µ¦ŽžÙäEë3dû“ÁT£†ù5+c`þ½œfYÿÊ›wöFìå†›Žœÿ˜ò4œ95ÓNÔ \k‰Î†ÉæS à ŸQåÛ@T´éL) ZŸÕ Y%,ZŽÁ[Ð/År šOÂ!m¼­ìÖˆ}sÌ–Ï+¨Ã;-ã$ïSê†!‰ÒÉ‚DlŽÃNݽH nÿÍ?ÅΨ‰÷¼„¢üa^í³´ŽVœ~ C{g;4=¾øÅÅb™ÏDÉ_Tï1¬Í·˜ L(¬ÞìòÇñ¶š° "#Mw¢‹›Ö“<˹cÈiØ,é“} «†¼ØÛ<´Ù£èÖÍh jñukà»ø}ÿþÛÖÇG¥H³ì<ô||h¾,V ¸ê¥{e ¤EæH)û[Õ’HQ~c1’ 37D.¼‰`JÂÍ,Z-:"Û–sîŠ7#+´=V$ ·A=ñdyÝ~ª™a©CG#…”¦ÖÜ}J†yÞslš „^žA¨ž›ÖÅx}Gw5£Š,œÓm˜;޽1ÇïôÆí({Î/²bß̼êTW`D÷Šd%Fw7•ò:˜v®]Jz?=rÌÏñ'1Æ…z€ËI‡cËÊ,³&áÜí™Z$Ø• [ð´Yw¯¿çpD„!»üÕT«DYðañaæ’²ÜäÑXp:QU%q³Üö-Ú¥Ãéë‚\¡Ò‚<³œ>qÎÌY¿4Àw½öÝ/».'|ܯ¯Á?Ý[^˜÷À¹ o¨ý‚âXd—È^’3ËÒó¹–¿•³`L”.\õ| = ‡¸^÷"×n7x'ÄNÍ­Ÿ¿Ð…nç®È»*@…“ÖÔ“{¤ ífV?ïE©æß ‹e?ôÄF‹9R¾ §'#yå¤#×¼ìõq½V‰Iµ˜q%ow¥…¶EªŽêcñþ9rËHÞ-¤ôJ0h–suž¥@V_†$ù½;´$hý>í ÑŸ»ÝB,q³Æ¹p‡Ûi¿®¥þAu7¡ÍÎ #ªÈ1]=e™Íhçp·wŒ>Í­…Òcü×FõÃÈv‰ìR@ßMb€nü¸é:Á­ÍÇÂä¿ê¸k¾÷uO£fC^h”$JYÏžáþ‹}Ðèe¾ÜZÃNö`!_ôDd6H€3I¦‹Ãˆì@=G“1Lóm©ÂVe“Ø«‘(mÆJãðjÄô ðÞe±‘£"‡¤ë¿RÑOÆÉ-û¼?²°+Bð”&+ÞI“"ó^s=¾¿î Γ¤9 Ë¥,Jøeé?»dhÝl™¸ôÅj7Ttæ÷Ð=UíóNÓ¢]ß{·X–Ú—§šÊ”Òόۚ'¤§wgjþ¶Ê™ §d„Zµ%/°öƯ?­|L¡ËRMÉÃ{‰!óæSYá!Ù¦ߤA 8pÔÄÏ ¥ "¥¶íøÍí¥ëü×b•IE<®­™¡<î…WÜŒ9{ çæÁ–¿K¡c­ƒOvG¦‰-ŠKLÉk*Ãjn´Êã{ðJ÷îœÛ†!òkrùhÇü'SëPÈlù‚»‘š3,oe–<ò‡Ù VËû‰hÑ<Æz¬NÉðh9ë‡0úb¾5U&°kã$—Ú–‚XÔƒie-#w!&È^R]Gs‘•{¹‘JïäDºPC¤×[c" ;Ú@_ ^ìH7¬Â$&rÓ㕈”ð»Òì 3sC¾ØØ€·\ÇÇ6ŽÁÈÑN!¸O<2 D©r]Óáœ5¢’ß§ Ô*GÁË_éIÍ_)4.a&¯EŠ9ž&½ÜM(~ÿóp8p-1x€…ü¯*k…¶™&‹ŽñEs9ÙŸ ‹-(Ô(0Nj ù47 ÀÓ/½ÙÒzmúèÇo`k].¾@)ºE…u¦·Ê½ÌŽæèÚŒ]i‹¿_Ûü×Èxá‡ý@<BÚ€ö– Ë½JÒ÷˵`d˜A‰{ÄoÌn1&ºæª¾ú0ótÁÊL¿RÕ¿>êN‡~gÞ"”‰.³sî1ùž—öæ.f’å€_ýmÒ˶¤\Ì’lóMB´ˆÏ)h‹Óºs¾– BÌéˆË¢_=Ö0Ø·i%–k䌚U3¡?¨¬¤r®b5:’ö à -zbøÁõÍûø|—fÉÓ°y¸ÀOçX9=´Æ =nÛI÷š±­ó¿@É·%HÛ %\™¼3wÑUO-ÃþõyýAjêbŽ$êªAµôÕµAP‰{uXâ~÷­’ëRµüîʺê`aŒN²|å8‚TÌ5ŠÎ&yÄ0ªMÇö¬Ù{lßöQ0•³ÙÓ{›OggSp›O!*—Ï®Eÿ.ÿBÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü×åä[#†–Ü|jâÆ º½‘»L.ÁÄš m)¢N$ŒÃDñZy(U/²òf,¸j4ú<ò+LÛ>¾ÒÛ¦¿Cª­õiŸ‹[ ”žv"õ‘w¹ Ó¹m™’T.7;5ü ob‹¯‰_ÇåWî½2¬ŸÈÓ®4ýÞXöMš¥Õè[@ N”>¶HA QyV°1ÐÕQÍ{{ %¸ùù€¥z?Üÿë•¢W‡e;HiQ ‚Þªýðž²²ÔÛXG¥Kª?W¯ø²µgŤ[Ö«ºœIkÛ˜‘=B¯içu„hŸ–•‹nb€÷t±›•/OSkëŽzŠ’LšyzØÝœ Ã44è¢ 7ÔÒ&³iÇ„ö¢ß½–$ŒË3¥³¼8ÚGh]"ÍDår¨ÁÃü×F QÎT¹ÕûvŒ/«RøŠ[¼"ÿÛâ°²}ûÔçnÕÕ*!rùÙ™ Œ·ÓZ”žå³y—ÓTZÏO—M£öPh%?÷2xt¿ƒj'[xÐ#}7¼œoŠŽû+o#zçšÏjT–G8ºØì«aœŽ•ä4×Ð¥œCâ^\xÐþ6èƒÆú/»úˆ(>Ø(þ{rû ¿íÀ’òFæ//w߬ü_˜ `ÜÐ&«m˦ïžñiôöè=¢d·Ò™ð|Õ7ZIlê߯{Ú3˜s½ªü×GÐð°÷ÚëIß)gm9Ý¥C f¼ûȶ­š<ÚP¦Jªôhžª/å`§ý{80+æ7y <®”ëñÀ4I¨Ã±V>µ…* tµB< ­p•d,¬Êm*VetRŠx&rî 6ý7$%0Œe€¤`=_µƒ—D²TBÎeç., Ž×½¿:nK*-v'ÑÇì¤|”w|!hÞ‰ –oíä: )çgç‡[D$¢ÚÉp2—ö¬XaÞFÓð!rM‘|5Ú“q-õ°,zGúä^z™J¦{c¸8ãûïW²,Ö1 »CœsêoNß0Ll6Š>.´EËóÒ,a‹+»èjí¨M’;µCÿ¤¢Wꦱϼ"#ÎXòß Ùï]×B7ÀÛ|v´/ØøólüÕZ:>¦9´xhfýntzòfÞyA†r¹ æ’>³²A¸ë0‡Š×Ö£·)Åû&)ê ™Džà€MöT¯’£Cóþðéf“p[•Ï^ˆ}¹9U8f²pÀ [ØW¶Ÿ÷¨c–•#õ:ÙV“¹{F"•~Äo—áŠlÝçÂLK®@‘ñ¦€|Ó{dgœümÙàroºõg9¨T(Ìq‡ÿÐe¦þö5W|l^C^`¹.…l¾¤Ìµ%ˆb÷OfÎðh;øšê-M}k¦%1,Ô —ñLj¿Ò)ÈèÀq\Å'¾×5WXKÞ,¹õmˆfHúxªÒtÍ;uÃècGCC¥'^*dØw T,"Íü"g›”Ò†wN—ìHè-úÔ„Þ»N§ÝfŸ=bã­ÝuÀ¥¤¨7z+ïÜç¿3ôW4™yZ"B‡L÷ÝàP?ŠgíÒ,¨ÊôÉ@òD숸E¥°ËKKåÆíÇU=ÖÊVkö. }ú®ÉV’üÕZ@rCÕX,&,ÜþSV¦ñ\<þ:çPí†pÍüz+ +9¹ÆØ" \ï(¾ÆWLVíIˆð¨ðÐ=öÖ‚d8Où壋ž[“­I$^Š€“úYQõŸI™‚ ö°<:ìð†¼Æ"u?ÐÕlÇã„•”L›w?þÙßO(uvbH³L>] ¦õd¯Ž<Ý Õ†‘NªuŸX«\”ŸO²šŒJ,ˆ{¯Z“Tü=›|§SÿZoOlÑTR1ŒÁͪð£•L‡]î[+qòÀÏÍÍg!U!1â*\úƒ¼gä9÷‚ÏçmyïÊÞ£@ç®4wfí@a/ÖçÂ8'îP¡*Ìl3¬’dÖøÜŸY;Ûf%M"‚ü×G=/¾<¥ûMôD Àr®_;ðý-Ü{'°!ó¡T@ûW •_űÝtÖ³-0wÞ5çZnŽðÜ™c¸£¾^Ù?â´îŠ)íÒ½G7±r|ì„#N‰ô‰®÷¬|JHA#ÐôÛ)½óXðí̺QÔ…jõj¦¢9‹ Ù^‹Ç±—r*!mÒ^ýÈ#5Z¶DþePéjFžá˜PËq•ÄÆ>e§`ö4åC”ŸÄáC_è¼ûä¡úöaˆà6 ëü«Àq®ÕÈåß°¶ ¬½_£^n¿ÒÊ*cÃí9á_–˳ì÷´‡lÆ&ýù>Ú Àú.#¢púùÆûÀš$ÈqÆ2@aª&ƒ[mµØÆíœmÎB ‚E[Uþ§n‚W†m7+Øщñ ¨vÉbü×Fò†&Kƒ: )-NÔ6ØM¢)Æ I™¦m΀=l΄cµÈž_8Ø vºz,’¶¸›VC“㦘•Õìñƶ:e=ÈåÃõ%óÏ-欲=7Û@¼Ž¼ÉxÉ'[ÐKÈœyw"{† ö ã„0·ËmZßµP™ÙõåZ…ËýÌæUÛâÓh¯¶LkjTIœU#í= W„ü*^~4Ôöþ \aþ_‡YñI¡0v¶®©¹ ÷ü@t4]3a¹¿—ÕóMíNƒí••‰(ÿK•¹Ü®He#|;z‚ë\S9î N7ëȉvkRo­©°A)!ê7"íJúá’õj}óô?REÔÇON÷­’EiÕ×eo$¦„´Šü×Fjƒ„gÕŠ]Òßå`Hl6}uÃ’L‰Ó”·¾ùÔþbå {Ô K,ù½(Þ?ÝØå¥óijúÑ%LYz¢/8u5RXsM\IÜGŸhóõ4Ž(~Ú$‡¾ø DHJÔn,Ù¤M€žXîñÆ2&¬JzpÍ d6zÒwdAñÿ/R_0W¼O nE’Ê@K%ßÑ2Jמ:¤ùψ°EÍÁ!•¶|Kæ#aV =ÁŽZжÆ(†«'·0ê(CûñÁÙ\×X*R¥ë¤b6ÈU׿½ùøå‚:ñ÷‰P«-Ëà¾-«î@'ógÚN iŸÎßIM°t8ÐÑO<3òá=œÔ_óxÁá6ݹO2TæöÃÊÛ±DÚ)š_žz*Ъ’ü7 ¿þÖý¡©F ²õh¸U^F•‘Õ-GJ,é{NÆØs`o›à¦Rm¬ú¾rçBi:\(䥔­£S6úª0Êþg\íÀ$qS±cêhJwYûâ¾K¡àTÁ:¸ÒùPøä&õçø¸¤:äErë¹´ÃÈ›õ åG*•®òÈ©ÞS‚(ÊWˆ€†ÊvŸÙg!°îtX,¦!'òs½5õðebð8º͸ڴ~>𨸓HºÝ¡(ü!ë[vm¦D*C0G©Œ«Yü?›Î÷ ŸxÙ„,$4 ìýÛÔÄ~L[ç!AéfÙl¢™vd¶ ÔÈê"Šcôl+ak£-!‚'D¥ÓÍ_  Íê;¡êªùQ“ôuB¹ˆ¿S>ôÆŠÉ;‰û•¢ š=Yaÿ°ó“&––ö†Ã†á‘\Mr–ër,Öi|íîU  ky³'—‚œ¤ˆÎ’G ù’ħØ80kB9÷ßù)E‹gÞ®ÿ%äl<£þŸµ>RÄ5+§p³  'zù>ñ"•e-tmÀ‰Gp¥„5" )î¨F xßhòúÇ*—Ëÿ»Hu +Í1|XÁü«üÍ Vš–=Ú Þ841Ý÷dùV¯IàñÒµŸÎ°ê!‡uïH˜Ð%w‚-t­’TïÖüÚØõãyˆèí¬{löHI¡"qÜÇÌñ;Å<­gž¸õ,’…ÝH‹½yƒýZtY¬aK>Ú :¬ÂǹcsàMòÕP´AøŸKîSIˆÈ¾Ñ:濇.ÁRðÊ{ê•ñÃ&±–ØFýÇÆ«·ãðë3ÌAq×4Ê g}¹—“`¡Ûp6;ÆÃ+@l|3øLËúƒ~ZJ›RQ¹èŠ*öŸ.B— áY¢¤Ù] FÈ {Ç«Ñ!g­£2J{ûV3{rD•‚ ºâ@8œq“ó:¤é fì% rÍüÖÙë~± =wl¥Ãô>É‹¦•hþ=E;ɶ§Î§š=×g+À§¥À8Ù34I“´^©;9e}4X³ü×D{bBFÐõ¾×©àÔ@úy½ú;fvÞ­­)Z5Œ¯êG.í[ý ûeÆëô´!üÛîÎxî”±B‡Œ¼‘˜š¿¡›í¨O౬x7éÚ«I·±›‡žIµa@~Ƽ½2<®ºÆï1ò¼gŸ›³ ™D\ØDúù°ì—p*Ñü*ØØÌ™ÁúJŸ0ì^ëî¢1§°ñÆ£LŠõ‡s•2„`ˆ%—”ÕBï å-šJmfïÂ_ 㦕6z—q9ÌÆ/\öÛJB¾ýÁ¸#Nvâ™ðÓ¥'ó󸈧 eéà9Ëø…&^ݸ_y²½³iS:Ö†ËD«Ëà?k¢eíf¶ùfè«-YãK1ôô$(­Ìïú(•àï9Øå0=ö¾Ï×ëd¹L¾Œ>dÃüÚ”~åð¯ g "·)¦«´)€œˆ²Rê-[›s÷ÇEil'ìQ²½ÿXãXžqX1wãÝ>Ÿ.@e“ ò S@èK®Ë׸ KÊÈœM£»×@§˜HÜâH‰Â™·÷ªôÊ-â wùøm–α/lîÒ wÕ»ÞÅÆ8|Œ¦³}Q#ëLÃx޲^]=²³øš›œYÿþ/幉—k*rñ(a"¢UWÖ·.7_]&ÜûòÿûÜúŸæ{úp}|£¦Y~Ê<ß›-LµIì|¼»Ú— ¯E\²g| ])ÐȆëá>aBí‹LôsÃé¼wåBuêl60ãúJÿ÷T݉âéR­Òkií9,²a÷2Q~àÁ\7§zêÎxã—Ï¡6‹WRfe(Sü×èì­µd€bŽí¸·»F|nVȦ0ŸØ\%~FyÒí ò33tõÍÄÛ+#Ç€,„a}&¤=B_w£{ÝS†ã(u·¯I:I”ŽTFô…bi5×4ï‘"÷1fƒ»ŽûtöÎðÜÿÉ¥ùF•µ"— Šý:kÙô2¤ 9ÈÙR³£xû¶mH±”MÔÇ’V_ù•ê¾ÀÃñZAëA„™ú}ïÓÿ èìÞ™—ÔºéAŸºstì×½ î¼UN³àÞ8ɆHÍèIí8Ý…+ÈHÕr؆nìäujã‚•±ðð&ÿ]ͯwÎ(á˜uI0ÿ‡íÑÁI9ïЈlòªë¨K«·žçu!ÀÇ Ä€Tì’».£²m1qr,¯q-²4çÉB@»ÎåD›üÜOΊÛÁâ¨Eülc[· ¯ÿ…4µ)+•‘þúžM0õ–õ´§‹é©?† õÑ$è­¢ÃÁµÜã"¬ =hkÝð×Gæ`›æxÎF±:O>ÓéúyxoGóÑ3éß 4Ì0Qùm¦’q†_f&ÖNŒ•U´=èÖÁ¼?õdòL¦‡j‰îê©Níh\“#žç}7H”äÂÓD‡ðÕfgP]ÐÖëá ßÝbs~˜©3¼ó ZÏ^cˆh3Ç7±5¤{Ñã;ú¨M”|IA *blÍÛñmËIY;¸-žŒ¤VÝã’8ªý$=ÒC¬f˜†fZ#k,ý™_6f¢ì– —;!Û˜”œ¨Èb¼E›ÅV¿é@Ÿ ŽÖ$ÜâT…›üÕZnö§Wؽ£öd&/½‰kÿdÓ:ÓvÙJë ÛI=ëRw펻ý¹©¡R¡FÕtõ0› 2¶Mæ§äÔôlÛׇWBðÙɸ‰¡^G^I¹w½\þäÙMxi7ÏÁkò)+lLì—ÙŽñ/dÏRì s"5’±¡è|ãkïz Þ|Qd/q`>Ïc8 ¤6ÁPÇUÔ¸š1#NʶDzDS;=ð\åô’O%ç¨$ˆ‚YŠ¢³ûWRuŠŠÙàŠj9Ø5ªCè¿x[¤8[J-D*+,½oÀ€– ‹ˆ³"ÑÙ<÷å>.¸-„›Ô%%³ln¡5ɪÙù÷òåtm2çÓ wž( ¥Ç¥ÇHuLèUq±˜ËÄHÚÅn@`Y|h߯4òãü×Ï´$Î" •‡¨ç \ãûàc«Ù‹WŠ“†³U¼EUàëûYÇht×RÖJ¤SjŽ‘AKÃ%s÷~ç½9£cª!´Rý¨Ç³ðàÅ~S¿ I×{-Nc{A/"L|DþéÔd¶‰“û Ê'ÌÅÚ>‡¹öæY–uʨM0eÅ@q²ÚúÑ [ùÓu»?"ŸyØwwlwƒ bÈÕ®‹ŽDJµç£BkUÞ­Jú¬y÷¿ÓRWWܶ-ö ‡e[)ÁQ54xúííq½‡¹áaÕ];fÝÒÒÀ5éÍHŸ›)/ˆÅ+2úéÎ&üì›·†·mð»7^ZGvzãý—N^r¤`‹21‡šôü{kW$ipo+æ gņÛ/¢PýÒð ǹ¢FÓ,ÉÇ0ñ– är¤ëù èíã™fæ·®·JÁx÷^@†ªë‘¥ßv½ ö·™iúTò›{LGÂ)AJ€óÊýG/éN|4q`‹©eðBìK[2Ù€XáÑ;DÃ&¸›¨^CW’f9'¾*«ìóÕ‘†çíÆÓ¡x¢c*üq¼¼;L"þE0y{ê§“g¢ wF.×%‡bÝߨU*„ô署èâ[§ƒÆ'¹ù‡,ÝöüÔ——ˆÛNìééRRŒÜ¯e ¾`£9¸@).­d1+|]ºÆg‹©:œ—\BQéµ6ªw€=^ŽïÆm]‰ã[Ù 87Ô¯XžtÄTÚÿàIÏþ­¢BÚÜXƒÈüìX»“S«ÖâÄÂm=YõúC¿µ¹$®‚˜mÊ ,ùE¨{²¼v¾É ú ~àÿ+UûT] K—;ÂV"øàQҪæ@ÝÖ-»?¦-;õº¡\Íh#UŠÁ¾Q=ýWÛ3d9õé¤ÿn0鯄*Î ê´Xç+ØÃ£5¨z}©¥àjÞ–Öá-GÆMƒT`6§±rNg}âŠÈ­;øÂá+¯e?ËÑ›|Šÿļ4DÙNº‹â'’n9ÑIcÙ¬P¹ýe¥oš´¬tVç¾’Ë;+â[xU @¢ôÑ&M7ø´³Ï(°Öi=7&W؂זjfêÂC”ÜzXÂéxf0É~àロo¹.b™°cfÉ$|G¡Eý ½ÿŒqÊw Ƭ˜ OggSÙ›O!,Ký7ÿ(ÿ,ÿ)ÿ+ÿ,ÿ"ÿ$ÿ*ÿ'ÿ9ÿÿ-ÿ.ÿ.üìX»oÚ©¹ñ0”?–æ‘ÁÊûô>côóa£ieu»a¤‚"M»±´±ó+率Ðû…Ø®úVÃöáQZ­2þ·…1dä]R޲HiÔ TΚ„äêe~Æ<‹Â,_M·°í­9Z$!ô»„Ûê!žØdËÏÖ>p­â©ã< q|éÑ. 4UJãx^†Îåµåà¨Yzl« ¹űŸ2&¼fÍZG½ÔCGÈL¿@õç‚AŽÏ‹Öº¿zƒø"hÃÖܨ¡ÞºZ Nié¥ÑP|¾»ÈM Ïk'ø”[*ûØXœew(Ï’µWuƒ’}×Y=ÜÅÞ;¤cëc²þ ’tc:ù %×ÕÙ¶¯ÛIxÉC;A LóF™½ë&=´»‰°Ÿ å[¼F¶è üïÜì~<­¸Ÿ©ÞIšêuiöa‹à«×º¾Yó39Āܫڹ1P/¾ò¹èêðäg¤© 3ñ%j’~ß±]®Û‡.Ã=v¤ÿïŸpñrÖeïø¶çöÃøÉË’f§K’rÁsh\l3ë(ì¼´[ zfÀÇ•âD‚þ%rJeÝ( ©^GvwFª,Vû–#aå ÞV…cäEû—0;Z†ëðÖ€tl'Y,{M)eà›1?%ü]þ¡E¯ÀK¯ÚºÚ1v:)|}áN§—eÎÇ¿b8¾Þ3Ñ’®»Tõ/x6fNžvR9—ã<®3Zý¢Êè™OÿD h†OâL°y-md`!¾)ÔR5‘]‹/ ôþ”¤b÷/oÛð´Èéýéí¸Z ü탆Rä­V ˜j)kÀ8ÊZ·àpñe蘮Éè²µT®Hù¿y™µ'™šáÖäQŒWxÙ|ÀÚP¸X§d£c6Íà› ë÷‹wö«Ð“w×X…-ë)Ø »ùÌèmy§Úæ˜<Ý}¸{lðôyXuôæ›~½+~T"­2qª›Â¢|0‰¦š®:ÁŸùî-yFšTÆÃ¶ÒoÏ“*æ¿n8W2Â}Ⱥ¿ŠiÈùúÛÃUáÚ*–'A¾¬£`DP;‡-~Y‰PûÃSãd˜ùçc…/Õ3”ªÓÀÒ>/æ bIn•ôÃò‘Mzi^jEÁ“ tS(ÕpÈJ.|àEþË äc]/ûH<8P°â‹ší’õvW=p¸NVÃÄyÂJýör^¦®WÍ6X ¦^ŸbÄy ÷ª–æ ÄUlPÒçë¼ìýy/†ŽR¸0úŒG<‰Ó›ÑÍ!Øé9@¤éɵÜc:¬ÿ;Ͷ.÷Vª·˜–”ͼN·þopš iÐy —Ÿ/…‰¢ÇyÆ^ó:®¿m&`¼âñƈJDÁ¡—úŽý%ü ›{Þ®Ž‘ 'ù Ìà/!æ\ÒªÔ™rš;û·Yt,Í“ÄÚª üìWú rã Tyúµu—„›¶­&à¾`ËQ<è¾"¿cèM¬H_{@"£-Ý«S×îÍfé³ëœ;\{SáI;$xLŽ+­È­½;2£Ï ·dÛi>çc^:Û¼øë«†HF)ÄÄ·WâÔ¡<œÂš3°¬bcÕ‘%Ž/Bð¼À:ãgãHxÕyðj–çtŸÍ9R³d¾h·­Œ°y{±îO.ž©zy‰ „×¥ì?®˜U°™·é¾gÉëI‘[\sÛϱD‹#$"SAVÃÕˆòÄɨR¥QïäÕ9ϱŸ Xžµ^…c=&,}¡-—™§œ…ƒJ¿Y‰lHXß^ãT‘ª o¨ &ê][/6~Æ€A°‡»Y(@†7\ üìX]û+éIdyŠ}ÞNÊ8Óe ²Š+òd¾MI2cšt+yŽåšˆ‘xÿú™MÁHk;L”Qÿ¢å™Cà‡Q¨ÐAî ¢çsà-}M€éG.Hú)¨Æ¥k±+b0¿r©²›»qßxªV­’‡ùþo?èßÙR_0·N:®ÎÉ|ª\ð©OÌËÚÿÉÅ-ÆñÒM9Lº‚lŸtR_mü¶½ƒü’‘˜|@‘Ä<²×ù¯ß­Jé;ª­ÅµúBNbtMÒRpÅ'ê°¯)ª+ž¦›m¼¡Rgz»ßAx?UA¸J‚fÇ2$Õ0…rP&“…ø¢VsYdrÇð_Uy¨QnÃÕp_û¦ÂÈþðckZÞ%õ­B° ÔÝ)¿ bѼõŽJ üðRDƒ/¥û4ƒá~n¥9fÌ?:kÞ¸Q—pTÁٽذAðŽuiíþ>ÒR:ÃLòôM*yÕ+ö-V# ïrÑwä‰h‡|†íésqÍ;K:Š»ÜÍa$+yÛȈWšáøÐjm…áÈ¥›bÛ—%Æ,ƒ¢1‹±¸íК&SGÀþ¼ÆÊL6¬¯\(Þ){€CôÊ7!jP=¿˜tmêÉh¨žW¦•ù4°2û‹X Ó ïž×Y‡ÔûN»¶E*ñUØ‘V¾›m‘ñG’ZX!^¬+º üïÜÚá(Tƒ2W_×e¯vè~+2Óä,ˆSIóá*IÜ©gˆ%Ø–JÍiœÔÎyL<^æ[e›É¨Y r€¥µàò½a»SøÏQøšÔ |…¯¶h7^~Ç A,uïŠ,|IÀÊ·­º^D‰™ÍB«Ëp‹‹Ðú_š"§v¶ÇäI//µŸ&-1» ¥"*%Ùhe Þš8æÛÖÏÛë¡ ã9û^Û£šFݗŸª%óLWLYp󆃄 ˜d•!D¸÷YUµ·jz&ºVéö?Je¥&)åä­ø(gÈR´Ë#ðü®Œâ—#×!”JŒK0zF™kë†Åèüþ+:üEQK™µÅÛÆY޳®ÒÙÕ~V1;ÞxÇpL˜Èh üð-Gþ¥ÏUok…ïv ÿCú=H>öÀm[ÓBvÑÝúm7Ì.ÉhÐË×­š8|ª©¾´³¥†W0 ÉÆA$ìþ«TŸŠ€´“U‘œÙùI»S±ì>¯ù{}WVˆTÂ%¯ ã×9dÍšI¨gˆ‡ÍWa¯¼Ö–ÛyøÉ-r£ƒøËÆÀ@³òå©“-íðýÚÜ_'ã1)îñðjšäÄ!³™Up¯âN¥Ã'ÝC@t#õ¯ A·Æ¤gÆê…߯?HéVõöGÂ-ó Û  Pür bn…ýÝå6Ÿí¿4žø=«áÀg¬Y@ZYCü¼![¦Pd–׿•@È‘ õŽƒ ÓaP+â2®(>])'»y =oíAX,›î¬}&öÑ«Q–¨šnÄ üìœú$[+­”s=V§Ür*»76ïPúC¯ÆMmÕ—ìFÙ4~:±ÙùÅôz˜Êúåå€6wí籚 O¿æk’²ºÍV㥰~_'#vªvç®Ú§˜¡~»[rŠO~V® èBÅXìÆtˆhì¬ óvóaŠŸRﮞªq[­Õm45èE‡…y½Þ(Ü8JyV=Ô,ºíK(¹c¬›A=ìK›`_^Š'埦}ŠŽ?r©S˜Žj´Ç]n‚”‹rÁm‡<” ^m_¨ÕIgël¾§ÐqæÄUMš¢ËŽ,&> 7ŽbÅã vqä«ì"‚'ž­zP‘÷za .epRµ€Œ¹ìŠÄ üð.()ªÑÍÑO“$•h_´fªR@;ŵkâqÔÁ­ÆêôZޱéU€ìÄÝÖÐUúdîb?îÁá¤Ëñ”LÇüªv¹ž\‘çá!ü¿ò+õ¿ïFÿ!×=‘[(ì…ĪVÃò?ê¶šÙ9zê6p‚êgA»Q[~4­Tàa!ùj3•UºÏK“5¡²Ê³·éøo/¿ï+B•µ<ïd·[(™ mø6þÁåæD¼ñMáVŸcàb«¿“έ,DÞÙO!Ãë6‡×cÕ&]B‹æª„3E ðV‚¯06¹R¨¬ ÿ¤;:è­k•6²í,÷X ÚɽW‰®Q·e¦­_d2¤€’l›$&, ÞB”¼Ñ… +däÛºÏö´¶ãÕF-»Ñ ƒZ üïÂ÷[Bõ™©-tvn‡6€Ó1ŸZ&¢h&ïÚ£M!—NyçÌŸ+}àŽjL#Œ3;–|Àm-˜Òöç·µþg{«,pr^ߊ¾hi}#Md–Æä„-õ'NqÅË{–Jǯ‘e Mœ¨Æam³Pó¯´ "NÄã)ˆU‚CöeŒvµvHŸÀ6É›³?Ë<ê„ehìö þsÖ+{&`6§˜ ËjüÁÌÛþáa  ÅVtjë{fbšÇ;caÏϼLRQ ™#$1Iÿ¬Çhcv«L· K¾Î#HZzÊÓ…-¼úuÄŸÍ“à L‚˜DÃ;‚² Å·×ÞÿœÆ Õ‹ÌÓ}FeôªõÆîoOÿZ·õe€L,qXÊ üí%YñÎ*Qͳ%-”Sš7õTª{„M‘­¦a¦ Ô¿Œ!Q—‡Jj#Ï6£+qñ½r*ªaÊôm¼¶•‡¾fÀÙ:|¡R¬Bý†’ ã®áƒÜYý‘ÙSá ÍrâÕ‰e·,@¶¶Â€^Ò·§ŠD'½§Å"¤©‡Dta~€Ç ÉA2Xo RŒxæ4‹]¬e=° Q‡*rZ :Z’©;E±úù”WŸƒ n>·è'm/’ÁR{hÖ…armvŒÛ´è‘`£&¨KÓ]£ÙA¤lHKiT³±ƒ,(«x× ýöSmçΦa†É2§ Qý…Vz²ã"t+RsÂ.)_g¨S]+‰õàôW+ÿkÍy*ÛŠ É·[4šYÜ0dwWÛI–ãã'Y²ÂihTµÿ¶ÐYè!©åý-iqÒ²&4z»ÊÇ9е&¸wÒ«Q^-…KÏ_aìc ê`ŒÃ•¿¡bŸ'ë¤ëÁ6øßÁÕÞ‚~àߪ!Á›˜;Íî\+%GÒä,ÕcÌGE÷ᨄA˸¾Ç€J¥óégå“!°ÛÀoÿ¦W5ï­NüÇh>sŠÔ?e´èå0ru$–VN¢E^ÍeöŠ©«­ ñæ-I^ûò°ÇQ÷:™¯¸~ S懲எΆÛZœ ­I+ çšëIw6G HʵÝîÏÅuä‘·&yjçiÈþð%ÃÈaF Zåb÷ïÌôkèã°ú7+-s›\¡W‹®nk*üÃgoò?؆Nþ­«7“Ì;J üíYÇTó3E"‡áòÅvj–”F‡OŠ7Ñöä4j3s£«à§ÅbRï< ï¢'Á8Ãh8Wü39I$ùý^i‚׿›LàªèMžšëOm¤%XA±/Û¦?p8ø\ªÚ]NÊNƒQ'ºêË~Žä^Ni#!nG°ÀFþ)ä•1ó§','Ê€\5‘õS#ïi‘qÃÖ'á5u5Pc~â˦‘Ô›9†Ñ”SDþ>$o~ £-VîøÀâ±¾-hó¤•v]ì Ÿ[Dn 0†…I›n;Jü0 d7"Þªüí%_hÇØùV 9éÐæÖä¡™ G‚6ªÖq6úU‰¾¦ õS*/~h:€þq.YÇ¡¢fÅ_ÓnÔœº‘PK݉k´–D+Gé˜Ä5&LOKøË|&}ʼ%]ĸŸVá¶Ÿ\´ÇÑ® ÂÌîÃ&¾uŒ k>ïqJ‰¦ìþ“‰¦•»'L{Þ2tƒ%”梙öydÈ»Í1ãlŠferPòl}æl»Á^Üœ›ã÷#tXOƒq–R€„BgÇUÓä×2¯7kÀVÔ„vûÀûÇ(/’à™Kw{@¯˜iâ•m.S¯M"TÖ UCõYkpW_ißoÁ)g…ZGÚ²ú¡‘¿®%Ôõ|ÿPÐöö›ÈšŒfÿÌ„kÉTö¦[—š üð. gèèYR&Rèvñ•^k³ß"‘#Ѧ0^o¾ª75bQè ¥ÜN93œ÷™‘>âŸõ*®øyÿk Óß_܆ÏÄ‚̇@£}NÆŸÎS¦“Çpq¤§©f×ï>³Sü$ÆÒ!tzÕèµpl—¨éÏBV©s>RõU©Щ=ÜšÄþzÈÏ4Œg`ßY÷¯æxgß¹Ù2Fô³o°c¹#‘¶ ™ê$Iˆùئ´+_·£—¹oºZf=dúM‚6ïƒ\(à–2Å9øT,ˆ*$Ÿli2”#ÜÙýÆxân0M[{ª¥·˜&O²Énîu˜¯NUË9#F$ŠnË¥ºî¤ÂŽ0žý†úßýØ/@·ãмHíý÷ÐÊ üñ£ûûŸ,A‚€èX9>]¢[ÒµW®XBü“{Xö. gU(ë E‡Üj‡y\9}ÄéÞSu|ø³S‘!´rZ…¶± ‰9½ÿk$xCäò ŠMMGA©º“.ÝW0=hÎãHñéwÉjsLïOb mZP{ö ëpT@JêznÍšžÌ`RR൯T||ŽôÅé Û±÷„/"æøO:!ÆæÆÕÙ é–1Û ‡ÎæzÊ8@Ò`œÄ=¥ _SüK8½•ø>†dµ‰,VNU{EwR«v<hó»H¨o½llô’*„7f˜‰8²Y*5ï8áŠ÷0A+¥ð¼]Δ•rO{¤ e‹“5}Ú$½4“—ÃçŠTêÕž6,Ÿ“ô|û¦lþAÚô ð $ʺ¤ -þÍÞÒª üë7\C l)?âà_B÷°NC“ë9@²/í¼Ñ\Uîª÷] (¢Ïg‰_ñ÷¡•wCUÊÜË&`O—G7ó‚ -¦µâ¨†HIóê1—¤¾;;sáÐ}ï’(ÄFÛgH>³”‡]§–ÍNä5Æ<³Æ®9¤ „ "F¸“6>ee8iéáÞ¦Žý•BÇŒæyöndhãßµü“©‰BR,&¼Y„ºI« c{XYÖ6ƒv'Bಙ˚„Gj‘³ ¹Ù-‰9\³ÛשBý×Ëî·ýr·¸Zÿ‰¥ãdîu²íEWÛ›xñ{hÒ±ªÛú.m¨Ž#”Îý=/ˆ2á\Öezª—å4õ¼­*Õk@Rvý>_=ÚÏ» üßpö¾³%°©Ø!&ÞôJ–…Pà ý"a´eBÅ(¹3÷ I2º² º©n›W¯VóºHø›=_5‰åFS)š½`uâ>Á°[-Yosõ Ô ¦…”8eäº~ÖÛË ™½+š0V‡ÆMÀ³zBØÙ üÙWò·h’Ô±™a£¥ó$2#æeÑd™îï%`ùh(C›*¼è8VÖiDîõL”Zÿ¾©=Œ™ ’v6Ä.Ð×ÅŽ\“s²îGÎtüiëÆê,ý!®ªÅzÚ§Õ~ʃ‡“.6"³r? aÍœVù+WÒÒx€‡Qű\óá³n ¬,`òøPÌQ^d}«¨— +J™Ç˽ɋú¶rky"è3†:4ì=bÚ‘ð‚{&ä¼0z¸ºN~AþÈŠ¸³‹ßåÚu”íw“΢»¬©žÑš(ðÁåÄ“ßu ÓLªo³ÔÿU±½ÓÒ3¼ƒxK#dAÔ9o¿Z"§­˜ÚÍ'6:ï"ý¿K?Õ!™êL_!|^t.J¦OyÊgá›°æC!(Ø+ÍߨO`§…³ÚüÜ?:áa:ÔÀëoKlœ²=Üð|‰ËäR "ÃuHÅ‘9Nß­Šø¯ë°Cyálæ|ƒÿoñï9s;@¶"9gæëÞåW ü+ÿHùMèúRSÙ“ª1èfÈÑNðæ… ,: Û¹?tŽpÁÓr$‡d³kÛ(Î$;x0{q0D4‹¯ŠÊ›¤@š¹X$·Sæ)ð»÷Ú6t~ÊJ”5bðÃ:ÕŒ*E§™-_èÔ×·ÜDûÖªð^CèTe\}£+m“Þ²SŸrw÷ ¤_cÁà ̤™uL2s†MÛêû 0a5†pë|(eµe,<ÑËÓžob£é<ä)¯-#õ%Bð_­Î²d7|§Émkt<3:üÚÜŽÙÕW* dÕ Þåþß™[ [Þj¥‘Ëc¿©dÿøÁØ%w[.ëõ› `<ÉÈóUrfúäð=$<¥6ϪÒö 8ËCözãö.ÀŽUÊ`()£DXå½·cÿí·ðšÐ:Õˆ»v¦ÉB_ÒÊ ’ê÷“G³>Åe“rL³PÍz¢œ°wÎðA+wIûGí<=„ †=Õx£zsîNd7ï?ÛBOï‘l1ÿ¸L¹Í)L-aaý¾çT—F ìÈz“¡ºõ´âmÛ£nbÚÄ/¾~v„æ¡odísòÈ22ìÛÉôTÒI3;;éìXçÀ.°æu2l(À8½ m´|ÁzHA¹e·mµD rÓלכSYXé''K~.Ó•6›Bö¡úòN.ñR‚r6ì±¢ëó Q¿z¸xè9‡ ½¢ýêGèÍcär›® gø&§]LàœQi~–á5}7Ó›F®Þå+XÚv›Ò d¤AÆ­ÀÄ’@BcÎæYCÉ+úæñÔdXØL²7qa‡d)ùaöð ì^Û¥› ßG&;û¤8w|!±®©vÛNˆ:›R¥9Nt¥Rõ ™Ý+õÐ着’º;‚zÈ“ü×G{(ÔŸ;wc§7vïöB(ðô/ë´xäÖ‡ì0¯g飿^Ïð^Å$·’ÔAdY?›b¤¿1’Ž%ˆ è(]?Þ0ªc–ÆZÚò~Ï.1ùqåeO4 dÊyLÎËyÕž—>©ydœÕJ=ó^Oˆ³Ó/’‰gaäH5tRÀF‚x9ÆaÁù‡„^î*ATÏ3¿„a7ø¤Ÿ¸ey¯\Ä ¤Ð2-­ç—ÈÝùp" ¼®s‡  ‹f~ú7Üq$}8™P^”ç=3ä)f¶r"o‹úÖÒFgª9 UUL÷Éq¯!sB{ØAøʾ›x0&Ãà˜c4Ò(ó8>¿@ bD6û}3\Ü<:“¡ŽÏf)IgdÃbq,E¼ö9›iî+¢ÎSü×èð³`úV%ù4ËEc[Döiö “RËVÎbèXq$IZWmnŽÆ èÁ-”ã… Á^†­›b¯ÇæNÍRJ‚uókôR BcáÍM0ð\47€N\/›œðž//ÎÝÌ"žç1¦»‘¥‘ !À³]Ÿ-"ˆ$ÁEO ê¤âsŸÈÒ­ÑeÌ/ŽÜÆó÷&¥v3ùÈiö‹>ê,Krƒfš§ˆ$kÆ0÷³õÍ”àÄ|8ö±3-òíB Þ•Ÿê› S}É U).3ž½ÉàV°ªýÃ+Ü –P‹F"Æòߪp)XÖ£æS›åØ?í™êØ…óx0n1n´q_Øýð.«²j‡6(Ý;¼èèüö±<Ä)=ùô2cËM4ÝG€å‹ÚyBêËn=ʧ¸ÌÞï1Ãü×çLfÀêÔl¯Nè–QL±áb;ÏÓ‚pKØò´ò‚.=öV±©Ä•ÉÎÉŒÈX^¢;ITûþp¥bì›UꑇÊU\£P” £ŒÙ[æ6¸w,û„¨4ºAzxõ烸ЄdgÑëȹ~\¶ÙAÂÜá(ê.¡Ê…01n~‰Š›8=î% n§•œ­ŠFµµn"ªÚ佃r›Ý×Ü(ròò¡á›12N„AÌ„ôïGiW[n bÊIkíé„ZL.¹ |Ïp¸PÌHþªJýô•!Í&Mb¬kmë\¡³½ØFÁeÔ]oç7 U€?d–ï^€½OêRfƒã2 / OmÊôúfð_NÂÐ.,4ÿ\¤¿XðÃ1èM”ýRºðÕñ|J5’¬wAzDD³ü×a¸weJØ·„Â`ƒÚ8¢+è×ÕˆÝì‘+x N~"åÞgœ¨)@n ^jóÑ7Hu_ zb³§š™šuE[|± »w†¦=uæ_m~#8Yy«a•¥Ú± çµ…"NUÝò‹c2Ó0̽ê>¥VÑæCËS€@7’öægðu¸êÈÒïz©ïôÒÞ5¡‘c„(s×TØ_IoÙø¨äq‡¤1­fRè;—Ê$û˜?gk2ëŸm—áï{;ªý-ÁÉõ€¬¶0ö»eÈàüöûh *=Øžahíÿ%§BÑÅÎCS𶤸Z(7•þ¼ˆJçHòÀS”_¿œo«U]I§¥Áƒ"µ€‚à©Ü-+4»šlÎæªÖLÍ– É[rjþ¥ú¿%ÀÚOV†=#üÚÜ™TØØ½>LyÙvÄÊÚ9O©²PóÇqS”p¤Þ1]ý˜5ôò8L´Vpœ ÚíJsÐtž‡ÎxnåO 7 ª„“ OS0óMiïvö…¬øÍ?Ú¬J;«yb­¤ƒ¶O²3s>ùáÚÏ‚ªÅñ:/7Yã]\d·ge=QûÒM=×Àϸ³¿á[¼52wlªaÀQ[¸u$ïñü"„ûHo[ïz÷¹û¼°‘<[äc®Ô|‹Š^SX£§i¤Áö’+ZŽ(¯YšéOvUô[Š<÷#é5ùéØÈ2i næ ´Ñ¯”vÙЪ›»ê[bZÍŒÏßbafì¤~t³…DzUó‘½FûbŽÚ3äz/ûlA”)†ãò—K-ZOû° ·ÖÃìEô¨KüÚÙ»¥,¿>'ÿ:l%îyXm_Ä'£ñÈuå¼éÆ´—úÖ ôÇŽÔxAwÙD\}gdJ$`ç­1b–‰ãJ}ÚñoyÚ×¾’‡‡-â?a£‘ñ[(8Òƒ6híj@{NWýïöÞäƒx öcš–AiPÊÚwÄg4ÏcÎfs‡®xÖ7͇ü3ÞLïf ÈÙ£þ¨Ùâˆ{;k`›,Lø§Ìé°$ìYyJåÃÛk*˜·V_¸e’TŒ6¸˜LÐŽ¹9Òè]nßú1Ër¸Ëhòzõä«û‡,*§^Ðÿ<ìösVô:ÑŒ?8–8z:8=¿ó¾A®ž¡›æ†£ Í~BDlãìt (f0}üµ >%»¿kH›XòƦ?£üÜNåÖÑ–‹8lÃuz–#ö‡§E¯²…ºn £JfÀ I%Q!“Ô‡J¾jü 9W£çú±¦öŸàýºÜ]á4T[¦iÚ0›ùƒ] }•þäêf'PŽí! ¨e\à?{ASˆ¯K&ͯá)O”àUÉŽYzWª½aÎ}Øßì/lYmÁfûÊdõèYú½cÁ€ÓÏ/‚ÔF:q:¾dÖ¡7#-©—œi *Êï7¨,Ÿ&ÇnO^U€¼˜‰S´˜Ëç²¾ œ©¬WŸ£$édüœ8j%Ú@l€sÝLL6,ºR¢b±Å½,–ðЙXüÁÇ©-ïyöO‘íÌ•ú MeD2 ²§sL7ÙÑî-j™h.0ן ýÞ×L$ –?·@²Atãü×ÉñWTcP½M.f̯QÜqðÞ_ˆØÀ—§Oã)õ™ ¹ÉrAž{= ‘’ž$‰B`""g=2ƒ· ¶hùtÔAÔ;qoRC]¦W6" æ÷I×#4²qÆ)02Š)š»Rܙ蛓½cÜ­ÚïÛþ9e(ã †®ß­$X<ü…nÃsóK„90ýÆñ·—•Ò7 IWê^DZ¦¼S‘ß”³È6_w~YR3]<云šå |Á1¸I˜ A9ˆ©š&YG¦5=i¨W‹jUAŽÈƒ÷Ÿ³ÇT¨´ä,¤`ÎáiËÌÁê;{©[föF_?¼w'éQÔ?¦G•nÐT*p`°V¶ïˆÅ)K.ÌZˆmPÌî÷̈»©Ô\‰¤ºX{êMcü×W5ê§s^ïÏ®/ Çž„¾^cà6¯Þˆˆ/pû~6¸Ør/ŒFÔ³:Ó%Q#Æäãf´‹ÎͰ„zÆJ›s[è7ë—‘»¶¨úÜ(&Ïm©-qÇx¦{¥¬Ožd+hä‘Úqúãø£œGÖ\m ã%ÍÑpÓ™Fõl qR¯”/ÒÚÐöh0·…èFßl³ì­<öKúb‹$æb½ " ªÓ,ö/ôa´ã"œFÛû$^âO-ñzmDãîä¹Ë—š8ázü€9 ¾ÓO¼ò„ÙêÝj¼6×–yMa&I–b­pèÎçí"il!b­Ò·Ÿ²›lúo™A¾€.KÌõ⌵ǫ±ÆÙÞ'H@@KA¹üñ‘=L±ß©"YuÛÉYw”x^·Ù(z¹cx;B.Á÷×¢ÅsmRþùNÄŒP·ÊŠCh±L7.ƒ ¬éî>úfœylý$ö»™Àý`k9Ó­7J»6y§A/s·(ÕýN`|¤”©Ùò‚÷ Hå÷§‡•¤Éž®5,„ òfiú;ºNP†MUXš«!WÔ4Òéz•[ÔI4ïÅëaÃkõàžC…ˆeÇtÃf=¯D‘À¦FP)¿ÑÕÎ^O}èÞ¬Þë‹mePNР¼®BØ÷ß‹ÂǽjÌl¨Z÷ï#P'¨]Ú !ÌYo¡„Šw Ô÷ˆù ÖL)Á]¿ÿÄlÓ”3ð x›©ÑõØ…eô‹üºcx†«‰íÕù7b]ÑOÿ·*þõ§ùÕ¤¹´Þá%Ï‚ežh0Bfv¿uPÅW«„­-ŒÙmŸitÍ&ÛNY1(“ÐËF¹­Ñ1&B+)6ýÇþ{ëåÂD‚á Žé–¯öžÜ@Hüïâ`§ì½ô\b6 îîˆ#Z´Æà‹Ä(÷Ðù•ÉãŸÊüw¾¦Tìï OC夜 ©‘¯|n Ú$rPÊ\b5Êé tûVëC6_êçë_{O¨kn{ó\:- [úï„ï7 Rh#æÐ¢dþ’Ý«ÜâGÿ5,# …]»",ϳůÞ~A6@UóF!aìÃ9¢O•%gesKp‰møw=`H( ·Dš*E2›£À*«ö\]1fŸwç@¢Õ®3¨1†^Cò߆ëª8~%Êþ¤ël0fáf˜tíQ|› e$ËýÔ ûeP m%$QÎ èF—]^&ž9£B_$8+þ…W"?HM–†ÿŽÇ"Ÿi°±-êÑV`t[Yyªè üÚÜjŸ©o†£uÌ8Âôo@ÄË4^Ù¶Ávð/ì ݺ"‚š±º”ÏÐO(ñ·“³vóºazÁf)ËRņt/ê_–³‘Xú¡™ÀRZw^wfaã[-a¦Ãam4%IÙaørClš7`³È·uåá:<]Û5…†êÔ%‘þ¯Š?ò6éèšz•±ª´§âdïfS{ %!§Å Bˆá}ˆÜ'ãXº gí8¥Kk‹È š?¶!"FAX£|jó=uÍ›ßʶÈÚ5>ïÉ µò¡“_ iÀx¤DH½#âÎQ”gÃ,I+¹¿iE\Ê£g|L"L¡™ˆˆ·Ú<•å VGå\‡¶ÀgqÓJ+µÖç"(RœÛ0ß ZIçlüÕVssDõqau‡„ý¶ê«ݪÏÛÄc«áµÈ³áós£SclKôÞ®©ÉAÆÁD()AlYËcߢ,>0–¨yÛUÒ¤­‚ÈèäL ús%Ù$Žm;·r°côª¤z3`:†1°ÇxÖ,;Ùø÷$´Î;ÂRÁ`”Ññ©ø}¿ÙY¯jy°L#Þô™Ï‹ˆŸx®P²Ôár z¸6ÕÞg•Ç`ÐJ°¦•, ˆ@÷øIüìo¦iP7ü_5£V}’UèoäÎo Ú‹AafŽžYÏñ,Ó©m µðÙp hÙüH|tæ ÁÜÕʘp¸œÈÕ/ö™0+¹˜íZtp)žd²Çe\Œñ³=²Öø¨X½ žµ­‡†ü×G ©Åj$²BÃO<Þ&9Žá¢²Ä¾†oXƒ5Ÿ"¿ŽiÕò‘QÂ_2¦úÅõ]ÑvÁ/Î$åI}^@MMa·›©i^µK=·3¦/SR¸üÑ+ö$ðöê-hR{¾ÄþYàí'XïÖL¤]µ‘u€^úÖ´NZ!±¥‚Búö½>u0ß1âÛ§W,‰'éÛÙè0¡xÕ"‚üÚÜ™[çp@Ù`û#Ã` ƒŒ¤X·Ê‹_ï¯ä@…X ³[Šö5£0%ÈÜÜs€ùª™Ó.¸“‚%ÅfžÐ+!¬µµPò̼ª_þHŒXsf¨\Hsìcìî¯xY$ÉXQ€VFb½‚îÏyúE€ÂIe³'yá`"DøF¿Z{“Áæ¾`HRw®1±~Ðvw²ŽKª;É®êIh²$…¤ÄM­ÍZÑ\€Ä¾Ð…”ouÚ a›Uå$†ZF î7y9ëˆyבVä“ÝA83`¬M‹W— ÑÒ+p‡Z”ÕêóÜÿ3™bsTøÄÎêÔFé÷¤ ²c‘pìq[5uÞ±Õ€w~(ÃÙÈ–:9/ ¼aF©5 Òá=ç± -žˆƒ/%×Ñ@ u>xX%»±ý~y*·»ÚÓQâA–;®ÛÍjûßQõ¹Lö¬c:òAÙñ¼x¦(wECà>B®í@{;"ÎÙµ0ND_³MŠð?¥Ê"Ÿ$Ýé~2€Ò­AxCÀkÓésÌ«ˆ\ÔÏf–µñªX$Öö]æ±-9¿ðš¿Qj‘–àB© ìê®[g ?7ô–GÌRI’+¹{ƇË‘L{Õ?ù bøe\á.t³a$Ú±8e@6`ªü×F?ߌ@›¾4­ ù¢;-i®þ9<ºÙ€ï«ŽM°Þë®àØ${Ò?ÊRIm' \]j_6yj¡w=šUM.Ð ÂÓ\ (×\"šùº}¯–:D«òtQdä–égQûNôÃIú°&Ï/î2™3PñììXbÁª9Åãõ\¨Û\~ó“k¯«_h§|ôYûºnuBWd’j8M5&ËÕµ7`fîÅÓ5å†éÐsi¿v•ð_õ«€ú…*9qGâ£Þ £Ü5by¸®å¬&P7g 99çK€˜³ÐÌwìšÙöˆ,µ^íhåÈÏ@ÕžQ+Šõ¯Ñ@ …}&ä0yhÿ³EqÞ º}Q÷ k8Eê³ÿrÊI[[, Qö¾Kœ'Zü×CLg(%,/‚Rµ¦äÿÓIðêF%Œ»îc˜óUÉx³|¿¦J»B3¥)Õ(«—9Ч¾sþ6cÈôÓì "!Ìÿ¶x‘$ÍPŽ)á²r¸?»«jæì‰ÕIkCš½}M¡:øg«Ü_2fq›ö§ô²âýÃ{;.¤îçñ1ˆˆ—ýSFPë>ÅÍ´ ĆèwíÞÓKêyéÁO4RØÖŽ‘„Kó gÄÇ4‰Î¦®˜«ÝnÆ^ÃIº ÔQHب}™lÉ5€¯SæQuÕø+-KÐâÜú*ÚÂ)ý·y¼•ÐçÂN[—E½«ï[Åâüh½;›ß/&g0@P«É˜Ú~QoXÀ†ð@@Œì«>úÍM«Ð&¢¸Ð®§mÛ#ú×N&ÔkjüB5.]yšš¦bõ©nOØ“qÙp?þóúwºÆH¥NÙðR/‹îÀ9”¶”š6+Á Wï› ­¿&Öz"µŒœ\Ò vZuRvVz?×;vÓ±;a=€f9V߯ÛûÄrŠàð7º®Tšòz´Qäˆ>gríþ?†3ŸÍ·lͲb¼IÒy$ð.x,Iä‚k6X‰ùÝ(ºØ©.&εëêÆõXñOÊ]‘Ê@H>2w¸ MÀÅ5ÖT¿þåQ 72€d4<.…¥Â…¡i'臤 „ã¥L¢”2 o4©v±‰åWDc¯CT¥±tlÒJ!ÉõmÆíí2a~Ìÿ–¨áÀW]dº©kœ2-^ç[EµÆ_]sê«´õ<üe«Iw-ö}¦{¤N¨‚Œ¬çbÐRåZ©„ªQPÚÅ`ã,„?ÛC ¾[+ÝÝr~Wýº²ÄŠTHGýKøámß0†w'ïÁ7„„£zvø»kƒeìÄ—.¢÷œÆ Ö²_–µ;Ì=$]Qiž¸cÀùIåûbïy&Œ¼³PTdå+‰N·'=mþèÓ#öríiŸjQ¤ë ‹lÐ]©Ó;ËÔVcB1³Ùb+c××dÍV½æç:>£AžóéR—ˆ?Ç‘Üñ\]Ñ”Í8 SmÇâŠÐäõ^Büõ_FÓÃIêíZöØ–©c/²—ð# ½R¾*˜ëõ õÔ:¾{¡ñ%Ó¥v:óhþ“ë*ÿ0|>¹µ¾eé4¶©NßÜš' }7üìi2gp .âž{–ÔÿF™´1ø§ê»óˆ+?¯ìŽ¢gu1„¥ŒÌ7'ߺ)¬NåUÛɤ3÷‚ñß÷"„—~A&Á£Kö=¡Ùš|† Þ§\p0¾éò’ÐWb$ŶHZ䧨DS3L L™ß¾.í†î1~­u/£&qÝð±6Ð**YèÒC=k™7Mñ&SË9þA@rèœjdçN5*PF9‘…X5ø‚ã=¥Ê^’v”É×l  ‡Õž½ Øì4Dp-™ äBs#BI‘øºË³ã¢Ñôœs¨9¦–<|‚Ø—Ò^Nv»þЇ0R(Ñp-y°õš?%Z¤€‡çÂ…ÎB’mbA”"W$ù —º9`& Ôg¬!ïc£ØÀ¹~OÎÆä&ÓÔ)ì?H‡´ÚHôèüñ“öF¹ñú[þw Ïn¦ÚFÐêıì›™´ì[Uß›á•À Å • q°-ëQ?"R'Vú!ßΉb³°ZoÆVpz`SëÛëu$ÉÆPµfM9Ï@]´?7®¼lü$\›÷¯,ß} ©@wuÃqR‹š#ð²õ?z–ÏžòT<mò¨x|ðÇCv„]7}%®ÓƒðŸ™h{\˜þÏËKy%xP\iÀÕé}¡MàùÌ2;Xìð´9ß…%ïáiˆ•dÔèa;‚²U¨ ÿL”X|5"w2dfåæÿ*§U‰€¬Á§n‹êèUk%j8CE}4¼büÄZ¸ë“„ÆAó0Û/4G]šô2Œ­?Q­dÙ´»nx üí% ë줣N‹¸O‰õç+§Jaó‘6dñx„ôÏ«Eïñ)?«:-Ï1kŽ‹§Ç£¤znEÎõÚýf5²jÖ`55f1Ýï€æ´sƳ¹Œ%°©âÈÜÖüØ5ó´ƒéb`ØrmŒEØíxÂg èA¤´kh©ë2³=Ñp=úíB˜•¹¦ôB—E c ÜÑ0ƒ9óS¡jRDÓC,¸´ÇH®mˆ@/Ë\¥ýú®‚)Ý®+zaíÌ£´°Þ¬+|÷ÝÚiò  ÛkR§¾¡}ó:õoÓ•t§ÃßËf6'ªŽ½#Ø<’g}}7}îâ¹OtyèµHöÄÂñ˜EÏ<+OÎäÎ+å)hÕ§;cOu6ŸŸãzfl®‘\¯©‘KRÙûŸüì—Ïîæ.Gá«ÈJÛ‰áü6Iü§p“Á}Z°ëyߨªRcÜ[õRûfþÞÚÿûáÔ W$ý" €iÜ4¶l“ bŠ A~§G¹z+ïƒ&Þ‚Ä5ê»WjL{‰p¾ðpØc‚ 5R?§ïMñˆÈ¢E…vvá#jøÞá»ZúØð“´kŸÎK'Æ$91ò´àÃ7r&QûÀÏ&*n ›«Jëw”ºDcQš ç dúӗ˸¿Ñ:ö+Lu¯°Úp˜*Á'à X6 `~b0)¢åéub<ÓšñÜ !¬ÉøO ÚÐÿdÙÙ0#[_á~nŠ?–ý¤Ø“WxíÜEZwøÃÞP¸Ö¤¾—¡¾ì„‚`S—XòOúœyµ°œ,"äÛ|$<”ôU‡¹¦\¶@‡]Åüe)ŸŽw+uœVò,7!DÍ´Yð¸À¾ˆa¯dO×N³Mx:Ð^~¿ä„Yû§{ÓWO¦™LfŒþðTtd¡oèlë…ÄG½ÜyYÊæ»…­ÃÅWl•e€ÅŽ[‘E·£¤mÏ?ø»:ÖêéOÏÈÝ‹0‹µP!± ‘êæà{ÞÌNØO„ì¼¼»'Ô¹©œ÷ø÷W2ÕnV%„,õÎTÅNàì–©‹>q'¥…úg62…¦Åþò1Ó3,Õk0fõà»-|¶èÛ‚ßöɱ³ÒTK Nö¤m’<&ÔÖÔQÕ_p›èˆF@Š~²<{ï¡•2 Àbn”™øuä4(º³WÇxƒ üª'¥Þ´1Ô žÐ7Zh6ůžQE AŠ‘Ÿž —Îå;ÃUµ é³¢ûµÆ¸ÁwÇ­AÎãHxÈÄÃ3Þ§P•]—7õ™ÙmL§¯»O‘EÜcBº üí#›|.‰ @üEHLúå6^ôô÷Ô#Û7ÜöMR«:ö0ú¾Fx;Ä㹈yWTÞRüÞ¸YCc¿.¿i‚µ¦]q—LªÅ“J<»—ÒÓ)€fòÓZ»q„Zz‚ƒæ'ô!¿º«ÃàõÆkª‰°N P¥‡êüёͪº/;ÉýoMÏ\fÆg\n#ÈÑ“ÆwŸ5çx±|=÷8εÕ~í#˜ì E˜¬7ÅŽJÞ<úû¦à›÷üüÇ÷½cà"ª1$éw?Ä¢µÄmðõ>K8AnRxú ÃX¯VY°‰_•š7^Ç”‰Ç·ž¶Jé ^6M:tŒ~ÇX°’þT3í¤ºéÃÏÿ©jØ mcC,NñÐÇ6´r`¢õ•Iî…™ã‡ù««ðPf³ÑöïOggS« ›O!0Wµ6ˆÿ0ÿ+ÿ7ÿÿ=ÿ.ÿ.ÿ.ÿ.ÿ,ÿ)ÿ'ÿ)ÿ)üð.=2»ÍÙ çbË·ûORÎÏöe8ÞuÊ“J3Š;…b΋d%ÙE—=ö”™’õÄÍ"àÆÍK(û½yÛß! <ô=i©x-_1õ|èB-¢SKàéÕµô¬G²ù·ê>¢­â -Ý×öðë¼k^xàúae®}iÓù_ž•yË ëû[|‘%v#s7­g0Ä3Ç׋ÞËuOsŸTÔ¯ÞC än…µ\ÕyUlÈ»nï¼ÓF w©ÏX.†Wd`Ô5öŒÕT¼T–‹ŸÜTLJìè’1Juod¬ƒ¶äº?Ý´ÝȦPTjÙ&Ž­Ûêº$ªº䜢aq³&×Î,8až‰'öM7òaÈgø4%©wÓ{ë]`1/é xÑùNoêüìXgO¦\ÇQ@ÝÎRu¬¤W8ÇA%Y°Ÿ*v~U5{<®C!BHû­bʸ)¥±£ækÄjd`÷¸gÝÐXàñ£õ;0ź²ÁoI(MU«dÊ“½³ ¶ó)êåœ2Lå¢b³_u¿ËHZ¼)Ѱ›ÆóW=Pá2Ð¥í=iV 8­Úò¾–QP…Ÿ9ù2 hUe¾OŸjýÍU½”`·ÈêîWÀLù<¢Ó“\Ôɤ¢®ŸW"@{r(‚¾{{x :û•}+Ð>` °u›„t5ÔêúèåÿÍNÛݱÛur•.Dð“п³$H4±Ì%ù ô“qèxa`ë›÷V3Ï_î¾€>¥òÿÁn ©^ò™š#f-œùfÂKÛ6Ä[ÙÈüCÒÙé `»¯R­v°ÿB9Ë•»°ÓÖô-äê«.Zô¢³NBŒ0)8h (édÍÖ +’[n~ˆÍÈeŽ;3ì–>Žäà¢$($k$Y=A'„þOÉ" Ÿ ž*LäÙb}ª2z*ã'"aL˜4s\¬#l9˜ûÿ œ‘ØúFð„•ý|„§Š†4¶ü}ÄTžL,»)þoýûždü6Ðó¶ÏÑð‹p‡W©ÅZl ™q™(èy ¢Ùû‡÷u9p[À4@æ¦X&‹Š7†oÈWwžëÔæ»Ep3úÅXL PÜTê›`¶:-$(;ôg|'ó„‡IŽn=H›Aî…Å Ùç£Ýå°vÎÁbð; %ެgYµgÞþhÐü.³ö$ëvü$cTœÞ˜ ór1s¨c‚Éÿ —†aCG÷`ˆ;ªË ºp»ö—…ÿkƒ•=§o¡÷ ±lõÄç ¿Ûm§Ù*ž”ûÊ·Å6 ðlXšœ£ß/á#ׄ@¬Å›UQ¯{:×ò®®¨n§³¬•ÜNJö5œnœ_bÐàè½ðlÍlƒ2¿ãAŽv‘ÐIõø¢ ®#ñùu¬s"U'=ö²rìa¥à^Yi}zœ(KÍŸQÏwyhú5¦ Uï³ @bPbµCª2ÝB%ȯ§Í<óuf‹?ë)Þ›g§/*î~ÁÄ÷½ÔÁ•²{\g³®~vÑögèöGG»:»SjÒÚ'"äv¥¹áwþ´lÐvy³DæìüìXTšöèL\óK.SÚ-X‰_òÚ/ÿ`á2¯mÐirùîµ—'_BB`ÖDõ¼ÎÛuèLHÙW;Ɔț:Œ8}œ·Zé‰v¾)º)-]›løÄÇý_EóOÿAh.SÈMJÛ‰Ô-ݸº}aãßF:@H츅÷c±ÑXüuÀ#†½…ùB⥲æ/µØYkT8ßÖŒÔQÈ-2˜+wôìW³Wô¥ßå»Rœïö91(3ÑoܽihŒñ>dé}ç|¿LBáEŽ$Ž`ëŸ '[ ð[‘¸Œeog¤ëÉ™Œ±=yL¢ŠÄ÷tYâ+UžûøÍ§v72­ã]€K9Ô-оetÜ© 嬊·~¶äÓ¡+ÀЮGØfusOˆñYåy$²Ðw´·ZkÝžeù(üìœ$ší8yn/íú]¼(þãÙŠ¼¤°ìr\ 8v¸~¢þ˜€¬¡2Ô§ÙE²o¯¨5‘öÙà=ñiO¦ä>›TnÖÓÅS!åa î8G¼VÀÇïs3ãÇI`ÈÊJbÚ…=‘ú5’£wÙ¿º{m%·Av šžnÝWÒ’ ñª’ŒiýŸv3AàåkðNróËMNõÙ<„š¥$S-÷*½{žI…tL´H‚.Fb›Ï“Ä™FMVÈȤ¦*€µ§^|Á ›™Äø¤oô9}JΗ‹¥p½é%ËÀÕO*u2M!üo­K|[\KAÌ¥)µö<=GèP,åÝe#=п—Šk‹ 7¦NI½ÙM‡¹QéüÝXafÐeQ”ÉÃYŸR'ö¯/îiÂÐàQ(¨üìœA²/ߊmKB¹‚ÕC2]a„ðDøIÓº½*¨9%¼òð£’1ÑœŽ7Št[Ó¾Wž×P¡•ì°$[pi±JÑŸã¾›ìÀ‹Ÿ0>.õ(þÙT%Àd?2¿…Y*è @÷±ez =ÓœÌ 3F˜“ž? ¬>UEˆÃ‡š6Ži¡Bšg³“É:s !øÐŒq’¨(gðµÄNÂq¿Ï³·Å Sf­~G“¥^}ž‰qùI¢Ñö ¼/ä:þͨ5§ÛÎ{hº»_i'º-Ã~¼ÊDÉœGßô5íp$‘#m1,ßnE7)%8vyfU íè’ö½'ý þk"ÖhpÈØÝoàˆ¢6ÓKë6o(D¡zÑAJ üð.2#£-^gÙ$ËdQxÆÃV|*68ÓªËÅö/©XAB0Ëö“,}G Ù¬…ÿ¡’Ùä͸µC¬¨¢ƒÚ¨Ê¨²oÃáž^Þÿ†ÇC–±Å®ÂDX {óÿCÙCtujjDS‘Øï’ßÉÒ–Ë<e‚Hª“îñ ò >£¸YšðÛÁ÷R’1­¹-wŸnú~FŸÏ«ƒ‹ðOàùìŒ2m>aµý&XÒ-;môAòÓ»¶{Ê=˜¯<ã|n @‰¯† Òa}fëÕ£s¢V§b³ÀǼ¿–dxû,‹ú–”èÿÖSªA3ôlï•~½lHŽPDøöë×# Ë†žÆ­ø…/ÿix*øb+;t¡n»UÑ{ÈÞTGŒ RÂy¾ßÊü×Fò íBH¶Ç¹O·—’vp|Õ{¿5Cо¯þ±)¿.(ú½Yw…ZÙ—îN`+ƒá©ó—pÂ1¸³ÿ<™æÚØïhéàs@CXæ´,Bý©Ñ­®79&úu3rY¹TÙuè¶ÈdŸ÷A´ö|ʼY'©Ÿ«‡!ž(YíÁ‹»/pã³R4Ã@ÓÍ@CᕺzæêØüvùfodÂBÆ›dáÔ:\m l’ß/9›ÙE ‘dŒUîמΠèW:5ØXÜiQiBô U¡’(‘&ÖvñVi¹Ž0%ñWj–?èšsÃÓås"Öa%ˆ˜jZ© ´&€ø–îcVk¯gÞåÌjå¢rv4ôòßë»*ö¯‹™éŽ+L&Õºâ ѶNõFñü×Fòƒ¯þ>ÐÞƒ¯Pî\5ßëk½®å"\9ðÄ3Û<`ó&› ÅϺ̼H{•ÄKªkæ\¨ö¾d^Ý'2o•x«~Îzç™4¶ W3x±j¸pÅ8tßO^?’ ¬À]†A RTÓ¢Ûöó*Ô³‚¨?+|É—„€„lÐi¿POÍÞca¼¹&Ïë¬>Ndªk!FOP^2^Í¢£ŸPß»…„”½g3 Vb“dG‹gô‡ ÔòˆÓÀ§qi: nbºËÃmåt8S¹ãŒø ‹¦K=ä®÷°¿¡ìðßýï…ì4Ïk³¤íµ‡9Ÿ”?º 7(èl™Ã‹‘ cˆF pIqmãgÊMų*\Q#³ü×GHãTÜyÌltâbÊqdpƒÞçõ4Åõq …yŠSm#Sð!…‹0‰. 0÷=’’ï‹Ìco·»ÁsG5o¢¦Á®ÖHkY¨æ#ÿ4´Ô˜r4\ò~Ï•D\ÑñØ](wd…Ú¿¯oÆÔ(+Ûto­nâѹB-Ww¢‘ùD(ͦ XB™¬ý]Pío‚¤Qdy"R)˜E†øpÊ)þúÓÉf6Ò¢¤‹†9_»ËäÜAzä¥Ð‹QP=ÿ[ÙyI~ñˆýNñ®Aœ¨qNã#¨Rƒˆöx½ú¨³êíñ²a™zÁA4?Ž8£(ü£ 3 ÏQm8„¤?ò†Wü(‚.+‚95ƾN-x0»²3:‘]ƒ½Dè›ü×GGDM¸™ 7u7VDZ5ˆåÝ·¡Q!êO’LTs¶NÁÚ ŒôÎ:iu|H(„=­—ÿÔ7ÞÈÏyáÆ4òZÏ Wy:ŠnlùµÖÞ*eÈÁaŽ pïðÙ@¿~#•Pµ!1çáQo›÷*~Z »n2eÊ%7z†Å_µê‰œR0±øÐñ=É™àØ‰ÛØ[ªæ- ÌÜr¯½f)á>T&þø`ûU×!ó®,ðã5u»Ôj¡¼a%&Ëy_NŸØ6jìúk¤\Þ-o‰I* `-‹JÄ(ÂtÁÈe¼ì¢Ò Öü¨¡°¼Ú™ÔmÊKæsAGdâR_ÎKÍœî•o*|ßfÉüýõòZ«u/jTí©ªpGküÖÞräY‘?+Jzññ€è@f›PJCmˆöáX­%Q—G$"Rd¤‡š³Tò›»ˆŠ†]u`'‰ÃÏü/pÛ¿‰bã’ÝíjÆWãZJ =ÄÜ)mxÇ€trgIž¯ðÕΑXÍ–ÂË,÷Îwþwè6߉$x(aÃ#¦q`Þ%ã£=¥†Gîù!wÀ$¨Ç—+ì´9(é4œ’Ù(P‡ÂÖ%!Aþc$[£ýU}D{ mY¶iÛ)V¸)’e3PÓs\½P.í@ø1Ï.Äc l·ä|tÅd*ae JvÒ娣$PY[´2ÝO4ãsÞ1 goß TzŒŒx"¨‡Lœmhåh sŒ V1ÌÙàF§;Özª1BÊŒ²3ü×lJÅk: öÄó²bÛ,.I*Œ…¤ðtŽŸŸJ¿‚åÖ4YÔÙQý§÷Ô¿f€R­WsöË3·F[Â^Ù/²*»$vðfy ñ(UC`Ði­tª0ádÀÛ6û²˜£•—¡¹æ#õ}fB°þuÒZ1c¡}PcÖýWR@ÏxØL€¾QðQÛu–Y~ %up’-~K²'“Š™ðQ”ªu‚œOg¤Îst€¯/Öá Ü êJò8CWLetgÎ?,´ÙeŒµãl¦·åo)¶Îm€åÍ^Pï=“ãg[½ +BaÏõN‹£Nwß×½S™;ýƒD_`‚3 'ünËÝZÈź`´û‘ gþEX'AÍë¬Ìû´x,‰bš–"˜+ SOggS€ß ›O!1ô¼Êtÿ!ÿÿ,ÿ3ÿ4ÿZÿ.ÿ(ÿ'ÿ(ÿAÿÿÿüÖûñz ^÷áf†Wç'«tm,´ÜbïˆpÓ1f«Ö×Ò­˜SVNŸýž\ÃÞ¨ŒüI§-¯NOBñõâ¶ê#rŸŽìjƒœ¤Ërû†°óÓ´ã†ôôC*ÕÂÑÞãg V ÚÆl–™SÐQ}jËÿÊûºŸ•¶¹{<`'>K Ý¨º˜ÕÅY×öõ?óŽÊáa…¯Æ#â<ˆDH|áûõ%VÅým˜"ÓŸéwiÝPkUS¼ø—Lº©¹WGeñ*n@I×ÿSÊÅ“å[Ù¸D0Ͷš4H‹Zøt7}^½ç‚Q¡O»ý{C,-±2teý<w.¬÷\ðÔ¯©a±F´µ!w$fò«´Î™Œ— beÌ'Kü×F@%÷mëYcüàëØ˜ÿq¯IävøhP-hìæÁQ+tšÂ$pƒ!“_'P¼.9LGÍÞ]ƒûâK]yk¿i`K)¥QÚ!ÞÛý…4Ôœ§©”8Ϧ’Q¶{à!3…kZµÔ¼ýÙÞcZ’~3ÛÏe§Ô[·2»a.€œ—4™ïòö{‡˜…NXë­¡®¹5¿}ú2Ëÿ%êG¨Ëlj³¦ÜÖEÕf¬z¡e5‚,þLj—>èå WAÿgèžÞ¹Áœñ{H)šsdËÈŸ²šµïdÈ?ùÅŸ@èéýÆÒ0eÏ82mb7GÒÕ1ŸGŸÊHMzqþBÚu¬m<0ëX#¾`vÄ£v‘ðe]Ýõ?°Ú£ü×B©Þ$ö&u5‰e´âÖPwŒEøÍEªß€³&®Vs å¢ >¥™äR§¨¥¯’Ë?¿{ƒT’^(?©>cK¢ÅWu}ë9Äœrœ‚Muõ|f„àEw€Ú“YÅíom)šoo“Sú/î¾;¨¿,%‘AJæF4À}—ì²—%)ˆ$›j±@ãf+/«®ÝXX¨%#är¢A¨P¬u(™ß˜NY¥²µ˜­ñ;2£¶r¿%ØŽ&Ü#hɦ‡?yF¿‹â™] $WýÏI7L+Ϩa•HúW;¬2äC¹ú“uDÒ¯8íè…a'ÉwƒbƒY¬mã²7 eNé¸ß—w Aƒv™äKäù€É.Ò^Éüx Cà$›ü×CJèû&°ø¼2Â&¹”Þ|Gœød¿a8mÉŸ£ëË,&ÜSOJÍ+Z©½…äºHYô@5Ý›#“12˜DÎAÿêÌEÉW Ké_<€·²jÌLÿ¼¬ð5C¹5Mf{™;µð¾qÎ52ZŽ÷/×1Æ×œíG¨›4€|^JjÏeÁÅ}ªÙÄÓ¿¾7Ô’Lëz À·àÒ^ÙãPåTžToÁ¡›ƒ£w{ª¶©¼Ö4êý³ „£+þÑ{ˆ< žä©Cn~¬š‰•!$žù1p‰Á¹!ùâ”ë l™Óö­Dn¦‹ftó3Ũiø‘Œ½ *ÀFO8àv 2ò\ÅåJ#]Ù–|üj­âÞ» ±6ɠ穾¬Ôùïû¥jüÚÜŠDg pれ¥[·†¨øÕ`ÛŒ÷Ý@½BmÔ.bÿÈ›‡7¶À,˜±«PoÓBjŒeãZHÂ0mæ?ãÒA'ðïgA¬!<å“'``Ð9Z8õ›q éü©WÕ"Ù1S¢.XF ‹(‚’~`ÛQ»ü$}Zúž*Dk Þ`™þ…H‹\ìYÓ"#ü*ã!9àÀ,ö“òoR®Dy±­r„8Ûã7¯,'ŒáÚýÅ ä¬LüÈŸwÇú”9À¾`¼B{2•XÓzæòµ4Ù5…©™ü'”†Ê‰Kcf”oËç¤êùÒÐHê=Tbi4j«‚Áà& Våaø§®s6k E&7—+å›Öch|¯¯”êç3¼w7²! ö›Ä3Ä0%ºüìW³ÃêÛƒ´ë†Ýµ8~3ØM!éÀ’¦ QäS°×Îc Õ­Ùºiï¡*Ñ€FBvй—tr¸ëEQúçõÜbÉôã"@þßÛ'm¸Î¸£&$ïÅ!×-[Ü êÝ52 ?‰iÀÅD¼ÿOoR¾×Ë›YáBÖjY—\ñòçÇú±æbyÂJ@9–èùß^aQ3Mµq múñÝ=ép›†ð¾d$ÐII²~lÿòôX ø.¾`º#™7œíü×à–¾˜«­ ˜WD%†ë?¿„ü¡Æ~ *p´Ã_¬£+ÀºëH°¿î\ÉY‚ êÇP ì’ÔW Ú‹ŒÍaœ9ó^•º†cAÅØÀÈÙ~u½e»´“¥/`k¢©ØBì›QK0ã2Vh&ñnH–5¨ BJ>…¦pPîŸÑQz2¤ ™a¹ÇÛøÅåþ;u Ø"HüìXb’¬ëù×~¬¦oa…âÏ ‹Ò­óŠ&5˜ø«Žf‰räïGÎAFÅÔuTén€O|p±qÆ%˜n‹™}ÂpûÏzîok6cÕN|.sB<»i¾àñ‰Ë¨RNØøg¶ ·Ë=CÚ­}¨Ú­”rPBXbgwFªVøq ÖÛI4®ˆvÃ"ÍfŽø•Ïíý¢™J±¸Ÿoƒƒ‚ß90§P•6íÇ®;’Õ²9eÄ_¦]Êu?%óëì膵W}ýnx¢ÀÜÙ‰OM®dܪ;v^,X ñˆù#}‰3·•CËÞÒUÕdaˆ µÞ0/ræu 4 í4Ù “ÖöGôîòCâÉ–ê@€mN αƞ`l–Ø ü쌟¿É/¨¢ð¦‰aï6°wÁ?û‘ôßÚs¯·,2z9AÌP‹Ú“µ†ðZô€iœæ„Ofta Ï}G}~_å/_Süј3‹î«ÀB˜ìœPb‚åš›D­PažaŸ2oQš³éÚúY9ƒNsÀ8U‘±C”3=h ×’GäMð¾›vQPø€Ž ÒèáÔN⬱_w¶‰ìü_í2vʨ°±Ãm£ Ò0šÃ’˜õè›Jý–œq˜¦Ó-Vøµô¦áŸ#Ì $ÒÀ5¹.T¦2œõ_Í)oFb^§Ó ›$ß¾’/á„öÜð#›ù^pº8ÚNk’›q ù EÔ3®É™›0»ýJ‘‘†àì¾:ûS ¢27ÚêŠ=ÀZ_8’æ8 üÀ»ãÀ£(ôgpJ[W‚[M÷/9. Ç õq  ©B¤ê`ã¯`ŒØÈ£‰Â  )[]xkÍb}½C½'¹PŠø =„ƒ-ÿ©Ò ½eö,^Û¶å?ÙÛµŸ 5¸·1|©²üËD°¬"&:`Ié€ÂÙ:éPÿ|HÇò°%ä:|‰ušñDÏÕ~ùÖ¿Ì›?ú³rø,zçÒç ©sSaߎ¬=hKöÌÙ6{•þöK/º¨½™ G懮ç Få@£l«Òaº1+À僱2Pé(‡5oŒèÐ$AÙÄg¨N0ÅGiRÙJÛÔFâ,Ôº¹†ÛIê0³ÿ*Ó-ãÁYº ø{¢ZÌÂOhù’:7U5”ö? Â…çùº_÷$´sSŨ²Qor¶âk¢Šö³‘ìþÏGü¿þ—¡¦dyÄýtÝ&zW©F µ®· yø˜Ie $փÆƦ…æ0}j&ñÇîC"{½Hj p<àÖÄ5ÔC{é;ªüŽbÅõÇOµôï¯üp¯¯”™p7‘ÄÒ ß^"Œó O“—ðaù‘&f9gØÐìÕëÉ$³·™@l[¬GGFåß¹dR˜Ð…¥Áy­ê–S¦ìfQýùhÃÄû·„g¯uïbÖ}(е¥ þ9¡éhK£Wªètð)„b<äÚwp¨ØÔ‡Vu± sEÛIšÏÀhj,JÆ•9âtZÏÇøAn=¨‘Cá?1Á"ÕmàKžÄü°r+#L/1 œ’“6äQµüž#Hsšgn@Åó‡÷ª*ráFbü[qåOsãÅôÂhÊ‘ À¯q®1µî$&…Czª$úŒ`ª¨ˆ”ƒ3^:æfeäýéFÕc§W}ˆû\OµÙCï,¡‡X^Ý<1^O Œ’–rcŒÈZŽžiåe­fjƒë\}}| ‰:¦¥à¿Uyéh ivK=Œ>ÇÓÎ^ѯoÚ>ñYäÐîˆ÷4…öË›òvyË Nömt|´n¥HðHH«8ýÄs‡÷Ø»’—NVX…}³ÍSq`ú&îcóëg±*Í•žŸ_—aÛßRZ‰‘òø­€âkƒQˆ£,:ŽÙ@ÀVéF¥}eá*Íì¯mã©@@Ö¡ Ú¤%Jù1ô¶ÒG´˜g ºÎ˜¹™n%ÀYùªƒëÿvÀOggSÀ ›O!2>Ò·"ÿÿÿÿÿÿÿ!ÿ%ÿ'ÿÿÿ$ÿ.ÿ.ÿ.ü×Í6¨!f3ZyÊÂïb‹^±,\.¤ ~>Ây®S¹&%µïXµ|Çû‹©«.ÞvÀ5Jw\|{T$  3¢5j‚—“¤ åæwbÇ‘ ¾®fªµXK]ܺe(O_±Qcp£–ÚUq¶Ìµ8SŸ"ÊG¸L§^ý¨ÃN=àøíöuÈÁAß¼!JJÉz»›O™¨±W†qî¶W^½´åM΃²Lêüü›怙™"ÒEéÁ»Þ¤p%M(¹Kg+Í;–Ц{ï=5Ê$nðpñè”1þ£»d3Aü–sD¾vÅ6aè‚] R9ÓU+•‹£KLIdPgA1D¿hx;¨[cž[?UJH 5*„ü×W1"ËÅ`8¶û)‹¯W0-7á”ÍqaC}…|Áb¹c}ÿ®«ª!>1æ/Œ% ®k‹‚ä;0l0úOÞí»ƒâ 8iå¡Èûê®F?ý›."Â9©'9t£ì}·”¸5•Ó<´%4Âòj“ç™æ‹º9é—VØýÅŠu!õòñTëµ[þ[n™¢j>ûü-U3âÖä*hNcDÕØ;c3‡Ç›e”O.¼‚ϤŰÿ¼ïŒŠ± Åvß2mZq} ‘Œ Åé BAš§t¼)Çð¼ÅDÄeéX wÞV|)Vê`‚ïYë×צRÖÀÒ¡~ >‚z¯8ðÃkÍ îµQöÅuR7Ƭٞ1{¯{‘„‚‡üßñ‚tr`HÁ…dõïÕŒœŽá}@@RE|À.^‡¹wÒv@îk熚ßw³ø¹¸Š÷Ã.õ^ë‰2 '–ßyVè’Ã)ÇÐÍ`~V敉’H¹NÄ(xv™ÆòÒ¾=g¢ )[¢NI³oa1ž#„e,³ºœU5 ÖŸ¼[]:ÛÜåž¿çä l~J°(ÓìSgh"¹£f "†„ ÐáX‹«B z2¦`ò2 kõŒ fÓñ7°`•hM¤Ä*xêñ$|ºïëÁÌ”)™Šlßõq¾®¨µ i>TLZ8K8Vþ2um åÒ‡µj¹ï©aÈCî.ù¯ù}Å7fry˜ÚíÈÞ2Ѳ†¤yöüXÃs[9­Ø¿Tm:™3Vñˆ.<Ü̳R+ªé­:!\¥1K LSÇèL3G[ô 7¦–ù#/f­´Žíï@Ævh(,~]ÞŸ7§˜{÷`³Ö pµ/”¨˜ÛupVŸvâ—VD>Áðuº¤«ó"KpoµMŠoÁ&ks龬\ûï…3Å C;†æ©°IR¥¶˜CàbîŒyÁ@èh]†$Ía³´ûŽa€‹0 ú´+¿ÿ*á—~koª/yø¼hº4†žLœ‹~ ~I‹.TÃ>p)bT/‡£à´¸«w³*(.zjL‹9œÔ"n {Þ$°?SÔtÊíÀ´×Zw¬EÄ$«•?·«¾†åüBi"-óuÖòÑ·$ÁÇ/ã bBº(&Z}¼r©ÌZùÕÄ)>!ü(¿M¾lØ$ó”¿VÊ“iþµü˜zv÷¹â:ÉñŒÔŠqܯ ‰ÌÝ̯¯%ûDïè•0ðLãô‚—ÜûYðzÃh~£®[¤åc  }…5j¹Ç=WÐ'åÌÅŠ2÷tã(ucà£cü¤¯÷BÑ+"àBFˆšŸVÀѬ…‹|¬ Õ\¶"Ûí£b‘Çn׃FØ[ñ®^rwo+(…§n9qQWo$€¬ì¬ùº$—0'«T¤fð0NìׯÊÛ2ÃÝ6UÜXª´[`³» DÑf©Éð`Š|Òì.&T˜KëˆzÈøž÷ž5·FQ Á."­Ç<äÀcæEÀüd¸FçÉè…¨•!œW¾$ [â\ä„ÇívÏýðübW ÞàÖÜ™z©!`¢¨_v³´¢[íuË{&Ô|Ž˜YÞOåÿ~8“E<Ëk™ãLÌ»¾É¼ T|ôÜÕp…bβJ2‰×VÙÙaöÍdÐùæàÀ¼göÕd4º…üi½_‹ª|Fä *;ª©ö˜(ŒD êŸEß|)ƒ¨:þjß^·ó¢UÙ›´þ¹›QE^¼ÝS×D”®€=-Jï.xƯ« þñnÔ uE,[Ö’y\±<è@cŽÇMú¸µ¼yý_“j´–;½ :{˜Øš|5YŒÁn›Ú¹ù°0U&  ¤’È\`cfA}äêcñåk‰0K©|õíeZD„jE(Md¼Á2¹N†ù‘¡Æ>E,%X`¿X€üBi¡Z€ˆÅ*pý«^ VòÒ£öÆ|Gndƒ?# iw²FíWÆS=φ|kVcøSøS-å'‰‘Uêõ}ÌÄcПœÓJNPºb°K¢Z ¨>›­;!û¹]ÇJGDN£9|y󘹖רL¼í‰Ò¿œ$RdëVsR¤OäƒfjhÜxº@¸†r²³„ƒhg˽èÞ.†á4²Wª‘±ÑIàÿ­V¢ ±øÑÇ ‰‡)4B²¸çZÍØûM<¨‹ÜjHÔ‘‘$»ÉÕ/ï sp­lª¤…>¥¸ \§6ïÙ¤»æ?KiýYs¶®^ƒx‰—R/M©»oU'+|V£d=N/ÿÌ“{x“Ÿ'ýêQ?^–ÇßÐåüÜỎµr#QÉaA‡˜ëÜ¡µ·‘!©Ä-áÔ6‘µøóó¤j‡r?±9˜ãØÑš¨¶ÍÕ'¸ŒøÝ©1öÉ¡rXXêþµcM'ËÝ Ë0b7øsVÉ…™òôR\”AÓÈâ4QSÀá ¦dUE~ºœ‹lÄ}ÕÍD{³6†¼'â0ƒ9šL h^¡…¤bš Ýï-Ðäâ™eÀc|†eÀ°9à}pÒß¿~Ç$ÂAvùAÄ£?H(a•~q'§:i$•òLÃÞ_œÕ G”Þ'Óy/æ5y“¬ B#G_Gs‹· :úŸ‚ÁÅf.–ã‹-ŸÛ*.ðõ…›ÂZ†üÕx@“2‡´í¹ØDÆ:Œ¤ÚôÓ¤Á¢œ¥Ó]5.‘oÈ6Sù,²Fè`œG^[ˆÿTß³‚E[ ɹ6!üÆc_#Å’ CÏSðz’í‡f%›ÉOøËí‚éáìðïðŽz Ý|¦9Á@³¥tŒO£4Ãë†Jyx˨<ß#7R¼™†þÁóX˜Õ3´Ñ%åuüJt«·’%º‡k·ô>f1ÆJ×+0Û÷Î>‹Ë³ûÌL¦tS~F€­ØØJk^~ô òøõv9„IÈ×áb\Æõõ ;«8-ŽFu9O¥Å~ÇØçE/'öe𣴠±DZÃù:Á[Gz eì£>œVÊÊëù¹Ñ?‡Ó’ò†üÅ2À%D¿šÈ[–î´-o? 6ÙÞ…îDL¬ô-®{Mᚥ›û¬µ˜þµÙ6|&ÓfñCÙƒ1»ã`7oÑû¼V’žXoN&,ôÌõuª¤ÜBÓëµLˆãâ|˜­\G7lHV@"iûº‡røY¾W1{î| ø*ƒ²oÎw=³°]{uÑ䋜¹5[º¯Q¨K¹Æb›ÿ²1CC¤[Š;úÔ’ Üó–Å„(½’–kÛà—9ib˜± –m30\Å v^œÊH¶À m JþßZí±´èÝT©·TþgSi»— >i½0HÖiµ( CÎ$¾4ºû5RNt[~â0Ý_¼•6äS>‹ZX…åX|ƒüÀ„¯ù]’Óš¡vôéÑ;øfˆ .ƒ!ñö,âj×_ª ±3Y2Âg¥ª ‘3ˆ@“T}8(n$)ýr}°Ü×;hŸƒu! cœõ€ý³âÜJÓ®DõnW(e’“˜—­üå|ÈMX20#KìËšrpJÁmŒ»8QK7ˆ6$ÅÓ(`àÄŠSÉþYçfâ¿RŠ4#,ì` fÝz";x9C-Zÿ~Qì)ŸA(ßQ’*ê;kÌôðgótÆj/¢£#5D ?— ¢Þ¾U +àVNžH”›ûÔ”OýŸEÏZRdyŒ?ˆ-…S<¯M¢•Wžô‰Npôz ~: P7” ίHËüãn½:^W¼ZÞñÚyãÏ¡Þ[¶‡Ù½›ükÕ’cþ(íµüÁÁ=è pPb”²_ ‡ÄoÅÚ9Í€s4þDƒ“<Ä1cZÃ'Õcuñ¸©ŸsœœpoÔ´¹·ñæ6óuøœ|ÚM9˜?ŠØŸè6zÐ)»m×`Ú96•[ö<Ÿ†©†v‰³ÕØvËkwn¸×¡Žùk[Áëg-Wx¨Ÿ¯øÖx1›¿fË.a`›™ÐmZf¢º¸;2wеúÞ‚ KUåO(ó‰ib¼ºiÅ[NX'^à¶âÉ[aëÛ¯)™ÙÀ® n8–—o›‡ÐEî:1®ÕÛœØfè–'Ùw‹ãmiÑü’u•í¥@`&w–_Å–Iæ¢`ŠÊež‚J;ÜVuõ3ɨ}ð$rCIö6&yâFÀ–;R1<ÇC=tOggS@L ›O!3í ŽÂÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ>ÿÿ.ÿ.ÿ.ÿ.üÅ3-zî®Ø°õ£C=ñàÖíÆ} ýp˜PaÇëÑÐÞmðÝe*-RPsŒ#M^3ò^SËûÉvˆB\/ K»Ùêε…›RaÄ"sö²Œ%Má“ç=[ºÜLFÓI©njˆRµW¼ƒ¾;Í[~/w-²ùÕÙ ÐjÙp~ÓžñoøÍ¾MøÕ0Ó´°ÊÐpïUéÃ'yš†$nÃ3ä &«rÆ<rbÍ `ºd¾M<¬â°¥ÊrªöÍQ epußRì3²9@B¨YPaÆ…Kä]9Ä,< ËTŒÖ)Mh7‡êyèØïMív –ÆlÏ«bR tŒ¹¶†â'ÊVB‚ðlÏ:4´à¶Py•»Oi\ IE´·â[Âv1üÀImÕ¦ÆÓÝÏh¥r| Ht¢¿'F5ùõÑ{ζt¸‘cM6£Ø -­½ú|DîžüA¿QK͸mÚÂñ ?WË7FH{6 ":ŽS,†Ü5]&Û°“ïÁãG†?ƒ£ ß2êðV£©óÇ.Ô\müSϯ6³( my2åß?€+91Ë‘ðµ X½¨ Àöp¦YìÀ15õúøhˆ7ìvIâ&pçðœ„ë½` ™û<²ZdÏÌøOÉWíz­³½˜óp ˜ $ıѸ7KÛLÑ^æTÍøÕ¤úþD`Ìšº„²|`—Œï=$Eÿ55.=]ç?xCÖ’;Ф¸½„‹'* â¼1f3i OE –zzp>ÿV‡–ËîúÇÞH¿…üÁ¯Ÿv§Û•þÔ^ÎÈloGú'ä+ C’në`ŒmØ”þÀ.òáo2uŽ•]´/ qn8Éí¹4 é…#1¡-lÏ&èìž¹F¨·CñËa:û³ÑÔ¯e—–zÔü÷:>jïªQí³¨‰€§ökí£œÅz{P°ià#é9ÉJ —··±UhV9×§ÁÉ‚ •žäÚײûšY‚41ûÓ¾á{àç ¶lf–ŽojÆ/$ZTs%DˆrQkâJé«G±^vdØ~Š>¨R Y0ƭ׃zºE•Ÿñf —Eý÷ ÊžÚ¹ &ÐîÞúÔ§ïüò“³=ßodø¤¥ šÞ ðg˽ßäù=iJØÉÝ ‰ÊgÄüdäÕüÀ#nØÇ)¶Q—KCBPèÇàƒ¬Ê~±›øÀ^ùõ"äûضÌl|ì/k"í* ÔX ü›@ZæøåD LPæ^†<½ãR±`n);˜äÎôØg‡JˆrÍò<µÂ¹Š‚]öiÒg…@€[¶ “>ãìw@\êªh嶇^äHБ`ÜS”[‚ófžZßç]+í_ Ãýs.î6©Ê ïÉëøIò¬ö§"¿lÐZ#­ê€u÷¢Ó]âõÔ¶váÌ¥,êz­±™£ÿ[àÀ«Æ‰B¼<1Ô)ùñ»:I ¶êÆÀnÙ¨•T.â ¡ ÿCmïñ—bŽ!ïžÃÀˆÿžkBz¬ {Ä«€"»8qHè(hDV§ÙÆ~¶5ƒã}âß&yücŽ—‚FrLÏi)@®/7wC•ˆìÐÚBíkô ÔZêCˆ#ó¹Ìõ!:°¤Ö(LOµB™ø*”çXµšc—ã·H+Dâk"@OaŒ9pºl÷†ðuôÎ"?B¨ÆŽ¥ÙÎvÛߨ}&r»Îì͇â xúd<«GuøY´£T“À÷ž³·mÄýi 6’HÛsEþÁVÎ/°:£¶jCžZJþ¶…ÞÒUuΩ¦~å§àSXŽ`úGƒ4þÒ–`!WNSŠ´«ØN?|z1§84ÿÑ%,>Ÿ:Ý$EÎæ¥ÀÂrnñn^.—r¶Ó×f«92t—Ýrt ´Í6ÕЩ<ά‰-Z9Na4EPìýjhß–±«´*†Œ¦!-¢ü>­ ÌC­â‘å[ ¾¬É>&òÍ8Ì)+aË¢2ÃnxGH­«Z[*mY›“g…”ý†}Hé'y;ì4[K+OâyK‡,]ÑýÞA!ñ)ÆsMgVØÆoÃv áîÛÞk^*t•H8j-KO ˆ0}–·Zrq[zï±¢õ¨åâÁ‚ƒækJ™ârö'oÆ(‹!]"‡‘§O<ÈCY¸‡ c¹ƒ¿Sƒî‡`½OøEÚ'ËFäi!òÒ'ù+öÁ Rn¡Â-Šxh” F–ý«‘E]8ÿ^üNdn¥*D"zo[ ¯ŽWÜà9ÈËKÂ"`Ñ ñé1Ý9‘ÚzÞXÎÆ@bÓÉ+~Äú”¸žÿüŸÓš¡Ïú˜8'K ü¸½f‘$ íf8ªD Òú\ Hãx¹±ÄïÝ3éËŠo€wéµ{¯J;On"óÄêGø8!j—XRU´†œåÜÉöŸ„dB]5Þãd§XBÃıÏ¿·e¸·Ô{sØÊÞŠ»»¥†jÔDºgŵ²<•WhÛÁ_=·æÜŽ^ åÇø£B>¤Ý ¾#⩳š‘¤Öî¶a®«ò¬,©¥­ôƒSºîd•oxѬ»Å‚ =žÕ©tÓãèšµ-ÑŽ:À^X¼ÎR"Dþsëx+þÜhµ?oï“û‚Þ‡m?6Űdê©4?z$:ÝGÊÞºA ¥¾ ³Ì{å톨<²«oaúSg‘@¼4"ô95¤}«/”•¥ÂqÜ, r‰†µ¡ÆHÉc˜1'Ÿõ“å‚üÁ]ÞsÑITÑ›é»û?ÙkÝ\¸“ mÒjlTlKM£}ÿßNV„NŠ@eÎX¹33o´Q¬Xp÷" 7Wa—“IÊÁ'nü磇úN`•šW@¶V7!§ÒUü„Bè~rÃ5ÛÐz)`œéUï¯/êFŠL×î½…dD`†ÖÀù…Ѩ•:ú$ãM&d‡·Éx$ÓSÙ¿Z…ˆ$¦›ûg(söòdÆDk¢‘ž‹n;õ x“0Y?ƒwr|¸wK‘ÕæÉDè}4‚‰:X™Së±Å»¾³6{†NaIs×à wÓ^Õ}U=›B·oOuY­bÅÑלÀñu€°¸)Ê,ѹ w¹7¨" áÓÈ9ü8^QI˜ËâTá^C¼?^íWeÉCÚß)jä2_XTi=üd#΃>…V$S×8{Ï’éø§ÜaÌz€>S†Â(r&(ãÄÉRÛÑS?•YͺÁøêM®¯^½jA­Òˆ} 0cA¥ _¼u4˜ä’Ù+ëžÁù:E3‘·o¡uíjR½ÇÒÏœRÈ£Ï`Lp‡ÖýÖTe~©2¯p0òê>2´+sŠè"ÑŽç(åËo?ê/·7\A¿?ŸYÁ+F´°;®‡Ï?–PÀ¾KšjO± ¢:^×! üÍ«öobú’hÀ²$2~—÷`Ò¤Oy²ãBäÏêÐW#QõI”ÿ=…`[§}•Ý·.'BÒŠð<”v}bxµî?¬Cìü3`ÿãü×WeåvÙD‰ð‘[óCÇa;Z 6ýŠ­kÒ“Ñ0Es䇅°ÐÞü‡ðxPW(ÚÔ»m:Æ×Ëã|SÑ`deLSø¬C€79ÔŒ”[…2غ%oUÏ (Y¦^"3Á,Qvü©øÑÅDOÀàÉœND/í`kH%\3U"ç0§!ª&ãH”5Ì}XžïÜ9Ëê °Sh´2ÀUúµW…~¡5\]y&¢FÂ;¯±qýÅè[d _¡gš9çj@¤<ØpáVÉÍgbýOKSv—Ö ÄÂÆgìñyŸÓæ¹À~ÎÄ,z~Èí0îr;Ø\Ôë"lè rÎû2;в²õ‰#ãlF(LWo[FÞÌĶdÏqé_€S‡ü×È:Èš8õƒ ˆ0ˆusøƒA”ÌÀó‰Û´Û½¶‹ölÆë++~}[ ¡Üý.ݶvgùÁ%ÁXRÉ4Õôõ<*6+¾ç{±â7+œ-ˆ¬>Õj‘1-Jô-äÇrK0Gö{PfDz6ÛHMd¯_VªÖ¨éÙP nì f®;(Þíºá,ù+jkfYhYÇ+$X–¿;Šp–¼9©î옩 Zþž-vÓûBnF×"Ù*³=¤‡èù»*´Òü©ÁŽÖ«]¼ð{€%P.'XÄUü0ý³˜Äb%p Ú?œŒÀÿÿG!ý›Ð>Ú n@â¾i¢ p•ƒ 6¶Ø½`“ÕJV²>©ïÄ$%æ9v‘ó‡üÕÑ|vº¾ÀÎ]¶« ~ÒóF*à hr²CN†àÍŒ6½%BJ¥~ÂÉZ颋žø1¬¨UþT¢¨ ÇJ_Æñl­6b `)Üé½è Cްj© ʶ“ÚK*³›ç£ ³¸:0§Ûüe ‰`ð’#þ~櫱&XÏÔ|¦l0L‰ÈÙIbßHbǤ VŸ¥Bb¶7ô±øÆ]ü&=—Ôµò/Ã3YÒ 4U©S/TÉþ™[û­¯«7§`ˆËóêâEM…ª(Ñ<8\6'¤ªŒÊ¿l6•Ñý¼»‚[…xãWøÒ7 9ÒÏûT_–ТÇçSNÁ)âÇ Jb|&mþQG1á;7 Iœ{¼ßïÖX܇OggSÀ€ ›O!4!µÞÄÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üB?.㓟~AHý« ºk-5ØÜÆÆûÓÿ´¦û7­™¹tk ØÞÇé-惗5SÐ÷X–ŽÕç £_°«7Àa^¬ÿï¡MÈÆïè-28¬7˜D1oñâl2ņ í¶ÖÄêºã¨_Åå$#ƒ §þÄwé } ¹sØÈÙh•ÙÇ+_’´ÏÑíºú~Š-|#3¼ðX!Úi‚5j9çl¾“ˆ¬j‰½Éϲ3ó Fx;!\#nÃn³•eýW\Z°-.>»¶LÕ®‡¥žÆdn"q#ÝfUœ­Ø=Û¢¤æmê^OFü«/˜ö¶ù¨´-@àC›v<ãcf²|+uX˜»·AéªR&rFÎ<-}b@I5–õy1Lï(߉ëüßâ ã4K‘ÕÍ [·†½ðöæ“}XÐ`îüµ 7h;?røô ‡öüXmÅÀ¾Esÿ pyK~„©éVÙãçuW펗ô¡ÿfòšêwè–tŽÔ]„ÃÄá@ä¼54D2Âî_ñ¸”¼{´pç­èPeùeÇ•„*ºî–ã(o+ùÆf£þèú¬U:̰*è (LðÓWÂeD^‘^•W`sXžÄöSÕî}…eÇÈð™‹,I¨Æj-[¤Ið&9­ñBØÃ¼»ÎmG›E.NÎà^\iB"Fó˜@f}|n“–ò"‰‘ž*ÍÊ‘áä @AñŸÆè$Ì “Ϭƒ×hè©lã¤ÙBï6î$÷`÷…é§ñ²äøn^umdAІ,,]üSÅá§M>¹Ž°Û„!?"‘v£!Ñ—½»€ä*\±ƒ¶'í,o¿P(S8Ð>CÚV–L{žJñ.âs€Ã†v# v"]tÈ”ÖGq\…û9 N¹ÊVFî ¸êÊM§Ópè§0 úùøÍ‹OÕ$³›ÈI¢'ËÖOoÂ÷™¼×ûº&[ÃÓçNëvf*˜bÌÅg“?''e@zäný߉Rõ“\]eöŠ”õ¶æVŽÚš®,׳ødm)¿oÚTUÖnï ÖÉð÷¨æÿX³Qhxi•C[cãâ€.®?ÃÄUqq.óŒE‚ùœ6m‡úÇu¿`t‡×R+ÝÜ@nUë¯) N.™šáóÃùJî-gmË%zPUCd1`Ú*ÿºÔ\tM®®¤ín…üÁ¯ 2ò]€5y¬Í†D÷A/tgN榼nñƒ±œ;‰ÉÜË¡‘X=‹)™ÐÁiΫèýõ]i}›l˜Ðñ?—¶u5$ôe’Řà ÚûÔËæË n[E÷娢Fç“[þ`~Ë{Ô.!ž#“˜ @É•WÑÍË0Ô¦0Úl²” ý4– ŒfÒeÄБº”«Ï 8L({Î…C‡±SÛ-Øâ ~Xêý5[¢¨°*¡™¤èeÚ4ÑØ\·Ðx£^íeºÒTÔ´fYÉ“õQSt{»!_ßs¿â(jà3×^¬$Kó;SŸŸOñŸJµÔGÍs¡ŸÉïù¿!c0²ù?TÅH&ž`$É,¨ùCʯáã¸Õ²ý†Î¹Ã6ûî5ü}p—…·|M|ê¾Ì{4ì®u‚­ªBª)ü½[½…ž9#¶Žoœ“ *MHÝKý]ô9²—ްJéwLé·A$ XÊJ àÝáºÁx€Ý4¹ç»4q÷'à†ÝO¹ÆP¹ÌžAL’¿¸Ëo šv`„•;Pñ¡*){½ŠEdñá¸sóMK'M§ß€šò'>oòjµõÌ]r&n€Ñ·ÅÅš—-Ыt;ƒÌr×p.'ÔðhH|0µ6ô]&F!J‡"êï$K£Ž…©T=çÐÃaOnó¼ ßæ N[‰ò0’ .Z‚ ¬JHñâ 4¿lž#îÞŠl}÷ƒghùNàƒ£8+ Öׯò"HÛOÌòß_,t \üË NÅe!&f¤¯öÚgC’F+V‹Œ‘ÝÄ[ù¿³†<>qͽÍæ–`©†¼Ž¡¤Dá¼Õ¬ʃ^ vsðb¤,FÚŸž° P'R\›½ëÒÆ›»ƒÌ¾9 ‹÷8ha)´¨æ•Ú[¯Çˆ_HýB¢%¾+ë¥sg´ô—4ù3'N ˜˜'©¿Mz¤¶[Fif&T€LwEØoZeü¢j‰m§Nsòoh²9=|ÏeÈTͲí_+,ÿf¿Âj0Áéõ(óî¬%µ(Oòæ¬á^÷"p–OW À–§adÄê•^7ZA(Â&A[ù‹»åXU”kˆÙĉ¶ƒE“›¶®}<#úW_tò™ºVY¼«e06`—ýQ¦Øpúµõü¬¨”Æò=p8ì$ÕL㺡‹¸ÎU`>SOÓõO7ѾWh±û@œ`‰ä®³¸Šµ„zCáæw›’`ÑÉT¹¬ Öœ6צ哇 ÖÒrÆB©€P¼ J G@NÒÇÿ`§†Þ¬›;ç2caŽÿSR<óbÙ(Zƒÿ<"Ù–’ÙT—Ã@qëQ€Y»í"°eˆ<9¨òj9rqˆEˆ(IªÅT“6eE¹„ V'CpÆšˆ?|ä-Fúð™ Æ¡ÅÏÌ]Iíðvu`$àG;b4Elìz“æ©Üús–gI ¹m£ø~HÝÀ,ÍÍ ÞÛ£†x9vœäÁ›P;)F©eŽI±ðÇÉLI«ea›Mâ£pm²b|lˆ%Òg%?ÞüÕT9³Ë£ZA©žº®Èð¨7o>°¿ö·–ëeÐÜ|½[æÇŒ¦3þR4PÛÛ›òRDK'5;ëé ê;v‚⿉<á¢,”?»}9óV•¯7`lbt9ßvBýà¼t# Ĥ,ƒŽd_5‰¥Ý”Ì‚\6_8ß"5î‹•ï’,âÔÈdÔ×´ÌB¯Þ„ €( mi̇Ĩ‚­¦ï<·€Á…šßG—Oâ0ö|lÀìÀL{G0:ˈà±+ W ‰ø‹çüIÈÈ¥¹è-pCù-Ò]iÿŸ|@ô¥ } Ëÿ_[î#^Seð‰†[µ|ÏŒ9ê„BM­  Ècmžšˆ±¥õ+!Ò€ŠðŒ±Òn/ Jw4ÚŸRÛaaÌ#¡ äü£ÿm"‡üS©`mëÁ ë¥EfZâ/mGXý\«ù}‡aiW@@¡!Ìžyõ uÓz[ê†PvÁfÎ<;ŠÆŠÂ°¿CU3r nòÃ;.Γ±KÆuíû`ÇÒKïH"!z“.èb°Ê 83(älðô ¾ÎµVl3;‹ãtw÷žÅ_hÕ*OmR-ª£\‚ƒæÖR *´¥1ˆÐ†åH×â]|Mò±…៾Aâ-ù…©CŒfÿ“°2F±áV;ä°¦Ê'r¢RLÃ)û¹žh.}Çù0”š†z…U"h˜W¿ßÖ †ì2þ|èÒÛDpà|²»Yjò-ÎÎÀÕê ûÒV!»éÉÔ)ol4·;²#gIb¶¬eK޾DC|+†üN$ç ÅF[¶Ô#°ŒOãlo¾yõó–Qk xOÜy`Ùm\ Ùi1ãˆÙþÐlî Vy®s™ðdÿ1oÞ?w¯/t”~® #؇KûQ»Y/zW¦(FB’Ù¡ÛY‰°\A}Àý‚I ›“—ÒP Ž–ØPlª¹iàL&ë‰gýMðGŒ‹éímcÒA‹¾LUrÿwvæeî ~ÜZ3ß`»¾0í>¥7Œ(Fˆoß?ý®8—êßð{ð‘›*€²/ô\?þ뤭™1Ã_Š•‰ÀC"¸-pó—³Jh?lg9:usÕŠÙíHjÓ×h~šîHjz0.9Polcìb[¹˜]lCÖC Úœ†¸«½f¾ò¢x‘?pŸ´ÛaŠìä/Jð/Sü8MO犑ÄÎáhfñ³:{¤fêýOmL,;´´Wq£¬uç-çhò§ãYíà†L_gñµ•½(|@ÎŒ1µ° €nÊí3=B1¿ù‚J–‘Ôi.¡|ßõ¡A{`‘2áY/¯yI;ÍçE5nù? \Y§e¢ÄXA›7µ*e¥eï¨Ì­ä”šÇó7`Ò–úPuw‚ÒÏóDz3âûúûY‹¾ÌSzžÖ~dzÊæÛ[+Ö'XoI@.éÑ1jŒŽÂôSÊ]ð&Ãq—>¤S4t|ÊQ~q9ÏÖuš>»þ¥!ƒëra’i/X#´ÚtÊf_">åcBä…÷=ÅØ4;/sb$G}KÎm×hÌíHz)HbuÝŠ ýBÑ] ­ê] ÇÖ^V<ÒøC––Ý™öÀúlúU¿kz8õOggS@µ ›O!5€,e9ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÀLþR¾§gKpˆMù?^»åuîø¯þ­ü†šì1›½ß2‰]`}šSÏvYƒã€]Aågüó‚ÏitÊ`þÀèÚuW`wEUp:K~ýëÕF ¤mm¡ž!8>@a¤Wæ)¶øB^»*•@ñKê1xêMä„%e|m"Ð B©¨ ® ¡e%\Úåzr ȇÃM±¸ã§•ÊÃ_¦ëÇ™½E’Ç/FÅ!é®4²¤v›LÁTg?§QêÐ`·Ë¹ÝS95ÙiÛÛ•ž^$"%í§XƒY÷13ߤIc'?ÜÌá©-üX~žh¡ ]”Ž_^Sú5î{óÇøˆ€šD§P‘ Ç°g·jæT1ˆZÞ–~‹/ô÷p:Çàã8Y/o®²êß'”Pþ^&iüÀÙ¦™æ$‘Uw Ä}½=Ú²‡qždsê¤)|-–T3üÄ*øÆÜÇ3¬Žˆ™-gÑèòþôZ£¢Ìá9™„…›²øF´®".+LÚèX‡?Ò)`h÷<Ì`í 6÷ÚÒ.½­ËP(ž§t@-D* Å¡oŽGP`ø ADvÁÌî:Ïw«ö3¥ÆmÉEªô +€ë&›Fƒ™¬™šŸ gyQ×€% Õ?DIDf.¿:Ó½ÊrNëãµc µ4¸–õÅøfAIP–R»P‚ñsú#I ¡,Éí@§èþ—Ø~ HFcöEpK[~eüa­#hX{0u_ ¿N¡ãÞ;ÒyZ¢SU08÷¦«‡]ŸÈ|À ÔÅåí×þQ¼xB2îÆRhëgf>Ÿ‡/…<‹2‚‡ ýšé ¼y$l3[9´+òèéú” Þ1Àz—·c%!h‚3²âÁ2ªÃ8kÕÚìïaVÜûãÝë!¿Ê÷PV@GMŠg}obIÒ<°°£Ä×Vk<ÐÕîiMÀ¶x´œæD¾á5Ô¢ÅwnÕÏÏuÎ"°—0áçÎ8ëñ ntZ{ØÔ¶`é8Þ O²%Fè5R²„:=´Þ˜@‚Uì\Ì+aÊ\vÝû9eöÄÍßöÏù$â 5 §gFt¼"ÉË.aí¨ÑÞܘJcÈã‚3*Ä΀ŸÁîQÒ€ÚâE» ý©‘üÜ?:­=a"~½8QZ+Í·D›ª8U˱) B#n‚$€…k+9Hd[S4@=ŒÞåÂN8숂¾¶÷ãŠzÖð Âvi—±ÇÍ­)¼‹»•£¤Ý\ 1ø¶B7ÜÕ wª¶´.k¼CÚºå±[±Y ÑÅúP¸±ø7¡ËÈè°Œ~O~,œ3 • ÚѤ€%Í7¦–ûyj|Ú"RÉÓéí‡Z6€Ñ¡åì‰#9d}èK`Öï”mP×ù)"Çzó_¢ ¼›Ä½œÕÂÀ€g,‘s"Dä…²VP‚©û«a²I;Eâ¼ë“pš ­j£_"+«8;Í( »óàBÒüôúš9dlÀÀUŽŽt£x””sq«ó.zœN„€i[–A«M”èldœæÿ×w˜aT=÷\‡P¯á÷U;æiÃfª¨¨ÏüÀ„½»‡›C0±XNöf sTÒ—ûo³­ƒY0eC$F‚T­ž QÒ<Ü‘YYbøXlÕ0¶N´¿Yc´&a@ü¾»¡$xï¶ Íý͸òÚ˜Œm\Î#]2g¸$‰VùüÎß"Ùh3GÈÎÜuÖßm9ÜãÒ~űŽ`ÁÉÆ – ßy& í—@NñŽ’ƒ¢Øê¡nüÅÞ•l€£çeË®j4•æAÔËf[²•:K0.š÷Y/5d R¬»¤Bˆ‰®/d}Ô Šþ8ßÞ.™âJIŸK¢µM·«Éø”x¾‘»ra"¢uÆÒQ¶k­\/JU›ÑNDãFn¥NÄÆ¼t·1»bYz^l’šÊn»Åßd´\¹OØ•úØb¹£ò#zX¹‰$*â ›U f >µ)üÀ´jßìL‡ŽÂŸo10—´¬#9aÞ¸T:݇ ÅhÏN©÷3×Òð¦.qäHšú0u¨«n6·]¦¾ Õ|í²€‹{Ù ú²¿T¤ ¸“€öçñ¯Õ ×yF]bA°Åõp8ûå Íû‰!«òA^yÞv•iÌKcŸÝÅÓÆ{¼kãqJÖœˆê¤7rùRbFì;¡VC?î=†– žÕWøÞÖ6 ï” \@2‹…P"Éš¸5>Ý}–ˆÿ4h¦ºE<öIj½Ÿ2}$È7_\ñ÷æQòÖÈà‚ð^BÐ}NtùÑ q?JÐ7%öÎî^Šõj(nÈHˆ;î¬Åì)þææbJ!ŒÒ:R¸òFÄÚ¯À —-Kÿ“Ÿè´6†ßâ¡-Ïbög«ÛÑ÷º1"VV#ÉyŒ^‡ˆ¶œú‚š;‚ú©ð¤A$,$9·æßƒë³8äÉwZ¼(‚ƒÆüla@¬PFYA߈îÆÇ»óðÑÆ`JÂô#ÇL D¯A«è ±gps|O1º›b@Ê´é Yq3CGþˆË°*]¸{$Ó¢‘ôÙ±¤Uº¥Ü½f1î–>ÐÐkÉüÃC“==àŠ¢£$ûH ÁS„¶z.ö[Ä…j•ÎigwðQ‡^Bõ‘ ±þb*†‘Î/‹Mj­é\Û²¨à1¦Ä$%žÒ91¡Äeg–ܵƭOMŸâãÌí*–o‚¶à_Âó•›[¶«(㯋„&)œ&³3Ì ¥o8ˆá5\þUpòÀìb¡PEÁNÌ”ê}¹Û% –»ŽÓU2!°ß™5uƒT)¥D(è䟎J‘ŒYöÌ ¤ÿ~füòÿªó0—Oc•½`¾KÓ£DvY#[o¦¹¥š5ž'­´=ïKÊL¼+xæÐ3ó‰‘Qc<ÇmQê©Wiç$Àî5<_æÌš±xú§<à+‘Ç7­Qíf¼žë¸} Š`_¬:³Óý‹^^uüÀ­ÙhWDaËÕ‚i…³µø#¨Þ†.Dæ( tc á(`™õÀ3Çä`îm„fÉ•¯x#¥^'9ÆË›¸O““Ðw4Nëva _Y$.8­9øú½§Œª'U%wšèµ*šêÕòûצ(³6”˜_JV;ÁÏÊ%ùœO‡Ñ »]rØÔ^1ø¡ðían‘a[Ž*L$®t\Ê1âªk,­²€ ©S’ãjÀl€DKúc:)·½÷†%Ó pýÏÅ*\VÝé1©h•ä ²f4D2ëäÙeS‡N7©ôØWœšÚÓY‹(•æl¯â`œ² „ÁPØÄG ¶ÑOKݨå9„VùE¬&ç NQDÛzégm‚I%:F×Xón›aüÅ?T4–QJ ¥ÝxòQœ£KœMßm8ÈÆ7`ø%ƒ„C§©¨hv5æäbxj®;Õj£]­ŽÊ•Ü ’Ü|ÀuuÚ° MÚìÄf^E?¬p±ng%Ayþt;õ¼ÌÛò@tw£yÎ㬢¦êZíû?«ìRs˜å<«BaäO™ÒÞ “›,ó3ÂÚ2 »Ry³àá3çU"5xË6Þ P¡ÜÆr ¿äõ 2Г·•/¹ÐæÏÚå5 `;¢'ùá<ÓvÎ22vЧd0Urä$O@¯>ŠÕqàp^6ª Ì♲”È ,t·µUñ.yôµlÑf“HòÛ‘ÏÝæ|j |9 ®iøRQ„r·f"ÖPéœIuƒEu§/ÿ°ŽR?Q5üÁñ4¢‹}•ͪØèMÿø2ãPH ª£âejöNª`ÅŒýÂ@é¬=´W#Q¤^®â£›[0r<ѦÎÐŰד´­–Ãέ¯!Ì5ðAùÑ3r¤Ï§\B¢³ËÙ5t~j¿G6°ƒBBµXˆ«€ z’T`%רä&0ÂQà“MÐ1±Éðd¡„úÉ™Bh¨±£m²“íêÊÙ~×dÞý÷þr~¢Z–1³!¾Ï±Fm´ý>¡R»tÊ8í>KJè†âõ«%Z«@æ Ñ£­ÚCÌ–e'šx-r•?ýTê7vx-i9ÒPãbW/…Z«jî=жÁќۦR´bÜý>Í/úN¢f©ìíØ©­€•hД®Ñ -‹Èïq\Ù]üÁ¯™ì’S®=ÕO ^Àú|ˆp€âeh|'z?Gc;?ÅI`jpNKéDÕ"«×2!Ü@øú¨7ÇnS`3±™/¸¿ ý FC‚£6Ñüá!ÑÍâ]¬³|¶út%ƒì­uR]&0~›ßU…£öïaô§hÉü.~ÑgÈfÎhwwf߆¶6Gìµ1ª öÅ(ô»Ôà>…“>ö_=jÞ‰ ›tacוH ²oªÈÏËÃ)UÐþ+] Yz—ý ñ_¡ïBÕ¾¥XUåíÉòv† ¡Á·0ÙÄ ×(cÔ¢Ž¨¨²AÇ铟è~Æ&¾#M·¨‡ÔÒhI‰í‹ìÎâ…¼K òÅF{¶k|ÆÓçWnÛfðÔ37LZª²wÙOggSÀé ›O!6kì ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üXýu°D™W³ò*¿ŒoMÙò’nª½æšc22ù¯C»XrËC%‚ÐeŸÅ7§ü|Ìêú|ÑU¿¬;xµf”¨OÅ&nƒóîéêšü„wLPsy8’Ô˜‘5x¨•G¨4ÍDxÒ˜MÚ€ÄW¡éqÔ‘¨æ ÌÝ’ì?úýg–¨ÏEÓ!ýIž‡|±âþ?ÝÃCYÙ¿£ÌËjí­yŠÝ¹Ð2ViÓˆ’¶Lì ïÄ߇òg-f¸ú@âšï슕–Ïöô8.Øöýj3ßH„ãåvPà :YMãÞºŒ‹}LóJýh!/@˜(̃ˆ.ÓÄèZý?â/ ¯2µÑw8«7þ«‡x©ˆw"[éVŸÔÙÚZÌ“ïg«nw`ü×ÇqÿÙdsÙôfÒ›ˆ9:•Y7¦At‹ïc°¦h}WC±£¥Ò‹ðølú¡R€(0Wˆ+•¸ +>Äÿµ÷¹•* ßxO9yt>›æ¿¶øñßéo ¶~ëæè%nÒÐ uuÈŽ0Ç-4p¹àý¦6Ï3Åæ³‚Þ”¡­š›åe Īç„`Xz/rp“QNþ3îrÇyI·ŽG‚˜@J*™~ÉâÛ ‹ò딚†XpÉcFñZÖ%ü|ƒQm¿ùÓÂãйK»Dè½Ö# väÍ,‚‰jXö––§vȹë×ÿê`w“]C0ÔÌþ‘£âsÞÅ4åþ cÒUetßÏî'ô>sø¬Štô›ÍrYÑQùÂem$ŸüƒßJY—õ”EˇüSx˜™‚ç» Nµ(ÕÀùj¡ f“_0€ìÌ×;¢@TOJŠ:q®go@üaŒÒÝ¥7ˆ=Ùu„ÄFm\9º¤'ÓèWßÕ§‡ŠUÕ©$…D¸?˜ÉŸ7G19ÄÚ¨´ûµ9JOñµ9’Uí¶§ORê»-›eòq*sNˆŸ.Ç{ËhZmbL8ÒöBÎtÉ´ž[´ò‰ŸOpn_SïˆÿD”A]v2ÔÞ]Z™Ä"»Ç´«Õ¸l÷δëËdÆðø„ít†ý‰`'St¨kAyÖ3Ë~ ‡v:êºÕ_âÖ<Çíù!–ÄF²´¨R…ÔÙü‘öóŠÃ54ÉÈà\&Ž]ù°Mî¢÷öhQò¤‘#öMwùÔ“z”ñÏüÃ?²)OìŸ ¡AqÚ(_€ª€Ðóx©‡Î¤ Îþ?×xWŠ~Í Å©Ÿÿõ²ÖÈVs3§[C‘ÌQâ$à(3ÀB­—:Ëôžý72(áî\$ {ƒ…‡g÷”Øèc¹ŽäW¶ù¹óÅDÖhiø™Lï™ÌË'ˆÞݽ+íÆþ‚6P22Jðš²6!ñ !|f±Ïr]}JŠJ‡ˆÂ vfì»éݱ]P戞 FæöèJrØ<‹êþµâu{aò»¦šmCÙhÜØ©¿"g‹sŸ˜Ì¾yüY§bùî “ª&ˆM/Z²ßG°Ö2Å›IY×r£vu,>×)ˆ(¡¸)«qU #ºF]YÜ.ö£’³4žë«—@(~$"¯Àý¯ÛàƒüÀ"»·MÀ+¼ôªºûž ÊwpS ­ýA…vê¥Qî„{N¯WŽÝÌʹ€ò)^»àÂ7qœ.°@y4EZðöü',gtþªÁ­Œ¿q,Ÿn2äÚ(³u¦¢€{ÂâÑ&T7r‡Êa·äIU^@HÊÙ¤ú km‘Òƒ“í»YXËÐ8$ò¬é¯¶4õ þC÷ºŸÒ¦fèèÙJÔ¨MnO„SSܶè·8³y‘þàš‹&Ký¡jiHg£÷DÄò]aäKß¶Ïʱe·ôX‚ѰVMÃŽ•{è06„øøæ#8Äs€±¥É!ÌÔ”~i;ÉÇöѰ›Ð!òl£vc$‰ Ëp;ªoÏ,¶¾x°Í+éT=5ýÙ5i·F}ôRLÜpql‚üÀ~‚¨%®áà³µãç%ôÀø{ÎÍ4™›Ìß|»äu\nÉ±Ö ¯}¸ÞÔ$ É `­ã"^¦ï õÚ™º)KCÊ3MØ…$o4.w\Ÿ~´šúUÑ c±¥»’þùar\ƒQÀBB†¨‚§A?w›ÚþCÿ‘Y÷‚(öþï;UcM>÷klÒ¸6æ‡û|cŸÛ=Ñ×[3m±UYË*¢mù$1ƒ‘.ï -É93ñ¾aEJrØçpbȬ}é`£-¥jxb%YCoȉvM†u•ž¼^ãdCðî§/FCñ; ÄIº)ø;*d2AV1‰Ö¡U΄ºfß &8ï;]ƒ7 ‘Ž3¿íXŠL¦õ~­”hÊJTõت×d‡þÛwr-¾å¾n)¬wßÌMAõûÉìÚMÄ-¡äž£»ãP³ëœ½’ǶAÑ æVù¶<@Qɱ²Ì¹Â¯Ëñó½ìØ/EœeÇ-m*êÙ¼Úè„_Ü<†ÅôB%–,Ö¾úHÈÔv 6‹,¹¡v&†Þh[§Ç.쮊ö¯y`>[Ð)iÔ¸Ê +Ž­ h§áhØNJþ'ìA—öAY`½ˤîò ß(®®q^6Îã¶@÷õò[UdDøƒAoëÆsWÚ©^mþR;O38M®.MÛ÷ã‰ÿ¡¯7?æd4F¼\ïÎ7k×{ÒT¶ÀÛ¹>ùÎÍÌn&ì(ü[™3ì'}rózcë¶ï³"|·!ð§Õ!‰_1€ó¸ƒèSàsê\<\€gr-í÷@á,ª´Ð”8yààóýßÃEãÃßX±Âv5a€ýmM¬¢bÌéÙíÚü o˜"k¨UöÛ9¦ç8ÇZ¯#Ô2¹ þUñê& 51D~5Ý ‹!üóÖ:n#›þÓaøW©F›]+óf5¸Ù?%eÚg¨[ráÉËbò§-L•J›G[œñ‚îIÝFVØž%÷‘v‚f-°2ë~#Úûöå,&’V$!¤ÐàS¬Îkÿk¯Nil³>”1bÔ¹Ö6—ïW rS¤•&ëâE5Z2g¦ÚsXŠÝ%é м(mnes«"1”Q¦Ÿ@ÛÂëï|Tãæ)«çM$âa£³…U‰áæ½Aû±º+Wª‚†ë³¸)ÔeÅ|„ˆ18¹6íë -ò¥ÁúRuÂÑJQ&f.‰¬ÿtÆWÜŸíÔ¤›ÿÏ?Óàž@‰üSÅ¿ù öU‘×dô¸„àwòAÓ†M”C²ŽF¾Ùf—›Öf0±¢:f¢:vì68FS[žŒÑª¹ œN´;Ž¡zq^S[ur-á0(ÀÁyd•èÝ<ô¿º2Ÿž¨ ´ {€î”ÌMľþnvU~ܺ¶3ñÉ(ò’ª-©Ӵއ!¦d¡Wb¾fz0d+ê ˆº¡ K#D–ÃS0ñÝϺÖ2;ƒî&×_Ô§ªð=›çè™;¿¸V‘£¦¤ªV†éÙÍ!ðœí¶W_št;Ë3P­ðÆûïéóÏùÝ5ôÎdu¯Y-?ãä¡Ä_w¨µ>ñ­ñáf,êPBŽk"Þ Ìë½E(>æ;”Lν’zakþߦ# $êNûŒûûüÕ£ už†¼¢Ç]:ZI¬@®e\á¯ÂîÝ“¯¾âq2kØØÉ„_œyÊêú­¾_Ââw3­p/|--†Ø¡¯CÄ :ypnSÖî+ˆÞ_?MÕ{g/NÏE ‰ÛwœI´T±oW’ê«[„0å}@ÑtÏLjúaJÑ#pFÄ%<Ù0.`fiL«‡#¨Y} ÒO¾|7ö¶é\ÊÐíùvïR%\ãJ¾]ä2^rñ™þDNØâ˜Ìoßo¶˜$¬G³×8RmÖĽ‚ÁUlT%J¡g¹‚žýÝ‹ŒÙèZ|PÞ÷$¦ÔÙ X#eÌùØ0þD½žÜxªà®Íy Gå®qi‚übÀ’©*Ý ]ÔŠÅ–Á/€ðÂ@V•±%óá)xu¾éD`Ô‹‡üÕpß\„$Ó¶O€úÙ/hûÏ”KÞ­x?‡þŸøˆ˜€W¶¶‚ºÛd¿¡ÁíÜäº ½ò‰©~c¥ÝÕÿ²Òç$+Eî;Sã"ïwÂvm©Åソ׸ć_¿0pX:›±:f”ݘ/”ûÚ ñrÔœÐÞ .Tp-¹še½ ¬Œ>%NCXòùeòøA-TÞÆUçÌ ê•ioœý¥µ>„\Q‘¼d€ìhLȤ­ß¥ÆTXtŸžûU·¼SÄÓ^q[E;ð|Ik‚¿|c³lšN×â9éDDåaýgŸÊZru`ÁÈožÒz²[ÏÃ;{6¨ n¥E{œâ5–˜ûK?;¦O…Q1í é&Ÿp ¶ä,fž®ê®òÿ·ÎhÑ¡ „á¿(Ëš†üBiçv,°›gk-òµQñ¨qe5ërùœpÍ—¯èfh…µ-S6_ða›ˆÇZÅù!ÛÖlëùܦÖŒÃ`{¹F'ÂOŸöÂàgˆIäÑ1›u¹á.$m.¾Èæ'µŸÝÜt}?ÐuÙÒµ3û5yåË.O×V…ÍmF£:„Ó1 8Q{Ï}ïh‚ ¾wU!3Óæ÷ê=;wjK )jà3{ õ;䤸©–\’Ufà§rW°Ïïòl$=F¿·bf|£«B^ÁT®»&´”‘¯îÏÔ_5ûGÔ˜Ò" ÖZúæEÍah©ŸøC»JÓ×¢:&øu#x™¬·/pàíuDP–n…qÓ;íkwHËÉÞC•˜Ë•ûOggS@ ›O!7Fp ›ÿ.ÿNÿÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ@üB<÷™€œ;µÑïFãè˜5ìÊÞùhÄ$7µ¼‘Nø¹Mõ?hÁSè6.ƒºÞR7õ©Qø·æƒ«ïûYè“ßúU«Š» JÚV\#_øëNc³ðrbþQÀJ9ýu—L£¦Ñ¸¼äó oO”²aÊÑnÒ,B‘]ÄϸpI -w÷†íœ ±˜Gq·ŸM“wùr5ƒ[¤ô;¶Ò‰ 2sõçÕ‡€4bÿäý)Í%2!DF"c_nOáw2“ÚdÖÁÙrdz¾µOáÎ*`vçb~iƒêËöS‘mät çÞ¦P­õü5-5 ÒYIö;/‘Éö̉=ÉbŸ8ÿ+h¼³Wãþ)Þ[hðèøv>Í%¿Ä.õâcr->—áˆþLˆØýfßüzóÌÄ+鹛ݡ; t "_ Dÿ|ÿ±òŽ‘^ªyp«¡ø¶H÷pÏ_¹¼ü]  à )sæú)¸X¸Ÿ49@U» ´ Zݪ¡Øsÿ1A^ 8«-2ØKl’§A -øéL¦>ÑzYÆÒaLÁæ°ŽµÝ쥴($¡ý€§.SâÚfúíöÀ¬o*º”Ÿ”N³2K< 6Ýi,qñC]0å%€† ¤!‹b ºÖÐM®sü¯A ¥˜„‰ÃÔÈw0#‰qo…{4äÏ£+q<^2Žwg¿k7ÒP$ÿ?áÈJx;# sÁÒÄâ[âÀšOpýîøì²T7¸˜C™øo´û³Þ,)nBŠˆkKW€'ñОM¼ä ôñ‹šÿU3ð³3“ì@‹ 0‚? þKÿ@hß”;Gw†‰²RáDY¡¼{…ýïÒüS¼Wt¿U/+a3Z)‹ö=¤XVKܶähamb=â]|Ú7a7æÐüû’ñ³–oÈ(U$ñrjâœ@ØÛAº ·L 8ÉgŽpìRËý”[7¢2 ™ª»ËI¯ÎÀÛpéá¹$_¤fÓY‰ŽÒÊ¡ Yh#" êCÈãÍ€˜1âo¾‰¹<Ö‘ÓÚ eÇs"ÌI¿QçHx2˜=â•y FB°42y>(2:”,ÁÙÉäkþ‹-êSÄ€lñ:M1~ª¹^g]7È•CÙ,ǶS« û•¼7Ʋï™S FŒîÊ¡ƒ8/+—¡Ž™ñöH‰¹»·öûИTJ£ñ° ·mmodR‹TÁµrCq>šf_2ùZ€lªÓF3ÃŒ•ÆXèn½Æq‰žX‰ {§ÄÀkÇW2€Wf'D/ˆn›#íƒ^úIãUú˜Žé®jE¥z›“¥ä‡’A×u %7Ð^¢ʈ­Ú„Mâ§uÞâ‡7¬`pú†tå>•]JŠŽÝ¿b‡©³{+ò[J`Ùrõå>¶5üÀsGc;4ªm÷SñL¼¹ '©—ÛÍ7å¦Á/÷†d+BøëòÐõêºãhN• £R;é˜}.0_~¾0ÀúÎiÐLh¥9|–Œ5L%k€â{íi¾Ýw}ZÊ!öTcøn‚çq;^Xðò 2Æ5:£€Ð&Ó!›T_¿Ká±7wˆlN5)C¡{m€u*ø9 ¼™¿\®¢œtÅå.ÀJWÇPåå}=¯]ë§gÊÓwƇ¹D7̨9&ÐäóeqÁÜÊã9äh•F|pñ’@ñŸ²_+ÞÕþYz?ô­b\\sÖXóbHj›$û—Æo—*tÑé«4¯K 4reIõƒœ.ó ,¨.‡7ï‘ñ¢Ù·j+šÙÏæÊBZ,PÎÞÂ¥)üEDo8âÛ™¨<é'å„–Îô‹™ÎÝØ<<À†$×mMT4쵦‹æláœRbXì •ôɇäË£X¥†§PtçF‚OH·E›+ÐÄÜÌž h—÷àÁš­™;õ» ’õ!»}$×÷Çå¨>XâGd9[-³éÔwÉ*aèv",Arª©Åöâ¯T&‚¹Å$R,Y Ix· ¥ê æY”?%I¹[‡¢“UÁß[–šÐ3TËvÕÙ]1Y¤Ó œ„½¦3?þK„Ðc…1>ó<ÚD”ªjõ©a”ïÆ_,gL,¨#†ç%T¡ãˆ¿†áöó5´ÌFìz(†òÿöž: hÙ‘G…Õá#¥è+„ŸÓ±ÛÔ,€ (’±NøÎZ?sÔ¤ þrÂE½£6¯÷öb¦ÜyÜâ‘eÉ £ÿ”Îæ˜_¹œm»rŽ FáMw“péa¤ƒŒ°µcmy—<‹½¨w«é†6ö{ɈR“V]Æm¶‰ädOîÅrAH-eñÝ8iFYÇ4y%‰Ë=àZm·W2¾ÕUk‘%Íòý) 0§ú5‚$¹S)|õËçü6šðð\&]Áfòü‚õŒdsTà]çL´ ‰½§B¨gB.6)FQ$ÇÉt',5ë¹ 3Ázd¬¶‡©++fdõÚþ³0ÅJ›¨´ü$÷þ ¹‹ €æä¾dŠùBÿ$XÔ®.>x»«WjLLÒ`3–ÀU;иZVðĵá’?C¦ã¢)TC” ê%‘ X&«3xzߦöøkÎÁnßùlñ÷o¾`Ûe‡Ø™’Ži÷ÚfóÌ8}6º«_0A/~ú…™ÂAVg×Vô·*JLt|­›Vd¾N0 ‘¸&T”ó¶#~H•3ÉS×¹)ùÌœOD&F\‡_É0”Ñ;UÊ …F¿W ® E´ö]JÑy¶Â[•6%C.A¹rZÞ‹…`–¡ÉDk¢ãÌŒ¦ñcé:¢¿Ó µG¼Ûº˜x†b2}_@-HÜ%,Ðé§éê•›`'$k²Ä¢ eIý¤Q´¯¬Éåòþ”D)üSÅĸ 4LhRìck&TÌ}.°¡ÏÅ;Jü8u¡`ëaR¥¬%;B°Ü2ÀÚ¸ ˜!ß3¡á]·÷ ¤p‡­"îU BP¦«`žŽÙÉ(~JÄ?Eñ)X éî±2¡ý[lîP Ç-{"(»ˆÉ«Bîœë^¢Fá¯ö.Ô¾ISBÃt¸+º b»”AÐàþ-‘q·×ž*ËOp\‘Ÿ6ß°l À’‰#íó¾Îú\,Éb‰&03ѽ&»c³®=iî*òâ:¯ÑÝQ”¨ågü{½}”ûöÎß§TëÚØ=«°²nª“*ÁÄÂËèà+õxç'ÐaÏ­°S5?v|WA¾îÏŽ÷Œ ðÈ™ hÀokaƒO8u ÐÝZR€›iDéVüN1Òåm%Ê–TÞÚ83 ï9“VPèaÆ‚ž‘ =w­ï¦;µ^šôXâ!PŠ6ЊFAÖMÝXÚò hc†°#’  v˜ŽcðïJdýT„ïP,oc¾F~é$Å‹4™ž´f˜^§¿6+bRá£sË™ýwÑè+iývv‚vŒ¡ÅÉÇãEçì·¤ä…Ú¿†me¢†n]bèçT„KWÔ¡ÊÔŽcJ "³ðƒ|®$`1Ì0J‚.z0›VVµŠ†„ <…MÀh;F&éŽAÂVØò†@CY­Í8Ì1g×÷\öíÍ|„.ÀTOºaMÃŒ YŒüBàômreŸˆP¢œ"Ž(é«ÅLUj”ûA  nRzÇwuÀø°—/o;|f·xŸ¤üÀDÄc\w{/!¡zÌxþyCêÔíuçüNHÃm›×‡‹ç Ï0X3âC†1«ªŸÝ¤úƒÀkÌ2ÂÜ 'ÿH¼[¯V¢n·E(…Ö{#‰l€"…ô‹®/1\±{e즥>ë[òdÞÉÎÄ-p¢ io-4TÕ]¤ÌuàG¿Õ¸v%¿qÀ§¶»5º)>N —Ù ´ˆýö¼O‚žÅG+‹–IÊÝIŠôPì ãr‡–ZÅðQz¢æªùa§{Ô£? ɘ“ô~gm¬Ÿ P¿»Õ·Ý¿¼µ~âøÏ…×í¦ ŠIV‰;œ™Ù¡±)ˆžcèÌò¨V/—òÉrX¥öX¤[”´@Óý Õ@…~U ÆóÚªÛ•È2Œšic¢"Cîk'ÖꉂüÅ©T“jÈÿ]÷¬•THj[<R¬€»“¶y¸3Ï£Ã"Åh ±±AE•ãÎWØJDkô£çh¤Yħþ¬¸ÄÅ?=uz•Æ5àÝqϯ útR¾AÓ¤±üëf>#¹Ñ½E‹jíÏÄ H6¶BP»šòE4‚½/0s¿ÿ¾bR´ç7ÁZáºùýu)Ûª`ƒÔሙÙ /9·˜ öc¶>f5ÿfʃ¯þ‰¬Ã/lL-^&’¾Øè‹{ß̬wö2Z<Ì4„å º§9±Ìú¼@q%јû.hL~fÜ©¡ ž<åXFä$ûaŒËß ¬²CŠƒN ÙtF¸]ÀÈWã{)¿IÈt‰qH;ض)RýaEv7Kùýfœˆ…Ž ¶ìq cKÖ‡…8ž-/‡_iƒOggSÀR ›O!8›Vfÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÃÔy3€“0G„MÁ O_e@Á,,'ý±˜ß2ùýõ}#âL¯/ÊA]S¿öqükH‡²ÉÒT”€º¡FHåƒt%‘hN™ŽüÄþPËó¢æ wÒoÙ9„§ ü êæø?èÏêé¿ü{Ìøëvå'7ÚbÀ! Báe|®ÔàR[²úêÈðëzªÛ·À–®”ŒŠ>7Ÿã²á†$,šasˆàa ¤OÐ$Ê1ì*¯ñ=Ò‘^.ï¶wúUéÞ¿uÍ‘º¦‘(î|hƒÍï`‡.ßzlåѦýs+ÌÉå(¦â]€—à+¯06ßËVà´Q+ $ö¡Mܽ<¥þðÁ4(iÞ©>Ù¬"ðù+Èr¥]á`œN{RñÛ·ikmÁZ$ŒvÐüa)²ñBB,‡CQÆÞzZŠ —> ×eþþù=z²`oAÀþæ«›¼Âúhwªc”÷‚âÓ·YPÄÜ>-@”²`ª0N>nôÜf”øSäm©é%½-#Mn½tlUÖÕ×k¥­•¼‚"KPBšó¨¯ôC4·¶Øø5Í©~~*˜KKñ¡Ãê€\L¢WŠ€Ï÷}| 2¼‚Ìàiä9L€/º4-º_yÔÆœ˜)±J`¡b×Þù ¸è°7 Ä ­ò¯ ´!¨ü¥ïʨټq„Âï§ùfœž 'È@cÄ¥»ôvéÓ-^ŸÐ(õÌÍ CzïĘÔ:âaêØÜóç ºíQÚvE„uf~õ.r:ßuñ¤ºR-¾hŒŸã„zyÖÎZ¸eü5eÙÈßâV×î8g@r"¾: Í{‰TAkïQ¯×%4=ƒ ×\ Ët’Š7ÂÊÜÒªü†„Îhš·;‰‡Zš˜gtJ Ö* bNR­cWß@È7 ïÕLñV¯ }YÑ\N˜gd\Ë×7Ð9R¤øó ™íAQlIB'mçy61ÿc¼]·Ì¦S9Çs Û$CuìI”ƒ]ÕIÒVšmÞ$¶m¤ K˜0¾j¿Æ»DwL˜Wä-øRA°´/»Ìg¥ ‡ÔigPEæ†só>ˆ[BħyáCÙckòt2?œw·ôªÕÿ¬ÑcýBé¢ ¹©ÆåˆXáhÝIªKTˆÌwUŒo´ËLô˶Üh/óÏ^O€Gû“-œO €Eå}'–ú=»5üD‡÷$‡'ó,â²šãˆTs=®o”j¸½¶Snâ0NÃÌü4(c$…<ê†Hâž³—HRw´­Ôy(Ô'Wc”0 ^P»WõE²æÇÎŽÖ¹Æ\×KøòÐ˨âPõí àµ÷MP7ÞõtÝ zô0Z\—3†Y/!oø*ge¿}â¶ÙVà+|êß_²†ž¡>ê+;”]…MÆðwÏÓ¡ùÏYˆÅú^Q~îӊ烾5©*’M£fYHZ{T+ùÔK9L¸íŽ_ÏÅ|“ÝžÃk7VÏðÔŽ|M# yNèž-f [‘écjJRÅüÕ>vÁ­Ÿ8C¢û{#kjºË¼ö/¹ œ~5WrDRÔÆ°¿ÕÙZµu¿ðü×UUgW=j4FB£©Ì0G<ØVÄÆIkÖÒñÎ ôåïU¹ £+ä>— o”ˆrš/Ñs€-ŸIXš=`Ùù“[ƒ. ÈÔÏò>”¾ÊÔ8Kg8É"Ų‰bÎ5 ˜¹†¨ù?MJ:©~RþT›2Qíæ„0”X®BÐT¨Æq¬(8’8(8º]í—ÅWŠ= «©üÅï.D~bq·¤lä;ßOúâÌ/­­cäàA1úgS\â/ÕŸð1–Ì!µïÖY1{m*Ôça Ü·"^Z`Ùp›æÁyýºÁÞ¤î¸@Šê€w.Ëã´´¯&ŒúÉpWjmÎ#Åù)¡'~ÜÒæ›ãXšH8Ç!yš}xü<ι¶¢N©;£aYo¸ñ+†üÜØdú`[óæ™Z"6ß £{íš-ÐD"&°©¿|>à ýg„a©°4ë!6D8-^2Ó)š€¦Žu£:Æì¹½£¥ÑujCt6ÁÍFQdÉA›ƒ< \0nP~-htÆ1’»"§l(²~d^ù]Ð Q¹hO‘컊̼u¥"J"ô£áÑ6õ0z3‡ü'>~¸lN¶kó{Lå-÷¡‚RÞ¡?”W¢‰×G÷þ„ ¸é7; õx^NÂÅ!u¯º¶8bi–-ØMâX¯€TíJöœ‰¼Zÿ*’LÚØN—¢Æìtw9‚Ó·í‚ZÜæì€ÙoïO±C ‚ª7(Æ?ê zCÁÊŽ¼ÖAíÿºôŒVì^5ˆ+™Åw†Ö”ýB¨¤+Q;_fÛÊð=Å`QÈ ¿ ©JW±µúd633–š^Ú×!Ô¢f’:ö wÀ¼ŸC÷uñ¨1Jöïì¨xåm)¯Ç¢üv±ÌDYÚŒÐÌ m*©÷{¨Ä'œZøžû**ÐãÂu³§»nJi\ßn“d¥»oLÆèT–=±$AJ>íÑÚ"¯4êübEˆªI<ÌݰÊÑ®ñ˹1k ïî›2’éþãjP7Zè#ù·Žé$ÆaÌ꯺7ô5)—üLiƒÅrœæÌÍNÊê:-è¡P)µÈ²ëõÜøÒù)Ôð’Á1¨xÌè´ÍUMCT˜CƒJÔ:¡ÀpH4Rì¿?=¹á:bKÖy%ø×20@ÚXàµwoן)ó•™$¶@$Ùu«%£ópÛ³–£ü×C½û¨+üw Â9uFmÉc‹pNõÇÉ/¤“‡ñ·æÎœ!°)¼õ˜^v€»ºE”JŽ @ì¡ëvÄxp]9ÀŽm3Ì'"û¢: LÜ Ý캆°T« Á‡1>ž'à#–Œø ÷ŽÌ_‘V§œ>‚”0Be‰ôX¿\O¶*lôL|Œ”|±¹ §¡=±gÕN´¥HŒ¿ú[Û¨±˜ö|Þ'_/%–I±oï‰+¦ˆÌ |º6ÏË%¡·U¬ð"¥¨hWú5çy:°¡ë Çu Ö!`åÖ¸g5Tn3RÃUÞ 0jnìx€ù…¼ð* K5•›Þ;+Ó:v·Ï°;C… ã“•o›53™É˜ö³ˆ¢Æ®´Uú”Z‡ü3î§q’Qá4ß”ÛiÓtsS#7*_e_b×y‡úÇÎx. ¹­/ éd‡fêøóÓ»å*ÊG&Þ±zd³]ðåÒHm‡ØÀ†2DwÚhì'•nJ¥x;î¤+Ó«w‹cUú”¢’*SBáª][~.ÞnjÖt²» Eo ȨÉáS§èˆ(W^(žýàÂæÏþiÀÃnî!¤šˆ Ó@\zª< ²£»ã!5h Ï&˜Ï©9¹ÕŽ‹  (R;m^<â@ÿÄ*3ÉÌêÄÄê®KOg&-8—öÝM:”Ï>]‹KÏîÿí!f FÇ]Ÿ,µ¹®£Mô<þü5$(ª°™H@ǧfævµTöé²?ÿÙ)Û•aAjÌÉ…ÄŒ,áÈJ¸7aò‰v¸S–ÝMW?ŒýÊ¡üÕ~+V}_A½ÑV°„°N¶^ô_‹áÔq"Ë‚ã­è.ÐÓh;3ÈmEMúôŸDŽ"½XXȘ¿s¬¦Æ›Û8`R.½ñ_JhË.Îö{Ñe©¸`S•”Lr‰9$âTŠ[žH%›™ê…ÿ}¯°g`BS$ 9kqDÃÎû mdqÚÞÇÿ2V°ÓËN0ýäcsdK²9c¢n'a¤ø8ˆÔÜšu!~zšý"â°8™®±cÍèø~èD™J{3%wG >å$êN¶WµgK†é:` A”®×˜rg ¥ÐIÒe²(+±ž@WcÐm§ídkRUö9êz4^Ì‹Ó4˜óóçn·œò… u6ìw±Ê|MŒW·åï°ƒêÐ - ­¶Û#jr7ûª…üÖÞ‚~ Žîª¸œ(𒼆ƒ9[ŒÉPöwqô¤ŒÇa°õ“¼·”¯ ‚(ªJ×ÞºÑî”ÖMáš!ô][nóÖìQ~-öЮ'èAØl×[dÅ㱪‘åÌG_éä#¼Ö% Ó®Ö²rà±T^=™€Äô}ÜçlGgÔuÀ±ÜXE¬3C¸ƒúÈ´›—ÂT™¥Ú}gß#sÿº]>¦½–$gŸÈ]»-ë3+êzqÇÇ`‡â2Á"ÒG¶GSÂo»šÿÇxéc³5./c´Â8Èã»ïCúôÁhäS»gZ )‡­&u|f`÷‚×n  òÀù²äMv›\ÓôKé4…SǾo¥lƒ7©òÔ+œGljßp)J&ƒôžWÿµÈK27&R|Oá¦j†OggS@‡ ›O!9g‡H/ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ2ÿ0ÿ/üSÅâãR*cm-óñä*Á±…ôãòÞî´úÂèC‡ÎôgÇã³~q¶¾/ ªàª›·íôåU½Í¢>ª?®%릶¼ YŠâê 1YÂÃÜh«ÆšCX\$q\*G6oWA¡!sjÕ|. c2Û(T%õQbÍÅÀbå)/»1Ãf V;á#^zB8È2ŸîïàêÜp·²´éþR›újˆ õã;€r¼Ý*z úá*öÂÃI=à 1Ýܱ^í•ö©Ç.”+Z}py>Dâ ¸„QXš0PAÒÁãF4 &‹0Ì>ù² ¢æ¦4ZÃ`”ô=xcz'"øs'`ÕÙ*³…yj¶¥Nû¾Ó€õº?® ʺÚE1Ä€l•6=‹ÔƒNüÀ’ÎÄžâp †ÊæÔôL Àrî´›dÌò"~óM#VÉ×,_HØY€}%i’5 ùØjštËÖú_ Í…ÐnþýÇq˜ªZßí‡y6xšL”Zß›² V «×9À'­,K‰+v‚V~tÒ°¯¨R`^¡ë§ç\´r(_ƒï¢1ý¯Ü[’¦{/ؤ%Meâ 5ü)ZˆŒþj{E<@ _êN~po¨èñ™S”úST¶5Ñ€?$iØ{Çë3ÉXG¹ùÅ¿æò!t

KÝ£ž‹Ž^ÒDª ]¾bÆ·Ð «Qëç6BbI‹R#Èë`ÂïQ†æw!ÑëWº»¡ËâYÙ øQ¶Ç%F^#ͯVJ~~œků¦á†ÄÄ”»ÃàQÅ–ç•~ÝXÍûó^1â);ñ 4d¼ÍàEà“Îð>Z(M#4à2ÑRy¦Ì´‰WØG#•¹RUž‚ þý¡8¸ë!5L¼çòÖôF„Øë‚ ^7a[9B©.ßä‚`Ù¢‰T.Äø‚$—ÚÒµïüB?)§ÈoZ½ó‹îÆV†Éc…"º+¡¾‹>˜q(øID V1VS};„*åþ$G‘$hŒkc%øf¼ý¹+B ˆÅ'Ý® ®¢“áDšË¶ë~x+ùk1åm”Ç!ýÖ*°-¡"1æ«‚ÏÍm´o_K]M÷[§ÞÇ3q€.©iÝ™Êì¥Aë7e =¨ø‹kC…T‘q°’ÔPù+;î70P‘—sÈJ³‡¯iƒ;4Èü^LGìª!«9ÖmŸû€˜çÅ~ÌÂúµ•X¯x_öY¤Ö«ü™Æ”ð•Ý) Ê0»Ogù{0ÍȬqJÍ–|² kÌÚ ?ö–]€·líêe»j«BÐýqøb)+ŠÕ]“0&Ìö×üÕm¾Ã÷qÀâo>ïÖÂ3»çªú ”‡!Ñ<·³¦ŸB_÷9h€^´¶/Eì÷Ìt›Z˜á‹·ÿ¿L©ÐPKDWšçuW ³5Þ'<×T笪ô™õ¢f*ý? .EOqén}v®¿²ÿç0U¯ËÑàf㼹Ŝ‘?KJÔ0»îcý¹n2Ÿ…Ó£~ú- ™Çk;ÁÒG玦ª&ùöVì´ªaÜíqJ-!¢fo˜aF¼ép?žË1{ÐÊç|½Oé蟥ÔÇcÏŠxùùì²X4ò`‡ÕÌd Ífýty¡‰ˆŽò7E¾ÙiR ?¦ÃóB:Ã×uíâÔ0fÈ… ©°'kòQÛcWv"0º¾ß_h‡Ž·ò—E£{+F]÷<„…ü3‘"³¶v;1Œ Fa€i•›:Qõ›z…úN¿L~·Y‘u Á|ÍuÊ¥<ÏLèÞ›–p•µµÅÌÓ7ñRGëÐØ®¬ÜE=¿ãp]þ¥Ž‘Ú7LEd.(¯+ØEŠ#Ø×è$w­F¸©[;eBJ!$½~tÏ1»Æ{`qBàaÅ$8Ò¯3ýc¾íîát ºÁlí¦4ÔÿÓE§ä›Rr¸Ó<²GÝ_ Ql%©1‘ÄpŒ½“#¹,éʃ¶à +§•ðPÔŽø!¾ê¬{ýZ ›ì G ÁÌÑV×͆·f`8çM}ñŠj“°ës´´‡–5ŽÒµž7À¿B*ÏY«ŠÇ龉 møZ Y- {?•U¿Sgi›ž%ÒzïÀq™É9ÊiüÁ­Ye¤ûܡԹ‡¦§íî¢îí¢ÌŽ,²døY½@p>˜M}´ô¹{:7fÂ’\s•-;n!ØœãÖÛ>Ó%8Ìvì|èoX¹ž2ðˆ?'щúÔŸ|²÷¾!(^ ?®¹(DZt<È^ˆ ¶5«ëŸkب-ÞeÎMûç›g3‹žÉ‘5I)€]ä–‰ÙC@\¬5r"& ¤w¬ØÚðŽ­~(ŸÓãÁÃéÉ['q¦ŸùMˆ¶FþÞÌÕ}1]ŒlòŠ1̸. U*§+³‘[SlƬ†Ïû™+h$Ø“ÄuIÄTu•âaxFH/÷ý<£2-WÐÇègr,J³™ÒþB¬]ׄe–¯ÞOÙ³ÌK<Äê»{-!–MxyŽ=™|õÕ£˜ë–+²{UEƒüŧï|€™Õ”û¤}r²ßžšÉ\]wãCs›èæJŒOŽ·*"ÞÍOÁÄhU3O¨p VcˆÛŒi±—¾A¹Öâ÷>s÷³,¤+e{žfbK æ(›hv}aèŸoºÜ ˜ò‰HyØE‰âJêÄ^f,R8É&*bz”¶v×1!€’$½f¨Û·³éSÆvI˜¡\¼€ë`# ÜÎ^ {0->Q$IÏÙ[°d‰ [ £¿‚…ƒåØŠcæ®}_FQašO?x4£`޲QLŽˆ~¯æB‘釖²qÃVž"¶x“>×eBK1Ç@ž8øòO¸òvQ?øYþÐ×XR÷uc9…s¾1&ʇ‚ÆîñatæO†ÖÁՈƒ¯¡»i]âÛfª“ÎÂvD Ii„üoi“Î…IŠ‹;á'4**¿Š8UFê$’ceXœ¢àj#íïcă¶–èw­v~":|WÁušh­ÙÃŒk‰§[š,›vý°U ut¸À `«‹l–wÆ)žÈ·d±Ë3ýs@tl*•fRýÄ×Fe–9¦›Ç‰(ãªx£é¯èè»àÝ–’ˆæ˜£Üj·· õ\ét»n¾ªDW¶ïHÁƒˆwŽ®ár­Ô†u,JUŒXLе¼Ž=¶¤Ä+Q x¢üig¤PÑtM±&¢¯ÃªJ]ÿÇÂåæè"ʱ1³_¥×ŸŒá×d²«ÃIÕéDÇ Û“—­r%CÄçüPÕ¼iâ‘`&®ßšðæÕå‘n-²¤ …Êþo‚îSÎvpŠ·]¬3/«ñ„HCüð.ñdש•&±ÑíHÃn¨«X“,­ áë·ŽÛŒ‡©l¹A$Âû~kù w”ÝYzÇ]:õwO¾ ®SKM¹+•OõÿаáQ÷n%%€3ƒj¢®!\Wg¶ùŒ°³@b…{âœä_åoÁ-°¬N]™$]2 z[Wj§386øª¢¼éô¥«¡Â¹Tß®r môð?  úI9žçSIÁð]¢W{(~K»}P9•[\®\Ÿš€‚E’ÜŠãå;%žà8ßH‹ÐðÊg$Ä…dI@;²äí>šþŽ•´Ø†¤Ã§á³¯‹ý}ÄL³˜•éá éóPùOýhúYÔ¸¢æºF8[Ò? àßU¾\ÂI°lA£aæwÈëq»Y—IÆv©p å“ú üð.&Œ}ârwò+rv yT|xŽ] _X2$²¬xÆÒÚu#’¨%Òˆ\^TÐÂQó¯W#‘·c¤Ø×M&Tc9•) —6´Ñ$Œ07Æ!ù1ðB‰hÞÛtÚ/éÜ?„óöÁˆÆôgÐig/OìIàTl©<‹"øŸÓÍ)©g­‘¯à¶MÝþäôÚ($Å Ä)“Š™ZLxf? E·ýQÃë%Û´»±ÝH6¨»¾o¶Pï]ž+„gÖ¾w²”kê\ÇóØ”»£$(Ú÷s‰Jomp{ñ!ǹpˆnž7LÈýÍ ý>ÚÞTSÅ:N¶û{AÓq¯{çrß¿`? ìdý"TÇ\tB!åã2+#sÖkrԀž´,ul6: üïáçIt”ণOëŸÇ¨¼B« ÏrŒºaªzßïùzøé®«ŠÕè~¼õÊo¼Ž±ý¬D6{¥Þ?³ †èíÊÇûå6Ña˜p| ´Tþ½Ÿ¯rþƒ¨†&Uùú›Òï…Sḛ̂ÄäBtÞ{`|,²€8 €+ÈÔš/W$Ô­è~ŠY ~`}•°G—(:û´ÎÀyÀã 6ø仇VôÿkÛÆ~¥5€…‰ãZê‘;yìÈ7(·éõ•“kžEž«Ð3­ý¬Ñg牃 O#ÿ÷éÅ–,hµ´Ø[¯Ï“­%±Åªî·’!ZE¹.õqd+$WÔkÈmtBÂi.3Èn©ù¸÷-ÒÛÆÜïžêjÉ+$¢w¹õÈËí¼ZOggS¸ ›O!:üÔÑÿ.ÿ-ÿ3ÿ1ÿ4ÿ7ÿ…ÿ1ÿ%ÿ(ÿ…ÿ?ÿ8üì‘G×F…`’ìXÊæ·¯ÐjbÒI@¨Z„¸ ]ÍImXÃx1ndŠMú¦©¢˜R ±HJÝ\µ"vPPOµa„6Qés?ÂO–J ø?¤ïA‰î®ODëÒj(GM¥\€s¨ÊàTý›:¬[H4 Ý]æ}÷ûj÷¶…—:Ý#MùÍr[iÄz³/v˜™_­Xikƾ•ݦV(Ô‡+PÞ!Æ2] …D·Žû÷ÖNʃ76àg4'‹}‘74®JvPv¼àG­cfäßÐÅÀuš<ʵ‰,·pÏþ¯ÅÿHX£ÇèÚsŽöò«pà†À=™0‰Äñ¡ñÆ.wÝ#Gu$ 23º<‚ð(Áý­TÆoz÷ÈNDÂê üð.&¦½d–o%¿¢w_::ÙF× Àý3Óò¹šíê@l¹ƒØiY¡FkyŽ~É5þG=Cò,'˜;S"ƒGÅñ߯'v:cëíc"-²ñ8ƒ‚ -ª/Õ"cÁéɨÛdÅ)m€%·: “Øw,¦Ý£+iY>ŽÿéëªÒ)yk€/‰Q;™(ý‘§¼Æ²­¢ N„©äNäˆä]•ÛùRkSó57¥j+ð*áÎ"vRFÃGãVéâHÈb±›ÐÅ(¢8èy‚}«üx|ü¯Èl*øšJ Lä\ë¤â _%S¡Fâê±Llo±©ŒI™¼)9šÃŠ„Çný怉 ½¯j Ž]«µr'žŸ]yiEÂÆ0’b¬"*Ô­¢l,|uⱺ üð.Báq‹+CCOë_; «U?H2ÑxXót!Nü.þôþ çè·Uu£ ¹mì·˜1ø‰R ÷MM6Ï»FáWÌ6¡&ðùé­ G;µK‰5Ø Â™8@ç—P~д™½83/^=þ  dšEB@ëÙPA×.“T@»gŽŽ¸€ß\dš’}"ãÕ ok æ»\“¦¢Ï"JŽýÅÅ{¨îæ›§ žýöjY“£6}êtê[M,ñF|.ÛáØÝ¢½±^üwp«‚¾Êîµ_s±+ƒ¡É3¡ùÑ1&FÞz¬¨ÿÉÖf~Þ±,Ži?°PuÕÙ/äa‹ºH~gíì¾Ø¥rÓìØ,)ñi±ŒCq*AæzãA=ƒœâ?'uöÏ÷iÁÝáìB¤NZüìœF’_Œ^ã6gö·\ÔÊœŽ÷wY½{»Ðm]d“PcڌڱƒU€iG Z™ð]À'|µjV±tŸYÀ- &þ)0.ò ÒFó$lOþ]:DÕ]Fg¦CJ_l(’ºh¬·ÏSþÄRµ*m³’±Ê.Æõ)´îœÛ¯êS®úÓá² (ŽÓ'” êËI ‹’yôCfÂ!êp”Z¹îEÓ½IÑC“†.==OÃõÝ#'O–~´•YÉWT†³uŒìÌ!6áieÚ²b¯qÈk¤ Û]Ã%âü§’‰x²ZÙdšjÊ*ð]%Qjõ’ðf´ë†§TwEsfÍd[êwÐRª´“ÑC¿x” >=_‚[ÁqþHïòEæ™ö‹ƒª üïÝ#¬¾6:Z†vOªob·˜NñfóŠ.ÕqæÞó±& ^8VKHÊ麥6…HuâDÞל‰üOÆX݉[ŒÇFm3^°¶©DJñqô"i-Iü§~äú2ÒûPŠÞ¾³º •q‘«È›•ó>>Ìõ÷u:’.wo8½îx»Åh¤h`Ó#Í\WDÖ‰ÀyacfÌLœµr?%Øg‰æ¥MÇÕ—"Šv]½<§/“.3È… _ÈrQûzèQü,ί­Òóó„PNKÏ>æt ;iî8À.×èÕ•s"¼,‹xI¢;,òÚgcÍWñQ+Ÿ>щ?ãáWÄXUŒ´ €4èá¦N¬3d•¬®j‘êLaäá[<;è;Ÿ6©è|7O•*EFt´!`0œ©`‘â€C#ËŸM¨¼Ó§s€ ²g䈀ÙðV0¸@î±N«½›b%m|NµírùC*²{0­¤ÎLÌN¤ïr`b¿óEÝê‰7ƒbÔw…»-ØÎÓ[Û\LÍ®üÁá©nž/VßàááÚ¯„Åfâ6ÆbWól Dï?"#[ŽvÊ‚Ff`õµâæbLÜF8O¨O³íÝdòXlbµ«eYöý<è½[ÈVâœK‚¦°¹˜8òbþ $<Ú=,±¶Ë§'››8GM¹ÈE” ïéàÛж+‰ÌŽP×§,ÓÎ7üÈÒ bºJ<ê”EÖ4ñ®å}”@°JEevo’:opŽÖs|Ùº·#[‘΄9oßú®˜cÅè$ZK Ös} WGqÂOÈ@}w$Ó½Žl™,”åcU{Á!«Æ8Që ÉZMȵI­Ï³Mû< zE§f|ì%?(?ÐŽ´`0IùÖ›€Dk‰žÆ€ÂÕ]Ûèiä‚+âã )I®üþ Þ{¿›Qrâ>OŠYÿدäÂqÇz“[×ûOy¸±“ïø«šÒ¨¿Ìàç*TU˜p|†¶Úæ2î;¬†Ì´³èH…oâªvm‚QFG ¼¹z!c86ˆ, Ñ‚œÞqDÓSùJ^üzØídÉ|EQÒ*·â¥¢Ó*üiÿ`éQïq„Ý_f.>hYxÏ´f:åù ŸsN2 ó Lcº·zÔ®wwhxfF›±hk#0¾çÁ¥7§°Iy”‡›õA`G{{Éu RmKË™õ@Øò‡dú{KY볺‘Ez„w€Pˆë¤ËŸqcŠ• Ðh6v­iüÒÐç]*!–`HÃR).ÇI¨ÖâIM*Á“ »ÈWF“üìW°êo”Öó?—ì®CBÊžŸˆúv1 Ý!Cmi¦ôTTšçGyE,ËT”cºz0!ºIŽáÔþ¦™Üqî`ÝÛ*{¦Ðæ0ŸÐ`ïû»u:X›þ>%k†Û3ÐãÊ"¦£@¬|„M‡ÀÎD]XÑœTgd¶ˆ 4š¡é‰7è<èl7UÃ3­ÆW0T^à.B<=pdÚÓ{Ê•ÆPŒ"&·ÐʵÅÓï´é)NÑ$ZÔ—œ€FjbOÃCãÞÏÊ·óù¸ië÷[Ø´|#aÆE€a?RÌÅYuVކIõD=Žm.Ú„5žn0åË3†UXÒÔN‡eŒ”M›H &GÌ5~‹þ‘½€¾ ~¶3€»,ªÚ üÚ”€Ðì×Ö‚§z"ëî@aä$ß÷`‘ðߎiÔ"aKò9â÷/fb<¼ÈÈb¤)Üq‹‡yìË^orÔì¶´fTTÜGnuj>m¯˜õ¹Ÿ®µ31^ýà–nKf‡ñÞ:ŒØ§@9uX{&ŽÇ–ÁßXüñƒ‚µÉ¥*°¡fx#ं÷ù ¦”[„õdÎÃ$,-Fs8c„Œ~„ ÕwI®Ÿð@Å¢›x iò{µP:¡ynÅþ;| FÖý/“;0 'bçUò쥎›_†½DšMbƒó'F‰)EVÉ»Pwc¶ ûKƨÕ"R_i+-NAõ>£û.EßjfA€¡Þˆð|ܶœèþ/»&æ]ÿR 3¶Žòx«“èçZ—vÏÊLäB³‡dÔýFÃ@Hè/E?Å£ûBí¦<GÆå±.?(˶á‰?Y•ã[¼…Û'ÇG°„¾aE3Õb££×Ø^IÏ gôl* fŽìüm±|ŸM²·3x+ü×B×âcÆ»Õ@AQQÔ÷§™º·‚NèÜg—"¥×~ºä÷¡¨jù欉gaü"lÍÞéç? “kvWrØ¡4Ú'µƒrm¯ËÅÅü'ôôÛÇP¶lˆ"l™±òj…T ®?§Å&,.-ÆŒÕRé2ŒpxBg#a1^8©ÔBúý„T'LPeß²øCB¥{zí Ñ«¯ ‹xÙ­%˜+šËåñ ­YÅÑ¡;¼í O½Í1OJ¡ê/¢3Òõl9,`»ˆo™2óS+z1€Ü!À›zª˜Ï,A{ÿ\S[Ê~×OjÿK™[uÐÔX܆TS­›¶£Yoë¾»)^ËkOggS€ì ›O!;PŒŒÓÿ7ÿ8ÿ7ÿ8ÿ4ÿ2ÿ/ÿ%ÿ'ÿ/ÿ1ÿ-ÿ1ÿ2ü×C+Ó=U”1ƒ_ÿzTZ&Jû2\VÁ2.õ­¼¶/½ v=˜oïBGɹ;1öæ#ÎT·Z¼ç/´ 6–8I›{Ú–ªÆ«Ð¥Y·ÍïpÿòÖ v3X%µfqðiX›´¤Ya¦ë©›Ãr×ßäzúLdgÇBÆMS¢×¦m\‹@‰Wdì|ÑÖ­né#1Cb …Ѩ-#üŸÎþ–2§ ‰Éiß7Ç«hã"šÊ.Œµc¹õgŒ@™iê ¥+[7:ÉWï±þøƒsSu{ëkÊmÁ=0Q…7 7)ñ’æ_.µˆúE\2i<ì]Ó{:±¼ÉÙ’ÞQ¡’ÌÚ÷¯`]ýާ`ƒØäO=ô£ŽQ¦6f£,×HØo¶„-È·/kü×BÖ(4vI ;ܼ á”Õ1ÇüMµ­Êúùeùû'‹f¹An1¼²ËJ¿>‘3øÕ§î# N€ry‚Üɦz ®ê¬™T D¥ü%šZEU›[6 ¢‚w#÷sëÉ*q Þ EòD ÀS1Ý€û'T÷ÚŸj ½ % HÜÔ ìf.»lJQ#F mõ*”HÚ™ùø‘%y¤DÓøÈ%dô‘0–ÏÕ~(W>k§6ø©·~SEqõSþ úbãÉk1Ü ÷¡áì§$‰c)üLrº¿BYûp¥j—z­§&ŸÔT‡WùiaÑî0Ó—Bãk˜PH)–ñ·y²õêîjAlò……ñÒìÙÍHŠ‘Îà‘†¤›3õ/€S†ô.ñ[S@‘™'ã9£9Ç…ro¹NOGçÈíy€°Ö˜¨žãžºôžI›ïœ)É,Úï*‡Û=2U"Wö…æœ{`]cºð“üÚ܉{$ŽÛBÝH}WºÙ~+|Ð…(ÍNj³dÆa ò”yÁaóUëõXD¬™@e2”•ƒ³3Ô‚Œ ê)UUçñ…«Ý¨}¶3êwÚíåmMÖš"´¥wW£&­}Su•ˆü ÁWÑR ¹&W@Œ*vøþO=Iu ©¼äòÐ0#S+…¶ãÛà‡©I+B· Ö(¦EÝé6ÐÉζÑUg[¸ÒXFcuwRî—¼íOõ¬ýÛR 2UÝWœÞhî*Jï{b>»ä7­éÆÜµq–ÖRVëX5A­Ãsî¸þ]B6 …ÊS-±ùÅ´ûÊk|P²å“&õºVÒã=*9©½Õ3GêÂ']Ww¿ZmµCK,»Æÿ‘bÚ©ØÚðç{%¾¨ü×DˆwÉDMàm ¹h— *ÍOÅ}p¾Ç«juÍõ Ê!ÆRÌ”ÎV·ñƒï8:Ì(Ô•ZVüŠ*Ô±1¢€3áòƒ7Úp…üÚˆ¥lÚ~àãp<»°Àâ‹xS¨3Ïiä£u;ý*–èdìq•-Tn›¥ßW+¶÷«§­å ü0ûx‘lÁû”¤/eYé7TiGl h˶1_ÿÀË^ /ªóï%˜P@õ3ðjqýÆü—ß2/ª­iš"þ[ÌG€nIçüt¿ZŸpÚ4¶;Ÿh®d/€³’žç=´#y%¿ôÖ†qÔÕ¹p™¯š@„#™­M ú%ð¹R›šÓ‚ék¢yÊ\Ä2Šã1–/ÛцG( ®y “CdÏYÊ_ÖúêîB‡8Ûü×BדÑÔÔcê¥Þò¾˜pq[v,DžÎS0Q—ú»ªÈmø‰9¥C;ÏqþâšVžêÙ\KŒåÌÑ‹Cc­ÜžÉ„=†¢ðé —’Ä,ËÛÆW=ß“Àò¤yÈé%n¿Íûéãº~j¥yÆC" ßs H—X¤>ó±©à‡µ§(”U¾BJæ¨ð'döT÷ZÜc[Vô\‚ù”‹„óe39þ(2_è¨/Þtó×-¢œp…âcïâ¹.§7Ãá7£«cw¥P®&ìàÃÔ§ûI5À:K»QàVÐh׺}\#+–½×ñÒröÙÛ–)IR ~,kÚ(Ͳ•¯ÏZŽëK3}Ûß ÿaꢦ ’u›Fr Ñ4B­Ãž]‚[UN²i¾#\‰+ü×B¥D‘£6­y†%?WÀœ`•sÛ×Ï’X;ã>UIœ¥Îavµ D‡ÎWê* `C_~ê*;é'½¶ŠT=Ç‘Åy¢}ÕG2Øáqmä­Ø-nöe-FÆ "›{½Án+Óô ;‡BÉßtÈ}•r¢B­Åè'UÚý«4ݼ¸_‹ªg7Ë'«åŒ¼ƒÜT1rÝm­BÒ’u½š¾µ½*æž^¨ý”©Âåÿ£×KŠ5Œ“ŠBûy‚üÚVޤÚ;L8s$Ʋ켞XîÓFUp%ƒ 4c¨ù'C­¾å%YI˜æVì´³ç9J–И1¢ôxºQ™Â´Œ&=xë%Ó«cézïÄ [‡‘µ2?—Y ꋦèFËûoU»Kñ̓ôž3ûØœÂÅjüÕZŸ'y(BïïæºšîÓ$*˽;kÔ(šQáŒÅ‘*ÅÞ“r0ä#’„ %Ü“MvSÞVUÊ!(§4r9šPÂ9„|EÆààÝŽ­97]T,Z!0f¸‚´Ñ`ºç z÷ÐP®ƒù—Pµ[„´¥'_oPA†NeÖb%þÇí ÀwVšÖÀ#km0C8÷c‘^¬»K!SŸE»€˜9«Ô¼ÔÑx¥’ÍB"ØòG`ÆX uj¤ÒIå£ñá-¬ž$ÅÖxf ;'¬:hÈþXênRa%XÝêåñÉ#¥]™wÎ6“ü×CTm£ÿ¨I÷!¥[¼ÌSþrc¶Ç­iêÄ.„†édX6Û® oa˜¬É¬ÀÓm’ˆ8= .x‹D3ÛlÁ,±z ª1âÎÇ‘´Â¢ªÙˆf©&&M—º)61†/xTÄ`C3²V^dÕâf®Vä^†0ê¡Uè@¾¾âi-xVÌ\j:­ío®æžorZý‹?ƒï˧µL¿2˜Á›93æ·²‹çM*wu¬Zp³Ý­¦Ê¤p¯i%ëO\‰Z¬í‹t›§îñ)úO~O*¦÷⇔66ÀLÙ'lÒƒ«£¼²TTr ]í~EüWüd– Õò7²Dø¿±øÅI¬¯L”†«ÇUõ¿7\›6ô]bß“ü×CVãH¶C‘ÚNÄÅùlŸ`q € âà3YêòÍCwoíX.<Í”J!m ’J7(—Rjð„]q  öµT»>·ÛƆ³ñ>plÇÞLfì‰söCÔðAÜ*/ ³Çx˜©Á?[¹áü’YTÑ)Z±kÀ}tm%=s §¸ŒrÊÖ(Ñ/( ¦ñ¥¾¯V¤ZI]ÐÆ· ç9Ù"G½?G»Zút+ @aÉ›Î} @Ø2-/†}œèJRMêÖã?àþXæˆC3œþƒ/ŒZú!¸"ƒš6ôˆé É]¥ˆç¿´”†ROߦÙÓWUä™}àO˜Š””½7 ŃX×ïÿ:ç}ÛÅÇÃ9EDD ÖŽ9¥:iû®vĽΠF¸ãÜVËHÚü×CKGIS~Ô¶Ö:Zˆ%ÜE/û§½h~nE÷ঠ—u”¸UóÊ7a@Þ5ˆ 0·ªX’¦£ª1c†Ô™ÍµÆê< ŠN4Î¥Ñ|W0Q ݤê@«%A.Ö>ÒÚí/Žix-¨H©…™¿J3&Ùü¼ÓÌznÇ Ñx´ÝŸˆõ®8Ü’÷ '…±%Ž¡Íû…ü”r«whÉÙyتjƒK™¡·vØßx²€’4r3úÍ¥iÁ€ÿGfœXZ åsiµ„H-- â¯0W$Qi/ˆeíÜü>ŸÞ=6r‹9eÉ›{Á“fþbÔøI™[è.ZP:Q3ú‰@Èã ©µ5v’‡!³wsH\dÙ“t rö_Œ½(9³Wör@{r°iÚU¾…7ªü×CLâËñò4„ÀQöœF!ºbgM-„¦2ódÚ:¥TÚý$>]¶,m ?F{Œ^·ä¯Îb^“ëiœCQø‚K|×SîÐu—ÐòÇ¢}ËYB™ÁÚèœ^="·¦9ç‰U­òëzÝJÊu›NÈdN ¹ n—ôŽ]]c5À™ÃÕ1ó EOŒÆ^~2Ó‘»ÚâôkÙ,˜§"Y²“:Û›Ói²å¬1|Hõ†CC”‡ý÷lëöJЧò¬'Šùÿ\ãr×­Æe\ç ÄNºHË™l7 7І—ûXk\,ÖŸ>Wb)†Ñ «?AiɸÙ¬ìÌb~V3C™’äÿ]*<#¾#êð oD_! °ïi„këèÅÔÛªçdQ–Ô¥â¸÷üÚÜŠú¢Å 2Õ”åê[ã“"Ù*§£4êÁšJ›v#rÑ›.Q: j²L_„òeûgîRÞÔh…g<Þ\oño|8É겋'¯7˜/(æþnˆM@Á•yKÖ¢þç íÓÀE’;} ‚yõ ´âW©ŒQΜªB œ\}Íîp²ù.Ç5¬ÞØ aᥱ夵Ðê/U[„=MAN$©ù=‘“Ìpê‰éØ–b”zP‚‚~‡‹¡£l¤ƒÇ£~3Ó`r}ÿž°ªó𤛔_ŒºžëÚ‹hSߟ-Bf{ îúò›ÀÇ_9“¾ˆ™Æ&7½y&Ú„çð§dez×S7ZeZU%1uùw-& âb¥Xªÿø»Öí*†a'£t\Ü hæìHúèï½¢ö…òü×çm»ˆ_DÁ¹ò£0Üæ #ž-Ñ¥#]ö ?Ϭ$”=-›}Ž.«ÓÑÝéd?³‘%"i9ú‘—¿]*™1J š)~ š:‡ê8òX·ž,Úæž~»ÈX„Ù„·0É$ƒ;cÀ\Q©ëI—Ýw1uÒár‹õG’OA”‹9½ÿð‘aÝKƆŽâ]VR¦«¦³¼!> í0ŠöT‡}°ÐsXWF[Ñßâ0ÅVשrQÅš«;LwjXxÍWêüèE5³#_6!®¤hè9Ø.o|žòT•¢î\ž /iiå° Ã|q×ÚUÒÄ|ˆáÀ£8…‚šÛ¥=Œ¾7§ÐJ3ho Êcqk8*"TA dèÎÐùS,:rÂRŽ@Þ8Ã߀uƒOggS! ›O!<Æ_ ¨ÿ8ÿ6ÿ7ÿ5ÿ3ÿ,ÿ(ÿ6ÿ,ÿ(ÿ.ÿ,ÿ-ÿ3ü×CL‹$‰îÍpUMÚcž¾~&¼d6‡q ÄQDO·d  †MÇ™`;ü`.Å#;kØK-©îTì­³7âC!3²¤˜fÒR'°¦OUM{™¥aBIÁŸ|ä/èçVríÝiM§³fëߪ܈öAЧ÷­×Ýtƒ_Uü1¯õNPzQYm¶|¦ã„~h'æø¨?cPò wPk9Á&hà·È ‡V-# ¸´ÉöØô»ä©çWšÖë¨t\‰=ã(°gB¼Š¥'Ä”ƒÎzg%H6 t‹÷Û¨· * ¯š”óÃ-†Û ¬3à` ŒØdüDkltÐñ*¯ë§ï=k£Àu)0Øj>øk¶ñ‰ZÀ¬|½d» Lÿ//<$Ór3»Êû¡,²Fg£ü×Dj5µ†FÌ«ÿµ‡EÊ™ŸU5´îY¹»Ë¢Œ,ÿ Œ/â‘RoI2t";½¸~R…ú>ÇÁâ­KQ“›Žã—ÊÙןÆ×/X¡´MûS@Âtß°‰;}6nL&Ÿš2¡ƒJ6«zñçlSg)˜¸‚!<4‚Ø¢ Ý^Æ>Ñø¶­¢ ;l»aÿ£C%¹£¹§³ôŠÏ!}'<sT©”í“ËžT‚k7#’Þ¸9ÊG½¥XÏÞ/Ãg·Æž §|L€iG/²µÕöRÊ‚BƒM›íZçžË‹/\]šæ6!ƒ¾³„¬æ(ŸyÑ”" ¿‚ŽáŽò·å±‚Æ¢¹H:TblKúm‘‡b”æÛ•ýû5iµaý¾2«¥F‡Å3ü×F÷¢WñžJÄÞò½™¢Ù@íï€Õô˜(LJ&¯šUwõ/—× ¬ÚÁ 3r$ÐÑ{'~V  î¾,É`VrÎ ëìÀ— ¼_Øi9 “•óüƒ"9Ðy òidG»Ú®hoC;Ê@þÏ ]Ê+Yɹy’¿0®– ¬U˾lþôÉlÅ‚®¯œ½] ¼·áæÉþ¸­*ý±¹êù0þw)è“!„¯¯@½$w†L¢Â9ÁÇ-Ë­ã ùYÿz’q«À«g¯,ByaÊÒ™ ûEn½­ç¬1…7Ý‘Ô($ö,EÏìP‡:Ø¡¸P2s$®{Úkz¼~&ͦï}›n–™Iöß<]atQÄ0Äÿï’Hþw²/˺«m ôR¥`êõ m 2“ó#¼7ìGªüÚ” K€V‚²šª¬ ¾úØSù§ô¶Xž^iD{q;U}«1\0£û×ÅEµ¢ƒe»ª‘õç7Þº›†{¸¦)ÐmÕÙé”çüX6Â÷0®Ê²ÕåˆS O¸¾5<’G8 û6TU/B«Bއñ€w¡{Næ®EQÒìA¼À;¨ùó—ì½Ö†ßóÛ*j…*tô?vŽ(”ÞbRBm¿&,Ñc‹° Ù×F÷Ÿ´xëòLÁ¯ª:"¶GªûG–74–*ßá„2Ò†?Õ;°Ù8~(àÄ“ÅÒ³˜ØøÔaÀm$?n}RÃc!e,MwšÈ¶Ô„¼$K<ÁOð·z_\ÿFÞÖƒMå‡Õbû/ÏÂU”=ǽ™7â=dBDƒ»{ÏÊRðLõv¤ÌÔ¶.­ˆ_&'¶[z4f2üïÂézvD“Ñ%þ°»ÑwÕ¼Yz ˜#Ã0*–)‹Ã«¼Ëü­j·L6¸&¹(xâ™ÈõQAàHÄU­ñd5ÞôÆ`J«ù ]߬æE¹:]«éŽÂôóø¥hÀÑ›÷=E Ñm]Ò1GÍn àæ®íLÏȼo*ñ £€†1QyÙv’zºÂßÓÅça=Sö ügþ 刱ˆŽõÖô_¶ÁiÇ̯–¢½ƒÂñÁ™=Å,çÒ yøšÔþUq帒ŠãçØ¡P€<-ò(,„Ô0S–%¼{–JýÌBsf\þ÷æ˜HZÜ„/˜ ¿4_õðž-΀›pçÏ•\bÖ;¦/Qí(Шý†2e8ó$aá,¢”Übÿº?b¸~Q¤¤qòâS1Þé–ñ©Mmö ä”kÎvVF¸å‹‘D+Gn8QëÂQ—¼­Ö*€ZïÐoßMÎA—E‡‘‚Á5O|]ð˜àJé´tyè)Åĺý®l¾¸²çÇæ¿9Î]h(ÿ§U*Í6ÏD­¨N¿6§ˆÉŠ~Á<¹ᢽï Œ‚Ò/Vm ‹âÐ2šµÕËü²süð. <ÜC–F÷¸ ¡ƒ/iÖvtês= ê„‹qÉ:Dðb|ŸŸ¹^-/Ñ$?Óg$v% ´Ç²DÃdýbƒË½¬ÎP“¬Æô·M-‹W!dš°Í]U— ·+°ô•Èg†Y°ãky=p·5ô>sÊg€Õ÷–—1j4ÄêggøÌęȥ¿‰‚··I ÀE±gX‘´ŸáfÝ8².â±{Ò–1½ûŽ• .:’ Áê’¶lcÑøÈ÷¾Œ95€,ìU²Œ‘ÒZ(ÐBx?<è™Ê0ïË)Zo>ÉF"><{ÒÚñ.iˆ¶.ê‚Æóß²è=W&ì0^V O¯/b)K¼e.rÂ[‰÷Û›bµh"蔬GÃnã‚þîÿ Nèš üì—Ï+§õ´AÁ¢þ#GEÓŠtÀ?£8t¥‡=m§ó"Rgã Jö|"­OäjÞÝguÃm~¤kæþ@}=å}*—ßÀ¡&,ƒ} ü¼¤À£ÛT£¨'áÙ¯~6ß8ú…Ш…Ê{œXsÞùâÈk°nl¶\6¥Ó.4F²{wI#º»óÛdÖ¤ÞÜzŸGD»µÎ3šçݶ”&tÄP/­ºêUoäË»R¥È+°eÁ¢Fúö³ ¢!,÷ha¶K­+_Û°ÐN#ÐÇÃÀ_–௞<¼OÜ4@ƒ|:.î$¶ô\{ºëeœ”Vf·‰³~ØØ‚ý(’”­kÎ8—z_5„I0D¸q^ltzZú“VÚû«<«¸»iºä?í@ üì˜x€±ÄJ978…4X”êQ³¦¢kÀê=ê^Ú’ÓÜkÊ8ãos°q8¡9»vtÑY¤öŸ°ýl¥™³~e¡óÄæ;\ù7jxbzŒW¢žu=öøŠ>Ÿæ;'© ÎÉɨg‹ 'lLñ6¯ ¼xgÛœé[b¼ºùPËÇd‰K„BÂ’kS¯²—¦nRª‚áf ¤0oYÅ}ïëwv¼*o˜[,õˆ¦þ*Èý-rõuœþ0„`$@´…kVJ£Ôw#Fò]þ‡_0Z..ë×rë ›?“„©pß!²_ÞN'”Q¯¢™ma·Y²ðK¶Gú üïç·Ù=í&(nƒ×Õœ?’ ´J‹e¼ÑÉãràœ×ö.mš¢]$ÌhmoÒ©—OÙË'À_áŽq€ P÷¥ùæ’î"¡HIâ@rñ±7N€h «æ…Ń~­¬¢½“–N•**ù7ry£ûEš£4õÿLßg±£t¥T/«µÚhÖ3@W… z‘=É"¬XÞ³ªÞO‡jh=“ ,ÌâK_n˜¨£[—âQî/â™Nf á>â‘s‰1c¢I¼TA€Ñù¦‹1ê)º^ØGN/¥ÂoAÏ £æÛ…¸FRIQ!줟^¢–   #¤ `É}ãßÙ@,OXÇÐÿ+¡hÂ7aQ„„˜wÒ@$…wz~Tß\Ý·{B†$ª=G»pj¼VщŒ ü쌟:$sŽ šjJ&O]|c» M4wµ P®?˘¯X+3rS~R?á–?åv w á‡.á¶b-KwÏ='‡;]G*e‹!ý˜CÇ äžNÈ”¼]ÞèYÊ&Fðï€Péÿô•‰’'(y.š¹‰?ÀÆ8¤’ ¦D¢_!­O¤¯jô“#"Ö“ä¡·ÊúÍPçm³&’¶a3·x},ÀèùÜ(ì”rº|„ˆ?;Ý(øJ ÿašã4¨Ÿ3WSd.¤:ùçb|¬Žo]säÌ}ÿ!FYuóp^rPä†Êѯ‘˧ý3ž.TÂô.×óˆž šs¥b~0&!üeã‚€PYøˆ¿ºq}¿¹5Û:ׄšÇ6ˆB%Û‰¦pÜÚ/Á üìŠÖ±•" _´¹Vd¡ú¶—÷Xyg¢#ÂnsJ=cçF·. ùrpÝdö©ÏÕ/©U†ðÎT¢©7À—Ñ!©bç$€+â:sÆ´Ó/–~ÉcòºH¿îS%ô‰XÇŠµÞiÿçbLßJ5ÊtÒ[¿r.Q!$ëV/ÞF …«CÎÜuF0@b®x²?XsÑî·÷§NJÿ”ÃU4FÔoûF{€M¶‘@„=°óµîR‚F3~ð E¿Ë€ñO-<×ñåtÝ· &48ÿpmâ‘õa£ =d0¤ä†9;ö®r—â+ÀÎôt®uw'Íäíƒ+yƒÊ΃‘ÃPÎb3+"å÷ÑgÄraÙ—%J»Ç4Œ÷?Ã[9½?ߪŽÖ¤ Ný¯Vó™³›ž£|mÎÓÝó7¦j†é©’; ùw¥Ë¯ð\xÝ6¾_ìklûuF™Z üïÜ=#Ÿ0À¬ñð¯ ì£í\À8:Ä"(ÅÈ9ïŒ1wüp¾]GŽ*¸Bšé-…Ø£†™Æàb0yoÎö ¢’ÊÆ^?‹Qëòbï+sJÒèªÎâg%Ú¤#Ç»T’Ó5\²ð 5QÕkOßaÐ?s~ûf-Ðâ2Lc\ÞDÏ0iNÅȜҘÇÒ2tw>uzãq§‡¶y ޶ÍÁåÉ…ª'm»ÝIõ¸ïµ\ h(pâƒß™CÉS%Û |µ¿öAÀ Qå˜ítV о«ìâ~ –dã§® a¢@fjb{æfòŠDB¡é^›Ó7‰9ˆÄÚ•¢öZº‡ÿ}ÙŠ0Ãàô­’Z1Buü2¸+¤:ú`¸üë|ö¾Ó¬7żõØpÂýMÖy\ø ª¼êõ¾.ÿ#~÷1 ®PÞú‡±UÜ7žãi[A&N•È ²Ò³ˆ‰‹;RmPƒUï%­]¶Ì‹”û³õZù°Q¤Ð‘´³lêBˆr…¢ÜÌ–hŸ?£®¤›Oxÿ‚•cˆÝj$P'g#×Ðp¸&Héx`kÁU‘O´ü=ÿõŽ»PŸïŠç²,ÜŽï§"˲ù.äÊ}¸Á]T…„m£b e>é±è„6Ö§ Ü”o•#Op­ $¨…ÕÕÍŒ§§ßñob•NŠ·4/<÷Ñ.\¤´¹¸8 vÜÎ 7S蜱’¿!®óô2¡"›` g—žñ0ɚ̒OåÿߤY~‚ý›´ üð.&dmŠŒUü±±¯\=!Ü {Ì}tìQÔì|õË@gŽeóxG>Ó 5Yªâƒp3— Éëv±|ÖÒü½@é±ÿöÙÉUè’k^<×ûò-@ùcƒf:Ÿô’¼’¾?£ç+]³/’( ’ƦO[é£öå0±¢Í­ż»C–âgƒX-äfR¡.=×ZbÌÆv€ÜÜZ4´¢·¨–?«ö ¸uá— xŽ­ B˜Éeåø‹Õûº£‰ÇK7m³1:¥ËêGÓÜ9&#?!ƒ¦Wkˆ7~~0G ¹‡T¼­ ñ·OŸ#;V\2*²™Àp »p‚‡¦Lòï–v‚™š•ØêÏã‡+i#zÏ«†‡ý˜ üì™’{(eŠïîEÅeä~Z7:e,Å)4᥀P÷‰žkÒöøx¶Á>ò ©Ž&ŽO¢±¨2<¹ÁÉc”L'LÎÿ–hgN÷—„usˆ‰Çñ9žìÖ&tȲôC-[ã—…S³*þ yª^o䵞& Æ—»¾v^ÆkhоL–€%œÛ…µxÛöuþ&?tƒ8“™‚|[Kv× *v¥êy?ŒXQÔ5R¥ÕãW2šÁª‚'ÿ¢ßËL.ÂÃYÁ¤¦.Ì“>ÏëÛG++w¤EÉn&í ˜XX~Ž¿ÒŠ˜ezü_Ñþýb¥”oDšt/])‚÷3@͇4zøùuû”FÌ?Ï£ª» bn¯_™ª)Mð‚€N˜½Ð= ( üìWúžžPœ ‘ Ö[tL< ²ùâßž¢º†µñº—U ’ÚA”jñ˜jV‘R&—ë7CvMlR<”.³Î!&”¯½~< (7)p³ñe5W[Ú(1Î%çõjq½nüž©B|¨bÕYŽ '½Æ©þQÙ’fÚÀ[ÝÔÛú) ÀK¼õ \§½²Þðܨž}à3ÁƒËоxø,%hèžS,~·!$ÞÃ颋ƒ*ئË3"“^^¯†AÇ|ªšÀªYšt=ÐüX!VKÐ]tᎨ1¿âòr\Þ]çm<#‹£ñ&uµ@l"ûV ·Úðxá9¬óñò“¯ú©~½%ÕrÐPàE¿·àm¡ÙõÙoï ’ÊŽe¡œ w4¾ÚüðRCrAZññ¬’¨· Ó¨fD…î=µ%[ò¶7¦Hs{Ó Pî„°˜"ð,Þ=e4¤ ïÀ3r†ó_슼¨c<}Ž{ÿ}¥2Æ1k^ð‹¼²Ô¼(Ò3ôãÍâ(¹ýYPÉ÷Øø¡3iR憅Ü@å×Ùø{ <´=x ‘½J9~ÓZ€ÝܙĔð˜SY¶‰îã'fƒˆך´Š‚u˜Ý뵬Ѱ{QZ¯ä‡1…åãPœÖân[I(ø%£&ƒÎ%EÖ ¬åTcbñ/ãíë΀oümœY”t{˜Ô“PóÀ…"Ë‹î·'9à3>ã9ÄàŽ…½à^ªmp˜,Ýn‡jœ§Ir.q8•$„„# mUÿhNéŠÄö®¢OòÔebˆ•½zÜ“¨‚v‹âHéõû_1ÿ(¬¢ðl"õ8-P®Ò±èÀ.,_‹ª3Õ®Ç×áV¾Åþˆ&“?M›BT¸íhqØ~‘¬0®úã0—JÔÏÔîõ¨;Së¥ò âÖc ÕÃT4/Î6uÌÝ^…ì,OÆšŠ>Ú üðRC–$8ä0”Ñ0˜­ß¢åƒÑGÂåuÔwÑlf²4v¼i§‚R¹ëœBP8×/y>o"êB–ҲžN,+½……²µ p:³Gr9𤨸F>ëzcI_5¨öVta¦ÝȽ(~‘Å1ïx”ÑCÜ¢vûqÝWWUØÁ¨Ç–‡k©ÍXØ~j0bOÊ“ö¸ŒœýsP€&;êË´o¸¦fùåR°ÿ¿ ‰ôLH„\˜êÚÔ˜-à5ä À\esä‹Kóà(§6“Ô74G¬>Åy4H à6&Eøá‰}ñ%.KsL¦\½½÷ô®JÒÅÓ®.΄xÜdp!¿?¹SìÅû Ñîä8S« 'FðŠ&I[üî‘„t8Y-ûÊ üì6ôN(°íïæs*”§öQÁ[âܺep¨ª@v÷´Û^|rÇ Ä'šÊ¾“ΠùkkG}3r x:Ðì ·3$è  „uŽwŸ¹#ŠR |´šq€Ãl®*ö¡‹&:9M¦” ¡(q‚;TD9ޮʡ<Ü”‡nzÓ.móóÓ—Ñ;¡†§|…²æzú¥á´O×[£?K§}§Ãå>½äƒ64•Ä2©'wkõí„¶¡îK}¥²ÒEÛ¯yÌäï—ó`]¨Õ‘ö4ê#GÁä­GÂêØ6:‰Aö·Ì{– ¿¦M­o7ÞÞÚ†Cìô 쮹=ÕÜï`ø§ò+Û¬Òÿ*ÿ6ÿ.ÿ.ÿ,ÿ.ÿ0ÿ.ÿ,ÿ+ÿ0ÿ.ÿ-ÿ2üìi/¢?,ßM@ˆWY“E?y˜.´‘”Ù;i Řˆáx·ýv+ϸ³y›2<`Qôo±ü]¯o@»U1¼Ò(Ì[‰¤h[ÝÀÍU;ÐËLf(ãúcþ.»"I‘I D&+õLÿ¾ººü¦ñÅßl‡©IW—¨:mdi5ÈãÎÉ«ewÀuÂuɪÆ'Hƒô©`d·~ÿ7çþaÁ­jIõÏÖ#ÿÒ*ÎcÏFáÔi‹beóŒíœ¨žz[awÝÁ~±‚c¸y3Fô9Eߎ-O÷jþÔ6ÿÖtèmLðT¿ÌÊŒ rk2WŠxIôÿu}¢Ôk¶‹¦*?’ÄîÜp'!>û€â* üìQ=ÆÊ}Ü$´Bû¯­,Èi%Åk©ð0aûç;45<ÎP†á i>) œÄB‹•üÔͦMgɃo§íëy»æý)å:e(÷nêåNáePâYLjéfu±Gl+š‘€oàÿKE’¹…T±Pz5£»îk×q΢üA9+ö–õyÉä½äËãËfŠü@o¤D?ˆ"!+¯tE­€bìËâùU·0Dfö·‘Þ/©Å¡ =tcvä µéõàÉ aëÈà"Làâ<¤V•á›bJ¦Þ¢‘å´P¬Ïìdb34œIíÅÔ™žKP0TÓSÕýáíÓœj© ö&MO¸oÝÜ@n‰»Y«þtÊ4ãƒõ¯q…`^~<Ö£kòºji¢p€„É:<[Ž mÆ•WfŽùÛmJ}tšZ^œ€sÐ>æƒ._gén›h¨f¤ÏÚÁ/wR™¹ÕD·O°a-ÖÙ(•åfl-|õxÞYÌ·R·ËóoW`øgt©VçQ¦á–,ë³6-0_q„å¹ Ú:Œ½lNŒ‹w?þÔÓBz?޹+’Ï>Š üìÌPœ 5‰Ù!/㺛8½zŠ7¸õE|mñI–ú)ªp$2²»»Ä­êŸÇu㈩˜F·†SæÇ´ê øÌ7â9£8ÉÝÚ©ö¼:"÷Ö©RNôoièç °ån>ì2&ÎÌüaÈο¡Àã;Þ6˜‹á›”ÍäoÇÄ¡=ö·¼÷]Á5.`µ/XØŽMÑW~–¥— P[X¥¶*]kàY“Cx ÙO½+TÈWì„ÏtèKÌáŠL=IcS[å ú1"ôø8Æö cŠxQ¢˜êeIöBÙM^¸¦ì‚EÉ}£ ±‘çÔÄÑEU^n̹–&ÏR¡ð( €É’kgºìLž÷ …sgÖfH< pÐQÖ¿A0$8: üð.”ì9bi­@"<½âŸÔó“¾h¿àQ-¥¹@63;ÒŸ)¯°.†4bBGXn8Yì±Æ'휪ùç“oÉé¾F%UN£Ò³÷Ip¹R|ì›5íZ¶k_áX¤5OðÌä'Ä$° §‘õò|¼f`ý×k»ÎÌ?*ÕǵΤ2»ÀÖŠ/öØS)i¯BàgŠšÓ3°o¯<±Ìïø6ˆÈc£/_¯ÛK(ÕÖ÷©ô%ƒCoq/Áúã3:Kkn‘þ²Ê"ã¼âÇ A†ÃUÂ=§‚m›Z2²ãñN¿3uÕùš®eõŽn{̽z¹íQßÒ£‚’÷$æß;4y¸† ë㯤çoð…ÐQ6T ÷ 6)€ìbŒé ôÎú üì›IoÂW·q ñÛ4ÈeåJtå?D?è«…g×êܵ:-G8Pf€F_ŸY]¤Ÿ>Kl!»¦¥‰kÚ[Ô`{7q”ì@Cê_üøÇ?½;&“Üÿyïw¹¾.¤avÊŠ¦}Œ¡x ~Ø,"F¤ÃPÎrÛ Yé Ý‘dû Þ’:âK“^p{²RF.›©×ˆ\ ¾+ÇÃÒ¬yß@2k*推åó,b8€L,…ÑÐ3Á>BêÜã{‘M¡ÞVõMG«­1Wüy¤ò1½ñ¯¬²èÕÖÚ/»dÀáøÒÇoÿVðþÒœ—Bú‘µ9ÀÂ_¿5@Cù‹+­ò¡·f(¦l’c^B^—äÝ:–Ìì hÓmä´A´´\¿T´¾xD* üïÝ Úg<=NÑÊ&IðÙ†iqØ&fíäéÓ¿›:þZHƒŸClÆ¿î…xS¶Ã”’ á¸Y/S7%5/ófÞ¬Õ?‡c4% jÄÈ+÷diÜ xs ©³í¯‡/ "©vä`ÒŒPë,á»/QD„é½Q¬½˜>í7ñµi«~űN ކTò_³c€½Ý–| eLa€ƒ¯¨[û½=…JÛ—óÅŽ~‰ùv…À‘FSU´Jë°±—A Åæ •àn}Íôl†5 d5ðeD)@F!1$vM÷_NÅèO¦¶&Ép6òÑÏÏy|õ¥ wã| W'©ƒ<=蚸ünþßá&}4¾›µ®Õ3ƒ¡sEl ! ›ÝªAVë$Ë2ÚÊUÖõÚüí%øøHÃŽGuó]ôï0–s?t(øQ؛߉Mr=瀸¯~áêÎiàïB>ânÚ‡ÁNÆ›û}ídÏ>†æX$õ‰«'œxU”-)ßÌþp†Î ÎØÝšG­|ûò&·–;”S¬ÞŽ“X26Ÿ9ÏÖŠ‘£Ð1.™åߺ5wÇÝg(Ó…å^IÅ--”vŸ;›u§ä0r wý<É:Éa3öÆ ¯µÃÄöÄXeÓù¢â,î.ʪ„©¿“ïËŸoü‰Ùü;'Fä]÷Câª87jºé®{¦ññò¯Ïñ \ R«&~èð¾J­MˆÕ›·Èm€FÙpÔ+íkÙù†’–U5ÔÇ‘ªÊÃI]º îIìügIÒ›dq÷Œ ¥wFmdñ#ú¹ üìX£^s/$_~¬¶4†¿þY€'‰¸;›KIfù0#±ßÁz®È8úz÷ÄÚªª·t€H÷æUvÈBc¼t½šPF(óø<%KjËYj¹ì‘XLéäTò¹r³*ÕÕX͉ݤ't‹V¹7ã ‹\º+½“¼Ùʪ¹Ìèñ;>ë¾Åáwxpû-B†AtC¦kô ™4’m˳3'ÜôL¯6l!ôZÉõ©Ðåh—+²nnâ9wS"xBÙ»ü§3M)ºñ,üÛb‘Nëã—P}å4ÔßGùØŠ·Y°:¥˜]§éT S×êªGÒ´µÂOk Ô<ðôÝÅRJð‘ØgÂוåÂnÐnkÜ¿!P̉š²2ïIG2o•à­Ã.uoE‘Š üí%"p{šo~7ëÆ;Á&Ô’§ ÆZÍÀÄÌöRó8 †!ÃÉ‹L"×,b‰èrôøˆFÁö$ºô*ãÁhücà—kÝDü0çPgM«ÿÊ¥¸g¹Sç2åvºï£ñ“âŠÆQ‡T` Guûx¥þ>2‘,Ø^A`x•PÄ,‰o±E¾`X©)¾:Ð=YûR’ž+ò8èq,WMkâ­a SB0æ*²ÓND&“us˜ÂkœÜßɱàŠ~‡‰$mßkEëI;uJ“æ¹{.½¶…>O\ê¿tu¡k(0|ÞÖÓqoìdÀŸ\ªå<úšŒ ˆçI5LÇ/@úȪ™wdŸ™ƒ¦ZjcâØµß%±ÂÐP«¬‡ñ”ZWì¶D¤+ ˜I;s—Šüì‹ñ¿º„¸*ŒÂ®@šñVóN`ÞÎ(Ã#àpLí§ìH"¿¤>»Ð›‚³@³j6®]H*Þ‹6¨âä"ßÓ»û›»Zi1ð`¹¹\¬¬9J8ë¹ñoÿÖM¤Iƒ¿”¹»°ºP›wëÂkA'@^HÝGEžŒŽúÉÐÍT¬oÒ}ý½+'x¡߹Ýqàë¥Í3$Iæñ‹Í*ù® Þ@µÓÊG¼¢O÷ûQë ›pín4H/1¹‰"Ò[I/×yÀþñ{Õ²Pþ)×R\!;@1‡»¨£ž;Ae—ÎNá*+Ä^®^Vlþç½Rè'~q@\Ö‹A=kñèƒëÝQƒ®ß“ Ș]§ÔŸÂáodÉ ¬•¿Ð@{~Š* üìjX •ÏÒ³5[Ô¿²ìÊ`ñ7Ä[ŠÄóµ3fµä^dõ¡‡ÐGºPÅMhf¤âŒ•ê-@ñ8úßàÙS?=¦õú½¸ÑHUÉ"°7Ãî´‘×ÔŸÜÕß Ã€Êãs‰@’›´ÒD¬ë7J­,ñKïu&[ýµö1…oõµ3±˜‡å ÓRçäJ©DPòæó‰²GÅ|0Låº”Ó ÊQ±6ÔS|çð«Æºø/ùhGÌ@Ã=ŽBú¦¤-Jö§A\:iÄäÞ”/MÞ·Ri ˆ]«ÛÍç¦I£æÿüõ²D‰= ’P Ý•Àê'˜f|Øcª¯“ìò†:7ó§³YåÊQÑm \]s9Oü7Ȱ®x†¶ÙH­Lퟦ]Æ ü×CK}÷J$ Åùs½Ï\¶\ëex͇Z~1ëXç=ö»žF`öÞ‡Ÿóª†¾d;Êž‰ä#‚@Q#@ÑÅàX}dx¢â÷з?åç Z´E–•ëX¿@¤xZ&¨/¡ô‹ø¸¦¿Ôj†ñéõýÌ´q¶e¯ùT÷_y¯µªv•9Óbc›ð}™7Hˆc"të‹Ã®ä½xrGÞÎUáúPõ¹^Y4oþüÀ¡gYзוPØÚ²‚©§[2ª£^ž™Ýu:¿hi/ Diú"‚€Ýß²ïžWã'â¾ÒVïP ®”ºã­½Ð)”rÖ5À2I³e^hþvrRPnXôË”0.öê.cÌÆ(æI:Œ̘¢Q ùt—ܤk6OggS€¾ ›O!?ô[¡Þÿ ÿ<ÿ-ÿ+ÿ-ÿ-ÿ1ÿ.ÿ/ÿ+ÿ3ÿ.ÿÿü×F”hýxXŠª'\Ìp—?^ÏsAvåß¾ó[£÷}f\’‘8?ÌR•“6K¨ ÓÇÄí/\úï$U#G5+—h#V¤sÛ&Z1Î:(àÉïtÈVM=¡ó¤&lí’ö,·± ƒ$íYã×å¸á$Ó €äã/·>‚µ32ëŒLÒ¦, è¶nÎv_FÁ¦REñŒ ?µDÿI’ÞfÒÏ@yüg~Tá$áBöey¾¢‡¥œÛØnìÿ¼ùoÖW ÍdCÿÆ´"ËdåQà{ wt TFT”ݶöR›oé¶Ágce‡ÒôZ}àä¼?ƒfÿ KQQÙuªï†ò½/<§âJzª÷gˆ'-¯÷¶Y!›)€^•´c”ïÖ´ êZcüìV£÷ rsv:È(ãQŠi!¦Šß°ÃpRµn¥tØÄ'‘{sÔrúf=¥ôH£˜ÔÂMùú‹i+ëmÍ™”]Ø@çÔ»á$™Bðåk#y"0cð–58G¥÷"-Ì)+Ž¡Rĺ)vÆßúS·ÓD QÅõàKÜ€ÿ¯ÆÞÜÀ ôßÂ_rK¨ Å)È‹]ÍCùñŽ2c˯·Ö»Lþ"쯛ÎäûFµY¾àz•ÉY\±˜'ɉ÷T—ɘœ÷µÔdsª9ª[ým½3=ÚDV½:K@#|§MæÐmn®I$[î™’ ,1& ª4ò*uòœO¤XÞ$Ùsk^ÓÐö…{ލíh8žøZX¯Ë¼0¿49Vµ*Îv†!Zù@Q¡'o19Î)gê üì˜K D$ó.ùÿáíÃ߇œz<—`*®~u!³®ýdχÃÉ>9±³íéÙL&W.‡–#â=4@õõ¤# ãi7K*ôˆ±>ädA¼rÉ_ ®á2 rB#!wi↫D¤¿ÿÿN%÷+îý‹“Š0¶®ÒŽ×QJ¯ˆ¾SS6Àh’;âSHõô†8Ï8õV:÷ñªs×] ν¤åÌï¿Ù:'JdT‰ˆ¥–àÛ¿Y¡t\OùÊ”ç›ú[»ZȬp–ùê/¥„e1ÀóSYÿ™ˆÉbˆ4ŠÜ%#ìÕ’þ×Ì6­Ë“Ôt´¥”˜¬9^ÚŸ2¨½¶ñȤÚÉR.þMJkÇŠ³j_M5¯cD¯U"îW¶¿7SÞcõ§z†ß¯¥ZG×ýõ"d¤òNá¨kÄ bÆ;#öÓ*ƒâ)yÉNk#™Ãá{míø`ôò—“{NH––ßõ5ÙÒº¨:Òe'öRê ŽÈ! ðŸg&"ÔdðBUÍMyýÍÔꮽ–¶IzW‰(ƒtÑ* üìdŒh6‰ðÝjõXø¯¦¡CG¾PJlëdr–¯ÅWdyø» þéd`"(ôÐ+>¿\, #bü¡t0¦1!¼$c:Á{ýWƒ¹-¹Ùó)|#²]¦ÎÎ6æ£î~Qx„XÚ‹´‰e+ÐòaÔœ@H=Ë ÊÅû…¥H–h{ÀÎ(ÑU-ŒÇfÏðh"õ™ÏéšlI ]pBà'’—²ªxþ*z`/¦äÇK¹ZÜÙma˜„ÛÓqgÄc rç#é+£"n ´%ä¡xôˆÉþ.!à1ÛAΔã\†É WakD$Ä »Ò8rçj¥¹FØ]Ë'î·wuͤ\õnU4áì*Vºûžˆ¡kAT ÑÊÖȎδ¢­È?¥:fºüð.ù]ü¹„››¶Èý<IÈv'Þ±ÿÎѱ̮W^°ªM VÓç±ÜLÍÃrÞö7²”nbÑX@¹f©ÌkÆQhìag)ø¨ QåÌ[lÒB1üÄR3TnuЍ5òõd‰ƒžù®.AÀâÁXA³c(ZUùˆ¤è¦Uð».ˆK³°ôñ Àª]¾Y±/Šu‚²/qæÂÞZÄ__BÕ¦±qÃ6ÆÞLøubE.Ü;ΜիXLÆ)`À3)÷(ò’v@;·ÚÿlWT ·Züí=ÉPû.¶Ùµä3õOf»,ØúaaŒ"…~á+žI‡Ï%TÒ P鯯5__Ëp¡HùýÉ”Pøv:âc D‚dóC"nÂs7=uœ¢ðHKµQ. @\{˜xø‚t6“¶úð!/ |AiÇuœv|G™õ s5+ · 5ºy2Ä·z‡9¦½…ÕDlì5Ý`×÷O“¼T£ˆâ+O3Vø‡G<¡Á›.Im!&` ³1SI¢mQúU=´ð×¾4ú¦‹?ýMÿõb\UÏýDK,mf";AÜ,Ì=á¶i©Ï…­cº–J™ËA! QóO«èHÉPÌ\?Ð/r\Íx[„´í|,fýu¬_/nªÛo¢Ö]o/غ‰4ü쌥ùSv¯v‰X*¾ÀI°üÜÜš8ò®¹õû~->®ª v®rDTY*ß 5+u篇ÞÎ4Eþ§¼„AJ:+*# BÿÃ7•Ùà|.õõˆ™3gLnÁŸ K© ŠyøömŸèƒž_R+ð—Õß=-éÈ“ÌÙÛ+áÜM÷¡1…~”sܲ±~ÊÒ»zY¯·S~Š©sDcPRzoÒßÓ˜úà­äòÁKý­£ºJQ ž‚Þ+Öî|œç°0fÍ„Ar•“O¤ã7¢ñ†E•¶ƒÀKc4ov$£¯¡tù€F*‰02šY~Ì+œyRö!'Š=÷£”Ô¡÷ÉÓ-”‘Ci^ű¿_éä4fË8QtæI¦ Ô툩ym¬­ÐO½ÐÓ üí%_gèÒýßoÊ¿òJ•Ú\½µ×<»à¹¶ü'ƒÝ—Ô&‡\Â×Ôèžïø5êÚžÖRõõü·{¥X_½¦4BM¡½±>²Þš{., ZOxÀ¿P)Ôy/$9&]÷^ˆ™¨þ!Œ’Tõ²C_ýŽ‘ ÅXù¹ ág÷n_q&^Z¡ÿŒofÂî5¾©IÄ \¡U g ÞÍÐ_ee€í€y ãµäp}/ûõ?†ö¯· h)Žžh–®ö÷Ý66%cʾÇwŠ\wß®vÏõI;¡nàÐ"h|JÃH1ø‡³½·’.€¬5’! ›«„áŠ:¨‰ñAF^M-*l¯›m„¬£—´¸jDÞùwgéêH î*1ùö@½Ö¦×šü왡Φ,÷@ßV}mºÖU¬ÑæÌßø ëÜ)9%øôVËs?ž äaeįmÌ+44ÏßD¹æÅ×é.ŠsÙ£çvteäWÆÑª?gâ?8ówwTå\0T²ñfÛbuÁ‘_Xt×¶‹¬9l ­fá•©KÞqVÓGÞ*΂Q:# É¥•½g«Ñ<Ç6ì5/Ú.áœ3U]Žö>Àþ²HË©¨L‡)fÚ|\Œ›Ý|>‚ª0WO—¬j0™X7\&H›åðr¡±Š¼ †šìË¿Š,Êþ˜µ<4­µZÅY‚¯ö†xöîÐ4z˜øÚØ\ýæ'ý£Kùõ"¹äßRÈ—ÊX–ÖŠØÜÓ•,y9³÷ºšIÂd›Ð×8ß0Íz#üÖü `Þî\2òôºIÖÞ‰Âýv$Œ¢D¬§AνŠâA\â+Å¡‘c3d’7½Á?&F×'#"´d±e"–ë<éâ©™·×u(I¤€Ö'BFêvÂèdVæ‘Ì<ç•–+5¨`]ƒH°­ÉÒ§5õÅ»ÿ·é'×0éûÆ&2·ì¿HÊô>"ªà<±–³¸½…Ëþì?ŒÀÉñ¶(á+½‰ñh`2Ȫ–G[7(ëŸTW¤AŠ¿QJí”Àa:¦v‚ÐͲ+-QW„~‘S–çùZ!ÉÿgãVw„ÜŒ “òE¾‘fÓiè!CÆB¤b$H'µÒ@Ž Ãê¤×|<óï\"z×ïPu¥É#+ ŒÓ|¨(T˜5Τʂ¶·${»)ª¸ á®t¼î|Eüß9wÀZj,®qh¸þhETaOrú¢¶Ç–…ÑN³ %׌®zap‡JßÑ/Õ¥¨8`äuè/´ea$v¹³Uõ­Döæçcu‰Ó\ä÷e˜,ù‘Ú]Õ-¼¬®t×”Ýþ[$o«ñ°±©µ¼0åÝcí–ZÄMb1E4> E O¹·gŽs£`ݯ´ „¹5ê#“+Tz^÷îUt Ìѳ‚+s]sŒ14+>F² ¿L¼¼+Xt%«›æœ ‘hÒRÞ9€~ï&Ø*4ll™†GÞ³\À<-Û:Åê'Ö—“>Ç¥rÙ‡TïÍqƒ-àîsÂC[_©;xi±_K,;vÚr¾j °èdˆ­’M®µ[‰@ãTù¢ü;üB=|üôÎp4BÖ]ºkzëz—Y¬´I –ªRwXT‡Ÿ·ðVãslg‚:Ï%]¾Õh>6÷:òîXO;Ó+ `ô> †„@ÑJ {8óåDˆ’MÔ».!Ð6d·Î/u¼Gé¬Òz.úÆ€I3¤Ud»a´'£HǨÇä7é"ˆi&×L~IÑþ¡·Ôá¶Gbü¶0<EýÄ ÀPæë˜ÝnL‚eƒFælÜ&)ëž?מd7Z!•ê_ì(uê»>ˆ:ÝѰ!´±D܈†…¬Yø}tŽýp£òþ)Îf1ׂŠ_áƒÂ7‰•¿ä€í.0tèÅ<´ËüõÝíºb‰/´c7½ËH؃piêÎõ^ÏûAücQ|ÓúRoÒž©”v>ùòn2PŬ^ΓKejõÿ=å‘Fômùg³Ã9_·ã-š¨mqRÌǤ=Iäš,sRÁy„ûG ºá·ÙÒfÂSÅÿ"Dt«¼¼PO¸Ÿ~'§8òäÊ C^æô)¤>@õß ¥sº¬iñK Úåe7EóÄìþGÙ Ó¶ËL¹oë*²éøƒå‡–§yÏÛ²Y€0Y[mÐçe±«é6T-45 ßlxó’Î]P'Ü॒úº¿€À1V—Ìʆ¼cê«Å¹¾ùüM¼Hep (ôD†æâëúDŽ@aECé©“ó˶üÌÐñ’µ„7¶M¿~Oä OggSÀö ›O!@õÉÔ ÿÿÿÿÿÿÿÿÿÿ%ÿÿÿÿ,ÿ.üÕm¼X¾CÕ×Ð6›üücJø¯p•T7xŽž#ÙqáÀ±z|[laïÓnI ¿+!ä)bϬËɹ]VËǯå_¼‘psѵItxO.§®7§CÈh:xèm¯?lòÝí"“¹6ìaÀü¹˜R¬(øXrßgâ/9¾¥c{j9N'…¿‡?@Õ³ ÉÒgß¶ ä< j¥¤DÒe8Ñmjv7¬x–Í;èí ‚„:6ήäjfû¯Y}ð‰“7Á++I%Òùk†ü݉9‹›Äìk³…/ýðuÚÀñ„Ê7úÌUq§‚zè5Ê@ë¯Pº5êó$Û•"Ýĸ3TœFá¬RÉ[Ít—Ã…¤""HžAÿ¾PôO_WL±‰¿þD˜ožõåK ÙÑð™B"ˆ!‚÷(æi9ÄN‘eïÓ-½ Z' 𼤣cW@Tn \ºW×È«ÄøÿœC”ƒæÀÉÅ[“†Ç„„)¥²už!¾ŒVÌrð,Ôf¹õ$\ý«ÀÃY¸Óš½ |J$_[ýäR|‚t”¹UR蛞ڒ¦·°¼å®5ú\CÙ/¤•oøì Ù8R!õÃ0x×´ó€ŽÊâáA­ñÛWxt•<0ÈL“â@ÏüQÉ.Ó–ô‘‘ËÙÜUNsž+u|»Í(\F‹ho9YÜ=}Zˆ|ÞÊZ½Bl·¼÷°¯Ï}c’”;MÒ4ÌiFZ;£*ÆY:ž›r (õÔ~­$¯ i“èºt(¥½O4¯œ‹ÃNÐØêÒ•v4 pvŽª6ÂäoI½zýô¤lê C ‘è*p5fwÀÑî>¥m§­ñ$T"ŽJ_ŒQF錺Âó™´/bQÆyùÍ =.Ÿó³O¼§Ôò=äÖïz8.2Ý[¯’Çï½Ûcb»^ý0„…Ö eTKïÈR|»ñƒ˜¯ç¿l^î¨7Ü}™írËÆÛÈÿŠÈoˆ“Àä™ÞêÙ¯Éüa+‚ÖSWÎ6+¼·wùÚë`ñ?)=:ëåQ‚R¡q;]¿ðÌŠã“xܧ*~X9ò£”Y~ƒO¬W–ìUâuP[Çò6y rˆ?°5E„"@“XÇ{ó(›©6´­Þ#—gœÐû Ìù-îˆi©fé‡È¯f—o*‚â팻œPë^ãtÞY9,C ‡ñãÀöI®iÃ/n†4ûøWÊÈ<Ö‡Nm E/5%?Bm¾ ‚¬­Ö¥œ¶1Õ(Ûˆ‰Ü}¾lWÄ.ê,QbÖ÷ä.PÖr)aJjƒœd1Vù76û ¤>Çub?ºSÅt4ÓUBdƒ|‚¹Vb©†·òlŠÇ¶Ág‹ý=cüNδžÁpR“»ºªåÜ<~1«díRxxÇ“Éô,?ºWv‹pøþ Ü<£wÖɵ8g&q£ó¡ƒw%%…{­ô$I“Ñðøµ¹ç÷kµ¡éåã¯PÿŠÓæ÷)Ñ ³.omø•÷I¢N ÒÁØÙü¢ˆTÀù2ئËu¨4jßµP™ÖÀ¢ x2ÎÆÝ†¡@À)°~ñ}Ì:'.—Àx@‘É hÊÓÒ×f­D%Ôq×Í1{»¹ðGÐ Eþ~ЩæÉA÷@ñhüéz³•–Ú¹žÿ‹v³¬9¢£Š%oÏœ ÛA!d'ש}eöœšß±OÅ`†Y“Õ5Pú‰€,°µù)ùgÔ,°-\ô’ѱÖ6ü×Fò:VýýF`Vò£(UÅGãR`À¦+ pþå]xðÎ<^ãËþ…ÀO¸j‹[—±Woú”^!7‘ÁÿpáÉñR¶M¨¶ä=¯ÊÓ.HåQp$À½Ón#Ä\ü• ¼ÊeJ· ÛBwÄÅñb±^›•Ùï·ñ%÷Áu©íKƒV ¢Ðš/*_yEÅ 1\À»õ…ØÆJV3Úàí]mMfÞž¹Š·ý'ÏÔÒA]PG &¨ëæˆEÚé×,ÞsÛòE_  dMxÝa¸pžö,aT¥¹°¶!rT J«Ù;.9ÄMËa ûÔß~sDv Yæ~ª¬Š¤~ËHa,˜ŠŒ6d€¡åçtäÙ)Ï:7×@ïVîå–.Ôɦà þÓ_}ji&ѹ‹Uù"[ûá=ôüb\«£’ñ^£}ŒÏ³8ÚíQ¯ÔΡ@¨D'~úŸA´7¢TRò”>P‚D'á¡1 ~@_gkéM·æ©GªšÓ¬®Q úS ©.qŸ÷fë`ÐægÇD®Ð×4”ô'I)'Ùy¿ÄÃÚÜRüChÚ0ö‰#¿îX’Øå[@ÙŸÒ¸OIÐxƪàAZüÊ"ŽF¿ÿø/€>zYËûˆ†*æ«•m+‡éYÛ¥|¨¨Òò6”9¦+Ć*C«Ù" ö) Ÿ6ûí"&‘#£U!v¥"â7ÖÐ ú]Š€5GÂH0ĺÎàHQcó>Œœ©†eÌ®Ê\rÇýÀ’^d u'¤†WœpPy…ß¶þm+‡%oq+vü×É“¬Ìß´²Wuð`éj¸Q´kú ÀÝ)ŠTmD™‹ÐzÒj„r àq¤1ˆÁsQ¤&¸{â„_ àפ@–0¤®;Ø’ð;]%½§g×ÔÕ즲 6ñÉõWôsºfM•`j Nâo‚I*_ÎÙ;Çóè9×Û¡kòünšH§. £¨Žéóä•„ ¢ÓöN+š”wžñîájaõQ#"©’J“èd¥|vœJPžš²`LOÖýÅרe“°³cm|þØå¼ Br£ “YÊR½P Exl…¦ÕÅvÿŲ̈<Ž.q^R©ñæqÝ>rê °ù7Ö¬i’§-nRÉ”<U’ÍÓ»-ɤß*Mì‘7e¾&]3‰Õ ý*³†üM™üíb„(S#¬z¿÷­ßj–a\µµÀ¹àDéjðjÇÅùü€‚«gó…›ÈÓUqdtG¨/ªŸÀûT/35ýÔ²ÑÜõ³9 ‹RT2R'}þ‰ƒÉÈ>´T$°+{½e%·©^ !…Ÿžn½9°wƒèik5qp&ÈÌÿniêóúñÓ¿5\ꓸâ^¤ù8i¡‚(§´Ä;ZVZ¬Þ=e|¨ú ˜¡¿t¸”Z\äEXI¡Á»‚)ÿEÁ0œ&Ýk5$i ´Ã|6U£=_LžNæ²Ï´åMˆªÊ :ÕÝ{¥&ÆíÓx·%ši}) 0¹¹”¢“å D”…ï–˜j€%äüÀt{fdÉ<ÂPù>åÛ´|£Û}÷äç´†Á¼Äˆ}Êc-?˜nï~unÜìb¹†ß7ê¸|X’ÇŽ¬*oט‹O äå-q¯œGrÌ6ÏÌð,z&×Ìn,ÌÎ3›à]ÓÍ^­Y6êׯUe7+‰ÿ60uÇ]'•¤[TèX7õÈNvŽ_[ð Œ;â´[ò2U tß'éTÊ^ŒõK>]ÒY,,@ÅTéÍ  \š®®FÜÁÅLÒÚú¹ù‚Á4åúH¸q¸gT “é1oõ?pc4*ì'R¯<ƒáß…@qL^eÑ]{}ÇÛ¯÷&T²óTüùo¾¼"ΩiNð°}_kò= v!üd{)Ìۈ³­kiÁoñ4sØò5pÐÃ{©kAÃS2¿g1)fì6I¹µZˆ"qó«]žÄ2›‘2ÇCcœx±ùÌ–×Õ–ûµ("†ˆÇ(¯_»¢Uq^ Âý\Q( ±Íˆ=oÄ™róÍ×ö1‘=Í£4‹ ¬øJÊ€y@DÈͼ»@Ô‚ÜÓY£ˆšKª³ž&MfÕF±ï CÔµ‡%8”{SéÛTwÉëq¶ê"=FO¼˜¶ÛCt–ëù ’ Ž,qÉíù5¢¢ Ä#—¦ÖLÌq€½5ªñ¸W b`^¼ |ãPyÒCñaM}ðdþ ¥'‡Æ«<2®Ì›v0Ò”èO«Îh¼ƒ¸Ê5ß%°6ü×Fòœ‚ÉcÀ^Dz§ÆAî´ä ¨%ß°{Ìì-S5Œt¢KŸ¬, `žgºœJþ}žßþù²‰6 ErþC[zo­Qø \h¸¹Œü½äÿ ÏAÿc¦Ò±ï¢F…ÔB\Èt7ð:H±4ªŒûŸnýµ³`%XØæÿÀí_׸A½òyÅËGá¼}ü“¢O³ùù‹íµ'bÅŽíè’·€T‰=ü×A}{£Ф[–ÛÓ§¿Fãù,bœ"Cà1ÞÌÀíÁ°ƒ¨l®Éf¶–_Ù¤?0O›"êK€Éj‹Òð¤TzÉ%ð³²0dÞ@õ îçfŽByƒñ>ÅOYEJ."´¥$ç¼sKLJe¡³ë¹€í/»m ¬Ì2 gÄŠüÚܘ£‹š¾.ëÑ­åOðf«XöÂü°YÄêïŸVÐØz"]{ ê3ÅýçÙ~ö¬Ì“VM²!Õ’J«4ßSÆXºôÿÚ1~³|§]då®ê×<ã foGâ£qe‚BÀf,•âï«–‚I<¥ú‡úyEh½Ö´º˜ù•fZûÚ —ªM:ãGU!v Q7½ê ô9Wà +§ï‘V"‰7{Rû º†Æ¹ ¶ÃQceûÝC1º„=úùšÃaXE™b’L¶ãü5Sy£×Õ,þ’3Ô™|]9}Ë¢«„W`ì4KR 52¡oÇKpyâ¬ô³Dl#JKàRe{m¸M©óĬ;!<†˜p‰ü€ðÛxàˆ²t¶ÚŠé{OggS@+ ›O!A©Ïëÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ<ÿ ÿ.ÿ.ÿ.ÿ.ÿ.ü×Fò:°avN%¢Â·‘Õqî“ÂÁt´OZZ˜¦HÖª[‘P¬ïrç £›* ® ²é{»¯‡ÇX-bêY[Nõ£ì‚ O9¯¯©R¯Çf >äqÖé}"ãƒ9½¹HŽ.Û³pOèϻ z5{t«$ð#0ƒr8ð•- ~@HÒx§›3ʆÎÇȉu›µ¦°xUX µ§+1ŒÏÍËðyÀ‘+–¯µ°‚ ©Ÿ­Á˜Gãâ¸K!ˆÎ¼ûh¢lsÑÕ ê²ÿÊ,pm4VˆÁäSnŒB¨ý}=e•A½`ç²U0ÁÁX™NoŠL2»+® G÷ª<Tñqd/ÿ4¼ ÔVÉN—¯…½ þ¨rügÜml€MOémt¢Þ¤#£ü×Db¬ ìühoKê7-¯ª¿É3³ëÏœ;KõLxM`9Øs‰þÁÍàHk$Þ4ЖQòºPjLWÖ{ }afužHð¨»ç]Õ ÊI$ÁwÇÿ;SMr ¿§ë 8×~ñëqú4“nÞmÇ8(eÀT óü€ Z®4‰Ï QþÈ $3>¿âär/´>ÈvæD„²~œî,ò$K:¦„ü¬óíÖ "½/ 51càäWâ-G =Å¢áÛ_н¡ jAdéÆ&o-ýx¢­À›™šŦØmœ5ö,'€Ñ˜bñHýkRî†mCìQa‡ÊzÔ  ­Ý~ìX­úY©9!Bˆéê YϵM´…ž¹tý £ê­æ êØó$Z0$‹\¯sáÆƒ³óü×FóÇBü32úëaƒ™ -ÁïèÄ1±t›DÞËš‰`ºÊü‚²^‡Å™"Þè«ãÓ’§ž~LÏŒÞà'‘,è&ܦüÔƒÿ=Î_oÿG¿¿‹¥{ž6W_„Ó¨n¹Q:ü„pÃÖ-v~ÿÔõRªâ[{•"¯Ñ Èwœ䘧C˜îÖd‡öqã$ák,WÜ]¤â?u€5ì‹ùlKˆ¢>ÞÿE¶Ù}ዉN(v ŸH_óäKÆJ(˜nÈWæ²J Œo­IdÉÂäý,ä2¹ÈmŠiâÝ©»ºA•7ÁŠÆ£Žwdµ#ü×ÏþÍ™'»pßVT3š9%Ö~לdÖpÖ1Ë’¯íºZÒ¦"[·Ï ¤çua³Jj85@dÿØ3ôkØïÁ$GƒòçHït6fùáw«)"d>CsµWžý ˆx&i³é P?U·2À‡ ÔÙr9‚Cq¹ n©ôѨººÿ¯»q,×–º×:\»AéÎ|O: ÄÚí­QªÛh› ×ãFï´íqæS@-œŠ=â“|óçònXÆW ò]`ÙøJƒ!f+EyàWMà '†ÔÝñ•ÃïBâR°ƒP$âã®Nè¯U—’y¥©†d_ šE/c¼Ð"žÍÀÁ~Ó‡”o\ÎúËǽJÎsSN¦#²ôp/oÀ:×ÖÜŽ÷ŠDz¨Á¾jÙ5&cÿÃü×G ))²?Ì¢J~ôj‰«Í(ÝÚ¬7\Ú?´Cˆé³Ðzþƒ;FjŒÍïX•ãó:Ñ÷=FC&(¾¿V§mkÖØçóx020hÇŸÖ*úÀ´?iBVu{åLÑôâ7jwäûlNtRø¦ÊÒïý2Ëöäð:ë¹Ì3¯£€¯k°SI’ùóï%¯´jŽÝQæYñÀï`ºm2•)Ø,“¦Èê”Ô¢pÑ¿oLG‘·h~­´ 4ç7VPÂU5êËa,J;‡V¤¯íMÒ£vlPnÆ:ª%i±èW oj:LyG=¼)tšG×°ðI=jŽ‘[ ÅîÅ_‘!A˜ô½ÛŒÏÒ@˜tŒÅí´¿·2È~ë¸áàÎ]ö(ÈѲü×Fú¦ MH_ªÃÝØM5xž§ù,¡âFõ¤à¯ãñUå7²i×EÂaà{ˆ˜q@qž)ñÕÜ=üÕió…›ý£F¦²^â£4Þ«¯·9Ù:ŠîÀ"õvãù(ݵ†‚q˜„¥æ?|!y%Â×cëd7”îlîûãGjR!àºþAxBD‘ üœ`Éo1 >×(~6ô ´ g`Ç¡WrÀˆÞ‡j &“s*oQ©Aò/ëÎ éÛ`5Öš<9Ñ/ºHÝÍ—7p•V«E‹žO#À_ë̸þÀ©¸|ät%Ο¦) ,"Ýÿ…"2EG/ÉÛ˜<†/KuGf_46›Žef5œÏ[4 Ò;Éœèú“kŠÙv©uüÿÈ¡òü×DÅÚ¬…[{<+Þê×Ó©AbØ«pLe”ág7 ¬ΩE¯ùgV¡‚ðîLç1“K¬I{T‚e¸£Ÿ[›K¯‹KÐ Ù¥Òèx³NùkŠÖxȹùxØo’˜»‡„wEÜײ üíèˆc„L ü¬Ó’ E' .kQ“Pª"É‘Ýó‹ÃŸž™ÍÂvá³( £ŸR("6Æ?~>>öäüj* ½\ws¥X eZ/ý†ÀMf3øÂP8¡ß+ß;oq©MyR•ÐåûŽ‚µ–£W—Ê0½è͉Y>ÇwôbÞ% ë5,Ä€û2Mjs§ÿÈÆG*²~&‘_œ°[2¯›KPYåãJç¹F£×=hÏ‘¸Ôh`NÈ”…k£²ü.ˆe¥€ZÖjè%T~óaŽ ¢Iͳ*'ñÚ=òØÙ#z—ˆañ@±>þlnûé—'8uƒ7ÙŸ4ô¾÷ô•tõwËÇ·£+WÓ{À%Fxm­.ЩþöWßÁ°ÑáµÓ}NÇF›¡W"`™W¬8GÏéQXN;ÀõhÒÖ0x×½à¬|ÏÁ2¡—"£P"ö‚ *׿0?î*xQCÄXÉÏšVê9cuÒÔÐË>Þvú.àA4e‘r‡ö//Võ®Œ³{lL¬üÌ"z|µ¬¤Òü×Fò8îeB.J£fŸø'Žëš¤Òûåñ$æ,1Ô}äìZ4;}çMÎ$óÁ楂ƒ ôfíý]nÁ`5/ÖË[¾››9~JFeÔÛ\:˜os¾VÛv@HÀþ.Â=Ö}’´t“…MÙÜ>ç—àµhã@–WBj,»jÓuÄ7éÏ=‰h¬¡%?ÀO¤Y&ÇI8ðá ‘Ôý¯q§§È”ãÏb¦ìöÁi)uÚJˆz«ýˆg@ÔÆ­þÜeu¾¾¡ûÿ#næi;Wñ%迪GH,ÊY«§…Âò:ôw—§M9·ñWT7:Oè„’ø½®l¨U]YL ñÄuÕ@”î';7b´Õ ì—Üazá_¤€üä.‡B0"L"ãü×È? —¾éXiêìß²¨’MÛäQ2—x í»µÃ”Þe6áªÜ%™Á8!#V…Øy®ëWèXû·•¯E0–1’!ÛñÙ¡Ï`&¨Ã-6¨-\®'?íÏŠCåQ× Û4Ûþ'*bÄ¥p,ÁÉGSIoÔ5®B|NÈnéOÙ—‹ªísAC–a¦ wPÅn;ÈPB¡ñ2Ì;…·56¯$ó‰´aòÄêüÆç²èÆøÒœ¥P¨4ÉËýý ŠÞ ÓÂì !†ˆ¡ ©&Þ×&_ëóÿ­sé`™TÚ2ò´B ßøËí¤làX­ÚŠ0Ô¶d©Ûm¾’¶,îC•~Ÿ)–®×rö£±Cµ8š.}„NÄþ›¬ÙîGô¤“8¿,y²Ålì“üÚÜj¢K„ÛÚÐ4ôÖôŸ Ý¿¾ahš:ÔëSÚ¸ÒêæN±´âw{¿„O©NÁ``k²õ§4og{¾ç84i½3uÜ'^†{Î{‡AÌUŸcºÛ_ruOFÉÔüï«(¾RMž ³ã)…üµ|ÉÊ$ó`¶ ‚N%ðµ–Eÿ4hmç©l–þIJÈÃr‡pë VLv2hú“O(Å˾övØY6Ž N{® …=P èà7à÷IôÊqÍ*‹(‚ް~.˜›u„ÖbÚôŒ>@¹²™= e>=hòøÏk•¬#ž¡ta¼Ý—©ušpI]‡žkSŽÝæQ~âg¢³'àçþ Áå;±NÖÝp„U56®2#û‚Ž 8׺q3OggSÀ_ ›O!BsªÔÀÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÚØý}iâ$™S¯™Tº]ÚµÂÃ1‰Âz"Åù—+§Y|UZE ´ð[¶™s,½¹Ð°fd0*¶ƒxÿšB¬,}+­ 0âŠE3'4ñ©·ÚSWÿ¶)°¨šþSDÅ+‡ FáFÚ—I™w SwŠJlÝ#g¿—8¤Ùì,ùZÊ_„ :NüvÃ2¥’ž6ôrm{ü,cÊ(ÕC¡H$û{¡ûá”:±%L+6Ž>|\¡ö9c›yrWRpOzOÛŽo’sðïÃåôÁ‡~Ë3ÅoD¬`«5]jG1r…xV0…I¤·Õó!Í2Ê ôËW¢sŸ¦RœcÍõÏä÷¸ao…Š) ›V)lPóòWLˆÒ:ºÒìXw#)ÚÖPI1sx’œ0]8FÑ8BŒqæìÿ‘U å®ë±>:ÐÜ€NÈ´óHÆÑíÙ‚ Qú}Ò^­µO_¤5åšM“ÿ­‡j´Ú€b ˆnËüÚܘ£ê&*0‚²žÇwd|ë“>%"î—ä>;Òò™¾4F~„ gçÂòp‘*z¢x„c¨/ÓÊ¢‰Ã2*¿¹ó ““•gD…iEé0ÒD9Ô^KÄ: U*g c…ÃÔZfàÈ£ŒÇÙƒ¼·ÿ¼Ë¿–©ƒ^ öqöy+Ì©>ÅlWìDö»«#äÐI»žjÒX’lè²3O vf»u>>Š+_lz?Öµ½.+‰DÚýŸ¨s™Õ§uÖm•ÞBý¡‰Z’ky¾@-²¤zX¼ö§4Íô÷„æšw I…ðøÌøVaLÁèg¯O—´ªÉÑ(ÙÄBÛÚæ ŽÉ¶|=ìê¬7+D´Î· {ÅÀLš³³üÚ‡áš?øR{Hàr"*Çv!M·ù-ùr›–*[|íŸf;߃÷Ô'ž2Ï¿ìŠP…wð†šK7‹Hˆ—Ð:ª+mE ¡Æy­HÕ§-VFµò¯_ô;¢¥]G£øìî‡óÓƒ‡_ó0ckGÞŸ¾‰•6v÷¯u@\8‹Žž[p8ˆ ñ HBe%¥¯³Wñ¼(¨ä¥áŒ`–!Ë$ÜÁz팡µóa„}è:GdzíXˆÞ²lê}üÇàÇRæøÜÙ5$r/±ò%¨BIÛFªÜfí™ŽŽž[9-xX8võ†Cašå æ%,c¿þÝ‘ìÝÐTk×7ZÁJHü,šÒ!?PƒBóÔ-HŽá†+OØKéžV´Ùäü¨Dôi~<ŸÄ«üÚÜ–§â&óü=ý•ÁüR(¤)wåt‡yaŠiª+Kqu{tM…—ó.£2kOúc†ëÂâ 3U{äâ6h3ðíŸ,J_ž6pèEwsBöZ^—ÅÀúIåWž{àÄ|.¾3Kªûa¼Ž}êŒ;öÕ°ïû*çÙ_37*8™^".ƒªè*mÜG¯CiT…ôÛây«U§:Ø´§AØ# ¥» ­è眙ýHXü™ÑÂo—©(áå-ÕwÓ"ˆÁ$³ÒÞÔ/ !ììŽ*V¡‚g߬(¯Fó&•8Vy_†5{Æ)2íŠõŠV.üiKì±r¦àDìÝPCÚCÜUj)ñ §H"ÏûFkó@É›Àƒ¨oN¡ìJXþD|ëžsdÙ²\@m“ZæüCËDÐüdfBV›†"(Åî=MÍ0ÿãc\fá¥ã¶b=ãEh çÿoðäzüAxZ’¯ìö£M sƒ)ÏŒô5º@2'0DôÛ…éR,.œ%*LÝʵŒ·¼HT€Åë­ÖÂ=#Г¤TJ-›N¹Lav'ó¼Êö¤¿ ¹½»Rp¤½ò@”&+¬#ÀSR›;ýQ«ðÀ£•“A´Â€Ö ÍXTw[~|™ç;ü¼›¹gÊ·-S’vòö-×0 ¢y³$Ûa?ƒ@– `Àìü×FõÿôLö5²`iÛ^¿ì<µÍ *QƒÙd{ÄY4)G?…®AÎÓ¤PàE¡´ìË”ÑWX—ͪáÚàÉò÷›vžù°¼öãxJ¼5A‹ÛúRk±ö÷þF™/Ó ³¼d߀Ç«BÑîÙFüâ‰#ä›ï ¿ £I´É$0?RfÀ¶(¬žÔ³8’‡üU,èûG.使¢ÁaìH¡j\Ï„è( OÎB®Êó‰_Þ…â”òXÀ&ÎtŸøÙæn¶¶Öñï¥ —Êcµ€Fššæ‰Õ›” ?žbDmÁ}»ú`åb‰ÌJ³ÓõœÈ?N=Éê+³GqFÖ¼äÁ¸}+ ªèöséd``÷5T×——µ…ÊvÆÝ„'ź,þ;/e·#ü×èë´~¿“§ˆ˜’P-eôHÐì›IÀò’±ŒgÆú8G¨Xñš¤`2e`Ô{Ûi§ósïôTzñ/† K°Û3G‹¾Ä¬zª3ë#Ú]Ëäõ&™ À‰€ `‹T<À°+"M/"Æ·hÜ£á>×ò¿‰õözÀ#¬WÿÈP¿Â‰ÇX¾>ÝwäMèäûØÛüÎ|5¿œ_\®Ï í¾ÚÖ4ªÏ£ËR~iVήçD²h„U¬èé!(õœÑ}Czúz±±E¼ô<ÎU’Nßß.ßy ±e''eÆzç/%9Ù»ÀÄaCÒÆÆ s|Ñ•!ŸWº¬Û«a÷ÃãS¿ =¾R½nZµYÆEé†Ð6¤Mï¨òAºîš%Lú¬Ù1á>’.÷Ü3Àùƒÿýî:BüɳaÝX_ÖòevJœh€$ØÔå±[©üù=@–HK!,«Õfîþõí‰qÐÃ#BÀMý½Å‚àL4(´¢Â×ImÙ*úÀ+ }f>_ÆIQDJô† á®'ÿT ìU±jl1?Û»…Gáìæv9‡€ìCüÖÞrïDúº-Ü€Ý‡Ž£\rh7[Ïoù…>êvWÒø¾>UVÜß¡GÞuo6h‡'929¨ü•æ-á%Vܲ2œ#IĆ¢;Ø<äxÔG)©çP)’»¦3RÐFf@C »î“­cRñ ö2PÑ4»jA0$2R£™‹T~êW!§>vý+¬ÑÙŸžƒi§ÉR²´Y³ñ!°Tð{Œ™SWD×ίôÙ%¹–âìZZ‚‚î¬~%¾fìvJçL6ŒÒ?eý±þÁÞɱ ä°o)è­Žd¾þ¢I”iˆ5:‡Ò&ÇÕsœËkñÄ ý¿î2ÓavWó~˜x»¦øÇgHc&Ö4lVá—,O-®¾•û¹¾Èd|<:»^ ‚O¤ÿÔ¾(Vê”jD;üÚܘ¡|ÝÈTé0[ÝaÈ&æ$¶Ž]hÓ>«tÛ«6à Mß?ËÙµ­[ä+ùð¨®>´!H¦„ä¡®¶Û‘X¸¸‚×Ù¦t!?iN¦>P š|èw]Gƒâ^ó ›¹ö?Sª¬£·rE÷Ê8è_b0¼s®îãŠ;•È•«½`j®ÛIFm¶ôìŽBŸ§ñ )Ž´¸Ÿ!"œW+äÊÆ?¸gê 3Й+#§5ꑤ‡>Tî0h~ö(C/i•²·¦·ˆ¨÷÷pñôý%¦jŒkÕ‹Ã]¨ßôÏ6ÓIˆ¨ÂªAZÐüõÜí2ß#Èð}µŽÞ[ä»-Koôé[5—¾ÏØÛ:±Ë_p3»è« Ù„“):í.‘$T ÇÚÕTü©!jëü×FF=@RÀ©LP š§¢(—êŸÃŸxÿ¡CÃ3rh_½«’âûÛ Fp©±åϹ 4G7©Ë¶Ž1%pgð}Bv%íår q\âcÉŽä̲„ ZÚE‚X£33ˆ–â«­Y[›¥ðä‰ç‘‚fŽ/cܯ„š\Ï0]½TÖìPK!æï¿Éû¹î,Â/sÿý‰Ñ+Ȩ&’XŽtÈï…Úe¨žž¸6R<úÇ,KŸº„;ÖJŒB{ô–Ifî˜èe† ý:‘I‰í¿h©ÌùÖ S§‡†×ôz>&Ãæ@?í¶Œý_Ú®È úýªá~ÑFô¾§­™hŽÎï_ï˜ñUݸTïáaiu 2ÿdAp sJ3åoµ¨©uOu?ÔÄq2KOggS@” ›O!Cê"€ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ1ÿ,üÕZx¨Ä…oÓ"œÐNѺƒ [»©•rEy˜¯|óç/Ó¾ºV'ìm)Ür‚vBRY™TòNº›Î˜ #ÎHïÊÞüÓÿœ¼ûî¢u1ë©€/ªÿP½âñ*B´^^Zƒ¾z ÆTiâ»éò“æ…ª×ÄKl— Ìþ"-‰0?`| v ‘la‰.)I(Höf©BÌðÍ:2Ô¢ßúZÓƒŸ-jW6‘ט =jôrJcy'xõù„æn¾ÑÄb6Ï}ŒV„2"„n$ÞßêÚü}êÂ¥¸mDXoE›œ&èNOÁ`¸!äõ5Š.ªôŒ>¡g ®CÃÃ+ ²Išü<¨@ig‰iýLŽm¤ÿA¢ÊÈé‚êSwÃE¨B‚f•îÙ‰m¶ÌJåBüí?çIÚ‹ü×Fò¼:ìëÐT^ÔnÍ4ª$hÔ"eÀq©Dáq.õ £Wå„C…å©1õ¡7Vá5ðP' ´¢ì’·b绂MyøØßðFË €aKF…–ˆû˜{æâês¨ÝG¿Lk/'ÝžF8àaXŠÑÀë½_¤Ðu½åº&[Œ¸IŒiŠÙ¼ìEÒ»@ëšGxó ê%@B;R!âа Î0îC[óÚaªå¨áÒ7éKt2w¤1Ÿ‡‘JÅQØŽÍ|sW½³@à]“À±iõi ºñóÈ©å­&mߥڶm3‚ƒ(EÙ­³ŒjZüy ?ú‘K3™ÇH§ÉÍlמ’ÏÄç,­f$Ï­x„Îã+ö“£:æýÿñ"°àO™ƒ¦§Sü×Fú‰XÞø$ÿ;pIù,¾æXÖ¦O )²ÎÌà±-„²Ê/È@pÚñ2¤Ê ‹jê†ÈGPº°ŒèuøŸ›vÏsGsißjþsþ*m—êoƒ ñ§Rx79”ýv9C;Þ±´8#/à°¾”Äâ]TáÒ¢±s&ãx L9é» $d-QhLJIÒ€ï#+ÇgÕ?±3«™N¢Iòcä—î=¦×®äÁÖËðT Ƙ€xR/Ì‚‰I6~h—q¾È+ ØèÖú½´{ö¢ p9=™½Ðm1ö<~¶¶Øí$\édÐŒ6Ë2ºê=¨Ù_¼ÂXŸ!·²µÅë‰~¤Ê¦Ñ9±•Ü ¥´åÝ´mÌ2¼2]ЬÛüÚÙ¨— 1Séúk;ù G0&ÍMÈ:7@Ž (`2Npiî4êE(‹]ªOÜ/¨ËÂUÁ@·.2ÆØt’nqMrHªCt‘=’grK‰«âÛ£¬YÕ­ý†¨-/{»RØ5¾z$.À”>F¢&²)%>†nu– 1¶œ]ja]a9>éŒÜ¹-ˆÔ¾ÅåÎ` NZ™èäüâ v9ÿÛ‚ãà ª¡³ÝÂŽÏ®÷M­5ÞÔzýa½…{_kŽg2n`úæîÁÿÎåaö µ;ÓvöH, ÞOÝ*Tl››¥~3DÍ’ý0ŽÈÝZã“t·þV˜áxNý3V^È»=˜¢D²÷˶ŠìÍo©ÁqY=TùÔ›ü5½ÿ…Í•/%BLèåŽ.¦q@®MÞfŽ«Wfÿ˨ñÔC>öé ðµEY(mÑÏNþ1ñ ýrñfIËA‚Y£GcC0û§æõ¡ïŽÀ÷Ágt9•,VãõrJØcëSØ‚f£oƒ‹ôw #0>v=5ÅþH¶…eð:*(ÈÒ¤¡m8Ù,Þ°e\TezzÒ ’ MѰák°S_¸ŒÍ_ÌÑm#í>aì=G†Ý:Î|ªC2»~köÁZL uXÈp8ÔJÞÓ³rÙÒtÁV|/yÔôš‰‰b>(÷Ü(hRwÁñ¬Ó¦GÙÄ5Hpd.IÆæóÑÿ$£÷â,Aý_\5:ÊôôÏ \Ét#eP(©š^¼á§ücâ`f¦ ¥ü6L™½ŒøÎç=≚H›RiwÖ ¥¯Ššæ€9ðs%¥Ó¯màbo½$\ãh + |ñÁŒû^ct4VKËGÁó­É$,!óžj[ÍE%2arè{Zû#¢’õÙ¦Ñî¤>KAž§ë²ðP°9o@ü•õ)G`jŽ;Mj˜yS–ÀqZ첌¾žnÁ÷Ƹäðn¦c™WÕ3íWÀvŸGOF›-+H¬yìG]%ï4£ŽAkÖ¤÷öˆ“÷é+"œÄÈ8 hE±k’³Âœ.ŸÁp¼®†!÷d]\ÑÅ¢… í30†Ä`ÔušûOÈòŽq_ÄßD͹ªWY[ Z õ†Ó)èœÓWõE úG²©»\Fnô€Û`q ¬#±î2 *¤üdf­*Ì£_L½ÿu s·6jbá(›¼ž¡®jƒIžÙ&c]“pýÙÃÐíTª6¿¼"0>d¨ÿ|î¯Y„ŠØ ÓBê pTw+ž‹ªÏcKUÖ|ù8ã'sݺ1n$ßvÜ iE’êíåbr.„”¥Ï~þ Ÿ¹ŽÊ%uct/{ ,ºÕªâÒï u›^+W§Â»/*ݳCøÍç3æOUfñƒ3Ì¢•Âï³î åÇ‘NA|pÐÃA?ÑYJëCGÊ¡–”ŠÔèàYÏ+,t9ËîÌ¿èGÅ_JK%_e ~ãÛâ@X|6(»ÎX›Íô®¨FÉ^k¨„9ÁüŒ@]k ª“Â(òoîå÷ë4¸“ ÂKRÁÙ®ÙÞZ Gw‘ÂQ¨ÓüBi=Í6­þöèëHo1M=¿\2ÔÇ2½Q|µ;ŽF©íñy…*/qÕW« [&¢ŒÈ2Å@æ„Qq àlÛ …§m†|{ô«}*îf9ywëÍ0ìJÃ.ç\éÜÀÉõé0WPÝeо%©1ëÞýÀœÅ. Ål … …1 ’Æœ ç©Û½âй¬æS'+ǵ—+3Y™*æ‚kZºÂ]Á«WÚØx9Tû[ÀO•“b“»b9»&+ñ õÙËÅšü3ÚRÜ^¶ ruü&… ׊#6í¦ŒÀ©b…2ÂöÆ€OY(ã Ê!%ƒó qæK˜øEE¡ý$4Ç8ÊEJŒZˆX™Ï„·•?dü}5Gt"I¬(ÀbjžJãrCHŒü×oQ>ÿF\— Y¯}‚5 ,Ý‘J(pèIóûQ ‹}·›sRí½qè4û¦=‘òýyG¡‡œ±Ò#¤¾÷¶[ö ³ úcÑtWà<ì“"#¤vF nD”=‹z åv]sMíP k5A¦Mžô-V¥0@üt¹äÌ®`"ǹΡºÑ‰BåxS4Á»99Nº‡«—xcî¤y›ÇŽ/Gv¦êK÷I3LLê2@õOïÒ,U†ä³iðÈÜf½Î½K›Y!Ëh IÐÜsn`øT¸óÝe^?H>Ãú|ØeÓ^ü£.8H£=“ GIN„¤/ÉÏܤa½Ô¤t°{Á-Yq{Ê606uA¾(ùkB縴R®I¨æ ü×CNu*ó $'ß\x=ÉPÛ¬)žq¼›ÍñßÐhœÀo6)€>ÏÀá| N:$fÇØ X°6;?ÁŽ7=¢±A ë&ú§[1°ýâ‡îŸœ÷hý ˜œëòä~zöy½m#ú´]C«e‘¿•äÆªmÒ5Wœɽb`ýJÍKã©ID*Kùûd% ‹ªQV'P™ö9wfãæš£®DÈÙÖbcŠ˜g-À¼Ü²Û™– Ò‚ê?Eà@pg‚PaN>Öo4¢v>rÂ{³øgØ¿ÊbˆEó?†Ðç`|€„‚ŠhYüHg•Òœ2⸗„I¯=ŒUó-7JxΖÍW€£”å–j#ÿÈeÝ4Ñ;5TÂÔÓ—Çs˜ÜŒî÷ÿ¬o8ƒü×CRÏú…Vx˜Žï5u #Ëp«8ÿáyJ1¹sÏ“¬‰WåfEÍù9»Ù´›i)kh7d(š”•Bòs|ð©ƒUi§:Oò œ¦wNcˆÛI°6YÊ][º|åÁCãgRþb”Å®m{ºø©…%ªËÉ—ÿÔ›õ>LXBYxÏ Ç<òÓä„÷ P«=³H–8’l—A½€÷–]Ë2ffuDû¦Ì·pîÓl;0Nê¬BŒPÛk¡9ü¹šqÔßuÜŸz:s3´YÃlýv¾ÉO´I$rÍløº)øI!C*¸¯_0Ÿï…)žPºŽüfQIÕ‚m"ØôwÞôŠKA¦Šÿꘉ‡r4ÎªŠ¨£µ‰HÎ ¥â ª^õü£üÚÜ–¤l+œä›E¼Ô¼á–d¯w7tÞôñ3®m7YøÌ|ÃTŠh/µÆ1Ù+䤻vÙgüø€ƒs?b°}f$'FöâWz؉îCÕd Ì-8êI:Ò¹Îi&Îûâ)²Ã²G|7À'ƒ .©cͶ´Ö“Q…ÿ¾~ïúOµ¥|_Fpàd,”1·šH|dÀš°„Äí­Õ”3Û令Éô#<¨Ö[-)»|SwW½¼Š#JX°ñh°è‚IØ£{úT²u$£p™‚K}J[G%Â)\åÉ «— CÜàsy¼r'b~Zi‘ć%¾Œ÷ž»ý­ßxä:mx±¯ÿÄ“É#µ«?ÄfJ5&œ‘0ï L-­1qÖy£üÜ>ã ÿbÕ¸ïoÈ* ®§rIJ‚\Vx2žDPÓDF·=~„sÚf\‘ á ÈX›Õ½În>^MÕ‘…ƒj!ÒÉÛTQµï¤}þ?–ƒñŒ÷ÞTŒFȨ÷±h €J†¿*ÿÌj(5!»µÊšDu`è+± œ¢WûláÓ‘VGKM<‰Ž°ö^ü-;ÆÈ…|;Ï×_¶¦¤ú/æskQœOµÅÊAêGhÒ) [>{ ü-EnÿåPwj%Ûóñþ%*x%Ô Ý.:‚Ò;ÔŽ /™·èU3å—Tõ¤ó9ü«¿æê oUY¢ íý ºk«^»ùíÖWÑèXES:+]­CcŽÝîÍÄfÐfDùÀŒ›ü×F=ýÜ«_æZן)ßFG¯¤(é ¼G¼;‘•²zÇÑÕc{'е f¢p"ÖªfÚÁøÁ(hª+ÒÙÞOCISƒìNÊuÓ¿ñêw^êSÕ^Ĩ%½íß7û¹Zcûë&Ÿ€`ÉbÙ-èN£{ñ×1Ë?ÉÕ“Âû”æ#lcZ,éZ‰Èz ˆ¨fb\¥Í,áhrmïY šT&çrב°¬JäCk€|ßÅ:ªKr.7ö"Õ‰KDÌÏÃH“iúEN5ç‘Ë òYÔ¿r(óšà©„+U“•"øÚ_²HØï¨±Ëp|e¢‡I?ôɇÀJy¹'iϤd¿Z>øÐõWLÉ¡NÝ;Š…Ö?žç3Ksˆ÷³èž‘©Ó½ýrA´f¥Íóa1rp_«JxG+OggSÀÈ ›O!D™g¨ÿ-ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü×Df¨1к¦+‹Ë/æ¢vxøvÕ@ªt¢ŒI…è^%ÍM3¤!Ø´ø‡{[»òáboÇùÁ >/ŽÑ#_¡«úAÞq­-óh÷£ÁÒÁgí…dJ&´ÕEíe뮞VìE© ´öòb­Ú²’À˜,±TÕ°Mê3õcÚ`‘ª€ü83:õ»ýiÖš¥újtZ™?ž.wè€S™§×ºëþSV¦1zÍLm…ûPåàøäZÂm @A&8ñ«8ÂdÓÅUþ©e Ç0l¬âOS­€^3 `@G‘J‰Ûô©0#I’v¦ó5üœUÎÙïµ÷Jxiîð8Á¤–«ë*ÆóBÞ˜ýþ ”6×y*æ0¯ÙÜT*BŸLJçj;}¥½’L`ªµsrøŽŒóü?ä5¢y‚ìî™Øe©ÁZóà݃ì=JOxÿŒlOHDÔÒ·ÿ? ¶ù SÈhÆ63SóS˜ÃµÁüÔ脆¤„{‰Ë#]šaúy)°œ-7àï$ýNÉÛIh}Æ$6 ¡î‹Kˆ›ª‰`œ§¼9õß‘¬£Ø“R毋A‹ø=Ç×îf¿ŸêOð¡¾Iöÿ3S#˜&a1vž÷*ÓŒú£Ì!ÄUJV ¢Œ°›á‰?#JdW»áÉ5[@5 ¬b jМ¯øÐ·¾ËÉ®¶¡L­²¶¶p¦å rÆJï!ç«7ͧÐÖ)¨Á&.;´x?{çÛò:^k““¤B¡ÂyE€rJbúó¡·ðC}?U¸âmµf§Jì |¥©"e üÍMÉ´U0ØpâvtžÉ]iµHáD¬çº[Ânbú$ ±ÀàÆ“ñ™ÝfoyI´Ó°ƒNÇ—½Uš¿²—#`r'ùN¿¢ñÞLƒð£Òàî{¥¼ƒIË8sÅŠG[W*0þ‡s1M•pÓW|Qïw´»ˆ;Ñ- G˜jÿôo<Åé8껓ª~ëEìHÔërèýkFi¯TåLøb†©m½[î‡d£ÇûbÉ4Å)D©©ް£riõ”0«ãOKc?(ÇÆ?iǘÎÒ‘q«mÖÔ¾hºExã5ºz®_fpG$ÎØõLººËÉwŒ|¢Ã¦Ð4βøÿ%Ï,ß*ö¼êòjv‚8ý³¥YŒyE \T?xËÂ’»ÜGZÈ~ZYöàsðü½òɼ®.þÍ5§6ðiWDÛül×åä\¬üI¿*zÁoPÂy½ôb)üP¢+­³5G²S§1ÿÞg¾rÆ­<=![´éž¯€ˆQƒÕR ¼ÉÒw`ò޼‡¸v”8 ÐÓSÔ£ºv®“G|¥|J*x°âŽ2ä<ìéÒš=xÌ<÷*C{Á ØF_æIe=3 ùS ,Â2Ê¢0®©!óY°t¡ûýe/Ḛ̀ënPI¶ôà ˆ›>þpµmØ¬Š’³°]­ÌVœtYð|=BuÒë¹V0'ü\)÷¼R5’ñ¸"­ÉnúC¾êŸœU—À!DbÈi9OŽ»Õþl´ôçJÌÀ¶T}½ê]ä1WEGD(ªsqN£²FÊÞõ~RÐ)œe¯‹úü×FþÿFgJq‹Ö°¬Ó,|ïêÇ0ù±Z–=^«QêêqŽGŠHkR~†Ã‰0 =”6JrâUŸÿ¨Ž‚ɦ#lÚ½š‰[bæ=‚@Ñ¡ü3uÙ€¦VÓÕ¨jÆ4µÆ–«»àˆäå#?÷eP¬Øª`>$mîøÉ‘™z®YZ+9üºÏ~(ÀyP‹­¸*ÀÎæ¶d·®ø’‹IIhZ|Å%´ùÐ@6Ô™Š½+x4c&Ñ©qÒ• ‘Ì>Þx–èµ¾˜ôðïk ~¸ðµWAí–h¸Ø{Șg‚²¼,~/“¦o<ýH#()‹õ÷öchÑC§þ’‡¬ënnkïF´xZ¯`rôDi€•_on ñà*½V¿rmù Û\Ò3ð©H{ã†üa4RwÚ1òi{¹ÛaÊý*ã¯03`w((Ö4ÿ~Ãbò¶sS¿ÍÜ¢…)þ÷³é䜒©ïš=”k8e©F©ÍØÌ4[þŽ BéàjøGïn.È0¾„dä›~ɶ™©ê$èË»KÝzÓëP&ᥕ5´Qõ?VgsØ} ,Bš¢- ËSS̈±wïûDÉb2á–yHæ `’Šñq>&ÀDéFPÎ6f)ÆÑP€†ú‡zé$öà™Q®½ä¹ê2ËU`”϶;Ng„Ll‚Ú¢ p¤sì‚Ó/òÅ9¿ŒªÿÈ +!c˜|†Š¾Ò°DÇÕ˜Àîº(Ž©»"”A’ÉŒôý Bú$›tˆzeˆô¼Ä‘¿_Z»‡ÄלÊÔÑ2¬%ç©An¦ä}©ß:º&þ0JlôЀ¡2,ÕIÖ7.¾"±MüÍ–=v:)²“íЬÒhR·µÑ‚æ; mŠÜ‡¾¬è0PË »oYì¶}´»|«-Gâ"˜m„-WʾúJ~Ó\²Nn‹™tY+ûÒßß`… Çß™\>¶"÷Ý~Ž;øãÁ§5i”â¿-¡¶ž +ßðPý‘úT¬¿–Эy‰éJÁ6Øóâ˜ËñÂ!UK°¡s5N–"¬Teaªae´´g}é¥ÝN•Í^h¥Š)ˆû›J–­®á ­÷éG#üÚܘ°â|#y‘ôNäAº%¶«PâbDÛºéFuè÷ˆ0GˆGðÕB,iÅýŒ†Î°D‡ª¹£¹‹þǼÿäæÕÄaæITJ£*󤡉ñ¦\.C–…Sr aŒïq;¼ N}u“\á´®mþT,°>¸Îb“_ >0bðÝdÛ•\jBY¯û½ÞUQÉ~m_õ†¹il,1·‚Јñ–\%GLt³ ê®ÐªÒÓK#„»Ôˇϕ‹L©î‡¢{âDÈgéæ}€d÷‡f¯N…Ë4ñè8Ôduv5·ðe$€r‚— ˜ú}ŠÎð‡"#WE`ò2ôÆ•«ßrÁåÝêõÀЕ ‘Ý–»¯Í˜ò£Î:Ƙ>Ú$ßYSº%ù6Ž‚àÚþQ;¦ ü×FõÃ`\ª),‘Ãù3Õaù8’·Ã+Àso% ÄÆô"”ñ=ï*Äá^K¡R.áØåò¨fv$ûn¤ðÍšiƒ¶7!<—†’s7]ê+€ ž_²RLâ/“£¤y‹óè~w0ŠzIXª™Æ÷ ÁQNý™Êl·Q"¸ÿdpùÝxÎ^¾hgŸýí6mˆßÛM?ù¥ì…nœo@«ææ7Ar&à´ê1ÀÍÁ£Ñ·ˆIÆ¢¼]p+œq|ߣˆ{t+Hnµ°“5OÿùXÐ;Û$×µX–Ñüø;¨J#è .zޱëÂÂÏZ@kqÇl ¡ ?ý4†pþ“Sæ?Ów]D„c„JÊÍsïš/«baŸy-ëTJô$W¦éœ)^‚@´ázuwý¡Â!³8ÿ΋¬kû½,—6åUŒ”ÔÃO ójÁ­˜Gû"ßñ,îDVÇ,Æß®õlÀ‰¥ ÓëvUqÜ»ß>ÊËl¶œÊű†°­¼yùÇЯ‹=<2PgØ=ìÕ…*½Aùp ½A¶w¢Îà>DJþò«eH–”,¹¬¯+nÔ„ñ{eŸl¡²ÔDÛ³„H“Ÿ˜oi¯û3¦Hâ6ÔR”‚À˜§ûùó …Î 6 ±à¨HË¢BK±Ó5|ŽF>],¾%/(#Ô¹Ôc†Ž E~aÄøXø‘÷Åh¶ð˜o;Oë¾Rˆ/¬Ú\BÒ!ØVvÊž÷pÜ«üC)Ät7êMm"6Í##A?÷é¦D1·»ROº/h€ó ESV=Ìõå¼òäÍ}ª’¬‘=‡!­w£;{.´ýtB•×iù?«XõoÔW5+ üÚÜ™ºûNÌö¤^²!OOyâÁ‹hovÈ R’Á’ “ã:ƹ{'}emRaÃFÃR'5 ˜˜=;v;B¿aÕƒŽëœø¿X—èÿýÍX³‹¹ñÕCñ‹¿Pg†dÊ*ñÅ2À½7Üã©öÈ繫ÛWf@‚F ˆZAlܧ~RåuŠîkÀr†ÏùðBjíˤ¯ÌI‘Îó5(K–W@=‰D°U'Y5'« ÆO’W`Ä~÷wb-6{“I ²‚¸%ÁzBÿV£sûŠÉ|]¬§pr§5Ûû<ÉñuçÈÞL$sž‡ôC€A,Ec4ó7Ã[ü‘¡ Ÿ{cû~d’˜‹É ÷ßsœç6µŒ ²s Ümåz‡R¥·À8èP(sšÄ¯òü×G¡Œ56 öÎ ,Y[Ëß•² ñ¢ûXß ¬‘$Õ Kõ­ž¨iw r×ÝWö§|>Ü¿¸V¬î†Ô]ƒu]ší0cñVWþ) /CdvÜߊ%%càhy®ËW÷{©Ì4P$S·×-£ÔéÓÄìbG¦›<*´ø)57ÆGo¶ÀA†ú0O#ÇUŸ tD B¨8å·ÃDÁ¸*ÏÂgs©!‚¥8õÅz]¡]äÉäOÒë2ç›CÛ#•ü–7Œ”zBºâÙ0.Åú¹ 7\Ê©î&ÿ`F×<…&/ó½S- ú´ï=wrÀåß:Ô!_h\¾JlÎ̇¬ÊÁõÖ‘T\šÏWûmÛÍ'“>yºÍP’OggS@ý ›O!Ebèxÿ.ÿ9ÿ#ÿ.ÿ0ÿ,ÿ.ÿ.ÿ/ÿ-ÿ.ÿ.ÿ.ÿ.üÚ‡¯Å0–îè/ñH½åõ²Õ,<3Õ£¿¡ ‹™l€]Ö|À•?0ÓÇw†| Q/èΛH©–Wêz‚ ¯S¡ŽŠ µnÈë·q¹ËŒâ ‰áÙtòG6'{1ŸæTÂÈ>G¦&VzZR^ë$¢9ýáR|¸ÏVRTΈ±oãYhâù3ÿ±dÝ­?+Šîõ†:Ø$‚1+æ °:G´eå“‹`vTßÂ:Y÷‘îb|,f‹Ž-ZHŽÑÎÖ V§¤›•aˆ2w¨» ¶ÜIÔ­ƒ‹Ä“qÙíÒ’~à Áç“GfŽÌ¢ ç’ïbû ?öãÙFájØ6;bi‡Ý85Ú½=Í“ê”,âxš,J['ÉP.@‚çú¡ ©,üÚÜ™QD˜}åãÛ‡S !bZƒûŸA„¦‹o*£¿óÛ¢(ÕSŒìyXT‰îM˜$ž÷G^Œ5m P“{Ä> Æ6>5B@‹.NnFµ­¢,ñ(p_!Ú¯^ErHlé0.€ßâÏ´ðè䵕 äu&½sMs#æ‚àüðX Ž5óà¥y_c&Þ ¥!ÀÚpC‚ؽ²}a,à)Üuì§ðä·­çÌ9Rrúbvô öf6r«V¤»Œ·ìvY$ôD…üusøãŽÚ[+÷ÿ/$êÑTŒ(o³"ý.I$&+E½J°u(x ø©Ë^+-óLœ¾Õ¹hjTYœHæ8sNצw (ŠªuoAÞ¿€Ë_eŒC3m`J²Wò‘âxá 7Òå4À9¥ÝÍ’ÞÍ?1œ‹+—ãüÕ`/Ò•QÚ‹‹¯)¥ˆ5o¡§¾@2¦²q\Ñ¡aU©LxœèrêXu09ä vP¿ìH¿½ÅüªDPµSù ç³H˜žwƒ™¿¶Ø‹ñµ?ŸKLr7ì¡ ?á¬ÌÀq±Ôºg,“rUNÕÔ¥&¾ri*ÊŠ•GÅú·™{ȳǤJHaãÆ4;d¿SeYå1DdƒÜ¼]®ms9VjÑEjA¸¯©CÛ½WŒRož²‹ßÈí[Á3µÃ'Ùë—Ôv¼–4(€e‚Uµ^ñç_&½¥6?Hw‰ž½ÿ Ó¾[J+9®¤ç@¡*üž¼žVêË_¬z·‚3{‰ü‰„¼šOÁ¥ûÊŠ1 ¤}3í¶y!à9&Ùš(x‹`Êp ü×GÁÄʃŠò ar¢™\¶Á½¥6/¿eßgÅDg89ÿH1ÙœY¬Òé€t ·°Oj’Þ|Îaèc ÜÓI¬žèXÍ96µ›¨ÁT9Lq·É1ä"êH´jÅX\Mèc5Dñ†™ýÒ<1ПfðÀ`°-<öAæøx7F—9óŸíŽô­RˆUr€X•³Ç²Ž$Ç›‰{н:ä T—0Yµº"b(.„ïh›(CÃÊ}-ÿä—$¿‚¢{r}±B©³Gdr‘=öõræŒ }Î[A”vÆZHϰÿˆÐÝ<(º[ ð,Фv"rý4 ߃7EcY3*ØÕ†Ï×…„diÀ©D“­Ržu‰™2²¹ÊÕÿ=¦äFCZ)—ëüÚÙ»Ì8=Çâ·òí.›Àì]t³ÆÅ(ÛB¼[Ãáxv×~ÐÓ¯tž«œR?þÈŠ¯'·ëjiñŽò=©9kChA.Û2w~s`QWÅ‹æ µîH·Vv]C²¯6Yì$YË%’¾g°ü…B­œÉ(Ö>¿Sm”°è ò‚íM‰VÄð„;¤—ò’–ÑÇ9˜z~xã®5-ÈbңƂi5¬˜= ÃãBrüº·þB(F„ã¨_÷~æ—ç?È€—¾_ ÏÜgðƒØßòÿëWåÀínFÓaHÁ” â#'îêzˆÆÂzŠÇ#ÑÁÓLªëmLmÙ·¿¡ujs‰c t…cW¦ZæÚYaXΟt5¡÷`fÝ+£·«ã!-´i(I)¯£üÕ£ƒÞ¤÷ö’¯‚g°[xJClé§Ÿ¯ÛŽ*D`«íJÓ“Èfì=¶mцÃÛü‹¦Ár»|iAïÔ²Û$í4üæíê®NÝiGËŒ ¥ ñ¶]z‘鹽߮çO UÀËRx¸zIQS¿‹LƒP±Ç Øa™¸Z®…LT~‚W]ŒŒ\äèžïel4Lb,œw&mµÌ\=:f¿×£3ì¼`)Y½Ä_†bºáça5å[3ve<åv®.Ëuw½š4ƒØI*­%ßïÉkþ”zRC{˜áÊI9a¥G5¥#F—ó+wI/Šzš +õì #IV@n>•ò©gŒs ‡‰H‹x¯\@8w—+¯ÒJbç/ÕfHA°É`,÷ß{c}T‘wÛ wÔ©[ÖÂTþ.šœ¦®ÅrYÂÅ%>JµôŽï‘R¶Ím[éÙOkÄ\¯›ËªõtÆ6z-lst ï ìùÛ¹ FnEüÁ³ê ±ÏShN>„wéamáR×zç¿bË´žõ)'Ü >宿æË¹Ë&š¢FÐ þt‘™ÀßyÞ:û5óO0Rä±cAãËRVÿÓ?‡êR!®9¡dÀNñöZ\á¹Ù—Z‹J¿)}F-€g\² .Í‘+!ðdÙïDï¾å'¹Ziµ |²3üÕ£ Þ¨ð (°¡¾a‰Ú’õ_â˜ebËðv]Ë&Ç”3i¤íiÊ  H^®…¢4t"Ö52kTYI•ñct ³òÀX ÌY䓤:Og˜v0)HGŠG#ï€wÄI=*t„2”Nx˜qFûQć<‰Ð Ã6 {f,V«êðMËûÀm»˜:ÈEŒºèúŒvÊÉ<Ûámþ„È?Mž‡·j9û—•ø±m´>ò¶ýÇ@ L*s‰§}g °]ÅÇøðAÛ«&èóÛ#µô*5ÐØº|ÇZQP˜9Áý Õ‘*­'öà^+ú«n#3šé`§¿í¨’Ù‘§ ãi@س-ú±‰@¸˜3V àÇ’~=rþ~/X²…|³‰¸‘ o±v¾ÎÃ’ü-ƒƒüÚܘ°à™RÞóÍv£Õ5Q&ª¯>µ¦%=óU+žMCƒÂŠÜ9>#Àßëò°2°kô[H“tý%.WV²röb0'KE‘<÷e.ÙÕÉîÙoðs…ºûœhcÖò‚Ж-¾=ó&a Ö=î e–8ºxsrk|0DzA»Sæô¥t¸«[þGK‚µ…q¼ÖÔ˜úA·m j‚"¦8˜ÁÐß\ι^LoŽ;@e=—èøKªØœå ƒù«oÜÁP÷ «Ðþ‘Õ0ñ5Ò õ7„ô}7–¨íÌäõ®U(cJ¼2Yå ¦ò[àŽµ¿ôh~uÅ™—«æô>ñ;3@:ì¿+ :„‡½F÷ýÙ¢Ç$¡ºÄ¤:‘/¿ß"³[ü×ÏãdÒ @Zé[é}1Áæ i¼¹).Û Ô°[Ån¼ãw<û„Ø9hÌ]€´pDƹÑüSU2Ô4Ékpñ Ž?{”¾ctw»u<¯…$¹_§ïðf¡÷ý•&‚‘ ø‘{ÍÈ?ŽÍâžp\±£‘ÕêÒxy’ NrÒ@å¤QùMTîï@v»ÈÓòÕÙ»ræ'^O˜.ÃHšG^N$m˜kAä‡3vn"YÆ\-ÖÇT;Îz®‹Pïc´Ùµ¾U¬˜;!‚ÆÛp¹¯04|Qº)CÃÒ®-‘Uá\Sö7ƒ2VdО™`×àOê±->¯‡»³%“ÂklBÚ™h:ùHr¢ÛxÏ2ý6–àAQ>3^l˜‹Ö`ÀT)‹ü×bÇí¶ÉÛ£ÀòF3wp¬”(0ä`p‹å=‰4+z˳6n/M†d¬ŽîOz©çy±Øpæ•1ÊÛôõ/šžzÐoŸv¬l Êùî‘:€qø×ƒžú,(þ[z¹ömÒ]ƒüûdN#Bù$x·çõçŽj™w†Cí‚Ê2×¼ª 6IHÝ®RqÝø{7v´VE>ldcwH/«ÂëÍó­YÑ‹(eÆ"üwh]̽(K8‰ü¯‹ µáX0ŬÚvGÅáˆj|‹â8žî~ì îµÿÛyBAqG>â¶;²Cà‹%I> NG P^?Xa$ ×ÃvéFF¼.®’Î@cÃ|Œ ,Ç-zÈÑ «½V¨¨?íqd cü×GfI¦ïûåX8^£÷º©ðQžSÍlCùι!šéh;É]6ÜÉ­eªK2 zD~eŸjK8ï˜D°rÈ`3ŽuŠšZ:å PU–e˜×ìT†¦ðáÉœ͘lG~%ƒ[ÿ/¬*tñ_ìóêeT°í²2LcµŠ £§ðÛ·`H]8—_Ð<_åCsKÁ¹¶þÁ0 „qCÆàÈä…ðAïDÏD8ÔNe LnÅVcqQv¨w>ÑàŽ´üU¾îƃÙló]Æh7’ʶ!SL­=Z½ågñ’ëô.jh,cê0úؙ·ŒÀ*„ü÷&xngà –zííOC޹Xëϯ%¦²\kõ…\ ½9qîÈüÚÉ£/ò±lÌé ¯ ‘£/Á…+¿~ jÕnH޳¶D'FŸÕY“ºÓÊv,­—uUi¨œì›D?^_|‘FÔŒ#„a=~à¹aª·R ”§3×Gú‘›Ò[$$’Šoß:£i‹)Ÿ>{¡øxÌ”›6Pé‚÷žø«¼(KÐÿ‘Ý´GàÊòiêÑÒ²ÝJNµ¸ KãI_?ÆL:çŠÚ ˜NV°“ LDü¦o”k©Ú^Â*P¸…VÞôçȈ’*Ëv'øÜí cE%ÌBq:7/ÈÄ—G•"¿*§k¤#¬’“…}tý+³¦Э,9@ìÅWäGá™ó çz¾ž½€„ðÌÐU«&ékü7§È4¿ÚšLq@W67 ¼\Z⨯ùˆ9ÓxÑ<Ÿo»üÕ~&$8ÍÖkz9*O¢û@A:Åò´ý<érÜk½µä– ç’gSu”A·åš,ΕNsÌóÁoçþ»ðÛnÒë_$azKd é•ÂSƼU›ni¾Uôkv}'û_ªåš¿ô51ÖÓúEOs N¯}LoìSƾˆÑ†iR¤¹ee#ÛÁâ.â¤bFÖ¼qVÝcn-Pö¦öxEy\O[‹âìáVâ:ß';[À²ðØ=j}YÑè7l'lºhŒ fîØ‘‚—NÛ‰?º²+ê„&EÁ®BK°“†ôfù{àΩûD¾Eb¨Û–pò¬:”1Lý–>7h ܽ0„Âz/_öìÄ-ÎìÿôðNiCÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿsÿ&ü×G ÁŸxñ¾¨Ž©|T.M¨ÓHC鹓üT¿+üßËæ·èœèJO>bÉm‚Ü7îÆ‘pŸr v5ÍÕJ?m½t‹B·º‹8\»Ôî£r e¾r:–qOÞQ/(Í2¹¡åësR²Õ¬p†`Lˆxò¦1/ûÙP%®–WÛÒ#Ù«®´*kÃ@ÉUnpk² ®cSØÍ¿Œ¢†pì ƒr] Á%—Wj½ÚæSSNôâ*ÿÒd)¤È5+®Ý´Üº¸õ¦íæçó¡,˜Ö(„-û˜ÔZç]/i| Íî¸L1<’Rר_´Q-úB¨»ßýÝ­óX^•¼G7¯nâS0âö›Émå(ºmÓ_²#) ˆ½^€æÿ êíŒ`›X“üÚ”ƒHá1þöÉ–ä)˜Àqœ«†;Õ½c\¹ëÃÞJµâP¤è/Ü; O²u, á=á´hm„§frïúcçÔÑk7Š'î"éÃv%O€´ï¡ý¯R´šwòé‰Ê“dwŠ"œ]‰"Š•gÓ€QPdD’pª±‚U˽BÜaÛ”aäâ¬V&ylÉ^S³ÇÄMÞ¨¬ï“4+7‘‰“q’´,È%Þ³ÚBÀ ›ìiæ|jyI³i¡꡼‡øð©üOõJÿÔMá v_èn½Œ-¬'·î§£<‰¤uÂt42]wä¹¥K$>|Ò`¨ž˜òç!G¤.‘Xõà§Ú]ñáh ëÀ zyþâRоÓY6ÙüÞÒVžã„O*üÕZ9“ÜoŽÌ”–•“P0jRÆÚü õ”0—Éoň;–sî¼™YˆíŒ•I9¾Ç sÅ pöGh9ò @h°.3dD.ÏÆDùÏÄ ÌL!r°ÛÆ#?›rÜs˜Bè€ˤ€ö `3ëÅéÂ#l{EáÇžÇUg\䌯UKúhZË|xöä‡ë~rÑ w£ÉJ¾áBïzÍXUÅEü–ÖOï¨Gà oR*ÕoÿSmæØGžï@'‚†sËGÞhjý{¡ ‘Œϵ0Ø´Ñ…G£SVú»\ã.ùµ|bT«Y’ÎÁàksš¹âêô¨#£\9Ãß =`¨îÖ? mPH$90U²p±d}r(¡×D·*-¾ %ÈÊÚŠ)ìšüÖÞs‹A9-{Ú®ÛgNô4M ì»sìì8B˜Uó(Iý‘ýŸöÂógp8QÖ·NŸ *Gm¥©UXA3‹‘ë2Ïß/O?ð¦0ŒE>牒ºÀppÂäm?¼*‹Åò):Ç8`äU›£\a¯¹êeûDûŸ7P¬: *¹ ÖJö¼@ÏUúH¾Ñ$IºpÓ4Lâ²gÃfuÒd2€%#wà“ùñ(òÛ"ƒ ÔW$u„3὎°6¾€ïö—óÃÞ-è½¢¿“U«ûô%¼S uòÛ³»–3¾Pt.byaèºGíÒJü:™ã‘•0ÈõãDóèYm‚¯ûÇQôJ„<4½2½zŽ¡DGîgÜÎè²Gµ—£4ìŽf2ü×Fò˜.MtìØ*ç .ß¼ÓFŠ¿ÐåÐýpÑÍ@[ßEÞ“qÁÏã‹k hž¹Æl£„Ägˆš¯óúñíeäî@#¿,Š¡ò<Ø…cWKdýê\Ý„‰ý~_{åp¦§‰ÙÓ$5ÌÞ“ˆàï.›ù¨F–¥’õ‚&iY¾»Ü_ñEs&âæƒ²_FõMÄ‚:ŸÒ9ÇëY®ê. ù="µPów>Ê-"¤pÕk=¼5]É. jXº˜[³ÎñµÆó+N?æÜ 2ÒüÕZ:N¹-'Ý)ØJwHS è˼­ÔçZ)ƒÔF/:ßhI ñéjp«1Çw– ×{ÈrOÈy}‹Øîþe¯oæ9;ä¯nÖžƒGeiò¡A»ó~sÀÙ‘æ;ÎA0¹rU´f4?!à1Ão‘¤OP½÷ÑÖaE%|7ó;ZLG‘Äýç¤ÒtèRJê¶ÕèÕq×®èëIq MK–H‚ N¢Ì‚7áÒÙ mul¡§’Ú6kcmm¶‘[ZC!3¢ÔB<ªRîÍNC__z"Ï3žC¼épȸû¾dójÛº$–ó†áù~âîB–íß¾„ã¶ae÷å•§ÊcÄú•Wã ‡ÏZ%seãÉÙ­æ;½D$k{è,“ ¶üÖÞwahD£ #†ÐYÜ,eÓ„™^ß¾óêRåäû‰˜ô©rZ.ô)ñâbÈTå/ÞPcD)¹oö„äyú“]Ëä~ãÍèZ×3ýU„<å~'íŸðö¡o÷ðž:éÂ÷1{nBû^¯òñí1Ë •}¿…G3¨Ÿ N_,×å2ÈeCøé¬ê½ÇN]ù%µ‘ö7Sí<ˆH’ƒ½:{1ì±FBNdKÖ9ïí ðÕ-1) Û„ ËöY`tV‘X«ÅÓÿ„ lÔ´$·C¾fô ‘ûuËõ˜®ÿ’P&ŸìdëëN§R˜G°z~Ò¦¡zØšáp‚’Ø›»ÿ5xUD ” mcÞlVñšî¥ö;o3hÈUŸÙö­Ž¡3Î6:übVÅ3„GßÛáÙ÷1ÚÎ {”ýû#9ÄZsy+±@´`¤–™û²4Ë›¶BJ&ì+¥îÔŒ¦z¨Àžµ§°‰“³5»i`æri¤/UXĽô#¶I]×wcJ(B£˜lÒuä1m´1rJ!F•½~Tþ@®‚§•#&¤,òL¤ÀOa:{ß*uÃ-œ êÂÄU#)Q•a®% * #±®FXk‹t9–îüBi!+À@ÖŒ(=ÙìÞ¡c:ÞÍ[^qÌü²eäj=ãj3¦Àñ÷AC•Ô.Ò¥K®ä”µøkEXH® =â ,ÔzjGÌÀZflg¡¯ò¼ëð>Ùq tƒZG­’“Ò´Ÿ\}ÅóœÃòGIZÔîöu V­×ã,©'µÅï|BZ¡Ž¨r©µtU¶‘™çÒŸØç*ƒ_ñkÓvw˜ >†@ìÙÁqWò²ÁÙ8ä~„“«§¾v–â^‘ÅÂc96(c¹’¥n|‚òÆÒlÇæ²™#È8ª–>[à…” #l tv>K-¦b±Õ¯NX7D‰º(ú _ÚàySªÃZUC4@®®šûN–vSùnBšõ&,¡ÒøUh#´â`¶› PA®ö¢ •KCoFb¿üׄReµæcšÐH݉–Tމÿ"}tî>˜¨jg0?j#`ëDé´6Þ&#%ûA*–'hg%ãÿá–Žn‘9šl†néÎF±æÍsÑ ÌîO¹??Q^Ñ ”Z<>ÉÞiÚÍ;-öD¶G|*ì ›Ÿ‚yŒ% ÇE^=Œ¬=Üi”Ï£Pï¹taŠ7V¸ÑÞ HÙÿw,ôZÙàI.Ú6Åð=»Œÿf‡¢[œ–Y-iH* rëÏ–™ ߪ ›eî™õ³PN¼þ]zѺ¼º=vð`f.®I5™”ˆê1ìG­±hÆâáMGªÆŸ9QAz0…ƒ,ã6àÂÎA{9ÐßæÁ l·6Èõí‘Ù¢Iv¶ƒü |¯/.ë†0ý±•à¡Â’áÝ´Lú§²îÜþ|ÞVùÿŠŽqº4çóT”Àñ¾øž4ð™A&T0*38ÔR?^:ŸÉ'ã=ÒÆâ ÈpÔæ—½”?ØzX:0åüìѲÇ×ûl*®Y]§I9w¿(XAôãåϪ%ZaÒ z¼:ʦû Ù2'i;S¼¯¸þ7>Ï[»ÜB%c êFå{|®D!³@•ÞóˆA²#/!¾ÏÄóìê{ˆ—7è†ãҫŒñd§EØn´ú¯ÃïÊ|-Jº:K«ÃžƒnB«»á¼àØÕ€MLSmf"Ÿ ΠŽS=^ 9ÜgcïÜ­È¿81 8/ÔÞ¸/ÖëîRií¦úÖÛD÷x¼¯PŒÆˆüÕ` î:Ak¹65…Hí¾éŒí4.§¯ÖU®˜@¤ÂŸøL0B9 ï«Ùú|ªåÇãx ê]ekêvÈ´«T:"媕Âe'µ"(zá;„R<Õò!‡:;i·EÙ¥u¼L‚Jüè`™}䇭:Þ#/²ñ'ÍVtuDt²5C²ùö(·÷énRdnë¹1k•z×ør~ e¢ð*Ä>uÑ·!1$ x&£¢Ý! ê- Ý{ .ãN½Ÿ‰²VÏçºì°ð'¦ÛIÆà±H±ö ã*^êŠR»Ñ(M6€@–Ãq¸œ#›  nýé¨:v8yFJÚ—5B0îFÿãÓÊŠóàv3bT·»dûðB~!M <˜ =ÌÜT,µ0 ‡ï¿ßÏÏÉP/¼±ú ½1;©ÞœësÒ7æä•"^¨õcŒžxÔe½!ÍYén Ûƒœ0Omv’œàÛÿ˜«ó°æÓ$‡ü×Fóö•/Ù€†¡;í¬XwÍxÅ M!ómZBà]¢ Þ££¸”$¿«™rÆþXÑi#À€ˆ'»á3. ¾ÏBÎÐ-û¬Ä†¯¶†Š„¾^îH>%Óž^kW!ú9Þõ{‘ µ¬Ï\VrCh&?B›âSŠyh€`Û1¨R³â+–I³nÿRƃGˆÐ^è(Lª½ú»»Àó…sFùÏðüµÕêßÔÁ^³¶1ŒL48@„ì¾u…µ)—²3kÆ»>DóÇV‚3»œwª;–ó®ù!'¨^›Xá%3·†5¬ã»Ñ¡s=™ìÕ¿ 7Ž›¥˜:æ[@Ç%Ÿ!ÕŽ’ ½Þ{ø¸ºp>®Ì))æüëìþ쌩FâL<‹%…$¤‡OggS@f›O!G¼ÿsÿ#ÿ"ÿÿ!ÿÿÿ ÿÿ4ÿdÿ(ÿ)ÿ,üdfÅy6ÃÃGíaܬsORÑNŸ§üÇ|A—”SÓ!º EmD Y½@ +NtuÁô®G¬Ó1Üzn·©3sx ¸õäè[­ØÅË%B)#™Bª¤.²ø¾j¼;ZÜ€](·ÆüV5Ír$šCDyRÇ ‘9xòƒD_\(véÁ”÷ ,¢Í^lZ€¡ìb#I0iÀÆåÞé_ýNNk¦â'qb\ Lë ö® Çb¤ã?jùÝÏéŽá3ýU±_1EÉÂ0Mn ¸Š‚³úzqzÏ)z"ÝKÂl¸3L‡P&X{ òºÔU­º&´f; ±ê·àÓõö=>àöUÃêŸÏ¢òÞÂMÔ.qÇ¿íG’1Ü*jXàm´œC°WeR®=~lƒGbn£ÒöiB)ÉyAR»¹Î¸7—ÎCù³‰}ÒÝ¡´Ì@ÞÙÐ[W5LC‰¹cü×Fô*lò/«ÌêI„Óiý£6TâÔzvu~¾ü×0EJP§\41”ˆfä×h¸[›6yÂ6“w^äp^YË9òoV¶,‡Þ#ü¬îµzüHœ¾§üZP®¿«oEbtÙ†WåUa½ÐÕ§s•…éA Cìî£k)#œ#¡4n²JXQøR  Àu¨ª1fW5Žß‘÷8¦Ûz©õð>1’ “gÆNˆJõ®äÁõCGÕ’­)[¯Y'Žßµ×Љ½¤ýGD·ÐתӂËco¡÷ß,l\àÉ$‰A^˜Ìx´Z'Ëà ‹”Ψä¢iö;K¹,£”ÓøW­,!#R¬œ¦öÄøYh1€›yupËŸµê÷ÓªŽŒSAÅÅ{5Êœ¸nW˜AÌ|,çÓ rޝ‹E žx¤)(#à$Iª“¿¶Yÿ‘°õ¯:b]KPýÐ 0°¶VÙcÂÃ)g ewCúLmcB,»¼DFƒŒ W·Ñ¸J ^3.t~(jµž°$º *†áøqvkQ¯.Ü«ûûølN9ïóH?¢µÄ²æK ËÛMδíÿ-¶ßUùÈ«AùÙNÑðüD ûÇÄV)IP“ÐͲºÕ YÍ õ¦æ– KÑ*B¥’²G±Âã›}|þ3`1ÃÐEo(wP&ªš¶’»jÖS¬E6Þ]m³Rü"—©_ýbº{°‰0î^W\gïÃ8å…úªvœ•¾îÆØŠê²våR3ÍvB#µ'CA¯>Ë¥^ä׌|’.sÞC 9夕œU 6O Û|’€å}!-›S*i>ò cÔ· s hëй¼}Ï€ù8’ƒP:•º“ÑÌ&öÐ*#Õ Sõ']· ùÖå„Ù=V¹ÌUãÃÂ*”fºÐ4+“†#¯téÆ}⣤êwqØw­ÙÞK Ô`*‚"?–Ý.ö"ÃHúXž. vÓ;í#Ô—½™¼sÌã¬“Ž“9¨n§*òW@Ø–¥Ó%ä§zþ“ÔM¤u¤ho{jª†$cCÿ¬#þ0d–b`áùë+˱ ^ Äxr¦ÚÉ/X –|ឺùzgâ|Œ sRÅèlÏÂZÃÔKåvúÐè¡öЯ<)°²âs"’“3JÏ”¨Z;dÉõ*÷R#ì_õKÚ/ÿµˆ®½“’÷M;g-÷«C'n’l‡ŽÌåM\^b¡)bTØwk¾H|VŠ>w";ÒK1¬ÑÒ‹O?SøMjNZ(t°®üÛñY-Ìg³?†"z•¹ÍÛ4ÀógÄ‹ÃÌÎò‹Iή®*%NYe²ÜÍÙüU®RƒH襂üÖÞiKÿדÎYåê©—áe×öÒC„³ÿî†3ÙB»­éUL“7Ѩ 9¡æ<¬”ÿžìzOÚ^»U{é쥠'p=?A®ÈÜë÷*XÉWóÁ¬Ø~ %z9Àüº\æ:>¥×ÂvÎç‹^"ÜB?ŠåT¦æ í7ô.u¯©M©Ì÷¬óúÍ'}-6Ñ/ãàžô† T«ÑdéL@õUliÉ^wk\ûif‚»‹ŽÜ–¾‚ÇQ–ý |¬ \«&és • ­÷Þ°¹˜\«=tj£¢ÈZ]Íkí|`mx•BZFþ¬ÿô3HÓŒ]xZÔ¸mðæ 5CÏä«W…ƵžX²Ì@º¶£22ü×FóöTÖb­U5e^zTPÚÐ"©˜EMb¦ËõådeQ7¦ä¸%òO|a!´WþQš<ï‡8_|Ù‡lL{¬ ·DCÉvÜg~ öD€/J+Ü¡žŽµ©þWê}Üøm:P1Á+ñ€qÚ»ÊnX‰ž°EGÙeªé5ЦÀ¾B[j9{ƒ6àuì#)>z ·¡Ö뚬I-ó›±Hö“ÔÞwB&}ë*tr™Ì˜³èÅêXž³ÕL³b'XΛ5cŸ=A^CWZUEÛVŸ\Ý‘I”%m““®¼d‘U"Í'ð$˜æ¥ÎÓrUn!'³ ¥LÕû‹Ûß²l]*30ŒÊ»ºÏdêW´ÙiÏUïIVa15 üÚØç–ýe£ÿ9í¤&¾½Ÿuµ%¨9·[·mŒÌJÇE£®8÷+z.þ â4¡ðJQµA*“ªTQIâ급êá|¿‘ÚcÐʸ£>1ˆåÏ:§käxO¦‡Ö…Ð&Ãj‰ïéúñ“H…ŽxúJ¬rœÚU—$—óÎPË”1ýÍÇ P—‘“ã~ËH+a÷˜Ø|'â_¢¡i1z) k\^Ì»?Þ>ÿ¬¤a ”³1;„ƒ«HOÜV;«áº¢m`wéSebèÞ—»Âå¯?q½[µ!–,æÁ™º( -6®ƒLd‹p>îã¥Mi%…‰Ck¸®*¦v÷æáF׉hÓ3!†¹©5Ä&"£>x›ü4O¡v¤îÃ1¡Ã§Ù»V“§¬‚šðæ„~Õo‰™’<«&‡éö‘R«Ân".J=©¯X ¿—{iΨäæÏsFUÔšÐÂmKÊäÚø¶$§ò´2MkvÚÞŠÂ{ŽÄgIqÑ(k ÙÔ3¼3UF@Ø7 %¼mžKxe&^iwM˜yÿ–ûyc£5M³r>ÉÆ·…ý™“¢û¿svx"UªEuPß['·¹¼®·l&Š2½×b‡7)¢êAwµ|Y=ô«ìŽ'Ë#‚aëŸoüTÚ‡Z"¼¦Hg^^\ƒ´»á°ÉQåì¶ö‡©œÍ½¡ÁB"ß¾ü¨¾T™€1Liì GUĬ³b”ÙYã‡8.ét\ ‹ÝÙ,åÎÅ\asÓx>*}E üìœSGDÎB.Ï8SQ×L`fä½Cb„ƒXJ§ÔÑÛãWïP\2xáµ1÷¼DI‰}C°£zIG¢eÿ¢4,ì‚Rñ×ó½ÿ\×,Éϧ‰ÆBŹ#I¬Zså䑨(—-3³ âx‚MÙ0eãf))ºsôê†ô.«Dƒ – Ÿy/2’æªÛ`&ðEIZLiŠ(#þjaØl‘‰ð6Ñ„ÏmÅ­ý[¶ýïHsÈIVà„²5¶éá2ôóõ¾ã©{B†•M`‚µ(å­FM=êåw^B4ÄK]<Ú6‡b¹NwšÕr`þÈÔ)²s²çó„kRj²ÒH¤'u®òKš€y¾ŒØð΢î@èo)¤pG©æ2/²Ãóxão¦M"—·»JKh üìX§ª‚ø€ý®èj$£­u@› 7€Éæ kó¹ªÞBW,ü¥9¥y\2ûæýæZhó„¤pq¹ç*m¥EñØ Õç›+Ëx•Õß¾ŽM/ŸA¿aiùÛyÏw×t`¤”Ù.À\éuÔ!GÀAWdž9‡Ä;&æ6?¥×Çui˵¡GqN%4ÅáÆôpès°ÅõŒÏ½êXà •ªK4óؾȓ‘ÔzIÇΆå2†ñj?;Çkš~ÌRÈ@ºcêo1ÂÑ8sS†%‘´e!5®X~M¿ABíøàì4NK!ˆ©c YõY\˜g.pæ6A“µ¤ä‰{Mr íªáou¸›RxT;,½Ýmäý¬RrÏ妣uˆ üìXºðÖ{¼§,GkKëÿ¹Õàö$¥Àöðë„¥Ôóû­£g¸1}ÏÌRoðrci…øÑ_±ã2Q † ¢UõÌ%Ë´±®V¢ }B:ý…†P¾£)™†ö|f:7#ÂЬÓgù æÕõž8×Ðn¤´È!gŠÞªJ4¶´J_˜5î~Ô-^Dƒ,o`oZ¦Gↇ‹Õ÷÷’€”Õ(ÕZ>aò †b0šäb¢›ê´Dqã|ýc´0ugš¿Ò)6ú‹yèô¯ìÉQxÏŠJ+¾.¥Üœ`ä>'nä†xF$Üo_gFBfï>Ü7¢:¡Þ¤_èy(â²Ö « ÏüejÙ¥«`›g7Pè*ŽØ¨ üïÝ'ʦŽÁ\Ê_5qOBÌ&qˆkGÜ J  %|Öoø fI¹G! ½ Ÿ¿ØNtHÄ6âEÖÑ’ŒO$$!ÛtÕÚ†§~sûJÑÔòc=`¬kícà¢ü™¤ŠŽËõüLÌ t-dkú¢‘a Ãj2pLž(äû:ÑÀ84ÃÝ®rß e3i‚—ËC7>¹?úqûÿ.^Jé2¶ù\e<®25øÌÓ8s¿4ø-¡ · ÿõ·pÞ¨àÔ܈é]Hå{lÝо±lÒ;ÿ¼/h¥aãH„ó|÷ ]¢£¡;hÊñ˜•˜µygáVË¥ðºù·U>Öש)HŠuUüó æÓŽ*ï»ùÇ8¯®éÚ&[Hê OggSÀš›O!HúpWÿ,ÿ+ÿ0ÿ(ÿ-ÿ+ÿ,ÿ$ÿvÿ4ÿ-ÿ1ÿ7ÿ.üð+¨÷‘Ó•y@n5H§Ù¨´™ÉZHô3rýÔ´}l÷jMo ðÆÏ¢“AÒÅ. K>¡åFòæô“ɨ%FåN,äOy&TÐN q‚eK®KsaiC1Û>÷”¤’yEªñìT¨Êüæò~Yº»ÙW”lGìâÌI‚ÌJ<ò*"‚6I j•Ž£ÕBÇPnáf%É ¼‰U&ßàœ—?E¨üZ9Ùcç8Ãÿ·1M¯éûOr¿ä[ʾî$P ï¥LÈ{£4ÑéÚCØâ UÌRµÑqµ€xW”&ìk  Ù¢ðœÅ£N*)c‘ÚMiL^}ßHéÛÞpòNå<¤ña,ÔE@KO+ÜÈ™"¨»6Êo>.) ?° ¸džÛÙïîÚ üìX¢úZ}Ž&мß~¿ve+JÀ/¤ÜárI ³$Ô÷œûîªõZ$¤˜úX•¥¡ë¤¢„ˆ¿È¯¸Zöà³U㯈#æ%ªû©‡¦ôìDkØÓ^®RæÆüRT”zt3°†þIñ Bë¿%»¯Nâ²ÏÆÿº3ù+ÌÆµ¢xî¶-ñ`ÈÃ}3ÆQëJ¼hr˜¡Ÿås¶•Žùý|LÃàK÷Gî:ŒÍ÷ì–£ÊÀN`¿ƒN¹YdvÄ雪cɪHš6óº)É\èÈ€OmO׺/flºFu¿Œ×o"‰™+ØVgˆïRe-q›=8F¢O|’¼(º ÅݨÁ½ Œxó$&{=vå®:´eƒÚÄ6F @–ú!c ½Ê üð#:ö¥yðf‹C G6ÇÎB¤‘:>2º»ÓèVàADæFMzmGÇq“×..CÆUèÔŽW<0â81JCº&{8Ãßë߉Á56KŽ‚BÙÅt#ü`¤ÖrÄõìMJq(s.Ô²5Ú|ÌðŠž âÛrµö5²1ùȤÕJ6ÔÇ']93IH´qè•Ü#«G¾æ¼JDêuànN‹{K3Z Ó‘"ø‡{m°ËӪ蠇åúq*‚ê w5ÝÇ } ó†0ÈÑÈ˨'f¦Ûú)Óò] l•§ú³„gÀ¼»?ÔzS,úæ×=³á3O®Ù.ÿVÞtãPeë™)94ׯ—{ -¿‰ð«ÊúÀèVÿØÛxŒ'mëÝ]Âe ¡pÌû;ú üìX]ÑÃzCš(Éå‚ y‚·´‹KTŠ ¹Fu Üz·VÕJhªË·üÅìå-îEW(Œ%õPX5KøSÚ ÆÆiE8õÏÀ¤-z7çáÿ:cº:Bu­nYA»PÔ @ÓäÉG¡ã@{›²H±Í-¼éáÞš!ܸœ.›€öJX Ë<å=GoÿÚ”î¾ íb‹\gÑÛQðôÉYaO`yÚ :¸¹&ƒu‰÷ã¼ÌEJa†y½,g ƒ³è ~Î1ݹô§ˆa¥Êô³úãàXô¹™®IÒù˜½mQObéä™:JYü•å®Va…þðQçû¾Õ#Œº€‚<–>Ô=xЧE°²`!§6¾v½Ô[ˆ3’b„•&#@‘üŒ üìb È¥éPMI¢ð†ßðåí(£¬$ƒ’Ïhˬ8âY1 g›÷ Ú2ØNÏŒžGc ¯É´øÍû*Yk<í„Æ‘¸Ð 5ùÿ3Ög€ã‘,OA&ü~&ÌpZ{9(ýÕÝŽpÌÏ°ÔæTûÄ›‰b>3~ÑÿØ@H&ΜwJ8©-<"xD¹`­(·äDy~À’{ûÕyl ¤pÖñwšÖDèp·Ìíо‰EØ…àºR/e½ÀvMDqgFÐU)=¸ðKAGÃlKÌ™Š,îÚ_“ Ú^L £Y,KiùŸ¢·¾nel}CµE/j üïÜÚà=ž?@¸U|uùóŠ…}hÙ…ùƒa†¨ÀúåKW_SÈÉW‡ÆûÞHþ)WSÇmÔ8„±Š×žŽ6ÁUß^Hf¹„ø HÀ£7»A.ú ô'lÛDÿ-ìÌÅT~cU¼Àµ9 <ý)§á2pSBž®Wm5'²µõ|‚9âôgx_ 6òà„<ä@Þ¿ËÐç£]K^·ÅŠî›·§¸bÊ%]èB%é`Iá”ü$SŠä²ða­§Ã†Ã’_¥YF¬Ì†)ÁfÅ­‚¬=7:Má†ÉNÔ|­Ì2÷<9RzjøDÜlwÉò‡°9¾&Äî)`±ÜÖ–€ ~T ŸyáÚ„oa×;·]WÇn_Õc8¶F+úà±\ô°Ûùvü5 @ÂDÛÝã4.&¾dTs³9?åêPVè(:¨ìeµ¹ku÷§âFr¥Ø±Ý³0Äõçþby~³»6É¿Ä°Š£¨MÝ7²'•nÂK¾e=B[Üþá1Žé6Œ X7vï{ÃÁ¹x…oâÝ.rBy•£Rý$Œþ›S2¯À~&ÎÛ½»èðNqõ;z‡z'/ï7Ñj—w»äÆhË¿ñ©ÎG®Cúáêèt0¦8‚“‡Gè‹ÇÑΧ Ï÷Ùg%^– ™œÝ-Ëjôëäö8$ÄÉÛè\£`á(a:ß¹Ò¿ÿ)æ™@X6j~¹_ þGŸ‰‚{걜l§h>CcÓÍ‘ÿÙƒ~^2çxö&À ¹|eÿÕøÉüìœ_N,Ø›Ñ6÷£ ÀàD”—Ò¨*»v»)Žþ>—ÎУE z M7fƒâÓ騳{…!ju×<ˆ²Rï;#'ïi–åöŸáyáŠ;ƱÝJG‘f1+J_+Œœn^zùYá«#¯2œ›ýTf»‰Å8¢>z 3d_ó+&"Îã@°Óæ[ °ôT%v¤´Ýó^Ï'ÄÍ-{ªRý-¶h]@µ!Å`_{ïdÃ^K5Â1.L ã0B†ü®¾i ´gÊWÆ¡|j$u†q=³ŒPy·aˆ"Q›†‡ÁЏ¼Ÿ”¨Äy‘GÎ]¯W%ê9j@|LÀZ ˜T!»ÒU n"ëKø"-Bó²X2Ñ™¬Có6IÕ¨ñ7ÖU@bÓ¸ÚÜ™ì/îÈG`ž§«!Y2â0S=?N¦ýs>¹7sÍR@×J¢ûR¶þPtatxôâI&u– üð.;‰èôb¤éÈ0× sÄrKËr‡>!ÅPû´ÜÚº¹¿åyPŠ Cõò;ãÁœTÒ©dÕßZÿcßÁ“ÁæÖyŽ£ò†ËþÄ™ÃæiÄ2œšjåïhº§öðúWŸ¥òŪH̺À]i¸†ê-õ_É¢å†tÖØŸÓ@zj“‹Ÿ‡Vû›öî’etÛðh |nèdKµÖé €àȵÍÃ91ä2ÊHõ†¼²ŠÅ'KúŠ<εÖ‘;w7é.¸6ÿZX¥Ö¹þ¥Bœ®GðCüä'‡~u¨W?ä­?˜f~²X˜Þ™Š üð.Œð9ÚK’“›ðê  »BYz£¡ù,^E™±ø;8Sô¡"ü›ðºCagr{PM”ÁÅƺ1õ£{òÕͽ»ŠüT¼9AjÓ¶)òBì6;FÅ™î˃#ŸYÊÇÿ,)QÆœïûó¿®Ñ^Ú™†ŸÅfù¨ÚÐ+6÷N€™ü¯vsCÃA‘ «á9Ú®MbÀ½êҳ쯕bß3ªBhÌ»û®ZH–䣺¨(·jøJ üìXcFÃÔA쯿¼ËUa C1ݸPÕäÐr)v}rÒÁ6cÇs׆L;Uŧ̵—]VµV¨›YïÎ{Ë3™)`eƒoU<ƒÞÈ)Þ.oF- <Ù¼Š“/Œ“K0Sl@å¡6”ïŠaÞà®öåG8/c·Û·S ·6ꮢ·û5Y×Lm ¡jçwÞpŸŒ›óñ!å–T¾ñR_°&LŠÝOæ~  9¤Y›£]Xãí)P›s_?¨¬–‰ àkC°ÜpÖ~F,Süp›‡ÌM7fËðG ”÷ìwâ Ê¡}³~䌡G ) ¶l¸ñ³\Aàì¥<”å=Âÿ’ÌÑ8)ÈVïÓœC'µÐTa€f 7÷.Ç®: üÉn>ZþoºØ`Ïtm&-ñýB;ÀÆf+}~‘t$/U´%u¿¬\º˜ê 9Ìï¢ãu>Qcìš?Ýö—û"Øg=±ˆ_|^¼Âޤ½ã@¾~r­÷Ñè©£kð… %h1bŸÊ1M·Î ‘ÆÐ|hÔëÑÚð.CŠî§äöŸä6àôÞúÊë¤pˆ­Pê`˜«-{% ð¦Õ™þDñhîÃâ^‘nÏ-—®ÇÕVÔ@iì—ì/os}X„¼ïFCŸå<Ù°ã¯Ü~lXÅá–36;͵ 2¹]PÑî=ðãÓú¢¬K—ͱú³•fê?Ÿx÷ñ¬§ÐýâïÒ/­ú{jöÐ}ŽÄŠ.çÉpš,3ëWÌÊz?µ8D ­ñõŠ+×cZv³I¦a†¦"LóCð‡KTWgøW˜ÿ×.tšÂq;k¶Ø•]Ðݸæq[›á0z™D ²ºù¶Û8²o…+¥ÉŒ¡¨ëæÝÄËÆK骱=]ŸÃ†·Ç—[É~F‹J¾Ñ¡˜gïi'ÅÓÛlئ]zýúî™$‘¶â®?…ËAÅ>UüÁ¾ý…G¥KSÂå»ÚE†ö½ªd†ÑÏ;Gç Ç÷/cÙG¹T)¿©1¤|YebÔZ8ô+¸š¼ÔO,E hÎ'±²Â¡Þ¬Ì-«.ï˜\kR”åK1ú<0—ÂÁ÷u9J¨j!—}B:þOÑâÏâ‰x2ãÆZµ Æ?7ö×r¸~ÀO›+•X©?F<ÆNÝlÜ:[¹9›5CªÄX^Ù¬fÒr?rô Êoi ÍøIÚ}Q½áPˆß‡6„k‘ä¦p‚ßê¿4ð\ÏÑ„NèÕnÉ¢*T'²ÌMæ!NÍœœ Ä 3êÒ @€ñµd”L3æ ÊõH™œvX8‹†)0ãHpK{{ù[L¦ÞÇoÆ¥À–%üÁñÈ'!hþCu[•{/FþLW´Ÿ8•¥á-Ö”:G.œê7ÒZ óÖ}¸,…Ž{Šš‡ï"­)k&éó½ôzY‘JSIgÔ%Ð_Mj!GÔAà¢gê¸ Ý½«º˜ÜÑüœRE7Ñ\2ìš~'Tch‹éÞ›>%IÌ„¾’Ô¯eéžÿ×}1Ô-Z]TÐ}(°ÌT›4Ü ðt Xýð˜#‰þš“^¸Òsó •:^¬ƒ¾C^üëÛš˜ëœ;ÖÙs¡j¦ï!`Äãu‹˜Y毗1‚ók~¦1>jÁ…l'>Á"eAhEéñwˆ˜?{/†–k$«c„áÜòÚ]êÛ›»«dlvþ.CI¸ý½6á±üìPøÌ㿺õ²lqxL5 Eå¹ ]~§{ãl-%½76ÿiOýaÅ ÷jMg*òúϤ ôûZZ ìþ¯°ZK,²Uzg(CénbµM«ŸKD¼¶Es÷œDçf3Ó‰æ¤J™JÚ ÐÕ¸yô€\fŽK#U×ÇVŸWcru«,ݵ՞Rï Ìäv6¶óTÎ"¯ØÔ#ç´ÍIÅbð`;$|„¸àê?­¥n@¨ • &ZÝGDTü\´Œ[«¡ÙB5­TDAuÖ‘ø?ØË¸TÊâô_õÚ+ âQOöjGw¤q7m¾Ì÷<Œm¶­ÞÂ[…¬ô˜¼ü×D%'vƒñëžÆ„c*…‰_hé⢰EÜrhc ­?[‰XHÀEÐúŸyåx*XÐá:<#‘4·˜ÃÞd{º<£I÷Ù‘%Ô_°ó5Áï[|Ä^ÆÁ·:Î/\ ¤›g× ¨­ÓEhï´IÕk0¸X(IžÍ¦4TGCz}óùçw¹š•™¶À["æõ¦C eÔ€—#•´˜9ÂÒRûÛ`V=8b‰ŒžŠ üÚØûµ(IM¡¨Í+3=¨óûÕûüÜoj¹éâFÓp{.yWË2-±šåKN›uLüAFA"$ÿ~RØw,³Ý:öåÿÄ÷õšž›ŽL Ã³¬ò 4¸šcÇ{¡LÿáÙ—i+”I¤žô”…‰“”Üý^çÜ÷ZrL®yBja.·èäÕWJƒ —øHÓÝHÿÇ”Š³;N*£ûyã_8å =…:!]QC_ЏI³+éqkœœ?П ž€ùÒg }¾h¶„bô…½8ÄõÇ÷IŠmEq(“'Òõ›”ÜjsŒ'àŒ¼OCëÎe?mÅ‚Û⢶¸÷•dæì¿tgá/Jºz„5¹I¿Zþ”O7É‘½Äh0÷ þBye…jü×%Q€Ý²½”ùtØ¢»ÃW°C/nk~¬³t¶¡§:õy•"ÝgïМ¼T¯"å냕«Ò±©I m·d+ÓæF´\d^œÃæðyÂo–~ÌÏE!—æÉ~¥…,Êh­à­ÀÚœQ4i`)T,‚Þ!â û%M€eP]?¤¹&õ,Ör*JR¤Wû<~+«|cW š aTaVù¬‚ìfÜYÜ þS]æ-žkpstUÏQK£W^¢”ð«’R µ>GN½‹Ö|±à=¡°þ n•ùŠÒwã¬*§^¼gàSÒÂÖ¢ï‚8„ òš0$ÝŽù¼A¯ë~>¡) ,g>Î[s3ѵ×0z£Ò\»ü¢jœN…øøeZ%µ¥zVÐ_£ý§Œ_¤üÚØû´õc•ÛæQ}—¯ºeæïñÑŠêá¢p›ÈaÊ Yé»<Ó°1]El´1ò ÄbméU˜ˆ`WñKïàˆs •A!ˆA$½üÿÇz]ßoo3¯”Q‘"µkÿJM9DÑÈnŸöÎq¨¥@J¼ÔÅgà|   "3óJw¾˜Vûòö†äF„‘D™Ó΢W^O4±ŽEpÙ©¿ð˜Íÿɦ„óvôO‡:…SÔ5Å/ÿzÇ; .m}]$ß#ý­»ûX,R 9ߪ³qwzfr%|²vVèñ‹¥ŠvL »+R®ìTÜ£iïˆø±©Þ£g-…À ©1Z’«;ô³•¤XD°yåM[·iá¬(cPT‰Ú£˜ÚI† _™<OggSÀ›O!JEæã5ÿ.ÿ+ÿ,ÿ$ÿÿÿ'ÿfÿ.ÿ.ÿ.ÿ.ÿ.ÿ-üÚ~â1&¯ÉF÷&vó`U¦Šé ÃQÃoÎoÞÇàÀë:,óÂä.ÀE6=)w Æ+à¯ñ¡ÑËkÜ4YÝ‹r.†?¾M'ƒä훃PÉU/=ýðÊ+— …WС."•‘B à*ßmZ.Q(Fé±S iú_¨Qo)¼CÄŽ™ïW‹Îz}.P:_¯ŽÊ· ˜õJÔ gëO^ü: \IÛ”VZ=Ô©â³ l€ü‰Ø-ÿa– ]Œ”P±NÉárou‡‚!IÐHØJ.åh›mWµ¶e Ñ]¿M½²¼’¤…¦èNZñÕ†7Á‚arÙ¯â¦.œ„JÆŠÊú˜¶Œ±hoI'<îí $Ȧ£*yøÍ.à]<üÚ”%*ÞE €2w%ת¾«h¢iÌþ!8ŽÈºxn:°(„HܫӅ;!AЮ{ƒ8Â8ÏÀc/Á®¯?"l2ǧմìèlÓõ[pR-sªe´jRv ({CÈVld’X ›BJ PŠGþ¿ZyS̬ÛÙ­Ý²ê  2Zùk -(35½:"E{ªt³ .šýÌþ Á¨wн’[ýA¼ ¹{„g'Ô_dÕè7Ls>‘´è€!¤¾œ ÕæÑfvú˜G½ë½~L"~Ö­ôO Uã¡{‡“4ö¥¾ßAQ[î¤5ÙØz†þãõnÊa3Ìû:!Ä'ï°vÔU'žd.G†Ú¤öwˆG`mÞk nÛ’,ÖbúS©_×êɺ> üÚý1·þ@î@mDËî±EƒÑ*‰ šnZ)fºj.dN[„æ°åÚåÈbWGÎà5b| pµÞ —0ªóTØ®M%íc„&ZYñe àJ? ²Ùýêx©µMeø¸ÖIG+øèº¿)s‡Ê˜—ă”/nÕÎC@¨/ÔeÝÂ6£²]õ„“A.ÔÔk!Jž8÷«÷* áa¼£ßekè¯*QÃfO¥×$V}lbKÁ«!aÐs¼YŘݚžíÄ·l]ˆ©¿ÿXùÑ×#²¡½žêú›gAØZûdìý7½¾•­žjBVGhõr¬S3Fw•¡F›ñžþj=r#}'À×}“••ãR¿-,]ü†bTË»UÉc,> £üÖûÄ9ÀPЃ:…ìõÍ—=¸Ï"$†24%!@‹ÚYÑb?‰+JsÛ•ÿgfa¥Aõ^ž°cªSoúÕç.<£Ã^Ò¢óûiW•h_sBNIÎÑ*~|òw}¿¬–S ª×#©“î« ©=6†;Æ…r)Û(3†l*°æ«¥½ "YºJ:„†:¯ýj±Gtç%oü¥7ÕƒP”­ßw6½nág»ÎUòb˜Àöjþ††…Å_´H²-‰Cr4¤H˜ÜÁéçO¯?¥âIÑõlB¹U š“æ.ÜàíY?»[Ð@«uþ‘-õë\®´<¥’[Aœß‰eØ/]ÇŠ÷Mƒƒ¦ycºDÄlêˆc»No¢Ãüþú7›JA"AÔÝ®q׎ÜÉ¿û:f¥«ãT81».E—Œ¿¨£Wö¸ôþð)ax¶”ò62[LÒ#f)TÇ8¢ºŒwn‘ŒçÁYmä9£Qõ¢}IcŒÈÒ1Vn{@¿ªA‡ê‹ðœƒ½%Y‹¨*|9B!ÿ·gCÆ$Ç${ÂÚTÉüÈ_\³Ä{Ïó¼;ý•_5ïxQ‰ÈÔ߬·ôì©wò¯Ü"0–ªÖlÝ5Ê]“DU±£y-i–iú|)Ï?{Ê?œ4ÝÏèö åäߟìÙûávhø>Œ¯Dfçaºï™3cíU­¹ž?G¼´ÛFÃm²aÜÞKÒíÉ‹ð¹e {Z¦#ÜU…êM$$›Øãs}¤ÿm\(üìWùýQî8Èzýl‚›a4—ŠØ¹Ë`,Õ7JzÈ•{ö"`Syò“uAxƒ¥ó7wö2¾ÃjöõwøYsÿ÷¿)Dö/â!¼”m¡ï” Ý¨‰ÇcoGù­Õ)ñöÜæµCX£>:«fmU6êüðÐåjçñð¶-ñ[׸Žôr‰¾•ûÞYü#*kßBò àY‘‹#ÄrŽ.ùó[I»vhT³À›Ï÷¶P9ˆÊÚ³Ê0ÅÅOÅ5ÍîÎG­Àž×EiJVíÛÁý¼£]ìN3‚б_&ÎQ¬}‚"îîŒ%¹6ÜÖoƒ(¼ÎíÏÊEOÔÔNm…¢tYñ‡4óšãiöƒ÷wJï_âÓØä"±U×›#ñ‹ˆ±‰½R¿¬9¢a¸ù3j~ƒt‡À༖j§L¬ º*%—€øKsWÔìV êÞÁ|R< U×ô®¨ûD\ML ÉÃOöZEBÑš¦»§E”Æ›•ÕRQš©¨&; ˜žÉuvrÞ1åºbPÔ>íç!ùàï­÷I®|Øu¬Züô­)Fýß´–R²{ 4Ïß§ææ?dùùþη…iuŒS­~ø™ù–} g«ZE*Z¹0?ÑßèîFJeÞŒM· iQþÆQ9¯Ø1ÂüÞö¶ Ý©¸ ’ÏØˆ¢ü×D`†ÔÇ?ñ2ÕÒ%?·Ýª’Ý&ÿ"5…Í/ëÊ¼Š¶ËXµÛXŸºÚý‡üýFäl=F>àeRØEMŸ÷SJ‡^ZǦÉEö¥}ò ÏnM§€²—ìrŒ‡°±È´„»ËÚù³×ày¹´ø7£áж›@Ýߪ É›C•ä›-6n§gé[pUG¼kÔ ¹A5ý¥X"Ú4øN´pV¬ÁqZ{Ò¿Ñ{òà°Y•×a%Õ8HOã2tdhåwþšÃªáwm»ÐžCLòŽ‹1Lzv@Ö:(Uû1R”¢ ¿b}L°è¬A…N—tÛ5¯¸!ª‚Ô1 To£NŽL úži ŽZ™uŒ´ Óæßö‚í/úµÓ’Îòf€f{vÁÍÝcÜ‘SAp¼UK„œü×DŠ0 Š îí^Õ-O¯«í¤ì»½óŸã™¯†4ñÈJO|ØP³Ž0ùðÀùnÁ]0jÒ®ÆdsäÖgE¼öV+®zÓ™òu¯$âÐëôü·Ÿ6ŽëÖîp¿ý«–¦•0——Åyzkܺº_\•j–Øùªua‡ßOG3rÏDbo )žqžš‘”ŒNnFÀS›òûäIìFf.ÚÓnt™î06øß8§¥I(œQ? W]Ö…wÈur’9—VèH &Èìm•b äNGÉèS/mÄA2~šèد¦RüÚþtoÄ/WÃæ“·Q–E)_¢ŽÑGÖâ/KÉ%Izº¬Ïø4Îi¥á·"¿UKUp3õ¹µÛÛLôé'ÕÕŠÐ,ó„%@ŸÇ1³q€k}ŠÙ&ßÃI%¾«}Ü÷ZÍi/ˆ“™aØ*ÒlE†uçJ }êvÕçm›†ù?ÛqMVêõtTUÍO+Ó »NÊÝ¡ÛÞðPn|Œ<3x/›Uò„ –K-{½öS)UÈ™• VP+C 9âLršÒ+øcÊt–ꎟ1© §9&- _¥½Êp“4c|Xò }í0®Á!³úIü§–«as"wk4ü^§¹íÖƒÒKjÙœÛ\PånS=4EN#Q7EüØ?DixÞ2s¾ãBü×Dx7 r,j—CKÎé)B‚™gË;³KNp ý¨Ì®a™Î!£ôƒê&¡Â‡ìƒÕ­ß0vmžÊs˜W%·Bói>’Šø•žã‹OØF¨NóÞNY+¦ú„ëÔTºùý°¤ŽWÈCQå€aì¿k¡­#;›© ^1B©`”3x$ÃRÕ©ô³·:LîH}b³9ÖÑÛyá—…q÷£ˆØ»[¥Q1K>³„BÿíÝP묠Ò2o+¡®>õ¶¨ùá]/X¬¹.µ`®÷ÉW½:c}Ò‚»ªŠ‘4DÓ®}¯BâšLd{‚ü„R³“–ãX*€n‘!ÛÝø³ÒÊÄÄ—Û«ívïá³V­,Ùàë¿WtBâ+.Т¦Òü×Da6YØ2yrµoD#&uv[Ûw•£W9™|±òÜ¿3°~ËÕ@++zy%Byºâ®\½é¬ì¼ftÁíS»õx§¢ ÎI8<ú:×^´—î™îiÍS}$‚¯çïÑ=`]­øf0­ãD~Yw°—_•”Ï€{Ìjcæ°yú—èsyEÌIòn²Á²”JÉG¤zw+î0‹ßîËšë¥g«Ÿ¹*üõìÒeÇ™$ò½õIÐóÁÁ†š>IfÿÙ F»‚òêÚk‚³ ¯ù®a–ýÄæˆÀ8Gèþ äùãÅFj÷¥äúÜ1JO/ë®Ô°vô™tT>´Ø+7ˆ³RþòA nz±ÿE¨ØÑ^Ì ÒžŽÛ‘bEý^[¶.jªü×Fò Ÿ¸wJð?ï _±Ãä˜sÈ÷@†CK¹žm} =%k ø<ë ‹ž2“# ïâ`æòTÄ ¥Y]Ý“¯ÁgnÂfoóÿ_V+Åê۩߃a'òo‰ÆÝ1hWC|×¾ce¦£Ÿ)µÉ%±¯’¾Ñ.lµZ Ó á¬_؇ éì§œe‚Ê Á[§|릧p* i3´ aÂlÖ@ ¡9Zü|hduœE³ˆUºNèÌ÷¿î`W6MýÚ­Fh|Û“*¹â »u (•‹Ø|~€BE-µì ðÇT]AVî!šsç”]…Æv"eíº‘yM Û+âa£Ë$RpnSäf—Ñ@äÝ`Zòé´¶Š<ܦj®ÙC£1wãB??‹e¤„âOggS@8›O!Kx©$ÿ/ÿ.ÿ.ÿ#ÿ-ÿ4ÿ.ÿ(ÿ0ÿ2ÿ,ÿ,ÿ/ÿ%ü׿b¶zã ±¯àÓŽ¨Óù\swúÅ—§Úo©ºÃŸþx>·§yal´û®Ð?\dÿ4Ü·¨·04œ}.:—kUÚL?ÐEÞ¼œøOŒnb ‹:˜`©¨?ÐhÊÛ-˜[zúÅT»ÉÃß+ÙL~¸t<;>sÞç­;69‰·¨Lµ=º %Ù¬œpÂšîŠ ²TV:®Ðz‚u£pÜAM´f"ÊdØoÍ#aÄ Ñkõ’Xžõ+Ǧ»hÞª¢@›‰å?œTÀÙY í}aUýæúíQð®c›I{‚ûÛ’ ôEl!4"òºÆ$9‚µÔ3·ËŠØ_Ö½Lø÷¹^øéÙÕMÙ },ôÜO"Ðh–ö|+ñm`6Ê gZ¯õìiÅJüÚüvûÒ½IµÇÍnduMŒ3†­¼Ôƒ<‹ÂmQÎÙï žþCÕ£—õ‘:µ[WÇîZÿ‡N™7€QéÛwyiå f)?°Ç&Òob6»õø.Ò7PgÄ b¯ÕÒPç˜cT¥Z˜Pº¤—lþ*ˆñÉ´é$fŒr˜^¡Í´¹¥nÆ ü¹I !ç _/^ËÝ<XoV_ÖXLµ ¤þ¢a«ˆºµJ2ƒ{þï’åNé{æeÿ$’îrE’áQR&Š_sŽTýbôå5½+y“Ó£o,Ë÷›Ø³cÒp–p"LÉóŸ¡«ˆŸvué(“mÃw„O"#Œ±VÐ>h—Lo¡ˆÍ&Dâ)i,N¾EÉeÇTXáösìƒSD)ÉÊàR [îRüщgå;ghÜ~ *›böÄE @•ü~ÏêˆÈÉgd[·+×)ë·æ'áE&`%–BÓÇå E0qW®«ïÐÿ÷ ]m£þLõÃ{Á£±7O\ÞÚ:ùžPVÝpë…%AÁ`¨¶8H©Œþ+Ãö*2ä]l³°àÊá"@²%+ì’¼+“£¸Û„ù”xßCS˜²ç¿å4eQÕID] Üy$³;‹Þµ/~G_3 ¸ˆØÀ±ZÝ/ñ®t¯L|óñõGd Q-gû´BHÄÛFW· Ö?dAí±ÌEDB‹é«$„.Ú„ÀÁÛB¶×E©39»ê r‚"®‚B~"'竜~®Üeù«Î÷B{þRÞÌUGÊ”üŸ›zG/¸Š•}WA¸üìYòîU/‡^¢]¨-ЭìzcÕ¡qp…hmc¯ùH!™P!ÁXŠÿé°FŸ·÷ .½jM„oc8Ûj„R”B@Iºî§îSÿXÛ".ˆ—Ÿˆ.ÇeÜŸœÏ`¤œÎ í£ VŸ"à"‰RR3/¬üjÒ`Šà·ä4®8Úç–ò% PÕa¡Û墠€ïI¥M;Œ-ÒLOž/B_'b€xO-Ô¢Ëõ†0ÇÑ7ã¬ô·Sô…Ë./êØ…û¡9ƒn'Ò̧õ0þ4‡ :ƒzŽTú» ÉŽä†UÏÂÉQãå9‘Õúx:LJ×Ásr® ¯j" zèÖù9£ë ˜¤"i V¿wSÑØºËÂ@´Ïl–oØ(VQ8üð.Bšõ¾øµôg¶w”t–µó1»bÀŒï(¶D 1ðëÞŒ Vøµpž  ZBœðÏ*8Š„0qzaí9xÅód…X͵ƒ“¥©6™K¯`tþO@ŽÇ‰&p¾‚Œ¯ÌÑ €Dn§¯u°„}yÍ$ Ž§V¢îøYlžl'Ë— š–b ¡rÏiרR:§ØŽ«Ñ ßÙ9Smžk =/»h´èHÄÎÕåz ú„*3»©ègí‘KX&ÌÂCŸµ(+`Ïѽk.‡œ X?D™tÿôî(;”ÅnÃxK¦q@ÁQŸ¶hú0?éèL3pÊ6øçe@'iOÆÅ‚„¥}ËÛ¾´Íš¨âöLL,;MÒg™‰‘¡s?û‚oâkÝ·XüïéT¦ª8Àc’”hìFt”À  —Œˆ^leŠíHé\¢‹ /Åzfp†²(6Ú¥´©#^mëKô€å›«†Æh !§áö5'Ö6(Å¡NÙBÀe†ò°-IA“½ìÛPhºÀðF½H;†ôË8ðs]Žw\/Õï3£_{TU€8»’ZïÓÿ–¯Å †K"`ò§A •à¢[ Ä«ro¯­ë†€ã©õË}9{':²næS™æól¢YgÛ›w2>(—À"«ƒn")Êy<·¥#¡ÍäÚbÖ©GäCBÙi-(wXÿRþãþª î¶ÉÅÜñ>]ÛNú( ÈcýÓE+ÒÚ 9¹«„3$:n&°êHÐÿaÓÄ„%N±%x üê¨âæ|´yúœŒÓß‹—™t´ÑϵV|/Æú†ÿã€ÈGˆ2•z¾bÃmŠáy<œ…¤œíy;·}£œÁC¨¯–NxXi…BFÜ¿pHÞ¶ßmC².}$Y-Ä¢ >Ä¥”¢|äøÁfu§Üì¯$ƒwŸ[¹HüÓ-S C›7]¡—hOWi(umÕpô’>œGÜt¤ç[ÆOÍêQª·Â.Û…uZ@ñðo7;ÿöÃQ&Ã0ê;‰Ù;ž,x'_»êôº™6è-ñ³[ Їo¨Êñù¼ðÅ=9Î"vðgµ"!¼òÔ4› ž*cµ"UÄr⌭„¥@Mv:>ç ë™ó;×*âÞ£¢£ÿ¯ meÜl‰ÜÜ<&IOßUüh˜ üì—ÎÄZý²úhÞÐÇ74wûzCf©ƒÖÕ¥ë¤D†¨üµ°:êïc³ž“'㔂“h`D²ÚR ᅡ錾WiwU†ŒßàÇße³Ú oqøgaºMÌeÏ—0òéz Œ35ÇÈŒdéꌥM”Iâ@#Fd!4<¤}Zðu@¾ŠzÚ3ÆOL©«^Óæw‡ó”t:|fà_[5òì#ÒôªØ³Á¿äââ%—Ö¢¹ª¼+ý‚§JÓ¡ €ˆ²N7™tv »ÕÀvÅÜÅN{ï•k–ŽàSqùg¿v.f0ø–¥a»ï‡Þ|zŸø=%+ÕÓz‘&³ ï,¸!aµÂ¼ 5QÑ'§±õ>ÜDU§©×òóê˜ê&â1;6¿S´¿0k ¨üìšl⪖4e@8¶tÞ¨‡†¼L';dÜ>™Vî W¢y;&™0\“åœo¸$x  ‹ çÁÞ”ï µ¡™b ÷‹î묒«oF0Ù1<¡Ì_¼áNƒDaðá2BáÂÖ¨iöj¶hãt\æâÊŠÒ#]àØ÷¬³*NNå0ö€¦ä-ñ1cƘMK½ÍüxØYÏ%µPÃa[MòUWñ r‚¯[Do´Ìˆ¢‚¹}³˜ÿ.…;²ˆ-h¶¨§°òÝâ0dl‰ÃŠÜ‚$W8· »ˆWgìÀ—øÃK£ü¥îx´<ã„›¡”ÉŠ3*öŠŒpŽÙŸ“‘Uíµ%a¤•”Â'£‡®¬Ä egnòûŽå­HŸOáZ!¯y0Uæ$¨ üïà¶Ùƒô o[Ÿ—‘Z챯\ß#¿ (>9›à"cûðzEφšßPËñ´©lÉK“޹¦l`#z)BZz  #¶6½uï€Ä–uUMטC=†C¬a÷×±ð[R¶…ñ:(¶µ5Þ"çµÍàõ-¥ 7©s5]ÎþáïRq6Ò¸fõ y&yfæ^—6|à Ê,B„)†!ô” Þ9]Âì0«Óqnÿ<¥›´¦F¤XñÚ|$¶Ý˜Ïƨy¢©â ¿ß<­ø«”aÚ:®­*fÌH6t™i‚)ûnË^mÈF>Kvhùת"ì'2˜—Eào ïYn)îíâîÆ¼ßõÛÂäÔØŒÑØèd¹rìs¸Y)Ï~Xqâ}1)žÀÆ=Ï:¿ëÕ$”²š‘Ã22],j&ë$‹÷â03(ÙÿÅJ£j üì‰ä€ÉÕ³¢" a9€ÆbÌ KD¯ù²K¶ð:ï{æèÕº˜W8ó)×$xÀ¢×3‹bÛ=4Øas¶Ùíþ<öõø]¦ tÒÊõ—á\åÅÅþ›‚ë$Ë/Ò€*ôX›°»ªîi´Ð¶cMJSC9Ó&¶)¸2úè±+‘•J ¨3!À›i¾·­Óž{›FfíÂÅ.±ÒbWj$\”ÜL/%uvY0‰eØj!þƒ?«tP°y™n¶ x7CáLî—]jiÕ¥ø:i†*­)ýžkñºa”œÚú3‚PèÐTL1þw|°Ë/+Ø'„ÌjךQÇ@òôÖ–sò0nûXÌ\G6m–m9_¢6’]!å!ƒKã;Á8À üìXc :ÓYÚ\ ÈZPBÎpvÚÈl>H‡ÓàË ¡FRYX©mÑäXy…Xý)OülÈê ˤô<½Û Æ6Õè"ˆ¸ƒÿN Ùúñ†¬ë+õvN0\æ³Ö—óí±Hrq²—aç)®ÏÉ<>!! ê#ÈàäÁæ_\¶Û´ýã 侯)œ¤“Bþ‚ðSÊg9†y®_ð õj}¥ ~k¶xÔÌ*ä±ÖÖ9€Øžõû@Â#IZ3PÔAþñÏv·Ð–-šó¬*«¢7̱< Dm­r,Vï(ý*1ºªßKPÏÛvb”±âÖ”p[— ×áºpÞö#68„¢ã|Œ­»[Æ' noÏÚtÑcgl“,²*puûk¢öT¡( óÃÂ`zrJSŽ”U““ÎÅØhyš“Ú§ìJüí8¥¦Ó$¤ýõ¾’påµ OggSÀl›O!L©ðh+ÿ@ÿ ÿ(ÿ,ÿ/ÿ1ÿ@ÿ,ÿ+ÿ-ÿ(ÿ$ÿDÿüïêªqFò£)rœ’fõwAEÝÿ>÷°‡'$!³’4Gl¹ tx 7ùš«2XzB‚I­G¶?A)¡®<êÒaû"·1Ø÷˜Syü&¬H«Å6Ééùzˆ“7”2q{RRå÷©î$Ó߸ûšÍŽR‡ÄRwVË.ȰFÙ ò/Æû)»»z¡.ÂM)z¶!F•Y›„ËÏŸòG~_@O×ùjМ'‘ ­ì )A’6rpçÄY1øêwÝw>-k8V‘Ç¡j #8ÆÆ(aî /:©á•l¨P¸cå›%Ö€{Û•¨¾x*ê·‰Íʲ…5¸ÉT§_þuKÇ·c¶¯¯ñ¿uµ†wØ'S×[<å´; à»,̺o3‚ÞÊí4à^<Û+0Ö¼rM‘K™cUí¶ÈþiÕÖYÅG 8ô üìœ/¼*Ó¶Þ´éÉG7]q£vsM¡¾Ð’ŸEìªð5t ulUBêý4e`û÷2õDºJ×$ZöStÂHhºd•¹Sš§Á$Üü$üu˜ˆÌ—IÄ Ü,Ø­á faö±{™Bÿ*ÙÓgm;Æ|ð ½Yž÷b¤¯?ÄdqG<¹.ò¯ Xw#^Ùo‚Çâ ).5é¸))ƒÞ±Y[ŠóŒqs¶ªi£J_/¹Äø{„S=£ð |¿|ES¨hòå0ìÕwª8äåIŽ aÅÛ™Ê/A'?°!G~L~Àtv8™®a ‰CÖ¢Æv82èmšö) þqªÍ:tô€wMã?÷%'%Ïm¯ŒÑ¯¥üìjD-–Wº¹iñ¶(:~¹ZnÄË8¥rlØWƒ¥Iœ—ˆY¾mÐr.-ê¾$W8>–2ÁXª¨&kÛ:²Š¤Ð¾9í?¾+ŽUìÚ^ù=d'kÒz\¾>±¦: 7rí}•"¶Ý\ÊÍ‘ SšÅÚȱwä·«,Ѥð9Çïæ'l”ÉàXpÒZÆ×-ïî´!E-²ðÖræZ:‰cDÛ°å‘S‹•Ì2ýY„†ÞjI!Þß‚˜™<«Ž3P’ÑÅžt »‘ =V}E^atyŠWós˜>if:÷²Bù£P¯‚¬“œÞôÜÝ'(l•ððVé4½@VeÉz‰âþ ²6\mŽëÝÈJ­Û\RÜje™¿ÚD“óœqø!—Øüì™J¦ 8Ί&ô±p7‡ãÿF|_5ö2%%Îi̲0,$`¹sXA#O †e„耙¹I2EMU]+Yœ@³kñÓ3FLɬ¤ÖæÉ ÷Ü“kk^>åxíªÇB Å_¥/Õ8Û´°Â‡•±ƒœ=~®‘šdMMyI&ª™@êô½úfõjתçTf„Âç¢ÁÛºSºC6þàýkLUN{‘ýx¶ pŸÆÈñ~qʾ&ÕË ­|öò%Á}æ\y?—aô‚¬iÏOwoW'ü ³lù…é^¦‘pÇ }ND0N´ˆäÝ%zÕ‡¯?P3mê7ЋCÂváúÅc “éɸ¿ÉÔÍ‚6ÖsÜ$¬·JXËÑìÓ(üìi"=Èb´¡ÒuªÓ"T6€Í-üÖ°ÀJu¢úϼpÕ¹¶è SPÜÏbL$0¦)¤uû»ê”/0v¨a͆$!ù>’ã •€FÐ^ô=ƒU˜<4÷¤ >C‡ry£¹¤ts ½'àmÉ^ ùËH¸W²Í"°¾JÞvጠø[óáÀãþóUøq4iF·5çÙóR™oÝ×}ö˜béR˵¼ w'E•iÅWºg%Õ¨CÚHö±€¤ër(Xͤ` êÍu ¥U+ú•àü1‰, ácZ)ع*:`¼ tóß+ptµbè(Õç@¤²Ùpô%̃éDäB¥¨™}‹Ñ’”«Ñ£«ñû ¼ÿ­#J{R“FíPtù‘_uÐ3=ª üìœAËagÚþx¦”¶uÍJº­\Q3çÂGô%;1~kè±KÖ}˜J¹8;ÂJ¹Þ¦ý0&Ò¾_y˜ãP°¹»Ø}ðôgß}J#áÌ›pò¢ B[rŒŽRp Ï Á= iˆF ›œPbc³Ê=Ι·î=þ´† NXV>/G 5¢À…ZC?NOо~ëòk<Ìå¬1¨;VrQžXEÑÓaèëŽ ?tê¦â›ýfkì¬=~Þ$¯SòÀ2¦Ç»œ†Œ#Öïq]\~—Ø8X»Õ« ÉÃ'Ç»K-¬[ƒA9?^Ã’·¤3½Ì]¦°Ú5,pþ ¤·ÿ Lʽ3¹¤*לR`)‰µ¶ÃÞI€>oŸ44á³·å8‡ðK‚Ö‰Mšü×Füj¿ÔÀ%Áí#ýŽâí%È¿êNÙ›Ÿš³j3‚ÛÍ\§ÞS\iw”oÊ{K•2ATw‡ÚQi†: ÐÿiR„.:|ÛbÉÓ,<6 rÈ=òa‡(DÕhé@/pÌ•L 5Çý]µ`.SÒØêJéû@ðVDÓ?Ègß«’ÍÄ4ˆ·ÌÏÑï寠ö0^d[·ÂÕ%>Œ>0²/ö…ës‘ŒÑ7ôRP.v1n3ÚzÅ¡¥ò{á€bz,ÿ§Ä®ßÁÉïuw–7øµÙ2îµß,‘fù,ìÇ<¿ª`ºÐ{‰åûB~ÇZ¥”åqp–pÿž1ŒOØ¿‰ªä¡x„„ßeÜÈÑÚ:„'7ú²…+ ÆE5€ÞÕ[&£°öÌ’#Ìz×¶µ—"m¢vÄ ©“üÕZS²™4+b-‰bQÿ\Wã¸ï®Ø¿®˜Þ‚ÔiÕj=o=Ÿ¾§í~¬ékìA£*ŸÒAmðèÈ2b`ZT1wã% ØIˆÔ¶ù -ò‘¶K7–e¬T(Æ%€ ›ÖBõŽ¡^"Õî·ü¤‹>7’¡™ôN!½0ªV‡Y |5ó[Ñiò¼1¸ƒuàâ:³¢œô1d>ܨj›GÁ¸qø'>¾Pîx•R",óódðäWïeņ¸^óýŒÌB³ll×ës·Ò¡¹Š£Ád1^µV=ôÉFŽ@@Tº@Qí­0"„wýc#jU((hP3ì@(ç5@Z,ǤɳÎ>IKZ¬ÚåJ-6¥­ bc§›Ê/I8›ü×G µæ”#䪠²ö™¹O¤÷qPŽÈ5/nžó4â,¿‹¾B¿TÜœÏtF›ì¨X@6eþä\•°QæÖöõ´«œá:­Û?@ÏìÏ2j¶ÒŒvŠÒ÷ö¾Ä$M/®,wvQ’¸ˆW´”Ç1†ìQ«t½e¶†íê\ÂF ’VÇûöö°ç±åPüŒÆÜUûb²+Ž10Ô¬%¼ƒIñH<Œu¯EGu$N:5ë<{Ö’úÿ1˜ô¸9…YRܾ>…ú3Mâ(G×þ JáQõ䯙¼D7{¢€™+nh˜ÿ†êN*Qƒ¬‹]KëíÈ®q /‰„5Õ#[ñq!øía:¼~cRßÏVÃa °Éi3›hû­’+“ÈOl—CìUÅkü×G µæÓ²«pÝHß4ëÓz%T—TÏt±·D‚é­²]S FSù9Öäô_æ)àC÷éæü- ²º{5×xHº‚‹Pă'ø‚)þ€ÐšáýfÍ9µß² Fy߻Ϻþès:M×9Lô<‰v“÷nHÖÅjK{‚Å5 çT–6ÐTÆ>`ÊîB¬áùmÎñˆ?žSY“E’Ò˜£yj%ôòo´¼–¢‡ÝIÝÞÇ4€üä˜ã¢É1±èÚ2g¤¸€ €aÕ–Ø þÌ1Œ&m¡} úØ^ö8/ÓLeDË?°¹.Î-W{^±{wlng_ÛúfXôƒ–ÀïÜk‚Š’½)®ƒ®¼Ö¼ïie"9%¥.3@—/MWe’ñêp³ihckQÔ; ©*kü×D_…o^3u‡ŸM‹b"oÀò,ܺæ»wîEHÊ+¦Ð`LN0S`ãÌíeNé™Vë"26±ŠEk ì¯‰Ú hñt…X •.~Ùü 1ð-ýÜ·;ñ [“VD%Ò¿Z] dÅÎ׈FùlÐ/X‹etž–ʶ%ŒQyj'Y-’fÐbªv¬%)=¼þkëdΤéÇûT‰ìÍ·»·£Úºó(“ÆtÜ4·µâüÏ'[í!îô¾hœîZõ²êB]—"ÁX‹†còüFe‚¿‡¾PRRްÙ8Š“Õ[Dœëĉ–½"á(ø¦…çš«úè£7Øa ¸ @Í«‚É,«6ò%‘Δ1Ÿta+…ûü×Dascn¹\¬(˜|­¶î_¯Qñ-ý8¬5q1›l–sNq¶¾„e£ß‹½3°`Q)5‘ÅÈŽ3ÿenl"²‹Àh¿¿eà2SdL &"“¾ÅnaÝc¤yÖ±Jráó=GÑ#ÜÚ=üR¼¨eý>H_Â5Ä ÛQ=ÍCS¬(¨ÇO? ËôF³8´[^v/‚2¬rW ì™ûÓl“ÕéÆùKÃŒ'¿EH¯y_Šü°oƒqŽzÙl¶(šîÀ4uÒ÷ëiC±°tÒ, Ä õÁ>»eÖz¯GƒÏêß÷©âiÿî›<ÑâóáhñÖL1ÀdE=/q"Íy'ì^A;‹6¦ÈB²,a¦5CL;èé sî¬ú»·5é¦Nº®c üÚØæó¨}“Ü)ó.=¼Oµ’qÇ´ ïu;4¬dζ§ÙêMc£½ÞOëŒ@_‹ÃFãü††‰x‘†Stý”‡ìêðÊ£7ˆ‹_5 Tç.‰Lþõñž¿ÕÆïÚï“v¬ªø ¥Ü¿Ò¯… —ð1Õ2ã áÎR£n72¶¾£¯iéç¦Ëõz=››Ý’×£û¾ÕýXílkm´bá‹õXu¤ŽÂ°°ûËÞï±^„þŒx8ß\>3¨1S>|¢ÕêYí&^Ü‚%Uúúõùû=éw$ |z¾ ‘%í)šZrÍdf•kz%?NQ®PA›-ï—kðôäzž§Ç-æ¼Ö°q÷G€BØ{Û®¿ß¤wú©´ZŒóyZHH ƒšµ\á;kºóµÉÔ€ {èdV¾g÷åysü×Có¯¬bîõHžxÝb1Â)A‡¨lA2Q·оg"Âj^ݧN™Ùl&–k¯3ÌÆÙ¬gA“Œø°q‚»rÁ€iqE{T°}~9Y§ O-ä]”àŒ£3=”|óÖu >â$ NlV‚i‹XkéQ9¯åO+ym7é`½ù,>ט•™d"ò¨rN :!€ë嬑ú[ùo¢›­'דÛP$ÿÉÿŒdCa.EA¬üÓ‹P—í®ØW¹d”w·0±qœl0UmåCg¢œYðzº0ž]=:šë,{EjóSàöÙ+H°RlÞRìè©j^&HåE1L†CS;¯GSæ$©¾®÷ûro0rmÞ!qÜ6óOggS@¡›O!Mæžð‡ÿ(ÿ4ÿ4ÿ8ÿ.ÿ*ÿ*ÿ&ÿ>ÿÿ$ÿÿÿü×CVãl–5$‹Ù’oO.Ì¢`ö¼š”c¾±»Uð‹jîªjÓÉ?HɤŠÑƺi‡¸´_'è:ÅÖpé+¯üõ¼j§äê|-ÂðI†o]–Y3wä¨Ö.cùõ|,¥ŸeÁçö–\Ëáú@Ò“X• zÚ^r•ÀNI[_'†¡øò‘ž¢F¶z÷‘+:•kpkdÁUMKF  "Ÿ1Óp¾@¸cØ[¬;!´{á†á{ EPV…d`9áÃBnqëðÉű(€wZZû=⃪t‚Ñ™aK?ßÉèÔµè9܃ý›vR¼À)$D×°ý½¼ª e{t¢«,$ÍöÚHssó$òyž¸´ƒnÁK÷»ÓŒ B4éð(ö 5È“ü×EPzËŸw¹Õq‘Ὸ7ç–²Þ½‰²äq~¢°{a¸;1Úø?p)óUõÅÛ¼áàÁ‘^¶x\XóTêòºH‚ž<dzéÄiÑz%b\)Ä#›z€CI7Ç„íôÚ1c¾W«€%-§q€Y}ê2Ssû%¦À?ìêH§Ú×â@A¿ˆuC0 zÊ9ä§QìÇ=ý´XÍŸtÝKß¶ÏϪCéަâËwì,Ä Ý÷|LµÅÙS5ÛF)µ$HFÅNSh¡cï^v߆–Þ$xYL—j˜£2ÑÏ G®¢Ƙ<¡†áÝ»:žõ»lÀ£6é?\óšµÍ[èË+SïËЭÊ÷;Ç{Šfº¶ìçˆ:œj•÷ù*DR¬3ªlB_1³¹m¥ò­. $×Ðïü×CJ󦞸ƒ#áy×Är÷¬•§×¿QŠ\Ç”vD,H” 0¿#[%ý$Ds]ÀC"Õµ´ˆŸéÖÇ5ÂÑñ|ý¹ÐC4:¤«Ä™m…†ù4…E}á2¬%—§ô†ÓOÅÇôwãø £DL9Ñ(V‘~·üYEÏ|9Ì“.Á5vGÙùÈYÏŽ7ns%þ´ó©ÔÆ¿³´—pÙ’µö´ŽÑ˜R‹9êã±zu‘l¡¹%g0‚c e€Z\Ôæ%I?žnšFgN«J;¶@…k¸W0Ug“±Õwqo †©ÆhB“m!dÌRªÇ¹gsº[Ó,ž…+õ÷ï%Ü;mëÖ>#À‡$Ö·€F-Î$0RÖ€çÖ2*z ާäéÎl¯ùFÌÄŒ6kò$Œg©VmR’ÂlkêÍ(~3¢¨ *üìX<Æ% ŽNeìJ¶™â¡k« tuËóž"€(*ä~†btV†SÌNʬP uw[²öÖo—¤üY‡ª“Ë»ý„¨Þéð…b8áïX¼„©Y;ò y ©fêï‰mº*Þ¤ÉêMš­Nö}”‘Á‰Ô÷m, ÖËüÑg ÛjžªÃ‹bJ'3}ïàd'KUºén$T4ܾþ~vÉ?UæO 8›€á¿GN­}Á¾`F:·ckd<¬µî-åŠ2õĤáÜ 9äðuŒ¡;9KèP 6fü«pZ/é4b¢ž%&2.Ù{ú,Sôâ%Ô_=¶=/¸)¤~Ë#|¼ð?“ic-¶Ç³± ¶zº üìÓ WøGnÅ”û{œ`: 3¥Ž’åhGÖ‡:„Û["Lq±9Óu@9m¯Žš% „$®H΢–8à=ލÜrò«¾Þý¹œ,Æ:.DЛFmÔ ‘ð¸s+ø÷+ö²à7ºÉÊ¿…ÁƒpQ”«ùúü?Ÿ: h· ÔÔh¿hLBm·D½ŠZ…éž>®^±_ê.³ûSçc]‘… ôxÙHQc+7C‚¥ªyH/žu>f’LÏFÎÖrUVŽ rð-ýPyÞZZ?rvˆÑžÆ%yžjAìö¿å¬¯¥—Áøï5æY<¹´žE)s§6är£e«Ðzx¢“&r¶8q"ÝÑBŽ<ŸúaÒ1dÿò±"žÓÛÆe¶àá üÀ(ì]^™ë¹MÖa /& “BõC’x¡š¥ PxÒjÙf0}c÷wrמ(¬PȰEyª?çŠñœ}öµÏ¨úñÑG·$¡—ì«çÄ#c ÁÞgÃÛ4K‚Z}Ÿ¨æ( +yòÆÄh*×Ë ƒ²É|þœC¼9jð£€d'sUÉŒ„O•„Ǥ«ÙÄÀª]Ðnqo2ÄË€¼Þ;ôtÂEUºÑËeMæó(D.0ÖOš$ñùñ&¦ªûØ“v{ä¶g 4UÏgá0ùPY¢¿QDªÍÞÏø†– :räuLßî’Ç4 K´z‡¿Æ ¨VDÒ ·ƒ€fXg¹Mß’Úσ»4ÓÓ±‹t’¿é‰ŸW—xÀƒþ¸é4˜ÞF¾_c­†ýÛ¬¦ùÖ´|â„ [ü¿þ—©ó~œ{3V£Jã LJpÑÔ­S•kac‚. ¡Ýî1Êd¸Ü=9Z#^D÷… ZžæJç׉qµDkWûØ]ÆÀ1f~[¶î~\ÔoðiùŠïÍœrÂX‚£W‡f¨Æë~9‡›z@‡Õ-ä´¢R’ ׄ˜p”´µ³‰øql4Ï8d§‡z&Š“àï`˜Y‰Êÿ9zVÞÐþž;cALŲáçÿø1DLy‰u¶v¿mIlaœk„ ¨ïãÃu¯îKvZ4È“œK}ø‰+Ö­fmlŽ\p–ð8·]#)8Ž8 é?ÕKüO=LE­g6@„ƹ­÷Ý©ãÚû¤3’݃üÂreÒè·3®Ó¹aí¥î#^«˜+2-+-Þr:i´Òzáß|TÓðÎJæ}ÊêŠoó$ ¦#b]‚Q?»à©ñ45'’¢‹‰§s‡c#‡xøü1%Þi Ä“» ¦Â\W飈ÛÙ¹mø…Èt¡vš4=úWn Ìšð2Ïö{úÉ™úº’Çõª$p@”RÞ-6*¶ lÐìCJí.Í,”ñ' ï®{ÌZÖh{ó›M=àn"ú.ƒ£Wk5UCІ?ˆJX ²ŸÖs?–Pù\œ¶‰ð©½tYˆÈÇâÏ=&šÒ™å³:ôÛ:kîÞÐ`|½;6aË ¥ùtRyâ]¤Oy}¶Î¹´6§˜î5ü¶»vϾúÇŸkPÏ÷óP£^}´ëÙƒ±åMÙ—›™Ç=bo€m<|꽫Ôñ}ó/nº*ߣÕYëÞúÎ:pvIù™G‹•%ìî"Ä=' ãéiç(…†ài õH\ ÈÉØ…åò2I4hFâè[/©”fj±@Zð÷ …±Èí©I-ì &Bè'Û -ŽÍ*JñçûÓÎ;âdWøÛô‹#žB™Ão……šùa ÑjªíqY?<ú¦wX‚€ò”aõ, *Ô…Jȱi´wå1XVi’¶ù%êG§[y‹Â E¸¤*\Z0êâêõKáG\ñHEE'½¢O@@V:¤†ê4)¶a€!õ²Rez èÑ—Ä^p@§z³¢‰*£Aâ3‘ëtÉ^6–ƒÄàº3*Š5«á#®Z߯øÛ(­û½ºz­MZ~¨ä{U$)»X[Æ_ì{ÈÊdžf%¶ÙV¡¸QXþÈg"‡OggSÀÕ›O!N=·8~ÿÿÿÿÿÿ&ÿ(ÿ!ÿ ÿ6ÿÿÿmÿƒüÚ”~Û¶ O¨¿#=(H…Hˆ+ GôõÒãb'«k\ º 1-ä ~$3ËYjslQ*dµ"$Nè9¹seÿnöµ¾°çc«¥k{kC´›36kÜ5á`¾ØŒ·¨\í"p’nèm›˜H~ï9R¹ à†4¦à0çìQîÚnŽ}¯sþ½áï?0kõàXƒLâ™S³hᤥŠxê€g“m©>Æ“ªÚ°YÙ¨k)l®Û¼Ò"C—.Þ¡D-¦Üm)$Lý½ÿšewn=Áóªö›¸!<ÎŽ™ëâogiÝAQ‚¨$Ú.ä3 ³v2já\Lœi¥*ž‚2g»ÅÕ»)²D&—$¦•þi0¢‡üÕZ9=lmZ¡L´éÖ[‹?”ŽýA¾jM§‘]©¼‚L”^Þ†e¹3 °+ËÜÇ‹± Y©»KŒÊ°ÏÎ÷%Oß#‰‹ÚK;ÚlƘU#ÂÉDMƒ®…×áг¸—Øùü³Ê>+ÞëÊUjŒ,†œ¡b—5§té°)ÕÆÃÀ”°¬¾mYî:º+Ç=voªë•B+nê`F–"–òO¥jæ‹Né½+K*b`¿Ry%í5±‡¤ÅXÁ³†7Ò)sUþòï›C*±Ú Uß)„Öz‘J†Ó6pUÛÆ” ôÓËKiήœvçÚÌi–‡ÄJð2„q•(¬ *KQ(gM©¤úQB%÷gÒW—*vîÀ¢ªAÚÕIÊÆä?“økKÓ²ŠZªdcC9ãRöƒNH·êJ²%”?Ïr«­1†`<„ËÐ|ç ºÊMâ'^Ùƒ0I®,<›/-€ ÚtÅÔKÇVjrBqsiÕ³¥Ü$ ýOcHNÊ÷~ÔüF8þß&ÙsÃ=ýo̤é?O|øŽEcìšé¶Í¹ÁèRMNeC‹w|˜ÙLW³Õ{*ÖÍJL0swZO‚}dŒEþÑ¥’Þ~ Š0qfñ¦lk€šØÎ3‹,t̲Ì`„MÝ&.gs²Ü>JkOÌzFu¥þD)Ð\*šúL-½dθ’ÞôªŒ×h5É‹ÝuãŒû,ìóÈ«ÕȯõkÂh˜Ùè*rѲïcÀZbôû„p°3µy¯+!DAIuÌØéБ\ï9‚ÆÏ‰á‚ÛÌï´÷mzSvRâš+©Èœ´4gá*s‘<,ˆY9ž›o§ a5ô•¦ ½…ÅóYYc°U¼¬géN4JÌh¯Ó{üÚ”~Ï~!zc¬ñ­÷±6lð¶^Îóû–O¥Kh iK6…)HÁ|ù—ø¤UÄñÜ!'µäVuVÚ†×Qäù—|Ôo¯!Ú‹ª?àQ•äÄv)›Æ‚’Ò«sDaŠ¡¸`­­HbF 5.,žžÖôdŠzCë/Ö#¯!D¾ÌèW-\÷8Ž¿:K¤&²dÒeP!tM ÔÚ Ö5Þ sÓ,¾4™¯B\€ANŒï*‘’ßCÙBúÀ`ŽÂ`GäÙè—&èÁc6î(½»‘íeÍ:QTÆ)Êp½^[_êeº¨¶ÔAïÃçÇÿiÌúΨb;¹˜Î<•ÒÆ”ç÷@7î‡Z ½XF¾­% k|Ks¦âAaš t”ïî]© r„ü×è{¯ÈEöÔòoßÄÐ"ñ£ø¼&Ήöàåð<@²Ê‡îàE}‡bü>ÅvýÛŸÉp:J_@çõšÈK“&¾‡ YÞ|@§ºÿ¿D T¿º3bè^æaÚ5rª¸ uˆ¸¤ƒ=÷Q‡Ú9q*Ìt‚xô¢f*"Ôvg½9*¦Ìê+¡LwT —ñ^ …AŒçû¬~§<į|,'…Ê[ýŠšÛn1‚‰FÏhõÈåØ<€k,ÌÄg% ÔG™Æhâö>3!…ï%“3Òt¥ry?Ð'«Ç.͘Q]Juy2`9]øˆûé¥{ª;N·—þ_y‚C7F”µ0Õöôˆ+ÎòþX6îbòÜEÑ3L|EÚÚ£b&÷IÊM"9h±oF3¼4ë”°1ïP «kòGS®©ŽSr¶½Î&B9K3SÁXR9Ù ¼NPí\®9EæUÇöâšÉÆå?ý½k*ä¿xÏ÷Ý5äêØµ;ý±ROiH ·±«òRt¬+S¿¢OCvSÃÀ€²ŸÚ" Ç1#¤}¼`ìt$whÙnæB òŸ&z¼ŸšL÷âíãà]S2÷Br,´4àn§Y¢· È\ÍØ„\Pbá&°¾%ZTx3 ¬aâÃYÒÔLÍ/ÄÛfš¶Ô›Z+€òËc…!þüK€j‡íÖb •[ÿ‡t°¸\4Å{Å3·Ý|â‹y0'Ú•ªgo&,¦¼¯÷¼?à (s .1”àþ3Ân °äUûûDk¼ÈÀ€æD’ø„×ÊêÁeu䦢¾bžtUí ±¦zØ/G¦<3±æØúmbB»ÉK#­ªà6vÕ‡À="ÇÓ5D<>΃'V?Ê…Wžð÷¼¦TØŸŒLÏ௠·XBÍOÓ¡|åñ\šsØß³ÎòYý¬C#3è4$ëêÿûøÅ›|àóS’ŒÀàgÅfs8Pwz ÀÔoÅ ÊŸiæÎ€¢úQyþìoÚ£hc—¾–;—*ƒ—/ŸÏ°ï$¿o„Í?©¡ÂóÒ-nMæZrt™Qp'æ'òM _¹‘}@ÂWŒŠÄ¾ Ê(P8ÊÉ2ºÈXVzè°Q â`@©„f zI R"wÛàÕI´nÕØ<Çíê0]m • ›_AñwœF󯝑G£år‰*êŽÚúTÂ/eùh32ö’¦í·þ7°6`{Ûi!¸ÆÈýI… ¹øß¯ ˜ü¿ÝÙŽ8Íý²2©²-1ÒˆsÐì<½þî¬P@E%võ{ƒD|L‹ua`e’¯â3a„ó@üþ ˆÊi Zôª‚Çö‹’`sZߎoî×kÿVÜñ]ÐD<>øbŠ•éG ÓäNRÄßi;""™fuÒ£‘®¼>½ª@†j…Á"þà“„kvàå¤]¨ œÚbzD‚˜)G½$°qBzuÒn'×ZŠuI²$âJ†I [Ü#Ø×Œ÷ù8Ê+õ`éÿ›¥n év.ÍQ&=ëY•ÞÄkÒ-Q>6µ“ø¡¿žÌ0ج•8®¥°/âë#vÓ—çEÕw-Œ 5±BЭÚRZ¹Àt¬…Na8z‰¨…ž=8I¦q“ÇR±$U±×êß;VÌÇ L@ûínÕAƒj?U´e$üPPö†VtPxÁô½Ä1ˆ¸÷E¨¹¯¿ýØéß˳q)k@u9öSoÓ³„ë›nÂneªlÓWŽÍ=ìþ†Èd€öœ÷ÉŒ yÉ6S¶SÁg䪱BPè½(ÅÁä$é¼b=>× œtt®É“}WÄÍ?,Â/|’JþH<Ö¾Ÿt+8_¡ÿ`³Óý”þôJÎZÔ_ìŽW1{|øÉã™S‚,\û!ïRÌnÛfÏ…†ë*ªæÃ÷;25=…>ø£/•¤5¤8]<ÇK,-u:U-*½Èfãý%=º-[æ@K>_cè |ÞDÍóŸ HÄÕfZƒà£ RYøã?d("lÞè>%ô«õüÕTܨÓá r!ŽaóçdÌcà••‹ºD‘˜Hw!³ó'oËà1!ÍÓ¾…^ô@ý>ÕEÅèQð*LÎÐz€º5AÍ ylÑßSkñHÍÀèÈ¿7´úºùØÿýK—CºïcC¹ß‘UÈ\¨“†C"þq"(‹‰·ÚI­d^/ùIy5š˜…jbÓtp³€÷&¨·"iî;þÁfÒ)HF³•$ìrÜœòp’¦é®íl+â„ ¦ú#ºfÖø—'hR¼&/p&ÿ¦Ôj2˜[ÈãüÜv£ßý…1¶Èö‰œWGèditžœs®Õò–+lmùã¯AØîºbã£Íï¶3‡G­J=¥9£ØSï­Žó ¾wÓràv;BãÙ"Û¬ñAÓÁ>É+W+Þ·ua} È™ˆ„Ó>‰}Ô߰щ+¡òËZï¢<eÈŒ¡m¹°(Îd¿ÿ¦Þ/ì–)Q'Dâ”|2!«ñïj ~+£ô倻Rd˜ªÂx˜m*Rï`Þj¢ÊhExþ$ƒ— €ç%x¥zÎõÞ´2¢‰lœFW®Û È'â‰Yù HóŠE»C HZ=ˆÀÈI0Šõö'"¿ûco#Y'ÓÞqÆ$®½é:?'bÅ“¯³íÚèúßž("> ¼:‚Ë}e_é ?æˆ"ÆŒÚÚ5µüÅ©IÀìŠõpö- ­g¾2—ÍNà}ËÐá·ûN€ˆÛš®Ç ü¡ÿ2 »¨r–í{†šo×ÕB…íOJךZUaÙ§+Ya†ø-S•V°RV¨»¼hZÒÅ|öQb÷`€ºP¯7NBí:#‹SÅà˯‡@£Ø|õ¥s¯At×¼k`2ÿ¹†÷=ÿH,{ n3¾€RübÐd;3‚óágd(`çÿ4Š[fMbeqÀUÑÑ›@A,ᑘ˜9O•žhQܳ‰³¥–’ EXî²ufòl1°5ì÷9JíÙRôìåBƽºpf Å"Ô¯0ÛÕR®N›àBô ©šÅJO£âgºšfFœÍ‘ÝžøH5@\ÿ䔕‰ðü{A«Z3ý5D,¡­¡ ;GÔGK`š¤­ºçUyóÒÇ\XG®’yÉ›V¡ªW…üúƒñdçæ#ð4@½W’JÙƒoMó5$9›Þf"&¾¤¨‚ H€GlùT½ð_¹†öÒ?âÖ"6:!=‡øüI>XȤÙìiÍ”Ï "âØO_ûÇ_â)ë}%²†=ëj_2(:=Æ„R‡?ºÏÚ;MÞ²Þ1F§Œ1Éé¿ÓËáiÄxÝTYZ°/‘R‡ëŽá€ª¬¼ÊHœ1ÇûD­kO¬[»„º¢l¬%n¥ðø_¢‰,Å=ŸH!äìl-Â¥2xlÌÆ¥÷}A…µí=u“ÛkýÍÆt_ãÉæüÕY`U}¤WŠ™†ñô*§/*Ðx拱^,€Z³]bûù YAìéÉ¿*<¬n÷,yÚJ…ð/ËyÍz*áDTŽïãGèÚ1e™Fé–á 21õÄBÝu˜þX¼ãÀ€É‹S_ð]×Üõ‘öؘ˜V¹¥Ì-Ø„]$¼Ô=1Ó&³»Cyq§|ÃÉI ¥}zÔÝ~´9’ìûLSO…š´¤6¥<ðBif{©{£±–v#âõ•é5kj"æjFÁgWºáŒL! *[.ÕªK¿LÜkIÍHbl)µcw'Ñf>ß3À Üߟ(LIuƒÅ]¦S €g;­^ÉlZšÕrAKt|²C†ü§GÀç]j ót{‹lúâjåiSdoõö9Uq+"¸ä¢t=Ö²5ò¯¯_¬"Ö-±t‡ëm±/ +Øà4”° P^wc±9Ïÿ]ÆiêÇçAšpsœøAï/Kt¼vrùóئÕ+ô 4Џ>IN§ãZZQÅíµTЋRoÉ|…V«$³ÀËš8€è.[‰ Õì¿H@½UMºqò°¶W´BOÎÝÓBO7ݧK/tl±¨×õÞH$¿…†]DñŠÔ˜ê™ë‘Û¥£žœoDpæôNαæOvyø±™>¤[}žU¾ÛÖÍO¨:ÎP¸gc"¿år›tnB‚à[*#©q­]nüB<äuL±¾B?X´$BôêC9ý½±_?$‚Ö÷|úÙá¹Xw…l,-)«×ÂOOGÈ¿lÎÒÜÉUå†ßÙÂVLò’î Lr@— #dKëy$RP>àF[®„=ýî­°ÌM‚ÁÒݼâº{¿³0yš&5ùRŽá‰ø‘þæ TÎ'؇U3 .œ?‡û Þ§L¶7€%hH~¬GßfgÁ¥Ü©[Ú¤xÆ På‹1û¸£Ó’Æ—2ÙžÁºÕ·W9 ÂhÆó$£Á(IÙ©2UЍŒÅûåûc/ Bî„þ…"òÐ ¤˜§ñ£˜Õæ‚’‡ ÷odÉR^¬…€E5‡%>>¨¯7Tr§ñõpˆÖÞý$ßÄ^ÒŽ >Ù #F¢3ëWqÜ·oüRšÐ‚9“äÙ¨Û|*W²ã›°V¡eu㥜šW½ï7GV©*½j¤g9bx#êª?䃖?±e–> >ÉðNVãö×\Žª”œ¥ÆÅŒF²±Ø¯EÚòñU¤éŽß`‡B½tx+á`9ò­ÿS^D#R×ñ)J%å„ËLãœh.ÏËÜÈ|ÉÌ»´ ¨ͧJFIDÑð‹Š×PÃi\uEø³S¦Ia’˜úÑ$Œ¼š1Ò¬úAz½š,A\ܺŠH2¨p {"» «‘©? ( µÚÞL©9è¼'ýæéŸ\g.HêFdÈñÓ]„¿kÇUð÷Ÿ9ôß¿Ò'ù\ÙîŠC4-S/ÛüÚܘÌrGï¢Pv-4¾TϧØÐ­YʼéYÃ¥ Åûž`0ÉbƒÞ‘óC Än2˜rªÑ)à¼/ê]¢q#m(Ñ·W•ò¢s5ÿ&’-²G^¶Êã‘]|ã¯j]éõ¿v­¸SáéûÌœ=UëW‚;匜Ó6u><~o¨ê†Ã?c¦ ð6#Ʊßííš§7ê/\ÖÆ$š7òm¬fkíFjO;¼ÛωðØãóÿ€-å ±°näDÊït=—tJ¤”§¤Û·Ó²i"*Ñ G&þªgf÷óXÚßîBÄàÙ²úƒWåÑŒ6Y!áôó°ì uÿiê‚l ï3«¨þB)•ùÂ>‰ò¼@w*äÂcüÇ7&»5"; §[tëjŇüÕZ‰|—÷W%  –‚¹Ešßr*ƃ¹DPÕb9‘.E§h|ÍãÆIyŠ“WþçAålt3÷_Áp9Èô6‘E‚é<¹@¤} Ú:xiTõ(ßá9“ÅH;0 GˆžÆš$ç‘…œhÉ›7üTyp!5á‘|™ØD1i0Ò ‹NW}Ó«ðôñþ<ÌéV>-h, ¿½Rá£qDÏõ÷¬µf'ï!Ž73?fíé«r’w úšŠIÂ"ášOpðj¡WK ž u¾››÷1`µ„23Ì)+¿ŽŠô‡VTìȧ=½Ãôí}Ð>H>­ü¹w-Ö"€º¤¬ŒTÏöó¥ÐÌsÅõ7‡PàjáOϼËWÆÅøýÁò)Çæ¹Ö*^®ìWÝëõKn›ØBrá 1^`6½ÊÕМIr˜^‹F³L§Eîæ¡Oš¸Ñíè˜q•›/›hùçÈqNñö6 ¹ø_ÇÉXå ¬£.ÃÀEëÏu^ì:{gI¥âÝë\?G¬T¤Ü̃0Ïf@S!Bzh­“çVq ý´Û°v À‹ó×}שJèyÈM©;s‹Àè¢B,XmÒ)øógø-/ÉÐbŠŒwŸ]ÑÄþÆàtBALÈ8‡üB?.ã”íã§•ÃG±P3!ôÿpÞKÇkHp‘«FZAÁ²ÒÊ"4ÖÏëH$ˆBG†›rH³Óš)@í¹Ê§!5! ö@·tG¯ª÷eóõÀ…rà}ž(¬÷0[ªÐþÇLÊCš¸òD©Áî˜÷9Rðõ”ùÄ,uwŽëžù}š+‡~údië„ʸ²wÓ·J-UÍò¬çѳåÓ<(‡Öª; à~…¥©ê㇟¸9q–g«mq_ñîúÔè“ø€ÊCU >Á·Ÿr³–Š8ÉÙ‚¤7ä{@O¶ëüú÷ÆhÒ®wêe|(mNméžÜ{Á‘]rLµd|ÁÒœ õc±×q=¼FMxJVÆõWÜØô(ºŒÖ’[BÚØ®.îy¾¬übWÙœ÷¾[W.uk$Ý{fzçžæðæ©[fYú眼ªÏ9nËYòJ²Ó˜H&ú:zR§§¹ïfˆ¿\¶+ÍæNw ~• eÝîáÒe©«S¯%gÕ47s·2ÔFØoŽ:¿Î¯ëËfðÜ@#$7U•ãG OtslH¤ø•$ì—öä®Î]#oË+Ê””fË­`(¼z9Uy(Y(ÎB Ö˜¬:Õ9›¿¯¨D—†_©qÕ¶×ߌ9øú8"¯•²¿¨¾ §ÞÒJÖ–$–{xIÄ=Wö°±ÂÔ1I½dî$ùYN¦R×A+ø³Ñ¿áMŸ°ÿˆýêl唬ƬY»xi#~tØ<Æ Ž‹DTJ7ûˆü>vAþWn¦²‘°ÌýE†Œö¹TøèOò¦L¾¬­Þãþ•èݸ_×8û˜†8ò`¾ÒNð ൠÛÒàÈ“cÁÿQ‘ýÅxØ ¬kþÄ…ÛTKm†3›2Ì×tê¦b¼YLz¶4dT8©]+8‹«&€›7Sµç7PNBÞ™ k󶪷uívþÚÍÍÊ;MšEFFñ›ÚH^_ÓÙ„ÙÈîö®?7f!;3b“xrUV(ÃÔ› …”«ö镱ô0§Q+@4k³°K8­(gÛ¾¦³boWþG€ßúum!.Ü”UtZÝcÈ‘BÛ*àÄ v³z‚OB¶ÀÀõVjx“ò™ 6úxƒÒ—‰YãN&R8š˜Ko·p±†U®IØUž¹\þ3C†•¨5.ÔüÀIn_ìë‡1¶ˆðT˜w”9×<›Úlå|ÇC¢À0¥ooÚ#¡›Òý2¨§ïP`6NöæðihϳhœXú\q°îäÂøk\0"‰ÈþUj•dƒUÛà„»Ò¦$·Ôñ¸u<Ë G¨PZÌÑ¢`1k •çiqôÙ~ÐlŠ-šÛÐZQÙ UDZd[4‰$ÁWþš/Cîñ+€G¶Ví Ü}2ü³©0ž’Ì)*iîjx0P!J|îë¯Ò&ÆŸTýÅæ€6dìy‘þ­å_&ñ¾=æØðÎ Èö{;¨Üæß¬"8U:T©¸N¿Š™'®éà”·\À‚V_ì'O5Hð+:…®™·Í̆àsÅêèO€'ej]T4çâ†]­œ¥üÁ]6±]àâ³^~Õ³ˆbâö¸9Xá4þCTÏé(Cˆ“Û41ÚÕ?ç&Œ[y$”kmxyhèrJw£ýÒyŽmul /Óþ½4xÉô€DÉ5'£2éôL6x-y„x¼ºl.xk²nãh¸9ÅVbáîç1²,ËHgÀm8&çÑ¢2É ÂÑYÜýÁ´À}âöàZLJüŠ}½Y2 : Qß*ÄÇ—.ÑÝ ©«mYº2²Ë5ZšYK ;š´¸ÍLyú“B“£¨jHÚZØ@‰¹/Gšä™Hùs×›`zÇ<Éìö±æ©?ÀZ‰ÒÆ`dCX ”çY¡"VÖð÷Pm´«ñá«$ñ;öf ÃÔy I¥çÁƒæR|–íß=üßT¤¾³’´]ÆÐ5oaÅËø>*R±4ºqÓ \2Ý®=U)Â}|È— ÊÆmÊKÞ!)'~“i›¡ä؃H ¨HuB£Î”]æF 5bË©S-÷—×+…ÆîtdX¨C$6u…·Op¹‹}X‚Õ|×\lRï-%ÒÖåz›â+UWBÏ50”ÍÿÑ‚sŒBw0pl%À%Š{Ø%;¤ÿáf<÷tø§ÊLcK]ùˆ’ÂS—Ë>3Éaq»÷17®×¾™=™ “6ì dRž:#Ð;P”’¼¡Ø\uw¬(¢ó·gëEA`I´"»(‡z¦O[Œ<"D¿ T¼ÊjÚ¶w»oî öÙR'X3¢§J‡Y®;ºmØC¸¯Êؾ§Äb€2ûHí€üÕ[ivR€e:¼ZµÎÉ)«ï°q»® Àà0 ªr«TçËÎ3¶¬]*RÝ×An,4)¸ýX2ÛÃnÌŽ¶7Ẳ·|ÙŠ+P'Eëìr–ÍÕûÆs3fCSÇ4áäÙ~˜lÙÛÙúþª cèù¬Ø:š 8™s"sá×_É&øðø‚t¾d²bT„Ç¿ï€Uü%q<œGs»>HFBÝ*ˆæ4|¹Ë=IG û¨‘þW3XÚ`#ª‰±»“Ëñ*‘MP…õæ<Øx~ê¬dï­‰T8]üpé65ç¨åªx‡fï%pÒ`§ åÀ‘4Ûa5"0ü¬sê‡ÄÃ|oý P8 px `» .A€1}-z;Í6‚IåSÒ'Àï1ÎjŒìÞ¤ˆÊЀ<ÂMCÇ,Ó8Ám;ÒÅð¨j"œ_È—¬ù#³4ho?“…1ü×FòÐ1ÅWW°#rúk±JÊÝt¿þœ*( GÇR¦Ò+Ý¿4¶f¿ü]tè:dk@àÇo|°ÌñÖà‡»Ésw”ë\¸Ü:ù"w0|Ûaqu"lÁ˜ØcÊ|5yw!xgÁ2×yÌ;ݯlÿ4]+ÆÆïž·yo‚–Œ"«¨[%’:/ÁÉ8ÿü( 5áTf c¦¼=*pæaú TìG ­=»Á¡+²µ$-÷^´^·° "©v×!Ú{—‡ºI{ÆÏëYEæB3&‚x;0÷ÀÄUÙ`zBpE3òn©ý¢“ù‰1Õ.ÌüA:pÿûºªn“©Ì™QÇ1 ‡ ns\)ôyAR0 $lwè· ßBåß2—í“.ÿY‚ÒmyAjó‡ü“3zyÄÉxˆª`Ï‹€RÑhrmmÿŸOM~_ì™/øP¢òr[Íë\÷ñds<¼ˆR{85ièP”WoˆlΗi¶f>gÂr€”†ÿÄq%6í Ù¤/‚HÙcÞ¥Ä'æ Û¼Ö±Þú7âÅÛ‡~‚TÉjçt×Î[ºŒ'} •[,âW'НK¢—R0ÂãiõWt¢õ@ûç?©ñªI/yÍ qÒ&^®plg=ÉŒ§ÞÇp 5D2Ûan׊Û:y¢'ÖÓU¯l™ª#c%£†â'Aψ3Éd¦ ,Ä¿„ÂâÒ$[°fÂ¥øv'Æï·‹ìôHè_ý*„ ,hVæâ =ç"Ƙ‘ªE¹!¨²<­5¿ÜœØüÀs‡Þß ðÑo@tÆX¬}çbáìúÒ2F~3Æ+ßÑŠö”}¼5\ÏP¥ºfåûu]‘¦£Á†#– 'Ôŵ’©A¶b×%/µÇ æËðì&nü<ôrÓJÛÒÝ™%!âLUÔ¦ø ’ñÏöÏ¡S_:ôÉ¢¡F_™z\ñåŸ|zÔT“š ¢EµYˆ[†ø±×\›3jw« •Þ·+Á€æûõ ÜR }«;ujÍžúéÞñ’Ù&Í·»¨óù>¡÷Dû×ü}­è®®ÔÝF‘´xÉÚr ¨Ã7?Í·°…¹)L’Ri¹]Ò˜Û|A-ÙÌi‰c õI¬‰\lHï5èc»²k ?‰VÀyÅL¡Yw ?a)üŇkMyjN´^ÈHµæŸâ´Ð!ÖnÂéK‚¨ñ<å¢9í_,°¨ cz–0]ráhã12Áɧ7¤äì᯳>’oBtV…϶ /h Àß È[§ç‹Ç¯5#>[öJO’}¹„àW!×ãK„e­üm1Øåoÿ`=¦ÎÞµ˜[ΞU­öÙŽ¢" ´À:n[bñ™Ö‚˜Ù˜`D¾«t'ŽBw,ؘéwô0ÿÑ:3¹ èqcÚƒ•ûÁCÿù1—šM*UÚ½ÿ™ F,äU”¡‡)wn$×ëÂóeÁxˆ•2&+¨Àúå~'…(!WS,xEdÞµŸ ÓçIò7|ŹéCÕbl²ƒ¿ÁÍfÿ°>ûé¦frøâÄi5æU®–ÎaüÀMó):à´ . –Û1}û‡e°Ã²ìC_smâhZP{x—ý~³^Ϭ8û:“nð/Jd+‚Ÿ¡Üü[ ²ÿ`LbV 2 ªÝ‰…™Ý‹ ^ù!¶ÙÚ{µ~Åÿíd EhÓDÐÆèJd{¡[漢*zÁiµº-ŽÜrŒìùL[1«K¨1?¾ÅN¿ÀâŸLÜ^ä<‡^YìqÖøcAÕ¸´0'"Ò©"óõíxfF)Š´gVmÍ+µCÒº¾xÉþ®øMlb÷Doö=`ø°¢w~N~lµ­9¡Ç¢.s¾+ÊW±Kþ:šC×ÖEv¾¤¾o.°8Ÿ/ys|pûXŽesJ[qÝd¯6èòIDËÛÁúÿc1ë¡Èsý³é꿌b ñüÁñÒe%r(TûÎ}„ð­T{Úïx˜ËüUþ|ÄqÂ/ÔÛ­7 iˆ¢4MÓú<»[V ›ë°©ê¢FSjea0æ›Mœ¶)Е^d’™;8$züo°6ïðyÑÏõhyìWÕ>.L´ƒVq“ˆæŒ¿X熸ùÂm寘ÖèÄ0«;²v8èm%Íú•r¥ùQ©O—ÒI<Á?=jœpY¢óç£û…õõÝõ.ùÄò‚c+åE B_Íx ¥ÅÀ=ü €ãŒ„$) –ð×”ÀÝãõFÀ!«—‡¤¤<žâŠN$TÔGám9ò Éçyd‘›OUÌÜ6¨™æƒÅóÎy\ˆÅ—áõ3•-£r,U ¯SŠ|#߯$Ê'±äûTßJã­OggSw›O!Q£iS(ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÁï5{4²qœN÷ú³17_TšMá\—<½îÂü«BÕ©Ö*†›5ÈÈ/ âo¸À} —Ý4øuMÊzm ü»Ê¾<ÀGm¦?Õ¢”©ÍxÇSÎ^§Ò!çé ÊGȹà_3›»Þï°ÙjIž³4ßN*þ¤ÞuƆ̢­×"N°¼ˉ öAd¼Z†3Єeù?x94n"RÃÕnò¯³xÇ9¢•›ˆ Ov[ä;é'Ä©Ûå2ݳ7‚àPz Lý¯+²TmÐã(¯{B fY¹0ñ—”¼çÄ¿ºAS0¸P^Ñ[ 2d² É–kŽìPÎ99›2Ñ®êZ9K”…^Ç!9çàïËÆ¼Ç]ÇþD}Dn¹»H¢ŸÌiüBhv‡î'ÊR›pïËcïQæý¸?ÞP8©™ê켚[eÿÔ/#Í$F`Hº‰&{Ŭõ,  é@¼.‚K‡y^oE)^‡y#Ž NG2œ«‚ƒ9Ë %Š  ž)^³k—èajù|e—W¼\útvÁç—M˜€l•ªéÔl?¼•Ç€Øëª7Ù? X£·D¤r*.UM*R}ë=O?èÌ×nÈŒ]Ɔ0>'|‰ØŽU#¶fŽé|¡jSnÄMªÞ¤]ñÒOßhÍÌp±QÛ½JU?’÷—0$ìîc®îEyB½þZ+ßz<þ;ZÁžˆCÔfœ¾¾íg]iϦ  ¨‡9I2ŸKcÇÂh¸œÔš*q€ÃOÀ*îížì 4+çIµjœ&ïôsüÍìç¾LÄ,$6¡ GåìÇâB”¡‹lìšG)·˜Ùbãò*=QmV"à¨Þún½`¥ç»øPyà¾)òV •iõsQDG˜ â*¢:øw©=Ï2ÌÅ©$ÔJú²–˜š½ÇÑž¯™ô%Kü4΂7Ÿeܹ¢d" G>¸îbǰb˜*‘p°ÃŸ‡V]Y¹/!ͰíМÜÄ|ÜF’ïÆþ©í¨iä4/¿¼½ÄøvþeJèJÇ~>&\,TŽéÂ:úT¦;wè(@›x.=Ër·4¦Ñ5ê”H0ÐÝh ;ž˜Éœ¾º³í2’Õiè‚“œ"i '!Á¸|¢Âͱ€ÒÑ©8/ ‡?ª–?¡ªÉR)g&FëqµJ07uüÀè;$½6Ý×ÂLámIw¼ÀŠÎ¡|c/†Îq}Þ/ˉÏFlæ@ϘêEêÇTØ\ËJ7îD˜6(Íë;—·S´'ì¿UïMyÎ1@ùJìÄë^Bø¿Ø”`R)cás“Œún{Ø?£`ÖâË^â¥Ïþrp”«ê-i0¸:º«:K+'…Sݧ÷:æÏ ”ú3ﱚX_YÆÝM°£¿ÎélFVúˆM!qb®Ù1JâŠ-Šù~…¨œþŠs;E½5$jÂÒ¿Ûë€Q±‡p¨&‰R Ú™üsgZ‚’¬¥ÁW1X¡ù*>I}«éÄÑé’ᛌÜ#ŒjߨÏ1?o¸ëî5(Z`]e…}Ù<пAã².ì ~ø¦µ<¿ËgeöüÀ™ÁD•ôu2‡vš„È„ =œ)í3Æ‘ï,ŠuÞSðÂ{ØËu†´Ó]ÜíÓx­ë^¤kíCÚ­ÈqòÕrÝø„²Zy.S£IUÆþKuagJ$p'!0 `°ôA†øžrKRQ Òo€Ÿöa¨Ýð°ä|ó—¦1TX´Bq:RÞAlf‚øUàÎl2_@Ñ0GbV{'-Z£jòË.Žâ¹—ٷ؇H›é[´†Øì,Â!Ñt+VB.U›û•×D”¥¤S/)¿3`DO±ÞoZ­ãòiº”|’]ÖƒêÅKrh ¸‚A*à‚ä4Tn˜Ä*S`÷Øç¬µp)IÎV¾> ± B¸Þ]­í˜†KݶK–v²¨r]à¿dLÕüÅ©TÌ÷k¾%Ýü¨<¦´ÉG* (œüO€ÅŸ‰6¥ÃŽ ÿ°BLm“2|4^·ñ¯ÒTŠA+êjc–¢ï/áL‘n7¥©º¥(êèø¹¨f×dòýö5U|‚[=#Q¼’KS—\­Zû¿0~rÍÄÚ€öÅi_,ÃÖ©gOqIs¥Q×xòLÆËß¿íöá„­êdT*Œ—›>j,IÓ“üÍ–ÌÒòâÛR¢„î =Ðt ±z)ofÙ–…}Ä0þ3 ¤] 34ÿéâ·¼N;sâ õ~–®™ÐI˜a;øº qo'^Õ²'à½Í;²(ç(Òž¡Š¯oy¿öýr³s¢…g\Þ™ –C‹Dš§ÚùÎ ›tîº8¾‚’ž¢@aüÀC¢ /X´nHÍú$üfé·õÎ'zPk5–pƒÁn¥ˆHc@z¹†õŸ„ñŸtÚf¬så8 N×7ÛPĺ +¸‘äÎ"– Yol8¿ îLXƇ šGvh˜! À¸{Û÷¯-ñ)KãàCcgEØöþ;;¬ ¼A@:f›gmâ"Ô¾#M3F剣sr)½l¡!ϸcq¤É +`Ÿà¾„@ß»¦gZ¥¼ +õ8(‡ºÌdÙÇa˜$蟱*î€9(g±í²-ßÑqÃqúEÏ.©`Û#L ÇÕîy3ó׃äÜÿ¤zÒoÜ@ñ:)²s¼Áa¯ñ1Ín “j7^@ú"ˆ 0/ÉÔ» 9)¯Øy’è´dxוº1? öo`ÙüÁ®GÂÑm•þ 9r LŒö¿ü›çèâ¨mËÍù ŸµÆ4íáµ½PÆ7¬2AG°wòÀ™0¦"B–ß¼û±K¦È;pÁuVRŠæ˜ò˜½í.RãiŸHr2Ѱc Ë‹4Hui›‡p-¸wA¿£%ø'ÈÆ.ÀÁAåhµ£Ew#£ZÒ‹®HIVÃ=FP²˜ Šãa¦øKZ'.s±6>ëù_hæ :U\vÉÂåTÐØú¹VDùöuR]É+HÝ>÷ÄX˃rìÍgݤýÅtD3+>Ò™³ž‹3N¹>M›Bõ«žLU=1:Àªùî¢sºÐà}ÏáLâ’Ý“É#FÁl¸w¸¼ 0}æÈàÖ”çíç[²dHöÔ ¶³Ï¬qüÁñß-|‚Ä߸S§»ß„Õ©q]PìŽ2k/šB |¶Ù0h¯ÓëÕùÄŸoÀI̬’¹êýöäŠy¿1DÔŸxªr»%êj|_iWÑE¶iÓ ;u’”¤yé'àž3zkÐM÷Ú¼Ëè@-=m&¥ð.Nz{"§|ÖÁó(ã'¸ ,äxT(j»A“p˜j3qUfxahÍMªÉ%oFYF }+‡øx­%N/WÂw\™-­†dô®,‹4‡Ôò°W£w¤ùX»`³³¹ŸÃlÐÔuƒtÓžõ-à/žC$•2Ð#…û €Ë¦ àWï(øN—²¾sŸÿ@³^(TcR™ÂÌK„%xO"G-ŽwM°5W˜Îë‡Üº˜à.©üÆù»!×t8ör8›pË\Ôe寇HƒÓçfò#5ƒ“ýH®§g¸¦KóŸ)ê_0ÚÁáEY°*ÍßxšÎ·ë”$üºÑöø(³sš °ÂÑͶ•~’}',vü„äé1£e£×A8†xR½Æ0ž]í‚-.˜=%BÝV¯$X¸2# ¢àüCô¾kÐ7ծŌ ¹Y¤ðB­ýú³ÒÌÄ XÙÅVÛ˜Á—¦:‚€Ïs-jåþPÉ%·Z—ô™ ýÏ6”~‘ãj×µYBêÎGÛÜýÕ$†Ïˆ1¼™d‚¸÷Îî“cE«X3¼&ÏJÉb0Ô™á¾J@°gH;%èÐÍ?‘£¡x6lÐe8\r“’YRGóyæäì¯R\Ï œ‡¸VAòEt„J‚ä-oBf¼5„¦Žî£Õ˜û0Î'¦³¥·Q}RBª{)%«§ÈLÎBí+€ÓæZÇ5¶ U{™t³’ä«ÒÉ;èJ3§‘BgÞvts~2ª ñ ¿‚†×$è¹”/n¤ëªè·V¥W½ƒâSã¬Ò³$êºmó¼XâÀçH¾E½mò™y¹±ïä7éL¡æ÷¬»:¬rO°<Ì’c -üƒ•0]z ªF¿.1êGk¾wˆ¿Ý’Y¸»ù)/TýüÀså6+Á£ Ûínœ¹šGpTn(ºØàTI!}0*º MÓ¼`çôl'hó×6o×Öêz;ú¢Ÿçô¤¶›Zºhs<õvYÚã¦ÁȦsG>’LÒ* ”ÓZ,xª ¹4$XØ$£"uÇK‹WÑž ß  Dfj™+èþd–ùL¨Â\Õe(µÎ¸%LÝ0qõ¾Ì¢Éx›C'õÝ_e'ü!IÚ?CĨ΀ó,1vöˆ­ÿ2Fjbº¤Ó¢™¿}˜ŸŒàvƒ¡M—â, XÑПlläk(ä5Ty’=dÆõQÿˆî}/õOggS€«›O!R»à&àÿ.ÿ8ÿ$ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ7üÂz‹ @»¼üš@YUÏX•fÍn¤ý›])b ÖeÈÇ¢WúT¥x¨æª3º#K>z’<[¨¥_´ËÞV™ÄÞMÓ‰‰-°È²¼‚gSŸÜ6À{êÜjØ\-&hp6[ÙzÒÝWKrŒ£ª i“-¸3h9G§ wz«‡Úä6B¼6s܇òÇ•ìé†+V€ÿ*lÜÃKõv@Q/D£ŠEø–’ûãæôãë"øÆ† ºhäÁQ>éÀ:žZˆŠFáQÐU^ÍWyO0À65ìPr…j¸$Li ¥Wzº4޳ dÖN§£p—BKK…ç­Ù­uçõw E 5¨©IQ¨Z·oy[X‘ëùÍ–”µÚh}äöQõµ{-:'‰ü00-jªØwf:·ÅUJH7 Þnp°6•þŸ±ÉÄÝldEJ7ñqÃUS.?Ût{§3{'©7‡àn„2½?óK¿GG8‰å(÷àxà}­²®‹Æ˜SÑåy¹D¾ð 5 ´N‹Ï¾ë¸‚ÓÒÎ¥áCƒnìÚÕÎ.˜||!½¦"‹ m ˆŽïw}h{èÀú£ÿ͇—o¶«!4V;æƒÜla„/X¡éÁºqÈR&&)h·ôÄ_,«ÆF}ȵïÙÙ2†ÓÎQ'Æ>Zðé&˜¡]Æs2¾ ‹]{aCÔ5ÿ„ù7wUWÞŠªk£HÁC' ÂÍ¡Rñ2Ñ›Uâ‡17à ÚUo¹g§ õÓ;×nßh"ºëø}»JNöm’Ò‰h ø"8«ÍúÿØüdJc U¡NâòO–s÷B@ ˆrµœã&/séW“ûLª¯ÓU¢¸|o$ÞóõA‘ÞW"š¦.„Mi_Ó{nÐJ>}˳­ ·'ãµk¦ü¥GYÔ'áµXŠF\ŽLå2º\R!¤“[«3.§QÜ·ĆÒïñ£ºÍ0‡«²FÆÜŽKÌ÷yE_+zgu}VÎmò.ãL'TA˜÷øÒT]¶¯HÛ‘ÿκ&m1l÷}p]ƒÈ{Fu %¶ Cf Ñ6ç§,”)ßhþ¦Ç­Ë•“©*ÌòÓÕœ†·ýükAmqA~,çoáìH÷qYW ry>êŽ}Üc @ ¾ûc™•²€@ªI¿üaÄ~—ò çÂE{"ßd›UÑ”>ÛÞȃê·ÁD¡ºòÐÁÍhPôŠ7²³ŽÜ›T>8jZx¡é/'¼‚¸éwtŸ uFhâ¸ã–xf&´7ÞR¬Øé=é,œMu†çqd¶ÅÒfä®”•Ìû·„ऴÂhCG{±ïÐà[ ‰ëÞTMÏ^+j™½11pá‹dôŒÖÔÀ¯¶6Ð6Èégz–q¥º•W ãñ}{¨Ë¥:»2}º9  ÁÁye_\0Ží¾¨ßdô*2ó$ˆ]ðîïr„õ4— -yÒs¿C€¯ þu6Rv‡Cü:A”¼·ád|ÿšõGáçû;fc¤ýþ\[†¢Ü“f,—zoƒ×$‰ø–¢üÅ?T5?+WÊ7ôœ4 Ïo´˜2^VKŠç~†{%!rP’p·^ˆ$¾Ïe Z$ï Èã êcžµìK­Ç°ú+‘>CKÞ+»­f,Í`åâ´[ã"\#0^€ü; Šò“؋ҘXíäjSW!”h&o#F¬,ÆÁûzNZè{¦=b‡ûQÙ&wÈL]Ú?„&ŠäWT¾ À­Xþ›1üÛœ<ľߠo )ѰÚ) õŸ3ä&f(Ücã%¢Gcß…bæÀ(Í(¦’Ìo†Xîå56Ðxã©X:2|Œ{üÊÓŠ3‚ㇵ ýƒ1rèhªD>qMXýsTÉ˨¡{±~KEÕüB6£eÓÂØç"pýµ%‰©÷mw†‘¸e´ü—Uüøö³K{îýe2Íå’çˆÕ÷ÍÃ@šoFÞ0æ…·è7#Á¸"ËüyxsÕú\’ŒŠ‹Cî/·8~åØi2üœÄw1äJ½k‡´°lz¹P¿] |òA¾}"c¡ÕYºoÙž®ŸŽ§=ßû…hëò²VwÈ_ÃíäüÙÉ;¯ uEšC…¼Uä=Q¤°ðö<ÚŪ(†ï„=›ôhnO_e a°B?ÃExÍ–ç 4jRr5ät+x»ï%¿Ñ 'ô“aß\{µý"DÊ?ó=%kü»‡Ð ØGˆóþ»mZ(,õñ$mõ’ë( 3¢¡Ñ…ذ°üŒÕëìç.-œ8#üqï}w :dº/ºdË62rqžuµ2hg’†ÕDˆOÞüÕ` ¾ ÇD³HcïöØÉ4w{º~£6}-c˜ËñÐ!æîXîtç篂˜ÊY|¹yïFZhÇ8`ít¤ÚÃÖ¼ŠY~HW\›šEàjCñ5¦×ÜP¥œ£}e—”%úJA|Hv¥­ìú&v©÷Û7ƒ¥˜iAuNK2ƒP5°(¬ ¢™´r­6¾Î󇓾´\˜§ ÖÂ~0 šî÷)ÜäÇ¥'S«¸ ÌôlnøÅ©H¡ÑÝX[«NѪ†bñNÓ§uJFæ cí4?º ¯Xx¢*^Pö5ˆáÞ³~½, Ýõ{œ'Ö8u:kööýèµÈ7Ûð6ÛÈT¼ÝåÓypˆÚ†Hß-sºÐ3„ÞEÞ_s%¸V…î N×É1c‡üÄAÏ‹Qs?`Lé4ÔX`¢; ¡‹j´æË¤¡€]ÄO@ìçá’8ÙÒG¸àŽ÷°˜Ñ¨Ç;§•»³‹„ÀE¸ÝÛ>ɇB>‹iœÔíÚÐõ 5"ž©ÂCª‰Cý+X—{ýw_ãÈ.[±xÙÓõ{kö:ǯ+ï<诼¼:©u¾ eúy'ÑîBs+jim,P€$4ºö†0¼Y‰©7Gˆ¡CFÅs\÷‚­îa‡v:Uéã½[• âÖIXÅ9¶q ìäjŸ“S3¿° \Ï!O!þ!7m (!ší3óÏüSÅÄ@6ºŒ’ùÛ$ͯ—}¿-Úü‹§œ•eçY¶¸n—Q\³$ùS/éO±‡¼£ˆùGäǦ¼ñdŠÞû&>e8Nì•2G¨L \¢ÚÅ5/" ûŸ%×8ôÔ˜Cô˜óèx pÜ´úÃËts…Ÿrc¢ÍJ€ lÆÒe´‚<ÆÚeâCi»ã5!Žª®thÍͱ¼"Yž­Ù¤ÌÅË'It€‹ ëz"ˉ]n+!ÌLõε60õá¦R/">æÄ´$Ëóùì`ÿ$Rõà/ Ñw¾Åoö‰VépXÐ|G8›1ìmô» Ïýï¶‘‰å|÷ùÁt>ਠ>—%ÀA¨ÇÛN1MO«‡2 FÇð€-%gJüpDmíØŒ›¬¿·üÕZLFn²¸X:Eè –i6uéš4ùœüIîšÛ=Ü]0šõŽCDª±à1g§ÉõÙÈ3Âb¯ðèeɧKižÖ2;¥¬5W_µ—Ú«›¯bÄçG÷]Àd)ÙÃgSòä{©ü&yî°™PÄ”$´œêOL;¤y äЬ.,<¿7=ż?[Q’‹ßa/ëpÞ˜Ò¸ÒÈRÀ’4ñ–õÓ; ö䟷"®ñ@X±>ò˜8·U=Hx§R¾ÿ·a#ì1ãG×iψ¢žHÒ¶ð*âúÔ¤lâÒyt…7 ÚøVÂõB‰q©h{üû2e]N¸Ž9ÀSÃñòåÜZ„á7S’ Ü4mäÎÈH„ÆCRL`ÄQY GóÈnD+° q-ÙPèÞ?âÊ*άM ™I®aÂ@È©1 ¨Ë‹ˆ¼íð]wÉA€¾Ï©{Ç®KILOÝûÙ;Oÿ™§_&qŸVãg º]³´‡ËŸñ/?¥‰‹øM:Ìbó™rƒä‡s0œ‡ŽÈ×±-vzñ×3ÇMJ°íˆ˜Û¬~#Ë®`êçT™>Ü¡…±áUAq#¥À‚aB\v"i§„¥nY£D™ëgþ-×Þ—FþðÙ=OE¹m3V+IWÐò)—DkC!`^«ëßÉW…8ÊýЖb»—½¦òXÎ6~ââç1t‡±ìõÒÜ™­Eç$ÂØe}F á‡ÔIë·Ãï6_ÇÈ0 ÚÑØráüƒ}úÊa¡)Œ0‰ãîø€'{ØKVïQ}?–ÔGBØžƒ¯ëu|C¶×zî;JЊ«/¶¾¡b™ý­1ïYþç€YE˜í"M’B?›Î ÏfòI?üÀ]¶fÉÛiaS>…¨‰ük«É‰¸³ûŠdª%C&~Û­F¯ôôŸF®{¯‚ÝCvœã›Í ŽIÀN¯™Óª%{ °ü,æÒÎÈofLÂÁg]¶yö“Aʽï@hZÿ–J Q¹†Àð2 ´rbÜC?·~AÄ™ }­¶ÈÐð™=ç(ý¾½ { Yj:Ëú>2§ª;~MG”«éKDþëJ®x™ e³äañ¶íðË# Ù¬¼¸SO-ºÎS±áºï~qÄ‚lD¬…Æù©‹ÇQS‘ðÄÒäi•nžQôjeÒ©BOaI äŽSicXÐ –—(™óiÈÜ­ëµüBŸáDz_¶*`9ªÝßÏ-|û&~‘—šÜÖZFqaÒ ¹&õ0*쉋̱Ëx/ª­FÂ7wàXƒç¿ŽAªtZåCDÄ6>†.ª|¨ža±ã#¢O’&ñ®Ï±­ÛáGŠWQc·7îÿ6e»+ŽXâ7À (ŒÊ‚™€®êÚ„­Û©*ã¿þUØ N»ú÷MAJB¡Â‘¹ªž,Kè Wádý®µÜ¤˜eò?µ «·àvÝnë%Ë„ѳ²øüÞ½wZ@#ĸ¦Ÿ‰e{>/¯…­Õl°3yÝ ç æ+÷÷,Ͼ}žŠ$ khºlrpî#»g«’À3–I› ÚÂRHâ²} Ï|À‡EüÀ¯‰“àè2EùV…´oÐ8œÜ-û¯ÏdÒV{-K½C-šã>8Mã‘‚'fÉú #yìcŸ€Pݱ“ žÄ²Õ.pƒ€¤y½íZî‹ëPûtܠdž±Ð®•úiÊß!áãòÓ¹µƒ:€õ­ #¢¬îaøÄ…TO²Ã^—!ÂÚªèLç‘ÔÜÚ†Ú˜Þº@c “M¬sä8Ãߦõö©@Ïøñ›ðíC—zy0Çžæ¿•â‘Ecs…ºWÈ%úÈ1u®¾ø A_Ä^#ÙÞô6ˆ.eEoûv?c}·Ÿúvñü$(‡rúÄÔ(-‰G‹¦2¢^$ÞF¿©ÏSt;ÛǦ•[àä6kQª·]‡/—Xk¬öä6xew>Zuv¬É•Ö綎βÙRt×—¨T'&$yG÷š M@ªeŸ<î†K½t5m. ¾Cs++ôvn=…+Âyr+²i;s,f:ã°Õu¾úb? Zdl¯ü¤gL£Jr"5wk;ÈÏ µqáG‘ó›ÐzÎêxÔb(ÂQH;‹ØÇjï±ÀY2×ìº îÞ!`ûl2‘³7—…ļuÀ˜K%ÔTžì9<¿2ˆm¬ ‘ÚÙ!·ìçâ7º–ø5B¬¯ý÷p>Ž5ƒî¯ì>æ3Q¤¾0“âæ d€ËüS¢Üœ'¤Ã#/»ÿøa ºz«±™B ²]¨Õ­RPçêe² ?±ÊÜ“Äzbá©Ñ \È£%†ËÈ5r´ôþf^*ÐÅç°¹ðñÂKj…jÖkßN³¤kXw¾ŠñÛ³\7-Ë8u0PooÄåÑ/ŽÄk—Òý;>Ðñ†‹FyFX¡ˆú*ÉÅĆZôÌ«7®ß‡ùzsìöŽ]“†üø¯O耆^ÏAÑ·Vm?4ôƒÅQí¾¨[…Ž}¢§ïH›AtìSoLØm&¯]l´•è&}è´¸¬ñY·¡¼ u0#ãRÊÊgÅxõüÀA—õúöÿ`#X…º¾ìäÃëõø§È{® "@U}îð¿qÐæ›ö¢ åDqI’˜uRí%‹Í’cB§jÁë^òt¶®r!…Ë6€@kž‘ªm'a)ÇÂq3ÆÞV˜éךÛIÐ\RO’$Î+À®á n¬øáDƒº “L‘‡VÂæ¼üé”úÑÓÉG{Qæú„ÏžØÌ´òȨœŸ•SPóêÃôIÝÞžA­ñnn|‚@kÒ·ª11MD^Žcº\pI?¿p-Àµ†ÁÆjkS+¾èr¿î•R]3¥ƒcl’vüÍçHÔeï³Ô?š$R­üVÒ Ú‘úÉå{w¹Á©šf!‡\ׄ v¥ C5‘¡ŸÀZYŠKb˜oËKñyIýKQäOi7 ¯ñoY^²Y°ô­þf¾bì°pýð3Žå (ØS…FfóÞ…cBYJoÁOÔ‡aÊø¸w©~ 28ÑG,Õ#±|D/.p©ÿ$§XJýŒ¥nëÍÞ•ä oÚ-ìY¢\\zˆð*…IrÇ£ˆº· }R+s –½ÚE®¢eÐà•oÍyEä/YÂKcÑóAÔzãÿtu‰n'¼H&×vç†6õæ·¥†Ê£mÄIÛü±9Ló6ñ¨¯lŒNæ l¦—„Øn¦ ô¶=‰à™tm­+ìç"1™ˆ[ YÓüâ.LèmÀlû’$-jkÅ^m<‡Ø•L÷k3˜Oᆞ“sf—W–h5£?Ä ¿³ÜCÐ6 |ãšóÆs¡¸æ¶-oSú=MfOZ0ÔGÌZ&–[rNÂw\å«p‰4ùa4ðµ¿á÷–+º’ã18²üt/±–Yô›S‹ÖèxêµÚÞš:­¶žP¤¯Båkôdy-¤î¯RgP.‚AGu¸w´¬ÎUë´YIž=è¤ ßœF$²õ,+r­ícxc$´ÏÓaæ¹³ãE »M‹ôoèÜr¶;vNWñ½"Ë Þ¯O†«äÐnHÓ¶˜Kÿ:ðÒ-Å‚5f3«ØÂóÏšù}”ê²Ò·§äš’lÌ»[@§‰²’m´dÞª¶ŽÂ˜ÞÉNüüüÙQÆno¹0aßCÀ¡‡ä÷¸î…ÔăŸ—ŽIk‘¾DPå?™pLfµõ—¦£Á4tTäÞLR)Náì|Öß¾PÚUA0ª“±è&ðû%Ó¥®»p÷&ç{v¸û¸mK\jÝGw¸`·Ú]´Í'䪱WÕÝLÁ®Íù‘°–ùE8è\8¯ÝÖÉõë {ŽbÌp<·á§ªíÍ6Ž.ä§OáŽÀSjï&!åsŒ8é.Å–dýCîk‘á™ ¶*G–™°­'4¼JPwòøÕðOË}DœæuzŒk"ˆeeõ¼ 2å. !ÍЩhùÿ2¸«…ò¸‡ {Ûqìî5äîP¯ªSËýOè)%üýG‘f¾$÷š£ÕëŒá9 #ü×Gpl™%O#Be(ôÔ/,Ç êF,Ñ.Åý¼1m=ôâï\–]žµi°ƒ{2œŸ ‹Ø$­ù!˜díT:=ú”«õm‚Ô°Æg/Ö]|\—9gÖhý#7+¡Sîæ¬O Slë*vý&Gì ü•æÿâYCI»*b™ô™R¯È:z›9Þ hû0ÝàØµÝ+®>CؾC>`Y›p º“#¼¯.›fÓ°ªÐŽ:‰°ðñŸÖ#†5‰M̧r¢TŽjH»e9_ßÙø0 J@ëöµŠ"éç!££ü?­ëã2ÒØA§B÷ã|Ó!5 /‹f$ÂÿA‚òÎ~ÿGyéàQ£NjÚêH¸èã6AwCZ·ãj¶i[7³%HL8µf:r†OggS€›O!Tš¿{ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÖÞrÓ¢Z϶H‰’í¨;OOÛÀ;cÓS ”áÏ29êU‘|ÏXÆ®‡r®Ò¯ÀŠ\Í꿤9ùç«;" ÑR¸»Y;sr(¡Ê†zEÞm?l,ÍÜ c*\óSLàòÀÚkW“)ËÜ*ÀÚà5ÿKq9õ´tȱ•‘UFFýÐ)ÊeÙ 6Y:›Þön$ÞJ/ƒÙ]Öõà pcÕƒp#ñƒÙtEK±bøÕªv½^]yv`^J^Œ•~™3ã @~~Œóš‘†ÜÑ–)û†h×°@_ ‚èFá¿lù%>€ÚÚ´9`‚ÃÑÇYnì=á›_'š£Êp) .rô¬T-ê§8Sk/­…·œaeï@Á~Ø-¬8jlΑþÍàÚX’;ô 0z‡üBiò•Bî c„:`þÊ™ÍwÖhࢳŽý°p#»½^ÛlòÛ¦“·?‹ç?HÍ‚Jã8»ùåÅÆö\VI[‘ªe«Š«/ɳ9ÔÚW°ärÉ>¡\5½§q¦K^¿¦Âi5ɰOåôïÞ¯…«ÎÌ›.•„œ€¬dàˆ¡3Ûò…úÉÏW¼ý N½Z æ¿k¤d2“ô³oé-ÊK7BÛXòi¤ù ËÅSà’@Úó.ïXsŸ€¡þ Š4nh®ãm‘׿ôç­D }Œ[J ­X9ÈAÐgˆ`Ì‚Ü@ç­èG•ÏÍ2!Ws`L°©Š½E2§µyÍ­Mÿ÷W­Éb×~ª¢Æøš• d¡D)Ku“ëÒ5”‰uA¶0.Æ:—Ùù‘9@üNB<Åóñþ[D I!±@…ýQÍ_5HØjð–B(4A‚_ß¶•™“Õ)6+ÖfNŒû(oê;?ªcÁ$GnQFçM~«ÀãÂÞ|ƒ‹ Œ‡;x#Ô¬¶â)ÿoNü~C—ݰ¹¸þ>ÈÈ£ 1ÛéAÏËV9ÕÐ¥•ê÷òv;Õ…(|v]JTñàÉ—GÅÅS1)ùP©™úûmN6=Ù d`SOÀ¤ÔPíã!Nf`.Õ´¡÷K[N›­JÞ{,#4ø¾D‘žÚ þ”gò²”,?¸TÔ»TI˸©ÚÚ•Ñ%ý9ÐñD‰ Ÿü?œ=Ïxví fíÚî º»ôˆÛ}œè&x§)†“ xµ¡T¿-fí‘ù“¡IAF4ÝÜüÀͽSã®ÙS3,›¤ñ'Q³ÛøAGÌÅHð%yÔ‚$ˆµž_ük¬ˆ`6“°Ã*Ô‹W1¶ZE©ªF¬dG¸ÞIjpÖ–Ê"ßú%²|¬ÅòÙ”Ïå1£ä$Œ¡²§ÛÚVÇžPôÖ¯à1[› v=.uVüÆä_5[÷s4ÅzpÊÖ³ÂE¨È"‚Sî-—Òà½þ/KR ýë@¯z  õì Éô<-j¸†÷~ݲ±$6’û-<âÄÅŸŒÔzrŠW\‚5½“WΚůŒýðx&SedR™s7ŽÁÌ·ŠD°œÞ^Úˆv¥ £Ca° ¦‘KÎ97JR5*g/æa £` 3γ¡Óú§Š¦šI–4xç¿iÌ¢€üÁñÇÖÊmV¯,Ûe{éHN¿ê{I°/¯QÒíbße§D]ƒŠO/ãowe„ݤ…H@«déÏÃqâ@;•uiÉ X)þ<¯*޵pŠS$*¢Ç¦‹‡z‘k”=¤êã¿o?ÖàÌür£wlëuu‡›JšSôm\nqbz/–kÕR·§éþÅr” “Õ‹~ò½>~Öš «OdÜlp:Æ”l5œ³žh~«ƒGŒ=°¡à ¦um…Áä§a0~÷vƒ¡«æ &l–MÊ"whL_9è1e—6oj2} Ð`”ƒâŸÇžø5R5¬v“Z*´opà„øŽ‘v'ÌóÀ£<ªoS—EeöÀ{áH s̓ÿe>%üŇ\8ùºsx&×d¯éÄÄ÷gI<·õ!Éúu’y©´†¹«9ø1b"©Ih°rwYüÌØU/üßñÐ;ò™—3qg]ûÌŸqÊK}t#é5Т¥a;U‚‘táÀX;JCÈÐ@ùõî×NúÓkó<ûþ¹9¥ æõà ?åÝÞ*‰(ÇE=9¢ðzqõ£Ûãwf¹ïÐÝ…Ø`mXk¸>ÆU˜­®š¶ ñÅ»—øü³MœÄ2\s^75\들d_`­@cî6ªJ µáü¡–ª6!úëà—O²è§r§÷ÿ«˜gM žµ›(UC¿1gßD°%ö”¡˜á˜)â= 'GÜ*HLÖXoTvl:?i³o“&giéûè¶BV5×Y¸qüÀ®†¡ßÒù‹‡ê­ù¹$ EFÜH@€óS„APF>ïÕîØ>޶PC°”J$ •|Êá'Çk¨üaiØm£we„ ZŽeƒb¼žÖ¬U< n”›ã|µtiñœÕ‰Är†ZAM'¼¨è÷7áç™#Ê=N穜ºÌ¢WÓ´~ïP‘ØáÍ&èm˜êÚ»_ÍÒÝÛZ”q×Üy#m·ÂCæ† ™ü,=e“È9,ãÙ&ÇŠý 5ÎB èB˜˜‰m™zº/ ŸÁº÷—ÙS¶á±ˆKx²ÒÙuüÀHÌ…/qû-}wG×ø2,#òÿUsB8zE ÆBô›üz6*§jÀ4r“ÍÝNÙCÙ[ùêu-Â, ¿¯ú—:;öe@qP^DÎ ;ÕH@¥Ô7KOÈßO°¨[Æðõ“_G\ƒ8£ÔÔW¢Ó_èÓC™Õx¬ ЀïÞ{ éUøñš”-ŸqÍpRgŒ)*w«0Ås [†áSh6^yÆl‹]ˆzƒPÀ– «!³)Q3xXYÖÁË·íxóÎc¶\i8BòePØ1á7 ¬˜°‡›é¼Õó½M ôú̽TœFSÈçsÖB+W/K¢ã8?/ʃiU†ã·Ý›k‡²¯1…IÒ<¼3eåéc‡¼3¦î˜çKÁn¡­üÁí«ò·9‡Ó"//g{|{s ÈÈ?”m#°½Š`K¾( TiýÄöˆ§ª#WÁeÝ<ç¯qÿ3G…¹4ØkS6‹Þµ‚óú’š†±îðŸšD ¸ÂR[á)¢ÖÄX§ H ±âVpɬ…$ª0 E´Ö°6ÅТ2¤Iü uÁ€Ä÷Ž£œòD|슎ð3vp[|x—cúŠ•¹'rΈOò¬/ˆf¿+]ôì“âˆ]±•ž›vyp¦Õœ¥ó½Gub´ªüûZ1&Ì"ê˜fIz”bBÀzz­¸6UïΧÑ'7üÂ#9[õÁ€è8S¦»^GtÔÀkú:+0G·ÚHØî k|y _;Dz>Ê?…Iõ¾^;ROV¥¿f²H²©üOæZÒIÝôÝ2UÁØùW6NùŸFÍòë׿ªw8²– Á(OÄòÚ;Œ|ÃoºE¦¦5r³ûÛb0úŸ5ŠÑtjòåê€cÝBCÐÀ‰ö%¸§ÿ]¦p4w'/9à68Ë‘hpkb%f1óýæ¼Zð<ùPË5)ºy¤áÆñ©32‘塲¼YF`ØË2„§éöûÏ·ÐQ®ô?¥öÁC˺<ò€þ¹$ÌÀj8‰Xõ”Ö”º´ƒÒ(Œ,”̘Œ¶Ém¾•g»•´0­,–LE!‘VDÌ(µcûוÉï)7@PµâÂçÒ.åXbJFF°4:wŒ…ÇØ]¡ûñOÆ|¯¼à¶Ðà "FH†(8wDÞÔ€_`’¾Ò£O,v ½‹.s¤üNåhþFZÓ9Ò$`…Zª3áØß¢I-Ñúòø¶²®ä•ØFv¯$B…”/–~M BBÆ×\U"NYG¡'B«Ô¨›]TH®ÏŒ÷ tÄd—’rŽëUAcfvS$K‡yø^ë×ÕÏ;6꿱»±þv5}Š›Åe„DÊÕ µ™óÏ"›Ïk/ÄC棸‹^UV`ÒgR>CÜæ&§–nB«çÙý¹‡½’p*¡“­@¹Àðz}qFƾ¨èޏÕj!ŒMø¦Ð×/~°xEI>®>©¶üïüBi(è i'ñÙÝþ16îBO¡|Lñ¤µJƒquåe²²‰N\þÑ ÖŽržîâÑ›1˧r mƒ¹ÛYm%\lDufe²SpOíMqR´ˆ\N¸–ëy˜WH ýc Ý§Ýæ[™}‡CÕbãs¡¬7Ÿn»W¹éÕ 3é rk>ÛõI« w[Úa½†àpÑè;šóõòØGyºÌ3]GµvSïp‹8ŠÆ?§S6ÑþQD‰v"êá $±&÷Y†¹zO6:)çîï¶$ÔÓ<©à’Æné«u3ôä në’ÆFmcbß„0àíSyÊTkV¹¹­‚i£t½Ÿ¤þŽ‚;?>S`D8á8ç —ÜÂ[ÌÔaä=¥,—x×êÀ¸‚OggSI›O!UJ0¯šÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ<ÿfÿ8ÿ3ÿ/ÿ-ÿ-üNÝÂó0ùq0§òs.  fÚ¾0ß9%¼Ãض—»Y,·Ym|o½+!žÌh3jÎ ‹dœb|¦y!`Ì3[w×8£]BÛÔ1mß3t§|U_ÁðÏ{ VïÕ„¦™AÑMe5›vÞ/Ôº|D¬_ +PÊ­Ò ÖLjÄt €L¡”H‹¶¾MåJ‡¾ó}¢¤ýµ|²Ë-ÂCaµRE´½ê{ɛƤ»ô£SÁ '/1MÜÆƒ/·ÞÝm6dÆ)­OMr‰U¤^‘W÷Mª¦ˆ*4ª`Z§³1 ä”7´—Z)É\wµ2IÉ@_æ)Ò@Q]Ë“hB9åŒÚYÀþœ¹Ž›¿6Àà`—]õþOàˆý*à¹Gµoÿúg´+°õ"±"üÂ]—­ævv\ú¡|yí_ñú•„ëYAwmix©•á¾ä\tÓåW•“ô G0µÂ*à"»Šl±Wg„ã@¿7p7–í—=Mvj {¾2µf×gèC8þú¨È'܈l[× XÆ"©l­fžIѤß8 •áû÷ÉÛôƧMì3Ô)`Îà ™?Õm¼&I-:݃JPñ@Ú¡S'"í›tÃîæ.y ?/¾qœâõÀ£ø†¨@b\#ÏèIÇVeÚËÝææQP JîÝð%’g­ç“fR+7eåÉ+àúhr!Ðp™÷¬Fƒ`êìÃñzüédµ¶|’9Ÿ ©Ì'é*º˜9ÂF}!GDÞ‘NÐgnvÓJ?2ãh>üÁñÇVߢ”×LçQô+Ë·"GËñ”7úÞ÷¸é*,x¯vMÜ|Ì}Öpž¡°DkÒCÑW~ttŽ"¸uÛ7ìÓÅî7Å6ÇeŽŽTèfáþíNÄ…Pg<‰h-óÇ€©![›¦c„¿U¿åi«h«½mŽ4çÙÓ…ØF°OÖŒòzFš½_aÏAâr>çœE»poëF¹â3J`Ã&.PâÈGÇ5‚ã"ÜgÕV cñwˆZ9½¬¥Œ6Ž™¯ ¡[µ÷ñ4„N@rTzažqØû’Á’ P_x¨á§ù!EÌ+©èR+<’-uYÏtå®|= -´0ü¯Ÿ_Šƒ÷iž¨fvóOÈ|zwà¤~kRŠ1Âäι½’‘‘a´ËvüÞÿŸKü†}çápòí·öÙ–xÃÒ›Áhð•ô.™;3±rTC#n¶aसOd—zG !i«H²WPšbK‚U­ž EI±¹"fäeš7YKjsëD¸¯Úä*P¤"ÚëLòCûþ|M[¿ƒ-à;&²©ì´rÉÀžø#—U>šÎ~3™^МQ'™,m°njÕ,GwçjXrü×ÉŠ$â9 ¨C%Ñ–`6ƒMÍv5µ\S­f§Ÿ™Gš< 1˜ó ;ð%!!3ö„âH0Â\Ñ}›tI.²Zʽ´çòZ2úê~ x#Ÿ²ˆ ðDè²Éè:^ËžoÐqóée#qÉ·ç$ÌàKƆOíü_¬tÂ7[wÔˆg• €ƒðiñ7“í¨ÙvšV¢´bîikbPj˜ï}ÈTø2V`‹‹L?4{1Gv˜^Šã¡·ÓŸ™¿®<¦Š%”±ÂáŒÄŒy1öúÀ÷í³~~«ºA•¼ß÷çè6¸Vt^S”á k§f:GšŒÁ—·+¤°cà!5ž·¶)­¼ÑÚŒ+½ –e;¤®öqü RY¨8·+ìOÝž£€9;fûMm!„ü? ÓþÖèŒG|£7ÝÒkáÁ<)‚è(À5±Ûwµw„›™<Ãö ½â Cþ+>H†Ã”:ffØXn$|Bè±þü^jQôfS÷b­g~ì); g¯èOÏ>—½›Vë’sþçç#ÅL0)xN(ßE„ Lõxš–­´P«¡~æ5ƒÎyƲoβÝCj©öñ{¢ÚáŒÍûâŸ×&j«Æ´JœVPEáüd—$Ûy@²I±¢™ëßãx1³1x|¹W; PïÕÆ$ú:ãê ŽíÜ[iÿ‘ ÿœÿO[û³ ~¼(^°*Mœ”üÖ”ûÄdص±1f7™4„ H\RMT¸¿ íu$3ZIÙ“îÅ¡©ç*öüÆé¤Ð äì®°,}jŒ”ª¤õmÛë¿ÕÏ2çK: ;Ã}á$5ÈÏM<ÎóUQ&,jÝRG^Ãî@S¥“7DÝ¿ã\°Ò:'!㉵'–w1×j} oðÿÐóTšë:ɉÙW$¶åmd3ÜEà~¯œñÐêsqÉÓW ?/§Óq6Ó0½o‰@ýÔÅM*/Æ?™{7§•“uÁzË^@¯r§örR–/,ö-f@hM·ˆ!!*Ž5i'}®¹«TmõÜr ÛD<X‰}’、7]VÔÙÖеËñ7msg+‰ìÞõìæS†]æs7²6A/zɈ'a·P}p#6kòhxÔ4`©<#-°x9Ú"vî¶Zç0’IóHóËá¹ÝƒüB;Ý>(Phhó™É)¢BõDD2°êÀJKÂË6Oâý؃ǥùœý«ÁæšÂC%"-8ž¿Qpüd»_Ôº©Ïhç$zi†-í«„ñyÊÀh¼RL_§qc“;šÐ`9ü¿o§(M¢ÎRË\= æºÃ’·½ ‚‡·;X«Š`ÝH±¦ÌHD§Þ²ºïQå&ÙfÀ"˜4O®ÇÑ0ÛêÏÚTƒÐ\÷°`.—sÆ]ŠÖìþ4„î‡÷³Þ)YÍÆÀOd¦!ŸVÁ“ĨPy±NÍ&j`«•~4!Â5V ÐÈò$P¹›ˆµLÂ71$TtU©NýñLV¬Sè°C®]’;£#Ĕܞ‘K²ë:Q¥.Ë¥¬'[MNRÅü*Nù2Ö£],S= ,Eö˜’œÈ|,&®üê¯v¾†Ä–èk×_ ×Ñ5 ×Ë™]úpœGŽHäb¢ã0•ÏÆï?ú<~–)qØÄÒ"í½˜Éfc9®ul¨yøØ±³q¾uËï„À”¶éâ¦UF×Ä›z\K7~ ê $?˜Ræz„ã ðô@ß?õ+YÙXÜK¶ª©nü¡û~œÔ1ê2§àÍñ;FºÈk£ûâ a¦ZQöÅÛç„2){fÁo‹†(vCÏ}ÒîòÌý¼îUa}˜oÐs9œ•÷º“ÞÕ 'ÿŠôp“îGFÏÏàˆËC&²"Ò½KqšR'>HnŸ«c\‰o-!_ÚÌòå¨tÈS›Xãvúª4¯ÚèÊšøJ_Õî±ü-Mf=[帪+Íûö™<÷±üØû›´d;›dI¤àÄy,%œÊg¹Æ[¸6M³Úº¶¡ „‰¡Ú¶VlµüAIü¸ üð.&dhÚvçýÆÌˆm¤K+Æm¾©äVÖPdámï¹ð™GÝz¾NÓ ókÁµ¤Pçqåø@M2¥fÏu#-hrÒÌl`†‡Àhbµ§N•IÄ ÆÎ] ܪkµ.6¤Ñš‚ª[½û'Õ€wȬØî1 Rï8‹ÍnØs-'òÕ8ÒfË5½¾›l)r†éõ(ýµô³î^Èàc†ÞÐâ*ÄFâɧ³¡ï,Xn8/6"û~; É ˜¯môâGñ RŽ ðèþãZ’’MAS Ú1Í,Õ|oš“TJ ÕM{¯úö‰ÒÆé‘ˆ£(`Uïúˆäì†s³C P7„~ŒÂTtÆF §0\`@ û£\=ô—´Îæ®ô 6»‚¥FBði!Gßø üí>ó¶äHì'Ëå¬j ½ìë5äyŠý­ k .±Æ­¨B¸)ñ,G©'Šw7ðÓl'ÅI‡f±õ¦åˆjÛÿ`IyJÐÞ ÑÃÕûa¹Ê¤mÙvŸQpv²‚©ÖhÑUÿBþëúK”3Zƒnž´“YB‡†s2Ù‚RDî•9Ý +×Öb8?i¦w†ê­³}- ?PÑÓïÆhTQjf.Ó%n¸éÕÔNC ˆíȬ*¦°Pþˆ¹Jrûû[rY;o¾(I2¤Ä´4V¤Ÿïþž•mkÌëM[Ö.ÞvjwCån•j¤ÖøIµ¹baæé‹–Úô€Úžb@üìYôQ?#u—[Ö“Âá*+3NqÜ1;é#i®ßÉ‹õz,î ë‚äÚù¦1I‡x ÐZ™äºR‚î5’`ç‚ñáµÄü9)U½XÞ½~ kÒ ÐtÎAm- ~ìʈq¾µj]÷h5˜í\ž¾¾k"?Œ4@£Q18«íM­¸Ž"ÅØã«ý™|š{®¶!Âl…$ÈÁL¶ÈüìœE{8AÓŒeÀEzÍ2”ÈYtDÜ•7¶b¤D¿l1d•ÞQ>࡜æ}Á mßs#Ä'$ÉC® Ž.uì°™Û´DÄ] ×`Ùóflæz\ÞÍvŒL–N‡ps›n>Àÿ7pZÇèaˆgþ°AÏoQù윕O–ín5ŽQh?=<‚BˆÇŠy»b¼ B2އJÔr+/Ág° Ùè ¬òK­É¨tex®‘,€–¾^uÍ2="»Øi!øµ‹êZÝ *€’_„¦8Ö+‡£ë¬çW=Þã$súc€ûåR•âiØÒù¦O‚ÎXmýmã¿S:Ã-…‚¼foÚ$|Òô ä§ æ™<Ûñpåñ‰c÷&>oýŠÕ'h(·n† IÈ üð.B©O!#é®.+Â<ÞTÇ6ìùìö[¶ú:gÚÞò ‡Åê@Þ 1Þï! ¶.çD(ÌÝë3©®(¦|Ë“6Ù[,Šx+.+ˆ!vµçͧ¬»eãšð¹ßä]Ä›øÌ·‹gQÕŽ³ó`¬½³9Ñ€9àÐàq}ÈÏ_ŸÏdÔ6sA‰ )oÔ7ðã æ’?·[d°âHÐ=áæt¸ï½¶D†@‡¶–\(d€›œ8ÓB#Z€4 :lë ™§±ìÁxš€Ío’­ œÚŠôó~ÚŒ]§L=ð][— jX¶ÎH†wpMsîv6Êä}ˆñ¹üÖÍðŸúÐf·YlÏ‚(wýg˜JC(\qŒ=Q€yÚê OggS€}›O!V£k€Áÿ)ÿ.ÿ-ÿ3ÿ…ÿ/ÿ'ÿ(ÿ/ÿ8ÿ9ÿ7ÿ7ÿ3üí%& €®«sƒŒÝÓ:u®oîúÀÅ ½Kމã7Ê‹…}U¶å›H\æÈ 5¿vò¥D®^è ÖÊ©O*´5Š QZ!:ÔÐøq…hiÍ2´Ã›2~gk|’p·;⦇ŒPâh…Vq3úƒÿ tPö‘Ÿyõá ï–fÂÅ[Mãªm½¼a§lWWåÖÀˆ jÆÇMü;I7ÄJ < Šä!õÝ´¬ŠË8 ©³ !”Ç ìŠÄè!OQéÂ_ÈѲ¾iTw!‰”„'h…/ÿÀ“ —ûÉÒ¦csJiö·í6™×ãe­+5²,Zîùhƒ*I¬HÇ(!*êHë#ÉÿíFj°pf{²ñÒÐu$ŠhD:×cÍ0/6Éõ-O üìX¬‡Âãœ:Þº}¯õØ$/-Pƒb£Š×·‡ˆ¶Z!ί1Ð_–g°[ÊÒ$|¿ë¡ÄªS[(ñ“®½9 á Ä Ó*_S@¿ß»}@*‚/eÙÂt!hM5ÈM1…§-£[-Œ˜¶Èüp)ÀMÖÞ¼O\€y€¡®ñ݉Œ%kÂ1C¬¸+ŒíWÒ¹A™½áÏgk@˜”òÜ”^\¤¥ÔD¾å úøT`ñË5í÷®(ìÙ” ˵oàè§ÌË ^r·[ÍãÝX¾c·Rg°©ML¯ðEjv^’"-9°›þÄ%#ÍŒŒ[Q zA‰ÁŽõ‰.†F@°€4qÖ9Î-ü sÑý¨„HÔ÷™@€xÁµÎ6,ÐCzç×°_tËy” 7‡:¢ò2´ ÿ üð.æ³.:M<|»A,žv¨Íàù|R7FìÁÉöv–ŒpWøC5WÆzìlt™¤¦DE´Ò^Iû–!Jv¨º‹tk£ìÇêèD´&ó|Zíe“¨!*âRã•=ÇÆ09äö •ç,ßQ@ )èüFz÷%n:N¡wïÀp̳ïk—…ÄB‰u‡ðèA?ctgY_vGIÖÎh»ý†ÂPÚôÊ4™ýCsKÑ"¸uÛ¬DÇÄFV¹½Gꈰ¼P–Y=ï½*Sðñ~¨ÌÄ9ý\"mbXj@ºÂy@¢™D'„×N©Åý‚ ×à0õ}&b|Ïj…Bã½ç t:²(š÷÷Mhí‹ë$xÅ*lß*IDl¹ 3‡Ã.>Ô4È5: üìWÎN„òaKÖ@ŠoÇrªTûýå#½•¸1ð$øn7æÄ‰ö¼šèC_} ª+8{Zåã$ÿ¬M-Á¶ Ì5•P*[©_Fêmê0øAi­gh%»`U }’­m $ Êæ³ÒÞ8—U íq Ðú*¼©C=Áã´ã—†[ƒ 6ywÅ“v5°ŠKõ–ùIdÌJEŠ2D©IËÑÚ’X•q"ØyÂK”ÛÆt)â—(eµÁ~B_÷ ÄàpíÅ0ñàè&¶CÛÜŒ@,~>1?í›Ü¾¤îÖb€›9õi˜ñ•°Â(õicWj.èWÆB©ã¢ô~ô*ñÛ`¼¸¹„ÜÛ¾Àc€>Žf!Ô¥8íM™æþ·ßc»Tx^+<7X¹»\l ¾>\?n¨§¿¶Ê ü§á4°é3¶\kz0”‡m¸ ÃÙ~aU‚X#Y kˆ é›7Ù åðzvÍüË:I¿P–ERÉ,Û[þïßïðvyT95vÔn Ðâïb1Œ­öøj_&>—ŸBæ*AÓIH?öj'ß„^Ëy‹k)ã¶æ›ž¥j`ÿnˆÚòíL/Nýù³^óBŒ¾s´ ô]û#x4.ã»B¦Ú¤&3똯Ö=í=J¹`WW7ù¥˜li¦ÛŠ(MКPJµñÅÿ| 3_‰Og„FzµZ¢Í”ïÇ„[^OêûÉ¢QǦù Ù@ÓQYÏ%…³†›¾ÍÙWMͰn§žÝp3J§z‹ŽßÈÒä™EA×ÃûØfõZP-"{þ²¯"“ƒJ>¦Ús‹¬7¶Š;5íG‡<ª?_3(‡ÚÈó@ôûI 6Ö:·Ýá)Æg­0O.¨¦8ý­sì@ÿž}@nì|€öånDnþ$zîW'qóý®üŃÌÛdZxo½€ÅßL)\ÊáÇ6èzV8›.ow“0yõâ”}]%Ø;ÉÃr ×'ÝŸµüðˆn‡ÂÎ/ –‹Èº{h¯t»´‹u›Z,xZ‹W”¨Ô£ic|fxã÷ ¡MQøÔQôÖf›'›kûK?àÝ‹›è*ünÍ%<•¯S™ìP·¸XQ) “Ã+!;*'šF+ ½µ’+¤ƒbÅâ ª˃ݦY)k®õYb³iÒˆ×Pø0Öç¶Ù­É²£Ö»ôÕÿ¨éJ÷‚2øU4{êßo9³€†ž0ÖHHýÅÊ-Ãøáü±îªÕeCÛš2³¯`I,2EúÓ>àæ7KFÐrŠM}TÓýݛчՠÏ©6ºÆ $ý®ü&‚Ö· 7•1q]™QSÜÉ\6-ÉìVynç9`µ—Bz*H)ÃðÈÚ m|˜}“ [i²ã*ô„Ôðϱ>ßðãï2k>?·!ÍiWRDD„&©œOT‹¢€€Ø°™‘ÕžÍmº$ºÊ[ü%ì¨wzbѹO ‡ªŽÑ+6ä•u'žèN.„ø‚Ä!ìŠbÌX=›5â(v|ôö §[’T‰uË©Á²º#Çê 5ª Îc‰ª¹< »š,n?®…ã¡ëí2¹W„;Ygˆ8—[‘§ãqW@k šÂ DÖýì» î“‚ ­0èWÿb€ çÆÇh¹>Œß}¤p ~…ù‡û|­ªµ8üb]ð£Æ¸·ŽHi\DåW™yòÞ*ð¯À.Ðe-èeF+§¾µ@ÿGeU (:”½,F ý(âÓ÷8T9üµ~‰yáÜI‰yelXû­ä¼[‹rÛ¢ÝÕnÈèäˆ(nò××2d|Ç·ë]3×£ü`ò{ RAáh ”qM¨8êÍçß5VYû¤Îr-hÞË8‹¶Ð´x£á!¡¤Ê·í €çB§„¾}rÐ9-­G­æÁ¿óØÍŒsΈaíp˜2*(RÍÒL6ÎÈÃjÎúñ‰$SšÀŒ+¶¢_ Òë'E-ßK˜ª©eÞaÃz HB£.Täó)KÌ #5ÏH K”Ùª°?©0N%ßFÐýD"Âfï&JíüÚ”H/…ÞUà‚GyIøV+Jg‡<6ÃqS;÷³´cq׊QuždXNÏ”fO \sÌ„é™l­b¡*Âïúe:+¾å)ÒŸ ¿»NÒê82xÁÚ*)×&_o/›sH¦ê*Îø0qƒ…#øScE4¾´Ä’¼5FUãÔv[ O½œv5Bª¤pÛ‘†J K¥•ŸmÅtf/Óß„£ ›Çôš(ˆz4ŒŽyDî0ü`ðLiñ—áææ©ÉöÏ[­!^UÈeæm@‰¶Xb¸Ëþö‚Rå<õLæû¿Ð7dÐQéZ¢ÕÔžù S=«5-ÔÿES„““(igôSdï,mOéy¦ ]âës£gw[³îâR‡hñFr-ªñ\H<ü×D  •+µ^¶©]°ú£ ¢Á‰Žö)ï< =JöL_l™yħ%†i  }ñ“b¿|÷©Ýlt“vœ´æ“¤4VÉéÜúÍ‹fwR§sÛ·®ƒÁÚê#ˆb±ûÌtמ‚€{£HŽR¹tTâtgìmQ<Ñǧ ŸïLRŽ¿)!V®ÔY—Tq†AÛ\–pt¶Éö<ù§;èí½#·9–ÊÃ÷ÑÞ¨À1ÎVq#ŠÖøî§/‹ÈàáÄvÄD ^ zæ]2æŽ4œ¶%&ƒ$–ƒLÎý·ˆmˆ{5 [á–†SdïØØû»-RñÈË2ré6!𖜠iÛᘕN@ÈH÷o~m^6¶8è»·[iÐõvˆf̶œdìM ’XÝnÐÇ…TüÖÙ@òmýƒÓÖ™Oí#»æ¢ßÄÀáoЧ—ûÙ—Y/ð§ï|±þ”ù½Ù¯/W—Ѧc …'¤ö†FäD:l¨‡ê´ðô;ø³mo†B“‡ù0~ÅX]CÚÕfÒ”³.Ó¬Ñ[#Õ(·…,~âꢈ¥¸ú¥ÝbôkâÞñàƒxSè1·ÕL/ÆJưÄÚyÙ5"}£I•Vé÷½‹¸l˜7ÓLX½Ý\qšro/Πê[¼E}ÒÀŽm&éôÓbúªý†É;μÆÔ%¬à®FI]ºJZÿ„§ r[6Á®ªSõ²¶óÄæº†Íû>ÛVzû}ªaùä*o•Ô|ü×BÖr—Šdòï°'¯Š2O qTÝ×uÂ#\3LÓô'¬Pº‡{¾§ØŽRvª– 9xŒ5š36iIM6ö“m‡ªÎ¿HMŽh+©Œr§ŽÒ|–I»B&ó[ üÃUJœƒUDƹ;djÚyS2Àµ¯®Bš#ûÞl|ëó ²„Ëpœ¢[zvovýsñâqi­”€Ó,iRøMÂx5Ñ­R“^ æì§-‰@c,óÄ_Ž1^~êý5E­ÂÎzn¯Z”‘9Qƒ´œŠ‰Ë7¬ÓOx¬Ÿ>flT}IݯÜHæFãV“rÎÙ†p·m¥ÇîQ׸t•º'š‚»Œß’ª+Â…Á"™²[ü×CJó¦~|8Zª-%‰—ŽÛ·SÚ›¿U•\bqëBZÃ}7utáÔY÷ Îs*Üãü1·q&"WíaxÀßù å b’-LÃbœVÆÖ79‡Gº×ÆÔè3ó«ä[ívù‘`Ç(ê6e•¶ÙHOtWã]¨õC£^ÓgŠ[<éún"vípûx1½¶ ÖS™Y³€zý¢%KmZ›)¾Õ”ðB(xñ ‘mÒ'éX8ŸVä ‡ Æþû¸El+a‚®zœ_;I Ù9ž*¿^C¹N@‹îà&;Íæ˜þ5+ ÂÛïŠ;/d²uS•óÑçÓ,þh÷Y“®¸‚ò†Ñ`p4!CǺ.sVCFöÙØÉ»l:Cf€*TKð8ЋOggS²›O!W÷@`ˆÿ2ÿ2ÿ4ÿ,ÿ!ÿ&ÿ.ÿ-ÿ/ÿ/ÿ/ÿ1ÿ4ÿ6üÚÜ·cEz¦àêök{bÜXáªPÒA0ÊZ‰)=  £enì•Y]oòúÆÓ§8Íu »£j Ãn¬5òmëÄú¯‰´ÁŽÆß}èXÍhq)ÿ¾fü»%üMORpŽüiB€Ä§Â!n $J´ßÔôËNIñ(¥¤>Å)Ñ¥ 9átÙzU‹í‰Äu‘bº‹$HcI}ž kÈÝÚÝRNËY»ú³3/=ýKÕï( \ñ.ã] «3m(&”™Ž‰ Ue5ZB…â|‡ ­-kþ¨ÍJö˜4J8Ö%ó—*:ÏÁ„#ÓÂÙ>N¦Ê<¶Il^¸³IQ¾›Z_»ùW À+µ5§¢Yǘ‹Âšªí¸˜fUÃénhW{óÈ›‚ƒ#›A.2bïl6e¶LŒ»›L¤Gêz{j Äi`#8oXì& óeM”@Z  ÙTul­ˆ×²àr-jM¬±lJíÀZ?HQù6O«í%m&ã©” Ìr|Îo‡?¨Îz¡}ÜŠâ7»y˜í˃}“4vö$¤äBÍÜðs¦ÍÿA—1èö?Ö ¯n!f2$›mfnîÈ~œ ¹)ѯ pìÞùïW4A'›Qµ.;Æ2 uGP´£\׎<„í&éØýû,Œµ)‹ü×FóøØæ‡qu›u+²¼mûY[ýøvaÜûÜ–‹}VRP”Á£S¶0Q Î~çÙ•5ó¶‚ñú5"º`;ž3Á*¾¶º²"‚S¢ôËãµ^RÉ0­R)~èŸÏT4…GÝ5 uÙýºN§£"N›º|íÚX_&ˆ—YKdJ_‚—£cä=ûbdìh ëa’V”t¹„itÅÀa×Á-­ôÕ.¶YfëÑni®SÊLr?¹ó޾J8¯ ÅïÔA˜ŽC/ {ð+î'|4–ÔÇäý‘š“ÇdŒižH ß~j’„½R¤ýµê6è1 M f›:kÉMØ?ÛF áæNÒ”¶Å‹ùÈ„¬¨¸I Hð ú¤ýÏ2ÚéÆCyòŒò“$ÖmŒ§Š"X$'{ü×F^b"el‚„ÇTp°ž.Ù#?áy¦Kï—ÝjÕz± u‘˜®rÿ!~ôòð†ø¢†±@¾³ÊêÚàËij¬ù¼Ou1äŒCåg® %1F»à÷º§âïÔQn×V“L‡·¢@šùå®BYç<’»·ª*®úôBk0æ:’çQþ'ƒÕKWÆ. á!9 ÿôøÕ‰û½'T“šOYå'ó¨Ew»7€•Qz¯ —IõÒokz›ðˆ¬å°€¨yÞù”>´Æ´j®EÿˆALc$P*«V2uŽx=Aþá©Ïñ˜ñÄØ_\!HíÀÚ’J2؇±]f¯ Q©³7)Ó÷¦Y¸^oSœ4j—‚-#•³Ï<2Õ/à=Õ—‘Þ/¥bÄØ‚ üÕZœ•NUÜž-ÛœÍ>m›V+âóµbGÕüM&Î>¸ˆ7\8–wЇ{Pçp[¥—,ÿï6^ŽOBª‚ü|ìûŽée¥ª?‚G×S…6}åitë t?#™™³d#=õÊØÞ1Íæ§‡3J¦©NŠ{ÓûîÓ™êØú¶¾jJÇc <.K=áÑÒ?¦KyI˜élòIÈ9—mdC)»Hb[ªPƒ^ú{U¬Hø¹|É´Ž2þlTDfà[Ö·‡Ê'Xdjoñð¼;áÇZýxËÔ´Ñžöi ªŸ¸Ÿv¶ ]˜yèù² ›É?ý(ˆÄe( gG¼`®cÂÁUäÍÉ -¿GyÔͶî#I­ê%ñ×ÅzÚü×Di÷»LÑ ÚŸëãbÞìÓlñõiŽÅqÆDCÑäþ½~ö¦ ‚çSòÿ …·C°çr¼©~EVÛœ»l"¡3&9˜¦’î¦D05ïæ‘5›mÆe Ž¢Né6^s’>BlZùÇ;k/¨'Ö ‹ãW=ÃÓmɲW'‹ Ê*Úq«æÃèÃlÉc\]„Ùv¶©†ÆðUZuåÛþl¡-szÉÝ«ˆ2¥4…a¹ééU‘ciÖ•gçtÀ¹5°€ú iœÈ;*´ª„=Å <<+*ÁÚ¦äD ú߈¿ñ0;Þ_ ;¼$ÿ6”ׯÖPÿ *«ò«Cbd‘?Z/®t0Ó“ÉÐcÅzú«¹›Fµr˜á¦‹5éýŸºNÀ%s³±g|qƃjü×CTl´ðh0‰çèQwOˆásp ¬QÕiD'§Í¼ °Ñ—1­íÙÍfo›FèfŽˆ3¬àÛœî4ÄX/«ºo@}ÎWÕ'ûJa½3¡¿VÛÁ®ø:]Ù†mÑ…ÔkàîN§Éª÷fDA¸|-…¤Nib4UË•ÍL×åhÙŠ¿Êáħå¢Q̺Œ‘]ÖaçuÁ§ñß3S…š’¿—[{\3!RGM(Z‰— Fůúd?±ò;j€ä.:&ÜAó?"ü׋ÁcùÂ6ÈÑÆ s÷aL¯€¸MÌ}J˜S}ÄYà`} µ¿û9p"ú>¸¡‰uKÁ_jŸ*,H›ÆFd¨H‘hÍÏ•¾-± ,cö19EZ´šü×Có%ÑæqóQ—•¸‰€=:¥>oÙ+aÿû†âQø¦ M '7«GƒdÈ8‰-Ž+ˆ€Ãî¼/;ûšÜîä &VQwe§Àಠù™5&£—†o¹Åˆu°äÈ›VŠ·Qw íÄs «{|Q™VWhјÊgN!að³rYÓ݆-©‘ÈŠuyh?[gba’t´ iûVû*ÉÌ0Úœ­;9‰küGf“Eeˆ1ò <Ù“”GîÓŒ¬‰Ñ|6bñ ÁÏÎxDïU»ý•®¨ÎÅÎ&ÎAòJµ¼žT.ê×’ª¥wé]¶É2Ä»^L›-˜ÑÇ7›xsþ—Àž|eðgêx¸úþ»w¹Äï²WlIªæC AÓŸ)ªü×CKG‰?ìJÑIJ4­¨‹8­w˿󆔄[ÿÍ’÷R^ôG96sJš†¶·^U‘¹ Ô7”©}%õJ±BDáÎÓÕÆã8°!é\Í'„j¢¡»Âüä©o,ÚÆe¶ãÛL|»¶|·x%ŹºÎ<„o,»—„IowïpÀšÂ€kngþ¤i¨Ólݽպp{îõw¿¼¼=ÓÄG_)€E¼õŠ#ùQ‹?ës'àºÌC mÊ, +Je†ƒ¹M‘ý÷ÿÎ-«·ÕíúÌÔõŠoÖ7üaÍ&‡ÿfx Ï‘òf™J•â–yȧu·º4¹|3g\MR½¢8Rü×CKBÿÁƒHŸbòYpÆól¦AÞJ2Ï[ü ñ…Uh÷ÛÜŒcåxÌp¬cxþ±º~'ZD õÒFEmr$ˆÃkÆ}Hú™¤îJΆÿ*C¡DîŠh&gÊãP‘.ä7{ø7ÁÖ“µ¦&å2¼ÛI“.´?c@§G+¸–êS853ܼEh|L“¯oAÔ ôÔ î‰æ³ˆ;‘€ÌÐúu ÆIÏzpË–¶X»‘S´Š ãÞ‰7T2Ü«¿!à̱ŠWmãÏJ;¬9ôà¸䡲LûtçF™b¼ï.p$ˆ“ øf+€´@ÒFØ_K\tбôRoîš,߉LÓªÖ?œHrWdˆkalN\EòuÐl|›O5A1¸ÑŒ ‹Î€'Ub°Jü×CJÍÝVH7ÎgT:Aãø{ýd* BY#s¢[å/9¢ƒ¾ÅêJŽ‘ vm/ ÕߦIM8Âôº^‚>’ø&™ÒC.C nñDdÞ–·©!hÖ1 \_'gž­—!¤ÈnlCd?!læ°Q+¯!É5k%ùZpûLçáb.°˜¡œ|+RÒÑw¸„-ÁöäÄ\è#¿r…(~Ðý»¯ü÷xÅ,„3’êNY³©q k`@]·,ÅÆP ¸”e2w|G‡)Œp ÅÛGY͹)oÁ8IXojC‹ DÞ[Fbÿ8^Ô˜¡ý] ƒ5u12æ–â€óH¤XC§æMÒ½yÁ¹+®$µÚ%E ¢Ö.Ãò¼(µí°SïúÑ+M ¢Nk! ¥|Ÿ³ü×CPØÜr¹~?ð·»-ÎbTt€/¯pé£ÌÂGeŒ‡4G¥(Má÷é¶H0wŒØ¤ ‘`+%õç;®ç*)zóÆÂšo‘Ø5PéèZeëîL¤Š$ûô{Ý!”¿ä=³ŸÛ^C;Ø’R£¶è° ­ä›í4*=ŠަKºLP¥‡æ‚SC_'ÎƒÑ¢gÿþë…y‡Jø?ZFxt/õe²¯é Ó$öžs¿NNîJC˜„-ÁšÚJ‚?|6S guõ®Gв‚s2‹•Ìiñ~ü¥¦ÞxÃú|ži¥ç(¬¡*ŒhÏ+—éÀÔ6·2L`­&J²»¹~º¹êqõg5vwk½´@…rÂ~*¥ïöÔw~Ò=6MÑ$¸ô~[›Ÿ%#ü×CK£¸P‰ˆÌé}â}OÙjj¡ê9,Ýâ!2î¾?ŸäöÊt3^P¨ê,…NØÝ½Àõë+´8Êv’hú[{–ÐZf~пáÕij×Âßœ?SöU&”|ØŠýHŒú¤iŒõ+[ö;`öpæ©8³Ÿž§÷nHo⟠¹6ÕõZ"õ7å±âž©Qæ°F‡CŦh:@R@稟‰MÊ]šûóèKËâïmsóNà¯×w)u—¥cü×Gî ÇøŠí°ßÁ¸ü€Þ±°G¦N$$QMö¦j¨Q? Ø%b,öVJäQï?ÎwbÉ¢óv‡.ûçÎwå²CV}Ý*û÷ðÂP¬ŸëÅôÎféñÇÙUî#$ &)ÞD#žÖ‘æOÉëq`âM;Sžù¥­?䱡óÇñ¾Ž+fm¨›³KÌ×줸mJAµ®–a¸¿’žèG{„„è>«¨ÁCë6îQhCŒÁ«ˆøžpÃvÛ vãýB üª‰Ý_¨Q!="ï‹®Ò3[óþtz;ÚÈÚ‹î¥ýúÑfÈË?ˆCkEÙVùG¥]þoÊ#ÁF{°ŸæpIXœ²¨Œë±¨ Å0–NreoªCŠbQ7ß›B©ç«=¡u;ªâ«3‡š(·) Æ?I|Ïw&ç*ŸæÛqˆ³eT F-¯‡B+ºèœØmPÈô0ŠTEÆ]9FýL:ƒ÷¿¡ åQ¸!«h»BP²¾Æ ‘¥î»D¢q£'¬7N‡¨?”´êÐH¥é‚@±³gùŽ\ó£Ë·ô"¨Èäìm¾ {§Áá³ÊûjãÇq˜O°¾œª±ROA Þ&ºÝvŸvÞï>¾ra?æj>wðˆpF€Ï¸ÊQ‹8·WjÅPEå¾(íë sùèÛÎI¡ëG•È üD³Ë`mþw_Q!Rfé%s 0mð×^U}›V£xèiGû,èŸ!wмö¹©+œ¬F—ÆÙ·Ç3jj„zQ\ÝûyUw¿Í¢vsÿêðpÚe¡ð‰,_Å–’Ô¨á‰OG µþŒïeªQÈаÿ½˜Œõ dýHê·ùlÛ«zäs­X°Û“=ùDþŠhCƘH\’ËwÍòðÿ™&Åž¤õ%ökšLMúP¸Å(aÕ.¾Eª|&æ*J¶F†s×åA ™»ðcêüïÜã–?/.¡ër"Þ|&™£·Í5óÚüÈ—›Ý8{¨í®÷ªÂS¼¥¯¥"¦þš_´™”ñÛµÀø­rÎ哉‘í1·–€¢äLbÜÊÈÏõ¹¤RØ9ƨÎ@ ˜‰Êv×-’bÑ.޾î7o`}QÖå8½5tp™¶LÄ®aÚéóñÎD‡T;×€eÐ稉¹±‚®4ÖdnD5l/P‚T­µlZ üì˜}oà† E‡–93XûMé1 r\‰Ü>pÌhWâÐ`C;­*¢xj‡*'.KBû7Ý9”æÏƒä òšȼschyn¼þUC3I±×zFÔ–Pmb‘jwŒø…É;¹ö3{ÿ ¡(Š40Át¢ýI¿¡¼f.H&eÕãF9—ûUJ#bÞæÓ+ Ÿ³¢3œ>N-G<äRjÄIØÛHŠô·¤¼þðü½J|ñC±õ‹Ø¯|Õf.×£GGž ™ñ$nbÌwbv;4ô|.nPÀùÀ.g=Õ_òeÎ1);¡^]ÍÍÁz…Š—žÕ;.Ú³•¢á£¯Èw3HÜIè©?©JU—`kbzÝp§¸Í¦ó^&¬Oë1 ²M^fJüìi— ¾Dâ[6ÿ£h3ýdQ€ ”å4ȘƸFȱm# M®i3_œç¡ÒHœüwJ@Ë–ÍŸo_lêA±[pjïûÕ­¢Žˆw—'`;2ÑùT Ö9, ú þ«’¸0 ï/9 þà5cýħ¨ñÔÓO,ä{#h@!\BlŒID ‚$0³†b²"½³çðI¯Mè¸u¤]@÷7w-Ëx†äŠ{ð¨)fHwö»èV‹™ýÕµêö­ÃÚA¨*>J…¦ÌD~#­Ÿ‹k sKj? í¹D“Æ/ê[º°ƒ£ftÌY,Nü<¶\鳄™Ô~£q¸.(±×ìÛý¼«¡Àq¼Œ¥ý’¤¦ ²ª´E±¸ÿжŽ5×íC/†1*À‘-^&“ÿî]Ë!j~j üì˜}Œ0gCHúì­T%KŸÔlÞ‚áÿLÉk§Q1)ÜA¢rm|j^®sŠ %µÊÌážøcI‚“›BŽ©uëXªbCRÃ[¹„¹éC"½õZ—w2iÚc¸÷ñ~ù…*âìqŠ´°nC¥YTGÙÑ×£iðƱ|þB1º'XôîÓ™—þW=@ s(¼îˆ«3VnæŽn÷V·)½P*+2Þ /¬¡Ÿ ¢vw‰cn…Ý"x€;Õïðzé, üò€©™ìe)KHœtvãÂeÔU‘ý™Ž7¯erêNµ3ˆJ­5ºÂEJûqY’ªÈ õc_}§]ÉdliîÅ+\ üÊÑJk§F$%ôÚ'¯îTíD x½EœKôs&Ú üð.Ô”j÷›ì~e‹¬‰éL#¾ôcnWNYŸ©ÔÛ¤\"/ßq»Vþ(k?…Ü^sWmÍÕ<Ûž¸û{3¼ßGgó¨)õ‰’qdW’@3µWö*`ë7¢0§¶wõÏyF•|PI®s6Ü.a‡þò˜AÃ!gû„ØÖ~΃–9%ZçK›z‚˹ü*uùš†Y¹ñ~@>âÉ 2T]‹ó£ue.KfAe‚p¾tü9£XЂP&݆rfäÀ}ˆí¸f>´EgÞÒû@S ˜ò­pÌo™F»—“eJ„±xÿž\³¤é œá #§Â"­.Ð÷‹?ùoeÏÜ¡(rß‘4Ecß›0¿òiqµîz¬·{ ¾ô[áí\*Êeeø©êHdPcýh¤GŸ=‘7 öUu qJÝ$‘ §o!*7z51ʦLqtD …á\Ó!ž&ÖØ²ö;š@ )ÇJ ü쌟ÔU}ÙñvvÜ|+JÿÂã€÷?³Êö&‹×#Î6F›…S€uù í¡SI1tVçÉéáë‹1,&¦<çþ؃xŠièN´üÌ—ßWH,þél‹Z/ÓM0Q Ãî‰V8_¢S³ÀkÉ °wÎÖ^S09VÑÆâÕ‚L åye_©IPãÃÆ¹{Žœ .û¬Ðó…d^3ÅxÏC° œU?ù} oþøˆû<]?T)ì –[‘ÍÍÁ5?Þ=ïïŠ4„žÒ#¯¾:HÖ¸ÿÚš–|ìBÅosJ—5ÞÃìM[T´+²UQ~m–‡¦í¹õÓV:Øç –{‹yá‹´èÀåÂ5vEV(Èu1r•®<Ç^jH”d}úÝ:ŠÿXÇ `‰KS”èÀ: üí#o˜ƒAbç{ž¬Ì`µõÊO~׿[3;oµ%LkÂx¹ö¹ý;᫇#¦€ñ* •œfâ ¥(ÝfΫYãŽc·;ÔAšTÑA²‹Ô¾â&³Mu tM rÕ²zVÅUÜÖ2ð]ŽÖ›».ñ†¡Ì/Qx%í.l&rdd£›íL·úˆÕ㆖|[?7W=6*&3™Ý°¾$ƒþœÃuÍØtðÁp»;п"­.•õoG¤«kƒ1¨Ü Øÿ(ònÌÛhL`}‰èa—¾#BV1†oþ%"lƒæ p{ÈÝ 4¡žÀ‘²ŠdóÂ…‡îW‰±zlFú;›>²j ®PÏz;®¯…’râØœ¨Šæ Ù©¨Á=z¤?ÌΪpÂ2ˆÜï#ÚB"D~lžïÉWójD¼ÉXÅŠ$1,Aér5v#À12`ÏEíB ÎN‰ðÂ5Ÿ‘ÒV—ú N¢G;‹ÁB‚:—ŸÛpâVe)T=¢2kÇb$óD.¹Ž‡±V/ˆr2ÁÁ´;Àù/%ÄúŸ€òT{Þl©°‹8èÖ5vx@·{ãvF]“W„!P†Mè¿p”@‘~.Of¾—NT× ÓÒ-[ëÕ&þûx™*È"Z¤âµc b'¶6Ÿš±×pÙÖ'Àº¶Æ=IÞ›ö OggS›O!Yõ=ŸIÿ)ÿ&ÿ+ÿ(ÿ5ÿ6ÿ7ÿ2ÿ1ÿ.ÿ.ÿ-ÿ/ÿ.üð.Ì­Ô…€&¤°·ðL´濇·\ëS芒E9y¶§:3¦!fg¾œÌ[©?&ñs¶V"³|PÖ«‘¸úõ}ÝݧË]–‹dÖc· çm×䈖ÒjxÆ!»¤ §,´ÉÈ1auô–•ÛÓ°M ±2ä¤Ywdåc«ZE«Ø(ñBGOc°®>µÍÙ±ª4±ñyÏçP®ä„pé}tèaºuçJBb1xC¿ÍñfpùKŒîW©líK˜ 7q@Ïì·¬@ ‘o¯&¥kËèTCé?WØ#„žÎߗѾ¨@éÁ­·„r6“Û>Ôp«žhðY<µ°¬sþfîwÉ~I¥üõ@|-Ù¬Hÿ/Û€Éî ŽâHU®¾‘‡\cØ•OÂx üêÔ]CÙ¾Žyƒ |Ùã`¤˜Ì9äköµ7|+3%N+ ²ì³”@‡w ÿ´ˆBÕ·a b@K<¨èGJ/í¡ðʾ| ‡¤p¢`‰ÑæŸ"L‰¸6%¨ôu¦_“vOØvk.Zœ”ÏMÜnM&.Ñéᘫe"?É¢É_‘²?4¢Øàƒ¸P*V}X:Œd¼JC3\µ%<¶§²\Úï’æL*„¸Bª~”|0†óO9vÇäˆ~r*})¯Qt¿âÛÆÀlKi\Fº1KPœ:÷’ ¿vDÁÂ&•†!V³/M®e„'_½u8÷’TH_3íZâBs\Á;´[+)ñ–¼y¡ÔßlNþ&í“&u"#üR$ù6 üñ“ó²ÏxŽn÷}XOH1üŽF5®¢ ÐHH ”„x ÖƒÁ5¡¨g§Ð®6áVY¡^à)¯µ„ñQ:å˜ a•÷Ìû–dÄáç\méLîY7gÖ˜Ž™<}r\9QÏy6ÆGo uqìl&€‘Ý—Î)ÖÇ8X¾ BŽ̦KÄ‘Óãs¶r`Z¤S„ÂDéºÿ–lÀ&ƈÀrÃú‡äúÛžFa‡T€´xqªÜ,a”f`Dª8»É1Ôˆ©ëR:¯èh”¶(šXÆ_jj²hüž«ò­@Yý1¥¤´Ñ“±H€¶'êˆ~!2QŽÍæ¤Ô×/8~ÿ ”?1’(Ø]Ú! üÄi£f“’‡ ;Ì3±ÞeñÃ…÷üo£Ö‰z üì.gSÔôÌ Ó–=ecîG’?®,ìÝ î'΋ÆÅ«²åÿŸÎ‹XHÎÙ•ìF‘W,£Ç Ó”÷FÒÓ$åmñ÷bgÓÌëšçqæL2q¢Ë(Ñða¢·öódÚqÃe‚÷¯ Ñ©ni˜³u'°‚÷6³t¦;½° ‡… ¯œÓ4¨CÔ‘ë§,¾Œ[»÷3=c 92¶“žë \¦ ™ÁÕs䄹6yûËôEªR9$ì’ “Š[JÌÃëîV eÁóá½$ª"I˜âP¨ûÐÖJ’hF÷L\,¨YÏ‚"ŠÆYÙ0¢ IÃþpù®qéRï™屢!ü?p¹-äPR¥#×—b€L‹É—ï³›?@J üðRI3â¡X–è S Œ¬öe0v´Ö-±T<§I[eMtK6À†¤l{ã±#b ªœ0”7‘12üÊjE ~XõÏŽ‘@ ;tÚV©½5“M_¡s½éÜ ÎdÞÐþ~5¯¸8ÏuÀÓ\*] -ßp(ߨ…‚ŸÍͺ( …ÊÅú €ÃA޶…gü‹ÁúȼžßñÓÆ1’`¼p"v5”¸mñ3½®¸‰ÿ_½=½1 ¹ºÄ«] íÜÄnš5«áÈX1ýLjzaQb__5d4Ó¿`jS|œf|“(SkV‚fù‚qó_Ê!$%Mó"P$S³ü([;Úz½-NŒ™~­ÔFŽ­áPŽò5íqL[œô4Ûi2h¨æE0•Ô¯³?@àÿ*üì3¢jèQ ô[„]dÞnoÌA[êˆÚ\‘<Ž`[Gë†"}ÏÕýÈ7µñò„É”Ÿ÷JšÒO”§á nØy0χM•î.³#«Ô* 9ÁÏ‚"¸Ü8¶:<ȯŠ&+â×—‡p‡É¤[Ò]y|Ò¨i ¯óyû2Dô‚*¬(§‡ @guÞ„/D›ž 6¹ŒÛ›5RÉÌîòª7b²¾8)}×ÄŽXŠï?ëwþ°¸U`vÓæ*ðPW±2%•Cÿ«RµÃaœ§¡œü ¼@À‡-è;ïKínùõ/B¬ÂsæPQúßüÞæiŠÅ¾#äV¯€´)þÎmNy$…ªáà4PÕÔݧd¸AB¿Ë¶ÐÓ2…@Á™ E½t¯NªùMY·íhw¹ÔŽbʸúI : üð.–èi„ BÝetlH¯.~[Rf”ð'áq½!ÜjѨþw†zµº¿ÝOõ4'…{%0f7DÕ^òÖ|D’¥a9ºÛÓ¢ÙèQJŸ «š(dÙê|‰|Ys k>ŽÕ”Ò.±ø;ÆOT±pqŸ3š@˵ÄÛ2ú ›Ê넬ºÒ½àá°2“UR†!4(-õ}ï‹ÔY†d`=OÔiÛ±}þ]<‡¬Td•jbxQs¿îm;‚:õ¡Ýú­ î&ì–0³–¯QÛû\KàU©¥»F(ư>rJ_“2’3>„Kü°3CØ=þ ]dûq¡µ‹?×"zµÅ×2ƒ'‰ñÙíÌ 5E×`¨q}ûô_'g9µ>#òíY¨£ÿ»úü유¸½‘}¿ ñ’DÚIiÌÂ:K-±Ð—_˜½oš™“ͺ¿p¯8•W1@†#òM¢¾¿ÊÕ÷°g”½×ܯ_™ ˆ þÊDcêš ó¦¤ì_~ÄÛ€'½¥½é(&ùp(–cÛôíeŽº¤ÙYí®N@Åï#†A»?ý/ шƒ¶\{ŒâÞfW|5O\º‚Ãj÷°¬]«½1ãL—*õq`k.hC—„»ZG€¡KFšëZç¶*2±ºG3ë¶JHZ“ èžÏ=¡µ蟧ý¾v|ai Í×c,–èm-žá´(ˆ´£a„)Îö*-_á ªþqnÂtùk•úŠïßJdþ:c:ÏTÈÖØÔåöäÓsvÜm"3'uà‰TØB*üñ“óúQ'@µÅ]¶µ@*d7rœïrx¡@ʰcpˆ˜qÅé :w;IQðþ{be±~y#šâïßqM®ê«“^NÏ+²e‘Ýa°<‹u§èµ¥ÖÖôFHE±m’Ø¢¸v¼;hô¢è¬"ý;TE²Ý£}‡¸$`Ÿ¡~Ô)¿úѲsÝøÀpœ·ÂYt[a2z6¼"æL¾§J ³'$K+SõæÏ‹xÍïÉ|)ȱaíØ»–/›ª•MàwÔþò¿5‘¨óŒüœ…x¦¦sûfùj›vi{}Ý ®­4ÐÝRG8g{%ÈÑ·€Z”ð¹^',÷’e Û4ìûÓ^¶øÎY­yÙ÷0Nn¦æå¡¢kýÿÛkítÂüùÏùÍ* üïâJÁG7Ò(¼¤bøÑ0À]æ}šH~þ´M(üœše7 rO#Y'—_ÇdgPÃ,îlÖš&»X!푽"‘çIgvÀâKv)‘ˆ^gxXÙ¦²¬^ôW,Ktƒq,«6Fš²‰oR[½bÀ‘#APVšå)˜Hí aÕiñ×N XE *¶Š_4gd9›â{)d¤?Ž>¡Ê5‰´I}öfi´Êšä®tÐãCs5V_¶ôV·)qIcªC8v äåØŒ³zw›GemŽú޲bÍy}¦öw…ñú„ÄØ´²D…ÊL g_~» |ÎÞo‹°øîqFÖëAœ'dø…ôI\Cí¦- üìSn`¾/~“ª:Tu¨á•Ð+s±Àྠ°Z°ÛTH`³¾ÖQLãËEìUÓ7GvÇPñ“¡ñDOÛO£5˜Ϧ^æÄ>"‚à`»æ kUój(•hÆDP5”3wŸóº ¨ÐK^ï×s6«n‹Å•Õ{7Óa^]"õ[ ÷·~ ­+.VƒÂâêº/D3ϱ6>E’AN½|ñpÎ Žç÷ )ÖeEÇYÉê0ΰùÚÝ+ <Ñç¤Ö<޲q‡åð— #ÝmëføÉg¢g,Râ½ÚèB ~+• aÉdT½Ë–’¬Y›;$9¥6φˆD³Ë|I\)ÞáFÎi á}s\ßÛÒ†ãÏ;ñ|Þ’ ¤RÜ=)šwwoe,xxÅÐîÕ>¶h ü&^M :ŒÁôüÛžs2’¬h–ú˜éœ†Z ²¯VÙ-ºv2‡Ò#Y"¾…dn‚nÑ‹)ç‰ùK®AiˆrVI?Ò`¬ýس7.³¨; 8µÜû›ô"³_wz!™ÓåaX¬—VùÀ+LNÈÓ1IP±Tuð…õQ½œ™ÁZ‹dw{>z=¾œ2“\¬Cæ,Á‰_¢jùרA‡§Y¡ ·Œ³òpØ¢~sAÿXÙÝ›B^’&ýbÏVˆ^Äé}ˆžðÌ0á“_›vŠFÕ¤ýL¿kC‹á`@­RêãYžÒ·Uü;b¿¤§=^ƽJ½¨®n1k¬Èù=µwnúDÉ8I{¡ùW¤@€!`üöÛKô>J_ÒY0=Óub¬OggS€O›O!Zãlcÿ.ÿ.ÿ.ÿ*ÿ.ÿ2ÿ.ÿ.ÿ.ÿ.ÿ.ÿÿ=ÿ.üð.iB·dE|X8_‡.½†zQìþÂÔÈ]V1fNl)âpM mUa½‹Áî^EAõœ`†5>mm@dOiÐl›Œ¯­•½‰ën…¥.ý=V«4Ùÿîíç¶*ŒçÙ>v%J5'™+7 œç:L]Óã¯ÞÛZl¦ô¿ý¦J5U* üí$î-1Ý1ˆVÏŒíÝx§liõ+TÄ®ûl‰ƒ›õN~amë›Ý…·Ë`ËsÀGÝù]bL°>¨i–'¬AçÒ¶öMkX¤xmÀ¤Úĵh® =>‰"»;Â*’'$ÔYìTÎ8º\`£}6¦0x?·`…ç‰Dú#åyÓŽþm-³Tl5Tºd]iM뉗|§˜ KÂgIn4éE *²ÒÓ¬.¢üógc ]]¤š+ešk°ï0½Éß1ï;Üü»h y‹»+áïšÙ!Ƨ cHEÞ1(´Ï>ÕOŠ=–Èòhðt{{+­˜êÌ(qÖ;}\™gœemª¶ûµŠg(r {ÞINÌ8¼k¯V”â±Û߉Oe‡¸ÕÁû›ªüì™PîôMÆG¸ ªÁö§Y•Ò”pqŽõ1tz!Å/«‘?.õ¼jmœ‡äº»ÇF!8ñ`){„’ûׂãª:@Æ©½19vW(1Rlóû°Ãt\Yvü¼ké3çC/Ú œ$²5ú ­<¦…Keé9àfßLßPºŒTÂvmø‰÷3˜Z'ydþr °"ÄÔÜßG?r9ú‡ EÁUf/«š=Dœбˆ”>TdS‚0× K†”{O[(Ä1 à.›ô o¢—¨çíe%m½UíËcY‰dÛu3r¸W [Ų 1ßE8£ÏL™X˜K8»ïÀnCC"²–ŘüCÄÕ…ñ!‚(Âzk /s›2Y%ÖzËlŽOŸñ%DOFÜ uÝ©Sǧô4îm/ŒN˜åpiÑ­!Gpæ#…¸0¤KJtù"¼wQ«¥.} ëAz0-UÚegº,OkU'.$Õ„ÙPàóäÿ`Æ´“x›’ 4-çP×ÍOpå®®ñá¿-Åk /O£ÝÜFm?êyJ7IÜýnü_й+ÚÑ©*÷G3›‰ÕM$ƒqQLJµ{[ð.Y¡ž0 ¥ãT•g=õÆ|xWÕp.øú›wØÏ^?ˆ@v®À%£¸úMÔZüñ¤Ìr‘²;ÔŸÐк.ãùÍcˆµ¢×ýá`*ìZ¬À ¹äÄðTEóø‰àκ‚°†Û9`)/Ô0¸{öê-’_Ñ̼€´híæTJqåô´¤@찻ԟƆ¶{×k9+D3s4ç;G4¹¼Ä0¹Öò–’œUEà–¾vRÿ9oI+ã3vÌ„µÈ8‡r¾åÏ3=Ó±;c pç|RpQ$ÂÖÿàç*¨xÿî-züìk{št=ß,pÏÛé¦mÀeQ Z“5‚Ô2ÇþÍäR7ªq‡Ç…Õž¿ö¾î+Þì3`_»HˆõJ»‚§–† ?ê¯ä:Ü-àà› …ém‹¡¨¿±âgËõ±úQsÖ ·ïXÄŠv]“Š “z˜82~Ôì†ÂG¶(]Ñ(­çƒvL¦H‰çøoñކa°?Ì9¿ÏTÞ¸·p”H „.¹/rã·€÷Fº\|¡´&eÐØ®©{0—b‡>Ëús쌩ÿ=“ôÐÝ ³r0Æ› ÖŸ†¢±)ÚúÊß“º²2õÿÓ67ö&{Fc7¬¾Ò@ùqëçZž0ïÍ©˜i½&¦M½Þ”aŠ`ÂK0¬Ä/š üìX£)Ê ba RàŽžÉÛMØ×½8Ùè×aD*™$úuØ3m‹Çª˜`ñâef&£×zÞTÉg1«dæàIèEÒðE»«<&¡¤§ààÌâl;:Ûïj2à `YŸàµ¥x¡»T%‘‰ÙÊߟ‰ÌP{^Ș–* YR)¸ ^û–ï§ôÖŽå0ý-¢÷h´jçLƒ›ô¨~A™KŸùl’}õÉ=Ú GÊÄÄ8%ƒa ŠegG:0“» ¿Kùé]3Ž:_–o̤ |Åÿ˜À_ÁEÏO’2g÷ã‹·Å5CJ‘ݱèB¨t ”øäÍ0wO5ÐfÏ 3UfeOެcáß̵ûIÜ:PÑ}Ø$©a;“­8ÊhiÆÞ}>ñOÿj üì÷'½g*ap$¡ø¢x ‹Ü½ADHØÖ ³Ø\µ )ðÌĪ&Q ‘Œ»¡aõ7ý‚lý^ß]TØ ¬Bsj¥TQÃ*g.ù5ˆª¼{µì_™°I ¡äT üJ¾½$M÷¢•t5ö¬¡–{DÃÿ]¦íëT¥ ¤…X’z”½ÛTGøóöN•òØüå¶·á–(VUV2æO:Y:UM<FG )ùî\‰¨¾#n¡·©$S+Íõï#S¹ãOF½?VTht^—bg²¼gkž w§öJ3œ„žÞ%Ñy¼§¶$dOVÐtŠ8 ^Câ~Ù¼5¨85,;ׯêQ.†GFi1>˜ä©¬cʤý¼Pâ°Â¤Z\÷_91É’2Z»'¨a(»fp“:„ üìXbå³/(R¶Ç&­ÑçÂ2@r #YÄÞéž{¼nì ·ú ÎyMGw”; ¶ÚźFq•šý‰M/Eqi%ÿ ,¼Q9JÊÅ#DlôÜdØNO”®ú˜òù·ò4zW;½žl^Çʰ[ëOæÈ?.Ä<\€p%ùG‰¼ÿ¦Jû¶Ôuü˜«Îó–EÖíK¥HņT§4U~Êá2žÛãóöCA·ú³p^o°ºžK—èwhc—®_¨'úeº(8„•4ÚØ‡èŸ"ß•qôRŸ§m8(†Œƒu˜§fG„ä¤dáFK$õ#Œlbš­ùX OiNÁ-ú˜§ï5w2ï'Y‰r’U Ô·” &µcäæ^3’'ÀFxŸØ”Žé̪ ü×CT…ò“!V’!(´Ešãã™ó›.C¡û¤Âäë…ä(zX;¨‰ɺµyÈ·Ýí› kÙ^tÎÏhçÊõ8EqÐÇðÿ•<Áêl€U,.!°$1ýf¢ñð*âД ºýEh©øz›CÞƒZ‡ ƒÑM’­D¥âVBrpäy#øHX=]$Ærueü¦MþéOJ§}= ò÷<ï²ToAÛ¯'!h/U±}êªlm—¦¯Y±Î÷ñ¾ˆkœ˜ƒ/Èäõäby˜º4“üÝk£ÏÐQN¡¶ÜðòΈýíwD¨]íþéakƒ‘rÌý¯p vÚP±yϳ³$¯§¶l#«Ð¬){‡; \4õñ±*0áâ&ÖDü×G7JÖ`JÇ+·r||»ÑVüì(3ýr•Ó,#rK= <ÜbGñïlª¤\C‘üW*\±¸Ñ!&ؾ Ó‰f=_Ç?HÖùîåÞì™ØùOžBˆ×¥&l,g¤à" ¸öèF £;Ëdî&€í]^a…'¾f1rô!jàfÎLM¶¨µsx¬zÓ?ÛöÆ[ ­5ˆÚ<‡žgŸÕaYa0Ò¡BºÖ? Pˆ!»so‹­¢(ó–¥>å³ö{ñl ƒyðüVH»­aâ«Ô™¬®[= üV$Oós%J{æ¢2!¬ÚضDSkÒ³¥oaUÖ ,n§Ä'O|ö¸³\À=Ff¤€™AYý¥ì!Ü$zòüìX\@zvòZ銤õŒã}ÛV·yî Õ n«Á\µÚ¶¸¾.s<º+‚„%#¨ Çs¯eÒ…Ôâ«Õ£ÖÒ…y½Çvòpx€‘C„ Þ£¹óÉÙ5Ç©Ä òW)\ N‰‹UßÖ(»£.2{ÆNøƒpÃ>̱›èâ©™ý9† 6nÄK|¡•ÝS;ÿ–Ur(š£y.ŠàE£ý"À1„}n-Š×ÒTk5j îD žÕôGˆôažÊQœ?qïñmúòíZÑJÚ%qxꣂK¼ãö>Q2Y;¤_ûŠò¾YDqqÄrŠ´­×ßž!øfó?ªM€7­dij¹%;d*ƒ,Í=£ŒÏPæ¥ÜžI¯—ë„¡x&£Ëóðs¡)ï ?ÍRl@ã‹0¥L‚’Ž* üð1ZX˜Â³¸Ká†g£…â(€f&|x Éo(×€”^–Â]8S²}Ca_’TµÈ„Ù€YsnQ¡´9ûÂäãáGºÁ`J8è·öŽ  ª–Œ›Ã•U­'6¡ô„䃱iÉ„w#ÀÓ² ÀKü^TÝAýÛÇy‡`è3éñ‰7:ˆú©£è¦”rÄ‹ÞÐõ<ýðÇYYÆâ¿—‚f¡L5~„ ;É|Uyæ£{~*Á¿e%e!\ûv#¿¬JÞæ 0qX|ù¸ºñ ¦í€ßVÇ"âî1Ï7`y’…É`ÒÃï®'†•#sún]Š$°ODd, rVQ+ýLÚ“– ëw4Ú€.Vä]âã;p4¼6KƱÌ-Žv»Mbx‡ZOggS„›O![Ãß#ÿ.ÿ.ÿ.ÿ.ÿ.ÿ+ÿ1ÿ"ÿ:ÿÿÿÿ&ÿ%üìi—p»ãM·šÂ/";|?ÌÞûVún gŠøülDu²§›ûÁWÛâR·Ï#eëƒH¹ÄD­ÏÙò‚÷ ¿ª»Áë ÀúCgI™Ó²¤?^N£¾ÛƒsO”Šr¡ (L„ž·­ƒ&¼OeŒ²GM7×T¨\ñ:T;{:I³ï4·ÑÊòÍV—‘2áú– ó}^éEJwŽTàkb(@û¿É¯å<ô}¯Í#Þz_zŸ 9mÙÖŽ%ÿX¢¯¹9Rpͺðý“M.;Ëôê°Â7_Î œl¡âº¬#Ï<9Q3Ö9´ÅûStÿškcÞÖ`/"YŽ[—-•R ùb(cå4fJ€©]* +l…I>«u–JÍ"÷ôÕsv4R* üð1€’Èrx攃ŠÁ»F¿é·Î¼!^!'±Ì÷¥L‰™c ù(ìseªÊV©±;Ž$rjòi¨æ¡ôÐ['ÄË:%³‚ÿ‘çnq•‹Z˜˜ËJX¥nºßQ°%NAÅŸÛtY$]«8¤[Gdz6îSäd^÷ƒ?90ÙR²Õ!2wÌ>(Ó–…ìvkuuû„ˆDÌuV)™Ñ*é´ƒWŒ-l´Ó§˜¿H+θ^«À×1ª%ì~Mú¶‚‚׃“-‘¤/…Ô5W÷ïw'í_“ËCJyݼ½3õçD¥ ÷R…⸶\:´}¤4—]ü’ ¦,,úœñ†¿~PÏqóð¶õ­!ôÚVÑ›ŠIÌ+òø)\8‘<ΨÐ'Züð.BDÀ¤[ãÒ ÝüÆcx&àÖ_Ú‚iŽ^ š9‹]:¹ÂP¬#¸”¥¹ï€†-ÀEÖéJÊ5UÖ Ö­Ò3ÑŠgKL^4ãñûÚô˜Î^Æ™®JÒÐÖ®»’£€o#€SÅâw\3ß\ØÐw»"uèØI¹¼²’’çô•mvˉËñb"îàQ|Tl½¢¶í¿ ó7*Ë9‡¦düìœ5òùì˜Îß®ðæcéçzÝ4—iÞ­,uîóJ)3M‡Wó«ØÃãŒ÷õóÍü?%ª.:ù¦ïK ¬ðɦ•°(%e~+ÞF=ÛÀM»5;ÿR\ϳõÔ”ÓzìRÀ¿;›¢:FÜ—2).ìIÁí˜Ù­x'L9,¼Œ~|Üe+Ùìáßt¾ƒ2½pœ¡´)½õª}ÚŸöxƒ›°æžwŒ|Tsç=œg;é<ë¶TSÎ]ÐÛk²r~­ï†¬)²gF–G­¨ RÌ)ÿõ&&‹k¾Ÿ–¬"§ýR Ú%BÅÈà!V¥ùÑ—5ÖöÀ’ ˆ‰—‘â¥á&ë¡Ð"ó]ïã!!ø_qe(Â7Q.”Šó/t3ûœþ’Dnv¢Iå¥4üïÜìV—K*sN\Æ–èQ­Ç±Nø"ëÊí \“6”×£WÒP©«\MËúJ.4~l”%î§ï×Qê>A”Bj—éj)D‚Tb‰ÈªoÌ{ÝkøF£Ñq-CþÄQ¿™*y„Qp“Ö§xáaV°÷w: ׳Ò8²:øžDœ2gò“ĸMœÚ6ˆÀ®\•¯0#Þ12Ÿê0a(‡EK¸u\)^¦QnP tâië­×°Q*i ÆSÂü~7ðª¥æš¡[”§~øžý½"P´Ð'.¸u¨$<[!°ÿ »ŸûšJüÖ/Í‘ž)Ò„Ütn hܯ BV—'gø?Ä+HêÒLǨ=¯ñ‹}ÒY·=ê2„îwfnh/¼ß¿O¼QÁˆž©Íú»l}ç¿z Uê˜xhRú­q P\±ÜŽß+?·-qËxþûR¡‰\ÎYÉ ,IÍÊ—{¿ ÷ß`¤.}PÃ6äçLxÈžögç0dJ±ŒÃ‡€õrï!†Rôï%ç*¼ú@©§bö” ̉×L)\Âw42Þ : €¤Û'™ÙÅk€%>0‚èb ¸ÄÜ@“¦fQ暟«®„±'T¨@ŸÅ°ê©\+`jæ0ÆvÔy ÓÓÁâ¤;•bÔ~R)Ö}¸¼JOtf!)wðbÄ4?Gž8ÚÁð©•´èZŒÞ–È ÂE©5öâùöò$ð –x^¾¾ð†zG %n¡³5CD'ÿr%ñ„çgJÖQß_uBÝR$jC²mn¥®5úÏ&¹"îxdÚX­ì­’füE"·ya4l¨¶ðî´,4Ø+jÄ»AE,P 25±Ê¸AöíÚoH¯­øÍ³ùšÅÚr}¸íÀ±,â¢!щÐcÎÿa9ÎSdk¶Õ„CådlIËä üd#) f˜'ÉXý+O(ŸËNq®Ltè"-9Ìa& ƒ c®¶èõÎÃ{ܺ`ÀÕ¹òìÏÆ;@àL)9øØœýÈG~&_‰”Õ“áÖŒbê/(›àÖoßU˜P(è>}×;c•Ö¾ÉrðÓá¦àûLó5ñquÝ'8ˆö T·çøXƒ &̧gì6ˆÇyw RISÒEvð˜¡Sì7ä>$Ëèö…˜_tÃU†£ËàÈH†›Z~Ñ"£*ذáÏëÎ=hdœ%líÕì_=CCÍÚôÌÁïb4ÀäcV’‚©ÝÓsÕ´ƒŒÔš´‘sÜRþTXì6Š‚µ‹-¯•¾lˆJ{hè=ʱ)~ 8ãϰ+­Æ+Œ?†ñ®¶Q8y630ެ’ù¥ ÓU‘³ôÌGø;š6‹õÖ,bE<“0+B_R¿ÍXÐaŒüb´³@¶‚Æ!!t?IŒ0î»Ø¯$ lŒ˜»æî¹oqˆveTy)D,íÚ#+1Å?Òcè HÞ,€âi0 2 &5qø+Ó,]Ú¾ˆï\ n悔Nç‡.)ŒøòQá€(Í´åýåß–ÚÅJ,Pú!³”Œ|Å*¤,9JÁ‰¾¾Ç}`5A_ºC2vrŒç£¶ñ¿‘ Ô†âPn¾š/~’(ïÜØü>uo‡ê®ÉW]Ö*Ôˆ…!NÇf1&–‹Ì4„ûðõj€:{Ul­21uƒ›†ü×Fó(6ÀôÕáÅ­ç ALõ`í¾„¡ð“UòQ›özóPjÅÑ.wï¾Ú4 M·‹•„¨¸~È<³Š+ ¬„W9®½-òç¨øÇ©€Ñ§ÁÚÖTr\r‚DŸÀ‘[‰žÎAbÔJäñêDʘŒ5Ð 9¸§¦ã«,÷Ážî69ÓÔ)’ÇÍ Œ kYIÏБ ÝR‰Ò²bÓ…CƒÒÀ6rPnGÐįË2äÎ௑bë%óåø)—‚•=ñNÊ:OEïxñH¢I¡øÆ`æZe{;oB&I'‡ËÞÇ 8Ê,æÊ¶ø»²®ñ¼q+ï´Â3§Ý‹Ès>èþÅ@öW†]·9à€À:qåê¾è`zeµ×³†üÕZ^<ŽÀŒЖ¶}ÍxXnDHÝRVå½e ¹O1Í4|ørµÂ]·ºD9%6²£Ôioƒ6Va8 jŸgާÎCJi­X\_$ùæ>’sVÀuø Û—¢Kýø1££ˆÇrâÏl¹ëš$«ÝŽJÊ)³n5iÃnæ!qSKÖäÜ HfP5Ë¢ cÌkž…ÞeÅE1ñ{u稧Æmû0E »·2IU,R ‡ãQÜ$¢¡—_ƒ}7f¤·9ø°¶4Åû–¶øµ)øã1òoµa²Â®j+Õ'Ú3þ12ö Ò_^Ïso·©ŠÃŽ@å6:@{ü‰'¾OêWM*”ðÒÐ×{Y ²(u;aÿíjRz$¡AÖ6†OggS@¼›O!\ŠŒÿ!ÿ ÿ!ÿÿÿ#ÿ#ÿÿÿÿÿ$ÿ#ÿ.ÿ.ü$Ç7Úu‰–ù>}¿¯Z¯õ–ñæÃV‹tý•êVA}0 gøâGòÊ*3–’JWöÎÌJÇ*ö°l“jº÷Çi˜@/)ÆH%izØüj¿&âÍ`ª&Ì9™»—0„Úü|ò8©"ìDˆ¦ |Òââr'QÑJä@Ž0 qüV\®cuÒ¨®,ºùóe½×qLãç‹0†Ù†¢ÎŸã”SŽói„ÝÅyýb©†Û÷’¬Üfq©X,™¾NíÚÿ±]û†\܃d`¿7•7Y]°lLÉ® 3g‘Oh‘oiŸí;FÝËÙTÞObÊ;®(@DÖzOè\I=v¤“µH¥ªæà$œ–'£`h§Ô¼Ô®èCz𨠇°4 ~05üգ𿿮¬^•ÙO€eî—Ùö— ¬â¢© Ü/³l=(Æ¢&iìLŒòÈ«´ìP:û6pŸ>Ì0å&9×ÙØiÊîoê‡YÂãq#Às°Ë҄Ň³|è¯(;G`܇­/©RŠãèÞ‘á€fŽoÁÞýêñ1$£¢qY¨’¶(Fìí©Þˆ©£÷/Ü“9¸ÔRô>Kµ¹×t7e¯îtó B¹WÒw“, \¨GŒ3A_6uöÿÜ<ÙÍ™\ ÎŒFk F‘¶êË£Éûö÷TŽ9üÙd¤F³ÈVÅP±èÐÐÃð8Û>_©ìU~*²ðÌ'ázÀ§M2ÞP¿ÐmX'®c´?^Ò%Ã)éèJzRÕ„¥üP>Û‚Ó¾@¥,‡ÁqÐGŽa’Ýeªß8Ub*D?C /®§o’¼˜`šÛ|i.½Si; óõ¿÷2@îÀz££ÇœÔdïº=ޛϵÛFJçqrh0}øå^‡ôˆgFWÉ-³®rM7Xáp1H i´V'éõ°IW˜ ƒX¢ü 4‡XµGþÚOaçO¹k°´à|s*\âñIÞ†ø¸Dqg¦1nç!¬‰É­5›>T=ódªÈ33SÄM‹¿‹Ü¹T'Úa~£ì²4Ê\l2ëüŒÓÛúSøc Œ÷ßZí–š`rkwÜ{œü¬ŒøJ\AÂC»šB´e³RŠEÈŽSëÔF«J³ê²;q¥›MÕßÒdER£9çEH˜}`«ÿÊ2ñ­úƒr7d¨rãº?uqFQùB!³á{¿©‡_@¥¹+êu)¾M>‘P£ä$q‰ªm7ZÖ¤»”*ˆ]“®–¿!¸Ÿ`"ÿ¤ÉæêÂéÎp’Ç€ª æ°î÷š^ã„•ÛTEÿ¿\‚­ s$ó6²†%(å¢tXù cv-!ù|Ýa÷Îê1ÀGnZò­ÖA“¦Žó• e¶,[·SšÁÙÑ­: èí]ú†üBi!ö…èŸä™Ö°‡=7ïžu`áÖ=2#bbeÂZÆèÓ9ÈœÅÖ5V|&øêûìSÈ_䤬:‚·1|³ßÌél‹[]¼®XGlMèÖ ‘KêñV½¹v Ó6˜Æ–AkåßÞRÖÜ"Î=¼OƵ ÚXåjž³ÌŸ?â}ô/Á~~Àæ»|5+pU»t)‚ÈÔu¢L|-†O–•¶£¿ Ãîà•uúó4‰Û Å!׫½¬¥«tC.Ñhb‰‹ÎÅÊacfO²’GUíÍ_¨Y[ú^o@­°Ï%€³ÜÓÎu¿F¯7Ór¢s i ãð«H k-›»2ÞEþ³ âžÉ úiTy%ó+æNÓù& ?ü-Kü-Î('Ôd¡Pú­%KâÀxŸ‚žö®M+‘' Kº;=šlPI Á qaìC áAÐYص»ýeú\©‘ýXPRQtîPuö ™^1?›£ç.S¹»Ý ,!ûmxÚÜΉ”{pãiÔÍŘIù ÒÙ°Þrœñí,f~ñº4‘ùf §ßDïÞ*;«…ÂÐ\gÓT"‰·ã2œ’¼ÂOkÐÛBøêKÊôwºu{ªŸ—2¥'ºÁ™H„ZþÖÈÉıI®¼™$ú¸jwÊ&¯S„ž-¶­Ò¹@Þ–V%ƒ–_{â.9 Ëá¢.aÃ"`#1§e¸¹/Ö¶Bü««B‰â£YS™’2üÀ¦5O+æ›q¥ô.âÈÎìvÿ¾÷;h¤U?¬U1{! Ë×—b5öeçÑ{€¤@ùYbØÁ§xš ’ßЦ“â='1} nŒãë¨!´?êðݬ°TëûÅ~¼DÂð®}í˜'“&‘CÜÊØOåŽÎíÛs-xMóËp"<ðÀö|¼x&9úk5Ä& ”QØ<±6öYþo5?h$F¥èág2ØX55ðKæié´öœ”j!‡?Þ]€xh4} (e?7Ù5˵§µq 'o0§ƒËxÛ "š£“â|<ôëãÞ?qmÉœØûù°¬ƒ£N•ÑGÔ€'Ñ!•¾ëÕ$~%¿Â°–ýÍ¡t ƒüÁò nFg¤üfÙuìϨ¹a¬žY51ÁÎlž ¥ä¦Ê0¯lEV(9«W^ÃBx‹£·£§Èxýr$¾ ×»-‚Cô/1Å_ eûNiîèÕÑî_£ñBÍÔb¦”0·Ï‰7Ú¹ÿèÁ~KB_öHš›Q,’Lë[ 7ôDü“P…±Ï·Ú¨ëüàJªØS÷4ßö7a7Ñ^YFþìž3‹.ÛÉÂvÄ[ÖIÆNÊc²-’æNv‘{ÉhOFbÖŒMÿÖŸ±ôVÁˆ{J•oå“ܯ¦ ä8’SæÃÑMo‡RørÔ§¼{샷®†˜¶U^˜Õ¤ÌcW²\"Øðt†\¦•@Ì„üBi(ùâÇíÿ2ðŒœÁ¿ è6|P"©ó!¨â‘ ìK” —ýÆ¿‡L­uëäå¨Ä..…×óÏÝÙ$=WX£ó«=Tƒ1å –f‹¶§@“äûc›ucf³Ó(°ÆHVÈ­”(¬cW}¦.[ZÕ‹ÀɃ‘œ>|uâôjµöþPж wo2ØçÿSéò’RF…_R·mOÁÝ»§8ÂêA¤~rWàÌÉ¡°}©S¹ânèF*‚v+…ÖÒà¦4Ä=tÅ`ÂmáJº0ÖFˆ\5μAöþÛÝ.Ï… XAü×FòÿÄ»^»ã¶öŒÀÅÏ Ö÷ óµ¦¬Hïç¢Û4KòܱB’øèîYŠÄŠ}ßvp¸9Ò^O†]ž1'2Òµ)+¶ë÷‰ã¯<²Îư…b± \àðÄ’¿ëR´÷87`vÄñ®auósÓ&v¯VÅ?4+{‘¶Q·Bô[‹[j¢æv¼œ6˜“˜I$ÊÖ\¦Ïq²>{˜:È=ÃT˵¤½ö¨Í‘C S¡ï>2—¢¡AwN+–±E[*`—ê›6XJ͸]æ:><á³XƒÞµä¥Ia,ƒ<éÔ¥‹§Ó&Ö­Jªè¥;ìÉ_'9^dG$,K(ãÇ«³ï©ú÷JÎ6LÄ)c{ȵíRE2üRȃ]úÆIÏNJ,HBíŒîÓmªÖ–¢—´ø>å?3[Í£¹jáo“jFÒ°¨ÀÜë]'ñò$aœ[·ˆm$—?(&–°¸:q ‚n׌ìòoËÞç¬t*~IýoàÄù†3i6q€ww£'ï#ŒÈ¢Ì#ù„©åêØá ‡ÿ¾Å†vz\* Ê45BZJ#ób­q6Ïü–ÉøKxÉøuô0$ZƒÄpc†jAÒèJÞ Ätõ(I¿×+iB8ÍH#54ênWC(ëåÙ·âÙ‚cQ¶f²çSTv&MÿóÀhB¹uÛIåê2Io»7¡‚ËpTDÑ4ª)æGÌ1MÇ‘ ûÂm–sb)ÖM¥ÀÐ>I¯nüÀmÜL•ä±<Ýî Kc†"ï],y™ß ¿¯$SÚÛz åã @5!t¬EÊÏž€¤é‘Â5¥‰b†…`¡,BÒ}Ï·ˆÆ©b’(eW›M¬†êëIKêM#Ô_*Uï" >ãK/òŠahž=þq!±µ ´ið¶úÔÙ壡1բХø”™eæj#nÕ¥f‹uúÙˆf •õoíÝâHáa/‡îW%þ OÚÜåæ'þàzj)GŒ@VˆJfq³«5׎jEà=þ½ìx±œ" "äi<õRl—„W,¿œ9„ïLƒ3¡,\cáÿ5aStâx¥–E›;4:ù`”òÁPª%jf†ÞäÑÇñÆ2ÉxcÚ8"3}Ûú·Ð6DÂüÁñ⊜ö+×b}/ˆZ„ùÕÉnºÒÍm—T]«£Ü%cäúrÐ˸€rYz,»“fQ^ª¢Z¥C£8 Ûd$ ‚ûª;½žq\X´ «ŠoÅxI:\ÚûLÇ3“‰›ñá‘¥.%­ –K»V#L!æ¤GÝ~öV'ì¾Kø–%§-ÇæœONø‚€¤+û(2?ާ«m3b2·Ë±—ðØEOçƒ}ÓŽ¯š Ô÷b7%Ô¹ÿ¢eEuÛ*ÃGÌ}Y¯Í" obq ó½õûV‡á½«®€GFÞ5·€_«È±À|6Ma~'ñˆÃÔ¶ˆu›.q¤}Óû@˜­òC¼Ô#ÛMÉGmtóVz}Z@uHw¶™&]è~m¸çiü•Á1«×CYá""‘ùx™þQ€û7Ô:Ð=d¢'K¸_þ;TþȹÎèG¨-æW1Ÿo•ÓW$ìr'÷ìZB^2,Fr!Å$¯Ó` U‹G]k“¬ZE$‚O‹r•q²²¸šÜÀª¹a"+åxÓ,Pç'›‘´«™KÍ!RoäÌhËôÃüÀ3‹¸ÛŒšc<œà‹ûmvG©ˆµ]Xˆ§Ù³¦ÈzÒÓßV>õF$eêÚ ú(¿j¢íkàñ-Noò’ |×WÄ«Y+ðÉ‘;U¯À^üdG¤èà jÔŸ÷ñ¢Ø¥dGŠ8õ9˜·D³¬ª›æ•Ú…#n+ Müéì7.” ^"– w’6Ì?bzF¨×ÛŸÑ7¶É-Îmƒ‚b§*ó â¾3òæ^#*ýíL=z^²"~Wùj6èAÌ­b Üæè컢-覒 µÀ¬côY“ö ¼‘Ü4rNåÎèàå²Oø¥Ò E·Þ÷ ¢ JÉöxëJ¦ Š(õ¿«)ÒP6Þ´Ó0‰uÏ¡_øXr5¨1´‹>UÆÊ´¬Ô\ªáo}lÒGù·Ù‹%MÓA!H’w‹«HYR ÄÏRMzÖÏ·V ]–ä„åÆcgÚ*¥Ô% nüÚÜ™=¯IŽÁê¹›@y`R8òG™Óõ·÷Z¨Ù¶9€A‰òì÷x;võÒ¼ÛDÇ9É|ƒŠpÇM2·Mëp{²éWõÑ—)“ߨ|G§,š`/JJÛ Üµ×T»fžË ‡ |Gç¼ ´ú=Š˜< w†‘'޲ŽzÛa%·q ¸wÚ±U[fÖP0YÍš¢^rRÑ‘ÿÞ_[ê“?{žfSBFàAqJ|Úêæ­“ÓZ¢N,÷R}3#÷ cVðž(öYóE] Br/\–ü@ôÐ?ò, …›¶[JTša¤Ø­`ÜùD%¯Ö•³ÊøG†|¹³7Ó¥k”HÿÃD.ÖÎA®:³¦»IRO’qrKVPqÖ’Ÿ¼å“»<ÄK¼û©àìü×È? ®Ø¾ðz„$¨^[œ‘¹te@Uvò³ÖmùÃûe{Ö[@ö6Þ6½nôNºG;×2G‘E©é܈èr¡qÖG—}ÐÈš sè³ꧾ|ß$x,]B‰wL=—Ö’€ÉNgbº/SîòØBǰKyy}kä‚_§¨¥¹÷.#àMÉ~ÐÜ„&„è#›VÛ7ÄHµ0VÔiäg#½DªögVÊ\IEÏÅ«í3C+(d >VÇ‹±í_ÑBµKVöNê†ûã+¡äl¯=D#'—¡\¼¥ æÝyP³¬Ù­Ú\1ÜöœÜcHŸ¨¸}y¾ƒÏ.±8 R¨ôš"…‡÷ÚjúÆÂŽD²¤‰?‚Žº‹1 ‰/2þLü×FòEïÄ5j»ÜKã笇˜óEžœÇúÝÎp d¼&{Æóüóß»¾QW&)¾ð|…h9‹A«°1êCYû-ƒ]ù0Üå ¿¯dB5j "1¤¬^[ŽôBñà^Òbžad;ãÁùn7W2>e¿mÇ*óvÉï¢úŠ+ÞŽÐ?îˆhòà î‘ÕªÀuÓ¯1öŠoüî ©ì¨ã-èú+ ¡å/óRp¾‚b«ÃætU4ÓÔ–ÆvÙ$ñ£iÖc:KQ&\d ¥˜¶-kd/uÔ QŒáUœ¹xä®5)xžX<<ÙþÁ¸¬ÛÃá]­4ï»åB=iðp;tJ_Ù7YÅÀ ®QØŽ‚Ü%ŒjLÕŸ!Ó¨[¡û ÝÄL•Ð0¹ üÚÙïÆ‚cþ]ò¹‚›d} ùG1°AÎl…6=±4è ™‹;?Ö¹)ª²^«ÇÅ„­*²¯Ék¡ ¶š‘ܧ|ˆº*“vr?{TλW¸&1¹³KÓCQQßm)]?‘QÍæä‚b¤¹×Ѝ7¤Žå&Õ”ªNУoø¾§8¤1î¯êY‰ ÉŒ ŒJhd¸Ú06S«r¥;>‰76V”¦˜µ´p–qV{mÓ÷ÆLfŸÈ7K©ø…$5Ø ¿H’&}Šù8(à2 +T#s£ª~Å‘؆€Õ+ƒ|{)G2i[0ú*”q5³aë*xc¦ï¥c“B-h“Uu‘ö(m'4.- h]ÑÄúxig=»JƒìJU1!­‰XÜü×݇sº)&½ßƒnÑGº2Ö_Ïê¸Ì¡Âìd0ÂSl”z ý÷[O€1ªßñÒo¾‰÷#xúç© ¶‘ζõç'“Ú!®˜¨6Ì£«&ß"£€u1÷k“ä9åè6í ·²+œ 4Vh9›tAîç³ù‰W|Û›÷±åqê†^ñ½Ìþ7êg„l·•åÏÜô‚…rªç-ü‚!,ÇtÔ~zôI¾ éÒ¨“åé7ßs!•#›ß±ß{EÑ¿¤µ:ªjCÐûÄÏZáÆY¹5༢»ÕŒÍ{mÊçÔžº`húÅ `¶¿>cw]NY£CžúOZXÕSâÙ¾lò¡Ülhœ¤ÏÑÃãpóñ$§…ŽX @á*Ö¶Jd‰ØA!‘Y§ìüÖÞwDišÛγ–{&±äô° Ú¯”r ZÑ¡­†´øsÈ‘ߘ[÷¸nË"-ç:€æUÿ·¤B”fÜHë[Ò‡`²ùô!™÷7ƒRp ¢,A\~ڙˇÙ8úÍó4±œb:(Ó¾™²P}7ξ…cú|eçŠJ„èb,ÿÅjœDÙ @0œë¸]SÄ'Q]H>^\ûÆ}i4’Èq¯“ƒLÁkRÒf0†ê2 ÈdU4®†ÍDãìÁGRæ¶H¸'mw7ÅšýлƒËxʇV]%7´{›…ÁdKl†éœR’ÑÖû+èÍï}\¼…,ã,J‹N}&î\çÕ¥ z=ª*\yí¾Úùª¾]@¬ÔŸÖÛ`/@kùJ·åO:?{ °N (ÆMÍÔsü×<eQ>õ£k¸ÙinP?Ä bx³ÕÇó‘ñ2´7œÖqí¨.œØ>¦VëI­¶‚þhö+æ­r…d VÕÆ ¤J-¾úGÝ‘ÄWÛ—"3bЉÙM;Eu>» ìI›„7ÑÿžÓãc‡˜”Pêö;>6œŒîµ€n‹w–›uMµ0.¤’/%!ßFÑô ÜMà\„ò:_AŸÓ!»|šPŒêÏmËÕϪ:…Ͱ„_ä§`0Á]KÆ÷”ÞAâã‰3°Å‘;†]FÈ Œy¥QEþˆ¢)@–G {xb§—º"†Õj@¶¢Å›.ÌÓ'©ãJ%°¹ Œ×˜n[ˆ ÃW´Æ, éçCîHÚØÏrŽQIÛs_þÀðCOggS@%›O!^ôP*Dÿ.ÿ.ÿ.ÿ/ÿ-ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü×Fõ;5&´ÍüNÔôÄ ÓLޱ¢ÃÚqÛÁÌŠtF± ¶qú¹rø b25ffQsíä×á€wKVå‘ )3zÄ!²RºJ€§W9Ñrh–¨ãÊx)í¿ï?íçz“>ÕÞóËþ~©§œ»1ñ¸4 4|!üé ž!ÛGÝÇV[£ÐtaìíÑY?ŽGÓãgÑó›TiVÓ{•Ô!0‹òŽæQu\1´PÉ$ó ”§»A“oêpji¥¶~ã;¦µnû*r1—ûOy—ªìËÈDѲ6yvó×rØK© ÒÔ^•(ƽ¾Í,ò^£úYês91$„?«Âã8›²~¡›ÂŽèM°Ñ¦;?c¸~Ú|…z_ó>„þ3cÄ„ Ûž»õÄ–[üÚÙçï'ÏõÝ=G7TóÄökú³P¦äEUmw­úÒ±\V=rn÷æyÓSÊlqex‘úG›ý­Î¦ ÒéµÀQÔÓùi ;‹¬*r‹ÁÒÍäK‡êæi7 Ó¶qƒöÞ\ÆòÞa³g cx|¦Ý¥1ˆ$è[£šxâí`Ce‰Q¯(¨vh®*@U½çlˆ×Çi®–&`®ÕX&«ˆ÷>%¬0L/‹âoõѳ¬…KáL!òÓJ$_¨›ÕC~¤o¿“šŽÄ8úË+v·#ð4ºr$º´ÛüÚ‡Îh$6uXƒª uK'0OISƒ&£‹ LûiÍÚö¦(‹&ƒé?{¬kv}°çÉV¬m)»Za´Ï.A•0œ¡Ñ"‘ø]t7è†àà¾)°Àò¶¾ž¶dR³Ë–¨eÒ}1Û&Ñ©àïû°jÐÓ=Òré•ò>(k…j!´ôDpXÞûO_I?±­(‡ÛÊUÍï/ÅÊd.SÀÞïªÊ”f¯?ŸC©k‚tLÞ{\Ï`ÿWßôgâml#] סIň‘ìäW¦`Q ï”:SEþo å‚ïÒ2smU4üóûb<™ \Ú²dô‹îZ˜]#ñ–¦ô ªÅyÒÉ‹[ÍÕR’EŒîè9,X.Ê(¥Œsüþúô•°ÆËmï‹11œy¡—TŸÂíïµú•½_·&QãØ![+ùòìÉ]á¦ÉŠ;5môêæk/®£Þ¢íÞx-^è×ÕWýü™·m£ægøÌæÄYÆÞ愨¿ót]ö׻ʺ6£Á-tù¤Mãs€VWR'N:]ç5ª.ásøäÀ¼™zØ@Æ{]X¾©ÒæIbâÀÑéð/llhRþ3­¿ „2¾'ú~梈®ÒÇÎö"þÚÅê¹Zl `^ú ’=Û†¼RͳHM¡ÊìÙ|’]/lëÜlÜ//?a¿ÄÜfk6Ïа³ÖA~Šiß‹þ31çñS"àªëPaUGDŸš&O=ø÷ÛÅ-fg§.-ÚϽ?]€¶ë_R&T®üÚýÓÌD{Žô*i߀"CßùN‰nú\éïPNÆï½+ê_X¬™;2T%DöÎ6œšÜ¡gg9\ÁMeЭlT·_ìg8<5á‰Û̵oi·(ßÞJQ1i^³J0~…D;^”êa*JHÜ•¼ÛtF7†äýÓ•, †TÁx¦ù(~¸ÉrÒš.R» ûÊÀŒ÷âB9.Ŀ̠gbØÞ Óu€™ÿã6Ýÿ„C‚ãœ^Ö»À%CI–vÛn¤‹CŒ±R¶-˜Ã[gbûÿ‹Ôô;á.îF6ç:[˜ì Q4¼-F™7Ëöào½Þ™“«twŽZœ›0!¨ÇËü×Fù/íPB9@¤Ü"¸ÞEÝ€ùU“þÓâäM¦Â´³Ñî[>˜×1»"Ç'AiÓظh…"/|D\päjE3Õ8»ÊjE˜s{® \ÊÇUªü[صؾŒr&Ä›vŽL8•ú²Œ øgw|Ÿû¯Ï†ÔáÕ_¡.[AyC ¶ó¤ˆõõÅZÃ~W÷‰~¢áôõ°›–Ü)ž£-|ˆÍ¯Œ BhB^k¡$PÍîjÚôM!©¦h\¬v”#BÁ”Wt ‹Œoòé|oãP<žnªÛRƽ˜™Vsqs+C‹ šùs9¡Öx1¥Î +ÍOàM¿Ò²uNãÃò¶cAªr&ÙÞ1ûQ€²•ÕÓua/ éî÷o5Vm+W Êñþ°ýmü×Fú,“4:[_àòèoSøª5µö»,;Â}Oúÿ’˳ÔóÝ…U¶a½ È”PÝ¥{@BQÇ66Ê6GÃB …üÄ}½iàò¤˜o¦Þh·}È—^*S=ý7ŠÆ Õ„'K,Ä]eZz+{@T<m`‡òZisï>ïrK/ÃEc+¯TIT¦K‰«MnÚôÜÉèÏ”‘"F2³ït]¬½–‹°÷>?ZÙuÇݹ½Ë ¹=ÞŸ„c›v½ãd±H¦=æ(©w"Hn»qé;ÐÓüÏÆÉd…á[SOMÜTeµˆ^¯•2't¿sÕNÃÛÔ¥7;û•ÝŠÌ.}în_×cJ}|6K¿ànD âãŽU‡V€À$s£S|Uëü×Fùï”ÓUB–Èæ%5*ë,B¨5"eàâ…ì€ûû{:‚ÿÑÖ|‚$&-më›á2úfBu2L{âjîúëä¯6ˇ««/ðþ!/ˆGÅVuÑžhè¬ô”mzç¶Št®­ ¢º¦jÇ„EÕPïÔ!xN]> æ…-0ÿƒ3L,j+áúh²~œ°ÄœžxuT«˜›E2Ð*g Äïùƒ±Ô†cTæ¿8EÃõd×ÏY̺ý@½ŸÊ“o:AÑI)øÿb¾Üé½£Cøå•9‚£R€â5þ¾›C 6WSÛïg v€òÚh1÷Xö‹¶Æ:Ø4±ÛBäôì´Ã¥­‚·1ý2OªÎ£TÈ32“>š¤ðöfÒz—òßmë¢öˆ·3ü×FòÏŠ¿çNÀ6ʛꇸs0ó (C®AÇ£sO3)õ —f†˜WŸ™fº¸æºÓ%Ô®èÐ 1²œÔ̾̿ôh>S›ñ<Ëž0}BoKyæ§ÎÒ3þ5÷‹Ò‰÷rä%¦k>²@[ÅG&K´3©Sr|’þü_kôÝ¡é¬fé_–`®Š¼ù­ NAÂtðÒD`NˆûÈì¢æ“tÝ ‚¬²#e·S‰¢HOoÓð¯pZ$!ÕêÔjÝL[—Äõ•þß„'NÒÂï`Uî]2Ìi¦I ÛyJìm‡6qã úY½"ÐX¢îˆ+1 VÛeŒ ;­Œ>.åYî¶™Ù Þ ë]’òl¸½–™°š?+÷…`4m"E¬œÞÕ*y;±‡ SüÕZx ®”ûIË(ù¼»géÐØ§–2þ”Ÿï‘Šâ–gBNá×Õ¬21"¼ÇpÖO¤,–;í–-ÒI!-!xiÃã ±6ê#u«óÙÑÔñôH*íBZ_fcÞÏš#-•8ŠP®²?Ü©–irfºv5Ä)e£kfR½7$óð8/EiówFX¼“¦§“ê@Y£–ó\Œ~ØHN󹳯,é^2šã§¬ß±:m·¬¤{šÜj¦E$ã˜äK“Ä#•Ê%Øö3ë8VÆÇ–Ú.$ ¡ {÷)ÿo’Åni®Ã…V/*.s=c6ØXLN Ž((Öšþ‘I{"¾0Ã?tmZKoTÜíi_¦„C¿¬Éµ¶¥Ö­,Ÿé¿šü×G"d:6Mc"ñϨ*Îv•Cs Órt±=Ç€“ˆ E™×í6_ᑞpcÐÀ^ŽÔÜË‹°²ŠsÐBáT҆Ȋ⓾kÛeß¶75§ÛŽ:بáùfëš§c6>†ó;Ûf3Þ«` OÔlØ—Öꊒ.Éùë7¸ÃÔ L? §4¢7GŸ¡R³ $ɧ¶?$yMVÎM Íp/ÞÊ)N,˜KÈœ“CêÀÖ„ –´ 0r¼®—0hµ¹îšñ,Èx“ laDœŽÓÕ ‡a·LÔÊÛ«÷{ý|®¸»ÆBÿDIp¹˜ËÞÃdMâiÛ`®ME|5.%œIQ`¾aƒ^Å2ÎN;ÍrÙi¾¦ÆÓ“Ѻý¾óÆÚÙσG_ª¦“ü×G,a­iÇ<1yÊ÷.ÓÈ `‡vÉ™caÙ­©q`doUŒ7F>û<+вEeV®¬¤RŸœ€æ Æ2nê/)¹lBŒQg’¼vbsÛï…raS– ÝLD7à{Øä! Vü؆ؚõ÷È¡¯cиâ©%91„”˜?D Jûn•[ëLÒ’s'û íŠrä‡íÛX̺{Êc1§"7+OggSÀY›O!_ ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ…ÿŽÿ/ÿ(ÿ#ÿ?üÚØõ—¦ÑõÁ¸2çbdÎ6N° _u'ý£µÇŽUšãoÌ?ÓhZ§}'€Ø„|øã¦°ôYG9ßôk"M¹§‰™û4ÜŸ˜VtGòýÿsÖkÃ¥×¥¾š°ªKn+¯ê_kb•OMS¸(u=­ZÑÅJ¸*³?¿Ä Y~ßš#ûºêÝb[â[Å6gX ÅL+9¼ƒò$P 1Qœ÷Ê£*¿„ÒÃÚ1Ž“b×"ŒPz!Ï/ 4p»S£> ŽTÔ!DÄÓf8dÐé„åÇ¿žtÔâ/ƒÕ#.ôWBÍ’q:ªF Y’®«|Qc9E·Õ“´²Èxï‡<±7†b8~g’Á!!äLçÒX « fOÍY†¹5‘l’25WŒ,Ȉ*½NÛüBh¨9‘¶¥ZÒÖ•Gt¤¶ØWÊÒ’‰•»úÔ“ÑÞOvÎ|FL°µ½j·Ä—$îxá² ˜â~¼¯¡a)TRô…>&Ý%Ÿ×ÑüáÈÌc§¬`:§Øa3{fDD^âiÝ¡h‹X<°›YÃ6L@N|ùížmó{øétb\´Oo#<7´0«½ÕVºò¯ƒµgåÙœ×þßyN˜°[k’2LnÚ@ ú;I¦-)Ó±–¿Â&¤ ™€Ñ)÷5^°–?ƒlÒYÓ…ÀXo'YÇùmêÖjC@oÎ [ıÂYÿ\·‰¡vÖC°J{ôyíiU Üj!0×Ò°Ä©3¦v¢àkžØ‹mIk”ðÌ×¶Á/üRã Ä.~÷kï wí—P2{ÚÎû`‡k¤íW'Rù¦>‘øžôŸ|RÕ²iƒ6 à ’aúï«àºÙ±{—¢Áa²ÐD~§6Â|ÑË~wôb-”ÌÂ9d€àºõ†‰JÎ"‘l·¯¡,93œU‚B½±ŽføzæFÈ%*q%Ø­ç•JãÊ4"–Ðw¡¸ú1¦…t•ß9PÜ~F?~_m”®¼îquă`m”;PΈª|­Žv —õ-ñ-ù+h‡,gàð¿lª¡VGÈ6§Pºº]eCš´ó·ÐϦº€šËÍJœtQSÕ%]ØÞš„rštæõT¡]“)×H†D¨Jvœ!+)~Ù†Ž„Žu;¾äiå üž.ÆK3Yªv·i¸£ixÓJGçr ,üa¬±ÇR šðÏ+שÆ! èv‚‹™b0–ÄP=gÞ4 Ä>Fœ ;×*H1†™Ëå©Fcøúý>¦t¹:Eâµ¶µ¼¾ŽÄ'ò¡sæë›"C§éà+rò™ !^÷)q?C'o³«(v=JÿŒ2y~Ím7ø ¢\Ï¢Ó¶{ *(+öá)ïIùM»î“—²y%¶§Ì›õUïÔÀ‡ƒÎ-qµßqtšîœ [ÜÅ·ÛRð•Þ¢¿öwêTX+Y$ÑXÌY€|k\´)ËhýLÅuEÜ.$! ž›‰ÔÔ`Lú—6*åí3—ªºÂRž²ëƒóŸôcZœß…Þ†@Ǻâ^­¨+˜£K0 Í}âÛv™6çØÜ-$üS ÊE¼\½í> ™zØu’Úh™…ú<—h9\ #ü{ÛyûHkÙé÷ÜÿuýXíH_Ìœf-këë,1Ä[§Ñå­S‘çhZû»¡‹ yOãDKÍøy1øŠ“̱CݲÈoüµÀ'47•Õ¨bQw8Á‹KYyW[:ZËr®ªs „8F·ä÷Á GGÿËP Õ|ô¥›)VÀy§OiÊo„fÃãÉØüí·§ƒèç°žä4µP•Ë~´VWüÖÞt±_Eìu¬ÂºÓ|a·ßêlC ,|Å[6’áwèú°Tx_{V-á‘a¹·œ*»ŒÓ"²ùuaYòáz9æÔ~Ò܃þ®ìIy®¿åªƒ4uÁ¿ ƒ-”±hC5ÁJéŒ=3nÀÞWHû6¸›—1®‚m•öX˜”FÑi z¶¿ Á<Õ‚±5ªˆ(ÙÇ»¬³zìt!t€~vÃèÕ£ùb±…ág9NþB«Wl‚м¾Þp"z×³ä•‘à Žª0´¹¹Å“ ™¾$?¹¨³û%Êkzz>óaö1¬}¼ÖE´…Às,ÇAª Êê1á™òXxù¶l©uë£ ³(qøi¸ÚjT9 ÚÈ“š¹«(L4«³{´‹nô_‰Z8ÃŸŽŽài€Ÿ°Mef9t|ó7Cby7óô vzÑ8ú¥õÇ“säL„²´üaˆ³íÎ5³,iü᪎;¡pÏ$Åaªï\å#éNË&uUЃ‘²W4m¾½óá‰;é|éiîú;ÜÁÝ J¢B–öD½}o~’Þt+ÙÂ=Ådêõ|vq Ýx¢ }*d?ÊoÂË®òûÚFå—o¬#5|ü/ï–ËØ™½ƒw7E]9ÓX' §7/UW0×m¹ZóÉ·àãdùV‡bB»­P <®c©íqx#—3ùÊL‹Ê°ÀèzðN•y†Ð—Nu|æ:Aò§Ú!»ȉ# i wQn((m)}¹kqå5‚–¢Þ‹ØZðw•qpk–á;ñ5ÑóÎYÊú ´%cåß@éf^!Ãø±EÙ'ú Õ´"z–4½q¥[V’à+h#ãhv¥Ù 6üÜ>Ï5FßÁ·¡Ñ‹I¥PLÂŒ ¢1þñÅÃM†ò=µ¬äqPü=Äì OÙݨE¸Hßµ©¬6Ú^,·½¥¯›B­öv³¦Bú“ZfHTOÅ,H€ˆ¬sgiIh|âr#κá¨ó7øÿ‰×;ÐIb›ý¤±Xc¤JÒu7Ðþ03ÔÿàDÞ›ÔŽÃuXË™•M8E¯kÖ*dh¶9û®Ì( Ø6‡C8­‰8®ß?èB:,N¾ò²mË`<óí÷XŸÊç½Wµ¤NËê‰ãTÊn^*ûÙ•bês²düοBÄmÍ£»‡º¤džIƒéBqŒƒ¢-1P­óû—I&-ÚÏ¢«‘µ\\Æw“fÏ„Ûúá—À oV/*JPhÁºB"è݇o ó ÈçúãßVi&J`}€ÉH&I?HÑ…†å'€hïdºÀª§8é13PO ¼O)$Ëke”÷„—ª‡Çà ‚h{•QàÔ“mS¼†ü×BÌ<6›2Ǩ¼ÈìEõ@7ž œn¹Äp6g2qÕ©+ ªBcö—_£n¼’¾ŸoéÊé¼:G£j{"µ…–Àu¯,6¼¦à=y‹òv¬­š¶j3ÞšZÎã.ƒDïî]³7˜'w •çÿS*üK­·0¬å÷ILàd¡Q.ßÅ嬗zcn¥è5š×8gÆ÷>»}L«Ñ SSåæXhËךL:â…O}Q»-ÀëùÑŽµQqäõ—ÆÀ2à~ö.¬j™@g*‰N_Ò‹®ˆ3·rIM=VÚ΋G„Ó_#ŠÝö5ÒCó+>àˆO õªªOWklZ3vvã‡T( Œ· nñÐjŠó‘06E¦‘RŵšX©Ã,?ÿ‹±I³[Òü2:K§Tæ‰ÁAïvbÜùà”'öåÙë<¥=«iÒ¤­EèW>P.›šÞ+æÇ¬†tëzõוö°Áþ‹³´ŽºÓm“f<-næþtgû¢ÞܧîÇûü×G Hgx\ŽT„—ެïOC—!-HàuBGÌ=¬¢6\†]5êž5Çb±®Ž ½$f_ÍXþ¸y3?õr3BáÛ8G€/æ ÷ØÞ`6´fU¨­[äï(û}pú QÆ0”@¾w˘*uǶ6äÂÛ¦¶žb#T!?õùæáüÍ\‹Á?»wC€–ßU¬[4”¥ô~T£;ØúÃÀÅû~ä @ÐmiMµ¾VÞÜ‘F;%Ôll•üðRá‹~T|ŠÇÿzÅæì¤¡O:&ä…”ÅöªË¶Yé+­ÒÑ-0Í$ÅrùÄÇÌ&¦Mû¦gcÏmý¶Çô!†£ëFcw‹þBs :A„cü`  Âò9ÜI‡bj2 ñXI:—Ò@V(!þ½{2“ü×èíÐØAó(.ÕÞlrs[Cþr  œÄ`Í×d¼?^l²MÜÊü© 8 *Öû͉E÷Hº’çÙeš`o…Ê–±´zúO}ÞMYL³ë¨'¥Qžÿ(Gpö¤ÖM¼zßù>ã<…ÄoH/Ñ;Dõ½N(Y¿ª­œ"iz\1Ò•=MT8D3ïï7È “œ–èõ×* WLÌ ŒB  ½%Ö²4øþûeX1I›#Q†ì³‘3{w92ã–Üp‰R…‚V{ã_ Á³éSÒzðekÍ쓼¶ÐÀôÔ›+Âëæ§ói=¬à©¶Â-×`k šI¹ðl L˜a’9)ÓüÜNå/8Öë’— I /ª®¤XŠ3…ïÙJcE—²ŸÁryæ*B’'œwêþµ”ƒV<€¿&)j7ÔÎÙ¬Iôe9w¼""œ z@ÂM4L8j$ŠRÿ1e~W[Ê õ7ÔDh *7‹.ã1؈“Teݹát¯èÌ Y+EÜž‡§”m²/¾)Ð\tÝ øÒÄ?I¿Ÿ˜ÒŠÝ¢µ7˜ÍÛ«P,–?›Úå©,Fï’ÓœA‘&áú=̉l¥ts¾c#üPgB¥9ÉšÑÕÍLqA8øQá¿ßîÉÏЉÛ'ÚwË‹njîÄßÖƒ@5–çÐpÈQ @X% œv}é–n]k–zZs|`?‹q7“ü#Ò*™ÃÊþA -I:ܹ ÌàèÜS—=OíŠké´lï"ÿ®“Ù½v÷”š’° öf’wD5ס\[u‚[ÈÓÀ+ªÉkhpƒsÌû“iC[ŠŒüv.zSÕþXpwˆã¤^HA0¼¼yØ®H†ý €ßQ#çpA•ÿS1ÁXâ>'fÅPE·3|±í$Ê?gI‰DŒ¢¼UN£}UÓŸ¾[—lê=Dî¾€–‚/ôy®ëQÛ4šëÃ!ÎAÇMwœ*ÈÓê1m=ŒÊÌ U#K8Xh—‘nWs ßâ; “ܤ,ʈvç˜fÔ̌xÙä„™¶ÙÄXC²Qwb—Wë¸ót«‰Î GŠiæ±ßWUÞìž»ñýÐ(•µ!L›m°6+D [!‰ všOggS’›O!`™ÒÁx«FÜ”ïµ#0…™¸êü×Fòœ¢!(¦/¸´-Õµ{ŸÂ1wl=gS&»â [„ñÉ"ùy>¸UJB‰¹hÏ>i§áI²fpvV(VÙXj(V$0,ÝÔKxÅ8*úÁèâYä{ÐÿÍö¤ÒHì;#ÿy9JÎYº]^HqÄÍzÀËuñeö†£iVèãÇ›N†3S1 J/;%>!ËV°­}ðW¡éÚÿM¬•i kðõ¡r“f%œ¤6ALv܃|¡5–û0†å,H®Ãç7ÉûÆ‚08 JTtØ~B¢ÑûWã%‡æ‡¼Çï€LêÜ1IÌÞŒYï…(< ‡ÝïÌ¥ Ö”7–5Ú·k†bÎ66¾ßœîêh™ÈPëÒMq=P ¬Ÿtêpa«¸)‰M7rü×Fò†û6‹‚ê#n\'.Á$ÄiXŽ<<_˜E0kÍoš4BÜxèrÒ÷ÍÊ%„kˆàLU—v M'(É(ã]-Už¯"ŸG·ÿÃ¶Š¬ü-¶RèÞ)¦ö´´H?ÖŽéÝ«K°Lx3ìZ¶½~ùÚç®^œª ;€“oQ’©MAMOíßå^±%™Í·W/gïޡÀFëÑËínÆë Å'rxì<ÜKUk¦.SíÐù¢£@ý„ýߨa#r=N˜UhµYN)+‰°ˆÒy*ò<ƒvs…唡°F(Îæ«ÊUs<Ó­QoC»ÅÊ…°ÌIb2J~–Öû'ÀŒ¸‹dF“›iKóƒi@ã¾äŽs°$Tlg-j-תüÚܘ©¯ðì§ò³oAÛ¼îwèêDˆ@ÔÔ>¬‡ ±qSÈ]¹<?É]Â9íðáÁOÍòމà+fÕÖXÙ@@ØÓJÛÚúrÉÏ£Söc Œ~‡=$Ù“ rd¯Ðk[frNªrr÷…^"I¨øÇØeüÊ(çH£5¸Gsz ¶§Õ‡îêh‘£Ú˜A·UÓþÜ/9‚xEï±õ­/²^œG{÷’×6´<݈ý"Þd¢Y·Ž»²kY‹FL2áþ<½žgå%ùž¬uÝ1Àm'¤þ˱Ą3ˆ ùküÒôû¦Óm„Néß ‚ Þh+ ÛŸ,…ýؕљäÀ¨^3¹:GBptýæ¡DÂ{žÝÏr’HZS“iJÉuîªûüÚ”B Â:Tx®…ãæIÛ,)\oè&0áLÓ²K¥ÿÑ@[Þ¸ãdÍQE…@æ9?sª´‰™ZæžgìãÍx©Í+T¸½DÕV õìœVZ`§‡¦ ÙvQ®Ö½×ÿ—g.EwÔ_åGâBòö !¦Mû-6cœ–nÆÊµ•úVª• £²i¤‡ø|÷ÔŽúãú<£ŸëäA÷%B-ÊT«¤‰wpl¦¬À¥-ÇÁ/a8óƒ;h•%­ÔÐö€ßP‚K£–z‘Í,‹ÝjP¯mb%i§ZMñÍŠ9ÃqQ½ÀsAv,b¢ýoMsúÌÏ?]Ë’ÚXCYJrBfsr®±±ˆý¿Ì¾¸×J80§J€p©GLå’‘¶®=0 ´…Á#6»ü×Fó5%æ%?.E|¯sŒ)Ž´ „8ЂcÂS¨œÌ_˜™IOkuÚ¢èRø3¯ ]Ü7á¿õü˜8Æ”`ˆ ®,ÒÛò_? Ö[ÁO0u÷ë½lÉ«}C Ðé ¨†¶L/­~¡Ïµ¹Ov!¢M¡Î'<©ÒŽê³8ï8XGTPÌx‹Kð°0àGO­d–Ý’®3øËJ0à’§z¼Žõ¹zç=*x×î=êë\™Â #Q3jãýOñglê+ê: YÔ1!F#µÍÒËÎèo”òªÀø¿gbÍ(wŸé\ 'WYŸõŒ‰Ç-ò­Ãö—“€C>‹9®ëP€Ùæ g!Jü0p¾9Š/sªðz Œ°} ~Ì®¹¶ÈŠ=eù0LC{ü×çq u+ ´JøX0ÛÓnùO‰ä!/åûÚ® 4ϧŇ–ÌÌ8Fh‡sRÔ7¦<%tÊÝÍ8¯‚ rÌ—b¤¹@ç/œ,F3úiã|ÑZDŸ÷ 5Dä+Rº¿ÿFr¾ÆMøk¤óz¶ÙƒãÄ©>9˜-B¨¤ž÷±8£NÒöÖéŠ+ÂŒùq³CØ#ŒZYÈĉéŤ {oÃMŸmÜ­œ›’&ÇL}Ôï‰åÊ9NRŸ>N{ôÖÅ ‚ýhkۇϡí­ò¨1ÔµÕòÈ%?qumYX¤Ð÷ºØ doˆ¬À uTø@½ãZÙר_÷ÛÅ„[:Ç*× SEI ñê0Y#ÛáÞº[~p#<4ÿóºb¦b=ß‘ÿ’sÃü×G#§»vOª8@•%Úåów÷† Þ }Œ—g (h †ŒU|išì­ôMUQe„*–Åù‹;´Ð_ =O Èå-½,„ J|+”æGiO¾ú0f G’VUòÆK=…«(b‹b§þÁ²Q zª‡ƒ)ˆfå9KÆjd"‰©‡¦HO8?<Ň%E¡0Ârɦ]Hæþm±öó§¥SÉáðbÚ»Óô¯›%:ö¦7t–UVžx±ž‡¼Q†_Œô¡#w/Ý]Y=Q7™÷¶RÌ€& éº:qÜ11.݇ÇŽ Z’žÕûì€ýub•}0,-J:OìMþiÙQþñv)åF^åç\w‡?-HãüÖާƈcŠmÜ&"ñ7Øõ †¯GƒðⳚΌh,ýjY´‘åKN÷¸P‹;9èÏ.KrÁÇUFMûå¢ N‡F»ñÔ]*ˆ­dÄwÀQ_÷ A{-èW¢<ÂÑ`Ój©wÅAs*¶ éBÀ+Òh˜6ùàqŽF\ÕІ{Ý?§¦ÊûÜöç¹)•s.üÖÆmAøo+îÁöÏI#mrëðÈσ¼y.ä«ëŽÍAy”Ä¡£üÖøðu›ÎÓPªHÌ"ì ʶ¬`fä`gÍ͈!ªÌ÷Åo¤ÉntUÐôJGôÒò‹»¼ Ít‘/Àñ‰˜ŸÏ ÚÆ£Î€˜³jBDÄ>—!Ù ƒy´ûùu©¾w\_^—6¢IŽ+IœúæGŒaÁ¿óêM BïÆÕÒäžàõÆÀeÁ¥iúÇbÅÐë‘ûQ Q&3‹7½Ýÿ`ü›°r(Ò¿ X³4`Öóï“h*vI‘ùr°p{0<§h9ˆ^P%`Y8Ë`nhÔÙ "6•ߺÁqg&¹®-"œ"@ßÿØDåhlÑuI&ì¢=Çwÿ5% mlQ~\Í Î6´ÄÃüÚÜ™åûÍÉÿ–4.ÝÃ9¹5ö7õNú¬ä×*«- §çù»ÔÙR•$ RW0æt_If~Íp†´Wƒâf˽$6lŠñîÓáלå­™aú¯;Ã;3k¸æOL‚øÌßÿ\ gL¾s € :¥OjÉÉá⇶ýêü«ÝÔíâ߇ÿ‰ Dè'j1Ç6±šn®C§1§¡Eð°‡?Ú•¸dLžlÑWù0à)èðÀ.,²Ì®W6>êãg›†Œó0BÎç£ýRÔ¯.—]Ÿi`\íµäaÑŸ ÌÖvtb8¥ßü<§ëÕ\Í©Ì/G%žÏo'úXÌ%6T‹Wp{OEÔÔ¤YüÕZt¶ø¸ó¿øô£·Ç‘^Qšƒ" ç@7‰VøicjÆ[&)ÁãèUu›?³v£¦f²m1ÿlbo/ÍL¥d‹ÎŠV;3´Ä5ï*höeyœÿ5¢“Ò­Ø2ú‚Ç?Óh¥ÞkžŽ`ÒýW„ g¨?÷¹øjŸ d° mÚ÷ç6û[ø¡®ÍmZácuTjQKY¬ аT };u©¼Æá'QÔ"€M´4aËž’£òó!@MšO;»:†5ÈžøxÁ“±°Í.€¼Ö8sâþùõ³]Î’ÓÞ9Í\y¸;D ¼9=!4%RÏŽ_ÑÆ(wþ¿S¼ã0#£I^çšLÆßöÛ«zIkZ¡bZ® ü×G<¶Å>z‘×{|+8׋YîÚ‰´x´ªºZ¾ì"Qð€×åÿŸ.Íö¤R h’ôÌ…B:ΉE©•™.€!öæ/jE¶YØRîÓÇ!I’-ù‡ô*v—‰ŠÚös‰2è¨É™%GUŽ¡JH˜°…WàÅêÁMà ±ÙX¿)7_ŸbŸ´¢NáSŸ¤S¨&IØíEÖzô‡ž·v‡cªˆ½ÀÖª–ÿ È 7±¢¨Fs·Ø°Ö‚w«Û¾îz§µÔBºbc¼PkÝ’å4Ÿ@YXq8»ûÏÒ8j”åØ<ëø“R›ËÓP '²­=ŲúÃòÍ@=o2¬ßÒM„Òü­¨'ýU—”“À¼bnyÖ/m‰ 0üÅí­j(ñ@Ä>ÿÛŒþº'òK OggS€Æ›O!aæðÀµÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÚÙûYásó?<ªLõXŸ†Ö܇‘ÙOŸYmvGßs£ïà#nÝw³Ü¬¤îöÔ'¦µItˆÀ…(ÿjÊ Kž%_Ö×¾þÔ®{Á+ v“ª#1ÝFâœà ô„D;p©Sp‰½V;yÕ&îÁ>fe“tÛ: kÛ4!çâ½[õMÿ¡¸Fޔˆ{âù (»®ýĸ¨óè*l×ýæ?M&@(ZP©™Ö•ïÎJ4ÑGBÌÂgýÀ¹Dº3%E~O/Ãÿ©¾{P”Ñh©j@ú¹"3%6uö‹æ_¸v¥(• \Å'n΋àÒ)ÑZi2ÜZб`¨Š©ÊFÙŽFÊ+ç¦ß›(ÕÓ¶‡Š¢2IÿìOŒépÓ_ú’üÕZ:dŒ2}‰@9›~–vÍ‚—™nUÂÞµk¢²cDÐS÷RÎ;‰¤[ÔL~»§æ²ÞaB­×2 @sxôÀŸ8¡­Eâø»Íú2-3¹ðY9Î0ì|Þ& ÃÄú Y^>.† çã–ÀÔ–ñFþT¥mD„œmMØkæt÷f¯`.ð6c`~4 ¡+ɉÕ,IªK œwwQª·ÃR—c^f'è§}´ ¦ø½UŸæðep ¥šG13rÔë:ª/nÊDbãÄ4®fìü桟Ã`%®lä ÌóZfº“&²K/ò}5Pbõù渣ûË’)@¬´…FÜDäËdNLrH %)¹v…¤zQðõªÖ;M5‚|B êü×r†ò±çåW0AÌðy x0Ã;xoSS;®7’øD9<ã<ŠDqDŒC?AŠ$8pWùäÜÇê.9T¥sz¶‹ðht®Ðbò.O-˜Ød&†ÝZU¨ùvðþ‘‘ÜfnJPäNE§ö`Æ+ûdŸúÎåÿûq< §Æ’#¡›4åGR.¦$èŒé…ÓZ|'ÔoŠët ¬A_TÚ¤išýYÞ)„ä1æàoõ–ÒØú1·tÛ!gû’EÀŸ°~d\ØXjÏÏÚÙ׸r׋¼¨ÈKÅ ^gd»î;t£{¾¡ß«‡0Å‹@Ïsv½oð¤¸$‘¬gxÜÓÍ0à¥* j§]Ë–{Fûò€=Öiµ·Ãi°l¹¢( üÚܘ¼Çë° Õ?Žfºõ,׳±u+ò$0£TO€XëÓ[Ç,réÙ ãÞb­Ò±¤H6N’û¬G–ÎØ$$Ët&ÞYmÐ ÍF¡J3CžEÌçô.¡÷AIé×Éž9o_ÜÖ”™ú‰?R_s½â‚¢W¤ ]Åþ®TÎ'mŽÎ½¦òÿí­•yG»Äð!· p¶må¬ÔÕ*T=—ž&ûsy²×Í{ÊÄ]û¿Í6"6hm nEùÙg4ûŸä¨æˆÉxeU”ß|ÔÆƒ3gÁ”›‰1ÝŒþFõ>¢¡ƒÁ§ò•—*¡"¸ÑÁ½w2wM”%Äæx‡nzé^þÈœAJÏL¸sÁÝä¿PET&æ¸Z -„*>¾“Áë@d3L¶“ó1Õ@w:»CƒSüÚÙì7–^`Ë&,u:þM$¶a1ÊTìDô)QÅšìë0|Yëðì(@£½Nv‰ðhV F¦X’ ÓÁíФûÏÊÊWŽæ¶EmÅ Y†„ÿs«‘ƒV¢0Ž®)|û¦øxâ®"‘ é†GçƒA;óáQê¶zðC®" ¯ë§£™á¤Übˆo:ê õ 9o&ÍÒÌ¢ÁÀËÜñ9€1*³â.J&vE‰Q  ឨ<'ÕBä²ðÅ£OÊŠr$[(c.÷šÃ©Ú UE÷Í9bí!#þ…¨¬}éúÔ3‹…ê±Á7y®¨¦‡½AZ\‰cÏ›-êúæu^Õýšº×–>­¤½ÏNÆþm]>™Ø²Ó*=í¶þ°¸%ä¾njè‹üÕVrk8¦œ’úÃ×)œô‹ÑC-Z :Û­š,OÖËcn¸8UUù–W‡)0󌮌Qh“„{>Ÿ#Ýê Ôí'f“>÷Tg¯PW<®gØ<±^¤vƒ —à.¥C¦íRÛ?#OŹ€Z©ÈË¡3Žiäú™ ›×lÄo9ÖVòˆO`d“ên,¹ø/bsb8 óo»S´Aä µü«™üéo 6 „B}ü($®Ïÿ°Wpƹ3XµèêØ›ˆ?| v¨ÜÕÊçüÄÛ‰¥ 4^Ö€Úml•î½sp.ÑnBÞ âÖ%Äì‹vó$ÿš#ó|ø¹©×b£â6˜–SƒÁ#ß–q²oÄ-ì;ÊSqŒžÙ«óÊH s× 7kv£øv8KÍܽà("µàt¥Ot,«Ú”_Ånhu®à‡!õÍý‹ºrmZò¹Bi²cÙÇWyù.1LÌD .…’éx…ÜÙJˆ#xG®Ép ó¼ÜxâÞ+gÔyp¥F4ÝXG6Fk®ÃuÂòÎÔ w~ t$žô4ç$½‰–QžõÓäš®õÈÎpEQ&r •€ŒR¦æ†ê×¾.]è cÚ¤ Õû$Ý2ú+³‡½[æ»ÜÛ8ɇYÎO^“võø¶Ø¡G„š0"ðˆÛÞÛ‰‚ÉZÀijãÁüÖÞ«_¤æ¡„¸¬%ãå\¼©lxLË7ðùjæß}ÙÛ˜—Þpà V§ªéµÞl'ÝÁà$[×3ÙY çÖEèÅ8Á;½ GbÌÒ.1ci]l\¬x鋹èc—)ÐJøF–F4£Q±Ù 1¹Çy›Œ‘þg¯[é–Êu¯.0©£ ñ=¤*—™—9é1D\Ä}‡c è2¢Ô]y–¼Ð(ÉþûÊqgL)Ò)[ŒªHÄ¢ÜYzr/œzXþ´D±áY·ŒÙÙ*sÈþ’S n³'ÔüôfÓ¿ö+Ám@oCŠ«¼ë&~{ÿ©ÜÄÞô‚˜c`år KK4_#A¡û¬ ‚þ()ü¾]A›å"Ðegwï¿ø¼¸¿éõ}†I 1å|“,±FUþ"{†üÕZ<}(—R˜Á8a™×ÆK5'£6( †ääØ{Žÿ[¤¬ÕÔ®%ˆ9ìá%¦í,,ü?3;yülª>fÒ¡KSŠ ŒGÇùÛ V«\ ¾§ÌÌS‚£µ.æ°®L¨¿×¹•"0^sÛß*Ëi¤<,ûóBéO|¤Àܬüâ÷ü¡Ò>™’èîܨŒë¹›¿“¨a%¦Êø]/ º$ø„uû8„6”Jz~¾³•=9ÒxQYîÇcÑãé7–xÎzUwoeg˜7g:ùm¶«#ø$ˆk2TöUÄ¢G´ý½'u™”'iðýƒû®|½úñô.+ý•6sDg°ÍoÇÀ$÷ÆÏ@W\©‡oñͳɲCÁ~ ×?ZZi†ü×FóÉ Š,.êÞÖÝù_E·°A %l:ILˆÃ&›6Ïó|ì:Ô\Z:Ö¦f×á1`9^Xy˜èk4BæØÜͶž>˜ÓØ×cë]³eƒH÷oýkà¢4ºASpÝʦÝì¹"_¤ßV¸ÏVl†v»ø4IÜäñ "½ÝG"äQ©”ùŽe‚*dÁã3fH}vZ«Ñ¶™šðEGj¦šeáª+oooê`?ª´QÅJXå)X¤“ÇÙÞé Ù)hŸßuXÀ²5[ãÍM)ê ŸÀÿƒ÷vb¡Ø™U³‹Ó-—=ÓŠ‰nØ—´Ë  )¢1&f'–ºð˜|ÏîÆvÖêôÕý¸,ƒ ž Mú¤ˆ?œ0yH‘?‘ª ¸GÙ•)û†OggSû›O!bOƒÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿtÿÿ!ÿÿüÖÞswR÷Ó[±Ðó'í j["ë"¼Q8813’8†—IDgrx]É´T»éáHÑ`sHv'Ç©èJiÎðïDN´øŽÏÅ"ÃðæÕ[KýT\¡ÈÊüÖùj² ZÜ@·ø)òGù`C@˜vÒjMC0RQع?Ïͺ1žqV®Ÿç“ yÝ6MqXÛŸ„¨Ÿ­„F泓-`ºÁ‚E¼AJ¤|ùcüü1z\,‘^´.Df^Y¼IyM„á¯@þØØNd,Á ¯>ñ°ƒIÂî®:°]eæÓfáûü/Å8³&ßþ'æ 7â+ò§%Àñ†M²Êç#S+ °ùÖ!"‡×‰Iu-€N5,Õð¥Fl¹íÈQC¿8}Èâ©vj#†üÕZ9-Ó$»°y36<1³!Ùiº\g ”áÌ _¯%XÒ…¤`Ñ0GÆ=“ß»Bf-[Û §p8,/ P£:©Ê#é €8D8¥°ÈvaIÒmN3ÑUþ‘2HÀ2jàÊ(ãß‚eæMrÊ·wêäÖŽC ·œÞ5Ÿ{GŒñ… Ï6º !Ùÿƒ?Gò¯[mkpö²Q—‚¬>R7ÅcYÌWÓÀ©V÷½øºØir°Bfm¢ ž¸Žb,B«ëÞ³|$óÏåߦèަЧ·-ØÐ†·5­&‰TÙû{1¶Ö&ãgàekÜÀM6H.cÿs)ÊögèVÆz–/)Ú íÃ=¢„Ïõ“öÿ^1-Äzq(¾—–Å5µ¥†ü °»ÞmÂQ–ËäDãá˲'Àneƒ‹ž½æbIë X7³)ÙçÄ ëü.˜¨^/oˆŒ¯T)V§L[ü˜¬’¨ën_c®LböÅ/v“~H¥¹¥½â>™#z#Pß]ùe|§E¿gšm5‰èb¨?7HÃ\ŸZrváÙÄ$AuuÌÞ•Cnh".õƒ‡ È`89 I˜¨1¼ƒ P°|!•…xÏëlo’6‚ªI†ˆ§Õø} üŠ8«ºz3EÍUŠ ®Û¬Ïx Uð`Ä+ú`q¢´ø,‹ŒÆØ?رSG=jÿ{°eÊþVœ ŠÇT'”yï(nu÷·#[<›x÷ôK¹g1ª1.F ö‰±°þ1üªš÷E²ä7~QUãi¶±›íÏŠu¯ù“¸ëôҨшëÀ¿\EéJc¼ÀŸjÇh ›$ÿ¹n/èÌÑ3ºÿñp”*Ë÷?pe÷89!ãù@Þº‘7¥Ó1ÈQƒ˜ÿ É¿,™N{ÒyÇ’ƒ©8js>$ª$Z·Îs;P0ÚÀ±ÜjæA÷OøYt"Š%;8Q5&ìàÉ‹Y;4–F¡ñ|ÖŸ6›õÿ&ß¹Ë%‚LiF‰n6,Êdê}ØÆÂáÛ§65Bƒº[döÇš°!Þ#ùüÖÞ‘r§ˆÁV"ÍdJAXñ Ýç ïm @u™ß°õ«M ØÏ¼Üü ÃØ›­´ÍJª–NF…T晢óTAã„í^±Sænl¾…Wö“¸DA.”Vƒ[`ßÎbK 3V{Ÿ´1 6Úq¸©4ÉUв3£ÍßÿÒºéÄh/oœÓ³„¸}):@G ~ÐùÜR¬%öÆ^…‚#2þ/Ê÷š¨ud§À,bôå…Oï”7xN ªö؉é§üÀÝ t߆HÏÂ$ybIwnœ~ ,põ{¾µ÷›á×Èxê©î·þE0/{írf$¡½>œ„§¥j·N¯br ýærý¯ªÛÿDñÖEaÑÃb&a• ·ý넲Z6Ò|ÒH ®¬6zCœˆˆÁF2ü×FòAÝ[y7VÔ!¢´÷Ê£ (ÿ"ú,}1b»«Áy!ÑcSöŠd²íLÁªÉš$FÀžÇ‡µ×Þ›Âð8¼ÂÏb2¼C1àÆŸóÄÙ©¯{ø/¯&pÿ%ãs±/ê϶Z •E”Œ ûÉ;q‡¹4fîHŽ Á•öÖÓQø½LŸø=ïp˜—Àö&⯛å@aë ƒ=0`ñ¼ùo$ºÇ°"&W×Çmªƒ&mÇ­ ¬’ªíµš?ým~I»ÃƒZl"¡‹ÿÄ–`0ŠÀßì. ä ö®›ë+òâÖˆÉ5²ýU 6Æ%š‡æöI@óäL·%Pÿæ ç,Òá$ì„·"£(»¨º ¡zà\&y©†ò.ʹëh5Ï!'`G¶Ô1Ÿú÷Y’¯÷©‚bÊRûÕˆ_£ 4wöÒÝ•Ãx•½’åɵ$<æþvÿÀü$Ǽëï"QR탰ӕÞ~]ï‹éÆÒàA—×}‚ÓÞ À¿ísuœM°7¯Þ¢?N^ëЦeO•IEm¶,çk¶.5lÅ) çÉxŒ ’°Û™œ:.÷ƒ‚Ç˨ßþ ‡?xƒÛè­ÌÁ»§¹Ÿk@à’(Íɤuƒ®z…cZ_‹éBYÒ / •*38£œo¹lD=ÓægœìÁWŽ3ßu徟 ÈEP¹0&YóI{á$x+aóÕ~B&EÍ`3rOµk·âi-l¦‡X6ö‚m&ªÏ+e®>’¢ {§Ÿ1\ ØP‚#læh{”¼4ݯf§ùïrÜg¨p=ú\¶Íž^Ò\VŽ–l½µÍSXÉ–ü,s<õ˜ÑYxéø™¥ÚíŽ!}’´ü#ï9„Ý lí>ƒÌð^Êóä»´-§ø{9†¦_d* cú=Êœ¾Õ ã8WQåɆ¿\a(å²¼»„…U§?´hÇ Œ÷ÔëYCt‘æ÷Í£7n³ï?ól„FåÂ\{¦(²*šÒH]ΤFsõ>H/‡Z´H’ÚG5¿½Aâ&Oô–Þò„ûµÖê²È<ÂƒèŽÆ­×rÞZx ®Js/ÆùϬ± ýÊòÇu¶ÏÆM @jîG!ôžE;:k/T¾‰qÖ,¼˜Mª;>Ì0||ì&¤ Zõ÷§ %ƒµFö¦ö&tÒ‚Aó>P}}¡8a L•Im8†E{»@ªâîM7tÛzÐÏ·'Ú2$6%‡Lrz/Ÿ(éôõÑlæ7äY~μw]RëëY«-®'ŽnI,æìÍ•‰Ã¬˜°€îØTôc¸§0Ôymê~!¯/3¶nßD4}è6¹~ÊŒ«©­Ã é •AÍØ´›­+ŸŒ­2ÝëxH«C„&Šé¦¡»¾üÜç ñ’Ø ›æáÝä §œj)ÏtÉÚWïÈü%Ë«ýGõ¤õpeØfÒ ìx8Èy«ÁÙI­ –f)v2ÙQ&AŒÃ¦}žÕ-Y¸CV.¥O>CÇß5ÿ}Ë=¢Å–}ê"}UQ“%㬾è {Öþ[·ÿ„kg?Íjná}Â[4Xÿþÿ§+ …†'êfØa²¥d$€ ÓÉpÍY÷ŠS31'Fâ…E "ä¤()Q–çYOã <ßYØ_Ë^ò8¯>jX¨Þì<m5 ýÐj3»8q‰Ÿ›¿8©ùìÈ–¨C4—Í©0ö#‘ +{¢˜Ž|“8"åj¤¨wÙ"yJßÉ#j¡ä°ÖÎÉŠz±øvÿ¼€úšØ/ýƒ“i4‹êXÞî穸·DGüb{sm['ˆ÷qk€jJ¹(²ÛAµ’uÛ‰ê4çîÚ­‰Xx¥ÉŽÞž ºò\–ðdø/Y¦œ€°¿áH €-MzcNdÊ 6å!“ù%†’°´º$ÌʦO¥_M†¿ë.ðyÞ!ãmdßÜ?Z/d8Ðý´À Øˉ›µzÞ"U“ñ…mî<ù¢NryE©a?©½S®¦„{îèÒKžT[-U q£@±…4­ —‰H­ì‡m–À ‡Ñl.hŠzŽ~Y ÊpÂ]¦ÍÈ÷·©í·÷RTïŒ×da .¹éGD!&ÛÛì.·cœ¨¢fÀ{LÅ‘ãe‚ðÞ´î?þÂbp3¾ÿ>fübZµà…ŽX²¹4>¢=tqH>.‚=%«j¡”y¢.†P5ÌÑ“â™YnM̰§ß4ËÉÝÐ aô{iØú¿`ãYÌ5ò‰£Æ"gc¡Z´`Õp¨ëõÜ··ˆ­Çv”ëÌ÷[Ja‘‰SƒêÝïLNi4þ×Áç9?OiÅгìÙïLMŸ£ . õ‹È •p”tO’0RoÏ¢Õ4H‘»)l‘ŸÇ_µ!ÄTx§°ãòb6tòÇ¿d€(ò(x åŽpÅ×?eÌxÀOõ;IÔWs“‡‰|¸Í1dwÙOggS€/›O!cŒê”§ÿÿÿ"ÿÿÿÿeÿ.ÿ,ÿ,ÿ/ÿ+ÿ*ÿ,üÚÙG¸õ‡ÃH›E³¥m~ÇJTÇÙ$ÀC•\—†h«Ö·Ûƽ;&óÐÖíÔOzTÓ˜Ø= +/#ŒIA¸vñ•º¶ ÍóŠ#X‘8 §-HþÅhqµzsø?Æ|[&u€mçsA[×C™Ž…ôªO‹µ3n3¾÷˜kÀõ?ø‰’4gµhVga»µfM!òße(ÈL‰¢Ìí/°¬‡&DÑÚX &¾{<»Ò¼º^doÝæö4§hé¹ÛD$‹ãRbKá{gxí;™="ï÷p†b3!E{ÅB“¸(6¤JkÊ“ ¬CX<6híœ'yÂy]Ýæ—;1/`,ºþ™ÊU?ÅFößHOêP?† 9‰¥›üÚ”ä~:s81þÎH‚IÃap–¥Î P„d1¢ß)‡PLH@޶[ýë‰*ÊW¾WåèL‡ F´YÓ­;ÉzQ&‰x…Ò3»à?¤ï].óÐ~’¤uùÒL4àŠ·ÄéæO.fÜžhQê“kYT )°tèÕ¨Ò%³Ô߃Ùó‹\}L< £VwºóƒHDÆ»hMH0 qÿC)YâàÝÀMU7K˜ÿBc PÁá˜/'·Aœ#UdÉâ¦;€S‚—¨{j?¬{îˆ)Iµ“^:;JpÚÕøw¶è{2]ݧ}‡°¸Õ7&ÝÚIBQ@‹5­¼Õ òþ?`‡æ ÄlTÃ'sñÏÄíæ=ÚÅ£mç¦tSb«-;üÚ”‡Î«7„O\y[C¼y®ššsgf…×óÿlÜ{|XðN¨èzr¸¢äÑ}ÛÔ€Z­8û=ÃßÈ,·ÌeJHïQõ®{pØU”˦ÙÇ9ô^#º›„ÿm,Õ±^ ±¢SuòºoêŸLçOPB€7yS6“IN^‚eÊDEÉ…Å ”Fºk© 6·ÿˆã'{úË2ÚÌÌ¢N_ÓÊÔRùR~,úÞX»Ùöõõ{ØC¡Û'á*±igàÀ”¨n¤\ìã(ÇSø<µ–{ø2¯ À\0±ä;ÄÔ½ý?ßà uáå ‘Â»Fü)¥tÍܹ°OžÔ°g³‡èežbÝšƒ£Äµ®ARÖ'~¦òVG@‘áË{ü×G‹:žù´¯~v`¼ÓKiÂH»oÒ–à’“ä”7Skx™ÝÔCÕ Oø ¯mÁ$‰.Ó3€(­ü×ï‚ "0ñqæØù@¡Lzbýb€.6.uÎpÚ ~YG~<ØTâJÓñ©uÒ Iˆtš€R<û ö=ÌËËô\ oúsj£`ž°8p1•éÌ’'åOr¸·R"¹ÓÕ¤ôñ]Ñí‹þm#‘]3”!>´ €¹hsŠ’ÕŠéˆ6·%.ô¹ Ýç0Ù uüû$õ˜!•Îæ'VIgO'¿¯sµëÌçÆ2wÚníÕÞ Jó§9Z‘Ä/gx:ÏD.¯»û™pàÎ&’ó9§üNÆ_0W«F5òö§$‹cüÚüvªC`?¢ÂpŸ^ü£j}´:Ý0R µRÚÂ8%yÜŽÿ& »_Äø'¹ÿ2öÀÇÑ»(,ý†Ð¯: UkÞ°ò{…$ÿMÜ6øõv3æß£Ñh¨š½hú\÷¦#ܸɄìÈÆuGÙ©‹ÍfÖM¡Þ 7ël2G‰ù ¥òT‚L@Ú&ˆA¦åõ¼,Ùçç¹öÂéºïQ¤ª¸õ~k™²S6ú&µ§•Ó *ê¨ÿ¸Ì ü‰V‘Æà¦ÝÚ…/ ñRy:2ÃŽí+*0ÃOcM `ó®à=Ë`ˆ4 ˜-8+|j,𨍱֒NÕ¹±ºhm-‰æÂçªu·‹òQD¾{¤ýì«—»S˜÷˜¦êQ»Înâ/l®Sž’+L\…¿½‘Ï€Z“x( Ügŧãöz)þ䣅..FIõŸowú(½Êç`kœÅ0Âè|”=šºö>ŸU bÍqÌÜi @]Wà™âÞÔ§å¥s¢µ8ÚXM©í‰R‹¿Ú-Wøˆñ¶÷Òz©¬/[§©‘Þ")€§ºg¥¶£·úµ»PÍÖYÂ_#ºüìYóæêlö÷ÉèkX5¹»…t”º—6”¶³¦-(鹿˜P×8l-ß㈠ôav¢fQ.¶Ä‰1bµû¨R6£ÈPŽêΧì+±¤!eYhÞŠõ†ËÙÑø˜ Ñv2ÌŠª?Ñv„ýCŸòØÃŽ~›û60˜þÝFÐBë½bDÿYCu‹b̺”Güºè !‹ñk¤ÚqçkÐ;òÁf‘D[±é/$]TH>!IBžõ{hŒ²&}wEÊ‚ÒÅNŸÜm^€Ûóˆec¼ è÷ö›ù …`ËPÓ{mÓµLíV9W0€9;Æ%³/‹”YÈ¾Ž iZiñÔ~þìÞž0:•2î¢Ë©ºD·_˜SÅ!ZÅ—xl­òªÇ³Õ"šÜ(NÙŽrq>FaŽÂãÁ…P.ðøÅN÷¾Á¯i•ÞcöVÅM{þ_ß±ËÏNkèL²Âí°‰†`¬[쟩Œ?úæú6†@Þb]IA’c  ¦¸ …> l¯ï³Ë¢€_áQ–PGQÇ;Â3y™®7 yy_™Æýô™ì:¢W,6w½Ú TGt“"Ð"¢ÑGËuÒáv´CHŽfkIïl|ã%2KÑŽfÎŒ‹6DqÐ} ¦¼™§@z ù£‹œ)FÑCcÿ6”ŽîR¸óßý;äkájéÊíú—ùŸ€öˆ¿ín¿gé Í_¤m°ŸáÛ&*$iÀw­á0RÝ@<þ¸ üìYóåŒ>Ôhoø§ÁΔæqX±S`àXKʳ jçí-%Ç&{65ƛҨ¶Ò f\md Í",]ÆÍ é/|WQýjt°æÈz8½ç$ôüá º½'íQ~c^ˆ'žvÊÆ ýða¬°ëJºÍT­Ñ.™ ú×¹œ6àuTl— z6J¯ƒE›ùµ?Ùê~ Òdà-ˆÔôª&•Œa‡8ÑQëè´®<³½s0=\­P5ý8!òϕڀÁK¾er¦ íÍ¢ ^l mmð¦ÎÉê !3¡ø/À|å3†0ˆIêŽ×ö*ܯ¨Ü­©“Œê•×i¾Ö(d*˪bËŸQ¡õÝÜæ·-˜=žx¬¹ˆ¶8 üìX¤@^W”úŒëOìÐZi8W³ÑY¯0 Û”v²ÃüÿTˆe ŒÌæ¶°‰Ô™3Zï¿•Ôkb‚¸N¬bã°¤•;¸gËts™`fKèJ>‘Ï5W#Þw]sèdyϺ(- Tª‰ÊL]—éðQŽ&W;û÷,§¯Cœã º ¶—úÆ j~ €üïg»ý¥·øšq;mqiRd…ߥX‰Q»h˜¶øÄZùËö~Hª„I~IÂìã§= ©t,¼:zòPË^åßÀ)"QâнB—ãÉ‘9[$ç[iïM[ÜóaÇ ?ÞêÇ͵“R=pS6$pÌhµLc-{{$¤ü9e«[6Rÿ‡açŠðJÐ2ó@‘ IÔžéã°ý5G‘ üñ“ù¸ÜxÆ©†=\üÖñPûà”WºÑ'óŠUËy‘†ˆÎs~±Ï ¿ÜÜñÁÑÌI;i•yKSŸôlë¥ás±â‰mý3&ñèö´¬¤¢‚YyGÐàÙh˜V[hU%ñ^|9+í«ôCà²ÊjÏ앺Ba$>@4Ko•¸çcC¸’‡sâ$tày€ò>³§3Ú}¹ŠÃvwxKžÁ„ùþÅ7X£Lí½ï‘³õïR67¡K+»lƒó¡ÜÖABýâ‹ %ç» ­õ…XÅ¿jÕÍ;«p´€ª‹ØDoZï65,x•!#D9ÕfäHF®ÔÄEnôýSX(‘êJ^hº>¼b"6 Žþk±³Þÿ{¨˜oÄ© Ó®åØ?wò´=\o5¿ˆú üìXºðÜì^dIQaŒ»ÒÞ^$C9…@báãì)íž$¿9E, Q½ìXIn?qm²ÅÚ/÷„([_öôMªÕ§×Á›ôµƒ…Î{DS¿Jöýº;v·­&S Œ×I³ÝCG§ÀëôÐU­8oHO°Ä9¦›>²ùݽP qnÍsÛ^=m„’ñØÏÄߨ³&ã@Rˆw0üTú·o+¼9+‡Ý,~F¢·˜Bõ> pÈ =×7?-wZ4„–ßôßLZ•ë`v XÓ÷øîŸ]Ê - àkkö-9Qâo‚\ªÝQæ¹åP‹•€1^ø¿3žCiPm|Àk´bħbì ß—I±Þhüø)|ü“ÂIdÁ„è iª üìbÒÉö¤6ßZ»¾[¸Mvà“¢š¤ºQÿß{›âå12b¦c÷úÖ޾™â3™¤íŒä9PêYÄqKs§¿®v£f—ÅÊqÙ’Sw™A÷ç‰k}Þÿ:q¬’MÌ¥×8“ŠIØ×ÉŒ>ryg(-/KŠ¿ÿNl*ª“/ó5ÌfÁG›3ƒ¸:DXIt½R²Æ+:ºòvÙý°M5Ž‘Òi0XQŽª%;µfˆy·b" P8šÒ`°C‘ù„–L$ïK£¡ºâÒª'¤ØqhŸ|¾pSë  *bhÌk32?®öìI…“B¼Cd ™íŽØû5‹¶â]O:€¬¢ˆ ­HË¢¿m´ÀÚÿÖ†hŸi5fÐ%éÛ ëê¥(ËàŽå üìWïP<º´={ÜŒ1â]™yv½#‚KK© š¤þƒã«ÔÇÀ“o^r”ñFðÐ÷ÌŒ1¡÷ÑÝ]ưÎìòª¡!V÷ 0€ dg‘ )®­8Ø~]ùí{ç5…eÝò‡ü=›+,°0\sErZÈLRÈì=x‡œ¢ÐJƒb$l6Áÿ1`#Iid‰¤w} ‡ß<Üü¬µ1@GƒšP¹ÆîÑ(s¤ô‘Ù¨$À¡`ˆÈÐ!éÙÜÕM¿±Q(¹€œdGõ?×ÿà äŽyZ•‡Šn{´t6œÀô©ˆ).`¶ç§a³(9¶Õä Üj)#¬ú¡"nh3$ CH^ ^%!@¬ó+Ds£ûÝÖ [cèW!Șa…‹ÇF¹ÿ_‘Q }H'ª÷ËÖJ üìPw(uêô»BÃúñ¢Y÷ïó:ÉZ'š,U×¢Ó‰²úÆNΩÛo¼é…%U GMçV-Ä‚û¨©'øÍÖ†… þýò„ã"«pM2”ˆÐùsÃøIx‘<ÎJ' >Ò̓Pac!adó-^O>øå¦Þín¬n[—;®c3Æ/¸4Í™ÄdÓݽÉÁœÍÿ:•^$.ù„óV\‘}Ü ëLkŸ¼o/«ü¦5˜l-E ¶m÷Èã7¼üôá?¬ÎüfB™+)Ó¹¡“üeÝÞÝïJá!fX9UëÁÒÉÃx8¬ž9LR=€]ƒ¨WY¶ Ë(xá ó>ôº´„އ9˜„³XYâ%mà1©H\5‚D7Ím¨ü4H«.®µØMÍpÕq/~¶›óÝr³®)ƒxŒ¯Èæ‰êAÄÃ?Fç|dجw`Ý™&ŠªqPÞV‰o ’„On©¯’,£òl/ÞãÄ L¶^TË8Ô蘆B ˆNÓa¸høoxíÁˆ81NPF²d‡k[·h“þ“5z&Dæ?zû,|ÒÝg…5Q5¶mXø×™² dJÑdNUtáEƒ2@±x‰|i d븷±aÃÄ9-ú³ZwÍ3‘*„Ùî`•ŠGyH)Å/¶É9³`£¨nþ÷£lôÉ!ÕMÂwüb“á+Ù§¹é½Ç&¯ò˜7Ƨ!CǼ8ž}g\oÍs-»ÎCþ»`™"ø¼²þ¯‘6§Œ( üð.çÔÎA'&Q›Då+“ çÌÈzù{Ò–¦ÀÜ›Õû’B8crü:1ÜPšÏ.ê}¹Zá¾åµ© Yz4¸nKŒœëF¯MwKAG>Zë¿áF'^3«Ã;ŽïNüFP܉-A "] Î(;ÎMx›ä®P|¦€èOŸªþ+TRKG @3@Ô 3 wRb¬V¤º’ˆ -÷è’¬OW!¤—DzíàЃ¶ò€ýý4ô9´:ëÁ鹟¤,>Ëÿ̺ð4rf7W¸°š¾|66lãóø²fû”ÃØèOþ : ÝØ¯sÉ é¾X!óÒãMU›‹ÎkYWåÊ“=›¥n£4ÃÞG4te´·Õms»Þ]µØ„iGAÌ4òª üìX\Fø`ƒ%t¶rçêH Ñ› ªI;ou:^k”îÛoìùªð[OLML•÷!„ì…Ù|y\ýĺ¬oŸ¼PfàoßÓò')ÎÜæ²ü>>²´È|®Ö¬$kÑZxnÜèÞl,ÖÔ+…ã"ø d'Ú}´qÿ¼Œïì×t£%²1\~à®ÚÓæ¸y–ð¦b×@QÓt"ãÐxŸþ{¢®áTÞ…G õÁÛCöGo8>žžxÇ~¹3)I´ ³¾ÔØèìw÷§¸*{…ùà žFÎÖG¾k©ç¬å !J%TíîþX8E‡´ý-aéùÐÆK4²_éOäá/!îLÛ¹>€Õ¢ éi4ðJ™""ÂÝ!(NןÖ½ïª üí%áY¬‡ÞŒÒÉW(nê×"fÂçÔÌø1*hF÷ÆÙîÏPÅEc„Ü K‚@í{¨ˆ‹|ô.V5R¶ ºíw,XÆR¹6ôP²¿‹BšÉ0g¯·g† ¹sÊ^EA‘'¢ÏÇÞi-C©qÏ;6 qú²‡Z£½˜hf¦ÊŸA©[1¢Pç¶0þÍ›Üa°âiÂ8p °hS¹«û×QNR‘¹4#Ç0T¤Òz¶¢yæ5+ôЕ~å9§í-W{*©Òžßëúw¢”õ.׈BêP¼>Åþáh’5UXô?UO[ ªxÍ ú1‚wÕcU¡¨H¬àœ½ÿÈ·és}uœûC>áѬ½<ªWž¾øMBls]ù ÄßpQè+êFåFõ̦ünßðw½ÖßÁ|‹Š üìX]úÿýf›2ANmAðµ<í——ô`ìtý´d–0wÿ7ü—£¥Ï—!UÿšËQ‰=—”ûöG!0]õuF/5X¯G6-Ð1•~+^M1ë•WMÅ7®ëýNQ±yFjðî«ryG™𭍑½÷"Åø+*.£„èMÐÿ¢ÝÁ¾‘¼ëÂïc¹UõÚð ,eå×H)–§:S¾…Mï’ÔWŽm®ž~íß:—¶YVßn2Ùv2À“š=‰H‡=ì@xD„C>оT‘)ÀhÊ^ÈHFò2Ó¶4ÂQ0Oi6ÂÀ¼óB“m÷Þbá’‰ià‰Ñß0®²Z üð. xü.é»î5 5szðÑ„_-êÅ1Ë[q²¤Dysõ†4ˆš=Åz*¾ŠÅíµš8lüü|¨~c>Ò@n¥Œ wû@(&ÐP| Ê‚–‡™6VŠâ‰€Òr÷dc ±ÍàÑgÕìy"•þRÝHÛ‡„\ûªà2ušÌF ú%vżÁ¯¸:qŒ›Ñ@N‰o nÁÞŠ2IMY`qEÚäéš1{öò¨žã⤅{׸Jý9~îOãL+g‰ÓÔ"ëþŠUmiá§ –¿@æá£ùéá7’˜úùœzYÕ®u¿#²ý¦EšE‚ŽºI(l%¦8:ÙÍ8éïèÝ%Â͇^6¶âÂ÷Àz‘ë(|[dù»ú““0$Wv]rj üìX\AÑÏ4ýþGzܶvœšQˆnP¸i•œ7§ƒîaÅÐ$¸Åè¦ åÙ\2“šQ“»Çœ+è¯_àÊTû3‹mÆ“:' â[&ca<4¤‰ŒñHöö3Ë̤£íîžïç®ôiêI¹X«´fF«ñ)w_¥<êƒÆNÐâ&ìœ ?Ø‚$QÑ‚èÐ=Ö##î ó(^xóÅïJ–!9–…0 èÐT2Küé‚d¶<Àš4IÏq”eÙu>¯ùÓPñM²–sjq®§ù3ÅÕ±.‘wR!å“E¤‡/oÌï àx©ÑVØOÖS Œ;ˆô ‘ˆhîºÚuEk¦S ¯,v~ºr‘?ë‚`åäA"Á& üìX]ùCôÖVŽ*Æei‹ä«¼{éÔ"€áçˆ\h§]Š«¨†•$L–úà@8ŸÐˆ'ýkK.ýô!_»t(õ£œÙêùsÓœ2»}ìŒQ†#+gUOý{–ó,¦¶¿WD{νŸ1w`<׿-°‚Ã$>ùXˆ§-ºðû£…é‰Z“/û3Ë)¶þåYòk£ÖeÊé2­@pPtï˜Ñï€?TÞÃBøœt™õ@Hçç0Ãk¸+$ÎS|¤?öÓ&ó"í9Mµ‹Óî—7fH ¹½?¡\ÞåE3j·v­pk%–£{ÈÌå÷‚^2ñ°?÷âíkÝ“'ŽÆC±,ÖµTlãÚ¼&ÌDq` Xca5Eeü¨ÔÀÌÀ»dȺ OggSÀ”›O!ewÒÔÿ(ÿ(ÿ}ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ-ÿ.ÿ/ÿ+üñ“ðø?rößÊý;Ÿõv¼ Ú¦IÑ .H%0Ö­p…áþ9N¦î_¼Ñ™âU^£?Œih׺Ò%&E9Uõàmk2Ð7óØR,H¾[¶ÛýÚ2Ãé‚ÙÃá#MHË çãP•‰k˜† ¿‹ì»'/=Ђ¬^8-TÜ›æ‰Þ©îUo ÙÑm|æžÀ„%ÔÅ»óÄè-}M¥üx_/ùÙDÁnhÁ†æüd…/ï¿×2)ײĥôŽñÌÛ=öPI+©Ïî¯*ÙÀ‡sápñèmÇÞ*•V€­K´Owáÿƒx•r7Ñzú§óQ½£[ò" VÕ°¯0´Fñ…ÛI)Órëˆ!ð)Бó‘dwI%ã|hiw~jú üìaãv[û.v†¼¦ ­>8D4§ƒ'o—‚†‚wê6ù'Gk¬Ôå·i²­“’‹ˆeC>CÆnªmXìºS\´'w:úæã›–)‹Á”õÁ§7: S¯Ï€R$ïµ{.ñaGŒ«lq)êlq[´žíXÖÞçñ)÷oM-‰NÀwéÏ#›«à=¤Ó2‚ÿgþý–¼—Æbû#=Vjé‚*‚MZ‹-óÒLÄó¹Éüô;Õ©[;¸ƒ{ÏÍTˆxG ªDÃ<Ê€eº]–pM*dû¢(€ˆÜ¼h«hµ|=¾À|·¨·G%•(±Pë@J§Í6 “Cí`{UœXó©O]AÅKi5=kéTgã?Q¶§úݲöA6CÅŠ.*ì8 üqG¶ÐRìˆm­q$Áý3G°¤’+P–+dD¾S®*C(FZV ›oc°‰útaÂÆFÅD‘Ÿ?öyîg856¤ -Wt‡Ôgü\9¾–  yðMh†8’Žf ß“ºeñˆÞê!ÑJ)• ®Âx¼ßaظ:A'é_^ô@óÁÌTk³çƒ¢fS\98»J'„Z.¿_Õo|ãdCqÁd‡èésø––ÛHô¶ETðªÏB°ìëYBˆ àÂb¿jã-^ú¼ªøµe)­”'‚wgS÷I»€Ø9`|C³íÉÂÒå<D®\~ùp§0>jj€òîÑ~ll'°‹‚Íši?CÜ›¢ ”T¸Æ¹ ]ç•xKf"‘"Ö]•&xp ¾úñ‚]Ç㉶޻F|deG<èãYèû½ÛÑðá×a4›ÒT»í°ÄÍü‹–S]у4”FôÒ‰¨ÍRy¸P 5C㜫ÊrË`€ðÑw“ý­¸¡<”ûù­ŸÃ’üð-ð&àv¿ª½¾oêxšÍfF†¦F毌ü„Òÿ˜>¢Ýé¨ý1ÞN²B;Åû²V…}’+Ø]°”p€ËÊ#ÖÎÃWåñq3ÁÑ2×$ˆ;c ² Ô5ª[‡36¦á“«=žáôøšÀ›h­·,×µ%À]mÞáå©|µ‰ÒÞ—E}]*‰Vx5I17Cï»I÷iç H’dÌh6ûRùTŠ;æß’Õ*' g£qûÙ«™ u«~˜&ìØ:xú&É™¸gCZì‘|8H&¤®ZôhNˆ@A‡ Šý|Ü⟵@ü“mð-’?¼=gLm{ôW&™ê¢‚*ö‡í…¾(‡6· =šæÚ½AËÎséK÷\_Tc‹éÈÇ5Xü×ÐJp-¡ªÁ¥öóiÿIŸÜ?ì@¤ÇÙ€ký\Ùq¸ øDA ÃÊ/ÂF8§¤k_$­nGÿýcˆ¼Ü”(kÏ’”Ú:iü[¡¿r¾A‘ã\í¶×]ñÏEžâRÅüwÆH|”" ­i¿Éêùèþ«¤±`SLdËQÍÐ"P+ßÛ`dâÈêõ‚Iý²>;>$æqÇg0Ž:w¤;PÌÓm߉"Ì%÷éŽÿ°\Ãg¨¯YlÁõ0}Ô‘«ò5ÚØEsÄXdW½qH¢’P¨>`hòÙÀܺüYðy­¾KíõÉLÚ98¿þÉ¢¤5o?ך;›ÿp.1^ÈÝ’¿ø­¢–Á*F‡;õ9¼ÖΕ 7ù#äÑ¢NmÞÃÕ~üüÚ”n¿bð˜Wèz±*G^íš‘¨ÕW1E6:· Ùê¦_¿ÚRÃÝp(ÙQ8óÀYiÔötçjÎÇ ›åÝkq›Q&¯áþtƒ·»2RÒÐ@H³1æ¶Þötœeîi®ÚÂkÖñò+|¿³$þÈ@YÉÜþ±ä-h˜pˆ"ç2ïÒeå®wT#¹ÎO^èÒ™WáRлÙdGYßëõæQ-í5Ž»×9çêT¥ºž”üá¹»½eë/Ë 4Rß±]‹&¶/jÅìÑÑxÒzTµê …Î_ù²úû&gjŠF¥ˆö0©çÌ<>­ª ÓÓ_Ò3Àð —ïöÃÍp p–b–3ϱo· ÿbíÁ]šF[Ö†UÅHCdÆL}³Ô”{ü×FòóÿpUŠÕOü*™»:ËcŽ÷ÝÔ NœtFCÇÐ?7|ó¼¾9R!}ƉèÀ¨ÀÚ p"WÁ’ýßâÄ>רà¬êcß—ÿm„ßÎt™º}¿„Ò™ã·yIl]§lÀ»!åÁÅÞ±Øò[›©Ô À@EréZÌ-oÔk¾‰È¿Hj0r×ê׾߿4Y!¶ôþ|â+fsC^µåôÐ¥álpC‹òs‰è ‰dðSTѦJ’Wàµþïigw1˜°fký£Ï„Ï!LÀ4¯y} ¼ïú„í)?äl>¶SLø°†åÚªï™Ï­vާ3Ô³Û­ñš{q,Þ+ÖØÐT ø†»þ竉Àõ육£àù‰6Ù‚÷CA"Ö'ôãü×GPâæ|V±¶þÀΪ’³`…#›3GdޏP`©Éj“2k¥aôÇ‘‡ÖºfÓ>Ž)K»›<®Ï›*ø²ˆ…Œ÷%kAÈé¦Ýø‘(Õ–Ãa5ó§“ÅvV¿ƒœ­ôIévNQ•óˆ5…‹M÷› t­iíBc>’D¾0uFB—‚ |[ÕE7†šÔ¼œ0‹õBÕ©vàÍ¿_ªŸÙ€A!ÕØÍ,d~øw7ÉV ÜW=ø†NV1ÚGçZÍÚïäƒÌùŸÜ•>yêÎ$Ÿ=ýc¿Ôì*l2Ëq²%lµUt€¶p¯·¹ÕÓ(W B'š`µ ``]?kÖtäHv鮘8©/”½w¢ï° ϴʸ‡>»y\a'M¾'Ü Ù³zdãóª …«JüÚÜjqŒEÇúƒ¤ú°šxÏ3ogüHóƒú ùn„G¾ E›%­8÷ƒVóE/Üiñq‹|i IÈ–ÙDò4æ„KØ^ˆ 'n¼›:+:gC@æ4Ù»äùQcf·,ÁÍÃ5@´¢òëßÌØþ€krÆ4ýL? ï-,ó¬|ŵՑÎôÏà› u—ʪ(® vîЮ'SíWøï(û¥²SÂq⌟Ԫ%™õÙéFchB׻ܾ^à¶'èÊGQ"ᄎÙíÀè§ëqÐTÁ!Ò‘–å`¡ Ùåþ15[s  #Z°ªëŸàl;HW ªßöOË;¶Ê¼o\l ̙ؤ«6¶Ùàý çÐjk˜ò›üÚܘ¢^ïê>¤ {.ä¬ÛUDÏè?â$˜ü’ †s¦±øØ §•²¹H±¾f|Ñíì4 ²‰,-²z[K¼Å9üÅvë*ÎÉ ßCù8Á{ïQÙç¶mì\‚꺩{4ê¸äVÂèžVzç|AtJºv¡–™Úß%[,÷ÿØü×-P÷ÝÈ!œoñ‰`ú>C:χµ“–Ž÷RÚa£è×ÇÂ<ÇŒLOàÅ:eíðwª. °-Ú“Y:X¦=K¤>ÖP7ŠáŽ)—°ò5nEÝÃlTûôI›èÜMÅÞ+ú×p_±.Ðøj#çû)ƒü¸ÐüÌ3‹3~MfØ)̪í:ù©µ`¢¾Cá…DhmӞƤQ'狜k{´¼›ÿ7»Õ Œj¨Q:Sü×GG.÷‹fvéž RP±þ¼. à _üŒ/š¡8DK¸©ÑÌ+†œñ¸Ð°‹»VÉÎÓ ÌbŸÓ.Á¡JãuÓUÁ½ÛT·íĺ»è ì>ª´ãÕû{¸l 0-Žsša¶ë&6%%]&zè‡æ§fþ+Ñ&-ņ’&vpãÈÐ-1:[8ж (Š”2ÊÐcþ"t°Ï;Ú:˜â<¿Xî†ÎTŒ«rωù{"{å.Öõ¹eú°ªkÒîIR—ÈCµ´zŸGWHŽÅRpé„`=o‚d¦É-þ;ØV{ûtï_§©B»(PEÜk÷-ÌiKíÈêe”äm.I ¹Ÿ6µ”—Ç‘Õç…â*wÑ)³â·åu)ƒïOÜÂ"[ü×Ë:@z@•}ë¿ìžµbíóDÆ$³ÚÆû¡‹Cð'ÀÙ¶ÁQ*Œ¡Ý?’¼Jô˜Z‘a¯£¼*=:¾!í夼kX׿k}žD¢wÔ¶_T'¬ ­bAÓ9Y"0ÛÀD±ì¯§!UÖVq\­ÁÄzÔ)l¸ÏI÷ߤ棩’ ŠOZR”NÀ©~¹©_˜°ÊúËfÖÚ|ÉUÇ¢eŽï 75(LZ†•ÂÒ3#ª¨=aÌ›xÄ*ò ²mRç{zêsâÇoæ'[ X3½1CÜ>Æ.ç^ZÇ‹ÞDþ_Ö󡬵ø#œoŠE`ÓàÃÔ©à­àí§þ~Àŧ,eœ–^8×û:ç;MVíb™ðµ:h˜CD[H÷ÈúôôÊ×ÐÒSà}cüÜNèFÓ-¢yƈ[ãBÊ›™ ^XØ`¼Ì©¸’1—2þ«èœ¦O‰¢/M(5C˜ÏïmWfp5º\÷qp„¾·ºˆ¤û* ŒE[ýõZ<Ìß¶6d¬wÁ,¿õz«þ¿nžÅ," _8Œƒ&Ûè宑̖2Í×o.h³êÉâe¨}à„Ž-žÊaˆ{Riqs°¸ô{…£ã¥Ûª¦œšàÁ€*?ŸÉ--§|¹˜ÜŒÚã §¥dN Ú—!üÝáÆÆš”>l»fI¾(ßÀÄPtd{jl³NG¯cc›ôÒ”ïK)“]i·Î(WÓ®. §Oà,+Kà£(ìSÀ¥·»Wòhc;k ó#Ž>þYù’£Û®«¬ÿþ àgÁ|<¨º29#üÚØýS |gnàpj­;²Î÷ùü #'+htË_r„ ‚k«þÒÛõŸsliAP0ßl‘*É5•À§£ž••MóAŸ«!º•ã­l©õ+m±ý¢Â‚PÛ}ÑcîÞ—ïã Žö®¡E.Œq$\ÈÚÔ[§¤š”0‹&uq¼…0·e¬È„l0m½û ô÷›²ΚTàô7ë>_M@‚¿W`^Öóíñ. Cl`ÓÃN"ßÎ|d3Íž-8 B£(»àÛjÑECú“e”lËeSãÁ¾Cà ŸÐÿº¢¡*2ŠZŠ£ß:;ÈÇMÉÅZ©R­·Ùš'€Hˆ=Çd2Ó$Ì¢Ÿ2múëc⢃•VÔu·…sWý±%ŠPwÛOggS@É›O!fyhcZÿ$ÿÿ$ÿ'ÿeÿ.ÿ.ÿ.ÿ-ÿ+ÿ*ÿ*ÿ#ÿüÖ÷³›ñu ’ Û?äm^—uoŒâ¹)~b¼|G“žŸHøa J> Žã1=,Y˰޴NáÔü"éÏ€IöͱòĨ½a c¹e~E`éezìÒË›ñû;õú”5à À+ñ€x“– |{S:EæË¯8àöcõ±sFˆD-ifö Ú ²9ý¤_Ä94Bü¥!­ôós`gPg¨N»"ðψTÝeÜÈe²—™É8Ôþ ìzÅöÛ)Xd›±˜»¢8>tÌ–ÈK$]“Ëìj¦`þHãpJnÆ9‚±ɬ;± õ Á¢ÔÅUùÒ‹MžãgÂíáV†&^lF‰3žH¾“´¢5ÝÄý«²íÿLåýnüþçÛN%$í;X³ˆHi¥ÿ XFžÂÿ .CÄ{\)ÿäâä8ínÞUWgŸ§ÕcI©ƒ–4õHx^½’(@NÇkáË¿á&˜ÌS©ƒlà8'Ø'&¥´mË%œ «žIg$AÕ×ûWmÏpñhîJè™ÊùÏö’¾r)hžßFÁdA¸¹žTës³Uvï8U˜s®E÷ë½W²ÕDGgó””R…æ¿@üÇ|­`¡›xºðý2LZwÖ/¬;‘2ã[3†ÂÁb9¤PŽjéH¡»ûEäÞ÷‹~•lƒ,ÜNþçáÃ6ù‘V™ž„”`jSbÞHy ·‹^µ]'þPeJ\w’ßJ¨‰Ûkž‡æ§„ B"ãtÜüðQïCÓ7 €(ðiv^T¨ëøézmò¿$’Ax$ÚõÔ"¹F-ƒ•˜u9_·S[ Ýõ4ñh…*Zþ™°ŒãÑõü÷“ cTB˜Lª(ˆ#/sœ/G’‘Ú·«ØmuMhÝj#@ÿbÀ0Šâ‹$æ±½éNÙEÔU’_™9¢Œ£f 9{™÷#ÕxˆtãF·¦Ÿã ³\”¢7§l˜1Û>î×Ï$á(ô]›™œü.ƒMô³ œT[Òs=_C}€{’ÁÚñjs[`w÷D‚{±§´¡AÊûϾöŒq;ŽÁœšÏóʾÚí2$”׃­âÃ*Ѫ= ÝQÀ@‹S3WŸ•‰‘ÖÀÚ´í¸å“u†ãüìX_*V7­P!“q1çC¤±›Fµîmj±¾ð­ZŠšžæw#O=L¡§“s E/¤;^#ˆ0uE¿ú¦d‹WDÁ¾¶½ªtŸ¹lsž™#++º/½ÀU+‹Ýe|÷Þ)y7ﳪî§Í޾ÀrgA™˜ ’ðÛ…áÓ"Qkai<éb"´{õ1»”ŸÿŒg¹4å[ù {– ›Äç ÖjXêjx¿.Ûž¤íl©ïMÃ.ÁA\ o6”ÐG³î¢1Þ÷[Ø&j×ïÒ{*‹©HûÜÜê°B†xc"J»¡r‹âc˶bØæíTÐÏn Œ‹üí©cÿ ”K‚¢= D—%µT¸¾3Fð}ð¿³pƒánägýZ³K ²†¾ž(üÚܘÓ?>kzÝìhÕ¤fB i¸5ýº=WzNPHt)[ö‰Ñ„ù?%z ¡ .Á–»âtI½\a‰V߇‰?º‹rÃÅa±%¶ý«í—ÞÊl~„{Yùõ”ß[;rň,’0o$ü¤´Hßd›XV…¯í `ôÛóvgC~zyª/á:&™OÃ]bµ4÷ª EUˆ7ãrÊãÑÑ“”e`ÀƇÆCqÏ섯ÌBeWñ*y‹Ëè2¦4°6ûo° i;Æ&lT1~×OAy{}$ÌCÖÊ÷”]õ—˜÷€r‡@ØñÁpìeg§ l¨ûø­½ýé°À÷E—g‚Å w˜ß¡6Oåçàïž?2;n3ØY> *ç-qñ—väfœù ¦|k¶2)/êÞÔùé?[ñÇ,-v/ÛwP‹Œ©ôØ„ÐgwiÄ>í¯Zb'»š)ãͯ§Äº¦§¼ü×; `{9æXôAË}C>q\“/±Ë—­íþ ‘ÞéÄãÛBãBF;¸@ÝÆö™e•ÃEW -Y¤ä· É€JMX5N,SÑ!*Ó–¿C‡S=ß›¸Éù<^˜!ýOÃÁö‚¤·Í…S„á½înë-X¬{Ýz`a5‚´”áåHEµÀeõ Ñb%¯9EÅ¢«ãŒ?«iê΂>îø€|Ö”e4\…þÁÁ4V åؤðêÕ4ŒäàîJè:ÁѸËÞw*{µkcse—Rszm~^YÄqFœc`Ùer¿Kš¡¡å%JE%}æ×û­%…÷¿7: 8ÚËÿ/‡mÖ­C¦g2‘Þ]èϳБ—$ ’íªª$e¿pn¢|GëÅ™ÿ6AÖaÀTü×G7IêÖ,ë FU•Ó³9j@rŽhgºy4o>ÇëÆá:Éi56Dè´Æ’óKË‹-á/ÞüüL—j¨(À†pÁæ±ð™cÂì3¯jqn…F–ø„ž¼Éñ֫šP úϱœÒï» nʵd}ˆHrvþA‹½“acü×CK}õ\© ™­[ÛÉõk€IÉ€ÖwÙ ]9LA4°¤Š¹Å1zT  í«UtL¨š~ÎMúéER$ô-hÍAbéu”ÈN…²à«Áw!úÒvlŽb‡K‡„Î P“QM»š¸ûBªÍÃåêz„$€-G¦ ºP, ÑG‚†Æ¨$ÀÉÛóKOá,ÁÈŽwÁæä“Ë$Îö§üqµ/¨ÑlÒ³eè'öñRsµe“<Ÿx±‰sæ*xã^`vªÅ¹IJ Ü"ο¸M¸P¼NÛÁ?++:RRHá±ï8^Ö‡«·<`¥a1°¶¨Ì`böN¡uvãü=Ûo„͇ ŸUµ6å¦ÈøÐ«½¤m·zŸµÅ®l-#ü×CKyBkl-6p–ÒÕšÞF?"àD ¦ONÕý{Kk”›š¾ËÁs÷~q ‡ä£O–-+ë“û.6úØ]Ÿ‚­¹\Ùé<[[õ‹´çÉf˜Âj&UJ­?¾çiz'áwÛñUç¶âÖx?à®Ç¼Ìf¹Œ4Ä^_qŽ­R"«Þâ™í !»!a Õ­úSÐÇч3?U÷ÚªÎÈV÷b ¡Ì"¾]îît°6Ec~4Hb›b'ÀÒ°xÙÐDÜ,,''Áæ<€\Ú//ìE»pcõwÜ^Iœó¬}ãD Ô(´Wî(þÁ20–•±PÔæ±'7Ü”ÚKbn QP/‰Q^ò'7/Í^tb=IKY„Gb…g¢È޶ÉÿÓ¼ó¹.ÿ|¦–§+üÚÜŠºù6^¤ÑÐyA48òúsêɱïO‹ÂåSŒ‰&Lßæ¯AÅ4ðƒ¦Yg¶a w•f‡¼¦¹RŠhòw&Ì„Íûn+d1 :YoÀ2†œû\"–ßýbœÇê³'xBÒ™m‡Ùôg9øGœ'¼#O#Êœ’Á ’ÏDÞokx®\òÏ33¸×Š;W?œ% 1ýïeÅõï¾—ëuŽG¡rûÌå“b¿£¼™‡ärˆrªêj(vR+œ}UÆyš¶l-2•—¢p&_‡(èG,Ç€ ˆ+šmÉÚ¸±Ç—2¼aH‰ÿÊÃ!Þ‚Íñ1Ù¸Ë+±ÙäS‚{r.ó±ùÝ(7%^ÐO š³1¼}–Mm½” hëaîW‚úis»üÚ”J*úɉ!{ûð­“Hªy{1Ø¿¤“”UÉÃŽêÑk‹‚¬Â±fÔ>ÒãÆ²wzÉÌú«7H3ÑàGÆá$‚0~)üYQíà9‰,¢îF™'÷Ùj}1Ž{°Ÿ˜." 8L*Íäï%_ÓÅå/qÂH?ö„d2×xˆ)fÊ6cWɰ™ç}^°X27!¡Êoý,&_ù‰!•?óþ oÿ®¤t6¾J¤Å*)“f&Jr¼ðå$œXÜ‹Ÿ.›Êœå醠ÄX¤ŒÎ¼l àp¤Î¢º+.pUsU ÷$ …"Q«÷¶è}é4uGú´ú©KVÃ8'¶À`Â(’–çØb€ n_ÂXè©:$pï(ª ¹XåŒ%~Z<‡Îd3üÝ–ø#ÛÒYUÃ=ÓÖ%MËBÂk¤Ûê0¶ (Ý0øe¡ÊÓI»õ'€w( •ùöD èr˜‹%ºNûï+IÑ{Þçùsh?Ìä>✯ËyĆϡ+¹zÓ# ƒd楥 Þˆ»¹ÆbBI›òpìRrܾ*ÊZPAë ®àˆ?(¡²€ « |ü#ü×Ù{©,f 4bp$ÓdòìçÍ;"?ê¯ÐçŒfSÉ(‡2ÕYõjf?ÇäºÌ©·‘Âï~5÷µÀÏuÙ‚©sw,æ¥~‡ÚÙ2“/阻SÑ"U¾ µ2˜ç4*g”5QìR6ƒËœ»¤r]®a¬“ç׿÷r¿LIf59QYÃï{ïJÆÍe›ü\5„½™¥k#£Q¼œù‘¿ o\ð…²ÅëÌüÕ&_ð©"¦b»ËÔŒe1M‹85ú¶†1­"{Ÿõ§XÝÖ£ž€® Ö‡”Ú;2z¡!*|oñÇókIþýƒ,rNŒš^Žˆ 6z**3+éDjÊÁ ˆV\…•‹Ý‹ Á>ƒ…g쌧mÜ×>*²`Q;¹e—™âÔøºWÄÕ5|ø+Áqö?ƒ"]‹¹*¾+‹‰"¶u ;~ÖÅ |Žô¹YÁ%¥K[Å¢Þ§t¦RƒŸíUàëÅ+ŸSÛ·¬ÉôÊ! …¬¹GHã³îp.I‚þs{òýÍ Íçø´Û·øbqªaŒ®A’Weáìa&/ OggSÀý›O!g»íEÿYÿ)ÿ-ÿ'ÿ)ÿ)ÿ,ÿ1ÿ+ÿ0ÿ+ÿHÿ&ÿ+üìX¬4óê̵SO<¹e8yÈ/éiŸ4j(nÇ u(µÞæ[l¶]{´P­T¢@×:5Ž{à’²rn:«³' ˆòúÏP²s³óÙl¦ º¸ÜE^ræîæhÚú«:z"ý†)ö0ñdò¿ì€ý–¶vÊ@NzˆMöÚÜœÝgV‰E¦À™€OëN£{ ë~ª;z~¸®_ÐÆhŒ—sJ±Âä‘MHíg¤¾¿ú‘¾Ð2üˆ¶¯ì¦Ü¥ºRZ¶LÐ[Žø(½Ç4-Èñ‡¢ Ø&ËNrÓ7}Ú~;¤ÛÀ[Û±Ó0ÑL¢ïõA3øüÐRC1 "8,Y"ašý£\<-”Mœ¨¼/†pøeMºtŸŠmºàʹEìe°˜Ç¦ÐzÀå@.¿; ‹áás.iÉ%á«Sš¼ZØÆ#•Î= Q°Þ , òœÔP¥¸üïâJ9x) æÔÕ b|—½i¶ ·s‡‘Ä3 WAü´û‚_‰9¡«¢–j ÙâÿWѰTðÕa|yyqVÄkm¨o¿"þ¨àÝûh‹U€zªÜnâƒDËbÑœ î;:æÉä,>o‚ó‘Å’Q£y¸ñ®‡Võ¦Ð¹¹Æ×¥'R~0P§Qj·ƒim°ì\Ç-ÝîêIi:«ögl•m3_6]ÔŽ”žÞ&’èëêå‰-òóò®#ÊÈP0Ë-þ`V ÇHýB  ¯™Cá Ù,ãQæ~õÖËFU{€B ³u°ÑÒ_“@ɤk€n—ç´Ñª¿/abiúBÖþçé0§‚’qæÐÛ ]—C¢bfø üìWúœìe§œÆž ‘aºAi 3i‘k³çûÀ«…TYOÿÑp‚©ÙÄ6`V÷|?aÛ§î`*ŠVÄäææ ´±$É– ¬t% žeî×ç–o^A.ªS47ÀË_BÜ]n ë1áãÊxɵßÝTyöeÅáEÀ–ÍZFúctUŠU°Í˜âtß @~ïÚl†ÿ–Ë.”Zâ €×ã̼<‰èn:…U2ÜÚÑ›EXhÕÌ;µÏ9/< õY²¼ðÔÐÈ¡hqªÊ¢ÃŸZÌ/Çt8 H1Ñ‹Î-æþuŨᵠúž0©µl»ÇÙ¾dÅ¡¢ª”¿vLWÏFšÂT ¶a•+–ÛŒ˜ yªYQíävìŽ-fjæ…R`w+óeù8 üë ‚AטQ§õkžµá¹Òšã|œ³Glà¬u÷_lrÚiV%†·ö‚žm÷HÁÂüŠGö¯¿]d:y ðÓå߉*ö‡{7¸œ´i >Ìßu\¶®%ìÂŒŒµËý,!¯ðÛd •«pÂdæR¾Zv08 Ïe]„-Úì;?ô± Ë}”‘ìh8ˆ2¾náÝÉ…¡ûר,ØŒò;xP)§îÝÔÈëJ7¹üdÐóôß}ƒÆ’fÛå¹ÕŽ—3†òÚ>ͽ£\ñ$Gæ®Ìµ]=2™—¶R L0á:ÌŽÒ£nKÞ°X Ýù²DûÅ*L(fî*Ó«CƒçÅöÛIÔœEè JiÃ@¶Ç°º8Ué$¼?ˆüì—Ïç_BÐ\LgPqŸ•ÿ,6ÿúr·L ¨sTÅ˳Ja,X“× ;2ô!$pªš>Kû`@áIí~ÂaÕk„9z_NÝJ–IžºÅäðåH霵²©Ö·¼j3Ôìªîì…aՙɒYâ]¹*_ªAÄs‹F[$-wýÚIžcÇ8¥wá¯ê«ý"ˆ¦¹ß¶?™$¾5žf¥„ID ´f4ƒLŸ¬õÍàbêzOÔ×ÿçI•êG¹ç®@ØD¹Ì²«÷Н e²Þ|Só]ŠL )^‚ØÝ¥ÎÏŠõ‡3c¿Î4Úb5J¤‘¯£àáS ˆþ¦ßx;XZéðqIôË$—à×ÝH QQÁÂæ*Aá,½RjÖ·Ì¿&(üð-~Q¨ÄåyZõÐj’äVjñzçUòÖl5ØPRé p%,Šñ/ÌNüFX«··Æ²uç#[äƒøWç¸t.>±øÍʯ\kΨqÎÇ&Â6ÎaßÀÆH§(Ul©¶)]wÌ®î!‹ .2黊$g"É—’žÿ@’ÊXê–þõ÷Z9 ´[‘¬ žž‚ Þè,$ôy«L.ϸ@Óó9]Û4ŸÒ!6< ðtáÿMë,çrwýäÃoÆqýä­ªÿÜ WO½¿™¿Úž?)PÍâVö <úr#Ÿ3à rR]q¶ŒÅ"+ÄßdÕŠÒF®Y8,êÒÀÆviwWv%Y3>ª?WR l–ºêl òÿrC ßÛ~cÊY¨š üìQ]ƒ‘ùÔË|«Z +šÈ4˜¿…û ¡å¿äº“B‹Ã~òVºÌ">`°›+¤$LXºË¡vÔYl°|‚ù¼cQVˆ)*V²\!h(sRƒ>šÕÖ -ñýó¼Í.Ï]¡¡‡^à»0Fƒz3·8J¯¿&b¹àÎÎcåßx‚5êdǘ€õ›Ûë÷>zø†Ó ë^¶L°lö‰9›×ã”w,Çé`s×+_Q:9¼Lðº¿Ýþ—š-)B|/߇SnÒé°kîÚÄÿÑ/²Ã(½ÃD>¶2˜M3ʇ§4?jªÚ$’ëì¬2È¡€ÍàˆRØy!¼FeË”âP\;ÉŒ€ …Srà‡¸À¿6§ßÓIFA0^ sV;Qq)ÆöÊ/Ó†;¶ºÞ®€£¦ÉÑüãhþâdÿvKS€›?Qºù}O”›sDòÛK¤tEa‡p S9ò¯h7Qð^•m¤q”Ö%í„Ï{eK‘8—‰97H<“87çÙœÙI´5©™FLë †‡mzß4iþBoõ ÁK–(ômÕWö‡Ø”™`_ù®/CÌ Nùºüð-mûÆ ¿%Ô(ºýÇr{W–³èÅH‚â†9£&ÑÂHô»YºLn;„V-ë;°¥ôÌö$íôÔ‘,¸ ø*Ù—³Ïr;D×U툹†G7¯Â xë²8”mÝ ~D”ü¼Ë—pþ gå6¿Ê§¶¤³Anð#Jµ¹×Õ¡F´Ø4ÙH~bídšÝ|¡ô Ut±ÿýã¹Þ1 ÂÛ¿/ücfЮi@Õå`%äãNŽ#L_ΞÝÛvÐj‚ˆèBwõ`UÔæË<ÓlÜèeœ%UfͦÀγËçX]}ú¹aQK•ùˆuÀ¤ ÆýAU‹Þ'ú 4=Ùr±+/ÓméISÊsvŠþélPˆ -¥ÙVójüð.ºš°¯åî´˜ÂߪòÙße™®¯èÑdýÖüöL±:œ õ}2Â,ç/½75ҕŠ¡ØëÆ~ ÔROL>ñT¹5_—"ý)qvÿš?ç,àßsÛ$UÅÛTsþ3î3þÝ]`qö¿+µ«S¿™Q#•9cð”Ä¿ˆƒ¿B‘BºÈxº¶vSGt$Âg; îûúüïÜàÛÞÕf"X …QŠÔt÷CX T“°®ïi•—7†ÉSCÚÕq¼ÇÝÀà *LŠA±å(Tï Âwb /Ø.érÊÌŒÏwêqñú ÜnÑ­O,MÖ^Õqƒ¬£°½Ó(x$L”™c”iU—¾¢B8¾ý´4ö]`2Þ_cÒ98ï —§‡«“H_jR*×]åöÂÇ::ðn!z{F7*áQ>zD¢®ÜƒƒSÝ|FúÙøþÚzÏ^×eÍÍíCs· ‹Ñþ2m]ïR¼¥ÂGÁ'hÙßâéX’†»àÜÊÚ®Ÿ˜dž›êžÁJÈ6ÂMÒCü2®NÐuSàÍ!ƒguüËÓƒ¡&­! .ãCK½FáÝÛ¤ö üôéÖâ¯÷¸jßÑ_j°v[Ž%qÖÁhÀWoîß-õ©=¨!uIGt+\0j}+™O›}wü>òa¶Ô.«ïŽdH×hê?]:ôl¤Ãƒ×{bJ'8Þ*`Yð‹Ÿ°v° ²P HÜÉ>pó³è² ë's¯Üµ+ ó¼‰O ’ÞÖu\ÙüñJƒöIhm´ä.Ø r)qªú9 OØý‡ÿ†MÁ¬"ÚÇò.ÂlSƒþ]Îä9¦q@©I¨w<Š˜ìÁ¥x¸.ÌMi S{˜£7ØbÎ׿šYé}Äaž|Ø‹Ÿ{[ŸHP”=8ò pG®´Ü¡Â>òç:[A\+ž.BÀ<4$Ýð‚„HN5ç烬ê­X;ÊU±½À@“׈}›òâΖûyÒë„¢üð.^É®œïÛ8Üp> ;™Íšl ‹W³ëo=´­ðòkP^=Ò‚I¥oœÕÁeö5ÐåöØLÕžáëí“•Ú41C4=½$Æïêf;™I‰dŸÙ¾…²„ï?¡ºØºèÙ#@Óžó§A½ZØZ‹9Ç«.,ÌæÓd!Uj¾>êrŠ,¦ý oXòW—µúR'k›*×ùäó_Ïv“Q²‹£â$©k‰R»ùŽÒ4‡‰†´4¬U»§†šuZõ6'OÄßLeÛÿªÜ߸xý/1=<ÃÍK?ª?V¨ly¾@QˆÑ‹øÌËeOÕQ|1ñå\êŒW@ëó°zóÛßݨ°nu @¥Hl .¢Z¡ Cÿ- mäˆýV BuŸ×ö’d¨üêä™P‘h %ß#yy¶ªôøN“Сl­€Jt­÷‹*àS:|59ê )Uo”ƒS^ò÷”š,¤‹G£ÆÎþüHNÍ—–Nu›ÀC7×Ôì‡ ¬ îQ˜Do¨b€×ˆ{2ŸÇ37P6qt†üb[ú¼T¡œü¤|Fã·êú¼±ã nªáUSXÅ÷¿ëâÙ>ƒ}Å@¶°ØGÁ-ã/ÿ¶yUðÅÝöÏÕ)–U!&qÆ ¢.hCD~xÂHx¼'ºü£ŒKw.èÚ;qÑGüØô åS…Goâ]}•_ †Û‚¸ïÊÚ|ì¬swø ¡£Q6’Q,ˆ üìœHgAwU{´×þ W»ÕÐ5{Ä):å¥u˜i³áë|J4…Z—©:ð¬Ý²Õû¥èwO%ì€ÄâylÓ‰ßi=‚ÆËB!áÏJL ýjlðÊ­=‚toÞKpòVhf&zùQœ”L¥dÙ˜*h5Qêôqš¾bòp…ç¸XÝjgpuà,Mâ<\Õ¯¶ÞկЇu½ü7h=²ßh"i‘-ti»V[æ H‘çøð©÷P÷TYoBjw Ø3<Å?ëÁ "Wð6'¨‰“åÛØõé/)ß*Ù⌉„ÿ‘#‘уÜÂ`“%®É×à»*Á²3VÁÃþÞºüÚ”~Òˆñ¶¼>u²>úW3ý]+>É欜_-â5FÓóéÄb“ðÊ\*kŸÞ; RUá ‰Y…éf˜®Àx'€ì«ž¼8ÉÐ⋸‹c´Åw¬Ä8•¢¨*¾vb‘¶hj”Ç ’Vͳ8ƒmÞ¥ýŠ çC¼ž¹YŠöÜ)_u)óþëÛ²;jÒH00(ç-?ƒf¨™,‚bCºLçjÂé.— 6"żÌÔOEù?G(Ïc sÅ<2~ÒnAš Vge¶èýÔ¤N=7ÞKmr¡b±I¾XkL€èÂWN¿ñXé˜gL½e€Ï×DίÏb2£i÷±• f½¿eõ4SÒø8Ù¶œ¤E] ȶj[µ-+`ã«—~ê]] à%læñè‘ÿó8pˆåaЧP|ü×G ÅDiý#“g¦/›lèŽcæ°‘5Ul½™1h ÚµèPPÐÐ@÷w4}ùeNª]|Ê)äôhκ}¢1Ó*X浫MË©Ë ›n0õð rLmÀK½?b-0ÊŽ™½"õ]QéÛn,Õ¨è̽™ C/,æ‚WdŸQhÞ‰8ÚŽúÏqé|••¦+"üG×Í ¾ñž p­Ö«C/…)Ñ4[JÊþèSî[ëÚ²9dú `ñï„"‹š96‘—ÙñÙ£7<çØãÉ'Ëo¸hõººˆJ3hV,Ÿ•÷ºðA¸C³0™2;ÿª'lÚKôm¥œSçã&¤'|ù$ßfvÜ‘%ÃÞ]›ÒœÕ·¿|H¬'ØÔßwj÷—{ó‚€+ËQ8¯Ä5,ü×Fñú?˜d¡àlqtÔ_#!Þ>VvvÒ …ðd A2p¢Lá%F0¢f‹Ó`œgs‹„Ñ^Æ¿ÔBr¿×½iyâZž-j®Û÷¯!É*\r1^—ðð´b:Ë”ékÙh÷ØGä-É;Î5°L}lÂYà.ÿýÛ:4ýR‚ѼÚi¡/^ôˆeàt³)²9¾È¢ñý§]ªÅв= \{|Žý™°Ú½Ææ¢ï„™Z¢›WýØ/å™,?Ž.oâÝ„ÂÝ•ª´ê8]ßeœdy‹EÆæQ¼õUÿ g•¸øï£™ZÉ‚à[Ûcmo)éŨ¸ÕÑ67QKÆÒï¨Ö  -c:•Öó8g{yR̯ٙçïãìb:.,mk9bªI\^ÚK¤–Ž#ôÃQF"Ò÷¾eíðèñÃË8`ús_à| Uû®x<}מZ&ãÂߢ¾ ŠÃØV…ú,ÖZiá_aE@­|ß0­Bºc |«w°‡Œ,Ê?Þ ;îmYdƒO#·ÔtvÇ"}b2•ûØ/pè2–ç’UŽÝ0(‡¡$bo?lÀÊ¥§/,Tb²¦€ àÎ\U½\À°PÏ D­cŸf°¤-Jƒ[-šŸ}]ÚÕ[˜gÒúD¥’²JEöÁ&ˆém™óÙöv±ÚÒ6Ñ¿2ªÖVÉSàÔü×7xhh$Ej‰Æµ,âr­ Ek,÷·‹í·€dæÍ]¹[î^¶[?ùäè<„lÅŒÔMóúÊÿ`bÍaäôâ7]™ïQûHå$ˆ%ßðwÐÛË2²m—ú%‚_…Œ‹š·©Ãw€¿å+HEÐ3¨åjðÏøf­2 aoGmØkXš„ÐIg–φS û*¾€²t—•,¨éñîÖì‘Å–ð1Øg>ç; ú:)§dBº›¬8âFn‹:î}[¯«²C«Rë°§%‹ÑýîJ•mu²œ¬º,ª[M¤]µO޵#Tp-Ę…S²?Zóå¨AÀmó®ŒÑFì×A ©fäuߟTÔlÓ‰Ú‡XúpŒ(iË6àËüBfá®1µq‰é6e°N&!™ z6ÓR]ΞRžé¢a±enxtãg>¾¶ÝîüéÏίË<< V„Ì̯†CË9¥Wÿ£ÿÚvm3,õÎìƒ(Ùç‹!9;fP`Ι­EýZK¹Sív[÷i.›òí©aË?YîωԇÕ?F‘\kä kîuš™0«ÄR¦º£~¼‚¯|Íëó‚½B¢b²QM…eÛ*EiLTükjÎòvIûl­©ËЄe¢8®[ÿµŒ˜ËyÆ“2}Š’¯'™ò§wçKò[„7´MQÀ¸Œœr¡iq°òZ½ÌD.t¹JU@{PkILáYu¥µs© «køÌjYæao—~BùÁ?ÑŒphøcdl7üNñ_è8ˆJ‚S(Þü !Œe†~ ñP8úÖøv¹®8ðËÖËWnµ|Ûó¸Æ|×ÐáŽÊn6¡,xKÔüx”u‹ÖÛXhu«ýN’‰6 ý}ÞȺ‰fÇ,brqì!“~aÌËZ¥ÛìžÒa²ù©£ql xŠ |ø6i½Y‹’w)Ç=¡QÝ-7â Û ùoP ap皀t¢‰4™l#üŠx秇‹“ú© /2”(‚ãÝà"äÅA3T÷xÖ?Ñ,¬©+¢ÛJëS"ÛsΙO'$àSt †Žv8‹£0„qjîée |$±gÔf5/ÀÕ)ObnÐ$*ô-nÚ¦!Ý-+üð!¦„“UëªÒ™jÝ ƒ–zÀ4ä*îÇ•CG% b|räÐÆØy=j+K¸‹s¿ŠrÔõÀ—µÛ@7ïçž,ÑC@‹¸~]Åô¯®®ON´oy¨["u›5kÇÔ'õ‰xX§<`ÍIÊ5¸ÆêbNØV+”䊎9ávÏÇ®_´$ë;l^ö²G«¥d²‹À,+ÝÕ?<Ÿ\vv=™=è< •×Ú,§ÈgÁž›?Ä:F®Ò¥iÌT(>Y‡çJnY5ªo“-‰m"€wí ‡÷ñÇÐsLt¢”S{ÚŸ0#L§åRM Ï‘~tìyœa‚B¯²^K_åת½É·1s:ÏÇnGÖ…h6„š¹Ò8ùƒ»Ç ‡ØfY¨J¨kHƒ¿4›Õ 5á•Q=q—‚£`zRh.ñ-¶°:¿BFŠä¦ø¦%¦ë·´PÒxÏ¿X¶ ”¶w ® ÛÖ¿jüìLçß©‡CqåLÏÿkз¤ù) Øí­}…Ô¯2ñ¦) ípE|(‡_—Ù–ð¾ºàÅ©U¾hq«µjfŽ>rtršZœAÁ”ý£s™´Â°ªh{ "=ÇfLÄ + ü” )¨Þ‰ï~€Þ숛؄Ò%Hg ý5Éݪ¿¡]8H ç³c›§>©/L<”n„­ j¼Û÷‚n’Ô™Üÿ¨ƒÃµÊÍ0£ÑÁEnÉ 1G‚.|¾ý¼(Ðâ±õ¿nMÏ—-çhJuE*„›P´Ó.jHŽÅ®ã˃æQĖéÞ¹ÈÞÎ,×=›°bÒµAå9{yÔãM]úw m™Ë¶sÇžò¦¾“ý$YÈnãöÆM¾sÒˆb» þ*üð-D%îouNö¯^‰Š…ûi Œ)¯ž¹âͧ£ÿË\zd¹cGΗiri¤M?q×x©4L’œ-¦@[ʱ‰9Å­ƒë‰&¹)´s2©¦³zOggS€j›O!iš{äÿ-ÿ+ÿ*ÿ(ÿ%ÿEÿÿÿÿÿÿ#ÿ#ÿ$ÿüìLñ’¸Ô'¤c½É2±"nR¼ÐXX×j€¬]ŠíßhøÏO‡òôµQF §¢n¹¿i*­™t-P'Ü8yƒ˜iÑ…ZŽt¨Œqð€‹›à˜·¨ˆÍ¦ñŸKFææë¿–·œÂs¼‡u`ûH²ö K[á.sj#@è[ôö?þ“Xt¡ŒûáÊ£A.b„¥Z߉ñºç×p/t±H2‹30 4`?á{VýßϨQöJ@lA¦‡lWÒ‚ÕB)”Üëžç•7n5úàÕëÐÿÈÿ#üoƒ6À=ïyÕõ±;,¬y…ƒZ·é Í/ü—èÈ®êrørcþ8ÍÐÈ«ó<RÅ¥lŸÕVSXÕ>Ú38“F¬NÎDÝkìßëÚÚ üìUñ7™½Ñ)Ç̈âÀ™’eij™óàÇ—üøT$‚š\¿T”†àiœÉŠŽqï§÷%¢@!Ã@8˽l»Œ$W¼§åQ¹½ 1bª‰2™v@P@ÿ—™3Ì[Ðwƒ Ê‘å{‚œ=f1”3z‡@ͤžEW[\ƒ£¤)?sÆÒ·øŠu릸~Kê ’x‹ØTk×ïø„1tÐÉN¾%1 ›16B^µÕG:"_‚R™ƒËgŠk†8 °0ºì>JlááýkÀ5Y .\ÒF³°!2A’:£­ºZdз풂€:;Ûm´–×V+e ñ ¶/`Ëv­IqDóJ“ó²—’P ã{ì´úï0ÄÈÉÏûD´GN„´uîb€·›Ðð5Ò0h`ŒHóøÍAöMwá¶< †U€®@ˆlS’¿ÉЯ:Ô`Ï:¦Ô-KúÒÕ±Äõ;@DH L5îcÖºÀwož~Á$}]­* üìW°ß´£ÜqwiveRËäŽÓF#¾¿Á;˶\_<ÕŒ¢.¡E;±{ÿNĈZFk‚3Ãx‰R9ùC•Žï擈´69¦N-˜P­f¢_>¨Þº)¥œþu8 #÷Þg ½32¾BLwÇÞ#~ºH?IÂÊx˸ Aäfý`1L#àf}Í‹­3õ+çŽÍR˜àµ;úÂOÁ Íž ÁïJ˜6ÀºõM–½CG~ åfõY·xD 7(É©t•· ÷©Ú÷|ãÆÇñ¼B%_XîÀôPwe%ÑîtH€Êìžë£ÜeÈŠýçœyWy&?Z1Ì w‘¾ú±£ãò‘eÁ{Æ3ÓâÅ}Ýt®þœœš üïÝ ¿ë1›Wñ}›7Ùgî:B@ñ;®$I½çÜ{„hpx_ è”@lÿö?Sà²8ÃþüwgõNöZ?w!”h‰[ì=hËK:† ’íÁ÷Ýà˜¡NF(¡$¼{§^:±RMnòÀÙ/‰Ùnõ§q Åû[øøm®–©ß\%~z×]±ê)»ïG±Ÿåê¬Só5·ˆüẋH·áUß ›zǯ¸dŒÛ´ÙÓ×Y—¦~‹Ñ÷òo´ŒÃ]ŠI_Çœv$þ;·fÖ: UËuS¨é~ éc-ˆJÙYÃ4¶Táb­u>Ï©y¤°¯þµ«àMÔùÚ€øRXs ñIÛíò…ºâÁÉ0n#I,ØÓP3pŒ5ÜcÈz üÂ,JÒ.sÝù|~Y¤ >^è¶“:hî ,ºXéðñº5q48è95¨˜êÿébkįzœйƒŸÔõÇ$·D}ý@C¢Âv}­ ~þïÖ×Ú»«>Ðb\íNÌ~7¥>Ù;·RG$aµrr„·Ä}ÁÆë½¿lξXL’F»(ÞLŠ„d·BèËæ¹N‡½±i.ãHŒéªýcx‰¡Öú‰Ž½8vûº«¯;Ë“vfrU/@]±xpí³‚«Ã …ß0k;;ËŸ2M¢_ܧu±80†cÛ{KàŸö5¹ƒüÄç0x·òfÐÔ‚ AƒA,»ÛuœH…»ÏR©bn7 ëPsì'Æ =˜‹…A#¨5ÅOÈŽZ¥gb+…¬õÁ_û’jÖ^ £Ë`ý¸÷"Ìó>º¡É#µI&,¹xwè ü€­.öïåkZÒø_{á½ÑèÖ©ÈEƒüÁ®&ß";¶fúSW¡åí ßóÚéÆÉLqÞ¡s˜ÉÓ\5¦ëé=wÌ=- = ÑLûÚïÌÐ|IJKvìa9¾¿G» I—£Áº&ç¸19é'ß”Qª‡•ÎêÐÔbéÔpDZ£™a­Y“ €é`ºÏØLþ¦ëOg+/<¹d<¬×ñR/ѧWo¦å„àr¥Òn¾>¢©TÆizQщ†%"Áý\.i®u»OàÕxQB¡\¦·ÉèaèöOÊL'DP, ²SzŠT»k•ë2·FW§$E¼Ô‡¡Ú)$"¨i¶‘(Œ{Y©iÑ3_kÉë[+àüw1˜;ó-[Õ ùPwŠ«€ ©¡Âc$–PïÕüdr-—Úþ oAÖ%%AÙQ*7[snAvQEl1ןnzDR‡/öÁù9k:A“‡·Ë·ÄÅû5Ó#ê&ìsGÏÅn‹\ 0ì¢j̉4 þHÅ ºe›Áh¾Z{p”mE}‰ãV‡³ñpð7tèù»TÓ#o"jŠ'7«•·ZѲÃ2¾•·èÍ!P Ki.zSk Ù[¹®¾›)hEó{Li¨sî®Ná+X]tÜÓï$£¯À±½(çoâÉ[†ñ œ(Þíô8N&:|ÂÞþ¢» ,GElç0~&€©û‘£Ð $­IŬd?M‘ŸãV° §€ü¶OA‰x&mØO+_Qñ‘¿ÁüÚÙ»§+¤(é´·è©!š•Í?a! $Œýèl@aO¦Wá.Sg'ü8µ¾¿!!éXàª>hÝIn2± ÍŸÇŸÂfTá¸á3WÄÕ9Tg;8–<›usqŠè’+.x§žãáIWÈJ–GPØgz 3†‡†¬Ÿm‘j–b¼ñt!©OTOÊqœŽ@Αp§¨~í$~:\Þ´™¤’<âl߃ öã~{øyŒÆ ]øšcÖ$­€…¯D5ä-«®#Úˆ®µÂ,§0ìóW«e€Ÿø%°ùò˜èlMC®°/µ¼Ç"zµQsƒ"DR©¶‰«¡ÉPq¸«:Nˆ/€8À4ÖÚÄßT6¿´Q6Ë= Àyö­ R‡üգ߻' º›^2âÖžl+צýŒwbAGÒ~¹.£ï$q4h¢ÉðÍ+,R9]TµoøbBWw:£“Òç~ýž§/­ð¬„õ÷ì0H¨Ó1ŠFö°0ÃãKùøï…´î™ÉIÝ"øÃ€ÂšÌk zDM[ùÅõ@kª1ZL2^‘¢ ¯ ï/þfáù¢¤&“6¬zcìaœó\e‹È8Ú9u·Q¢™µ¡¡Ñ;ÀÜL¥ÊÌÄšŽ}ª±r%ªœå!Š_l¦¢t¨.Bô˜jì&eèö"<^!Ø‘Ÿ¸è 'umANKJ‹y°D¤Ò†ö‹'õ­™mðm¼|i^‡üÕ` ßõºC[Žî´ÞÀlùt°Á÷·Ý–mü[âw¡lhØúO„ÜP ï©àœð c SŸŸû<í×÷÷KYÝC&šý^Ù…ƒ«Ûžö÷M[Åôº=ÛÏsˆÊŒò(epÚÇÔ%ºÄÇDÀ i^G¡³«˜œØ ο^Fð¥i+ ¶å_çœ=æþʧ^„Ä=¬RŠî+e\úÞw4tš|ZR¼¯àÄóA äØÔÔá“H®Œœ¬LJI«­`”¸N„ä4oê°‘êÿ¬7?"â@9ŠûžÆ\¦—jݤJ¬ÞÖ€cUZÁô˜Éæ¾Pt8îw”Òè2|*©Bm)âñð––BþŒ&§+Ó=eéÅ"Ñ•l¡|•Õ‚:ÎŽxˆcâ†ü×FóÀ€ææÅ±Í‡¾„ÒåÝçë»Ôy&ïGÝ,-JHÄ¥€jÔ›ÎIIßѤsï¯y\ iì9tíQ(u"àÔã°€®ÿÉa¸¦œ$÷hf½/©I3F1 ޝ0‘©x†”OF÷¨(þ0|%˜?¤¢Újw¹É³­}}l«Šçilz’¥ÆýLHÆjà‹5MŽÏ^«`“> #òg2XB£0•›EÕµ}‘Éçj%Á®÷÷@{kÙ!q~ÌÖ€Ç82±Á²ÆIH½ô9¾ìú‰>kêûx¥‚ÙÜÄI›}MâÙËã6ÕçJ²8=֙䓫<ÍY¯&Ä –&‰½‡Ü}A&èýØ-‚^qRt¤ÎÈ 20j£§Çí‰7*‡üÚÜŠ½ÁÁ׾Ŷ‘²ÄPÈcfT›œF­À¹¶¦yÌvx%E7‹ˆXhGw4ä_}rÚ?ÈQ‘M”[ª’¥Í f'”j΂“´KN«ú0«ö¬Kß×ÐË[Ré~–÷=@^©j¿hâ_yo Ïöñ|Áµ;à!"G“‘šM¦õ´«Q&Íšs=9J£|ŽÿÑ™ç鼿½¿AÛ°,Mõ°Tð•’Ó†òŒ•\1“³¬Üš¦÷ãÙ¸W¥†¤Çþ¦i³T_àÈ FðŽ3qÓÞ4j×`R¹qA8QÈFÄ>EÅŠUIÕ±ŒGÌøSÕrÁŸ+¢„3ªïä´8œ3ø{ìNôjq3›,zσ[jèÊ…üÕpßMÛ*b8Ж½ýèúÝReEÈ6 FU¤<ÌEoÓñ<:®–pëÁ-S³•eš2ÒY$ž°±­«”ðÌ£ðkf‘Hb.›Çò’° ë4p=ïÒ,ÛUþË"ÃO¤!×R¤|µM³=àFÜ5ýq ã„Ätd£ÇÞ;œ€íŽØ´+ÙTôWWDÙJÏ¡,/ѳã‚V¢äH^rFr×@Õr¿6'仿Ãx6õ_áUoýq}>"bÑËã´1\ªö,ñ:Ä݇ٵùeˆ$èÙô?k !n°§ÕLâ$rܵ¨úE„|XOàóXÛ]SÞbTâlfÖ¼:¡ UhmC¢8šjŽÂ(Bì²ê6´]³-ìê†OggSÀ¢›O!jf9•€ÿ!ÿ#ÿ#ÿ ÿÿ?ÿÿÿÿ)ÿ!ÿ*ÿ.ÿ.ÿ.üÚ”ÉäÉ—@njÇÆ&‹(&O,‰›ƒIì©L«‹Vä-W®»ºSoæØ=rò«Eù ™ÖSwŠc@eô#z¤{o³%aŠàV ñ9ï+#Ïìvl¿“oê;Lĉ%C?tZ½èð̳ûa¶ê¡Ý^s„r:,/B&P_ƒðw'EMú—0;Æ,Û2aU åÆêýÇÜAg¸Ë >µØŒñSÃÏs­4N£…Y3ÄPN]ìÑ9ç±æãJ:áA¨Ž«Â¸×#š'`•FnÒ6p†+ f-+"\.ª%ZGXLÊâ‹ymBPúEKÆÂõ PÅjÐ" C¬§içÑ[φoÀ"Ÿ\{Ït‰ì™¢÷õ‚%ûêœ#†ü×È=3Tó*‹î©ôo›å+ŸËr~h9^x¦}?›$«›fç}ìg‰]K4æ(oRX¿£›æ˜r¿¯)ØË%ÀÔˆÚ«ÍN™ñîÝCD†½x^ a¶ÿ(¿Ï”¥”fï¨LÕ i‡>k„¶÷72YäWý ÊÒÆ9jó×2„šéì%˜ø¥o°k °Z‹ýÁ*ŠfÏq b¼ô­×íDÇ´$€ Á鈃ŽÍFœôS:š± ‰ÏoΘ/‡™qÚBíl9ÚÜ>Ÿmâp 3%ì;ËLÐAkq]yŠßJoGÐ^·É°î}ì‹;Fà,cŸË qæ&+S¬øèØÑÌ„óX¶ø:"§/ž0ÃÖ°#KË7¨Úù„ü×D`XB¤}ÿþ‹™íT@ʯç’wØðAÊÔJ-Çõý¯Ï®óœ8 ;ÏpZl4”t°·À§Hþìüv+£˜¸·¹mú%:—Óoª:ª’å$èŠ8¥[|C³ ï{|xcš]Œƒ^ˆ>'”j‚ÑQ¡nÒ"¤<ñj?\Wb°s΃î½í\‹´A\kÛÎk0\ÐRáFʯ’@¥)ÈߥOóe$fÑy¤~Ô³¯›°»œ'ˆ.Ësß0!vh´Ã{4wAN} –YÄÞ®ÏÖ/c³ðì¡Rq5ˆoÙ7Ÿ’dê:£ƒÛÎíÃÞNBO0†¤÷$’5#ÓíÚ‘ZˆjõX4‚ñ«êS—3 \c_;Ò×[nÂäÐ[s~K(’…üÕm¼Eä"Ÿµ°Qx\Çä…G{~ÃÙÒcÓëDyI("]Jͺ?s¬"µzÑ“_=auIÿq[IŒ¸.ì&’¾,1š$^Q•ë4µ¬n”]÷‰äN»ÄðÈwFP@…•-JûÓb–^㉬àQüš‘nÿ'óñ «çg"[†‰ ¬þ1~š›[“̸sjý‘5?˜ÔÐÆ[–’ÔxN‚}Ù ÉŒêå™ÏYÙ9¯ŸDç%3’óò±I(!²Ì,Èí¹/tW\›PèƒüV§ûªH×§È\ díû„Ž·€=ᘔZä,¸/ßqË:ç¼L@ïRoˆºç¼›ªR·„%Ls-"¬L–Â'¨hÌÉûŠÚ‡üÖÙ×íªµij{-¸»¹¼uu8Dþø—6y¬ª¶óÚrY°ªós°‚7Â8w–ε ,šSEEmL}Òàp È›  }”ðžøo 1‰õ+Eϱ/k‡Àí/…*·Ð./ånÞ°ð&è}`æ\H…ôõYä­r·"çlöƒ%âËšb aAûô¢\©]\ºÀÀÀC^iI† û ùP¡mÎG¢êÊ¢¥eà°?è9î¢ë‚3Ñ"­Ïtñu°kÔæ ‚ÓÞ)ÀnTÞW\Åyñ~:ùSa¦ºÀ¤+êUü 9\Îö­?öð×çg+G7¾”± ]ÈTëÝ`-Ò– @s‚¼uâ» Ð:‡üB? VAµâ/SSp ß+òJbBô”‰3ã¢æ5O-ÿ##0÷ÃnÍ6†>Lý› 3l‘C‘ ÅK•ËqŸbK€“!Wˆã>¦oí…SÄWl” K°Ý.w5ÀÌ­K23>,ñ»¡ôu¿eÆz½Ä ´jGŽ— C8u§²v¬̱¸'Ð\Þ•Î9•¼jE¾L÷áJ‹v"bî~b⪃Èq¯ïîî.ÃÍAŽ‹qa±5bòß:x¯-&1Añâí6«w$Ó!Ö©‰crì(žu™Ñ5ZhÌvkL•÷†›`LÉh£C(ˆ°_;ƒ¡îaQDëˆ7hVN­z9ÁXŠ/Z: Ãý.Ç™‡ø¥çFi. üšî&ë0Ò¡‡æ\–YE4n5gq…åÚç|#ÀLŒvïýåf‹ü\½à C¡ÞM×±>. üv Héð¥¬ß»Z”÷–:knTÙóÕІæQ ¼mpÍD¡ôÄ\*¯éÕÑIªµÈ3´7•'¸ih8—€Ì_6˜¶Ô»3Ÿ,If»’Ý»U‚J!-zè=š“1yFKvšA!+”9å¶¡zF1Æõĸ°¸Ä¿ÛÆñrŒÞ¬t'Åncý–Î3ÆîÜÑùˆ˜lÐÈ›3åŸXb-ðñÙ¯¡Q:£ÀÇמ¤‚E„/}-Ù˜Ÿ7@KQU™×óÀæœIÏ4gïI_QID¼B\¡ò±Ñ&ÞD_TýòÂã r _žGу^vž7-•½T¾&Â÷£‹üRÅÀ€AÓ´DŸõ šžnu¹R{‘âP©äÞæ SÝNEþ¦hÜE É¢û4Ža}ZÝ{Újª•ݬ;¸ØÊ1xÔÞ½8 ;bf–®}ú(ß_­0`¶Ïo[Á©Jj­ãø(sͺ ’ ó; j¨@6éÏ—‡Å‹{ŸŸÀV£\ìZÊ,ÀÁœmï±fndm4/ØËÓEÀ˜°*{§º3þ )©à„w{.ÔçË*ŽuÐÆPþ“Cž{RêóbLŽ:EEð‘'Þ3d!”é÷Û!+M|¢þú‡õ‡}ÉI„‘_gÎËñC¸=*­#dÂæ{§1òª éñº^šw¹´“g~*šÊœ@ZüÀLýa‘£¤±tÇÖ¸ëƒ%r]šÍõöeœrézíZ¥¡.ì¿5ŒG¬òÞlqÑ©Çî‡Æ.Ú‡ámõ]ã6†Ðoéæ1^R,´!ÛI³[Ô¯¼~^äöÚˆ»VØš©ˆé`®÷îk©]']¯v«rÊHat”º­sw–ÌPM›…¿vðÛ7yäÓÄ¥ÿñˆTTÎqÊ&cs¬ªÕáˆþHŸR¼vQhI ´78KÃ~ wg§{¿Êè ™¿MGg·x«¤}c›,W‰÷pbñ¾øí¡“ºmQ` ò¢(Uîo¥äoœü¥Ð¹àp»MVzÁ§P+Î.œA¦8¨0Œœ\/àx:g£+ÇÚ'ô“$$>ní©)ŒÌíá‚üÆùº« ‡«£ù8ƒôîš=E?£iÞdÅ®´Å ;‰hÆHuਫ਼ Æ—Ä<ÝÒgí#?YÎêþ’•{iK ½Søÿ©üqéáO·F»˜é`ê螃-­øÉuløË ê{tÔ³Ãbc¯ïyy|¸g|]2øíÚ\Àw'’Xí+Hˆ¨Ï¶´,ÝÛl'Íü÷jíÀC³'G_ O2MqtW,œHjå^,4Zï†U`𱮜ËxÀœ{&z]Pq¤ bNìû°æ‰q½G yA¯ô.nBáÞoøù“@ï+fœ3S(¿x‹»îÂdbóCþˆƒ–³·Èy·%Ñ2¶mÄ’>û§¢WHéYŸ2M€Øµ;f7Æ–âÍdÙƒüÀCj§œ®¬SÚ4”Ùã°KA´—pú°“]*Þ–F±•þl æïƒ›ÓµóèïÁÛÞª1wÖ¬ÉÏTÙ’®,T'Îé’kÌç„1[kýç‡^4_zz‘ŠÒ0X—òÀÞ&ÿ¡å÷‰“y²/-ø™OÚü<›Dyw~5B<*‘ uÚà®Hgº ÑŽ\]©V „Ý„AqêŬF};bÈhLÞ\"R4n>ëìØÄZ  èa†ì㓺Fnìb¸2Íçl ùbrËŒFÔGƦw¿ùKï*~/ÇkÀðCìtÇþiä°Î|œ2,˜ëŒcÂÅæ¨OÙ]]k§dºËD­(FvŸÿºN#ZçTfZvÒ% ‚üÀ­æª`8L‰ë3ÒÞ%n'Ua&L/…í—Fk7Ì?!¸?¬–µ„¸líÎØm« 9*·Ë“Ádÿ_ò¡·f 'W*læñÈq3z©b7cd ûˆ'檜å+èi+&Å‹WvÄO iËç=v¿˜>óSnI¦ê÷ÈU“&ë€%—Ó¬„©ÚGãi=# ÷Êj»”É+Ju^UÅe‹3Nù ŠyÞQ &€>¬ôgÑÙ5*hõ[s~¨œi9 H‹ø4-DQŒ<Ö…,²c[èÐkÍñÖÿðf4ó•ÍøH޳6¡m²bé'‹ënózÊÛÞÿFC ¸ò´Ë%׸—úë_©˜5ËTȸ¸{‡2…÷iÙd+\õS <6уüÁñÇOÆ«`+¹^Mðuuå|%GøgºëÂB D€UüÓŸQI×à—úm)ü,wžï·%Ùœó…òE·w½åü¦éÆøý†ƒ/|7¶÷ÁþD¥n9+Ÿýg>ߺ⢟Fžé-K,MÅ¡4\]w)BÕÍVÇRÚ‘Mò¯ê¸‘üCxp]V=Ýû™·…ýÝ_|{óçfZåøc©ÛîÒ&]Ež1Å´<“ìœdA‡±Ñù¶Ó÷ Šà …»Œæ¢yAf†óѹ˴}•õ}ÛSÂ?IîY|Y%m2±œa'O‰vª°¨-mÆûö½§;üÕ]Ú­fí—ÓÔÌpIc¶ýRSv'—D±=€’|oùÛáJù;bÛÔ-,@^oÒ¾‘¼Êç®t¦Æ áæ¹J Š$ª…Ó¹ôØP´tÆÈg˜%|ï*Ý ½Y·ÉÇÀ‘Õ2ÃF×ÖN,7RG(kM9$Ô>1Ò'Oî:•"Ù)‡1Ð^.\CÅ/`M„D÷lËf$RG (gϧ¹,ªãq>ñØ®'÷e™óÿJÿ†sÇ<õ¥æ¶o‚üÀ‘‚òG’÷‹ò"zïÖ:èQðÐ÷é1ì Ðq#,gJi¢}_KP mø&xÏú¬àê1Íô¯„Þýš3|dNPðþ¨r`d„ &/åÁÌi¬,TÑ­*3T"¸ùFâÉÇõî'—c­=þvt0¥bdãl‘¸Ûù Ù×]É}VT÷8œ„‰ÒE(­2e2ÝÿÝdÍÏ *ÇÛÐUÚ‚ôè hV¶—pEE|S¶]hÁp¥œÑeç«gS’9™Lé`Qt…þê·o:{9F?̪žz±Ø’ö³ÎÕcÅ¢ÃV ^PD8B7YvÙÉ@ îV¸hôVÂMOggS@×›O!k<¯˜”ÿ.ÿ.ÿ?ÿÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÁî 4ÈA½˜ éP½ëh3ÍgZ)áéÛU«ï~}ž ²48ÙþÔd"~({žã f0¥÷w°Åu$s¹µJØœ  Ñz²âÁ¡žó”†í… ¤ÂMbÊ'£‹Ö‰!^PRµ‹­y½¶_á±tè-#MÝ4Íæµˆ î1[&²åIl²ñ–…A:à÷ûë‘*ŠÆ#öm'ÑîvUi@¹‰£Uöù?’ËÇUèaÒÜ?5÷œÓÐFÝÄ­ÙÏã›n¸óry`ñZ(<Ùâ£â‚ ÏžÙ5"•¶BáeP@í“üÞÈ V0è¬ÔD2Nâ® 4ƒ ô£"âêP>œw)£'&.Té Ó[—Ðúí>†$b‚š¨P{èd”÷·BÁ¬|ÖÐ0½—£üB=c7¹Ü¼AÒÏÓÿÙß$M¡1زÂý€Ä›£ÇØbÚ,’K亿mJ¨J3-âƒÛ߃‰Ý¶Ø= øu—7›FaÕ6Áù¤eúO†69Š¥3»úÖë‹ÌŠ/¤­ÅéÉ7g£µPù”n?Ý–ŽlüB I´¡†¶ËgE±áæ.ñïùFÏÓš!+…RëÌÏ:áœF(Úh€¯²Jï`Ž€¶¯N㸣ídâ3høUù|¹;šLPþ+×¼ÖÑòÈ8´cÃ0'.²¼¢jþúo‚kbJžÞ4½°%¹et+ÇòHçýZÅKî–€”àô§2c®uýí `wdG¬²çˆ'HÂjœtÛ]ÖÓ–“aÚØé"³™Õ¯Øb¸„›_’Wù=´ W~z©_I´üB=…ߣjòÀHæ"ãfAÆ8Àx¬×ôÙµ½Iµ¾vÙ 1ÃúÆÎ8Ðì<:56yÎåÓ}𨓈UdÐo©€¦êf€ ÿŠ"×±äAÿÚÁNOñmÙiö»\eV˜’e3V7Ñ&f~# @ùÊûš ·§²ò5¸ßY^qª>ÁÙ¸¨Ñg›„M¤_ ý{VhWf/²¾“ §fS¿š÷®OÚ:ýlè;)©¢fè(ý› YEH`¦ÌÛ™¸Ö¤7ßЋ³} ©V²í¤Ý¶Õ»QA€¤E퇴žÉø=ù¨ÊÌÏ'Þ²ñNÀºº^§ôkuÕU³Ç›Âã»`1!—‰Ï5Àn!B"íƒ 5ËZOÏ&éS¾Åj O»KtLŒU éŸh-ü^n—\äö³¼ eSÌO±í€e åeÜÖ^~eèµiví¶- õs¥Ã+KqgÆÛ½§Y÷•:'WÞM+é9`'ä{UKVª?ã–g¬H0Ob…äñßýà± 3->•Ÿîn‡:.Ÿ‰gá6’ѼÏÖ€n ‰ë^RÔ“éQ"¢¸çÁ÷<±€…+5ðIñÉ\º.Cú2ÒÓ‹lص€1V{$³­ 8z _Qœúß*FFuÔ³M¦ÂŽ@¦qÏl€3²r³"Þû”󠋺âs"ï3 =Ûn&A¥ôDPÐ`œ™'"?#aNöwSç†ÃÛðpÔ]éô>LQþ¸ ho>Åö=«´i1‘"mQ›ªü¨ãT‘üSŒ’8•Ï®0ùAf‡åËûóï\ºŒžèSÑD¡ÇW !_Ü”¦ósº*gQ†tŠ¢Ûj)°1G(OuìÁŠh¢ðÐþ›“Y&€äj!²­ÒFÞe&³ÅH%®¢ó.4Å{U’Å%Fì¶[C1ÒS¢àp;íÕSíMËRñ– Þ]Í"EûBÏÏÿÜ6Ý ±â4=_œoåãҒC=4{Ð;3½>yfÐÐhäÇðÄ™‹RN÷òÈxI …¸F»ï'FpMq5Ðk©¼&/{3û^ ÚÈ(ÊJ~ïÈ´™ÓcŽC¿r%õ›§Ø5¤\Z4¢w¡>çeØÕf³ÔYÑô&mñßÓÁV e‘áæJâ$ÓãR‚èðÐSŒü×Fý"ZøÅö¬[° ËmEfM‡Á(O a¾<Ì"äe ³3•0ù¢6\W¾G攼â×Ô(5ÿ8µ»¡±NµÓ›•2ZèœËbêȲTœžHù \[íÆþ´Bx½§òGüðûæøÃ&]3Á‘ªÚoÁ×:j~dkÖ¦3fÑ0ÕiÖéí<»D/L-dò(×`Û qI_}ZØžÂ-†.p×0÷l¶cPcˆùýøZÈß«\ï_Tú44Ò¿iÂh”Û‡üÕpßM›ñòYû%Ô›' JGûð$y†ÌTE‘vcýåmZ¦(%‚Zb-´>ˆ–ˆÍN£à¤ñ¨aiï0Ž.£&“1á!)Ú 6ñ.f?cä!!?ÖˆrCþHi ’ÛæëÓ‰Æ „2¯3À ÏÃ7¹@Xk˜‡xìØõB^L©Ú¥þþóÛBýGðTÙõböQ³8ì¥ú©=Ty6ê½¾Û>Oœ¹&a6ìÆ@kâú4ð´/´•¹iq1*;9s®Ÿ@õ´f±óþÔc&b„ùš5d ˆDŒn‚œª1èjZ&–àæÆÔ$1Bk`]¬e½/½¬|ï¾{ÔôV,<ò€ä«†üÕ~cbhÀî]v˜úd³œëdA n´öž3È«'q¤2IŒûè©ËôI[³Dw`åöa.û#†f`@ÏNH(ô})"Þre˜’2È‘–ä”М Ià§EFŒå†TiÒ\ÌRêªd˜4‡Ç,±Šµü§®³Èja4‘ƒ°¿‚úϹ„"Ù$f§&K¹²f¿©_íÝg^ÞÉ·"k à¿d1sgáù*øÓA’ìiÐW¼D”.sÒš¢˜ÿE€¼¦g(Õ½„v‡n™{[È}žº?3ìè!ìNVn¬U<ôά“,kž©ó-=(ŠÛ3¼2 ©P–ýFâ,ùùF±¥ÃÆÜG¨Ÿq¶³åú¾<€›av: iX®P×&܀ŗ±it7º‘ k²$C‡üSÅ¿\G°tºz©y”~™}}—€)_Ö¦5Xî‡yµœÂãH°o ’‰|õ8ƪí·%Ü@¹Á¸wmGc»ó|PŸì}VOά½ÏÂb©ŸRD¢Ì%Õþ?Vp7‚Q®ù‚)Øö&ÂÛÙVÆ4 \©'R3;—&þ…7Ós®g×A[:û DQ–.ޱ[ÅÚ’¤l+'Œã:£“=®Œ¤ÈÍ>ãjEœ/Qú°™_¨¥‚ÑØžŽötæPÔ~×øÍf:_Úi–÷{F“Èb,ÿã~.ɨFA›®çi  Òãt2‘3ªuæ8 òýŽ¥ÖC:œôß,OSH>æð÷ª¹ê7¡a¹ÊljRžÎl¬“g $S¢â7køËKÜa3Æoýœüú§P-§ÿSKÆhzpµü-ô±²?a*©-öü[Ïc1.¤¤Zs„’š3lĵ-ð'^]íÑÜŽ5m?Èaâ<Ït´=RÕ°TåïUG> ¸»ÎpÐ8kyÑ8.€Ú9Ì|øæ4<·Ä &𛀧–¥kgŠA£Gbáâ¼]„ÀJArfbve2zF·W^: œ ¡ÁX¾ RÄC¶û‡â¦{ì˜5€{§ô›ÅÿVŠÉÿkT‘Âq¤7ÓÙÅì@aËŠ…n+¡Å²ÍH…—e½2…(A\ö"pá”Q`u}‚)M‰¿ö[w®"¼â+?y™NÙì7RÙ•ÙÏδœ1¾zb©É~²š¥ï>nÆ7¿ vx@-×cìV<š€Yg Yüqò柾,ئ äÚj º»Ô_Õ¸†û”QñÏ?rg±Ñd\7pn¤ÖKcbibûœ> î{4®ÍB+Ü—Ä)6ª–ï>bW­ë[û@Žô‡&RÆÉ-;­È!¼66²â¬›QÈÎè,’±‰c%ëÊ‘d:'—âÊ·ÃX¶šÀ0’¢#Y49îÎ6ž‚rÚ š·Ÿw‹lœá®kþgÆTã¥ÆJÂÊHFŒÃuó £·Ø¯§wtbÂã-!óö!’’IþCË BálíŠ53â’w¥ýøÜK‡!õ§º­kzkiæ¼U0ôžÂ >§øv¨Y_×@–¼­¿Ì¨ †Öà÷ŠFüÆé¤e{j¥ËU$¸ý­Ð™üM €Xƒ(´ŠoÀ’HVv¬k;ˆŸQae†®8Ó¦vÑR‚ÁZÇ(ð)Ntà,ßMíòª½•qlx…^‘•MòÏ4:åô׼¥÷iÙ†J´c•k#F˜û@vY¿—ß5®3ÍŠöŒáJEÿ‘ì^ƒUQñ2·¹Rª·;¡ÞÈ7v⹎b'®@ðP´®"œôŒ§¦¬rÇÀ,ÊLö„ibLcµºDÀ8»Ü@é/@³ÞH¬þdYËmþF-ÄkÇD«Iü“«^¶¬ø»¥if[«èþ…ß-Ž¢š/‹üÈ÷¾^déïaÇ cTݳԞëŸ{ö× ¼àð4c$&Xô â-Á¿OZ2p„˜Hˆ½J9·¿îÓKƽ5Á÷F‘QM19»ÆPêÒø;fBðptZ£$ÙË2Í 3= Ô×Ù, îœ=qÑZun½¤ZM—L›¸J; 4@¨ÊBŽ·[Ióy…`•²æ¨Û¤ç™{@Ò˜u”þ-3qŒÀ®)^3o¬Ýe +}'YxÄ–¡?Õk±ÑÁb7ë0ÉFÛ€’ÎÕkóå»­°zÜI\¦¼u”:1×éÔº¯.¬¾H°Ìw¢ØÇÖtç—!ŽàOõ™j$&ÞÜä…¾’çxÜÕüÀ>ghD/œ?Šoݪ4™‰‚}¸C¬û¡¹‚„Ü”ÛÍË=qEȧ1­fW˜ÇéÓšó'Ù½ÑðP§çÖ0Å2Éeˆ8ð—f'NaIèTc29QìÜ«*n"ÖuºyÅE#›)ÊmƒÒ¬ÿUeŒI(:Ð=T§øÎG¬…¯bõ»;¸$Uþç×ë;|ïhëEÓ¥Íãfê{2ùL ™KŃGRŸì,à"êR‚n JÄ‹:æâi×§k9üÊ*wîKOÑ'>9BY;àð$±šJa•ß7aUå“k‚Ü"Ïœ Ï`8µ9RÃAzø=ˆ%Áu˜lKg©Ùoƒ66¨×FÖ[à˜€é7ü'›lÕùÚ_ŸÁû~U©è¸(ˆª@KƒZ©Cúî4ee$´œ`*ü¹w‰;`9xy] î|D@Õ±)Ц›$„kÊn…‹ ¢•ü/ƒí ÞÙ+7烰°× HƒÊ¥.éÝü{j2ƺ0£»W¥Žå¦l¦Ö\ç_;ºdf/°ôàŽå…=ør^6 °yÌ9åókYñ ×ÿŠBÆæÀ×:«/­-˜Úà ÝâNÝ&Ñkâw±ÿA®(’‚o%ª ±\­^^¢žÞQM_lXdjlÛ I þæËeeëè:‰ƒ¢uYŽRŒh•€ÅÀùù\³sדў@?КÑ;\_ãttu^H¶§ý‚ÜŠï-Ô³’½Äð*¸æL²]Ñê,u¬WJÂ&”†g”I«â}iŠrõ|„.˜éÅ¥2!rêP}6iëèà߈B¡«FBýWþÖ1¥`PüYRìÃMáy-tˆY˜ËtÎÎ`"I*ì²Ò•…Ý<-ÑÄ·ÔÁ“zl¾¡5yBÏ*YD_”xv©.§e_"üAò   î>9ηÇßA‰¹{e™àhOâKyu'ˆpT¨_öqK«fjäS#ÊÚ®ó”BiÁ(°âÈ`„¸ _°Ï9j§×=ò–«®7Wó7^ç[÷ ~1®«†\7)8±”%¸MU[ ?'ÎÐÙYÙ=.±ŽïPØ)B¹{bKq£ü­÷ ­àbÊô_çÉö™)Ã#šJœréuä ÎCˌ˂'ØèÊŽ! ÞD®Ü6¹A%ap½ª¼“âPF/K%…xUAüèm쓱—ÇŸkƒ]jwl‹ZÙÜ¥i´:õÞ'JÁüPB%(ô% ’Á×ýþÿÃØ{:L·•ª”H,•!ü–¹I»-My0|qâžeõA-¢"ÓÀ·Cò3F¢YK\¶Ÿ¢êê©át…×¢!¿!ëÍtI“ÚL":ý{²Ì îv÷)rGL>¸>u_ÚNm¼-´mÌ6»ñâgê±wÇÒzÅšÁ#ª>*ôÿä½ƒÉæŸïzަ†,‚,ú ²úBM ‰öíÊJ"ÆG~PHlé’+A^ê‹DfVúcEVîÎ\7o¡êßZ{êâpqñ̺[9Vðêè/Ñ7î ŽS_+Ýò`y]ètµÈÿK9F÷΄’Ûý™GXÖec'>"‹u•¨ø¯uñE¥ÞW¶xÃ6Œì!››¥j }#£üô—þ6¥|æüñJus:Ægoú—ÿŽÂÌsz¶»(é©#AÂåx;+;jlÌxõ¸™6Ox›!1XÑK°,‹RE¥ì™¸^Ð¥Çåm!*Cð¯´ïU2€GäŽÿÛ® _äÇ&Èd»â´óþôèÄ“†t¿Ê*ÐiëUX |–ç1wT"\žô²ÐY#me’ŽÅNþyˆ*Å—¤6/¦<ø‚bÕc[¯\õºX¡ãAÏ¢è Áút»ï_în*b¯}hþ6[;~7ªV§* DAî• Î6 kuÓ­Fû žr½ÕµÏ}0x§Uâ‹IÄUŽ;Àÿ‘º§àò1/ãT{M߇B.´7ûÌ”tYwF9¥qù&°ÿÖ¨¼9áÜ75šŠ¿ßŸ`üÀ®b_ëv ‡m%¿h‚w&Ù^†9®äSá6DÌœêìüc=ã~­!„Ô‘¬Ìª‡kt˜èwîXТK"¦ ¿sŠ`±D• ÃŒqGÝ–š>\­rØ¡EMñ±? „#ÀˆC…@ê1aïJ6%$`—Á4Š›{+‰?« ðŠÕË^ߥ@ëäïK×]gÁq¹U¿º þÅn༦bâ2E7©ö±ñáN”çlèqõ±íY¦Š]ǃ=æyµ<«î .P$ÀÝÈ›ÊÔ¾¢~\úÇL¯æ&ËYB¬´G¼f„2Úž˜zûƒÔYA»aÈyÜòên’‡oP9°¥P­Ù'Ð'…(5â}r½^t6:õXÆÛþÈÌø6ÎÆ¾nÕü?|åÔÎmÅIÆ'uJX+ªÑ\fG!E¯Xã™|®W±&ÛÝúÚO`îxqTu!XiœhEH)Œë1 üï’[µM—`ø£ã¡TèG_ô2`"áfq’0âÂýÏ™˜¯rÒ•0P”2ëL(ðVï3.èêe,QÈç Ø);I,¦¹w–ðrdÙCS¶Ô+¾èT_pxã¨B©rßû}脜-9ÿZÞ=\ Üé%·`Œ×ÓŸ½?ýÍø ÖÝ-',ö×Ãiì©~†uÙó#À¨ßGjÅ%Ú ”…¸F㲃¥â¸.›(«ꋎ9FS¬+X;¤Ô‡&Á+uãj^cˆHpJÉi–ÍÅ–h9ÝLæ¡TƦnaÀRAj}ݽP?‡üשxj†!îEwåüizëZ'ÍY×MÝ3CDN‹êÀ›°.´l+ª\åLñŒ»Ðt½ý@Øæ<Ó qE.(ÿÒ.>¹Q"ƒ "µ¤h,úüÌK×™•EA¤ý=@߆B¯-‰zîFU7ðÛP§]P¥ ŠÈlŒqÇÐ8?vXˆcl«½2p¨ž -¦Q-„é5yÇÚŽá‹44€‚ìAÂ’Lø¸Mc³PÞù@› ÚŽWä† äLè0ˆ¨àÚpÓý™-;èN‹Ç"¶„ÄL{ö¾9Mn´mà˜‡—E¤ÿ·Ž.[¶ÆÆWÆÊ+ÿ¡ã.¥E£Àõ¯¨,Èu´*gO g¨LŸ´ª ÿ æýP@ ±:]n­~‘…_]ËðòªhmÍâB‘¶™^°Ê²Òv?¦næÖ=œnAüé¹G°w?žqrôŒF"vŠ„«Yoª×Ü«‘J¡¬® .¯FXë$^¹®£ª>Ý‚//®éƒÙÛÖóp,³ŸVI-þ!”9·ĪýR¹§3çÓ3Q"™­Ò‰Œ÷ÐÃùfÝÑ_²ÔR:¡±b(ç‚,׫aά!Ø#Ý:™R8ºT†oŸª“bœ%D¤­+|"{+¬Ý»â¯¿h;½súO‡àÇáu­{@ö‚Œ £ÓÎÐX5/H›æAË÷—Æ}¥ƒìG+°Áõ„w“,Õ=A©,Y 옦‰¦{^Y¿.Ýë¦ÌüO¸ù¶Ïj¡zæ·Ú*ÊØóŠ<"—@„yÈ\å62ÈJ¬OŸ+ã"¦ ™@+™dHç`|Ù‡pþš¥) áÿKFùÒúLƒí ªª{ "W­‰ Þý¸{BSk­·õ„w¡&†yK|û=3ÝFã” >÷¡¶¿’u¤£œ³:U¦¯h­€€¹HP—j‹&äBžîÆ©<›˜lÐWøM¸(z[¯ÔØÈå3ª¹ÓAÚ'—­e¯U•MbŠìäu…‘C·nš·ûJžZ*;‘PP0ÓóœÄâRªÅ‡ g QÓWâ~ò„èÞò’Ufêái\Ò(¸V¼òÏñÅf—˜™uöv±´´ñ&YÄFã6ª*KSÙU¬è=®ÛOggS@@›O!m#2ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÀ“^ŸT8àYD„ “ªæ,Lï¾î“Ü[ -úù=>&Üd&Ãaù‘Ã^ý”ƒ×Ùn"Ó¾Tó xÓåÝØ«^F¾³c7¤O%ÌÃ8š’‹ŒTÑŒP,>[æD)•Þ ô–Âö}ø–ü†æWõ0AzXúCEÖ y™úŠMC>Hƒëjª£öÞºrJK[&ÈNŽ×¶Duw‡°9ý騢ƒÏýåâ:ƒ½Ø.ú¼Uª/ƺ#×ÍS¥ù”÷%âyqfþârzÜ­‚ ÍÐê’Ä.ÒŽ,þ5Ô­Ö‰œ·‚ÚJ~ƒ»j™«ThÒ{T SxåÊÜ=~~zÐS £úz]ºQæàŒ&U¤-Ì…ïÈQÁ4×ó]7X…y-+Ö|FUnf‰üŇmþ'ÜÀ$:«Ï¨£&H3èN´Ù¹ãî¾”ƒÛ³C&E[(PÊjåsVnîÁ̼v¡wPm+ód9kÆÐV¦JBhÌ·v™zv,…}õd§Ms¥¿! '&ùšÀR¥ •ÚP7¦q ‚¾£ˆ×µ•­"5Æ•þã@,nPVóìB 0üÝdâq°Ä`@•‚âcÚfN9«–á:òêÈÑGàFŒ|Iÿ¦E À¿ð—¢N¸ž©±¬Üæg³&XêYãp{œç÷;š}{Y;ê ¡w ¶*‘5ÀÇ>éz‰;B°û—å;ÎG?”ðp“ž Š VT#Γ¯9ÂÛ×þ=ÓvD’F 0rÀ ¼GüéÆZ‹%OÛdD.vc´2÷㓤˜•üÁïMq9±P‰&“OÂE5ˆ ª·zz\“Æ8ã–yô,/g`¥ò÷fWà !²ñ½v™|¨+à›äa$뫼§ã ^ ÚÍ¡"À^T}é91¡²]Ä™ê!Ð Æ[ҳ陧@^Ž,ìè0²köû#úmÔ"žGiS+´AJt¼ŠÇ:ØÁÚ¼®Ç<Ä´<õ‡Û«ì—²÷Ú`£Ò$)48ˆ½ÃfJ÷™¿RÑý³à‹ªu< Vâ‘yÞ®–FbŒ<+ùâÝüz÷‡®Ò]x¯«I»9Ñã:ÔºÛ‘o]Uî r¢d‡ý=‘ jRª>èõž(ãm›­ÐõJ1=š†èþ0¹AÆi qc<y¿ƒ8&˜¢I5íŠÖ#=eÍ1ʹüÀ­ÑW.]MAœ–¬'¦Õ²ÿ¯³ÞcÚt)né,1l_Â<ƒ.©ˆjÞzDë=vèô€Æ­(I:¨´fñí¿v÷Æo†”€./š9IЉÛá{V÷6:§Á®õts7¹Ú°ðW90󭃻͹lŸÎ-—ÓmTÍ?ò,U x”;„¸ó]_0Œ7&Æoe,™¢ÿ ÓãÀrúÕLa¨¢Ú± ×µ)vGÀìÎ?Šíí†ÈS-›”·àðjQX"¹ÉVí’‹i&ô»ÃMÛÖzѳ¨Qè»ãçÄŸì†ã؈tÈBÓüK9Âݤ£÷s)‚á œ=™ôÿuì%ò8ŠˆÆ£\ÏFÛÙÝ’Y§EÙkrAtÊ·|ôð¶r¬eüÁïK÷g×”ä;¬³”S #ŽžíR‘Þ·)ŸpâB£Ó;£J”§]:eΟü ²Ônî‰;Öòœö¶i/=Ô—µI‚©Á«C¨øÌ®¨5.¶W!R£‰LÑK¨Ô4–ò™Gªp¯®bþ/*‘HÚ†xUC0'pŒ 2a@*èœ1ÊpÝ|JO9Áþc%'*ùk2µ´ L)¼Üް,Il3:ýŠö'^>¥Ïبqk"nZÆÍÄê™ àÇb€¯,ð¨5{@jsyJ—ÈÕ.—o¥)™haýÞË…  õ~>¹ÍçUÓñܱ+Ðü…4®àä×¾òˆÞkN,¡N¤4M@• úfºÞ8wª!–ÿFšÈ c!‘×vÑ»épŒ‚„â›ã-üÅ„‘‰”¾OÛtô«·hÞZÚ3zÈ~ó>HòѼj®rþÑãPª‘eá1ñ€WLf£×-•íª@Ò/•c…àI#ÚJÚ°£b‘@f⎒ôþVâ-Å'C‚☯ðÖ¸à΂S<½Ã{E®7´V|1ƒ#M:]YÕf)_Í"Ò¬:T戠uDØ¢;Õìð*Ñuê¼áƒHÞ¢µ}†£ûÒŰ׀ã2¿(9ã¹§[(FÛåpï3úÔ+3WÁ"ÁâbÊÉ~êI_’¨ç{ÚqBujsÐ3GôcÜïv­ù[þãËÊáƉCOvƒÏüÍbÞÖÓÓ>ÿ×¼€6rÔÅ-{}"d[COôÏÖ…’ñ I OäÞ¼-´è·áÞÇtÐ^ÑüÀdN,r Ç ™OþŠ„j ÷P³ÛEù:ù©Á.} ÖI6TqQ>ß·J-šdK¶õß Þ̤ϖ.Ž6 XجèKÛ8…Û7–>wæõˉ+ÓO r[Jtë|ïâc'[·Éë±åQD’ö®k•òéñ) s^`S{áІ³Új\9T.h¡Ì¡?R¹]޾» Ø^¬Û3P²Î`~Hݲ™xšeOÛäÈwÏïܶ<Õm·®³¯Ÿ„.?OkZ®Ôg¿WïÔ3§Y™ÉÉeúCô2ù|qsG’ l–ð¼¢5ò0Ö‰ÊËLˆTÛïÃÎìjKœïv””9íFmgÍ0&ŽÉ_3M¢úÐÌT›Å†í–YÞNî HQÉî8TüÁÁ7tÛ)–œ£ ÷×¥)C™2ÍëjV"@Xáè'ÛÿQBj䫎'‹”ƪûén[­K©Q‚¼RQùc•4Võ4)ñÕCùAJTjT~Çj; 3ˆi°X®ÅÆ+ä^Ùð!ÕÔð霣½çCFó»¦fØðõ½ \GÍ'2BµMD(Ø*áscÈ×JÜOðJ&;Òì‹Oã10eªªî¢Ö7QRÄ:!ä$z_G§9í[@À^`Ó¥5ðÃ*ú—éÏ?Sâ ·Z Â¡iÍ!¬¸‡|^w₽™q›šÒ6é¿¿ñÌŠ°ÉDTŒ5cH:o±K‘µ&|Ghsc ªÕ21àsÿÄ¿Jz¹(j²€¸aåKª éŠ~‹ÙüŇ`'É:‘’Ñôê{Ö[Ÿ–Öw:¿BÃYöÇ–™­Åm-tAhæYú&þ9++d±ÏùaxvYè¯-ìJ$»;iß#´Uµ£z¨®¨@AhÚÁ8ݦ½þAú&I™Gd_¼¥ï¨€©ÍÉs0ñC?NeMÖþtµ•¿uc”TÞ¯g$ÿ‰$ùô:µð¿ð.žŒÝÒúÓ¤P¿.Zñƒ´ séIŒ¬%d˜89ÀprÉpK%w˜ ÇaáùÙí\7ˆ¿ç6”ÍÞß’ÉŸµWÓRmè“Aê´IËœóe•”>ß¡;:5fMhÀžO¬2´A)\fñ ¼÷DÛC¢~W¾–ë ¿OºÃä¼”á›Â‰ðK¾V2ýÿ2€`VEÑM ¶?­üѽ‹Ë×-§„ׂqDä¿´£{ûùN{²Xµk?¸€÷IÀC;WŒ~Ý›³7ŸÇ­Ti»uþ þ½ów¾ ¡ÐÖ\#‡$§CüU?ÇÙó_kË„Àaã÷…|A¿M1—ÉA3Ð(m–”a6ˆn—½U©×coC%ÅCu”Äix”ÕF6pmcI¥˜…‡ÐžR2\òxƒVæ’jfõ(‚ 4 ç&ŕհøÒS^t…@aê†RnÑ- e§Ì¢Ös¤8u8q£œh[Oªß6a‚¢ö5B„VŠHT9³4Ž+]¥¿aÄé| AR͘εiøïCÓèbKÆãº®¤’Nú›§¬ýf¬µÆîkÚYÉyƒdܪ¹üÃÕa›ú›eüÔ`ÈÝŒÜ,å°/ˆ¢!=èå*^†¼¤¼dÐÓëšœ%€wË!“p˜FÇ…pcbå[]ñ÷»Ý¿§OjWÎ&*[·Ûè§Ä²¢Ì·s?Öˆ‚“ŽÁ²däÄ@Üq}ªéQBÔH¸N4÷¡¢T@“dÖmëfÇÆïùþ{¼Ôij^iZÅ •i};ÞáøË7žAD´{°”» ¥ûAU'81Òž¡ycßEÈN—·Ìs´¾šÙ:Î]4d áyÈ´[ŸëðÖ¢!çÒ#Ðw;©ãç&Eëx—m²!®Š¤5÷?T2' í¢kjÚÖ·vÏÆÁ&Ú»ýn^ ÁÒ«IüÀ´rðóñÂ1õ~—}FÄ0ÐÕí£à \jÚ\Ä#,·¼-X\•"» y§Þ‰xq>iW¤~âm'Ø-I«"-—Ú s“ëuÎØìåWÖïT+aS•—¤$ìÈwè¦ɪ2Ïp5+w^¯ÍY‡Tžˆ·oÅÎÓ¹#!+JÞz—OJz¡<¥eåZ¸a¬Xa.ÃõF›™?•{ÖÞ9仳BSo íæÑyNU¹Z1Ï2ôwíÙ…ÌÔ«7µw‚»S¬SßÚ(tÜ 2_W´æV7„¢DîÓí +’ú§jzÑÒ´âø\[¡o¹‡|Õ2ŠÝ{RmÆ[š¯Ð?Âp‚”“X;Nb¢©»’rþ%˜O›·#¹Ä:¿VE¹#±Oîjµ$íþÖ?mOggSÀt›O!ntš;ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üBhx1zd|3,}¹ÿ=zði&º·/H¨ä÷-Ö•Ÿ/ññ\²ÜÁÙå#PÔ7`ЍNÖÒ€Ó±;ÆçIØ_š*°v¹\G·ªÁÄ=î7{…]Ðyð<9““€¨‰Ä& ”kQ©…B^É>>óÑB¾÷Á@g*]Scâü¤iÏ®%žYr˪ÜÙ$éØDªFøÒYB-,PómتËñÊ}ëj9›±†—E>6²–¼z¼âæšœ½o“}·›ˆi!ÚX€ÀD²ÚŽÖ,â÷#1ˆ)›ð˜ôy‡ÝGÈbUÖžC™Â“UÁk‹ÐU˜Î¶ÔhSG8–wú gÛ¯1U¸Ír´>6X¸ ‚Q»ëù $¦ûìG‘Ü.`€»›?ý‘ЛPºO¼/fýü×èí7ëò±hÓK«¨Æ¼gATˆ]Êä±wC´v(´#á;QÂá î\–©ðú5tó@y–³‹zJXwTe_›”q!EPÌiYéÝ¥6܆oˆ€nnsé5#îD²»ºÏ="Û["œÁ4šš25 t^ïå~‡(jmWwœYj0tâúžÉ›»0îÐý]c#¹:X‡ÒéÖÖznð;BŠ×‹¤ÍGà bBÂ?ºñIr¬A&#Fr¬ýÛ£¬[– ÑP?ñÆ¡¿¯$lðºÈ"î7!×øíb?¶‘”N7Cø¤C¯Spš%[üÁñE`QO¶Ê¶›0ûæ€òG†¾cvÈR”ݤi¨ß`mM·cPAx©ÊOÕmèÊVÐbÀ2t½·Z576.dÖÑŽTŒøÞZ]!Q$_°–S1:ÝùÃê sÞydƒÖq¦žÞFý§o¢º#Èÿ®KfèÕÄ”€‹¾¹÷Âqµ%`—÷=˜ÎºŽtvÄÄóîò3‡dØ–ÉÝÁû{ÎoõÀ{£››°¨©fDúɃißÔ í0`ûÒJêNâІiÃu(ÔF(œº5žY v¢ÏšE°ÌØw/^zW‡~ðü$Ðyð\Ø›^íƒta®þö£Yîì´ÚêÆ “^lI·Ñù@( ¸œéJ vŽ;À¿ õUsïN ¤ß`b¬è ´´‚üS©A¸GÕé%qG6wó÷èëùçÁÆ„¸èÎ>i9 #±J³ÅäŽÚ\ V·|u#ÑÛ/]@KdM&„ký·ßæc ‡ùšÁRásÔëtq…9Ë Ç35&Ø=U£T‰[%s†}Ö­³ßž±@æ †ö\íÂ#h€L†y\­•ŠØ1›Å«“„¡aÍÆÖ•–ah…;õá²(c6û««‚Ó‡ÚT5ûLéê"2 M«Öéн\‘Ò‹BÏ{Œ^ÓŒ!öŽÞ§Ô+êÚ¹¡lX ÙVë79…ôÐlëïZcΉVM`)ò¦ý ·@m«2­Ä8Ñ«NPÄAEO劗<äk` uGà9®ÐÒ…/¡­$îE¼ÙB3˜± ÛüùïÉ~üß›÷¸Ùx ˜®Q!¯¿ÊœYÞ)8b2Çb±õ7âŸü×!r@4Ot²Ó 0v/wÝ^Ôæ‡`F9’C4ó ™wÜú7F©&¦ŸÉ›]ܱ³ÇîÊfƒ"À—Òèäug}v—Ô¾o©Ž->‰Õ7žÎuÙ9q|“bUÕHÕÆEY¤ëx㥿p2Œ¹™€³9{ãi9¶WOh¹ N@Ï ÝX9,™¨D±ˆ,ÆR;å]½ÑÈí;HZƤÇðÌåtô’ÑM§ªl›¡ŸFì¿€· lìþç†îGuf›AVþ çcÿŸ;'ÍÊïáÙ†8ª*tOµB-Õå@è¿¢¬9~èv)ÆX¶YDÕ÷€ÿu.¹xrööDásüN f‰Ìà?Ýr”6l»ÑD3wñÞ¶“GNüot(wǤa8è/[½4wH†‹±z$ÂLÙ[ª‚g¬QPÏ“5ˆÄS’€óÄ_m<îâQ¡ŒŠË0nŽŠŸX̦Óç©5Y , ëÈô°[“Œ’¤j‘c|~ÿ1¸¡Œ–¼e²LÇËLú2:B]ßlƒþr[uÐŽ§ØºO\FTkºd®®À\=F$¦i¦¦N8xÚØ §4xäKHÌ7&éDÒû]]G/v¶&sñPïŒË¨•+#B»Tú{ôPqBAƯÒ BÍ×#™j(oÄ }yÄéöñ’ñÓì´®é­/@†ºxO3¿Ÿï´7¤‡•ˆ“Îý?1ÅXÔ ¿w\UBŸ·Á’üÁñõ¥¦&‘ rQñÈ*sòù¯°ÛûôÖKóÑß’ëÿv3ŠPøz‰ôöyFÛ­i)öÇ ÖRo—éæ>¨u›jmMh#{­!D1o¦ìêmŽ÷‹ÿÇ—*¥‰áûªlNñ’ðËw×’€¡³ìóON¦Nwz%ašŽ¨5cf@á“×Cin&mê,XÌÚ-6‚#Š÷ÑäœðzèW×ðˆ‡š0‰Õ¨l‰kt¶8¶V®Pc{Kjó•qSOÕÖHZáŸKU‰ëu0d Žtí@2“‘&÷›á-‚(/Ydú¶Þb p/F‡BCÙÏvMü÷&4‚5™QŽH€Ã‰Å¨ùçè4hý_äꉺŒo1צxöTžCC˜·/ÙóðµüŃÁyéXÌÃR„ìYJn7žÏfÜ$ÆŒ]‘néZ$èUC–ת»–¡ˆÕdzѱÑÝfW´Ðýk€‚×wR µ14’y4õ!è3ïTÔ"A €è‹©2þñ\L~ÏS k°™ff0<'!½U+¸ ËÐÚ£fñ+a±‹óLf.0þ±+¨¶Š“V!9ï¼ cXñ¥:òÄ'h*)ê ÚæT#÷ý¿2ãÏN‹Ëãó_;ûÌ&;öTÌľ*98&PŒ}œu˜õ´2ÁÞö £$½² Í-¿9‘X{AÙaG›¼€¨zeÌ)±^ý.ryc½D¶¶F÷oÙf5Ém9¼<øä€|{`ˆŠ]ý.‚7>²ì qåò±´§+“o`nãQZXðÜ•¥ü¯ eiv IY˜Í£µ)”wÁP Rïç~(»ôæ#Ò“ 5=Ïžâ3¼ïŠ,¡H¬T!|®õhL’‘?XÄηóˆ\×bbÂéZíÐA’5äLpY£ËÝØ¢D|ŽB|N¨jt”"Q„²>sýdãLu”Tiä•ô?6«„±ƒÔTÀ•î<óˆy¿„oÂÑ”«»ì=Z­Ï÷MÈZÍ ºÛ„E^%6Å1¢sŽhàZKÿ>„މ>iY\²ÊlßIv]A¶¹¸¦v9£Ç ÈBÌžù°‘‹Xs:󟛓±PK¢—»?Â'¿<£’-‹ [ÎWßÓö¹©œñöÏ)=“:¡ðN1|Õ¡Ì¥pïxŸžùÓm-£±fom°nn]Ë€—ý ÊgüBiâôü£>,¸c@!¼¦Ñƒ}ÿ•‘,òœL(c,`o9ú%K|—¶ð‰à`xNÔP¦ò%°}áLþL†ßÄoŠéWè#G°½I$Y‹Ó x¹f0ÁŠ(×Q0‹%b‰sU¾k'gJ%½Ié™u‡c‰=ó/@¼ð¦JÝû¢¨µœjã„„“ÀŃ*’6 ‘­&ö„†¿§š¿Úx"u…Õu¸^Aà@£Km:)~θŒ§E”>]rë|׿cG܈ùaï~<˜‹7=g+-´Úž[u*#YÀ n*ÅÏŒS…¦óC$S„ZBš—JÆÈRc|~¼àÒ LÌÁÄd'«°a£Yä™I"Œz0¥0±°Ûht(PXÈ­õÙ1o æP‹²Ã[ÿéTuS\ ¢Ä[úhóÅØÕò:Œ˜™µÇû(¸ï“ë–`—†Ænª‹[9«VâøÚûvÁN;0¿ïk:–î3u!³Þ¾"8ÖÀغYûÔ±€õe‹gÎãBöyÉ”yîöú «#´[Ô[IL FšXru·ËW½üz«LðØèKO6_a0˜Nÿpr èóET`aš©Ù£¸¸Rõî9‘[K¯Ncevö>Auœ&Qç’ *Ëã­‡s¶;^ÅoÞ3 …Àq³']{+ x[YM­Âá´§â7$Ú”ÚœÒ+ä'V;ÎâLÙ[þ»ÛGÐ3aø)Hq¹RKÿµ¤¦Ÿï{ Ølµ2—!•ÈÏíd‰_¾» ËPÛ.'~:2‚–:ù{ÆÙØ„mÍë<(ƒÐw’™]¯ŽuGrí3^¼Ò¿O“e!ž•˺ŒÞi»©ÍŸÌ_iO{ýËÇ~¨£ìÁY[t¬…ò|+WQFmlG#ÒàòÕ×Hãc"I¤¿|lÄqQAíΞãµÕäH/>¾ç{÷øˆÚeªü…¿7ŸÁüNíÃŒ*9¥mƒüûú Z£€³Á1ó¯“1\Ñž`ãÄkG2?3ÿ¼8Kï"'ŽÈtHk~/óÆÙ)®c|`ÈaÒ›@Â&¡¶ÒHp¯Æ”s²œrÝëIÛ’Ûà=‚*ç+º>àî¿ñ€">z‰¿­nW¿z> ìiYx=¢ÜAµ3ʹ”¶Ÿ•± ãxxW%‡|c¥À+ +É"£u­¢mƳ¾«Rê=•·HV£w[ñá™f¸x/ ëlÙ­¼òÓ•E)Wã«·ALƒLÚ!?šš4ï}êbðvrùɸԑ$Ìgíïd z–—§ð„D€÷Èûý¾aN\¾Ð À2:?±¾¯¯þ@XîÈÀ_alÑLÓi…%‡,ZÆi¤.åÀ‘8ßOggS@©›O!o üœÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ7ÿ%ÿ.ÿ.ÿ.ÿ.ÿ.üÅ?T'Ü‹³×Ê+rÈ8AÍ{|Ñ`F+Eú¸…Ë ×ÓþÈ>\æFKK‚É“}Ÿ‡ MÙ÷»B<ù9JÇüò ¯s=‹ð»š',Ìu¥Op༄7ÃÿZÂÛɲUvµ Ô;OÔZæk…Ö6„Ú}¤q¤-aG[*+—ñêc@›á^26Îj(ó6Z•.Ýic%G§V( ܇³ÉbÆ^uz*Š9œîMs”‹½üßÈD}Í”[—ŠÃS‹ƒ…°é"šÓ“FÅS6Zühc€Úüö×d©Á噢^ÖÆ*º“Ô‚X4!?†ˆíê÷Û˜U£´SÿQ—™nµÚ*o÷‚0za ®b†.¦Ä&“™fˆj«´µ¯]‚8RºBš)üÀMëÙŒµ ^m&výø©ç,õ9ì’@¼ÁV²ÙÁ÷Bû€6ˆ(MKÜ"xPAëã*¾ÒÄl·è4å¯?_)*<²å5ÌJl&sðWK¨¡õh¥—2‰[Ùþs͘2%Þ¥1/0^,„,¤xDÏÔ£mC] %®)CÎs´ÇOS衚ôΦèb.sICa8{qx§%CÃuÜ5€¾ÞYXâ©Üé'À/¡.·‘¹C4˜>åçà­R¤˜ßÒ¶’¼ßüXØõ%¨Í*MV¸8‰›7ÂÂ%* s4ö†uéÑãÊÍšÎVê¥K¯¶fþ 8s±/<Ïgf9ÞØ%Š€ƒËN„ÌËú £ª?çôAŒ …¼À´ýÖõН@òaÃÞaîþˆáYY!#ñùΠ2lœGþ¾Œ+â'¿}íîÓÔ*Ñx žâ4õ^¨˜ñ Í­†qV,Qü[ÕXŸlÀtŒŽ±Öa ’= ÊÜ9ª¹¡$—p áˆ& òïl*äÇàb¤†ÂÚû—xž‘luµf²¶®±æñ‘È`êÞ"æ²xØ`ˆ5¤º¥Sk%v~ iV6áw<–íé¥^à.Å烂%_Dݤ‘ÿ.N´¢tW ·ÜüB?* ý†±rôÔcèÞ ôSh$mÒpv_ŸãûO_³¬Ë!Ø‚`»^æ^M½¸ §x¨o›õA€Åm¬­Íîöè~% "§XêÓ"jêþyðÁþŽé„QC§ÎixCNÔp "Qîj÷ãJf~ùð‡éOšÄCXnº&,;jŠ ¿šu\ ‡•Vů© ö¥þ/$ÀñU_×âÐóà®Ô`&¦ÊÉU¤¢ òx×c¾ðÆtéÛ®ÈYIpp?{|ù"”ð©®c"@)o”0œ#I˜PÐ@VÏ7 EÿÈÏràû‚ž¯E’„žŠv”7¯ÀÜð¿ÈS¿³•™TýÔÖñÆu®gmG¶Dµ‘y†.Æo9P#š1¹ðnx~ƒ`v—Ç¥(ñjÌÆ¨®MU£{¡ã!7ýý4Th¸‚°‡¨ìr%=æ8^ô~Çl ?ÝÏ“‰eŽý/™‰YüÁ­Â]ôµ|a+¦3¹$’=š€R°ù—6Ù[´fëèb%,Ù÷$ò¹:²<uFRûU7†QbSrÿZ/”ã'–ѺWÚ3¨1 1ÍŠˆ†–ä£ ä@½YFu•r– £' ƒøÒûÒm• ™µ›Ö”‡(i¸já¾øß4Èñ·±ý4Æáðs§ºrw`×QB|ùúÅê Kß‘Lô6ÓÖ®€.$²Žít“CÍ„SŸSˆÓz>Å©lg:B.òuÜNyH`l\]Ûoa[±Ñ¥S’’½z/Çg=†µ{U_x hHןhúËz?k<­‘"šS½Qæ»À¢Švø˜Ôt,]8ÊáeÕp}þæ™5&¿á· ž`÷àÖÙùƒüŇnØYnngï±§R(¹.SpaÔãÝIÓ¾ ¨¢sµØ)}ª\OC‰ÖŠð´©Ã1ÊbȲÀ¾psØbÕþ‡wMmJí±þÀâ–ØLlº£Ã  ´®É71‰ŸêÌÁ«5‚,¡2Ë@1µ)ˆ…Â`Á}Qe ëG)Ž>J0’à~íùVÓö0ÇiZ»©fU{XCÆ£Æ#Í™xáœNhæ#%ÎmT¬òsú)kkA·Ôv|€n|){Á)›¸†uJ¨f7@Åfbï´7 “¹…M ,S»y?é^¾ý7ˆläÚ°fÍ*g"]»múí ffÿ¥Ù‰ò ã6zy^b¹·ê_øÉóó«NÞ ÄAÍäw»á?þ} ’Ë E™åäÞÇø ]Õu©õÏh—Ë®Þá+{€’¿¢p„^W°‚üÀÙtôû¢êÚ4c;id±Ä5»å²§>w)_’qW«qèä³ê ;|y7-%înm›ßK¡îd'5úÆø…AâèÓýa8 þ½{ºXe›Å×<˜gmÖ±Å~Þn>±`Dpsóè0,‘k(kŒNb¥ïŒ tG)^ákî\ÙŸÆ­òò»Ty×Ïh} %[™*©aÊUTýÚæôÛY9?È*¦&#Ô§Zð:1AÎ.%¿ \ÈÊLj5.ýZO™þb»µ²¼mZ“B; Do.19Ñɺá6(E8·‰™JL↚Ö<ºYÖäwåÐ8”ðRNÝÓîZ.ð«!¯EhOúÕT”Õ,Ÿ½`†y=B¨BŒÚÛZº¹ª'žÿEÇhƒüBiÇ3F=ÁùY®0®sÞŒvÕ,‡ôc.V0TK–*/Ž?²JÅotÖ}|ï ‰iX#½©H þƒ¢ÑX€³2Û~÷6ßvnÌuÑð½I‰Å¬zΡËÉbÁ.:7 ÑMZ f9…SæÐBáªÐß’StQ½tQ{é*Cq%Îå<¸ ¤Ri"?ÅRà+È ™D{rÄ̵4Ít½¤®òݧ†ÈW/ \SegÏGð4Q»why±•·Oˆc­ò7Í–/a¿v(•ª@ƒd¡Pw ÷¼³m>– )¢Œæ›™¡P79X’Gí ¼À–…îØóžöºö\’ eèûùÐ|GšS˜ñ.ØXkŽvè)<¹¼Ø•`ÚÝœ† *‘ÿê£ía©+üSÇȳ§ï(yô#ÔËñÝ4ŠKíæ®âyÑ„¾0Œ3,h@ÄŽëÂé™z¡"؆‹Ž&-9¡ .%$Æ ü]ŒÐo,¤LÜ!9ÜØPä»àÅȉojÿÉGN()'ÝNž2¼÷ï2qßîÚ®'ŠÓb5ÂÞ÷ËÉz“Šó';»‹¥"½‰+×&Êð,Ž go ‘>›9_û¦:u~ÌùŒ0x©WߌMn¾¸$º¼\Ëœ ŽT8ñ¯HíÚ¾;zÓBû\oJV>ï%€¶VÐI'>;ä«H¡¯rãŠõè®r·e ë™¯…Ê3ï³fy˜Æ5úzpªº¨më}5’QBjÔ‡*^—f\ßeßÔK‰½§x¾éÌÉþpôÈF-Ÿ„ÐeüÀ’­C9ø[géÏ Oí}ޝçiâÚ;÷Ðæ·ÃaýK«PÁ)œQÞÊë7òè'°mF÷À8¼6粬Ï*pêV̺µ”zóËŠ‡Þ¢ŸDÏ»ìa,ÑM:MZލÈb‡>6kj”,„ã#}3h¿tʰ£PÔäõxÔcÈ^Èiÿ­>÷Bd±›Çà¼!R]pj6…á©þ‚ÚÂíñžw£´ –îæê…`Ên–aÈLŒå]k¦ŸÜ©¤ýTâ5¶£)µ_sTƒ9§‚HœáIçÙNÊ·˜ðogý‹›í:óp´ß¢£¼?)fíè¥óä~S4à„S<ÊÁFovŸY:0Sª”v8}ô}Éãt¢ê醚I+¼ùŒ§ßâý°ÛüÀ©šïÙÏ5¤ˆv|.VjÑš€¡díñ=àË–JÚêLkN)þç&’œ†ÇÆbW–ÑIèETåÙ‰á\"»u¥»ˆ³’yÿÑZ|˜¢|×Ycè€HOJßî99a}-b×’C\½¢¹„‰+œÑW@©6¾bª`d“<#k7¢„Ÿ“0æ"¦ºJg|™ã0‚²„b¿vÐÂáÀc¿ª‚o1B€I/ïAQj˜!jšA¸gèd-­È–a‡¬(J„ZnãMûlO®KÞ€Q-G¾Õ j7•N²5›€°‘7”†Žw½5Z¥ œ=Å|H’¹ãhi)}ÛŠÕ ôö-ψ ’O?¢&ó é[yõ‡•äl­+Kô´ÿ™TCOggSÀÝ›O!p$çÁÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÂmäïlYE±Pä^ëL¢gqY!©î)Ã~w„fÝÇšùÈ'8ö}’i“Ÿ‚‘n¼·ÁÕä/ü%³ û~ árWÜó¨+ù$€0e‘•¾N›‘±ã—Þ""L"‘ºW¸ÃÍ™ò†Ë|%± ‡”@ÀÇcà³i,–äG­Do¸×¸¤ö69ýGÐÓPðÊ…ÓÄÚQ‹<èx¦h^»E% ewj¢ç °þ# #VÕî ÇŠ.Alçÿz÷ ú^¹~ªW!­\çáçyTÝ=næ Ýü›vŠéà¨z8îîÌÅΘ!«£LÄ. l I;GfÔs‚˜i¸È‹`±^±»‘ç_ù+èVÇ{#»Rëð^r­CS‡od‰Å­¨U ;V@Á‰üÁñÇÝ'¸¨`åtŸ³j€#jøÂéš•6$_¯‰7q÷+=ýÞ&%¢xõ–Kp/ȱ§'! ;S¨¦ƒÉ¸Ê›ÄïUMÕµHI¯ÏŸñ€pàuãRç­‰øÓxyÚc1ý–Ü(Ù$ìL:-t'r°è’#ŒúFø9âèé}†%Aa)7Ó9+¯š›^ÓA­ó¼¹ *ˆ¥ýt”¥Æ}8º¥Eª•…ó€·–ÙÊÊOU 2…CxÂ}¾T-Ž$W`$9ǰ¼'&ËÑ4e·†8Û :Ÿðµ¡µàj‡¥?nˆŸX†ÚwWVÒ›<"ò=I<|~×ÊÃþ´ZÞXO¾x<ÕÙ&‘¤­Aan®ë5û ²»êr¿—$1V¶¢Ê¹¦—µ¸kûˆr ›n²$)üÀF]äJ*Û<9Šî¤F0d¶EB5½Ü‰9¹-sI‘Fì~™r6ø˜YˆÞI\Ú-!ÌßÁmFF¿—šôSî‚€4˜?ZßÃkž5ÑP±¶ÞÁ¶¼%KÓÇ¿ÌQÚMzr¶ð`?Ÿð®½â«ˆ”N–rb-ò«ÂxÚu. }DqˆÍÚgÙL8Ã…ºY×^dñp¤3k‹˜Ÿ©Ù3úJöÈÚf~*=ššôfY*q-Ö’“àIµdüš?P¼§þŒ}U&Å¡s¡NÊ˘IÎû1}¹«‚^QÁc£Ù·8Azj¸IÛ‹i % jr¸¶œÂÈÞ>1ÄlánѳjtÐHòNJ¡…Å!ùYÑ1¬p`iDzßoïwØ6Õ·jà+jyÝÚ®ÚqüÁï5zY)¥7ØÒxÅ ßqv¦Âòs8 f›J°ÊQ½ŽZ$úéó¥Q1wL9P[Ýûwž—:s5äYÀfN˜Ïíäk>og¯l€ ÛÐI-A._œóVÃìö´àœ3FT^úÚfRež¼»,q^¾Òäbæ>ýÖý›ý@xWµ÷ËÝšá.š˜Ù‡+ö¡r;>ÿiüÈ5ÝEÈáPËjîͲ?u.’xí—†áÍüq/ö‚½?ñbsÿE ƒa¹ÿ"v…c ;?-$¢“59 ¬Û[©Q­CäßLðýÐ0͹fk¼]!ÑÑì&ÚFPœ¡* †—H%ÑKp¥ZgœO¬’Gb $wÚŸPMq4LǶfä©@iÈ’]Šƒž6­»œ1hÿÚýüÁ¦¹Ú‘'áádÃc¥Šúé~_ —£<ƒ, b]‰¼Ì¿Ê@¥2˜5NºæîÜg[— ûuš è_[–à˜H«ÏDäQ÷ñ+»!¨–V¸7¥ÎÜýQ„—žÑ®§ºJ M!)Ò%“?ÖœÊf nK\ËÑ>µ“ú J5éé~îN‰Ê-¹LŠI¶; yà¢å߉zÇ6¯“éÇ&:üڥ˜¤5²=~½gåŽæÎ(–¾Ú“_ߟÐÙÎJã»Ëã¹±䛉ØEÄIj8ylïÍòÓòíÐÌñ@áj»[mJ46kl¾Œï_óq ĘÛ±½ßýSÔ„þâÌÈ®TË_ò÷éä{IkQ£|VýØá¦ÿ…üBi)DwŸtNp¸zO„qS£«âXÁÜßTè~¦Jª»æ’Sœ@Êox†Ž1­Ç$ÛÀz‘§èW´ •aØ'ò´±n}Þÿ»¡Þ[·ØçÀ”¦£ïÁSDmFšµÂ¶ÕvD¥mv™:ŠŒ­Å*ÐôIաΚ×ÛX鸯ÞßZº{Hâ˪kOca–uXl®—ÿ9mµï‰j™/1M¡ ÆL_¬9–ºR"Í“wø3„F#yšâ7:è/ï´l Ñ¥ÑYÙ†÷ÓË=ð bÔ#³U4ŒÐ¶£ä۾ƶ\¶#¬“†“ÖªÔÔ™áC>Œ\éפÚ×)#‹„›û ‡®µƒ'[Žzë©ÅÁ–ü¿RêøŸ2gª×4ù ’)Q¹Ö *M5éövp2£}>°á ¡ÉϳÇ¥jr.QÓ• çýY®kSy†û%YB-Pƒ¤¸RÕħoñ^uÏÛpì|a8„=`8hêµ ŠAŠà>Ÿ,3àè …h¾È?Á¯S ]ô/;£5¨ ßi»-·ýżôO$BŒ¶~¯Í»mMý\Æ âTzÒd®‰·á3Ìå¼ |hœ…*áTR zàWYRÑþu[:`®Æ©6ÈkýÐ_ŠØî¸˜‡a¨9¯vÙnZ5¬K½íHe×ííâXž÷)»tåÀ²¼–øªeXH$ó8áѸù_¶µ°1"G9Ð S•…‹vüXÂ0*ÒZ:\=QÀ|÷ØE/ë*k…zcêo"jqA:W"Vé@s¾V¢ ·+š·Hücþš¢÷ÿÝŽN¤6Pí@!9…•:¾¸§„§ò¢æ )dŽþÒ æö½æ1,þ¬³ÿ³Ã6 nï’‚h5ÈW¶÷ÌHöD/·Š³}LC+x‚æiÄt¼ÚyÑm ‡ÏŠÖÚ¥ d”4}/Rª‡¸…fgz¨zàö~¾l.-/ ’ö| `Ê?e¡OQª¯å-ÊÞb¿»}1úª’s†|HòŽÄÞ‚òQUz‡D¡ÇŒÑàeÓÔÈU4[/NOm¬êèÃC¹þ­d`W^д}'DQÍÓƒ´¥Sú¯¡'Œ.„€ïëª~K¸ suÃÝû†ÓüŃí@°8̪ÞE8$*0zpPÔâ’‡ð4@GëBn˜,°Üe´•û]v­(Iµâž2ÐCÃ%¾÷9Uˆ'¾´hîØ Óz”üGftÃÆ0bàiiWôÊ’¨]ÂV¡Ú£Ë>)Ç›ƒ²øR/È$µIæš9ã§¹Ö­´)£êŸã¸‘…5“þƒŒ†-B)øÄúN9µ·HÓ{Eƒ/_¯ésð`4¤AîoÃ<—x<ñH{©@š«©3k™3I¤mÁ|/AY0­\w;©Æö´óAÚÍ•6vML“k{Í™þõS2°Ÿ}¤Ò/÷Èýú{ó{F.kƒ`»ý,àíÈYmÝˆÌ /CµzöÓÿföÍÆâŒ8¿ü¿ÿ°p4oVÒ³íïæjÓ<ÂŽ`V>]öÆÆi㔳†Žãxµ<ɘï}‘7+’Ëìz‘S%‰ˆªÈÿ™ÿsSÝÔ‚™ë¥fSŠ`tµf¸[Dg¶ 壶>»&ÔSŒ'^SRŽ¡§ÿ]šU9yæé½` «ÿÒÖOÈ!/¼ö8.4n t ´a£Õ/•ýÜó‚6T!Ç‹#‡bú_õ\—¯#¹”AÒ{©kÕŒäÝKüøNø²ßÜgéN' Ÿð”@ à D Ù*þÂ\Ä<`x°;׆åÊŸÏm¡© § .Á]:ö\ð<ƒÓÐò0s /žšÛÖâëÀwa-¥Ÿ \¶ ~´TåA ÜBÖ7¨n_Ý€·b]áˆÇ˜ "º?¢yüÙè’NRTE³ë[ ü~ 1S¢ÛƒåzI‡?£˜o’6¤3TuƱÑò[®$Œ]9R\‡ŽEy¨nõPYrŠû¯¨‡ Πʈðº/Ý:ù‚PrÙzrü8ú ›Ymg4¾5ÙÂTRâo‚<—”lWŠÅ ¦×'`ç ÌŒŸ)}~fb‘ɦÖDÔÁ·“ØÓÉHì׫Õm‘¢ç…ãJGºè‹ª£¾Éç2c ŽAwXÃp6QÄ•ÒÒ= àöÚ1üñÚV ‹øHW;\¡Æ$µ=qÔ,]™|Šˆ‹þøT÷¡Üí–óù‰¯â‰µÔRr å`î&5îöÞÓõßõ~ù¯¿á³EËeõª?Ä¿½Úû-₊Fĉԉ!oH&Ò🸫üBh¨ ©*°n8C r`¾Ék‡¼§ƒ®üãŽdÞÙ÷ñ²èöúT5¶XœWY|*.pB±@HÈWúEÈp8¡ø¶)Ì+ࡪ\ŸsÚxZ‚WUÃlDu¹ôê>ìùÞZï›o•ì(‰ÚZ=Ä×6‰Üô)ì›Ë¿¹8«bAS*HP¼ÆÜ¬Ì…PoM}ï èþ 2ÒŽp ëŒð¥óŒ Ð V°² Ó·Á$å¾Ã9Þé¼ñybMRÕø{+ÈYûŒTOÏÉ@(µmhW²ûÂà\ŠXà~ ' ÛÝ7cÌçÀ6­,-9 zQu”lRbi²<2>Y8q!˯¸á<}•,Ê®IaäU NDOÎ¥îªIóW ÒIy]>f¶Ök•“ö½üÁÁCÃácDáÖïk¢¥i˜°À‰Ü¦éøthtëFŸ‘³«mM® 2Fe*wâF’'•£>,U¬~Ù&Ðér)†¦þûØwŠå¢¡RkÚa^ÞXˆ©,ùP9ÂUóÿs]dk~N±Øcb.(È­ „ 2vr(‘¸wÒôK‹º)Q9wtòŸõ¦Cßâ©ÎY´M~—­šEޤÇü”ñðG‹& ,ài­Ç¼U™¸!| ó°{DÏÄŒ&æR®ùÂÙS¬!”,Èa’†]jÇ á¢úI¬ÏDö¦4g f{-òÖûlyD.B ?4بÏ=E½¡åËŠ³L^¾<›> +NUGAyÿ{, ¼Ö~3ñ¢ðFP8{´¤jÛçó¤Rsp¯´†üߦƚ™Góó&4!L'n-{YêKZ™šq !1âw>ù¯UI;p†PÂK“F‡t¿vo‰O#¾§rG¯s?î£L -GóËÒe³Ž è€ÀöVYú†Œ-£U{wd µtµ–c”ñ!ûê|ð¯Ñ†e$ÄÍÏ x²W„H~©;ñ“"WEÍrÃÆàÑ(ø–]/¬RÊpÓ1H~[ÿUNDªãÛ¯Ý×ê0ÙrH>m%íÝWR$¨’‘äRž‚]´u ¾x¦O´|Ï–øÏŒ£…ß‹§áqö-ôq|z$½˜‹ös§=àEnq‡šîÓ¡áã¤D¸yƒ&®,ÿŸ*hù|lÁnž‚y¶a÷Bc³z΄ ôÙ»‚Ø ÅY9Köÿ›úÒØÓ¡ÏŽ.OggS@›O!q2Øÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÕpß\Žƒð¼Å~µ[ T@MÓt¨ UþŸˆ¬µõcùKÜ‚Ç~ ©ƒ²XN+ü@N‚½I 5UÉöMž–9®+C t8ge”ƪ]ÜÌ 9~<¬É •ªÉ: ¶ÍãˆIÆ# ›Ý§üêÖÖË™%¬!Õ ”4#Ý#ÚÜã4$î~ø—«-Œ¾Ëáy¯1q— µÉoyÇãû_•@°äÌí/o²íP7ú²bЏqIØp’y¦Kᤧáç1¼b-@ óôÄ™Á-5¾¸v'gö>_þGOÙ¢ŽÊ«´'7eÿðühr…©†KG‰ l%Ü5ï7ùio‡Šþb§ïN9$˪44ivÖ‚†ü×CR¹­õU¼Æï9p$ê;×ÁîC.¶!¯PžÁ¨Cýämbgx¯+çBö:Æ¥¢–ï5«ŒS²šó0ÛÎX­;FnáÉ@ÅÙý3ÝécüÆéE"9e­g»ÜÂÖ=€7Ž1Ð;HHþN-Ÿ5ÇÅѵKË]€pómÚÓNÛuÿnãÊ{·ò×T6ÑéÐ쫬V¢nä3-‹& 4ª— 7À+æ4{)Ÿð´a˜ÂYCx-è+Óëîg̥ˮGL»Ø¿šïÀÄTÈÜÚxÉ€îÔ 7N?²®BKzÒLý¢ñ½ãËqKÄñÙ$õO‚(UZµ€Ñe1=Ä´/uiý}èq[#4Ô3ý—P ñrê{7/ÍÙî:Äh”¬y‘;:ÚÔ郌-½3h©¼V„yMĆX2QAÔ.pSa¤9[L‰báïJRšg5?»yoAcdJÏÂÛ„ÿž…ÏŽXÁÅ i•üÆàñÉÀẠéÊÄ?Á‡©À¯åWìHÚA:l±r'j%w¬GìvްºY+0i¢‚μýp–´mç*—ãõ)¯þ)wóLÜo‚¦Àlf3kt(©¯L›ù®43æÝbºßÄ##VÈÛKŒ¬Ô‰Ó•×ÿrV1Ò÷OÒƒÈüθ®Ù¢!HÞ“ÉÈAC:ãüwKó|ßúØŸ³ˆèÁ1ö¶^XFôLi¹ìéÀN)ëv¸úSš’í'!KO剫;«ºûT¹yZóx¸ Ñv³Ž‰J¦ ÉÂÖ)88·¡<\`È™…ï'¸hL uî’W%Äð NÈ‹û‹g§£Ž?R=âÇ”§{âý›L¼g0K#yÖ_xˆyIóö¸a…ýÐNÆÔ`YüÆæÓw_ÉeTœ7ùN\Ù`ÞOp>Õ)vE=Ù°õRÚ®Y©Û7Û¦i¨ L6 æØ Ð8 eqF\DvGæ?=îÏɘŒ8þÝP‘5&` ÌC§cŠ:œë4TP$6o”l—²ÞˆøæˆDÔ%3.ö÷ÏvY•Ÿð]°z’~.2ß"îrD´-¼ÇüVL“Ïõ©í뎣mO°×¸[qC>’…^üvw|½/×]½b¢Ÿ©ºv¾²©©)!„ luà¦f¥d™ "Ãܧ4­ÙQð£µ2ŸYÿÔI˜ã+ÀVú+œºQž¯~ó-–ª> ª2ô qýøÚåÔ8Ò¬Ñn?ì;Ùz|rհز¬ÔËe™Z6J1cÕ+•Bô5äC4™üÆøê†¤@•.'¯]õ$fÚÇŒzË"Xà ¬›BKè†(æ‚¶ÖÑiV8Ê›õJ•¬nb”™w¦>?(ÌñÆ]q ¨PѽÀ óh ¡È¢Eƒ­üBÊ#è„V§ªŠcáEØÍöÅï.Pƒ’³˜‘(Ã]*—ËÖú ÜŽ{ÄI'‚¶p›¡äxâÆ¯Á÷Ï]SçºF%¯íÏ¡Ëÿ¹9½žRÊÌ, 4ÍSû~NÌ¥‚Ødü=œ(Òp·=º™ı"ñõÙB¯ÅYæù¸™ï˜Òèxâ¤Ùwð`|fÕÐyáæº¹>Dø=ÉÆ·ìRÛ⟷êš!­¬Ç­=Òñ.;ÐáŠòÀ¦ 2±Wtl%æ„E¥ä MZÅhùüÅ|<.ñrePpE $siF½[µ°Jqg ‘´Pðû܆ޮü³‚4FZ§u¸å†ãþ”!Nt%ÐÌW&xµW>ªb аóôa¢•Ö-è"iÆå²ƒ#P&äò¾WDz•´ò â½gß ,_ôijltsÒ1`¨FÕ›‡'ÂuSu$±a‡6^ýüÙ?GòªtQKt”<ÏÖö­Ó*ì#îDnæî€ŸtA õðPdàñCòW÷mº àHpe=ˆw`ñy$ ~2Þ}^É0gš¡.³Ô¶óVÓí[ö®oWw„ƒKT/šgs Ç„‘ZeT lc>ê¿Â$:¼úrê/bµƒ–\®P×—r>éif.A* ê‘üÂÑgMCÓ¼MŠ]µê…•Éð+å t¼A'p3–!Úü¯V2eÜØi€Hx°•82âB$Èöq9ÉZùØPjþöÄiо¨õ$¾Û´ÏÒÎøaR´ûŬxçlQ-/r¯ÝqÄŽ.L-HNLÇuŠŽFÁsqgÂÞd.y\/)çÍ ¾#»£pÞÇió:DRhäï°ë=¹ÒÃñ’2^i øŒ¡“íÕ.^?Bx¢½¿ùJØ“—¼ÉΣ“S¢Ó†!!#çý½p &ÆŒcÛMC6¤„¶8+šÌ?HGsÒÁìû奩~…Õ~eÃâO@v[>¡õœêã–¶#a«=JÙª2‰È¾wÙ&eFù–Æá‚ ÎàfÕüÆøñá»æÌÄ^‚”Ö0­ëË­2#>…ÎÙ|6»cË–Ó8£)=—l ‚ÿe÷·t úÞKW$ÕÚfüɨö°8,®¹˜M8 ˜ ÇkÁë2]˜ì•àSweÄËŠõÁ¸_p¾ažt#*LäÂëžÉEß4š8 «”Lé3»%c<—«W† ^iäyR¾ñk'‘Fç.ìœû™"èØ#ßÍæ qÏÏÁëzª8ß ›ˆeÉ=>”#½8$þxó»Wox78ËcÏ;~<>6‡ã1²¤„â bÙˆu.uh´Y¡o¢­:"_¥/Rj »Ó]þÔ4и\?ÕÉÖOÈxj÷Ч*ºkÖØ)Çﱌ݇EÙ…Ronß…C+ÏáÇAüS¼ Áü¢+Q%䦕L¶ÿJŠó‚ÃcjlúXúZŽz껵âDh_`XUbÊÓ0ÐçÜDÒµ¾¥ B“…í„ -؈‘£ë×!ñö¹[ëðûúØpŽ$P@×÷¨JuÚmA.õÌÓÐVLfÓ;E)™Þ» ‡§·H©m G€™äüã.%=·mX,Ö*@¸Åëšô!nh’×Á%‹4ÅùŽzƒkʈWbã«ÆlõO]¹]ys†æk!ЬJÎ’‚")›xýÙ7Û›h]Q€6ß}§SÁy¢«NńƒqPà·îJäÞŽàE¦«ktÖºžè(íÀwåµÌ¢ª…kI²¬Óœ<‚M̽d;‰‰¥ãAs÷©b·¿.ß–z¯üRâB+(nÆ£e`w>^ëM§ÖœïîÇ ™t=,¿0cóÌ5Po„Q+"µŠŽ§8µ k·¡÷Åàs,FïC?@—*K×¶$Q/»ÓÀ¶a1ÅïQ‹AÏ1·I‹o©ëâ$ο[Œ¯]¬E+›-Fç-RjÓ/:`&NK>ßÉäe ¸Mñþw§¨U‰P^Ìsº¹Óì#–Åz:o5û—¸ÓcS‚3~ 0Ì·C Ê ñðÐâ" 'úö*„F3å`–‘?§O—!éÇË6Mº®Ýý`'EÆDðÎRH•;$ZºÆâJ–ÊѶôKÔá;Od[‰Èr#ˆ„dTs–ÛÓ¦æ3„tƒ%É0gù«ßÛNÛM ͱÚ!HDºŸÛÈ€|Wüŧ˜È‰–Û -û†ÌþÔÂiÁþsØG`«û©Pi~¥Qi|·Ô–Q ’‡€3lã"¦;ÊŸp”‚`ÛÐä$*Hó¾¸ÂM]x®}UnÚãN'»t¹¸dB*@Å!ce’Å¥8™í45äôóE Yu’ÏMšÅȺ`H[ysèÆGÙRï+6U@¹^¨H¹3ÒeDoýIU&ýOggSÀF›O!rýS©µÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÅ¢o4i⤡ò!•Ô¡h/{óQö”'ü„[ðPóxò)‘5Êí¬»8º¢‚Ëýí:ÇpUP^’£ÿ·vöÍY¨:Pã«Äåå„Ç–wò.æT[$Ë•# }ÊœÏ?€4.5Ö¬ƒŒ¥žðvãCÏåo#5fï?L†<#.“Ã@/\ Œmµ3?„âD^CC:°A'À‡”í˱¯KdËt!&êiÑ›3K“g[-LZ“J DIzìåáÅβä’IG ˆ¡˜/Ð Œ hû$Au[³ÃrÄá.O®”Ó¡ÈT­íè Ü<üÎiPÎÖ âÕÂóˆ·è›ÿŠú<­õ"¡¸aÞNw.ZzY±Î+jIVVDASfmuÝ•SÛl2ŸÂ`½hÚíÔåüRïðkÊ‘‡Ï»€v-Û’‡©B v(sé•Q’þ&éþ˜FšGcIgî3³Eê‹“ñ‚Ýcj%ÖÊÐ¥ø"jN)Jn ‹vTr)k_¢û,í`Ûs¿‚4ßé9dö^xû„™XÃIí2(c¼+xFÐ t®ý›Ý¶Gæ’UŽ9þwÓk*¾3øˆ:àäëÈk¬Ž#tÎ,¯Ø¨† øë§¿#‹‡¨ WÌ9ŸN?+2²û^¬¼ÈÝrÌ–o%%–tˆÆÒyù¯æ¥b<å_>ºjh4ÞìwW b W&/¬3Aüò;Vq¥mə꽵QL¦Á(˜+â‡lATÐÔieÃ.ùûËò|Â;ŽcÕÕütš›]F¾7®-w2,˜c¦Ê­:=Ùò+ò‹€A™IÕEsxðò±zä~¬¼Ëe†XÕ4¦J(L sÊé§I~T:\Ãée[{RV𣿅ÙjÔ"N„dÍo¨ƒ`åJE­ûÞêÁbØßjÕÿˆX¨¤—;·Þ$L >oXÎÝŠ°˜1ý0¢ãŒc}”e¼«X‹F»¡ E/ € fb”6ïì[üɽْAB+ Ëñ¸À—Cpæš²*¼ÙÈ,o¥P‘F•ÈO‰Æ‚¡¸¯ù8äèÁ#ëœA÷¯v¥ÑCbpûl±I¡mvüñ«SaK8—BWdÓé7ð° ƒÁ¬W×¶4:;§¯†p­è F­’2ÖÄ+ <7wšbs«ëÌ›[i]NÑZåÅëÁîôЩäÑ=ØxW­&‰ÛxlU>*®kø™§ÙöSðþ¸­óO½2#vœ†Þ ›íCÐçöóÛß\µ…,œÏN(Û"¡SÜ(c.ì)\vDÏâǯç†ù“§B!%\XŸ™}ZΤT;3?#x,:Ð3ÄDÿ; ëŽ)\—V «ì›AŸCBñêœÖ=Ó]u%”(É]WDZAS•.¸[4Õ£"•Û‚Ä%ãgpžcþö±">ÛñÈå×gŽ~Bâ¼õË·cï&¾G©A‘@ß(ÿÃLµiãV€ÙRTHè£ÊA»|ò$üB? Íû½’O½ nÓFµ~Œ°Q²kÿ<»L8ð]¤Ö>¾ŠtXµ3×a’ß &FÁIQÖî ÛÂ+]vj`:tÆÖúùrK$¸Ç´Ô·LÈÂ%Tk@L\Î}r­Ãâ힀,¨|UGË2 5ÇhÁ)HeîY»¬c¤hqô™'y õèêI|GVàKÃ…{Τ‡Â³­kÃG¸¿¡%©ƒŠÞÂÚ˜2Q;³YB·‹” H?9ruÝÊ—£,ß1ã²–Ú9NxÙÏì~ð½Æž)EÁÖŠ¡¾ü¯~ʈÜy7éHè¥Qf…õ[³­ˆQ5Ô÷ÈMWƒ¯8¡‚Õ«À€Øƒ$5³/šF§Û«È/ªYE×e×zBo7/ål!³üÚÖaCdWÅb-µ}!ïðÌáºä_¸£càÿ—óf׈Î5nš΋ÀÝ'Ùªo˜—bWÃV'•ž°F¡ùŸÀùòÁÛNQ @² k=pN8óŠ}2¦ê¤Ð„„ÿ‡6˜Þ³YãD»ÿ|ôÿ;i÷»zÕ”ûØÈYFó¦m#(.^SNíÑð?ÜdÚ„ÿ–Ç£¼íËÊÿúÌc-W£-?·Èô;€nŠL<€ñ`›Xñý^»ÕLÁjš‘Ž¼œxð„²#6—;,ŒsÙÍ ‰Ì²DœÀDó×”7x…yz6tš®‰uÕ`t·Ë•h­žz.w'«M¨|@°aöóLós~_ó¯·<§ovœþÒosk3ÜçâW(‰/˯sÑüC­4 ¥…—X öm׿ÙçY´ Š}C $Åw®ÞEá@ÃJ¹è´îÐû¤Ý:Ï—ú°æ6Î- xÖD„ÔÃ}°†îçÛo¡®k=q$ùªêÂ)´ÈcunÉ÷V3A]~tÜgÜ7ú~ Íþk¼£.L¥péPlI”어׫lØPÇ8íh(‚ÆÇ4UÕý¤JÌüK@ﯘéÚd‚õí1»xo¶ÑøéåWü¯9nZ` ×â1_jxŸ‘"·.æx@)/“ŒñãÃ@x°ý…ƒ;•-þVMgp,×im„ÐJ…SE9°3¾‡¬ÄÖ Ïj¢gÅÖ"ú ƒÎöœº ®Ç½%ûM‰‘üq.ê$4|´Š¶ÓÒ7+ð|í6‡¨ë†~E@/åÓ=ëü[7­ž4úððkâꉬg¿Q„cY^ºmUè]˜3¬¹èUt9“Ï/õ=[‘766á @g3yÛ¥<Ú.ʾÞ,fÅç” ¨ñ*m¸ôσÔ~øi<…~ëš•6 Š7°ÔÃgÖ’Dy¥‰È ¦{¦¬æèÝ™›‹:Õ¡†”ð*Àë«„Ân_ ݢΟZ¡f´t5@ú¤—ÞÊYޱšDtþ{¸š[Ûv@hË8F†ñ™¹ŒQ†jÒöˆW¿óoÝ‹´>䊞 E)©0©>s6êºG8q$)ÞBb’‡€´Ú ¥þô[5nX­½Pq£0¹ô““3Ì#t–Ë=¾Ð|wñ²èÚ„Åÿ i¡·9µŸKA ©ìeeÆm¶!¶Ø–p* Z]‹¦üA¬BZ¹÷Œ¹ ‘ÛM¸þo¢û Flº6bë8ÒžòZøìL‡XÉÜ€9_s5«õI,—zC …öú›Íš”§j€誦+åQb °ôX¡Ÿ û“Ž´eôþí¹Þð%ªý^“::1h³rÎ0vJ!ëA-ju ñæäÅ1¨†ømŒÜXQ‚ ôD$ް©~»÷ûw;þ'{·PKµ©§¡qf›ã› ¤³’Ildýð³(hA}dòÏV©—!f"LoØNÇÏ–X¶²# <ÁB¤T々ÞÅÓkuÅ;䎱‰·ß± U c’z Ñ~€ö)H¨Ù¯ñAwÎÁR0ážA>Šž¿?.‚Œ XôÑNÍÙwb&ož™#Yˆ¥²4f¡#Û]üòF¬œK-4½ÌÚíHú9n:žýah¿3m¢ö¦ÏZüšÙ~6Ô¶cÝTä–íjÝE»G¢ŽóÔ+âŒ\õOCãKP5C¦,¡Ê™ð~™¦@¨÷מ϶ð‡/²ŒKü‰ Pð¡ Gÿÿ{±›LX ‘î_ù޶š˜âóûôsG‚"š<²™!׫S¥ë¡I•1«×¢)±„™xº*6÷5$2E­äsýøIÖ¤`ä,°<Á¬›hÃSê[FYϽ{ÎO¿î¡!Ï¢oÅ"`ª,—Ìe“Oêi¶¦E=kÄ@šÅù“4<‚Æü"á¥%/C$Rm ›Å×`[Cžì$Óƒ”c¦ B•oYSÓh‘›¾èN¸-Âç~/Ò‘Á°„üð"ÈUëþŸ»”o6 ›Ì[äKüͺ•ÙµWgJEíHƒ]<*0Ò©Ð ¯zL`šOÑ\Ú®?DªYÓü Sëq†½ÔOãäbüé9ÖK ï…S͇ÖT°G¶Þ—´öqpãê6&²µ›y>-›´áLÄÇè.H Yʾ‹]aIL¤ãlã=AŠV¨‘îmíyMH:Æò8lÄþì²?'äP_/¤QËs¥”tçEæ”P>\‹<ôåg,kþ:ÒÙÇ˲0×q%%Åš¤1…Ù/À{¡êÌ|6²~îµÇl˜G¾¢¨NŸ$;Â'u¡/‚€ÓÌ€Úh7dH¿sNÐŒ@àÒâ(8,!¥7fl·7Ûçq -Ò^)®‘bõ  ÏÍ7U"_0µYdüB}e¶¥"ú« ³`u‹B˜.%Ð_b!«q¿Õü|Ï ð÷õaQÑÅ{L%Ñíæª`¯^BÒɧñ£=? `þ¬ºÐ’·Ñâl>tÂA1¼/ËÓ³£ca_Ÿå÷x^h7UÇ? ®ÁbÔ¬–F2Ë’&³ Vª¼ÄŸNÖÄ-#ÖäÆÝÕî-ùGTÛKø=l‹Ë=÷ÒÑí8ý몫μÒa^€Z¶‚±Rî€Çƒ\KÔ<èÐ$¹º{þ‹]‹qÇTyV2Ûà_ƒ…ƒãp7ÛTÑì ¾ºß#K©à4´~pG~5‘cÀ•˃d™% «¶L´l) yÍëƒAZf|ÿW¤×-~­u“~á6Q½5gx yl»{/ÿ þG}Œü«×;5ýVmàr Çõ714q º#¼ ¨ Å÷²tt¢ãC µÿa†ôŠL矤±ò@³5¿1ÇÄ?<€~‘ß9?ºÊý³œï@½£ƒO‘Û4ˆCGq뻊-%»KshÓ{±st½.§•ÉEÎÆ>üîaƒïø™rµIˆO{A(ï~ ³’pÚu €èï-‰KGú´#˜äu¦ÆÇ=ÒN·ÉôˆÙ‹wêwJA…4¦MY‘%Íq­0˜V¯©Ÿ;$„… ¡#bŒ‚FËß~»èæ{OS[†“A”A>Ò:Sqé"‚&éÞ9ox†Bøt7—s3¡üð矵¼oR¼92™>súÔ÷ÒÓÉ@,'j â§Ùë´Ä”¦6ZÁ]yŽ‹ñZ ä3Áöv¹hYÏ®2\><Ä™û ,êЇ±ÅNs ÊYdÁ¶˜o-uÞ|y¢¢ÓØõ€sûÀ µÝqe¢‚V+ Ý„1ãêQ¼ø"`* Ï`;IÛ,Žb¦! ٱΔäzêµí÷¤},RQ_Í7_ôËÈg—:˜­ë’a¶‚xuU½Ž¹´ ƒk¥ £î"¸¡³Ö&œ9™Ìª¯•”½hF$U3- ªøyQPFe£§KãØ%¯ÿ]`b ÷3‰ãpeÿ{ñSmJþæ·O5Oº'Þ&‹­!ó™}sÚ—ÁvËZa‹’y–/ÖX|)¢6߯k² e-!sìYüðQæ¥7“¨ÚZi§'‘—WO"ü!‰ßþ=ä!ï&bv!”€U‚HÝÇxRÆçÙpeµŽÖ2B{Æ.ên{°ºÂ5ú)Ñ6°>ÏG*ÅnÔ8‡W_äÇ|oi; PK¤·ÙRÌ͛źÂÝäWD­Ûšë`hcR‚‰ñqTODê)Ö}py{ì(åº%Å·ëh'Õç¥\ÙÌò**5<ù:b§¬Ù‘š6 §:®¹•À wÐKˆ; ³„ù;òwKÿP Íc@«²‘°V™’1d¹<¹€¤{·ž›É†.x“’­¸)1»õF$g!„‚÷’çPaxÁþ[Ƈ:¯ÉxX½ª¨ÈW èªëþ\E’R˜ï\%„ʇ&µUêD~Ú; ö²!ڇǤ üñ’cæ*Ì›×3xã2àAåó˽öÔŸçxš=Aà°>©LFéÁc‚‰d@Îx8›gï :ÿT­4ãùu3>”ÚaŸþÇ¡œif{§{1jãe)ѦÞLàDЭ¬¹ï°Ì4“(Y)™‹¾šÝk–c£„7Á5c85%—¥N§à|n®ë"ºfñìL^Sçaq·,Ø<“ _Œ'ç-W3"ñ4L‡u&±õk9©:ü› Ó† +i»EÆíYƒÁÐU-È¢¼ýªÒ:Ùr˜O”åb â6u\_M}Ù p½ôÝÐÌÇühJñ ŠË³kF#áF’*2á „NŸ®U‡ÞÚHVL¯H/UÎ&ï‰Þ„=à“‚ÞhçF_ç<Æè‚°È ¹úG·d#]äÙå•"%¼Èo­‡Ñ˜ZFŸ¡žÊ5–£>Ò®ìÄí¸êã‹06·BVìU1ÉEKæî:’‘uäqFÓ´S#Òœ§´c «àÓçxh¼ƒ£Ç ûH9à¦,»ð`§J1ôQ©`ï–­={¸Ѳ·ìÁìÏÀÒ2_D,[åüò;Ym'4;EorµÞ,É€Ó67•[ñ<±.œhíaLƒÖHJ¯ òüÇÙëat7ƒÓ…î¹ÃÑïC÷$YºwjÿÁöÿâ9rlK{÷|X©O@ªs¡U—³Dz2J‰|Õo°íB–û4툗‹þo‡ÌvQªF×OMCxþÙ?'ÞLºÊ…0Kþ¶¼¯óº ’ÙD%@‘jÂ,Ù'« Qœ ×>^͆Ý/Y HclhQz+&g~­À¼ 3\Zð¦Báàc5~×1½Š.ö_Ü®GÓÈ«–){5D|ʿ׎̟%]Z1 Pf½,'§=ãu3f«EÔdüZá)1$xî?ê1–À\ ™Þ† >Ï51ÂLõÊMtIX_Çi;ë¢=¨Ðhà «Q·Q@èŃz Ç|d`"º‘ýœã]éš-L6 7tÇQ9†»Öuã2¬"`Ò‘”Ü8Õ°¨)@ ®ò™=?q^Rß3\Ûr¤1_Í ½Ç×UKOÜúó5]¸²¤’ÚÒ£‘Dø (Iq* …”é®6öK–(pAÊ‹ƒEHª‘²¬èjvϦ•M’²üû¡á1³õHT^¨¶9èðØ_|[ E–¦f}Ⱦ6oÙÀ=;3L(PܨGß૳¨FYV \L›(1ÊGʉȎÎoó*þFò¦9€¤/=Ž®‰w™¿^ýaœç“VÓõp§üA·(4µQxé î1Õ ¨/9ý²°xžÈÙ&ˆa™ ¶6ô ÓQȉÅ_Öåa×/£cƒl* ¦Ö©í¾ì@–¤ ¢å33,ÝX]ÂóŠ—i¢œ`°Yã2 çKG„GÙÅë¼Ëà“ª,jÅ„¼ÂÒé ¡1̯ì,Bs-C¼V²Í"j1lV¶Óñ©õy‹Æ.ü¤lkáÈ 8ÏÞH°x7pi.CŸ“òšVQD·b¸[¦¥ëúsM õ5gqò˜‚¹-å(ÈòÈèàmÝÁÑf[¼+À¹ü|—-GüÚ÷uõ)á&?fÒQŠË6µ¶z%=«øq.OfÅ;ÃyÄ›;g¨f¸Ü^‘ñÊÕ×fås6x–?¨,@'+8Ô|Ôœd›ÜŸÀÇhˆÌJh:P|72×À\ÂSÜ¡k^í7`·t™qXô~ß;w“è}›¹ÇbÙ2ÏñèåSÿ‘Ø7Äí7õ›ñŸ‰»T)Ó¡QôböÞŒä@WȨÒ4š }Ùx5öŠÎ&ÖœŒ/ª¤éqoRø±N°U>wMô[£¶Háȇ Õ ¥V<÷c;õn2†ý~`ã_¸–*H·>H|õ޾19K¤ðÞqÍ]óð[þ„w3ŸzzTn˜ÚÇ…œÎ‰¤T÷\BM}ô9”tpïå5è 1qŸ*cÜ|c;ÁnC~SüÜNÑ¥x>’jÝá :ˆòÛÅ“ Q´?}Œ":«ŠSfXÌÈRY,î!ÅÍ€gÍ\EùJDË>ë´Ød¥õf$(é!» ‹?*$ʤ3ôŠ(é*(ùŠéÐrjɸ©‹,göœÎ?å3nÞû–ò ;ñ•À³›ïòCDbÑNv·ÓŠî·-,ä3X)·Ò3nÁ!ðÑÊÎBJ‘ë¾õò‚Þºi10÷-ˆÎÜ)uÆGd¥å4I1²¯Y™Ë5ûúÝÝ Š¶þbŽÝ¹™+Z —©8úÃkÖ¼ N€ƒ–w}ÅÅ X?Cpcq5ÈüOF(ö‚Z0 &Ε(“Áá’¨¤¤Ì]¸!ÛÒ²>äÐôJBUitZcmî^R@ŽÇßÙà­ù6œ¿|øÊ¬²zÁøÊ%™}WȘ1<3;ù§ªœÆ nWu˜òe¢££›}b¨|€º–¸ ­7ð:;"fáÿ'<ÜÇ#Òv›.–Jû~Âßò Ô9*vDÑó«4Ѽš Y…aPüíƒç¿/ ß/ú>Œ`;;8ÐØÂï¨6›äûØc.ôÖÞ§à9g¨H~÷I½ûƒî·3’¶*óïVšnÈ‘)—¬%°®™ò²ë»ƒH޾Q}eÀŽw$ Êoj“|`©N·œ,¬/Ê=$Bˆ1½r„zÆþ@]cgCô=²´™'û!mð2sû¢ŸÄ¤~×THÝ]FO²ÚŸiô…Á¯0 î9—L ÂÑ"XE® þ|uT²k]ÖçE'UªÞQ9¹¤ó:þ­‡VwÚ N,î‰YÕ³Â_|rI‚q¶Ù»xâ÷a"(w')xjÀ˜™”˜àrŽ Þ3~ó;Z/¤B æŸÞì$7xÁ‚dŽñÓ$9§O“cèЉ+ÜõÂüñ«TW#f$_‚„v÷ruعG5ÄÊOÛ.‘ˆ¶à]Rø‚y• Ú ˆÍ›?ŒÂ;£P¦§©å^lG¿þQ,×CÁþSŒfrV÷lSP׺IŸ{„ xU,z*O×ËØ!jÜ(µöMÍLƒw ÈÑR/šÈ9ûN,×q\= † z9­ÃF2xßXœiù:fyC¨Acõq­¯ål—­SñÍ¡QL/Æþ6CôØûÁ  ÒŠÃz*ß¾,RI |›…#ÊeŽdCó *4tjdWp#®,ó«T„êõAƒ ×èí?Íp~@³5íγ°ìØÊÇîÌBCI/ŠY@-˜m`1ÚÑPïj§fÜëN‰‘é‹ìU}]¦Àˆ—ý;÷¹ÅðÇb OggSÀ¯›O!t+®}ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üS`ÁØgܽ,>Q™¢ï%¦¤ÀŸDÚp>Ѽn.¨IŠÎ!s©¼ƒ´i7šÀ÷ôÝ–üù£è|1Äô—Ñ\Hñ‚ÞFʉ~úºîNc[9@WVßßÊV®0g†äa¿fðJXtÉ¥ÄDæÕÕßÚ ”‚^âãw­˜d4Œ¾_Þò6ÆÁè/T[œ4 –É‹¿˜e&¦:…€@MÍìÊ#á‚ Û¢㎷,8Ôü"B9’«uJ×\ÅËÁ˜¦ f)ð8!$J/·Bà_ô¦nïæ— ²ñA8í°¦Q^æ8Ô Š=(1Д`Ñ./³…Ò+ô¬o+…<Ú¤GÂÀßn“¡_)µxÙ"á•ü+›¢ dl=í³ø`I%üS¼ ®f¡Lêëë'@ŽÖMR‚m¤PÄêñ º/ŒÈ.h w˱Ç/†y[CÔy‚LÒ¯Ídê_¾7ñ%W•Ád}p„È É/%h'Õ†±’ÜÒÏŸ†º;v÷Ëb m‘ãEZ=HIXÑ_…4—×í-óp®O/:SAoͬèŒó'äQtN‹7Óˆ°rï]‰žb±&emħVPúC´ì‚hÞP±V†OG…vØ?½™dK1€@Süµnzv¼‚ðלW»3!B"%T àX4Ëþ±çD÷Ø<©ªÊ“Öoq [¿“QEr„\I&˜6RÓÑp•'d1<ø"¥¶ZBPË­U¶¯ïWEWž†p¾íSÝé^O7ú¿ÿ §o‚)SÚüƵdƒÚ8ú-OhÌy6ؽH!7ÂyA_¨æYÇe«— k•!-ZfC¯¼î§úƯ#íÞ¨×+åF ,"ìHkÿÛAeÖ â¥Éœµíö*¶¸”°T˜mÙSYû€­,¾ˆWÚ× ¶Ct¸~@ð¶^½ÄŸãÂyÆíáUõÀ%ÄØbzÄôE.±+ݪ¹}iîoci!ò»ÌŒÓ+Žð0\•üÅxq¶ñ!‘qíGu‚x×|ë°hp–OÁÑËÚJ¹WýU ^%ÔGÍ¥\(óÊ\v™õÄ" BýÉWÇ*e*I­@|æñÄ'×{öéh\}\Ö¢Ò5¢Ö'ÌàÍ;,MÀÞû €K¤žÞ?•¤1¤åóÓÛ†Üî<% Fi°_¬ô¸¾‘èVaA={z¿>0;ot¹ÁvD¶/B ¤±PzàL/ÓgÞ¡0®Áî ™Ú9X±Îâø[ÒºAÿRüàiÐ6Y¤C&]#!o´—­ZèSÎ ©+i,K¹…VLÝbÅZ(‘¯¬ ²·ê°»ZÓFU)¢Vè%åÖå{s¾ÙÔ©êõ©Bél°È &Kƒ·Š?fý0vØH˜„Ñ.å½ƒÉæQ»ƒü[:³îØk˶iYŒsä±°ÇÔ×e;c4éö:Vg2D®· ·æ#ÇÖïî{¹ºÕTƒÅ DÊN­Ó©ü¯ÈA"Î ¸ÉÍ+Ìò¹ßÍgq2‚Pά¤Òݸn{D Þíö2y8·x:¤þL¸c·->êñg×/%¬Ÿ<ÖC—ÑT8¹Bæ¢<3Vôh-¶Är¢ÖØ×S’¼ÏìÀƒÏaOšt5c"ˆ2¶mzëµÌ68NàÖ¹¼ÉŸÎãiT!ÀÆKlrp¯¶,$¸ŽÂ2EmðeȘ¿ ~ŽWTþ‰°u®Æ„L²·ñÈE­/„k:§µç½pÇbUáKÆ|wi½ÑùDg”]•êžô£ùxhµDtýsîß›Y†ÀmdÁ\£rv@ôüðL©‰ºcn Ƕê«F¯I™Q˜H³­P÷UÀsÓ'Z9ÂoÿÊîkEœ ˜…Óéy gDõ«=f$ÃgB´¥n•€aWN«à‡ W²igÀÂÛú\a•z.‹|ƒâƒùaÕõsÜ„'¯ÙÙoo+éÿý’òûöòPÇA%°®×‘ÿJë÷ÿše‹«á-¡@¯äžÒ›1£f™æ Ê„î'H& Ðõ¢Å?Ó“bÏÛi’Þý©)£j2­€JÖl ŸêÌPÂÚùTUŽ#Svn¥qßã­4ܺ²V¤ÔFò5òë™gš¨Öaç,ZÝŒyK‹°S+)æ\5Ø²ÄæŠÎ•+´”…Såö™ƒ%åiš% p÷½VÓ´§®~¤üRñ}›b“„Ѽ S Â”tL œ}¾UΩc؈`z6–çkndE¹¨ 8°ùÍtû<ã'á—=îDÿçˆáGŸ%°Ánþ”ñ‘gY¹ haoŽŽÃ’Øõ7äÅ- ªª¨58©ne)‘éBå$.wwc²K­ÀX§˜–ÊóßTÌH®ŽOa.P”ŠÅ.¥oQêdbs9@ä¦C!¸ýæ8Òl„P°€ù>6Ư쑤¤Ó¨áÏI ÒÞÖco†ƒ+[-3èóhh+p—èÀíyÜ_L•H\A­E7«2)Fó¾Æq_è¢U †`…òtÌ ›Ú*ÌŒ2»—éa-£Ô<-MøÎÝw°Šô˜„VÄf(TaÂ"Ö ð4WÅüÂÑÒL­g$º¤ŒÕÄ;qé¨'ÃSEéG¤~€D•j˜)˶}­'éWuùƒ•É"üI2“†*kÞf³Iwhlꜿ&4e†kݽ*4t·ÄÞ¨£. åïåó1"©Îõó}"#2[(ÛB K.€ãë% æJ@ñY Bæ°ÚZ‹w‰TÚAÞ?üÇ뜉¨úÕÑé•Ê Œ‹z˜ Ø¿±`Q˜t-Y42:æjKèÉwŒ¥ÿ¹ÐÀÌê|Þ5G>fDÈ5:ŸnKÁ¾Û" ß8\s8uŒæ/»¾ï0óŸÄå.Ÿ2lè*ãÇyÁÚžy(7ªÇ•Jh…°(ß÷@ ‘ð%BùOPxÏ– †^òmôc$‡’kËî|Òw§³ý©OúûÕ·ŠÓL3Ã#uĤíÍ"¥Ü'JÎSe&÷ÔÆ‚”üZÏñ˜ÿ`°o£|,óE¨ hJç¦@þî÷\¥”{ŸÚîVY÷bª¨ž¾4‘EnÉ+ÖfƒÍÒ*£Ê›¬™>¨üBZBü4ÄQŒ#K8À ÓΑ¡Å :õ-ŠœÔxöòŸxlK™®7Ö§S}>è?™µŒÛÛdFú„qj —!Á G@;‚; EÌb­ ¹ïÙ3U#ŒsÀ—ÆœßwjZ¹ÀXÈYÔ8|]¾ÕuŸ”Ük;¶q0vØ"NjD3ù ð G¨†‚ƒž’aœÆË/ +$£7MB~’€s=Ìü„Éw=Ôû<¬bÎ#Rž<Ñ”mGÆ‹R}Bnd Öcs–€ñ ’LOôN0˸.â)v»øZ¨ýwE5·üSÄÃú”ë&ŒMjÈ{¢ÖAPš)ã«rËŸ§Q{Qv+Q¸Þe¤ÐAâ±ühg6d¾7Í“ë®(ý¿è¬NÔëba<Èõ÷iu~(S±V3*Os@@ñ‡Öh jTwPZ¢ H•Þñ‹Y1˜åùY¦/ûµãZ05P«×š« #źAªíÐÀ~¼øn%œéhCS£`-öã;Œ®*}õYôö)DQäyF½0Þp÷»yô%-NZê{Øl8sQ zöepÁ†>Mh§+5nM¬`en†Ú(OQ‚êÎÅ×ÐAXµ1òÜ!IÈU8«&ülNÊ…wg»y8ªÅ]o”[É1ܾð«Ëº*øUUÚu} šž?ë(o÷4/OggS@ä›O!uh¶ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üA‡)¦0=§9_´™*¢Ù®«ðNïv§ÊÜ~´DdßϾI„1Få´kåáaJß)ðJ^x[Q;eŠ]—sÆüC²J.Šïó\ ¥_ÅÞ8Lk[˜Th‡vé˜(–p‚/g kg–éÝg=aÝ}H‡·yê´#S³ó,ç)[í$`üÚÉÓ ž„N"ûú¡`ÉšáéN=æØíÀ¾AÍõ–wtÄ_—©Ü–©ÿkbD™±ù{aQ÷HJÏ’Uª±¨ßíª¡òIŒO”Âÿ6 ³žÓdÐP‡ö¥å—ª‚„üù¸ Kb~ò/‘Ü/aþõö[ª~ôåÌß:¢«àÉnÚ Í'Å Âp±#àmeSƒáñ#(Òµ±å–¯fëdf›¤`ù|‹¬®amÜŸÛ’AQ È×äÏq“JÜ[Ph¬<¼Î|™yg—ˆ,;w¼.Ê™0cm*èV½aÜìñ"28-ÅX¦(‚8$;xs]4ý=Ñ9‚A^šf´ƒÊUš†Eøn‚s„\@g~æã¡²Ðäåfžë Nc^ÓµH5ÑT²üS½Þ-\áᎊj°®%MÍ@v3›YA­e ç"'K }Ò–>ÍQa‚Gì"–ÝždØ¥ÒkÒg6Ì$"´Í÷2ÿsq龩I$Pª˜¦.ÞþÏ©dF.­دdOÊ'Tõ/Kq̈>ÔwšS" ú8ý©ÿb¡8™.œ»ZuëA2 ¹#I«ýÀ†¦¬È=‹Ä=(‰>ƒÜúv¿£­B7ò9ªíjNgºÐŒdx_­÷›ßû1i˜/ ò^(Š)œ^ŸૈùÅe8 €“êÅ÷̪¢"dÕú,ŽL½Žý¤¬QÕ¾JNp-…H†AÌÖ\¡bZ ¡}Dq7t)¨e ,XÌ béLÙ«ç’j½¶:ø¯þ2|Bì-?®‰ü××^8{»€ßÒ¡¹¶P†Ëà»"¾·€øÁ<>áû$íõNÔækªl?œR?.E‰ñXcY½vD=öª»5>6Õ`bc“Çš{‹8™ÙݾûÁ»8Éšˆ¿H“üRâÙçyOJWñàn3ëÌ{šø„»¼ |D ŽÜuªn9¥öÉsUÅ’®?˜ ¬Ý‘¦m‡ùßS¬Ç3‹GÀ "¹N"p>¸  1D¼zá9 ˜£ð®í8Lî÷zì‰yíŒ9ކ`¤~Sz9M¢É–=1Â…lÌÁApÎû1öÓ›W_aU;‹Š#i>¿j.+Lº*¡ÿå YºèûЈè3‘çÖ¢Ÿ—ØfÝÕ=ÍãêB˜¨=ÛÖ„Ó•øR´Þíû5ÆE¡âÔxÉæì„Ñœc£¡}½:û¤ãÍ7%W$Ù*¦iIÅ’Òþsôú¥q{†%Swk4x£üCf±«ÆœÞ{ž'R±hƒ)²µÆé,P>®™ j§–¡ø?ýü…^i8Ì=ÃAüŃ+HMÂmë*?~JŽeÅ÷wÚž°ç·ø’(ðÒ°%qc[@œõhW‚Þ}ñNU¬%ªˆ¬š#çg/u*:6Õ½¡N…Þozs9 ì\ðÝ “®_Íî9ßO(nÌr{Ä¡ßÊFBÀHn–:MQ"Å;FÌÍu_!‚3éaTÊÅŸLçdKÊC;ÀƒÇ~Æ'#Ÿ>ÝÝ«ùÀóÿ&'žO44„‡.¨…¾‚Ö“¾ðéžf¬Ë,›ÈI%ƒwûíûJÉ—ôk²aßåàûöT•e!ÝâÍL0–ÀÃL:BC‰øjêQj<î«=SÑ>o¹ À¹Á%Ü%¼j³.Šð®&pV¬LѨiþtÃÏrZP$WšÓïã‘/£„ÖbÝüÆàù«…ÛLôÓrŠZ¼h.g: |ÚjÈ®©ø8:¼¥ÿaY`_ìøžÆ7ý¿wå½T„\–ë<*9ƒBèô¤<Oá•’Ù@%Ô^rÞßñÁÈ[~‡êUn_¨©#í¥E°¿¨)ÏýSö(Ö‡•9Æom}¡þ-ÊLª’ðS£”™¿XC×€"Ý5j£NŽ‚}:Øé¶ÃœLÏŒn’‹+ÆŸÑ·æXh)/´×µã‚vn:?‡»4¡y³ë.èЂ9‹ç¡É!úTÆžyüÅ¢T`Z4ò„zÒ,²'Ý~ÁñfK]Wz„°!¸r ÷³tMr( éã9P&Ài9ß#>Õ¹Uk)­Õ¦ˆaPjåÝÏ%Á×ÅÓ× MÎPÐ"sæµÏŒÈq»0vÞ®Iš`Ø!&€NÌÞú{UA;5Ù8F¼„„¤`ß6Âúb$âácÓÄ-1äLhˆ²õb úU–Á v•Çó oŽ_>{ Ã7óR~\áQú EÞ™ø™‰rC˜†Š" úm÷„lm©Ï\°4kqˆ·Ð™‹.Ÿ— „ ZA±ƒXÁ¬¿êH´\u¶+ ŸßûÉiÅ9/ö 4½[;¾pϨ7‡³“hj(0«Aõ›^,ÑN‰•x6qºÝ ˜ÿÇ/JO/h‘u"ë1üC²iñ¾³¶mùr´OûåUÚÀÀb»lš.<Îæïá–Áœ‘›¹…ÃHÇÎsæ÷@‹1£LjàŽeCÏþ²Q·°¹;?öâÜ ’»3ˆæRœùGû¯8ÅØ]ulÎÖŒuÈ¡ãU"˜ºT˜Ž•ñ”bù]›7AûÔVlgpm¯ÙŸDª[Ÿõ+ÛZ ‡»m#ò»Ñ3€C]“nŽüÁ²ýÃÝIÃŒµù,®]}ª©9¤ÛÇ;‘ Hæ1%Õ/²°+D¨üèp¿ïE¹2nÕuF¼.1ݪ›¾x–©¼#éø„¥l|£1ƒ¨Rü Ç žSàƒ5™9¹í]uke…ÝÔl²\¡Øï‚/@m%µe °0•€÷™z¤Œë¨ù±ïžG¯6KžrR}}ÉqÀWA®Ä\f‚y”â—þAëOâv å %u”h8£<»?™#P‚É,ÕÙ4ò௓WÿÆ{%è9Ï"ÒÕ¿CÕuDa6¥ý\ÖçÖ—3Íà›ùC+üö5YËU†Íl2¸I„m½®Î€{ý~?î.ÀÒhº§ OIùðÑ€Îk Ëý|$>'Dý²£…µFæö|,¼ë ‚OggSÀ›O!v³ŒQèÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÂØ®Í$ý¼ ä¡u‰YV {¹pœpŸ­æ{ ØQ]¼¿¡\^Ýp€‡Ý>û»g< è?Ìs‘5.Ê5gƒØµ/{Œ„ù¹V?YÒ¾g ÃùjÄRªÙñÊòßc³Á—KˆcïŽ$¤fIËN]"œ¯ÐqÂÀÐõʪS‚vª¸ Æ¥g2…¯x9¸-4_D@/ç=\Ü|¶tÚXÑK©GKñCçiƒo3Åêó¨&5‰3H¦ ´ó¤«z‰áKœ0L,»);•&¶Â±ØWû•ãØ&Õ³51È–} Zp^à´Æ²Q6Xök7¸3¸­¼Iý胄UÆRú@ºON—®I’Ñ0&o•.6—Aóe¶ÀÓu±L;U–ˆR6®ËÐîBƒ«Œ¢óP‚üŸ¶‚LŒ+KKBYq/_3…rdQ^&úPÿ*º»Dý™ª–Xä_Í ã>»€›>þää8TÙ@°^úUFs\À¾»ˆDæÊôò¡b9 µe¢Ÿ¸4Ù>ï…BRÀøÕð’Ù2Æv-€´©â(°P0+,eÇçÓãøÅ€}?L à÷¸ ¶L‰é¤ÖR”#€¸Ø4Zàv´>Ôå®Â…*¥Ò8ʠ̺š»gæuA¼xèn±jÆ«lÊ¡ªu‚¼!;[îêe¿@áGç$F)mlŽšÊ¤§~©iŠ¡öˆMHŽK›Ãœ›ÿ?+ Nž3É1Þ„½C¤ A±~ Co´¢m÷Ä‚…ëäp³ûÖ^ðt#Æp-ÕÉèÓÛa¶…7’-„Qhú*ËÞ )Uüǘ½òùÙÛHïÎ4ð˜–ýÑÒµ0M×Q½ñ­mÞ#\.7BKšOBÈ(RÅæwS?W n|_ðÓ(<º{²âÕŒHõ¤og»V)Ä« lyP·r€njÕ¥„Œ¤ªêMÞâþ\¾éÏ…ÿ…€U{v˜nw!@ÂæZ^𔾀c³ó¹wc#öÀ”HQ·[}¬Ga Þ5Õ±›¡Ö^,ý>ˆX´w©t›Ó Û¥ö¿Î¨À¶¤ëLè?á 0hŽ iÀ·o. È스—Z9ÐýeÆ}K³ […'dæØ-Ý¢GÐ]W÷F is\wýépk‚[ˆˆü•:¯Ü©®»êáQÜ &îÈ„ò~¹îÎÝ%ßÊú’Ý*qeWRÙ-1Ò´h(GZ™¹üÅ‚ì)¿à¥\œó¨ã¨bä+UËÛ3ªúXg€˜Œ¿wîèýÎd±°…÷^zâÇՉňæûUGñݺ”=ô¯ÿãmð‡€MöÆQÃÿ1Öö¬lWñMžC Ø% »…Ømòl¸š‘¿Äù”¡òòªàI—äP«‹7G¤úáÛ3„¹®êPn•mðÁÿÞÐ<’ÙÏ¡Õ*ƒÒ¥Ö®v¹ióôÿâ /;túÙ:´]yT–FMz¹Žü˜£®¦r‹‚¿NUwIäéQ×…$ªŸóóâåÏœR.›èÎCïäEz¥Ò‰xôëI«e|F/Z¡^.Š`ù×ú'„ümé_A>Ç_ú|QîƒiCaX] Öoù²à­8ù£ø÷ÒE϶É~0üÂØ­ŠÊE´äߎˆŠ½M`òØ6Þ¶i\xM EH¡ÄÓCJ42 çs£Ü)KÐâ–'Õ§*ÞúÆÃ6½?Œ+̉ù?ÅÆçÓ&ô5ææ†å7‡ÂØß×éË^͉gˆ…jzï…Øžèü U¸¬2ô¤ñLJÂ2k*î±øÏm(uC8sÚÕ×p»›å &[ — +rO¹Mr=÷OEÐ7¡J°˜]Þ(u/ö ‰`è—îܰKa¼ó)v$C»‚mïV¡¶“UŒ6!þPÖ™÷bbPt³#«o>êýö‚_,FœúsD÷Ü2—pó4È(ô¯È(¹$Õ“ ŒÉñÙ¯9ÐÍJ)>“âÚ¿¹é+ð°9Bi×g|/áb¸xƒ9²{½$5²kéÝüCç»ÛK?êÁpw‡ @Éõ…£îzZ½¾s™¿®M~sórÁÊ>µï©©°è¾ än½ƒ„P­1½:e,ùÆÜ"ÅòqE‡ ›Ý—Mäÿï离•SÛt£HnPÆõñͰ¾õcøÿ)©|sƒT3a/~>.¤ƒûÈxà‡…*Är÷ 2 U&Õ]¹ðC˜Ï– Ùv ¦êüP¿Ä] œLÿx`>á﹑«~ÌgÆÛ%AõþA…©È9©xs. ÎÖ¤»Øfr$ô•5”&7¢eïS$~X*>Ñ¿¯šo5B?^\÷. ©¯S íˆKÔØ…Øæ†ÏÇo=‚k/}`mª¡‚QEí†X·}™ŽþñöM'oÊqùœÊáüÜÖ—ùÀˆC‡zo(×ׂ1i… *ª¥ÀN ^>]Æ•Däš§ãä‡iX-=S—^»cŸTƒ¼ÂÓÐr‡Ó½(˜‰œ–yž¾å_^¬v7Æz37CâY!îzš=Q»77$ðþ ƒû“ô@V,übãÉ‚§á“æPÍRÐ8î¡Ö«¡{.áfïñnÊü ûcinÐ…ªÉë7 t˜ &ã2—Vš#¿R/ßâ#W,vhÎn¼ÆfsúiFÍþ>8Þ<áIºj/M²½¬ÜúQ%ÂyN¥`“ÒˆjK žÏ1F ¹wFXx:n…znî¼és>âw¬…Åp´ªÇÌÞh:zL‡Õ‡yá¾–ÖbÙ<ü±&/° ó'¨T}û)¹2¶–¤Ò‡üC²K3©Â3ÛŽ)c‡’!ü88SÂV»ºÞbŸ(zLH•±=c‚…ŸÎü!ç´â8ccÍW U® ‚Ü1ƒÔ´‚\•Œ ¿Gm`ÆvÆßéiÒØÊüÉç<–þÆ.’¬ÊØ¿™.ÎîƒëÏœí®a¦°ó¯±Q ¦Rîs{O.g(ž¼ï© RÀ‰Ú©z—aKÌû;¹ò€8ÃãlÕ-˜]H1 á=CµÏQ‰¨þhe3ãI:• É­3Ré9µ5‚Ö÷d-¢k€>†Ý_]˜hËæý³QTò:cÍê'g¦ÄzÿÀ6ñYo?\\…ƒžÓRnXpâY´v+@µÕ|e–{H¢(¢®Oòó*ƒP¹sf4Û²¥!•›@9#Ù­ >#Ùj—·üC瀫Q±ÿ3®ò r“‘Æ+£zk±v”¡/)…?©)ª›~ÍÓU=É ­çP$qy͇†oÔþ "äW/kµw&Wˆ‘zLû GgØ-àøüâjÝßÙò tm&Ççªf…¼:”m6©°”á1LRü×ÄyN,ŽIÔ4BfбÅâzU22óyˆ75Lbc™ËžÇ4 o”ã›Ã`އaß»ÛÜYµh(Â2ŸZ©Ô» EÞD57[Mupâ :œõ§#~À‡t©iz-lƒg6‹ÒŒçºÄ§Ä'i®|̹N`Í«t/¡N RbæZÏœ¦¬¢”ZKüê§pdŽW„é.2 bË.ù~u³(½‹™ÞmS&tÂVèóq·òûüRã¯N xãj‚Ÿé§‘tÙaòwhË)ß¿¤}¦I6GßRãD8\3Lz—«Åœ²”,äj•ÄÀÎ;óƒ-XõQÔ%AŠÌñcéäHÆiΨ`rÞ? =œÛ@6ÜÜ¿™¹òúJpiV±zÝXØ~ÿ‹î5˜L`ÿz6ÿ/ªRáK‘“a}*Mòï×I/Âú€~ÎV,ûDT‚<~[ƒ%ñ’ÒkÅ~d(¼ö`Ž7&Ç»ŸpÉýûæH]'ÍQô©‚rf2záÇV}]¢X[¬ñƒ|nª ô¼ÐHu¥´ÝŠ«1LŒ“{Ýïß›ÝIJ„‹½€ò œ5½Q/ÌðÅë˿ö,<8ô&±³æêÊ"ßb²?ZUnaÉ“C2‡·®è$ üC²q6²¢Á6‹¦RÚ¯”wº òª?~r‘Ú P·»€—²uýÊZͨd²äµ´òÆ£¤î`/–.0Ð=ÐÖ^7皆bôÅ«l3ti¹ø‡YÝ”ò ‡'P³#²”äò]TGL'ìì±wÉz@±ß*~m7ÕßúyÅÍï6k6¢k›lCž<¯Fû÷÷¯p½,XU#Mâ%¸¦k¹ÉŠ8àeµÆ#-@ ‘®Rº†ÈÆPÉ¿­gAâsU&H‘Ðø5Ýâ :™ÑÜüÆöz©ÿ‡¥ýÀéüšˆÅG )š¾X446_p‰•‹R~‰x«3*JÚUÄ1Ýn=¤ÿ{q½þŸÝÀËíDN6åT´~±žÊ«îÖÆ,“øf81ž_Þ0ñ¤owêý¡\$.Ú#LëÜIZÝænào9%*ÜÃ09/x½ Yù•A†W!J£jÚ´:5ôôÐcK'ƒŸé2ìnDšß²b0sô‹LùÑ–CÇTz˜BoôTöñ¶}KÄ…EÒ…[º”èiÉ+#;„°àün8ài\õ£ßzHƒ­ OŸ>êLŒ]ý<<ù¦®°ÊlOøp °-ï™:Àb] ,Åy‚ß[Vée¥_rèx¢Ôå”’V§\ãô~…çE2c°þ7½±ƒüÂѯƒ›`›³TÌaRC=xñ1Üø$ P%!Õ€ÝojZj¹|=4­.C‚ðVß$&Ñf‡Ldrü“v·â.oúíVw¡aÉ;êgÑQAÀÐCù¹Zu`);Æ”F2Ê Äÿµ1ÖÆ/9„ƒã.]ò˜ÖÄ|ÃFsW¶ÕIš‹!ÑÅ[e,í†Ïø$–#åÅKˆLyœ°×\L±‰¨Â8˜ó‰+iýCZhä;è4® º¢¨ò€Jå¿é¡ôä¹Û*M Ž'bfrÐâžÀéž Ãç±9Lsø¢9c–^ßNÍ…AëÄPæNÇÇñ¤¢«‡B>zZ'žß²$ãñfg»¢xF[q‡S¡ø@Qô ª| p~7  ˆ2c(4¢]ë´[pþQ?á­giÑÙ© ƒOggS@M›O!wì0tÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÆæ¥ü¦‡—­äŽ Ã¶5Í+m›o‡V˜ÖÝOÝEÄ¢ñ~ Í§^Z–nñÇÙ+Ø (ÒŸf’£o["_`7¯àÁTß’ÑMr8cÆàW=ØxF©P Ö¨Ïß÷ÔÎ|¯ ]ÄãêñªógÞ¢%t¬ÓZg6˜Ç)Ÿû€#¶ÈÆ™ìñIÌJÀ\…;Ò\DYHr°_m3aÎÛÐt™ f€5÷¬p("Rz~Ø÷ì‡3±ªö,»îE’‚©(ÄÚù©J³·åÁùð¤ŠÎ4(¼ˆ— } ì쎛 ~f¥´gÒֵǃkŽŠ®üòO~ ¢´ý'@‡$1b⢆ÕïPØìÞ(T‘ ÔʦåëþÂFpýifF4¢³^înq=¼-Nôƒü[:G>*¹ö}ˆ`â $. ÜñKÛl^JŒ+|_±v{ãÌ gCÇúqÚ‹½¼ÃP£¤B,_év(é¸iO>¸—TY¼9ÿltŒ‰­R»OÃ>f‰`¡eèiÑÝ‹¦²!aYe—“)–0gÖð.¢³ÔŸEÊå>B–wç¿PR·Ó*9J lòF¦ª ésüPA¯îÛÙãe€Â8Vµøllì²ûd¾rho[’‚O—©Š˜à¸ƒÞeõF²üÛ¸"¯²^ýâ Ub«y¿žo‘ðŠ&vI!ÇTŠ´ªXefXÿ·ÎEº‘]Oc²xâ}œ&÷݇ _#~ÆêéÉq¢hö£=Átíb1+M\Fønu›„¬vi¯Vdc͹éÆl¤üS»úV&=gé—ÑE“¦)Kmîé¡ë€Ràï’£ É<8´ªc‘zÎ¥xz‡d=v«2ˆu5_gêÇŽ©á*F½obb-žÙâJÓl}²ìþ€uqmP•õËÎÞbeb\šÄÕ`Yf6§=Á”f<‰Mò¼ÓÖ´ÖwÕJŠa±ô̾1ºŸT@ ©DÊÁÂ[%ÎìÞ* ¡Pë.ìT°ÈL¨ñôÕÏÉ–ÎV( a[“sgn€Ž¹U l†`.>®óU¿ÙwÓóõá´ €ýJ† ðÄœv@mȲߦ¯s ï=ê"óéÉÒ_‡¸‘ïîfX\rh‹àÌΚ&6îñe¶uã¿Ê€°m)džÁZÎRKÑ3¿wbÙÞ}(b^~ÁYÃe°ùþü„ )È´§À~ˆéäÕØŒ½özv:ð¤š0 VñdÀy‡ÞÏgõ…‚ØËûüÁuUoÜÚ'‘A6þ[î+¥²Ä6Ú5Î WŠ;Œ“<#ðÚ".§sÜ| o¬n‹<ÛðÒŽ|3Tá­–ç¤t<Õ0îQ¼Cªä)3ßJ J.&ŠÔMŽvÇSfŠö¤uÊະÚâÛ5U)çÏõi™§ç³©ÙýÐqO¸ßüñKŠáäGXÙ2Ýš»K>ˆŸ.Mk‡(²&íK“u@}áU²çG ð&¦±„÷ô–šƒö&+,ESs¾b€Ï‰ûwø£D'÷\f oŸ2’Y?bboñÇk$å¸núÿx`§×%‘]šdÿÝŸ2Äà±–ÈæñüÅzå.'‘?$‹½¡g HèÿЪ–í¥ŒìˆÁÕŠ_VêÆ ¹íIYÐ àÓ…‡˜Qm¤Ïj¬¬¬Óü?4Ò~ VË…eªX$㲬|”صɳ uŠ!8Þ©´5×ù~ÂFqj'÷U®pÏ¿1°EÅÙwãöÓç¡Uh PžWz ©À‡Ú~G @j‹ÝT§J ¼;üûé³{ØY£AÔù‚˜›@Hœ¤h"½xŒ ŽœÆ´žÑM51æy<5pkpÒW½pÆ¿´T-Š/’ò !mqñèY4õÄQO ĺQ¸œ¦ñÑpÀêg›çoRê›Ýyô~¿8ö }åÑÁYª1‡›U1ß’žb,]wÞóÓ°<Иîê\„ÊzxÉo±á¸$fthãj˜ó‘AÇyêÿüyøMHÊfÀÇœ'–ª&B÷+Ô>—!Fxô‰üSÅ‘i5àñ÷«¯›0À¸ÊÐøOˆãî5”¶Û­ª³»–zñÙ­ÁúÀ}?2®ŸË µ÷Ô—˜IO@ù¾¼%GýD'µ®ß/`®{Ž{ÜTÿD?Ôÿ;Â9ÌOØ£ÓÕÎg-– cÆ~ñ÷œ…y,®+Л¢šCE0†H©'“÷øaïCÄSNeTy‰dD2ûM9~~!l@™÷F`gìâxP›§,›ºdäy°ü0Jo‘YR|Ã" ãÍîa~•¾ø’በÚìXúûßôᘼa Û5þ§ÏîÐæÈ”0ç¾NnÄ4·{™*lœÂœÂÒ‡;:2Ìø„pzx’ÜŸAnpûS}]ÉÈ&ü¸2AÄbïXÈo.G…yÝïÖï6A+¨h—-üZÝËz\Ð%ƒö,™$³d/3¾sé,mâ© TÊø+w¸yЖ3é?÷êP)–wž0S¸x¯ÿˆ_v)¨*ºNÃAçjG†é`š¹Š¨&›R÷G ìvß=_\”+âîûÞ ) 3/šÑB&QâkƒÏ\GñlƒHð¦–SlÌmÛ‘)&;3$)Ÿªw|i3?y—+‘„Pñ† ºO5½"RwÈl°ª˜P’’\eíöÒ@P«•c©ª¦úA‰ÁΣ󨓑*MtHbxÈÃtYBÌþ¹eÆá¶·hª·­=Y·×ûu Ò­òª)¥ÚݶÆ^O”)G&wyë<^ðc+ –ÔЀÿꦊŒÕ ½heä…ÇmÏê6ðC›&(PâüÅg½!2ý ޱ1ˆ'`]ûòYÏîKÍÉ4:Ó¹”?ö¹¥˜i#ʘ«ÇE’ Ž\VL!.m3>•Æ3Å®Têxq›êÔ†X„3Q:æùAˆ”·´BîH2Í\)hAÜ*…‡©ª\ß21jLƒæ%Ž0Juòæ_@Ö£i)F­$«âªb]¢äRœ,›äv"5IÖ¥l˜€8ßKrE†û G‘ÿ“INœEã;Åò)£v(D:®1ƒÿ’‹õ‰¦t¼;ñÓ/*¢Òfd‘™úm¤ <#®bï õçÐÃb¼:Q Zjâ#2â!–+Mt£Ð~¤óXÝ"Ñ5߯ÀÑ?ˆÌçsõ&Ì÷ fÁ’"CîY(¤¨‰ÏL}€b0ÒËÕQŒi ô_ž»í2ÀŽÓíB:+¨1k5ŒÞƒ´AC”bà|Ûñ¢â ™÷ 0Ûô«àÿÚÞÀ€Ã ÷Å5¾ª% 7š3&ílAÉÓ×t^Å&à³m G‰£ÿB³ ÞÞí…Ÿ2AêàsùépO³í°^dýâݵôÒÝ€¶úƧ‘É-Äß`uVÙJ`ûŒG.AÎ ¢»ý’=¶yT.5J ’´~‹üö5徃§/3¦hV ×ïvƒkвZ€Re¾GiÓÀÉ!üÇL_rúþP¶ï,a¨QÏL*eÁ…P|Fpä t$9©H{î„aïÇ%tëK¡Ï€#3?P{_ž,!í[Yr6HÊ£¹õ*8Jˆ¸;…33ö‰dÚõ—¢†ÆPŠXî$M…©¬k sNdŃ–ôóIð·É<Þ¥q’­çôÕ×ý·†Ø€?¶Îâò=bZ à²6CÉ$Ä|²Þ*Ækh0M?‚Xß*µ”©ÁiÇ¥3Ѱ6 ·"t`O Ëõ¼¡í¨T¸Š”—¤@gGc>ˆ}Áà¦Å­- Wñ ª9ÇÛïe©á)[! yuH]¼ØÄEVý+æøxŠg«¤9=HC»Îð?ëõxR¯âÊ Ö81P+Î €KµH?¾;‹ò×%üÆÁÕO²Áº·£·¶Ó]Þ|ÿƒ[þ †\ò0Ôeú„—TC¾…{Ø¼ÉØùº9(²ø£Ãè*‚zFoE^u€l1£€!vî忱5:V™ò`Kj"Ö8™ü/ex˜äɼè©3Ìk¿ˆݤCh"æ¢Uåz½à©œØØ)ÿY'ŸTUÐ saÖTöÓ°pA-£tY0ߘó%Nµ™up鲇›¡K×OPi#–Z{`Šû£39•Ök¾ªE•Nت.U'芩hØ»†¸e3°ÀÕÛDØrýb"Jñ¢Ê2;p. XßÈVq ´&²­ÄÈÕ06Ià –¬kæBÞÙf ?>ÚåJ…üæy—ú»/P‹³™L¡g™c–Ä6Û¨¨²®lÐ6ÝOggSÀ›O!xìàv¨ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üCç.£V¿5•u{<¦¦ŠÏÌA¯Ú‹êk9"ežX×ÞÚ€Ð>9(Óõíq1‹Š¡—8hÁiöÊCÖøØ¨‡ã*†k?\Ç{øXG7màs‰²rî&󶺷èÄ¡9îÔ¸Ãô›]•Zˆp½È$¼þûÝ’W¶Â3膞dÌÿ¼=_Á±ð¾O)?òcü‘YÝÂ¥€AFPÔ,Ñä~ób CÎlB¤¬£À¢ŽË{{Þ4–ÝÛ¹r8[*Œr°OÍ£ö.pÜ´œ4ªLU‡·²7Û Ý-Jk|¡yþD—E9H ÆÇiœÄ/|ÍæM÷mßføÂ¤ÈGþ» éú léÙ.C»³º^<ÅLœ1sÑo¦O÷ÛåÏE¹e#¥îyRWæ¾->Ñeü[;‹ „U|>~ ÄÄ)ì¸^•4öõ¹O…7{5¸uö”x|UΜ0Ù“úEu#üi³ü°>Òï’®¿ Ì4µi”Â`ès5»ˆl﬙MN„Y9»¹?~ÕW6ø‚CCÒ•Ü­Ò»³rÓFüBI+Ö^û)޳6ô•h:2†õ×i™ƒ–¶Oüˆ]ÀwÞ¹‰ƒ\®M.cÌ„l!OÁG ¤‚ØP1Yîú¢m9åí OÔPâê%lÓB+ÇéÛ"µ0ã$}¢9‡Ï°¿©ŒÉbŸÿH܃þ»±Ìái·0Hh5ƒZܼ̈·MDw±’þ‰Yƒ­‚ÝütªžyavœyKÚú’Z1ù¼™}þPÌgl®PÕH˜þe+²nè`»EbYºÊÆŸ Ü/–K4e|Ü*ºe(Ûˆ'ÅFĪúßD¢-ÃihhTNëý€¡Ê)áË}^ª ½j:’åC¼Éh^{Ñfð°©ÊÉblÊuVßé_†°]ú/µ%Ðu“ÖÂa²B¨ - œÖ‚–yY¹JüÆæÅêCo”7c“ t ´–@Å¿bUxëê/õ…¯5ôWƒ÷ýÚ±êȦ7¡¹TÜ´ŽŽùv4Ã2}ºÛ›Y³¯L¤]O/±€.](…ä=ËmPù4ù-(㨳ôn~dÙäV©nнêýKù–Kô=©ØWJ×~Y8fðy©¾˜t)¯pâ•Ð,Žä…¨¬Ãþôƒ˜qý¦è³Jšeƒ À{J§níò€GЍéPG•íJ°'cÚtÙ¯ƒ5 ¬ †òn|v­ëz‹øšó܈˜0t¤‘G_ý«¸3Áˆíf½ÕÇ,JÜ"ͯèI HO¯xëwRÂU­=ú6e:߸#¦Anà‚•ÁŸ š@°vˆj¼¨Äbyt3BçÆìÕüÅ¢ZŸ+P-ÄZ¡k>œ5Û˜þ4ªRFI±Ò¼njGpuJöS°÷‹¾¬¤dmôJ¾†¡k˜ÏUîÔ=LjæXœ$‰âÓ<*}9+®IÖ3– UvþŪûhm¸íÙ œÛ³bÏ˜Ê Æ'­U¹…6j%l1)²ø§OÉÈïö}µd¦ÈÙ—fd)ÂUÔ£(q¦mNFÕ­ÙtÄjãþï L“¦³l~! §ÒJv“ mX’]ÐtP Ŧ$¬…¼1íö–G‰J‰ÚØ45\] Bs~XOˆíˆ‘§£¼ê˜¨~,fZJØ×ÿ(ñé7›íó¿ƒAHLÁØe §ŠíÑñ”ó~:Õ\ÛbÖÞà‘AwuŽAäq+ýN”»¡ó™üÅt¨I)ƒEkûC_1h–FlÓ2N³@3``}‘§}ÏiŒÿ¥[ ª]F'µU?]IàuE¥¨Ü\¢ÚñPƒ?Ov@(n‰ç]D¢útàu Ü¡- (Kk‡ßïMÆv«H^ IÌÈn „Ú„@£ËìT§‰vñæ»z7Îì8åôô‰P™oʈ+ ¾þÚÈo¸Mm\›˜ VmŠ®þ3±ŠŸ¸Âî*b´4íãËËzq‰Þ‚„ŸmËž$]ë]¨ô`Ñ|ÃÆl‚¯+˜~éÓ¬¡à púFêKîŒ(ήìîŰú«Ú© ºö“þöªRÒô÷bc3l;ÄÜð“–£þʘaÌŒ Ë$Üó(^d§÷Û³P !Çv;ÃØ üǘ¾%þØHb¡­dˆN>cBY’,™f%¿ÎÐKg줾Ÿ/ßñB-ÝJܾR~­>uW”v(BÍϤd¤#ìÅ[àPÎ>®~ÍÐ{Cv¡ˆì͉AYt¯íAS¤Õnih’/þ/lÞ ödÌjÜŠ:!_ÑtóµÆ~š±Ûé $à’N¬á¿~ÌXªg4ï-§ÖGT«…-—ò~pÑý{Ó†?Ç×7úR¬ Ž !-i]ñ`ÊrÿGk –Fž_¿ÙDÄ-¯öÌÚÄDM"‚¿•ë?Gv,žoã-Ú¦V·ó·„° ]IqkŠ]\]ËõÊó”Ï_âSf˜éÙÕÇ,Óx{D&ßÅ‘ãGƒ¾”ˆ h§nŒŠ®¹¢M’ÞÑ  ‰ü™‡„ci ÆŠgÆ<6l^¾°¹ö˜í€~áƒïävn£zãQåü>ƒÚ.Q{f½ÛÔJ$]Âç%°ØÁõf¶ÚQ/µžêž~ZIˆáa·ú¯·_”AÜÏ4Df’zÑÔs ­1F¾Tœ"8Êh(Ù±ÓÑ1M£Øƒù#Lm§LÑêZ×G1¿­$q†ŠWˆúàÕžq¥¤FN ŸgYÍþ­Öpcµ¬V21‘Hà¶ 99¹ö‰O=•±ü¼·äÀ»‡î·êùÔS6?3™%:`&S´)­¤Ñjã1HfÃXÇeÊnj® :Èì‚°ÿ–gü:g$óG!<:îgòl_RSQ厥[û*›F†§±agOÒTîwÑ÷ÒªüAºm.-‘eYDäiÍ›ÕÛ§àÉE‘ù“¥ÚПh%ï%2¯bÌx‘ û¨¢IÓ‡5y†ì-KÛÁ±Ì¶Ö=žf$·øõž9/,xÃW€ü¾$ØtY‰hy€}'”3Á‘Hï¶ÊpÚ`l\òûÒ9€ÿÍ!R­½¤åÈ¡(ö¬1 •i2P„ìŠ øM‰áS‘¸2ö‘4.¼LÏJïocj·֔0çŪD3{è{-ÏQ[w–%^Z–þѯ¼Ì–}‘ãF'=@ ‰5Sæ…¸kc 13!yÊÒ+Eé yÚøÒ?#pñ}bþ«É§:¾Íî4åXÓ’»z«é–åŸ[PÆôšn’‚àx…OVìx{ý$UÒF AÌh@ƒ1d wv¸°+w-ÒE. Öýy¹„üSÅ>þ—Y°?zoÝÜ1îl)Yaú¸jŸÛMÎøkÅEì}ž‚Óú&'âq0 #¶÷uWeÑD6ê˜*ŽxJs¤–Ø™o³ñÙ5“ÄÛ1»jæý`ÔYl%I¯æF¦,u•Ö_ròÏåNˆœm=b…Ãlcû‹ïúg'òø aÌ$²žk&\?hV™÷}»8Ä„äq Ôi¡Eét™ð”æ`KKW'ÒÝé;¦À¦_?ü.4 êIƒOÙRRøè x•Š<ú«FÒ?‹%’DÁÇ$òÁ/ÅK=8&“)5±¢…Ç<_‰¸•fŒ 7ºK=e°7÷¦ñ³Àü~ó¥-’ƒ-e Uòëç­o*‡ ’x/gF(¬Ó„СÛHûáÛ1Bn/ÏFób±ÆÀØÓŸ„jø>Q«†×–BìG{ôM(ë\ßk*/Å£·+ÏÁ²VZgFO[@å4GN1Œu¹Päªx5ZÐ<Âûø"øódÖ…ô„þ0§¬Vbβ‚µ«¬gFÓ&oÃÈP"ÞÕbžƒ?ùÙG’P ÓRK®äÍ4!Ð0ñõí,ë2ø_æbS­Ì°§™š`f‡¼?§¤²œ*ð`YÓ'êܵWùŽEn›‹%SÕ ÙŸcpS‡8"k?Lðó‡=Gœ%¯Q!å&‹Òdš‡ü[e££ùKvɲAשt¾h8ÑrˆŒßæZZ€RÖ×ëN!kÃmZí/x3m†C\o´tñX²zÂ"P¥Ïº`c{aRÑNEV°òCÙµx:À¦àD’‚aÓüΠÃ@Ú˜1׉¾‚zvCLåù»‚Ý¥žZ<–×è/IÞ(¥†&§Þ€ïÆ`€{Ò Tþì.Üãïé“ý£¯Fê4^$_ž::üª’]Z~êQî÷6NÒðȼ³€’ÿó ¥Û41ïVLÏá Îné¶´*‘øAf §„³ìó^ìs?åK Ù³|‰ØÁØýum0áÔųy_@PPöï’zAå õ·|¡‹¨ÂÁ'ìbÖ@‘ŒÅwˆ]¤h²»åá~<[p¼OggS@¶›O!ylmwŽÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÅt˜UxäÌWã$Ï,ìh&ÎÄ(<s0zªnç°Å{)Ñ›ùUàœûk´ZSbˆT:¦xYÖ$lÍ?ø!ˆ€ÌÔ™1y³¡1¿}8©UTçÂNÌQȳ³ÀBw{”K×^>W¹4rów¹‰Þ Åá±ÁkÔ‡K\è6Œ^¢©ò“\û:N„sœ_˸ ¸h3ÿý¢7&̶4ÓæÙR#õçeÑ&ÌTÂÍŠ‚›ö^ê¾Êã=šãEbwû e2À Ïœ%Ž›§Û7i»:;ɱbÒ„Â ë=Ë?âñ»|£ÙûUŒvn1 ëf·„„Sk±9°+(vD,f5ã#2 &SÛ?Ô–$N2SM_Ž‹PÝle³6÷á·F×ý!’‘Z]”üÆæÍ_ùZéwmOà4cöP4øxAðй?¦ÕrBîå„t´Ÿ_:f•?Üâš7TdFRSwšŸ¹OÚd-"ìŸpBkÈ:ØB‹%}·w)6\×Sñ;>õýò§‘äUÉÜñ¢¢\.Šžé ÊM½†!¦KfSìÏÁLÃB0ƒc´[»(;Œ’G‡ë±ÔŒbæ»™µàéo41½Ù™ö»òªme3ˆ0Ä,Ma¦"Ù>TZÏ뇥)èÕœñöê8mº o,_ ;í[¸vÜ9‡•üÖß aL2ˆØlM[ 0üØ1Öâ\|åˆ|©%E¾ìÄÓVšRR™üŶ¥á¬‡ó ï.tO¶ÿ­—ÿ„ú*XES˺c¯¯¦¯1.yÓ³Òìê‚å©xa7¦'­ÔÈšTœ+!t¢Ÿ-è?¢½ Z`ɯûnÊú#›èÃo=N™m,d´ \B_™ m³wB7¢)¾:ÆinÐ c¹ôœÝ_°« —(¼êëhû™R±;øQõy*£ƒò×#ÿh²™ÔY°O-ö¯ûü¯NìD«ùPD<â™àÅG§ññA÷'-Ç '­%ÂnúLQÝ¿bÂÆï²€Æ„rÃAT‘ ;ÜüÊ®Çä[êûpp6|­u1ÿè!Þ1ŠóeijŻfCuMÛ÷i9÷…ïÝð¹)™úNÑÄÚ!¢ µÇrCx7·+aüQ2l $^Õ{‡,æ.µΕÓAš ¡?"Q¤n³m&cH….ÿŒ#B˜dô¦ I(Úÿð½0Œ,M©{ÙÀƒXXæÄb5»FmÍëÀ˜ÂèmÍ×–œë¡vŒÜö³$èÂvw‚âtó2ïŠö¥™4ŽÎÉ„Tê ‰`~ñŸûKŽKH¥tÅ—Ð#¯C› miŸÈS¬ðíP0—_Õ”¶"†`×`ä5:'³{Vã”üÝ7—Þ‡bÞ ÷+>–H²>­ù&ïkÍ›\VزÀÛ§ÔådG¶ I½0\0ðëÒ÷v ‹ véW¬ º¶áoÊuÒCŸ½D߇&®ý°Tîf«{"ÌÐÁ¶ß«@*܆µ –Ù2—å†Õ®Bã|ŸžV%Q´ö\ÚüZݦ/pgšªÄÏ!Ú³“ô¿‰Õj†«ÊÖ-ÊÃàì¹#û|=á4ÌðV I‰œÓ¯FvòÍØ‰ Ù`1gqÅ! ž„XYÒ¢–ò·‡•«šòÐþLP¯Ù´V÷ ¿ì4„4rܸ[ëpU¤|¸íôRëbÃäÛuHÄLG…u"ìƒ{Çå„scŽÀºyVٷ¿—e.¥µNaî ù´Êx51&^8V§?ÖÂ=”{XS儯û8i‡îï*g¼ßYL´©ÒZ ’§SPŸP‘ÐD¯™Ë^zÇ%@¡²6¤¾‡Wz“‰+j†Œ,EþÉOIÞ…iž’2À$þ²vgS&ÞÑ9o¸fجüà;Œš~OÛ4q¤ôdeù<@·à VHÌ™¡qOüE xØ4ça®fjΗ?…£ôï#’6²Ä‰íÉJâÑ˅ٮњK‘jZ“1]«G2ˆê7"†®p‡K°•íÓŒ nÉþžY¤!ãû›óµ¡âŽú¤ø„"ܤwg !|þï6üU`° ¡ígæ½Û8˜ÖQ“£^Vê øÐtb±Ñiè7}'Îú«=Òë[ÓÿÖÄlå[ôW´œÁ*&ôíD…‘"k2ô{7ÝÈâ—RÙ:\'–›âö¼¡m¹ÞÌùÙèbû×=-rú;«N÷“ÞýE¾ÐÈxnì ]P[\Ýs¶Ž"ÓXfTÓˆ.ÁƒWC½á¨µ÷±È¦bN¦«L™IÈ&mí¾wîØÛ¡ ¸Îéµþ•D+:=#hØ8Ù=¦–1p‰1)ë+b}G×]{ËüC«¨+ RìôFŒÛ4sq©êþðCA]C~Q­¾p¿Ë–Ûé0µªfÕU‹z+{9ÎºÛæåo³T FÖûKºáý/wE8éŒH´£Ð \±WI¹ÃH SP{ÔAz4$¿yûò‰4ªAg\²óVQlÔ$Åål#“Ô!ýHù¬Ÿï}…iýóì™ÀDl¡”Ø«| ™¾öââßø2´Î™õ‹âÁØE6¸ Ì©¿Ÿå¬ÑIþ:TÍgõ„ºo„)Š*^8lÁ'²tÑ€eêÊÊ6'…ÅÜ-¨¡!×s)º¦õèízˆ—ä2X„ŸŠnnJǰjÕäöq¶Áªëí8 ¨‹£¨c-éÕkö•¿P¼Ó ëj–mÉÜ]× 9IRB+‹oZò¦é+üAµ‡Ì…_ÌÏò#–„šM“©»áõ"̰ªôuÉD¥Ðs’N\‘ˆ8ŸGrÝzµo´àùšZ[o[–ñ ¼¶ÅªovT¤4ÄGyxR£åYÉÞ‹2‡£F©jÎGŒÕXC6ܸZž¡òò›ý2‹7w±hª Ë6Ækª¤0QÈý¹GÖÀOÕgéû3AæšC›ÖMã:Oo=¡ßªÖÇøygÜÚ°Ÿ‰S!ÍÍ®ÛcMc×*§Æ å-@ŠjI ñAyë¶sÕÈͬv_ÒBéÞ9ÚÑ–8±s ógU„q}‡š„ 9àCÁ‘Œ¥ÀŠ[RN,b)&'C¨ÈºVo³y™óÌÌ´0©¤×Ÿ½ïZ Qiã~Ûx¶Æ¶â†ZŒcÚüSµ5L˜#ài?´¸ýLy t1toÄTDqùmHP#C™óŸzW×í`[Xü%ÆëI–5¸Ø¤,†žWéÕaia‚U4ê OõFnmCû1_ÏR錫÷ÁèR£x0AÏÉ<ŒÜrQA¢8žFc¿Âpš‰1ø®,! Ê¯k oó¶u¥C‹ùC9ÕfŸÔx:§r›…}¸‚xS ŽVmS™ˆ µM^ÊO“ù)Ÿº@CÖñ|9/j|ZV=:—g ÊG'Çë󇇯ðem½0ÏÓü4Ò î’Fûouâ„Í 2±›¦ù¸äŽrRuÖ «–uÞÅ L_„ò<¬_D¿˜Ñ_N!H†6ã:}Oè3X‰/hÒ‰À~U¬¤ë¹þáÔüÜ;õÉ(ŸŒ`í³/‘(*Ìßb*sù®ÚŽýÉ Õ USÕZ[ZJÿõ»A“IdC¹Cƒ¥3‰´& 8§]c"©éEG)8 ½½`@Ûa—&%†.ÞÓeËNvÇ¢Ðx¬jÿ·êÓ„ÐÎÁr\>úd¹YmâpÆk€ Õ/ïiÀ£Ç¸ ¿×o¼ÛËÆeàáKÚë¬s èdïI†Rì>ÓvWGØLK ÐUîœz„ü[e‡h ìüZ  ì©cMÛ•ZwDÕ{aeþ•jÀéßV”Üeáýã³%†pÖô~ŸžeIž•‹“¶¨£ü©˜xiž|b}Û²–í+å^ˆœcÂa0™ ŽÜd…-µ&êV‚rµšu!V$zæ)×8RŒ†Xæ«Iô,²NñkåØû á¢4Þ-Ð]õœ[ÆEâÄ¿X±d„A=,£‘¨Q‹Áµü†*öžÆÕûK 6w>o¥ëÈ›Fæ’‰w%5›Îy>1ºIbLèÓz:‚Êw)å ¶Iϸâo“Ì”1VÏWGJZáßCÙ¶¯ræ öº´Xp èjžb Ñ=~dõ—¡üÞº)ev ø­P鿜èr4äŸRu ÑÆQÁŸ XoìüC²N†lNÚðãëFkçH™DÉb‚ž ÍRcÉÍmÐŽ\¸g^ïîH‡fÄóšX ÷®%yT¢“JµÜšJ ”¯àhrvQ¨|Óo#˲­hl§6c®dw­c#AtD'›ÀM} —eeNa†Ma8æÖeµôÖ䛑L<Ÿ‡Jñ#wKV1 ©ïK$ѦG³^úԸ̎²²&ÚüÄ«Q9ãñ´;æõEcðurqQ°†`ÀJ½‚…€Gºg(%¸SíoL£‡˜Üùj‘Ú8+Çò³Ñ=3(‚r)6PIÎ^%¼ëÙueª0îªb:Ö_0:&òê>‡c^ gúN§ýâe^ ×Íõj à &¦±flü[e‡sHè‹ßÇ4–DP>p&A_Õù6…·˜?e‚ó쌼01àµö‡šú»ººöTÀ½Óü:W£b§ó5[]ú³×ò§Fq{[H߈¶q AVhcÍ ÙÀh$^TÔ¢>)øÛf;.| þSt¿mY.|Ç¿{¬éR5´Ô½ú;€R§›=ú9aËåfèZåö:…)mœOB×u>QÛ×mt0[=‚]èj¶âЗ—ôO¤Y{ÓrШáÜ9ŠHKr… Gôu`™ úy¬ŒÙ7òéâÿƒñ$ÄV›-òËëSZ?Tf´YÛü¬ÆMK‹±¶3¿¯>½ (6jšbð5¬u³ÖN‰¾ ݽ&ª›“N—r}>Ox‚vžob_ßz Î¥ø-ü×'“*àoÖÃÞ›ƒÒÅêº6l®i *EÍ”ƒßWÐf/Œ€ÊäÆ>v^³]¯3R§ŒbH[1™]ññ§,ÇŽ0ôgV°ÒÈ~^¦]Â|o'i$áÛ².—©tˆÐ§É[–±Ðzs“¥.`ÿæçvUxn¹°^eÔ€Ò|!uêâpŽ ¹pk[u9EÌvù+14;‰Õ&= q¿"èþ‰A]OBÚ^š¿LPu°Ï¨u„ênÕ.£,AfE"2+£§fM¦~w±JæU9Ã~þv%„$XSÉ|7ýÓPMü´æM[ª²~üþj¼›Õ‡QdsŸ5´ ¶Ç¹§v’bF†úS︒Ïu/½hÁ¿ÊN»Ôu5G<ŸªSë¯ky]e ¶P? Щ:KÁ‡…³sý–/ï'G·›`J@NüS»ñݦß&Ú>)ÖN™µÎŒõ´E£†XëZ`îvˆ"[ âÙþš–ðK§–ÅTòè7„þ­º,B™¸oWd(… —+ýÕ¯xݾF“Ί¯DÊí1¿Ty£¿qîi¯Êq›„ªÛ|Š(ìoŸ•8Xý ÷ªè²úEo!wÃwz§§ãè\ iM³,é>žI©oâWçˉ:|˜¨Þv» |s€«pÛ­çbVTvºL]‹;1ÐþÈHè]72Â2 àLà¡eƒ.4™êOh±¸Î û`Àà ¥R®Ë½S.Hö‰lõ$÷eÁ—õ,uH1òD“YAŒ«LĦo® ÕÜTŠ­°Î”f”±w eÞf»Ö!†—¾¦y¢ õ¿~°t*.¢–¢L¹üD·8Å¡m­ƒ-FD(É¿™¦8d‘Ô`//{MCRwµòt¼?v$†` [[/–_õ%ž‡é°•¼„0ìa=¹OÀ!¼üNÔ¥(GKCÚ¢ôÐpÔì øá‡ÍS›H$N®}ˆ×¸ÕYZR³àÀ —Å‚¿©Ʀ‰­Уz ªŒnÉ ŸÏ…O¢e ©§› Ul]FWœIMi7b¬EêAƒëG“òŽ€ÖðíÞq[äóRé`Ãüý²ïºP¹¤û6u&ÄMf2kµƒa±Œ’ýƒ†` ê•…'}Íþc&5ÞÃþiY3ÝŠ¥ ȼ Íl.®dôhéÌe'i[uaRø'ò*ûVõóçˆÕ{·0£óí¸¾Õ‡nÙ_ÂÊúïðWׄ‡¸l,÷&FnËo–=Ý%ÒmDÖ¾Y(Wf×ËX˜gð6VQäëmeêèÛ*‘YdfMu`ÕáíηvÈ~ÛÆïø@XX\üSµ8{GiKÛ” ±dµ;Ü¢ÛjÊ;䆊A ŽguÃuÖ²ãÈHe* Ï«j~ë9ç—À£÷ÂÁ­NÅär9BV’DVBÉÆ Ãjó‘§æå<Í„/g¾J^Äz)GúëåÓ¤)T ;MrS( ëÐ:ËѹÇwc'hçñqÀÑP[Ÿ ‹Wž”}ùÿpûö©óUòŒý+*ÏAŒ×Òðu拪{õÐXxT¢^JiË¿Õ᦯96"8@¾{¿r—Å .¾=L;Mû¤“e0h¹*ß7N‹7ð ùYöOÿÐ7ás;_”.Ý7Ï»dÍ”Î à‚’Æ¨Ó`* àp¾r’&t¶ðò™EÅðÆá¼øYXjKŒvCüûgº±=¯0üSµ8-6¥>K°hZzú£gp• × Ì J—³gdE!ZáàfÖVoŠ·¨ßû»W¥Úæ£O3°æB X-fô¿Sµ û\¸ööµ– ÛÕTÎç¹I}fø‹?úëc‘°p]$0‹Òï:Tm^,]éHŸÖ«w¬$÷ ëâ¶e©òÚz¸Ó‘½KêD‚ ‚Å a°ëÚ­°áßú&=õ tôåš«Å|2fy×€naœ8º•uð" Ò€ºÛ‘³A'l3C}JEÔóïë_!csvu¾.4?>Ç/v¼ ®4eEê†O0v›X³ø"íØ#\Ù2$«<¤F}-5¬S&„ÒZ@tâCm®TuAn åüRšx4HÏ_? ŠäϲۜüDœCèH‚ˆu_$.ˆ€´\VPjÔ¢ö‘ì%‡¬Vt`Ò2PûÉž|ÂÉxå’‘ë|~ޤœõÆN6xÿ)‰Dá_ú—ºÖ•¿ÍNý꫘Y^;G ï=•p—à:XEbaÇr<¶î5í?pp÷~Rl,R[ültüóÕõVÚjÍpîBAQø_Aë!£„¶e“Ìý*¿3ã"¥'CâÙVwT¬ÚÆ|Œðƒ2-ƒD®¨õ û{@ÀK´ü[žÉdF:ízn–VÒ©)åWÆVV~‚ãWÞrÓ BbYH9P¸q BI¿¬@™H#neföÀä­3–¿·þ×»p½G…;…ëÔ{­Ž|^Àifý¯»u×"2téþÆË‹‹ÆqÎrüZݤs2%JrWÔ}Á”…t ¬à è§9QhÜ2»D¨¸Mmyj;!~ñ”’'Îz[Ÿ|üÿ_Ÿ@l+œÒ­‚ Ø[–O³†º.¿^¿Ò2ŠWM~\Ÿ+v¶˜úÜ8#luîFø;…—À„7”Ø]'¯=«yPfcøGï: .­‡à…—â۱qRq‚㇥„d4ú±‚Ç ÷/<‡b$ö‚mßI£Ïï+ÀügáØY'J¿*K½ *}©_Sª&sðÒ>«lîE²©øÆyc‚Z* ãñ­ñØh窶oA$üÜ7}‰›@mKŸ8=ÆÆ`]ˆ„¯[È“ÛTëеS&'†pL„8uj~Ÿ¸£ôý#¥_˰æ½#‹ ©ªã{eeÒ{°xì&«ˆàýZ[SO?Lë;°þqÁN*Iq`~Ði¾¿½ý `ŸfWΨ¬¼OæaÂ1„³Æ)ãXߨÒ=åiKIŠEÓëmjD—‚­Nü Áãe«ÃW†µKy]R’’Q´¼N"sž³@½E‰ŽÁºše<¶·èˆÐJ…ór³›u7wXÂ1÷"ƒ«˜£õK§Å‰²¿ÊÄÁ«‹óÂ(BáëØd*s~ŒV™ ¯p¹Ýš*—a+ÀÏÑ8žœ&‚×¹|æÐkg|±^wM%–<ôs?…üÜ7ûXVµ\÷žžÏ¡—Ó ·ðgîh¶öÇ7sœ.,Ñ$æ'Ë(÷¬ï (›&’¶½)f/ê›Ù kÅFƒ4pw.ŒºÔÊrûŠÏIš3Ù_{æ,·ÖÕ‘‹##㺴Ѫò‚+¦¤GÂ,*-‰(&t)Åì䊸Šûì§mù¬²ýhêq¹®A´3§Šj2³»Ý®Ö¡ÒVQϦJˆ×‡Òøv¶’7r2>÷«…-CS¿/ÿ¶í¡'Àò—ËßåA¾!SChµŸX/£¶ÚU9Q¥¡ë\[AF±ünz îwÚNÐb,n$‘zÚ SÙÑÈ¿ý_VÄg=^þfŠW-)ÎÌQø­­&¹¥AäàÐk7ÛHŒ]¯æíƒœ¹ „ü[epOKí~kfàö PeH9tçF@>®Wî…xV¤R¶qo®¨Cq€SÌ܃N›CI?[ÈÞÝðRh—j¥ëÛl §!Û’H…ۯᗥþ.m{éP—E¬jå~¦ HÔEÞkJß*¦Sl̡ۋЀ=~és©øäEì­ÕsÕ”RB©¸!ÉœÕ)™h;¼èÄ9Þåb;QĉÆÙê…n[¨Iæ’œ¾áÞ'7 Ǭoà§Ë2d‰ØÔ¾À}n ÷Q_÷‰\¥Á{MÃ[ÇHø°Á0B¼ÍÕB‡8§þ&Z‡\ÎÎæé3½³#8¹Uq]{ŒèOz»ôs²:À\«mÌéío—ôŒgm)¡ú… §EHä¿—Aµ±‡ p+-ÕçÍù°¦ò‹dæ^*XnႼJ ]¡Ü–Cè?¹Jï‚ ?O“{ÅR“ŸR%­[s®S.zThDÊÆ\a>¢º¾K,5²üŠÂù…gÆÁOŒ¸¤øOʇ¯ˆ»VüSžÁB¤ÝÞv3”Ï;BãiºÌ\çË2EdR.èewqk«OCÅl 'ûI ‹V÷äb°HUž ƒüo4Ûàn}vQº®wéJâ;ûhÀQï$u–þÂÀùœeýHX–—ÇXÌãåÜŸüP$v„+HiÂI=PphÍ™Aú ¸ïAàÇŽ þ œÅ«TûIM›þЬËkû™cÍM7w';e]ØLcx,W-vM)‹Â©ž ¸OX È%£áUÂàŸD‹®b1WlÒ〤­9׌˾[…™rrªfk5KÝ£Ójº$äƒ[‰>9W§slOìñK-à‚ÿ ­™K;MóôüæqäZŠ©j‡XΩ<Mk7b}6«0†¡D3E UüB‡‚ÙÝÔºîÅ¡¿^ÐÍ£ƒË¸ á¬Ü¤s!( íáQp6{ZöÈL8–Ióu …®º¿"+íF-#à|(Ëè$(±(úwCyd¨DO‘ƒd&ã3¸sõNi¤ÝØFbi•ÿV„†ÙNR£V% ?`77ÅŽÖ)ckÌXþ”®uEå÷åÕŠÿ—pËÂRïÄ´¹Š ļ oy -vtã‚Ø ®´ÿRÔöèaPyÌT8íG¼±AaA^æPâÄ}¶…¤âí0Ë(Õ£ªbøÂè¹ãøW#ù0å[ÊÕn )2 Oßï òƒ€¥OŠfŽrƒä° ÂD¶qHOggS@›O!{°í§ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üTè#“.-Ÿ¸g‰×yI§(GþÀ3ÅÞë‘È­¤ÆŽ)”Ôá ÔÞòV›¾‡°«˜ß€åñ~źeÆlÓý±.íw‘k•ö-Žl cMŠ‚0Md̤IÍaÝ|2»sÕ_Ç­·yqó]Ï“!+.´±ÑæR‡kŽ£sÌpf•¨(êØ¸œ¶vú»¾þúÆ“êu‘—ô÷‡Û©®­Ý¼ŽtŸ€35)¥Äi÷µoü%{>®G6PEn’í6# òfþ³å‰¨‚­"„Œ±26†àõ§~Haº_@Z}yWp ±&lÍÏrãšR\qRb9)t©oH–‹B'xYJ“´ƒòÀzòÛËQÛEÙáo ®ÁΪQï+ SØi“ îóñ´üS»pìkÒ`Ýéí“Cl‡+2t_ÊB;,žüvŠ'!€êHÍÔ¨Ô¹z¨(дàÙšÚÑ㙢í\›+ó_uW€3 ¬¶Èþà1zdÒ6='šÄˆ…G_k;ퟤIZóÍë–¾ >g/¦–áGÌè¾iÔÔ”œìš Îûµ£6ÄzÁ€Wº€™éÚÈáëŸ$]¿f "Õ”çÁ“¢’a¥l1#;µâ-|–[wÏcIrÞž³þ Ø·_ƒ­Ï/ä˜ØÇÓ¤w0Ö‡g¤{²öx_ÜBt1ˆ×1„‡qqi£^5èõ ´Ojb¼üÕ`…lÎʱ¹†í'<=ØsÍÀI!±¿†š¹ñí$PŽÍ ¨e'òuK„ŠŒïóÏ™‡F TÃÑ`5ì:¼Jûæ£üS»™jøa ²ŒXôȘŠ!ê@?¹ä&ʵ$ø¦x)ãôUÏRk ÄpOλŠ+~ù~/œ•€¼ô’’˜–i¸]¿µ m€[ŒÈm^‡_Ûˆ\ùÊd&7¦ŸÖ;r’‘ø0A ÔÙ^”¸Ó._´EÒŠ &È— Öö:¶>þºa”šƒ„÷“:\‡³ˆûá"T¶íQ€wx„íë «w+ºYeEk}ÇFž­fV?µà?·|ç/Ò¢’|,OÒ&¹[›"ð³éLnõ1Ô\‰Ž\ÎxÕ³ÓtJfƒÆ½‚ªr•¤š¡"RÞpî©J¼.xÙ@¼Ž y¿I¯e9e9oÍé¯Ûüåk+Í)¬NaEüíÓÁ Ñ™úfŠ™­m$'ÏV$ö×iüSÍŸý=ƒ&¦ûµáÛï³H¥S5èóâ~ëfÞp²qÝèÛ†!Þàȇee…Ò9X àdþì„g w©Ã0åÖ¤w²Õø¶†àšKƒöïáª7?âc‚s¸ ¨Õ·¨þ´1îóÄ<ÒàÕAÒ³‚›HA­ÒÖè„$mâ$‹!ƒ‰XçÁäýSM›;ÇÙ†Ly?¯3öY–+ñ¼­ðTu]¨m#òÉ ý¤Úš&Q*Ä©3ŽÕ‚jè‘©£d,£ãåìÔXa8 ɇâˆE0~e2¿Ç(ʃù€Î¹È§_ ®"\ƒùœ˜Añˆ€‘Ù“¦[ì¼"´ê[ºUÐ;Û …ÁÍÒŠ£½tˆ@m³qZ>¡íWN¨6òOxüC•?3´m?7A)‰Ô?0÷Hª«Íý†éð±¶°ÒNR+ÏŽŽ§9¢Yk>ƒràÃ-²à·±ó”QÞ¾²\©þ×§Î3xøýEÏQ@Â‹ëæ‹‡Ä r¹[»Ž%©~éøÞ°Þ«œ6ÔhŸ48xF&3·É„Zø‚^·ÞÒ9\{“Pþ•0ªÀ`^fðÓåš™Ú]<޾t¤|fƒ‹BÜ^|ÑAª"üS»lÁÿ«ùg1ŽiõOÚ¬Qº0Ù££}¨“$0E*„ -۽Ц<û£ÓpHž­öcqÈןq=GCÈx*A÷²ê’¶ê0æ$kçLüÄ{²oÅ™B×#1G¿ÏfÍÂÚâu!)Ñ_ë0ÐÐä’‹ÑǾ!¡"é6¹ò‹Ã|ÎØÐIðp÷…XÀÔ fôMußÜ hcì¸ì0Ž@c5>ù]´8VM¨ŠÌ™‰úï^fOÑøe?eýlšË:žÑü˜¹–[~øK!ôm€;3a½œéý^…°MŬä«óÉ‘‰ëò»bNªh”‘Ãè9”µ[åµLé€",¡83¬ºœl{À(ƒLô #Çuù li‹ËAÑH*ôÖõy÷ùüîöü[cv®ÉÜP¶¾v;D”¿å¸0ott#tÐ|œ…­hùö­ ƒ=G‡’4°×yÜÀø¸T˦ÈPRÇ*yÓìœuQT3ï:á;aˆéØdÚÖ÷B™+Á•$û«Ìmëܰå”9ˆËÑ—xµH©Ã÷|93еXëYr3ÉÊ=6xÎ%ázÐÈøå•³1.;|ºPÌyÈ|L„"Óîå¢Ç°yÔÑM˜mï³ö¨Ñü€ˆs9äd‹Öp-ÈŒ>ŸÛ—¯BOá•WV…U»™N¾¹¶^·ôf³I6%š©HvQñÈÝນ€äÊô,@`2ÍåÏx1vJÚÂÿ”ÇŽI¹7Â>Áý¶'¡ß^åS€,_”‰^ý3ªEa=ýf˜I°Ç `ØÀ°‹J 7j°üÅ~§/å*Ð<òwú3]ÿ͇Ãj<Àná²Mü@¸¿ÎÓFÀj$C®eßLMdMf*ž5£ –KŠçÞËÍßµdZ¦RìÓ :ÙóUÛ>ô³Ø«s˜q„´kÖÐ+¥@aò=84ð¬ Í=f¦…L¢hU] “׳µêN¡·niLÁ8çÊ®ñþñÇñDü.X¬ríöŠîàH˜]ûRê9V²þ{77UÛ$A÷ï'4çk/yå¼ýÁWćžÌ9¢ò ‰¢ñË!•üS»ã’ÀïM%ÂYÜs™z¯ƒ"€;ó±õTf’²ÖÁ(²^õ}6mm6ëŠotóyVJdiËïÌ=½Ô: &¦13ë! l¬»5ÜÒ{ûQÝÆúï·¼¯#3ÛÍÏ?øiÛS q,ÆþÔ^G¨"´@_ÿÐ>ùØjÚ¯õ Å?V0Ý=NxÿÛÛí QgBlûQ5²~°´aÖð2ufŠf§º‰â{˜}ºsl†„ØL̸zit'ŠðøÿèS¡[6ÿ¯´,L¥ØÃ'‡B³ü[ÔÏ’é:„?gËG²+å“é#,‰LWt&ÖÊ(+I0;ž©Á'Êq)îP…-¡=`µ ê)Ÿ2¾//õL7·‘©ÞDÖ—–hǬ›BÀ€‹‹ÆÉ¥òüT(Ý«âzY˜p!à-Íà%K³eåîêPIÈÎà´¨0Z¨óêEQA§Q "ž¦ï‘$÷Øx`™j7‡4¸Onnà»ödÌvTýº)^!aŦ4Y  üä㱸?=[UªbÍÊx‘.uËäík0m<æ¬v?$ªtrôwðJk>©Á¡”MÄ_ë•à1ïØ3—ÉŽO^2þ|þäwcêœ*bà5, oˆ"Ð麠2Êsähç6cî]àIäôCä·Cc®…cƒ¯O³‘ð)g7~âÿWü–û ï<Æ\!WW)V¡ûJ7€Cüøôk/ë÷¼uÒƒxj²-dÍ(ïšÖ»C{ꇉ‹[¡­lqƒ0ÉY¦+ 0;{”h/¬.ï-Ièü[:0ŠIF,ÎWTo !7QGùÞ™L0ó(¾€fÿ{êCÎJmˆÙULá¡„h§ù;ï¹â šÚay.4Çñ!¸SÁeiý’ mýf.b Á|Ç6o,@¥øvKmPÚÍ4> d‹øÆÚQªÃã£Å^Ð{KO²0¿cM²Ñž²Ï¶<8à;Ä~šøT¿`ÂT-CÔTAz¦eŒ•"û4bvô…©û1j“bШµï§IE=)dƒÅ¿#¯/ý»ß€{@Z["÷ÆDn1LN!åÕT†qăXR**ó)ªb_bztu:r ,*¬8\¶£kŒß”Ìù:‚!4„¬÷ñ+-}9ú¥’Ý^¥Áb©"¶ÕÇìz’âØ(ž¯ÿYªB(ˆ¡v°ÄòÎþì׃üSµ8ø}þoùäkM¢ëœ–­°ºÓ=à´zäÅÌm¨’Úþó[+$¬Šµ—E¦b»`?û‹ß­»elKv›à£Ï·*<˜îY<ŽÙ£dB}¥¥‘‡Bd·Y úeÔOÝ•ÚÞÓKOÕUv£Lö±¤õlU”œB5«"ËEôÃDY…þØóöŒ ,”º9¨Ö^îb`'Q?qêsŒ–œ6; ž¿>„å6¶Oˆ›ìq 9Ì…–ÊYž gmO×{Ís£_@Á>Wüèêò‡­Æ}B6úWreÐ`2Ûðè#€ØÙ1V ;<§Å>­¹®Mîä<˜Þ¨ãç9£Ã(cø[ú*OójXÆž6¦ÕówÅp†üÅÀz*)À¸DÛÌ ”ÏŸlžý#0é‘ù8þJUÇë©ÄÃipRR=\94 î6R NŒCî¹FáeHöØì ?Œ†_‹ØáÊ\ß ÜÕ\è¶qH Üå®hâ,Sp {)ñ‰øÕO!0’xÌâì“ w«°ˆ£™åÕ†ª`?ŠÄ+©.ú1C¸×Æ—~äE›äÚb:žkÓc†&g¯ÕÖc‰!ž³zQçæÊ@CMÊ÷å( Of³#¢:ì7¨»n±²"ö;‡íœšá Ò®×­ªMxsÐaŒZBȰoújâ­$·÷]Ţǘt¯|AÍõ/P W»ØçÙû‡"®8œŒe+HÞöOë^»š"^fMø¹[ù¡áIWv‹_]Rõ"¸†6í`œuðÏþþºÔ>ê[•±Z}у qþ/ް -è„»F猼"•L‹BxAÍhHÅ+º–H¹²NPƒµ>äkPŸäþ=ªVÑž¢š?¹À¾³ú¦ÌJ àÓ¦ %žþ^žñ÷Š&Â=ÒóŒ'"Y?+•^Þã.›^Éþ+ŒJ£þYç hõ)¯ˆ™®V5œ[¡5d8° >@˼ÕðµX µúhO²Ò¥VÊÅ>äêÆÎ)9 îCøV£fn ¥Ê ?–ß lÿ!'¾•î 7IŠ}>mëDçB’í­>—3FY¹b’™qS C1S&wmƒ¥ÖžÓé&º2Œ¦ÞüD·Š¹;uÜ úHÄi÷QOcƒ ›~621°ÕpúGôO2çŒCŸƒj©Z˹|¶FwÂä,V÷OÁ¡¨¹4½ wâØ:sbðvÅEÅQéЪÿñ4º†ÐZ7$@SÕ–žç>.¥†É`úkÿ®]gêŒßhä¨e™l÷QI Ñg¾dräÌ<&…¸ö¯üùrüjÐ×/lX5驸(u³¶¡¸ÇÙô°+Û‰¬Vàì$ÆàÜgÚyu\MhVd<Þ–õúhA|ìlª‘$fÌõ&Î1ÅÙÃcNãði°”%1'϶m{ ª´ÜëCð(êbj#¨d˜&4åã`y"%,ÞcåØM=…OUI$5-hà¯wψ6ÚîҥܦCàcm–jüT~“¨sé;Ææè"§íÏ=þÅ’H( c®ïk¯/²*î;‹Biv—ëŽvc©¢ôï”4Šub`òïþ=)u× ŒvGÊÉVëg(“K“”ÿ½òÆ:]ãmõûÆk¹·¾9”H@bþ:f§Þ`(TΕÊJx|”¤þ¾§;À¯M®ãÒ®¢ñj\®²døKm鸃ßÅ#X}^ ðQ ‹Ú àÚçá’®P\-ŽD‹f 3g"Xoõà&ÿûJ7±Œfs׿¼çÙ–cÜ êÖ3X=~ŸŽô•"†3륚‹Qþ­·,‘uY"ü5ªöküBÕ}`4ˆ¼:û-L…ê­ÐdcªKÔ¼©L—¦8¦/S÷,1õ¿IÉçùcåf}i‡ÉàÉ4=E¤~: _ê¹Tc=tÈ.×~t3w¡îÏMy)гÏ/…&6)aUù¯‚®I­mK+ žŽ^–µÅ4p é[óS’#|$ɢߦWà²kš¨u¼ü¼„~äÍ•8Uk˜›냙Œ˜ÿVJ«££ëH;9aêÐQ  ü$þ-ó]„±¼ƒƒf6Q´'^ûqCûÖPÀð ni‚|ß¹kw‚‰Áè[÷g¹}~±½,Šúv”uk“Ž[pA¶¢ Õak—î5e‹éúÉ3Ka½aÎ+—ƒÆ(¢N]äÁ´€!§Îåü[(Vâñ,µªIÈ ææi`p¸pIã{÷ׂB]b43žß Ýj‹ÅÈ|ÇꘙÛþþ=nFç\ hhâB„‘r(/ó’u¼;³z¬‰~ÅÉA<Qe3\S?;b{Úzh×ÊC¬$¤uëD¯†àŸè/}ô3Q½qöìÅ»Ôd T>™Püâ‚"û€9öÀ·¤1Ý "A©•z¾•Ùížr½ý‡aéÕRm•Húf¿ú&…žlÅÕ.ÿFÙÇ‚Müüxݤ‹QèÄÏ 5òÉ'Þ_ãafõ^ŸIÔ|(¡€éâóÛ; NQ6ʬò¦…8§‚>ví ™ê’#ËÌÅ„1¹xôÖV#­2¶ú+]´†.îê„ÖÈ2Ô¡âñÓÃØ‰›¶ï_š¹ó6üÆù ¢ßá@ o8 y¶iKn3ñv ÁËæþ?F+íùÃX‘NŠ:Sùs_úü\›³x˜^QT N•…;v·ÜNZà„”ïjW_@b?ñ(ÔÞËt.†œ/ù¦9àKPm/!âØ$mv5ƒŠ1f•?1ªÊz| w*wl´2yÈ^ØÎ:ÔÉ€@±*\¡ÿt>*—3@¤t<Ù̳5=èv`üÒ–1û°È¾°ü»«½žº)»mU¨œé‰åˆ2äe(©eÖÉÒ“ N=žËçÅÔ´¤Ê¾{¢¨nƒ¶R1PàÃ^ºü¢ÿN=•ZC‡7Ðçµ3IPÕT*¹â'=0b<TDõ–n³ém…˜’ÌN|k 3Ôj­ÁÆڦԘ¦Ë ¨4uÎR }m:…F¸«mºRÞ¡¦…*CA«Dãs1q’ž ¶ó>E_—wtÁ¶EÖÌTŽà†ï½À‰)¢è§øõB)Kc,óYC”Š¿fѬÖQ õÚ£¼ï6èÆ•˜µ{_A|’äËuŸÈ|äqWŒºÇš ’mª'˜‡ú†4d‹±£VN£økýGhëlüC«§XÔb]?·˜˜ª‡J£syîÓÁœÒ)ÿ!"ÈÿœÈLcæ°Àá˜A>ܤ.'>]@~y»n±#ºu„`Šùc¿ï¿S)ÜX¶G¿rºÕ:w#Ážµ•jv‘ŽgB`(]ä «ƒ-D`¬Žå »§œ®‘XèPȤòè´9íýIűÎgÐ;‡sîý:„­°}ð}¼ë(¿L}ç”hS‰!!mŸ³7­de4¸¢!Z|‚ˆ¯a±°?$}® :Ë"ÝY*X¯tF°§È­Ý&ÝŽÔ•˜ìç(Û±˜N=…&µé£Ì‡Ösl {ÛlKÅ<±Á˜†„G`¸ ¢p•9 p;†rÒê̱rGZ ™ÙKdÙš_1TÒ™”ká‘4qZT·â7üÆÿß—„^®¶Ýn¦å¸2–†1=ͷМ+áR&ùß–8så•›5Ž˜—û“ªÐ!2P¬—ó4_Æ„rPÌ#^Î㥵[ù¹L«ë¢»õÞ–‰æÅ3šç SÀñct³ñ-z·U{©+g¸¡$šü#¯Ï2 ÜࣳäD»ÂÑPCfÞOÛ§,qnowªClRv‚7œi¹X‘”þ#¤ØIØ:ÙðñÓ9[h(hÏ*Ìrˆfî•])Y5mÒ0ãzçò“‡¾¡ªzx¿ƒ¡SÃöà³W©„Œ9¶Ž$:±ßWåbå°ÝôPŒó!î­¥ho]²˜à¹'›f<ø,I”¾¤ú˜Ñßó²;I™UOϸ鄆„t­À®eUY’òüu4“º$´9€JŒ‚üÇÄÃÓ蟱æÏ1 öúü8blvÆ9'<f4ÚiS=jU *ä‡ä[R ›]¦ržÕÔl9ý•‘¨óøŸj^dä:ŒŠðæ^k9Ñá²dÛ(j¦,ñQwªÊã_êס<ÃÐi[ÂÑ¥“ŸéäÁ°Ìw„Ä"%ùº€Þ¨n'sUNˆ R×=X¶ùA“^ìú;ràV¸æÓ@·ñÉ{õžMÖà¢4 ™@^s´¦ Ȫµ6oÞ(Ä®ËÕóÑc 'Q6;ÿë–"1-Ñ·8{ÆA.Š×À_Á_î–N½€GP*ÏãÌ€¸8 °¹qá{ª§ëŸ)¤$—²NÄãb’mTÙ‚ŸATMnÂ^އ’îZXDkªÌzø%|„üǘ¼ê¦Šøçú H¿Iyp“ÒªÉ* ŸðW\/:!_„ŒaAN;©{€œi Óp,ɉù«ÍK Ï ™wMÀµi[ï>²ïA$”çd:±ˆÔ+^9ÚºE‹”ñ%BTØQÐÕ6Ü¿‘p™*BßU)öVõ®²®0 Ì2a:¬§|UzÃéze4¿2CѸ¯P2~}ëk=ijҔne)*Öv½Emê,6®ª&Œ§r(s÷vã&[úŽ«Ñˆrß4¼¢ø%guŒ ÓÕ¿„+Ã?%‡ÇôÄ£Œòrh —œôö䜂”ð lcÖþ:àåãÍ…#wt¹£éï«G·ÖtäR„Î\ëTÜ#ø.û:Xª#K›Ý}ø‘ÁðòÐ9hh‚üŸž+ŽÈ/}ªt`¿æ£Õ ©hŒƒJ²áhê¤sÒt<üô8mŸæãõd´h0}`‹ÿ>~¡ymuþØÙ®FDÝ’“A<#aKV±õaF!O:Š÷ÎhVU¡ÙïØô•p,ûÚá­þ꺵úÆr:{óºÃtŦZÏõ[”º®êz¹ÏÆ ªÌ´\D-,¹ÀÖØ723 ‘q|ó'Y_Z܆õëÆ][ [¹„­»G&¨-熭߬çñõ3ïòÖ¬¹jO†ÞÂE«†;%FÝ1f#ž­ª6/¶ZNÛ%8c®µ“|ôÁiÒaó6ܯ„ͺØ^¨»Bïä¸Êgg¥BW‰jÎM0ʧÇÚ!ù¬v牗ܺ0Ø‚üÇ~ðÍîÐÃ( îŒ©sÓê外ÀçÌJ•Ùלg­äÕ)ÅÚÉì¿ )%Kðˆ@)ö_Äo“NjbàM¿½È-_…‰JÆÝÓ Æ¸à·$Fú ®²ƒ¶»¤± ƒçÖ1$qšB²/ë{™ƒ,§lRKA67ÌFñ åL*lÀL¿µ“B'á#*ê¦\ÕA‚”yóð¡tHQótƒ¥ üM«‘ºaj†AVîã«Óð‚„|“­˜mÎY:C8ƒå^ƒ-Áõy¥¼]$)ÝC…²Ÿå”(£BãÀ_FÎÿkîRóS?߇˜â,%uî|‹‚¯všÑMH Üýx%óúÙ"=|À§MP‹Ày§"2µƒüÅrb@Žz™ Ì­Ùà˜³ZêDBò¤ HDƵ¥ŽñÅll²¤5r/DÉæ–W¹?Líßr/  ϱÏp½®Wʧ^Q ±_ŸÔP³„jÉL"<â-’Õ*ùCèOÇ,)qèê—ê,Ð4þcÇœg#€FY žj£2z§k$=aŠN…Ó»wY/ÐÝÃÀa ׸2ØèäŒbÅO¢oc q—§ø~|{8¨žI¿VÔDÕUÅxFÃY‘÷™^ 'MÿQ@•ÍÞp×ÁÆ`À¡{DH|€¦Ì¥Ï]É—<”óƒ\"uê¨ÙFî´©ºi´[£Z=5ùÓ ››¬4ä||ûàR¹ Š! <Éüµ.ŠtþeAé—H¡1?…÷•OggS@ˆ›O!}üØ­ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.üÆ÷Æ;¨*‡“! ±‚Ò'BeHì+ƈg-Æ@é;.sï^6?ÀTŽí±LžTj¹1¯Ä{šëCY®ý¨"»h³é¯³Â—]‡&ƒœ½¨7gÚ¿­‡®”)= óZG©ò“Óô¿ ÖÚÖqçºÜ-ŽÏ uUy*£]Àrˆw‹OÒ ,êUÅlÐdÉÍsUµª…‡›cQ¢ô‰Š (ÑE™wâ‚øîKÍ9h ¢5 ^–&FTjvªjøý®AEj +ÇãÒŠô§-\x.b'O¤t“ *Žyù3·IOxzI? ¨ø˜©_EüNºÌÓ‘ãxµçÎþàˆÒ÷49$zy-¼µUÖÔ’áË;Ôš¯ß{ÃÒ²O8÷W<–‚$ðÅݹüD´RZŽÕúÈo&X¡o \`qcEc²ŒÔ@Ø‹Åpßk噋Z5aÁ_÷6Eò:/5!Oõìœsßoø>ý^Ä«ç’õP’ƒ‹”ë`Õ{6  /ûc—Ãè û üožcÜžŽÿœk¯xب@ Oé$àO?V[èlU©o–¡Ö÷õ¹“ËŒ¶xïæð'çÉÅ M§`huûںà Æ{xδõ4eš6‡ðþ± =æE›†2Ö• ÂøÀre\}ÄŒy•Cé³Ù­>K±Ë{ÄÝ FV#Òˆ•9Þ0ŽûÒÖ Œ¼±w`­Slô6\hÀ¿Iûã+O=^—¬ûÂùÞÍšvᤅ3%.Ñ䆿ýK¨cÁU—+ãâ[©ÙIÔ¿ ÇõÇõüZòaIÕu0ΰwAš£R—b9S·ùž0îû,\x6ˆŸ–ÂÊ=§Ò–§Ï¹üè|é›Mlè¥ïi>=,™FüÔB ŠUÆ–`p BK×;W]/?uøFÒ9Žà˜iW¼<)Ý>ö¨hyÎ õãÃR£2™bh ާË.YÉáî÷÷ßìŒÈu˜ˆMæ:8¹›‡ð¤4ÄlÍ“Y.Y»¿ÀÏš ýÑHÂöDŽKV{ó­zÛ­8–05Ç^ wWÌë“ÊM¿#@e|ü·³;±÷;¥*-HŠ%™À¼`T»)V^1ÑLâš<áÑX&̬&r3^Œb½+@=—ÕYâQµBw·é÷(!SH1$è3` 9qªºæx_¶z+ÛoÕ¢ç(à²HüÅvƒ.ý½ñýs7€gOÌà•®L·®Ø¹”G¶[Æ3„8ä–Wýk">ä»$­)5µ¡±F`’LÒgÿyªËÕt‘ñ˜Ôµp¦Àu®+íY%³®/yï˜9ãb[ LTZÑ Ad_sÊÿ5£œ¤>³jc~‡Únvôï’`ˆÇª"Rõ%[›<Ýaý‘öðM€- q–®ŒeÜi¨õQÂ!$«a¡Žÿ¿G‡v4A8­u_Ú$–`¢­ûqxͱyA×uØÛ#<7m*­Iû¬P_—ÁFå*ù¬ÜðB§F9–A—F¢Õþ'PžìOð,ºM-!AÒ×&C„cóñYA”øãµÓ˜Øyi 5¤Ÿk€¢vÁáåD9ÒÙR̈”ßÇÐ{¥üǘ`sðøõzlýèW ænŽæffzÙÇäa­-ÂbEÜc+'6eRpm†«Müú[· sÓ²›hvTy3œh÷ ͤËDGÞf­ãßð$!“5$UÀ"Kg?áºJÅ¢Éa¢¦ÿ¶híx·“jîÌ„1yš¿{°&h¸3V »¤Bˆ“]ç°}1[§Ûr.oçÜîIߣkÙGoTpq;’ì†á—BÆÝ7 mÃüå÷QªÔ¸DNÊXÛ¼´ ©&ŒÉôBè’Ô”Uf+b¦™ÇdÕ©(ôÄÒ´V'øùþwÄšM°‹¼š.ñåfÖˆ'?’MZ1?9CnÐG"aÙd²*˜j™Â:«=ÿP¶tNØòò¿Úàg™H«Ø¸‘/\äSe~ÈüÆæWØ{ûnyÓcYF6š~LS€JÝOÒFÍ„ŠtÍÒÖ{žp›@Hæ6¨ýüEŠÍYe4ëëà‘O½à¡Œ¡…JYšÑ@Â!¼ö(N$»<#„É%Ä2qÒ±k!Wl Œk+¹Oß÷N¹’o8³†ãQ†ZÜ2¦WÄ´u”Ïz¹¼“ðèòñ´×ãéÉ ñÌW,Z4‹©‚ø"ÿ1˜ŠKÏ€®’ófꦬS/qŠùÿt¶SE…æ!I#t¾Tƒ¬Pø»}üÆÂʧƒ;‰{žÛU;u^4-×fZ­¤¨øÓ?$Åž;¯ÛðG'ÑõÙ%Ù~”Õ®—ÀžMwÚäÄ[FPå³¼Åve¾qø6 Ý;©¡«Pï?W©¥>1ö^¤ý¨´Ø[œ Öïmí5”bS¾Rzd튥ßÔd7ZêôXÖKvI:%AòlÊá£9I±¤Y ^R†žY“fc²QùïMUÀ“¦=}iÖÊ3´Î«+P¬­(zÃØ3Ð7y.XñãuÉæíªÙè'fNì Åcöx;g ÃÇþUÖ¤K5¸å CípAîàt;¼ŽÞQsÔ{¬_Å­Í^Œ8£¨º½aÿ¢+r[-óp¨mIpCÌjô ÿ&§_™1wgꑞn Ví``ç&% ü[(?ÜTÿúóUžBôLÖ k›žæô†VÿößFó7ãç•iXtXe ›=îxg››|Cú*¬¬š7a"ίª%˜q¬É f̾Ðè›=±´±ÉÝMö.2þÓ2¿‰ãÆÙ1«6ŸÓ9ÆöXam¾þüÛ€mÆe¶¡ 7DZDî VSÌI¯nÂh/M¥_õÒ§‘Ýjû@9aª ãFÉ„j†–L’¡ŸµÖksu gü˜Êå°•0Ü­íàÐèW'AìfãuÜ›ôµ?úK$Z\™€qjÙo…²Åœt‹gí½ i9ü½mýJÐ[|é¢)žQ|.ð¾Î®€¤gJÐßöМK)¨ør™Æ"šÌÝ-»Â'Ì7~›ÿáüÇ‘ l ÌȤàÉ„^væ¤ó@iúo/¼òñ5% ·óê_h„,~&1É2ïÐsdÕǧ·Ï8‚¿¨úwðÂZ€YÀ¦~-ÈŒðjVl;“¥§H ²š‚2|ÊÜ Ü’õXžF›’Ž{Ô2«:E¿àÛò§ ¡í¹¾÷I”ݲhq2_3…ÿÙxàÀqÖ}‘ÒëâÈËÆÃTI”e„·ç oLŠTÞkÄ^í\Í£ÌÍ›¢ÓXI­Ò<ƒ®'qÓOÐvÀôÚªí3¡;(‰eŽ!g[ óæj ÇÎ@›/rÒ Qó  ò,ôóœÙ£RÏå¡.šž_“™ê½¦7иòœ1î-þÑ"õ_èš‚`Õ"Õ¿Öž`µ‹ËÒG®eüÂÖ1á\²ø|l “u†`nͯ6œû™®>uÀ7b°S©t‰ËÈ\”#¶{bÜ*×ÚÔ1gœ¤°?»ÊÁWÖý$Y>ý8C EFäýæ£èáüA›|.zÝÖoŸ´“N=4d{Šaª¾/@¹@ݹ´èL½·Q_›D°("ÈóŸ1w<æÖ¿……X•‰…r6{¾ŠdÖ©ÛK&<=•aˇ6AxÌèÃmTŠ:JëaöâÞÇK ‚¤!{†ÊqµÚÌiµžUü/0>±¿6ä êVî kÜø\}é¾0bOÙ;Å:z;Ý ô®¯³êwïæÅà΀F%¨WÂûœèQJwÖÍ|ü¤šŽ>ñRëôz£ ºÄ`|7üˆ4ûÇ÷ø:–¢ýËŽÍ™üǘ¦†dC^⨑I\` ˜7°èŽ·õ)Î@qZ Ôþ}EGSlʱsrXén/iUèŠKгÄhSâ'¶:e‚úA^Û¨x»Ô¨%gÅŒ~dÖë¡eš ººä•þÔ*ö:ÀþOÁ‘ë©X‚Ù•1;˜GFøkaï“i@•)…ŠjQÀõ¸VuÉØmmÏ ¬ç¹ºï+º&Ά ¤²§Ü#”Ç ÄøqíÿgÀ—„Ôžh<‡±Xôh¶0 ¶!ª§á ‹ü4J‰ ^hG>ðØXêH”Ì®êï"/ÓZó³ò°í´òÞ’cÜú€ð*0”êÉã– *e­)Gô+,ó*䙨—Èl•T¤·í]gŠÓ“ðâ %iæU{%“´ef­Õvã‚Öá¡gOgYü$ឪ­¡í‚À*N§Nà“,‘øÁǪìÒSVóÓxw¬×w¬„ŸÞ–uüMè»|Lxö[â"Z@9óü m;¢(ebÝ™3.“ÀWŽ›‘öŒ¡>Ë&üÿK¯? «–oÏ0§)É8ß-_Å3&½¢ð¿ŠÙ-ß J½4›‘-jö” #_hr¯{Qm~ö=ÄÅ™!pSšKrPÏÔU"YÄ’j"ˆòQ7a‚A/ð"Vš›—j ½ê±UµùJŸ3´Ê*aÏš˜ëÈ©w€õYîML±\Õ´b$2¹‹‹:n ADužB .Z¹‚^ZrpD¢w`ŽÓ]c.÷'Ùøé\ä `Kº¿6Ò.þnKwË žúÆa™ü›5݉'fqO)g`OggSÀ¼›O!~²ˆÎÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ÿ.ü„šœ^³Qƒó\2ãŒàè(Þ¡R¸ç.”;¤WæKK^A¯qAzãjÓ¸Ÿ¦]Kiƒp]ŠIÒhß¹¥(wߺ°göZÌöMr$Yþ< Ä N²Y*Î~¾zoýeÔ&¬Oœú”!f(Ò¾wËûðéŽ&‡@/l6{°«8 ŒÎÖkä(_mçòÖÌådÕÈ0 Ì#lN|~¬+Da`Z³ã%Õå¡xÎF¤ `tcžì§£¼þe´V²h5Š=4³V< —"ñž]ŸÖj¶ÄüwQ1ÿ±ÈZDµèÈéOŸ»Ay&“p¾CcT+”è噘 ù’s GGƹCV.dŠb}Gâ`1Æl!a+öñÔ鑃;»!ÞQ¬\< Ò3À€! PbüD›hûñ%[]Ñ!1éq8ëK @¤ö’ã‚ÒK§#èݰzºm´öêb<½_ø`°ÔûÀ¹¶\'·@ÔðÞºDbŸk(;úâ'P0T'ZôžGMŒyëüWQFvÈ1·¹%¤IEÁÉ¢÷ÜÛÓq2”z_‡@̓”9{'SOV@/°›õ‚ÙÌùÐ/àâ¶7å´û9BòÛÍïò œ:îB+Š?{³áån.Ùï|øÙ¹Ç3 5ÐtTZ:¤D Û}„msÛÌÝÏeùyhÙ†€õ¨>§}|ӣ謧XÙwå²ñ5uR “;÷}ªÌr ¯T$³4kˆ ÞölÂ,iƒ­ÔµÓ¯®ë)Ê>;‚Õ“659Ýò–RÎËšDîÀËPm0ü[yìÑ_{eçz­´GÒ¢g;wFˆ^Bíq~W‹¾P‘å–ÞûW3HÛª`&#a Zº EÅ‚qDÈ}8޲¥ŸT>=îé n·Ý‘ù{˜räôx³}A¯cœ&–ÌõÔK—ª«€õçЮ¯€:S±»!úN%NŽºxN0øË¢3Ü>Ù"–ß }P"dùÞo\­Û»ðºñžXa”$œ}ŸfçÌgiQÏ‘ŽáØíÑïœH08V‡L7äâ£Í¹…µ¿vî¼:\_Uµ;5Ëš£øaeüC”1|X Y%#ø'bè*Ú ]¯µ—ßï%1t 98‰ât:m¯óÎEùŸ Ý?eE­9dî¥Àº£¬v,‘£ËŠðP•G’ê„ïé2éÞ±¸ôÀ·õIx ªîæ,¹L;ã­Þi„‘pÏ\mÔ ½(£%©ßñ¾0m®œ,øƒ ‚j5ªý딫æÁ~ p›+b6ñð‰ X˜ùK±hC ±c‹ˆŸBa5ODÃ+£6‚I3‰cfآŎKú0ætÏ Þ§ xÙ3º|`$Á0 Ôû'Ȳ¾Ëϸ±NqšpúcÚ(t£h¿ߏŸ—ä?pªÈÑÙçvÁÀ¾»§Ê‚.®¾étFòÞÝÖbEÎöÀI!Ë €üÅ£ãä‹Ä\ûé–(„EO¯äаO•À±õ³5vÑìúúO—X޲©Ãe‚P?pá- /ÊÍW-¼2j}VßU.b§ñ¶¡ÏöÊvxÈÞ-Ïí?–-@ ‰¡`-c·–ù’ùo”Xæ=7pKmÌÓtô4T@®‰ÿ£8V>Õ_oäzÔ?ª9‡"=Ê1 ótÙ(cÔ(ãÄËKPVòvc€¨7½6¿YS"Y¡ÌÂ1 ×EißÛë"†OèÌ™ æØËM$jçÀ7öüARa÷¨>½ieÕÙ)Ý,¦{ܱï°BoO!Ñ&ô›ôÒÜ5—®’þ!fãHi>0æä KÏ)·R'B²Ì²2ñwìíÙ4†xp©Ùœ2 ZªAüǘ\™t9MB°÷ƒÙ"ô4[סéù.±!³Ð}$û”ïcżÐë‘ÉÏ8ÅÆêü­šú±m—€[™lo§Ç¢¸—5öQ|#šzF[…E›ìW„“êEjºny(q gÉF«›Pöóã§Ýª=´9•\W±Ýò Ûz·DU—Ç´itäSLpªTtH8?þckE±0óà—Nt¯ª‘”ý O箪ªíœÌ Dì¶çâÌWúOXµ€íšYmŠAŒ^¢#X¾æÕnŒmù S…é…þ s„šÌ âˆ0èRn~d^¹M¦tI;iÚ¶Å+€šÌ]à6ÔkÀUNX7óŠZvzxøl ~26²´2‚-ëÛš9üÇÙf¾>x4~Ï\Ë„ߨUÖ¯Ê$TÔt#~OÑqJ_/МS /I;ïÕߥ»üã ˜S³FVÄÙ~ò¦ðÑÚV$ßS€]¶âh(mÇFX²—,Üc á»5¤Ä¼Ÿöî=ù@P {‹õx#€ú:w3”°æ¥0»D¼Él„Nq%¼r €cÂPS7$!¿¥ø-+wíÚ]ÄöRÿS£ÿÆ5æ+þµÂ˜Ö÷3L@B}¿ßÔS]UËnsríýÅSdxÈð(¥Ï#®”¶lôí œÜ¤üäVú….€>r• ­Ðîž—»>À;²fa™cµÒ¼É#—E™ÏMˆÀ±¥ùȨ6î-5¼ë¬Öy Ó·á¡>RŒ;• §‡x ß>h_¥™¶ŽÝ%‰üÅŸ¥ÙNG¸þùèh³6eu/EÝÌ„Z´½M¸ äùµeN –KÖr3s ×{Aá™cÜÞ^£¯Yð>«Ê}=M;'Ù¤°}ÕNzq2–&ã-¶ÒÁÍ~2’AœÓc©èŠþêÅÌ1¾¨Þ TM”==àPˆ™{ñ‰SsÜdÞó6ÏþÏbªÁ7Þ¡Sdœ*P¿[O)GËK952Må,m•p ]¤òº­É€Þïð\ÃÆÍ&&1·Çar–Šdl]” ÆÀLÖ4œä[Of]Æ}|;yŽÃØRðˆº97Ä‹åðq]† ›œW–%–Ó™7&sÐÿ¹¬ê¦)÷ç‘ånS¿}1Äp¿ÕšSí¾I¶l‰–Û>…ZüAñÉÝe”žùÚö?/Ó⇽ÒS–ö–ÞþlMàrk*ã[56/ù¶c¡ÛŸ±0ÚµÛ@«"~wPzÙZVªt;#`”®ØruuvÐ ÷0*ZÂ6±qIƒ‹e… yÔ”¬ôŒIÂeÖ•IEU7'œ™ÏÁ¦ d3`ã"Õ —f*1­PËaåøk8Ö2¡éŽ© €Qóßíó°¾”?ƒbÿ§‘iÝ´ $Ñœ~âGtüÅÖ–ºÏ¦d½ ½XÑwö‘úH£¶@§¥jžO™ä_OÙð}¦‰þdµ÷ž¹æªê85¦¢53• àîÕŠõAœ»@6ÿ[ˆSgø U%ž\¾=Aöõ¶¥÷aõ<ÕíšIñcGdÓÿ²8àüSÃ(éT8‚†\©v¼ï0cn[¥|²<§XäÛ1ÿÊÇ4²s%­—Æp§öÒc B·vˆ÷ËwLåJ8e›G›Ë‘Žr(ib7‹¦!¿›­¿ÂT¬;ÄþFÞ–¡XàZ™~AF¾(rÙ‹6 )è¶íUŠùp1¥£íZd.oßyuµ¢Ô‹×xÜB‰²ª.­³–fèj‹ØgØÊ8ÖºQMXYHµá*i`9è€íY¬&C߸ysÞ¨ø+Ú¹¢ƒ¹ؾroì §ÁbY.I‹Âô@áØ‡fËâžL¤""OBÄ©ßí÷ûÀÉ>í= QyLvkôè¹?úÉ |ÀœêŠÍ<ºÎÔG@Øœˆ .½ì¾H5VkûRãQihé¾ $ÐÞÓüÇöËŠøh$ãQíÕ¡Ø¢1Ãpé˧܋¼žT襾ªÏ„ù<8¾HýÁóHÃd9íŠ!ðc†1ð(Ã[-6w¹130™Tþß Ó‚é9²œÚÖ,~N¬©üR¥#RÎ~/hº^÷ap²0¬ecñÓ!)J€Ü~’Œ™À‡§jÆ%ìøoì?P$«/À›j©0jøŸQçlö- ê)Zz}ÀZyAz%ñ~© |°Ôo ·»JýÑ‹?õBßÜùöpgáqRÁ)Õb&©²ñ5%ð³ã³> ·×Ðw¦b®´ðÀ­x%h©)À‡†R¿ Œg<ºPìÁÖÈ5Î j²!ŽÔiºN®¯>™ `ú‚M¥¸3`NЩvÆÕyw[]OggSЛO!–m®- ÿ.ÿ.ÿTÿvÿüÅrRªZÙÅúÒô0¸ªoÂÆÖ0¹ÑNìšQ†h¥÷ †Â¨[¯­²újŒ°DŒ°TyC¶¥z?O·0Ë'HyxjŽl²dÛg"¡B=OÞ€i WÎýp3@¯Që¹âµ¾^Uåa! õñ懨ÿšÂJ@‹‹€~xLž³ó?4=DÀa†oÆU Îëàú²Æl5fÁ“(êj÷v5’$6B›Íæ³z³l™pÇŸÑT*8opßtzÐâ&¨ã*DÅ8®¡(oM JÆVQ³)û^?1ÅÒ¤á«YÌ™ZÀBS{{›BGÆL`—p™)ñõ³ d®õªäÒ3öÌtñ^<áØ’zúœÙþ$œ/(g»½a¤(Þ\zÛS“*Ü¢—Ü4šÙùüÆø£CÅJOŒ1qÚúË`¸vÝÝY»h°L©µ‚ môÔêô$sÅø$ƒîWÎ5«:Ñ»bÐë:¸pÇî}€zm{©iiëÇ\ël–Õ>):E©%i NÝ…EKÐg¤6üäÇí‚륮v³^H9Œ`âËt¢lSA¥}½n•bÛÐtÙ•H™ Ýqô‰Ðë!ò_Ì©>‹c‘~×Î r æ@;,²‚y¿z=ŽPűyÑÿxI£qk#o¬Ìfüßß÷â+jÞóAVÌm>5²büúÙ?F74š_ìARk -WuÕŠ–zܘïßAÆÂ“‚-é 3IÉñg!@Ø Uqd'“ÞtT€æ«Bµo ®xŽw‘Å’,²{ 8Û_V$Gµ+šé9ÉüŠuBÉÁÑŒ\21u,(ð¦.Aì—–ÚÉ®µš© DU\*L|Ýã"›EÉ5ÖÅøç‰lÞ¹ÛwHD·†ÎÚd~\~‘‡hnnœ†ÜÓæÜà'…“…üã9ƒ# þ:ý‚5AÆ8:Ÿ¶u*èw¸[êöŒé÷k¬·”D- ‘¹A¹A—oCpÌÉ6ªFLS(¾‘×|˜ooŒÆ)´½Ö’œkæÔ/î ka"FúÁe} Í'ÚQ[¼¼1®P Éþr#Ms)c/^jYpE ÃÐ(¿fÏÁ8†D|Ë#ë¹ÖÍ»ÒÉeâhIMårNÿÕ åyfE#0§ãT»‹ï’œ¡CzÛ‘4^¯³§ŸµîÛ‡Èç¿Rãpð2·ˆ,ñ•YØðïxѳÀ1íñõP<À+p8錅Øu8åË-£ÄÑùt_Qe¶àz–r',æ=v’„‘%VÂüµRš3ÓÆÈÌ‹OðÌ.ÀÒžsÐT"ŽXýG³EìØ£Õžh$ù0"¤`”##6Ê[È-µ„2¥Ð:¶ùÅ9çÁ>©(…[™(ß) åME0аFñ5žuµùnKÛb²F‚rWN¡ÿP®*®¦ýÂt^âÞ©³”wk£nRCô·ˆ'£-‰Éƒ%â`çG#)};^Ú*²(/›yÌl^u‘˜iYpqvùíÎ=«%œšçº ¿*%IÏ÷éçûš; ®qUêÊǸ¢ˆFÙ½hIƒ 'ßRÂ'"V@STê÷EþÖe ®c´å-ó²°a Í1Ò¼ï\eK9±GÐ!ݪV<íf…¹Ÿ€=ôÇôÆÈdóÓð… 1‡íhíS-2^—Ó¦6€j¿Ó»Ó`¨ £H%¾Ø*€ªKœ¸Ý#€Pì=YôÄÿãðOu>x {¢èãí“ìò¨miniaudio-0.11.22/data/README000066400000000000000000000003211475701111600154230ustar00rootroot00000000000000Sounds in this folder are used for testing purposes. They are all in the public domain. Below is a list of all the places I pulled these sounds from. --- https://freesound.org/people/josefpres/sounds/788664/miniaudio-0.11.22/examples/000077500000000000000000000000001475701111600154545ustar00rootroot00000000000000miniaudio-0.11.22/examples/build/000077500000000000000000000000001475701111600165535ustar00rootroot00000000000000miniaudio-0.11.22/examples/build/README.md000066400000000000000000000020321475701111600200270ustar00rootroot00000000000000Examples -------- gcc ../simple_playback.c -o bin/simple_playback -ldl -lm -lpthread gcc ../simple_playback.c -o bin/simple_playback -ldl -lm -lpthread -Wall -Wextra -Wpedantic -std=c89 Emscripten ---------- On Windows, you need to move into the build and run emsdk_env.bat from a command prompt using an absolute path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't work for me for some reason. Examples: emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html -s WASM=0 -Wall -Wextra To compile with support for Audio Worklets: emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html -DMA_ENABLE_AUDIO_WORKLETS -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY If you output WASM it may not work when running the web page locally. To test you can run with something like this: emrun ./bin/simple_playback_sine.html If you want to see stdout on the command line when running from emrun, add `--emrun` to your emcc command.miniaudio-0.11.22/examples/custom_backend.c000066400000000000000000000754011475701111600206100ustar00rootroot00000000000000/* This example show how a custom backend can be implemented. This implements a full-featured SDL2 backend. It's intentionally built using the same paradigms as the built-in backends in order to make it suitable as a solid basis for a custom implementation. The SDL2 backend can be disabled with MA_NO_SDL, exactly like the built-in backends. It supports both runtime and compile-time linking and respects the MA_NO_RUNTIME_LINKING option. It also works on Emscripten which requires the `-s USE_SDL=2` option. There may be times where you want to support more than one custom backend. This example has been designed to make it easy to plug-in extra custom backends without needing to modify any of the base miniaudio initialization code. A custom context structure is declared called `ma_context_ex`. The first member of this structure is a `ma_context` object which allows it to be cast between the two. The same is done for devices, which is called `ma_device_ex`. In these structures there is a section for each custom backend, which in this example is just SDL. These are only enabled at compile time if `MA_SUPPORT_SDL` is defined, which it always is in this example (you may want to have some logic which more intelligently enables or disables SDL support). To use a custom backend, at a minimum you must set the `custom.onContextInit()` callback in the context config. You do not need to set the other callbacks, but if you don't, you must set them in the implementation of the `onContextInit()` callback which is done via an output parameter. This is the approach taken by this example because it's the simplest way to support multiple custom backends. The idea is that the `onContextInit()` callback is set to a generic "loader", which then calls out to a backend-specific implementation which then sets the remaining callbacks if it is successfully initialized. Custom backends are identified with the `ma_backend_custom` backend type. For the purpose of demonstration, this example only uses the `ma_backend_custom` backend type because otherwise the built-in backends would always get chosen first and none of the code for the custom backends would actually get hit. By default, the `ma_backend_custom` backend is the lowest priority backend, except for `ma_backend_null`. */ #include "../miniaudio.c" #ifdef __EMSCRIPTEN__ #include void main_loop__em() { } #endif /* Support SDL on everything. */ #define MA_SUPPORT_SDL /* Only enable SDL if it's hasn't been explicitly disabled (MA_NO_SDL) or enabled (MA_ENABLE_SDL with MA_ENABLE_ONLY_SPECIFIC_BACKENDS) and it's supported at compile time (MA_SUPPORT_SDL). */ #if defined(MA_SUPPORT_SDL) && !defined(MA_NO_SDL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_SDL)) #define MA_HAS_SDL #endif typedef struct { ma_context context; /* Make this the first member so we can cast between ma_context and ma_context_ex. */ #if defined(MA_SUPPORT_SDL) struct { ma_handle hSDL; /* A handle to the SDL2 shared object. We dynamically load function pointers at runtime so we can avoid linking. */ ma_proc SDL_InitSubSystem; ma_proc SDL_QuitSubSystem; ma_proc SDL_GetNumAudioDevices; ma_proc SDL_GetAudioDeviceName; ma_proc SDL_CloseAudioDevice; ma_proc SDL_OpenAudioDevice; ma_proc SDL_PauseAudioDevice; } sdl; #endif } ma_context_ex; typedef struct { ma_device device; /* Make this the first member so we can cast between ma_device and ma_device_ex. */ #if defined(MA_SUPPORT_SDL) struct { int deviceIDPlayback; int deviceIDCapture; } sdl; #endif } ma_device_ex; #if defined(MA_HAS_SDL) /* SDL headers are necessary if using compile-time linking. */ #ifdef MA_NO_RUNTIME_LINKING #ifdef __has_include #ifdef MA_EMSCRIPTEN #if !__has_include() #undef MA_HAS_SDL #endif #else #if !__has_include() #undef MA_HAS_SDL #endif #endif #endif #endif #endif #if defined(MA_HAS_SDL) #define MA_SDL_INIT_AUDIO 0x00000010 #define MA_AUDIO_U8 0x0008 #define MA_AUDIO_S16 0x8010 #define MA_AUDIO_S32 0x8020 #define MA_AUDIO_F32 0x8120 #define MA_SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 #define MA_SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 #define MA_SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 #define MA_SDL_AUDIO_ALLOW_ANY_CHANGE (MA_SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | MA_SDL_AUDIO_ALLOW_FORMAT_CHANGE | MA_SDL_AUDIO_ALLOW_CHANNELS_CHANGE) /* If we are linking at compile time we'll just #include SDL.h. Otherwise we can just redeclare some stuff to avoid the need for development packages to be installed. */ #ifdef MA_NO_RUNTIME_LINKING #define SDL_MAIN_HANDLED #ifdef MA_EMSCRIPTEN #include #else #include #endif typedef SDL_AudioCallback MA_SDL_AudioCallback; typedef SDL_AudioSpec MA_SDL_AudioSpec; typedef SDL_AudioFormat MA_SDL_AudioFormat; typedef SDL_AudioDeviceID MA_SDL_AudioDeviceID; #else typedef void (* MA_SDL_AudioCallback)(void* userdata, ma_uint8* stream, int len); typedef ma_uint16 MA_SDL_AudioFormat; typedef ma_uint32 MA_SDL_AudioDeviceID; typedef struct MA_SDL_AudioSpec { int freq; MA_SDL_AudioFormat format; ma_uint8 channels; ma_uint8 silence; ma_uint16 samples; ma_uint16 padding; ma_uint32 size; MA_SDL_AudioCallback callback; void* userdata; } MA_SDL_AudioSpec; #endif typedef int (* MA_PFN_SDL_InitSubSystem)(ma_uint32 flags); typedef void (* MA_PFN_SDL_QuitSubSystem)(ma_uint32 flags); typedef int (* MA_PFN_SDL_GetNumAudioDevices)(int iscapture); typedef const char* (* MA_PFN_SDL_GetAudioDeviceName)(int index, int iscapture); typedef void (* MA_PFN_SDL_CloseAudioDevice)(MA_SDL_AudioDeviceID dev); typedef MA_SDL_AudioDeviceID (* MA_PFN_SDL_OpenAudioDevice)(const char* device, int iscapture, const MA_SDL_AudioSpec* desired, MA_SDL_AudioSpec* obtained, int allowed_changes); typedef void (* MA_PFN_SDL_PauseAudioDevice)(MA_SDL_AudioDeviceID dev, int pause_on); MA_SDL_AudioFormat ma_format_to_sdl(ma_format format) { switch (format) { case ma_format_unknown: return 0; case ma_format_u8: return MA_AUDIO_U8; case ma_format_s16: return MA_AUDIO_S16; case ma_format_s24: return MA_AUDIO_S32; /* Closest match. */ case ma_format_s32: return MA_AUDIO_S32; case ma_format_f32: return MA_AUDIO_F32; default: return 0; } } ma_format ma_format_from_sdl(MA_SDL_AudioFormat format) { switch (format) { case MA_AUDIO_U8: return ma_format_u8; case MA_AUDIO_S16: return ma_format_s16; case MA_AUDIO_S32: return ma_format_s32; case MA_AUDIO_F32: return ma_format_f32; default: return ma_format_unknown; } } static ma_result ma_context_enumerate_devices__sdl(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_context_ex* pContextEx = (ma_context_ex*)pContext; ma_bool32 isTerminated = MA_FALSE; ma_bool32 cbResult; int iDevice; /* Playback */ if (!isTerminated) { int deviceCount = ((MA_PFN_SDL_GetNumAudioDevices)pContextEx->sdl.SDL_GetNumAudioDevices)(0); for (iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.custom.i = iDevice; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ((MA_PFN_SDL_GetAudioDeviceName)pContextEx->sdl.SDL_GetAudioDeviceName)(iDevice, 0), (size_t)-1); if (iDevice == 0) { deviceInfo.isDefault = MA_TRUE; } cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } /* Capture */ if (!isTerminated) { int deviceCount = ((MA_PFN_SDL_GetNumAudioDevices)pContextEx->sdl.SDL_GetNumAudioDevices)(1); for (iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.custom.i = iDevice; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ((MA_PFN_SDL_GetAudioDeviceName)pContextEx->sdl.SDL_GetAudioDeviceName)(iDevice, 1), (size_t)-1); if (iDevice == 0) { deviceInfo.isDefault = MA_TRUE; } cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__sdl(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_context_ex* pContextEx = (ma_context_ex*)pContext; #if !defined(__EMSCRIPTEN__) MA_SDL_AudioSpec desiredSpec; MA_SDL_AudioSpec obtainedSpec; MA_SDL_AudioDeviceID tempDeviceID; const char* pDeviceName; #endif if (pDeviceID == NULL) { if (deviceType == ma_device_type_playback) { pDeviceInfo->id.custom.i = 0; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { pDeviceInfo->id.custom.i = 0; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } } else { pDeviceInfo->id.custom.i = pDeviceID->custom.i; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ((MA_PFN_SDL_GetAudioDeviceName)pContextEx->sdl.SDL_GetAudioDeviceName)(pDeviceID->custom.i, (deviceType == ma_device_type_playback) ? 0 : 1), (size_t)-1); } if (pDeviceInfo->id.custom.i == 0) { pDeviceInfo->isDefault = MA_TRUE; } /* To get an accurate idea on the backend's native format we need to open the device. Not ideal, but it's the only way. An alternative to this is to report all channel counts, sample rates and formats, but that doesn't offer a good representation of the device's _actual_ ideal format. Note: With Emscripten, it looks like non-zero values need to be specified for desiredSpec. Whatever is specified in desiredSpec will be used by SDL since it uses it just does its own format conversion internally. Therefore, from what I can tell, there's no real way to know the device's actual format which means I'm just going to fall back to the full range of channels and sample rates on Emscripten builds. */ #if defined(__EMSCRIPTEN__) /* Good practice to prioritize the best format first so that the application can use the first data format as their chosen one if desired. */ pDeviceInfo->nativeDataFormatCount = 3; pDeviceInfo->nativeDataFormats[0].format = ma_format_s16; pDeviceInfo->nativeDataFormats[0].channels = 0; /* All channel counts supported. */ pDeviceInfo->nativeDataFormats[0].sampleRate = 0; /* All sample rates supported. */ pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormats[1].format = ma_format_s32; pDeviceInfo->nativeDataFormats[1].channels = 0; /* All channel counts supported. */ pDeviceInfo->nativeDataFormats[1].sampleRate = 0; /* All sample rates supported. */ pDeviceInfo->nativeDataFormats[1].flags = 0; pDeviceInfo->nativeDataFormats[2].format = ma_format_u8; pDeviceInfo->nativeDataFormats[2].channels = 0; /* All channel counts supported. */ pDeviceInfo->nativeDataFormats[2].sampleRate = 0; /* All sample rates supported. */ pDeviceInfo->nativeDataFormats[2].flags = 0; #else MA_ZERO_MEMORY(&desiredSpec, sizeof(desiredSpec)); pDeviceName = NULL; if (pDeviceID != NULL) { pDeviceName = ((MA_PFN_SDL_GetAudioDeviceName)pContextEx->sdl.SDL_GetAudioDeviceName)(pDeviceID->custom.i, (deviceType == ma_device_type_playback) ? 0 : 1); } tempDeviceID = ((MA_PFN_SDL_OpenAudioDevice)pContextEx->sdl.SDL_OpenAudioDevice)(pDeviceName, (deviceType == ma_device_type_playback) ? 0 : 1, &desiredSpec, &obtainedSpec, MA_SDL_AUDIO_ALLOW_ANY_CHANGE); if (tempDeviceID == 0) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to open SDL device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } ((MA_PFN_SDL_CloseAudioDevice)pContextEx->sdl.SDL_CloseAudioDevice)(tempDeviceID); /* Only reporting a single native data format. It'll be whatever SDL decides is the best. */ pDeviceInfo->nativeDataFormatCount = 1; pDeviceInfo->nativeDataFormats[0].format = ma_format_from_sdl(obtainedSpec.format); pDeviceInfo->nativeDataFormats[0].channels = obtainedSpec.channels; pDeviceInfo->nativeDataFormats[0].sampleRate = obtainedSpec.freq; pDeviceInfo->nativeDataFormats[0].flags = 0; /* If miniaudio does not support the format, just use f32 as the native format (SDL will do the necessary conversions for us). */ if (pDeviceInfo->nativeDataFormats[0].format == ma_format_unknown) { pDeviceInfo->nativeDataFormats[0].format = ma_format_f32; } #endif /* __EMSCRIPTEN__ */ return MA_SUCCESS; } void ma_audio_callback_capture__sdl(void* pUserData, ma_uint8* pBuffer, int bufferSizeInBytes) { ma_device_ex* pDeviceEx = (ma_device_ex*)pUserData; ma_device_handle_backend_data_callback((ma_device*)pDeviceEx, NULL, pBuffer, (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(pDeviceEx->device.capture.internalFormat, pDeviceEx->device.capture.internalChannels)); } void ma_audio_callback_playback__sdl(void* pUserData, ma_uint8* pBuffer, int bufferSizeInBytes) { ma_device_ex* pDeviceEx = (ma_device_ex*)pUserData; ma_device_handle_backend_data_callback((ma_device*)pDeviceEx, pBuffer, NULL, (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(pDeviceEx->device.playback.internalFormat, pDeviceEx->device.playback.internalChannels)); } static ma_result ma_device_init_internal__sdl(ma_device_ex* pDeviceEx, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor) { ma_context_ex* pContextEx = (ma_context_ex*)pDeviceEx->device.pContext; MA_SDL_AudioSpec desiredSpec; MA_SDL_AudioSpec obtainedSpec; const char* pDeviceName; int deviceID; /* SDL is a little bit awkward with specifying the buffer size, You need to specify the size of the buffer in frames, but since we may have requested a period size in milliseconds we'll need to convert, which depends on the sample rate. But there's a possibility that the sample rate just set to 0, which indicates that the native sample rate should be used. There's no practical way to calculate this that I can think of right now so I'm just using MA_DEFAULT_SAMPLE_RATE. */ if (pDescriptor->sampleRate == 0) { pDescriptor->sampleRate = MA_DEFAULT_SAMPLE_RATE; } /* When determining the period size, you need to take defaults into account. This is how the size of the period should be determined. 1) If periodSizeInFrames is not 0, use periodSizeInFrames; else 2) If periodSizeInMilliseconds is not 0, use periodSizeInMilliseconds; else 3) If both periodSizeInFrames and periodSizeInMilliseconds is 0, use the backend's default. If the backend does not allow a default buffer size, use a default value of MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY or MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE depending on the value of pConfig->performanceProfile. Note that options 2 and 3 require knowledge of the sample rate in order to convert it to a frame count. You should try to keep the calculation of the period size as accurate as possible, but sometimes it's just not practical so just use whatever you can. A helper function called ma_calculate_buffer_size_in_frames_from_descriptor() is available to do all of this for you which is what we'll be using here. */ pDescriptor->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, pDescriptor->sampleRate, pConfig->performanceProfile); /* SDL wants the buffer size to be a power of 2 for some reason. */ if (pDescriptor->periodSizeInFrames > 32768) { pDescriptor->periodSizeInFrames = 32768; } else { pDescriptor->periodSizeInFrames = ma_next_power_of_2(pDescriptor->periodSizeInFrames); } /* We now have enough information to set up the device. */ MA_ZERO_OBJECT(&desiredSpec); desiredSpec.freq = (int)pDescriptor->sampleRate; desiredSpec.format = ma_format_to_sdl(pDescriptor->format); desiredSpec.channels = (ma_uint8)pDescriptor->channels; desiredSpec.samples = (ma_uint16)pDescriptor->periodSizeInFrames; desiredSpec.callback = (pConfig->deviceType == ma_device_type_capture) ? ma_audio_callback_capture__sdl : ma_audio_callback_playback__sdl; desiredSpec.userdata = pDeviceEx; /* We'll fall back to f32 if we don't have an appropriate mapping between SDL and miniaudio. */ if (desiredSpec.format == 0) { desiredSpec.format = MA_AUDIO_F32; } pDeviceName = NULL; if (pDescriptor->pDeviceID != NULL) { pDeviceName = ((MA_PFN_SDL_GetAudioDeviceName)pContextEx->sdl.SDL_GetAudioDeviceName)(pDescriptor->pDeviceID->custom.i, (pConfig->deviceType == ma_device_type_playback) ? 0 : 1); } deviceID = ((MA_PFN_SDL_OpenAudioDevice)pContextEx->sdl.SDL_OpenAudioDevice)(pDeviceName, (pConfig->deviceType == ma_device_type_playback) ? 0 : 1, &desiredSpec, &obtainedSpec, MA_SDL_AUDIO_ALLOW_ANY_CHANGE); if (deviceID == 0) { ma_log_postf(ma_device_get_log((ma_device*)pDeviceEx), MA_LOG_LEVEL_ERROR, "Failed to open SDL2 device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (pConfig->deviceType == ma_device_type_playback) { pDeviceEx->sdl.deviceIDPlayback = deviceID; } else { pDeviceEx->sdl.deviceIDCapture = deviceID; } /* The descriptor needs to be updated with our actual settings. */ pDescriptor->format = ma_format_from_sdl(obtainedSpec.format); pDescriptor->channels = obtainedSpec.channels; pDescriptor->sampleRate = (ma_uint32)obtainedSpec.freq; ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); pDescriptor->periodSizeInFrames = obtainedSpec.samples; pDescriptor->periodCount = 1; /* SDL doesn't use the notion of period counts, so just set to 1. */ return MA_SUCCESS; } static ma_result ma_device_init__sdl(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_device_ex* pDeviceEx = (ma_device_ex*)pDevice; ma_context_ex* pContextEx = (ma_context_ex*)pDevice->pContext; ma_result result; /* SDL does not support loopback mode, so must return MA_DEVICE_TYPE_NOT_SUPPORTED if it's requested. */ if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_internal__sdl(pDeviceEx, pConfig, pDescriptorCapture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_internal__sdl(pDeviceEx, pConfig, pDescriptorPlayback); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { ((MA_PFN_SDL_CloseAudioDevice)pContextEx->sdl.SDL_CloseAudioDevice)(pDeviceEx->sdl.deviceIDCapture); } return result; } } return MA_SUCCESS; } static ma_result ma_device_uninit__sdl(ma_device* pDevice) { ma_device_ex* pDeviceEx = (ma_device_ex*)pDevice; ma_context_ex* pContextEx = (ma_context_ex*)pDevice->pContext; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_CloseAudioDevice)pContextEx->sdl.SDL_CloseAudioDevice)(pDeviceEx->sdl.deviceIDCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_CloseAudioDevice)pContextEx->sdl.SDL_CloseAudioDevice)(pDeviceEx->sdl.deviceIDCapture); } return MA_SUCCESS; } static ma_result ma_device_start__sdl(ma_device* pDevice) { ma_device_ex* pDeviceEx = (ma_device_ex*)pDevice; ma_context_ex* pContextEx = (ma_context_ex*)pDevice->pContext; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_PauseAudioDevice)pContextEx->sdl.SDL_PauseAudioDevice)(pDeviceEx->sdl.deviceIDCapture, 0); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_PauseAudioDevice)pContextEx->sdl.SDL_PauseAudioDevice)(pDeviceEx->sdl.deviceIDPlayback, 0); } return MA_SUCCESS; } static ma_result ma_device_stop__sdl(ma_device* pDevice) { ma_device_ex* pDeviceEx = (ma_device_ex*)pDevice; ma_context_ex* pContextEx = (ma_context_ex*)pDevice->pContext; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_PauseAudioDevice)pContextEx->sdl.SDL_PauseAudioDevice)(pDeviceEx->sdl.deviceIDCapture, 1); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((MA_PFN_SDL_PauseAudioDevice)pContextEx->sdl.SDL_PauseAudioDevice)(pDeviceEx->sdl.deviceIDPlayback, 1); } return MA_SUCCESS; } static ma_result ma_context_uninit__sdl(ma_context* pContext) { ma_context_ex* pContextEx = (ma_context_ex*)pContext; ((MA_PFN_SDL_QuitSubSystem)pContextEx->sdl.SDL_QuitSubSystem)(MA_SDL_INIT_AUDIO); /* Close the handle to the SDL shared object last. */ ma_dlclose(ma_context_get_log(pContext), pContextEx->sdl.hSDL); pContextEx->sdl.hSDL = NULL; return MA_SUCCESS; } static ma_result ma_context_init__sdl(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_context_ex* pContextEx = (ma_context_ex*)pContext; int resultSDL; #ifndef MA_NO_RUNTIME_LINKING /* We'll use a list of possible shared object names for easier extensibility. */ size_t iName; const char* pSDLNames[] = { #if defined(_WIN32) "SDL2.dll" #elif defined(__APPLE__) "SDL2.framework/SDL2" #else "libSDL2-2.0.so.0" #endif }; (void)pConfig; /* Check if we have SDL2 installed somewhere. If not it's not usable and we need to abort. */ for (iName = 0; iName < ma_countof(pSDLNames); iName += 1) { pContextEx->sdl.hSDL = ma_dlopen(ma_context_get_log(pContext), pSDLNames[iName]); if (pContextEx->sdl.hSDL != NULL) { break; } } if (pContextEx->sdl.hSDL == NULL) { return MA_NO_BACKEND; /* SDL2 could not be loaded. */ } /* Now that we have the handle to the shared object we can go ahead and load some function pointers. */ pContextEx->sdl.SDL_InitSubSystem = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_InitSubSystem"); pContextEx->sdl.SDL_QuitSubSystem = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_QuitSubSystem"); pContextEx->sdl.SDL_GetNumAudioDevices = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_GetNumAudioDevices"); pContextEx->sdl.SDL_GetAudioDeviceName = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_GetAudioDeviceName"); pContextEx->sdl.SDL_CloseAudioDevice = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_CloseAudioDevice"); pContextEx->sdl.SDL_OpenAudioDevice = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_OpenAudioDevice"); pContextEx->sdl.SDL_PauseAudioDevice = ma_dlsym(ma_context_get_log(pContext), pContextEx->sdl.hSDL, "SDL_PauseAudioDevice"); #else pContextEx->sdl.SDL_InitSubSystem = (ma_proc)SDL_InitSubSystem; pContextEx->sdl.SDL_QuitSubSystem = (ma_proc)SDL_QuitSubSystem; pContextEx->sdl.SDL_GetNumAudioDevices = (ma_proc)SDL_GetNumAudioDevices; pContextEx->sdl.SDL_GetAudioDeviceName = (ma_proc)SDL_GetAudioDeviceName; pContextEx->sdl.SDL_CloseAudioDevice = (ma_proc)SDL_CloseAudioDevice; pContextEx->sdl.SDL_OpenAudioDevice = (ma_proc)SDL_OpenAudioDevice; pContextEx->sdl.SDL_PauseAudioDevice = (ma_proc)SDL_PauseAudioDevice; #endif /* MA_NO_RUNTIME_LINKING */ resultSDL = ((MA_PFN_SDL_InitSubSystem)pContextEx->sdl.SDL_InitSubSystem)(MA_SDL_INIT_AUDIO); if (resultSDL != 0) { ma_dlclose(ma_context_get_log(pContext), pContextEx->sdl.hSDL); return MA_ERROR; } /* The last step is to make sure the callbacks are set properly in `pCallbacks`. Internally, miniaudio will copy these callbacks into the context object and then use them for then on for calling into our custom backend. */ pCallbacks->onContextInit = ma_context_init__sdl; pCallbacks->onContextUninit = ma_context_uninit__sdl; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__sdl; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__sdl; pCallbacks->onDeviceInit = ma_device_init__sdl; pCallbacks->onDeviceUninit = ma_device_uninit__sdl; pCallbacks->onDeviceStart = ma_device_start__sdl; pCallbacks->onDeviceStop = ma_device_stop__sdl; return MA_SUCCESS; } #endif /* MA_HAS_SDL */ /* This is our custom backend "loader". All this does is attempts to initialize our custom backends in the order they are listed. The first one to successfully initialize is the one that's chosen. In this example we're just listing them statically, but you can use whatever logic you want to handle backend selection. This is used as the onContextInit() callback in the context config. */ static ma_result ma_context_init__custom_loader(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result = MA_NO_BACKEND; /* Silence some unused parameter warnings just in case no custom backends are enabled. */ (void)pContext; (void)pCallbacks; /* SDL. */ #if !defined(MA_NO_SDL) if (result != MA_SUCCESS) { result = ma_context_init__sdl(pContext, pConfig, pCallbacks); } #endif /* ... plug in any other custom backends here ... */ /* If we have a success result we have initialized a backend. Otherwise we need to tell miniaudio about the error so it can skip over our custom backends. */ return result; } /* Main program starts here. */ #define DEVICE_FORMAT ma_format_f32 #define DEVICE_CHANNELS 2 #define DEVICE_SAMPLE_RATE 48000 void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { if (pDevice->type == ma_device_type_playback) { ma_waveform_read_pcm_frames((ma_waveform*)pDevice->pUserData, pOutput, frameCount, NULL); } if (pDevice->type == ma_device_type_duplex) { ma_copy_pcm_frames(pOutput, pInput, frameCount, pDevice->playback.format, pDevice->playback.channels); } } int main(int argc, char** argv) { ma_result result; ma_context_config contextConfig; ma_context_ex context; ma_device_config deviceConfig; ma_device_ex device; ma_waveform_config sineWaveConfig; ma_waveform sineWave; /* We're just using ma_backend_custom in this example for demonstration purposes, but a more realistic use case would probably want to include other backends as well for robustness. */ ma_backend backends[] = { ma_backend_custom }; /* To implement a custom backend you need to implement the callbacks in the "custom" member of the context config. The only mandatory callback required at this point is the onContextInit() callback. If you do not set the other callbacks, you must set them in onContextInit() by setting them on the `pCallbacks` parameter. The way we're doing it in this example enables us to easily plug in multiple custom backends. What we do is set the onContextInit() callback to a generic "loader" function (ma_context_init__custom_loader() in this example), which then calls out to backend-specific context initialization routines, one of which will be for SDL. That way, if for example we wanted to add support for another backend, we don't need to touch this part of the code. Instead we add logic to ma_context_init__custom_loader() to choose the most appropriate custom backend. That will then fill out the other callbacks appropriately. */ contextConfig = ma_context_config_init(); contextConfig.custom.onContextInit = ma_context_init__custom_loader; result = ma_context_init(backends, sizeof(backends)/sizeof(backends[0]), &contextConfig, (ma_context*)&context); if (result != MA_SUCCESS) { return -1; } /* In playback mode we're just going to play a sine wave. */ sineWaveConfig = ma_waveform_config_init(DEVICE_FORMAT, DEVICE_CHANNELS, DEVICE_SAMPLE_RATE, ma_waveform_type_sine, 0.2, 220); ma_waveform_init(&sineWaveConfig, &sineWave); /* The device is created exactly as per normal. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.capture.format = DEVICE_FORMAT; deviceConfig.capture.channels = DEVICE_CHANNELS; deviceConfig.sampleRate = DEVICE_SAMPLE_RATE; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &sineWave; result = ma_device_init((ma_context*)&context, &deviceConfig, (ma_device*)&device); if (result != MA_SUCCESS) { ma_context_uninit((ma_context*)&context); return -1; } printf("Device Name: %s\n", ((ma_device*)&device)->playback.name); if (ma_device_start((ma_device*)&device) != MA_SUCCESS) { ma_device_uninit((ma_device*)&device); ma_context_uninit((ma_context*)&context); return -5; } #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop__em, 0, 1); #else printf("Press Enter to quit...\n"); getchar(); #endif ma_device_uninit((ma_device*)&device); ma_context_uninit((ma_context*)&context); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/custom_decoder.c000066400000000000000000000071541475701111600206260ustar00rootroot00000000000000/* Demonstrates how to implement a custom decoder. This example implements two custom decoders: * Vorbis via libvorbis * Opus via libopus A custom decoder must implement a data source. In this example, the libvorbis data source is called `ma_libvorbis` and the Opus data source is called `ma_libopus`. These two objects are compatible with the `ma_data_source` APIs and can be taken straight from this example and used in real code. The custom decoding data sources (`ma_libvorbis` and `ma_libopus` in this example) are connected to the decoder via the decoder config (`ma_decoder_config`). You need to implement a vtable for each of your custom decoders. See `ma_decoding_backend_vtable` for the functions you need to implement. The `onInitFile`, `onInitFileW` and `onInitMemory` functions are optional. */ #include "../miniaudio.c" #include "../extras/decoders/libvorbis/miniaudio_libvorbis.c" #include "../extras/decoders/libopus/miniaudio_libopus.c" #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_data_source* pDataSource = (ma_data_source*)pDevice->pUserData; if (pDataSource == NULL) { return; } ma_data_source_read_pcm_frames(pDataSource, pOutput, frameCount, NULL); (void)pInput; } int main(int argc, char** argv) { ma_result result; ma_decoder_config decoderConfig; ma_decoder decoder; ma_device_config deviceConfig; ma_device device; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; /* Add your custom backend vtables here. The order in the array defines the order of priority. The vtables will be passed in via the decoder config. */ ma_decoding_backend_vtable* pCustomBackendVTables[] = { ma_decoding_backend_libvorbis, ma_decoding_backend_libopus }; if (argc < 2) { printf("No input file.\n"); return -1; } /* Initialize the decoder. */ decoderConfig = ma_decoder_config_init_default(); decoderConfig.pCustomBackendUserData = NULL; /* None of our decoders require user data, so this can be set to null. */ decoderConfig.ppCustomBackendVTables = pCustomBackendVTables; decoderConfig.customBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]); result = ma_decoder_init_file(argv[1], &decoderConfig, &decoder); if (result != MA_SUCCESS) { printf("Failed to initialize decoder."); return -1; } ma_data_source_set_looping(&decoder, MA_TRUE); /* Initialize the device. */ result = ma_data_source_get_data_format(&decoder, &format, &channels, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { printf("Failed to retrieve decoder data format."); ma_decoder_uninit(&decoder); return -1; } deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = format; deviceConfig.playback.channels = channels; deviceConfig.sampleRate = sampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &decoder; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); ma_decoder_uninit(&decoder); return -1; } if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return -1; } printf("Press Enter to quit..."); getchar(); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return 0; } miniaudio-0.11.22/examples/custom_decoder_engine.c000066400000000000000000000045371475701111600221550ustar00rootroot00000000000000/* Demonstrates how to implement a custom decoder and use it with the high level API. This is the same as the custom_decoder example, only it's used with the high level engine API rather than the low level decoding API. You can use this to add support for Opus to your games, for example (via libopus). */ #include "../miniaudio.c" #include "../extras/decoders/libvorbis/miniaudio_libvorbis.c" #include "../extras/decoders/libopus/miniaudio_libopus.c" #include int main(int argc, char** argv) { ma_result result; ma_resource_manager_config resourceManagerConfig; ma_resource_manager resourceManager; ma_engine_config engineConfig; ma_engine engine; /* Add your custom backend vtables here. The order in the array defines the order of priority. The vtables will be passed in to the resource manager config. */ ma_decoding_backend_vtable* pCustomBackendVTables[] = { ma_decoding_backend_libvorbis, ma_decoding_backend_libopus }; if (argc < 2) { printf("No input file.\n"); return -1; } /* Using custom decoding backends requires a resource manager. */ resourceManagerConfig = ma_resource_manager_config_init(); resourceManagerConfig.ppCustomDecodingBackendVTables = pCustomBackendVTables; resourceManagerConfig.customDecodingBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]); resourceManagerConfig.pCustomDecodingBackendUserData = NULL; /* <-- This will be passed in to the pUserData parameter of each function in the decoding backend vtables. */ result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager); if (result != MA_SUCCESS) { printf("Failed to initialize resource manager."); return -1; } /* Once we have a resource manager we can create the engine. */ engineConfig = ma_engine_config_init(); engineConfig.pResourceManager = &resourceManager; result = ma_engine_init(&engineConfig, &engine); if (result != MA_SUCCESS) { printf("Failed to initialize engine."); return -1; } /* Now we can play our sound. */ result = ma_engine_play_sound(&engine, argv[1], NULL); if (result != MA_SUCCESS) { printf("Failed to play sound."); return -1; } printf("Press Enter to quit..."); getchar(); return 0; } miniaudio-0.11.22/examples/data_source_chaining.c000066400000000000000000000132611475701111600217540ustar00rootroot00000000000000/* Demonstrates one way to chain together a number of data sources so they play back seamlessly without gaps. This example uses the chaining system built into the `ma_data_source` API. It will take every sound passed onto the command line in order, and then loop back and start again. When looping a chain of data sources, you need only link the last data source back to the first one. To play a chain of data sources, you first need to set up your chain. To set the data source that should be played after another, you have two options: * Set a pointer to a specific data source * Set a callback that will fire when the next data source needs to be retrieved The first option is good for simple scenarios. The second option is useful if you need to perform some action when the end of a sound is reached. This example will be using both. When reading data from a chain, you always read from the head data source. Internally miniaudio will track a pointer to the data source in the chain that is currently playing. If you don't consistently read from the head data source this state will become inconsistent and things won't work correctly. When using a chain, this pointer needs to be reset if you need to play the chain again from the start: ```c ma_data_source_set_current(&headDataSource, &headDataSource); ma_data_source_seek_to_pcm_frame(&headDataSource, 0); ``` The code above is setting the "current" data source in the chain to the head data source, thereby starting the chain from the start again. It is also seeking the head data source back to the start so that playback starts from the start as expected. You do not need to seek non-head items back to the start as miniaudio will do that for you internally. */ #include "../miniaudio.c" #include /* For simplicity, this example requires the device to use floating point samples. */ #define SAMPLE_FORMAT ma_format_f32 #define CHANNEL_COUNT 2 #define SAMPLE_RATE 48000 ma_uint32 g_decoderCount; ma_decoder* g_pDecoders; static ma_data_source* next_callback_tail(ma_data_source* pDataSource) { (void)pDataSource; /* Unused. */ if (g_decoderCount > 0) { /* <-- We check for this in main() so should never happen. */ return NULL; } /* This will be fired when the last item in the chain has reached the end. In this example we want to loop back to the start, so we need only return a pointer back to the head. */ return &g_pDecoders[0]; } static void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* We can just read from the first decoder and miniaudio will resolve the chain for us. Note that if you want to loop the chain, like we're doing in this example, you need to set the `loop` parameter to false, or else only the current data source will be looped. */ ma_data_source_read_pcm_frames(&g_pDecoders[0], pOutput, frameCount, NULL); /* Unused in this example. */ (void)pDevice; (void)pInput; } int main(int argc, char** argv) { ma_result result = MA_SUCCESS; ma_uint32 iDecoder; ma_decoder_config decoderConfig; ma_device_config deviceConfig; ma_device device; if (argc < 2) { printf("No input files.\n"); return -1; } g_decoderCount = argc-1; g_pDecoders = (ma_decoder*)malloc(sizeof(*g_pDecoders) * g_decoderCount); /* In this example, all decoders need to have the same output format. */ decoderConfig = ma_decoder_config_init(SAMPLE_FORMAT, CHANNEL_COUNT, SAMPLE_RATE); for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { result = ma_decoder_init_file(argv[1+iDecoder], &decoderConfig, &g_pDecoders[iDecoder]); if (result != MA_SUCCESS) { ma_uint32 iDecoder2; for (iDecoder2 = 0; iDecoder2 < iDecoder; ++iDecoder2) { ma_decoder_uninit(&g_pDecoders[iDecoder2]); } free(g_pDecoders); printf("Failed to load %s.\n", argv[1+iDecoder]); return -1; } } /* We're going to set up our decoders to run one after the other, but then have the last one loop back to the first one. For demonstration purposes we're going to use the callback method for the last data source. */ for (iDecoder = 0; iDecoder < g_decoderCount-1; iDecoder += 1) { ma_data_source_set_next(&g_pDecoders[iDecoder], &g_pDecoders[iDecoder+1]); } /* For the last data source we'll loop back to the start, but for demonstration purposes we'll use a callback to determine the next data source in the chain. */ ma_data_source_set_next_callback(&g_pDecoders[g_decoderCount-1], next_callback_tail); /* The data source chain has been established so now we can get the device up and running so we can listen to it. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = SAMPLE_FORMAT; deviceConfig.playback.channels = CHANNEL_COUNT; deviceConfig.sampleRate = SAMPLE_RATE; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = NULL; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to open playback device.\n"); goto done_decoders; } result = ma_device_start(&device); if (result != MA_SUCCESS) { printf("Failed to start playback device.\n"); goto done; } printf("Press Enter to quit..."); getchar(); done: ma_device_uninit(&device); done_decoders: for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { ma_decoder_uninit(&g_pDecoders[iDecoder]); } free(g_pDecoders); return 0; } miniaudio-0.11.22/examples/duplex_effect.c000066400000000000000000000140731475701111600204420ustar00rootroot00000000000000/* Demonstrates how to apply an effect to a duplex stream using the node graph system. This example applies a vocoder effect to the input stream before outputting it. A custom node called `ma_vocoder_node` is used to achieve the effect which can be found in the extras folder in the miniaudio repository. The vocoder node uses https://github.com/blastbay/voclib to achieve the effect. */ #include "../miniaudio.c" #include "../extras/nodes/ma_vocoder_node/ma_vocoder_node.c" #include #define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 1 /* For this example, always set to 1. */ static ma_waveform g_sourceData; /* The underlying data source of the source node. */ static ma_audio_buffer_ref g_exciteData; /* The underlying data source of the excite node. */ static ma_data_source_node g_sourceNode; /* A data source node containing the source data we'll be sending through to the vocoder. This will be routed into the first bus of the vocoder node. */ static ma_data_source_node g_exciteNode; /* A data source node containing the excite data we'll be sending through to the vocoder. This will be routed into the second bus of the vocoder node. */ static ma_vocoder_node g_vocoderNode; /* The vocoder node. */ static ma_node_graph g_nodeGraph; void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* This example assumes the playback and capture sides use the same format and channel count. The format must be f32. */ if (pDevice->capture.format != DEVICE_FORMAT || pDevice->playback.format != DEVICE_FORMAT || pDevice->capture.channels != pDevice->playback.channels) { return; } /* The node graph system is a pulling style of API. At the lowest level of the chain will be a node acting as a data source for the purpose of delivering the initial audio data. In our case, the data source is our `pInput` buffer. We need to update the underlying data source so that it read data from `pInput`. */ ma_audio_buffer_ref_set_data(&g_exciteData, pInput, frameCount); /* With the source buffer configured we can now read directly from the node graph. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; ma_node_graph_config nodeGraphConfig; ma_vocoder_node_config vocoderNodeConfig; ma_data_source_node_config sourceNodeConfig; ma_data_source_node_config exciteNodeConfig; ma_waveform_config waveformConfig; deviceConfig = ma_device_config_init(ma_device_type_duplex); deviceConfig.capture.pDeviceID = NULL; deviceConfig.capture.format = DEVICE_FORMAT; deviceConfig.capture.channels = DEVICE_CHANNELS; deviceConfig.capture.shareMode = ma_share_mode_shared; deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } /* Now we can setup our node graph. */ nodeGraphConfig = ma_node_graph_config_init(device.capture.channels); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("Failed to initialize node graph."); goto done0; } /* Vocoder. Attached straight to the endpoint. */ vocoderNodeConfig = ma_vocoder_node_config_init(device.capture.channels, device.sampleRate); result = ma_vocoder_node_init(&g_nodeGraph, &vocoderNodeConfig, NULL, &g_vocoderNode); if (result != MA_SUCCESS) { printf("Failed to initialize vocoder node."); goto done1; } ma_node_attach_output_bus(&g_vocoderNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Amplify the volume of the vocoder output because in my testing it is a bit quiet. */ ma_node_set_output_bus_volume(&g_vocoderNode, 0, 4); /* Source/carrier. Attached to input bus 0 of the vocoder node. */ waveformConfig = ma_waveform_config_init(device.capture.format, device.capture.channels, device.sampleRate, ma_waveform_type_sawtooth, 1.0, 50); result = ma_waveform_init(&waveformConfig, &g_sourceData); if (result != MA_SUCCESS) { printf("Failed to initialize waveform for excite node."); goto done3; } sourceNodeConfig = ma_data_source_node_config_init(&g_sourceData); result = ma_data_source_node_init(&g_nodeGraph, &sourceNodeConfig, NULL, &g_sourceNode); if (result != MA_SUCCESS) { printf("Failed to initialize excite node."); goto done3; } ma_node_attach_output_bus(&g_sourceNode, 0, &g_vocoderNode, 0); /* Excite/modulator. Attached to input bus 1 of the vocoder node. */ result = ma_audio_buffer_ref_init(device.capture.format, device.capture.channels, NULL, 0, &g_exciteData); if (result != MA_SUCCESS) { printf("Failed to initialize audio buffer for source."); goto done2; } exciteNodeConfig = ma_data_source_node_config_init(&g_exciteData); result = ma_data_source_node_init(&g_nodeGraph, &exciteNodeConfig, NULL, &g_exciteNode); if (result != MA_SUCCESS) { printf("Failed to initialize source node."); goto done2; } ma_node_attach_output_bus(&g_exciteNode, 0, &g_vocoderNode, 1); ma_device_start(&device); printf("Press Enter to quit...\n"); getchar(); /* It's important that we stop the device first or else we'll uninitialize the graph from under the device. */ ma_device_stop(&device); /*done4:*/ ma_data_source_node_uninit(&g_exciteNode, NULL); done3: ma_data_source_node_uninit(&g_sourceNode, NULL); done2: ma_vocoder_node_uninit(&g_vocoderNode, NULL); done1: ma_node_graph_uninit(&g_nodeGraph, NULL); done0: ma_device_uninit(&device); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/engine_advanced.c000066400000000000000000000250111475701111600207110ustar00rootroot00000000000000/* This example demonstrates some of the advanced features of the high level engine API. The following features are demonstrated: * Initialization of the engine from a pre-initialized device. * Self-managed resource managers. * Multiple engines with a shared resource manager. * Creation and management of `ma_sound` objects. This example will play the sound that's passed in on the command line. Using a shared resource manager, as we do in this example, is useful for when you want to user multiple engines so that you can output to multiple playback devices simultaneoulys. An example might be a local co-op multiplayer game where each player has their own headphones. */ #include "../miniaudio.c" #define MAX_DEVICES 2 #define MAX_SOUNDS 32 void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { (void)pInput; /* Since we're managing the underlying device ourselves, we need to read from the engine directly. To do this we need access to the `ma_engine` object which we passed in to the user data. One advantage of this is that you could do your own audio processing in addition to the engine's standard processing. */ ma_engine_read_pcm_frames((ma_engine*)pDevice->pUserData, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_context context; ma_resource_manager_config resourceManagerConfig; ma_resource_manager resourceManager; ma_engine engines[MAX_DEVICES]; ma_device devices[MAX_DEVICES]; ma_uint32 engineCount = 0; ma_uint32 iEngine; ma_device_info* pPlaybackDeviceInfos; ma_uint32 playbackDeviceCount; ma_uint32 iAvailableDevice; ma_uint32 iChosenDevice; ma_sound sounds[MAX_SOUNDS]; ma_uint32 soundCount; ma_uint32 iSound; if (argc < 2) { printf("No input file."); return -1; } /* We are going to be initializing multiple engines. In order to save on memory usage we can use a self managed resource manager so we can share a single resource manager across multiple engines. */ resourceManagerConfig = ma_resource_manager_config_init(); resourceManagerConfig.decodedFormat = ma_format_f32; /* ma_format_f32 should almost always be used as that's what the engine (and most everything else) uses for mixing. */ resourceManagerConfig.decodedChannels = 0; /* Setting the channel count to 0 will cause sounds to use their native channel count. */ resourceManagerConfig.decodedSampleRate = 48000; /* Using a consistent sample rate is useful for avoiding expensive resampling in the audio thread. This will result in resampling being performed by the loading thread(s). */ result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager); if (result != MA_SUCCESS) { printf("Failed to initialize resource manager."); return -1; } /* We're going to want a context so we can enumerate our playback devices. */ result = ma_context_init(NULL, 0, NULL, &context); if (result != MA_SUCCESS) { printf("Failed to initialize context."); return -1; } /* Now that we have a context we will want to enumerate over each device so we can display them to the user and give them a chance to select the output devices they want to use. */ result = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, NULL, NULL); if (result != MA_SUCCESS) { printf("Failed to enumerate playback devices."); ma_context_uninit(&context); return -1; } /* We have our devices, so now we want to get the user to select the devices they want to output to. */ engineCount = 0; for (iChosenDevice = 0; iChosenDevice < MAX_DEVICES; iChosenDevice += 1) { int c = 0; for (;;) { printf("Select playback device %d ([%d - %d], Q to quit):\n", iChosenDevice+1, 0, ma_min((int)playbackDeviceCount, 9)); for (iAvailableDevice = 0; iAvailableDevice < playbackDeviceCount; iAvailableDevice += 1) { printf(" %d: %s\n", iAvailableDevice, pPlaybackDeviceInfos[iAvailableDevice].name); } for (;;) { c = getchar(); if (c != '\n') { break; } } if (c == 'q' || c == 'Q') { return 0; /* User aborted. */ } if (c >= '0' && c <= '9') { c -= '0'; if (c < (int)playbackDeviceCount) { ma_device_config deviceConfig; ma_engine_config engineConfig; /* Create the device first before the engine. We'll specify the device in the engine's config. This is optional. When a device is not pre-initialized the engine will create one for you internally. The device does not need to be started here - the engine will do that for us in `ma_engine_start()`. The device's format is derived from the resource manager, but can be whatever you want. It's useful to keep the format consistent with the resource manager to avoid data conversions costs in the audio callback. In this example we're using the resource manager's sample format and sample rate, but leaving the channel count set to the device's native channels. You can use whatever format/channels/rate you like. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.pDeviceID = &pPlaybackDeviceInfos[c].id; deviceConfig.playback.format = resourceManager.config.decodedFormat; deviceConfig.playback.channels = 0; deviceConfig.sampleRate = resourceManager.config.decodedSampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &engines[engineCount]; result = ma_device_init(&context, &deviceConfig, &devices[engineCount]); if (result != MA_SUCCESS) { printf("Failed to initialize device for %s.\n", pPlaybackDeviceInfos[c].name); return -1; } /* Now that we have the device we can initialize the engine. The device is passed into the engine's config. */ engineConfig = ma_engine_config_init(); engineConfig.pDevice = &devices[engineCount]; engineConfig.pResourceManager = &resourceManager; engineConfig.noAutoStart = MA_TRUE; /* Don't start the engine by default - we'll do that manually below. */ result = ma_engine_init(&engineConfig, &engines[engineCount]); if (result != MA_SUCCESS) { printf("Failed to initialize engine for %s.\n", pPlaybackDeviceInfos[c].name); ma_device_uninit(&devices[engineCount]); return -1; } engineCount += 1; break; } else { printf("Invalid device number.\n"); } } else { printf("Invalid device number.\n"); } } printf("Device %d: %s\n", iChosenDevice+1, pPlaybackDeviceInfos[c].name); } /* We should now have our engine's initialized. We can now start them. */ for (iEngine = 0; iEngine < engineCount; iEngine += 1) { result = ma_engine_start(&engines[iEngine]); if (result != MA_SUCCESS) { printf("WARNING: Failed to start engine %d.\n", iEngine); } } /* At this point our engine's are running and outputting nothing but silence. To get them playing something we'll need some sounds. In this example we're just using one sound per engine, but you can create as many as you like. Since we're using a shared resource manager, the sound data will only be loaded once. This is how you would implement multiple listeners. */ soundCount = 0; for (iEngine = 0; iEngine < engineCount; iEngine += 1) { /* Just one sound per engine in this example. We're going to be loading this asynchronously. */ result = ma_sound_init_from_file(&engines[iEngine], argv[1], MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM, NULL, NULL, &sounds[iEngine]); if (result != MA_SUCCESS) { printf("WARNING: Failed to load sound \"%s\"", argv[1]); break; } /* The sound can be started as soon as ma_sound_init_from_file() returns, even for sounds that are initialized with MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC. The sound will start playing while it's being loaded. Note that if the asynchronous loading process cannot keep up with the rate at which you try reading you'll end up glitching. If this is an issue, you need to not load sounds asynchronously. */ result = ma_sound_start(&sounds[iEngine]); if (result != MA_SUCCESS) { printf("WARNING: Failed to start sound."); } soundCount += 1; } printf("Press Enter to quit..."); getchar(); for (;;) { int c = getchar(); if (c == '\n') { break; } } /* Teardown. */ /* The application owns the `ma_sound` object which means you're responsible for uninitializing them. */ for (iSound = 0; iSound < soundCount; iSound += 1) { ma_sound_uninit(&sounds[iSound]); } /* We can now uninitialize each engine. */ for (iEngine = 0; iEngine < engineCount; iEngine += 1) { ma_engine_uninit(&engines[iEngine]); /* The engine has been uninitialized so now lets uninitialize the device. Do this first to ensure we don't uninitialize the resource manager from under the device while the data callback is running. */ ma_device_uninit(&devices[iEngine]); } /* The context can only be uninitialized after the devices. */ ma_context_uninit(&context); /* Do the resource manager last. This way we can guarantee the data callbacks of each device aren't trying to access and data managed by the resource manager. */ ma_resource_manager_uninit(&resourceManager); return 0; } miniaudio-0.11.22/examples/engine_effects.c000066400000000000000000000075211475701111600205710ustar00rootroot00000000000000/* Demonstrates how to apply an effect to sounds using the high level engine API. This example will load a file from the command line and apply an echo/delay effect to it. It will show you how to manage `ma_sound` objects and how to insert an effect into the graph. The `ma_engine` object is a node graph and is compatible with the `ma_node_graph` API. The `ma_sound` object is a node within the node and is compatible with the `ma_node` API. This means that applying an effect is as simple as inserting an effect node into the graph and plugging in the sound's output into the effect's input. See the Node Graph example for how to use the node graph. This example is playing only a single sound at a time which means only a single `ma_sound` object it being used. If you want to play multiple sounds at the same time, even if they're for the same sound file, you need multiple `ma_sound` objects. */ #include "../miniaudio.c" #define DELAY_IN_SECONDS 0.2f #define DECAY 0.25f /* Volume falloff for each echo. */ static ma_engine g_engine; static ma_sound g_sound; /* This example will play only a single sound at once, so we only need one `ma_sound` object. */ static ma_delay_node g_delayNode; /* The echo effect is achieved using a delay node. */ int main(int argc, char** argv) { ma_result result; if (argc < 2) { printf("No input file."); return -1; } /* The engine needs to be initialized first. */ result = ma_engine_init(NULL, &g_engine); if (result != MA_SUCCESS) { printf("Failed to initialize audio engine."); return -1; } /* We'll build our graph starting from the end so initialize the delay node now. The output of this node will be connected straight to the output. You could also attach it to a sound group or any other node that accepts an input. Creating a node requires a pointer to the node graph that owns it. The engine itself is a node graph. In the code below we can get a pointer to the node graph with `ma_engine_get_node_graph()` or we could simple cast the engine to a ma_node_graph* like so: (ma_node_graph*)&g_engine The endpoint of the graph can be retrieved with `ma_engine_get_endpoint()`. */ { ma_delay_node_config delayNodeConfig; ma_uint32 channels; ma_uint32 sampleRate; channels = ma_engine_get_channels(&g_engine); sampleRate = ma_engine_get_sample_rate(&g_engine); delayNodeConfig = ma_delay_node_config_init(channels, sampleRate, (ma_uint32)(sampleRate * DELAY_IN_SECONDS), DECAY); result = ma_delay_node_init(ma_engine_get_node_graph(&g_engine), &delayNodeConfig, NULL, &g_delayNode); if (result != MA_SUCCESS) { printf("Failed to initialize delay node."); return -1; } /* Connect the output of the delay node to the input of the endpoint. */ ma_node_attach_output_bus(&g_delayNode, 0, ma_engine_get_endpoint(&g_engine), 0); } /* Now we can load the sound and connect it to the delay node. */ { result = ma_sound_init_from_file(&g_engine, argv[1], 0, NULL, NULL, &g_sound); if (result != MA_SUCCESS) { printf("Failed to initialize sound \"%s\".", argv[1]); return -1; } /* Connect the output of the sound to the input of the effect. */ ma_node_attach_output_bus(&g_sound, 0, &g_delayNode, 0); /* Start the sound after it's applied to the sound. Otherwise there could be a scenario where the very first part of it is read before the attachment to the effect is made. */ ma_sound_start(&g_sound); } printf("Press Enter to quit..."); getchar(); ma_sound_uninit(&g_sound); ma_delay_node_uninit(&g_delayNode, NULL); ma_engine_uninit(&g_engine); return 0; } miniaudio-0.11.22/examples/engine_hello_world.c000066400000000000000000000012201475701111600214520ustar00rootroot00000000000000/* This example demonstrates how to initialize an audio engine and play a sound. This will play the sound specified on the command line. */ #include "../miniaudio.c" #include int main(int argc, char** argv) { ma_result result; ma_engine engine; if (argc < 2) { printf("No input file."); return -1; } result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { printf("Failed to initialize audio engine."); return -1; } ma_engine_play_sound(&engine, argv[1], NULL); printf("Press Enter to quit..."); getchar(); ma_engine_uninit(&engine); return 0; } miniaudio-0.11.22/examples/engine_sdl.c000066400000000000000000000107171475701111600177350ustar00rootroot00000000000000/* Shows how to use the high level engine API with SDL. By default, miniaudio's engine API will initialize a device internally for audio output. You can instead use the engine independently of a device. To show this off, this example will use SDL for audio output instead of miniaudio. This example will load the sound specified on the command line and rotate it around the listener's head. */ #define MA_NO_DEVICE_IO /* <-- Disables the `ma_device` API. We don't need that in this example since SDL will be doing that part for us. */ #include "../miniaudio.c" #define SDL_MAIN_HANDLED #include /* Change this to your include location. Might be . */ #define CHANNELS 2 /* Must be stereo for this example. */ #define SAMPLE_RATE 48000 static ma_engine g_engine; static ma_sound g_sound; /* This example will play only a single sound at once, so we only need one `ma_sound` object. */ void data_callback(void* pUserData, ma_uint8* pBuffer, int bufferSizeInBytes) { (void)pUserData; /* Reading is just a matter of reading straight from the engine. */ ma_uint32 bufferSizeInFrames = (ma_uint32)bufferSizeInBytes / ma_get_bytes_per_frame(ma_format_f32, ma_engine_get_channels(&g_engine)); ma_engine_read_pcm_frames(&g_engine, pBuffer, bufferSizeInFrames, NULL); } int main(int argc, char** argv) { ma_result result; ma_engine_config engineConfig; SDL_AudioSpec desiredSpec; SDL_AudioSpec obtainedSpec; SDL_AudioDeviceID deviceID; if (argc < 2) { printf("No input file."); return -1; } /* We'll initialize the engine first for the purpose of the example, but since the engine and SDL are independent of each other you can initialize them in any order. You need only make sure the channel count and sample rates are consistent between the two. When initializing the engine it's important to make sure we don't initialize a device internally because we want SDL to be dealing with that for us instead. */ engineConfig = ma_engine_config_init(); engineConfig.noDevice = MA_TRUE; /* <-- Make sure this is set so that no device is created (we'll deal with that ourselves). */ engineConfig.channels = CHANNELS; engineConfig.sampleRate = SAMPLE_RATE; result = ma_engine_init(&engineConfig, &g_engine); if (result != MA_SUCCESS) { printf("Failed to initialize audio engine."); return -1; } /* Now load our sound. */ result = ma_sound_init_from_file(&g_engine, argv[1], 0, NULL, NULL, &g_sound); if (result != MA_SUCCESS) { printf("Failed to initialize sound."); return -1; } /* Loop the sound so we can continuously hear it. */ ma_sound_set_looping(&g_sound, MA_TRUE); /* The sound will not be started by default, so start it now. We won't hear anything until the SDL audio device has been opened and started. */ ma_sound_start(&g_sound); /* Now that we have the engine and sound we can initialize SDL. This could have also been done first before the engine and sound. */ if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0) { printf("Failed to initialize SDL sub-system."); return -1; } MA_ZERO_OBJECT(&desiredSpec); desiredSpec.freq = ma_engine_get_sample_rate(&g_engine); desiredSpec.format = AUDIO_F32; desiredSpec.channels = ma_engine_get_channels(&g_engine); desiredSpec.samples = 512; desiredSpec.callback = data_callback; desiredSpec.userdata = NULL; deviceID = SDL_OpenAudioDevice(NULL, 0, &desiredSpec, &obtainedSpec, SDL_AUDIO_ALLOW_ANY_CHANGE); if (deviceID == 0) { printf("Failed to open SDL audio device."); return -1; } /* Start playback. */ SDL_PauseAudioDevice(deviceID, 0); #if 1 { /* We'll move the sound around the listener which we'll leave at the origin. */ float stepAngle = 0.002f; float angle = 0; float distance = 2; for (;;) { double x = ma_cosd(angle) - ma_sind(angle); double y = ma_sind(angle) + ma_cosd(angle); ma_sound_set_position(&g_sound, (float)x * distance, 0, (float)y * distance); angle += stepAngle; ma_sleep(1); } } #else printf("Press Enter to quit..."); getchar(); #endif ma_sound_uninit(&g_sound); ma_engine_uninit(&g_engine); SDL_CloseAudioDevice(deviceID); SDL_QuitSubSystem(SDL_INIT_AUDIO); return 0; }miniaudio-0.11.22/examples/engine_steamaudio.c000066400000000000000000000420621475701111600213040ustar00rootroot00000000000000/* Demonstrates integration of Steam Audio with miniaudio's engine API. In this example a HRTF effect from Steam Audio will be applied. To do this a custom node will be implemented which uses Steam Audio's IPLBinauralEffect and IPLHRTF objects. By implementing this as a node, it can be plugged into any position within the graph. The output channel count of this node is always stereo. Steam Audio requires fixed sized processing, the size of which must be specified at initialization time of the IPLBinauralEffect and IPLHRTF objects. To ensure miniaudio and Steam Audio are consistent, you must set the period size in the engine config to be consistent with the frame size you specify in your IPLAudioSettings object. If for some reason you want the period size of the engine to be different to that of your Steam Audio configuration, you'll need to implement a sort of buffering solution to your node. */ #include "../miniaudio.c" #include /* Required for uint32_t which is used by STEAMAUDIO_VERSION, and a random use of uint8_t. If there's a Steam Audio maintainer reading this, that needs to be fixed to use IPLuint32 and IPLuint8. */ #include /* Steam Audio */ #define FORMAT ma_format_f32 /* Must be floating point. */ #define CHANNELS 2 /* Must be stereo for this example. */ #define SAMPLE_RATE 48000 static ma_result ma_result_from_IPLerror(IPLerror error) { switch (error) { case IPL_STATUS_SUCCESS: return MA_SUCCESS; case IPL_STATUS_OUTOFMEMORY: return MA_OUT_OF_MEMORY; case IPL_STATUS_INITIALIZATION: case IPL_STATUS_FAILURE: default: return MA_ERROR; } } typedef struct { ma_node_config nodeConfig; ma_uint32 channelsIn; IPLAudioSettings iplAudioSettings; IPLContext iplContext; IPLHRTF iplHRTF; /* There is one HRTF object to many binaural effect objects. */ } ma_steamaudio_binaural_node_config; MA_API ma_steamaudio_binaural_node_config ma_steamaudio_binaural_node_config_init(ma_uint32 channelsIn, IPLAudioSettings iplAudioSettings, IPLContext iplContext, IPLHRTF iplHRTF); typedef struct { ma_node_base baseNode; IPLAudioSettings iplAudioSettings; IPLContext iplContext; IPLHRTF iplHRTF; IPLBinauralEffect iplEffect; ma_vec3f direction; float* ppBuffersIn[2]; /* Each buffer is an offset of _pHeap. */ float* ppBuffersOut[2]; /* Each buffer is an offset of _pHeap. */ void* _pHeap; } ma_steamaudio_binaural_node; MA_API ma_result ma_steamaudio_binaural_node_init(ma_node_graph* pNodeGraph, const ma_steamaudio_binaural_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_steamaudio_binaural_node* pBinauralNode); MA_API void ma_steamaudio_binaural_node_uninit(ma_steamaudio_binaural_node* pBinauralNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_steamaudio_binaural_node_set_direction(ma_steamaudio_binaural_node* pBinauralNode, float x, float y, float z); MA_API ma_steamaudio_binaural_node_config ma_steamaudio_binaural_node_config_init(ma_uint32 channelsIn, IPLAudioSettings iplAudioSettings, IPLContext iplContext, IPLHRTF iplHRTF) { ma_steamaudio_binaural_node_config config; MA_ZERO_OBJECT(&config); config.nodeConfig = ma_node_config_init(); config.channelsIn = channelsIn; config.iplAudioSettings = iplAudioSettings; config.iplContext = iplContext; config.iplHRTF = iplHRTF; return config; } static void ma_steamaudio_binaural_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_steamaudio_binaural_node* pBinauralNode = (ma_steamaudio_binaural_node*)pNode; IPLBinauralEffectParams binauralParams; IPLAudioBuffer inputBufferDesc; IPLAudioBuffer outputBufferDesc; ma_uint32 totalFramesToProcess = *pFrameCountOut; ma_uint32 totalFramesProcessed = 0; MA_ZERO_OBJECT(&binauralParams); binauralParams.direction.x = pBinauralNode->direction.x; binauralParams.direction.y = pBinauralNode->direction.y; binauralParams.direction.z = pBinauralNode->direction.z; binauralParams.interpolation = IPL_HRTFINTERPOLATION_NEAREST; binauralParams.spatialBlend = 1.0f; binauralParams.hrtf = pBinauralNode->iplHRTF; inputBufferDesc.numChannels = (IPLint32)ma_node_get_input_channels(pNode, 0); /* We'll run this in a loop just in case our deinterleaved buffers are too small. */ outputBufferDesc.numSamples = pBinauralNode->iplAudioSettings.frameSize; outputBufferDesc.numChannels = 2; outputBufferDesc.data = pBinauralNode->ppBuffersOut; while (totalFramesProcessed < totalFramesToProcess) { ma_uint32 framesToProcessThisIteration = totalFramesToProcess - totalFramesProcessed; if (framesToProcessThisIteration > (ma_uint32)pBinauralNode->iplAudioSettings.frameSize) { framesToProcessThisIteration = (ma_uint32)pBinauralNode->iplAudioSettings.frameSize; } if (inputBufferDesc.numChannels == 1) { /* Fast path. No need for deinterleaving since it's a mono stream. */ pBinauralNode->ppBuffersIn[0] = (float*)ma_offset_pcm_frames_const_ptr_f32(ppFramesIn[0], totalFramesProcessed, 1); } else { /* Slow path. Need to deinterleave the input data. */ ma_deinterleave_pcm_frames(ma_format_f32, inputBufferDesc.numChannels, framesToProcessThisIteration, ma_offset_pcm_frames_const_ptr_f32(ppFramesIn[0], totalFramesProcessed, inputBufferDesc.numChannels), (void**)&pBinauralNode->ppBuffersIn[0]); } inputBufferDesc.data = pBinauralNode->ppBuffersIn; inputBufferDesc.numSamples = (IPLint32)framesToProcessThisIteration; /* Apply the effect. */ iplBinauralEffectApply(pBinauralNode->iplEffect, &binauralParams, &inputBufferDesc, &outputBufferDesc); /* Interleave straight into the output buffer. */ ma_interleave_pcm_frames(ma_format_f32, 2, framesToProcessThisIteration, (const void**)&pBinauralNode->ppBuffersOut[0], ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesProcessed, 2)); /* Advance. */ totalFramesProcessed += framesToProcessThisIteration; } (void)pFrameCountIn; /* Unused. */ } static ma_node_vtable g_ma_steamaudio_binaural_node_vtable = { ma_steamaudio_binaural_node_process_pcm_frames, NULL, 1, /* 1 input channel. */ 1, /* 1 output channel. */ 0 }; MA_API ma_result ma_steamaudio_binaural_node_init(ma_node_graph* pNodeGraph, const ma_steamaudio_binaural_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_steamaudio_binaural_node* pBinauralNode) { ma_result result; ma_node_config baseConfig; ma_uint32 channelsIn; ma_uint32 channelsOut; IPLBinauralEffectSettings iplBinauralEffectSettings; size_t heapSizeInBytes; if (pBinauralNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBinauralNode); if (pConfig == NULL || pConfig->iplAudioSettings.frameSize == 0 || pConfig->iplContext == NULL || pConfig->iplHRTF == NULL) { return MA_INVALID_ARGS; } /* Steam Audio only supports mono and stereo input. */ if (pConfig->channelsIn < 1 || pConfig->channelsIn > 2) { return MA_INVALID_ARGS; } channelsIn = pConfig->channelsIn; channelsOut = 2; /* Always stereo output. */ baseConfig = ma_node_config_init(); baseConfig.vtable = &g_ma_steamaudio_binaural_node_vtable; baseConfig.pInputChannels = &channelsIn; baseConfig.pOutputChannels = &channelsOut; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pBinauralNode->baseNode); if (result != MA_SUCCESS) { return result; } pBinauralNode->iplAudioSettings = pConfig->iplAudioSettings; pBinauralNode->iplContext = pConfig->iplContext; pBinauralNode->iplHRTF = pConfig->iplHRTF; MA_ZERO_OBJECT(&iplBinauralEffectSettings); iplBinauralEffectSettings.hrtf = pBinauralNode->iplHRTF; result = ma_result_from_IPLerror(iplBinauralEffectCreate(pBinauralNode->iplContext, &pBinauralNode->iplAudioSettings, &iplBinauralEffectSettings, &pBinauralNode->iplEffect)); if (result != MA_SUCCESS) { ma_node_uninit(&pBinauralNode->baseNode, pAllocationCallbacks); return result; } heapSizeInBytes = 0; /* Unfortunately Steam Audio uses deinterleaved buffers for everything so we'll need to use some intermediary buffers. We'll allocate one big buffer on the heap and then use offsets. We'll use the frame size from the IPLAudioSettings structure as a basis for the size of the buffer. */ heapSizeInBytes += sizeof(float) * channelsOut * pBinauralNode->iplAudioSettings.frameSize; /* Output buffer. */ heapSizeInBytes += sizeof(float) * channelsIn * pBinauralNode->iplAudioSettings.frameSize; /* Input buffer. */ pBinauralNode->_pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pBinauralNode->_pHeap == NULL) { iplBinauralEffectRelease(&pBinauralNode->iplEffect); ma_node_uninit(&pBinauralNode->baseNode, pAllocationCallbacks); return MA_OUT_OF_MEMORY; } pBinauralNode->ppBuffersOut[0] = (float*)pBinauralNode->_pHeap; pBinauralNode->ppBuffersOut[1] = (float*)ma_offset_ptr(pBinauralNode->_pHeap, sizeof(float) * pBinauralNode->iplAudioSettings.frameSize); { ma_uint32 iChannelIn; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { pBinauralNode->ppBuffersIn[iChannelIn] = (float*)ma_offset_ptr(pBinauralNode->_pHeap, sizeof(float) * pBinauralNode->iplAudioSettings.frameSize * (channelsOut + iChannelIn)); } } return MA_SUCCESS; } MA_API void ma_steamaudio_binaural_node_uninit(ma_steamaudio_binaural_node* pBinauralNode, const ma_allocation_callbacks* pAllocationCallbacks) { if (pBinauralNode == NULL) { return; } /* The base node is always uninitialized first. */ ma_node_uninit(&pBinauralNode->baseNode, pAllocationCallbacks); /* The Steam Audio objects are deleted after the base node. This ensures the base node is removed from the graph first to ensure these objects aren't getting used by the audio thread. */ iplBinauralEffectRelease(&pBinauralNode->iplEffect); ma_free(pBinauralNode->_pHeap, pAllocationCallbacks); } MA_API ma_result ma_steamaudio_binaural_node_set_direction(ma_steamaudio_binaural_node* pBinauralNode, float x, float y, float z) { if (pBinauralNode == NULL) { return MA_INVALID_ARGS; } pBinauralNode->direction.x = x; pBinauralNode->direction.y = y; pBinauralNode->direction.z = z; return MA_SUCCESS; } static ma_engine g_engine; static ma_sound g_sound; /* This example will play only a single sound at once, so we only need one `ma_sound` object. */ static ma_steamaudio_binaural_node g_binauralNode; /* The echo effect is achieved using a delay node. */ int main(int argc, char** argv) { ma_result result; ma_engine_config engineConfig; IPLAudioSettings iplAudioSettings; IPLContextSettings iplContextSettings; IPLContext iplContext; IPLHRTFSettings iplHRTFSettings; IPLHRTF iplHRTF; if (argc < 2) { printf("No input file."); return -1; } /* The engine needs to be initialized first. */ engineConfig = ma_engine_config_init(); engineConfig.channels = CHANNELS; engineConfig.sampleRate = SAMPLE_RATE; /* Steam Audio requires processing in fixed sized chunks. Setting the period size in the engine config will ensure our updates happen in predicably sized chunks as required by Steam Audio. Note that the configuration of Steam Audio below (IPLAudioSettings) will use this variable to specify the update size to ensure it remains consistent. */ engineConfig.periodSizeInFrames = 256; result = ma_engine_init(&engineConfig, &g_engine); if (result != MA_SUCCESS) { printf("Failed to initialize audio engine."); return -1; } /* Now that we have the engine we can initialize the Steam Audio objects. */ MA_ZERO_OBJECT(&iplAudioSettings); iplAudioSettings.samplingRate = ma_engine_get_sample_rate(&g_engine); /* If there's any Steam Audio developers reading this, why is the frame size needed? This needs to be documented. If this is for some kind of buffer management with FFT or something, then this need not be exposed to the public API. There should be no need for the public API to require a fixed sized update. It's important that this be set to the periodSizeInFrames specified in the engine config above. This ensures updates on both the miniaudio side and the Steam Audio side are consistent. */ iplAudioSettings.frameSize = engineConfig.periodSizeInFrames; /* IPLContext */ MA_ZERO_OBJECT(&iplContextSettings); iplContextSettings.version = STEAMAUDIO_VERSION; result = ma_result_from_IPLerror(iplContextCreate(&iplContextSettings, &iplContext)); if (result != MA_SUCCESS) { ma_engine_uninit(&g_engine); return result; } /* IPLHRTF */ MA_ZERO_OBJECT(&iplHRTFSettings); iplHRTFSettings.type = IPL_HRTFTYPE_DEFAULT; iplHRTFSettings.volume = 1; result = ma_result_from_IPLerror(iplHRTFCreate(iplContext, &iplAudioSettings, &iplHRTFSettings, &iplHRTF)); if (result != MA_SUCCESS) { iplContextRelease(&iplContext); ma_engine_uninit(&g_engine); return result; } /* The binaural node will need to know the input channel count of the sound so we'll need to load the sound first. We'll initialize this such that it'll be initially detached from the graph. It will be attached to the graph after the binaural node is initialized. */ { ma_sound_config soundConfig; soundConfig = ma_sound_config_init(); soundConfig.pFilePath = argv[1]; soundConfig.flags = MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT; /* We'll attach this to the graph later. */ result = ma_sound_init_ex(&g_engine, &soundConfig, &g_sound); if (result != MA_SUCCESS) { return result; } /* We'll let the Steam Audio binaural effect do the directional attenuation for us. */ ma_sound_set_directional_attenuation_factor(&g_sound, 0); /* Loop the sound so we can get a continuous sound. */ ma_sound_set_looping(&g_sound, MA_TRUE); } /* We'll build our graph starting from the end so initialize the binaural node now. The output of this node will be connected straight to the output. You could also attach it to a sound group or any other node that accepts an input. Creating a node requires a pointer to the node graph that owns it. The engine itself is a node graph. In the code below we can get a pointer to the node graph with `ma_engine_get_node_graph()` or we could simple cast the engine to a ma_node_graph* like so: (ma_node_graph*)&g_engine The endpoint of the graph can be retrieved with `ma_engine_get_endpoint()`. */ { ma_steamaudio_binaural_node_config binauralNodeConfig; /* For this example we're just using the engine's channel count, but a more optimal solution might be to set this to mono if the source data is also mono. */ binauralNodeConfig = ma_steamaudio_binaural_node_config_init(CHANNELS, iplAudioSettings, iplContext, iplHRTF); result = ma_steamaudio_binaural_node_init(ma_engine_get_node_graph(&g_engine), &binauralNodeConfig, NULL, &g_binauralNode); if (result != MA_SUCCESS) { printf("Failed to initialize binaural node."); return -1; } /* Connect the output of the delay node to the input of the endpoint. */ ma_node_attach_output_bus(&g_binauralNode, 0, ma_engine_get_endpoint(&g_engine), 0); } /* We can now wire up the sound to the binaural node and start it. */ ma_node_attach_output_bus(&g_sound, 0, &g_binauralNode, 0); ma_sound_start(&g_sound); #if 1 { /* We'll move the sound around the listener which we'll leave at the origin. We'll then get the direction to the listener and update the binaural node appropriately. */ float stepAngle = 0.002f; float angle = 0; float distance = 2; for (;;) { double x = ma_cosd(angle) - ma_sind(angle); double y = ma_sind(angle) + ma_cosd(angle); ma_vec3f direction; ma_sound_set_position(&g_sound, (float)x * distance, 0, (float)y * distance); direction = ma_sound_get_direction_to_listener(&g_sound); /* Update the direction of the sound. */ ma_steamaudio_binaural_node_set_direction(&g_binauralNode, direction.x, direction.y, direction.z); angle += stepAngle; ma_sleep(1); } } #else printf("Press Enter to quit..."); getchar(); #endif ma_sound_uninit(&g_sound); ma_steamaudio_binaural_node_uninit(&g_binauralNode, NULL); ma_engine_uninit(&g_engine); return 0; } miniaudio-0.11.22/examples/hilo_interop.c000066400000000000000000000124151475701111600203160ustar00rootroot00000000000000/* Demonstrates interop between the high-level and the low-level API. In this example we are using `ma_device` (the low-level API) to capture data from the microphone which we then play back through the engine as a sound. We use a ring buffer to act as the data source for the sound. This is just a very basic example to show the general idea on how this might be achieved. In this example a ring buffer is being used as the intermediary data source, but you can use anything that works best for your situation. So long as the data is captured from the microphone, and then delivered to the sound (via a data source), you should be good to go. A more robust example would probably not want to use a ring buffer directly as the data source. Instead you would probably want to do a custom data source that handles underruns and overruns of the ring buffer and deals with desyncs between capture and playback. In the future this example may be updated to make use of a more advanced data source that handles all of this. */ #include "../miniaudio.c" static ma_pcm_rb rb; static ma_device device; static ma_engine engine; static ma_sound sound; /* The sound will be the playback of the capture side. */ void capture_data_callback(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { ma_result result; ma_uint32 framesWritten; (void)pFramesOut; /* We need to write to the ring buffer. Need to do this in a loop. */ framesWritten = 0; while (framesWritten < frameCount) { void* pMappedBuffer; ma_uint32 framesToWrite = frameCount - framesWritten; result = ma_pcm_rb_acquire_write(&rb, &framesToWrite, &pMappedBuffer); if (result != MA_SUCCESS) { break; } if (framesToWrite == 0) { break; } /* Copy the data from the capture buffer to the ring buffer. */ ma_copy_pcm_frames(pMappedBuffer, ma_offset_pcm_frames_const_ptr_f32((const float*)pFramesIn, framesWritten, pDevice->capture.channels), framesToWrite, pDevice->capture.format, pDevice->capture.channels); result = ma_pcm_rb_commit_write(&rb, framesToWrite); if (result != MA_SUCCESS) { break; } framesWritten += framesToWrite; } } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; /* The first thing we'll do is set up the capture side. There are two parts to this. The first is the device itself, and the other is the ring buffer. It doesn't matter what order we initialize these in, so long as the ring buffer is created before the device is started so that the callback can be guaranteed to have a valid destination. We'll initialize the device first, and then use the format, channels and sample rate to initialize the ring buffer. It's important that the sample format of the device is set to f32 because that's what the engine uses internally. */ /* Initialize the capture device. */ deviceConfig = ma_device_config_init(ma_device_type_capture); deviceConfig.capture.format = ma_format_f32; deviceConfig.dataCallback = capture_data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to initialize capture device."); return -1; } /* Initialize the ring buffer. */ result = ma_pcm_rb_init(device.capture.format, device.capture.channels, device.capture.internalPeriodSizeInFrames * 5, NULL, NULL, &rb); if (result != MA_SUCCESS) { printf("Failed to initialize the ring buffer."); return -1; } /* Ring buffers don't require a sample rate for their normal operation, but we can associate it with a sample rate. We'll want to do this so the engine can resample if necessary. */ ma_pcm_rb_set_sample_rate(&rb, device.sampleRate); /* At this point the capture side is set up and we can now set up the playback side. Here we are using `ma_engine` and linking the captured data to a sound so it can be manipulated just like any other sound in the world. Note that we have not yet started the capture device. Since the captured data is tied to a sound, we'll link the starting and stopping of the capture device to the starting and stopping of the sound. */ /* We'll get the engine up and running before we start the capture device. */ result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { printf("Failed to initialize the engine."); return -1; } /* We can now create our sound. This is created from a data source, which in this example is a ring buffer. The capture side will be writing data into the ring buffer, whereas the sound will be reading from it. */ result = ma_sound_init_from_data_source(&engine, &rb, 0, NULL, &sound); if (result != MA_SUCCESS) { printf("Failed to initialize the sound."); return -1; } /* Link the starting of the device and sound together. */ ma_device_start(&device); ma_sound_start(&sound); printf("Press Enter to quit...\n"); getchar(); ma_sound_uninit(&sound); ma_engine_uninit(&engine); ma_device_uninit(&device); ma_pcm_rb_uninit(&rb); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/node_graph.c000066400000000000000000000246531475701111600177400ustar00rootroot00000000000000/* This example shows how to use the node graph system. The node graph system can be used for doing complex mixing and effect processing. The idea is that you have a number of nodes that are connected to each other to form a graph. At the end of the graph is an endpoint which all nodes eventually connect to. A node is used to do some kind of processing on zero or more input streams and produce one or more output streams. Each node can have a number of inputs and outputs. Each of these is called a bus in miniaudio. Some nodes, particularly data source nodes, have no inputs and instead generate their outputs dynamically. All nodes will have at least one output or else it'll be disconnected from the graph and will never get processed. Each output bus of a node will be connected to an input bus of another node, but they don't all need to connect to the same input node. For example, a splitter node has 1 input bus and 2 output buses and is used to duplicate a signal. You could then branch off and have one output bus connected to one input node and the other connected to a different input node, and then have two different effects process for each of the duplicated branches. Any number of output buses can be connected to an input bus in which case the output buses will be mixed before processing by the input node. This is how you would achieve the mixing part of the node graph. This example will be using the following node graph set up: ``` >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Data flows left to right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +---------------+ +-----------------+ | Data Source 1 =----+ +----------+ +----= Low Pass Filter =----+ +---------------+ | | =----+ +-----------------+ | +----------+ +----= Splitter | +----= ENDPOINT | +---------------+ | | =----+ +-----------------+ | +----------+ | Data Source 2 =----+ +----------+ +----= Echo / Delay =----+ +---------------+ +-----------------+ ``` This does not represent a realistic real-world scenario, but it demonstrates how to make use of mixing, multiple outputs and multiple effects. The data source nodes are connected to the input of the splitter. They'll be mixed before being processed by the splitter. The splitter has two output buses. In the graph above, one bus will be routed to a low pass filter, whereas the other bus will be routed to an echo effect. Then, the outputs of these two effects will be connected to the input bus of the endpoint. Because both of the outputs are connected to the same input bus, they'll be mixed at that point. The two data sources at the start of the graph have no inputs. They'll instead generate their output by reading from a data source. The data source in this case will be one `ma_decoder` for each input file specified on the command line. You can also control the volume of an output bus. In this example, we set the volumes of the low pass and echo effects so that one of them becomes more obvious than the other. When you want to read from the graph, you simply call `ma_node_graph_read_pcm_frames()`. */ #include "../miniaudio.c" /* Data Format */ #define FORMAT ma_format_f32 /* Must always be f32. */ #define CHANNELS 2 #define SAMPLE_RATE 48000 /* Effect Properties */ #define LPF_BIAS 0.9f /* Higher values means more bias towards the low pass filter (the low pass filter will be more audible). Lower values means more bias towards the echo. Must be between 0 and 1. */ #define LPF_CUTOFF_FACTOR 80 /* High values = more filter. */ #define LPF_ORDER 8 #define DELAY_IN_SECONDS 0.2f #define DECAY 0.5f /* Volume falloff for each echo. */ typedef struct { ma_data_source_node node; /* If you make this the first member, you can pass a pointer to this struct into any `ma_node_*` API and it will "Just Work". */ ma_decoder decoder; } sound_node; static ma_node_graph g_nodeGraph; static ma_lpf_node g_lpfNode; static ma_delay_node g_delayNode; static ma_splitter_node g_splitterNode; static sound_node* g_pSoundNodes; static int g_soundNodeCount; void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* Hearing the output of the node graph is as easy as reading straight into the output buffer. You just need to make sure you use a consistent data format or else you'll need to do your own conversion. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); (void)pInput; /* Unused. */ (void)pDevice; /* Unused. */ } int main(int argc, char** argv) { int iarg; ma_result result; /* We'll set up our nodes starting from the end and working our way back to the start. We'll need to set up the graph first. */ { ma_node_graph_config nodeGraphConfig = ma_node_graph_config_init(CHANNELS); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("ERROR: Failed to initialize node graph."); return -1; } } /* Low Pass Filter. */ { ma_lpf_node_config lpfNodeConfig = ma_lpf_node_config_init(CHANNELS, SAMPLE_RATE, SAMPLE_RATE / LPF_CUTOFF_FACTOR, LPF_ORDER); result = ma_lpf_node_init(&g_nodeGraph, &lpfNodeConfig, NULL, &g_lpfNode); if (result != MA_SUCCESS) { printf("ERROR: Failed to initialize low pass filter node."); return -1; } /* Connect the output bus of the low pass filter node to the input bus of the endpoint. */ ma_node_attach_output_bus(&g_lpfNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Set the volume of the low pass filter to make it more of less impactful. */ ma_node_set_output_bus_volume(&g_lpfNode, 0, LPF_BIAS); } /* Echo / Delay. */ { ma_delay_node_config delayNodeConfig = ma_delay_node_config_init(CHANNELS, SAMPLE_RATE, (ma_uint32)(SAMPLE_RATE * DELAY_IN_SECONDS), DECAY); result = ma_delay_node_init(&g_nodeGraph, &delayNodeConfig, NULL, &g_delayNode); if (result != MA_SUCCESS) { printf("ERROR: Failed to initialize delay node."); return -1; } /* Connect the output bus of the delay node to the input bus of the endpoint. */ ma_node_attach_output_bus(&g_delayNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Set the volume of the delay filter to make it more of less impactful. */ ma_node_set_output_bus_volume(&g_delayNode, 0, 1 - LPF_BIAS); } /* Splitter. */ { ma_splitter_node_config splitterNodeConfig = ma_splitter_node_config_init(CHANNELS); result = ma_splitter_node_init(&g_nodeGraph, &splitterNodeConfig, NULL, &g_splitterNode); if (result != MA_SUCCESS) { printf("ERROR: Failed to initialize splitter node."); return -1; } /* Connect output bus 0 to the input bus of the low pass filter node, and output bus 1 to the input bus of the delay node. */ ma_node_attach_output_bus(&g_splitterNode, 0, &g_lpfNode, 0); ma_node_attach_output_bus(&g_splitterNode, 1, &g_delayNode, 0); } /* Data sources. Ignore any that cannot be loaded. */ g_pSoundNodes = (sound_node*)ma_malloc(sizeof(*g_pSoundNodes) * argc-1, NULL); if (g_pSoundNodes == NULL) { printf("Failed to allocate memory for sounds."); return -1; } g_soundNodeCount = 0; for (iarg = 1; iarg < argc; iarg += 1) { ma_decoder_config decoderConfig = ma_decoder_config_init(FORMAT, CHANNELS, SAMPLE_RATE); result = ma_decoder_init_file(argv[iarg], &decoderConfig, &g_pSoundNodes[g_soundNodeCount].decoder); if (result == MA_SUCCESS) { ma_data_source_node_config dataSourceNodeConfig = ma_data_source_node_config_init(&g_pSoundNodes[g_soundNodeCount].decoder); result = ma_data_source_node_init(&g_nodeGraph, &dataSourceNodeConfig, NULL, &g_pSoundNodes[g_soundNodeCount].node); if (result == MA_SUCCESS) { /* The data source node has been created successfully. Attach it to the splitter. */ ma_node_attach_output_bus(&g_pSoundNodes[g_soundNodeCount].node, 0, &g_splitterNode, 0); g_soundNodeCount += 1; } else { printf("WARNING: Failed to init data source node for sound \"%s\". Ignoring.", argv[iarg]); ma_decoder_uninit(&g_pSoundNodes[g_soundNodeCount].decoder); } } else { printf("WARNING: Failed to load sound \"%s\". Ignoring.", argv[iarg]); } } /* Everything has been initialized successfully so now we can set up a playback device so we can listen to the result. */ { ma_device_config deviceConfig; ma_device device; deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = FORMAT; deviceConfig.playback.channels = CHANNELS; deviceConfig.sampleRate = SAMPLE_RATE; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = NULL; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("ERROR: Failed to initialize device."); goto cleanup_graph; } result = ma_device_start(&device); if (result != MA_SUCCESS) { ma_device_uninit(&device); goto cleanup_graph; } printf("Press Enter to quit...\n"); getchar(); /* We're done. Clean up the device. */ ma_device_uninit(&device); } cleanup_graph: { /* It's good practice to tear down the graph from the lowest level nodes first. */ int iSound; /* Sounds. */ for (iSound = 0; iSound < g_soundNodeCount; iSound += 1) { ma_data_source_node_uninit(&g_pSoundNodes[iSound].node, NULL); ma_decoder_uninit(&g_pSoundNodes[iSound].decoder); } /* Splitter. */ ma_splitter_node_uninit(&g_splitterNode, NULL); /* Echo / Delay */ ma_delay_node_uninit(&g_delayNode, NULL); /* Low Pass Filter */ ma_lpf_node_uninit(&g_lpfNode, NULL); /* Node Graph */ ma_node_graph_uninit(&g_nodeGraph, NULL); } return 0; } miniaudio-0.11.22/examples/resource_manager.c000066400000000000000000000133361475701111600211470ustar00rootroot00000000000000/* Demonstrates how you can use the resource manager to manage loaded sounds. This example loads the first sound specified on the command line via the resource manager and then plays it using the low level API. You can control whether or not you want to load the sound asynchronously and whether or not you want to store the data in-memory or stream it. When storing the sound in-memory you can also control whether or not it is decoded. To do this, specify a combination of the following options in `ma_resource_manager_data_source_init()`: * MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC - Load asynchronously. * MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE - Store the sound in-memory in uncompressed/decoded format. * MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM - Stream the sound from disk rather than storing entirely in memory. Useful for music. The object returned by the resource manager is just a standard data source which means it can be plugged into any of `ma_data_source_*()` APIs just like any other data source and it should just work. Internally, there's a background thread that's used to process jobs and enable asynchronicity. By default there is only a single job thread, but this can be configured in the resource manager config. You can also implement your own threads for processing jobs. That is more advanced, and beyond the scope of this example. When you initialize a resource manager you can specify the sample format, channels and sample rate to use when reading data from the data source. This means the resource manager will ensure all sounds will have a standard format. When not set, each sound will have their own formats and you'll need to do the necessary data conversion yourself. */ #define MA_NO_ENGINE /* We're intentionally not using the ma_engine API here. */ #include "../miniaudio.c" #ifdef __EMSCRIPTEN__ #include void main_loop__em(void* pUserData) { ma_resource_manager* pResourceManager = (ma_resource_manager*)pUserData; /* The Emscripten build does not support threading which means we need to process jobs manually. If there are no jobs needing to be processed this will return immediately with MA_NO_DATA_AVAILABLE. */ ma_resource_manager_process_next_job(pResourceManager); } #endif void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_data_source_read_pcm_frames((ma_data_source*)pDevice->pUserData, pOutput, frameCount, NULL); (void)pInput; } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; ma_resource_manager_config resourceManagerConfig; ma_resource_manager resourceManager; ma_resource_manager_data_source dataSource; if (argc < 2) { printf("No input file."); return -1; } /* We'll initialize the device first. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &dataSource; /* <-- We'll be reading from this in the data callback. */ result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to initialize device."); return -1; } /* We have the device so now we want to initialize the resource manager. We'll use the resource manager to load a sound based on the command line. */ resourceManagerConfig = ma_resource_manager_config_init(); resourceManagerConfig.decodedFormat = device.playback.format; resourceManagerConfig.decodedChannels = device.playback.channels; resourceManagerConfig.decodedSampleRate = device.sampleRate; /* We're not supporting threading with Emscripten so go ahead and disable threading. It's important that we set the appropriate flag and also the job thread count to 0. */ #ifdef __EMSCRIPTEN__ resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; resourceManagerConfig.jobThreadCount = 0; #endif result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to initialize the resource manager."); return -1; } /* Now that we have a resource manager we can load a sound. */ result = ma_resource_manager_data_source_init( &resourceManager, argv[1], MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM, NULL, /* Async notification. */ &dataSource); if (result != MA_SUCCESS) { printf("Failed to load sound \"%s\".", argv[1]); return -1; } /* In this example we'll enable looping. */ ma_data_source_set_looping(&dataSource, MA_TRUE); /* Now that we have a sound we can start the device. */ result = ma_device_start(&device); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to start device."); return -1; } #ifdef __EMSCRIPTEN__ emscripten_set_main_loop_arg(main_loop__em, &resourceManager, 0, 1); #else printf("Press Enter to quit...\n"); getchar(); #endif /* Teardown. */ /* Uninitialize the device first to ensure the data callback is stopped and doesn't try to access any data. */ ma_device_uninit(&device); /* Before uninitializing the resource manager we need to uninitialize every data source. The data source is owned by the caller which means you're responsible for uninitializing it. */ ma_resource_manager_data_source_uninit(&dataSource); /* Uninitialize the resource manager after each data source. */ ma_resource_manager_uninit(&resourceManager); return 0; } miniaudio-0.11.22/examples/resource_manager_advanced.c000066400000000000000000000333161475701111600227740ustar00rootroot00000000000000/* Demonstrates how you can use the resource manager to manage loaded sounds. The resource manager can be used to create a data source whose resources are managed internally by miniaudio. The data sources can then be read just like any other data source such as decoders and audio buffers. In this example we use the resource manager independently of the `ma_engine` API so that we can demonstrate how it can be used by itself without getting it confused with `ma_engine`. The main feature of the resource manager is the ability to decode and stream audio data asynchronously. Asynchronicity is achieved with a job system. The resource manager will issue jobs which are processed by a configurable number of job threads. You can also implement your own custom job threads which this example also demonstrates. In this example we show how you can create a data source, mix them with other data sources, configure the number of job threads to manage internally and how to implement your own custom job thread. */ #define MA_NO_ENGINE /* We're intentionally not using the ma_engine API here. */ #include "../miniaudio.c" static ma_resource_manager_data_source g_dataSources[16]; static ma_uint32 g_dataSourceCount; /* TODO: Consider putting these public functions in miniaudio.h. Will depend on ma_mix_pcm_frames_f32() being merged into miniaudio.h (it's currently in miniaudio_engine.h). */ static ma_result ma_data_source_read_pcm_frames_f32_ex(ma_data_source* pDataSource, float* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead, ma_format dataSourceFormat, ma_uint32 dataSourceChannels) { /* This function is intended to be used when the format and channel count of the data source is known beforehand. The idea is to avoid overhead due to redundant calls to ma_data_source_get_data_format(). */ if (dataSourceFormat == ma_format_f32) { /* Fast path. No conversion necessary. */ return ma_data_source_read_pcm_frames(pDataSource, pFramesOut, frameCount, pFramesRead); } else { /* Slow path. Conversion necessary. */ ma_result result; ma_uint64 totalFramesRead; ma_uint8 temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint64 tempCapInFrames = sizeof(temp) / ma_get_bytes_per_frame(dataSourceFormat, dataSourceChannels); if (pFramesRead != NULL) { *pFramesRead = 0; } totalFramesRead = 0; while (totalFramesRead < frameCount) { ma_uint64 framesJustRead; ma_uint64 framesToRead = frameCount - totalFramesRead; if (framesToRead > tempCapInFrames) { framesToRead = tempCapInFrames; } result = ma_data_source_read_pcm_frames(pDataSource, temp, framesToRead, &framesJustRead); if (result != MA_SUCCESS) { break; } ma_convert_pcm_frames_format(ma_offset_pcm_frames_ptr_f32(pFramesOut, totalFramesRead, dataSourceChannels), ma_format_f32, temp, dataSourceFormat, framesJustRead, dataSourceChannels, ma_dither_mode_none); totalFramesRead += framesJustRead; if (result != MA_SUCCESS) { break; } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return MA_SUCCESS; } } MA_API ma_result ma_data_source_read_pcm_frames_f32(ma_data_source* pDataSource, float* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result; ma_format format; ma_uint32 channels; result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the data format of the data source. */ } return ma_data_source_read_pcm_frames_f32_ex(pDataSource, pFramesOut, frameCount, pFramesRead, format, channels); } MA_API ma_result ma_data_source_read_pcm_frames_and_mix_f32(ma_data_source* pDataSource, float* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead, float volume) { ma_result result; ma_format format; ma_uint32 channels; ma_uint64 totalFramesRead; if (pFramesRead != NULL) { *pFramesRead = 0; } if (pDataSource == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the data format of the data source. */ } totalFramesRead = 0; while (totalFramesRead < frameCount) { float temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE/sizeof(float)]; ma_uint64 tempCapInFrames = ma_countof(temp) / channels; ma_uint64 framesJustRead; ma_uint64 framesToRead = frameCount - totalFramesRead; if (framesToRead > tempCapInFrames) { framesToRead = tempCapInFrames; } result = ma_data_source_read_pcm_frames_f32_ex(pDataSource, temp, framesToRead, &framesJustRead, format, channels); ma_mix_pcm_frames_f32(ma_offset_pcm_frames_ptr_f32(pFramesOut, totalFramesRead, channels), temp, framesJustRead, channels, volume); totalFramesRead += framesJustRead; if (result != MA_SUCCESS) { break; } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return MA_SUCCESS; } void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* In this example we're just going to play our data sources layered on top of each other. This assumes the device's format is f32 and that the buffer is not pre-silenced. */ ma_uint32 iDataSource; /* If the device was configured with noPreSilencedOutputBuffer then you would need to silence the buffer here, or make sure the first data source to be mixed is copied rather than mixed. */ /*ma_silence_pcm_frames(pOutput, frameCount, ma_format_f32, pDevice->playback.channels);*/ /* For each sound, mix as much data as we can. */ for (iDataSource = 0; iDataSource < g_dataSourceCount; iDataSource += 1) { ma_data_source_read_pcm_frames_and_mix_f32(&g_dataSources[iDataSource], (float*)pOutput, frameCount, NULL, /* volume = */1); } /* Unused. */ (void)pInput; (void)pDevice; } static ma_thread_result MA_THREADCALL custom_job_thread(void* pUserData) { ma_resource_manager* pResourceManager = (ma_resource_manager*)pUserData; for (;;) { ma_result result; ma_resource_manager_job job; /* Retrieve a job from the queue first. This defines what it is you're about to do. By default this will be blocking. You can initialize the resource manager with MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING to not block in which case MA_NO_DATA_AVAILABLE will be returned if no jobs are available. When the quit job is returned (MA_RESOURCE_MANAGER_JOB_QUIT), the return value will always be MA_CANCELLED. If you don't want to check the return value (you should), you can instead check if the job code is MA_RESOURCE_MANAGER_JOB_QUIT and use that instead. */ result = ma_resource_manager_next_job(pResourceManager, &job); if (result != MA_SUCCESS) { if (result == MA_CANCELLED) { printf("CUSTOM JOB THREAD TERMINATING VIA MA_CANCELLED... "); } else { printf("CUSTOM JOB THREAD ERROR: %s. TERMINATING... ", ma_result_description(result)); } break; } /* Terminate if we got a quit message. You don't need to terminate like this, but's a bit more robust. You can just use a global variable or something similar if it's easier for your particular situation. The quit job remains in the queue and will continue to be returned by future calls to ma_resource_manager_next_job(). The reason for this is to give every job thread visibility to the quit job so they have a chance to exit. We won't actually be hitting this code because the call above will return MA_CANCELLED when the MA_RESOURCE_MANAGER_JOB_QUIT event is received which means the `result != MA_SUCCESS` logic above will catch it. If you do not check the return value of ma_resource_manager_next_job() you will want to check for MA_RESOURCE_MANAGER_JOB_QUIT like the code below. */ if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) { printf("CUSTOM JOB THREAD TERMINATING VIA MA_JOB_TYPE_QUIT... "); break; } /* Call ma_resource_manager_process_job() to actually do the work to process the job. */ printf("PROCESSING IN CUSTOM JOB THREAD: %d\n", job.toc.breakup.code); ma_resource_manager_process_job(pResourceManager, &job); } printf("TERMINATED\n"); return (ma_thread_result)0; } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; ma_resource_manager_config resourceManagerConfig; ma_resource_manager resourceManager; ma_thread jobThread; int iFile; deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = ma_format_f32; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = NULL; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to initialize device."); return -1; } /* We can start the device before loading any sounds. We'll just end up outputting silence. */ result = ma_device_start(&device); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to start device."); return -1; } /* We have the device so now we want to initialize the resource manager. We'll use the resource manager to load some sounds based on the command line. */ resourceManagerConfig = ma_resource_manager_config_init(); /* We'll set a standard decoding format to save us to processing time at mixing time. If you're wanting to use spatialization with your decoded sounds, you may want to consider leaving this as 0 to ensure the file's native channel count is used so you can do proper spatialization. */ resourceManagerConfig.decodedFormat = device.playback.format; resourceManagerConfig.decodedChannels = device.playback.channels; resourceManagerConfig.decodedSampleRate = device.sampleRate; /* The number of job threads to be managed internally. Set this to 0 if you want to self-manage your job threads */ resourceManagerConfig.jobThreadCount = 4; result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to initialize the resource manager."); return -1; } /* Now that we have a resource manager we can set up our custom job thread. This is optional. Normally when doing self-managed job threads you would set the internal job thread count to zero. We're doing both internal and self-managed job threads in this example just for demonstration purposes. */ ma_thread_create(&jobThread, ma_thread_priority_default, 0, custom_job_thread, &resourceManager, NULL); /* Create each data source from the resource manager. Note that the caller is the owner. */ for (iFile = 0; iFile < (int)ma_countof(g_dataSources) && iFile < argc-1; iFile += 1) { result = ma_resource_manager_data_source_init( &resourceManager, argv[iFile+1], MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC /*| MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM*/, NULL, /* Async notification. */ &g_dataSources[iFile]); if (result != MA_SUCCESS) { break; } /* Use looping in this example. */ ma_data_source_set_looping(&g_dataSources[iFile], MA_TRUE); g_dataSourceCount += 1; } printf("Press Enter to quit..."); getchar(); /* Teardown. */ /* Uninitialize the device first to ensure the data callback is stopped and doesn't try to access any data. */ ma_device_uninit(&device); /* Our data sources need to be explicitly uninitialized. ma_resource_manager_uninit() will not do it for us. This needs to be done before posting the quit event and uninitializing the resource manager or else we'll get stuck in a deadlock because ma_resource_manager_data_source_uninit() will be waiting for the job thread(s) to finish work, which will never happen because they were just terminated. */ for (iFile = 0; (size_t)iFile < g_dataSourceCount; iFile += 1) { ma_resource_manager_data_source_uninit(&g_dataSources[iFile]); } /* Before uninitializing the resource manager we need to make sure a quit event has been posted to ensure we can get out of our custom thread. The call to ma_resource_manager_uninit() will also do this, but we need to call it explicitly so that our self-managed thread can exit naturally. You only need to post a quit job if you're using that as the exit indicator. You can instead use whatever variable you want to terminate your job thread, but since this example is using a quit job we need to post one. Note that you don't need to do this if you're not managing your own threads - ma_resource_manager_uninit() alone will suffice in that case. */ ma_resource_manager_post_job_quit(&resourceManager); ma_thread_wait(&jobThread); /* Wait for the custom job thread to finish so it doesn't try to access any data. */ /* Uninitialize the resource manager after each data source. */ ma_resource_manager_uninit(&resourceManager); return 0; } miniaudio-0.11.22/examples/simple_capture.c000066400000000000000000000041711475701111600206370ustar00rootroot00000000000000/* Demonstrates how to capture data from a microphone using the low-level API. This example simply captures data from your default microphone until you press Enter. The output is saved to the file specified on the command line. Capturing works in a very similar way to playback. The only difference is the direction of data movement. Instead of the application sending data to the device, the device will send data to the application. This example just writes the data received by the microphone straight to a WAV file. */ #include "../miniaudio.c" #include #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_encoder_write_pcm_frames((ma_encoder*)pDevice->pUserData, pInput, frameCount, NULL); (void)pOutput; } int main(int argc, char** argv) { ma_result result; ma_encoder_config encoderConfig; ma_encoder encoder; ma_device_config deviceConfig; ma_device device; if (argc < 2) { printf("No output file.\n"); return -1; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, ma_format_f32, 2, 44100); if (ma_encoder_init_file(argv[1], &encoderConfig, &encoder) != MA_SUCCESS) { printf("Failed to initialize output file.\n"); return -1; } deviceConfig = ma_device_config_init(ma_device_type_capture); deviceConfig.capture.format = encoder.config.format; deviceConfig.capture.channels = encoder.config.channels; deviceConfig.sampleRate = encoder.config.sampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &encoder; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to initialize capture device.\n"); return -2; } result = ma_device_start(&device); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to start device.\n"); return -3; } printf("Press Enter to stop recording...\n"); getchar(); ma_device_uninit(&device); ma_encoder_uninit(&encoder); return 0; } miniaudio-0.11.22/examples/simple_duplex.c000066400000000000000000000046551475701111600205040ustar00rootroot00000000000000/* Demonstrates duplex mode which is where data is captured from a microphone and then output to a speaker device. This example captures audio from the default microphone and then outputs it straight to the default playback device without any kind of modification. If you wanted to, you could also apply filters and effects to the input stream before outputting to the playback device. Note that the microphone and playback device must run in lockstep. Any kind of timing deviation will result in audible glitching which the backend may not be able to recover from. For this reason, miniaudio forces you to use the same sample rate for both capture and playback. If internally the native sample rates differ, miniaudio will perform the sample rate conversion for you automatically. */ #include "../miniaudio.c" #include #ifdef __EMSCRIPTEN__ void main_loop__em() { } #endif void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* This example assumes the playback and capture sides use the same format and channel count. */ if (pDevice->capture.format != pDevice->playback.format || pDevice->capture.channels != pDevice->playback.channels) { return; } /* In this example the format and channel count are the same for both input and output which means we can just memcpy(). */ MA_COPY_MEMORY(pOutput, pInput, frameCount * ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels)); } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; deviceConfig = ma_device_config_init(ma_device_type_duplex); deviceConfig.capture.pDeviceID = NULL; deviceConfig.capture.format = ma_format_s16; deviceConfig.capture.channels = 2; deviceConfig.capture.shareMode = ma_share_mode_shared; deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = ma_format_s16; deviceConfig.playback.channels = 2; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } #ifdef __EMSCRIPTEN__ getchar(); #endif ma_device_start(&device); #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop__em, 0, 1); #else printf("Press Enter to quit...\n"); getchar(); #endif ma_device_uninit(&device); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/simple_enumeration.c000066400000000000000000000030471475701111600215230ustar00rootroot00000000000000/* Demonstrates how to enumerate over devices. Device enumeration requires a `ma_context` object which is initialized with `ma_context_init()`. Conceptually, the context sits above a device. You can have many devices to one context. If you use device enumeration, you should explicitly specify the same context you used for enumeration in the call to `ma_device_init()` when you initialize your devices. */ #include "../miniaudio.c" #include int main(int argc, char** argv) { ma_result result; ma_context context; ma_device_info* pPlaybackDeviceInfos; ma_uint32 playbackDeviceCount; ma_device_info* pCaptureDeviceInfos; ma_uint32 captureDeviceCount; ma_uint32 iDevice; if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) { printf("Failed to initialize context.\n"); return -2; } result = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, &pCaptureDeviceInfos, &captureDeviceCount); if (result != MA_SUCCESS) { printf("Failed to retrieve device information.\n"); return -3; } printf("Playback Devices\n"); for (iDevice = 0; iDevice < playbackDeviceCount; ++iDevice) { printf(" %u: %s\n", iDevice, pPlaybackDeviceInfos[iDevice].name); } printf("\n"); printf("Capture Devices\n"); for (iDevice = 0; iDevice < captureDeviceCount; ++iDevice) { printf(" %u: %s\n", iDevice, pCaptureDeviceInfos[iDevice].name); } ma_context_uninit(&context); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/simple_loopback.c000066400000000000000000000051311475701111600207630ustar00rootroot00000000000000/* Demonstrates how to implement loopback recording. This example simply captures data from your default playback device until you press Enter. The output is saved to the file specified on the command line. Loopback mode is when you record audio that is played from a given speaker. It is only supported on WASAPI, but can be used indirectly with PulseAudio by choosing the appropriate loopback device after enumeration. To use loopback mode you just need to set the device type to ma_device_type_loopback and set the capture device config properties. The output buffer in the callback will be null whereas the input buffer will be valid. */ #include "../miniaudio.c" #include #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_encoder_write_pcm_frames((ma_encoder*)pDevice->pUserData, pInput, frameCount, NULL); (void)pOutput; } int main(int argc, char** argv) { ma_result result; ma_encoder_config encoderConfig; ma_encoder encoder; ma_device_config deviceConfig; ma_device device; /* Loopback mode is currently only supported on WASAPI. */ ma_backend backends[] = { ma_backend_wasapi }; if (argc < 2) { printf("No output file.\n"); return -1; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, ma_format_f32, 2, 44100); if (ma_encoder_init_file(argv[1], &encoderConfig, &encoder) != MA_SUCCESS) { printf("Failed to initialize output file.\n"); return -1; } deviceConfig = ma_device_config_init(ma_device_type_loopback); deviceConfig.capture.pDeviceID = NULL; /* Use default device for this example. Set this to the ID of a _playback_ device if you want to capture from a specific device. */ deviceConfig.capture.format = encoder.config.format; deviceConfig.capture.channels = encoder.config.channels; deviceConfig.sampleRate = encoder.config.sampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &encoder; result = ma_device_init_ex(backends, sizeof(backends)/sizeof(backends[0]), NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { printf("Failed to initialize loopback device.\n"); return -2; } result = ma_device_start(&device); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to start device.\n"); return -3; } printf("Press Enter to stop recording...\n"); getchar(); ma_device_uninit(&device); ma_encoder_uninit(&encoder); return 0; } miniaudio-0.11.22/examples/simple_looping.c000066400000000000000000000043741475701111600206500ustar00rootroot00000000000000/* Shows one way to handle looping of a sound. This example uses a decoder as the data source. Decoders can be used with the `ma_data_source` API which, conveniently, supports looping via the `ma_data_source_read_pcm_frames()` API. To use it, all you need to do is pass a pointer to the decoder straight into `ma_data_source_read_pcm_frames()` and it will just work. */ #include "../miniaudio.c" #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_decoder* pDecoder = (ma_decoder*)pDevice->pUserData; if (pDecoder == NULL) { return; } /* Reading PCM frames will loop based on what we specified when called ma_data_source_set_looping(). */ ma_data_source_read_pcm_frames(pDecoder, pOutput, frameCount, NULL); (void)pInput; } int main(int argc, char** argv) { ma_result result; ma_decoder decoder; ma_device_config deviceConfig; ma_device device; if (argc < 2) { printf("No input file.\n"); return -1; } result = ma_decoder_init_file(argv[1], NULL, &decoder); if (result != MA_SUCCESS) { return -2; } /* A decoder is a data source which means we just use ma_data_source_set_looping() to set the looping state. We will read data using ma_data_source_read_pcm_frames() in the data callback. */ ma_data_source_set_looping(&decoder, MA_TRUE); deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = decoder.outputFormat; deviceConfig.playback.channels = decoder.outputChannels; deviceConfig.sampleRate = decoder.outputSampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &decoder; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); ma_decoder_uninit(&decoder); return -3; } if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return -4; } printf("Press Enter to quit..."); getchar(); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return 0; } miniaudio-0.11.22/examples/simple_mixing.c000066400000000000000000000161241475701111600204700ustar00rootroot00000000000000/* Demonstrates one way to load multiple files and play them all back at the same time. When mixing multiple sounds together, you should not create multiple devices. Instead you should create only a single device and then mix your sounds together which you can do by simply summing their samples together. The simplest way to do this is to use floating point samples and use miniaudio's built-in clipper to handling clipping for you. (Clipping is when sample are clamped to their minimum and maximum range, which for floating point is -1..1.) ``` Usage: simple_mixing [input file 0] [input file 1] ... [input file n] Example: simple_mixing file1.wav file2.flac ``` */ #include "../miniaudio.c" #include /* For simplicity, this example requires the device to use floating point samples. */ #define SAMPLE_FORMAT ma_format_f32 #define CHANNEL_COUNT 2 #define SAMPLE_RATE 48000 ma_uint32 g_decoderCount; ma_decoder* g_pDecoders; ma_bool32* g_pDecodersAtEnd; ma_event g_stopEvent; /* <-- Signaled by the audio thread, waited on by the main thread. */ ma_bool32 are_all_decoders_at_end(void) { ma_uint32 iDecoder; for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { if (g_pDecodersAtEnd[iDecoder] == MA_FALSE) { return MA_FALSE; } } return MA_TRUE; } ma_uint32 read_and_mix_pcm_frames_f32(ma_decoder* pDecoder, float* pOutputF32, ma_uint32 frameCount) { /* The way mixing works is that we just read into a temporary buffer, then take the contents of that buffer and mix it with the contents of the output buffer by simply adding the samples together. You could also clip the samples to -1..+1, but I'm not doing that in this example. */ ma_result result; float temp[4096]; ma_uint32 tempCapInFrames = ma_countof(temp) / CHANNEL_COUNT; ma_uint32 totalFramesRead = 0; while (totalFramesRead < frameCount) { ma_uint64 iSample; ma_uint64 framesReadThisIteration; ma_uint32 totalFramesRemaining = frameCount - totalFramesRead; ma_uint32 framesToReadThisIteration = tempCapInFrames; if (framesToReadThisIteration > totalFramesRemaining) { framesToReadThisIteration = totalFramesRemaining; } result = ma_decoder_read_pcm_frames(pDecoder, temp, framesToReadThisIteration, &framesReadThisIteration); if (result != MA_SUCCESS || framesReadThisIteration == 0) { break; } /* Mix the frames together. */ for (iSample = 0; iSample < framesReadThisIteration*CHANNEL_COUNT; ++iSample) { pOutputF32[totalFramesRead*CHANNEL_COUNT + iSample] += temp[iSample]; } totalFramesRead += (ma_uint32)framesReadThisIteration; if (framesReadThisIteration < (ma_uint32)framesToReadThisIteration) { break; /* Reached EOF. */ } } return totalFramesRead; } void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { float* pOutputF32 = (float*)pOutput; ma_uint32 iDecoder; /* This example assumes the device was configured to use ma_format_f32. */ for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { if (!g_pDecodersAtEnd[iDecoder]) { ma_uint32 framesRead = read_and_mix_pcm_frames_f32(&g_pDecoders[iDecoder], pOutputF32, frameCount); if (framesRead < frameCount) { g_pDecodersAtEnd[iDecoder] = MA_TRUE; } } } /* If at the end all of our decoders are at the end we need to stop. We cannot stop the device in the callback. Instead we need to signal an event to indicate that it's stopped. The main thread will be waiting on the event, after which it will stop the device. */ if (are_all_decoders_at_end()) { ma_event_signal(&g_stopEvent); } (void)pInput; (void)pDevice; } int main(int argc, char** argv) { ma_result result; ma_decoder_config decoderConfig; ma_device_config deviceConfig; ma_device device; ma_uint32 iDecoder; if (argc < 2) { printf("No input files.\n"); return -1; } g_decoderCount = argc-1; g_pDecoders = (ma_decoder*)malloc(sizeof(*g_pDecoders) * g_decoderCount); g_pDecodersAtEnd = (ma_bool32*) malloc(sizeof(*g_pDecodersAtEnd) * g_decoderCount); /* In this example, all decoders need to have the same output format. */ decoderConfig = ma_decoder_config_init(SAMPLE_FORMAT, CHANNEL_COUNT, SAMPLE_RATE); for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { result = ma_decoder_init_file(argv[1+iDecoder], &decoderConfig, &g_pDecoders[iDecoder]); if (result != MA_SUCCESS) { ma_uint32 iDecoder2; for (iDecoder2 = 0; iDecoder2 < iDecoder; ++iDecoder2) { ma_decoder_uninit(&g_pDecoders[iDecoder2]); } free(g_pDecoders); free(g_pDecodersAtEnd); printf("Failed to load %s.\n", argv[1+iDecoder]); return -3; } g_pDecodersAtEnd[iDecoder] = MA_FALSE; } /* Create only a single device. The decoders will be mixed together in the callback. In this example the data format needs to be the same as the decoders. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = SAMPLE_FORMAT; deviceConfig.playback.channels = CHANNEL_COUNT; deviceConfig.sampleRate = SAMPLE_RATE; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = NULL; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { ma_decoder_uninit(&g_pDecoders[iDecoder]); } free(g_pDecoders); free(g_pDecodersAtEnd); printf("Failed to open playback device.\n"); return -3; } /* We can't stop in the audio thread so we instead need to use an event. We wait on this thread in the main thread, and signal it in the audio thread. This needs to be done before starting the device. We need a context to initialize the event, which we can get from the device. Alternatively you can initialize a context separately, but we don't need to do that for this example. */ ma_event_init(&g_stopEvent); /* Now we start playback and wait for the audio thread to tell us to stop. */ if (ma_device_start(&device) != MA_SUCCESS) { ma_device_uninit(&device); for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { ma_decoder_uninit(&g_pDecoders[iDecoder]); } free(g_pDecoders); free(g_pDecodersAtEnd); printf("Failed to start playback device.\n"); return -4; } printf("Waiting for playback to complete...\n"); ma_event_wait(&g_stopEvent); /* Getting here means the audio thread has signaled that the device should be stopped. */ ma_device_uninit(&device); for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { ma_decoder_uninit(&g_pDecoders[iDecoder]); } free(g_pDecoders); free(g_pDecodersAtEnd); return 0; } miniaudio-0.11.22/examples/simple_playback.c000066400000000000000000000045571475701111600207720ustar00rootroot00000000000000/* Demonstrates how to load a sound file and play it back using the low-level API. The low-level API uses a callback to deliver audio between the application and miniaudio for playback or recording. When in playback mode, as in this example, the application sends raw audio data to miniaudio which is then played back through the default playback device as defined by the operating system. This example uses the `ma_decoder` API to load a sound and play it back. The decoder is entirely decoupled from the device and can be used independently of it. This example only plays back a single sound file, but it's possible to play back multiple files by simple loading multiple decoders and mixing them (do not create multiple devices to do this). See the simple_mixing example for how best to do this. */ #include "../miniaudio.c" #include void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_decoder* pDecoder = (ma_decoder*)pDevice->pUserData; if (pDecoder == NULL) { return; } ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount, NULL); (void)pInput; } int main(int argc, char** argv) { ma_result result; ma_decoder decoder; ma_device_config deviceConfig; ma_device device; if (argc < 2) { printf("No input file.\n"); return -1; } result = ma_decoder_init_file(argv[1], NULL, &decoder); if (result != MA_SUCCESS) { printf("Could not load file: %s\n", argv[1]); return -2; } deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = decoder.outputFormat; deviceConfig.playback.channels = decoder.outputChannels; deviceConfig.sampleRate = decoder.outputSampleRate; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &decoder; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); ma_decoder_uninit(&decoder); return -3; } if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return -4; } printf("Press Enter to quit..."); getchar(); ma_device_uninit(&device); ma_decoder_uninit(&decoder); return 0; } miniaudio-0.11.22/examples/simple_playback_sine.c000066400000000000000000000051131475701111600217750ustar00rootroot00000000000000/* Demonstrates playback of a sine wave. Since all this example is doing is playing back a sine wave, we can disable decoding (and encoding) which will slightly reduce the size of the executable. This is done with the `MA_NO_DECODING` and `MA_NO_ENCODING` options. The generation of sine wave is achieved via the `ma_waveform` API. A waveform is a data source which means it can be seamlessly plugged into the `ma_data_source_*()` family of APIs as well. A waveform is initialized using the standard config/init pattern used throughout all of miniaudio. Frames are read via the `ma_waveform_read_pcm_frames()` API. This example works with Emscripten. */ #define MA_NO_DECODING #define MA_NO_ENCODING #include "../miniaudio.c" #include #ifdef __EMSCRIPTEN__ #include void main_loop__em() { } #endif #define DEVICE_FORMAT ma_format_f32 #define DEVICE_CHANNELS 2 #define DEVICE_SAMPLE_RATE 48000 void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_waveform_read_pcm_frames((ma_waveform*)pDevice->pUserData, pOutput, frameCount, NULL); (void)pInput; /* Unused. */ } int main(int argc, char** argv) { ma_waveform sineWave; ma_device_config deviceConfig; ma_device device; ma_waveform_config sineWaveConfig; deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.sampleRate = DEVICE_SAMPLE_RATE; deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = &sineWave; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); return -4; } printf("Device Name: %s\n", device.playback.name); sineWaveConfig = ma_waveform_config_init(device.playback.format, device.playback.channels, device.sampleRate, ma_waveform_type_sine, 0.2, 220); ma_waveform_init(&sineWaveConfig, &sineWave); if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start playback device.\n"); ma_device_uninit(&device); return -5; } #ifdef __EMSCRIPTEN__ emscripten_set_main_loop(main_loop__em, 0, 1); #else printf("Press Enter to quit...\n"); getchar(); #endif ma_device_uninit(&device); ma_waveform_uninit(&sineWave); /* Uninitialize the waveform after the device so we don't pull it from under the device while it's being reference in the data callback. */ (void)argc; (void)argv; return 0; } miniaudio-0.11.22/examples/simple_spatialization.c000066400000000000000000000047451475701111600222360ustar00rootroot00000000000000/* Demonstrates how to do basic spatialization via the high level API. You can position and orientate sounds to create a simple spatialization effect. This example shows how to do this. In addition to positioning sounds, there is the concept of a listener. This can also be positioned and orientated to help with spatialization. This example only covers the basics to get your started. See the documentation for more detailed information on the available features. To use this example, pass in the path of a sound as the first argument. The sound will be positioned in front of the listener, while the listener rotates on the the spot to create an orbiting effect. Terminate the program with Ctrl+C. */ #include "../miniaudio.c" #include #include /* For sinf() and cosf() */ /* Silence warning about unreachable code for MSVC. */ #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4702) #endif int main(int argc, char** argv) { ma_result result; ma_engine engine; ma_sound sound; float listenerAngle = 0; if (argc < 2) { printf("No input file.\n"); return -1; } result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { printf("Failed to initialize engine.\n"); return -1; } result = ma_sound_init_from_file(&engine, argv[1], 0, NULL, NULL, &sound); if (result != MA_SUCCESS) { printf("Failed to load sound: %s\n", argv[1]); ma_engine_uninit(&engine); return -1; } /* This sets the position of the sound. miniaudio follows the same coordinate system as OpenGL, where -Z is forward. */ ma_sound_set_position(&sound, 0, 0, -1); /* This sets the position of the listener. The second parameter is the listener index. If you have only a single listener, which is most likely, just use 0. The position defaults to (0,0,0). */ ma_engine_listener_set_position(&engine, 0, 0, 0, 0); /* Sounds are stopped by default. We'll start it once initial parameters have been setup. */ ma_sound_start(&sound); /* Rotate the listener on the spot to create an orbiting effect. */ for (;;) { listenerAngle += 0.01f; ma_engine_listener_set_direction(&engine, 0, sinf(listenerAngle), 0, cosf(listenerAngle)); ma_sleep(1); } /* Won't actually get here, but do this to tear down. */ ma_sound_uninit(&sound); ma_engine_uninit(&engine); return 0; } #ifdef _MSC_VER #pragma warning(pop) #endif miniaudio-0.11.22/external/000077500000000000000000000000001475701111600154605ustar00rootroot00000000000000miniaudio-0.11.22/external/fs/000077500000000000000000000000001475701111600160705ustar00rootroot00000000000000miniaudio-0.11.22/external/fs/fs.c000066400000000000000000007647341475701111600166710ustar00rootroot00000000000000#ifndef fs_c #define fs_c #include "fs.h" #include #include #include #include #if defined(_WIN32) #include /* <-- Just can't get away from this darn thing... Needed for mutexes and file iteration. */ static fs_result fs_result_from_GetLastError(DWORD error) { switch (error) { case ERROR_SUCCESS: return FS_SUCCESS; case ERROR_NOT_ENOUGH_MEMORY: return FS_OUT_OF_MEMORY; case ERROR_BUSY: return FS_BUSY; case ERROR_SEM_TIMEOUT: return FS_TIMEOUT; default: break; } return FS_ERROR; } #endif /* This is the maximum number of ureferenced opened archive files that will be kept in memory before garbage collection of those archives is triggered. */ #ifndef FS_DEFAULT_ARCHIVE_GC_THRESHOLD #define FS_DEFAULT_ARCHIVE_GC_THRESHOLD 10 #endif #define FS_UNUSED(x) (void)x #ifndef FS_MALLOC #define FS_MALLOC(sz) malloc((sz)) #endif #ifndef FS_REALLOC #define FS_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef FS_FREE #define FS_FREE(p) free((p)) #endif static void fs_zero_memory_default(void* p, size_t sz) { if (sz > 0) { memset(p, 0, sz); } } #ifndef FS_ZERO_MEMORY #define FS_ZERO_MEMORY(p, sz) fs_zero_memory_default((p), (sz)) #endif #ifndef FS_COPY_MEMORY #define FS_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef FS_MOVE_MEMORY #define FS_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #ifndef FS_ASSERT #define FS_ASSERT(condition) assert(condition) #endif #define FS_ZERO_OBJECT(p) FS_ZERO_MEMORY((p), sizeof(*(p))) #define FS_COUNTOF(x) (sizeof(x) / sizeof(x[0])) #define FS_MAX(x, y) (((x) > (y)) ? (x) : (y)) #define FS_MIN(x, y) (((x) < (y)) ? (x) : (y)) #define FS_ABS(x) (((x) > 0) ? (x) : -(x)) #define FS_CLAMP(x, lo, hi) (FS_MAX((lo), FS_MIN((x), (hi)))) #define FS_OFFSET_PTR(p, offset) (((unsigned char*)(p)) + (offset)) #define FS_ALIGN(x, a) ((x + (a-1)) & ~(a-1)) FS_API char* fs_strcpy(char* dst, const char* src) { char* dstorig; FS_ASSERT(dst != NULL); FS_ASSERT(src != NULL); dstorig = dst; /* No, we're not using this garbage: while (*dst++ = *src++); */ for (;;) { *dst = *src; if (*src == '\0') { break; } dst += 1; src += 1; } return dstorig; } FS_API int fs_strncpy(char* dst, const char* src, size_t count) { size_t maxcount; size_t i; if (dst == 0) { return EINVAL; } if (src == 0) { dst[0] = '\0'; return EINVAL; } maxcount = count; for (i = 0; i < maxcount && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (src[i] == '\0' || i == count || count == ((size_t)-1)) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return ERANGE; } FS_API int fs_strcpy_s(char* dst, size_t dstCap, const char* src) { size_t i; if (dst == 0) { return EINVAL; } if (dstCap == 0) { return ERANGE; } if (src == 0) { dst[0] = '\0'; return EINVAL; } for (i = 0; i < dstCap && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstCap) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return ERANGE; } FS_API int fs_strncpy_s(char* dst, size_t dstCap, const char* src, size_t count) { size_t maxcount; size_t i; if (dst == 0) { return EINVAL; } if (dstCap == 0) { return EINVAL; } if (src == 0) { dst[0] = '\0'; return EINVAL; } maxcount = count; if (count == ((size_t)-1) || count >= dstCap) { /* -1 = _TRUNCATE */ maxcount = dstCap - 1; } for (i = 0; i < maxcount && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (src[i] == '\0' || i == count || count == ((size_t)-1)) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return ERANGE; } FS_API int fs_strncmp(const char* str1, const char* str2, size_t maxLen) { if (str1 == str2) return 0; /* These checks differ from the standard implementation. It's not important, but I prefer it just for sanity. */ if (str1 == NULL) return -1; if (str2 == NULL) return 1; /* This function still needs to check for null terminators even though the length has been specified. */ for (;;) { if (maxLen == 0) { break; } if (str1[0] == '\0') { break; } if (str1[0] != str2[0]) { break; } str1 += 1; str2 += 1; maxLen -= 1; } if (maxLen == 0) { return 0; } return ((unsigned char*)str1)[0] - ((unsigned char*)str2)[0]; } FS_API int fs_strnicmp_ascii(const char* str1, const char* str2, size_t count) { if (str1 == NULL || str2 == NULL) { return 0; } while (*str1 != '\0' && *str2 != '\0' && count > 0) { int c1 = (int)*str1; int c2 = (int)*str2; if (c1 >= 'A' && c1 <= 'Z') { c1 += 'a' - 'A'; } if (c2 >= 'A' && c2 <= 'Z') { c2 += 'a' - 'A'; } if (c1 != c2) { return c1 - c2; } str1 += 1; str2 += 1; count -= 1; } if (count == 0) { return 0; } else if (*str1 == '\0' && *str2 == '\0') { return 0; } else if (*str1 == '\0') { return -1; } else { return 1; } } FS_API int fs_strnicmp(const char* str1, const char* str2, size_t count) { /* We will use the standard implementations of strnicmp() and strncasecmp() if they are available. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 return _strnicmp(str1, str2, count); #elif defined(__GNUC__) && defined(__USE_GNU) return strncasecmp(str1, str2, count); #else /* It would be good if we could use a custom implementation based on the Unicode standard here. Would require a lot of work to get that right, however. */ return fs_strnicmp_ascii(str1, str2, count); #endif } /* BEG fs_allocation_callbacks.c */ /* Default allocation callbacks. */ static void* fs_malloc_default(size_t sz, void* pUserData) { FS_UNUSED(pUserData); return FS_MALLOC(sz); } static void* fs_realloc_default(void* p, size_t sz, void* pUserData) { FS_UNUSED(pUserData); return FS_REALLOC(p, sz); } static void fs_free_default(void* p, void* pUserData) { FS_UNUSED(pUserData); FS_FREE(p); } static fs_allocation_callbacks fs_allocation_callbacks_init_default(void) { fs_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = fs_malloc_default; allocationCallbacks.onRealloc = fs_realloc_default; allocationCallbacks.onFree = fs_free_default; return allocationCallbacks; } static fs_allocation_callbacks fs_allocation_callbacks_init_copy(const fs_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return *pAllocationCallbacks; } else { return fs_allocation_callbacks_init_default(); } } FS_API void* fs_malloc(size_t sz, const fs_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return fs_malloc_default(sz, NULL); } } FS_API void* fs_calloc(size_t sz, const fs_allocation_callbacks* pAllocationCallbacks) { void* p = fs_malloc(sz, pAllocationCallbacks); if (p != NULL) { FS_ZERO_MEMORY(p, sz); } return p; } FS_API void* fs_realloc(void* p, size_t sz, const fs_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return fs_realloc_default(p, sz, NULL); } } FS_API void fs_free(void* p, const fs_allocation_callbacks* pAllocationCallbacks) { if (p == NULL) { return; } if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } else { return; /* Do no fall back to the default implementation. */ } } else { fs_free_default(p, NULL); } } /* END fs_allocation_callbacks.c */ /* BEG fs_thread.c */ /* This section has been designed to be mostly compatible with c89thread with only a few minor changes if you wanted to amalgamate this into another project which uses c89thread and want to avoid duplicate code. These are the differences: * The c89 namespace is replaced with "fs_". * There is no c89mtx_timedlock() equivalent. * `fs_mtx_plain`, etc. have been capitalized and taken out of the enum. * c89thread_success is FS_SUCCESS * c89thrd_error is EINVAL * c89thrd_busy is EBUSY * c89thrd_pthread_* is fs_pthread_* Parameter ordering is the same as c89thread to make amalgamation easier. */ #if defined(_WIN32) && !defined(FS_USE_PTHREAD) /* Win32. Don't include windows.h here. */ #else #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 700 #else #if _XOPEN_SOURCE < 500 #error _XOPEN_SOURCE must be >= 500. c89thread is not usable. #endif #endif #include typedef pthread_t fs_pthread; typedef pthread_mutex_t fs_pthread_mutex; typedef pthread_cond_t fs_pthread_cond; #endif #if defined(_WIN32) typedef struct { void* handle; /* HANDLE, CreateMutex(), CreateEvent() */ int type; } fs_mtx; #else typedef fs_pthread_mutex fs_mtx; #endif #define FS_MTX_PLAIN 0 #define FS_MTX_TIMED 1 #define FS_MTX_RECURSIVE 2 enum { fs_mtx_plain = 0x00000000, fs_mtx_timed = 0x00000001, fs_mtx_recursive = 0x00000002 }; #if defined(_WIN32) FS_API int fs_mtx_init(fs_mtx* mutex, int type) { HANDLE hMutex; if (mutex == NULL) { return EINVAL; } /* Initialize the object to zero for safety. */ mutex->handle = NULL; mutex->type = 0; /* CreateMutex() will create a thread-aware mutex (allowing recursiveness), whereas an auto-reset event (CreateEvent()) is not thread-aware and will deadlock (will not allow recursiveness). In Win32 I'm making all mutex's timeable. */ if ((type & FS_MTX_RECURSIVE) != 0) { hMutex = CreateMutexA(NULL, FALSE, NULL); } else { hMutex = CreateEventA(NULL, FALSE, TRUE, NULL); } if (hMutex == NULL) { return fs_result_from_GetLastError(GetLastError()); } mutex->handle = (void*)hMutex; mutex->type = type; return FS_SUCCESS; } FS_API void fs_mtx_destroy(fs_mtx* mutex) { if (mutex == NULL) { return; } CloseHandle((HANDLE)mutex->handle); } FS_API int fs_mtx_lock(fs_mtx* mutex) { DWORD result; if (mutex == NULL) { return EINVAL; } result = WaitForSingleObject((HANDLE)mutex->handle, INFINITE); if (result != WAIT_OBJECT_0) { return EINVAL; } return FS_SUCCESS; } FS_API int fs_mtx_trylock(fs_mtx* mutex) { DWORD result; if (mutex == NULL) { return EINVAL; } result = WaitForSingleObject((HANDLE)mutex->handle, 0); if (result != WAIT_OBJECT_0) { return EBUSY; } return FS_SUCCESS; } FS_API int fs_mtx_unlock(fs_mtx* mutex) { BOOL result; if (mutex == NULL) { return EINVAL; } if ((mutex->type & FS_MTX_RECURSIVE) != 0) { result = ReleaseMutex((HANDLE)mutex->handle); } else { result = SetEvent((HANDLE)mutex->handle); } if (!result) { return EINVAL; } return FS_SUCCESS; } #else FS_API int fs_mtx_init(fs_mtx* mutex, int type) { int result; pthread_mutexattr_t attr; /* For specifying whether or not the mutex is recursive. */ if (mutex == NULL) { return EINVAL; } pthread_mutexattr_init(&attr); if ((type & FS_MTX_RECURSIVE) != 0) { pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); } else { pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL); /* Will deadlock. Consistent with Win32. */ } result = pthread_mutex_init((pthread_mutex_t*)mutex, &attr); pthread_mutexattr_destroy(&attr); if (result != 0) { return EINVAL; } return FS_SUCCESS; } FS_API void fs_mtx_destroy(fs_mtx* mutex) { if (mutex == NULL) { return; } pthread_mutex_destroy((pthread_mutex_t*)mutex); } FS_API int fs_mtx_lock(fs_mtx* mutex) { int result; if (mutex == NULL) { return EINVAL; } result = pthread_mutex_lock((pthread_mutex_t*)mutex); if (result != 0) { return EINVAL; } return FS_SUCCESS; } FS_API int fs_mtx_trylock(fs_mtx* mutex) { int result; if (mutex == NULL) { return EINVAL; } result = pthread_mutex_trylock((pthread_mutex_t*)mutex); if (result != 0) { if (result == EBUSY) { return EBUSY; } return EINVAL; } return FS_SUCCESS; } FS_API int fs_mtx_unlock(fs_mtx* mutex) { int result; if (mutex == NULL) { return EINVAL; } result = pthread_mutex_unlock((pthread_mutex_t*)mutex); if (result != 0) { return EINVAL; } return FS_SUCCESS; } #endif /* END fs_thread.c */ /* BEG fs_stream.c */ FS_API fs_result fs_stream_init(const fs_stream_vtable* pVTable, fs_stream* pStream) { if (pStream == NULL) { return FS_INVALID_ARGS; } pStream->pVTable = pVTable; if (pVTable == NULL) { return FS_INVALID_ARGS; } return FS_SUCCESS; } FS_API fs_result fs_stream_read(fs_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead) { size_t bytesRead; fs_result result; if (pBytesRead != NULL) { *pBytesRead = 0; } if (pStream == NULL) { return FS_INVALID_ARGS; } if (pStream->pVTable->read == NULL) { return FS_NOT_IMPLEMENTED; } bytesRead = 0; result = pStream->pVTable->read(pStream, pDst, bytesToRead, &bytesRead); if (pBytesRead != NULL) { *pBytesRead = bytesRead; } return result; } FS_API fs_result fs_stream_write(fs_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { size_t bytesWritten; fs_result result; if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (pStream == NULL) { return FS_INVALID_ARGS; } if (pStream->pVTable->write == NULL) { return FS_NOT_IMPLEMENTED; } bytesWritten = 0; result = pStream->pVTable->write(pStream, pSrc, bytesToWrite, &bytesWritten); if (pBytesWritten != NULL) { *pBytesWritten = bytesWritten; } return result; } FS_API fs_result fs_stream_writef(fs_stream* pStream, const char* fmt, ...) { va_list args; fs_result result; va_start(args, fmt); result = fs_stream_writefv(pStream, fmt, args); va_end(args); return result; } FS_API fs_result fs_stream_writef_ex(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, const char* fmt, ...) { va_list args; fs_result result; va_start(args, fmt); result = fs_stream_writefv_ex(pStream, pAllocationCallbacks, fmt, args); va_end(args); return result; } FS_API fs_result fs_stream_writefv(fs_stream* pStream, const char* fmt, va_list args) { return fs_stream_writefv_ex(pStream, NULL, fmt, args); } FS_API fs_result fs_stream_writefv_ex(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, const char* fmt, va_list args) { fs_result result; int strLen; char pStrStack[1024]; if (pStream == NULL || fmt == NULL) { return FS_INVALID_ARGS; } strLen = fs_vsnprintf(pStrStack, sizeof(pStrStack), fmt, args); if (strLen < 0) { return FS_ERROR; /* Encoding error. */ } if (strLen < (int)sizeof(pStrStack)) { /* Stack buffer is big enough. Output straight to the file. */ result = fs_stream_write(pStream, pStrStack, strLen, NULL); } else { /* Stack buffer is not big enough. Allocate space on the heap. */ char* pStrHeap = NULL; pStrHeap = (char*)fs_malloc(strLen + 1, pAllocationCallbacks); if (pStrHeap == NULL) { return FS_OUT_OF_MEMORY; } fs_vsnprintf(pStrHeap, strLen + 1, fmt, args); result = fs_stream_write(pStream, pStrHeap, strLen, NULL); fs_free(pStrHeap, pAllocationCallbacks); } return result; } FS_API fs_result fs_stream_seek(fs_stream* pStream, fs_int64 offset, fs_seek_origin origin) { if (pStream == NULL) { return FS_INVALID_ARGS; } if (pStream->pVTable->seek == NULL) { return FS_NOT_IMPLEMENTED; } return pStream->pVTable->seek(pStream, offset, origin); } FS_API fs_result fs_stream_tell(fs_stream* pStream, fs_int64* pCursor) { if (pCursor == NULL) { return FS_INVALID_ARGS; /* It does not make sense to call this without a variable to receive the cursor position. */ } *pCursor = 0; /* <-- In case an error happens later. */ if (pStream == NULL) { return FS_INVALID_ARGS; } if (pStream->pVTable->tell == NULL) { return FS_NOT_IMPLEMENTED; } return pStream->pVTable->tell(pStream, pCursor); } FS_API fs_result fs_stream_duplicate(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, fs_stream** ppDuplicatedStream) { fs_result result; fs_stream* pDuplicatedStream; if (ppDuplicatedStream == NULL) { return FS_INVALID_ARGS; } *ppDuplicatedStream = NULL; if (pStream == NULL) { return FS_INVALID_ARGS; } if (pStream->pVTable->duplicate_alloc_size == NULL || pStream->pVTable->duplicate == NULL) { return FS_NOT_IMPLEMENTED; } pDuplicatedStream = (fs_stream*)fs_calloc(pStream->pVTable->duplicate_alloc_size(pStream), pAllocationCallbacks); if (pDuplicatedStream == NULL) { return FS_OUT_OF_MEMORY; } result = fs_stream_init(pStream->pVTable, pDuplicatedStream); if (result != FS_SUCCESS) { fs_free(pDuplicatedStream, pAllocationCallbacks); return result; } result = pStream->pVTable->duplicate(pStream, pDuplicatedStream); if (result != FS_SUCCESS) { fs_free(pDuplicatedStream, pAllocationCallbacks); return result; } *ppDuplicatedStream = pDuplicatedStream; return FS_SUCCESS; } FS_API void fs_stream_delete_duplicate(fs_stream* pDuplicatedStream, const fs_allocation_callbacks* pAllocationCallbacks) { if (pDuplicatedStream == NULL) { return; } if (pDuplicatedStream->pVTable->uninit != NULL) { pDuplicatedStream->pVTable->uninit(pDuplicatedStream); } fs_free(pDuplicatedStream, pAllocationCallbacks); } FS_API fs_result fs_stream_read_to_end(fs_stream* pStream, fs_format format, const fs_allocation_callbacks* pAllocationCallbacks, void** ppData, size_t* pDataSize) { fs_result result = FS_SUCCESS; size_t dataSize = 0; size_t dataCap = 0; void* pData = NULL; if (ppData != NULL) { *ppData = NULL; } if (pDataSize != NULL) { *pDataSize = 0; } if (pStream == NULL || ppData == NULL) { return FS_INVALID_ARGS; } /* Read in a loop into a dynamically increasing buffer. */ for (;;) { size_t chunkSize = 4096; size_t bytesRead; if (dataSize + chunkSize > dataCap) { void* pNewData; size_t newCap = dataCap * 2; if (newCap == 0) { newCap = chunkSize; } pNewData = fs_realloc(pData, newCap, pAllocationCallbacks); if (pNewData == NULL) { fs_free(pData, pAllocationCallbacks); return FS_OUT_OF_MEMORY; } pData = pNewData; dataCap = newCap; } /* At this point there should be enough data in the buffer for the next chunk. */ result = fs_stream_read(pStream, FS_OFFSET_PTR(pData, dataSize), chunkSize, &bytesRead); dataSize += bytesRead; if (result != FS_SUCCESS || bytesRead < chunkSize) { break; } } /* If we're opening in text mode, we need to append a null terminator. */ if (format == FS_FORMAT_TEXT) { if (dataSize >= dataCap) { void* pNewData; pNewData = fs_realloc(pData, dataSize + 1, pAllocationCallbacks); if (pNewData == NULL) { fs_free(pData, pAllocationCallbacks); return FS_OUT_OF_MEMORY; } pData = pNewData; } ((char*)pData)[dataSize] = '\0'; } *ppData = pData; if (pDataSize != NULL) { *pDataSize = dataSize; } /* Make sure the caller is aware of any errors. */ if (result != FS_SUCCESS && result != FS_AT_END) { return result; } else { return FS_SUCCESS; } } /* END fs_stream.c */ /* BEG fs_backend.c */ static size_t fs_backend_alloc_size(const fs_backend* pBackend, const void* pBackendConfig) { FS_ASSERT(pBackend != NULL); if (pBackend->alloc_size == NULL) { return 0; } else { return pBackend->alloc_size(pBackendConfig); } } static fs_result fs_backend_init(const fs_backend* pBackend, fs* pFS, const void* pBackendConfig, fs_stream* pStream) { FS_ASSERT(pBackend != NULL); if (pBackend->init == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->init(pFS, pBackendConfig, pStream); } } static void fs_backend_uninit(const fs_backend* pBackend, fs* pFS) { FS_ASSERT(pBackend != NULL); if (pBackend->uninit == NULL) { return; } else { pBackend->uninit(pFS); } } static fs_result fs_backend_ioctl(const fs_backend* pBackend, fs* pFS, int command, void* pArgs) { FS_ASSERT(pBackend != NULL); if (pBackend->ioctl == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->ioctl(pFS, command, pArgs); } } static fs_result fs_backend_remove(const fs_backend* pBackend, fs* pFS, const char* pFilePath) { FS_ASSERT(pBackend != NULL); if (pBackend->remove == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->remove(pFS, pFilePath); } } static fs_result fs_backend_rename(const fs_backend* pBackend, fs* pFS, const char* pOldName, const char* pNewName) { FS_ASSERT(pBackend != NULL); if (pBackend->remove == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->rename(pFS, pOldName, pNewName); } } static fs_result fs_backend_mkdir(const fs_backend* pBackend, fs* pFS, const char* pPath) { FS_ASSERT(pBackend != NULL); if (pBackend->remove == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->mkdir(pFS, pPath); } } static fs_result fs_backend_info(const fs_backend* pBackend, fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo) { FS_ASSERT(pBackend != NULL); if (pBackend->info == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->info(pFS, pPath, openMode, pInfo); } } static size_t fs_backend_file_alloc_size(const fs_backend* pBackend, fs* pFS) { FS_ASSERT(pBackend != NULL); if (pBackend->file_alloc_size == NULL) { return 0; } else { return pBackend->file_alloc_size(pFS); } } static fs_result fs_backend_file_open(const fs_backend* pBackend, fs* pFS, fs_stream* pStream, const char* pFilePath, int openMode, fs_file* pFile) { FS_ASSERT(pBackend != NULL); if (pBackend->file_open == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_open(pFS, pStream, pFilePath, openMode, pFile); } } static fs_result fs_backend_file_open_handle(const fs_backend* pBackend, fs* pFS, void* hBackendFile, fs_file* pFile) { FS_ASSERT(pBackend != NULL); if (pBackend->file_open_handle == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_open_handle(pFS, hBackendFile, pFile); } } static void fs_backend_file_close(const fs_backend* pBackend, fs_file* pFile) { FS_ASSERT(pBackend != NULL); if (pBackend->file_close == NULL) { return; } else { pBackend->file_close(pFile); } } static fs_result fs_backend_file_read(const fs_backend* pBackend, fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead) { FS_ASSERT(pBackend != NULL); if (pBackend->file_read == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_read(pFile, pDst, bytesToRead, pBytesRead); } } static fs_result fs_backend_file_write(const fs_backend* pBackend, fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { FS_ASSERT(pBackend != NULL); if (pBackend->file_write == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_write(pFile, pSrc, bytesToWrite, pBytesWritten); } } static fs_result fs_backend_file_seek(const fs_backend* pBackend, fs_file* pFile, fs_int64 offset, fs_seek_origin origin) { FS_ASSERT(pBackend != NULL); if (pBackend->file_seek == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_seek(pFile, offset, origin); } } static fs_result fs_backend_file_tell(const fs_backend* pBackend, fs_file* pFile, fs_int64* pCursor) { FS_ASSERT(pBackend != NULL); if (pBackend->file_tell == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_tell(pFile, pCursor); } } static fs_result fs_backend_file_flush(const fs_backend* pBackend, fs_file* pFile) { FS_ASSERT(pBackend != NULL); if (pBackend->file_flush == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_flush(pFile); } } static fs_result fs_backend_file_info(const fs_backend* pBackend, fs_file* pFile, fs_file_info* pInfo) { FS_ASSERT(pBackend != NULL); if (pBackend->file_info == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_info(pFile, pInfo); } } static fs_result fs_backend_file_duplicate(const fs_backend* pBackend, fs_file* pFile, fs_file* pDuplicatedFile) { FS_ASSERT(pBackend != NULL); if (pBackend->file_duplicate == NULL) { return FS_NOT_IMPLEMENTED; } else { return pBackend->file_duplicate(pFile, pDuplicatedFile); } } static fs_iterator* fs_backend_first(const fs_backend* pBackend, fs* pFS, const char* pDirectoryPath, size_t directoryPathLen) { FS_ASSERT(pBackend != NULL); if (pBackend->first == NULL) { return NULL; } else { fs_iterator* pIterator; pIterator = pBackend->first(pFS, pDirectoryPath, directoryPathLen); /* Just make double sure the FS information is set in case the backend doesn't do it. */ if (pIterator != NULL) { pIterator->pFS = pFS; } return pIterator; } } static fs_iterator* fs_backend_next(const fs_backend* pBackend, fs_iterator* pIterator) { FS_ASSERT(pBackend != NULL); if (pBackend->next == NULL) { return NULL; } else { return pBackend->next(pIterator); } } static void fs_backend_free_iterator(const fs_backend* pBackend, fs_iterator* pIterator) { FS_ASSERT(pBackend != NULL); if (pBackend->free_iterator == NULL) { return; } else { pBackend->free_iterator(pIterator); } } /* END fs_backend.c */ /* BEG fs_proxy.c */ /* This is a special backend that we use for archives so we can intercept opening and closing of files within those archives and do any necessary reference counting. */ /* Forward declarations. */ static size_t fs_increment_opened_archive_ref_count(fs* pFS, fs* pArchive); static size_t fs_decrement_opened_archive_ref_count(fs* pFS, fs* pArchive); typedef struct fs_proxy { const fs_backend* pBackend; fs_file* pArchiveFile; } fs_proxy; typedef struct fs_proxy_config { const fs_backend* pBackend; const void* pBackendConfig; } fs_proxy_config; typedef struct fs_file_proxy { fs_bool32 unrefArchiveOnClose; } fs_file_proxy; static fs_proxy* fs_proxy_get_backend_data(fs* pFS) { return (fs_proxy*)FS_OFFSET_PTR(fs_get_backend_data(pFS), fs_get_backend_data_size(pFS) - sizeof(fs_proxy)); } static const fs_backend* fs_proxy_get_backend(fs* pFS) { return fs_proxy_get_backend_data(pFS)->pBackend; } static fs_file* fs_proxy_get_archive_file(fs* pFS) { fs_proxy* pProxy; pProxy = fs_proxy_get_backend_data(pFS); FS_ASSERT(pProxy != NULL); return pProxy->pArchiveFile; } static fs* fs_proxy_get_owner_fs(fs* pFS) { return fs_file_get_fs(fs_proxy_get_archive_file(pFS)); } static fs_file_proxy* fs_file_proxy_get_backend_data(fs_file* pFile) { return (fs_file_proxy*)FS_OFFSET_PTR(fs_file_get_backend_data(pFile), fs_file_get_backend_data_size(pFile) - sizeof(fs_file_proxy)); } static fs_bool32 fs_file_proxy_get_unref_archive_on_close(fs_file* pFile) { return fs_file_proxy_get_backend_data(pFile)->unrefArchiveOnClose; } static void fs_file_proxy_set_unref_archive_on_close(fs_file* pFile, fs_bool32 unrefArchiveOnClose) { fs_file_proxy_get_backend_data(pFile)->unrefArchiveOnClose = unrefArchiveOnClose; } static size_t fs_alloc_size_proxy(const void* pBackendConfig) { const fs_proxy_config* pProxyConfig = (const fs_proxy_config*)pBackendConfig; FS_ASSERT(pProxyConfig != NULL); /* <-- We must have a config since that's where the backend is specified. */ return fs_backend_alloc_size(pProxyConfig->pBackend, pProxyConfig->pBackendConfig) + sizeof(fs_proxy); } static fs_result fs_init_proxy(fs* pFS, const void* pBackendConfig, fs_stream* pStream) { const fs_proxy_config* pProxyConfig = (const fs_proxy_config*)pBackendConfig; fs_proxy* pProxy; FS_ASSERT(pProxyConfig != NULL); /* <-- We must have a config since that's where the backend is specified. */ FS_ASSERT(pStream != NULL); /* <-- This backend is only used with archives which means we must have a stream. */ pProxy = fs_proxy_get_backend_data(pFS); FS_ASSERT(pProxy != NULL); pProxy->pBackend = pProxyConfig->pBackend; pProxy->pArchiveFile = (fs_file*)pStream; /* The stream will always be a fs_file when using this backend. */ return fs_backend_init(pProxyConfig->pBackend, pFS, pProxyConfig->pBackendConfig, pStream); } static void fs_uninit_proxy(fs* pFS) { fs_backend_uninit(fs_proxy_get_backend(pFS), pFS); } static fs_result fs_ioctl_proxy(fs* pFS, int command, void* pArgs) { return fs_backend_ioctl(fs_proxy_get_backend(pFS), pFS, command, pArgs); } static fs_result fs_remove_proxy(fs* pFS, const char* pFilePath) { return fs_backend_remove(fs_proxy_get_backend(pFS), pFS, pFilePath); } static fs_result fs_rename_proxy(fs* pFS, const char* pOldName, const char* pNewName) { return fs_backend_rename(fs_proxy_get_backend(pFS), pFS, pOldName, pNewName); } static fs_result fs_mkdir_proxy(fs* pFS, const char* pPath) { return fs_backend_mkdir(fs_proxy_get_backend(pFS), pFS, pPath); } static fs_result fs_info_proxy(fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo) { return fs_backend_info(fs_proxy_get_backend(pFS), pFS, pPath, openMode, pInfo); } static size_t fs_file_alloc_size_proxy(fs* pFS) { return fs_backend_file_alloc_size(fs_proxy_get_backend(pFS), pFS); } static fs_result fs_file_open_proxy(fs* pFS, fs_stream* pStream, const char* pFilePath, int openMode, fs_file* pFile) { return fs_backend_file_open(fs_proxy_get_backend(pFS), pFS, pStream, pFilePath, openMode, pFile); } static fs_result fs_file_open_handle_proxy(fs* pFS, void* hBackendFile, fs_file* pFile) { return fs_backend_file_open_handle(fs_proxy_get_backend(pFS), pFS, hBackendFile, pFile); } static void fs_file_close_proxy(fs_file* pFile) { fs_backend_file_close(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile); /* This right here is the entire reason the backend needs to be proxied. We need to intercept calls to fs_file_close() so we can then tell the FS that owns the archive to decrement the reference count and potentially put the archive FS up for garbage collection. You'll note that we don't have a corresponding call to fs_open_archive() in the function fs_file_open_proxy() above. The reason is that fs_open_archive() is called at a higher level when the archive FS is being acquired in the first place. */ if (fs_file_proxy_get_unref_archive_on_close(pFile)) { fs_close_archive(fs_file_get_fs(pFile)); } } static fs_result fs_file_read_proxy(fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead) { return fs_backend_file_read(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile, pDst, bytesToRead, pBytesRead); } static fs_result fs_file_write_proxy(fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { return fs_backend_file_write(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile, pSrc, bytesToWrite, pBytesWritten); } static fs_result fs_file_seek_proxy(fs_file* pFile, fs_int64 offset, fs_seek_origin origin) { return fs_backend_file_seek(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile, offset, origin); } static fs_result fs_file_tell_proxy(fs_file* pFile, fs_int64* pCursor) { return fs_backend_file_tell(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile, pCursor); } static fs_result fs_file_flush_proxy(fs_file* pFile) { return fs_backend_file_flush(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile); } static fs_result fs_file_info_proxy(fs_file* pFile, fs_file_info* pInfo) { return fs_backend_file_info(fs_proxy_get_backend(fs_file_get_fs(pFile)), pFile, pInfo); } static fs_result fs_file_duplicate_proxy(fs_file* pFile, fs_file* pDuplicatedFile) { fs_result result; fs* pFS; pFS = fs_file_get_fs(pFile); result = fs_backend_file_duplicate(fs_proxy_get_backend(pFS), pFile, pDuplicatedFile); if (result != FS_SUCCESS) { return result; } /* Increment the reference count of the opened archive if necessary. */ if (fs_file_proxy_get_unref_archive_on_close(pFile)) { fs* pOwnerFS; fs_file_proxy_set_unref_archive_on_close(pDuplicatedFile, FS_TRUE); pOwnerFS = fs_proxy_get_owner_fs(pFS); if (pOwnerFS != NULL) { fs_increment_opened_archive_ref_count(pOwnerFS, pFS); } } return FS_SUCCESS; } static fs_iterator* fs_first_proxy(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen) { return fs_backend_first(fs_proxy_get_backend(pFS), pFS, pDirectoryPath, directoryPathLen); } static fs_iterator* fs_next_proxy(fs_iterator* pIterator) { return fs_backend_next(fs_proxy_get_backend(pIterator->pFS), pIterator); } static void fs_free_iterator_proxy(fs_iterator* pIterator) { fs_backend_free_iterator(fs_proxy_get_backend(pIterator->pFS), pIterator); } static fs_backend fs_proxy_backend = { fs_alloc_size_proxy, fs_init_proxy, fs_uninit_proxy, fs_ioctl_proxy, fs_remove_proxy, fs_rename_proxy, fs_mkdir_proxy, fs_info_proxy, fs_file_alloc_size_proxy, fs_file_open_proxy, fs_file_open_handle_proxy, fs_file_close_proxy, fs_file_read_proxy, fs_file_write_proxy, fs_file_seek_proxy, fs_file_tell_proxy, fs_file_flush_proxy, fs_file_info_proxy, fs_file_duplicate_proxy, fs_first_proxy, fs_next_proxy, fs_free_iterator_proxy }; const fs_backend* FS_PROXY = &fs_proxy_backend; /* END fs_proxy.c */ /* BEG fs.c */ #define FS_IS_OPAQUE(mode) ((mode & FS_OPAQUE) != 0) #define FS_IS_VERBOSE(mode) ((mode & FS_VERBOSE) != 0) #define FS_IS_TRANSPARENT(mode) ((mode & (FS_OPAQUE | FS_VERBOSE)) == 0) FS_API fs_config fs_config_init_default(void) { fs_config config; FS_ZERO_OBJECT(&config); return config; } FS_API fs_config fs_config_init(const fs_backend* pBackend, void* pBackendConfig, fs_stream* pStream) { fs_config config = fs_config_init_default(); config.pBackend = pBackend; config.pBackendConfig = pBackendConfig; config.pStream = pStream; return config; } typedef struct fs_opened_archive { fs* pArchive; size_t refCount; char pPath[1]; } fs_opened_archive; typedef struct fs_mount_point { size_t pathOff; /* Points to a null terminated string containing the mounted path starting from the first byte after this struct. */ size_t pathLen; size_t mountPointOff; /* Points to a null terminated string containing the mount point starting from the first byte after this struct. */ size_t mountPointLen; fs* pArchive; /* Can be null in which case the mounted path is a directory. */ fs_bool32 closeArchiveOnUnmount; /* If set to true, the archive FS will be closed when the mount point is unmounted. */ fs_bool32 padding; } fs_mount_point; typedef struct fs_mount_list fs_mount_list; struct fs { const fs_backend* pBackend; fs_stream* pStream; fs_allocation_callbacks allocationCallbacks; void* pArchiveTypes; /* One heap allocation containing all extension registrations. Needs to be parsed in order to enumerate them. Structure is [const fs_backend*][extension][null-terminator][padding (aligned to FS_SIZEOF_PTR)] */ size_t archiveTypesAllocSize; fs_bool32 isOwnerOfArchiveTypes; size_t backendDataSize; fs_mtx archiveLock; /* For use with fs_open_archive() and fs_close_archive(). */ void* pOpenedArchives; /* One heap allocation. Structure is [fs*][refcount (size_t)][path][null-terminator][padding (aligned to FS_SIZEOF_PTR)] */ size_t openedArchivesSize; size_t openedArchivesCap; size_t archiveGCThreshold; fs_mount_list* pReadMountPoints; fs_mount_list* pWriteMountPoints; }; typedef struct fs_file { fs_stream stream; /* Files are streams. This must be the first member so it can be cast. */ fs* pFS; fs_stream* pStreamForBackend; /* The stream for use by the backend. Different to `stream`. This is a duplicate of the stream used by `pFS` so the backend can do reading. */ size_t backendDataSize; } fs_file; static void fs_gc_archives_nolock(fs* pFS, int policy); /* Defined further down in the file. */ static size_t fs_mount_point_size(size_t pathLen, size_t mountPointLen) { return FS_ALIGN(sizeof(fs_mount_point) + pathLen + 1 + mountPointLen + 1, FS_SIZEOF_PTR); } static size_t fs_mount_list_get_header_size(void) { return sizeof(size_t)*2; } static size_t fs_mount_list_get_alloc_size(const fs_mount_list* pList) { if (pList == NULL) { return 0; } return *(size_t*)FS_OFFSET_PTR(pList, 0); } static size_t fs_mount_list_get_alloc_cap(const fs_mount_list* pList) { if (pList == NULL) { return 0; } return *(size_t*)FS_OFFSET_PTR(pList, 1 * sizeof(size_t)); } static void fs_mount_list_set_alloc_size(fs_mount_list* pList, size_t newSize) { FS_ASSERT(pList != NULL); *(size_t*)FS_OFFSET_PTR(pList, 0) = newSize; } static void fs_mount_list_set_alloc_cap(fs_mount_list* pList, size_t newCap) { FS_ASSERT(pList != NULL); *(size_t*)FS_OFFSET_PTR(pList, 1 * sizeof(size_t)) = newCap; } typedef struct fs_mount_list_iterator { const char* pPath; const char* pMountPointPath; fs* pArchive; /* Can be null. */ struct { fs_mount_list* pList; fs_mount_point* pMountPoint; size_t cursor; } internal; } fs_mount_list_iterator; static fs_result fs_mount_list_iterator_resolve_members(fs_mount_list_iterator* pIterator, size_t cursor) { FS_ASSERT(pIterator != NULL); if (cursor >= fs_mount_list_get_alloc_size(pIterator->internal.pList)) { return FS_AT_END; } pIterator->internal.cursor = cursor; pIterator->internal.pMountPoint = (fs_mount_point*)FS_OFFSET_PTR(pIterator->internal.pList, fs_mount_list_get_header_size() + pIterator->internal.cursor); FS_ASSERT(pIterator->internal.pMountPoint != NULL); /* The content of the paths are stored at the end of the structure. */ pIterator->pPath = (const char*)FS_OFFSET_PTR(pIterator->internal.pMountPoint, sizeof(fs_mount_point) + pIterator->internal.pMountPoint->pathOff); pIterator->pMountPointPath = (const char*)FS_OFFSET_PTR(pIterator->internal.pMountPoint, sizeof(fs_mount_point) + pIterator->internal.pMountPoint->mountPointOff); pIterator->pArchive = pIterator->internal.pMountPoint->pArchive; return FS_SUCCESS; } static fs_result fs_mount_list_first(fs_mount_list* pList, fs_mount_list_iterator* pIterator) { FS_ASSERT(pIterator != NULL); FS_ZERO_OBJECT(pIterator); pIterator->internal.pList = pList; if (fs_mount_list_get_alloc_size(pList) == 0) { return FS_AT_END; /* No mount points. */ } return fs_mount_list_iterator_resolve_members(pIterator, 0); } static fs_result fs_mount_list_next(fs_mount_list_iterator* pIterator) { size_t newCursor; FS_ASSERT(pIterator != NULL); /* For a bit of safety, lets go ahead and check if the cursor is already at the end and if so just abort early. */ if (pIterator->internal.cursor >= fs_mount_list_get_alloc_size(pIterator->internal.pList)) { return FS_AT_END; } /* Move the cursor forward. If after advancing the cursor we are at the end we're done and we can free the mount point iterator and return. */ newCursor = pIterator->internal.cursor + fs_mount_point_size(pIterator->internal.pMountPoint->pathLen, pIterator->internal.pMountPoint->mountPointLen); FS_ASSERT(newCursor <= fs_mount_list_get_alloc_size(pIterator->internal.pList)); /* <-- If this assert fails, there's a bug in the packing of the structure.*/ return fs_mount_list_iterator_resolve_members(pIterator, newCursor); } static fs_mount_list* fs_mount_list_alloc(fs_mount_list* pList, const char* pPathToMount, const char* pMountPoint, fs_mount_priority priority, const fs_allocation_callbacks* pAllocationCallbacks, fs_mount_point** ppMountPoint) { fs_mount_point* pNewMountPoint = NULL; size_t pathToMountLen; size_t mountPointLen; size_t mountPointAllocSize; FS_ASSERT(ppMountPoint != NULL); *ppMountPoint = NULL; pathToMountLen = strlen(pPathToMount); mountPointLen = strlen(pMountPoint); mountPointAllocSize = fs_mount_point_size(pathToMountLen, mountPointLen); if (fs_mount_list_get_alloc_cap(pList) < fs_mount_list_get_alloc_size(pList) + mountPointAllocSize) { size_t newCap; fs_mount_list* pNewList; newCap = fs_mount_list_get_alloc_cap(pList) * 2; if (newCap < fs_mount_list_get_alloc_size(pList) + mountPointAllocSize) { newCap = fs_mount_list_get_alloc_size(pList) + mountPointAllocSize; } pNewList = (fs_mount_list*)fs_realloc(pList, fs_mount_list_get_header_size() + newCap, pAllocationCallbacks); /* Need room for leading size and cap variables. */ if (pNewList == NULL) { return NULL; } /* Little bit awkward, but if the list is fresh we'll want to clear everything to zero. */ if (pList == NULL) { FS_ZERO_MEMORY(pNewList, fs_mount_list_get_header_size()); } pList = (fs_mount_list*)pNewList; fs_mount_list_set_alloc_cap(pList, newCap); } /* Getting here means we should have enough room in the buffer. Now we need to use the priority to determine where we're going to place the new entry within the buffer. */ if (priority == FS_MOUNT_PRIORITY_LOWEST) { /* The new entry goes to the end of the list. */ pNewMountPoint = (fs_mount_point*)FS_OFFSET_PTR(pList, fs_mount_list_get_header_size() + fs_mount_list_get_alloc_size(pList)); } else if (priority == FS_MOUNT_PRIORITY_HIGHEST) { /* The new entry goes to the start of the list. We'll need to move everything down. */ FS_MOVE_MEMORY(FS_OFFSET_PTR(pList, fs_mount_list_get_header_size() + mountPointAllocSize), FS_OFFSET_PTR(pList, fs_mount_list_get_header_size()), fs_mount_list_get_alloc_size(pList)); pNewMountPoint = (fs_mount_point*)FS_OFFSET_PTR(pList, fs_mount_list_get_header_size()); } else { FS_ASSERT(!"Unknown mount priority."); return NULL; } fs_mount_list_set_alloc_size(pList, fs_mount_list_get_alloc_size(pList) + mountPointAllocSize); /* Now we can fill out the details of the new mount point. */ pNewMountPoint->pathOff = 0; /* The path is always the first byte after the struct. */ pNewMountPoint->pathLen = pathToMountLen; pNewMountPoint->mountPointOff = pathToMountLen + 1; /* The mount point is always the first byte after the path to mount. */ pNewMountPoint->mountPointLen = mountPointLen; memcpy(FS_OFFSET_PTR(pNewMountPoint, sizeof(fs_mount_point) + pNewMountPoint->pathOff), pPathToMount, pathToMountLen + 1); memcpy(FS_OFFSET_PTR(pNewMountPoint, sizeof(fs_mount_point) + pNewMountPoint->mountPointOff), pMountPoint, mountPointLen + 1); *ppMountPoint = pNewMountPoint; return pList; } static fs_result fs_mount_list_remove(fs_mount_list* pList, fs_mount_point* pMountPoint) { size_t mountPointAllocSize = fs_mount_point_size(pMountPoint->pathLen, pMountPoint->mountPointLen); size_t newMountPointsAllocSize = fs_mount_list_get_alloc_size(pList) - mountPointAllocSize; FS_MOVE_MEMORY ( pMountPoint, FS_OFFSET_PTR(pList, fs_mount_list_get_header_size() + mountPointAllocSize), fs_mount_list_get_alloc_size(pList) - ((fs_uintptr)pMountPoint - (fs_uintptr)FS_OFFSET_PTR(pList, fs_mount_list_get_header_size())) - mountPointAllocSize ); fs_mount_list_set_alloc_size(pList, newMountPointsAllocSize); return FS_SUCCESS; } static const fs_backend* fs_get_backend_or_default(const fs* pFS) { if (pFS == NULL) { return FS_STDIO; } else { return pFS->pBackend; } } typedef struct fs_registered_backend_iterator { const fs* pFS; size_t cursor; const fs_backend* pBackend; void* pBackendConfig; const char* pExtension; size_t extensionLen; } fs_registered_backend_iterator; FS_API fs_result fs_file_open_or_info(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile, fs_file_info* pInfo); static fs_result fs_next_registered_backend(fs_registered_backend_iterator* pIterator); static fs_result fs_first_registered_backend(fs* pFS, fs_registered_backend_iterator* pIterator) { FS_ASSERT(pFS != NULL); FS_ASSERT(pIterator != NULL); FS_ZERO_OBJECT(pIterator); pIterator->pFS = pFS; return fs_next_registered_backend(pIterator); } static fs_result fs_next_registered_backend(fs_registered_backend_iterator* pIterator) { FS_ASSERT(pIterator != NULL); if (pIterator->cursor >= pIterator->pFS->archiveTypesAllocSize) { return FS_AT_END; } pIterator->pBackend = *(const fs_backend**)FS_OFFSET_PTR(pIterator->pFS->pArchiveTypes, pIterator->cursor); pIterator->pBackendConfig = NULL; /* <-- I'm not sure how to deal with backend configs with this API. Putting this member in the iterator in case I want to support this later. */ pIterator->pExtension = (const char* )FS_OFFSET_PTR(pIterator->pFS->pArchiveTypes, pIterator->cursor + sizeof(fs_backend*)); pIterator->extensionLen = strlen(pIterator->pExtension); pIterator->cursor += FS_ALIGN(sizeof(fs_backend*) + pIterator->extensionLen + 1, FS_SIZEOF_PTR); return FS_SUCCESS; } static fs_opened_archive* fs_find_opened_archive(fs* pFS, const char* pArchivePath, size_t archivePathLen) { size_t cursor; if (pFS == NULL) { return NULL; } FS_ASSERT(pArchivePath != NULL); FS_ASSERT(archivePathLen > 0); cursor = 0; while (cursor < pFS->openedArchivesSize) { fs_opened_archive* pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, cursor); if (fs_strncmp(pOpenedArchive->pPath, pArchivePath, archivePathLen) == 0) { return pOpenedArchive; } /* Getting here means this archive is not the one we're looking for. */ cursor += FS_ALIGN(sizeof(fs*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); } /* If we get here it means we couldn't find the archive by it's name. */ return NULL; } static fs_opened_archive* fs_find_opened_archive_by_fs(fs* pFS, fs* pArchive) { size_t cursor; if (pFS == NULL) { return NULL; } FS_ASSERT(pArchive != NULL); cursor = 0; while (cursor < pFS->openedArchivesSize) { fs_opened_archive* pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, cursor); if (pOpenedArchive->pArchive == pArchive) { return pOpenedArchive; } /* Getting here means this archive is not the one we're looking for. */ cursor += FS_ALIGN(sizeof(fs*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); } /* If we get here it means we couldn't find the archive. */ return NULL; } static fs_result fs_add_opened_archive(fs* pFS, fs* pArchive, const char* pArchivePath, size_t archivePathLen) { size_t openedArchiveSize; fs_opened_archive* pOpenedArchive; FS_ASSERT(pFS != NULL); FS_ASSERT(pArchive != NULL); FS_ASSERT(pArchivePath != NULL); if (archivePathLen == FS_NULL_TERMINATED) { archivePathLen = strlen(pArchivePath); } openedArchiveSize = FS_ALIGN(sizeof(fs*) + sizeof(size_t) + archivePathLen + 1, FS_SIZEOF_PTR); if (pFS->openedArchivesSize + openedArchiveSize > pFS->openedArchivesCap) { size_t newOpenedArchivesCap; void* pNewOpenedArchives; newOpenedArchivesCap = pFS->openedArchivesCap * 2; if (newOpenedArchivesCap < pFS->openedArchivesSize + openedArchiveSize) { newOpenedArchivesCap = pFS->openedArchivesSize + openedArchiveSize; } pNewOpenedArchives = fs_realloc(pFS->pOpenedArchives, newOpenedArchivesCap, fs_get_allocation_callbacks(pFS)); if (pNewOpenedArchives == NULL) { return FS_OUT_OF_MEMORY; } pFS->pOpenedArchives = pNewOpenedArchives; pFS->openedArchivesCap = newOpenedArchivesCap; } /* If we get here we should have enough room in the buffer to store the new archive details. */ FS_ASSERT(pFS->openedArchivesSize + openedArchiveSize <= pFS->openedArchivesCap); pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, pFS->openedArchivesSize); pOpenedArchive->pArchive = pArchive; pOpenedArchive->refCount = 0; fs_strncpy(pOpenedArchive->pPath, pArchivePath, archivePathLen); pFS->openedArchivesSize += openedArchiveSize; return FS_SUCCESS; } static fs_result fs_remove_opened_archive(fs* pFS, fs_opened_archive* pOpenedArchive) { /* This is a simple matter of doing a memmove() to move memory down. pOpenedArchive should be an offset of pFS->pOpenedArchives. */ size_t openedArchiveSize; openedArchiveSize = FS_ALIGN(sizeof(fs_opened_archive*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); FS_ASSERT(((fs_uintptr)pOpenedArchive + openedArchiveSize) > ((fs_uintptr)pFS->pOpenedArchives)); FS_ASSERT(((fs_uintptr)pOpenedArchive + openedArchiveSize) <= ((fs_uintptr)pFS->pOpenedArchives + pFS->openedArchivesSize)); FS_MOVE_MEMORY(pOpenedArchive, FS_OFFSET_PTR(pOpenedArchive, openedArchiveSize), (size_t)((((fs_uintptr)pFS->pOpenedArchives + pFS->openedArchivesSize)) - ((fs_uintptr)pOpenedArchive + openedArchiveSize))); pFS->openedArchivesSize -= openedArchiveSize; return FS_SUCCESS; } static size_t fs_increment_opened_archive_ref_count(fs* pFS, fs* pArchive) { fs_opened_archive* pOpenedArchive = fs_find_opened_archive_by_fs(pFS, pArchive); if (pOpenedArchive != NULL) { pOpenedArchive->refCount += 1; /* If the owner FS is also an archive, increment it's reference counter as well. */ if (pFS->pBackend == FS_PROXY) { fs_increment_opened_archive_ref_count(fs_proxy_get_owner_fs(pFS), pFS); } return pOpenedArchive->refCount; } return 0; } static size_t fs_decrement_opened_archive_ref_count(fs* pFS, fs* pArchive) { fs_opened_archive* pOpenedArchive = fs_find_opened_archive_by_fs(pFS, pArchive); if (pOpenedArchive != NULL) { FS_ASSERT(pOpenedArchive->refCount > 0); /* <-- If this fails it means there's a bug in the library. Please report. */ pOpenedArchive->refCount -= 1; /* If the owner FS is also an archive, decrement it's reference counter as well. */ if (pFS->pBackend == FS_PROXY) { fs_decrement_opened_archive_ref_count(fs_proxy_get_owner_fs(pFS), pFS); } return pOpenedArchive->refCount; } return 0; } static size_t fs_archive_type_sizeof(const fs_archive_type* pArchiveType) { return FS_ALIGN(sizeof(pArchiveType->pBackend) + strlen(pArchiveType->pExtension) + 1, FS_SIZEOF_PTR); } FS_API fs_result fs_init(const fs_config* pConfig, fs** ppFS) { fs* pFS; fs_config defaultConfig; const fs_backend* pBackend = NULL; size_t backendDataSizeInBytes = 0; fs_int64 initialStreamCursor = -1; size_t archiveTypesAllocSize = 0; size_t iArchiveType; if (ppFS == NULL) { return FS_INVALID_ARGS; } *ppFS = NULL; if (pConfig == NULL) { defaultConfig = fs_config_init_default(); pConfig = &defaultConfig; } pBackend = pConfig->pBackend; if (pBackend == NULL) { pBackend = FS_STDIO; } /* If the backend is still null at this point it means the default backend has been disabled. */ if (pBackend == NULL) { return FS_INVALID_ARGS; } if (pBackend->alloc_size != NULL) { backendDataSizeInBytes = pBackend->alloc_size(pConfig->pBackendConfig); } else { backendDataSizeInBytes = 0; } /* We need to allocate space for the archive types which we place just after the "fs" struct. After that will be the backend data. */ for (iArchiveType = 0; iArchiveType < pConfig->archiveTypeCount; iArchiveType += 1) { archiveTypesAllocSize += fs_archive_type_sizeof(&pConfig->pArchiveTypes[iArchiveType]); } pFS = (fs*)fs_calloc(sizeof(fs) + archiveTypesAllocSize + backendDataSizeInBytes, pConfig->pAllocationCallbacks); if (pFS == NULL) { return FS_OUT_OF_MEMORY; } pFS->pBackend = pBackend; pFS->pStream = pConfig->pStream; /* <-- This is allowed to be null, which will be the case for standard OS file system APIs like stdio. Streams are used for things like archives like Zip files, or in-memory file systems. */ pFS->allocationCallbacks = fs_allocation_callbacks_init_copy(pConfig->pAllocationCallbacks); pFS->backendDataSize = backendDataSizeInBytes; pFS->isOwnerOfArchiveTypes = FS_TRUE; pFS->archiveGCThreshold = FS_DEFAULT_ARCHIVE_GC_THRESHOLD; pFS->archiveTypesAllocSize = archiveTypesAllocSize; pFS->pArchiveTypes = (void*)FS_OFFSET_PTR(pFS, sizeof(fs)); /* Archive types. */ if (pConfig->archiveTypeCount > 0) { size_t cursor = 0; for (iArchiveType = 0; iArchiveType < pConfig->archiveTypeCount; iArchiveType += 1) { size_t extensionLength = strlen(pConfig->pArchiveTypes[iArchiveType].pExtension); FS_COPY_MEMORY(FS_OFFSET_PTR(pFS->pArchiveTypes, cursor ), &pConfig->pArchiveTypes[iArchiveType].pBackend, sizeof(fs_backend*)); FS_COPY_MEMORY(FS_OFFSET_PTR(pFS->pArchiveTypes, cursor + sizeof(fs_backend*)), pConfig->pArchiveTypes[iArchiveType].pExtension, extensionLength + 1); cursor += fs_archive_type_sizeof(&pConfig->pArchiveTypes[iArchiveType]); } } else { pFS->pArchiveTypes = NULL; pFS->archiveTypesAllocSize = 0; } /* If we were initialized with a stream we need to make sure we have a lock for it. This is needed for archives which might have multiple files accessing a stream across different threads. The archive will need to lock the stream so it doesn't get all mixed up between threads. */ if (pConfig->pStream != NULL) { /* We want to grab the initial cursor of the stream so we can restore it in the case of an error. */ if (fs_stream_tell(pConfig->pStream, &initialStreamCursor) != FS_SUCCESS) { initialStreamCursor = -1; } } /* We need a mutex for fs_open_archive() and fs_close_archive(). This needs to be recursive because during garbage collection we may end up closing archives in archives. */ fs_mtx_init(&pFS->archiveLock, FS_MTX_RECURSIVE); /* We're now ready to initialize the backend. */ if (pBackend->init != NULL) { fs_result result = pBackend->init(pFS, pConfig->pBackendConfig, pConfig->pStream); if (result != FS_SUCCESS) { /* If we have a stream and the backend failed to initialize, it's possible that the cursor of the stream was moved as a result. To keep this as clean as possible, we're going to seek the cursor back to the initial position. */ if (pConfig->pStream != NULL && initialStreamCursor != -1) { fs_stream_seek(pConfig->pStream, initialStreamCursor, FS_SEEK_SET); } fs_free(pFS, fs_get_allocation_callbacks(pFS)); return result; } } else { /* Getting here means the backend does not implement an init() function. This is not mandatory so we just assume successful.*/ } *ppFS = pFS; return FS_SUCCESS; } FS_API void fs_uninit(fs* pFS) { if (pFS == NULL) { return; } /* We'll first garbage collect all archives. This should uninitialize any archives that are still open but have no references. After this call any archives that are still being referenced will remain open. Not quite sure what to do in this situation, but for now I'll check if any archives are still open and throw an assert. Not sure if this is overly aggressive - feedback welcome. */ fs_gc_archives(pFS, FS_GC_POLICY_FULL); /* The caller has a bug if there are still outstanding archives. */ #if !defined(FS_NO_OPENED_FILES_ASSERT) { if (pFS->openedArchivesSize > 0) { FS_ASSERT(!"You have outstanding opened files. You must close all files before uninitializing the fs object."); /* <-- If you hit this assert but you're absolutely sure you've closed all your files, please submit a bug report with a reproducible test case. Define `FS_NO_OPENED_FILES_ASSERT` to workaround the assert. */ } } #endif if (pFS->pBackend->uninit != NULL) { pFS->pBackend->uninit(pFS); } fs_free(pFS->pReadMountPoints, &pFS->allocationCallbacks); pFS->pReadMountPoints = NULL; fs_free(pFS->pWriteMountPoints, &pFS->allocationCallbacks); pFS->pWriteMountPoints = NULL; fs_free(pFS->pOpenedArchives, &pFS->allocationCallbacks); pFS->pOpenedArchives = NULL; fs_mtx_destroy(&pFS->archiveLock); fs_free(pFS, &pFS->allocationCallbacks); } FS_API fs_result fs_ioctl(fs* pFS, int request, void* pArg) { if (pFS == NULL) { return FS_INVALID_ARGS; } return fs_backend_ioctl(pFS->pBackend, pFS, request, pArg); } FS_API fs_result fs_remove(fs* pFS, const char* pFilePath) { if (pFS == NULL || pFilePath == NULL) { return FS_INVALID_ARGS; } return fs_backend_remove(pFS->pBackend, pFS, pFilePath); } FS_API fs_result fs_rename(fs* pFS, const char* pOldName, const char* pNewName) { if (pFS == NULL || pOldName == NULL || pNewName == NULL) { return FS_INVALID_ARGS; } return fs_backend_rename(pFS->pBackend, pFS, pOldName, pNewName); } FS_API fs_result fs_mkdir(fs* pFS, const char* pPath) { char pRunningPathStack[1024]; char* pRunningPathHeap = NULL; char* pRunningPath = pRunningPathStack; size_t runningPathLen = 0; fs_path_iterator iSegment; const fs_backend* pBackend; pBackend = fs_get_backend_or_default(pFS); if (pBackend == NULL) { return FS_INVALID_ARGS; } if (pPath == NULL) { return FS_INVALID_ARGS; } /* We need to iterate over each segment and create the directory. If any of these fail we'll need to abort. */ if (fs_path_first(pPath, FS_NULL_TERMINATED, &iSegment) != FS_SUCCESS) { return FS_SUCCESS; /* It's an empty path. */ } for (;;) { fs_result result; if (runningPathLen + iSegment.segmentLength + 1 >= sizeof(pRunningPathStack)) { if (pRunningPath == pRunningPathStack) { pRunningPathHeap = (char*)fs_malloc(runningPathLen + iSegment.segmentLength + 1, fs_get_allocation_callbacks(pFS)); if (pRunningPathHeap == NULL) { return FS_OUT_OF_MEMORY; } FS_COPY_MEMORY(pRunningPathHeap, pRunningPathStack, runningPathLen); pRunningPath = pRunningPathHeap; } else { char* pNewRunningPathHeap; pNewRunningPathHeap = (char*)fs_realloc(pRunningPathHeap, runningPathLen + iSegment.segmentLength + 1, fs_get_allocation_callbacks(pFS)); if (pNewRunningPathHeap == NULL) { fs_free(pRunningPathHeap, fs_get_allocation_callbacks(pFS)); return FS_OUT_OF_MEMORY; } pRunningPath = pNewRunningPathHeap; } } FS_COPY_MEMORY(pRunningPath + runningPathLen, iSegment.pFullPath + iSegment.segmentOffset, iSegment.segmentLength); runningPathLen += iSegment.segmentLength; pRunningPath[runningPathLen] = '\0'; result = fs_backend_mkdir(pBackend, pFS, pRunningPath); /* We just pretend to be successful if the directory already exists. */ if (result == FS_ALREADY_EXISTS) { result = FS_SUCCESS; } if (result != FS_SUCCESS) { if (pRunningPathHeap != NULL) { fs_free(pRunningPathHeap, fs_get_allocation_callbacks(pFS)); } return result; } pRunningPath[runningPathLen] = '/'; runningPathLen += 1; result = fs_path_next(&iSegment); if (result != FS_SUCCESS) { break; } } return FS_SUCCESS; } FS_API fs_result fs_info(fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo) { if (pInfo == NULL) { return FS_INVALID_ARGS; } FS_ZERO_OBJECT(pInfo); return fs_file_open_or_info(pFS, pPath, openMode, NULL, pInfo); } FS_API fs_stream* fs_get_stream(fs* pFS) { if (pFS == NULL) { return NULL; } return pFS->pStream; } FS_API const fs_allocation_callbacks* fs_get_allocation_callbacks(fs* pFS) { if (pFS == NULL) { return NULL; } return &pFS->allocationCallbacks; } FS_API void* fs_get_backend_data(fs* pFS) { size_t offset = sizeof(fs); if (pFS == NULL) { return NULL; } if (pFS->isOwnerOfArchiveTypes) { offset += pFS->archiveTypesAllocSize; } return FS_OFFSET_PTR(pFS, offset); } FS_API size_t fs_get_backend_data_size(fs* pFS) { if (pFS == NULL) { return 0; } return pFS->backendDataSize; } static fs_result fs_open_archive_nolock(fs* pFS, const fs_backend* pBackend, void* pBackendConfig, const char* pArchivePath, size_t archivePathLen, int openMode, fs** ppArchive) { fs_result result; fs* pArchive; fs_config archiveConfig; fs_file* pArchiveFile; char pArchivePathNTStack[1024]; char* pArchivePathNTHeap = NULL; /* <-- Must be initialized to null. */ char* pArchivePathNT; fs_proxy_config proxyConfig; fs_opened_archive* pOpenedArchive; /* The first thing to do is check if the archive has already been opened. If so, we just increment the reference count and return the already-loaded fs object. */ pOpenedArchive = fs_find_opened_archive(pFS, pArchivePath, archivePathLen); if (pOpenedArchive != NULL) { if (pOpenedArchive->refCount == 0) { pOpenedArchive->refCount += 1; } else { fs_increment_opened_archive_ref_count(pFS, pOpenedArchive->pArchive); } *ppArchive = pOpenedArchive->pArchive; return FS_SUCCESS; } /* Getting here means the archive is not cached. We'll need to open it. Unfortunately our path is not null terminated so we'll need to do that now. We'll try to avoid a heap allocation if we can. */ if (archivePathLen == FS_NULL_TERMINATED) { pArchivePathNT = (char*)pArchivePath; /* <-- Safe cast. We won't be modifying this. */ } else { if (archivePathLen >= sizeof(pArchivePathNTStack)) { pArchivePathNTHeap = (char*)fs_malloc(archivePathLen + 1, fs_get_allocation_callbacks(pFS)); if (pArchivePathNTHeap == NULL) { return FS_OUT_OF_MEMORY; } pArchivePathNT = pArchivePathNTHeap; } else { pArchivePathNT = pArchivePathNTStack; } FS_COPY_MEMORY(pArchivePathNT, pArchivePath, archivePathLen); pArchivePathNT[archivePathLen] = '\0'; } result = fs_file_open(pFS, pArchivePathNT, openMode, &pArchiveFile); if (result != FS_SUCCESS) { fs_free(pArchivePathNTHeap, fs_get_allocation_callbacks(pFS)); return result; } proxyConfig.pBackend = pBackend; proxyConfig.pBackendConfig = pBackendConfig; archiveConfig = fs_config_init(FS_PROXY, &proxyConfig, fs_file_get_stream(pArchiveFile)); archiveConfig.pAllocationCallbacks = fs_get_allocation_callbacks(pFS); result = fs_init(&archiveConfig, &pArchive); fs_free(pArchivePathNTHeap, fs_get_allocation_callbacks(pFS)); if (result != FS_SUCCESS) { /* <-- This is the result of fs_init().*/ fs_file_close(pArchiveFile); return result; } /* We need to support the ability to open archives within archives. To do this, the archive fs object needs to inherit the registered archive types. Fortunately this is easy because we do this as one single allocation which means we can just reference it directly. The API has a restriction that archive type registration cannot be modified after a file has been opened. */ pArchive->pArchiveTypes = pFS->pArchiveTypes; pArchive->archiveTypesAllocSize = pFS->archiveTypesAllocSize; pArchive->isOwnerOfArchiveTypes = FS_FALSE; /* Add the new archive to the cache. */ result = fs_add_opened_archive(pFS, pArchive, pArchivePath, archivePathLen); if (result != FS_SUCCESS) { fs_uninit(pArchive); fs_file_close(pArchiveFile); return result; } fs_increment_opened_archive_ref_count(pFS, pArchive); *ppArchive = pArchive; return FS_SUCCESS; } FS_API fs_result fs_open_archive_ex(fs* pFS, const fs_backend* pBackend, void* pBackendConfig, const char* pArchivePath, size_t archivePathLen, int openMode, fs** ppArchive) { fs_result result; if (ppArchive == NULL) { return FS_INVALID_ARGS; } *ppArchive = NULL; if (pFS == NULL || pBackend == NULL || pArchivePath == NULL || archivePathLen == 0) { return FS_INVALID_ARGS; } /* It'd be nice to be able to resolve the path here to eliminate any "." and ".." segments thereby making the path always consistent for a given archive. However, I cannot think of a way to do this robustly without having a backend-specific function like a `resolve()` or whatnot. The problem is that the path might be absolute, or it might be relative, and to get it right, parcticularly when dealing with different operating systems' ways of specifying an absolute path, you really need to have the support of the backend. I might add support for this later. */ fs_mtx_lock(&pFS->archiveLock); { result = fs_open_archive_nolock(pFS, pBackend, pBackendConfig, pArchivePath, archivePathLen, openMode, ppArchive); } fs_mtx_unlock(&pFS->archiveLock); return result; } FS_API fs_result fs_open_archive(fs* pFS, const char* pArchivePath, int openMode, fs** ppArchive) { fs_result backendIteratorResult; fs_registered_backend_iterator iBackend; fs_result result; if (ppArchive == NULL) { return FS_INVALID_ARGS; } *ppArchive = NULL; /* Safety. */ if (pFS == NULL || pArchivePath == NULL) { return FS_INVALID_ARGS; } /* There can be multiple backends registered to the same extension. We just iterate over each one in order and use the first that works. */ result = FS_NO_BACKEND; for (backendIteratorResult = fs_first_registered_backend(pFS, &iBackend); backendIteratorResult == FS_SUCCESS; backendIteratorResult = fs_next_registered_backend(&iBackend)) { if (fs_path_extension_equal(pArchivePath, FS_NULL_TERMINATED, iBackend.pExtension, iBackend.extensionLen)) { result = fs_open_archive_ex(pFS, iBackend.pBackend, iBackend.pBackendConfig, pArchivePath, FS_NULL_TERMINATED, openMode, ppArchive); if (result == FS_SUCCESS) { return FS_SUCCESS; } } } /* Failed to open from any archive backend. */ return result; } FS_API void fs_close_archive(fs* pArchive) { fs* pOwnerFS; /* This function should only ever be called for archives that were opened with fs_open_archive(). */ FS_ASSERT(pArchive->pBackend == FS_PROXY); pOwnerFS = fs_proxy_get_owner_fs(pArchive); FS_ASSERT(pOwnerFS != NULL); fs_mtx_lock(&pOwnerFS->archiveLock); { fs_decrement_opened_archive_ref_count(pOwnerFS, pArchive); } fs_mtx_unlock(&pOwnerFS->archiveLock); /* Now we need to do a bit of garbage collection of opened archives. When files are opened sequentially from a single archive, it's more efficient to keep the archive open for a bit rather than constantly loading and unloading the archive for every single file. Zip, for example, can be inefficient because it requires re-reading and processing the central directory every time you open the archive. The issue is that we probably don't want to have too many archives open at a time since it's a bit wasteful on memory. What we're going to do is use a threshold of how many archives we want to keep open at any given time. If we're over this threshold, we'll unload any archives that are no longer in use until we get below the threshold. */ fs_gc_archives(pOwnerFS, FS_GC_POLICY_THRESHOLD); } static void fs_gc_archives_nolock(fs* pFS, int policy) { size_t unreferencedCount = 0; size_t collectionCount = 0; size_t cursor = 0; FS_ASSERT(pFS != NULL); /* If we're doing a full garbage collection we need to recursively run the garbage collection process on opened archives. */ if ((policy & FS_GC_POLICY_FULL) != 0) { cursor = 0; while (cursor < pFS->openedArchivesSize) { fs_opened_archive* pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, cursor); FS_ASSERT(pOpenedArchive != NULL); fs_gc_archives(pOpenedArchive->pArchive, policy); cursor += FS_ALIGN(sizeof(fs*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); } } /* The first thing to do is count how many unreferenced archives there are. */ cursor = 0; while (cursor < pFS->openedArchivesSize) { fs_opened_archive* pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, cursor); if (pOpenedArchive->refCount == 0) { unreferencedCount += 1; } /* Getting here means this archive is not the one we're looking for. */ cursor += FS_ALIGN(sizeof(fs*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); } /* Now we need to determine how many archives we should unload. */ if ((policy & FS_GC_POLICY_THRESHOLD) != 0) { if (unreferencedCount > fs_get_archive_gc_threshold(pFS)) { collectionCount = unreferencedCount - fs_get_archive_gc_threshold(pFS); } else { collectionCount = 0; /* We're below the threshold. Don't collect anything. */ } } else if ((policy & FS_GC_POLICY_FULL) != 0) { collectionCount = unreferencedCount; } else { FS_ASSERT(!"Invalid GC policy."); } /* Now we need to unload the archives. */ cursor = 0; while (collectionCount > 0 && cursor < pFS->openedArchivesSize) { fs_opened_archive* pOpenedArchive = (fs_opened_archive*)FS_OFFSET_PTR(pFS->pOpenedArchives, cursor); if (pOpenedArchive->refCount == 0) { fs_file* pArchiveFile; pArchiveFile = fs_proxy_get_archive_file(pOpenedArchive->pArchive); FS_ASSERT(pArchiveFile != NULL); fs_uninit(pOpenedArchive->pArchive); fs_file_close(pArchiveFile); /* We can remove the archive from the list only after it's been closed. */ fs_remove_opened_archive(pFS, pOpenedArchive); collectionCount -= 1; /* Note that we're not advancing the cursor here because we just removed this entry. */ } else { cursor += FS_ALIGN(sizeof(fs*) + sizeof(size_t) + strlen(pOpenedArchive->pPath) + 1, FS_SIZEOF_PTR); } } } FS_API void fs_gc_archives(fs* pFS, int policy) { if (pFS == NULL) { return; } if (policy == 0 || ((policy & FS_GC_POLICY_THRESHOLD) != 0 && (policy & FS_GC_POLICY_FULL) != 0)) { return; /* Invalid policy. Must specify FS_GC_POLICY_THRESHOLD or FS_GC_POLICY_FULL, but not both. */ } fs_mtx_lock(&pFS->archiveLock); { fs_gc_archives_nolock(pFS, policy); } fs_mtx_unlock(&pFS->archiveLock); } FS_API void fs_set_archive_gc_threshold(fs* pFS, size_t threshold) { if (pFS == NULL) { return; } pFS->archiveGCThreshold = threshold; } FS_API size_t fs_get_archive_gc_threshold(fs* pFS) { if (pFS == NULL) { return 0; } return pFS->archiveGCThreshold; } static size_t fs_file_duplicate_alloc_size(fs* pFS) { return sizeof(fs_file) + fs_backend_file_alloc_size(fs_get_backend_or_default(pFS), pFS); } static void fs_file_preinit_no_stream(fs_file* pFile, fs* pFS, size_t backendDataSize) { FS_ASSERT(pFile != NULL); pFile->pFS = pFS; pFile->backendDataSize = backendDataSize; } static void fs_file_uninit(fs_file* pFile); static fs_result fs_file_stream_read(fs_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead) { return fs_file_read((fs_file*)pStream, pDst, bytesToRead, pBytesRead); } static fs_result fs_file_stream_write(fs_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { return fs_file_write((fs_file*)pStream, pSrc, bytesToWrite, pBytesWritten); } static fs_result fs_file_stream_seek(fs_stream* pStream, fs_int64 offset, fs_seek_origin origin) { return fs_file_seek((fs_file*)pStream, offset, origin); } static fs_result fs_file_stream_tell(fs_stream* pStream, fs_int64* pCursor) { return fs_file_tell((fs_file*)pStream, pCursor); } static size_t fs_file_stream_alloc_size(fs_stream* pStream) { return fs_file_duplicate_alloc_size(fs_file_get_fs((fs_file*)pStream)); } static fs_result fs_file_stream_duplicate(fs_stream* pStream, fs_stream* pDuplicatedStream) { fs_result result; fs_file* pStreamFile = (fs_file*)pStream; fs_file* pDuplicatedStreamFile = (fs_file*)pDuplicatedStream; FS_ASSERT(pStreamFile != NULL); FS_ASSERT(pDuplicatedStreamFile != NULL); /* The stream will already have been initialized at a higher level in fs_stream_duplicate(). */ fs_file_preinit_no_stream(pDuplicatedStreamFile, fs_file_get_fs(pStreamFile), pStreamFile->backendDataSize); result = fs_backend_file_duplicate(fs_get_backend_or_default(pStreamFile->pFS), pStreamFile, pDuplicatedStreamFile); if (result != FS_SUCCESS) { return result; } return FS_SUCCESS; } static void fs_file_stream_uninit(fs_stream* pStream) { /* We need to uninitialize the file, but *not* free it. Freeing will be done at a higher level in fs_stream_delete_duplicate(). */ fs_file_uninit((fs_file*)pStream); } static fs_stream_vtable fs_file_stream_vtable = { fs_file_stream_read, fs_file_stream_write, fs_file_stream_seek, fs_file_stream_tell, fs_file_stream_alloc_size, fs_file_stream_duplicate, fs_file_stream_uninit }; static const fs_backend* fs_file_get_backend(fs_file* pFile) { return fs_get_backend_or_default(fs_file_get_fs(pFile)); } static fs_result fs_open_or_info_from_archive(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile, fs_file_info* pInfo) { /* NOTE: A lot of return values are FS_DOES_NOT_EXIST. This is because this function will only be called in response to a FS_DOES_NOT_EXIST in the first call to fs_file_open() which makes this a logical result. */ fs_result result; fs_path_iterator iFilePathSeg; fs_path_iterator iFilePathSegLast; FS_ASSERT(pFS != NULL); /* We can never open from an archive if we're opening in opaque mode. This mode is intended to be used such that only files exactly represented in the file system can be opened. */ if (FS_IS_OPAQUE(openMode)) { return FS_DOES_NOT_EXIST; } /* If no archive types have been configured we can abort early. */ if (pFS->archiveTypesAllocSize == 0) { return FS_DOES_NOT_EXIST; } /* We need to iterate over each segment in the path and then iterate over each file in that folder and check for archives. If we find an archive we simply try loading from that. Note that if the path segment itself points to an archive, we *must* open it from that archive because the caller has explicitly asked for that archive. */ if (fs_path_first(pFilePath, FS_NULL_TERMINATED, &iFilePathSeg) != FS_SUCCESS) { return FS_DOES_NOT_EXIST; } /* Grab the last part of the file path so we can check if we're up to the file name. */ fs_path_last(pFilePath, FS_NULL_TERMINATED, &iFilePathSegLast); do { fs_result backendIteratorResult; fs_registered_backend_iterator iBackend; fs_bool32 isArchive = FS_FALSE; /* Skip over "." and ".." segments. */ if (fs_strncmp(iFilePathSeg.pFullPath, ".", iFilePathSeg.segmentLength) == 0) { continue; } if (fs_strncmp(iFilePathSeg.pFullPath, "..", iFilePathSeg.segmentLength) == 0) { continue; } /* If an archive has been explicitly listed in the path, we must try loading from that. */ for (backendIteratorResult = fs_first_registered_backend(pFS, &iBackend); backendIteratorResult == FS_SUCCESS; backendIteratorResult = fs_next_registered_backend(&iBackend)) { if (fs_path_extension_equal(iFilePathSeg.pFullPath + iFilePathSeg.segmentOffset, iFilePathSeg.segmentLength, iBackend.pExtension, iBackend.extensionLen)) { isArchive = FS_TRUE; /* This path points to an explicit archive. If this is the file we're trying to actually load, we'll want to handle that too. */ if (fs_path_iterators_compare(&iFilePathSeg, &iFilePathSegLast) == 0) { /* The archive file itself is the last segment in the path which means that's the file we're actually trying to load. We shouldn't need to try opening this here because if it existed and was able to be opened, it should have been done so at a higher level. */ return FS_DOES_NOT_EXIST; } else { fs* pArchive; result = fs_open_archive_ex(pFS, iBackend.pBackend, iBackend.pBackendConfig, iFilePathSeg.pFullPath, iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength, FS_OPAQUE | openMode, &pArchive); if (result != FS_SUCCESS) { /* We failed to open the archive. If it's due to the archive not existing we just continue searching. Otherwise a proper error code needs to be returned. */ if (result != FS_DOES_NOT_EXIST) { return result; } else { continue; } } result = fs_file_open_or_info(pArchive, iFilePathSeg.pFullPath + iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength + 1, openMode, ppFile, pInfo); if (result != FS_SUCCESS) { fs_close_archive(pArchive); return result; } if (ppFile != NULL) { /* The archive must be unreferenced when closing the file. */ fs_file_proxy_set_unref_archive_on_close(*ppFile, FS_TRUE); } else { /* We were only grabbing file info. We can close the archive straight away. */ fs_close_archive(pArchive); } return FS_SUCCESS; } } } /* If the path has an extension of an archive, but we still manage to get here, it means the archive doesn't exist. */ if (isArchive) { return FS_DOES_NOT_EXIST; } /* Getting here means this part of the path does not look like an archive. We will assume it's a folder and try iterating it using opaque mode to get the contents. */ if (FS_IS_VERBOSE(openMode)) { /* The caller has requested opening in verbose mode. In this case we don't want to be scanning for archives. Instead, any archives will be explicitly listed in the path. We just skip this path in this case. */ continue; } else { /* Getting here means we're opening in transparent mode. We'll need to search for archives and check them one by one. This is the slow path. To do this we opaquely iterate over each file in the currently iterated file path. If any of these files are recognized as archives, we'll load up that archive and then try opening the file from there. If it works we return, otherwise we unload that archive and keep trying. */ fs_iterator* pIterator; for (pIterator = fs_backend_first(fs_get_backend_or_default(pFS), pFS, iFilePathSeg.pFullPath, iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength); pIterator != NULL; pIterator = fs_backend_next(fs_get_backend_or_default(pFS), pIterator)) { for (backendIteratorResult = fs_first_registered_backend(pFS, &iBackend); backendIteratorResult == FS_SUCCESS; backendIteratorResult = fs_next_registered_backend(&iBackend)) { if (fs_path_extension_equal(pIterator->pName, pIterator->nameLen, iBackend.pExtension, iBackend.extensionLen)) { /* Looks like an archive. We can load this one up and try opening from it. */ fs* pArchive; char pArchivePathNTStack[1024]; char* pArchivePathNTHeap = NULL; /* <-- Must be initialized to null. */ char* pArchivePathNT; size_t archivePathLen; archivePathLen = iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength + 1 + pIterator->nameLen; if (archivePathLen >= sizeof(pArchivePathNTStack)) { pArchivePathNTHeap = (char*)fs_malloc(archivePathLen + 1, fs_get_allocation_callbacks(pFS)); if (pArchivePathNTHeap == NULL) { fs_backend_free_iterator(fs_get_backend_or_default(pFS), pIterator); return FS_OUT_OF_MEMORY; } pArchivePathNT = pArchivePathNTHeap; } else { pArchivePathNT = pArchivePathNTStack; } FS_COPY_MEMORY(pArchivePathNT, iFilePathSeg.pFullPath, iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength); pArchivePathNT[iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength] = '/'; FS_COPY_MEMORY(pArchivePathNT + iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength + 1, pIterator->pName, pIterator->nameLen); pArchivePathNT[archivePathLen] = '\0'; /* At this point we've constructed the archive name and we can now open it. */ result = fs_open_archive_ex(pFS, iBackend.pBackend, iBackend.pBackendConfig, pArchivePathNT, FS_NULL_TERMINATED, FS_OPAQUE | openMode, &pArchive); fs_free(pArchivePathNTHeap, fs_get_allocation_callbacks(pFS)); if (result != FS_SUCCESS) { /* <-- This is checking the result of fs_open_archive_ex(). */ continue; /* Failed to open this archive. Keep looking. */ } /* Getting here means we've successfully opened the archive. We can now try opening the file from there. The path we load from will be the next segment in the path. */ result = fs_file_open_or_info(pArchive, iFilePathSeg.pFullPath + iFilePathSeg.segmentOffset + iFilePathSeg.segmentLength + 1, openMode, ppFile, pInfo); /* +1 to skip the separator. */ if (result != FS_SUCCESS) { fs_close_archive(pArchive); continue; /* Failed to open the file. Keep looking. */ } /* The iterator is no longer required. */ fs_backend_free_iterator(fs_get_backend_or_default(pFS), pIterator); pIterator = NULL; if (ppFile != NULL) { /* The archive must be unreferenced when closing the file. */ fs_file_proxy_set_unref_archive_on_close(*ppFile, FS_TRUE); } else { /* We were only grabbing file info. We can close the archive straight away. */ fs_close_archive(pArchive); } /* Getting here means we successfully opened the file. We're done. */ return FS_SUCCESS; } } /* Getting here means this file could not be loaded from any registered archive types. Just move on to the next file. */ } /* Getting here means we couldn't find the file within any known archives in this directory. From here we just move onto the segment segment in the path and keep looking. */ } } while (fs_path_next(&iFilePathSeg) == FS_SUCCESS); /* Getting here means we reached the end of the path and never did find the file. */ return FS_DOES_NOT_EXIST; } static fs_result fs_file_alloc(fs* pFS, fs_file** ppFile) { fs_file* pFile; fs_result result; const fs_backend* pBackend; size_t backendDataSizeInBytes = 0; FS_ASSERT(ppFile != NULL); FS_ASSERT(*ppFile == NULL); /* <-- File must not already be allocated when calling this. */ pBackend = fs_get_backend_or_default(pFS); FS_ASSERT(pBackend != NULL); backendDataSizeInBytes = fs_backend_file_alloc_size(pBackend, pFS); pFile = (fs_file*)fs_calloc(sizeof(fs_file) + backendDataSizeInBytes, fs_get_allocation_callbacks(pFS)); if (pFile == NULL) { return FS_OUT_OF_MEMORY; } /* A file is a stream. */ result = fs_stream_init(&fs_file_stream_vtable, &pFile->stream); if (result != 0) { fs_free(pFile, fs_get_allocation_callbacks(pFS)); return result; } pFile->pFS = pFS; pFile->backendDataSize = backendDataSizeInBytes; *ppFile = pFile; return FS_SUCCESS; } static fs_result fs_file_alloc_if_necessary(fs* pFS, fs_file** ppFile) { FS_ASSERT(ppFile != NULL); if (*ppFile == NULL) { return fs_file_alloc(pFS, ppFile); } else { return FS_SUCCESS; } } static fs_result fs_file_alloc_if_necessary_and_open_or_info(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile, fs_file_info* pInfo) { fs_result result; const fs_backend* pBackend; if (ppFile != NULL) { result = fs_file_alloc_if_necessary(pFS, ppFile); if (result != FS_SUCCESS) { *ppFile = NULL; return result; } } pBackend = fs_get_backend_or_default(pFS); if (pBackend == NULL) { return FS_INVALID_ARGS; } /* Take a copy of the file system's stream if necessary. We only need to do this if we're opening the file, and if the owner `fs` object `pFS` has itself has a stream. */ if (pFS != NULL && ppFile != NULL) { fs_stream* pFSStream = pFS->pStream; if (pFSStream != NULL) { result = fs_stream_duplicate(pFSStream, fs_get_allocation_callbacks(pFS), &(*ppFile)->pStreamForBackend); if (result != FS_SUCCESS) { return result; } } } /* This is the lowest level opening function. We never want to look at mounts when opening from here. The input file path should already be prefixed with the mount point. UPDATE: Actually don't want to explicitly append FS_IGNORE_MOUNTS here because it can affect the behavior of proxy and passthrough style backends. Some backends, particularly FS_SUBFS, will call straight into the owner `fs` object which might depend on those mounts being handled for correct behaviour. */ /*openMode |= FS_IGNORE_MOUNTS;*/ if (ppFile != NULL) { /* Create the directory structure if necessary. */ if ((openMode & FS_WRITE) != 0 && (openMode & FS_NO_CREATE_DIRS) == 0) { char pDirPathStack[1024]; char* pDirPathHeap = NULL; char* pDirPath; int dirPathLen; dirPathLen = fs_path_directory(pDirPathStack, sizeof(pDirPathStack), pFilePath, FS_NULL_TERMINATED); if (dirPathLen >= (int)sizeof(pDirPathStack)) { pDirPathHeap = (char*)fs_malloc(dirPathLen + 1, fs_get_allocation_callbacks(pFS)); if (pDirPathHeap == NULL) { return FS_OUT_OF_MEMORY; } dirPathLen = fs_path_directory(pDirPathHeap, dirPathLen + 1, pFilePath, FS_NULL_TERMINATED); if (dirPathLen < 0) { fs_stream_delete_duplicate((*ppFile)->pStreamForBackend, fs_get_allocation_callbacks(pFS)); fs_free(pDirPathHeap, fs_get_allocation_callbacks(pFS)); return FS_ERROR; /* Should never hit this. */ } pDirPath = pDirPathHeap; } else { pDirPath = pDirPathStack; } result = fs_mkdir(pFS, pDirPath); if (result != FS_SUCCESS) { fs_stream_delete_duplicate((*ppFile)->pStreamForBackend, fs_get_allocation_callbacks(pFS)); return result; } } result = fs_backend_file_open(pBackend, pFS, (*ppFile)->pStreamForBackend, pFilePath, openMode, *ppFile); if (result != FS_SUCCESS) { fs_stream_delete_duplicate((*ppFile)->pStreamForBackend, fs_get_allocation_callbacks(pFS)); } /* Grab the info from the opened file if we're also grabbing that. */ if (result == FS_SUCCESS && pInfo != NULL) { fs_backend_file_info(pBackend, *ppFile, pInfo); } } else { if (pInfo != NULL) { result = fs_backend_info(pBackend, pFS, pFilePath, openMode, pInfo); } else { result = FS_INVALID_ARGS; } } if (!FS_IS_OPAQUE(openMode) && (openMode & FS_WRITE) == 0) { /* If we failed to open the file because it doesn't exist we need to try loading it from an archive. We can only do this if the file is being loaded by an explicitly initialized fs object. */ if (pFS != NULL && (result == FS_DOES_NOT_EXIST || result == FS_NOT_DIRECTORY)) { if (ppFile != NULL) { fs_free(*ppFile, fs_get_allocation_callbacks(pFS)); *ppFile = NULL; } result = fs_open_or_info_from_archive(pFS, pFilePath, openMode, ppFile, pInfo); } } return result; } static fs_result fs_validate_path(const char* pPath, size_t pathLen, int mode) { if ((mode & FS_NO_SPECIAL_DIRS) != 0) { fs_path_iterator iPathSeg; fs_result result; for (result = fs_path_first(pPath, pathLen, &iPathSeg); result == FS_SUCCESS; result = fs_path_next(&iPathSeg)) { if (fs_strncmp(iPathSeg.pFullPath, ".", iPathSeg.segmentLength) == 0) { return FS_INVALID_ARGS; } if (fs_strncmp(iPathSeg.pFullPath, "..", iPathSeg.segmentLength) == 0) { return FS_INVALID_ARGS; } } } return FS_SUCCESS; } FS_API fs_result fs_file_open_or_info(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile, fs_file_info* pInfo) { fs_result result; fs_result mountPointIerationResult; if (ppFile == NULL && pInfo == NULL) { return FS_INVALID_ARGS; } if (pFilePath == NULL) { return FS_INVALID_ARGS; } /* The open mode cannot be 0 when opening a file. It can only be 0 when retrieving info. */ if (ppFile != NULL && openMode == 0) { return FS_INVALID_ARGS; } result = fs_validate_path(pFilePath, FS_NULL_TERMINATED, openMode); if (result != FS_SUCCESS) { return result; } if ((openMode & FS_WRITE) != 0) { /* Opening in write mode. We need to open from a mount point. This is a bit different from opening in read mode because we want to use the mount point that most closely matches the start of the file path. Consider, for example, the following mount points: - config - config/global If we're trying to open "config/global/settings.cfg" we want to use the "config/global" mount point, not the "config" mount point. This is because the "config/global" mount point is more specific and therefore more likely to be the correct one. We'll need to iterate over every mount point and keep track of the mount point with the longest prefix that matches the start of the file path. */ if (pFS != NULL) { fs_mount_list_iterator iMountPoint; fs_mount_point* pBestMountPoint = NULL; const char* pBestMountPointPath = NULL; const char* pBestMountPointFileSubPath = NULL; for (mountPointIerationResult = fs_mount_list_first(pFS->pWriteMountPoints, &iMountPoint); mountPointIerationResult == FS_SUCCESS; mountPointIerationResult = fs_mount_list_next(&iMountPoint)) { const char* pFileSubPath = fs_path_trim_base(pFilePath, FS_NULL_TERMINATED, iMountPoint.pMountPointPath, FS_NULL_TERMINATED); if (pFileSubPath == NULL) { continue; /* The file path doesn't start with this mount point so skip. */ } if (pBestMountPointFileSubPath == NULL || strlen(pFileSubPath) < strlen(pBestMountPointFileSubPath)) { pBestMountPoint = iMountPoint.internal.pMountPoint; pBestMountPointPath = iMountPoint.pPath; pBestMountPointFileSubPath = pFileSubPath; } } if (pBestMountPoint != NULL) { char pActualPathStack[1024]; char* pActualPathHeap = NULL; char* pActualPath; int actualPathLen; char pActualPathCleanStack[1024]; char* pActualPathCleanHeap = NULL; char* pActualPathClean; int actualPathCleanLen; unsigned int cleanOptions = (openMode & FS_NO_ABOVE_ROOT_NAVIGATION); /* If the mount point starts with a root segment, i.e. "/", we cannot allow navigation above that. */ if (pBestMountPointPath[0] == '/' || pBestMountPointPath[0] == '\\') { cleanOptions |= FS_NO_ABOVE_ROOT_NAVIGATION; } /* Here is where we append the cleaned sub-path to the mount points actual path. */ actualPathLen = fs_path_append(pActualPathStack, sizeof(pActualPathStack), pBestMountPointPath, pBestMountPoint->pathLen, pBestMountPointFileSubPath, FS_NULL_TERMINATED); if (actualPathLen > 0 && (size_t)actualPathLen >= sizeof(pActualPathStack)) { /* Not enough room on the stack. Allocate on the heap. */ pActualPathHeap = (char*)fs_malloc(actualPathLen + 1, fs_get_allocation_callbacks(pFS)); if (pActualPathHeap == NULL) { return FS_OUT_OF_MEMORY; } fs_path_append(pActualPathHeap, actualPathLen + 1, pBestMountPointPath, pBestMountPoint->pathLen, pBestMountPointFileSubPath, FS_NULL_TERMINATED); /* <-- This should never fail. */ pActualPath = pActualPathHeap; } else { pActualPath = pActualPathStack; } /* Now we need to clean the path. */ actualPathCleanLen = fs_path_normalize(pActualPathCleanStack, sizeof(pActualPathCleanStack), pActualPath, FS_NULL_TERMINATED, cleanOptions); if (actualPathCleanLen < 0) { fs_free(pActualPathHeap, fs_get_allocation_callbacks(pFS)); return FS_INVALID_OPERATION; /* Most likely violating FS_NO_ABOVE_ROOT_NAVIGATION. */ } if (actualPathCleanLen >= (int)sizeof(pActualPathCleanStack)) { pActualPathCleanHeap = (char*)fs_malloc(actualPathCleanLen + 1, fs_get_allocation_callbacks(pFS)); if (pActualPathCleanHeap == NULL) { fs_free(pActualPathHeap, fs_get_allocation_callbacks(pFS)); return FS_OUT_OF_MEMORY; } fs_path_normalize(pActualPathCleanHeap, actualPathCleanLen + 1, pActualPath, FS_NULL_TERMINATED, cleanOptions); /* <-- This should never fail. */ pActualPathClean = pActualPathCleanHeap; } else { pActualPathClean = pActualPathCleanStack; } fs_free(pActualPathHeap, fs_get_allocation_callbacks(pFS)); pActualPathHeap = NULL; /* We now have enough information to open the file. */ result = fs_file_alloc_if_necessary_and_open_or_info(pFS, pActualPathClean, openMode, ppFile, pInfo); fs_free(pActualPathCleanHeap, fs_get_allocation_callbacks(pFS)); pActualPathCleanHeap = NULL; if (result == FS_SUCCESS) { return FS_SUCCESS; } else { return FS_DOES_NOT_EXIST; /* Couldn't find the file from the best mount point. */ } } else { return FS_DOES_NOT_EXIST; /* Couldn't find an appropriate mount point. */ } } else { /* No "fs" object was supplied. Open using the default backend without using mount points. This is as if you were opening a file using `fopen()`. */ if ((openMode & FS_ONLY_MOUNTS) == 0) { return fs_file_alloc_if_necessary_and_open_or_info(pFS, pFilePath, openMode, ppFile, pInfo); } else { /* Getting here means only the mount points can be used to open the file (cannot open straight from the file system natively). */ return FS_DOES_NOT_EXIST; } } } else { /* Opening in read mode. */ fs_mount_list_iterator iMountPoint; if (pFS != NULL && (openMode & FS_IGNORE_MOUNTS) == 0) { for (mountPointIerationResult = fs_mount_list_first(pFS->pReadMountPoints, &iMountPoint); mountPointIerationResult == FS_SUCCESS; mountPointIerationResult = fs_mount_list_next(&iMountPoint)) { /* The first thing to do is check if the start of our file path matches the mount point. If it doesn't match we just skip to the next mount point. */ char pFileSubPathCleanStack[1024]; char* pFileSubPathCleanHeap = NULL; char* pFileSubPathClean; int fileSubPathCleanLen; unsigned int cleanOptions = (openMode & FS_NO_ABOVE_ROOT_NAVIGATION); const char* pFileSubPath = fs_path_trim_base(pFilePath, FS_NULL_TERMINATED, iMountPoint.pMountPointPath, FS_NULL_TERMINATED); if (pFileSubPath == NULL) { continue; } /* If the mount point starts with a root segment, i.e. "/", we cannot allow navigation above that. */ if (iMountPoint.pMountPointPath[0] == '/' || iMountPoint.pMountPointPath[0] == '\\') { cleanOptions |= FS_NO_ABOVE_ROOT_NAVIGATION; } /* We need to clean the file sub-path, but can skip it if FS_NO_SPECIAL_DIRS is specified since it's implied. */ if ((openMode & FS_NO_SPECIAL_DIRS) == 0) { fileSubPathCleanLen = fs_path_normalize(pFileSubPathCleanStack, sizeof(pFileSubPathCleanStack), pFileSubPath, FS_NULL_TERMINATED, cleanOptions); if (fileSubPathCleanLen < 0) { continue; /* Most likely violating FS_NO_ABOVE_ROOT_NAVIGATION. Keep looking. */ } if (fileSubPathCleanLen >= (int)sizeof(pFileSubPathCleanStack)) { pFileSubPathCleanHeap = (char*)fs_malloc(fileSubPathCleanLen + 1, fs_get_allocation_callbacks(pFS)); if (pFileSubPathCleanHeap == NULL) { return FS_OUT_OF_MEMORY; } fs_path_normalize(pFileSubPathCleanHeap, fileSubPathCleanLen + 1, pFileSubPath, FS_NULL_TERMINATED, cleanOptions); /* <-- This should never fail. */ pFileSubPathClean = pFileSubPathCleanHeap; } else { pFileSubPathClean = pFileSubPathCleanStack; } } else { pFileSubPathClean = (char*)pFileSubPath; /* Safe cast. Will not be modified past this point. */ fileSubPathCleanLen = (int)strlen(pFileSubPathClean); } /* The mount point could either be a directory or an archive. Both of these require slightly different handling. */ if (iMountPoint.pArchive != NULL) { /* The mount point is an archive. This is the simpler case. We just load the file directly from the archive. */ result = fs_file_open_or_info(iMountPoint.pArchive, pFileSubPathClean, openMode, ppFile, pInfo); if (result == FS_SUCCESS) { /* The reference count of the archive must be incremented or else it'll get prematurely garbage collected. We only need to do this if we're opening the file. It's not necessary if we're just grabbing file info. */ if (ppFile != NULL) { fs_increment_opened_archive_ref_count(pFS, iMountPoint.pArchive); } return FS_SUCCESS; } else { /* Failed to load from this archive. Keep looking. */ } } else { /* The mount point is a directory. We need to combine the sub-path with the mount point's original path and then load the file. */ char pActualPathStack[1024]; char* pActualPathHeap = NULL; char* pActualPath; int actualPathLen; actualPathLen = fs_path_append(pActualPathStack, sizeof(pActualPathStack), iMountPoint.pPath, FS_NULL_TERMINATED, pFileSubPathClean, fileSubPathCleanLen); if (actualPathLen > 0 && (size_t)actualPathLen >= sizeof(pActualPathStack)) { /* Not enough room on the stack. Allocate on the heap. */ pActualPathHeap = (char*)fs_malloc(actualPathLen + 1, fs_get_allocation_callbacks(pFS)); if (pActualPathHeap == NULL) { return FS_OUT_OF_MEMORY; } fs_path_append(pActualPathHeap, actualPathLen + 1, iMountPoint.pPath, FS_NULL_TERMINATED, pFileSubPathClean, fileSubPathCleanLen); /* <-- This should never fail. */ pActualPath = pActualPathHeap; } else { pActualPath = pActualPathStack; } result = fs_file_alloc_if_necessary_and_open_or_info(pFS, pActualPath, openMode, ppFile, pInfo); if (pActualPathHeap != NULL) { fs_free(pActualPathHeap, fs_get_allocation_callbacks(pFS)); pActualPathHeap = NULL; } if (result == FS_SUCCESS) { return FS_SUCCESS; } else { /* Failed to load from this directory. Keep looking. */ } } } } /* If we get here it means we couldn't find the file from our search paths. Try opening directly. */ if ((openMode & FS_ONLY_MOUNTS) == 0) { result = fs_file_alloc_if_necessary_and_open_or_info(pFS, pFilePath, openMode, ppFile, pInfo); if (result == FS_SUCCESS) { return FS_SUCCESS; } } else { /* Getting here means only the mount points can be used to open the file (cannot open straight from the file system natively) and the file was unable to be opened from any of them. We need to return an error in this case. */ result = FS_DOES_NOT_EXIST; } /* Getting here means we couldn't open the file from any mount points, nor could we open it directly. */ if (ppFile != NULL) { fs_free(*ppFile, fs_get_allocation_callbacks(pFS)); *ppFile = NULL; } } FS_ASSERT(result != FS_SUCCESS); return result; } FS_API fs_result fs_file_open(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile) { if (ppFile == NULL) { return FS_INVALID_ARGS; } *ppFile = NULL; return fs_file_open_or_info(pFS, pFilePath, openMode, ppFile, NULL); } FS_API fs_result fs_file_open_from_handle(fs* pFS, void* hBackendFile, fs_file** ppFile) { fs_result result; if (ppFile == NULL) { return FS_INVALID_ARGS; } *ppFile = NULL; result = fs_file_alloc_if_necessary(pFS, ppFile); if (result != FS_SUCCESS) { *ppFile = NULL; return result; } result = fs_backend_file_open_handle(fs_get_backend_or_default(pFS), pFS, hBackendFile, *ppFile); if (result != FS_SUCCESS) { fs_free(*ppFile, fs_get_allocation_callbacks(pFS)); *ppFile = NULL; } return FS_SUCCESS; } static void fs_file_uninit(fs_file* pFile) { fs_backend_file_close(fs_get_backend_or_default(fs_file_get_fs(pFile)), pFile); } FS_API void fs_file_close(fs_file* pFile) { const fs_backend* pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); (void)pBackend; if (pFile == NULL) { return; } fs_file_uninit(pFile); if (pFile->pStreamForBackend != NULL) { fs_stream_delete_duplicate(pFile->pStreamForBackend, fs_get_allocation_callbacks(pFile->pFS)); } fs_free(pFile, fs_get_allocation_callbacks(pFile->pFS)); } FS_API fs_result fs_file_read(fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead) { fs_result result; size_t bytesRead; const fs_backend* pBackend; if (pFile == NULL || pDst == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); bytesRead = 0; /* <-- Just in case the backend doesn't clear this to zero. */ result = fs_backend_file_read(pBackend, pFile, pDst, bytesToRead, &bytesRead); if (pBytesRead != NULL) { *pBytesRead = bytesRead; } if (result != FS_SUCCESS) { /* We can only return FS_AT_END if the number of bytes read was 0. */ if (result == FS_AT_END) { if (bytesRead > 0) { result = FS_SUCCESS; } } return result; } return FS_SUCCESS; } FS_API fs_result fs_file_write(fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { fs_result result; size_t bytesWritten; const fs_backend* pBackend; if (pFile == NULL || pSrc == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); bytesWritten = 0; /* <-- Just in case the backend doesn't clear this to zero. */ result = fs_backend_file_write(pBackend, pFile, pSrc, bytesToWrite, &bytesWritten); if (pBytesWritten != NULL) { *pBytesWritten = bytesWritten; } return result; } FS_API fs_result fs_file_writef(fs_file* pFile, const char* fmt, ...) { va_list args; fs_result result; va_start(args, fmt); result = fs_file_writefv(pFile, fmt, args); va_end(args); return result; } FS_API fs_result fs_file_writefv(fs_file* pFile, const char* fmt, va_list args) { return fs_stream_writefv(fs_file_get_stream(pFile), fmt, args); } FS_API fs_result fs_file_seek(fs_file* pFile, fs_int64 offset, fs_seek_origin origin) { const fs_backend* pBackend; if (pFile == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); return fs_backend_file_seek(pBackend, pFile, offset, origin); } FS_API fs_result fs_file_tell(fs_file* pFile, fs_int64* pOffset) { const fs_backend* pBackend; if (pOffset == NULL) { return FS_INVALID_ARGS; /* Doesn't make sense to be calling this without an output parameter. */ } *pOffset = 0; if (pFile == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); return fs_backend_file_tell(pBackend, pFile, pOffset); } FS_API fs_result fs_file_flush(fs_file* pFile) { const fs_backend* pBackend; if (pFile == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); return fs_backend_file_flush(pBackend, pFile); } FS_API fs_result fs_file_get_info(fs_file* pFile, fs_file_info* pInfo) { const fs_backend* pBackend; if (pInfo == NULL) { return FS_INVALID_ARGS; /* It doesn't make sense to call this without an info parameter. */ } memset(pInfo, 0, sizeof(*pInfo)); if (pFile == NULL) { return FS_INVALID_ARGS; } pBackend = fs_file_get_backend(pFile); FS_ASSERT(pBackend != NULL); return fs_backend_file_info(pBackend, pFile, pInfo); } FS_API fs_result fs_file_duplicate(fs_file* pFile, fs_file** ppDuplicate) { fs_result result; if (ppDuplicate == NULL) { return FS_INVALID_ARGS; } *ppDuplicate = NULL; if (pFile == NULL) { return FS_INVALID_ARGS; } result = fs_file_alloc(pFile->pFS, ppDuplicate); if (result != FS_SUCCESS) { return result; } return fs_backend_file_duplicate(fs_get_backend_or_default(fs_file_get_fs(pFile)), pFile, *ppDuplicate); } FS_API void* fs_file_get_backend_data(fs_file* pFile) { if (pFile == NULL) { return NULL; } return FS_OFFSET_PTR(pFile, sizeof(fs_file)); } FS_API size_t fs_file_get_backend_data_size(fs_file* pFile) { if (pFile == NULL) { return 0; } return pFile->backendDataSize; } FS_API fs_stream* fs_file_get_stream(fs_file* pFile) { return (fs_stream*)pFile; } FS_API fs* fs_file_get_fs(fs_file* pFile) { if (pFile == NULL) { return NULL; } return pFile->pFS; } typedef struct fs_iterator_item { size_t nameLen; fs_file_info info; } fs_iterator_item; typedef struct fs_iterator_internal { fs_iterator base; size_t itemIndex; /* The index of the current item we're iterating. */ size_t itemCount; size_t itemDataSize; size_t dataSize; size_t allocSize; fs_iterator_item** ppItems; } fs_iterator_internal; static size_t fs_iterator_item_sizeof(size_t nameLen) { return FS_ALIGN(sizeof(fs_iterator_item) + nameLen + 1, FS_SIZEOF_PTR); /* +1 for the null terminator. */ } static char* fs_iterator_item_name(fs_iterator_item* pItem) { return (char*)pItem + sizeof(*pItem); } static void fs_iterator_internal_resolve_public_members(fs_iterator_internal* pIterator) { FS_ASSERT(pIterator != NULL); pIterator->base.pName = fs_iterator_item_name(pIterator->ppItems[pIterator->itemIndex]); pIterator->base.nameLen = pIterator->ppItems[pIterator->itemIndex]->nameLen; pIterator->base.info = pIterator->ppItems[pIterator->itemIndex]->info; } static fs_iterator_item* fs_iterator_internal_find(fs_iterator_internal* pIterator, const char* pName) { /* We cannot use ppItems here because this function will be called before that has been set up. Instead we need to use a cursor and run through each item linearly. This is unsorted. */ size_t iItem; size_t cursor = 0; for (iItem = 0; iItem < pIterator->itemCount; iItem += 1) { fs_iterator_item* pItem = (fs_iterator_item*)FS_OFFSET_PTR(pIterator, sizeof(fs_iterator_internal) + cursor); if (fs_strncmp(fs_iterator_item_name(pItem), pName, pItem->nameLen) == 0) { return pItem; } cursor += fs_iterator_item_sizeof(pItem->nameLen); } return NULL; } static fs_iterator_internal* fs_iterator_internal_append(fs_iterator_internal* pIterator, fs_iterator* pOther, fs* pFS, int mode) { size_t newItemSize; fs_iterator_item* pNewItem; FS_ASSERT(pOther != NULL); /* Skip over any "." and ".." entries. */ if ((pOther->pName[0] == '.' && pOther->pName[1] == 0) || (pOther->pName[0] == '.' && pOther->pName[1] == '.' && pOther->pName[2] == 0)) { return pIterator; } /* If we're in transparent mode, we don't want to add any archives. Instead we want to open them and iterate them recursively. */ (void)mode; /* Check if the item already exists. If so, skip it. */ if (pIterator != NULL) { pNewItem = fs_iterator_internal_find(pIterator, pOther->pName); if (pNewItem != NULL) { return pIterator; /* Already exists. Skip it. */ } } /* At this point we're ready to append the item. */ newItemSize = fs_iterator_item_sizeof(pOther->nameLen); if (pIterator == NULL || pIterator->dataSize + newItemSize + sizeof(fs_iterator_item*) > pIterator->allocSize) { fs_iterator_internal* pNewIterator; size_t newAllocSize; if (pIterator == NULL) { newAllocSize = 4096; if (newAllocSize < (sizeof(*pIterator) + newItemSize + sizeof(fs_iterator_item*))) { newAllocSize = (sizeof(*pIterator) + newItemSize + sizeof(fs_iterator_item*)); } } else { newAllocSize = pIterator->allocSize * 2; if (newAllocSize < (pIterator->dataSize + newItemSize + sizeof(fs_iterator_item*))) { newAllocSize = (pIterator->dataSize + newItemSize + sizeof(fs_iterator_item*)); } } pNewIterator = (fs_iterator_internal*)fs_realloc(pIterator, newAllocSize, fs_get_allocation_callbacks(pFS)); if (pNewIterator == NULL) { return pIterator; } if (pIterator == NULL) { FS_ZERO_MEMORY(pNewIterator, sizeof(fs_iterator_internal)); pNewIterator->dataSize = sizeof(fs_iterator_internal); } pIterator = pNewIterator; pIterator->allocSize = newAllocSize; } /* We can now copy the information over to the information. */ pNewItem = (fs_iterator_item*)FS_OFFSET_PTR(pIterator, sizeof(fs_iterator_internal) + pIterator->itemDataSize); FS_COPY_MEMORY(fs_iterator_item_name(pNewItem), pOther->pName, pOther->nameLen + 1); /* +1 for the null terminator. */ pNewItem->nameLen = pOther->nameLen; pNewItem->info = pOther->info; pIterator->itemDataSize += newItemSize; pIterator->dataSize += newItemSize + sizeof(fs_iterator_item*); pIterator->itemCount += 1; return pIterator; } static int fs_iterator_item_compare(void* pUserData, const void* pA, const void* pB) { fs_iterator_item* pItemA = *(fs_iterator_item**)pA; fs_iterator_item* pItemB = *(fs_iterator_item**)pB; const char* pNameA = fs_iterator_item_name(pItemA); const char* pNameB = fs_iterator_item_name(pItemB); int compareResult; (void)pUserData; compareResult = fs_strncmp(pNameA, pNameB, FS_MIN(pItemA->nameLen, pItemB->nameLen)); if (compareResult == 0) { if (pItemA->nameLen < pItemB->nameLen) { compareResult = -1; } else if (pItemA->nameLen > pItemB->nameLen) { compareResult = 1; } } return compareResult; } static void fs_iterator_internal_sort(fs_iterator_internal* pIterator) { fs_sort(pIterator->ppItems, pIterator->itemCount, sizeof(fs_iterator_item*), fs_iterator_item_compare, NULL); } static fs_iterator_internal* fs_iterator_internal_gather(fs_iterator_internal* pIterator, const fs_backend* pBackend, fs* pFS, const char* pDirectoryPath, size_t directoryPathLen, int mode) { fs_result result; fs_iterator* pInnerIterator; FS_ASSERT(pBackend != NULL); /* Regular files take priority. */ for (pInnerIterator = fs_backend_first(pBackend, pFS, pDirectoryPath, directoryPathLen); pInnerIterator != NULL; pInnerIterator = fs_backend_next(pBackend, pInnerIterator)) { pIterator = fs_iterator_internal_append(pIterator, pInnerIterator, pFS, mode); } /* Now we need to gather from archives, but only if we're not in opaque mode. */ if (pFS != NULL && !FS_IS_OPAQUE(mode)) { fs_path_iterator iDirPathSeg; /* If no archive types have been configured we can abort early. */ if (pFS->archiveTypesAllocSize == 0) { return pIterator; } /* Just like when opening a file we need to inspect each segment of the path. For each segment we need to check for archives. This is where transparent mode becomes very slow because it needs to scan every archive. For opaque mode we need only check for explicitly listed archives in the search path. */ if (fs_path_first(pDirectoryPath, directoryPathLen, &iDirPathSeg) != FS_SUCCESS) { return pIterator; } do { fs_result backendIteratorResult; fs_registered_backend_iterator iBackend; fs_bool32 isArchive = FS_FALSE; size_t dirPathRemainingLen; /* Skip over "." and ".." segments. */ if (fs_strncmp(iDirPathSeg.pFullPath, ".", iDirPathSeg.segmentLength) == 0) { continue; } if (fs_strncmp(iDirPathSeg.pFullPath, "..", iDirPathSeg.segmentLength) == 0) { continue; } if (fs_path_is_last(&iDirPathSeg)) { dirPathRemainingLen = 0; } else { if (directoryPathLen == FS_NULL_TERMINATED) { dirPathRemainingLen = FS_NULL_TERMINATED; } else { dirPathRemainingLen = directoryPathLen - (iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength + 1); } } /* If an archive has been explicitly listed in the path, we must try iterating from that. */ for (backendIteratorResult = fs_first_registered_backend(pFS, &iBackend); backendIteratorResult == FS_SUCCESS; backendIteratorResult = fs_next_registered_backend(&iBackend)) { if (fs_path_extension_equal(iDirPathSeg.pFullPath + iDirPathSeg.segmentOffset, iDirPathSeg.segmentLength, iBackend.pExtension, iBackend.extensionLen)) { fs* pArchive; fs_iterator* pArchiveIterator; isArchive = FS_TRUE; result = fs_open_archive_ex(pFS, iBackend.pBackend, iBackend.pBackendConfig, iDirPathSeg.pFullPath, iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength, FS_READ | FS_IGNORE_MOUNTS | mode, &pArchive); if (result != FS_SUCCESS) { /* We failed to open the archive. If it's due to the archive not existing we just continue searching. Otherwise we just bomb out. */ if (result != FS_DOES_NOT_EXIST) { fs_close_archive(pArchive); return pIterator; } else { continue; } } if (dirPathRemainingLen == 0) { pArchiveIterator = fs_first_ex(pArchive, "", 0, mode); } else { pArchiveIterator = fs_first_ex(pArchive, iDirPathSeg.pFullPath + iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength + 1, dirPathRemainingLen, mode); } while (pArchiveIterator != NULL) { pIterator = fs_iterator_internal_append(pIterator, pArchiveIterator, pFS, mode); pArchiveIterator = fs_next(pArchiveIterator); } fs_close_archive(pArchive); break; } } /* If the path has an extension of an archive, but we still manage to get here, it means the archive doesn't exist. */ if (isArchive) { return pIterator; } /* Getting here means this part of the path does not look like an archive. We will assume it's a folder and try iterating it using opaque mode to get the contents. */ if (FS_IS_VERBOSE(mode)) { /* The caller has requested opening in verbose mode. In this case we don't want to be scanning for archives. Instead, any archives will be explicitly listed in the path. We just skip this path in this case. */ continue; } else { /* Getting here means we're in transparent mode. We'll need to search for archives and check them one by one. This is the slow path. To do this we opaquely iterate over each file in the currently iterated file path. If any of these files are recognized as archives, we'll load up that archive and then try iterating from there. */ for (pInnerIterator = fs_backend_first(pBackend, pFS, iDirPathSeg.pFullPath, iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength); pInnerIterator != NULL; pInnerIterator = fs_backend_next(pBackend, pInnerIterator)) { for (backendIteratorResult = fs_first_registered_backend(pFS, &iBackend); backendIteratorResult == FS_SUCCESS; backendIteratorResult = fs_next_registered_backend(&iBackend)) { if (fs_path_extension_equal(pInnerIterator->pName, pInnerIterator->nameLen, iBackend.pExtension, iBackend.extensionLen)) { /* Looks like an archive. We can load this one up and try iterating from it. */ fs* pArchive; fs_iterator* pArchiveIterator; char pArchivePathNTStack[1024]; char* pArchivePathNTHeap = NULL; /* <-- Must be initialized to null. */ char* pArchivePathNT; size_t archivePathLen; archivePathLen = iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength + 1 + pInnerIterator->nameLen; if (archivePathLen >= sizeof(pArchivePathNTStack)) { pArchivePathNTHeap = (char*)fs_malloc(archivePathLen + 1, fs_get_allocation_callbacks(pFS)); if (pArchivePathNTHeap == NULL) { fs_backend_free_iterator(pBackend, pInnerIterator); return pIterator; } pArchivePathNT = pArchivePathNTHeap; } else { pArchivePathNT = pArchivePathNTStack; } FS_COPY_MEMORY(pArchivePathNT, iDirPathSeg.pFullPath, iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength); pArchivePathNT[iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength] = '/'; FS_COPY_MEMORY(pArchivePathNT + iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength + 1, pInnerIterator->pName, pInnerIterator->nameLen); pArchivePathNT[archivePathLen] = '\0'; /* At this point we've constructed the archive name and we can now open it. */ result = fs_open_archive_ex(pFS, iBackend.pBackend, iBackend.pBackendConfig, pArchivePathNT, FS_NULL_TERMINATED, FS_READ | FS_IGNORE_MOUNTS | mode, &pArchive); fs_free(pArchivePathNTHeap, fs_get_allocation_callbacks(pFS)); if (result != FS_SUCCESS) { /* <-- This is checking the result of fs_open_archive_ex(). */ continue; /* Failed to open this archive. Keep looking. */ } if (dirPathRemainingLen == 0) { pArchiveIterator = fs_first_ex(pArchive, "", 0, mode); } else { pArchiveIterator = fs_first_ex(pArchive, iDirPathSeg.pFullPath + iDirPathSeg.segmentOffset + iDirPathSeg.segmentLength + 1, dirPathRemainingLen, mode); } while (pArchiveIterator != NULL) { pIterator = fs_iterator_internal_append(pIterator, pArchiveIterator, pFS, mode); pArchiveIterator = fs_next(pArchiveIterator); } fs_close_archive(pArchive); break; } } } } } while (fs_path_next(&iDirPathSeg) == FS_SUCCESS); } return pIterator; } FS_API fs_iterator* fs_first_ex(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen, int mode) { fs_iterator_internal* pIterator = NULL; /* This is the iterator we'll eventually be returning. */ const fs_backend* pBackend; fs_iterator* pBackendIterator; fs_result result; size_t cursor; size_t iItem; if (pDirectoryPath == NULL) { pDirectoryPath = ""; } result = fs_validate_path(pDirectoryPath, directoryPathLen, mode); if (result != FS_SUCCESS) { return NULL; /* Invalid path. */ } pBackend = fs_get_backend_or_default(pFS); if (pBackend == NULL) { return NULL; } if (directoryPathLen == FS_NULL_TERMINATED) { directoryPathLen = strlen(pDirectoryPath); } /* The first thing we need to do is gather files and directories from the backend. This needs to be done in the same order that we attempt to load files for reading: 1) From all mounts. 2) Directly from the file system. With each of the steps above, the relevant open mode flags must be respected as well because we want iteration to be consistent with what would happen when opening files. */ /* Gather files. */ { fs_result mountPointIerationResult; fs_mount_list_iterator iMountPoint; /* Check mount points. */ if (pFS != NULL && (mode & FS_IGNORE_MOUNTS) == 0) { for (mountPointIerationResult = fs_mount_list_first(pFS->pReadMountPoints, &iMountPoint); mountPointIerationResult == FS_SUCCESS; mountPointIerationResult = fs_mount_list_next(&iMountPoint)) { /* Just like when opening a file, we need to check that the directory path starts with the mount point. If it doesn't match we just skip to the next mount point. */ char pDirSubPathCleanStack[1024]; char* pDirSubPathCleanHeap = NULL; char* pDirSubPathClean; int dirSubPathCleanLen; unsigned int cleanOptions = (mode & FS_NO_ABOVE_ROOT_NAVIGATION); size_t dirSubPathLen; const char* pDirSubPath = fs_path_trim_base(pDirectoryPath, directoryPathLen, iMountPoint.pMountPointPath, FS_NULL_TERMINATED); if (pDirSubPath == NULL) { continue; } dirSubPathLen = directoryPathLen - (size_t)(pDirSubPath - pDirectoryPath); /* If the mount point starts with a root segment, i.e. "/", we cannot allow navigation above that. */ if (iMountPoint.pMountPointPath[0] == '/' || iMountPoint.pMountPointPath[0] == '\\') { cleanOptions |= FS_NO_ABOVE_ROOT_NAVIGATION; } /* We need to clean the file sub-path, but can skip it if FS_NO_SPECIAL_DIRS is specified since it's implied. */ if ((mode & FS_NO_SPECIAL_DIRS) == 0) { dirSubPathCleanLen = fs_path_normalize(pDirSubPathCleanStack, sizeof(pDirSubPathCleanStack), pDirSubPath, dirSubPathLen, cleanOptions); if (dirSubPathCleanLen < 0) { continue; /* Most likely violating FS_NO_ABOVE_ROOT_NAVIGATION. */ } if (dirSubPathCleanLen >= (int)sizeof(pDirSubPathCleanStack)) { pDirSubPathCleanHeap = (char*)fs_malloc(dirSubPathCleanLen + 1, fs_get_allocation_callbacks(pFS)); if (pDirSubPathCleanHeap == NULL) { return NULL; /* Out of memory. */ } fs_path_normalize(pDirSubPathCleanHeap, dirSubPathCleanLen + 1, pDirSubPath, dirSubPathLen, cleanOptions); /* <-- This should never fail. */ pDirSubPathClean = pDirSubPathCleanHeap; } else { pDirSubPathClean = pDirSubPathCleanStack; } } else { pDirSubPathClean = (char*)pDirSubPath; /* Safe cast. Will not be modified past this point. */ dirSubPathCleanLen = (int)dirSubPathLen; } if (iMountPoint.pArchive != NULL) { /* The mount point is an archive. We need to iterate over the contents of the archive. */ pBackendIterator = fs_first_ex(iMountPoint.pArchive, pDirSubPathClean, dirSubPathCleanLen, mode); while (pBackendIterator != NULL) { pIterator = fs_iterator_internal_append(pIterator, pBackendIterator, pFS, mode); pBackendIterator = fs_next(pBackendIterator); } } else { /* The mount point is a directory. We need to construct a path that is the concatenation of the mount point's internal path and our input directory. This is the path we'll be using to iterate over the contents of the directory. */ char pInterpolatedPathStack[1024]; char* pInterpolatedPathHeap = NULL; char* pInterpolatedPath; int interpolatedPathLen; interpolatedPathLen = fs_path_append(pInterpolatedPathStack, sizeof(pInterpolatedPathStack), iMountPoint.pPath, FS_NULL_TERMINATED, pDirSubPathClean, dirSubPathCleanLen); if (interpolatedPathLen > 0 && (size_t)interpolatedPathLen >= sizeof(pInterpolatedPathStack)) { /* Not enough room on the stack. Allocate on the heap. */ pInterpolatedPathHeap = (char*)fs_malloc(interpolatedPathLen + 1, fs_get_allocation_callbacks(pFS)); if (pInterpolatedPathHeap == NULL) { fs_free_iterator((fs_iterator*)pIterator); return NULL; /* Out of memory. */ } fs_path_append(pInterpolatedPathHeap, interpolatedPathLen + 1, iMountPoint.pPath, FS_NULL_TERMINATED, pDirSubPathClean, dirSubPathCleanLen); /* <-- This should never fail. */ pInterpolatedPath = pInterpolatedPathHeap; } else { pInterpolatedPath = pInterpolatedPathStack; } pIterator = fs_iterator_internal_gather(pIterator, pBackend, pFS, pInterpolatedPath, FS_NULL_TERMINATED, mode); if (pInterpolatedPathHeap != NULL) { fs_free(pInterpolatedPathHeap, fs_get_allocation_callbacks(pFS)); pInterpolatedPathHeap = NULL; } } } } /* Check for files directly in the file system. */ if ((mode & FS_ONLY_MOUNTS) == 0) { pIterator = fs_iterator_internal_gather(pIterator, pBackend, pFS, pDirectoryPath, directoryPathLen, mode); } } /* If after the gathering step we don't have an iterator we can just return null. It just means nothing was found. */ if (pIterator == NULL) { return NULL; } /* Set up pointers. The list of pointers is located at the end of the array. */ pIterator->ppItems = (fs_iterator_item**)FS_OFFSET_PTR(pIterator, pIterator->dataSize - (pIterator->itemCount * sizeof(fs_iterator_item*))); cursor = 0; for (iItem = 0; iItem < pIterator->itemCount; iItem += 1) { pIterator->ppItems[iItem] = (fs_iterator_item*)FS_OFFSET_PTR(pIterator, sizeof(fs_iterator_internal) + cursor); cursor += fs_iterator_item_sizeof(pIterator->ppItems[iItem]->nameLen); } /* We want to sort items in the iterator to make it consistent across platforms. */ fs_iterator_internal_sort(pIterator); /* Post-processing setup. */ pIterator->base.pFS = pFS; pIterator->itemIndex = 0; fs_iterator_internal_resolve_public_members(pIterator); return (fs_iterator*)pIterator; } FS_API fs_iterator* fs_first(fs* pFS, const char* pDirectoryPath, int mode) { return fs_first_ex(pFS, pDirectoryPath, FS_NULL_TERMINATED, mode); } FS_API fs_iterator* fs_next(fs_iterator* pIterator) { fs_iterator_internal* pIteratorInternal = (fs_iterator_internal*)pIterator; if (pIteratorInternal == NULL) { return NULL; } pIteratorInternal->itemIndex += 1; if (pIteratorInternal->itemIndex == pIteratorInternal->itemCount) { fs_free_iterator(pIterator); return NULL; } fs_iterator_internal_resolve_public_members(pIteratorInternal); return pIterator; } FS_API void fs_free_iterator(fs_iterator* pIterator) { if (pIterator == NULL) { return; } fs_free(pIterator, fs_get_allocation_callbacks(pIterator->pFS)); } FS_API fs_result fs_mount(fs* pFS, const char* pPathToMount, const char* pMountPoint, fs_mount_priority priority) { fs_result result; fs_mount_list_iterator iterator; fs_result iteratorResult; fs_mount_list* pMountPoints; fs_mount_point* pNewMountPoint; fs_file_info fileInfo; int openMode; if (pFS == NULL || pPathToMount == NULL) { return FS_INVALID_ARGS; } if (pMountPoint == NULL) { pMountPoint = ""; } /* The first thing we're going to do is check for duplicates. We allow for the same path to be mounted to different mount points, and different paths to be mounted to the same mount point, but we don't want to have any duplicates where the same path is mounted to the same mount point. */ for (iteratorResult = fs_mount_list_first(pFS->pReadMountPoints, &iterator); iteratorResult == FS_SUCCESS; iteratorResult = fs_mount_list_next(&iterator)) { if (strcmp(pPathToMount, iterator.pPath) == 0 && strcmp(pMountPoint, iterator.pMountPointPath) == 0) { return FS_SUCCESS; /* Just pretend we're successful. */ } } /* Getting here means we're not mounting a duplicate so we can now add it. We'll be either adding it to the end of the list, or to the beginning of the list depending on the priority. */ pMountPoints = fs_mount_list_alloc(pFS->pReadMountPoints, pPathToMount, pMountPoint, priority, fs_get_allocation_callbacks(pFS), &pNewMountPoint); if (pMountPoints == NULL) { return FS_OUT_OF_MEMORY; } pFS->pReadMountPoints = pMountPoints; /* We need to determine if we're mounting a directory or an archive. If it's an archive, we need to open it. */ openMode = FS_READ | FS_VERBOSE; /* Must use fs_backend_info() instead of fs_info() because otherwise fs_info() will attempt to read from mounts when we're in the process of trying to add one (this function). */ result = fs_backend_info(fs_get_backend_or_default(pFS), pFS, (pPathToMount[0] != '\0') ? pPathToMount : ".", FS_IGNORE_MOUNTS, &fileInfo); if (result != FS_SUCCESS) { return result; } if (fileInfo.directory) { pNewMountPoint->pArchive = NULL; pNewMountPoint->closeArchiveOnUnmount = FS_FALSE; } else { result = fs_open_archive(pFS, pPathToMount, openMode, &pNewMountPoint->pArchive); if (result != FS_SUCCESS) { return result; } pNewMountPoint->closeArchiveOnUnmount = FS_TRUE; } return FS_SUCCESS; } FS_API fs_result fs_unmount(fs* pFS, const char* pPathToMount_NotMountPoint) { fs_result iteratorResult; fs_mount_list_iterator iterator; if (pFS == NULL || pPathToMount_NotMountPoint == NULL) { return FS_INVALID_ARGS; } for (iteratorResult = fs_mount_list_first(pFS->pReadMountPoints, &iterator); iteratorResult == FS_SUCCESS; /*iteratorResult = fs_mount_list_next(&iterator)*/) { if (strcmp(pPathToMount_NotMountPoint, iterator.pPath) == 0) { if (iterator.internal.pMountPoint->closeArchiveOnUnmount) { fs_close_archive(iterator.pArchive); } fs_mount_list_remove(pFS->pReadMountPoints, iterator.internal.pMountPoint); /* Since we just removed this item we don't want to advance the cursor. We do, however, need to re-resolve the members in preparation for the next iteration. */ fs_mount_list_iterator_resolve_members(&iterator, iterator.internal.cursor); } else { iteratorResult = fs_mount_list_next(&iterator); } } return FS_SUCCESS; } FS_API fs_result fs_mount_fs(fs* pFS, fs* pOtherFS, const char* pMountPoint, fs_mount_priority priority) { fs_result iteratorResult; fs_mount_list_iterator iterator; fs_mount_list* pMountPoints; fs_mount_point* pNewMountPoint; if (pFS == NULL || pOtherFS == NULL) { return FS_INVALID_ARGS; } if (pMountPoint == NULL) { pMountPoint = ""; } /* We don't allow duplicates. An archive can be bound to multiple mount points, but we don't want to have the same archive mounted to the same mount point multiple times. */ for (iteratorResult = fs_mount_list_first(pFS->pReadMountPoints, &iterator); iteratorResult == FS_SUCCESS; iteratorResult = fs_mount_list_next(&iterator)) { if (pOtherFS == iterator.pArchive && strcmp(pMountPoint, iterator.pMountPointPath) == 0) { return FS_SUCCESS; /* Just pretend we're successful. */ } } /* Getting here means we're not mounting a duplicate so we can now add it. We'll be either adding it to the end of the list, or to the beginning of the list depending on the priority. */ pMountPoints = fs_mount_list_alloc(pFS->pReadMountPoints, "", pMountPoint, priority, fs_get_allocation_callbacks(pFS), &pNewMountPoint); if (pMountPoints == NULL) { return FS_OUT_OF_MEMORY; } pFS->pReadMountPoints = pMountPoints; pNewMountPoint->pArchive = pOtherFS; pNewMountPoint->closeArchiveOnUnmount = FS_FALSE; return FS_SUCCESS; } FS_API fs_result fs_unmount_fs(fs* pFS, fs* pOtherFS) { fs_result iteratorResult; fs_mount_list_iterator iterator; if (pFS == NULL || pOtherFS == NULL) { return FS_INVALID_ARGS; } for (iteratorResult = fs_mount_list_first(pFS->pReadMountPoints, &iterator); iteratorResult == FS_SUCCESS; iteratorResult = fs_mount_list_next(&iterator)) { if (iterator.pArchive == pOtherFS) { fs_mount_list_remove(pFS->pReadMountPoints, iterator.internal.pMountPoint); return FS_SUCCESS; } } return FS_SUCCESS; } FS_API fs_result fs_mount_write(fs* pFS, const char* pPathToMount, const char* pMountPoint, fs_mount_priority priority) { fs_mount_list_iterator iterator; fs_result iteratorResult; fs_mount_point* pNewMountPoint; fs_mount_list* pMountList; if (pFS == NULL || pPathToMount == NULL) { return FS_INVALID_ARGS; } if (pMountPoint == NULL) { pMountPoint = ""; } /* Like with regular read mount points we'll want to check for duplicates. */ for (iteratorResult = fs_mount_list_first(pFS->pWriteMountPoints, &iterator); iteratorResult == FS_SUCCESS; iteratorResult = fs_mount_list_next(&iterator)) { if (strcmp(pPathToMount, iterator.pPath) == 0 && strcmp(pMountPoint, iterator.pMountPointPath) == 0) { return FS_SUCCESS; /* Just pretend we're successful. */ } } /* Getting here means we're not mounting a duplicate so we can now add it. */ pMountList = fs_mount_list_alloc(pFS->pWriteMountPoints, pPathToMount, pMountPoint, priority, fs_get_allocation_callbacks(pFS), &pNewMountPoint); if (pMountList == NULL) { return FS_OUT_OF_MEMORY; } pFS->pWriteMountPoints = pMountList; /* We don't support mounting archives. Explicitly disable this. */ pNewMountPoint->pArchive = NULL; pNewMountPoint->closeArchiveOnUnmount = FS_FALSE; return FS_SUCCESS; } FS_API fs_result fs_unmount_write(fs* pFS, const char* pPathToMount_NotMountPoint) { fs_result iteratorResult; fs_mount_list_iterator iterator; if (pFS == NULL || pPathToMount_NotMountPoint == NULL) { return FS_INVALID_ARGS; } for (iteratorResult = fs_mount_list_first(pFS->pWriteMountPoints, &iterator); iteratorResult == FS_SUCCESS; /*iteratorResult = fs_mount_list_next(&iterator)*/) { if (strcmp(pPathToMount_NotMountPoint, iterator.pPath) == 0) { fs_mount_list_remove(pFS->pWriteMountPoints, iterator.internal.pMountPoint); /* Since we just removed this item we don't want to advance the cursor. We do, however, need to re-resolve the members in preparation for the next iteration. */ fs_mount_list_iterator_resolve_members(&iterator, iterator.internal.cursor); } else { iteratorResult = fs_mount_list_next(&iterator); } } return FS_SUCCESS; } FS_API fs_result fs_file_read_to_end(fs_file* pFile, fs_format format, void** ppData, size_t* pDataSize) { return fs_stream_read_to_end(fs_file_get_stream(pFile), format, fs_get_allocation_callbacks(fs_file_get_fs(pFile)), ppData, pDataSize); } FS_API fs_result fs_file_open_and_read(fs* pFS, const char* pFilePath, fs_format format, void** ppData, size_t* pDataSize) { fs_result result; fs_file* pFile; if (pFS == NULL || pFilePath == NULL || ppData == NULL || pDataSize == NULL) { return FS_INVALID_ARGS; } result = fs_file_open(pFS, pFilePath, FS_READ, &pFile); if (result != FS_SUCCESS) { return result; } result = fs_file_read_to_end(pFile, format, ppData, pDataSize); fs_file_close(pFile); return result; } FS_API fs_result fs_file_open_and_write(fs* pFS, const char* pFilePath, void* pData, size_t dataSize) { fs_result result; fs_file* pFile; if (pFS == NULL || pFilePath == NULL || pData == NULL) { return FS_INVALID_ARGS; } result = fs_file_open(pFS, pFilePath, FS_TRUNCATE, &pFile); if (result != FS_SUCCESS) { return result; } result = fs_file_write(pFile, pData, dataSize, NULL); fs_file_close(pFile); return result; } /****************************************************************************** * * * stdio Backend * * ******************************************************************************/ #ifndef FS_NO_STDIO #include #include /* For wcstombs(). */ #include #if defined(_WIN32) #include /* For _mkdir() */ #endif #ifndef S_ISDIR #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #endif #ifndef S_ISLNK #if defined(_WIN32) #define S_ISLNK(m) (0) #else #define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK) #endif #endif static int fs_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { #if defined(_MSC_VER) && _MSC_VER >= 1400 int err; #endif if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return EINVAL; } #if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return err; } #else #if defined(_WIN32) || defined(__APPLE__) *ppFile = fopen(pFilePath, pOpenMode); #else #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE) *ppFile = fopen64(pFilePath, pOpenMode); #else *ppFile = fopen(pFilePath, pOpenMode); #endif #endif if (*ppFile == NULL) { int result = errno; if (result == 0) { result = ENOENT; /* Just a safety check to make sure we never ever return success when pFile == NULL. */ } return result; } #endif return FS_SUCCESS; } /* _wfopen() isn't always available in all compilation environments. * Windows only. * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define FS_HAS_WFOPEN #endif #endif int fs_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return FS_INVALID_ARGS; } #if defined(FS_HAS_WFOPEN) { /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 { errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return err; } } #else { *ppFile = _wfopen(pFilePath, pOpenMode); if (*ppFile == NULL) { return errno; } } #endif } #else { /* Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility. */ mbstate_t mbs; size_t lenMB; const wchar_t* pFilePathTemp = pFilePath; char* pFilePathMB = NULL; char pOpenModeMB[32] = {0}; /* Get the length first. */ FS_ZERO_OBJECT(&mbs); lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs); if (lenMB == (size_t)-1) { return errno; } pFilePathMB = (char*)fs_malloc(lenMB + 1, NULL); if (pFilePathMB == NULL) { return ENOMEM; } pFilePathTemp = pFilePath; FS_ZERO_OBJECT(&mbs); wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs); /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */ { size_t i = 0; for (;;) { if (pOpenMode[i] == 0) { pOpenModeMB[i] = '\0'; break; } pOpenModeMB[i] = (char)pOpenMode[i]; i += 1; } } *ppFile = fopen(pFilePathMB, pOpenModeMB); fs_free(pFilePathMB, NULL); if (*ppFile == NULL) { return errno; } } #endif return 0; } static fs_file_info fs_file_info_from_stat(struct stat* pStat) { fs_file_info info; FS_ZERO_OBJECT(&info); info.size = pStat->st_size; info.lastAccessTime = pStat->st_atime; info.lastModifiedTime = pStat->st_mtime; info.directory = S_ISDIR(pStat->st_mode) != 0; info.symlink = S_ISLNK(pStat->st_mode) != 0; return info; } #if defined(_WIN32) static fs_uint64 fs_FILETIME_to_unix(const FILETIME* pFT) { ULARGE_INTEGER li; li.HighPart = pFT->dwHighDateTime; li.LowPart = pFT->dwLowDateTime; return (fs_uint64)(li.QuadPart / 10000000UL - 11644473600UL); /* Convert from Windows epoch to Unix epoch. */ } static fs_file_info fs_file_info_from_WIN32_FIND_DATAW(const WIN32_FIND_DATAW* pFD) { fs_file_info info; FS_ZERO_OBJECT(&info); info.size = ((fs_uint64)pFD->nFileSizeHigh << 32) | (fs_uint64)pFD->nFileSizeLow; info.lastModifiedTime = fs_FILETIME_to_unix(&pFD->ftLastWriteTime); info.lastAccessTime = fs_FILETIME_to_unix(&pFD->ftLastAccessTime); info.directory = (pFD->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; info.symlink = (pFD->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0; return info; } #endif typedef struct fs_stdio_registered_file { size_t pathLen; FILE* pFile; } fs_stdio_registered_file; typedef struct fs_stdio { int _unused; } fs_stdio; static size_t fs_alloc_size_stdio(const void* pBackendConfig) { FS_UNUSED(pBackendConfig); return sizeof(fs_stdio); } static fs_result fs_init_stdio(fs* pFS, const void* pBackendConfig, fs_stream* pStream) { FS_UNUSED(pFS); FS_UNUSED(pBackendConfig); FS_UNUSED(pStream); return FS_SUCCESS; } static void fs_uninit_stdio(fs* pFS) { FS_UNUSED(pFS); return; } static fs_result fs_ioctl_stdio(fs* pFS, int op, void* pArgs) { FS_UNUSED(pFS); FS_UNUSED(op); FS_UNUSED(pArgs); /* Not used by the stdio backend. */ return FS_INVALID_OPERATION; } static fs_result fs_remove_stdio(fs* pFS, const char* pFilePath) { int result = remove(pFilePath); if (result != 0) { return fs_result_from_errno(errno); } FS_UNUSED(pFS); return FS_SUCCESS; } static fs_result fs_rename_stdio(fs* pFS, const char* pOldName, const char* pNewName) { int result = rename(pOldName, pNewName); if (result != 0) { return fs_result_from_errno(errno); } FS_UNUSED(pFS); return FS_SUCCESS; } #if defined(_WIN32) static fs_result fs_mkdir_stdio_win32(const char* pPath) { int result = _mkdir(pPath); if (result != 0) { return fs_result_from_errno(errno); } return FS_SUCCESS; } #else static fs_result fs_mkdir_stdio_posix(const char* pPath) { int result = mkdir(pPath, S_IRWXU); if (result != 0) { return fs_result_from_errno(errno); } return FS_SUCCESS; } #endif static fs_result fs_mkdir_stdio(fs* pFS, const char* pPath) { fs_result result; FS_UNUSED(pFS); #if defined(_WIN32) result = fs_mkdir_stdio_win32(pPath); #else result = fs_mkdir_stdio_posix(pPath); #endif if (result == FS_DOES_NOT_EXIST) { result = FS_SUCCESS; } return result; } static fs_result fs_info_stdio(fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo) { /* We don't want to use stat() with Win32 because, from what I can tell, there's no way to determine if it's a symbolic link. S_IFLNK does not seem to be defined. */ #if defined(_WIN32) { int pathLen; wchar_t pPathWStack[1024]; wchar_t* pPathWHeap = NULL; wchar_t* pPathW; HANDLE hFind; WIN32_FIND_DATAW fd; /* Use Win32 to convert from UTF-8 to wchar_t. */ pathLen = MultiByteToWideChar(CP_UTF8, 0, pPath, -1, NULL, 0); if (pathLen == 0) { return fs_result_from_errno(GetLastError()); } if (pathLen <= (int)FS_COUNTOF(pPathWStack)) { pPathW = pPathWStack; } else { pPathWHeap = (wchar_t*)fs_malloc(pathLen * sizeof(wchar_t), fs_get_allocation_callbacks(pFS)); /* pathLen includes the null terminator. */ if (pPathWHeap == NULL) { return FS_OUT_OF_MEMORY; } pPathW = pPathWHeap; } MultiByteToWideChar(CP_UTF8, 0, pPath, -1, pPathW, pathLen); hFind = FindFirstFileW(pPathW, &fd); fs_free(pPathWHeap, fs_get_allocation_callbacks(pFS)); pPathWHeap = NULL; *pInfo = fs_file_info_from_WIN32_FIND_DATAW(&fd); } #else { struct stat info; FS_UNUSED(pFS); if (stat(pPath, &info) != 0) { return fs_result_from_errno(errno); } *pInfo = fs_file_info_from_stat(&info); } #endif (void)openMode; return FS_SUCCESS; } typedef struct fs_file_stdio { FILE* pFile; char openMode[4]; /* For duplication. */ fs_bool32 isRegisteredOrHandle; /* When set to true, will not be closed with fs_file_close(). */ } fs_file_stdio; static size_t fs_file_alloc_size_stdio(fs* pFS) { FS_UNUSED(pFS); return sizeof(fs_file_stdio); } static fs_result fs_file_open_stdio(fs* pFS, fs_stream* pStream, const char* pPath, int openMode, fs_file* pFile) { fs_file_stdio* pFileStdio; int result; FS_UNUSED(pFS); FS_UNUSED(pStream); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); if (pFileStdio == NULL) { return FS_INVALID_ARGS; } if ((openMode & FS_WRITE) != 0) { if ((openMode & FS_READ) != 0) { /* Read and write. */ if ((openMode & FS_APPEND) == FS_APPEND) { pFileStdio->openMode[0] = 'a'; pFileStdio->openMode[1] = '+'; pFileStdio->openMode[2] = 'b'; pFileStdio->openMode[3] = 0; /* Read-and-write, appending. */ } else if ((openMode & FS_OVERWRITE) == FS_OVERWRITE) { pFileStdio->openMode[0] = 'r'; pFileStdio->openMode[1] = '+'; pFileStdio->openMode[2] = 'b'; pFileStdio->openMode[3] = 0; /* Read-and-write, overwriting. */ } else { pFileStdio->openMode[0] = 'w'; pFileStdio->openMode[1] = '+'; pFileStdio->openMode[2] = 'b'; pFileStdio->openMode[3] = 0; /* Read-and-write, truncating. */ } } else { /* Write-only. */ if ((openMode & FS_APPEND) == FS_APPEND) { pFileStdio->openMode[0] = 'a'; pFileStdio->openMode[1] = 'b'; pFileStdio->openMode[2] = 0; /* Write-only, appending. */ } else if ((openMode & FS_OVERWRITE) == FS_OVERWRITE) { pFileStdio->openMode[0] = 'r'; pFileStdio->openMode[1] = '+'; pFileStdio->openMode[2] = 'b'; pFileStdio->openMode[3] = 0; /* Write-only, overwriting. Need to use the "+" option here because there does not appear to be an option for a write-only overwrite mode. */ } else { pFileStdio->openMode[0] = 'w'; pFileStdio->openMode[1] = 'b'; pFileStdio->openMode[2] = 0; /* Write-only, truncating. */ } } } else { if ((openMode & FS_READ) != 0) { pFileStdio->openMode[0] = 'r'; pFileStdio->openMode[1] = 'b'; pFileStdio->openMode[2] = 0; /* Read-only. */ } else { return FS_INVALID_ARGS; } } #if defined(_WIN32) && defined(FS_HAS_WFOPEN) { size_t i; int pathLen; wchar_t pOpenModeW[4]; wchar_t pFilePathWStack[1024]; wchar_t* pFilePathWHeap = NULL; wchar_t* pFilePathW; /* Use Win32 to convert from UTF-8 to wchar_t. */ pathLen = MultiByteToWideChar(CP_UTF8, 0, pPath, -1, NULL, 0); if (pathLen > 0) { if (pathLen <= (int)FS_COUNTOF(pFilePathWStack)) { pFilePathW = pFilePathWStack; } else { pFilePathWHeap = (wchar_t*)fs_malloc(pathLen * sizeof(wchar_t), fs_get_allocation_callbacks(pFS)); if (pFilePathWHeap == NULL) { return FS_OUT_OF_MEMORY; } pFilePathW = pFilePathWHeap; } MultiByteToWideChar(CP_UTF8, 0, pPath, -1, pFilePathW, pathLen); for (i = 0; i < FS_COUNTOF(pOpenModeW); i += 1) { pOpenModeW[i] = (wchar_t)pFileStdio->openMode[i]; } result = fs_wfopen(&pFileStdio->pFile, pFilePathW, pOpenModeW); fs_free(pFilePathWHeap, fs_get_allocation_callbacks(pFS)); pFilePathWHeap = NULL; if (result == 0) { return FS_SUCCESS; } } } #endif /* Getting here means we're either not opening with wfopen(), or wfopen() failed (or the conversion from char to wchar_t). */ result = fs_fopen(&pFileStdio->pFile, pPath, pFileStdio->openMode); if (result != 0) { return fs_result_from_errno(result); } return FS_SUCCESS; } static fs_result fs_file_open_handle_stdio(fs* pFS, void* hBackendFile, fs_file* pFile) { fs_file_stdio* pFileStdio; FS_UNUSED(pFS); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); if (pFileStdio == NULL) { return FS_INVALID_ARGS; } pFileStdio->pFile = (FILE*)hBackendFile; pFileStdio->isRegisteredOrHandle = FS_TRUE; return FS_SUCCESS; } static void fs_file_close_stdio(fs_file* pFile) { fs_file_stdio* pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); if (pFileStdio == NULL) { return; } if (!pFileStdio->isRegisteredOrHandle) { fclose(pFileStdio->pFile); } } static fs_result fs_file_read_stdio(fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead) { size_t bytesRead; fs_file_stdio* pFileStdio; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); FS_ASSERT(pDst != NULL); FS_ASSERT(pBytesRead != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); bytesRead = fread(pDst, 1, bytesToRead, pFileStdio->pFile); *pBytesRead = bytesRead; /* If the value returned by fread is less than the bytes requested, it was either EOF or an error. We don't return EOF unless the number of bytes read is 0. */ if (bytesRead != bytesToRead) { if (feof(pFileStdio->pFile)) { if (bytesRead == 0) { return FS_AT_END; } } else { return fs_result_from_errno(ferror(pFileStdio->pFile)); } } return FS_SUCCESS; } static fs_result fs_file_write_stdio(fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { size_t bytesWritten; fs_file_stdio* pFileStdio; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); FS_ASSERT(pSrc != NULL); FS_ASSERT(pBytesWritten != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); bytesWritten = fwrite(pSrc, 1, bytesToWrite, pFileStdio->pFile); *pBytesWritten = bytesWritten; if (bytesWritten != bytesToWrite) { return fs_result_from_errno(ferror(pFileStdio->pFile)); } return FS_SUCCESS; } static fs_result fs_file_seek_stdio(fs_file* pFile, fs_int64 offset, fs_seek_origin origin) { fs_file_stdio* pFileStdio; int result; int whence; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); if (origin == FS_SEEK_SET) { whence = SEEK_SET; } else if (origin == FS_SEEK_END) { whence = SEEK_END; } else { whence = SEEK_CUR; } #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _fseeki64(pFileStdio->pFile, offset, whence); #else /* No _fseeki64() so restrict to 31 bits. */ if (origin > 0x7FFFFFFF) { return ERANGE; } result = fseek(pFileStdio->pFile, (int)offset, whence); #endif #else result = fseek(pFileStdio->pFile, (long int)offset, whence); #endif if (result != 0) { return fs_result_from_errno(errno); } return FS_SUCCESS; } static fs_result fs_file_tell_stdio(fs_file* pFile, fs_int64* pCursor) { fs_file_stdio* pFileStdio; fs_int64 result; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); FS_ASSERT(pCursor != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _ftelli64(pFileStdio->pFile); #else result = ftell(pFileStdio->pFile); #endif #else result = ftell(pFileStdio->pFile); #endif *pCursor = result; return FS_SUCCESS; } static fs_result fs_file_flush_stdio(fs_file* pFile) { fs_file_stdio* pFileStdio; int result; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); result = fflush(pFileStdio->pFile); if (result != 0) { return fs_result_from_errno(ferror(pFileStdio->pFile)); } return FS_SUCCESS; } /* Please submit a bug report if you get an error about fileno(). */ #if !defined(_MSC_VER) && !((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)) && !(defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) int fileno(FILE *stream); #endif static fs_result fs_file_info_stdio(fs_file* pFile, fs_file_info* pInfo) { fs_file_stdio* pFileStdio; int fd; struct stat info; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); FS_ASSERT(pInfo != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); #if defined(_MSC_VER) fd = _fileno(pFileStdio->pFile); #else fd = fileno(pFileStdio->pFile); #endif if (fstat(fd, &info) != 0) { return fs_result_from_errno(ferror(pFileStdio->pFile)); } *pInfo = fs_file_info_from_stat(&info); return FS_SUCCESS; } /* Iteration is platform-specific. */ #define FS_STDIO_MIN_ITERATOR_ALLOCATION_SIZE 1024 #if defined(_WIN32) #include #include FS_API fs_result fs_file_duplicate_stdio(fs_file* pFile, fs_file* pDuplicatedFile) { fs_file_stdio* pFileStdio; fs_file_stdio* pDuplicatedFileStdio; int fd; int fdDuplicate; HANDLE hFile; HANDLE hFileDuplicate; pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); pDuplicatedFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pDuplicatedFile); FS_ASSERT(pDuplicatedFileStdio != NULL); fd = _fileno(pFileStdio->pFile); if (fd == -1) { return fs_result_from_errno(errno); } hFile = (HANDLE)_get_osfhandle(fd); if (hFile == INVALID_HANDLE_VALUE) { return fs_result_from_errno(errno); } if (!DuplicateHandle(GetCurrentProcess(), hFile, GetCurrentProcess(), &hFileDuplicate, 0, FALSE, DUPLICATE_SAME_ACCESS)) { return fs_result_from_errno(GetLastError()); } fdDuplicate = _open_osfhandle((fs_intptr)hFileDuplicate, _O_RDONLY); if (fdDuplicate == -1) { CloseHandle(hFileDuplicate); return fs_result_from_errno(errno); } pDuplicatedFileStdio->pFile = _fdopen(fdDuplicate, pFileStdio->openMode); if (pDuplicatedFileStdio->pFile == NULL) { _close(fdDuplicate); return fs_result_from_errno(errno); } return FS_SUCCESS; } typedef struct fs_iterator_stdio { fs_iterator iterator; HANDLE hFind; } fs_iterator_stdio; FS_API void fs_free_iterator_stdio(fs_iterator* pIterator) { fs_iterator_stdio* pIteratorStdio = (fs_iterator_stdio*)pIterator; FindClose(pIteratorStdio->hFind); fs_free(pIteratorStdio, fs_get_allocation_callbacks(pIterator->pFS)); } static fs_iterator* fs_iterator_stdio_resolve(fs_iterator_stdio* pIteratorStdio, fs* pFS, HANDLE hFind, const WIN32_FIND_DATAW* pFD) { fs_iterator_stdio* pNewIteratorStdio; size_t allocSize; int nameLen; /* The name is stored at the end of the struct. In order to know how much memory to allocate we'll need to calculate the length of the name. */ nameLen = WideCharToMultiByte(CP_UTF8, 0, pFD->cFileName, -1, NULL, 0, NULL, NULL); if (nameLen == 0) { fs_free_iterator_stdio((fs_iterator*)pIteratorStdio); return NULL; } allocSize = FS_MAX(sizeof(fs_iterator_stdio) + nameLen, FS_STDIO_MIN_ITERATOR_ALLOCATION_SIZE); /* "nameLen" includes the null terminator. 1KB just to try to avoid excessive internal reallocations inside realloc(). */ pNewIteratorStdio = (fs_iterator_stdio*)fs_realloc(pIteratorStdio, allocSize, fs_get_allocation_callbacks(pFS)); if (pNewIteratorStdio == NULL) { fs_free_iterator_stdio((fs_iterator*)pIteratorStdio); return NULL; } pNewIteratorStdio->iterator.pFS = pFS; pNewIteratorStdio->hFind = hFind; /* Name. */ pNewIteratorStdio->iterator.pName = (char*)pNewIteratorStdio + sizeof(fs_iterator_stdio); pNewIteratorStdio->iterator.nameLen = (size_t)nameLen - 1; /* nameLen includes the null terminator. */ WideCharToMultiByte(CP_UTF8, 0, pFD->cFileName, -1, (char*)pNewIteratorStdio->iterator.pName, nameLen, NULL, NULL); /* const-cast is safe here. */ /* Info. */ pNewIteratorStdio->iterator.info = fs_file_info_from_WIN32_FIND_DATAW(pFD); return (fs_iterator*)pNewIteratorStdio; } FS_API fs_iterator* fs_first_stdio(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen) { size_t i; int queryLen; int cbMultiByte; wchar_t pQueryStack[1024]; wchar_t* pQueryHeap = NULL; wchar_t* pQuery; HANDLE hFind; WIN32_FIND_DATAW fd; /* An empty path means the current directory. Win32 will want us to specify "." in this case. */ if (pDirectoryPath == NULL || pDirectoryPath[0] == '\0') { pDirectoryPath = "."; directoryPathLen = 1; } if (directoryPathLen == FS_NULL_TERMINATED) { cbMultiByte = -1; } else { if (directoryPathLen > 0xFFFFFFFF) { return NULL; } cbMultiByte = (int)directoryPathLen; } /* When iterating over files using Win32 you specify a wildcard pattern. The "+ 3" you see in the code below is for the wildcard pattern. We also need to make everything a backslash. */ queryLen = MultiByteToWideChar(CP_UTF8, 0, pDirectoryPath, cbMultiByte, NULL, 0); if (queryLen == 0) { return NULL; } if ((queryLen + 3) > (int)FS_COUNTOF(pQueryStack)) { pQueryHeap = (wchar_t*)fs_malloc((queryLen + 3) * sizeof(wchar_t), fs_get_allocation_callbacks(pFS)); if (pQueryHeap == NULL) { return NULL; } pQuery = pQueryHeap; } else { pQuery = pQueryStack; } MultiByteToWideChar(CP_UTF8, 0, pDirectoryPath, cbMultiByte, pQuery, queryLen); if (directoryPathLen == FS_NULL_TERMINATED) { queryLen -= 1; /* Remove the null terminator. Will not include the null terminator if the input string is not null terminated, hence why this is inside the conditional. */ } /* Remove the trailing slash, if any. */ if (pQuery[queryLen - 1] == L'\\' || pQuery[queryLen - 1] == L'/') { queryLen -= 1; } pQuery[queryLen + 0] = L'\\'; pQuery[queryLen + 1] = L'*'; pQuery[queryLen + 2] = L'\0'; /* Convert to backslashes. */ for (i = 0; i < (size_t)queryLen; i += 1) { if (pQuery[i] == L'/') { pQuery[i] = L'\\'; } } hFind = FindFirstFileW(pQuery, &fd); fs_free(pQueryHeap, fs_get_allocation_callbacks(pFS)); if (hFind == INVALID_HANDLE_VALUE) { return NULL; } return fs_iterator_stdio_resolve(NULL, pFS, hFind, &fd); } FS_API fs_iterator* fs_next_stdio(fs_iterator* pIterator) { fs_iterator_stdio* pIteratorStdio = (fs_iterator_stdio*)pIterator; WIN32_FIND_DATAW fd; if (!FindNextFileW(pIteratorStdio->hFind, &fd)) { fs_free_iterator_stdio(pIterator); return NULL; } return fs_iterator_stdio_resolve(pIteratorStdio, pIterator->pFS, pIteratorStdio->hFind, &fd); } #else #include #include FS_API fs_result fs_file_duplicate_stdio(fs_file* pFile, fs_file* pDuplicatedFile) { fs_file_stdio* pFileStdio; fs_file_stdio* pDuplicatedFileStdio; FILE* pDuplicatedFileHandle; /* These were all validated at a higher level. */ FS_ASSERT(pFile != NULL); FS_ASSERT(pDuplicatedFile != NULL); pFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pFile); FS_ASSERT(pFileStdio != NULL); pDuplicatedFileStdio = (fs_file_stdio*)fs_file_get_backend_data(pDuplicatedFile); FS_ASSERT(pDuplicatedFileStdio != NULL); pDuplicatedFileHandle = fdopen(dup(fileno(pFileStdio->pFile)), pFileStdio->openMode); if (pDuplicatedFileHandle == NULL) { return fs_result_from_errno(errno); } pDuplicatedFileStdio->pFile = pDuplicatedFileHandle; FS_COPY_MEMORY(pDuplicatedFileStdio->openMode, pFileStdio->openMode, sizeof(pFileStdio->openMode)); return FS_SUCCESS; } typedef struct fs_iterator_stdio { fs_iterator iterator; DIR* pDir; char* pFullFilePath; /* Points to the end of the structure. */ size_t directoryPathLen; /* The length of the directory section. */ } fs_iterator_stdio; FS_API void fs_free_iterator_stdio(fs_iterator* pIterator) { fs_iterator_stdio* pIteratorStdio = (fs_iterator_stdio*)pIterator; FS_ASSERT(pIteratorStdio != NULL); closedir(pIteratorStdio->pDir); fs_free(pIteratorStdio, fs_get_allocation_callbacks(pIterator->pFS)); } FS_API fs_iterator* fs_first_stdio(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen) { fs_iterator_stdio* pIteratorStdio; struct dirent* info; struct stat statInfo; size_t fileNameLen; FS_ASSERT(pDirectoryPath != NULL); /* Our input string isn't necessarily null terminated so we'll need to make a copy. This isn't the end of the world because we need to keep a copy of it anyway for when we need to stat the file for information like it's size. To do this we're going to allocate memory for our iterator which will include space for the directory path. Then we copy the directory path into the allocated memory and point the pFullFilePath member of the iterator to it. Then we call opendir(). Once that's done we can go to the first file and reallocate the iterator to make room for the file name portion, including the separating slash. Then we copy the file name portion over to the buffer. */ if (directoryPathLen == 0 || pDirectoryPath[0] == '\0') { directoryPathLen = 1; pDirectoryPath = "."; } /* The first step is to calculate the length of the path if we need to. */ if (directoryPathLen == (size_t)-1) { directoryPathLen = strlen(pDirectoryPath); } /* Now that we know the length of the directory we can allocate space for the iterator. The directory path will be placed at the end of the structure. */ pIteratorStdio = (fs_iterator_stdio*)fs_malloc(FS_MAX(sizeof(*pIteratorStdio) + directoryPathLen + 1, FS_STDIO_MIN_ITERATOR_ALLOCATION_SIZE), fs_get_allocation_callbacks(pFS)); /* +1 for null terminator. */ if (pIteratorStdio == NULL) { return NULL; } /* Point pFullFilePath to the end of structure to where the path is located. */ pIteratorStdio->pFullFilePath = (char*)pIteratorStdio + sizeof(*pIteratorStdio); pIteratorStdio->directoryPathLen = directoryPathLen; /* We can now copy over the directory path. This will null terminate the path which will allow us to call opendir(). */ fs_strncpy_s(pIteratorStdio->pFullFilePath, directoryPathLen + 1, pDirectoryPath, directoryPathLen); /* We can now open the directory. */ pIteratorStdio->pDir = opendir(pIteratorStdio->pFullFilePath); if (pIteratorStdio->pDir == NULL) { fs_free(pIteratorStdio, fs_get_allocation_callbacks(pFS)); return NULL; } /* We now need to get information about the first file. */ info = readdir(pIteratorStdio->pDir); if (info == NULL) { closedir(pIteratorStdio->pDir); fs_free(pIteratorStdio, fs_get_allocation_callbacks(pFS)); return NULL; } fileNameLen = strlen(info->d_name); /* Now that we have the file name we need to append it to the full file path in the iterator. To do this we need to reallocate the iterator to account for the length of the file name, including the separating slash. */ { fs_iterator_stdio* pNewIteratorStdio= (fs_iterator_stdio*)fs_realloc(pIteratorStdio, FS_MAX(sizeof(*pIteratorStdio) + directoryPathLen + 1 + fileNameLen + 1, FS_STDIO_MIN_ITERATOR_ALLOCATION_SIZE), fs_get_allocation_callbacks(pFS)); /* +1 for null terminator. */ if (pNewIteratorStdio == NULL) { closedir(pIteratorStdio->pDir); fs_free(pIteratorStdio, fs_get_allocation_callbacks(pFS)); return NULL; } pIteratorStdio = pNewIteratorStdio; } /* Memory has been allocated. Copy over the separating slash and file name. */ pIteratorStdio->pFullFilePath = (char*)pIteratorStdio + sizeof(*pIteratorStdio); pIteratorStdio->pFullFilePath[directoryPathLen] = '/'; fs_strcpy(pIteratorStdio->pFullFilePath + directoryPathLen + 1, info->d_name); /* The pFileName member of the base iterator needs to be set to the file name. */ pIteratorStdio->iterator.pName = pIteratorStdio->pFullFilePath + directoryPathLen + 1; pIteratorStdio->iterator.nameLen = fileNameLen; /* We can now get the file information. */ if (stat(pIteratorStdio->pFullFilePath, &statInfo) != 0) { closedir(pIteratorStdio->pDir); fs_free(pIteratorStdio, fs_get_allocation_callbacks(pFS)); return NULL; } pIteratorStdio->iterator.info = fs_file_info_from_stat(&statInfo); return (fs_iterator*)pIteratorStdio; } FS_API fs_iterator* fs_next_stdio(fs_iterator* pIterator) { fs_iterator_stdio* pIteratorStdio = (fs_iterator_stdio*)pIterator; struct dirent* info; struct stat statInfo; size_t fileNameLen; FS_ASSERT(pIteratorStdio != NULL); /* We need to get information about the next file. */ info = readdir(pIteratorStdio->pDir); if (info == NULL) { fs_free_iterator_stdio((fs_iterator*)pIteratorStdio); return NULL; /* The end of the directory. */ } fileNameLen = strlen(info->d_name); /* We need to reallocate the iterator to account for the new file name. */ { fs_iterator_stdio* pNewIteratorStdio = (fs_iterator_stdio*)fs_realloc(pIteratorStdio, FS_MAX(sizeof(*pIteratorStdio) + pIteratorStdio->directoryPathLen + 1 + fileNameLen + 1, FS_STDIO_MIN_ITERATOR_ALLOCATION_SIZE), fs_get_allocation_callbacks(pIterator->pFS)); /* +1 for null terminator. */ if (pNewIteratorStdio == NULL) { fs_free_iterator_stdio((fs_iterator*)pIteratorStdio); return NULL; } pIteratorStdio = pNewIteratorStdio; } /* Memory has been allocated. Copy over the file name. */ pIteratorStdio->pFullFilePath = (char*)pIteratorStdio + sizeof(*pIteratorStdio); fs_strcpy(pIteratorStdio->pFullFilePath + pIteratorStdio->directoryPathLen + 1, info->d_name); /* The pFileName member of the base iterator needs to be set to the file name. */ pIteratorStdio->iterator.pName = pIteratorStdio->pFullFilePath + pIteratorStdio->directoryPathLen + 1; pIteratorStdio->iterator.nameLen = fileNameLen; /* We can now get the file information. */ if (stat(pIteratorStdio->pFullFilePath, &statInfo) != 0) { fs_free_iterator_stdio((fs_iterator*)pIteratorStdio); return NULL; } pIteratorStdio->iterator.info = fs_file_info_from_stat(&statInfo); return (fs_iterator*)pIteratorStdio; } #endif fs_backend fs_stdio_backend = { fs_alloc_size_stdio, fs_init_stdio, fs_uninit_stdio, fs_ioctl_stdio, fs_remove_stdio, fs_rename_stdio, fs_mkdir_stdio, fs_info_stdio, fs_file_alloc_size_stdio, fs_file_open_stdio, fs_file_open_handle_stdio, fs_file_close_stdio, fs_file_read_stdio, fs_file_write_stdio, fs_file_seek_stdio, fs_file_tell_stdio, fs_file_flush_stdio, fs_file_info_stdio, fs_file_duplicate_stdio, fs_first_stdio, fs_next_stdio, fs_free_iterator_stdio }; const fs_backend* FS_STDIO = &fs_stdio_backend; #else const fs_backend* FS_STDIO = NULL; #endif /* END fs.c */ /* BEG fs_helpers.c */ FS_API fs_result fs_result_from_errno(int error) { switch (error) { case 0: return FS_SUCCESS; case ENOENT: return FS_DOES_NOT_EXIST; case EEXIST: return FS_ALREADY_EXISTS; case ENOTDIR: return FS_NOT_DIRECTORY; case ENOMEM: return FS_OUT_OF_MEMORY; case EINVAL: return FS_INVALID_ARGS; default: break; } /* Fall back to a generic error. */ return FS_ERROR; } /* END fs_helpers.c */ /* BEG fs_path.c */ FS_API fs_result fs_path_first(const char* pPath, size_t pathLen, fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_INVALID_ARGS; } FS_ZERO_OBJECT(pIterator); if (pPath == NULL || pPath[0] == '\0' || pathLen == 0) { return FS_INVALID_ARGS; } pIterator->pFullPath = pPath; pIterator->fullPathLength = pathLen; pIterator->segmentOffset = 0; pIterator->segmentLength = 0; /* We need to find the first separator, or the end of the string. */ while (pIterator->segmentLength < pathLen && pPath[pIterator->segmentLength] != '\0' && (pPath[pIterator->segmentLength] != '\\' && pPath[pIterator->segmentLength] != '/')) { pIterator->segmentLength += 1; } return FS_SUCCESS; } FS_API fs_result fs_path_last(const char* pPath, size_t pathLen, fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_INVALID_ARGS; } FS_ZERO_OBJECT(pIterator); if (pathLen == 0 || pPath == NULL || pPath[0] == '\0') { return FS_INVALID_ARGS; } if (pathLen == (size_t)-1) { pathLen = strlen(pPath); } /* Little trick here. Not *quite* as optimal as it could be, but just go to the end of the string, and then go to the previous segment. */ pIterator->pFullPath = pPath; pIterator->fullPathLength = pathLen; pIterator->segmentOffset = pathLen; pIterator->segmentLength = 0; /* We need to find the last separator, or the beginning of the string. */ while (pIterator->segmentLength < pathLen && pPath[pIterator->segmentOffset - 1] != '\0' && (pPath[pIterator->segmentOffset - 1] != '\\' && pPath[pIterator->segmentOffset - 1] != '/')) { pIterator->segmentOffset -= 1; pIterator->segmentLength += 1; } return FS_SUCCESS; } FS_API fs_result fs_path_next(fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_INVALID_ARGS; } FS_ASSERT(pIterator->pFullPath != NULL); /* Move the offset to the end of the previous segment and reset the length. */ pIterator->segmentOffset = pIterator->segmentOffset + pIterator->segmentLength; pIterator->segmentLength = 0; /* If we're at the end of the string, we're done. */ if (pIterator->segmentOffset >= pIterator->fullPathLength || pIterator->pFullPath[pIterator->segmentOffset] == '\0') { return FS_AT_END; } /* At this point we should be sitting on a separator. The next character starts the next segment. */ pIterator->segmentOffset += 1; /* Now we need to find the next separator or the end of the path. This will be the end of the segment. */ for (;;) { if (pIterator->segmentOffset + pIterator->segmentLength >= pIterator->fullPathLength || pIterator->pFullPath[pIterator->segmentOffset + pIterator->segmentLength] == '\0') { break; /* Reached the end of the path. */ } if (pIterator->pFullPath[pIterator->segmentOffset + pIterator->segmentLength] == '\\' || pIterator->pFullPath[pIterator->segmentOffset + pIterator->segmentLength] == '/') { break; /* Found a separator. This marks the end of the next segment. */ } pIterator->segmentLength += 1; } return FS_SUCCESS; } FS_API fs_result fs_path_prev(fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_INVALID_ARGS; } FS_ASSERT(pIterator->pFullPath != NULL); if (pIterator->segmentOffset == 0) { return FS_AT_END; /* If we're already at the start it must mean we're finished iterating. */ } pIterator->segmentLength = 0; /* The start of the segment of the current iterator should be sitting just before a separator. We need to move backwards one step. This will become the end of the segment we'll be returning. */ pIterator->segmentOffset = pIterator->segmentOffset - 1; pIterator->segmentLength = 0; /* Just keep scanning backwards until we find a separator or the start of the path. */ for (;;) { if (pIterator->segmentOffset == 0) { break; } if (pIterator->pFullPath[pIterator->segmentOffset - 1] == '\\' || pIterator->pFullPath[pIterator->segmentOffset - 1] == '/') { break; } pIterator->segmentOffset -= 1; pIterator->segmentLength += 1; } return FS_SUCCESS; } FS_API fs_bool32 fs_path_is_first(const fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_FALSE; } return pIterator->segmentOffset == 0; } FS_API fs_bool32 fs_path_is_last(const fs_path_iterator* pIterator) { if (pIterator == NULL) { return FS_FALSE; } if (pIterator->fullPathLength == FS_NULL_TERMINATED) { return pIterator->pFullPath[pIterator->segmentOffset + pIterator->segmentLength] == '\0'; } else { return pIterator->segmentOffset + pIterator->segmentLength == pIterator->fullPathLength; } } FS_API int fs_path_iterators_compare(const fs_path_iterator* pIteratorA, const fs_path_iterator* pIteratorB) { FS_ASSERT(pIteratorA != NULL); FS_ASSERT(pIteratorB != NULL); if (pIteratorA->pFullPath == pIteratorB->pFullPath && pIteratorA->segmentOffset == pIteratorB->segmentOffset && pIteratorA->segmentLength == pIteratorB->segmentLength) { return 0; } return fs_strncmp(pIteratorA->pFullPath + pIteratorA->segmentOffset, pIteratorB->pFullPath + pIteratorB->segmentOffset, FS_MIN(pIteratorA->segmentLength, pIteratorB->segmentLength)); } FS_API const char* fs_path_file_name(const char* pPath, size_t pathLen) { /* The file name is just the last segment. */ fs_result result; fs_path_iterator last; result = fs_path_last(pPath, pathLen, &last); if (result != FS_SUCCESS) { return NULL; } if (last.segmentLength == 0) { return NULL; } return last.pFullPath + last.segmentOffset; } FS_API int fs_path_directory(char* pDst, size_t dstCap, const char* pPath, size_t pathLen) { const char* pFileName; pFileName = fs_path_file_name(pPath, pathLen); if (pFileName == NULL) { return -1; } if (pFileName == pPath) { if (pDst != NULL && dstCap > 0) { pDst[0] = '\0'; } return 0; /* The path is just a file name. */ } else { const char* pDirEnd = pFileName - 1; size_t dirLen = (size_t)(pDirEnd - pPath); if (pDst != NULL && dstCap > 0) { size_t bytesToCopy = FS_MIN(dstCap - 1, dirLen); if (bytesToCopy > 0) { FS_COPY_MEMORY(pDst, pPath, bytesToCopy); } pDst[bytesToCopy] = '\0'; } if (dirLen > (size_t)-1) { return -1; /* Too long. */ } return (int)dirLen; } } FS_API const char* fs_path_extension(const char* pPath, size_t pathLen) { const char* pDot = NULL; const char* pLastSlash = NULL; size_t i; if (pPath == NULL) { return NULL; } /* We need to find the last dot after the last slash. */ for (i = 0; i < pathLen; ++i) { if (pPath[i] == '\0') { break; } if (pPath[i] == '.') { pDot = pPath + i; } else if (pPath[i] == '\\' || pPath[i] == '/') { pLastSlash = pPath + i; } } /* If the last dot is after the last slash, we've found it. Otherwise, it's not there and we need to return null. */ if (pDot != NULL && pDot > pLastSlash) { return pDot + 1; } else { return NULL; } } FS_API fs_bool32 fs_path_extension_equal(const char* pPath, size_t pathLen, const char* pExtension, size_t extensionLen) { if (pPath == NULL || pExtension == NULL) { return FS_FALSE; } if (extensionLen == FS_NULL_TERMINATED) { extensionLen = strlen(pExtension); } if (pathLen == FS_NULL_TERMINATED) { pathLen = strlen(pPath); } if (extensionLen >= pathLen) { return FS_FALSE; } if (pPath[pathLen - extensionLen - 1] != '.') { return FS_FALSE; } return fs_strnicmp(pPath + pathLen - extensionLen, pExtension, extensionLen) == 0; } FS_API const char* fs_path_trim_base(const char* pPath, size_t pathLen, const char* pBasePath, size_t basePathLen) { fs_path_iterator iPath; fs_path_iterator iBase; fs_result result; if (basePathLen != FS_NULL_TERMINATED && pathLen < basePathLen) { return NULL; } if (basePathLen == 0 || pBasePath == NULL || pBasePath[0] == '\0') { return pPath; } result = fs_path_first(pPath, pathLen, &iPath); if (result != FS_SUCCESS) { return NULL; } result = fs_path_first(pBasePath, basePathLen, &iBase); if (result != FS_SUCCESS) { return NULL; } /* We just keep iterating until we find a mismatch or reach the end of the base path. */ for (;;) { if (iPath.segmentLength != iBase.segmentLength) { return NULL; } if (fs_strncmp(iPath.pFullPath + iPath.segmentOffset, iBase.pFullPath + iBase.segmentOffset, iPath.segmentLength) != 0) { return NULL; } result = fs_path_next(&iBase); if (result != FS_SUCCESS) { fs_path_next(&iPath); /* Move to the next segment in the path to ensure our iterators are in sync. */ break; } result = fs_path_next(&iPath); if (result != FS_SUCCESS) { return NULL; /* If we hit this it means the we've reached the end of the path before the base and therefore we don't match. */ } } /* Getting here means we got to the end of the base path without finding a mismatched segment which means the path begins with the base. */ return iPath.pFullPath + iPath.segmentOffset; } FS_API int fs_path_append(char* pDst, size_t dstCap, const char* pBasePath, size_t basePathLen, const char* pPathToAppend, size_t pathToAppendLen) { size_t dstLen = 0; if (pBasePath == NULL) { pBasePath = ""; basePathLen = 0; } if (pPathToAppend == NULL) { pPathToAppend = ""; pathToAppendLen = 0; } if (basePathLen == FS_NULL_TERMINATED) { basePathLen = strlen(pBasePath); } if (pathToAppendLen == FS_NULL_TERMINATED) { pathToAppendLen = strlen(pPathToAppend); } /* Do not include the separator if we have one. */ if (basePathLen > 0 && (pBasePath[basePathLen - 1] == '\\' || pBasePath[basePathLen - 1] == '/')) { basePathLen -= 1; } /* We don't want to be appending a separator if the base path is empty. Otherwise we'll end up with a leading slash. */ if (basePathLen > 0) { /* Base path. */ if (pDst != NULL) { size_t bytesToCopy = FS_MIN(basePathLen, dstCap); if (bytesToCopy > 0) { if (bytesToCopy == dstCap) { bytesToCopy -= 1; /* Need to leave room for the null terminator. */ } /* Don't move the base path if we're appending in-place. */ if (pDst != pBasePath) { FS_COPY_MEMORY(pDst, pBasePath, FS_MIN(basePathLen, dstCap)); } } pDst += bytesToCopy; dstCap -= bytesToCopy; } dstLen += basePathLen; /* Separator. */ if (pDst != NULL) { if (dstCap > 1) { /* Need to leave room for the separator. */ pDst[0] = '/'; pDst += 1; dstCap -= 1; } } dstLen += 1; } /* Path to append. */ if (pDst != NULL) { size_t bytesToCopy = FS_MIN(pathToAppendLen, dstCap); if (bytesToCopy > 0) { if (bytesToCopy == dstCap) { bytesToCopy -= 1; /* Need to leave room for the null terminator. */ } FS_COPY_MEMORY(pDst, pPathToAppend, bytesToCopy); pDst[bytesToCopy] = '\0'; } } dstLen += pathToAppendLen; if (dstLen > 0x7FFFFFFF) { return -1; /* Path is too long to convert to an int. */ } return (int)dstLen; } FS_API int fs_path_normalize(char* pDst, size_t dstCap, const char* pPath, size_t pathLen, unsigned int options) { fs_path_iterator iPath; fs_result result; fs_bool32 allowLeadingBackNav = FS_TRUE; fs_path_iterator stack[256]; /* The size of this array controls the maximum number of components supported by this function. We're not doing any heap allocations here. Might add this later if necessary. */ int top = 0; /* Acts as a counter for the number of valid items in the stack. */ int leadingBackNavCount = 0; int dstLen = 0; if (pPath == NULL) { pPath = ""; pathLen = 0; } if (pDst != NULL && dstCap > 0) { pDst[0] = '\0'; } /* Get rid of the empty case just to make our life easier below. */ if (pathLen == 0 || pPath[0] == '\0') { return 0; } result = fs_path_first(pPath, pathLen, &iPath); if (result != FS_SUCCESS) { return -1; /* Should never hit this because we did an empty string test above. */ } /* We have a special case for when the result starts with "/". */ if (iPath.segmentLength == 0) { allowLeadingBackNav = FS_FALSE; /* When the path starts with "/" we cannot allow a leading ".." in the output path. */ if (pDst != NULL && dstCap > 0) { pDst[0] = '/'; pDst += 1; dstCap -= 1; } dstLen += 1; /* Get past the root. */ result = fs_path_next(&iPath); if (result != FS_SUCCESS) { return dstLen; } } if ((options & FS_NO_ABOVE_ROOT_NAVIGATION) != 0) { allowLeadingBackNav = FS_FALSE; } for (;;) { /* Everything in this control block should goto a section below or abort early. */ { if (iPath.segmentLength == 0 || (iPath.segmentLength == 1 && iPath.pFullPath[iPath.segmentOffset] == '.')) { /* It's either an empty segment or ".". These are ignored. */ goto next_segment; } else if (iPath.segmentLength == 2 && iPath.pFullPath[iPath.segmentOffset] == '.' && iPath.pFullPath[iPath.segmentOffset + 1] == '.') { /* It's a ".." segment. We need to either pop an entry from the stack, or if there is no way to go further back, push the "..". */ if (top > leadingBackNavCount) { top -= 1; goto next_segment; } else { /* In this case the path is trying to navigate above the root. This is not always allowed. */ if (!allowLeadingBackNav) { return -1; } leadingBackNavCount += 1; goto push_segment; } } else { /* It's a regular segment. These always need to be pushed onto the stack. */ goto push_segment; } } push_segment: if (top < (int)FS_COUNTOF(stack)) { stack[top] = iPath; top += 1; } else { return -1; /* Ran out of room in "stack". */ } next_segment: result = fs_path_next(&iPath); if (result != FS_SUCCESS) { break; } } /* At this point we should have a stack of items. Now we can construct the output path. */ { int i = 0; for (i = 0; i < top; i += 1) { size_t segLen = stack[i].segmentLength; if (pDst != NULL && dstCap > segLen) { FS_COPY_MEMORY(pDst, stack[i].pFullPath + stack[i].segmentOffset, segLen); pDst += segLen; dstCap -= segLen; } dstLen += (int)segLen; /* Separator. */ if (i + 1 < top) { if (pDst != NULL && dstCap > 0) { pDst[0] = '/'; pDst += 1; dstCap -= 1; } dstLen += 1; } } } /* Null terminate. */ if (pDst != NULL && dstCap > 0) { pDst[0] = '\0'; } return dstLen; } /* END fs_path.c */ /* BEG fs_memory_stream.c */ static fs_result fs_memory_stream_read_internal(fs_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead) { return fs_memory_stream_read((fs_memory_stream*)pStream, pDst, bytesToRead, pBytesRead); } static fs_result fs_memory_stream_write_internal(fs_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { return fs_memory_stream_write((fs_memory_stream*)pStream, pSrc, bytesToWrite, pBytesWritten); } static fs_result fs_memory_stream_seek_internal(fs_stream* pStream, fs_int64 offset, fs_seek_origin origin) { return fs_memory_stream_seek((fs_memory_stream*)pStream, offset, origin); } static fs_result fs_memory_stream_tell_internal(fs_stream* pStream, fs_int64* pCursor) { fs_result result; size_t cursor; result = fs_memory_stream_tell((fs_memory_stream*)pStream, &cursor); if (result != FS_SUCCESS) { return result; } if (cursor > FS_INT64_MAX) { /* <-- INT64_MAX may not be defined on some compilers. Need to check this. Can easily define this ourselves. */ return FS_ERROR; } *pCursor = (fs_int64)cursor; return FS_SUCCESS; } static size_t fs_memory_stream_duplicate_alloc_size_internal(fs_stream* pStream) { (void)pStream; return sizeof(fs_memory_stream); } static fs_result fs_memory_stream_duplicate_internal(fs_stream* pStream, fs_stream* pDuplicatedStream) { fs_memory_stream* pMemoryStream; pMemoryStream = (fs_memory_stream*)pStream; FS_ASSERT(pMemoryStream != NULL); *pDuplicatedStream = *pStream; /* Slightly special handling for write mode. Need to make a copy of the output buffer. */ if (pMemoryStream->write.pData != NULL) { void* pNewData = fs_malloc(pMemoryStream->write.dataCap, &pMemoryStream->allocationCallbacks); if (pNewData == NULL) { return FS_OUT_OF_MEMORY; } FS_COPY_MEMORY(pNewData, pMemoryStream->write.pData, pMemoryStream->write.dataSize); pMemoryStream->write.pData = pNewData; pMemoryStream->ppData = &pMemoryStream->write.pData; pMemoryStream->pDataSize = &pMemoryStream->write.dataSize; } else { pMemoryStream->ppData = (void**)&pMemoryStream->readonly.pData; pMemoryStream->pDataSize = &pMemoryStream->readonly.dataSize; } return FS_SUCCESS; } static void fs_memory_stream_uninit_internal(fs_stream* pStream) { fs_memory_stream_uninit((fs_memory_stream*)pStream); } static fs_stream_vtable fs_gStreamVTableMemory = { fs_memory_stream_read_internal, fs_memory_stream_write_internal, fs_memory_stream_seek_internal, fs_memory_stream_tell_internal, fs_memory_stream_duplicate_alloc_size_internal, fs_memory_stream_duplicate_internal, fs_memory_stream_uninit_internal }; FS_API fs_result fs_memory_stream_init_write(const fs_allocation_callbacks* pAllocationCallbacks, fs_memory_stream* pStream) { fs_result result; if (pStream == NULL) { return FS_INVALID_ARGS; } FS_ZERO_OBJECT(pStream); result = fs_stream_init(&fs_gStreamVTableMemory, &pStream->base); if (result != FS_SUCCESS) { return result; } pStream->write.pData = NULL; pStream->write.dataSize = 0; pStream->write.dataCap = 0; pStream->allocationCallbacks = fs_allocation_callbacks_init_copy(pAllocationCallbacks); pStream->ppData = &pStream->write.pData; pStream->pDataSize = &pStream->write.dataSize; return FS_SUCCESS; } FS_API fs_result fs_memory_stream_init_readonly(const void* pData, size_t dataSize, fs_memory_stream* pStream) { fs_result result; if (pStream == NULL) { return FS_INVALID_ARGS; } FS_ZERO_OBJECT(pStream); if (pData == NULL) { return FS_INVALID_ARGS; } result = fs_stream_init(&fs_gStreamVTableMemory, &pStream->base); if (result != FS_SUCCESS) { return result; } pStream->readonly.pData = pData; pStream->readonly.dataSize = dataSize; pStream->ppData = (void**)&pStream->readonly.pData; pStream->pDataSize = &pStream->readonly.dataSize; return FS_SUCCESS; } FS_API void fs_memory_stream_uninit(fs_memory_stream* pStream) { if (pStream == NULL) { return; } if (pStream->write.pData != NULL) { fs_free(pStream->write.pData, &pStream->allocationCallbacks); } } FS_API fs_result fs_memory_stream_read(fs_memory_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead) { size_t bytesAvailable; size_t bytesRead; if (pBytesRead != NULL) { *pBytesRead = 0; } if (pStream == NULL) { return FS_INVALID_ARGS; } FS_ASSERT(pStream->cursor <= *pStream->pDataSize); /* If this is triggered it means there a bug in the stream reader. The cursor has gone beyong the end of the buffer. */ bytesAvailable = *pStream->pDataSize - pStream->cursor; if (bytesAvailable == 0) { return FS_AT_END; /* Must return FS_AT_END if we're sitting at the end of the file, even when bytesToRead is 0. */ } bytesRead = FS_MIN(bytesAvailable, bytesToRead); /* The destination can be null in which case this acts as a seek. */ if (pDst != NULL) { FS_COPY_MEMORY(pDst, FS_OFFSET_PTR(*pStream->ppData, pStream->cursor), bytesRead); } pStream->cursor += bytesRead; if (pBytesRead != NULL) { *pBytesRead = bytesRead; } return FS_SUCCESS; } FS_API fs_result fs_memory_stream_write(fs_memory_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten) { size_t newSize; if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (pStream == NULL || pSrc == NULL) { return FS_INVALID_ARGS; } /* Cannot write in read-only mode. */ if (pStream->readonly.pData != NULL) { return FS_INVALID_OPERATION; } newSize = *pStream->pDataSize + bytesToWrite; if (newSize > pStream->write.dataCap) { /* Need to resize. */ void* pNewBuffer; size_t newCap; newCap = FS_MAX(newSize, pStream->write.dataCap * 2); pNewBuffer = fs_realloc(*pStream->ppData, newCap, &pStream->allocationCallbacks); if (pNewBuffer == NULL) { return FS_OUT_OF_MEMORY; } *pStream->ppData = pNewBuffer; pStream->write.dataCap = newCap; } FS_ASSERT(newSize <= pStream->write.dataCap); FS_COPY_MEMORY(FS_OFFSET_PTR(*pStream->ppData, *pStream->pDataSize), pSrc, bytesToWrite); *pStream->pDataSize = newSize; if (pBytesWritten != NULL) { *pBytesWritten = bytesToWrite; /* We always write all or nothing here. */ } return FS_SUCCESS; } FS_API fs_result fs_memory_stream_seek(fs_memory_stream* pStream, fs_int64 offset, int origin) { if (pStream == NULL) { return FS_INVALID_ARGS; } if ((fs_uint64)FS_ABS(offset) > FS_SIZE_MAX) { return FS_INVALID_ARGS; /* Trying to seek too far. This will never happen on 64-bit builds. */ } /* The seek binary - it works or it doesn't. There's no clamping to the end or anything like that. The seek point is either valid or invalid. */ if (origin == FS_SEEK_CUR) { if (offset > 0) { /* Moving forward. */ size_t bytesRemaining = *pStream->pDataSize - pStream->cursor; if (bytesRemaining < (size_t)offset) { return FS_BAD_SEEK; /* Trying to seek beyond the end of the buffer. */ } pStream->cursor += (size_t)offset; } else { /* Moving backwards. */ size_t absoluteOffset = (size_t)FS_ABS(offset); /* Safe cast because it was checked above. */ if (absoluteOffset > pStream->cursor) { return FS_BAD_SEEK; /* Trying to seek prior to the start of the buffer. */ } pStream->cursor -= absoluteOffset; } } else if (origin == FS_SEEK_SET) { if (offset < 0) { return FS_BAD_SEEK; /* Trying to seek prior to the start of the buffer.. */ } if ((size_t)offset > *pStream->pDataSize) { return FS_BAD_SEEK; } pStream->cursor = (size_t)offset; } else if (origin == FS_SEEK_END) { if (offset > 0) { return FS_BAD_SEEK; /* Trying to seek beyond the end of the buffer. */ } if ((size_t)FS_ABS(offset) > *pStream->pDataSize) { return FS_BAD_SEEK; } pStream->cursor = *pStream->pDataSize - (size_t)FS_ABS(offset); } else { return FS_INVALID_ARGS; } return FS_SUCCESS; } FS_API fs_result fs_memory_stream_tell(fs_memory_stream* pStream, size_t* pCursor) { if (pCursor == NULL) { return FS_INVALID_ARGS; } *pCursor = 0; if (pStream == NULL) { return FS_INVALID_ARGS; } *pCursor = pStream->cursor; return FS_SUCCESS; } FS_API fs_result fs_memory_stream_remove(fs_memory_stream* pStream, size_t offset, size_t size) { void* pDst; void* pSrc; size_t tailSize; if (pStream == NULL) { return FS_INVALID_ARGS; } if ((offset + size) > *pStream->pDataSize) { return FS_INVALID_ARGS; } /* The cursor needs to be moved. */ if (pStream->cursor > offset) { if (pStream->cursor >= (offset + size)) { pStream->cursor -= size; } else { pStream->cursor = offset; } } pDst = FS_OFFSET_PTR(*pStream->ppData, offset); pSrc = FS_OFFSET_PTR(*pStream->ppData, offset + size); tailSize = *pStream->pDataSize - (offset + size); FS_MOVE_MEMORY(pDst, pSrc, tailSize); *pStream->pDataSize -= size; return FS_SUCCESS; } FS_API fs_result fs_memory_stream_truncate(fs_memory_stream* pStream) { if (pStream == NULL) { return FS_INVALID_ARGS; } return fs_memory_stream_remove(pStream, pStream->cursor, (*pStream->pDataSize - pStream->cursor)); } FS_API void* fs_memory_stream_take_ownership(fs_memory_stream* pStream, size_t* pSize) { void* pData; if (pStream == NULL) { return NULL; } pData = *pStream->ppData; if (pSize != NULL) { *pSize = *pStream->pDataSize; } pStream->write.pData = NULL; pStream->write.dataSize = 0; pStream->write.dataCap = 0; return pData; } /* END fs_memory_stream.c */ /* BEG fs_utils.c */ static FS_INLINE void fs_swap(void* a, void* b, size_t sz) { char* _a = (char*)a; char* _b = (char*)b; while (sz > 0) { char temp = *_a; *_a++ = *_b; *_b++ = temp; sz -= 1; } } FS_API void fs_sort(void* pBase, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData) { /* Simple insert sort for now. Will improve on this later. */ size_t i; size_t j; for (i = 1; i < count; i += 1) { for (j = i; j > 0; j -= 1) { void* pA = (char*)pBase + (j - 1) * stride; void* pB = (char*)pBase + j * stride; if (compareProc(pUserData, pA, pB) <= 0) { break; } fs_swap(pA, pB, stride); } } } FS_API void* fs_binary_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData) { size_t iStart; size_t iEnd; size_t iMid; if (count == 0) { return NULL; } iStart = 0; iEnd = count - 1; while (iStart <= iEnd) { int compareResult; iMid = iStart + (iEnd - iStart) / 2; compareResult = compareProc(pUserData, pKey, (char*)pList + (iMid * stride)); if (compareResult < 0) { iEnd = iMid - 1; } else if (compareResult > 0) { iStart = iMid + 1; } else { return (void*)((char*)pList + (iMid * stride)); } } return NULL; } FS_API void* fs_linear_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData) { size_t i; for (i = 0; i < count; i+= 1) { int compareResult = compareProc(pUserData, pKey, (char*)pList + (i * stride)); if (compareResult == 0) { return (void*)((char*)pList + (i * stride)); } } return NULL; } FS_API void* fs_sorted_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData) { const size_t threshold = 10; if (count < threshold) { return fs_linear_search(pKey, pList, count, stride, compareProc, pUserData); } else { return fs_binary_search(pKey, pList, count, stride, compareProc, pUserData); } } /* END fs_utils.c */ /* ==== Amalgamations Below ==== */ /* BEG fs_snprintf.c */ typedef char* fs_sprintf_callback(const char* buf, void* user, size_t len); /* Disabling unaligned access for safety. TODO: Look at a way to make this configurable. Will require reversing the logic in stb_sprintf() which we might be able to do via the amalgamator. */ #ifndef FS_SPRINTF_NOUNALIGNED #define FS_SPRINTF_NOUNALIGNED #endif /* We need to disable the implicit-fallthrough warning on GCC. */ #if defined(__GNUC__) && (__GNUC__ >= 7 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif /* BEG stb_sprintf.c */ #if defined(__clang__) #if defined(__has_feature) && defined(__has_attribute) #if __has_feature(address_sanitizer) #if __has_attribute(__no_sanitize__) #define FS_ASAN __attribute__((__no_sanitize__("address"))) #elif __has_attribute(__no_sanitize_address__) #define FS_ASAN __attribute__((__no_sanitize_address__)) #elif __has_attribute(__no_address_safety_analysis__) #define FS_ASAN __attribute__((__no_address_safety_analysis__)) #endif #endif #endif #elif defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #if defined(__SANITIZE_ADDRESS__) && __SANITIZE_ADDRESS__ #define FS_ASAN __attribute__((__no_sanitize_address__)) #endif #elif defined(_MSC_VER) #if defined(__SANITIZE_ADDRESS__) && __SANITIZE_ADDRESS__ #define FS_ASAN __declspec(no_sanitize_address) #endif #endif #ifndef FS_ASAN #define FS_ASAN #endif #ifndef FS_API_SPRINTF_DEF #define FS_API_SPRINTF_DEF FS_API FS_ASAN #endif #ifndef FS_SPRINTF_MIN #define FS_SPRINTF_MIN 512 #endif #ifndef FS_SPRINTF_MSVC_MODE #if defined(_MSC_VER) && (_MSC_VER < 1900) #define FS_SPRINTF_MSVC_MODE #endif #endif #ifdef FS_SPRINTF_NOUNALIGNED #define FS_UNALIGNED(code) #else #define FS_UNALIGNED(code) code #endif #ifndef FS_SPRINTF_NOFLOAT static fs_int32 fs_real_to_str(char const* *start, fs_uint32 *len, char* out, fs_int32 *decimal_pos, double value, fs_uint32 frac_digits); static fs_int32 fs_real_to_parts(fs_int64 *bits, fs_int32 *expo, double value); #define FS_SPECIAL 0x7000 #endif static char fs_period = '.'; static char fs_comma = ','; static struct { short temp; char pair[201]; } fs_digitpair = { 0, "00010203040506070809101112131415161718192021222324" "25262728293031323334353637383940414243444546474849" "50515253545556575859606162636465666768697071727374" "75767778798081828384858687888990919293949596979899" }; FS_API_SPRINTF_DEF void fs_set_sprintf_separators(char pcomma, char pperiod) { fs_period = pperiod; fs_comma = pcomma; } #define FS_LEFTJUST 1 #define FS_LEADINGPLUS 2 #define FS_LEADINGSPACE 4 #define FS_LEADING_0X 8 #define FS_LEADINGZERO 16 #define FS_INTMAX 32 #define FS_TRIPLET_COMMA 64 #define FS_NEGATIVE 128 #define FS_METRIC_SUFFIX 256 #define FS_HALFWIDTH 512 #define FS_METRIC_NOSPACE 1024 #define FS_METRIC_1024 2048 #define FS_METRIC_JEDEC 4096 static void fs_lead_sign(fs_uint32 fl, char* sign) { sign[0] = 0; if (fl & FS_NEGATIVE) { sign[0] = 1; sign[1] = '-'; } else if (fl & FS_LEADINGSPACE) { sign[0] = 1; sign[1] = ' '; } else if (fl & FS_LEADINGPLUS) { sign[0] = 1; sign[1] = '+'; } } static FS_ASAN fs_uint32 fs_strlen_limited(char const* s, fs_uint32 limit) { char const* sn = s; for (;;) { if (((fs_uintptr)sn & 3) == 0) break; if (!limit || *sn == 0) return (fs_uint32)(sn - s); ++sn; --limit; } while (limit >= 4) { fs_uint32 v = *(fs_uint32 *)sn; if ((v - 0x01010101) & (~v) & 0x80808080UL) break; sn += 4; limit -= 4; } while (limit && *sn) { ++sn; --limit; } return (fs_uint32)(sn - s); } FS_API_SPRINTF_DEF int fs_vsprintfcb(fs_sprintf_callback* callback, void* user, char* buf, char const* fmt, va_list va) { static char hex[] = "0123456789abcdefxp"; static char hexu[] = "0123456789ABCDEFXP"; char* bf; char const* f; int tlen = 0; bf = buf; f = fmt; for (;;) { fs_int32 fw, pr, tz; fs_uint32 fl; #define fs_chk_cb_bufL(bytes) \ { \ int len = (int)(bf - buf); \ if ((len + (bytes)) >= FS_SPRINTF_MIN) { \ tlen += len; \ if (0 == (bf = buf = callback(buf, user, len))) \ goto done; \ } \ } #define fs_chk_cb_buf(bytes) \ { \ if (callback) { \ fs_chk_cb_bufL(bytes); \ } \ } #define fs_flush_cb() \ { \ fs_chk_cb_bufL(FS_SPRINTF_MIN - 1); \ } #define fs_cb_buf_clamp(cl, v) \ cl = v; \ if (callback) { \ int lg = FS_SPRINTF_MIN - (int)(bf - buf); \ if (cl > lg) \ cl = lg; \ } for (;;) { while (((fs_uintptr)f) & 3) { schk1: if (f[0] == '%') goto scandd; schk2: if (f[0] == 0) goto endfmt; fs_chk_cb_buf(1); *bf++ = f[0]; ++f; } for (;;) { fs_uint32 v, c; v = *(fs_uint32 *)f; c = (~v) & 0x80808080; if (((v ^ 0x25252525) - 0x01010101) & c) goto schk1; if ((v - 0x01010101) & c) goto schk2; if (callback) if ((FS_SPRINTF_MIN - (int)(bf - buf)) < 4) goto schk1; #ifdef FS_SPRINTF_NOUNALIGNED if(((fs_uintptr)bf) & 3) { bf[0] = f[0]; bf[1] = f[1]; bf[2] = f[2]; bf[3] = f[3]; } else #endif { *(fs_uint32 *)bf = v; } bf += 4; f += 4; } } scandd: ++f; fw = 0; pr = -1; fl = 0; tz = 0; for (;;) { switch (f[0]) { case '-': fl |= FS_LEFTJUST; ++f; continue; case '+': fl |= FS_LEADINGPLUS; ++f; continue; case ' ': fl |= FS_LEADINGSPACE; ++f; continue; case '#': fl |= FS_LEADING_0X; ++f; continue; case '\'': fl |= FS_TRIPLET_COMMA; ++f; continue; case '$': if (fl & FS_METRIC_SUFFIX) { if (fl & FS_METRIC_1024) { fl |= FS_METRIC_JEDEC; } else { fl |= FS_METRIC_1024; } } else { fl |= FS_METRIC_SUFFIX; } ++f; continue; case '_': fl |= FS_METRIC_NOSPACE; ++f; continue; case '0': fl |= FS_LEADINGZERO; ++f; goto flags_done; default: goto flags_done; } } flags_done: if (f[0] == '*') { fw = va_arg(va, fs_uint32); ++f; } else { while ((f[0] >= '0') && (f[0] <= '9')) { fw = fw * 10 + f[0] - '0'; f++; } } if (f[0] == '.') { ++f; if (f[0] == '*') { pr = va_arg(va, fs_uint32); ++f; } else { pr = 0; while ((f[0] >= '0') && (f[0] <= '9')) { pr = pr * 10 + f[0] - '0'; f++; } } } switch (f[0]) { case 'h': fl |= FS_HALFWIDTH; ++f; if (f[0] == 'h') ++f; break; case 'l': fl |= ((sizeof(long) == 8) ? FS_INTMAX : 0); ++f; if (f[0] == 'l') { fl |= FS_INTMAX; ++f; } break; case 'j': fl |= (sizeof(size_t) == 8) ? FS_INTMAX : 0; ++f; break; case 'z': fl |= (sizeof(ptrdiff_t) == 8) ? FS_INTMAX : 0; ++f; break; case 't': fl |= (sizeof(ptrdiff_t) == 8) ? FS_INTMAX : 0; ++f; break; case 'I': if ((f[1] == '6') && (f[2] == '4')) { fl |= FS_INTMAX; f += 3; } else if ((f[1] == '3') && (f[2] == '2')) { f += 3; } else { fl |= ((sizeof(void* ) == 8) ? FS_INTMAX : 0); ++f; } break; default: break; } switch (f[0]) { #define FS_NUMSZ 512 char num[FS_NUMSZ]; char lead[8]; char tail[8]; char* s; char const* h; fs_uint32 l, n, cs; fs_uint64 n64; #ifndef FS_SPRINTF_NOFLOAT double fv; #endif fs_int32 dp; char const* sn; case 's': s = va_arg(va, char* ); if (s == 0) s = (char* )"null"; l = fs_strlen_limited(s, (pr >= 0) ? (fs_uint32)pr : ~0u); lead[0] = 0; tail[0] = 0; pr = 0; dp = 0; cs = 0; goto scopy; case 'c': s = num + FS_NUMSZ - 1; *s = (char)va_arg(va, int); l = 1; lead[0] = 0; tail[0] = 0; pr = 0; dp = 0; cs = 0; goto scopy; case 'n': { int *d = va_arg(va, int *); *d = tlen + (int)(bf - buf); } break; #ifdef FS_SPRINTF_NOFLOAT case 'A': case 'a': case 'G': case 'g': case 'E': case 'e': case 'f': va_arg(va, double); s = (char* )"No float"; l = 8; lead[0] = 0; tail[0] = 0; pr = 0; cs = 0; FS_UNUSED(dp); goto scopy; #else case 'A': case 'a': h = (f[0] == 'A') ? hexu : hex; fv = va_arg(va, double); if (pr == -1) pr = 6; if (fs_real_to_parts((fs_int64 *)&n64, &dp, fv)) fl |= FS_NEGATIVE; s = num + 64; fs_lead_sign(fl, lead); if (dp == -1023) dp = (n64) ? -1022 : 0; else n64 |= (((fs_uint64)1) << 52); n64 <<= (64 - 56); if (pr < 15) n64 += ((((fs_uint64)8) << 56) >> (pr * 4)); #ifdef FS_SPRINTF_MSVC_MODE *s++ = '0'; *s++ = 'x'; #else lead[1 + lead[0]] = '0'; lead[2 + lead[0]] = 'x'; lead[0] += 2; #endif *s++ = h[(n64 >> 60) & 15]; n64 <<= 4; if (pr) *s++ = fs_period; sn = s; n = pr; if (n > 13) n = 13; if (pr > (fs_int32)n) tz = pr - n; pr = 0; while (n--) { *s++ = h[(n64 >> 60) & 15]; n64 <<= 4; } tail[1] = h[17]; if (dp < 0) { tail[2] = '-'; dp = -dp; } else tail[2] = '+'; n = (dp >= 1000) ? 6 : ((dp >= 100) ? 5 : ((dp >= 10) ? 4 : 3)); tail[0] = (char)n; for (;;) { tail[n] = '0' + dp % 10; if (n <= 3) break; --n; dp /= 10; } dp = (int)(s - sn); l = (int)(s - (num + 64)); s = num + 64; cs = 1 + (3 << 24); goto scopy; case 'G': case 'g': h = (f[0] == 'G') ? hexu : hex; fv = va_arg(va, double); if (pr == -1) pr = 6; else if (pr == 0) pr = 1; if (fs_real_to_str(&sn, &l, num, &dp, fv, (pr - 1) | 0x80000000)) fl |= FS_NEGATIVE; n = pr; if (l > (fs_uint32)pr) l = pr; while ((l > 1) && (pr) && (sn[l - 1] == '0')) { --pr; --l; } if ((dp <= -4) || (dp > (fs_int32)n)) { if (pr > (fs_int32)l) pr = l - 1; else if (pr) --pr; goto doexpfromg; } if (dp > 0) { pr = (dp < (fs_int32)l) ? l - dp : 0; } else { pr = -dp + ((pr > (fs_int32)l) ? (fs_int32) l : pr); } goto dofloatfromg; case 'E': case 'e': h = (f[0] == 'E') ? hexu : hex; fv = va_arg(va, double); if (pr == -1) pr = 6; if (fs_real_to_str(&sn, &l, num, &dp, fv, pr | 0x80000000)) fl |= FS_NEGATIVE; doexpfromg: tail[0] = 0; fs_lead_sign(fl, lead); if (dp == FS_SPECIAL) { s = (char* )sn; cs = 0; pr = 0; goto scopy; } s = num + 64; *s++ = sn[0]; if (pr) *s++ = fs_period; if ((l - 1) > (fs_uint32)pr) l = pr + 1; for (n = 1; n < l; n++) *s++ = sn[n]; tz = pr - (l - 1); pr = 0; tail[1] = h[0xe]; dp -= 1; if (dp < 0) { tail[2] = '-'; dp = -dp; } else tail[2] = '+'; #ifdef FS_SPRINTF_MSVC_MODE n = 5; #else n = (dp >= 100) ? 5 : 4; #endif tail[0] = (char)n; for (;;) { tail[n] = '0' + dp % 10; if (n <= 3) break; --n; dp /= 10; } cs = 1 + (3 << 24); goto flt_lead; case 'f': fv = va_arg(va, double); doafloat: if (fl & FS_METRIC_SUFFIX) { double divisor; divisor = 1000.0f; if (fl & FS_METRIC_1024) divisor = 1024.0; while (fl < 0x4000000) { if ((fv < divisor) && (fv > -divisor)) break; fv /= divisor; fl += 0x1000000; } } if (pr == -1) pr = 6; if (fs_real_to_str(&sn, &l, num, &dp, fv, pr)) fl |= FS_NEGATIVE; dofloatfromg: tail[0] = 0; fs_lead_sign(fl, lead); if (dp == FS_SPECIAL) { s = (char* )sn; cs = 0; pr = 0; goto scopy; } s = num + 64; if (dp <= 0) { fs_int32 i; *s++ = '0'; if (pr) *s++ = fs_period; n = -dp; if ((fs_int32)n > pr) n = pr; i = n; while (i) { if ((((fs_uintptr)s) & 3) == 0) break; *s++ = '0'; --i; } while (i >= 4) { *(fs_uint32 *)s = 0x30303030; s += 4; i -= 4; } while (i) { *s++ = '0'; --i; } if ((fs_int32)(l + n) > pr) l = pr - n; i = l; while (i) { *s++ = *sn++; --i; } tz = pr - (n + l); cs = 1 + (3 << 24); } else { cs = (fl & FS_TRIPLET_COMMA) ? ((600 - (fs_uint32)dp) % 3) : 0; if ((fs_uint32)dp >= l) { n = 0; for (;;) { if ((fl & FS_TRIPLET_COMMA) && (++cs == 4)) { cs = 0; *s++ = fs_comma; } else { *s++ = sn[n]; ++n; if (n >= l) break; } } if (n < (fs_uint32)dp) { n = dp - n; if ((fl & FS_TRIPLET_COMMA) == 0) { while (n) { if ((((fs_uintptr)s) & 3) == 0) break; *s++ = '0'; --n; } while (n >= 4) { *(fs_uint32 *)s = 0x30303030; s += 4; n -= 4; } } while (n) { if ((fl & FS_TRIPLET_COMMA) && (++cs == 4)) { cs = 0; *s++ = fs_comma; } else { *s++ = '0'; --n; } } } cs = (int)(s - (num + 64)) + (3 << 24); if (pr) { *s++ = fs_period; tz = pr; } } else { n = 0; for (;;) { if ((fl & FS_TRIPLET_COMMA) && (++cs == 4)) { cs = 0; *s++ = fs_comma; } else { *s++ = sn[n]; ++n; if (n >= (fs_uint32)dp) break; } } cs = (int)(s - (num + 64)) + (3 << 24); if (pr) *s++ = fs_period; if ((l - dp) > (fs_uint32)pr) l = pr + dp; while (n < l) { *s++ = sn[n]; ++n; } tz = pr - (l - dp); } } pr = 0; if (fl & FS_METRIC_SUFFIX) { char idx; idx = 1; if (fl & FS_METRIC_NOSPACE) idx = 0; tail[0] = idx; tail[1] = ' '; { if (fl >> 24) { if (fl & FS_METRIC_1024) tail[idx + 1] = "_KMGT"[fl >> 24]; else tail[idx + 1] = "_kMGT"[fl >> 24]; idx++; if (fl & FS_METRIC_1024 && !(fl & FS_METRIC_JEDEC)) { tail[idx + 1] = 'i'; idx++; } tail[0] = idx; } } }; flt_lead: l = (fs_uint32)(s - (num + 64)); s = num + 64; goto scopy; #endif case 'B': case 'b': h = (f[0] == 'B') ? hexu : hex; lead[0] = 0; if (fl & FS_LEADING_0X) { lead[0] = 2; lead[1] = '0'; lead[2] = h[0xb]; } l = (8 << 4) | (1 << 8); goto radixnum; case 'o': h = hexu; lead[0] = 0; if (fl & FS_LEADING_0X) { lead[0] = 1; lead[1] = '0'; } l = (3 << 4) | (3 << 8); goto radixnum; case 'p': fl |= (sizeof(void* ) == 8) ? FS_INTMAX : 0; pr = sizeof(void* ) * 2; fl &= ~FS_LEADINGZERO; case 'X': case 'x': h = (f[0] == 'X') ? hexu : hex; l = (4 << 4) | (4 << 8); lead[0] = 0; if (fl & FS_LEADING_0X) { lead[0] = 2; lead[1] = '0'; lead[2] = h[16]; } radixnum: if (fl & FS_INTMAX) n64 = va_arg(va, fs_uint64); else n64 = va_arg(va, fs_uint32); s = num + FS_NUMSZ; dp = 0; tail[0] = 0; if (n64 == 0) { lead[0] = 0; if (pr == 0) { l = 0; cs = 0; goto scopy; } } for (;;) { *--s = h[n64 & ((1 << (l >> 8)) - 1)]; n64 >>= (l >> 8); if (!((n64) || ((fs_int32)((num + FS_NUMSZ) - s) < pr))) break; if (fl & FS_TRIPLET_COMMA) { ++l; if ((l & 15) == ((l >> 4) & 15)) { l &= ~15; *--s = fs_comma; } } }; cs = (fs_uint32)((num + FS_NUMSZ) - s) + ((((l >> 4) & 15)) << 24); l = (fs_uint32)((num + FS_NUMSZ) - s); goto scopy; case 'u': case 'i': case 'd': if (fl & FS_INTMAX) { fs_int64 i64 = va_arg(va, fs_int64); n64 = (fs_uint64)i64; if ((f[0] != 'u') && (i64 < 0)) { n64 = (fs_uint64)-i64; fl |= FS_NEGATIVE; } } else { fs_int32 i = va_arg(va, fs_int32); n64 = (fs_uint32)i; if ((f[0] != 'u') && (i < 0)) { n64 = (fs_uint32)-i; fl |= FS_NEGATIVE; } } #ifndef FS_SPRINTF_NOFLOAT if (fl & FS_METRIC_SUFFIX) { if (n64 < 1024) pr = 0; else if (pr == -1) pr = 1; fv = (double)(fs_int64)n64; goto doafloat; } #endif s = num + FS_NUMSZ; l = 0; for (;;) { char* o = s - 8; if (n64 >= 100000000) { n = (fs_uint32)(n64 % 100000000); n64 /= 100000000; } else { n = (fs_uint32)n64; n64 = 0; } if ((fl & FS_TRIPLET_COMMA) == 0) { do { s -= 2; *(fs_uint16 *)s = *(fs_uint16 *)&fs_digitpair.pair[(n % 100) * 2]; n /= 100; } while (n); } while (n) { if ((fl & FS_TRIPLET_COMMA) && (l++ == 3)) { l = 0; *--s = fs_comma; --o; } else { *--s = (char)(n % 10) + '0'; n /= 10; } } if (n64 == 0) { if ((s[0] == '0') && (s != (num + FS_NUMSZ))) ++s; break; } while (s != o) if ((fl & FS_TRIPLET_COMMA) && (l++ == 3)) { l = 0; *--s = fs_comma; --o; } else { *--s = '0'; } } tail[0] = 0; fs_lead_sign(fl, lead); l = (fs_uint32)((num + FS_NUMSZ) - s); if (l == 0) { *--s = '0'; l = 1; } cs = l + (3 << 24); if (pr < 0) pr = 0; scopy: if (pr < (fs_int32)l) pr = l; n = pr + lead[0] + tail[0] + tz; if (fw < (fs_int32)n) fw = n; fw -= n; pr -= l; if ((fl & FS_LEFTJUST) == 0) { if (fl & FS_LEADINGZERO) { pr = (fw > pr) ? fw : pr; fw = 0; } else { fl &= ~FS_TRIPLET_COMMA; } } if (fw + pr) { fs_int32 i; fs_uint32 c; if ((fl & FS_LEFTJUST) == 0) while (fw > 0) { fs_cb_buf_clamp(i, fw); fw -= i; while (i) { if ((((fs_uintptr)bf) & 3) == 0) break; *bf++ = ' '; --i; } while (i >= 4) { *(fs_uint32 *)bf = 0x20202020; bf += 4; i -= 4; } while (i) { *bf++ = ' '; --i; } fs_chk_cb_buf(1); } sn = lead + 1; while (lead[0]) { fs_cb_buf_clamp(i, lead[0]); lead[0] -= (char)i; while (i) { *bf++ = *sn++; --i; } fs_chk_cb_buf(1); } c = cs >> 24; cs &= 0xffffff; cs = (fl & FS_TRIPLET_COMMA) ? ((fs_uint32)(c - ((pr + cs) % (c + 1)))) : 0; while (pr > 0) { fs_cb_buf_clamp(i, pr); pr -= i; if ((fl & FS_TRIPLET_COMMA) == 0) { while (i) { if ((((fs_uintptr)bf) & 3) == 0) break; *bf++ = '0'; --i; } while (i >= 4) { *(fs_uint32 *)bf = 0x30303030; bf += 4; i -= 4; } } while (i) { if ((fl & FS_TRIPLET_COMMA) && (cs++ == c)) { cs = 0; *bf++ = fs_comma; } else *bf++ = '0'; --i; } fs_chk_cb_buf(1); } } sn = lead + 1; while (lead[0]) { fs_int32 i; fs_cb_buf_clamp(i, lead[0]); lead[0] -= (char)i; while (i) { *bf++ = *sn++; --i; } fs_chk_cb_buf(1); } n = l; while (n) { fs_int32 i; fs_cb_buf_clamp(i, n); n -= i; FS_UNALIGNED(while (i >= 4) { *(fs_uint32 volatile *)bf = *(fs_uint32 volatile *)s; bf += 4; s += 4; i -= 4; }) while (i) { *bf++ = *s++; --i; } fs_chk_cb_buf(1); } while (tz) { fs_int32 i; fs_cb_buf_clamp(i, tz); tz -= i; while (i) { if ((((fs_uintptr)bf) & 3) == 0) break; *bf++ = '0'; --i; } while (i >= 4) { *(fs_uint32 *)bf = 0x30303030; bf += 4; i -= 4; } while (i) { *bf++ = '0'; --i; } fs_chk_cb_buf(1); } sn = tail + 1; while (tail[0]) { fs_int32 i; fs_cb_buf_clamp(i, tail[0]); tail[0] -= (char)i; while (i) { *bf++ = *sn++; --i; } fs_chk_cb_buf(1); } if (fl & FS_LEFTJUST) if (fw > 0) { while (fw) { fs_int32 i; fs_cb_buf_clamp(i, fw); fw -= i; while (i) { if ((((fs_uintptr)bf) & 3) == 0) break; *bf++ = ' '; --i; } while (i >= 4) { *(fs_uint32 *)bf = 0x20202020; bf += 4; i -= 4; } while (i--) *bf++ = ' '; fs_chk_cb_buf(1); } } break; default: s = num + FS_NUMSZ - 1; *s = f[0]; l = 1; fw = fl = 0; lead[0] = 0; tail[0] = 0; pr = 0; dp = 0; cs = 0; goto scopy; } ++f; } endfmt: if (!callback) *bf = 0; else fs_flush_cb(); done: return tlen + (int)(bf - buf); } #undef FS_LEFTJUST #undef FS_LEADINGPLUS #undef FS_LEADINGSPACE #undef FS_LEADING_0X #undef FS_LEADINGZERO #undef FS_INTMAX #undef FS_TRIPLET_COMMA #undef FS_NEGATIVE #undef FS_METRIC_SUFFIX #undef FS_NUMSZ #undef fs_chk_cb_bufL #undef fs_chk_cb_buf #undef fs_flush_cb #undef fs_cb_buf_clamp FS_API_SPRINTF_DEF int fs_sprintf(char* buf, char const* fmt, ...) { int result; va_list va; va_start(va, fmt); result = fs_vsprintfcb(0, 0, buf, fmt, va); va_end(va); return result; } typedef struct fs_sprintf_context { char* buf; size_t count; size_t length; char tmp[FS_SPRINTF_MIN]; } fs_sprintf_context; static char* fs_clamp_callback(const char* buf, void* user, size_t len) { fs_sprintf_context *c = (fs_sprintf_context *)user; c->length += len; if (len > c->count) len = c->count; if (len) { if (buf != c->buf) { const char* s, *se; char* d; d = c->buf; s = buf; se = buf + len; do { *d++ = *s++; } while (s < se); } c->buf += len; c->count -= len; } if (c->count <= 0) return c->tmp; return (c->count >= FS_SPRINTF_MIN) ? c->buf : c->tmp; } static char* fs_count_clamp_callback( const char* buf, void* user, size_t len ) { fs_sprintf_context * c = (fs_sprintf_context*)user; (void) sizeof(buf); c->length += len; return c->tmp; } FS_API_SPRINTF_DEF int fs_vsnprintf( char* buf, size_t count, char const* fmt, va_list va ) { fs_sprintf_context c; if ( (count == 0) && !buf ) { c.length = 0; fs_vsprintfcb( fs_count_clamp_callback, &c, c.tmp, fmt, va ); } else { size_t l; c.buf = buf; c.count = count; c.length = 0; fs_vsprintfcb( fs_clamp_callback, &c, fs_clamp_callback(0,&c,0), fmt, va ); l = (size_t)( c.buf - buf ); if ( l >= count ) l = count - 1; buf[l] = 0; } return (int)c.length; } FS_API_SPRINTF_DEF int fs_snprintf(char* buf, size_t count, char const* fmt, ...) { int result; va_list va; va_start(va, fmt); result = fs_vsnprintf(buf, count, fmt, va); va_end(va); return result; } FS_API_SPRINTF_DEF int fs_vsprintf(char* buf, char const* fmt, va_list va) { return fs_vsprintfcb(0, 0, buf, fmt, va); } #ifndef FS_SPRINTF_NOFLOAT #define FS_COPYFP(dest, src) \ { \ int cn; \ for (cn = 0; cn < 8; cn++) \ ((char* )&dest)[cn] = ((char* )&src)[cn]; \ } static fs_int32 fs_real_to_parts(fs_int64 *bits, fs_int32 *expo, double value) { double d; fs_int64 b = 0; d = value; FS_COPYFP(b, d); *bits = b & ((((fs_uint64)1) << 52) - 1); *expo = (fs_int32)(((b >> 52) & 2047) - 1023); return (fs_int32)((fs_uint64) b >> 63); } static double const fs_bot[23] = { 1e+000, 1e+001, 1e+002, 1e+003, 1e+004, 1e+005, 1e+006, 1e+007, 1e+008, 1e+009, 1e+010, 1e+011, 1e+012, 1e+013, 1e+014, 1e+015, 1e+016, 1e+017, 1e+018, 1e+019, 1e+020, 1e+021, 1e+022 }; static double const fs_negbot[22] = { 1e-001, 1e-002, 1e-003, 1e-004, 1e-005, 1e-006, 1e-007, 1e-008, 1e-009, 1e-010, 1e-011, 1e-012, 1e-013, 1e-014, 1e-015, 1e-016, 1e-017, 1e-018, 1e-019, 1e-020, 1e-021, 1e-022 }; static double const fs_negboterr[22] = { -5.551115123125783e-018, -2.0816681711721684e-019, -2.0816681711721686e-020, -4.7921736023859299e-021, -8.1803053914031305e-022, 4.5251888174113741e-023, 4.5251888174113739e-024, -2.0922560830128471e-025, -6.2281591457779853e-026, -3.6432197315497743e-027, 6.0503030718060191e-028, 2.0113352370744385e-029, -3.0373745563400371e-030, 1.1806906454401013e-032, -7.7705399876661076e-032, 2.0902213275965398e-033, -7.1542424054621921e-034, -7.1542424054621926e-035, 2.4754073164739869e-036, 5.4846728545790429e-037, 9.2462547772103625e-038, -4.8596774326570872e-039 }; static double const fs_top[13] = { 1e+023, 1e+046, 1e+069, 1e+092, 1e+115, 1e+138, 1e+161, 1e+184, 1e+207, 1e+230, 1e+253, 1e+276, 1e+299 }; static double const fs_negtop[13] = { 1e-023, 1e-046, 1e-069, 1e-092, 1e-115, 1e-138, 1e-161, 1e-184, 1e-207, 1e-230, 1e-253, 1e-276, 1e-299 }; static double const fs_toperr[13] = { 8388608, 6.8601809640529717e+028, -7.253143638152921e+052, -4.3377296974619174e+075, -1.5559416129466825e+098, -3.2841562489204913e+121, -3.7745893248228135e+144, -1.7356668416969134e+167, -3.8893577551088374e+190, -9.9566444326005119e+213, 6.3641293062232429e+236, -5.2069140800249813e+259, -5.2504760255204387e+282 }; static double const fs_negtoperr[13] = { 3.9565301985100693e-040, -2.299904345391321e-063, 3.6506201437945798e-086, 1.1875228833981544e-109, -5.0644902316928607e-132, -6.7156837247865426e-155, -2.812077463003139e-178, -5.7778912386589953e-201, 7.4997100559334532e-224, -4.6439668915134491e-247, -6.3691100762962136e-270, -9.436808465446358e-293, 8.0970921678014997e-317 }; #if defined(_MSC_VER) && (_MSC_VER <= 1200) static fs_uint64 const fs_powten[20] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000, 10000000000000000000U }; #define fs_tento19th ((fs_uint64)1000000000000000000) #else static fs_uint64 const fs_powten[20] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000ULL, 100000000000ULL, 1000000000000ULL, 10000000000000ULL, 100000000000000ULL, 1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL, 1000000000000000000ULL, 10000000000000000000ULL }; #define fs_tento19th (1000000000000000000ULL) #endif #define fs_ddmulthi(oh, ol, xh, yh) \ { \ double ahi = 0, alo, bhi = 0, blo; \ fs_int64 bt; \ oh = xh * yh; \ FS_COPYFP(bt, xh); \ bt &= ((~(fs_uint64)0) << 27); \ FS_COPYFP(ahi, bt); \ alo = xh - ahi; \ FS_COPYFP(bt, yh); \ bt &= ((~(fs_uint64)0) << 27); \ FS_COPYFP(bhi, bt); \ blo = yh - bhi; \ ol = ((ahi * bhi - oh) + ahi * blo + alo * bhi) + alo * blo; \ } #define fs_ddtoS64(ob, xh, xl) \ { \ double ahi = 0, alo, vh, t; \ ob = (fs_int64)xh; \ vh = (double)ob; \ ahi = (xh - vh); \ t = (ahi - xh); \ alo = (xh - (ahi - t)) - (vh + t); \ ob += (fs_int64)(ahi + alo + xl); \ } #define fs_ddrenorm(oh, ol) \ { \ double s; \ s = oh + ol; \ ol = ol - (s - oh); \ oh = s; \ } #define fs_ddmultlo(oh, ol, xh, xl, yh, yl) ol = ol + (xh * yl + xl * yh); #define fs_ddmultlos(oh, ol, xh, yl) ol = ol + (xh * yl); static void fs_raise_to_power10(double *ohi, double *olo, double d, fs_int32 power) { double ph, pl; if ((power >= 0) && (power <= 22)) { fs_ddmulthi(ph, pl, d, fs_bot[power]); } else { fs_int32 e, et, eb; double p2h, p2l; e = power; if (power < 0) e = -e; et = (e * 0x2c9) >> 14; if (et > 13) et = 13; eb = e - (et * 23); ph = d; pl = 0.0; if (power < 0) { if (eb) { --eb; fs_ddmulthi(ph, pl, d, fs_negbot[eb]); fs_ddmultlos(ph, pl, d, fs_negboterr[eb]); } if (et) { fs_ddrenorm(ph, pl); --et; fs_ddmulthi(p2h, p2l, ph, fs_negtop[et]); fs_ddmultlo(p2h, p2l, ph, pl, fs_negtop[et], fs_negtoperr[et]); ph = p2h; pl = p2l; } } else { if (eb) { e = eb; if (eb > 22) eb = 22; e -= eb; fs_ddmulthi(ph, pl, d, fs_bot[eb]); if (e) { fs_ddrenorm(ph, pl); fs_ddmulthi(p2h, p2l, ph, fs_bot[e]); fs_ddmultlos(p2h, p2l, fs_bot[e], pl); ph = p2h; pl = p2l; } } if (et) { fs_ddrenorm(ph, pl); --et; fs_ddmulthi(p2h, p2l, ph, fs_top[et]); fs_ddmultlo(p2h, p2l, ph, pl, fs_top[et], fs_toperr[et]); ph = p2h; pl = p2l; } } } fs_ddrenorm(ph, pl); *ohi = ph; *olo = pl; } static fs_int32 fs_real_to_str(char const* *start, fs_uint32 *len, char* out, fs_int32 *decimal_pos, double value, fs_uint32 frac_digits) { double d; fs_int64 bits = 0; fs_int32 expo, e, ng, tens; d = value; FS_COPYFP(bits, d); expo = (fs_int32)((bits >> 52) & 2047); ng = (fs_int32)((fs_uint64) bits >> 63); if (ng) d = -d; if (expo == 2047) { *start = (bits & ((((fs_uint64)1) << 52) - 1)) ? "NaN" : "Inf"; *decimal_pos = FS_SPECIAL; *len = 3; return ng; } if (expo == 0) { if (((fs_uint64) bits << 1) == 0) { *decimal_pos = 1; *start = out; out[0] = '0'; *len = 1; return ng; } { fs_int64 v = ((fs_uint64)1) << 51; while ((bits & v) == 0) { --expo; v >>= 1; } } } { double ph, pl; tens = expo - 1023; tens = (tens < 0) ? ((tens * 617) / 2048) : (((tens * 1233) / 4096) + 1); fs_raise_to_power10(&ph, &pl, d, 18 - tens); fs_ddtoS64(bits, ph, pl); if (((fs_uint64)bits) >= fs_tento19th) ++tens; } frac_digits = (frac_digits & 0x80000000) ? ((frac_digits & 0x7ffffff) + 1) : (tens + frac_digits); if ((frac_digits < 24)) { fs_uint32 dg = 1; if ((fs_uint64)bits >= fs_powten[9]) dg = 10; while ((fs_uint64)bits >= fs_powten[dg]) { ++dg; if (dg == 20) goto noround; } if (frac_digits < dg) { fs_uint64 r; e = dg - frac_digits; if ((fs_uint32)e >= 24) goto noround; r = fs_powten[e]; bits = bits + (r / 2); if ((fs_uint64)bits >= fs_powten[dg]) ++tens; bits /= r; } noround:; } if (bits) { fs_uint32 n; for (;;) { if (bits <= 0xffffffff) break; if (bits % 1000) goto donez; bits /= 1000; } n = (fs_uint32)bits; while ((n % 1000) == 0) n /= 1000; bits = n; donez:; } out += 64; e = 0; for (;;) { fs_uint32 n; char* o = out - 8; if (bits >= 100000000) { n = (fs_uint32)(bits % 100000000); bits /= 100000000; } else { n = (fs_uint32)bits; bits = 0; } while (n) { out -= 2; *(fs_uint16 *)out = *(fs_uint16 *)&fs_digitpair.pair[(n % 100) * 2]; n /= 100; e += 2; } if (bits == 0) { if ((e) && (out[0] == '0')) { ++out; --e; } break; } while (out != o) { *--out = '0'; ++e; } } *decimal_pos = tens; *start = out; *len = e; return ng; } #undef fs_ddmulthi #undef fs_ddrenorm #undef fs_ddmultlo #undef fs_ddmultlos #undef FS_SPECIAL #undef FS_COPYFP #endif #undef FS_UNALIGNED /* END stb_sprintf.c */ #if defined(__GNUC__) && (__GNUC__ >= 7 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1)) #pragma GCC diagnostic pop #endif /* END fs_snprintf.c */ #endif /* fs_c */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ miniaudio-0.11.22/external/fs/fs.h000066400000000000000000001574721475701111600166710ustar00rootroot00000000000000/* File system library. Choice of public domain or MIT-0. See license statements at the end of this file. fs - v1.0.0 - Release Date TBD David Reid - mackron@gmail.com GitHub: https://github.com/mackron/fs */ /* 1. Introduction =============== This library is used to abstract access to the regular file system and archives such as ZIP files. 1.1. Basic Usage ---------------- The main object in the library is the `fs` object. Below is the most basic way to initialize a `fs` object: ```c fs_result result; fs* pFS; result = fs_init(NULL, &pFS); if (result != FS_SUCCESS) { // Failed to initialize. } ``` The above code will initialize a `fs` object representing the system's regular file system. It uses stdio under the hood. Once this is set up you can load files: ```c fs_file* pFile; result = fs_file_open(pFS, "file.txt", FS_READ, &pFile); if (result != FS_SUCCESS) { // Failed to open file. } ``` Reading content from the file is very standard: ```c size_t bytesRead; result = fs_file_read(pFS, pBuffer, bytesToRead, &bytesRead); if (result != FS_SUCCESS) { // Failed to read file. You can use FS_AT_END to check if reading failed due to being at EOF. } ``` In the code above, the number of bytes actually read is output to a variable. You can use this to determine if you've reached the end of the file. You can also check if the result is FS_AT_END. To do more advanced stuff, such as opening from archives, you'll need to configure the `fs` object with a config, which you pass into `fs_init()`: ```c #include "extras/backends/zip/fs_zip.h" // <-- This is where FS_ZIP is declared. ... fs_archive_type pArchiveTypes[] = { {FS_ZIP, "zip"}, {FS_ZIP, "pac"} }; fs_config fsConfig = fs_config_init(FS_STDIO, NULL, NULL); fsConfig.pArchiveTypes = pArchiveTypes; fsConfig.archiveTypeCount = sizeof(pArchiveTypes) / sizeof(pArchiveTypes[0]); fs_init(&fsConfig, &pFS); ``` In the code above we are registering support for ZIP archives (`FS_ZIP`). Whenever a file with a "zip" or "pac" extension is found, the library will be able to access the archive. The library will determine whether or not a file is an archive based on it's extension. You can use whatever extension you would like for a backend, and you can associated multiple extensions to the same backend. You can also associated different backends to the same extension, in which case the library will use the first one that works. If the extension of a file does not match with one of the registered archive types it'll assume it's not an archive and will skip it. Below is an example of one way you can read from an archive: ```c result = fs_file_open(pFS, "archive.zip/file-inside-archive.txt", FS_READ, &pFile); if (result != FS_SUCCESS) { // Failed to open file. } ``` In the example above, we've explicitly specified the name of the archive in the file path. The library also supports the ability to handle archives transparently, meaning you don't need to explicitly specify the archive. The code below will also work: ```c fs_file_open(pFS, "file-inside-archive.txt", FS_READ, &pFile); ``` Transparently handling archives like this has overhead because the library needs to scan the file system and check every archive it finds. To avoid this, you can explicitly disable this feature: ```c fs_file_open(pFS, "archive.zip/file-inside-archive.txt", FS_READ | FS_VERBOSE, &pFile); ``` In the code above, the `FS_VERBOSE` flag will require you to pass in a verbose file path, meaning you need to explicitly specify the archive in the path. You can take this one step further by disabling access to archives in this manner altogether via `FS_OPAQUE`: ```c result = fs_file_open(pFS, "archive.zip/file-inside-archive.txt", FS_READ | FS_OPAQUE, &pFile); if (result != FS_SUCCESS) { // This example will always fail. } ``` In the example above, `FS_OPAQUE` is telling the library to treat archives as if they're totally opaque and that the files within cannot be accessed. Up to this point the handling of archives has been done automatically via `fs_file_open()`, however the library allows you to manage archives manually. To do this you just initialize a `fs` object to represent the archive: ```c // Open the archive file itself first. fs_file* pArchiveFile; result = fs_file_open(pFS, "archive.zip", FS_READ, &pArchiveFile); if (result != FS_SUCCESS) { // Failed to open archive file. } // Once we have the archive file we can create the `fs` object representing the archive. fs* pArchive; fs_config archiveConfig; archiveConfig = fs_config_init(FS_ZIP, NULL, fs_file_get_stream(pArchiveFile)); result = fs_init(&archiveConfig, &pArchive); if (result != FS_SUCCESS) { // Failed to initialize archive. } ... // During teardown, make sure the archive `fs` object is uninitialized before the stream. fs_uninit(pArchive); fs_file_close(pArchiveFile); ``` To initialize an `fs` object for an archive you need a stream to provide the raw archive data to the backend. Conveniently, the `fs_file` object itself is a stream. In the example above we're just opening a file from a different `fs` object (usually one representing the default file system) to gain access to a stream. The stream does not need to be a `fs_file`. You can implement your own `fs_stream` object, and a `fs_memory_stream` is included as stock with the library for when you want to store the contents of an archive in-memory. Once you have the `fs` object for the archive you can use it just like any other: ```c result = fs_file_open(pArchive, "file-inside-archive.txt", FS_READ, &pFile); if (result != FS_SUCCESS) { // Failed to open file. } ``` In addition to the above, you can use `fs_open_archive()` to open an archive from a file: ```c fs* pArchive; result = fs_open_archive(pFS, "archive.zip", FS_READ, &pArchive); ``` When opening an archive like this, it will inherit the archive types from the parent `fs` object and will therefore support archives within archives. Use caution when doing this because if both archives are compressed you will get a big performance hit. Only the inner-most archive should be compressed. 1.2. Mounting ------------- There is no notion of a "current directory" in this library. By default, relative paths will be relative to whatever the backend deems appropriate. In practice, this means the "current" directory for the default system backend, and the root directory for archives. There is still control over how to load files from a relative path, however: mounting. You can mount a physical directory to virtual path, similar in concept to Unix operating systems. The difference, however, is that you can mount multiple directories to the same mount point in which case a prioritization system will be used. There are separate mount points for reading and writing. Below is an example of mounting for reading: ```c fs_mount(pFS, "/some/actual/path", NULL, FS_MOUNT_PRIORITY_HIGHEST); ``` In the example above, `NULL` is equivalent to an empty path. If, for example, you have a file with the path "/some/actual/path/file.txt", you can open it like the following: ```c fs_file_open(pFS, "file.txt", FS_READ, &pFile); ``` You don't need to specify the "/some/actual/path" part because it's handled by the mount. If you specify a virtual path, you can do something like the following: ```c fs_mount(pFS, "/some/actual/path", "assets", FS_MOUNT_PRIORITY_HIGHEST); ``` In this case, loading files that are physically located in "/some/actual/path" would need to be prexied with "assets": ```c fs_file_open(pFS, "assets/file.txt", FS_READ, &pFile); ``` Archives can also be mounted: ```c fs_mount(pFS, "/game/data/base/assets.zip", "assets", FS_MOUNT_PRIORITY_HIGHEST); ``` You can mount multiple paths to the same mount point: ```c fs_mount(pFS, "/game/data/base.zip", "assets", FS_MOUNT_PRIORITY_HIGHEST); fs_mount(pFS, "/game/data/mod1.zip", "assets", FS_MOUNT_PRIORITY_HIGHEST); fs_mount(pFS, "/game/data/mod2.zip", "assets", FS_MOUNT_PRIORITY_HIGHEST); ``` In the example above, the "base.zip" archive is mounted first. Then "mod1.zip" is mounted, which takes higher priority over "base.zip". Then "mod2.zip" is mounted which takes higher priority again. With this set up, any file that is loaded from the "assets" mount point will first be loaded from "mod2.zip", and if it doesn't exist there, "mod1.zip", and if not there, finally "base.zip". You could use this set up to support simple modding prioritization in a game, for example. If the file cannot be opened from any mounts it will attempt to open the file from the backend's default search path. Mounts always take priority. When opening in transparent mode with `FS_TRANSPARENT` (default), it will first try opening the file as if it were not in an archive. If that fails, it will look inside archives. You can also mount directories for writing: ```c fs_mount_write(pFS, "/home/user/.config/mygame", "config", FS_MOUNT_PRIORITY_HIGHEST); ``` You can then open a file for writing like so: ```c fs_file_open(pFS, "config/game.cfg", FS_WRITE, &pFile); ``` When opening a file in write mode, the prefix is what determines which write mount point to use. You can therefore have multiple write mounts: ```c fs_mount_write(pFS, "/home/user/.config/mygame", "config", FS_MOUNT_PRIORITY_HIGHEST); fs_mount_write(pFS, "/home/user/.local/share/mygame/saves", "saves", FS_MOUNT_PRIORITY_HIGHEST); ``` Now you can write out different types of files, with the prefix being used to determine where it'll be saved: ```c fs_file_open(pFS, "config/game.cfg", FS_WRITE, &pFile); // Prefixed with "config", so will use the "config" mount point. fs_file_open(pFS, "saves/save0.sav", FS_WRITE, &pFile); // Prefixed with "saves", so will use the "saves" mount point. ``` When opening a file for writing, if you pass in NULL for the `pFS` parameter it will open the file like normal using the standard file system. That is it'll work exactly as if you were using stdio `fopen()` and you will not be able use mount points. Keep in mind that there is no notion of a "current directory" in this library so you'll be stuck with the initial working directory. By default, you can move outside the mount point with ".." segments. If you want to disable this functionality, you can use the `FS_NO_ABOVE_ROOT_NAVIGATION` flag: ```c fs_file_open(pFS, "../file.txt", FS_READ | FS_NO_ABOVE_ROOT_NAVIGATION, &pFile); ``` In addition, any mount points that start with a "/" will be considered absolute and will not allow any above-root navigation: ```c fs_mount(pFS, "/game/data/base", "/gamedata", FS_MOUNT_PRIORITY_HIGHEST); ``` In the example above, the "/gamedata" mount point starts with a "/", so it will not allow any above-root navigation which means you cannot navigate above "/game/data/base" when using this mount point. Note that writing directly into an archive is not supported by this API. To write into an archive, the backend itself must support writing, and you will need to manually initialize a `fs` object for the archive an write into it directly. 1.3. Enumeration ---------------- You can enumerate over the contents of a directory like the following: ```c for (fs_iterator* pIterator = fs_first(pFS, "directory/to/enumerate", FS_NULL_TERMINATED, 0); pIterator != NULL; pIterator = fs_next(pIterator)) { printf("Name: %s\n", pIterator->pName); printf("Size: %llu\n", pIterator->info.size); } ``` If you want to terminate iteration early, use `fs_free_iterator()` to free the iterator object. `fs_next()` will free the iterator for you when it reaches the end. Like when opening a file, you can specify `FS_OPAQUE`, `FS_VERBOSE` or `FS_TRANSPARENT` (default) in `fs_first()` to control which files are enumerated. Enumerated files will be consistent with what would be opened when using the same option with `fs_file_open()`. Internally, `fs_first()` will gather all of the enumerated files. This means you should expect `fs_first()` to be slow compared to `fs_next()`. Enumerated entries will be sorted by name in terms of `strcmp()`. Enumeration is not recursive. If you want to enumerate recursively you can inspect the `directory` member of the `info` member in `fs_iterator`. 2. Thread Safety ================ The following points apply regarding thread safety. - Opening files across multiple threads is safe. Backends are responsible for ensuring thread safety when opening files. - An individual `fs_file` object is not thread safe. If you want to use a specific `fs_file` object across multiple threads, you will need to synchronize access to it yourself. Using different `fs_file` objects across multiple threads is safe. - Mounting and unmounting is not thread safe. You must use your own synchronization if you want to do this across multiple threads. - Opening a file on one thread while simultaneously mounting or unmounting on another thread is not safe. Again, you must use your own synchronization if you need to do this. The recommended usage is to set up your mount points once during initialization before opening any files. 3. Backends =========== You can implement custom backends to support different file systems and archive formats. A stdio backend is the default backend and is built into the library. A backend implements the functions in the `fs_backend` structure. A ZIP backend is included in the "extras" folder of this library's repository. Refer to this for a complete example for how to implement a backend (not including write support, but I'm sure you'll figure it out!). The backend abstraction is designed to relieve backends from having to worry about the implementation details of the main library. Backends should only concern themselves with their own local content and not worry about things like mount points, archives, etc. Those details will be handled at a higher level in the library. Instances of a `fs` object can be configured with backend-specific configuration data. This is passed to the backend as a void pointer to the necessary functions. This data will point to a backend-defined structure that the backend will know how to use. In order for the library to know how much memory to allocate for the `fs` object, the backend needs to implement the `alloc_size` function. This function should return the total size of the backend-specific data to associate with the `fs` object. Internally, this memory will be stored at the end of the `fs` object. The backend can access this data via `fs_get_backend_data()`: ```c typedef struct my_fs_data { int someData; } my_fs_data; ... my_fs_data* pBackendData = (my_fs_data*)fs_get_backend_data(pFS); assert(pBackendData != NULL); do_something(pBackendData->someData); ``` This pattern will be a central part of how backends are implemented. If you don't have any backend-specific data, you can just return 0 from `alloc_size()` and simply not reference the backend data pointer. The main library will allocate the `fs` object, including any additional space specified by the `alloc_size` function. Once this is done, it'll call the `init` function to initialize the backend. This function will take a pointer to the `fs` object, the backend-specific configuration data, and a stream object. The stream is used to provide the backend with the raw data of an archive, which will be required for archive backends like ZIP. If your backend requires this, you should check for if the stream is null, and if so, return an error. See section "4. Streams" for more details on how to use streams. You need not take a copy of the stream pointer for use outside of `init()`. Instead you can just use `fs_get_stream()` to get the stream object when you need it. You should not ever close or otherwise take ownership of the stream - that will be handled at a higher level. The `uninit` function is where you should do any cleanup. Do not close the stream here. The `remove` function is used to remove a file. This is not recursive. If the path is a directory, the backend should return an error if it is not empty. Backends do not need to implement this function in which case they can leave the callback pointer as `NULL`, or have it return `FS_NOT_IMPLEMENTED`. The `rename` function is used to rename a file. This will act as a move if the source and destination are in different directories. If the destination already exists, it should be overwritten. This function is optional and can be left as `NULL` or return `FS_NOT_IMPLEMENTED`. The `mkdir` function is used to create a directory. This is not recursive. If the directory already exists, the backend should return `FS_SUCCESS`. This function is optional and can be left as `NULL` or return `FS_NOT_IMPLEMENTED`. The `info` function is used to get information about a file. If the backend does not have the notion of the last modified or access time, it can set those values to 0. Set `directory` to 1 (or FS_TRUE) if it's a directory. Likewise, set `symlink` to 1 if it's a symbolic link. It is important that this function return the info of the exact file that would be opened with `file_open()`. Like when initializing a `fs` object, the library needs to know how much backend-specific data to allocate for the `fs_file` object. This is done with the `file_alloc_size` function. This function is basically the same as `alloc_size` for the `fs` object, but for `fs_file`. If the backend does not need any additional data, it can return 0. The backend can access this data via `fs_file_get_backend_data()`. The `file_open` function is where the backend should open the file. If the `fs` object that owns the file was initialized with a stream, i.e. it's an archive, the stream will be non-null. You should store this pointer for later use in `file_read`, etc. The `openMode` parameter will be a combination of `FS_READ`, `FS_WRITE`, `FS_TRUNCATE`, `FS_APPEND` and `FS_OVERWRITE`. When opening in write mode (`FS_WRITE`), it will default to truncate mode. You should ignore the `FS_OPAQUE`, `FS_VERBOSE` and `FS_TRANSPARENT` flags. If the file does not exist, the backend should return `FS_DOES_NOT_EXIST`. If the file is a directory, it should return `FS_IS_DIRECTORY`. The file should be closed with `file_close`. This is where the backend should release any resources associated with the file. The stream should not be closed here - it'll be cleaned up at a higher level. The `file_read` function is used to read data from the file. The backend should return `FS_AT_END` when the end of the file is reached, but only if the number of bytes read is 0. The `file_write` function is used to write data to the file. If the file is opened in append mode, the backend should seek to the end of the file before writing. This is optional and need only be specified if the backend supports writing. The `file_seek` function is used to seek the cursor. The backend should return `FS_BAD_SEEK` if the seek is out of bounds. The `file_tell` function is used to get the cursor position. The `file_flush` function is used to flush any buffered data to the file. This is optional and can be left as `NULL` or return `FS_NOT_IMPLEMENTED`. The `file_info` function is used to get information about an opened file. It returns the same information as `info` but for an opened file. The `file_duplicate` function is used to duplicate a file. The destination file will be a new file and already allocated. The backend need only copy the necessary backend-specific data to the new file. The `first`, `next` and `free_iterator` functions are used to enumerate the contents of a directory. If the directory is empty, or an error occurs, `fs_first` should return `NULL`. The `next` function should return `NULL` when there are no more entries. When `next` returns `NULL`, the backend needs to free the iterator object. The `free_iterator` function is used to free the iterator object explicitly. The backend is responsible for any memory management of the name string. A typical way to deal with this is to allocate the allocate additional space for the name immediately after the `fs_iterator` allocation. Backends are responsible for guaranteeing thread-safety of different files across different threads. This should typically be quite easy since most system backends, such as stdio, are already thread-safe, and archive backends are typically read-only which should make thread-safety trivial on that front as well. 4. Streams ========== Streams are the data delivery mechanism for archive backends. You can implement custom streams, but this should be uncommon because `fs_file` itself is a stream, and a memory stream is included in the library called `fs_memory_stream`. Between these two the majority of use cases should be covered. A stream is initialized using a specialized initialization function depending on the stream type. For `fs_file`, simply opening the file is enough. For `fs_memory_stream`, you need to call `fs_memory_stream_init_readonly()` for a standard read-only stream, or `fs_memory_stream_init_write()` for a stream with write (and read) support. If you want to implement your own stream type you would need to implement a similar initialization function. Use `fs_stream_read()` and `fs_stream_write()` to read and write data from a stream. If the stream does not support reading or writing, the respective function should return `FS_NOT_IMPLEMENTED`. The cursor can be set and retrieved with `fs_stream_seek()` and `fs_stream_tell()`. There is only a single cursor which is shared between reading and writing. Streams can be duplicated. A duplicated stream is a fully independent stream. This functionality is used heavily internally by the library so if you build a custom stream you should support it if you can. Without duplication support, you will not be able to open files within archives. To duplicate a stream, use `fs_stream_duplicate()`. To delete a duplicated stream, use `fs_stream_delete_duplicate()`. Do not use implementation-specific uninitialization routines to uninitialize a duplicated stream - `fs_stream_delete_duplicate()` will deal with that for you. Streams are not thread safe. If you want to use a stream across multiple threads, you will need to synchronize access to it yourself. Using different stream objects across multiple threads is safe. A duplicated stream is entirely independent of the original stream and can be used across on a different thread to the original stream. The `fs_stream` object is a base class. If you want to implement your own stream, you should make the first member of your stream object a `fs_stream` object. This will allow you to cast between `fs_stream*` and your custom stream type. See `fs_stream_vtable` for a list of functions that need to be implemented for a custom stream. If the stream does not support writing, the `write` callback can be left as `NULL` or return `FS_NOT_IMPLEMENTED`. See `fs_memory_stream` for an example of how to implement a custom stream. */ /* This library has been designed to be amalgamated into other libraries of mine. You will probably see some random tags and stuff in this file. These are just used for doing a dumb amalgamation. */ #ifndef fs_h #define fs_h #include /* For size_t. */ #include /* For va_list. */ #if defined(__cplusplus) extern "C" { #endif /* BEG fs_compiler_compat.h */ #if defined(SIZE_MAX) #define FS_SIZE_MAX SIZE_MAX #else #define FS_SIZE_MAX 0xFFFFFFFF /* When SIZE_MAX is not defined by the standard library just default to the maximum 32-bit unsigned integer. */ #endif #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__) #define FS_SIZEOF_PTR 8 #else #define FS_SIZEOF_PTR 4 #endif #if FS_SIZEOF_PTR == 8 #define FS_64BIT #else #define FS_32BIT #endif #if defined(FS_USE_STDINT) #include typedef int8_t fs_int8; typedef uint8_t fs_uint8; typedef int16_t fs_int16; typedef uint16_t fs_uint16; typedef int32_t fs_int32; typedef uint32_t fs_uint32; typedef int64_t fs_int64; typedef uint64_t fs_uint64; #else typedef signed char fs_int8; typedef unsigned char fs_uint8; typedef signed short fs_int16; typedef unsigned short fs_uint16; typedef signed int fs_int32; typedef unsigned int fs_uint32; #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 fs_int64; typedef unsigned __int64 fs_uint64; #else #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef signed long long fs_int64; typedef unsigned long long fs_uint64; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif #endif /* FS_USE_STDINT */ #if FS_SIZEOF_PTR == 8 typedef fs_uint64 fs_uintptr; typedef fs_int64 fs_intptr; #else typedef fs_uint32 fs_uintptr; typedef fs_int32 fs_intptr; #endif typedef unsigned char fs_bool8; typedef unsigned int fs_bool32; #define FS_TRUE 1 #define FS_FALSE 0 #define FS_INT64_MAX ((fs_int64)(((fs_uint64)0x7FFFFFFF << 32) | 0xFFFFFFFF)) #ifndef FS_API #define FS_API #endif #ifdef _MSC_VER #define FS_INLINE __forceinline #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when the __attribute__((always_inline)) attribute is defined without an "inline" statement. I think therefore there must be some case where "__inline__" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the command line, we cannot use the "inline" keyword and instead need to use "__inline__". In an attempt to work around this issue I am using "__inline__" only when we're compiling in strict ANSI mode. */ #if defined(__STRICT_ANSI__) #define FS_GNUC_INLINE_HINT __inline__ #else #define FS_GNUC_INLINE_HINT inline #endif #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__) #define FS_INLINE FS_GNUC_INLINE_HINT __attribute__((always_inline)) #else #define FS_INLINE FS_GNUC_INLINE_HINT #endif #elif defined(__WATCOMC__) #define FS_INLINE __inline #else #define FS_INLINE #endif #if defined(__has_attribute) #if __has_attribute(format) #define FS_ATTRIBUTE_FORMAT(fmt, va) __attribute__((format(printf, fmt, va))) #endif #endif #ifndef FS_ATTRIBUTE_FORMAT #define FS_ATTRIBUTE_FORMAT(fmt, va) #endif #define FS_NULL_TERMINATED ((size_t)-1) /* END fs_compiler_compat.h */ /* BEG fs_result.h */ typedef enum fs_result { /* Compression Non-Error Result Codes. */ FS_HAS_MORE_OUTPUT = 102, /* Some stream has more output data to be read, but there's not enough room in the output buffer. */ FS_NEEDS_MORE_INPUT = 100, /* Some stream needs more input data before it can be processed. */ /* Main Result Codes. */ FS_SUCCESS = 0, FS_ERROR = -1, /* Generic, unknown error. */ FS_INVALID_ARGS = -2, FS_INVALID_OPERATION = -3, FS_OUT_OF_MEMORY = -4, FS_OUT_OF_RANGE = -5, FS_ACCESS_DENIED = -6, FS_DOES_NOT_EXIST = -7, FS_ALREADY_EXISTS = -8, FS_INVALID_FILE = -10, FS_TOO_BIG = -11, FS_NOT_DIRECTORY = -14, FS_IS_DIRECTORY = -15, FS_DIRECTORY_NOT_EMPTY = -16, FS_AT_END = -17, FS_BUSY = -19, FS_BAD_SEEK = -25, FS_NOT_IMPLEMENTED = -29, FS_TIMEOUT = -34, FS_CHECKSUM_MISMATCH = -100, FS_NO_BACKEND = -101 } fs_result; /* END fs_result.h */ /* BEG fs_allocation_callbacks.h */ typedef struct fs_allocation_callbacks { void* pUserData; void* (* onMalloc )(size_t sz, void* pUserData); void* (* onRealloc)(void* p, size_t sz, void* pUserData); void (* onFree )(void* p, void* pUserData); } fs_allocation_callbacks; FS_API void* fs_malloc(size_t sz, const fs_allocation_callbacks* pAllocationCallbacks); FS_API void* fs_calloc(size_t sz, const fs_allocation_callbacks* pAllocationCallbacks); FS_API void* fs_realloc(void* p, size_t sz, const fs_allocation_callbacks* pAllocationCallbacks); FS_API void fs_free(void* p, const fs_allocation_callbacks* pAllocationCallbacks); /* END fs_allocation_callbacks.h */ /* BEG fs_stream.h */ /* Streams. The feeding of input and output data is done via a stream. To implement a custom stream, such as a memory stream, or a file stream, you need to extend from `fs_stream` and implement `fs_stream_vtable`. You can access your custom data by casting the `fs_stream` to your custom type. The stream vtable can support both reading and writing, but it doesn't need to support both at the same time. If one is not supported, simply leave the relevant `read` or `write` callback as `NULL`, or have them return FS_NOT_IMPLEMENTED. */ /* Seek Origins. */ typedef enum fs_seek_origin { FS_SEEK_SET = 0, FS_SEEK_CUR = 1, FS_SEEK_END = 2 } fs_seek_origin; typedef struct fs_stream_vtable fs_stream_vtable; typedef struct fs_stream fs_stream; struct fs_stream_vtable { fs_result (* read )(fs_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead); fs_result (* write )(fs_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten); fs_result (* seek )(fs_stream* pStream, fs_int64 offset, fs_seek_origin origin); fs_result (* tell )(fs_stream* pStream, fs_int64* pCursor); size_t (* duplicate_alloc_size)(fs_stream* pStream); /* Optional. Returns the allocation size of the stream. When not defined, duplicating is disabled. */ fs_result (* duplicate )(fs_stream* pStream, fs_stream* pDuplicatedStream); /* Optional. Duplicate the stream. */ void (* uninit )(fs_stream* pStream); /* Optional. Uninitialize the stream. */ }; struct fs_stream { const fs_stream_vtable* pVTable; }; FS_API fs_result fs_stream_init(const fs_stream_vtable* pVTable, fs_stream* pStream); FS_API fs_result fs_stream_read(fs_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead); FS_API fs_result fs_stream_write(fs_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten); FS_API fs_result fs_stream_writef(fs_stream* pStream, const char* fmt, ...) FS_ATTRIBUTE_FORMAT(2, 3); FS_API fs_result fs_stream_writef_ex(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, const char* fmt, ...) FS_ATTRIBUTE_FORMAT(3, 4); FS_API fs_result fs_stream_writefv(fs_stream* pStream, const char* fmt, va_list args); FS_API fs_result fs_stream_writefv_ex(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, const char* fmt, va_list args); FS_API fs_result fs_stream_seek(fs_stream* pStream, fs_int64 offset, fs_seek_origin origin); FS_API fs_result fs_stream_tell(fs_stream* pStream, fs_int64* pCursor); /* Duplicates a stream. This will allocate the new stream on the heap. The caller is responsible for freeing the stream with `fs_stream_delete_duplicate()` when it's no longer needed. */ FS_API fs_result fs_stream_duplicate(fs_stream* pStream, const fs_allocation_callbacks* pAllocationCallbacks, fs_stream** ppDuplicatedStream); /* Deletes a duplicated stream. Do not use this for a stream that was not duplicated with `fs_stream_duplicate()`. */ FS_API void fs_stream_delete_duplicate(fs_stream* pDuplicatedStream, const fs_allocation_callbacks* pAllocationCallbacks); /* Helper functions for reading the entire contents of a stream, starting from the current cursor position. Free the returned pointer with fs_free(). The format (FS_FORMAT_TEXT or FS_FORMAT_BINARY) is used to determine whether or not a null terminator should be appended to the end of the data. For flexiblity in case the backend does not support cursor retrieval or positioning, the data will be read in fixed sized chunks. */ typedef enum fs_format { FS_FORMAT_TEXT, FS_FORMAT_BINARY } fs_format; FS_API fs_result fs_stream_read_to_end(fs_stream* pStream, fs_format format, const fs_allocation_callbacks* pAllocationCallbacks, void** ppData, size_t* pDataSize); /* END fs_stream.h */ /* BEG fs.h */ /* Open mode flags. */ #define FS_READ 0x0001 #define FS_WRITE 0x0002 #define FS_APPEND (FS_WRITE | 0x0004) #define FS_OVERWRITE (FS_WRITE | 0x0008) #define FS_TRUNCATE (FS_WRITE) #define FS_TRANSPARENT 0x0000 /* Default. Opens a file such that archives of a known type are handled transparently. For example, "somefolder/archive.zip/file.txt" can be opened with "somefolder/file.txt" (the "archive.zip" part need not be specified). This assumes the `fs` object has been initialized with support for the relevant archive types. */ #define FS_OPAQUE 0x0010 /* When used, files inside archives cannot be opened automatically. For example, "somefolder/archive.zip/file.txt" will fail. Mounted archives work fine. */ #define FS_VERBOSE 0x0020 /* When used, files inside archives can be opened, but the name of the archive must be specified explicitly in the path, such as "somefolder/archive.zip/file.txt" */ #define FS_NO_CREATE_DIRS 0x0040 /* When used, directories will not be created automatically when opening files for writing. */ #define FS_IGNORE_MOUNTS 0x0080 /* When used, mounted directories and archives will be ignored when opening and iterating files. */ #define FS_ONLY_MOUNTS 0x0100 /* When used, only mounted directories and archives will be considered when opening and iterating files. */ #define FS_NO_SPECIAL_DIRS 0x0200 /* When used, the presence of special directories like "." and ".." will be result in an error when opening files. */ #define FS_NO_ABOVE_ROOT_NAVIGATION 0x0400 /* When used, navigating above the mount point with leading ".." segments will result in an error. Can be also be used with fs_path_normalize(). */ /* Garbage collection policies.*/ #define FS_GC_POLICY_THRESHOLD 0x0001 /* Only garbage collect unreferenced opened archives until the count is below the configured threshold. */ #define FS_GC_POLICY_FULL 0x0002 /* Garbage collect every unreferenced opened archive, regardless of how many are open.*/ typedef struct fs_config fs_config; typedef struct fs fs; typedef struct fs_file fs_file; typedef struct fs_file_info fs_file_info; typedef struct fs_iterator fs_iterator; typedef struct fs_backend fs_backend; typedef enum fs_mount_priority { FS_MOUNT_PRIORITY_HIGHEST = 0, FS_MOUNT_PRIORITY_LOWEST = 1 } fs_mount_priority; typedef struct fs_archive_type { const fs_backend* pBackend; const char* pExtension; } fs_archive_type; struct fs_file_info { fs_uint64 size; fs_uint64 lastModifiedTime; fs_uint64 lastAccessTime; int directory; int symlink; }; struct fs_iterator { fs* pFS; const char* pName; /* Must be null terminated. The FS implementation is responsible for manageing the memory allocation. */ size_t nameLen; fs_file_info info; }; struct fs_config { const fs_backend* pBackend; const void* pBackendConfig; fs_stream* pStream; const fs_archive_type* pArchiveTypes; size_t archiveTypeCount; const fs_allocation_callbacks* pAllocationCallbacks; }; FS_API fs_config fs_config_init_default(void); FS_API fs_config fs_config_init(const fs_backend* pBackend, void* pBackendConfig, fs_stream* pStream); typedef struct fs_backend { size_t (* alloc_size )(const void* pBackendConfig); fs_result (* init )(fs* pFS, const void* pBackendConfig, fs_stream* pStream); /* Return 0 on success or an errno result code on error. pBackendConfig is a pointer to a backend-specific struct. The documentation for your backend will tell you how to use this. You can usually pass in NULL for this. */ void (* uninit )(fs* pFS); fs_result (* ioctl )(fs* pFS, int op, void* pArg); /* Optional. */ fs_result (* remove )(fs* pFS, const char* pFilePath); fs_result (* rename )(fs* pFS, const char* pOldName, const char* pNewName); fs_result (* mkdir )(fs* pFS, const char* pPath); /* This is not recursive. Return FS_SUCCESS if directory already exists. */ fs_result (* info )(fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo); /* openMode flags can be ignored by most backends. It's primarily used by proxy of passthrough style backends. */ size_t (* file_alloc_size )(fs* pFS); fs_result (* file_open )(fs* pFS, fs_stream* pStream, const char* pFilePath, int openMode, fs_file* pFile); /* Return 0 on success or an errno result code on error. Return ENOENT if the file does not exist. pStream will be null if the backend does not need a stream (the `pFS` object was not initialized with one). */ fs_result (* file_open_handle)(fs* pFS, void* hBackendFile, fs_file* pFile); /* Optional. Open a file from a file handle. Backend-specific. The format of hBackendFile will be specified by the backend. */ void (* file_close )(fs_file* pFile); fs_result (* file_read )(fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead); /* Return 0 on success, or FS_AT_END on end of file. Only return FS_AT_END if *pBytesRead is 0. Return an errno code on error. Implementations must support reading when already at EOF, in which case FS_AT_END should be returned and *pBytesRead should be 0. */ fs_result (* file_write )(fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten); fs_result (* file_seek )(fs_file* pFile, fs_int64 offset, fs_seek_origin origin); fs_result (* file_tell )(fs_file* pFile, fs_int64* pCursor); fs_result (* file_flush )(fs_file* pFile); fs_result (* file_info )(fs_file* pFile, fs_file_info* pInfo); fs_result (* file_duplicate )(fs_file* pFile, fs_file* pDuplicate); /* Duplicate the file handle. */ fs_iterator* (* first )(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen); fs_iterator* (* next )(fs_iterator* pIterator); /* <-- Must return null when there are no more files. In this case, free_iterator must be called internally. */ void (* free_iterator )(fs_iterator* pIterator); /* <-- Free the `fs_iterator` object here since `first` and `next` were the ones who allocated it. Also do any uninitialization routines. */ } fs_backend; FS_API fs_result fs_init(const fs_config* pConfig, fs** ppFS); FS_API void fs_uninit(fs* pFS); FS_API fs_result fs_ioctl(fs* pFS, int op, void* pArg); FS_API fs_result fs_remove(fs* pFS, const char* pFilePath); FS_API fs_result fs_rename(fs* pFS, const char* pOldName, const char* pNewName); FS_API fs_result fs_mkdir(fs* pFS, const char* pPath); /* Does not consider mounts. Returns FS_SUCCESS if directory already exists. */ FS_API fs_result fs_info(fs* pFS, const char* pPath, int openMode, fs_file_info* pInfo); /* openMode flags specify same options as openMode in file_open(), but FS_READ, FS_WRITE, FS_TRUNCATE, FS_APPEND, and FS_OVERWRITE are ignored. */ FS_API fs_stream* fs_get_stream(fs* pFS); FS_API const fs_allocation_callbacks* fs_get_allocation_callbacks(fs* pFS); FS_API void* fs_get_backend_data(fs* pFS); /* For use by the backend. Will be the size returned by the alloc_size() function in the vtable. */ FS_API size_t fs_get_backend_data_size(fs* pFS); FS_API fs_result fs_open_archive_ex(fs* pFS, const fs_backend* pBackend, void* pBackendConfig, const char* pArchivePath, size_t archivePathLen, int openMode, fs** ppArchive); FS_API fs_result fs_open_archive(fs* pFS, const char* pArchivePath, int openMode, fs** ppArchive); FS_API void fs_close_archive(fs* pArchive); FS_API void fs_gc_archives(fs* pFS, int policy); FS_API void fs_set_archive_gc_threshold(fs* pFS, size_t threshold); FS_API size_t fs_get_archive_gc_threshold(fs* pFS); FS_API fs_result fs_file_open(fs* pFS, const char* pFilePath, int openMode, fs_file** ppFile); FS_API fs_result fs_file_open_from_handle(fs* pFS, void* hBackendFile, fs_file** ppFile); FS_API void fs_file_close(fs_file* pFile); FS_API fs_result fs_file_read(fs_file* pFile, void* pDst, size_t bytesToRead, size_t* pBytesRead); /* Returns 0 on success, FS_AT_END on end of file, or an errno result code on error. Will only return FS_AT_END if *pBytesRead is 0. */ FS_API fs_result fs_file_write(fs_file* pFile, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten); FS_API fs_result fs_file_writef(fs_file* pFile, const char* fmt, ...) FS_ATTRIBUTE_FORMAT(2, 3); FS_API fs_result fs_file_writefv(fs_file* pFile, const char* fmt, va_list args); FS_API fs_result fs_file_seek(fs_file* pFile, fs_int64 offset, fs_seek_origin origin); FS_API fs_result fs_file_tell(fs_file* pFile, fs_int64* pCursor); FS_API fs_result fs_file_flush(fs_file* pFile); FS_API fs_result fs_file_get_info(fs_file* pFile, fs_file_info* pInfo); FS_API fs_result fs_file_duplicate(fs_file* pFile, fs_file** ppDuplicate); /* Duplicate the file handle. */ FS_API void* fs_file_get_backend_data(fs_file* pFile); FS_API size_t fs_file_get_backend_data_size(fs_file* pFile); FS_API fs_stream* fs_file_get_stream(fs_file* pFile); /* Files are streams. They can be cast directly to fs_stream*, but this function is here for people who prefer function style getters. */ FS_API fs* fs_file_get_fs(fs_file* pFile); FS_API fs_iterator* fs_first_ex(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen, int mode); FS_API fs_iterator* fs_first(fs* pFS, const char* pDirectoryPath, int mode); FS_API fs_iterator* fs_next(fs_iterator* pIterator); FS_API void fs_free_iterator(fs_iterator* pIterator); FS_API fs_result fs_mount(fs* pFS, const char* pPathToMount, const char* pMountPoint, fs_mount_priority priority); FS_API fs_result fs_unmount(fs* pFS, const char* pPathToMount_NotMountPoint); FS_API fs_result fs_mount_fs(fs* pFS, fs* pOtherFS, const char* pMountPoint, fs_mount_priority priority); FS_API fs_result fs_unmount_fs(fs* pFS, fs* pOtherFS); /* Must be matched up with fs_mount_fs(). */ FS_API fs_result fs_mount_write(fs* pFS, const char* pPathToMount, const char* pMountPoint, fs_mount_priority priority); FS_API fs_result fs_unmount_write(fs* pFS, const char* pPathToMount_NotMountPoint); /* Helper functions for reading the entire contents of a file, starting from the current cursor position. Free the returned pointer with fs_free(), using the same allocation callbacks as the fs object. You can use fs_get_allocation_callbacks() if necessary, like so: fs_free(pFileData, fs_get_allocation_callbacks(pFS)); The format (FS_FORMAT_TEXT or FS_FORMAT_BINARY) is used to determine whether or not a null terminator should be appended to the end of the data. For flexiblity in case the backend does not support cursor retrieval or positioning, the data will be read in fixed sized chunks. */ FS_API fs_result fs_file_read_to_end(fs_file* pFile, fs_format format, void** ppData, size_t* pDataSize); FS_API fs_result fs_file_open_and_read(fs* pFS, const char* pFilePath, fs_format format, void** ppData, size_t* pDataSize); FS_API fs_result fs_file_open_and_write(fs* pFS, const char* pFilePath, void* pData, size_t dataSize); /* Default Backend. */ extern const fs_backend* FS_STDIO; /* The default stdio backend. The handle for fs_file_open_from_handle() is a FILE*. */ /* END fs.h */ /* BEG fs_helpers.h */ /* This section just contains various helper functions, mainly for custom backends. */ /* Converts an errno code to our own error code. */ FS_API fs_result fs_result_from_errno(int error); /* END fs_helpers.h */ /* BEG fs_path.h */ /* These functions are low-level functions for working with paths. The most important part of this API is probably the iteration functions. These functions are used for iterating over each of the segments of a path. This library will recognize both '\' and '/'. If you want to use just one or the other, or a different separator, you'll need to use a different library. Likewise, this library will treat paths as case sensitive. Again, you'll need to use a different library if this is not suitable for you. Iteration will always return both sides of a separator. For example, if you iterate "abc/def", you will get two items: "abc" and "def". Where this is of particular importance and where you must be careful, is the handling of the root directory. If you iterate "/", it will also return two items. The first will be length 0 with an offset of zero which represents the left side of the "/" and the second will be length 0 with an offset of 1 which represents the right side. The reason for this design is that it makes iteration unambiguous and makes it easier to reconstruct a path. The path API does not do any kind of validation to check if it represents an actual path on the file system. Likewise, it does not do any validation to check if the path contains invalid characters. All it cares about is "/" and "\". */ typedef struct { const char* pFullPath; size_t fullPathLength; size_t segmentOffset; size_t segmentLength; } fs_path_iterator; FS_API fs_result fs_path_first(const char* pPath, size_t pathLen, fs_path_iterator* pIterator); FS_API fs_result fs_path_last(const char* pPath, size_t pathLen, fs_path_iterator* pIterator); FS_API fs_result fs_path_next(fs_path_iterator* pIterator); FS_API fs_result fs_path_prev(fs_path_iterator* pIterator); FS_API fs_bool32 fs_path_is_first(const fs_path_iterator* pIterator); FS_API fs_bool32 fs_path_is_last(const fs_path_iterator* pIterator); FS_API int fs_path_iterators_compare(const fs_path_iterator* pIteratorA, const fs_path_iterator* pIteratorB); FS_API const char* fs_path_file_name(const char* pPath, size_t pathLen); /* Does *not* include the null terminator. Returns an offset of pPath. Will only be null terminated if pPath is. Returns null if the path ends with a slash. */ FS_API int fs_path_directory(char* pDst, size_t dstCap, const char* pPath, size_t pathLen); /* Returns the length, or < 0 on error. pDst can be null in which case the required length will be returned. Will not include a trailing slash. */ FS_API const char* fs_path_extension(const char* pPath, size_t pathLen); /* Does *not* include the null terminator. Returns an offset of pPath. Will only be null terminated if pPath is. Returns null if the extension cannot be found. */ FS_API fs_bool32 fs_path_extension_equal(const char* pPath, size_t pathLen, const char* pExtension, size_t extensionLen); /* Returns true if the extension is equal to the given extension. Case insensitive. */ FS_API const char* fs_path_trim_base(const char* pPath, size_t pathLen, const char* pBasePath, size_t basePathLen); FS_API int fs_path_append(char* pDst, size_t dstCap, const char* pBasePath, size_t basePathLen, const char* pPathToAppend, size_t pathToAppendLen); /* pDst can be equal to pBasePath in which case it will be appended in-place. pDst can be null in which case the function will return the required length. */ FS_API int fs_path_normalize(char* pDst, size_t dstCap, const char* pPath, size_t pathLen, unsigned int options); /* The only root component recognized is "/". The path cannot start with "C:", "//

", etc. This is not intended to be a general cross-platform path normalization routine. If the path starts with "/", this will fail with a negative result code if normalization would result in the path going above the root directory. Will convert all separators to "/". Will remove trailing slash. pDst can be null in which case the required length will be returned. */ /* END fs_path.h */ /* BEG fs_memory_stream.h */ /* Memory streams support both reading and writing within the same stream. To only support read-only mode, use fs_memory_stream_init_readonly(). With this you can pass in a standard data/size pair. If you need writing support, use fs_memory_stream_init_write(). When writing data, the stream will output to a buffer that is owned by the stream. When you need to access the data, do so by inspecting the pointer directly with `stream.write.pData` and `stream.write.dataSize`. This mode also supports reading. You can overwrite data by seeking to the required location and then just writing like normal. To append data, just seek to the end: fs_memory_stream_seek(pStream, 0, fs_SEEK_ORIGIN_END); The memory stream need not be uninitialized in read-only mode. In write mode you can use `fs_memory_stream_uninit()` to free the data. Alternatively you can just take ownership of the buffer and free it yourself with `fs_free()`. Below is an example for write mode. ```c fs_memory_stream stream; fs_memory_stream_init_write(NULL, &stream); // Write some data to the stream... fs_memory_stream_write(&stream, pSomeData, someDataSize, NULL); // Do something with the data. do_something_with_my_data(stream.write.pData, stream.write.dataSize); ``` To free the data, you can use `fs_memory_stream_uninit()`, or you can take ownership of the data and free it yourself with `fs_free()`: ```c fs_memory_stream_uninit(&stream); ``` Or to take ownership: ```c size_t dataSize; void* pData = fs_memory_stream_take_ownership(&stream, &dataSize); ``` With the above, `pData` will be the pointer to the data and `dataSize` will be the size of the data and you will be responsible for deleting the buffer with `fs_free()`. Read mode is simpler: ```c fs_memory_stream stream; fs_memory_stream_init_readonly(pData, dataSize, &stream); // Read some data. fs_memory_stream_read(&stream, &myBuffer, bytesToRead, NULL); ``` There is only one cursor. As you read and write the cursor will move forward. If you need to read and write from different locations from the same fs_memory_stream object, you need to seek before doing your read or write. You cannot read and write at the same time across multiple threads for the same fs_memory_stream object. */ typedef struct fs_memory_stream fs_memory_stream; struct fs_memory_stream { fs_stream base; void** ppData; /* Will be set to &readonly.pData in readonly mode. */ size_t* pDataSize; /* Will be set to &readonly.dataSize in readonly mode. */ struct { const void* pData; size_t dataSize; } readonly; struct { void* pData; /* Will only be set in write mode. */ size_t dataSize; size_t dataCap; } write; size_t cursor; fs_allocation_callbacks allocationCallbacks; /* This is copied from the allocation callbacks passed in from e_memory_stream_init(). Only used in write mode. */ }; FS_API fs_result fs_memory_stream_init_write(const fs_allocation_callbacks* pAllocationCallbacks, fs_memory_stream* pStream); FS_API fs_result fs_memory_stream_init_readonly(const void* pData, size_t dataSize, fs_memory_stream* pStream); FS_API void fs_memory_stream_uninit(fs_memory_stream* pStream); /* Only needed for write mode. This will free the internal pointer so make sure you've done what you need to do with it. */ FS_API fs_result fs_memory_stream_read(fs_memory_stream* pStream, void* pDst, size_t bytesToRead, size_t* pBytesRead); FS_API fs_result fs_memory_stream_write(fs_memory_stream* pStream, const void* pSrc, size_t bytesToWrite, size_t* pBytesWritten); FS_API fs_result fs_memory_stream_seek(fs_memory_stream* pStream, fs_int64 offset, int origin); FS_API fs_result fs_memory_stream_tell(fs_memory_stream* pStream, size_t* pCursor); FS_API fs_result fs_memory_stream_remove(fs_memory_stream* pStream, size_t offset, size_t size); FS_API fs_result fs_memory_stream_truncate(fs_memory_stream* pStream); FS_API void* fs_memory_stream_take_ownership(fs_memory_stream* pStream, size_t* pSize); /* Takes ownership of the buffer. The caller is responsible for freeing the buffer with fs_free(). Only valid in write mode. */ /* END fs_memory_stream.h */ /* BEG fs_utils.h */ FS_API void fs_sort(void* pBase, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData); FS_API void* fs_binary_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData); FS_API void* fs_linear_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData); FS_API void* fs_sorted_search(const void* pKey, const void* pList, size_t count, size_t stride, int (*compareProc)(void*, const void*, const void*), void* pUserData); FS_API int fs_strnicmp(const char* str1, const char* str2, size_t count); /* END fs_utils.h */ /* BEG fs_snprintf.h */ FS_API int fs_vsprintf(char* buf, char const* fmt, va_list va); FS_API int fs_vsnprintf(char* buf, size_t count, char const* fmt, va_list va); FS_API int fs_sprintf(char* buf, char const* fmt, ...) FS_ATTRIBUTE_FORMAT(2, 3); FS_API int fs_snprintf(char* buf, size_t count, char const* fmt, ...) FS_ATTRIBUTE_FORMAT(3, 4); /* END fs_snprintf.h */ #if defined(__cplusplus) } #endif #endif /* fs_h */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ miniaudio-0.11.22/extras/000077500000000000000000000000001475701111600151445ustar00rootroot00000000000000miniaudio-0.11.22/extras/decoders/000077500000000000000000000000001475701111600167345ustar00rootroot00000000000000miniaudio-0.11.22/extras/decoders/libopus/000077500000000000000000000000001475701111600204115ustar00rootroot00000000000000miniaudio-0.11.22/extras/decoders/libopus/miniaudio_libopus.c000066400000000000000000000350721475701111600242770ustar00rootroot00000000000000#ifndef miniaudio_libopus_c #define miniaudio_libopus_c #include "miniaudio_libopus.h" #if !defined(MA_NO_LIBOPUS) #include #endif #include /* For memset(). */ #include static ma_result ma_libopus_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_libopus_read_pcm_frames((ma_libopus*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_libopus_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_libopus_seek_to_pcm_frame((ma_libopus*)pDataSource, frameIndex); } static ma_result ma_libopus_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_libopus_get_data_format((ma_libopus*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_libopus_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_libopus_get_cursor_in_pcm_frames((ma_libopus*)pDataSource, pCursor); } static ma_result ma_libopus_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_libopus_get_length_in_pcm_frames((ma_libopus*)pDataSource, pLength); } static ma_data_source_vtable g_ma_libopus_ds_vtable = { ma_libopus_ds_read, ma_libopus_ds_seek, ma_libopus_ds_get_data_format, ma_libopus_ds_get_cursor, ma_libopus_ds_get_length, NULL, /* onSetLooping */ 0 /* flags */ }; #if !defined(MA_NO_LIBOPUS) static int ma_libopus_of_callback__read(void* pUserData, unsigned char* pBufferOut, int bytesToRead) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; size_t bytesRead; result = pOpus->onRead(pOpus->pReadSeekTellUserData, (void*)pBufferOut, bytesToRead, &bytesRead); if (result != MA_SUCCESS) { return -1; } return (int)bytesRead; } static int ma_libopus_of_callback__seek(void* pUserData, ogg_int64_t offset, int whence) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; ma_seek_origin origin; if (whence == SEEK_SET) { origin = ma_seek_origin_start; } else if (whence == SEEK_END) { origin = ma_seek_origin_end; } else { origin = ma_seek_origin_current; } result = pOpus->onSeek(pOpus->pReadSeekTellUserData, offset, origin); if (result != MA_SUCCESS) { return -1; } return 0; } static opus_int64 ma_libopus_of_callback__tell(void* pUserData) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; ma_int64 cursor; if (pOpus->onTell == NULL) { return -1; } result = pOpus->onTell(pOpus->pReadSeekTellUserData, &cursor); if (result != MA_SUCCESS) { return -1; } return cursor; } #endif static ma_result ma_libopus_init_internal(const ma_decoding_backend_config* pConfig, ma_libopus* pOpus) { ma_result result; ma_data_source_config dataSourceConfig; if (pOpus == NULL) { return MA_INVALID_ARGS; } memset(pOpus, 0, sizeof(*pOpus)); pOpus->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pOpus->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_libopus_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pOpus->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } MA_API ma_result ma_libopus_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libopus. */ result = ma_libopus_init_internal(pConfig, pOpus); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pOpus->onRead = onRead; pOpus->onSeek = onSeek; pOpus->onTell = onTell; pOpus->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_LIBOPUS) { int libopusResult; OpusFileCallbacks libopusCallbacks; /* We can now initialize the Opus decoder. This must be done after we've set up the callbacks. */ libopusCallbacks.read = ma_libopus_of_callback__read; libopusCallbacks.seek = ma_libopus_of_callback__seek; libopusCallbacks.close = NULL; libopusCallbacks.tell = ma_libopus_of_callback__tell; pOpus->of = op_open_callbacks(pOpus, &libopusCallbacks, NULL, 0, &libopusResult); if (pOpus->of == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libopus is disabled. */ return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libopus. */ result = ma_libopus_init_internal(pConfig, pOpus); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_LIBOPUS) { int libopusResult; pOpus->of = op_open_file(pFilePath, &libopusResult); if (pOpus->of == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libopus is disabled. */ (void)pFilePath; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_libopus_uninit(ma_libopus* pOpus, const ma_allocation_callbacks* pAllocationCallbacks) { if (pOpus == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_LIBOPUS) { op_free((OggOpusFile*)pOpus->of); } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); } #endif ma_data_source_uninit(&pOpus->ds); } MA_API ma_result ma_libopus_read_pcm_frames(ma_libopus* pOpus, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead; ma_format format; ma_uint32 channels; ma_libopus_get_data_format(pOpus, &format, &channels, NULL, NULL, 0); totalFramesRead = 0; while (totalFramesRead < frameCount) { long libopusResult; ma_uint64 framesToRead; ma_uint64 framesRemaining; framesRemaining = (frameCount - totalFramesRead); framesToRead = 1024; if (framesToRead > framesRemaining) { framesToRead = framesRemaining; } if (format == ma_format_f32) { libopusResult = op_read_float((OggOpusFile*)pOpus->of, (float* )ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)(framesToRead * channels), NULL); } else { libopusResult = op_read ((OggOpusFile*)pOpus->of, (opus_int16*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)(framesToRead * channels), NULL); } if (libopusResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { totalFramesRead += libopusResult; if (libopusResult == 0) { result = MA_AT_END; break; } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_seek_to_pcm_frame(ma_libopus* pOpus, ma_uint64 frameIndex) { if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { int libopusResult = op_pcm_seek((OggOpusFile*)pOpus->of, (ogg_int64_t)frameIndex); if (libopusResult != 0) { if (libopusResult == OP_ENOSEEK) { return MA_INVALID_OPERATION; /* Not seekable. */ } else if (libopusResult == OP_EINVAL) { return MA_INVALID_ARGS; } else { return MA_ERROR; } } return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_data_format(ma_libopus* pOpus, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { memset(pChannelMap, 0, sizeof(*pChannelMap) * channelMapCap); } if (pOpus == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pOpus->format; } #if !defined(MA_NO_LIBOPUS) { ma_uint32 channels = op_channel_count((OggOpusFile*)pOpus->of, -1); if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = 48000; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, channels); } return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_cursor_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { ogg_int64_t offset = op_pcm_tell((OggOpusFile*)pOpus->of); if (offset < 0) { return MA_INVALID_FILE; } *pCursor = (ma_uint64)offset; return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_length_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { ogg_int64_t length = op_pcm_total((OggOpusFile*)pOpus->of, -1); if (length < 0) { return MA_ERROR; } *pLength = (ma_uint64)length; return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } /* The code below defines the vtable that you'll plug into your `ma_decoder_config` object. */ #if !defined(MA_NO_LIBOPUS) static ma_result ma_decoding_backend_init__libopus(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_libopus* pOpus; (void)pUserData; pOpus = (ma_libopus*)ma_malloc(sizeof(*pOpus), pAllocationCallbacks); if (pOpus == NULL) { return MA_OUT_OF_MEMORY; } result = ma_libopus_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pOpus); if (result != MA_SUCCESS) { ma_free(pOpus, pAllocationCallbacks); return result; } *ppBackend = pOpus; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__libopus(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_libopus* pOpus; (void)pUserData; pOpus = (ma_libopus*)ma_malloc(sizeof(*pOpus), pAllocationCallbacks); if (pOpus == NULL) { return MA_OUT_OF_MEMORY; } result = ma_libopus_init_file(pFilePath, pConfig, pAllocationCallbacks, pOpus); if (result != MA_SUCCESS) { ma_free(pOpus, pAllocationCallbacks); return result; } *ppBackend = pOpus; return MA_SUCCESS; } static void ma_decoding_backend_uninit__libopus(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_libopus* pOpus = (ma_libopus*)pBackend; (void)pUserData; ma_libopus_uninit(pOpus, pAllocationCallbacks); ma_free(pOpus, pAllocationCallbacks); } static ma_decoding_backend_vtable ma_gDecodingBackendVTable_libopus = { ma_decoding_backend_init__libopus, ma_decoding_backend_init_file__libopus, NULL, /* onInitFileW() */ NULL, /* onInitMemory() */ ma_decoding_backend_uninit__libopus }; ma_decoding_backend_vtable* ma_decoding_backend_libopus = &ma_gDecodingBackendVTable_libopus; #else ma_decoding_backend_vtable* ma_decoding_backend_libopus = NULL; #endif #endif /* miniaudio_libopus_c */ miniaudio-0.11.22/extras/decoders/libopus/miniaudio_libopus.h000066400000000000000000000041271475701111600243010ustar00rootroot00000000000000/* This implements a data source that decodes Opus streams via libopus + libopusfile This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom decoding backend. See the custom_decoder example. */ #ifndef miniaudio_libopus_h #define miniaudio_libopus_h #ifdef __cplusplus extern "C" { #endif #include "../../../miniaudio.h" typedef struct { ma_data_source_base ds; /* The libopus decoder can be used independently as a data source. */ ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Will be either f32 or s16. */ /*OggOpusFile**/ void* of; /* Typed as void* so we can avoid a dependency on opusfile in the header section. */ } ma_libopus; MA_API ma_result ma_libopus_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus); MA_API ma_result ma_libopus_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus); MA_API void ma_libopus_uninit(ma_libopus* pOpus, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_libopus_read_pcm_frames(ma_libopus* pOpus, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_libopus_seek_to_pcm_frame(ma_libopus* pOpus, ma_uint64 frameIndex); MA_API ma_result ma_libopus_get_data_format(ma_libopus* pOpus, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_libopus_get_cursor_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pCursor); MA_API ma_result ma_libopus_get_length_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pLength); /* Decoding backend vtable. This is what you'll plug into ma_decoder_config.pBackendVTables. No user data required. */ extern ma_decoding_backend_vtable* ma_decoding_backend_libopus; #ifdef __cplusplus } #endif #endif /* miniaudio_libopus_h */ miniaudio-0.11.22/extras/decoders/libvorbis/000077500000000000000000000000001475701111600207275ustar00rootroot00000000000000miniaudio-0.11.22/extras/decoders/libvorbis/miniaudio_libvorbis.c000066400000000000000000000414361475701111600251340ustar00rootroot00000000000000#ifndef miniaudio_libvorbis_c #define miniaudio_libvorbis_c #include "miniaudio_libvorbis.h" #if !defined(MA_NO_LIBVORBIS) #ifndef OV_EXCLUDE_STATIC_CALLBACKS #define OV_EXCLUDE_STATIC_CALLBACKS #endif #include #endif #include /* For memset(). */ #include static ma_result ma_libvorbis_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_libvorbis_read_pcm_frames((ma_libvorbis*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_libvorbis_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_libvorbis_seek_to_pcm_frame((ma_libvorbis*)pDataSource, frameIndex); } static ma_result ma_libvorbis_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_libvorbis_get_data_format((ma_libvorbis*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_libvorbis_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_libvorbis_get_cursor_in_pcm_frames((ma_libvorbis*)pDataSource, pCursor); } static ma_result ma_libvorbis_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_libvorbis_get_length_in_pcm_frames((ma_libvorbis*)pDataSource, pLength); } static ma_data_source_vtable g_ma_libvorbis_ds_vtable = { ma_libvorbis_ds_read, ma_libvorbis_ds_seek, ma_libvorbis_ds_get_data_format, ma_libvorbis_ds_get_cursor, ma_libvorbis_ds_get_length, NULL, /* onSetLooping */ 0 /* flags */ }; #if !defined(MA_NO_LIBVORBIS) static size_t ma_libvorbis_vf_callback__read(void* pBufferOut, size_t size, size_t count, void* pUserData) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; size_t bytesToRead; size_t bytesRead; /* For consistency with fread(). If `size` of `count` is 0, return 0 immediately without changing anything. */ if (size == 0 || count == 0) { return 0; } bytesToRead = size * count; result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); if (result != MA_SUCCESS) { /* Not entirely sure what to return here. What if an error occurs, but some data was read and bytesRead is > 0? */ return 0; } return bytesRead / size; } static int ma_libvorbis_vf_callback__seek(void* pUserData, ogg_int64_t offset, int whence) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; ma_seek_origin origin; if (whence == SEEK_SET) { origin = ma_seek_origin_start; } else if (whence == SEEK_END) { origin = ma_seek_origin_end; } else { origin = ma_seek_origin_current; } result = pVorbis->onSeek(pVorbis->pReadSeekTellUserData, offset, origin); if (result != MA_SUCCESS) { return -1; } return 0; } static long ma_libvorbis_vf_callback__tell(void* pUserData) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; ma_int64 cursor; result = pVorbis->onTell(pVorbis->pReadSeekTellUserData, &cursor); if (result != MA_SUCCESS) { return -1; } return (long)cursor; } #endif static ma_result ma_libvorbis_init_internal(const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis) { ma_result result; ma_data_source_config dataSourceConfig; if (pVorbis == NULL) { return MA_INVALID_ARGS; } memset(pVorbis, 0, sizeof(*pVorbis)); pVorbis->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pVorbis->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_libvorbis_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pVorbis->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } #if !defined(MA_NO_LIBVORBIS) { pVorbis->vf = (OggVorbis_File*)ma_malloc(sizeof(OggVorbis_File), pAllocationCallbacks); if (pVorbis->vf == NULL) { ma_data_source_uninit(&pVorbis->ds); return MA_OUT_OF_MEMORY; } return MA_SUCCESS; } #else { /* libvorbis is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libvorbis. */ result = ma_libvorbis_init_internal(pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pVorbis->onRead = onRead; pVorbis->onSeek = onSeek; pVorbis->onTell = onTell; pVorbis->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult; ov_callbacks libvorbisCallbacks; /* We can now initialize the vorbis decoder. This must be done after we've set up the callbacks. */ libvorbisCallbacks.read_func = ma_libvorbis_vf_callback__read; libvorbisCallbacks.seek_func = ma_libvorbis_vf_callback__seek; libvorbisCallbacks.close_func = NULL; libvorbisCallbacks.tell_func = ma_libvorbis_vf_callback__tell; libvorbisResult = ov_open_callbacks(pVorbis, (OggVorbis_File*)pVorbis->vf, NULL, 0, libvorbisCallbacks); if (libvorbisResult < 0) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libvorbis is disabled. */ return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libvorbis. */ result = ma_libvorbis_init_internal(pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult; libvorbisResult = ov_fopen(pFilePath, (OggVorbis_File*)pVorbis->vf); if (libvorbisResult < 0) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libvorbis is disabled. */ (void)pFilePath; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_libvorbis_uninit(ma_libvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVorbis == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_LIBVORBIS) { ov_clear((OggVorbis_File*)pVorbis->vf); } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); } #endif ma_data_source_uninit(&pVorbis->ds); ma_free(pVorbis->vf, pAllocationCallbacks); } MA_API ma_result ma_libvorbis_read_pcm_frames(ma_libvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead; ma_format format; ma_uint32 channels; ma_libvorbis_get_data_format(pVorbis, &format, &channels, NULL, NULL, 0); totalFramesRead = 0; while (totalFramesRead < frameCount) { long libvorbisResult; ma_uint64 framesToRead; ma_uint64 framesRemaining; framesRemaining = (frameCount - totalFramesRead); framesToRead = 1024; if (framesToRead > framesRemaining) { framesToRead = framesRemaining; } if (format == ma_format_f32) { float** ppFramesF32; libvorbisResult = ov_read_float((OggVorbis_File*)pVorbis->vf, &ppFramesF32, (int)framesToRead, NULL); if (libvorbisResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { /* Frames need to be interleaved. */ ma_interleave_pcm_frames(format, channels, libvorbisResult, (const void**)ppFramesF32, ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels)); totalFramesRead += libvorbisResult; if (libvorbisResult == 0) { result = MA_AT_END; break; } } } else { libvorbisResult = ov_read((OggVorbis_File*)pVorbis->vf, (char*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)(framesToRead * ma_get_bytes_per_frame(format, channels)), 0, 2, 1, NULL); if (libvorbisResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { /* Conveniently, there's no need to interleaving when using ov_read(). I'm not sure why ov_read_float() is different in that regard... */ totalFramesRead += libvorbisResult / ma_get_bytes_per_frame(format, channels); if (libvorbisResult == 0) { result = MA_AT_END; break; } } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_seek_to_pcm_frame(ma_libvorbis* pVorbis, ma_uint64 frameIndex) { if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult = ov_pcm_seek((OggVorbis_File*)pVorbis->vf, (ogg_int64_t)frameIndex); if (libvorbisResult != 0) { if (libvorbisResult == OV_ENOSEEK) { return MA_INVALID_OPERATION; /* Not seekable. */ } else if (libvorbisResult == OV_EINVAL) { return MA_INVALID_ARGS; } else { return MA_ERROR; } } return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_data_format(ma_libvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { memset(pChannelMap, 0, sizeof(*pChannelMap) * channelMapCap); } if (pVorbis == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pVorbis->format; } #if !defined(MA_NO_LIBVORBIS) { vorbis_info* pInfo = ov_info((OggVorbis_File*)pVorbis->vf, 0); if (pInfo == NULL) { return MA_INVALID_OPERATION; } if (pChannels != NULL) { *pChannels = pInfo->channels; } if (pSampleRate != NULL) { *pSampleRate = pInfo->rate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, pInfo->channels); } return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_cursor_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { ogg_int64_t offset = ov_pcm_tell((OggVorbis_File*)pVorbis->vf); if (offset < 0) { return MA_INVALID_FILE; } *pCursor = (ma_uint64)offset; return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_length_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { /* I don't know how to reliably retrieve the length in frames using libvorbis, so returning 0 for now. */ *pLength = 0; return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ assert(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } /* The code below defines the vtable that you'll plug into your `ma_decoder_config` object. */ #if !defined(MA_NO_LIBVORBIS) static ma_result ma_decoding_backend_init__libvorbis(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_libvorbis* pVorbis; (void)pUserData; pVorbis = (ma_libvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_libvorbis_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__libvorbis(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_libvorbis* pVorbis; (void)pUserData; pVorbis = (ma_libvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_libvorbis_init_file(pFilePath, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static void ma_decoding_backend_uninit__libvorbis(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_libvorbis* pVorbis = (ma_libvorbis*)pBackend; (void)pUserData; ma_libvorbis_uninit(pVorbis, pAllocationCallbacks); ma_free(pVorbis, pAllocationCallbacks); } static ma_decoding_backend_vtable ma_gDecodingBackendVTable_libvorbis = { ma_decoding_backend_init__libvorbis, ma_decoding_backend_init_file__libvorbis, NULL, /* onInitFileW() */ NULL, /* onInitMemory() */ ma_decoding_backend_uninit__libvorbis }; ma_decoding_backend_vtable* ma_decoding_backend_libvorbis = &ma_gDecodingBackendVTable_libvorbis; #else ma_decoding_backend_vtable* ma_decoding_backend_libvorbis = NULL; #endif #endif /* miniaudio_libvorbis_c */ miniaudio-0.11.22/extras/decoders/libvorbis/miniaudio_libvorbis.h000066400000000000000000000042341475701111600251340ustar00rootroot00000000000000/* This implements a data source that decodes Vorbis streams via libvorbis + libvorbisfile This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom decoding backend. See the custom_decoder example. */ #ifndef miniaudio_libvorbis_h #define miniaudio_libvorbis_h #ifdef __cplusplus extern "C" { #endif #include "../../../miniaudio.h" typedef struct { ma_data_source_base ds; /* The libvorbis decoder can be used independently as a data source. */ ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Will be either f32 or s16. */ /*OggVorbis_File**/ void* vf; /* Typed as void* so we can avoid a dependency on opusfile in the header section. */ } ma_libvorbis; MA_API ma_result ma_libvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis); MA_API ma_result ma_libvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis); MA_API void ma_libvorbis_uninit(ma_libvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_libvorbis_read_pcm_frames(ma_libvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_libvorbis_seek_to_pcm_frame(ma_libvorbis* pVorbis, ma_uint64 frameIndex); MA_API ma_result ma_libvorbis_get_data_format(ma_libvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_libvorbis_get_cursor_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pCursor); MA_API ma_result ma_libvorbis_get_length_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pLength); /* Decoding backend vtable. This is what you'll plug into ma_decoder_config.pBackendVTables. No user data required. */ extern ma_decoding_backend_vtable* ma_decoding_backend_libvorbis; #ifdef __cplusplus } #endif #endif /* miniaudio_libvorbis_h */ miniaudio-0.11.22/extras/miniaudio_libopus.h000066400000000000000000000337361475701111600210440ustar00rootroot00000000000000/* THIS HAS BEEN DEPRECATED! Use the libopus decoder in extras/decoders/libopus instead. */ /* This implements a data source that decodes Opus streams via libopus + libopusfile This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom decoding backend. See the custom_decoder example. You need to include this file after miniaudio.h. */ #ifndef miniaudio_libopus_h #define miniaudio_libopus_h #ifdef __cplusplus extern "C" { #endif #if !defined(MA_NO_LIBOPUS) #include #endif typedef struct { ma_data_source_base ds; /* The libopus decoder can be used independently as a data source. */ ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Will be either f32 or s16. */ #if !defined(MA_NO_LIBOPUS) OggOpusFile* of; #endif } ma_libopus; MA_API ma_result ma_libopus_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus); MA_API ma_result ma_libopus_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus); MA_API void ma_libopus_uninit(ma_libopus* pOpus, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_libopus_read_pcm_frames(ma_libopus* pOpus, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_libopus_seek_to_pcm_frame(ma_libopus* pOpus, ma_uint64 frameIndex); MA_API ma_result ma_libopus_get_data_format(ma_libopus* pOpus, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_libopus_get_cursor_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pCursor); MA_API ma_result ma_libopus_get_length_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pLength); #ifdef __cplusplus } #endif #endif #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION) static ma_result ma_libopus_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_libopus_read_pcm_frames((ma_libopus*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_libopus_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_libopus_seek_to_pcm_frame((ma_libopus*)pDataSource, frameIndex); } static ma_result ma_libopus_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_libopus_get_data_format((ma_libopus*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_libopus_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_libopus_get_cursor_in_pcm_frames((ma_libopus*)pDataSource, pCursor); } static ma_result ma_libopus_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_libopus_get_length_in_pcm_frames((ma_libopus*)pDataSource, pLength); } static ma_data_source_vtable g_ma_libopus_ds_vtable = { ma_libopus_ds_read, ma_libopus_ds_seek, ma_libopus_ds_get_data_format, ma_libopus_ds_get_cursor, ma_libopus_ds_get_length }; #if !defined(MA_NO_LIBOPUS) static int ma_libopus_of_callback__read(void* pUserData, unsigned char* pBufferOut, int bytesToRead) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; size_t bytesRead; result = pOpus->onRead(pOpus->pReadSeekTellUserData, (void*)pBufferOut, bytesToRead, &bytesRead); if (result != MA_SUCCESS) { return -1; } return (int)bytesRead; } static int ma_libopus_of_callback__seek(void* pUserData, ogg_int64_t offset, int whence) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; ma_seek_origin origin; if (whence == SEEK_SET) { origin = ma_seek_origin_start; } else if (whence == SEEK_END) { origin = ma_seek_origin_end; } else { origin = ma_seek_origin_current; } result = pOpus->onSeek(pOpus->pReadSeekTellUserData, offset, origin); if (result != MA_SUCCESS) { return -1; } return 0; } static opus_int64 ma_libopus_of_callback__tell(void* pUserData) { ma_libopus* pOpus = (ma_libopus*)pUserData; ma_result result; ma_int64 cursor; if (pOpus->onTell == NULL) { return -1; } result = pOpus->onTell(pOpus->pReadSeekTellUserData, &cursor); if (result != MA_SUCCESS) { return -1; } return cursor; } #endif static ma_result ma_libopus_init_internal(const ma_decoding_backend_config* pConfig, ma_libopus* pOpus) { ma_result result; ma_data_source_config dataSourceConfig; if (pOpus == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pOpus); pOpus->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pOpus->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_libopus_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pOpus->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } MA_API ma_result ma_libopus_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libopus. */ result = ma_libopus_init_internal(pConfig, pOpus); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pOpus->onRead = onRead; pOpus->onSeek = onSeek; pOpus->onTell = onTell; pOpus->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_LIBOPUS) { int libopusResult; OpusFileCallbacks libopusCallbacks; /* We can now initialize the Opus decoder. This must be done after we've set up the callbacks. */ libopusCallbacks.read = ma_libopus_of_callback__read; libopusCallbacks.seek = ma_libopus_of_callback__seek; libopusCallbacks.close = NULL; libopusCallbacks.tell = ma_libopus_of_callback__tell; pOpus->of = op_open_callbacks(pOpus, &libopusCallbacks, NULL, 0, &libopusResult); if (pOpus->of == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libopus is disabled. */ return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libopus* pOpus) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libopus. */ result = ma_libopus_init_internal(pConfig, pOpus); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_LIBOPUS) { int libopusResult; pOpus->of = op_open_file(pFilePath, &libopusResult); if (pOpus->of == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libopus is disabled. */ (void)pFilePath; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_libopus_uninit(ma_libopus* pOpus, const ma_allocation_callbacks* pAllocationCallbacks) { if (pOpus == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_LIBOPUS) { op_free(pOpus->of); } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pOpus->ds); } MA_API ma_result ma_libopus_read_pcm_frames(ma_libopus* pOpus, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead; ma_format format; ma_uint32 channels; ma_libopus_get_data_format(pOpus, &format, &channels, NULL, NULL, 0); totalFramesRead = 0; while (totalFramesRead < frameCount) { long libopusResult; int framesToRead; ma_uint64 framesRemaining; framesRemaining = (frameCount - totalFramesRead); framesToRead = 1024; if (framesToRead > framesRemaining) { framesToRead = (int)framesRemaining; } if (format == ma_format_f32) { libopusResult = op_read_float(pOpus->of, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL); } else { libopusResult = op_read (pOpus->of, (opus_int16*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * channels, NULL); } if (libopusResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { totalFramesRead += libopusResult; if (libopusResult == 0) { result = MA_AT_END; break; } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_seek_to_pcm_frame(ma_libopus* pOpus, ma_uint64 frameIndex) { if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { int libopusResult = op_pcm_seek(pOpus->of, (ogg_int64_t)frameIndex); if (libopusResult != 0) { if (libopusResult == OP_ENOSEEK) { return MA_INVALID_OPERATION; /* Not seekable. */ } else if (libopusResult == OP_EINVAL) { return MA_INVALID_ARGS; } else { return MA_ERROR; } } return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_data_format(ma_libopus* pOpus, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pOpus == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pOpus->format; } #if !defined(MA_NO_LIBOPUS) { ma_uint32 channels = op_channel_count(pOpus->of, -1); if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = 48000; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, channels); } return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_cursor_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { ogg_int64_t offset = op_pcm_tell(pOpus->of); if (offset < 0) { return MA_INVALID_FILE; } *pCursor = (ma_uint64)offset; return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libopus_get_length_in_pcm_frames(ma_libopus* pOpus, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pOpus == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBOPUS) { ogg_int64_t length = op_pcm_total(pOpus->of, -1); if (length < 0) { return MA_ERROR; } *pLength = (ma_uint64)length; return MA_SUCCESS; } #else { /* libopus is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } #endif miniaudio-0.11.22/extras/miniaudio_libvorbis.h000066400000000000000000000371511475701111600213550ustar00rootroot00000000000000/* THIS HAS BEEN DEPRECATED! Use the libvorbis decoder in extras/decoders/libvorbis instead. */ /* This implements a data source that decodes Vorbis streams via libvorbis + libvorbisfile This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom decoding backend. See the custom_decoder example. You need to include this file after miniaudio.h. */ #ifndef miniaudio_libvorbis_h #define miniaudio_libvorbis_h #ifdef __cplusplus extern "C" { #endif #if !defined(MA_NO_LIBVORBIS) #ifndef OV_EXCLUDE_STATIC_CALLBACKS #define OV_EXCLUDE_STATIC_CALLBACKS #endif #include #endif typedef struct { ma_data_source_base ds; /* The libvorbis decoder can be used independently as a data source. */ ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Will be either f32 or s16. */ #if !defined(MA_NO_LIBVORBIS) OggVorbis_File vf; #endif } ma_libvorbis; MA_API ma_result ma_libvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis); MA_API ma_result ma_libvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis); MA_API void ma_libvorbis_uninit(ma_libvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_libvorbis_read_pcm_frames(ma_libvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_libvorbis_seek_to_pcm_frame(ma_libvorbis* pVorbis, ma_uint64 frameIndex); MA_API ma_result ma_libvorbis_get_data_format(ma_libvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_libvorbis_get_cursor_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pCursor); MA_API ma_result ma_libvorbis_get_length_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pLength); #ifdef __cplusplus } #endif #endif #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION) static ma_result ma_libvorbis_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_libvorbis_read_pcm_frames((ma_libvorbis*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_libvorbis_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_libvorbis_seek_to_pcm_frame((ma_libvorbis*)pDataSource, frameIndex); } static ma_result ma_libvorbis_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_libvorbis_get_data_format((ma_libvorbis*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_libvorbis_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_libvorbis_get_cursor_in_pcm_frames((ma_libvorbis*)pDataSource, pCursor); } static ma_result ma_libvorbis_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_libvorbis_get_length_in_pcm_frames((ma_libvorbis*)pDataSource, pLength); } static ma_data_source_vtable g_ma_libvorbis_ds_vtable = { ma_libvorbis_ds_read, ma_libvorbis_ds_seek, ma_libvorbis_ds_get_data_format, ma_libvorbis_ds_get_cursor, ma_libvorbis_ds_get_length }; #if !defined(MA_NO_LIBVORBIS) static size_t ma_libvorbis_vf_callback__read(void* pBufferOut, size_t size, size_t count, void* pUserData) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; size_t bytesToRead; size_t bytesRead; /* For consistency with fread(). If `size` of `count` is 0, return 0 immediately without changing anything. */ if (size == 0 || count == 0) { return 0; } bytesToRead = size * count; result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); if (result != MA_SUCCESS) { /* Not entirely sure what to return here. What if an error occurs, but some data was read and bytesRead is > 0? */ return 0; } return bytesRead / size; } static int ma_libvorbis_vf_callback__seek(void* pUserData, ogg_int64_t offset, int whence) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; ma_seek_origin origin; if (whence == SEEK_SET) { origin = ma_seek_origin_start; } else if (whence == SEEK_END) { origin = ma_seek_origin_end; } else { origin = ma_seek_origin_current; } result = pVorbis->onSeek(pVorbis->pReadSeekTellUserData, offset, origin); if (result != MA_SUCCESS) { return -1; } return 0; } static long ma_libvorbis_vf_callback__tell(void* pUserData) { ma_libvorbis* pVorbis = (ma_libvorbis*)pUserData; ma_result result; ma_int64 cursor; result = pVorbis->onTell(pVorbis->pReadSeekTellUserData, &cursor); if (result != MA_SUCCESS) { return -1; } return (long)cursor; } #endif static ma_result ma_libvorbis_init_internal(const ma_decoding_backend_config* pConfig, ma_libvorbis* pVorbis) { ma_result result; ma_data_source_config dataSourceConfig; if (pVorbis == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pVorbis); pVorbis->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pVorbis->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_libvorbis_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pVorbis->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } MA_API ma_result ma_libvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libvorbis. */ result = ma_libvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pVorbis->onRead = onRead; pVorbis->onSeek = onSeek; pVorbis->onTell = onTell; pVorbis->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult; ov_callbacks libvorbisCallbacks; /* We can now initialize the vorbis decoder. This must be done after we've set up the callbacks. */ libvorbisCallbacks.read_func = ma_libvorbis_vf_callback__read; libvorbisCallbacks.seek_func = ma_libvorbis_vf_callback__seek; libvorbisCallbacks.close_func = NULL; libvorbisCallbacks.tell_func = ma_libvorbis_vf_callback__tell; libvorbisResult = ov_open_callbacks(pVorbis, &pVorbis->vf, NULL, 0, libvorbisCallbacks); if (libvorbisResult < 0) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libvorbis is disabled. */ return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_libvorbis* pVorbis) { ma_result result; (void)pAllocationCallbacks; /* Can't seem to find a way to configure memory allocations in libvorbis. */ result = ma_libvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult; libvorbisResult = ov_fopen(pFilePath, &pVorbis->vf); if (libvorbisResult < 0) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* libvorbis is disabled. */ (void)pFilePath; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_libvorbis_uninit(ma_libvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVorbis == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_LIBVORBIS) { ov_clear(&pVorbis->vf); } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pVorbis->ds); } MA_API ma_result ma_libvorbis_read_pcm_frames(ma_libvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead; ma_format format; ma_uint32 channels; ma_libvorbis_get_data_format(pVorbis, &format, &channels, NULL, NULL, 0); totalFramesRead = 0; while (totalFramesRead < frameCount) { long libvorbisResult; int framesToRead; ma_uint64 framesRemaining; framesRemaining = (frameCount - totalFramesRead); framesToRead = 1024; if (framesToRead > framesRemaining) { framesToRead = (int)framesRemaining; } if (format == ma_format_f32) { float** ppFramesF32; libvorbisResult = ov_read_float(&pVorbis->vf, &ppFramesF32, framesToRead, NULL); if (libvorbisResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { /* Frames need to be interleaved. */ ma_interleave_pcm_frames(format, channels, libvorbisResult, (const void**)ppFramesF32, ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels)); totalFramesRead += libvorbisResult; if (libvorbisResult == 0) { result = MA_AT_END; break; } } } else { libvorbisResult = ov_read(&pVorbis->vf, (char*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), framesToRead * ma_get_bytes_per_frame(format, channels), 0, 2, 1, NULL); if (libvorbisResult < 0) { result = MA_ERROR; /* Error while decoding. */ break; } else { /* Conveniently, there's no need to interleaving when using ov_read(). I'm not sure why ov_read_float() is different in that regard... */ totalFramesRead += libvorbisResult / ma_get_bytes_per_frame(format, channels); if (libvorbisResult == 0) { result = MA_AT_END; break; } } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_seek_to_pcm_frame(ma_libvorbis* pVorbis, ma_uint64 frameIndex) { if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { int libvorbisResult = ov_pcm_seek(&pVorbis->vf, (ogg_int64_t)frameIndex); if (libvorbisResult != 0) { if (libvorbisResult == OV_ENOSEEK) { return MA_INVALID_OPERATION; /* Not seekable. */ } else if (libvorbisResult == OV_EINVAL) { return MA_INVALID_ARGS; } else { return MA_ERROR; } } return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_data_format(ma_libvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pVorbis == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pVorbis->format; } #if !defined(MA_NO_LIBVORBIS) { vorbis_info* pInfo = ov_info(&pVorbis->vf, 0); if (pInfo == NULL) { return MA_INVALID_OPERATION; } if (pChannels != NULL) { *pChannels = pInfo->channels; } if (pSampleRate != NULL) { *pSampleRate = pInfo->rate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, pInfo->channels); } return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_cursor_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { ogg_int64_t offset = ov_pcm_tell(&pVorbis->vf); if (offset < 0) { return MA_INVALID_FILE; } *pCursor = (ma_uint64)offset; return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_libvorbis_get_length_in_pcm_frames(ma_libvorbis* pVorbis, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_LIBVORBIS) { /* I don't know how to reliably retrieve the length in frames using libvorbis, so returning 0 for now. */ *pLength = 0; return MA_SUCCESS; } #else { /* libvorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } #endif miniaudio-0.11.22/extras/miniaudio_split/000077500000000000000000000000001475701111600203355ustar00rootroot00000000000000miniaudio-0.11.22/extras/miniaudio_split/README.md000066400000000000000000000007771475701111600216270ustar00rootroot00000000000000These files split the main library into separate .h and .c files. This is intended for those who prefer separate files or whose build environment better suits this configuration. The files here are generated from a tool based on the content in the main miniaudio.h file. Do not edit these files directly. If you want to contribute, please make the contribution in the main file. This is not always up to date with the most recent commit in the dev branch, but will usually be up to date with the master branch.miniaudio-0.11.22/extras/miniaudio_split/miniaudio.c000066400000000000000000151523771475701111600225040ustar00rootroot00000000000000/* Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file. miniaudio - v0.11.22 - 2025-02-24 David Reid - mackron@gmail.com Website: https://miniaud.io Documentation: https://miniaud.io/docs GitHub: https://github.com/mackron/miniaudio */ #include "miniaudio.h" #ifndef miniaudio_c #define miniaudio_c #include #include /* For INT_MAX */ #include /* sin(), etc. */ #include /* For malloc(), free(), wcstombs(). */ #include /* For memset() */ #include #include #if !defined(_MSC_VER) && !defined(__DMC__) #include /* For strcasecmp(). */ #include /* For wcslen(), wcsrtombs() */ #endif #ifdef _MSC_VER #include /* For _controlfp_s constants */ #endif #if defined(MA_WIN32) #include /* There's a possibility that WIN32_LEAN_AND_MEAN has been defined which will exclude some symbols such as STGM_READ and CLSCTL_ALL. We need to check these and define them ourselves if they're unavailable. */ #ifndef STGM_READ #define STGM_READ 0x00000000L #endif #ifndef CLSCTX_ALL #define CLSCTX_ALL 23 #endif /* IUnknown is used by both the WASAPI and DirectSound backends. It easier to just declare our version here. */ typedef struct ma_IUnknown ma_IUnknown; #endif #if !defined(MA_WIN32) #include #include /* select() (used for ma_sleep()). */ #include #endif #ifdef MA_NX #include /* For nanosleep() */ #endif #include /* For fstat(), etc. */ #ifdef MA_EMSCRIPTEN #include #endif /* Architecture Detection */ #if !defined(MA_64BIT) && !defined(MA_32BIT) #ifdef _WIN32 #ifdef _WIN64 #define MA_64BIT #else #define MA_32BIT #endif #endif #endif #if !defined(MA_64BIT) && !defined(MA_32BIT) #ifdef __GNUC__ #ifdef __LP64__ #define MA_64BIT #else #define MA_32BIT #endif #endif #endif #if !defined(MA_64BIT) && !defined(MA_32BIT) #include #if INTPTR_MAX == INT64_MAX #define MA_64BIT #else #define MA_32BIT #endif #endif #if defined(__arm__) || defined(_M_ARM) #define MA_ARM32 #endif #if defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) #define MA_ARM64 #endif #if defined(__x86_64__) || defined(_M_X64) #define MA_X64 #elif defined(__i386) || defined(_M_IX86) #define MA_X86 #elif defined(MA_ARM32) || defined(MA_ARM64) #define MA_ARM #endif /* Intrinsics Support */ #if (defined(MA_X64) || defined(MA_X86)) && !defined(__COSMOPOLITAN__) #if defined(_MSC_VER) && !defined(__clang__) /* MSVC. */ #if _MSC_VER >= 1400 && !defined(MA_NO_SSE2) /* 2005 */ #define MA_SUPPORT_SSE2 #endif /*#if _MSC_VER >= 1600 && !defined(MA_NO_AVX)*/ /* 2010 */ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if _MSC_VER >= 1700 && !defined(MA_NO_AVX2) /* 2012 */ #define MA_SUPPORT_AVX2 #endif #else /* Assume GNUC-style. */ #if defined(__SSE2__) && !defined(MA_NO_SSE2) #define MA_SUPPORT_SSE2 #endif /*#if defined(__AVX__) && !defined(MA_NO_AVX)*/ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if defined(__AVX2__) && !defined(MA_NO_AVX2) #define MA_SUPPORT_AVX2 #endif #endif /* If at this point we still haven't determined compiler support for the intrinsics just fall back to __has_include. */ #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include) #if !defined(MA_SUPPORT_SSE2) && !defined(MA_NO_SSE2) && __has_include() #define MA_SUPPORT_SSE2 #endif /*#if !defined(MA_SUPPORT_AVX) && !defined(MA_NO_AVX) && __has_include()*/ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if !defined(MA_SUPPORT_AVX2) && !defined(MA_NO_AVX2) && __has_include() #define MA_SUPPORT_AVX2 #endif #endif #if defined(MA_SUPPORT_AVX2) || defined(MA_SUPPORT_AVX) #include #elif defined(MA_SUPPORT_SSE2) #include #endif #endif #if defined(MA_ARM) #if !defined(MA_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) #define MA_SUPPORT_NEON #include #endif #endif /* Begin globally disabled warnings. */ #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4752) /* found Intel(R) Advanced Vector Extensions; consider using /arch:AVX */ #pragma warning(disable:4049) /* compiler limit : terminating line number emission */ #endif #if defined(MA_X64) || defined(MA_X86) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 #include static MA_INLINE void ma_cpuid(int info[4], int fid) { __cpuid(info, fid); } #else #define MA_NO_CPUID #endif #if _MSC_VER >= 1600 && (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219) static MA_INLINE unsigned __int64 ma_xgetbv(int reg) { return _xgetbv(reg); } #else #define MA_NO_XGETBV #endif #elif (defined(__GNUC__) || defined(__clang__)) && !defined(MA_ANDROID) static MA_INLINE void ma_cpuid(int info[4], int fid) { /* It looks like the -fPIC option uses the ebx register which GCC complains about. We can work around this by just using a different register, the specific register of which I'm letting the compiler decide on. The "k" prefix is used to specify a 32-bit register. The {...} syntax is for supporting different assembly dialects. What's basically happening is that we're saving and restoring the ebx register manually. */ #if defined(MA_X86) && defined(__PIC__) __asm__ __volatile__ ( "xchg{l} {%%}ebx, %k1;" "cpuid;" "xchg{l} {%%}ebx, %k1;" : "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #else __asm__ __volatile__ ( "cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #endif } static MA_INLINE ma_uint64 ma_xgetbv(int reg) { unsigned int hi; unsigned int lo; __asm__ __volatile__ ( "xgetbv" : "=a"(lo), "=d"(hi) : "c"(reg) ); return ((ma_uint64)hi << 32) | (ma_uint64)lo; } #else #define MA_NO_CPUID #define MA_NO_XGETBV #endif #else #define MA_NO_CPUID #define MA_NO_XGETBV #endif static MA_INLINE ma_bool32 ma_has_sse2(void) { #if defined(MA_SUPPORT_SSE2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_SSE2) #if defined(MA_X64) return MA_TRUE; /* 64-bit targets always support SSE2. */ #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__) return MA_TRUE; /* If the compiler is allowed to freely generate SSE2 code we can assume support. */ #else #if defined(MA_NO_CPUID) return MA_FALSE; #else int info[4]; ma_cpuid(info, 1); return (info[3] & (1 << 26)) != 0; #endif #endif #else return MA_FALSE; /* SSE2 is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #if 0 static MA_INLINE ma_bool32 ma_has_avx() { #if defined(MA_SUPPORT_AVX) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX) #if defined(_AVX_) || defined(__AVX__) return MA_TRUE; /* If the compiler is allowed to freely generate AVX code we can assume support. */ #else /* AVX requires both CPU and OS support. */ #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV) return MA_FALSE; #else int info[4]; ma_cpuid(info, 1); if (((info[2] & (1 << 27)) != 0) && ((info[2] & (1 << 28)) != 0)) { ma_uint64 xrc = ma_xgetbv(0); if ((xrc & 0x06) == 0x06) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } #endif #endif #else return MA_FALSE; /* AVX is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #endif static MA_INLINE ma_bool32 ma_has_avx2(void) { #if defined(MA_SUPPORT_AVX2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX2) #if defined(_AVX2_) || defined(__AVX2__) return MA_TRUE; /* If the compiler is allowed to freely generate AVX2 code we can assume support. */ #else /* AVX2 requires both CPU and OS support. */ #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV) return MA_FALSE; #else int info1[4]; int info7[4]; ma_cpuid(info1, 1); ma_cpuid(info7, 7); if (((info1[2] & (1 << 27)) != 0) && ((info7[1] & (1 << 5)) != 0)) { ma_uint64 xrc = ma_xgetbv(0); if ((xrc & 0x06) == 0x06) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } #endif #endif #else return MA_FALSE; /* AVX2 is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } static MA_INLINE ma_bool32 ma_has_neon(void) { #if defined(MA_SUPPORT_NEON) #if defined(MA_ARM) && !defined(MA_NO_NEON) #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) return MA_TRUE; /* If the compiler is allowed to freely generate NEON code we can assume support. */ #else /* TODO: Runtime check. */ return MA_FALSE; #endif #else return MA_FALSE; /* NEON is only supported on ARM architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #if defined(__has_builtin) #define MA_COMPILER_HAS_BUILTIN(x) __has_builtin(x) #else #define MA_COMPILER_HAS_BUILTIN(x) 0 #endif #ifndef MA_ASSUME #if MA_COMPILER_HAS_BUILTIN(__builtin_assume) #define MA_ASSUME(x) __builtin_assume(x) #elif MA_COMPILER_HAS_BUILTIN(__builtin_unreachable) #define MA_ASSUME(x) do { if (!(x)) __builtin_unreachable(); } while (0) #elif defined(_MSC_VER) #define MA_ASSUME(x) __assume(x) #else #define MA_ASSUME(x) (void)(x) #endif #endif #ifndef MA_RESTRICT #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) #define MA_RESTRICT __restrict #else #define MA_RESTRICT #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 #define MA_HAS_BYTESWAP16_INTRINSIC #define MA_HAS_BYTESWAP32_INTRINSIC #define MA_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap16) #define MA_HAS_BYTESWAP16_INTRINSIC #endif #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap32) #define MA_HAS_BYTESWAP32_INTRINSIC #endif #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap64) #define MA_HAS_BYTESWAP64_INTRINSIC #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_HAS_BYTESWAP32_INTRINSIC #define MA_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_HAS_BYTESWAP16_INTRINSIC #endif #endif static MA_INLINE ma_bool32 ma_is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE ma_bool32 ma_is_big_endian(void) { return !ma_is_little_endian(); } static MA_INLINE ma_uint32 ma_swap_endian_uint32(ma_uint32 n) { #ifdef MA_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT) /* <-- 64-bit inline assembly has not been tested, so disabling for now. */ /* Inline assembly optimized implementation for ARM. In my testing, GCC does not generate optimized code with __builtin_bswap32(). */ ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) /* <-- This is untested. If someone in the community could test this, that would be appreciated! */ #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } #if !defined(MA_EMSCRIPTEN) #ifdef MA_WIN32 static void ma_sleep__win32(ma_uint32 milliseconds) { Sleep((DWORD)milliseconds); } #endif #ifdef MA_POSIX static void ma_sleep__posix(ma_uint32 milliseconds) { #ifdef MA_EMSCRIPTEN (void)milliseconds; MA_ASSERT(MA_FALSE); /* The Emscripten build should never sleep. */ #else #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || defined(MA_NX) struct timespec ts; ts.tv_sec = milliseconds / 1000; ts.tv_nsec = milliseconds % 1000 * 1000000; nanosleep(&ts, NULL); #else struct timeval tv; tv.tv_sec = milliseconds / 1000; tv.tv_usec = milliseconds % 1000 * 1000; select(0, NULL, NULL, NULL, &tv); #endif #endif } #endif static MA_INLINE void ma_sleep(ma_uint32 milliseconds) { #ifdef MA_WIN32 ma_sleep__win32(milliseconds); #endif #ifdef MA_POSIX ma_sleep__posix(milliseconds); #endif } #endif static MA_INLINE void ma_yield(void) { #if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) /* x86/x64 */ #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__)) && !defined(__clang__) #if _MSC_VER >= 1400 _mm_pause(); #else #if defined(__DMC__) /* Digital Mars does not recognize the PAUSE opcode. Fall back to NOP. */ __asm nop; #else __asm pause; #endif #endif #else __asm__ __volatile__ ("pause"); #endif #elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(_M_ARM64) || (defined(_M_ARM) && _M_ARM >= 7) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) /* ARM */ #if defined(_MSC_VER) /* Apparently there is a __yield() intrinsic that's compatible with ARM, but I cannot find documentation for it nor can I find where it's declared. */ __yield(); #else __asm__ __volatile__ ("yield"); /* ARMv6K/ARMv6T2 and above. */ #endif #else /* Unknown or unsupported architecture. No-op. */ #endif } #define MA_MM_DENORMALS_ZERO_MASK 0x0040 #define MA_MM_FLUSH_ZERO_MASK 0x8000 static MA_INLINE unsigned int ma_disable_denormals(void) { unsigned int prevState; #if defined(_MSC_VER) { /* Older versions of Visual Studio don't support the "safe" versions of _controlfp_s(). I don't know which version of Visual Studio first added support for _controlfp_s(), but I do know that VC6 lacks support. _MSC_VER = 1200 is VC6, but if you get compilation errors on older versions of Visual Studio, let me know and I'll make the necessary adjustment. */ #if _MSC_VER <= 1200 { prevState = _statusfp(); _controlfp(prevState | _DN_FLUSH, _MCW_DN); } #else { unsigned int unused; _controlfp_s(&prevState, 0, 0); _controlfp_s(&unused, prevState | _DN_FLUSH, _MCW_DN); } #endif } #elif defined(MA_X86) || defined(MA_X64) { #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ { prevState = _mm_getcsr(); _mm_setcsr(prevState | MA_MM_DENORMALS_ZERO_MASK | MA_MM_FLUSH_ZERO_MASK); } #else { /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */ prevState = 0; } #endif } #else { /* Unknown or unsupported architecture. No-op. */ prevState = 0; } #endif return prevState; } static MA_INLINE void ma_restore_denormals(unsigned int prevState) { #if defined(_MSC_VER) { /* Older versions of Visual Studio do not support _controlfp_s(). See ma_disable_denormals(). */ #if _MSC_VER <= 1200 { _controlfp(prevState, _MCW_DN); } #else { unsigned int unused; _controlfp_s(&unused, prevState, _MCW_DN); } #endif } #elif defined(MA_X86) || defined(MA_X64) { #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ { _mm_setcsr(prevState); } #else { /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */ (void)prevState; } #endif } #else { /* Unknown or unsupported architecture. No-op. */ (void)prevState; } #endif } #ifdef MA_ANDROID #include int ma_android_sdk_version() { char sdkVersion[PROP_VALUE_MAX + 1] = {0, }; if (__system_property_get("ro.build.version.sdk", sdkVersion)) { return atoi(sdkVersion); } return 0; } #endif #ifndef MA_COINIT_VALUE #define MA_COINIT_VALUE 0 /* 0 = COINIT_MULTITHREADED */ #endif #ifndef MA_FLT_MAX #ifdef FLT_MAX #define MA_FLT_MAX FLT_MAX #else #define MA_FLT_MAX 3.402823466e+38F #endif #endif #ifndef MA_PI #define MA_PI 3.14159265358979323846264f #endif #ifndef MA_PI_D #define MA_PI_D 3.14159265358979323846264 #endif #ifndef MA_TAU #define MA_TAU 6.28318530717958647693f #endif #ifndef MA_TAU_D #define MA_TAU_D 6.28318530717958647693 #endif /* The default format when ma_format_unknown (0) is requested when initializing a device. */ #ifndef MA_DEFAULT_FORMAT #define MA_DEFAULT_FORMAT ma_format_f32 #endif /* The default channel count to use when 0 is used when initializing a device. */ #ifndef MA_DEFAULT_CHANNELS #define MA_DEFAULT_CHANNELS 2 #endif /* The default sample rate to use when 0 is used when initializing a device. */ #ifndef MA_DEFAULT_SAMPLE_RATE #define MA_DEFAULT_SAMPLE_RATE 48000 #endif /* Default periods when none is specified in ma_device_init(). More periods means more work on the CPU. */ #ifndef MA_DEFAULT_PERIODS #define MA_DEFAULT_PERIODS 3 #endif /* The default period size in milliseconds for low latency mode. */ #ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY #define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY 10 #endif /* The default buffer size in milliseconds for conservative mode. */ #ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE #define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE 100 #endif /* The default LPF filter order for linear resampling. Note that this is clamped to MA_MAX_FILTER_ORDER. */ #ifndef MA_DEFAULT_RESAMPLER_LPF_ORDER #if MA_MAX_FILTER_ORDER >= 4 #define MA_DEFAULT_RESAMPLER_LPF_ORDER 4 #else #define MA_DEFAULT_RESAMPLER_LPF_ORDER MA_MAX_FILTER_ORDER #endif #endif #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #endif /* Standard sample rates, in order of priority. */ static ma_uint32 g_maStandardSampleRatePriorities[] = { (ma_uint32)ma_standard_sample_rate_48000, (ma_uint32)ma_standard_sample_rate_44100, (ma_uint32)ma_standard_sample_rate_32000, (ma_uint32)ma_standard_sample_rate_24000, (ma_uint32)ma_standard_sample_rate_22050, (ma_uint32)ma_standard_sample_rate_88200, (ma_uint32)ma_standard_sample_rate_96000, (ma_uint32)ma_standard_sample_rate_176400, (ma_uint32)ma_standard_sample_rate_192000, (ma_uint32)ma_standard_sample_rate_16000, (ma_uint32)ma_standard_sample_rate_11025, (ma_uint32)ma_standard_sample_rate_8000, (ma_uint32)ma_standard_sample_rate_352800, (ma_uint32)ma_standard_sample_rate_384000 }; static MA_INLINE ma_bool32 ma_is_standard_sample_rate(ma_uint32 sampleRate) { ma_uint32 iSampleRate; for (iSampleRate = 0; iSampleRate < sizeof(g_maStandardSampleRatePriorities) / sizeof(g_maStandardSampleRatePriorities[0]); iSampleRate += 1) { if (g_maStandardSampleRatePriorities[iSampleRate] == sampleRate) { return MA_TRUE; } } /* Getting here means the sample rate is not supported. */ return MA_FALSE; } static ma_format g_maFormatPriorities[] = { ma_format_s16, /* Most common */ ma_format_f32, /*ma_format_s24_32,*/ /* Clean alignment */ ma_format_s32, ma_format_s24, /* Unclean alignment */ ma_format_u8 /* Low quality */ }; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif MA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_VERSION_MINOR; } if (pRevision) { *pRevision = MA_VERSION_REVISION; } } MA_API const char* ma_version_string(void) { return MA_VERSION_STRING; } /****************************************************************************** Standard Library Stuff ******************************************************************************/ #ifndef MA_ASSERT #define MA_ASSERT(condition) assert(condition) #endif #ifndef MA_MALLOC #define MA_MALLOC(sz) malloc((sz)) #endif #ifndef MA_REALLOC #define MA_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_FREE #define MA_FREE(p) free((p)) #endif static MA_INLINE void ma_zero_memory_default(void* p, size_t sz) { if (p == NULL) { MA_ASSERT(sz == 0); /* If this is triggered there's an error with the calling code. */ return; } if (sz > 0) { memset(p, 0, sz); } } #ifndef MA_ZERO_MEMORY #define MA_ZERO_MEMORY(p, sz) ma_zero_memory_default((p), (sz)) #endif #ifndef MA_COPY_MEMORY #define MA_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_MOVE_MEMORY #define MA_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #define MA_ZERO_OBJECT(p) MA_ZERO_MEMORY((p), sizeof(*(p))) #define ma_countof(x) (sizeof(x) / sizeof(x[0])) #define ma_max(x, y) (((x) > (y)) ? (x) : (y)) #define ma_min(x, y) (((x) < (y)) ? (x) : (y)) #define ma_abs(x) (((x) > 0) ? (x) : -(x)) #define ma_clamp(x, lo, hi) (ma_max(lo, ma_min(x, hi))) #define ma_offset_ptr(p, offset) (((ma_uint8*)(p)) + (offset)) #define ma_align(x, a) (((x) + ((a)-1)) & ~((a)-1)) #define ma_align_64(x) ma_align(x, 8) #define ma_buffer_frame_capacity(buffer, channels, format) (sizeof(buffer) / ma_get_bytes_per_sample(format) / (channels)) static MA_INLINE double ma_sind(double x) { /* TODO: Implement custom sin(x). */ return sin(x); } static MA_INLINE double ma_expd(double x) { /* TODO: Implement custom exp(x). */ return exp(x); } static MA_INLINE double ma_logd(double x) { /* TODO: Implement custom log(x). */ return log(x); } static MA_INLINE double ma_powd(double x, double y) { /* TODO: Implement custom pow(x, y). */ return pow(x, y); } static MA_INLINE double ma_sqrtd(double x) { /* TODO: Implement custom sqrt(x). */ return sqrt(x); } static MA_INLINE float ma_rsqrtf(float x) { #if defined(MA_SUPPORT_SSE2) && !defined(MA_NO_SSE2) && (defined(MA_X64) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)) { /* For SSE we can use RSQRTSS. This Stack Overflow post suggests that compilers don't necessarily generate optimal code when using intrinsics: https://web.archive.org/web/20221211012522/https://stackoverflow.com/questions/32687079/getting-fewest-instructions-for-rsqrtss-wrapper I'm going to do something similar here, but a bit simpler. */ #if defined(__GNUC__) || defined(__clang__) { float result; __asm__ __volatile__("rsqrtss %1, %0" : "=x"(result) : "x"(x)); return result; } #else { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ps1(x))); } #endif } #else { return 1 / (float)ma_sqrtd(x); } #endif } static MA_INLINE float ma_sinf(float x) { return (float)ma_sind((float)x); } static MA_INLINE double ma_cosd(double x) { return ma_sind((MA_PI_D*0.5) - x); } static MA_INLINE float ma_cosf(float x) { return (float)ma_cosd((float)x); } static MA_INLINE double ma_log10d(double x) { return ma_logd(x) * 0.43429448190325182765; } static MA_INLINE float ma_powf(float x, float y) { return (float)ma_powd((double)x, (double)y); } static MA_INLINE float ma_log10f(float x) { return (float)ma_log10d((double)x); } static MA_INLINE double ma_degrees_to_radians(double degrees) { return degrees * 0.01745329252; } static MA_INLINE double ma_radians_to_degrees(double radians) { return radians * 57.295779512896; } static MA_INLINE float ma_degrees_to_radians_f(float degrees) { return degrees * 0.01745329252f; } static MA_INLINE float ma_radians_to_degrees_f(float radians) { return radians * 57.295779512896f; } /* Return Values: 0: Success 22: EINVAL 34: ERANGE Not using symbolic constants for errors because I want to avoid #including errno.h These are marked as no-inline because of some bad code generation by Clang. None of these functions are used in any performance-critical code within miniaudio. */ MA_API MA_NO_INLINE int ma_strcpy_s(char* dst, size_t dstSizeInBytes, const char* src) { size_t i; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstSizeInBytes && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstSizeInBytes) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_wcscpy_s(wchar_t* dst, size_t dstCap, const wchar_t* src) { size_t i; if (dst == 0) { return 22; } if (dstCap == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstCap && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstCap) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count) { size_t maxcount; size_t i; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } maxcount = count; if (count == ((size_t)-1) || count >= dstSizeInBytes) { /* -1 = _TRUNCATE */ maxcount = dstSizeInBytes - 1; } for (i = 0; i < maxcount && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (src[i] == '\0' || i == count || count == ((size_t)-1)) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_strcat_s(char* dst, size_t dstSizeInBytes, const char* src) { char* dstorig; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } dstorig = dst; while (dstSizeInBytes > 0 && dst[0] != '\0') { dst += 1; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { return 22; /* Unterminated. */ } while (dstSizeInBytes > 0 && src[0] != '\0') { *dst++ = *src++; dstSizeInBytes -= 1; } if (dstSizeInBytes > 0) { dst[0] = '\0'; } else { dstorig[0] = '\0'; return 34; } return 0; } MA_API MA_NO_INLINE int ma_strncat_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count) { char* dstorig; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { return 22; } dstorig = dst; while (dstSizeInBytes > 0 && dst[0] != '\0') { dst += 1; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { return 22; /* Unterminated. */ } if (count == ((size_t)-1)) { /* _TRUNCATE */ count = dstSizeInBytes - 1; } while (dstSizeInBytes > 0 && src[0] != '\0' && count > 0) { *dst++ = *src++; dstSizeInBytes -= 1; count -= 1; } if (dstSizeInBytes > 0) { dst[0] = '\0'; } else { dstorig[0] = '\0'; return 34; } return 0; } MA_API MA_NO_INLINE int ma_itoa_s(int value, char* dst, size_t dstSizeInBytes, int radix) { int sign; unsigned int valueU; char* dstEnd; if (dst == NULL || dstSizeInBytes == 0) { return 22; } if (radix < 2 || radix > 36) { dst[0] = '\0'; return 22; } sign = (value < 0 && radix == 10) ? -1 : 1; /* The negative sign is only used when the base is 10. */ if (value < 0) { valueU = -value; } else { valueU = value; } dstEnd = dst; do { int remainder = valueU % radix; if (remainder > 9) { *dstEnd = (char)((remainder - 10) + 'a'); } else { *dstEnd = (char)(remainder + '0'); } dstEnd += 1; dstSizeInBytes -= 1; valueU /= radix; } while (dstSizeInBytes > 0 && valueU > 0); if (dstSizeInBytes == 0) { dst[0] = '\0'; return 22; /* Ran out of room in the output buffer. */ } if (sign < 0) { *dstEnd++ = '-'; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { dst[0] = '\0'; return 22; /* Ran out of room in the output buffer. */ } *dstEnd = '\0'; /* At this point the string will be reversed. */ dstEnd -= 1; while (dst < dstEnd) { char temp = *dst; *dst = *dstEnd; *dstEnd = temp; dst += 1; dstEnd -= 1; } return 0; } MA_API MA_NO_INLINE int ma_strcmp(const char* str1, const char* str2) { if (str1 == str2) return 0; /* These checks differ from the standard implementation. It's not important, but I prefer it just for sanity. */ if (str1 == NULL) return -1; if (str2 == NULL) return 1; for (;;) { if (str1[0] == '\0') { break; } if (str1[0] != str2[0]) { break; } str1 += 1; str2 += 1; } return ((unsigned char*)str1)[0] - ((unsigned char*)str2)[0]; } MA_API MA_NO_INLINE int ma_strappend(char* dst, size_t dstSize, const char* srcA, const char* srcB) { int result; result = ma_strncpy_s(dst, dstSize, srcA, (size_t)-1); if (result != 0) { return result; } result = ma_strncat_s(dst, dstSize, srcB, (size_t)-1); if (result != 0) { return result; } return result; } MA_API MA_NO_INLINE char* ma_copy_string(const char* src, const ma_allocation_callbacks* pAllocationCallbacks) { size_t sz; char* dst; if (src == NULL) { return NULL; } sz = strlen(src)+1; dst = (char*)ma_malloc(sz, pAllocationCallbacks); if (dst == NULL) { return NULL; } ma_strcpy_s(dst, sz, src); return dst; } MA_API MA_NO_INLINE wchar_t* ma_copy_string_w(const wchar_t* src, const ma_allocation_callbacks* pAllocationCallbacks) { size_t sz = wcslen(src)+1; wchar_t* dst = (wchar_t*)ma_malloc(sz * sizeof(*dst), pAllocationCallbacks); if (dst == NULL) { return NULL; } ma_wcscpy_s(dst, sz, src); return dst; } #include static ma_result ma_result_from_errno(int e) { if (e == 0) { return MA_SUCCESS; } #ifdef EPERM else if (e == EPERM) { return MA_INVALID_OPERATION; } #endif #ifdef ENOENT else if (e == ENOENT) { return MA_DOES_NOT_EXIST; } #endif #ifdef ESRCH else if (e == ESRCH) { return MA_DOES_NOT_EXIST; } #endif #ifdef EINTR else if (e == EINTR) { return MA_INTERRUPT; } #endif #ifdef EIO else if (e == EIO) { return MA_IO_ERROR; } #endif #ifdef ENXIO else if (e == ENXIO) { return MA_DOES_NOT_EXIST; } #endif #ifdef E2BIG else if (e == E2BIG) { return MA_INVALID_ARGS; } #endif #ifdef ENOEXEC else if (e == ENOEXEC) { return MA_INVALID_FILE; } #endif #ifdef EBADF else if (e == EBADF) { return MA_INVALID_FILE; } #endif #ifdef ECHILD else if (e == ECHILD) { return MA_ERROR; } #endif #ifdef EAGAIN else if (e == EAGAIN) { return MA_UNAVAILABLE; } #endif #ifdef ENOMEM else if (e == ENOMEM) { return MA_OUT_OF_MEMORY; } #endif #ifdef EACCES else if (e == EACCES) { return MA_ACCESS_DENIED; } #endif #ifdef EFAULT else if (e == EFAULT) { return MA_BAD_ADDRESS; } #endif #ifdef ENOTBLK else if (e == ENOTBLK) { return MA_ERROR; } #endif #ifdef EBUSY else if (e == EBUSY) { return MA_BUSY; } #endif #ifdef EEXIST else if (e == EEXIST) { return MA_ALREADY_EXISTS; } #endif #ifdef EXDEV else if (e == EXDEV) { return MA_ERROR; } #endif #ifdef ENODEV else if (e == ENODEV) { return MA_DOES_NOT_EXIST; } #endif #ifdef ENOTDIR else if (e == ENOTDIR) { return MA_NOT_DIRECTORY; } #endif #ifdef EISDIR else if (e == EISDIR) { return MA_IS_DIRECTORY; } #endif #ifdef EINVAL else if (e == EINVAL) { return MA_INVALID_ARGS; } #endif #ifdef ENFILE else if (e == ENFILE) { return MA_TOO_MANY_OPEN_FILES; } #endif #ifdef EMFILE else if (e == EMFILE) { return MA_TOO_MANY_OPEN_FILES; } #endif #ifdef ENOTTY else if (e == ENOTTY) { return MA_INVALID_OPERATION; } #endif #ifdef ETXTBSY else if (e == ETXTBSY) { return MA_BUSY; } #endif #ifdef EFBIG else if (e == EFBIG) { return MA_TOO_BIG; } #endif #ifdef ENOSPC else if (e == ENOSPC) { return MA_NO_SPACE; } #endif #ifdef ESPIPE else if (e == ESPIPE) { return MA_BAD_SEEK; } #endif #ifdef EROFS else if (e == EROFS) { return MA_ACCESS_DENIED; } #endif #ifdef EMLINK else if (e == EMLINK) { return MA_TOO_MANY_LINKS; } #endif #ifdef EPIPE else if (e == EPIPE) { return MA_BAD_PIPE; } #endif #ifdef EDOM else if (e == EDOM) { return MA_OUT_OF_RANGE; } #endif #ifdef ERANGE else if (e == ERANGE) { return MA_OUT_OF_RANGE; } #endif #ifdef EDEADLK else if (e == EDEADLK) { return MA_DEADLOCK; } #endif #ifdef ENAMETOOLONG else if (e == ENAMETOOLONG) { return MA_PATH_TOO_LONG; } #endif #ifdef ENOLCK else if (e == ENOLCK) { return MA_ERROR; } #endif #ifdef ENOSYS else if (e == ENOSYS) { return MA_NOT_IMPLEMENTED; } #endif #ifdef ENOTEMPTY else if (e == ENOTEMPTY) { return MA_DIRECTORY_NOT_EMPTY; } #endif #ifdef ELOOP else if (e == ELOOP) { return MA_TOO_MANY_LINKS; } #endif #ifdef ENOMSG else if (e == ENOMSG) { return MA_NO_MESSAGE; } #endif #ifdef EIDRM else if (e == EIDRM) { return MA_ERROR; } #endif #ifdef ECHRNG else if (e == ECHRNG) { return MA_ERROR; } #endif #ifdef EL2NSYNC else if (e == EL2NSYNC) { return MA_ERROR; } #endif #ifdef EL3HLT else if (e == EL3HLT) { return MA_ERROR; } #endif #ifdef EL3RST else if (e == EL3RST) { return MA_ERROR; } #endif #ifdef ELNRNG else if (e == ELNRNG) { return MA_OUT_OF_RANGE; } #endif #ifdef EUNATCH else if (e == EUNATCH) { return MA_ERROR; } #endif #ifdef ENOCSI else if (e == ENOCSI) { return MA_ERROR; } #endif #ifdef EL2HLT else if (e == EL2HLT) { return MA_ERROR; } #endif #ifdef EBADE else if (e == EBADE) { return MA_ERROR; } #endif #ifdef EBADR else if (e == EBADR) { return MA_ERROR; } #endif #ifdef EXFULL else if (e == EXFULL) { return MA_ERROR; } #endif #ifdef ENOANO else if (e == ENOANO) { return MA_ERROR; } #endif #ifdef EBADRQC else if (e == EBADRQC) { return MA_ERROR; } #endif #ifdef EBADSLT else if (e == EBADSLT) { return MA_ERROR; } #endif #ifdef EBFONT else if (e == EBFONT) { return MA_INVALID_FILE; } #endif #ifdef ENOSTR else if (e == ENOSTR) { return MA_ERROR; } #endif #ifdef ENODATA else if (e == ENODATA) { return MA_NO_DATA_AVAILABLE; } #endif #ifdef ETIME else if (e == ETIME) { return MA_TIMEOUT; } #endif #ifdef ENOSR else if (e == ENOSR) { return MA_NO_DATA_AVAILABLE; } #endif #ifdef ENONET else if (e == ENONET) { return MA_NO_NETWORK; } #endif #ifdef ENOPKG else if (e == ENOPKG) { return MA_ERROR; } #endif #ifdef EREMOTE else if (e == EREMOTE) { return MA_ERROR; } #endif #ifdef ENOLINK else if (e == ENOLINK) { return MA_ERROR; } #endif #ifdef EADV else if (e == EADV) { return MA_ERROR; } #endif #ifdef ESRMNT else if (e == ESRMNT) { return MA_ERROR; } #endif #ifdef ECOMM else if (e == ECOMM) { return MA_ERROR; } #endif #ifdef EPROTO else if (e == EPROTO) { return MA_ERROR; } #endif #ifdef EMULTIHOP else if (e == EMULTIHOP) { return MA_ERROR; } #endif #ifdef EDOTDOT else if (e == EDOTDOT) { return MA_ERROR; } #endif #ifdef EBADMSG else if (e == EBADMSG) { return MA_BAD_MESSAGE; } #endif #ifdef EOVERFLOW else if (e == EOVERFLOW) { return MA_TOO_BIG; } #endif #ifdef ENOTUNIQ else if (e == ENOTUNIQ) { return MA_NOT_UNIQUE; } #endif #ifdef EBADFD else if (e == EBADFD) { return MA_ERROR; } #endif #ifdef EREMCHG else if (e == EREMCHG) { return MA_ERROR; } #endif #ifdef ELIBACC else if (e == ELIBACC) { return MA_ACCESS_DENIED; } #endif #ifdef ELIBBAD else if (e == ELIBBAD) { return MA_INVALID_FILE; } #endif #ifdef ELIBSCN else if (e == ELIBSCN) { return MA_INVALID_FILE; } #endif #ifdef ELIBMAX else if (e == ELIBMAX) { return MA_ERROR; } #endif #ifdef ELIBEXEC else if (e == ELIBEXEC) { return MA_ERROR; } #endif #ifdef EILSEQ else if (e == EILSEQ) { return MA_INVALID_DATA; } #endif #ifdef ERESTART else if (e == ERESTART) { return MA_ERROR; } #endif #ifdef ESTRPIPE else if (e == ESTRPIPE) { return MA_ERROR; } #endif #ifdef EUSERS else if (e == EUSERS) { return MA_ERROR; } #endif #ifdef ENOTSOCK else if (e == ENOTSOCK) { return MA_NOT_SOCKET; } #endif #ifdef EDESTADDRREQ else if (e == EDESTADDRREQ) { return MA_NO_ADDRESS; } #endif #ifdef EMSGSIZE else if (e == EMSGSIZE) { return MA_TOO_BIG; } #endif #ifdef EPROTOTYPE else if (e == EPROTOTYPE) { return MA_BAD_PROTOCOL; } #endif #ifdef ENOPROTOOPT else if (e == ENOPROTOOPT) { return MA_PROTOCOL_UNAVAILABLE; } #endif #ifdef EPROTONOSUPPORT else if (e == EPROTONOSUPPORT) { return MA_PROTOCOL_NOT_SUPPORTED; } #endif #ifdef ESOCKTNOSUPPORT else if (e == ESOCKTNOSUPPORT) { return MA_SOCKET_NOT_SUPPORTED; } #endif #ifdef EOPNOTSUPP else if (e == EOPNOTSUPP) { return MA_INVALID_OPERATION; } #endif #ifdef EPFNOSUPPORT else if (e == EPFNOSUPPORT) { return MA_PROTOCOL_FAMILY_NOT_SUPPORTED; } #endif #ifdef EAFNOSUPPORT else if (e == EAFNOSUPPORT) { return MA_ADDRESS_FAMILY_NOT_SUPPORTED; } #endif #ifdef EADDRINUSE else if (e == EADDRINUSE) { return MA_ALREADY_IN_USE; } #endif #ifdef EADDRNOTAVAIL else if (e == EADDRNOTAVAIL) { return MA_ERROR; } #endif #ifdef ENETDOWN else if (e == ENETDOWN) { return MA_NO_NETWORK; } #endif #ifdef ENETUNREACH else if (e == ENETUNREACH) { return MA_NO_NETWORK; } #endif #ifdef ENETRESET else if (e == ENETRESET) { return MA_NO_NETWORK; } #endif #ifdef ECONNABORTED else if (e == ECONNABORTED) { return MA_NO_NETWORK; } #endif #ifdef ECONNRESET else if (e == ECONNRESET) { return MA_CONNECTION_RESET; } #endif #ifdef ENOBUFS else if (e == ENOBUFS) { return MA_NO_SPACE; } #endif #ifdef EISCONN else if (e == EISCONN) { return MA_ALREADY_CONNECTED; } #endif #ifdef ENOTCONN else if (e == ENOTCONN) { return MA_NOT_CONNECTED; } #endif #ifdef ESHUTDOWN else if (e == ESHUTDOWN) { return MA_ERROR; } #endif #ifdef ETOOMANYREFS else if (e == ETOOMANYREFS) { return MA_ERROR; } #endif #ifdef ETIMEDOUT else if (e == ETIMEDOUT) { return MA_TIMEOUT; } #endif #ifdef ECONNREFUSED else if (e == ECONNREFUSED) { return MA_CONNECTION_REFUSED; } #endif #ifdef EHOSTDOWN else if (e == EHOSTDOWN) { return MA_NO_HOST; } #endif #ifdef EHOSTUNREACH else if (e == EHOSTUNREACH) { return MA_NO_HOST; } #endif #ifdef EALREADY else if (e == EALREADY) { return MA_IN_PROGRESS; } #endif #ifdef EINPROGRESS else if (e == EINPROGRESS) { return MA_IN_PROGRESS; } #endif #ifdef ESTALE else if (e == ESTALE) { return MA_INVALID_FILE; } #endif #ifdef EUCLEAN else if (e == EUCLEAN) { return MA_ERROR; } #endif #ifdef ENOTNAM else if (e == ENOTNAM) { return MA_ERROR; } #endif #ifdef ENAVAIL else if (e == ENAVAIL) { return MA_ERROR; } #endif #ifdef EISNAM else if (e == EISNAM) { return MA_ERROR; } #endif #ifdef EREMOTEIO else if (e == EREMOTEIO) { return MA_IO_ERROR; } #endif #ifdef EDQUOT else if (e == EDQUOT) { return MA_NO_SPACE; } #endif #ifdef ENOMEDIUM else if (e == ENOMEDIUM) { return MA_DOES_NOT_EXIST; } #endif #ifdef EMEDIUMTYPE else if (e == EMEDIUMTYPE) { return MA_ERROR; } #endif #ifdef ECANCELED else if (e == ECANCELED) { return MA_CANCELLED; } #endif #ifdef ENOKEY else if (e == ENOKEY) { return MA_ERROR; } #endif #ifdef EKEYEXPIRED else if (e == EKEYEXPIRED) { return MA_ERROR; } #endif #ifdef EKEYREVOKED else if (e == EKEYREVOKED) { return MA_ERROR; } #endif #ifdef EKEYREJECTED else if (e == EKEYREJECTED) { return MA_ERROR; } #endif #ifdef EOWNERDEAD else if (e == EOWNERDEAD) { return MA_ERROR; } #endif #ifdef ENOTRECOVERABLE else if (e == ENOTRECOVERABLE) { return MA_ERROR; } #endif #ifdef ERFKILL else if (e == ERFKILL) { return MA_ERROR; } #endif #ifdef EHWPOISON else if (e == EHWPOISON) { return MA_ERROR; } #endif else { return MA_ERROR; } } MA_API ma_result ma_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return MA_INVALID_ARGS; } #if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return ma_result_from_errno(err); } #else #if defined(_WIN32) || defined(__APPLE__) *ppFile = fopen(pFilePath, pOpenMode); #else #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE) *ppFile = fopen64(pFilePath, pOpenMode); #else *ppFile = fopen(pFilePath, pOpenMode); #endif #endif if (*ppFile == NULL) { ma_result result = ma_result_from_errno(errno); if (result == MA_SUCCESS) { result = MA_ERROR; /* Just a safety check to make sure we never ever return success when pFile == NULL. */ } return result; } #endif return MA_SUCCESS; } /* _wfopen() isn't always available in all compilation environments. * Windows only. * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define MA_HAS_WFOPEN #endif #endif MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const ma_allocation_callbacks* pAllocationCallbacks) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return MA_INVALID_ARGS; } #if defined(MA_HAS_WFOPEN) { /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return ma_result_from_errno(err); } #else *ppFile = _wfopen(pFilePath, pOpenMode); if (*ppFile == NULL) { return ma_result_from_errno(errno); } #endif (void)pAllocationCallbacks; } #else /* Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility. */ { mbstate_t mbs; size_t lenMB; const wchar_t* pFilePathTemp = pFilePath; char* pFilePathMB = NULL; char pOpenModeMB[32] = {0}; /* Get the length first. */ MA_ZERO_OBJECT(&mbs); lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs); if (lenMB == (size_t)-1) { return ma_result_from_errno(errno); } pFilePathMB = (char*)ma_malloc(lenMB + 1, pAllocationCallbacks); if (pFilePathMB == NULL) { return MA_OUT_OF_MEMORY; } pFilePathTemp = pFilePath; MA_ZERO_OBJECT(&mbs); wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs); /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */ { size_t i = 0; for (;;) { if (pOpenMode[i] == 0) { pOpenModeMB[i] = '\0'; break; } pOpenModeMB[i] = (char)pOpenMode[i]; i += 1; } } *ppFile = fopen(pFilePathMB, pOpenModeMB); ma_free(pFilePathMB, pAllocationCallbacks); } if (*ppFile == NULL) { return MA_ERROR; } #endif return MA_SUCCESS; } static MA_INLINE void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes) { #if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX MA_COPY_MEMORY(dst, src, (size_t)sizeInBytes); #else while (sizeInBytes > 0) { ma_uint64 bytesToCopyNow = sizeInBytes; if (bytesToCopyNow > MA_SIZE_MAX) { bytesToCopyNow = MA_SIZE_MAX; } MA_COPY_MEMORY(dst, src, (size_t)bytesToCopyNow); /* Safe cast to size_t. */ sizeInBytes -= bytesToCopyNow; dst = ( void*)(( ma_uint8*)dst + bytesToCopyNow); src = (const void*)((const ma_uint8*)src + bytesToCopyNow); } #endif } static MA_INLINE void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes) { #if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX MA_ZERO_MEMORY(dst, (size_t)sizeInBytes); #else while (sizeInBytes > 0) { ma_uint64 bytesToZeroNow = sizeInBytes; if (bytesToZeroNow > MA_SIZE_MAX) { bytesToZeroNow = MA_SIZE_MAX; } MA_ZERO_MEMORY(dst, (size_t)bytesToZeroNow); /* Safe cast to size_t. */ sizeInBytes -= bytesToZeroNow; dst = (void*)((ma_uint8*)dst + bytesToZeroNow); } #endif } /* Thanks to good old Bit Twiddling Hacks for this one: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 */ static MA_INLINE unsigned int ma_next_power_of_2(unsigned int x) { x--; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; x++; return x; } static MA_INLINE unsigned int ma_prev_power_of_2(unsigned int x) { return ma_next_power_of_2(x) >> 1; } static MA_INLINE unsigned int ma_round_to_power_of_2(unsigned int x) { unsigned int prev = ma_prev_power_of_2(x); unsigned int next = ma_next_power_of_2(x); if ((next - x) > (x - prev)) { return prev; } else { return next; } } static MA_INLINE unsigned int ma_count_set_bits(unsigned int x) { unsigned int count = 0; while (x != 0) { if (x & 1) { count += 1; } x = x >> 1; } return count; } /************************************************************************************************************************************************************** Allocation Callbacks **************************************************************************************************************************************************************/ static void* ma__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_MALLOC(sz); } static void* ma__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_REALLOC(p, sz); } static void ma__free_default(void* p, void* pUserData) { (void)pUserData; MA_FREE(p); } static ma_allocation_callbacks ma_allocation_callbacks_init_default(void) { ma_allocation_callbacks callbacks; callbacks.pUserData = NULL; callbacks.onMalloc = ma__malloc_default; callbacks.onRealloc = ma__realloc_default; callbacks.onFree = ma__free_default; return callbacks; } static ma_result ma_allocation_callbacks_init_copy(ma_allocation_callbacks* pDst, const ma_allocation_callbacks* pSrc) { if (pDst == NULL) { return MA_INVALID_ARGS; } if (pSrc == NULL) { *pDst = ma_allocation_callbacks_init_default(); } else { if (pSrc->pUserData == NULL && pSrc->onFree == NULL && pSrc->onMalloc == NULL && pSrc->onRealloc == NULL) { *pDst = ma_allocation_callbacks_init_default(); } else { if (pSrc->onFree == NULL || (pSrc->onMalloc == NULL && pSrc->onRealloc == NULL)) { return MA_INVALID_ARGS; /* Invalid allocation callbacks. */ } else { *pDst = *pSrc; } } } return MA_SUCCESS; } /************************************************************************************************************************************************************** Logging **************************************************************************************************************************************************************/ MA_API const char* ma_log_level_to_string(ma_uint32 logLevel) { switch (logLevel) { case MA_LOG_LEVEL_DEBUG: return "DEBUG"; case MA_LOG_LEVEL_INFO: return "INFO"; case MA_LOG_LEVEL_WARNING: return "WARNING"; case MA_LOG_LEVEL_ERROR: return "ERROR"; default: return "ERROR"; } } #if defined(MA_DEBUG_OUTPUT) #if defined(MA_ANDROID) #include #endif /* Customize this to use a specific tag in __android_log_print() for debug output messages. */ #ifndef MA_ANDROID_LOG_TAG #define MA_ANDROID_LOG_TAG "miniaudio" #endif void ma_log_callback_debug(void* pUserData, ma_uint32 level, const char* pMessage) { (void)pUserData; /* Special handling for some platforms. */ #if defined(MA_ANDROID) { /* Android. */ __android_log_print(ANDROID_LOG_DEBUG, MA_ANDROID_LOG_TAG, "%s: %s", ma_log_level_to_string(level), pMessage); } #else { /* Everything else. */ printf("%s: %s", ma_log_level_to_string(level), pMessage); } #endif } #endif MA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData) { ma_log_callback callback; MA_ZERO_OBJECT(&callback); callback.onLog = onLog; callback.pUserData = pUserData; return callback; } MA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog) { if (pLog == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLog); ma_allocation_callbacks_init_copy(&pLog->allocationCallbacks, pAllocationCallbacks); /* We need a mutex for thread safety. */ #ifndef MA_NO_THREADING { ma_result result = ma_mutex_init(&pLog->lock); if (result != MA_SUCCESS) { return result; } } #endif /* If we're using debug output, enable it. */ #if defined(MA_DEBUG_OUTPUT) { ma_log_register_callback(pLog, ma_log_callback_init(ma_log_callback_debug, NULL)); /* Doesn't really matter if this fails. */ } #endif return MA_SUCCESS; } MA_API void ma_log_uninit(ma_log* pLog) { if (pLog == NULL) { return; } #ifndef MA_NO_THREADING ma_mutex_uninit(&pLog->lock); #endif } static void ma_log_lock(ma_log* pLog) { #ifndef MA_NO_THREADING ma_mutex_lock(&pLog->lock); #else (void)pLog; #endif } static void ma_log_unlock(ma_log* pLog) { #ifndef MA_NO_THREADING ma_mutex_unlock(&pLog->lock); #else (void)pLog; #endif } MA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback) { ma_result result = MA_SUCCESS; if (pLog == NULL || callback.onLog == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { if (pLog->callbackCount == ma_countof(pLog->callbacks)) { result = MA_OUT_OF_MEMORY; /* Reached the maximum allowed log callbacks. */ } else { pLog->callbacks[pLog->callbackCount] = callback; pLog->callbackCount += 1; } } ma_log_unlock(pLog); return result; } MA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback) { if (pLog == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { ma_uint32 iLog; for (iLog = 0; iLog < pLog->callbackCount; ) { if (pLog->callbacks[iLog].onLog == callback.onLog) { /* Found. Move everything down a slot. */ ma_uint32 jLog; for (jLog = iLog; jLog < pLog->callbackCount-1; jLog += 1) { pLog->callbacks[jLog] = pLog->callbacks[jLog + 1]; } pLog->callbackCount -= 1; } else { /* Not found. */ iLog += 1; } } } ma_log_unlock(pLog); return MA_SUCCESS; } MA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage) { if (pLog == NULL || pMessage == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { ma_uint32 iLog; for (iLog = 0; iLog < pLog->callbackCount; iLog += 1) { if (pLog->callbacks[iLog].onLog) { pLog->callbacks[iLog].onLog(pLog->callbacks[iLog].pUserData, level, pMessage); } } } ma_log_unlock(pLog); return MA_SUCCESS; } /* We need to emulate _vscprintf() for the VC6 build. This can be more efficient, but since it's only VC6, and it's just a logging function, I'm happy to keep this simple. In the VC6 build we can implement this in terms of _vsnprintf(). */ #if defined(_MSC_VER) && _MSC_VER < 1900 static int ma_vscprintf(const ma_allocation_callbacks* pAllocationCallbacks, const char* format, va_list args) { #if _MSC_VER > 1200 return _vscprintf(format, args); #else int result; char* pTempBuffer = NULL; size_t tempBufferCap = 1024; if (format == NULL) { errno = EINVAL; return -1; } for (;;) { char* pNewTempBuffer = (char*)ma_realloc(pTempBuffer, tempBufferCap, pAllocationCallbacks); if (pNewTempBuffer == NULL) { ma_free(pTempBuffer, pAllocationCallbacks); errno = ENOMEM; return -1; /* Out of memory. */ } pTempBuffer = pNewTempBuffer; result = _vsnprintf(pTempBuffer, tempBufferCap, format, args); ma_free(pTempBuffer, NULL); if (result != -1) { break; /* Got it. */ } /* Buffer wasn't big enough. Ideally it'd be nice to use an error code to know the reason for sure, but this is reliable enough. */ tempBufferCap *= 2; } return result; #endif } #endif MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args) { if (pLog == NULL || pFormat == NULL) { return MA_INVALID_ARGS; } #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || ((!defined(_MSC_VER) || _MSC_VER >= 1900) && !defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) || (defined(__cplusplus) && __cplusplus >= 201103L) { ma_result result; int length; char pFormattedMessageStack[1024]; char* pFormattedMessageHeap = NULL; /* First try formatting into our fixed sized stack allocated buffer. If this is too small we'll fallback to a heap allocation. */ length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args); if (length < 0) { return MA_INVALID_OPERATION; /* An error occurred when trying to convert the buffer. */ } if ((size_t)length < sizeof(pFormattedMessageStack)) { /* The string was written to the stack. */ result = ma_log_post(pLog, level, pFormattedMessageStack); } else { /* The stack buffer was too small, try the heap. */ pFormattedMessageHeap = (char*)ma_malloc(length + 1, &pLog->allocationCallbacks); if (pFormattedMessageHeap == NULL) { return MA_OUT_OF_MEMORY; } length = vsnprintf(pFormattedMessageHeap, length + 1, pFormat, args); if (length < 0) { ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks); return MA_INVALID_OPERATION; } result = ma_log_post(pLog, level, pFormattedMessageHeap); ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks); } return result; } #else { /* Without snprintf() we need to first measure the string and then heap allocate it. I'm only aware of Visual Studio having support for this without snprintf(), so we'll need to restrict this branch to Visual Studio. For other compilers we need to just not support formatted logging because I don't want the security risk of overflowing a fixed sized stack allocated buffer. */ #if defined(_MSC_VER) && _MSC_VER >= 1200 /* 1200 = VC6 */ { ma_result result; int formattedLen; char* pFormattedMessage = NULL; va_list args2; #if _MSC_VER >= 1800 { va_copy(args2, args); } #else { args2 = args; } #endif formattedLen = ma_vscprintf(&pLog->allocationCallbacks, pFormat, args2); va_end(args2); if (formattedLen <= 0) { return MA_INVALID_OPERATION; } pFormattedMessage = (char*)ma_malloc(formattedLen + 1, &pLog->allocationCallbacks); if (pFormattedMessage == NULL) { return MA_OUT_OF_MEMORY; } /* We'll get errors on newer versions of Visual Studio if we try to use vsprintf(). */ #if _MSC_VER >= 1400 /* 1400 = Visual Studio 2005 */ { vsprintf_s(pFormattedMessage, formattedLen + 1, pFormat, args); } #else { vsprintf(pFormattedMessage, pFormat, args); } #endif result = ma_log_post(pLog, level, pFormattedMessage); ma_free(pFormattedMessage, &pLog->allocationCallbacks); return result; } #else { /* Can't do anything because we don't have a safe way of to emulate vsnprintf() without a manual solution. */ (void)level; (void)args; return MA_INVALID_OPERATION; } #endif } #endif } MA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...) { ma_result result; va_list args; if (pLog == NULL || pFormat == NULL) { return MA_INVALID_ARGS; } va_start(args, pFormat); { result = ma_log_postv(pLog, level, pFormat, args); } va_end(args); return result; } static MA_INLINE ma_uint8 ma_clip_u8(ma_int32 x) { return (ma_uint8)(ma_clamp(x, -128, 127) + 128); } static MA_INLINE ma_int16 ma_clip_s16(ma_int32 x) { return (ma_int16)ma_clamp(x, -32768, 32767); } static MA_INLINE ma_int64 ma_clip_s24(ma_int64 x) { return (ma_int64)ma_clamp(x, -8388608, 8388607); } static MA_INLINE ma_int32 ma_clip_s32(ma_int64 x) { /* This dance is to silence warnings with -std=c89. A good compiler should be able to optimize this away. */ ma_int64 clipMin; ma_int64 clipMax; clipMin = -((ma_int64)2147483647 + 1); clipMax = (ma_int64)2147483647; return (ma_int32)ma_clamp(x, clipMin, clipMax); } static MA_INLINE float ma_clip_f32(float x) { if (x < -1) return -1; if (x > +1) return +1; return x; } static MA_INLINE float ma_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static MA_INLINE float ma_mix_f32_fast(float x, float y, float a) { float r0 = (y - x); float r1 = r0*a; return x + r1; /*return x + (y - x)*a;*/ } #if defined(MA_SUPPORT_SSE2) static MA_INLINE __m128 ma_mix_f32_fast__sse2(__m128 x, __m128 y, __m128 a) { return _mm_add_ps(x, _mm_mul_ps(_mm_sub_ps(y, x), a)); } #endif #if defined(MA_SUPPORT_AVX2) static MA_INLINE __m256 ma_mix_f32_fast__avx2(__m256 x, __m256 y, __m256 a) { return _mm256_add_ps(x, _mm256_mul_ps(_mm256_sub_ps(y, x), a)); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE float32x4_t ma_mix_f32_fast__neon(float32x4_t x, float32x4_t y, float32x4_t a) { return vaddq_f32(x, vmulq_f32(vsubq_f32(y, x), a)); } #endif static MA_INLINE double ma_mix_f64(double x, double y, double a) { return x*(1-a) + y*a; } static MA_INLINE double ma_mix_f64_fast(double x, double y, double a) { return x + (y - x)*a; } static MA_INLINE float ma_scale_to_range_f32(float x, float lo, float hi) { return lo + x*(hi-lo); } /* Greatest common factor using Euclid's algorithm iteratively. */ static MA_INLINE ma_uint32 ma_gcf_u32(ma_uint32 a, ma_uint32 b) { for (;;) { if (b == 0) { break; } else { ma_uint32 t = a; a = b; b = t % a; } } return a; } static ma_uint32 ma_ffs_32(ma_uint32 x) { ma_uint32 i; /* Just a naive implementation just to get things working for now. Will optimize this later. */ for (i = 0; i < 32; i += 1) { if ((x & (1U << i)) != 0) { return i; } } return i; } static MA_INLINE ma_int16 ma_float_to_fixed_16(float x) { return (ma_int16)(x * (1 << 8)); } /* Random Number Generation miniaudio uses the LCG random number generation algorithm. This is good enough for audio. Note that miniaudio's global LCG implementation uses global state which is _not_ thread-local. When this is called across multiple threads, results will be unpredictable. However, it won't crash and results will still be random enough for miniaudio's purposes. */ #ifndef MA_DEFAULT_LCG_SEED #define MA_DEFAULT_LCG_SEED 4321 #endif #define MA_LCG_M 2147483647 #define MA_LCG_A 48271 #define MA_LCG_C 0 static ma_lcg g_maLCG = {MA_DEFAULT_LCG_SEED}; /* Non-zero initial seed. Use ma_seed() to use an explicit seed. */ static MA_INLINE void ma_lcg_seed(ma_lcg* pLCG, ma_int32 seed) { MA_ASSERT(pLCG != NULL); pLCG->state = seed; } static MA_INLINE ma_int32 ma_lcg_rand_s32(ma_lcg* pLCG) { pLCG->state = (MA_LCG_A * pLCG->state + MA_LCG_C) % MA_LCG_M; return pLCG->state; } static MA_INLINE ma_uint32 ma_lcg_rand_u32(ma_lcg* pLCG) { return (ma_uint32)ma_lcg_rand_s32(pLCG); } static MA_INLINE ma_int16 ma_lcg_rand_s16(ma_lcg* pLCG) { return (ma_int16)(ma_lcg_rand_s32(pLCG) & 0xFFFF); } static MA_INLINE double ma_lcg_rand_f64(ma_lcg* pLCG) { return ma_lcg_rand_s32(pLCG) / (double)0x7FFFFFFF; } static MA_INLINE float ma_lcg_rand_f32(ma_lcg* pLCG) { return (float)ma_lcg_rand_f64(pLCG); } static MA_INLINE float ma_lcg_rand_range_f32(ma_lcg* pLCG, float lo, float hi) { return ma_scale_to_range_f32(ma_lcg_rand_f32(pLCG), lo, hi); } static MA_INLINE ma_int32 ma_lcg_rand_range_s32(ma_lcg* pLCG, ma_int32 lo, ma_int32 hi) { if (lo == hi) { return lo; } return lo + ma_lcg_rand_u32(pLCG) / (0xFFFFFFFF / (hi - lo + 1) + 1); } static MA_INLINE void ma_seed(ma_int32 seed) { ma_lcg_seed(&g_maLCG, seed); } static MA_INLINE ma_int32 ma_rand_s32(void) { return ma_lcg_rand_s32(&g_maLCG); } static MA_INLINE ma_uint32 ma_rand_u32(void) { return ma_lcg_rand_u32(&g_maLCG); } static MA_INLINE double ma_rand_f64(void) { return ma_lcg_rand_f64(&g_maLCG); } static MA_INLINE float ma_rand_f32(void) { return ma_lcg_rand_f32(&g_maLCG); } static MA_INLINE float ma_rand_range_f32(float lo, float hi) { return ma_lcg_rand_range_f32(&g_maLCG, lo, hi); } static MA_INLINE ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi) { return ma_lcg_rand_range_s32(&g_maLCG, lo, hi); } static MA_INLINE float ma_dither_f32_rectangle(float ditherMin, float ditherMax) { return ma_rand_range_f32(ditherMin, ditherMax); } static MA_INLINE float ma_dither_f32_triangle(float ditherMin, float ditherMax) { float a = ma_rand_range_f32(ditherMin, 0); float b = ma_rand_range_f32(0, ditherMax); return a + b; } static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, float ditherMax) { if (ditherMode == ma_dither_mode_rectangle) { return ma_dither_f32_rectangle(ditherMin, ditherMax); } if (ditherMode == ma_dither_mode_triangle) { return ma_dither_f32_triangle(ditherMin, ditherMax); } return 0; } static MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 ditherMin, ma_int32 ditherMax) { if (ditherMode == ma_dither_mode_rectangle) { ma_int32 a = ma_rand_range_s32(ditherMin, ditherMax); return a; } if (ditherMode == ma_dither_mode_triangle) { ma_int32 a = ma_rand_range_s32(ditherMin, 0); ma_int32 b = ma_rand_range_s32(0, ditherMax); return a + b; } return 0; } /************************************************************************************************************************************************************** Atomics **************************************************************************************************************************************************************/ /* c89atomic.h begin */ #ifndef ma_atomic_h #if defined(__cplusplus) extern "C" { #endif #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef int ma_atomic_memory_order; #define MA_ATOMIC_HAS_8 #define MA_ATOMIC_HAS_16 #define MA_ATOMIC_HAS_32 #define MA_ATOMIC_HAS_64 #if (defined(_MSC_VER) ) || defined(__WATCOMC__) || defined(__DMC__) #define MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, intrin, ma_atomicType, msvcType) \ ma_atomicType result; \ switch (order) \ { \ case ma_atomic_memory_order_relaxed: \ { \ result = (ma_atomicType)intrin##_nf((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_consume: \ case ma_atomic_memory_order_acquire: \ { \ result = (ma_atomicType)intrin##_acq((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_release: \ { \ result = (ma_atomicType)intrin##_rel((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_acq_rel: \ case ma_atomic_memory_order_seq_cst: \ default: \ { \ result = (ma_atomicType)intrin((volatile msvcType*)dst, (msvcType)src); \ } break; \ } \ return result; #define MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, expected, desired, order, intrin, ma_atomicType, msvcType) \ ma_atomicType result; \ switch (order) \ { \ case ma_atomic_memory_order_relaxed: \ { \ result = (ma_atomicType)intrin##_nf((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_consume: \ case ma_atomic_memory_order_acquire: \ { \ result = (ma_atomicType)intrin##_acq((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_release: \ { \ result = (ma_atomicType)intrin##_rel((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_acq_rel: \ case ma_atomic_memory_order_seq_cst: \ default: \ { \ result = (ma_atomicType)intrin((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ } \ return result; #define ma_atomic_memory_order_relaxed 0 #define ma_atomic_memory_order_consume 1 #define ma_atomic_memory_order_acquire 2 #define ma_atomic_memory_order_release 3 #define ma_atomic_memory_order_acq_rel 4 #define ma_atomic_memory_order_seq_cst 5 #if _MSC_VER < 1600 && defined(MA_X86) #define MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY #endif #if _MSC_VER < 1600 #undef MA_ATOMIC_HAS_8 #undef MA_ATOMIC_HAS_16 #endif #if !defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #include #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { ma_uint8 result = 0; __asm { mov ecx, dst mov al, expected mov dl, desired lock cmpxchg [ecx], dl mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { ma_uint16 result = 0; __asm { mov ecx, dst mov ax, expected mov dx, desired lock cmpxchg [ecx], dx mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { ma_uint32 result = 0; __asm { mov ecx, dst mov eax, expected mov edx, desired lock cmpxchg [ecx], edx mov result, eax } return result; } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { ma_uint32 resultEAX = 0; ma_uint32 resultEDX = 0; __asm { mov esi, dst mov eax, dword ptr expected mov edx, dword ptr expected + 4 mov ebx, dword ptr desired mov ecx, dword ptr desired + 4 lock cmpxchg8b qword ptr [esi] mov resultEAX, eax mov resultEDX, edx } return ((ma_uint64)resultEDX << 32) | resultEAX; } #endif #else #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_compare_and_swap_8( dst, expected, desired) (ma_uint8 )_InterlockedCompareExchange8((volatile char*)dst, (char)desired, (char)expected) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_compare_and_swap_16(dst, expected, desired) (ma_uint16)_InterlockedCompareExchange16((volatile short*)dst, (short)desired, (short)expected) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_compare_and_swap_32(dst, expected, desired) (ma_uint32)_InterlockedCompareExchange((volatile long*)dst, (long)desired, (long)expected) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_compare_and_swap_64(dst, expected, desired) (ma_uint64)_InterlockedCompareExchange64((volatile ma_int64*)dst, (ma_int64)desired, (ma_int64)expected) #endif #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; __asm { mov ecx, dst mov al, src lock xchg [ecx], al mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; __asm { mov ecx, dst mov ax, src lock xchg [ecx], ax mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result = 0; (void)order; __asm { mov ecx, dst mov eax, src lock xchg [ecx], eax mov result, eax } return result; } #endif #else #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange8, ma_uint8, char); #else (void)order; return (ma_uint8)_InterlockedExchange8((volatile char*)dst, (char)src); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange16, ma_uint16, short); #else (void)order; return (ma_uint16)_InterlockedExchange16((volatile short*)dst, (short)src); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange, ma_uint32, long); #else (void)order; return (ma_uint32)_InterlockedExchange((volatile long*)dst, (long)src); #endif } #endif #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange64, ma_uint64, long long); #else (void)order; return (ma_uint64)_InterlockedExchange64((volatile long long*)dst, (long long)src); #endif } #else #endif #endif #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; do { oldValue = *dst; } while (ma_atomic_compare_and_swap_64(dst, oldValue, src) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; __asm { mov ecx, dst mov al, src lock xadd [ecx], al mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; __asm { mov ecx, dst mov ax, src lock xadd [ecx], ax mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result = 0; (void)order; __asm { mov ecx, dst mov eax, src lock xadd [ecx], eax mov result, eax } return result; } #endif #else #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd8, ma_uint8, char); #else (void)order; return (ma_uint8)_InterlockedExchangeAdd8((volatile char*)dst, (char)src); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd16, ma_uint16, short); #else (void)order; return (ma_uint16)_InterlockedExchangeAdd16((volatile short*)dst, (short)src); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd, ma_uint32, long); #else (void)order; return (ma_uint32)_InterlockedExchangeAdd((volatile long*)dst, (long)src); #endif } #endif #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd64, ma_uint64, long long); #else (void)order; return (ma_uint64)_InterlockedExchangeAdd64((volatile long long*)dst, (long long)src); #endif } #else #endif #endif #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue + src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) static MA_INLINE void __stdcall ma_atomic_thread_fence(ma_atomic_memory_order order) { (void)order; __asm { lock add [esp], 0 } } #else #if defined(MA_X64) #define ma_atomic_thread_fence(order) __faststorefence(), (void)order #elif defined(MA_ARM64) #define ma_atomic_thread_fence(order) __dmb(_ARM64_BARRIER_ISH), (void)order #else static MA_INLINE void ma_atomic_thread_fence(ma_atomic_memory_order order) { volatile ma_uint32 barrier = 0; ma_atomic_fetch_add_explicit_32(&barrier, 0, order); } #endif #endif #define ma_atomic_compiler_fence() ma_atomic_thread_fence(ma_atomic_memory_order_seq_cst) #define ma_atomic_signal_fence(order) ma_atomic_thread_fence(order) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange8, ma_uint8, char); #else (void)order; return ma_atomic_compare_and_swap_8((volatile ma_uint8*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange16, ma_uint16, short); #else (void)order; return ma_atomic_compare_and_swap_16((volatile ma_uint16*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange, ma_uint32, long); #else (void)order; return ma_atomic_compare_and_swap_32((volatile ma_uint32*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange64, ma_uint64, long long); #else (void)order; return ma_atomic_compare_and_swap_64((volatile ma_uint64*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_store_explicit_8( dst, src, order) (void)ma_atomic_exchange_explicit_8 (dst, src, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_store_explicit_16(dst, src, order) (void)ma_atomic_exchange_explicit_16(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_store_explicit_32(dst, src, order) (void)ma_atomic_exchange_explicit_32(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_store_explicit_64(dst, src, order) (void)ma_atomic_exchange_explicit_64(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue - src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue - src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue & src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue & src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue ^ src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue ^ src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue | src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue | src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_test_and_set_explicit_8( dst, order) ma_atomic_exchange_explicit_8 (dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_test_and_set_explicit_16(dst, order) ma_atomic_exchange_explicit_16(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_test_and_set_explicit_32(dst, order) ma_atomic_exchange_explicit_32(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_test_and_set_explicit_64(dst, order) ma_atomic_exchange_explicit_64(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_clear_explicit_8( dst, order) ma_atomic_store_explicit_8 (dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_clear_explicit_16(dst, order) ma_atomic_store_explicit_16(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_clear_explicit_32(dst, order) ma_atomic_store_explicit_32(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_clear_explicit_64(dst, order) ma_atomic_store_explicit_64(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_8) typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_8(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #else typedef ma_uint32 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_32(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_32(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_32(ptr, order) #endif #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE #define MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE #define ma_atomic_memory_order_relaxed __ATOMIC_RELAXED #define ma_atomic_memory_order_consume __ATOMIC_CONSUME #define ma_atomic_memory_order_acquire __ATOMIC_ACQUIRE #define ma_atomic_memory_order_release __ATOMIC_RELEASE #define ma_atomic_memory_order_acq_rel __ATOMIC_ACQ_REL #define ma_atomic_memory_order_seq_cst __ATOMIC_SEQ_CST #define ma_atomic_compiler_fence() __asm__ __volatile__("":::"memory") #define ma_atomic_thread_fence(order) __atomic_thread_fence(order) #define ma_atomic_signal_fence(order) __atomic_signal_fence(order) #define ma_atomic_is_lock_free_8(ptr) __atomic_is_lock_free(1, ptr) #define ma_atomic_is_lock_free_16(ptr) __atomic_is_lock_free(2, ptr) #define ma_atomic_is_lock_free_32(ptr) __atomic_is_lock_free(4, ptr) #define ma_atomic_is_lock_free_64(ptr) __atomic_is_lock_free(8, ptr) #define ma_atomic_test_and_set_explicit_8( dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_16(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_32(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_64(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_clear_explicit_8( dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_16(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_32(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_64(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_store_explicit_8( dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_16(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_32(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_64(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_load_explicit_8( dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_16(dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_32(dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_64(dst, order) __atomic_load_n(dst, order) #define ma_atomic_exchange_explicit_8( dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_16(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_32(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_64(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_fetch_add_explicit_8( dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_16(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_32(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_64(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_sub_explicit_8( dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_16(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_32(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_64(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_or_explicit_8( dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_16(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_32(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_64(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_xor_explicit_8( dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_16(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_32(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_64(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_and_explicit_8( dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_16(dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_32(dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_64(dst, src, order) __atomic_fetch_and(dst, src, order) static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } #if defined(__clang__) #pragma clang diagnostic push #if __clang_major__ >= 8 #pragma clang diagnostic ignored "-Watomic-alignment" #endif #endif static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } #if defined(__clang__) #pragma clang diagnostic pop #endif typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(dst, order) (ma_bool32)__atomic_test_and_set(dst, order) #define ma_atomic_flag_clear_explicit(dst, order) __atomic_clear(dst, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #else #define ma_atomic_memory_order_relaxed 1 #define ma_atomic_memory_order_consume 2 #define ma_atomic_memory_order_acquire 3 #define ma_atomic_memory_order_release 4 #define ma_atomic_memory_order_acq_rel 5 #define ma_atomic_memory_order_seq_cst 6 #define ma_atomic_compiler_fence() __asm__ __volatile__("":::"memory") #if defined(__GNUC__) #define ma_atomic_thread_fence(order) __sync_synchronize(), (void)order static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { if (order > ma_atomic_memory_order_acquire) { __sync_synchronize(); } return __sync_lock_test_and_set(dst, src); } static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } #define ma_atomic_compare_and_swap_8( dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_16(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_32(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_64(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #else #if defined(MA_X86) #define ma_atomic_thread_fence(order) __asm__ __volatile__("lock; addl $0, (%%esp)" ::: "memory", "cc") #elif defined(MA_X64) #define ma_atomic_thread_fence(order) __asm__ __volatile__("lock; addq $0, (%%rsp)" ::: "memory", "cc") #else #error Unsupported architecture. Please submit a feature request. #endif static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { ma_uint8 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { ma_uint16 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { ma_uint32 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { volatile ma_uint64 result; #if defined(MA_X86) ma_uint32 resultEAX; ma_uint32 resultEDX; __asm__ __volatile__("push %%ebx; xchg %5, %%ebx; lock; cmpxchg8b %0; pop %%ebx" : "+m"(*dst), "=a"(resultEAX), "=d"(resultEDX) : "a"(expected & 0xFFFFFFFF), "d"(expected >> 32), "r"(desired & 0xFFFFFFFF), "c"(desired >> 32) : "cc"); result = ((ma_uint64)resultEDX << 32) | resultEAX; #elif defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 result; (void)order; #if defined(MA_X86) do { result = *dst; } while (ma_atomic_compare_and_swap_64(dst, result, src) != result); #elif defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_X86) ma_uint64 oldValue; ma_uint64 newValue; (void)order; do { oldValue = *dst; newValue = oldValue + src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); return oldValue; #elif defined(MA_X64) ma_uint64 result; (void)order; __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); return result; #endif } static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue - src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue - src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue & src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue & src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue ^ src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue ^ src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue | src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue | src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #define ma_atomic_signal_fence(order) ma_atomic_thread_fence(order) static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_8((ma_uint8*)ptr, 0, 0); } static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_16((ma_uint16*)ptr, 0, 0); } static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_32((ma_uint32*)ptr, 0, 0); } static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_64((ma_uint64*)ptr, 0, 0); } #define ma_atomic_store_explicit_8( dst, src, order) (void)ma_atomic_exchange_explicit_8 (dst, src, order) #define ma_atomic_store_explicit_16(dst, src, order) (void)ma_atomic_exchange_explicit_16(dst, src, order) #define ma_atomic_store_explicit_32(dst, src, order) (void)ma_atomic_exchange_explicit_32(dst, src, order) #define ma_atomic_store_explicit_64(dst, src, order) (void)ma_atomic_exchange_explicit_64(dst, src, order) #define ma_atomic_test_and_set_explicit_8( dst, order) ma_atomic_exchange_explicit_8 (dst, 1, order) #define ma_atomic_test_and_set_explicit_16(dst, order) ma_atomic_exchange_explicit_16(dst, 1, order) #define ma_atomic_test_and_set_explicit_32(dst, order) ma_atomic_exchange_explicit_32(dst, 1, order) #define ma_atomic_test_and_set_explicit_64(dst, order) ma_atomic_exchange_explicit_64(dst, 1, order) #define ma_atomic_clear_explicit_8( dst, order) ma_atomic_store_explicit_8 (dst, 0, order) #define ma_atomic_clear_explicit_16(dst, order) ma_atomic_store_explicit_16(dst, 0, order) #define ma_atomic_clear_explicit_32(dst, order) ma_atomic_store_explicit_32(dst, 0, order) #define ma_atomic_clear_explicit_64(dst, order) ma_atomic_store_explicit_64(dst, 0, order) typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_8(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #endif #if !defined(MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_8(volatile ma_uint8* dst, ma_uint8* expected, ma_uint8 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint8 expectedValue; ma_uint8 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_8(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_8(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_8(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_16(volatile ma_uint16* dst, ma_uint16* expected, ma_uint16 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint16 expectedValue; ma_uint16 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_16(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_16(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_16(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_32(volatile ma_uint32* dst, ma_uint32* expected, ma_uint32 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint32 expectedValue; ma_uint32 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_32(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_32(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_32(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_64(volatile ma_uint64* dst, volatile ma_uint64* expected, ma_uint64 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint64 expectedValue; ma_uint64 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_64(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_64(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_64(expected, result, failureOrder); return 0; } } #endif #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_8 (dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder) #endif #if !defined(MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_8(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_16(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_32(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_64(volatile void* ptr) { (void)ptr; #if defined(MA_64BIT) return 1; #else #if defined(MA_X86) || defined(MA_X64) return 1; #else return 0; #endif #endif } #endif #if defined(MA_64BIT) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr) { return ma_atomic_is_lock_free_64((volatile ma_uint64*)ptr); } static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order) { return (void*)ma_atomic_load_explicit_64((volatile ma_uint64*)ptr, order); } static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { ma_atomic_store_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order); } static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { return (void*)ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder); } static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired) { return (void*)ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)desired); } #elif defined(MA_32BIT) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr) { return ma_atomic_is_lock_free_32((volatile ma_uint32*)ptr); } static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order) { return (void*)ma_atomic_load_explicit_32((volatile ma_uint32*)ptr, order); } static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { ma_atomic_store_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order); } static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { return (void*)ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder); } static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired) { return (void*)ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)desired); } #else #error Unsupported architecture. #endif #define ma_atomic_flag_test_and_set(ptr) ma_atomic_flag_test_and_set_explicit(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_flag_clear(ptr) ma_atomic_flag_clear_explicit(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_ptr(dst, src) ma_atomic_store_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_ptr(ptr) ma_atomic_load_explicit_ptr((volatile void**)ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_ptr(dst, src) ma_atomic_exchange_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_ptr(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_ptr(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_8( ptr) ma_atomic_test_and_set_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_16(ptr) ma_atomic_test_and_set_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_32(ptr) ma_atomic_test_and_set_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_64(ptr) ma_atomic_test_and_set_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_8( ptr) ma_atomic_clear_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_16(ptr) ma_atomic_clear_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_32(ptr) ma_atomic_clear_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_64(ptr) ma_atomic_clear_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_8( dst, src) ma_atomic_store_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_16(dst, src) ma_atomic_store_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_32(dst, src) ma_atomic_store_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_64(dst, src) ma_atomic_store_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_8( ptr) ma_atomic_load_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_16(ptr) ma_atomic_load_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_32(ptr) ma_atomic_load_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_64(ptr) ma_atomic_load_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_8( dst, src) ma_atomic_exchange_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_16(dst, src) ma_atomic_exchange_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_32(dst, src) ma_atomic_exchange_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_64(dst, src) ma_atomic_exchange_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_8( dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_16(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_8( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_16( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_32( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_64( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_8( dst, src) ma_atomic_fetch_add_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_16(dst, src) ma_atomic_fetch_add_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_32(dst, src) ma_atomic_fetch_add_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_64(dst, src) ma_atomic_fetch_add_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_8( dst, src) ma_atomic_fetch_sub_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_16(dst, src) ma_atomic_fetch_sub_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_32(dst, src) ma_atomic_fetch_sub_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_64(dst, src) ma_atomic_fetch_sub_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_8( dst, src) ma_atomic_fetch_or_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_16(dst, src) ma_atomic_fetch_or_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_32(dst, src) ma_atomic_fetch_or_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_64(dst, src) ma_atomic_fetch_or_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_8( dst, src) ma_atomic_fetch_xor_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_16(dst, src) ma_atomic_fetch_xor_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_32(dst, src) ma_atomic_fetch_xor_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_64(dst, src) ma_atomic_fetch_xor_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_8( dst, src) ma_atomic_fetch_and_explicit_8 (dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_16(dst, src) ma_atomic_fetch_and_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_32(dst, src) ma_atomic_fetch_and_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_64(dst, src) ma_atomic_fetch_and_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_explicit_i8( ptr, order) (ma_int8 )ma_atomic_test_and_set_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_test_and_set_explicit_i16(ptr, order) (ma_int16)ma_atomic_test_and_set_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_test_and_set_explicit_i32(ptr, order) (ma_int32)ma_atomic_test_and_set_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_test_and_set_explicit_i64(ptr, order) (ma_int64)ma_atomic_test_and_set_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_clear_explicit_i8( ptr, order) ma_atomic_clear_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_clear_explicit_i16(ptr, order) ma_atomic_clear_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_clear_explicit_i32(ptr, order) ma_atomic_clear_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_clear_explicit_i64(ptr, order) ma_atomic_clear_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_store_explicit_i8( dst, src, order) ma_atomic_store_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_store_explicit_i16(dst, src, order) ma_atomic_store_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_store_explicit_i32(dst, src, order) ma_atomic_store_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_store_explicit_i64(dst, src, order) ma_atomic_store_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_load_explicit_i8( ptr, order) (ma_int8 )ma_atomic_load_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_load_explicit_i16(ptr, order) (ma_int16)ma_atomic_load_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_load_explicit_i32(ptr, order) (ma_int32)ma_atomic_load_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_load_explicit_i64(ptr, order) (ma_int64)ma_atomic_load_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_exchange_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_exchange_explicit_8 ((ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_exchange_explicit_i16(dst, src, order) (ma_int16)ma_atomic_exchange_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_exchange_explicit_i32(dst, src, order) (ma_int32)ma_atomic_exchange_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_exchange_explicit_i64(dst, src, order) (ma_int64)ma_atomic_exchange_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder) #define ma_atomic_fetch_add_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_add_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_add_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_add_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_add_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_add_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_add_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_add_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_sub_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_sub_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_sub_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_sub_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_sub_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_sub_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_sub_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_sub_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_or_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_or_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_or_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_or_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_or_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_or_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_or_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_or_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_xor_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_xor_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_xor_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_xor_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_xor_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_xor_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_xor_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_xor_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_and_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_and_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_and_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_and_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_and_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_and_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_and_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_and_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_test_and_set_i8( ptr) ma_atomic_test_and_set_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i16(ptr) ma_atomic_test_and_set_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i32(ptr) ma_atomic_test_and_set_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i64(ptr) ma_atomic_test_and_set_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i8( ptr) ma_atomic_clear_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i16(ptr) ma_atomic_clear_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i32(ptr) ma_atomic_clear_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i64(ptr) ma_atomic_clear_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i8( dst, src) ma_atomic_store_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i16(dst, src) ma_atomic_store_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i32(dst, src) ma_atomic_store_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i64(dst, src) ma_atomic_store_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i8( ptr) ma_atomic_load_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i16(ptr) ma_atomic_load_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i32(ptr) ma_atomic_load_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i64(ptr) ma_atomic_load_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i8( dst, src) ma_atomic_exchange_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i16(dst, src) ma_atomic_exchange_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i32(dst, src) ma_atomic_exchange_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i64(dst, src) ma_atomic_exchange_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i8( dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i16(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i8( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i16(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i32(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i64(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i8( dst, src) ma_atomic_fetch_add_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i16(dst, src) ma_atomic_fetch_add_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i32(dst, src) ma_atomic_fetch_add_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i64(dst, src) ma_atomic_fetch_add_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i8( dst, src) ma_atomic_fetch_sub_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i16(dst, src) ma_atomic_fetch_sub_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i32(dst, src) ma_atomic_fetch_sub_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i64(dst, src) ma_atomic_fetch_sub_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i8( dst, src) ma_atomic_fetch_or_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i16(dst, src) ma_atomic_fetch_or_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i32(dst, src) ma_atomic_fetch_or_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i64(dst, src) ma_atomic_fetch_or_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i8( dst, src) ma_atomic_fetch_xor_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i16(dst, src) ma_atomic_fetch_xor_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i32(dst, src) ma_atomic_fetch_xor_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i64(dst, src) ma_atomic_fetch_xor_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i8( dst, src) ma_atomic_fetch_and_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i16(dst, src) ma_atomic_fetch_and_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i32(dst, src) ma_atomic_fetch_and_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i64(dst, src) ma_atomic_fetch_and_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_and_swap_i8( dst, expected, dedsired) (ma_int8 )ma_atomic_compare_and_swap_8( (ma_uint8* )dst, (ma_uint8 )expected, (ma_uint8 )dedsired) #define ma_atomic_compare_and_swap_i16(dst, expected, dedsired) (ma_int16)ma_atomic_compare_and_swap_16((ma_uint16*)dst, (ma_uint16)expected, (ma_uint16)dedsired) #define ma_atomic_compare_and_swap_i32(dst, expected, dedsired) (ma_int32)ma_atomic_compare_and_swap_32((ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)dedsired) #define ma_atomic_compare_and_swap_i64(dst, expected, dedsired) (ma_int64)ma_atomic_compare_and_swap_64((ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)dedsired) typedef union { ma_uint32 i; float f; } ma_atomic_if32; typedef union { ma_uint64 i; double f; } ma_atomic_if64; #define ma_atomic_clear_explicit_f32(ptr, order) ma_atomic_clear_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_clear_explicit_f64(ptr, order) ma_atomic_clear_explicit_64((ma_uint64*)ptr, order) static MA_INLINE void ma_atomic_store_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 x; x.f = src; ma_atomic_store_explicit_32((volatile ma_uint32*)dst, x.i, order); } static MA_INLINE void ma_atomic_store_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 x; x.f = src; ma_atomic_store_explicit_64((volatile ma_uint64*)dst, x.i, order); } static MA_INLINE float ma_atomic_load_explicit_f32(volatile const float* ptr, ma_atomic_memory_order order) { ma_atomic_if32 r; r.i = ma_atomic_load_explicit_32((volatile const ma_uint32*)ptr, order); return r.f; } static MA_INLINE double ma_atomic_load_explicit_f64(volatile const double* ptr, ma_atomic_memory_order order) { ma_atomic_if64 r; r.i = ma_atomic_load_explicit_64((volatile const ma_uint64*)ptr, order); return r.f; } static MA_INLINE float ma_atomic_exchange_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_exchange_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if32 d; d.f = desired; return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if64 d; d.f = desired; return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if32 d; d.f = desired; return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if64 d; d.f = desired; return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder); } static MA_INLINE float ma_atomic_fetch_add_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_add_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_add_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_add_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_sub_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_sub_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_sub_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_sub_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_or_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_or_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_or_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_or_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_xor_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_xor_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_xor_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_xor_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_and_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_and_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_and_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_and_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } #define ma_atomic_clear_f32(ptr) (float )ma_atomic_clear_explicit_f32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_f64(ptr) (double)ma_atomic_clear_explicit_f64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_f32(dst, src) ma_atomic_store_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_f64(dst, src) ma_atomic_store_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_f32(ptr) (float )ma_atomic_load_explicit_f32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_f64(ptr) (double)ma_atomic_load_explicit_f64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_f32(dst, src) (float )ma_atomic_exchange_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_f64(dst, src) (double)ma_atomic_exchange_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_f32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_f64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_f32(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_f64(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_f32(dst, src) ma_atomic_fetch_add_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_f64(dst, src) ma_atomic_fetch_add_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_f32(dst, src) ma_atomic_fetch_sub_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_f64(dst, src) ma_atomic_fetch_sub_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_f32(dst, src) ma_atomic_fetch_or_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_f64(dst, src) ma_atomic_fetch_or_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_f32(dst, src) ma_atomic_fetch_xor_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_f64(dst, src) ma_atomic_fetch_xor_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_f32(dst, src) ma_atomic_fetch_and_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_f64(dst, src) ma_atomic_fetch_and_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) static MA_INLINE float ma_atomic_compare_and_swap_f32(volatile float* dst, float expected, float desired) { ma_atomic_if32 r; ma_atomic_if32 e, d; e.f = expected; d.f = desired; r.i = ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, e.i, d.i); return r.f; } static MA_INLINE double ma_atomic_compare_and_swap_f64(volatile double* dst, double expected, double desired) { ma_atomic_if64 r; ma_atomic_if64 e, d; e.f = expected; d.f = desired; r.i = ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, e.i, d.i); return r.f; } typedef ma_atomic_flag ma_atomic_spinlock; static MA_INLINE void ma_atomic_spinlock_lock(volatile ma_atomic_spinlock* pSpinlock) { for (;;) { if (ma_atomic_flag_test_and_set_explicit(pSpinlock, ma_atomic_memory_order_acquire) == 0) { break; } while (ma_atomic_flag_load_explicit(pSpinlock, ma_atomic_memory_order_relaxed) == 1) { } } } static MA_INLINE void ma_atomic_spinlock_unlock(volatile ma_atomic_spinlock* pSpinlock) { ma_atomic_flag_clear_explicit(pSpinlock, ma_atomic_memory_order_release); } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #if defined(__cplusplus) } #endif #endif /* c89atomic.h end */ #define MA_ATOMIC_SAFE_TYPE_IMPL(c89TypeExtension, type) \ static MA_INLINE ma_##type ma_atomic_##type##_get(ma_atomic_##type* x) \ { \ return (ma_##type)ma_atomic_load_##c89TypeExtension(&x->value); \ } \ static MA_INLINE void ma_atomic_##type##_set(ma_atomic_##type* x, ma_##type value) \ { \ ma_atomic_store_##c89TypeExtension(&x->value, value); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_exchange(ma_atomic_##type* x, ma_##type value) \ { \ return (ma_##type)ma_atomic_exchange_##c89TypeExtension(&x->value, value); \ } \ static MA_INLINE ma_bool32 ma_atomic_##type##_compare_exchange(ma_atomic_##type* x, ma_##type* expected, ma_##type desired) \ { \ return ma_atomic_compare_exchange_weak_##c89TypeExtension(&x->value, expected, desired); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_add(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_add_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_sub(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_sub_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_or(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_or_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_xor(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_xor_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_and(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_and_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_compare_and_swap(ma_atomic_##type* x, ma_##type expected, ma_##type desired) \ { \ return (ma_##type)ma_atomic_compare_and_swap_##c89TypeExtension(&x->value, expected, desired); \ } \ #define MA_ATOMIC_SAFE_TYPE_IMPL_PTR(type) \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_get(ma_atomic_ptr_##type* x) \ { \ return ma_atomic_load_ptr((void**)&x->value); \ } \ static MA_INLINE void ma_atomic_ptr_##type##_set(ma_atomic_ptr_##type* x, ma_##type* value) \ { \ ma_atomic_store_ptr((void**)&x->value, (void*)value); \ } \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_exchange(ma_atomic_ptr_##type* x, ma_##type* value) \ { \ return ma_atomic_exchange_ptr((void**)&x->value, (void*)value); \ } \ static MA_INLINE ma_bool32 ma_atomic_ptr_##type##_compare_exchange(ma_atomic_ptr_##type* x, ma_##type** expected, ma_##type* desired) \ { \ return ma_atomic_compare_exchange_weak_ptr((void**)&x->value, (void*)expected, (void*)desired); \ } \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_compare_and_swap(ma_atomic_ptr_##type* x, ma_##type* expected, ma_##type* desired) \ { \ return (ma_##type*)ma_atomic_compare_and_swap_ptr((void**)&x->value, (void*)expected, (void*)desired); \ } \ MA_ATOMIC_SAFE_TYPE_IMPL(32, uint32) MA_ATOMIC_SAFE_TYPE_IMPL(i32, int32) MA_ATOMIC_SAFE_TYPE_IMPL(64, uint64) MA_ATOMIC_SAFE_TYPE_IMPL(f32, float) MA_ATOMIC_SAFE_TYPE_IMPL(32, bool32) #if !defined(MA_NO_DEVICE_IO) MA_ATOMIC_SAFE_TYPE_IMPL(i32, device_state) #endif MA_API ma_uint64 ma_calculate_frame_count_after_resampling(ma_uint32 sampleRateOut, ma_uint32 sampleRateIn, ma_uint64 frameCountIn) { /* This is based on the calculation in ma_linear_resampler_get_expected_output_frame_count(). */ ma_uint64 outputFrameCount; ma_uint64 preliminaryInputFrameCountFromFrac; ma_uint64 preliminaryInputFrameCount; if (sampleRateIn == 0 || sampleRateOut == 0 || frameCountIn == 0) { return 0; } if (sampleRateOut == sampleRateIn) { return frameCountIn; } outputFrameCount = (frameCountIn * sampleRateOut) / sampleRateIn; preliminaryInputFrameCountFromFrac = (outputFrameCount * (sampleRateIn / sampleRateOut)) / sampleRateOut; preliminaryInputFrameCount = (outputFrameCount * (sampleRateIn % sampleRateOut)) + preliminaryInputFrameCountFromFrac; if (preliminaryInputFrameCount <= frameCountIn) { outputFrameCount += 1; } return outputFrameCount; } #ifndef MA_DATA_CONVERTER_STACK_BUFFER_SIZE #define MA_DATA_CONVERTER_STACK_BUFFER_SIZE 4096 #endif #if defined(MA_WIN32) static ma_result ma_result_from_GetLastError(DWORD error) { switch (error) { case ERROR_SUCCESS: return MA_SUCCESS; case ERROR_PATH_NOT_FOUND: return MA_DOES_NOT_EXIST; case ERROR_TOO_MANY_OPEN_FILES: return MA_TOO_MANY_OPEN_FILES; case ERROR_NOT_ENOUGH_MEMORY: return MA_OUT_OF_MEMORY; case ERROR_DISK_FULL: return MA_NO_SPACE; case ERROR_HANDLE_EOF: return MA_AT_END; case ERROR_NEGATIVE_SEEK: return MA_BAD_SEEK; case ERROR_INVALID_PARAMETER: return MA_INVALID_ARGS; case ERROR_ACCESS_DENIED: return MA_ACCESS_DENIED; case ERROR_SEM_TIMEOUT: return MA_TIMEOUT; case ERROR_FILE_NOT_FOUND: return MA_DOES_NOT_EXIST; default: break; } return MA_ERROR; } #endif /* MA_WIN32 */ /******************************************************************************* Threading *******************************************************************************/ static MA_INLINE ma_result ma_spinlock_lock_ex(volatile ma_spinlock* pSpinlock, ma_bool32 yield) { if (pSpinlock == NULL) { return MA_INVALID_ARGS; } for (;;) { if (ma_atomic_exchange_explicit_32(pSpinlock, 1, ma_atomic_memory_order_acquire) == 0) { break; } while (ma_atomic_load_explicit_32(pSpinlock, ma_atomic_memory_order_relaxed) == 1) { if (yield) { ma_yield(); } } } return MA_SUCCESS; } MA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock) { return ma_spinlock_lock_ex(pSpinlock, MA_TRUE); } MA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock) { return ma_spinlock_lock_ex(pSpinlock, MA_FALSE); } MA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock) { if (pSpinlock == NULL) { return MA_INVALID_ARGS; } ma_atomic_store_explicit_32(pSpinlock, 0, ma_atomic_memory_order_release); return MA_SUCCESS; } #ifndef MA_NO_THREADING #if defined(MA_POSIX) #define MA_THREADCALL typedef void* ma_thread_result; #elif defined(MA_WIN32) #define MA_THREADCALL WINAPI typedef unsigned long ma_thread_result; #endif typedef ma_thread_result (MA_THREADCALL * ma_thread_entry_proc)(void* pData); #ifdef MA_POSIX static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData) { int result; pthread_attr_t* pAttr = NULL; #if !defined(__EMSCRIPTEN__) && !defined(__3DS__) /* Try setting the thread priority. It's not critical if anything fails here. */ pthread_attr_t attr; if (pthread_attr_init(&attr) == 0) { int scheduler = -1; /* We successfully initialized our attributes object so we can assign the pointer so it's passed into pthread_create(). */ pAttr = &attr; /* We need to set the scheduler policy. Only do this if the OS supports pthread_attr_setschedpolicy() */ #if !defined(MA_BEOS) { if (priority == ma_thread_priority_idle) { #ifdef SCHED_IDLE if (pthread_attr_setschedpolicy(&attr, SCHED_IDLE) == 0) { scheduler = SCHED_IDLE; } #endif } else if (priority == ma_thread_priority_realtime) { #ifdef SCHED_FIFO if (pthread_attr_setschedpolicy(&attr, SCHED_FIFO) == 0) { scheduler = SCHED_FIFO; } #endif #ifdef MA_LINUX } else { scheduler = sched_getscheduler(0); #endif } } #endif if (stackSize > 0) { pthread_attr_setstacksize(&attr, stackSize); } if (scheduler != -1) { int priorityMin = sched_get_priority_min(scheduler); int priorityMax = sched_get_priority_max(scheduler); int priorityStep = (priorityMax - priorityMin) / 7; /* 7 = number of priorities supported by miniaudio. */ struct sched_param sched; if (pthread_attr_getschedparam(&attr, &sched) == 0) { if (priority == ma_thread_priority_idle) { sched.sched_priority = priorityMin; } else if (priority == ma_thread_priority_realtime) { #if defined(MA_PTHREAD_REALTIME_THREAD_PRIORITY) { sched.sched_priority = MA_PTHREAD_REALTIME_THREAD_PRIORITY; } #else { sched.sched_priority = priorityMax; } #endif } else { sched.sched_priority += ((int)priority + 5) * priorityStep; /* +5 because the lowest priority is -5. */ } if (sched.sched_priority < priorityMin) { sched.sched_priority = priorityMin; } if (sched.sched_priority > priorityMax) { sched.sched_priority = priorityMax; } /* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */ if (pthread_attr_setschedparam(&attr, &sched) == 0) { #if !defined(MA_ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28) { pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); } #endif } } } } #else /* It's the emscripten build. We'll have a few unused parameters. */ (void)priority; (void)stackSize; #endif result = pthread_create((pthread_t*)pThread, pAttr, entryProc, pData); /* The thread attributes object is no longer required. */ if (pAttr != NULL) { pthread_attr_destroy(pAttr); } if (result != 0) { return ma_result_from_errno(result); } return MA_SUCCESS; } static void ma_thread_wait__posix(ma_thread* pThread) { pthread_join((pthread_t)*pThread, NULL); } static ma_result ma_mutex_init__posix(ma_mutex* pMutex) { int result; if (pMutex == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pMutex); result = pthread_mutex_init((pthread_mutex_t*)pMutex, NULL); if (result != 0) { return ma_result_from_errno(result); } return MA_SUCCESS; } static void ma_mutex_uninit__posix(ma_mutex* pMutex) { pthread_mutex_destroy((pthread_mutex_t*)pMutex); } static void ma_mutex_lock__posix(ma_mutex* pMutex) { pthread_mutex_lock((pthread_mutex_t*)pMutex); } static void ma_mutex_unlock__posix(ma_mutex* pMutex) { pthread_mutex_unlock((pthread_mutex_t*)pMutex); } static ma_result ma_event_init__posix(ma_event* pEvent) { int result; result = pthread_mutex_init((pthread_mutex_t*)&pEvent->lock, NULL); if (result != 0) { return ma_result_from_errno(result); } result = pthread_cond_init((pthread_cond_t*)&pEvent->cond, NULL); if (result != 0) { pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock); return ma_result_from_errno(result); } pEvent->value = 0; return MA_SUCCESS; } static void ma_event_uninit__posix(ma_event* pEvent) { pthread_cond_destroy((pthread_cond_t*)&pEvent->cond); pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock); } static ma_result ma_event_wait__posix(ma_event* pEvent) { pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock); { while (pEvent->value == 0) { pthread_cond_wait((pthread_cond_t*)&pEvent->cond, (pthread_mutex_t*)&pEvent->lock); } pEvent->value = 0; /* Auto-reset. */ } pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock); return MA_SUCCESS; } static ma_result ma_event_signal__posix(ma_event* pEvent) { pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock); { pEvent->value = 1; pthread_cond_signal((pthread_cond_t*)&pEvent->cond); } pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock); return MA_SUCCESS; } static ma_result ma_semaphore_init__posix(int initialValue, ma_semaphore* pSemaphore) { int result; if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pSemaphore->value = initialValue; result = pthread_mutex_init((pthread_mutex_t*)&pSemaphore->lock, NULL); if (result != 0) { return ma_result_from_errno(result); /* Failed to create mutex. */ } result = pthread_cond_init((pthread_cond_t*)&pSemaphore->cond, NULL); if (result != 0) { pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock); return ma_result_from_errno(result); /* Failed to create condition variable. */ } return MA_SUCCESS; } static void ma_semaphore_uninit__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return; } pthread_cond_destroy((pthread_cond_t*)&pSemaphore->cond); pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock); } static ma_result ma_semaphore_wait__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock); { /* We need to wait on a condition variable before escaping. We can't return from this function until the semaphore has been signaled. */ while (pSemaphore->value == 0) { pthread_cond_wait((pthread_cond_t*)&pSemaphore->cond, (pthread_mutex_t*)&pSemaphore->lock); } pSemaphore->value -= 1; } pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock); return MA_SUCCESS; } static ma_result ma_semaphore_release__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock); { pSemaphore->value += 1; pthread_cond_signal((pthread_cond_t*)&pSemaphore->cond); } pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock); return MA_SUCCESS; } #elif defined(MA_WIN32) static int ma_thread_priority_to_win32(ma_thread_priority priority) { switch (priority) { case ma_thread_priority_idle: return THREAD_PRIORITY_IDLE; case ma_thread_priority_lowest: return THREAD_PRIORITY_LOWEST; case ma_thread_priority_low: return THREAD_PRIORITY_BELOW_NORMAL; case ma_thread_priority_normal: return THREAD_PRIORITY_NORMAL; case ma_thread_priority_high: return THREAD_PRIORITY_ABOVE_NORMAL; case ma_thread_priority_highest: return THREAD_PRIORITY_HIGHEST; case ma_thread_priority_realtime: return THREAD_PRIORITY_TIME_CRITICAL; default: return THREAD_PRIORITY_NORMAL; } } static ma_result ma_thread_create__win32(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData) { DWORD threadID; /* Not used. Only used for passing into CreateThread() so it doesn't fail on Windows 98. */ *pThread = CreateThread(NULL, stackSize, entryProc, pData, 0, &threadID); if (*pThread == NULL) { return ma_result_from_GetLastError(GetLastError()); } SetThreadPriority((HANDLE)*pThread, ma_thread_priority_to_win32(priority)); return MA_SUCCESS; } static void ma_thread_wait__win32(ma_thread* pThread) { WaitForSingleObject((HANDLE)*pThread, INFINITE); CloseHandle((HANDLE)*pThread); } static ma_result ma_mutex_init__win32(ma_mutex* pMutex) { *pMutex = CreateEventA(NULL, FALSE, TRUE, NULL); if (*pMutex == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_mutex_uninit__win32(ma_mutex* pMutex) { CloseHandle((HANDLE)*pMutex); } static void ma_mutex_lock__win32(ma_mutex* pMutex) { WaitForSingleObject((HANDLE)*pMutex, INFINITE); } static void ma_mutex_unlock__win32(ma_mutex* pMutex) { SetEvent((HANDLE)*pMutex); } static ma_result ma_event_init__win32(ma_event* pEvent) { *pEvent = CreateEventA(NULL, FALSE, FALSE, NULL); if (*pEvent == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_event_uninit__win32(ma_event* pEvent) { CloseHandle((HANDLE)*pEvent); } static ma_result ma_event_wait__win32(ma_event* pEvent) { DWORD result = WaitForSingleObject((HANDLE)*pEvent, INFINITE); if (result == WAIT_OBJECT_0) { return MA_SUCCESS; } if (result == WAIT_TIMEOUT) { return MA_TIMEOUT; } return ma_result_from_GetLastError(GetLastError()); } static ma_result ma_event_signal__win32(ma_event* pEvent) { BOOL result = SetEvent((HANDLE)*pEvent); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_semaphore_init__win32(int initialValue, ma_semaphore* pSemaphore) { *pSemaphore = CreateSemaphoreW(NULL, (LONG)initialValue, LONG_MAX, NULL); if (*pSemaphore == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_semaphore_uninit__win32(ma_semaphore* pSemaphore) { CloseHandle((HANDLE)*pSemaphore); } static ma_result ma_semaphore_wait__win32(ma_semaphore* pSemaphore) { DWORD result = WaitForSingleObject((HANDLE)*pSemaphore, INFINITE); if (result == WAIT_OBJECT_0) { return MA_SUCCESS; } if (result == WAIT_TIMEOUT) { return MA_TIMEOUT; } return ma_result_from_GetLastError(GetLastError()); } static ma_result ma_semaphore_release__win32(ma_semaphore* pSemaphore) { BOOL result = ReleaseSemaphore((HANDLE)*pSemaphore, 1, NULL); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } #endif typedef struct { ma_thread_entry_proc entryProc; void* pData; ma_allocation_callbacks allocationCallbacks; } ma_thread_proxy_data; static ma_thread_result MA_THREADCALL ma_thread_entry_proxy(void* pData) { ma_thread_proxy_data* pProxyData = (ma_thread_proxy_data*)pData; ma_thread_entry_proc entryProc; void* pEntryProcData; ma_thread_result result; #if defined(MA_ON_THREAD_ENTRY) MA_ON_THREAD_ENTRY #endif entryProc = pProxyData->entryProc; pEntryProcData = pProxyData->pData; /* Free the proxy data before getting into the real thread entry proc. */ ma_free(pProxyData, &pProxyData->allocationCallbacks); result = entryProc(pEntryProcData); #if defined(MA_ON_THREAD_EXIT) MA_ON_THREAD_EXIT #endif return result; } static ma_result ma_thread_create(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_thread_proxy_data* pProxyData; if (pThread == NULL || entryProc == NULL) { return MA_INVALID_ARGS; } pProxyData = (ma_thread_proxy_data*)ma_malloc(sizeof(*pProxyData), pAllocationCallbacks); /* Will be freed by the proxy entry proc. */ if (pProxyData == NULL) { return MA_OUT_OF_MEMORY; } #if defined(MA_THREAD_DEFAULT_STACK_SIZE) if (stackSize == 0) { stackSize = MA_THREAD_DEFAULT_STACK_SIZE; } #endif pProxyData->entryProc = entryProc; pProxyData->pData = pData; ma_allocation_callbacks_init_copy(&pProxyData->allocationCallbacks, pAllocationCallbacks); #if defined(MA_POSIX) result = ma_thread_create__posix(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData); #elif defined(MA_WIN32) result = ma_thread_create__win32(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData); #endif if (result != MA_SUCCESS) { ma_free(pProxyData, pAllocationCallbacks); return result; } return MA_SUCCESS; } static void ma_thread_wait(ma_thread* pThread) { if (pThread == NULL) { return; } #if defined(MA_POSIX) ma_thread_wait__posix(pThread); #elif defined(MA_WIN32) ma_thread_wait__win32(pThread); #endif } MA_API ma_result ma_mutex_init(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_mutex_init__posix(pMutex); #elif defined(MA_WIN32) return ma_mutex_init__win32(pMutex); #endif } MA_API void ma_mutex_uninit(ma_mutex* pMutex) { if (pMutex == NULL) { return; } #if defined(MA_POSIX) ma_mutex_uninit__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_uninit__win32(pMutex); #endif } MA_API void ma_mutex_lock(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_mutex_lock__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_lock__win32(pMutex); #endif } MA_API void ma_mutex_unlock(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_mutex_unlock__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_unlock__win32(pMutex); #endif } MA_API ma_result ma_event_init(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_init__posix(pEvent); #elif defined(MA_WIN32) return ma_event_init__win32(pEvent); #endif } #if 0 static ma_result ma_event_alloc_and_init(ma_event** ppEvent, ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_event* pEvent; if (ppEvent == NULL) { return MA_INVALID_ARGS; } *ppEvent = NULL; pEvent = ma_malloc(sizeof(*pEvent), pAllocationCallbacks); if (pEvent == NULL) { return MA_OUT_OF_MEMORY; } result = ma_event_init(pEvent); if (result != MA_SUCCESS) { ma_free(pEvent, pAllocationCallbacks); return result; } *ppEvent = pEvent; return result; } #endif MA_API void ma_event_uninit(ma_event* pEvent) { if (pEvent == NULL) { return; } #if defined(MA_POSIX) ma_event_uninit__posix(pEvent); #elif defined(MA_WIN32) ma_event_uninit__win32(pEvent); #endif } #if 0 static void ma_event_uninit_and_free(ma_event* pEvent, ma_allocation_callbacks* pAllocationCallbacks) { if (pEvent == NULL) { return; } ma_event_uninit(pEvent); ma_free(pEvent, pAllocationCallbacks); } #endif MA_API ma_result ma_event_wait(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert to the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_wait__posix(pEvent); #elif defined(MA_WIN32) return ma_event_wait__win32(pEvent); #endif } MA_API ma_result ma_event_signal(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert to the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_signal__posix(pEvent); #elif defined(MA_WIN32) return ma_event_signal__win32(pEvent); #endif } MA_API ma_result ma_semaphore_init(int initialValue, ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_init__posix(initialValue, pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_init__win32(initialValue, pSemaphore); #endif } MA_API void ma_semaphore_uninit(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_semaphore_uninit__posix(pSemaphore); #elif defined(MA_WIN32) ma_semaphore_uninit__win32(pSemaphore); #endif } MA_API ma_result ma_semaphore_wait(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_wait__posix(pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_wait__win32(pSemaphore); #endif } MA_API ma_result ma_semaphore_release(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_release__posix(pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_release__win32(pSemaphore); #endif } #else /* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */ #ifndef MA_NO_DEVICE_IO #error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO"; #endif #endif /* MA_NO_THREADING */ #define MA_FENCE_COUNTER_MAX 0x7FFFFFFF MA_API ma_result ma_fence_init(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFence); pFence->counter = 0; #ifndef MA_NO_THREADING { ma_result result; result = ma_event_init(&pFence->e); if (result != MA_SUCCESS) { return result; } } #endif return MA_SUCCESS; } MA_API void ma_fence_uninit(ma_fence* pFence) { if (pFence == NULL) { return; } #ifndef MA_NO_THREADING { ma_event_uninit(&pFence->e); } #endif MA_ZERO_OBJECT(pFence); } MA_API ma_result ma_fence_acquire(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter); ma_uint32 newCounter = oldCounter + 1; /* Make sure we're not about to exceed our maximum value. */ if (newCounter > MA_FENCE_COUNTER_MAX) { MA_ASSERT(MA_FALSE); return MA_OUT_OF_RANGE; } if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) { return MA_SUCCESS; } else { if (oldCounter == MA_FENCE_COUNTER_MAX) { MA_ASSERT(MA_FALSE); return MA_OUT_OF_RANGE; /* The other thread took the last available slot. Abort. */ } } } /* Should never get here. */ /*return MA_SUCCESS;*/ } MA_API ma_result ma_fence_release(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter); ma_uint32 newCounter = oldCounter - 1; if (oldCounter == 0) { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Acquire/release mismatch. */ } if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) { #ifndef MA_NO_THREADING { if (newCounter == 0) { ma_event_signal(&pFence->e); /* <-- ma_fence_wait() will be waiting on this. */ } } #endif return MA_SUCCESS; } else { if (oldCounter == 0) { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Another thread has taken the 0 slot. Acquire/release mismatch. */ } } } /* Should never get here. */ /*return MA_SUCCESS;*/ } MA_API ma_result ma_fence_wait(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 counter; counter = ma_atomic_load_32(&pFence->counter); if (counter == 0) { /* Counter has hit zero. By the time we get here some other thread may have acquired the fence again, but that is where the caller needs to take care with how they se the fence. */ return MA_SUCCESS; } /* Getting here means the counter is > 0. We'll need to wait for something to happen. */ #ifndef MA_NO_THREADING { ma_result result; result = ma_event_wait(&pFence->e); if (result != MA_SUCCESS) { return result; } } #endif } /* Should never get here. */ /*return MA_INVALID_OPERATION;*/ } MA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification) { ma_async_notification_callbacks* pNotificationCallbacks = (ma_async_notification_callbacks*)pNotification; if (pNotification == NULL) { return MA_INVALID_ARGS; } if (pNotificationCallbacks->onSignal == NULL) { return MA_NOT_IMPLEMENTED; } pNotificationCallbacks->onSignal(pNotification); return MA_INVALID_ARGS; } static void ma_async_notification_poll__on_signal(ma_async_notification* pNotification) { ((ma_async_notification_poll*)pNotification)->signalled = MA_TRUE; } MA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll) { if (pNotificationPoll == NULL) { return MA_INVALID_ARGS; } pNotificationPoll->cb.onSignal = ma_async_notification_poll__on_signal; pNotificationPoll->signalled = MA_FALSE; return MA_SUCCESS; } MA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll) { if (pNotificationPoll == NULL) { return MA_FALSE; } return pNotificationPoll->signalled; } static void ma_async_notification_event__on_signal(ma_async_notification* pNotification) { ma_async_notification_event_signal((ma_async_notification_event*)pNotification); } MA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } pNotificationEvent->cb.onSignal = ma_async_notification_event__on_signal; #ifndef MA_NO_THREADING { ma_result result; result = ma_event_init(&pNotificationEvent->e); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { ma_event_uninit(&pNotificationEvent->e); return MA_SUCCESS; } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { return ma_event_wait(&pNotificationEvent->e); } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { return ma_event_signal(&pNotificationEvent->e); } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } /************************************************************************************************************************************************************ Job Queue ************************************************************************************************************************************************************/ MA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity) { ma_slot_allocator_config config; MA_ZERO_OBJECT(&config); config.capacity = capacity; return config; } static MA_INLINE ma_uint32 ma_slot_allocator_calculate_group_capacity(ma_uint32 slotCapacity) { ma_uint32 cap = slotCapacity / 32; if ((slotCapacity % 32) != 0) { cap += 1; } return cap; } static MA_INLINE ma_uint32 ma_slot_allocator_group_capacity(const ma_slot_allocator* pAllocator) { return ma_slot_allocator_calculate_group_capacity(pAllocator->capacity); } typedef struct { size_t sizeInBytes; size_t groupsOffset; size_t slotsOffset; } ma_slot_allocator_heap_layout; static ma_result ma_slot_allocator_get_heap_layout(const ma_slot_allocator_config* pConfig, ma_slot_allocator_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->capacity == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Groups. */ pHeapLayout->groupsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(ma_slot_allocator_calculate_group_capacity(pConfig->capacity) * sizeof(ma_slot_allocator_group)); /* Slots. */ pHeapLayout->slotsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_uint32)); return MA_SUCCESS; } MA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_slot_allocator_heap_layout layout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_slot_allocator_get_heap_layout(pConfig, &layout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = layout.sizeInBytes; return result; } MA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator) { ma_result result; ma_slot_allocator_heap_layout heapLayout; if (pAllocator == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pAllocator); if (pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_slot_allocator_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pAllocator->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pAllocator->pGroups = (ma_slot_allocator_group*)ma_offset_ptr(pHeap, heapLayout.groupsOffset); pAllocator->pSlots = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.slotsOffset); pAllocator->capacity = pConfig->capacity; return MA_SUCCESS; } MA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_slot_allocator_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap allocation. */ } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_slot_allocator_init_preallocated(pConfig, pHeap, pAllocator); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pAllocator->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocator == NULL) { return; } if (pAllocator->_ownsHeap) { ma_free(pAllocator->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot) { ma_uint32 iAttempt; const ma_uint32 maxAttempts = 2; /* The number of iterations to perform until returning MA_OUT_OF_MEMORY if no slots can be found. */ if (pAllocator == NULL || pSlot == NULL) { return MA_INVALID_ARGS; } for (iAttempt = 0; iAttempt < maxAttempts; iAttempt += 1) { /* We need to acquire a suitable bitfield first. This is a bitfield that's got an available slot within it. */ ma_uint32 iGroup; for (iGroup = 0; iGroup < ma_slot_allocator_group_capacity(pAllocator); iGroup += 1) { /* CAS */ for (;;) { ma_uint32 oldBitfield; ma_uint32 newBitfield; ma_uint32 bitOffset; oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield); /* <-- This copy must happen. The compiler must not optimize this away. */ /* Fast check to see if anything is available. */ if (oldBitfield == 0xFFFFFFFF) { break; /* No available bits in this bitfield. */ } bitOffset = ma_ffs_32(~oldBitfield); MA_ASSERT(bitOffset < 32); newBitfield = oldBitfield | (1 << bitOffset); if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) { ma_uint32 slotIndex; /* Increment the counter as soon as possible to have other threads report out-of-memory sooner than later. */ ma_atomic_fetch_add_32(&pAllocator->count, 1); /* The slot index is required for constructing the output value. */ slotIndex = (iGroup << 5) + bitOffset; /* iGroup << 5 = iGroup * 32 */ if (slotIndex >= pAllocator->capacity) { return MA_OUT_OF_MEMORY; } /* Increment the reference count before constructing the output value. */ pAllocator->pSlots[slotIndex] += 1; /* Construct the output value. */ *pSlot = (((ma_uint64)pAllocator->pSlots[slotIndex] << 32) | slotIndex); return MA_SUCCESS; } } } /* We weren't able to find a slot. If it's because we've reached our capacity we need to return MA_OUT_OF_MEMORY. Otherwise we need to do another iteration and try again. */ if (pAllocator->count < pAllocator->capacity) { ma_yield(); } else { return MA_OUT_OF_MEMORY; } } /* We couldn't find a slot within the maximum number of attempts. */ return MA_OUT_OF_MEMORY; } MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot) { ma_uint32 iGroup; ma_uint32 iBit; if (pAllocator == NULL) { return MA_INVALID_ARGS; } iGroup = (ma_uint32)((slot & 0xFFFFFFFF) >> 5); /* slot / 32 */ iBit = (ma_uint32)((slot & 0xFFFFFFFF) & 31); /* slot % 32 */ if (iGroup >= ma_slot_allocator_group_capacity(pAllocator)) { return MA_INVALID_ARGS; } MA_ASSERT(iBit < 32); /* This must be true due to the logic we used to actually calculate it. */ while (ma_atomic_load_32(&pAllocator->count) > 0) { /* CAS */ ma_uint32 oldBitfield; ma_uint32 newBitfield; oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield); /* <-- This copy must happen. The compiler must not optimize this away. */ newBitfield = oldBitfield & ~(1 << iBit); /* Debugging for checking for double-frees. */ #if defined(MA_DEBUG_OUTPUT) { if ((oldBitfield & (1 << iBit)) == 0) { MA_ASSERT(MA_FALSE); /* Double free detected.*/ } } #endif if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) { ma_atomic_fetch_sub_32(&pAllocator->count, 1); return MA_SUCCESS; } } /* Getting here means there are no allocations available for freeing. */ return MA_INVALID_OPERATION; } #define MA_JOB_ID_NONE ~((ma_uint64)0) #define MA_JOB_SLOT_NONE (ma_uint16)(~0) static MA_INLINE ma_uint32 ma_job_extract_refcount(ma_uint64 toc) { return (ma_uint32)(toc >> 32); } static MA_INLINE ma_uint16 ma_job_extract_slot(ma_uint64 toc) { return (ma_uint16)(toc & 0x0000FFFF); } static MA_INLINE ma_uint16 ma_job_extract_code(ma_uint64 toc) { return (ma_uint16)((toc & 0xFFFF0000) >> 16); } static MA_INLINE ma_uint64 ma_job_toc_to_allocation(ma_uint64 toc) { return ((ma_uint64)ma_job_extract_refcount(toc) << 32) | (ma_uint64)ma_job_extract_slot(toc); } static MA_INLINE ma_uint64 ma_job_set_refcount(ma_uint64 toc, ma_uint32 refcount) { /* Clear the reference count first. */ toc = toc & ~((ma_uint64)0xFFFFFFFF << 32); toc = toc | ((ma_uint64)refcount << 32); return toc; } MA_API ma_job ma_job_init(ma_uint16 code) { ma_job job; MA_ZERO_OBJECT(&job); job.toc.breakup.code = code; job.toc.breakup.slot = MA_JOB_SLOT_NONE; /* Temp value. Will be allocated when posted to a queue. */ job.next = MA_JOB_ID_NONE; return job; } static ma_result ma_job_process__noop(ma_job* pJob); static ma_result ma_job_process__quit(ma_job* pJob); static ma_result ma_job_process__custom(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob); #if !defined(MA_NO_DEVICE_IO) static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob); #endif static ma_job_proc g_jobVTable[MA_JOB_TYPE_COUNT] = { /* Miscellaneous. */ ma_job_process__quit, /* MA_JOB_TYPE_QUIT */ ma_job_process__custom, /* MA_JOB_TYPE_CUSTOM */ /* Resource Manager. */ ma_job_process__resource_manager__load_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE */ ma_job_process__resource_manager__free_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE */ ma_job_process__resource_manager__page_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE */ ma_job_process__resource_manager__load_data_buffer, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER */ ma_job_process__resource_manager__free_data_buffer, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER */ ma_job_process__resource_manager__load_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM */ ma_job_process__resource_manager__free_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM */ ma_job_process__resource_manager__page_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM */ ma_job_process__resource_manager__seek_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM */ /* Device. */ #if !defined(MA_NO_DEVICE_IO) ma_job_process__device__aaudio_reroute /* MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE */ #endif }; MA_API ma_result ma_job_process(ma_job* pJob) { if (pJob == NULL) { return MA_INVALID_ARGS; } if (pJob->toc.breakup.code >= MA_JOB_TYPE_COUNT) { return MA_INVALID_OPERATION; } return g_jobVTable[pJob->toc.breakup.code](pJob); } static ma_result ma_job_process__noop(ma_job* pJob) { MA_ASSERT(pJob != NULL); /* No-op. */ (void)pJob; return MA_SUCCESS; } static ma_result ma_job_process__quit(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__custom(ma_job* pJob) { MA_ASSERT(pJob != NULL); /* No-op if there's no callback. */ if (pJob->data.custom.proc == NULL) { return MA_SUCCESS; } return pJob->data.custom.proc(pJob); } MA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity) { ma_job_queue_config config; config.flags = flags; config.capacity = capacity; return config; } typedef struct { size_t sizeInBytes; size_t allocatorOffset; size_t jobsOffset; } ma_job_queue_heap_layout; static ma_result ma_job_queue_get_heap_layout(const ma_job_queue_config* pConfig, ma_job_queue_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->capacity == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Allocator. */ { ma_slot_allocator_config allocatorConfig; size_t allocatorHeapSizeInBytes; allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity); result = ma_slot_allocator_get_heap_size(&allocatorConfig, &allocatorHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->allocatorOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += allocatorHeapSizeInBytes; } /* Jobs. */ pHeapLayout->jobsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_job)); return MA_SUCCESS; } MA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_job_queue_heap_layout layout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_job_queue_get_heap_layout(pConfig, &layout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = layout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue) { ma_result result; ma_job_queue_heap_layout heapLayout; ma_slot_allocator_config allocatorConfig; if (pQueue == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pQueue); result = ma_job_queue_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pQueue->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pQueue->flags = pConfig->flags; pQueue->capacity = pConfig->capacity; pQueue->pJobs = (ma_job*)ma_offset_ptr(pHeap, heapLayout.jobsOffset); allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity); result = ma_slot_allocator_init_preallocated(&allocatorConfig, ma_offset_ptr(pHeap, heapLayout.allocatorOffset), &pQueue->allocator); if (result != MA_SUCCESS) { return result; } /* We need a semaphore if we're running in non-blocking mode. If threading is disabled we need to return an error. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_init(0, &pQueue->sem); } #else { /* Threading is disabled and we've requested non-blocking mode. */ return MA_INVALID_OPERATION; } #endif } /* Our queue needs to be initialized with a free standing node. This should always be slot 0. Required for the lock free algorithm. The first job in the queue is just a dummy item for giving us the first item in the list which is stored in the "next" member. */ ma_slot_allocator_alloc(&pQueue->allocator, &pQueue->head); /* Will never fail. */ pQueue->pJobs[ma_job_extract_slot(pQueue->head)].next = MA_JOB_ID_NONE; pQueue->tail = pQueue->head; return MA_SUCCESS; } MA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_job_queue_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_job_queue_init_preallocated(pConfig, pHeap, pQueue); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pQueue->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks) { if (pQueue == NULL) { return; } /* All we need to do is uninitialize the semaphore. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_uninit(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } ma_slot_allocator_uninit(&pQueue->allocator, pAllocationCallbacks); if (pQueue->_ownsHeap) { ma_free(pQueue->_pHeap, pAllocationCallbacks); } } static ma_bool32 ma_job_queue_cas(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { /* The new counter is taken from the expected value. */ return ma_atomic_compare_and_swap_64(dst, expected, ma_job_set_refcount(desired, ma_job_extract_refcount(expected) + 1)) == expected; } MA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob) { /* Lock free queue implementation based on the paper by Michael and Scott: Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors */ ma_result result; ma_uint64 slot; ma_uint64 tail; ma_uint64 next; if (pQueue == NULL || pJob == NULL) { return MA_INVALID_ARGS; } /* We need a new slot. */ result = ma_slot_allocator_alloc(&pQueue->allocator, &slot); if (result != MA_SUCCESS) { return result; /* Probably ran out of slots. If so, MA_OUT_OF_MEMORY will be returned. */ } /* At this point we should have a slot to place the job. */ MA_ASSERT(ma_job_extract_slot(slot) < pQueue->capacity); /* We need to put the job into memory before we do anything. */ pQueue->pJobs[ma_job_extract_slot(slot)] = *pJob; pQueue->pJobs[ma_job_extract_slot(slot)].toc.allocation = slot; /* This will overwrite the job code. */ pQueue->pJobs[ma_job_extract_slot(slot)].toc.breakup.code = pJob->toc.breakup.code; /* The job code needs to be applied again because the line above overwrote it. */ pQueue->pJobs[ma_job_extract_slot(slot)].next = MA_JOB_ID_NONE; /* Reset for safety. */ #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_lock(&pQueue->lock); #endif { /* The job is stored in memory so now we need to add it to our linked list. We only ever add items to the end of the list. */ for (;;) { tail = ma_atomic_load_64(&pQueue->tail); next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(tail)].next); if (ma_job_toc_to_allocation(tail) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->tail))) { if (ma_job_extract_slot(next) == 0xFFFF) { if (ma_job_queue_cas(&pQueue->pJobs[ma_job_extract_slot(tail)].next, next, slot)) { break; } } else { ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next)); } } } ma_job_queue_cas(&pQueue->tail, tail, slot); } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif /* Signal the semaphore as the last step if we're using synchronous mode. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_release(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } return MA_SUCCESS; } MA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob) { ma_uint64 head; ma_uint64 tail; ma_uint64 next; if (pQueue == NULL || pJob == NULL) { return MA_INVALID_ARGS; } /* If we're running in synchronous mode we'll need to wait on a semaphore. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_wait(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_lock(&pQueue->lock); #endif { /* BUG: In lock-free mode, multiple threads can be in this section of code. The "head" variable in the loop below is stored. One thread can fall through to the freeing of this item while another is still using "head" for the retrieval of the "next" variable. The slot allocator might need to make use of some reference counting to ensure it's only truly freed when there are no more references to the item. This must be fixed before removing these locks. */ /* Now we need to remove the root item from the list. */ for (;;) { head = ma_atomic_load_64(&pQueue->head); tail = ma_atomic_load_64(&pQueue->tail); next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(head)].next); if (ma_job_toc_to_allocation(head) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->head))) { if (ma_job_extract_slot(head) == ma_job_extract_slot(tail)) { if (ma_job_extract_slot(next) == 0xFFFF) { #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif return MA_NO_DATA_AVAILABLE; } ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next)); } else { *pJob = pQueue->pJobs[ma_job_extract_slot(next)]; if (ma_job_queue_cas(&pQueue->head, head, ma_job_extract_slot(next))) { break; } } } } } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif ma_slot_allocator_free(&pQueue->allocator, head); /* If it's a quit job make sure it's put back on the queue to ensure other threads have an opportunity to detect it and terminate naturally. We could instead just leave it on the queue, but that would involve fiddling with the lock-free code above and I want to keep that as simple as possible. */ if (pJob->toc.breakup.code == MA_JOB_TYPE_QUIT) { ma_job_queue_post(pQueue, pJob); return MA_CANCELLED; /* Return a cancelled status just in case the thread is checking return codes and not properly checking for a quit job. */ } return MA_SUCCESS; } /******************************************************************************* Dynamic Linking *******************************************************************************/ #ifdef MA_POSIX /* No need for dlfcn.h if we're not using runtime linking. */ #ifndef MA_NO_RUNTIME_LINKING #include #endif #endif MA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename) { #ifndef MA_NO_RUNTIME_LINKING ma_handle handle; ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, "Loading library: %s\n", filename); #ifdef MA_WIN32 /* From MSDN: Desktop applications cannot use LoadPackagedLibrary; if a desktop application calls this function it fails with APPMODEL_ERROR_NO_PACKAGE.*/ #if !defined(MA_WIN32_UWP) || !(defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP))) handle = (ma_handle)LoadLibraryA(filename); #else /* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */ WCHAR filenameW[4096]; if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) { handle = NULL; } else { handle = (ma_handle)LoadPackagedLibrary(filenameW, 0); } #endif #else handle = (ma_handle)dlopen(filename, RTLD_NOW); #endif /* I'm not considering failure to load a library an error nor a warning because seamlessly falling through to a lower-priority backend is a deliberate design choice. Instead I'm logging it as an informational message. */ if (handle == NULL) { ma_log_postf(pLog, MA_LOG_LEVEL_INFO, "Failed to load library: %s\n", filename); } return handle; #else /* Runtime linking is disabled. */ (void)pLog; (void)filename; return NULL; #endif } MA_API void ma_dlclose(ma_log* pLog, ma_handle handle) { #ifndef MA_NO_RUNTIME_LINKING #ifdef MA_WIN32 FreeLibrary((HMODULE)handle); #else /* Hack for Android bug (see https://github.com/android/ndk/issues/360). Calling dlclose() pre-API 28 may segfault. */ #if !defined(MA_ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28) { dlclose((void*)handle); } #else { (void)handle; } #endif #endif (void)pLog; #else /* Runtime linking is disabled. */ (void)pLog; (void)handle; #endif } MA_API ma_proc ma_dlsym(ma_log* pLog, ma_handle handle, const char* symbol) { #ifndef MA_NO_RUNTIME_LINKING ma_proc proc; ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, "Loading symbol: %s\n", symbol); #ifdef _WIN32 proc = (ma_proc)GetProcAddress((HMODULE)handle, symbol); #else #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" #endif proc = (ma_proc)dlsym((void*)handle, symbol); #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || defined(__clang__) #pragma GCC diagnostic pop #endif #endif if (proc == NULL) { ma_log_postf(pLog, MA_LOG_LEVEL_WARNING, "Failed to load symbol: %s\n", symbol); } (void)pLog; /* It's possible for pContext to be unused. */ return proc; #else /* Runtime linking is disabled. */ (void)pLog; (void)handle; (void)symbol; return NULL; #endif } /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DEVICE I/O ========== ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ /* Disable run-time linking on certain backends and platforms. */ #ifndef MA_NO_RUNTIME_LINKING #if defined(MA_EMSCRIPTEN) || defined(MA_ORBIS) || defined(MA_PROSPERO) #define MA_NO_RUNTIME_LINKING #endif #endif #ifdef MA_APPLE #include #endif #ifndef MA_NO_DEVICE_IO #if defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200) #include /* For mach_absolute_time() */ #endif #ifdef MA_POSIX #include #include /* No need for dlfcn.h if we're not using runtime linking. */ #ifndef MA_NO_RUNTIME_LINKING #include #endif #endif /* This must be set to at least 26. */ #ifndef MA_AAUDIO_MIN_ANDROID_SDK_VERSION #define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 27 #endif MA_API void ma_device_info_add_native_data_format(ma_device_info* pDeviceInfo, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags) { if (pDeviceInfo == NULL) { return; } if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats)) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } } typedef struct { ma_backend backend; const char* pName; } ma_backend_info; static ma_backend_info gBackendInfo[] = /* Indexed by the backend enum. Must be in the order backends are declared in the ma_backend enum. */ { {ma_backend_wasapi, "WASAPI"}, {ma_backend_dsound, "DirectSound"}, {ma_backend_winmm, "WinMM"}, {ma_backend_coreaudio, "Core Audio"}, {ma_backend_sndio, "sndio"}, {ma_backend_audio4, "audio(4)"}, {ma_backend_oss, "OSS"}, {ma_backend_pulseaudio, "PulseAudio"}, {ma_backend_alsa, "ALSA"}, {ma_backend_jack, "JACK"}, {ma_backend_aaudio, "AAudio"}, {ma_backend_opensl, "OpenSL|ES"}, {ma_backend_webaudio, "Web Audio"}, {ma_backend_custom, "Custom"}, {ma_backend_null, "Null"} }; MA_API const char* ma_get_backend_name(ma_backend backend) { if (backend < 0 || backend >= (int)ma_countof(gBackendInfo)) { return "Unknown"; } return gBackendInfo[backend].pName; } MA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend) { size_t iBackend; if (pBackendName == NULL) { return MA_INVALID_ARGS; } for (iBackend = 0; iBackend < ma_countof(gBackendInfo); iBackend += 1) { if (ma_strcmp(pBackendName, gBackendInfo[iBackend].pName) == 0) { if (pBackend != NULL) { *pBackend = gBackendInfo[iBackend].backend; } return MA_SUCCESS; } } /* Getting here means the backend name is unknown. */ return MA_INVALID_ARGS; } MA_API ma_bool32 ma_is_backend_enabled(ma_backend backend) { /* This looks a little bit gross, but we want all backends to be included in the switch to avoid warnings on some compilers about some enums not being handled by the switch statement. */ switch (backend) { case ma_backend_wasapi: #if defined(MA_HAS_WASAPI) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_dsound: #if defined(MA_HAS_DSOUND) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_winmm: #if defined(MA_HAS_WINMM) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_coreaudio: #if defined(MA_HAS_COREAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_sndio: #if defined(MA_HAS_SNDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_audio4: #if defined(MA_HAS_AUDIO4) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_oss: #if defined(MA_HAS_OSS) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_pulseaudio: #if defined(MA_HAS_PULSEAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_alsa: #if defined(MA_HAS_ALSA) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_jack: #if defined(MA_HAS_JACK) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_aaudio: #if defined(MA_HAS_AAUDIO) #if defined(MA_ANDROID) { return ma_android_sdk_version() >= MA_AAUDIO_MIN_ANDROID_SDK_VERSION; } #else return MA_FALSE; #endif #else return MA_FALSE; #endif case ma_backend_opensl: #if defined(MA_HAS_OPENSL) #if defined(MA_ANDROID) { return ma_android_sdk_version() >= 9; } #else return MA_TRUE; #endif #else return MA_FALSE; #endif case ma_backend_webaudio: #if defined(MA_HAS_WEBAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_custom: #if defined(MA_HAS_CUSTOM) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_null: #if defined(MA_HAS_NULL) return MA_TRUE; #else return MA_FALSE; #endif default: return MA_FALSE; } } MA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount) { size_t backendCount; size_t iBackend; ma_result result = MA_SUCCESS; if (pBackendCount == NULL) { return MA_INVALID_ARGS; } backendCount = 0; for (iBackend = 0; iBackend <= ma_backend_null; iBackend += 1) { ma_backend backend = (ma_backend)iBackend; if (ma_is_backend_enabled(backend)) { /* The backend is enabled. Try adding it to the list. If there's no room, MA_NO_SPACE needs to be returned. */ if (backendCount == backendCap) { result = MA_NO_SPACE; break; } else { pBackends[backendCount] = backend; backendCount += 1; } } } if (pBackendCount != NULL) { *pBackendCount = backendCount; } return result; } MA_API ma_bool32 ma_is_loopback_supported(ma_backend backend) { switch (backend) { case ma_backend_wasapi: return MA_TRUE; case ma_backend_dsound: return MA_FALSE; case ma_backend_winmm: return MA_FALSE; case ma_backend_coreaudio: return MA_FALSE; case ma_backend_sndio: return MA_FALSE; case ma_backend_audio4: return MA_FALSE; case ma_backend_oss: return MA_FALSE; case ma_backend_pulseaudio: return MA_FALSE; case ma_backend_alsa: return MA_FALSE; case ma_backend_jack: return MA_FALSE; case ma_backend_aaudio: return MA_FALSE; case ma_backend_opensl: return MA_FALSE; case ma_backend_webaudio: return MA_FALSE; case ma_backend_custom: return MA_FALSE; /* <-- Will depend on the implementation of the backend. */ case ma_backend_null: return MA_FALSE; default: return MA_FALSE; } } #if defined(MA_WIN32) /* WASAPI error codes. */ #define MA_AUDCLNT_E_NOT_INITIALIZED ((HRESULT)0x88890001) #define MA_AUDCLNT_E_ALREADY_INITIALIZED ((HRESULT)0x88890002) #define MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE ((HRESULT)0x88890003) #define MA_AUDCLNT_E_DEVICE_INVALIDATED ((HRESULT)0x88890004) #define MA_AUDCLNT_E_NOT_STOPPED ((HRESULT)0x88890005) #define MA_AUDCLNT_E_BUFFER_TOO_LARGE ((HRESULT)0x88890006) #define MA_AUDCLNT_E_OUT_OF_ORDER ((HRESULT)0x88890007) #define MA_AUDCLNT_E_UNSUPPORTED_FORMAT ((HRESULT)0x88890008) #define MA_AUDCLNT_E_INVALID_SIZE ((HRESULT)0x88890009) #define MA_AUDCLNT_E_DEVICE_IN_USE ((HRESULT)0x8889000A) #define MA_AUDCLNT_E_BUFFER_OPERATION_PENDING ((HRESULT)0x8889000B) #define MA_AUDCLNT_E_THREAD_NOT_REGISTERED ((HRESULT)0x8889000C) #define MA_AUDCLNT_E_NO_SINGLE_PROCESS ((HRESULT)0x8889000D) #define MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED ((HRESULT)0x8889000E) #define MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED ((HRESULT)0x8889000F) #define MA_AUDCLNT_E_SERVICE_NOT_RUNNING ((HRESULT)0x88890010) #define MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED ((HRESULT)0x88890011) #define MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY ((HRESULT)0x88890012) #define MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL ((HRESULT)0x88890013) #define MA_AUDCLNT_E_EVENTHANDLE_NOT_SET ((HRESULT)0x88890014) #define MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE ((HRESULT)0x88890015) #define MA_AUDCLNT_E_BUFFER_SIZE_ERROR ((HRESULT)0x88890016) #define MA_AUDCLNT_E_CPUUSAGE_EXCEEDED ((HRESULT)0x88890017) #define MA_AUDCLNT_E_BUFFER_ERROR ((HRESULT)0x88890018) #define MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED ((HRESULT)0x88890019) #define MA_AUDCLNT_E_INVALID_DEVICE_PERIOD ((HRESULT)0x88890020) #define MA_AUDCLNT_E_INVALID_STREAM_FLAG ((HRESULT)0x88890021) #define MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE ((HRESULT)0x88890022) #define MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES ((HRESULT)0x88890023) #define MA_AUDCLNT_E_OFFLOAD_MODE_ONLY ((HRESULT)0x88890024) #define MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY ((HRESULT)0x88890025) #define MA_AUDCLNT_E_RESOURCES_INVALIDATED ((HRESULT)0x88890026) #define MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED ((HRESULT)0x88890027) #define MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED ((HRESULT)0x88890028) #define MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED ((HRESULT)0x88890029) #define MA_AUDCLNT_E_HEADTRACKING_ENABLED ((HRESULT)0x88890030) #define MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED ((HRESULT)0x88890040) #define MA_AUDCLNT_S_BUFFER_EMPTY ((HRESULT)0x08890001) #define MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED ((HRESULT)0x08890002) #define MA_AUDCLNT_S_POSITION_STALLED ((HRESULT)0x08890003) #define MA_DS_OK ((HRESULT)0) #define MA_DS_NO_VIRTUALIZATION ((HRESULT)0x0878000A) #define MA_DSERR_ALLOCATED ((HRESULT)0x8878000A) #define MA_DSERR_CONTROLUNAVAIL ((HRESULT)0x8878001E) #define MA_DSERR_INVALIDPARAM ((HRESULT)0x80070057) /*E_INVALIDARG*/ #define MA_DSERR_INVALIDCALL ((HRESULT)0x88780032) #define MA_DSERR_GENERIC ((HRESULT)0x80004005) /*E_FAIL*/ #define MA_DSERR_PRIOLEVELNEEDED ((HRESULT)0x88780046) #define MA_DSERR_OUTOFMEMORY ((HRESULT)0x8007000E) /*E_OUTOFMEMORY*/ #define MA_DSERR_BADFORMAT ((HRESULT)0x88780064) #define MA_DSERR_UNSUPPORTED ((HRESULT)0x80004001) /*E_NOTIMPL*/ #define MA_DSERR_NODRIVER ((HRESULT)0x88780078) #define MA_DSERR_ALREADYINITIALIZED ((HRESULT)0x88780082) #define MA_DSERR_NOAGGREGATION ((HRESULT)0x80040110) /*CLASS_E_NOAGGREGATION*/ #define MA_DSERR_BUFFERLOST ((HRESULT)0x88780096) #define MA_DSERR_OTHERAPPHASPRIO ((HRESULT)0x887800A0) #define MA_DSERR_UNINITIALIZED ((HRESULT)0x887800AA) #define MA_DSERR_NOINTERFACE ((HRESULT)0x80004002) /*E_NOINTERFACE*/ #define MA_DSERR_ACCESSDENIED ((HRESULT)0x80070005) /*E_ACCESSDENIED*/ #define MA_DSERR_BUFFERTOOSMALL ((HRESULT)0x887800B4) #define MA_DSERR_DS8_REQUIRED ((HRESULT)0x887800BE) #define MA_DSERR_SENDLOOP ((HRESULT)0x887800C8) #define MA_DSERR_BADSENDBUFFERGUID ((HRESULT)0x887800D2) #define MA_DSERR_OBJECTNOTFOUND ((HRESULT)0x88781161) #define MA_DSERR_FXUNAVAILABLE ((HRESULT)0x887800DC) static ma_result ma_result_from_HRESULT(HRESULT hr) { switch (hr) { case NOERROR: return MA_SUCCESS; /*case S_OK: return MA_SUCCESS;*/ case E_POINTER: return MA_INVALID_ARGS; case E_UNEXPECTED: return MA_ERROR; case E_NOTIMPL: return MA_NOT_IMPLEMENTED; case E_OUTOFMEMORY: return MA_OUT_OF_MEMORY; case E_INVALIDARG: return MA_INVALID_ARGS; case E_NOINTERFACE: return MA_API_NOT_FOUND; case E_HANDLE: return MA_INVALID_ARGS; case E_ABORT: return MA_ERROR; case E_FAIL: return MA_ERROR; case E_ACCESSDENIED: return MA_ACCESS_DENIED; /* WASAPI */ case MA_AUDCLNT_E_NOT_INITIALIZED: return MA_DEVICE_NOT_INITIALIZED; case MA_AUDCLNT_E_ALREADY_INITIALIZED: return MA_DEVICE_ALREADY_INITIALIZED; case MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_DEVICE_INVALIDATED: return MA_UNAVAILABLE; case MA_AUDCLNT_E_NOT_STOPPED: return MA_DEVICE_NOT_STOPPED; case MA_AUDCLNT_E_BUFFER_TOO_LARGE: return MA_TOO_BIG; case MA_AUDCLNT_E_OUT_OF_ORDER: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_UNSUPPORTED_FORMAT: return MA_FORMAT_NOT_SUPPORTED; case MA_AUDCLNT_E_INVALID_SIZE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_DEVICE_IN_USE: return MA_BUSY; case MA_AUDCLNT_E_BUFFER_OPERATION_PENDING: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_THREAD_NOT_REGISTERED: return MA_DOES_NOT_EXIST; case MA_AUDCLNT_E_NO_SINGLE_PROCESS: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED: return MA_SHARE_MODE_NOT_SUPPORTED; case MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED: return MA_FAILED_TO_OPEN_BACKEND_DEVICE; case MA_AUDCLNT_E_SERVICE_NOT_RUNNING: return MA_NOT_CONNECTED; case MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED: return MA_INVALID_ARGS; case MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY: return MA_SHARE_MODE_NOT_SUPPORTED; case MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL: return MA_INVALID_ARGS; case MA_AUDCLNT_E_EVENTHANDLE_NOT_SET: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_BUFFER_SIZE_ERROR: return MA_INVALID_ARGS; case MA_AUDCLNT_E_CPUUSAGE_EXCEEDED: return MA_ERROR; case MA_AUDCLNT_E_BUFFER_ERROR: return MA_ERROR; case MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INVALID_DEVICE_PERIOD: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INVALID_STREAM_FLAG: return MA_INVALID_ARGS; case MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES: return MA_OUT_OF_MEMORY; case MA_AUDCLNT_E_OFFLOAD_MODE_ONLY: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_RESOURCES_INVALIDATED: return MA_INVALID_DATA; case MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_HEADTRACKING_ENABLED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED: return MA_INVALID_OPERATION; case MA_AUDCLNT_S_BUFFER_EMPTY: return MA_NO_SPACE; case MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED: return MA_ALREADY_EXISTS; case MA_AUDCLNT_S_POSITION_STALLED: return MA_ERROR; /* DirectSound */ /*case MA_DS_OK: return MA_SUCCESS;*/ /* S_OK */ case MA_DS_NO_VIRTUALIZATION: return MA_SUCCESS; case MA_DSERR_ALLOCATED: return MA_ALREADY_IN_USE; case MA_DSERR_CONTROLUNAVAIL: return MA_INVALID_OPERATION; /*case MA_DSERR_INVALIDPARAM: return MA_INVALID_ARGS;*/ /* E_INVALIDARG */ case MA_DSERR_INVALIDCALL: return MA_INVALID_OPERATION; /*case MA_DSERR_GENERIC: return MA_ERROR;*/ /* E_FAIL */ case MA_DSERR_PRIOLEVELNEEDED: return MA_INVALID_OPERATION; /*case MA_DSERR_OUTOFMEMORY: return MA_OUT_OF_MEMORY;*/ /* E_OUTOFMEMORY */ case MA_DSERR_BADFORMAT: return MA_FORMAT_NOT_SUPPORTED; /*case MA_DSERR_UNSUPPORTED: return MA_NOT_IMPLEMENTED;*/ /* E_NOTIMPL */ case MA_DSERR_NODRIVER: return MA_FAILED_TO_INIT_BACKEND; case MA_DSERR_ALREADYINITIALIZED: return MA_DEVICE_ALREADY_INITIALIZED; case MA_DSERR_NOAGGREGATION: return MA_ERROR; case MA_DSERR_BUFFERLOST: return MA_UNAVAILABLE; case MA_DSERR_OTHERAPPHASPRIO: return MA_ACCESS_DENIED; case MA_DSERR_UNINITIALIZED: return MA_DEVICE_NOT_INITIALIZED; /*case MA_DSERR_NOINTERFACE: return MA_API_NOT_FOUND;*/ /* E_NOINTERFACE */ /*case MA_DSERR_ACCESSDENIED: return MA_ACCESS_DENIED;*/ /* E_ACCESSDENIED */ case MA_DSERR_BUFFERTOOSMALL: return MA_NO_SPACE; case MA_DSERR_DS8_REQUIRED: return MA_INVALID_OPERATION; case MA_DSERR_SENDLOOP: return MA_DEADLOCK; case MA_DSERR_BADSENDBUFFERGUID: return MA_INVALID_ARGS; case MA_DSERR_OBJECTNOTFOUND: return MA_NO_DEVICE; case MA_DSERR_FXUNAVAILABLE: return MA_UNAVAILABLE; default: return MA_ERROR; } } /* PROPVARIANT */ #define MA_VT_LPWSTR 31 #define MA_VT_BLOB 65 #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif typedef struct { WORD vt; WORD wReserved1; WORD wReserved2; WORD wReserved3; union { struct { ULONG cbSize; BYTE* pBlobData; } blob; WCHAR* pwszVal; char pad[16]; /* Just to ensure the size of the struct matches the official version. */ }; } MA_PROPVARIANT; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop #endif typedef HRESULT (WINAPI * MA_PFN_CoInitialize)(void* pvReserved); typedef HRESULT (WINAPI * MA_PFN_CoInitializeEx)(void* pvReserved, DWORD dwCoInit); typedef void (WINAPI * MA_PFN_CoUninitialize)(void); typedef HRESULT (WINAPI * MA_PFN_CoCreateInstance)(const IID* rclsid, void* pUnkOuter, DWORD dwClsContext, const IID* riid, void* ppv); typedef void (WINAPI * MA_PFN_CoTaskMemFree)(void* pv); typedef HRESULT (WINAPI * MA_PFN_PropVariantClear)(MA_PROPVARIANT *pvar); typedef int (WINAPI * MA_PFN_StringFromGUID2)(const GUID* const rguid, WCHAR* lpsz, int cchMax); typedef HWND (WINAPI * MA_PFN_GetForegroundWindow)(void); typedef HWND (WINAPI * MA_PFN_GetDesktopWindow)(void); #if defined(MA_WIN32_DESKTOP) /* Microsoft documents these APIs as returning LSTATUS, but the Win32 API shipping with some compilers do not define it. It's just a LONG. */ typedef LONG (WINAPI * MA_PFN_RegOpenKeyExA)(HKEY hKey, const char* lpSubKey, DWORD ulOptions, DWORD samDesired, HKEY* phkResult); typedef LONG (WINAPI * MA_PFN_RegCloseKey)(HKEY hKey); typedef LONG (WINAPI * MA_PFN_RegQueryValueExA)(HKEY hKey, const char* lpValueName, DWORD* lpReserved, DWORD* lpType, BYTE* lpData, DWORD* lpcbData); #endif /* MA_WIN32_DESKTOP */ MA_API size_t ma_strlen_WCHAR(const WCHAR* str) { size_t len = 0; while (str[len] != '\0') { len += 1; } return len; } MA_API int ma_strcmp_WCHAR(const WCHAR *s1, const WCHAR *s2) { while (*s1 != '\0' && *s1 == *s2) { s1 += 1; s2 += 1; } return *s1 - *s2; } MA_API int ma_strcpy_s_WCHAR(WCHAR* dst, size_t dstCap, const WCHAR* src) { size_t i; if (dst == 0) { return 22; } if (dstCap == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstCap && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstCap) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } #endif /* MA_WIN32 */ #define MA_DEFAULT_PLAYBACK_DEVICE_NAME "Default Playback Device" #define MA_DEFAULT_CAPTURE_DEVICE_NAME "Default Capture Device" /******************************************************************************* Timing *******************************************************************************/ #if defined(MA_WIN32) && !defined(MA_POSIX) static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */ static void ma_timer_init(ma_timer* pTimer) { LARGE_INTEGER counter; if (g_ma_TimerFrequency.QuadPart == 0) { QueryPerformanceFrequency(&g_ma_TimerFrequency); } QueryPerformanceCounter(&counter); pTimer->counter = counter.QuadPart; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { LARGE_INTEGER counter; if (!QueryPerformanceCounter(&counter)) { return 0; } return (double)(counter.QuadPart - pTimer->counter) / g_ma_TimerFrequency.QuadPart; } #elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200) static ma_uint64 g_ma_TimerFrequency = 0; static void ma_timer_init(ma_timer* pTimer) { mach_timebase_info_data_t baseTime; mach_timebase_info(&baseTime); g_ma_TimerFrequency = (baseTime.denom * 1e9) / baseTime.numer; pTimer->counter = mach_absolute_time(); } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter = mach_absolute_time(); ma_uint64 oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / g_ma_TimerFrequency; } #elif defined(MA_EMSCRIPTEN) static MA_INLINE void ma_timer_init(ma_timer* pTimer) { pTimer->counterD = emscripten_get_now(); } static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer) { return (emscripten_get_now() - pTimer->counterD) / 1000; /* Emscripten is in milliseconds. */ } #else #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L #if defined(CLOCK_MONOTONIC) #define MA_CLOCK_ID CLOCK_MONOTONIC #else #define MA_CLOCK_ID CLOCK_REALTIME #endif static void ma_timer_init(ma_timer* pTimer) { struct timespec newTime; clock_gettime(MA_CLOCK_ID, &newTime); pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter; ma_uint64 oldTimeCounter; struct timespec newTime; clock_gettime(MA_CLOCK_ID, &newTime); newTimeCounter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec; oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / 1000000000.0; } #else static void ma_timer_init(ma_timer* pTimer) { struct timeval newTime; gettimeofday(&newTime, NULL); pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter; ma_uint64 oldTimeCounter; struct timeval newTime; gettimeofday(&newTime, NULL); newTimeCounter = (newTime.tv_sec * 1000000) + newTime.tv_usec; oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / 1000000.0; } #endif #endif #if 0 static ma_uint32 ma_get_closest_standard_sample_rate(ma_uint32 sampleRateIn) { ma_uint32 closestRate = 0; ma_uint32 closestDiff = 0xFFFFFFFF; size_t iStandardRate; for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate]; ma_uint32 diff; if (sampleRateIn > standardRate) { diff = sampleRateIn - standardRate; } else { diff = standardRate - sampleRateIn; } if (diff == 0) { return standardRate; /* The input sample rate is a standard rate. */ } if (closestDiff > diff) { closestDiff = diff; closestRate = standardRate; } } return closestRate; } #endif static MA_INLINE unsigned int ma_device_disable_denormals(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (!pDevice->noDisableDenormals) { return ma_disable_denormals(); } else { return 0; } } static MA_INLINE void ma_device_restore_denormals(ma_device* pDevice, unsigned int prevState) { MA_ASSERT(pDevice != NULL); if (!pDevice->noDisableDenormals) { ma_restore_denormals(prevState); } else { /* Do nothing. */ (void)prevState; } } static ma_device_notification ma_device_notification_init(ma_device* pDevice, ma_device_notification_type type) { ma_device_notification notification; MA_ZERO_OBJECT(¬ification); notification.pDevice = pDevice; notification.type = type; return notification; } static void ma_device__on_notification(ma_device_notification notification) { MA_ASSERT(notification.pDevice != NULL); if (notification.pDevice->onNotification != NULL) { notification.pDevice->onNotification(¬ification); } /* TEMP FOR COMPATIBILITY: If it's a stopped notification, fire the onStop callback as well. This is only for backwards compatibility and will be removed. */ if (notification.pDevice->onStop != NULL && notification.type == ma_device_notification_type_stopped) { notification.pDevice->onStop(notification.pDevice); } } static void ma_device__on_notification_started(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_started)); } static void ma_device__on_notification_stopped(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_stopped)); } /* Not all platforms support reroute notifications. */ #if !defined(MA_EMSCRIPTEN) static void ma_device__on_notification_rerouted(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_rerouted)); } #endif #if defined(MA_EMSCRIPTEN) #ifdef __cplusplus extern "C" { #endif void EMSCRIPTEN_KEEPALIVE ma_device__on_notification_unlocked(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_unlocked)); } #ifdef __cplusplus } #endif #endif static void ma_device__on_data_inner(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { MA_ASSERT(pDevice != NULL); MA_ASSERT(pDevice->onData != NULL); if (!pDevice->noPreSilencedOutputBuffer && pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels); } pDevice->onData(pDevice, pFramesOut, pFramesIn, frameCount); } static void ma_device__on_data(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { MA_ASSERT(pDevice != NULL); /* Don't read more data from the client if we're in the process of stopping. */ if (ma_device_get_state(pDevice) == ma_device_state_stopping) { return; } if (pDevice->noFixedSizedCallback) { /* Fast path. Not using a fixed sized callback. Process directly from the specified buffers. */ ma_device__on_data_inner(pDevice, pFramesOut, pFramesIn, frameCount); } else { /* Slow path. Using a fixed sized callback. Need to use the intermediary buffer. */ ma_uint32 totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { ma_uint32 totalFramesRemaining = frameCount - totalFramesProcessed; ma_uint32 framesToProcessThisIteration = 0; if (pFramesIn != NULL) { /* Capturing. Write to the intermediary buffer. If there's no room, fire the callback to empty it. */ if (pDevice->capture.intermediaryBufferLen < pDevice->capture.intermediaryBufferCap) { /* There's some room left in the intermediary buffer. Write to it without firing the callback. */ framesToProcessThisIteration = totalFramesRemaining; if (framesToProcessThisIteration > pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen) { framesToProcessThisIteration = pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen; } ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferLen, pDevice->capture.format, pDevice->capture.channels), ma_offset_pcm_frames_const_ptr(pFramesIn, totalFramesProcessed, pDevice->capture.format, pDevice->capture.channels), framesToProcessThisIteration, pDevice->capture.format, pDevice->capture.channels); pDevice->capture.intermediaryBufferLen += framesToProcessThisIteration; } if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) { /* No room left in the intermediary buffer. Fire the data callback. */ if (pDevice->type == ma_device_type_duplex) { /* We'll do the duplex data callback later after we've processed the playback data. */ } else { ma_device__on_data_inner(pDevice, NULL, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap); /* The intermediary buffer has just been drained. */ pDevice->capture.intermediaryBufferLen = 0; } } } if (pFramesOut != NULL) { /* Playing back. Read from the intermediary buffer. If there's nothing in it, fire the callback to fill it. */ if (pDevice->playback.intermediaryBufferLen > 0) { /* There's some content in the intermediary buffer. Read from that without firing the callback. */ if (pDevice->type == ma_device_type_duplex) { /* The frames processed this iteration for a duplex device will always be based on the capture side. Leave it unmodified. */ } else { framesToProcessThisIteration = totalFramesRemaining; if (framesToProcessThisIteration > pDevice->playback.intermediaryBufferLen) { framesToProcessThisIteration = pDevice->playback.intermediaryBufferLen; } } ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, pDevice->playback.format, pDevice->playback.channels), ma_offset_pcm_frames_ptr(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap - pDevice->playback.intermediaryBufferLen, pDevice->playback.format, pDevice->playback.channels), framesToProcessThisIteration, pDevice->playback.format, pDevice->playback.channels); pDevice->playback.intermediaryBufferLen -= framesToProcessThisIteration; } if (pDevice->playback.intermediaryBufferLen == 0) { /* There's nothing in the intermediary buffer. Fire the data callback to fill it. */ if (pDevice->type == ma_device_type_duplex) { /* In duplex mode, the data callback will be fired later. Nothing to do here. */ } else { ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, NULL, pDevice->playback.intermediaryBufferCap); /* The intermediary buffer has just been filled. */ pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap; } } } /* If we're in duplex mode we might need to do a refill of the data. */ if (pDevice->type == ma_device_type_duplex) { if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) { ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap); pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap; /* The playback buffer will have just been filled. */ pDevice->capture.intermediaryBufferLen = 0; /* The intermediary buffer has just been drained. */ } } /* Make sure this is only incremented once in the duplex case. */ totalFramesProcessed += framesToProcessThisIteration; } } } static void ma_device__handle_data_callback(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { float masterVolumeFactor; ma_device_get_master_volume(pDevice, &masterVolumeFactor); /* Use ma_device_get_master_volume() to ensure the volume is loaded atomically. */ if (pDevice->onData) { unsigned int prevDenormalState = ma_device_disable_denormals(pDevice); { /* Volume control of input makes things a bit awkward because the input buffer is read-only. We'll need to use a temp buffer and loop in this case. */ if (pFramesIn != NULL && masterVolumeFactor != 1) { ma_uint8 tempFramesIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 bpfCapture = ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint32 bpfPlayback = ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint32 totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { ma_uint32 framesToProcessThisIteration = frameCount - totalFramesProcessed; if (framesToProcessThisIteration > sizeof(tempFramesIn)/bpfCapture) { framesToProcessThisIteration = sizeof(tempFramesIn)/bpfCapture; } ma_copy_and_apply_volume_factor_pcm_frames(tempFramesIn, ma_offset_ptr(pFramesIn, totalFramesProcessed*bpfCapture), framesToProcessThisIteration, pDevice->capture.format, pDevice->capture.channels, masterVolumeFactor); ma_device__on_data(pDevice, ma_offset_ptr(pFramesOut, totalFramesProcessed*bpfPlayback), tempFramesIn, framesToProcessThisIteration); totalFramesProcessed += framesToProcessThisIteration; } } else { ma_device__on_data(pDevice, pFramesOut, pFramesIn, frameCount); } /* Volume control and clipping for playback devices. */ if (pFramesOut != NULL) { if (masterVolumeFactor != 1) { if (pFramesIn == NULL) { /* <-- In full-duplex situations, the volume will have been applied to the input samples before the data callback. Applying it again post-callback will incorrectly compound it. */ ma_apply_volume_factor_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels, masterVolumeFactor); } } if (!pDevice->noClip && pDevice->playback.format == ma_format_f32) { ma_clip_samples_f32((float*)pFramesOut, (const float*)pFramesOut, frameCount * pDevice->playback.channels); /* Intentionally specifying the same pointer for both input and output for in-place processing. */ } } } ma_device_restore_denormals(pDevice, prevDenormalState); } else { /* No data callback. Just silence the output. */ if (pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels); } } } /* A helper function for reading sample data from the client. */ static void ma_device__read_frames_from_client(ma_device* pDevice, ma_uint32 frameCount, void* pFramesOut) { MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCount > 0); MA_ASSERT(pFramesOut != NULL); if (pDevice->playback.converter.isPassthrough) { ma_device__handle_data_callback(pDevice, pFramesOut, NULL, frameCount); } else { ma_result result; ma_uint64 totalFramesReadOut; void* pRunningFramesOut; totalFramesReadOut = 0; pRunningFramesOut = pFramesOut; /* We run slightly different logic depending on whether or not we're using a heap-allocated buffer for caching input data. This will be the case if the data converter does not have the ability to retrieve the required input frame count for a given output frame count. */ if (pDevice->playback.pInputCache != NULL) { while (totalFramesReadOut < frameCount) { ma_uint64 framesToReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; /* If there's any data available in the cache, that needs to get processed first. */ if (pDevice->playback.inputCacheRemaining > 0) { framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > pDevice->playback.inputCacheRemaining) { framesToReadThisIterationIn = pDevice->playback.inputCacheRemaining; } result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut); if (result != MA_SUCCESS) { break; } pDevice->playback.inputCacheConsumed += framesToReadThisIterationIn; pDevice->playback.inputCacheRemaining -= framesToReadThisIterationIn; totalFramesReadOut += framesToReadThisIterationOut; pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) { break; /* We're done. */ } } /* Getting here means there's no data in the cache and we need to fill it up with data from the client. */ if (pDevice->playback.inputCacheRemaining == 0) { ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, NULL, (ma_uint32)pDevice->playback.inputCacheCap); pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = pDevice->playback.inputCacheCap; } } } else { while (totalFramesReadOut < frameCount) { ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In client format. */ ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint64 framesToReadThisIterationIn; ma_uint64 framesReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; ma_uint64 framesReadThisIterationOut; ma_uint64 requiredInputFrameCount; framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > intermediaryBufferCap) { framesToReadThisIterationIn = intermediaryBufferCap; } ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, framesToReadThisIterationOut, &requiredInputFrameCount); if (framesToReadThisIterationIn > requiredInputFrameCount) { framesToReadThisIterationIn = requiredInputFrameCount; } ma_device__handle_data_callback(pDevice, pIntermediaryBuffer, NULL, (ma_uint32)framesToReadThisIterationIn); /* At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any input frames, we still want to try processing frames because there may some output frames generated from cached input data. */ framesReadThisIterationIn = framesToReadThisIterationIn; framesReadThisIterationOut = framesToReadThisIterationOut; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut); if (result != MA_SUCCESS) { break; } totalFramesReadOut += framesReadThisIterationOut; pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) { break; /* We're done. */ } } } } } /* A helper for sending sample data to the client. */ static void ma_device__send_frames_to_client(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat) { MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCountInDeviceFormat > 0); MA_ASSERT(pFramesInDeviceFormat != NULL); if (pDevice->capture.converter.isPassthrough) { ma_device__handle_data_callback(pDevice, NULL, pFramesInDeviceFormat, frameCountInDeviceFormat); } else { ma_result result; ma_uint8 pFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint64 framesInClientFormatCap = sizeof(pFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint64 totalDeviceFramesProcessed = 0; ma_uint64 totalClientFramesProcessed = 0; const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat; /* We just keep going until we've exhausted all of our input frames and cannot generate any more output frames. */ for (;;) { ma_uint64 deviceFramesProcessedThisIteration; ma_uint64 clientFramesProcessedThisIteration; deviceFramesProcessedThisIteration = (frameCountInDeviceFormat - totalDeviceFramesProcessed); clientFramesProcessedThisIteration = framesInClientFormatCap; result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &deviceFramesProcessedThisIteration, pFramesInClientFormat, &clientFramesProcessedThisIteration); if (result != MA_SUCCESS) { break; } if (clientFramesProcessedThisIteration > 0) { ma_device__handle_data_callback(pDevice, NULL, pFramesInClientFormat, (ma_uint32)clientFramesProcessedThisIteration); /* Safe cast. */ } pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, deviceFramesProcessedThisIteration * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); totalDeviceFramesProcessed += deviceFramesProcessedThisIteration; totalClientFramesProcessed += clientFramesProcessedThisIteration; /* This is just to silence a warning. I might want to use this variable later so leaving in place for now. */ (void)totalClientFramesProcessed; if (deviceFramesProcessedThisIteration == 0 && clientFramesProcessedThisIteration == 0) { break; /* We're done. */ } } } } static ma_result ma_device__handle_duplex_callback_capture(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat, ma_pcm_rb* pRB) { ma_result result; ma_uint32 totalDeviceFramesProcessed = 0; const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat; MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCountInDeviceFormat > 0); MA_ASSERT(pFramesInDeviceFormat != NULL); MA_ASSERT(pRB != NULL); /* Write to the ring buffer. The ring buffer is in the client format which means we need to convert. */ for (;;) { ma_uint32 framesToProcessInDeviceFormat = (frameCountInDeviceFormat - totalDeviceFramesProcessed); ma_uint32 framesToProcessInClientFormat = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint64 framesProcessedInDeviceFormat; ma_uint64 framesProcessedInClientFormat; void* pFramesInClientFormat; result = ma_pcm_rb_acquire_write(pRB, &framesToProcessInClientFormat, &pFramesInClientFormat); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "Failed to acquire capture PCM frames from ring buffer."); break; } if (framesToProcessInClientFormat == 0) { if (ma_pcm_rb_pointer_distance(pRB) == (ma_int32)ma_pcm_rb_get_subbuffer_size(pRB)) { break; /* Overrun. Not enough room in the ring buffer for input frame. Excess frames are dropped. */ } } /* Convert. */ framesProcessedInDeviceFormat = framesToProcessInDeviceFormat; framesProcessedInClientFormat = framesToProcessInClientFormat; result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &framesProcessedInDeviceFormat, pFramesInClientFormat, &framesProcessedInClientFormat); if (result != MA_SUCCESS) { break; } result = ma_pcm_rb_commit_write(pRB, (ma_uint32)framesProcessedInClientFormat); /* Safe cast. */ if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "Failed to commit capture PCM frames to ring buffer."); break; } pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, framesProcessedInDeviceFormat * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); totalDeviceFramesProcessed += (ma_uint32)framesProcessedInDeviceFormat; /* Safe cast. */ /* We're done when we're unable to process any client nor device frames. */ if (framesProcessedInClientFormat == 0 && framesProcessedInDeviceFormat == 0) { break; /* Done. */ } } return MA_SUCCESS; } static ma_result ma_device__handle_duplex_callback_playback(ma_device* pDevice, ma_uint32 frameCount, void* pFramesInInternalFormat, ma_pcm_rb* pRB) { ma_result result; ma_uint8 silentInputFrames[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 totalFramesReadOut = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCount > 0); MA_ASSERT(pFramesInInternalFormat != NULL); MA_ASSERT(pRB != NULL); MA_ASSERT(pDevice->playback.pInputCache != NULL); /* Sitting in the ring buffer should be captured data from the capture callback in external format. If there's not enough data in there for the whole frameCount frames we just use silence instead for the input data. */ MA_ZERO_MEMORY(silentInputFrames, sizeof(silentInputFrames)); while (totalFramesReadOut < frameCount && ma_device_is_started(pDevice)) { /* We should have a buffer allocated on the heap. Any playback frames still sitting in there need to be sent to the internal device before we process any more data from the client. */ if (pDevice->playback.inputCacheRemaining > 0) { ma_uint64 framesConvertedIn = pDevice->playback.inputCacheRemaining; ma_uint64 framesConvertedOut = (frameCount - totalFramesReadOut); ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesConvertedIn, pFramesInInternalFormat, &framesConvertedOut); pDevice->playback.inputCacheConsumed += framesConvertedIn; pDevice->playback.inputCacheRemaining -= framesConvertedIn; totalFramesReadOut += (ma_uint32)framesConvertedOut; /* Safe cast. */ pFramesInInternalFormat = ma_offset_ptr(pFramesInInternalFormat, framesConvertedOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); } /* If there's no more data in the cache we'll need to fill it with some. */ if (totalFramesReadOut < frameCount && pDevice->playback.inputCacheRemaining == 0) { ma_uint32 inputFrameCount; void* pInputFrames; inputFrameCount = (ma_uint32)pDevice->playback.inputCacheCap; result = ma_pcm_rb_acquire_read(pRB, &inputFrameCount, &pInputFrames); if (result == MA_SUCCESS) { if (inputFrameCount > 0) { ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, pInputFrames, inputFrameCount); } else { if (ma_pcm_rb_pointer_distance(pRB) == 0) { break; /* Underrun. */ } } } else { /* No capture data available. Feed in silence. */ inputFrameCount = (ma_uint32)ma_min(pDevice->playback.inputCacheCap, sizeof(silentInputFrames) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels)); ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, silentInputFrames, inputFrameCount); } pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = inputFrameCount; result = ma_pcm_rb_commit_read(pRB, inputFrameCount); if (result != MA_SUCCESS) { return result; /* Should never happen. */ } } } return MA_SUCCESS; } /* A helper for changing the state of the device. */ static MA_INLINE void ma_device__set_state(ma_device* pDevice, ma_device_state newState) { ma_atomic_device_state_set(&pDevice->state, newState); } #if defined(MA_WIN32) static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_ALAW = {0x00000006, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/ /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_MULAW = {0x00000007, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/ #endif MA_API ma_uint32 ma_get_format_priority_index(ma_format format) /* Lower = better. */ { ma_uint32 i; for (i = 0; i < ma_countof(g_maFormatPriorities); ++i) { if (g_maFormatPriorities[i] == format) { return i; } } /* Getting here means the format could not be found or is equal to ma_format_unknown. */ return (ma_uint32)-1; } static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType); static ma_bool32 ma_device_descriptor_is_valid(const ma_device_descriptor* pDeviceDescriptor) { if (pDeviceDescriptor == NULL) { return MA_FALSE; } if (pDeviceDescriptor->format == ma_format_unknown) { return MA_FALSE; } if (pDeviceDescriptor->channels == 0 || pDeviceDescriptor->channels > MA_MAX_CHANNELS) { return MA_FALSE; } if (pDeviceDescriptor->sampleRate == 0) { return MA_FALSE; } return MA_TRUE; } static ma_result ma_device_audio_thread__default_read_write(ma_device* pDevice) { ma_result result = MA_SUCCESS; ma_bool32 exitLoop = MA_FALSE; ma_uint8 capturedDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint8 playbackDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 capturedDeviceDataCapInFrames = 0; ma_uint32 playbackDeviceDataCapInFrames = 0; MA_ASSERT(pDevice != NULL); /* Just some quick validation on the device type and the available callbacks. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { if (pDevice->pContext->callbacks.onDeviceRead == NULL) { return MA_NOT_IMPLEMENTED; } capturedDeviceDataCapInFrames = sizeof(capturedDeviceData) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->pContext->callbacks.onDeviceWrite == NULL) { return MA_NOT_IMPLEMENTED; } playbackDeviceDataCapInFrames = sizeof(playbackDeviceData) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } /* NOTE: The device was started outside of this function, in the worker thread. */ while (ma_device_get_state(pDevice) == ma_device_state_started && !exitLoop) { switch (pDevice->type) { case ma_device_type_duplex: { /* The process is: onDeviceRead() -> convert -> callback -> convert -> onDeviceWrite() */ ma_uint32 totalCapturedDeviceFramesProcessed = 0; ma_uint32 capturedDevicePeriodSizeInFrames = ma_min(pDevice->capture.internalPeriodSizeInFrames, pDevice->playback.internalPeriodSizeInFrames); while (totalCapturedDeviceFramesProcessed < capturedDevicePeriodSizeInFrames) { ma_uint32 capturedDeviceFramesRemaining; ma_uint32 capturedDeviceFramesProcessed; ma_uint32 capturedDeviceFramesToProcess; ma_uint32 capturedDeviceFramesToTryProcessing = capturedDevicePeriodSizeInFrames - totalCapturedDeviceFramesProcessed; if (capturedDeviceFramesToTryProcessing > capturedDeviceDataCapInFrames) { capturedDeviceFramesToTryProcessing = capturedDeviceDataCapInFrames; } result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, capturedDeviceFramesToTryProcessing, &capturedDeviceFramesToProcess); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } capturedDeviceFramesRemaining = capturedDeviceFramesToProcess; capturedDeviceFramesProcessed = 0; /* At this point we have our captured data in device format and we now need to convert it to client format. */ for (;;) { ma_uint8 capturedClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint8 playbackClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 capturedClientDataCapInFrames = sizeof(capturedClientData) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint32 playbackClientDataCapInFrames = sizeof(playbackClientData) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint64 capturedClientFramesToProcessThisIteration = ma_min(capturedClientDataCapInFrames, playbackClientDataCapInFrames); ma_uint64 capturedDeviceFramesToProcessThisIteration = capturedDeviceFramesRemaining; ma_uint8* pRunningCapturedDeviceFrames = ma_offset_ptr(capturedDeviceData, capturedDeviceFramesProcessed * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); /* Convert capture data from device format to client format. */ result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningCapturedDeviceFrames, &capturedDeviceFramesToProcessThisIteration, capturedClientData, &capturedClientFramesToProcessThisIteration); if (result != MA_SUCCESS) { break; } /* If we weren't able to generate any output frames it must mean we've exhausted all of our input. The only time this would not be the case is if capturedClientData was too small which should never be the case when it's of the size MA_DATA_CONVERTER_STACK_BUFFER_SIZE. */ if (capturedClientFramesToProcessThisIteration == 0) { break; } ma_device__handle_data_callback(pDevice, playbackClientData, capturedClientData, (ma_uint32)capturedClientFramesToProcessThisIteration); /* Safe cast .*/ capturedDeviceFramesProcessed += (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */ capturedDeviceFramesRemaining -= (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */ /* At this point the playbackClientData buffer should be holding data that needs to be written to the device. */ for (;;) { ma_uint64 convertedClientFrameCount = capturedClientFramesToProcessThisIteration; ma_uint64 convertedDeviceFrameCount = playbackDeviceDataCapInFrames; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, playbackClientData, &convertedClientFrameCount, playbackDeviceData, &convertedDeviceFrameCount); if (result != MA_SUCCESS) { break; } result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, (ma_uint32)convertedDeviceFrameCount, NULL); /* Safe cast. */ if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } capturedClientFramesToProcessThisIteration -= (ma_uint32)convertedClientFrameCount; /* Safe cast. */ if (capturedClientFramesToProcessThisIteration == 0) { break; } } /* In case an error happened from ma_device_write__null()... */ if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } } /* Make sure we don't get stuck in the inner loop. */ if (capturedDeviceFramesProcessed == 0) { break; } totalCapturedDeviceFramesProcessed += capturedDeviceFramesProcessed; } } break; case ma_device_type_capture: case ma_device_type_loopback: { ma_uint32 periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames; ma_uint32 framesReadThisPeriod = 0; while (framesReadThisPeriod < periodSizeInFrames) { ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesReadThisPeriod; ma_uint32 framesProcessed; ma_uint32 framesToReadThisIteration = framesRemainingInPeriod; if (framesToReadThisIteration > capturedDeviceDataCapInFrames) { framesToReadThisIteration = capturedDeviceDataCapInFrames; } result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, framesToReadThisIteration, &framesProcessed); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } /* Make sure we don't get stuck in the inner loop. */ if (framesProcessed == 0) { break; } ma_device__send_frames_to_client(pDevice, framesProcessed, capturedDeviceData); framesReadThisPeriod += framesProcessed; } } break; case ma_device_type_playback: { /* We write in chunks of the period size, but use a stack allocated buffer for the intermediary. */ ma_uint32 periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames; ma_uint32 framesWrittenThisPeriod = 0; while (framesWrittenThisPeriod < periodSizeInFrames) { ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesWrittenThisPeriod; ma_uint32 framesProcessed; ma_uint32 framesToWriteThisIteration = framesRemainingInPeriod; if (framesToWriteThisIteration > playbackDeviceDataCapInFrames) { framesToWriteThisIteration = playbackDeviceDataCapInFrames; } ma_device__read_frames_from_client(pDevice, framesToWriteThisIteration, playbackDeviceData); result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, framesToWriteThisIteration, &framesProcessed); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } /* Make sure we don't get stuck in the inner loop. */ if (framesProcessed == 0) { break; } framesWrittenThisPeriod += framesProcessed; } } break; /* Should never get here. */ default: break; } } return result; } /******************************************************************************* Null Backend *******************************************************************************/ #ifdef MA_HAS_NULL #define MA_DEVICE_OP_NONE__NULL 0 #define MA_DEVICE_OP_START__NULL 1 #define MA_DEVICE_OP_SUSPEND__NULL 2 #define MA_DEVICE_OP_KILL__NULL 3 static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData) { ma_device* pDevice = (ma_device*)pData; MA_ASSERT(pDevice != NULL); for (;;) { /* Keep the thread alive until the device is uninitialized. */ ma_uint32 operation; /* Wait for an operation to be requested. */ ma_event_wait(&pDevice->null_device.operationEvent); /* At this point an event should have been triggered. */ operation = pDevice->null_device.operation; /* Starting the device needs to put the thread into a loop. */ if (operation == MA_DEVICE_OP_START__NULL) { /* Reset the timer just in case. */ ma_timer_init(&pDevice->null_device.timer); /* Getting here means a suspend or kill operation has been requested. */ pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; } /* Suspending the device means we need to stop the timer and just continue the loop. */ if (operation == MA_DEVICE_OP_SUSPEND__NULL) { /* We need to add the current run time to the prior run time, then reset the timer. */ pDevice->null_device.priorRunTime += ma_timer_get_time_in_seconds(&pDevice->null_device.timer); ma_timer_init(&pDevice->null_device.timer); /* We're done. */ pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; } /* Killing the device means we need to get out of this loop so that this thread can terminate. */ if (operation == MA_DEVICE_OP_KILL__NULL) { pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); break; } /* Getting a signal on a "none" operation probably means an error. Return invalid operation. */ if (operation == MA_DEVICE_OP_NONE__NULL) { MA_ASSERT(MA_FALSE); /* <-- Trigger this in debug mode to ensure developers are aware they're doing something wrong (or there's a bug in a miniaudio). */ pDevice->null_device.operationResult = MA_INVALID_OPERATION; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; /* Continue the loop. Don't terminate. */ } } return (ma_thread_result)0; } static ma_result ma_device_do_operation__null(ma_device* pDevice, ma_uint32 operation) { ma_result result; /* TODO: Need to review this and consider just using mutual exclusion. I think the original motivation for this was to just post the event to a queue and return immediately, but that has since changed and now this function is synchronous. I think this can be simplified to just use a mutex. */ /* The first thing to do is wait for an operation slot to become available. We only have a single slot for this, but we could extend this later to support queuing of operations. */ result = ma_semaphore_wait(&pDevice->null_device.operationSemaphore); if (result != MA_SUCCESS) { return result; /* Failed to wait for the event. */ } /* When we get here it means the background thread is not referencing the operation code and it can be changed. After changing this we need to signal an event to the worker thread to let it know that it can start work. */ pDevice->null_device.operation = operation; /* Once the operation code has been set, the worker thread can start work. */ if (ma_event_signal(&pDevice->null_device.operationEvent) != MA_SUCCESS) { return MA_ERROR; } /* We want everything to be synchronous so we're going to wait for the worker thread to complete it's operation. */ if (ma_event_wait(&pDevice->null_device.operationCompletionEvent) != MA_SUCCESS) { return MA_ERROR; } return pDevice->null_device.operationResult; } static ma_uint64 ma_device_get_total_run_time_in_frames__null(ma_device* pDevice) { ma_uint32 internalSampleRate; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { internalSampleRate = pDevice->capture.internalSampleRate; } else { internalSampleRate = pDevice->playback.internalSampleRate; } return (ma_uint64)((pDevice->null_device.priorRunTime + ma_timer_get_time_in_seconds(&pDevice->null_device.timer)) * internalSampleRate); } static ma_result ma_context_enumerate_devices__null(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), "NULL Playback Device", (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), "NULL Capture Device", (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } (void)cbResult; /* Silence a static analysis warning. */ return MA_SUCCESS; } static ma_result ma_context_get_device_info__null(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); if (pDeviceID != NULL && pDeviceID->nullbackend != 0) { return MA_NO_DEVICE; /* Don't know the device. */ } /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), "NULL Playback Device", (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), "NULL Capture Device", (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ /* Support everything on the null backend. */ pDeviceInfo->nativeDataFormats[0].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[0].channels = 0; pDeviceInfo->nativeDataFormats[0].sampleRate = 0; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; (void)pContext; return MA_SUCCESS; } static ma_result ma_device_uninit__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* Keep it clean and wait for the device thread to finish before returning. */ ma_device_do_operation__null(pDevice, MA_DEVICE_OP_KILL__NULL); /* Wait for the thread to finish before continuing. */ ma_thread_wait(&pDevice->null_device.deviceThread); /* At this point the loop in the device thread is as good as terminated so we can uninitialize our events. */ ma_semaphore_uninit(&pDevice->null_device.operationSemaphore); ma_event_uninit(&pDevice->null_device.operationCompletionEvent); ma_event_uninit(&pDevice->null_device.operationEvent); return MA_SUCCESS; } static ma_result ma_device_init__null(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->null_device); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* The null backend supports everything exactly as we specify it. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { pDescriptorCapture->format = (pDescriptorCapture->format != ma_format_unknown) ? pDescriptorCapture->format : MA_DEFAULT_FORMAT; pDescriptorCapture->channels = (pDescriptorCapture->channels != 0) ? pDescriptorCapture->channels : MA_DEFAULT_CHANNELS; pDescriptorCapture->sampleRate = (pDescriptorCapture->sampleRate != 0) ? pDescriptorCapture->sampleRate : MA_DEFAULT_SAMPLE_RATE; if (pDescriptorCapture->channelMap[0] == MA_CHANNEL_NONE) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); } pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { pDescriptorPlayback->format = (pDescriptorPlayback->format != ma_format_unknown) ? pDescriptorPlayback->format : MA_DEFAULT_FORMAT; pDescriptorPlayback->channels = (pDescriptorPlayback->channels != 0) ? pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS; pDescriptorPlayback->sampleRate = (pDescriptorPlayback->sampleRate != 0) ? pDescriptorPlayback->sampleRate : MA_DEFAULT_SAMPLE_RATE; if (pDescriptorPlayback->channelMap[0] == MA_CHANNEL_NONE) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorPlayback->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorPlayback->channels); } pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); } /* In order to get timing right, we need to create a thread that does nothing but keeps track of the timer. This timer is started when the first period is "written" to it, and then stopped in ma_device_stop__null(). */ result = ma_event_init(&pDevice->null_device.operationEvent); if (result != MA_SUCCESS) { return result; } result = ma_event_init(&pDevice->null_device.operationCompletionEvent); if (result != MA_SUCCESS) { return result; } result = ma_semaphore_init(1, &pDevice->null_device.operationSemaphore); /* <-- It's important that the initial value is set to 1. */ if (result != MA_SUCCESS) { return result; } result = ma_thread_create(&pDevice->null_device.deviceThread, pDevice->pContext->threadPriority, 0, ma_device_thread__null, pDevice, &pDevice->pContext->allocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static ma_result ma_device_start__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_device_do_operation__null(pDevice, MA_DEVICE_OP_START__NULL); ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_TRUE); return MA_SUCCESS; } static ma_result ma_device_stop__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_device_do_operation__null(pDevice, MA_DEVICE_OP_SUSPEND__NULL); ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_FALSE); return MA_SUCCESS; } static ma_bool32 ma_device_is_started__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); return ma_atomic_bool32_get(&pDevice->null_device.isStarted); } static ma_result ma_device_write__null(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; ma_uint32 totalPCMFramesProcessed; ma_bool32 wasStartedOnEntry; if (pFramesWritten != NULL) { *pFramesWritten = 0; } wasStartedOnEntry = ma_device_is_started__null(pDevice); /* Keep going until everything has been read. */ totalPCMFramesProcessed = 0; while (totalPCMFramesProcessed < frameCount) { ma_uint64 targetFrame; /* If there are any frames remaining in the current period, consume those first. */ if (pDevice->null_device.currentPeriodFramesRemainingPlayback > 0) { ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed); ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingPlayback; if (framesToProcess > framesRemaining) { framesToProcess = framesRemaining; } /* We don't actually do anything with pPCMFrames, so just mark it as unused to prevent a warning. */ (void)pPCMFrames; pDevice->null_device.currentPeriodFramesRemainingPlayback -= framesToProcess; totalPCMFramesProcessed += framesToProcess; } /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */ if (pDevice->null_device.currentPeriodFramesRemainingPlayback == 0) { pDevice->null_device.currentPeriodFramesRemainingPlayback = 0; if (!ma_device_is_started__null(pDevice) && !wasStartedOnEntry) { result = ma_device_start__null(pDevice); if (result != MA_SUCCESS) { break; } } } /* If we've consumed the whole buffer we can return now. */ MA_ASSERT(totalPCMFramesProcessed <= frameCount); if (totalPCMFramesProcessed == frameCount) { break; } /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */ targetFrame = pDevice->null_device.lastProcessedFramePlayback; for (;;) { ma_uint64 currentFrame; /* Stop waiting if the device has been stopped. */ if (!ma_device_is_started__null(pDevice)) { break; } currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice); if (currentFrame >= targetFrame) { break; } /* Getting here means we haven't yet reached the target sample, so continue waiting. */ ma_sleep(10); } pDevice->null_device.lastProcessedFramePlayback += pDevice->playback.internalPeriodSizeInFrames; pDevice->null_device.currentPeriodFramesRemainingPlayback = pDevice->playback.internalPeriodSizeInFrames; } if (pFramesWritten != NULL) { *pFramesWritten = totalPCMFramesProcessed; } return result; } static ma_result ma_device_read__null(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint32 totalPCMFramesProcessed; if (pFramesRead != NULL) { *pFramesRead = 0; } /* Keep going until everything has been read. */ totalPCMFramesProcessed = 0; while (totalPCMFramesProcessed < frameCount) { ma_uint64 targetFrame; /* If there are any frames remaining in the current period, consume those first. */ if (pDevice->null_device.currentPeriodFramesRemainingCapture > 0) { ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed); ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingCapture; if (framesToProcess > framesRemaining) { framesToProcess = framesRemaining; } /* We need to ensure the output buffer is zeroed. */ MA_ZERO_MEMORY(ma_offset_ptr(pPCMFrames, totalPCMFramesProcessed*bpf), framesToProcess*bpf); pDevice->null_device.currentPeriodFramesRemainingCapture -= framesToProcess; totalPCMFramesProcessed += framesToProcess; } /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */ if (pDevice->null_device.currentPeriodFramesRemainingCapture == 0) { pDevice->null_device.currentPeriodFramesRemainingCapture = 0; } /* If we've consumed the whole buffer we can return now. */ MA_ASSERT(totalPCMFramesProcessed <= frameCount); if (totalPCMFramesProcessed == frameCount) { break; } /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */ targetFrame = pDevice->null_device.lastProcessedFrameCapture + pDevice->capture.internalPeriodSizeInFrames; for (;;) { ma_uint64 currentFrame; /* Stop waiting if the device has been stopped. */ if (!ma_device_is_started__null(pDevice)) { break; } currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice); if (currentFrame >= targetFrame) { break; } /* Getting here means we haven't yet reached the target sample, so continue waiting. */ ma_sleep(10); } pDevice->null_device.lastProcessedFrameCapture += pDevice->capture.internalPeriodSizeInFrames; pDevice->null_device.currentPeriodFramesRemainingCapture = pDevice->capture.internalPeriodSizeInFrames; } if (pFramesRead != NULL) { *pFramesRead = totalPCMFramesProcessed; } return result; } static ma_result ma_context_uninit__null(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_null); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__null(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; (void)pContext; pCallbacks->onContextInit = ma_context_init__null; pCallbacks->onContextUninit = ma_context_uninit__null; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__null; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__null; pCallbacks->onDeviceInit = ma_device_init__null; pCallbacks->onDeviceUninit = ma_device_uninit__null; pCallbacks->onDeviceStart = ma_device_start__null; pCallbacks->onDeviceStop = ma_device_stop__null; pCallbacks->onDeviceRead = ma_device_read__null; pCallbacks->onDeviceWrite = ma_device_write__null; pCallbacks->onDeviceDataLoop = NULL; /* Our backend is asynchronous with a blocking read-write API which means we can get miniaudio to deal with the audio thread. */ /* The null backend always works. */ return MA_SUCCESS; } #endif /******************************************************************************* WIN32 COMMON *******************************************************************************/ #if defined(MA_WIN32) #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit) ((pContext->win32.CoInitializeEx) ? ((MA_PFN_CoInitializeEx)pContext->win32.CoInitializeEx)(pvReserved, dwCoInit) : ((MA_PFN_CoInitialize)pContext->win32.CoInitialize)(pvReserved)) #define ma_CoUninitialize(pContext) ((MA_PFN_CoUninitialize)pContext->win32.CoUninitialize)() #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) ((MA_PFN_CoCreateInstance)pContext->win32.CoCreateInstance)(rclsid, pUnkOuter, dwClsContext, riid, ppv) #define ma_CoTaskMemFree(pContext, pv) ((MA_PFN_CoTaskMemFree)pContext->win32.CoTaskMemFree)(pv) #define ma_PropVariantClear(pContext, pvar) ((MA_PFN_PropVariantClear)pContext->win32.PropVariantClear)(pvar) #else #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit) CoInitializeEx(pvReserved, dwCoInit) #define ma_CoUninitialize(pContext) CoUninitialize() #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv) #define ma_CoTaskMemFree(pContext, pv) CoTaskMemFree(pv) #define ma_PropVariantClear(pContext, pvar) PropVariantClear(pvar) #endif #if !defined(MAXULONG_PTR) && !defined(__WATCOMC__) typedef size_t DWORD_PTR; #endif #if !defined(WAVE_FORMAT_1M08) #define WAVE_FORMAT_1M08 0x00000001 #define WAVE_FORMAT_1S08 0x00000002 #define WAVE_FORMAT_1M16 0x00000004 #define WAVE_FORMAT_1S16 0x00000008 #define WAVE_FORMAT_2M08 0x00000010 #define WAVE_FORMAT_2S08 0x00000020 #define WAVE_FORMAT_2M16 0x00000040 #define WAVE_FORMAT_2S16 0x00000080 #define WAVE_FORMAT_4M08 0x00000100 #define WAVE_FORMAT_4S08 0x00000200 #define WAVE_FORMAT_4M16 0x00000400 #define WAVE_FORMAT_4S16 0x00000800 #endif #if !defined(WAVE_FORMAT_44M08) #define WAVE_FORMAT_44M08 0x00000100 #define WAVE_FORMAT_44S08 0x00000200 #define WAVE_FORMAT_44M16 0x00000400 #define WAVE_FORMAT_44S16 0x00000800 #define WAVE_FORMAT_48M08 0x00001000 #define WAVE_FORMAT_48S08 0x00002000 #define WAVE_FORMAT_48M16 0x00004000 #define WAVE_FORMAT_48S16 0x00008000 #define WAVE_FORMAT_96M08 0x00010000 #define WAVE_FORMAT_96S08 0x00020000 #define WAVE_FORMAT_96M16 0x00040000 #define WAVE_FORMAT_96S16 0x00080000 #endif #ifndef SPEAKER_FRONT_LEFT #define SPEAKER_FRONT_LEFT 0x1 #define SPEAKER_FRONT_RIGHT 0x2 #define SPEAKER_FRONT_CENTER 0x4 #define SPEAKER_LOW_FREQUENCY 0x8 #define SPEAKER_BACK_LEFT 0x10 #define SPEAKER_BACK_RIGHT 0x20 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 #define SPEAKER_BACK_CENTER 0x100 #define SPEAKER_SIDE_LEFT 0x200 #define SPEAKER_SIDE_RIGHT 0x400 #define SPEAKER_TOP_CENTER 0x800 #define SPEAKER_TOP_FRONT_LEFT 0x1000 #define SPEAKER_TOP_FRONT_CENTER 0x2000 #define SPEAKER_TOP_FRONT_RIGHT 0x4000 #define SPEAKER_TOP_BACK_LEFT 0x8000 #define SPEAKER_TOP_BACK_CENTER 0x10000 #define SPEAKER_TOP_BACK_RIGHT 0x20000 #endif /* Implement our own version of MA_WAVEFORMATEXTENSIBLE so we can avoid a header. Be careful with this because MA_WAVEFORMATEX has an extra two bytes over standard WAVEFORMATEX due to padding. The standard version uses tight packing, but for compiler compatibility we're not doing that with ours. */ typedef struct { WORD wFormatTag; WORD nChannels; DWORD nSamplesPerSec; DWORD nAvgBytesPerSec; WORD nBlockAlign; WORD wBitsPerSample; WORD cbSize; } MA_WAVEFORMATEX; typedef struct { WORD wFormatTag; WORD nChannels; DWORD nSamplesPerSec; DWORD nAvgBytesPerSec; WORD nBlockAlign; WORD wBitsPerSample; WORD cbSize; union { WORD wValidBitsPerSample; WORD wSamplesPerBlock; WORD wReserved; } Samples; DWORD dwChannelMask; GUID SubFormat; } MA_WAVEFORMATEXTENSIBLE; #ifndef WAVE_FORMAT_EXTENSIBLE #define WAVE_FORMAT_EXTENSIBLE 0xFFFE #endif #ifndef WAVE_FORMAT_PCM #define WAVE_FORMAT_PCM 1 #endif #ifndef WAVE_FORMAT_IEEE_FLOAT #define WAVE_FORMAT_IEEE_FLOAT 0x0003 #endif /* Converts an individual Win32-style channel identifier (SPEAKER_FRONT_LEFT, etc.) to miniaudio. */ static ma_uint8 ma_channel_id_to_ma__win32(DWORD id) { switch (id) { case SPEAKER_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case SPEAKER_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case SPEAKER_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case SPEAKER_LOW_FREQUENCY: return MA_CHANNEL_LFE; case SPEAKER_BACK_LEFT: return MA_CHANNEL_BACK_LEFT; case SPEAKER_BACK_RIGHT: return MA_CHANNEL_BACK_RIGHT; case SPEAKER_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case SPEAKER_BACK_CENTER: return MA_CHANNEL_BACK_CENTER; case SPEAKER_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case SPEAKER_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case SPEAKER_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case SPEAKER_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case SPEAKER_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case SPEAKER_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case SPEAKER_TOP_BACK_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case SPEAKER_TOP_BACK_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; case SPEAKER_TOP_BACK_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; default: return 0; } } /* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to Win32-style. */ static DWORD ma_channel_id_to_win32(DWORD id) { switch (id) { case MA_CHANNEL_MONO: return SPEAKER_FRONT_CENTER; case MA_CHANNEL_FRONT_LEFT: return SPEAKER_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return SPEAKER_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return SPEAKER_FRONT_CENTER; case MA_CHANNEL_LFE: return SPEAKER_LOW_FREQUENCY; case MA_CHANNEL_BACK_LEFT: return SPEAKER_BACK_LEFT; case MA_CHANNEL_BACK_RIGHT: return SPEAKER_BACK_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return SPEAKER_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return SPEAKER_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return SPEAKER_BACK_CENTER; case MA_CHANNEL_SIDE_LEFT: return SPEAKER_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return SPEAKER_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return SPEAKER_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return SPEAKER_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return SPEAKER_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return SPEAKER_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return SPEAKER_TOP_BACK_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return SPEAKER_TOP_BACK_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return SPEAKER_TOP_BACK_RIGHT; default: return 0; } } /* Converts a channel mapping to a Win32-style channel mask. */ static DWORD ma_channel_map_to_channel_mask__win32(const ma_channel* pChannelMap, ma_uint32 channels) { DWORD dwChannelMask = 0; ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { dwChannelMask |= ma_channel_id_to_win32(pChannelMap[iChannel]); } return dwChannelMask; } /* Converts a Win32-style channel mask to a miniaudio channel map. */ static void ma_channel_mask_to_channel_map__win32(DWORD dwChannelMask, ma_uint32 channels, ma_channel* pChannelMap) { /* If the channel mask is set to 0, just assume a default Win32 channel map. */ if (dwChannelMask == 0) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channels, channels); } else { if (channels == 1 && (dwChannelMask & SPEAKER_FRONT_CENTER) != 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else { /* Just iterate over each bit. */ ma_uint32 iChannel = 0; ma_uint32 iBit; for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) { DWORD bitValue = (dwChannelMask & (1UL << iBit)); if (bitValue != 0) { /* The bit is set. */ pChannelMap[iChannel] = ma_channel_id_to_ma__win32(bitValue); iChannel += 1; } } } } } #ifdef __cplusplus static ma_bool32 ma_is_guid_equal(const void* a, const void* b) { return IsEqualGUID(*(const GUID*)a, *(const GUID*)b); } #else #define ma_is_guid_equal(a, b) IsEqualGUID((const GUID*)a, (const GUID*)b) #endif static MA_INLINE ma_bool32 ma_is_guid_null(const void* guid) { static GUID nullguid = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; return ma_is_guid_equal(guid, &nullguid); } static ma_format ma_format_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF) { MA_ASSERT(pWF != NULL); if (pWF->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { const MA_WAVEFORMATEXTENSIBLE* pWFEX = (const MA_WAVEFORMATEXTENSIBLE*)pWF; if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_PCM)) { if (pWFEX->Samples.wValidBitsPerSample == 32) { return ma_format_s32; } if (pWFEX->Samples.wValidBitsPerSample == 24) { if (pWFEX->wBitsPerSample == 32) { return ma_format_s32; } if (pWFEX->wBitsPerSample == 24) { return ma_format_s24; } } if (pWFEX->Samples.wValidBitsPerSample == 16) { return ma_format_s16; } if (pWFEX->Samples.wValidBitsPerSample == 8) { return ma_format_u8; } } if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) { if (pWFEX->Samples.wValidBitsPerSample == 32) { return ma_format_f32; } /* if (pWFEX->Samples.wValidBitsPerSample == 64) { return ma_format_f64; } */ } } else { if (pWF->wFormatTag == WAVE_FORMAT_PCM) { if (pWF->wBitsPerSample == 32) { return ma_format_s32; } if (pWF->wBitsPerSample == 24) { return ma_format_s24; } if (pWF->wBitsPerSample == 16) { return ma_format_s16; } if (pWF->wBitsPerSample == 8) { return ma_format_u8; } } if (pWF->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { if (pWF->wBitsPerSample == 32) { return ma_format_f32; } if (pWF->wBitsPerSample == 64) { /*return ma_format_f64;*/ } } } return ma_format_unknown; } #endif /******************************************************************************* WASAPI Backend *******************************************************************************/ #ifdef MA_HAS_WASAPI #if 0 #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4091) /* 'typedef ': ignored on left of '' when no variable is declared */ #endif #include #include #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* 0 */ static ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType); /* Some compilers don't define VerifyVersionInfoW. Need to write this ourselves. */ #define MA_WIN32_WINNT_VISTA 0x0600 #define MA_VER_MINORVERSION 0x01 #define MA_VER_MAJORVERSION 0x02 #define MA_VER_SERVICEPACKMAJOR 0x20 #define MA_VER_GREATER_EQUAL 0x03 typedef struct { DWORD dwOSVersionInfoSize; DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformId; WCHAR szCSDVersion[128]; WORD wServicePackMajor; WORD wServicePackMinor; WORD wSuiteMask; BYTE wProductType; BYTE wReserved; } ma_OSVERSIONINFOEXW; typedef BOOL (WINAPI * ma_PFNVerifyVersionInfoW) (ma_OSVERSIONINFOEXW* lpVersionInfo, DWORD dwTypeMask, DWORDLONG dwlConditionMask); typedef ULONGLONG (WINAPI * ma_PFNVerSetConditionMask)(ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, BYTE dwConditionMask); #ifndef PROPERTYKEY_DEFINED #define PROPERTYKEY_DEFINED #ifndef __WATCOMC__ typedef struct { GUID fmtid; DWORD pid; } PROPERTYKEY; #endif #endif /* Some compilers don't define PropVariantInit(). We just do this ourselves since it's just a memset(). */ static MA_INLINE void ma_PropVariantInit(MA_PROPVARIANT* pProp) { MA_ZERO_OBJECT(pProp); } static const PROPERTYKEY MA_PKEY_Device_FriendlyName = {{0xA45C254E, 0xDF1C, 0x4EFD, {0x80, 0x20, 0x67, 0xD1, 0x46, 0xA8, 0x50, 0xE0}}, 14}; static const PROPERTYKEY MA_PKEY_AudioEngine_DeviceFormat = {{0xF19F064D, 0x82C, 0x4E27, {0xBC, 0x73, 0x68, 0x82, 0xA1, 0xBB, 0x8E, 0x4C}}, 0}; static const IID MA_IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; /* 00000000-0000-0000-C000-000000000046 */ #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) static const IID MA_IID_IAgileObject = {0x94EA2B94, 0xE9CC, 0x49E0, {0xC0, 0xFF, 0xEE, 0x64, 0xCA, 0x8F, 0x5B, 0x90}}; /* 94EA2B94-E9CC-49E0-C0FF-EE64CA8F5B90 */ #endif static const IID MA_IID_IAudioClient = {0x1CB9AD4C, 0xDBFA, 0x4C32, {0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2}}; /* 1CB9AD4C-DBFA-4C32-B178-C2F568A703B2 = __uuidof(IAudioClient) */ static const IID MA_IID_IAudioClient2 = {0x726778CD, 0xF60A, 0x4EDA, {0x82, 0xDE, 0xE4, 0x76, 0x10, 0xCD, 0x78, 0xAA}}; /* 726778CD-F60A-4EDA-82DE-E47610CD78AA = __uuidof(IAudioClient2) */ static const IID MA_IID_IAudioClient3 = {0x7ED4EE07, 0x8E67, 0x4CD4, {0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42}}; /* 7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42 = __uuidof(IAudioClient3) */ static const IID MA_IID_IAudioRenderClient = {0xF294ACFC, 0x3146, 0x4483, {0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2}}; /* F294ACFC-3146-4483-A7BF-ADDCA7C260E2 = __uuidof(IAudioRenderClient) */ static const IID MA_IID_IAudioCaptureClient = {0xC8ADBD64, 0xE71E, 0x48A0, {0xA4, 0xDE, 0x18, 0x5C, 0x39, 0x5C, 0xD3, 0x17}}; /* C8ADBD64-E71E-48A0-A4DE-185C395CD317 = __uuidof(IAudioCaptureClient) */ static const IID MA_IID_IMMNotificationClient = {0x7991EEC9, 0x7E89, 0x4D85, {0x83, 0x90, 0x6C, 0x70, 0x3C, 0xEC, 0x60, 0xC0}}; /* 7991EEC9-7E89-4D85-8390-6C703CEC60C0 = __uuidof(IMMNotificationClient) */ #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) static const IID MA_IID_DEVINTERFACE_AUDIO_RENDER = {0xE6327CAD, 0xDCEC, 0x4949, {0xAE, 0x8A, 0x99, 0x1E, 0x97, 0x6A, 0x79, 0xD2}}; /* E6327CAD-DCEC-4949-AE8A-991E976A79D2 */ static const IID MA_IID_DEVINTERFACE_AUDIO_CAPTURE = {0x2EEF81BE, 0x33FA, 0x4800, {0x96, 0x70, 0x1C, 0xD4, 0x74, 0x97, 0x2C, 0x3F}}; /* 2EEF81BE-33FA-4800-9670-1CD474972C3F */ static const IID MA_IID_IActivateAudioInterfaceCompletionHandler = {0x41D949AB, 0x9862, 0x444A, {0x80, 0xF6, 0xC2, 0x61, 0x33, 0x4D, 0xA5, 0xEB}}; /* 41D949AB-9862-444A-80F6-C261334DA5EB */ #endif static const IID MA_CLSID_MMDeviceEnumerator = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; /* BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator) */ static const IID MA_IID_IMMDeviceEnumerator = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; /* A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator) */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #define MA_MM_DEVICE_STATE_ACTIVE 1 #define MA_MM_DEVICE_STATE_DISABLED 2 #define MA_MM_DEVICE_STATE_NOTPRESENT 4 #define MA_MM_DEVICE_STATE_UNPLUGGED 8 typedef struct ma_IMMDeviceEnumerator ma_IMMDeviceEnumerator; typedef struct ma_IMMDeviceCollection ma_IMMDeviceCollection; typedef struct ma_IMMDevice ma_IMMDevice; #else typedef struct ma_IActivateAudioInterfaceCompletionHandler ma_IActivateAudioInterfaceCompletionHandler; typedef struct ma_IActivateAudioInterfaceAsyncOperation ma_IActivateAudioInterfaceAsyncOperation; #endif typedef struct ma_IPropertyStore ma_IPropertyStore; typedef struct ma_IAudioClient ma_IAudioClient; typedef struct ma_IAudioClient2 ma_IAudioClient2; typedef struct ma_IAudioClient3 ma_IAudioClient3; typedef struct ma_IAudioRenderClient ma_IAudioRenderClient; typedef struct ma_IAudioCaptureClient ma_IAudioCaptureClient; typedef ma_int64 MA_REFERENCE_TIME; #define MA_AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000 #define MA_AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000 #define MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000 #define MA_AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000 #define MA_AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000 #define MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x08000000 #define MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM 0x80000000 #define MA_AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000 #define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000 #define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000 /* Buffer flags. */ #define MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY 1 #define MA_AUDCLNT_BUFFERFLAGS_SILENT 2 #define MA_AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR 4 typedef enum { ma_eRender = 0, ma_eCapture = 1, ma_eAll = 2 } ma_EDataFlow; typedef enum { ma_eConsole = 0, ma_eMultimedia = 1, ma_eCommunications = 2 } ma_ERole; typedef enum { MA_AUDCLNT_SHAREMODE_SHARED, MA_AUDCLNT_SHAREMODE_EXCLUSIVE } MA_AUDCLNT_SHAREMODE; typedef enum { MA_AudioCategory_Other = 0 /* <-- miniaudio is only caring about Other. */ } MA_AUDIO_STREAM_CATEGORY; typedef struct { ma_uint32 cbSize; BOOL bIsOffload; MA_AUDIO_STREAM_CATEGORY eCategory; } ma_AudioClientProperties; /* IUnknown */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IUnknown* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IUnknown* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IUnknown* pThis); } ma_IUnknownVtbl; struct ma_IUnknown { ma_IUnknownVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IUnknown_QueryInterface(ma_IUnknown* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IUnknown_AddRef(ma_IUnknown* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IUnknown_Release(ma_IUnknown* pThis) { return pThis->lpVtbl->Release(pThis); } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* IMMNotificationClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMNotificationClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMNotificationClient* pThis); /* IMMNotificationClient */ HRESULT (STDMETHODCALLTYPE * OnDeviceStateChanged) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState); HRESULT (STDMETHODCALLTYPE * OnDeviceAdded) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID); HRESULT (STDMETHODCALLTYPE * OnDeviceRemoved) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID); HRESULT (STDMETHODCALLTYPE * OnDefaultDeviceChanged)(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID); HRESULT (STDMETHODCALLTYPE * OnPropertyValueChanged)(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key); } ma_IMMNotificationClientVtbl; /* IMMDeviceEnumerator */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDeviceEnumerator* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDeviceEnumerator* pThis); /* IMMDeviceEnumerator */ HRESULT (STDMETHODCALLTYPE * EnumAudioEndpoints) (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices); HRESULT (STDMETHODCALLTYPE * GetDefaultAudioEndpoint) (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint); HRESULT (STDMETHODCALLTYPE * GetDevice) (ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice); HRESULT (STDMETHODCALLTYPE * RegisterEndpointNotificationCallback) (ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient); HRESULT (STDMETHODCALLTYPE * UnregisterEndpointNotificationCallback)(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient); } ma_IMMDeviceEnumeratorVtbl; struct ma_IMMDeviceEnumerator { ma_IMMDeviceEnumeratorVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDeviceEnumerator_QueryInterface(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDeviceEnumerator_AddRef(ma_IMMDeviceEnumerator* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDeviceEnumerator_Release(ma_IMMDeviceEnumerator* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_EnumAudioEndpoints(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices) { return pThis->lpVtbl->EnumAudioEndpoints(pThis, dataFlow, dwStateMask, ppDevices); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint) { return pThis->lpVtbl->GetDefaultAudioEndpoint(pThis, dataFlow, role, ppEndpoint); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDevice(ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice) { return pThis->lpVtbl->GetDevice(pThis, pID, ppDevice); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_RegisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->RegisterEndpointNotificationCallback(pThis, pClient); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->UnregisterEndpointNotificationCallback(pThis, pClient); } /* IMMDeviceCollection */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDeviceCollection* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDeviceCollection* pThis); /* IMMDeviceCollection */ HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IMMDeviceCollection* pThis, UINT* pDevices); HRESULT (STDMETHODCALLTYPE * Item) (ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice); } ma_IMMDeviceCollectionVtbl; struct ma_IMMDeviceCollection { ma_IMMDeviceCollectionVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDeviceCollection_QueryInterface(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDeviceCollection_AddRef(ma_IMMDeviceCollection* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDeviceCollection_Release(ma_IMMDeviceCollection* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDeviceCollection_GetCount(ma_IMMDeviceCollection* pThis, UINT* pDevices) { return pThis->lpVtbl->GetCount(pThis, pDevices); } static MA_INLINE HRESULT ma_IMMDeviceCollection_Item(ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice) { return pThis->lpVtbl->Item(pThis, nDevice, ppDevice); } /* IMMDevice */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDevice* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDevice* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDevice* pThis); /* IMMDevice */ HRESULT (STDMETHODCALLTYPE * Activate) (ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface); HRESULT (STDMETHODCALLTYPE * OpenPropertyStore)(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties); HRESULT (STDMETHODCALLTYPE * GetId) (ma_IMMDevice* pThis, WCHAR** pID); HRESULT (STDMETHODCALLTYPE * GetState) (ma_IMMDevice* pThis, DWORD *pState); } ma_IMMDeviceVtbl; struct ma_IMMDevice { ma_IMMDeviceVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDevice_QueryInterface(ma_IMMDevice* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDevice_AddRef(ma_IMMDevice* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDevice_Release(ma_IMMDevice* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDevice_Activate(ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface) { return pThis->lpVtbl->Activate(pThis, iid, dwClsCtx, pActivationParams, ppInterface); } static MA_INLINE HRESULT ma_IMMDevice_OpenPropertyStore(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties) { return pThis->lpVtbl->OpenPropertyStore(pThis, stgmAccess, ppProperties); } static MA_INLINE HRESULT ma_IMMDevice_GetId(ma_IMMDevice* pThis, WCHAR** pID) { return pThis->lpVtbl->GetId(pThis, pID); } static MA_INLINE HRESULT ma_IMMDevice_GetState(ma_IMMDevice* pThis, DWORD *pState) { return pThis->lpVtbl->GetState(pThis, pState); } #else /* IActivateAudioInterfaceAsyncOperation */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IActivateAudioInterfaceAsyncOperation* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IActivateAudioInterfaceAsyncOperation* pThis); /* IActivateAudioInterfaceAsyncOperation */ HRESULT (STDMETHODCALLTYPE * GetActivateResult)(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface); } ma_IActivateAudioInterfaceAsyncOperationVtbl; struct ma_IActivateAudioInterfaceAsyncOperation { ma_IActivateAudioInterfaceAsyncOperationVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_QueryInterface(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IActivateAudioInterfaceAsyncOperation_AddRef(ma_IActivateAudioInterfaceAsyncOperation* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IActivateAudioInterfaceAsyncOperation_Release(ma_IActivateAudioInterfaceAsyncOperation* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface) { return pThis->lpVtbl->GetActivateResult(pThis, pActivateResult, ppActivatedInterface); } #endif /* IPropertyStore */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IPropertyStore* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IPropertyStore* pThis); /* IPropertyStore */ HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IPropertyStore* pThis, DWORD* pPropCount); HRESULT (STDMETHODCALLTYPE * GetAt) (ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey); HRESULT (STDMETHODCALLTYPE * GetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar); HRESULT (STDMETHODCALLTYPE * SetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar); HRESULT (STDMETHODCALLTYPE * Commit) (ma_IPropertyStore* pThis); } ma_IPropertyStoreVtbl; struct ma_IPropertyStore { ma_IPropertyStoreVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IPropertyStore_QueryInterface(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IPropertyStore_AddRef(ma_IPropertyStore* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IPropertyStore_Release(ma_IPropertyStore* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IPropertyStore_GetCount(ma_IPropertyStore* pThis, DWORD* pPropCount) { return pThis->lpVtbl->GetCount(pThis, pPropCount); } static MA_INLINE HRESULT ma_IPropertyStore_GetAt(ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey) { return pThis->lpVtbl->GetAt(pThis, propIndex, pPropKey); } static MA_INLINE HRESULT ma_IPropertyStore_GetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar) { return pThis->lpVtbl->GetValue(pThis, pKey, pPropVar); } static MA_INLINE HRESULT ma_IPropertyStore_SetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar) { return pThis->lpVtbl->SetValue(pThis, pKey, pPropVar); } static MA_INLINE HRESULT ma_IPropertyStore_Commit(ma_IPropertyStore* pThis) { return pThis->lpVtbl->Commit(pThis); } /* IAudioClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient* pThis, const IID* const riid, void** pp); } ma_IAudioClientVtbl; struct ma_IAudioClient { ma_IAudioClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient_QueryInterface(ma_IAudioClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient_AddRef(ma_IAudioClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient_Release(ma_IAudioClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Initialize(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient_GetBufferSize(ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient_GetStreamLatency(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient_GetCurrentPadding(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient_IsFormatSupported(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient_GetMixFormat(ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient_GetDevicePeriod(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient_Start(ma_IAudioClient* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Stop(ma_IAudioClient* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Reset(ma_IAudioClient* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient_SetEventHandle(ma_IAudioClient* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient_GetService(ma_IAudioClient* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } /* IAudioClient2 */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient2* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient2* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient2* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient2* pThis, const IID* const riid, void** pp); /* IAudioClient2 */ HRESULT (STDMETHODCALLTYPE * IsOffloadCapable) (ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable); HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties); HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration); } ma_IAudioClient2Vtbl; struct ma_IAudioClient2 { ma_IAudioClient2Vtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient2_QueryInterface(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient2_AddRef(ma_IAudioClient2* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient2_Release(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Initialize(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient2_GetBufferSize(ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient2_GetStreamLatency(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient2_GetCurrentPadding(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient2_IsFormatSupported(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient2_GetMixFormat(ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient2_GetDevicePeriod(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient2_Start(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Stop(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Reset(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_SetEventHandle(ma_IAudioClient2* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient2_GetService(ma_IAudioClient2* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } static MA_INLINE HRESULT ma_IAudioClient2_IsOffloadCapable(ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); } static MA_INLINE HRESULT ma_IAudioClient2_SetClientProperties(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties) { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); } static MA_INLINE HRESULT ma_IAudioClient2_GetBufferSizeLimits(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); } /* IAudioClient3 */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient3* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient3* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient3* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient3* pThis, const IID* const riid, void** pp); /* IAudioClient2 */ HRESULT (STDMETHODCALLTYPE * IsOffloadCapable) (ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable); HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties); HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration); /* IAudioClient3 */ HRESULT (STDMETHODCALLTYPE * GetSharedModeEnginePeriod) (ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames); HRESULT (STDMETHODCALLTYPE * GetCurrentSharedModeEnginePeriod)(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames); HRESULT (STDMETHODCALLTYPE * InitializeSharedAudioStream) (ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); } ma_IAudioClient3Vtbl; struct ma_IAudioClient3 { ma_IAudioClient3Vtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient3_QueryInterface(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient3_AddRef(ma_IAudioClient3* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient3_Release(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Initialize(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient3_GetBufferSize(ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient3_GetStreamLatency(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient3_GetCurrentPadding(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient3_IsFormatSupported(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient3_GetMixFormat(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient3_GetDevicePeriod(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient3_Start(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Stop(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Reset(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_SetEventHandle(ma_IAudioClient3* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient3_GetService(ma_IAudioClient3* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } static MA_INLINE HRESULT ma_IAudioClient3_IsOffloadCapable(ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); } static MA_INLINE HRESULT ma_IAudioClient3_SetClientProperties(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties) { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); } static MA_INLINE HRESULT ma_IAudioClient3_GetBufferSizeLimits(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); } static MA_INLINE HRESULT ma_IAudioClient3_GetSharedModeEnginePeriod(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames) { return pThis->lpVtbl->GetSharedModeEnginePeriod(pThis, pFormat, pDefaultPeriodInFrames, pFundamentalPeriodInFrames, pMinPeriodInFrames, pMaxPeriodInFrames); } static MA_INLINE HRESULT ma_IAudioClient3_GetCurrentSharedModeEnginePeriod(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames) { return pThis->lpVtbl->GetCurrentSharedModeEnginePeriod(pThis, ppFormat, pCurrentPeriodInFrames); } static MA_INLINE HRESULT ma_IAudioClient3_InitializeSharedAudioStream(ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGUID) { return pThis->lpVtbl->InitializeSharedAudioStream(pThis, streamFlags, periodInFrames, pFormat, pAudioSessionGUID); } /* IAudioRenderClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioRenderClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioRenderClient* pThis); /* IAudioRenderClient */ HRESULT (STDMETHODCALLTYPE * GetBuffer) (ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData); HRESULT (STDMETHODCALLTYPE * ReleaseBuffer)(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags); } ma_IAudioRenderClientVtbl; struct ma_IAudioRenderClient { ma_IAudioRenderClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioRenderClient_QueryInterface(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioRenderClient_AddRef(ma_IAudioRenderClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioRenderClient_Release(ma_IAudioRenderClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioRenderClient_GetBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData) { return pThis->lpVtbl->GetBuffer(pThis, numFramesRequested, ppData); } static MA_INLINE HRESULT ma_IAudioRenderClient_ReleaseBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags) { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesWritten, dwFlags); } /* IAudioCaptureClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioCaptureClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioCaptureClient* pThis); /* IAudioRenderClient */ HRESULT (STDMETHODCALLTYPE * GetBuffer) (ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition); HRESULT (STDMETHODCALLTYPE * ReleaseBuffer) (ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead); HRESULT (STDMETHODCALLTYPE * GetNextPacketSize)(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket); } ma_IAudioCaptureClientVtbl; struct ma_IAudioCaptureClient { ma_IAudioCaptureClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioCaptureClient_QueryInterface(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioCaptureClient_AddRef(ma_IAudioCaptureClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioCaptureClient_Release(ma_IAudioCaptureClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioCaptureClient_GetBuffer(ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition) { return pThis->lpVtbl->GetBuffer(pThis, ppData, pNumFramesToRead, pFlags, pDevicePosition, pQPCPosition); } static MA_INLINE HRESULT ma_IAudioCaptureClient_ReleaseBuffer(ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead) { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesRead); } static MA_INLINE HRESULT ma_IAudioCaptureClient_GetNextPacketSize(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket) { return pThis->lpVtbl->GetNextPacketSize(pThis, pNumFramesInNextPacket); } #if defined(MA_WIN32_UWP) /* mmdevapi Functions */ typedef HRESULT (WINAPI * MA_PFN_ActivateAudioInterfaceAsync)(const wchar_t* deviceInterfacePath, const IID* riid, MA_PROPVARIANT* activationParams, ma_IActivateAudioInterfaceCompletionHandler* completionHandler, ma_IActivateAudioInterfaceAsyncOperation** activationOperation); #endif /* Avrt Functions */ typedef HANDLE (WINAPI * MA_PFN_AvSetMmThreadCharacteristicsA)(const char* TaskName, DWORD* TaskIndex); typedef BOOL (WINAPI * MA_PFN_AvRevertMmThreadCharacteristics)(HANDLE AvrtHandle); #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) typedef struct ma_completion_handler_uwp ma_completion_handler_uwp; typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_completion_handler_uwp* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_completion_handler_uwp* pThis); /* IActivateAudioInterfaceCompletionHandler */ HRESULT (STDMETHODCALLTYPE * ActivateCompleted)(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation); } ma_completion_handler_uwp_vtbl; struct ma_completion_handler_uwp { ma_completion_handler_uwp_vtbl* lpVtbl; MA_ATOMIC(4, ma_uint32) counter; HANDLE hEvent; }; static HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_QueryInterface(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject) { /* We need to "implement" IAgileObject which is just an indicator that's used internally by WASAPI for some multithreading management. To "implement" this, we just make sure we return pThis when the IAgileObject is requested. */ if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IActivateAudioInterfaceCompletionHandler) && !ma_is_guid_equal(riid, &MA_IID_IAgileObject)) { *ppObject = NULL; return E_NOINTERFACE; } /* Getting here means the IID is IUnknown or IMMNotificationClient. */ *ppObject = (void*)pThis; ((ma_completion_handler_uwp_vtbl*)pThis->lpVtbl)->AddRef(pThis); return S_OK; } static ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_AddRef(ma_completion_handler_uwp* pThis) { return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1; } static ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_Release(ma_completion_handler_uwp* pThis) { ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1; if (newRefCount == 0) { return 0; /* We don't free anything here because we never allocate the object on the heap. */ } return (ULONG)newRefCount; } static HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_ActivateCompleted(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation) { (void)pActivateOperation; SetEvent(pThis->hEvent); return S_OK; } static ma_completion_handler_uwp_vtbl g_maCompletionHandlerVtblInstance = { ma_completion_handler_uwp_QueryInterface, ma_completion_handler_uwp_AddRef, ma_completion_handler_uwp_Release, ma_completion_handler_uwp_ActivateCompleted }; static ma_result ma_completion_handler_uwp_init(ma_completion_handler_uwp* pHandler) { MA_ASSERT(pHandler != NULL); MA_ZERO_OBJECT(pHandler); pHandler->lpVtbl = &g_maCompletionHandlerVtblInstance; pHandler->counter = 1; pHandler->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL); if (pHandler->hEvent == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_completion_handler_uwp_uninit(ma_completion_handler_uwp* pHandler) { if (pHandler->hEvent != NULL) { CloseHandle(pHandler->hEvent); } } static void ma_completion_handler_uwp_wait(ma_completion_handler_uwp* pHandler) { WaitForSingleObject((HANDLE)pHandler->hEvent, INFINITE); } #endif /* !MA_WIN32_DESKTOP */ /* We need a virtual table for our notification client object that's used for detecting changes to the default device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_QueryInterface(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject) { /* We care about two interfaces - IUnknown and IMMNotificationClient. If the requested IID is something else we just return E_NOINTERFACE. Otherwise we need to increment the reference counter and return S_OK. */ if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IMMNotificationClient)) { *ppObject = NULL; return E_NOINTERFACE; } /* Getting here means the IID is IUnknown or IMMNotificationClient. */ *ppObject = (void*)pThis; ((ma_IMMNotificationClientVtbl*)pThis->lpVtbl)->AddRef(pThis); return S_OK; } static ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_AddRef(ma_IMMNotificationClient* pThis) { return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1; } static ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_Release(ma_IMMNotificationClient* pThis) { ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1; if (newRefCount == 0) { return 0; /* We don't free anything here because we never allocate the object on the heap. */ } return (ULONG)newRefCount; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceStateChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState) { ma_bool32 isThisDevice = MA_FALSE; ma_bool32 isCapture = MA_FALSE; ma_bool32 isPlayback = MA_FALSE; #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceStateChanged(pDeviceID=%S, dwNewState=%u)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)", (unsigned int)dwNewState);*/ #endif /* There have been reports of a hang when a playback device is disconnected. The idea with this code is to explicitly stop the device if we detect that the device is disabled or has been unplugged. */ if (pThis->pDevice->wasapi.allowCaptureAutoStreamRouting && (pThis->pDevice->type == ma_device_type_capture || pThis->pDevice->type == ma_device_type_duplex || pThis->pDevice->type == ma_device_type_loopback)) { isCapture = MA_TRUE; if (ma_strcmp_WCHAR(pThis->pDevice->capture.id.wasapi, pDeviceID) == 0) { isThisDevice = MA_TRUE; } } if (pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting && (pThis->pDevice->type == ma_device_type_playback || pThis->pDevice->type == ma_device_type_duplex)) { isPlayback = MA_TRUE; if (ma_strcmp_WCHAR(pThis->pDevice->playback.id.wasapi, pDeviceID) == 0) { isThisDevice = MA_TRUE; } } /* If the device ID matches our device we need to mark our device as detached and stop it. When a device is added in OnDeviceAdded(), we'll restart it. We only mark it as detached if the device was started at the time of being removed. */ if (isThisDevice) { if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) == 0) { /* Unplugged or otherwise unavailable. Mark as detached if we were in a playing state. We'll use this to determine whether or not we need to automatically start the device when it's plugged back in again. */ if (ma_device_get_state(pThis->pDevice) == ma_device_state_started) { if (isPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_TRUE; } if (isCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_TRUE; } ma_device_stop(pThis->pDevice); } } if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) != 0) { /* The device was activated. If we were detached, we need to start it again. */ ma_bool8 tryRestartingDevice = MA_FALSE; if (isPlayback) { if (pThis->pDevice->wasapi.isDetachedPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE; ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback); tryRestartingDevice = MA_TRUE; } } if (isCapture) { if (pThis->pDevice->wasapi.isDetachedCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE; ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture); tryRestartingDevice = MA_TRUE; } } if (tryRestartingDevice) { if (pThis->pDevice->wasapi.isDetachedPlayback == MA_FALSE && pThis->pDevice->wasapi.isDetachedCapture == MA_FALSE) { ma_device_start(pThis->pDevice); } } } } return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceAdded(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceAdded(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif /* We don't need to worry about this event for our purposes. */ (void)pThis; (void)pDeviceID; return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceRemoved(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceRemoved(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif /* We don't need to worry about this event for our purposes. */ (void)pThis; (void)pDeviceID; return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDefaultDeviceChanged(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDefaultDeviceChanged(dataFlow=%d, role=%d, pDefaultDeviceID=%S)\n", dataFlow, role, (pDefaultDeviceID != NULL) ? pDefaultDeviceID : L"(NULL)");*/ #endif (void)role; /* We only care about devices with the same data flow as the current device. */ if ((pThis->pDevice->type == ma_device_type_playback && dataFlow != ma_eRender) || (pThis->pDevice->type == ma_device_type_capture && dataFlow != ma_eCapture) || (pThis->pDevice->type == ma_device_type_loopback && dataFlow != ma_eRender)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because dataFlow does match device type.\n"); return S_OK; } /* We need to consider dataFlow as ma_eCapture if device is ma_device_type_loopback */ if (pThis->pDevice->type == ma_device_type_loopback) { dataFlow = ma_eCapture; } /* Don't do automatic stream routing if we're not allowed. */ if ((dataFlow == ma_eRender && pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting == MA_FALSE) || (dataFlow == ma_eCapture && pThis->pDevice->wasapi.allowCaptureAutoStreamRouting == MA_FALSE)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because automatic stream routing has been disabled by the device config.\n"); return S_OK; } /* Not currently supporting automatic stream routing in exclusive mode. This is not working correctly on my machine due to AUDCLNT_E_DEVICE_IN_USE errors when reinitializing the device. If this is a bug in miniaudio, we can try re-enabling this once it's fixed. */ if ((dataFlow == ma_eRender && pThis->pDevice->playback.shareMode == ma_share_mode_exclusive) || (dataFlow == ma_eCapture && pThis->pDevice->capture.shareMode == ma_share_mode_exclusive)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because the device shared mode is exclusive.\n"); return S_OK; } /* Second attempt at device rerouting. We're going to retrieve the device's state at the time of the route change. We're then going to stop the device, reinitialize the device, and then start it again if the state before stopping was ma_device_state_started. */ { ma_uint32 previousState = ma_device_get_state(pThis->pDevice); ma_bool8 restartDevice = MA_FALSE; if (previousState == ma_device_state_uninitialized || previousState == ma_device_state_starting) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because the device is in the process of starting.\n"); return S_OK; } if (previousState == ma_device_state_started) { ma_device_stop(pThis->pDevice); restartDevice = MA_TRUE; } if (pDefaultDeviceID != NULL) { /* <-- The input device ID will be null if there's no other device available. */ ma_mutex_lock(&pThis->pDevice->wasapi.rerouteLock); { if (dataFlow == ma_eRender) { ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback); if (pThis->pDevice->wasapi.isDetachedPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE; if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedCapture) { restartDevice = MA_FALSE; /* It's a duplex device and the capture side is detached. We cannot be restarting the device just yet. */ } else { restartDevice = MA_TRUE; /* It's not a duplex device, or the capture side is also attached so we can go ahead and restart the device. */ } } } else { ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture); if (pThis->pDevice->wasapi.isDetachedCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE; if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedPlayback) { restartDevice = MA_FALSE; /* It's a duplex device and the playback side is detached. We cannot be restarting the device just yet. */ } else { restartDevice = MA_TRUE; /* It's not a duplex device, or the playback side is also attached so we can go ahead and restart the device. */ } } } } ma_mutex_unlock(&pThis->pDevice->wasapi.rerouteLock); if (restartDevice) { ma_device_start(pThis->pDevice); } } } return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnPropertyValueChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnPropertyValueChanged(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif (void)pThis; (void)pDeviceID; (void)key; return S_OK; } static ma_IMMNotificationClientVtbl g_maNotificationCientVtbl = { ma_IMMNotificationClient_QueryInterface, ma_IMMNotificationClient_AddRef, ma_IMMNotificationClient_Release, ma_IMMNotificationClient_OnDeviceStateChanged, ma_IMMNotificationClient_OnDeviceAdded, ma_IMMNotificationClient_OnDeviceRemoved, ma_IMMNotificationClient_OnDefaultDeviceChanged, ma_IMMNotificationClient_OnPropertyValueChanged }; #endif /* MA_WIN32_DESKTOP */ static const char* ma_to_usage_string__wasapi(ma_wasapi_usage usage) { switch (usage) { case ma_wasapi_usage_default: return NULL; case ma_wasapi_usage_games: return "Games"; case ma_wasapi_usage_pro_audio: return "Pro Audio"; default: break; } return NULL; } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) typedef ma_IMMDevice ma_WASAPIDeviceInterface; #else typedef ma_IUnknown ma_WASAPIDeviceInterface; #endif #define MA_CONTEXT_COMMAND_QUIT__WASAPI 1 #define MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI 2 #define MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI 3 static ma_context_command__wasapi ma_context_init_command__wasapi(int code) { ma_context_command__wasapi cmd; MA_ZERO_OBJECT(&cmd); cmd.code = code; return cmd; } static ma_result ma_context_post_command__wasapi(ma_context* pContext, const ma_context_command__wasapi* pCmd) { /* For now we are doing everything synchronously, but I might relax this later if the need arises. */ ma_result result; ma_bool32 isUsingLocalEvent = MA_FALSE; ma_event localEvent; MA_ASSERT(pContext != NULL); MA_ASSERT(pCmd != NULL); if (pCmd->pEvent == NULL) { isUsingLocalEvent = MA_TRUE; result = ma_event_init(&localEvent); if (result != MA_SUCCESS) { return result; /* Failed to create the event for this command. */ } } /* Here is where we add the command to the list. If there's not enough room we'll spin until there is. */ ma_mutex_lock(&pContext->wasapi.commandLock); { ma_uint32 index; /* Spin until we've got some space available. */ while (pContext->wasapi.commandCount == ma_countof(pContext->wasapi.commands)) { ma_yield(); } /* Space is now available. Can safely add to the list. */ index = (pContext->wasapi.commandIndex + pContext->wasapi.commandCount) % ma_countof(pContext->wasapi.commands); pContext->wasapi.commands[index] = *pCmd; pContext->wasapi.commands[index].pEvent = &localEvent; pContext->wasapi.commandCount += 1; /* Now that the command has been added, release the semaphore so ma_context_next_command__wasapi() can return. */ ma_semaphore_release(&pContext->wasapi.commandSem); } ma_mutex_unlock(&pContext->wasapi.commandLock); if (isUsingLocalEvent) { ma_event_wait(&localEvent); ma_event_uninit(&localEvent); } return MA_SUCCESS; } static ma_result ma_context_next_command__wasapi(ma_context* pContext, ma_context_command__wasapi* pCmd) { ma_result result = MA_SUCCESS; MA_ASSERT(pContext != NULL); MA_ASSERT(pCmd != NULL); result = ma_semaphore_wait(&pContext->wasapi.commandSem); if (result == MA_SUCCESS) { ma_mutex_lock(&pContext->wasapi.commandLock); { *pCmd = pContext->wasapi.commands[pContext->wasapi.commandIndex]; pContext->wasapi.commandIndex = (pContext->wasapi.commandIndex + 1) % ma_countof(pContext->wasapi.commands); pContext->wasapi.commandCount -= 1; } ma_mutex_unlock(&pContext->wasapi.commandLock); } return result; } static ma_thread_result MA_THREADCALL ma_context_command_thread__wasapi(void* pUserData) { ma_result result; ma_context* pContext = (ma_context*)pUserData; MA_ASSERT(pContext != NULL); for (;;) { ma_context_command__wasapi cmd; result = ma_context_next_command__wasapi(pContext, &cmd); if (result != MA_SUCCESS) { break; } switch (cmd.code) { case MA_CONTEXT_COMMAND_QUIT__WASAPI: { /* Do nothing. Handled after the switch. */ } break; case MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI: { if (cmd.data.createAudioClient.deviceType == ma_device_type_playback) { *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioRenderClient, cmd.data.createAudioClient.ppAudioClientService)); } else { *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioCaptureClient, cmd.data.createAudioClient.ppAudioClientService)); } } break; case MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI: { if (cmd.data.releaseAudioClient.deviceType == ma_device_type_playback) { if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback); cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback = NULL; } } if (cmd.data.releaseAudioClient.deviceType == ma_device_type_capture) { if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture); cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture = NULL; } } } break; default: { /* Unknown command. Ignore it, but trigger an assert in debug mode so we're aware of it. */ MA_ASSERT(MA_FALSE); } break; } if (cmd.pEvent != NULL) { ma_event_signal(cmd.pEvent); } if (cmd.code == MA_CONTEXT_COMMAND_QUIT__WASAPI) { break; /* Received a quit message. Get out of here. */ } } return (ma_thread_result)0; } static ma_result ma_device_create_IAudioClient_service__wasapi(ma_context* pContext, ma_device_type deviceType, ma_IAudioClient* pAudioClient, void** ppAudioClientService) { ma_result result; ma_result cmdResult; ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI); cmd.data.createAudioClient.deviceType = deviceType; cmd.data.createAudioClient.pAudioClient = (void*)pAudioClient; cmd.data.createAudioClient.ppAudioClientService = ppAudioClientService; cmd.data.createAudioClient.pResult = &cmdResult; /* Declared locally, but won't be dereferenced after this function returns since execution of the command will wait here. */ result = ma_context_post_command__wasapi(pContext, &cmd); /* This will not return until the command has actually been run. */ if (result != MA_SUCCESS) { return result; } return *cmd.data.createAudioClient.pResult; } #if 0 /* Not used at the moment, but leaving here for future use. */ static ma_result ma_device_release_IAudioClient_service__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_result result; ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI); cmd.data.releaseAudioClient.pDevice = pDevice; cmd.data.releaseAudioClient.deviceType = deviceType; result = ma_context_post_command__wasapi(pDevice->pContext, &cmd); /* This will not return until the command has actually been run. */ if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } #endif static void ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF, ma_share_mode shareMode, ma_device_info* pInfo) { MA_ASSERT(pWF != NULL); MA_ASSERT(pInfo != NULL); if (pInfo->nativeDataFormatCount >= ma_countof(pInfo->nativeDataFormats)) { return; /* Too many data formats. Need to ignore this one. Don't think this should ever happen with WASAPI. */ } pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].format = ma_format_from_WAVEFORMATEX(pWF); pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].channels = pWF->nChannels; pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].sampleRate = pWF->nSamplesPerSec; pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].flags = (shareMode == ma_share_mode_exclusive) ? MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE : 0; pInfo->nativeDataFormatCount += 1; } static ma_result ma_context_get_device_info_from_IAudioClient__wasapi(ma_context* pContext, /*ma_IMMDevice**/void* pMMDevice, ma_IAudioClient* pAudioClient, ma_device_info* pInfo) { HRESULT hr; MA_WAVEFORMATEX* pWF = NULL; MA_ASSERT(pAudioClient != NULL); MA_ASSERT(pInfo != NULL); /* Shared Mode. We use GetMixFormat() here. */ hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pAudioClient, (MA_WAVEFORMATEX**)&pWF); if (SUCCEEDED(hr)) { ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_shared, pInfo); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve mix format for device info retrieval."); return ma_result_from_HRESULT(hr); } /* Exclusive Mode. We repeatedly call IsFormatSupported() here. This is not currently supported on UWP. Failure to retrieve the exclusive mode format is not considered an error, so from here on out, MA_SUCCESS is guaranteed to be returned. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { ma_IPropertyStore *pProperties; /* The first thing to do is get the format from PKEY_AudioEngine_DeviceFormat. This should give us a channel count we assume is correct which will simplify our searching. */ hr = ma_IMMDevice_OpenPropertyStore((ma_IMMDevice*)pMMDevice, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT var; ma_PropVariantInit(&var); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_AudioEngine_DeviceFormat, &var); if (SUCCEEDED(hr)) { pWF = (MA_WAVEFORMATEX*)var.blob.pBlobData; /* In my testing, the format returned by PKEY_AudioEngine_DeviceFormat is suitable for exclusive mode so we check this format first. If this fails, fall back to a search. */ hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pWF, NULL); if (SUCCEEDED(hr)) { /* The format returned by PKEY_AudioEngine_DeviceFormat is supported. */ ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_exclusive, pInfo); } else { /* The format returned by PKEY_AudioEngine_DeviceFormat is not supported, so fall back to a search. We assume the channel count returned by MA_PKEY_AudioEngine_DeviceFormat is valid and correct. For simplicity we're only returning one format. */ ma_uint32 channels = pWF->nChannels; ma_channel defaultChannelMap[MA_MAX_CHANNELS]; MA_WAVEFORMATEXTENSIBLE wf; ma_bool32 found; ma_uint32 iFormat; /* Make sure we don't overflow the channel map. */ if (channels > MA_MAX_CHANNELS) { channels = MA_MAX_CHANNELS; } ma_channel_map_init_standard(ma_standard_channel_map_microsoft, defaultChannelMap, ma_countof(defaultChannelMap), channels); MA_ZERO_OBJECT(&wf); wf.cbSize = sizeof(wf); wf.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wf.nChannels = (WORD)channels; wf.dwChannelMask = ma_channel_map_to_channel_mask__win32(defaultChannelMap, channels); found = MA_FALSE; for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) { ma_format format = g_maFormatPriorities[iFormat]; ma_uint32 iSampleRate; wf.wBitsPerSample = (WORD)(ma_get_bytes_per_sample(format)*8); wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; wf.Samples.wValidBitsPerSample = /*(format == ma_format_s24_32) ? 24 :*/ wf.wBitsPerSample; if (format == ma_format_f32) { wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; } else { wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; } for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iSampleRate) { wf.nSamplesPerSec = g_maStandardSampleRatePriorities[iSampleRate]; hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, (MA_WAVEFORMATEX*)&wf, NULL); if (SUCCEEDED(hr)) { ma_add_native_data_format_to_device_info_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf, ma_share_mode_exclusive, pInfo); found = MA_TRUE; break; } } if (found) { break; } } ma_PropVariantClear(pContext, &var); if (!found) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to find suitable device format for device info retrieval."); } } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to retrieve device format for device info retrieval."); } ma_IPropertyStore_Release(pProperties); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to open property store for device info retrieval."); } } #else { (void)pMMDevice; /* Unused. */ } #endif return MA_SUCCESS; } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) static ma_EDataFlow ma_device_type_to_EDataFlow(ma_device_type deviceType) { if (deviceType == ma_device_type_playback) { return ma_eRender; } else if (deviceType == ma_device_type_capture) { return ma_eCapture; } else { MA_ASSERT(MA_FALSE); return ma_eRender; /* Should never hit this. */ } } static ma_result ma_context_create_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator** ppDeviceEnumerator) { HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDeviceEnumerator != NULL); *ppDeviceEnumerator = NULL; /* Safety. */ hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } *ppDeviceEnumerator = pDeviceEnumerator; return MA_SUCCESS; } static WCHAR* ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType) { HRESULT hr; ma_IMMDevice* pMMDefaultDevice = NULL; WCHAR* pDefaultDeviceID = NULL; ma_EDataFlow dataFlow; ma_ERole role; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceEnumerator != NULL); (void)pContext; /* Grab the EDataFlow type from the device type. */ dataFlow = ma_device_type_to_EDataFlow(deviceType); /* The role is always eConsole, but we may make this configurable later. */ role = ma_eConsole; hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, dataFlow, role, &pMMDefaultDevice); if (FAILED(hr)) { return NULL; } hr = ma_IMMDevice_GetId(pMMDefaultDevice, &pDefaultDeviceID); ma_IMMDevice_Release(pMMDefaultDevice); pMMDefaultDevice = NULL; if (FAILED(hr)) { return NULL; } return pDefaultDeviceID; } static WCHAR* ma_context_get_default_device_id__wasapi(ma_context* pContext, ma_device_type deviceType) /* Free the returned pointer with ma_CoTaskMemFree() */ { ma_result result; ma_IMMDeviceEnumerator* pDeviceEnumerator; WCHAR* pDefaultDeviceID = NULL; MA_ASSERT(pContext != NULL); result = ma_context_create_IMMDeviceEnumerator__wasapi(pContext, &pDeviceEnumerator); if (result != MA_SUCCESS) { return NULL; } pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType); ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); return pDefaultDeviceID; } static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_IMMDevice** ppMMDevice) { ma_IMMDeviceEnumerator* pDeviceEnumerator; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppMMDevice != NULL); /* This weird COM init/uninit here is a hack to work around a crash when changing devices. What is happening is WASAPI fires a callback from another thread when the device is changed. It's from that thread where this function is getting called. What I'm suspecting is that the other thread is not initializing COM which in turn results in CoCreateInstance() failing. The community has reported that this seems to fix the crash. There are future plans to move all WASAPI operation over to a single thread to make everything safer, but in the meantime while we wait for that to come online I'm happy enough to use this hack instead. */ ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE); { hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); } ma_CoUninitialize(pContext); if (FAILED(hr)) { /* <-- This is checking the call above to ma_CoCreateInstance(). */ ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n"); return ma_result_from_HRESULT(hr); } if (pDeviceID == NULL) { hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, (deviceType == ma_device_type_capture) ? ma_eCapture : ma_eRender, ma_eConsole, ppMMDevice); } else { hr = ma_IMMDeviceEnumerator_GetDevice(pDeviceEnumerator, pDeviceID->wasapi, ppMMDevice); } ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve IMMDevice.\n"); return ma_result_from_HRESULT(hr); } return MA_SUCCESS; } static ma_result ma_context_get_device_id_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, ma_device_id* pDeviceID) { WCHAR* pDeviceIDString; HRESULT hr; MA_ASSERT(pDeviceID != NULL); hr = ma_IMMDevice_GetId(pMMDevice, &pDeviceIDString); if (SUCCEEDED(hr)) { size_t idlen = ma_strlen_WCHAR(pDeviceIDString); if (idlen+1 > ma_countof(pDeviceID->wasapi)) { ma_CoTaskMemFree(pContext, pDeviceIDString); MA_ASSERT(MA_FALSE); /* NOTE: If this is triggered, please report it. It means the format of the ID must have changed and is too long to fit in our fixed sized buffer. */ return MA_ERROR; } MA_COPY_MEMORY(pDeviceID->wasapi, pDeviceIDString, idlen * sizeof(wchar_t)); pDeviceID->wasapi[idlen] = '\0'; ma_CoTaskMemFree(pContext, pDeviceIDString); return MA_SUCCESS; } return MA_ERROR; } static ma_result ma_context_get_device_info_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, WCHAR* pDefaultDeviceID, ma_bool32 onlySimpleInfo, ma_device_info* pInfo) { ma_result result; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(pMMDevice != NULL); MA_ASSERT(pInfo != NULL); /* ID. */ result = ma_context_get_device_id_from_MMDevice__wasapi(pContext, pMMDevice, &pInfo->id); if (result == MA_SUCCESS) { if (pDefaultDeviceID != NULL) { if (ma_strcmp_WCHAR(pInfo->id.wasapi, pDefaultDeviceID) == 0) { pInfo->isDefault = MA_TRUE; } } } /* Description / Friendly Name */ { ma_IPropertyStore *pProperties; hr = ma_IMMDevice_OpenPropertyStore(pMMDevice, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT var; ma_PropVariantInit(&var); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &var); if (SUCCEEDED(hr)) { WideCharToMultiByte(CP_UTF8, 0, var.pwszVal, -1, pInfo->name, sizeof(pInfo->name), 0, FALSE); ma_PropVariantClear(pContext, &var); } ma_IPropertyStore_Release(pProperties); } } /* Format */ if (!onlySimpleInfo) { ma_IAudioClient* pAudioClient; hr = ma_IMMDevice_Activate(pMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pAudioClient); if (SUCCEEDED(hr)) { result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, pMMDevice, pAudioClient, pInfo); ma_IAudioClient_Release(pAudioClient); return result; } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to activate audio client for device info retrieval."); return ma_result_from_HRESULT(hr); } } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices_by_type__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result = MA_SUCCESS; UINT deviceCount; HRESULT hr; ma_uint32 iDevice; WCHAR* pDefaultDeviceID = NULL; ma_IMMDeviceCollection* pDeviceCollection = NULL; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Grab the default device. We use this to know whether or not flag the returned device info as being the default. */ pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType); /* We need to enumerate the devices which returns a device collection. */ hr = ma_IMMDeviceEnumerator_EnumAudioEndpoints(pDeviceEnumerator, ma_device_type_to_EDataFlow(deviceType), MA_MM_DEVICE_STATE_ACTIVE, &pDeviceCollection); if (SUCCEEDED(hr)) { hr = ma_IMMDeviceCollection_GetCount(pDeviceCollection, &deviceCount); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to get device count.\n"); result = ma_result_from_HRESULT(hr); goto done; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; ma_IMMDevice* pMMDevice; MA_ZERO_OBJECT(&deviceInfo); hr = ma_IMMDeviceCollection_Item(pDeviceCollection, iDevice, &pMMDevice); if (SUCCEEDED(hr)) { result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_TRUE, &deviceInfo); /* MA_TRUE = onlySimpleInfo. */ ma_IMMDevice_Release(pMMDevice); if (result == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, deviceType, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { break; } } } } } done: if (pDefaultDeviceID != NULL) { ma_CoTaskMemFree(pContext, pDefaultDeviceID); pDefaultDeviceID = NULL; } if (pDeviceCollection != NULL) { ma_IMMDeviceCollection_Release(pDeviceCollection); pDeviceCollection = NULL; } return result; } static ma_result ma_context_get_IAudioClient_Desktop__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IMMDevice** ppMMDevice) { ma_result result; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppAudioClient != NULL); MA_ASSERT(ppMMDevice != NULL); result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, ppMMDevice); if (result != MA_SUCCESS) { return result; } hr = ma_IMMDevice_Activate(*ppMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, pActivationParams, (void**)ppAudioClient); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } return MA_SUCCESS; } #else static ma_result ma_context_get_IAudioClient_UWP__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IUnknown** ppActivatedInterface) { ma_IActivateAudioInterfaceAsyncOperation *pAsyncOp = NULL; ma_completion_handler_uwp completionHandler; IID iid; WCHAR* iidStr; HRESULT hr; ma_result result; HRESULT activateResult; ma_IUnknown* pActivatedInterface; MA_ASSERT(pContext != NULL); MA_ASSERT(ppAudioClient != NULL); if (pDeviceID != NULL) { iidStr = (WCHAR*)pDeviceID->wasapi; } else { if (deviceType == ma_device_type_capture) { iid = MA_IID_DEVINTERFACE_AUDIO_CAPTURE; } else { iid = MA_IID_DEVINTERFACE_AUDIO_RENDER; } #if defined(__cplusplus) hr = StringFromIID(iid, &iidStr); #else hr = StringFromIID(&iid, &iidStr); #endif if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to convert device IID to string for ActivateAudioInterfaceAsync(). Out of memory.\n"); return ma_result_from_HRESULT(hr); } } result = ma_completion_handler_uwp_init(&completionHandler); if (result != MA_SUCCESS) { ma_CoTaskMemFree(pContext, iidStr); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for waiting for ActivateAudioInterfaceAsync().\n"); return result; } hr = ((MA_PFN_ActivateAudioInterfaceAsync)pContext->wasapi.ActivateAudioInterfaceAsync)(iidStr, &MA_IID_IAudioClient, pActivationParams, (ma_IActivateAudioInterfaceCompletionHandler*)&completionHandler, (ma_IActivateAudioInterfaceAsyncOperation**)&pAsyncOp); if (FAILED(hr)) { ma_completion_handler_uwp_uninit(&completionHandler); ma_CoTaskMemFree(pContext, iidStr); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] ActivateAudioInterfaceAsync() failed.\n"); return ma_result_from_HRESULT(hr); } if (pDeviceID == NULL) { ma_CoTaskMemFree(pContext, iidStr); } /* Wait for the async operation for finish. */ ma_completion_handler_uwp_wait(&completionHandler); ma_completion_handler_uwp_uninit(&completionHandler); hr = ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(pAsyncOp, &activateResult, &pActivatedInterface); ma_IActivateAudioInterfaceAsyncOperation_Release(pAsyncOp); if (FAILED(hr) || FAILED(activateResult)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to activate device.\n"); return FAILED(hr) ? ma_result_from_HRESULT(hr) : ma_result_from_HRESULT(activateResult); } /* Here is where we grab the IAudioClient interface. */ hr = ma_IUnknown_QueryInterface(pActivatedInterface, &MA_IID_IAudioClient, (void**)ppAudioClient); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to query IAudioClient interface.\n"); return ma_result_from_HRESULT(hr); } if (ppActivatedInterface) { *ppActivatedInterface = pActivatedInterface; } else { ma_IUnknown_Release(pActivatedInterface); } return MA_SUCCESS; } #endif /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-audioclient_activation_type */ typedef enum { MA_AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT, MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK } MA_AUDIOCLIENT_ACTIVATION_TYPE; /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-process_loopback_mode */ typedef enum { MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE, MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE } MA_PROCESS_LOOPBACK_MODE; /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_process_loopback_params */ typedef struct { DWORD TargetProcessId; MA_PROCESS_LOOPBACK_MODE ProcessLoopbackMode; } MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params */ typedef struct { MA_AUDIOCLIENT_ACTIVATION_TYPE ActivationType; union { MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams; }; } MA_AUDIOCLIENT_ACTIVATION_PARAMS; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop #endif #define MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK L"VAD\\Process_Loopback" static ma_result ma_context_get_IAudioClient__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_uint32 loopbackProcessID, ma_bool32 loopbackProcessExclude, ma_IAudioClient** ppAudioClient, ma_WASAPIDeviceInterface** ppDeviceInterface) { ma_result result; ma_bool32 usingProcessLoopback = MA_FALSE; MA_AUDIOCLIENT_ACTIVATION_PARAMS audioclientActivationParams; MA_PROPVARIANT activationParams; MA_PROPVARIANT* pActivationParams = NULL; ma_device_id virtualDeviceID; /* Activation parameters specific to loopback mode. Note that process-specific loopback will only work when a default device ID is specified. */ if (deviceType == ma_device_type_loopback && loopbackProcessID != 0 && pDeviceID == NULL) { usingProcessLoopback = MA_TRUE; } if (usingProcessLoopback) { MA_ZERO_OBJECT(&audioclientActivationParams); audioclientActivationParams.ActivationType = MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK; audioclientActivationParams.ProcessLoopbackParams.ProcessLoopbackMode = (loopbackProcessExclude) ? MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE : MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE; audioclientActivationParams.ProcessLoopbackParams.TargetProcessId = (DWORD)loopbackProcessID; ma_PropVariantInit(&activationParams); activationParams.vt = MA_VT_BLOB; activationParams.blob.cbSize = sizeof(audioclientActivationParams); activationParams.blob.pBlobData = (BYTE*)&audioclientActivationParams; pActivationParams = &activationParams; /* When requesting a specific device ID we need to use a special device ID. */ MA_COPY_MEMORY(virtualDeviceID.wasapi, MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK, (wcslen(MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK) + 1) * sizeof(wchar_t)); /* +1 for the null terminator. */ pDeviceID = &virtualDeviceID; } else { pActivationParams = NULL; /* No activation parameters required. */ } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) result = ma_context_get_IAudioClient_Desktop__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface); #else result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface); #endif /* If loopback mode was requested with a process ID and initialization failed, it could be because it's trying to run on an older version of Windows where it's not supported. We need to let the caller know about this with a log message. */ if (result != MA_SUCCESS) { if (usingProcessLoopback) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Loopback mode requested to %s process ID %u, but initialization failed. Support for this feature begins with Windows 10 Build 20348. Confirm your version of Windows or consider not using process-specific loopback.\n", (loopbackProcessExclude) ? "exclude" : "include", loopbackProcessID); } } return result; } static ma_result ma_context_enumerate_devices__wasapi(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { /* Different enumeration for desktop and UWP. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* Desktop */ HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_playback, callback, pUserData); ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_capture, callback, pUserData); ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); #else /* UWP The MMDevice API is only supported on desktop applications. For now, while I'm still figuring out how to properly enumerate over devices without using MMDevice, I'm restricting devices to defaults. Hint: DeviceInformation::FindAllAsync() with DeviceClass.AudioCapture/AudioRender. https://blogs.windows.com/buildingapps/2014/05/15/real-time-audio-in-windows-store-and-windows-phone-apps/ */ if (callback) { ma_bool32 cbResult = MA_TRUE; /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } #endif return MA_SUCCESS; } static ma_result ma_context_get_device_info__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) ma_result result; ma_IMMDevice* pMMDevice = NULL; WCHAR* pDefaultDeviceID = NULL; result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, &pMMDevice); if (result != MA_SUCCESS) { return result; } /* We need the default device ID so we can set the isDefault flag in the device info. */ pDefaultDeviceID = ma_context_get_default_device_id__wasapi(pContext, deviceType); result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_FALSE, pDeviceInfo); /* MA_FALSE = !onlySimpleInfo. */ if (pDefaultDeviceID != NULL) { ma_CoTaskMemFree(pContext, pDefaultDeviceID); pDefaultDeviceID = NULL; } ma_IMMDevice_Release(pMMDevice); return result; #else ma_IAudioClient* pAudioClient; ma_result result; /* UWP currently only uses default devices. */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, NULL, &pAudioClient, NULL); if (result != MA_SUCCESS) { return result; } result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, NULL, pAudioClient, pDeviceInfo); pDeviceInfo->isDefault = MA_TRUE; /* UWP only supports default devices. */ ma_IAudioClient_Release(pAudioClient); return result; #endif } static ma_result ma_device_uninit__wasapi(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { if (pDevice->wasapi.pDeviceEnumerator) { ((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator)->lpVtbl->UnregisterEndpointNotificationCallback((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator, &pDevice->wasapi.notificationClient); ma_IMMDeviceEnumerator_Release((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator); } ma_mutex_uninit(&pDevice->wasapi.rerouteLock); } #endif if (pDevice->wasapi.pRenderClient) { if (pDevice->wasapi.pMappedBufferPlayback != NULL) { ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; } ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); } if (pDevice->wasapi.pCaptureClient) { if (pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); } if (pDevice->wasapi.pAudioClientPlayback) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); } if (pDevice->wasapi.pAudioClientCapture) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); } if (pDevice->wasapi.hEventPlayback) { CloseHandle((HANDLE)pDevice->wasapi.hEventPlayback); } if (pDevice->wasapi.hEventCapture) { CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); } return MA_SUCCESS; } typedef struct { /* Input. */ ma_format formatIn; ma_uint32 channelsIn; ma_uint32 sampleRateIn; ma_channel channelMapIn[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesIn; ma_uint32 periodSizeInMillisecondsIn; ma_uint32 periodsIn; ma_share_mode shareMode; ma_performance_profile performanceProfile; ma_bool32 noAutoConvertSRC; ma_bool32 noDefaultQualitySRC; ma_bool32 noHardwareOffloading; ma_uint32 loopbackProcessID; ma_bool32 loopbackProcessExclude; /* Output. */ ma_IAudioClient* pAudioClient; ma_IAudioRenderClient* pRenderClient; ma_IAudioCaptureClient* pCaptureClient; ma_format formatOut; ma_uint32 channelsOut; ma_uint32 sampleRateOut; ma_channel channelMapOut[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesOut; ma_uint32 periodsOut; ma_bool32 usingAudioClient3; char deviceName[256]; ma_device_id id; } ma_device_init_internal_data__wasapi; static ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__wasapi* pData) { HRESULT hr; ma_result result = MA_SUCCESS; const char* errorMsg = ""; MA_AUDCLNT_SHAREMODE shareMode = MA_AUDCLNT_SHAREMODE_SHARED; DWORD streamFlags = 0; MA_REFERENCE_TIME periodDurationInMicroseconds; ma_bool32 wasInitializedUsingIAudioClient3 = MA_FALSE; MA_WAVEFORMATEXTENSIBLE wf; ma_WASAPIDeviceInterface* pDeviceInterface = NULL; ma_IAudioClient2* pAudioClient2; ma_uint32 nativeSampleRate; ma_bool32 usingProcessLoopback = MA_FALSE; MA_ASSERT(pContext != NULL); MA_ASSERT(pData != NULL); /* This function is only used to initialize one device type: either playback, capture or loopback. Never full-duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } usingProcessLoopback = deviceType == ma_device_type_loopback && pData->loopbackProcessID != 0 && pDeviceID == NULL; pData->pAudioClient = NULL; pData->pRenderClient = NULL; pData->pCaptureClient = NULL; streamFlags = MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK; if (!pData->noAutoConvertSRC && pData->sampleRateIn != 0 && pData->shareMode != ma_share_mode_exclusive) { /* <-- Exclusive streams must use the native sample rate. */ streamFlags |= MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM; } if (!pData->noDefaultQualitySRC && pData->sampleRateIn != 0 && (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) != 0) { streamFlags |= MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY; } if (deviceType == ma_device_type_loopback) { streamFlags |= MA_AUDCLNT_STREAMFLAGS_LOOPBACK; } result = ma_context_get_IAudioClient__wasapi(pContext, deviceType, pDeviceID, pData->loopbackProcessID, pData->loopbackProcessExclude, &pData->pAudioClient, &pDeviceInterface); if (result != MA_SUCCESS) { goto done; } MA_ZERO_OBJECT(&wf); /* Try enabling hardware offloading. */ if (!pData->noHardwareOffloading) { hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient2, (void**)&pAudioClient2); if (SUCCEEDED(hr)) { BOOL isHardwareOffloadingSupported = 0; hr = ma_IAudioClient2_IsOffloadCapable(pAudioClient2, MA_AudioCategory_Other, &isHardwareOffloadingSupported); if (SUCCEEDED(hr) && isHardwareOffloadingSupported) { ma_AudioClientProperties clientProperties; MA_ZERO_OBJECT(&clientProperties); clientProperties.cbSize = sizeof(clientProperties); clientProperties.bIsOffload = 1; clientProperties.eCategory = MA_AudioCategory_Other; ma_IAudioClient2_SetClientProperties(pAudioClient2, &clientProperties); } pAudioClient2->lpVtbl->Release(pAudioClient2); } } /* Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode. */ result = MA_FORMAT_NOT_SUPPORTED; if (pData->shareMode == ma_share_mode_exclusive) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* In exclusive mode on desktop we always use the backend's native format. */ ma_IPropertyStore* pStore = NULL; hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pStore); if (SUCCEEDED(hr)) { MA_PROPVARIANT prop; ma_PropVariantInit(&prop); hr = ma_IPropertyStore_GetValue(pStore, &MA_PKEY_AudioEngine_DeviceFormat, &prop); if (SUCCEEDED(hr)) { MA_WAVEFORMATEX* pActualFormat = (MA_WAVEFORMATEX*)prop.blob.pBlobData; hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pData->pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pActualFormat, NULL); if (SUCCEEDED(hr)) { MA_COPY_MEMORY(&wf, pActualFormat, sizeof(MA_WAVEFORMATEXTENSIBLE)); } ma_PropVariantClear(pContext, &prop); } ma_IPropertyStore_Release(pStore); } #else /* I do not know how to query the device's native format on UWP so for now I'm just disabling support for exclusive mode. The alternative is to enumerate over different formats and check IsFormatSupported() until you find one that works. TODO: Add support for exclusive mode to UWP. */ hr = S_FALSE; #endif if (hr == S_OK) { shareMode = MA_AUDCLNT_SHAREMODE_EXCLUSIVE; result = MA_SUCCESS; } else { result = MA_SHARE_MODE_NOT_SUPPORTED; } } else { /* In shared mode we are always using the format reported by the operating system. */ MA_WAVEFORMATEXTENSIBLE* pNativeFormat = NULL; hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pData->pAudioClient, (MA_WAVEFORMATEX**)&pNativeFormat); if (hr != S_OK) { /* When using process-specific loopback, GetMixFormat() seems to always fail. */ if (usingProcessLoopback) { wf.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; wf.nChannels = 2; wf.nSamplesPerSec = 44100; wf.wBitsPerSample = 32; wf.nBlockAlign = wf.nChannels * wf.wBitsPerSample / 8; wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; wf.cbSize = sizeof(MA_WAVEFORMATEX); result = MA_SUCCESS; } else { result = MA_FORMAT_NOT_SUPPORTED; } } else { /* I've seen cases where cbSize will be set to sizeof(WAVEFORMATEX) even though the structure itself is given the format tag of WAVE_FORMAT_EXTENSIBLE. If the format tag is WAVE_FORMAT_EXTENSIBLE want to make sure we copy the whole WAVEFORMATEXTENSIBLE structure. Otherwise we'll have to be safe and only copy the WAVEFORMATEX part. */ if (pNativeFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { MA_COPY_MEMORY(&wf, pNativeFormat, sizeof(MA_WAVEFORMATEXTENSIBLE)); } else { /* I've seen a case where cbSize was set to 0. Assume sizeof(WAVEFORMATEX) in this case. */ size_t cbSize = pNativeFormat->cbSize; if (cbSize == 0) { cbSize = sizeof(MA_WAVEFORMATEX); } /* Make sure we don't copy more than the capacity of `wf`. */ if (cbSize > sizeof(wf)) { cbSize = sizeof(wf); } MA_COPY_MEMORY(&wf, pNativeFormat, cbSize); } result = MA_SUCCESS; } ma_CoTaskMemFree(pContext, pNativeFormat); shareMode = MA_AUDCLNT_SHAREMODE_SHARED; } /* Return an error if we still haven't found a format. */ if (result != MA_SUCCESS) { errorMsg = "[WASAPI] Failed to find best device mix format."; goto done; } /* Override the native sample rate with the one requested by the caller, but only if we're not using the default sample rate. We'll use WASAPI to perform the sample rate conversion. */ nativeSampleRate = wf.nSamplesPerSec; if (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) { wf.nSamplesPerSec = (pData->sampleRateIn != 0) ? pData->sampleRateIn : MA_DEFAULT_SAMPLE_RATE; wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; } pData->formatOut = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf); if (pData->formatOut == ma_format_unknown) { /* The format isn't supported. This is almost certainly because the exclusive mode format isn't supported by miniaudio. We need to return MA_SHARE_MODE_NOT_SUPPORTED in this case so that the caller can detect it and fall back to shared mode if desired. We should never get here if shared mode was requested, but just for completeness we'll check for it and return MA_FORMAT_NOT_SUPPORTED. */ if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) { result = MA_SHARE_MODE_NOT_SUPPORTED; } else { result = MA_FORMAT_NOT_SUPPORTED; } errorMsg = "[WASAPI] Native format not supported."; goto done; } pData->channelsOut = wf.nChannels; pData->sampleRateOut = wf.nSamplesPerSec; /* Get the internal channel map based on the channel mask. There is a possibility that GetMixFormat() returns a WAVEFORMATEX instead of a WAVEFORMATEXTENSIBLE, in which case the channel mask will be undefined. In this case we'll just use the default channel map. */ if (wf.wFormatTag == WAVE_FORMAT_EXTENSIBLE || wf.cbSize >= sizeof(MA_WAVEFORMATEXTENSIBLE)) { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pData->channelsOut, pData->channelMapOut); } else { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); } /* Period size. */ pData->periodsOut = (pData->periodsIn != 0) ? pData->periodsIn : MA_DEFAULT_PERIODS; pData->periodSizeInFramesOut = pData->periodSizeInFramesIn; if (pData->periodSizeInFramesOut == 0) { if (pData->periodSizeInMillisecondsIn == 0) { if (pData->performanceProfile == ma_performance_profile_low_latency) { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, wf.nSamplesPerSec); } else { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, wf.nSamplesPerSec); } } else { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, wf.nSamplesPerSec); } } periodDurationInMicroseconds = ((ma_uint64)pData->periodSizeInFramesOut * 1000 * 1000) / wf.nSamplesPerSec; /* Slightly different initialization for shared and exclusive modes. We try exclusive mode first, and if it fails, fall back to shared mode. */ if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) { MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10; /* If the periodicity is too small, Initialize() will fail with AUDCLNT_E_INVALID_DEVICE_PERIOD. In this case we should just keep increasing it and trying it again. */ hr = E_FAIL; for (;;) { hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL); if (hr == MA_AUDCLNT_E_INVALID_DEVICE_PERIOD) { if (bufferDuration > 500*10000) { break; } else { if (bufferDuration == 0) { /* <-- Just a sanity check to prevent an infinite loop. Should never happen, but it makes me feel better. */ break; } bufferDuration = bufferDuration * 2; continue; } } else { break; } } if (hr == MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED) { ma_uint32 bufferSizeInFrames; hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames); if (SUCCEEDED(hr)) { bufferDuration = (MA_REFERENCE_TIME)((10000.0 * 1000 / wf.nSamplesPerSec * bufferSizeInFrames) + 0.5); /* Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?! */ ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient); #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) hr = ma_IMMDevice_Activate(pDeviceInterface, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pData->pAudioClient); #else hr = ma_IUnknown_QueryInterface(pDeviceInterface, &MA_IID_IAudioClient, (void**)&pData->pAudioClient); #endif if (SUCCEEDED(hr)) { hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL); } } } if (FAILED(hr)) { /* Failed to initialize in exclusive mode. Don't fall back to shared mode - instead tell the client about it. They can reinitialize in shared mode if they want. */ if (hr == E_ACCESSDENIED) { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode. Access denied.", result = MA_ACCESS_DENIED; } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode. Device in use.", result = MA_BUSY; } else { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode."; result = ma_result_from_HRESULT(hr); } goto done; } } if (shareMode == MA_AUDCLNT_SHAREMODE_SHARED) { /* Low latency shared mode via IAudioClient3. NOTE ==== Contrary to the documentation on MSDN (https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient3-initializesharedaudiostream), the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM and AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY with IAudioClient3_InitializeSharedAudioStream() absolutely does not work. Using any of these flags will result in HRESULT code 0x88890021. The other problem is that calling IAudioClient3_GetSharedModeEnginePeriod() with a sample rate different to that returned by IAudioClient_GetMixFormat() also results in an error. I'm therefore disabling low-latency shared mode with AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ #ifndef MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE { if ((streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) == 0 || nativeSampleRate == wf.nSamplesPerSec) { ma_IAudioClient3* pAudioClient3 = NULL; hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient3, (void**)&pAudioClient3); if (SUCCEEDED(hr)) { ma_uint32 defaultPeriodInFrames; ma_uint32 fundamentalPeriodInFrames; ma_uint32 minPeriodInFrames; ma_uint32 maxPeriodInFrames; hr = ma_IAudioClient3_GetSharedModeEnginePeriod(pAudioClient3, (MA_WAVEFORMATEX*)&wf, &defaultPeriodInFrames, &fundamentalPeriodInFrames, &minPeriodInFrames, &maxPeriodInFrames); if (SUCCEEDED(hr)) { ma_uint32 desiredPeriodInFrames = pData->periodSizeInFramesOut; ma_uint32 actualPeriodInFrames = desiredPeriodInFrames; /* Make sure the period size is a multiple of fundamentalPeriodInFrames. */ actualPeriodInFrames = actualPeriodInFrames / fundamentalPeriodInFrames; actualPeriodInFrames = actualPeriodInFrames * fundamentalPeriodInFrames; /* The period needs to be clamped between minPeriodInFrames and maxPeriodInFrames. */ actualPeriodInFrames = ma_clamp(actualPeriodInFrames, minPeriodInFrames, maxPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Trying IAudioClient3_InitializeSharedAudioStream(actualPeriodInFrames=%d)\n", actualPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " defaultPeriodInFrames=%d\n", defaultPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " fundamentalPeriodInFrames=%d\n", fundamentalPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " minPeriodInFrames=%d\n", minPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " maxPeriodInFrames=%d\n", maxPeriodInFrames); /* If the client requested a largish buffer than we don't actually want to use low latency shared mode because it forces small buffers. */ if (actualPeriodInFrames >= desiredPeriodInFrames) { /* MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY must not be in the stream flags. If either of these are specified, IAudioClient3_InitializeSharedAudioStream() will fail. */ hr = ma_IAudioClient3_InitializeSharedAudioStream(pAudioClient3, streamFlags & ~(MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY), actualPeriodInFrames, (MA_WAVEFORMATEX*)&wf, NULL); if (SUCCEEDED(hr)) { wasInitializedUsingIAudioClient3 = MA_TRUE; pData->periodSizeInFramesOut = actualPeriodInFrames; ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Using IAudioClient3\n"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " periodSizeInFramesOut=%d\n", pData->periodSizeInFramesOut); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] IAudioClient3_InitializeSharedAudioStream failed. Falling back to IAudioClient.\n"); } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Not using IAudioClient3 because the desired period size is larger than the maximum supported by IAudioClient3.\n"); } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] IAudioClient3_GetSharedModeEnginePeriod failed. Falling back to IAudioClient.\n"); } ma_IAudioClient3_Release(pAudioClient3); pAudioClient3 = NULL; } } } #else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Not using IAudioClient3 because MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE is enabled.\n"); } #endif /* If we don't have an IAudioClient3 then we need to use the normal initialization routine. */ if (!wasInitializedUsingIAudioClient3) { MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10; /* <-- Multiply by 10 for microseconds to 100-nanoseconds. */ hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, 0, (const MA_WAVEFORMATEX*)&wf, NULL); if (FAILED(hr)) { if (hr == E_ACCESSDENIED) { errorMsg = "[WASAPI] Failed to initialize device. Access denied.", result = MA_ACCESS_DENIED; } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) { errorMsg = "[WASAPI] Failed to initialize device. Device in use.", result = MA_BUSY; } else { errorMsg = "[WASAPI] Failed to initialize device.", result = ma_result_from_HRESULT(hr); } goto done; } } } if (!wasInitializedUsingIAudioClient3) { ma_uint32 bufferSizeInFrames = 0; hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames); if (FAILED(hr)) { errorMsg = "[WASAPI] Failed to get audio client's actual buffer size.", result = ma_result_from_HRESULT(hr); goto done; } /* When using process loopback mode, retrieval of the buffer size seems to result in totally incorrect values. In this case we'll just assume it's the same size as what we requested when we initialized the client. */ if (usingProcessLoopback) { bufferSizeInFrames = (ma_uint32)((periodDurationInMicroseconds * pData->periodsOut) * pData->sampleRateOut / 1000000); } pData->periodSizeInFramesOut = bufferSizeInFrames / pData->periodsOut; } pData->usingAudioClient3 = wasInitializedUsingIAudioClient3; if (deviceType == ma_device_type_playback) { result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pRenderClient); } else { result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pCaptureClient); } /*if (FAILED(hr)) {*/ if (result != MA_SUCCESS) { errorMsg = "[WASAPI] Failed to get audio client service."; goto done; } /* Grab the name of the device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { ma_IPropertyStore *pProperties; hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT varName; ma_PropVariantInit(&varName); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &varName); if (SUCCEEDED(hr)) { WideCharToMultiByte(CP_UTF8, 0, varName.pwszVal, -1, pData->deviceName, sizeof(pData->deviceName), 0, FALSE); ma_PropVariantClear(pContext, &varName); } ma_IPropertyStore_Release(pProperties); } } #endif /* For the WASAPI backend we need to know the actual IDs of the device in order to do automatic stream routing so that IDs can be compared and we can determine which device has been detached and whether or not it matches with our ma_device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { /* Desktop */ ma_context_get_device_id_from_MMDevice__wasapi(pContext, pDeviceInterface, &pData->id); } #else { /* UWP */ /* TODO: Implement me. Need to figure out how to get the ID of the default device. */ } #endif done: /* Clean up. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pDeviceInterface != NULL) { ma_IMMDevice_Release(pDeviceInterface); } #else if (pDeviceInterface != NULL) { ma_IUnknown_Release(pDeviceInterface); } #endif if (result != MA_SUCCESS) { if (pData->pRenderClient) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pData->pRenderClient); pData->pRenderClient = NULL; } if (pData->pCaptureClient) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pData->pCaptureClient); pData->pCaptureClient = NULL; } if (pData->pAudioClient) { ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient); pData->pAudioClient = NULL; } if (errorMsg != NULL && errorMsg[0] != '\0') { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "%s\n", errorMsg); } return result; } else { return MA_SUCCESS; } } static ma_result ma_device_reinit__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_device_init_internal_data__wasapi data; ma_result result; MA_ASSERT(pDevice != NULL); /* We only re-initialize the playback or capture device. Never a full-duplex device. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } /* Before reinitializing the device we need to free the previous audio clients. There's a known memory leak here. We will be calling this from the routing change callback that is fired by WASAPI. If we attempt to release the IAudioClient we will deadlock. In my opinion this is a bug. I'm not sure what I need to do to handle this cleanly, but I think we'll probably need some system where we post an event, but delay the execution of it until the callback has returned. I'm not sure how to do this reliably, however. I have set up some infrastructure for a command thread which might be useful for this. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) { if (pDevice->wasapi.pCaptureClient) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture) { /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_capture);*/ pDevice->wasapi.pAudioClientCapture = NULL; } } if (deviceType == ma_device_type_playback) { if (pDevice->wasapi.pRenderClient) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); pDevice->wasapi.pRenderClient = NULL; } if (pDevice->wasapi.pAudioClientPlayback) { /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_playback);*/ pDevice->wasapi.pAudioClientPlayback = NULL; } } if (deviceType == ma_device_type_playback) { data.formatIn = pDevice->playback.format; data.channelsIn = pDevice->playback.channels; MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap)); data.shareMode = pDevice->playback.shareMode; } else { data.formatIn = pDevice->capture.format; data.channelsIn = pDevice->capture.channels; MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap)); data.shareMode = pDevice->capture.shareMode; } data.sampleRateIn = pDevice->sampleRate; data.periodSizeInFramesIn = pDevice->wasapi.originalPeriodSizeInFrames; data.periodSizeInMillisecondsIn = pDevice->wasapi.originalPeriodSizeInMilliseconds; data.periodsIn = pDevice->wasapi.originalPeriods; data.performanceProfile = pDevice->wasapi.originalPerformanceProfile; data.noAutoConvertSRC = pDevice->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pDevice->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pDevice->wasapi.noHardwareOffloading; data.loopbackProcessID = pDevice->wasapi.loopbackProcessID; data.loopbackProcessExclude = pDevice->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, deviceType, NULL, &data); if (result != MA_SUCCESS) { return result; } /* At this point we have some new objects ready to go. We need to uninitialize the previous ones and then set the new ones. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) { pDevice->wasapi.pAudioClientCapture = data.pAudioClient; pDevice->wasapi.pCaptureClient = data.pCaptureClient; pDevice->capture.internalFormat = data.formatOut; pDevice->capture.internalChannels = data.channelsOut; pDevice->capture.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->capture.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->capture.internalPeriods = data.periodsOut; ma_strcpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), data.deviceName); ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture); /* We must always have a valid ID. */ ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi); } if (deviceType == ma_device_type_playback) { pDevice->wasapi.pAudioClientPlayback = data.pAudioClient; pDevice->wasapi.pRenderClient = data.pRenderClient; pDevice->playback.internalFormat = data.formatOut; pDevice->playback.internalChannels = data.channelsOut; pDevice->playback.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->playback.internalPeriods = data.periodsOut; ma_strcpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), data.deviceName); ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback); pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback); /* We must always have a valid ID because rerouting will look at it. */ ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi); } return MA_SUCCESS; } static ma_result ma_device_init__wasapi(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result = MA_SUCCESS; #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; #endif MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->wasapi); pDevice->wasapi.usage = pConfig->wasapi.usage; pDevice->wasapi.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; pDevice->wasapi.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; pDevice->wasapi.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; pDevice->wasapi.loopbackProcessID = pConfig->wasapi.loopbackProcessID; pDevice->wasapi.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; /* Exclusive mode is not allowed with loopback. */ if (pConfig->deviceType == ma_device_type_loopback && pConfig->playback.shareMode == ma_share_mode_exclusive) { return MA_INVALID_DEVICE_CONFIG; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { ma_device_init_internal_data__wasapi data; data.formatIn = pDescriptorCapture->format; data.channelsIn = pDescriptorCapture->channels; data.sampleRateIn = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorCapture->periodSizeInMilliseconds; data.periodsIn = pDescriptorCapture->periodCount; data.shareMode = pDescriptorCapture->shareMode; data.performanceProfile = pConfig->performanceProfile; data.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; data.loopbackProcessID = pConfig->wasapi.loopbackProcessID; data.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture, pDescriptorCapture->pDeviceID, &data); if (result != MA_SUCCESS) { return result; } pDevice->wasapi.pAudioClientCapture = data.pAudioClient; pDevice->wasapi.pCaptureClient = data.pCaptureClient; pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds; pDevice->wasapi.originalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->wasapi.originalPeriods = pDescriptorCapture->periodCount; pDevice->wasapi.originalPerformanceProfile = pConfig->performanceProfile; /* The event for capture needs to be manual reset for the same reason as playback. We keep the initial state set to unsignaled, however, because we want to block until we actually have something for the first call to ma_device_read(). */ pDevice->wasapi.hEventCapture = (ma_handle)CreateEventA(NULL, FALSE, FALSE, NULL); /* Auto reset, unsignaled by default. */ if (pDevice->wasapi.hEventCapture == NULL) { result = ma_result_from_GetLastError(GetLastError()); if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for capture."); return result; } ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture); /* We must always have a valid ID. */ ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi); /* The descriptor needs to be updated with actual values. */ pDescriptorCapture->format = data.formatOut; pDescriptorCapture->channels = data.channelsOut; pDescriptorCapture->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorCapture->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorCapture->periodCount = data.periodsOut; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__wasapi data; data.formatIn = pDescriptorPlayback->format; data.channelsIn = pDescriptorPlayback->channels; data.sampleRateIn = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); data.periodSizeInFramesIn = pDescriptorPlayback->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds; data.periodsIn = pDescriptorPlayback->periodCount; data.shareMode = pDescriptorPlayback->shareMode; data.performanceProfile = pConfig->performanceProfile; data.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; data.loopbackProcessID = pConfig->wasapi.loopbackProcessID; data.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.hEventCapture = NULL; } return result; } pDevice->wasapi.pAudioClientPlayback = data.pAudioClient; pDevice->wasapi.pRenderClient = data.pRenderClient; pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds; pDevice->wasapi.originalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->wasapi.originalPeriods = pDescriptorPlayback->periodCount; pDevice->wasapi.originalPerformanceProfile = pConfig->performanceProfile; /* The event for playback is needs to be manual reset because we want to explicitly control the fact that it becomes signalled only after the whole available space has been filled, never before. The playback event also needs to be initially set to a signaled state so that the first call to ma_device_write() is able to get passed WaitForMultipleObjects(). */ pDevice->wasapi.hEventPlayback = (ma_handle)CreateEventA(NULL, FALSE, TRUE, NULL); /* Auto reset, signaled by default. */ if (pDevice->wasapi.hEventPlayback == NULL) { result = ma_result_from_GetLastError(GetLastError()); if (pConfig->deviceType == ma_device_type_duplex) { if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.hEventCapture = NULL; } if (pDevice->wasapi.pRenderClient != NULL) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); pDevice->wasapi.pRenderClient = NULL; } if (pDevice->wasapi.pAudioClientPlayback != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); pDevice->wasapi.pAudioClientPlayback = NULL; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for playback."); return result; } ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback); pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback); /* We must always have a valid ID because rerouting will look at it. */ ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi); /* The descriptor needs to be updated with actual values. */ pDescriptorPlayback->format = data.formatOut; pDescriptorPlayback->channels = data.channelsOut; pDescriptorPlayback->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorPlayback->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorPlayback->periodCount = data.periodsOut; } /* We need to register a notification client to detect when the device has been disabled, unplugged or re-routed (when the default device changes). When we are connecting to the default device we want to do automatic stream routing when the device is disabled or unplugged. Otherwise we want to just stop the device outright and let the application handle it. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pConfig->wasapi.noAutoStreamRouting == MA_FALSE) { if ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) && pConfig->capture.pDeviceID == NULL) { pDevice->wasapi.allowCaptureAutoStreamRouting = MA_TRUE; } if ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.pDeviceID == NULL) { pDevice->wasapi.allowPlaybackAutoStreamRouting = MA_TRUE; } } ma_mutex_init(&pDevice->wasapi.rerouteLock); hr = ma_CoCreateInstance(pDevice->pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_device_uninit__wasapi(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } pDevice->wasapi.notificationClient.lpVtbl = (void*)&g_maNotificationCientVtbl; pDevice->wasapi.notificationClient.counter = 1; pDevice->wasapi.notificationClient.pDevice = pDevice; hr = pDeviceEnumerator->lpVtbl->RegisterEndpointNotificationCallback(pDeviceEnumerator, &pDevice->wasapi.notificationClient); if (SUCCEEDED(hr)) { pDevice->wasapi.pDeviceEnumerator = (ma_ptr)pDeviceEnumerator; } else { /* Not the end of the world if we fail to register the notification callback. We just won't support automatic stream routing. */ ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); } #endif ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_FALSE); ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE); return MA_SUCCESS; } static ma_result ma_device__get_available_frames__wasapi(ma_device* pDevice, ma_IAudioClient* pAudioClient, ma_uint32* pFrameCount) { ma_uint32 paddingFramesCount; HRESULT hr; ma_share_mode shareMode; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFrameCount != NULL); *pFrameCount = 0; if ((ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientPlayback && (ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientCapture) { return MA_INVALID_OPERATION; } /* I've had a report that GetCurrentPadding() is returning a frame count of 0 which is preventing higher level function calls from doing anything because it thinks nothing is available. I have taken a look at the documentation and it looks like this is unnecessary in exclusive mode. From Microsoft's documentation: For an exclusive-mode rendering or capture stream that was initialized with the AUDCLNT_STREAMFLAGS_EVENTCALLBACK flag, the client typically has no use for the padding value reported by GetCurrentPadding. Instead, the client accesses an entire buffer during each processing pass. Considering this, I'm going to skip GetCurrentPadding() for exclusive mode and just report the entire buffer. This depends on the caller making sure they wait on the event handler. */ shareMode = ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) ? pDevice->playback.shareMode : pDevice->capture.shareMode; if (shareMode == ma_share_mode_shared) { /* Shared mode. */ hr = ma_IAudioClient_GetCurrentPadding(pAudioClient, &paddingFramesCount); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback - paddingFramesCount; } else { *pFrameCount = paddingFramesCount; } } else { /* Exclusive mode. */ if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback; } else { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesCapture; } } return MA_SUCCESS; } static ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_result result; if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "=== CHANGING DEVICE ===\n"); result = ma_device_reinit__wasapi(pDevice, deviceType); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WASAPI] Reinitializing device after route change failed.\n"); return result; } ma_device__post_init_setup(pDevice, deviceType); ma_device__on_notification_rerouted(pDevice); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "=== DEVICE CHANGED ===\n"); return MA_SUCCESS; } static ma_result ma_device_start__wasapi_nolock(ma_device* pDevice) { HRESULT hr; if (pDevice->pContext->wasapi.hAvrt) { const char* pTaskName = ma_to_usage_string__wasapi(pDevice->wasapi.usage); if (pTaskName) { DWORD idx = 0; pDevice->wasapi.hAvrtHandle = (ma_handle)((MA_PFN_AvSetMmThreadCharacteristicsA)pDevice->pContext->wasapi.AvSetMmThreadCharacteristicsA)(pTaskName, &idx); } } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to start internal capture device. HRESULT = %d.", (int)hr); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_TRUE); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to start internal playback device. HRESULT = %d.", (int)hr); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_TRUE); } return MA_SUCCESS; } static ma_result ma_device_start__wasapi(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to start the device. */ ma_mutex_lock(&pDevice->wasapi.rerouteLock); { result = ma_device_start__wasapi_nolock(pDevice); } ma_mutex_unlock(&pDevice->wasapi.rerouteLock); return result; } static ma_result ma_device_stop__wasapi_nolock(ma_device* pDevice) { ma_result result; HRESULT hr; MA_ASSERT(pDevice != NULL); if (pDevice->wasapi.hAvrtHandle) { ((MA_PFN_AvRevertMmThreadCharacteristics)pDevice->pContext->wasapi.AvRevertMmThreadcharacteristics)((HANDLE)pDevice->wasapi.hAvrtHandle); pDevice->wasapi.hAvrtHandle = NULL; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { /* If we have a mapped buffer we need to release it. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to stop internal capture device."); return ma_result_from_HRESULT(hr); } /* The audio client needs to be reset otherwise restarting will fail. */ hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to reset internal capture device."); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_FALSE); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->wasapi.pMappedBufferPlayback != NULL) { ma_silence_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->wasapi.pMappedBufferPlayback, pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels), pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels ); ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; } /* The buffer needs to be drained before stopping the device. Not doing this will result in the last few frames not getting output to the speakers. This is a problem for very short sounds because it'll result in a significant portion of it not getting played. */ if (ma_atomic_bool32_get(&pDevice->wasapi.isStartedPlayback)) { /* We need to make sure we put a timeout here or else we'll risk getting stuck in a deadlock in some cases. */ DWORD waitTime = (pDevice->wasapi.actualBufferSizeInFramesPlayback * 1000) / pDevice->playback.internalSampleRate; if (pDevice->playback.shareMode == ma_share_mode_exclusive) { WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime); } else { ma_uint32 prevFramesAvailablePlayback = (ma_uint32)-1; ma_uint32 framesAvailablePlayback; for (;;) { result = ma_device__get_available_frames__wasapi(pDevice, (ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &framesAvailablePlayback); if (result != MA_SUCCESS) { break; } if (framesAvailablePlayback >= pDevice->wasapi.actualBufferSizeInFramesPlayback) { break; } /* Just a safety check to avoid an infinite loop. If this iteration results in a situation where the number of available frames has not changed, get out of the loop. I don't think this should ever happen, but I think it's nice to have just in case. */ if (framesAvailablePlayback == prevFramesAvailablePlayback) { break; } prevFramesAvailablePlayback = framesAvailablePlayback; ResetEvent((HANDLE)pDevice->wasapi.hEventPlayback); /* Manual reset. */ WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime); } } } hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to stop internal playback device."); return ma_result_from_HRESULT(hr); } /* The audio client needs to be reset otherwise restarting will fail. */ { ma_int32 retries = 5; while ((hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback)) == MA_AUDCLNT_E_BUFFER_OPERATION_PENDING && retries > 0) { ma_sleep(10); retries -= 1; } } if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to reset internal playback device."); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE); } return MA_SUCCESS; } static ma_result ma_device_stop__wasapi(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to stop the device. */ ma_mutex_lock(&pDevice->wasapi.rerouteLock); { result = ma_device_stop__wasapi_nolock(pDevice); } ma_mutex_unlock(&pDevice->wasapi.rerouteLock); return result; } #ifndef MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS #define MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS 5000 #endif static ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint32 totalFramesProcessed = 0; /* When reading, we need to get a buffer and process all of it before releasing it. Because the frame count (frameCount) can be different to the size of the buffer, we'll need to cache the pointer to the buffer. */ /* Keep running until we've processed the requested number of frames. */ while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesProcessed; /* If we have a mapped data buffer, consume that first. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { /* We have a cached data pointer so consume that before grabbing another one from WASAPI. */ ma_uint32 framesToProcessNow = framesRemaining; if (framesToProcessNow > pDevice->wasapi.mappedBufferCaptureLen) { framesToProcessNow = pDevice->wasapi.mappedBufferCaptureLen; } /* Now just copy the data over to the output buffer. */ ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pFrames, totalFramesProcessed, pDevice->capture.internalFormat, pDevice->capture.internalChannels), ma_offset_pcm_frames_const_ptr(pDevice->wasapi.pMappedBufferCapture, pDevice->wasapi.mappedBufferCaptureCap - pDevice->wasapi.mappedBufferCaptureLen, pDevice->capture.internalFormat, pDevice->capture.internalChannels), framesToProcessNow, pDevice->capture.internalFormat, pDevice->capture.internalChannels ); totalFramesProcessed += framesToProcessNow; pDevice->wasapi.mappedBufferCaptureLen -= framesToProcessNow; /* If the data buffer has been fully consumed we need to release it. */ if (pDevice->wasapi.mappedBufferCaptureLen == 0) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; } } else { /* We don't have any cached data pointer, so grab another one. */ HRESULT hr; DWORD flags = 0; /* First just ask WASAPI for a data buffer. If it's not available, we'll wait for more. */ hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL); if (hr == S_OK) { /* We got a data buffer. Continue to the next loop iteration which will then read from the mapped pointer. */ pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap; /* There have been reports that indicate that at times the AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY is reported for every call to IAudioCaptureClient_GetBuffer() above which results in spamming of the debug messages below. To partially work around this, I'm only outputting these messages when MA_DEBUG_OUTPUT is explicitly defined. The better solution would be to figure out why the flag is always getting reported. */ #if defined(MA_DEBUG_OUTPUT) { if (flags != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Capture Flags: %ld\n", flags); if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity (possible overrun). Attempting recovery. mappedBufferCaptureCap=%d\n", pDevice->wasapi.mappedBufferCaptureCap); } } } #endif /* Overrun detection. */ if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { /* Glitched. Probably due to an overrun. */ /* If we got an overrun it probably means we're straddling the end of the buffer. In normal capture mode this is the fault of the client application because they're responsible for ensuring data is processed fast enough. In duplex mode, however, the processing of audio is tied to the playback device, so this can possibly be the result of a timing de-sync. In capture mode we're not going to do any kind of recovery because the real fix is for the client application to process faster. In duplex mode, we'll treat this as a desync and reset the buffers to prevent a never-ending sequence of glitches due to straddling the end of the buffer. */ if (pDevice->type == ma_device_type_duplex) { /* Experiment: If we empty out the *entire* buffer we may end up putting ourselves into an underrun position which isn't really any better than the overrun we're probably in right now. Instead we'll just empty out about half. */ ma_uint32 i; ma_uint32 periodCount = (pDevice->wasapi.actualBufferSizeInFramesCapture / pDevice->wasapi.periodSizeInFramesCapture); ma_uint32 iterationCount = periodCount / 2; if ((periodCount % 2) > 0) { iterationCount += 1; } for (i = 0; i < iterationCount; i += 1) { hr = ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: IAudioCaptureClient_ReleaseBuffer() failed with %ld.\n", hr); break; } flags = 0; hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL); if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || FAILED(hr)) { /* The buffer has been completely emptied or an error occurred. In this case we'll need to reset the state of the mapped buffer which will trigger the next iteration to get a fresh buffer from WASAPI. */ pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; if (hr == MA_AUDCLNT_S_BUFFER_EMPTY) { if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: Buffer emptied, and data discontinuity still reported.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: Buffer emptied.\n"); } } if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: IAudioCaptureClient_GetBuffer() failed with %ld.\n", hr); } break; } } /* If at this point we have a valid buffer mapped, make sure the buffer length is set appropriately. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap; } } } continue; } else { if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || hr == MA_AUDCLNT_E_BUFFER_ERROR) { /* No data is available. We need to wait for more. There's two situations to consider here. The first is normal capture mode. If this times out it probably means the microphone isn't delivering data for whatever reason. In this case we'll just abort the read and return whatever we were able to get. The other situations is loopback mode, in which case a timeout probably just means the nothing is playing through the speakers. */ /* Experiment: Use a shorter timeout for loopback mode. */ DWORD timeoutInMilliseconds = MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS; if (pDevice->type == ma_device_type_loopback) { timeoutInMilliseconds = 10; } if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventCapture, timeoutInMilliseconds) != WAIT_OBJECT_0) { if (pDevice->type == ma_device_type_loopback) { continue; /* Keep waiting in loopback mode. */ } else { result = MA_ERROR; break; /* Wait failed. */ } } /* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */ } else { /* An error occurred and we need to abort. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from capture device in preparation for reading from the device. HRESULT = %d. Stopping device.\n", (int)hr); result = ma_result_from_HRESULT(hr); break; } } } } /* If we were unable to process the entire requested frame count, but we still have a mapped buffer, there's a good chance either an error occurred or the device was stopped mid-read. In this case we'll need to make sure the buffer is released. */ if (totalFramesProcessed < frameCount && pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } return result; } static ma_result ma_device_write__wasapi(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; ma_uint32 totalFramesProcessed = 0; /* Keep writing to the device until it's stopped or we've consumed all of our input. */ while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesProcessed; /* We're going to do this in a similar way to capture. We'll first check if the cached data pointer is valid, and if so, read from that. Otherwise We will call IAudioRenderClient_GetBuffer() with a requested buffer size equal to our actual period size. If it returns AUDCLNT_E_BUFFER_TOO_LARGE it means we need to wait for some data to become available. */ if (pDevice->wasapi.pMappedBufferPlayback != NULL) { /* We still have some space available in the mapped data buffer. Write to it. */ ma_uint32 framesToProcessNow = framesRemaining; if (framesToProcessNow > (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen)) { framesToProcessNow = (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen); } /* Now just copy the data over to the output buffer. */ ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->wasapi.pMappedBufferPlayback, pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels), ma_offset_pcm_frames_const_ptr(pFrames, totalFramesProcessed, pDevice->playback.internalFormat, pDevice->playback.internalChannels), framesToProcessNow, pDevice->playback.internalFormat, pDevice->playback.internalChannels ); totalFramesProcessed += framesToProcessNow; pDevice->wasapi.mappedBufferPlaybackLen += framesToProcessNow; /* If the data buffer has been fully consumed we need to release it. */ if (pDevice->wasapi.mappedBufferPlaybackLen == pDevice->wasapi.mappedBufferPlaybackCap) { ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; /* In exclusive mode we need to wait here. Exclusive mode is weird because GetBuffer() never seems to return AUDCLNT_E_BUFFER_TOO_LARGE, which is what we normally use to determine whether or not we need to wait for more data. */ if (pDevice->playback.shareMode == ma_share_mode_exclusive) { if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) { result = MA_ERROR; break; /* Wait failed. Probably timed out. */ } } } } else { /* We don't have a mapped data buffer so we'll need to get one. */ HRESULT hr; ma_uint32 bufferSizeInFrames; /* Special rules for exclusive mode. */ if (pDevice->playback.shareMode == ma_share_mode_exclusive) { bufferSizeInFrames = pDevice->wasapi.actualBufferSizeInFramesPlayback; } else { bufferSizeInFrames = pDevice->wasapi.periodSizeInFramesPlayback; } hr = ma_IAudioRenderClient_GetBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, bufferSizeInFrames, (BYTE**)&pDevice->wasapi.pMappedBufferPlayback); if (hr == S_OK) { /* We have data available. */ pDevice->wasapi.mappedBufferPlaybackCap = bufferSizeInFrames; pDevice->wasapi.mappedBufferPlaybackLen = 0; } else { if (hr == MA_AUDCLNT_E_BUFFER_TOO_LARGE || hr == MA_AUDCLNT_E_BUFFER_ERROR) { /* Not enough data available. We need to wait for more. */ if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) { result = MA_ERROR; break; /* Wait failed. Probably timed out. */ } } else { /* Some error occurred. We'll need to abort. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from playback device in preparation for writing to the device. HRESULT = %d. Stopping device.\n", (int)hr); result = ma_result_from_HRESULT(hr); break; } } } } if (pFramesWritten != NULL) { *pFramesWritten = totalFramesProcessed; } return result; } static ma_result ma_device_data_loop_wakeup__wasapi(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { SetEvent((HANDLE)pDevice->wasapi.hEventCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { SetEvent((HANDLE)pDevice->wasapi.hEventPlayback); } return MA_SUCCESS; } static ma_result ma_context_uninit__wasapi(ma_context* pContext) { ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_QUIT__WASAPI); MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_wasapi); ma_context_post_command__wasapi(pContext, &cmd); ma_thread_wait(&pContext->wasapi.commandThread); if (pContext->wasapi.hAvrt) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt); pContext->wasapi.hAvrt = NULL; } #if defined(MA_WIN32_UWP) { if (pContext->wasapi.hMMDevapi) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi); pContext->wasapi.hMMDevapi = NULL; } } #endif /* Only after the thread has been terminated can we uninitialize the sync objects for the command thread. */ ma_semaphore_uninit(&pContext->wasapi.commandSem); ma_mutex_uninit(&pContext->wasapi.commandLock); return MA_SUCCESS; } static ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result = MA_SUCCESS; MA_ASSERT(pContext != NULL); (void)pConfig; #ifdef MA_WIN32_DESKTOP /* WASAPI is only supported in Vista SP1 and newer. The reason for SP1 and not the base version of Vista is that event-driven exclusive mode does not work until SP1. Unfortunately older compilers don't define these functions so we need to dynamically load them in order to avoid a link error. */ { ma_OSVERSIONINFOEXW osvi; ma_handle kernel32DLL; ma_PFNVerifyVersionInfoW _VerifyVersionInfoW; ma_PFNVerSetConditionMask _VerSetConditionMask; kernel32DLL = ma_dlopen(ma_context_get_log(pContext), "kernel32.dll"); if (kernel32DLL == NULL) { return MA_NO_BACKEND; } _VerifyVersionInfoW = (ma_PFNVerifyVersionInfoW )ma_dlsym(ma_context_get_log(pContext), kernel32DLL, "VerifyVersionInfoW"); _VerSetConditionMask = (ma_PFNVerSetConditionMask)ma_dlsym(ma_context_get_log(pContext), kernel32DLL, "VerSetConditionMask"); if (_VerifyVersionInfoW == NULL || _VerSetConditionMask == NULL) { ma_dlclose(ma_context_get_log(pContext), kernel32DLL); return MA_NO_BACKEND; } MA_ZERO_OBJECT(&osvi); osvi.dwOSVersionInfoSize = sizeof(osvi); osvi.dwMajorVersion = ((MA_WIN32_WINNT_VISTA >> 8) & 0xFF); osvi.dwMinorVersion = ((MA_WIN32_WINNT_VISTA >> 0) & 0xFF); osvi.wServicePackMajor = 1; if (_VerifyVersionInfoW(&osvi, MA_VER_MAJORVERSION | MA_VER_MINORVERSION | MA_VER_SERVICEPACKMAJOR, _VerSetConditionMask(_VerSetConditionMask(_VerSetConditionMask(0, MA_VER_MAJORVERSION, MA_VER_GREATER_EQUAL), MA_VER_MINORVERSION, MA_VER_GREATER_EQUAL), MA_VER_SERVICEPACKMAJOR, MA_VER_GREATER_EQUAL))) { result = MA_SUCCESS; } else { result = MA_NO_BACKEND; } ma_dlclose(ma_context_get_log(pContext), kernel32DLL); } #endif if (result != MA_SUCCESS) { return result; } MA_ZERO_OBJECT(&pContext->wasapi); #if defined(MA_WIN32_UWP) { /* Link to mmdevapi so we can get access to ActivateAudioInterfaceAsync(). */ pContext->wasapi.hMMDevapi = ma_dlopen(ma_context_get_log(pContext), "mmdevapi.dll"); if (pContext->wasapi.hMMDevapi) { pContext->wasapi.ActivateAudioInterfaceAsync = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi, "ActivateAudioInterfaceAsync"); if (pContext->wasapi.ActivateAudioInterfaceAsync == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi); return MA_NO_BACKEND; /* ActivateAudioInterfaceAsync() could not be loaded. */ } } else { return MA_NO_BACKEND; /* Failed to load mmdevapi.dll which is required for ActivateAudioInterfaceAsync() */ } } #endif /* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */ pContext->wasapi.hAvrt = ma_dlopen(ma_context_get_log(pContext), "avrt.dll"); if (pContext->wasapi.hAvrt) { pContext->wasapi.AvSetMmThreadCharacteristicsA = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsA"); pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics"); /* If either function could not be found, disable use of avrt entirely. */ if (!pContext->wasapi.AvSetMmThreadCharacteristicsA || !pContext->wasapi.AvRevertMmThreadcharacteristics) { pContext->wasapi.AvSetMmThreadCharacteristicsA = NULL; pContext->wasapi.AvRevertMmThreadcharacteristics = NULL; ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt); pContext->wasapi.hAvrt = NULL; } } /* Annoyingly, WASAPI does not allow you to release an IAudioClient object from a different thread than the one that retrieved it with GetService(). This can result in a deadlock in two situations: 1) When calling ma_device_uninit() from a different thread to ma_device_init(); and 2) When uninitializing and reinitializing the internal IAudioClient object in response to automatic stream routing. We could define ma_device_uninit() such that it must be called on the same thread as ma_device_init(). We could also just not release the IAudioClient when performing automatic stream routing to avoid the deadlock. Neither of these are acceptable solutions in my view so we're going to have to work around this with a worker thread. This is not ideal, but I can't think of a better way to do this. More information about this can be found here: https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nn-audioclient-iaudiorenderclient Note this section: When releasing an IAudioRenderClient interface instance, the client must call the interface's Release method from the same thread as the call to IAudioClient::GetService that created the object. */ { result = ma_mutex_init(&pContext->wasapi.commandLock); if (result != MA_SUCCESS) { return result; } result = ma_semaphore_init(0, &pContext->wasapi.commandSem); if (result != MA_SUCCESS) { ma_mutex_uninit(&pContext->wasapi.commandLock); return result; } result = ma_thread_create(&pContext->wasapi.commandThread, ma_thread_priority_normal, 0, ma_context_command_thread__wasapi, pContext, &pContext->allocationCallbacks); if (result != MA_SUCCESS) { ma_semaphore_uninit(&pContext->wasapi.commandSem); ma_mutex_uninit(&pContext->wasapi.commandLock); return result; } } pCallbacks->onContextInit = ma_context_init__wasapi; pCallbacks->onContextUninit = ma_context_uninit__wasapi; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__wasapi; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__wasapi; pCallbacks->onDeviceInit = ma_device_init__wasapi; pCallbacks->onDeviceUninit = ma_device_uninit__wasapi; pCallbacks->onDeviceStart = ma_device_start__wasapi; pCallbacks->onDeviceStop = ma_device_stop__wasapi; pCallbacks->onDeviceRead = ma_device_read__wasapi; pCallbacks->onDeviceWrite = ma_device_write__wasapi; pCallbacks->onDeviceDataLoop = NULL; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__wasapi; return MA_SUCCESS; } #endif /****************************************************************************** DirectSound Backend ******************************************************************************/ #ifdef MA_HAS_DSOUND /*#include */ /*static const GUID MA_GUID_IID_DirectSoundNotify = {0xb0210783, 0x89cd, 0x11d0, {0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16}};*/ /* miniaudio only uses priority or exclusive modes. */ #define MA_DSSCL_NORMAL 1 #define MA_DSSCL_PRIORITY 2 #define MA_DSSCL_EXCLUSIVE 3 #define MA_DSSCL_WRITEPRIMARY 4 #define MA_DSCAPS_PRIMARYMONO 0x00000001 #define MA_DSCAPS_PRIMARYSTEREO 0x00000002 #define MA_DSCAPS_PRIMARY8BIT 0x00000004 #define MA_DSCAPS_PRIMARY16BIT 0x00000008 #define MA_DSCAPS_CONTINUOUSRATE 0x00000010 #define MA_DSCAPS_EMULDRIVER 0x00000020 #define MA_DSCAPS_CERTIFIED 0x00000040 #define MA_DSCAPS_SECONDARYMONO 0x00000100 #define MA_DSCAPS_SECONDARYSTEREO 0x00000200 #define MA_DSCAPS_SECONDARY8BIT 0x00000400 #define MA_DSCAPS_SECONDARY16BIT 0x00000800 #define MA_DSBCAPS_PRIMARYBUFFER 0x00000001 #define MA_DSBCAPS_STATIC 0x00000002 #define MA_DSBCAPS_LOCHARDWARE 0x00000004 #define MA_DSBCAPS_LOCSOFTWARE 0x00000008 #define MA_DSBCAPS_CTRL3D 0x00000010 #define MA_DSBCAPS_CTRLFREQUENCY 0x00000020 #define MA_DSBCAPS_CTRLPAN 0x00000040 #define MA_DSBCAPS_CTRLVOLUME 0x00000080 #define MA_DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 #define MA_DSBCAPS_CTRLFX 0x00000200 #define MA_DSBCAPS_STICKYFOCUS 0x00004000 #define MA_DSBCAPS_GLOBALFOCUS 0x00008000 #define MA_DSBCAPS_GETCURRENTPOSITION2 0x00010000 #define MA_DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 #define MA_DSBCAPS_LOCDEFER 0x00040000 #define MA_DSBCAPS_TRUEPLAYPOSITION 0x00080000 #define MA_DSBPLAY_LOOPING 0x00000001 #define MA_DSBPLAY_LOCHARDWARE 0x00000002 #define MA_DSBPLAY_LOCSOFTWARE 0x00000004 #define MA_DSBPLAY_TERMINATEBY_TIME 0x00000008 #define MA_DSBPLAY_TERMINATEBY_DISTANCE 0x00000010 #define MA_DSBPLAY_TERMINATEBY_PRIORITY 0x00000020 #define MA_DSBSTATUS_PLAYING 0x00000001 #define MA_DSBSTATUS_BUFFERLOST 0x00000002 #define MA_DSBSTATUS_LOOPING 0x00000004 #define MA_DSBSTATUS_LOCHARDWARE 0x00000008 #define MA_DSBSTATUS_LOCSOFTWARE 0x00000010 #define MA_DSBSTATUS_TERMINATED 0x00000020 #define MA_DSCBSTART_LOOPING 0x00000001 typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; MA_WAVEFORMATEX* lpwfxFormat; GUID guid3DAlgorithm; } MA_DSBUFFERDESC; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; MA_WAVEFORMATEX* lpwfxFormat; DWORD dwFXCount; void* lpDSCFXDesc; /* <-- miniaudio doesn't use this, so set to void*. */ } MA_DSCBUFFERDESC; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwMinSecondarySampleRate; DWORD dwMaxSecondarySampleRate; DWORD dwPrimaryBuffers; DWORD dwMaxHwMixingAllBuffers; DWORD dwMaxHwMixingStaticBuffers; DWORD dwMaxHwMixingStreamingBuffers; DWORD dwFreeHwMixingAllBuffers; DWORD dwFreeHwMixingStaticBuffers; DWORD dwFreeHwMixingStreamingBuffers; DWORD dwMaxHw3DAllBuffers; DWORD dwMaxHw3DStaticBuffers; DWORD dwMaxHw3DStreamingBuffers; DWORD dwFreeHw3DAllBuffers; DWORD dwFreeHw3DStaticBuffers; DWORD dwFreeHw3DStreamingBuffers; DWORD dwTotalHwMemBytes; DWORD dwFreeHwMemBytes; DWORD dwMaxContigFreeHwMemBytes; DWORD dwUnlockTransferRateHwBuffers; DWORD dwPlayCpuOverheadSwBuffers; DWORD dwReserved1; DWORD dwReserved2; } MA_DSCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwUnlockTransferRate; DWORD dwPlayCpuOverhead; } MA_DSBCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwFormats; DWORD dwChannels; } MA_DSCCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; } MA_DSCBCAPS; typedef struct { DWORD dwOffset; HANDLE hEventNotify; } MA_DSBPOSITIONNOTIFY; typedef struct ma_IDirectSound ma_IDirectSound; typedef struct ma_IDirectSoundBuffer ma_IDirectSoundBuffer; typedef struct ma_IDirectSoundCapture ma_IDirectSoundCapture; typedef struct ma_IDirectSoundCaptureBuffer ma_IDirectSoundCaptureBuffer; typedef struct ma_IDirectSoundNotify ma_IDirectSoundNotify; /* COM objects. The way these work is that you have a vtable (a list of function pointers, kind of like how C++ works internally), and then you have a structure with a single member, which is a pointer to the vtable. The vtable is where the methods of the object are defined. Methods need to be in a specific order, and parent classes need to have their methods declared first. */ /* IDirectSound */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSound* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSound* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSound* pThis); /* IDirectSound */ HRESULT (STDMETHODCALLTYPE * CreateSoundBuffer) (ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter); HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps); HRESULT (STDMETHODCALLTYPE * DuplicateSoundBuffer)(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate); HRESULT (STDMETHODCALLTYPE * SetCooperativeLevel) (ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel); HRESULT (STDMETHODCALLTYPE * Compact) (ma_IDirectSound* pThis); HRESULT (STDMETHODCALLTYPE * GetSpeakerConfig) (ma_IDirectSound* pThis, DWORD* pSpeakerConfig); HRESULT (STDMETHODCALLTYPE * SetSpeakerConfig) (ma_IDirectSound* pThis, DWORD dwSpeakerConfig); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSound* pThis, const GUID* pGuidDevice); } ma_IDirectSoundVtbl; struct ma_IDirectSound { ma_IDirectSoundVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSound_QueryInterface(ma_IDirectSound* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSound_AddRef(ma_IDirectSound* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSound_Release(ma_IDirectSound* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSound_CreateSoundBuffer(ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateSoundBuffer(pThis, pDSBufferDesc, ppDSBuffer, pUnkOuter); } static MA_INLINE HRESULT ma_IDirectSound_GetCaps(ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCaps); } static MA_INLINE HRESULT ma_IDirectSound_DuplicateSoundBuffer(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate) { return pThis->lpVtbl->DuplicateSoundBuffer(pThis, pDSBufferOriginal, ppDSBufferDuplicate); } static MA_INLINE HRESULT ma_IDirectSound_SetCooperativeLevel(ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel) { return pThis->lpVtbl->SetCooperativeLevel(pThis, hwnd, dwLevel); } static MA_INLINE HRESULT ma_IDirectSound_Compact(ma_IDirectSound* pThis) { return pThis->lpVtbl->Compact(pThis); } static MA_INLINE HRESULT ma_IDirectSound_GetSpeakerConfig(ma_IDirectSound* pThis, DWORD* pSpeakerConfig) { return pThis->lpVtbl->GetSpeakerConfig(pThis, pSpeakerConfig); } static MA_INLINE HRESULT ma_IDirectSound_SetSpeakerConfig(ma_IDirectSound* pThis, DWORD dwSpeakerConfig) { return pThis->lpVtbl->SetSpeakerConfig(pThis, dwSpeakerConfig); } static MA_INLINE HRESULT ma_IDirectSound_Initialize(ma_IDirectSound* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); } /* IDirectSoundBuffer */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundBuffer* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundBuffer* pThis); /* IDirectSoundBuffer */ HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps); HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor); HRESULT (STDMETHODCALLTYPE * GetFormat) (ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten); HRESULT (STDMETHODCALLTYPE * GetVolume) (ma_IDirectSoundBuffer* pThis, LONG* pVolume); HRESULT (STDMETHODCALLTYPE * GetPan) (ma_IDirectSoundBuffer* pThis, LONG* pPan); HRESULT (STDMETHODCALLTYPE * GetFrequency) (ma_IDirectSoundBuffer* pThis, DWORD* pFrequency); HRESULT (STDMETHODCALLTYPE * GetStatus) (ma_IDirectSoundBuffer* pThis, DWORD* pStatus); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc); HRESULT (STDMETHODCALLTYPE * Lock) (ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Play) (ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * SetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition); HRESULT (STDMETHODCALLTYPE * SetFormat) (ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat); HRESULT (STDMETHODCALLTYPE * SetVolume) (ma_IDirectSoundBuffer* pThis, LONG volume); HRESULT (STDMETHODCALLTYPE * SetPan) (ma_IDirectSoundBuffer* pThis, LONG pan); HRESULT (STDMETHODCALLTYPE * SetFrequency) (ma_IDirectSoundBuffer* pThis, DWORD dwFrequency); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IDirectSoundBuffer* pThis); HRESULT (STDMETHODCALLTYPE * Unlock) (ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2); HRESULT (STDMETHODCALLTYPE * Restore) (ma_IDirectSoundBuffer* pThis); } ma_IDirectSoundBufferVtbl; struct ma_IDirectSoundBuffer { ma_IDirectSoundBufferVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundBuffer_QueryInterface(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundBuffer_AddRef(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundBuffer_Release(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCaps(ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSBufferCaps); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCurrentPlayCursor, pCurrentWriteCursor); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFormat(ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetVolume(ma_IDirectSoundBuffer* pThis, LONG* pVolume) { return pThis->lpVtbl->GetVolume(pThis, pVolume); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetPan(ma_IDirectSoundBuffer* pThis, LONG* pPan) { return pThis->lpVtbl->GetPan(pThis, pPan); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFrequency(ma_IDirectSoundBuffer* pThis, DWORD* pFrequency) { return pThis->lpVtbl->GetFrequency(pThis, pFrequency); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetStatus(ma_IDirectSoundBuffer* pThis, DWORD* pStatus) { return pThis->lpVtbl->GetStatus(pThis, pStatus); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Initialize(ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSound, pDSBufferDesc); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Lock(ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Play(ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) { return pThis->lpVtbl->Play(pThis, dwReserved1, dwPriority, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition) { return pThis->lpVtbl->SetCurrentPosition(pThis, dwNewPosition); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFormat(ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat) { return pThis->lpVtbl->SetFormat(pThis, pFormat); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetVolume(ma_IDirectSoundBuffer* pThis, LONG volume) { return pThis->lpVtbl->SetVolume(pThis, volume); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetPan(ma_IDirectSoundBuffer* pThis, LONG pan) { return pThis->lpVtbl->SetPan(pThis, pan); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFrequency(ma_IDirectSoundBuffer* pThis, DWORD dwFrequency) { return pThis->lpVtbl->SetFrequency(pThis, dwFrequency); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Stop(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Unlock(ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Restore(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Restore(pThis); } /* IDirectSoundCapture */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundCapture* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundCapture* pThis); /* IDirectSoundCapture */ HRESULT (STDMETHODCALLTYPE * CreateCaptureBuffer)(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter); HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice); } ma_IDirectSoundCaptureVtbl; struct ma_IDirectSoundCapture { ma_IDirectSoundCaptureVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundCapture_QueryInterface (ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundCapture_AddRef (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundCapture_Release (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCapture_CreateCaptureBuffer(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateCaptureBuffer(pThis, pDSCBufferDesc, ppDSCBuffer, pUnkOuter); } static MA_INLINE HRESULT ma_IDirectSoundCapture_GetCaps (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCCaps); } static MA_INLINE HRESULT ma_IDirectSoundCapture_Initialize (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); } /* IDirectSoundCaptureBuffer */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundCaptureBuffer* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundCaptureBuffer* pThis); /* IDirectSoundCaptureBuffer */ HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps); HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition); HRESULT (STDMETHODCALLTYPE * GetFormat) (ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten); HRESULT (STDMETHODCALLTYPE * GetStatus) (ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc); HRESULT (STDMETHODCALLTYPE * Lock) (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Start) (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IDirectSoundCaptureBuffer* pThis); HRESULT (STDMETHODCALLTYPE * Unlock) (ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2); } ma_IDirectSoundCaptureBufferVtbl; struct ma_IDirectSoundCaptureBuffer { ma_IDirectSoundCaptureBufferVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_QueryInterface(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundCaptureBuffer_AddRef(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundCaptureBuffer_Release(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCaps(ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCBCaps); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCurrentPosition(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCapturePosition, pReadPosition); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetFormat(ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetStatus(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus) { return pThis->lpVtbl->GetStatus(pThis, pStatus); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Initialize(ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSoundCapture, pDSCBufferDesc); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Lock(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Start(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags) { return pThis->lpVtbl->Start(pThis, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Stop(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Unlock(ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); } /* IDirectSoundNotify */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundNotify* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundNotify* pThis); /* IDirectSoundNotify */ HRESULT (STDMETHODCALLTYPE * SetNotificationPositions)(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies); } ma_IDirectSoundNotifyVtbl; struct ma_IDirectSoundNotify { ma_IDirectSoundNotifyVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundNotify_QueryInterface(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundNotify_AddRef(ma_IDirectSoundNotify* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundNotify_Release(ma_IDirectSoundNotify* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundNotify_SetNotificationPositions(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies) { return pThis->lpVtbl->SetNotificationPositions(pThis, dwPositionNotifies, pPositionNotifies); } typedef BOOL (CALLBACK * ma_DSEnumCallbackAProc) (GUID* pDeviceGUID, const char* pDeviceDescription, const char* pModule, void* pContext); typedef HRESULT (WINAPI * ma_DirectSoundCreateProc) (const GUID* pcGuidDevice, ma_IDirectSound** ppDS8, ma_IUnknown* pUnkOuter); typedef HRESULT (WINAPI * ma_DirectSoundEnumerateAProc) (ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext); typedef HRESULT (WINAPI * ma_DirectSoundCaptureCreateProc) (const GUID* pcGuidDevice, ma_IDirectSoundCapture** ppDSC8, ma_IUnknown* pUnkOuter); typedef HRESULT (WINAPI * ma_DirectSoundCaptureEnumerateAProc)(ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext); static ma_uint32 ma_get_best_sample_rate_within_range(ma_uint32 sampleRateMin, ma_uint32 sampleRateMax) { /* Normalize the range in case we were given something stupid. */ if (sampleRateMin < (ma_uint32)ma_standard_sample_rate_min) { sampleRateMin = (ma_uint32)ma_standard_sample_rate_min; } if (sampleRateMax > (ma_uint32)ma_standard_sample_rate_max) { sampleRateMax = (ma_uint32)ma_standard_sample_rate_max; } if (sampleRateMin > sampleRateMax) { sampleRateMin = sampleRateMax; } if (sampleRateMin == sampleRateMax) { return sampleRateMax; } else { size_t iStandardRate; for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate]; if (standardRate >= sampleRateMin && standardRate <= sampleRateMax) { return standardRate; } } } /* Should never get here. */ MA_ASSERT(MA_FALSE); return 0; } /* Retrieves the channel count and channel map for the given speaker configuration. If the speaker configuration is unknown, the channel count and channel map will be left unmodified. */ static void ma_get_channels_from_speaker_config__dsound(DWORD speakerConfig, WORD* pChannelsOut, DWORD* pChannelMapOut) { WORD channels; DWORD channelMap; channels = 0; if (pChannelsOut != NULL) { channels = *pChannelsOut; } channelMap = 0; if (pChannelMapOut != NULL) { channelMap = *pChannelMapOut; } /* The speaker configuration is a combination of speaker config and speaker geometry. The lower 8 bits is what we care about. The upper 16 bits is for the geometry. */ switch ((BYTE)(speakerConfig)) { case 1 /*DSSPEAKER_HEADPHONE*/: channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break; case 2 /*DSSPEAKER_MONO*/: channels = 1; channelMap = SPEAKER_FRONT_CENTER; break; case 3 /*DSSPEAKER_QUAD*/: channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break; case 4 /*DSSPEAKER_STEREO*/: channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break; case 5 /*DSSPEAKER_SURROUND*/: channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER; break; case 6 /*DSSPEAKER_5POINT1_BACK*/ /*DSSPEAKER_5POINT1*/: channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break; case 7 /*DSSPEAKER_7POINT1_WIDE*/ /*DSSPEAKER_7POINT1*/: channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER; break; case 8 /*DSSPEAKER_7POINT1_SURROUND*/: channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break; case 9 /*DSSPEAKER_5POINT1_SURROUND*/: channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break; default: break; } if (pChannelsOut != NULL) { *pChannelsOut = channels; } if (pChannelMapOut != NULL) { *pChannelMapOut = channelMap; } } static ma_result ma_context_create_IDirectSound__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSound** ppDirectSound) { ma_IDirectSound* pDirectSound; HWND hWnd; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDirectSound != NULL); *ppDirectSound = NULL; pDirectSound = NULL; if (FAILED(((ma_DirectSoundCreateProc)pContext->dsound.DirectSoundCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSound, NULL))) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] DirectSoundCreate() failed for playback device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* The cooperative level must be set before doing anything else. */ hWnd = (HWND)pContext->dsound.hWnd; if (hWnd == 0) { hWnd = ((MA_PFN_GetForegroundWindow)pContext->win32.GetForegroundWindow)(); if (hWnd == 0) { hWnd = ((MA_PFN_GetDesktopWindow)pContext->win32.GetDesktopWindow)(); } } hr = ma_IDirectSound_SetCooperativeLevel(pDirectSound, hWnd, (shareMode == ma_share_mode_exclusive) ? MA_DSSCL_EXCLUSIVE : MA_DSSCL_PRIORITY); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_SetCooperateiveLevel() failed for playback device."); return ma_result_from_HRESULT(hr); } *ppDirectSound = pDirectSound; return MA_SUCCESS; } static ma_result ma_context_create_IDirectSoundCapture__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSoundCapture** ppDirectSoundCapture) { ma_IDirectSoundCapture* pDirectSoundCapture; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDirectSoundCapture != NULL); /* DirectSound does not support exclusive mode for capture. */ if (shareMode == ma_share_mode_exclusive) { return MA_SHARE_MODE_NOT_SUPPORTED; } *ppDirectSoundCapture = NULL; pDirectSoundCapture = NULL; hr = ((ma_DirectSoundCaptureCreateProc)pContext->dsound.DirectSoundCaptureCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSoundCapture, NULL); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] DirectSoundCaptureCreate() failed for capture device."); return ma_result_from_HRESULT(hr); } *ppDirectSoundCapture = pDirectSoundCapture; return MA_SUCCESS; } static ma_result ma_context_get_format_info_for_IDirectSoundCapture__dsound(ma_context* pContext, ma_IDirectSoundCapture* pDirectSoundCapture, WORD* pChannels, WORD* pBitsPerSample, DWORD* pSampleRate) { HRESULT hr; MA_DSCCAPS caps; WORD bitsPerSample; DWORD sampleRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pDirectSoundCapture != NULL); if (pChannels) { *pChannels = 0; } if (pBitsPerSample) { *pBitsPerSample = 0; } if (pSampleRate) { *pSampleRate = 0; } MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSoundCapture_GetCaps(pDirectSoundCapture, &caps); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCapture_GetCaps() failed for capture device."); return ma_result_from_HRESULT(hr); } if (pChannels) { *pChannels = (WORD)caps.dwChannels; } /* The device can support multiple formats. We just go through the different formats in order of priority and pick the first one. This the same type of system as the WinMM backend. */ bitsPerSample = 16; sampleRate = 48000; if (caps.dwChannels == 1) { if ((caps.dwFormats & WAVE_FORMAT_48M16) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44M16) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2M16) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1M16) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96M16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((caps.dwFormats & WAVE_FORMAT_48M08) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44M08) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2M08) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1M08) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96M08) != 0) { sampleRate = 96000; } else { bitsPerSample = 16; /* Didn't find it. Just fall back to 16-bit. */ } } } else if (caps.dwChannels == 2) { if ((caps.dwFormats & WAVE_FORMAT_48S16) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44S16) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2S16) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1S16) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96S16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((caps.dwFormats & WAVE_FORMAT_48S08) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44S08) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2S08) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1S08) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96S08) != 0) { sampleRate = 96000; } else { bitsPerSample = 16; /* Didn't find it. Just fall back to 16-bit. */ } } } if (pBitsPerSample) { *pBitsPerSample = bitsPerSample; } if (pSampleRate) { *pSampleRate = sampleRate; } return MA_SUCCESS; } typedef struct { ma_context* pContext; ma_device_type deviceType; ma_enum_devices_callback_proc callback; void* pUserData; ma_bool32 terminated; } ma_context_enumerate_devices_callback_data__dsound; static BOOL CALLBACK ma_context_enumerate_devices_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext) { ma_context_enumerate_devices_callback_data__dsound* pData = (ma_context_enumerate_devices_callback_data__dsound*)lpContext; ma_device_info deviceInfo; (void)lpcstrModule; MA_ZERO_OBJECT(&deviceInfo); /* ID. */ if (lpGuid != NULL) { MA_COPY_MEMORY(deviceInfo.id.dsound, lpGuid, 16); } else { MA_ZERO_MEMORY(deviceInfo.id.dsound, 16); deviceInfo.isDefault = MA_TRUE; } /* Name / Description */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), lpcstrDescription, (size_t)-1); /* Call the callback function, but make sure we stop enumerating if the callee requested so. */ MA_ASSERT(pData != NULL); pData->terminated = (pData->callback(pData->pContext, pData->deviceType, &deviceInfo, pData->pUserData) == MA_FALSE); if (pData->terminated) { return FALSE; /* Stop enumeration. */ } else { return TRUE; /* Continue enumeration. */ } } static ma_result ma_context_enumerate_devices__dsound(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_context_enumerate_devices_callback_data__dsound data; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); data.pContext = pContext; data.callback = callback; data.pUserData = pUserData; data.terminated = MA_FALSE; /* Playback. */ if (!data.terminated) { data.deviceType = ma_device_type_playback; ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data); } /* Capture. */ if (!data.terminated) { data.deviceType = ma_device_type_capture; ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data); } return MA_SUCCESS; } typedef struct { const ma_device_id* pDeviceID; ma_device_info* pDeviceInfo; ma_bool32 found; } ma_context_get_device_info_callback_data__dsound; static BOOL CALLBACK ma_context_get_device_info_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext) { ma_context_get_device_info_callback_data__dsound* pData = (ma_context_get_device_info_callback_data__dsound*)lpContext; MA_ASSERT(pData != NULL); if ((pData->pDeviceID == NULL || ma_is_guid_null(pData->pDeviceID->dsound)) && (lpGuid == NULL || ma_is_guid_null(lpGuid))) { /* Default device. */ ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1); pData->pDeviceInfo->isDefault = MA_TRUE; pData->found = MA_TRUE; return FALSE; /* Stop enumeration. */ } else { /* Not the default device. */ if (lpGuid != NULL && pData->pDeviceID != NULL) { if (memcmp(pData->pDeviceID->dsound, lpGuid, sizeof(pData->pDeviceID->dsound)) == 0) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1); pData->found = MA_TRUE; return FALSE; /* Stop enumeration. */ } } } (void)lpcstrModule; return TRUE; } static ma_result ma_context_get_device_info__dsound(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; HRESULT hr; if (pDeviceID != NULL) { ma_context_get_device_info_callback_data__dsound data; /* ID. */ MA_COPY_MEMORY(pDeviceInfo->id.dsound, pDeviceID->dsound, 16); /* Name / Description. This is retrieved by enumerating over each device until we find that one that matches the input ID. */ data.pDeviceID = pDeviceID; data.pDeviceInfo = pDeviceInfo; data.found = MA_FALSE; if (deviceType == ma_device_type_playback) { ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_get_device_info_callback__dsound, &data); } else { ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_get_device_info_callback__dsound, &data); } if (!data.found) { return MA_NO_DEVICE; } } else { /* I don't think there's a way to get the name of the default device with DirectSound. In this case we just need to use defaults. */ /* ID */ MA_ZERO_MEMORY(pDeviceInfo->id.dsound, 16); /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; } /* Retrieving detailed information is slightly different depending on the device type. */ if (deviceType == ma_device_type_playback) { /* Playback. */ ma_IDirectSound* pDirectSound; MA_DSCAPS caps; WORD channels; result = ma_context_create_IDirectSound__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSound); if (result != MA_SUCCESS) { return result; } MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSound_GetCaps(pDirectSound, &caps); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_GetCaps() failed for playback device."); return ma_result_from_HRESULT(hr); } /* Channels. Only a single channel count is reported for DirectSound. */ if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) { /* It supports at least stereo, but could support more. */ DWORD speakerConfig; channels = 2; /* Look at the speaker configuration to get a better idea on the channel count. */ hr = ma_IDirectSound_GetSpeakerConfig(pDirectSound, &speakerConfig); if (SUCCEEDED(hr)) { ma_get_channels_from_speaker_config__dsound(speakerConfig, &channels, NULL); } } else { /* It does not support stereo, which means we are stuck with mono. */ channels = 1; } /* In DirectSound, our native formats are centered around sample rates. All formats are supported, and we're only reporting a single channel count. However, DirectSound can report a range of supported sample rates. We're only going to include standard rates known by miniaudio in order to keep the size of this within reason. */ if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) { /* Multiple sample rates are supported. We'll report in order of our preferred sample rates. */ size_t iStandardSampleRate; for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) { ma_uint32 sampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate]; if (sampleRate >= caps.dwMinSecondarySampleRate && sampleRate <= caps.dwMaxSecondarySampleRate) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } } } else { /* Only a single sample rate is supported. */ pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = caps.dwMaxSecondarySampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } ma_IDirectSound_Release(pDirectSound); } else { /* Capture. This is a little different to playback due to the say the supported formats are reported. Technically capture devices can support a number of different formats, but for simplicity and consistency with ma_device_init() I'm just reporting the best format. */ ma_IDirectSoundCapture* pDirectSoundCapture; WORD channels; WORD bitsPerSample; DWORD sampleRate; result = ma_context_create_IDirectSoundCapture__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSoundCapture); if (result != MA_SUCCESS) { return result; } result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pContext, pDirectSoundCapture, &channels, &bitsPerSample, &sampleRate); if (result != MA_SUCCESS) { ma_IDirectSoundCapture_Release(pDirectSoundCapture); return result; } ma_IDirectSoundCapture_Release(pDirectSoundCapture); /* The format is always an integer format and is based on the bits per sample. */ if (bitsPerSample == 8) { pDeviceInfo->nativeDataFormats[0].format = ma_format_u8; } else if (bitsPerSample == 16) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s16; } else if (bitsPerSample == 24) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s24; } else if (bitsPerSample == 32) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s32; } else { return MA_FORMAT_NOT_SUPPORTED; } pDeviceInfo->nativeDataFormats[0].channels = channels; pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; } return MA_SUCCESS; } static ma_result ma_device_uninit__dsound(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->dsound.pCaptureBuffer != NULL) { ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); } if (pDevice->dsound.pCapture != NULL) { ma_IDirectSoundCapture_Release((ma_IDirectSoundCapture*)pDevice->dsound.pCapture); } if (pDevice->dsound.pPlaybackBuffer != NULL) { ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer); } if (pDevice->dsound.pPlaybackPrimaryBuffer != NULL) { ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer); } if (pDevice->dsound.pPlayback != NULL) { ma_IDirectSound_Release((ma_IDirectSound*)pDevice->dsound.pPlayback); } return MA_SUCCESS; } static ma_result ma_config_to_WAVEFORMATEXTENSIBLE(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* pChannelMap, MA_WAVEFORMATEXTENSIBLE* pWF) { GUID subformat; if (format == ma_format_unknown) { format = MA_DEFAULT_FORMAT; } if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } switch (format) { case ma_format_u8: case ma_format_s16: case ma_format_s24: /*case ma_format_s24_32:*/ case ma_format_s32: { subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; } break; case ma_format_f32: { subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; } break; default: return MA_FORMAT_NOT_SUPPORTED; } MA_ZERO_OBJECT(pWF); pWF->cbSize = sizeof(*pWF); pWF->wFormatTag = WAVE_FORMAT_EXTENSIBLE; pWF->nChannels = (WORD)channels; pWF->nSamplesPerSec = (DWORD)sampleRate; pWF->wBitsPerSample = (WORD)(ma_get_bytes_per_sample(format)*8); pWF->nBlockAlign = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8); pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec; pWF->Samples.wValidBitsPerSample = pWF->wBitsPerSample; pWF->dwChannelMask = ma_channel_map_to_channel_mask__win32(pChannelMap, channels); pWF->SubFormat = subformat; return MA_SUCCESS; } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__dsound(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* DirectSound has a minimum period size of 20ms. In practice, this doesn't seem to be enough for reliable glitch-free processing so going to use 30ms instead. */ ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(30, nativeSampleRate); ma_uint32 periodSizeInFrames; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile); if (periodSizeInFrames < minPeriodSizeInFrames) { periodSizeInFrames = minPeriodSizeInFrames; } return periodSizeInFrames; } static ma_result ma_device_init__dsound(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; HRESULT hr; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->dsound); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* Unfortunately DirectSound uses different APIs and data structures for playback and capture devices. We need to initialize the capture device first because we'll want to match its buffer size and period count on the playback side if we're using full-duplex mode. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEFORMATEXTENSIBLE wf; MA_DSCBUFFERDESC descDS; ma_uint32 periodSizeInFrames; ma_uint32 periodCount; char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */ MA_WAVEFORMATEXTENSIBLE* pActualFormat; result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &wf); if (result != MA_SUCCESS) { return result; } result = ma_context_create_IDirectSoundCapture__dsound(pDevice->pContext, pDescriptorCapture->shareMode, pDescriptorCapture->pDeviceID, (ma_IDirectSoundCapture**)&pDevice->dsound.pCapture); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pDevice->pContext, (ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &wf.nChannels, &wf.wBitsPerSample, &wf.nSamplesPerSec); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; wf.Samples.wValidBitsPerSample = wf.wBitsPerSample; wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; /* The size of the buffer must be a clean multiple of the period count. */ periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorCapture, wf.nSamplesPerSec, pConfig->performanceProfile); periodCount = (pDescriptorCapture->periodCount > 0) ? pDescriptorCapture->periodCount : MA_DEFAULT_PERIODS; MA_ZERO_OBJECT(&descDS); descDS.dwSize = sizeof(descDS); descDS.dwFlags = 0; descDS.dwBufferBytes = periodSizeInFrames * periodCount * wf.nBlockAlign; descDS.lpwfxFormat = (MA_WAVEFORMATEX*)&wf; hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCapture_CreateCaptureBuffer() failed for capture device."); return ma_result_from_HRESULT(hr); } /* Get the _actual_ properties of the buffer. */ pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata; hr = ma_IDirectSoundCaptureBuffer_GetFormat((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to retrieve the actual format of the capture device's buffer."); return ma_result_from_HRESULT(hr); } /* We can now start setting the output data formats. */ pDescriptorCapture->format = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat); pDescriptorCapture->channels = pActualFormat->nChannels; pDescriptorCapture->sampleRate = pActualFormat->nSamplesPerSec; /* Get the native channel map based on the channel mask. */ if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap); } else { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap); } /* After getting the actual format the size of the buffer in frames may have actually changed. However, we want this to be as close to what the user has asked for as possible, so let's go ahead and release the old capture buffer and create a new one in this case. */ if (periodSizeInFrames != (descDS.dwBufferBytes / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / periodCount)) { descDS.dwBufferBytes = periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * periodCount; ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Second attempt at IDirectSoundCapture_CreateCaptureBuffer() failed for capture device."); return ma_result_from_HRESULT(hr); } } /* DirectSound should give us a buffer exactly the size we asked for. */ pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = periodCount; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEFORMATEXTENSIBLE wf; MA_DSBUFFERDESC descDSPrimary; MA_DSCAPS caps; char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */ MA_WAVEFORMATEXTENSIBLE* pActualFormat; ma_uint32 periodSizeInFrames; ma_uint32 periodCount; MA_DSBUFFERDESC descDS; WORD nativeChannelCount; DWORD nativeChannelMask = 0; result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &wf); if (result != MA_SUCCESS) { return result; } result = ma_context_create_IDirectSound__dsound(pDevice->pContext, pDescriptorPlayback->shareMode, pDescriptorPlayback->pDeviceID, (ma_IDirectSound**)&pDevice->dsound.pPlayback); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } MA_ZERO_OBJECT(&descDSPrimary); descDSPrimary.dwSize = sizeof(MA_DSBUFFERDESC); descDSPrimary.dwFlags = MA_DSBCAPS_PRIMARYBUFFER | MA_DSBCAPS_CTRLVOLUME; hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDSPrimary, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackPrimaryBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's primary buffer."); return ma_result_from_HRESULT(hr); } /* We may want to make some adjustments to the format if we are using defaults. */ MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSound_GetCaps((ma_IDirectSound*)pDevice->dsound.pPlayback, &caps); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_GetCaps() failed for playback device."); return ma_result_from_HRESULT(hr); } if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) { DWORD speakerConfig; /* It supports at least stereo, but could support more. */ nativeChannelCount = 2; /* Look at the speaker configuration to get a better idea on the channel count. */ if (SUCCEEDED(ma_IDirectSound_GetSpeakerConfig((ma_IDirectSound*)pDevice->dsound.pPlayback, &speakerConfig))) { ma_get_channels_from_speaker_config__dsound(speakerConfig, &nativeChannelCount, &nativeChannelMask); } } else { /* It does not support stereo, which means we are stuck with mono. */ nativeChannelCount = 1; nativeChannelMask = 0x00000001; } if (pDescriptorPlayback->channels == 0) { wf.nChannels = nativeChannelCount; wf.dwChannelMask = nativeChannelMask; } if (pDescriptorPlayback->sampleRate == 0) { /* We base the sample rate on the values returned by GetCaps(). */ if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) { wf.nSamplesPerSec = ma_get_best_sample_rate_within_range(caps.dwMinSecondarySampleRate, caps.dwMaxSecondarySampleRate); } else { wf.nSamplesPerSec = caps.dwMaxSecondarySampleRate; } } wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; /* From MSDN: The method succeeds even if the hardware does not support the requested format; DirectSound sets the buffer to the closest supported format. To determine whether this has happened, an application can call the GetFormat method for the primary buffer and compare the result with the format that was requested with the SetFormat method. */ hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf); if (FAILED(hr)) { /* If setting of the format failed we'll try again with some fallback settings. On Windows 98 I have observed that IEEE_FLOAT does not work. We'll therefore enforce PCM. I also had issues where a sample rate of 48000 did not work correctly. Not sure if it was a driver issue or not, but will use 44100 for the sample rate. */ wf.cbSize = 18; /* NOTE: Don't use sizeof(MA_WAVEFORMATEX) here because it's got an extra 2 bytes due to padding. */ wf.wFormatTag = WAVE_FORMAT_PCM; wf.wBitsPerSample = 16; wf.nChannels = nativeChannelCount; wf.nSamplesPerSec = 44100; wf.nBlockAlign = wf.nChannels * (wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to set format of playback device's primary buffer."); return ma_result_from_HRESULT(hr); } } /* Get the _actual_ properties of the buffer. */ pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata; hr = ma_IDirectSoundBuffer_GetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to retrieve the actual format of the playback device's primary buffer."); return ma_result_from_HRESULT(hr); } /* We now have enough information to start setting some output properties. */ pDescriptorPlayback->format = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat); pDescriptorPlayback->channels = pActualFormat->nChannels; pDescriptorPlayback->sampleRate = pActualFormat->nSamplesPerSec; /* Get the internal channel map based on the channel mask. */ if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap); } else { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap); } /* The size of the buffer must be a clean multiple of the period count. */ periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); periodCount = (pDescriptorPlayback->periodCount > 0) ? pDescriptorPlayback->periodCount : MA_DEFAULT_PERIODS; /* Meaning of dwFlags (from MSDN): DSBCAPS_CTRLPOSITIONNOTIFY The buffer has position notification capability. DSBCAPS_GLOBALFOCUS With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to another application, even if the new application uses DirectSound. DSBCAPS_GETCURRENTPOSITION2 In the first version of DirectSound, the play cursor was significantly ahead of the actual playing sound on emulated sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the application can get a more accurate play cursor. */ MA_ZERO_OBJECT(&descDS); descDS.dwSize = sizeof(descDS); descDS.dwFlags = MA_DSBCAPS_CTRLPOSITIONNOTIFY | MA_DSBCAPS_GLOBALFOCUS | MA_DSBCAPS_GETCURRENTPOSITION2; descDS.dwBufferBytes = periodSizeInFrames * periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels); descDS.lpwfxFormat = (MA_WAVEFORMATEX*)pActualFormat; hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDS, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's secondary buffer."); return ma_result_from_HRESULT(hr); } /* DirectSound should give us a buffer exactly the size we asked for. */ pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = periodCount; } return MA_SUCCESS; } static ma_result ma_device_data_loop__dsound(ma_device* pDevice) { ma_result result = MA_SUCCESS; ma_uint32 bpfDeviceCapture = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 bpfDevicePlayback = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); HRESULT hr; DWORD lockOffsetInBytesCapture; DWORD lockSizeInBytesCapture; DWORD mappedSizeInBytesCapture; DWORD mappedDeviceFramesProcessedCapture; void* pMappedDeviceBufferCapture; DWORD lockOffsetInBytesPlayback; DWORD lockSizeInBytesPlayback; DWORD mappedSizeInBytesPlayback; void* pMappedDeviceBufferPlayback; DWORD prevReadCursorInBytesCapture = 0; DWORD prevPlayCursorInBytesPlayback = 0; ma_bool32 physicalPlayCursorLoopFlagPlayback = 0; DWORD virtualWriteCursorInBytesPlayback = 0; ma_bool32 virtualWriteCursorLoopFlagPlayback = 0; ma_bool32 isPlaybackDeviceStarted = MA_FALSE; ma_uint32 framesWrittenToPlaybackDevice = 0; /* For knowing whether or not the playback device needs to be started. */ ma_uint32 waitTimeInMilliseconds = 1; DWORD playbackBufferStatus = 0; MA_ASSERT(pDevice != NULL); /* The first thing to do is start the capture device. The playback device is only started after the first period is written. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { hr = ma_IDirectSoundCaptureBuffer_Start((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, MA_DSCBSTART_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCaptureBuffer_Start() failed."); return ma_result_from_HRESULT(hr); } } while (ma_device_get_state(pDevice) == ma_device_state_started) { switch (pDevice->type) { case ma_device_type_duplex: { DWORD physicalCaptureCursorInBytes; DWORD physicalReadCursorInBytes; hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } /* If nothing is available we just sleep for a bit and return from this iteration. */ if (physicalReadCursorInBytes == prevReadCursorInBytesCapture) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } /* The current position has moved. We need to map all of the captured samples and write them to the playback device, making sure we don't return until every frame has been copied over. */ if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) { /* The capture position has not looped. This is the simple case. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (physicalReadCursorInBytes - prevReadCursorInBytesCapture); } else { /* The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything, do it again from the start. */ if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) { /* Lock up to the end of the buffer. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture; } else { /* Lock starting from the start of the buffer. */ lockOffsetInBytesCapture = 0; lockSizeInBytesCapture = physicalReadCursorInBytes; } } if (lockSizeInBytesCapture == 0) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from capture device in preparation for writing to the device."); return ma_result_from_HRESULT(hr); } /* At this point we have some input data that we need to output. We do not return until every mapped frame of the input data is written to the playback device. */ mappedDeviceFramesProcessedCapture = 0; for (;;) { /* Keep writing to the playback device. */ ma_uint8 inputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 inputFramesInClientFormatCap = sizeof(inputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint8 outputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 outputFramesInClientFormatCap = sizeof(outputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint32 outputFramesInClientFormatCount; ma_uint32 outputFramesInClientFormatConsumed = 0; ma_uint64 clientCapturedFramesToProcess = ma_min(inputFramesInClientFormatCap, outputFramesInClientFormatCap); ma_uint64 deviceCapturedFramesToProcess = (mappedSizeInBytesCapture / bpfDeviceCapture) - mappedDeviceFramesProcessedCapture; void* pRunningMappedDeviceBufferCapture = ma_offset_ptr(pMappedDeviceBufferCapture, mappedDeviceFramesProcessedCapture * bpfDeviceCapture); result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningMappedDeviceBufferCapture, &deviceCapturedFramesToProcess, inputFramesInClientFormat, &clientCapturedFramesToProcess); if (result != MA_SUCCESS) { break; } outputFramesInClientFormatCount = (ma_uint32)clientCapturedFramesToProcess; mappedDeviceFramesProcessedCapture += (ma_uint32)deviceCapturedFramesToProcess; ma_device__handle_data_callback(pDevice, outputFramesInClientFormat, inputFramesInClientFormat, (ma_uint32)clientCapturedFramesToProcess); /* At this point we have input and output data in client format. All we need to do now is convert it to the output device format. This may take a few passes. */ for (;;) { ma_uint32 framesWrittenThisIteration; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; DWORD availableBytesPlayback; DWORD silentPaddingInBytes = 0; /* <-- Must be initialized to 0. */ /* We need the physical play and write cursors. */ if (FAILED(ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes))) { break; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */ if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback): Play cursor has moved in front of the write cursor (same loop iteration). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } /* If there's no room available for writing we need to wait for more. */ if (availableBytesPlayback == 0) { /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */ if (!isPlaybackDeviceStarted) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } else { ma_sleep(waitTimeInMilliseconds); continue; } } /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */ lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. Go up to the end of the buffer. */ lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; } else { /* Different loop iterations. Go up to the physical play cursor. */ lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from playback device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); break; } /* Experiment: If the playback buffer is being starved, pad it with some silence to get it back in sync. This will cause a glitch, but it may prevent endless glitching due to it constantly running out of data. */ if (isPlaybackDeviceStarted) { DWORD bytesQueuedForPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - availableBytesPlayback; if (bytesQueuedForPlayback < (pDevice->playback.internalPeriodSizeInFrames*bpfDevicePlayback)) { silentPaddingInBytes = (pDevice->playback.internalPeriodSizeInFrames*2*bpfDevicePlayback) - bytesQueuedForPlayback; if (silentPaddingInBytes > lockSizeInBytesPlayback) { silentPaddingInBytes = lockSizeInBytesPlayback; } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback) Playback buffer starved. availableBytesPlayback=%ld, silentPaddingInBytes=%ld\n", availableBytesPlayback, silentPaddingInBytes); } } /* At this point we have a buffer for output. */ if (silentPaddingInBytes > 0) { MA_ZERO_MEMORY(pMappedDeviceBufferPlayback, silentPaddingInBytes); framesWrittenThisIteration = silentPaddingInBytes/bpfDevicePlayback; } else { ma_uint64 convertedFrameCountIn = (outputFramesInClientFormatCount - outputFramesInClientFormatConsumed); ma_uint64 convertedFrameCountOut = mappedSizeInBytesPlayback/bpfDevicePlayback; void* pConvertedFramesIn = ma_offset_ptr(outputFramesInClientFormat, outputFramesInClientFormatConsumed * bpfDevicePlayback); void* pConvertedFramesOut = pMappedDeviceBufferPlayback; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pConvertedFramesIn, &convertedFrameCountIn, pConvertedFramesOut, &convertedFrameCountOut); if (result != MA_SUCCESS) { break; } outputFramesInClientFormatConsumed += (ma_uint32)convertedFrameCountOut; framesWrittenThisIteration = (ma_uint32)convertedFrameCountOut; } hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, framesWrittenThisIteration*bpfDevicePlayback, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from playback device after writing to the device."); result = ma_result_from_HRESULT(hr); break; } virtualWriteCursorInBytesPlayback += framesWrittenThisIteration*bpfDevicePlayback; if ((virtualWriteCursorInBytesPlayback/bpfDevicePlayback) == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods) { virtualWriteCursorInBytesPlayback = 0; virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback; } /* We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds a bit of a buffer to prevent the playback buffer from getting starved. */ framesWrittenToPlaybackDevice += framesWrittenThisIteration; if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= (pDevice->playback.internalPeriodSizeInFrames*2)) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } if (framesWrittenThisIteration < mappedSizeInBytesPlayback/bpfDevicePlayback) { break; /* We're finished with the output data.*/ } } if (clientCapturedFramesToProcess == 0) { break; /* We just consumed every input sample. */ } } /* At this point we're done with the mapped portion of the capture buffer. */ hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from capture device after reading from the device."); return ma_result_from_HRESULT(hr); } prevReadCursorInBytesCapture = (lockOffsetInBytesCapture + mappedSizeInBytesCapture); } break; case ma_device_type_capture: { DWORD physicalCaptureCursorInBytes; DWORD physicalReadCursorInBytes; hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes); if (FAILED(hr)) { return MA_ERROR; } /* If the previous capture position is the same as the current position we need to wait a bit longer. */ if (prevReadCursorInBytesCapture == physicalReadCursorInBytes) { ma_sleep(waitTimeInMilliseconds); continue; } /* Getting here means we have capture data available. */ if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) { /* The capture position has not looped. This is the simple case. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (physicalReadCursorInBytes - prevReadCursorInBytesCapture); } else { /* The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything, do it again from the start. */ if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) { /* Lock up to the end of the buffer. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture; } else { /* Lock starting from the start of the buffer. */ lockOffsetInBytesCapture = 0; lockSizeInBytesCapture = physicalReadCursorInBytes; } } if (lockSizeInBytesCapture < pDevice->capture.internalPeriodSizeInFrames) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from capture device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); } if (lockSizeInBytesCapture != mappedSizeInBytesCapture) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[DirectSound] (Capture) lockSizeInBytesCapture=%ld != mappedSizeInBytesCapture=%ld\n", lockSizeInBytesCapture, mappedSizeInBytesCapture); } ma_device__send_frames_to_client(pDevice, mappedSizeInBytesCapture/bpfDeviceCapture, pMappedDeviceBufferCapture); hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from capture device after reading from the device."); return ma_result_from_HRESULT(hr); } prevReadCursorInBytesCapture = lockOffsetInBytesCapture + mappedSizeInBytesCapture; if (prevReadCursorInBytesCapture == (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture)) { prevReadCursorInBytesCapture = 0; } } break; case ma_device_type_playback: { DWORD availableBytesPlayback; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes); if (FAILED(hr)) { break; } hr = ma_IDirectSoundBuffer_GetStatus((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &playbackBufferStatus); if (SUCCEEDED(hr) && (playbackBufferStatus & MA_DSBSTATUS_PLAYING) == 0 && isPlaybackDeviceStarted) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[DirectSound] Attempting to resume audio due to state: %d.", (int)playbackBufferStatus); hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed after attempting to resume from state %d.", (int)playbackBufferStatus); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; ma_sleep(waitTimeInMilliseconds); continue; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */ if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Playback): Play cursor has moved in front of the write cursor (same loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } /* If there's no room available for writing we need to wait for more. */ if (availableBytesPlayback < pDevice->playback.internalPeriodSizeInFrames) { /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */ if (availableBytesPlayback == 0 && !isPlaybackDeviceStarted) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } else { ma_sleep(waitTimeInMilliseconds); continue; } } /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */ lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. Go up to the end of the buffer. */ lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; } else { /* Different loop iterations. Go up to the physical play cursor. */ lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from playback device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); break; } /* At this point we have a buffer for output. */ ma_device__read_frames_from_client(pDevice, (mappedSizeInBytesPlayback/bpfDevicePlayback), pMappedDeviceBufferPlayback); hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, mappedSizeInBytesPlayback, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from playback device after writing to the device."); result = ma_result_from_HRESULT(hr); break; } virtualWriteCursorInBytesPlayback += mappedSizeInBytesPlayback; if (virtualWriteCursorInBytesPlayback == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) { virtualWriteCursorInBytesPlayback = 0; virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback; } /* We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds a bit of a buffer to prevent the playback buffer from getting starved. */ framesWrittenToPlaybackDevice += mappedSizeInBytesPlayback/bpfDevicePlayback; if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= pDevice->playback.internalPeriodSizeInFrames) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } } break; default: return MA_INVALID_ARGS; /* Invalid device type. */ } if (result != MA_SUCCESS) { return result; } } /* Getting here means the device is being stopped. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { hr = ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCaptureBuffer_Stop() failed."); return ma_result_from_HRESULT(hr); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* The playback device should be drained before stopping. All we do is wait until the available bytes is equal to the size of the buffer. */ if (isPlaybackDeviceStarted) { for (;;) { DWORD availableBytesPlayback = 0; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes); if (FAILED(hr)) { break; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { break; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { break; } } if (availableBytesPlayback >= (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback)) { break; } ma_sleep(waitTimeInMilliseconds); } } hr = ma_IDirectSoundBuffer_Stop((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Stop() failed."); return ma_result_from_HRESULT(hr); } ma_IDirectSoundBuffer_SetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0); } return MA_SUCCESS; } static ma_result ma_context_uninit__dsound(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_dsound); ma_dlclose(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL); return MA_SUCCESS; } static ma_result ma_context_init__dsound(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pContext->dsound.hDSoundDLL = ma_dlopen(ma_context_get_log(pContext), "dsound.dll"); if (pContext->dsound.hDSoundDLL == NULL) { return MA_API_NOT_FOUND; } pContext->dsound.DirectSoundCreate = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCreate"); pContext->dsound.DirectSoundEnumerateA = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundEnumerateA"); pContext->dsound.DirectSoundCaptureCreate = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCaptureCreate"); pContext->dsound.DirectSoundCaptureEnumerateA = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCaptureEnumerateA"); /* We need to support all functions or nothing. DirectSound with Windows 95 seems to not work too well in my testing. For example, it's missing DirectSoundCaptureEnumerateA(). This is a convenient place to just disable the DirectSound backend for Windows 95. */ if (pContext->dsound.DirectSoundCreate == NULL || pContext->dsound.DirectSoundEnumerateA == NULL || pContext->dsound.DirectSoundCaptureCreate == NULL || pContext->dsound.DirectSoundCaptureEnumerateA == NULL) { return MA_API_NOT_FOUND; } pContext->dsound.hWnd = pConfig->dsound.hWnd; pCallbacks->onContextInit = ma_context_init__dsound; pCallbacks->onContextUninit = ma_context_uninit__dsound; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__dsound; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__dsound; pCallbacks->onDeviceInit = ma_device_init__dsound; pCallbacks->onDeviceUninit = ma_device_uninit__dsound; pCallbacks->onDeviceStart = NULL; /* Not used. Started in onDeviceDataLoop. */ pCallbacks->onDeviceStop = NULL; /* Not used. Stopped in onDeviceDataLoop. */ pCallbacks->onDeviceRead = NULL; /* Not used. Data is read directly in onDeviceDataLoop. */ pCallbacks->onDeviceWrite = NULL; /* Not used. Data is written directly in onDeviceDataLoop. */ pCallbacks->onDeviceDataLoop = ma_device_data_loop__dsound; return MA_SUCCESS; } #endif /****************************************************************************** WinMM Backend ******************************************************************************/ #ifdef MA_HAS_WINMM /* Some build configurations will exclude the WinMM API. An example is when WIN32_LEAN_AND_MEAN is defined. We need to define the types and functions we need manually. */ #define MA_MMSYSERR_NOERROR 0 #define MA_MMSYSERR_ERROR 1 #define MA_MMSYSERR_BADDEVICEID 2 #define MA_MMSYSERR_INVALHANDLE 5 #define MA_MMSYSERR_NOMEM 7 #define MA_MMSYSERR_INVALFLAG 10 #define MA_MMSYSERR_INVALPARAM 11 #define MA_MMSYSERR_HANDLEBUSY 12 #define MA_CALLBACK_EVENT 0x00050000 #define MA_WAVE_ALLOWSYNC 0x0002 #define MA_WHDR_DONE 0x00000001 #define MA_WHDR_PREPARED 0x00000002 #define MA_WHDR_BEGINLOOP 0x00000004 #define MA_WHDR_ENDLOOP 0x00000008 #define MA_WHDR_INQUEUE 0x00000010 #define MA_MAXPNAMELEN 32 typedef void* MA_HWAVEIN; typedef void* MA_HWAVEOUT; typedef UINT MA_MMRESULT; typedef UINT MA_MMVERSION; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; } MA_WAVEINCAPSA; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; DWORD dwSupport; } MA_WAVEOUTCAPSA; typedef struct tagWAVEHDR { char* lpData; DWORD dwBufferLength; DWORD dwBytesRecorded; DWORD_PTR dwUser; DWORD dwFlags; DWORD dwLoops; struct tagWAVEHDR* lpNext; DWORD_PTR reserved; } MA_WAVEHDR; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; DWORD dwSupport; GUID ManufacturerGuid; GUID ProductGuid; GUID NameGuid; } MA_WAVEOUTCAPS2A; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; GUID ManufacturerGuid; GUID ProductGuid; GUID NameGuid; } MA_WAVEINCAPS2A; typedef UINT (WINAPI * MA_PFN_waveOutGetNumDevs)(void); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEOUTCAPSA* pwoc, UINT cbwoc); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutOpen)(MA_HWAVEOUT* phwo, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutClose)(MA_HWAVEOUT hwo); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutPrepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutUnprepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutWrite)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutReset)(MA_HWAVEOUT hwo); typedef UINT (WINAPI * MA_PFN_waveInGetNumDevs)(void); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEINCAPSA* pwic, UINT cbwic); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInOpen)(MA_HWAVEIN* phwi, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInClose)(MA_HWAVEIN hwi); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInPrepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInUnprepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInAddBuffer)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInStart)(MA_HWAVEIN hwi); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInReset)(MA_HWAVEIN hwi); static ma_result ma_result_from_MMRESULT(MA_MMRESULT resultMM) { switch (resultMM) { case MA_MMSYSERR_NOERROR: return MA_SUCCESS; case MA_MMSYSERR_BADDEVICEID: return MA_INVALID_ARGS; case MA_MMSYSERR_INVALHANDLE: return MA_INVALID_ARGS; case MA_MMSYSERR_NOMEM: return MA_OUT_OF_MEMORY; case MA_MMSYSERR_INVALFLAG: return MA_INVALID_ARGS; case MA_MMSYSERR_INVALPARAM: return MA_INVALID_ARGS; case MA_MMSYSERR_HANDLEBUSY: return MA_BUSY; case MA_MMSYSERR_ERROR: return MA_ERROR; default: return MA_ERROR; } } static char* ma_find_last_character(char* str, char ch) { char* last; if (str == NULL) { return NULL; } last = NULL; while (*str != '\0') { if (*str == ch) { last = str; } str += 1; } return last; } static ma_uint32 ma_get_period_size_in_bytes(ma_uint32 periodSizeInFrames, ma_format format, ma_uint32 channels) { return periodSizeInFrames * ma_get_bytes_per_frame(format, channels); } /* Our own "WAVECAPS" structure that contains generic information shared between WAVEOUTCAPS2 and WAVEINCAPS2 so we can do things generically and typesafely. Names are being kept the same for consistency. */ typedef struct { CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; GUID NameGuid; } MA_WAVECAPSA; static ma_result ma_get_best_info_from_formats_flags__winmm(DWORD dwFormats, WORD channels, WORD* pBitsPerSample, DWORD* pSampleRate) { WORD bitsPerSample = 0; DWORD sampleRate = 0; if (pBitsPerSample) { *pBitsPerSample = 0; } if (pSampleRate) { *pSampleRate = 0; } if (channels == 1) { bitsPerSample = 16; if ((dwFormats & WAVE_FORMAT_48M16) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44M16) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2M16) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1M16) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96M16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((dwFormats & WAVE_FORMAT_48M08) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44M08) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2M08) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1M08) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96M08) != 0) { sampleRate = 96000; } else { return MA_FORMAT_NOT_SUPPORTED; } } } else { bitsPerSample = 16; if ((dwFormats & WAVE_FORMAT_48S16) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44S16) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2S16) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1S16) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96S16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((dwFormats & WAVE_FORMAT_48S08) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44S08) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2S08) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1S08) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96S08) != 0) { sampleRate = 96000; } else { return MA_FORMAT_NOT_SUPPORTED; } } } if (pBitsPerSample) { *pBitsPerSample = bitsPerSample; } if (pSampleRate) { *pSampleRate = sampleRate; } return MA_SUCCESS; } static ma_result ma_formats_flags_to_WAVEFORMATEX__winmm(DWORD dwFormats, WORD channels, MA_WAVEFORMATEX* pWF) { ma_result result; MA_ASSERT(pWF != NULL); MA_ZERO_OBJECT(pWF); pWF->cbSize = sizeof(*pWF); pWF->wFormatTag = WAVE_FORMAT_PCM; pWF->nChannels = (WORD)channels; if (pWF->nChannels > 2) { pWF->nChannels = 2; } result = ma_get_best_info_from_formats_flags__winmm(dwFormats, channels, &pWF->wBitsPerSample, &pWF->nSamplesPerSec); if (result != MA_SUCCESS) { return result; } pWF->nBlockAlign = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8); pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec; return MA_SUCCESS; } static ma_result ma_context_get_device_info_from_WAVECAPS(ma_context* pContext, MA_WAVECAPSA* pCaps, ma_device_info* pDeviceInfo) { WORD bitsPerSample; DWORD sampleRate; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); /* Name / Description Unfortunately the name specified in WAVE(OUT/IN)CAPS2 is limited to 31 characters. This results in an unprofessional looking situation where the names of the devices are truncated. To help work around this, we need to look at the name GUID and try looking in the registry for the full name. If we can't find it there, we need to just fall back to the default name. */ /* Set the default to begin with. */ ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), pCaps->szPname, (size_t)-1); /* Now try the registry. There's a few things to consider here: - The name GUID can be null, in which we case we just need to stick to the original 31 characters. - If the name GUID is not present in the registry we'll also need to stick to the original 31 characters. - I like consistency, so I want the returned device names to be consistent with those returned by WASAPI and DirectSound. The problem, however is that WASAPI and DirectSound use " ()" format (such as "Speakers (High Definition Audio)"), but WinMM does not specify the component name. From my admittedly limited testing, I've notice the component name seems to usually fit within the 31 characters of the fixed sized buffer, so what I'm going to do is parse that string for the component name, and then concatenate the name from the registry. */ if (!ma_is_guid_null(&pCaps->NameGuid)) { WCHAR guidStrW[256]; if (((MA_PFN_StringFromGUID2)pContext->win32.StringFromGUID2)(&pCaps->NameGuid, guidStrW, ma_countof(guidStrW)) > 0) { char guidStr[256]; char keyStr[1024]; HKEY hKey; WideCharToMultiByte(CP_UTF8, 0, guidStrW, -1, guidStr, sizeof(guidStr), 0, FALSE); ma_strcpy_s(keyStr, sizeof(keyStr), "SYSTEM\\CurrentControlSet\\Control\\MediaCategories\\"); ma_strcat_s(keyStr, sizeof(keyStr), guidStr); if (((MA_PFN_RegOpenKeyExA)pContext->win32.RegOpenKeyExA)(HKEY_LOCAL_MACHINE, keyStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { BYTE nameFromReg[512]; DWORD nameFromRegSize = sizeof(nameFromReg); LONG resultWin32 = ((MA_PFN_RegQueryValueExA)pContext->win32.RegQueryValueExA)(hKey, "Name", 0, NULL, (BYTE*)nameFromReg, (DWORD*)&nameFromRegSize); ((MA_PFN_RegCloseKey)pContext->win32.RegCloseKey)(hKey); if (resultWin32 == ERROR_SUCCESS) { /* We have the value from the registry, so now we need to construct the name string. */ char name[1024]; if (ma_strcpy_s(name, sizeof(name), pDeviceInfo->name) == 0) { char* nameBeg = ma_find_last_character(name, '('); if (nameBeg != NULL) { size_t leadingLen = (nameBeg - name); ma_strncpy_s(nameBeg + 1, sizeof(name) - leadingLen, (const char*)nameFromReg, (size_t)-1); /* The closing ")", if it can fit. */ if (leadingLen + nameFromRegSize < sizeof(name)-1) { ma_strcat_s(name, sizeof(name), ")"); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), name, (size_t)-1); } } } } } } result = ma_get_best_info_from_formats_flags__winmm(pCaps->dwFormats, pCaps->wChannels, &bitsPerSample, &sampleRate); if (result != MA_SUCCESS) { return result; } if (bitsPerSample == 8) { pDeviceInfo->nativeDataFormats[0].format = ma_format_u8; } else if (bitsPerSample == 16) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s16; } else if (bitsPerSample == 24) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s24; } else if (bitsPerSample == 32) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s32; } else { return MA_FORMAT_NOT_SUPPORTED; } pDeviceInfo->nativeDataFormats[0].channels = pCaps->wChannels; pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; return MA_SUCCESS; } static ma_result ma_context_get_device_info_from_WAVEOUTCAPS2(ma_context* pContext, MA_WAVEOUTCAPS2A* pCaps, ma_device_info* pDeviceInfo) { MA_WAVECAPSA caps; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname)); caps.dwFormats = pCaps->dwFormats; caps.wChannels = pCaps->wChannels; caps.NameGuid = pCaps->NameGuid; return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo); } static ma_result ma_context_get_device_info_from_WAVEINCAPS2(ma_context* pContext, MA_WAVEINCAPS2A* pCaps, ma_device_info* pDeviceInfo) { MA_WAVECAPSA caps; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname)); caps.dwFormats = pCaps->dwFormats; caps.wChannels = pCaps->wChannels; caps.NameGuid = pCaps->NameGuid; return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo); } static ma_result ma_context_enumerate_devices__winmm(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { UINT playbackDeviceCount; UINT captureDeviceCount; UINT iPlaybackDevice; UINT iCaptureDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ playbackDeviceCount = ((MA_PFN_waveOutGetNumDevs)pContext->winmm.waveOutGetNumDevs)(); for (iPlaybackDevice = 0; iPlaybackDevice < playbackDeviceCount; ++iPlaybackDevice) { MA_MMRESULT result; MA_WAVEOUTCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(iPlaybackDevice, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.winmm = iPlaybackDevice; /* The first enumerated device is the default device. */ if (iPlaybackDevice == 0) { deviceInfo.isDefault = MA_TRUE; } if (ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { return MA_SUCCESS; /* Enumeration was stopped. */ } } } } /* Capture. */ captureDeviceCount = ((MA_PFN_waveInGetNumDevs)pContext->winmm.waveInGetNumDevs)(); for (iCaptureDevice = 0; iCaptureDevice < captureDeviceCount; ++iCaptureDevice) { MA_MMRESULT result; MA_WAVEINCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(iCaptureDevice, (MA_WAVEINCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.winmm = iCaptureDevice; /* The first enumerated device is the default device. */ if (iCaptureDevice == 0) { deviceInfo.isDefault = MA_TRUE; } if (ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { return MA_SUCCESS; /* Enumeration was stopped. */ } } } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__winmm(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { UINT winMMDeviceID; MA_ASSERT(pContext != NULL); winMMDeviceID = 0; if (pDeviceID != NULL) { winMMDeviceID = (UINT)pDeviceID->winmm; } pDeviceInfo->id.winmm = winMMDeviceID; /* The first ID is the default device. */ if (winMMDeviceID == 0) { pDeviceInfo->isDefault = MA_TRUE; } if (deviceType == ma_device_type_playback) { MA_MMRESULT result; MA_WAVEOUTCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(winMMDeviceID, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { return ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, pDeviceInfo); } } else { MA_MMRESULT result; MA_WAVEINCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(winMMDeviceID, (MA_WAVEINCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { return ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, pDeviceInfo); } } return MA_NO_DEVICE; } static ma_result ma_device_uninit__winmm(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); CloseHandle((HANDLE)pDevice->winmm.hEventCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); CloseHandle((HANDLE)pDevice->winmm.hEventPlayback); } ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks); MA_ZERO_OBJECT(&pDevice->winmm); /* Safety. */ return MA_SUCCESS; } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__winmm(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* WinMM has a minimum period size of 40ms. */ ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(40, nativeSampleRate); ma_uint32 periodSizeInFrames; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile); if (periodSizeInFrames < minPeriodSizeInFrames) { periodSizeInFrames = minPeriodSizeInFrames; } return periodSizeInFrames; } static ma_result ma_device_init__winmm(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { const char* errorMsg = ""; ma_result errorCode = MA_ERROR; ma_result result = MA_SUCCESS; ma_uint32 heapSize; UINT winMMDeviceIDPlayback = 0; UINT winMMDeviceIDCapture = 0; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->winmm); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with WinMM. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } if (pDescriptorPlayback->pDeviceID != NULL) { winMMDeviceIDPlayback = (UINT)pDescriptorPlayback->pDeviceID->winmm; } if (pDescriptorCapture->pDeviceID != NULL) { winMMDeviceIDCapture = (UINT)pDescriptorCapture->pDeviceID->winmm; } /* The capture device needs to be initialized first. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEINCAPSA caps; MA_WAVEFORMATEX wf; MA_MMRESULT resultMM; /* We use an event to know when a new fragment needs to be enqueued. */ pDevice->winmm.hEventCapture = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL); if (pDevice->winmm.hEventCapture == NULL) { errorMsg = "[WinMM] Failed to create event for fragment enqueuing for the capture device.", errorCode = ma_result_from_GetLastError(GetLastError()); goto on_error; } /* The format should be based on the device's actual format. */ if (((MA_PFN_waveInGetDevCapsA)pDevice->pContext->winmm.waveInGetDevCapsA)(winMMDeviceIDCapture, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MA_FORMAT_NOT_SUPPORTED; goto on_error; } result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf); if (result != MA_SUCCESS) { errorMsg = "[WinMM] Could not find appropriate format for internal device.", errorCode = result; goto on_error; } resultMM = ((MA_PFN_waveInOpen)pDevice->pContext->winmm.waveInOpen)((MA_HWAVEIN*)&pDevice->winmm.hDeviceCapture, winMMDeviceIDCapture, &wf, (DWORD_PTR)pDevice->winmm.hEventCapture, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC); if (resultMM != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to open capture device.", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE; goto on_error; } pDescriptorCapture->format = ma_format_from_WAVEFORMATEX(&wf); pDescriptorCapture->channels = wf.nChannels; pDescriptorCapture->sampleRate = wf.nSamplesPerSec; ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); pDescriptorCapture->periodCount = pDescriptorCapture->periodCount; pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEOUTCAPSA caps; MA_WAVEFORMATEX wf; MA_MMRESULT resultMM; /* We use an event to know when a new fragment needs to be enqueued. */ pDevice->winmm.hEventPlayback = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL); if (pDevice->winmm.hEventPlayback == NULL) { errorMsg = "[WinMM] Failed to create event for fragment enqueuing for the playback device.", errorCode = ma_result_from_GetLastError(GetLastError()); goto on_error; } /* The format should be based on the device's actual format. */ if (((MA_PFN_waveOutGetDevCapsA)pDevice->pContext->winmm.waveOutGetDevCapsA)(winMMDeviceIDPlayback, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MA_FORMAT_NOT_SUPPORTED; goto on_error; } result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf); if (result != MA_SUCCESS) { errorMsg = "[WinMM] Could not find appropriate format for internal device.", errorCode = result; goto on_error; } resultMM = ((MA_PFN_waveOutOpen)pDevice->pContext->winmm.waveOutOpen)((MA_HWAVEOUT*)&pDevice->winmm.hDevicePlayback, winMMDeviceIDPlayback, &wf, (DWORD_PTR)pDevice->winmm.hEventPlayback, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC); if (resultMM != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to open playback device.", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE; goto on_error; } pDescriptorPlayback->format = ma_format_from_WAVEFORMATEX(&wf); pDescriptorPlayback->channels = wf.nChannels; pDescriptorPlayback->sampleRate = wf.nSamplesPerSec; ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); pDescriptorPlayback->periodCount = pDescriptorPlayback->periodCount; pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); } /* The heap allocated data is allocated like so: [Capture WAVEHDRs][Playback WAVEHDRs][Capture Intermediary Buffer][Playback Intermediary Buffer] */ heapSize = 0; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { heapSize += sizeof(MA_WAVEHDR)*pDescriptorCapture->periodCount + (pDescriptorCapture->periodSizeInFrames * pDescriptorCapture->periodCount * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels)); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { heapSize += sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount + (pDescriptorPlayback->periodSizeInFrames * pDescriptorPlayback->periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels)); } pDevice->winmm._pHeapData = (ma_uint8*)ma_calloc(heapSize, &pDevice->pContext->allocationCallbacks); if (pDevice->winmm._pHeapData == NULL) { errorMsg = "[WinMM] Failed to allocate memory for the intermediary buffer.", errorCode = MA_OUT_OF_MEMORY; goto on_error; } MA_ZERO_MEMORY(pDevice->winmm._pHeapData, heapSize); if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPeriod; if (pConfig->deviceType == ma_device_type_capture) { pDevice->winmm.pWAVEHDRCapture = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount)); } else { pDevice->winmm.pWAVEHDRCapture = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount)); } /* Prepare headers. */ for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) { ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->format, pDescriptorCapture->channels); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].lpData = (char*)(pDevice->winmm.pIntermediaryBufferCapture + (periodSizeInBytes*iPeriod)); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwBufferLength = periodSizeInBytes; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwFlags = 0L; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwLoops = 0L; ((MA_PFN_waveInPrepareHeader)pDevice->pContext->winmm.waveInPrepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); /* The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named "isLocked". A value of 0 means it's unlocked and available for writing. A value of 1 means it's locked. */ ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwUser = 0; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPeriod; if (pConfig->deviceType == ma_device_type_playback) { pDevice->winmm.pWAVEHDRPlayback = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount); } else { pDevice->winmm.pWAVEHDRPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount)); pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount)) + (pDescriptorCapture->periodSizeInFrames*pDescriptorCapture->periodCount*ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels)); } /* Prepare headers. */ for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) { ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->format, pDescriptorPlayback->channels); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].lpData = (char*)(pDevice->winmm.pIntermediaryBufferPlayback + (periodSizeInBytes*iPeriod)); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwBufferLength = periodSizeInBytes; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwFlags = 0L; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwLoops = 0L; ((MA_PFN_waveOutPrepareHeader)pDevice->pContext->winmm.waveOutPrepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR)); /* The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named "isLocked". A value of 0 means it's unlocked and available for writing. A value of 1 means it's locked. */ ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwUser = 0; } } return MA_SUCCESS; on_error: if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.pWAVEHDRCapture != NULL) { ma_uint32 iPeriod; for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) { ((MA_PFN_waveInUnprepareHeader)pDevice->pContext->winmm.waveInUnprepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); } } ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.pWAVEHDRCapture != NULL) { ma_uint32 iPeriod; for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) { ((MA_PFN_waveOutUnprepareHeader)pDevice->pContext->winmm.waveOutUnprepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR)); } } ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); } ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks); if (errorMsg != NULL && errorMsg[0] != '\0') { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "%s", errorMsg); } return errorCode; } static ma_result ma_device_start__winmm(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { MA_MMRESULT resultMM; MA_WAVEHDR* pWAVEHDR; ma_uint32 iPeriod; pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture; /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventCapture); /* To start the device we attach all of the buffers and then start it. As the buffers are filled with data we will get notifications. */ for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) { resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] Failed to attach input buffers to capture device in preparation for capture."); return ma_result_from_MMRESULT(resultMM); } /* Make sure all of the buffers start out locked. We don't want to access them until the backend tells us we can. */ pWAVEHDR[iPeriod].dwUser = 1; /* 1 = locked. */ } /* Capture devices need to be explicitly started, unlike playback devices. */ resultMM = ((MA_PFN_waveInStart)pDevice->pContext->winmm.waveInStart)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] Failed to start backend device."); return ma_result_from_MMRESULT(resultMM); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* Don't need to do anything for playback. It'll be started automatically in ma_device_start__winmm(). */ } return MA_SUCCESS; } static ma_result ma_device_stop__winmm(ma_device* pDevice) { MA_MMRESULT resultMM; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.hDeviceCapture == NULL) { return MA_INVALID_ARGS; } resultMM = ((MA_PFN_waveInReset)pDevice->pContext->winmm.waveInReset)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WinMM] WARNING: Failed to reset capture device."); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_uint32 iPeriod; MA_WAVEHDR* pWAVEHDR; if (pDevice->winmm.hDevicePlayback == NULL) { return MA_INVALID_ARGS; } /* We need to drain the device. To do this we just loop over each header and if it's locked just wait for the event. */ pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback; for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; iPeriod += 1) { if (pWAVEHDR[iPeriod].dwUser == 1) { /* 1 = locked. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) { break; /* An error occurred so just abandon ship and stop the device without draining. */ } pWAVEHDR[iPeriod].dwUser = 0; } } resultMM = ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WinMM] WARNING: Failed to reset playback device."); } } return MA_SUCCESS; } static ma_result ma_device_write__winmm(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; MA_MMRESULT resultMM; ma_uint32 totalFramesWritten; MA_WAVEHDR* pWAVEHDR; MA_ASSERT(pDevice != NULL); MA_ASSERT(pPCMFrames != NULL); if (pFramesWritten != NULL) { *pFramesWritten = 0; } pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback; /* Keep processing as much data as possible. */ totalFramesWritten = 0; while (totalFramesWritten < frameCount) { /* If the current header has some space available we need to write part of it. */ if (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser == 0) { /* 0 = unlocked. */ /* This header has room in it. We copy as much of it as we can. If we end up fully consuming the buffer we need to write it out and move on to the next iteration. */ ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedPlayback; ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesWritten)); const void* pSrc = ma_offset_ptr(pPCMFrames, totalFramesWritten*bpf); void* pDst = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].lpData, pDevice->winmm.headerFramesConsumedPlayback*bpf); MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf); pDevice->winmm.headerFramesConsumedPlayback += framesToCopy; totalFramesWritten += framesToCopy; /* If we've consumed the buffer entirely we need to write it out to the device. */ if (pDevice->winmm.headerFramesConsumedPlayback == (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf)) { pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 1; /* 1 = locked. */ pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */ /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventPlayback); /* The device will be started here. */ resultMM = ((MA_PFN_waveOutWrite)pDevice->pContext->winmm.waveOutWrite)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &pWAVEHDR[pDevice->winmm.iNextHeaderPlayback], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { result = ma_result_from_MMRESULT(resultMM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] waveOutWrite() failed."); break; } /* Make sure we move to the next header. */ pDevice->winmm.iNextHeaderPlayback = (pDevice->winmm.iNextHeaderPlayback + 1) % pDevice->playback.internalPeriods; pDevice->winmm.headerFramesConsumedPlayback = 0; } /* If at this point we have consumed the entire input buffer we can return. */ MA_ASSERT(totalFramesWritten <= frameCount); if (totalFramesWritten == frameCount) { break; } /* Getting here means there's more to process. */ continue; } /* Getting here means there isn't enough room in the buffer and we need to wait for one to become available. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) { result = MA_ERROR; break; } /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */ if ((pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags & MA_WHDR_DONE) != 0) { pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 0; /* 0 = unlocked (make it available for writing). */ pDevice->winmm.headerFramesConsumedPlayback = 0; } /* If the device has been stopped we need to break. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { break; } } if (pFramesWritten != NULL) { *pFramesWritten = totalFramesWritten; } return result; } static ma_result ma_device_read__winmm(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; MA_MMRESULT resultMM; ma_uint32 totalFramesRead; MA_WAVEHDR* pWAVEHDR; MA_ASSERT(pDevice != NULL); MA_ASSERT(pPCMFrames != NULL); if (pFramesRead != NULL) { *pFramesRead = 0; } pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture; /* Keep processing as much data as possible. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { /* If the current header has some space available we need to write part of it. */ if (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser == 0) { /* 0 = unlocked. */ /* The buffer is available for reading. If we fully consume it we need to add it back to the buffer. */ ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedCapture; ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesRead)); const void* pSrc = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderCapture].lpData, pDevice->winmm.headerFramesConsumedCapture*bpf); void* pDst = ma_offset_ptr(pPCMFrames, totalFramesRead*bpf); MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf); pDevice->winmm.headerFramesConsumedCapture += framesToCopy; totalFramesRead += framesToCopy; /* If we've consumed the buffer entirely we need to add it back to the device. */ if (pDevice->winmm.headerFramesConsumedCapture == (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf)) { pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 1; /* 1 = locked. */ pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */ /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventCapture); /* The device will be started here. */ resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[pDevice->winmm.iNextHeaderCapture], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { result = ma_result_from_MMRESULT(resultMM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] waveInAddBuffer() failed."); break; } /* Make sure we move to the next header. */ pDevice->winmm.iNextHeaderCapture = (pDevice->winmm.iNextHeaderCapture + 1) % pDevice->capture.internalPeriods; pDevice->winmm.headerFramesConsumedCapture = 0; } /* If at this point we have filled the entire input buffer we can return. */ MA_ASSERT(totalFramesRead <= frameCount); if (totalFramesRead == frameCount) { break; } /* Getting here means there's more to process. */ continue; } /* Getting here means there isn't enough any data left to send to the client which means we need to wait for more. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventCapture, INFINITE) != WAIT_OBJECT_0) { result = MA_ERROR; break; } /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */ if ((pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags & MA_WHDR_DONE) != 0) { pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 0; /* 0 = unlocked (make it available for reading). */ pDevice->winmm.headerFramesConsumedCapture = 0; } /* If the device has been stopped we need to break. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { break; } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } static ma_result ma_context_uninit__winmm(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_winmm); ma_dlclose(ma_context_get_log(pContext), pContext->winmm.hWinMM); return MA_SUCCESS; } static ma_result ma_context_init__winmm(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pContext->winmm.hWinMM = ma_dlopen(ma_context_get_log(pContext), "winmm.dll"); if (pContext->winmm.hWinMM == NULL) { return MA_NO_BACKEND; } pContext->winmm.waveOutGetNumDevs = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutGetNumDevs"); pContext->winmm.waveOutGetDevCapsA = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutGetDevCapsA"); pContext->winmm.waveOutOpen = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutOpen"); pContext->winmm.waveOutClose = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutClose"); pContext->winmm.waveOutPrepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutPrepareHeader"); pContext->winmm.waveOutUnprepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutUnprepareHeader"); pContext->winmm.waveOutWrite = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutWrite"); pContext->winmm.waveOutReset = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutReset"); pContext->winmm.waveInGetNumDevs = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInGetNumDevs"); pContext->winmm.waveInGetDevCapsA = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInGetDevCapsA"); pContext->winmm.waveInOpen = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInOpen"); pContext->winmm.waveInClose = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInClose"); pContext->winmm.waveInPrepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInPrepareHeader"); pContext->winmm.waveInUnprepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInUnprepareHeader"); pContext->winmm.waveInAddBuffer = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInAddBuffer"); pContext->winmm.waveInStart = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInStart"); pContext->winmm.waveInReset = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInReset"); pCallbacks->onContextInit = ma_context_init__winmm; pCallbacks->onContextUninit = ma_context_uninit__winmm; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__winmm; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__winmm; pCallbacks->onDeviceInit = ma_device_init__winmm; pCallbacks->onDeviceUninit = ma_device_uninit__winmm; pCallbacks->onDeviceStart = ma_device_start__winmm; pCallbacks->onDeviceStop = ma_device_stop__winmm; pCallbacks->onDeviceRead = ma_device_read__winmm; pCallbacks->onDeviceWrite = ma_device_write__winmm; pCallbacks->onDeviceDataLoop = NULL; /* This is a blocking read-write API, so this can be NULL since miniaudio will manage the audio thread for us. */ return MA_SUCCESS; } #endif /****************************************************************************** ALSA Backend ******************************************************************************/ #ifdef MA_HAS_ALSA #include /* poll(), struct pollfd */ #include /* eventfd() */ #ifdef MA_NO_RUNTIME_LINKING /* asoundlib.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ #if !defined(__cplusplus) #if defined(__STRICT_ANSI__) #if !defined(inline) #define inline __inline__ __attribute__((always_inline)) #define MA_INLINE_DEFINED #endif #endif #endif #include #if defined(MA_INLINE_DEFINED) #undef inline #undef MA_INLINE_DEFINED #endif typedef snd_pcm_uframes_t ma_snd_pcm_uframes_t; typedef snd_pcm_sframes_t ma_snd_pcm_sframes_t; typedef snd_pcm_stream_t ma_snd_pcm_stream_t; typedef snd_pcm_format_t ma_snd_pcm_format_t; typedef snd_pcm_access_t ma_snd_pcm_access_t; typedef snd_pcm_t ma_snd_pcm_t; typedef snd_pcm_hw_params_t ma_snd_pcm_hw_params_t; typedef snd_pcm_sw_params_t ma_snd_pcm_sw_params_t; typedef snd_pcm_format_mask_t ma_snd_pcm_format_mask_t; typedef snd_pcm_info_t ma_snd_pcm_info_t; typedef snd_pcm_channel_area_t ma_snd_pcm_channel_area_t; typedef snd_pcm_chmap_t ma_snd_pcm_chmap_t; typedef snd_pcm_state_t ma_snd_pcm_state_t; /* snd_pcm_stream_t */ #define MA_SND_PCM_STREAM_PLAYBACK SND_PCM_STREAM_PLAYBACK #define MA_SND_PCM_STREAM_CAPTURE SND_PCM_STREAM_CAPTURE /* snd_pcm_format_t */ #define MA_SND_PCM_FORMAT_UNKNOWN SND_PCM_FORMAT_UNKNOWN #define MA_SND_PCM_FORMAT_U8 SND_PCM_FORMAT_U8 #define MA_SND_PCM_FORMAT_S16_LE SND_PCM_FORMAT_S16_LE #define MA_SND_PCM_FORMAT_S16_BE SND_PCM_FORMAT_S16_BE #define MA_SND_PCM_FORMAT_S24_LE SND_PCM_FORMAT_S24_LE #define MA_SND_PCM_FORMAT_S24_BE SND_PCM_FORMAT_S24_BE #define MA_SND_PCM_FORMAT_S32_LE SND_PCM_FORMAT_S32_LE #define MA_SND_PCM_FORMAT_S32_BE SND_PCM_FORMAT_S32_BE #define MA_SND_PCM_FORMAT_FLOAT_LE SND_PCM_FORMAT_FLOAT_LE #define MA_SND_PCM_FORMAT_FLOAT_BE SND_PCM_FORMAT_FLOAT_BE #define MA_SND_PCM_FORMAT_FLOAT64_LE SND_PCM_FORMAT_FLOAT64_LE #define MA_SND_PCM_FORMAT_FLOAT64_BE SND_PCM_FORMAT_FLOAT64_BE #define MA_SND_PCM_FORMAT_MU_LAW SND_PCM_FORMAT_MU_LAW #define MA_SND_PCM_FORMAT_A_LAW SND_PCM_FORMAT_A_LAW #define MA_SND_PCM_FORMAT_S24_3LE SND_PCM_FORMAT_S24_3LE #define MA_SND_PCM_FORMAT_S24_3BE SND_PCM_FORMAT_S24_3BE /* ma_snd_pcm_access_t */ #define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED SND_PCM_ACCESS_MMAP_INTERLEAVED #define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED SND_PCM_ACCESS_MMAP_NONINTERLEAVED #define MA_SND_PCM_ACCESS_MMAP_COMPLEX SND_PCM_ACCESS_MMAP_COMPLEX #define MA_SND_PCM_ACCESS_RW_INTERLEAVED SND_PCM_ACCESS_RW_INTERLEAVED #define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED SND_PCM_ACCESS_RW_NONINTERLEAVED /* Channel positions. */ #define MA_SND_CHMAP_UNKNOWN SND_CHMAP_UNKNOWN #define MA_SND_CHMAP_NA SND_CHMAP_NA #define MA_SND_CHMAP_MONO SND_CHMAP_MONO #define MA_SND_CHMAP_FL SND_CHMAP_FL #define MA_SND_CHMAP_FR SND_CHMAP_FR #define MA_SND_CHMAP_RL SND_CHMAP_RL #define MA_SND_CHMAP_RR SND_CHMAP_RR #define MA_SND_CHMAP_FC SND_CHMAP_FC #define MA_SND_CHMAP_LFE SND_CHMAP_LFE #define MA_SND_CHMAP_SL SND_CHMAP_SL #define MA_SND_CHMAP_SR SND_CHMAP_SR #define MA_SND_CHMAP_RC SND_CHMAP_RC #define MA_SND_CHMAP_FLC SND_CHMAP_FLC #define MA_SND_CHMAP_FRC SND_CHMAP_FRC #define MA_SND_CHMAP_RLC SND_CHMAP_RLC #define MA_SND_CHMAP_RRC SND_CHMAP_RRC #define MA_SND_CHMAP_FLW SND_CHMAP_FLW #define MA_SND_CHMAP_FRW SND_CHMAP_FRW #define MA_SND_CHMAP_FLH SND_CHMAP_FLH #define MA_SND_CHMAP_FCH SND_CHMAP_FCH #define MA_SND_CHMAP_FRH SND_CHMAP_FRH #define MA_SND_CHMAP_TC SND_CHMAP_TC #define MA_SND_CHMAP_TFL SND_CHMAP_TFL #define MA_SND_CHMAP_TFR SND_CHMAP_TFR #define MA_SND_CHMAP_TFC SND_CHMAP_TFC #define MA_SND_CHMAP_TRL SND_CHMAP_TRL #define MA_SND_CHMAP_TRR SND_CHMAP_TRR #define MA_SND_CHMAP_TRC SND_CHMAP_TRC #define MA_SND_CHMAP_TFLC SND_CHMAP_TFLC #define MA_SND_CHMAP_TFRC SND_CHMAP_TFRC #define MA_SND_CHMAP_TSL SND_CHMAP_TSL #define MA_SND_CHMAP_TSR SND_CHMAP_TSR #define MA_SND_CHMAP_LLFE SND_CHMAP_LLFE #define MA_SND_CHMAP_RLFE SND_CHMAP_RLFE #define MA_SND_CHMAP_BC SND_CHMAP_BC #define MA_SND_CHMAP_BLC SND_CHMAP_BLC #define MA_SND_CHMAP_BRC SND_CHMAP_BRC /* Open mode flags. */ #define MA_SND_PCM_NO_AUTO_RESAMPLE SND_PCM_NO_AUTO_RESAMPLE #define MA_SND_PCM_NO_AUTO_CHANNELS SND_PCM_NO_AUTO_CHANNELS #define MA_SND_PCM_NO_AUTO_FORMAT SND_PCM_NO_AUTO_FORMAT #else #include /* For EPIPE, etc. */ typedef unsigned long ma_snd_pcm_uframes_t; typedef long ma_snd_pcm_sframes_t; typedef int ma_snd_pcm_stream_t; typedef int ma_snd_pcm_format_t; typedef int ma_snd_pcm_access_t; typedef int ma_snd_pcm_state_t; typedef struct ma_snd_pcm_t ma_snd_pcm_t; typedef struct ma_snd_pcm_hw_params_t ma_snd_pcm_hw_params_t; typedef struct ma_snd_pcm_sw_params_t ma_snd_pcm_sw_params_t; typedef struct ma_snd_pcm_format_mask_t ma_snd_pcm_format_mask_t; typedef struct ma_snd_pcm_info_t ma_snd_pcm_info_t; typedef struct { void* addr; unsigned int first; unsigned int step; } ma_snd_pcm_channel_area_t; typedef struct { unsigned int channels; unsigned int pos[1]; } ma_snd_pcm_chmap_t; /* snd_pcm_state_t */ #define MA_SND_PCM_STATE_OPEN 0 #define MA_SND_PCM_STATE_SETUP 1 #define MA_SND_PCM_STATE_PREPARED 2 #define MA_SND_PCM_STATE_RUNNING 3 #define MA_SND_PCM_STATE_XRUN 4 #define MA_SND_PCM_STATE_DRAINING 5 #define MA_SND_PCM_STATE_PAUSED 6 #define MA_SND_PCM_STATE_SUSPENDED 7 #define MA_SND_PCM_STATE_DISCONNECTED 8 /* snd_pcm_stream_t */ #define MA_SND_PCM_STREAM_PLAYBACK 0 #define MA_SND_PCM_STREAM_CAPTURE 1 /* snd_pcm_format_t */ #define MA_SND_PCM_FORMAT_UNKNOWN -1 #define MA_SND_PCM_FORMAT_U8 1 #define MA_SND_PCM_FORMAT_S16_LE 2 #define MA_SND_PCM_FORMAT_S16_BE 3 #define MA_SND_PCM_FORMAT_S24_LE 6 #define MA_SND_PCM_FORMAT_S24_BE 7 #define MA_SND_PCM_FORMAT_S32_LE 10 #define MA_SND_PCM_FORMAT_S32_BE 11 #define MA_SND_PCM_FORMAT_FLOAT_LE 14 #define MA_SND_PCM_FORMAT_FLOAT_BE 15 #define MA_SND_PCM_FORMAT_FLOAT64_LE 16 #define MA_SND_PCM_FORMAT_FLOAT64_BE 17 #define MA_SND_PCM_FORMAT_MU_LAW 20 #define MA_SND_PCM_FORMAT_A_LAW 21 #define MA_SND_PCM_FORMAT_S24_3LE 32 #define MA_SND_PCM_FORMAT_S24_3BE 33 /* snd_pcm_access_t */ #define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED 0 #define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED 1 #define MA_SND_PCM_ACCESS_MMAP_COMPLEX 2 #define MA_SND_PCM_ACCESS_RW_INTERLEAVED 3 #define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED 4 /* Channel positions. */ #define MA_SND_CHMAP_UNKNOWN 0 #define MA_SND_CHMAP_NA 1 #define MA_SND_CHMAP_MONO 2 #define MA_SND_CHMAP_FL 3 #define MA_SND_CHMAP_FR 4 #define MA_SND_CHMAP_RL 5 #define MA_SND_CHMAP_RR 6 #define MA_SND_CHMAP_FC 7 #define MA_SND_CHMAP_LFE 8 #define MA_SND_CHMAP_SL 9 #define MA_SND_CHMAP_SR 10 #define MA_SND_CHMAP_RC 11 #define MA_SND_CHMAP_FLC 12 #define MA_SND_CHMAP_FRC 13 #define MA_SND_CHMAP_RLC 14 #define MA_SND_CHMAP_RRC 15 #define MA_SND_CHMAP_FLW 16 #define MA_SND_CHMAP_FRW 17 #define MA_SND_CHMAP_FLH 18 #define MA_SND_CHMAP_FCH 19 #define MA_SND_CHMAP_FRH 20 #define MA_SND_CHMAP_TC 21 #define MA_SND_CHMAP_TFL 22 #define MA_SND_CHMAP_TFR 23 #define MA_SND_CHMAP_TFC 24 #define MA_SND_CHMAP_TRL 25 #define MA_SND_CHMAP_TRR 26 #define MA_SND_CHMAP_TRC 27 #define MA_SND_CHMAP_TFLC 28 #define MA_SND_CHMAP_TFRC 29 #define MA_SND_CHMAP_TSL 30 #define MA_SND_CHMAP_TSR 31 #define MA_SND_CHMAP_LLFE 32 #define MA_SND_CHMAP_RLFE 33 #define MA_SND_CHMAP_BC 34 #define MA_SND_CHMAP_BLC 35 #define MA_SND_CHMAP_BRC 36 /* Open mode flags. */ #define MA_SND_PCM_NO_AUTO_RESAMPLE 0x00010000 #define MA_SND_PCM_NO_AUTO_CHANNELS 0x00020000 #define MA_SND_PCM_NO_AUTO_FORMAT 0x00040000 #endif typedef int (* ma_snd_pcm_open_proc) (ma_snd_pcm_t **pcm, const char *name, ma_snd_pcm_stream_t stream, int mode); typedef int (* ma_snd_pcm_close_proc) (ma_snd_pcm_t *pcm); typedef size_t (* ma_snd_pcm_hw_params_sizeof_proc) (void); typedef int (* ma_snd_pcm_hw_params_any_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params); typedef int (* ma_snd_pcm_hw_params_set_format_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val); typedef int (* ma_snd_pcm_hw_params_set_format_first_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format); typedef void (* ma_snd_pcm_hw_params_get_format_mask_proc) (ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_mask_t *mask); typedef int (* ma_snd_pcm_hw_params_set_channels_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_set_channels_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_set_channels_minmax_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *minimum, unsigned int *maximum); typedef int (* ma_snd_pcm_hw_params_set_rate_resample_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_set_rate_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir); typedef int (* ma_snd_pcm_hw_params_set_rate_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_set_buffer_size_near_proc)(ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val); typedef int (* ma_snd_pcm_hw_params_set_periods_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_set_access_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t _access); typedef int (* ma_snd_pcm_hw_params_get_format_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format); typedef int (* ma_snd_pcm_hw_params_get_channels_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_channels_min_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_channels_max_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_rate_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_rate_min_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_rate_max_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_buffer_size_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val); typedef int (* ma_snd_pcm_hw_params_get_periods_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_get_access_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t *_access); typedef int (* ma_snd_pcm_hw_params_test_format_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val); typedef int (* ma_snd_pcm_hw_params_test_channels_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_test_rate_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir); typedef int (* ma_snd_pcm_hw_params_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params); typedef size_t (* ma_snd_pcm_sw_params_sizeof_proc) (void); typedef int (* ma_snd_pcm_sw_params_current_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params); typedef int (* ma_snd_pcm_sw_params_get_boundary_proc) (const ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t* val); typedef int (* ma_snd_pcm_sw_params_set_avail_min_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_set_start_threshold_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_set_stop_threshold_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params); typedef size_t (* ma_snd_pcm_format_mask_sizeof_proc) (void); typedef int (* ma_snd_pcm_format_mask_test_proc) (const ma_snd_pcm_format_mask_t *mask, ma_snd_pcm_format_t val); typedef ma_snd_pcm_chmap_t * (* ma_snd_pcm_get_chmap_proc) (ma_snd_pcm_t *pcm); typedef ma_snd_pcm_state_t (* ma_snd_pcm_state_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_prepare_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_start_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_drop_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_drain_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_reset_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_device_name_hint_proc) (int card, const char *iface, void ***hints); typedef char * (* ma_snd_device_name_get_hint_proc) (const void *hint, const char *id); typedef int (* ma_snd_card_get_index_proc) (const char *name); typedef int (* ma_snd_device_name_free_hint_proc) (void **hints); typedef int (* ma_snd_pcm_mmap_begin_proc) (ma_snd_pcm_t *pcm, const ma_snd_pcm_channel_area_t **areas, ma_snd_pcm_uframes_t *offset, ma_snd_pcm_uframes_t *frames); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_mmap_commit_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_uframes_t offset, ma_snd_pcm_uframes_t frames); typedef int (* ma_snd_pcm_recover_proc) (ma_snd_pcm_t *pcm, int err, int silent); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_readi_proc) (ma_snd_pcm_t *pcm, void *buffer, ma_snd_pcm_uframes_t size); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_writei_proc) (ma_snd_pcm_t *pcm, const void *buffer, ma_snd_pcm_uframes_t size); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_proc) (ma_snd_pcm_t *pcm); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_update_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_wait_proc) (ma_snd_pcm_t *pcm, int timeout); typedef int (* ma_snd_pcm_nonblock_proc) (ma_snd_pcm_t *pcm, int nonblock); typedef int (* ma_snd_pcm_info_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_info_t* info); typedef size_t (* ma_snd_pcm_info_sizeof_proc) (void); typedef const char* (* ma_snd_pcm_info_get_name_proc) (const ma_snd_pcm_info_t* info); typedef int (* ma_snd_pcm_poll_descriptors_proc) (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space); typedef int (* ma_snd_pcm_poll_descriptors_count_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_poll_descriptors_revents_proc) (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); typedef int (* ma_snd_config_update_free_global_proc) (void); /* This array specifies each of the common devices that can be used for both playback and capture. */ static const char* g_maCommonDeviceNamesALSA[] = { "default", "null", "pulse", "jack" }; /* This array allows us to blacklist specific playback devices. */ static const char* g_maBlacklistedPlaybackDeviceNamesALSA[] = { "" }; /* This array allows us to blacklist specific capture devices. */ static const char* g_maBlacklistedCaptureDeviceNamesALSA[] = { "" }; static ma_snd_pcm_format_t ma_convert_ma_format_to_alsa_format(ma_format format) { ma_snd_pcm_format_t ALSAFormats[] = { MA_SND_PCM_FORMAT_UNKNOWN, /* ma_format_unknown */ MA_SND_PCM_FORMAT_U8, /* ma_format_u8 */ MA_SND_PCM_FORMAT_S16_LE, /* ma_format_s16 */ MA_SND_PCM_FORMAT_S24_3LE, /* ma_format_s24 */ MA_SND_PCM_FORMAT_S32_LE, /* ma_format_s32 */ MA_SND_PCM_FORMAT_FLOAT_LE /* ma_format_f32 */ }; if (ma_is_big_endian()) { ALSAFormats[0] = MA_SND_PCM_FORMAT_UNKNOWN; ALSAFormats[1] = MA_SND_PCM_FORMAT_U8; ALSAFormats[2] = MA_SND_PCM_FORMAT_S16_BE; ALSAFormats[3] = MA_SND_PCM_FORMAT_S24_3BE; ALSAFormats[4] = MA_SND_PCM_FORMAT_S32_BE; ALSAFormats[5] = MA_SND_PCM_FORMAT_FLOAT_BE; } return ALSAFormats[format]; } static ma_format ma_format_from_alsa(ma_snd_pcm_format_t formatALSA) { if (ma_is_little_endian()) { switch (formatALSA) { case MA_SND_PCM_FORMAT_S16_LE: return ma_format_s16; case MA_SND_PCM_FORMAT_S24_3LE: return ma_format_s24; case MA_SND_PCM_FORMAT_S32_LE: return ma_format_s32; case MA_SND_PCM_FORMAT_FLOAT_LE: return ma_format_f32; default: break; } } else { switch (formatALSA) { case MA_SND_PCM_FORMAT_S16_BE: return ma_format_s16; case MA_SND_PCM_FORMAT_S24_3BE: return ma_format_s24; case MA_SND_PCM_FORMAT_S32_BE: return ma_format_s32; case MA_SND_PCM_FORMAT_FLOAT_BE: return ma_format_f32; default: break; } } /* Endian agnostic. */ switch (formatALSA) { case MA_SND_PCM_FORMAT_U8: return ma_format_u8; default: return ma_format_unknown; } } static ma_channel ma_convert_alsa_channel_position_to_ma_channel(unsigned int alsaChannelPos) { switch (alsaChannelPos) { case MA_SND_CHMAP_MONO: return MA_CHANNEL_MONO; case MA_SND_CHMAP_FL: return MA_CHANNEL_FRONT_LEFT; case MA_SND_CHMAP_FR: return MA_CHANNEL_FRONT_RIGHT; case MA_SND_CHMAP_RL: return MA_CHANNEL_BACK_LEFT; case MA_SND_CHMAP_RR: return MA_CHANNEL_BACK_RIGHT; case MA_SND_CHMAP_FC: return MA_CHANNEL_FRONT_CENTER; case MA_SND_CHMAP_LFE: return MA_CHANNEL_LFE; case MA_SND_CHMAP_SL: return MA_CHANNEL_SIDE_LEFT; case MA_SND_CHMAP_SR: return MA_CHANNEL_SIDE_RIGHT; case MA_SND_CHMAP_RC: return MA_CHANNEL_BACK_CENTER; case MA_SND_CHMAP_FLC: return MA_CHANNEL_FRONT_LEFT_CENTER; case MA_SND_CHMAP_FRC: return MA_CHANNEL_FRONT_RIGHT_CENTER; case MA_SND_CHMAP_RLC: return 0; case MA_SND_CHMAP_RRC: return 0; case MA_SND_CHMAP_FLW: return 0; case MA_SND_CHMAP_FRW: return 0; case MA_SND_CHMAP_FLH: return 0; case MA_SND_CHMAP_FCH: return 0; case MA_SND_CHMAP_FRH: return 0; case MA_SND_CHMAP_TC: return MA_CHANNEL_TOP_CENTER; case MA_SND_CHMAP_TFL: return MA_CHANNEL_TOP_FRONT_LEFT; case MA_SND_CHMAP_TFR: return MA_CHANNEL_TOP_FRONT_RIGHT; case MA_SND_CHMAP_TFC: return MA_CHANNEL_TOP_FRONT_CENTER; case MA_SND_CHMAP_TRL: return MA_CHANNEL_TOP_BACK_LEFT; case MA_SND_CHMAP_TRR: return MA_CHANNEL_TOP_BACK_RIGHT; case MA_SND_CHMAP_TRC: return MA_CHANNEL_TOP_BACK_CENTER; default: break; } return 0; } static ma_bool32 ma_is_common_device_name__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maCommonDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maCommonDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_playback_device_blacklisted__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maBlacklistedPlaybackDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maBlacklistedPlaybackDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_capture_device_blacklisted__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maBlacklistedCaptureDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maBlacklistedCaptureDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_device_blacklisted__alsa(ma_device_type deviceType, const char* name) { if (deviceType == ma_device_type_playback) { return ma_is_playback_device_blacklisted__alsa(name); } else { return ma_is_capture_device_blacklisted__alsa(name); } } static const char* ma_find_char(const char* str, char c, int* index) { int i = 0; for (;;) { if (str[i] == '\0') { if (index) *index = -1; return NULL; } if (str[i] == c) { if (index) *index = i; return str + i; } i += 1; } /* Should never get here, but treat it as though the character was not found to make me feel better inside. */ if (index) *index = -1; return NULL; } static ma_bool32 ma_is_device_name_in_hw_format__alsa(const char* hwid) { /* This function is just checking whether or not hwid is in "hw:%d,%d" format. */ int commaPos; const char* dev; int i; if (hwid == NULL) { return MA_FALSE; } if (hwid[0] != 'h' || hwid[1] != 'w' || hwid[2] != ':') { return MA_FALSE; } hwid += 3; dev = ma_find_char(hwid, ',', &commaPos); if (dev == NULL) { return MA_FALSE; } else { dev += 1; /* Skip past the ",". */ } /* Check if the part between the ":" and the "," contains only numbers. If not, return false. */ for (i = 0; i < commaPos; ++i) { if (hwid[i] < '0' || hwid[i] > '9') { return MA_FALSE; } } /* Check if everything after the "," is numeric. If not, return false. */ i = 0; while (dev[i] != '\0') { if (dev[i] < '0' || dev[i] > '9') { return MA_FALSE; } i += 1; } return MA_TRUE; } static int ma_convert_device_name_to_hw_format__alsa(ma_context* pContext, char* dst, size_t dstSize, const char* src) /* Returns 0 on success, non-0 on error. */ { /* src should look something like this: "hw:CARD=I82801AAICH,DEV=0" */ int colonPos; int commaPos; char card[256]; const char* dev; int cardIndex; if (dst == NULL) { return -1; } if (dstSize < 7) { return -1; /* Absolute minimum size of the output buffer is 7 bytes. */ } *dst = '\0'; /* Safety. */ if (src == NULL) { return -1; } /* If the input name is already in "hw:%d,%d" format, just return that verbatim. */ if (ma_is_device_name_in_hw_format__alsa(src)) { return ma_strcpy_s(dst, dstSize, src); } src = ma_find_char(src, ':', &colonPos); if (src == NULL) { return -1; /* Couldn't find a colon */ } dev = ma_find_char(src, ',', &commaPos); if (dev == NULL) { dev = "0"; ma_strncpy_s(card, sizeof(card), src+6, (size_t)-1); /* +6 = ":CARD=" */ } else { dev = dev + 5; /* +5 = ",DEV=" */ ma_strncpy_s(card, sizeof(card), src+6, commaPos-6); /* +6 = ":CARD=" */ } cardIndex = ((ma_snd_card_get_index_proc)pContext->alsa.snd_card_get_index)(card); if (cardIndex < 0) { return -2; /* Failed to retrieve the card index. */ } /* Construction. */ dst[0] = 'h'; dst[1] = 'w'; dst[2] = ':'; if (ma_itoa_s(cardIndex, dst+3, dstSize-3, 10) != 0) { return -3; } if (ma_strcat_s(dst, dstSize, ",") != 0) { return -3; } if (ma_strcat_s(dst, dstSize, dev) != 0) { return -3; } return 0; } static ma_bool32 ma_does_id_exist_in_list__alsa(ma_device_id* pUniqueIDs, ma_uint32 count, const char* pHWID) { ma_uint32 i; MA_ASSERT(pHWID != NULL); for (i = 0; i < count; ++i) { if (ma_strcmp(pUniqueIDs[i].alsa, pHWID) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_result ma_context_open_pcm__alsa(ma_context* pContext, ma_share_mode shareMode, ma_device_type deviceType, const ma_device_id* pDeviceID, int openMode, ma_snd_pcm_t** ppPCM) { ma_snd_pcm_t* pPCM; ma_snd_pcm_stream_t stream; MA_ASSERT(pContext != NULL); MA_ASSERT(ppPCM != NULL); *ppPCM = NULL; pPCM = NULL; stream = (deviceType == ma_device_type_playback) ? MA_SND_PCM_STREAM_PLAYBACK : MA_SND_PCM_STREAM_CAPTURE; if (pDeviceID == NULL) { ma_bool32 isDeviceOpen; size_t i; /* We're opening the default device. I don't know if trying anything other than "default" is necessary, but it makes me feel better to try as hard as we can get to get _something_ working. */ const char* defaultDeviceNames[] = { "default", NULL, NULL, NULL, NULL, NULL, NULL }; if (shareMode == ma_share_mode_exclusive) { defaultDeviceNames[1] = "hw"; defaultDeviceNames[2] = "hw:0"; defaultDeviceNames[3] = "hw:0,0"; } else { if (deviceType == ma_device_type_playback) { defaultDeviceNames[1] = "dmix"; defaultDeviceNames[2] = "dmix:0"; defaultDeviceNames[3] = "dmix:0,0"; } else { defaultDeviceNames[1] = "dsnoop"; defaultDeviceNames[2] = "dsnoop:0"; defaultDeviceNames[3] = "dsnoop:0,0"; } defaultDeviceNames[4] = "hw"; defaultDeviceNames[5] = "hw:0"; defaultDeviceNames[6] = "hw:0,0"; } isDeviceOpen = MA_FALSE; for (i = 0; i < ma_countof(defaultDeviceNames); ++i) { if (defaultDeviceNames[i] != NULL && defaultDeviceNames[i][0] != '\0') { if (((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, defaultDeviceNames[i], stream, openMode) == 0) { isDeviceOpen = MA_TRUE; break; } } } if (!isDeviceOpen) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_open() failed when trying to open an appropriate default device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } else { /* We're trying to open a specific device. There's a few things to consider here: miniaudio recognizes a special format of device id that excludes the "hw", "dmix", etc. prefix. It looks like this: ":0,0", ":0,1", etc. When an ID of this format is specified, it indicates to miniaudio that it can try different combinations of plugins ("hw", "dmix", etc.) until it finds an appropriate one that works. This comes in very handy when trying to open a device in shared mode ("dmix"), vs exclusive mode ("hw"). */ /* May end up needing to make small adjustments to the ID, so make a copy. */ ma_device_id deviceID = *pDeviceID; int resultALSA = -ENODEV; if (deviceID.alsa[0] != ':') { /* The ID is not in ":0,0" format. Use the ID exactly as-is. */ resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, deviceID.alsa, stream, openMode); } else { char hwid[256]; /* The ID is in ":0,0" format. Try different plugins depending on the shared mode. */ if (deviceID.alsa[1] == '\0') { deviceID.alsa[0] = '\0'; /* An ID of ":" should be converted to "". */ } if (shareMode == ma_share_mode_shared) { if (deviceType == ma_device_type_playback) { ma_strcpy_s(hwid, sizeof(hwid), "dmix"); } else { ma_strcpy_s(hwid, sizeof(hwid), "dsnoop"); } if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) { resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode); } } /* If at this point we still don't have an open device it means we're either preferencing exclusive mode or opening with "dmix"/"dsnoop" failed. */ if (resultALSA != 0) { ma_strcpy_s(hwid, sizeof(hwid), "hw"); if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) { resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode); } } } if (resultALSA < 0) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_open() failed."); return ma_result_from_errno(-resultALSA); } } *ppPCM = pPCM; return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__alsa(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { int resultALSA; ma_bool32 cbResult = MA_TRUE; char** ppDeviceHints; ma_device_id* pUniqueIDs = NULL; ma_uint32 uniqueIDCount = 0; char** ppNextDeviceHint; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); ma_mutex_lock(&pContext->alsa.internalDeviceEnumLock); resultALSA = ((ma_snd_device_name_hint_proc)pContext->alsa.snd_device_name_hint)(-1, "pcm", (void***)&ppDeviceHints); if (resultALSA < 0) { ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock); return ma_result_from_errno(-resultALSA); } ppNextDeviceHint = ppDeviceHints; while (*ppNextDeviceHint != NULL) { char* NAME = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "NAME"); char* DESC = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "DESC"); char* IOID = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "IOID"); ma_device_type deviceType = ma_device_type_playback; ma_bool32 stopEnumeration = MA_FALSE; char hwid[sizeof(pUniqueIDs->alsa)]; ma_device_info deviceInfo; if ((IOID == NULL || ma_strcmp(IOID, "Output") == 0)) { deviceType = ma_device_type_playback; } if ((IOID != NULL && ma_strcmp(IOID, "Input" ) == 0)) { deviceType = ma_device_type_capture; } if (NAME != NULL) { if (pContext->alsa.useVerboseDeviceEnumeration) { /* Verbose mode. Use the name exactly as-is. */ ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1); } else { /* Simplified mode. Use ":%d,%d" format. */ if (ma_convert_device_name_to_hw_format__alsa(pContext, hwid, sizeof(hwid), NAME) == 0) { /* At this point, hwid looks like "hw:0,0". In simplified enumeration mode, we actually want to strip off the plugin name so it looks like ":0,0". The reason for this is that this special format is detected at device initialization time and is used as an indicator to try to use the most appropriate plugin depending on the device type and sharing mode. */ char* dst = hwid; char* src = hwid+2; while ((*dst++ = *src++)); } else { /* Conversion to "hw:%d,%d" failed. Just use the name as-is. */ ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1); } if (ma_does_id_exist_in_list__alsa(pUniqueIDs, uniqueIDCount, hwid)) { goto next_device; /* The device has already been enumerated. Move on to the next one. */ } else { /* The device has not yet been enumerated. Make sure it's added to our list so that it's not enumerated again. */ size_t newCapacity = sizeof(*pUniqueIDs) * (uniqueIDCount + 1); ma_device_id* pNewUniqueIDs = (ma_device_id*)ma_realloc(pUniqueIDs, newCapacity, &pContext->allocationCallbacks); if (pNewUniqueIDs == NULL) { goto next_device; /* Failed to allocate memory. */ } pUniqueIDs = pNewUniqueIDs; MA_COPY_MEMORY(pUniqueIDs[uniqueIDCount].alsa, hwid, sizeof(hwid)); uniqueIDCount += 1; } } } else { MA_ZERO_MEMORY(hwid, sizeof(hwid)); } MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.id.alsa, sizeof(deviceInfo.id.alsa), hwid, (size_t)-1); /* There's no good way to determine whether or not a device is the default on Linux. We're just going to do something simple and just use the name of "default" as the indicator. */ if (ma_strcmp(deviceInfo.id.alsa, "default") == 0) { deviceInfo.isDefault = MA_TRUE; } /* DESC is the friendly name. We treat this slightly differently depending on whether or not we are using verbose device enumeration. In verbose mode we want to take the entire description so that the end-user can distinguish between the subdevices of each card/dev pair. In simplified mode, however, we only want the first part of the description. The value in DESC seems to be split into two lines, with the first line being the name of the device and the second line being a description of the device. I don't like having the description be across two lines because it makes formatting ugly and annoying. I'm therefore deciding to put it all on a single line with the second line being put into parentheses. In simplified mode I'm just stripping the second line entirely. */ if (DESC != NULL) { int lfPos; const char* line2 = ma_find_char(DESC, '\n', &lfPos); if (line2 != NULL) { line2 += 1; /* Skip past the new-line character. */ if (pContext->alsa.useVerboseDeviceEnumeration) { /* Verbose mode. Put the second line in brackets. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), " ("); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), line2); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), ")"); } else { /* Simplified mode. Strip the second line entirely. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos); } } else { /* There's no second line. Just copy the whole description. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, (size_t)-1); } } if (!ma_is_device_blacklisted__alsa(deviceType, NAME)) { cbResult = callback(pContext, deviceType, &deviceInfo, pUserData); } /* Some devices are both playback and capture, but they are only enumerated by ALSA once. We need to fire the callback again for the other device type in this case. We do this for known devices and where the IOID hint is NULL, which means both Input and Output. */ if (cbResult) { if (ma_is_common_device_name__alsa(NAME) || IOID == NULL) { if (deviceType == ma_device_type_playback) { if (!ma_is_capture_device_blacklisted__alsa(NAME)) { cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } else { if (!ma_is_playback_device_blacklisted__alsa(NAME)) { cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } } } } if (cbResult == MA_FALSE) { stopEnumeration = MA_TRUE; } next_device: free(NAME); free(DESC); free(IOID); ppNextDeviceHint += 1; /* We need to stop enumeration if the callback returned false. */ if (stopEnumeration) { break; } } ma_free(pUniqueIDs, &pContext->allocationCallbacks); ((ma_snd_device_name_free_hint_proc)pContext->alsa.snd_device_name_free_hint)((void**)ppDeviceHints); ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock); return MA_SUCCESS; } typedef struct { ma_device_type deviceType; const ma_device_id* pDeviceID; ma_share_mode shareMode; ma_device_info* pDeviceInfo; ma_bool32 foundDevice; } ma_context_get_device_info_enum_callback_data__alsa; static ma_bool32 ma_context_get_device_info_enum_callback__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pDeviceInfo, void* pUserData) { ma_context_get_device_info_enum_callback_data__alsa* pData = (ma_context_get_device_info_enum_callback_data__alsa*)pUserData; MA_ASSERT(pData != NULL); (void)pContext; if (pData->pDeviceID == NULL && ma_strcmp(pDeviceInfo->id.alsa, "default") == 0) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1); pData->foundDevice = MA_TRUE; } else { if (pData->deviceType == deviceType && (pData->pDeviceID != NULL && ma_strcmp(pData->pDeviceID->alsa, pDeviceInfo->id.alsa) == 0)) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1); pData->foundDevice = MA_TRUE; } } /* Keep enumerating until we have found the device. */ return !pData->foundDevice; } static void ma_context_test_rate_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags, ma_device_info* pDeviceInfo) { MA_ASSERT(pPCM != NULL); MA_ASSERT(pHWParams != NULL); MA_ASSERT(pDeviceInfo != NULL); if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats) && ((ma_snd_pcm_hw_params_test_rate_proc)pContext->alsa.snd_pcm_hw_params_test_rate)(pPCM, pHWParams, sampleRate, 0) == 0) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } } static void ma_context_iterate_rates_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 flags, ma_device_info* pDeviceInfo) { ma_uint32 iSampleRate; unsigned int minSampleRate; unsigned int maxSampleRate; int sampleRateDir; /* Not used. Just passed into snd_pcm_hw_params_get_rate_min/max(). */ /* There could be a range. */ ((ma_snd_pcm_hw_params_get_rate_min_proc)pContext->alsa.snd_pcm_hw_params_get_rate_min)(pHWParams, &minSampleRate, &sampleRateDir); ((ma_snd_pcm_hw_params_get_rate_max_proc)pContext->alsa.snd_pcm_hw_params_get_rate_max)(pHWParams, &maxSampleRate, &sampleRateDir); /* Make sure our sample rates are clamped to sane values. Stupid devices like "pulse" will reports rates like "1" which is ridiculous. */ minSampleRate = ma_clamp(minSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max); maxSampleRate = ma_clamp(maxSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max); for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate]; if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, standardSampleRate, flags, pDeviceInfo); } } /* Now make sure our min and max rates are included just in case they aren't in the range of our standard rates. */ if (!ma_is_standard_sample_rate(minSampleRate)) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, minSampleRate, flags, pDeviceInfo); } if (!ma_is_standard_sample_rate(maxSampleRate) && maxSampleRate != minSampleRate) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, maxSampleRate, flags, pDeviceInfo); } } static ma_result ma_context_get_device_info__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_context_get_device_info_enum_callback_data__alsa data; ma_result result; int resultALSA; ma_snd_pcm_t* pPCM; ma_snd_pcm_hw_params_t* pHWParams; ma_uint32 iFormat; ma_uint32 iChannel; MA_ASSERT(pContext != NULL); /* We just enumerate to find basic information about the device. */ data.deviceType = deviceType; data.pDeviceID = pDeviceID; data.pDeviceInfo = pDeviceInfo; data.foundDevice = MA_FALSE; result = ma_context_enumerate_devices__alsa(pContext, ma_context_get_device_info_enum_callback__alsa, &data); if (result != MA_SUCCESS) { return result; } if (!data.foundDevice) { return MA_NO_DEVICE; } if (ma_strcmp(pDeviceInfo->id.alsa, "default") == 0) { pDeviceInfo->isDefault = MA_TRUE; } /* For detailed info we need to open the device. */ result = ma_context_open_pcm__alsa(pContext, ma_share_mode_shared, deviceType, pDeviceID, 0, &pPCM); if (result != MA_SUCCESS) { return result; } /* We need to initialize a HW parameters object in order to know what formats are supported. */ pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pContext->alsa.snd_pcm_hw_params_sizeof)(), &pContext->allocationCallbacks); if (pHWParams == NULL) { ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed."); return ma_result_from_errno(-resultALSA); } /* Some ALSA devices can support many permutations of formats, channels and rates. We only support a fixed number of permutations which means we need to employ some strategies to ensure the best combinations are returned. An example is the "pulse" device which can do its own data conversion in software and as a result can support any combination of format, channels and rate. We want to ensure that the first data formats are the best. We have a list of favored sample formats and sample rates, so these will be the basis of our iteration. */ /* Formats. We just iterate over our standard formats and test them, making sure we reset the configuration space each iteration. */ for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) { ma_format format = g_maFormatPriorities[iFormat]; /* For each format we need to make sure we reset the configuration space so we don't return channel counts and rates that aren't compatible with a format. */ ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); /* Test the format first. If this fails it means the format is not supported and we can skip it. */ if (((ma_snd_pcm_hw_params_test_format_proc)pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)) == 0) { /* The format is supported. */ unsigned int minChannels; unsigned int maxChannels; /* The configuration space needs to be restricted to this format so we can get an accurate picture of which sample rates and channel counts are support with this format. */ ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)); /* Now we need to check for supported channels. */ ((ma_snd_pcm_hw_params_get_channels_min_proc)pContext->alsa.snd_pcm_hw_params_get_channels_min)(pHWParams, &minChannels); ((ma_snd_pcm_hw_params_get_channels_max_proc)pContext->alsa.snd_pcm_hw_params_get_channels_max)(pHWParams, &maxChannels); if (minChannels > MA_MAX_CHANNELS) { continue; /* Too many channels. */ } if (maxChannels < MA_MIN_CHANNELS) { continue; /* Not enough channels. */ } /* Make sure the channel count is clamped. This is mainly intended for the max channels because some devices can report an unbound maximum. */ minChannels = ma_clamp(minChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); maxChannels = ma_clamp(maxChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { /* The device supports all channels. Don't iterate over every single one. Instead just set the channels to 0 which means all channels are supported. */ ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, 0, 0, pDeviceInfo); /* Intentionally setting the channel count to 0 as that means all channels are supported. */ } else { /* The device only supports a specific set of channels. We need to iterate over all of them. */ for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { /* Test the channel before applying it to the configuration space. */ unsigned int channels = iChannel; /* Make sure our channel range is reset before testing again or else we'll always fail the test. */ ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)); if (((ma_snd_pcm_hw_params_test_channels_proc)pContext->alsa.snd_pcm_hw_params_test_channels)(pPCM, pHWParams, channels) == 0) { /* The channel count is supported. */ /* The configuration space now needs to be restricted to the channel count before extracting the sample rate. */ ((ma_snd_pcm_hw_params_set_channels_proc)pContext->alsa.snd_pcm_hw_params_set_channels)(pPCM, pHWParams, channels); /* Only after the configuration space has been restricted to the specific channel count should we iterate over our sample rates. */ ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, 0, pDeviceInfo); } else { /* The channel count is not supported. Skip. */ } } } } else { /* The format is not supported. Skip. */ } } ma_free(pHWParams, &pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); return MA_SUCCESS; } static ma_result ma_device_uninit__alsa(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if ((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); close(pDevice->alsa.wakeupfdCapture); ma_free(pDevice->alsa.pPollDescriptorsCapture, &pDevice->pContext->allocationCallbacks); } if ((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); close(pDevice->alsa.wakeupfdPlayback); ma_free(pDevice->alsa.pPollDescriptorsPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } static ma_result ma_device_init_by_type__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { ma_result result; int resultALSA; ma_snd_pcm_t* pPCM; ma_bool32 isUsingMMap; ma_snd_pcm_format_t formatALSA; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; int openMode; ma_snd_pcm_hw_params_t* pHWParams; ma_snd_pcm_sw_params_t* pSWParams; ma_snd_pcm_uframes_t bufferBoundary; int pollDescriptorCount; struct pollfd* pPollDescriptors; int wakeupfd; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); /* This function should only be called for playback _or_ capture, never duplex. */ MA_ASSERT(pDevice != NULL); formatALSA = ma_convert_ma_format_to_alsa_format(pDescriptor->format); openMode = 0; if (pConfig->alsa.noAutoResample) { openMode |= MA_SND_PCM_NO_AUTO_RESAMPLE; } if (pConfig->alsa.noAutoChannels) { openMode |= MA_SND_PCM_NO_AUTO_CHANNELS; } if (pConfig->alsa.noAutoFormat) { openMode |= MA_SND_PCM_NO_AUTO_FORMAT; } result = ma_context_open_pcm__alsa(pDevice->pContext, pDescriptor->shareMode, deviceType, pDescriptor->pDeviceID, openMode, &pPCM); if (result != MA_SUCCESS) { return result; } /* Hardware parameters. */ pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_hw_params_sizeof)(), &pDevice->pContext->allocationCallbacks); if (pHWParams == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for hardware parameters."); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_hw_params_any_proc)pDevice->pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed."); return ma_result_from_errno(-resultALSA); } /* MMAP Mode. Try using interleaved MMAP access. If this fails, fall back to standard readi/writei. */ isUsingMMap = MA_FALSE; #if 0 /* NOTE: MMAP mode temporarily disabled. */ if (deviceType != ma_device_type_capture) { /* <-- Disabling MMAP mode for capture devices because I apparently do not have a device that supports it which means I can't test it... Contributions welcome. */ if (!pConfig->alsa.noMMap) { if (((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_MMAP_INTERLEAVED) == 0) { pDevice->alsa.isUsingMMap = MA_TRUE; } } } #endif if (!isUsingMMap) { resultALSA = ((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_RW_INTERLEAVED); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set access mode to neither SND_PCM_ACCESS_MMAP_INTERLEAVED nor SND_PCM_ACCESS_RW_INTERLEAVED. snd_pcm_hw_params_set_access() failed."); return ma_result_from_errno(-resultALSA); } } /* Most important properties first. The documentation for OSS (yes, I know this is ALSA!) recommends format, channels, then sample rate. I can't find any documentation for ALSA specifically, so I'm going to copy the recommendation for OSS. */ /* Format. */ { /* At this point we should have a list of supported formats, so now we need to find the best one. We first check if the requested format is supported, and if so, use that one. If it's not supported, we just run though a list of formats and try to find the best one. */ if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN || ((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, formatALSA) != 0) { /* We're either requesting the native format or the specified format is not supported. */ size_t iFormat; formatALSA = MA_SND_PCM_FORMAT_UNKNOWN; for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) { if (((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat])) == 0) { formatALSA = ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat]); break; } } if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Format not supported. The device does not support any miniaudio formats."); return MA_FORMAT_NOT_SUPPORTED; } } resultALSA = ((ma_snd_pcm_hw_params_set_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, formatALSA); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Format not supported. snd_pcm_hw_params_set_format() failed."); return ma_result_from_errno(-resultALSA); } internalFormat = ma_format_from_alsa(formatALSA); if (internalFormat == ma_format_unknown) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] The chosen format is not supported by miniaudio."); return MA_FORMAT_NOT_SUPPORTED; } } /* Channels. */ { unsigned int channels = pDescriptor->channels; if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } resultALSA = ((ma_snd_pcm_hw_params_set_channels_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_channels_near)(pPCM, pHWParams, &channels); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set channel count. snd_pcm_hw_params_set_channels_near() failed."); return ma_result_from_errno(-resultALSA); } internalChannels = (ma_uint32)channels; } /* Sample Rate */ { unsigned int sampleRate; /* It appears there's either a bug in ALSA, a bug in some drivers, or I'm doing something silly; but having resampling enabled causes problems with some device configurations when used in conjunction with MMAP access mode. To fix this problem we need to disable resampling. To reproduce this problem, open the "plug:dmix" device, and set the sample rate to 44100. Internally, it looks like dmix uses a sample rate of 48000. The hardware parameters will get set correctly with no errors, but it looks like the 44100 -> 48000 resampling doesn't work properly - but only with MMAP access mode. You will notice skipping/crackling in the audio, and it'll run at a slightly faster rate. miniaudio has built-in support for sample rate conversion (albeit low quality at the moment), so disabling resampling should be fine for us. The only problem is that it won't be taking advantage of any kind of hardware-accelerated resampling and it won't be very good quality until I get a chance to improve the quality of miniaudio's software sample rate conversion. I don't currently know if the dmix plugin is the only one with this error. Indeed, this is the only one I've been able to reproduce this error with. In the future, we may want to restrict the disabling of resampling to only known bad plugins. */ ((ma_snd_pcm_hw_params_set_rate_resample_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_resample)(pPCM, pHWParams, 0); sampleRate = pDescriptor->sampleRate; if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } resultALSA = ((ma_snd_pcm_hw_params_set_rate_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_near)(pPCM, pHWParams, &sampleRate, 0); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Sample rate not supported. snd_pcm_hw_params_set_rate_near() failed."); return ma_result_from_errno(-resultALSA); } internalSampleRate = (ma_uint32)sampleRate; } /* Periods. */ { ma_uint32 periods = pDescriptor->periodCount; resultALSA = ((ma_snd_pcm_hw_params_set_periods_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_periods_near)(pPCM, pHWParams, &periods, NULL); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set period count. snd_pcm_hw_params_set_periods_near() failed."); return ma_result_from_errno(-resultALSA); } internalPeriods = periods; } /* Buffer Size */ { ma_snd_pcm_uframes_t actualBufferSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile) * internalPeriods; resultALSA = ((ma_snd_pcm_hw_params_set_buffer_size_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_buffer_size_near)(pPCM, pHWParams, &actualBufferSizeInFrames); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set buffer size for device. snd_pcm_hw_params_set_buffer_size() failed."); return ma_result_from_errno(-resultALSA); } internalPeriodSizeInFrames = actualBufferSizeInFrames / internalPeriods; } /* Apply hardware parameters. */ resultALSA = ((ma_snd_pcm_hw_params_proc)pDevice->pContext->alsa.snd_pcm_hw_params)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set hardware parameters. snd_pcm_hw_params() failed."); return ma_result_from_errno(-resultALSA); } ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); pHWParams = NULL; /* Software parameters. */ pSWParams = (ma_snd_pcm_sw_params_t*)ma_calloc(((ma_snd_pcm_sw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_sw_params_sizeof)(), &pDevice->pContext->allocationCallbacks); if (pSWParams == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for software parameters."); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_sw_params_current_proc)pDevice->pContext->alsa.snd_pcm_sw_params_current)(pPCM, pSWParams); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize software parameters. snd_pcm_sw_params_current() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_set_avail_min_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_avail_min)(pPCM, pSWParams, ma_prev_power_of_2(internalPeriodSizeInFrames)); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_sw_params_set_avail_min() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_get_boundary_proc)pDevice->pContext->alsa.snd_pcm_sw_params_get_boundary)(pSWParams, &bufferBoundary); if (resultALSA < 0) { bufferBoundary = internalPeriodSizeInFrames * internalPeriods; } if (deviceType == ma_device_type_playback && !isUsingMMap) { /* Only playback devices in writei/readi mode need a start threshold. */ /* Subtle detail here with the start threshold. When in playback-only mode (no full-duplex) we can set the start threshold to the size of a period. But for full-duplex we need to set it such that it is at least two periods. */ resultALSA = ((ma_snd_pcm_sw_params_set_start_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_start_threshold)(pPCM, pSWParams, internalPeriodSizeInFrames*2); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_set_stop_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_stop_threshold)(pPCM, pSWParams, bufferBoundary); if (resultALSA < 0) { /* Set to boundary to loop instead of stop in the event of an xrun. */ ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set stop threshold for playback device. snd_pcm_sw_params_set_stop_threshold() failed."); return ma_result_from_errno(-resultALSA); } } resultALSA = ((ma_snd_pcm_sw_params_proc)pDevice->pContext->alsa.snd_pcm_sw_params)(pPCM, pSWParams); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed."); return ma_result_from_errno(-resultALSA); } ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); pSWParams = NULL; /* Grab the internal channel map. For now we're not going to bother trying to change the channel map and instead just do it ourselves. */ { ma_snd_pcm_chmap_t* pChmap = NULL; if (pDevice->pContext->alsa.snd_pcm_get_chmap != NULL) { pChmap = ((ma_snd_pcm_get_chmap_proc)pDevice->pContext->alsa.snd_pcm_get_chmap)(pPCM); } if (pChmap != NULL) { ma_uint32 iChannel; /* There are cases where the returned channel map can have a different channel count than was returned by snd_pcm_hw_params_set_channels_near(). */ if (pChmap->channels >= internalChannels) { /* Drop excess channels. */ for (iChannel = 0; iChannel < internalChannels; ++iChannel) { internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]); } } else { ma_uint32 i; /* Excess channels use defaults. Do an initial fill with defaults, overwrite the first pChmap->channels, validate to ensure there are no duplicate channels. If validation fails, fall back to defaults. */ ma_bool32 isValid = MA_TRUE; /* Fill with defaults. */ ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); /* Overwrite first pChmap->channels channels. */ for (iChannel = 0; iChannel < pChmap->channels; ++iChannel) { internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]); } /* Validate. */ for (i = 0; i < internalChannels && isValid; ++i) { ma_uint32 j; for (j = i+1; j < internalChannels; ++j) { if (internalChannelMap[i] == internalChannelMap[j]) { isValid = MA_FALSE; break; } } } /* If our channel map is invalid, fall back to defaults. */ if (!isValid) { ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); } } free(pChmap); pChmap = NULL; } else { /* Could not retrieve the channel map. Fall back to a hard-coded assumption. */ ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); } } /* We need to retrieve the poll descriptors so we can use poll() to wait for data to become available for reading or writing. There's no well defined maximum for this so we're just going to allocate this on the heap. */ pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_count_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_count)(pPCM); if (pollDescriptorCount <= 0) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to retrieve poll descriptors count."); return MA_ERROR; } pPollDescriptors = (struct pollfd*)ma_malloc(sizeof(*pPollDescriptors) * (pollDescriptorCount + 1), &pDevice->pContext->allocationCallbacks); /* +1 because we want room for the wakeup descriptor. */ if (pPollDescriptors == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for poll descriptors."); return MA_OUT_OF_MEMORY; } /* We need an eventfd to wakeup from poll() and avoid a deadlock in situations where the driver never returns from writei() and readi(). This has been observed with the "pulse" device. */ wakeupfd = eventfd(0, 0); if (wakeupfd < 0) { ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to create eventfd for poll wakeup."); return ma_result_from_errno(errno); } /* We'll place the wakeup fd at the start of the buffer. */ pPollDescriptors[0].fd = wakeupfd; pPollDescriptors[0].events = POLLIN; /* We only care about waiting to read from the wakeup file descriptor. */ pPollDescriptors[0].revents = 0; /* We can now extract the PCM poll descriptors which we place after the wakeup descriptor. */ pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors)(pPCM, pPollDescriptors + 1, pollDescriptorCount); /* +1 because we want to place these descriptors after the wakeup descriptor. */ if (pollDescriptorCount <= 0) { close(wakeupfd); ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to retrieve poll descriptors."); return MA_ERROR; } if (deviceType == ma_device_type_capture) { pDevice->alsa.pollDescriptorCountCapture = pollDescriptorCount; pDevice->alsa.pPollDescriptorsCapture = pPollDescriptors; pDevice->alsa.wakeupfdCapture = wakeupfd; } else { pDevice->alsa.pollDescriptorCountPlayback = pollDescriptorCount; pDevice->alsa.pPollDescriptorsPlayback = pPollDescriptors; pDevice->alsa.wakeupfdPlayback = wakeupfd; } /* We're done. Prepare the device. */ resultALSA = ((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)(pPCM); if (resultALSA < 0) { close(wakeupfd); ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to prepare device."); return ma_result_from_errno(-resultALSA); } if (deviceType == ma_device_type_capture) { pDevice->alsa.pPCMCapture = (ma_ptr)pPCM; pDevice->alsa.isUsingMMapCapture = isUsingMMap; } else { pDevice->alsa.pPCMPlayback = (ma_ptr)pPCM; pDevice->alsa.isUsingMMapPlayback = isUsingMMap; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_copy(pDescriptor->channelMap, internalChannelMap, ma_min(internalChannels, MA_MAX_CHANNELS)); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->alsa); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__alsa(ma_device* pDevice) { int resultALSA; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start capture device."); return ma_result_from_errno(-resultALSA); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* When data is written to the device we wait for the device to get ready to receive data with poll(). In my testing I have observed that poll() can sometimes block forever unless the device is started explicitly with snd_pcm_start() or some data is written with snd_pcm_writei(). To resolve this I've decided to do an explicit start with snd_pcm_start(). The problem with this is that the device is started without any data in the internal buffer which will result in an immediate underrun. If instead we were to call into snd_pcm_writei() in an attempt to prevent the underrun, we would run the risk of a weird deadlock issue as documented inside ma_device_write__alsa(). */ resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start playback device."); return ma_result_from_errno(-resultALSA); } } return MA_SUCCESS; } static ma_result ma_device_stop__alsa(ma_device* pDevice) { /* The stop callback will get called on the worker thread after read/write__alsa() has returned. At this point there is a small chance that our wakeupfd has not been cleared. We'll clear that out now if applicable. */ int resultPoll; int resultRead; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping capture device...\n"); ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping capture device successful.\n"); /* We need to prepare the device again, otherwise we won't be able to restart the device. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device...\n"); if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device failed.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device successful.\n"); } /* Clear the wakeupfd. */ resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, 1, 0); if (resultPoll > 0) { ma_uint64 t; resultRead = read(((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture)[0].fd, &t, sizeof(t)); if (resultRead != sizeof(t)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to read from capture wakeupfd. read() = %d\n", resultRead); } } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping playback device...\n"); ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping playback device successful.\n"); /* We need to prepare the device again, otherwise we won't be able to restart the device. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device...\n"); if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device failed.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device successful.\n"); } /* Clear the wakeupfd. */ resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, 1, 0); if (resultPoll > 0) { ma_uint64 t; resultRead = read(((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback)[0].fd, &t, sizeof(t)); if (resultRead != sizeof(t)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to read from playback wakeupfd. read() = %d\n", resultRead); } } } return MA_SUCCESS; } static ma_result ma_device_wait__alsa(ma_device* pDevice, ma_snd_pcm_t* pPCM, struct pollfd* pPollDescriptors, int pollDescriptorCount, short requiredEvent) { for (;;) { unsigned short revents; int resultALSA; int resultPoll = poll(pPollDescriptors, pollDescriptorCount, -1); if (resultPoll < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[ALSA] poll() failed.\n"); /* There have been reports that poll() is returning an error randomly and that instead of returning an error, simply trying again will work. I'm experimenting with adopting this advice. */ continue; /*return ma_result_from_errno(errno);*/ } /* Before checking the ALSA poll descriptor flag we need to check if the wakeup descriptor has had it's POLLIN flag set. If so, we need to actually read the data and then exit the function. The wakeup descriptor will be the first item in the descriptors buffer. */ if ((pPollDescriptors[0].revents & POLLIN) != 0) { ma_uint64 t; int resultRead = read(pPollDescriptors[0].fd, &t, sizeof(t)); /* <-- Important that we read here so that the next write() does not block. */ if (resultRead < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] read() failed.\n"); return ma_result_from_errno(errno); } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] POLLIN set for wakeupfd\n"); return MA_DEVICE_NOT_STARTED; } /* Getting here means that some data should be able to be read. We need to use ALSA to translate the revents flags for us. */ resultALSA = ((ma_snd_pcm_poll_descriptors_revents_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_revents)(pPCM, pPollDescriptors + 1, pollDescriptorCount - 1, &revents); /* +1, -1 to ignore the wakeup descriptor. */ if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_poll_descriptors_revents() failed.\n"); return ma_result_from_errno(-resultALSA); } if ((revents & POLLERR) != 0) { ma_snd_pcm_state_t state = ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM); if (state == MA_SND_PCM_STATE_XRUN) { /* The PCM is in a xrun state. This will be recovered from at a higher level. We can disregard this. */ } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[ALSA] POLLERR detected. status = %d\n", ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM)); } } if ((revents & requiredEvent) == requiredEvent) { break; /* We're done. Data available for reading or writing. */ } } return MA_SUCCESS; } static ma_result ma_device_wait_read__alsa(ma_device* pDevice) { return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, (struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, pDevice->alsa.pollDescriptorCountCapture + 1, POLLIN); /* +1 to account for the wakeup descriptor. */ } static ma_result ma_device_wait_write__alsa(ma_device* pDevice) { return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, (struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, pDevice->alsa.pollDescriptorCountPlayback + 1, POLLOUT); /* +1 to account for the wakeup descriptor. */ } static ma_result ma_device_read__alsa(ma_device* pDevice, void* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_snd_pcm_sframes_t resultALSA = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFramesOut != NULL); if (pFramesRead != NULL) { *pFramesRead = 0; } while (ma_device_get_state(pDevice) == ma_device_state_started) { ma_result result; /* The first thing to do is wait for data to become available for reading. This will return an error code if the device has been stopped. */ result = ma_device_wait_read__alsa(pDevice); if (result != MA_SUCCESS) { return result; } /* Getting here means we should have data available. */ resultALSA = ((ma_snd_pcm_readi_proc)pDevice->pContext->alsa.snd_pcm_readi)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, pFramesOut, frameCount); if (resultALSA >= 0) { break; /* Success. */ } else { if (resultALSA == -EAGAIN) { /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EGAIN (read)\n");*/ continue; /* Try again. */ } else if (resultALSA == -EPIPE) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EPIPE (read)\n"); /* Overrun. Recover and try again. If this fails we need to return an error. */ resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, resultALSA, MA_TRUE); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to recover device after overrun."); return ma_result_from_errno((int)-resultALSA); } resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start device after underrun."); return ma_result_from_errno((int)-resultALSA); } continue; /* Try reading again. */ } } } if (pFramesRead != NULL) { *pFramesRead = resultALSA; } return MA_SUCCESS; } static ma_result ma_device_write__alsa(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_snd_pcm_sframes_t resultALSA = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFrames != NULL); if (pFramesWritten != NULL) { *pFramesWritten = 0; } while (ma_device_get_state(pDevice) == ma_device_state_started) { ma_result result; /* The first thing to do is wait for space to become available for writing. This will return an error code if the device has been stopped. */ result = ma_device_wait_write__alsa(pDevice); if (result != MA_SUCCESS) { return result; } resultALSA = ((ma_snd_pcm_writei_proc)pDevice->pContext->alsa.snd_pcm_writei)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, pFrames, frameCount); if (resultALSA >= 0) { break; /* Success. */ } else { if (resultALSA == -EAGAIN) { /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EGAIN (write)\n");*/ continue; /* Try again. */ } else if (resultALSA == -EPIPE) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EPIPE (write)\n"); /* Underrun. Recover and try again. If this fails we need to return an error. */ resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, resultALSA, MA_TRUE); /* MA_TRUE=silent (don't print anything on error). */ if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to recover device after underrun."); return ma_result_from_errno((int)-resultALSA); } /* In my testing I have had a situation where writei() does not automatically restart the device even though I've set it up as such in the software parameters. What will happen is writei() will block indefinitely even though the number of frames is well beyond the auto-start threshold. To work around this I've needed to add an explicit start here. Not sure if this is me just being stupid and not recovering the device properly, but this definitely feels like something isn't quite right here. */ resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start device after underrun."); return ma_result_from_errno((int)-resultALSA); } continue; /* Try writing again. */ } } } if (pFramesWritten != NULL) { *pFramesWritten = resultALSA; } return MA_SUCCESS; } static ma_result ma_device_data_loop_wakeup__alsa(ma_device* pDevice) { ma_uint64 t = 1; int resultWrite = 0; MA_ASSERT(pDevice != NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Waking up...\n"); /* Write to an eventfd to trigger a wakeup from poll() and abort any reading or writing. */ if (pDevice->alsa.pPollDescriptorsCapture != NULL) { resultWrite = write(pDevice->alsa.wakeupfdCapture, &t, sizeof(t)); } if (pDevice->alsa.pPollDescriptorsPlayback != NULL) { resultWrite = write(pDevice->alsa.wakeupfdPlayback, &t, sizeof(t)); } if (resultWrite < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] write() failed.\n"); return ma_result_from_errno(errno); } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Waking up completed successfully.\n"); return MA_SUCCESS; } static ma_result ma_context_uninit__alsa(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_alsa); /* Clean up memory for memory leak checkers. */ ((ma_snd_config_update_free_global_proc)pContext->alsa.snd_config_update_free_global)(); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->alsa.asoundSO); #endif ma_mutex_uninit(&pContext->alsa.internalDeviceEnumLock); return MA_SUCCESS; } static ma_result ma_context_init__alsa(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #ifndef MA_NO_RUNTIME_LINKING const char* libasoundNames[] = { "libasound.so.2", "libasound.so" }; size_t i; for (i = 0; i < ma_countof(libasoundNames); ++i) { pContext->alsa.asoundSO = ma_dlopen(ma_context_get_log(pContext), libasoundNames[i]); if (pContext->alsa.asoundSO != NULL) { break; } } if (pContext->alsa.asoundSO == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to open shared object.\n"); return MA_NO_BACKEND; } pContext->alsa.snd_pcm_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_open"); pContext->alsa.snd_pcm_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_close"); pContext->alsa.snd_pcm_hw_params_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_sizeof"); pContext->alsa.snd_pcm_hw_params_any = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_any"); pContext->alsa.snd_pcm_hw_params_set_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format"); pContext->alsa.snd_pcm_hw_params_set_format_first = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format_first"); pContext->alsa.snd_pcm_hw_params_get_format_mask = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format_mask"); pContext->alsa.snd_pcm_hw_params_set_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels"); pContext->alsa.snd_pcm_hw_params_set_channels_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels_near"); pContext->alsa.snd_pcm_hw_params_set_channels_minmax = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels_minmax"); pContext->alsa.snd_pcm_hw_params_set_rate_resample = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_resample"); pContext->alsa.snd_pcm_hw_params_set_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate"); pContext->alsa.snd_pcm_hw_params_set_rate_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_near"); pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_buffer_size_near"); pContext->alsa.snd_pcm_hw_params_set_periods_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_periods_near"); pContext->alsa.snd_pcm_hw_params_set_access = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_access"); pContext->alsa.snd_pcm_hw_params_get_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format"); pContext->alsa.snd_pcm_hw_params_get_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels"); pContext->alsa.snd_pcm_hw_params_get_channels_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels_min"); pContext->alsa.snd_pcm_hw_params_get_channels_max = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels_max"); pContext->alsa.snd_pcm_hw_params_get_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate"); pContext->alsa.snd_pcm_hw_params_get_rate_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate_min"); pContext->alsa.snd_pcm_hw_params_get_rate_max = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate_max"); pContext->alsa.snd_pcm_hw_params_get_buffer_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_buffer_size"); pContext->alsa.snd_pcm_hw_params_get_periods = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_periods"); pContext->alsa.snd_pcm_hw_params_get_access = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_access"); pContext->alsa.snd_pcm_hw_params_test_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_format"); pContext->alsa.snd_pcm_hw_params_test_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_channels"); pContext->alsa.snd_pcm_hw_params_test_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_rate"); pContext->alsa.snd_pcm_hw_params = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params"); pContext->alsa.snd_pcm_sw_params_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_sizeof"); pContext->alsa.snd_pcm_sw_params_current = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_current"); pContext->alsa.snd_pcm_sw_params_get_boundary = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_get_boundary"); pContext->alsa.snd_pcm_sw_params_set_avail_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_avail_min"); pContext->alsa.snd_pcm_sw_params_set_start_threshold = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_start_threshold"); pContext->alsa.snd_pcm_sw_params_set_stop_threshold = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_stop_threshold"); pContext->alsa.snd_pcm_sw_params = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params"); pContext->alsa.snd_pcm_format_mask_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_format_mask_sizeof"); pContext->alsa.snd_pcm_format_mask_test = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_format_mask_test"); pContext->alsa.snd_pcm_get_chmap = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_get_chmap"); pContext->alsa.snd_pcm_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_state"); pContext->alsa.snd_pcm_prepare = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_prepare"); pContext->alsa.snd_pcm_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_start"); pContext->alsa.snd_pcm_drop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_drop"); pContext->alsa.snd_pcm_drain = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_drain"); pContext->alsa.snd_pcm_reset = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_reset"); pContext->alsa.snd_device_name_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_hint"); pContext->alsa.snd_device_name_get_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_get_hint"); pContext->alsa.snd_card_get_index = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_card_get_index"); pContext->alsa.snd_device_name_free_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_free_hint"); pContext->alsa.snd_pcm_mmap_begin = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_mmap_begin"); pContext->alsa.snd_pcm_mmap_commit = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_mmap_commit"); pContext->alsa.snd_pcm_recover = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_recover"); pContext->alsa.snd_pcm_readi = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_readi"); pContext->alsa.snd_pcm_writei = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_writei"); pContext->alsa.snd_pcm_avail = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_avail"); pContext->alsa.snd_pcm_avail_update = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_avail_update"); pContext->alsa.snd_pcm_wait = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_wait"); pContext->alsa.snd_pcm_nonblock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_nonblock"); pContext->alsa.snd_pcm_info = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info"); pContext->alsa.snd_pcm_info_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info_sizeof"); pContext->alsa.snd_pcm_info_get_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info_get_name"); pContext->alsa.snd_pcm_poll_descriptors = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors"); pContext->alsa.snd_pcm_poll_descriptors_count = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors_count"); pContext->alsa.snd_pcm_poll_descriptors_revents = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors_revents"); pContext->alsa.snd_config_update_free_global = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_config_update_free_global"); #else /* The system below is just for type safety. */ ma_snd_pcm_open_proc _snd_pcm_open = snd_pcm_open; ma_snd_pcm_close_proc _snd_pcm_close = snd_pcm_close; ma_snd_pcm_hw_params_sizeof_proc _snd_pcm_hw_params_sizeof = snd_pcm_hw_params_sizeof; ma_snd_pcm_hw_params_any_proc _snd_pcm_hw_params_any = snd_pcm_hw_params_any; ma_snd_pcm_hw_params_set_format_proc _snd_pcm_hw_params_set_format = snd_pcm_hw_params_set_format; ma_snd_pcm_hw_params_set_format_first_proc _snd_pcm_hw_params_set_format_first = snd_pcm_hw_params_set_format_first; ma_snd_pcm_hw_params_get_format_mask_proc _snd_pcm_hw_params_get_format_mask = snd_pcm_hw_params_get_format_mask; ma_snd_pcm_hw_params_set_channels_proc _snd_pcm_hw_params_set_channels = snd_pcm_hw_params_set_channels; ma_snd_pcm_hw_params_set_channels_near_proc _snd_pcm_hw_params_set_channels_near = snd_pcm_hw_params_set_channels_near; ma_snd_pcm_hw_params_set_rate_resample_proc _snd_pcm_hw_params_set_rate_resample = snd_pcm_hw_params_set_rate_resample; ma_snd_pcm_hw_params_set_rate_near _snd_pcm_hw_params_set_rate = snd_pcm_hw_params_set_rate; ma_snd_pcm_hw_params_set_rate_near_proc _snd_pcm_hw_params_set_rate_near = snd_pcm_hw_params_set_rate_near; ma_snd_pcm_hw_params_set_rate_minmax_proc _snd_pcm_hw_params_set_rate_minmax = snd_pcm_hw_params_set_rate_minmax; ma_snd_pcm_hw_params_set_buffer_size_near_proc _snd_pcm_hw_params_set_buffer_size_near = snd_pcm_hw_params_set_buffer_size_near; ma_snd_pcm_hw_params_set_periods_near_proc _snd_pcm_hw_params_set_periods_near = snd_pcm_hw_params_set_periods_near; ma_snd_pcm_hw_params_set_access_proc _snd_pcm_hw_params_set_access = snd_pcm_hw_params_set_access; ma_snd_pcm_hw_params_get_format_proc _snd_pcm_hw_params_get_format = snd_pcm_hw_params_get_format; ma_snd_pcm_hw_params_get_channels_proc _snd_pcm_hw_params_get_channels = snd_pcm_hw_params_get_channels; ma_snd_pcm_hw_params_get_channels_min_proc _snd_pcm_hw_params_get_channels_min = snd_pcm_hw_params_get_channels_min; ma_snd_pcm_hw_params_get_channels_max_proc _snd_pcm_hw_params_get_channels_max = snd_pcm_hw_params_get_channels_max; ma_snd_pcm_hw_params_get_rate_proc _snd_pcm_hw_params_get_rate = snd_pcm_hw_params_get_rate; ma_snd_pcm_hw_params_get_rate_min_proc _snd_pcm_hw_params_get_rate_min = snd_pcm_hw_params_get_rate_min; ma_snd_pcm_hw_params_get_rate_max_proc _snd_pcm_hw_params_get_rate_max = snd_pcm_hw_params_get_rate_max; ma_snd_pcm_hw_params_get_buffer_size_proc _snd_pcm_hw_params_get_buffer_size = snd_pcm_hw_params_get_buffer_size; ma_snd_pcm_hw_params_get_periods_proc _snd_pcm_hw_params_get_periods = snd_pcm_hw_params_get_periods; ma_snd_pcm_hw_params_get_access_proc _snd_pcm_hw_params_get_access = snd_pcm_hw_params_get_access; ma_snd_pcm_hw_params_test_format_proc _snd_pcm_hw_params_test_format = snd_pcm_hw_params_test_format; ma_snd_pcm_hw_params_test_channels_proc _snd_pcm_hw_params_test_channels = snd_pcm_hw_params_test_channels; ma_snd_pcm_hw_params_test_rate_proc _snd_pcm_hw_params_test_rate = snd_pcm_hw_params_test_rate; ma_snd_pcm_hw_params_proc _snd_pcm_hw_params = snd_pcm_hw_params; ma_snd_pcm_sw_params_sizeof_proc _snd_pcm_sw_params_sizeof = snd_pcm_sw_params_sizeof; ma_snd_pcm_sw_params_current_proc _snd_pcm_sw_params_current = snd_pcm_sw_params_current; ma_snd_pcm_sw_params_get_boundary_proc _snd_pcm_sw_params_get_boundary = snd_pcm_sw_params_get_boundary; ma_snd_pcm_sw_params_set_avail_min_proc _snd_pcm_sw_params_set_avail_min = snd_pcm_sw_params_set_avail_min; ma_snd_pcm_sw_params_set_start_threshold_proc _snd_pcm_sw_params_set_start_threshold = snd_pcm_sw_params_set_start_threshold; ma_snd_pcm_sw_params_set_stop_threshold_proc _snd_pcm_sw_params_set_stop_threshold = snd_pcm_sw_params_set_stop_threshold; ma_snd_pcm_sw_params_proc _snd_pcm_sw_params = snd_pcm_sw_params; ma_snd_pcm_format_mask_sizeof_proc _snd_pcm_format_mask_sizeof = snd_pcm_format_mask_sizeof; ma_snd_pcm_format_mask_test_proc _snd_pcm_format_mask_test = snd_pcm_format_mask_test; ma_snd_pcm_get_chmap_proc _snd_pcm_get_chmap = snd_pcm_get_chmap; ma_snd_pcm_state_proc _snd_pcm_state = snd_pcm_state; ma_snd_pcm_prepare_proc _snd_pcm_prepare = snd_pcm_prepare; ma_snd_pcm_start_proc _snd_pcm_start = snd_pcm_start; ma_snd_pcm_drop_proc _snd_pcm_drop = snd_pcm_drop; ma_snd_pcm_drain_proc _snd_pcm_drain = snd_pcm_drain; ma_snd_pcm_reset_proc _snd_pcm_reset = snd_pcm_reset; ma_snd_device_name_hint_proc _snd_device_name_hint = snd_device_name_hint; ma_snd_device_name_get_hint_proc _snd_device_name_get_hint = snd_device_name_get_hint; ma_snd_card_get_index_proc _snd_card_get_index = snd_card_get_index; ma_snd_device_name_free_hint_proc _snd_device_name_free_hint = snd_device_name_free_hint; ma_snd_pcm_mmap_begin_proc _snd_pcm_mmap_begin = snd_pcm_mmap_begin; ma_snd_pcm_mmap_commit_proc _snd_pcm_mmap_commit = snd_pcm_mmap_commit; ma_snd_pcm_recover_proc _snd_pcm_recover = snd_pcm_recover; ma_snd_pcm_readi_proc _snd_pcm_readi = snd_pcm_readi; ma_snd_pcm_writei_proc _snd_pcm_writei = snd_pcm_writei; ma_snd_pcm_avail_proc _snd_pcm_avail = snd_pcm_avail; ma_snd_pcm_avail_update_proc _snd_pcm_avail_update = snd_pcm_avail_update; ma_snd_pcm_wait_proc _snd_pcm_wait = snd_pcm_wait; ma_snd_pcm_nonblock_proc _snd_pcm_nonblock = snd_pcm_nonblock; ma_snd_pcm_info_proc _snd_pcm_info = snd_pcm_info; ma_snd_pcm_info_sizeof_proc _snd_pcm_info_sizeof = snd_pcm_info_sizeof; ma_snd_pcm_info_get_name_proc _snd_pcm_info_get_name = snd_pcm_info_get_name; ma_snd_pcm_poll_descriptors _snd_pcm_poll_descriptors = snd_pcm_poll_descriptors; ma_snd_pcm_poll_descriptors_count _snd_pcm_poll_descriptors_count = snd_pcm_poll_descriptors_count; ma_snd_pcm_poll_descriptors_revents _snd_pcm_poll_descriptors_revents = snd_pcm_poll_descriptors_revents; ma_snd_config_update_free_global_proc _snd_config_update_free_global = snd_config_update_free_global; pContext->alsa.snd_pcm_open = (ma_proc)_snd_pcm_open; pContext->alsa.snd_pcm_close = (ma_proc)_snd_pcm_close; pContext->alsa.snd_pcm_hw_params_sizeof = (ma_proc)_snd_pcm_hw_params_sizeof; pContext->alsa.snd_pcm_hw_params_any = (ma_proc)_snd_pcm_hw_params_any; pContext->alsa.snd_pcm_hw_params_set_format = (ma_proc)_snd_pcm_hw_params_set_format; pContext->alsa.snd_pcm_hw_params_set_format_first = (ma_proc)_snd_pcm_hw_params_set_format_first; pContext->alsa.snd_pcm_hw_params_get_format_mask = (ma_proc)_snd_pcm_hw_params_get_format_mask; pContext->alsa.snd_pcm_hw_params_set_channels = (ma_proc)_snd_pcm_hw_params_set_channels; pContext->alsa.snd_pcm_hw_params_set_channels_near = (ma_proc)_snd_pcm_hw_params_set_channels_near; pContext->alsa.snd_pcm_hw_params_set_channels_minmax = (ma_proc)_snd_pcm_hw_params_set_channels_minmax; pContext->alsa.snd_pcm_hw_params_set_rate_resample = (ma_proc)_snd_pcm_hw_params_set_rate_resample; pContext->alsa.snd_pcm_hw_params_set_rate = (ma_proc)_snd_pcm_hw_params_set_rate; pContext->alsa.snd_pcm_hw_params_set_rate_near = (ma_proc)_snd_pcm_hw_params_set_rate_near; pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)_snd_pcm_hw_params_set_buffer_size_near; pContext->alsa.snd_pcm_hw_params_set_periods_near = (ma_proc)_snd_pcm_hw_params_set_periods_near; pContext->alsa.snd_pcm_hw_params_set_access = (ma_proc)_snd_pcm_hw_params_set_access; pContext->alsa.snd_pcm_hw_params_get_format = (ma_proc)_snd_pcm_hw_params_get_format; pContext->alsa.snd_pcm_hw_params_get_channels = (ma_proc)_snd_pcm_hw_params_get_channels; pContext->alsa.snd_pcm_hw_params_get_channels_min = (ma_proc)_snd_pcm_hw_params_get_channels_min; pContext->alsa.snd_pcm_hw_params_get_channels_max = (ma_proc)_snd_pcm_hw_params_get_channels_max; pContext->alsa.snd_pcm_hw_params_get_rate = (ma_proc)_snd_pcm_hw_params_get_rate; pContext->alsa.snd_pcm_hw_params_get_rate_min = (ma_proc)_snd_pcm_hw_params_get_rate_min; pContext->alsa.snd_pcm_hw_params_get_rate_max = (ma_proc)_snd_pcm_hw_params_get_rate_max; pContext->alsa.snd_pcm_hw_params_get_buffer_size = (ma_proc)_snd_pcm_hw_params_get_buffer_size; pContext->alsa.snd_pcm_hw_params_get_periods = (ma_proc)_snd_pcm_hw_params_get_periods; pContext->alsa.snd_pcm_hw_params_get_access = (ma_proc)_snd_pcm_hw_params_get_access; pContext->alsa.snd_pcm_hw_params_test_format = (ma_proc)_snd_pcm_hw_params_test_format; pContext->alsa.snd_pcm_hw_params_test_channels = (ma_proc)_snd_pcm_hw_params_test_channels; pContext->alsa.snd_pcm_hw_params_test_rate = (ma_proc)_snd_pcm_hw_params_test_rate; pContext->alsa.snd_pcm_hw_params = (ma_proc)_snd_pcm_hw_params; pContext->alsa.snd_pcm_sw_params_sizeof = (ma_proc)_snd_pcm_sw_params_sizeof; pContext->alsa.snd_pcm_sw_params_current = (ma_proc)_snd_pcm_sw_params_current; pContext->alsa.snd_pcm_sw_params_get_boundary = (ma_proc)_snd_pcm_sw_params_get_boundary; pContext->alsa.snd_pcm_sw_params_set_avail_min = (ma_proc)_snd_pcm_sw_params_set_avail_min; pContext->alsa.snd_pcm_sw_params_set_start_threshold = (ma_proc)_snd_pcm_sw_params_set_start_threshold; pContext->alsa.snd_pcm_sw_params_set_stop_threshold = (ma_proc)_snd_pcm_sw_params_set_stop_threshold; pContext->alsa.snd_pcm_sw_params = (ma_proc)_snd_pcm_sw_params; pContext->alsa.snd_pcm_format_mask_sizeof = (ma_proc)_snd_pcm_format_mask_sizeof; pContext->alsa.snd_pcm_format_mask_test = (ma_proc)_snd_pcm_format_mask_test; pContext->alsa.snd_pcm_get_chmap = (ma_proc)_snd_pcm_get_chmap; pContext->alsa.snd_pcm_state = (ma_proc)_snd_pcm_state; pContext->alsa.snd_pcm_prepare = (ma_proc)_snd_pcm_prepare; pContext->alsa.snd_pcm_start = (ma_proc)_snd_pcm_start; pContext->alsa.snd_pcm_drop = (ma_proc)_snd_pcm_drop; pContext->alsa.snd_pcm_drain = (ma_proc)_snd_pcm_drain; pContext->alsa.snd_pcm_reset = (ma_proc)_snd_pcm_reset; pContext->alsa.snd_device_name_hint = (ma_proc)_snd_device_name_hint; pContext->alsa.snd_device_name_get_hint = (ma_proc)_snd_device_name_get_hint; pContext->alsa.snd_card_get_index = (ma_proc)_snd_card_get_index; pContext->alsa.snd_device_name_free_hint = (ma_proc)_snd_device_name_free_hint; pContext->alsa.snd_pcm_mmap_begin = (ma_proc)_snd_pcm_mmap_begin; pContext->alsa.snd_pcm_mmap_commit = (ma_proc)_snd_pcm_mmap_commit; pContext->alsa.snd_pcm_recover = (ma_proc)_snd_pcm_recover; pContext->alsa.snd_pcm_readi = (ma_proc)_snd_pcm_readi; pContext->alsa.snd_pcm_writei = (ma_proc)_snd_pcm_writei; pContext->alsa.snd_pcm_avail = (ma_proc)_snd_pcm_avail; pContext->alsa.snd_pcm_avail_update = (ma_proc)_snd_pcm_avail_update; pContext->alsa.snd_pcm_wait = (ma_proc)_snd_pcm_wait; pContext->alsa.snd_pcm_nonblock = (ma_proc)_snd_pcm_nonblock; pContext->alsa.snd_pcm_info = (ma_proc)_snd_pcm_info; pContext->alsa.snd_pcm_info_sizeof = (ma_proc)_snd_pcm_info_sizeof; pContext->alsa.snd_pcm_info_get_name = (ma_proc)_snd_pcm_info_get_name; pContext->alsa.snd_pcm_poll_descriptors = (ma_proc)_snd_pcm_poll_descriptors; pContext->alsa.snd_pcm_poll_descriptors_count = (ma_proc)_snd_pcm_poll_descriptors_count; pContext->alsa.snd_pcm_poll_descriptors_revents = (ma_proc)_snd_pcm_poll_descriptors_revents; pContext->alsa.snd_config_update_free_global = (ma_proc)_snd_config_update_free_global; #endif pContext->alsa.useVerboseDeviceEnumeration = pConfig->alsa.useVerboseDeviceEnumeration; result = ma_mutex_init(&pContext->alsa.internalDeviceEnumLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] WARNING: Failed to initialize mutex for internal device enumeration."); return result; } pCallbacks->onContextInit = ma_context_init__alsa; pCallbacks->onContextUninit = ma_context_uninit__alsa; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__alsa; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__alsa; pCallbacks->onDeviceInit = ma_device_init__alsa; pCallbacks->onDeviceUninit = ma_device_uninit__alsa; pCallbacks->onDeviceStart = ma_device_start__alsa; pCallbacks->onDeviceStop = ma_device_stop__alsa; pCallbacks->onDeviceRead = ma_device_read__alsa; pCallbacks->onDeviceWrite = ma_device_write__alsa; pCallbacks->onDeviceDataLoop = NULL; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__alsa; return MA_SUCCESS; } #endif /* MA_HAS_ALSA */ /****************************************************************************** PulseAudio Backend ******************************************************************************/ #ifdef MA_HAS_PULSEAUDIO /* The PulseAudio API, along with Apple's Core Audio, is the worst of the mainstream audio APIs. This is a brief description of what's going on in the PulseAudio backend. I apologize if this gets a bit ranty for your liking - you might want to skip this discussion. PulseAudio has something they call the "Simple API", which unfortunately isn't suitable for miniaudio. I've not seen anywhere where it allows you to enumerate over devices, nor does it seem to support the ability to stop and start streams. Looking at the documentation, it appears as though the stream is constantly running and you prevent sound from being emitted or captured by simply not calling the read or write functions. This is not a professional solution as it would be much better to *actually* stop the underlying stream. Perhaps the simple API has some smarts to do this automatically, but I'm not sure. Another limitation with the simple API is that it seems inefficient when you want to have multiple streams to a single context. For these reasons, miniaudio is not using the simple API. Since we're not using the simple API, we're left with the asynchronous API as our only other option. And boy, is this where it starts to get fun, and I don't mean that in a good way... The problems start with the very name of the API - "asynchronous". Yes, this is an asynchronous oriented API which means your commands don't immediately take effect. You instead need to issue your commands, and then wait for them to complete. The waiting mechanism is enabled through the use of a "main loop". In the asynchronous API you cannot get away from the main loop, and the main loop is where almost all of PulseAudio's problems stem from. When you first initialize PulseAudio you need an object referred to as "main loop". You can implement this yourself by defining your own vtable, but it's much easier to just use one of the built-in main loop implementations. There's two generic implementations called pa_mainloop and pa_threaded_mainloop, and another implementation specific to GLib called pa_glib_mainloop. We're using pa_threaded_mainloop because it simplifies management of the worker thread. The idea of the main loop object is pretty self explanatory - you're supposed to use it to implement a worker thread which runs in a loop. The main loop is where operations are actually executed. To initialize the main loop, you just use `pa_threaded_mainloop_new()`. This is the first function you'll call. You can then get a pointer to the vtable with `pa_threaded_mainloop_get_api()` (the main loop vtable is called `pa_mainloop_api`). Again, you can bypass the threaded main loop object entirely and just implement `pa_mainloop_api` directly, but there's no need for it unless you're doing something extremely specialized such as if you want to integrate it into your application's existing main loop infrastructure. (EDIT 2021-01-26: miniaudio is no longer using `pa_threaded_mainloop` due to this issue: https://github.com/mackron/miniaudio/issues/262. It is now using `pa_mainloop` which turns out to be a simpler solution anyway. The rest of this rant still applies, however.) Once you have your main loop vtable (the `pa_mainloop_api` object) you can create the PulseAudio context. This is very similar to miniaudio's context and they map to each other quite well. You have one context to many streams, which is basically the same as miniaudio's one `ma_context` to many `ma_device`s. Here's where it starts to get annoying, however. When you first create the PulseAudio context, which is done with `pa_context_new()`, it's not actually connected to anything. When you connect, you call `pa_context_connect()`. However, if you remember, PulseAudio is an asynchronous API. That means you cannot just assume the context is connected after `pa_context_context()` has returned. You instead need to wait for it to connect. To do this, you need to either wait for a callback to get fired, which you can set with `pa_context_set_state_callback()`, or you can continuously poll the context's state. Either way, you need to run this in a loop. All objects from here out are created from the context, and, I believe, you can't be creating these objects until the context is connected. This waiting loop is therefore unavoidable. In order for the waiting to ever complete, however, the main loop needs to be running. Before attempting to connect the context, the main loop needs to be started with `pa_threaded_mainloop_start()`. The reason for this asynchronous design is to support cases where you're connecting to a remote server, say through a local network or an internet connection. However, the *VAST* majority of cases don't involve this at all - they just connect to a local "server" running on the host machine. The fact that this would be the default rather than making `pa_context_connect()` synchronous tends to boggle the mind. Once the context has been created and connected you can start creating a stream. A PulseAudio stream is analogous to miniaudio's device. The initialization of a stream is fairly standard - you configure some attributes (analogous to miniaudio's device config) and then call `pa_stream_new()` to actually create it. Here is where we start to get into "operations". When configuring the stream, you can get information about the source (such as sample format, sample rate, etc.), however it's not synchronous. Instead, a `pa_operation` object is returned from `pa_context_get_source_info_by_name()` (capture) or `pa_context_get_sink_info_by_name()` (playback). Then, you need to run a loop (again!) to wait for the operation to complete which you can determine via a callback or polling, just like we did with the context. Then, as an added bonus, you need to decrement the reference counter of the `pa_operation` object to ensure memory is cleaned up. All of that just to retrieve basic information about a device! Once the basic information about the device has been retrieved, miniaudio can now create the stream with `ma_stream_new()`. Like the context, this needs to be connected. But we need to be careful here, because we're now about to introduce one of the most horrific design choices in PulseAudio. PulseAudio allows you to specify a callback that is fired when data can be written to or read from a stream. The language is important here because PulseAudio takes it literally, specifically the "can be". You would think these callbacks would be appropriate as the place for writing and reading data to and from the stream, and that would be right, except when it's not. When you initialize the stream, you can set a flag that tells PulseAudio to not start the stream automatically. This is required because miniaudio does not auto-start devices straight after initialization - you need to call `ma_device_start()` manually. The problem is that even when this flag is specified, PulseAudio will immediately fire its write or read callback. This is *technically* correct (based on the wording in the documentation) because indeed, data *can* be written at this point. The problem is that it's not *practical*. It makes sense that the write/read callback would be where a program will want to write or read data to or from the stream, but when it's called before the application has even requested that the stream be started, it's just not practical because the program probably isn't ready for any kind of data delivery at that point (it may still need to load files or whatnot). Instead, this callback should only be fired when the application requests the stream be started which is how it works with literally *every* other callback-based audio API. Since miniaudio forbids firing of the data callback until the device has been started (as it should be with *all* callback based APIs), logic needs to be added to ensure miniaudio doesn't just blindly fire the application-defined data callback from within the PulseAudio callback before the stream has actually been started. The device state is used for this - if the state is anything other than `ma_device_state_starting` or `ma_device_state_started`, the main data callback is not fired. This, unfortunately, is not the end of the problems with the PulseAudio write callback. Any normal callback based audio API will continuously fire the callback at regular intervals based on the size of the internal buffer. This will only ever be fired when the device is running, and will be fired regardless of whether or not the user actually wrote anything to the device/stream. This not the case in PulseAudio. In PulseAudio, the data callback will *only* be called if you wrote something to it previously. That means, if you don't call `pa_stream_write()`, the callback will not get fired. On the surface you wouldn't think this would matter because you should be always writing data, and if you don't have anything to write, just write silence. That's fine until you want to drain the stream. You see, if you're continuously writing data to the stream, the stream will never get drained! That means in order to drain the stream, you need to *not* write data to it! But remember, when you don't write data to the stream, the callback won't get fired again! Why is draining important? Because that's how we've defined stopping to work in miniaudio. In miniaudio, stopping the device requires it to be drained before returning from ma_device_stop(). So we've stopped the device, which requires us to drain, but draining requires us to *not* write data to the stream (or else it won't ever complete draining), but not writing to the stream means the callback won't get fired again! This becomes a problem when stopping and then restarting the device. When the device is stopped, it's drained, which requires us to *not* write anything to the stream. But then, since we didn't write anything to it, the write callback will *never* get called again if we just resume the stream naively. This means that starting the stream requires us to write data to the stream from outside the callback. This disconnect is something PulseAudio has got seriously wrong - there should only ever be a single source of data delivery, that being the callback. (I have tried using `pa_stream_flush()` to trigger the write callback to fire, but this just doesn't work for some reason.) Once you've created the stream, you need to connect it which involves the whole waiting procedure. This is the same process as the context, only this time you'll poll for the state with `pa_stream_get_status()`. The starting and stopping of a streaming is referred to as "corking" in PulseAudio. The analogy is corking a barrel. To start the stream, you uncork it, to stop it you cork it. Personally I think it's silly - why would you not just call it "starting" and "stopping" like any other normal audio API? Anyway, the act of corking is, you guessed it, asynchronous. This means you'll need our waiting loop as usual. Again, why this asynchronous design is the default is absolutely beyond me. Would it really be that hard to just make it run synchronously? Teardown is pretty simple (what?!). It's just a matter of calling the relevant `_unref()` function on each object in reverse order that they were initialized in. That's about it from the PulseAudio side. A bit ranty, I know, but they really need to fix that main loop and callback system. They're embarrassingly unpractical. The main loop thing is an easy fix - have synchronous versions of all APIs. If an application wants these to run asynchronously, they can execute them in a separate thread themselves. The desire to run these asynchronously is such a niche requirement - it makes no sense to make it the default. The stream write callback needs to be change, or an alternative provided, that is constantly fired, regardless of whether or not `pa_stream_write()` has been called, and it needs to take a pointer to a buffer as a parameter which the program just writes to directly rather than having to call `pa_stream_writable_size()` and `pa_stream_write()`. These changes alone will change PulseAudio from one of the worst audio APIs to one of the best. */ /* It is assumed pulseaudio.h is available when linking at compile time. When linking at compile time, we use the declarations in the header to check for type safety. We cannot do this when linking at run time because the header might not be available. */ #ifdef MA_NO_RUNTIME_LINKING /* pulseaudio.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ #if !defined(__cplusplus) #if defined(__STRICT_ANSI__) #if !defined(inline) #define inline __inline__ __attribute__((always_inline)) #define MA_INLINE_DEFINED #endif #endif #endif #include #if defined(MA_INLINE_DEFINED) #undef inline #undef MA_INLINE_DEFINED #endif #define MA_PA_OK PA_OK #define MA_PA_ERR_ACCESS PA_ERR_ACCESS #define MA_PA_ERR_INVALID PA_ERR_INVALID #define MA_PA_ERR_NOENTITY PA_ERR_NOENTITY #define MA_PA_ERR_NOTSUPPORTED PA_ERR_NOTSUPPORTED #define MA_PA_CHANNELS_MAX PA_CHANNELS_MAX #define MA_PA_RATE_MAX PA_RATE_MAX typedef pa_context_flags_t ma_pa_context_flags_t; #define MA_PA_CONTEXT_NOFLAGS PA_CONTEXT_NOFLAGS #define MA_PA_CONTEXT_NOAUTOSPAWN PA_CONTEXT_NOAUTOSPAWN #define MA_PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL typedef pa_stream_flags_t ma_pa_stream_flags_t; #define MA_PA_STREAM_NOFLAGS PA_STREAM_NOFLAGS #define MA_PA_STREAM_START_CORKED PA_STREAM_START_CORKED #define MA_PA_STREAM_INTERPOLATE_TIMING PA_STREAM_INTERPOLATE_TIMING #define MA_PA_STREAM_NOT_MONOTONIC PA_STREAM_NOT_MONOTONIC #define MA_PA_STREAM_AUTO_TIMING_UPDATE PA_STREAM_AUTO_TIMING_UPDATE #define MA_PA_STREAM_NO_REMAP_CHANNELS PA_STREAM_NO_REMAP_CHANNELS #define MA_PA_STREAM_NO_REMIX_CHANNELS PA_STREAM_NO_REMIX_CHANNELS #define MA_PA_STREAM_FIX_FORMAT PA_STREAM_FIX_FORMAT #define MA_PA_STREAM_FIX_RATE PA_STREAM_FIX_RATE #define MA_PA_STREAM_FIX_CHANNELS PA_STREAM_FIX_CHANNELS #define MA_PA_STREAM_DONT_MOVE PA_STREAM_DONT_MOVE #define MA_PA_STREAM_VARIABLE_RATE PA_STREAM_VARIABLE_RATE #define MA_PA_STREAM_PEAK_DETECT PA_STREAM_PEAK_DETECT #define MA_PA_STREAM_START_MUTED PA_STREAM_START_MUTED #define MA_PA_STREAM_ADJUST_LATENCY PA_STREAM_ADJUST_LATENCY #define MA_PA_STREAM_EARLY_REQUESTS PA_STREAM_EARLY_REQUESTS #define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND #define MA_PA_STREAM_START_UNMUTED PA_STREAM_START_UNMUTED #define MA_PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND #define MA_PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME #define MA_PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH typedef pa_sink_flags_t ma_pa_sink_flags_t; #define MA_PA_SINK_NOFLAGS PA_SINK_NOFLAGS #define MA_PA_SINK_HW_VOLUME_CTRL PA_SINK_HW_VOLUME_CTRL #define MA_PA_SINK_LATENCY PA_SINK_LATENCY #define MA_PA_SINK_HARDWARE PA_SINK_HARDWARE #define MA_PA_SINK_NETWORK PA_SINK_NETWORK #define MA_PA_SINK_HW_MUTE_CTRL PA_SINK_HW_MUTE_CTRL #define MA_PA_SINK_DECIBEL_VOLUME PA_SINK_DECIBEL_VOLUME #define MA_PA_SINK_FLAT_VOLUME PA_SINK_FLAT_VOLUME #define MA_PA_SINK_DYNAMIC_LATENCY PA_SINK_DYNAMIC_LATENCY #define MA_PA_SINK_SET_FORMATS PA_SINK_SET_FORMATS typedef pa_source_flags_t ma_pa_source_flags_t; #define MA_PA_SOURCE_NOFLAGS PA_SOURCE_NOFLAGS #define MA_PA_SOURCE_HW_VOLUME_CTRL PA_SOURCE_HW_VOLUME_CTRL #define MA_PA_SOURCE_LATENCY PA_SOURCE_LATENCY #define MA_PA_SOURCE_HARDWARE PA_SOURCE_HARDWARE #define MA_PA_SOURCE_NETWORK PA_SOURCE_NETWORK #define MA_PA_SOURCE_HW_MUTE_CTRL PA_SOURCE_HW_MUTE_CTRL #define MA_PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME #define MA_PA_SOURCE_DYNAMIC_LATENCY PA_SOURCE_DYNAMIC_LATENCY #define MA_PA_SOURCE_FLAT_VOLUME PA_SOURCE_FLAT_VOLUME typedef pa_context_state_t ma_pa_context_state_t; #define MA_PA_CONTEXT_UNCONNECTED PA_CONTEXT_UNCONNECTED #define MA_PA_CONTEXT_CONNECTING PA_CONTEXT_CONNECTING #define MA_PA_CONTEXT_AUTHORIZING PA_CONTEXT_AUTHORIZING #define MA_PA_CONTEXT_SETTING_NAME PA_CONTEXT_SETTING_NAME #define MA_PA_CONTEXT_READY PA_CONTEXT_READY #define MA_PA_CONTEXT_FAILED PA_CONTEXT_FAILED #define MA_PA_CONTEXT_TERMINATED PA_CONTEXT_TERMINATED typedef pa_stream_state_t ma_pa_stream_state_t; #define MA_PA_STREAM_UNCONNECTED PA_STREAM_UNCONNECTED #define MA_PA_STREAM_CREATING PA_STREAM_CREATING #define MA_PA_STREAM_READY PA_STREAM_READY #define MA_PA_STREAM_FAILED PA_STREAM_FAILED #define MA_PA_STREAM_TERMINATED PA_STREAM_TERMINATED typedef pa_operation_state_t ma_pa_operation_state_t; #define MA_PA_OPERATION_RUNNING PA_OPERATION_RUNNING #define MA_PA_OPERATION_DONE PA_OPERATION_DONE #define MA_PA_OPERATION_CANCELLED PA_OPERATION_CANCELLED typedef pa_sink_state_t ma_pa_sink_state_t; #define MA_PA_SINK_INVALID_STATE PA_SINK_INVALID_STATE #define MA_PA_SINK_RUNNING PA_SINK_RUNNING #define MA_PA_SINK_IDLE PA_SINK_IDLE #define MA_PA_SINK_SUSPENDED PA_SINK_SUSPENDED typedef pa_source_state_t ma_pa_source_state_t; #define MA_PA_SOURCE_INVALID_STATE PA_SOURCE_INVALID_STATE #define MA_PA_SOURCE_RUNNING PA_SOURCE_RUNNING #define MA_PA_SOURCE_IDLE PA_SOURCE_IDLE #define MA_PA_SOURCE_SUSPENDED PA_SOURCE_SUSPENDED typedef pa_seek_mode_t ma_pa_seek_mode_t; #define MA_PA_SEEK_RELATIVE PA_SEEK_RELATIVE #define MA_PA_SEEK_ABSOLUTE PA_SEEK_ABSOLUTE #define MA_PA_SEEK_RELATIVE_ON_READ PA_SEEK_RELATIVE_ON_READ #define MA_PA_SEEK_RELATIVE_END PA_SEEK_RELATIVE_END typedef pa_channel_position_t ma_pa_channel_position_t; #define MA_PA_CHANNEL_POSITION_INVALID PA_CHANNEL_POSITION_INVALID #define MA_PA_CHANNEL_POSITION_MONO PA_CHANNEL_POSITION_MONO #define MA_PA_CHANNEL_POSITION_FRONT_LEFT PA_CHANNEL_POSITION_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT PA_CHANNEL_POSITION_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_FRONT_CENTER PA_CHANNEL_POSITION_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_REAR_CENTER PA_CHANNEL_POSITION_REAR_CENTER #define MA_PA_CHANNEL_POSITION_REAR_LEFT PA_CHANNEL_POSITION_REAR_LEFT #define MA_PA_CHANNEL_POSITION_REAR_RIGHT PA_CHANNEL_POSITION_REAR_RIGHT #define MA_PA_CHANNEL_POSITION_LFE PA_CHANNEL_POSITION_LFE #define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER #define MA_PA_CHANNEL_POSITION_SIDE_LEFT PA_CHANNEL_POSITION_SIDE_LEFT #define MA_PA_CHANNEL_POSITION_SIDE_RIGHT PA_CHANNEL_POSITION_SIDE_RIGHT #define MA_PA_CHANNEL_POSITION_AUX0 PA_CHANNEL_POSITION_AUX0 #define MA_PA_CHANNEL_POSITION_AUX1 PA_CHANNEL_POSITION_AUX1 #define MA_PA_CHANNEL_POSITION_AUX2 PA_CHANNEL_POSITION_AUX2 #define MA_PA_CHANNEL_POSITION_AUX3 PA_CHANNEL_POSITION_AUX3 #define MA_PA_CHANNEL_POSITION_AUX4 PA_CHANNEL_POSITION_AUX4 #define MA_PA_CHANNEL_POSITION_AUX5 PA_CHANNEL_POSITION_AUX5 #define MA_PA_CHANNEL_POSITION_AUX6 PA_CHANNEL_POSITION_AUX6 #define MA_PA_CHANNEL_POSITION_AUX7 PA_CHANNEL_POSITION_AUX7 #define MA_PA_CHANNEL_POSITION_AUX8 PA_CHANNEL_POSITION_AUX8 #define MA_PA_CHANNEL_POSITION_AUX9 PA_CHANNEL_POSITION_AUX9 #define MA_PA_CHANNEL_POSITION_AUX10 PA_CHANNEL_POSITION_AUX10 #define MA_PA_CHANNEL_POSITION_AUX11 PA_CHANNEL_POSITION_AUX11 #define MA_PA_CHANNEL_POSITION_AUX12 PA_CHANNEL_POSITION_AUX12 #define MA_PA_CHANNEL_POSITION_AUX13 PA_CHANNEL_POSITION_AUX13 #define MA_PA_CHANNEL_POSITION_AUX14 PA_CHANNEL_POSITION_AUX14 #define MA_PA_CHANNEL_POSITION_AUX15 PA_CHANNEL_POSITION_AUX15 #define MA_PA_CHANNEL_POSITION_AUX16 PA_CHANNEL_POSITION_AUX16 #define MA_PA_CHANNEL_POSITION_AUX17 PA_CHANNEL_POSITION_AUX17 #define MA_PA_CHANNEL_POSITION_AUX18 PA_CHANNEL_POSITION_AUX18 #define MA_PA_CHANNEL_POSITION_AUX19 PA_CHANNEL_POSITION_AUX19 #define MA_PA_CHANNEL_POSITION_AUX20 PA_CHANNEL_POSITION_AUX20 #define MA_PA_CHANNEL_POSITION_AUX21 PA_CHANNEL_POSITION_AUX21 #define MA_PA_CHANNEL_POSITION_AUX22 PA_CHANNEL_POSITION_AUX22 #define MA_PA_CHANNEL_POSITION_AUX23 PA_CHANNEL_POSITION_AUX23 #define MA_PA_CHANNEL_POSITION_AUX24 PA_CHANNEL_POSITION_AUX24 #define MA_PA_CHANNEL_POSITION_AUX25 PA_CHANNEL_POSITION_AUX25 #define MA_PA_CHANNEL_POSITION_AUX26 PA_CHANNEL_POSITION_AUX26 #define MA_PA_CHANNEL_POSITION_AUX27 PA_CHANNEL_POSITION_AUX27 #define MA_PA_CHANNEL_POSITION_AUX28 PA_CHANNEL_POSITION_AUX28 #define MA_PA_CHANNEL_POSITION_AUX29 PA_CHANNEL_POSITION_AUX29 #define MA_PA_CHANNEL_POSITION_AUX30 PA_CHANNEL_POSITION_AUX30 #define MA_PA_CHANNEL_POSITION_AUX31 PA_CHANNEL_POSITION_AUX31 #define MA_PA_CHANNEL_POSITION_TOP_CENTER PA_CHANNEL_POSITION_TOP_CENTER #define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT PA_CHANNEL_POSITION_TOP_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT PA_CHANNEL_POSITION_TOP_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER PA_CHANNEL_POSITION_TOP_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT PA_CHANNEL_POSITION_TOP_REAR_LEFT #define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT PA_CHANNEL_POSITION_TOP_REAR_RIGHT #define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER PA_CHANNEL_POSITION_TOP_REAR_CENTER #define MA_PA_CHANNEL_POSITION_LEFT PA_CHANNEL_POSITION_LEFT #define MA_PA_CHANNEL_POSITION_RIGHT PA_CHANNEL_POSITION_RIGHT #define MA_PA_CHANNEL_POSITION_CENTER PA_CHANNEL_POSITION_CENTER #define MA_PA_CHANNEL_POSITION_SUBWOOFER PA_CHANNEL_POSITION_SUBWOOFER typedef pa_channel_map_def_t ma_pa_channel_map_def_t; #define MA_PA_CHANNEL_MAP_AIFF PA_CHANNEL_MAP_AIFF #define MA_PA_CHANNEL_MAP_ALSA PA_CHANNEL_MAP_ALSA #define MA_PA_CHANNEL_MAP_AUX PA_CHANNEL_MAP_AUX #define MA_PA_CHANNEL_MAP_WAVEEX PA_CHANNEL_MAP_WAVEEX #define MA_PA_CHANNEL_MAP_OSS PA_CHANNEL_MAP_OSS #define MA_PA_CHANNEL_MAP_DEFAULT PA_CHANNEL_MAP_DEFAULT typedef pa_sample_format_t ma_pa_sample_format_t; #define MA_PA_SAMPLE_INVALID PA_SAMPLE_INVALID #define MA_PA_SAMPLE_U8 PA_SAMPLE_U8 #define MA_PA_SAMPLE_ALAW PA_SAMPLE_ALAW #define MA_PA_SAMPLE_ULAW PA_SAMPLE_ULAW #define MA_PA_SAMPLE_S16LE PA_SAMPLE_S16LE #define MA_PA_SAMPLE_S16BE PA_SAMPLE_S16BE #define MA_PA_SAMPLE_FLOAT32LE PA_SAMPLE_FLOAT32LE #define MA_PA_SAMPLE_FLOAT32BE PA_SAMPLE_FLOAT32BE #define MA_PA_SAMPLE_S32LE PA_SAMPLE_S32LE #define MA_PA_SAMPLE_S32BE PA_SAMPLE_S32BE #define MA_PA_SAMPLE_S24LE PA_SAMPLE_S24LE #define MA_PA_SAMPLE_S24BE PA_SAMPLE_S24BE #define MA_PA_SAMPLE_S24_32LE PA_SAMPLE_S24_32LE #define MA_PA_SAMPLE_S24_32BE PA_SAMPLE_S24_32BE typedef pa_mainloop ma_pa_mainloop; typedef pa_threaded_mainloop ma_pa_threaded_mainloop; typedef pa_mainloop_api ma_pa_mainloop_api; typedef pa_context ma_pa_context; typedef pa_operation ma_pa_operation; typedef pa_stream ma_pa_stream; typedef pa_spawn_api ma_pa_spawn_api; typedef pa_buffer_attr ma_pa_buffer_attr; typedef pa_channel_map ma_pa_channel_map; typedef pa_cvolume ma_pa_cvolume; typedef pa_sample_spec ma_pa_sample_spec; typedef pa_sink_info ma_pa_sink_info; typedef pa_source_info ma_pa_source_info; typedef pa_context_notify_cb_t ma_pa_context_notify_cb_t; typedef pa_sink_info_cb_t ma_pa_sink_info_cb_t; typedef pa_source_info_cb_t ma_pa_source_info_cb_t; typedef pa_stream_success_cb_t ma_pa_stream_success_cb_t; typedef pa_stream_request_cb_t ma_pa_stream_request_cb_t; typedef pa_stream_notify_cb_t ma_pa_stream_notify_cb_t; typedef pa_free_cb_t ma_pa_free_cb_t; #else #define MA_PA_OK 0 #define MA_PA_ERR_ACCESS 1 #define MA_PA_ERR_INVALID 2 #define MA_PA_ERR_NOENTITY 5 #define MA_PA_ERR_NOTSUPPORTED 19 #define MA_PA_CHANNELS_MAX 32 #define MA_PA_RATE_MAX 384000 typedef int ma_pa_context_flags_t; #define MA_PA_CONTEXT_NOFLAGS 0x00000000 #define MA_PA_CONTEXT_NOAUTOSPAWN 0x00000001 #define MA_PA_CONTEXT_NOFAIL 0x00000002 typedef int ma_pa_stream_flags_t; #define MA_PA_STREAM_NOFLAGS 0x00000000 #define MA_PA_STREAM_START_CORKED 0x00000001 #define MA_PA_STREAM_INTERPOLATE_TIMING 0x00000002 #define MA_PA_STREAM_NOT_MONOTONIC 0x00000004 #define MA_PA_STREAM_AUTO_TIMING_UPDATE 0x00000008 #define MA_PA_STREAM_NO_REMAP_CHANNELS 0x00000010 #define MA_PA_STREAM_NO_REMIX_CHANNELS 0x00000020 #define MA_PA_STREAM_FIX_FORMAT 0x00000040 #define MA_PA_STREAM_FIX_RATE 0x00000080 #define MA_PA_STREAM_FIX_CHANNELS 0x00000100 #define MA_PA_STREAM_DONT_MOVE 0x00000200 #define MA_PA_STREAM_VARIABLE_RATE 0x00000400 #define MA_PA_STREAM_PEAK_DETECT 0x00000800 #define MA_PA_STREAM_START_MUTED 0x00001000 #define MA_PA_STREAM_ADJUST_LATENCY 0x00002000 #define MA_PA_STREAM_EARLY_REQUESTS 0x00004000 #define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND 0x00008000 #define MA_PA_STREAM_START_UNMUTED 0x00010000 #define MA_PA_STREAM_FAIL_ON_SUSPEND 0x00020000 #define MA_PA_STREAM_RELATIVE_VOLUME 0x00040000 #define MA_PA_STREAM_PASSTHROUGH 0x00080000 typedef int ma_pa_sink_flags_t; #define MA_PA_SINK_NOFLAGS 0x00000000 #define MA_PA_SINK_HW_VOLUME_CTRL 0x00000001 #define MA_PA_SINK_LATENCY 0x00000002 #define MA_PA_SINK_HARDWARE 0x00000004 #define MA_PA_SINK_NETWORK 0x00000008 #define MA_PA_SINK_HW_MUTE_CTRL 0x00000010 #define MA_PA_SINK_DECIBEL_VOLUME 0x00000020 #define MA_PA_SINK_FLAT_VOLUME 0x00000040 #define MA_PA_SINK_DYNAMIC_LATENCY 0x00000080 #define MA_PA_SINK_SET_FORMATS 0x00000100 typedef int ma_pa_source_flags_t; #define MA_PA_SOURCE_NOFLAGS 0x00000000 #define MA_PA_SOURCE_HW_VOLUME_CTRL 0x00000001 #define MA_PA_SOURCE_LATENCY 0x00000002 #define MA_PA_SOURCE_HARDWARE 0x00000004 #define MA_PA_SOURCE_NETWORK 0x00000008 #define MA_PA_SOURCE_HW_MUTE_CTRL 0x00000010 #define MA_PA_SOURCE_DECIBEL_VOLUME 0x00000020 #define MA_PA_SOURCE_DYNAMIC_LATENCY 0x00000040 #define MA_PA_SOURCE_FLAT_VOLUME 0x00000080 typedef int ma_pa_context_state_t; #define MA_PA_CONTEXT_UNCONNECTED 0 #define MA_PA_CONTEXT_CONNECTING 1 #define MA_PA_CONTEXT_AUTHORIZING 2 #define MA_PA_CONTEXT_SETTING_NAME 3 #define MA_PA_CONTEXT_READY 4 #define MA_PA_CONTEXT_FAILED 5 #define MA_PA_CONTEXT_TERMINATED 6 typedef int ma_pa_stream_state_t; #define MA_PA_STREAM_UNCONNECTED 0 #define MA_PA_STREAM_CREATING 1 #define MA_PA_STREAM_READY 2 #define MA_PA_STREAM_FAILED 3 #define MA_PA_STREAM_TERMINATED 4 typedef int ma_pa_operation_state_t; #define MA_PA_OPERATION_RUNNING 0 #define MA_PA_OPERATION_DONE 1 #define MA_PA_OPERATION_CANCELLED 2 typedef int ma_pa_sink_state_t; #define MA_PA_SINK_INVALID_STATE -1 #define MA_PA_SINK_RUNNING 0 #define MA_PA_SINK_IDLE 1 #define MA_PA_SINK_SUSPENDED 2 typedef int ma_pa_source_state_t; #define MA_PA_SOURCE_INVALID_STATE -1 #define MA_PA_SOURCE_RUNNING 0 #define MA_PA_SOURCE_IDLE 1 #define MA_PA_SOURCE_SUSPENDED 2 typedef int ma_pa_seek_mode_t; #define MA_PA_SEEK_RELATIVE 0 #define MA_PA_SEEK_ABSOLUTE 1 #define MA_PA_SEEK_RELATIVE_ON_READ 2 #define MA_PA_SEEK_RELATIVE_END 3 typedef int ma_pa_channel_position_t; #define MA_PA_CHANNEL_POSITION_INVALID -1 #define MA_PA_CHANNEL_POSITION_MONO 0 #define MA_PA_CHANNEL_POSITION_FRONT_LEFT 1 #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT 2 #define MA_PA_CHANNEL_POSITION_FRONT_CENTER 3 #define MA_PA_CHANNEL_POSITION_REAR_CENTER 4 #define MA_PA_CHANNEL_POSITION_REAR_LEFT 5 #define MA_PA_CHANNEL_POSITION_REAR_RIGHT 6 #define MA_PA_CHANNEL_POSITION_LFE 7 #define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER 8 #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER 9 #define MA_PA_CHANNEL_POSITION_SIDE_LEFT 10 #define MA_PA_CHANNEL_POSITION_SIDE_RIGHT 11 #define MA_PA_CHANNEL_POSITION_AUX0 12 #define MA_PA_CHANNEL_POSITION_AUX1 13 #define MA_PA_CHANNEL_POSITION_AUX2 14 #define MA_PA_CHANNEL_POSITION_AUX3 15 #define MA_PA_CHANNEL_POSITION_AUX4 16 #define MA_PA_CHANNEL_POSITION_AUX5 17 #define MA_PA_CHANNEL_POSITION_AUX6 18 #define MA_PA_CHANNEL_POSITION_AUX7 19 #define MA_PA_CHANNEL_POSITION_AUX8 20 #define MA_PA_CHANNEL_POSITION_AUX9 21 #define MA_PA_CHANNEL_POSITION_AUX10 22 #define MA_PA_CHANNEL_POSITION_AUX11 23 #define MA_PA_CHANNEL_POSITION_AUX12 24 #define MA_PA_CHANNEL_POSITION_AUX13 25 #define MA_PA_CHANNEL_POSITION_AUX14 26 #define MA_PA_CHANNEL_POSITION_AUX15 27 #define MA_PA_CHANNEL_POSITION_AUX16 28 #define MA_PA_CHANNEL_POSITION_AUX17 29 #define MA_PA_CHANNEL_POSITION_AUX18 30 #define MA_PA_CHANNEL_POSITION_AUX19 31 #define MA_PA_CHANNEL_POSITION_AUX20 32 #define MA_PA_CHANNEL_POSITION_AUX21 33 #define MA_PA_CHANNEL_POSITION_AUX22 34 #define MA_PA_CHANNEL_POSITION_AUX23 35 #define MA_PA_CHANNEL_POSITION_AUX24 36 #define MA_PA_CHANNEL_POSITION_AUX25 37 #define MA_PA_CHANNEL_POSITION_AUX26 38 #define MA_PA_CHANNEL_POSITION_AUX27 39 #define MA_PA_CHANNEL_POSITION_AUX28 40 #define MA_PA_CHANNEL_POSITION_AUX29 41 #define MA_PA_CHANNEL_POSITION_AUX30 42 #define MA_PA_CHANNEL_POSITION_AUX31 43 #define MA_PA_CHANNEL_POSITION_TOP_CENTER 44 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT 45 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT 46 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER 47 #define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT 48 #define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT 49 #define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER 50 #define MA_PA_CHANNEL_POSITION_LEFT MA_PA_CHANNEL_POSITION_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_RIGHT MA_PA_CHANNEL_POSITION_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_CENTER MA_PA_CHANNEL_POSITION_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_SUBWOOFER MA_PA_CHANNEL_POSITION_LFE typedef int ma_pa_channel_map_def_t; #define MA_PA_CHANNEL_MAP_AIFF 0 #define MA_PA_CHANNEL_MAP_ALSA 1 #define MA_PA_CHANNEL_MAP_AUX 2 #define MA_PA_CHANNEL_MAP_WAVEEX 3 #define MA_PA_CHANNEL_MAP_OSS 4 #define MA_PA_CHANNEL_MAP_DEFAULT MA_PA_CHANNEL_MAP_AIFF typedef int ma_pa_sample_format_t; #define MA_PA_SAMPLE_INVALID -1 #define MA_PA_SAMPLE_U8 0 #define MA_PA_SAMPLE_ALAW 1 #define MA_PA_SAMPLE_ULAW 2 #define MA_PA_SAMPLE_S16LE 3 #define MA_PA_SAMPLE_S16BE 4 #define MA_PA_SAMPLE_FLOAT32LE 5 #define MA_PA_SAMPLE_FLOAT32BE 6 #define MA_PA_SAMPLE_S32LE 7 #define MA_PA_SAMPLE_S32BE 8 #define MA_PA_SAMPLE_S24LE 9 #define MA_PA_SAMPLE_S24BE 10 #define MA_PA_SAMPLE_S24_32LE 11 #define MA_PA_SAMPLE_S24_32BE 12 typedef struct ma_pa_mainloop ma_pa_mainloop; typedef struct ma_pa_threaded_mainloop ma_pa_threaded_mainloop; typedef struct ma_pa_mainloop_api ma_pa_mainloop_api; typedef struct ma_pa_context ma_pa_context; typedef struct ma_pa_operation ma_pa_operation; typedef struct ma_pa_stream ma_pa_stream; typedef struct ma_pa_spawn_api ma_pa_spawn_api; typedef struct { ma_uint32 maxlength; ma_uint32 tlength; ma_uint32 prebuf; ma_uint32 minreq; ma_uint32 fragsize; } ma_pa_buffer_attr; typedef struct { ma_uint8 channels; ma_pa_channel_position_t map[MA_PA_CHANNELS_MAX]; } ma_pa_channel_map; typedef struct { ma_uint8 channels; ma_uint32 values[MA_PA_CHANNELS_MAX]; } ma_pa_cvolume; typedef struct { ma_pa_sample_format_t format; ma_uint32 rate; ma_uint8 channels; } ma_pa_sample_spec; typedef struct { const char* name; ma_uint32 index; const char* description; ma_pa_sample_spec sample_spec; ma_pa_channel_map channel_map; ma_uint32 owner_module; ma_pa_cvolume volume; int mute; ma_uint32 monitor_source; const char* monitor_source_name; ma_uint64 latency; const char* driver; ma_pa_sink_flags_t flags; void* proplist; ma_uint64 configured_latency; ma_uint32 base_volume; ma_pa_sink_state_t state; ma_uint32 n_volume_steps; ma_uint32 card; ma_uint32 n_ports; void** ports; void* active_port; ma_uint8 n_formats; void** formats; } ma_pa_sink_info; typedef struct { const char *name; ma_uint32 index; const char *description; ma_pa_sample_spec sample_spec; ma_pa_channel_map channel_map; ma_uint32 owner_module; ma_pa_cvolume volume; int mute; ma_uint32 monitor_of_sink; const char *monitor_of_sink_name; ma_uint64 latency; const char *driver; ma_pa_source_flags_t flags; void* proplist; ma_uint64 configured_latency; ma_uint32 base_volume; ma_pa_source_state_t state; ma_uint32 n_volume_steps; ma_uint32 card; ma_uint32 n_ports; void** ports; void* active_port; ma_uint8 n_formats; void** formats; } ma_pa_source_info; typedef void (* ma_pa_context_notify_cb_t)(ma_pa_context* c, void* userdata); typedef void (* ma_pa_sink_info_cb_t) (ma_pa_context* c, const ma_pa_sink_info* i, int eol, void* userdata); typedef void (* ma_pa_source_info_cb_t) (ma_pa_context* c, const ma_pa_source_info* i, int eol, void* userdata); typedef void (* ma_pa_stream_success_cb_t)(ma_pa_stream* s, int success, void* userdata); typedef void (* ma_pa_stream_request_cb_t)(ma_pa_stream* s, size_t nbytes, void* userdata); typedef void (* ma_pa_stream_notify_cb_t) (ma_pa_stream* s, void* userdata); typedef void (* ma_pa_free_cb_t) (void* p); #endif typedef ma_pa_mainloop* (* ma_pa_mainloop_new_proc) (void); typedef void (* ma_pa_mainloop_free_proc) (ma_pa_mainloop* m); typedef void (* ma_pa_mainloop_quit_proc) (ma_pa_mainloop* m, int retval); typedef ma_pa_mainloop_api* (* ma_pa_mainloop_get_api_proc) (ma_pa_mainloop* m); typedef int (* ma_pa_mainloop_iterate_proc) (ma_pa_mainloop* m, int block, int* retval); typedef void (* ma_pa_mainloop_wakeup_proc) (ma_pa_mainloop* m); typedef ma_pa_threaded_mainloop* (* ma_pa_threaded_mainloop_new_proc) (void); typedef void (* ma_pa_threaded_mainloop_free_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_start_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_stop_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_lock_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_unlock_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_wait_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_signal_proc) (ma_pa_threaded_mainloop* m, int wait_for_accept); typedef void (* ma_pa_threaded_mainloop_accept_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_get_retval_proc) (ma_pa_threaded_mainloop* m); typedef ma_pa_mainloop_api* (* ma_pa_threaded_mainloop_get_api_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_in_thread_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_set_name_proc) (ma_pa_threaded_mainloop* m, const char* name); typedef ma_pa_context* (* ma_pa_context_new_proc) (ma_pa_mainloop_api* mainloop, const char* name); typedef void (* ma_pa_context_unref_proc) (ma_pa_context* c); typedef int (* ma_pa_context_connect_proc) (ma_pa_context* c, const char* server, ma_pa_context_flags_t flags, const ma_pa_spawn_api* api); typedef void (* ma_pa_context_disconnect_proc) (ma_pa_context* c); typedef void (* ma_pa_context_set_state_callback_proc) (ma_pa_context* c, ma_pa_context_notify_cb_t cb, void* userdata); typedef ma_pa_context_state_t (* ma_pa_context_get_state_proc) (ma_pa_context* c); typedef ma_pa_operation* (* ma_pa_context_get_sink_info_list_proc) (ma_pa_context* c, ma_pa_sink_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_source_info_list_proc) (ma_pa_context* c, ma_pa_source_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_sink_info_by_name_proc) (ma_pa_context* c, const char* name, ma_pa_sink_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_source_info_by_name_proc)(ma_pa_context* c, const char* name, ma_pa_source_info_cb_t cb, void* userdata); typedef void (* ma_pa_operation_unref_proc) (ma_pa_operation* o); typedef ma_pa_operation_state_t (* ma_pa_operation_get_state_proc) (ma_pa_operation* o); typedef ma_pa_channel_map* (* ma_pa_channel_map_init_extend_proc) (ma_pa_channel_map* m, unsigned channels, ma_pa_channel_map_def_t def); typedef int (* ma_pa_channel_map_valid_proc) (const ma_pa_channel_map* m); typedef int (* ma_pa_channel_map_compatible_proc) (const ma_pa_channel_map* m, const ma_pa_sample_spec* ss); typedef ma_pa_stream* (* ma_pa_stream_new_proc) (ma_pa_context* c, const char* name, const ma_pa_sample_spec* ss, const ma_pa_channel_map* map); typedef void (* ma_pa_stream_unref_proc) (ma_pa_stream* s); typedef int (* ma_pa_stream_connect_playback_proc) (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags, const ma_pa_cvolume* volume, ma_pa_stream* sync_stream); typedef int (* ma_pa_stream_connect_record_proc) (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags); typedef int (* ma_pa_stream_disconnect_proc) (ma_pa_stream* s); typedef ma_pa_stream_state_t (* ma_pa_stream_get_state_proc) (ma_pa_stream* s); typedef const ma_pa_sample_spec* (* ma_pa_stream_get_sample_spec_proc) (ma_pa_stream* s); typedef const ma_pa_channel_map* (* ma_pa_stream_get_channel_map_proc) (ma_pa_stream* s); typedef const ma_pa_buffer_attr* (* ma_pa_stream_get_buffer_attr_proc) (ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_set_buffer_attr_proc) (ma_pa_stream* s, const ma_pa_buffer_attr* attr, ma_pa_stream_success_cb_t cb, void* userdata); typedef const char* (* ma_pa_stream_get_device_name_proc) (ma_pa_stream* s); typedef void (* ma_pa_stream_set_write_callback_proc) (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_read_callback_proc) (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_suspended_callback_proc) (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_moved_callback_proc) (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata); typedef int (* ma_pa_stream_is_suspended_proc) (const ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_flush_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_stream_drain_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef int (* ma_pa_stream_is_corked_proc) (ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_cork_proc) (ma_pa_stream* s, int b, ma_pa_stream_success_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_stream_trigger_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef int (* ma_pa_stream_begin_write_proc) (ma_pa_stream* s, void** data, size_t* nbytes); typedef int (* ma_pa_stream_write_proc) (ma_pa_stream* s, const void* data, size_t nbytes, ma_pa_free_cb_t free_cb, int64_t offset, ma_pa_seek_mode_t seek); typedef int (* ma_pa_stream_peek_proc) (ma_pa_stream* s, const void** data, size_t* nbytes); typedef int (* ma_pa_stream_drop_proc) (ma_pa_stream* s); typedef size_t (* ma_pa_stream_writable_size_proc) (ma_pa_stream* s); typedef size_t (* ma_pa_stream_readable_size_proc) (ma_pa_stream* s); typedef struct { ma_uint32 count; ma_uint32 capacity; ma_device_info* pInfo; } ma_pulse_device_enum_data; static ma_result ma_result_from_pulse(int result) { if (result < 0) { return MA_ERROR; } switch (result) { case MA_PA_OK: return MA_SUCCESS; case MA_PA_ERR_ACCESS: return MA_ACCESS_DENIED; case MA_PA_ERR_INVALID: return MA_INVALID_ARGS; case MA_PA_ERR_NOENTITY: return MA_NO_DEVICE; default: return MA_ERROR; } } #if 0 static ma_pa_sample_format_t ma_format_to_pulse(ma_format format) { if (ma_is_little_endian()) { switch (format) { case ma_format_s16: return MA_PA_SAMPLE_S16LE; case ma_format_s24: return MA_PA_SAMPLE_S24LE; case ma_format_s32: return MA_PA_SAMPLE_S32LE; case ma_format_f32: return MA_PA_SAMPLE_FLOAT32LE; default: break; } } else { switch (format) { case ma_format_s16: return MA_PA_SAMPLE_S16BE; case ma_format_s24: return MA_PA_SAMPLE_S24BE; case ma_format_s32: return MA_PA_SAMPLE_S32BE; case ma_format_f32: return MA_PA_SAMPLE_FLOAT32BE; default: break; } } /* Endian agnostic. */ switch (format) { case ma_format_u8: return MA_PA_SAMPLE_U8; default: return MA_PA_SAMPLE_INVALID; } } #endif static ma_format ma_format_from_pulse(ma_pa_sample_format_t format) { if (ma_is_little_endian()) { switch (format) { case MA_PA_SAMPLE_S16LE: return ma_format_s16; case MA_PA_SAMPLE_S24LE: return ma_format_s24; case MA_PA_SAMPLE_S32LE: return ma_format_s32; case MA_PA_SAMPLE_FLOAT32LE: return ma_format_f32; default: break; } } else { switch (format) { case MA_PA_SAMPLE_S16BE: return ma_format_s16; case MA_PA_SAMPLE_S24BE: return ma_format_s24; case MA_PA_SAMPLE_S32BE: return ma_format_s32; case MA_PA_SAMPLE_FLOAT32BE: return ma_format_f32; default: break; } } /* Endian agnostic. */ switch (format) { case MA_PA_SAMPLE_U8: return ma_format_u8; default: return ma_format_unknown; } } static ma_channel ma_channel_position_from_pulse(ma_pa_channel_position_t position) { switch (position) { case MA_PA_CHANNEL_POSITION_INVALID: return MA_CHANNEL_NONE; case MA_PA_CHANNEL_POSITION_MONO: return MA_CHANNEL_MONO; case MA_PA_CHANNEL_POSITION_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case MA_PA_CHANNEL_POSITION_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case MA_PA_CHANNEL_POSITION_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case MA_PA_CHANNEL_POSITION_REAR_CENTER: return MA_CHANNEL_BACK_CENTER; case MA_PA_CHANNEL_POSITION_REAR_LEFT: return MA_CHANNEL_BACK_LEFT; case MA_PA_CHANNEL_POSITION_REAR_RIGHT: return MA_CHANNEL_BACK_RIGHT; case MA_PA_CHANNEL_POSITION_LFE: return MA_CHANNEL_LFE; case MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case MA_PA_CHANNEL_POSITION_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case MA_PA_CHANNEL_POSITION_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case MA_PA_CHANNEL_POSITION_AUX0: return MA_CHANNEL_AUX_0; case MA_PA_CHANNEL_POSITION_AUX1: return MA_CHANNEL_AUX_1; case MA_PA_CHANNEL_POSITION_AUX2: return MA_CHANNEL_AUX_2; case MA_PA_CHANNEL_POSITION_AUX3: return MA_CHANNEL_AUX_3; case MA_PA_CHANNEL_POSITION_AUX4: return MA_CHANNEL_AUX_4; case MA_PA_CHANNEL_POSITION_AUX5: return MA_CHANNEL_AUX_5; case MA_PA_CHANNEL_POSITION_AUX6: return MA_CHANNEL_AUX_6; case MA_PA_CHANNEL_POSITION_AUX7: return MA_CHANNEL_AUX_7; case MA_PA_CHANNEL_POSITION_AUX8: return MA_CHANNEL_AUX_8; case MA_PA_CHANNEL_POSITION_AUX9: return MA_CHANNEL_AUX_9; case MA_PA_CHANNEL_POSITION_AUX10: return MA_CHANNEL_AUX_10; case MA_PA_CHANNEL_POSITION_AUX11: return MA_CHANNEL_AUX_11; case MA_PA_CHANNEL_POSITION_AUX12: return MA_CHANNEL_AUX_12; case MA_PA_CHANNEL_POSITION_AUX13: return MA_CHANNEL_AUX_13; case MA_PA_CHANNEL_POSITION_AUX14: return MA_CHANNEL_AUX_14; case MA_PA_CHANNEL_POSITION_AUX15: return MA_CHANNEL_AUX_15; case MA_PA_CHANNEL_POSITION_AUX16: return MA_CHANNEL_AUX_16; case MA_PA_CHANNEL_POSITION_AUX17: return MA_CHANNEL_AUX_17; case MA_PA_CHANNEL_POSITION_AUX18: return MA_CHANNEL_AUX_18; case MA_PA_CHANNEL_POSITION_AUX19: return MA_CHANNEL_AUX_19; case MA_PA_CHANNEL_POSITION_AUX20: return MA_CHANNEL_AUX_20; case MA_PA_CHANNEL_POSITION_AUX21: return MA_CHANNEL_AUX_21; case MA_PA_CHANNEL_POSITION_AUX22: return MA_CHANNEL_AUX_22; case MA_PA_CHANNEL_POSITION_AUX23: return MA_CHANNEL_AUX_23; case MA_PA_CHANNEL_POSITION_AUX24: return MA_CHANNEL_AUX_24; case MA_PA_CHANNEL_POSITION_AUX25: return MA_CHANNEL_AUX_25; case MA_PA_CHANNEL_POSITION_AUX26: return MA_CHANNEL_AUX_26; case MA_PA_CHANNEL_POSITION_AUX27: return MA_CHANNEL_AUX_27; case MA_PA_CHANNEL_POSITION_AUX28: return MA_CHANNEL_AUX_28; case MA_PA_CHANNEL_POSITION_AUX29: return MA_CHANNEL_AUX_29; case MA_PA_CHANNEL_POSITION_AUX30: return MA_CHANNEL_AUX_30; case MA_PA_CHANNEL_POSITION_AUX31: return MA_CHANNEL_AUX_31; case MA_PA_CHANNEL_POSITION_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; case MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; default: return MA_CHANNEL_NONE; } } #if 0 static ma_pa_channel_position_t ma_channel_position_to_pulse(ma_channel position) { switch (position) { case MA_CHANNEL_NONE: return MA_PA_CHANNEL_POSITION_INVALID; case MA_CHANNEL_FRONT_LEFT: return MA_PA_CHANNEL_POSITION_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return MA_PA_CHANNEL_POSITION_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_CENTER; case MA_CHANNEL_LFE: return MA_PA_CHANNEL_POSITION_LFE; case MA_CHANNEL_BACK_LEFT: return MA_PA_CHANNEL_POSITION_REAR_LEFT; case MA_CHANNEL_BACK_RIGHT: return MA_PA_CHANNEL_POSITION_REAR_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return MA_PA_CHANNEL_POSITION_REAR_CENTER; case MA_CHANNEL_SIDE_LEFT: return MA_PA_CHANNEL_POSITION_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return MA_PA_CHANNEL_POSITION_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return MA_PA_CHANNEL_POSITION_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT; case MA_CHANNEL_19: return MA_PA_CHANNEL_POSITION_AUX18; case MA_CHANNEL_20: return MA_PA_CHANNEL_POSITION_AUX19; case MA_CHANNEL_21: return MA_PA_CHANNEL_POSITION_AUX20; case MA_CHANNEL_22: return MA_PA_CHANNEL_POSITION_AUX21; case MA_CHANNEL_23: return MA_PA_CHANNEL_POSITION_AUX22; case MA_CHANNEL_24: return MA_PA_CHANNEL_POSITION_AUX23; case MA_CHANNEL_25: return MA_PA_CHANNEL_POSITION_AUX24; case MA_CHANNEL_26: return MA_PA_CHANNEL_POSITION_AUX25; case MA_CHANNEL_27: return MA_PA_CHANNEL_POSITION_AUX26; case MA_CHANNEL_28: return MA_PA_CHANNEL_POSITION_AUX27; case MA_CHANNEL_29: return MA_PA_CHANNEL_POSITION_AUX28; case MA_CHANNEL_30: return MA_PA_CHANNEL_POSITION_AUX29; case MA_CHANNEL_31: return MA_PA_CHANNEL_POSITION_AUX30; case MA_CHANNEL_32: return MA_PA_CHANNEL_POSITION_AUX31; default: return (ma_pa_channel_position_t)position; } } #endif static ma_result ma_wait_for_operation__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP) { int resultPA; ma_pa_operation_state_t state; MA_ASSERT(pContext != NULL); MA_ASSERT(pOP != NULL); for (;;) { state = ((ma_pa_operation_get_state_proc)pContext->pulse.pa_operation_get_state)(pOP); if (state != MA_PA_OPERATION_RUNNING) { break; /* Done. */ } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } return MA_SUCCESS; } static ma_result ma_wait_for_operation_and_unref__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP) { ma_result result; if (pOP == NULL) { return MA_INVALID_ARGS; } result = ma_wait_for_operation__pulse(pContext, pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); return result; } static ma_result ma_wait_for_pa_context_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pPulseContext) { int resultPA; ma_pa_context_state_t state; for (;;) { state = ((ma_pa_context_get_state_proc)pContext->pulse.pa_context_get_state)((ma_pa_context*)pPulseContext); if (state == MA_PA_CONTEXT_READY) { break; /* Done. */ } if (state == MA_PA_CONTEXT_FAILED || state == MA_PA_CONTEXT_TERMINATED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while connecting the PulseAudio context."); return MA_ERROR; } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } /* Should never get here. */ return MA_SUCCESS; } static ma_result ma_wait_for_pa_stream_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pStream) { int resultPA; ma_pa_stream_state_t state; for (;;) { state = ((ma_pa_stream_get_state_proc)pContext->pulse.pa_stream_get_state)((ma_pa_stream*)pStream); if (state == MA_PA_STREAM_READY) { break; /* Done. */ } if (state == MA_PA_STREAM_FAILED || state == MA_PA_STREAM_TERMINATED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while connecting the PulseAudio stream."); return MA_ERROR; } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } return MA_SUCCESS; } static ma_result ma_init_pa_mainloop_and_pa_context__pulse(ma_context* pContext, const char* pApplicationName, const char* pServerName, ma_bool32 tryAutoSpawn, ma_ptr* ppMainLoop, ma_ptr* ppPulseContext) { ma_result result; ma_ptr pMainLoop; ma_ptr pPulseContext; MA_ASSERT(ppMainLoop != NULL); MA_ASSERT(ppPulseContext != NULL); /* The PulseAudio context maps well to miniaudio's notion of a context. The pa_context object will be initialized as part of the ma_context. */ pMainLoop = ((ma_pa_mainloop_new_proc)pContext->pulse.pa_mainloop_new)(); if (pMainLoop == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create mainloop."); return MA_FAILED_TO_INIT_BACKEND; } pPulseContext = ((ma_pa_context_new_proc)pContext->pulse.pa_context_new)(((ma_pa_mainloop_get_api_proc)pContext->pulse.pa_mainloop_get_api)((ma_pa_mainloop*)pMainLoop), pApplicationName); if (pPulseContext == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio context."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return MA_FAILED_TO_INIT_BACKEND; } /* Now we need to connect to the context. Everything is asynchronous so we need to wait for it to connect before returning. */ result = ma_result_from_pulse(((ma_pa_context_connect_proc)pContext->pulse.pa_context_connect)((ma_pa_context*)pPulseContext, pServerName, (tryAutoSpawn) ? 0 : MA_PA_CONTEXT_NOAUTOSPAWN, NULL)); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio context."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return result; } /* Since ma_context_init() runs synchronously we need to wait for the PulseAudio context to connect before we return. */ result = ma_wait_for_pa_context_to_connect__pulse(pContext, pMainLoop, pPulseContext); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Waiting for connection failed."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return result; } *ppMainLoop = pMainLoop; *ppPulseContext = pPulseContext; return MA_SUCCESS; } static void ma_device_sink_info_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_pa_sink_info* pInfoOut; if (endOfList > 0) { return; } /* There has been a report that indicates that pInfo can be null which results in a null pointer dereference below. We'll check for this for safety. */ if (pInfo == NULL) { return; } pInfoOut = (ma_pa_sink_info*)pUserData; MA_ASSERT(pInfoOut != NULL); *pInfoOut = *pInfo; (void)pPulseContext; /* Unused. */ } static void ma_device_source_info_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_pa_source_info* pInfoOut; if (endOfList > 0) { return; } /* There has been a report that indicates that pInfo can be null which results in a null pointer dereference below. We'll check for this for safety. */ if (pInfo == NULL) { return; } pInfoOut = (ma_pa_source_info*)pUserData; MA_ASSERT(pInfoOut != NULL); *pInfoOut = *pInfo; (void)pPulseContext; /* Unused. */ } #if 0 static void ma_device_sink_name_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_device* pDevice; if (endOfList > 0) { return; } pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), pInfo->description, (size_t)-1); (void)pPulseContext; /* Unused. */ } static void ma_device_source_name_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_device* pDevice; if (endOfList > 0) { return; } pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), pInfo->description, (size_t)-1); (void)pPulseContext; /* Unused. */ } #endif static ma_result ma_context_get_sink_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_sink_info* pSinkInfo) { ma_pa_operation* pOP; pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_sink_info_callback, pSinkInfo); if (pOP == NULL) { return MA_ERROR; } return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } static ma_result ma_context_get_source_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_source_info* pSourceInfo) { ma_pa_operation* pOP; pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_source_info_callback, pSourceInfo); if (pOP == NULL) { return MA_ERROR; } return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } static ma_result ma_context_get_default_device_index__pulse(ma_context* pContext, ma_device_type deviceType, ma_uint32* pIndex) { ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pIndex != NULL); if (pIndex != NULL) { *pIndex = (ma_uint32)-1; } if (deviceType == ma_device_type_playback) { ma_pa_sink_info sinkInfo; result = ma_context_get_sink_info__pulse(pContext, NULL, &sinkInfo); if (result != MA_SUCCESS) { return result; } if (pIndex != NULL) { *pIndex = sinkInfo.index; } } if (deviceType == ma_device_type_capture) { ma_pa_source_info sourceInfo; result = ma_context_get_source_info__pulse(pContext, NULL, &sourceInfo); if (result != MA_SUCCESS) { return result; } if (pIndex != NULL) { *pIndex = sourceInfo.index; } } return MA_SUCCESS; } typedef struct { ma_context* pContext; ma_enum_devices_callback_proc callback; void* pUserData; ma_bool32 isTerminated; ma_uint32 defaultDeviceIndexPlayback; ma_uint32 defaultDeviceIndexCapture; } ma_context_enumerate_devices_callback_data__pulse; static void ma_context_enumerate_devices_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pSinkInfo, int endOfList, void* pUserData) { ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData; ma_device_info deviceInfo; MA_ASSERT(pData != NULL); if (endOfList || pData->isTerminated) { return; } MA_ZERO_OBJECT(&deviceInfo); /* The name from PulseAudio is the ID for miniaudio. */ if (pSinkInfo->name != NULL) { ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSinkInfo->name, (size_t)-1); } /* The description from PulseAudio is the name for miniaudio. */ if (pSinkInfo->description != NULL) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSinkInfo->description, (size_t)-1); } if (pSinkInfo->index == pData->defaultDeviceIndexPlayback) { deviceInfo.isDefault = MA_TRUE; } pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_playback, &deviceInfo, pData->pUserData); (void)pPulseContext; /* Unused. */ } static void ma_context_enumerate_devices_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pSourceInfo, int endOfList, void* pUserData) { ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData; ma_device_info deviceInfo; MA_ASSERT(pData != NULL); if (endOfList || pData->isTerminated) { return; } MA_ZERO_OBJECT(&deviceInfo); /* The name from PulseAudio is the ID for miniaudio. */ if (pSourceInfo->name != NULL) { ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSourceInfo->name, (size_t)-1); } /* The description from PulseAudio is the name for miniaudio. */ if (pSourceInfo->description != NULL) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSourceInfo->description, (size_t)-1); } if (pSourceInfo->index == pData->defaultDeviceIndexCapture) { deviceInfo.isDefault = MA_TRUE; } pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_capture, &deviceInfo, pData->pUserData); (void)pPulseContext; /* Unused. */ } static ma_result ma_context_enumerate_devices__pulse(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result = MA_SUCCESS; ma_context_enumerate_devices_callback_data__pulse callbackData; ma_pa_operation* pOP = NULL; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); callbackData.pContext = pContext; callbackData.callback = callback; callbackData.pUserData = pUserData; callbackData.isTerminated = MA_FALSE; callbackData.defaultDeviceIndexPlayback = (ma_uint32)-1; callbackData.defaultDeviceIndexCapture = (ma_uint32)-1; /* We need to get the index of the default devices. */ ma_context_get_default_device_index__pulse(pContext, ma_device_type_playback, &callbackData.defaultDeviceIndexPlayback); ma_context_get_default_device_index__pulse(pContext, ma_device_type_capture, &callbackData.defaultDeviceIndexCapture); /* Playback. */ if (!callbackData.isTerminated) { pOP = ((ma_pa_context_get_sink_info_list_proc)pContext->pulse.pa_context_get_sink_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_sink_callback__pulse, &callbackData); if (pOP == NULL) { result = MA_ERROR; goto done; } result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); if (result != MA_SUCCESS) { goto done; } } /* Capture. */ if (!callbackData.isTerminated) { pOP = ((ma_pa_context_get_source_info_list_proc)pContext->pulse.pa_context_get_source_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_source_callback__pulse, &callbackData); if (pOP == NULL) { result = MA_ERROR; goto done; } result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); if (result != MA_SUCCESS) { goto done; } } done: return result; } typedef struct { ma_device_info* pDeviceInfo; ma_uint32 defaultDeviceIndex; ma_bool32 foundDevice; } ma_context_get_device_info_callback_data__pulse; static void ma_context_get_device_info_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData; if (endOfList > 0) { return; } MA_ASSERT(pData != NULL); pData->foundDevice = MA_TRUE; if (pInfo->name != NULL) { ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1); } if (pInfo->description != NULL) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1); } /* We're just reporting a single data format here. I think technically PulseAudio might support all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to report the "native" device format. */ pData->pDeviceInfo->nativeDataFormats[0].format = ma_format_from_pulse(pInfo->sample_spec.format); pData->pDeviceInfo->nativeDataFormats[0].channels = pInfo->sample_spec.channels; pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate; pData->pDeviceInfo->nativeDataFormats[0].flags = 0; pData->pDeviceInfo->nativeDataFormatCount = 1; if (pData->defaultDeviceIndex == pInfo->index) { pData->pDeviceInfo->isDefault = MA_TRUE; } (void)pPulseContext; /* Unused. */ } static void ma_context_get_device_info_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData; if (endOfList > 0) { return; } MA_ASSERT(pData != NULL); pData->foundDevice = MA_TRUE; if (pInfo->name != NULL) { ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1); } if (pInfo->description != NULL) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1); } /* We're just reporting a single data format here. I think technically PulseAudio might support all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to report the "native" device format. */ pData->pDeviceInfo->nativeDataFormats[0].format = ma_format_from_pulse(pInfo->sample_spec.format); pData->pDeviceInfo->nativeDataFormats[0].channels = pInfo->sample_spec.channels; pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate; pData->pDeviceInfo->nativeDataFormats[0].flags = 0; pData->pDeviceInfo->nativeDataFormatCount = 1; if (pData->defaultDeviceIndex == pInfo->index) { pData->pDeviceInfo->isDefault = MA_TRUE; } (void)pPulseContext; /* Unused. */ } static ma_result ma_context_get_device_info__pulse(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result = MA_SUCCESS; ma_context_get_device_info_callback_data__pulse callbackData; ma_pa_operation* pOP = NULL; const char* pDeviceName = NULL; MA_ASSERT(pContext != NULL); callbackData.pDeviceInfo = pDeviceInfo; callbackData.foundDevice = MA_FALSE; if (pDeviceID != NULL) { pDeviceName = pDeviceID->pulse; } else { pDeviceName = NULL; } result = ma_context_get_default_device_index__pulse(pContext, deviceType, &callbackData.defaultDeviceIndex); if (deviceType == ma_device_type_playback) { pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_sink_callback__pulse, &callbackData); } else { pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_source_callback__pulse, &callbackData); } if (pOP != NULL) { ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } else { result = MA_ERROR; goto done; } if (!callbackData.foundDevice) { result = MA_NO_DEVICE; goto done; } done: return result; } static ma_result ma_device_uninit__pulse(ma_device* pDevice) { ma_context* pContext; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture); ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } if (pDevice->type == ma_device_type_duplex) { ma_duplex_rb_uninit(&pDevice->duplexRB); } ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pDevice->pulse.pPulseContext); ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pDevice->pulse.pPulseContext); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pDevice->pulse.pMainLoop); return MA_SUCCESS; } static ma_pa_buffer_attr ma_device__pa_buffer_attr_new(ma_uint32 periodSizeInFrames, ma_uint32 periods, const ma_pa_sample_spec* ss) { ma_pa_buffer_attr attr; attr.maxlength = periodSizeInFrames * periods * ma_get_bytes_per_frame(ma_format_from_pulse(ss->format), ss->channels); attr.tlength = attr.maxlength / periods; attr.prebuf = (ma_uint32)-1; attr.minreq = (ma_uint32)-1; attr.fragsize = attr.maxlength / periods; return attr; } static ma_pa_stream* ma_device__pa_stream_new__pulse(ma_device* pDevice, const char* pStreamName, const ma_pa_sample_spec* ss, const ma_pa_channel_map* cmap) { static ma_atomic_uint32 g_StreamCounter = { 0 }; char actualStreamName[256]; if (pStreamName != NULL) { ma_strncpy_s(actualStreamName, sizeof(actualStreamName), pStreamName, (size_t)-1); } else { const char* pBaseName = "miniaudio:"; size_t baseNameLen = strlen(pBaseName); ma_strcpy_s(actualStreamName, sizeof(actualStreamName), pBaseName); ma_itoa_s((int)ma_atomic_uint32_get(&g_StreamCounter), actualStreamName + baseNameLen, sizeof(actualStreamName)-baseNameLen, 10); } ma_atomic_uint32_fetch_add(&g_StreamCounter, 1); return ((ma_pa_stream_new_proc)pDevice->pContext->pulse.pa_stream_new)((ma_pa_context*)pDevice->pulse.pPulseContext, actualStreamName, ss, cmap); } static void ma_device_on_read__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 bpf; ma_uint32 deviceState; ma_uint64 frameCount; ma_uint64 framesProcessed; MA_ASSERT(pDevice != NULL); /* Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio can fire this callback before the stream has even started. Ridiculous. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { return; } bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); MA_ASSERT(bpf > 0); frameCount = byteCount / bpf; framesProcessed = 0; while (ma_device_get_state(pDevice) == ma_device_state_started && framesProcessed < frameCount) { const void* pMappedPCMFrames; size_t bytesMapped; ma_uint64 framesMapped; int pulseResult = ((ma_pa_stream_peek_proc)pDevice->pContext->pulse.pa_stream_peek)(pStream, &pMappedPCMFrames, &bytesMapped); if (pulseResult < 0) { break; /* Failed to map. Abort. */ } framesMapped = bytesMapped / bpf; if (framesMapped > 0) { if (pMappedPCMFrames != NULL) { ma_device_handle_backend_data_callback(pDevice, NULL, pMappedPCMFrames, framesMapped); } else { /* It's a hole. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[PulseAudio] ma_device_on_read__pulse: Hole.\n"); } pulseResult = ((ma_pa_stream_drop_proc)pDevice->pContext->pulse.pa_stream_drop)(pStream); if (pulseResult < 0) { break; /* Failed to drop the buffer. */ } framesProcessed += framesMapped; } else { /* Nothing was mapped. Just abort. */ break; } } } static ma_result ma_device_write_to_stream__pulse(ma_device* pDevice, ma_pa_stream* pStream, ma_uint64* pFramesProcessed) { ma_result result = MA_SUCCESS; ma_uint64 framesProcessed = 0; size_t bytesMapped; ma_uint32 bpf; ma_uint32 deviceState; MA_ASSERT(pDevice != NULL); MA_ASSERT(pStream != NULL); bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); MA_ASSERT(bpf > 0); deviceState = ma_device_get_state(pDevice); bytesMapped = ((ma_pa_stream_writable_size_proc)pDevice->pContext->pulse.pa_stream_writable_size)(pStream); if (bytesMapped != (size_t)-1) { if (bytesMapped > 0) { ma_uint64 framesMapped; void* pMappedPCMFrames; int pulseResult = ((ma_pa_stream_begin_write_proc)pDevice->pContext->pulse.pa_stream_begin_write)(pStream, &pMappedPCMFrames, &bytesMapped); if (pulseResult < 0) { result = ma_result_from_pulse(pulseResult); goto done; } framesMapped = bytesMapped / bpf; if (deviceState == ma_device_state_started || deviceState == ma_device_state_starting) { /* Check for starting state just in case this is being used to do the initial fill. */ ma_device_handle_backend_data_callback(pDevice, pMappedPCMFrames, NULL, framesMapped); } else { /* Device is not started. Write silence. */ ma_silence_pcm_frames(pMappedPCMFrames, framesMapped, pDevice->playback.format, pDevice->playback.channels); } pulseResult = ((ma_pa_stream_write_proc)pDevice->pContext->pulse.pa_stream_write)(pStream, pMappedPCMFrames, bytesMapped, NULL, 0, MA_PA_SEEK_RELATIVE); if (pulseResult < 0) { result = ma_result_from_pulse(pulseResult); goto done; /* Failed to write data to stream. */ } framesProcessed += framesMapped; } else { result = MA_SUCCESS; /* No data available for writing. */ goto done; } } else { result = MA_ERROR; /* Failed to retrieve the writable size. Abort. */ goto done; } done: if (pFramesProcessed != NULL) { *pFramesProcessed = framesProcessed; } return result; } static void ma_device_on_write__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 bpf; ma_uint64 frameCount; ma_uint64 framesProcessed; ma_uint32 deviceState; ma_result result; MA_ASSERT(pDevice != NULL); /* Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio can fire this callback before the stream has even started. Ridiculous. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { return; } bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); MA_ASSERT(bpf > 0); frameCount = byteCount / bpf; framesProcessed = 0; while (framesProcessed < frameCount) { ma_uint64 framesProcessedThisIteration; /* Don't keep trying to process frames if the device isn't started. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { break; } result = ma_device_write_to_stream__pulse(pDevice, pStream, &framesProcessedThisIteration); if (result != MA_SUCCESS) { break; } framesProcessed += framesProcessedThisIteration; } } static void ma_device_on_suspended__pulse(ma_pa_stream* pStream, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; int suspended; (void)pStream; suspended = ((ma_pa_stream_is_suspended_proc)pDevice->pContext->pulse.pa_stream_is_suspended)(pStream); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. pa_stream_is_suspended() returned %d.\n", suspended); if (suspended < 0) { return; } if (suspended == 1) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. Suspended.\n"); ma_device__on_notification_stopped(pDevice); } else { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. Resumed.\n"); ma_device__on_notification_started(pDevice); } } static void ma_device_on_rerouted__pulse(ma_pa_stream* pStream, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; (void)pStream; (void)pUserData; ma_device__on_notification_rerouted(pDevice); } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__pulse(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* There have been reports from users where buffers of < ~20ms result glitches when running through PipeWire. To work around this we're going to have to use a different default buffer size. */ const ma_uint32 defaultPeriodSizeInMilliseconds_LowLatency = 25; const ma_uint32 defaultPeriodSizeInMilliseconds_Conservative = MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE; MA_ASSERT(nativeSampleRate != 0); if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_LowLatency, nativeSampleRate); } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_Conservative, nativeSampleRate); } } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { return pDescriptor->periodSizeInFrames; } } static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { /* Notes for PulseAudio: - When both the period size in frames and milliseconds are 0, we default to miniaudio's default buffer sizes rather than leaving it up to PulseAudio because I don't trust PulseAudio to give us any kind of reasonable latency by default. - Do not ever, *ever* forget to use MA_PA_STREAM_ADJUST_LATENCY. If you don't specify this flag, capture mode will just not work properly until you open another PulseAudio app. */ ma_result result = MA_SUCCESS; int error = 0; const char* devPlayback = NULL; const char* devCapture = NULL; ma_format format = ma_format_unknown; ma_uint32 channels = 0; ma_uint32 sampleRate = 0; ma_pa_sink_info sinkInfo; ma_pa_source_info sourceInfo; ma_pa_sample_spec ss; ma_pa_channel_map cmap; ma_pa_buffer_attr attr; const ma_pa_sample_spec* pActualSS = NULL; const ma_pa_buffer_attr* pActualAttr = NULL; const ma_pa_channel_map* pActualChannelMap = NULL; ma_uint32 iChannel; ma_pa_stream_flags_t streamFlags; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->pulse); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with the PulseAudio backend. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pConfig->capture.shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { if (pDescriptorPlayback->pDeviceID != NULL) { devPlayback = pDescriptorPlayback->pDeviceID->pulse; } format = pDescriptorPlayback->format; channels = pDescriptorPlayback->channels; sampleRate = pDescriptorPlayback->sampleRate; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { if (pDescriptorCapture->pDeviceID != NULL) { devCapture = pDescriptorCapture->pDeviceID->pulse; } format = pDescriptorCapture->format; channels = pDescriptorCapture->channels; sampleRate = pDescriptorCapture->sampleRate; } result = ma_init_pa_mainloop_and_pa_context__pulse(pDevice->pContext, pDevice->pContext->pulse.pApplicationName, pDevice->pContext->pulse.pServerName, MA_FALSE, &pDevice->pulse.pMainLoop, &pDevice->pulse.pPulseContext); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to initialize PA mainloop and context for device.\n"); return result; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { result = ma_context_get_source_info__pulse(pDevice->pContext, devCapture, &sourceInfo); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to retrieve source info for capture device."); goto on_error0; } ss = sourceInfo.sample_spec; cmap = sourceInfo.channel_map; /* Use the requested channel count if we have one. */ if (pDescriptorCapture->channels != 0) { ss.channels = pDescriptorCapture->channels; } /* Use a default channel map. */ ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.channelMap); /* Use the requested sample rate if one was specified. */ if (pDescriptorCapture->sampleRate != 0) { ss.rate = pDescriptorCapture->sampleRate; } streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY; if (ma_format_from_pulse(ss.format) == ma_format_unknown) { if (ma_is_little_endian()) { ss.format = MA_PA_SAMPLE_FLOAT32LE; } else { ss.format = MA_PA_SAMPLE_FLOAT32BE; } streamFlags |= MA_PA_STREAM_FIX_FORMAT; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\n"); } if (ss.rate == 0) { ss.rate = MA_DEFAULT_SAMPLE_RATE; streamFlags |= MA_PA_STREAM_FIX_RATE; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\n", ss.rate); } if (ss.channels == 0) { ss.channels = MA_DEFAULT_CHANNELS; streamFlags |= MA_PA_STREAM_FIX_CHANNELS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\n", ss.channels); } /* We now have enough information to calculate our actual period size in frames. */ pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorCapture, ss.rate, pConfig->performanceProfile); attr = ma_device__pa_buffer_attr_new(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->periodCount, &ss); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames); pDevice->pulse.pStreamCapture = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNameCapture, &ss, &cmap); if (pDevice->pulse.pStreamCapture == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio capture stream.\n"); result = MA_ERROR; goto on_error0; } /* The callback needs to be set before connecting the stream. */ ((ma_pa_stream_set_read_callback_proc)pDevice->pContext->pulse.pa_stream_set_read_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_read__pulse, pDevice); /* State callback for checking when the device has been corked. */ ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_suspended__pulse, pDevice); /* Rerouting notification. */ ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_rerouted__pulse, pDevice); /* Connect after we've got all of our internal state set up. */ if (devCapture != NULL) { streamFlags |= MA_PA_STREAM_DONT_MOVE; } error = ((ma_pa_stream_connect_record_proc)pDevice->pContext->pulse.pa_stream_connect_record)((ma_pa_stream*)pDevice->pulse.pStreamCapture, devCapture, &attr, streamFlags); if (error != MA_PA_OK) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio capture stream."); result = ma_result_from_pulse(error); goto on_error1; } result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamCapture); if (result != MA_SUCCESS) { goto on_error2; } /* Internal format. */ pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualSS != NULL) { ss = *pActualSS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture sample spec: format=%s, channels=%d, rate=%d\n", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Failed to retrieve capture sample spec.\n"); } pDescriptorCapture->format = ma_format_from_pulse(ss.format); pDescriptorCapture->channels = ss.channels; pDescriptorCapture->sampleRate = ss.rate; if (pDescriptorCapture->format == ma_format_unknown || pDescriptorCapture->channels == 0 || pDescriptorCapture->sampleRate == 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Capture sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\n", ma_get_format_name(pDescriptorCapture->format), pDescriptorCapture->channels, pDescriptorCapture->sampleRate); result = MA_ERROR; goto on_error4; } /* Internal channel map. */ pActualChannelMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualChannelMap == NULL) { pActualChannelMap = &cmap; /* Fallback just in case. */ } /* Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For all other channel counts we need to just put up with whatever PipeWire reports and hope it gets fixed sooner than later. I might remove this hack later. */ if (pDescriptorCapture->channels > 2) { for (iChannel = 0; iChannel < pDescriptorCapture->channels; iChannel += 1) { pDescriptorCapture->channelMap[iChannel] = ma_channel_position_from_pulse(pActualChannelMap->map[iChannel]); } } else { /* Hack for mono and stereo. */ if (pDescriptorCapture->channels == 1) { pDescriptorCapture->channelMap[0] = MA_CHANNEL_MONO; } else if (pDescriptorCapture->channels == 2) { pDescriptorCapture->channelMap[0] = MA_CHANNEL_FRONT_LEFT; pDescriptorCapture->channelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } } /* Buffer. */ pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualAttr != NULL) { attr = *pActualAttr; } if (attr.fragsize > 0) { pDescriptorCapture->periodCount = ma_max(attr.maxlength / attr.fragsize, 1); } else { pDescriptorCapture->periodCount = 1; } pDescriptorCapture->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / pDescriptorCapture->periodCount; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_context_get_sink_info__pulse(pDevice->pContext, devPlayback, &sinkInfo); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to retrieve sink info for playback device.\n"); goto on_error2; } ss = sinkInfo.sample_spec; cmap = sinkInfo.channel_map; /* Use the requested channel count if we have one. */ if (pDescriptorPlayback->channels != 0) { ss.channels = pDescriptorPlayback->channels; } /* Use a default channel map. */ ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.channelMap); /* Use the requested sample rate if one was specified. */ if (pDescriptorPlayback->sampleRate != 0) { ss.rate = pDescriptorPlayback->sampleRate; } streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY; if (ma_format_from_pulse(ss.format) == ma_format_unknown) { if (ma_is_little_endian()) { ss.format = MA_PA_SAMPLE_FLOAT32LE; } else { ss.format = MA_PA_SAMPLE_FLOAT32BE; } streamFlags |= MA_PA_STREAM_FIX_FORMAT; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\n"); } if (ss.rate == 0) { ss.rate = MA_DEFAULT_SAMPLE_RATE; streamFlags |= MA_PA_STREAM_FIX_RATE; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\n", ss.rate); } if (ss.channels == 0) { ss.channels = MA_DEFAULT_CHANNELS; streamFlags |= MA_PA_STREAM_FIX_CHANNELS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\n", ss.channels); } /* We now have enough information to calculate the actual buffer size in frames. */ pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorPlayback, ss.rate, pConfig->performanceProfile); attr = ma_device__pa_buffer_attr_new(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->periodCount, &ss); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames); pDevice->pulse.pStreamPlayback = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNamePlayback, &ss, &cmap); if (pDevice->pulse.pStreamPlayback == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio playback stream.\n"); result = MA_ERROR; goto on_error2; } /* Note that this callback will be fired as soon as the stream is connected, even though it's started as corked. The callback needs to handle a device state of ma_device_state_uninitialized. */ ((ma_pa_stream_set_write_callback_proc)pDevice->pContext->pulse.pa_stream_set_write_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_write__pulse, pDevice); /* State callback for checking when the device has been corked. */ ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_suspended__pulse, pDevice); /* Rerouting notification. */ ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_rerouted__pulse, pDevice); /* Connect after we've got all of our internal state set up. */ if (devPlayback != NULL) { streamFlags |= MA_PA_STREAM_DONT_MOVE; } error = ((ma_pa_stream_connect_playback_proc)pDevice->pContext->pulse.pa_stream_connect_playback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, devPlayback, &attr, streamFlags, NULL, NULL); if (error != MA_PA_OK) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio playback stream."); result = ma_result_from_pulse(error); goto on_error3; } result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (result != MA_SUCCESS) { goto on_error3; } /* Internal format. */ pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualSS != NULL) { ss = *pActualSS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback sample spec: format=%s, channels=%d, rate=%d\n", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Failed to retrieve playback sample spec.\n"); } pDescriptorPlayback->format = ma_format_from_pulse(ss.format); pDescriptorPlayback->channels = ss.channels; pDescriptorPlayback->sampleRate = ss.rate; if (pDescriptorPlayback->format == ma_format_unknown || pDescriptorPlayback->channels == 0 || pDescriptorPlayback->sampleRate == 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Playback sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\n", ma_get_format_name(pDescriptorPlayback->format), pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate); result = MA_ERROR; goto on_error4; } /* Internal channel map. */ pActualChannelMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualChannelMap == NULL) { pActualChannelMap = &cmap; /* Fallback just in case. */ } /* Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For all other channel counts we need to just put up with whatever PipeWire reports and hope it gets fixed sooner than later. I might remove this hack later. */ if (pDescriptorPlayback->channels > 2) { for (iChannel = 0; iChannel < pDescriptorPlayback->channels; iChannel += 1) { pDescriptorPlayback->channelMap[iChannel] = ma_channel_position_from_pulse(pActualChannelMap->map[iChannel]); } } else { /* Hack for mono and stereo. */ if (pDescriptorPlayback->channels == 1) { pDescriptorPlayback->channelMap[0] = MA_CHANNEL_MONO; } else if (pDescriptorPlayback->channels == 2) { pDescriptorPlayback->channelMap[0] = MA_CHANNEL_FRONT_LEFT; pDescriptorPlayback->channelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } } /* Buffer. */ pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualAttr != NULL) { attr = *pActualAttr; } if (attr.tlength > 0) { pDescriptorPlayback->periodCount = ma_max(attr.maxlength / attr.tlength, 1); } else { pDescriptorPlayback->periodCount = 1; } pDescriptorPlayback->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) / pDescriptorPlayback->periodCount; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; internalPeriodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames); } /* We need a ring buffer for handling duplex mode. We can use the main duplex ring buffer in the main part of the ma_device struct. We cannot, however, depend on ma_device_init() initializing this for us later on because that will only do it if it's a fully asynchronous backend - i.e. the onDeviceDataLoop callback is NULL, which is not the case for PulseAudio. */ if (pConfig->deviceType == ma_device_type_duplex) { ma_format rbFormat = (format != ma_format_unknown) ? format : pDescriptorCapture->format; ma_uint32 rbChannels = (channels > 0) ? channels : pDescriptorCapture->channels; ma_uint32 rbSampleRate = (sampleRate > 0) ? sampleRate : pDescriptorCapture->sampleRate; result = ma_duplex_rb_init(rbFormat, rbChannels, rbSampleRate, pDescriptorCapture->sampleRate, pDescriptorCapture->periodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to initialize ring buffer. %s.\n", ma_result_description(result)); goto on_error4; } } return MA_SUCCESS; on_error4: if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } on_error3: if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } on_error2: if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } on_error1: if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } on_error0: return result; } static void ma_pulse_operation_complete_callback(ma_pa_stream* pStream, int success, void* pUserData) { ma_bool32* pIsSuccessful = (ma_bool32*)pUserData; MA_ASSERT(pIsSuccessful != NULL); *pIsSuccessful = (ma_bool32)success; (void)pStream; /* Unused. */ } static ma_result ma_device__cork_stream__pulse(ma_device* pDevice, ma_device_type deviceType, int cork) { ma_context* pContext = pDevice->pContext; ma_bool32 wasSuccessful; ma_pa_stream* pStream; ma_pa_operation* pOP; ma_result result; /* This should not be called with a duplex device type. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } wasSuccessful = MA_FALSE; pStream = (ma_pa_stream*)((deviceType == ma_device_type_capture) ? pDevice->pulse.pStreamCapture : pDevice->pulse.pStreamPlayback); MA_ASSERT(pStream != NULL); pOP = ((ma_pa_stream_cork_proc)pContext->pulse.pa_stream_cork)(pStream, cork, ma_pulse_operation_complete_callback, &wasSuccessful); if (pOP == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to cork PulseAudio stream."); return MA_ERROR; } result = ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while waiting for the PulseAudio stream to cork."); return result; } if (!wasSuccessful) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to %s PulseAudio stream.", (cork) ? "stop" : "start"); return MA_ERROR; } return MA_SUCCESS; } static ma_result ma_device_start__pulse(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 0); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* We need to fill some data before uncorking. Not doing this will result in the write callback never getting fired. We're not going to abort if writing fails because I still want the device to get uncorked. */ ma_device_write_to_stream__pulse(pDevice, (ma_pa_stream*)(pDevice->pulse.pStreamPlayback), NULL); /* No need to check the result here. Always want to fall through an uncork.*/ result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 0); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_stop__pulse(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 1); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* Ideally we would drain the device here, but there's been cases where PulseAudio seems to be broken on some systems to the point where no audio processing seems to happen. When this happens, draining never completes and we get stuck here. For now I'm disabling draining of the device so we don't just freeze the application. */ #if 0 ma_pa_operation* pOP = ((ma_pa_stream_drain_proc)pDevice->pContext->pulse.pa_stream_drain)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_pulse_operation_complete_callback, &wasSuccessful); ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP); #endif result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 1); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_data_loop__pulse(ma_device* pDevice) { int resultPA; MA_ASSERT(pDevice != NULL); /* NOTE: Don't start the device here. It'll be done at a higher level. */ /* All data is handled through callbacks. All we need to do is iterate over the main loop and let the callbacks deal with it. */ while (ma_device_get_state(pDevice) == ma_device_state_started) { resultPA = ((ma_pa_mainloop_iterate_proc)pDevice->pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pDevice->pulse.pMainLoop, 1, NULL); if (resultPA < 0) { break; } } /* NOTE: Don't stop the device here. It'll be done at a higher level. */ return MA_SUCCESS; } static ma_result ma_device_data_loop_wakeup__pulse(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ((ma_pa_mainloop_wakeup_proc)pDevice->pContext->pulse.pa_mainloop_wakeup)((ma_pa_mainloop*)pDevice->pulse.pMainLoop); return MA_SUCCESS; } static ma_result ma_context_uninit__pulse(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_pulseaudio); ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pContext->pulse.pPulseContext); ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pContext->pulse.pPulseContext); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pContext->pulse.pMainLoop); ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks); ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO); #endif return MA_SUCCESS; } static ma_result ma_context_init__pulse(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #ifndef MA_NO_RUNTIME_LINKING const char* libpulseNames[] = { "libpulse.so", "libpulse.so.0" }; size_t i; for (i = 0; i < ma_countof(libpulseNames); ++i) { pContext->pulse.pulseSO = ma_dlopen(ma_context_get_log(pContext), libpulseNames[i]); if (pContext->pulse.pulseSO != NULL) { break; } } if (pContext->pulse.pulseSO == NULL) { return MA_NO_BACKEND; } pContext->pulse.pa_mainloop_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_new"); pContext->pulse.pa_mainloop_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_free"); pContext->pulse.pa_mainloop_quit = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_quit"); pContext->pulse.pa_mainloop_get_api = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_get_api"); pContext->pulse.pa_mainloop_iterate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_iterate"); pContext->pulse.pa_mainloop_wakeup = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_wakeup"); pContext->pulse.pa_threaded_mainloop_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_new"); pContext->pulse.pa_threaded_mainloop_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_free"); pContext->pulse.pa_threaded_mainloop_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_start"); pContext->pulse.pa_threaded_mainloop_stop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_stop"); pContext->pulse.pa_threaded_mainloop_lock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_lock"); pContext->pulse.pa_threaded_mainloop_unlock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_unlock"); pContext->pulse.pa_threaded_mainloop_wait = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_wait"); pContext->pulse.pa_threaded_mainloop_signal = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_signal"); pContext->pulse.pa_threaded_mainloop_accept = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_accept"); pContext->pulse.pa_threaded_mainloop_get_retval = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_get_retval"); pContext->pulse.pa_threaded_mainloop_get_api = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_get_api"); pContext->pulse.pa_threaded_mainloop_in_thread = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_in_thread"); pContext->pulse.pa_threaded_mainloop_set_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_set_name"); pContext->pulse.pa_context_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_new"); pContext->pulse.pa_context_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_unref"); pContext->pulse.pa_context_connect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_connect"); pContext->pulse.pa_context_disconnect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_disconnect"); pContext->pulse.pa_context_set_state_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_set_state_callback"); pContext->pulse.pa_context_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_state"); pContext->pulse.pa_context_get_sink_info_list = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_sink_info_list"); pContext->pulse.pa_context_get_source_info_list = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_source_info_list"); pContext->pulse.pa_context_get_sink_info_by_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_sink_info_by_name"); pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_source_info_by_name"); pContext->pulse.pa_operation_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_operation_unref"); pContext->pulse.pa_operation_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_operation_get_state"); pContext->pulse.pa_channel_map_init_extend = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_init_extend"); pContext->pulse.pa_channel_map_valid = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_valid"); pContext->pulse.pa_channel_map_compatible = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_compatible"); pContext->pulse.pa_stream_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_new"); pContext->pulse.pa_stream_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_unref"); pContext->pulse.pa_stream_connect_playback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_connect_playback"); pContext->pulse.pa_stream_connect_record = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_connect_record"); pContext->pulse.pa_stream_disconnect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_disconnect"); pContext->pulse.pa_stream_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_state"); pContext->pulse.pa_stream_get_sample_spec = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_sample_spec"); pContext->pulse.pa_stream_get_channel_map = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_channel_map"); pContext->pulse.pa_stream_get_buffer_attr = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_buffer_attr"); pContext->pulse.pa_stream_set_buffer_attr = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_buffer_attr"); pContext->pulse.pa_stream_get_device_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_device_name"); pContext->pulse.pa_stream_set_write_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_write_callback"); pContext->pulse.pa_stream_set_read_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_read_callback"); pContext->pulse.pa_stream_set_suspended_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_suspended_callback"); pContext->pulse.pa_stream_set_moved_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_moved_callback"); pContext->pulse.pa_stream_is_suspended = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_is_suspended"); pContext->pulse.pa_stream_flush = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_flush"); pContext->pulse.pa_stream_drain = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_drain"); pContext->pulse.pa_stream_is_corked = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_is_corked"); pContext->pulse.pa_stream_cork = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_cork"); pContext->pulse.pa_stream_trigger = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_trigger"); pContext->pulse.pa_stream_begin_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_begin_write"); pContext->pulse.pa_stream_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_write"); pContext->pulse.pa_stream_peek = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_peek"); pContext->pulse.pa_stream_drop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_drop"); pContext->pulse.pa_stream_writable_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_writable_size"); pContext->pulse.pa_stream_readable_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_readable_size"); #else /* This strange assignment system is just for type safety. */ ma_pa_mainloop_new_proc _pa_mainloop_new = pa_mainloop_new; ma_pa_mainloop_free_proc _pa_mainloop_free = pa_mainloop_free; ma_pa_mainloop_quit_proc _pa_mainloop_quit = pa_mainloop_quit; ma_pa_mainloop_get_api_proc _pa_mainloop_get_api = pa_mainloop_get_api; ma_pa_mainloop_iterate_proc _pa_mainloop_iterate = pa_mainloop_iterate; ma_pa_mainloop_wakeup_proc _pa_mainloop_wakeup = pa_mainloop_wakeup; ma_pa_threaded_mainloop_new_proc _pa_threaded_mainloop_new = pa_threaded_mainloop_new; ma_pa_threaded_mainloop_free_proc _pa_threaded_mainloop_free = pa_threaded_mainloop_free; ma_pa_threaded_mainloop_start_proc _pa_threaded_mainloop_start = pa_threaded_mainloop_start; ma_pa_threaded_mainloop_stop_proc _pa_threaded_mainloop_stop = pa_threaded_mainloop_stop; ma_pa_threaded_mainloop_lock_proc _pa_threaded_mainloop_lock = pa_threaded_mainloop_lock; ma_pa_threaded_mainloop_unlock_proc _pa_threaded_mainloop_unlock = pa_threaded_mainloop_unlock; ma_pa_threaded_mainloop_wait_proc _pa_threaded_mainloop_wait = pa_threaded_mainloop_wait; ma_pa_threaded_mainloop_signal_proc _pa_threaded_mainloop_signal = pa_threaded_mainloop_signal; ma_pa_threaded_mainloop_accept_proc _pa_threaded_mainloop_accept = pa_threaded_mainloop_accept; ma_pa_threaded_mainloop_get_retval_proc _pa_threaded_mainloop_get_retval = pa_threaded_mainloop_get_retval; ma_pa_threaded_mainloop_get_api_proc _pa_threaded_mainloop_get_api = pa_threaded_mainloop_get_api; ma_pa_threaded_mainloop_in_thread_proc _pa_threaded_mainloop_in_thread = pa_threaded_mainloop_in_thread; ma_pa_threaded_mainloop_set_name_proc _pa_threaded_mainloop_set_name = pa_threaded_mainloop_set_name; ma_pa_context_new_proc _pa_context_new = pa_context_new; ma_pa_context_unref_proc _pa_context_unref = pa_context_unref; ma_pa_context_connect_proc _pa_context_connect = pa_context_connect; ma_pa_context_disconnect_proc _pa_context_disconnect = pa_context_disconnect; ma_pa_context_set_state_callback_proc _pa_context_set_state_callback = pa_context_set_state_callback; ma_pa_context_get_state_proc _pa_context_get_state = pa_context_get_state; ma_pa_context_get_sink_info_list_proc _pa_context_get_sink_info_list = pa_context_get_sink_info_list; ma_pa_context_get_source_info_list_proc _pa_context_get_source_info_list = pa_context_get_source_info_list; ma_pa_context_get_sink_info_by_name_proc _pa_context_get_sink_info_by_name = pa_context_get_sink_info_by_name; ma_pa_context_get_source_info_by_name_proc _pa_context_get_source_info_by_name= pa_context_get_source_info_by_name; ma_pa_operation_unref_proc _pa_operation_unref = pa_operation_unref; ma_pa_operation_get_state_proc _pa_operation_get_state = pa_operation_get_state; ma_pa_channel_map_init_extend_proc _pa_channel_map_init_extend = pa_channel_map_init_extend; ma_pa_channel_map_valid_proc _pa_channel_map_valid = pa_channel_map_valid; ma_pa_channel_map_compatible_proc _pa_channel_map_compatible = pa_channel_map_compatible; ma_pa_stream_new_proc _pa_stream_new = pa_stream_new; ma_pa_stream_unref_proc _pa_stream_unref = pa_stream_unref; ma_pa_stream_connect_playback_proc _pa_stream_connect_playback = pa_stream_connect_playback; ma_pa_stream_connect_record_proc _pa_stream_connect_record = pa_stream_connect_record; ma_pa_stream_disconnect_proc _pa_stream_disconnect = pa_stream_disconnect; ma_pa_stream_get_state_proc _pa_stream_get_state = pa_stream_get_state; ma_pa_stream_get_sample_spec_proc _pa_stream_get_sample_spec = pa_stream_get_sample_spec; ma_pa_stream_get_channel_map_proc _pa_stream_get_channel_map = pa_stream_get_channel_map; ma_pa_stream_get_buffer_attr_proc _pa_stream_get_buffer_attr = pa_stream_get_buffer_attr; ma_pa_stream_set_buffer_attr_proc _pa_stream_set_buffer_attr = pa_stream_set_buffer_attr; ma_pa_stream_get_device_name_proc _pa_stream_get_device_name = pa_stream_get_device_name; ma_pa_stream_set_write_callback_proc _pa_stream_set_write_callback = pa_stream_set_write_callback; ma_pa_stream_set_read_callback_proc _pa_stream_set_read_callback = pa_stream_set_read_callback; ma_pa_stream_set_suspended_callback_proc _pa_stream_set_suspended_callback = pa_stream_set_suspended_callback; ma_pa_stream_set_moved_callback_proc _pa_stream_set_moved_callback = pa_stream_set_moved_callback; ma_pa_stream_is_suspended_proc _pa_stream_is_suspended = pa_stream_is_suspended; ma_pa_stream_flush_proc _pa_stream_flush = pa_stream_flush; ma_pa_stream_drain_proc _pa_stream_drain = pa_stream_drain; ma_pa_stream_is_corked_proc _pa_stream_is_corked = pa_stream_is_corked; ma_pa_stream_cork_proc _pa_stream_cork = pa_stream_cork; ma_pa_stream_trigger_proc _pa_stream_trigger = pa_stream_trigger; ma_pa_stream_begin_write_proc _pa_stream_begin_write = pa_stream_begin_write; ma_pa_stream_write_proc _pa_stream_write = pa_stream_write; ma_pa_stream_peek_proc _pa_stream_peek = pa_stream_peek; ma_pa_stream_drop_proc _pa_stream_drop = pa_stream_drop; ma_pa_stream_writable_size_proc _pa_stream_writable_size = pa_stream_writable_size; ma_pa_stream_readable_size_proc _pa_stream_readable_size = pa_stream_readable_size; pContext->pulse.pa_mainloop_new = (ma_proc)_pa_mainloop_new; pContext->pulse.pa_mainloop_free = (ma_proc)_pa_mainloop_free; pContext->pulse.pa_mainloop_quit = (ma_proc)_pa_mainloop_quit; pContext->pulse.pa_mainloop_get_api = (ma_proc)_pa_mainloop_get_api; pContext->pulse.pa_mainloop_iterate = (ma_proc)_pa_mainloop_iterate; pContext->pulse.pa_mainloop_wakeup = (ma_proc)_pa_mainloop_wakeup; pContext->pulse.pa_threaded_mainloop_new = (ma_proc)_pa_threaded_mainloop_new; pContext->pulse.pa_threaded_mainloop_free = (ma_proc)_pa_threaded_mainloop_free; pContext->pulse.pa_threaded_mainloop_start = (ma_proc)_pa_threaded_mainloop_start; pContext->pulse.pa_threaded_mainloop_stop = (ma_proc)_pa_threaded_mainloop_stop; pContext->pulse.pa_threaded_mainloop_lock = (ma_proc)_pa_threaded_mainloop_lock; pContext->pulse.pa_threaded_mainloop_unlock = (ma_proc)_pa_threaded_mainloop_unlock; pContext->pulse.pa_threaded_mainloop_wait = (ma_proc)_pa_threaded_mainloop_wait; pContext->pulse.pa_threaded_mainloop_signal = (ma_proc)_pa_threaded_mainloop_signal; pContext->pulse.pa_threaded_mainloop_accept = (ma_proc)_pa_threaded_mainloop_accept; pContext->pulse.pa_threaded_mainloop_get_retval = (ma_proc)_pa_threaded_mainloop_get_retval; pContext->pulse.pa_threaded_mainloop_get_api = (ma_proc)_pa_threaded_mainloop_get_api; pContext->pulse.pa_threaded_mainloop_in_thread = (ma_proc)_pa_threaded_mainloop_in_thread; pContext->pulse.pa_threaded_mainloop_set_name = (ma_proc)_pa_threaded_mainloop_set_name; pContext->pulse.pa_context_new = (ma_proc)_pa_context_new; pContext->pulse.pa_context_unref = (ma_proc)_pa_context_unref; pContext->pulse.pa_context_connect = (ma_proc)_pa_context_connect; pContext->pulse.pa_context_disconnect = (ma_proc)_pa_context_disconnect; pContext->pulse.pa_context_set_state_callback = (ma_proc)_pa_context_set_state_callback; pContext->pulse.pa_context_get_state = (ma_proc)_pa_context_get_state; pContext->pulse.pa_context_get_sink_info_list = (ma_proc)_pa_context_get_sink_info_list; pContext->pulse.pa_context_get_source_info_list = (ma_proc)_pa_context_get_source_info_list; pContext->pulse.pa_context_get_sink_info_by_name = (ma_proc)_pa_context_get_sink_info_by_name; pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)_pa_context_get_source_info_by_name; pContext->pulse.pa_operation_unref = (ma_proc)_pa_operation_unref; pContext->pulse.pa_operation_get_state = (ma_proc)_pa_operation_get_state; pContext->pulse.pa_channel_map_init_extend = (ma_proc)_pa_channel_map_init_extend; pContext->pulse.pa_channel_map_valid = (ma_proc)_pa_channel_map_valid; pContext->pulse.pa_channel_map_compatible = (ma_proc)_pa_channel_map_compatible; pContext->pulse.pa_stream_new = (ma_proc)_pa_stream_new; pContext->pulse.pa_stream_unref = (ma_proc)_pa_stream_unref; pContext->pulse.pa_stream_connect_playback = (ma_proc)_pa_stream_connect_playback; pContext->pulse.pa_stream_connect_record = (ma_proc)_pa_stream_connect_record; pContext->pulse.pa_stream_disconnect = (ma_proc)_pa_stream_disconnect; pContext->pulse.pa_stream_get_state = (ma_proc)_pa_stream_get_state; pContext->pulse.pa_stream_get_sample_spec = (ma_proc)_pa_stream_get_sample_spec; pContext->pulse.pa_stream_get_channel_map = (ma_proc)_pa_stream_get_channel_map; pContext->pulse.pa_stream_get_buffer_attr = (ma_proc)_pa_stream_get_buffer_attr; pContext->pulse.pa_stream_set_buffer_attr = (ma_proc)_pa_stream_set_buffer_attr; pContext->pulse.pa_stream_get_device_name = (ma_proc)_pa_stream_get_device_name; pContext->pulse.pa_stream_set_write_callback = (ma_proc)_pa_stream_set_write_callback; pContext->pulse.pa_stream_set_read_callback = (ma_proc)_pa_stream_set_read_callback; pContext->pulse.pa_stream_set_suspended_callback = (ma_proc)_pa_stream_set_suspended_callback; pContext->pulse.pa_stream_set_moved_callback = (ma_proc)_pa_stream_set_moved_callback; pContext->pulse.pa_stream_is_suspended = (ma_proc)_pa_stream_is_suspended; pContext->pulse.pa_stream_flush = (ma_proc)_pa_stream_flush; pContext->pulse.pa_stream_drain = (ma_proc)_pa_stream_drain; pContext->pulse.pa_stream_is_corked = (ma_proc)_pa_stream_is_corked; pContext->pulse.pa_stream_cork = (ma_proc)_pa_stream_cork; pContext->pulse.pa_stream_trigger = (ma_proc)_pa_stream_trigger; pContext->pulse.pa_stream_begin_write = (ma_proc)_pa_stream_begin_write; pContext->pulse.pa_stream_write = (ma_proc)_pa_stream_write; pContext->pulse.pa_stream_peek = (ma_proc)_pa_stream_peek; pContext->pulse.pa_stream_drop = (ma_proc)_pa_stream_drop; pContext->pulse.pa_stream_writable_size = (ma_proc)_pa_stream_writable_size; pContext->pulse.pa_stream_readable_size = (ma_proc)_pa_stream_readable_size; #endif /* We need to make a copy of the application and server names so we can pass them to the pa_context of each device. */ pContext->pulse.pApplicationName = ma_copy_string(pConfig->pulse.pApplicationName, &pContext->allocationCallbacks); if (pContext->pulse.pApplicationName == NULL && pConfig->pulse.pApplicationName != NULL) { return MA_OUT_OF_MEMORY; } pContext->pulse.pServerName = ma_copy_string(pConfig->pulse.pServerName, &pContext->allocationCallbacks); if (pContext->pulse.pServerName == NULL && pConfig->pulse.pServerName != NULL) { ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); return MA_OUT_OF_MEMORY; } result = ma_init_pa_mainloop_and_pa_context__pulse(pContext, pConfig->pulse.pApplicationName, pConfig->pulse.pServerName, pConfig->pulse.tryAutoSpawn, &pContext->pulse.pMainLoop, &pContext->pulse.pPulseContext); if (result != MA_SUCCESS) { ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks); ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO); #endif return result; } /* With pa_mainloop we run a synchronous backend, but we implement our own main loop. */ pCallbacks->onContextInit = ma_context_init__pulse; pCallbacks->onContextUninit = ma_context_uninit__pulse; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__pulse; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__pulse; pCallbacks->onDeviceInit = ma_device_init__pulse; pCallbacks->onDeviceUninit = ma_device_uninit__pulse; pCallbacks->onDeviceStart = ma_device_start__pulse; pCallbacks->onDeviceStop = ma_device_stop__pulse; pCallbacks->onDeviceRead = NULL; /* Not used because we're implementing onDeviceDataLoop. */ pCallbacks->onDeviceWrite = NULL; /* Not used because we're implementing onDeviceDataLoop. */ pCallbacks->onDeviceDataLoop = ma_device_data_loop__pulse; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__pulse; return MA_SUCCESS; } #endif /****************************************************************************** JACK Backend ******************************************************************************/ #ifdef MA_HAS_JACK /* It is assumed jack.h is available when compile-time linking is being used. */ #ifdef MA_NO_RUNTIME_LINKING #include typedef jack_nframes_t ma_jack_nframes_t; typedef jack_options_t ma_jack_options_t; typedef jack_status_t ma_jack_status_t; typedef jack_client_t ma_jack_client_t; typedef jack_port_t ma_jack_port_t; typedef JackProcessCallback ma_JackProcessCallback; typedef JackBufferSizeCallback ma_JackBufferSizeCallback; typedef JackShutdownCallback ma_JackShutdownCallback; #define MA_JACK_DEFAULT_AUDIO_TYPE JACK_DEFAULT_AUDIO_TYPE #define ma_JackNoStartServer JackNoStartServer #define ma_JackPortIsInput JackPortIsInput #define ma_JackPortIsOutput JackPortIsOutput #define ma_JackPortIsPhysical JackPortIsPhysical #else typedef ma_uint32 ma_jack_nframes_t; typedef int ma_jack_options_t; typedef int ma_jack_status_t; typedef struct ma_jack_client_t ma_jack_client_t; typedef struct ma_jack_port_t ma_jack_port_t; typedef int (* ma_JackProcessCallback) (ma_jack_nframes_t nframes, void* arg); typedef int (* ma_JackBufferSizeCallback)(ma_jack_nframes_t nframes, void* arg); typedef void (* ma_JackShutdownCallback) (void* arg); #define MA_JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" #define ma_JackNoStartServer 1 #define ma_JackPortIsInput 1 #define ma_JackPortIsOutput 2 #define ma_JackPortIsPhysical 4 #endif typedef ma_jack_client_t* (* ma_jack_client_open_proc) (const char* client_name, ma_jack_options_t options, ma_jack_status_t* status, ...); typedef int (* ma_jack_client_close_proc) (ma_jack_client_t* client); typedef int (* ma_jack_client_name_size_proc) (void); typedef int (* ma_jack_set_process_callback_proc) (ma_jack_client_t* client, ma_JackProcessCallback process_callback, void* arg); typedef int (* ma_jack_set_buffer_size_callback_proc)(ma_jack_client_t* client, ma_JackBufferSizeCallback bufsize_callback, void* arg); typedef void (* ma_jack_on_shutdown_proc) (ma_jack_client_t* client, ma_JackShutdownCallback function, void* arg); typedef ma_jack_nframes_t (* ma_jack_get_sample_rate_proc) (ma_jack_client_t* client); typedef ma_jack_nframes_t (* ma_jack_get_buffer_size_proc) (ma_jack_client_t* client); typedef const char** (* ma_jack_get_ports_proc) (ma_jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags); typedef int (* ma_jack_activate_proc) (ma_jack_client_t* client); typedef int (* ma_jack_deactivate_proc) (ma_jack_client_t* client); typedef int (* ma_jack_connect_proc) (ma_jack_client_t* client, const char* source_port, const char* destination_port); typedef ma_jack_port_t* (* ma_jack_port_register_proc) (ma_jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size); typedef const char* (* ma_jack_port_name_proc) (const ma_jack_port_t* port); typedef void* (* ma_jack_port_get_buffer_proc) (ma_jack_port_t* port, ma_jack_nframes_t nframes); typedef void (* ma_jack_free_proc) (void* ptr); static ma_result ma_context_open_client__jack(ma_context* pContext, ma_jack_client_t** ppClient) { size_t maxClientNameSize; char clientName[256]; ma_jack_status_t status; ma_jack_client_t* pClient; MA_ASSERT(pContext != NULL); MA_ASSERT(ppClient != NULL); if (ppClient) { *ppClient = NULL; } maxClientNameSize = ((ma_jack_client_name_size_proc)pContext->jack.jack_client_name_size)(); /* Includes null terminator. */ ma_strncpy_s(clientName, ma_min(sizeof(clientName), maxClientNameSize), (pContext->jack.pClientName != NULL) ? pContext->jack.pClientName : "miniaudio", (size_t)-1); pClient = ((ma_jack_client_open_proc)pContext->jack.jack_client_open)(clientName, (pContext->jack.tryStartServer) ? 0 : ma_JackNoStartServer, &status, NULL); if (pClient == NULL) { return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (ppClient) { *ppClient = pClient; } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__jack(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* JACK only uses default devices. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* JACK only uses default devices. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } (void)cbResult; /* For silencing a static analysis warning. */ return MA_SUCCESS; } static ma_result ma_context_get_device_info__jack(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_jack_client_t* pClient; ma_result result; const char** ppPorts; MA_ASSERT(pContext != NULL); if (pDeviceID != NULL && pDeviceID->jack != 0) { return MA_NO_DEVICE; /* Don't know the device. */ } /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } /* Jack only uses default devices. */ pDeviceInfo->isDefault = MA_TRUE; /* Jack only supports f32 and has a specific channel count and sample rate. */ pDeviceInfo->nativeDataFormats[0].format = ma_format_f32; /* The channel count and sample rate can only be determined by opening the device. */ result = ma_context_open_client__jack(pContext, &pClient); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[JACK] Failed to open client."); return result; } pDeviceInfo->nativeDataFormats[0].sampleRate = ((ma_jack_get_sample_rate_proc)pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pClient); pDeviceInfo->nativeDataFormats[0].channels = 0; ppPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ((deviceType == ma_device_type_playback) ? ma_JackPortIsInput : ma_JackPortIsOutput)); if (ppPorts == NULL) { ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } while (ppPorts[pDeviceInfo->nativeDataFormats[0].channels] != NULL) { pDeviceInfo->nativeDataFormats[0].channels += 1; } pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppPorts); ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient); (void)pContext; return MA_SUCCESS; } static ma_result ma_device_uninit__jack(ma_device* pDevice) { ma_context* pContext; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->jack.pClient != NULL) { ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDevice->jack.pClient); } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks); ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks); ma_free(pDevice->jack.ppPortsPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } static void ma_device__jack_shutdown_callback(void* pUserData) { /* JACK died. Stop the device. */ ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_device_stop(pDevice); } static int ma_device__jack_buffer_size_callback(ma_jack_nframes_t frameCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { size_t newBufferSize = frameCount * (pDevice->capture.internalChannels * ma_get_bytes_per_sample(pDevice->capture.internalFormat)); float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks); if (pNewBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks); pDevice->jack.pIntermediaryBufferCapture = pNewBuffer; pDevice->playback.internalPeriodSizeInFrames = frameCount; } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { size_t newBufferSize = frameCount * (pDevice->playback.internalChannels * ma_get_bytes_per_sample(pDevice->playback.internalFormat)); float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks); if (pNewBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks); pDevice->jack.pIntermediaryBufferPlayback = pNewBuffer; pDevice->playback.internalPeriodSizeInFrames = frameCount; } return 0; } static int ma_device__jack_process_callback(ma_jack_nframes_t frameCount, void* pUserData) { ma_device* pDevice; ma_context* pContext; ma_uint32 iChannel; pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { /* Channels need to be interleaved. */ for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) { const float* pSrc = (const float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[iChannel], frameCount); if (pSrc != NULL) { float* pDst = pDevice->jack.pIntermediaryBufferCapture + iChannel; ma_jack_nframes_t iFrame; for (iFrame = 0; iFrame < frameCount; ++iFrame) { *pDst = *pSrc; pDst += pDevice->capture.internalChannels; pSrc += 1; } } } ma_device_handle_backend_data_callback(pDevice, NULL, pDevice->jack.pIntermediaryBufferCapture, frameCount); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_device_handle_backend_data_callback(pDevice, pDevice->jack.pIntermediaryBufferPlayback, NULL, frameCount); /* Channels need to be deinterleaved. */ for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) { float* pDst = (float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[iChannel], frameCount); if (pDst != NULL) { const float* pSrc = pDevice->jack.pIntermediaryBufferPlayback + iChannel; ma_jack_nframes_t iFrame; for (iFrame = 0; iFrame < frameCount; ++iFrame) { *pDst = *pSrc; pDst += 1; pSrc += pDevice->playback.internalChannels; } } } } return 0; } static ma_result ma_device_init__jack(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; ma_uint32 periodSizeInFrames; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDevice != NULL); if (pConfig->deviceType == ma_device_type_loopback) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Loopback mode not supported."); return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* Only supporting default devices with JACK. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->pDeviceID != NULL && pDescriptorPlayback->pDeviceID->jack != 0) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->pDeviceID != NULL && pDescriptorCapture->pDeviceID->jack != 0)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Only default devices are supported."); return MA_NO_DEVICE; } /* No exclusive mode with the JACK backend. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Exclusive mode not supported."); return MA_SHARE_MODE_NOT_SUPPORTED; } /* Open the client. */ result = ma_context_open_client__jack(pDevice->pContext, (ma_jack_client_t**)&pDevice->jack.pClient); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to open client."); return result; } /* Callbacks. */ if (((ma_jack_set_process_callback_proc)pDevice->pContext->jack.jack_set_process_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_process_callback, pDevice) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to set process callback."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (((ma_jack_set_buffer_size_callback_proc)pDevice->pContext->jack.jack_set_buffer_size_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_buffer_size_callback, pDevice) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to set buffer size callback."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } ((ma_jack_on_shutdown_proc)pDevice->pContext->jack.jack_on_shutdown)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_shutdown_callback, pDevice); /* The buffer size in frames can change. */ periodSizeInFrames = ((ma_jack_get_buffer_size_proc)pDevice->pContext->jack.jack_get_buffer_size)((ma_jack_client_t*)pDevice->jack.pClient); if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPort; const char** ppPorts; pDescriptorCapture->format = ma_format_f32; pDescriptorCapture->channels = 0; pDescriptorCapture->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient); ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput); if (ppPorts == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* Need to count the number of ports first so we can allocate some memory. */ while (ppPorts[pDescriptorCapture->channels] != NULL) { pDescriptorCapture->channels += 1; } pDevice->jack.ppPortsCapture = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsCapture) * pDescriptorCapture->channels, &pDevice->pContext->allocationCallbacks); if (pDevice->jack.ppPortsCapture == NULL) { return MA_OUT_OF_MEMORY; } for (iPort = 0; iPort < pDescriptorCapture->channels; iPort += 1) { char name[64]; ma_strcpy_s(name, sizeof(name), "capture"); ma_itoa_s((int)iPort, name+7, sizeof(name)-7, 10); /* 7 = length of "capture" */ pDevice->jack.ppPortsCapture[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsInput, 0); if (pDevice->jack.ppPortsCapture[iPort] == NULL) { ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); ma_device_uninit__jack(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to register ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = 1; /* There's no notion of a period in JACK. Just set to 1. */ pDevice->jack.pIntermediaryBufferCapture = (float*)ma_calloc(pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels), &pDevice->pContext->allocationCallbacks); if (pDevice->jack.pIntermediaryBufferCapture == NULL) { ma_device_uninit__jack(pDevice); return MA_OUT_OF_MEMORY; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPort; const char** ppPorts; pDescriptorPlayback->format = ma_format_f32; pDescriptorPlayback->channels = 0; pDescriptorPlayback->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient); ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput); if (ppPorts == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* Need to count the number of ports first so we can allocate some memory. */ while (ppPorts[pDescriptorPlayback->channels] != NULL) { pDescriptorPlayback->channels += 1; } pDevice->jack.ppPortsPlayback = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsPlayback) * pDescriptorPlayback->channels, &pDevice->pContext->allocationCallbacks); if (pDevice->jack.ppPortsPlayback == NULL) { ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks); return MA_OUT_OF_MEMORY; } for (iPort = 0; iPort < pDescriptorPlayback->channels; iPort += 1) { char name[64]; ma_strcpy_s(name, sizeof(name), "playback"); ma_itoa_s((int)iPort, name+8, sizeof(name)-8, 10); /* 8 = length of "playback" */ pDevice->jack.ppPortsPlayback[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsOutput, 0); if (pDevice->jack.ppPortsPlayback[iPort] == NULL) { ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); ma_device_uninit__jack(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to register ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = 1; /* There's no notion of a period in JACK. Just set to 1. */ pDevice->jack.pIntermediaryBufferPlayback = (float*)ma_calloc(pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels), &pDevice->pContext->allocationCallbacks); if (pDevice->jack.pIntermediaryBufferPlayback == NULL) { ma_device_uninit__jack(pDevice); return MA_OUT_OF_MEMORY; } } return MA_SUCCESS; } static ma_result ma_device_start__jack(ma_device* pDevice) { ma_context* pContext = pDevice->pContext; int resultJACK; size_t i; resultJACK = ((ma_jack_activate_proc)pContext->jack.jack_activate)((ma_jack_client_t*)pDevice->jack.pClient); if (resultJACK != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to activate the JACK client."); return MA_FAILED_TO_START_BACKEND_DEVICE; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput); if (ppServerPorts == NULL) { ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to retrieve physical ports."); return MA_ERROR; } for (i = 0; ppServerPorts[i] != NULL; ++i) { const char* pServerPort = ppServerPorts[i]; const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[i]); resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pServerPort, pClientPort); if (resultJACK != 0) { ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to connect ports."); return MA_ERROR; } } ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput); if (ppServerPorts == NULL) { ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to retrieve physical ports."); return MA_ERROR; } for (i = 0; ppServerPorts[i] != NULL; ++i) { const char* pServerPort = ppServerPorts[i]; const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[i]); resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pClientPort, pServerPort); if (resultJACK != 0) { ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to connect ports."); return MA_ERROR; } } ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); } return MA_SUCCESS; } static ma_result ma_device_stop__jack(ma_device* pDevice) { ma_context* pContext = pDevice->pContext; if (((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] An error occurred when deactivating the JACK client."); return MA_ERROR; } ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__jack(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_jack); ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks); pContext->jack.pClientName = NULL; #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO); #endif return MA_SUCCESS; } static ma_result ma_context_init__jack(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #ifndef MA_NO_RUNTIME_LINKING const char* libjackNames[] = { #if defined(MA_WIN32) "libjack.dll", "libjack64.dll" #endif #if defined(MA_UNIX) "libjack.so", "libjack.so.0" #endif }; size_t i; for (i = 0; i < ma_countof(libjackNames); ++i) { pContext->jack.jackSO = ma_dlopen(ma_context_get_log(pContext), libjackNames[i]); if (pContext->jack.jackSO != NULL) { break; } } if (pContext->jack.jackSO == NULL) { return MA_NO_BACKEND; } pContext->jack.jack_client_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_open"); pContext->jack.jack_client_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_close"); pContext->jack.jack_client_name_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_name_size"); pContext->jack.jack_set_process_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_set_process_callback"); pContext->jack.jack_set_buffer_size_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_set_buffer_size_callback"); pContext->jack.jack_on_shutdown = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_on_shutdown"); pContext->jack.jack_get_sample_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_sample_rate"); pContext->jack.jack_get_buffer_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_buffer_size"); pContext->jack.jack_get_ports = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_ports"); pContext->jack.jack_activate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_activate"); pContext->jack.jack_deactivate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_deactivate"); pContext->jack.jack_connect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_connect"); pContext->jack.jack_port_register = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_register"); pContext->jack.jack_port_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_name"); pContext->jack.jack_port_get_buffer = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_get_buffer"); pContext->jack.jack_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_free"); #else /* This strange assignment system is here just to ensure type safety of miniaudio's function pointer types. If anything differs slightly the compiler should throw a warning. */ ma_jack_client_open_proc _jack_client_open = jack_client_open; ma_jack_client_close_proc _jack_client_close = jack_client_close; ma_jack_client_name_size_proc _jack_client_name_size = jack_client_name_size; ma_jack_set_process_callback_proc _jack_set_process_callback = jack_set_process_callback; ma_jack_set_buffer_size_callback_proc _jack_set_buffer_size_callback = jack_set_buffer_size_callback; ma_jack_on_shutdown_proc _jack_on_shutdown = jack_on_shutdown; ma_jack_get_sample_rate_proc _jack_get_sample_rate = jack_get_sample_rate; ma_jack_get_buffer_size_proc _jack_get_buffer_size = jack_get_buffer_size; ma_jack_get_ports_proc _jack_get_ports = jack_get_ports; ma_jack_activate_proc _jack_activate = jack_activate; ma_jack_deactivate_proc _jack_deactivate = jack_deactivate; ma_jack_connect_proc _jack_connect = jack_connect; ma_jack_port_register_proc _jack_port_register = jack_port_register; ma_jack_port_name_proc _jack_port_name = jack_port_name; ma_jack_port_get_buffer_proc _jack_port_get_buffer = jack_port_get_buffer; ma_jack_free_proc _jack_free = jack_free; pContext->jack.jack_client_open = (ma_proc)_jack_client_open; pContext->jack.jack_client_close = (ma_proc)_jack_client_close; pContext->jack.jack_client_name_size = (ma_proc)_jack_client_name_size; pContext->jack.jack_set_process_callback = (ma_proc)_jack_set_process_callback; pContext->jack.jack_set_buffer_size_callback = (ma_proc)_jack_set_buffer_size_callback; pContext->jack.jack_on_shutdown = (ma_proc)_jack_on_shutdown; pContext->jack.jack_get_sample_rate = (ma_proc)_jack_get_sample_rate; pContext->jack.jack_get_buffer_size = (ma_proc)_jack_get_buffer_size; pContext->jack.jack_get_ports = (ma_proc)_jack_get_ports; pContext->jack.jack_activate = (ma_proc)_jack_activate; pContext->jack.jack_deactivate = (ma_proc)_jack_deactivate; pContext->jack.jack_connect = (ma_proc)_jack_connect; pContext->jack.jack_port_register = (ma_proc)_jack_port_register; pContext->jack.jack_port_name = (ma_proc)_jack_port_name; pContext->jack.jack_port_get_buffer = (ma_proc)_jack_port_get_buffer; pContext->jack.jack_free = (ma_proc)_jack_free; #endif if (pConfig->jack.pClientName != NULL) { pContext->jack.pClientName = ma_copy_string(pConfig->jack.pClientName, &pContext->allocationCallbacks); } pContext->jack.tryStartServer = pConfig->jack.tryStartServer; /* Getting here means the JACK library is installed, but it doesn't necessarily mean it's usable. We need to quickly test this by connecting a temporary client. */ { ma_jack_client_t* pDummyClient; ma_result result = ma_context_open_client__jack(pContext, &pDummyClient); if (result != MA_SUCCESS) { ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO); #endif return MA_NO_BACKEND; } ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDummyClient); } pCallbacks->onContextInit = ma_context_init__jack; pCallbacks->onContextUninit = ma_context_uninit__jack; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__jack; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__jack; pCallbacks->onDeviceInit = ma_device_init__jack; pCallbacks->onDeviceUninit = ma_device_uninit__jack; pCallbacks->onDeviceStart = ma_device_start__jack; pCallbacks->onDeviceStop = ma_device_stop__jack; pCallbacks->onDeviceRead = NULL; /* Not used because JACK is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not used because JACK is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not used because JACK is asynchronous. */ return MA_SUCCESS; } #endif /* MA_HAS_JACK */ /****************************************************************************** Core Audio Backend References ========== - Technical Note TN2091: Device input using the HAL Output Audio Unit https://developer.apple.com/library/archive/technotes/tn2091/_index.html ******************************************************************************/ #ifdef MA_HAS_COREAUDIO #include #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 #define MA_APPLE_MOBILE #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1 #define MA_APPLE_TV #endif #if defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1 #define MA_APPLE_WATCH #endif #if __has_feature(objc_arc) #define MA_BRIDGE_TRANSFER __bridge_transfer #define MA_BRIDGE_RETAINED __bridge_retained #else #define MA_BRIDGE_TRANSFER #define MA_BRIDGE_RETAINED #endif #else #define MA_APPLE_DESKTOP #endif #if defined(MA_APPLE_DESKTOP) #include #else #include #endif #include /* CoreFoundation */ typedef Boolean (* ma_CFStringGetCString_proc)(CFStringRef theString, char* buffer, CFIndex bufferSize, CFStringEncoding encoding); typedef void (* ma_CFRelease_proc)(CFTypeRef cf); /* CoreAudio */ #if defined(MA_APPLE_DESKTOP) typedef OSStatus (* ma_AudioObjectGetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* ioDataSize, void* outData); typedef OSStatus (* ma_AudioObjectGetPropertyDataSize_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize); typedef OSStatus (* ma_AudioObjectSetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData); typedef OSStatus (* ma_AudioObjectAddPropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData); typedef OSStatus (* ma_AudioObjectRemovePropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData); #endif /* AudioToolbox */ typedef AudioComponent (* ma_AudioComponentFindNext_proc)(AudioComponent inComponent, const AudioComponentDescription* inDesc); typedef OSStatus (* ma_AudioComponentInstanceDispose_proc)(AudioComponentInstance inInstance); typedef OSStatus (* ma_AudioComponentInstanceNew_proc)(AudioComponent inComponent, AudioComponentInstance* outInstance); typedef OSStatus (* ma_AudioOutputUnitStart_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioOutputUnitStop_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioUnitAddPropertyListener_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitPropertyListenerProc inProc, void* inProcUserData); typedef OSStatus (* ma_AudioUnitGetPropertyInfo_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, UInt32* outDataSize, Boolean* outWriteable); typedef OSStatus (* ma_AudioUnitGetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void* outData, UInt32* ioDataSize); typedef OSStatus (* ma_AudioUnitSetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void* inData, UInt32 inDataSize); typedef OSStatus (* ma_AudioUnitInitialize_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioUnitRender_proc)(AudioUnit inUnit, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inOutputBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData); #define MA_COREAUDIO_OUTPUT_BUS 0 #define MA_COREAUDIO_INPUT_BUS 1 #if defined(MA_APPLE_DESKTOP) static ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit); #endif /* Core Audio So far, Core Audio has been the worst backend to work with due to being both unintuitive and having almost no documentation apart from comments in the headers (which admittedly are quite good). For my own purposes, and for anybody out there whose needing to figure out how this darn thing works, I'm going to outline a few things here. Since miniaudio is a fairly low-level API, one of the things it needs is control over specific devices, and it needs to be able to identify whether or not it can be used as playback and/or capture. The AudioObject API is the only one I've seen that supports this level of detail. There was some public domain sample code I stumbled across that used the AudioComponent and AudioUnit APIs, but I couldn't see anything that gave low-level control over device selection and capabilities (the distinction between playback and capture in particular). Therefore, miniaudio is using the AudioObject API. Most (all?) functions in the AudioObject API take a AudioObjectID as its input. This is the device identifier. When retrieving global information, such as the device list, you use kAudioObjectSystemObject. When retrieving device-specific data, you pass in the ID for that device. In order to retrieve device-specific IDs you need to enumerate over each of the devices. This is done using the AudioObjectGetPropertyDataSize() and AudioObjectGetPropertyData() APIs which seem to be the central APIs for retrieving information about the system and specific devices. To use the AudioObjectGetPropertyData() API you need to use the notion of a property address. A property address is a structure with three variables and is used to identify which property you are getting or setting. The first is the "selector" which is basically the specific property that you're wanting to retrieve or set. The second is the "scope", which is typically set to kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput for input-specific properties and kAudioObjectPropertyScopeOutput for output-specific properties. The last is the "element" which is always set to kAudioObjectPropertyElementMain in miniaudio's case. I don't know of any cases where this would be set to anything different. Back to the earlier issue of device retrieval, you first use the AudioObjectGetPropertyDataSize() API to retrieve the size of the raw data which is just a list of AudioDeviceID's. You use the kAudioObjectSystemObject AudioObjectID, and a property address with the kAudioHardwarePropertyDevices selector and the kAudioObjectPropertyScopeGlobal scope. Once you have the size, allocate a block of memory of that size and then call AudioObjectGetPropertyData(). The data is just a list of AudioDeviceID's so just do "dataSize/sizeof(AudioDeviceID)" to know the device count. */ #if defined(MA_APPLE_MOBILE) static void ma_device__on_notification_interruption_began(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began)); } static void ma_device__on_notification_interruption_ended(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended)); } #endif static ma_result ma_result_from_OSStatus(OSStatus status) { switch (status) { case noErr: return MA_SUCCESS; #if defined(MA_APPLE_DESKTOP) case kAudioHardwareNotRunningError: return MA_DEVICE_NOT_STARTED; case kAudioHardwareUnspecifiedError: return MA_ERROR; case kAudioHardwareUnknownPropertyError: return MA_INVALID_ARGS; case kAudioHardwareBadPropertySizeError: return MA_INVALID_OPERATION; case kAudioHardwareIllegalOperationError: return MA_INVALID_OPERATION; case kAudioHardwareBadObjectError: return MA_INVALID_ARGS; case kAudioHardwareBadDeviceError: return MA_INVALID_ARGS; case kAudioHardwareBadStreamError: return MA_INVALID_ARGS; case kAudioHardwareUnsupportedOperationError: return MA_INVALID_OPERATION; case kAudioDeviceUnsupportedFormatError: return MA_FORMAT_NOT_SUPPORTED; case kAudioDevicePermissionsError: return MA_ACCESS_DENIED; #endif default: return MA_ERROR; } } #if 0 static ma_channel ma_channel_from_AudioChannelBitmap(AudioChannelBitmap bit) { switch (bit) { case kAudioChannelBit_Left: return MA_CHANNEL_LEFT; case kAudioChannelBit_Right: return MA_CHANNEL_RIGHT; case kAudioChannelBit_Center: return MA_CHANNEL_FRONT_CENTER; case kAudioChannelBit_LFEScreen: return MA_CHANNEL_LFE; case kAudioChannelBit_LeftSurround: return MA_CHANNEL_BACK_LEFT; case kAudioChannelBit_RightSurround: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelBit_LeftCenter: return MA_CHANNEL_FRONT_LEFT_CENTER; case kAudioChannelBit_RightCenter: return MA_CHANNEL_FRONT_RIGHT_CENTER; case kAudioChannelBit_CenterSurround: return MA_CHANNEL_BACK_CENTER; case kAudioChannelBit_LeftSurroundDirect: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelBit_RightSurroundDirect: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelBit_TopCenterSurround: return MA_CHANNEL_TOP_CENTER; case kAudioChannelBit_VerticalHeightLeft: return MA_CHANNEL_TOP_FRONT_LEFT; case kAudioChannelBit_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER; case kAudioChannelBit_VerticalHeightRight: return MA_CHANNEL_TOP_FRONT_RIGHT; case kAudioChannelBit_TopBackLeft: return MA_CHANNEL_TOP_BACK_LEFT; case kAudioChannelBit_TopBackCenter: return MA_CHANNEL_TOP_BACK_CENTER; case kAudioChannelBit_TopBackRight: return MA_CHANNEL_TOP_BACK_RIGHT; default: return MA_CHANNEL_NONE; } } #endif static ma_result ma_format_from_AudioStreamBasicDescription(const AudioStreamBasicDescription* pDescription, ma_format* pFormatOut) { MA_ASSERT(pDescription != NULL); MA_ASSERT(pFormatOut != NULL); *pFormatOut = ma_format_unknown; /* Safety. */ /* There's a few things miniaudio doesn't support. */ if (pDescription->mFormatID != kAudioFormatLinearPCM) { return MA_FORMAT_NOT_SUPPORTED; } /* We don't support any non-packed formats that are aligned high. */ if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsAlignedHigh) != 0) { return MA_FORMAT_NOT_SUPPORTED; } /* Only supporting native-endian. */ if ((ma_is_little_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) != 0) || (ma_is_big_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) == 0)) { return MA_FORMAT_NOT_SUPPORTED; } /* We are not currently supporting non-interleaved formats (this will be added in a future version of miniaudio). */ /*if ((pDescription->mFormatFlags & kAudioFormatFlagIsNonInterleaved) != 0) { return MA_FORMAT_NOT_SUPPORTED; }*/ if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsFloat) != 0) { if (pDescription->mBitsPerChannel == 32) { *pFormatOut = ma_format_f32; return MA_SUCCESS; } } else { if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) != 0) { if (pDescription->mBitsPerChannel == 16) { *pFormatOut = ma_format_s16; return MA_SUCCESS; } else if (pDescription->mBitsPerChannel == 24) { if (pDescription->mBytesPerFrame == (pDescription->mBitsPerChannel/8 * pDescription->mChannelsPerFrame)) { *pFormatOut = ma_format_s24; return MA_SUCCESS; } else { if (pDescription->mBytesPerFrame/pDescription->mChannelsPerFrame == sizeof(ma_int32)) { /* TODO: Implement ma_format_s24_32. */ /**pFormatOut = ma_format_s24_32;*/ /*return MA_SUCCESS;*/ return MA_FORMAT_NOT_SUPPORTED; } } } else if (pDescription->mBitsPerChannel == 32) { *pFormatOut = ma_format_s32; return MA_SUCCESS; } } else { if (pDescription->mBitsPerChannel == 8) { *pFormatOut = ma_format_u8; return MA_SUCCESS; } } } /* Getting here means the format is not supported. */ return MA_FORMAT_NOT_SUPPORTED; } #if defined(MA_APPLE_DESKTOP) static ma_channel ma_channel_from_AudioChannelLabel(AudioChannelLabel label) { switch (label) { case kAudioChannelLabel_Unknown: return MA_CHANNEL_NONE; case kAudioChannelLabel_Unused: return MA_CHANNEL_NONE; case kAudioChannelLabel_UseCoordinates: return MA_CHANNEL_NONE; case kAudioChannelLabel_Left: return MA_CHANNEL_LEFT; case kAudioChannelLabel_Right: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_Center: return MA_CHANNEL_FRONT_CENTER; case kAudioChannelLabel_LFEScreen: return MA_CHANNEL_LFE; case kAudioChannelLabel_LeftSurround: return MA_CHANNEL_BACK_LEFT; case kAudioChannelLabel_RightSurround: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelLabel_LeftCenter: return MA_CHANNEL_FRONT_LEFT_CENTER; case kAudioChannelLabel_RightCenter: return MA_CHANNEL_FRONT_RIGHT_CENTER; case kAudioChannelLabel_CenterSurround: return MA_CHANNEL_BACK_CENTER; case kAudioChannelLabel_LeftSurroundDirect: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelLabel_RightSurroundDirect: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelLabel_TopCenterSurround: return MA_CHANNEL_TOP_CENTER; case kAudioChannelLabel_VerticalHeightLeft: return MA_CHANNEL_TOP_FRONT_LEFT; case kAudioChannelLabel_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER; case kAudioChannelLabel_VerticalHeightRight: return MA_CHANNEL_TOP_FRONT_RIGHT; case kAudioChannelLabel_TopBackLeft: return MA_CHANNEL_TOP_BACK_LEFT; case kAudioChannelLabel_TopBackCenter: return MA_CHANNEL_TOP_BACK_CENTER; case kAudioChannelLabel_TopBackRight: return MA_CHANNEL_TOP_BACK_RIGHT; case kAudioChannelLabel_RearSurroundLeft: return MA_CHANNEL_BACK_LEFT; case kAudioChannelLabel_RearSurroundRight: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelLabel_LeftWide: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelLabel_RightWide: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelLabel_LFE2: return MA_CHANNEL_LFE; case kAudioChannelLabel_LeftTotal: return MA_CHANNEL_LEFT; case kAudioChannelLabel_RightTotal: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_HearingImpaired: return MA_CHANNEL_NONE; case kAudioChannelLabel_Narration: return MA_CHANNEL_MONO; case kAudioChannelLabel_Mono: return MA_CHANNEL_MONO; case kAudioChannelLabel_DialogCentricMix: return MA_CHANNEL_MONO; case kAudioChannelLabel_CenterSurroundDirect: return MA_CHANNEL_BACK_CENTER; case kAudioChannelLabel_Haptic: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_W: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_X: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_Y: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_Z: return MA_CHANNEL_NONE; case kAudioChannelLabel_MS_Mid: return MA_CHANNEL_LEFT; case kAudioChannelLabel_MS_Side: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_XY_X: return MA_CHANNEL_LEFT; case kAudioChannelLabel_XY_Y: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_HeadphonesLeft: return MA_CHANNEL_LEFT; case kAudioChannelLabel_HeadphonesRight: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_ClickTrack: return MA_CHANNEL_NONE; case kAudioChannelLabel_ForeignLanguage: return MA_CHANNEL_NONE; case kAudioChannelLabel_Discrete: return MA_CHANNEL_NONE; case kAudioChannelLabel_Discrete_0: return MA_CHANNEL_AUX_0; case kAudioChannelLabel_Discrete_1: return MA_CHANNEL_AUX_1; case kAudioChannelLabel_Discrete_2: return MA_CHANNEL_AUX_2; case kAudioChannelLabel_Discrete_3: return MA_CHANNEL_AUX_3; case kAudioChannelLabel_Discrete_4: return MA_CHANNEL_AUX_4; case kAudioChannelLabel_Discrete_5: return MA_CHANNEL_AUX_5; case kAudioChannelLabel_Discrete_6: return MA_CHANNEL_AUX_6; case kAudioChannelLabel_Discrete_7: return MA_CHANNEL_AUX_7; case kAudioChannelLabel_Discrete_8: return MA_CHANNEL_AUX_8; case kAudioChannelLabel_Discrete_9: return MA_CHANNEL_AUX_9; case kAudioChannelLabel_Discrete_10: return MA_CHANNEL_AUX_10; case kAudioChannelLabel_Discrete_11: return MA_CHANNEL_AUX_11; case kAudioChannelLabel_Discrete_12: return MA_CHANNEL_AUX_12; case kAudioChannelLabel_Discrete_13: return MA_CHANNEL_AUX_13; case kAudioChannelLabel_Discrete_14: return MA_CHANNEL_AUX_14; case kAudioChannelLabel_Discrete_15: return MA_CHANNEL_AUX_15; case kAudioChannelLabel_Discrete_65535: return MA_CHANNEL_NONE; #if 0 /* Introduced in a later version of macOS. */ case kAudioChannelLabel_HOA_ACN: return MA_CHANNEL_NONE; case kAudioChannelLabel_HOA_ACN_0: return MA_CHANNEL_AUX_0; case kAudioChannelLabel_HOA_ACN_1: return MA_CHANNEL_AUX_1; case kAudioChannelLabel_HOA_ACN_2: return MA_CHANNEL_AUX_2; case kAudioChannelLabel_HOA_ACN_3: return MA_CHANNEL_AUX_3; case kAudioChannelLabel_HOA_ACN_4: return MA_CHANNEL_AUX_4; case kAudioChannelLabel_HOA_ACN_5: return MA_CHANNEL_AUX_5; case kAudioChannelLabel_HOA_ACN_6: return MA_CHANNEL_AUX_6; case kAudioChannelLabel_HOA_ACN_7: return MA_CHANNEL_AUX_7; case kAudioChannelLabel_HOA_ACN_8: return MA_CHANNEL_AUX_8; case kAudioChannelLabel_HOA_ACN_9: return MA_CHANNEL_AUX_9; case kAudioChannelLabel_HOA_ACN_10: return MA_CHANNEL_AUX_10; case kAudioChannelLabel_HOA_ACN_11: return MA_CHANNEL_AUX_11; case kAudioChannelLabel_HOA_ACN_12: return MA_CHANNEL_AUX_12; case kAudioChannelLabel_HOA_ACN_13: return MA_CHANNEL_AUX_13; case kAudioChannelLabel_HOA_ACN_14: return MA_CHANNEL_AUX_14; case kAudioChannelLabel_HOA_ACN_15: return MA_CHANNEL_AUX_15; case kAudioChannelLabel_HOA_ACN_65024: return MA_CHANNEL_NONE; #endif default: return MA_CHANNEL_NONE; } } static ma_result ma_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChannelLayout, ma_channel* pChannelMap, size_t channelMapCap) { MA_ASSERT(pChannelLayout != NULL); if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) { UInt32 iChannel; for (iChannel = 0; iChannel < pChannelLayout->mNumberChannelDescriptions && iChannel < channelMapCap; ++iChannel) { pChannelMap[iChannel] = ma_channel_from_AudioChannelLabel(pChannelLayout->mChannelDescriptions[iChannel].mChannelLabel); } } else #if 0 if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) { /* This is the same kind of system that's used by Windows audio APIs. */ UInt32 iChannel = 0; UInt32 iBit; AudioChannelBitmap bitmap = pChannelLayout->mChannelBitmap; for (iBit = 0; iBit < 32 && iChannel < channelMapCap; ++iBit) { AudioChannelBitmap bit = bitmap & (1 << iBit); if (bit != 0) { pChannelMap[iChannel++] = ma_channel_from_AudioChannelBit(bit); } } } else #endif { /* Need to use the tag to determine the channel map. For now I'm just assuming a default channel map, but later on this should be updated to determine the mapping based on the tag. */ UInt32 channelCount; /* Our channel map retrieval APIs below take 32-bit integers, so we'll want to clamp the channel map capacity. */ if (channelMapCap > 0xFFFFFFFF) { channelMapCap = 0xFFFFFFFF; } channelCount = ma_min(AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag), (UInt32)channelMapCap); switch (pChannelLayout->mChannelLayoutTag) { case kAudioChannelLayoutTag_Mono: case kAudioChannelLayoutTag_Stereo: case kAudioChannelLayoutTag_StereoHeadphones: case kAudioChannelLayoutTag_MatrixStereo: case kAudioChannelLayoutTag_MidSide: case kAudioChannelLayoutTag_XY: case kAudioChannelLayoutTag_Binaural: case kAudioChannelLayoutTag_Ambisonic_B_Format: { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } break; case kAudioChannelLayoutTag_Octagonal: { pChannelMap[7] = MA_CHANNEL_SIDE_RIGHT; pChannelMap[6] = MA_CHANNEL_SIDE_LEFT; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Hexagonal: { pChannelMap[5] = MA_CHANNEL_BACK_CENTER; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Pentagonal: { pChannelMap[4] = MA_CHANNEL_FRONT_CENTER; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Quadraphonic: { pChannelMap[3] = MA_CHANNEL_BACK_RIGHT; pChannelMap[2] = MA_CHANNEL_BACK_LEFT; pChannelMap[1] = MA_CHANNEL_RIGHT; pChannelMap[0] = MA_CHANNEL_LEFT; } break; /* TODO: Add support for more tags here. */ default: { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } break; } } return MA_SUCCESS; } #if (defined(MAC_OS_VERSION_12_0) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_12_0) || \ (defined(__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0) #define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMain #else /* kAudioObjectPropertyElementMaster is deprecated. */ #define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMaster #endif /* kAudioDevicePropertyScope* were renamed to kAudioObjectPropertyScope* in 10.8. */ #if !defined(MAC_OS_X_VERSION_10_8) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8) #define kAudioObjectPropertyScopeInput kAudioDevicePropertyScopeInput #define kAudioObjectPropertyScopeOutput kAudioDevicePropertyScopeOutput #endif static ma_result ma_get_device_object_ids__coreaudio(ma_context* pContext, UInt32* pDeviceCount, AudioObjectID** ppDeviceObjectIDs) /* NOTE: Free the returned buffer with ma_free(). */ { AudioObjectPropertyAddress propAddressDevices; UInt32 deviceObjectsDataSize; OSStatus status; AudioObjectID* pDeviceObjectIDs; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceCount != NULL); MA_ASSERT(ppDeviceObjectIDs != NULL); /* Safety. */ *pDeviceCount = 0; *ppDeviceObjectIDs = NULL; propAddressDevices.mSelector = kAudioHardwarePropertyDevices; propAddressDevices.mScope = kAudioObjectPropertyScopeGlobal; propAddressDevices.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pDeviceObjectIDs = (AudioObjectID*)ma_malloc(deviceObjectsDataSize, &pContext->allocationCallbacks); if (pDeviceObjectIDs == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize, pDeviceObjectIDs); if (status != noErr) { ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pDeviceCount = deviceObjectsDataSize / sizeof(AudioObjectID); *ppDeviceObjectIDs = pDeviceObjectIDs; return MA_SUCCESS; } static ma_result ma_get_AudioObject_uid_as_CFStringRef(ma_context* pContext, AudioObjectID objectID, CFStringRef* pUID) { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); propAddress.mSelector = kAudioDevicePropertyDeviceUID; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(*pUID); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, pUID); if (status != noErr) { return ma_result_from_OSStatus(status); } return MA_SUCCESS; } static ma_result ma_get_AudioObject_uid(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut) { CFStringRef uid; ma_result result; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_uid_as_CFStringRef(pContext, objectID, &uid); if (result != MA_SUCCESS) { return result; } if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(uid, bufferOut, bufferSize, kCFStringEncodingUTF8)) { return MA_ERROR; } ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(uid); return MA_SUCCESS; } static ma_result ma_get_AudioObject_name(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut) { AudioObjectPropertyAddress propAddress; CFStringRef deviceName = NULL; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); propAddress.mSelector = kAudioDevicePropertyDeviceNameCFString; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(deviceName); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, &deviceName); if (status != noErr) { return ma_result_from_OSStatus(status); } if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(deviceName, bufferOut, bufferSize, kCFStringEncodingUTF8)) { return MA_ERROR; } ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(deviceName); return MA_SUCCESS; } static ma_bool32 ma_does_AudioObject_support_scope(ma_context* pContext, AudioObjectID deviceObjectID, AudioObjectPropertyScope scope) { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioBufferList* pBufferList; ma_bool32 isSupported; MA_ASSERT(pContext != NULL); /* To know whether or not a device is an input device we need ot look at the stream configuration. If it has an output channel it's a playback device. */ propAddress.mSelector = kAudioDevicePropertyStreamConfiguration; propAddress.mScope = scope; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return MA_FALSE; } pBufferList = (AudioBufferList*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pBufferList == NULL) { return MA_FALSE; /* Out of memory. */ } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pBufferList); if (status != noErr) { ma_free(pBufferList, &pContext->allocationCallbacks); return MA_FALSE; } isSupported = MA_FALSE; if (pBufferList->mNumberBuffers > 0) { isSupported = MA_TRUE; } ma_free(pBufferList, &pContext->allocationCallbacks); return isSupported; } static ma_bool32 ma_does_AudioObject_support_playback(ma_context* pContext, AudioObjectID deviceObjectID) { return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeOutput); } static ma_bool32 ma_does_AudioObject_support_capture(ma_context* pContext, AudioObjectID deviceObjectID) { return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeInput); } static ma_result ma_get_AudioObject_stream_descriptions(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pDescriptionCount, AudioStreamRangedDescription** ppDescriptions) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioStreamRangedDescription* pDescriptions; MA_ASSERT(pContext != NULL); MA_ASSERT(pDescriptionCount != NULL); MA_ASSERT(ppDescriptions != NULL); /* TODO: Experiment with kAudioStreamPropertyAvailablePhysicalFormats instead of (or in addition to) kAudioStreamPropertyAvailableVirtualFormats. My MacBook Pro uses s24/32 format, however, which miniaudio does not currently support. */ propAddress.mSelector = kAudioStreamPropertyAvailableVirtualFormats; /*kAudioStreamPropertyAvailablePhysicalFormats;*/ propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pDescriptions = (AudioStreamRangedDescription*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pDescriptions == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pDescriptions); if (status != noErr) { ma_free(pDescriptions, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pDescriptionCount = dataSize / sizeof(*pDescriptions); *ppDescriptions = pDescriptions; return MA_SUCCESS; } static ma_result ma_get_AudioObject_channel_layout(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, AudioChannelLayout** ppChannelLayout) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioChannelLayout* pChannelLayout; MA_ASSERT(pContext != NULL); MA_ASSERT(ppChannelLayout != NULL); *ppChannelLayout = NULL; /* Safety. */ propAddress.mSelector = kAudioDevicePropertyPreferredChannelLayout; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pChannelLayout = (AudioChannelLayout*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pChannelLayout == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pChannelLayout); if (status != noErr) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *ppChannelLayout = pChannelLayout; return MA_SUCCESS; } static ma_result ma_get_AudioObject_channel_count(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pChannelCount) { AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pChannelCount != NULL); *pChannelCount = 0; /* Safety. */ result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout); if (result != MA_SUCCESS) { return result; } if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) { *pChannelCount = pChannelLayout->mNumberChannelDescriptions; } else if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) { *pChannelCount = ma_count_set_bits(pChannelLayout->mChannelBitmap); } else { *pChannelCount = AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag); } ma_free(pChannelLayout, &pContext->allocationCallbacks); return MA_SUCCESS; } #if 0 static ma_result ma_get_AudioObject_channel_map(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap) { AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout); if (result != MA_SUCCESS) { return result; /* Rather than always failing here, would it be more robust to simply assume a default? */ } result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } #endif static ma_result ma_get_AudioObject_sample_rates(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pSampleRateRangesCount, AudioValueRange** ppSampleRateRanges) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioValueRange* pSampleRateRanges; MA_ASSERT(pContext != NULL); MA_ASSERT(pSampleRateRangesCount != NULL); MA_ASSERT(ppSampleRateRanges != NULL); /* Safety. */ *pSampleRateRangesCount = 0; *ppSampleRateRanges = NULL; propAddress.mSelector = kAudioDevicePropertyAvailableNominalSampleRates; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pSampleRateRanges = (AudioValueRange*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pSampleRateRanges == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pSampleRateRanges); if (status != noErr) { ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pSampleRateRangesCount = dataSize / sizeof(*pSampleRateRanges); *ppSampleRateRanges = pSampleRateRanges; return MA_SUCCESS; } #if 0 static ma_result ma_get_AudioObject_get_closest_sample_rate(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 sampleRateIn, ma_uint32* pSampleRateOut) { UInt32 sampleRateRangeCount; AudioValueRange* pSampleRateRanges; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pSampleRateOut != NULL); *pSampleRateOut = 0; /* Safety. */ result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges); if (result != MA_SUCCESS) { return result; } if (sampleRateRangeCount == 0) { ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_ERROR; /* Should never hit this case should we? */ } if (sampleRateIn == 0) { /* Search in order of miniaudio's preferred priority. */ UInt32 iMALSampleRate; for (iMALSampleRate = 0; iMALSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iMALSampleRate) { ma_uint32 malSampleRate = g_maStandardSampleRatePriorities[iMALSampleRate]; UInt32 iCASampleRate; for (iCASampleRate = 0; iCASampleRate < sampleRateRangeCount; ++iCASampleRate) { AudioValueRange caSampleRate = pSampleRateRanges[iCASampleRate]; if (caSampleRate.mMinimum <= malSampleRate && caSampleRate.mMaximum >= malSampleRate) { *pSampleRateOut = malSampleRate; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } } } /* If we get here it means none of miniaudio's standard sample rates matched any of the supported sample rates from the device. In this case we just fall back to the first one reported by Core Audio. */ MA_ASSERT(sampleRateRangeCount > 0); *pSampleRateOut = pSampleRateRanges[0].mMinimum; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } else { /* Find the closest match to this sample rate. */ UInt32 currentAbsoluteDifference = INT32_MAX; UInt32 iCurrentClosestRange = (UInt32)-1; UInt32 iRange; for (iRange = 0; iRange < sampleRateRangeCount; ++iRange) { if (pSampleRateRanges[iRange].mMinimum <= sampleRateIn && pSampleRateRanges[iRange].mMaximum >= sampleRateIn) { *pSampleRateOut = sampleRateIn; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } else { UInt32 absoluteDifference; if (pSampleRateRanges[iRange].mMinimum > sampleRateIn) { absoluteDifference = pSampleRateRanges[iRange].mMinimum - sampleRateIn; } else { absoluteDifference = sampleRateIn - pSampleRateRanges[iRange].mMaximum; } if (currentAbsoluteDifference > absoluteDifference) { currentAbsoluteDifference = absoluteDifference; iCurrentClosestRange = iRange; } } } MA_ASSERT(iCurrentClosestRange != (UInt32)-1); *pSampleRateOut = pSampleRateRanges[iCurrentClosestRange].mMinimum; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } /* Should never get here, but it would mean we weren't able to find any suitable sample rates. */ /*ma_free(pSampleRateRanges, &pContext->allocationCallbacks);*/ /*return MA_ERROR;*/ } #endif static ma_result ma_get_AudioObject_closest_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 bufferSizeInFramesIn, ma_uint32* pBufferSizeInFramesOut) { AudioObjectPropertyAddress propAddress; AudioValueRange bufferSizeRange; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); MA_ASSERT(pBufferSizeInFramesOut != NULL); *pBufferSizeInFramesOut = 0; /* Safety. */ propAddress.mSelector = kAudioDevicePropertyBufferFrameSizeRange; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(bufferSizeRange); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &bufferSizeRange); if (status != noErr) { return ma_result_from_OSStatus(status); } /* This is just a clamp. */ if (bufferSizeInFramesIn < bufferSizeRange.mMinimum) { *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMinimum; } else if (bufferSizeInFramesIn > bufferSizeRange.mMaximum) { *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMaximum; } else { *pBufferSizeInFramesOut = bufferSizeInFramesIn; } return MA_SUCCESS; } static ma_result ma_set_AudioObject_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pPeriodSizeInOut) { ma_result result; ma_uint32 chosenBufferSizeInFrames; AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_closest_buffer_size_in_frames(pContext, deviceObjectID, deviceType, *pPeriodSizeInOut, &chosenBufferSizeInFrames); if (result != MA_SUCCESS) { return result; } /* Try setting the size of the buffer... If this fails we just use whatever is currently set. */ propAddress.mSelector = kAudioDevicePropertyBufferFrameSize; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(chosenBufferSizeInFrames), &chosenBufferSizeInFrames); /* Get the actual size of the buffer. */ dataSize = sizeof(*pPeriodSizeInOut); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &chosenBufferSizeInFrames); if (status != noErr) { return ma_result_from_OSStatus(status); } *pPeriodSizeInOut = chosenBufferSizeInFrames; return MA_SUCCESS; } static ma_result ma_find_default_AudioObjectID(ma_context* pContext, ma_device_type deviceType, AudioObjectID* pDeviceObjectID) { AudioObjectPropertyAddress propAddressDefaultDevice; UInt32 defaultDeviceObjectIDSize = sizeof(AudioObjectID); AudioObjectID defaultDeviceObjectID; OSStatus status; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceObjectID != NULL); /* Safety. */ *pDeviceObjectID = 0; propAddressDefaultDevice.mScope = kAudioObjectPropertyScopeGlobal; propAddressDefaultDevice.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; if (deviceType == ma_device_type_playback) { propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultOutputDevice; } else { propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultInputDevice; } defaultDeviceObjectIDSize = sizeof(AudioObjectID); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDefaultDevice, 0, NULL, &defaultDeviceObjectIDSize, &defaultDeviceObjectID); if (status == noErr) { *pDeviceObjectID = defaultDeviceObjectID; return MA_SUCCESS; } /* If we get here it means we couldn't find the device. */ return MA_NO_DEVICE; } static ma_result ma_find_AudioObjectID(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, AudioObjectID* pDeviceObjectID) { MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceObjectID != NULL); /* Safety. */ *pDeviceObjectID = 0; if (pDeviceID == NULL) { /* Default device. */ return ma_find_default_AudioObjectID(pContext, deviceType, pDeviceObjectID); } else { /* Explicit device. */ UInt32 deviceCount; AudioObjectID* pDeviceObjectIDs; ma_result result; UInt32 iDevice; result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs); if (result != MA_SUCCESS) { return result; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice]; char uid[256]; if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(uid), uid) != MA_SUCCESS) { continue; } if (deviceType == ma_device_type_playback) { if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) { if (strcmp(uid, pDeviceID->coreaudio) == 0) { *pDeviceObjectID = deviceObjectID; ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return MA_SUCCESS; } } } else { if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) { if (strcmp(uid, pDeviceID->coreaudio) == 0) { *pDeviceObjectID = deviceObjectID; ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return MA_SUCCESS; } } } } ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); } /* If we get here it means we couldn't find the device. */ return MA_NO_DEVICE; } static ma_result ma_find_best_format__coreaudio(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const AudioStreamBasicDescription* pOrigFormat, AudioStreamBasicDescription* pFormat) { UInt32 deviceFormatDescriptionCount; AudioStreamRangedDescription* pDeviceFormatDescriptions; ma_result result; ma_uint32 desiredSampleRate; ma_uint32 desiredChannelCount; ma_format desiredFormat; AudioStreamBasicDescription bestDeviceFormatSoFar; ma_bool32 hasSupportedFormat; UInt32 iFormat; result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &deviceFormatDescriptionCount, &pDeviceFormatDescriptions); if (result != MA_SUCCESS) { return result; } desiredSampleRate = sampleRate; if (desiredSampleRate == 0) { desiredSampleRate = (ma_uint32)pOrigFormat->mSampleRate; } desiredChannelCount = channels; if (desiredChannelCount == 0) { desiredChannelCount = pOrigFormat->mChannelsPerFrame; } desiredFormat = format; if (desiredFormat == ma_format_unknown) { result = ma_format_from_AudioStreamBasicDescription(pOrigFormat, &desiredFormat); if (result != MA_SUCCESS || desiredFormat == ma_format_unknown) { desiredFormat = g_maFormatPriorities[0]; } } /* If we get here it means we don't have an exact match to what the client is asking for. We'll need to find the closest one. The next loop will check for formats that have the same sample rate to what we're asking for. If there is, we prefer that one in all cases. */ MA_ZERO_OBJECT(&bestDeviceFormatSoFar); hasSupportedFormat = MA_FALSE; for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) { ma_format formatFromDescription; ma_result formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &formatFromDescription); if (formatResult == MA_SUCCESS && formatFromDescription != ma_format_unknown) { hasSupportedFormat = MA_TRUE; bestDeviceFormatSoFar = pDeviceFormatDescriptions[iFormat].mFormat; break; } } if (!hasSupportedFormat) { ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks); return MA_FORMAT_NOT_SUPPORTED; } for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) { AudioStreamBasicDescription thisDeviceFormat = pDeviceFormatDescriptions[iFormat].mFormat; ma_format thisSampleFormat; ma_result formatResult; ma_format bestSampleFormatSoFar; /* If the format is not supported by miniaudio we need to skip this one entirely. */ formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &thisSampleFormat); if (formatResult != MA_SUCCESS || thisSampleFormat == ma_format_unknown) { continue; /* The format is not supported by miniaudio. Skip. */ } ma_format_from_AudioStreamBasicDescription(&bestDeviceFormatSoFar, &bestSampleFormatSoFar); /* Getting here means the format is supported by miniaudio which makes this format a candidate. */ if (thisDeviceFormat.mSampleRate != desiredSampleRate) { /* The sample rate does not match, but this format could still be usable, although it's a very low priority. If the best format so far has an equal sample rate we can just ignore this one. */ if (bestDeviceFormatSoFar.mSampleRate == desiredSampleRate) { continue; /* The best sample rate so far has the same sample rate as what we requested which means it's still the best so far. Skip this format. */ } else { /* In this case, neither the best format so far nor this one have the same sample rate. Check the channel count next. */ if (thisDeviceFormat.mChannelsPerFrame != desiredChannelCount) { /* This format has a different sample rate _and_ a different channel count. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { continue; /* No change to the best format. */ } else { /* Both this format and the best so far have different sample rates and different channel counts. Whichever has the best format is the new best. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format. */ } } } else { /* This format has a different sample rate but the desired channel count. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { /* Both this format and the best so far have the desired channel count. Whichever has the best format is the new best. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } else { /* This format has the desired channel count, but the best so far does not. We have a new best. */ bestDeviceFormatSoFar = thisDeviceFormat; continue; } } } } else { /* The sample rates match which makes this format a very high priority contender. If the best format so far has a different sample rate it needs to be replaced with this one. */ if (bestDeviceFormatSoFar.mSampleRate != desiredSampleRate) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { /* In this case both this format and the best format so far have the same sample rate. Check the channel count next. */ if (thisDeviceFormat.mChannelsPerFrame == desiredChannelCount) { /* In this case this format has the same channel count as what the client is requesting. If the best format so far has a different count, this one becomes the new best. */ if (bestDeviceFormatSoFar.mChannelsPerFrame != desiredChannelCount) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { /* In this case both this format and the best so far have the ideal sample rate and channel count. Check the format. */ if (thisSampleFormat == desiredFormat) { bestDeviceFormatSoFar = thisDeviceFormat; break; /* Found the exact match. */ } else { /* The formats are different. The new best format is the one with the highest priority format according to miniaudio. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } } } else { /* In this case the channel count is different to what the client has requested. If the best so far has the same channel count as the requested count then it remains the best. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { continue; } else { /* This is the case where both have the same sample rate (good) but different channel counts. Right now both have about the same priority, but we need to compare the format now. */ if (thisSampleFormat == bestSampleFormatSoFar) { if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } } } } } } *pFormat = bestDeviceFormatSoFar; ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks); return MA_SUCCESS; } static ma_result ma_get_AudioUnit_channel_map(ma_context* pContext, AudioUnit audioUnit, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap) { AudioUnitScope deviceScope; AudioUnitElement deviceBus; UInt32 channelLayoutSize; OSStatus status; AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); if (deviceType == ma_device_type_playback) { deviceScope = kAudioUnitScope_Input; deviceBus = MA_COREAUDIO_OUTPUT_BUS; } else { deviceScope = kAudioUnitScope_Output; deviceBus = MA_COREAUDIO_INPUT_BUS; } status = ((ma_AudioUnitGetPropertyInfo_proc)pContext->coreaudio.AudioUnitGetPropertyInfo)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, &channelLayoutSize, NULL); if (status != noErr) { return ma_result_from_OSStatus(status); } pChannelLayout = (AudioChannelLayout*)ma_malloc(channelLayoutSize, &pContext->allocationCallbacks); if (pChannelLayout == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, pChannelLayout, &channelLayoutSize); if (status != noErr) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } ma_free(pChannelLayout, &pContext->allocationCallbacks); return MA_SUCCESS; } #endif /* MA_APPLE_DESKTOP */ #if !defined(MA_APPLE_DESKTOP) static void ma_AVAudioSessionPortDescription_to_device_info(AVAudioSessionPortDescription* pPortDesc, ma_device_info* pInfo) { MA_ZERO_OBJECT(pInfo); ma_strncpy_s(pInfo->name, sizeof(pInfo->name), [pPortDesc.portName UTF8String], (size_t)-1); ma_strncpy_s(pInfo->id.coreaudio, sizeof(pInfo->id.coreaudio), [pPortDesc.UID UTF8String], (size_t)-1); } #endif static ma_result ma_context_enumerate_devices__coreaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { #if defined(MA_APPLE_DESKTOP) UInt32 deviceCount; AudioObjectID* pDeviceObjectIDs; AudioObjectID defaultDeviceObjectIDPlayback; AudioObjectID defaultDeviceObjectIDCapture; ma_result result; UInt32 iDevice; ma_find_default_AudioObjectID(pContext, ma_device_type_playback, &defaultDeviceObjectIDPlayback); /* OK if this fails. */ ma_find_default_AudioObjectID(pContext, ma_device_type_capture, &defaultDeviceObjectIDCapture); /* OK if this fails. */ result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs); if (result != MA_SUCCESS) { return result; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice]; ma_device_info info; MA_ZERO_OBJECT(&info); if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(info.id.coreaudio), info.id.coreaudio) != MA_SUCCESS) { continue; } if (ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(info.name), info.name) != MA_SUCCESS) { continue; } if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) { if (deviceObjectID == defaultDeviceObjectIDPlayback) { info.isDefault = MA_TRUE; } if (!callback(pContext, ma_device_type_playback, &info, pUserData)) { break; } } if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) { if (deviceObjectID == defaultDeviceObjectIDCapture) { info.isDefault = MA_TRUE; } if (!callback(pContext, ma_device_type_capture, &info, pUserData)) { break; } } } ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); #else ma_device_info info; NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs]; for (AVAudioSessionPortDescription* pPortDesc in pOutputs) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info); if (!callback(pContext, ma_device_type_playback, &info, pUserData)) { return MA_SUCCESS; } } for (AVAudioSessionPortDescription* pPortDesc in pInputs) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info); if (!callback(pContext, ma_device_type_capture, &info, pUserData)) { return MA_SUCCESS; } } #endif return MA_SUCCESS; } static ma_result ma_context_get_device_info__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; MA_ASSERT(pContext != NULL); #if defined(MA_APPLE_DESKTOP) /* Desktop */ { AudioObjectID deviceObjectID; AudioObjectID defaultDeviceObjectID; UInt32 streamDescriptionCount; AudioStreamRangedDescription* pStreamDescriptions; UInt32 iStreamDescription; UInt32 sampleRateRangeCount; AudioValueRange* pSampleRateRanges; ma_find_default_AudioObjectID(pContext, deviceType, &defaultDeviceObjectID); /* OK if this fails. */ result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID); if (result != MA_SUCCESS) { return result; } result = ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(pDeviceInfo->id.coreaudio), pDeviceInfo->id.coreaudio); if (result != MA_SUCCESS) { return result; } result = ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pDeviceInfo->name), pDeviceInfo->name); if (result != MA_SUCCESS) { return result; } if (deviceObjectID == defaultDeviceObjectID) { pDeviceInfo->isDefault = MA_TRUE; } /* There could be a large number of permutations here. Fortunately there is only a single channel count being reported which reduces this quite a bit. For sample rates we're only reporting those that are one of miniaudio's recognized "standard" rates. If there are still more formats than can fit into our fixed sized array we'll just need to truncate them. This is unlikely and will probably only happen if some driver performs software data conversion and therefore reports every possible format and sample rate. */ pDeviceInfo->nativeDataFormatCount = 0; /* Formats. */ { ma_format uniqueFormats[ma_format_count]; ma_uint32 uniqueFormatCount = 0; ma_uint32 channels; /* Channels. */ result = ma_get_AudioObject_channel_count(pContext, deviceObjectID, deviceType, &channels); if (result != MA_SUCCESS) { return result; } /* Formats. */ result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &streamDescriptionCount, &pStreamDescriptions); if (result != MA_SUCCESS) { return result; } for (iStreamDescription = 0; iStreamDescription < streamDescriptionCount; ++iStreamDescription) { ma_format format; ma_bool32 hasFormatBeenHandled = MA_FALSE; ma_uint32 iOutputFormat; ma_uint32 iSampleRate; result = ma_format_from_AudioStreamBasicDescription(&pStreamDescriptions[iStreamDescription].mFormat, &format); if (result != MA_SUCCESS) { continue; } MA_ASSERT(format != ma_format_unknown); /* Make sure the format isn't already in the output list. */ for (iOutputFormat = 0; iOutputFormat < uniqueFormatCount; ++iOutputFormat) { if (uniqueFormats[iOutputFormat] == format) { hasFormatBeenHandled = MA_TRUE; break; } } /* If we've already handled this format just skip it. */ if (hasFormatBeenHandled) { continue; } uniqueFormats[uniqueFormatCount] = format; uniqueFormatCount += 1; /* Sample Rates */ result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges); if (result != MA_SUCCESS) { return result; } /* Annoyingly Core Audio reports a sample rate range. We just get all the standard rates that are between this range. */ for (iSampleRate = 0; iSampleRate < sampleRateRangeCount; ++iSampleRate) { ma_uint32 iStandardSampleRate; for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate]; if (standardSampleRate >= pSampleRateRanges[iSampleRate].mMinimum && standardSampleRate <= pSampleRateRanges[iSampleRate].mMaximum) { /* We have a new data format. Add it to the list. */ pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = standardSampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) { break; /* No more room for any more formats. */ } } } } ma_free(pSampleRateRanges, &pContext->allocationCallbacks); if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) { break; /* No more room for any more formats. */ } } ma_free(pStreamDescriptions, &pContext->allocationCallbacks); } } #else /* Mobile */ { AudioComponentDescription desc; AudioComponent component; AudioUnit audioUnit; OSStatus status; AudioUnitScope formatScope; AudioUnitElement formatElement; AudioStreamBasicDescription bestFormat; UInt32 propSize; /* We want to ensure we use a consistent device name to device enumeration. */ if (pDeviceID != NULL && pDeviceID->coreaudio[0] != '\0') { ma_bool32 found = MA_FALSE; if (deviceType == ma_device_type_playback) { NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs]; for (AVAudioSessionPortDescription* pPortDesc in pOutputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo); found = MA_TRUE; break; } } } else { NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; for (AVAudioSessionPortDescription* pPortDesc in pInputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo); found = MA_TRUE; break; } } } if (!found) { return MA_DOES_NOT_EXIST; } } else { if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } } /* Retrieving device information is more annoying on mobile than desktop. For simplicity I'm locking this down to whatever format is reported on a temporary I/O unit. The problem, however, is that this doesn't return a value for the sample rate which we need to retrieve from the AVAudioSession shared instance. */ desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_RemoteIO; desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc); if (component == NULL) { return MA_FAILED_TO_INIT_BACKEND; } status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)(component, &audioUnit); if (status != noErr) { return ma_result_from_OSStatus(status); } formatScope = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output; formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS; propSize = sizeof(bestFormat); status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, &propSize); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit); return ma_result_from_OSStatus(status); } ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit); audioUnit = NULL; /* Only a single format is being reported for iOS. */ pDeviceInfo->nativeDataFormatCount = 1; result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pDeviceInfo->nativeDataFormats[0].format); if (result != MA_SUCCESS) { return result; } pDeviceInfo->nativeDataFormats[0].channels = bestFormat.mChannelsPerFrame; /* It looks like Apple are wanting to push the whole AVAudioSession thing. Thus, we need to use that to determine device settings. To do this we just get the shared instance and inspect. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); pDeviceInfo->nativeDataFormats[0].sampleRate = (ma_uint32)pAudioSession.sampleRate; } } #endif (void)pDeviceInfo; /* Unused. */ return MA_SUCCESS; } static AudioBufferList* ma_allocate_AudioBufferList__coreaudio(ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout, const ma_allocation_callbacks* pAllocationCallbacks) { AudioBufferList* pBufferList; UInt32 audioBufferSizeInBytes; size_t allocationSize; MA_ASSERT(sizeInFrames > 0); MA_ASSERT(format != ma_format_unknown); MA_ASSERT(channels > 0); allocationSize = sizeof(AudioBufferList) - sizeof(AudioBuffer); /* Subtract sizeof(AudioBuffer) because that part is dynamically sized. */ if (layout == ma_stream_layout_interleaved) { /* Interleaved case. This is the simple case because we just have one buffer. */ allocationSize += sizeof(AudioBuffer) * 1; } else { /* Non-interleaved case. This is the more complex case because there's more than one buffer. */ allocationSize += sizeof(AudioBuffer) * channels; } allocationSize += sizeInFrames * ma_get_bytes_per_frame(format, channels); pBufferList = (AudioBufferList*)ma_malloc(allocationSize, pAllocationCallbacks); if (pBufferList == NULL) { return NULL; } audioBufferSizeInBytes = (UInt32)(sizeInFrames * ma_get_bytes_per_sample(format)); if (layout == ma_stream_layout_interleaved) { pBufferList->mNumberBuffers = 1; pBufferList->mBuffers[0].mNumberChannels = channels; pBufferList->mBuffers[0].mDataByteSize = audioBufferSizeInBytes * channels; pBufferList->mBuffers[0].mData = (ma_uint8*)pBufferList + sizeof(AudioBufferList); } else { ma_uint32 iBuffer; pBufferList->mNumberBuffers = channels; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) { pBufferList->mBuffers[iBuffer].mNumberChannels = 1; pBufferList->mBuffers[iBuffer].mDataByteSize = audioBufferSizeInBytes; pBufferList->mBuffers[iBuffer].mData = (ma_uint8*)pBufferList + ((sizeof(AudioBufferList) - sizeof(AudioBuffer)) + (sizeof(AudioBuffer) * channels)) + (audioBufferSizeInBytes * iBuffer); } } return pBufferList; } static ma_result ma_device_realloc_AudioBufferList__coreaudio(ma_device* pDevice, ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout) { MA_ASSERT(pDevice != NULL); MA_ASSERT(format != ma_format_unknown); MA_ASSERT(channels > 0); /* Only resize the buffer if necessary. */ if (pDevice->coreaudio.audioBufferCapInFrames < sizeInFrames) { AudioBufferList* pNewAudioBufferList; pNewAudioBufferList = ma_allocate_AudioBufferList__coreaudio(sizeInFrames, format, channels, layout, &pDevice->pContext->allocationCallbacks); if (pNewAudioBufferList == NULL) { return MA_OUT_OF_MEMORY; } /* At this point we'll have a new AudioBufferList and we can free the old one. */ ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); pDevice->coreaudio.pAudioBufferList = pNewAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = sizeInFrames; } /* Getting here means the capacity of the audio is fine. */ return MA_SUCCESS; } static OSStatus ma_on_output__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pBufferList) { ma_device* pDevice = (ma_device*)pUserData; ma_stream_layout layout; MA_ASSERT(pDevice != NULL); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "INFO: Output Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\n", (int)busNumber, (int)frameCount, (int)pBufferList->mNumberBuffers);*/ /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */ layout = ma_stream_layout_interleaved; if (pBufferList->mBuffers[0].mNumberChannels != pDevice->playback.internalChannels) { layout = ma_stream_layout_deinterleaved; } if (layout == ma_stream_layout_interleaved) { /* For now we can assume everything is interleaved. */ UInt32 iBuffer; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) { if (pBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->playback.internalChannels) { ma_uint32 frameCountForThisBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); if (frameCountForThisBuffer > 0) { ma_device_handle_backend_data_callback(pDevice, pBufferList->mBuffers[iBuffer].mData, NULL, frameCountForThisBuffer); } /*a_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/ } else { /* This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams. We just output silence here. */ MA_ZERO_MEMORY(pBufferList->mBuffers[iBuffer].mData, pBufferList->mBuffers[iBuffer].mDataByteSize); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/ } } } else { /* This is the deinterleaved case. We need to update each buffer in groups of internalChannels. This assumes each buffer is the same size. */ MA_ASSERT(pDevice->playback.internalChannels <= MA_MAX_CHANNELS); /* This should have been validated at initialization time. */ /* For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something very strange has happened and we're not going to support it. */ if ((pBufferList->mNumberBuffers % pDevice->playback.internalChannels) == 0) { ma_uint8 tempBuffer[4096]; UInt32 iBuffer; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; iBuffer += pDevice->playback.internalChannels) { ma_uint32 frameCountPerBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_sample(pDevice->playback.internalFormat); ma_uint32 framesRemaining = frameCountPerBuffer; while (framesRemaining > 0) { void* ppDeinterleavedBuffers[MA_MAX_CHANNELS]; ma_uint32 iChannel; ma_uint32 framesToRead = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); if (framesToRead > framesRemaining) { framesToRead = framesRemaining; } ma_device_handle_backend_data_callback(pDevice, tempBuffer, NULL, framesToRead); for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) { ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pBufferList->mBuffers[iBuffer+iChannel].mData, (frameCountPerBuffer - framesRemaining) * ma_get_bytes_per_sample(pDevice->playback.internalFormat)); } ma_deinterleave_pcm_frames(pDevice->playback.internalFormat, pDevice->playback.internalChannels, framesToRead, tempBuffer, ppDeinterleavedBuffers); framesRemaining -= framesToRead; } } } } (void)pActionFlags; (void)pTimeStamp; (void)busNumber; (void)frameCount; return noErr; } static OSStatus ma_on_input__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pUnusedBufferList) { ma_device* pDevice = (ma_device*)pUserData; AudioBufferList* pRenderedBufferList; ma_result result; ma_stream_layout layout; ma_uint32 iBuffer; OSStatus status; MA_ASSERT(pDevice != NULL); pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList; MA_ASSERT(pRenderedBufferList); /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */ layout = ma_stream_layout_interleaved; if (pRenderedBufferList->mBuffers[0].mNumberChannels != pDevice->capture.internalChannels) { layout = ma_stream_layout_deinterleaved; } /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "INFO: Input Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\n", (int)busNumber, (int)frameCount, (int)pRenderedBufferList->mNumberBuffers);*/ /* There has been a situation reported where frame count passed into this function is greater than the capacity of our capture buffer. There doesn't seem to be a reliable way to determine what the maximum frame count will be, so we need to instead resort to dynamically reallocating our buffer to ensure it's large enough to capture the number of frames requested by this callback. */ result = ma_device_realloc_AudioBufferList__coreaudio(pDevice, frameCount, pDevice->capture.internalFormat, pDevice->capture.internalChannels, layout); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "Failed to allocate AudioBufferList for capture.\n"); return noErr; } pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList; MA_ASSERT(pRenderedBufferList); /* When you call AudioUnitRender(), Core Audio tries to be helpful by setting the mDataByteSize to the number of bytes that were actually rendered. The problem with this is that the next call can fail with -50 due to the size no longer being set to the capacity of the buffer, but instead the size in bytes of the previous render. This will cause a problem when a future call to this callback specifies a larger number of frames. To work around this we need to explicitly set the size of each buffer to their respective size in bytes. */ for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) { pRenderedBufferList->mBuffers[iBuffer].mDataByteSize = pDevice->coreaudio.audioBufferCapInFrames * ma_get_bytes_per_sample(pDevice->capture.internalFormat) * pRenderedBufferList->mBuffers[iBuffer].mNumberChannels; /*printf("DEBUG: nDataByteSize = %d\n", (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } status = ((ma_AudioUnitRender_proc)pDevice->pContext->coreaudio.AudioUnitRender)((AudioUnit)pDevice->coreaudio.audioUnitCapture, pActionFlags, pTimeStamp, busNumber, frameCount, pRenderedBufferList); if (status != noErr) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "ERROR: AudioUnitRender() failed with %d.\n", (int)status); return status; } if (layout == ma_stream_layout_interleaved) { for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) { if (pRenderedBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->capture.internalChannels) { ma_device_handle_backend_data_callback(pDevice, NULL, pRenderedBufferList->mBuffers[iBuffer].mData, frameCount); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " mDataByteSize=%d.\n", (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } else { /* This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams. */ ma_uint8 silentBuffer[4096]; ma_uint32 framesRemaining; MA_ZERO_MEMORY(silentBuffer, sizeof(silentBuffer)); framesRemaining = frameCount; while (framesRemaining > 0) { ma_uint32 framesToSend = sizeof(silentBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); if (framesToSend > framesRemaining) { framesToSend = framesRemaining; } ma_device_handle_backend_data_callback(pDevice, NULL, silentBuffer, framesToSend); framesRemaining -= framesToSend; } /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pRenderedBufferList->mBuffers[iBuffer].mNumberChannels, (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } } } else { /* This is the deinterleaved case. We need to interleave the audio data before sending it to the client. This assumes each buffer is the same size. */ MA_ASSERT(pDevice->capture.internalChannels <= MA_MAX_CHANNELS); /* This should have been validated at initialization time. */ /* For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something very strange has happened and we're not going to support it. */ if ((pRenderedBufferList->mNumberBuffers % pDevice->capture.internalChannels) == 0) { ma_uint8 tempBuffer[4096]; for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; iBuffer += pDevice->capture.internalChannels) { ma_uint32 framesRemaining = frameCount; while (framesRemaining > 0) { void* ppDeinterleavedBuffers[MA_MAX_CHANNELS]; ma_uint32 iChannel; ma_uint32 framesToSend = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); if (framesToSend > framesRemaining) { framesToSend = framesRemaining; } for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) { ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pRenderedBufferList->mBuffers[iBuffer+iChannel].mData, (frameCount - framesRemaining) * ma_get_bytes_per_sample(pDevice->capture.internalFormat)); } ma_interleave_pcm_frames(pDevice->capture.internalFormat, pDevice->capture.internalChannels, framesToSend, (const void**)ppDeinterleavedBuffers, tempBuffer); ma_device_handle_backend_data_callback(pDevice, NULL, tempBuffer, framesToSend); framesRemaining -= framesToSend; } } } } (void)pActionFlags; (void)pTimeStamp; (void)busNumber; (void)frameCount; (void)pUnusedBufferList; return noErr; } static void on_start_stop__coreaudio(void* pUserData, AudioUnit audioUnit, AudioUnitPropertyID propertyID, AudioUnitScope scope, AudioUnitElement element) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); /* Don't do anything if it looks like we're just reinitializing due to a device switch. */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isSwitchingCaptureDevice)) { return; } /* There's been a report of a deadlock here when triggered by ma_device_uninit(). It looks like AudioUnitGetProprty (called below) and AudioComponentInstanceDispose (called in ma_device_uninit) can try waiting on the same lock. I'm going to try working around this by not calling any Core Audio APIs in the callback when the device has been stopped or uninitialized. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized || ma_device_get_state(pDevice) == ma_device_state_stopping || ma_device_get_state(pDevice) == ma_device_state_stopped) { ma_device__on_notification_stopped(pDevice); } else { UInt32 isRunning; UInt32 isRunningSize = sizeof(isRunning); OSStatus status = ((ma_AudioUnitGetProperty_proc)pDevice->pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioOutputUnitProperty_IsRunning, scope, element, &isRunning, &isRunningSize); if (status != noErr) { goto done; /* Don't really know what to do in this case... just ignore it, I suppose... */ } if (!isRunning) { /* The stop event is a bit annoying in Core Audio because it will be called when we automatically switch the default device. Some scenarios to consider: 1) When the device is unplugged, this will be called _before_ the default device change notification. 2) When the device is changed via the default device change notification, this will be called _after_ the switch. For case #1, we just check if there's a new default device available. If so, we just ignore the stop event. For case #2 we check a flag. */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isDefaultPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isDefaultCaptureDevice)) { /* It looks like the device is switching through an external event, such as the user unplugging the device or changing the default device via the operating system's sound settings. If we're re-initializing the device, we just terminate because we want the stopping of the device to be seamless to the client (we don't want them receiving the stopped event and thinking that the device has stopped when it hasn't!). */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isSwitchingCaptureDevice)) { goto done; } /* Getting here means the device is not reinitializing which means it may have been unplugged. From what I can see, it looks like Core Audio will try switching to the new default device seamlessly. We need to somehow find a way to determine whether or not Core Audio will most likely be successful in switching to the new device. TODO: Try to predict if Core Audio will switch devices. If not, the stopped callback needs to be posted. */ goto done; } /* Getting here means we need to stop the device. */ ma_device__on_notification_stopped(pDevice); } } (void)propertyID; /* Unused. */ done: /* Always signal the stop event. It's possible for the "else" case to get hit which can happen during an interruption. */ ma_event_signal(&pDevice->coreaudio.stopEvent); } #if defined(MA_APPLE_DESKTOP) static ma_spinlock g_DeviceTrackingInitLock_CoreAudio = 0; /* A spinlock for mutal exclusion of the init/uninit of the global tracking data. Initialization to 0 is what we need. */ static ma_uint32 g_DeviceTrackingInitCounter_CoreAudio = 0; static ma_mutex g_DeviceTrackingMutex_CoreAudio; static ma_device** g_ppTrackedDevices_CoreAudio = NULL; static ma_uint32 g_TrackedDeviceCap_CoreAudio = 0; static ma_uint32 g_TrackedDeviceCount_CoreAudio = 0; static OSStatus ma_default_device_changed__coreaudio(AudioObjectID objectID, UInt32 addressCount, const AudioObjectPropertyAddress* pAddresses, void* pUserData) { ma_device_type deviceType; /* Not sure if I really need to check this, but it makes me feel better. */ if (addressCount == 0) { return noErr; } if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultOutputDevice) { deviceType = ma_device_type_playback; } else if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultInputDevice) { deviceType = ma_device_type_capture; } else { return noErr; /* Should never hit this. */ } ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { ma_uint32 iDevice; for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) { ma_result reinitResult; ma_device* pDevice; pDevice = g_ppTrackedDevices_CoreAudio[iDevice]; if (pDevice->type == deviceType || pDevice->type == ma_device_type_duplex) { if (deviceType == ma_device_type_playback) { pDevice->coreaudio.isSwitchingPlaybackDevice = MA_TRUE; reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE); pDevice->coreaudio.isSwitchingPlaybackDevice = MA_FALSE; } else { pDevice->coreaudio.isSwitchingCaptureDevice = MA_TRUE; reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE); pDevice->coreaudio.isSwitchingCaptureDevice = MA_FALSE; } if (reinitResult == MA_SUCCESS) { ma_device__post_init_setup(pDevice, deviceType); /* Restart the device if required. If this fails we need to stop the device entirely. */ if (ma_device_get_state(pDevice) == ma_device_state_started) { OSStatus status; if (deviceType == ma_device_type_playback) { status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } ma_device__set_state(pDevice, ma_device_state_stopped); } } else if (deviceType == ma_device_type_capture) { status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } ma_device__set_state(pDevice, ma_device_state_stopped); } } } ma_device__on_notification_rerouted(pDevice); } } } } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); /* Unused parameters. */ (void)objectID; (void)pUserData; return noErr; } static ma_result ma_context__init_device_tracking__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio); { /* Don't do anything if we've already initialized device tracking. */ if (g_DeviceTrackingInitCounter_CoreAudio == 0) { AudioObjectPropertyAddress propAddress; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; ma_mutex_init(&g_DeviceTrackingMutex_CoreAudio); propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice; ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice; ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); } g_DeviceTrackingInitCounter_CoreAudio += 1; } ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_SUCCESS; } static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio); { if (g_DeviceTrackingInitCounter_CoreAudio > 0) g_DeviceTrackingInitCounter_CoreAudio -= 1; if (g_DeviceTrackingInitCounter_CoreAudio == 0) { AudioObjectPropertyAddress propAddress; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice; ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice; ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); /* At this point there should be no tracked devices. If not there's an error somewhere. */ if (g_ppTrackedDevices_CoreAudio != NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active."); ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_INVALID_OPERATION; } ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio); } } ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_SUCCESS; } static ma_result ma_device__track__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { /* Allocate memory if required. */ if (g_TrackedDeviceCap_CoreAudio <= g_TrackedDeviceCount_CoreAudio) { ma_uint32 newCap; ma_device** ppNewDevices; newCap = g_TrackedDeviceCap_CoreAudio * 2; if (newCap == 0) { newCap = 1; } ppNewDevices = (ma_device**)ma_realloc(g_ppTrackedDevices_CoreAudio, sizeof(*g_ppTrackedDevices_CoreAudio)*newCap, &pDevice->pContext->allocationCallbacks); if (ppNewDevices == NULL) { ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_OUT_OF_MEMORY; } g_ppTrackedDevices_CoreAudio = ppNewDevices; g_TrackedDeviceCap_CoreAudio = newCap; } g_ppTrackedDevices_CoreAudio[g_TrackedDeviceCount_CoreAudio] = pDevice; g_TrackedDeviceCount_CoreAudio += 1; } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_SUCCESS; } static ma_result ma_device__untrack__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { ma_uint32 iDevice; for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) { if (g_ppTrackedDevices_CoreAudio[iDevice] == pDevice) { /* We've found the device. We now need to remove it from the list. */ ma_uint32 jDevice; for (jDevice = iDevice; jDevice < g_TrackedDeviceCount_CoreAudio-1; jDevice += 1) { g_ppTrackedDevices_CoreAudio[jDevice] = g_ppTrackedDevices_CoreAudio[jDevice+1]; } g_TrackedDeviceCount_CoreAudio -= 1; /* If there's nothing else in the list we need to free memory. */ if (g_TrackedDeviceCount_CoreAudio == 0) { ma_free(g_ppTrackedDevices_CoreAudio, &pDevice->pContext->allocationCallbacks); g_ppTrackedDevices_CoreAudio = NULL; g_TrackedDeviceCap_CoreAudio = 0; } break; } } } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_SUCCESS; } #endif #if defined(MA_APPLE_MOBILE) @interface ma_ios_notification_handler:NSObject { ma_device* m_pDevice; } @end @implementation ma_ios_notification_handler -(id)init:(ma_device*)pDevice { self = [super init]; m_pDevice = pDevice; /* For route changes. */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_route_change:) name:AVAudioSessionRouteChangeNotification object:[AVAudioSession sharedInstance]]; /* For interruptions. */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_interruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]]; return self; } -(void)dealloc { [self remove_handler]; #if defined(__has_feature) #if !__has_feature(objc_arc) [super dealloc]; #endif #endif } -(void)remove_handler { [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionRouteChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification object:nil]; } -(void)handle_interruption:(NSNotification*)pNotification { NSInteger type = [[[pNotification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey] integerValue]; switch (type) { case AVAudioSessionInterruptionTypeBegan: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Interruption: AVAudioSessionInterruptionTypeBegan\n"); /* Core Audio will have stopped the internal device automatically, but we need explicitly stop it at a higher level to ensure miniaudio-specific state is updated for consistency. */ ma_device_stop(m_pDevice); /* Fire the notification after the device has been stopped to ensure it's in the correct state when the notification handler is invoked. */ ma_device__on_notification_interruption_began(m_pDevice); } break; case AVAudioSessionInterruptionTypeEnded: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Interruption: AVAudioSessionInterruptionTypeEnded\n"); ma_device__on_notification_interruption_ended(m_pDevice); } break; } } -(void)handle_route_change:(NSNotification*)pNotification { AVAudioSession* pSession = [AVAudioSession sharedInstance]; NSInteger reason = [[[pNotification userInfo] objectForKey:AVAudioSessionRouteChangeReasonKey] integerValue]; switch (reason) { case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOldDeviceUnavailable\n"); } break; case AVAudioSessionRouteChangeReasonNewDeviceAvailable: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNewDeviceAvailable\n"); } break; case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory\n"); } break; case AVAudioSessionRouteChangeReasonWakeFromSleep: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonWakeFromSleep\n"); } break; case AVAudioSessionRouteChangeReasonOverride: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOverride\n"); } break; case AVAudioSessionRouteChangeReasonCategoryChange: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonCategoryChange\n"); } break; case AVAudioSessionRouteChangeReasonUnknown: default: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonUnknown\n"); } break; } ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_DEBUG, "[Core Audio] Changing Route. inputNumberChannels=%d; outputNumberOfChannels=%d\n", (int)pSession.inputNumberOfChannels, (int)pSession.outputNumberOfChannels); /* Let the application know about the route change. */ ma_device__on_notification_rerouted(m_pDevice); } @end #endif static ma_result ma_device_uninit__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_uninitialized); #if defined(MA_APPLE_DESKTOP) /* Make sure we're no longer tracking the device. It doesn't matter if we call this for a non-default device because it'll just gracefully ignore it. */ ma_device__untrack__coreaudio(pDevice); #endif #if defined(MA_APPLE_MOBILE) if (pDevice->coreaudio.pNotificationHandler != NULL) { ma_ios_notification_handler* pNotificationHandler = (MA_BRIDGE_TRANSFER ma_ios_notification_handler*)pDevice->coreaudio.pNotificationHandler; [pNotificationHandler remove_handler]; } #endif if (pDevice->coreaudio.audioUnitCapture != NULL) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } if (pDevice->coreaudio.audioUnitPlayback != NULL) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } typedef struct { ma_bool32 allowNominalSampleRateChange; /* Input. */ ma_format formatIn; ma_uint32 channelsIn; ma_uint32 sampleRateIn; ma_channel channelMapIn[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesIn; ma_uint32 periodSizeInMillisecondsIn; ma_uint32 periodsIn; ma_share_mode shareMode; ma_performance_profile performanceProfile; ma_bool32 registerStopEvent; /* Output. */ #if defined(MA_APPLE_DESKTOP) AudioObjectID deviceObjectID; #endif AudioComponent component; AudioUnit audioUnit; AudioBufferList* pAudioBufferList; /* Only used for input devices. */ ma_format formatOut; ma_uint32 channelsOut; ma_uint32 sampleRateOut; ma_channel channelMapOut[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesOut; ma_uint32 periodsOut; char deviceName[256]; } ma_device_init_internal_data__coreaudio; static ma_result ma_device_init_internal__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__coreaudio* pData, void* pDevice_DoNotReference) /* <-- pDevice is typed as void* intentionally so as to avoid accidentally referencing it. */ { ma_result result = MA_SUCCESS; OSStatus status; UInt32 enableIOFlag; AudioStreamBasicDescription bestFormat; ma_uint32 actualPeriodSizeInFrames; AURenderCallbackStruct callbackInfo; #if defined(MA_APPLE_DESKTOP) AudioObjectID deviceObjectID; #endif /* This API should only be used for a single device type: playback or capture. No full-duplex mode. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } MA_ASSERT(pContext != NULL); MA_ASSERT(deviceType == ma_device_type_playback || deviceType == ma_device_type_capture); #if defined(MA_APPLE_DESKTOP) pData->deviceObjectID = 0; #endif pData->component = NULL; pData->audioUnit = NULL; pData->pAudioBufferList = NULL; #if defined(MA_APPLE_DESKTOP) result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID); if (result != MA_SUCCESS) { return result; } pData->deviceObjectID = deviceObjectID; #endif /* Core audio doesn't really use the notion of a period so we can leave this unmodified, but not too over the top. */ pData->periodsOut = pData->periodsIn; if (pData->periodsOut == 0) { pData->periodsOut = MA_DEFAULT_PERIODS; } if (pData->periodsOut > 16) { pData->periodsOut = 16; } /* Audio unit. */ status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)((AudioComponent)pContext->coreaudio.component, (AudioUnit*)&pData->audioUnit); if (status != noErr) { return ma_result_from_OSStatus(status); } /* The input/output buses need to be explicitly enabled and disabled. We set the flag based on the output unit first, then we just swap it for input. */ enableIOFlag = 1; if (deviceType == ma_device_type_capture) { enableIOFlag = 0; } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &enableIOFlag, sizeof(enableIOFlag)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } enableIOFlag = (enableIOFlag == 0) ? 1 : 0; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &enableIOFlag, sizeof(enableIOFlag)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } /* Set the device to use with this audio unit. This is only used on desktop since we are using defaults on mobile. */ #if defined(MA_APPLE_DESKTOP) status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &deviceObjectID, sizeof(deviceObjectID)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(result); } #else /* For some reason it looks like Apple is only allowing selection of the input device. There does not appear to be any way to change the default output route. I have no idea why this is like this, but for now we'll only be able to configure capture devices. */ if (pDeviceID != NULL) { if (deviceType == ma_device_type_capture) { ma_bool32 found = MA_FALSE; NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; for (AVAudioSessionPortDescription* pPortDesc in pInputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { [[AVAudioSession sharedInstance] setPreferredInput:pPortDesc error:nil]; found = MA_TRUE; break; } } if (found == MA_FALSE) { return MA_DOES_NOT_EXIST; } } } #endif /* Format. This is the hardest part of initialization because there's a few variables to take into account. 1) The format must be supported by the device. 2) The format must be supported miniaudio. 3) There's a priority that miniaudio prefers. Ideally we would like to use a format that's as close to the hardware as possible so we can get as close to a passthrough as possible. The most important property is the sample rate. miniaudio can do format conversion for any sample rate and channel count, but cannot do the same for the sample data format. If the sample data format is not supported by miniaudio it must be ignored completely. On mobile platforms this is a bit different. We just force the use of whatever the audio unit's current format is set to. */ { AudioStreamBasicDescription origFormat; UInt32 origFormatSize = sizeof(origFormat); AudioUnitScope formatScope = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output; AudioUnitElement formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS; if (deviceType == ma_device_type_playback) { status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &origFormat, &origFormatSize); } else { status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &origFormat, &origFormatSize); } if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } #if defined(MA_APPLE_DESKTOP) result = ma_find_best_format__coreaudio(pContext, deviceObjectID, deviceType, pData->formatIn, pData->channelsIn, pData->sampleRateIn, &origFormat, &bestFormat); if (result != MA_SUCCESS) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return result; } /* Technical Note TN2091: Device input using the HAL Output Audio Unit https://developer.apple.com/library/archive/technotes/tn2091/_index.html This documentation says the following: The internal AudioConverter can handle any *simple* conversion. Typically, this means that a client can specify ANY variant of the PCM formats. Consequently, the device's sample rate should match the desired sample rate. If sample rate conversion is needed, it can be accomplished by buffering the input and converting the data on a separate thread with another AudioConverter. The important part here is the mention that it can handle *simple* conversions, which does *not* include sample rate. We therefore want to ensure the sample rate stays consistent. This document is specifically for input, but I'm going to play it safe and apply the same rule to output as well. I have tried going against the documentation by setting the sample rate anyway, but this just results in AudioUnitRender() returning a result code of -10863. I have also tried changing the format directly on the input scope on the input bus, but this just results in `ca_require: IsStreamFormatWritable(inScope, inElement) NotWritable` when trying to set the format. Something that does seem to work, however, has been setting the nominal sample rate on the device object. The problem with this, however, is that it actually changes the sample rate at the operating system level and not just the application. This could be intrusive to the user, however, so I don't think it's wise to make this the default. Instead I'm making this a configuration option. When the `coreaudio.allowNominalSampleRateChange` config option is set to true, changing the sample rate will be allowed. Otherwise it'll be fixed to the current sample rate. To check the system-defined sample rate, run the Audio MIDI Setup program that comes installed on macOS and observe how the sample rate changes as the sample rate is changed by miniaudio. */ if (pData->allowNominalSampleRateChange) { AudioValueRange sampleRateRange; AudioObjectPropertyAddress propAddress; sampleRateRange.mMinimum = bestFormat.mSampleRate; sampleRateRange.mMaximum = bestFormat.mSampleRate; propAddress.mSelector = kAudioDevicePropertyNominalSampleRate; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(sampleRateRange), &sampleRateRange); if (status != noErr) { bestFormat.mSampleRate = origFormat.mSampleRate; } } else { bestFormat.mSampleRate = origFormat.mSampleRate; } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat)); if (status != noErr) { /* We failed to set the format, so fall back to the current format of the audio unit. */ bestFormat = origFormat; } #else bestFormat = origFormat; /* Sample rate is a little different here because for some reason kAudioUnitProperty_StreamFormat returns 0... Oh well. We need to instead try setting the sample rate to what the user has requested and then just see the results of it. Need to use some Objective-C here for this since it depends on Apple's AVAudioSession API. To do this we just get the shared AVAudioSession instance and then set it. Note that from what I can tell, it looks like the sample rate is shared between playback and capture for everything. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); [pAudioSession setPreferredSampleRate:(double)pData->sampleRateIn error:nil]; bestFormat.mSampleRate = pAudioSession.sampleRate; /* I've had a report that the channel count returned by AudioUnitGetProperty above is inconsistent with AVAudioSession outputNumberOfChannels. I'm going to try using the AVAudioSession values instead. UPDATE 20/02/2025: When testing on the simulator with an iPhone 15 and iOS 17 I get an error when initializing the audio unit if set the input channels to pAudioSession.inputNumberOfChannels. What is happening is the channel count returned from AudioUnitGetProperty() above is set to 2, but pAudioSession is reporting a channel count of 1. When this happens, the call to AudioUnitSetProprty() below just down below will succeed, but AudioUnitInitialize() further down will fail. The only solution I have come up with is to not set the channel count to pAudioSession.inputNumberOfChannels. */ if (deviceType == ma_device_type_playback) { bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.outputNumberOfChannels; } #if 0 if (deviceType == ma_device_type_capture) { /*printf("DEBUG: bestFormat.mChannelsPerFrame = %d; pAudioSession.inputNumberOfChannels = %d\n", (int)bestFormat.mChannelsPerFrame, (int)pAudioSession.inputNumberOfChannels);*/ bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.inputNumberOfChannels; } #endif } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } #endif result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pData->formatOut); if (result != MA_SUCCESS) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return result; } if (pData->formatOut == ma_format_unknown) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return MA_FORMAT_NOT_SUPPORTED; } pData->channelsOut = bestFormat.mChannelsPerFrame; pData->sampleRateOut = (ma_uint32)bestFormat.mSampleRate; } /* Clamp the channel count for safety. */ if (pData->channelsOut > MA_MAX_CHANNELS) { pData->channelsOut = MA_MAX_CHANNELS; } /* Internal channel map. This is weird in my testing. If I use the AudioObject to get the channel map, the channel descriptions are set to "Unknown" for some reason. To work around this it looks like retrieving it from the AudioUnit will work. However, and this is where it gets weird, it doesn't seem to work with capture devices, nor at all on iOS... Therefore I'm going to fall back to a default assumption in these cases. */ #if defined(MA_APPLE_DESKTOP) result = ma_get_AudioUnit_channel_map(pContext, pData->audioUnit, deviceType, pData->channelMapOut, pData->channelsOut); if (result != MA_SUCCESS) { #if 0 /* Try falling back to the channel map from the AudioObject. */ result = ma_get_AudioObject_channel_map(pContext, deviceObjectID, deviceType, pData->channelMapOut, pData->channelsOut); if (result != MA_SUCCESS) { return result; } #else /* Fall back to default assumptions. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); #endif } #else /* TODO: Figure out how to get the channel map using AVAudioSession. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); #endif /* Buffer size. Not allowing this to be configurable on iOS. */ if (pData->periodSizeInFramesIn == 0) { if (pData->periodSizeInMillisecondsIn == 0) { if (pData->performanceProfile == ma_performance_profile_low_latency) { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, pData->sampleRateOut); } else { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, pData->sampleRateOut); } } else { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, pData->sampleRateOut); } } else { actualPeriodSizeInFrames = pData->periodSizeInFramesIn; } #if defined(MA_APPLE_DESKTOP) result = ma_set_AudioObject_buffer_size_in_frames(pContext, deviceObjectID, deviceType, &actualPeriodSizeInFrames); if (result != MA_SUCCESS) { return result; } #else /* On iOS, the size of the IO buffer needs to be specified in seconds and is a floating point number. I don't trust any potential truncation errors due to converting from float to integer so I'm going to explicitly set the actual period size to the next power of 2. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); [pAudioSession setPreferredIOBufferDuration:((float)actualPeriodSizeInFrames / pAudioSession.sampleRate) error:nil]; actualPeriodSizeInFrames = ma_next_power_of_2((ma_uint32)(pAudioSession.IOBufferDuration * pAudioSession.sampleRate)); } #endif /* During testing I discovered that the buffer size can be too big. You'll get an error like this: kAudioUnitErr_TooManyFramesToProcess : inFramesToProcess=4096, mMaxFramesPerSlice=512 Note how inFramesToProcess is smaller than mMaxFramesPerSlice. To fix, we need to set kAudioUnitProperty_MaximumFramesPerSlice to that of the size of our buffer, or do it the other way around and set our buffer size to the kAudioUnitProperty_MaximumFramesPerSlice. */ status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &actualPeriodSizeInFrames, sizeof(actualPeriodSizeInFrames)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } pData->periodSizeInFramesOut = (ma_uint32)actualPeriodSizeInFrames; /* We need a buffer list if this is an input device. We render into this in the input callback. */ if (deviceType == ma_device_type_capture) { ma_bool32 isInterleaved = (bestFormat.mFormatFlags & kAudioFormatFlagIsNonInterleaved) == 0; AudioBufferList* pBufferList; pBufferList = ma_allocate_AudioBufferList__coreaudio(pData->periodSizeInFramesOut, pData->formatOut, pData->channelsOut, (isInterleaved) ? ma_stream_layout_interleaved : ma_stream_layout_deinterleaved, &pContext->allocationCallbacks); if (pBufferList == NULL) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return MA_OUT_OF_MEMORY; } pData->pAudioBufferList = pBufferList; } /* Callbacks. */ callbackInfo.inputProcRefCon = pDevice_DoNotReference; if (deviceType == ma_device_type_playback) { callbackInfo.inputProc = ma_on_output__coreaudio; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } else { callbackInfo.inputProc = ma_on_input__coreaudio; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } /* We need to listen for stop events. */ if (pData->registerStopEvent) { status = ((ma_AudioUnitAddPropertyListener_proc)pContext->coreaudio.AudioUnitAddPropertyListener)(pData->audioUnit, kAudioOutputUnitProperty_IsRunning, on_start_stop__coreaudio, pDevice_DoNotReference); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } /* Initialize the audio unit. */ status = ((ma_AudioUnitInitialize_proc)pContext->coreaudio.AudioUnitInitialize)(pData->audioUnit); if (status != noErr) { ma_free(pData->pAudioBufferList, &pContext->allocationCallbacks); pData->pAudioBufferList = NULL; ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } /* Grab the name. */ #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pData->deviceName), pData->deviceName); #else if (deviceType == ma_device_type_playback) { ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_PLAYBACK_DEVICE_NAME); } else { ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_CAPTURE_DEVICE_NAME); } #endif return result; } #if defined(MA_APPLE_DESKTOP) static ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit) { ma_device_init_internal_data__coreaudio data; ma_result result; /* This should only be called for playback or capture, not duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } data.allowNominalSampleRateChange = MA_FALSE; /* Don't change the nominal sample rate when switching devices. */ if (deviceType == ma_device_type_capture) { data.formatIn = pDevice->capture.format; data.channelsIn = pDevice->capture.channels; data.sampleRateIn = pDevice->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap)); data.shareMode = pDevice->capture.shareMode; data.performanceProfile = pDevice->coreaudio.originalPerformanceProfile; data.registerStopEvent = MA_TRUE; if (disposePreviousAudioUnit) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } } else if (deviceType == ma_device_type_playback) { data.formatIn = pDevice->playback.format; data.channelsIn = pDevice->playback.channels; data.sampleRateIn = pDevice->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap)); data.shareMode = pDevice->playback.shareMode; data.performanceProfile = pDevice->coreaudio.originalPerformanceProfile; data.registerStopEvent = (pDevice->type != ma_device_type_duplex); if (disposePreviousAudioUnit) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } } data.periodSizeInFramesIn = pDevice->coreaudio.originalPeriodSizeInFrames; data.periodSizeInMillisecondsIn = pDevice->coreaudio.originalPeriodSizeInMilliseconds; data.periodsIn = pDevice->coreaudio.originalPeriods; /* Need at least 3 periods for duplex. */ if (data.periodsIn < 3 && pDevice->type == ma_device_type_duplex) { data.periodsIn = 3; } result = ma_device_init_internal__coreaudio(pDevice->pContext, deviceType, NULL, &data, (void*)pDevice); if (result != MA_SUCCESS) { return result; } if (deviceType == ma_device_type_capture) { #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDCapture = (ma_uint32)data.deviceObjectID; ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio); #endif pDevice->coreaudio.audioUnitCapture = (ma_ptr)data.audioUnit; pDevice->coreaudio.pAudioBufferList = (ma_ptr)data.pAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = data.periodSizeInFramesOut; pDevice->capture.internalFormat = data.formatOut; pDevice->capture.internalChannels = data.channelsOut; pDevice->capture.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->capture.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->capture.internalPeriods = data.periodsOut; } else if (deviceType == ma_device_type_playback) { #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDPlayback = (ma_uint32)data.deviceObjectID; ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio); #endif pDevice->coreaudio.audioUnitPlayback = (ma_ptr)data.audioUnit; pDevice->playback.internalFormat = data.formatOut; pDevice->playback.internalChannels = data.channelsOut; pDevice->playback.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->playback.internalPeriods = data.periodsOut; } return MA_SUCCESS; } #endif /* MA_APPLE_DESKTOP */ static ma_result ma_device_init__coreaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with the Core Audio backend for now. */ if (((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* Capture needs to be initialized first. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__coreaudio data; data.allowNominalSampleRateChange = pConfig->coreaudio.allowNominalSampleRateChange; data.formatIn = pDescriptorCapture->format; data.channelsIn = pDescriptorCapture->channels; data.sampleRateIn = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorCapture->periodSizeInMilliseconds; data.periodsIn = pDescriptorCapture->periodCount; data.shareMode = pDescriptorCapture->shareMode; data.performanceProfile = pConfig->performanceProfile; data.registerStopEvent = MA_TRUE; /* Need at least 3 periods for duplex. */ if (data.periodsIn < 3 && pConfig->deviceType == ma_device_type_duplex) { data.periodsIn = 3; } result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_capture, pDescriptorCapture->pDeviceID, &data, (void*)pDevice); if (result != MA_SUCCESS) { return result; } pDevice->coreaudio.isDefaultCaptureDevice = (pConfig->capture.pDeviceID == NULL); #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDCapture = (ma_uint32)data.deviceObjectID; #endif pDevice->coreaudio.audioUnitCapture = (ma_ptr)data.audioUnit; pDevice->coreaudio.pAudioBufferList = (ma_ptr)data.pAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = data.periodSizeInFramesOut; pDevice->coreaudio.originalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds; pDevice->coreaudio.originalPeriods = pDescriptorCapture->periodCount; pDevice->coreaudio.originalPerformanceProfile = pConfig->performanceProfile; pDescriptorCapture->format = data.formatOut; pDescriptorCapture->channels = data.channelsOut; pDescriptorCapture->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorCapture->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorCapture->periodCount = data.periodsOut; #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio); /* If we are using the default device we'll need to listen for changes to the system's default device so we can seamlessly switch the device in the background. */ if (pConfig->capture.pDeviceID == NULL) { ma_device__track__coreaudio(pDevice); } #endif } /* Playback. */ if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__coreaudio data; data.allowNominalSampleRateChange = pConfig->coreaudio.allowNominalSampleRateChange; data.formatIn = pDescriptorPlayback->format; data.channelsIn = pDescriptorPlayback->channels; data.sampleRateIn = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); data.shareMode = pDescriptorPlayback->shareMode; data.performanceProfile = pConfig->performanceProfile; /* In full-duplex mode we want the playback buffer to be the same size as the capture buffer. */ if (pConfig->deviceType == ma_device_type_duplex) { data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodsIn = pDescriptorCapture->periodCount; data.registerStopEvent = MA_FALSE; } else { data.periodSizeInFramesIn = pDescriptorPlayback->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds; data.periodsIn = pDescriptorPlayback->periodCount; data.registerStopEvent = MA_TRUE; } result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data, (void*)pDevice); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } } return result; } pDevice->coreaudio.isDefaultPlaybackDevice = (pConfig->playback.pDeviceID == NULL); #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDPlayback = (ma_uint32)data.deviceObjectID; #endif pDevice->coreaudio.audioUnitPlayback = (ma_ptr)data.audioUnit; pDevice->coreaudio.originalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds; pDevice->coreaudio.originalPeriods = pDescriptorPlayback->periodCount; pDevice->coreaudio.originalPerformanceProfile = pConfig->performanceProfile; pDescriptorPlayback->format = data.formatOut; pDescriptorPlayback->channels = data.channelsOut; pDescriptorPlayback->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorPlayback->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorPlayback->periodCount = data.periodsOut; #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio); /* If we are using the default device we'll need to listen for changes to the system's default device so we can seamlessly switch the device in the background. */ if (pDescriptorPlayback->pDeviceID == NULL && (pConfig->deviceType != ma_device_type_duplex || pDescriptorCapture->pDeviceID != NULL)) { ma_device__track__coreaudio(pDevice); } #endif } /* When stopping the device, a callback is called on another thread. We need to wait for this callback before returning from ma_device_stop(). This event is used for this. */ ma_event_init(&pDevice->coreaudio.stopEvent); /* We need to detect when a route has changed so we can update the data conversion pipeline accordingly. This is done differently on non-Desktop Apple platforms. */ #if defined(MA_APPLE_MOBILE) pDevice->coreaudio.pNotificationHandler = (MA_BRIDGE_RETAINED void*)[[ma_ios_notification_handler alloc] init:pDevice]; #endif return MA_SUCCESS; } static ma_result ma_device_start__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { return ma_result_from_OSStatus(status); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } return ma_result_from_OSStatus(status); } } return MA_SUCCESS; } static ma_result ma_device_stop__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* It's not clear from the documentation whether or not AudioOutputUnitStop() actually drains the device or not. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { return ma_result_from_OSStatus(status); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { return ma_result_from_OSStatus(status); } } /* We need to wait for the callback to finish before returning. */ ma_event_wait(&pDevice->coreaudio.stopEvent); return MA_SUCCESS; } static ma_result ma_context_uninit__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_coreaudio); #if defined(MA_APPLE_MOBILE) if (!pContext->coreaudio.noAudioSessionDeactivate) { if (![[AVAudioSession sharedInstance] setActive:false error:nil]) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to deactivate audio session."); return MA_FAILED_TO_INIT_BACKEND; } } #endif #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif #if !defined(MA_APPLE_MOBILE) ma_context__uninit_device_tracking__coreaudio(pContext); #endif (void)pContext; return MA_SUCCESS; } #if defined(MA_APPLE_MOBILE) && defined(__IPHONE_12_0) static AVAudioSessionCategory ma_to_AVAudioSessionCategory(ma_ios_session_category category) { /* The "default" and "none" categories are treated different and should not be used as an input into this function. */ MA_ASSERT(category != ma_ios_session_category_default); MA_ASSERT(category != ma_ios_session_category_none); switch (category) { case ma_ios_session_category_ambient: return AVAudioSessionCategoryAmbient; case ma_ios_session_category_solo_ambient: return AVAudioSessionCategorySoloAmbient; case ma_ios_session_category_playback: return AVAudioSessionCategoryPlayback; case ma_ios_session_category_record: return AVAudioSessionCategoryRecord; case ma_ios_session_category_play_and_record: return AVAudioSessionCategoryPlayAndRecord; case ma_ios_session_category_multi_route: return AVAudioSessionCategoryMultiRoute; case ma_ios_session_category_none: return AVAudioSessionCategoryAmbient; case ma_ios_session_category_default: return AVAudioSessionCategoryAmbient; default: return AVAudioSessionCategoryAmbient; } } #endif static ma_result ma_context_init__coreaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #if !defined(MA_APPLE_MOBILE) ma_result result; #endif MA_ASSERT(pConfig != NULL); MA_ASSERT(pContext != NULL); #if defined(MA_APPLE_MOBILE) @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; AVAudioSessionCategoryOptions options = pConfig->coreaudio.sessionCategoryOptions; MA_ASSERT(pAudioSession != NULL); if (pConfig->coreaudio.sessionCategory == ma_ios_session_category_default) { /* I'm going to use trial and error to determine our default session category. First we'll try PlayAndRecord. If that fails we'll try Playback and if that fails we'll try record. If all of these fail we'll just not set the category. */ #if !defined(MA_APPLE_TV) && !defined(MA_APPLE_WATCH) options |= AVAudioSessionCategoryOptionDefaultToSpeaker; #endif if ([pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions:options error:nil]) { /* Using PlayAndRecord */ } else if ([pAudioSession setCategory: AVAudioSessionCategoryPlayback withOptions:options error:nil]) { /* Using Playback */ } else if ([pAudioSession setCategory: AVAudioSessionCategoryRecord withOptions:options error:nil]) { /* Using Record */ } else { /* Leave as default? */ } } else { if (pConfig->coreaudio.sessionCategory != ma_ios_session_category_none) { #if defined(__IPHONE_12_0) if (![pAudioSession setCategory: ma_to_AVAudioSessionCategory(pConfig->coreaudio.sessionCategory) withOptions:options error:nil]) { return MA_INVALID_OPERATION; /* Failed to set session category. */ } #else /* Ignore the session category on version 11 and older, but post a warning. */ ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Session category only supported in iOS 12 and newer."); #endif } } if (!pConfig->coreaudio.noAudioSessionActivate) { if (![pAudioSession setActive:true error:nil]) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to activate audio session."); return MA_FAILED_TO_INIT_BACKEND; } } } #endif #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) pContext->coreaudio.hCoreFoundation = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation"); if (pContext->coreaudio.hCoreFoundation == NULL) { return MA_API_NOT_FOUND; } pContext->coreaudio.CFStringGetCString = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, "CFStringGetCString"); pContext->coreaudio.CFRelease = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, "CFRelease"); pContext->coreaudio.hCoreAudio = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/CoreAudio.framework/CoreAudio"); if (pContext->coreaudio.hCoreAudio == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } pContext->coreaudio.AudioObjectGetPropertyData = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectGetPropertyData"); pContext->coreaudio.AudioObjectGetPropertyDataSize = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectGetPropertyDataSize"); pContext->coreaudio.AudioObjectSetPropertyData = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectSetPropertyData"); pContext->coreaudio.AudioObjectAddPropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectAddPropertyListener"); pContext->coreaudio.AudioObjectRemovePropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectRemovePropertyListener"); /* It looks like Apple has moved some APIs from AudioUnit into AudioToolbox on more recent versions of macOS. They are still defined in AudioUnit, but just in case they decide to remove them from there entirely I'm going to implement a fallback. The way it'll work is that it'll first try AudioUnit, and if the required symbols are not present there we'll fall back to AudioToolbox. */ pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/AudioUnit.framework/AudioUnit"); if (pContext->coreaudio.hAudioUnit == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } if (ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentFindNext") == NULL) { /* Couldn't find the required symbols in AudioUnit, so fall back to AudioToolbox. */ ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox"); if (pContext->coreaudio.hAudioUnit == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } } pContext->coreaudio.AudioComponentFindNext = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentFindNext"); pContext->coreaudio.AudioComponentInstanceDispose = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentInstanceDispose"); pContext->coreaudio.AudioComponentInstanceNew = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentInstanceNew"); pContext->coreaudio.AudioOutputUnitStart = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioOutputUnitStart"); pContext->coreaudio.AudioOutputUnitStop = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioOutputUnitStop"); pContext->coreaudio.AudioUnitAddPropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitAddPropertyListener"); pContext->coreaudio.AudioUnitGetPropertyInfo = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitGetPropertyInfo"); pContext->coreaudio.AudioUnitGetProperty = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitGetProperty"); pContext->coreaudio.AudioUnitSetProperty = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitSetProperty"); pContext->coreaudio.AudioUnitInitialize = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitInitialize"); pContext->coreaudio.AudioUnitRender = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitRender"); #else pContext->coreaudio.CFStringGetCString = (ma_proc)CFStringGetCString; pContext->coreaudio.CFRelease = (ma_proc)CFRelease; #if defined(MA_APPLE_DESKTOP) pContext->coreaudio.AudioObjectGetPropertyData = (ma_proc)AudioObjectGetPropertyData; pContext->coreaudio.AudioObjectGetPropertyDataSize = (ma_proc)AudioObjectGetPropertyDataSize; pContext->coreaudio.AudioObjectSetPropertyData = (ma_proc)AudioObjectSetPropertyData; pContext->coreaudio.AudioObjectAddPropertyListener = (ma_proc)AudioObjectAddPropertyListener; pContext->coreaudio.AudioObjectRemovePropertyListener = (ma_proc)AudioObjectRemovePropertyListener; #endif pContext->coreaudio.AudioComponentFindNext = (ma_proc)AudioComponentFindNext; pContext->coreaudio.AudioComponentInstanceDispose = (ma_proc)AudioComponentInstanceDispose; pContext->coreaudio.AudioComponentInstanceNew = (ma_proc)AudioComponentInstanceNew; pContext->coreaudio.AudioOutputUnitStart = (ma_proc)AudioOutputUnitStart; pContext->coreaudio.AudioOutputUnitStop = (ma_proc)AudioOutputUnitStop; pContext->coreaudio.AudioUnitAddPropertyListener = (ma_proc)AudioUnitAddPropertyListener; pContext->coreaudio.AudioUnitGetPropertyInfo = (ma_proc)AudioUnitGetPropertyInfo; pContext->coreaudio.AudioUnitGetProperty = (ma_proc)AudioUnitGetProperty; pContext->coreaudio.AudioUnitSetProperty = (ma_proc)AudioUnitSetProperty; pContext->coreaudio.AudioUnitInitialize = (ma_proc)AudioUnitInitialize; pContext->coreaudio.AudioUnitRender = (ma_proc)AudioUnitRender; #endif /* Audio component. */ { AudioComponentDescription desc; desc.componentType = kAudioUnitType_Output; #if defined(MA_APPLE_DESKTOP) desc.componentSubType = kAudioUnitSubType_HALOutput; #else desc.componentSubType = kAudioUnitSubType_RemoteIO; #endif desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; pContext->coreaudio.component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc); if (pContext->coreaudio.component == NULL) { #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif return MA_FAILED_TO_INIT_BACKEND; } } #if !defined(MA_APPLE_MOBILE) result = ma_context__init_device_tracking__coreaudio(pContext); if (result != MA_SUCCESS) { #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif return result; } #endif pContext->coreaudio.noAudioSessionDeactivate = pConfig->coreaudio.noAudioSessionDeactivate; pCallbacks->onContextInit = ma_context_init__coreaudio; pCallbacks->onContextUninit = ma_context_uninit__coreaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__coreaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__coreaudio; pCallbacks->onDeviceInit = ma_device_init__coreaudio; pCallbacks->onDeviceUninit = ma_device_uninit__coreaudio; pCallbacks->onDeviceStart = ma_device_start__coreaudio; pCallbacks->onDeviceStop = ma_device_stop__coreaudio; pCallbacks->onDeviceRead = NULL; pCallbacks->onDeviceWrite = NULL; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_COREAUDIO */ /****************************************************************************** sndio Backend ******************************************************************************/ #ifdef MA_HAS_SNDIO #include /* Only supporting OpenBSD. This did not work very well at all on FreeBSD when I tried it. Not sure if this is due to miniaudio's implementation or if it's some kind of system configuration issue, but basically the default device just doesn't emit any sound, or at times you'll hear tiny pieces. I will consider enabling this when there's demand for it or if I can get it tested and debugged more thoroughly. */ #if 0 #if defined(__NetBSD__) || defined(__OpenBSD__) #include #endif #if defined(__FreeBSD__) || defined(__DragonFly__) #include #endif #endif #define MA_SIO_DEVANY "default" #define MA_SIO_PLAY 1 #define MA_SIO_REC 2 #define MA_SIO_NENC 8 #define MA_SIO_NCHAN 8 #define MA_SIO_NRATE 16 #define MA_SIO_NCONF 4 struct ma_sio_hdl; /* <-- Opaque */ struct ma_sio_par { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; unsigned int rchan; unsigned int pchan; unsigned int rate; unsigned int bufsz; unsigned int xrun; unsigned int round; unsigned int appbufsz; int __pad[3]; unsigned int __magic; }; struct ma_sio_enc { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; }; struct ma_sio_conf { unsigned int enc; unsigned int rchan; unsigned int pchan; unsigned int rate; }; struct ma_sio_cap { struct ma_sio_enc enc[MA_SIO_NENC]; unsigned int rchan[MA_SIO_NCHAN]; unsigned int pchan[MA_SIO_NCHAN]; unsigned int rate[MA_SIO_NRATE]; int __pad[7]; unsigned int nconf; struct ma_sio_conf confs[MA_SIO_NCONF]; }; typedef struct ma_sio_hdl* (* ma_sio_open_proc) (const char*, unsigned int, int); typedef void (* ma_sio_close_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_setpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*); typedef int (* ma_sio_getpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*); typedef int (* ma_sio_getcap_proc) (struct ma_sio_hdl*, struct ma_sio_cap*); typedef size_t (* ma_sio_write_proc) (struct ma_sio_hdl*, const void*, size_t); typedef size_t (* ma_sio_read_proc) (struct ma_sio_hdl*, void*, size_t); typedef int (* ma_sio_start_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_stop_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_initpar_proc)(struct ma_sio_par*); static ma_uint32 ma_get_standard_sample_rate_priority_index__sndio(ma_uint32 sampleRate) /* Lower = higher priority */ { ma_uint32 i; for (i = 0; i < ma_countof(g_maStandardSampleRatePriorities); ++i) { if (g_maStandardSampleRatePriorities[i] == sampleRate) { return i; } } return (ma_uint32)-1; } static ma_format ma_format_from_sio_enc__sndio(unsigned int bits, unsigned int bps, unsigned int sig, unsigned int le, unsigned int msb) { /* We only support native-endian right now. */ if ((ma_is_little_endian() && le == 0) || (ma_is_big_endian() && le == 1)) { return ma_format_unknown; } if (bits == 8 && bps == 1 && sig == 0) { return ma_format_u8; } if (bits == 16 && bps == 2 && sig == 1) { return ma_format_s16; } if (bits == 24 && bps == 3 && sig == 1) { return ma_format_s24; } if (bits == 24 && bps == 4 && sig == 1 && msb == 0) { /*return ma_format_s24_32;*/ } if (bits == 32 && bps == 4 && sig == 1) { return ma_format_s32; } return ma_format_unknown; } static ma_format ma_find_best_format_from_sio_cap__sndio(struct ma_sio_cap* caps) { ma_format bestFormat; unsigned int iConfig; MA_ASSERT(caps != NULL); bestFormat = ma_format_unknown; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format == ma_format_unknown) { continue; /* Format not supported. */ } if (bestFormat == ma_format_unknown) { bestFormat = format; } else { if (ma_get_format_priority_index(bestFormat) > ma_get_format_priority_index(format)) { /* <-- Lower = better. */ bestFormat = format; } } } } return bestFormat; } static ma_uint32 ma_find_best_channels_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat) { ma_uint32 maxChannels; unsigned int iConfig; MA_ASSERT(caps != NULL); MA_ASSERT(requiredFormat != ma_format_unknown); /* Just pick whatever configuration has the most channels. */ maxChannels = 0; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { /* The encoding should be of requiredFormat. */ unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int iChannel; unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format != requiredFormat) { continue; } /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; if (deviceType == ma_device_type_playback) { chan = caps->confs[iConfig].pchan; } else { chan = caps->confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps->pchan[iChannel]; } else { channels = caps->rchan[iChannel]; } if (maxChannels < channels) { maxChannels = channels; } } } } return maxChannels; } static ma_uint32 ma_find_best_sample_rate_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat, ma_uint32 requiredChannels) { ma_uint32 firstSampleRate; ma_uint32 bestSampleRate; unsigned int iConfig; MA_ASSERT(caps != NULL); MA_ASSERT(requiredFormat != ma_format_unknown); MA_ASSERT(requiredChannels > 0); MA_ASSERT(requiredChannels <= MA_MAX_CHANNELS); firstSampleRate = 0; /* <-- If the device does not support a standard rate we'll fall back to the first one that's found. */ bestSampleRate = 0; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { /* The encoding should be of requiredFormat. */ unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int iChannel; unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format != requiredFormat) { continue; } /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; unsigned int iRate; if (deviceType == ma_device_type_playback) { chan = caps->confs[iConfig].pchan; } else { chan = caps->confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps->pchan[iChannel]; } else { channels = caps->rchan[iChannel]; } if (channels != requiredChannels) { continue; } /* Getting here means we have found a compatible encoding/channel pair. */ for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) { ma_uint32 rate = (ma_uint32)caps->rate[iRate]; ma_uint32 ratePriority; if (firstSampleRate == 0) { firstSampleRate = rate; } /* Disregard this rate if it's not a standard one. */ ratePriority = ma_get_standard_sample_rate_priority_index__sndio(rate); if (ratePriority == (ma_uint32)-1) { continue; } if (ma_get_standard_sample_rate_priority_index__sndio(bestSampleRate) > ratePriority) { /* Lower = better. */ bestSampleRate = rate; } } } } } /* If a standard sample rate was not found just fall back to the first one that was iterated. */ if (bestSampleRate == 0) { bestSampleRate = firstSampleRate; } return bestSampleRate; } static ma_result ma_context_enumerate_devices__sndio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 isTerminating = MA_FALSE; struct ma_sio_hdl* handle; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* sndio doesn't seem to have a good device enumeration API, so I'm therefore only enumerating over default devices for now. */ /* Playback. */ if (!isTerminating) { handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_PLAY, 0); if (handle != NULL) { /* Supports playback. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), MA_SIO_DEVANY); ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME); isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); } } /* Capture. */ if (!isTerminating) { handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_REC, 0); if (handle != NULL) { /* Supports capture. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), "default"); ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME); isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__sndio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { char devid[256]; struct ma_sio_hdl* handle; struct ma_sio_cap caps; unsigned int iConfig; MA_ASSERT(pContext != NULL); /* We need to open the device before we can get information about it. */ if (pDeviceID == NULL) { ma_strcpy_s(devid, sizeof(devid), MA_SIO_DEVANY); ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (deviceType == ma_device_type_playback) ? MA_DEFAULT_PLAYBACK_DEVICE_NAME : MA_DEFAULT_CAPTURE_DEVICE_NAME); } else { ma_strcpy_s(devid, sizeof(devid), pDeviceID->sndio); ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), devid); } handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(devid, (deviceType == ma_device_type_playback) ? MA_SIO_PLAY : MA_SIO_REC, 0); if (handle == NULL) { return MA_NO_DEVICE; } if (((ma_sio_getcap_proc)pContext->sndio.sio_getcap)(handle, &caps) == 0) { return MA_ERROR; } pDeviceInfo->nativeDataFormatCount = 0; for (iConfig = 0; iConfig < caps.nconf; iConfig += 1) { /* The main thing we care about is that the encoding is supported by miniaudio. If it is, we want to give preference to some formats over others. */ unsigned int iEncoding; unsigned int iChannel; unsigned int iRate; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps.confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps.enc[iEncoding].bits; bps = caps.enc[iEncoding].bps; sig = caps.enc[iEncoding].sig; le = caps.enc[iEncoding].le; msb = caps.enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format == ma_format_unknown) { continue; /* Format not supported. */ } /* Channels. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; if (deviceType == ma_device_type_playback) { chan = caps.confs[iConfig].pchan; } else { chan = caps.confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps.pchan[iChannel]; } else { channels = caps.rchan[iChannel]; } /* Sample Rates. */ for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) { if ((caps.confs[iConfig].rate & (1UL << iRate)) != 0) { ma_device_info_add_native_data_format(pDeviceInfo, format, channels, caps.rate[iRate], 0); } } } } } ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); return MA_SUCCESS; } static ma_result ma_device_uninit__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); } return MA_SUCCESS; } static ma_result ma_device_init_handle__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { const char* pDeviceName; ma_ptr handle; int openFlags = 0; struct ma_sio_cap caps; struct ma_sio_par par; const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); MA_ASSERT(pDevice != NULL); if (deviceType == ma_device_type_capture) { openFlags = MA_SIO_REC; } else { openFlags = MA_SIO_PLAY; } pDeviceID = pDescriptor->pDeviceID; format = pDescriptor->format; channels = pDescriptor->channels; sampleRate = pDescriptor->sampleRate; pDeviceName = MA_SIO_DEVANY; if (pDeviceID != NULL) { pDeviceName = pDeviceID->sndio; } handle = (ma_ptr)((ma_sio_open_proc)pDevice->pContext->sndio.sio_open)(pDeviceName, openFlags, 0); if (handle == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to open device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* We need to retrieve the device caps to determine the most appropriate format to use. */ if (((ma_sio_getcap_proc)pDevice->pContext->sndio.sio_getcap)((struct ma_sio_hdl*)handle, &caps) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to retrieve device caps."); return MA_ERROR; } /* Note: sndio reports a huge range of available channels. This is inconvenient for us because there's no real way, as far as I can tell, to get the _actual_ channel count of the device. I'm therefore restricting this to the requested channels, regardless of whether or not the default channel count is requested. For hardware devices, I'm suspecting only a single channel count will be reported and we can safely use the value returned by ma_find_best_channels_from_sio_cap__sndio(). */ if (deviceType == ma_device_type_capture) { if (format == ma_format_unknown) { format = ma_find_best_format_from_sio_cap__sndio(&caps); } if (channels == 0) { if (strlen(pDeviceName) > strlen("rsnd/") && strncmp(pDeviceName, "rsnd/", strlen("rsnd/")) == 0) { channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format); } else { channels = MA_DEFAULT_CHANNELS; } } } else { if (format == ma_format_unknown) { format = ma_find_best_format_from_sio_cap__sndio(&caps); } if (channels == 0) { if (strlen(pDeviceName) > strlen("rsnd/") && strncmp(pDeviceName, "rsnd/", strlen("rsnd/")) == 0) { channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format); } else { channels = MA_DEFAULT_CHANNELS; } } } if (sampleRate == 0) { sampleRate = ma_find_best_sample_rate_from_sio_cap__sndio(&caps, pConfig->deviceType, format, channels); } ((ma_sio_initpar_proc)pDevice->pContext->sndio.sio_initpar)(&par); par.msb = 0; par.le = ma_is_little_endian(); switch (format) { case ma_format_u8: { par.bits = 8; par.bps = 1; par.sig = 0; } break; case ma_format_s24: { par.bits = 24; par.bps = 3; par.sig = 1; } break; case ma_format_s32: { par.bits = 32; par.bps = 4; par.sig = 1; } break; case ma_format_s16: case ma_format_f32: case ma_format_unknown: default: { par.bits = 16; par.bps = 2; par.sig = 1; } break; } if (deviceType == ma_device_type_capture) { par.rchan = channels; } else { par.pchan = channels; } par.rate = sampleRate; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, par.rate, pConfig->performanceProfile); par.round = internalPeriodSizeInFrames; par.appbufsz = par.round * pDescriptor->periodCount; if (((ma_sio_setpar_proc)pDevice->pContext->sndio.sio_setpar)((struct ma_sio_hdl*)handle, &par) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to set buffer size."); return MA_ERROR; } if (((ma_sio_getpar_proc)pDevice->pContext->sndio.sio_getpar)((struct ma_sio_hdl*)handle, &par) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to retrieve buffer size."); return MA_ERROR; } internalFormat = ma_format_from_sio_enc__sndio(par.bits, par.bps, par.sig, par.le, par.msb); internalChannels = (deviceType == ma_device_type_capture) ? par.rchan : par.pchan; internalSampleRate = par.rate; internalPeriods = par.appbufsz / par.round; internalPeriodSizeInFrames = par.round; if (deviceType == ma_device_type_capture) { pDevice->sndio.handleCapture = handle; } else { pDevice->sndio.handlePlayback = handle; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sndio, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->sndio); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); /* <-- Doesn't actually playback until data is written. */ } return MA_SUCCESS; } static ma_result ma_device_stop__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* From the documentation: The sio_stop() function puts the audio subsystem in the same state as before sio_start() is called. It stops recording, drains the play buffer and then stops playback. If samples to play are queued but playback hasn't started yet then playback is forced immediately; playback will actually stop once the buffer is drained. In no case are samples in the play buffer discarded. Therefore, sio_stop() performs all of the necessary draining for us. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); } return MA_SUCCESS; } static ma_result ma_device_write__sndio(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int result; if (pFramesWritten != NULL) { *pFramesWritten = 0; } result = ((ma_sio_write_proc)pDevice->pContext->sndio.sio_write)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (result == 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to send data from the client to the device."); return MA_IO_ERROR; } if (pFramesWritten != NULL) { *pFramesWritten = frameCount; } return MA_SUCCESS; } static ma_result ma_device_read__sndio(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int result; if (pFramesRead != NULL) { *pFramesRead = 0; } result = ((ma_sio_read_proc)pDevice->pContext->sndio.sio_read)((struct ma_sio_hdl*)pDevice->sndio.handleCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (result == 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to read data from the device to be sent to the device."); return MA_IO_ERROR; } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } static ma_result ma_context_uninit__sndio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_sndio); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__sndio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #ifndef MA_NO_RUNTIME_LINKING const char* libsndioNames[] = { "libsndio.so" }; size_t i; for (i = 0; i < ma_countof(libsndioNames); ++i) { pContext->sndio.sndioSO = ma_dlopen(ma_context_get_log(pContext), libsndioNames[i]); if (pContext->sndio.sndioSO != NULL) { break; } } if (pContext->sndio.sndioSO == NULL) { return MA_NO_BACKEND; } pContext->sndio.sio_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_open"); pContext->sndio.sio_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_close"); pContext->sndio.sio_setpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_setpar"); pContext->sndio.sio_getpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_getpar"); pContext->sndio.sio_getcap = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_getcap"); pContext->sndio.sio_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_write"); pContext->sndio.sio_read = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_read"); pContext->sndio.sio_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_start"); pContext->sndio.sio_stop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_stop"); pContext->sndio.sio_initpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_initpar"); #else pContext->sndio.sio_open = sio_open; pContext->sndio.sio_close = sio_close; pContext->sndio.sio_setpar = sio_setpar; pContext->sndio.sio_getpar = sio_getpar; pContext->sndio.sio_getcap = sio_getcap; pContext->sndio.sio_write = sio_write; pContext->sndio.sio_read = sio_read; pContext->sndio.sio_start = sio_start; pContext->sndio.sio_stop = sio_stop; pContext->sndio.sio_initpar = sio_initpar; #endif pCallbacks->onContextInit = ma_context_init__sndio; pCallbacks->onContextUninit = ma_context_uninit__sndio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__sndio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__sndio; pCallbacks->onDeviceInit = ma_device_init__sndio; pCallbacks->onDeviceUninit = ma_device_uninit__sndio; pCallbacks->onDeviceStart = ma_device_start__sndio; pCallbacks->onDeviceStop = ma_device_stop__sndio; pCallbacks->onDeviceRead = ma_device_read__sndio; pCallbacks->onDeviceWrite = ma_device_write__sndio; pCallbacks->onDeviceDataLoop = NULL; (void)pConfig; return MA_SUCCESS; } #endif /* MA_HAS_SNDIO */ /****************************************************************************** audio(4) Backend ******************************************************************************/ #ifdef MA_HAS_AUDIO4 #include #include #include #include #include #include #include #ifdef __NetBSD__ #include #endif #if defined(__OpenBSD__) #include #if defined(OpenBSD) && OpenBSD >= 201709 #define MA_AUDIO4_USE_NEW_API #endif #endif static void ma_construct_device_id__audio4(char* id, size_t idSize, const char* base, int deviceIndex) { size_t baseLen; MA_ASSERT(id != NULL); MA_ASSERT(idSize > 0); MA_ASSERT(deviceIndex >= 0); baseLen = strlen(base); MA_ASSERT(idSize > baseLen); ma_strcpy_s(id, idSize, base); ma_itoa_s(deviceIndex, id+baseLen, idSize-baseLen, 10); } static ma_result ma_extract_device_index_from_id__audio4(const char* id, const char* base, int* pIndexOut) { size_t idLen; size_t baseLen; const char* deviceIndexStr; MA_ASSERT(id != NULL); MA_ASSERT(base != NULL); MA_ASSERT(pIndexOut != NULL); idLen = strlen(id); baseLen = strlen(base); if (idLen <= baseLen) { return MA_ERROR; /* Doesn't look like the id starts with the base. */ } if (strncmp(id, base, baseLen) != 0) { return MA_ERROR; /* ID does not begin with base. */ } deviceIndexStr = id + baseLen; if (deviceIndexStr[0] == '\0') { return MA_ERROR; /* No index specified in the ID. */ } if (pIndexOut) { *pIndexOut = atoi(deviceIndexStr); } return MA_SUCCESS; } #if !defined(MA_AUDIO4_USE_NEW_API) /* Old API */ static ma_format ma_format_from_encoding__audio4(unsigned int encoding, unsigned int precision) { if (precision == 8 && (encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR_LE || encoding == AUDIO_ENCODING_ULINEAR_BE)) { return ma_format_u8; } else { if (ma_is_little_endian() && encoding == AUDIO_ENCODING_SLINEAR_LE) { if (precision == 16) { return ma_format_s16; } else if (precision == 24) { return ma_format_s24; } else if (precision == 32) { return ma_format_s32; } } else if (ma_is_big_endian() && encoding == AUDIO_ENCODING_SLINEAR_BE) { if (precision == 16) { return ma_format_s16; } else if (precision == 24) { return ma_format_s24; } else if (precision == 32) { return ma_format_s32; } } } return ma_format_unknown; /* Encoding not supported. */ } static void ma_encoding_from_format__audio4(ma_format format, unsigned int* pEncoding, unsigned int* pPrecision) { MA_ASSERT(pEncoding != NULL); MA_ASSERT(pPrecision != NULL); switch (format) { case ma_format_u8: { *pEncoding = AUDIO_ENCODING_ULINEAR; *pPrecision = 8; } break; case ma_format_s24: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 24; } break; case ma_format_s32: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 32; } break; case ma_format_s16: case ma_format_f32: case ma_format_unknown: default: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 16; } break; } } static ma_format ma_format_from_prinfo__audio4(struct audio_prinfo* prinfo) { return ma_format_from_encoding__audio4(prinfo->encoding, prinfo->precision); } static ma_format ma_best_format_from_fd__audio4(int fd, ma_format preferredFormat) { audio_encoding_t encoding; ma_uint32 iFormat; int counter = 0; /* First check to see if the preferred format is supported. */ if (preferredFormat != ma_format_unknown) { counter = 0; for (;;) { MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } if (preferredFormat == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) { return preferredFormat; /* Found the preferred format. */ } /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */ counter += 1; } } /* Getting here means our preferred format is not supported, so fall back to our standard priorities. */ for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) { ma_format format = g_maFormatPriorities[iFormat]; counter = 0; for (;;) { MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } if (format == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) { return format; /* Found a workable format. */ } /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */ counter += 1; } } /* Getting here means not appropriate format was found. */ return ma_format_unknown; } #else static ma_format ma_format_from_swpar__audio4(struct audio_swpar* par) { if (par->bits == 8 && par->bps == 1 && par->sig == 0) { return ma_format_u8; } if (par->bits == 16 && par->bps == 2 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_s16; } if (par->bits == 24 && par->bps == 3 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_s24; } if (par->bits == 32 && par->bps == 4 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_f32; } /* Format not supported. */ return ma_format_unknown; } #endif static ma_result ma_context_get_device_info_from_fd__audio4(ma_context* pContext, ma_device_type deviceType, int fd, ma_device_info* pDeviceInfo) { audio_device_t fdDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(fd >= 0); MA_ASSERT(pDeviceInfo != NULL); (void)pContext; (void)deviceType; if (ioctl(fd, AUDIO_GETDEV, &fdDevice) < 0) { return MA_ERROR; /* Failed to retrieve device info. */ } /* Name. */ ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), fdDevice.name); #if !defined(MA_AUDIO4_USE_NEW_API) { audio_info_t fdInfo; int counter = 0; ma_uint32 channels; ma_uint32 sampleRate; #if defined(__NetBSD__) && (__NetBSD_Version__ >= 900000000) if (ioctl(fd, AUDIO_GETFORMAT, &fdInfo) < 0) { return MA_ERROR; } #else if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { return MA_ERROR; } #endif if (deviceType == ma_device_type_playback) { channels = fdInfo.play.channels; sampleRate = fdInfo.play.sample_rate; } else { channels = fdInfo.record.channels; sampleRate = fdInfo.record.sample_rate; } /* Supported formats. We get this by looking at the encodings. */ pDeviceInfo->nativeDataFormatCount = 0; for (;;) { audio_encoding_t encoding; ma_format format; MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } format = ma_format_from_encoding__audio4(encoding.encoding, encoding.precision); if (format != ma_format_unknown) { ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0); } counter += 1; } } #else { struct audio_swpar fdPar; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { return MA_ERROR; } format = ma_format_from_swpar__audio4(&fdPar); if (format == ma_format_unknown) { return MA_FORMAT_NOT_SUPPORTED; } if (deviceType == ma_device_type_playback) { channels = fdPar.pchan; } else { channels = fdPar.rchan; } sampleRate = fdPar.rate; pDeviceInfo->nativeDataFormatCount = 0; ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0); } #endif return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__audio4(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { const int maxDevices = 64; char devpath[256]; int iDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Every device will be named "/dev/audioN", with a "/dev/audioctlN" equivalent. We use the "/dev/audioctlN" version here since we can open it even when another process has control of the "/dev/audioN" device. */ for (iDevice = 0; iDevice < maxDevices; ++iDevice) { struct stat st; int fd; ma_bool32 isTerminating = MA_FALSE; ma_strcpy_s(devpath, sizeof(devpath), "/dev/audioctl"); ma_itoa_s(iDevice, devpath+strlen(devpath), sizeof(devpath)-strlen(devpath), 10); if (stat(devpath, &st) < 0) { break; } /* The device exists, but we need to check if it's usable as playback and/or capture. */ /* Playback. */ if (!isTerminating) { fd = open(devpath, O_RDONLY, 0); if (fd >= 0) { /* Supports playback. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), "/dev/audio", iDevice); if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_playback, fd, &deviceInfo) == MA_SUCCESS) { isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } close(fd); } } /* Capture. */ if (!isTerminating) { fd = open(devpath, O_WRONLY, 0); if (fd >= 0) { /* Supports capture. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), "/dev/audio", iDevice); if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_capture, fd, &deviceInfo) == MA_SUCCESS) { isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } close(fd); } } if (isTerminating) { break; } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__audio4(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { int fd = -1; int deviceIndex = -1; char ctlid[256]; ma_result result; MA_ASSERT(pContext != NULL); /* We need to open the "/dev/audioctlN" device to get the info. To do this we need to extract the number from the device ID which will be in "/dev/audioN" format. */ if (pDeviceID == NULL) { /* Default device. */ ma_strcpy_s(ctlid, sizeof(ctlid), "/dev/audioctl"); } else { /* Specific device. We need to convert from "/dev/audioN" to "/dev/audioctlN". */ result = ma_extract_device_index_from_id__audio4(pDeviceID->audio4, "/dev/audio", &deviceIndex); if (result != MA_SUCCESS) { return result; } ma_construct_device_id__audio4(ctlid, sizeof(ctlid), "/dev/audioctl", deviceIndex); } fd = open(ctlid, (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY, 0); if (fd == -1) { return MA_NO_DEVICE; } if (deviceIndex == -1) { ma_strcpy_s(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), "/dev/audio"); } else { ma_construct_device_id__audio4(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), "/dev/audio", deviceIndex); } result = ma_context_get_device_info_from_fd__audio4(pContext, deviceType, fd, pDeviceInfo); close(fd); return result; } static ma_result ma_device_uninit__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { close(pDevice->audio4.fdCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { close(pDevice->audio4.fdPlayback); } return MA_SUCCESS; } static ma_result ma_device_init_fd__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { const char* pDefaultDeviceNames[] = { "/dev/audio", "/dev/audio0" }; const char* pDefaultDeviceCtlNames[] = { "/dev/audioctl", "/dev/audioctl0" }; int fd; int fdFlags = 0; size_t iDefaultDevice = (size_t)-1; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); MA_ASSERT(pDevice != NULL); /* The first thing to do is open the file. */ if (deviceType == ma_device_type_capture) { fdFlags = O_RDONLY; } else { fdFlags = O_WRONLY; } /*fdFlags |= O_NONBLOCK;*/ /* Find the index of the default device as a start. We'll use this index later. Set it to (size_t)-1 otherwise. */ if (pDescriptor->pDeviceID == NULL) { /* Default device. */ for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); ++iDefaultDevice) { fd = open(pDefaultDeviceNames[iDefaultDevice], fdFlags, 0); if (fd != -1) { break; } } } else { /* Specific device. */ fd = open(pDescriptor->pDeviceID->audio4, fdFlags, 0); for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); iDefaultDevice += 1) { if (ma_strcmp(pDefaultDeviceNames[iDefaultDevice], pDescriptor->pDeviceID->audio4) == 0) { break; } } if (iDefaultDevice == ma_countof(pDefaultDeviceNames)) { iDefaultDevice = (size_t)-1; } } if (fd == -1) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to open device."); return ma_result_from_errno(errno); } #if !defined(MA_AUDIO4_USE_NEW_API) /* Old API */ { audio_info_t fdInfo; int fdInfoResult = -1; /* The documentation is a little bit unclear to me as to how it handles formats. It says the following: Regardless of formats supported by underlying driver, the audio driver accepts the following formats. By then the next sentence says this: `encoding` and `precision` are one of the values obtained by AUDIO_GETENC. It sounds like a direct contradiction to me. I'm going to play this safe any only use the best sample format returned by AUDIO_GETENC. If the requested format is supported we'll use that, but otherwise we'll just use our standard format priorities to pick an appropriate one. */ AUDIO_INITINFO(&fdInfo); /* Get the default format from the audioctl file if we're asking for a default device. If we retrieve it from /dev/audio it'll default to mono 8000Hz. */ if (iDefaultDevice != (size_t)-1) { /* We're using a default device. Get the info from the /dev/audioctl file instead of /dev/audio. */ int fdctl = open(pDefaultDeviceCtlNames[iDefaultDevice], fdFlags, 0); if (fdctl != -1) { #if defined(__NetBSD__) && (__NetBSD_Version__ >= 900000000) fdInfoResult = ioctl(fdctl, AUDIO_GETFORMAT, &fdInfo); #else fdInfoResult = ioctl(fdctl, AUDIO_GETINFO, &fdInfo); #endif close(fdctl); } } if (fdInfoResult == -1) { /* We still don't have the default device info so just retrieve it from the main audio device. */ if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] AUDIO_GETINFO failed."); return ma_result_from_errno(errno); } } /* We get the driver to do as much of the data conversion as possible. */ if (deviceType == ma_device_type_capture) { fdInfo.mode = AUMODE_RECORD; ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.record.encoding, &fdInfo.record.precision); if (pDescriptor->channels != 0) { fdInfo.record.channels = ma_clamp(pDescriptor->channels, 1, 12); /* From the documentation: `channels` ranges from 1 to 12. */ } if (pDescriptor->sampleRate != 0) { fdInfo.record.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000); /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */ } } else { fdInfo.mode = AUMODE_PLAY; ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.play.encoding, &fdInfo.play.precision); if (pDescriptor->channels != 0) { fdInfo.play.channels = ma_clamp(pDescriptor->channels, 1, 12); /* From the documentation: `channels` ranges from 1 to 12. */ } if (pDescriptor->sampleRate != 0) { fdInfo.play.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000); /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */ } } if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set device format. AUDIO_SETINFO failed."); return ma_result_from_errno(errno); } if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] AUDIO_GETINFO failed."); return ma_result_from_errno(errno); } if (deviceType == ma_device_type_capture) { internalFormat = ma_format_from_prinfo__audio4(&fdInfo.record); internalChannels = fdInfo.record.channels; internalSampleRate = fdInfo.record.sample_rate; } else { internalFormat = ma_format_from_prinfo__audio4(&fdInfo.play); internalChannels = fdInfo.play.channels; internalSampleRate = fdInfo.play.sample_rate; } if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } /* Buffer. */ { ma_uint32 internalPeriodSizeInBytes; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile); internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels); if (internalPeriodSizeInBytes < 16) { internalPeriodSizeInBytes = 16; } internalPeriods = pDescriptor->periodCount; if (internalPeriods < 2) { internalPeriods = 2; } /* What miniaudio calls a period, audio4 calls a block. */ AUDIO_INITINFO(&fdInfo); fdInfo.hiwat = internalPeriods; fdInfo.lowat = internalPeriods-1; fdInfo.blocksize = internalPeriodSizeInBytes; if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set internal buffer size. AUDIO_SETINFO failed."); return ma_result_from_errno(errno); } internalPeriods = fdInfo.hiwat; internalPeriodSizeInFrames = fdInfo.blocksize / ma_get_bytes_per_frame(internalFormat, internalChannels); } } #else { struct audio_swpar fdPar; /* We need to retrieve the format of the device so we can know the channel count and sample rate. Then we can calculate the buffer size. */ if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to retrieve initial device parameters."); return ma_result_from_errno(errno); } internalFormat = ma_format_from_swpar__audio4(&fdPar); internalChannels = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan; internalSampleRate = fdPar.rate; if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } /* Buffer. */ { ma_uint32 internalPeriodSizeInBytes; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile); /* What miniaudio calls a period, audio4 calls a block. */ internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels); if (internalPeriodSizeInBytes < 16) { internalPeriodSizeInBytes = 16; } fdPar.nblks = pDescriptor->periodCount; fdPar.round = internalPeriodSizeInBytes; if (ioctl(fd, AUDIO_SETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set device parameters."); return ma_result_from_errno(errno); } if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to retrieve actual device parameters."); return ma_result_from_errno(errno); } } internalFormat = ma_format_from_swpar__audio4(&fdPar); internalChannels = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan; internalSampleRate = fdPar.rate; internalPeriods = fdPar.nblks; internalPeriodSizeInFrames = fdPar.round / ma_get_bytes_per_frame(internalFormat, internalChannels); } #endif if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } if (deviceType == ma_device_type_capture) { pDevice->audio4.fdCapture = fd; } else { pDevice->audio4.fdPlayback = fd; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->audio4); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } pDevice->audio4.fdCapture = -1; pDevice->audio4.fdPlayback = -1; /* The version of the operating system dictates whether or not the device is exclusive or shared. NetBSD introduced in-kernel mixing which means it's shared. All other BSD flavours are exclusive as far as I'm aware. */ #if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 800000000 /* NetBSD 8.0+ */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } #else /* All other flavors. */ #endif if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { close(pDevice->audio4.fdCapture); } return result; } } return MA_SUCCESS; } static ma_result ma_device_start__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->audio4.fdCapture == -1) { return MA_INVALID_ARGS; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->audio4.fdPlayback == -1) { return MA_INVALID_ARGS; } } return MA_SUCCESS; } static ma_result ma_device_stop_fd__audio4(ma_device* pDevice, int fd) { if (fd == -1) { return MA_INVALID_ARGS; } #if !defined(MA_AUDIO4_USE_NEW_API) if (ioctl(fd, AUDIO_FLUSH, 0) < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_FLUSH failed."); return ma_result_from_errno(errno); } #else if (ioctl(fd, AUDIO_STOP, 0) < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_STOP failed."); return ma_result_from_errno(errno); } #endif return MA_SUCCESS; } static ma_result ma_device_stop__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result; result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result; /* Drain the device first. If this fails we'll just need to flush without draining. Unfortunately draining isn't available on newer version of OpenBSD. */ #if !defined(MA_AUDIO4_USE_NEW_API) ioctl(pDevice->audio4.fdPlayback, AUDIO_DRAIN, 0); #endif /* Here is where the device is stopped immediately. */ result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdPlayback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_write__audio4(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int result; if (pFramesWritten != NULL) { *pFramesWritten = 0; } result = write(pDevice->audio4.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (result < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to write data to the device."); return ma_result_from_errno(errno); } if (pFramesWritten != NULL) { *pFramesWritten = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } return MA_SUCCESS; } static ma_result ma_device_read__audio4(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int result; if (pFramesRead != NULL) { *pFramesRead = 0; } result = read(pDevice->audio4.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (result < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to read data from the device."); return ma_result_from_errno(errno); } if (pFramesRead != NULL) { *pFramesRead = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } return MA_SUCCESS; } static ma_result ma_context_uninit__audio4(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_audio4); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__audio4(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pCallbacks->onContextInit = ma_context_init__audio4; pCallbacks->onContextUninit = ma_context_uninit__audio4; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__audio4; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__audio4; pCallbacks->onDeviceInit = ma_device_init__audio4; pCallbacks->onDeviceUninit = ma_device_uninit__audio4; pCallbacks->onDeviceStart = ma_device_start__audio4; pCallbacks->onDeviceStop = ma_device_stop__audio4; pCallbacks->onDeviceRead = ma_device_read__audio4; pCallbacks->onDeviceWrite = ma_device_write__audio4; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_AUDIO4 */ /****************************************************************************** OSS Backend ******************************************************************************/ #ifdef MA_HAS_OSS #include #include #include #include #ifndef SNDCTL_DSP_HALT #define SNDCTL_DSP_HALT SNDCTL_DSP_RESET #endif #define MA_OSS_DEFAULT_DEVICE_NAME "/dev/dsp" static int ma_open_temp_device__oss() { /* The OSS sample code uses "/dev/mixer" as the device for getting system properties so I'm going to do the same. */ int fd = open("/dev/mixer", O_RDONLY, 0); if (fd >= 0) { return fd; } return -1; } static ma_result ma_context_open_device__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_share_mode shareMode, int* pfd) { const char* deviceName; int flags; MA_ASSERT(pContext != NULL); MA_ASSERT(pfd != NULL); (void)pContext; *pfd = -1; /* This function should only be called for playback or capture, not duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } deviceName = MA_OSS_DEFAULT_DEVICE_NAME; if (pDeviceID != NULL) { deviceName = pDeviceID->oss; } flags = (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY; if (shareMode == ma_share_mode_exclusive) { flags |= O_EXCL; } *pfd = open(deviceName, flags, 0); if (*pfd == -1) { return ma_result_from_errno(errno); } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__oss(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { int fd; oss_sysinfo si; int result; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); fd = ma_open_temp_device__oss(); if (fd == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration."); return MA_NO_BACKEND; } result = ioctl(fd, SNDCTL_SYSINFO, &si); if (result != -1) { int iAudioDevice; for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) { oss_audioinfo ai; ai.dev = iAudioDevice; result = ioctl(fd, SNDCTL_AUDIOINFO, &ai); if (result != -1) { if (ai.devnode[0] != '\0') { /* <-- Can be blank, according to documentation. */ ma_device_info deviceInfo; ma_bool32 isTerminating = MA_FALSE; MA_ZERO_OBJECT(&deviceInfo); /* ID */ ma_strncpy_s(deviceInfo.id.oss, sizeof(deviceInfo.id.oss), ai.devnode, (size_t)-1); /* The human readable device name should be in the "ai.handle" variable, but it can sometimes be empty in which case we just fall back to "ai.name" which is less user friendly, but usually has a value. */ if (ai.handle[0] != '\0') { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.handle, (size_t)-1); } else { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.name, (size_t)-1); } /* The device can be both playback and capture. */ if (!isTerminating && (ai.caps & PCM_CAP_OUTPUT) != 0) { isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } if (!isTerminating && (ai.caps & PCM_CAP_INPUT) != 0) { isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } if (isTerminating) { break; } } } } } else { close(fd); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve system information for device enumeration."); return MA_NO_BACKEND; } close(fd); return MA_SUCCESS; } static void ma_context_add_native_data_format__oss(ma_context* pContext, oss_audioinfo* pAudioInfo, ma_format format, ma_device_info* pDeviceInfo) { unsigned int minChannels; unsigned int maxChannels; unsigned int iRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pAudioInfo != NULL); MA_ASSERT(pDeviceInfo != NULL); /* If we support all channels we just report 0. */ minChannels = ma_clamp(pAudioInfo->min_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); maxChannels = ma_clamp(pAudioInfo->max_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); /* OSS has this annoying thing where sample rates can be reported in two ways. We prefer explicitness, which OSS has in the form of nrates/rates, however there are times where nrates can be 0, in which case we'll need to use min_rate and max_rate and report only standard rates. */ if (pAudioInfo->nrates > 0) { for (iRate = 0; iRate < pAudioInfo->nrates; iRate += 1) { unsigned int rate = pAudioInfo->rates[iRate]; if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { ma_device_info_add_native_data_format(pDeviceInfo, format, 0, rate, 0); /* Set the channel count to 0 to indicate that all channel counts are supported. */ } else { unsigned int iChannel; for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, rate, 0); } } } } else { for (iRate = 0; iRate < ma_countof(g_maStandardSampleRatePriorities); iRate += 1) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iRate]; if (standardRate >= (ma_uint32)pAudioInfo->min_rate && standardRate <= (ma_uint32)pAudioInfo->max_rate) { if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { ma_device_info_add_native_data_format(pDeviceInfo, format, 0, standardRate, 0); /* Set the channel count to 0 to indicate that all channel counts are supported. */ } else { unsigned int iChannel; for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, standardRate, 0); } } } } } } static ma_result ma_context_get_device_info__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_bool32 foundDevice; int fdTemp; oss_sysinfo si; int result; MA_ASSERT(pContext != NULL); /* Handle the default device a little differently. */ if (pDeviceID == NULL) { if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } return MA_SUCCESS; } /* If we get here it means we are _not_ using the default device. */ foundDevice = MA_FALSE; fdTemp = ma_open_temp_device__oss(); if (fdTemp == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration."); return MA_NO_BACKEND; } result = ioctl(fdTemp, SNDCTL_SYSINFO, &si); if (result != -1) { int iAudioDevice; for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) { oss_audioinfo ai; ai.dev = iAudioDevice; result = ioctl(fdTemp, SNDCTL_AUDIOINFO, &ai); if (result != -1) { if (ma_strcmp(ai.devnode, pDeviceID->oss) == 0) { /* It has the same name, so now just confirm the type. */ if ((deviceType == ma_device_type_playback && ((ai.caps & PCM_CAP_OUTPUT) != 0)) || (deviceType == ma_device_type_capture && ((ai.caps & PCM_CAP_INPUT) != 0))) { unsigned int formatMask; /* ID */ ma_strncpy_s(pDeviceInfo->id.oss, sizeof(pDeviceInfo->id.oss), ai.devnode, (size_t)-1); /* The human readable device name should be in the "ai.handle" variable, but it can sometimes be empty in which case we just fall back to "ai.name" which is less user friendly, but usually has a value. */ if (ai.handle[0] != '\0') { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.handle, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.name, (size_t)-1); } pDeviceInfo->nativeDataFormatCount = 0; if (deviceType == ma_device_type_playback) { formatMask = ai.oformats; } else { formatMask = ai.iformats; } if (((formatMask & AFMT_S16_LE) != 0 && ma_is_little_endian()) || (AFMT_S16_BE && ma_is_big_endian())) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s16, pDeviceInfo); } if (((formatMask & AFMT_S32_LE) != 0 && ma_is_little_endian()) || (AFMT_S32_BE && ma_is_big_endian())) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s32, pDeviceInfo); } if ((formatMask & AFMT_U8) != 0) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_u8, pDeviceInfo); } foundDevice = MA_TRUE; break; } } } } } else { close(fdTemp); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve system information for device enumeration."); return MA_NO_BACKEND; } close(fdTemp); if (!foundDevice) { return MA_NO_DEVICE; } return MA_SUCCESS; } static ma_result ma_device_uninit__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { close(pDevice->oss.fdCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { close(pDevice->oss.fdPlayback); } return MA_SUCCESS; } static int ma_format_to_oss(ma_format format) { int ossFormat = AFMT_U8; switch (format) { case ma_format_s16: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break; case ma_format_s24: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break; case ma_format_s32: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break; case ma_format_f32: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break; case ma_format_u8: default: ossFormat = AFMT_U8; break; } return ossFormat; } static ma_format ma_format_from_oss(int ossFormat) { if (ossFormat == AFMT_U8) { return ma_format_u8; } else { if (ma_is_little_endian()) { switch (ossFormat) { case AFMT_S16_LE: return ma_format_s16; case AFMT_S32_LE: return ma_format_s32; default: return ma_format_unknown; } } else { switch (ossFormat) { case AFMT_S16_BE: return ma_format_s16; case AFMT_S32_BE: return ma_format_s32; default: return ma_format_unknown; } } } return ma_format_unknown; } static ma_result ma_device_init_fd__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { ma_result result; int ossResult; int fd; const ma_device_id* pDeviceID = NULL; ma_share_mode shareMode; int ossFormat; int ossChannels; int ossSampleRate; int ossFragment; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); pDeviceID = pDescriptor->pDeviceID; shareMode = pDescriptor->shareMode; ossFormat = ma_format_to_oss((pDescriptor->format != ma_format_unknown) ? pDescriptor->format : ma_format_s16); /* Use s16 by default because OSS doesn't like floating point. */ ossChannels = (int)(pDescriptor->channels > 0) ? pDescriptor->channels : MA_DEFAULT_CHANNELS; ossSampleRate = (int)(pDescriptor->sampleRate > 0) ? pDescriptor->sampleRate : MA_DEFAULT_SAMPLE_RATE; result = ma_context_open_device__oss(pDevice->pContext, deviceType, pDeviceID, shareMode, &fd); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } /* The OSS documentation is very clear about the order we should be initializing the device's properties: 1) Format 2) Channels 3) Sample rate. */ /* Format. */ ossResult = ioctl(fd, SNDCTL_DSP_SETFMT, &ossFormat); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set format."); return ma_result_from_errno(errno); } /* Channels. */ ossResult = ioctl(fd, SNDCTL_DSP_CHANNELS, &ossChannels); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set channel count."); return ma_result_from_errno(errno); } /* Sample Rate. */ ossResult = ioctl(fd, SNDCTL_DSP_SPEED, &ossSampleRate); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set sample rate."); return ma_result_from_errno(errno); } /* Buffer. The documentation says that the fragment settings should be set as soon as possible, but I'm not sure if it should be done before or after format/channels/rate. OSS wants the fragment size in bytes and a power of 2. When setting, we specify the power, not the actual value. */ { ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInBytes; ma_uint32 ossFragmentSizePower; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, (ma_uint32)ossSampleRate, pConfig->performanceProfile); periodSizeInBytes = ma_round_to_power_of_2(periodSizeInFrames * ma_get_bytes_per_frame(ma_format_from_oss(ossFormat), ossChannels)); if (periodSizeInBytes < 16) { periodSizeInBytes = 16; } ossFragmentSizePower = 4; periodSizeInBytes >>= 4; while (periodSizeInBytes >>= 1) { ossFragmentSizePower += 1; } ossFragment = (int)((pConfig->periods << 16) | ossFragmentSizePower); ossResult = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &ossFragment); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set fragment size and period count."); return ma_result_from_errno(errno); } } /* Internal settings. */ if (deviceType == ma_device_type_capture) { pDevice->oss.fdCapture = fd; } else { pDevice->oss.fdPlayback = fd; } pDescriptor->format = ma_format_from_oss(ossFormat); pDescriptor->channels = ossChannels; pDescriptor->sampleRate = ossSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); pDescriptor->periodCount = (ma_uint32)(ossFragment >> 16); pDescriptor->periodSizeInFrames = (ma_uint32)(1 << (ossFragment & 0xFFFF)) / ma_get_bytes_per_frame(pDescriptor->format, pDescriptor->channels); if (pDescriptor->format == ma_format_unknown) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] The device's internal format is not supported by miniaudio."); return MA_FORMAT_NOT_SUPPORTED; } return MA_SUCCESS; } static ma_result ma_device_init__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ZERO_OBJECT(&pDevice->oss); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } } return MA_SUCCESS; } /* Note on Starting and Stopping ============================= In the past I was using SNDCTL_DSP_HALT to stop the device, however this results in issues when trying to resume the device again. If we use SNDCTL_DSP_HALT, the next write() or read() will fail. Instead what we need to do is just not write or read to and from the device when the device is not running. As a result, both the start and stop functions for OSS are just empty stubs. The starting and stopping logic is handled by ma_device_write__oss() and ma_device_read__oss(). These will check the device state, and if the device is stopped they will simply not do any kind of processing. The downside to this technique is that I've noticed a fairly lengthy delay in stopping the device, up to a second. This is on a virtual machine, and as such might just be due to the virtual drivers, but I'm not fully sure. I am not sure how to work around this problem so for the moment that's just how it's going to have to be. When starting the device, OSS will automatically start it when write() or read() is called. */ static ma_result ma_device_start__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* The device is automatically started with reading and writing. */ (void)pDevice; return MA_SUCCESS; } static ma_result ma_device_stop__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* See note above on why this is empty. */ (void)pDevice; return MA_SUCCESS; } static ma_result ma_device_write__oss(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int resultOSS; ma_uint32 deviceState; if (pFramesWritten != NULL) { *pFramesWritten = 0; } /* Don't do any processing if the device is stopped. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) { return MA_SUCCESS; } resultOSS = write(pDevice->oss.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (resultOSS < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to send data from the client to the device."); return ma_result_from_errno(errno); } if (pFramesWritten != NULL) { *pFramesWritten = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } return MA_SUCCESS; } static ma_result ma_device_read__oss(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int resultOSS; ma_uint32 deviceState; if (pFramesRead != NULL) { *pFramesRead = 0; } /* Don't do any processing if the device is stopped. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) { return MA_SUCCESS; } resultOSS = read(pDevice->oss.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (resultOSS < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to read data from the device to be sent to the client."); return ma_result_from_errno(errno); } if (pFramesRead != NULL) { *pFramesRead = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } return MA_SUCCESS; } static ma_result ma_context_uninit__oss(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_oss); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__oss(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { int fd; int ossVersion; int result; MA_ASSERT(pContext != NULL); (void)pConfig; /* Try opening a temporary device first so we can get version information. This is closed at the end. */ fd = ma_open_temp_device__oss(); if (fd == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open temporary device for retrieving system properties."); /* Looks liks OSS isn't installed, or there are no available devices. */ return MA_NO_BACKEND; } /* Grab the OSS version. */ ossVersion = 0; result = ioctl(fd, OSS_GETVERSION, &ossVersion); if (result == -1) { close(fd); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve OSS version."); return MA_NO_BACKEND; } /* The file handle to temp device is no longer needed. Close ASAP. */ close(fd); pContext->oss.versionMajor = ((ossVersion & 0xFF0000) >> 16); pContext->oss.versionMinor = ((ossVersion & 0x00FF00) >> 8); pCallbacks->onContextInit = ma_context_init__oss; pCallbacks->onContextUninit = ma_context_uninit__oss; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__oss; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__oss; pCallbacks->onDeviceInit = ma_device_init__oss; pCallbacks->onDeviceUninit = ma_device_uninit__oss; pCallbacks->onDeviceStart = ma_device_start__oss; pCallbacks->onDeviceStop = ma_device_stop__oss; pCallbacks->onDeviceRead = ma_device_read__oss; pCallbacks->onDeviceWrite = ma_device_write__oss; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_OSS */ /****************************************************************************** AAudio Backend ******************************************************************************/ #ifdef MA_HAS_AAUDIO #ifdef MA_NO_RUNTIME_LINKING #include #endif typedef int32_t ma_aaudio_result_t; typedef int32_t ma_aaudio_direction_t; typedef int32_t ma_aaudio_sharing_mode_t; typedef int32_t ma_aaudio_format_t; typedef int32_t ma_aaudio_stream_state_t; typedef int32_t ma_aaudio_performance_mode_t; typedef int32_t ma_aaudio_usage_t; typedef int32_t ma_aaudio_content_type_t; typedef int32_t ma_aaudio_input_preset_t; typedef int32_t ma_aaudio_allowed_capture_policy_t; typedef int32_t ma_aaudio_data_callback_result_t; typedef struct ma_AAudioStreamBuilder_t* ma_AAudioStreamBuilder; typedef struct ma_AAudioStream_t* ma_AAudioStream; #define MA_AAUDIO_UNSPECIFIED 0 /* Result codes. miniaudio only cares about the success code. */ #define MA_AAUDIO_OK 0 /* Directions. */ #define MA_AAUDIO_DIRECTION_OUTPUT 0 #define MA_AAUDIO_DIRECTION_INPUT 1 /* Sharing modes. */ #define MA_AAUDIO_SHARING_MODE_EXCLUSIVE 0 #define MA_AAUDIO_SHARING_MODE_SHARED 1 /* Formats. */ #define MA_AAUDIO_FORMAT_PCM_I16 1 #define MA_AAUDIO_FORMAT_PCM_FLOAT 2 /* Stream states. */ #define MA_AAUDIO_STREAM_STATE_UNINITIALIZED 0 #define MA_AAUDIO_STREAM_STATE_UNKNOWN 1 #define MA_AAUDIO_STREAM_STATE_OPEN 2 #define MA_AAUDIO_STREAM_STATE_STARTING 3 #define MA_AAUDIO_STREAM_STATE_STARTED 4 #define MA_AAUDIO_STREAM_STATE_PAUSING 5 #define MA_AAUDIO_STREAM_STATE_PAUSED 6 #define MA_AAUDIO_STREAM_STATE_FLUSHING 7 #define MA_AAUDIO_STREAM_STATE_FLUSHED 8 #define MA_AAUDIO_STREAM_STATE_STOPPING 9 #define MA_AAUDIO_STREAM_STATE_STOPPED 10 #define MA_AAUDIO_STREAM_STATE_CLOSING 11 #define MA_AAUDIO_STREAM_STATE_CLOSED 12 #define MA_AAUDIO_STREAM_STATE_DISCONNECTED 13 /* Performance modes. */ #define MA_AAUDIO_PERFORMANCE_MODE_NONE 10 #define MA_AAUDIO_PERFORMANCE_MODE_POWER_SAVING 11 #define MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY 12 /* Usage types. */ #define MA_AAUDIO_USAGE_MEDIA 1 #define MA_AAUDIO_USAGE_VOICE_COMMUNICATION 2 #define MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING 3 #define MA_AAUDIO_USAGE_ALARM 4 #define MA_AAUDIO_USAGE_NOTIFICATION 5 #define MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE 6 #define MA_AAUDIO_USAGE_NOTIFICATION_EVENT 10 #define MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY 11 #define MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE 12 #define MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION 13 #define MA_AAUDIO_USAGE_GAME 14 #define MA_AAUDIO_USAGE_ASSISTANT 16 #define MA_AAUDIO_SYSTEM_USAGE_EMERGENCY 1000 #define MA_AAUDIO_SYSTEM_USAGE_SAFETY 1001 #define MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS 1002 #define MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT 1003 /* Content types. */ #define MA_AAUDIO_CONTENT_TYPE_SPEECH 1 #define MA_AAUDIO_CONTENT_TYPE_MUSIC 2 #define MA_AAUDIO_CONTENT_TYPE_MOVIE 3 #define MA_AAUDIO_CONTENT_TYPE_SONIFICATION 4 /* Input presets. */ #define MA_AAUDIO_INPUT_PRESET_GENERIC 1 #define MA_AAUDIO_INPUT_PRESET_CAMCORDER 5 #define MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION 6 #define MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION 7 #define MA_AAUDIO_INPUT_PRESET_UNPROCESSED 9 #define MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE 10 /* Allowed Capture Policies */ #define MA_AAUDIO_ALLOW_CAPTURE_BY_ALL 1 #define MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM 2 #define MA_AAUDIO_ALLOW_CAPTURE_BY_NONE 3 /* Callback results. */ #define MA_AAUDIO_CALLBACK_RESULT_CONTINUE 0 #define MA_AAUDIO_CALLBACK_RESULT_STOP 1 typedef ma_aaudio_data_callback_result_t (* ma_AAudioStream_dataCallback) (ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t numFrames); typedef void (* ma_AAudioStream_errorCallback)(ma_AAudioStream *pStream, void *pUserData, ma_aaudio_result_t error); typedef ma_aaudio_result_t (* MA_PFN_AAudio_createStreamBuilder) (ma_AAudioStreamBuilder** ppBuilder); typedef ma_aaudio_result_t (* MA_PFN_AAudioStreamBuilder_delete) (ma_AAudioStreamBuilder* pBuilder); typedef void (* MA_PFN_AAudioStreamBuilder_setDeviceId) (ma_AAudioStreamBuilder* pBuilder, int32_t deviceId); typedef void (* MA_PFN_AAudioStreamBuilder_setDirection) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_direction_t direction); typedef void (* MA_PFN_AAudioStreamBuilder_setSharingMode) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_sharing_mode_t sharingMode); typedef void (* MA_PFN_AAudioStreamBuilder_setFormat) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_format_t format); typedef void (* MA_PFN_AAudioStreamBuilder_setChannelCount) (ma_AAudioStreamBuilder* pBuilder, int32_t channelCount); typedef void (* MA_PFN_AAudioStreamBuilder_setSampleRate) (ma_AAudioStreamBuilder* pBuilder, int32_t sampleRate); typedef void (* MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)(ma_AAudioStreamBuilder* pBuilder, int32_t numFrames); typedef void (* MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback) (ma_AAudioStreamBuilder* pBuilder, int32_t numFrames); typedef void (* MA_PFN_AAudioStreamBuilder_setDataCallback) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_dataCallback callback, void* pUserData); typedef void (* MA_PFN_AAudioStreamBuilder_setErrorCallback) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_errorCallback callback, void* pUserData); typedef void (* MA_PFN_AAudioStreamBuilder_setPerformanceMode) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_performance_mode_t mode); typedef void (* MA_PFN_AAudioStreamBuilder_setUsage) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_usage_t contentType); typedef void (* MA_PFN_AAudioStreamBuilder_setContentType) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_content_type_t contentType); typedef void (* MA_PFN_AAudioStreamBuilder_setInputPreset) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_input_preset_t inputPreset); typedef void (* MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_allowed_capture_policy_t policy); typedef ma_aaudio_result_t (* MA_PFN_AAudioStreamBuilder_openStream) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_close) (ma_AAudioStream* pStream); typedef ma_aaudio_stream_state_t (* MA_PFN_AAudioStream_getState) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_waitForStateChange) (ma_AAudioStream* pStream, ma_aaudio_stream_state_t inputState, ma_aaudio_stream_state_t* pNextState, int64_t timeoutInNanoseconds); typedef ma_aaudio_format_t (* MA_PFN_AAudioStream_getFormat) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getChannelCount) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getSampleRate) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getBufferCapacityInFrames) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getFramesPerDataCallback) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getFramesPerBurst) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_requestStart) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_requestStop) (ma_AAudioStream* pStream); static ma_result ma_result_from_aaudio(ma_aaudio_result_t resultAA) { switch (resultAA) { case MA_AAUDIO_OK: return MA_SUCCESS; default: break; } return MA_ERROR; } static ma_aaudio_usage_t ma_to_usage__aaudio(ma_aaudio_usage usage) { switch (usage) { case ma_aaudio_usage_media: return MA_AAUDIO_USAGE_MEDIA; case ma_aaudio_usage_voice_communication: return MA_AAUDIO_USAGE_VOICE_COMMUNICATION; case ma_aaudio_usage_voice_communication_signalling: return MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING; case ma_aaudio_usage_alarm: return MA_AAUDIO_USAGE_ALARM; case ma_aaudio_usage_notification: return MA_AAUDIO_USAGE_NOTIFICATION; case ma_aaudio_usage_notification_ringtone: return MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE; case ma_aaudio_usage_notification_event: return MA_AAUDIO_USAGE_NOTIFICATION_EVENT; case ma_aaudio_usage_assistance_accessibility: return MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY; case ma_aaudio_usage_assistance_navigation_guidance: return MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE; case ma_aaudio_usage_assistance_sonification: return MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION; case ma_aaudio_usage_game: return MA_AAUDIO_USAGE_GAME; case ma_aaudio_usage_assitant: return MA_AAUDIO_USAGE_ASSISTANT; case ma_aaudio_usage_emergency: return MA_AAUDIO_SYSTEM_USAGE_EMERGENCY; case ma_aaudio_usage_safety: return MA_AAUDIO_SYSTEM_USAGE_SAFETY; case ma_aaudio_usage_vehicle_status: return MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS; case ma_aaudio_usage_announcement: return MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT; default: break; } return MA_AAUDIO_USAGE_MEDIA; } static ma_aaudio_content_type_t ma_to_content_type__aaudio(ma_aaudio_content_type contentType) { switch (contentType) { case ma_aaudio_content_type_speech: return MA_AAUDIO_CONTENT_TYPE_SPEECH; case ma_aaudio_content_type_music: return MA_AAUDIO_CONTENT_TYPE_MUSIC; case ma_aaudio_content_type_movie: return MA_AAUDIO_CONTENT_TYPE_MOVIE; case ma_aaudio_content_type_sonification: return MA_AAUDIO_CONTENT_TYPE_SONIFICATION; default: break; } return MA_AAUDIO_CONTENT_TYPE_SPEECH; } static ma_aaudio_input_preset_t ma_to_input_preset__aaudio(ma_aaudio_input_preset inputPreset) { switch (inputPreset) { case ma_aaudio_input_preset_generic: return MA_AAUDIO_INPUT_PRESET_GENERIC; case ma_aaudio_input_preset_camcorder: return MA_AAUDIO_INPUT_PRESET_CAMCORDER; case ma_aaudio_input_preset_voice_recognition: return MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION; case ma_aaudio_input_preset_voice_communication: return MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION; case ma_aaudio_input_preset_unprocessed: return MA_AAUDIO_INPUT_PRESET_UNPROCESSED; case ma_aaudio_input_preset_voice_performance: return MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE; default: break; } return MA_AAUDIO_INPUT_PRESET_GENERIC; } static ma_aaudio_allowed_capture_policy_t ma_to_allowed_capture_policy__aaudio(ma_aaudio_allowed_capture_policy allowedCapturePolicy) { switch (allowedCapturePolicy) { case ma_aaudio_allow_capture_by_all: return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL; case ma_aaudio_allow_capture_by_system: return MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM; case ma_aaudio_allow_capture_by_none: return MA_AAUDIO_ALLOW_CAPTURE_BY_NONE; default: break; } return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL; } static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUserData, ma_aaudio_result_t error) { ma_result result; ma_job job; ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); (void)error; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] ERROR CALLBACK: error=%d, AAudioStream_getState()=%d\n", error, ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream)); /* When we get an error, we'll assume that the stream is in an erroneous state and needs to be restarted. From the documentation, we cannot do this from the error callback. Therefore we are going to use an event thread for the AAudio backend to do this cleanly and safely. */ job = ma_job_init(MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE); job.data.device.aaudio.reroute.pDevice = pDevice; if (pStream == pDevice->aaudio.pStreamCapture) { job.data.device.aaudio.reroute.deviceType = ma_device_type_capture; } else { job.data.device.aaudio.reroute.deviceType = ma_device_type_playback; } result = ma_device_job_thread_post(&pDevice->pContext->aaudio.jobThread, &job); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Device Disconnected. Failed to post job for rerouting.\n"); return; } } static ma_aaudio_data_callback_result_t ma_stream_data_callback_capture__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); if (frameCount > 0) { ma_device_handle_backend_data_callback(pDevice, NULL, pAudioData, (ma_uint32)frameCount); } (void)pStream; return MA_AAUDIO_CALLBACK_RESULT_CONTINUE; } static ma_aaudio_data_callback_result_t ma_stream_data_callback_playback__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); /* I've had a report that AAudio can sometimes post a frame count of 0. We need to check for that here so we don't get any errors at a deeper level. I'm doing the same with the capture side for safety, though I've not yet had any reports about that one. */ if (frameCount > 0) { ma_device_handle_backend_data_callback(pDevice, pAudioData, NULL, (ma_uint32)frameCount); } (void)pStream; return MA_AAUDIO_CALLBACK_RESULT_CONTINUE; } static ma_result ma_create_and_configure_AAudioStreamBuilder__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, const ma_device_descriptor* pDescriptor, const ma_device_config* pConfig, ma_device* pDevice, ma_AAudioStreamBuilder** ppBuilder) { ma_AAudioStreamBuilder* pBuilder; ma_aaudio_result_t resultAA; /* Safety. */ *ppBuilder = NULL; resultAA = ((MA_PFN_AAudio_createStreamBuilder)pContext->aaudio.AAudio_createStreamBuilder)(&pBuilder); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } if (pDeviceID != NULL) { ((MA_PFN_AAudioStreamBuilder_setDeviceId)pContext->aaudio.AAudioStreamBuilder_setDeviceId)(pBuilder, pDeviceID->aaudio); } ((MA_PFN_AAudioStreamBuilder_setDirection)pContext->aaudio.AAudioStreamBuilder_setDirection)(pBuilder, (deviceType == ma_device_type_playback) ? MA_AAUDIO_DIRECTION_OUTPUT : MA_AAUDIO_DIRECTION_INPUT); ((MA_PFN_AAudioStreamBuilder_setSharingMode)pContext->aaudio.AAudioStreamBuilder_setSharingMode)(pBuilder, (shareMode == ma_share_mode_shared) ? MA_AAUDIO_SHARING_MODE_SHARED : MA_AAUDIO_SHARING_MODE_EXCLUSIVE); /* If we have a device descriptor make sure we configure the stream builder to take our requested parameters. */ if (pDescriptor != NULL) { MA_ASSERT(pConfig != NULL); /* We must have a device config if we also have a descriptor. The config is required for AAudio specific configuration options. */ if (pDescriptor->sampleRate != 0) { ((MA_PFN_AAudioStreamBuilder_setSampleRate)pContext->aaudio.AAudioStreamBuilder_setSampleRate)(pBuilder, pDescriptor->sampleRate); } if (pDescriptor->channels != 0) { ((MA_PFN_AAudioStreamBuilder_setChannelCount)pContext->aaudio.AAudioStreamBuilder_setChannelCount)(pBuilder, pDescriptor->channels); } if (pDescriptor->format != ma_format_unknown) { ((MA_PFN_AAudioStreamBuilder_setFormat)pContext->aaudio.AAudioStreamBuilder_setFormat)(pBuilder, (pDescriptor->format == ma_format_s16) ? MA_AAUDIO_FORMAT_PCM_I16 : MA_AAUDIO_FORMAT_PCM_FLOAT); } /* There have been reports where setting the frames per data callback results in an error. In particular, re-routing may inadvertently switch from low-latency mode, resulting in a less stable stream from the legacy path (AudioStreamLegacy). To address this, we simply don't set the value. It can still be set if it's explicitly requested via the aaudio.allowSetBufferCapacity variable in the device config. */ if ((!pConfig->aaudio.enableCompatibilityWorkarounds || ma_android_sdk_version() > 30) && pConfig->aaudio.allowSetBufferCapacity) { /* AAudio is annoying when it comes to its buffer calculation stuff because it doesn't let you retrieve the actual sample rate until after you've opened the stream. But you need to configure the buffer capacity before you open the stream... :/ To solve, we're just going to assume MA_DEFAULT_SAMPLE_RATE (48000) and move on. */ ma_uint32 bufferCapacityInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, pDescriptor->sampleRate, pConfig->performanceProfile) * pDescriptor->periodCount; ((MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames)(pBuilder, bufferCapacityInFrames); ((MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback)pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback)(pBuilder, bufferCapacityInFrames / pDescriptor->periodCount); } if (deviceType == ma_device_type_capture) { if (pConfig->aaudio.inputPreset != ma_aaudio_input_preset_default && pContext->aaudio.AAudioStreamBuilder_setInputPreset != NULL) { ((MA_PFN_AAudioStreamBuilder_setInputPreset)pContext->aaudio.AAudioStreamBuilder_setInputPreset)(pBuilder, ma_to_input_preset__aaudio(pConfig->aaudio.inputPreset)); } ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_capture__aaudio, (void*)pDevice); } else { if (pConfig->aaudio.usage != ma_aaudio_usage_default && pContext->aaudio.AAudioStreamBuilder_setUsage != NULL) { ((MA_PFN_AAudioStreamBuilder_setUsage)pContext->aaudio.AAudioStreamBuilder_setUsage)(pBuilder, ma_to_usage__aaudio(pConfig->aaudio.usage)); } if (pConfig->aaudio.contentType != ma_aaudio_content_type_default && pContext->aaudio.AAudioStreamBuilder_setContentType != NULL) { ((MA_PFN_AAudioStreamBuilder_setContentType)pContext->aaudio.AAudioStreamBuilder_setContentType)(pBuilder, ma_to_content_type__aaudio(pConfig->aaudio.contentType)); } if (pConfig->aaudio.allowedCapturePolicy != ma_aaudio_allow_capture_default && pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy != NULL) { ((MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy)pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy)(pBuilder, ma_to_allowed_capture_policy__aaudio(pConfig->aaudio.allowedCapturePolicy)); } ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_playback__aaudio, (void*)pDevice); } /* If we set AAUDIO_PERFORMANCE_MODE_LOW_LATENCY, we allow for MMAP (non-legacy path). Since there's a mapping between miniaudio's performance profiles and AAudio's performance modes, let's use it. Beware though, with a conservative performance profile, AAudio will indeed take the legacy path. */ ((MA_PFN_AAudioStreamBuilder_setPerformanceMode)pContext->aaudio.AAudioStreamBuilder_setPerformanceMode)(pBuilder, (pConfig->performanceProfile == ma_performance_profile_low_latency) ? MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY : MA_AAUDIO_PERFORMANCE_MODE_NONE); /* We need to set an error callback to detect device changes. */ if (pDevice != NULL) { /* <-- pDevice should never be null if pDescriptor is not null, which is always the case if we hit this branch. Check anyway for safety. */ ((MA_PFN_AAudioStreamBuilder_setErrorCallback)pContext->aaudio.AAudioStreamBuilder_setErrorCallback)(pBuilder, ma_stream_error_callback__aaudio, (void*)pDevice); } } *ppBuilder = pBuilder; return MA_SUCCESS; } static ma_result ma_open_stream_and_close_builder__aaudio(ma_context* pContext, ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream) { ma_result result; result = ma_result_from_aaudio(((MA_PFN_AAudioStreamBuilder_openStream)pContext->aaudio.AAudioStreamBuilder_openStream)(pBuilder, ppStream)); ((MA_PFN_AAudioStreamBuilder_delete)pContext->aaudio.AAudioStreamBuilder_delete)(pBuilder); return result; } static ma_result ma_open_stream_basic__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, ma_AAudioStream** ppStream) { ma_result result; ma_AAudioStreamBuilder* pBuilder; *ppStream = NULL; result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pContext, pDeviceID, deviceType, shareMode, NULL, NULL, NULL, &pBuilder); if (result != MA_SUCCESS) { return result; } /* Let's give AAudio a hint to avoid the legacy path (AudioStreamLegacy). */ ((MA_PFN_AAudioStreamBuilder_setPerformanceMode)pContext->aaudio.AAudioStreamBuilder_setPerformanceMode)(pBuilder, MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY); return ma_open_stream_and_close_builder__aaudio(pContext, pBuilder, ppStream); } static ma_result ma_open_stream__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, const ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream) { ma_result result; ma_AAudioStreamBuilder* pBuilder; MA_ASSERT(pDevice != NULL); MA_ASSERT(pDescriptor != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); /* This function should not be called for a full-duplex device type. */ *ppStream = NULL; result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pDevice->pContext, pDescriptor->pDeviceID, deviceType, pDescriptor->shareMode, pDescriptor, pConfig, pDevice, &pBuilder); if (result != MA_SUCCESS) { return result; } return ma_open_stream_and_close_builder__aaudio(pDevice->pContext, pBuilder, ppStream); } static ma_result ma_close_stream__aaudio(ma_context* pContext, ma_AAudioStream* pStream) { if (pStream == NULL) { return MA_INVALID_ARGS; } return ma_result_from_aaudio(((MA_PFN_AAudioStream_close)pContext->aaudio.AAudioStream_close)(pStream)); } static ma_bool32 ma_has_default_device__aaudio(ma_context* pContext, ma_device_type deviceType) { /* The only way to know this is to try creating a stream. */ ma_AAudioStream* pStream; ma_result result = ma_open_stream_basic__aaudio(pContext, NULL, deviceType, ma_share_mode_shared, &pStream); if (result != MA_SUCCESS) { return MA_FALSE; } ma_close_stream__aaudio(pContext, pStream); return MA_TRUE; } static ma_result ma_wait_for_simple_state_transition__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_aaudio_stream_state_t oldState, ma_aaudio_stream_state_t newState) { ma_aaudio_stream_state_t actualNewState; ma_aaudio_result_t resultAA = ((MA_PFN_AAudioStream_waitForStateChange)pContext->aaudio.AAudioStream_waitForStateChange)(pStream, oldState, &actualNewState, 5000000000); /* 5 second timeout. */ if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } if (newState != actualNewState) { return MA_ERROR; /* Failed to transition into the expected state. */ } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__aaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Unfortunately AAudio does not have an enumeration API. Therefore I'm only going to report default devices, but only if it can instantiate a stream. */ /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); if (ma_has_default_device__aaudio(pContext, ma_device_type_playback)) { cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); if (ma_has_default_device__aaudio(pContext, ma_device_type_capture)) { cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } return MA_SUCCESS; } static void ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_format format, ma_uint32 flags, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(pStream != NULL); MA_ASSERT(pDeviceInfo != NULL); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = ((MA_PFN_AAudioStream_getChannelCount)pContext->aaudio.AAudioStream_getChannelCount)(pStream); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pContext->aaudio.AAudioStream_getSampleRate)(pStream); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } static void ma_context_add_native_data_format_from_AAudioStream__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_uint32 flags, ma_device_info* pDeviceInfo) { /* AAudio supports s16 and f32. */ ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_f32, flags, pDeviceInfo); ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_s16, flags, pDeviceInfo); } static ma_result ma_context_get_device_info__aaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_AAudioStream* pStream; ma_result result; MA_ASSERT(pContext != NULL); /* ID */ if (pDeviceID != NULL) { pDeviceInfo->id.aaudio = pDeviceID->aaudio; } else { pDeviceInfo->id.aaudio = MA_AAUDIO_UNSPECIFIED; } /* Name */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->nativeDataFormatCount = 0; /* We'll need to open the device to get accurate sample rate and channel count information. */ result = ma_open_stream_basic__aaudio(pContext, pDeviceID, deviceType, ma_share_mode_shared, &pStream); if (result != MA_SUCCESS) { return result; } ma_context_add_native_data_format_from_AAudioStream__aaudio(pContext, pStream, 0, pDeviceInfo); ma_close_stream__aaudio(pContext, pStream); pStream = NULL; return MA_SUCCESS; } static ma_result ma_close_streams__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* When re-routing, streams may have been closed and never re-opened. Hence the extra checks below. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); pDevice->aaudio.pStreamCapture = NULL; } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); pDevice->aaudio.pStreamPlayback = NULL; } return MA_SUCCESS; } static ma_result ma_device_uninit__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to close the streams. */ ma_mutex_lock(&pDevice->aaudio.rerouteLock); { ma_close_streams__aaudio(pDevice); } ma_mutex_unlock(&pDevice->aaudio.rerouteLock); /* Destroy re-routing lock. */ ma_mutex_uninit(&pDevice->aaudio.rerouteLock); return MA_SUCCESS; } static ma_result ma_device_init_by_type__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream) { ma_result result; int32_t bufferCapacityInFrames; int32_t framesPerDataCallback; ma_AAudioStream* pStream; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDescriptor != NULL); *ppStream = NULL; /* Safety. */ /* First step is to open the stream. From there we'll be able to extract the internal configuration. */ result = ma_open_stream__aaudio(pDevice, pConfig, deviceType, pDescriptor, &pStream); if (result != MA_SUCCESS) { return result; /* Failed to open the AAudio stream. */ } /* Now extract the internal configuration. */ pDescriptor->format = (((MA_PFN_AAudioStream_getFormat)pDevice->pContext->aaudio.AAudioStream_getFormat)(pStream) == MA_AAUDIO_FORMAT_PCM_I16) ? ma_format_s16 : ma_format_f32; pDescriptor->channels = ((MA_PFN_AAudioStream_getChannelCount)pDevice->pContext->aaudio.AAudioStream_getChannelCount)(pStream); pDescriptor->sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pDevice->pContext->aaudio.AAudioStream_getSampleRate)(pStream); /* For the channel map we need to be sure we don't overflow any buffers. */ if (pDescriptor->channels <= MA_MAX_CHANNELS) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); /* <-- Cannot find info on channel order, so assuming a default. */ } else { ma_channel_map_init_blank(pDescriptor->channelMap, MA_MAX_CHANNELS); /* Too many channels. Use a blank channel map. */ } bufferCapacityInFrames = ((MA_PFN_AAudioStream_getBufferCapacityInFrames)pDevice->pContext->aaudio.AAudioStream_getBufferCapacityInFrames)(pStream); framesPerDataCallback = ((MA_PFN_AAudioStream_getFramesPerDataCallback)pDevice->pContext->aaudio.AAudioStream_getFramesPerDataCallback)(pStream); if (framesPerDataCallback > 0) { pDescriptor->periodSizeInFrames = framesPerDataCallback; pDescriptor->periodCount = bufferCapacityInFrames / framesPerDataCallback; } else { pDescriptor->periodSizeInFrames = bufferCapacityInFrames; pDescriptor->periodCount = 1; } *ppStream = pStream; return MA_SUCCESS; } static ma_result ma_device_init_streams__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } pDevice->aaudio.usage = pConfig->aaudio.usage; pDevice->aaudio.contentType = pConfig->aaudio.contentType; pDevice->aaudio.inputPreset = pConfig->aaudio.inputPreset; pDevice->aaudio.allowedCapturePolicy = pConfig->aaudio.allowedCapturePolicy; pDevice->aaudio.noAutoStartAfterReroute = pConfig->aaudio.noAutoStartAfterReroute; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_capture, pDescriptorCapture, (ma_AAudioStream**)&pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_playback, pDescriptorPlayback, (ma_AAudioStream**)&pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_init__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); result = ma_device_init_streams__aaudio(pDevice, pConfig, pDescriptorPlayback, pDescriptorCapture); if (result != MA_SUCCESS) { return result; } result = ma_mutex_init(&pDevice->aaudio.rerouteLock); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static ma_result ma_device_start_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream) { ma_aaudio_result_t resultAA; ma_aaudio_stream_state_t currentState; MA_ASSERT(pDevice != NULL); if (pStream == NULL) { return MA_INVALID_ARGS; } resultAA = ((MA_PFN_AAudioStream_requestStart)pDevice->pContext->aaudio.AAudioStream_requestStart)(pStream); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } /* Do we actually need to wait for the device to transition into its started state? */ /* The device should be in either a starting or started state. If it's not set to started we need to wait for it to transition. It should go from starting to started. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState != MA_AAUDIO_STREAM_STATE_STARTED) { ma_result result; if (currentState != MA_AAUDIO_STREAM_STATE_STARTING) { return MA_ERROR; /* Expecting the stream to be a starting or started state. */ } result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STARTED); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_stop_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream) { ma_aaudio_result_t resultAA; ma_aaudio_stream_state_t currentState; MA_ASSERT(pDevice != NULL); if (pStream == NULL) { return MA_INVALID_ARGS; } /* From the AAudio documentation: The stream will stop after all of the data currently buffered has been played. This maps with miniaudio's requirement that device's be drained which means we don't need to implement any draining logic. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState == MA_AAUDIO_STREAM_STATE_DISCONNECTED) { return MA_SUCCESS; /* The device is disconnected. Don't try stopping it. */ } resultAA = ((MA_PFN_AAudioStream_requestStop)pDevice->pContext->aaudio.AAudioStream_requestStop)(pStream); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } /* The device should be in either a stopping or stopped state. If it's not set to started we need to wait for it to transition. It should go from stopping to stopped. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState != MA_AAUDIO_STREAM_STATE_STOPPED) { ma_result result; if (currentState != MA_AAUDIO_STREAM_STATE_STOPPING) { return MA_ERROR; /* Expecting the stream to be a stopping or stopped state. */ } result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STOPPED); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { if (pDevice->type == ma_device_type_duplex) { ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); } return result; } } return MA_SUCCESS; } static ma_result ma_device_stop__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { return result; } } ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type deviceType) { ma_result result; int32_t retries = 0; MA_ASSERT(pDevice != NULL); /* TODO: Stop retrying if main thread is about to uninit device. */ ma_mutex_lock(&pDevice->aaudio.rerouteLock); { error_disconnected: /* The first thing to do is close the streams. */ ma_close_streams__aaudio(pDevice); /* Now we need to reinitialize each streams. The hardest part with this is just filling output the config and descriptors. */ ma_device_config deviceConfig; ma_device_descriptor descriptorPlayback; ma_device_descriptor descriptorCapture; deviceConfig = ma_device_config_init(deviceType); deviceConfig.playback.pDeviceID = NULL; /* Only doing rerouting with default devices. */ deviceConfig.playback.shareMode = pDevice->playback.shareMode; deviceConfig.playback.format = pDevice->playback.format; deviceConfig.playback.channels = pDevice->playback.channels; deviceConfig.capture.pDeviceID = NULL; /* Only doing rerouting with default devices. */ deviceConfig.capture.shareMode = pDevice->capture.shareMode; deviceConfig.capture.format = pDevice->capture.format; deviceConfig.capture.channels = pDevice->capture.channels; deviceConfig.sampleRate = pDevice->sampleRate; deviceConfig.aaudio.usage = pDevice->aaudio.usage; deviceConfig.aaudio.contentType = pDevice->aaudio.contentType; deviceConfig.aaudio.inputPreset = pDevice->aaudio.inputPreset; deviceConfig.aaudio.allowedCapturePolicy = pDevice->aaudio.allowedCapturePolicy; deviceConfig.aaudio.noAutoStartAfterReroute = pDevice->aaudio.noAutoStartAfterReroute; deviceConfig.periods = 1; /* Try to get an accurate period size. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { deviceConfig.periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames; } else { deviceConfig.periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames; } if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { descriptorCapture.pDeviceID = deviceConfig.capture.pDeviceID; descriptorCapture.shareMode = deviceConfig.capture.shareMode; descriptorCapture.format = deviceConfig.capture.format; descriptorCapture.channels = deviceConfig.capture.channels; descriptorCapture.sampleRate = deviceConfig.sampleRate; descriptorCapture.periodSizeInFrames = deviceConfig.periodSizeInFrames; descriptorCapture.periodCount = deviceConfig.periods; } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { descriptorPlayback.pDeviceID = deviceConfig.playback.pDeviceID; descriptorPlayback.shareMode = deviceConfig.playback.shareMode; descriptorPlayback.format = deviceConfig.playback.format; descriptorPlayback.channels = deviceConfig.playback.channels; descriptorPlayback.sampleRate = deviceConfig.sampleRate; descriptorPlayback.periodSizeInFrames = deviceConfig.periodSizeInFrames; descriptorPlayback.periodCount = deviceConfig.periods; } result = ma_device_init_streams__aaudio(pDevice, &deviceConfig, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to create stream after route change."); goto done; } result = ma_device_post_init(pDevice, deviceType, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to initialize device after route change."); ma_close_streams__aaudio(pDevice); goto done; } /* We'll only ever do this in response to a reroute. */ ma_device__on_notification_rerouted(pDevice); /* If the device is started, start the streams. Maybe make this configurable? */ if (ma_device_get_state(pDevice) == ma_device_state_started) { if (pDevice->aaudio.noAutoStartAfterReroute == MA_FALSE) { result = ma_device_start__aaudio(pDevice); if (result != MA_SUCCESS) { /* We got disconnected! Retry a few times, until we find a connected device! */ retries += 1; if (retries <= 3) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Failed to start stream after route change, retrying(%d)", retries); goto error_disconnected; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Failed to start stream after route change."); goto done; } } else { ma_device_stop(pDevice); /* Do a full device stop so we set internal state correctly. */ } } result = MA_SUCCESS; } done: /* Re-routing done */ ma_mutex_unlock(&pDevice->aaudio.rerouteLock); return result; } static ma_result ma_device_get_info__aaudio(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo) { ma_AAudioStream* pStream = NULL; MA_ASSERT(pDevice != NULL); MA_ASSERT(type != ma_device_type_duplex); MA_ASSERT(pDeviceInfo != NULL); if (type == ma_device_type_capture) { pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture; pDeviceInfo->id.aaudio = pDevice->capture.id.aaudio; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ } if (type == ma_device_type_playback) { pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback; pDeviceInfo->id.aaudio = pDevice->playback.id.aaudio; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ } /* Safety. Should never happen. */ if (pStream == NULL) { return MA_INVALID_OPERATION; } pDeviceInfo->nativeDataFormatCount = 0; ma_context_add_native_data_format_from_AAudioStream__aaudio(pDevice->pContext, pStream, 0, pDeviceInfo); return MA_SUCCESS; } static ma_result ma_context_uninit__aaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_aaudio); ma_device_job_thread_uninit(&pContext->aaudio.jobThread, &pContext->allocationCallbacks); ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio); pContext->aaudio.hAAudio = NULL; return MA_SUCCESS; } static ma_result ma_context_init__aaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #if !defined(MA_NO_RUNTIME_LINKING) size_t i; const char* libNames[] = { "libaaudio.so" }; for (i = 0; i < ma_countof(libNames); ++i) { pContext->aaudio.hAAudio = ma_dlopen(ma_context_get_log(pContext), libNames[i]); if (pContext->aaudio.hAAudio != NULL) { break; } } if (pContext->aaudio.hAAudio == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->aaudio.AAudio_createStreamBuilder = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudio_createStreamBuilder"); pContext->aaudio.AAudioStreamBuilder_delete = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_delete"); pContext->aaudio.AAudioStreamBuilder_setDeviceId = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDeviceId"); pContext->aaudio.AAudioStreamBuilder_setDirection = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDirection"); pContext->aaudio.AAudioStreamBuilder_setSharingMode = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setSharingMode"); pContext->aaudio.AAudioStreamBuilder_setFormat = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setFormat"); pContext->aaudio.AAudioStreamBuilder_setChannelCount = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setChannelCount"); pContext->aaudio.AAudioStreamBuilder_setSampleRate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setSampleRate"); pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setBufferCapacityInFrames"); pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setFramesPerDataCallback"); pContext->aaudio.AAudioStreamBuilder_setDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDataCallback"); pContext->aaudio.AAudioStreamBuilder_setErrorCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setErrorCallback"); pContext->aaudio.AAudioStreamBuilder_setPerformanceMode = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setPerformanceMode"); pContext->aaudio.AAudioStreamBuilder_setUsage = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setUsage"); pContext->aaudio.AAudioStreamBuilder_setContentType = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setContentType"); pContext->aaudio.AAudioStreamBuilder_setInputPreset = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setInputPreset"); pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setAllowedCapturePolicy"); pContext->aaudio.AAudioStreamBuilder_openStream = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_openStream"); pContext->aaudio.AAudioStream_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_close"); pContext->aaudio.AAudioStream_getState = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getState"); pContext->aaudio.AAudioStream_waitForStateChange = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_waitForStateChange"); pContext->aaudio.AAudioStream_getFormat = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFormat"); pContext->aaudio.AAudioStream_getChannelCount = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getChannelCount"); pContext->aaudio.AAudioStream_getSampleRate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getSampleRate"); pContext->aaudio.AAudioStream_getBufferCapacityInFrames = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getBufferCapacityInFrames"); pContext->aaudio.AAudioStream_getFramesPerDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFramesPerDataCallback"); pContext->aaudio.AAudioStream_getFramesPerBurst = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFramesPerBurst"); pContext->aaudio.AAudioStream_requestStart = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_requestStart"); pContext->aaudio.AAudioStream_requestStop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_requestStop"); #else pContext->aaudio.AAudio_createStreamBuilder = (ma_proc)AAudio_createStreamBuilder; pContext->aaudio.AAudioStreamBuilder_delete = (ma_proc)AAudioStreamBuilder_delete; pContext->aaudio.AAudioStreamBuilder_setDeviceId = (ma_proc)AAudioStreamBuilder_setDeviceId; pContext->aaudio.AAudioStreamBuilder_setDirection = (ma_proc)AAudioStreamBuilder_setDirection; pContext->aaudio.AAudioStreamBuilder_setSharingMode = (ma_proc)AAudioStreamBuilder_setSharingMode; pContext->aaudio.AAudioStreamBuilder_setFormat = (ma_proc)AAudioStreamBuilder_setFormat; pContext->aaudio.AAudioStreamBuilder_setChannelCount = (ma_proc)AAudioStreamBuilder_setChannelCount; pContext->aaudio.AAudioStreamBuilder_setSampleRate = (ma_proc)AAudioStreamBuilder_setSampleRate; pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames = (ma_proc)AAudioStreamBuilder_setBufferCapacityInFrames; pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback = (ma_proc)AAudioStreamBuilder_setFramesPerDataCallback; pContext->aaudio.AAudioStreamBuilder_setDataCallback = (ma_proc)AAudioStreamBuilder_setDataCallback; pContext->aaudio.AAudioStreamBuilder_setErrorCallback = (ma_proc)AAudioStreamBuilder_setErrorCallback; pContext->aaudio.AAudioStreamBuilder_setPerformanceMode = (ma_proc)AAudioStreamBuilder_setPerformanceMode; pContext->aaudio.AAudioStreamBuilder_setUsage = (ma_proc)AAudioStreamBuilder_setUsage; pContext->aaudio.AAudioStreamBuilder_setContentType = (ma_proc)AAudioStreamBuilder_setContentType; pContext->aaudio.AAudioStreamBuilder_setInputPreset = (ma_proc)AAudioStreamBuilder_setInputPreset; #if defined(__ANDROID_API__) && __ANDROID_API__ >= 29 pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy = (ma_proc)AAudioStreamBuilder_setAllowedCapturePolicy; #endif pContext->aaudio.AAudioStreamBuilder_openStream = (ma_proc)AAudioStreamBuilder_openStream; pContext->aaudio.AAudioStream_close = (ma_proc)AAudioStream_close; pContext->aaudio.AAudioStream_getState = (ma_proc)AAudioStream_getState; pContext->aaudio.AAudioStream_waitForStateChange = (ma_proc)AAudioStream_waitForStateChange; pContext->aaudio.AAudioStream_getFormat = (ma_proc)AAudioStream_getFormat; pContext->aaudio.AAudioStream_getChannelCount = (ma_proc)AAudioStream_getChannelCount; pContext->aaudio.AAudioStream_getSampleRate = (ma_proc)AAudioStream_getSampleRate; pContext->aaudio.AAudioStream_getBufferCapacityInFrames = (ma_proc)AAudioStream_getBufferCapacityInFrames; pContext->aaudio.AAudioStream_getFramesPerDataCallback = (ma_proc)AAudioStream_getFramesPerDataCallback; pContext->aaudio.AAudioStream_getFramesPerBurst = (ma_proc)AAudioStream_getFramesPerBurst; pContext->aaudio.AAudioStream_requestStart = (ma_proc)AAudioStream_requestStart; pContext->aaudio.AAudioStream_requestStop = (ma_proc)AAudioStream_requestStop; #endif pCallbacks->onContextInit = ma_context_init__aaudio; pCallbacks->onContextUninit = ma_context_uninit__aaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__aaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__aaudio; pCallbacks->onDeviceInit = ma_device_init__aaudio; pCallbacks->onDeviceUninit = ma_device_uninit__aaudio; pCallbacks->onDeviceStart = ma_device_start__aaudio; pCallbacks->onDeviceStop = ma_device_stop__aaudio; pCallbacks->onDeviceRead = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceGetInfo = ma_device_get_info__aaudio; /* We need a job thread so we can deal with rerouting. */ { ma_result result; ma_device_job_thread_config jobThreadConfig; jobThreadConfig = ma_device_job_thread_config_init(); result = ma_device_job_thread_init(&jobThreadConfig, &pContext->allocationCallbacks, &pContext->aaudio.jobThread); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio); pContext->aaudio.hAAudio = NULL; return result; } } (void)pConfig; return MA_SUCCESS; } static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob) { ma_result result; ma_device* pDevice; MA_ASSERT(pJob != NULL); pDevice = (ma_device*)pJob->data.device.aaudio.reroute.pDevice; MA_ASSERT(pDevice != NULL); /* Here is where we need to reroute the device. To do this we need to uninitialize the stream and reinitialize it. */ result = ma_device_reinit__aaudio(pDevice, (ma_device_type)pJob->data.device.aaudio.reroute.deviceType); if (result != MA_SUCCESS) { /* Getting here means we failed to reroute the device. The best thing I can think of here is to just stop the device. */ ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[AAudio] Stopping device due to reroute failure."); ma_device_stop(pDevice); return result; } return MA_SUCCESS; } #else /* Getting here means there is no AAudio backend so we need a no-op job implementation. */ static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob) { return ma_job_process__noop(pJob); } #endif /* AAudio */ /****************************************************************************** OpenSL|ES Backend ******************************************************************************/ #ifdef MA_HAS_OPENSL #include #ifdef MA_ANDROID #include #endif typedef SLresult (SLAPIENTRY * ma_slCreateEngine_proc)(SLObjectItf* pEngine, SLuint32 numOptions, SLEngineOption* pEngineOptions, SLuint32 numInterfaces, SLInterfaceID* pInterfaceIds, SLboolean* pInterfaceRequired); /* OpenSL|ES has one-per-application objects :( */ static SLObjectItf g_maEngineObjectSL = NULL; static SLEngineItf g_maEngineSL = NULL; static ma_uint32 g_maOpenSLInitCounter = 0; static ma_spinlock g_maOpenSLSpinlock = 0; /* For init/uninit. */ #define MA_OPENSL_OBJ(p) (*((SLObjectItf)(p))) #define MA_OPENSL_OUTPUTMIX(p) (*((SLOutputMixItf)(p))) #define MA_OPENSL_PLAY(p) (*((SLPlayItf)(p))) #define MA_OPENSL_RECORD(p) (*((SLRecordItf)(p))) #ifdef MA_ANDROID #define MA_OPENSL_BUFFERQUEUE(p) (*((SLAndroidSimpleBufferQueueItf)(p))) #else #define MA_OPENSL_BUFFERQUEUE(p) (*((SLBufferQueueItf)(p))) #endif static ma_result ma_result_from_OpenSL(SLuint32 result) { switch (result) { case SL_RESULT_SUCCESS: return MA_SUCCESS; case SL_RESULT_PRECONDITIONS_VIOLATED: return MA_ERROR; case SL_RESULT_PARAMETER_INVALID: return MA_INVALID_ARGS; case SL_RESULT_MEMORY_FAILURE: return MA_OUT_OF_MEMORY; case SL_RESULT_RESOURCE_ERROR: return MA_INVALID_DATA; case SL_RESULT_RESOURCE_LOST: return MA_ERROR; case SL_RESULT_IO_ERROR: return MA_IO_ERROR; case SL_RESULT_BUFFER_INSUFFICIENT: return MA_NO_SPACE; case SL_RESULT_CONTENT_CORRUPTED: return MA_INVALID_DATA; case SL_RESULT_CONTENT_UNSUPPORTED: return MA_FORMAT_NOT_SUPPORTED; case SL_RESULT_CONTENT_NOT_FOUND: return MA_ERROR; case SL_RESULT_PERMISSION_DENIED: return MA_ACCESS_DENIED; case SL_RESULT_FEATURE_UNSUPPORTED: return MA_NOT_IMPLEMENTED; case SL_RESULT_INTERNAL_ERROR: return MA_ERROR; case SL_RESULT_UNKNOWN_ERROR: return MA_ERROR; case SL_RESULT_OPERATION_ABORTED: return MA_ERROR; case SL_RESULT_CONTROL_LOST: return MA_ERROR; default: return MA_ERROR; } } /* Converts an individual OpenSL-style channel identifier (SL_SPEAKER_FRONT_LEFT, etc.) to miniaudio. */ static ma_uint8 ma_channel_id_to_ma__opensl(SLuint32 id) { switch (id) { case SL_SPEAKER_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case SL_SPEAKER_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case SL_SPEAKER_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case SL_SPEAKER_LOW_FREQUENCY: return MA_CHANNEL_LFE; case SL_SPEAKER_BACK_LEFT: return MA_CHANNEL_BACK_LEFT; case SL_SPEAKER_BACK_RIGHT: return MA_CHANNEL_BACK_RIGHT; case SL_SPEAKER_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case SL_SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case SL_SPEAKER_BACK_CENTER: return MA_CHANNEL_BACK_CENTER; case SL_SPEAKER_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case SL_SPEAKER_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case SL_SPEAKER_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case SL_SPEAKER_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case SL_SPEAKER_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case SL_SPEAKER_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case SL_SPEAKER_TOP_BACK_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case SL_SPEAKER_TOP_BACK_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; case SL_SPEAKER_TOP_BACK_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; default: return 0; } } /* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to OpenSL-style. */ static SLuint32 ma_channel_id_to_opensl(ma_uint8 id) { switch (id) { case MA_CHANNEL_MONO: return SL_SPEAKER_FRONT_CENTER; case MA_CHANNEL_FRONT_LEFT: return SL_SPEAKER_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return SL_SPEAKER_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return SL_SPEAKER_FRONT_CENTER; case MA_CHANNEL_LFE: return SL_SPEAKER_LOW_FREQUENCY; case MA_CHANNEL_BACK_LEFT: return SL_SPEAKER_BACK_LEFT; case MA_CHANNEL_BACK_RIGHT: return SL_SPEAKER_BACK_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return SL_SPEAKER_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return SL_SPEAKER_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return SL_SPEAKER_BACK_CENTER; case MA_CHANNEL_SIDE_LEFT: return SL_SPEAKER_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return SL_SPEAKER_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return SL_SPEAKER_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return SL_SPEAKER_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return SL_SPEAKER_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return SL_SPEAKER_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return SL_SPEAKER_TOP_BACK_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return SL_SPEAKER_TOP_BACK_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return SL_SPEAKER_TOP_BACK_RIGHT; default: return 0; } } /* Converts a channel mapping to an OpenSL-style channel mask. */ static SLuint32 ma_channel_map_to_channel_mask__opensl(const ma_channel* pChannelMap, ma_uint32 channels) { SLuint32 channelMask = 0; ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { channelMask |= ma_channel_id_to_opensl(pChannelMap[iChannel]); } return channelMask; } /* Converts an OpenSL-style channel mask to a miniaudio channel map. */ static void ma_channel_mask_to_channel_map__opensl(SLuint32 channelMask, ma_uint32 channels, ma_channel* pChannelMap) { if (channels == 1 && channelMask == 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else if (channels == 2 && channelMask == 0) { pChannelMap[0] = MA_CHANNEL_FRONT_LEFT; pChannelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { if (channels == 1 && (channelMask & SL_SPEAKER_FRONT_CENTER) != 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else { /* Just iterate over each bit. */ ma_uint32 iChannel = 0; ma_uint32 iBit; for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) { SLuint32 bitValue = (channelMask & (1UL << iBit)); if (bitValue != 0) { /* The bit is set. */ pChannelMap[iChannel] = ma_channel_id_to_ma__opensl(bitValue); iChannel += 1; } } } } } static SLuint32 ma_round_to_standard_sample_rate__opensl(SLuint32 samplesPerSec) { if (samplesPerSec <= SL_SAMPLINGRATE_8) { return SL_SAMPLINGRATE_8; } if (samplesPerSec <= SL_SAMPLINGRATE_11_025) { return SL_SAMPLINGRATE_11_025; } if (samplesPerSec <= SL_SAMPLINGRATE_12) { return SL_SAMPLINGRATE_12; } if (samplesPerSec <= SL_SAMPLINGRATE_16) { return SL_SAMPLINGRATE_16; } if (samplesPerSec <= SL_SAMPLINGRATE_22_05) { return SL_SAMPLINGRATE_22_05; } if (samplesPerSec <= SL_SAMPLINGRATE_24) { return SL_SAMPLINGRATE_24; } if (samplesPerSec <= SL_SAMPLINGRATE_32) { return SL_SAMPLINGRATE_32; } if (samplesPerSec <= SL_SAMPLINGRATE_44_1) { return SL_SAMPLINGRATE_44_1; } if (samplesPerSec <= SL_SAMPLINGRATE_48) { return SL_SAMPLINGRATE_48; } /* Android doesn't support more than 48000. */ #ifndef MA_ANDROID if (samplesPerSec <= SL_SAMPLINGRATE_64) { return SL_SAMPLINGRATE_64; } if (samplesPerSec <= SL_SAMPLINGRATE_88_2) { return SL_SAMPLINGRATE_88_2; } if (samplesPerSec <= SL_SAMPLINGRATE_96) { return SL_SAMPLINGRATE_96; } if (samplesPerSec <= SL_SAMPLINGRATE_192) { return SL_SAMPLINGRATE_192; } #endif return SL_SAMPLINGRATE_16; } static SLint32 ma_to_stream_type__opensl(ma_opensl_stream_type streamType) { switch (streamType) { case ma_opensl_stream_type_voice: return SL_ANDROID_STREAM_VOICE; case ma_opensl_stream_type_system: return SL_ANDROID_STREAM_SYSTEM; case ma_opensl_stream_type_ring: return SL_ANDROID_STREAM_RING; case ma_opensl_stream_type_media: return SL_ANDROID_STREAM_MEDIA; case ma_opensl_stream_type_alarm: return SL_ANDROID_STREAM_ALARM; case ma_opensl_stream_type_notification: return SL_ANDROID_STREAM_NOTIFICATION; default: break; } return SL_ANDROID_STREAM_VOICE; } static SLint32 ma_to_recording_preset__opensl(ma_opensl_recording_preset recordingPreset) { switch (recordingPreset) { case ma_opensl_recording_preset_generic: return SL_ANDROID_RECORDING_PRESET_GENERIC; case ma_opensl_recording_preset_camcorder: return SL_ANDROID_RECORDING_PRESET_CAMCORDER; case ma_opensl_recording_preset_voice_recognition: return SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION; case ma_opensl_recording_preset_voice_communication: return SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION; case ma_opensl_recording_preset_voice_unprocessed: return SL_ANDROID_RECORDING_PRESET_UNPROCESSED; default: break; } return SL_ANDROID_RECORDING_PRESET_NONE; } static ma_result ma_context_enumerate_devices__opensl(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to enumerate devices. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } /* TODO: Test Me. This is currently untested, so for now we are just returning default devices. */ #if 0 && !defined(MA_ANDROID) ma_bool32 isTerminated = MA_FALSE; SLuint32 pDeviceIDs[128]; SLint32 deviceCount = sizeof(pDeviceIDs) / sizeof(pDeviceIDs[0]); SLAudioIODeviceCapabilitiesItf deviceCaps; SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps); if (resultSL != SL_RESULT_SUCCESS) { /* The interface may not be supported so just report a default device. */ goto return_default_device; } /* Playback */ if (!isTerminated) { resultSL = (*deviceCaps)->GetAvailableAudioOutputs(deviceCaps, &deviceCount, pDeviceIDs); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = pDeviceIDs[iDevice]; SLAudioOutputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc); if (resultSL == SL_RESULT_SUCCESS) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.pDeviceName, (size_t)-1); ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } } /* Capture */ if (!isTerminated) { resultSL = (*deviceCaps)->GetAvailableAudioInputs(deviceCaps, &deviceCount, pDeviceIDs); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = pDeviceIDs[iDevice]; SLAudioInputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc); if (resultSL == SL_RESULT_SUCCESS) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.deviceName, (size_t)-1); ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } } return MA_SUCCESS; #else goto return_default_device; #endif return_default_device:; cbResult = MA_TRUE; /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } return MA_SUCCESS; } static void ma_context_add_data_format_ex__opensl(ma_context* pContext, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceInfo != NULL); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } static void ma_context_add_data_format__opensl(ma_context* pContext, ma_format format, ma_device_info* pDeviceInfo) { ma_uint32 minChannels = 1; ma_uint32 maxChannels = 2; ma_uint32 minSampleRate = (ma_uint32)ma_standard_sample_rate_8000; ma_uint32 maxSampleRate = (ma_uint32)ma_standard_sample_rate_48000; ma_uint32 iChannel; ma_uint32 iSampleRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceInfo != NULL); /* Each sample format can support mono and stereo, and we'll support a small subset of standard rates (up to 48000). A better solution would be to somehow find a native sample rate. */ for (iChannel = minChannels; iChannel < maxChannels; iChannel += 1) { for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate]; if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) { ma_context_add_data_format_ex__opensl(pContext, format, iChannel, standardSampleRate, pDeviceInfo); } } } } static ma_result ma_context_get_device_info__opensl(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to get device info. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } /* TODO: Test Me. This is currently untested, so for now we are just returning default devices. */ #if 0 && !defined(MA_ANDROID) SLAudioIODeviceCapabilitiesItf deviceCaps; SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps); if (resultSL != SL_RESULT_SUCCESS) { /* The interface may not be supported so just report a default device. */ goto return_default_device; } if (deviceType == ma_device_type_playback) { SLAudioOutputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, pDeviceID->opensl, &desc); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.pDeviceName, (size_t)-1); } else { SLAudioInputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, pDeviceID->opensl, &desc); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.deviceName, (size_t)-1); } goto return_detailed_info; #else goto return_default_device; #endif return_default_device: if (pDeviceID != NULL) { if ((deviceType == ma_device_type_playback && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOOUTPUT) || (deviceType == ma_device_type_capture && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOINPUT)) { return MA_NO_DEVICE; /* Don't know the device. */ } } /* ID and Name / Description */ if (deviceType == ma_device_type_playback) { pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; goto return_detailed_info; return_detailed_info: /* For now we're just outputting a set of values that are supported by the API but not necessarily supported by the device natively. Later on we should work on this so that it more closely reflects the device's actual native format. */ pDeviceInfo->nativeDataFormatCount = 0; #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 ma_context_add_data_format__opensl(pContext, ma_format_f32, pDeviceInfo); #endif ma_context_add_data_format__opensl(pContext, ma_format_s16, pDeviceInfo); ma_context_add_data_format__opensl(pContext, ma_format_u8, pDeviceInfo); return MA_SUCCESS; } #ifdef MA_ANDROID /*void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, SLuint32 eventFlags, const void* pBuffer, SLuint32 bufferSize, SLuint32 dataUsed, void* pContext)*/ static void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; size_t periodSizeInBytes; ma_uint8* pBuffer; SLresult resultSL; MA_ASSERT(pDevice != NULL); (void)pBufferQueue; /* For now, don't do anything unless the buffer was fully processed. From what I can tell, it looks like OpenSL|ES 1.1 improves on buffer queues to the point that we could much more intelligently handle this, but unfortunately it looks like Android is only supporting OpenSL|ES 1.0.1 for now :( */ /* Don't do anything if the device is not started. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { return; } /* Don't do anything if the device is being drained. */ if (pDevice->opensl.isDrainingCapture) { return; } periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); pBuffer = pDevice->opensl.pBufferCapture + (pDevice->opensl.currentBufferIndexCapture * periodSizeInBytes); ma_device_handle_backend_data_callback(pDevice, NULL, pBuffer, pDevice->capture.internalPeriodSizeInFrames); resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pBuffer, periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { return; } pDevice->opensl.currentBufferIndexCapture = (pDevice->opensl.currentBufferIndexCapture + 1) % pDevice->capture.internalPeriods; } static void ma_buffer_queue_callback_playback__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; size_t periodSizeInBytes; ma_uint8* pBuffer; SLresult resultSL; MA_ASSERT(pDevice != NULL); (void)pBufferQueue; /* Don't do anything if the device is not started. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { return; } /* Don't do anything if the device is being drained. */ if (pDevice->opensl.isDrainingPlayback) { return; } periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); pBuffer = pDevice->opensl.pBufferPlayback + (pDevice->opensl.currentBufferIndexPlayback * periodSizeInBytes); ma_device_handle_backend_data_callback(pDevice, pBuffer, NULL, pDevice->playback.internalPeriodSizeInFrames); resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pBuffer, periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { return; } pDevice->opensl.currentBufferIndexPlayback = (pDevice->opensl.currentBufferIndexPlayback + 1) % pDevice->playback.internalPeriods; } #endif static ma_result ma_device_uninit__opensl(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before uninitializing the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->opensl.pAudioRecorderObj) { MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioRecorderObj); } ma_free(pDevice->opensl.pBufferCapture, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->opensl.pAudioPlayerObj) { MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioPlayerObj); } if (pDevice->opensl.pOutputMixObj) { MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Destroy((SLObjectItf)pDevice->opensl.pOutputMixObj); } ma_free(pDevice->opensl.pBufferPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 typedef SLAndroidDataFormat_PCM_EX ma_SLDataFormat_PCM; #else typedef SLDataFormat_PCM ma_SLDataFormat_PCM; #endif static ma_result ma_SLDataFormat_PCM_init__opensl(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* channelMap, ma_SLDataFormat_PCM* pDataFormat) { /* We need to convert our format/channels/rate so that they aren't set to default. */ if (format == ma_format_unknown) { format = MA_DEFAULT_FORMAT; } if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 if (format == ma_format_f32) { pDataFormat->formatType = SL_ANDROID_DATAFORMAT_PCM_EX; pDataFormat->representation = SL_ANDROID_PCM_REPRESENTATION_FLOAT; } else { pDataFormat->formatType = SL_DATAFORMAT_PCM; } #else pDataFormat->formatType = SL_DATAFORMAT_PCM; #endif pDataFormat->numChannels = channels; ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = ma_round_to_standard_sample_rate__opensl(sampleRate * 1000); /* In millihertz. Annoyingly, the sample rate variable is named differently between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM */ pDataFormat->bitsPerSample = ma_get_bytes_per_sample(format) * 8; pDataFormat->channelMask = ma_channel_map_to_channel_mask__opensl(channelMap, channels); pDataFormat->endianness = (ma_is_little_endian()) ? SL_BYTEORDER_LITTLEENDIAN : SL_BYTEORDER_BIGENDIAN; /* Android has a few restrictions on the format as documented here: https://developer.android.com/ndk/guides/audio/opensl-for-android.html - Only mono and stereo is supported. - Only u8 and s16 formats are supported. - Maximum sample rate of 48000. */ #ifdef MA_ANDROID if (pDataFormat->numChannels > 2) { pDataFormat->numChannels = 2; } #if __ANDROID_API__ >= 21 if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) { /* It's floating point. */ MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT); if (pDataFormat->bitsPerSample > 32) { pDataFormat->bitsPerSample = 32; } } else { if (pDataFormat->bitsPerSample > 16) { pDataFormat->bitsPerSample = 16; } } #else if (pDataFormat->bitsPerSample > 16) { pDataFormat->bitsPerSample = 16; } #endif if (((SLDataFormat_PCM*)pDataFormat)->samplesPerSec > SL_SAMPLINGRATE_48) { ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = SL_SAMPLINGRATE_48; } #endif pDataFormat->containerSize = pDataFormat->bitsPerSample; /* Always tightly packed for now. */ return MA_SUCCESS; } static ma_result ma_deconstruct_SLDataFormat_PCM__opensl(ma_SLDataFormat_PCM* pDataFormat, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_bool32 isFloatingPoint = MA_FALSE; #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) { MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT); isFloatingPoint = MA_TRUE; } #endif if (isFloatingPoint) { if (pDataFormat->bitsPerSample == 32) { *pFormat = ma_format_f32; } } else { if (pDataFormat->bitsPerSample == 8) { *pFormat = ma_format_u8; } else if (pDataFormat->bitsPerSample == 16) { *pFormat = ma_format_s16; } else if (pDataFormat->bitsPerSample == 24) { *pFormat = ma_format_s24; } else if (pDataFormat->bitsPerSample == 32) { *pFormat = ma_format_s32; } } *pChannels = pDataFormat->numChannels; *pSampleRate = ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec / 1000; ma_channel_mask_to_channel_map__opensl(pDataFormat->channelMask, ma_min(pDataFormat->numChannels, channelMapCap), pChannelMap); return MA_SUCCESS; } static ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { #ifdef MA_ANDROID SLDataLocator_AndroidSimpleBufferQueue queue; SLresult resultSL; size_t bufferSizeInBytes; SLInterfaceID itfIDs[2]; const SLboolean itfIDsRequired[] = { SL_BOOLEAN_TRUE, /* SL_IID_ANDROIDSIMPLEBUFFERQUEUE */ SL_BOOLEAN_FALSE /* SL_IID_ANDROIDCONFIGURATION */ }; #endif MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to initialize a new device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* For now, only supporting Android implementations of OpenSL|ES since that's the only one I've been able to test with and I currently depend on Android-specific extensions (simple buffer queues). */ #ifdef MA_ANDROID itfIDs[0] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE; itfIDs[1] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION; /* No exclusive mode with OpenSL|ES. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* Now we can start initializing the device properly. */ MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->opensl); queue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_SLDataFormat_PCM pcm; SLDataLocator_IODevice locatorDevice; SLDataSource source; SLDataSink sink; SLAndroidConfigurationItf pRecorderConfig; ma_SLDataFormat_PCM_init__opensl(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &pcm); locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE; locatorDevice.deviceType = SL_IODEVICE_AUDIOINPUT; locatorDevice.deviceID = SL_DEFAULTDEVICEID_AUDIOINPUT; /* Must always use the default device with Android. */ locatorDevice.device = NULL; source.pLocator = &locatorDevice; source.pFormat = NULL; queue.numBuffers = pDescriptorCapture->periodCount; sink.pLocator = &queue; sink.pFormat = (SLDataFormat_PCM*)&pcm; resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) { /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 1; ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16; /* The name of the sample rate variable is different between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM. */ pcm.bitsPerSample = 16; pcm.containerSize = pcm.bitsPerSample; /* Always tightly packed for now. */ pcm.channelMask = 0; resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); } if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create audio recorder."); return ma_result_from_OpenSL(resultSL); } /* Set the recording preset before realizing the player. */ if (pConfig->opensl.recordingPreset != ma_opensl_recording_preset_default) { resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pRecorderConfig); if (resultSL == SL_RESULT_SUCCESS) { SLint32 recordingPreset = ma_to_recording_preset__opensl(pConfig->opensl.recordingPreset); resultSL = (*pRecorderConfig)->SetConfiguration(pRecorderConfig, SL_ANDROID_KEY_RECORDING_PRESET, &recordingPreset, sizeof(SLint32)); if (resultSL != SL_RESULT_SUCCESS) { /* Failed to set the configuration. Just keep going. */ } } } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Realize((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize audio recorder."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_RECORD, &pDevice->opensl.pAudioRecorder); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_RECORD interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueueCapture); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, ma_buffer_queue_callback_capture__opensl_android, pDevice); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to register buffer queue callback."); return ma_result_from_OpenSL(resultSL); } /* The internal format is determined by the "pcm" object. */ ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorCapture->format, &pDescriptorCapture->channels, &pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap)); /* Buffer. */ pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); pDevice->opensl.currentBufferIndexCapture = 0; bufferSizeInBytes = pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * pDescriptorCapture->periodCount; pDevice->opensl.pBufferCapture = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pDevice->opensl.pBufferCapture == NULL) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to allocate memory for data buffer."); return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pDevice->opensl.pBufferCapture, bufferSizeInBytes); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_SLDataFormat_PCM pcm; SLDataSource source; SLDataLocator_OutputMix outmixLocator; SLDataSink sink; SLAndroidConfigurationItf pPlayerConfig; ma_SLDataFormat_PCM_init__opensl(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &pcm); resultSL = (*g_maEngineSL)->CreateOutputMix(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pOutputMixObj, 0, NULL, NULL); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create output mix."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Realize((SLObjectItf)pDevice->opensl.pOutputMixObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize output mix object."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->GetInterface((SLObjectItf)pDevice->opensl.pOutputMixObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_OUTPUTMIX, &pDevice->opensl.pOutputMix); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_OUTPUTMIX interface."); return ma_result_from_OpenSL(resultSL); } /* Set the output device. */ if (pDescriptorPlayback->pDeviceID != NULL) { SLuint32 deviceID_OpenSL = pDescriptorPlayback->pDeviceID->opensl; MA_OPENSL_OUTPUTMIX(pDevice->opensl.pOutputMix)->ReRoute((SLOutputMixItf)pDevice->opensl.pOutputMix, 1, &deviceID_OpenSL); } queue.numBuffers = pDescriptorPlayback->periodCount; source.pLocator = &queue; source.pFormat = (SLDataFormat_PCM*)&pcm; outmixLocator.locatorType = SL_DATALOCATOR_OUTPUTMIX; outmixLocator.outputMix = (SLObjectItf)pDevice->opensl.pOutputMixObj; sink.pLocator = &outmixLocator; sink.pFormat = NULL; resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) { /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 2; ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16; pcm.bitsPerSample = 16; pcm.containerSize = pcm.bitsPerSample; /* Always tightly packed for now. */ pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT; resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); } if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create audio player."); return ma_result_from_OpenSL(resultSL); } /* Set the stream type before realizing the player. */ if (pConfig->opensl.streamType != ma_opensl_stream_type_default) { resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pPlayerConfig); if (resultSL == SL_RESULT_SUCCESS) { SLint32 streamType = ma_to_stream_type__opensl(pConfig->opensl.streamType); resultSL = (*pPlayerConfig)->SetConfiguration(pPlayerConfig, SL_ANDROID_KEY_STREAM_TYPE, &streamType, sizeof(SLint32)); if (resultSL != SL_RESULT_SUCCESS) { /* Failed to set the configuration. Just keep going. */ } } } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Realize((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize audio player."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_PLAY, &pDevice->opensl.pAudioPlayer); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_PLAY interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueuePlayback); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, ma_buffer_queue_callback_playback__opensl_android, pDevice); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to register buffer queue callback."); return ma_result_from_OpenSL(resultSL); } /* The internal format is determined by the "pcm" object. */ ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorPlayback->format, &pDescriptorPlayback->channels, &pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap)); /* Buffer. */ pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); pDevice->opensl.currentBufferIndexPlayback = 0; bufferSizeInBytes = pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) * pDescriptorPlayback->periodCount; pDevice->opensl.pBufferPlayback = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pDevice->opensl.pBufferPlayback == NULL) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to allocate memory for data buffer."); return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, bufferSizeInBytes); } return MA_SUCCESS; #else return MA_NO_BACKEND; /* Non-Android implementations are not supported. */ #endif } static ma_result ma_device_start__opensl(ma_device* pDevice) { SLresult resultSL; size_t periodSizeInBytes; ma_uint32 iPeriod; MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to start the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_RECORDING); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to start internal capture device."); return ma_result_from_OpenSL(resultSL); } periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) { resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pDevice->opensl.pBufferCapture + (periodSizeInBytes * iPeriod), periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to enqueue buffer for capture device."); return ma_result_from_OpenSL(resultSL); } } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_PLAYING); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to start internal playback device."); return ma_result_from_OpenSL(resultSL); } /* In playback mode (no duplex) we need to load some initial buffers. In duplex mode we need to enqueue silent buffers. */ if (pDevice->type == ma_device_type_duplex) { MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); } else { ma_device__read_frames_from_client(pDevice, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods, pDevice->opensl.pBufferPlayback); } periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; ++iPeriod) { resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pDevice->opensl.pBufferPlayback + (periodSizeInBytes * iPeriod), periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to enqueue buffer for playback device."); return ma_result_from_OpenSL(resultSL); } } } return MA_SUCCESS; } static ma_result ma_device_drain__opensl(ma_device* pDevice, ma_device_type deviceType) { SLAndroidSimpleBufferQueueItf pBufferQueue; MA_ASSERT(deviceType == ma_device_type_capture || deviceType == ma_device_type_playback); if (pDevice->type == ma_device_type_capture) { pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture; pDevice->opensl.isDrainingCapture = MA_TRUE; } else { pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback; pDevice->opensl.isDrainingPlayback = MA_TRUE; } for (;;) { SLAndroidSimpleBufferQueueState state; MA_OPENSL_BUFFERQUEUE(pBufferQueue)->GetState(pBufferQueue, &state); if (state.count == 0) { break; } ma_sleep(10); } if (pDevice->type == ma_device_type_capture) { pDevice->opensl.isDrainingCapture = MA_FALSE; } else { pDevice->opensl.isDrainingPlayback = MA_FALSE; } return MA_SUCCESS; } static ma_result ma_device_stop__opensl(ma_device* pDevice) { SLresult resultSL; MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before stopping/uninitializing the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_device_drain__opensl(pDevice, ma_device_type_capture); resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal capture device."); return ma_result_from_OpenSL(resultSL); } MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_device_drain__opensl(pDevice, ma_device_type_playback); resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal playback device."); return ma_result_from_OpenSL(resultSL); } MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback); } /* Make sure the client is aware that the device has stopped. There may be an OpenSL|ES callback for this, but I haven't found it. */ ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__opensl(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_opensl); (void)pContext; /* Uninit global data. */ ma_spinlock_lock(&g_maOpenSLSpinlock); { MA_ASSERT(g_maOpenSLInitCounter > 0); /* If you've triggered this, it means you have ma_context_init/uninit mismatch. Each successful call to ma_context_init() must be matched up with a call to ma_context_uninit(). */ g_maOpenSLInitCounter -= 1; if (g_maOpenSLInitCounter == 0) { (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL); } } ma_spinlock_unlock(&g_maOpenSLSpinlock); return MA_SUCCESS; } static ma_result ma_dlsym_SLInterfaceID__opensl(ma_context* pContext, const char* pName, ma_handle* pHandle) { /* We need to return an error if the symbol cannot be found. This is important because there have been reports that some symbols do not exist. */ ma_handle* p = (ma_handle*)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, pName); if (p == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Cannot find symbol %s", pName); return MA_NO_BACKEND; } *pHandle = *p; return MA_SUCCESS; } static ma_result ma_context_init_engine_nolock__opensl(ma_context* pContext) { g_maOpenSLInitCounter += 1; if (g_maOpenSLInitCounter == 1) { SLresult resultSL; resultSL = ((ma_slCreateEngine_proc)pContext->opensl.slCreateEngine)(&g_maEngineObjectSL, 0, NULL, 0, NULL, NULL); if (resultSL != SL_RESULT_SUCCESS) { g_maOpenSLInitCounter -= 1; return ma_result_from_OpenSL(resultSL); } (*g_maEngineObjectSL)->Realize(g_maEngineObjectSL, SL_BOOLEAN_FALSE); resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_ENGINE, &g_maEngineSL); if (resultSL != SL_RESULT_SUCCESS) { (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL); g_maOpenSLInitCounter -= 1; return ma_result_from_OpenSL(resultSL); } } return MA_SUCCESS; } static ma_result ma_context_init__opensl(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #if !defined(MA_NO_RUNTIME_LINKING) size_t i; const char* libOpenSLESNames[] = { "libOpenSLES.so" }; #endif MA_ASSERT(pContext != NULL); (void)pConfig; #if !defined(MA_NO_RUNTIME_LINKING) /* Dynamically link against libOpenSLES.so. I have now had multiple reports that SL_IID_ANDROIDSIMPLEBUFFERQUEUE cannot be found. One report was happening at compile time and another at runtime. To try working around this, I'm going to link to libOpenSLES at runtime and extract the symbols rather than reference them directly. This should, hopefully, fix these issues as the compiler won't see any references to the symbols and will hopefully skip the checks. */ for (i = 0; i < ma_countof(libOpenSLESNames); i += 1) { pContext->opensl.libOpenSLES = ma_dlopen(ma_context_get_log(pContext), libOpenSLESNames[i]); if (pContext->opensl.libOpenSLES != NULL) { break; } } if (pContext->opensl.libOpenSLES == NULL) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Could not find libOpenSLES.so"); return MA_NO_BACKEND; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ENGINE", &pContext->opensl.SL_IID_ENGINE); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_AUDIOIODEVICECAPABILITIES", &pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ANDROIDSIMPLEBUFFERQUEUE", &pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_RECORD", &pContext->opensl.SL_IID_RECORD); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_PLAY", &pContext->opensl.SL_IID_PLAY); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_OUTPUTMIX", &pContext->opensl.SL_IID_OUTPUTMIX); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ANDROIDCONFIGURATION", &pContext->opensl.SL_IID_ANDROIDCONFIGURATION); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } pContext->opensl.slCreateEngine = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, "slCreateEngine"); if (pContext->opensl.slCreateEngine == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Cannot find symbol slCreateEngine."); return MA_NO_BACKEND; } #else pContext->opensl.SL_IID_ENGINE = (ma_handle)SL_IID_ENGINE; pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES = (ma_handle)SL_IID_AUDIOIODEVICECAPABILITIES; pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE = (ma_handle)SL_IID_ANDROIDSIMPLEBUFFERQUEUE; pContext->opensl.SL_IID_RECORD = (ma_handle)SL_IID_RECORD; pContext->opensl.SL_IID_PLAY = (ma_handle)SL_IID_PLAY; pContext->opensl.SL_IID_OUTPUTMIX = (ma_handle)SL_IID_OUTPUTMIX; pContext->opensl.SL_IID_ANDROIDCONFIGURATION = (ma_handle)SL_IID_ANDROIDCONFIGURATION; pContext->opensl.slCreateEngine = (ma_proc)slCreateEngine; #endif /* Initialize global data first if applicable. */ ma_spinlock_lock(&g_maOpenSLSpinlock); { result = ma_context_init_engine_nolock__opensl(pContext); } ma_spinlock_unlock(&g_maOpenSLSpinlock); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Failed to initialize OpenSL engine."); return result; } pCallbacks->onContextInit = ma_context_init__opensl; pCallbacks->onContextUninit = ma_context_uninit__opensl; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__opensl; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__opensl; pCallbacks->onDeviceInit = ma_device_init__opensl; pCallbacks->onDeviceUninit = ma_device_uninit__opensl; pCallbacks->onDeviceStart = ma_device_start__opensl; pCallbacks->onDeviceStop = ma_device_stop__opensl; pCallbacks->onDeviceRead = NULL; /* Not needed because OpenSL|ES is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not needed because OpenSL|ES is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not needed because OpenSL|ES is asynchronous. */ return MA_SUCCESS; } #endif /* OpenSL|ES */ /****************************************************************************** Web Audio Backend ******************************************************************************/ #ifdef MA_HAS_WEBAUDIO #include #if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 32))) #include #define MA_SUPPORT_AUDIO_WORKLETS #if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 70))) #define MA_SUPPORT_AUDIO_WORKLETS_VARIABLE_BUFFER_SIZE #endif #endif /* TODO: Version 0.12: Swap this logic around so that AudioWorklets are used by default. Add MA_NO_AUDIO_WORKLETS. */ #if defined(MA_ENABLE_AUDIO_WORKLETS) && defined(MA_SUPPORT_AUDIO_WORKLETS) #define MA_USE_AUDIO_WORKLETS #endif /* The thread stack size must be a multiple of 16. */ #ifndef MA_AUDIO_WORKLETS_THREAD_STACK_SIZE #define MA_AUDIO_WORKLETS_THREAD_STACK_SIZE 131072 #endif #if defined(MA_USE_AUDIO_WORKLETS) #define MA_WEBAUDIO_LATENCY_HINT_BALANCED "balanced" #define MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE "interactive" #define MA_WEBAUDIO_LATENCY_HINT_PLAYBACK "playback" #endif static ma_bool32 ma_is_capture_supported__webaudio() { return EM_ASM_INT({ return (navigator.mediaDevices !== undefined && navigator.mediaDevices.getUserMedia !== undefined); }, 0) != 0; /* Must pass in a dummy argument for C99 compatibility. */ } #ifdef __cplusplus extern "C" { #endif void* EMSCRIPTEN_KEEPALIVE ma_malloc_emscripten(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_malloc(sz, pAllocationCallbacks); } void EMSCRIPTEN_KEEPALIVE ma_free_emscripten(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { ma_free(p, pAllocationCallbacks); } void EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_capture__webaudio(ma_device* pDevice, int frameCount, float* pFrames) { ma_device_handle_backend_data_callback(pDevice, NULL, pFrames, (ma_uint32)frameCount); } void EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_playback__webaudio(ma_device* pDevice, int frameCount, float* pFrames) { ma_device_handle_backend_data_callback(pDevice, pFrames, NULL, (ma_uint32)frameCount); } #ifdef __cplusplus } #endif static ma_result ma_context_enumerate_devices__webaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Only supporting default devices for now. */ /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only supporting default devices. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { if (ma_is_capture_supported__webaudio()) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only supporting default devices. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__webaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); if (deviceType == ma_device_type_capture && !ma_is_capture_supported__webaudio()) { return MA_NO_DEVICE; } MA_ZERO_MEMORY(pDeviceInfo->id.webaudio, sizeof(pDeviceInfo->id.webaudio)); /* Only supporting default devices for now. */ (void)pDeviceID; if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } /* Only supporting default devices. */ pDeviceInfo->isDefault = MA_TRUE; /* Web Audio can support any number of channels and sample rates. It only supports f32 formats, however. */ pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormats[0].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[0].channels = 0; /* All channels are supported. */ pDeviceInfo->nativeDataFormats[0].sampleRate = EM_ASM_INT({ try { var temp = new (window.AudioContext || window.webkitAudioContext)(); var sampleRate = temp.sampleRate; temp.close(); return sampleRate; } catch(e) { return 0; } }, 0); /* Must pass in a dummy argument for C99 compatibility. */ if (pDeviceInfo->nativeDataFormats[0].sampleRate == 0) { return MA_NO_DEVICE; } pDeviceInfo->nativeDataFormatCount = 1; return MA_SUCCESS; } static ma_result ma_device_uninit__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); #if defined(MA_USE_AUDIO_WORKLETS) { EM_ASM({ var device = window.miniaudio.get_device_by_index($0); if (device.streamNode !== undefined) { device.streamNode.disconnect(); device.streamNode = undefined; } device.pDevice = undefined; }, pDevice->webaudio.deviceIndex); emscripten_destroy_web_audio_node(pDevice->webaudio.audioWorklet); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); ma_free(pDevice->webaudio.pStackBuffer, &pDevice->pContext->allocationCallbacks); } #else { EM_ASM({ var device = window.miniaudio.get_device_by_index($0); /* Make sure all nodes are disconnected and marked for collection. */ if (device.scriptNode !== undefined) { device.scriptNode.onaudioprocess = function(e) {}; /* We want to reset the callback to ensure it doesn't get called after AudioContext.close() has returned. Shouldn't happen since we're disconnecting, but just to be safe... */ device.scriptNode.disconnect(); device.scriptNode = undefined; } if (device.streamNode !== undefined) { device.streamNode.disconnect(); device.streamNode = undefined; } /* Stop the device. I think there is a chance the callback could get fired after calling this, hence why we want to clear the callback before closing. */ device.webaudio.close(); device.webaudio = undefined; device.pDevice = undefined; }, pDevice->webaudio.deviceIndex); } #endif /* Clean up the device on the JS side. */ EM_ASM({ window.miniaudio.untrack_device_by_index($0); }, pDevice->webaudio.deviceIndex); ma_free(pDevice->webaudio.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); return MA_SUCCESS; } #if !defined(MA_USE_AUDIO_WORKLETS) static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__webaudio(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* There have been reports of the default buffer size being too small on some browsers. If we're using the default buffer size, we'll make sure the period size is bigger than our standard defaults. */ ma_uint32 periodSizeInFrames; if (nativeSampleRate == 0) { nativeSampleRate = MA_DEFAULT_SAMPLE_RATE; } if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(33, nativeSampleRate); /* 1 frame @ 30 FPS */ } else { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(333, nativeSampleRate); } } else { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { periodSizeInFrames = pDescriptor->periodSizeInFrames; } /* The size of the buffer must be a power of 2 and between 256 and 16384. */ if (periodSizeInFrames < 256) { periodSizeInFrames = 256; } else if (periodSizeInFrames > 16384) { periodSizeInFrames = 16384; } else { periodSizeInFrames = ma_next_power_of_2(periodSizeInFrames); } return periodSizeInFrames; } #endif #if defined(MA_USE_AUDIO_WORKLETS) typedef struct { ma_device* pDevice; const ma_device_config* pConfig; ma_device_descriptor* pDescriptorPlayback; ma_device_descriptor* pDescriptorCapture; } ma_audio_worklet_thread_initialized_data; static EM_BOOL ma_audio_worklet_process_callback__webaudio(int inputCount, const AudioSampleFrame* pInputs, int outputCount, AudioSampleFrame* pOutputs, int paramCount, const AudioParamFrame* pParams, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 frameCount; (void)paramCount; (void)pParams; /* The Emscripten documentation says that it'll always be 128 frames being passed in. Hard coding it like that feels like a very bad idea to me. Even if it's hard coded in the backend, the API and documentation should always refer to variables instead of a hard coded number. In any case, will follow along for the time being. Unfortunately the audio data is not interleaved so we'll need to convert it before we give the data to miniaudio for further processing. */ if (pDevice->type == ma_device_type_playback) { frameCount = pDevice->playback.internalPeriodSizeInFrames; } else { frameCount = pDevice->capture.internalPeriodSizeInFrames; } if (ma_device_get_state(pDevice) != ma_device_state_started) { /* Fill the output buffer with zero to avoid a noise sound */ for (int i = 0; i < outputCount; i += 1) { MA_ZERO_MEMORY(pOutputs[i].data, pOutputs[i].numberOfChannels * frameCount * sizeof(float)); } return EM_TRUE; } if (inputCount > 0) { /* Input data needs to be interleaved before we hand it to the client. */ for (ma_uint32 iChannel = 0; iChannel < pDevice->capture.internalChannels; iChannel += 1) { for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) { pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->capture.internalChannels + iChannel] = pInputs[0].data[frameCount*iChannel + iFrame]; } } ma_device_process_pcm_frames_capture__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer); } if (outputCount > 0) { /* If it's a capture-only device, we'll need to output silence. */ if (pDevice->type == ma_device_type_capture) { MA_ZERO_MEMORY(pOutputs[0].data, frameCount * pDevice->playback.internalChannels * sizeof(float)); } else { ma_device_process_pcm_frames_playback__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer); /* We've read the data from the client. Now we need to deinterleave the buffer and output to the output buffer. */ for (ma_uint32 iChannel = 0; iChannel < pDevice->playback.internalChannels; iChannel += 1) { for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) { pOutputs[0].data[frameCount*iChannel + iFrame] = pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->playback.internalChannels + iChannel]; } } } } return EM_TRUE; } static void ma_audio_worklet_processor_created__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData) { ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData; EmscriptenAudioWorkletNodeCreateOptions audioWorkletOptions; int channels = 0; size_t intermediaryBufferSizeInFrames; int sampleRate; if (success == EM_FALSE) { pParameters->pDevice->webaudio.initResult = MA_ERROR; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } /* The next step is to initialize the audio worklet node. */ MA_ZERO_OBJECT(&audioWorkletOptions); /* The way channel counts work with Web Audio is confusing. As far as I can tell, there's no way to know the channel count from MediaStreamAudioSourceNode (what we use for capture)? The only way to have control is to configure an output channel count on the capture side. This is slightly confusing for capture mode because intuitively you wouldn't actually connect an output to an input-only node, but this is what we'll have to do in order to have proper control over the channel count. In the capture case, we'll have to output silence to its output node. */ if (pParameters->pConfig->deviceType == ma_device_type_capture) { channels = (int)((pParameters->pDescriptorCapture->channels > 0) ? pParameters->pDescriptorCapture->channels : MA_DEFAULT_CHANNELS); audioWorkletOptions.numberOfInputs = 1; } else { channels = (int)((pParameters->pDescriptorPlayback->channels > 0) ? pParameters->pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS); if (pParameters->pConfig->deviceType == ma_device_type_duplex) { audioWorkletOptions.numberOfInputs = 1; } else { audioWorkletOptions.numberOfInputs = 0; } } audioWorkletOptions.numberOfOutputs = 1; audioWorkletOptions.outputChannelCounts = &channels; /* Now that we know the channel count to use we can allocate the intermediary buffer. The intermediary buffer is used for interleaving and deinterleaving. */ #if defined(MA_SUPPORT_AUDIO_WORKLETS_VARIABLE_BUFFER_SIZE) { intermediaryBufferSizeInFrames = (size_t)emscripten_audio_context_quantum_size(audioContext); } #else { intermediaryBufferSizeInFrames = 128; } #endif pParameters->pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(intermediaryBufferSizeInFrames * (ma_uint32)channels * sizeof(float), &pParameters->pDevice->pContext->allocationCallbacks); if (pParameters->pDevice->webaudio.pIntermediaryBuffer == NULL) { pParameters->pDevice->webaudio.initResult = MA_OUT_OF_MEMORY; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } pParameters->pDevice->webaudio.audioWorklet = emscripten_create_wasm_audio_worklet_node(audioContext, "miniaudio", &audioWorkletOptions, &ma_audio_worklet_process_callback__webaudio, pParameters->pDevice); /* With the audio worklet initialized we can now attach it to the graph. */ if (pParameters->pConfig->deviceType == ma_device_type_capture || pParameters->pConfig->deviceType == ma_device_type_duplex) { ma_result attachmentResult = (ma_result)EM_ASM_INT({ var getUserMediaResult = 0; var audioWorklet = emscriptenGetAudioObject($0); var audioContext = emscriptenGetAudioObject($1); navigator.mediaDevices.getUserMedia({audio:true, video:false}) .then(function(stream) { audioContext.streamNode = audioContext.createMediaStreamSource(stream); audioContext.streamNode.connect(audioWorklet); audioWorklet.connect(audioContext.destination); getUserMediaResult = 0; /* 0 = MA_SUCCESS */ }) .catch(function(error) { console.log("navigator.mediaDevices.getUserMedia Failed: " + error); getUserMediaResult = -1; /* -1 = MA_ERROR */ }); return getUserMediaResult; }, pParameters->pDevice->webaudio.audioWorklet, audioContext); if (attachmentResult != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, "Web Audio: Failed to connect capture node."); emscripten_destroy_web_audio_node(pParameters->pDevice->webaudio.audioWorklet); pParameters->pDevice->webaudio.initResult = attachmentResult; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } } /* If it's playback only we can now attach the worklet node to the graph. This has already been done for the duplex case. */ if (pParameters->pConfig->deviceType == ma_device_type_playback) { ma_result attachmentResult = (ma_result)EM_ASM_INT({ var audioWorklet = emscriptenGetAudioObject($0); var audioContext = emscriptenGetAudioObject($1); audioWorklet.connect(audioContext.destination); return 0; /* 0 = MA_SUCCESS */ }, pParameters->pDevice->webaudio.audioWorklet, audioContext); if (attachmentResult != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, "Web Audio: Failed to connect playback node."); pParameters->pDevice->webaudio.initResult = attachmentResult; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } } /* We need to update the descriptors so that they reflect the internal data format. Both capture and playback should be the same. */ sampleRate = EM_ASM_INT({ return emscriptenGetAudioObject($0).sampleRate; }, audioContext); if (pParameters->pDescriptorCapture != NULL) { pParameters->pDescriptorCapture->format = ma_format_f32; pParameters->pDescriptorCapture->channels = (ma_uint32)channels; pParameters->pDescriptorCapture->sampleRate = (ma_uint32)sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorCapture->channelMap, ma_countof(pParameters->pDescriptorCapture->channelMap), pParameters->pDescriptorCapture->channels); pParameters->pDescriptorCapture->periodSizeInFrames = intermediaryBufferSizeInFrames; pParameters->pDescriptorCapture->periodCount = 1; } if (pParameters->pDescriptorPlayback != NULL) { pParameters->pDescriptorPlayback->format = ma_format_f32; pParameters->pDescriptorPlayback->channels = (ma_uint32)channels; pParameters->pDescriptorPlayback->sampleRate = (ma_uint32)sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorPlayback->channelMap, ma_countof(pParameters->pDescriptorPlayback->channelMap), pParameters->pDescriptorPlayback->channels); pParameters->pDescriptorPlayback->periodSizeInFrames = intermediaryBufferSizeInFrames; pParameters->pDescriptorPlayback->periodCount = 1; } /* At this point we're done and we can return. */ ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_DEBUG, "AudioWorklets: Created worklet node: %d\n", pParameters->pDevice->webaudio.audioWorklet); pParameters->pDevice->webaudio.initResult = MA_SUCCESS; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); } static void ma_audio_worklet_thread_initialized__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData) { ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData; WebAudioWorkletProcessorCreateOptions workletProcessorOptions; MA_ASSERT(pParameters != NULL); if (success == EM_FALSE) { pParameters->pDevice->webaudio.initResult = MA_ERROR; return; } MA_ZERO_OBJECT(&workletProcessorOptions); workletProcessorOptions.name = "miniaudio"; /* I'm not entirely sure what to call this. Does this need to be globally unique, or does it need only be unique for a given AudioContext? */ emscripten_create_wasm_audio_worklet_processor_async(audioContext, &workletProcessorOptions, ma_audio_worklet_processor_created__webaudio, pParameters); } #endif static ma_result ma_device_init__webaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with Web Audio. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* With AudioWorklets we'll have just a single AudioContext. I'm not sure why I'm not doing this for ScriptProcessorNode so it might be worthwhile to look into that as well. */ #if defined(MA_USE_AUDIO_WORKLETS) { EmscriptenWebAudioCreateAttributes audioContextAttributes; ma_audio_worklet_thread_initialized_data* pInitParameters; void* pStackBuffer; if (pConfig->performanceProfile == ma_performance_profile_conservative) { audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_PLAYBACK; } else { audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE; } /* In my testing, Firefox does not seem to capture audio data properly if the sample rate is set to anything other than 48K. This does not seem to be the case for other browsers. For this reason, if the device type is anything other than playback, we'll leave the sample rate as-is and let the browser pick the appropriate rate for us. */ if (pConfig->deviceType == ma_device_type_playback) { audioContextAttributes.sampleRate = pDescriptorPlayback->sampleRate; } else { audioContextAttributes.sampleRate = 0; } /* It's not clear if this can return an error. None of the tests in the Emscripten repository check for this, so neither am I for now. */ pDevice->webaudio.audioContext = emscripten_create_audio_context(&audioContextAttributes); /* With the context created we can now create the worklet. We can only have a single worklet per audio context which means we'll need to craft this appropriately to handle duplex devices correctly. */ /* We now need to create a worker thread. This is a bit weird because we need to allocate our own buffer for the thread's stack. The stack needs to be aligned to 16 bytes. I'm going to allocate this on the heap to keep it simple. */ pStackBuffer = ma_aligned_malloc(MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, 16, &pDevice->pContext->allocationCallbacks); if (pStackBuffer == NULL) { emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return MA_OUT_OF_MEMORY; } /* Our thread initialization parameters need to be allocated on the heap so they don't go out of scope. */ pInitParameters = (ma_audio_worklet_thread_initialized_data*)ma_malloc(sizeof(*pInitParameters), &pDevice->pContext->allocationCallbacks); if (pInitParameters == NULL) { ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return MA_OUT_OF_MEMORY; } pInitParameters->pDevice = pDevice; pInitParameters->pConfig = pConfig; pInitParameters->pDescriptorPlayback = pDescriptorPlayback; pInitParameters->pDescriptorCapture = pDescriptorCapture; /* We need to flag the device as not yet initialized so we can wait on it later. Unfortunately all of the Emscripten WebAudio stuff is asynchronous. */ pDevice->webaudio.initResult = MA_BUSY; { emscripten_start_wasm_audio_worklet_thread_async(pDevice->webaudio.audioContext, pStackBuffer, MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, ma_audio_worklet_thread_initialized__webaudio, pInitParameters); } while (pDevice->webaudio.initResult == MA_BUSY) { emscripten_sleep(1); } /* We must wait for initialization to complete. We're just spinning here. The emscripten_sleep() call is why we need to build with `-sASYNCIFY`. */ /* Initialization is now complete. Descriptors were updated when the worklet was initialized. */ if (pDevice->webaudio.initResult != MA_SUCCESS) { ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return pDevice->webaudio.initResult; } /* We need to add an entry to the miniaudio.devices list on the JS side so we can do some JS/C interop. */ pDevice->webaudio.deviceIndex = EM_ASM_INT({ return window.miniaudio.track_device({ webaudio: emscriptenGetAudioObject($0), state: 1, /* 1 = ma_device_state_stopped */ pDevice: $1 }); }, pDevice->webaudio.audioContext, pDevice); return MA_SUCCESS; } #else { /* ScriptProcessorNode. This path requires us to do almost everything in JS, but we'll do as much as we can in C. */ ma_uint32 deviceIndex; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 periodSizeInFrames; /* The channel count will depend on the device type. If it's a capture, use its, otherwise use the playback side. */ if (pConfig->deviceType == ma_device_type_capture) { channels = (pDescriptorCapture->channels > 0) ? pDescriptorCapture->channels : MA_DEFAULT_CHANNELS; } else { channels = (pDescriptorPlayback->channels > 0) ? pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS; } /* When testing in Firefox, I've seen it where capture mode fails if the sample rate is changed to anything other than it's native rate. For this reason we're leaving the sample rate untouched for capture devices. */ if (pConfig->deviceType == ma_device_type_playback) { sampleRate = pDescriptorPlayback->sampleRate; } else { sampleRate = 0; /* Let the browser decide when capturing. */ } /* The period size needs to be a power of 2. */ if (pConfig->deviceType == ma_device_type_capture) { periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorCapture, sampleRate, pConfig->performanceProfile); } else { periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorPlayback, sampleRate, pConfig->performanceProfile); } /* We need an intermediary buffer for doing interleaving and deinterleaving. */ pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(periodSizeInFrames * channels * sizeof(float), &pDevice->pContext->allocationCallbacks); if (pDevice->webaudio.pIntermediaryBuffer == NULL) { return MA_OUT_OF_MEMORY; } deviceIndex = EM_ASM_INT({ var deviceType = $0; var channels = $1; var sampleRate = $2; var bufferSize = $3; var pIntermediaryBuffer = $4; var pDevice = $5; if (typeof(window.miniaudio) === 'undefined') { return -1; /* Context not initialized. */ } var device = {}; /* First thing we need is an AudioContext. */ var audioContextOptions = {}; if (deviceType == window.miniaudio.device_type.playback && sampleRate != 0) { audioContextOptions.sampleRate = sampleRate; } device.webaudio = new (window.AudioContext || window.webkitAudioContext)(audioContextOptions); device.webaudio.suspend(); /* The AudioContext must be created in a suspended state. */ device.state = window.miniaudio.device_state.stopped; /* We need to create a ScriptProcessorNode. The channel situation is the same as the AudioWorklet path in that we need to specify an output and configure the channel count there. */ var channelCountIn = 0; var channelCountOut = channels; if (deviceType != window.miniaudio.device_type.playback) { channelCountIn = channels; } device.scriptNode = device.webaudio.createScriptProcessor(bufferSize, channelCountIn, channelCountOut); /* The node processing callback. */ device.scriptNode.onaudioprocess = function(e) { if (device.intermediaryBufferView == null || device.intermediaryBufferView.length == 0) { device.intermediaryBufferView = new Float32Array(HEAPF32.buffer, pIntermediaryBuffer, bufferSize * channels); } /* Do the capture side first. */ if (deviceType == window.miniaudio.device_type.capture || deviceType == window.miniaudio.device_type.duplex) { /* The data must be interleaved before being processed miniaudio. */ for (var iChannel = 0; iChannel < channels; iChannel += 1) { var inputBuffer = e.inputBuffer.getChannelData(iChannel); var intermediaryBuffer = device.intermediaryBufferView; for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) { intermediaryBuffer[iFrame*channels + iChannel] = inputBuffer[iFrame]; } } _ma_device_process_pcm_frames_capture__webaudio(pDevice, bufferSize, pIntermediaryBuffer); } if (deviceType == window.miniaudio.device_type.playback || deviceType == window.miniaudio.device_type.duplex) { _ma_device_process_pcm_frames_playback__webaudio(pDevice, bufferSize, pIntermediaryBuffer); for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) { var outputBuffer = e.outputBuffer.getChannelData(iChannel); var intermediaryBuffer = device.intermediaryBufferView; for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) { outputBuffer[iFrame] = intermediaryBuffer[iFrame*channels + iChannel]; } } } else { /* It's a capture-only device. Make sure the output is silenced. */ for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) { e.outputBuffer.getChannelData(iChannel).fill(0.0); } } }; /* Now we need to connect our node to the graph. */ if (deviceType == window.miniaudio.device_type.capture || deviceType == window.miniaudio.device_type.duplex) { navigator.mediaDevices.getUserMedia({audio:true, video:false}) .then(function(stream) { device.streamNode = device.webaudio.createMediaStreamSource(stream); device.streamNode.connect(device.scriptNode); device.scriptNode.connect(device.webaudio.destination); }) .catch(function(error) { console.log("Failed to get user media: " + error); }); } if (deviceType == window.miniaudio.device_type.playback) { device.scriptNode.connect(device.webaudio.destination); } device.pDevice = pDevice; return window.miniaudio.track_device(device); }, pConfig->deviceType, channels, sampleRate, periodSizeInFrames, pDevice->webaudio.pIntermediaryBuffer, pDevice); if (deviceIndex < 0) { return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } pDevice->webaudio.deviceIndex = deviceIndex; /* Grab the sample rate from the audio context directly. */ sampleRate = (ma_uint32)EM_ASM_INT({ return window.miniaudio.get_device_by_index($0).webaudio.sampleRate; }, deviceIndex); if (pDescriptorCapture != NULL) { pDescriptorCapture->format = ma_format_f32; pDescriptorCapture->channels = channels; pDescriptorCapture->sampleRate = sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = 1; } if (pDescriptorPlayback != NULL) { pDescriptorPlayback->format = ma_format_f32; pDescriptorPlayback->channels = channels; pDescriptorPlayback->sampleRate = sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = 1; } return MA_SUCCESS; } #endif } static ma_result ma_device_start__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); EM_ASM({ var device = window.miniaudio.get_device_by_index($0); device.webaudio.resume(); device.state = window.miniaudio.device_state.started; }, pDevice->webaudio.deviceIndex); return MA_SUCCESS; } static ma_result ma_device_stop__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* From the WebAudio API documentation for AudioContext.suspend(): Suspends the progression of AudioContext's currentTime, allows any current context processing blocks that are already processed to be played to the destination, and then allows the system to release its claim on audio hardware. I read this to mean that "any current context processing blocks" are processed by suspend() - i.e. They they are drained. We therefore shouldn't need to do any kind of explicit draining. */ EM_ASM({ var device = window.miniaudio.get_device_by_index($0); device.webaudio.suspend(); device.state = window.miniaudio.device_state.stopped; }, pDevice->webaudio.deviceIndex); ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__webaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_webaudio); (void)pContext; /* Unused. */ /* Remove the global miniaudio object from window if there are no more references to it. */ EM_ASM({ if (typeof(window.miniaudio) !== 'undefined') { miniaudio.unlock_event_types.map(function(event_type) { document.removeEventListener(event_type, miniaudio.unlock, true); }); window.miniaudio.referenceCount -= 1; if (window.miniaudio.referenceCount === 0) { delete window.miniaudio; } } }); return MA_SUCCESS; } static ma_result ma_context_init__webaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { int resultFromJS; MA_ASSERT(pContext != NULL); (void)pConfig; /* Unused. */ /* Here is where our global JavaScript object is initialized. */ resultFromJS = EM_ASM_INT({ if (typeof window === 'undefined' || (window.AudioContext || window.webkitAudioContext) === undefined) { return 0; /* Web Audio not supported. */ } if (typeof(window.miniaudio) === 'undefined') { window.miniaudio = { referenceCount: 0 }; /* Device types. */ window.miniaudio.device_type = {}; window.miniaudio.device_type.playback = $0; window.miniaudio.device_type.capture = $1; window.miniaudio.device_type.duplex = $2; /* Device states. */ window.miniaudio.device_state = {}; window.miniaudio.device_state.stopped = $3; window.miniaudio.device_state.started = $4; /* Device cache for mapping devices to indexes for JavaScript/C interop. */ let miniaudio = window.miniaudio; miniaudio.devices = []; miniaudio.track_device = function(device) { /* Try inserting into a free slot first. */ for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) { if (miniaudio.devices[iDevice] == null) { miniaudio.devices[iDevice] = device; return iDevice; } } /* Getting here means there is no empty slots in the array so we just push to the end. */ miniaudio.devices.push(device); return miniaudio.devices.length - 1; }; miniaudio.untrack_device_by_index = function(deviceIndex) { /* We just set the device's slot to null. The slot will get reused in the next call to ma_track_device. */ miniaudio.devices[deviceIndex] = null; /* Trim the array if possible. */ while (miniaudio.devices.length > 0) { if (miniaudio.devices[miniaudio.devices.length-1] == null) { miniaudio.devices.pop(); } else { break; } } }; miniaudio.untrack_device = function(device) { for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) { if (miniaudio.devices[iDevice] == device) { return miniaudio.untrack_device_by_index(iDevice); } } }; miniaudio.get_device_by_index = function(deviceIndex) { return miniaudio.devices[deviceIndex]; }; miniaudio.unlock_event_types = (function(){ return ['touchend', 'click']; })(); miniaudio.unlock = function() { for(var i = 0; i < miniaudio.devices.length; ++i) { var device = miniaudio.devices[i]; if (device != null && device.webaudio != null && device.state === miniaudio.device_state.started) { device.webaudio.resume().then(() => { _ma_device__on_notification_unlocked(device.pDevice); }, (error) => {console.error("Failed to resume audiocontext", error); }); } } miniaudio.unlock_event_types.map(function(event_type) { document.removeEventListener(event_type, miniaudio.unlock, true); }); }; miniaudio.unlock_event_types.map(function(event_type) { document.addEventListener(event_type, miniaudio.unlock, true); }); } window.miniaudio.referenceCount += 1; return 1; }, ma_device_type_playback, ma_device_type_capture, ma_device_type_duplex, ma_device_state_stopped, ma_device_state_started); if (resultFromJS != 1) { return MA_FAILED_TO_INIT_BACKEND; } pCallbacks->onContextInit = ma_context_init__webaudio; pCallbacks->onContextUninit = ma_context_uninit__webaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__webaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__webaudio; pCallbacks->onDeviceInit = ma_device_init__webaudio; pCallbacks->onDeviceUninit = ma_device_uninit__webaudio; pCallbacks->onDeviceStart = ma_device_start__webaudio; pCallbacks->onDeviceStop = ma_device_stop__webaudio; pCallbacks->onDeviceRead = NULL; /* Not needed because WebAudio is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not needed because WebAudio is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not needed because WebAudio is asynchronous. */ return MA_SUCCESS; } #endif /* MA_HAS_WEBAUDIO */ static ma_bool32 ma__is_channel_map_valid(const ma_channel* pChannelMap, ma_uint32 channels) { /* A blank channel map should be allowed, in which case it should use an appropriate default which will depend on context. */ if (pChannelMap != NULL && pChannelMap[0] != MA_CHANNEL_NONE) { ma_uint32 iChannel; if (channels == 0 || channels > MA_MAX_CHANNELS) { return MA_FALSE; /* Channel count out of range. */ } /* A channel cannot be present in the channel map more than once. */ for (iChannel = 0; iChannel < channels; ++iChannel) { ma_uint32 jChannel; for (jChannel = iChannel + 1; jChannel < channels; ++jChannel) { if (pChannelMap[iChannel] == pChannelMap[jChannel]) { return MA_FALSE; } } } } return MA_TRUE; } static ma_bool32 ma_context_is_backend_asynchronous(ma_context* pContext) { MA_ASSERT(pContext != NULL); if (pContext->callbacks.onDeviceRead == NULL && pContext->callbacks.onDeviceWrite == NULL) { if (pContext->callbacks.onDeviceDataLoop == NULL) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } } static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType) { ma_result result; MA_ASSERT(pDevice != NULL); if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { if (pDevice->capture.format == ma_format_unknown) { pDevice->capture.format = pDevice->capture.internalFormat; } if (pDevice->capture.channels == 0) { pDevice->capture.channels = pDevice->capture.internalChannels; } if (pDevice->capture.channelMap[0] == MA_CHANNEL_NONE) { MA_ASSERT(pDevice->capture.channels <= MA_MAX_CHANNELS); if (pDevice->capture.internalChannels == pDevice->capture.channels) { ma_channel_map_copy(pDevice->capture.channelMap, pDevice->capture.internalChannelMap, pDevice->capture.channels); } else { if (pDevice->capture.channelMixMode == ma_channel_mix_mode_simple) { ma_channel_map_init_blank(pDevice->capture.channelMap, pDevice->capture.channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pDevice->capture.channels); } } } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { if (pDevice->playback.format == ma_format_unknown) { pDevice->playback.format = pDevice->playback.internalFormat; } if (pDevice->playback.channels == 0) { pDevice->playback.channels = pDevice->playback.internalChannels; } if (pDevice->playback.channelMap[0] == MA_CHANNEL_NONE) { MA_ASSERT(pDevice->playback.channels <= MA_MAX_CHANNELS); if (pDevice->playback.internalChannels == pDevice->playback.channels) { ma_channel_map_copy(pDevice->playback.channelMap, pDevice->playback.internalChannelMap, pDevice->playback.channels); } else { if (pDevice->playback.channelMixMode == ma_channel_mix_mode_simple) { ma_channel_map_init_blank(pDevice->playback.channelMap, pDevice->playback.channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pDevice->playback.channels); } } } } if (pDevice->sampleRate == 0) { if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { pDevice->sampleRate = pDevice->capture.internalSampleRate; } else { pDevice->sampleRate = pDevice->playback.internalSampleRate; } } /* Data converters. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { /* Converting from internal device format to client format. */ ma_data_converter_config converterConfig = ma_data_converter_config_init_default(); converterConfig.formatIn = pDevice->capture.internalFormat; converterConfig.channelsIn = pDevice->capture.internalChannels; converterConfig.sampleRateIn = pDevice->capture.internalSampleRate; converterConfig.pChannelMapIn = pDevice->capture.internalChannelMap; converterConfig.formatOut = pDevice->capture.format; converterConfig.channelsOut = pDevice->capture.channels; converterConfig.sampleRateOut = pDevice->sampleRate; converterConfig.pChannelMapOut = pDevice->capture.channelMap; converterConfig.channelMixMode = pDevice->capture.channelMixMode; converterConfig.calculateLFEFromSpatialChannels = pDevice->capture.calculateLFEFromSpatialChannels; converterConfig.allowDynamicSampleRate = MA_FALSE; converterConfig.resampling.algorithm = pDevice->resampling.algorithm; converterConfig.resampling.linear.lpfOrder = pDevice->resampling.linear.lpfOrder; converterConfig.resampling.pBackendVTable = pDevice->resampling.pBackendVTable; converterConfig.resampling.pBackendUserData = pDevice->resampling.pBackendUserData; /* Make sure the old converter is uninitialized first. */ if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) { ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks); } result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->capture.converter); if (result != MA_SUCCESS) { return result; } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { /* Converting from client format to device format. */ ma_data_converter_config converterConfig = ma_data_converter_config_init_default(); converterConfig.formatIn = pDevice->playback.format; converterConfig.channelsIn = pDevice->playback.channels; converterConfig.sampleRateIn = pDevice->sampleRate; converterConfig.pChannelMapIn = pDevice->playback.channelMap; converterConfig.formatOut = pDevice->playback.internalFormat; converterConfig.channelsOut = pDevice->playback.internalChannels; converterConfig.sampleRateOut = pDevice->playback.internalSampleRate; converterConfig.pChannelMapOut = pDevice->playback.internalChannelMap; converterConfig.channelMixMode = pDevice->playback.channelMixMode; converterConfig.calculateLFEFromSpatialChannels = pDevice->playback.calculateLFEFromSpatialChannels; converterConfig.allowDynamicSampleRate = MA_FALSE; converterConfig.resampling.algorithm = pDevice->resampling.algorithm; converterConfig.resampling.linear.lpfOrder = pDevice->resampling.linear.lpfOrder; converterConfig.resampling.pBackendVTable = pDevice->resampling.pBackendVTable; converterConfig.resampling.pBackendUserData = pDevice->resampling.pBackendUserData; /* Make sure the old converter is uninitialized first. */ if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) { ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks); } result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->playback.converter); if (result != MA_SUCCESS) { return result; } } /* If the device is doing playback (ma_device_type_playback or ma_device_type_duplex), there's a couple of situations where we'll need a heap allocated cache. The first is a duplex device for backends that use a callback for data delivery. The reason this is needed is that the input stage needs to have a buffer to place the input data while it waits for the playback stage, after which the miniaudio data callback will get fired. This is not needed for backends that use a blocking API because miniaudio manages temporary buffers on the stack to achieve this. The other situation is when the data converter does not have the ability to query the number of input frames that are required in order to process a given number of output frames. When performing data conversion, it's useful if miniaudio know exactly how many frames it needs from the client in order to generate a given number of output frames. This way, only exactly the number of frames are needed to be read from the client which means no cache is necessary. On the other hand, if miniaudio doesn't know how many frames to read, it is forced to read in fixed sized chunks and then cache any residual unused input frames, those of which will be processed at a later stage. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { ma_uint64 unused; pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = 0; if (pDevice->type == ma_device_type_duplex || /* Duplex. backend may decide to use ma_device_handle_backend_data_callback() which will require this cache. */ ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, 1, &unused) != MA_SUCCESS) /* Data conversion required input frame calculation not supported. */ { /* We need a heap allocated cache. We want to size this based on the period size. */ void* pNewInputCache; ma_uint64 newInputCacheCap; ma_uint64 newInputCacheSizeInBytes; newInputCacheCap = ma_calculate_frame_count_after_resampling(pDevice->playback.internalSampleRate, pDevice->sampleRate, pDevice->playback.internalPeriodSizeInFrames); newInputCacheSizeInBytes = newInputCacheCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); if (newInputCacheSizeInBytes > MA_SIZE_MAX) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; return MA_OUT_OF_MEMORY; /* Allocation too big. Should never hit this, but makes the cast below safer for 32-bit builds. */ } pNewInputCache = ma_realloc(pDevice->playback.pInputCache, (size_t)newInputCacheSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pNewInputCache == NULL) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; return MA_OUT_OF_MEMORY; } pDevice->playback.pInputCache = pNewInputCache; pDevice->playback.inputCacheCap = newInputCacheCap; } else { /* Heap allocation not required. Make sure we clear out the old cache just in case this function was called in response to a route change. */ ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; } } return MA_SUCCESS; } MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pDescriptorPlayback, const ma_device_descriptor* pDescriptorCapture) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } /* Capture. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { if (ma_device_descriptor_is_valid(pDescriptorCapture) == MA_FALSE) { return MA_INVALID_ARGS; } pDevice->capture.internalFormat = pDescriptorCapture->format; pDevice->capture.internalChannels = pDescriptorCapture->channels; pDevice->capture.internalSampleRate = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); pDevice->capture.internalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->capture.internalPeriods = pDescriptorCapture->periodCount; if (pDevice->capture.internalPeriodSizeInFrames == 0) { pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorCapture->periodSizeInMilliseconds, pDescriptorCapture->sampleRate); } } /* Playback. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { if (ma_device_descriptor_is_valid(pDescriptorPlayback) == MA_FALSE) { return MA_INVALID_ARGS; } pDevice->playback.internalFormat = pDescriptorPlayback->format; pDevice->playback.internalChannels = pDescriptorPlayback->channels; pDevice->playback.internalSampleRate = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); pDevice->playback.internalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->playback.internalPeriods = pDescriptorPlayback->periodCount; if (pDevice->playback.internalPeriodSizeInFrames == 0) { pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorPlayback->periodSizeInMilliseconds, pDescriptorPlayback->sampleRate); } } /* The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead. For loopback devices, we need to retrieve the name of the playback device. */ { ma_device_info deviceInfo; if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { result = ma_device_get_info(pDevice, ma_device_type_capture, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (pDescriptorCapture->pDeviceID == NULL) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), "Capture Device", (size_t)-1); } } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (pDescriptorPlayback->pDeviceID == NULL) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), "Playback Device", (size_t)-1); } } } } /* Update data conversion. */ return ma_device__post_init_setup(pDevice, deviceType); /* TODO: Should probably rename ma_device__post_init_setup() to something better. */ } static ma_thread_result MA_THREADCALL ma_worker_thread(void* pData) { ma_device* pDevice = (ma_device*)pData; #ifdef MA_WIN32 HRESULT CoInitializeResult; #endif MA_ASSERT(pDevice != NULL); #ifdef MA_WIN32 CoInitializeResult = ma_CoInitializeEx(pDevice->pContext, NULL, MA_COINIT_VALUE); #endif /* When the device is being initialized its initial state is set to ma_device_state_uninitialized. Before returning from ma_device_init(), the state needs to be set to something valid. In miniaudio the device's default state immediately after initialization is stopped, so therefore we need to mark the device as such. miniaudio will wait on the worker thread to signal an event to know when the worker thread is ready for action. */ ma_device__set_state(pDevice, ma_device_state_stopped); ma_event_signal(&pDevice->stopEvent); for (;;) { /* <-- This loop just keeps the thread alive. The main audio loop is inside. */ ma_result startResult; ma_result stopResult; /* <-- This will store the result from onDeviceStop(). If it returns an error, we don't fire the stopped notification callback. */ /* We wait on an event to know when something has requested that the device be started and the main loop entered. */ ma_event_wait(&pDevice->wakeupEvent); /* Default result code. */ pDevice->workResult = MA_SUCCESS; /* If the reason for the wake up is that we are terminating, just break from the loop. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { break; } /* Getting to this point means the device is wanting to get started. The function that has requested that the device be started will be waiting on an event (pDevice->startEvent) which means we need to make sure we signal the event in both the success and error case. It's important that the state of the device is set _before_ signaling the event. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_starting); /* If the device has a start callback, start it now. */ if (pDevice->pContext->callbacks.onDeviceStart != NULL) { startResult = pDevice->pContext->callbacks.onDeviceStart(pDevice); } else { startResult = MA_SUCCESS; } /* If starting was not successful we'll need to loop back to the start and wait for something to happen (pDevice->wakeupEvent). */ if (startResult != MA_SUCCESS) { pDevice->workResult = startResult; ma_event_signal(&pDevice->startEvent); /* <-- Always signal the start event so ma_device_start() can return as it'll be waiting on it. */ continue; } /* Make sure the state is set appropriately. */ ma_device__set_state(pDevice, ma_device_state_started); /* <-- Set this before signaling the event so that the state is always guaranteed to be good after ma_device_start() has returned. */ ma_event_signal(&pDevice->startEvent); ma_device__on_notification_started(pDevice); if (pDevice->pContext->callbacks.onDeviceDataLoop != NULL) { pDevice->pContext->callbacks.onDeviceDataLoop(pDevice); } else { /* The backend is not using a custom main loop implementation, so now fall back to the blocking read-write implementation. */ ma_device_audio_thread__default_read_write(pDevice); } /* Getting here means we have broken from the main loop which happens the application has requested that device be stopped. */ if (pDevice->pContext->callbacks.onDeviceStop != NULL) { stopResult = pDevice->pContext->callbacks.onDeviceStop(pDevice); } else { stopResult = MA_SUCCESS; /* No stop callback with the backend. Just assume successful. */ } /* After the device has stopped, make sure an event is posted. Don't post a stopped event if stopping failed. This can happen on some backends when the underlying stream has been stopped due to the device being physically unplugged or disabled via an OS setting. */ if (stopResult == MA_SUCCESS) { ma_device__on_notification_stopped(pDevice); } /* If we stopped because the device has been uninitialized, abort now. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { break; } /* A function somewhere is waiting for the device to have stopped for real so we need to signal an event to allow it to continue. */ ma_device__set_state(pDevice, ma_device_state_stopped); ma_event_signal(&pDevice->stopEvent); } #ifdef MA_WIN32 if (CoInitializeResult == S_OK) { ma_CoUninitialize(pDevice->pContext); } #endif return (ma_thread_result)0; } /* Helper for determining whether or not the given device is initialized. */ static ma_bool32 ma_device__is_initialized(ma_device* pDevice) { if (pDevice == NULL) { return MA_FALSE; } return ma_device_get_state(pDevice) != ma_device_state_uninitialized; } #ifdef MA_WIN32 static ma_result ma_context_uninit_backend_apis__win32(ma_context* pContext) { /* For some reason UWP complains when CoUninitialize() is called. I'm just not going to call it on UWP. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pContext->win32.CoInitializeResult == S_OK) { ma_CoUninitialize(pContext); } #if defined(MA_WIN32_DESKTOP) ma_dlclose(ma_context_get_log(pContext), pContext->win32.hUser32DLL); ma_dlclose(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL); #endif ma_dlclose(ma_context_get_log(pContext), pContext->win32.hOle32DLL); #else (void)pContext; #endif return MA_SUCCESS; } static ma_result ma_context_init_backend_apis__win32(ma_context* pContext) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #if defined(MA_WIN32_DESKTOP) /* User32.dll */ pContext->win32.hUser32DLL = ma_dlopen(ma_context_get_log(pContext), "user32.dll"); if (pContext->win32.hUser32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.GetForegroundWindow = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, "GetForegroundWindow"); pContext->win32.GetDesktopWindow = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, "GetDesktopWindow"); /* Advapi32.dll */ pContext->win32.hAdvapi32DLL = ma_dlopen(ma_context_get_log(pContext), "advapi32.dll"); if (pContext->win32.hAdvapi32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.RegOpenKeyExA = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegOpenKeyExA"); pContext->win32.RegCloseKey = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegCloseKey"); pContext->win32.RegQueryValueExA = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegQueryValueExA"); #endif /* Ole32.dll */ pContext->win32.hOle32DLL = ma_dlopen(ma_context_get_log(pContext), "ole32.dll"); if (pContext->win32.hOle32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.CoInitialize = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoInitialize"); pContext->win32.CoInitializeEx = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoInitializeEx"); pContext->win32.CoUninitialize = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoUninitialize"); pContext->win32.CoCreateInstance = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoCreateInstance"); pContext->win32.CoTaskMemFree = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoTaskMemFree"); pContext->win32.PropVariantClear = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "PropVariantClear"); pContext->win32.StringFromGUID2 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "StringFromGUID2"); #else (void)pContext; /* Unused. */ #endif pContext->win32.CoInitializeResult = ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE); return MA_SUCCESS; } #else static ma_result ma_context_uninit_backend_apis__nix(ma_context* pContext) { (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init_backend_apis__nix(ma_context* pContext) { (void)pContext; return MA_SUCCESS; } #endif static ma_result ma_context_init_backend_apis(ma_context* pContext) { ma_result result; #ifdef MA_WIN32 result = ma_context_init_backend_apis__win32(pContext); #else result = ma_context_init_backend_apis__nix(pContext); #endif return result; } static ma_result ma_context_uninit_backend_apis(ma_context* pContext) { ma_result result; #ifdef MA_WIN32 result = ma_context_uninit_backend_apis__win32(pContext); #else result = ma_context_uninit_backend_apis__nix(pContext); #endif return result; } /* The default capacity doesn't need to be too big. */ #ifndef MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY #define MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY 32 #endif MA_API ma_device_job_thread_config ma_device_job_thread_config_init(void) { ma_device_job_thread_config config; MA_ZERO_OBJECT(&config); config.noThread = MA_FALSE; config.jobQueueCapacity = MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY; config.jobQueueFlags = 0; return config; } static ma_thread_result MA_THREADCALL ma_device_job_thread_entry(void* pUserData) { ma_device_job_thread* pJobThread = (ma_device_job_thread*)pUserData; MA_ASSERT(pJobThread != NULL); for (;;) { ma_result result; ma_job job; result = ma_device_job_thread_next(pJobThread, &job); if (result != MA_SUCCESS) { break; } if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) { break; } ma_job_process(&job); } return (ma_thread_result)0; } MA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread) { ma_result result; ma_job_queue_config jobQueueConfig; if (pJobThread == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pJobThread); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Initialize the job queue before the thread to ensure it's in a valid state. */ jobQueueConfig = ma_job_queue_config_init(pConfig->jobQueueFlags, pConfig->jobQueueCapacity); result = ma_job_queue_init(&jobQueueConfig, pAllocationCallbacks, &pJobThread->jobQueue); if (result != MA_SUCCESS) { return result; /* Failed to initialize job queue. */ } /* The thread needs to be initialized after the job queue to ensure the thread doesn't try to access it prematurely. */ if (pConfig->noThread == MA_FALSE) { result = ma_thread_create(&pJobThread->thread, ma_thread_priority_normal, 0, ma_device_job_thread_entry, pJobThread, pAllocationCallbacks); if (result != MA_SUCCESS) { ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks); return result; /* Failed to create the job thread. */ } pJobThread->_hasThread = MA_TRUE; } else { pJobThread->_hasThread = MA_FALSE; } return MA_SUCCESS; } MA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks) { if (pJobThread == NULL) { return; } /* The first thing to do is post a quit message to the job queue. If we're using a thread we'll need to wait for it. */ { ma_job job = ma_job_init(MA_JOB_TYPE_QUIT); ma_device_job_thread_post(pJobThread, &job); } /* Wait for the thread to terminate naturally. */ if (pJobThread->_hasThread) { ma_thread_wait(&pJobThread->thread); } /* At this point the thread should be terminated so we can safely uninitialize the job queue. */ ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks); } MA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob) { if (pJobThread == NULL || pJob == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_post(&pJobThread->jobQueue, pJob); } MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob) { if (pJob == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pJob); if (pJobThread == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_next(&pJobThread->jobQueue, pJob); } MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB) { size_t i; if (pA == NULL || pB == NULL) { return MA_FALSE; } for (i = 0; i < sizeof(ma_device_id); i += 1) { if (((const char*)pA)[i] != ((const char*)pB)[i]) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_context_config ma_context_config_init(void) { ma_context_config config; MA_ZERO_OBJECT(&config); return config; } MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext) { ma_result result; ma_context_config defaultConfig; ma_backend defaultBackends[ma_backend_null+1]; ma_uint32 iBackend; ma_backend* pBackendsToIterate; ma_uint32 backendsToIterateCount; if (pContext == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pContext); /* Always make sure the config is set first to ensure properties are available as soon as possible. */ if (pConfig == NULL) { defaultConfig = ma_context_config_init(); pConfig = &defaultConfig; } /* Allocation callbacks need to come first because they'll be passed around to other areas. */ result = ma_allocation_callbacks_init_copy(&pContext->allocationCallbacks, &pConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } /* Get a lot set up first so we can start logging ASAP. */ if (pConfig->pLog != NULL) { pContext->pLog = pConfig->pLog; } else { result = ma_log_init(&pContext->allocationCallbacks, &pContext->log); if (result == MA_SUCCESS) { pContext->pLog = &pContext->log; } else { pContext->pLog = NULL; /* Logging is not available. */ } } pContext->threadPriority = pConfig->threadPriority; pContext->threadStackSize = pConfig->threadStackSize; pContext->pUserData = pConfig->pUserData; /* Backend APIs need to be initialized first. This is where external libraries will be loaded and linked. */ result = ma_context_init_backend_apis(pContext); if (result != MA_SUCCESS) { return result; } for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) { defaultBackends[iBackend] = (ma_backend)iBackend; } pBackendsToIterate = (ma_backend*)backends; backendsToIterateCount = backendCount; if (pBackendsToIterate == NULL) { pBackendsToIterate = (ma_backend*)defaultBackends; backendsToIterateCount = ma_countof(defaultBackends); } MA_ASSERT(pBackendsToIterate != NULL); for (iBackend = 0; iBackend < backendsToIterateCount; iBackend += 1) { ma_backend backend = pBackendsToIterate[iBackend]; /* Make sure all callbacks are reset so we don't accidentally drag in any from previously failed initialization attempts. */ MA_ZERO_OBJECT(&pContext->callbacks); /* These backends are using the new callback system. */ switch (backend) { #ifdef MA_HAS_WASAPI case ma_backend_wasapi: { pContext->callbacks.onContextInit = ma_context_init__wasapi; } break; #endif #ifdef MA_HAS_DSOUND case ma_backend_dsound: { pContext->callbacks.onContextInit = ma_context_init__dsound; } break; #endif #ifdef MA_HAS_WINMM case ma_backend_winmm: { pContext->callbacks.onContextInit = ma_context_init__winmm; } break; #endif #ifdef MA_HAS_COREAUDIO case ma_backend_coreaudio: { pContext->callbacks.onContextInit = ma_context_init__coreaudio; } break; #endif #ifdef MA_HAS_SNDIO case ma_backend_sndio: { pContext->callbacks.onContextInit = ma_context_init__sndio; } break; #endif #ifdef MA_HAS_AUDIO4 case ma_backend_audio4: { pContext->callbacks.onContextInit = ma_context_init__audio4; } break; #endif #ifdef MA_HAS_OSS case ma_backend_oss: { pContext->callbacks.onContextInit = ma_context_init__oss; } break; #endif #ifdef MA_HAS_PULSEAUDIO case ma_backend_pulseaudio: { pContext->callbacks.onContextInit = ma_context_init__pulse; } break; #endif #ifdef MA_HAS_ALSA case ma_backend_alsa: { pContext->callbacks.onContextInit = ma_context_init__alsa; } break; #endif #ifdef MA_HAS_JACK case ma_backend_jack: { pContext->callbacks.onContextInit = ma_context_init__jack; } break; #endif #ifdef MA_HAS_AAUDIO case ma_backend_aaudio: { if (ma_is_backend_enabled(backend)) { pContext->callbacks.onContextInit = ma_context_init__aaudio; } } break; #endif #ifdef MA_HAS_OPENSL case ma_backend_opensl: { if (ma_is_backend_enabled(backend)) { pContext->callbacks.onContextInit = ma_context_init__opensl; } } break; #endif #ifdef MA_HAS_WEBAUDIO case ma_backend_webaudio: { pContext->callbacks.onContextInit = ma_context_init__webaudio; } break; #endif #ifdef MA_HAS_CUSTOM case ma_backend_custom: { /* Slightly different logic for custom backends. Custom backends can optionally set all of their callbacks in the config. */ pContext->callbacks = pConfig->custom; } break; #endif #ifdef MA_HAS_NULL case ma_backend_null: { pContext->callbacks.onContextInit = ma_context_init__null; } break; #endif default: break; } if (pContext->callbacks.onContextInit != NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Attempting to initialize %s backend...\n", ma_get_backend_name(backend)); result = pContext->callbacks.onContextInit(pContext, pConfig, &pContext->callbacks); } else { /* Getting here means the onContextInit callback is not set which means the backend is not enabled. Special case for the custom backend. */ if (backend != ma_backend_custom) { result = MA_BACKEND_NOT_ENABLED; } else { #if !defined(MA_HAS_CUSTOM) result = MA_BACKEND_NOT_ENABLED; #else result = MA_NO_BACKEND; #endif } } /* If this iteration was successful, return. */ if (result == MA_SUCCESS) { result = ma_mutex_init(&pContext->deviceEnumLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Failed to initialize mutex for device enumeration. ma_context_get_devices() is not thread safe.\n"); } result = ma_mutex_init(&pContext->deviceInfoLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Failed to initialize mutex for device info retrieval. ma_context_get_device_info() is not thread safe.\n"); } ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "System Architecture:\n"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " Endian: %s\n", ma_is_little_endian() ? "LE" : "BE"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " SSE2: %s\n", ma_has_sse2() ? "YES" : "NO"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " AVX2: %s\n", ma_has_avx2() ? "YES" : "NO"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " NEON: %s\n", ma_has_neon() ? "YES" : "NO"); pContext->backend = backend; return result; } else { if (result == MA_BACKEND_NOT_ENABLED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "%s backend is disabled.\n", ma_get_backend_name(backend)); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Failed to initialize %s backend.\n", ma_get_backend_name(backend)); } } } /* If we get here it means an error occurred. */ MA_ZERO_OBJECT(pContext); /* Safety. */ return MA_NO_BACKEND; } MA_API ma_result ma_context_uninit(ma_context* pContext) { if (pContext == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextUninit != NULL) { pContext->callbacks.onContextUninit(pContext); } ma_mutex_uninit(&pContext->deviceEnumLock); ma_mutex_uninit(&pContext->deviceInfoLock); ma_free(pContext->pDeviceInfos, &pContext->allocationCallbacks); ma_context_uninit_backend_apis(pContext); if (pContext->pLog == &pContext->log) { ma_log_uninit(&pContext->log); } return MA_SUCCESS; } MA_API size_t ma_context_sizeof(void) { return sizeof(ma_context); } MA_API ma_log* ma_context_get_log(ma_context* pContext) { if (pContext == NULL) { return NULL; } return pContext->pLog; } MA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result; if (pContext == NULL || callback == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextEnumerateDevices == NULL) { return MA_INVALID_OPERATION; } ma_mutex_lock(&pContext->deviceEnumLock); { result = pContext->callbacks.onContextEnumerateDevices(pContext, callback, pUserData); } ma_mutex_unlock(&pContext->deviceEnumLock); return result; } static ma_bool32 ma_context_get_devices__enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData) { /* We need to insert the device info into our main internal buffer. Where it goes depends on the device type. If it's a capture device it's just appended to the end. If it's a playback device it's inserted just before the first capture device. */ /* First make sure we have room. Since the number of devices we add to the list is usually relatively small I've decided to use a simple fixed size increment for buffer expansion. */ const ma_uint32 bufferExpansionCount = 2; const ma_uint32 totalDeviceInfoCount = pContext->playbackDeviceInfoCount + pContext->captureDeviceInfoCount; if (totalDeviceInfoCount >= pContext->deviceInfoCapacity) { ma_uint32 newCapacity = pContext->deviceInfoCapacity + bufferExpansionCount; ma_device_info* pNewInfos = (ma_device_info*)ma_realloc(pContext->pDeviceInfos, sizeof(*pContext->pDeviceInfos)*newCapacity, &pContext->allocationCallbacks); if (pNewInfos == NULL) { return MA_FALSE; /* Out of memory. */ } pContext->pDeviceInfos = pNewInfos; pContext->deviceInfoCapacity = newCapacity; } if (deviceType == ma_device_type_playback) { /* Playback. Insert just before the first capture device. */ /* The first thing to do is move all of the capture devices down a slot. */ ma_uint32 iFirstCaptureDevice = pContext->playbackDeviceInfoCount; size_t iCaptureDevice; for (iCaptureDevice = totalDeviceInfoCount; iCaptureDevice > iFirstCaptureDevice; --iCaptureDevice) { pContext->pDeviceInfos[iCaptureDevice] = pContext->pDeviceInfos[iCaptureDevice-1]; } /* Now just insert where the first capture device was before moving it down a slot. */ pContext->pDeviceInfos[iFirstCaptureDevice] = *pInfo; pContext->playbackDeviceInfoCount += 1; } else { /* Capture. Insert at the end. */ pContext->pDeviceInfos[totalDeviceInfoCount] = *pInfo; pContext->captureDeviceInfoCount += 1; } (void)pUserData; return MA_TRUE; } MA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount) { ma_result result; /* Safety. */ if (ppPlaybackDeviceInfos != NULL) *ppPlaybackDeviceInfos = NULL; if (pPlaybackDeviceCount != NULL) *pPlaybackDeviceCount = 0; if (ppCaptureDeviceInfos != NULL) *ppCaptureDeviceInfos = NULL; if (pCaptureDeviceCount != NULL) *pCaptureDeviceCount = 0; if (pContext == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextEnumerateDevices == NULL) { return MA_INVALID_OPERATION; } /* Note that we don't use ma_context_enumerate_devices() here because we want to do locking at a higher level. */ ma_mutex_lock(&pContext->deviceEnumLock); { /* Reset everything first. */ pContext->playbackDeviceInfoCount = 0; pContext->captureDeviceInfoCount = 0; /* Now enumerate over available devices. */ result = pContext->callbacks.onContextEnumerateDevices(pContext, ma_context_get_devices__enum_callback, NULL); if (result == MA_SUCCESS) { /* Playback devices. */ if (ppPlaybackDeviceInfos != NULL) { *ppPlaybackDeviceInfos = pContext->pDeviceInfos; } if (pPlaybackDeviceCount != NULL) { *pPlaybackDeviceCount = pContext->playbackDeviceInfoCount; } /* Capture devices. */ if (ppCaptureDeviceInfos != NULL) { *ppCaptureDeviceInfos = pContext->pDeviceInfos; /* Capture devices come after playback devices. */ if (pContext->playbackDeviceInfoCount > 0) { /* Conditional, because NULL+0 is undefined behavior. */ *ppCaptureDeviceInfos += pContext->playbackDeviceInfoCount; } } if (pCaptureDeviceCount != NULL) { *pCaptureDeviceCount = pContext->captureDeviceInfoCount; } } } ma_mutex_unlock(&pContext->deviceEnumLock); return result; } MA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; ma_device_info deviceInfo; /* NOTE: Do not clear pDeviceInfo on entry. The reason is the pDeviceID may actually point to pDeviceInfo->id which will break things. */ if (pContext == NULL || pDeviceInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(&deviceInfo); /* Help the backend out by copying over the device ID if we have one. */ if (pDeviceID != NULL) { MA_COPY_MEMORY(&deviceInfo.id, pDeviceID, sizeof(*pDeviceID)); } if (pContext->callbacks.onContextGetDeviceInfo == NULL) { return MA_INVALID_OPERATION; } ma_mutex_lock(&pContext->deviceInfoLock); { result = pContext->callbacks.onContextGetDeviceInfo(pContext, deviceType, pDeviceID, &deviceInfo); } ma_mutex_unlock(&pContext->deviceInfoLock); *pDeviceInfo = deviceInfo; return result; } MA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext) { if (pContext == NULL) { return MA_FALSE; } return ma_is_loopback_supported(pContext->backend); } MA_API ma_device_config ma_device_config_init(ma_device_type deviceType) { ma_device_config config; MA_ZERO_OBJECT(&config); config.deviceType = deviceType; config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate don't matter here. */ return config; } MA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice) { ma_result result; ma_device_descriptor descriptorPlayback; ma_device_descriptor descriptorCapture; /* The context can be null, in which case we self-manage it. */ if (pContext == NULL) { return ma_device_init_ex(NULL, 0, NULL, pConfig, pDevice); } if (pDevice == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDevice); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Check that we have our callbacks defined. */ if (pContext->callbacks.onDeviceInit == NULL) { return MA_INVALID_OPERATION; } /* Basic config validation. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { if (pConfig->capture.channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } if (!ma__is_channel_map_valid(pConfig->capture.pChannelMap, pConfig->capture.channels)) { return MA_INVALID_ARGS; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { if (pConfig->playback.channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } if (!ma__is_channel_map_valid(pConfig->playback.pChannelMap, pConfig->playback.channels)) { return MA_INVALID_ARGS; } } pDevice->pContext = pContext; /* Set the user data and log callback ASAP to ensure it is available for the entire initialization process. */ pDevice->pUserData = pConfig->pUserData; pDevice->onData = pConfig->dataCallback; pDevice->onNotification = pConfig->notificationCallback; pDevice->onStop = pConfig->stopCallback; if (pConfig->playback.pDeviceID != NULL) { MA_COPY_MEMORY(&pDevice->playback.id, pConfig->playback.pDeviceID, sizeof(pDevice->playback.id)); pDevice->playback.pID = &pDevice->playback.id; } else { pDevice->playback.pID = NULL; } if (pConfig->capture.pDeviceID != NULL) { MA_COPY_MEMORY(&pDevice->capture.id, pConfig->capture.pDeviceID, sizeof(pDevice->capture.id)); pDevice->capture.pID = &pDevice->capture.id; } else { pDevice->capture.pID = NULL; } pDevice->noPreSilencedOutputBuffer = pConfig->noPreSilencedOutputBuffer; pDevice->noClip = pConfig->noClip; pDevice->noDisableDenormals = pConfig->noDisableDenormals; pDevice->noFixedSizedCallback = pConfig->noFixedSizedCallback; ma_atomic_float_set(&pDevice->masterVolumeFactor, 1); pDevice->type = pConfig->deviceType; pDevice->sampleRate = pConfig->sampleRate; pDevice->resampling.algorithm = pConfig->resampling.algorithm; pDevice->resampling.linear.lpfOrder = pConfig->resampling.linear.lpfOrder; pDevice->resampling.pBackendVTable = pConfig->resampling.pBackendVTable; pDevice->resampling.pBackendUserData = pConfig->resampling.pBackendUserData; pDevice->capture.shareMode = pConfig->capture.shareMode; pDevice->capture.format = pConfig->capture.format; pDevice->capture.channels = pConfig->capture.channels; ma_channel_map_copy_or_default(pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels); pDevice->capture.channelMixMode = pConfig->capture.channelMixMode; pDevice->capture.calculateLFEFromSpatialChannels = pConfig->capture.calculateLFEFromSpatialChannels; pDevice->playback.shareMode = pConfig->playback.shareMode; pDevice->playback.format = pConfig->playback.format; pDevice->playback.channels = pConfig->playback.channels; ma_channel_map_copy_or_default(pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels); pDevice->playback.channelMixMode = pConfig->playback.channelMixMode; pDevice->playback.calculateLFEFromSpatialChannels = pConfig->playback.calculateLFEFromSpatialChannels; result = ma_mutex_init(&pDevice->startStopLock); if (result != MA_SUCCESS) { return result; } /* When the device is started, the worker thread is the one that does the actual startup of the backend device. We use a semaphore to wait for the background thread to finish the work. The same applies for stopping the device. Each of these semaphores is released internally by the worker thread when the work is completed. The start semaphore is also used to wake up the worker thread. */ result = ma_event_init(&pDevice->wakeupEvent); if (result != MA_SUCCESS) { ma_mutex_uninit(&pDevice->startStopLock); return result; } result = ma_event_init(&pDevice->startEvent); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } result = ma_event_init(&pDevice->stopEvent); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } MA_ZERO_OBJECT(&descriptorPlayback); descriptorPlayback.pDeviceID = pConfig->playback.pDeviceID; descriptorPlayback.shareMode = pConfig->playback.shareMode; descriptorPlayback.format = pConfig->playback.format; descriptorPlayback.channels = pConfig->playback.channels; descriptorPlayback.sampleRate = pConfig->sampleRate; ma_channel_map_copy_or_default(descriptorPlayback.channelMap, ma_countof(descriptorPlayback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels); descriptorPlayback.periodSizeInFrames = pConfig->periodSizeInFrames; descriptorPlayback.periodSizeInMilliseconds = pConfig->periodSizeInMilliseconds; descriptorPlayback.periodCount = pConfig->periods; if (descriptorPlayback.periodCount == 0) { descriptorPlayback.periodCount = MA_DEFAULT_PERIODS; } MA_ZERO_OBJECT(&descriptorCapture); descriptorCapture.pDeviceID = pConfig->capture.pDeviceID; descriptorCapture.shareMode = pConfig->capture.shareMode; descriptorCapture.format = pConfig->capture.format; descriptorCapture.channels = pConfig->capture.channels; descriptorCapture.sampleRate = pConfig->sampleRate; ma_channel_map_copy_or_default(descriptorCapture.channelMap, ma_countof(descriptorCapture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels); descriptorCapture.periodSizeInFrames = pConfig->periodSizeInFrames; descriptorCapture.periodSizeInMilliseconds = pConfig->periodSizeInMilliseconds; descriptorCapture.periodCount = pConfig->periods; if (descriptorCapture.periodCount == 0) { descriptorCapture.periodCount = MA_DEFAULT_PERIODS; } result = pContext->callbacks.onDeviceInit(pDevice, pConfig, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } #if 0 /* On output the descriptors will contain the *actual* data format of the device. We need this to know how to convert the data between the requested format and the internal format. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { if (!ma_device_descriptor_is_valid(&descriptorCapture)) { ma_device_uninit(pDevice); return MA_INVALID_ARGS; } pDevice->capture.internalFormat = descriptorCapture.format; pDevice->capture.internalChannels = descriptorCapture.channels; pDevice->capture.internalSampleRate = descriptorCapture.sampleRate; ma_channel_map_copy(pDevice->capture.internalChannelMap, descriptorCapture.channelMap, descriptorCapture.channels); pDevice->capture.internalPeriodSizeInFrames = descriptorCapture.periodSizeInFrames; pDevice->capture.internalPeriods = descriptorCapture.periodCount; if (pDevice->capture.internalPeriodSizeInFrames == 0) { pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorCapture.periodSizeInMilliseconds, descriptorCapture.sampleRate); } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { if (!ma_device_descriptor_is_valid(&descriptorPlayback)) { ma_device_uninit(pDevice); return MA_INVALID_ARGS; } pDevice->playback.internalFormat = descriptorPlayback.format; pDevice->playback.internalChannels = descriptorPlayback.channels; pDevice->playback.internalSampleRate = descriptorPlayback.sampleRate; ma_channel_map_copy(pDevice->playback.internalChannelMap, descriptorPlayback.channelMap, descriptorPlayback.channels); pDevice->playback.internalPeriodSizeInFrames = descriptorPlayback.periodSizeInFrames; pDevice->playback.internalPeriods = descriptorPlayback.periodCount; if (pDevice->playback.internalPeriodSizeInFrames == 0) { pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorPlayback.periodSizeInMilliseconds, descriptorPlayback.sampleRate); } } /* The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead. For loopback devices, we need to retrieve the name of the playback device. */ { ma_device_info deviceInfo; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { result = ma_device_get_info(pDevice, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_playback : ma_device_type_capture, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (descriptorCapture.pDeviceID == NULL) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), "Capture Device", (size_t)-1); } } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (descriptorPlayback.pDeviceID == NULL) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), "Playback Device", (size_t)-1); } } } } ma_device__post_init_setup(pDevice, pConfig->deviceType); #endif result = ma_device_post_init(pDevice, pConfig->deviceType, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } /* If we're using fixed sized callbacks we'll need to make use of an intermediary buffer. Needs to be done after post_init_setup() because we'll need access to the sample rate. */ if (pConfig->noFixedSizedCallback == MA_FALSE) { /* We're using a fixed sized data callback so we'll need an intermediary buffer. */ ma_uint32 intermediaryBufferCap = pConfig->periodSizeInFrames; if (intermediaryBufferCap == 0) { intermediaryBufferCap = ma_calculate_buffer_size_in_frames_from_milliseconds(pConfig->periodSizeInMilliseconds, pDevice->sampleRate); } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { ma_uint32 intermediaryBufferSizeInBytes; pDevice->capture.intermediaryBufferLen = 0; pDevice->capture.intermediaryBufferCap = intermediaryBufferCap; if (pDevice->capture.intermediaryBufferCap == 0) { pDevice->capture.intermediaryBufferCap = pDevice->capture.internalPeriodSizeInFrames; } intermediaryBufferSizeInBytes = pDevice->capture.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); pDevice->capture.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks); if (pDevice->capture.pIntermediaryBuffer == NULL) { ma_device_uninit(pDevice); return MA_OUT_OF_MEMORY; } /* Silence the buffer for safety. */ ma_silence_pcm_frames(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap, pDevice->capture.format, pDevice->capture.channels); pDevice->capture.intermediaryBufferLen = pDevice->capture.intermediaryBufferCap; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint64 intermediaryBufferSizeInBytes; pDevice->playback.intermediaryBufferLen = 0; if (pConfig->deviceType == ma_device_type_duplex) { pDevice->playback.intermediaryBufferCap = pDevice->capture.intermediaryBufferCap; /* In duplex mode, make sure the intermediary buffer is always the same size as the capture side. */ } else { pDevice->playback.intermediaryBufferCap = intermediaryBufferCap; if (pDevice->playback.intermediaryBufferCap == 0) { pDevice->playback.intermediaryBufferCap = pDevice->playback.internalPeriodSizeInFrames; } } intermediaryBufferSizeInBytes = pDevice->playback.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); pDevice->playback.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks); if (pDevice->playback.pIntermediaryBuffer == NULL) { ma_device_uninit(pDevice); return MA_OUT_OF_MEMORY; } /* Silence the buffer for safety. */ ma_silence_pcm_frames(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap, pDevice->playback.format, pDevice->playback.channels); pDevice->playback.intermediaryBufferLen = 0; } } else { /* Not using a fixed sized data callback so no need for an intermediary buffer. */ } /* Some backends don't require the worker thread. */ if (!ma_context_is_backend_asynchronous(pContext)) { /* The worker thread. */ result = ma_thread_create(&pDevice->thread, pContext->threadPriority, pContext->threadStackSize, ma_worker_thread, pDevice, &pContext->allocationCallbacks); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } /* Wait for the worker thread to put the device into its stopped state for real. */ ma_event_wait(&pDevice->stopEvent); MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); } else { /* If the backend is asynchronous and the device is duplex, we'll need an intermediary ring buffer. Note that this needs to be done after ma_device__post_init_setup(). */ if (ma_context_is_backend_asynchronous(pContext)) { if (pConfig->deviceType == ma_device_type_duplex) { result = ma_duplex_rb_init(pDevice->capture.format, pDevice->capture.channels, pDevice->sampleRate, pDevice->capture.internalSampleRate, pDevice->capture.internalPeriodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } } } ma_device__set_state(pDevice, ma_device_state_stopped); } /* Log device information. */ { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[%s]\n", ma_get_backend_name(pDevice->pContext->backend)); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(pDevice, ma_device_type_capture, name, sizeof(name), NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " %s (%s)\n", name, "Capture"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Format: %s -> %s\n", ma_get_format_name(pDevice->capture.internalFormat), ma_get_format_name(pDevice->capture.format)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channels: %d -> %d\n", pDevice->capture.internalChannels, pDevice->capture.channels); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Sample Rate: %d -> %d\n", pDevice->capture.internalSampleRate, pDevice->sampleRate); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Buffer Size: %d*%d (%d)\n", pDevice->capture.internalPeriodSizeInFrames, pDevice->capture.internalPeriods, (pDevice->capture.internalPeriodSizeInFrames * pDevice->capture.internalPeriods)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Conversion:\n"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Pre Format Conversion: %s\n", pDevice->capture.converter.hasPreFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Post Format Conversion: %s\n", pDevice->capture.converter.hasPostFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Routing: %s\n", pDevice->capture.converter.hasChannelConverter ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Resampling: %s\n", pDevice->capture.converter.hasResampler ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Passthrough: %s\n", pDevice->capture.converter.isPassthrough ? "YES" : "NO"); { char channelMapStr[1024]; ma_channel_map_to_string(pDevice->capture.internalChannelMap, pDevice->capture.internalChannels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map In: {%s}\n", channelMapStr); ma_channel_map_to_string(pDevice->capture.channelMap, pDevice->capture.channels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map Out: {%s}\n", channelMapStr); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(pDevice, ma_device_type_playback, name, sizeof(name), NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " %s (%s)\n", name, "Playback"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Format: %s -> %s\n", ma_get_format_name(pDevice->playback.format), ma_get_format_name(pDevice->playback.internalFormat)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channels: %d -> %d\n", pDevice->playback.channels, pDevice->playback.internalChannels); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Sample Rate: %d -> %d\n", pDevice->sampleRate, pDevice->playback.internalSampleRate); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Buffer Size: %d*%d (%d)\n", pDevice->playback.internalPeriodSizeInFrames, pDevice->playback.internalPeriods, (pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Conversion:\n"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Pre Format Conversion: %s\n", pDevice->playback.converter.hasPreFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Post Format Conversion: %s\n", pDevice->playback.converter.hasPostFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Routing: %s\n", pDevice->playback.converter.hasChannelConverter ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Resampling: %s\n", pDevice->playback.converter.hasResampler ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Passthrough: %s\n", pDevice->playback.converter.isPassthrough ? "YES" : "NO"); { char channelMapStr[1024]; ma_channel_map_to_string(pDevice->playback.channelMap, pDevice->playback.channels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map In: {%s}\n", channelMapStr); ma_channel_map_to_string(pDevice->playback.internalChannelMap, pDevice->playback.internalChannels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map Out: {%s}\n", channelMapStr); } } } MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); return MA_SUCCESS; } MA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice) { ma_result result; ma_context* pContext; ma_backend defaultBackends[ma_backend_null+1]; ma_uint32 iBackend; ma_backend* pBackendsToIterate; ma_uint32 backendsToIterateCount; ma_allocation_callbacks allocationCallbacks; if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pContextConfig != NULL) { result = ma_allocation_callbacks_init_copy(&allocationCallbacks, &pContextConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } } else { allocationCallbacks = ma_allocation_callbacks_init_default(); } pContext = (ma_context*)ma_malloc(sizeof(*pContext), &allocationCallbacks); if (pContext == NULL) { return MA_OUT_OF_MEMORY; } for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) { defaultBackends[iBackend] = (ma_backend)iBackend; } pBackendsToIterate = (ma_backend*)backends; backendsToIterateCount = backendCount; if (pBackendsToIterate == NULL) { pBackendsToIterate = (ma_backend*)defaultBackends; backendsToIterateCount = ma_countof(defaultBackends); } result = MA_NO_BACKEND; for (iBackend = 0; iBackend < backendsToIterateCount; ++iBackend) { /* This is a hack for iOS. If the context config is null, there's a good chance the `ma_device_init(NULL, &deviceConfig, pDevice);` pattern is being used. In this case, set the session category based on the device type. */ #if defined(MA_APPLE_MOBILE) ma_context_config contextConfig; if (pContextConfig == NULL) { contextConfig = ma_context_config_init(); switch (pConfig->deviceType) { case ma_device_type_duplex: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_play_and_record; } break; case ma_device_type_capture: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_record; } break; case ma_device_type_playback: default: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_playback; } break; } pContextConfig = &contextConfig; } #endif result = ma_context_init(&pBackendsToIterate[iBackend], 1, pContextConfig, pContext); if (result == MA_SUCCESS) { result = ma_device_init(pContext, pConfig, pDevice); if (result == MA_SUCCESS) { break; /* Success. */ } else { ma_context_uninit(pContext); /* Failure. */ } } } if (result != MA_SUCCESS) { ma_free(pContext, &allocationCallbacks); return result; } pDevice->isOwnerOfContext = MA_TRUE; return result; } MA_API void ma_device_uninit(ma_device* pDevice) { if (!ma_device__is_initialized(pDevice)) { return; } /* It's possible for the miniaudio side of the device and the backend to not be in sync due to system-level situations such as the computer being put into sleep mode and the backend not notifying miniaudio of the fact the device has stopped. It's possible for this to result in a deadlock due to miniaudio thinking the device is in a running state, when in fact it's not running at all. For this reason I am no longer explicitly stopping the device. I don't think this should affect anyone in practice since uninitializing the backend will naturally stop the device anyway. */ #if 0 { /* Make sure the device is stopped first. The backends will probably handle this naturally, but I like to do it explicitly for my own sanity. */ if (ma_device_is_started(pDevice)) { ma_device_stop(pDevice); } } #endif /* Putting the device into an uninitialized state will make the worker thread return. */ ma_device__set_state(pDevice, ma_device_state_uninitialized); /* Wake up the worker thread and wait for it to properly terminate. */ if (!ma_context_is_backend_asynchronous(pDevice->pContext)) { ma_event_signal(&pDevice->wakeupEvent); ma_thread_wait(&pDevice->thread); } if (pDevice->pContext->callbacks.onDeviceUninit != NULL) { pDevice->pContext->callbacks.onDeviceUninit(pDevice); } ma_event_uninit(&pDevice->stopEvent); ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); if (ma_context_is_backend_asynchronous(pDevice->pContext)) { if (pDevice->type == ma_device_type_duplex) { ma_duplex_rb_uninit(&pDevice->duplexRB); } } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks); } if (pDevice->playback.pInputCache != NULL) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); } if (pDevice->capture.pIntermediaryBuffer != NULL) { ma_free(pDevice->capture.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); } if (pDevice->playback.pIntermediaryBuffer != NULL) { ma_free(pDevice->playback.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); } if (pDevice->isOwnerOfContext) { ma_allocation_callbacks allocationCallbacks = pDevice->pContext->allocationCallbacks; ma_context_uninit(pDevice->pContext); ma_free(pDevice->pContext, &allocationCallbacks); } MA_ZERO_OBJECT(pDevice); } MA_API ma_context* ma_device_get_context(ma_device* pDevice) { if (pDevice == NULL) { return NULL; } return pDevice->pContext; } MA_API ma_log* ma_device_get_log(ma_device* pDevice) { return ma_context_get_log(ma_device_get_context(pDevice)); } MA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo) { if (pDeviceInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDeviceInfo); if (pDevice == NULL) { return MA_INVALID_ARGS; } /* If the onDeviceGetInfo() callback is set, use that. Otherwise we'll fall back to ma_context_get_device_info(). */ if (pDevice->pContext->callbacks.onDeviceGetInfo != NULL) { return pDevice->pContext->callbacks.onDeviceGetInfo(pDevice, type, pDeviceInfo); } /* Getting here means onDeviceGetInfo is not implemented so we need to fall back to an alternative. */ if (type == ma_device_type_playback) { return ma_context_get_device_info(pDevice->pContext, type, pDevice->playback.pID, pDeviceInfo); } else { /* Here we're getting the capture side, which is the branch we'll be entering for a loopback device, since loopback is capturing. However, if the device is using the default device ID, it won't get the correct information because it'll think we're asking for the default capture device, where in fact for loopback we want the default *playback* device. We'll do a bit of a hack here to make sure we get the correct info. */ if (pDevice->type == ma_device_type_loopback && pDevice->capture.pID == NULL) { type = ma_device_type_playback; } return ma_context_get_device_info(pDevice->pContext, type, pDevice->capture.pID, pDeviceInfo); } } MA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator) { ma_result result; ma_device_info deviceInfo; if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = 0; } if (pName != NULL && nameCap > 0) { pName[0] = '\0'; } result = ma_device_get_info(pDevice, type, &deviceInfo); if (result != MA_SUCCESS) { return result; } if (pName != NULL) { ma_strncpy_s(pName, nameCap, deviceInfo.name, (size_t)-1); /* For safety, make sure the length is based on the truncated output string rather than the source. Otherwise the caller might assume the output buffer contains more content than it actually does. */ if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = strlen(pName); } } else { /* Name not specified. Just report the length of the source string. */ if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = strlen(deviceInfo.name); } } return MA_SUCCESS; } MA_API ma_result ma_device_start(ma_device* pDevice) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { return MA_INVALID_OPERATION; /* Not initialized. */ } if (ma_device_get_state(pDevice) == ma_device_state_started) { return MA_SUCCESS; /* Already started. */ } ma_mutex_lock(&pDevice->startStopLock); { /* We need to check again if the device is in a started state because it's possible for one thread to have started the device while another was waiting on the mutex. */ if (ma_device_get_state(pDevice) == ma_device_state_started) { ma_mutex_unlock(&pDevice->startStopLock); return MA_SUCCESS; /* Already started. */ } /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a stopped or paused state. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); ma_device__set_state(pDevice, ma_device_state_starting); /* Asynchronous backends need to be handled differently. */ if (ma_context_is_backend_asynchronous(pDevice->pContext)) { if (pDevice->pContext->callbacks.onDeviceStart != NULL) { result = pDevice->pContext->callbacks.onDeviceStart(pDevice); } else { result = MA_INVALID_OPERATION; } if (result == MA_SUCCESS) { ma_device__set_state(pDevice, ma_device_state_started); ma_device__on_notification_started(pDevice); } } else { /* Synchronous backends are started by signaling an event that's being waited on in the worker thread. We first wake up the thread and then wait for the start event. */ ma_event_signal(&pDevice->wakeupEvent); /* Wait for the worker thread to finish starting the device. Note that the worker thread will be the one who puts the device into the started state. Don't call ma_device__set_state() here. */ ma_event_wait(&pDevice->startEvent); result = pDevice->workResult; } /* We changed the state from stopped to started, so if we failed, make sure we put the state back to stopped. */ if (result != MA_SUCCESS) { ma_device__set_state(pDevice, ma_device_state_stopped); } } ma_mutex_unlock(&pDevice->startStopLock); return result; } MA_API ma_result ma_device_stop(ma_device* pDevice) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { return MA_INVALID_OPERATION; /* Not initialized. */ } if (ma_device_get_state(pDevice) == ma_device_state_stopped) { return MA_SUCCESS; /* Already stopped. */ } ma_mutex_lock(&pDevice->startStopLock); { /* We need to check again if the device is in a stopped state because it's possible for one thread to have stopped the device while another was waiting on the mutex. */ if (ma_device_get_state(pDevice) == ma_device_state_stopped) { ma_mutex_unlock(&pDevice->startStopLock); return MA_SUCCESS; /* Already stopped. */ } /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a started or paused state. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_started); ma_device__set_state(pDevice, ma_device_state_stopping); /* Asynchronous backends need to be handled differently. */ if (ma_context_is_backend_asynchronous(pDevice->pContext)) { /* Asynchronous backends must have a stop operation. */ if (pDevice->pContext->callbacks.onDeviceStop != NULL) { result = pDevice->pContext->callbacks.onDeviceStop(pDevice); } else { result = MA_INVALID_OPERATION; } ma_device__set_state(pDevice, ma_device_state_stopped); } else { /* Synchronous backends. The stop callback is always called from the worker thread. Do not call the stop callback here. If the backend is implementing its own audio thread loop we'll need to wake it up if required. Note that we need to make sure the state of the device is *not* playing right now, which it shouldn't be since we set it above. This is super important though, so I'm asserting it here as well for extra safety in case we accidentally change something later. */ MA_ASSERT(ma_device_get_state(pDevice) != ma_device_state_started); if (pDevice->pContext->callbacks.onDeviceDataLoopWakeup != NULL) { pDevice->pContext->callbacks.onDeviceDataLoopWakeup(pDevice); } /* We need to wait for the worker thread to become available for work before returning. Note that the worker thread will be the one who puts the device into the stopped state. Don't call ma_device__set_state() here. */ ma_event_wait(&pDevice->stopEvent); result = MA_SUCCESS; } /* This is a safety measure to ensure the internal buffer has been cleared so any leftover does not get played the next time the device starts. Ideally this should be drained by the backend first. */ pDevice->playback.intermediaryBufferLen = 0; pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = 0; } ma_mutex_unlock(&pDevice->startStopLock); return result; } MA_API ma_bool32 ma_device_is_started(const ma_device* pDevice) { return ma_device_get_state(pDevice) == ma_device_state_started; } MA_API ma_device_state ma_device_get_state(const ma_device* pDevice) { if (pDevice == NULL) { return ma_device_state_uninitialized; } return ma_atomic_device_state_get((ma_atomic_device_state*)&pDevice->state); /* Naughty cast to get rid of a const warning. */ } MA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume) { if (pDevice == NULL) { return MA_INVALID_ARGS; } if (volume < 0.0f) { return MA_INVALID_ARGS; } ma_atomic_float_set(&pDevice->masterVolumeFactor, volume); return MA_SUCCESS; } MA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume) { if (pVolume == NULL) { return MA_INVALID_ARGS; } if (pDevice == NULL) { *pVolume = 0; return MA_INVALID_ARGS; } *pVolume = ma_atomic_float_get(&pDevice->masterVolumeFactor); return MA_SUCCESS; } MA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB) { if (gainDB > 0) { return MA_INVALID_ARGS; } return ma_device_set_master_volume(pDevice, ma_volume_db_to_linear(gainDB)); } MA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB) { float factor; ma_result result; if (pGainDB == NULL) { return MA_INVALID_ARGS; } result = ma_device_get_master_volume(pDevice, &factor); if (result != MA_SUCCESS) { *pGainDB = 0; return result; } *pGainDB = ma_volume_linear_to_db(factor); return MA_SUCCESS; } MA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { if (pDevice == NULL) { return MA_INVALID_ARGS; } if (pOutput == NULL && pInput == NULL) { return MA_INVALID_ARGS; } /* There is an assert deeper in the code that checks that frameCount > 0. Since this is a public facing API we'll need to check for that here. I've had reports that AAudio can sometimes post a frame count of 0. */ if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDevice->type == ma_device_type_duplex) { if (pInput != NULL) { ma_device__handle_duplex_callback_capture(pDevice, frameCount, pInput, &pDevice->duplexRB.rb); } if (pOutput != NULL) { ma_device__handle_duplex_callback_playback(pDevice, frameCount, pOutput, &pDevice->duplexRB.rb); } } else { if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_loopback) { if (pInput == NULL) { return MA_INVALID_ARGS; } ma_device__send_frames_to_client(pDevice, frameCount, pInput); } if (pDevice->type == ma_device_type_playback) { if (pOutput == NULL) { return MA_INVALID_ARGS; } ma_device__read_frames_from_client(pDevice, frameCount, pOutput); } } return MA_SUCCESS; } MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { if (pDescriptor == NULL) { return 0; } /* We must have a non-0 native sample rate, but some backends don't allow retrieval of this at the time when the size of the buffer needs to be determined. In this case we need to just take a best guess and move on. We'll try using the sample rate in pDescriptor first. If that's not set we'll just fall back to MA_DEFAULT_SAMPLE_RATE. */ if (nativeSampleRate == 0) { nativeSampleRate = pDescriptor->sampleRate; } if (nativeSampleRate == 0) { nativeSampleRate = MA_DEFAULT_SAMPLE_RATE; } MA_ASSERT(nativeSampleRate != 0); if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, nativeSampleRate); } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, nativeSampleRate); } } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { return pDescriptor->periodSizeInFrames; } } #endif /* MA_NO_DEVICE_IO */ MA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate) { /* Prevent a division by zero. */ if (sampleRate == 0) { return 0; } return (bufferSizeInFrames*1000 + (sampleRate - 1)) / sampleRate; } MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate) { /* Prevent a division by zero. */ if (sampleRate == 0) { return 0; } return bufferSizeInMilliseconds*sampleRate / 1000; } MA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { if (dst == src) { return; /* No-op. */ } ma_copy_memory_64(dst, src, frameCount * ma_get_bytes_per_frame(format, channels)); } MA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { if (format == ma_format_u8) { ma_uint64 sampleCount = frameCount * channels; ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { ((ma_uint8*)p)[iSample] = 128; } } else { ma_zero_memory_64(p, frameCount * ma_get_bytes_per_frame(format, channels)); } } MA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels) { return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels)); } MA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels) { return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels)); } MA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_u8(pSrc[iSample]); } } MA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s16(pSrc[iSample]); } } MA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { ma_int64 s = ma_clip_s24(pSrc[iSample]); pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >> 0); pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >> 8); pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16); } } MA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s32(pSrc[iSample]); } } MA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_f32(pSrc[iSample]); } } MA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { ma_uint64 sampleCount; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); sampleCount = frameCount * channels; switch (format) { case ma_format_u8: ma_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount); break; case ma_format_s16: ma_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount); break; case ma_format_s24: ma_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount); break; case ma_format_s32: ma_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount); break; case ma_format_f32: ma_clip_samples_f32(( float*)pDst, (const float*)pSrc, sampleCount); break; /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */ case ma_format_unknown: case ma_format_count: break; } } MA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_uint8)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_int16)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; ma_uint8* pSamplesOut8; ma_uint8* pSamplesIn8; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } pSamplesOut8 = (ma_uint8*)pSamplesOut; pSamplesIn8 = (ma_uint8*)pSamplesIn; for (iSample = 0; iSample < sampleCount; iSample += 1) { ma_int32 sampleS32; sampleS32 = (ma_int32)(((ma_uint32)(pSamplesIn8[iSample*3+0]) << 8) | ((ma_uint32)(pSamplesIn8[iSample*3+1]) << 16) | ((ma_uint32)(pSamplesIn8[iSample*3+2])) << 24); sampleS32 = (ma_int32)(sampleS32 * factor); pSamplesOut8[iSample*3+0] = (ma_uint8)(((ma_uint32)sampleS32 & 0x0000FF00) >> 8); pSamplesOut8[iSample*3+1] = (ma_uint8)(((ma_uint32)sampleS32 & 0x00FF0000) >> 16); pSamplesOut8[iSample*3+2] = (ma_uint8)(((ma_uint32)sampleS32 & 0xFF000000) >> 24); } } MA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_int32)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } if (factor == 1) { if (pSamplesOut == pSamplesIn) { /* In place. No-op. */ } else { /* Just a copy. */ for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = pSamplesIn[iSample]; } } } else { for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = pSamplesIn[iSample] * factor; } } } MA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_u8(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s16(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s24(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s32(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_f32(pSamples, pSamples, sampleCount, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_u8(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s16(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s24(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s32(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_f32(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor) { switch (format) { case ma_format_u8: ma_copy_and_apply_volume_factor_pcm_frames_u8 ((ma_uint8*)pFramesOut, (const ma_uint8*)pFramesIn, frameCount, channels, factor); return; case ma_format_s16: ma_copy_and_apply_volume_factor_pcm_frames_s16((ma_int16*)pFramesOut, (const ma_int16*)pFramesIn, frameCount, channels, factor); return; case ma_format_s24: ma_copy_and_apply_volume_factor_pcm_frames_s24( pFramesOut, pFramesIn, frameCount, channels, factor); return; case ma_format_s32: ma_copy_and_apply_volume_factor_pcm_frames_s32((ma_int32*)pFramesOut, (const ma_int32*)pFramesIn, frameCount, channels, factor); return; case ma_format_f32: ma_copy_and_apply_volume_factor_pcm_frames_f32( (float*)pFramesOut, (const float*)pFramesIn, frameCount, channels, factor); return; default: return; /* Do nothing. */ } } MA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_u8(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s16(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s24(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s32(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_f32(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames(void* pFramesOut, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames(pFramesOut, pFramesOut, frameCount, format, channels, factor); } MA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains) { ma_uint64 iFrame; if (channels == 2) { /* TODO: Do an optimized implementation for stereo and mono. Can do a SIMD optimized implementation as well. */ } for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOut[iFrame * channels + iChannel] = pFramesIn[iFrame * channels + iChannel] * pChannelGains[iChannel]; } } } static MA_INLINE ma_int16 ma_apply_volume_unclipped_u8(ma_int16 x, ma_int16 volume) { return (ma_int16)(((ma_int32)x * (ma_int32)volume) >> 8); } static MA_INLINE ma_int32 ma_apply_volume_unclipped_s16(ma_int32 x, ma_int16 volume) { return (ma_int32)((x * volume) >> 8); } static MA_INLINE ma_int64 ma_apply_volume_unclipped_s24(ma_int64 x, ma_int16 volume) { return (ma_int64)((x * volume) >> 8); } static MA_INLINE ma_int64 ma_apply_volume_unclipped_s32(ma_int64 x, ma_int16 volume) { return (ma_int64)((x * volume) >> 8); } static MA_INLINE float ma_apply_volume_unclipped_f32(float x, float volume) { return x * volume; } MA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_u8(ma_apply_volume_unclipped_u8(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s16(ma_apply_volume_unclipped_s16(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { ma_int64 s = ma_clip_s24(ma_apply_volume_unclipped_s24(pSrc[iSample], volumeFixed)); pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >> 0); pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >> 8); pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s32(ma_apply_volume_unclipped_s32(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); /* For the f32 case we need to make sure this supports in-place processing where the input and output buffers are the same. */ for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_f32(ma_apply_volume_unclipped_f32(pSrc[iSample], volume)); } } MA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume) { MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); if (volume == 1) { ma_clip_pcm_frames(pDst, pSrc, frameCount, format, channels); /* Optimized case for volume = 1. */ } else if (volume == 0) { ma_silence_pcm_frames(pDst, frameCount, format, channels); /* Optimized case for volume = 0. */ } else { ma_uint64 sampleCount = frameCount * channels; switch (format) { case ma_format_u8: ma_copy_and_apply_volume_and_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount, volume); break; case ma_format_s16: ma_copy_and_apply_volume_and_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount, volume); break; case ma_format_s24: ma_copy_and_apply_volume_and_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break; case ma_format_s32: ma_copy_and_apply_volume_and_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break; case ma_format_f32: ma_copy_and_apply_volume_and_clip_samples_f32(( float*)pDst, (const float*)pSrc, sampleCount, volume); break; /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */ case ma_format_unknown: case ma_format_count: break; } } } MA_API float ma_volume_linear_to_db(float factor) { return 20*ma_log10f(factor); } MA_API float ma_volume_db_to_linear(float gain) { return ma_powf(10, gain/20.0f); } MA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume) { ma_uint64 iSample; ma_uint64 sampleCount; if (pDst == NULL || pSrc == NULL || channels == 0) { return MA_INVALID_ARGS; } if (volume == 0) { return MA_SUCCESS; /* No changes if the volume is 0. */ } sampleCount = frameCount * channels; if (volume == 1) { for (iSample = 0; iSample < sampleCount; iSample += 1) { pDst[iSample] += pSrc[iSample]; } } else { for (iSample = 0; iSample < sampleCount; iSample += 1) { pDst[iSample] += ma_apply_volume_unclipped_f32(pSrc[iSample], volume); } } return MA_SUCCESS; } /************************************************************************************************************************************************************** Format Conversion **************************************************************************************************************************************************************/ static MA_INLINE ma_int16 ma_pcm_sample_f32_to_s16(float x) { return (ma_int16)(x * 32767.0f); } static MA_INLINE ma_int16 ma_pcm_sample_u8_to_s16_no_scale(ma_uint8 x) { return (ma_int16)((ma_int16)x - 128); } static MA_INLINE ma_int64 ma_pcm_sample_s24_to_s32_no_scale(const ma_uint8* x) { return (ma_int64)(((ma_uint64)x[0] << 40) | ((ma_uint64)x[1] << 48) | ((ma_uint64)x[2] << 56)) >> 40; /* Make sure the sign bits are maintained. */ } static MA_INLINE void ma_pcm_sample_s32_to_s24_no_scale(ma_int64 x, ma_uint8* s24) { s24[0] = (ma_uint8)((x & 0x000000FF) >> 0); s24[1] = (ma_uint8)((x & 0x0000FF00) >> 8); s24[2] = (ma_uint8)((x & 0x00FF0000) >> 16); } /* u8 */ MA_API void ma_pcm_u8_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_uint8)); } static MA_INLINE void ma_pcm_u8_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_u8[i]; x = (ma_int16)(x - 128); x = (ma_int16)(x << 8); dst_s16[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_u8[i]; x = (ma_int16)(x - 128); dst_s24[i*3+0] = 0; dst_s24[i*3+1] = 0; dst_s24[i*3+2] = (ma_uint8)((ma_int8)x); } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_u8[i]; x = x - 128; x = x << 24; dst_s32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)src_u8[i]; x = x * 0.00784313725490196078f; /* 0..255 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif } #ifdef MA_USE_REFERENCE_CONVERSION_APIS static MA_INLINE void ma_pcm_interleave_u8__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8** src_u8 = (const ma_uint8**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame]; } } } #else static MA_INLINE void ma_pcm_interleave_u8__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8** src_u8 = (const ma_uint8**)src; if (channels == 1) { ma_copy_memory_64(dst, src[0], frameCount * sizeof(ma_uint8)); } else if (channels == 2) { ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { dst_u8[iFrame*2 + 0] = src_u8[0][iFrame]; dst_u8[iFrame*2 + 1] = src_u8[1][iFrame]; } } else { ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame]; } } } } #endif MA_API void ma_pcm_interleave_u8(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_u8__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_u8__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_u8__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8** dst_u8 = (ma_uint8**)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iChannel][iFrame] = src_u8[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_u8__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_u8(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_u8__optimized(dst, src, frameCount, channels); #endif } /* s16 */ static MA_INLINE void ma_pcm_s16_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_int16* src_s16 = (const ma_int16*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_s16[i]; x = (ma_int16)(x >> 8); x = (ma_int16)(x + 128); dst_u8[i] = (ma_uint8)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_s16[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x80, 0x7F); if ((x + dither) <= 0x7FFF) { x = (ma_int16)(x + dither); } else { x = 0x7FFF; } x = (ma_int16)(x >> 8); x = (ma_int16)(x + 128); dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s16_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s16_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_int16)); } static MA_INLINE void ma_pcm_s16_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s24[i*3+0] = 0; dst_s24[i*3+1] = (ma_uint8)(src_s16[i] & 0xFF); dst_s24[i*3+2] = (ma_uint8)(src_s16[i] >> 8); } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s16_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s32[i] = src_s16[i] << 16; } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s16_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)src_s16[i]; #if 0 /* The accurate way. */ x = x + 32768.0f; /* -32768..32767 to 0..65535 */ x = x * 0.00003051804379339284f; /* 0..65535 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ #else /* The fast way. */ x = x * 0.000030517578125f; /* -32768..32767 to -1..0.999969482421875 */ #endif dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s16__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_int16** src_s16 = (const ma_int16**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s16[iFrame*channels + iChannel] = src_s16[iChannel][iFrame]; } } } static MA_INLINE void ma_pcm_interleave_s16__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s16__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s16(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s16__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s16__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s16__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_int16** dst_s16 = (ma_int16**)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s16[iChannel][iFrame] = src_s16[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_s16__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s16(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s16__optimized(dst, src, frameCount, channels); #endif } /* s24 */ static MA_INLINE void ma_pcm_s24_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { dst_u8[i] = (ma_uint8)((ma_int8)src_s24[i*3 + 2] + 128); } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s24_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s24_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_uint16 dst_lo = ((ma_uint16)src_s24[i*3 + 1]); ma_uint16 dst_hi = (ma_uint16)((ma_uint16)src_s24[i*3 + 2] << 8); dst_s16[i] = (ma_int16)(dst_lo | dst_hi); } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 16; dst_s16[i] = (ma_int16)x; } } } static MA_INLINE void ma_pcm_s24_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s24_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * 3); } static MA_INLINE void ma_pcm_s24_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s32[i] = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); } (void)ditherMode; } static MA_INLINE void ma_pcm_s24_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s24_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)(((ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24)) >> 8); #if 0 /* The accurate way. */ x = x + 8388608.0f; /* -8388608..8388607 to 0..16777215 */ x = x * 0.00000011920929665621f; /* 0..16777215 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ #else /* The fast way. */ x = x * 0.00000011920928955078125f; /* -8388608..8388607 to -1..0.999969482421875 */ #endif dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_s24_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s24__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst8 = (ma_uint8*)dst; const ma_uint8** src8 = (const ma_uint8**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst8[iFrame*3*channels + iChannel*3 + 0] = src8[iChannel][iFrame*3 + 0]; dst8[iFrame*3*channels + iChannel*3 + 1] = src8[iChannel][iFrame*3 + 1]; dst8[iFrame*3*channels + iChannel*3 + 2] = src8[iChannel][iFrame*3 + 2]; } } } static MA_INLINE void ma_pcm_interleave_s24__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s24__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s24(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s24__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s24__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s24__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8** dst8 = (ma_uint8**)dst; const ma_uint8* src8 = (const ma_uint8*)src; ma_uint32 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst8[iChannel][iFrame*3 + 0] = src8[iFrame*3*channels + iChannel*3 + 0]; dst8[iChannel][iFrame*3 + 1] = src8[iFrame*3*channels + iChannel*3 + 1]; dst8[iChannel][iFrame*3 + 2] = src8[iFrame*3*channels + iChannel*3 + 2]; } } } static MA_INLINE void ma_pcm_deinterleave_s24__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s24(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s24__optimized(dst, src, frameCount, channels); #endif } /* s32 */ static MA_INLINE void ma_pcm_s32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_int32* src_s32 = (const ma_int32*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_int32* src_s32 = (const ma_int32*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; x = x >> 16; dst_s16[i] = (ma_int16)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 16; dst_s16[i] = (ma_int16)x; } } } static MA_INLINE void ma_pcm_s32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_uint32 x = (ma_uint32)src_s32[i]; dst_s24[i*3+0] = (ma_uint8)((x & 0x0000FF00) >> 8); dst_s24[i*3+1] = (ma_uint8)((x & 0x00FF0000) >> 16); dst_s24[i*3+2] = (ma_uint8)((x & 0xFF000000) >> 24); } (void)ditherMode; /* No dithering for s32 -> s24. */ } static MA_INLINE void ma_pcm_s32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_int32)); } static MA_INLINE void ma_pcm_s32_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { double x = src_s32[i]; #if 0 x = x + 2147483648.0; x = x * 0.0000000004656612873077392578125; x = x - 1; #else x = x / 2147483648.0; #endif dst_f32[i] = (float)x; } (void)ditherMode; /* No dithering for s32 -> f32. */ } static MA_INLINE void ma_pcm_s32_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_int32** src_s32 = (const ma_int32**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s32[iFrame*channels + iChannel] = src_s32[iChannel][iFrame]; } } } static MA_INLINE void ma_pcm_interleave_s32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s32__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s32__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_int32** dst_s32 = (ma_int32**)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s32[iChannel][iFrame] = src_s32[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_s32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s32__optimized(dst, src, frameCount, channels); #endif } /* f32 */ static MA_INLINE void ma_pcm_f32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint8* dst_u8 = (ma_uint8*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -128; ditherMax = 1.0f / 127; } for (i = 0; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x + 1; /* -1..1 to 0..2 */ x = x * 127.5f; /* 0..2 to 0..255 */ dst_u8[i] = (ma_uint8)x; } } static MA_INLINE void ma_pcm_f32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif } #ifdef MA_USE_REFERENCE_CONVERSION_APIS static MA_INLINE void ma_pcm_f32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_int16* dst_s16 = (ma_int16*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } for (i = 0; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 32767.5f; /* 0..2 to 0..65535 */ x = x - 32768.0f; /* 0...65535 to -32768..32767 */ #else /* The fast way. */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ #endif dst_s16[i] = (ma_int16)x; } } #else static MA_INLINE void ma_pcm_f32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i4; ma_uint64 count4; ma_int16* dst_s16 = (ma_int16*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } /* Unrolled. */ i = 0; count4 = count >> 2; for (i4 = 0; i4 < count4; i4 += 1) { float d0 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d1 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d2 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d3 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float x0 = src_f32[i+0]; float x1 = src_f32[i+1]; float x2 = src_f32[i+2]; float x3 = src_f32[i+3]; x0 = x0 + d0; x1 = x1 + d1; x2 = x2 + d2; x3 = x3 + d3; x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0)); x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1)); x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2)); x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3)); x0 = x0 * 32767.0f; x1 = x1 * 32767.0f; x2 = x2 * 32767.0f; x3 = x3 * 32767.0f; dst_s16[i+0] = (ma_int16)x0; dst_s16[i+1] = (ma_int16)x1; dst_s16[i+2] = (ma_int16)x2; dst_s16[i+3] = (ma_int16)x3; i += 4; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i8; ma_uint64 count8; ma_int16* dst_s16; const float* src_f32; float ditherMin; float ditherMax; /* Both the input and output buffers need to be aligned to 16 bytes. */ if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } dst_s16 = (ma_int16*)dst; src_f32 = (const float*)src; ditherMin = 0; ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } i = 0; /* SSE2. SSE allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */ count8 = count >> 3; for (i8 = 0; i8 < count8; i8 += 1) { __m128 d0; __m128 d1; __m128 x0; __m128 x1; if (ditherMode == ma_dither_mode_none) { d0 = _mm_set1_ps(0); d1 = _mm_set1_ps(0); } else if (ditherMode == ma_dither_mode_rectangle) { d0 = _mm_set_ps( ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax) ); d1 = _mm_set_ps( ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax) ); } else { d0 = _mm_set_ps( ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax) ); d1 = _mm_set_ps( ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax) ); } x0 = *((__m128*)(src_f32 + i) + 0); x1 = *((__m128*)(src_f32 + i) + 1); x0 = _mm_add_ps(x0, d0); x1 = _mm_add_ps(x1, d1); x0 = _mm_mul_ps(x0, _mm_set1_ps(32767.0f)); x1 = _mm_mul_ps(x1, _mm_set1_ps(32767.0f)); _mm_stream_si128(((__m128i*)(dst_s16 + i)), _mm_packs_epi32(_mm_cvttps_epi32(x0), _mm_cvttps_epi32(x1))); i += 8; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #endif /* SSE2 */ #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i8; ma_uint64 count8; ma_int16* dst_s16; const float* src_f32; float ditherMin; float ditherMax; if (!ma_has_neon()) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } /* Both the input and output buffers need to be aligned to 16 bytes. */ if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } dst_s16 = (ma_int16*)dst; src_f32 = (const float*)src; ditherMin = 0; ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } i = 0; /* NEON. NEON allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */ count8 = count >> 3; for (i8 = 0; i8 < count8; i8 += 1) { float32x4_t d0; float32x4_t d1; float32x4_t x0; float32x4_t x1; int32x4_t i0; int32x4_t i1; if (ditherMode == ma_dither_mode_none) { d0 = vmovq_n_f32(0); d1 = vmovq_n_f32(0); } else if (ditherMode == ma_dither_mode_rectangle) { float d0v[4]; float d1v[4]; d0v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0 = vld1q_f32(d0v); d1v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1 = vld1q_f32(d1v); } else { float d0v[4]; float d1v[4]; d0v[0] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[1] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[2] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[3] = ma_dither_f32_triangle(ditherMin, ditherMax); d0 = vld1q_f32(d0v); d1v[0] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[1] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[2] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[3] = ma_dither_f32_triangle(ditherMin, ditherMax); d1 = vld1q_f32(d1v); } x0 = *((float32x4_t*)(src_f32 + i) + 0); x1 = *((float32x4_t*)(src_f32 + i) + 1); x0 = vaddq_f32(x0, d0); x1 = vaddq_f32(x1, d1); x0 = vmulq_n_f32(x0, 32767.0f); x1 = vmulq_n_f32(x1, 32767.0f); i0 = vcvtq_s32_f32(x0); i1 = vcvtq_s32_f32(x1); *((int16x8_t*)(dst_s16 + i)) = vcombine_s16(vqmovn_s32(i0), vqmovn_s32(i1)); i += 8; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #endif /* Neon */ #endif /* MA_USE_REFERENCE_CONVERSION_APIS */ MA_API void ma_pcm_f32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_f32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const float* src_f32 = (const float*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 r; float x = src_f32[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 8388607.5f; /* 0..2 to 0..16777215 */ x = x - 8388608.0f; /* 0..16777215 to -8388608..8388607 */ #else /* The fast way. */ x = x * 8388607.0f; /* -1..1 to -8388607..8388607 */ #endif r = (ma_int32)x; dst_s24[(i*3)+0] = (ma_uint8)((r & 0x0000FF) >> 0); dst_s24[(i*3)+1] = (ma_uint8)((r & 0x00FF00) >> 8); dst_s24[(i*3)+2] = (ma_uint8)((r & 0xFF0000) >> 16); } (void)ditherMode; /* No dithering for f32 -> s24. */ } static MA_INLINE void ma_pcm_f32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_f32_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const float* src_f32 = (const float*)src; ma_uint32 i; for (i = 0; i < count; i += 1) { double x = src_f32[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 2147483647.5; /* 0..2 to 0..4294967295 */ x = x - 2147483648.0; /* 0...4294967295 to -2147483648..2147483647 */ #else /* The fast way. */ x = x * 2147483647.0; /* -1..1 to -2147483647..2147483647 */ #endif dst_s32[i] = (ma_int32)x; } (void)ditherMode; /* No dithering for f32 -> s32. */ } static MA_INLINE void ma_pcm_f32_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_f32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(float)); } static void ma_pcm_interleave_f32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { float* dst_f32 = (float*)dst; const float** src_f32 = (const float**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_f32[iFrame*channels + iChannel] = src_f32[iChannel][iFrame]; } } } static void ma_pcm_interleave_f32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_f32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_f32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_f32__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_f32__optimized(dst, src, frameCount, channels); #endif } static void ma_pcm_deinterleave_f32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { float** dst_f32 = (float**)dst; const float* src_f32 = (const float*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_f32[iChannel][iFrame] = src_f32[iFrame*channels + iChannel]; } } } static void ma_pcm_deinterleave_f32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_f32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_f32__optimized(dst, src, frameCount, channels); #endif } MA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode) { if (formatOut == formatIn) { ma_copy_memory_64(pOut, pIn, sampleCount * ma_get_bytes_per_sample(formatOut)); return; } switch (formatIn) { case ma_format_u8: { switch (formatOut) { case ma_format_s16: ma_pcm_u8_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_u8_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_u8_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_u8_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s16: { switch (formatOut) { case ma_format_u8: ma_pcm_s16_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_s16_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_s16_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s16_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s24: { switch (formatOut) { case ma_format_u8: ma_pcm_s24_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_s24_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_s24_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s24_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s32: { switch (formatOut) { case ma_format_u8: ma_pcm_s32_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_s32_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_s32_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s32_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_f32: { switch (formatOut) { case ma_format_u8: ma_pcm_f32_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_f32_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_f32_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_f32_to_s32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; default: break; } } MA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode) { ma_pcm_convert(pOut, formatOut, pIn, formatIn, frameCount * channels, ditherMode); } MA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames) { if (pInterleavedPCMFrames == NULL || ppDeinterleavedPCMFrames == NULL) { return; /* Invalid args. */ } /* For efficiency we do this per format. */ switch (format) { case ma_format_s16: { const ma_int16* pSrcS16 = (const ma_int16*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { ma_int16* pDstS16 = (ma_int16*)ppDeinterleavedPCMFrames[iChannel]; pDstS16[iPCMFrame] = pSrcS16[iPCMFrame*channels+iChannel]; } } } break; case ma_format_f32: { const float* pSrcF32 = (const float*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { float* pDstF32 = (float*)ppDeinterleavedPCMFrames[iChannel]; pDstF32[iPCMFrame] = pSrcF32[iPCMFrame*channels+iChannel]; } } } break; default: { ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format); ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { void* pDst = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes); const void* pSrc = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes); memcpy(pDst, pSrc, sampleSizeInBytes); } } } break; } } MA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames) { switch (format) { case ma_format_s16: { ma_int16* pDstS16 = (ma_int16*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { const ma_int16* pSrcS16 = (const ma_int16*)ppDeinterleavedPCMFrames[iChannel]; pDstS16[iPCMFrame*channels+iChannel] = pSrcS16[iPCMFrame]; } } } break; case ma_format_f32: { float* pDstF32 = (float*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { const float* pSrcF32 = (const float*)ppDeinterleavedPCMFrames[iChannel]; pDstF32[iPCMFrame*channels+iChannel] = pSrcF32[iPCMFrame]; } } } break; default: { ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format); ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { void* pDst = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes); const void* pSrc = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes); memcpy(pDst, pSrc, sampleSizeInBytes); } } } break; } } /************************************************************************************************************************************************************** Biquad Filter **************************************************************************************************************************************************************/ #ifndef MA_BIQUAD_FIXED_POINT_SHIFT #define MA_BIQUAD_FIXED_POINT_SHIFT 14 #endif static ma_int32 ma_biquad_float_to_fp(double x) { return (ma_int32)(x * (1 << MA_BIQUAD_FIXED_POINT_SHIFT)); } MA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2) { ma_biquad_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.b0 = b0; config.b1 = b1; config.b2 = b2; config.a0 = a0; config.a1 = a1; config.a2 = a2; return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; size_t r2Offset; } ma_biquad_heap_layout; static ma_result ma_biquad_get_heap_layout(const ma_biquad_config* pConfig, ma_biquad_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R0 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* R1 */ pHeapLayout->r2Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_biquad_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_biquad_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ) { ma_result result; ma_biquad_heap_layout heapLayout; if (pBQ == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBQ); result = ma_biquad_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pBQ->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pBQ->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); pBQ->pR2 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r2Offset); return ma_biquad_reinit(pConfig, pBQ); } MA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_biquad_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_biquad_init_preallocated(pConfig, pHeap, pBQ); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBQ->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks) { if (pBQ == NULL) { return; } if (pBQ->_ownsHeap) { ma_free(pBQ->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ) { if (pBQ == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->a0 == 0) { return MA_INVALID_ARGS; /* Division by zero. */ } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pBQ->format != ma_format_unknown && pBQ->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pBQ->channels != 0 && pBQ->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pBQ->format = pConfig->format; pBQ->channels = pConfig->channels; /* Normalize. */ if (pConfig->format == ma_format_f32) { pBQ->b0.f32 = (float)(pConfig->b0 / pConfig->a0); pBQ->b1.f32 = (float)(pConfig->b1 / pConfig->a0); pBQ->b2.f32 = (float)(pConfig->b2 / pConfig->a0); pBQ->a1.f32 = (float)(pConfig->a1 / pConfig->a0); pBQ->a2.f32 = (float)(pConfig->a2 / pConfig->a0); } else { pBQ->b0.s32 = ma_biquad_float_to_fp(pConfig->b0 / pConfig->a0); pBQ->b1.s32 = ma_biquad_float_to_fp(pConfig->b1 / pConfig->a0); pBQ->b2.s32 = ma_biquad_float_to_fp(pConfig->b2 / pConfig->a0); pBQ->a1.s32 = ma_biquad_float_to_fp(pConfig->a1 / pConfig->a0); pBQ->a2.s32 = ma_biquad_float_to_fp(pConfig->a2 / pConfig->a0); } return MA_SUCCESS; } MA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ) { if (pBQ == NULL) { return MA_INVALID_ARGS; } if (pBQ->format == ma_format_f32) { pBQ->pR1->f32 = 0; pBQ->pR2->f32 = 0; } else { pBQ->pR1->s32 = 0; pBQ->pR2->s32 = 0; } return MA_SUCCESS; } static MA_INLINE void ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(ma_biquad* pBQ, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pBQ->channels; const float b0 = pBQ->b0.f32; const float b1 = pBQ->b1.f32; const float b2 = pBQ->b2.f32; const float a1 = pBQ->a1.f32; const float a2 = pBQ->a2.f32; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pBQ->pR1[c].f32; float r2 = pBQ->pR2[c].f32; float x = pX[c]; float y; y = b0*x + r1; r1 = b1*x - a1*y + r2; r2 = b2*x - a2*y; pY[c] = y; pBQ->pR1[c].f32 = r1; pBQ->pR2[c].f32 = r2; } } static MA_INLINE void ma_biquad_process_pcm_frame_f32(ma_biquad* pBQ, float* pY, const float* pX) { ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX); } static MA_INLINE void ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pBQ->channels; const ma_int32 b0 = pBQ->b0.s32; const ma_int32 b1 = pBQ->b1.s32; const ma_int32 b2 = pBQ->b2.s32; const ma_int32 a1 = pBQ->a1.s32; const ma_int32 a2 = pBQ->a2.s32; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pBQ->pR1[c].s32; ma_int32 r2 = pBQ->pR2[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b0*x + r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; r1 = (b1*x - a1*y + r2); r2 = (b2*x - a2*y); pY[c] = (ma_int16)ma_clamp(y, -32768, 32767); pBQ->pR1[c].s32 = r1; pBQ->pR2[c].s32 = r2; } } static MA_INLINE void ma_biquad_process_pcm_frame_s16(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX) { ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX); } MA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pBQ == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pBQ->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX); pY += pBQ->channels; pX += pBQ->channels; } } else if (pBQ->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX); pY += pBQ->channels; pX += pBQ->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ) { if (pBQ == NULL) { return 0; } return 2; } /************************************************************************************************************************************************************** Low-Pass Filter **************************************************************************************************************************************************************/ MA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency) { ma_lpf1_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = 0.5; return config; } MA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_lpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; } ma_lpf1_heap_layout; static ma_result ma_lpf1_get_heap_layout(const ma_lpf1_config* pConfig, ma_lpf1_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R1 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_lpf1_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } result = ma_lpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF) { ma_result result; ma_lpf1_heap_layout heapLayout; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); result = ma_lpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); return ma_lpf1_reinit(pConfig, pLPF); } MA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf1_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf1_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pLPF == NULL) { return; } if (pLPF->_ownsHeap) { ma_free(pLPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF) { double a; if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pLPF->format = pConfig->format; pLPF->channels = pConfig->channels; a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate); if (pConfig->format == ma_format_f32) { pLPF->a.f32 = (float)a; } else { pLPF->a.s32 = ma_biquad_float_to_fp(a); } return MA_SUCCESS; } MA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } if (pLPF->format == ma_format_f32) { pLPF->a.f32 = 0; } else { pLPF->a.s32 = 0; } return MA_SUCCESS; } static MA_INLINE void ma_lpf1_process_pcm_frame_f32(ma_lpf1* pLPF, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pLPF->channels; const float a = pLPF->a.f32; const float b = 1 - a; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pLPF->pR1[c].f32; float x = pX[c]; float y; y = b*x + a*r1; pY[c] = y; pLPF->pR1[c].f32 = y; } } static MA_INLINE void ma_lpf1_process_pcm_frame_s16(ma_lpf1* pLPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pLPF->channels; const ma_int32 a = pLPF->a.s32; const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a); MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pLPF->pR1[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b*x + a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; pY[c] = (ma_int16)y; pLPF->pR1[c].s32 = (ma_int32)y; } } MA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pLPF == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pLPF->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_lpf1_process_pcm_frame_f32(pLPF, pY, pX); pY += pLPF->channels; pX += pLPF->channels; } } else if (pLPF->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_lpf1_process_pcm_frame_s16(pLPF, pY, pX); pY += pLPF->channels; pX += pLPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF) { if (pLPF == NULL) { return 0; } return 1; } static MA_INLINE ma_biquad_config ma_lpf2__get_biquad_config(const ma_lpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = (1 - c) / 2; bqConfig.b1 = 1 - c; bqConfig.b2 = (1 - c) / 2; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_lpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pLPF) { ma_result result; ma_biquad_config bqConfig; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_lpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pLPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf2_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pLPF == NULL) { return; } ma_biquad_uninit(&pLPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF) { ma_result result; ma_biquad_config bqConfig; if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_lpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pLPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } ma_biquad_clear_cache(&pLPF->bq); return MA_SUCCESS; } static MA_INLINE void ma_lpf2_process_pcm_frame_s16(ma_lpf2* pLPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pLPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_lpf2_process_pcm_frame_f32(ma_lpf2* pLPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pLPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pLPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pLPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF) { if (pLPF == NULL) { return 0; } return ma_biquad_get_latency(&pLPF->bq); } MA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_lpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t lpf1Offset; size_t lpf2Offset; /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */ } ma_lpf_heap_layout; static void ma_lpf_calculate_sub_lpf_counts(ma_uint32 order, ma_uint32* pLPF1Count, ma_uint32* pLPF2Count) { MA_ASSERT(pLPF1Count != NULL); MA_ASSERT(pLPF2Count != NULL); *pLPF1Count = order % 2; *pLPF2Count = order / 2; } static ma_result ma_lpf_get_heap_layout(const ma_lpf_config* pConfig, ma_lpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count); pHeapLayout->sizeInBytes = 0; /* LPF 1 */ pHeapLayout->lpf1Offset = pHeapLayout->sizeInBytes; for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) { size_t lpf1HeapSizeInBytes; ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_lpf1) + lpf1HeapSizeInBytes; } /* LPF 2*/ pHeapLayout->lpf2Offset = pHeapLayout->sizeInBytes; for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) { size_t lpf2HeapSizeInBytes; ma_lpf2_config lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_lpf2) + lpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_lpf_reinit__internal(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF, ma_bool32 isNew) { ma_result result; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_uint32 ilpf1; ma_uint32 ilpf2; ma_lpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count); /* The filter order can't change between reinits. */ if (!isNew) { if (pLPF->lpf1Count != lpf1Count || pLPF->lpf2Count != lpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_lpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pLPF1 = (ma_lpf1*)ma_offset_ptr(pHeap, heapLayout.lpf1Offset); pLPF->pLPF2 = (ma_lpf2*)ma_offset_ptr(pHeap, heapLayout.lpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); /* To silence a compiler warning. */ } for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) { ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); if (isNew) { size_t lpf1HeapSizeInBytes; result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_lpf1_init_preallocated(&lpf1Config, ma_offset_ptr(pHeap, heapLayout.lpf1Offset + (sizeof(ma_lpf1) * lpf1Count) + (ilpf1 * lpf1HeapSizeInBytes)), &pLPF->pLPF1[ilpf1]); } } else { result = ma_lpf1_reinit(&lpf1Config, &pLPF->pLPF1[ilpf1]); } if (result != MA_SUCCESS) { ma_uint32 jlpf1; for (jlpf1 = 0; jlpf1 < ilpf1; jlpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) { ma_lpf2_config lpf2Config; double q; double a; /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */ if (lpf1Count == 1) { a = (1 + ilpf2*1) * (MA_PI_D/(pConfig->order*1)); /* Odd order. */ } else { a = (1 + ilpf2*2) * (MA_PI_D/(pConfig->order*2)); /* Even order. */ } q = 1 / (2*ma_cosd(a)); lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t lpf2HeapSizeInBytes; result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_lpf2_init_preallocated(&lpf2Config, ma_offset_ptr(pHeap, heapLayout.lpf2Offset + (sizeof(ma_lpf2) * lpf2Count) + (ilpf2 * lpf2HeapSizeInBytes)), &pLPF->pLPF2[ilpf2]); } } else { result = ma_lpf2_reinit(&lpf2Config, &pLPF->pLPF2[ilpf2]); } if (result != MA_SUCCESS) { ma_uint32 jlpf1; ma_uint32 jlpf2; for (jlpf1 = 0; jlpf1 < lpf1Count; jlpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } for (jlpf2 = 0; jlpf2 < ilpf2; jlpf2 += 1) { ma_lpf2_uninit(&pLPF->pLPF2[jlpf2], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } pLPF->lpf1Count = lpf1Count; pLPF->lpf2Count = lpf2Count; pLPF->format = pConfig->format; pLPF->channels = pConfig->channels; pLPF->sampleRate = pConfig->sampleRate; return MA_SUCCESS; } MA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_lpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_lpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return result; } MA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); return ma_lpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return; } for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[ilpf1], pAllocationCallbacks); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_uninit(&pLPF->pLPF2[ilpf2], pAllocationCallbacks); } if (pLPF->_ownsHeap) { ma_free(pLPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF) { return ma_lpf_reinit__internal(pConfig, NULL, pLPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF) { ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return MA_INVALID_ARGS; } for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_clear_cache(&pLPF->pLPF1[ilpf1]); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_clear_cache(&pLPF->pLPF2[ilpf2]); } return MA_SUCCESS; } static MA_INLINE void ma_lpf_process_pcm_frame_f32(ma_lpf* pLPF, float* pY, const void* pX) { ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pLPF->format == ma_format_f32); MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels)); for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_process_pcm_frame_f32(&pLPF->pLPF1[ilpf1], pY, pY); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_process_pcm_frame_f32(&pLPF->pLPF2[ilpf2], pY, pY); } } static MA_INLINE void ma_lpf_process_pcm_frame_s16(ma_lpf* pLPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pLPF->format == ma_format_s16); MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels)); for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_process_pcm_frame_s16(&pLPF->pLPF1[ilpf1], pY, pY); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_process_pcm_frame_s16(&pLPF->pLPF2[ilpf2], pY, pY); } } MA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { result = ma_lpf1_process_pcm_frames(&pLPF->pLPF1[ilpf1], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { result = ma_lpf2_process_pcm_frames(&pLPF->pLPF2[ilpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pLPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_lpf_process_pcm_frame_f32(pLPF, pFramesOutF32, pFramesInF32); pFramesOutF32 += pLPF->channels; pFramesInF32 += pLPF->channels; } } else if (pLPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_lpf_process_pcm_frame_s16(pLPF, pFramesOutS16, pFramesInS16); pFramesOutS16 += pLPF->channels; pFramesInS16 += pLPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF) { if (pLPF == NULL) { return 0; } return pLPF->lpf2Count*2 + pLPF->lpf1Count; } /************************************************************************************************************************************************************** High-Pass Filtering **************************************************************************************************************************************************************/ MA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency) { ma_hpf1_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; return config; } MA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_hpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; } ma_hpf1_heap_layout; static ma_result ma_hpf1_get_heap_layout(const ma_hpf1_config* pConfig, ma_hpf1_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R1 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_hpf1_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } result = ma_hpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF) { ma_result result; ma_hpf1_heap_layout heapLayout; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); result = ma_hpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); return ma_hpf1_reinit(pConfig, pLPF); } MA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf1_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf1_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pHPF == NULL) { return; } if (pHPF->_ownsHeap) { ma_free(pHPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF) { double a; if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pHPF->format = pConfig->format; pHPF->channels = pConfig->channels; a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate); if (pConfig->format == ma_format_f32) { pHPF->a.f32 = (float)a; } else { pHPF->a.s32 = ma_biquad_float_to_fp(a); } return MA_SUCCESS; } static MA_INLINE void ma_hpf1_process_pcm_frame_f32(ma_hpf1* pHPF, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pHPF->channels; const float a = 1 - pHPF->a.f32; const float b = 1 - a; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pHPF->pR1[c].f32; float x = pX[c]; float y; y = b*x - a*r1; pY[c] = y; pHPF->pR1[c].f32 = y; } } static MA_INLINE void ma_hpf1_process_pcm_frame_s16(ma_hpf1* pHPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pHPF->channels; const ma_int32 a = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - pHPF->a.s32); const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a); MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pHPF->pR1[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b*x - a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; pY[c] = (ma_int16)y; pHPF->pR1[c].s32 = (ma_int32)y; } } MA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pHPF == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pHPF->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_hpf1_process_pcm_frame_f32(pHPF, pY, pX); pY += pHPF->channels; pX += pHPF->channels; } } else if (pHPF->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_hpf1_process_pcm_frame_s16(pHPF, pY, pX); pY += pHPF->channels; pX += pHPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF) { if (pHPF == NULL) { return 0; } return 1; } static MA_INLINE ma_biquad_config ma_hpf2__get_biquad_config(const ma_hpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = (1 + c) / 2; bqConfig.b1 = -(1 + c); bqConfig.b2 = (1 + c) / 2; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_hpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF) { ma_result result; ma_biquad_config bqConfig; if (pHPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pHPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pHPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf2_init_preallocated(pConfig, pHeap, pHPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pHPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pHPF == NULL) { return; } ma_biquad_uninit(&pHPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF) { ma_result result; ma_biquad_config bqConfig; if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pHPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_hpf2_process_pcm_frame_s16(ma_hpf2* pHPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pHPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_hpf2_process_pcm_frame_f32(ma_hpf2* pHPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pHPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pHPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pHPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF) { if (pHPF == NULL) { return 0; } return ma_biquad_get_latency(&pHPF->bq); } MA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_hpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t hpf1Offset; size_t hpf2Offset; /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */ } ma_hpf_heap_layout; static void ma_hpf_calculate_sub_hpf_counts(ma_uint32 order, ma_uint32* pHPF1Count, ma_uint32* pHPF2Count) { MA_ASSERT(pHPF1Count != NULL); MA_ASSERT(pHPF2Count != NULL); *pHPF1Count = order % 2; *pHPF2Count = order / 2; } static ma_result ma_hpf_get_heap_layout(const ma_hpf_config* pConfig, ma_hpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_uint32 ihpf1; ma_uint32 ihpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count); pHeapLayout->sizeInBytes = 0; /* HPF 1 */ pHeapLayout->hpf1Offset = pHeapLayout->sizeInBytes; for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) { size_t hpf1HeapSizeInBytes; ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_hpf1) + hpf1HeapSizeInBytes; } /* HPF 2*/ pHeapLayout->hpf2Offset = pHeapLayout->sizeInBytes; for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) { size_t hpf2HeapSizeInBytes; ma_hpf2_config hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_hpf2) + hpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_hpf_reinit__internal(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pHPF, ma_bool32 isNew) { ma_result result; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_uint32 ihpf1; ma_uint32 ihpf2; ma_hpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count); /* The filter order can't change between reinits. */ if (!isNew) { if (pHPF->hpf1Count != hpf1Count || pHPF->hpf2Count != hpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_hpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pHPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pHPF->pHPF1 = (ma_hpf1*)ma_offset_ptr(pHeap, heapLayout.hpf1Offset); pHPF->pHPF2 = (ma_hpf2*)ma_offset_ptr(pHeap, heapLayout.hpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); /* To silence a compiler warning. */ } for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) { ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); if (isNew) { size_t hpf1HeapSizeInBytes; result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_hpf1_init_preallocated(&hpf1Config, ma_offset_ptr(pHeap, heapLayout.hpf1Offset + (sizeof(ma_hpf1) * hpf1Count) + (ihpf1 * hpf1HeapSizeInBytes)), &pHPF->pHPF1[ihpf1]); } } else { result = ma_hpf1_reinit(&hpf1Config, &pHPF->pHPF1[ihpf1]); } if (result != MA_SUCCESS) { ma_uint32 jhpf1; for (jhpf1 = 0; jhpf1 < ihpf1; jhpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) { ma_hpf2_config hpf2Config; double q; double a; /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */ if (hpf1Count == 1) { a = (1 + ihpf2*1) * (MA_PI_D/(pConfig->order*1)); /* Odd order. */ } else { a = (1 + ihpf2*2) * (MA_PI_D/(pConfig->order*2)); /* Even order. */ } q = 1 / (2*ma_cosd(a)); hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t hpf2HeapSizeInBytes; result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_hpf2_init_preallocated(&hpf2Config, ma_offset_ptr(pHeap, heapLayout.hpf2Offset + (sizeof(ma_hpf2) * hpf2Count) + (ihpf2 * hpf2HeapSizeInBytes)), &pHPF->pHPF2[ihpf2]); } } else { result = ma_hpf2_reinit(&hpf2Config, &pHPF->pHPF2[ihpf2]); } if (result != MA_SUCCESS) { ma_uint32 jhpf1; ma_uint32 jhpf2; for (jhpf1 = 0; jhpf1 < hpf1Count; jhpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } for (jhpf2 = 0; jhpf2 < ihpf2; jhpf2 += 1) { ma_hpf2_uninit(&pHPF->pHPF2[jhpf2], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } pHPF->hpf1Count = hpf1Count; pHPF->hpf2Count = hpf2Count; pHPF->format = pConfig->format; pHPF->channels = pConfig->channels; pHPF->sampleRate = pConfig->sampleRate; return MA_SUCCESS; } MA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_hpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_hpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return result; } MA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); return ma_hpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf_init_preallocated(pConfig, pHeap, pHPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pHPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ihpf1; ma_uint32 ihpf2; if (pHPF == NULL) { return; } for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[ihpf1], pAllocationCallbacks); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_uninit(&pHPF->pHPF2[ihpf2], pAllocationCallbacks); } if (pHPF->_ownsHeap) { ma_free(pHPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF) { return ma_hpf_reinit__internal(pConfig, NULL, pHPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ihpf1; ma_uint32 ihpf2; if (pHPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { result = ma_hpf1_process_pcm_frames(&pHPF->pHPF1[ihpf1], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { result = ma_hpf2_process_pcm_frames(&pHPF->pHPF2[ihpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pHPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pHPF->format, pHPF->channels)); for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_process_pcm_frame_f32(&pHPF->pHPF1[ihpf1], pFramesOutF32, pFramesOutF32); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_process_pcm_frame_f32(&pHPF->pHPF2[ihpf2], pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pHPF->channels; pFramesInF32 += pHPF->channels; } } else if (pHPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pHPF->format, pHPF->channels)); for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_process_pcm_frame_s16(&pHPF->pHPF1[ihpf1], pFramesOutS16, pFramesOutS16); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_process_pcm_frame_s16(&pHPF->pHPF2[ihpf2], pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pHPF->channels; pFramesInS16 += pHPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF) { if (pHPF == NULL) { return 0; } return pHPF->hpf2Count*2 + pHPF->hpf1Count; } /************************************************************************************************************************************************************** Band-Pass Filtering **************************************************************************************************************************************************************/ MA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_bpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_bpf2__get_biquad_config(const ma_bpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = q * a; bqConfig.b1 = 0; bqConfig.b2 = -q * a; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_bpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF) { ma_result result; ma_biquad_config bqConfig; if (pBPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_bpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pBPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_bpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_bpf2_init_preallocated(pConfig, pHeap, pBPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pBPF == NULL) { return; } ma_biquad_uninit(&pBPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF) { ma_result result; ma_biquad_config bqConfig; if (pBPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_bpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pBPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_bpf2_process_pcm_frame_s16(ma_bpf2* pBPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pBPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_bpf2_process_pcm_frame_f32(ma_bpf2* pBPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pBPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pBPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pBPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF) { if (pBPF == NULL) { return 0; } return ma_biquad_get_latency(&pBPF->bq); } MA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_bpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t bpf2Offset; } ma_bpf_heap_layout; static ma_result ma_bpf_get_heap_layout(const ma_bpf_config* pConfig, ma_bpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 bpf2Count; ma_uint32 ibpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } /* We must have an even number of order. */ if ((pConfig->order & 0x1) != 0) { return MA_INVALID_ARGS; } bpf2Count = pConfig->order / 2; pHeapLayout->sizeInBytes = 0; /* BPF 2 */ pHeapLayout->bpf2Offset = pHeapLayout->sizeInBytes; for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) { size_t bpf2HeapSizeInBytes; ma_bpf2_config bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_bpf2) + bpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_bpf_reinit__internal(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF, ma_bool32 isNew) { ma_result result; ma_uint32 bpf2Count; ma_uint32 ibpf2; ma_bpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pBPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pBPF->format != ma_format_unknown && pBPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pBPF->channels != 0 && pBPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } /* We must have an even number of order. */ if ((pConfig->order & 0x1) != 0) { return MA_INVALID_ARGS; } bpf2Count = pConfig->order / 2; /* The filter order can't change between reinits. */ if (!isNew) { if (pBPF->bpf2Count != bpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_bpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pBPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pBPF->pBPF2 = (ma_bpf2*)ma_offset_ptr(pHeap, heapLayout.bpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); } for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) { ma_bpf2_config bpf2Config; double q; /* TODO: Calculate Q to make this a proper Butterworth filter. */ q = 0.707107; bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t bpf2HeapSizeInBytes; result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_bpf2_init_preallocated(&bpf2Config, ma_offset_ptr(pHeap, heapLayout.bpf2Offset + (sizeof(ma_bpf2) * bpf2Count) + (ibpf2 * bpf2HeapSizeInBytes)), &pBPF->pBPF2[ibpf2]); } } else { result = ma_bpf2_reinit(&bpf2Config, &pBPF->pBPF2[ibpf2]); } if (result != MA_SUCCESS) { return result; } } pBPF->bpf2Count = bpf2Count; pBPF->format = pConfig->format; pBPF->channels = pConfig->channels; return MA_SUCCESS; } MA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_bpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_bpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF) { if (pBPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBPF); return ma_bpf_reinit__internal(pConfig, pHeap, pBPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_bpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_bpf_init_preallocated(pConfig, pHeap, pBPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ibpf2; if (pBPF == NULL) { return; } for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_uninit(&pBPF->pBPF2[ibpf2], pAllocationCallbacks); } if (pBPF->_ownsHeap) { ma_free(pBPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF) { return ma_bpf_reinit__internal(pConfig, NULL, pBPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ibpf2; if (pBPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { result = ma_bpf2_process_pcm_frames(&pBPF->pBPF2[ibpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pBPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pBPF->format, pBPF->channels)); for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_process_pcm_frame_f32(&pBPF->pBPF2[ibpf2], pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pBPF->channels; pFramesInF32 += pBPF->channels; } } else if (pBPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pBPF->format, pBPF->channels)); for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_process_pcm_frame_s16(&pBPF->pBPF2[ibpf2], pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pBPF->channels; pFramesInS16 += pBPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF) { if (pBPF == NULL) { return 0; } return pBPF->bpf2Count*2; } /************************************************************************************************************************************************************** Notching Filter **************************************************************************************************************************************************************/ MA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency) { ma_notch2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.q = q; config.frequency = frequency; if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_notch2__get_biquad_config(const ma_notch2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = 1; bqConfig.b1 = -2 * c; bqConfig.b2 = 1; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_notch2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_notch2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_notch2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_notch2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_notch2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_notch2_process_pcm_frame_s16(ma_notch2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_notch2_process_pcm_frame_f32(ma_notch2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** Peaking EQ Filter **************************************************************************************************************************************************************/ MA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_peak2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.q = q; config.frequency = frequency; if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_peak2__get_biquad_config(const ma_peak2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; double A; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); A = ma_powd(10, (pConfig->gainDB / 40)); bqConfig.b0 = 1 + (a * A); bqConfig.b1 = -2 * c; bqConfig.b2 = 1 - (a * A); bqConfig.a0 = 1 + (a / A); bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - (a / A); bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_peak2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_peak2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_peak2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_peak2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_peak2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_peak2_process_pcm_frame_s16(ma_peak2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_peak2_process_pcm_frame_f32(ma_peak2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** Low Shelf Filter **************************************************************************************************************************************************************/ MA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency) { ma_loshelf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.shelfSlope = shelfSlope; config.frequency = frequency; return config; } static MA_INLINE ma_biquad_config ma_loshelf2__get_biquad_config(const ma_loshelf2_config* pConfig) { ma_biquad_config bqConfig; double w; double s; double c; double A; double S; double a; double sqrtA; MA_ASSERT(pConfig != NULL); w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); A = ma_powd(10, (pConfig->gainDB / 40)); S = pConfig->shelfSlope; a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2); sqrtA = 2*ma_sqrtd(A)*a; bqConfig.b0 = A * ((A + 1) - (A - 1)*c + sqrtA); bqConfig.b1 = 2 * A * ((A - 1) - (A + 1)*c); bqConfig.b2 = A * ((A + 1) - (A - 1)*c - sqrtA); bqConfig.a0 = (A + 1) + (A - 1)*c + sqrtA; bqConfig.a1 = -2 * ((A - 1) + (A + 1)*c); bqConfig.a2 = (A + 1) + (A - 1)*c - sqrtA; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_loshelf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_loshelf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_loshelf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_loshelf2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_loshelf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_loshelf2_process_pcm_frame_s16(ma_loshelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_loshelf2_process_pcm_frame_f32(ma_loshelf2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** High Shelf Filter **************************************************************************************************************************************************************/ MA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency) { ma_hishelf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.shelfSlope = shelfSlope; config.frequency = frequency; return config; } static MA_INLINE ma_biquad_config ma_hishelf2__get_biquad_config(const ma_hishelf2_config* pConfig) { ma_biquad_config bqConfig; double w; double s; double c; double A; double S; double a; double sqrtA; MA_ASSERT(pConfig != NULL); w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); A = ma_powd(10, (pConfig->gainDB / 40)); S = pConfig->shelfSlope; a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2); sqrtA = 2*ma_sqrtd(A)*a; bqConfig.b0 = A * ((A + 1) + (A - 1)*c + sqrtA); bqConfig.b1 = -2 * A * ((A - 1) + (A + 1)*c); bqConfig.b2 = A * ((A + 1) + (A - 1)*c - sqrtA); bqConfig.a0 = (A + 1) - (A - 1)*c + sqrtA; bqConfig.a1 = 2 * ((A - 1) - (A + 1)*c); bqConfig.a2 = (A + 1) - (A - 1)*c - sqrtA; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_hishelf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hishelf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hishelf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hishelf2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hishelf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_hishelf2_process_pcm_frame_s16(ma_hishelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_hishelf2_process_pcm_frame_f32(ma_hishelf2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /* Delay */ MA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay) { ma_delay_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.sampleRate = sampleRate; config.delayInFrames = delayInFrames; config.delayStart = (decay == 0) ? MA_TRUE : MA_FALSE; /* Delay the start if it looks like we're not configuring an echo. */ config.wet = 1; config.dry = 1; config.decay = decay; return config; } MA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay) { if (pDelay == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDelay); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->decay < 0 || pConfig->decay > 1) { return MA_INVALID_ARGS; } pDelay->config = *pConfig; pDelay->bufferSizeInFrames = pConfig->delayInFrames; pDelay->cursor = 0; pDelay->pBuffer = (float*)ma_malloc((size_t)(pDelay->bufferSizeInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->channels)), pAllocationCallbacks); if (pDelay->pBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_silence_pcm_frames(pDelay->pBuffer, pDelay->bufferSizeInFrames, ma_format_f32, pConfig->channels); return MA_SUCCESS; } MA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks) { if (pDelay == NULL) { return; } ma_free(pDelay->pBuffer, pAllocationCallbacks); } MA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { ma_uint32 iFrame; ma_uint32 iChannel; float* pFramesOutF32 = (float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; if (pDelay == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < pDelay->config.channels; iChannel += 1) { ma_uint32 iBuffer = (pDelay->cursor * pDelay->config.channels) + iChannel; if (pDelay->config.delayStart) { /* Delayed start. */ /* Read */ pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet; /* Feedback */ pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry); } else { /* Immediate start */ /* Feedback */ pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry); /* Read */ pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet; } } pDelay->cursor = (pDelay->cursor + 1) % pDelay->bufferSizeInFrames; pFramesOutF32 += pDelay->config.channels; pFramesInF32 += pDelay->config.channels; } return MA_SUCCESS; } MA_API void ma_delay_set_wet(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.wet = value; } MA_API float ma_delay_get_wet(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.wet; } MA_API void ma_delay_set_dry(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.dry = value; } MA_API float ma_delay_get_dry(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.dry; } MA_API void ma_delay_set_decay(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.decay = value; } MA_API float ma_delay_get_decay(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.decay; } MA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames) { ma_gainer_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.smoothTimeInFrames = smoothTimeInFrames; return config; } typedef struct { size_t sizeInBytes; size_t oldGainsOffset; size_t newGainsOffset; } ma_gainer_heap_layout; static ma_result ma_gainer_get_heap_layout(const ma_gainer_config* pConfig, ma_gainer_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Old gains. */ pHeapLayout->oldGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; /* New gains. */ pHeapLayout->newGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; /* Alignment. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_gainer_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_gainer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer) { ma_result result; ma_gainer_heap_layout heapLayout; ma_uint32 iChannel; if (pGainer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pGainer); if (pConfig == NULL || pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_gainer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pGainer->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pGainer->pOldGains = (float*)ma_offset_ptr(pHeap, heapLayout.oldGainsOffset); pGainer->pNewGains = (float*)ma_offset_ptr(pHeap, heapLayout.newGainsOffset); pGainer->masterVolume = 1; pGainer->config = *pConfig; pGainer->t = (ma_uint32)-1; /* No interpolation by default. */ for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pGainer->pOldGains[iChannel] = 1; pGainer->pNewGains[iChannel] = 1; } return MA_SUCCESS; } MA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_gainer_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap allocation. */ } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_gainer_init_preallocated(pConfig, pHeap, pGainer); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pGainer->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks) { if (pGainer == NULL) { return; } if (pGainer->_ownsHeap) { ma_free(pGainer->_pHeap, pAllocationCallbacks); } } static float ma_gainer_calculate_current_gain(const ma_gainer* pGainer, ma_uint32 channel) { float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; return ma_mix_f32_fast(pGainer->pOldGains[channel], pGainer->pNewGains[channel], a); } static /*__attribute__((noinline))*/ ma_result ma_gainer_process_pcm_frames_internal(ma_gainer * pGainer, void* MA_RESTRICT pFramesOut, const void* MA_RESTRICT pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; ma_uint64 interpolatedFrameCount; MA_ASSERT(pGainer != NULL); /* We don't necessarily need to apply a linear interpolation for the entire frameCount frames. When linear interpolation is not needed we can do a simple volume adjustment which will be more efficient than a lerp with an alpha value of 1. To do this, all we need to do is determine how many frames need to have a lerp applied. Then we just process that number of frames with linear interpolation. After that we run on an optimized path which just applies the new gains without a lerp. */ if (pGainer->t >= pGainer->config.smoothTimeInFrames) { interpolatedFrameCount = 0; } else { interpolatedFrameCount = pGainer->t - pGainer->config.smoothTimeInFrames; if (interpolatedFrameCount > frameCount) { interpolatedFrameCount = frameCount; } } /* Start off with our interpolated frames. When we do this, we'll adjust frameCount and our pointers so that the fast path can work naturally without consideration of the interpolated path. */ if (interpolatedFrameCount > 0) { /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { /* All we're really doing here is moving the old gains towards the new gains. We don't want to be modifying the gains inside the ma_gainer object because that will break things. Instead we can make a copy here on the stack. For extreme channel counts we can fall back to a slower implementation which just uses a standard lerp. */ float* pFramesOutF32 = (float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; float d = 1.0f / pGainer->config.smoothTimeInFrames; if (pGainer->config.channels <= 32) { float pRunningGain[32]; float pRunningGainDelta[32]; /* Could this be heap-allocated as part of the ma_gainer object? */ /* Initialize the running gain. */ for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { float t = (pGainer->pNewGains[iChannel] - pGainer->pOldGains[iChannel]) * pGainer->masterVolume; pRunningGainDelta[iChannel] = t * d; pRunningGain[iChannel] = (pGainer->pOldGains[iChannel] * pGainer->masterVolume) + (t * a); } iFrame = 0; /* Optimized paths for common channel counts. This is mostly just experimenting with some SIMD ideas. It's not necessarily final. */ if (pGainer->config.channels == 2) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean SIMD loop below. */ __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[1], pRunningGainDelta[0]); __m128 runningGain0 = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[1], pRunningGain[0]); for (; iFrame < unrolledLoopCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*4 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*4 + 0]), runningGain0)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); } iFrame = unrolledLoopCount << 1; } else #endif { /* Two different scalar implementations here. Clang (and I assume GCC) will vectorize both of these, but the bottom version results in a nicer vectorization with less instructions emitted. The problem, however, is that the bottom version runs slower when compiled with MSVC. The top version will be partially vectorized by MSVC. */ #if defined(_MSC_VER) && !defined(__clang__) ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean 4x SIMD operation in the loop. */ pRunningGainDelta[2] = pRunningGainDelta[0]; pRunningGainDelta[3] = pRunningGainDelta[1]; pRunningGain[2] = pRunningGain[0] + pRunningGainDelta[0]; pRunningGain[3] = pRunningGain[1] + pRunningGainDelta[1]; for (; iFrame < unrolledLoopCount; iFrame += 1) { pFramesOutF32[iFrame*4 + 0] = pFramesInF32[iFrame*4 + 0] * pRunningGain[0]; pFramesOutF32[iFrame*4 + 1] = pFramesInF32[iFrame*4 + 1] * pRunningGain[1]; pFramesOutF32[iFrame*4 + 2] = pFramesInF32[iFrame*4 + 2] * pRunningGain[2]; pFramesOutF32[iFrame*4 + 3] = pFramesInF32[iFrame*4 + 3] * pRunningGain[3]; /* Move the running gain forward towards the new gain. */ pRunningGain[0] += pRunningGainDelta[0]; pRunningGain[1] += pRunningGainDelta[1]; pRunningGain[2] += pRunningGainDelta[2]; pRunningGain[3] += pRunningGainDelta[3]; } iFrame = unrolledLoopCount << 1; #else for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 2; iChannel += 1) { pFramesOutF32[iFrame*2 + iChannel] = pFramesInF32[iFrame*2 + iChannel] * pRunningGain[iChannel]; } for (iChannel = 0; iChannel < 2; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } #endif } } else if (pGainer->config.channels == 6) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* For 6 channels things are a bit more complicated because 6 isn't cleanly divisible by 4. We need to do 2 frames at a time, meaning we'll be doing 12 samples in a group. Like the stereo case we'll need to expand some arrays so we can do clean 4x SIMD operations. */ ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean SIMD loop below. */ __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[3], pRunningGainDelta[2], pRunningGainDelta[1], pRunningGainDelta[0]); __m128 runningGainDelta1 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[5], pRunningGainDelta[4]); __m128 runningGainDelta2 = _mm_set_ps(pRunningGainDelta[5], pRunningGainDelta[4], pRunningGainDelta[3], pRunningGainDelta[2]); __m128 runningGain0 = _mm_set_ps(pRunningGain[3], pRunningGain[2], pRunningGain[1], pRunningGain[0]); __m128 runningGain1 = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[5], pRunningGain[4]); __m128 runningGain2 = _mm_set_ps(pRunningGain[5] + pRunningGainDelta[5], pRunningGain[4] + pRunningGainDelta[4], pRunningGain[3] + pRunningGainDelta[3], pRunningGain[2] + pRunningGainDelta[2]); for (; iFrame < unrolledLoopCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 0]), runningGain0)); _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 4]), runningGain1)); _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 8], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 8]), runningGain2)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1); runningGain2 = _mm_add_ps(runningGain2, runningGainDelta2); } iFrame = unrolledLoopCount << 1; } else #endif { for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 6; iChannel += 1) { pFramesOutF32[iFrame*6 + iChannel] = pFramesInF32[iFrame*6 + iChannel] * pRunningGain[iChannel]; } /* Move the running gain forward towards the new gain. */ for (iChannel = 0; iChannel < 6; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } } else if (pGainer->config.channels == 8) { /* For 8 channels we can just go over frame by frame and do all eight channels as 2 separate 4x SIMD operations. */ #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { __m128 runningGainDelta0 = _mm_loadu_ps(&pRunningGainDelta[0]); __m128 runningGainDelta1 = _mm_loadu_ps(&pRunningGainDelta[4]); __m128 runningGain0 = _mm_loadu_ps(&pRunningGain[0]); __m128 runningGain1 = _mm_loadu_ps(&pRunningGain[4]); for (; iFrame < interpolatedFrameCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 0]), runningGain0)); _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 4]), runningGain1)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1); } } else #endif { /* This is crafted so that it auto-vectorizes when compiled with Clang. */ for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 8; iChannel += 1) { pFramesOutF32[iFrame*8 + iChannel] = pFramesInF32[iFrame*8 + iChannel] * pRunningGain[iChannel]; } /* Move the running gain forward towards the new gain. */ for (iChannel = 0; iChannel < 8; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } } for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * pRunningGain[iChannel]; pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } else { /* Slower path for extreme channel counts where we can't fit enough on the stack. We could also move this to the heap as part of the ma_gainer object which might even be better since it'll only be updated when the gains actually change. */ for (iFrame = 0; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume; } a += d; } } } /* Make sure the timer is updated. */ pGainer->t = (ma_uint32)ma_min(pGainer->t + interpolatedFrameCount, pGainer->config.smoothTimeInFrames); /* Adjust our arguments so the next part can work normally. */ frameCount -= interpolatedFrameCount; pFramesOut = ma_offset_ptr(pFramesOut, interpolatedFrameCount * sizeof(float)); pFramesIn = ma_offset_ptr(pFramesIn, interpolatedFrameCount * sizeof(float)); } /* All we need to do here is apply the new gains using an optimized path. */ if (pFramesOut != NULL && pFramesIn != NULL) { if (pGainer->config.channels <= 32) { float gains[32]; for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { gains[iChannel] = pGainer->pNewGains[iChannel] * pGainer->masterVolume; } ma_copy_and_apply_volume_factor_per_channel_f32((float*)pFramesOut, (const float*)pFramesIn, frameCount, pGainer->config.channels, gains); } else { /* Slow path. Too many channels to fit on the stack. Need to apply a master volume as a separate path. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ((float*)pFramesOut)[iFrame*pGainer->config.channels + iChannel] = ((const float*)pFramesIn)[iFrame*pGainer->config.channels + iChannel] * pGainer->pNewGains[iChannel] * pGainer->masterVolume; } } } } /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */ if (pGainer->t == (ma_uint32)-1) { pGainer->t = (ma_uint32)ma_min(pGainer->config.smoothTimeInFrames, frameCount); } #if 0 if (pGainer->t >= pGainer->config.smoothTimeInFrames) { /* Fast path. No gain calculation required. */ ma_copy_and_apply_volume_factor_per_channel_f32(pFramesOutF32, pFramesInF32, frameCount, pGainer->config.channels, pGainer->pNewGains); ma_apply_volume_factor_f32(pFramesOutF32, frameCount * pGainer->config.channels, pGainer->masterVolume); /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */ if (pGainer->t == (ma_uint32)-1) { pGainer->t = pGainer->config.smoothTimeInFrames; } } else { /* Slow path. Need to interpolate the gain for each channel individually. */ /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; float d = 1.0f / pGainer->config.smoothTimeInFrames; ma_uint32 channelCount = pGainer->config.channels; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channelCount; iChannel += 1) { pFramesOutF32[iChannel] = pFramesInF32[iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume; } pFramesOutF32 += channelCount; pFramesInF32 += channelCount; a += d; if (a > 1) { a = 1; } } } pGainer->t = (ma_uint32)ma_min(pGainer->t + frameCount, pGainer->config.smoothTimeInFrames); #if 0 /* Reference implementation. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame * pGainer->config.channels + iChannel] = pFramesInF32[iFrame * pGainer->config.channels + iChannel] * ma_gainer_calculate_current_gain(pGainer, iChannel) * pGainer->masterVolume; } } /* Move interpolation time forward, but don't go beyond our smoothing time. */ pGainer->t = ma_min(pGainer->t + 1, pGainer->config.smoothTimeInFrames); } #endif } #endif return MA_SUCCESS; } MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pGainer == NULL) { return MA_INVALID_ARGS; } /* ma_gainer_process_pcm_frames_internal() marks pFramesOut and pFramesIn with MA_RESTRICT which helps with auto-vectorization. */ return ma_gainer_process_pcm_frames_internal(pGainer, pFramesOut, pFramesIn, frameCount); } static void ma_gainer_set_gain_by_index(ma_gainer* pGainer, float newGain, ma_uint32 iChannel) { pGainer->pOldGains[iChannel] = ma_gainer_calculate_current_gain(pGainer, iChannel); pGainer->pNewGains[iChannel] = newGain; } static void ma_gainer_reset_smoothing_time(ma_gainer* pGainer) { if (pGainer->t == (ma_uint32)-1) { pGainer->t = pGainer->config.smoothTimeInFrames; /* No smoothing required for initial gains setting. */ } else { pGainer->t = 0; } } MA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain) { ma_uint32 iChannel; if (pGainer == NULL) { return MA_INVALID_ARGS; } for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ma_gainer_set_gain_by_index(pGainer, newGain, iChannel); } /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */ ma_gainer_reset_smoothing_time(pGainer); return MA_SUCCESS; } MA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains) { ma_uint32 iChannel; if (pGainer == NULL || pNewGains == NULL) { return MA_INVALID_ARGS; } for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ma_gainer_set_gain_by_index(pGainer, pNewGains[iChannel], iChannel); } /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */ ma_gainer_reset_smoothing_time(pGainer); return MA_SUCCESS; } MA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume) { if (pGainer == NULL) { return MA_INVALID_ARGS; } pGainer->masterVolume = volume; return MA_SUCCESS; } MA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume) { if (pGainer == NULL || pVolume == NULL) { return MA_INVALID_ARGS; } *pVolume = pGainer->masterVolume; return MA_SUCCESS; } MA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels) { ma_panner_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.mode = ma_pan_mode_balance; /* Set to balancing mode by default because it's consistent with other audio engines and most likely what the caller is expecting. */ config.pan = 0; return config; } MA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner) { if (pPanner == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pPanner); if (pConfig == NULL) { return MA_INVALID_ARGS; } pPanner->format = pConfig->format; pPanner->channels = pConfig->channels; pPanner->mode = pConfig->mode; pPanner->pan = pConfig->pan; return MA_SUCCESS; } static void ma_stereo_balance_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan) { ma_uint64 iFrame; if (pan > 0) { float factor = 1.0f - pan; if (pFramesOut == pFramesIn) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor; } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor; pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1]; } } } else { float factor = 1.0f + pan; if (pFramesOut == pFramesIn) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor; } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0]; pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor; } } } } static void ma_stereo_balance_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan) { if (pan == 0) { /* Fast path. No panning required. */ if (pFramesOut == pFramesIn) { /* No-op */ } else { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } return; } switch (format) { case ma_format_f32: ma_stereo_balance_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break; /* Unknown format. Just copy. */ default: { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } break; } } static void ma_stereo_pan_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan) { ma_uint64 iFrame; if (pan > 0) { float factorL0 = 1.0f - pan; float factorL1 = 0.0f + pan; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float sample0 = (pFramesIn[iFrame*2 + 0] * factorL0); float sample1 = (pFramesIn[iFrame*2 + 0] * factorL1) + pFramesIn[iFrame*2 + 1]; pFramesOut[iFrame*2 + 0] = sample0; pFramesOut[iFrame*2 + 1] = sample1; } } else { float factorR0 = 0.0f - pan; float factorR1 = 1.0f + pan; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float sample0 = pFramesIn[iFrame*2 + 0] + (pFramesIn[iFrame*2 + 1] * factorR0); float sample1 = (pFramesIn[iFrame*2 + 1] * factorR1); pFramesOut[iFrame*2 + 0] = sample0; pFramesOut[iFrame*2 + 1] = sample1; } } } static void ma_stereo_pan_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan) { if (pan == 0) { /* Fast path. No panning required. */ if (pFramesOut == pFramesIn) { /* No-op */ } else { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } return; } switch (format) { case ma_format_f32: ma_stereo_pan_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break; /* Unknown format. Just copy. */ default: { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } break; } } MA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pPanner == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } if (pPanner->channels == 2) { /* Stereo case. For now assume channel 0 is left and channel right is 1, but should probably add support for a channel map. */ if (pPanner->mode == ma_pan_mode_balance) { ma_stereo_balance_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan); } else { ma_stereo_pan_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan); } } else { if (pPanner->channels == 1) { /* Panning has no effect on mono streams. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels); } else { /* For now we're not going to support non-stereo set ups. Not sure how I want to handle this case just yet. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels); } } return MA_SUCCESS; } MA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode) { if (pPanner == NULL) { return; } pPanner->mode = mode; } MA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner) { if (pPanner == NULL) { return ma_pan_mode_balance; } return pPanner->mode; } MA_API void ma_panner_set_pan(ma_panner* pPanner, float pan) { if (pPanner == NULL) { return; } pPanner->pan = ma_clamp(pan, -1.0f, 1.0f); } MA_API float ma_panner_get_pan(const ma_panner* pPanner) { if (pPanner == NULL) { return 0; } return pPanner->pan; } MA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_fader_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; return config; } MA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader) { if (pFader == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFader); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Only f32 is supported for now. */ if (pConfig->format != ma_format_f32) { return MA_INVALID_ARGS; } pFader->config = *pConfig; pFader->volumeBeg = 1; pFader->volumeEnd = 1; pFader->lengthInFrames = 0; pFader->cursorInFrames = 0; return MA_SUCCESS; } MA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFader == NULL) { return MA_INVALID_ARGS; } /* If the cursor is still negative we need to just copy the absolute number of those frames, but no more than frameCount. */ if (pFader->cursorInFrames < 0) { ma_uint64 absCursorInFrames = (ma_uint64)0 - pFader->cursorInFrames; if (absCursorInFrames > frameCount) { absCursorInFrames = frameCount; } ma_copy_pcm_frames(pFramesOut, pFramesIn, absCursorInFrames, pFader->config.format, pFader->config.channels); pFader->cursorInFrames += absCursorInFrames; frameCount -= absCursorInFrames; pFramesOut = ma_offset_ptr(pFramesOut, ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames); pFramesIn = ma_offset_ptr(pFramesIn, ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames); } if (pFader->cursorInFrames >= 0) { /* For now we need to clamp frameCount so that the cursor never overflows 32-bits. This is required for the conversion to a float which we use for the linear interpolation. This might be changed later. */ if (frameCount + pFader->cursorInFrames > UINT_MAX) { frameCount = UINT_MAX - pFader->cursorInFrames; } /* Optimized path if volumeBeg and volumeEnd are equal. */ if (pFader->volumeBeg == pFader->volumeEnd) { if (pFader->volumeBeg == 1) { /* Straight copy. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels); } else { /* Copy with volume. */ ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeBeg); } } else { /* Slower path. Volumes are different, so may need to do an interpolation. */ if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) { /* Fast path. We've gone past the end of the fade period so just apply the end volume to all samples. */ ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeEnd); } else { /* Slow path. This is where we do the actual fading. */ ma_uint64 iFrame; ma_uint32 iChannel; /* For now we only support f32. Support for other formats might be added later. */ if (pFader->config.format == ma_format_f32) { const float* pFramesInF32 = (const float*)pFramesIn; /* */ float* pFramesOutF32 = ( float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float a = (ma_uint32)ma_min(pFader->cursorInFrames + iFrame, pFader->lengthInFrames) / (float)((ma_uint32)pFader->lengthInFrames); /* Safe cast due to the frameCount clamp at the top of this function. */ float volume = ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, a); for (iChannel = 0; iChannel < pFader->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pFader->config.channels + iChannel] = pFramesInF32[iFrame*pFader->config.channels + iChannel] * volume; } } } else { return MA_NOT_IMPLEMENTED; } } } } pFader->cursorInFrames += frameCount; return MA_SUCCESS; } MA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate) { if (pFader == NULL) { return; } if (pFormat != NULL) { *pFormat = pFader->config.format; } if (pChannels != NULL) { *pChannels = pFader->config.channels; } if (pSampleRate != NULL) { *pSampleRate = pFader->config.sampleRate; } } MA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames) { ma_fader_set_fade_ex(pFader, volumeBeg, volumeEnd, lengthInFrames, 0); } MA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames) { if (pFader == NULL) { return; } /* If the volume is negative, use current volume. */ if (volumeBeg < 0) { volumeBeg = ma_fader_get_current_volume(pFader); } /* The length needs to be clamped to 32-bits due to how we convert it to a float for linear interpolation reasons. I might change this requirement later, but for now it's not important. */ if (lengthInFrames > UINT_MAX) { lengthInFrames = UINT_MAX; } /* The start offset needs to be clamped to ensure it doesn't overflow a signed number. */ if (startOffsetInFrames > INT_MAX) { startOffsetInFrames = INT_MAX; } pFader->volumeBeg = volumeBeg; pFader->volumeEnd = volumeEnd; pFader->lengthInFrames = lengthInFrames; pFader->cursorInFrames = -startOffsetInFrames; } MA_API float ma_fader_get_current_volume(const ma_fader* pFader) { if (pFader == NULL) { return 0.0f; } /* Any frames prior to the start of the fade period will be at unfaded volume. */ if (pFader->cursorInFrames < 0) { return 1.0f; } /* The current volume depends on the position of the cursor. */ if (pFader->cursorInFrames == 0) { return pFader->volumeBeg; } else if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) { /* Safe case because the < 0 case was checked above. */ return pFader->volumeEnd; } else { /* The cursor is somewhere inside the fading period. We can figure this out with a simple linear interpolation between volumeBeg and volumeEnd based on our cursor position. */ return ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, (ma_uint32)pFader->cursorInFrames / (float)((ma_uint32)pFader->lengthInFrames)); /* Safe cast to uint32 because we clamp it in ma_fader_process_pcm_frames(). */ } } MA_API ma_vec3f ma_vec3f_init_3f(float x, float y, float z) { ma_vec3f v; v.x = x; v.y = y; v.z = z; return v; } MA_API ma_vec3f ma_vec3f_sub(ma_vec3f a, ma_vec3f b) { return ma_vec3f_init_3f( a.x - b.x, a.y - b.y, a.z - b.z ); } MA_API ma_vec3f ma_vec3f_neg(ma_vec3f a) { return ma_vec3f_init_3f( -a.x, -a.y, -a.z ); } MA_API float ma_vec3f_dot(ma_vec3f a, ma_vec3f b) { return a.x*b.x + a.y*b.y + a.z*b.z; } MA_API float ma_vec3f_len2(ma_vec3f v) { return ma_vec3f_dot(v, v); } MA_API float ma_vec3f_len(ma_vec3f v) { return (float)ma_sqrtd(ma_vec3f_len2(v)); } MA_API float ma_vec3f_dist(ma_vec3f a, ma_vec3f b) { return ma_vec3f_len(ma_vec3f_sub(a, b)); } MA_API ma_vec3f ma_vec3f_normalize(ma_vec3f v) { float invLen; float len2 = ma_vec3f_len2(v); if (len2 == 0) { return ma_vec3f_init_3f(0, 0, 0); } invLen = ma_rsqrtf(len2); v.x *= invLen; v.y *= invLen; v.z *= invLen; return v; } MA_API ma_vec3f ma_vec3f_cross(ma_vec3f a, ma_vec3f b) { return ma_vec3f_init_3f( a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x ); } MA_API void ma_atomic_vec3f_init(ma_atomic_vec3f* v, ma_vec3f value) { v->v = value; v->lock = 0; /* Important this is initialized to 0. */ } MA_API void ma_atomic_vec3f_set(ma_atomic_vec3f* v, ma_vec3f value) { ma_spinlock_lock(&v->lock); { v->v = value; } ma_spinlock_unlock(&v->lock); } MA_API ma_vec3f ma_atomic_vec3f_get(ma_atomic_vec3f* v) { ma_vec3f r; ma_spinlock_lock(&v->lock); { r = v->v; } ma_spinlock_unlock(&v->lock); return r; } static void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode); static ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition); #ifndef MA_DEFAULT_SPEED_OF_SOUND #define MA_DEFAULT_SPEED_OF_SOUND 343.3f #endif /* These vectors represent the direction that speakers are facing from the center point. They're used for panning in the spatializer. Must be normalized. */ static ma_vec3f g_maChannelDirections[MA_CHANNEL_POSITION_COUNT] = { { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_NONE */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_MONO */ {-0.7071f, 0.0f, -0.7071f }, /* MA_CHANNEL_FRONT_LEFT */ {+0.7071f, 0.0f, -0.7071f }, /* MA_CHANNEL_FRONT_RIGHT */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_FRONT_CENTER */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_LFE */ {-0.7071f, 0.0f, +0.7071f }, /* MA_CHANNEL_BACK_LEFT */ {+0.7071f, 0.0f, +0.7071f }, /* MA_CHANNEL_BACK_RIGHT */ {-0.3162f, 0.0f, -0.9487f }, /* MA_CHANNEL_FRONT_LEFT_CENTER */ {+0.3162f, 0.0f, -0.9487f }, /* MA_CHANNEL_FRONT_RIGHT_CENTER */ { 0.0f, 0.0f, +1.0f }, /* MA_CHANNEL_BACK_CENTER */ {-1.0f, 0.0f, 0.0f }, /* MA_CHANNEL_SIDE_LEFT */ {+1.0f, 0.0f, 0.0f }, /* MA_CHANNEL_SIDE_RIGHT */ { 0.0f, +1.0f, 0.0f }, /* MA_CHANNEL_TOP_CENTER */ {-0.5774f, +0.5774f, -0.5774f }, /* MA_CHANNEL_TOP_FRONT_LEFT */ { 0.0f, +0.7071f, -0.7071f }, /* MA_CHANNEL_TOP_FRONT_CENTER */ {+0.5774f, +0.5774f, -0.5774f }, /* MA_CHANNEL_TOP_FRONT_RIGHT */ {-0.5774f, +0.5774f, +0.5774f }, /* MA_CHANNEL_TOP_BACK_LEFT */ { 0.0f, +0.7071f, +0.7071f }, /* MA_CHANNEL_TOP_BACK_CENTER */ {+0.5774f, +0.5774f, +0.5774f }, /* MA_CHANNEL_TOP_BACK_RIGHT */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_0 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_1 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_2 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_3 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_4 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_5 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_6 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_7 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_8 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_9 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_10 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_11 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_12 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_13 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_14 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_15 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_16 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_17 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_18 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_19 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_20 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_21 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_22 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_23 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_24 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_25 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_26 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_27 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_28 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_29 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_30 */ { 0.0f, 0.0f, -1.0f } /* MA_CHANNEL_AUX_31 */ }; static ma_vec3f ma_get_channel_direction(ma_channel channel) { if (channel >= MA_CHANNEL_POSITION_COUNT) { return ma_vec3f_init_3f(0, 0, -1); } else { return g_maChannelDirections[channel]; } } static float ma_attenuation_inverse(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return minDistance / (minDistance + rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance)); } static float ma_attenuation_linear(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return 1 - rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance) / (maxDistance - minDistance); } static float ma_attenuation_exponential(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return (float)ma_powd(ma_clamp(distance, minDistance, maxDistance) / minDistance, -rolloff); } /* Doppler Effect calculation taken from the OpenAL spec, with two main differences: 1) The source to listener vector will have already been calculated at an earlier step so we can just use that directly. We need only the position of the source relative to the origin. 2) We don't scale by a frequency because we actually just want the ratio which we'll plug straight into the resampler directly. */ static float ma_doppler_pitch(ma_vec3f relativePosition, ma_vec3f sourceVelocity, ma_vec3f listenVelocity, float speedOfSound, float dopplerFactor) { float len; float vls; float vss; len = ma_vec3f_len(relativePosition); /* There's a case where the position of the source will be right on top of the listener in which case the length will be 0 and we'll end up with a division by zero. We can just return a ratio of 1.0 in this case. This is not considered in the OpenAL spec, but is necessary. */ if (len == 0) { return 1.0; } vls = ma_vec3f_dot(relativePosition, listenVelocity) / len; vss = ma_vec3f_dot(relativePosition, sourceVelocity) / len; vls = ma_min(vls, speedOfSound / dopplerFactor); vss = ma_min(vss, speedOfSound / dopplerFactor); return (speedOfSound - dopplerFactor*vls) / (speedOfSound - dopplerFactor*vss); } static void ma_get_default_channel_map_for_spatializer(ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channelCount) { /* Special case for stereo. Want to default the left and right speakers to side left and side right so that they're facing directly down the X axis rather than slightly forward. Not doing this will result in sounds being quieter when behind the listener. This might actually be good for some scenarios, but I don't think it's an appropriate default because it can be a bit unexpected. */ if (channelCount == 2) { pChannelMap[0] = MA_CHANNEL_SIDE_LEFT; pChannelMap[1] = MA_CHANNEL_SIDE_RIGHT; } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } } MA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut) { ma_spatializer_listener_config config; MA_ZERO_OBJECT(&config); config.channelsOut = channelsOut; config.pChannelMapOut = NULL; config.handedness = ma_handedness_right; config.worldUp = ma_vec3f_init_3f(0, 1, 0); config.coneInnerAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterGain = 0; config.speedOfSound = 343.3f; /* Same as OpenAL. Used for doppler effect. */ return config; } typedef struct { size_t sizeInBytes; size_t channelMapOutOffset; } ma_spatializer_listener_heap_layout; static ma_result ma_spatializer_listener_get_heap_layout(const ma_spatializer_listener_config* pConfig, ma_spatializer_listener_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Channel map. We always need this, even for passthroughs. */ pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapOut) * pConfig->channelsOut); return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_spatializer_listener_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener) { ma_result result; ma_spatializer_listener_heap_layout heapLayout; if (pListener == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pListener); result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pListener->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pListener->config = *pConfig; ma_atomic_vec3f_init(&pListener->position, ma_vec3f_init_3f(0, 0, 0)); ma_atomic_vec3f_init(&pListener->direction, ma_vec3f_init_3f(0, 0, -1)); ma_atomic_vec3f_init(&pListener->velocity, ma_vec3f_init_3f(0, 0, 0)); pListener->isEnabled = MA_TRUE; /* Swap the forward direction if we're left handed (it was initialized based on right handed). */ if (pListener->config.handedness == ma_handedness_left) { ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_listener_get_direction(pListener)); ma_spatializer_listener_set_direction(pListener, negDir.x, negDir.y, negDir.z); } /* We must always have a valid channel map. */ pListener->config.pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset); /* Use a slightly different default channel map for stereo. */ if (pConfig->pChannelMapOut == NULL) { ma_get_default_channel_map_for_spatializer(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->channelsOut); } else { ma_channel_map_copy_or_default(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut); } return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_spatializer_listener_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_spatializer_listener_init_preallocated(pConfig, pHeap, pListener); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pListener->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks) { if (pListener == NULL) { return; } if (pListener->_ownsHeap) { ma_free(pListener->_pHeap, pAllocationCallbacks); } } MA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener) { if (pListener == NULL) { return NULL; } return pListener->config.pChannelMapOut; } MA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pListener == NULL) { return; } pListener->config.coneInnerAngleInRadians = innerAngleInRadians; pListener->config.coneOuterAngleInRadians = outerAngleInRadians; pListener->config.coneOuterGain = outerGain; } MA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pListener == NULL) { return; } if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = pListener->config.coneInnerAngleInRadians; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = pListener->config.coneOuterAngleInRadians; } if (pOuterGain != NULL) { *pOuterGain = pListener->config.coneOuterGain; } } MA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->position, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->position); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->direction, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, -1); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->direction); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->velocity, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->velocity); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound) { if (pListener == NULL) { return; } pListener->config.speedOfSound = speedOfSound; } MA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return 0; } return pListener->config.speedOfSound; } MA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } pListener->config.worldUp = ma_vec3f_init_3f(x, y, z); } MA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 1, 0); } return pListener->config.worldUp; } MA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled) { if (pListener == NULL) { return; } pListener->isEnabled = isEnabled; } MA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return MA_FALSE; } return pListener->isEnabled; } MA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut) { ma_spatializer_config config; MA_ZERO_OBJECT(&config); config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.pChannelMapIn = NULL; config.attenuationModel = ma_attenuation_model_inverse; config.positioning = ma_positioning_absolute; config.handedness = ma_handedness_right; config.minGain = 0; config.maxGain = 1; config.minDistance = 1; config.maxDistance = MA_FLT_MAX; config.rolloff = 1; config.coneInnerAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterGain = 0.0f; config.dopplerFactor = 1; config.directionalAttenuationFactor = 1; config.minSpatializationChannelGain = 0.2f; config.gainSmoothTimeInFrames = 360; /* 7.5ms @ 48K. */ return config; } static ma_gainer_config ma_spatializer_gainer_config_init(const ma_spatializer_config* pConfig) { MA_ASSERT(pConfig != NULL); return ma_gainer_config_init(pConfig->channelsOut, pConfig->gainSmoothTimeInFrames); } static ma_result ma_spatializer_validate_config(const ma_spatializer_config* pConfig) { MA_ASSERT(pConfig != NULL); if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } return MA_SUCCESS; } typedef struct { size_t sizeInBytes; size_t channelMapInOffset; size_t newChannelGainsOffset; size_t gainerOffset; } ma_spatializer_heap_layout; static ma_result ma_spatializer_get_heap_layout(const ma_spatializer_config* pConfig, ma_spatializer_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_spatializer_validate_config(pConfig); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes = 0; /* Channel map. */ pHeapLayout->channelMapInOffset = MA_SIZE_MAX; /* <-- MA_SIZE_MAX indicates no allocation necessary. */ if (pConfig->pChannelMapIn != NULL) { pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapIn) * pConfig->channelsIn); } /* New channel gains for output. */ pHeapLayout->newChannelGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(float) * pConfig->channelsOut); /* Gainer. */ { size_t gainerHeapSizeInBytes; ma_gainer_config gainerConfig; gainerConfig = ma_spatializer_gainer_config_init(pConfig); result = ma_gainer_get_heap_size(&gainerConfig, &gainerHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(gainerHeapSizeInBytes); } return MA_SUCCESS; } MA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_spatializer_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; /* Safety. */ result = ma_spatializer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer) { ma_result result; ma_spatializer_heap_layout heapLayout; ma_gainer_config gainerConfig; if (pSpatializer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSpatializer); if (pConfig == NULL || pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_spatializer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pSpatializer->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pSpatializer->channelsIn = pConfig->channelsIn; pSpatializer->channelsOut = pConfig->channelsOut; pSpatializer->attenuationModel = pConfig->attenuationModel; pSpatializer->positioning = pConfig->positioning; pSpatializer->handedness = pConfig->handedness; pSpatializer->minGain = pConfig->minGain; pSpatializer->maxGain = pConfig->maxGain; pSpatializer->minDistance = pConfig->minDistance; pSpatializer->maxDistance = pConfig->maxDistance; pSpatializer->rolloff = pConfig->rolloff; pSpatializer->coneInnerAngleInRadians = pConfig->coneInnerAngleInRadians; pSpatializer->coneOuterAngleInRadians = pConfig->coneOuterAngleInRadians; pSpatializer->coneOuterGain = pConfig->coneOuterGain; pSpatializer->dopplerFactor = pConfig->dopplerFactor; pSpatializer->minSpatializationChannelGain = pConfig->minSpatializationChannelGain; pSpatializer->directionalAttenuationFactor = pConfig->directionalAttenuationFactor; pSpatializer->gainSmoothTimeInFrames = pConfig->gainSmoothTimeInFrames; ma_atomic_vec3f_init(&pSpatializer->position, ma_vec3f_init_3f(0, 0, 0)); ma_atomic_vec3f_init(&pSpatializer->direction, ma_vec3f_init_3f(0, 0, -1)); ma_atomic_vec3f_init(&pSpatializer->velocity, ma_vec3f_init_3f(0, 0, 0)); pSpatializer->dopplerPitch = 1; /* Swap the forward direction if we're left handed (it was initialized based on right handed). */ if (pSpatializer->handedness == ma_handedness_left) { ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_get_direction(pSpatializer)); ma_spatializer_set_direction(pSpatializer, negDir.x, negDir.y, negDir.z); } /* Channel map. This will be on the heap. */ if (pConfig->pChannelMapIn != NULL) { pSpatializer->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset); ma_channel_map_copy_or_default(pSpatializer->pChannelMapIn, pSpatializer->channelsIn, pConfig->pChannelMapIn, pSpatializer->channelsIn); } /* New channel gains for output channels. */ pSpatializer->pNewChannelGainsOut = (float*)ma_offset_ptr(pHeap, heapLayout.newChannelGainsOffset); /* Gainer. */ gainerConfig = ma_spatializer_gainer_config_init(pConfig); result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pSpatializer->gainer); if (result != MA_SUCCESS) { return result; /* Failed to initialize the gainer. */ } return MA_SUCCESS; } MA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer) { ma_result result; size_t heapSizeInBytes; void* pHeap; /* We'll need a heap allocation to retrieve the size. */ result = ma_spatializer_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_spatializer_init_preallocated(pConfig, pHeap, pSpatializer); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pSpatializer->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks) { if (pSpatializer == NULL) { return; } ma_gainer_uninit(&pSpatializer->gainer, pAllocationCallbacks); if (pSpatializer->_ownsHeap) { ma_free(pSpatializer->_pHeap, pAllocationCallbacks); } } static float ma_calculate_angular_gain(ma_vec3f dirA, ma_vec3f dirB, float coneInnerAngleInRadians, float coneOuterAngleInRadians, float coneOuterGain) { /* Angular attenuation. Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure this out for ourselves at the expense of possibly being inconsistent with other implementations. To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We just need to get the direction from the source to the listener and then do a dot product against that and the direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer angles. If the dot product is greater than the outer angle, we just use coneOuterGain. If it's less than the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain. */ if (coneInnerAngleInRadians < 6.283185f) { float angularGain = 1; float cutoffInner = (float)ma_cosd(coneInnerAngleInRadians*0.5f); float cutoffOuter = (float)ma_cosd(coneOuterAngleInRadians*0.5f); float d; d = ma_vec3f_dot(dirA, dirB); if (d > cutoffInner) { /* It's inside the inner angle. */ angularGain = 1; } else { /* It's outside the inner angle. */ if (d > cutoffOuter) { /* It's between the inner and outer angle. We need to linearly interpolate between 1 and coneOuterGain. */ angularGain = ma_mix_f32(coneOuterGain, 1, (d - cutoffOuter) / (cutoffInner - cutoffOuter)); } else { /* It's outside the outer angle. */ angularGain = coneOuterGain; } } /*printf("d = %f; cutoffInner = %f; cutoffOuter = %f; angularGain = %f\n", d, cutoffInner, cutoffOuter, angularGain);*/ return angularGain; } else { /* Inner angle is 360 degrees so no need to do any attenuation. */ return 1; } } MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_channel* pChannelMapIn = pSpatializer->pChannelMapIn; ma_channel* pChannelMapOut = pListener->config.pChannelMapOut; if (pSpatializer == NULL) { return MA_INVALID_ARGS; } /* If we're not spatializing we need to run an optimized path. */ if (ma_atomic_load_i32(&pSpatializer->attenuationModel) == ma_attenuation_model_none) { if (ma_spatializer_listener_is_enabled(pListener)) { /* No attenuation is required, but we'll need to do some channel conversion. */ if (pSpatializer->channelsIn == pSpatializer->channelsOut) { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, pSpatializer->channelsIn); } else { ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, pSpatializer->channelsOut, (const float*)pFramesIn, pChannelMapIn, pSpatializer->channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default); /* Safe casts to float* because f32 is the only supported format. */ } } else { /* The listener is disabled. Output silence. */ ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut); } /* We're not doing attenuation so don't bother with doppler for now. I'm not sure if this is the correct thinking so might need to review this later. */ pSpatializer->dopplerPitch = 1; } else { /* Let's first determine which listener the sound is closest to. Need to keep in mind that we might not have a world or any listeners, in which case we just spatializer based on the listener being positioned at the origin (0, 0, 0). */ ma_vec3f relativePosNormalized; ma_vec3f relativePos; /* The position relative to the listener. */ ma_vec3f relativeDir; /* The direction of the sound, relative to the listener. */ ma_vec3f listenerVel; /* The velocity of the listener. For doppler pitch calculation. */ float speedOfSound; float distance = 0; float gain = 1; ma_uint32 iChannel; const ma_uint32 channelsOut = pSpatializer->channelsOut; const ma_uint32 channelsIn = pSpatializer->channelsIn; float minDistance = ma_spatializer_get_min_distance(pSpatializer); float maxDistance = ma_spatializer_get_max_distance(pSpatializer); float rolloff = ma_spatializer_get_rolloff(pSpatializer); float dopplerFactor = ma_spatializer_get_doppler_factor(pSpatializer); /* We'll need the listener velocity for doppler pitch calculations. The speed of sound is defined by the listener, so we'll grab that here too. */ if (pListener != NULL) { listenerVel = ma_spatializer_listener_get_velocity(pListener); speedOfSound = pListener->config.speedOfSound; } else { listenerVel = ma_vec3f_init_3f(0, 0, 0); speedOfSound = MA_DEFAULT_SPEED_OF_SOUND; } if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) { /* There's no listener or we're using relative positioning. */ relativePos = ma_spatializer_get_position(pSpatializer); relativeDir = ma_spatializer_get_direction(pSpatializer); } else { /* We've found a listener and we're using absolute positioning. We need to transform the sound's position and direction so that it's relative to listener. Later on we'll use this for determining the factors to apply to each channel to apply the panning effect. */ ma_spatializer_get_relative_position_and_direction(pSpatializer, pListener, &relativePos, &relativeDir); } distance = ma_vec3f_len(relativePos); /* We've gathered the data, so now we can apply some spatialization. */ switch (ma_spatializer_get_attenuation_model(pSpatializer)) { case ma_attenuation_model_inverse: { gain = ma_attenuation_inverse(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_linear: { gain = ma_attenuation_linear(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_exponential: { gain = ma_attenuation_exponential(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_none: default: { gain = 1; } break; } /* Normalize the position. */ if (distance > 0.001f) { float distanceInv = 1/distance; relativePosNormalized = relativePos; relativePosNormalized.x *= distanceInv; relativePosNormalized.y *= distanceInv; relativePosNormalized.z *= distanceInv; } else { distance = 0; relativePosNormalized = ma_vec3f_init_3f(0, 0, 0); } /* Angular attenuation. Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure this out for ourselves at the expense of possibly being inconsistent with other implementations. To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We just need to get the direction from the source to the listener and then do a dot product against that and the direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer angles. If the dot product is greater than the outer angle, we just use coneOuterGain. If it's less than the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain. */ if (distance > 0) { /* Source angular gain. */ float spatializerConeInnerAngle; float spatializerConeOuterAngle; float spatializerConeOuterGain; ma_spatializer_get_cone(pSpatializer, &spatializerConeInnerAngle, &spatializerConeOuterAngle, &spatializerConeOuterGain); gain *= ma_calculate_angular_gain(relativeDir, ma_vec3f_neg(relativePosNormalized), spatializerConeInnerAngle, spatializerConeOuterAngle, spatializerConeOuterGain); /* We're supporting angular gain on the listener as well for those who want to reduce the volume of sounds that are positioned behind the listener. On default settings, this will have no effect. */ if (pListener != NULL && pListener->config.coneInnerAngleInRadians < 6.283185f) { ma_vec3f listenerDirection; float listenerInnerAngle; float listenerOuterAngle; float listenerOuterGain; if (pListener->config.handedness == ma_handedness_right) { listenerDirection = ma_vec3f_init_3f(0, 0, -1); } else { listenerDirection = ma_vec3f_init_3f(0, 0, +1); } listenerInnerAngle = pListener->config.coneInnerAngleInRadians; listenerOuterAngle = pListener->config.coneOuterAngleInRadians; listenerOuterGain = pListener->config.coneOuterGain; gain *= ma_calculate_angular_gain(listenerDirection, relativePosNormalized, listenerInnerAngle, listenerOuterAngle, listenerOuterGain); } } else { /* The sound is right on top of the listener. Don't do any angular attenuation. */ } /* Clamp the gain. */ gain = ma_clamp(gain, ma_spatializer_get_min_gain(pSpatializer), ma_spatializer_get_max_gain(pSpatializer)); /* The gain needs to be applied per-channel here. The spatialization code below will be changing the per-channel gains which will then eventually be passed into the gainer which will deal with smoothing the gain transitions to avoid harsh changes in gain. */ for (iChannel = 0; iChannel < channelsOut; iChannel += 1) { pSpatializer->pNewChannelGainsOut[iChannel] = gain; } /* Convert to our output channel count. If the listener is disabled we just output silence here. We cannot ignore the whole section of code here because we need to update some internal spatialization state. */ if (ma_spatializer_listener_is_enabled(pListener)) { ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, channelsOut, (const float*)pFramesIn, pChannelMapIn, channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default); } else { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut); } /* Panning. This is where we'll apply the gain and convert to the output channel count. We have an optimized path for when we're converting to a mono stream. In that case we don't really need to do any panning - we just apply the gain to the final output. */ /*printf("distance=%f; gain=%f\n", distance, gain);*/ /* We must have a valid channel map here to ensure we spatialize properly. */ MA_ASSERT(pChannelMapOut != NULL); /* We're not converting to mono so we'll want to apply some panning. This is where the feeling of something being to the left, right, infront or behind the listener is calculated. I'm just using a basic model here. Note that the code below is not based on any specific algorithm. I'm just implementing this off the top of my head and seeing how it goes. There might be better ways to do this. To determine the direction of the sound relative to a speaker I'm using dot products. Each speaker is given a direction. For example, the left channel in a stereo system will be -1 on the X axis and the right channel will be +1 on the X axis. A dot product is performed against the direction vector of the channel and the normalized position of the sound. */ /* Calculate our per-channel gains. We do this based on the normalized relative position of the sound and it's relation to the direction of the channel. */ if (distance > 0) { ma_vec3f unitPos = relativePos; float distanceInv = 1/distance; unitPos.x *= distanceInv; unitPos.y *= distanceInv; unitPos.z *= distanceInv; for (iChannel = 0; iChannel < channelsOut; iChannel += 1) { ma_channel channelOut; float d; float dMin; channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannel); if (ma_is_spatial_channel_position(channelOut)) { d = ma_mix_f32_fast(1, ma_vec3f_dot(unitPos, ma_get_channel_direction(channelOut)), ma_spatializer_get_directional_attenuation_factor(pSpatializer)); } else { d = 1; /* It's not a spatial channel so there's no real notion of direction. */ } /* In my testing, if the panning effect is too aggressive it makes spatialization feel uncomfortable. The "dMin" variable below is used to control the aggressiveness of the panning effect. When set to 0, panning will be most extreme and any sounds that are positioned on the opposite side of the speaker will be completely silent from that speaker. Not only does this feel uncomfortable, it doesn't even remotely represent the real world at all because sounds that come from your right side are still clearly audible from your left side. Setting "dMin" to 1 will result in no panning at all, which is also not ideal. By setting it to something greater than 0, the spatialization effect becomes much less dramatic and a lot more bearable. Summary: 0 = more extreme panning; 1 = no panning. */ dMin = pSpatializer->minSpatializationChannelGain; /* At this point, "d" will be positive if the sound is on the same side as the channel and negative if it's on the opposite side. It will be in the range of -1..1. There's two ways I can think of to calculate a panning value. The first is to simply convert it to 0..1, however this has a problem which I'm not entirely happy with. Considering a stereo system, when a sound is positioned right in front of the listener it'll result in each speaker getting a gain of 0.5. I don't know if I like the idea of having a scaling factor of 0.5 being applied to a sound when it's sitting right in front of the listener. I would intuitively expect that to be played at full volume, or close to it. The second idea I think of is to only apply a reduction in gain when the sound is on the opposite side of the speaker. That is, reduce the gain only when the dot product is negative. The problem with this is that there will not be any attenuation as the sound sweeps around the 180 degrees where the dot product is positive. The idea with this option is that you leave the gain at 1 when the sound is being played on the same side as the speaker and then you just reduce the volume when the sound is on the other side. The summarize, I think the first option should give a better sense of spatialization, but the second option is better for preserving the sound's power. UPDATE: In my testing, I find the first option to sound better. You can feel the sense of space a bit better, but you can also hear the reduction in volume when it's right in front. */ #if 1 { /* Scale the dot product from -1..1 to 0..1. Will result in a sound directly in front losing power by being played at 0.5 gain. */ d = (d + 1) * 0.5f; /* -1..1 to 0..1 */ d = ma_max(d, dMin); pSpatializer->pNewChannelGainsOut[iChannel] *= d; } #else { /* Only reduce the volume of the sound if it's on the opposite side. This path keeps the volume more consistent, but comes at the expense of a worse sense of space and positioning. */ if (d < 0) { d += 1; /* Move into the positive range. */ d = ma_max(d, dMin); channelGainsOut[iChannel] *= d; } } #endif } } else { /* Assume the sound is right on top of us. Don't do any panning. */ } /* Now we need to apply the volume to each channel. This needs to run through the gainer to ensure we get a smooth volume transition. */ ma_gainer_set_gains(&pSpatializer->gainer, pSpatializer->pNewChannelGainsOut); ma_gainer_process_pcm_frames(&pSpatializer->gainer, pFramesOut, pFramesOut, frameCount); /* Before leaving we'll want to update our doppler pitch so that the caller can apply some pitch shifting if they desire. Note that we need to negate the relative position here because the doppler calculation needs to be source-to-listener, but ours is listener-to- source. */ if (dopplerFactor > 0) { pSpatializer->dopplerPitch = ma_doppler_pitch(ma_vec3f_sub(ma_spatializer_listener_get_position(pListener), ma_spatializer_get_position(pSpatializer)), ma_spatializer_get_velocity(pSpatializer), listenerVel, speedOfSound, dopplerFactor); } else { pSpatializer->dopplerPitch = 1; } } return MA_SUCCESS; } MA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume) { if (pSpatializer == NULL) { return MA_INVALID_ARGS; } return ma_gainer_set_master_volume(&pSpatializer->gainer, volume); } MA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume) { if (pSpatializer == NULL) { return MA_INVALID_ARGS; } return ma_gainer_get_master_volume(&pSpatializer->gainer, pVolume); } MA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return pSpatializer->channelsIn; } MA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return pSpatializer->channelsOut; } MA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_i32(&pSpatializer->attenuationModel, attenuationModel); } MA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_attenuation_model_none; } return (ma_attenuation_model)ma_atomic_load_i32(&pSpatializer->attenuationModel); } MA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_i32(&pSpatializer->positioning, positioning); } MA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_positioning_absolute; } return (ma_positioning)ma_atomic_load_i32(&pSpatializer->positioning); } MA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->rolloff, rolloff); } MA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->rolloff); } MA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->minGain, minGain); } MA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->minGain); } MA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->maxGain, maxGain); } MA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->maxGain); } MA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->minDistance, minDistance); } MA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->minDistance); } MA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->maxDistance, maxDistance); } MA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->maxDistance); } MA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->coneInnerAngleInRadians, innerAngleInRadians); ma_atomic_exchange_f32(&pSpatializer->coneOuterAngleInRadians, outerAngleInRadians); ma_atomic_exchange_f32(&pSpatializer->coneOuterGain, outerGain); } MA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pSpatializer == NULL) { return; } if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneInnerAngleInRadians); } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneOuterAngleInRadians); } if (pOuterGain != NULL) { *pOuterGain = ma_atomic_load_f32(&pSpatializer->coneOuterGain); } } MA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->dopplerFactor, dopplerFactor); } MA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 1; } return ma_atomic_load_f32(&pSpatializer->dopplerFactor); } MA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->directionalAttenuationFactor, directionalAttenuationFactor); } MA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 1; } return ma_atomic_load_f32(&pSpatializer->directionalAttenuationFactor); } MA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->position, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->position); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->direction, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, -1); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->direction); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->velocity, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->velocity); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir) { if (pRelativePos != NULL) { pRelativePos->x = 0; pRelativePos->y = 0; pRelativePos->z = 0; } if (pRelativeDir != NULL) { pRelativeDir->x = 0; pRelativeDir->y = 0; pRelativeDir->z = -1; } if (pSpatializer == NULL) { return; } if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) { /* There's no listener or we're using relative positioning. */ if (pRelativePos != NULL) { *pRelativePos = ma_spatializer_get_position(pSpatializer); } if (pRelativeDir != NULL) { *pRelativeDir = ma_spatializer_get_direction(pSpatializer); } } else { ma_vec3f spatializerPosition; ma_vec3f spatializerDirection; ma_vec3f listenerPosition; ma_vec3f listenerDirection; ma_vec3f v; ma_vec3f axisX; ma_vec3f axisY; ma_vec3f axisZ; float m[4][4]; spatializerPosition = ma_spatializer_get_position(pSpatializer); spatializerDirection = ma_spatializer_get_direction(pSpatializer); listenerPosition = ma_spatializer_listener_get_position(pListener); listenerDirection = ma_spatializer_listener_get_direction(pListener); /* We need to calculate the right vector from our forward and up vectors. This is done with a cross product. */ axisZ = ma_vec3f_normalize(listenerDirection); /* Normalization required here because we can't trust the caller. */ axisX = ma_vec3f_normalize(ma_vec3f_cross(axisZ, pListener->config.worldUp)); /* Normalization required here because the world up vector may not be perpendicular with the forward vector. */ /* The calculation of axisX above can result in a zero-length vector if the listener is looking straight up on the Y axis. We'll need to fall back to a +X in this case so that the calculations below don't fall apart. This is where a quaternion based listener and sound orientation would come in handy. */ if (ma_vec3f_len2(axisX) == 0) { axisX = ma_vec3f_init_3f(1, 0, 0); } axisY = ma_vec3f_cross(axisX, axisZ); /* No normalization is required here because axisX and axisZ are unit length and perpendicular. */ /* We need to swap the X axis if we're left handed because otherwise the cross product above will have resulted in it pointing in the wrong direction (right handed was assumed in the cross products above). */ if (pListener->config.handedness == ma_handedness_left) { axisX = ma_vec3f_neg(axisX); } /* Lookat. */ m[0][0] = axisX.x; m[1][0] = axisX.y; m[2][0] = axisX.z; m[3][0] = -ma_vec3f_dot(axisX, listenerPosition); m[0][1] = axisY.x; m[1][1] = axisY.y; m[2][1] = axisY.z; m[3][1] = -ma_vec3f_dot(axisY, listenerPosition); m[0][2] = -axisZ.x; m[1][2] = -axisZ.y; m[2][2] = -axisZ.z; m[3][2] = -ma_vec3f_dot(ma_vec3f_neg(axisZ), listenerPosition); m[0][3] = 0; m[1][3] = 0; m[2][3] = 0; m[3][3] = 1; /* Multiply the lookat matrix by the spatializer position to transform it to listener space. This allows calculations to work based on the sound being relative to the origin which makes things simpler. */ if (pRelativePos != NULL) { v = spatializerPosition; pRelativePos->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * 1; pRelativePos->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * 1; pRelativePos->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * 1; } /* The direction of the sound needs to also be transformed so that it's relative to the rotation of the listener. */ if (pRelativeDir != NULL) { v = spatializerDirection; pRelativeDir->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z; pRelativeDir->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z; pRelativeDir->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z; } } } /************************************************************************************************************************************************************** Resampling **************************************************************************************************************************************************************/ MA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_linear_resampler_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; config.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); config.lpfNyquistFactor = 1; return config; } typedef struct { size_t sizeInBytes; size_t x0Offset; size_t x1Offset; size_t lpfOffset; } ma_linear_resampler_heap_layout; static void ma_linear_resampler_adjust_timer_for_new_rate(ma_linear_resampler* pResampler, ma_uint32 oldSampleRateOut, ma_uint32 newSampleRateOut) { /* So what's happening here? Basically we need to adjust the fractional component of the time advance based on the new rate. The old time advance will be based on the old sample rate, but we are needing to adjust it to that it's based on the new sample rate. */ ma_uint32 oldRateTimeWhole = pResampler->inTimeFrac / oldSampleRateOut; /* <-- This should almost never be anything other than 0, but leaving it here to make this more general and robust just in case. */ ma_uint32 oldRateTimeFract = pResampler->inTimeFrac % oldSampleRateOut; pResampler->inTimeFrac = (oldRateTimeWhole * newSampleRateOut) + ((oldRateTimeFract * newSampleRateOut) / oldSampleRateOut); /* Make sure the fractional part is less than the output sample rate. */ pResampler->inTimeInt += pResampler->inTimeFrac / pResampler->config.sampleRateOut; pResampler->inTimeFrac = pResampler->inTimeFrac % pResampler->config.sampleRateOut; } static ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pResampler, void* pHeap, ma_linear_resampler_heap_layout* pHeapLayout, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_bool32 isResamplerAlreadyInitialized) { ma_result result; ma_uint32 gcf; ma_uint32 lpfSampleRate; double lpfCutoffFrequency; ma_lpf_config lpfConfig; ma_uint32 oldSampleRateOut; /* Required for adjusting time advance down the bottom. */ if (pResampler == NULL) { return MA_INVALID_ARGS; } if (sampleRateIn == 0 || sampleRateOut == 0) { return MA_INVALID_ARGS; } oldSampleRateOut = pResampler->config.sampleRateOut; pResampler->config.sampleRateIn = sampleRateIn; pResampler->config.sampleRateOut = sampleRateOut; /* Simplify the sample rate. */ gcf = ma_gcf_u32(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut); pResampler->config.sampleRateIn /= gcf; pResampler->config.sampleRateOut /= gcf; /* Always initialize the low-pass filter, even when the order is 0. */ if (pResampler->config.lpfOrder > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } lpfSampleRate = (ma_uint32)(ma_max(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut)); lpfCutoffFrequency = ( double)(ma_min(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut) * 0.5 * pResampler->config.lpfNyquistFactor); lpfConfig = ma_lpf_config_init(pResampler->config.format, pResampler->config.channels, lpfSampleRate, lpfCutoffFrequency, pResampler->config.lpfOrder); /* If the resampler is already initialized we don't want to do a fresh initialization of the low-pass filter because it will result in the cached frames getting cleared. Instead we re-initialize the filter which will maintain any cached frames. */ if (isResamplerAlreadyInitialized) { result = ma_lpf_reinit(&lpfConfig, &pResampler->lpf); } else { result = ma_lpf_init_preallocated(&lpfConfig, ma_offset_ptr(pHeap, pHeapLayout->lpfOffset), &pResampler->lpf); } if (result != MA_SUCCESS) { return result; } pResampler->inAdvanceInt = pResampler->config.sampleRateIn / pResampler->config.sampleRateOut; pResampler->inAdvanceFrac = pResampler->config.sampleRateIn % pResampler->config.sampleRateOut; /* Our timer was based on the old rate. We need to adjust it so that it's based on the new rate. */ ma_linear_resampler_adjust_timer_for_new_rate(pResampler, oldSampleRateOut, pResampler->config.sampleRateOut); return MA_SUCCESS; } static ma_result ma_linear_resampler_get_heap_layout(const ma_linear_resampler_config* pConfig, ma_linear_resampler_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* x0 */ pHeapLayout->x0Offset = pHeapLayout->sizeInBytes; if (pConfig->format == ma_format_f32) { pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; } else { pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels; } /* x1 */ pHeapLayout->x1Offset = pHeapLayout->sizeInBytes; if (pConfig->format == ma_format_f32) { pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; } else { pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels; } /* LPF */ pHeapLayout->lpfOffset = ma_align_64(pHeapLayout->sizeInBytes); { ma_result result; size_t lpfHeapSizeInBytes; ma_lpf_config lpfConfig = ma_lpf_config_init(pConfig->format, pConfig->channels, 1, 1, pConfig->lpfOrder); /* Sample rate and cutoff frequency do not matter. */ result = ma_lpf_get_heap_size(&lpfConfig, &lpfHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += lpfHeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_linear_resampler_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler) { ma_result result; ma_linear_resampler_heap_layout heapLayout; if (pResampler == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResampler); result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pResampler->config = *pConfig; pResampler->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); if (pConfig->format == ma_format_f32) { pResampler->x0.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x0Offset); pResampler->x1.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x1Offset); } else { pResampler->x0.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x0Offset); pResampler->x1.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x1Offset); } /* Setting the rate will set up the filter and time advances for us. */ result = ma_linear_resampler_set_rate_internal(pResampler, pHeap, &heapLayout, pConfig->sampleRateIn, pConfig->sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_FALSE); if (result != MA_SUCCESS) { return result; } pResampler->inTimeInt = 1; /* Set this to one to force an input sample to always be loaded for the first output frame. */ pResampler->inTimeFrac = 0; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_linear_resampler_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_linear_resampler_init_preallocated(pConfig, pHeap, pResampler); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pResampler->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks) { if (pResampler == NULL) { return; } ma_lpf_uninit(&pResampler->lpf, pAllocationCallbacks); if (pResampler->_ownsHeap) { ma_free(pResampler->_pHeap, pAllocationCallbacks); } } static MA_INLINE ma_int16 ma_linear_resampler_mix_s16(ma_int16 x, ma_int16 y, ma_int32 a, const ma_int32 shift) { ma_int32 b; ma_int32 c; ma_int32 r; MA_ASSERT(a <= (1<> shift); } static void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_int16* MA_RESTRICT pFrameOut) { ma_uint32 c; ma_uint32 a; const ma_uint32 channels = pResampler->config.channels; const ma_uint32 shift = 12; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameOut != NULL); a = (pResampler->inTimeFrac << shift) / pResampler->config.sampleRateOut; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int16 s = ma_linear_resampler_mix_s16(pResampler->x0.s16[c], pResampler->x1.s16[c], a, shift); pFrameOut[c] = s; } } static void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float* MA_RESTRICT pFrameOut) { ma_uint32 c; float a; const ma_uint32 channels = pResampler->config.channels; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameOut != NULL); a = (float)pResampler->inTimeFrac / pResampler->config.sampleRateOut; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float s = ma_mix_f32_fast(pResampler->x0.f32[c], pResampler->x1.f32[c], a); pFrameOut[c] = s; } } static ma_result ma_linear_resampler_process_pcm_frames_s16_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const ma_int16* pFramesInS16; /* */ ma_int16* pFramesOutS16; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInS16 = (const ma_int16*)pFramesIn; pFramesOutS16 = ( ma_int16*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInS16 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = pFramesInS16[iChannel]; } pFramesInS16 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = 0; } } /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pResampler->x1.s16, pResampler->x1.s16); } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */ if (pFramesOutS16 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16); pFramesOutS16 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_s16_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const ma_int16* pFramesInS16; /* */ ma_int16* pFramesOutS16; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInS16 = (const ma_int16*)pFramesIn; pFramesOutS16 = ( ma_int16*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInS16 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = pFramesInS16[iChannel]; } pFramesInS16 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = 0; } } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and we can generate the next output frame. */ if (pFramesOutS16 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16); /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_s16(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pResampler != NULL); if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) { return ma_linear_resampler_process_pcm_frames_s16_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { return ma_linear_resampler_process_pcm_frames_s16_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } static ma_result ma_linear_resampler_process_pcm_frames_f32_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const float* pFramesInF32; /* */ float* pFramesOutF32; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInF32 = (const float*)pFramesIn; pFramesOutF32 = ( float*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInF32 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = pFramesInF32[iChannel]; } pFramesInF32 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = 0; } } /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pResampler->x1.f32, pResampler->x1.f32); } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */ if (pFramesOutF32 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32); pFramesOutF32 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_f32_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const float* pFramesInF32; /* */ float* pFramesOutF32; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInF32 = (const float*)pFramesIn; pFramesOutF32 = ( float*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInF32 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = pFramesInF32[iChannel]; } pFramesInF32 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = 0; } } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and we can generate the next output frame. */ if (pFramesOutF32 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32); /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_f32(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pResampler != NULL); if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) { return ma_linear_resampler_process_pcm_frames_f32_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { return ma_linear_resampler_process_pcm_frames_f32_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } MA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pResampler == NULL) { return MA_INVALID_ARGS; } /* */ if (pResampler->config.format == ma_format_s16) { return ma_linear_resampler_process_pcm_frames_s16(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else if (pResampler->config.format == ma_format_f32) { return ma_linear_resampler_process_pcm_frames_f32(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { /* Should never get here. Getting here means the format is not supported and you didn't check the return value of ma_linear_resampler_init(). */ MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; } } MA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { return ma_linear_resampler_set_rate_internal(pResampler, NULL, NULL, sampleRateIn, sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_TRUE); } MA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut) { ma_uint32 n; ma_uint32 d; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (ratioInOut <= 0) { return MA_INVALID_ARGS; } d = 1000000; n = (ma_uint32)(ratioInOut * d); if (n == 0) { return MA_INVALID_ARGS; /* Ratio too small. */ } MA_ASSERT(n != 0); return ma_linear_resampler_set_rate(pResampler, n, d); } MA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler) { if (pResampler == NULL) { return 0; } return 1 + ma_lpf_get_latency(&pResampler->lpf); } MA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler) { if (pResampler == NULL) { return 0; } return ma_linear_resampler_get_input_latency(pResampler) * pResampler->config.sampleRateOut / pResampler->config.sampleRateIn; } MA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { ma_uint64 inputFrameCount; if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (outputFrameCount == 0) { return MA_SUCCESS; } /* Any whole input frames are consumed before the first output frame is generated. */ inputFrameCount = pResampler->inTimeInt; outputFrameCount -= 1; /* The rest of the output frames can be calculated in constant time. */ inputFrameCount += outputFrameCount * pResampler->inAdvanceInt; inputFrameCount += (pResampler->inTimeFrac + (outputFrameCount * pResampler->inAdvanceFrac)) / pResampler->config.sampleRateOut; *pInputFrameCount = inputFrameCount; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { ma_uint64 outputFrameCount; ma_uint64 preliminaryInputFrameCountFromFrac; ma_uint64 preliminaryInputFrameCount; if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } /* The first step is to get a preliminary output frame count. This will either be exactly equal to what we need, or less by 1. We need to determine how many input frames will be consumed by this value. If it's greater than our original input frame count it means we won't be able to generate an extra frame because we will have run out of input data. Otherwise we will have enough input for the generation of an extra output frame. This add-by-one logic is necessary due to how the data loading logic works when processing frames. */ outputFrameCount = (inputFrameCount * pResampler->config.sampleRateOut) / pResampler->config.sampleRateIn; /* We need to determine how many *whole* input frames will have been processed to generate our preliminary output frame count. This is used in the logic below to determine whether or not we need to add an extra output frame. */ preliminaryInputFrameCountFromFrac = (pResampler->inTimeFrac + outputFrameCount*pResampler->inAdvanceFrac) / pResampler->config.sampleRateOut; preliminaryInputFrameCount = (pResampler->inTimeInt + outputFrameCount*pResampler->inAdvanceInt ) + preliminaryInputFrameCountFromFrac; /* If the total number of *whole* input frames that would be required to generate our preliminary output frame count is greater than the amount of whole input frames we have available as input we need to *not* add an extra output frame as there won't be enough data to actually process. Otherwise we need to add the extra output frame. */ if (preliminaryInputFrameCount <= inputFrameCount) { outputFrameCount += 1; } *pOutputFrameCount = outputFrameCount; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler) { ma_uint32 iChannel; if (pResampler == NULL) { return MA_INVALID_ARGS; } /* Timers need to be cleared back to zero. */ pResampler->inTimeInt = 1; /* Set this to one to force an input sample to always be loaded for the first output frame. */ pResampler->inTimeFrac = 0; /* Cached samples need to be cleared. */ if (pResampler->config.format == ma_format_f32) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = 0; pResampler->x1.f32[iChannel] = 0; } } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = 0; pResampler->x1.s16[iChannel] = 0; } } /* The low pass filter needs to have its cache reset. */ ma_lpf_clear_cache(&pResampler->lpf); return MA_SUCCESS; } /* Linear resampler backend vtable. */ static ma_linear_resampler_config ma_resampling_backend_get_config__linear(const ma_resampler_config* pConfig) { ma_linear_resampler_config linearConfig; linearConfig = ma_linear_resampler_config_init(pConfig->format, pConfig->channels, pConfig->sampleRateIn, pConfig->sampleRateOut); linearConfig.lpfOrder = pConfig->linear.lpfOrder; return linearConfig; } static ma_result ma_resampling_backend_get_heap_size__linear(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_linear_resampler_config linearConfig; (void)pUserData; linearConfig = ma_resampling_backend_get_config__linear(pConfig); return ma_linear_resampler_get_heap_size(&linearConfig, pHeapSizeInBytes); } static ma_result ma_resampling_backend_init__linear(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend) { ma_resampler* pResampler = (ma_resampler*)pUserData; ma_result result; ma_linear_resampler_config linearConfig; (void)pUserData; linearConfig = ma_resampling_backend_get_config__linear(pConfig); result = ma_linear_resampler_init_preallocated(&linearConfig, pHeap, &pResampler->state.linear); if (result != MA_SUCCESS) { return result; } *ppBackend = &pResampler->state.linear; return MA_SUCCESS; } static void ma_resampling_backend_uninit__linear(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { (void)pUserData; ma_linear_resampler_uninit((ma_linear_resampler*)pBackend, pAllocationCallbacks); } static ma_result ma_resampling_backend_process__linear(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { (void)pUserData; return ma_linear_resampler_process_pcm_frames((ma_linear_resampler*)pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } static ma_result ma_resampling_backend_set_rate__linear(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { (void)pUserData; return ma_linear_resampler_set_rate((ma_linear_resampler*)pBackend, sampleRateIn, sampleRateOut); } static ma_uint64 ma_resampling_backend_get_input_latency__linear(void* pUserData, const ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_get_input_latency((const ma_linear_resampler*)pBackend); } static ma_uint64 ma_resampling_backend_get_output_latency__linear(void* pUserData, const ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_get_output_latency((const ma_linear_resampler*)pBackend); } static ma_result ma_resampling_backend_get_required_input_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { (void)pUserData; return ma_linear_resampler_get_required_input_frame_count((const ma_linear_resampler*)pBackend, outputFrameCount, pInputFrameCount); } static ma_result ma_resampling_backend_get_expected_output_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { (void)pUserData; return ma_linear_resampler_get_expected_output_frame_count((const ma_linear_resampler*)pBackend, inputFrameCount, pOutputFrameCount); } static ma_result ma_resampling_backend_reset__linear(void* pUserData, ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_reset((ma_linear_resampler*)pBackend); } static ma_resampling_backend_vtable g_ma_linear_resampler_vtable = { ma_resampling_backend_get_heap_size__linear, ma_resampling_backend_init__linear, ma_resampling_backend_uninit__linear, ma_resampling_backend_process__linear, ma_resampling_backend_set_rate__linear, ma_resampling_backend_get_input_latency__linear, ma_resampling_backend_get_output_latency__linear, ma_resampling_backend_get_required_input_frame_count__linear, ma_resampling_backend_get_expected_output_frame_count__linear, ma_resampling_backend_reset__linear }; MA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm) { ma_resampler_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; config.algorithm = algorithm; /* Linear. */ config.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); return config; } static ma_result ma_resampler_get_vtable(const ma_resampler_config* pConfig, ma_resampler* pResampler, ma_resampling_backend_vtable** ppVTable, void** ppUserData) { MA_ASSERT(pConfig != NULL); MA_ASSERT(ppVTable != NULL); MA_ASSERT(ppUserData != NULL); /* Safety. */ *ppVTable = NULL; *ppUserData = NULL; switch (pConfig->algorithm) { case ma_resample_algorithm_linear: { *ppVTable = &g_ma_linear_resampler_vtable; *ppUserData = pResampler; } break; case ma_resample_algorithm_custom: { *ppVTable = pConfig->pBackendVTable; *ppUserData = pConfig->pBackendUserData; } break; default: return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_resampling_backend_vtable* pVTable; void* pVTableUserData; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_resampler_get_vtable(pConfig, NULL, &pVTable, &pVTableUserData); if (result != MA_SUCCESS) { return result; } if (pVTable == NULL || pVTable->onGetHeapSize == NULL) { return MA_NOT_IMPLEMENTED; } result = pVTable->onGetHeapSize(pVTableUserData, pConfig, pHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler) { ma_result result; if (pResampler == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResampler); if (pConfig == NULL) { return MA_INVALID_ARGS; } pResampler->_pHeap = pHeap; pResampler->format = pConfig->format; pResampler->channels = pConfig->channels; pResampler->sampleRateIn = pConfig->sampleRateIn; pResampler->sampleRateOut = pConfig->sampleRateOut; result = ma_resampler_get_vtable(pConfig, pResampler, &pResampler->pBackendVTable, &pResampler->pBackendUserData); if (result != MA_SUCCESS) { return result; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onInit == NULL) { return MA_NOT_IMPLEMENTED; /* onInit not implemented. */ } result = pResampler->pBackendVTable->onInit(pResampler->pBackendUserData, pConfig, pHeap, &pResampler->pBackend); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_resampler_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_resampler_init_preallocated(pConfig, pHeap, pResampler); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pResampler->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks) { if (pResampler == NULL) { return; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onUninit == NULL) { return; } pResampler->pBackendVTable->onUninit(pResampler->pBackendUserData, pResampler->pBackend, pAllocationCallbacks); if (pResampler->_ownsHeap) { ma_free(pResampler->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pFrameCountOut == NULL && pFrameCountIn == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onProcess == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onProcess(pResampler->pBackendUserData, pResampler->pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } MA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_result result; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (sampleRateIn == 0 || sampleRateOut == 0) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onSetRate == NULL) { return MA_NOT_IMPLEMENTED; } result = pResampler->pBackendVTable->onSetRate(pResampler->pBackendUserData, pResampler->pBackend, sampleRateIn, sampleRateOut); if (result != MA_SUCCESS) { return result; } pResampler->sampleRateIn = sampleRateIn; pResampler->sampleRateOut = sampleRateOut; return MA_SUCCESS; } MA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio) { ma_uint32 n; ma_uint32 d; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (ratio <= 0) { return MA_INVALID_ARGS; } d = 1000; n = (ma_uint32)(ratio * d); if (n == 0) { return MA_INVALID_ARGS; /* Ratio too small. */ } MA_ASSERT(n != 0); return ma_resampler_set_rate(pResampler, n, d); } MA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler) { if (pResampler == NULL) { return 0; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetInputLatency == NULL) { return 0; } return pResampler->pBackendVTable->onGetInputLatency(pResampler->pBackendUserData, pResampler->pBackend); } MA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler) { if (pResampler == NULL) { return 0; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetOutputLatency == NULL) { return 0; } return pResampler->pBackendVTable->onGetOutputLatency(pResampler->pBackendUserData, pResampler->pBackend); } MA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetRequiredInputFrameCount == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onGetRequiredInputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, outputFrameCount, pInputFrameCount); } MA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetExpectedOutputFrameCount == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onGetExpectedOutputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, inputFrameCount, pOutputFrameCount); } MA_API ma_result ma_resampler_reset(ma_resampler* pResampler) { if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onReset == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onReset(pResampler->pBackendUserData, pResampler->pBackend); } /************************************************************************************************************************************************************** Channel Conversion **************************************************************************************************************************************************************/ #ifndef MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT #define MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT 12 #endif #define MA_PLANE_LEFT 0 #define MA_PLANE_RIGHT 1 #define MA_PLANE_FRONT 2 #define MA_PLANE_BACK 3 #define MA_PLANE_BOTTOM 4 #define MA_PLANE_TOP 5 static float g_maChannelPlaneRatios[MA_CHANNEL_POSITION_COUNT][6] = { { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_NONE */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_MONO */ { 0.5f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_LEFT */ { 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_RIGHT */ { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_CENTER */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_LFE */ { 0.5f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_LEFT */ { 0.0f, 0.5f, 0.0f, 0.5f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_RIGHT */ { 0.25f, 0.0f, 0.75f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_LEFT_CENTER */ { 0.0f, 0.25f, 0.75f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_RIGHT_CENTER */ { 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_CENTER */ { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_SIDE_LEFT */ { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_SIDE_RIGHT */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, /* MA_CHANNEL_TOP_CENTER */ { 0.33f, 0.0f, 0.33f, 0.0f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_FRONT_LEFT */ { 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.5f}, /* MA_CHANNEL_TOP_FRONT_CENTER */ { 0.0f, 0.33f, 0.33f, 0.0f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_FRONT_RIGHT */ { 0.33f, 0.0f, 0.0f, 0.33f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_BACK_LEFT */ { 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 0.5f}, /* MA_CHANNEL_TOP_BACK_CENTER */ { 0.0f, 0.33f, 0.0f, 0.33f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_BACK_RIGHT */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_0 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_1 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_2 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_3 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_4 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_5 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_6 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_7 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_8 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_9 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_10 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_11 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_12 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_13 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_14 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_15 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_16 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_17 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_18 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_19 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_20 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_21 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_22 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_23 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_24 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_25 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_26 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_27 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_28 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_29 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_30 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_31 */ }; static float ma_calculate_channel_position_rectangular_weight(ma_channel channelPositionA, ma_channel channelPositionB) { /* Imagine the following simplified example: You have a single input speaker which is the front/left speaker which you want to convert to the following output configuration: - front/left - side/left - back/left The front/left output is easy - it the same speaker position so it receives the full contribution of the front/left input. The amount of contribution to apply to the side/left and back/left speakers, however, is a bit more complicated. Imagine the front/left speaker as emitting audio from two planes - the front plane and the left plane. You can think of the front/left speaker emitting half of its total volume from the front, and the other half from the left. Since part of its volume is being emitted from the left side, and the side/left and back/left channels also emit audio from the left plane, one would expect that they would receive some amount of contribution from front/left speaker. The amount of contribution depends on how many planes are shared between the two speakers. Note that in the examples below I've added a top/front/left speaker as an example just to show how the math works across 3 spatial dimensions. The first thing to do is figure out how each speaker's volume is spread over each of plane: - front/left: 2 planes (front and left) = 1/2 = half its total volume on each plane - side/left: 1 plane (left only) = 1/1 = entire volume from left plane - back/left: 2 planes (back and left) = 1/2 = half its total volume on each plane - top/front/left: 3 planes (top, front and left) = 1/3 = one third its total volume on each plane The amount of volume each channel contributes to each of its planes is what controls how much it is willing to given and take to other channels on the same plane. The volume that is willing to the given by one channel is multiplied by the volume that is willing to be taken by the other to produce the final contribution. */ /* Contribution = Sum(Volume to Give * Volume to Take) */ float contribution = g_maChannelPlaneRatios[channelPositionA][0] * g_maChannelPlaneRatios[channelPositionB][0] + g_maChannelPlaneRatios[channelPositionA][1] * g_maChannelPlaneRatios[channelPositionB][1] + g_maChannelPlaneRatios[channelPositionA][2] * g_maChannelPlaneRatios[channelPositionB][2] + g_maChannelPlaneRatios[channelPositionA][3] * g_maChannelPlaneRatios[channelPositionB][3] + g_maChannelPlaneRatios[channelPositionA][4] * g_maChannelPlaneRatios[channelPositionB][4] + g_maChannelPlaneRatios[channelPositionA][5] * g_maChannelPlaneRatios[channelPositionB][5]; return contribution; } MA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode) { ma_channel_converter_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.pChannelMapIn = pChannelMapIn; config.pChannelMapOut = pChannelMapOut; config.mixingMode = mixingMode; return config; } static ma_int32 ma_channel_converter_float_to_fixed(float x) { return (ma_int32)(x * (1< 0); for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_is_spatial_channel_position(ma_channel_map_get_channel(pChannelMap, channels, iChannel))) { spatialChannelCount++; } } return spatialChannelCount; } static ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition) { int i; if (channelPosition == MA_CHANNEL_NONE || channelPosition == MA_CHANNEL_MONO || channelPosition == MA_CHANNEL_LFE) { return MA_FALSE; } if (channelPosition >= MA_CHANNEL_AUX_0 && channelPosition <= MA_CHANNEL_AUX_31) { return MA_FALSE; } for (i = 0; i < 6; ++i) { /* Each side of a cube. */ if (g_maChannelPlaneRatios[channelPosition][i] != 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_channel_map_is_passthrough(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut) { if (channelsOut == channelsIn) { return ma_channel_map_is_equal(pChannelMapOut, pChannelMapIn, channelsOut); } else { return MA_FALSE; /* Channel counts differ, so cannot be a passthrough. */ } } static ma_channel_conversion_path ma_channel_map_get_conversion_path(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, ma_channel_mix_mode mode) { if (ma_channel_map_is_passthrough(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut)) { return ma_channel_conversion_path_passthrough; } if (channelsOut == 1 && (pChannelMapOut == NULL || pChannelMapOut[0] == MA_CHANNEL_MONO)) { return ma_channel_conversion_path_mono_out; } if (channelsIn == 1 && (pChannelMapIn == NULL || pChannelMapIn[0] == MA_CHANNEL_MONO)) { return ma_channel_conversion_path_mono_in; } if (mode == ma_channel_mix_mode_custom_weights) { return ma_channel_conversion_path_weights; } /* We can use a simple shuffle if both channel maps have the same channel count and all channel positions are present in both. */ if (channelsIn == channelsOut) { ma_uint32 iChannelIn; ma_bool32 areAllChannelPositionsPresent = MA_TRUE; for (iChannelIn = 0; iChannelIn < channelsIn; ++iChannelIn) { ma_bool32 isInputChannelPositionInOutput = ma_channel_map_contains_channel_position(channelsOut, pChannelMapOut, ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn)); if (!isInputChannelPositionInOutput) { areAllChannelPositionsPresent = MA_FALSE; break; } } if (areAllChannelPositionsPresent) { return ma_channel_conversion_path_shuffle; } } /* Getting here means we'll need to use weights. */ return ma_channel_conversion_path_weights; } static ma_result ma_channel_map_build_shuffle_table(const ma_channel* pChannelMapIn, ma_uint32 channelCountIn, const ma_channel* pChannelMapOut, ma_uint32 channelCountOut, ma_uint8* pShuffleTable) { ma_uint32 iChannelIn; ma_uint32 iChannelOut; if (pShuffleTable == NULL || channelCountIn == 0 || channelCountOut == 0) { return MA_INVALID_ARGS; } /* When building the shuffle table we just do a 1:1 mapping based on the first occurrence of a channel. If the input channel has more than one occurrence of a channel position, the second one will be ignored. */ for (iChannelOut = 0; iChannelOut < channelCountOut; iChannelOut += 1) { ma_channel channelOut; /* Default to MA_CHANNEL_INDEX_NULL so that if a mapping is not found it'll be set appropriately. */ pShuffleTable[iChannelOut] = MA_CHANNEL_INDEX_NULL; channelOut = ma_channel_map_get_channel(pChannelMapOut, channelCountOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelCountIn; iChannelIn += 1) { ma_channel channelIn; channelIn = ma_channel_map_get_channel(pChannelMapIn, channelCountIn, iChannelIn); if (channelOut == channelIn) { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; break; } /* Getting here means the channels don't exactly match, but we are going to support some relaxed matching for practicality. If, for example, there are two stereo channel maps, but one uses front left/right and the other uses side left/right, it makes logical sense to just map these. The way we'll do it is we'll check if there is a logical corresponding mapping, and if so, apply it, but we will *not* break from the loop, thereby giving the loop a chance to find an exact match later which will take priority. */ switch (channelOut) { /* Left channels. */ case MA_CHANNEL_FRONT_LEFT: case MA_CHANNEL_SIDE_LEFT: { switch (channelIn) { case MA_CHANNEL_FRONT_LEFT: case MA_CHANNEL_SIDE_LEFT: { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; } break; } } break; /* Right channels. */ case MA_CHANNEL_FRONT_RIGHT: case MA_CHANNEL_SIDE_RIGHT: { switch (channelIn) { case MA_CHANNEL_FRONT_RIGHT: case MA_CHANNEL_SIDE_RIGHT: { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; } break; } } break; default: break; } } } return MA_SUCCESS; } static void ma_channel_map_apply_shuffle_table_u8(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_s16(ma_int16* pFramesOut, ma_uint32 channelsOut, const ma_int16* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_s24(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut*3 + 0] = pFramesIn[iChannelIn*3 + 0]; pFramesOut[iChannelOut*3 + 1] = pFramesIn[iChannelIn*3 + 1]; pFramesOut[iChannelOut*3 + 2] = pFramesIn[iChannelIn*3 + 2]; } else { pFramesOut[iChannelOut*3 + 0] = 0; } pFramesOut[iChannelOut*3 + 1] = 0; } pFramesOut[iChannelOut*3 + 2] = 0; pFramesOut += channelsOut*3; pFramesIn += channelsIn*3; } } static void ma_channel_map_apply_shuffle_table_s32(ma_int32* pFramesOut, ma_uint32 channelsOut, const ma_int32* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_f32(float* pFramesOut, ma_uint32 channelsOut, const float* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static ma_result ma_channel_map_apply_shuffle_table(void* pFramesOut, ma_uint32 channelsOut, const void* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable, ma_format format) { if (pFramesOut == NULL || pFramesIn == NULL || channelsOut == 0 || pShuffleTable == NULL) { return MA_INVALID_ARGS; } switch (format) { case ma_format_u8: { ma_channel_map_apply_shuffle_table_u8((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s16: { ma_channel_map_apply_shuffle_table_s16((ma_int16*)pFramesOut, channelsOut, (const ma_int16*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s24: { ma_channel_map_apply_shuffle_table_s24((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s32: { ma_channel_map_apply_shuffle_table_s32((ma_int32*)pFramesOut, channelsOut, (const ma_int32*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_f32: { ma_channel_map_apply_shuffle_table_f32((float*)pFramesOut, channelsOut, (const float*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; default: return MA_INVALID_ARGS; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_map_apply_mono_out_f32(float* pFramesOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannelIn; ma_uint32 accumulationCount; if (pFramesOut == NULL || pFramesIn == NULL || channelsIn == 0) { return MA_INVALID_ARGS; } /* In this case the output stream needs to be the average of all channels, ignoring NONE. */ /* A quick pre-processing step to get the accumulation counter since we're ignoring NONE channels. */ accumulationCount = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { if (ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn) != MA_CHANNEL_NONE) { accumulationCount += 1; } } if (accumulationCount > 0) { /* <-- Prevent a division by zero. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float accumulation = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); if (channelIn != MA_CHANNEL_NONE) { accumulation += pFramesIn[iChannelIn]; } } pFramesOut[0] = accumulation / accumulationCount; pFramesOut += 1; pFramesIn += channelsIn; } } else { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, 1); } return MA_SUCCESS; } static ma_result ma_channel_map_apply_mono_in_f32(float* MA_RESTRICT pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* MA_RESTRICT pFramesIn, ma_uint64 frameCount, ma_mono_expansion_mode monoExpansionMode) { ma_uint64 iFrame; ma_uint32 iChannelOut; if (pFramesOut == NULL || channelsOut == 0 || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the MA_CHANNEL_NONE channel must be ignored in all cases. */ switch (monoExpansionMode) { case ma_mono_expansion_mode_average: { float weight; ma_uint32 validChannelCount = 0; for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { validChannelCount += 1; } } weight = 1.0f / validChannelCount; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { pFramesOut[iChannelOut] = pFramesIn[0] * weight; } } pFramesOut += channelsOut; pFramesIn += 1; } } break; case ma_mono_expansion_mode_stereo_only: { if (channelsOut >= 2) { ma_uint32 iChannelLeft = (ma_uint32)-1; ma_uint32 iChannelRight = (ma_uint32)-1; /* We first need to find our stereo channels. We prefer front-left and front-right, but if they're not available, we'll also try side-left and side-right. If neither are available we'll fall through to the default case below. */ for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut == MA_CHANNEL_SIDE_LEFT) { iChannelLeft = iChannelOut; } if (channelOut == MA_CHANNEL_SIDE_RIGHT) { iChannelRight = iChannelOut; } } for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut == MA_CHANNEL_FRONT_LEFT) { iChannelLeft = iChannelOut; } if (channelOut == MA_CHANNEL_FRONT_RIGHT) { iChannelRight = iChannelOut; } } if (iChannelLeft != (ma_uint32)-1 && iChannelRight != (ma_uint32)-1) { /* We found our stereo channels so we can duplicate the signal across those channels. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { if (iChannelOut == iChannelLeft || iChannelOut == iChannelRight) { pFramesOut[iChannelOut] = pFramesIn[0]; } else { pFramesOut[iChannelOut] = 0.0f; } } } pFramesOut += channelsOut; pFramesIn += 1; } break; /* Get out of the switch. */ } else { /* Fallthrough. Does not have left and right channels. */ goto default_handler; } } else { /* Fallthrough. Does not have stereo channels. */ goto default_handler; } }; /* Fallthrough. See comments above. */ case ma_mono_expansion_mode_duplicate: default: { default_handler: { if (channelsOut <= MA_MAX_CHANNELS) { ma_bool32 hasEmptyChannel = MA_FALSE; ma_channel channelPositions[MA_MAX_CHANNELS]; for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { channelPositions[iChannelOut] = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelPositions[iChannelOut] == MA_CHANNEL_NONE) { hasEmptyChannel = MA_TRUE; } } if (hasEmptyChannel == MA_FALSE) { /* Faster path when there's no MA_CHANNEL_NONE channel positions. This should hopefully help the compiler with auto-vectorization.m */ if (channelsOut == 2) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* We want to do two frames in each iteration. */ ma_uint64 unrolledFrameCount = frameCount >> 1; for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) { __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]); __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]); _mm_storeu_ps(&pFramesOut[iFrame*4 + 0], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0))); } /* Tail. */ iFrame = unrolledFrameCount << 1; goto generic_on_fastpath; } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 2; iChannelOut += 1) { pFramesOut[iFrame*2 + iChannelOut] = pFramesIn[iFrame]; } } } } else if (channelsOut == 6) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* We want to do two frames in each iteration so we can have a multiple of 4 samples. */ ma_uint64 unrolledFrameCount = frameCount >> 1; for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) { __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]); __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]); _mm_storeu_ps(&pFramesOut[iFrame*12 + 0], in0); _mm_storeu_ps(&pFramesOut[iFrame*12 + 4], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0))); _mm_storeu_ps(&pFramesOut[iFrame*12 + 8], in1); } /* Tail. */ iFrame = unrolledFrameCount << 1; goto generic_on_fastpath; } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 6; iChannelOut += 1) { pFramesOut[iFrame*6 + iChannelOut] = pFramesIn[iFrame]; } } } } else if (channelsOut == 8) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { __m128 in = _mm_set1_ps(pFramesIn[iFrame]); _mm_storeu_ps(&pFramesOut[iFrame*8 + 0], in); _mm_storeu_ps(&pFramesOut[iFrame*8 + 4], in); } } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 8; iChannelOut += 1) { pFramesOut[iFrame*8 + iChannelOut] = pFramesIn[iFrame]; } } } } else { iFrame = 0; #if defined(MA_SUPPORT_SSE2) /* For silencing a warning with non-x86 builds. */ generic_on_fastpath: #endif { for (; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } else { /* Slow path. Need to handle MA_CHANNEL_NONE. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { if (channelPositions[iChannelOut] != MA_CHANNEL_NONE) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } else { /* Slow path. Too many channels to store on the stack. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } } break; } return MA_SUCCESS; } static void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode) { ma_channel_conversion_path conversionPath = ma_channel_map_get_conversion_path(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, mode); /* Optimized Path: Passthrough */ if (conversionPath == ma_channel_conversion_path_passthrough) { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, channelsOut); return; } /* Special Path: Mono Output. */ if (conversionPath == ma_channel_conversion_path_mono_out) { ma_channel_map_apply_mono_out_f32(pFramesOut, pFramesIn, pChannelMapIn, channelsIn, frameCount); return; } /* Special Path: Mono Input. */ if (conversionPath == ma_channel_conversion_path_mono_in) { ma_channel_map_apply_mono_in_f32(pFramesOut, pChannelMapOut, channelsOut, pFramesIn, frameCount, monoExpansionMode); return; } /* Getting here means we aren't running on an optimized conversion path. */ if (channelsOut <= MA_MAX_CHANNELS) { ma_result result; if (mode == ma_channel_mix_mode_simple) { ma_channel shuffleTable[MA_MAX_CHANNELS]; result = ma_channel_map_build_shuffle_table(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, shuffleTable); if (result != MA_SUCCESS) { return; } result = ma_channel_map_apply_shuffle_table(pFramesOut, channelsOut, pFramesIn, channelsIn, frameCount, shuffleTable, ma_format_f32); if (result != MA_SUCCESS) { return; } } else { ma_uint32 iFrame; ma_uint32 iChannelOut; ma_uint32 iChannelIn; float weights[32][32]; /* Do not use MA_MAX_CHANNELS here! */ /* If we have a small enough number of channels, pre-compute the weights. Otherwise we'll just need to fall back to a slower path because otherwise we'll run out of stack space. */ if (channelsIn <= ma_countof(weights) && channelsOut <= ma_countof(weights)) { /* Pre-compute weights. */ for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); weights[iChannelOut][iChannelIn] = ma_calculate_channel_position_rectangular_weight(channelOut, channelIn); } } iFrame = 0; /* Experiment: Try an optimized unroll for some specific cases to see how it improves performance. RESULT: Good gains. */ if (channelsOut == 8) { /* Experiment 2: Expand the inner loop to see what kind of different it makes. RESULT: Small, but worthwhile gain. */ if (channelsIn == 2) { for (; iFrame < frameCount; iFrame += 1) { float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; accumulation[0] += pFramesIn[iFrame*2 + 0] * weights[0][0]; accumulation[1] += pFramesIn[iFrame*2 + 0] * weights[1][0]; accumulation[2] += pFramesIn[iFrame*2 + 0] * weights[2][0]; accumulation[3] += pFramesIn[iFrame*2 + 0] * weights[3][0]; accumulation[4] += pFramesIn[iFrame*2 + 0] * weights[4][0]; accumulation[5] += pFramesIn[iFrame*2 + 0] * weights[5][0]; accumulation[6] += pFramesIn[iFrame*2 + 0] * weights[6][0]; accumulation[7] += pFramesIn[iFrame*2 + 0] * weights[7][0]; accumulation[0] += pFramesIn[iFrame*2 + 1] * weights[0][1]; accumulation[1] += pFramesIn[iFrame*2 + 1] * weights[1][1]; accumulation[2] += pFramesIn[iFrame*2 + 1] * weights[2][1]; accumulation[3] += pFramesIn[iFrame*2 + 1] * weights[3][1]; accumulation[4] += pFramesIn[iFrame*2 + 1] * weights[4][1]; accumulation[5] += pFramesIn[iFrame*2 + 1] * weights[5][1]; accumulation[6] += pFramesIn[iFrame*2 + 1] * weights[6][1]; accumulation[7] += pFramesIn[iFrame*2 + 1] * weights[7][1]; pFramesOut[iFrame*8 + 0] = accumulation[0]; pFramesOut[iFrame*8 + 1] = accumulation[1]; pFramesOut[iFrame*8 + 2] = accumulation[2]; pFramesOut[iFrame*8 + 3] = accumulation[3]; pFramesOut[iFrame*8 + 4] = accumulation[4]; pFramesOut[iFrame*8 + 5] = accumulation[5]; pFramesOut[iFrame*8 + 6] = accumulation[6]; pFramesOut[iFrame*8 + 7] = accumulation[7]; } } else { /* When outputting to 8 channels, we can do everything in groups of two 4x SIMD operations. */ for (; iFrame < frameCount; iFrame += 1) { float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn]; accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn]; accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn]; accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn]; accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn]; accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn]; accumulation[6] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[6][iChannelIn]; accumulation[7] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[7][iChannelIn]; } pFramesOut[iFrame*8 + 0] = accumulation[0]; pFramesOut[iFrame*8 + 1] = accumulation[1]; pFramesOut[iFrame*8 + 2] = accumulation[2]; pFramesOut[iFrame*8 + 3] = accumulation[3]; pFramesOut[iFrame*8 + 4] = accumulation[4]; pFramesOut[iFrame*8 + 5] = accumulation[5]; pFramesOut[iFrame*8 + 6] = accumulation[6]; pFramesOut[iFrame*8 + 7] = accumulation[7]; } } } else if (channelsOut == 6) { /* When outputting to 6 channels we unfortunately don't have a nice multiple of 4 to do 4x SIMD operations. Instead we'll expand our weights and do two frames at a time. */ for (; iFrame < frameCount; iFrame += 1) { float accumulation[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn]; accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn]; accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn]; accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn]; accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn]; accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn]; } pFramesOut[iFrame*6 + 0] = accumulation[0]; pFramesOut[iFrame*6 + 1] = accumulation[1]; pFramesOut[iFrame*6 + 2] = accumulation[2]; pFramesOut[iFrame*6 + 3] = accumulation[3]; pFramesOut[iFrame*6 + 4] = accumulation[4]; pFramesOut[iFrame*6 + 5] = accumulation[5]; } } /* Leftover frames. */ for (; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { float accumulation = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[iChannelOut][iChannelIn]; } pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation; } } } else { /* Cannot pre-compute weights because not enough room in stack-allocated buffer. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { float accumulation = 0; ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * ma_calculate_channel_position_rectangular_weight(channelOut, channelIn); } pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation; } } } } } else { /* Fall back to silence. If you hit this, what are you doing with so many channels?! */ ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, channelsOut); } } typedef struct { size_t sizeInBytes; size_t channelMapInOffset; size_t channelMapOutOffset; size_t shuffleTableOffset; size_t weightsOffset; } ma_channel_converter_heap_layout; static ma_channel_conversion_path ma_channel_converter_config_get_conversion_path(const ma_channel_converter_config* pConfig) { return ma_channel_map_get_conversion_path(pConfig->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapOut, pConfig->channelsOut, pConfig->mixingMode); } static ma_result ma_channel_converter_get_heap_layout(const ma_channel_converter_config* pConfig, ma_channel_converter_heap_layout* pHeapLayout) { ma_channel_conversion_path conversionPath; MA_ASSERT(pHeapLayout != NULL); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } if (!ma_channel_map_is_valid(pConfig->pChannelMapIn, pConfig->channelsIn)) { return MA_INVALID_ARGS; } if (!ma_channel_map_is_valid(pConfig->pChannelMapOut, pConfig->channelsOut)) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Input channel map. Only need to allocate this if we have an input channel map (otherwise default channel map is assumed). */ pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes; if (pConfig->pChannelMapIn != NULL) { pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsIn; } /* Output channel map. Only need to allocate this if we have an output channel map (otherwise default channel map is assumed). */ pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes; if (pConfig->pChannelMapOut != NULL) { pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsOut; } /* Alignment for the next section. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); /* Whether or not we use weights of a shuffle table depends on the channel map themselves and the algorithm we've chosen. */ conversionPath = ma_channel_converter_config_get_conversion_path(pConfig); /* Shuffle table */ pHeapLayout->shuffleTableOffset = pHeapLayout->sizeInBytes; if (conversionPath == ma_channel_conversion_path_shuffle) { pHeapLayout->sizeInBytes += sizeof(ma_uint8) * pConfig->channelsOut; } /* Weights */ pHeapLayout->weightsOffset = pHeapLayout->sizeInBytes; if (conversionPath == ma_channel_conversion_path_weights) { pHeapLayout->sizeInBytes += sizeof(float*) * pConfig->channelsIn; pHeapLayout->sizeInBytes += sizeof(float ) * pConfig->channelsIn * pConfig->channelsOut; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_channel_converter_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter) { ma_result result; ma_channel_converter_heap_layout heapLayout; if (pConverter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pConverter); result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pConverter->_pHeap = pHeap; MA_ZERO_MEMORY(pConverter->_pHeap, heapLayout.sizeInBytes); pConverter->format = pConfig->format; pConverter->channelsIn = pConfig->channelsIn; pConverter->channelsOut = pConfig->channelsOut; pConverter->mixingMode = pConfig->mixingMode; if (pConfig->pChannelMapIn != NULL) { pConverter->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset); ma_channel_map_copy_or_default(pConverter->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsIn); } else { pConverter->pChannelMapIn = NULL; /* Use default channel map. */ } if (pConfig->pChannelMapOut != NULL) { pConverter->pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset); ma_channel_map_copy_or_default(pConverter->pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut); } else { pConverter->pChannelMapOut = NULL; /* Use default channel map. */ } pConverter->conversionPath = ma_channel_converter_config_get_conversion_path(pConfig); if (pConverter->conversionPath == ma_channel_conversion_path_shuffle) { pConverter->pShuffleTable = (ma_uint8*)ma_offset_ptr(pHeap, heapLayout.shuffleTableOffset); ma_channel_map_build_shuffle_table(pConverter->pChannelMapIn, pConverter->channelsIn, pConverter->pChannelMapOut, pConverter->channelsOut, pConverter->pShuffleTable); } if (pConverter->conversionPath == ma_channel_conversion_path_weights) { ma_uint32 iChannelIn; ma_uint32 iChannelOut; if (pConverter->format == ma_format_f32) { pConverter->weights.f32 = (float** )ma_offset_ptr(pHeap, heapLayout.weightsOffset); for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { pConverter->weights.f32[iChannelIn] = (float*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(float*) * pConverter->channelsIn) + (sizeof(float) * pConverter->channelsOut * iChannelIn))); } } else { pConverter->weights.s16 = (ma_int32**)ma_offset_ptr(pHeap, heapLayout.weightsOffset); for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { pConverter->weights.s16[iChannelIn] = (ma_int32*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(ma_int32*) * pConverter->channelsIn) + (sizeof(ma_int32) * pConverter->channelsOut * iChannelIn))); } } /* Silence our weights by default. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) { if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = 0.0f; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = 0; } } } /* We now need to fill out our weights table. This is determined by the mixing mode. */ /* In all cases we need to make sure all channels that are present in both channel maps have a 1:1 mapping. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (channelPosIn == channelPosOut) { float weight = 1; if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } switch (pConverter->mixingMode) { case ma_channel_mix_mode_custom_weights: { if (pConfig->ppWeights == NULL) { return MA_INVALID_ARGS; /* Config specified a custom weights mixing mode, but no custom weights have been specified. */ } for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) { float weight = pConfig->ppWeights[iChannelIn][iChannelOut]; if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } break; case ma_channel_mix_mode_simple: { /* In simple mode, only set weights for channels that have exactly matching types, leave the rest at zero. The 1:1 mappings have already been covered before this switch statement. */ } break; case ma_channel_mix_mode_rectangular: default: { /* Unmapped input channels. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { if (!ma_channel_map_contains_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, channelPosIn)) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (ma_is_spatial_channel_position(channelPosOut)) { float weight = 0; if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) { weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut); } /* Only apply the weight if we haven't already got some contribution from the respective channels. */ if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } } } } /* Unmapped output channels. */ for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (ma_is_spatial_channel_position(channelPosOut)) { if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, channelPosOut)) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { float weight = 0; if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) { weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut); } /* Only apply the weight if we haven't already got some contribution from the respective channels. */ if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } } } } /* If LFE is in the output channel map but was not present in the input channel map, configure its weight now */ if (pConfig->calculateLFEFromSpatialChannels) { if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, MA_CHANNEL_LFE)) { ma_uint32 spatialChannelCount = ma_channel_map_get_spatial_channel_count(pConverter->pChannelMapIn, pConverter->channelsIn); ma_uint32 iChannelOutLFE; if (spatialChannelCount > 0 && ma_channel_map_find_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, MA_CHANNEL_LFE, &iChannelOutLFE)) { const float weightForLFE = 1.0f / spatialChannelCount; for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { const ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOutLFE] == 0) { pConverter->weights.f32[iChannelIn][iChannelOutLFE] = weightForLFE; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOutLFE] == 0) { pConverter->weights.s16[iChannelIn][iChannelOutLFE] = ma_channel_converter_float_to_fixed(weightForLFE); } } } } } } } } break; } } return MA_SUCCESS; } MA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_channel_converter_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_channel_converter_init_preallocated(pConfig, pHeap, pConverter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pConverter->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pConverter == NULL) { return; } if (pConverter->_ownsHeap) { ma_free(pConverter->_pHeap, pAllocationCallbacks); } } static ma_result ma_channel_converter_process_pcm_frames__passthrough(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__shuffle(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsIn == pConverter->channelsOut); return ma_channel_map_apply_shuffle_table(pFramesOut, pConverter->channelsOut, pFramesIn, pConverter->channelsIn, frameCount, pConverter->pShuffleTable, pConverter->format); } static ma_result ma_channel_converter_process_pcm_frames__mono_in(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsIn == 1); switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutU8[iFrame*pConverter->channelsOut + iChannel] = pFramesInU8[iFrame]; } } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; if (pConverter->channelsOut == 2) { for (iFrame = 0; iFrame < frameCount; ++iFrame) { pFramesOutS16[iFrame*2 + 0] = pFramesInS16[iFrame]; pFramesOutS16[iFrame*2 + 1] = pFramesInS16[iFrame]; } } else { for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutS16[iFrame*pConverter->channelsOut + iChannel] = pFramesInS16[iFrame]; } } } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { ma_uint64 iSampleOut = iFrame*pConverter->channelsOut + iChannel; ma_uint64 iSampleIn = iFrame; pFramesOutS24[iSampleOut*3 + 0] = pFramesInS24[iSampleIn*3 + 0]; pFramesOutS24[iSampleOut*3 + 1] = pFramesInS24[iSampleIn*3 + 1]; pFramesOutS24[iSampleOut*3 + 2] = pFramesInS24[iSampleIn*3 + 2]; } } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutS32[iFrame*pConverter->channelsOut + iChannel] = pFramesInS32[iFrame]; } } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; if (pConverter->channelsOut == 2) { for (iFrame = 0; iFrame < frameCount; ++iFrame) { pFramesOutF32[iFrame*2 + 0] = pFramesInF32[iFrame]; pFramesOutF32[iFrame*2 + 1] = pFramesInF32[iFrame]; } } else { for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutF32[iFrame*pConverter->channelsOut + iChannel] = pFramesInF32[iFrame]; } } } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__mono_out(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsOut == 1); switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int32 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8[iFrame*pConverter->channelsIn + iChannel]); } pFramesOutU8[iFrame] = ma_clip_u8(t / pConverter->channelsOut); } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int32 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInS16[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutS16[iFrame] = (ma_int16)(t / pConverter->channelsIn); } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int64 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24[(iFrame*pConverter->channelsIn + iChannel)*3]); } ma_pcm_sample_s32_to_s24_no_scale(t / pConverter->channelsIn, &pFramesOutS24[iFrame*3]); } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int64 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInS32[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutS32[iFrame] = (ma_int32)(t / pConverter->channelsIn); } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { float t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInF32[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutF32[iFrame] = t / pConverter->channelsIn; } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__weights(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 iFrame; ma_uint32 iChannelIn; ma_uint32 iChannelOut; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); /* This is the more complicated case. Each of the output channels is accumulated with 0 or more input channels. */ /* Clear. */ ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); /* Accumulate. */ switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int16 u8_O = ma_pcm_sample_u8_to_s16_no_scale(pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut]); ma_int16 u8_I = ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8 [iFrame*pConverter->channelsIn + iChannelIn ]); ma_int32 s = (ma_int32)ma_clamp(u8_O + ((u8_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -128, 127); pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_u8((ma_int16)s); } } } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int32 s = pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut]; s += (pFramesInS16[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT; pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut] = (ma_int16)ma_clamp(s, -32768, 32767); } } } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int64 s24_O = ma_pcm_sample_s24_to_s32_no_scale(&pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]); ma_int64 s24_I = ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24 [(iFrame*pConverter->channelsIn + iChannelIn )*3]); ma_int64 s24 = (ma_int32)ma_clamp(s24_O + ((s24_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -8388608, 8388607); ma_pcm_sample_s32_to_s24_no_scale(s24, &pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]); } } } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int64 s = pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut]; s += ((ma_int64)pFramesInS32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT; pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_s32(s); } } } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { pFramesOutF32[iFrame*pConverter->channelsOut + iChannelOut] += pFramesInF32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.f32[iChannelIn][iChannelOut]; } } } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } MA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pFramesOut == NULL) { return MA_INVALID_ARGS; } if (pFramesIn == NULL) { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); return MA_SUCCESS; } switch (pConverter->conversionPath) { case ma_channel_conversion_path_passthrough: return ma_channel_converter_process_pcm_frames__passthrough(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_mono_out: return ma_channel_converter_process_pcm_frames__mono_out(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_mono_in: return ma_channel_converter_process_pcm_frames__mono_in(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_shuffle: return ma_channel_converter_process_pcm_frames__shuffle(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_weights: default: { return ma_channel_converter_process_pcm_frames__weights(pConverter, pFramesOut, pFramesIn, frameCount); } } } MA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapIn, pConverter->channelsIn); return MA_SUCCESS; } MA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapOut, pConverter->channelsOut); return MA_SUCCESS; } /************************************************************************************************************************************************************** Data Conversion **************************************************************************************************************************************************************/ MA_API ma_data_converter_config ma_data_converter_config_init_default(void) { ma_data_converter_config config; MA_ZERO_OBJECT(&config); config.ditherMode = ma_dither_mode_none; config.resampling.algorithm = ma_resample_algorithm_linear; config.allowDynamicSampleRate = MA_FALSE; /* Disable dynamic sample rates by default because dynamic rate adjustments should be quite rare and it allows an optimization for cases when the in and out sample rates are the same. */ /* Linear resampling defaults. */ config.resampling.linear.lpfOrder = 1; return config; } MA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_data_converter_config config = ma_data_converter_config_init_default(); config.formatIn = formatIn; config.formatOut = formatOut; config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; return config; } typedef struct { size_t sizeInBytes; size_t channelConverterOffset; size_t resamplerOffset; } ma_data_converter_heap_layout; static ma_bool32 ma_data_converter_config_is_resampler_required(const ma_data_converter_config* pConfig) { MA_ASSERT(pConfig != NULL); return pConfig->allowDynamicSampleRate || pConfig->sampleRateIn != pConfig->sampleRateOut; } static ma_format ma_data_converter_config_get_mid_format(const ma_data_converter_config* pConfig) { MA_ASSERT(pConfig != NULL); /* We want to avoid as much data conversion as possible. The channel converter and linear resampler both support s16 and f32 natively. We need to decide on the format to use for this stage. We call this the mid format because it's used in the middle stage of the conversion pipeline. If the output format is either s16 or f32 we use that one. If that is not the case it will do the same thing for the input format. If it's neither we just use f32. If we are using a custom resampling backend, we can only guarantee that f32 will be supported so we'll be forced to use that if resampling is required. */ if (ma_data_converter_config_is_resampler_required(pConfig) && pConfig->resampling.algorithm != ma_resample_algorithm_linear) { return ma_format_f32; /* <-- Force f32 since that is the only one we can guarantee will be supported by the resampler. */ } else { /* */ if (pConfig->formatOut == ma_format_s16 || pConfig->formatOut == ma_format_f32) { return pConfig->formatOut; } else if (pConfig->formatIn == ma_format_s16 || pConfig->formatIn == ma_format_f32) { return pConfig->formatIn; } else { return ma_format_f32; } } } static ma_channel_converter_config ma_channel_converter_config_init_from_data_converter_config(const ma_data_converter_config* pConfig) { ma_channel_converter_config channelConverterConfig; MA_ASSERT(pConfig != NULL); channelConverterConfig = ma_channel_converter_config_init(ma_data_converter_config_get_mid_format(pConfig), pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelMixMode); channelConverterConfig.ppWeights = pConfig->ppChannelWeights; channelConverterConfig.calculateLFEFromSpatialChannels = pConfig->calculateLFEFromSpatialChannels; return channelConverterConfig; } static ma_resampler_config ma_resampler_config_init_from_data_converter_config(const ma_data_converter_config* pConfig) { ma_resampler_config resamplerConfig; ma_uint32 resamplerChannels; MA_ASSERT(pConfig != NULL); /* The resampler is the most expensive part of the conversion process, so we need to do it at the stage where the channel count is at it's lowest. */ if (pConfig->channelsIn < pConfig->channelsOut) { resamplerChannels = pConfig->channelsIn; } else { resamplerChannels = pConfig->channelsOut; } resamplerConfig = ma_resampler_config_init(ma_data_converter_config_get_mid_format(pConfig), resamplerChannels, pConfig->sampleRateIn, pConfig->sampleRateOut, pConfig->resampling.algorithm); resamplerConfig.linear = pConfig->resampling.linear; resamplerConfig.pBackendVTable = pConfig->resampling.pBackendVTable; resamplerConfig.pBackendUserData = pConfig->resampling.pBackendUserData; return resamplerConfig; } static ma_result ma_data_converter_get_heap_layout(const ma_data_converter_config* pConfig, ma_data_converter_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Channel converter. */ pHeapLayout->channelConverterOffset = pHeapLayout->sizeInBytes; { size_t heapSizeInBytes; ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig); result = ma_channel_converter_get_heap_size(&channelConverterConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += heapSizeInBytes; } /* Resampler. */ pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes; if (ma_data_converter_config_is_resampler_required(pConfig)) { size_t heapSizeInBytes; ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig); result = ma_resampler_get_heap_size(&resamplerConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += heapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_data_converter_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_data_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter) { ma_result result; ma_data_converter_heap_layout heapLayout; ma_format midFormat; ma_bool32 isResamplingRequired; if (pConverter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pConverter); result = ma_data_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pConverter->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pConverter->formatIn = pConfig->formatIn; pConverter->formatOut = pConfig->formatOut; pConverter->channelsIn = pConfig->channelsIn; pConverter->channelsOut = pConfig->channelsOut; pConverter->sampleRateIn = pConfig->sampleRateIn; pConverter->sampleRateOut = pConfig->sampleRateOut; pConverter->ditherMode = pConfig->ditherMode; /* Determine if resampling is required. We need to do this so we can determine an appropriate mid format to use. If resampling is required, the mid format must be ma_format_f32 since that is the only one that is guaranteed to supported by custom resampling backends. */ isResamplingRequired = ma_data_converter_config_is_resampler_required(pConfig); midFormat = ma_data_converter_config_get_mid_format(pConfig); /* Channel converter. We always initialize this, but we check if it configures itself as a passthrough to determine whether or not it's needed. */ { ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig); result = ma_channel_converter_init_preallocated(&channelConverterConfig, ma_offset_ptr(pHeap, heapLayout.channelConverterOffset), &pConverter->channelConverter); if (result != MA_SUCCESS) { return result; } /* If the channel converter is not a passthrough we need to enable it. Otherwise we can skip it. */ if (pConverter->channelConverter.conversionPath != ma_channel_conversion_path_passthrough) { pConverter->hasChannelConverter = MA_TRUE; } } /* Resampler. */ if (isResamplingRequired) { ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig); result = ma_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pConverter->resampler); if (result != MA_SUCCESS) { return result; } pConverter->hasResampler = MA_TRUE; } /* We can simplify pre- and post-format conversion if we have neither channel conversion nor resampling. */ if (pConverter->hasChannelConverter == MA_FALSE && pConverter->hasResampler == MA_FALSE) { /* We have neither channel conversion nor resampling so we'll only need one of pre- or post-format conversion, or none if the input and output formats are the same. */ if (pConverter->formatIn == pConverter->formatOut) { /* The formats are the same so we can just pass through. */ pConverter->hasPreFormatConversion = MA_FALSE; pConverter->hasPostFormatConversion = MA_FALSE; } else { /* The formats are different so we need to do either pre- or post-format conversion. It doesn't matter which. */ pConverter->hasPreFormatConversion = MA_FALSE; pConverter->hasPostFormatConversion = MA_TRUE; } } else { /* We have a channel converter and/or resampler so we'll need channel conversion based on the mid format. */ if (pConverter->formatIn != midFormat) { pConverter->hasPreFormatConversion = MA_TRUE; } if (pConverter->formatOut != midFormat) { pConverter->hasPostFormatConversion = MA_TRUE; } } /* We can enable passthrough optimizations if applicable. Note that we'll only be able to do this if the sample rate is static. */ if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE && pConverter->hasChannelConverter == MA_FALSE && pConverter->hasResampler == MA_FALSE) { pConverter->isPassthrough = MA_TRUE; } /* We now need to determine our execution path. */ if (pConverter->isPassthrough) { pConverter->executionPath = ma_data_converter_execution_path_passthrough; } else { if (pConverter->channelsIn < pConverter->channelsOut) { /* Do resampling first, if necessary. */ MA_ASSERT(pConverter->hasChannelConverter == MA_TRUE); if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_resample_first; } else { pConverter->executionPath = ma_data_converter_execution_path_channels_only; } } else { /* Do channel conversion first, if necessary. */ if (pConverter->hasChannelConverter) { if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_channels_first; } else { pConverter->executionPath = ma_data_converter_execution_path_channels_only; } } else { /* Channel routing not required. */ if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_resample_only; } else { pConverter->executionPath = ma_data_converter_execution_path_format_only; } } } } return MA_SUCCESS; } MA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_data_converter_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_data_converter_init_preallocated(pConfig, pHeap, pConverter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pConverter->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pConverter == NULL) { return; } if (pConverter->hasResampler) { ma_resampler_uninit(&pConverter->resampler, pAllocationCallbacks); } ma_channel_converter_uninit(&pConverter->channelConverter, pAllocationCallbacks); if (pConverter->_ownsHeap) { ma_free(pConverter->_pHeap, pAllocationCallbacks); } } static ma_result ma_data_converter_process_pcm_frames__passthrough(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pFramesOut != NULL) { if (pFramesIn != NULL) { ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__format_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pFramesOut != NULL) { if (pFramesIn != NULL) { ma_convert_pcm_frames_format(pFramesOut, pConverter->formatOut, pFramesIn, pConverter->formatIn, frameCount, pConverter->channelsIn, pConverter->ditherMode); } else { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__resample_with_format_conversion(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result = MA_SUCCESS; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); const void* pFramesInThisIteration; /* */ void* pFramesOutThisIteration; ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; if (pFramesIn != NULL) { pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } else { pFramesInThisIteration = NULL; } if (pFramesOut != NULL) { pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { pFramesOutThisIteration = NULL; } /* Do a pre format conversion if necessary. */ if (pConverter->hasPreFormatConversion) { ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } if (pConverter->hasPostFormatConversion) { if (frameCountInThisIteration > tempBufferOutCap) { frameCountInThisIteration = tempBufferOutCap; } } if (pFramesInThisIteration != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pFramesInThisIteration, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); } else { MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn)); } frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (pConverter->hasPostFormatConversion) { /* Both input and output conversion required. Output to the temp buffer. */ if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration); } else { /* Only pre-format required. Output straight to the output buffer. */ result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pFramesOutThisIteration, &frameCountOutThisIteration); } if (result != MA_SUCCESS) { break; } } else { /* No pre-format required. Just read straight from the input buffer. */ MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE); frameCountInThisIteration = (frameCountIn - framesProcessedIn); frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesInThisIteration, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration); if (result != MA_SUCCESS) { break; } } /* If we are doing a post format conversion we need to do that now. */ if (pConverter->hasPostFormatConversion) { if (pFramesOutThisIteration != NULL) { ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->resampler.channels, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return result; } static ma_result ma_data_converter_process_pcm_frames__resample_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pConverter != NULL); if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) { /* Neither pre- nor post-format required. This is simple case where only resampling is required. */ return ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { /* Format conversion required. */ return ma_data_converter_process_pcm_frames__resample_with_format_conversion(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } static ma_result ma_data_converter_process_pcm_frames__channels_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) { /* No format conversion required. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOut, pFramesIn, frameCount); if (result != MA_SUCCESS) { return result; } } else { /* Format conversion required. */ ma_uint64 framesProcessed = 0; while (framesProcessed < frameCount) { ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); const void* pFramesInThisIteration; /* */ void* pFramesOutThisIteration; ma_uint64 frameCountThisIteration; if (pFramesIn != NULL) { pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessed * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } else { pFramesInThisIteration = NULL; } if (pFramesOut != NULL) { pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessed * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { pFramesOutThisIteration = NULL; } /* Do a pre format conversion if necessary. */ if (pConverter->hasPreFormatConversion) { ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn); frameCountThisIteration = (frameCount - framesProcessed); if (frameCountThisIteration > tempBufferInCap) { frameCountThisIteration = tempBufferInCap; } if (pConverter->hasPostFormatConversion) { if (frameCountThisIteration > tempBufferOutCap) { frameCountThisIteration = tempBufferOutCap; } } if (pFramesInThisIteration != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pFramesInThisIteration, pConverter->formatIn, frameCountThisIteration, pConverter->channelsIn, pConverter->ditherMode); } else { MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn)); } if (pConverter->hasPostFormatConversion) { /* Both input and output conversion required. Output to the temp buffer. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pTempBufferIn, frameCountThisIteration); } else { /* Only pre-format required. Output straight to the output buffer. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOutThisIteration, pTempBufferIn, frameCountThisIteration); } if (result != MA_SUCCESS) { break; } } else { /* No pre-format required. Just read straight from the input buffer. */ MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE); frameCountThisIteration = (frameCount - framesProcessed); if (frameCountThisIteration > tempBufferOutCap) { frameCountThisIteration = tempBufferOutCap; } result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pFramesInThisIteration, frameCountThisIteration); if (result != MA_SUCCESS) { break; } } /* If we are doing a post format conversion we need to do that now. */ if (pConverter->hasPostFormatConversion) { if (pFramesOutThisIteration != NULL) { ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->channelConverter.format, frameCountThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode); } } framesProcessed += frameCountThisIteration; } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__resample_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format. */ ma_uint64 tempBufferInCap; ma_uint8 pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format, channel converter input format. */ ma_uint64 tempBufferMidCap; ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In channel converter output format. */ ma_uint64 tempBufferOutCap; MA_ASSERT(pConverter != NULL); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsIn); MA_ASSERT(pConverter->resampler.channels < pConverter->channelConverter.channelsOut); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); tempBufferMidCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); while (framesProcessedOut < frameCountOut) { ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; const void* pRunningFramesIn = NULL; void* pRunningFramesOut = NULL; const void* pResampleBufferIn; void* pChannelsBufferOut; if (pFramesIn != NULL) { pRunningFramesIn = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } if (pFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } /* Run input data through the resampler and output it to the temporary buffer. */ frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (pConverter->hasPreFormatConversion) { if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } } frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferMidCap) { frameCountOutThisIteration = tempBufferMidCap; } /* We can't read more frames than can fit in the output buffer. */ if (pConverter->hasPostFormatConversion) { if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } } /* We need to ensure we don't try to process too many input frames that we run out of room in the output buffer. If this happens we'll end up glitching. */ /* We need to try to predict how many input frames will be required for the resampler. If the resampler can tell us, we'll use that. Otherwise we'll need to make a best guess. The further off we are from this, the more wasted format conversions we'll end up doing. */ #if 1 { ma_uint64 requiredInputFrameCount; result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount); if (result != MA_SUCCESS) { /* Fall back to a best guess. */ requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut; } if (frameCountInThisIteration > requiredInputFrameCount) { frameCountInThisIteration = requiredInputFrameCount; } } #endif if (pConverter->hasPreFormatConversion) { if (pFramesIn != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); pResampleBufferIn = pTempBufferIn; } else { pResampleBufferIn = NULL; } } else { pResampleBufferIn = pRunningFramesIn; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pResampleBufferIn, &frameCountInThisIteration, pTempBufferMid, &frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* The input data has been resampled so now we need to run it through the channel converter. The input data is always contained in pTempBufferMid. We only need to do this part if we have an output buffer. */ if (pFramesOut != NULL) { if (pConverter->hasPostFormatConversion) { pChannelsBufferOut = pTempBufferOut; } else { pChannelsBufferOut = pRunningFramesOut; } result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pChannelsBufferOut, pTempBufferMid, frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* Finally we do post format conversion. */ if (pConverter->hasPostFormatConversion) { ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pChannelsBufferOut, pConverter->channelConverter.format, frameCountOutThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__channels_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format. */ ma_uint64 tempBufferInCap; ma_uint8 pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format, channel converter input format. */ ma_uint64 tempBufferMidCap; ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In channel converter output format. */ ma_uint64 tempBufferOutCap; MA_ASSERT(pConverter != NULL); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsOut); MA_ASSERT(pConverter->resampler.channels <= pConverter->channelConverter.channelsIn); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn); tempBufferMidCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); while (framesProcessedOut < frameCountOut) { ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; const void* pRunningFramesIn = NULL; void* pRunningFramesOut = NULL; const void* pChannelsBufferIn; void* pResampleBufferOut; if (pFramesIn != NULL) { pRunningFramesIn = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } if (pFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } /* Before doing any processing we need to determine how many frames we should try processing this iteration, for both input and output. The resampler requires us to perform format and channel conversion before passing any data into it. If we get our input count wrong, we'll end up performing redundant pre-processing. This isn't the end of the world, but it does result in some inefficiencies proportionate to how far our estimates are off. If the resampler has a means to calculate exactly how much we'll need, we'll use that. Otherwise we'll make a best guess. In order to do this, we'll need to calculate the output frame count first. */ frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferMidCap) { frameCountOutThisIteration = tempBufferMidCap; } if (pConverter->hasPostFormatConversion) { if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } } /* Now that we have the output frame count we can determine the input frame count. */ frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (pConverter->hasPreFormatConversion) { if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } } if (frameCountInThisIteration > tempBufferMidCap) { frameCountInThisIteration = tempBufferMidCap; } #if 1 { ma_uint64 requiredInputFrameCount; result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount); if (result != MA_SUCCESS) { /* Fall back to a best guess. */ requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut; } if (frameCountInThisIteration > requiredInputFrameCount) { frameCountInThisIteration = requiredInputFrameCount; } } #endif /* Pre format conversion. */ if (pConverter->hasPreFormatConversion) { if (pRunningFramesIn != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); pChannelsBufferIn = pTempBufferIn; } else { pChannelsBufferIn = NULL; } } else { pChannelsBufferIn = pRunningFramesIn; } /* Channel conversion. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferMid, pChannelsBufferIn, frameCountInThisIteration); if (result != MA_SUCCESS) { return result; } /* Resampling. */ if (pConverter->hasPostFormatConversion) { pResampleBufferOut = pTempBufferOut; } else { pResampleBufferOut = pRunningFramesOut; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferMid, &frameCountInThisIteration, pResampleBufferOut, &frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* Post format conversion. */ if (pConverter->hasPostFormatConversion) { if (pRunningFramesOut != NULL) { ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pResampleBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->channelsOut, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return MA_SUCCESS; } MA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } switch (pConverter->executionPath) { case ma_data_converter_execution_path_passthrough: return ma_data_converter_process_pcm_frames__passthrough(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_format_only: return ma_data_converter_process_pcm_frames__format_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_channels_only: return ma_data_converter_process_pcm_frames__channels_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_resample_only: return ma_data_converter_process_pcm_frames__resample_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_resample_first: return ma_data_converter_process_pcm_frames__resample_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_channels_first: return ma_data_converter_process_pcm_frames__channels_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); default: return MA_INVALID_OPERATION; /* Should never hit this. */ } } MA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler == MA_FALSE) { return MA_INVALID_OPERATION; /* Dynamic resampling not enabled. */ } return ma_resampler_set_rate(&pConverter->resampler, sampleRateIn, sampleRateOut); } MA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler == MA_FALSE) { return MA_INVALID_OPERATION; /* Dynamic resampling not enabled. */ } return ma_resampler_set_rate_ratio(&pConverter->resampler, ratioInOut); } MA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter) { if (pConverter == NULL) { return 0; } if (pConverter->hasResampler) { return ma_resampler_get_input_latency(&pConverter->resampler); } return 0; /* No latency without a resampler. */ } MA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter) { if (pConverter == NULL) { return 0; } if (pConverter->hasResampler) { return ma_resampler_get_output_latency(&pConverter->resampler); } return 0; /* No latency without a resampler. */ } MA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler) { return ma_resampler_get_required_input_frame_count(&pConverter->resampler, outputFrameCount, pInputFrameCount); } else { *pInputFrameCount = outputFrameCount; /* 1:1 */ return MA_SUCCESS; } } MA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler) { return ma_resampler_get_expected_output_frame_count(&pConverter->resampler, inputFrameCount, pOutputFrameCount); } else { *pOutputFrameCount = inputFrameCount; /* 1:1 */ return MA_SUCCESS; } } MA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasChannelConverter) { ma_channel_converter_get_output_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsOut); } return MA_SUCCESS; } MA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasChannelConverter) { ma_channel_converter_get_input_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsIn); } return MA_SUCCESS; } MA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter) { if (pConverter == NULL) { return MA_INVALID_ARGS; } /* There's nothing to do if we're not resampling. */ if (pConverter->hasResampler == MA_FALSE) { return MA_SUCCESS; } return ma_resampler_reset(&pConverter->resampler); } /************************************************************************************************************************************************************** Channel Maps **************************************************************************************************************************************************************/ static ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex); MA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex) { if (pChannelMap == NULL) { return ma_channel_map_init_standard_channel(ma_standard_channel_map_default, channelCount, channelIndex); } else { if (channelIndex >= channelCount) { return MA_CHANNEL_NONE; } return pChannelMap[channelIndex]; } } MA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels) { if (pChannelMap == NULL) { return; } MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channels); } static ma_channel ma_channel_map_init_standard_channel_microsoft(ma_uint32 channelCount, ma_uint32 channelIndex) { if (channelCount == 0 || channelIndex >= channelCount) { return MA_CHANNEL_NONE; } /* This is the Microsoft channel map. Based off the speaker configurations mentioned here: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ksmedia/ns-ksmedia-ksaudio_channel_config */ switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: /* No defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { #ifndef MA_USE_QUAD_MICROSOFT_CHANNEL_MAP /* Surround. Using the Surround profile has the advantage of the 3rd channel (MA_CHANNEL_FRONT_CENTER) mapping nicely with higher channel counts. */ case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_CENTER; #else /* Quad. */ case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; #endif } } break; case 5: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_SIDE_LEFT; case 5: return MA_CHANNEL_SIDE_RIGHT; } } break; case 7: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_CENTER; case 5: return MA_CHANNEL_SIDE_LEFT; case 6: return MA_CHANNEL_SIDE_RIGHT; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_alsa(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; case 6: return MA_CHANNEL_BACK_CENTER; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_rfc3551(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 2: return MA_CHANNEL_FRONT_CENTER; case 1: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_CENTER; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_SIDE_LEFT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_FRONT_RIGHT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; } } break; } if (channelCount > 6) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_flac(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_CENTER; case 5: return MA_CHANNEL_SIDE_LEFT; case 6: return MA_CHANNEL_SIDE_RIGHT; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_vorbis(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; case 6: return MA_CHANNEL_LFE; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_LEFT; case 6: return MA_CHANNEL_BACK_RIGHT; case 7: return MA_CHANNEL_LFE; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_sound4(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; case 6: return MA_CHANNEL_LFE; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_LEFT; case 6: return MA_CHANNEL_BACK_RIGHT; case 7: return MA_CHANNEL_LFE; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_sndio(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: /* No defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; } } break; case 6: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; } } break; } if (channelCount > 6) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex) { if (channelCount == 0 || channelIndex >= channelCount) { return MA_CHANNEL_NONE; } switch (standardChannelMap) { case ma_standard_channel_map_alsa: { return ma_channel_map_init_standard_channel_alsa(channelCount, channelIndex); } break; case ma_standard_channel_map_rfc3551: { return ma_channel_map_init_standard_channel_rfc3551(channelCount, channelIndex); } break; case ma_standard_channel_map_flac: { return ma_channel_map_init_standard_channel_flac(channelCount, channelIndex); } break; case ma_standard_channel_map_vorbis: { return ma_channel_map_init_standard_channel_vorbis(channelCount, channelIndex); } break; case ma_standard_channel_map_sound4: { return ma_channel_map_init_standard_channel_sound4(channelCount, channelIndex); } break; case ma_standard_channel_map_sndio: { return ma_channel_map_init_standard_channel_sndio(channelCount, channelIndex); } break; case ma_standard_channel_map_microsoft: /* Also default. */ /*case ma_standard_channel_map_default;*/ default: { return ma_channel_map_init_standard_channel_microsoft(channelCount, channelIndex); } break; } } MA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels) { ma_uint32 iChannel; if (pChannelMap == NULL || channelMapCap == 0 || channels == 0) { return; } for (iChannel = 0; iChannel < channels; iChannel += 1) { if (channelMapCap == 0) { break; /* Ran out of room. */ } pChannelMap[0] = ma_channel_map_init_standard_channel(standardChannelMap, channels, iChannel); pChannelMap += 1; channelMapCap -= 1; } } MA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels) { if (pOut != NULL && pIn != NULL && channels > 0) { MA_COPY_MEMORY(pOut, pIn, sizeof(*pOut) * channels); } } MA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels) { if (pOut == NULL || channels == 0) { return; } if (pIn != NULL) { ma_channel_map_copy(pOut, pIn, channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pOut, channelMapCapOut, channels); } } MA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels) { /* A channel count of 0 is invalid. */ if (channels == 0) { return MA_FALSE; } /* It does not make sense to have a mono channel when there is more than 1 channel. */ if (channels > 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == MA_CHANNEL_MONO) { return MA_FALSE; } } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels) { ma_uint32 iChannel; if (pChannelMapA == pChannelMapB) { return MA_TRUE; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMapA, channels, iChannel) != ma_channel_map_get_channel(pChannelMapB, channels, iChannel)) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels) { ma_uint32 iChannel; /* A null channel map is equivalent to the default channel map. */ if (pChannelMap == NULL) { return MA_FALSE; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (pChannelMap[iChannel] != MA_CHANNEL_NONE) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition) { return ma_channel_map_find_channel_position(channels, pChannelMap, channelPosition, NULL); } MA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex) { ma_uint32 iChannel; if (pChannelIndex != NULL) { *pChannelIndex = (ma_uint32)-1; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == channelPosition) { if (pChannelIndex != NULL) { *pChannelIndex = iChannel; } return MA_TRUE; } } /* Getting here means the channel position was not found. */ return MA_FALSE; } MA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap) { size_t len; ma_uint32 iChannel; len = 0; for (iChannel = 0; iChannel < channels; iChannel += 1) { const char* pChannelStr = ma_channel_position_to_string(ma_channel_map_get_channel(pChannelMap, channels, iChannel)); size_t channelStrLen = strlen(pChannelStr); /* Append the string if necessary. */ if (pBufferOut != NULL && bufferCap > len + channelStrLen) { MA_COPY_MEMORY(pBufferOut + len, pChannelStr, channelStrLen); } len += channelStrLen; /* Append a space if it's not the last item. */ if (iChannel+1 < channels) { if (pBufferOut != NULL && bufferCap > len + 1) { pBufferOut[len] = ' '; } len += 1; } } /* Null terminate. Don't increment the length here. */ if (pBufferOut != NULL && bufferCap > len + 1) { pBufferOut[len] = '\0'; } return len; } MA_API const char* ma_channel_position_to_string(ma_channel channel) { switch (channel) { case MA_CHANNEL_NONE : return "CHANNEL_NONE"; case MA_CHANNEL_MONO : return "CHANNEL_MONO"; case MA_CHANNEL_FRONT_LEFT : return "CHANNEL_FRONT_LEFT"; case MA_CHANNEL_FRONT_RIGHT : return "CHANNEL_FRONT_RIGHT"; case MA_CHANNEL_FRONT_CENTER : return "CHANNEL_FRONT_CENTER"; case MA_CHANNEL_LFE : return "CHANNEL_LFE"; case MA_CHANNEL_BACK_LEFT : return "CHANNEL_BACK_LEFT"; case MA_CHANNEL_BACK_RIGHT : return "CHANNEL_BACK_RIGHT"; case MA_CHANNEL_FRONT_LEFT_CENTER : return "CHANNEL_FRONT_LEFT_CENTER"; case MA_CHANNEL_FRONT_RIGHT_CENTER: return "CHANNEL_FRONT_RIGHT_CENTER"; case MA_CHANNEL_BACK_CENTER : return "CHANNEL_BACK_CENTER"; case MA_CHANNEL_SIDE_LEFT : return "CHANNEL_SIDE_LEFT"; case MA_CHANNEL_SIDE_RIGHT : return "CHANNEL_SIDE_RIGHT"; case MA_CHANNEL_TOP_CENTER : return "CHANNEL_TOP_CENTER"; case MA_CHANNEL_TOP_FRONT_LEFT : return "CHANNEL_TOP_FRONT_LEFT"; case MA_CHANNEL_TOP_FRONT_CENTER : return "CHANNEL_TOP_FRONT_CENTER"; case MA_CHANNEL_TOP_FRONT_RIGHT : return "CHANNEL_TOP_FRONT_RIGHT"; case MA_CHANNEL_TOP_BACK_LEFT : return "CHANNEL_TOP_BACK_LEFT"; case MA_CHANNEL_TOP_BACK_CENTER : return "CHANNEL_TOP_BACK_CENTER"; case MA_CHANNEL_TOP_BACK_RIGHT : return "CHANNEL_TOP_BACK_RIGHT"; case MA_CHANNEL_AUX_0 : return "CHANNEL_AUX_0"; case MA_CHANNEL_AUX_1 : return "CHANNEL_AUX_1"; case MA_CHANNEL_AUX_2 : return "CHANNEL_AUX_2"; case MA_CHANNEL_AUX_3 : return "CHANNEL_AUX_3"; case MA_CHANNEL_AUX_4 : return "CHANNEL_AUX_4"; case MA_CHANNEL_AUX_5 : return "CHANNEL_AUX_5"; case MA_CHANNEL_AUX_6 : return "CHANNEL_AUX_6"; case MA_CHANNEL_AUX_7 : return "CHANNEL_AUX_7"; case MA_CHANNEL_AUX_8 : return "CHANNEL_AUX_8"; case MA_CHANNEL_AUX_9 : return "CHANNEL_AUX_9"; case MA_CHANNEL_AUX_10 : return "CHANNEL_AUX_10"; case MA_CHANNEL_AUX_11 : return "CHANNEL_AUX_11"; case MA_CHANNEL_AUX_12 : return "CHANNEL_AUX_12"; case MA_CHANNEL_AUX_13 : return "CHANNEL_AUX_13"; case MA_CHANNEL_AUX_14 : return "CHANNEL_AUX_14"; case MA_CHANNEL_AUX_15 : return "CHANNEL_AUX_15"; case MA_CHANNEL_AUX_16 : return "CHANNEL_AUX_16"; case MA_CHANNEL_AUX_17 : return "CHANNEL_AUX_17"; case MA_CHANNEL_AUX_18 : return "CHANNEL_AUX_18"; case MA_CHANNEL_AUX_19 : return "CHANNEL_AUX_19"; case MA_CHANNEL_AUX_20 : return "CHANNEL_AUX_20"; case MA_CHANNEL_AUX_21 : return "CHANNEL_AUX_21"; case MA_CHANNEL_AUX_22 : return "CHANNEL_AUX_22"; case MA_CHANNEL_AUX_23 : return "CHANNEL_AUX_23"; case MA_CHANNEL_AUX_24 : return "CHANNEL_AUX_24"; case MA_CHANNEL_AUX_25 : return "CHANNEL_AUX_25"; case MA_CHANNEL_AUX_26 : return "CHANNEL_AUX_26"; case MA_CHANNEL_AUX_27 : return "CHANNEL_AUX_27"; case MA_CHANNEL_AUX_28 : return "CHANNEL_AUX_28"; case MA_CHANNEL_AUX_29 : return "CHANNEL_AUX_29"; case MA_CHANNEL_AUX_30 : return "CHANNEL_AUX_30"; case MA_CHANNEL_AUX_31 : return "CHANNEL_AUX_31"; default: break; } return "UNKNOWN"; } /************************************************************************************************************************************************************** Conversion Helpers **************************************************************************************************************************************************************/ MA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn) { ma_data_converter_config config; config = ma_data_converter_config_init(formatIn, formatOut, channelsIn, channelsOut, sampleRateIn, sampleRateOut); config.resampling.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); return ma_convert_frames_ex(pOut, frameCountOut, pIn, frameCountIn, &config); } MA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig) { ma_result result; ma_data_converter converter; if (frameCountIn == 0 || pConfig == NULL) { return 0; } result = ma_data_converter_init(pConfig, NULL, &converter); if (result != MA_SUCCESS) { return 0; /* Failed to initialize the data converter. */ } if (pOut == NULL) { result = ma_data_converter_get_expected_output_frame_count(&converter, frameCountIn, &frameCountOut); if (result != MA_SUCCESS) { if (result == MA_NOT_IMPLEMENTED) { /* No way to calculate the number of frames, so we'll need to brute force it and loop. */ frameCountOut = 0; while (frameCountIn > 0) { ma_uint64 framesProcessedIn = frameCountIn; ma_uint64 framesProcessedOut = 0xFFFFFFFF; result = ma_data_converter_process_pcm_frames(&converter, pIn, &framesProcessedIn, NULL, &framesProcessedOut); if (result != MA_SUCCESS) { break; } frameCountIn -= framesProcessedIn; } } } } else { result = ma_data_converter_process_pcm_frames(&converter, pIn, &frameCountIn, pOut, &frameCountOut); if (result != MA_SUCCESS) { frameCountOut = 0; } } ma_data_converter_uninit(&converter, NULL); return frameCountOut; } /************************************************************************************************************************************************************** Ring Buffer **************************************************************************************************************************************************************/ static MA_INLINE ma_uint32 ma_rb__extract_offset_in_bytes(ma_uint32 encodedOffset) { return encodedOffset & 0x7FFFFFFF; } static MA_INLINE ma_uint32 ma_rb__extract_offset_loop_flag(ma_uint32 encodedOffset) { return encodedOffset & 0x80000000; } static MA_INLINE void* ma_rb__get_read_ptr(ma_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedReadOffset))); } static MA_INLINE void* ma_rb__get_write_ptr(ma_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedWriteOffset))); } static MA_INLINE ma_uint32 ma_rb__construct_offset(ma_uint32 offsetInBytes, ma_uint32 offsetLoopFlag) { return offsetLoopFlag | offsetInBytes; } static MA_INLINE void ma_rb__deconstruct_offset(ma_uint32 encodedOffset, ma_uint32* pOffsetInBytes, ma_uint32* pOffsetLoopFlag) { MA_ASSERT(pOffsetInBytes != NULL); MA_ASSERT(pOffsetLoopFlag != NULL); *pOffsetInBytes = ma_rb__extract_offset_in_bytes(encodedOffset); *pOffsetLoopFlag = ma_rb__extract_offset_loop_flag(encodedOffset); } MA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB) { ma_result result; const ma_uint32 maxSubBufferSize = 0x7FFFFFFF - (MA_SIMD_ALIGNMENT-1); if (pRB == NULL) { return MA_INVALID_ARGS; } if (subbufferSizeInBytes == 0 || subbufferCount == 0) { return MA_INVALID_ARGS; } if (subbufferSizeInBytes > maxSubBufferSize) { return MA_INVALID_ARGS; /* Maximum buffer size is ~2GB. The most significant bit is a flag for use internally. */ } MA_ZERO_OBJECT(pRB); result = ma_allocation_callbacks_init_copy(&pRB->allocationCallbacks, pAllocationCallbacks); if (result != MA_SUCCESS) { return result; } pRB->subbufferSizeInBytes = (ma_uint32)subbufferSizeInBytes; pRB->subbufferCount = (ma_uint32)subbufferCount; if (pOptionalPreallocatedBuffer != NULL) { pRB->subbufferStrideInBytes = (ma_uint32)subbufferStrideInBytes; pRB->pBuffer = pOptionalPreallocatedBuffer; } else { size_t bufferSizeInBytes; /* Here is where we allocate our own buffer. We always want to align this to MA_SIMD_ALIGNMENT for future SIMD optimization opportunity. To do this we need to make sure the stride is a multiple of MA_SIMD_ALIGNMENT. */ pRB->subbufferStrideInBytes = (pRB->subbufferSizeInBytes + (MA_SIMD_ALIGNMENT-1)) & ~MA_SIMD_ALIGNMENT; bufferSizeInBytes = (size_t)pRB->subbufferCount*pRB->subbufferStrideInBytes; pRB->pBuffer = ma_aligned_malloc(bufferSizeInBytes, MA_SIMD_ALIGNMENT, &pRB->allocationCallbacks); if (pRB->pBuffer == NULL) { return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pRB->pBuffer, bufferSizeInBytes); pRB->ownsBuffer = MA_TRUE; } return MA_SUCCESS; } MA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB) { return ma_rb_init_ex(bufferSizeInBytes, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB); } MA_API void ma_rb_uninit(ma_rb* pRB) { if (pRB == NULL) { return; } if (pRB->ownsBuffer) { ma_aligned_free(pRB->pBuffer, &pRB->allocationCallbacks); } } MA_API void ma_rb_reset(ma_rb* pRB) { if (pRB == NULL) { return; } ma_atomic_exchange_32(&pRB->encodedReadOffset, 0); ma_atomic_exchange_32(&pRB->encodedWriteOffset, 0); } MA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut) { ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; size_t bytesAvailable; size_t bytesRequested; if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) { return MA_INVALID_ARGS; } /* The returned buffer should never move ahead of the write pointer. */ writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); /* The number of bytes available depends on whether or not the read and write pointers are on the same loop iteration. If so, we can only read up to the write pointer. If not, we can only read up to the end of the buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { bytesAvailable = writeOffsetInBytes - readOffsetInBytes; } else { bytesAvailable = pRB->subbufferSizeInBytes - readOffsetInBytes; } bytesRequested = *pSizeInBytes; if (bytesRequested > bytesAvailable) { bytesRequested = bytesAvailable; } *pSizeInBytes = bytesRequested; (*ppBufferOut) = ma_rb__get_read_ptr(pRB); return MA_SUCCESS; } MA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 newReadOffsetInBytes; ma_uint32 newReadOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */ newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + sizeInBytes); if (newReadOffsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; /* <-- sizeInBytes will cause the read offset to overflow. */ } /* Move the read pointer back to the start if necessary. */ newReadOffsetLoopFlag = readOffsetLoopFlag; if (newReadOffsetInBytes == pRB->subbufferSizeInBytes) { newReadOffsetInBytes = 0; newReadOffsetLoopFlag ^= 0x80000000; } ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetInBytes, newReadOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; size_t bytesAvailable; size_t bytesRequested; if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) { return MA_INVALID_ARGS; } /* The returned buffer should never overtake the read buffer. */ readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); /* In the case of writing, if the write pointer and the read pointer are on the same loop iteration we can only write up to the end of the buffer. Otherwise we can only write up to the read pointer. The write pointer should never overtake the read pointer. */ if (writeOffsetLoopFlag == readOffsetLoopFlag) { bytesAvailable = pRB->subbufferSizeInBytes - writeOffsetInBytes; } else { bytesAvailable = readOffsetInBytes - writeOffsetInBytes; } bytesRequested = *pSizeInBytes; if (bytesRequested > bytesAvailable) { bytesRequested = bytesAvailable; } *pSizeInBytes = bytesRequested; *ppBufferOut = ma_rb__get_write_ptr(pRB); /* Clear the buffer if desired. */ if (pRB->clearOnWriteAcquire) { MA_ZERO_MEMORY(*ppBufferOut, *pSizeInBytes); } return MA_SUCCESS; } MA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes) { ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newWriteOffsetInBytes; ma_uint32 newWriteOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */ newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + sizeInBytes); if (newWriteOffsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; /* <-- sizeInBytes will cause the read offset to overflow. */ } /* Move the read pointer back to the start if necessary. */ newWriteOffsetLoopFlag = writeOffsetLoopFlag; if (newWriteOffsetInBytes == pRB->subbufferSizeInBytes) { newWriteOffsetInBytes = 0; newWriteOffsetLoopFlag ^= 0x80000000; } ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetInBytes, newWriteOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newReadOffsetInBytes; ma_uint32 newReadOffsetLoopFlag; if (pRB == NULL || offsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); newReadOffsetLoopFlag = readOffsetLoopFlag; /* We cannot go past the write buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { if ((readOffsetInBytes + offsetInBytes) > writeOffsetInBytes) { newReadOffsetInBytes = writeOffsetInBytes; } else { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes); } } else { /* May end up looping. */ if ((readOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes; newReadOffsetLoopFlag ^= 0x80000000; /* <-- Looped. */ } else { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes); } } ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetInBytes, newReadOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newWriteOffsetInBytes; ma_uint32 newWriteOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); newWriteOffsetLoopFlag = writeOffsetLoopFlag; /* We cannot go past the write buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { /* May end up looping. */ if ((writeOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes; newWriteOffsetLoopFlag ^= 0x80000000; /* <-- Looped. */ } else { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes); } } else { if ((writeOffsetInBytes + offsetInBytes) > readOffsetInBytes) { newWriteOffsetInBytes = readOffsetInBytes; } else { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes); } } ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetInBytes, newWriteOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; if (pRB == NULL) { return 0; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); if (readOffsetLoopFlag == writeOffsetLoopFlag) { return writeOffsetInBytes - readOffsetInBytes; } else { return writeOffsetInBytes + (pRB->subbufferSizeInBytes - readOffsetInBytes); } } MA_API ma_uint32 ma_rb_available_read(ma_rb* pRB) { ma_int32 dist; if (pRB == NULL) { return 0; } dist = ma_rb_pointer_distance(pRB); if (dist < 0) { return 0; } return dist; } MA_API ma_uint32 ma_rb_available_write(ma_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_size(pRB) - ma_rb_pointer_distance(pRB)); } MA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->subbufferSizeInBytes; } MA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB) { if (pRB == NULL) { return 0; } if (pRB->subbufferStrideInBytes == 0) { return (size_t)pRB->subbufferSizeInBytes; } return (size_t)pRB->subbufferStrideInBytes; } MA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex) { if (pRB == NULL) { return 0; } return subbufferIndex * ma_rb_get_subbuffer_stride(pRB); } MA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer) { if (pRB == NULL) { return NULL; } return ma_offset_ptr(pBuffer, ma_rb_get_subbuffer_offset(pRB, subbufferIndex)); } static ma_result ma_pcm_rb_data_source__on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { /* Since there's no notion of an end, we don't ever want to return MA_AT_END here. But it is possible to return 0. */ ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource; ma_result result; ma_uint64 totalFramesRead; MA_ASSERT(pRB != NULL); /* We need to run this in a loop since the ring buffer itself may loop. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { void* pMappedBuffer; ma_uint32 mappedFrameCount; ma_uint64 framesToRead = frameCount - totalFramesRead; if (framesToRead > 0xFFFFFFFF) { framesToRead = 0xFFFFFFFF; } mappedFrameCount = (ma_uint32)framesToRead; result = ma_pcm_rb_acquire_read(pRB, &mappedFrameCount, &pMappedBuffer); if (result != MA_SUCCESS) { break; } if (mappedFrameCount == 0) { break; /* <-- End of ring buffer. */ } ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, pRB->format, pRB->channels), pMappedBuffer, mappedFrameCount, pRB->format, pRB->channels); result = ma_pcm_rb_commit_read(pRB, mappedFrameCount); if (result != MA_SUCCESS) { break; } totalFramesRead += mappedFrameCount; } /* There is no notion of an "end" in a ring buffer. If we didn't have enough data to fill the requested frame count we'll need to pad with silence. If we don't do this, totalFramesRead might equal 0 which will result in the data source layer at a higher level translating this to MA_AT_END which is incorrect for a ring buffer. */ if (totalFramesRead < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, pRB->format, pRB->channels), (frameCount - totalFramesRead), pRB->format, pRB->channels); totalFramesRead = frameCount; } *pFramesRead = totalFramesRead; return MA_SUCCESS; } static ma_result ma_pcm_rb_data_source__on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource; MA_ASSERT(pRB != NULL); if (pFormat != NULL) { *pFormat = pRB->format; } if (pChannels != NULL) { *pChannels = pRB->channels; } if (pSampleRate != NULL) { *pSampleRate = pRB->sampleRate; } /* Just assume the default channel map. */ if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pRB->channels); } return MA_SUCCESS; } static ma_data_source_vtable ma_gRBDataSourceVTable = { ma_pcm_rb_data_source__on_read, NULL, /* onSeek */ ma_pcm_rb_data_source__on_get_data_format, NULL, /* onGetCursor */ NULL, /* onGetLength */ NULL, /* onSetLooping */ 0 }; static MA_INLINE ma_uint32 ma_pcm_rb_get_bpf(ma_pcm_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_get_bytes_per_frame(pRB->format, pRB->channels); } MA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB) { ma_uint32 bpf; ma_result result; if (pRB == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pRB); bpf = ma_get_bytes_per_frame(format, channels); if (bpf == 0) { return MA_INVALID_ARGS; } result = ma_rb_init_ex(subbufferSizeInFrames*bpf, subbufferCount, subbufferStrideInFrames*bpf, pOptionalPreallocatedBuffer, pAllocationCallbacks, &pRB->rb); if (result != MA_SUCCESS) { return result; } pRB->format = format; pRB->channels = channels; pRB->sampleRate = 0; /* The sample rate is not passed in as a parameter. */ /* The PCM ring buffer is a data source. We need to get that set up as well. */ { ma_data_source_config dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &ma_gRBDataSourceVTable; result = ma_data_source_init(&dataSourceConfig, &pRB->ds); if (result != MA_SUCCESS) { ma_rb_uninit(&pRB->rb); return result; } } return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB) { return ma_pcm_rb_init_ex(format, channels, bufferSizeInFrames, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB); } MA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB) { if (pRB == NULL) { return; } ma_data_source_uninit(&pRB->ds); ma_rb_uninit(&pRB->rb); } MA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB) { if (pRB == NULL) { return; } ma_rb_reset(&pRB->rb); } MA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut) { size_t sizeInBytes; ma_result result; if (pRB == NULL || pSizeInFrames == NULL) { return MA_INVALID_ARGS; } sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB); result = ma_rb_acquire_read(&pRB->rb, &sizeInBytes, ppBufferOut); if (result != MA_SUCCESS) { return result; } *pSizeInFrames = (ma_uint32)(sizeInBytes / (size_t)ma_pcm_rb_get_bpf(pRB)); return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_commit_read(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut) { size_t sizeInBytes; ma_result result; if (pRB == NULL) { return MA_INVALID_ARGS; } sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB); result = ma_rb_acquire_write(&pRB->rb, &sizeInBytes, ppBufferOut); if (result != MA_SUCCESS) { return result; } *pSizeInFrames = (ma_uint32)(sizeInBytes / ma_pcm_rb_get_bpf(pRB)); return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_commit_write(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_seek_read(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_seek_write(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_pointer_distance(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_available_read(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_available_write(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_size(&pRB->rb) / ma_pcm_rb_get_bpf(pRB)); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_stride(&pRB->rb) / ma_pcm_rb_get_bpf(pRB)); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_offset(&pRB->rb, subbufferIndex) / ma_pcm_rb_get_bpf(pRB)); } MA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer) { if (pRB == NULL) { return NULL; } return ma_rb_get_subbuffer_ptr(&pRB->rb, subbufferIndex, pBuffer); } MA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB) { if (pRB == NULL) { return ma_format_unknown; } return pRB->format; } MA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->channels; } MA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->sampleRate; } MA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate) { if (pRB == NULL) { return; } pRB->sampleRate = sampleRate; } MA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB) { ma_result result; ma_uint32 sizeInFrames; sizeInFrames = (ma_uint32)ma_calculate_frame_count_after_resampling(sampleRate, captureInternalSampleRate, captureInternalPeriodSizeInFrames * 5); if (sizeInFrames == 0) { return MA_INVALID_ARGS; } result = ma_pcm_rb_init(captureFormat, captureChannels, sizeInFrames, NULL, pAllocationCallbacks, &pRB->rb); if (result != MA_SUCCESS) { return result; } /* Seek forward a bit so we have a bit of a buffer in case of desyncs. */ ma_pcm_rb_seek_write((ma_pcm_rb*)pRB, captureInternalPeriodSizeInFrames * 2); return MA_SUCCESS; } MA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB) { ma_pcm_rb_uninit((ma_pcm_rb*)pRB); return MA_SUCCESS; } /************************************************************************************************************************************************************** Miscellaneous Helpers **************************************************************************************************************************************************************/ MA_API const char* ma_result_description(ma_result result) { switch (result) { case MA_SUCCESS: return "No error"; case MA_ERROR: return "Unknown error"; case MA_INVALID_ARGS: return "Invalid argument"; case MA_INVALID_OPERATION: return "Invalid operation"; case MA_OUT_OF_MEMORY: return "Out of memory"; case MA_OUT_OF_RANGE: return "Out of range"; case MA_ACCESS_DENIED: return "Permission denied"; case MA_DOES_NOT_EXIST: return "Resource does not exist"; case MA_ALREADY_EXISTS: return "Resource already exists"; case MA_TOO_MANY_OPEN_FILES: return "Too many open files"; case MA_INVALID_FILE: return "Invalid file"; case MA_TOO_BIG: return "Too large"; case MA_PATH_TOO_LONG: return "Path too long"; case MA_NAME_TOO_LONG: return "Name too long"; case MA_NOT_DIRECTORY: return "Not a directory"; case MA_IS_DIRECTORY: return "Is a directory"; case MA_DIRECTORY_NOT_EMPTY: return "Directory not empty"; case MA_AT_END: return "At end"; case MA_NO_SPACE: return "No space available"; case MA_BUSY: return "Device or resource busy"; case MA_IO_ERROR: return "Input/output error"; case MA_INTERRUPT: return "Interrupted"; case MA_UNAVAILABLE: return "Resource unavailable"; case MA_ALREADY_IN_USE: return "Resource already in use"; case MA_BAD_ADDRESS: return "Bad address"; case MA_BAD_SEEK: return "Illegal seek"; case MA_BAD_PIPE: return "Broken pipe"; case MA_DEADLOCK: return "Deadlock"; case MA_TOO_MANY_LINKS: return "Too many links"; case MA_NOT_IMPLEMENTED: return "Not implemented"; case MA_NO_MESSAGE: return "No message of desired type"; case MA_BAD_MESSAGE: return "Invalid message"; case MA_NO_DATA_AVAILABLE: return "No data available"; case MA_INVALID_DATA: return "Invalid data"; case MA_TIMEOUT: return "Timeout"; case MA_NO_NETWORK: return "Network unavailable"; case MA_NOT_UNIQUE: return "Not unique"; case MA_NOT_SOCKET: return "Socket operation on non-socket"; case MA_NO_ADDRESS: return "Destination address required"; case MA_BAD_PROTOCOL: return "Protocol wrong type for socket"; case MA_PROTOCOL_UNAVAILABLE: return "Protocol not available"; case MA_PROTOCOL_NOT_SUPPORTED: return "Protocol not supported"; case MA_PROTOCOL_FAMILY_NOT_SUPPORTED: return "Protocol family not supported"; case MA_ADDRESS_FAMILY_NOT_SUPPORTED: return "Address family not supported"; case MA_SOCKET_NOT_SUPPORTED: return "Socket type not supported"; case MA_CONNECTION_RESET: return "Connection reset"; case MA_ALREADY_CONNECTED: return "Already connected"; case MA_NOT_CONNECTED: return "Not connected"; case MA_CONNECTION_REFUSED: return "Connection refused"; case MA_NO_HOST: return "No host"; case MA_IN_PROGRESS: return "Operation in progress"; case MA_CANCELLED: return "Operation cancelled"; case MA_MEMORY_ALREADY_MAPPED: return "Memory already mapped"; case MA_FORMAT_NOT_SUPPORTED: return "Format not supported"; case MA_DEVICE_TYPE_NOT_SUPPORTED: return "Device type not supported"; case MA_SHARE_MODE_NOT_SUPPORTED: return "Share mode not supported"; case MA_NO_BACKEND: return "No backend"; case MA_NO_DEVICE: return "No device"; case MA_API_NOT_FOUND: return "API not found"; case MA_INVALID_DEVICE_CONFIG: return "Invalid device config"; case MA_DEVICE_NOT_INITIALIZED: return "Device not initialized"; case MA_DEVICE_NOT_STARTED: return "Device not started"; case MA_FAILED_TO_INIT_BACKEND: return "Failed to initialize backend"; case MA_FAILED_TO_OPEN_BACKEND_DEVICE: return "Failed to open backend device"; case MA_FAILED_TO_START_BACKEND_DEVICE: return "Failed to start backend device"; case MA_FAILED_TO_STOP_BACKEND_DEVICE: return "Failed to stop backend device"; default: return "Unknown error"; } } MA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return ma__malloc_default(sz, NULL); } } MA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { void* p = ma_malloc(sz, pAllocationCallbacks); if (p != NULL) { MA_ZERO_MEMORY(p, sz); } return p; } MA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return ma__realloc_default(p, sz, NULL); } } MA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL) { return; } if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } else { return; /* Do no fall back to the default implementation. */ } } else { ma__free_default(p, NULL); } } MA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks) { size_t extraBytes; void* pUnaligned; void* pAligned; if (alignment == 0) { return 0; } extraBytes = alignment-1 + sizeof(void*); pUnaligned = ma_malloc(sz + extraBytes, pAllocationCallbacks); if (pUnaligned == NULL) { return NULL; } pAligned = (void*)(((ma_uintptr)pUnaligned + extraBytes) & ~((ma_uintptr)(alignment-1))); ((void**)pAligned)[-1] = pUnaligned; return pAligned; } MA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { ma_free(((void**)p)[-1], pAllocationCallbacks); } MA_API const char* ma_get_format_name(ma_format format) { switch (format) { case ma_format_unknown: return "Unknown"; case ma_format_u8: return "8-bit Unsigned Integer"; case ma_format_s16: return "16-bit Signed Integer"; case ma_format_s24: return "24-bit Signed Integer (Tightly Packed)"; case ma_format_s32: return "32-bit Signed Integer"; case ma_format_f32: return "32-bit IEEE Floating Point"; default: return "Invalid"; } } MA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels) { ma_uint32 i; for (i = 0; i < channels; ++i) { pOut[i] = ma_mix_f32(pInA[i], pInB[i], factor); } } MA_API ma_uint32 ma_get_bytes_per_sample(ma_format format) { ma_uint32 sizes[] = { 0, /* unknown */ 1, /* u8 */ 2, /* s16 */ 3, /* s24 */ 4, /* s32 */ 4, /* f32 */ }; return sizes[format]; } #define MA_DATA_SOURCE_DEFAULT_RANGE_BEG 0 #define MA_DATA_SOURCE_DEFAULT_RANGE_END ~((ma_uint64)0) #define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG 0 #define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END ~((ma_uint64)0) MA_API ma_data_source_config ma_data_source_config_init(void) { ma_data_source_config config; MA_ZERO_OBJECT(&config); return config; } MA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSourceBase); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->vtable == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->vtable = pConfig->vtable; pDataSourceBase->rangeBegInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG; pDataSourceBase->rangeEndInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END; pDataSourceBase->loopBegInFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG; pDataSourceBase->loopEndInFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END; pDataSourceBase->pCurrent = pDataSource; /* Always read from ourself by default. */ pDataSourceBase->pNext = NULL; pDataSourceBase->onGetNext = NULL; return MA_SUCCESS; } MA_API void ma_data_source_uninit(ma_data_source* pDataSource) { if (pDataSource == NULL) { return; } /* This is placeholder in case we need this later. Data sources need to call this in their uninitialization routine to ensure things work later on if something is added here. */ } static ma_result ma_data_source_resolve_current(ma_data_source* pDataSource, ma_data_source** ppCurrentDataSource) { ma_data_source_base* pCurrentDataSource = (ma_data_source_base*)pDataSource; MA_ASSERT(pDataSource != NULL); MA_ASSERT(ppCurrentDataSource != NULL); if (pCurrentDataSource->pCurrent == NULL) { /* The current data source is NULL. If we're using this in the context of a chain we need to return NULL here so that we don't end up looping. Otherwise we just return the data source itself. */ if (pCurrentDataSource->pNext != NULL || pCurrentDataSource->onGetNext != NULL) { pCurrentDataSource = NULL; } else { pCurrentDataSource = (ma_data_source_base*)pDataSource; /* Not being used in a chain. Make sure we just always read from the data source itself at all times. */ } } else { pCurrentDataSource = (ma_data_source_base*)pCurrentDataSource->pCurrent; } *ppCurrentDataSource = pCurrentDataSource; return MA_SUCCESS; } static ma_result ma_data_source_read_pcm_frames_from_backend(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; MA_ASSERT(pDataSourceBase != NULL); MA_ASSERT(pDataSourceBase->vtable != NULL); MA_ASSERT(pDataSourceBase->vtable->onRead != NULL); MA_ASSERT(pFramesRead != NULL); if (pFramesOut != NULL) { return pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, pFramesRead); } else { /* No output buffer. Probably seeking forward. Read and discard. Can probably optimize this in terms of onSeek and onGetCursor, but need to keep in mind that the data source may not implement these functions. */ ma_result result; ma_uint64 framesRead; ma_format format; ma_uint32 channels; ma_uint64 discardBufferCapInFrames; ma_uint8 pDiscardBuffer[4096]; result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; } discardBufferCapInFrames = sizeof(pDiscardBuffer) / ma_get_bytes_per_frame(format, channels); framesRead = 0; while (framesRead < frameCount) { ma_uint64 framesReadThisIteration = 0; ma_uint64 framesToRead = frameCount - framesRead; if (framesToRead > discardBufferCapInFrames) { framesToRead = discardBufferCapInFrames; } result = pDataSourceBase->vtable->onRead(pDataSourceBase, pDiscardBuffer, framesToRead, &framesReadThisIteration); if (result != MA_SUCCESS) { return result; } framesRead += framesReadThisIteration; } *pFramesRead = framesRead; return MA_SUCCESS; } } static ma_result ma_data_source_read_pcm_frames_within_range(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 framesRead = 0; ma_bool32 loop = ma_data_source_is_looping(pDataSource); if (pDataSourceBase == NULL) { return MA_AT_END; } if (frameCount == 0) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if ((pDataSourceBase->vtable->flags & MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT) != 0 || (pDataSourceBase->rangeEndInFrames == ~((ma_uint64)0) && (pDataSourceBase->loopEndInFrames == ~((ma_uint64)0) || loop == MA_FALSE))) { /* Either the data source is self-managing the range, or no range is set - just read like normal. The data source itself will tell us when the end is reached. */ result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { /* Need to clamp to within the range. */ ma_uint64 relativeCursor; ma_uint64 absoluteCursor; result = ma_data_source_get_cursor_in_pcm_frames(pDataSourceBase, &relativeCursor); if (result != MA_SUCCESS) { /* Failed to retrieve the cursor. Cannot read within a range or loop points. Just read like normal - this may happen for things like noise data sources where it doesn't really matter. */ result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { ma_uint64 rangeBeg; ma_uint64 rangeEnd; /* We have the cursor. We need to make sure we don't read beyond our range. */ rangeBeg = pDataSourceBase->rangeBegInFrames; rangeEnd = pDataSourceBase->rangeEndInFrames; absoluteCursor = rangeBeg + relativeCursor; /* If looping, make sure we're within range. */ if (loop) { if (pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) { rangeEnd = ma_min(rangeEnd, pDataSourceBase->rangeBegInFrames + pDataSourceBase->loopEndInFrames); } } if (frameCount > (rangeEnd - absoluteCursor) && rangeEnd != ~((ma_uint64)0)) { frameCount = (rangeEnd - absoluteCursor); } /* If the cursor is sitting on the end of the range the frame count will be set to 0 which can result in MA_INVALID_ARGS. In this case, we don't want to try reading, but instead return MA_AT_END so the higher level function can know about it. */ if (frameCount > 0) { result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { result = MA_AT_END; /* The cursor is sitting on the end of the range which means we're at the end. */ } } } if (pFramesRead != NULL) { *pFramesRead = framesRead; } /* We need to make sure MA_AT_END is returned if we hit the end of the range. */ if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_data_source_base* pCurrentDataSource; void* pRunningFramesOut = pFramesOut; ma_uint64 totalFramesProcessed = 0; ma_format format; ma_uint32 channels; ma_uint32 emptyLoopCounter = 0; /* Keeps track of how many times 0 frames have been read. For infinite loop detection of sounds with no audio data. */ ma_bool32 loop; if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } loop = ma_data_source_is_looping(pDataSource); /* We need to know the data format so we can advance the output buffer as we read frames. If this fails, chaining will not work and we'll just read as much as we can from the current source. */ if (ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0) != MA_SUCCESS) { result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource); if (result != MA_SUCCESS) { return result; } return ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pFramesOut, frameCount, pFramesRead); } /* Looping is a bit of a special case. When the `loop` argument is true, chaining will not work and only the current data source will be read from. */ /* Keep reading until we've read as many frames as possible. */ while (totalFramesProcessed < frameCount) { ma_uint64 framesProcessed; ma_uint64 framesRemaining = frameCount - totalFramesProcessed; /* We need to resolve the data source that we'll actually be reading from. */ result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource); if (result != MA_SUCCESS) { break; } if (pCurrentDataSource == NULL) { break; } result = ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pRunningFramesOut, framesRemaining, &framesProcessed); totalFramesProcessed += framesProcessed; /* If we encountered an error from the read callback, make sure it's propagated to the caller. The caller may need to know whether or not MA_BUSY is returned which is not necessarily considered an error. */ if (result != MA_SUCCESS && result != MA_AT_END) { break; } /* We can determine if we've reached the end by checking if ma_data_source_read_pcm_frames_within_range() returned MA_AT_END. To loop back to the start, all we need to do is seek back to the first frame. */ if (result == MA_AT_END) { /* The result needs to be reset back to MA_SUCCESS (from MA_AT_END) so that we don't accidentally return MA_AT_END when data has been read in prior loop iterations. at the end of this function, the result will be checked for MA_SUCCESS, and if the total number of frames processed is 0, will be explicitly set to MA_AT_END. */ result = MA_SUCCESS; /* We reached the end. If we're looping, we just loop back to the start of the current data source. If we're not looping we need to check if we have another in the chain, and if so, switch to it. */ if (loop) { if (framesProcessed == 0) { emptyLoopCounter += 1; if (emptyLoopCounter > 1) { break; /* Infinite loop detected. Get out. */ } } else { emptyLoopCounter = 0; } result = ma_data_source_seek_to_pcm_frame(pCurrentDataSource, pCurrentDataSource->loopBegInFrames); if (result != MA_SUCCESS) { break; /* Failed to loop. Abort. */ } /* Don't return MA_AT_END for looping sounds. */ result = MA_SUCCESS; } else { if (pCurrentDataSource->pNext != NULL) { pDataSourceBase->pCurrent = pCurrentDataSource->pNext; } else if (pCurrentDataSource->onGetNext != NULL) { pDataSourceBase->pCurrent = pCurrentDataSource->onGetNext(pCurrentDataSource); if (pDataSourceBase->pCurrent == NULL) { break; /* Our callback did not return a next data source. We're done. */ } } else { /* Reached the end of the chain. We're done. */ break; } /* The next data source needs to be rewound to ensure data is read in looping scenarios. */ result = ma_data_source_seek_to_pcm_frame(pDataSourceBase->pCurrent, 0); if (result != MA_SUCCESS) { break; } } } if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesProcessed * ma_get_bytes_per_frame(format, channels)); } } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } MA_ASSERT(!(result == MA_AT_END && totalFramesProcessed > 0)); /* We should never be returning MA_AT_END if we read some data. */ if (result == MA_SUCCESS && totalFramesProcessed == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked) { return ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, pFramesSeeked); } MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } if (pDataSourceBase->vtable->onSeek == NULL) { return MA_NOT_IMPLEMENTED; } if (frameIndex > pDataSourceBase->rangeEndInFrames) { return MA_INVALID_OPERATION; /* Trying to seek too far forward. */ } MA_ASSERT(pDataSourceBase->vtable != NULL); return pDataSourceBase->vtable->onSeek(pDataSource, pDataSourceBase->rangeBegInFrames + frameIndex); } MA_API ma_result ma_data_source_seek_seconds(ma_data_source* pDataSource, float secondCount, float* pSecondsSeeked) { ma_uint64 frameCount; ma_uint64 framesSeeked = 0; ma_uint32 sampleRate; ma_result result; if (pDataSource == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames instead of seconds */ frameCount = (ma_uint64)(secondCount * sampleRate); result = ma_data_source_seek_pcm_frames(pDataSource, frameCount, &framesSeeked); /* VC6 doesn't support division between unsigned 64-bit integer and floating point number. Signed integer needed. This shouldn't affect anything in practice */ *pSecondsSeeked = (ma_int64)framesSeeked / (float)sampleRate; return result; } MA_API ma_result ma_data_source_seek_to_second(ma_data_source* pDataSource, float seekPointInSeconds) { ma_uint64 frameIndex; ma_uint32 sampleRate; ma_result result; if (pDataSource == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames instead of seconds */ frameIndex = (ma_uint64)(seekPointInSeconds * sampleRate); return ma_data_source_seek_to_pcm_frame(pDataSource, frameIndex); } MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; /* Initialize to defaults for safety just in case the data source does not implement this callback. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if (pDataSourceBase->vtable->onGetDataFormat == NULL) { return MA_NOT_IMPLEMENTED; } result = pDataSourceBase->vtable->onGetDataFormat(pDataSource, &format, &channels, &sampleRate, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { return result; } if (pFormat != NULL) { *pFormat = format; } if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = sampleRate; } /* Channel map was passed in directly to the callback. This is safe due to the channelMapCap parameter. */ return MA_SUCCESS; } MA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 cursor; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pDataSourceBase == NULL) { return MA_SUCCESS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if (pDataSourceBase->vtable->onGetCursor == NULL) { return MA_NOT_IMPLEMENTED; } result = pDataSourceBase->vtable->onGetCursor(pDataSourceBase, &cursor); if (result != MA_SUCCESS) { return result; } /* The cursor needs to be made relative to the start of the range. */ if (cursor < pDataSourceBase->rangeBegInFrames) { /* Safety check so we don't return some huge number. */ *pCursor = 0; } else { *pCursor = cursor - pDataSourceBase->rangeBegInFrames; } return MA_SUCCESS; } MA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); /* If we have a range defined we'll use that to determine the length. This is one of rare times where we'll actually trust the caller. If they've set the range, I think it's mostly safe to assume they've set it based on some higher level knowledge of the structure of the sound bank. */ if (pDataSourceBase->rangeEndInFrames != ~((ma_uint64)0)) { *pLength = pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames; return MA_SUCCESS; } /* Getting here means a range is not defined so we'll need to get the data source itself to tell us the length. */ if (pDataSourceBase->vtable->onGetLength == NULL) { return MA_NOT_IMPLEMENTED; } return pDataSourceBase->vtable->onGetLength(pDataSource, pLength); } MA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor) { ma_result result; ma_uint64 cursorInPCMFrames; ma_uint32 sampleRate; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &cursorInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength) { ma_result result; ma_uint64 lengthInPCMFrames; ma_uint32 sampleRate; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; result = ma_data_source_get_length_in_pcm_frames(pDataSource, &lengthInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pLength = (ma_int64)lengthInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_32(&pDataSourceBase->isLooping, isLooping); MA_ASSERT(pDataSourceBase->vtable != NULL); /* If there's no callback for this just treat it as a successful no-op. */ if (pDataSourceBase->vtable->onSetLooping == NULL) { return MA_SUCCESS; } return pDataSourceBase->vtable->onSetLooping(pDataSource, isLooping); } MA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_FALSE; } return ma_atomic_load_32(&pDataSourceBase->isLooping); } MA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 relativeCursor; ma_uint64 absoluteCursor; ma_bool32 doSeekAdjustment = MA_FALSE; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if (rangeEndInFrames < rangeBegInFrames) { return MA_INVALID_ARGS; /* The end of the range must come after the beginning. */ } /* We may need to adjust the position of the cursor to ensure it's clamped to the range. Grab it now so we can calculate its absolute position before we change the range. */ result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &relativeCursor); if (result == MA_SUCCESS) { doSeekAdjustment = MA_TRUE; absoluteCursor = relativeCursor + pDataSourceBase->rangeBegInFrames; } else { /* We couldn't get the position of the cursor. It probably means the data source has no notion of a cursor. We'll just leave it at position 0. Don't treat this as an error. */ doSeekAdjustment = MA_FALSE; relativeCursor = 0; absoluteCursor = 0; } pDataSourceBase->rangeBegInFrames = rangeBegInFrames; pDataSourceBase->rangeEndInFrames = rangeEndInFrames; /* The commented out logic below was intended to maintain loop points in response to a change in the range. However, this is not useful because it results in the sound breaking when you move the range outside of the old loop points. I'm simplifying this by simply resetting the loop points. The caller is expected to update their loop points if they change the range. In practice this should be mostly a non-issue because the majority of the time the range will be set once right after initialization. */ pDataSourceBase->loopBegInFrames = 0; pDataSourceBase->loopEndInFrames = ~((ma_uint64)0); /* Seek to within range. Note that our seek positions here are relative to the new range. We don't want to do this if we failed to retrieve the cursor earlier on because it probably means the data source has no notion of a cursor. In practice the seek would probably fail (which we silently ignore), but I'm just not even going to attempt it. */ if (doSeekAdjustment) { if (absoluteCursor < rangeBegInFrames) { ma_data_source_seek_to_pcm_frame(pDataSource, 0); } else if (absoluteCursor > rangeEndInFrames) { ma_data_source_seek_to_pcm_frame(pDataSource, rangeEndInFrames - rangeBegInFrames); } } return MA_SUCCESS; } MA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pRangeBegInFrames != NULL) { *pRangeBegInFrames = 0; } if (pRangeEndInFrames != NULL) { *pRangeEndInFrames = 0; } if (pDataSource == NULL) { return; } if (pRangeBegInFrames != NULL) { *pRangeBegInFrames = pDataSourceBase->rangeBegInFrames; } if (pRangeEndInFrames != NULL) { *pRangeEndInFrames = pDataSourceBase->rangeEndInFrames; } } MA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if (loopEndInFrames < loopBegInFrames) { return MA_INVALID_ARGS; /* The end of the loop point must come after the beginning. */ } if (loopEndInFrames > pDataSourceBase->rangeEndInFrames && loopEndInFrames != ~((ma_uint64)0)) { return MA_INVALID_ARGS; /* The end of the loop point must not go beyond the range. */ } pDataSourceBase->loopBegInFrames = loopBegInFrames; pDataSourceBase->loopEndInFrames = loopEndInFrames; /* The end cannot exceed the range. */ if (pDataSourceBase->loopEndInFrames > (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames) && pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) { pDataSourceBase->loopEndInFrames = (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames); } return MA_SUCCESS; } MA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pLoopBegInFrames != NULL) { *pLoopBegInFrames = 0; } if (pLoopEndInFrames != NULL) { *pLoopEndInFrames = 0; } if (pDataSource == NULL) { return; } if (pLoopBegInFrames != NULL) { *pLoopBegInFrames = pDataSourceBase->loopBegInFrames; } if (pLoopEndInFrames != NULL) { *pLoopEndInFrames = pDataSourceBase->loopEndInFrames; } } MA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->pCurrent = pCurrentDataSource; return MA_SUCCESS; } MA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->pCurrent; } MA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->pNext = pNextDataSource; return MA_SUCCESS; } MA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->pNext; } MA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->onGetNext = onGetNext; return MA_SUCCESS; } MA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->onGetNext; } static ma_result ma_audio_buffer_ref__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; ma_uint64 framesRead = ma_audio_buffer_ref_read_pcm_frames(pAudioBufferRef, pFramesOut, frameCount, MA_FALSE); if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (framesRead < frameCount || framesRead == 0) { return MA_AT_END; } return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_audio_buffer_ref_seek_to_pcm_frame((ma_audio_buffer_ref*)pDataSource, frameIndex); } static ma_result ma_audio_buffer_ref__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pFormat = pAudioBufferRef->format; *pChannels = pAudioBufferRef->channels; *pSampleRate = pAudioBufferRef->sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pAudioBufferRef->channels); return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pCursor = pAudioBufferRef->cursor; return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pLength = pAudioBufferRef->sizeInFrames; return MA_SUCCESS; } static ma_data_source_vtable g_ma_audio_buffer_ref_data_source_vtable = { ma_audio_buffer_ref__data_source_on_read, ma_audio_buffer_ref__data_source_on_seek, ma_audio_buffer_ref__data_source_on_get_data_format, ma_audio_buffer_ref__data_source_on_get_cursor, ma_audio_buffer_ref__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef) { ma_result result; ma_data_source_config dataSourceConfig; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pAudioBufferRef); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_audio_buffer_ref_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pAudioBufferRef->ds); if (result != MA_SUCCESS) { return result; } pAudioBufferRef->format = format; pAudioBufferRef->channels = channels; pAudioBufferRef->sampleRate = 0; /* TODO: Version 0.12. Set this to sampleRate. */ pAudioBufferRef->cursor = 0; pAudioBufferRef->sizeInFrames = sizeInFrames; pAudioBufferRef->pData = pData; return MA_SUCCESS; } MA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef) { if (pAudioBufferRef == NULL) { return; } ma_data_source_uninit(&pAudioBufferRef->ds); } MA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames) { if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } pAudioBufferRef->cursor = 0; pAudioBufferRef->sizeInFrames = sizeInFrames; pAudioBufferRef->pData = pData; return MA_SUCCESS; } MA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop) { ma_uint64 totalFramesRead = 0; if (pAudioBufferRef == NULL) { return 0; } if (frameCount == 0) { return 0; } while (totalFramesRead < frameCount) { ma_uint64 framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; ma_uint64 framesRemaining = frameCount - totalFramesRead; ma_uint64 framesToRead; framesToRead = framesRemaining; if (framesToRead > framesAvailable) { framesToRead = framesAvailable; } if (pFramesOut != NULL) { ma_copy_pcm_frames(ma_offset_ptr(pFramesOut, totalFramesRead * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), framesToRead, pAudioBufferRef->format, pAudioBufferRef->channels); } totalFramesRead += framesToRead; pAudioBufferRef->cursor += framesToRead; if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) { if (loop) { pAudioBufferRef->cursor = 0; } else { break; /* We've reached the end and we're not looping. Done. */ } } MA_ASSERT(pAudioBufferRef->cursor < pAudioBufferRef->sizeInFrames); } return totalFramesRead; } MA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex) { if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } if (frameIndex > pAudioBufferRef->sizeInFrames) { return MA_INVALID_ARGS; } pAudioBufferRef->cursor = (size_t)frameIndex; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount) { ma_uint64 framesAvailable; ma_uint64 frameCount = 0; if (ppFramesOut != NULL) { *ppFramesOut = NULL; /* Safety. */ } if (pFrameCount != NULL) { frameCount = *pFrameCount; *pFrameCount = 0; /* Safety. */ } if (pAudioBufferRef == NULL || ppFramesOut == NULL || pFrameCount == NULL) { return MA_INVALID_ARGS; } framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; if (frameCount > framesAvailable) { frameCount = framesAvailable; } *ppFramesOut = ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)); *pFrameCount = frameCount; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount) { ma_uint64 framesAvailable; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; if (frameCount > framesAvailable) { return MA_INVALID_ARGS; /* The frame count was too big. This should never happen in an unmapping. Need to make sure the caller is aware of this. */ } pAudioBufferRef->cursor += frameCount; if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) { return MA_AT_END; /* Successful. Need to tell the caller that the end has been reached so that it can loop if desired. */ } else { return MA_SUCCESS; } } MA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef) { if (pAudioBufferRef == NULL) { return MA_FALSE; } return pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames; } MA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } *pCursor = pAudioBufferRef->cursor; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } *pLength = pAudioBufferRef->sizeInFrames; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } if (pAudioBufferRef->sizeInFrames <= pAudioBufferRef->cursor) { *pAvailableFrames = 0; } else { *pAvailableFrames = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; } return MA_SUCCESS; } MA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_audio_buffer_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = 0; /* TODO: Version 0.12. Set this to sampleRate. */ config.sizeInFrames = sizeInFrames; config.pData = pData; ma_allocation_callbacks_init_copy(&config.allocationCallbacks, pAllocationCallbacks); return config; } static ma_result ma_audio_buffer_init_ex(const ma_audio_buffer_config* pConfig, ma_bool32 doCopy, ma_audio_buffer* pAudioBuffer) { ma_result result; if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_MEMORY(pAudioBuffer, sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData)); /* Safety. Don't overwrite the extra data. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->sizeInFrames == 0) { return MA_INVALID_ARGS; /* Not allowing buffer sizes of 0 frames. */ } result = ma_audio_buffer_ref_init(pConfig->format, pConfig->channels, NULL, 0, &pAudioBuffer->ref); if (result != MA_SUCCESS) { return result; } /* TODO: Version 0.12. Set this in ma_audio_buffer_ref_init() instead of here. */ pAudioBuffer->ref.sampleRate = pConfig->sampleRate; ma_allocation_callbacks_init_copy(&pAudioBuffer->allocationCallbacks, &pConfig->allocationCallbacks); if (doCopy) { ma_uint64 allocationSizeInBytes; void* pData; allocationSizeInBytes = pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels); if (allocationSizeInBytes > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pData = ma_malloc((size_t)allocationSizeInBytes, &pAudioBuffer->allocationCallbacks); /* Safe cast to size_t. */ if (pData == NULL) { return MA_OUT_OF_MEMORY; } if (pConfig->pData != NULL) { ma_copy_pcm_frames(pData, pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } else { ma_silence_pcm_frames(pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pData, pConfig->sizeInFrames); pAudioBuffer->ownsData = MA_TRUE; } else { ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pConfig->pData, pConfig->sizeInFrames); pAudioBuffer->ownsData = MA_FALSE; } return MA_SUCCESS; } static void ma_audio_buffer_uninit_ex(ma_audio_buffer* pAudioBuffer, ma_bool32 doFree) { if (pAudioBuffer == NULL) { return; } if (pAudioBuffer->ownsData && pAudioBuffer->ref.pData != &pAudioBuffer->_pExtraData[0]) { ma_free((void*)pAudioBuffer->ref.pData, &pAudioBuffer->allocationCallbacks); /* Naugty const cast, but OK in this case since we've guarded it with the ownsData check. */ } if (doFree) { ma_free(pAudioBuffer, &pAudioBuffer->allocationCallbacks); } ma_audio_buffer_ref_uninit(&pAudioBuffer->ref); } MA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer) { return ma_audio_buffer_init_ex(pConfig, MA_FALSE, pAudioBuffer); } MA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer) { return ma_audio_buffer_init_ex(pConfig, MA_TRUE, pAudioBuffer); } MA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer) { ma_result result; ma_audio_buffer* pAudioBuffer; ma_audio_buffer_config innerConfig; /* We'll be making some changes to the config, so need to make a copy. */ ma_uint64 allocationSizeInBytes; if (ppAudioBuffer == NULL) { return MA_INVALID_ARGS; } *ppAudioBuffer = NULL; /* Safety. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } innerConfig = *pConfig; ma_allocation_callbacks_init_copy(&innerConfig.allocationCallbacks, &pConfig->allocationCallbacks); allocationSizeInBytes = sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData) + (pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels)); if (allocationSizeInBytes > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pAudioBuffer = (ma_audio_buffer*)ma_malloc((size_t)allocationSizeInBytes, &innerConfig.allocationCallbacks); /* Safe cast to size_t. */ if (pAudioBuffer == NULL) { return MA_OUT_OF_MEMORY; } if (pConfig->pData != NULL) { ma_copy_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } else { ma_silence_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->sizeInFrames, pConfig->format, pConfig->channels); } innerConfig.pData = &pAudioBuffer->_pExtraData[0]; result = ma_audio_buffer_init_ex(&innerConfig, MA_FALSE, pAudioBuffer); if (result != MA_SUCCESS) { ma_free(pAudioBuffer, &innerConfig.allocationCallbacks); return result; } *ppAudioBuffer = pAudioBuffer; return MA_SUCCESS; } MA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer) { ma_audio_buffer_uninit_ex(pAudioBuffer, MA_FALSE); } MA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer) { ma_audio_buffer_uninit_ex(pAudioBuffer, MA_TRUE); } MA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop) { if (pAudioBuffer == NULL) { return 0; } return ma_audio_buffer_ref_read_pcm_frames(&pAudioBuffer->ref, pFramesOut, frameCount, loop); } MA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_seek_to_pcm_frame(&pAudioBuffer->ref, frameIndex); } MA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount) { if (ppFramesOut != NULL) { *ppFramesOut = NULL; /* Safety. */ } if (pAudioBuffer == NULL) { if (pFrameCount != NULL) { *pFrameCount = 0; } return MA_INVALID_ARGS; } return ma_audio_buffer_ref_map(&pAudioBuffer->ref, ppFramesOut, pFrameCount); } MA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_unmap(&pAudioBuffer->ref, frameCount); } MA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer) { if (pAudioBuffer == NULL) { return MA_FALSE; } return ma_audio_buffer_ref_at_end(&pAudioBuffer->ref); } MA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_cursor_in_pcm_frames(&pAudioBuffer->ref, pCursor); } MA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_length_in_pcm_frames(&pAudioBuffer->ref, pLength); } MA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_available_frames(&pAudioBuffer->ref, pAvailableFrames); } MA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pData); pData->format = format; pData->channels = channels; pData->pTail = &pData->head; return MA_SUCCESS; } MA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_paged_audio_buffer_page* pPage; if (pData == NULL) { return; } /* All pages need to be freed. */ pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext); while (pPage != NULL) { ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext); ma_free(pPage, pAllocationCallbacks); pPage = pNext; } } MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return NULL; } return &pData->head; } MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return NULL; } return pData->pTail; } MA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength) { ma_paged_audio_buffer_page* pPage; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pData == NULL) { return MA_INVALID_ARGS; } /* Calculate the length from the linked list. */ for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) { *pLength += pPage->sizeInFrames; } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage) { ma_paged_audio_buffer_page* pPage; ma_uint64 allocationSize; if (ppPage == NULL) { return MA_INVALID_ARGS; } *ppPage = NULL; if (pData == NULL) { return MA_INVALID_ARGS; } allocationSize = sizeof(*pPage) + (pageSizeInFrames * ma_get_bytes_per_frame(pData->format, pData->channels)); if (allocationSize > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pPage = (ma_paged_audio_buffer_page*)ma_malloc((size_t)allocationSize, pAllocationCallbacks); /* Safe cast to size_t. */ if (pPage == NULL) { return MA_OUT_OF_MEMORY; } pPage->pNext = NULL; pPage->sizeInFrames = pageSizeInFrames; if (pInitialData != NULL) { ma_copy_pcm_frames(pPage->pAudioData, pInitialData, pageSizeInFrames, pData->format, pData->channels); } *ppPage = pPage; return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks) { if (pData == NULL || pPage == NULL) { return MA_INVALID_ARGS; } /* It's assumed the page is not attached to the list. */ ma_free(pPage, pAllocationCallbacks); return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage) { if (pData == NULL || pPage == NULL) { return MA_INVALID_ARGS; } /* This function assumes the page has been filled with audio data by this point. As soon as we append, the page will be available for reading. */ /* First thing to do is update the tail. */ for (;;) { ma_paged_audio_buffer_page* pOldTail = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->pTail); ma_paged_audio_buffer_page* pNewTail = pPage; if (ma_atomic_compare_exchange_weak_ptr((volatile void**)&pData->pTail, (void**)&pOldTail, pNewTail)) { /* Here is where we append the page to the list. After this, the page is attached to the list and ready to be read from. */ ma_atomic_exchange_ptr(&pOldTail->pNext, pPage); break; /* Done. */ } } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_paged_audio_buffer_page* pPage; result = ma_paged_audio_buffer_data_allocate_page(pData, pageSizeInFrames, pInitialData, pAllocationCallbacks, &pPage); if (result != MA_SUCCESS) { return result; } return ma_paged_audio_buffer_data_append_page(pData, pPage); /* <-- Should never fail. */ } MA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData) { ma_paged_audio_buffer_config config; MA_ZERO_OBJECT(&config); config.pData = pData; return config; } static ma_result ma_paged_audio_buffer__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_paged_audio_buffer_read_pcm_frames((ma_paged_audio_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_paged_audio_buffer__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_paged_audio_buffer_seek_to_pcm_frame((ma_paged_audio_buffer*)pDataSource, frameIndex); } static ma_result ma_paged_audio_buffer__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_paged_audio_buffer* pPagedAudioBuffer = (ma_paged_audio_buffer*)pDataSource; *pFormat = pPagedAudioBuffer->pData->format; *pChannels = pPagedAudioBuffer->pData->channels; *pSampleRate = 0; /* There is no notion of a sample rate with audio buffers. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pPagedAudioBuffer->pData->channels); return MA_SUCCESS; } static ma_result ma_paged_audio_buffer__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_paged_audio_buffer_get_cursor_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pCursor); } static ma_result ma_paged_audio_buffer__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_paged_audio_buffer_get_length_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pLength); } static ma_data_source_vtable g_ma_paged_audio_buffer_data_source_vtable = { ma_paged_audio_buffer__data_source_on_read, ma_paged_audio_buffer__data_source_on_seek, ma_paged_audio_buffer__data_source_on_get_data_format, ma_paged_audio_buffer__data_source_on_get_cursor, ma_paged_audio_buffer__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer) { ma_result result; ma_data_source_config dataSourceConfig; if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pPagedAudioBuffer); /* A config is required for the format and channel count. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pData == NULL) { return MA_INVALID_ARGS; /* No underlying data specified. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_paged_audio_buffer_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pPagedAudioBuffer->ds); if (result != MA_SUCCESS) { return result; } pPagedAudioBuffer->pData = pConfig->pData; pPagedAudioBuffer->pCurrent = ma_paged_audio_buffer_data_get_head(pConfig->pData); pPagedAudioBuffer->relativeCursor = 0; pPagedAudioBuffer->absoluteCursor = 0; return MA_SUCCESS; } MA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer) { if (pPagedAudioBuffer == NULL) { return; } /* Nothing to do. The data needs to be deleted separately. */ } MA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesRead = 0; ma_format format; ma_uint32 channels; if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } format = pPagedAudioBuffer->pData->format; channels = pPagedAudioBuffer->pData->channels; while (totalFramesRead < frameCount) { /* Read from the current page. The buffer should never be in a state where this is NULL. */ ma_uint64 framesRemainingInCurrentPage; ma_uint64 framesRemainingToRead = frameCount - totalFramesRead; ma_uint64 framesToReadThisIteration; MA_ASSERT(pPagedAudioBuffer->pCurrent != NULL); framesRemainingInCurrentPage = pPagedAudioBuffer->pCurrent->sizeInFrames - pPagedAudioBuffer->relativeCursor; framesToReadThisIteration = ma_min(framesRemainingInCurrentPage, framesRemainingToRead); ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), ma_offset_pcm_frames_ptr(pPagedAudioBuffer->pCurrent->pAudioData, pPagedAudioBuffer->relativeCursor, format, channels), framesToReadThisIteration, format, channels); totalFramesRead += framesToReadThisIteration; pPagedAudioBuffer->absoluteCursor += framesToReadThisIteration; pPagedAudioBuffer->relativeCursor += framesToReadThisIteration; /* Move to the next page if necessary. If there's no more pages, we need to return MA_AT_END. */ MA_ASSERT(pPagedAudioBuffer->relativeCursor <= pPagedAudioBuffer->pCurrent->sizeInFrames); if (pPagedAudioBuffer->relativeCursor == pPagedAudioBuffer->pCurrent->sizeInFrames) { /* We reached the end of the page. Need to move to the next. If there's no more pages, we're done. */ ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPagedAudioBuffer->pCurrent->pNext); if (pNext == NULL) { result = MA_AT_END; break; /* We've reached the end. */ } else { pPagedAudioBuffer->pCurrent = pNext; pPagedAudioBuffer->relativeCursor = 0; } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } MA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex) { if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } if (frameIndex == pPagedAudioBuffer->absoluteCursor) { return MA_SUCCESS; /* Nothing to do. */ } if (frameIndex < pPagedAudioBuffer->absoluteCursor) { /* Moving backwards. Need to move the cursor back to the start, and then move forward. */ pPagedAudioBuffer->pCurrent = ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData); pPagedAudioBuffer->absoluteCursor = 0; pPagedAudioBuffer->relativeCursor = 0; /* Fall through to the forward seeking section below. */ } if (frameIndex > pPagedAudioBuffer->absoluteCursor) { /* Moving forward. */ ma_paged_audio_buffer_page* pPage; ma_uint64 runningCursor = 0; for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData)->pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) { ma_uint64 pageRangeBeg = runningCursor; ma_uint64 pageRangeEnd = pageRangeBeg + pPage->sizeInFrames; if (frameIndex >= pageRangeBeg) { if (frameIndex < pageRangeEnd || (frameIndex == pageRangeEnd && pPage == (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(ma_paged_audio_buffer_data_get_tail(pPagedAudioBuffer->pData)))) { /* A small edge case - allow seeking to the very end of the buffer. */ /* We found the page. */ pPagedAudioBuffer->pCurrent = pPage; pPagedAudioBuffer->absoluteCursor = frameIndex; pPagedAudioBuffer->relativeCursor = frameIndex - pageRangeBeg; return MA_SUCCESS; } } runningCursor = pageRangeEnd; } /* Getting here means we tried seeking too far forward. Don't change any state. */ return MA_BAD_SEEK; } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } *pCursor = pPagedAudioBuffer->absoluteCursor; return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength) { return ma_paged_audio_buffer_data_get_length_in_pcm_frames(pPagedAudioBuffer->pData, pLength); } /************************************************************************************************************************************************************** VFS **************************************************************************************************************************************************************/ MA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pVFS == NULL || pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } if (pCallbacks->onOpen == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onOpen(pVFS, pFilePath, openMode, pFile); } MA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pVFS == NULL || pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } if (pCallbacks->onOpenW == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onOpenW(pVFS, pFilePath, openMode, pFile); } MA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onClose == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onClose(pVFS, file); } MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; ma_result result; size_t bytesRead = 0; if (pBytesRead != NULL) { *pBytesRead = 0; } if (pVFS == NULL || file == NULL || pDst == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onRead == NULL) { return MA_NOT_IMPLEMENTED; } result = pCallbacks->onRead(pVFS, file, pDst, sizeInBytes, &bytesRead); if (pBytesRead != NULL) { *pBytesRead = bytesRead; } if (result == MA_SUCCESS && bytesRead == 0 && sizeInBytes > 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (pVFS == NULL || file == NULL || pSrc == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onWrite == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onWrite(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } MA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onSeek == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onSeek(pVFS, file, offset, origin); } MA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onTell == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onTell(pVFS, file, pCursor); } MA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pInfo); if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onInfo == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onInfo(pVFS, file, pInfo); } #if !defined(MA_USE_WIN32_FILEIO) && (defined(MA_WIN32) && defined(MA_WIN32_DESKTOP) && !defined(MA_NO_WIN32_FILEIO) && !defined(MA_POSIX)) #define MA_USE_WIN32_FILEIO #endif #if defined(MA_USE_WIN32_FILEIO) /* We need to dynamically load SetFilePointer or SetFilePointerEx because older versions of Windows do not have the Ex version. We therefore need to do some dynamic branching depending on what's available. We load these when we load our first file from the default VFS. It's left open for the life of the program and is left to the OS to uninitialize when the program terminates. */ typedef DWORD (__stdcall * ma_SetFilePointer_proc)(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod); typedef BOOL (__stdcall * ma_SetFilePointerEx_proc)(HANDLE hFile, LARGE_INTEGER liDistanceToMove, LARGE_INTEGER* lpNewFilePointer, DWORD dwMoveMethod); static ma_handle hKernel32DLL = NULL; static ma_SetFilePointer_proc ma_SetFilePointer = NULL; static ma_SetFilePointerEx_proc ma_SetFilePointerEx = NULL; static void ma_win32_fileio_init(void) { if (hKernel32DLL == NULL) { hKernel32DLL = ma_dlopen(NULL, "kernel32.dll"); if (hKernel32DLL != NULL) { ma_SetFilePointer = (ma_SetFilePointer_proc) ma_dlsym(NULL, hKernel32DLL, "SetFilePointer"); ma_SetFilePointerEx = (ma_SetFilePointerEx_proc)ma_dlsym(NULL, hKernel32DLL, "SetFilePointerEx"); } } } static void ma_default_vfs__get_open_settings_win32(ma_uint32 openMode, DWORD* pDesiredAccess, DWORD* pShareMode, DWORD* pCreationDisposition) { *pDesiredAccess = 0; if ((openMode & MA_OPEN_MODE_READ) != 0) { *pDesiredAccess |= GENERIC_READ; } if ((openMode & MA_OPEN_MODE_WRITE) != 0) { *pDesiredAccess |= GENERIC_WRITE; } *pShareMode = 0; if ((openMode & MA_OPEN_MODE_READ) != 0) { *pShareMode |= FILE_SHARE_READ; } if ((openMode & MA_OPEN_MODE_WRITE) != 0) { *pCreationDisposition = CREATE_ALWAYS; /* Opening in write mode. Truncate. */ } else { *pCreationDisposition = OPEN_EXISTING; /* Opening in read mode. File must exist. */ } } static ma_result ma_default_vfs_open__win32(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { HANDLE hFile; DWORD dwDesiredAccess; DWORD dwShareMode; DWORD dwCreationDisposition; (void)pVFS; /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */ ma_win32_fileio_init(); ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition); hFile = CreateFileA(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return ma_result_from_GetLastError(GetLastError()); } *pFile = hFile; return MA_SUCCESS; } static ma_result ma_default_vfs_open_w__win32(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { HANDLE hFile; DWORD dwDesiredAccess; DWORD dwShareMode; DWORD dwCreationDisposition; (void)pVFS; /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */ ma_win32_fileio_init(); ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition); hFile = CreateFileW(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return ma_result_from_GetLastError(GetLastError()); } *pFile = hFile; return MA_SUCCESS; } static ma_result ma_default_vfs_close__win32(ma_vfs* pVFS, ma_vfs_file file) { (void)pVFS; if (CloseHandle((HANDLE)file) == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_default_vfs_read__win32(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { ma_result result = MA_SUCCESS; size_t totalBytesRead; (void)pVFS; totalBytesRead = 0; while (totalBytesRead < sizeInBytes) { size_t bytesRemaining; DWORD bytesToRead; DWORD bytesRead; BOOL readResult; bytesRemaining = sizeInBytes - totalBytesRead; if (bytesRemaining >= 0xFFFFFFFF) { bytesToRead = 0xFFFFFFFF; } else { bytesToRead = (DWORD)bytesRemaining; } readResult = ReadFile((HANDLE)file, ma_offset_ptr(pDst, totalBytesRead), bytesToRead, &bytesRead, NULL); if (readResult == 1 && bytesRead == 0) { result = MA_AT_END; break; /* EOF */ } totalBytesRead += bytesRead; if (bytesRead < bytesToRead) { break; /* EOF */ } if (readResult == 0) { result = ma_result_from_GetLastError(GetLastError()); break; } } if (pBytesRead != NULL) { *pBytesRead = totalBytesRead; } return result; } static ma_result ma_default_vfs_write__win32(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { ma_result result = MA_SUCCESS; size_t totalBytesWritten; (void)pVFS; totalBytesWritten = 0; while (totalBytesWritten < sizeInBytes) { size_t bytesRemaining; DWORD bytesToWrite; DWORD bytesWritten; BOOL writeResult; bytesRemaining = sizeInBytes - totalBytesWritten; if (bytesRemaining >= 0xFFFFFFFF) { bytesToWrite = 0xFFFFFFFF; } else { bytesToWrite = (DWORD)bytesRemaining; } writeResult = WriteFile((HANDLE)file, ma_offset_ptr(pSrc, totalBytesWritten), bytesToWrite, &bytesWritten, NULL); totalBytesWritten += bytesWritten; if (writeResult == 0) { result = ma_result_from_GetLastError(GetLastError()); break; } } if (pBytesWritten != NULL) { *pBytesWritten = totalBytesWritten; } return result; } static ma_result ma_default_vfs_seek__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { LARGE_INTEGER liDistanceToMove; DWORD dwMoveMethod; BOOL result; (void)pVFS; liDistanceToMove.QuadPart = offset; /* */ if (origin == ma_seek_origin_current) { dwMoveMethod = FILE_CURRENT; } else if (origin == ma_seek_origin_end) { dwMoveMethod = FILE_END; } else { dwMoveMethod = FILE_BEGIN; } if (ma_SetFilePointerEx != NULL) { result = ma_SetFilePointerEx((HANDLE)file, liDistanceToMove, NULL, dwMoveMethod); } else if (ma_SetFilePointer != NULL) { /* No SetFilePointerEx() so restrict to 31 bits. */ if (offset > 0x7FFFFFFF) { return MA_OUT_OF_RANGE; } result = ma_SetFilePointer((HANDLE)file, (LONG)liDistanceToMove.QuadPart, NULL, dwMoveMethod); } else { return MA_NOT_IMPLEMENTED; } if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_default_vfs_tell__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { LARGE_INTEGER liZero; LARGE_INTEGER liTell; BOOL result; (void)pVFS; liZero.QuadPart = 0; if (ma_SetFilePointerEx != NULL) { result = ma_SetFilePointerEx((HANDLE)file, liZero, &liTell, FILE_CURRENT); } else if (ma_SetFilePointer != NULL) { LONG tell; result = ma_SetFilePointer((HANDLE)file, (LONG)liZero.QuadPart, &tell, FILE_CURRENT); liTell.QuadPart = tell; } else { return MA_NOT_IMPLEMENTED; } if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } if (pCursor != NULL) { *pCursor = liTell.QuadPart; } return MA_SUCCESS; } static ma_result ma_default_vfs_info__win32(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { BY_HANDLE_FILE_INFORMATION fi; BOOL result; (void)pVFS; result = GetFileInformationByHandle((HANDLE)file, &fi); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } pInfo->sizeInBytes = ((ma_uint64)fi.nFileSizeHigh << 32) | ((ma_uint64)fi.nFileSizeLow); return MA_SUCCESS; } #else static ma_result ma_default_vfs_open__stdio(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_result result; FILE* pFileStd; const char* pOpenModeStr; MA_ASSERT(pFilePath != NULL); MA_ASSERT(openMode != 0); MA_ASSERT(pFile != NULL); (void)pVFS; if ((openMode & MA_OPEN_MODE_READ) != 0) { if ((openMode & MA_OPEN_MODE_WRITE) != 0) { pOpenModeStr = "r+"; } else { pOpenModeStr = "rb"; } } else { pOpenModeStr = "wb"; } result = ma_fopen(&pFileStd, pFilePath, pOpenModeStr); if (result != MA_SUCCESS) { return result; } *pFile = pFileStd; return MA_SUCCESS; } static ma_result ma_default_vfs_open_w__stdio(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_result result; FILE* pFileStd; const wchar_t* pOpenModeStr; MA_ASSERT(pFilePath != NULL); MA_ASSERT(openMode != 0); MA_ASSERT(pFile != NULL); (void)pVFS; if ((openMode & MA_OPEN_MODE_READ) != 0) { if ((openMode & MA_OPEN_MODE_WRITE) != 0) { pOpenModeStr = L"r+"; } else { pOpenModeStr = L"rb"; } } else { pOpenModeStr = L"wb"; } result = ma_wfopen(&pFileStd, pFilePath, pOpenModeStr, (pVFS != NULL) ? &((ma_default_vfs*)pVFS)->allocationCallbacks : NULL); if (result != MA_SUCCESS) { return result; } *pFile = pFileStd; return MA_SUCCESS; } static ma_result ma_default_vfs_close__stdio(ma_vfs* pVFS, ma_vfs_file file) { MA_ASSERT(file != NULL); (void)pVFS; fclose((FILE*)file); return MA_SUCCESS; } static ma_result ma_default_vfs_read__stdio(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { size_t result; MA_ASSERT(file != NULL); MA_ASSERT(pDst != NULL); (void)pVFS; result = fread(pDst, 1, sizeInBytes, (FILE*)file); if (pBytesRead != NULL) { *pBytesRead = result; } if (result != sizeInBytes) { if (result == 0 && feof((FILE*)file)) { return MA_AT_END; } else { return ma_result_from_errno(ferror((FILE*)file)); } } return MA_SUCCESS; } static ma_result ma_default_vfs_write__stdio(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { size_t result; MA_ASSERT(file != NULL); MA_ASSERT(pSrc != NULL); (void)pVFS; result = fwrite(pSrc, 1, sizeInBytes, (FILE*)file); if (pBytesWritten != NULL) { *pBytesWritten = result; } if (result != sizeInBytes) { return ma_result_from_errno(ferror((FILE*)file)); } return MA_SUCCESS; } static ma_result ma_default_vfs_seek__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { int result; int whence; MA_ASSERT(file != NULL); (void)pVFS; if (origin == ma_seek_origin_start) { whence = SEEK_SET; } else if (origin == ma_seek_origin_end) { whence = SEEK_END; } else { whence = SEEK_CUR; } #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _fseeki64((FILE*)file, offset, whence); #else /* No _fseeki64() so restrict to 31 bits. */ if (offset > 0x7FFFFFFF) { return MA_OUT_OF_RANGE; } result = fseek((FILE*)file, (int)offset, whence); #endif #else result = fseek((FILE*)file, (long int)offset, whence); #endif if (result != 0) { return MA_ERROR; } return MA_SUCCESS; } static ma_result ma_default_vfs_tell__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { ma_int64 result; MA_ASSERT(file != NULL); MA_ASSERT(pCursor != NULL); (void)pVFS; #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _ftelli64((FILE*)file); #else result = ftell((FILE*)file); #endif #else result = ftell((FILE*)file); #endif *pCursor = result; return MA_SUCCESS; } #if !defined(_MSC_VER) && !((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)) && !defined(MA_BSD) int fileno(FILE *stream); #endif static ma_result ma_default_vfs_info__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { int fd; struct stat info; MA_ASSERT(file != NULL); MA_ASSERT(pInfo != NULL); (void)pVFS; #if defined(_MSC_VER) fd = _fileno((FILE*)file); #else fd = fileno((FILE*)file); #endif if (fstat(fd, &info) != 0) { return ma_result_from_errno(errno); } pInfo->sizeInBytes = info.st_size; return MA_SUCCESS; } #endif static ma_result ma_default_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_open__win32(pVFS, pFilePath, openMode, pFile); #else return ma_default_vfs_open__stdio(pVFS, pFilePath, openMode, pFile); #endif } static ma_result ma_default_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_open_w__win32(pVFS, pFilePath, openMode, pFile); #else return ma_default_vfs_open_w__stdio(pVFS, pFilePath, openMode, pFile); #endif } static ma_result ma_default_vfs_close(ma_vfs* pVFS, ma_vfs_file file) { if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_close__win32(pVFS, file); #else return ma_default_vfs_close__stdio(pVFS, file); #endif } static ma_result ma_default_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { if (pBytesRead != NULL) { *pBytesRead = 0; } if (file == NULL || pDst == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_read__win32(pVFS, file, pDst, sizeInBytes, pBytesRead); #else return ma_default_vfs_read__stdio(pVFS, file, pDst, sizeInBytes, pBytesRead); #endif } static ma_result ma_default_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (file == NULL || pSrc == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_write__win32(pVFS, file, pSrc, sizeInBytes, pBytesWritten); #else return ma_default_vfs_write__stdio(pVFS, file, pSrc, sizeInBytes, pBytesWritten); #endif } static ma_result ma_default_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_seek__win32(pVFS, file, offset, origin); #else return ma_default_vfs_seek__stdio(pVFS, file, offset, origin); #endif } static ma_result ma_default_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_tell__win32(pVFS, file, pCursor); #else return ma_default_vfs_tell__stdio(pVFS, file, pCursor); #endif } static ma_result ma_default_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { if (pInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pInfo); if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_info__win32(pVFS, file, pInfo); #else return ma_default_vfs_info__stdio(pVFS, file, pInfo); #endif } MA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVFS == NULL) { return MA_INVALID_ARGS; } pVFS->cb.onOpen = ma_default_vfs_open; pVFS->cb.onOpenW = ma_default_vfs_open_w; pVFS->cb.onClose = ma_default_vfs_close; pVFS->cb.onRead = ma_default_vfs_read; pVFS->cb.onWrite = ma_default_vfs_write; pVFS->cb.onSeek = ma_default_vfs_seek; pVFS->cb.onTell = ma_default_vfs_tell; pVFS->cb.onInfo = ma_default_vfs_info; ma_allocation_callbacks_init_copy(&pVFS->allocationCallbacks, pAllocationCallbacks); return MA_SUCCESS; } MA_API ma_result ma_vfs_or_default_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pVFS != NULL) { return ma_vfs_open(pVFS, pFilePath, openMode, pFile); } else { return ma_default_vfs_open(pVFS, pFilePath, openMode, pFile); } } MA_API ma_result ma_vfs_or_default_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pVFS != NULL) { return ma_vfs_open_w(pVFS, pFilePath, openMode, pFile); } else { return ma_default_vfs_open_w(pVFS, pFilePath, openMode, pFile); } } MA_API ma_result ma_vfs_or_default_close(ma_vfs* pVFS, ma_vfs_file file) { if (pVFS != NULL) { return ma_vfs_close(pVFS, file); } else { return ma_default_vfs_close(pVFS, file); } } MA_API ma_result ma_vfs_or_default_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { if (pVFS != NULL) { return ma_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead); } else { return ma_default_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead); } } MA_API ma_result ma_vfs_or_default_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { if (pVFS != NULL) { return ma_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } else { return ma_default_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } } MA_API ma_result ma_vfs_or_default_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { if (pVFS != NULL) { return ma_vfs_seek(pVFS, file, offset, origin); } else { return ma_default_vfs_seek(pVFS, file, offset, origin); } } MA_API ma_result ma_vfs_or_default_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { if (pVFS != NULL) { return ma_vfs_tell(pVFS, file, pCursor); } else { return ma_default_vfs_tell(pVFS, file, pCursor); } } MA_API ma_result ma_vfs_or_default_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { if (pVFS != NULL) { return ma_vfs_info(pVFS, file, pInfo); } else { return ma_default_vfs_info(pVFS, file, pInfo); } } static ma_result ma_vfs_open_and_read_file_ex(ma_vfs* pVFS, const char* pFilePath, const wchar_t* pFilePathW, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_vfs_file file; ma_file_info info; void* pData; size_t bytesRead; if (ppData != NULL) { *ppData = NULL; } if (pSize != NULL) { *pSize = 0; } if (ppData == NULL) { return MA_INVALID_ARGS; } if (pFilePath != NULL) { result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); } else { result = ma_vfs_or_default_open_w(pVFS, pFilePathW, MA_OPEN_MODE_READ, &file); } if (result != MA_SUCCESS) { return result; } result = ma_vfs_or_default_info(pVFS, file, &info); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } if (info.sizeInBytes > MA_SIZE_MAX) { ma_vfs_or_default_close(pVFS, file); return MA_TOO_BIG; } pData = ma_malloc((size_t)info.sizeInBytes, pAllocationCallbacks); /* Safe cast. */ if (pData == NULL) { ma_vfs_or_default_close(pVFS, file); return result; } result = ma_vfs_or_default_read(pVFS, file, pData, (size_t)info.sizeInBytes, &bytesRead); /* Safe cast. */ ma_vfs_or_default_close(pVFS, file); if (result != MA_SUCCESS) { ma_free(pData, pAllocationCallbacks); return result; } if (pSize != NULL) { *pSize = bytesRead; } MA_ASSERT(ppData != NULL); *ppData = pData; return MA_SUCCESS; } MA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_vfs_open_and_read_file_ex(pVFS, pFilePath, NULL, ppData, pSize, pAllocationCallbacks); } MA_API ma_result ma_vfs_open_and_read_file_w(ma_vfs* pVFS, const wchar_t* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_vfs_open_and_read_file_ex(pVFS, NULL, pFilePath, ppData, pSize, pAllocationCallbacks); } /************************************************************************************************************************************************************** Decoding and Encoding Headers. These are auto-generated from a tool. **************************************************************************************************************************************************************/ #if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING)) /* dr_wav_h begin */ #ifndef ma_dr_wav_h #define ma_dr_wav_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_WAV_STRINGIFY(x) #x #define MA_DR_WAV_XSTRINGIFY(x) MA_DR_WAV_STRINGIFY(x) #define MA_DR_WAV_VERSION_MAJOR 0 #define MA_DR_WAV_VERSION_MINOR 13 #define MA_DR_WAV_VERSION_REVISION 18 #define MA_DR_WAV_VERSION_STRING MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MAJOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MINOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_REVISION) #include #define MA_DR_WAVE_FORMAT_PCM 0x1 #define MA_DR_WAVE_FORMAT_ADPCM 0x2 #define MA_DR_WAVE_FORMAT_IEEE_FLOAT 0x3 #define MA_DR_WAVE_FORMAT_ALAW 0x6 #define MA_DR_WAVE_FORMAT_MULAW 0x7 #define MA_DR_WAVE_FORMAT_DVI_ADPCM 0x11 #define MA_DR_WAVE_FORMAT_EXTENSIBLE 0xFFFE #define MA_DR_WAV_SEQUENTIAL 0x00000001 #define MA_DR_WAV_WITH_METADATA 0x00000002 MA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_wav_version_string(void); typedef enum { ma_dr_wav_seek_origin_start, ma_dr_wav_seek_origin_current } ma_dr_wav_seek_origin; typedef enum { ma_dr_wav_container_riff, ma_dr_wav_container_rifx, ma_dr_wav_container_w64, ma_dr_wav_container_rf64, ma_dr_wav_container_aiff } ma_dr_wav_container; typedef struct { union { ma_uint8 fourcc[4]; ma_uint8 guid[16]; } id; ma_uint64 sizeInBytes; unsigned int paddingSize; } ma_dr_wav_chunk_header; typedef struct { ma_uint16 formatTag; ma_uint16 channels; ma_uint32 sampleRate; ma_uint32 avgBytesPerSec; ma_uint16 blockAlign; ma_uint16 bitsPerSample; ma_uint16 extendedSize; ma_uint16 validBitsPerSample; ma_uint32 channelMask; ma_uint8 subFormat[16]; } ma_dr_wav_fmt; MA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT); typedef size_t (* ma_dr_wav_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef size_t (* ma_dr_wav_write_proc)(void* pUserData, const void* pData, size_t bytesToWrite); typedef ma_bool32 (* ma_dr_wav_seek_proc)(void* pUserData, int offset, ma_dr_wav_seek_origin origin); typedef ma_uint64 (* ma_dr_wav_chunk_proc)(void* pChunkUserData, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_container container, const ma_dr_wav_fmt* pFMT); typedef struct { const ma_uint8* data; size_t dataSize; size_t currentReadPos; } ma_dr_wav__memory_stream; typedef struct { void** ppData; size_t* pDataSize; size_t dataSize; size_t dataCapacity; size_t currentWritePos; } ma_dr_wav__memory_stream_write; typedef struct { ma_dr_wav_container container; ma_uint32 format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 bitsPerSample; } ma_dr_wav_data_format; typedef enum { ma_dr_wav_metadata_type_none = 0, ma_dr_wav_metadata_type_unknown = 1 << 0, ma_dr_wav_metadata_type_smpl = 1 << 1, ma_dr_wav_metadata_type_inst = 1 << 2, ma_dr_wav_metadata_type_cue = 1 << 3, ma_dr_wav_metadata_type_acid = 1 << 4, ma_dr_wav_metadata_type_bext = 1 << 5, ma_dr_wav_metadata_type_list_label = 1 << 6, ma_dr_wav_metadata_type_list_note = 1 << 7, ma_dr_wav_metadata_type_list_labelled_cue_region = 1 << 8, ma_dr_wav_metadata_type_list_info_software = 1 << 9, ma_dr_wav_metadata_type_list_info_copyright = 1 << 10, ma_dr_wav_metadata_type_list_info_title = 1 << 11, ma_dr_wav_metadata_type_list_info_artist = 1 << 12, ma_dr_wav_metadata_type_list_info_comment = 1 << 13, ma_dr_wav_metadata_type_list_info_date = 1 << 14, ma_dr_wav_metadata_type_list_info_genre = 1 << 15, ma_dr_wav_metadata_type_list_info_album = 1 << 16, ma_dr_wav_metadata_type_list_info_tracknumber = 1 << 17, ma_dr_wav_metadata_type_list_all_info_strings = ma_dr_wav_metadata_type_list_info_software | ma_dr_wav_metadata_type_list_info_copyright | ma_dr_wav_metadata_type_list_info_title | ma_dr_wav_metadata_type_list_info_artist | ma_dr_wav_metadata_type_list_info_comment | ma_dr_wav_metadata_type_list_info_date | ma_dr_wav_metadata_type_list_info_genre | ma_dr_wav_metadata_type_list_info_album | ma_dr_wav_metadata_type_list_info_tracknumber, ma_dr_wav_metadata_type_list_all_adtl = ma_dr_wav_metadata_type_list_label | ma_dr_wav_metadata_type_list_note | ma_dr_wav_metadata_type_list_labelled_cue_region, ma_dr_wav_metadata_type_all = -2, ma_dr_wav_metadata_type_all_including_unknown = -1 } ma_dr_wav_metadata_type; typedef enum { ma_dr_wav_smpl_loop_type_forward = 0, ma_dr_wav_smpl_loop_type_pingpong = 1, ma_dr_wav_smpl_loop_type_backward = 2 } ma_dr_wav_smpl_loop_type; typedef struct { ma_uint32 cuePointId; ma_uint32 type; ma_uint32 firstSampleByteOffset; ma_uint32 lastSampleByteOffset; ma_uint32 sampleFraction; ma_uint32 playCount; } ma_dr_wav_smpl_loop; typedef struct { ma_uint32 manufacturerId; ma_uint32 productId; ma_uint32 samplePeriodNanoseconds; ma_uint32 midiUnityNote; ma_uint32 midiPitchFraction; ma_uint32 smpteFormat; ma_uint32 smpteOffset; ma_uint32 sampleLoopCount; ma_uint32 samplerSpecificDataSizeInBytes; ma_dr_wav_smpl_loop* pLoops; ma_uint8* pSamplerSpecificData; } ma_dr_wav_smpl; typedef struct { ma_int8 midiUnityNote; ma_int8 fineTuneCents; ma_int8 gainDecibels; ma_int8 lowNote; ma_int8 highNote; ma_int8 lowVelocity; ma_int8 highVelocity; } ma_dr_wav_inst; typedef struct { ma_uint32 id; ma_uint32 playOrderPosition; ma_uint8 dataChunkId[4]; ma_uint32 chunkStart; ma_uint32 blockStart; ma_uint32 sampleByteOffset; } ma_dr_wav_cue_point; typedef struct { ma_uint32 cuePointCount; ma_dr_wav_cue_point *pCuePoints; } ma_dr_wav_cue; typedef enum { ma_dr_wav_acid_flag_one_shot = 1, ma_dr_wav_acid_flag_root_note_set = 2, ma_dr_wav_acid_flag_stretch = 4, ma_dr_wav_acid_flag_disk_based = 8, ma_dr_wav_acid_flag_acidizer = 16 } ma_dr_wav_acid_flag; typedef struct { ma_uint32 flags; ma_uint16 midiUnityNote; ma_uint16 reserved1; float reserved2; ma_uint32 numBeats; ma_uint16 meterDenominator; ma_uint16 meterNumerator; float tempo; } ma_dr_wav_acid; typedef struct { ma_uint32 cuePointId; ma_uint32 stringLength; char* pString; } ma_dr_wav_list_label_or_note; typedef struct { char* pDescription; char* pOriginatorName; char* pOriginatorReference; char pOriginationDate[10]; char pOriginationTime[8]; ma_uint64 timeReference; ma_uint16 version; char* pCodingHistory; ma_uint32 codingHistorySize; ma_uint8* pUMID; ma_uint16 loudnessValue; ma_uint16 loudnessRange; ma_uint16 maxTruePeakLevel; ma_uint16 maxMomentaryLoudness; ma_uint16 maxShortTermLoudness; } ma_dr_wav_bext; typedef struct { ma_uint32 stringLength; char* pString; } ma_dr_wav_list_info_text; typedef struct { ma_uint32 cuePointId; ma_uint32 sampleLength; ma_uint8 purposeId[4]; ma_uint16 country; ma_uint16 language; ma_uint16 dialect; ma_uint16 codePage; ma_uint32 stringLength; char* pString; } ma_dr_wav_list_labelled_cue_region; typedef enum { ma_dr_wav_metadata_location_invalid, ma_dr_wav_metadata_location_top_level, ma_dr_wav_metadata_location_inside_info_list, ma_dr_wav_metadata_location_inside_adtl_list } ma_dr_wav_metadata_location; typedef struct { ma_uint8 id[4]; ma_dr_wav_metadata_location chunkLocation; ma_uint32 dataSizeInBytes; ma_uint8* pData; } ma_dr_wav_unknown_metadata; typedef struct { ma_dr_wav_metadata_type type; union { ma_dr_wav_cue cue; ma_dr_wav_smpl smpl; ma_dr_wav_acid acid; ma_dr_wav_inst inst; ma_dr_wav_bext bext; ma_dr_wav_list_label_or_note labelOrNote; ma_dr_wav_list_labelled_cue_region labelledCueRegion; ma_dr_wav_list_info_text infoText; ma_dr_wav_unknown_metadata unknown; } data; } ma_dr_wav_metadata; typedef struct { ma_dr_wav_read_proc onRead; ma_dr_wav_write_proc onWrite; ma_dr_wav_seek_proc onSeek; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_dr_wav_container container; ma_dr_wav_fmt fmt; ma_uint32 sampleRate; ma_uint16 channels; ma_uint16 bitsPerSample; ma_uint16 translatedFormatTag; ma_uint64 totalPCMFrameCount; ma_uint64 dataChunkDataSize; ma_uint64 dataChunkDataPos; ma_uint64 bytesRemaining; ma_uint64 readCursorInPCMFrames; ma_uint64 dataChunkDataSizeTargetWrite; ma_bool32 isSequentialWrite; ma_dr_wav_metadata* pMetadata; ma_uint32 metadataCount; ma_dr_wav__memory_stream memoryStream; ma_dr_wav__memory_stream_write memoryStreamWrite; struct { ma_uint32 bytesRemainingInBlock; ma_uint16 predictor[2]; ma_int32 delta[2]; ma_int32 cachedFrames[4]; ma_uint32 cachedFrameCount; ma_int32 prevFrames[2][2]; } msadpcm; struct { ma_uint32 bytesRemainingInBlock; ma_int32 predictor[2]; ma_int32 stepIndex[2]; ma_int32 cachedFrames[16]; ma_uint32 cachedFrameCount; } ima; struct { ma_bool8 isLE; ma_bool8 isUnsigned; } aiff; } ma_dr_wav; MA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount); MA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount); MA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav); MA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav); MA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex); MA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor); MA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength); MA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); #ifndef MA_DR_WAV_NO_CONVERSION_API MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount); MA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); #endif #ifndef MA_DR_WAV_NO_STDIO MA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_WAV_NO_CONVERSION_API MA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_WAV_NO_STDIO MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data); MA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data); MA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data); MA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data); MA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data); MA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data); MA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data); MA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16]); MA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b); #ifdef __cplusplus } #endif #endif /* dr_wav_h end */ #endif /* MA_NO_WAV */ #if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING) /* dr_flac_h begin */ #ifndef ma_dr_flac_h #define ma_dr_flac_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_FLAC_STRINGIFY(x) #x #define MA_DR_FLAC_XSTRINGIFY(x) MA_DR_FLAC_STRINGIFY(x) #define MA_DR_FLAC_VERSION_MAJOR 0 #define MA_DR_FLAC_VERSION_MINOR 12 #define MA_DR_FLAC_VERSION_REVISION 43 #define MA_DR_FLAC_VERSION_STRING MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MAJOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MINOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_REVISION) #include #if defined(_MSC_VER) && _MSC_VER >= 1700 #define MA_DR_FLAC_DEPRECATED __declspec(deprecated) #elif (defined(__GNUC__) && __GNUC__ >= 4) #define MA_DR_FLAC_DEPRECATED __attribute__((deprecated)) #elif defined(__has_feature) #if __has_feature(attribute_deprecated) #define MA_DR_FLAC_DEPRECATED __attribute__((deprecated)) #else #define MA_DR_FLAC_DEPRECATED #endif #else #define MA_DR_FLAC_DEPRECATED #endif MA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_flac_version_string(void); #ifndef MA_DR_FLAC_BUFFER_SIZE #define MA_DR_FLAC_BUFFER_SIZE 4096 #endif #ifdef MA_64BIT typedef ma_uint64 ma_dr_flac_cache_t; #else typedef ma_uint32 ma_dr_flac_cache_t; #endif #define MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO 0 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING 1 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION 2 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE 3 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT 4 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET 5 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE 6 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID 127 #define MA_DR_FLAC_PICTURE_TYPE_OTHER 0 #define MA_DR_FLAC_PICTURE_TYPE_FILE_ICON 1 #define MA_DR_FLAC_PICTURE_TYPE_OTHER_FILE_ICON 2 #define MA_DR_FLAC_PICTURE_TYPE_COVER_FRONT 3 #define MA_DR_FLAC_PICTURE_TYPE_COVER_BACK 4 #define MA_DR_FLAC_PICTURE_TYPE_LEAFLET_PAGE 5 #define MA_DR_FLAC_PICTURE_TYPE_MEDIA 6 #define MA_DR_FLAC_PICTURE_TYPE_LEAD_ARTIST 7 #define MA_DR_FLAC_PICTURE_TYPE_ARTIST 8 #define MA_DR_FLAC_PICTURE_TYPE_CONDUCTOR 9 #define MA_DR_FLAC_PICTURE_TYPE_BAND 10 #define MA_DR_FLAC_PICTURE_TYPE_COMPOSER 11 #define MA_DR_FLAC_PICTURE_TYPE_LYRICIST 12 #define MA_DR_FLAC_PICTURE_TYPE_RECORDING_LOCATION 13 #define MA_DR_FLAC_PICTURE_TYPE_DURING_RECORDING 14 #define MA_DR_FLAC_PICTURE_TYPE_DURING_PERFORMANCE 15 #define MA_DR_FLAC_PICTURE_TYPE_SCREEN_CAPTURE 16 #define MA_DR_FLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH 17 #define MA_DR_FLAC_PICTURE_TYPE_ILLUSTRATION 18 #define MA_DR_FLAC_PICTURE_TYPE_BAND_LOGOTYPE 19 #define MA_DR_FLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE 20 typedef enum { ma_dr_flac_container_native, ma_dr_flac_container_ogg, ma_dr_flac_container_unknown } ma_dr_flac_container; typedef enum { ma_dr_flac_seek_origin_start, ma_dr_flac_seek_origin_current } ma_dr_flac_seek_origin; typedef struct { ma_uint64 firstPCMFrame; ma_uint64 flacFrameOffset; ma_uint16 pcmFrameCount; } ma_dr_flac_seekpoint; typedef struct { ma_uint16 minBlockSizeInPCMFrames; ma_uint16 maxBlockSizeInPCMFrames; ma_uint32 minFrameSizeInPCMFrames; ma_uint32 maxFrameSizeInPCMFrames; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint64 totalPCMFrameCount; ma_uint8 md5[16]; } ma_dr_flac_streaminfo; typedef struct { ma_uint32 type; const void* pRawData; ma_uint32 rawDataSize; union { ma_dr_flac_streaminfo streaminfo; struct { int unused; } padding; struct { ma_uint32 id; const void* pData; ma_uint32 dataSize; } application; struct { ma_uint32 seekpointCount; const ma_dr_flac_seekpoint* pSeekpoints; } seektable; struct { ma_uint32 vendorLength; const char* vendor; ma_uint32 commentCount; const void* pComments; } vorbis_comment; struct { char catalog[128]; ma_uint64 leadInSampleCount; ma_bool32 isCD; ma_uint8 trackCount; const void* pTrackData; } cuesheet; struct { ma_uint32 type; ma_uint32 mimeLength; const char* mime; ma_uint32 descriptionLength; const char* description; ma_uint32 width; ma_uint32 height; ma_uint32 colorDepth; ma_uint32 indexColorCount; ma_uint32 pictureDataSize; const ma_uint8* pPictureData; } picture; } data; } ma_dr_flac_metadata; typedef size_t (* ma_dr_flac_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef ma_bool32 (* ma_dr_flac_seek_proc)(void* pUserData, int offset, ma_dr_flac_seek_origin origin); typedef void (* ma_dr_flac_meta_proc)(void* pUserData, ma_dr_flac_metadata* pMetadata); typedef struct { const ma_uint8* data; size_t dataSize; size_t currentReadPos; } ma_dr_flac__memory_stream; typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; void* pUserData; size_t unalignedByteCount; ma_dr_flac_cache_t unalignedCache; ma_uint32 nextL2Line; ma_uint32 consumedBits; ma_dr_flac_cache_t cacheL2[MA_DR_FLAC_BUFFER_SIZE/sizeof(ma_dr_flac_cache_t)]; ma_dr_flac_cache_t cache; ma_uint16 crc16; ma_dr_flac_cache_t crc16Cache; ma_uint32 crc16CacheIgnoredBytes; } ma_dr_flac_bs; typedef struct { ma_uint8 subframeType; ma_uint8 wastedBitsPerSample; ma_uint8 lpcOrder; ma_int32* pSamplesS32; } ma_dr_flac_subframe; typedef struct { ma_uint64 pcmFrameNumber; ma_uint32 flacFrameNumber; ma_uint32 sampleRate; ma_uint16 blockSizeInPCMFrames; ma_uint8 channelAssignment; ma_uint8 bitsPerSample; ma_uint8 crc8; } ma_dr_flac_frame_header; typedef struct { ma_dr_flac_frame_header header; ma_uint32 pcmFramesRemaining; ma_dr_flac_subframe subframes[8]; } ma_dr_flac_frame; typedef struct { ma_dr_flac_meta_proc onMeta; void* pUserDataMD; ma_allocation_callbacks allocationCallbacks; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint16 maxBlockSizeInPCMFrames; ma_uint64 totalPCMFrameCount; ma_dr_flac_container container; ma_uint32 seekpointCount; ma_dr_flac_frame currentFLACFrame; ma_uint64 currentPCMFrame; ma_uint64 firstFLACFramePosInBytes; ma_dr_flac__memory_stream memoryStream; ma_int32* pDecodedSamples; ma_dr_flac_seekpoint* pSeekpoints; void* _oggbs; ma_bool32 _noSeekTableSeek : 1; ma_bool32 _noBinarySearchSeek : 1; ma_bool32 _noBruteForceSeek : 1; ma_dr_flac_bs bs; ma_uint8 pExtraData[1]; } ma_dr_flac; MA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_flac_close(ma_dr_flac* pFlac); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex); #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_uint32 countRemaining; const char* pRunningData; } ma_dr_flac_vorbis_comment_iterator; MA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments); MA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut); typedef struct { ma_uint32 countRemaining; const char* pRunningData; } ma_dr_flac_cuesheet_track_iterator; typedef struct { ma_uint64 offset; ma_uint8 index; ma_uint8 reserved[3]; } ma_dr_flac_cuesheet_track_index; typedef struct { ma_uint64 offset; ma_uint8 trackNumber; char ISRC[12]; ma_bool8 isAudio; ma_bool8 preEmphasis; ma_uint8 indexCount; const ma_dr_flac_cuesheet_track_index* pIndexPoints; } ma_dr_flac_cuesheet_track; MA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData); MA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack); #ifdef __cplusplus } #endif #endif /* dr_flac_h end */ #endif /* MA_NO_FLAC */ #if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING) /* dr_mp3_h begin */ #ifndef ma_dr_mp3_h #define ma_dr_mp3_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_MP3_STRINGIFY(x) #x #define MA_DR_MP3_XSTRINGIFY(x) MA_DR_MP3_STRINGIFY(x) #define MA_DR_MP3_VERSION_MAJOR 0 #define MA_DR_MP3_VERSION_MINOR 6 #define MA_DR_MP3_VERSION_REVISION 40 #define MA_DR_MP3_VERSION_STRING MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MAJOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MINOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_REVISION) #include #define MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME 1152 #define MA_DR_MP3_MAX_SAMPLES_PER_FRAME (MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2) MA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_mp3_version_string(void); typedef struct { int frame_bytes, channels, hz, layer, bitrate_kbps; } ma_dr_mp3dec_frame_info; typedef struct { float mdct_overlap[2][9*32], qmf_state[15*2*32]; int reserv, free_format_bytes; ma_uint8 header[4], reserv_buf[511]; } ma_dr_mp3dec; MA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec); MA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info); MA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples); typedef enum { ma_dr_mp3_seek_origin_start, ma_dr_mp3_seek_origin_current } ma_dr_mp3_seek_origin; typedef struct { ma_uint64 seekPosInBytes; ma_uint64 pcmFrameIndex; ma_uint16 mp3FramesToDiscard; ma_uint16 pcmFramesToDiscard; } ma_dr_mp3_seek_point; typedef size_t (* ma_dr_mp3_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef ma_bool32 (* ma_dr_mp3_seek_proc)(void* pUserData, int offset, ma_dr_mp3_seek_origin origin); typedef struct { ma_uint32 channels; ma_uint32 sampleRate; } ma_dr_mp3_config; typedef struct { ma_dr_mp3dec decoder; ma_uint32 channels; ma_uint32 sampleRate; ma_dr_mp3_read_proc onRead; ma_dr_mp3_seek_proc onSeek; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_uint32 mp3FrameChannels; ma_uint32 mp3FrameSampleRate; ma_uint32 pcmFramesConsumedInMP3Frame; ma_uint32 pcmFramesRemainingInMP3Frame; ma_uint8 pcmFrames[sizeof(float)*MA_DR_MP3_MAX_SAMPLES_PER_FRAME]; ma_uint64 currentPCMFrame; ma_uint64 streamCursor; ma_dr_mp3_seek_point* pSeekPoints; ma_uint32 seekPointCount; size_t dataSize; size_t dataCapacity; size_t dataConsumed; ma_uint8* pData; ma_bool32 atEnd : 1; struct { const ma_uint8* pData; size_t dataSize; size_t currentReadPos; } memory; } ma_dr_mp3; MA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_MP3_NO_STDIO MA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3); MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex); MA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3); MA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3); MA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount); MA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints); MA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints); MA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_MP3_NO_STDIO MA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* dr_mp3_h end */ #endif /* MA_NO_MP3 */ /************************************************************************************************************************************************************** Decoding **************************************************************************************************************************************************************/ #ifndef MA_NO_DECODING static ma_result ma_decoder_read_bytes(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { MA_ASSERT(pDecoder != NULL); return pDecoder->onRead(pDecoder, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder_seek_bytes(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin) { MA_ASSERT(pDecoder != NULL); return pDecoder->onSeek(pDecoder, byteOffset, origin); } static ma_result ma_decoder_tell_bytes(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); if (pDecoder->onTell == NULL) { return MA_NOT_IMPLEMENTED; } return pDecoder->onTell(pDecoder, pCursor); } MA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount) { ma_decoding_backend_config config; MA_ZERO_OBJECT(&config); config.preferredFormat = preferredFormat; config.seekPointCount = seekPointCount; return config; } MA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate) { ma_decoder_config config; MA_ZERO_OBJECT(&config); config.format = outputFormat; config.channels = outputChannels; config.sampleRate = outputSampleRate; config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate doesn't matter here. */ config.encodingFormat = ma_encoding_format_unknown; /* Note that we are intentionally leaving the channel map empty here which will cause the default channel map to be used. */ return config; } MA_API ma_decoder_config ma_decoder_config_init_default(void) { return ma_decoder_config_init(ma_format_unknown, 0, 0); } MA_API ma_decoder_config ma_decoder_config_init_copy(const ma_decoder_config* pConfig) { ma_decoder_config config; if (pConfig != NULL) { config = *pConfig; } else { MA_ZERO_OBJECT(&config); } return config; } static ma_result ma_decoder__init_data_converter(ma_decoder* pDecoder, const ma_decoder_config* pConfig) { ma_result result; ma_data_converter_config converterConfig; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; MA_ASSERT(pDecoder != NULL); MA_ASSERT(pConfig != NULL); result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, &internalSampleRate, internalChannelMap, ma_countof(internalChannelMap)); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal data format. */ } /* Make sure we're not asking for too many channels. */ if (pConfig->channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } /* The internal channels should have already been validated at a higher level, but we'll do it again explicitly here for safety. */ if (internalChannels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } /* Output format. */ if (pConfig->format == ma_format_unknown) { pDecoder->outputFormat = internalFormat; } else { pDecoder->outputFormat = pConfig->format; } if (pConfig->channels == 0) { pDecoder->outputChannels = internalChannels; } else { pDecoder->outputChannels = pConfig->channels; } if (pConfig->sampleRate == 0) { pDecoder->outputSampleRate = internalSampleRate; } else { pDecoder->outputSampleRate = pConfig->sampleRate; } converterConfig = ma_data_converter_config_init( internalFormat, pDecoder->outputFormat, internalChannels, pDecoder->outputChannels, internalSampleRate, pDecoder->outputSampleRate ); converterConfig.pChannelMapIn = internalChannelMap; converterConfig.pChannelMapOut = pConfig->pChannelMap; converterConfig.channelMixMode = pConfig->channelMixMode; converterConfig.ditherMode = pConfig->ditherMode; converterConfig.allowDynamicSampleRate = MA_FALSE; /* Never allow dynamic sample rate conversion. Setting this to true will disable passthrough optimizations. */ converterConfig.resampling = pConfig->resampling; result = ma_data_converter_init(&converterConfig, &pDecoder->allocationCallbacks, &pDecoder->converter); if (result != MA_SUCCESS) { return result; } /* Now that we have the decoder we need to determine whether or not we need a heap-allocated cache. We'll need this if the data converter does not support calculation of the required input frame count. To determine support for this we'll just run a test. */ { ma_uint64 unused; result = ma_data_converter_get_required_input_frame_count(&pDecoder->converter, 1, &unused); if (result != MA_SUCCESS) { /* We were unable to calculate the required input frame count which means we'll need to use a heap-allocated cache. */ ma_uint64 inputCacheCapSizeInBytes; pDecoder->inputCacheCap = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(internalFormat, internalChannels); /* Not strictly necessary, but keeping here for safety in case we change the default value of pDecoder->inputCacheCap. */ inputCacheCapSizeInBytes = pDecoder->inputCacheCap * ma_get_bytes_per_frame(internalFormat, internalChannels); if (inputCacheCapSizeInBytes > MA_SIZE_MAX) { ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } pDecoder->pInputCache = ma_malloc((size_t)inputCacheCapSizeInBytes, &pDecoder->allocationCallbacks); /* Safe cast to size_t. */ if (pDecoder->pInputCache == NULL) { ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } } } return MA_SUCCESS; } static ma_result ma_decoder_internal_on_read__custom(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_read_bytes(pDecoder, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder_internal_on_seek__custom(void* pUserData, ma_int64 offset, ma_seek_origin origin) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_seek_bytes(pDecoder, offset, origin); } static ma_result ma_decoder_internal_on_tell__custom(void* pUserData, ma_int64* pCursor) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_tell_bytes(pDecoder, pCursor); } static ma_result ma_decoder_init_from_vtable__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInit == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInit(pVTableUserData, ma_decoder_internal_on_read__custom, ma_decoder_internal_on_seek__custom, ma_decoder_internal_on_tell__custom, pDecoder, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_file__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitFile == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitFile(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_file_w__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitFileW == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitFileW(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_memory__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitMemory == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitMemory(pVTableUserData, pData, dataSize, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_custom__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_vtable__internal(pVTable, pConfig->pCustomBackendUserData, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } else { /* Initialization failed. Move on to the next one, but seek back to the start first so the next vtable starts from the first byte of the file. */ result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start); if (result != MA_SUCCESS) { return result; /* Failed to seek back to the start. */ } } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_file__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_file_w__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_memory__internal(pVTable, pConfig->pCustomBackendUserData, pData, dataSize, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } /* WAV */ #ifdef ma_dr_wav_h #define MA_HAS_WAV typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32, s16 or s32. */ #if !defined(MA_NO_WAV) ma_dr_wav dr; #endif } ma_wav; MA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex); MA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor); MA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength); static ma_result ma_wav_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_wav_read_pcm_frames((ma_wav*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_wav_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_wav_seek_to_pcm_frame((ma_wav*)pDataSource, frameIndex); } static ma_result ma_wav_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_wav_get_data_format((ma_wav*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_wav_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_wav_get_cursor_in_pcm_frames((ma_wav*)pDataSource, pCursor); } static ma_result ma_wav_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_wav_get_length_in_pcm_frames((ma_wav*)pDataSource, pLength); } static ma_data_source_vtable g_ma_wav_ds_vtable = { ma_wav_ds_read, ma_wav_ds_seek, ma_wav_ds_get_data_format, ma_wav_ds_get_cursor, ma_wav_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_WAV) static size_t ma_wav_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_wav* pWav = (ma_wav*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pWav != NULL); result = pWav->onRead(pWav->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_wav_dr_callback__seek(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_wav* pWav = (ma_wav*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pWav != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_wav_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pWav->onSeek(pWav->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_wav_init_internal(const ma_decoding_backend_config* pConfig, ma_wav* pWav) { ma_result result; ma_data_source_config dataSourceConfig; if (pWav == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWav); pWav->format = ma_format_unknown; /* Use closest match to source file by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) { pWav->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_wav_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pWav->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } static ma_result ma_wav_post_init(ma_wav* pWav) { /* If an explicit format was not specified, try picking the closest match based on the internal format. The format needs to be supported by miniaudio. */ if (pWav->format == ma_format_unknown) { switch (pWav->dr.translatedFormatTag) { case MA_DR_WAVE_FORMAT_PCM: { if (pWav->dr.bitsPerSample == 8) { pWav->format = ma_format_u8; } else if (pWav->dr.bitsPerSample == 16) { pWav->format = ma_format_s16; } else if (pWav->dr.bitsPerSample == 24) { pWav->format = ma_format_s24; } else if (pWav->dr.bitsPerSample == 32) { pWav->format = ma_format_s32; } } break; case MA_DR_WAVE_FORMAT_IEEE_FLOAT: { if (pWav->dr.bitsPerSample == 32) { pWav->format = ma_format_f32; } } break; default: break; } /* Fall back to f32 if we couldn't find anything. */ if (pWav->format == ma_format_unknown) { pWav->format = ma_format_f32; } } return MA_SUCCESS; } MA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pWav->onRead = onRead; pWav->onSeek = onSeek; pWav->onTell = onTell; pWav->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init(&pWav->dr, ma_wav_dr_callback__read, ma_wav_dr_callback__seek, pWav, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_file(&pWav->dr, pFilePath, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_file_w(&pWav->dr, pFilePath, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_memory(&pWav->dr, pData, dataSize, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_WAV) { ma_dr_wav_uninit(&pWav->dr); } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pWav->ds); } MA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_wav_get_data_format(pWav, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_wav_read_pcm_frames_f32(&pWav->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_wav_read_pcm_frames_s16(&pWav->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_s32: { totalFramesRead = ma_dr_wav_read_pcm_frames_s32(&pWav->dr, frameCount, (ma_int32*)pFramesOut); } break; /* Fallback to a raw read. */ case ma_format_unknown: return MA_INVALID_OPERATION; /* <-- this should never be hit because initialization would just fall back to a supported format. */ default: { totalFramesRead = ma_dr_wav_read_pcm_frames(&pWav->dr, frameCount, pFramesOut); } break; } /* In the future we'll update ma_dr_wav to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex) { if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_seek_to_pcm_frame(&pWav->dr, frameIndex); if (wavResult != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pWav == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pWav->format; } #if !defined(MA_NO_WAV) { if (pChannels != NULL) { *pChannels = pWav->dr.channels; } if (pSampleRate != NULL) { *pSampleRate = pWav->dr.sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pWav->dr.channels); } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_result wavResult = ma_dr_wav_get_cursor_in_pcm_frames(&pWav->dr, pCursor); if (wavResult != MA_SUCCESS) { return (ma_result)wavResult; /* ma_dr_wav result codes map to miniaudio's. */ } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_result wavResult = ma_dr_wav_get_length_in_pcm_frames(&pWav->dr, pLength); if (wavResult != MA_SUCCESS) { return (ma_result)wavResult; /* ma_dr_wav result codes map to miniaudio's. */ } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__wav(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__wav(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_file(pFilePath, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__wav(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__wav(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static void ma_decoding_backend_uninit__wav(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_wav* pWav = (ma_wav*)pBackend; (void)pUserData; ma_wav_uninit(pWav, pAllocationCallbacks); ma_free(pWav, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_wav = { ma_decoding_backend_init__wav, ma_decoding_backend_init_file__wav, ma_decoding_backend_init_file_w__wav, ma_decoding_backend_init_memory__wav, ma_decoding_backend_uninit__wav }; static ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_wav, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_wav, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_wav_h */ /* FLAC */ #ifdef ma_dr_flac_h #define MA_HAS_FLAC typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32, s16 or s32. */ #if !defined(MA_NO_FLAC) ma_dr_flac* dr; #endif } ma_flac; MA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex); MA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor); MA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength); static ma_result ma_flac_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_flac_read_pcm_frames((ma_flac*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_flac_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_flac_seek_to_pcm_frame((ma_flac*)pDataSource, frameIndex); } static ma_result ma_flac_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_flac_get_data_format((ma_flac*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_flac_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_flac_get_cursor_in_pcm_frames((ma_flac*)pDataSource, pCursor); } static ma_result ma_flac_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_flac_get_length_in_pcm_frames((ma_flac*)pDataSource, pLength); } static ma_data_source_vtable g_ma_flac_ds_vtable = { ma_flac_ds_read, ma_flac_ds_seek, ma_flac_ds_get_data_format, ma_flac_ds_get_cursor, ma_flac_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_FLAC) static size_t ma_flac_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_flac* pFlac = (ma_flac*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pFlac != NULL); result = pFlac->onRead(pFlac->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_flac_dr_callback__seek(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_flac* pFlac = (ma_flac*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pFlac != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_flac_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pFlac->onSeek(pFlac->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_flac_init_internal(const ma_decoding_backend_config* pConfig, ma_flac* pFlac) { ma_result result; ma_data_source_config dataSourceConfig; if (pFlac == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFlac); pFlac->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) { pFlac->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_flac_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pFlac->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } MA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pFlac->onRead = onRead; pFlac->onSeek = onSeek; pFlac->onTell = onTell; pFlac->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open(ma_flac_dr_callback__read, ma_flac_dr_callback__seek, pFlac, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_file(pFilePath, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_file_w(pFilePath, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_memory(pData, dataSize, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFlac == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_FLAC) { ma_dr_flac_close(pFlac->dr); } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pFlac->ds); } MA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_flac_get_data_format(pFlac, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_flac_read_pcm_frames_f32(pFlac->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_flac_read_pcm_frames_s16(pFlac->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_s32: { totalFramesRead = ma_dr_flac_read_pcm_frames_s32(pFlac->dr, frameCount, (ma_int32*)pFramesOut); } break; case ma_format_u8: case ma_format_s24: case ma_format_unknown: default: { return MA_INVALID_OPERATION; }; } /* In the future we'll update ma_dr_flac to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex) { if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { ma_bool32 flacResult; flacResult = ma_dr_flac_seek_to_pcm_frame(pFlac->dr, frameIndex); if (flacResult != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pFlac == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pFlac->format; } #if !defined(MA_NO_FLAC) { if (pChannels != NULL) { *pChannels = pFlac->dr->channels; } if (pSampleRate != NULL) { *pSampleRate = pFlac->dr->sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pFlac->dr->channels); } return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { *pCursor = pFlac->dr->currentPCMFrame; return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { *pLength = pFlac->dr->totalPCMFrameCount; return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__flac(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__flac(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_file(pFilePath, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__flac(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__flac(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static void ma_decoding_backend_uninit__flac(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_flac* pFlac = (ma_flac*)pBackend; (void)pUserData; ma_flac_uninit(pFlac, pAllocationCallbacks); ma_free(pFlac, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_flac = { ma_decoding_backend_init__flac, ma_decoding_backend_init_file__flac, ma_decoding_backend_init_file_w__flac, ma_decoding_backend_init_memory__flac, ma_decoding_backend_uninit__flac }; static ma_result ma_decoder_init_flac__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_flac, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_flac, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_flac_h */ /* MP3 */ #ifdef ma_dr_mp3_h #define MA_HAS_MP3 typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32 or s16. */ #if !defined(MA_NO_MP3) ma_dr_mp3 dr; ma_uint32 seekPointCount; ma_dr_mp3_seek_point* pSeekPoints; /* Only used if seek table generation is used. */ #endif } ma_mp3; MA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex); MA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor); MA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength); static ma_result ma_mp3_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_mp3_read_pcm_frames((ma_mp3*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_mp3_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_mp3_seek_to_pcm_frame((ma_mp3*)pDataSource, frameIndex); } static ma_result ma_mp3_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_mp3_get_data_format((ma_mp3*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_mp3_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_mp3_get_cursor_in_pcm_frames((ma_mp3*)pDataSource, pCursor); } static ma_result ma_mp3_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_mp3_get_length_in_pcm_frames((ma_mp3*)pDataSource, pLength); } static ma_data_source_vtable g_ma_mp3_ds_vtable = { ma_mp3_ds_read, ma_mp3_ds_seek, ma_mp3_ds_get_data_format, ma_mp3_ds_get_cursor, ma_mp3_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_MP3) static size_t ma_mp3_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_mp3* pMP3 = (ma_mp3*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pMP3 != NULL); result = pMP3->onRead(pMP3->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_mp3_dr_callback__seek(void* pUserData, int offset, ma_dr_mp3_seek_origin origin) { ma_mp3* pMP3 = (ma_mp3*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pMP3 != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_mp3_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pMP3->onSeek(pMP3->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_mp3_init_internal(const ma_decoding_backend_config* pConfig, ma_mp3* pMP3) { ma_result result; ma_data_source_config dataSourceConfig; if (pMP3 == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pMP3); pMP3->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pMP3->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_mp3_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pMP3->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } static ma_result ma_mp3_generate_seek_table(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 mp3Result; ma_uint32 seekPointCount = 0; ma_dr_mp3_seek_point* pSeekPoints = NULL; MA_ASSERT(pMP3 != NULL); MA_ASSERT(pConfig != NULL); seekPointCount = pConfig->seekPointCount; if (seekPointCount > 0) { pSeekPoints = (ma_dr_mp3_seek_point*)ma_malloc(sizeof(*pMP3->pSeekPoints) * seekPointCount, pAllocationCallbacks); if (pSeekPoints == NULL) { return MA_OUT_OF_MEMORY; } } mp3Result = ma_dr_mp3_calculate_seek_points(&pMP3->dr, &seekPointCount, pSeekPoints); if (mp3Result != MA_TRUE) { ma_free(pSeekPoints, pAllocationCallbacks); return MA_ERROR; } mp3Result = ma_dr_mp3_bind_seek_table(&pMP3->dr, seekPointCount, pSeekPoints); if (mp3Result != MA_TRUE) { ma_free(pSeekPoints, pAllocationCallbacks); return MA_ERROR; } pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; return MA_SUCCESS; } static ma_result ma_mp3_post_init(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; result = ma_mp3_generate_seek_table(pMP3, pConfig, pAllocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pMP3->onRead = onRead; pMP3->onSeek = onSeek; pMP3->onTell = onTell; pMP3->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init(&pMP3->dr, ma_mp3_dr_callback__read, ma_mp3_dr_callback__seek, pMP3, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_file(&pMP3->dr, pFilePath, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_file_w(&pMP3->dr, pFilePath, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_memory(&pMP3->dr, pData, dataSize, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL) { return; } #if !defined(MA_NO_MP3) { ma_dr_mp3_uninit(&pMP3->dr); } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif /* Seek points need to be freed after the MP3 decoder has been uninitialized to ensure they're no longer being referenced. */ ma_free(pMP3->pSeekPoints, pAllocationCallbacks); ma_data_source_uninit(&pMP3->ds); } MA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_mp3_get_data_format(pMP3, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_mp3_read_pcm_frames_f32(&pMP3->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_mp3_read_pcm_frames_s16(&pMP3->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_u8: case ma_format_s24: case ma_format_s32: case ma_format_unknown: default: { return MA_INVALID_OPERATION; }; } /* In the future we'll update ma_dr_mp3 to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex) { if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_seek_to_pcm_frame(&pMP3->dr, frameIndex); if (mp3Result != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pMP3 == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pMP3->format; } #if !defined(MA_NO_MP3) { if (pChannels != NULL) { *pChannels = pMP3->dr.channels; } if (pSampleRate != NULL) { *pSampleRate = pMP3->dr.sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pMP3->dr.channels); } return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { *pCursor = pMP3->dr.currentPCMFrame; return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { *pLength = ma_dr_mp3_get_pcm_frame_count(&pMP3->dr); return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__mp3(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__mp3(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_file(pFilePath, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__mp3(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__mp3(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static void ma_decoding_backend_uninit__mp3(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_mp3* pMP3 = (ma_mp3*)pBackend; (void)pUserData; ma_mp3_uninit(pMP3, pAllocationCallbacks); ma_free(pMP3, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_mp3 = { ma_decoding_backend_init__mp3, ma_decoding_backend_init_file__mp3, ma_decoding_backend_init_file_w__mp3, ma_decoding_backend_init_memory__mp3, ma_decoding_backend_uninit__mp3 }; static ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_mp3_h */ /* Vorbis */ #ifdef STB_VORBIS_INCLUDE_STB_VORBIS_H #define MA_HAS_VORBIS /* The size in bytes of each chunk of data to read from the Vorbis stream. */ #define MA_VORBIS_DATA_CHUNK_SIZE 4096 typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_allocation_callbacks allocationCallbacks; /* Store the allocation callbacks within the structure because we may need to dynamically expand a buffer in ma_stbvorbis_read_pcm_frames() when using push mode. */ ma_format format; /* Only f32 is allowed with stb_vorbis. */ ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 cursor; #if !defined(MA_NO_VORBIS) stb_vorbis* stb; ma_bool32 usingPushMode; struct { ma_uint8* pData; size_t dataSize; size_t dataCapacity; size_t audioStartOffsetInBytes; ma_uint32 framesConsumed; /* The number of frames consumed in ppPacketData. */ ma_uint32 framesRemaining; /* The number of frames remaining in ppPacketData. */ float** ppPacketData; } push; #endif } ma_stbvorbis; MA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex); MA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor); MA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength); static ma_result ma_stbvorbis_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_stbvorbis_read_pcm_frames((ma_stbvorbis*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_stbvorbis_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_stbvorbis_seek_to_pcm_frame((ma_stbvorbis*)pDataSource, frameIndex); } static ma_result ma_stbvorbis_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_stbvorbis_get_data_format((ma_stbvorbis*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_stbvorbis_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_stbvorbis_get_cursor_in_pcm_frames((ma_stbvorbis*)pDataSource, pCursor); } static ma_result ma_stbvorbis_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_stbvorbis_get_length_in_pcm_frames((ma_stbvorbis*)pDataSource, pLength); } static ma_data_source_vtable g_ma_stbvorbis_ds_vtable = { ma_stbvorbis_ds_read, ma_stbvorbis_ds_seek, ma_stbvorbis_ds_get_data_format, ma_stbvorbis_ds_get_cursor, ma_stbvorbis_ds_get_length, NULL, /* onSetLooping */ 0 }; static ma_result ma_stbvorbis_init_internal(const ma_decoding_backend_config* pConfig, ma_stbvorbis* pVorbis) { ma_result result; ma_data_source_config dataSourceConfig; (void)pConfig; if (pVorbis == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pVorbis); pVorbis->format = ma_format_f32; /* Only supporting f32. */ dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_stbvorbis_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pVorbis->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } #if !defined(MA_NO_VORBIS) static ma_result ma_stbvorbis_post_init(ma_stbvorbis* pVorbis) { stb_vorbis_info info; MA_ASSERT(pVorbis != NULL); info = stb_vorbis_get_info(pVorbis->stb); pVorbis->channels = info.channels; pVorbis->sampleRate = info.sample_rate; return MA_SUCCESS; } static ma_result ma_stbvorbis_init_internal_decoder_push(ma_stbvorbis* pVorbis) { ma_result result; stb_vorbis* stb; size_t dataSize = 0; size_t dataCapacity = 0; ma_uint8* pData = NULL; /* <-- Must be initialized to NULL. */ for (;;) { int vorbisError; int consumedDataSize; /* <-- Fill by stb_vorbis_open_pushdata(). */ size_t bytesRead; ma_uint8* pNewData; /* Allocate memory for the new chunk. */ dataCapacity += MA_VORBIS_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_realloc(pData, dataCapacity, &pVorbis->allocationCallbacks); if (pNewData == NULL) { ma_free(pData, &pVorbis->allocationCallbacks); return MA_OUT_OF_MEMORY; } pData = pNewData; /* Read in the next chunk. */ result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pData, dataSize), (dataCapacity - dataSize), &bytesRead); dataSize += bytesRead; if (result != MA_SUCCESS) { ma_free(pData, &pVorbis->allocationCallbacks); return result; } /* We have a maximum of 31 bits with stb_vorbis. */ if (dataSize > INT_MAX) { ma_free(pData, &pVorbis->allocationCallbacks); return MA_TOO_BIG; } stb = stb_vorbis_open_pushdata(pData, (int)dataSize, &consumedDataSize, &vorbisError, NULL); if (stb != NULL) { /* Successfully opened the Vorbis decoder. We might have some leftover unprocessed data so we'll need to move that down to the front. */ dataSize -= (size_t)consumedDataSize; /* Consume the data. */ MA_MOVE_MEMORY(pData, ma_offset_ptr(pData, consumedDataSize), dataSize); /* We need to track the start point so we can seek back to the start of the audio data when seeking. */ pVorbis->push.audioStartOffsetInBytes = consumedDataSize; break; } else { /* Failed to open the decoder. */ if (vorbisError == VORBIS_need_more_data) { continue; } else { ma_free(pData, &pVorbis->allocationCallbacks); return MA_ERROR; /* Failed to open the stb_vorbis decoder. */ } } } MA_ASSERT(stb != NULL); pVorbis->stb = stb; pVorbis->push.pData = pData; pVorbis->push.dataSize = dataSize; pVorbis->push.dataCapacity = dataCapacity; return MA_SUCCESS; } #endif MA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pVorbis->onRead = onRead; pVorbis->onSeek = onSeek; pVorbis->onTell = onTell; pVorbis->pReadSeekTellUserData = pReadSeekTellUserData; ma_allocation_callbacks_init_copy(&pVorbis->allocationCallbacks, pAllocationCallbacks); #if !defined(MA_NO_VORBIS) { /* stb_vorbis lacks a callback based API for its pulling API which means we're stuck with the pushing API. In order for us to be able to successfully initialize the decoder we need to supply it with enough data. We need to keep loading data until we have enough. */ result = ma_stbvorbis_init_internal_decoder_push(pVorbis); if (result != MA_SUCCESS) { return result; } pVorbis->usingPushMode = MA_TRUE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); ma_free(pVorbis->push.pData, pAllocationCallbacks); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_VORBIS) { (void)pAllocationCallbacks; /* Don't know how to make use of this with stb_vorbis. */ /* We can use stb_vorbis' pull mode for file based streams. */ pVorbis->stb = stb_vorbis_open_filename(pFilePath, NULL, NULL); if (pVorbis->stb == NULL) { return MA_INVALID_FILE; } pVorbis->usingPushMode = MA_FALSE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_VORBIS) { (void)pAllocationCallbacks; /* stb_vorbis uses an int as its size specifier, restricting it to 32-bit even on 64-bit systems. *sigh*. */ if (dataSize > INT_MAX) { return MA_TOO_BIG; } pVorbis->stb = stb_vorbis_open_memory((const unsigned char*)pData, (int)dataSize, NULL, NULL); if (pVorbis->stb == NULL) { return MA_INVALID_FILE; } pVorbis->usingPushMode = MA_FALSE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVorbis == NULL) { return; } #if !defined(MA_NO_VORBIS) { stb_vorbis_close(pVorbis->stb); /* We'll have to clear some memory if we're using push mode. */ if (pVorbis->usingPushMode) { ma_free(pVorbis->push.pData, pAllocationCallbacks); } } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pVorbis->ds); } MA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_uint32 channels; ma_stbvorbis_get_data_format(pVorbis, &format, &channels, NULL, NULL, 0); if (format == ma_format_f32) { /* We read differently depending on whether or not we're using push mode. */ if (pVorbis->usingPushMode) { /* Push mode. This is the complex case. */ float* pFramesOutF32 = (float*)pFramesOut; while (totalFramesRead < frameCount) { /* The first thing to do is read from any already-cached frames. */ ma_uint32 framesToReadFromCache = (ma_uint32)ma_min(pVorbis->push.framesRemaining, (frameCount - totalFramesRead)); /* Safe cast because pVorbis->framesRemaining is 32-bit. */ /* The output pointer can be null in which case we just treat it as a seek. */ if (pFramesOut != NULL) { ma_uint64 iFrame; for (iFrame = 0; iFrame < framesToReadFromCache; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pVorbis->channels; iChannel += 1) { pFramesOutF32[iChannel] = pVorbis->push.ppPacketData[iChannel][pVorbis->push.framesConsumed + iFrame]; } pFramesOutF32 += pVorbis->channels; } } /* Update pointers and counters. */ pVorbis->push.framesConsumed += framesToReadFromCache; pVorbis->push.framesRemaining -= framesToReadFromCache; totalFramesRead += framesToReadFromCache; /* Don't bother reading any more frames right now if we've just finished loading. */ if (totalFramesRead == frameCount) { break; } MA_ASSERT(pVorbis->push.framesRemaining == 0); /* Getting here means we've run out of cached frames. We'll need to load some more. */ for (;;) { int samplesRead = 0; int consumedDataSize; /* We need to case dataSize to an int, so make sure we can do it safely. */ if (pVorbis->push.dataSize > INT_MAX) { break; /* Too big. */ } consumedDataSize = stb_vorbis_decode_frame_pushdata(pVorbis->stb, pVorbis->push.pData, (int)pVorbis->push.dataSize, NULL, &pVorbis->push.ppPacketData, &samplesRead); if (consumedDataSize != 0) { /* Successfully decoded a Vorbis frame. Consume the data. */ pVorbis->push.dataSize -= (size_t)consumedDataSize; MA_MOVE_MEMORY(pVorbis->push.pData, ma_offset_ptr(pVorbis->push.pData, consumedDataSize), pVorbis->push.dataSize); pVorbis->push.framesConsumed = 0; pVorbis->push.framesRemaining = samplesRead; break; } else { /* Not enough data. Read more. */ size_t bytesRead; /* Expand the data buffer if necessary. */ if (pVorbis->push.dataCapacity == pVorbis->push.dataSize) { size_t newCap = pVorbis->push.dataCapacity + MA_VORBIS_DATA_CHUNK_SIZE; ma_uint8* pNewData; pNewData = (ma_uint8*)ma_realloc(pVorbis->push.pData, newCap, &pVorbis->allocationCallbacks); if (pNewData == NULL) { result = MA_OUT_OF_MEMORY; break; } pVorbis->push.pData = pNewData; pVorbis->push.dataCapacity = newCap; } /* We should have enough room to load some data. */ result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pVorbis->push.pData, pVorbis->push.dataSize), (pVorbis->push.dataCapacity - pVorbis->push.dataSize), &bytesRead); pVorbis->push.dataSize += bytesRead; if (result != MA_SUCCESS) { break; /* Failed to read any data. Get out. */ } } } /* If we don't have a success code at this point it means we've encountered an error or the end of the file has been reached (probably the latter). */ if (result != MA_SUCCESS) { break; } } } else { /* Pull mode. This is the simple case, but we still need to run in a loop because stb_vorbis loves using 32-bit instead of 64-bit. */ while (totalFramesRead < frameCount) { ma_uint64 framesRemaining = (frameCount - totalFramesRead); int framesRead; if (framesRemaining > INT_MAX) { framesRemaining = INT_MAX; } framesRead = stb_vorbis_get_samples_float_interleaved(pVorbis->stb, channels, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)framesRemaining * channels); /* Safe cast. */ totalFramesRead += framesRead; if (framesRead < (int)framesRemaining) { break; /* Nothing left to read. Get out. */ } } } } else { result = MA_INVALID_ARGS; } pVorbis->cursor += totalFramesRead; if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex) { if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { /* Different seeking methods depending on whether or not we're using push mode. */ if (pVorbis->usingPushMode) { /* Push mode. This is the complex case. */ ma_result result; float buffer[4096]; /* If we're seeking backwards, we need to seek back to the start and then brute-force forward. */ if (frameIndex < pVorbis->cursor) { if (frameIndex > 0x7FFFFFFF) { return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */ } /* This is wildly inefficient due to me having trouble getting sample exact seeking working robustly with stb_vorbis_flush_pushdata(). The only way I can think to make this work perfectly is to reinitialize the decoder. Note that we only enter this path when seeking backwards. This will hopefully be removed once we get our own Vorbis decoder implemented. */ stb_vorbis_close(pVorbis->stb); ma_free(pVorbis->push.pData, &pVorbis->allocationCallbacks); MA_ZERO_OBJECT(&pVorbis->push); /* Seek to the start of the file. */ result = pVorbis->onSeek(pVorbis->pReadSeekTellUserData, 0, ma_seek_origin_start); if (result != MA_SUCCESS) { return result; } result = ma_stbvorbis_init_internal_decoder_push(pVorbis); if (result != MA_SUCCESS) { return result; } /* At this point we should be sitting on the first frame. */ pVorbis->cursor = 0; } /* We're just brute-forcing this for now. */ while (pVorbis->cursor < frameIndex) { ma_uint64 framesRead; ma_uint64 framesToRead = ma_countof(buffer)/pVorbis->channels; if (framesToRead > (frameIndex - pVorbis->cursor)) { framesToRead = (frameIndex - pVorbis->cursor); } result = ma_stbvorbis_read_pcm_frames(pVorbis, buffer, framesToRead, &framesRead); if (result != MA_SUCCESS) { return result; } } } else { /* Pull mode. This is the simple case. */ int vorbisResult; if (frameIndex > UINT_MAX) { return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */ } vorbisResult = stb_vorbis_seek(pVorbis->stb, (unsigned int)frameIndex); /* Safe cast. */ if (vorbisResult == 0) { return MA_ERROR; /* See failed. */ } pVorbis->cursor = frameIndex; } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pVorbis == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pVorbis->format; } #if !defined(MA_NO_VORBIS) { if (pChannels != NULL) { *pChannels = pVorbis->channels; } if (pSampleRate != NULL) { *pSampleRate = pVorbis->sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, pVorbis->channels); } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { *pCursor = pVorbis->cursor; return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { if (pVorbis->usingPushMode) { *pLength = 0; /* I don't know of a good way to determine this reliably with stb_vorbis and push mode. */ } else { *pLength = stb_vorbis_stream_length_in_samples(pVorbis->stb); } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__stbvorbis(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__stbvorbis(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init_file(pFilePath, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__stbvorbis(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static void ma_decoding_backend_uninit__stbvorbis(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_stbvorbis* pVorbis = (ma_stbvorbis*)pBackend; (void)pUserData; ma_stbvorbis_uninit(pVorbis, pAllocationCallbacks); ma_free(pVorbis, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_stbvorbis = { ma_decoding_backend_init__stbvorbis, ma_decoding_backend_init_file__stbvorbis, NULL, /* onInitFileW() */ ma_decoding_backend_init_memory__stbvorbis, ma_decoding_backend_uninit__stbvorbis }; static ma_result ma_decoder_init_vorbis__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* STB_VORBIS_INCLUDE_STB_VORBIS_H */ static ma_result ma_decoder__init_allocation_callbacks(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { MA_ASSERT(pDecoder != NULL); if (pConfig != NULL) { return ma_allocation_callbacks_init_copy(&pDecoder->allocationCallbacks, &pConfig->allocationCallbacks); } else { pDecoder->allocationCallbacks = ma_allocation_callbacks_init_default(); return MA_SUCCESS; } } static ma_result ma_decoder__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_decoder_read_pcm_frames((ma_decoder*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_decoder__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_decoder_seek_to_pcm_frame((ma_decoder*)pDataSource, frameIndex); } static ma_result ma_decoder__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_decoder_get_data_format((ma_decoder*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_decoder__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_decoder_get_cursor_in_pcm_frames((ma_decoder*)pDataSource, pCursor); } static ma_result ma_decoder__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_decoder_get_length_in_pcm_frames((ma_decoder*)pDataSource, pLength); } static ma_data_source_vtable g_ma_decoder_data_source_vtable = { ma_decoder__data_source_on_read, ma_decoder__data_source_on_seek, ma_decoder__data_source_on_get_data_format, ma_decoder__data_source_on_get_cursor, ma_decoder__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; static ma_result ma_decoder__preinit(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, ma_decoder_tell_proc onTell, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_data_source_config dataSourceConfig; MA_ASSERT(pConfig != NULL); if (pDecoder == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDecoder); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pDecoder->ds); if (result != MA_SUCCESS) { return result; } pDecoder->onRead = onRead; pDecoder->onSeek = onSeek; pDecoder->onTell = onTell; pDecoder->pUserData = pUserData; result = ma_decoder__init_allocation_callbacks(pConfig, pDecoder); if (result != MA_SUCCESS) { ma_data_source_uninit(&pDecoder->ds); return result; } return MA_SUCCESS; } static ma_result ma_decoder__postinit(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__init_data_converter(pDecoder, pConfig); /* If we failed post initialization we need to uninitialize the decoder before returning to prevent a memory leak. */ if (result != MA_SUCCESS) { ma_decoder_uninit(pDecoder); return result; } return result; } static ma_result ma_decoder_init__internal(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); /* Silence some warnings in the case that we don't have any decoder backends enabled. */ (void)onRead; (void)onSeek; (void)pUserData; /* If we've specified a specific encoding type, try that first. */ if (pConfig->encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (pConfig->encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_FLAC if (pConfig->encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_MP3 if (pConfig->encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (pConfig->encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(pConfig, pDecoder); } #endif /* If we weren't able to initialize the decoder, seek back to the start to give the next attempts a clean start. */ if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we couldn't load a specific decoding backend based on the encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (pConfig->encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif } if (result != MA_SUCCESS) { return result; } return ma_decoder__postinit(pConfig, pDecoder); } MA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_decoder_config config; ma_result result; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit(onRead, onSeek, NULL, pUserData, &config, pDecoder); if (result != MA_SUCCESS) { return result; } return ma_decoder_init__internal(onRead, onSeek, pUserData, &config, pDecoder); } static ma_result ma_decoder__on_read_memory(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { size_t bytesRemaining; MA_ASSERT(pDecoder->data.memory.dataSize >= pDecoder->data.memory.currentReadPos); if (pBytesRead != NULL) { *pBytesRead = 0; } bytesRemaining = pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesRemaining == 0) { return MA_AT_END; } if (bytesToRead > 0) { MA_COPY_MEMORY(pBufferOut, pDecoder->data.memory.pData + pDecoder->data.memory.currentReadPos, bytesToRead); pDecoder->data.memory.currentReadPos += bytesToRead; } if (pBytesRead != NULL) { *pBytesRead = bytesToRead; } return MA_SUCCESS; } static ma_result ma_decoder__on_seek_memory(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin) { if (byteOffset > 0 && (ma_uint64)byteOffset > MA_SIZE_MAX) { return MA_BAD_SEEK; } if (origin == ma_seek_origin_current) { if (byteOffset > 0) { if (pDecoder->data.memory.currentReadPos + byteOffset > pDecoder->data.memory.dataSize) { byteOffset = (ma_int64)(pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos); /* Trying to seek too far forward. */ } pDecoder->data.memory.currentReadPos += (size_t)byteOffset; } else { if (pDecoder->data.memory.currentReadPos < (size_t)-byteOffset) { byteOffset = -(ma_int64)pDecoder->data.memory.currentReadPos; /* Trying to seek too far backwards. */ } pDecoder->data.memory.currentReadPos -= (size_t)-byteOffset; } } else { if (origin == ma_seek_origin_end) { if (byteOffset < 0) { byteOffset = -byteOffset; } if (byteOffset > (ma_int64)pDecoder->data.memory.dataSize) { pDecoder->data.memory.currentReadPos = 0; /* Trying to seek too far back. */ } else { pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize - (size_t)byteOffset; } } else { if ((size_t)byteOffset <= pDecoder->data.memory.dataSize) { pDecoder->data.memory.currentReadPos = (size_t)byteOffset; } else { pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize; /* Trying to seek too far forward. */ } } } return MA_SUCCESS; } static ma_result ma_decoder__on_tell_memory(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); MA_ASSERT(pCursor != NULL); *pCursor = (ma_int64)pDecoder->data.memory.currentReadPos; return MA_SUCCESS; } static ma_result ma_decoder__preinit_memory_wrapper(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = ma_decoder__preinit(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, ma_decoder__on_tell_memory, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } pDecoder->data.memory.pData = (const ma_uint8*)pData; pDecoder->data.memory.dataSize = dataSize; pDecoder->data.memory.currentReadPos = 0; (void)pConfig; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit(NULL, NULL, NULL, NULL, &config, pDecoder); if (result != MA_SUCCESS) { return result; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_memory__internal(pData, dataSize, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* Use trial and error for stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a block of memory. Use miniaudio's abstraction instead. */ result = ma_decoder__preinit_memory_wrapper(pData, dataSize, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = ma_decoder_init__internal(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, NULL, &config, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } #if defined(MA_HAS_WAV) || \ defined(MA_HAS_MP3) || \ defined(MA_HAS_FLAC) || \ defined(MA_HAS_VORBIS) #define MA_HAS_PATH_API #endif #if defined(MA_HAS_PATH_API) static const char* ma_path_file_name(const char* path) { const char* fileName; if (path == NULL) { return NULL; } fileName = path; /* We just loop through the path until we find the last slash. */ while (path[0] != '\0') { if (path[0] == '/' || path[0] == '\\') { fileName = path; } path += 1; } /* At this point the file name is sitting on a slash, so just move forward. */ while (fileName[0] != '\0' && (fileName[0] == '/' || fileName[0] == '\\')) { fileName += 1; } return fileName; } static const wchar_t* ma_path_file_name_w(const wchar_t* path) { const wchar_t* fileName; if (path == NULL) { return NULL; } fileName = path; /* We just loop through the path until we find the last slash. */ while (path[0] != '\0') { if (path[0] == '/' || path[0] == '\\') { fileName = path; } path += 1; } /* At this point the file name is sitting on a slash, so just move forward. */ while (fileName[0] != '\0' && (fileName[0] == '/' || fileName[0] == '\\')) { fileName += 1; } return fileName; } static const char* ma_path_extension(const char* path) { const char* extension; const char* lastOccurance; if (path == NULL) { path = ""; } extension = ma_path_file_name(path); lastOccurance = NULL; /* Just find the last '.' and return. */ while (extension[0] != '\0') { if (extension[0] == '.') { extension += 1; lastOccurance = extension; } extension += 1; } return (lastOccurance != NULL) ? lastOccurance : extension; } static const wchar_t* ma_path_extension_w(const wchar_t* path) { const wchar_t* extension; const wchar_t* lastOccurance; if (path == NULL) { path = L""; } extension = ma_path_file_name_w(path); lastOccurance = NULL; /* Just find the last '.' and return. */ while (extension[0] != '\0') { if (extension[0] == '.') { extension += 1; lastOccurance = extension; } extension += 1; } return (lastOccurance != NULL) ? lastOccurance : extension; } static ma_bool32 ma_path_extension_equal(const char* path, const char* extension) { const char* ext1; const char* ext2; if (path == NULL || extension == NULL) { return MA_FALSE; } ext1 = extension; ext2 = ma_path_extension(path); #if defined(_MSC_VER) || defined(__DMC__) return _stricmp(ext1, ext2) == 0; #else return strcasecmp(ext1, ext2) == 0; #endif } static ma_bool32 ma_path_extension_equal_w(const wchar_t* path, const wchar_t* extension) { const wchar_t* ext1; const wchar_t* ext2; if (path == NULL || extension == NULL) { return MA_FALSE; } ext1 = extension; ext2 = ma_path_extension_w(path); #if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__) return _wcsicmp(ext1, ext2) == 0; #else /* I'm not aware of a wide character version of strcasecmp(). I'm therefore converting the extensions to multibyte strings and comparing those. This isn't the most efficient way to do it, but it should work OK. */ { char ext1MB[4096]; char ext2MB[4096]; const wchar_t* pext1 = ext1; const wchar_t* pext2 = ext2; mbstate_t mbs1; mbstate_t mbs2; MA_ZERO_OBJECT(&mbs1); MA_ZERO_OBJECT(&mbs2); if (wcsrtombs(ext1MB, &pext1, sizeof(ext1MB), &mbs1) == (size_t)-1) { return MA_FALSE; } if (wcsrtombs(ext2MB, &pext2, sizeof(ext2MB), &mbs2) == (size_t)-1) { return MA_FALSE; } return strcasecmp(ext1MB, ext2MB) == 0; } #endif } #endif /* MA_HAS_PATH_API */ static ma_result ma_decoder__on_read_vfs(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { MA_ASSERT(pDecoder != NULL); MA_ASSERT(pBufferOut != NULL); return ma_vfs_or_default_read(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder__on_seek_vfs(ma_decoder* pDecoder, ma_int64 offset, ma_seek_origin origin) { MA_ASSERT(pDecoder != NULL); return ma_vfs_or_default_seek(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, offset, origin); } static ma_result ma_decoder__on_tell_vfs(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); return ma_vfs_or_default_tell(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pCursor); } static ma_result ma_decoder__preinit_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_vfs_file file; result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); if (result != MA_SUCCESS) { return result; } pDecoder->data.vfs.pVFS = pVFS; pDecoder->data.vfs.file = file; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_vfs(pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(&config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(&config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(&config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(&config, pDecoder); } #endif /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */ if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "wav")) { result = ma_decoder_init_wav__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "flac")) { result = ma_decoder_init_flac__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "mp3")) { result = ma_decoder_init_mp3__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif } /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */ if (result != MA_SUCCESS) { result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder); } else { result = ma_decoder__postinit(&config, pDecoder); } if (result != MA_SUCCESS) { if (pDecoder->data.vfs.file != NULL) { /* <-- Will be reset to NULL if ma_decoder_uninit() is called in one of the steps above which allows us to avoid a double close of the file. */ ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file); } return result; } return MA_SUCCESS; } static ma_result ma_decoder__preinit_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_vfs_file file; result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); if (result != MA_SUCCESS) { return result; } pDecoder->data.vfs.pVFS = pVFS; pDecoder->data.vfs.file = file; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_vfs_w(pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(&config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(&config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(&config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(&config, pDecoder); } #endif /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */ if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"wav")) { result = ma_decoder_init_wav__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"flac")) { result = ma_decoder_init_flac__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"mp3")) { result = ma_decoder_init_mp3__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif } /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */ if (result != MA_SUCCESS) { result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder); } else { result = ma_decoder__postinit(&config, pDecoder); } if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file); return result; } return MA_SUCCESS; } static ma_result ma_decoder__preinit_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_file(pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_file__internal(pFilePath, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* First try loading based on the file extension so we don't waste time opening and closing files. */ #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "wav")) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "flac")) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "mp3")) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "ogg")) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif /* If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we need only iterate over our stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_decoder__preinit_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_file_w(pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_file_w__internal(pFilePath, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* First try loading based on the file extension so we don't waste time opening and closing files. */ #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"wav")) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"flac")) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"mp3")) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"ogg")) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif /* If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we need only iterate over our stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs_w(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } MA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks); } } if (pDecoder->onRead == ma_decoder__on_read_vfs) { ma_vfs_or_default_close(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file); pDecoder->data.vfs.file = NULL; } ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); ma_data_source_uninit(&pDecoder->ds); if (pDecoder->pInputCache != NULL) { ma_free(pDecoder->pInputCache, &pDecoder->allocationCallbacks); } return MA_SUCCESS; } MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesReadOut; void* pRunningFramesOut; if (pFramesRead != NULL) { *pFramesRead = 0; /* Safety. */ } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend == NULL) { return MA_INVALID_OPERATION; } /* Fast path. */ if (pDecoder->converter.isPassthrough) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pFramesOut, frameCount, &totalFramesReadOut); } else { /* Getting here means we need to do data conversion. If we're seeking forward and are _not_ doing resampling we can run this in a fast path. If we're doing resampling we need to run through each sample because we need to ensure its internal cache is updated. */ if (pFramesOut == NULL && pDecoder->converter.hasResampler == MA_FALSE) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, NULL, frameCount, &totalFramesReadOut); } else { /* Slow path. Need to run everything through the data converter. */ ma_format internalFormat; ma_uint32 internalChannels; totalFramesReadOut = 0; pRunningFramesOut = pFramesOut; result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal format and channel count. */ } /* We run a different path depending on whether or not we are using a heap-allocated intermediary buffer or not. If the data converter does not support the calculation of the required number of input frames, we'll use the heap-allocated path. Otherwise we'll use the stack-allocated path. */ if (pDecoder->pInputCache != NULL) { /* We don't have a way of determining the required number of input frames, so need to persistently store input data in a cache. */ while (totalFramesReadOut < frameCount) { ma_uint64 framesToReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; /* If there's any data available in the cache, that needs to get processed first. */ if (pDecoder->inputCacheRemaining > 0) { framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > pDecoder->inputCacheRemaining) { framesToReadThisIterationIn = pDecoder->inputCacheRemaining; } result = ma_data_converter_process_pcm_frames(&pDecoder->converter, ma_offset_pcm_frames_ptr(pDecoder->pInputCache, pDecoder->inputCacheConsumed, internalFormat, internalChannels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut); if (result != MA_SUCCESS) { break; } pDecoder->inputCacheConsumed += framesToReadThisIterationIn; pDecoder->inputCacheRemaining -= framesToReadThisIterationIn; totalFramesReadOut += framesToReadThisIterationOut; if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels)); } if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) { break; /* We're done. */ } } /* Getting here means there's no data in the cache and we need to fill it up from the data source. */ if (pDecoder->inputCacheRemaining == 0) { pDecoder->inputCacheConsumed = 0; result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pDecoder->pInputCache, pDecoder->inputCacheCap, &pDecoder->inputCacheRemaining); if (result != MA_SUCCESS) { break; } } } } else { /* We have a way of determining the required number of input frames so just use the stack. */ while (totalFramesReadOut < frameCount) { ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In internal format. */ ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(internalFormat, internalChannels); ma_uint64 framesToReadThisIterationIn; ma_uint64 framesReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; ma_uint64 framesReadThisIterationOut; ma_uint64 requiredInputFrameCount; framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > intermediaryBufferCap) { framesToReadThisIterationIn = intermediaryBufferCap; } ma_data_converter_get_required_input_frame_count(&pDecoder->converter, framesToReadThisIterationOut, &requiredInputFrameCount); if (framesToReadThisIterationIn > requiredInputFrameCount) { framesToReadThisIterationIn = requiredInputFrameCount; } if (requiredInputFrameCount > 0) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pIntermediaryBuffer, framesToReadThisIterationIn, &framesReadThisIterationIn); /* Note here that even if we've reached the end, we don't want to abort because there might be more output frames needing to be generated from cached input data, which might happen if resampling is being performed. */ if (result != MA_SUCCESS && result != MA_AT_END) { break; } } else { framesReadThisIterationIn = 0; pIntermediaryBuffer[0] = 0; /* <-- This is just to silence a static analysis warning. */ } /* At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any input frames, we still want to try processing frames because there may some output frames generated from cached input data. */ framesReadThisIterationOut = framesToReadThisIterationOut; result = ma_data_converter_process_pcm_frames(&pDecoder->converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut); if (result != MA_SUCCESS) { break; } totalFramesReadOut += framesReadThisIterationOut; if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels)); } if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) { break; /* We're done. */ } } } } } pDecoder->readPointerInPCMFrames += totalFramesReadOut; if (pFramesRead != NULL) { *pFramesRead = totalFramesReadOut; } if (result == MA_SUCCESS && totalFramesReadOut == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { ma_result result; ma_uint64 internalFrameIndex; ma_uint32 internalSampleRate; ma_uint64 currentFrameIndex; result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal sample rate. */ } if (internalSampleRate == pDecoder->outputSampleRate) { internalFrameIndex = frameIndex; } else { internalFrameIndex = ma_calculate_frame_count_after_resampling(internalSampleRate, pDecoder->outputSampleRate, frameIndex); } /* Only seek if we're requesting a different frame to what we're currently sitting on. */ ma_data_source_get_cursor_in_pcm_frames(pDecoder->pBackend, ¤tFrameIndex); if (currentFrameIndex != internalFrameIndex) { result = ma_data_source_seek_to_pcm_frame(pDecoder->pBackend, internalFrameIndex); if (result == MA_SUCCESS) { pDecoder->readPointerInPCMFrames = frameIndex; } /* Reset the data converter so that any cached data in the resampler is cleared. */ ma_data_converter_reset(&pDecoder->converter); } return result; } /* Should never get here, but if we do it means onSeekToPCMFrame was not set by the backend. */ return MA_INVALID_ARGS; } MA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pFormat != NULL) { *pFormat = pDecoder->outputFormat; } if (pChannels != NULL) { *pChannels = pDecoder->outputChannels; } if (pSampleRate != NULL) { *pSampleRate = pDecoder->outputSampleRate; } if (pChannelMap != NULL) { ma_data_converter_get_output_channel_map(&pDecoder->converter, pChannelMap, channelMapCap); } return MA_SUCCESS; } MA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } *pCursor = pDecoder->readPointerInPCMFrames; return MA_SUCCESS; } MA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { ma_result result; ma_uint64 internalLengthInPCMFrames; ma_uint32 internalSampleRate; result = ma_data_source_get_length_in_pcm_frames(pDecoder->pBackend, &internalLengthInPCMFrames); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal length. */ } result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal sample rate. */ } if (internalSampleRate == pDecoder->outputSampleRate) { *pLength = internalLengthInPCMFrames; } else { *pLength = ma_calculate_frame_count_after_resampling(pDecoder->outputSampleRate, internalSampleRate, internalLengthInPCMFrames); } return MA_SUCCESS; } else { return MA_NO_BACKEND; } } MA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames) { ma_result result; ma_uint64 totalFrameCount; if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount); if (result != MA_SUCCESS) { return result; } if (totalFrameCount <= pDecoder->readPointerInPCMFrames) { *pAvailableFrames = 0; } else { *pAvailableFrames = totalFrameCount - pDecoder->readPointerInPCMFrames; } return MA_SUCCESS; } static ma_result ma_decoder__full_decode_and_uninit(ma_decoder* pDecoder, ma_decoder_config* pConfigOut, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_result result; ma_uint64 totalFrameCount; ma_uint64 bpf; ma_uint64 dataCapInFrames; void* pPCMFramesOut; MA_ASSERT(pDecoder != NULL); totalFrameCount = 0; bpf = ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels); /* The frame count is unknown until we try reading. Thus, we just run in a loop. */ dataCapInFrames = 0; pPCMFramesOut = NULL; for (;;) { ma_uint64 frameCountToTryReading; ma_uint64 framesJustRead; /* Make room if there's not enough. */ if (totalFrameCount == dataCapInFrames) { void* pNewPCMFramesOut; ma_uint64 newDataCapInFrames = dataCapInFrames*2; if (newDataCapInFrames == 0) { newDataCapInFrames = 4096; } if ((newDataCapInFrames * bpf) > MA_SIZE_MAX) { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); return MA_TOO_BIG; } pNewPCMFramesOut = (void*)ma_realloc(pPCMFramesOut, (size_t)(newDataCapInFrames * bpf), &pDecoder->allocationCallbacks); if (pNewPCMFramesOut == NULL) { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } dataCapInFrames = newDataCapInFrames; pPCMFramesOut = pNewPCMFramesOut; } frameCountToTryReading = dataCapInFrames - totalFrameCount; MA_ASSERT(frameCountToTryReading > 0); result = ma_decoder_read_pcm_frames(pDecoder, (ma_uint8*)pPCMFramesOut + (totalFrameCount * bpf), frameCountToTryReading, &framesJustRead); totalFrameCount += framesJustRead; if (result != MA_SUCCESS) { break; } if (framesJustRead < frameCountToTryReading) { break; } } if (pConfigOut != NULL) { pConfigOut->format = pDecoder->outputFormat; pConfigOut->channels = pDecoder->outputChannels; pConfigOut->sampleRate = pDecoder->outputSampleRate; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = pPCMFramesOut; } else { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); } if (pFrameCountOut != NULL) { *pFrameCountOut = totalFrameCount; } ma_decoder_uninit(pDecoder); return MA_SUCCESS; } MA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_result result; ma_decoder_config config; ma_decoder decoder; if (pFrameCountOut != NULL) { *pFrameCountOut = 0; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = NULL; } config = ma_decoder_config_init_copy(pConfig); result = ma_decoder_init_vfs(pVFS, pFilePath, &config, &decoder); if (result != MA_SUCCESS) { return result; } result = ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut); return result; } MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { return ma_decode_from_vfs(NULL, pFilePath, pConfig, pFrameCountOut, ppPCMFramesOut); } MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_decoder_config config; ma_decoder decoder; ma_result result; if (pFrameCountOut != NULL) { *pFrameCountOut = 0; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = NULL; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } config = ma_decoder_config_init_copy(pConfig); result = ma_decoder_init_memory(pData, dataSize, &config, &decoder); if (result != MA_SUCCESS) { return result; } return ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut); } #endif /* MA_NO_DECODING */ #ifndef MA_NO_ENCODING #if defined(MA_HAS_WAV) static size_t ma_encoder__internal_on_write_wav(void* pUserData, const void* pData, size_t bytesToWrite) { ma_encoder* pEncoder = (ma_encoder*)pUserData; size_t bytesWritten = 0; MA_ASSERT(pEncoder != NULL); pEncoder->onWrite(pEncoder, pData, bytesToWrite, &bytesWritten); return bytesWritten; } static ma_bool32 ma_encoder__internal_on_seek_wav(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_encoder* pEncoder = (ma_encoder*)pUserData; ma_result result; MA_ASSERT(pEncoder != NULL); result = pEncoder->onSeek(pEncoder, offset, (origin == ma_dr_wav_seek_origin_start) ? ma_seek_origin_start : ma_seek_origin_current); if (result != MA_SUCCESS) { return MA_FALSE; } else { return MA_TRUE; } } static ma_result ma_encoder__on_init_wav(ma_encoder* pEncoder) { ma_dr_wav_data_format wavFormat; ma_allocation_callbacks allocationCallbacks; ma_dr_wav* pWav; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)ma_malloc(sizeof(*pWav), &pEncoder->config.allocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } wavFormat.container = ma_dr_wav_container_riff; wavFormat.channels = pEncoder->config.channels; wavFormat.sampleRate = pEncoder->config.sampleRate; wavFormat.bitsPerSample = ma_get_bytes_per_sample(pEncoder->config.format) * 8; if (pEncoder->config.format == ma_format_f32) { wavFormat.format = MA_DR_WAVE_FORMAT_IEEE_FLOAT; } else { wavFormat.format = MA_DR_WAVE_FORMAT_PCM; } allocationCallbacks.pUserData = pEncoder->config.allocationCallbacks.pUserData; allocationCallbacks.onMalloc = pEncoder->config.allocationCallbacks.onMalloc; allocationCallbacks.onRealloc = pEncoder->config.allocationCallbacks.onRealloc; allocationCallbacks.onFree = pEncoder->config.allocationCallbacks.onFree; if (!ma_dr_wav_init_write(pWav, &wavFormat, ma_encoder__internal_on_write_wav, ma_encoder__internal_on_seek_wav, pEncoder, &allocationCallbacks)) { return MA_ERROR; } pEncoder->pInternalEncoder = pWav; return MA_SUCCESS; } static void ma_encoder__on_uninit_wav(ma_encoder* pEncoder) { ma_dr_wav* pWav; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)pEncoder->pInternalEncoder; MA_ASSERT(pWav != NULL); ma_dr_wav_uninit(pWav); ma_free(pWav, &pEncoder->config.allocationCallbacks); } static ma_result ma_encoder__on_write_pcm_frames_wav(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten) { ma_dr_wav* pWav; ma_uint64 framesWritten; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)pEncoder->pInternalEncoder; MA_ASSERT(pWav != NULL); framesWritten = ma_dr_wav_write_pcm_frames(pWav, frameCount, pFramesIn); if (pFramesWritten != NULL) { *pFramesWritten = framesWritten; } return MA_SUCCESS; } #endif MA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_encoder_config config; MA_ZERO_OBJECT(&config); config.encodingFormat = encodingFormat; config.format = format; config.channels = channels; config.sampleRate = sampleRate; return config; } MA_API ma_result ma_encoder_preinit(const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; if (pEncoder == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEncoder); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->format == ma_format_unknown || pConfig->channels == 0 || pConfig->sampleRate == 0) { return MA_INVALID_ARGS; } pEncoder->config = *pConfig; result = ma_allocation_callbacks_init_copy(&pEncoder->config.allocationCallbacks, &pConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init__internal(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, ma_encoder* pEncoder) { ma_result result = MA_SUCCESS; /* This assumes ma_encoder_preinit() has been called prior. */ MA_ASSERT(pEncoder != NULL); if (onWrite == NULL || onSeek == NULL) { return MA_INVALID_ARGS; } pEncoder->onWrite = onWrite; pEncoder->onSeek = onSeek; pEncoder->pUserData = pUserData; switch (pEncoder->config.encodingFormat) { case ma_encoding_format_wav: { #if defined(MA_HAS_WAV) pEncoder->onInit = ma_encoder__on_init_wav; pEncoder->onUninit = ma_encoder__on_uninit_wav; pEncoder->onWritePCMFrames = ma_encoder__on_write_pcm_frames_wav; #else result = MA_NO_BACKEND; #endif } break; default: { result = MA_INVALID_ARGS; } break; } /* Getting here means we should have our backend callbacks set up. */ if (result == MA_SUCCESS) { result = pEncoder->onInit(pEncoder); } return result; } static ma_result ma_encoder__on_write_vfs(ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten) { return ma_vfs_or_default_write(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, pBufferIn, bytesToWrite, pBytesWritten); } static ma_result ma_encoder__on_seek_vfs(ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin) { return ma_vfs_or_default_seek(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, offset, origin); } MA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; ma_vfs_file file; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } /* Now open the file. If this fails we don't need to uninitialize the encoder. */ result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file); if (result != MA_SUCCESS) { return result; } pEncoder->data.vfs.pVFS = pVFS; pEncoder->data.vfs.file = file; result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; ma_vfs_file file; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } /* Now open the file. If this fails we don't need to uninitialize the encoder. */ result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file); if (result != MA_SUCCESS) { return result; } pEncoder->data.vfs.pVFS = pVFS; pEncoder->data.vfs.file = file; result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { return ma_encoder_init_vfs(NULL, pFilePath, pConfig, pEncoder); } MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { return ma_encoder_init_vfs_w(NULL, pFilePath, pConfig, pEncoder); } MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } return ma_encoder_init__internal(onWrite, onSeek, pUserData, pEncoder); } MA_API void ma_encoder_uninit(ma_encoder* pEncoder) { if (pEncoder == NULL) { return; } if (pEncoder->onUninit) { pEncoder->onUninit(pEncoder); } /* If we have a file handle, close it. */ if (pEncoder->onWrite == ma_encoder__on_write_vfs) { ma_vfs_or_default_close(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file); pEncoder->data.vfs.file = NULL; } } MA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten) { if (pFramesWritten != NULL) { *pFramesWritten = 0; } if (pEncoder == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } return pEncoder->onWritePCMFrames(pEncoder, pFramesIn, frameCount, pFramesWritten); } #endif /* MA_NO_ENCODING */ /************************************************************************************************************************************************************** Generation **************************************************************************************************************************************************************/ #ifndef MA_NO_GENERATION MA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency) { ma_waveform_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.type = type; config.amplitude = amplitude; config.frequency = frequency; return config; } static ma_result ma_waveform__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_waveform_read_pcm_frames((ma_waveform*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_waveform__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_waveform_seek_to_pcm_frame((ma_waveform*)pDataSource, frameIndex); } static ma_result ma_waveform__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_waveform* pWaveform = (ma_waveform*)pDataSource; *pFormat = pWaveform->config.format; *pChannels = pWaveform->config.channels; *pSampleRate = pWaveform->config.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pWaveform->config.channels); return MA_SUCCESS; } static ma_result ma_waveform__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_waveform* pWaveform = (ma_waveform*)pDataSource; *pCursor = (ma_uint64)(pWaveform->time / pWaveform->advance); return MA_SUCCESS; } static double ma_waveform__calculate_advance(ma_uint32 sampleRate, double frequency) { return (1.0 / (sampleRate / frequency)); } static void ma_waveform__update_advance(ma_waveform* pWaveform) { pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency); } static ma_data_source_vtable g_ma_waveform_data_source_vtable = { ma_waveform__data_source_on_read, ma_waveform__data_source_on_seek, ma_waveform__data_source_on_get_data_format, ma_waveform__data_source_on_get_cursor, NULL, /* onGetLength. There's no notion of a length in waveforms. */ NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform) { ma_result result; ma_data_source_config dataSourceConfig; if (pWaveform == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWaveform); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_waveform_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pWaveform->ds); if (result != MA_SUCCESS) { return result; } pWaveform->config = *pConfig; pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency); pWaveform->time = 0; return MA_SUCCESS; } MA_API void ma_waveform_uninit(ma_waveform* pWaveform) { if (pWaveform == NULL) { return; } ma_data_source_uninit(&pWaveform->ds); } MA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.amplitude = amplitude; return MA_SUCCESS; } MA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.frequency = frequency; ma_waveform__update_advance(pWaveform); return MA_SUCCESS; } MA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.type = type; return MA_SUCCESS; } MA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.sampleRate = sampleRate; ma_waveform__update_advance(pWaveform); return MA_SUCCESS; } static float ma_waveform_sine_f32(double time, double amplitude) { return (float)(ma_sind(MA_TAU_D * time) * amplitude); } static ma_int16 ma_waveform_sine_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_sine_f32(time, amplitude)); } static float ma_waveform_square_f32(double time, double dutyCycle, double amplitude) { double f = time - (ma_int64)time; double r; if (f < dutyCycle) { r = amplitude; } else { r = -amplitude; } return (float)r; } static ma_int16 ma_waveform_square_s16(double time, double dutyCycle, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_square_f32(time, dutyCycle, amplitude)); } static float ma_waveform_triangle_f32(double time, double amplitude) { double f = time - (ma_int64)time; double r; r = 2 * ma_abs(2 * (f - 0.5)) - 1; return (float)(r * amplitude); } static ma_int16 ma_waveform_triangle_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_triangle_f32(time, amplitude)); } static float ma_waveform_sawtooth_f32(double time, double amplitude) { double f = time - (ma_int64)time; double r; r = 2 * (f - 0.5); return (float)(r * amplitude); } static ma_int16 ma_waveform_sawtooth_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_sawtooth_f32(time, amplitude)); } static void ma_waveform_read_pcm_frames__sine(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_sine_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__square(ma_waveform* pWaveform, double dutyCycle, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_square_s16(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__triangle(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_triangle_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__sawtooth(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_sawtooth_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } MA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWaveform == NULL) { return MA_INVALID_ARGS; } if (pFramesOut != NULL) { switch (pWaveform->config.type) { case ma_waveform_type_sine: { ma_waveform_read_pcm_frames__sine(pWaveform, pFramesOut, frameCount); } break; case ma_waveform_type_square: { ma_waveform_read_pcm_frames__square(pWaveform, 0.5, pFramesOut, frameCount); } break; case ma_waveform_type_triangle: { ma_waveform_read_pcm_frames__triangle(pWaveform, pFramesOut, frameCount); } break; case ma_waveform_type_sawtooth: { ma_waveform_read_pcm_frames__sawtooth(pWaveform, pFramesOut, frameCount); } break; default: return MA_INVALID_OPERATION; /* Unknown waveform type. */ } } else { pWaveform->time += pWaveform->advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */ } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } MA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->time = pWaveform->advance * (ma_int64)frameIndex; /* Casting for VC6. Won't be an issue in practice. */ return MA_SUCCESS; } MA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency) { ma_pulsewave_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.dutyCycle = dutyCycle; config.amplitude = amplitude; config.frequency = frequency; return config; } MA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform) { ma_result result; ma_waveform_config config; if (pWaveform == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWaveform); config = ma_waveform_config_init( pConfig->format, pConfig->channels, pConfig->sampleRate, ma_waveform_type_square, pConfig->amplitude, pConfig->frequency ); result = ma_waveform_init(&config, &pWaveform->waveform); ma_pulsewave_set_duty_cycle(pWaveform, pConfig->dutyCycle); return result; } MA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform) { if (pWaveform == NULL) { return; } ma_waveform_uninit(&pWaveform->waveform); } MA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWaveform == NULL) { return MA_INVALID_ARGS; } if (pFramesOut != NULL) { ma_waveform_read_pcm_frames__square(&pWaveform->waveform, pWaveform->config.dutyCycle, pFramesOut, frameCount); } else { pWaveform->waveform.time += pWaveform->waveform.advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */ } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } MA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } ma_waveform_seek_to_pcm_frame(&pWaveform->waveform, frameIndex); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.amplitude = amplitude; ma_waveform_set_amplitude(&pWaveform->waveform, amplitude); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.frequency = frequency; ma_waveform_set_frequency(&pWaveform->waveform, frequency); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.sampleRate = sampleRate; ma_waveform_set_sample_rate(&pWaveform->waveform, sampleRate); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.dutyCycle = dutyCycle; return MA_SUCCESS; } MA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude) { ma_noise_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.type = type; config.seed = seed; config.amplitude = amplitude; if (config.seed == 0) { config.seed = MA_DEFAULT_LCG_SEED; } return config; } static ma_result ma_noise__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_noise_read_pcm_frames((ma_noise*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_noise__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { /* No-op. Just pretend to be successful. */ (void)pDataSource; (void)frameIndex; return MA_SUCCESS; } static ma_result ma_noise__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_noise* pNoise = (ma_noise*)pDataSource; *pFormat = pNoise->config.format; *pChannels = pNoise->config.channels; *pSampleRate = 0; /* There is no notion of sample rate with noise generation. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pNoise->config.channels); return MA_SUCCESS; } static ma_data_source_vtable g_ma_noise_data_source_vtable = { ma_noise__data_source_on_read, ma_noise__data_source_on_seek, /* No-op for noise. */ ma_noise__data_source_on_get_data_format, NULL, /* onGetCursor. No notion of a cursor for noise. */ NULL, /* onGetLength. No notion of a length for noise. */ NULL, /* onSetLooping */ 0 }; #ifndef MA_PINK_NOISE_BIN_SIZE #define MA_PINK_NOISE_BIN_SIZE 16 #endif typedef struct { size_t sizeInBytes; struct { size_t binOffset; size_t accumulationOffset; size_t counterOffset; } pink; struct { size_t accumulationOffset; } brownian; } ma_noise_heap_layout; static ma_result ma_noise_get_heap_layout(const ma_noise_config* pConfig, ma_noise_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Pink. */ if (pConfig->type == ma_noise_type_pink) { /* bin */ pHeapLayout->pink.binOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double*) * pConfig->channels; pHeapLayout->sizeInBytes += sizeof(double ) * pConfig->channels * MA_PINK_NOISE_BIN_SIZE; /* accumulation */ pHeapLayout->pink.accumulationOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels; /* counter */ pHeapLayout->pink.counterOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_uint32) * pConfig->channels; } /* Brownian. */ if (pConfig->type == ma_noise_type_brownian) { /* accumulation */ pHeapLayout->brownian.accumulationOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_noise_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_noise_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise) { ma_result result; ma_noise_heap_layout heapLayout; ma_data_source_config dataSourceConfig; ma_uint32 iChannel; if (pNoise == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNoise); result = ma_noise_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pNoise->_pHeap = pHeap; MA_ZERO_MEMORY(pNoise->_pHeap, heapLayout.sizeInBytes); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_noise_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pNoise->ds); if (result != MA_SUCCESS) { return result; } pNoise->config = *pConfig; ma_lcg_seed(&pNoise->lcg, pConfig->seed); if (pNoise->config.type == ma_noise_type_pink) { pNoise->state.pink.bin = (double** )ma_offset_ptr(pHeap, heapLayout.pink.binOffset); pNoise->state.pink.accumulation = (double* )ma_offset_ptr(pHeap, heapLayout.pink.accumulationOffset); pNoise->state.pink.counter = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.pink.counterOffset); for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pNoise->state.pink.bin[iChannel] = (double*)ma_offset_ptr(pHeap, heapLayout.pink.binOffset + (sizeof(double*) * pConfig->channels) + (sizeof(double) * MA_PINK_NOISE_BIN_SIZE * iChannel)); pNoise->state.pink.accumulation[iChannel] = 0; pNoise->state.pink.counter[iChannel] = 1; } } if (pNoise->config.type == ma_noise_type_brownian) { pNoise->state.brownian.accumulation = (double*)ma_offset_ptr(pHeap, heapLayout.brownian.accumulationOffset); for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pNoise->state.brownian.accumulation[iChannel] = 0; } } return MA_SUCCESS; } MA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_noise_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_noise_init_preallocated(pConfig, pHeap, pNoise); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pNoise->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks) { if (pNoise == NULL) { return; } ma_data_source_uninit(&pNoise->ds); if (pNoise->_ownsHeap) { ma_free(pNoise->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude) { if (pNoise == NULL) { return MA_INVALID_ARGS; } pNoise->config.amplitude = amplitude; return MA_SUCCESS; } MA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed) { if (pNoise == NULL) { return MA_INVALID_ARGS; } pNoise->lcg.state = seed; return MA_SUCCESS; } MA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type) { if (pNoise == NULL) { return MA_INVALID_ARGS; } /* This function should never have been implemented in the first place. Changing the type dynamically is not supported. Instead you need to uninitialize and reinitialize a fresh `ma_noise` object. This function will be removed in version 0.12. */ MA_ASSERT(MA_FALSE); (void)type; return MA_INVALID_OPERATION; } static MA_INLINE float ma_noise_f32_white(ma_noise* pNoise) { return (float)(ma_lcg_rand_f64(&pNoise->lcg) * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_white(ma_noise* pNoise) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_white(pNoise)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__white(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_white(pNoise); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_white(pNoise); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_white(pNoise); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } static MA_INLINE unsigned int ma_tzcnt32(unsigned int x) { unsigned int n; /* Special case for odd numbers since they should happen about half the time. */ if (x & 0x1) { return 0; } if (x == 0) { return sizeof(x) << 3; } n = 1; if ((x & 0x0000FFFF) == 0) { x >>= 16; n += 16; } if ((x & 0x000000FF) == 0) { x >>= 8; n += 8; } if ((x & 0x0000000F) == 0) { x >>= 4; n += 4; } if ((x & 0x00000003) == 0) { x >>= 2; n += 2; } n -= x & 0x00000001; return n; } /* Pink noise generation based on Tonic (public domain) with modifications. https://github.com/TonicAudio/Tonic/blob/master/src/Tonic/Noise.h This is basically _the_ reference for pink noise from what I've found: http://www.firstpr.com.au/dsp/pink-noise/ */ static MA_INLINE float ma_noise_f32_pink(ma_noise* pNoise, ma_uint32 iChannel) { double result; double binPrev; double binNext; unsigned int ibin; ibin = ma_tzcnt32(pNoise->state.pink.counter[iChannel]) & (MA_PINK_NOISE_BIN_SIZE - 1); binPrev = pNoise->state.pink.bin[iChannel][ibin]; binNext = ma_lcg_rand_f64(&pNoise->lcg); pNoise->state.pink.bin[iChannel][ibin] = binNext; pNoise->state.pink.accumulation[iChannel] += (binNext - binPrev); pNoise->state.pink.counter[iChannel] += 1; result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.pink.accumulation[iChannel]); result /= 10; return (float)(result * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_pink(ma_noise* pNoise, ma_uint32 iChannel) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_pink(pNoise, iChannel)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__pink(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_pink(pNoise, iChannel); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_pink(pNoise, iChannel); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_pink(pNoise, iChannel); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } static MA_INLINE float ma_noise_f32_brownian(ma_noise* pNoise, ma_uint32 iChannel) { double result; result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.brownian.accumulation[iChannel]); result /= 1.005; /* Don't escape the -1..1 range on average. */ pNoise->state.brownian.accumulation[iChannel] = result; result /= 20; return (float)(result * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_brownian(ma_noise* pNoise, ma_uint32 iChannel) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_brownian(pNoise, iChannel)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__brownian(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_brownian(pNoise, iChannel); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_brownian(pNoise, iChannel); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_brownian(pNoise, iChannel); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } MA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_uint64 framesRead = 0; if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pNoise == NULL) { return MA_INVALID_ARGS; } /* The output buffer is allowed to be NULL. Since we aren't tracking cursors or anything we can just do nothing and pretend to be successful. */ if (pFramesOut == NULL) { framesRead = frameCount; } else { switch (pNoise->config.type) { case ma_noise_type_white: framesRead = ma_noise_read_pcm_frames__white (pNoise, pFramesOut, frameCount); break; case ma_noise_type_pink: framesRead = ma_noise_read_pcm_frames__pink (pNoise, pFramesOut, frameCount); break; case ma_noise_type_brownian: framesRead = ma_noise_read_pcm_frames__brownian(pNoise, pFramesOut, frameCount); break; default: return MA_INVALID_OPERATION; /* Unknown noise type. */ } } if (pFramesRead != NULL) { *pFramesRead = framesRead; } return MA_SUCCESS; } #endif /* MA_NO_GENERATION */ #ifndef MA_NO_RESOURCE_MANAGER #ifndef MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS #define MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS 1000 #endif #ifndef MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY #define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY 1024 #endif MA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void) { ma_resource_manager_pipeline_notifications notifications; MA_ZERO_OBJECT(¬ifications); return notifications; } static void ma_resource_manager_pipeline_notifications_signal_all_notifications(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pNotification) { ma_async_notification_signal(pPipelineNotifications->init.pNotification); } if (pPipelineNotifications->done.pNotification) { ma_async_notification_signal(pPipelineNotifications->done.pNotification); } } static void ma_resource_manager_pipeline_notifications_acquire_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->init.pFence); } if (pPipelineNotifications->done.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->done.pFence); } } static void ma_resource_manager_pipeline_notifications_release_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pFence != NULL) { ma_fence_release(pPipelineNotifications->init.pFence); } if (pPipelineNotifications->done.pFence != NULL) { ma_fence_release(pPipelineNotifications->done.pFence); } } #ifndef MA_DEFAULT_HASH_SEED #define MA_DEFAULT_HASH_SEED 42 #endif /* MurmurHash3. Based on code from https://github.com/PeterScott/murmur3/blob/master/murmur3.c (public domain). */ #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #endif static MA_INLINE ma_uint32 ma_rotl32(ma_uint32 x, ma_int8 r) { return (x << r) | (x >> (32 - r)); } static MA_INLINE ma_uint32 ma_hash_getblock(const ma_uint32* blocks, int i) { ma_uint32 block; /* Try silencing a sanitization warning about unaligned access by doing a memcpy() instead of assignment. */ MA_COPY_MEMORY(&block, ma_offset_ptr(blocks, i * sizeof(block)), sizeof(block)); if (ma_is_little_endian()) { return block; } else { return ma_swap_endian_uint32(block); } } static MA_INLINE ma_uint32 ma_hash_fmix32(ma_uint32 h) { h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; h ^= h >> 16; return h; } static ma_uint32 ma_hash_32(const void* key, int len, ma_uint32 seed) { const ma_uint8* data = (const ma_uint8*)key; const ma_uint32* blocks; const ma_uint8* tail; const int nblocks = len / 4; ma_uint32 h1 = seed; ma_uint32 c1 = 0xcc9e2d51; ma_uint32 c2 = 0x1b873593; ma_uint32 k1; int i; blocks = (const ma_uint32 *)(data + nblocks*4); for(i = -nblocks; i; i++) { k1 = ma_hash_getblock(blocks,i); k1 *= c1; k1 = ma_rotl32(k1, 15); k1 *= c2; h1 ^= k1; h1 = ma_rotl32(h1, 13); h1 = h1*5 + 0xe6546b64; } tail = (const ma_uint8*)(data + nblocks*4); k1 = 0; switch(len & 3) { case 3: k1 ^= tail[2] << 16; case 2: k1 ^= tail[1] << 8; case 1: k1 ^= tail[0]; k1 *= c1; k1 = ma_rotl32(k1, 15); k1 *= c2; h1 ^= k1; }; h1 ^= len; h1 = ma_hash_fmix32(h1); return h1; } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #endif /* End MurmurHash3 */ static ma_uint32 ma_hash_string_32(const char* str) { return ma_hash_32(str, (int)strlen(str), MA_DEFAULT_HASH_SEED); } static ma_uint32 ma_hash_string_w_32(const wchar_t* str) { return ma_hash_32(str, (int)wcslen(str) * sizeof(*str), MA_DEFAULT_HASH_SEED); } /* Basic BST Functions */ static ma_result ma_resource_manager_data_buffer_node_search(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(ppDataBufferNode != NULL); pCurrentNode = pResourceManager->pRootDataBufferNode; while (pCurrentNode != NULL) { if (hashedName32 == pCurrentNode->hashedName32) { break; /* Found. */ } else if (hashedName32 < pCurrentNode->hashedName32) { pCurrentNode = pCurrentNode->pChildLo; } else { pCurrentNode = pCurrentNode->pChildHi; } } *ppDataBufferNode = pCurrentNode; if (pCurrentNode == NULL) { return MA_DOES_NOT_EXIST; } else { return MA_SUCCESS; } } static ma_result ma_resource_manager_data_buffer_node_insert_point(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppInsertPoint) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(ppInsertPoint != NULL); *ppInsertPoint = NULL; if (pResourceManager->pRootDataBufferNode == NULL) { return MA_SUCCESS; /* No items. */ } /* We need to find the node that will become the parent of the new node. If a node is found that already has the same hashed name we need to return MA_ALREADY_EXISTS. */ pCurrentNode = pResourceManager->pRootDataBufferNode; while (pCurrentNode != NULL) { if (hashedName32 == pCurrentNode->hashedName32) { result = MA_ALREADY_EXISTS; break; } else { if (hashedName32 < pCurrentNode->hashedName32) { if (pCurrentNode->pChildLo == NULL) { result = MA_SUCCESS; break; } else { pCurrentNode = pCurrentNode->pChildLo; } } else { if (pCurrentNode->pChildHi == NULL) { result = MA_SUCCESS; break; } else { pCurrentNode = pCurrentNode->pChildHi; } } } } *ppInsertPoint = pCurrentNode; return result; } static ma_result ma_resource_manager_data_buffer_node_insert_at(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_buffer_node* pInsertPoint) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); /* The key must have been set before calling this function. */ MA_ASSERT(pDataBufferNode->hashedName32 != 0); if (pInsertPoint == NULL) { /* It's the first node. */ pResourceManager->pRootDataBufferNode = pDataBufferNode; } else { /* It's not the first node. It needs to be inserted. */ if (pDataBufferNode->hashedName32 < pInsertPoint->hashedName32) { MA_ASSERT(pInsertPoint->pChildLo == NULL); pInsertPoint->pChildLo = pDataBufferNode; } else { MA_ASSERT(pInsertPoint->pChildHi == NULL); pInsertPoint->pChildHi = pDataBufferNode; } } pDataBufferNode->pParent = pInsertPoint; return MA_SUCCESS; } #if 0 /* Unused for now. */ static ma_result ma_resource_manager_data_buffer_node_insert(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_result result; ma_resource_manager_data_buffer_node* pInsertPoint; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, pDataBufferNode->hashedName32, &pInsertPoint); if (result != MA_SUCCESS) { return MA_INVALID_ARGS; } return ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint); } #endif static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_min(ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pDataBufferNode != NULL); pCurrentNode = pDataBufferNode; while (pCurrentNode->pChildLo != NULL) { pCurrentNode = pCurrentNode->pChildLo; } return pCurrentNode; } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_max(ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pDataBufferNode != NULL); pCurrentNode = pDataBufferNode; while (pCurrentNode->pChildHi != NULL) { pCurrentNode = pCurrentNode->pChildHi; } return pCurrentNode; } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_successor(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->pChildHi != NULL); return ma_resource_manager_data_buffer_node_find_min(pDataBufferNode->pChildHi); } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_predecessor(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->pChildLo != NULL); return ma_resource_manager_data_buffer_node_find_max(pDataBufferNode->pChildLo); } static ma_result ma_resource_manager_data_buffer_node_remove(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); if (pDataBufferNode->pChildLo == NULL) { if (pDataBufferNode->pChildHi == NULL) { /* Simple case - deleting a buffer with no children. */ if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); /* There is only a single buffer in the tree which should be equal to the root node. */ pResourceManager->pRootDataBufferNode = NULL; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = NULL; } else { pDataBufferNode->pParent->pChildHi = NULL; } } } else { /* Node has one child - pChildHi != NULL. */ pDataBufferNode->pChildHi->pParent = pDataBufferNode->pParent; if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildHi; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildHi; } else { pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildHi; } } } } else { if (pDataBufferNode->pChildHi == NULL) { /* Node has one child - pChildLo != NULL. */ pDataBufferNode->pChildLo->pParent = pDataBufferNode->pParent; if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildLo; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildLo; } else { pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildLo; } } } else { /* Complex case - deleting a node with two children. */ ma_resource_manager_data_buffer_node* pReplacementDataBufferNode; /* For now we are just going to use the in-order successor as the replacement, but we may want to try to keep this balanced by switching between the two. */ pReplacementDataBufferNode = ma_resource_manager_data_buffer_node_find_inorder_successor(pDataBufferNode); MA_ASSERT(pReplacementDataBufferNode != NULL); /* Now that we have our replacement node we can make the change. The simple way to do this would be to just exchange the values, and then remove the replacement node, however we track specific nodes via pointers which means we can't just swap out the values. We need to instead just change the pointers around. The replacement node should have at most 1 child. Therefore, we can detach it in terms of our simpler cases above. What we're essentially doing is detaching the replacement node and reinserting it into the same position as the deleted node. */ MA_ASSERT(pReplacementDataBufferNode->pParent != NULL); /* The replacement node should never be the root which means it should always have a parent. */ MA_ASSERT(pReplacementDataBufferNode->pChildLo == NULL); /* Because we used in-order successor. This would be pChildHi == NULL if we used in-order predecessor. */ if (pReplacementDataBufferNode->pChildHi == NULL) { if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) { pReplacementDataBufferNode->pParent->pChildLo = NULL; } else { pReplacementDataBufferNode->pParent->pChildHi = NULL; } } else { pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode->pParent; if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) { pReplacementDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode->pChildHi; } else { pReplacementDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode->pChildHi; } } /* The replacement node has essentially been detached from the binary tree, so now we need to replace the old data buffer with it. The first thing to update is the parent */ if (pDataBufferNode->pParent != NULL) { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode; } else { pDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode; } } /* Now need to update the replacement node's pointers. */ pReplacementDataBufferNode->pParent = pDataBufferNode->pParent; pReplacementDataBufferNode->pChildLo = pDataBufferNode->pChildLo; pReplacementDataBufferNode->pChildHi = pDataBufferNode->pChildHi; /* Now the children of the replacement node need to have their parent pointers updated. */ if (pReplacementDataBufferNode->pChildLo != NULL) { pReplacementDataBufferNode->pChildLo->pParent = pReplacementDataBufferNode; } if (pReplacementDataBufferNode->pChildHi != NULL) { pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode; } /* Now the root node needs to be updated. */ if (pResourceManager->pRootDataBufferNode == pDataBufferNode) { pResourceManager->pRootDataBufferNode = pReplacementDataBufferNode; } } } return MA_SUCCESS; } #if 0 /* Unused for now. */ static ma_result ma_resource_manager_data_buffer_node_remove_by_key(ma_resource_manager* pResourceManager, ma_uint32 hashedName32) { ma_result result; ma_resource_manager_data_buffer_node* pDataBufferNode; result = ma_resource_manager_data_buffer_search(pResourceManager, hashedName32, &pDataBufferNode); if (result != MA_SUCCESS) { return result; /* Could not find the data buffer. */ } return ma_resource_manager_data_buffer_remove(pResourceManager, pDataBufferNode); } #endif static ma_resource_manager_data_supply_type ma_resource_manager_data_buffer_node_get_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode) { return (ma_resource_manager_data_supply_type)ma_atomic_load_i32(&pDataBufferNode->data.type); } static void ma_resource_manager_data_buffer_node_set_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_supply_type supplyType) { ma_atomic_exchange_i32(&pDataBufferNode->data.type, supplyType); } static ma_result ma_resource_manager_data_buffer_node_increment_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount) { ma_uint32 refCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); (void)pResourceManager; refCount = ma_atomic_fetch_add_32(&pDataBufferNode->refCount, 1) + 1; if (pNewRefCount != NULL) { *pNewRefCount = refCount; } return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_decrement_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount) { ma_uint32 refCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); (void)pResourceManager; refCount = ma_atomic_fetch_sub_32(&pDataBufferNode->refCount, 1) - 1; if (pNewRefCount != NULL) { *pNewRefCount = refCount; } return MA_SUCCESS; } static void ma_resource_manager_data_buffer_node_free(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); if (pDataBufferNode->isDataOwnedByResourceManager) { if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_encoded) { ma_free((void*)pDataBufferNode->data.backend.encoded.pData, &pResourceManager->config.allocationCallbacks); pDataBufferNode->data.backend.encoded.pData = NULL; pDataBufferNode->data.backend.encoded.sizeInBytes = 0; } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded) { ma_free((void*)pDataBufferNode->data.backend.decoded.pData, &pResourceManager->config.allocationCallbacks); pDataBufferNode->data.backend.decoded.pData = NULL; pDataBufferNode->data.backend.decoded.totalFrameCount = 0; } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded_paged) { ma_paged_audio_buffer_data_uninit(&pDataBufferNode->data.backend.decodedPaged.data, &pResourceManager->config.allocationCallbacks); } else { /* Should never hit this if the node was successfully initialized. */ MA_ASSERT(pDataBufferNode->result != MA_SUCCESS); } } /* The data buffer itself needs to be freed. */ ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); } static ma_result ma_resource_manager_data_buffer_node_result(const ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBufferNode->result); /* Need a naughty const-cast here. */ } static ma_bool32 ma_resource_manager_is_threading_enabled(const ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); return (pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) == 0; } typedef struct { union { ma_async_notification_event e; ma_async_notification_poll p; } backend; /* Must be the first member. */ ma_resource_manager* pResourceManager; } ma_resource_manager_inline_notification; static ma_result ma_resource_manager_inline_notification_init(ma_resource_manager* pResourceManager, ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pNotification != NULL); pNotification->pResourceManager = pResourceManager; if (ma_resource_manager_is_threading_enabled(pResourceManager)) { return ma_async_notification_event_init(&pNotification->backend.e); } else { return ma_async_notification_poll_init(&pNotification->backend.p); } } static void ma_resource_manager_inline_notification_uninit(ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pNotification != NULL); if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) { ma_async_notification_event_uninit(&pNotification->backend.e); } else { /* No need to uninitialize a polling notification. */ } } static void ma_resource_manager_inline_notification_wait(ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pNotification != NULL); if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) { ma_async_notification_event_wait(&pNotification->backend.e); } else { while (ma_async_notification_poll_is_signalled(&pNotification->backend.p) == MA_FALSE) { ma_result result = ma_resource_manager_process_next_job(pNotification->pResourceManager); if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) { break; } } } } static void ma_resource_manager_inline_notification_wait_and_uninit(ma_resource_manager_inline_notification* pNotification) { ma_resource_manager_inline_notification_wait(pNotification); ma_resource_manager_inline_notification_uninit(pNotification); } static void ma_resource_manager_data_buffer_bst_lock(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_lock(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } else { /* Threading not enabled. Do nothing. */ } } static void ma_resource_manager_data_buffer_bst_unlock(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_unlock(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } else { /* Threading not enabled. Do nothing. */ } } #ifndef MA_NO_THREADING static ma_thread_result MA_THREADCALL ma_resource_manager_job_thread(void* pUserData) { ma_resource_manager* pResourceManager = (ma_resource_manager*)pUserData; MA_ASSERT(pResourceManager != NULL); for (;;) { ma_result result; ma_job job; result = ma_resource_manager_next_job(pResourceManager, &job); if (result != MA_SUCCESS) { break; } /* Terminate if we got a quit message. */ if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) { break; } ma_job_process(&job); } return (ma_thread_result)0; } #endif MA_API ma_resource_manager_config ma_resource_manager_config_init(void) { ma_resource_manager_config config; MA_ZERO_OBJECT(&config); config.decodedFormat = ma_format_unknown; config.decodedChannels = 0; config.decodedSampleRate = 0; config.jobThreadCount = 1; /* A single miniaudio-managed job thread by default. */ config.jobQueueCapacity = MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY; /* Flags. */ config.flags = 0; #ifdef MA_NO_THREADING { /* Threading is disabled at compile time so disable threading at runtime as well by default. */ config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; config.jobThreadCount = 0; } #endif return config; } MA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager) { ma_result result; ma_job_queue_config jobQueueConfig; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResourceManager); if (pConfig == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { if (pConfig->jobThreadCount > ma_countof(pResourceManager->jobThreads)) { return MA_INVALID_ARGS; /* Requesting too many job threads. */ } } #endif pResourceManager->config = *pConfig; ma_allocation_callbacks_init_copy(&pResourceManager->config.allocationCallbacks, &pConfig->allocationCallbacks); /* Get the log set up early so we can start using it as soon as possible. */ if (pResourceManager->config.pLog == NULL) { result = ma_log_init(&pResourceManager->config.allocationCallbacks, &pResourceManager->log); if (result == MA_SUCCESS) { pResourceManager->config.pLog = &pResourceManager->log; } else { pResourceManager->config.pLog = NULL; /* Logging is unavailable. */ } } if (pResourceManager->config.pVFS == NULL) { result = ma_default_vfs_init(&pResourceManager->defaultVFS, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { return result; /* Failed to initialize the default file system. */ } pResourceManager->config.pVFS = &pResourceManager->defaultVFS; } /* If threading has been disabled at compile time, enforce it at run time as well. */ #ifdef MA_NO_THREADING { pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; } #endif /* We need to force MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING if MA_RESOURCE_MANAGER_FLAG_NO_THREADING is set. */ if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) { pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING; /* We cannot allow job threads when MA_RESOURCE_MANAGER_FLAG_NO_THREADING has been set. This is an invalid use case. */ if (pResourceManager->config.jobThreadCount > 0) { return MA_INVALID_ARGS; } } /* Job queue. */ jobQueueConfig.capacity = pResourceManager->config.jobQueueCapacity; jobQueueConfig.flags = 0; if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING) != 0) { if (pResourceManager->config.jobThreadCount > 0) { return MA_INVALID_ARGS; /* Non-blocking mode is only valid for self-managed job threads. */ } jobQueueConfig.flags |= MA_JOB_QUEUE_FLAG_NON_BLOCKING; } result = ma_job_queue_init(&jobQueueConfig, &pResourceManager->config.allocationCallbacks, &pResourceManager->jobQueue); if (result != MA_SUCCESS) { return result; } /* Custom decoding backends. */ if (pConfig->ppCustomDecodingBackendVTables != NULL && pConfig->customDecodingBackendCount > 0) { size_t sizeInBytes = sizeof(*pResourceManager->config.ppCustomDecodingBackendVTables) * pConfig->customDecodingBackendCount; ma_decoding_backend_vtable** ppCustomDecodingBackendVTables; ppCustomDecodingBackendVTables = (ma_decoding_backend_vtable**)ma_malloc(sizeInBytes, &pResourceManager->config.allocationCallbacks); if (pResourceManager->config.ppCustomDecodingBackendVTables == NULL) { ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } MA_COPY_MEMORY(ppCustomDecodingBackendVTables, pConfig->ppCustomDecodingBackendVTables, sizeInBytes); pResourceManager->config.ppCustomDecodingBackendVTables = ppCustomDecodingBackendVTables; pResourceManager->config.customDecodingBackendCount = pConfig->customDecodingBackendCount; pResourceManager->config.pCustomDecodingBackendUserData = pConfig->pCustomDecodingBackendUserData; } /* Here is where we initialize our threading stuff. We don't do this if we don't support threading. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_uint32 iJobThread; /* Data buffer lock. */ result = ma_mutex_init(&pResourceManager->dataBufferBSTLock); if (result != MA_SUCCESS) { ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return result; } /* Create the job threads last to ensure the threads has access to valid data. */ for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) { result = ma_thread_create(&pResourceManager->jobThreads[iJobThread], ma_thread_priority_normal, pResourceManager->config.jobThreadStackSize, ma_resource_manager_job_thread, pResourceManager, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { ma_mutex_uninit(&pResourceManager->dataBufferBSTLock); ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return result; } } } #else { /* Threading is disabled at compile time. We should never get here because validation checks should have already been performed. */ MA_ASSERT(MA_FALSE); } #endif } return MA_SUCCESS; } static void ma_resource_manager_delete_all_data_buffer_nodes(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager); /* If everything was done properly, there shouldn't be any active data buffers. */ while (pResourceManager->pRootDataBufferNode != NULL) { ma_resource_manager_data_buffer_node* pDataBufferNode = pResourceManager->pRootDataBufferNode; ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); /* The data buffer has been removed from the BST, so now we need to free its data. */ ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); } } MA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager) { if (pResourceManager == NULL) { return; } /* Job threads need to be killed first. To do this we need to post a quit message to the message queue and then wait for the thread. The quit message will never be removed from the queue which means it will never not be returned after being encountered for the first time which means all threads will eventually receive it. */ ma_resource_manager_post_job_quit(pResourceManager); /* Wait for every job to finish before continuing to ensure nothing is sill trying to access any of our objects below. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_uint32 iJobThread; for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) { ma_thread_wait(&pResourceManager->jobThreads[iJobThread]); } } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } /* At this point the thread should have returned and no other thread should be accessing our data. We can now delete all data buffers. */ ma_resource_manager_delete_all_data_buffer_nodes(pResourceManager); /* The job queue is no longer needed. */ ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); /* We're no longer doing anything with data buffers so the lock can now be uninitialized. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_uninit(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } ma_free((ma_decoding_backend_vtable**)pResourceManager->config.ppCustomDecodingBackendVTables, &pResourceManager->config.allocationCallbacks); /* <-- Naughty const-cast, but this is safe. */ if (pResourceManager->config.pLog == &pResourceManager->log) { ma_log_uninit(&pResourceManager->log); } } MA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager) { if (pResourceManager == NULL) { return NULL; } return pResourceManager->config.pLog; } MA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void) { ma_resource_manager_data_source_config config; MA_ZERO_OBJECT(&config); config.rangeBegInPCMFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG; config.rangeEndInPCMFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END; config.loopPointBegInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG; config.loopPointEndInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END; config.isLooping = MA_FALSE; return config; } static ma_decoder_config ma_resource_manager__init_decoder_config(ma_resource_manager* pResourceManager) { ma_decoder_config config; config = ma_decoder_config_init(pResourceManager->config.decodedFormat, pResourceManager->config.decodedChannels, pResourceManager->config.decodedSampleRate); config.allocationCallbacks = pResourceManager->config.allocationCallbacks; config.ppCustomBackendVTables = pResourceManager->config.ppCustomDecodingBackendVTables; config.customBackendCount = pResourceManager->config.customDecodingBackendCount; config.pCustomBackendUserData = pResourceManager->config.pCustomDecodingBackendUserData; return config; } static ma_result ma_resource_manager__init_decoder(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); MA_ASSERT(pDecoder != NULL); config = ma_resource_manager__init_decoder_config(pResourceManager); if (pFilePath != NULL) { result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%s\". %s.\n", pFilePath, ma_result_description(result)); return result; } } else { result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pFilePathW, &config, pDecoder); if (result != MA_SUCCESS) { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%ls\". %s.\n", pFilePathW, ma_result_description(result)); #endif return result; } } return MA_SUCCESS; } static ma_bool32 ma_resource_manager_data_buffer_has_connector(ma_resource_manager_data_buffer* pDataBuffer) { return ma_atomic_bool32_get(&pDataBuffer->isConnectorInitialized); } static ma_data_source* ma_resource_manager_data_buffer_get_connector(ma_resource_manager_data_buffer* pDataBuffer) { if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { return NULL; /* Connector not yet initialized. */ } switch (pDataBuffer->pNode->data.type) { case ma_resource_manager_data_supply_type_encoded: return &pDataBuffer->connector.decoder; case ma_resource_manager_data_supply_type_decoded: return &pDataBuffer->connector.buffer; case ma_resource_manager_data_supply_type_decoded_paged: return &pDataBuffer->connector.pagedBuffer; case ma_resource_manager_data_supply_type_unknown: default: { ma_log_postf(ma_resource_manager_get_log(pDataBuffer->pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to retrieve data buffer connector. Unknown data supply type.\n"); return NULL; }; }; } static ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_manager_data_buffer* pDataBuffer, const ma_resource_manager_data_source_config* pConfig, ma_async_notification* pInitNotification, ma_fence* pInitFence) { ma_result result; MA_ASSERT(pDataBuffer != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE); /* The underlying data buffer must be initialized before we'll be able to know how to initialize the backend. */ result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode); if (result != MA_SUCCESS && result != MA_BUSY) { return result; /* The data buffer is in an erroneous state. */ } /* We need to initialize either a ma_decoder or an ma_audio_buffer depending on whether or not the backing data is encoded or decoded. These act as the "instance" to the data and are used to form the connection between underlying data buffer and the data source. If the data buffer is decoded, we can use an ma_audio_buffer. This enables us to use memory mapping when mixing which saves us a bit of data movement overhead. */ switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: /* Connector is a decoder. */ { ma_decoder_config config; config = ma_resource_manager__init_decoder_config(pDataBuffer->pResourceManager); result = ma_decoder_init_memory(pDataBuffer->pNode->data.backend.encoded.pData, pDataBuffer->pNode->data.backend.encoded.sizeInBytes, &config, &pDataBuffer->connector.decoder); } break; case ma_resource_manager_data_supply_type_decoded: /* Connector is an audio buffer. */ { ma_audio_buffer_config config; config = ma_audio_buffer_config_init(pDataBuffer->pNode->data.backend.decoded.format, pDataBuffer->pNode->data.backend.decoded.channels, pDataBuffer->pNode->data.backend.decoded.totalFrameCount, pDataBuffer->pNode->data.backend.decoded.pData, NULL); result = ma_audio_buffer_init(&config, &pDataBuffer->connector.buffer); } break; case ma_resource_manager_data_supply_type_decoded_paged: /* Connector is a paged audio buffer. */ { ma_paged_audio_buffer_config config; config = ma_paged_audio_buffer_config_init(&pDataBuffer->pNode->data.backend.decodedPaged.data); result = ma_paged_audio_buffer_init(&config, &pDataBuffer->connector.pagedBuffer); } break; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown data supply type. Should never happen. Need to post an error here. */ return MA_INVALID_ARGS; }; } /* Initialization of the connector is when we can fire the init notification. This will give the application access to the format/channels/rate of the data source. */ if (result == MA_SUCCESS) { /* The resource manager supports the ability to set the range and loop settings via a config at initialization time. This results in an case where the ranges could be set explicitly via ma_data_source_set_*() before we get to this point here. If this happens, we'll end up hitting a case where we just override those settings which results in what feels like a bug. To address this we only change the relevant properties if they're not equal to defaults. If they're equal to defaults there's no need to change them anyway. If they're *not* set to the default values, we can assume the user has set the range and loop settings via the config. If they're doing their own calls to ma_data_source_set_*() in addition to setting them via the config, that's entirely on the caller and any synchronization issue becomes their problem. */ if (pConfig->rangeBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_BEG || pConfig->rangeEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_END) { ma_data_source_set_range_in_pcm_frames(pDataBuffer, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); } if (pConfig->loopPointBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG || pConfig->loopPointEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END) { ma_data_source_set_loop_point_in_pcm_frames(pDataBuffer, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); } if (pConfig->isLooping != MA_FALSE) { ma_data_source_set_looping(pDataBuffer, pConfig->isLooping); } ma_atomic_bool32_set(&pDataBuffer->isConnectorInitialized, MA_TRUE); if (pInitNotification != NULL) { ma_async_notification_signal(pInitNotification); } if (pInitFence != NULL) { ma_fence_release(pInitFence); } } /* At this point the backend should be initialized. We do *not* want to set pDataSource->result here - that needs to be done at a higher level to ensure it's done as the last step. */ return result; } static ma_result ma_resource_manager_data_buffer_uninit_connector(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBuffer != NULL); (void)pResourceManager; switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: /* Connector is a decoder. */ { ma_decoder_uninit(&pDataBuffer->connector.decoder); } break; case ma_resource_manager_data_supply_type_decoded: /* Connector is an audio buffer. */ { ma_audio_buffer_uninit(&pDataBuffer->connector.buffer); } break; case ma_resource_manager_data_supply_type_decoded_paged: /* Connector is a paged audio buffer. */ { ma_paged_audio_buffer_uninit(&pDataBuffer->connector.pagedBuffer); } break; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown data supply type. Should never happen. Need to post an error here. */ return MA_INVALID_ARGS; }; } return MA_SUCCESS; } static ma_uint32 ma_resource_manager_data_buffer_node_next_execution_order(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); return ma_atomic_fetch_add_32(&pDataBufferNode->executionCounter, 1); } static ma_result ma_resource_manager_data_buffer_node_init_supply_encoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW) { ma_result result; size_t dataSizeInBytes; void* pData; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); result = ma_vfs_open_and_read_file_ex(pResourceManager->config.pVFS, pFilePath, pFilePathW, &pData, &dataSizeInBytes, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { if (pFilePath != NULL) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%s\". %s.\n", pFilePath, ma_result_description(result)); } else { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%ls\". %s.\n", pFilePathW, ma_result_description(result)); #endif } return result; } pDataBufferNode->data.backend.encoded.pData = pData; pDataBufferNode->data.backend.encoded.sizeInBytes = dataSizeInBytes; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_encoded); /* <-- Must be set last. */ return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_init_supply_decoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 flags, ma_decoder** ppDecoder) { ma_result result = MA_SUCCESS; ma_decoder* pDecoder; ma_uint64 totalFrameCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(ppDecoder != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); *ppDecoder = NULL; /* For safety. */ pDecoder = (ma_decoder*)ma_malloc(sizeof(*pDecoder), &pResourceManager->config.allocationCallbacks); if (pDecoder == NULL) { return MA_OUT_OF_MEMORY; } result = ma_resource_manager__init_decoder(pResourceManager, pFilePath, pFilePathW, pDecoder); if (result != MA_SUCCESS) { ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return result; } /* At this point we have the decoder and we now need to initialize the data supply. This will be either a decoded buffer, or a decoded paged buffer. A regular buffer is just one big heap allocated buffer, whereas a paged buffer is a linked list of paged-sized buffers. The latter is used when the length of a sound is unknown until a full decode has been performed. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) { result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount); if (result != MA_SUCCESS) { return result; } } else { totalFrameCount = 0; } if (totalFrameCount > 0) { /* It's a known length. The data supply is a regular decoded buffer. */ ma_uint64 dataSizeInBytes; void* pData; dataSizeInBytes = totalFrameCount * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels); if (dataSizeInBytes > MA_SIZE_MAX) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return MA_TOO_BIG; } pData = ma_malloc((size_t)dataSizeInBytes, &pResourceManager->config.allocationCallbacks); if (pData == NULL) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } /* The buffer needs to be initialized to silence in case the caller reads from it. */ ma_silence_pcm_frames(pData, totalFrameCount, pDecoder->outputFormat, pDecoder->outputChannels); /* Data has been allocated and the data supply can now be initialized. */ pDataBufferNode->data.backend.decoded.pData = pData; pDataBufferNode->data.backend.decoded.totalFrameCount = totalFrameCount; pDataBufferNode->data.backend.decoded.format = pDecoder->outputFormat; pDataBufferNode->data.backend.decoded.channels = pDecoder->outputChannels; pDataBufferNode->data.backend.decoded.sampleRate = pDecoder->outputSampleRate; pDataBufferNode->data.backend.decoded.decodedFrameCount = 0; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded); /* <-- Must be set last. */ } else { /* It's an unknown length. The data supply is a paged decoded buffer. Setting this up is actually easier than the non-paged decoded buffer because we just need to initialize a ma_paged_audio_buffer object. */ result = ma_paged_audio_buffer_data_init(pDecoder->outputFormat, pDecoder->outputChannels, &pDataBufferNode->data.backend.decodedPaged.data); if (result != MA_SUCCESS) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return result; } pDataBufferNode->data.backend.decodedPaged.sampleRate = pDecoder->outputSampleRate; pDataBufferNode->data.backend.decodedPaged.decodedFrameCount = 0; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded_paged); /* <-- Must be set last. */ } *ppDecoder = pDecoder; return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_decode_next_page(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_decoder* pDecoder) { ma_result result = MA_SUCCESS; ma_uint64 pageSizeInFrames; ma_uint64 framesToTryReading; ma_uint64 framesRead; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDecoder != NULL); /* We need to know the size of a page in frames to know how many frames to decode. */ pageSizeInFrames = MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDecoder->outputSampleRate/1000); framesToTryReading = pageSizeInFrames; /* Here is where we do the decoding of the next page. We'll run a slightly different path depending on whether or not we're using a flat or paged buffer because the allocation of the page differs between the two. For a flat buffer it's an offset to an already-allocated buffer. For a paged buffer, we need to allocate a new page and attach it to the linked list. */ switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode)) { case ma_resource_manager_data_supply_type_decoded: { /* The destination buffer is an offset to the existing buffer. Don't read more than we originally retrieved when we first initialized the decoder. */ void* pDst; ma_uint64 framesRemaining = pDataBufferNode->data.backend.decoded.totalFrameCount - pDataBufferNode->data.backend.decoded.decodedFrameCount; if (framesToTryReading > framesRemaining) { framesToTryReading = framesRemaining; } if (framesToTryReading > 0) { pDst = ma_offset_ptr( pDataBufferNode->data.backend.decoded.pData, pDataBufferNode->data.backend.decoded.decodedFrameCount * ma_get_bytes_per_frame(pDataBufferNode->data.backend.decoded.format, pDataBufferNode->data.backend.decoded.channels) ); MA_ASSERT(pDst != NULL); result = ma_decoder_read_pcm_frames(pDecoder, pDst, framesToTryReading, &framesRead); if (framesRead > 0) { pDataBufferNode->data.backend.decoded.decodedFrameCount += framesRead; } } else { framesRead = 0; } } break; case ma_resource_manager_data_supply_type_decoded_paged: { /* The destination buffer is a freshly allocated page. */ ma_paged_audio_buffer_page* pPage; result = ma_paged_audio_buffer_data_allocate_page(&pDataBufferNode->data.backend.decodedPaged.data, framesToTryReading, NULL, &pResourceManager->config.allocationCallbacks, &pPage); if (result != MA_SUCCESS) { return result; } result = ma_decoder_read_pcm_frames(pDecoder, pPage->pAudioData, framesToTryReading, &framesRead); if (result == MA_SUCCESS && framesRead > 0) { pPage->sizeInFrames = framesRead; result = ma_paged_audio_buffer_data_append_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage); if (result == MA_SUCCESS) { pDataBufferNode->data.backend.decodedPaged.decodedFrameCount += framesRead; } else { /* Failed to append the page. Just abort and set the status to MA_AT_END. */ ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks); result = MA_AT_END; } } else { /* No frames were read. Free the page and just set the status to MA_AT_END. */ ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks); result = MA_AT_END; } } break; case ma_resource_manager_data_supply_type_encoded: case ma_resource_manager_data_supply_type_unknown: default: { /* Unexpected data supply type. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Unexpected data supply type (%d) when decoding page.", ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode)); return MA_ERROR; }; } if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } static ma_result ma_resource_manager_data_buffer_node_acquire_critical_section(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_inline_notification* pInitNotification, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pDataBufferNode = NULL; ma_resource_manager_data_buffer_node* pInsertPoint; if (ppDataBufferNode != NULL) { *ppDataBufferNode = NULL; } result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, hashedName32, &pInsertPoint); if (result == MA_ALREADY_EXISTS) { /* The node already exists. We just need to increment the reference count. */ pDataBufferNode = pInsertPoint; result = ma_resource_manager_data_buffer_node_increment_ref(pResourceManager, pDataBufferNode, NULL); if (result != MA_SUCCESS) { return result; /* Should never happen. Failed to increment the reference count. */ } result = MA_ALREADY_EXISTS; goto done; } else { /* The node does not already exist. We need to post a LOAD_DATA_BUFFER_NODE job here. This needs to be done inside the critical section to ensure an uninitialization of the node does not occur before initialization on another thread. */ pDataBufferNode = (ma_resource_manager_data_buffer_node*)ma_malloc(sizeof(*pDataBufferNode), &pResourceManager->config.allocationCallbacks); if (pDataBufferNode == NULL) { return MA_OUT_OF_MEMORY; } MA_ZERO_OBJECT(pDataBufferNode); pDataBufferNode->hashedName32 = hashedName32; pDataBufferNode->refCount = 1; /* Always set to 1 by default (this is our first reference). */ if (pExistingData == NULL) { pDataBufferNode->data.type = ma_resource_manager_data_supply_type_unknown; /* <-- We won't know this until we start decoding. */ pDataBufferNode->result = MA_BUSY; /* Must be set to MA_BUSY before we leave the critical section, so might as well do it now. */ pDataBufferNode->isDataOwnedByResourceManager = MA_TRUE; } else { pDataBufferNode->data = *pExistingData; pDataBufferNode->result = MA_SUCCESS; /* Not loading asynchronously, so just set the status */ pDataBufferNode->isDataOwnedByResourceManager = MA_FALSE; } result = ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint); if (result != MA_SUCCESS) { ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return result; /* Should never happen. Failed to insert the data buffer into the BST. */ } /* Here is where we'll post the job, but only if we're loading asynchronously. If we're loading synchronously we'll defer loading to a later stage, outside of the critical section. */ if (pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) { /* Loading asynchronously. Post the job. */ ma_job job; char* pFilePathCopy = NULL; wchar_t* pFilePathWCopy = NULL; /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */ if (pFilePath != NULL) { pFilePathCopy = ma_copy_string(pFilePath, &pResourceManager->config.allocationCallbacks); } else { pFilePathWCopy = ma_copy_string_w(pFilePathW, &pResourceManager->config.allocationCallbacks); } if (pFilePathCopy == NULL && pFilePathWCopy == NULL) { ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_init(pResourceManager, pInitNotification); } /* Acquire init and done fences before posting the job. These will be unacquired by the job thread. */ if (pInitFence != NULL) { ma_fence_acquire(pInitFence); } if (pDoneFence != NULL) { ma_fence_acquire(pDoneFence); } /* We now have everything we need to post the job to the job thread. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE); job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); job.data.resourceManager.loadDataBufferNode.pResourceManager = pResourceManager; job.data.resourceManager.loadDataBufferNode.pDataBufferNode = pDataBufferNode; job.data.resourceManager.loadDataBufferNode.pFilePath = pFilePathCopy; job.data.resourceManager.loadDataBufferNode.pFilePathW = pFilePathWCopy; job.data.resourceManager.loadDataBufferNode.flags = flags; job.data.resourceManager.loadDataBufferNode.pInitNotification = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? pInitNotification : NULL; job.data.resourceManager.loadDataBufferNode.pDoneNotification = NULL; job.data.resourceManager.loadDataBufferNode.pInitFence = pInitFence; job.data.resourceManager.loadDataBufferNode.pDoneFence = pDoneFence; if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { result = ma_job_process(&job); } else { result = ma_resource_manager_post_job(pResourceManager, &job); } if (result != MA_SUCCESS) { /* Failed to post job. Probably ran out of memory. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE job. %s.\n", ma_result_description(result)); /* Fences were acquired before posting the job, but since the job was not able to be posted, we need to make sure we release them so nothing gets stuck waiting. */ if (pInitFence != NULL) { ma_fence_release(pInitFence); } if (pDoneFence != NULL) { ma_fence_release(pDoneFence); } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(pInitNotification); } else { /* These will have been freed by the job thread, but with WAIT_INIT they will already have happened since the job has already been handled. */ ma_free(pFilePathCopy, &pResourceManager->config.allocationCallbacks); ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks); } ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return result; } } } done: if (ppDataBufferNode != NULL) { *ppDataBufferNode = pDataBufferNode; } return result; } static ma_result ma_resource_manager_data_buffer_node_acquire(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_result result = MA_SUCCESS; ma_bool32 nodeAlreadyExists = MA_FALSE; ma_resource_manager_data_buffer_node* pDataBufferNode = NULL; ma_resource_manager_inline_notification initNotification; /* Used when the WAIT_INIT flag is set. */ if (ppDataBufferNode != NULL) { *ppDataBufferNode = NULL; /* Safety. */ } if (pResourceManager == NULL || (pFilePath == NULL && pFilePathW == NULL && hashedName32 == 0)) { return MA_INVALID_ARGS; } /* If we're specifying existing data, it must be valid. */ if (pExistingData != NULL && pExistingData->type == ma_resource_manager_data_supply_type_unknown) { return MA_INVALID_ARGS; } /* If we don't support threading, remove the ASYNC flag to make the rest of this a bit simpler. */ if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC; } if (hashedName32 == 0) { if (pFilePath != NULL) { hashedName32 = ma_hash_string_32(pFilePath); } else { hashedName32 = ma_hash_string_w_32(pFilePathW); } } /* Here is where we either increment the node's reference count or allocate a new one and add it to the BST. When allocating a new node, we need to make sure the LOAD_DATA_BUFFER_NODE job is posted inside the critical section just in case the caller immediately uninitializes the node as this will ensure the FREE_DATA_BUFFER_NODE job is given an execution order such that the node is not uninitialized before initialization. */ ma_resource_manager_data_buffer_bst_lock(pResourceManager); { result = ma_resource_manager_data_buffer_node_acquire_critical_section(pResourceManager, pFilePath, pFilePathW, hashedName32, flags, pExistingData, pInitFence, pDoneFence, &initNotification, &pDataBufferNode); } ma_resource_manager_data_buffer_bst_unlock(pResourceManager); if (result == MA_ALREADY_EXISTS) { nodeAlreadyExists = MA_TRUE; result = MA_SUCCESS; } else { if (result != MA_SUCCESS) { return result; } } /* If we're loading synchronously, we'll need to load everything now. When loading asynchronously, a job will have been posted inside the BST critical section so that an uninitialization can be allocated an appropriate execution order thereby preventing it from being uninitialized before the node is initialized by the decoding thread(s). */ if (nodeAlreadyExists == MA_FALSE) { /* Don't need to try loading anything if the node already exists. */ if (pFilePath == NULL && pFilePathW == NULL) { /* If this path is hit, it means a buffer is being copied (i.e. initialized from only the hashed name), but that node has been freed in the meantime, probably from some other thread. This is an invalid operation. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Cloning data buffer node failed because the source node was released. The source node must remain valid until the cloning has completed.\n"); result = MA_INVALID_OPERATION; goto done; } if (pDataBufferNode->isDataOwnedByResourceManager) { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0) { /* Loading synchronously. Load the sound in it's entirety here. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) == 0) { /* No decoding. This is the simple case - just store the file contents in memory. */ result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW); if (result != MA_SUCCESS) { goto done; } } else { /* Decoding. We do this the same way as we do when loading asynchronously. */ ma_decoder* pDecoder; result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW, flags, &pDecoder); if (result != MA_SUCCESS) { goto done; } /* We have the decoder, now decode page by page just like we do when loading asynchronously. */ for (;;) { /* Decode next page. */ result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, pDecoder); if (result != MA_SUCCESS) { break; /* Will return MA_AT_END when the last page has been decoded. */ } } /* Reaching the end needs to be considered successful. */ if (result == MA_AT_END) { result = MA_SUCCESS; } /* At this point the data buffer is either fully decoded or some error occurred. Either way, the decoder is no longer necessary. */ ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); } /* Getting here means we were successful. Make sure the status of the node is updated accordingly. */ ma_atomic_exchange_i32(&pDataBufferNode->result, result); } else { /* Loading asynchronously. We may need to wait for initialization. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_wait(&initNotification); } } } else { /* The data is not managed by the resource manager so there's nothing else to do. */ MA_ASSERT(pExistingData != NULL); } } done: /* If we failed to initialize the data buffer we need to free it. */ if (result != MA_SUCCESS) { if (nodeAlreadyExists == MA_FALSE) { ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); } } /* The init notification needs to be uninitialized. This will be used if the node does not already exist, and we've specified ASYNC | WAIT_INIT. */ if (nodeAlreadyExists == MA_FALSE && pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(&initNotification); } } if (ppDataBufferNode != NULL) { *ppDataBufferNode = pDataBufferNode; } return result; } static ma_result ma_resource_manager_data_buffer_node_unacquire(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pName, const wchar_t* pNameW) { ma_result result = MA_SUCCESS; ma_uint32 refCount = 0xFFFFFFFF; /* The new reference count of the node after decrementing. Initialize to non-0 to be safe we don't fall into the freeing path. */ ma_uint32 hashedName32 = 0; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } if (pDataBufferNode == NULL) { if (pName == NULL && pNameW == NULL) { return MA_INVALID_ARGS; } if (pName != NULL) { hashedName32 = ma_hash_string_32(pName); } else { hashedName32 = ma_hash_string_w_32(pNameW); } } /* The first thing to do is decrement the reference counter of the node. Then, if the reference count is zero, we need to free the node. If the node is still in the process of loading, we'll need to post a job to the job queue to free the node. Otherwise we'll just do it here. */ ma_resource_manager_data_buffer_bst_lock(pResourceManager); { /* Might need to find the node. Must be done inside the critical section. */ if (pDataBufferNode == NULL) { result = ma_resource_manager_data_buffer_node_search(pResourceManager, hashedName32, &pDataBufferNode); if (result != MA_SUCCESS) { goto stage2; /* Couldn't find the node. */ } } result = ma_resource_manager_data_buffer_node_decrement_ref(pResourceManager, pDataBufferNode, &refCount); if (result != MA_SUCCESS) { goto stage2; /* Should never happen. */ } if (refCount == 0) { result = ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); if (result != MA_SUCCESS) { goto stage2; /* An error occurred when trying to remove the data buffer. This should never happen. */ } } } ma_resource_manager_data_buffer_bst_unlock(pResourceManager); stage2: if (result != MA_SUCCESS) { return result; } /* Here is where we need to free the node. We don't want to do this inside the critical section above because we want to keep that as small as possible for multi-threaded efficiency. */ if (refCount == 0) { if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) { /* The sound is still loading. We need to delay the freeing of the node to a safe time. */ ma_job job; /* We need to mark the node as unavailable for the sake of the resource manager worker threads. */ ma_atomic_exchange_i32(&pDataBufferNode->result, MA_UNAVAILABLE); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE); job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); job.data.resourceManager.freeDataBufferNode.pResourceManager = pResourceManager; job.data.resourceManager.freeDataBufferNode.pDataBufferNode = pDataBufferNode; result = ma_resource_manager_post_job(pResourceManager, &job); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE job. %s.\n", ma_result_description(result)); return result; } /* If we don't support threading, process the job queue here. */ if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { while (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) { result = ma_resource_manager_process_next_job(pResourceManager); if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) { result = MA_SUCCESS; break; } } } else { /* Threading is enabled. The job queue will deal with the rest of the cleanup from here. */ } } else { /* The sound isn't loading so we can just free the node here. */ ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); } } return result; } static ma_uint32 ma_resource_manager_data_buffer_next_execution_order(ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pDataBuffer != NULL); return ma_atomic_fetch_add_32(&pDataBuffer->executionCounter, 1); } static ma_result ma_resource_manager_data_buffer_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_resource_manager_data_buffer_read_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_resource_manager_data_buffer_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_resource_manager_data_buffer_seek_to_pcm_frame((ma_resource_manager_data_buffer*)pDataSource, frameIndex); } static ma_result ma_resource_manager_data_buffer_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_resource_manager_data_buffer_get_data_format((ma_resource_manager_data_buffer*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pCursor); } static ma_result ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_resource_manager_data_buffer_get_length_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pLength); } static ma_result ma_resource_manager_data_buffer_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_resource_manager_data_buffer* pDataBuffer = (ma_resource_manager_data_buffer*)pDataSource; MA_ASSERT(pDataBuffer != NULL); ma_atomic_exchange_32(&pDataBuffer->isLooping, isLooping); /* The looping state needs to be set on the connector as well or else looping won't work when we read audio data. */ ma_data_source_set_looping(ma_resource_manager_data_buffer_get_connector(pDataBuffer), isLooping); return MA_SUCCESS; } static ma_data_source_vtable g_ma_resource_manager_data_buffer_vtable = { ma_resource_manager_data_buffer_cb__read_pcm_frames, ma_resource_manager_data_buffer_cb__seek_to_pcm_frame, ma_resource_manager_data_buffer_cb__get_data_format, ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames, ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames, ma_resource_manager_data_buffer_cb__set_looping, 0 }; static ma_result ma_resource_manager_data_buffer_init_ex_internal(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_uint32 hashedName32, ma_resource_manager_data_buffer* pDataBuffer) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pDataBufferNode; ma_data_source_config dataSourceConfig; ma_bool32 async; ma_uint32 flags; ma_resource_manager_pipeline_notifications notifications; if (pDataBuffer == NULL) { if (pConfig != NULL && pConfig->pNotifications != NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications); } return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataBuffer); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pNotifications != NULL) { notifications = *pConfig->pNotifications; /* From here on out we should be referencing `notifications` instead of `pNotifications`. Set this to NULL to catch errors at testing time. */ } else { MA_ZERO_OBJECT(¬ifications); } /* For safety, always remove the ASYNC flag if threading is disabled on the resource manager. */ flags = pConfig->flags; if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC; } if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } async = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0; /* Fences need to be acquired before doing anything. These must be acquired and released outside of the node to ensure there's no holes where ma_fence_wait() could prematurely return before the data buffer has completed initialization. When loading asynchronously, the node acquisition routine below will acquire the fences on this thread and then release them on the async thread when the operation is complete. These fences are always released at the "done" tag at the end of this function. They'll be acquired a second if loading asynchronously. This double acquisition system is just done to simplify code maintenance. */ ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); { /* We first need to acquire a node. If ASYNC is not set, this will not return until the entire sound has been loaded. */ result = ma_resource_manager_data_buffer_node_acquire(pResourceManager, pConfig->pFilePath, pConfig->pFilePathW, hashedName32, flags, NULL, notifications.init.pFence, notifications.done.pFence, &pDataBufferNode); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_resource_manager_data_buffer_vtable; result = ma_data_source_init(&dataSourceConfig, &pDataBuffer->ds); if (result != MA_SUCCESS) { ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL); ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } pDataBuffer->pResourceManager = pResourceManager; pDataBuffer->pNode = pDataBufferNode; pDataBuffer->flags = flags; pDataBuffer->result = MA_BUSY; /* Always default to MA_BUSY for safety. It'll be overwritten when loading completes or an error occurs. */ /* If we're loading asynchronously we need to post a job to the job queue to initialize the connector. */ if (async == MA_FALSE || ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_SUCCESS) { /* Loading synchronously or the data has already been fully loaded. We can just initialize the connector from here without a job. */ result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, pConfig, NULL, NULL); ma_atomic_exchange_i32(&pDataBuffer->result, result); ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } else { /* The node's data supply isn't initialized yet. The caller has requested that we load asynchronously so we need to post a job to do this. */ ma_job job; ma_resource_manager_inline_notification initNotification; /* Used when the WAIT_INIT flag is set. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_init(pResourceManager, &initNotification); } /* The status of the data buffer needs to be set to MA_BUSY before posting the job so that the worker thread is aware of its busy state. If the LOAD_DATA_BUFFER job sees a status other than MA_BUSY, it'll assume an error and fall through to an early exit. */ ma_atomic_exchange_i32(&pDataBuffer->result, MA_BUSY); /* Acquire fences a second time. These will be released by the async thread. */ ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER); job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer); job.data.resourceManager.loadDataBuffer.pDataBuffer = pDataBuffer; job.data.resourceManager.loadDataBuffer.pInitNotification = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? &initNotification : notifications.init.pNotification; job.data.resourceManager.loadDataBuffer.pDoneNotification = notifications.done.pNotification; job.data.resourceManager.loadDataBuffer.pInitFence = notifications.init.pFence; job.data.resourceManager.loadDataBuffer.pDoneFence = notifications.done.pFence; job.data.resourceManager.loadDataBuffer.rangeBegInPCMFrames = pConfig->rangeBegInPCMFrames; job.data.resourceManager.loadDataBuffer.rangeEndInPCMFrames = pConfig->rangeEndInPCMFrames; job.data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames = pConfig->loopPointBegInPCMFrames; job.data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames = pConfig->loopPointEndInPCMFrames; job.data.resourceManager.loadDataBuffer.isLooping = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0; /* If we need to wait for initialization to complete we can just process the job in place. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { result = ma_job_process(&job); } else { result = ma_resource_manager_post_job(pResourceManager, &job); } if (result != MA_SUCCESS) { /* We failed to post the job. Most likely there isn't enough room in the queue's buffer. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER job. %s.\n", ma_result_description(result)); ma_atomic_exchange_i32(&pDataBuffer->result, result); /* Release the fences after the result has been set on the data buffer. */ ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); } else { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_wait(&initNotification); if (notifications.init.pNotification != NULL) { ma_async_notification_signal(notifications.init.pNotification); } /* NOTE: Do not release the init fence here. It will have been done by the job. */ /* Make sure we return an error if initialization failed on the async thread. */ result = ma_resource_manager_data_buffer_result(pDataBuffer); if (result == MA_BUSY) { result = MA_SUCCESS; } } } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(&initNotification); } } if (result != MA_SUCCESS) { ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL); goto done; } } done: if (result == MA_SUCCESS) { if (pConfig->initialSeekPointInPCMFrames > 0) { ma_resource_manager_data_buffer_seek_to_pcm_frame(pDataBuffer, pConfig->initialSeekPointInPCMFrames); } } ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); return result; } MA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer) { return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, pConfig, 0, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; if (pExistingDataBuffer == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pExistingDataBuffer->pNode != NULL); /* <-- If you've triggered this, you've passed in an invalid existing data buffer. */ config = ma_resource_manager_data_source_config_init(); config.flags = pExistingDataBuffer->flags; return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, &config, pExistingDataBuffer->pNode->hashedName32, pDataBuffer); } static ma_result ma_resource_manager_data_buffer_uninit_internal(ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pDataBuffer != NULL); /* The connector should be uninitialized first. */ ma_resource_manager_data_buffer_uninit_connector(pDataBuffer->pResourceManager, pDataBuffer); /* With the connector uninitialized we can unacquire the node. */ ma_resource_manager_data_buffer_node_unacquire(pDataBuffer->pResourceManager, pDataBuffer->pNode, NULL, NULL); /* The base data source needs to be uninitialized as well. */ ma_data_source_uninit(&pDataBuffer->ds); return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer) { ma_result result; if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_result(pDataBuffer) == MA_SUCCESS) { /* The data buffer can be deleted synchronously. */ return ma_resource_manager_data_buffer_uninit_internal(pDataBuffer); } else { /* The data buffer needs to be deleted asynchronously because it's still loading. With the status set to MA_UNAVAILABLE, no more pages will be loaded and the uninitialization should happen fairly quickly. Since the caller owns the data buffer, we need to wait for this event to get processed before returning. */ ma_resource_manager_inline_notification notification; ma_job job; /* We need to mark the node as unavailable so we don't try reading from it anymore, but also to let the loading thread know that it needs to abort it's loading procedure. */ ma_atomic_exchange_i32(&pDataBuffer->result, MA_UNAVAILABLE); result = ma_resource_manager_inline_notification_init(pDataBuffer->pResourceManager, ¬ification); if (result != MA_SUCCESS) { return result; /* Failed to create the notification. This should rarely, if ever, happen. */ } job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER); job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer); job.data.resourceManager.freeDataBuffer.pDataBuffer = pDataBuffer; job.data.resourceManager.freeDataBuffer.pDoneNotification = ¬ification; job.data.resourceManager.freeDataBuffer.pDoneFence = NULL; result = ma_resource_manager_post_job(pDataBuffer->pResourceManager, &job); if (result != MA_SUCCESS) { ma_resource_manager_inline_notification_uninit(¬ification); return result; } ma_resource_manager_inline_notification_wait_and_uninit(¬ification); } return result; } MA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 framesRead = 0; ma_bool32 isDecodedBufferBusy = MA_FALSE; /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } /* We cannot be using the data buffer after it's been uninitialized. If you trigger this assert it means you're trying to read from the data buffer after it's been uninitialized or is in the process of uninitializing. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); /* If the node is not initialized we need to abort with a busy code. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { return MA_BUSY; /* Still loading. */ } /* If we've got a seek scheduled we'll want to do that before reading. However, for paged buffers, there's a chance that the sound hasn't yet been decoded up to the seek point will result in the seek failing. If this happens, we need to keep the seek scheduled and return MA_BUSY. */ if (pDataBuffer->seekToCursorOnNextRead) { pDataBuffer->seekToCursorOnNextRead = MA_FALSE; result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pDataBuffer->seekTargetInPCMFrames); if (result != MA_SUCCESS) { if (result == MA_BAD_SEEK && ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded_paged) { pDataBuffer->seekToCursorOnNextRead = MA_TRUE; /* Keep the seek scheduled. We just haven't loaded enough data yet to do the seek properly. */ return MA_BUSY; } return result; } } /* For decoded buffers (not paged) we need to check beforehand how many frames we have available. We cannot exceed this amount. We'll read as much as we can, and then return MA_BUSY. */ if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded) { ma_uint64 availableFrames; isDecodedBufferBusy = (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY); if (ma_resource_manager_data_buffer_get_available_frames(pDataBuffer, &availableFrames) == MA_SUCCESS) { /* Don't try reading more than the available frame count if the data buffer node is still loading. */ if (isDecodedBufferBusy) { if (frameCount > availableFrames) { frameCount = availableFrames; /* If there's no frames available we want to set the status to MA_AT_END. The logic below will check if the node is busy, and if so, change it to MA_BUSY. The reason we do this is because we don't want to call `ma_data_source_read_pcm_frames()` if the frame count is 0 because that'll result in a situation where it's possible MA_AT_END won't get returned. */ if (frameCount == 0) { result = MA_AT_END; } } else { isDecodedBufferBusy = MA_FALSE; /* We have enough frames available in the buffer to avoid a MA_BUSY status. */ } } else { /* Getting here means the buffer has been fully loaded. We can just pass the frame count straight into ma_data_source_read_pcm_frames() below and let ma_data_source handle it. */ } } } /* Don't attempt to read anything if we've got no frames available. */ if (frameCount > 0) { result = ma_data_source_read_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pFramesOut, frameCount, &framesRead); } /* If we returned MA_AT_END, but the node is still loading, we don't want to return that code or else the caller will interpret the sound as at the end and terminate decoding. */ if (result == MA_AT_END) { if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) { result = MA_BUSY; } } if (isDecodedBufferBusy) { result = MA_BUSY; } if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex) { ma_result result; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); /* If we haven't yet got a connector we need to abort. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { pDataBuffer->seekTargetInPCMFrames = frameIndex; pDataBuffer->seekToCursorOnNextRead = MA_TRUE; return MA_BUSY; /* Still loading. */ } result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), frameIndex); if (result != MA_SUCCESS) { return result; } pDataBuffer->seekTargetInPCMFrames = ~(ma_uint64)0; /* <-- For identification purposes. */ pDataBuffer->seekToCursorOnNextRead = MA_FALSE; return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_data_source_get_data_format(&pDataBuffer->connector.decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); }; case ma_resource_manager_data_supply_type_decoded: { *pFormat = pDataBuffer->pNode->data.backend.decoded.format; *pChannels = pDataBuffer->pNode->data.backend.decoded.channels; *pSampleRate = pDataBuffer->pNode->data.backend.decoded.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels); return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_decoded_paged: { *pFormat = pDataBuffer->pNode->data.backend.decodedPaged.data.format; *pChannels = pDataBuffer->pNode->data.backend.decodedPaged.data.channels; *pSampleRate = pDataBuffer->pNode->data.backend.decodedPaged.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels); return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_unknown: { return MA_BUSY; /* Still loading. */ }; default: { /* Unknown supply type. Should never hit this. */ return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); if (pDataBuffer == NULL || pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_decoder_get_cursor_in_pcm_frames(&pDataBuffer->connector.decoder, pCursor); }; case ma_resource_manager_data_supply_type_decoded: { return ma_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.buffer, pCursor); }; case ma_resource_manager_data_supply_type_decoded_paged: { return ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, pCursor); }; case ma_resource_manager_data_supply_type_unknown: { return MA_BUSY; }; default: { return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); if (pDataBuffer == NULL || pLength == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) { return MA_BUSY; /* Still loading. */ } return ma_data_source_get_length_in_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pLength); } MA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer) { if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBuffer->result); /* Need a naughty const-cast here. */ } MA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping) { return ma_data_source_set_looping(pDataBuffer, isLooping); } MA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer) { return ma_data_source_is_looping(pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) { if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) { return MA_BUSY; } else { return MA_INVALID_OPERATION; /* No connector. */ } } switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_decoder_get_available_frames(&pDataBuffer->connector.decoder, pAvailableFrames); }; case ma_resource_manager_data_supply_type_decoded: { return ma_audio_buffer_get_available_frames(&pDataBuffer->connector.buffer, pAvailableFrames); }; case ma_resource_manager_data_supply_type_decoded_paged: { ma_uint64 cursor; ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, &cursor); if (pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount > cursor) { *pAvailableFrames = pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount - cursor; } else { *pAvailableFrames = 0; } return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown supply type. Should never hit this. */ return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pFilePath, NULL, 0, flags, NULL, NULL, NULL, NULL); } MA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, NULL, pFilePath, 0, flags, NULL, NULL, NULL, NULL); } static ma_result ma_resource_manager_register_data(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, ma_resource_manager_data_supply* pExistingData) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pName, pNameW, 0, 0, pExistingData, NULL, NULL, NULL); } static ma_result ma_resource_manager_register_decoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_resource_manager_data_supply data; data.type = ma_resource_manager_data_supply_type_decoded; data.backend.decoded.pData = pData; data.backend.decoded.totalFrameCount = frameCount; data.backend.decoded.format = format; data.backend.decoded.channels = channels; data.backend.decoded.sampleRate = sampleRate; return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data); } MA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { return ma_resource_manager_register_decoded_data_internal(pResourceManager, pName, NULL, pData, frameCount, format, channels, sampleRate); } MA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { return ma_resource_manager_register_decoded_data_internal(pResourceManager, NULL, pName, pData, frameCount, format, channels, sampleRate); } static ma_result ma_resource_manager_register_encoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, size_t sizeInBytes) { ma_resource_manager_data_supply data; data.type = ma_resource_manager_data_supply_type_encoded; data.backend.encoded.pData = pData; data.backend.encoded.sizeInBytes = sizeInBytes; return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data); } MA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes) { return ma_resource_manager_register_encoded_data_internal(pResourceManager, pName, NULL, pData, sizeInBytes); } MA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes) { return ma_resource_manager_register_encoded_data_internal(pResourceManager, NULL, pName, pData, sizeInBytes); } MA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath) { return ma_resource_manager_unregister_data(pResourceManager, pFilePath); } MA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath) { return ma_resource_manager_unregister_data_w(pResourceManager, pFilePath); } MA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName) { return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, pName, NULL); } MA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName) { return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, NULL, pName); } static ma_uint32 ma_resource_manager_data_stream_next_execution_order(ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_fetch_add_32(&pDataStream->executionCounter, 1); } static ma_bool32 ma_resource_manager_data_stream_is_decoder_at_end(const ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_load_32((ma_bool32*)&pDataStream->isDecoderAtEnd); } static ma_uint32 ma_resource_manager_data_stream_seek_counter(const ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_load_32((ma_uint32*)&pDataStream->seekCounter); } static ma_result ma_resource_manager_data_stream_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_resource_manager_data_stream_read_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_resource_manager_data_stream_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_resource_manager_data_stream_seek_to_pcm_frame((ma_resource_manager_data_stream*)pDataSource, frameIndex); } static ma_result ma_resource_manager_data_stream_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_resource_manager_data_stream_get_data_format((ma_resource_manager_data_stream*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_resource_manager_data_stream_get_cursor_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pCursor); } static ma_result ma_resource_manager_data_stream_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_resource_manager_data_stream_get_length_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pLength); } static ma_result ma_resource_manager_data_stream_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_resource_manager_data_stream* pDataStream = (ma_resource_manager_data_stream*)pDataSource; MA_ASSERT(pDataStream != NULL); ma_atomic_exchange_32(&pDataStream->isLooping, isLooping); return MA_SUCCESS; } static ma_data_source_vtable g_ma_resource_manager_data_stream_vtable = { ma_resource_manager_data_stream_cb__read_pcm_frames, ma_resource_manager_data_stream_cb__seek_to_pcm_frame, ma_resource_manager_data_stream_cb__get_data_format, ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames, ma_resource_manager_data_stream_cb__get_length_in_pcm_frames, ma_resource_manager_data_stream_cb__set_looping, 0 /*MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT*/ }; static void ma_resource_manager_data_stream_set_absolute_cursor(ma_resource_manager_data_stream* pDataStream, ma_uint64 absoluteCursor) { /* Loop if possible. */ if (absoluteCursor > pDataStream->totalLengthInPCMFrames && pDataStream->totalLengthInPCMFrames > 0) { absoluteCursor = absoluteCursor % pDataStream->totalLengthInPCMFrames; } ma_atomic_exchange_64(&pDataStream->absoluteCursor, absoluteCursor); } MA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream) { ma_result result; ma_data_source_config dataSourceConfig; char* pFilePathCopy = NULL; wchar_t* pFilePathWCopy = NULL; ma_job job; ma_bool32 waitBeforeReturning = MA_FALSE; ma_resource_manager_inline_notification waitNotification; ma_resource_manager_pipeline_notifications notifications; ma_uint32 flags; if (pDataStream == NULL) { if (pConfig != NULL && pConfig->pNotifications != NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications); } return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataStream); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pNotifications != NULL) { notifications = *pConfig->pNotifications; /* From here on out, `notifications` should be used instead of `pNotifications`. Setting this to NULL to catch any errors at testing time. */ } else { MA_ZERO_OBJECT(¬ifications); } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_resource_manager_data_stream_vtable; result = ma_data_source_init(&dataSourceConfig, &pDataStream->ds); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return result; } flags = pConfig->flags; if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } pDataStream->pResourceManager = pResourceManager; pDataStream->flags = pConfig->flags; pDataStream->result = MA_BUSY; ma_data_source_set_range_in_pcm_frames(pDataStream, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); ma_data_source_set_loop_point_in_pcm_frames(pDataStream, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); ma_data_source_set_looping(pDataStream, (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0); if (pResourceManager == NULL || (pConfig->pFilePath == NULL && pConfig->pFilePathW == NULL)) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return MA_INVALID_ARGS; } /* We want all access to the VFS and the internal decoder to happen on the job thread just to keep things easier to manage for the VFS. */ /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */ if (pConfig->pFilePath != NULL) { pFilePathCopy = ma_copy_string(pConfig->pFilePath, &pResourceManager->config.allocationCallbacks); } else { pFilePathWCopy = ma_copy_string_w(pConfig->pFilePathW, &pResourceManager->config.allocationCallbacks); } if (pFilePathCopy == NULL && pFilePathWCopy == NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return MA_OUT_OF_MEMORY; } /* We need to check for the presence of MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC. If it's not set, we need to wait before returning. Otherwise we can return immediately. Likewise, we'll also check for MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT and do the same. */ if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0 || (pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { waitBeforeReturning = MA_TRUE; ma_resource_manager_inline_notification_init(pResourceManager, &waitNotification); } ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); /* Set the absolute cursor to our initial seek position so retrieval of the cursor returns a good value. */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, pConfig->initialSeekPointInPCMFrames); /* We now have everything we need to post the job. This is the last thing we need to do from here. The rest will be done by the job thread. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.loadDataStream.pDataStream = pDataStream; job.data.resourceManager.loadDataStream.pFilePath = pFilePathCopy; job.data.resourceManager.loadDataStream.pFilePathW = pFilePathWCopy; job.data.resourceManager.loadDataStream.initialSeekPoint = pConfig->initialSeekPointInPCMFrames; job.data.resourceManager.loadDataStream.pInitNotification = (waitBeforeReturning == MA_TRUE) ? &waitNotification : notifications.init.pNotification; job.data.resourceManager.loadDataStream.pInitFence = notifications.init.pFence; result = ma_resource_manager_post_job(pResourceManager, &job); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); if (waitBeforeReturning) { ma_resource_manager_inline_notification_uninit(&waitNotification); } ma_free(pFilePathCopy, &pResourceManager->config.allocationCallbacks); ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks); return result; } /* Wait if needed. */ if (waitBeforeReturning) { ma_resource_manager_inline_notification_wait_and_uninit(&waitNotification); if (notifications.init.pNotification != NULL) { ma_async_notification_signal(notifications.init.pNotification); } /* If there was an error during initialization make sure we return that result here. We don't want to do this if we're not waiting because it will most likely be in a busy state. */ if (pDataStream->result != MA_SUCCESS) { return pDataStream->result; } /* NOTE: Do not release pInitFence here. That will be done by the job. */ } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream); } MA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream); } MA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_inline_notification freeEvent; ma_job job; if (pDataStream == NULL) { return MA_INVALID_ARGS; } /* The first thing to do is set the result to unavailable. This will prevent future page decoding. */ ma_atomic_exchange_i32(&pDataStream->result, MA_UNAVAILABLE); /* We need to post a job to ensure we're not in the middle or decoding or anything. Because the object is owned by the caller, we'll need to wait for it to complete before returning which means we need an event. */ ma_resource_manager_inline_notification_init(pDataStream->pResourceManager, &freeEvent); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.freeDataStream.pDataStream = pDataStream; job.data.resourceManager.freeDataStream.pDoneNotification = &freeEvent; job.data.resourceManager.freeDataStream.pDoneFence = NULL; ma_resource_manager_post_job(pDataStream->pResourceManager, &job); /* We need to wait for the job to finish processing before we return. */ ma_resource_manager_inline_notification_wait_and_uninit(&freeEvent); return MA_SUCCESS; } static ma_uint32 ma_resource_manager_data_stream_get_page_size_in_frames(ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE); return MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDataStream->decoder.outputSampleRate/1000); } static void* ma_resource_manager_data_stream_get_page_data_pointer(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex, ma_uint32 relativeCursor) { MA_ASSERT(pDataStream != NULL); MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE); MA_ASSERT(pageIndex == 0 || pageIndex == 1); return ma_offset_ptr(pDataStream->pPageData, ((ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * pageIndex) + relativeCursor) * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels)); } static void ma_resource_manager_data_stream_fill_page(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex) { ma_result result = MA_SUCCESS; ma_uint64 pageSizeInFrames; ma_uint64 totalFramesReadForThisPage = 0; void* pPageData = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pageIndex, 0); pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream); /* The decoder needs to inherit the stream's looping and range state. */ { ma_uint64 rangeBeg; ma_uint64 rangeEnd; ma_uint64 loopPointBeg; ma_uint64 loopPointEnd; ma_data_source_set_looping(&pDataStream->decoder, ma_resource_manager_data_stream_is_looping(pDataStream)); ma_data_source_get_range_in_pcm_frames(pDataStream, &rangeBeg, &rangeEnd); ma_data_source_set_range_in_pcm_frames(&pDataStream->decoder, rangeBeg, rangeEnd); ma_data_source_get_loop_point_in_pcm_frames(pDataStream, &loopPointBeg, &loopPointEnd); ma_data_source_set_loop_point_in_pcm_frames(&pDataStream->decoder, loopPointBeg, loopPointEnd); } /* Just read straight from the decoder. It will deal with ranges and looping for us. */ result = ma_data_source_read_pcm_frames(&pDataStream->decoder, pPageData, pageSizeInFrames, &totalFramesReadForThisPage); if (result == MA_AT_END || totalFramesReadForThisPage < pageSizeInFrames) { ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_TRUE); } ma_atomic_exchange_32(&pDataStream->pageFrameCount[pageIndex], (ma_uint32)totalFramesReadForThisPage); ma_atomic_exchange_32(&pDataStream->isPageValid[pageIndex], MA_TRUE); } static void ma_resource_manager_data_stream_fill_pages(ma_resource_manager_data_stream* pDataStream) { ma_uint32 iPage; MA_ASSERT(pDataStream != NULL); for (iPage = 0; iPage < 2; iPage += 1) { ma_resource_manager_data_stream_fill_page(pDataStream, iPage); } } static ma_result ma_resource_manager_data_stream_map(ma_resource_manager_data_stream* pDataStream, void** ppFramesOut, ma_uint64* pFrameCount) { ma_uint64 framesAvailable; ma_uint64 frameCount = 0; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pFrameCount != NULL) { frameCount = *pFrameCount; *pFrameCount = 0; } if (ppFramesOut != NULL) { *ppFramesOut = NULL; } if (pDataStream == NULL || ppFramesOut == NULL || pFrameCount == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */ if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) { return MA_BUSY; } /* If the page we're on is invalid it means we've caught up to the job thread. */ if (ma_atomic_load_32(&pDataStream->isPageValid[pDataStream->currentPageIndex]) == MA_FALSE) { framesAvailable = 0; } else { /* The page we're on is valid so we must have some frames available. We need to make sure that we don't overflow into the next page, even if it's valid. The reason is that the unmap process will only post an update for one page at a time. Keeping mapping tied to page boundaries makes this simpler. */ ma_uint32 currentPageFrameCount = ma_atomic_load_32(&pDataStream->pageFrameCount[pDataStream->currentPageIndex]); MA_ASSERT(currentPageFrameCount >= pDataStream->relativeCursor); framesAvailable = currentPageFrameCount - pDataStream->relativeCursor; } /* If there's no frames available and the result is set to MA_AT_END we need to return MA_AT_END. */ if (framesAvailable == 0) { if (ma_resource_manager_data_stream_is_decoder_at_end(pDataStream)) { return MA_AT_END; } else { return MA_BUSY; /* There are no frames available, but we're not marked as EOF so we might have caught up to the job thread. Need to return MA_BUSY and wait for more data. */ } } MA_ASSERT(framesAvailable > 0); if (frameCount > framesAvailable) { frameCount = framesAvailable; } *ppFramesOut = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pDataStream->currentPageIndex, pDataStream->relativeCursor); *pFrameCount = frameCount; return MA_SUCCESS; } static ma_result ma_resource_manager_data_stream_unmap(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameCount) { ma_uint32 newRelativeCursor; ma_uint32 pageSizeInFrames; ma_job job; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* The frame count should always fit inside a 32-bit integer. */ if (frameCount > 0xFFFFFFFF) { return MA_INVALID_ARGS; } pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream); /* The absolute cursor needs to be updated for ma_resource_manager_data_stream_get_cursor_in_pcm_frames(). */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, ma_atomic_load_64(&pDataStream->absoluteCursor) + frameCount); /* Here is where we need to check if we need to load a new page, and if so, post a job to load it. */ newRelativeCursor = pDataStream->relativeCursor + (ma_uint32)frameCount; /* If the new cursor has flowed over to the next page we need to mark the old one as invalid and post an event for it. */ if (newRelativeCursor >= pageSizeInFrames) { newRelativeCursor -= pageSizeInFrames; /* Here is where we post the job start decoding. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.pageDataStream.pDataStream = pDataStream; job.data.resourceManager.pageDataStream.pageIndex = pDataStream->currentPageIndex; /* The page needs to be marked as invalid so that the public API doesn't try reading from it. */ ma_atomic_exchange_32(&pDataStream->isPageValid[pDataStream->currentPageIndex], MA_FALSE); /* Before posting the job we need to make sure we set some state. */ pDataStream->relativeCursor = newRelativeCursor; pDataStream->currentPageIndex = (pDataStream->currentPageIndex + 1) & 0x01; return ma_resource_manager_post_job(pDataStream->pResourceManager, &job); } else { /* We haven't moved into a new page so we can just move the cursor forward. */ pDataStream->relativeCursor = newRelativeCursor; return MA_SUCCESS; } } MA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesProcessed; ma_format format; ma_uint32 channels; /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */ if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) { return MA_BUSY; } ma_resource_manager_data_stream_get_data_format(pDataStream, &format, &channels, NULL, NULL, 0); /* Reading is implemented in terms of map/unmap. We need to run this in a loop because mapping is clamped against page boundaries. */ totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { void* pMappedFrames; ma_uint64 mappedFrameCount; mappedFrameCount = frameCount - totalFramesProcessed; result = ma_resource_manager_data_stream_map(pDataStream, &pMappedFrames, &mappedFrameCount); if (result != MA_SUCCESS) { break; } /* Copy the mapped data to the output buffer if we have one. It's allowed for pFramesOut to be NULL in which case a relative forward seek is performed. */ if (pFramesOut != NULL) { ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, format, channels), pMappedFrames, mappedFrameCount, format, channels); } totalFramesProcessed += mappedFrameCount; result = ma_resource_manager_data_stream_unmap(pDataStream, mappedFrameCount); if (result != MA_SUCCESS) { break; /* This is really bad - will only get an error here if we failed to post a job to the queue for loading the next page. */ } } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } if (result == MA_SUCCESS && totalFramesProcessed == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex) { ma_job job; ma_result streamResult; streamResult = ma_resource_manager_data_stream_result(pDataStream); /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(streamResult != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (streamResult != MA_SUCCESS && streamResult != MA_BUSY) { return MA_INVALID_OPERATION; } /* If we're not already seeking and we're sitting on the same frame, just make this a no-op. */ if (ma_atomic_load_32(&pDataStream->seekCounter) == 0) { if (ma_atomic_load_64(&pDataStream->absoluteCursor) == frameIndex) { return MA_SUCCESS; } } /* Increment the seek counter first to indicate to read_paged_pcm_frames() and map_paged_pcm_frames() that we are in the middle of a seek and MA_BUSY should be returned. */ ma_atomic_fetch_add_32(&pDataStream->seekCounter, 1); /* Update the absolute cursor so that ma_resource_manager_data_stream_get_cursor_in_pcm_frames() returns the new position. */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, frameIndex); /* We need to clear our currently loaded pages so that the stream starts playback from the new seek point as soon as possible. These are for the purpose of the public API and will be ignored by the seek job. The seek job will operate on the assumption that both pages have been marked as invalid and the cursor is at the start of the first page. */ pDataStream->relativeCursor = 0; pDataStream->currentPageIndex = 0; ma_atomic_exchange_32(&pDataStream->isPageValid[0], MA_FALSE); ma_atomic_exchange_32(&pDataStream->isPageValid[1], MA_FALSE); /* Make sure the data stream is not marked as at the end or else if we seek in response to hitting the end, we won't be able to read any more data. */ ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_FALSE); /* The public API is not allowed to touch the internal decoder so we need to use a job to perform the seek. When seeking, the job thread will assume both pages are invalid and any content contained within them will be discarded and replaced with newly decoded data. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.seekDataStream.pDataStream = pDataStream; job.data.resourceManager.seekDataStream.frameIndex = frameIndex; return ma_resource_manager_post_job(pDataStream->pResourceManager, &job); } MA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* We're being a little bit naughty here and accessing the internal decoder from the public API. The output data format is constant, and we've defined this function such that the application is responsible for ensuring it's not called while uninitializing so it should be safe. */ return ma_data_source_get_data_format(&pDataStream->decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } MA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor) { ma_result result; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } /* If the stream is in an erroneous state we need to return an invalid operation. We can allow this to be called when the data stream is in a busy state because the caller may have asked for an initial seek position and it's convenient to return that as the cursor position. */ result = ma_resource_manager_data_stream_result(pDataStream); if (result != MA_SUCCESS && result != MA_BUSY) { return MA_INVALID_OPERATION; } *pCursor = ma_atomic_load_64(&pDataStream->absoluteCursor); return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength) { ma_result streamResult; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; streamResult = ma_resource_manager_data_stream_result(pDataStream); /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(streamResult != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (streamResult != MA_SUCCESS) { return streamResult; } /* We most definitely do not want to be calling ma_decoder_get_length_in_pcm_frames() directly. Instead we want to use a cached value that we calculated when we initialized it on the job thread. */ *pLength = pDataStream->totalLengthInPCMFrames; if (*pLength == 0) { return MA_NOT_IMPLEMENTED; /* Some decoders may not have a known length. */ } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream) { if (pDataStream == NULL) { return MA_INVALID_ARGS; } return (ma_result)ma_atomic_load_i32(&pDataStream->result); } MA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping) { return ma_data_source_set_looping(pDataStream, isLooping); } MA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream) { if (pDataStream == NULL) { return MA_FALSE; } return ma_atomic_load_32((ma_bool32*)&pDataStream->isLooping); /* Naughty const-cast. Value won't change from here in practice (maybe from another thread). */ } MA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames) { ma_uint32 pageIndex0; ma_uint32 pageIndex1; ma_uint32 relativeCursor; ma_uint64 availableFrames; if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataStream == NULL) { return MA_INVALID_ARGS; } pageIndex0 = pDataStream->currentPageIndex; pageIndex1 = (pDataStream->currentPageIndex + 1) & 0x01; relativeCursor = pDataStream->relativeCursor; availableFrames = 0; if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex0])) { availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex0]) - relativeCursor; if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex1])) { availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex1]); } } *pAvailableFrames = availableFrames; return MA_SUCCESS; } static ma_result ma_resource_manager_data_source_preinit(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSource); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pResourceManager == NULL) { return MA_INVALID_ARGS; } pDataSource->flags = pConfig->flags; if (pConfig->isLooping) { pDataSource->flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource) { ma_result result; result = ma_resource_manager_data_source_preinit(pResourceManager, pConfig, pDataSource); if (result != MA_SUCCESS) { return result; } /* The data source itself is just a data stream or a data buffer. */ if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_init_ex(pResourceManager, pConfig, &pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_init_ex(pResourceManager, pConfig, &pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pName; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource); } MA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pName; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource); } MA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource) { ma_result result; ma_resource_manager_data_source_config config; if (pExistingDataSource == NULL) { return MA_INVALID_ARGS; } config = ma_resource_manager_data_source_config_init(); config.flags = pExistingDataSource->flags; result = ma_resource_manager_data_source_preinit(pResourceManager, &config, pDataSource); if (result != MA_SUCCESS) { return result; } /* Copying can only be done from data buffers. Streams cannot be copied. */ if ((pExistingDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return MA_INVALID_OPERATION; } return ma_resource_manager_data_buffer_init_copy(pResourceManager, &pExistingDataSource->backend.buffer, &pDataSource->backend.buffer); } MA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } /* All we need to is uninitialize the underlying data buffer or data stream. */ if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_uninit(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_uninit(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_read_pcm_frames(&pDataSource->backend.stream, pFramesOut, frameCount, pFramesRead); } else { return ma_resource_manager_data_buffer_read_pcm_frames(&pDataSource->backend.buffer, pFramesOut, frameCount, pFramesRead); } } MA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_seek_to_pcm_frame(&pDataSource->backend.stream, frameIndex); } else { return ma_resource_manager_data_buffer_seek_to_pcm_frame(&pDataSource->backend.buffer, frameIndex); } } MA_API ma_result ma_resource_manager_data_source_map(ma_resource_manager_data_source* pDataSource, void** ppFramesOut, ma_uint64* pFrameCount) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_map(&pDataSource->backend.stream, ppFramesOut, pFrameCount); } else { return MA_NOT_IMPLEMENTED; /* Mapping not supported with data buffers. */ } } MA_API ma_result ma_resource_manager_data_source_unmap(ma_resource_manager_data_source* pDataSource, ma_uint64 frameCount) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_unmap(&pDataSource->backend.stream, frameCount); } else { return MA_NOT_IMPLEMENTED; /* Mapping not supported with data buffers. */ } } MA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_data_format(&pDataSource->backend.stream, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } else { return ma_resource_manager_data_buffer_get_data_format(&pDataSource->backend.buffer, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } } MA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_cursor_in_pcm_frames(&pDataSource->backend.stream, pCursor); } else { return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(&pDataSource->backend.buffer, pCursor); } } MA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_length_in_pcm_frames(&pDataSource->backend.stream, pLength); } else { return ma_resource_manager_data_buffer_get_length_in_pcm_frames(&pDataSource->backend.buffer, pLength); } } MA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_result(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_result(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_set_looping(&pDataSource->backend.stream, isLooping); } else { return ma_resource_manager_data_buffer_set_looping(&pDataSource->backend.buffer, isLooping); } } MA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_FALSE; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_is_looping(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_is_looping(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_available_frames(&pDataSource->backend.stream, pAvailableFrames); } else { return ma_resource_manager_data_buffer_get_available_frames(&pDataSource->backend.buffer, pAvailableFrames); } } MA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob) { if (pResourceManager == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_post(&pResourceManager->jobQueue, pJob); } MA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager) { ma_job job = ma_job_init(MA_JOB_TYPE_QUIT); return ma_resource_manager_post_job(pResourceManager, &job); } MA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob) { if (pResourceManager == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_next(&pResourceManager->jobQueue, pJob); } static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.loadDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.loadDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->isDataOwnedByResourceManager == MA_TRUE); /* The data should always be owned by the resource manager. */ /* The data buffer is not getting deleted, but we may be getting executed out of order. If so, we need to push the job back onto the queue and return. */ if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */ } /* First thing we need to do is check whether or not the data buffer is getting deleted. If so we just abort. */ if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) != MA_BUSY) { result = ma_resource_manager_data_buffer_node_result(pDataBufferNode); /* The data buffer may be getting deleted before it's even been loaded. */ goto done; } /* We're ready to start loading. Essentially what we're doing here is initializing the data supply of the node. Once this is complete, data buffers can have their connectors initialized which will allow then to have audio data read from them. Note that when the data supply type has been moved away from "unknown", that is when other threads will determine that the node is available for data delivery and the data buffer connectors can be initialized. Therefore, it's important that it is set after the data supply has been initialized. */ if ((pJob->data.resourceManager.loadDataBufferNode.flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) != 0) { /* Decoding. This is the complex case because we're not going to be doing the entire decoding process here. Instead it's going to be split of multiple jobs and loaded in pages. The reason for this is to evenly distribute decoding time across multiple sounds, rather than having one huge sound hog all the available processing resources. The first thing we do is initialize a decoder. This is allocated on the heap and is passed around to the paging jobs. When the last paging job has completed it's processing, it'll free the decoder for us. This job does not do any actual decoding. It instead just posts a PAGE_DATA_BUFFER_NODE job which is where the actual decoding work will be done. However, once this job is complete, the node will be in a state where data buffer connectors can be initialized. */ ma_decoder* pDecoder; /* <-- Free'd on the last page decode. */ ma_job pageDataBufferNodeJob; /* Allocate the decoder by initializing a decoded data supply. */ result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW, pJob->data.resourceManager.loadDataBufferNode.flags, &pDecoder); /* Don't ever propagate an MA_BUSY result code or else the resource manager will think the node is just busy decoding rather than in an error state. This should never happen, but including this logic for safety just in case. */ if (result == MA_BUSY) { result = MA_ERROR; } if (result != MA_SUCCESS) { if (pJob->data.resourceManager.loadDataBufferNode.pFilePath != NULL) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to initialize data supply for \"%s\". %s.\n", pJob->data.resourceManager.loadDataBufferNode.pFilePath, ma_result_description(result)); } else { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to initialize data supply for \"%ls\", %s.\n", pJob->data.resourceManager.loadDataBufferNode.pFilePathW, ma_result_description(result)); #endif } goto done; } /* At this point the node's data supply is initialized and other threads can start initializing their data buffer connectors. However, no data will actually be available until we start to actually decode it. To do this, we need to post a paging job which is where the decoding work is done. Note that if an error occurred at an earlier point, this section will have been skipped. */ pageDataBufferNodeJob = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE); pageDataBufferNodeJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pResourceManager = pResourceManager; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDataBufferNode = pDataBufferNode; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDecoder = pDecoder; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneNotification = pJob->data.resourceManager.loadDataBufferNode.pDoneNotification; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneFence = pJob->data.resourceManager.loadDataBufferNode.pDoneFence; /* The job has been set up so it can now be posted. */ result = ma_resource_manager_post_job(pResourceManager, &pageDataBufferNodeJob); /* When we get here, we want to make sure the result code is set to MA_BUSY. The reason for this is that the result will be copied over to the node's internal result variable. In this case, since the decoding is still in-progress, we need to make sure the result code is set to MA_BUSY. */ if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE job. %s\n", ma_result_description(result)); ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); } else { result = MA_BUSY; } } else { /* No decoding. This is the simple case. We need only read the file content into memory and we're done. */ result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW); } done: /* File paths are no longer needed. */ ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePath, &pResourceManager->config.allocationCallbacks); ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePathW, &pResourceManager->config.allocationCallbacks); /* We need to set the result to at the very end to ensure no other threads try reading the data before we've fully initialized the object. Other threads are going to be inspecting this variable to determine whether or not they're ready to read data. We can only change the result if it's set to MA_BUSY because otherwise we may be changing away from an error code which would be bad. An example is if the application creates a data buffer, but then immediately deletes it before we've got to this point. In this case, pDataBuffer->result will be MA_UNAVAILABLE, and setting it to MA_SUCCESS or any other error code would cause the buffer to look like it's in a state that it's not. */ ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result); /* At this point initialization is complete and we can signal the notification if any. */ if (pJob->data.resourceManager.loadDataBufferNode.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pInitNotification); } if (pJob->data.resourceManager.loadDataBufferNode.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pInitFence); } /* If we have a success result it means we've fully loaded the buffer. This will happen in the non-decoding case. */ if (result != MA_BUSY) { if (pJob->data.resourceManager.loadDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.loadDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pDoneFence); } } /* Increment the node's execution pointer so that the next jobs can be processed. This is how we keep decoding of pages in-order. */ ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); /* A busy result should be considered successful from the point of view of the job system. */ if (result == MA_BUSY) { result = MA_SUCCESS; } return result; } static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.freeDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.freeDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.freeDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataBufferNode.pDoneFence); } ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.pageDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.pageDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* Don't do any more decoding if the data buffer has started the uninitialization process. */ result = ma_resource_manager_data_buffer_node_result(pDataBufferNode); if (result != MA_BUSY) { goto done; } /* We're ready to decode the next page. */ result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, (ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder); /* If we have a success code by this point, we want to post another job. We're going to set the result back to MA_BUSY to make it clear that there's still more to load. */ if (result == MA_SUCCESS) { ma_job newJob; newJob = *pJob; /* Everything is the same as the input job, except the execution order. */ newJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); /* We need a fresh execution order. */ result = ma_resource_manager_post_job(pResourceManager, &newJob); /* Since the sound isn't yet fully decoded we want the status to be set to busy. */ if (result == MA_SUCCESS) { result = MA_BUSY; } } done: /* If there's still more to decode the result will be set to MA_BUSY. Otherwise we can free the decoder. */ if (result != MA_BUSY) { ma_decoder_uninit((ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder); ma_free(pJob->data.resourceManager.pageDataBufferNode.pDecoder, &pResourceManager->config.allocationCallbacks); } /* If we reached the end we need to treat it as successful. */ if (result == MA_AT_END) { result = MA_SUCCESS; } /* Make sure we set the result of node in case some error occurred. */ ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result); /* Signal the notification after setting the result in case the notification callback wants to inspect the result code. */ if (result != MA_BUSY) { if (pJob->data.resourceManager.pageDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.pageDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.pageDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.pageDataBufferNode.pDoneFence); } } ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer* pDataBuffer; ma_resource_manager_data_supply_type dataSupplyType = ma_resource_manager_data_supply_type_unknown; ma_bool32 isConnectorInitialized = MA_FALSE; /* All we're doing here is checking if the node has finished loading. If not, we just re-post the job and keep waiting. Otherwise we increment the execution counter and set the buffer's result code. */ MA_ASSERT(pJob != NULL); pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.loadDataBuffer.pDataBuffer; MA_ASSERT(pDataBuffer != NULL); pResourceManager = pDataBuffer->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */ } /* First thing we need to do is check whether or not the data buffer is getting deleted. If so we just abort, but making sure we increment the execution pointer. */ result = ma_resource_manager_data_buffer_result(pDataBuffer); if (result != MA_BUSY) { goto done; /* <-- This will ensure the execution pointer is incremented. */ } else { result = MA_SUCCESS; /* <-- Make sure this is reset. */ (void)result; /* <-- This is to suppress a static analysis diagnostic about "result" not being used. But for safety when I do future maintenance I don't want to delete that assignment. */ } /* Try initializing the connector if we haven't already. */ isConnectorInitialized = ma_resource_manager_data_buffer_has_connector(pDataBuffer); if (isConnectorInitialized == MA_FALSE) { dataSupplyType = ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode); if (dataSupplyType != ma_resource_manager_data_supply_type_unknown) { /* We can now initialize the connector. If this fails, we need to abort. It's very rare for this to fail. */ ma_resource_manager_data_source_config dataSourceConfig; /* For setting initial looping state and range. */ dataSourceConfig = ma_resource_manager_data_source_config_init(); dataSourceConfig.rangeBegInPCMFrames = pJob->data.resourceManager.loadDataBuffer.rangeBegInPCMFrames; dataSourceConfig.rangeEndInPCMFrames = pJob->data.resourceManager.loadDataBuffer.rangeEndInPCMFrames; dataSourceConfig.loopPointBegInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames; dataSourceConfig.loopPointEndInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames; dataSourceConfig.isLooping = pJob->data.resourceManager.loadDataBuffer.isLooping; result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, &dataSourceConfig, pJob->data.resourceManager.loadDataBuffer.pInitNotification, pJob->data.resourceManager.loadDataBuffer.pInitFence); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to initialize connector for data buffer. %s.\n", ma_result_description(result)); goto done; } } else { /* Don't have a known data supply type. Most likely the data buffer node is still loading, but it could be that an error occurred. */ } } else { /* The connector is already initialized. Nothing to do here. */ } /* If the data node is still loading, we need to repost the job and *not* increment the execution pointer (i.e. we need to not fall through to the "done" label). There is a hole between here and the where the data connector is initialized where the data buffer node may have finished initializing. We need to check for this by checking the result of the data buffer node and whether or not we had an unknown data supply type at the time of trying to initialize the data connector. */ result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode); if (result == MA_BUSY || (result == MA_SUCCESS && isConnectorInitialized == MA_FALSE && dataSupplyType == ma_resource_manager_data_supply_type_unknown)) { return ma_resource_manager_post_job(pResourceManager, pJob); } done: /* Only move away from a busy code so that we don't trash any existing error codes. */ ma_atomic_compare_and_swap_i32(&pDataBuffer->result, MA_BUSY, result); /* Only signal the other threads after the result has been set just for cleanliness sake. */ if (pJob->data.resourceManager.loadDataBuffer.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pDoneNotification); } if (pJob->data.resourceManager.loadDataBuffer.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pDoneFence); } /* If at this point the data buffer has not had it's connector initialized, it means the notification event was never signalled which means we need to signal it here. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE && result != MA_SUCCESS) { if (pJob->data.resourceManager.loadDataBuffer.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pInitNotification); } if (pJob->data.resourceManager.loadDataBuffer.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pInitFence); } } ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer* pDataBuffer; MA_ASSERT(pJob != NULL); pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.freeDataBuffer.pDataBuffer; MA_ASSERT(pDataBuffer != NULL); pResourceManager = pDataBuffer->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } ma_resource_manager_data_buffer_uninit_internal(pDataBuffer); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataBuffer.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataBuffer.pDoneNotification); } if (pJob->data.resourceManager.freeDataBuffer.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataBuffer.pDoneFence); } ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1); return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_decoder_config decoderConfig; ma_uint32 pageBufferSizeInBytes; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.loadDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } if (ma_resource_manager_data_stream_result(pDataStream) != MA_BUSY) { result = MA_INVALID_OPERATION; /* Most likely the data stream is being uninitialized. */ goto done; } /* We need to initialize the decoder first so we can determine the size of the pages. */ decoderConfig = ma_resource_manager__init_decoder_config(pResourceManager); if (pJob->data.resourceManager.loadDataStream.pFilePath != NULL) { result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePath, &decoderConfig, &pDataStream->decoder); } else { result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePathW, &decoderConfig, &pDataStream->decoder); } if (result != MA_SUCCESS) { goto done; } /* Retrieve the total length of the file before marking the decoder as loaded. */ if ((pDataStream->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) { result = ma_decoder_get_length_in_pcm_frames(&pDataStream->decoder, &pDataStream->totalLengthInPCMFrames); if (result != MA_SUCCESS) { goto done; /* Failed to retrieve the length. */ } } else { pDataStream->totalLengthInPCMFrames = 0; } /* Only mark the decoder as initialized when the length of the decoder has been retrieved because that can possibly require a scan over the whole file and we don't want to have another thread trying to access the decoder while it's scanning. */ pDataStream->isDecoderInitialized = MA_TRUE; /* We have the decoder so we can now initialize our page buffer. */ pageBufferSizeInBytes = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * 2 * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels); pDataStream->pPageData = ma_malloc(pageBufferSizeInBytes, &pResourceManager->config.allocationCallbacks); if (pDataStream->pPageData == NULL) { ma_decoder_uninit(&pDataStream->decoder); result = MA_OUT_OF_MEMORY; goto done; } /* Seek to our initial seek point before filling the initial pages. */ ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.loadDataStream.initialSeekPoint); /* We have our decoder and our page buffer, so now we need to fill our pages. */ ma_resource_manager_data_stream_fill_pages(pDataStream); /* And now we're done. We want to make sure the result is MA_SUCCESS. */ result = MA_SUCCESS; done: ma_free(pJob->data.resourceManager.loadDataStream.pFilePath, &pResourceManager->config.allocationCallbacks); ma_free(pJob->data.resourceManager.loadDataStream.pFilePathW, &pResourceManager->config.allocationCallbacks); /* We can only change the status away from MA_BUSY. If it's set to anything else it means an error has occurred somewhere or the uninitialization process has started (most likely). */ ma_atomic_compare_and_swap_i32(&pDataStream->result, MA_BUSY, result); /* Only signal the other threads after the result has been set just for cleanliness sake. */ if (pJob->data.resourceManager.loadDataStream.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataStream.pInitNotification); } if (pJob->data.resourceManager.loadDataStream.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataStream.pInitFence); } ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.freeDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* If our status is not MA_UNAVAILABLE we have a bug somewhere. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) == MA_UNAVAILABLE); if (pDataStream->isDecoderInitialized) { ma_decoder_uninit(&pDataStream->decoder); } if (pDataStream->pPageData != NULL) { ma_free(pDataStream->pPageData, &pResourceManager->config.allocationCallbacks); pDataStream->pPageData = NULL; /* Just in case... */ } ma_data_source_uninit(&pDataStream->ds); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataStream.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataStream.pDoneNotification); } if (pJob->data.resourceManager.freeDataStream.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataStream.pDoneFence); } /*ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);*/ return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.pageDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* For streams, the status should be MA_SUCCESS. */ if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { result = MA_INVALID_OPERATION; goto done; } ma_resource_manager_data_stream_fill_page(pDataStream, pJob->data.resourceManager.pageDataStream.pageIndex); done: ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.seekDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* For streams the status should be MA_SUCCESS for this to do anything. */ if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS || pDataStream->isDecoderInitialized == MA_FALSE) { result = MA_INVALID_OPERATION; goto done; } /* With seeking we just assume both pages are invalid and the relative frame cursor at position 0. This is basically exactly the same as loading, except instead of initializing the decoder, we seek to a frame. */ ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.seekDataStream.frameIndex); /* After seeking we'll need to reload the pages. */ ma_resource_manager_data_stream_fill_pages(pDataStream); /* We need to let the public API know that we're done seeking. */ ma_atomic_fetch_sub_32(&pDataStream->seekCounter, 1); done: ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } MA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob) { if (pResourceManager == NULL || pJob == NULL) { return MA_INVALID_ARGS; } return ma_job_process(pJob); } MA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager) { ma_result result; ma_job job; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } /* This will return MA_CANCELLED if the next job is a quit job. */ result = ma_resource_manager_next_job(pResourceManager, &job); if (result != MA_SUCCESS) { return result; } return ma_job_process(&job); } #else /* We'll get here if the resource manager is being excluded from the build. We need to define the job processing callbacks as no-ops. */ static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } #endif /* MA_NO_RESOURCE_MANAGER */ #ifndef MA_NO_NODE_GRAPH static ma_stack* ma_stack_init(size_t sizeInBytes, const ma_allocation_callbacks* pAllocationCallbacks) { ma_stack* pStack; if (sizeInBytes == 0) { return NULL; } pStack = (ma_stack*)ma_malloc(sizeof(*pStack) - sizeof(pStack->_data) + sizeInBytes, pAllocationCallbacks); if (pStack == NULL) { return NULL; } pStack->offset = 0; pStack->sizeInBytes = sizeInBytes; return pStack; } static void ma_stack_uninit(ma_stack* pStack, const ma_allocation_callbacks* pAllocationCallbacks) { if (pStack == NULL) { return; } ma_free(pStack, pAllocationCallbacks); } static void* ma_stack_alloc(ma_stack* pStack, size_t sz) { /* The size of the allocation is stored in the memory directly before the pointer. This needs to include padding to keep it aligned to ma_uintptr */ void* p = (void*)((char*)pStack->_data + pStack->offset); size_t* pSize = (size_t*)p; sz = (sz + (sizeof(ma_uintptr) - 1)) & ~(sizeof(ma_uintptr) - 1); /* Padding. */ if (pStack->offset + sz + sizeof(size_t) > pStack->sizeInBytes) { return NULL; /* Out of memory. */ } pStack->offset += sz + sizeof(size_t); *pSize = sz; return (void*)((char*)p + sizeof(size_t)); } static void ma_stack_free(ma_stack* pStack, void* p) { size_t* pSize; if (p == NULL) { return; } pSize = (size_t*)p - 1; pStack->offset -= *pSize + sizeof(size_t); } /* 10ms @ 48K = 480. Must never exceed 65535. */ #ifndef MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS #define MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS 480 #endif #ifndef MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL #define MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL 524288 #endif static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime); MA_API void ma_debug_fill_pcm_frames_with_sine_wave(float* pFramesOut, ma_uint32 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { #ifndef MA_NO_GENERATION { ma_waveform_config waveformConfig; ma_waveform waveform; waveformConfig = ma_waveform_config_init(format, channels, sampleRate, ma_waveform_type_sine, 1.0, 400); ma_waveform_init(&waveformConfig, &waveform); ma_waveform_read_pcm_frames(&waveform, pFramesOut, frameCount, NULL); } #else { (void)pFramesOut; (void)frameCount; (void)format; (void)channels; (void)sampleRate; #if defined(MA_DEBUG_OUTPUT) { #if _MSC_VER #pragma message ("ma_debug_fill_pcm_frames_with_sine_wave() will do nothing because MA_NO_GENERATION is enabled.") #endif } #endif } #endif } MA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels) { ma_node_graph_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.processingSizeInFrames = 0; return config; } static void ma_node_graph_set_is_reading(ma_node_graph* pNodeGraph, ma_bool32 isReading) { MA_ASSERT(pNodeGraph != NULL); ma_atomic_exchange_32(&pNodeGraph->isReading, isReading); } #if 0 static ma_bool32 ma_node_graph_is_reading(ma_node_graph* pNodeGraph) { MA_ASSERT(pNodeGraph != NULL); return ma_atomic_load_32(&pNodeGraph->isReading); } #endif static void ma_node_graph_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_graph* pNodeGraph = (ma_node_graph*)pNode; ma_uint64 framesRead; ma_node_graph_read_pcm_frames(pNodeGraph, ppFramesOut[0], *pFrameCountOut, &framesRead); *pFrameCountOut = (ma_uint32)framesRead; /* Safe cast. */ (void)ppFramesIn; (void)pFrameCountIn; } static ma_node_vtable g_node_graph_node_vtable = { ma_node_graph_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 0, /* 0 input buses. */ 1, /* 1 output bus. */ 0 /* Flags. */ }; static void ma_node_graph_endpoint_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { MA_ASSERT(pNode != NULL); MA_ASSERT(ma_node_get_input_bus_count(pNode) == 1); MA_ASSERT(ma_node_get_output_bus_count(pNode) == 1); /* Input channel count needs to be the same as the output channel count. */ MA_ASSERT(ma_node_get_input_channels(pNode, 0) == ma_node_get_output_channels(pNode, 0)); /* We don't need to do anything here because it's a passthrough. */ (void)pNode; (void)ppFramesIn; (void)pFrameCountIn; (void)ppFramesOut; (void)pFrameCountOut; #if 0 /* The data has already been mixed. We just need to move it to the output buffer. */ if (ppFramesIn != NULL) { ma_copy_pcm_frames(ppFramesOut[0], ppFramesIn[0], *pFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNode, 0)); } #endif } static ma_node_vtable g_node_graph_endpoint_vtable = { ma_node_graph_endpoint_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* 1 input bus. */ 1, /* 1 output bus. */ MA_NODE_FLAG_PASSTHROUGH /* Flags. The endpoint is a passthrough. */ }; MA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph) { ma_result result; ma_node_config baseConfig; ma_node_config endpointConfig; if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNodeGraph); pNodeGraph->processingSizeInFrames = pConfig->processingSizeInFrames; /* Base node so we can use the node graph as a node into another graph. */ baseConfig = ma_node_config_init(); baseConfig.vtable = &g_node_graph_node_vtable; baseConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pNodeGraph->base); if (result != MA_SUCCESS) { return result; } /* Endpoint. */ endpointConfig = ma_node_config_init(); endpointConfig.vtable = &g_node_graph_endpoint_vtable; endpointConfig.pInputChannels = &pConfig->channels; endpointConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &endpointConfig, pAllocationCallbacks, &pNodeGraph->endpoint); if (result != MA_SUCCESS) { ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); return result; } /* Processing cache. */ if (pConfig->processingSizeInFrames > 0) { pNodeGraph->pProcessingCache = (float*)ma_malloc(pConfig->processingSizeInFrames * pConfig->channels * sizeof(float), pAllocationCallbacks); if (pNodeGraph->pProcessingCache == NULL) { ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); return MA_OUT_OF_MEMORY; } } /* We need a pre-mix stack. The size of this stack is configurable via the config. The default value depends on the channel count. */ { size_t preMixStackSizeInBytes = pConfig->preMixStackSizeInBytes; if (preMixStackSizeInBytes == 0) { preMixStackSizeInBytes = pConfig->channels * MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL; } pNodeGraph->pPreMixStack = ma_stack_init(preMixStackSizeInBytes, pAllocationCallbacks); if (pNodeGraph->pPreMixStack == NULL) { ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); if (pNodeGraph->pProcessingCache != NULL) { ma_free(pNodeGraph->pProcessingCache, pAllocationCallbacks); } return MA_OUT_OF_MEMORY; } } return MA_SUCCESS; } MA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks) { if (pNodeGraph == NULL) { return; } ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); if (pNodeGraph->pProcessingCache != NULL) { ma_free(pNodeGraph->pProcessingCache, pAllocationCallbacks); pNodeGraph->pProcessingCache = NULL; } if (pNodeGraph->pPreMixStack != NULL) { ma_stack_uninit(pNodeGraph->pPreMixStack, pAllocationCallbacks); pNodeGraph->pPreMixStack = NULL; } } MA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return NULL; } return &pNodeGraph->endpoint; } MA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesRead; ma_uint32 channels; if (pFramesRead != NULL) { *pFramesRead = 0; /* Safety. */ } if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } channels = ma_node_get_output_channels(&pNodeGraph->endpoint, 0); /* We'll be nice and try to do a full read of all frameCount frames. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { ma_uint32 framesJustRead; ma_uint64 framesToRead; float* pRunningFramesOut; framesToRead = frameCount - totalFramesRead; if (framesToRead > 0xFFFFFFFF) { framesToRead = 0xFFFFFFFF; } pRunningFramesOut = (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels); /* If there's anything in the cache, consume that first. */ if (pNodeGraph->processingCacheFramesRemaining > 0) { ma_uint32 framesToReadFromCache; framesToReadFromCache = (ma_uint32)framesToRead; if (framesToReadFromCache > pNodeGraph->processingCacheFramesRemaining) { framesToReadFromCache = pNodeGraph->processingCacheFramesRemaining; } MA_COPY_MEMORY(pRunningFramesOut, pNodeGraph->pProcessingCache, framesToReadFromCache * channels * sizeof(float)); MA_MOVE_MEMORY(pNodeGraph->pProcessingCache, pNodeGraph->pProcessingCache + (framesToReadFromCache * channels), (pNodeGraph->processingCacheFramesRemaining - framesToReadFromCache) * channels * sizeof(float)); pNodeGraph->processingCacheFramesRemaining -= framesToReadFromCache; totalFramesRead += framesToReadFromCache; continue; } else { /* If processingSizeInFrames is non-zero, we need to make sure we always read in chunks of that size. If the frame count is less than that, we need to read into the cache and then continue on. */ float* pReadDst = pRunningFramesOut; if (pNodeGraph->processingSizeInFrames > 0) { if (framesToRead < pNodeGraph->processingSizeInFrames) { pReadDst = pNodeGraph->pProcessingCache; /* We need to read into the cache because otherwise we'll overflow the output buffer. */ } framesToRead = pNodeGraph->processingSizeInFrames; } ma_node_graph_set_is_reading(pNodeGraph, MA_TRUE); { result = ma_node_read_pcm_frames(&pNodeGraph->endpoint, 0, pReadDst, (ma_uint32)framesToRead, &framesJustRead, ma_node_get_time(&pNodeGraph->endpoint)); } ma_node_graph_set_is_reading(pNodeGraph, MA_FALSE); /* Do not increment the total frames read counter if we read into the cache. We use this to determine how many frames have been written to the final output buffer. */ if (pReadDst == pNodeGraph->pProcessingCache) { /* We read into the cache. */ pNodeGraph->processingCacheFramesRemaining = framesJustRead; } else { /* We read straight into the output buffer. */ totalFramesRead += framesJustRead; } if (result != MA_SUCCESS) { break; } /* Abort if we weren't able to read any frames or else we risk getting stuck in a loop. */ if (framesJustRead == 0) { break; } } } /* Let's go ahead and silence any leftover frames just for some added safety to ensure the caller doesn't try emitting garbage out of the speakers. */ if (totalFramesRead < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels), (frameCount - totalFramesRead), ma_format_f32, channels); } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } MA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return 0; } return ma_node_get_output_channels(&pNodeGraph->endpoint, 0); } MA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return 0; } return ma_node_get_time(&pNodeGraph->endpoint); /* Global time is just the local time of the endpoint. */ } MA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime) { if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } return ma_node_set_time(&pNodeGraph->endpoint, globalTime); /* Global time is just the local time of the endpoint. */ } #define MA_NODE_OUTPUT_BUS_FLAG_HAS_READ 0x01 /* Whether or not this bus ready to read more data. Only used on nodes with multiple output buses. */ static ma_result ma_node_output_bus_init(ma_node* pNode, ma_uint32 outputBusIndex, ma_uint32 channels, ma_node_output_bus* pOutputBus) { MA_ASSERT(pOutputBus != NULL); MA_ASSERT(outputBusIndex < MA_MAX_NODE_BUS_COUNT); MA_ASSERT(outputBusIndex < ma_node_get_output_bus_count(pNode)); MA_ASSERT(channels < 256); MA_ZERO_OBJECT(pOutputBus); if (channels == 0) { return MA_INVALID_ARGS; } pOutputBus->pNode = pNode; pOutputBus->outputBusIndex = (ma_uint8)outputBusIndex; pOutputBus->channels = (ma_uint8)channels; pOutputBus->flags = MA_NODE_OUTPUT_BUS_FLAG_HAS_READ; /* <-- Important that this flag is set by default. */ pOutputBus->volume = 1; return MA_SUCCESS; } static void ma_node_output_bus_lock(ma_node_output_bus* pOutputBus) { ma_spinlock_lock(&pOutputBus->lock); } static void ma_node_output_bus_unlock(ma_node_output_bus* pOutputBus) { ma_spinlock_unlock(&pOutputBus->lock); } static ma_uint32 ma_node_output_bus_get_channels(const ma_node_output_bus* pOutputBus) { return pOutputBus->channels; } static void ma_node_output_bus_set_has_read(ma_node_output_bus* pOutputBus, ma_bool32 hasRead) { if (hasRead) { ma_atomic_fetch_or_32(&pOutputBus->flags, MA_NODE_OUTPUT_BUS_FLAG_HAS_READ); } else { ma_atomic_fetch_and_32(&pOutputBus->flags, (ma_uint32)~MA_NODE_OUTPUT_BUS_FLAG_HAS_READ); } } static ma_bool32 ma_node_output_bus_has_read(ma_node_output_bus* pOutputBus) { return (ma_atomic_load_32(&pOutputBus->flags) & MA_NODE_OUTPUT_BUS_FLAG_HAS_READ) != 0; } static void ma_node_output_bus_set_is_attached(ma_node_output_bus* pOutputBus, ma_bool32 isAttached) { ma_atomic_exchange_32(&pOutputBus->isAttached, isAttached); } static ma_bool32 ma_node_output_bus_is_attached(ma_node_output_bus* pOutputBus) { return ma_atomic_load_32(&pOutputBus->isAttached); } static ma_result ma_node_output_bus_set_volume(ma_node_output_bus* pOutputBus, float volume) { MA_ASSERT(pOutputBus != NULL); if (volume < 0.0f) { volume = 0.0f; } ma_atomic_exchange_f32(&pOutputBus->volume, volume); return MA_SUCCESS; } static float ma_node_output_bus_get_volume(const ma_node_output_bus* pOutputBus) { return ma_atomic_load_f32((float*)&pOutputBus->volume); } static ma_result ma_node_input_bus_init(ma_uint32 channels, ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(channels < 256); MA_ZERO_OBJECT(pInputBus); if (channels == 0) { return MA_INVALID_ARGS; } pInputBus->channels = (ma_uint8)channels; return MA_SUCCESS; } static void ma_node_input_bus_lock(ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); ma_spinlock_lock(&pInputBus->lock); } static void ma_node_input_bus_unlock(ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); ma_spinlock_unlock(&pInputBus->lock); } static void ma_node_input_bus_next_begin(ma_node_input_bus* pInputBus) { ma_atomic_fetch_add_32(&pInputBus->nextCounter, 1); } static void ma_node_input_bus_next_end(ma_node_input_bus* pInputBus) { ma_atomic_fetch_sub_32(&pInputBus->nextCounter, 1); } static ma_uint32 ma_node_input_bus_get_next_counter(ma_node_input_bus* pInputBus) { return ma_atomic_load_32(&pInputBus->nextCounter); } static ma_uint32 ma_node_input_bus_get_channels(const ma_node_input_bus* pInputBus) { return pInputBus->channels; } static void ma_node_input_bus_detach__no_output_bus_lock(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); /* Mark the output bus as detached first. This will prevent future iterations on the audio thread from iterating this output bus. */ ma_node_output_bus_set_is_attached(pOutputBus, MA_FALSE); /* We cannot use the output bus lock here since it'll be getting used at a higher level, but we do still need to use the input bus lock since we'll be updating pointers on two different output buses. The same rules apply here as the attaching case. Although we're using a lock here, we're *not* using a lock when iterating over the list in the audio thread. We therefore need to craft this in a way such that the iteration on the audio thread doesn't break. The first thing to do is swap out the "next" pointer of the previous output bus with the new "next" output bus. This is the operation that matters for iteration on the audio thread. After that, the previous pointer on the new "next" pointer needs to be updated, after which point the linked list will be in a good state. */ ma_node_input_bus_lock(pInputBus); { ma_node_output_bus* pOldPrev = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pPrev); ma_node_output_bus* pOldNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pNext); if (pOldPrev != NULL) { ma_atomic_exchange_ptr(&pOldPrev->pNext, pOldNext); /* <-- This is where the output bus is detached from the list. */ } if (pOldNext != NULL) { ma_atomic_exchange_ptr(&pOldNext->pPrev, pOldPrev); /* <-- This is required for detachment. */ } } ma_node_input_bus_unlock(pInputBus); /* At this point the output bus is detached and the linked list is completely unaware of it. Reset some data for safety. */ ma_atomic_exchange_ptr(&pOutputBus->pNext, NULL); /* Using atomic exchanges here, mainly for the benefit of analysis tools which don't always recognize spinlocks. */ ma_atomic_exchange_ptr(&pOutputBus->pPrev, NULL); /* As above. */ pOutputBus->pInputNode = NULL; pOutputBus->inputNodeInputBusIndex = 0; /* For thread-safety reasons, we don't want to be returning from this straight away. We need to wait for the audio thread to finish with the output bus. There's two things we need to wait for. The first is the part that selects the next output bus in the list, and the other is the part that reads from the output bus. Basically all we're doing is waiting for the input bus to stop referencing the output bus. We're doing this part last because we want the section above to run while the audio thread is finishing up with the output bus, just for efficiency reasons. We marked the output bus as detached right at the top of this function which is going to prevent the audio thread from iterating the output bus again. */ /* Part 1: Wait for the current iteration to complete. */ while (ma_node_input_bus_get_next_counter(pInputBus) > 0) { ma_yield(); } /* Part 2: Wait for any reads to complete. */ while (ma_atomic_load_32(&pOutputBus->refCount) > 0) { ma_yield(); } /* At this point we're done detaching and we can be guaranteed that the audio thread is not going to attempt to reference this output bus again (until attached again). */ } #if 0 /* Not used at the moment, but leaving here in case I need it later. */ static void ma_node_input_bus_detach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); ma_node_output_bus_lock(pOutputBus); { ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus); } ma_node_output_bus_unlock(pOutputBus); } #endif static void ma_node_input_bus_attach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus, ma_node* pNewInputNode, ma_uint32 inputNodeInputBusIndex) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); ma_node_output_bus_lock(pOutputBus); { ma_node_output_bus* pOldInputNode = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pInputNode); /* Detach from any existing attachment first if necessary. */ if (pOldInputNode != NULL) { ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus); } /* At this point we can be sure the output bus is not attached to anything. The linked list in the old input bus has been updated so that pOutputBus will not get iterated again. */ pOutputBus->pInputNode = pNewInputNode; /* No need for an atomic assignment here because modification of this variable always happens within a lock. */ pOutputBus->inputNodeInputBusIndex = (ma_uint8)inputNodeInputBusIndex; /* Now we need to attach the output bus to the linked list. This involves updating two pointers on two different output buses so I'm going to go ahead and keep this simple and just use a lock. There are ways to do this without a lock, but it's just too hard to maintain for its value. Although we're locking here, it's important to remember that we're *not* locking when iterating and reading audio data since that'll be running on the audio thread. As a result we need to be careful how we craft this so that we don't break iteration. What we're going to do is always attach the new item so that it becomes the first item in the list. That way, as we're iterating we won't break any links in the list and iteration will continue safely. The detaching case will also be crafted in a way as to not break list iteration. It's important to remember to use atomic exchanges here since no locking is happening on the audio thread during iteration. */ ma_node_input_bus_lock(pInputBus); { ma_node_output_bus* pNewPrev = &pInputBus->head; ma_node_output_bus* pNewNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext); /* Update the local output bus. */ ma_atomic_exchange_ptr(&pOutputBus->pPrev, pNewPrev); ma_atomic_exchange_ptr(&pOutputBus->pNext, pNewNext); /* Update the other output buses to point back to the local output bus. */ ma_atomic_exchange_ptr(&pInputBus->head.pNext, pOutputBus); /* <-- This is where the output bus is actually attached to the input bus. */ /* Do the previous pointer last. This is only used for detachment. */ if (pNewNext != NULL) { ma_atomic_exchange_ptr(&pNewNext->pPrev, pOutputBus); } } ma_node_input_bus_unlock(pInputBus); /* Mark the node as attached last. This is used to controlling whether or the output bus will be iterated on the audio thread. Mainly required for detachment purposes. */ ma_node_output_bus_set_is_attached(pOutputBus, MA_TRUE); } ma_node_output_bus_unlock(pOutputBus); } static ma_node_output_bus* ma_node_input_bus_next(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { ma_node_output_bus* pNext; MA_ASSERT(pInputBus != NULL); if (pOutputBus == NULL) { return NULL; } ma_node_input_bus_next_begin(pInputBus); { pNext = pOutputBus; for (;;) { pNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pNext->pNext); if (pNext == NULL) { break; /* Reached the end. */ } if (ma_node_output_bus_is_attached(pNext) == MA_FALSE) { continue; /* The node is not attached. Keep checking. */ } /* The next node has been selected. */ break; } /* We need to increment the reference count of the selected node. */ if (pNext != NULL) { ma_atomic_fetch_add_32(&pNext->refCount, 1); } /* The previous node is no longer being referenced. */ ma_atomic_fetch_sub_32(&pOutputBus->refCount, 1); } ma_node_input_bus_next_end(pInputBus); return pNext; } static ma_node_output_bus* ma_node_input_bus_first(ma_node_input_bus* pInputBus) { return ma_node_input_bus_next(pInputBus, &pInputBus->head); } static ma_result ma_node_input_bus_read_pcm_frames(ma_node* pInputNode, ma_node_input_bus* pInputBus, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime) { ma_result result = MA_SUCCESS; ma_node_output_bus* pOutputBus; ma_node_output_bus* pFirst; ma_uint32 inputChannels; ma_bool32 doesOutputBufferHaveContent = MA_FALSE; /* This will be called from the audio thread which means we can't be doing any locking. Basically, this function will not perform any locking, whereas attaching and detaching will, but crafted in such a way that we don't need to perform any locking here. The important thing to remember is to always iterate in a forward direction. In order to process any data we need to first read from all input buses. That's where this function comes in. This iterates over each of the attachments and accumulates/mixes them. We also convert the channels to the nodes output channel count before mixing. We want to do this channel conversion so that the caller of this function can invoke the processing callback without having to do it themselves. When we iterate over each of the attachments on the input bus, we need to read as much data as we can from each of them so that we don't end up with holes between each of the attachments. To do this, we need to read from each attachment in a loop and read as many frames as we can, up to `frameCount`. */ MA_ASSERT(pInputNode != NULL); MA_ASSERT(pFramesRead != NULL); /* pFramesRead is critical and must always be specified. On input it's undefined and on output it'll be set to the number of frames actually read. */ *pFramesRead = 0; /* Safety. */ inputChannels = ma_node_input_bus_get_channels(pInputBus); /* We need to be careful with how we call ma_node_input_bus_first() and ma_node_input_bus_next(). They are both critical to our lock-free thread-safety system. We can only call ma_node_input_bus_first() once per iteration, however we have an optimization to checks whether or not it's the first item in the list. We therefore need to store a pointer to the first item rather than repeatedly calling ma_node_input_bus_first(). It's safe to keep hold of this pointer, so long as we don't dereference it after calling ma_node_input_bus_next(), which we won't be. */ pFirst = ma_node_input_bus_first(pInputBus); if (pFirst == NULL) { return MA_SUCCESS; /* No attachments. Read nothing. */ } for (pOutputBus = pFirst; pOutputBus != NULL; pOutputBus = ma_node_input_bus_next(pInputBus, pOutputBus)) { ma_uint32 framesProcessed = 0; ma_bool32 isSilentOutput = MA_FALSE; MA_ASSERT(pOutputBus->pNode != NULL); MA_ASSERT(((ma_node_base*)pOutputBus->pNode)->vtable != NULL); isSilentOutput = (((ma_node_base*)pOutputBus->pNode)->vtable->flags & MA_NODE_FLAG_SILENT_OUTPUT) != 0; if (pFramesOut != NULL) { /* Read. */ while (framesProcessed < frameCount) { float* pRunningFramesOut; ma_uint32 framesToRead; ma_uint32 framesJustRead = 0; framesToRead = frameCount - framesProcessed; pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(pFramesOut, framesProcessed, inputChannels); if (doesOutputBufferHaveContent == MA_FALSE) { /* Fast path. First attachment. We just read straight into the output buffer (no mixing required). */ result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, pRunningFramesOut, framesToRead, &framesJustRead, globalTime + framesProcessed); } else { /* Slow path. Not the first attachment. Mixing required. */ ma_uint32 preMixBufferCapInFrames = ((ma_node_base*)pInputNode)->cachedDataCapInFramesPerBus; float* pPreMixBuffer = (float*)ma_stack_alloc(((ma_node_base*)pInputNode)->pNodeGraph->pPreMixStack, preMixBufferCapInFrames * inputChannels * sizeof(float)); if (pPreMixBuffer == NULL) { /* If you're hitting this assert it means you've got an unusually deep chain of nodes, you've got an excessively large processing size, or you have a combination of both, and as a result have run out of stack space. You can increase this using the preMixStackSizeInBytes variable in ma_node_graph_config. If you're using ma_engine, you can do it via the preMixStackSizeInBytes variable in ma_engine_config. It defaults to 512KB per output channel. */ MA_ASSERT(MA_FALSE); } else { if (framesToRead > preMixBufferCapInFrames) { framesToRead = preMixBufferCapInFrames; } result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, pPreMixBuffer, framesToRead, &framesJustRead, globalTime + framesProcessed); if (result == MA_SUCCESS || result == MA_AT_END) { if (isSilentOutput == MA_FALSE) { /* Don't mix if the node outputs silence. */ ma_mix_pcm_frames_f32(pRunningFramesOut, pPreMixBuffer, framesJustRead, inputChannels, /*volume*/1); } } /* The pre-mix buffer is no longer required. */ ma_stack_free(((ma_node_base*)pInputNode)->pNodeGraph->pPreMixStack, pPreMixBuffer); pPreMixBuffer = NULL; } } framesProcessed += framesJustRead; /* If we reached the end or otherwise failed to read any data we need to finish up with this output node. */ if (result != MA_SUCCESS) { break; } /* If we didn't read anything, abort so we don't get stuck in a loop. */ if (framesJustRead == 0) { break; } } /* If it's the first attachment we didn't do any mixing. Any leftover samples need to be silenced. */ if (pOutputBus == pFirst && framesProcessed < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, framesProcessed, ma_format_f32, inputChannels), (frameCount - framesProcessed), ma_format_f32, inputChannels); } if (isSilentOutput == MA_FALSE) { doesOutputBufferHaveContent = MA_TRUE; } } else { /* Seek. */ ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, NULL, frameCount, &framesProcessed, globalTime); } } /* If we didn't output anything, output silence. */ if (doesOutputBufferHaveContent == MA_FALSE && pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, inputChannels); } /* In this path we always "process" the entire amount. */ *pFramesRead = frameCount; return result; } MA_API ma_node_config ma_node_config_init(void) { ma_node_config config; MA_ZERO_OBJECT(&config); config.initialState = ma_node_state_started; /* Nodes are started by default. */ config.inputBusCount = MA_NODE_BUS_COUNT_UNKNOWN; config.outputBusCount = MA_NODE_BUS_COUNT_UNKNOWN; return config; } static ma_uint16 ma_node_config_get_cache_size_in_frames(const ma_node_config* pConfig, const ma_node_graph* pNodeGraph) { ma_uint32 cacheSizeInFrames; (void)pConfig; if (pNodeGraph->processingSizeInFrames > 0) { cacheSizeInFrames = pNodeGraph->processingSizeInFrames; } else { cacheSizeInFrames = MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS; } if (cacheSizeInFrames > 0xFFFF) { cacheSizeInFrames = 0xFFFF; } return (ma_uint16)cacheSizeInFrames; } static ma_result ma_node_detach_full(ma_node* pNode); static float* ma_node_get_cached_input_ptr(ma_node* pNode, ma_uint32 inputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; float* pBasePtr; MA_ASSERT(pNodeBase != NULL); /* Input data is stored at the front of the buffer. */ pBasePtr = pNodeBase->pCachedData; for (iInputBus = 0; iInputBus < inputBusIndex; iInputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]); } return pBasePtr; } static float* ma_node_get_cached_output_ptr(ma_node* pNode, ma_uint32 outputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; ma_uint32 iOutputBus; float* pBasePtr; MA_ASSERT(pNodeBase != NULL); /* Cached output data starts after the input data. */ pBasePtr = pNodeBase->pCachedData; for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]); } for (iOutputBus = 0; iOutputBus < outputBusIndex; iOutputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iOutputBus]); } return pBasePtr; } typedef struct { size_t sizeInBytes; size_t inputBusOffset; size_t outputBusOffset; size_t cachedDataOffset; ma_uint32 inputBusCount; /* So it doesn't have to be calculated twice. */ ma_uint32 outputBusCount; /* So it doesn't have to be calculated twice. */ } ma_node_heap_layout; static ma_result ma_node_translate_bus_counts(const ma_node_config* pConfig, ma_uint32* pInputBusCount, ma_uint32* pOutputBusCount) { ma_uint32 inputBusCount; ma_uint32 outputBusCount; MA_ASSERT(pConfig != NULL); MA_ASSERT(pInputBusCount != NULL); MA_ASSERT(pOutputBusCount != NULL); /* Bus counts are determined by the vtable, unless they're set to `MA_NODE_BUS_COUNT_UNKNWON`, in which case they're taken from the config. */ if (pConfig->vtable->inputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) { inputBusCount = pConfig->inputBusCount; } else { inputBusCount = pConfig->vtable->inputBusCount; if (pConfig->inputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->inputBusCount != pConfig->vtable->inputBusCount) { return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */ } } if (pConfig->vtable->outputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) { outputBusCount = pConfig->outputBusCount; } else { outputBusCount = pConfig->vtable->outputBusCount; if (pConfig->outputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->outputBusCount != pConfig->vtable->outputBusCount) { return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */ } } /* Bus counts must be within limits. */ if (inputBusCount > MA_MAX_NODE_BUS_COUNT || outputBusCount > MA_MAX_NODE_BUS_COUNT) { return MA_INVALID_ARGS; } /* We must have channel counts for each bus. */ if ((inputBusCount > 0 && pConfig->pInputChannels == NULL) || (outputBusCount > 0 && pConfig->pOutputChannels == NULL)) { return MA_INVALID_ARGS; /* You must specify channel counts for each input and output bus. */ } /* Some special rules for passthrough nodes. */ if ((pConfig->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { if ((pConfig->vtable->inputBusCount != 0 && pConfig->vtable->inputBusCount != 1) || pConfig->vtable->outputBusCount != 1) { return MA_INVALID_ARGS; /* Passthrough nodes must have exactly 1 output bus and either 0 or 1 input bus. */ } if (pConfig->pInputChannels[0] != pConfig->pOutputChannels[0]) { return MA_INVALID_ARGS; /* Passthrough nodes must have the same number of channels between input and output nodes. */ } } *pInputBusCount = inputBusCount; *pOutputBusCount = outputBusCount; return MA_SUCCESS; } static ma_result ma_node_get_heap_layout(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, ma_node_heap_layout* pHeapLayout) { ma_result result; ma_uint32 inputBusCount; ma_uint32 outputBusCount; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL || pConfig->vtable == NULL || pConfig->vtable->onProcess == NULL) { return MA_INVALID_ARGS; } result = ma_node_translate_bus_counts(pConfig, &inputBusCount, &outputBusCount); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes = 0; /* Input buses. */ if (inputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) { pHeapLayout->inputBusOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_input_bus) * inputBusCount); } else { pHeapLayout->inputBusOffset = MA_SIZE_MAX; /* MA_SIZE_MAX indicates that no heap allocation is required for the input bus. */ } /* Output buses. */ if (outputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) { pHeapLayout->outputBusOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_output_bus) * outputBusCount); } else { pHeapLayout->outputBusOffset = MA_SIZE_MAX; } /* Cached audio data. We need to allocate memory for caching both input and output data. We have an optimization where no caching is necessary for specific conditions: - The node has 0 inputs and 1 output. When a node meets the above conditions, no cache is allocated. The size choice for this buffer is a little bit finicky. We don't want to be too wasteful by allocating too much, but at the same time we want it be large enough so that enough frames can be processed for each call to ma_node_read_pcm_frames() so that it keeps things efficient. For now I'm going with 10ms @ 48K which is 480 frames per bus. This is configurable at compile time. It might also be worth investigating whether or not this can be configured at run time. */ if (inputBusCount == 0 && outputBusCount == 1) { /* Fast path. No cache needed. */ pHeapLayout->cachedDataOffset = MA_SIZE_MAX; } else { /* Slow path. Cache needed. */ size_t cachedDataSizeInBytes = 0; ma_uint32 cacheCapInFrames; ma_uint32 iBus; /* The capacity of the cache is based on our callback processing size. */ cacheCapInFrames = ma_node_config_get_cache_size_in_frames(pConfig, pNodeGraph); for (iBus = 0; iBus < inputBusCount; iBus += 1) { cachedDataSizeInBytes += cacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pInputChannels[iBus]); } for (iBus = 0; iBus < outputBusCount; iBus += 1) { cachedDataSizeInBytes += cacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pOutputChannels[iBus]); } pHeapLayout->cachedDataOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(cachedDataSizeInBytes); } /* Not technically part of the heap, but we can output the input and output bus counts so we can avoid a redundant call to ma_node_translate_bus_counts(). */ pHeapLayout->inputBusCount = inputBusCount; pHeapLayout->outputBusCount = outputBusCount; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_node_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_result result; ma_node_heap_layout heapLayout; ma_uint32 iInputBus; ma_uint32 iOutputBus; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNodeBase); result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pNodeBase->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pNodeBase->pNodeGraph = pNodeGraph; pNodeBase->vtable = pConfig->vtable; pNodeBase->state = pConfig->initialState; pNodeBase->stateTimes[ma_node_state_started] = 0; pNodeBase->stateTimes[ma_node_state_stopped] = (ma_uint64)(ma_int64)-1; /* Weird casting for VC6 compatibility. */ pNodeBase->inputBusCount = heapLayout.inputBusCount; pNodeBase->outputBusCount = heapLayout.outputBusCount; if (heapLayout.inputBusOffset != MA_SIZE_MAX) { pNodeBase->pInputBuses = (ma_node_input_bus*)ma_offset_ptr(pHeap, heapLayout.inputBusOffset); } else { pNodeBase->pInputBuses = pNodeBase->_inputBuses; } if (heapLayout.outputBusOffset != MA_SIZE_MAX) { pNodeBase->pOutputBuses = (ma_node_output_bus*)ma_offset_ptr(pHeap, heapLayout.outputBusOffset); } else { pNodeBase->pOutputBuses = pNodeBase->_outputBuses; } if (heapLayout.cachedDataOffset != MA_SIZE_MAX) { pNodeBase->pCachedData = (float*)ma_offset_ptr(pHeap, heapLayout.cachedDataOffset); pNodeBase->cachedDataCapInFramesPerBus = ma_node_config_get_cache_size_in_frames(pConfig, pNodeGraph); } else { pNodeBase->pCachedData = NULL; } /* We need to run an initialization step for each input and output bus. */ for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) { result = ma_node_input_bus_init(pConfig->pInputChannels[iInputBus], &pNodeBase->pInputBuses[iInputBus]); if (result != MA_SUCCESS) { return result; } } for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) { result = ma_node_output_bus_init(pNodeBase, iOutputBus, pConfig->pOutputChannels[iOutputBus], &pNodeBase->pOutputBuses[iOutputBus]); if (result != MA_SUCCESS) { return result; } } /* The cached data needs to be initialized to silence (or a sine wave tone if we're debugging). */ if (pNodeBase->pCachedData != NULL) { ma_uint32 iBus; #if 1 /* Toggle this between 0 and 1 to turn debugging on or off. 1 = fill with a sine wave for debugging; 0 = fill with silence. */ /* For safety we'll go ahead and default the buffer to silence. */ for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) { ma_silence_pcm_frames(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus])); } for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) { ma_silence_pcm_frames(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus])); } #else /* For debugging. Default to a sine wave. */ for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) { ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus]), 48000); } for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) { ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus]), 48000); } #endif } return MA_SUCCESS; } MA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_node_get_heap_size(pNodeGraph, pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_node_init_preallocated(pNodeGraph, pConfig, pHeap, pNode); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } ((ma_node_base*)pNode)->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return; } /* The first thing we need to do is fully detach the node. This will detach all inputs and outputs. We need to do this first because it will sever the connection with the node graph and allow us to complete uninitialization without needing to worry about thread-safety with the audio thread. The detachment process will wait for any local processing of the node to finish. */ ma_node_detach_full(pNode); /* At this point the node should be completely unreferenced by the node graph and we can finish up the uninitialization process without needing to worry about thread-safety. */ if (pNodeBase->_ownsHeap) { ma_free(pNodeBase->_pHeap, pAllocationCallbacks); } } MA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode) { if (pNode == NULL) { return NULL; } return ((const ma_node_base*)pNode)->pNodeGraph; } MA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ((ma_node_base*)pNode)->inputBusCount; } MA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ((ma_node_base*)pNode)->outputBusCount; } MA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNode == NULL) { return 0; } if (inputBusIndex >= ma_node_get_input_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[inputBusIndex]); } MA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNode == NULL) { return 0; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[outputBusIndex]); } static ma_result ma_node_detach_full(ma_node* pNode) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } /* Make sure the node is completely detached first. This will not return until the output bus is guaranteed to no longer be referenced by the audio thread. */ ma_node_detach_all_output_buses(pNode); /* At this point all output buses will have been detached from the graph and we can be guaranteed that none of its input nodes will be getting processed by the graph. We can detach these without needing to worry about the audio thread touching them. */ for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNode); iInputBus += 1) { ma_node_input_bus* pInputBus; ma_node_output_bus* pOutputBus; pInputBus = &pNodeBase->pInputBuses[iInputBus]; /* This is important. We cannot be using ma_node_input_bus_first() or ma_node_input_bus_next(). Those functions are specifically for the audio thread. We'll instead just manually iterate using standard linked list logic. We don't need to worry about the audio thread referencing these because the step above severed the connection to the graph. */ for (pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext); pOutputBus != NULL; pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext)) { ma_node_detach_output_bus(pOutputBus->pNode, pOutputBus->outputBusIndex); /* This won't do any waiting in practice and should be efficient. */ } } return MA_SUCCESS; } MA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex) { ma_result result = MA_SUCCESS; ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_node_base* pInputNodeBase; if (pNode == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return MA_INVALID_ARGS; /* Invalid output bus index. */ } /* We need to lock the output bus because we need to inspect the input node and grab its input bus. */ ma_node_output_bus_lock(&pNodeBase->pOutputBuses[outputBusIndex]); { pInputNodeBase = (ma_node_base*)pNodeBase->pOutputBuses[outputBusIndex].pInputNode; if (pInputNodeBase != NULL) { ma_node_input_bus_detach__no_output_bus_lock(&pInputNodeBase->pInputBuses[pNodeBase->pOutputBuses[outputBusIndex].inputNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex]); } } ma_node_output_bus_unlock(&pNodeBase->pOutputBuses[outputBusIndex]); return result; } MA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode) { ma_uint32 iOutputBus; if (pNode == NULL) { return MA_INVALID_ARGS; } for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNode); iOutputBus += 1) { ma_node_detach_output_bus(pNode, iOutputBus); } return MA_SUCCESS; } MA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_node_base* pOtherNodeBase = (ma_node_base*)pOtherNode; if (pNodeBase == NULL || pOtherNodeBase == NULL) { return MA_INVALID_ARGS; } if (pNodeBase == pOtherNodeBase) { return MA_INVALID_OPERATION; /* Cannot attach a node to itself. */ } if (outputBusIndex >= ma_node_get_output_bus_count(pNode) || otherNodeInputBusIndex >= ma_node_get_input_bus_count(pOtherNode)) { return MA_INVALID_OPERATION; /* Invalid bus index. */ } /* The output channel count of the output node must be the same as the input channel count of the input node. */ if (ma_node_get_output_channels(pNode, outputBusIndex) != ma_node_get_input_channels(pOtherNode, otherNodeInputBusIndex)) { return MA_INVALID_OPERATION; /* Channel count is incompatible. */ } /* This will deal with detaching if the output bus is already attached to something. */ ma_node_input_bus_attach(&pOtherNodeBase->pInputBuses[otherNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex], pOtherNode, otherNodeInputBusIndex); return MA_SUCCESS; } MA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return MA_INVALID_ARGS; /* Invalid bus index. */ } return ma_node_output_bus_set_volume(&pNodeBase->pOutputBuses[outputBusIndex], volume); } MA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNodeBase == NULL) { return 0; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex]); } MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_i32(&pNodeBase->state, state); return MA_SUCCESS; } MA_API ma_node_state ma_node_get_state(const ma_node* pNode) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNodeBase == NULL) { return ma_node_state_stopped; } return (ma_node_state)ma_atomic_load_i32(&pNodeBase->state); } MA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime) { if (pNode == NULL) { return MA_INVALID_ARGS; } /* Validation check for safety since we'll be using this as an index into stateTimes[]. */ if (state != ma_node_state_started && state != ma_node_state_stopped) { return MA_INVALID_ARGS; } ma_atomic_exchange_64(&((ma_node_base*)pNode)->stateTimes[state], globalTime); return MA_SUCCESS; } MA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state) { if (pNode == NULL) { return 0; } /* Validation check for safety since we'll be using this as an index into stateTimes[]. */ if (state != ma_node_state_started && state != ma_node_state_stopped) { return 0; } return ma_atomic_load_64(&((ma_node_base*)pNode)->stateTimes[state]); } MA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime) { if (pNode == NULL) { return ma_node_state_stopped; } return ma_node_get_state_by_time_range(pNode, globalTime, globalTime); } MA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd) { ma_node_state state; if (pNode == NULL) { return ma_node_state_stopped; } state = ma_node_get_state(pNode); /* An explicitly stopped node is always stopped. */ if (state == ma_node_state_stopped) { return ma_node_state_stopped; } /* Getting here means the node is marked as started, but it may still not be truly started due to its start time not having been reached yet. Also, the stop time may have also been reached in which case it'll be considered stopped. */ if (ma_node_get_state_time(pNode, ma_node_state_started) > globalTimeBeg) { return ma_node_state_stopped; /* Start time has not yet been reached. */ } if (ma_node_get_state_time(pNode, ma_node_state_stopped) <= globalTimeEnd) { return ma_node_state_stopped; /* Stop time has been reached. */ } /* Getting here means the node is marked as started and is within its start/stop times. */ return ma_node_state_started; } MA_API ma_uint64 ma_node_get_time(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ma_atomic_load_64(&((ma_node_base*)pNode)->localTime); } MA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime) { if (pNode == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_64(&((ma_node_base*)pNode)->localTime, localTime); return MA_SUCCESS; } static void ma_node_process_pcm_frames_internal(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_base* pNodeBase = (ma_node_base*)pNode; MA_ASSERT(pNode != NULL); if (pNodeBase->vtable->onProcess) { pNodeBase->vtable->onProcess(pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut); } } static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_result result = MA_SUCCESS; ma_uint32 iInputBus; ma_uint32 iOutputBus; ma_uint32 inputBusCount; ma_uint32 outputBusCount; ma_uint32 totalFramesRead = 0; float* ppFramesIn[MA_MAX_NODE_BUS_COUNT]; float* ppFramesOut[MA_MAX_NODE_BUS_COUNT]; ma_uint64 globalTimeBeg; ma_uint64 globalTimeEnd; ma_uint64 startTime; ma_uint64 stopTime; ma_uint32 timeOffsetBeg; ma_uint32 timeOffsetEnd; ma_uint32 frameCountIn; ma_uint32 frameCountOut; /* pFramesRead is mandatory. It must be used to determine how many frames were read. It's normal and expected that the number of frames read may be different to that requested. Therefore, the caller must look at this value to correctly determine how many frames were read. */ MA_ASSERT(pFramesRead != NULL); /* <-- If you've triggered this assert, you're using this function wrong. You *must* use this variable and inspect it after the call returns. */ if (pFramesRead == NULL) { return MA_INVALID_ARGS; } *pFramesRead = 0; /* Safety. */ if (pNodeBase == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNodeBase)) { return MA_INVALID_ARGS; /* Invalid output bus index. */ } /* Don't do anything if we're in a stopped state. */ if (ma_node_get_state_by_time_range(pNode, globalTime, globalTime + frameCount) != ma_node_state_started) { return MA_SUCCESS; /* We're in a stopped state. This is not an error - we just need to not read anything. */ } globalTimeBeg = globalTime; globalTimeEnd = globalTime + frameCount; startTime = ma_node_get_state_time(pNode, ma_node_state_started); stopTime = ma_node_get_state_time(pNode, ma_node_state_stopped); /* At this point we know that we are inside our start/stop times. However, we may need to adjust our frame count and output pointer to accommodate since we could be straddling the time period that this function is getting called for. It's possible (and likely) that the start time does not line up with the output buffer. We therefore need to offset it by a number of frames to accommodate. The same thing applies for the stop time. */ timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0; timeOffsetEnd = (globalTimeEnd > stopTime) ? (ma_uint32)(globalTimeEnd - stopTime) : 0; /* Trim based on the start offset. We need to silence the start of the buffer. */ if (timeOffsetBeg > 0) { ma_silence_pcm_frames(pFramesOut, timeOffsetBeg, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex)); pFramesOut += timeOffsetBeg * ma_node_get_output_channels(pNode, outputBusIndex); frameCount -= timeOffsetBeg; } /* Trim based on the end offset. We don't need to silence the tail section because we'll just have a reduced value written to pFramesRead. */ if (timeOffsetEnd > 0) { frameCount -= timeOffsetEnd; } /* We run on different paths depending on the bus counts. */ inputBusCount = ma_node_get_input_bus_count(pNode); outputBusCount = ma_node_get_output_bus_count(pNode); /* Run a simplified path when there are no inputs and one output. In this case there's nothing to actually read and we can go straight to output. This is a very common scenario because the vast majority of data source nodes will use this setup so this optimization I think is worthwhile. */ if (inputBusCount == 0 && outputBusCount == 1) { /* Fast path. No need to read from input and no need for any caching. */ frameCountIn = 0; frameCountOut = frameCount; /* Just read as much as we can. The callback will return what was actually read. */ ppFramesOut[0] = pFramesOut; /* If it's a passthrough we won't be expecting the callback to output anything, so we'll need to pre-silence the output buffer. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex)); } ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut); totalFramesRead = frameCountOut; } else { /* Slow path. Need to read input data. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { /* Fast path. We're running a passthrough. We need to read directly into the output buffer, but still fire the callback so that event handling and trigger nodes can do their thing. Since it's a passthrough there's no need for any kind of caching logic. */ MA_ASSERT(outputBusCount == inputBusCount); MA_ASSERT(outputBusCount == 1); MA_ASSERT(outputBusIndex == 0); /* We just read directly from input bus to output buffer, and then afterwards fire the callback. */ ppFramesOut[0] = pFramesOut; ppFramesIn[0] = ppFramesOut[0]; result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[0], ppFramesIn[0], frameCount, &totalFramesRead, globalTime); if (result == MA_SUCCESS) { /* Even though it's a passthrough, we still need to fire the callback. */ frameCountIn = totalFramesRead; frameCountOut = totalFramesRead; if (totalFramesRead > 0) { ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut); /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Explicit cast to silence the warning. */ } /* A passthrough should never have modified the input and output frame counts. If you're triggering these asserts you need to fix your processing callback. */ MA_ASSERT(frameCountIn == totalFramesRead); MA_ASSERT(frameCountOut == totalFramesRead); } } else { /* Slow path. Need to do caching. */ ma_uint32 framesToProcessIn; ma_uint32 framesToProcessOut; ma_bool32 consumeNullInput = MA_FALSE; /* We use frameCount as a basis for the number of frames to read since that's what's being requested, however we still need to clamp it to whatever can fit in the cache. This will also be used as the basis for determining how many input frames to read. This is not ideal because it can result in too many input frames being read which introduces latency. To solve this, nodes can implement an optional callback called onGetRequiredInputFrameCount which is used as hint to miniaudio as to how many input frames it needs to read at a time. This callback is completely optional, and if it's not set, miniaudio will assume `frameCount`. This function will be called multiple times for each period of time, once for each output node. We cannot read from each input node each time this function is called. Instead we need to check whether or not this is first output bus to be read from for this time period, and if so, read from our input data. To determine whether or not we're ready to read data, we check a flag. There will be one flag for each output. When the flag is set, it means data has been read previously and that we're ready to advance time forward for our input nodes by reading fresh data. */ framesToProcessOut = frameCount; if (framesToProcessOut > pNodeBase->cachedDataCapInFramesPerBus) { framesToProcessOut = pNodeBase->cachedDataCapInFramesPerBus; } framesToProcessIn = frameCount; if (pNodeBase->vtable->onGetRequiredInputFrameCount) { pNodeBase->vtable->onGetRequiredInputFrameCount(pNode, framesToProcessOut, &framesToProcessIn); /* <-- It does not matter if this fails. */ } if (framesToProcessIn > pNodeBase->cachedDataCapInFramesPerBus) { framesToProcessIn = pNodeBase->cachedDataCapInFramesPerBus; } MA_ASSERT(framesToProcessIn <= 0xFFFF); MA_ASSERT(framesToProcessOut <= 0xFFFF); if (ma_node_output_bus_has_read(&pNodeBase->pOutputBuses[outputBusIndex])) { /* Getting here means we need to do another round of processing. */ pNodeBase->cachedFrameCountOut = 0; for (;;) { frameCountOut = 0; /* We need to prepare our output frame pointers for processing. In the same iteration we need to mark every output bus as unread so that future calls to this function for different buses for the current time period don't pull in data when they should instead be reading from cache. */ for (iOutputBus = 0; iOutputBus < outputBusCount; iOutputBus += 1) { ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[iOutputBus], MA_FALSE); /* <-- This is what tells the next calls to this function for other output buses for this time period to read from cache instead of pulling in more data. */ ppFramesOut[iOutputBus] = ma_node_get_cached_output_ptr(pNode, iOutputBus); } /* We only need to read from input buses if there isn't already some data in the cache. */ if (pNodeBase->cachedFrameCountIn == 0) { ma_uint32 maxFramesReadIn = 0; /* Here is where we pull in data from the input buses. This is what will trigger an advance in time. */ for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) { ma_uint32 framesRead; /* The first thing to do is get the offset within our bulk allocation to store this input data. */ ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus); /* Once we've determined our destination pointer we can read. Note that we must inspect the number of frames read and fill any leftovers with silence for safety. */ result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[iInputBus], ppFramesIn[iInputBus], framesToProcessIn, &framesRead, globalTime); if (result != MA_SUCCESS) { /* It doesn't really matter if we fail because we'll just fill with silence. */ framesRead = 0; /* Just for safety, but I don't think it's really needed. */ } /* TODO: Minor optimization opportunity here. If no frames were read and the buffer is already filled with silence, no need to re-silence it. */ /* Any leftover frames need to silenced for safety. */ if (framesRead < framesToProcessIn) { ma_silence_pcm_frames(ppFramesIn[iInputBus] + (framesRead * ma_node_get_input_channels(pNodeBase, iInputBus)), (framesToProcessIn - framesRead), ma_format_f32, ma_node_get_input_channels(pNodeBase, iInputBus)); } maxFramesReadIn = ma_max(maxFramesReadIn, framesRead); } /* This was a fresh load of input data so reset our consumption counter. */ pNodeBase->consumedFrameCountIn = 0; /* We don't want to keep processing if there's nothing to process, so set the number of cached input frames to the maximum number we read from each attachment (the lesser will be padded with silence). If we didn't read anything, this will be set to 0 and the entire buffer will have been assigned to silence. This being equal to 0 is an important property for us because it allows us to detect when NULL can be passed into the processing callback for the input buffer for the purpose of continuous processing. */ pNodeBase->cachedFrameCountIn = (ma_uint16)maxFramesReadIn; } else { /* We don't need to read anything, but we do need to prepare our input frame pointers. */ for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) { ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus) + (pNodeBase->consumedFrameCountIn * ma_node_get_input_channels(pNodeBase, iInputBus)); } } /* At this point we have our input data so now we need to do some processing. Sneaky little optimization here - we can set the pointer to the output buffer for this output bus so that the final copy into the output buffer is done directly by onProcess(). */ if (pFramesOut != NULL) { ppFramesOut[outputBusIndex] = ma_offset_pcm_frames_ptr_f32(pFramesOut, pNodeBase->cachedFrameCountOut, ma_node_get_output_channels(pNode, outputBusIndex)); } /* Give the processing function the entire capacity of the output buffer. */ frameCountOut = (framesToProcessOut - pNodeBase->cachedFrameCountOut); /* We need to treat nodes with continuous processing a little differently. For these ones, we always want to fire the callback with the requested number of frames, regardless of pNodeBase->cachedFrameCountIn, which could be 0. Also, we want to check if we can pass in NULL for the input buffer to the callback. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_CONTINUOUS_PROCESSING) != 0) { /* We're using continuous processing. Make sure we specify the whole frame count at all times. */ frameCountIn = framesToProcessIn; /* Give the processing function as much input data as we've got in the buffer, including any silenced padding from short reads. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_ALLOW_NULL_INPUT) != 0 && pNodeBase->consumedFrameCountIn == 0 && pNodeBase->cachedFrameCountIn == 0) { consumeNullInput = MA_TRUE; } else { consumeNullInput = MA_FALSE; } /* Since we're using continuous processing we're always passing in a full frame count regardless of how much input data was read. If this is greater than what we read as input, we'll end up with an underflow. We instead need to make sure our cached frame count is set to the number of frames we'll be passing to the data callback. Not doing this will result in an underflow when we "consume" the cached data later on. Note that this check needs to be done after the "consumeNullInput" check above because we use the property of cachedFrameCountIn being 0 to determine whether or not we should be passing in a null pointer to the processing callback for when the node is configured with MA_NODE_FLAG_ALLOW_NULL_INPUT. */ if (pNodeBase->cachedFrameCountIn < (ma_uint16)frameCountIn) { pNodeBase->cachedFrameCountIn = (ma_uint16)frameCountIn; } } else { frameCountIn = pNodeBase->cachedFrameCountIn; /* Give the processing function as much valid input data as we've got. */ consumeNullInput = MA_FALSE; } /* Process data slightly differently depending on whether or not we're consuming NULL input (checked just above). */ if (consumeNullInput) { ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut); } else { /* We want to skip processing if there's no input data, but we can only do that safely if we know that there is no chance of any output frames being produced. If continuous processing is being used, this won't be a problem because the input frame count will always be non-0. However, if continuous processing is *not* enabled and input and output data is processed at different rates, we still need to process that last input frame because there could be a few excess output frames needing to be produced from cached data. The `MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES` flag is used as the indicator for determining whether or not we need to process the node even when there are no input frames available right now. */ if (frameCountIn > 0 || (pNodeBase->vtable->flags & MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES) != 0) { ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut); /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Explicit cast to silence the warning. */ } else { frameCountOut = 0; /* No data was processed. */ } } /* Thanks to our sneaky optimization above we don't need to do any data copying directly into the output buffer - the onProcess() callback just did that for us. We do, however, need to apply the number of input and output frames that were processed. Note that due to continuous processing above, we need to do explicit checks here. If we just consumed a NULL input buffer it means that no actual input data was processed from the internal buffers and we don't want to be modifying any counters. */ if (consumeNullInput == MA_FALSE) { pNodeBase->consumedFrameCountIn += (ma_uint16)frameCountIn; pNodeBase->cachedFrameCountIn -= (ma_uint16)frameCountIn; } /* The cached output frame count is always equal to what we just read. */ pNodeBase->cachedFrameCountOut += (ma_uint16)frameCountOut; /* If we couldn't process any data, we're done. The loop needs to be terminated here or else we'll get stuck in a loop. */ if (pNodeBase->cachedFrameCountOut == framesToProcessOut || (frameCountOut == 0 && frameCountIn == 0)) { break; } } } else { /* We're not needing to read anything from the input buffer so just read directly from our already-processed data. */ if (pFramesOut != NULL) { ma_copy_pcm_frames(pFramesOut, ma_node_get_cached_output_ptr(pNodeBase, outputBusIndex), pNodeBase->cachedFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNodeBase, outputBusIndex)); } } /* The number of frames read is always equal to the number of cached output frames. */ totalFramesRead = pNodeBase->cachedFrameCountOut; /* Now that we've read the data, make sure our read flag is set. */ ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[outputBusIndex], MA_TRUE); } } /* Apply volume, if necessary. */ ma_apply_volume_factor_f32(pFramesOut, totalFramesRead * ma_node_get_output_channels(pNodeBase, outputBusIndex), ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex])); /* Advance our local time forward. */ ma_atomic_fetch_add_64(&pNodeBase->localTime, (ma_uint64)totalFramesRead); *pFramesRead = totalFramesRead + timeOffsetBeg; /* Must include the silenced section at the start of the buffer. */ return result; } /* Data source node. */ MA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource) { ma_data_source_node_config config; MA_ZERO_OBJECT(&config); config.nodeConfig = ma_node_config_init(); config.pDataSource = pDataSource; return config; } static void ma_data_source_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_data_source_node* pDataSourceNode = (ma_data_source_node*)pNode; ma_format format; ma_uint32 channels; ma_uint32 frameCount; ma_uint64 framesRead = 0; MA_ASSERT(pDataSourceNode != NULL); MA_ASSERT(pDataSourceNode->pDataSource != NULL); MA_ASSERT(ma_node_get_input_bus_count(pDataSourceNode) == 0); MA_ASSERT(ma_node_get_output_bus_count(pDataSourceNode) == 1); /* We don't want to read from ppFramesIn at all. Instead we read from the data source. */ (void)ppFramesIn; (void)pFrameCountIn; frameCount = *pFrameCountOut; /* miniaudio should never be calling this with a frame count of zero. */ MA_ASSERT(frameCount > 0); if (ma_data_source_get_data_format(pDataSourceNode->pDataSource, &format, &channels, NULL, NULL, 0) == MA_SUCCESS) { /* <-- Don't care about sample rate here. */ /* The node graph system requires samples be in floating point format. This is checked in ma_data_source_node_init(). */ MA_ASSERT(format == ma_format_f32); (void)format; /* Just to silence some static analysis tools. */ ma_data_source_read_pcm_frames(pDataSourceNode->pDataSource, ppFramesOut[0], frameCount, &framesRead); } *pFrameCountOut = (ma_uint32)framesRead; } static ma_node_vtable g_ma_data_source_node_vtable = { ma_data_source_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 0, /* 0 input buses. */ 1, /* 1 output bus. */ 0 }; MA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode) { ma_result result; ma_format format; /* For validating the format, which must be ma_format_f32. */ ma_uint32 channels; /* For specifying the channel count of the output bus. */ ma_node_config baseConfig; if (pDataSourceNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSourceNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pConfig->pDataSource, &format, &channels, NULL, NULL, 0); /* Don't care about sample rate. This will check pDataSource for NULL. */ if (result != MA_SUCCESS) { return result; } MA_ASSERT(format == ma_format_f32); /* <-- If you've triggered this it means your data source is not outputting floating-point samples. You must configure your data source to use ma_format_f32. */ if (format != ma_format_f32) { return MA_INVALID_ARGS; /* Invalid format. */ } /* The channel count is defined by the data source. If the caller has manually changed the channels we just ignore it. */ baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_data_source_node_vtable; /* Explicitly set the vtable here to prevent callers from setting it incorrectly. */ /* The channel count is defined by the data source. It is invalid for the caller to manually set the channel counts in the config. `ma_data_source_node_config_init()` will have defaulted the channel count pointer to NULL which is how it must remain. If you trigger any of these asserts it means you're explicitly setting the channel count. Instead, configure the output channel count of your data source to be the necessary channel count. */ if (baseConfig.pOutputChannels != NULL) { return MA_INVALID_ARGS; } baseConfig.pOutputChannels = &channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDataSourceNode->base); if (result != MA_SUCCESS) { return result; } pDataSourceNode->pDataSource = pConfig->pDataSource; return MA_SUCCESS; } MA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_uninit(&pDataSourceNode->base, pAllocationCallbacks); } MA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping) { if (pDataSourceNode == NULL) { return MA_INVALID_ARGS; } return ma_data_source_set_looping(pDataSourceNode->pDataSource, isLooping); } MA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode) { if (pDataSourceNode == NULL) { return MA_FALSE; } return ma_data_source_is_looping(pDataSourceNode->pDataSource); } /* Splitter Node. */ MA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels) { ma_splitter_node_config config; MA_ZERO_OBJECT(&config); config.nodeConfig = ma_node_config_init(); config.channels = channels; config.outputBusCount = 2; return config; } static void ma_splitter_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iOutputBus; ma_uint32 channels; MA_ASSERT(pNodeBase != NULL); MA_ASSERT(ma_node_get_input_bus_count(pNodeBase) == 1); /* We don't need to consider the input frame count - it'll be the same as the output frame count and we process everything. */ (void)pFrameCountIn; /* NOTE: This assumes the same number of channels for all inputs and outputs. This was checked in ma_splitter_node_init(). */ channels = ma_node_get_input_channels(pNodeBase, 0); /* Splitting is just copying the first input bus and copying it over to each output bus. */ for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) { ma_copy_pcm_frames(ppFramesOut[iOutputBus], ppFramesIn[0], *pFrameCountOut, ma_format_f32, channels); } } static ma_node_vtable g_ma_splitter_node_vtable = { ma_splitter_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* 1 input bus. */ MA_NODE_BUS_COUNT_UNKNOWN, /* The output bus count is specified on a per-node basis. */ 0 }; MA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode) { ma_result result; ma_node_config baseConfig; ma_uint32 pInputChannels[1]; ma_uint32 pOutputChannels[MA_MAX_NODE_BUS_COUNT]; ma_uint32 iOutputBus; if (pSplitterNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSplitterNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->outputBusCount > MA_MAX_NODE_BUS_COUNT) { return MA_INVALID_ARGS; /* Too many output buses. */ } /* Splitters require the same number of channels between inputs and outputs. */ pInputChannels[0] = pConfig->channels; for (iOutputBus = 0; iOutputBus < pConfig->outputBusCount; iOutputBus += 1) { pOutputChannels[iOutputBus] = pConfig->channels; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_splitter_node_vtable; baseConfig.pInputChannels = pInputChannels; baseConfig.pOutputChannels = pOutputChannels; baseConfig.outputBusCount = pConfig->outputBusCount; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pSplitterNode->base); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base node. */ } return MA_SUCCESS; } MA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_uninit(pSplitterNode, pAllocationCallbacks); } /* Biquad Node */ MA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2) { ma_biquad_node_config config; config.nodeConfig = ma_node_config_init(); config.biquad = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2); return config; } static void ma_biquad_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_biquad_process_pcm_frames(&pLPFNode->biquad, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_biquad_node_vtable = { ma_biquad_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->biquad.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_biquad_init(&pConfig->biquad, pAllocationCallbacks, &pNode->biquad); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_biquad_node_vtable; baseNodeConfig.pInputChannels = &pConfig->biquad.channels; baseNodeConfig.pOutputChannels = &pConfig->biquad.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; MA_ASSERT(pNode != NULL); return ma_biquad_reinit(pConfig, &pLPFNode->biquad); } MA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_biquad_uninit(&pLPFNode->biquad, pAllocationCallbacks); } /* Low Pass Filter Node */ MA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_lpf_node_config config; config.nodeConfig = ma_node_config_init(); config.lpf = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_lpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_lpf_process_pcm_frames(&pLPFNode->lpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_lpf_node_vtable = { ma_lpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->lpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_lpf_init(&pConfig->lpf, pAllocationCallbacks, &pNode->lpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_lpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->lpf.channels; baseNodeConfig.pOutputChannels = &pConfig->lpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_lpf_reinit(pConfig, &pLPFNode->lpf); } MA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_lpf_uninit(&pLPFNode->lpf, pAllocationCallbacks); } /* High Pass Filter Node */ MA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_hpf_node_config config; config.nodeConfig = ma_node_config_init(); config.hpf = ma_hpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_hpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_hpf_process_pcm_frames(&pHPFNode->hpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_hpf_node_vtable = { ma_hpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->hpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_hpf_init(&pConfig->hpf, pAllocationCallbacks, &pNode->hpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_hpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->hpf.channels; baseNodeConfig.pOutputChannels = &pConfig->hpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_hpf_reinit(pConfig, &pHPFNode->hpf); } MA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_hpf_uninit(&pHPFNode->hpf, pAllocationCallbacks); } /* Band Pass Filter Node */ MA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_bpf_node_config config; config.nodeConfig = ma_node_config_init(); config.bpf = ma_bpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_bpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_bpf_process_pcm_frames(&pBPFNode->bpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_bpf_node_vtable = { ma_bpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->bpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_bpf_init(&pConfig->bpf, pAllocationCallbacks, &pNode->bpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_bpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->bpf.channels; baseNodeConfig.pOutputChannels = &pConfig->bpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_bpf_reinit(pConfig, &pBPFNode->bpf); } MA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_bpf_uninit(&pBPFNode->bpf, pAllocationCallbacks); } /* Notching Filter Node */ MA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency) { ma_notch_node_config config; config.nodeConfig = ma_node_config_init(); config.notch = ma_notch2_config_init(ma_format_f32, channels, sampleRate, q, frequency); return config; } static void ma_notch_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_notch_node* pBPFNode = (ma_notch_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_notch2_process_pcm_frames(&pBPFNode->notch, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_notch_node_vtable = { ma_notch_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->notch.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_notch2_init(&pConfig->notch, pAllocationCallbacks, &pNode->notch); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_notch_node_vtable; baseNodeConfig.pInputChannels = &pConfig->notch.channels; baseNodeConfig.pOutputChannels = &pConfig->notch.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode) { ma_notch_node* pNotchNode = (ma_notch_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_notch2_reinit(pConfig, &pNotchNode->notch); } MA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_notch_node* pNotchNode = (ma_notch_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_notch2_uninit(&pNotchNode->notch, pAllocationCallbacks); } /* Peaking Filter Node */ MA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_peak_node_config config; config.nodeConfig = ma_node_config_init(); config.peak = ma_peak2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_peak_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_peak_node* pBPFNode = (ma_peak_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_peak2_process_pcm_frames(&pBPFNode->peak, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_peak_node_vtable = { ma_peak_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->peak.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_peak2_init(&pConfig->peak, pAllocationCallbacks, &pNode->peak); if (result != MA_SUCCESS) { ma_node_uninit(pNode, pAllocationCallbacks); return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_peak_node_vtable; baseNodeConfig.pInputChannels = &pConfig->peak.channels; baseNodeConfig.pOutputChannels = &pConfig->peak.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode) { ma_peak_node* pPeakNode = (ma_peak_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_peak2_reinit(pConfig, &pPeakNode->peak); } MA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_peak_node* pPeakNode = (ma_peak_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_peak2_uninit(&pPeakNode->peak, pAllocationCallbacks); } /* Low Shelf Filter Node */ MA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_loshelf_node_config config; config.nodeConfig = ma_node_config_init(); config.loshelf = ma_loshelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_loshelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_loshelf_node* pBPFNode = (ma_loshelf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_loshelf2_process_pcm_frames(&pBPFNode->loshelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_loshelf_node_vtable = { ma_loshelf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->loshelf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_loshelf2_init(&pConfig->loshelf, pAllocationCallbacks, &pNode->loshelf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_loshelf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->loshelf.channels; baseNodeConfig.pOutputChannels = &pConfig->loshelf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode) { ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_loshelf2_reinit(pConfig, &pLoshelfNode->loshelf); } MA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_loshelf2_uninit(&pLoshelfNode->loshelf, pAllocationCallbacks); } /* High Shelf Filter Node */ MA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_hishelf_node_config config; config.nodeConfig = ma_node_config_init(); config.hishelf = ma_hishelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_hishelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_hishelf_node* pBPFNode = (ma_hishelf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_hishelf2_process_pcm_frames(&pBPFNode->hishelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_hishelf_node_vtable = { ma_hishelf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->hishelf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_hishelf2_init(&pConfig->hishelf, pAllocationCallbacks, &pNode->hishelf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_hishelf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->hishelf.channels; baseNodeConfig.pOutputChannels = &pConfig->hishelf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode) { ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_hishelf2_reinit(pConfig, &pHishelfNode->hishelf); } MA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_hishelf2_uninit(&pHishelfNode->hishelf, pAllocationCallbacks); } MA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay) { ma_delay_node_config config; config.nodeConfig = ma_node_config_init(); config.delay = ma_delay_config_init(channels, sampleRate, delayInFrames, decay); return config; } static void ma_delay_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_delay_node* pDelayNode = (ma_delay_node*)pNode; (void)pFrameCountIn; ma_delay_process_pcm_frames(&pDelayNode->delay, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_delay_node_vtable = { ma_delay_node_process_pcm_frames, NULL, 1, /* 1 input channels. */ 1, /* 1 output channel. */ MA_NODE_FLAG_CONTINUOUS_PROCESSING /* Delay requires continuous processing to ensure the tail get's processed. */ }; MA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode) { ma_result result; ma_node_config baseConfig; if (pDelayNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDelayNode); result = ma_delay_init(&pConfig->delay, pAllocationCallbacks, &pDelayNode->delay); if (result != MA_SUCCESS) { return result; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_delay_node_vtable; baseConfig.pInputChannels = &pConfig->delay.channels; baseConfig.pOutputChannels = &pConfig->delay.channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDelayNode->baseNode); if (result != MA_SUCCESS) { ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks); return result; } return result; } MA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks) { if (pDelayNode == NULL) { return; } /* The base node is always uninitialized first. */ ma_node_uninit(pDelayNode, pAllocationCallbacks); ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks); } MA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_wet(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_wet(&pDelayNode->delay); } MA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_dry(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_dry(&pDelayNode->delay); } MA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_decay(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_decay(&pDelayNode->delay); } #endif /* MA_NO_NODE_GRAPH */ /* SECTION: miniaudio_engine.c */ #if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH) /************************************************************************************************************************************************************** Engine **************************************************************************************************************************************************************/ #define MA_SEEK_TARGET_NONE (~(ma_uint64)0) static void ma_sound_set_at_end(ma_sound* pSound, ma_bool32 atEnd) { MA_ASSERT(pSound != NULL); ma_atomic_exchange_32(&pSound->atEnd, atEnd); /* Fire any callbacks or events. */ if (atEnd) { if (pSound->endCallback != NULL) { pSound->endCallback(pSound->pEndCallbackUserData, pSound); } } } static ma_bool32 ma_sound_get_at_end(const ma_sound* pSound) { MA_ASSERT(pSound != NULL); return ma_atomic_load_32(&pSound->atEnd); } MA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags) { ma_engine_node_config config; MA_ZERO_OBJECT(&config); config.pEngine = pEngine; config.type = type; config.isPitchDisabled = (flags & MA_SOUND_FLAG_NO_PITCH) != 0; config.isSpatializationDisabled = (flags & MA_SOUND_FLAG_NO_SPATIALIZATION) != 0; config.monoExpansionMode = pEngine->monoExpansionMode; return config; } static void ma_engine_node_update_pitch_if_required(ma_engine_node* pEngineNode) { ma_bool32 isUpdateRequired = MA_FALSE; float newPitch; MA_ASSERT(pEngineNode != NULL); newPitch = ma_atomic_load_explicit_f32(&pEngineNode->pitch, ma_atomic_memory_order_acquire); if (pEngineNode->oldPitch != newPitch) { pEngineNode->oldPitch = newPitch; isUpdateRequired = MA_TRUE; } if (pEngineNode->oldDopplerPitch != pEngineNode->spatializer.dopplerPitch) { pEngineNode->oldDopplerPitch = pEngineNode->spatializer.dopplerPitch; isUpdateRequired = MA_TRUE; } if (isUpdateRequired) { float basePitch = (float)pEngineNode->sampleRate / ma_engine_get_sample_rate(pEngineNode->pEngine); ma_linear_resampler_set_rate_ratio(&pEngineNode->resampler, basePitch * pEngineNode->oldPitch * pEngineNode->oldDopplerPitch); } } static ma_bool32 ma_engine_node_is_pitching_enabled(const ma_engine_node* pEngineNode) { MA_ASSERT(pEngineNode != NULL); /* Don't try to be clever by skipping resampling in the pitch=1 case or else you'll glitch when moving away from 1. */ return !ma_atomic_load_explicit_32(&pEngineNode->isPitchDisabled, ma_atomic_memory_order_acquire); } static ma_bool32 ma_engine_node_is_spatialization_enabled(const ma_engine_node* pEngineNode) { MA_ASSERT(pEngineNode != NULL); return !ma_atomic_load_explicit_32(&pEngineNode->isSpatializationDisabled, ma_atomic_memory_order_acquire); } static ma_uint64 ma_engine_node_get_required_input_frame_count(const ma_engine_node* pEngineNode, ma_uint64 outputFrameCount) { ma_uint64 inputFrameCount = 0; if (ma_engine_node_is_pitching_enabled(pEngineNode)) { ma_result result = ma_linear_resampler_get_required_input_frame_count(&pEngineNode->resampler, outputFrameCount, &inputFrameCount); if (result != MA_SUCCESS) { inputFrameCount = 0; } } else { inputFrameCount = outputFrameCount; /* No resampling, so 1:1. */ } return inputFrameCount; } static ma_result ma_engine_node_set_volume(ma_engine_node* pEngineNode, float volume) { if (pEngineNode == NULL) { return MA_INVALID_ARGS; } ma_atomic_float_set(&pEngineNode->volume, volume); /* If we're not smoothing we should bypass the volume gainer entirely. */ if (pEngineNode->volumeSmoothTimeInPCMFrames == 0) { /* We should always have an active spatializer because it can be enabled and disabled dynamically. We can just use that for holding our volume. */ ma_spatializer_set_master_volume(&pEngineNode->spatializer, volume); } else { /* We're using volume smoothing, so apply the master volume to the gainer. */ ma_gainer_set_gain(&pEngineNode->volumeGainer, volume); } return MA_SUCCESS; } static ma_result ma_engine_node_get_volume(const ma_engine_node* pEngineNode, float* pVolume) { if (pVolume == NULL) { return MA_INVALID_ARGS; } *pVolume = 0.0f; if (pEngineNode == NULL) { return MA_INVALID_ARGS; } *pVolume = ma_atomic_float_get((ma_atomic_float*)&pEngineNode->volume); return MA_SUCCESS; } static void ma_engine_node_process_pcm_frames__general(ma_engine_node* pEngineNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_uint32 frameCountIn; ma_uint32 frameCountOut; ma_uint32 totalFramesProcessedIn; ma_uint32 totalFramesProcessedOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_bool32 isPitchingEnabled; ma_bool32 isFadingEnabled; ma_bool32 isSpatializationEnabled; ma_bool32 isPanningEnabled; ma_bool32 isVolumeSmoothingEnabled; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; channelsIn = ma_spatializer_get_input_channels(&pEngineNode->spatializer); channelsOut = ma_spatializer_get_output_channels(&pEngineNode->spatializer); totalFramesProcessedIn = 0; totalFramesProcessedOut = 0; /* Update the fader if applicable. */ { ma_uint64 fadeLengthInFrames = ma_atomic_uint64_get(&pEngineNode->fadeSettings.fadeLengthInFrames); if (fadeLengthInFrames != ~(ma_uint64)0) { float fadeVolumeBeg = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeBeg); float fadeVolumeEnd = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeEnd); ma_int64 fadeStartOffsetInFrames = (ma_int64)ma_atomic_uint64_get(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames); if (fadeStartOffsetInFrames == (ma_int64)(~(ma_uint64)0)) { fadeStartOffsetInFrames = 0; } else { fadeStartOffsetInFrames -= ma_engine_get_time_in_pcm_frames(pEngineNode->pEngine); } ma_fader_set_fade_ex(&pEngineNode->fader, fadeVolumeBeg, fadeVolumeEnd, fadeLengthInFrames, fadeStartOffsetInFrames); /* Reset the fade length so we don't erroneously apply it again. */ ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, ~(ma_uint64)0); } } isPitchingEnabled = ma_engine_node_is_pitching_enabled(pEngineNode); isFadingEnabled = pEngineNode->fader.volumeBeg != 1 || pEngineNode->fader.volumeEnd != 1; isSpatializationEnabled = ma_engine_node_is_spatialization_enabled(pEngineNode); isPanningEnabled = pEngineNode->panner.pan != 0 && channelsOut != 1; isVolumeSmoothingEnabled = pEngineNode->volumeSmoothTimeInPCMFrames > 0; /* Keep going while we've still got data available for processing. */ while (totalFramesProcessedOut < frameCountOut) { /* We need to process in a specific order. We always do resampling first because it's likely we're going to be increasing the channel count after spatialization. Also, I want to do fading based on the output sample rate. We'll first read into a buffer from the resampler. Then we'll do all processing that operates on the on the input channel count. We'll then get the spatializer to output to the output buffer and then do all effects from that point directly in the output buffer in-place. Note that we're always running the resampler if pitching is enabled, even when the pitch is 1. If we try to be clever and skip resampling when the pitch is 1, we'll get a glitch when we move away from 1, back to 1, and then away from 1 again. We'll want to implement any pitch=1 optimizations in the resampler itself. There's a small optimization here that we'll utilize since it might be a fairly common case. When the input and output channel counts are the same, we'll read straight into the output buffer from the resampler and do everything in-place. */ const float* pRunningFramesIn; float* pRunningFramesOut; float* pWorkingBuffer; /* This is the buffer that we'll be processing frames in. This is in input channels. */ float temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE / sizeof(float)]; ma_uint32 tempCapInFrames = ma_countof(temp) / channelsIn; ma_uint32 framesAvailableIn; ma_uint32 framesAvailableOut; ma_uint32 framesJustProcessedIn; ma_uint32 framesJustProcessedOut; ma_bool32 isWorkingBufferValid = MA_FALSE; framesAvailableIn = frameCountIn - totalFramesProcessedIn; framesAvailableOut = frameCountOut - totalFramesProcessedOut; pRunningFramesIn = ma_offset_pcm_frames_const_ptr_f32(ppFramesIn[0], totalFramesProcessedIn, channelsIn); pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesProcessedOut, channelsOut); if (channelsIn == channelsOut) { /* Fast path. Channel counts are the same. No need for an intermediary input buffer. */ pWorkingBuffer = pRunningFramesOut; } else { /* Slow path. Channel counts are different. Need to use an intermediary input buffer. */ pWorkingBuffer = temp; if (framesAvailableOut > tempCapInFrames) { framesAvailableOut = tempCapInFrames; } } /* First is resampler. */ if (isPitchingEnabled) { ma_uint64 resampleFrameCountIn = framesAvailableIn; ma_uint64 resampleFrameCountOut = framesAvailableOut; ma_linear_resampler_process_pcm_frames(&pEngineNode->resampler, pRunningFramesIn, &resampleFrameCountIn, pWorkingBuffer, &resampleFrameCountOut); isWorkingBufferValid = MA_TRUE; framesJustProcessedIn = (ma_uint32)resampleFrameCountIn; framesJustProcessedOut = (ma_uint32)resampleFrameCountOut; } else { framesJustProcessedIn = ma_min(framesAvailableIn, framesAvailableOut); framesJustProcessedOut = framesJustProcessedIn; /* When no resampling is being performed, the number of output frames is the same as input frames. */ } /* Fading. */ if (isFadingEnabled) { if (isWorkingBufferValid) { ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut); /* In-place processing. */ } else { ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut); isWorkingBufferValid = MA_TRUE; } } /* If we're using smoothing, we won't be applying volume via the spatializer, but instead from a ma_gainer. In this case we'll want to apply our volume now. */ if (isVolumeSmoothingEnabled) { if (isWorkingBufferValid) { ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut); } else { ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut); isWorkingBufferValid = MA_TRUE; } } /* If at this point we still haven't actually done anything with the working buffer we need to just read straight from the input buffer. */ if (isWorkingBufferValid == MA_FALSE) { pWorkingBuffer = (float*)pRunningFramesIn; /* Naughty const cast, but it's safe at this point because we won't ever be writing to it from this point out. */ } /* Spatialization. */ if (isSpatializationEnabled) { ma_uint32 iListener; /* When determining the listener to use, we first check to see if the sound is pinned to a specific listener. If so, we use that. Otherwise we just use the closest listener. */ if (pEngineNode->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pEngineNode->pinnedListenerIndex < ma_engine_get_listener_count(pEngineNode->pEngine)) { iListener = pEngineNode->pinnedListenerIndex; } else { ma_vec3f spatializerPosition = ma_spatializer_get_position(&pEngineNode->spatializer); iListener = ma_engine_find_closest_listener(pEngineNode->pEngine, spatializerPosition.x, spatializerPosition.y, spatializerPosition.z); } ma_spatializer_process_pcm_frames(&pEngineNode->spatializer, &pEngineNode->pEngine->listeners[iListener], pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut); } else { /* No spatialization, but we still need to do channel conversion and master volume. */ float volume; ma_engine_node_get_volume(pEngineNode, &volume); /* Should never fail. */ if (channelsIn == channelsOut) { /* No channel conversion required. Just copy straight to the output buffer. */ if (isVolumeSmoothingEnabled) { /* Volume has already been applied. Just copy straight to the output buffer. */ ma_copy_pcm_frames(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, ma_format_f32, channelsOut); } else { /* Volume has not been applied yet. Copy and apply volume in the same pass. */ ma_copy_and_apply_volume_factor_f32(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, volume); } } else { /* Channel conversion required. TODO: Add support for channel maps here. */ ma_channel_map_apply_f32(pRunningFramesOut, NULL, channelsOut, pWorkingBuffer, NULL, channelsIn, framesJustProcessedOut, ma_channel_mix_mode_simple, pEngineNode->monoExpansionMode); /* If we're using smoothing, the volume will have already been applied. */ if (!isVolumeSmoothingEnabled) { ma_apply_volume_factor_f32(pRunningFramesOut, framesJustProcessedOut * channelsOut, volume); } } } /* At this point we can guarantee that the output buffer contains valid data. We can process everything in place now. */ /* Panning. */ if (isPanningEnabled) { ma_panner_process_pcm_frames(&pEngineNode->panner, pRunningFramesOut, pRunningFramesOut, framesJustProcessedOut); /* In-place processing. */ } /* We're done for this chunk. */ totalFramesProcessedIn += framesJustProcessedIn; totalFramesProcessedOut += framesJustProcessedOut; /* If we didn't process any output frames this iteration it means we've either run out of input data, or run out of room in the output buffer. */ if (framesJustProcessedOut == 0) { break; } } /* At this point we're done processing. */ *pFrameCountIn = totalFramesProcessedIn; *pFrameCountOut = totalFramesProcessedOut; } static void ma_engine_node_process_pcm_frames__sound(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { /* For sounds, we need to first read from the data source. Then we need to apply the engine effects (pan, pitch, fades, etc.). */ ma_result result = MA_SUCCESS; ma_sound* pSound = (ma_sound*)pNode; ma_uint32 frameCount = *pFrameCountOut; ma_uint32 totalFramesRead = 0; ma_format dataSourceFormat; ma_uint32 dataSourceChannels; ma_uint8 temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 tempCapInFrames; ma_uint64 seekTarget; /* This is a data source node which means no input buses. */ (void)ppFramesIn; (void)pFrameCountIn; /* If we're marked at the end we need to stop the sound and do nothing. */ if (ma_sound_at_end(pSound)) { ma_sound_stop(pSound); *pFrameCountOut = 0; return; } /* If we're seeking, do so now before reading. */ seekTarget = ma_atomic_load_64(&pSound->seekTarget); if (seekTarget != MA_SEEK_TARGET_NONE) { ma_data_source_seek_to_pcm_frame(pSound->pDataSource, seekTarget); /* Any time-dependant effects need to have their times updated. */ ma_node_set_time(pSound, seekTarget); ma_atomic_exchange_64(&pSound->seekTarget, MA_SEEK_TARGET_NONE); } /* We want to update the pitch once. For sounds, this can be either at the start or at the end. If we don't force this to only ever be updating once, we could end up in a situation where retrieving the required input frame count ends up being different to what we actually retrieve. What could happen is that the required input frame count is calculated, the pitch is update, and then this processing function is called resulting in a different number of input frames being processed. Do not call this in ma_engine_node_process_pcm_frames__general() or else you'll hit the aforementioned bug. */ ma_engine_node_update_pitch_if_required(&pSound->engineNode); /* For the convenience of the caller, we're doing to allow data sources to use non-floating-point formats and channel counts that differ from the main engine. */ result = ma_data_source_get_data_format(pSound->pDataSource, &dataSourceFormat, &dataSourceChannels, NULL, NULL, 0); if (result == MA_SUCCESS) { tempCapInFrames = sizeof(temp) / ma_get_bytes_per_frame(dataSourceFormat, dataSourceChannels); /* Keep reading until we've read as much as was requested or we reach the end of the data source. */ while (totalFramesRead < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesRead; ma_uint32 framesToRead; ma_uint64 framesJustRead; ma_uint32 frameCountIn; ma_uint32 frameCountOut; const float* pRunningFramesIn; float* pRunningFramesOut; /* The first thing we need to do is read into the temporary buffer. We can calculate exactly how many input frames we'll need after resampling. */ framesToRead = (ma_uint32)ma_engine_node_get_required_input_frame_count(&pSound->engineNode, framesRemaining); if (framesToRead > tempCapInFrames) { framesToRead = tempCapInFrames; } result = ma_data_source_read_pcm_frames(pSound->pDataSource, temp, framesToRead, &framesJustRead); /* If we reached the end of the sound we'll want to mark it as at the end and stop it. This should never be returned for looping sounds. */ if (result == MA_AT_END) { ma_sound_set_at_end(pSound, MA_TRUE); /* This will be set to false in ma_sound_start(). */ } pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesRead, ma_node_get_output_channels(pNode, 0)); frameCountIn = (ma_uint32)framesJustRead; frameCountOut = framesRemaining; /* Convert if necessary. */ if (dataSourceFormat == ma_format_f32) { /* Fast path. No data conversion necessary. */ pRunningFramesIn = (float*)temp; ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut); } else { /* Slow path. Need to do sample format conversion to f32. If we give the f32 buffer the same count as the first temp buffer, we're guaranteed it'll be large enough. */ float tempf32[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* Do not do `MA_DATA_CONVERTER_STACK_BUFFER_SIZE/sizeof(float)` here like we've done in other places. */ ma_convert_pcm_frames_format(tempf32, ma_format_f32, temp, dataSourceFormat, framesJustRead, dataSourceChannels, ma_dither_mode_none); /* Now that we have our samples in f32 format we can process like normal. */ pRunningFramesIn = tempf32; ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut); } /* We should have processed all of our input frames since we calculated the required number of input frames at the top. */ MA_ASSERT(frameCountIn == framesJustRead); totalFramesRead += (ma_uint32)frameCountOut; /* Safe cast. */ if (result != MA_SUCCESS || ma_sound_at_end(pSound)) { break; /* Might have reached the end. */ } } } *pFrameCountOut = totalFramesRead; } static void ma_engine_node_process_pcm_frames__group(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { /* Make sure the pitch is updated before trying to read anything. It's important that this is done only once and not in ma_engine_node_process_pcm_frames__general(). The reason for this is that ma_engine_node_process_pcm_frames__general() will call ma_engine_node_get_required_input_frame_count(), and if another thread modifies the pitch just after that call it can result in a glitch due to the input rate changing. */ ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode); /* For groups, the input data has already been read and we just need to apply the effect. */ ma_engine_node_process_pcm_frames__general((ma_engine_node*)pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut); } static ma_result ma_engine_node_get_required_input_frame_count__group(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount) { ma_uint64 inputFrameCount; MA_ASSERT(pInputFrameCount != NULL); /* Our pitch will affect this calculation. We need to update it. */ ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode); inputFrameCount = ma_engine_node_get_required_input_frame_count((ma_engine_node*)pNode, outputFrameCount); if (inputFrameCount > 0xFFFFFFFF) { inputFrameCount = 0xFFFFFFFF; /* Will never happen because miniaudio will only ever process in relatively small chunks. */ } *pInputFrameCount = (ma_uint32)inputFrameCount; return MA_SUCCESS; } static ma_node_vtable g_ma_engine_node_vtable__sound = { ma_engine_node_process_pcm_frames__sound, NULL, /* onGetRequiredInputFrameCount */ 0, /* Sounds are data source nodes which means they have zero inputs (their input is drawn from the data source itself). */ 1, /* Sounds have one output bus. */ 0 /* Default flags. */ }; static ma_node_vtable g_ma_engine_node_vtable__group = { ma_engine_node_process_pcm_frames__group, ma_engine_node_get_required_input_frame_count__group, 1, /* Groups have one input bus. */ 1, /* Groups have one output bus. */ MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES /* The engine node does resampling so should let miniaudio know about it. */ }; static ma_node_config ma_engine_node_base_node_config_init(const ma_engine_node_config* pConfig) { ma_node_config baseNodeConfig; if (pConfig->type == ma_engine_node_type_sound) { /* Sound. */ baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_engine_node_vtable__sound; baseNodeConfig.initialState = ma_node_state_stopped; /* Sounds are stopped by default. */ } else { /* Group. */ baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_engine_node_vtable__group; baseNodeConfig.initialState = ma_node_state_started; /* Groups are started by default. */ } return baseNodeConfig; } static ma_spatializer_config ma_engine_node_spatializer_config_init(const ma_node_config* pBaseNodeConfig) { return ma_spatializer_config_init(pBaseNodeConfig->pInputChannels[0], pBaseNodeConfig->pOutputChannels[0]); } typedef struct { size_t sizeInBytes; size_t baseNodeOffset; size_t resamplerOffset; size_t spatializerOffset; size_t gainerOffset; } ma_engine_node_heap_layout; static ma_result ma_engine_node_get_heap_layout(const ma_engine_node_config* pConfig, ma_engine_node_heap_layout* pHeapLayout) { ma_result result; size_t tempHeapSize; ma_node_config baseNodeConfig; ma_linear_resampler_config resamplerConfig; ma_spatializer_config spatializerConfig; ma_gainer_config gainerConfig; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT}; /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */ MA_ASSERT(pHeapLayout); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pEngine == NULL) { return MA_INVALID_ARGS; /* An engine must be specified. */ } pHeapLayout->sizeInBytes = 0; channelsIn = (pConfig->channelsIn != 0) ? pConfig->channelsIn : ma_engine_get_channels(pConfig->pEngine); channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine); /* Base node. */ baseNodeConfig = ma_engine_node_base_node_config_init(pConfig); baseNodeConfig.pInputChannels = &channelsIn; baseNodeConfig.pOutputChannels = &channelsOut; result = ma_node_get_heap_size(ma_engine_get_node_graph(pConfig->pEngine), &baseNodeConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the base node. */ } pHeapLayout->baseNodeOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Resmapler. */ resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, channelsIn, 1, 1); /* Input and output sample rates don't affect the calculation of the heap size. */ resamplerConfig.lpfOrder = 0; result = ma_linear_resampler_get_heap_size(&resamplerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the resampler. */ } pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Spatializer. */ spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig); if (spatializerConfig.channelsIn == 2) { spatializerConfig.pChannelMapIn = defaultStereoChannelMap; } result = ma_spatializer_get_heap_size(&spatializerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the spatializer. */ } pHeapLayout->spatializerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Gainer. Will not be used if we are not using smoothing. */ if (pConfig->volumeSmoothTimeInPCMFrames > 0) { gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames); result = ma_gainer_get_heap_size(&gainerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; } pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); } return MA_SUCCESS; } MA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_engine_node_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_engine_node_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode) { ma_result result; ma_engine_node_heap_layout heapLayout; ma_node_config baseNodeConfig; ma_linear_resampler_config resamplerConfig; ma_fader_config faderConfig; ma_spatializer_config spatializerConfig; ma_panner_config pannerConfig; ma_gainer_config gainerConfig; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT}; /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */ if (pEngineNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEngineNode); result = ma_engine_node_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } if (pConfig->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pConfig->pinnedListenerIndex >= ma_engine_get_listener_count(pConfig->pEngine)) { return MA_INVALID_ARGS; /* Invalid listener. */ } pEngineNode->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pEngineNode->pEngine = pConfig->pEngine; pEngineNode->sampleRate = (pConfig->sampleRate > 0) ? pConfig->sampleRate : ma_engine_get_sample_rate(pEngineNode->pEngine); pEngineNode->volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames; pEngineNode->monoExpansionMode = pConfig->monoExpansionMode; ma_atomic_float_set(&pEngineNode->volume, 1); pEngineNode->pitch = 1; pEngineNode->oldPitch = 1; pEngineNode->oldDopplerPitch = 1; pEngineNode->isPitchDisabled = pConfig->isPitchDisabled; pEngineNode->isSpatializationDisabled = pConfig->isSpatializationDisabled; pEngineNode->pinnedListenerIndex = pConfig->pinnedListenerIndex; ma_atomic_float_set(&pEngineNode->fadeSettings.volumeBeg, 1); ma_atomic_float_set(&pEngineNode->fadeSettings.volumeEnd, 1); ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, (~(ma_uint64)0)); ma_atomic_uint64_set(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames, (~(ma_uint64)0)); /* <-- Indicates that the fade should start immediately. */ channelsIn = (pConfig->channelsIn != 0) ? pConfig->channelsIn : ma_engine_get_channels(pConfig->pEngine); channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine); /* If the sample rate of the sound is different to the engine, make sure pitching is enabled so that the resampler is activated. Not doing this will result in the sound not being resampled if MA_SOUND_FLAG_NO_PITCH is used. */ if (pEngineNode->sampleRate != ma_engine_get_sample_rate(pEngineNode->pEngine)) { pEngineNode->isPitchDisabled = MA_FALSE; } /* Base node. */ baseNodeConfig = ma_engine_node_base_node_config_init(pConfig); baseNodeConfig.pInputChannels = &channelsIn; baseNodeConfig.pOutputChannels = &channelsOut; result = ma_node_init_preallocated(&pConfig->pEngine->nodeGraph, &baseNodeConfig, ma_offset_ptr(pHeap, heapLayout.baseNodeOffset), &pEngineNode->baseNode); if (result != MA_SUCCESS) { goto error0; } /* We can now initialize the effects we need in order to implement the engine node. There's a defined order of operations here, mainly centered around when we convert our channels from the data source's native channel count to the engine's channel count. As a rule, we want to do as much computation as possible before spatialization because there's a chance that will increase the channel count, thereby increasing the amount of work needing to be done to process. */ /* We'll always do resampling first. */ resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], pEngineNode->sampleRate, ma_engine_get_sample_rate(pEngineNode->pEngine)); resamplerConfig.lpfOrder = 0; /* <-- Need to disable low-pass filtering for pitch shifting for now because there's cases where the biquads are becoming unstable. Need to figure out a better fix for this. */ result = ma_linear_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pEngineNode->resampler); if (result != MA_SUCCESS) { goto error1; } /* After resampling will come the fader. */ faderConfig = ma_fader_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], ma_engine_get_sample_rate(pEngineNode->pEngine)); result = ma_fader_init(&faderConfig, &pEngineNode->fader); if (result != MA_SUCCESS) { goto error2; } /* Spatialization comes next. We spatialize based on the node's output channel count. It's up the caller to ensure channels counts link up correctly in the node graph. */ spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig); spatializerConfig.gainSmoothTimeInFrames = pEngineNode->pEngine->gainSmoothTimeInFrames; if (spatializerConfig.channelsIn == 2) { spatializerConfig.pChannelMapIn = defaultStereoChannelMap; } result = ma_spatializer_init_preallocated(&spatializerConfig, ma_offset_ptr(pHeap, heapLayout.spatializerOffset), &pEngineNode->spatializer); if (result != MA_SUCCESS) { goto error2; } /* After spatialization comes panning. We need to do this after spatialization because otherwise we wouldn't be able to pan mono sounds. */ pannerConfig = ma_panner_config_init(ma_format_f32, baseNodeConfig.pOutputChannels[0]); result = ma_panner_init(&pannerConfig, &pEngineNode->panner); if (result != MA_SUCCESS) { goto error3; } /* We'll need a gainer for smoothing out volume changes if we have a non-zero smooth time. We apply this before converting to the output channel count. */ if (pConfig->volumeSmoothTimeInPCMFrames > 0) { gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames); result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pEngineNode->volumeGainer); if (result != MA_SUCCESS) { goto error3; } } return MA_SUCCESS; /* No need for allocation callbacks here because we use a preallocated heap. */ error3: ma_spatializer_uninit(&pEngineNode->spatializer, NULL); error2: ma_linear_resampler_uninit(&pEngineNode->resampler, NULL); error1: ma_node_uninit(&pEngineNode->baseNode, NULL); error0: return result; } MA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_engine_node_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_engine_node_init_preallocated(pConfig, pHeap, pEngineNode); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pEngineNode->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node always needs to be uninitialized first to ensure it's detached from the graph completely before we destroy anything that might be in the middle of being used by the processing function. */ ma_node_uninit(&pEngineNode->baseNode, pAllocationCallbacks); /* Now that the node has been uninitialized we can safely uninitialize the rest. */ if (pEngineNode->volumeSmoothTimeInPCMFrames > 0) { ma_gainer_uninit(&pEngineNode->volumeGainer, pAllocationCallbacks); } ma_spatializer_uninit(&pEngineNode->spatializer, pAllocationCallbacks); ma_linear_resampler_uninit(&pEngineNode->resampler, pAllocationCallbacks); /* Free the heap last. */ if (pEngineNode->_ownsHeap) { ma_free(pEngineNode->_pHeap, pAllocationCallbacks); } } MA_API ma_sound_config ma_sound_config_init(void) { return ma_sound_config_init_2(NULL); } MA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine) { ma_sound_config config; MA_ZERO_OBJECT(&config); if (pEngine != NULL) { config.monoExpansionMode = pEngine->monoExpansionMode; } else { config.monoExpansionMode = ma_mono_expansion_mode_default; } config.rangeEndInPCMFrames = ~((ma_uint64)0); config.loopPointEndInPCMFrames = ~((ma_uint64)0); return config; } MA_API ma_sound_group_config ma_sound_group_config_init(void) { return ma_sound_group_config_init_2(NULL); } MA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine) { ma_sound_group_config config; MA_ZERO_OBJECT(&config); if (pEngine != NULL) { config.monoExpansionMode = pEngine->monoExpansionMode; } else { config.monoExpansionMode = ma_mono_expansion_mode_default; } return config; } MA_API ma_engine_config ma_engine_config_init(void) { ma_engine_config config; MA_ZERO_OBJECT(&config); config.listenerCount = 1; /* Always want at least one listener. */ config.monoExpansionMode = ma_mono_expansion_mode_default; return config; } #if !defined(MA_NO_DEVICE_IO) static void ma_engine_data_callback_internal(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { ma_engine* pEngine = (ma_engine*)pDevice->pUserData; (void)pFramesIn; /* Experiment: Try processing a resource manager job if we're on the Emscripten build. This serves two purposes: 1) It ensures jobs are actually processed at some point since we cannot guarantee that the caller is doing the right thing and calling ma_resource_manager_process_next_job(); and 2) It's an attempt at working around an issue where processing jobs on the Emscripten main loop doesn't work as well as it should. When trying to load sounds without the `DECODE` flag or with the `ASYNC` flag, the sound data is just not able to be loaded in time before the callback is processed. I think it's got something to do with the single- threaded nature of Web, but I'm not entirely sure. */ #if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_EMSCRIPTEN) { if (pEngine->pResourceManager != NULL) { if ((pEngine->pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) { ma_resource_manager_process_next_job(pEngine->pResourceManager); } } } #endif ma_engine_read_pcm_frames(pEngine, pFramesOut, frameCount, NULL); } static ma_uint32 ma_device__get_processing_size_in_frames(ma_device* pDevice) { /* The processing size is the period size. The device can have a fixed sized processing size, or it can be decided by the backend in which case it can be variable. */ if (pDevice->playback.intermediaryBufferCap > 0) { /* Using a fixed sized processing callback. */ return pDevice->playback.intermediaryBufferCap; } else { /* Not using a fixed sized processing callback. Need to estimate the processing size based on the backend. */ return pDevice->playback.internalPeriodSizeInFrames; } } #endif MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine) { ma_result result; ma_node_graph_config nodeGraphConfig; ma_engine_config engineConfig; ma_spatializer_listener_config listenerConfig; ma_uint32 iListener; if (pEngine == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEngine); /* The config is allowed to be NULL in which case we use defaults for everything. */ if (pConfig != NULL) { engineConfig = *pConfig; } else { engineConfig = ma_engine_config_init(); } pEngine->monoExpansionMode = engineConfig.monoExpansionMode; pEngine->defaultVolumeSmoothTimeInPCMFrames = engineConfig.defaultVolumeSmoothTimeInPCMFrames; pEngine->onProcess = engineConfig.onProcess; pEngine->pProcessUserData = engineConfig.pProcessUserData; ma_allocation_callbacks_init_copy(&pEngine->allocationCallbacks, &engineConfig.allocationCallbacks); #if !defined(MA_NO_RESOURCE_MANAGER) { pEngine->pResourceManager = engineConfig.pResourceManager; } #endif #if !defined(MA_NO_DEVICE_IO) { pEngine->pDevice = engineConfig.pDevice; /* If we don't have a device, we need one. */ if (pEngine->pDevice == NULL && engineConfig.noDevice == MA_FALSE) { ma_device_config deviceConfig; pEngine->pDevice = (ma_device*)ma_malloc(sizeof(*pEngine->pDevice), &pEngine->allocationCallbacks); if (pEngine->pDevice == NULL) { return MA_OUT_OF_MEMORY; } deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.pDeviceID = engineConfig.pPlaybackDeviceID; deviceConfig.playback.format = ma_format_f32; deviceConfig.playback.channels = engineConfig.channels; deviceConfig.sampleRate = engineConfig.sampleRate; deviceConfig.dataCallback = (engineConfig.dataCallback != NULL) ? engineConfig.dataCallback : ma_engine_data_callback_internal; deviceConfig.pUserData = pEngine; deviceConfig.notificationCallback = engineConfig.notificationCallback; deviceConfig.periodSizeInFrames = engineConfig.periodSizeInFrames; deviceConfig.periodSizeInMilliseconds = engineConfig.periodSizeInMilliseconds; deviceConfig.noPreSilencedOutputBuffer = MA_TRUE; /* We'll always be outputting to every frame in the callback so there's no need for a pre-silenced buffer. */ deviceConfig.noClip = MA_TRUE; /* The engine will do clipping itself. */ if (engineConfig.pContext == NULL) { ma_context_config contextConfig = ma_context_config_init(); contextConfig.allocationCallbacks = pEngine->allocationCallbacks; contextConfig.pLog = engineConfig.pLog; /* If the engine config does not specify a log, use the resource manager's if we have one. */ #ifndef MA_NO_RESOURCE_MANAGER { if (contextConfig.pLog == NULL && engineConfig.pResourceManager != NULL) { contextConfig.pLog = ma_resource_manager_get_log(engineConfig.pResourceManager); } } #endif result = ma_device_init_ex(NULL, 0, &contextConfig, &deviceConfig, pEngine->pDevice); } else { result = ma_device_init(engineConfig.pContext, &deviceConfig, pEngine->pDevice); } if (result != MA_SUCCESS) { ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); pEngine->pDevice = NULL; return result; } pEngine->ownsDevice = MA_TRUE; } /* Update the channel count and sample rate of the engine config so we can reference it below. */ if (pEngine->pDevice != NULL) { engineConfig.channels = pEngine->pDevice->playback.channels; engineConfig.sampleRate = pEngine->pDevice->sampleRate; /* The processing size used by the engine is determined by engineConfig.periodSizeInFrames. We want to make this equal to what the device is using for it's period size. If we don't do that, it's possible that the node graph will split it's processing into multiple passes which can introduce glitching. */ engineConfig.periodSizeInFrames = ma_device__get_processing_size_in_frames(pEngine->pDevice); } } #endif if (engineConfig.channels == 0 || engineConfig.sampleRate == 0) { return MA_INVALID_ARGS; } pEngine->sampleRate = engineConfig.sampleRate; /* The engine always uses either the log that was passed into the config, or the context's log is available. */ if (engineConfig.pLog != NULL) { pEngine->pLog = engineConfig.pLog; } else { #if !defined(MA_NO_DEVICE_IO) { pEngine->pLog = ma_device_get_log(pEngine->pDevice); } #else { pEngine->pLog = NULL; } #endif } /* The engine is a node graph. This needs to be initialized after we have the device so we can determine the channel count. */ nodeGraphConfig = ma_node_graph_config_init(engineConfig.channels); nodeGraphConfig.processingSizeInFrames = engineConfig.periodSizeInFrames; nodeGraphConfig.preMixStackSizeInBytes = engineConfig.preMixStackSizeInBytes; result = ma_node_graph_init(&nodeGraphConfig, &pEngine->allocationCallbacks, &pEngine->nodeGraph); if (result != MA_SUCCESS) { goto on_error_1; } /* We need at least one listener. */ if (engineConfig.listenerCount == 0) { engineConfig.listenerCount = 1; } if (engineConfig.listenerCount > MA_ENGINE_MAX_LISTENERS) { result = MA_INVALID_ARGS; /* Too many listeners. */ goto on_error_1; } for (iListener = 0; iListener < engineConfig.listenerCount; iListener += 1) { listenerConfig = ma_spatializer_listener_config_init(ma_node_graph_get_channels(&pEngine->nodeGraph)); /* If we're using a device, use the device's channel map for the listener. Otherwise just use miniaudio's default channel map. */ #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { /* Temporarily disabled. There is a subtle bug here where front-left and front-right will be used by the device's channel map, but this is not what we want to use for spatialization. Instead we want to use side-left and side-right. I need to figure out a better solution for this. For now, disabling the use of device channel maps. */ /*listenerConfig.pChannelMapOut = pEngine->pDevice->playback.channelMap;*/ } } #endif result = ma_spatializer_listener_init(&listenerConfig, &pEngine->allocationCallbacks, &pEngine->listeners[iListener]); /* TODO: Change this to a pre-allocated heap. */ if (result != MA_SUCCESS) { goto on_error_2; } pEngine->listenerCount += 1; } /* Gain smoothing for spatialized sounds. */ pEngine->gainSmoothTimeInFrames = engineConfig.gainSmoothTimeInFrames; if (pEngine->gainSmoothTimeInFrames == 0) { ma_uint32 gainSmoothTimeInMilliseconds = engineConfig.gainSmoothTimeInMilliseconds; if (gainSmoothTimeInMilliseconds == 0) { gainSmoothTimeInMilliseconds = 8; } pEngine->gainSmoothTimeInFrames = (gainSmoothTimeInMilliseconds * ma_engine_get_sample_rate(pEngine)) / 1000; /* 8ms by default. */ } /* We need a resource manager. */ #ifndef MA_NO_RESOURCE_MANAGER { if (pEngine->pResourceManager == NULL) { ma_resource_manager_config resourceManagerConfig; pEngine->pResourceManager = (ma_resource_manager*)ma_malloc(sizeof(*pEngine->pResourceManager), &pEngine->allocationCallbacks); if (pEngine->pResourceManager == NULL) { result = MA_OUT_OF_MEMORY; goto on_error_2; } resourceManagerConfig = ma_resource_manager_config_init(); resourceManagerConfig.pLog = pEngine->pLog; /* Always use the engine's log for internally-managed resource managers. */ resourceManagerConfig.decodedFormat = ma_format_f32; resourceManagerConfig.decodedChannels = 0; /* Leave the decoded channel count as 0 so we can get good spatialization. */ resourceManagerConfig.decodedSampleRate = ma_engine_get_sample_rate(pEngine); ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks); resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS; /* The Emscripten build cannot use threads unless it's targeting pthreads. */ #if defined(MA_EMSCRIPTEN) && !defined(__EMSCRIPTEN_PTHREADS__) { resourceManagerConfig.jobThreadCount = 0; resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; } #endif result = ma_resource_manager_init(&resourceManagerConfig, pEngine->pResourceManager); if (result != MA_SUCCESS) { goto on_error_3; } pEngine->ownsResourceManager = MA_TRUE; } } #endif /* Setup some stuff for inlined sounds. That is sounds played with ma_engine_play_sound(). */ pEngine->inlinedSoundLock = 0; pEngine->pInlinedSoundHead = NULL; /* Start the engine if required. This should always be the last step. */ #if !defined(MA_NO_DEVICE_IO) { if (engineConfig.noAutoStart == MA_FALSE && pEngine->pDevice != NULL) { result = ma_engine_start(pEngine); if (result != MA_SUCCESS) { goto on_error_4; /* Failed to start the engine. */ } } } #endif return MA_SUCCESS; #if !defined(MA_NO_DEVICE_IO) on_error_4: #endif #if !defined(MA_NO_RESOURCE_MANAGER) on_error_3: if (pEngine->ownsResourceManager) { ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks); } #endif /* MA_NO_RESOURCE_MANAGER */ on_error_2: for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks); } ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks); on_error_1: #if !defined(MA_NO_DEVICE_IO) { if (pEngine->ownsDevice) { ma_device_uninit(pEngine->pDevice); ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); } } #endif return result; } MA_API void ma_engine_uninit(ma_engine* pEngine) { ma_uint32 iListener; if (pEngine == NULL) { return; } /* The device must be uninitialized before the node graph to ensure the audio thread doesn't try accessing it. */ #if !defined(MA_NO_DEVICE_IO) { if (pEngine->ownsDevice) { ma_device_uninit(pEngine->pDevice); ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); } else { if (pEngine->pDevice != NULL) { ma_device_stop(pEngine->pDevice); } } } #endif /* All inlined sounds need to be deleted. I'm going to use a lock here just to future proof in case I want to do some kind of garbage collection later on. */ ma_spinlock_lock(&pEngine->inlinedSoundLock); { for (;;) { ma_sound_inlined* pSoundToDelete = pEngine->pInlinedSoundHead; if (pSoundToDelete == NULL) { break; /* Done. */ } pEngine->pInlinedSoundHead = pSoundToDelete->pNext; ma_sound_uninit(&pSoundToDelete->sound); ma_free(pSoundToDelete, &pEngine->allocationCallbacks); } } ma_spinlock_unlock(&pEngine->inlinedSoundLock); for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks); } /* Make sure the node graph is uninitialized after the audio thread has been shutdown to prevent accessing of the node graph after being uninitialized. */ ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks); /* Uninitialize the resource manager last to ensure we don't have a thread still trying to access it. */ #ifndef MA_NO_RESOURCE_MANAGER if (pEngine->ownsResourceManager) { ma_resource_manager_uninit(pEngine->pResourceManager); ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks); } #endif } MA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result; ma_uint64 framesRead = 0; if (pFramesRead != NULL) { *pFramesRead = 0; } result = ma_node_graph_read_pcm_frames(&pEngine->nodeGraph, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; } if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (pEngine->onProcess) { pEngine->onProcess(pEngine->pProcessUserData, (float*)pFramesOut, framesRead); /* Safe cast to float* because the engine always works on floating point samples. */ } return MA_SUCCESS; } MA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } return &pEngine->nodeGraph; } #if !defined(MA_NO_RESOURCE_MANAGER) MA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } #if !defined(MA_NO_RESOURCE_MANAGER) { return pEngine->pResourceManager; } #else { return NULL; } #endif } #endif MA_API ma_device* ma_engine_get_device(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } #if !defined(MA_NO_DEVICE_IO) { return pEngine->pDevice; } #else { return NULL; } #endif } MA_API ma_log* ma_engine_get_log(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } if (pEngine->pLog != NULL) { return pEngine->pLog; } else { #if !defined(MA_NO_DEVICE_IO) { return ma_device_get_log(ma_engine_get_device(pEngine)); } #else { return NULL; } #endif } } MA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine) { return ma_node_graph_get_endpoint(&pEngine->nodeGraph); } MA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine) { return ma_node_graph_get_time(&pEngine->nodeGraph); } MA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine) { return ma_engine_get_time_in_pcm_frames(pEngine) * 1000 / ma_engine_get_sample_rate(pEngine); } MA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime) { return ma_node_graph_set_time(&pEngine->nodeGraph, globalTime); } MA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime) { return ma_engine_set_time_in_pcm_frames(pEngine, globalTime * ma_engine_get_sample_rate(pEngine) / 1000); } MA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine) { return ma_engine_get_time_in_pcm_frames(pEngine); } MA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime) { return ma_engine_set_time_in_pcm_frames(pEngine, globalTime); } MA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine) { return ma_node_graph_get_channels(&pEngine->nodeGraph); } MA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return pEngine->sampleRate; } MA_API ma_result ma_engine_start(ma_engine* pEngine) { ma_result result; if (pEngine == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { result = ma_device_start(pEngine->pDevice); } else { result = MA_INVALID_OPERATION; /* The engine is running without a device which means there's no real notion of "starting" the engine. */ } } #else { result = MA_INVALID_OPERATION; /* Device IO is disabled, so there's no real notion of "starting" the engine. */ } #endif if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_engine_stop(ma_engine* pEngine) { ma_result result; if (pEngine == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { result = ma_device_stop(pEngine->pDevice); } else { result = MA_INVALID_OPERATION; /* The engine is running without a device which means there's no real notion of "stopping" the engine. */ } } #else { result = MA_INVALID_OPERATION; /* Device IO is disabled, so there's no real notion of "stopping" the engine. */ } #endif if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume) { if (pEngine == NULL) { return MA_INVALID_ARGS; } return ma_node_set_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0, volume); } MA_API float ma_engine_get_volume(ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return ma_node_get_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0); } MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB) { return ma_engine_set_volume(pEngine, ma_volume_db_to_linear(gainDB)); } MA_API float ma_engine_get_gain_db(ma_engine* pEngine) { return ma_volume_linear_to_db(ma_engine_get_volume(pEngine)); } MA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return pEngine->listenerCount; } MA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ) { ma_uint32 iListener; ma_uint32 iListenerClosest; float closestLen2 = MA_FLT_MAX; if (pEngine == NULL || pEngine->listenerCount == 1) { return 0; } iListenerClosest = 0; for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { if (ma_engine_listener_is_enabled(pEngine, iListener)) { float len2 = ma_vec3f_len2(ma_vec3f_sub(ma_spatializer_listener_get_position(&pEngine->listeners[iListener]), ma_vec3f_init_3f(absolutePosX, absolutePosY, absolutePosZ))); if (closestLen2 > len2) { closestLen2 = len2; iListenerClosest = iListener; } } } MA_ASSERT(iListenerClosest < 255); return iListenerClosest; } MA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_position(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_listener_get_position(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_direction(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, -1); } return ma_spatializer_listener_get_direction(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_velocity(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_listener_get_velocity(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_cone(&pEngine->listeners[listenerIndex], innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = 0; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = 0; } if (pOuterGain != NULL) { *pOuterGain = 0; } if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_get_cone(&pEngine->listeners[listenerIndex], pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_world_up(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 1, 0); } return ma_spatializer_listener_get_world_up(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_enabled(&pEngine->listeners[listenerIndex], isEnabled); } MA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return MA_FALSE; } return ma_spatializer_listener_is_enabled(&pEngine->listeners[listenerIndex]); } #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex) { ma_result result = MA_SUCCESS; ma_sound_inlined* pSound = NULL; ma_sound_inlined* pNextSound = NULL; if (pEngine == NULL || pFilePath == NULL) { return MA_INVALID_ARGS; } /* Attach to the endpoint node if nothing is specified. */ if (pNode == NULL) { pNode = ma_node_graph_get_endpoint(&pEngine->nodeGraph); nodeInputBusIndex = 0; } /* We want to check if we can recycle an already-allocated inlined sound. Since this is just a helper I'm not *too* concerned about performance here and I'm happy to use a lock to keep the implementation simple. Maybe this can be optimized later if there's enough demand, but if this function is being used it probably means the caller doesn't really care too much. What we do is check the atEnd flag. When this is true, we can recycle the sound. Otherwise we just keep iterating. If we reach the end without finding a sound to recycle we just allocate a new one. This doesn't scale well for a massive number of sounds being played simultaneously as we don't ever actually free the sound objects. Some kind of garbage collection routine might be valuable for this which I'll think about. */ ma_spinlock_lock(&pEngine->inlinedSoundLock); { ma_uint32 soundFlags = 0; for (pNextSound = pEngine->pInlinedSoundHead; pNextSound != NULL; pNextSound = pNextSound->pNext) { if (ma_sound_at_end(&pNextSound->sound)) { /* The sound is at the end which means it's available for recycling. All we need to do is uninitialize it and reinitialize it. All we're doing is recycling memory. */ pSound = pNextSound; ma_atomic_fetch_sub_32(&pEngine->inlinedSoundCount, 1); break; } } if (pSound != NULL) { /* We actually want to detach the sound from the list here. The reason is because we want the sound to be in a consistent state at the non-recycled case to simplify the logic below. */ if (pEngine->pInlinedSoundHead == pSound) { pEngine->pInlinedSoundHead = pSound->pNext; } if (pSound->pPrev != NULL) { pSound->pPrev->pNext = pSound->pNext; } if (pSound->pNext != NULL) { pSound->pNext->pPrev = pSound->pPrev; } /* Now the previous sound needs to be uninitialized. */ ma_sound_uninit(&pNextSound->sound); } else { /* No sound available for recycling. Allocate one now. */ pSound = (ma_sound_inlined*)ma_malloc(sizeof(*pSound), &pEngine->allocationCallbacks); } if (pSound != NULL) { /* Safety check for the allocation above. */ /* At this point we should have memory allocated for the inlined sound. We just need to initialize it like a normal sound now. */ soundFlags |= MA_SOUND_FLAG_ASYNC; /* For inlined sounds we don't want to be sitting around waiting for stuff to load so force an async load. */ soundFlags |= MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT; /* We want specific control over where the sound is attached in the graph. We'll attach it manually just before playing the sound. */ soundFlags |= MA_SOUND_FLAG_NO_PITCH; /* Pitching isn't usable with inlined sounds, so disable it to save on speed. */ soundFlags |= MA_SOUND_FLAG_NO_SPATIALIZATION; /* Not currently doing spatialization with inlined sounds, but this might actually change later. For now disable spatialization. Will be removed if we ever add support for spatialization here. */ result = ma_sound_init_from_file(pEngine, pFilePath, soundFlags, NULL, NULL, &pSound->sound); if (result == MA_SUCCESS) { /* Now attach the sound to the graph. */ result = ma_node_attach_output_bus(pSound, 0, pNode, nodeInputBusIndex); if (result == MA_SUCCESS) { /* At this point the sound should be loaded and we can go ahead and add it to the list. The new item becomes the new head. */ pSound->pNext = pEngine->pInlinedSoundHead; pSound->pPrev = NULL; pEngine->pInlinedSoundHead = pSound; /* <-- This is what attaches the sound to the list. */ if (pSound->pNext != NULL) { pSound->pNext->pPrev = pSound; } } else { ma_free(pSound, &pEngine->allocationCallbacks); } } else { ma_free(pSound, &pEngine->allocationCallbacks); } } else { result = MA_OUT_OF_MEMORY; } } ma_spinlock_unlock(&pEngine->inlinedSoundLock); if (result != MA_SUCCESS) { return result; } /* Finally we can start playing the sound. */ result = ma_sound_start(&pSound->sound); if (result != MA_SUCCESS) { /* Failed to start the sound. We need to mark it for recycling and return an error. */ ma_atomic_exchange_32(&pSound->sound.atEnd, MA_TRUE); return result; } ma_atomic_fetch_add_32(&pEngine->inlinedSoundCount, 1); return result; } MA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup) { return ma_engine_play_sound_ex(pEngine, pFilePath, pGroup, 0); } #endif static ma_result ma_sound_preinit(ma_engine* pEngine, ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSound); pSound->seekTarget = MA_SEEK_TARGET_NONE; if (pEngine == NULL) { return MA_INVALID_ARGS; } return MA_SUCCESS; } static ma_result ma_sound_init_from_data_source_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result; ma_engine_node_config engineNodeConfig; ma_engine_node_type type; /* Will be set to ma_engine_node_type_group if no data source is specified. */ /* Do not clear pSound to zero here - that's done at a higher level with ma_sound_preinit(). */ MA_ASSERT(pEngine != NULL); MA_ASSERT(pSound != NULL); if (pConfig == NULL) { return MA_INVALID_ARGS; } pSound->pDataSource = pConfig->pDataSource; if (pConfig->pDataSource != NULL) { type = ma_engine_node_type_sound; } else { type = ma_engine_node_type_group; } /* Sounds are engine nodes. Before we can initialize this we need to determine the channel count. If we can't do this we need to abort. It's up to the caller to ensure they're using a data source that provides this information upfront. */ engineNodeConfig = ma_engine_node_config_init(pEngine, type, pConfig->flags); engineNodeConfig.channelsIn = pConfig->channelsIn; engineNodeConfig.channelsOut = pConfig->channelsOut; engineNodeConfig.volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames; engineNodeConfig.monoExpansionMode = pConfig->monoExpansionMode; if (engineNodeConfig.volumeSmoothTimeInPCMFrames == 0) { engineNodeConfig.volumeSmoothTimeInPCMFrames = pEngine->defaultVolumeSmoothTimeInPCMFrames; } /* If we're loading from a data source the input channel count needs to be the data source's native channel count. */ if (pConfig->pDataSource != NULL) { result = ma_data_source_get_data_format(pConfig->pDataSource, NULL, &engineNodeConfig.channelsIn, &engineNodeConfig.sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the channel count. */ } if (engineNodeConfig.channelsIn == 0) { return MA_INVALID_OPERATION; /* Invalid channel count. */ } if (engineNodeConfig.channelsOut == MA_SOUND_SOURCE_CHANNEL_COUNT) { engineNodeConfig.channelsOut = engineNodeConfig.channelsIn; } } /* Getting here means we should have a valid channel count and we can initialize the engine node. */ result = ma_engine_node_init(&engineNodeConfig, &pEngine->allocationCallbacks, &pSound->engineNode); if (result != MA_SUCCESS) { return result; } /* If no attachment is specified, attach the sound straight to the endpoint. */ if (pConfig->pInitialAttachment == NULL) { /* No group. Attach straight to the endpoint by default, unless the caller has requested that it not. */ if ((pConfig->flags & MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT) == 0) { result = ma_node_attach_output_bus(pSound, 0, ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0); } } else { /* An attachment is specified. Attach to it by default. The sound has only a single output bus, and the config will specify which input bus to attach to. */ result = ma_node_attach_output_bus(pSound, 0, pConfig->pInitialAttachment, pConfig->initialAttachmentInputBusIndex); } if (result != MA_SUCCESS) { ma_engine_node_uninit(&pSound->engineNode, &pEngine->allocationCallbacks); return result; } /* Apply initial range and looping state to the data source if applicable. */ if (pConfig->rangeBegInPCMFrames != 0 || pConfig->rangeEndInPCMFrames != ~((ma_uint64)0)) { ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); } if (pConfig->loopPointBegInPCMFrames != 0 || pConfig->loopPointEndInPCMFrames != ~((ma_uint64)0)) { ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); } ma_sound_set_looping(pSound, pConfig->isLooping || ((pConfig->flags & MA_SOUND_FLAG_LOOPING) != 0)); return MA_SUCCESS; } #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result = MA_SUCCESS; ma_uint32 flags; ma_sound_config config; ma_resource_manager_pipeline_notifications notifications; /* The engine requires knowledge of the channel count of the underlying data source before it can initialize the sound. Therefore, we need to make the resource manager wait until initialization of the underlying data source to be initialized so we can get access to the channel count. To do this, the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT is forced. Because we're initializing the data source before the sound, there's a chance the notification will get triggered before this function returns. This is OK, so long as the caller is aware of it and can avoid accessing the sound from within the notification. */ flags = pConfig->flags | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT; if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks); if (pSound->pResourceManagerDataSource == NULL) { return MA_OUT_OF_MEMORY; } /* Removed in 0.12. Set pDoneFence on the notifications. */ notifications = pConfig->initNotifications; if (pConfig->pDoneFence != NULL && notifications.done.pFence == NULL) { notifications.done.pFence = pConfig->pDoneFence; } /* We must wrap everything around the fence if one was specified. This ensures ma_fence_wait() does not return prematurely before the sound has finished initializing. */ if (notifications.done.pFence) { ma_fence_acquire(notifications.done.pFence); } { ma_resource_manager_data_source_config resourceManagerDataSourceConfig = ma_resource_manager_data_source_config_init(); resourceManagerDataSourceConfig.pFilePath = pConfig->pFilePath; resourceManagerDataSourceConfig.pFilePathW = pConfig->pFilePathW; resourceManagerDataSourceConfig.flags = flags; resourceManagerDataSourceConfig.pNotifications = ¬ifications; resourceManagerDataSourceConfig.initialSeekPointInPCMFrames = pConfig->initialSeekPointInPCMFrames; resourceManagerDataSourceConfig.rangeBegInPCMFrames = pConfig->rangeBegInPCMFrames; resourceManagerDataSourceConfig.rangeEndInPCMFrames = pConfig->rangeEndInPCMFrames; resourceManagerDataSourceConfig.loopPointBegInPCMFrames = pConfig->loopPointBegInPCMFrames; resourceManagerDataSourceConfig.loopPointEndInPCMFrames = pConfig->loopPointEndInPCMFrames; resourceManagerDataSourceConfig.isLooping = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0; result = ma_resource_manager_data_source_init_ex(pEngine->pResourceManager, &resourceManagerDataSourceConfig, pSound->pResourceManagerDataSource); if (result != MA_SUCCESS) { goto done; } pSound->ownsDataSource = MA_TRUE; /* <-- Important. Not setting this will result in the resource manager data source never getting uninitialized. */ /* We need to use a slightly customized version of the config so we'll need to make a copy. */ config = *pConfig; config.pFilePath = NULL; config.pFilePathW = NULL; config.pDataSource = pSound->pResourceManagerDataSource; result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound); if (result != MA_SUCCESS) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); MA_ZERO_OBJECT(pSound); goto done; } } done: if (notifications.done.pFence) { ma_fence_release(notifications.done.pFence); } return result; } MA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound) { ma_sound_config config; if (pFilePath == NULL) { return MA_INVALID_ARGS; } config = ma_sound_config_init_2(pEngine); config.pFilePath = pFilePath; config.flags = flags; config.pInitialAttachment = pGroup; config.pDoneFence = pDoneFence; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound) { ma_sound_config config; if (pFilePath == NULL) { return MA_INVALID_ARGS; } config = ma_sound_config_init_2(pEngine); config.pFilePathW = pFilePath; config.flags = flags; config.pInitialAttachment = pGroup; config.pDoneFence = pDoneFence; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound) { ma_result result; ma_sound_config config; result = ma_sound_preinit(pEngine, pSound); if (result != MA_SUCCESS) { return result; } if (pExistingSound == NULL) { return MA_INVALID_ARGS; } /* Cloning only works for data buffers (not streams) that are loaded from the resource manager. */ if (pExistingSound->pResourceManagerDataSource == NULL) { return MA_INVALID_OPERATION; } /* We need to make a clone of the data source. If the data source is not a data buffer (i.e. a stream) this will fail. */ pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks); if (pSound->pResourceManagerDataSource == NULL) { return MA_OUT_OF_MEMORY; } result = ma_resource_manager_data_source_init_copy(pEngine->pResourceManager, pExistingSound->pResourceManagerDataSource, pSound->pResourceManagerDataSource); if (result != MA_SUCCESS) { ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); return result; } config = ma_sound_config_init_2(pEngine); config.pDataSource = pSound->pResourceManagerDataSource; config.flags = flags; config.pInitialAttachment = pGroup; config.monoExpansionMode = pExistingSound->engineNode.monoExpansionMode; config.volumeSmoothTimeInPCMFrames = pExistingSound->engineNode.volumeSmoothTimeInPCMFrames; result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound); if (result != MA_SUCCESS) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); MA_ZERO_OBJECT(pSound); return result; } /* Make sure the sound is marked as the owner of the data source or else it will never get uninitialized. */ pSound->ownsDataSource = MA_TRUE; return MA_SUCCESS; } #endif MA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound) { ma_sound_config config = ma_sound_config_init_2(pEngine); config.pDataSource = pDataSource; config.flags = flags; config.pInitialAttachment = pGroup; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result; result = ma_sound_preinit(pEngine, pSound); if (result != MA_SUCCESS) { return result; } if (pConfig == NULL) { return MA_INVALID_ARGS; } pSound->endCallback = pConfig->endCallback; pSound->pEndCallbackUserData = pConfig->pEndCallbackUserData; /* We need to load the sound differently depending on whether or not we're loading from a file. */ #ifndef MA_NO_RESOURCE_MANAGER if (pConfig->pFilePath != NULL || pConfig->pFilePathW != NULL) { return ma_sound_init_from_file_internal(pEngine, pConfig, pSound); } else #endif { /* Getting here means we're not loading from a file. We may be loading from an already-initialized data source, or none at all. If we aren't specifying any data source, we'll be initializing the equivalent to a group. ma_data_source_init_from_data_source_internal() will deal with this for us, so no special treatment required here. */ return ma_sound_init_from_data_source_internal(pEngine, pConfig, pSound); } } MA_API void ma_sound_uninit(ma_sound* pSound) { if (pSound == NULL) { return; } /* Always uninitialize the node first. This ensures it's detached from the graph and does not return until it has done so which makes thread safety beyond this point trivial. */ ma_engine_node_uninit(&pSound->engineNode, &pSound->engineNode.pEngine->allocationCallbacks); /* Once the sound is detached from the group we can guarantee that it won't be referenced by the mixer thread which means it's safe for us to destroy the data source. */ #ifndef MA_NO_RESOURCE_MANAGER if (pSound->ownsDataSource) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pSound->engineNode.pEngine->allocationCallbacks); pSound->pDataSource = NULL; } #else MA_ASSERT(pSound->ownsDataSource == MA_FALSE); #endif } MA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound) { if (pSound == NULL) { return NULL; } return pSound->engineNode.pEngine; } MA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound) { if (pSound == NULL) { return NULL; } return pSound->pDataSource; } MA_API ma_result ma_sound_start(ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* If the sound is already playing, do nothing. */ if (ma_sound_is_playing(pSound)) { return MA_SUCCESS; } /* If the sound is at the end it means we want to start from the start again. */ if (ma_sound_at_end(pSound)) { ma_result result = ma_data_source_seek_to_pcm_frame(pSound->pDataSource, 0); if (result != MA_SUCCESS && result != MA_NOT_IMPLEMENTED) { return result; /* Failed to seek back to the start. */ } /* Make sure we clear the end indicator. */ ma_atomic_exchange_32(&pSound->atEnd, MA_FALSE); } /* Make sure the sound is started. If there's a start delay, the sound won't actually start until the start time is reached. */ ma_node_set_state(pSound, ma_node_state_started); return MA_SUCCESS; } MA_API ma_result ma_sound_stop(ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* This will stop the sound immediately. Use ma_sound_set_stop_time() to stop the sound at a specific time. */ ma_node_set_state(pSound, ma_node_state_stopped); return MA_SUCCESS; } MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* Stopping with a fade out requires us to schedule the stop into the future by the fade length. */ ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound)) + fadeLengthInFrames, fadeLengthInFrames); return MA_SUCCESS; } MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInMilliseconds) { ma_uint64 sampleRate; if (pSound == NULL) { return MA_INVALID_ARGS; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); return ma_sound_stop_with_fade_in_pcm_frames(pSound, (fadeLengthInMilliseconds * sampleRate) / 1000); } MA_API void ma_sound_set_volume(ma_sound* pSound, float volume) { if (pSound == NULL) { return; } ma_engine_node_set_volume(&pSound->engineNode, volume); } MA_API float ma_sound_get_volume(const ma_sound* pSound) { float volume = 0; if (pSound == NULL) { return 0; } ma_engine_node_get_volume(&pSound->engineNode, &volume); return volume; } MA_API void ma_sound_set_pan(ma_sound* pSound, float pan) { if (pSound == NULL) { return; } ma_panner_set_pan(&pSound->engineNode.panner, pan); } MA_API float ma_sound_get_pan(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_panner_get_pan(&pSound->engineNode.panner); } MA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode) { if (pSound == NULL) { return; } ma_panner_set_mode(&pSound->engineNode.panner, panMode); } MA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound) { if (pSound == NULL) { return ma_pan_mode_balance; } return ma_panner_get_mode(&pSound->engineNode.panner); } MA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch) { if (pSound == NULL) { return; } if (pitch <= 0) { return; } ma_atomic_exchange_explicit_f32(&pSound->engineNode.pitch, pitch, ma_atomic_memory_order_release); } MA_API float ma_sound_get_pitch(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_atomic_load_f32(&pSound->engineNode.pitch); /* Naughty const-cast for this. */ } MA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled) { if (pSound == NULL) { return; } ma_atomic_exchange_explicit_32(&pSound->engineNode.isSpatializationDisabled, !enabled, ma_atomic_memory_order_release); } MA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } return ma_engine_node_is_spatialization_enabled(&pSound->engineNode); } MA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex) { if (pSound == NULL || listenerIndex >= ma_engine_get_listener_count(ma_sound_get_engine(pSound))) { return; } ma_atomic_exchange_explicit_32(&pSound->engineNode.pinnedListenerIndex, listenerIndex, ma_atomic_memory_order_release); } MA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound) { if (pSound == NULL) { return MA_LISTENER_INDEX_CLOSEST; } return ma_atomic_load_explicit_32(&pSound->engineNode.pinnedListenerIndex, ma_atomic_memory_order_acquire); } MA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound) { ma_uint32 listenerIndex; if (pSound == NULL) { return 0; } listenerIndex = ma_sound_get_pinned_listener_index(pSound); if (listenerIndex == MA_LISTENER_INDEX_CLOSEST) { ma_vec3f position = ma_sound_get_position(pSound); return ma_engine_find_closest_listener(ma_sound_get_engine(pSound), position.x, position.y, position.z); } return listenerIndex; } MA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound) { ma_vec3f relativePos; ma_engine* pEngine; if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, -1); } pEngine = ma_sound_get_engine(pSound); if (pEngine == NULL) { return ma_vec3f_init_3f(0, 0, -1); } ma_spatializer_get_relative_position_and_direction(&pSound->engineNode.spatializer, &pEngine->listeners[ma_sound_get_listener_index(pSound)], &relativePos, NULL); return ma_vec3f_normalize(ma_vec3f_neg(relativePos)); } MA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_position(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_position(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_direction(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_direction(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_velocity(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_velocity(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel) { if (pSound == NULL) { return; } ma_spatializer_set_attenuation_model(&pSound->engineNode.spatializer, attenuationModel); } MA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound) { if (pSound == NULL) { return ma_attenuation_model_none; } return ma_spatializer_get_attenuation_model(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning) { if (pSound == NULL) { return; } ma_spatializer_set_positioning(&pSound->engineNode.spatializer, positioning); } MA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound) { if (pSound == NULL) { return ma_positioning_absolute; } return ma_spatializer_get_positioning(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff) { if (pSound == NULL) { return; } ma_spatializer_set_rolloff(&pSound->engineNode.spatializer, rolloff); } MA_API float ma_sound_get_rolloff(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_rolloff(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain) { if (pSound == NULL) { return; } ma_spatializer_set_min_gain(&pSound->engineNode.spatializer, minGain); } MA_API float ma_sound_get_min_gain(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_min_gain(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain) { if (pSound == NULL) { return; } ma_spatializer_set_max_gain(&pSound->engineNode.spatializer, maxGain); } MA_API float ma_sound_get_max_gain(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_max_gain(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance) { if (pSound == NULL) { return; } ma_spatializer_set_min_distance(&pSound->engineNode.spatializer, minDistance); } MA_API float ma_sound_get_min_distance(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_min_distance(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance) { if (pSound == NULL) { return; } ma_spatializer_set_max_distance(&pSound->engineNode.spatializer, maxDistance); } MA_API float ma_sound_get_max_distance(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_max_distance(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pSound == NULL) { return; } ma_spatializer_set_cone(&pSound->engineNode.spatializer, innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = 0; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = 0; } if (pOuterGain != NULL) { *pOuterGain = 0; } if (pSound == NULL) { return; } ma_spatializer_get_cone(&pSound->engineNode.spatializer, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor) { if (pSound == NULL) { return; } ma_spatializer_set_doppler_factor(&pSound->engineNode.spatializer, dopplerFactor); } MA_API float ma_sound_get_doppler_factor(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_doppler_factor(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor) { if (pSound == NULL) { return; } ma_spatializer_set_directional_attenuation_factor(&pSound->engineNode.spatializer, directionalAttenuationFactor); } MA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound) { if (pSound == NULL) { return 1; } return ma_spatializer_get_directional_attenuation_factor(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return; } ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, fadeLengthInFrames, (~(ma_uint64)0)); } MA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_fade_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * pSound->engineNode.fader.config.sampleRate) / 1000); } MA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } /* We don't want to update the fader at this point because we need to use the engine's current time to derive the fader's start offset. The timer is being updated on the audio thread so in order to do this as accurately as possible we'll need to defer this to the audio thread. */ ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeBeg, volumeBeg); ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeEnd, volumeEnd); ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.fadeLengthInFrames, fadeLengthInFrames); ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.absoluteGlobalTimeInFrames, absoluteGlobalTimeInFrames); } MA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_uint32 sampleRate; if (pSound == NULL) { return; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * sampleRate) / 1000, (absoluteGlobalTimeInMilliseconds * sampleRate) / 1000); } MA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } return ma_fader_get_current_volume(&pSound->engineNode.fader); } MA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } ma_node_set_state_time(pSound, ma_node_state_started, absoluteGlobalTimeInFrames); } MA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_start_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000); } MA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, absoluteGlobalTimeInFrames, 0); } MA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_stop_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000); } MA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return; } if (fadeLengthInFrames > 0) { if (fadeLengthInFrames > stopAbsoluteGlobalTimeInFrames) { fadeLengthInFrames = stopAbsoluteGlobalTimeInFrames; } ma_sound_set_fade_start_in_pcm_frames(pSound, -1, 0, fadeLengthInFrames, stopAbsoluteGlobalTimeInFrames - fadeLengthInFrames); } ma_node_set_state_time(pSound, ma_node_state_stopped, stopAbsoluteGlobalTimeInFrames); } MA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds) { ma_uint32 sampleRate; if (pSound == NULL) { return; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, (stopAbsoluteGlobalTimeInMilliseconds * sampleRate) / 1000, (fadeLengthInMilliseconds * sampleRate) / 1000); } MA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } return ma_node_get_state_by_time(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound))) == ma_node_state_started; } MA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_node_get_time(pSound); } MA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound) { return ma_sound_get_time_in_pcm_frames(pSound) * 1000 / ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); } MA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping) { if (pSound == NULL) { return; } /* Looping is only a valid concept if the sound is backed by a data source. */ if (pSound->pDataSource == NULL) { return; } /* The looping state needs to be applied to the data source in order for any looping to actually happen. */ ma_data_source_set_looping(pSound->pDataSource, isLooping); } MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } /* There is no notion of looping for sounds that are not backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_FALSE; } return ma_data_source_is_looping(pSound->pDataSource); } MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } /* There is no notion of an end of a sound if it's not backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_FALSE; } return ma_sound_get_at_end(pSound); } MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* Seeking is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } /* We can't be seeking while reading at the same time. We just set the seek target and get the mixing thread to do the actual seek. */ ma_atomic_exchange_64(&pSound->seekTarget, frameIndex); return MA_SUCCESS; } MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds) { ma_uint64 frameIndex; ma_uint32 sampleRate; ma_result result; if (pSound == NULL) { return MA_INVALID_ARGS; } result = ma_sound_get_data_format(pSound, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames. We need to convert first */ frameIndex = (ma_uint64)(seekPointInSeconds * sampleRate); return ma_sound_seek_to_pcm_frame(pSound, frameIndex); } MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The data format is retrieved directly from the data source if the sound is backed by one. Otherwise we pull it from the node. */ if (pSound->pDataSource == NULL) { ma_uint32 channels; if (pFormat != NULL) { *pFormat = ma_format_f32; } channels = ma_node_get_input_channels(&pSound->engineNode, 0); if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = pSound->engineNode.resampler.config.sampleRateIn; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channels); } return MA_SUCCESS; } else { return ma_data_source_get_data_format(pSound->pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } } MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor) { ma_uint64 seekTarget; if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a cursor is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } seekTarget = ma_atomic_load_64(&pSound->seekTarget); if (seekTarget != MA_SEEK_TARGET_NONE) { *pCursor = seekTarget; return MA_SUCCESS; } else { return ma_data_source_get_cursor_in_pcm_frames(pSound->pDataSource, pCursor); } } MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a sound length is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } return ma_data_source_get_length_in_pcm_frames(pSound->pDataSource, pLength); } MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor) { ma_result result; ma_uint64 cursorInPCMFrames; ma_uint32 sampleRate; if (pCursor != NULL) { *pCursor = 0; } result = ma_sound_get_cursor_in_pcm_frames(pSound, &cursorInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_sound_get_data_format(pSound, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a sound length is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } return ma_data_source_get_length_in_seconds(pSound->pDataSource, pLength); } MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of an end is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } pSound->endCallback = callback; pSound->pEndCallbackUserData = pUserData; return MA_SUCCESS; } MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup) { ma_sound_group_config config = ma_sound_group_config_init_2(pEngine); config.flags = flags; config.pInitialAttachment = pParentGroup; return ma_sound_group_init_ex(pEngine, &config, pGroup); } MA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup) { ma_sound_config soundConfig; if (pGroup == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pGroup); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* A sound group is just a sound without a data source. */ soundConfig = *pConfig; soundConfig.pFilePath = NULL; soundConfig.pFilePathW = NULL; soundConfig.pDataSource = NULL; /* Groups need to have spatialization disabled by default because I think it'll be pretty rare that programs will want to spatialize groups (but not unheard of). Certainly it feels like disabling this by default feels like the right option. Spatialization can be enabled with a call to ma_sound_group_set_spatialization_enabled(). */ soundConfig.flags |= MA_SOUND_FLAG_NO_SPATIALIZATION; return ma_sound_init_ex(pEngine, &soundConfig, pGroup); } MA_API void ma_sound_group_uninit(ma_sound_group* pGroup) { ma_sound_uninit(pGroup); } MA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup) { return ma_sound_get_engine(pGroup); } MA_API ma_result ma_sound_group_start(ma_sound_group* pGroup) { return ma_sound_start(pGroup); } MA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup) { return ma_sound_stop(pGroup); } MA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume) { ma_sound_set_volume(pGroup, volume); } MA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup) { return ma_sound_get_volume(pGroup); } MA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan) { ma_sound_set_pan(pGroup, pan); } MA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup) { return ma_sound_get_pan(pGroup); } MA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode) { ma_sound_set_pan_mode(pGroup, panMode); } MA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup) { return ma_sound_get_pan_mode(pGroup); } MA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch) { ma_sound_set_pitch(pGroup, pitch); } MA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup) { return ma_sound_get_pitch(pGroup); } MA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled) { ma_sound_set_spatialization_enabled(pGroup, enabled); } MA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup) { return ma_sound_is_spatialization_enabled(pGroup); } MA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex) { ma_sound_set_pinned_listener_index(pGroup, listenerIndex); } MA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup) { return ma_sound_get_pinned_listener_index(pGroup); } MA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup) { return ma_sound_get_listener_index(pGroup); } MA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup) { return ma_sound_get_direction_to_listener(pGroup); } MA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_position(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup) { return ma_sound_get_position(pGroup); } MA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_direction(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup) { return ma_sound_get_direction(pGroup); } MA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_velocity(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup) { return ma_sound_get_velocity(pGroup); } MA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel) { ma_sound_set_attenuation_model(pGroup, attenuationModel); } MA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup) { return ma_sound_get_attenuation_model(pGroup); } MA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning) { ma_sound_set_positioning(pGroup, positioning); } MA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup) { return ma_sound_get_positioning(pGroup); } MA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff) { ma_sound_set_rolloff(pGroup, rolloff); } MA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup) { return ma_sound_get_rolloff(pGroup); } MA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain) { ma_sound_set_min_gain(pGroup, minGain); } MA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup) { return ma_sound_get_min_gain(pGroup); } MA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain) { ma_sound_set_max_gain(pGroup, maxGain); } MA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup) { return ma_sound_get_max_gain(pGroup); } MA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance) { ma_sound_set_min_distance(pGroup, minDistance); } MA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup) { return ma_sound_get_min_distance(pGroup); } MA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance) { ma_sound_set_max_distance(pGroup, maxDistance); } MA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup) { return ma_sound_get_max_distance(pGroup); } MA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { ma_sound_set_cone(pGroup, innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { ma_sound_get_cone(pGroup, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor) { ma_sound_set_doppler_factor(pGroup, dopplerFactor); } MA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup) { return ma_sound_get_doppler_factor(pGroup); } MA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor) { ma_sound_set_directional_attenuation_factor(pGroup, directionalAttenuationFactor); } MA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup) { return ma_sound_get_directional_attenuation_factor(pGroup); } MA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames) { ma_sound_set_fade_in_pcm_frames(pGroup, volumeBeg, volumeEnd, fadeLengthInFrames); } MA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds) { ma_sound_set_fade_in_milliseconds(pGroup, volumeBeg, volumeEnd, fadeLengthInMilliseconds); } MA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup) { return ma_sound_get_current_fade_volume(pGroup); } MA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames) { ma_sound_set_start_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); } MA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_sound_set_start_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); } MA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames) { ma_sound_set_stop_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); } MA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_sound_set_stop_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); } MA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup) { return ma_sound_is_playing(pGroup); } MA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup) { return ma_sound_get_time_in_pcm_frames(pGroup); } #endif /* MA_NO_ENGINE */ /* END SECTION: miniaudio_engine.c */ /************************************************************************************************************************************************************** *************************************************************************************************************************************************************** Auto Generated ============== All code below is auto-generated from a tool. This mostly consists of decoding backend implementations such as ma_dr_wav, ma_dr_flac, etc. If you find a bug in the code below please report the bug to the respective repository for the relevant project (probably dr_libs). *************************************************************************************************************************************************************** **************************************************************************************************************************************************************/ #if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING)) #if !defined(MA_DR_WAV_IMPLEMENTATION) /* dr_wav_c begin */ #ifndef ma_dr_wav_c #define ma_dr_wav_c #ifdef __MRC__ #pragma options opt off #endif #include #include #include #ifndef MA_DR_WAV_NO_STDIO #include #ifndef MA_DR_WAV_NO_WCHAR #include #endif #endif #ifndef MA_DR_WAV_ASSERT #include #define MA_DR_WAV_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_WAV_MALLOC #define MA_DR_WAV_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_WAV_REALLOC #define MA_DR_WAV_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_WAV_FREE #define MA_DR_WAV_FREE(p) free((p)) #endif #ifndef MA_DR_WAV_COPY_MEMORY #define MA_DR_WAV_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_WAV_ZERO_MEMORY #define MA_DR_WAV_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #ifndef MA_DR_WAV_ZERO_OBJECT #define MA_DR_WAV_ZERO_OBJECT(p) MA_DR_WAV_ZERO_MEMORY((p), sizeof(*p)) #endif #define ma_dr_wav_countof(x) (sizeof(x) / sizeof(x[0])) #define ma_dr_wav_align(x, a) ((((x) + (a) - 1) / (a)) * (a)) #define ma_dr_wav_min(a, b) (((a) < (b)) ? (a) : (b)) #define ma_dr_wav_max(a, b) (((a) > (b)) ? (a) : (b)) #define ma_dr_wav_clamp(x, lo, hi) (ma_dr_wav_max((lo), ma_dr_wav_min((hi), (x)))) #define ma_dr_wav_offset_ptr(p, offset) (((ma_uint8*)(p)) + (offset)) #define MA_DR_WAV_MAX_SIMD_VECTOR_SIZE 32 #define MA_DR_WAV_INT64_MIN ((ma_int64) ((ma_uint64)0x80000000 << 32)) #define MA_DR_WAV_INT64_MAX ((ma_int64)(((ma_uint64)0x7FFFFFFF << 32) | 0xFFFFFFFF)) #if defined(_MSC_VER) && _MSC_VER >= 1400 #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_bswap16) #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #endif #if __has_builtin(__builtin_bswap32) #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #endif #if __has_builtin(__builtin_bswap64) #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #endif #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #endif #endif MA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_WAV_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_WAV_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_WAV_VERSION_REVISION; } } MA_API const char* ma_dr_wav_version_string(void) { return MA_DR_WAV_VERSION_STRING; } #ifndef MA_DR_WAV_MAX_SAMPLE_RATE #define MA_DR_WAV_MAX_SAMPLE_RATE 384000 #endif #ifndef MA_DR_WAV_MAX_CHANNELS #define MA_DR_WAV_MAX_CHANNELS 256 #endif #ifndef MA_DR_WAV_MAX_BITS_PER_SAMPLE #define MA_DR_WAV_MAX_BITS_PER_SAMPLE 64 #endif static const ma_uint8 ma_dr_wavGUID_W64_RIFF[16] = {0x72,0x69,0x66,0x66, 0x2E,0x91, 0xCF,0x11, 0xA5,0xD6, 0x28,0xDB,0x04,0xC1,0x00,0x00}; static const ma_uint8 ma_dr_wavGUID_W64_WAVE[16] = {0x77,0x61,0x76,0x65, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_FMT [16] = {0x66,0x6D,0x74,0x20, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_FACT[16] = {0x66,0x61,0x63,0x74, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_DATA[16] = {0x64,0x61,0x74,0x61, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static MA_INLINE int ma_dr_wav__is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE void ma_dr_wav_bytes_to_guid(const ma_uint8* data, ma_uint8* guid) { int i; for (i = 0; i < 16; ++i) { guid[i] = data[i]; } } static MA_INLINE ma_uint16 ma_dr_wav__bswap16(ma_uint16 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #if defined(_MSC_VER) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); #endif } static MA_INLINE ma_uint32 ma_dr_wav__bswap32(ma_uint32 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT) ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } static MA_INLINE ma_uint64 ma_dr_wav__bswap64(ma_uint64 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #if defined(_MSC_VER) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) | ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) | ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) | ((n & ((ma_uint64)0x000000FF << 32)) >> 8) | ((n & ((ma_uint64)0xFF000000 )) << 8) | ((n & ((ma_uint64)0x00FF0000 )) << 24) | ((n & ((ma_uint64)0x0000FF00 )) << 40) | ((n & ((ma_uint64)0x000000FF )) << 56); #endif } static MA_INLINE ma_int16 ma_dr_wav__bswap_s16(ma_int16 n) { return (ma_int16)ma_dr_wav__bswap16((ma_uint16)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s16(ma_int16* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s16(pSamples[iSample]); } } static MA_INLINE void ma_dr_wav__bswap_s24(ma_uint8* p) { ma_uint8 t; t = p[0]; p[0] = p[2]; p[2] = t; } static MA_INLINE void ma_dr_wav__bswap_samples_s24(ma_uint8* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { ma_uint8* pSample = pSamples + (iSample*3); ma_dr_wav__bswap_s24(pSample); } } static MA_INLINE ma_int32 ma_dr_wav__bswap_s32(ma_int32 n) { return (ma_int32)ma_dr_wav__bswap32((ma_uint32)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s32(ma_int32* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s32(pSamples[iSample]); } } static MA_INLINE ma_int64 ma_dr_wav__bswap_s64(ma_int64 n) { return (ma_int64)ma_dr_wav__bswap64((ma_uint64)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s64(ma_int64* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s64(pSamples[iSample]); } } static MA_INLINE float ma_dr_wav__bswap_f32(float n) { union { ma_uint32 i; float f; } x; x.f = n; x.i = ma_dr_wav__bswap32(x.i); return x.f; } static MA_INLINE void ma_dr_wav__bswap_samples_f32(float* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_f32(pSamples[iSample]); } } static MA_INLINE void ma_dr_wav__bswap_samples(void* pSamples, ma_uint64 sampleCount, ma_uint32 bytesPerSample) { switch (bytesPerSample) { case 1: { } break; case 2: { ma_dr_wav__bswap_samples_s16((ma_int16*)pSamples, sampleCount); } break; case 3: { ma_dr_wav__bswap_samples_s24((ma_uint8*)pSamples, sampleCount); } break; case 4: { ma_dr_wav__bswap_samples_s32((ma_int32*)pSamples, sampleCount); } break; case 8: { ma_dr_wav__bswap_samples_s64((ma_int64*)pSamples, sampleCount); } break; default: { MA_DR_WAV_ASSERT(MA_FALSE); } break; } } MA_PRIVATE MA_INLINE ma_bool32 ma_dr_wav_is_container_be(ma_dr_wav_container container) { if (container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_aiff) { return MA_TRUE; } else { return MA_FALSE; } } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_le(const ma_uint8* data) { return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8); } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_be(const ma_uint8* data) { return ((ma_uint16)data[1] << 0) | ((ma_uint16)data[0] << 8); } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_ex(const ma_uint8* data, ma_dr_wav_container container) { if (ma_dr_wav_is_container_be(container)) { return ma_dr_wav_bytes_to_u16_be(data); } else { return ma_dr_wav_bytes_to_u16_le(data); } } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_le(const ma_uint8* data) { return ((ma_uint32)data[0] << 0) | ((ma_uint32)data[1] << 8) | ((ma_uint32)data[2] << 16) | ((ma_uint32)data[3] << 24); } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_be(const ma_uint8* data) { return ((ma_uint32)data[3] << 0) | ((ma_uint32)data[2] << 8) | ((ma_uint32)data[1] << 16) | ((ma_uint32)data[0] << 24); } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_ex(const ma_uint8* data, ma_dr_wav_container container) { if (ma_dr_wav_is_container_be(container)) { return ma_dr_wav_bytes_to_u32_be(data); } else { return ma_dr_wav_bytes_to_u32_le(data); } } MA_PRIVATE ma_int64 ma_dr_wav_aiff_extented_to_s64(const ma_uint8* data) { ma_uint32 exponent = ((ma_uint32)data[0] << 8) | data[1]; ma_uint64 hi = ((ma_uint64)data[2] << 24) | ((ma_uint64)data[3] << 16) | ((ma_uint64)data[4] << 8) | ((ma_uint64)data[5] << 0); ma_uint64 lo = ((ma_uint64)data[6] << 24) | ((ma_uint64)data[7] << 16) | ((ma_uint64)data[8] << 8) | ((ma_uint64)data[9] << 0); ma_uint64 significand = (hi << 32) | lo; int sign = exponent >> 15; exponent &= 0x7FFF; if (exponent == 0 && significand == 0) { return 0; } else if (exponent == 0x7FFF) { return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX; } exponent -= 16383; if (exponent > 63) { return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX; } else if (exponent < 1) { return 0; } significand >>= (63 - exponent); if (sign) { return -(ma_int64)significand; } else { return (ma_int64)significand; } } MA_PRIVATE void* ma_dr_wav__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_WAV_MALLOC(sz); } MA_PRIVATE void* ma_dr_wav__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_WAV_REALLOC(p, sz); } MA_PRIVATE void ma_dr_wav__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_WAV_FREE(p); } MA_PRIVATE void* ma_dr_wav__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } MA_PRIVATE void* ma_dr_wav__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_WAV_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } MA_PRIVATE void ma_dr_wav__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } MA_PRIVATE ma_allocation_callbacks ma_dr_wav_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return *pAllocationCallbacks; } else { ma_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_wav__malloc_default; allocationCallbacks.onRealloc = ma_dr_wav__realloc_default; allocationCallbacks.onFree = ma_dr_wav__free_default; return allocationCallbacks; } } static MA_INLINE ma_bool32 ma_dr_wav__is_compressed_format_tag(ma_uint16 formatTag) { return formatTag == MA_DR_WAVE_FORMAT_ADPCM || formatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM; } MA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_riff(ma_uint64 chunkSize) { return (unsigned int)(chunkSize % 2); } MA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_w64(ma_uint64 chunkSize) { return (unsigned int)(chunkSize % 8); } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut); MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut); MA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount); MA_PRIVATE ma_result ma_dr_wav__read_chunk_header(ma_dr_wav_read_proc onRead, void* pUserData, ma_dr_wav_container container, ma_uint64* pRunningBytesReadOut, ma_dr_wav_chunk_header* pHeaderOut) { if (container == ma_dr_wav_container_riff || container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_rf64 || container == ma_dr_wav_container_aiff) { ma_uint8 sizeInBytes[4]; if (onRead(pUserData, pHeaderOut->id.fourcc, 4) != 4) { return MA_AT_END; } if (onRead(pUserData, sizeInBytes, 4) != 4) { return MA_INVALID_FILE; } pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u32_ex(sizeInBytes, container); pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_riff(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 8; } else if (container == ma_dr_wav_container_w64) { ma_uint8 sizeInBytes[8]; if (onRead(pUserData, pHeaderOut->id.guid, 16) != 16) { return MA_AT_END; } if (onRead(pUserData, sizeInBytes, 8) != 8) { return MA_INVALID_FILE; } pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u64(sizeInBytes) - 24; pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_w64(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 24; } else { return MA_INVALID_FILE; } return MA_SUCCESS; } MA_PRIVATE ma_bool32 ma_dr_wav__seek_forward(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData) { ma_uint64 bytesRemainingToSeek = offset; while (bytesRemainingToSeek > 0) { if (bytesRemainingToSeek > 0x7FFFFFFF) { if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } bytesRemainingToSeek -= 0x7FFFFFFF; } else { if (!onSeek(pUserData, (int)bytesRemainingToSeek, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } bytesRemainingToSeek = 0; } } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav__seek_from_start(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData) { if (offset <= 0x7FFFFFFF) { return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_start); } if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_start)) { return MA_FALSE; } offset -= 0x7FFFFFFF; for (;;) { if (offset <= 0x7FFFFFFF) { return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_current); } if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } offset -= 0x7FFFFFFF; } } MA_PRIVATE size_t ma_dr_wav__on_read(ma_dr_wav_read_proc onRead, void* pUserData, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor) { size_t bytesRead; MA_DR_WAV_ASSERT(onRead != NULL); MA_DR_WAV_ASSERT(pCursor != NULL); bytesRead = onRead(pUserData, pBufferOut, bytesToRead); *pCursor += bytesRead; return bytesRead; } #if 0 MA_PRIVATE ma_bool32 ma_dr_wav__on_seek(ma_dr_wav_seek_proc onSeek, void* pUserData, int offset, ma_dr_wav_seek_origin origin, ma_uint64* pCursor) { MA_DR_WAV_ASSERT(onSeek != NULL); MA_DR_WAV_ASSERT(pCursor != NULL); if (!onSeek(pUserData, offset, origin)) { return MA_FALSE; } if (origin == ma_dr_wav_seek_origin_start) { *pCursor = offset; } else { *pCursor += offset; } return MA_TRUE; } #endif #define MA_DR_WAV_SMPL_BYTES 36 #define MA_DR_WAV_SMPL_LOOP_BYTES 24 #define MA_DR_WAV_INST_BYTES 7 #define MA_DR_WAV_ACID_BYTES 24 #define MA_DR_WAV_CUE_BYTES 4 #define MA_DR_WAV_BEXT_BYTES 602 #define MA_DR_WAV_BEXT_DESCRIPTION_BYTES 256 #define MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES 32 #define MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES 32 #define MA_DR_WAV_BEXT_RESERVED_BYTES 180 #define MA_DR_WAV_BEXT_UMID_BYTES 64 #define MA_DR_WAV_CUE_POINT_BYTES 24 #define MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES 4 #define MA_DR_WAV_LIST_LABELLED_TEXT_BYTES 20 #define MA_DR_WAV_METADATA_ALIGNMENT 8 typedef enum { ma_dr_wav__metadata_parser_stage_count, ma_dr_wav__metadata_parser_stage_read } ma_dr_wav__metadata_parser_stage; typedef struct { ma_dr_wav_read_proc onRead; ma_dr_wav_seek_proc onSeek; void *pReadSeekUserData; ma_dr_wav__metadata_parser_stage stage; ma_dr_wav_metadata *pMetadata; ma_uint32 metadataCount; ma_uint8 *pData; ma_uint8 *pDataCursor; ma_uint64 metadataCursor; ma_uint64 extraCapacity; } ma_dr_wav__metadata_parser; MA_PRIVATE size_t ma_dr_wav__metadata_memory_capacity(ma_dr_wav__metadata_parser* pParser) { ma_uint64 cap = sizeof(ma_dr_wav_metadata) * (ma_uint64)pParser->metadataCount + pParser->extraCapacity; if (cap > MA_SIZE_MAX) { return 0; } return (size_t)cap; } MA_PRIVATE ma_uint8* ma_dr_wav__metadata_get_memory(ma_dr_wav__metadata_parser* pParser, size_t size, size_t align) { ma_uint8* pResult; if (align) { ma_uintptr modulo = (ma_uintptr)pParser->pDataCursor % align; if (modulo != 0) { pParser->pDataCursor += align - modulo; } } pResult = pParser->pDataCursor; MA_DR_WAV_ASSERT((pResult + size) <= (pParser->pData + ma_dr_wav__metadata_memory_capacity(pParser))); pParser->pDataCursor += size; return pResult; } MA_PRIVATE void ma_dr_wav__metadata_request_extra_memory_for_stage_2(ma_dr_wav__metadata_parser* pParser, size_t bytes, size_t align) { size_t extra = bytes + (align ? (align - 1) : 0); pParser->extraCapacity += extra; } MA_PRIVATE ma_result ma_dr_wav__metadata_alloc(ma_dr_wav__metadata_parser* pParser, ma_allocation_callbacks* pAllocationCallbacks) { if (pParser->extraCapacity != 0 || pParser->metadataCount != 0) { pAllocationCallbacks->onFree(pParser->pData, pAllocationCallbacks->pUserData); pParser->pData = (ma_uint8*)pAllocationCallbacks->onMalloc(ma_dr_wav__metadata_memory_capacity(pParser), pAllocationCallbacks->pUserData); pParser->pDataCursor = pParser->pData; if (pParser->pData == NULL) { return MA_OUT_OF_MEMORY; } pParser->pMetadata = (ma_dr_wav_metadata*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_metadata) * pParser->metadataCount, 1); pParser->metadataCursor = 0; } return MA_SUCCESS; } MA_PRIVATE size_t ma_dr_wav__metadata_parser_read(ma_dr_wav__metadata_parser* pParser, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor) { if (pCursor != NULL) { return ma_dr_wav__on_read(pParser->onRead, pParser->pReadSeekUserData, pBufferOut, bytesToRead, pCursor); } else { return pParser->onRead(pParser->pReadSeekUserData, pBufferOut, bytesToRead); } } MA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata) { ma_uint8 smplHeaderData[MA_DR_WAV_SMPL_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead; if (pMetadata == NULL) { return 0; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplHeaderData, sizeof(smplHeaderData), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); MA_DR_WAV_ASSERT(pChunkHeader != NULL); if (pMetadata != NULL && bytesJustRead == sizeof(smplHeaderData)) { ma_uint32 iSampleLoop; pMetadata->type = ma_dr_wav_metadata_type_smpl; pMetadata->data.smpl.manufacturerId = ma_dr_wav_bytes_to_u32(smplHeaderData + 0); pMetadata->data.smpl.productId = ma_dr_wav_bytes_to_u32(smplHeaderData + 4); pMetadata->data.smpl.samplePeriodNanoseconds = ma_dr_wav_bytes_to_u32(smplHeaderData + 8); pMetadata->data.smpl.midiUnityNote = ma_dr_wav_bytes_to_u32(smplHeaderData + 12); pMetadata->data.smpl.midiPitchFraction = ma_dr_wav_bytes_to_u32(smplHeaderData + 16); pMetadata->data.smpl.smpteFormat = ma_dr_wav_bytes_to_u32(smplHeaderData + 20); pMetadata->data.smpl.smpteOffset = ma_dr_wav_bytes_to_u32(smplHeaderData + 24); pMetadata->data.smpl.sampleLoopCount = ma_dr_wav_bytes_to_u32(smplHeaderData + 28); pMetadata->data.smpl.samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(smplHeaderData + 32); if (pMetadata->data.smpl.sampleLoopCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES) { pMetadata->data.smpl.pLoops = (ma_dr_wav_smpl_loop*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_smpl_loop) * pMetadata->data.smpl.sampleLoopCount, MA_DR_WAV_METADATA_ALIGNMENT); for (iSampleLoop = 0; iSampleLoop < pMetadata->data.smpl.sampleLoopCount; ++iSampleLoop) { ma_uint8 smplLoopData[MA_DR_WAV_SMPL_LOOP_BYTES]; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplLoopData, sizeof(smplLoopData), &totalBytesRead); if (bytesJustRead == sizeof(smplLoopData)) { pMetadata->data.smpl.pLoops[iSampleLoop].cuePointId = ma_dr_wav_bytes_to_u32(smplLoopData + 0); pMetadata->data.smpl.pLoops[iSampleLoop].type = ma_dr_wav_bytes_to_u32(smplLoopData + 4); pMetadata->data.smpl.pLoops[iSampleLoop].firstSampleByteOffset = ma_dr_wav_bytes_to_u32(smplLoopData + 8); pMetadata->data.smpl.pLoops[iSampleLoop].lastSampleByteOffset = ma_dr_wav_bytes_to_u32(smplLoopData + 12); pMetadata->data.smpl.pLoops[iSampleLoop].sampleFraction = ma_dr_wav_bytes_to_u32(smplLoopData + 16); pMetadata->data.smpl.pLoops[iSampleLoop].playCount = ma_dr_wav_bytes_to_u32(smplLoopData + 20); } else { break; } } if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) { pMetadata->data.smpl.pSamplerSpecificData = ma_dr_wav__metadata_get_memory(pParser, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, 1); MA_DR_WAV_ASSERT(pMetadata->data.smpl.pSamplerSpecificData != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, &totalBytesRead); } } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_cue_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata) { ma_uint8 cueHeaderSectionData[MA_DR_WAV_CUE_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead; if (pMetadata == NULL) { return 0; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueHeaderSectionData, sizeof(cueHeaderSectionData), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(cueHeaderSectionData)) { pMetadata->type = ma_dr_wav_metadata_type_cue; pMetadata->data.cue.cuePointCount = ma_dr_wav_bytes_to_u32(cueHeaderSectionData); if (pMetadata->data.cue.cuePointCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES) { pMetadata->data.cue.pCuePoints = (ma_dr_wav_cue_point*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_cue_point) * pMetadata->data.cue.cuePointCount, MA_DR_WAV_METADATA_ALIGNMENT); MA_DR_WAV_ASSERT(pMetadata->data.cue.pCuePoints != NULL); if (pMetadata->data.cue.cuePointCount > 0) { ma_uint32 iCuePoint; for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) { ma_uint8 cuePointData[MA_DR_WAV_CUE_POINT_BYTES]; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cuePointData, sizeof(cuePointData), &totalBytesRead); if (bytesJustRead == sizeof(cuePointData)) { pMetadata->data.cue.pCuePoints[iCuePoint].id = ma_dr_wav_bytes_to_u32(cuePointData + 0); pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition = ma_dr_wav_bytes_to_u32(cuePointData + 4); pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[0] = cuePointData[8]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[1] = cuePointData[9]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[2] = cuePointData[10]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[3] = cuePointData[11]; pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart = ma_dr_wav_bytes_to_u32(cuePointData + 12); pMetadata->data.cue.pCuePoints[iCuePoint].blockStart = ma_dr_wav_bytes_to_u32(cuePointData + 16); pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset = ma_dr_wav_bytes_to_u32(cuePointData + 20); } else { break; } } } } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_inst_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata) { ma_uint8 instData[MA_DR_WAV_INST_BYTES]; ma_uint64 bytesRead; if (pMetadata == NULL) { return 0; } bytesRead = ma_dr_wav__metadata_parser_read(pParser, instData, sizeof(instData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(instData)) { pMetadata->type = ma_dr_wav_metadata_type_inst; pMetadata->data.inst.midiUnityNote = (ma_int8)instData[0]; pMetadata->data.inst.fineTuneCents = (ma_int8)instData[1]; pMetadata->data.inst.gainDecibels = (ma_int8)instData[2]; pMetadata->data.inst.lowNote = (ma_int8)instData[3]; pMetadata->data.inst.highNote = (ma_int8)instData[4]; pMetadata->data.inst.lowVelocity = (ma_int8)instData[5]; pMetadata->data.inst.highVelocity = (ma_int8)instData[6]; } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_acid_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata) { ma_uint8 acidData[MA_DR_WAV_ACID_BYTES]; ma_uint64 bytesRead; if (pMetadata == NULL) { return 0; } bytesRead = ma_dr_wav__metadata_parser_read(pParser, acidData, sizeof(acidData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(acidData)) { pMetadata->type = ma_dr_wav_metadata_type_acid; pMetadata->data.acid.flags = ma_dr_wav_bytes_to_u32(acidData + 0); pMetadata->data.acid.midiUnityNote = ma_dr_wav_bytes_to_u16(acidData + 4); pMetadata->data.acid.reserved1 = ma_dr_wav_bytes_to_u16(acidData + 6); pMetadata->data.acid.reserved2 = ma_dr_wav_bytes_to_f32(acidData + 8); pMetadata->data.acid.numBeats = ma_dr_wav_bytes_to_u32(acidData + 12); pMetadata->data.acid.meterDenominator = ma_dr_wav_bytes_to_u16(acidData + 16); pMetadata->data.acid.meterNumerator = ma_dr_wav_bytes_to_u16(acidData + 18); pMetadata->data.acid.tempo = ma_dr_wav_bytes_to_f32(acidData + 20); } return bytesRead; } MA_PRIVATE size_t ma_dr_wav__strlen(const char* str) { size_t result = 0; while (*str++) { result += 1; } return result; } MA_PRIVATE size_t ma_dr_wav__strlen_clamped(const char* str, size_t maxToRead) { size_t result = 0; while (*str++ && result < maxToRead) { result += 1; } return result; } MA_PRIVATE char* ma_dr_wav__metadata_copy_string(ma_dr_wav__metadata_parser* pParser, const char* str, size_t maxToRead) { size_t len = ma_dr_wav__strlen_clamped(str, maxToRead); if (len) { char* result = (char*)ma_dr_wav__metadata_get_memory(pParser, len + 1, 1); MA_DR_WAV_ASSERT(result != NULL); MA_DR_WAV_COPY_MEMORY(result, str, len); result[len] = '\0'; return result; } else { return NULL; } } typedef struct { const void* pBuffer; size_t sizeInBytes; size_t cursor; } ma_dr_wav_buffer_reader; MA_PRIVATE ma_result ma_dr_wav_buffer_reader_init(const void* pBuffer, size_t sizeInBytes, ma_dr_wav_buffer_reader* pReader) { MA_DR_WAV_ASSERT(pBuffer != NULL); MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ZERO_OBJECT(pReader); pReader->pBuffer = pBuffer; pReader->sizeInBytes = sizeInBytes; pReader->cursor = 0; return MA_SUCCESS; } MA_PRIVATE const void* ma_dr_wav_buffer_reader_ptr(const ma_dr_wav_buffer_reader* pReader) { MA_DR_WAV_ASSERT(pReader != NULL); return ma_dr_wav_offset_ptr(pReader->pBuffer, pReader->cursor); } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_seek(ma_dr_wav_buffer_reader* pReader, size_t bytesToSeek) { MA_DR_WAV_ASSERT(pReader != NULL); if (pReader->cursor + bytesToSeek > pReader->sizeInBytes) { return MA_BAD_SEEK; } pReader->cursor += bytesToSeek; return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read(ma_dr_wav_buffer_reader* pReader, void* pDst, size_t bytesToRead, size_t* pBytesRead) { ma_result result = MA_SUCCESS; size_t bytesRemaining; MA_DR_WAV_ASSERT(pReader != NULL); if (pBytesRead != NULL) { *pBytesRead = 0; } bytesRemaining = (pReader->sizeInBytes - pReader->cursor); if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (pDst == NULL) { result = ma_dr_wav_buffer_reader_seek(pReader, bytesToRead); } else { MA_DR_WAV_COPY_MEMORY(pDst, ma_dr_wav_buffer_reader_ptr(pReader), bytesToRead); pReader->cursor += bytesToRead; } MA_DR_WAV_ASSERT(pReader->cursor <= pReader->sizeInBytes); if (result == MA_SUCCESS) { if (pBytesRead != NULL) { *pBytesRead = bytesToRead; } } return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u16(ma_dr_wav_buffer_reader* pReader, ma_uint16* pDst) { ma_result result; size_t bytesRead; ma_uint8 data[2]; MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ASSERT(pDst != NULL); *pDst = 0; result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead); if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) { return result; } *pDst = ma_dr_wav_bytes_to_u16(data); return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u32(ma_dr_wav_buffer_reader* pReader, ma_uint32* pDst) { ma_result result; size_t bytesRead; ma_uint8 data[4]; MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ASSERT(pDst != NULL); *pDst = 0; result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead); if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) { return result; } *pDst = ma_dr_wav_bytes_to_u32(data); return MA_SUCCESS; } MA_PRIVATE ma_uint64 ma_dr_wav__read_bext_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize) { ma_uint8 bextData[MA_DR_WAV_BEXT_BYTES]; size_t bytesRead = ma_dr_wav__metadata_parser_read(pParser, bextData, sizeof(bextData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(bextData)) { ma_dr_wav_buffer_reader reader; ma_uint32 timeReferenceLow; ma_uint32 timeReferenceHigh; size_t extraBytes; pMetadata->type = ma_dr_wav_metadata_type_bext; if (ma_dr_wav_buffer_reader_init(bextData, bytesRead, &reader) == MA_SUCCESS) { pMetadata->data.bext.pDescription = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_DESCRIPTION_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_DESCRIPTION_BYTES); pMetadata->data.bext.pOriginatorName = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); pMetadata->data.bext.pOriginatorReference = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate), NULL); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime), NULL); ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceLow); ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceHigh); pMetadata->data.bext.timeReference = ((ma_uint64)timeReferenceHigh << 32) + timeReferenceLow; ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.version); pMetadata->data.bext.pUMID = ma_dr_wav__metadata_get_memory(pParser, MA_DR_WAV_BEXT_UMID_BYTES, 1); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES, NULL); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessValue); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessRange); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxTruePeakLevel); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxMomentaryLoudness); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxShortTermLoudness); MA_DR_WAV_ASSERT((ma_dr_wav_offset_ptr(ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_RESERVED_BYTES)) == (bextData + MA_DR_WAV_BEXT_BYTES)); extraBytes = (size_t)(chunkSize - MA_DR_WAV_BEXT_BYTES); if (extraBytes > 0) { pMetadata->data.bext.pCodingHistory = (char*)ma_dr_wav__metadata_get_memory(pParser, extraBytes + 1, 1); MA_DR_WAV_ASSERT(pMetadata->data.bext.pCodingHistory != NULL); bytesRead += ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.bext.pCodingHistory, extraBytes, NULL); pMetadata->data.bext.codingHistorySize = (ma_uint32)ma_dr_wav__strlen(pMetadata->data.bext.pCodingHistory); } else { pMetadata->data.bext.pCodingHistory = NULL; pMetadata->data.bext.codingHistorySize = 0; } } } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_list_label_or_note_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize, ma_dr_wav_metadata_type type) { ma_uint8 cueIDBuffer[MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueIDBuffer, sizeof(cueIDBuffer), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(cueIDBuffer)) { ma_uint32 sizeIncludingNullTerminator; pMetadata->type = type; pMetadata->data.labelOrNote.cuePointId = ma_dr_wav_bytes_to_u32(cueIDBuffer); sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (sizeIncludingNullTerminator > 0) { pMetadata->data.labelOrNote.stringLength = sizeIncludingNullTerminator - 1; pMetadata->data.labelOrNote.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelOrNote.pString, sizeIncludingNullTerminator, &totalBytesRead); } else { pMetadata->data.labelOrNote.stringLength = 0; pMetadata->data.labelOrNote.pString = NULL; } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize) { ma_uint8 buffer[MA_DR_WAV_LIST_LABELLED_TEXT_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(buffer)) { ma_uint32 sizeIncludingNullTerminator; pMetadata->type = ma_dr_wav_metadata_type_list_labelled_cue_region; pMetadata->data.labelledCueRegion.cuePointId = ma_dr_wav_bytes_to_u32(buffer + 0); pMetadata->data.labelledCueRegion.sampleLength = ma_dr_wav_bytes_to_u32(buffer + 4); pMetadata->data.labelledCueRegion.purposeId[0] = buffer[8]; pMetadata->data.labelledCueRegion.purposeId[1] = buffer[9]; pMetadata->data.labelledCueRegion.purposeId[2] = buffer[10]; pMetadata->data.labelledCueRegion.purposeId[3] = buffer[11]; pMetadata->data.labelledCueRegion.country = ma_dr_wav_bytes_to_u16(buffer + 12); pMetadata->data.labelledCueRegion.language = ma_dr_wav_bytes_to_u16(buffer + 14); pMetadata->data.labelledCueRegion.dialect = ma_dr_wav_bytes_to_u16(buffer + 16); pMetadata->data.labelledCueRegion.codePage = ma_dr_wav_bytes_to_u16(buffer + 18); sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (sizeIncludingNullTerminator > 0) { pMetadata->data.labelledCueRegion.stringLength = sizeIncludingNullTerminator - 1; pMetadata->data.labelledCueRegion.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelledCueRegion.pString, sizeIncludingNullTerminator, &totalBytesRead); } else { pMetadata->data.labelledCueRegion.stringLength = 0; pMetadata->data.labelledCueRegion.pString = NULL; } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_info_text_chunk(ma_dr_wav__metadata_parser* pParser, ma_uint64 chunkSize, ma_dr_wav_metadata_type type) { ma_uint64 bytesRead = 0; ma_uint32 stringSizeWithNullTerminator = (ma_uint32)chunkSize; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, stringSizeWithNullTerminator, 1); } else { ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor]; pMetadata->type = type; if (stringSizeWithNullTerminator > 0) { pMetadata->data.infoText.stringLength = stringSizeWithNullTerminator - 1; pMetadata->data.infoText.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, stringSizeWithNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.infoText.pString != NULL); bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.infoText.pString, (size_t)stringSizeWithNullTerminator, NULL); if (bytesRead == chunkSize) { pParser->metadataCursor += 1; } else { } } else { pMetadata->data.infoText.stringLength = 0; pMetadata->data.infoText.pString = NULL; pParser->metadataCursor += 1; } } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_unknown_chunk(ma_dr_wav__metadata_parser* pParser, const ma_uint8* pChunkId, ma_uint64 chunkSize, ma_dr_wav_metadata_location location) { ma_uint64 bytesRead = 0; if (location == ma_dr_wav_metadata_location_invalid) { return 0; } if (ma_dr_wav_fourcc_equal(pChunkId, "data") || ma_dr_wav_fourcc_equal(pChunkId, "fmt ") || ma_dr_wav_fourcc_equal(pChunkId, "fact")) { return 0; } if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)chunkSize, 1); } else { ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor]; pMetadata->type = ma_dr_wav_metadata_type_unknown; pMetadata->data.unknown.chunkLocation = location; pMetadata->data.unknown.id[0] = pChunkId[0]; pMetadata->data.unknown.id[1] = pChunkId[1]; pMetadata->data.unknown.id[2] = pChunkId[2]; pMetadata->data.unknown.id[3] = pChunkId[3]; pMetadata->data.unknown.dataSizeInBytes = (ma_uint32)chunkSize; pMetadata->data.unknown.pData = (ma_uint8 *)ma_dr_wav__metadata_get_memory(pParser, (size_t)chunkSize, 1); MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL); bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes, NULL); if (bytesRead == pMetadata->data.unknown.dataSizeInBytes) { pParser->metadataCursor += 1; } else { } } return bytesRead; } MA_PRIVATE ma_bool32 ma_dr_wav__chunk_matches(ma_dr_wav_metadata_type allowedMetadataTypes, const ma_uint8* pChunkID, ma_dr_wav_metadata_type type, const char* pID) { return (allowedMetadataTypes & type) && ma_dr_wav_fourcc_equal(pChunkID, pID); } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_chunk(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata_type allowedMetadataTypes) { const ma_uint8 *pChunkID = pChunkHeader->id.fourcc; ma_uint64 bytesRead = 0; if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_smpl, "smpl")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_SMPL_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { ma_uint8 buffer[4]; size_t bytesJustRead; if (!pParser->onSeek(pParser->pReadSeekUserData, 28, ma_dr_wav_seek_origin_current)) { return bytesRead; } bytesRead += 28; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead); if (bytesJustRead == sizeof(buffer)) { ma_uint32 loopCount = ma_dr_wav_bytes_to_u32(buffer); ma_uint64 calculatedLoopCount; calculatedLoopCount = (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES; if (calculatedLoopCount == loopCount) { bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead); if (bytesJustRead == sizeof(buffer)) { ma_uint32 samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(buffer); pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_smpl_loop) * loopCount, MA_DR_WAV_METADATA_ALIGNMENT); ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, samplerSpecificDataSizeInBytes, 1); } } else { } } } else { bytesRead = ma_dr_wav__read_smpl_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_inst, "inst")) { if (pChunkHeader->sizeInBytes == MA_DR_WAV_INST_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_inst_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_acid, "acid")) { if (pChunkHeader->sizeInBytes == MA_DR_WAV_ACID_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_acid_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_cue, "cue ")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_CUE_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { size_t cueCount; pParser->metadataCount += 1; cueCount = (size_t)(pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_cue_point) * cueCount, MA_DR_WAV_METADATA_ALIGNMENT); } else { bytesRead = ma_dr_wav__read_cue_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_bext, "bext")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_BEXT_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { char buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES + 1]; size_t allocSizeNeeded = MA_DR_WAV_BEXT_UMID_BYTES; size_t bytesJustRead; buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_DESCRIPTION_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_DESCRIPTION_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; buffer[MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; buffer[MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; allocSizeNeeded += (size_t)pChunkHeader->sizeInBytes - MA_DR_WAV_BEXT_BYTES; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, allocSizeNeeded, 1); pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_bext_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], pChunkHeader->sizeInBytes); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav_fourcc_equal(pChunkID, "LIST") || ma_dr_wav_fourcc_equal(pChunkID, "list")) { ma_dr_wav_metadata_location listType = ma_dr_wav_metadata_location_invalid; while (bytesRead < pChunkHeader->sizeInBytes) { ma_uint8 subchunkId[4]; ma_uint8 subchunkSizeBuffer[4]; ma_uint64 subchunkDataSize; ma_uint64 subchunkBytesRead = 0; ma_uint64 bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkId, sizeof(subchunkId), &bytesRead); if (bytesJustRead != sizeof(subchunkId)) { break; } if (ma_dr_wav_fourcc_equal(subchunkId, "adtl")) { listType = ma_dr_wav_metadata_location_inside_adtl_list; continue; } else if (ma_dr_wav_fourcc_equal(subchunkId, "INFO")) { listType = ma_dr_wav_metadata_location_inside_info_list; continue; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkSizeBuffer, sizeof(subchunkSizeBuffer), &bytesRead); if (bytesJustRead != sizeof(subchunkSizeBuffer)) { break; } subchunkDataSize = ma_dr_wav_bytes_to_u32(subchunkSizeBuffer); if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_label, "labl") || ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_note, "note")) { if (subchunkDataSize >= MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES) { ma_uint64 stringSizeWithNullTerm = subchunkDataSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerm, 1); } else { subchunkBytesRead = ma_dr_wav__read_list_label_or_note_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize, ma_dr_wav_fourcc_equal(subchunkId, "labl") ? ma_dr_wav_metadata_type_list_label : ma_dr_wav_metadata_type_list_note); if (subchunkBytesRead == subchunkDataSize) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_labelled_cue_region, "ltxt")) { if (subchunkDataSize >= MA_DR_WAV_LIST_LABELLED_TEXT_BYTES) { ma_uint64 stringSizeWithNullTerminator = subchunkDataSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerminator, 1); } else { subchunkBytesRead = ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize); if (subchunkBytesRead == subchunkDataSize) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_software, "ISFT")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_software); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_copyright, "ICOP")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_copyright); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_title, "INAM")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_title); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_artist, "IART")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_artist); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_comment, "ICMT")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_comment); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_date, "ICRD")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_date); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_genre, "IGNR")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_genre); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_album, "IPRD")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_album); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_tracknumber, "ITRK")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_tracknumber); } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) { subchunkBytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, subchunkId, subchunkDataSize, listType); } bytesRead += subchunkBytesRead; MA_DR_WAV_ASSERT(subchunkBytesRead <= subchunkDataSize); if (subchunkBytesRead < subchunkDataSize) { ma_uint64 bytesToSeek = subchunkDataSize - subchunkBytesRead; if (!pParser->onSeek(pParser->pReadSeekUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current)) { break; } bytesRead += bytesToSeek; } if ((subchunkDataSize % 2) == 1) { if (!pParser->onSeek(pParser->pReadSeekUserData, 1, ma_dr_wav_seek_origin_current)) { break; } bytesRead += 1; } } } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) { bytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, pChunkID, pChunkHeader->sizeInBytes, ma_dr_wav_metadata_location_top_level); } return bytesRead; } MA_PRIVATE ma_uint32 ma_dr_wav_get_bytes_per_pcm_frame(ma_dr_wav* pWav) { ma_uint32 bytesPerFrame; if ((pWav->bitsPerSample & 0x7) == 0) { bytesPerFrame = (pWav->bitsPerSample * pWav->fmt.channels) >> 3; } else { bytesPerFrame = pWav->fmt.blockAlign; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { if (bytesPerFrame != pWav->fmt.channels) { return 0; } } return bytesPerFrame; } MA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT) { if (pFMT == NULL) { return 0; } if (pFMT->formatTag != MA_DR_WAVE_FORMAT_EXTENSIBLE) { return pFMT->formatTag; } else { return ma_dr_wav_bytes_to_u16(pFMT->subFormat); } } MA_PRIVATE ma_bool32 ma_dr_wav_preinit(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onRead == NULL || onSeek == NULL) { return MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav)); pWav->onRead = onRead; pWav->onSeek = onSeek; pWav->pUserData = pReadSeekUserData; pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init__internal(ma_dr_wav* pWav, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags) { ma_result result; ma_uint64 cursor; ma_bool32 sequential; ma_uint8 riff[4]; ma_dr_wav_fmt fmt; unsigned short translatedFormatTag; ma_uint64 dataChunkSize = 0; ma_uint64 sampleCountFromFactChunk = 0; ma_uint64 metadataStartPos; ma_dr_wav__metadata_parser metadataParser; ma_bool8 isProcessingMetadata = MA_FALSE; ma_bool8 foundChunk_fmt = MA_FALSE; ma_bool8 foundChunk_data = MA_FALSE; ma_bool8 isAIFCFormType = MA_FALSE; ma_uint64 aiffFrameCount = 0; cursor = 0; sequential = (flags & MA_DR_WAV_SEQUENTIAL) != 0; MA_DR_WAV_ZERO_OBJECT(&fmt); if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff, sizeof(riff), &cursor) != sizeof(riff)) { return MA_FALSE; } if (ma_dr_wav_fourcc_equal(riff, "RIFF")) { pWav->container = ma_dr_wav_container_riff; } else if (ma_dr_wav_fourcc_equal(riff, "RIFX")) { pWav->container = ma_dr_wav_container_rifx; } else if (ma_dr_wav_fourcc_equal(riff, "riff")) { int i; ma_uint8 riff2[12]; pWav->container = ma_dr_wav_container_w64; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff2, sizeof(riff2), &cursor) != sizeof(riff2)) { return MA_FALSE; } for (i = 0; i < 12; ++i) { if (riff2[i] != ma_dr_wavGUID_W64_RIFF[i+4]) { return MA_FALSE; } } } else if (ma_dr_wav_fourcc_equal(riff, "RF64")) { pWav->container = ma_dr_wav_container_rf64; } else if (ma_dr_wav_fourcc_equal(riff, "FORM")) { pWav->container = ma_dr_wav_container_aiff; } else { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) { ma_uint8 chunkSizeBytes[4]; ma_uint8 wave[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) { if (ma_dr_wav_bytes_to_u32_ex(chunkSizeBytes, pWav->container) < 36) { } } else if (pWav->container == ma_dr_wav_container_rf64) { if (ma_dr_wav_bytes_to_u32_le(chunkSizeBytes) != 0xFFFFFFFF) { return MA_FALSE; } } else { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) { return MA_FALSE; } if (!ma_dr_wav_fourcc_equal(wave, "WAVE")) { return MA_FALSE; } } else if (pWav->container == ma_dr_wav_container_w64) { ma_uint8 chunkSizeBytes[8]; ma_uint8 wave[16]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (ma_dr_wav_bytes_to_u64(chunkSizeBytes) < 80) { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) { return MA_FALSE; } if (!ma_dr_wav_guid_equal(wave, ma_dr_wavGUID_W64_WAVE)) { return MA_FALSE; } } else if (pWav->container == ma_dr_wav_container_aiff) { ma_uint8 chunkSizeBytes[4]; ma_uint8 aiff[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (ma_dr_wav_bytes_to_u32_be(chunkSizeBytes) < 18) { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, aiff, sizeof(aiff), &cursor) != sizeof(aiff)) { return MA_FALSE; } if (ma_dr_wav_fourcc_equal(aiff, "AIFF")) { isAIFCFormType = MA_FALSE; } else if (ma_dr_wav_fourcc_equal(aiff, "AIFC")) { isAIFCFormType = MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_rf64) { ma_uint8 sizeBytes[8]; ma_uint64 bytesRemainingInChunk; ma_dr_wav_chunk_header header; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { return MA_FALSE; } if (!ma_dr_wav_fourcc_equal(header.id.fourcc, "ds64")) { return MA_FALSE; } bytesRemainingInChunk = header.sizeInBytes + header.paddingSize; if (!ma_dr_wav__seek_forward(pWav->onSeek, 8, pWav->pUserData)) { return MA_FALSE; } bytesRemainingInChunk -= 8; cursor += 8; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { return MA_FALSE; } bytesRemainingInChunk -= 8; dataChunkSize = ma_dr_wav_bytes_to_u64(sizeBytes); if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { return MA_FALSE; } bytesRemainingInChunk -= 8; sampleCountFromFactChunk = ma_dr_wav_bytes_to_u64(sizeBytes); if (!ma_dr_wav__seek_forward(pWav->onSeek, bytesRemainingInChunk, pWav->pUserData)) { return MA_FALSE; } cursor += bytesRemainingInChunk; } metadataStartPos = cursor; isProcessingMetadata = !sequential && ((flags & MA_DR_WAV_WITH_METADATA) != 0); if (pWav->container != ma_dr_wav_container_riff && pWav->container != ma_dr_wav_container_rf64) { isProcessingMetadata = MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(&metadataParser, sizeof(metadataParser)); if (isProcessingMetadata) { metadataParser.onRead = pWav->onRead; metadataParser.onSeek = pWav->onSeek; metadataParser.pReadSeekUserData = pWav->pUserData; metadataParser.stage = ma_dr_wav__metadata_parser_stage_count; } for (;;) { ma_dr_wav_chunk_header header; ma_uint64 chunkSize; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { break; } chunkSize = header.sizeInBytes; if (!sequential && onChunk != NULL) { ma_uint64 callbackBytesRead = onChunk(pChunkUserData, pWav->onRead, pWav->onSeek, pWav->pUserData, &header, pWav->container, &fmt); if (callbackBytesRead > 0) { if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } } } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "fmt ")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FMT))) { ma_uint8 fmtData[16]; foundChunk_fmt = MA_TRUE; if (pWav->onRead(pWav->pUserData, fmtData, sizeof(fmtData)) != sizeof(fmtData)) { return MA_FALSE; } cursor += sizeof(fmtData); fmt.formatTag = ma_dr_wav_bytes_to_u16_ex(fmtData + 0, pWav->container); fmt.channels = ma_dr_wav_bytes_to_u16_ex(fmtData + 2, pWav->container); fmt.sampleRate = ma_dr_wav_bytes_to_u32_ex(fmtData + 4, pWav->container); fmt.avgBytesPerSec = ma_dr_wav_bytes_to_u32_ex(fmtData + 8, pWav->container); fmt.blockAlign = ma_dr_wav_bytes_to_u16_ex(fmtData + 12, pWav->container); fmt.bitsPerSample = ma_dr_wav_bytes_to_u16_ex(fmtData + 14, pWav->container); fmt.extendedSize = 0; fmt.validBitsPerSample = 0; fmt.channelMask = 0; MA_DR_WAV_ZERO_MEMORY(fmt.subFormat, sizeof(fmt.subFormat)); if (header.sizeInBytes > 16) { ma_uint8 fmt_cbSize[2]; int bytesReadSoFar = 0; if (pWav->onRead(pWav->pUserData, fmt_cbSize, sizeof(fmt_cbSize)) != sizeof(fmt_cbSize)) { return MA_FALSE; } cursor += sizeof(fmt_cbSize); bytesReadSoFar = 18; fmt.extendedSize = ma_dr_wav_bytes_to_u16_ex(fmt_cbSize, pWav->container); if (fmt.extendedSize > 0) { if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { if (fmt.extendedSize != 22) { return MA_FALSE; } } if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { ma_uint8 fmtext[22]; if (pWav->onRead(pWav->pUserData, fmtext, fmt.extendedSize) != fmt.extendedSize) { return MA_FALSE; } fmt.validBitsPerSample = ma_dr_wav_bytes_to_u16_ex(fmtext + 0, pWav->container); fmt.channelMask = ma_dr_wav_bytes_to_u32_ex(fmtext + 2, pWav->container); ma_dr_wav_bytes_to_guid(fmtext + 6, fmt.subFormat); } else { if (pWav->onSeek(pWav->pUserData, fmt.extendedSize, ma_dr_wav_seek_origin_current) == MA_FALSE) { return MA_FALSE; } } cursor += fmt.extendedSize; bytesReadSoFar += fmt.extendedSize; } if (pWav->onSeek(pWav->pUserData, (int)(header.sizeInBytes - bytesReadSoFar), ma_dr_wav_seek_origin_current) == MA_FALSE) { return MA_FALSE; } cursor += (header.sizeInBytes - bytesReadSoFar); } if (header.paddingSize > 0) { if (ma_dr_wav__seek_forward(pWav->onSeek, header.paddingSize, pWav->pUserData) == MA_FALSE) { break; } cursor += header.paddingSize; } continue; } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "data")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_DATA))) { foundChunk_data = MA_TRUE; pWav->dataChunkDataPos = cursor; if (pWav->container != ma_dr_wav_container_rf64) { dataChunkSize = chunkSize; } if (sequential || !isProcessingMetadata) { break; } else { chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "fact")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FACT))) { if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) { ma_uint8 sampleCount[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCount, 4, &cursor) != 4) { return MA_FALSE; } chunkSize -= 4; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { sampleCountFromFactChunk = ma_dr_wav_bytes_to_u32_ex(sampleCount, pWav->container); } else { sampleCountFromFactChunk = 0; } } else if (pWav->container == ma_dr_wav_container_w64) { if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCountFromFactChunk, 8, &cursor) != 8) { return MA_FALSE; } chunkSize -= 8; } else if (pWav->container == ma_dr_wav_container_rf64) { } chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, "COMM")) { ma_uint8 commData[24]; ma_uint32 commDataBytesToRead; ma_uint16 channels; ma_uint32 frameCount; ma_uint16 sampleSizeInBits; ma_int64 sampleRate; ma_uint16 compressionFormat; foundChunk_fmt = MA_TRUE; if (isAIFCFormType) { commDataBytesToRead = 24; if (header.sizeInBytes < commDataBytesToRead) { return MA_FALSE; } } else { commDataBytesToRead = 18; if (header.sizeInBytes != commDataBytesToRead) { return MA_FALSE; } } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, commData, commDataBytesToRead, &cursor) != commDataBytesToRead) { return MA_FALSE; } channels = ma_dr_wav_bytes_to_u16_ex (commData + 0, pWav->container); frameCount = ma_dr_wav_bytes_to_u32_ex (commData + 2, pWav->container); sampleSizeInBits = ma_dr_wav_bytes_to_u16_ex (commData + 6, pWav->container); sampleRate = ma_dr_wav_aiff_extented_to_s64(commData + 8); if (sampleRate < 0 || sampleRate > 0xFFFFFFFF) { return MA_FALSE; } if (isAIFCFormType) { const ma_uint8* type = commData + 18; if (ma_dr_wav_fourcc_equal(type, "NONE")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; } else if (ma_dr_wav_fourcc_equal(type, "raw ")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; if (sampleSizeInBits == 8) { pWav->aiff.isUnsigned = MA_TRUE; } } else if (ma_dr_wav_fourcc_equal(type, "sowt")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; pWav->aiff.isLE = MA_TRUE; } else if (ma_dr_wav_fourcc_equal(type, "fl32") || ma_dr_wav_fourcc_equal(type, "fl64") || ma_dr_wav_fourcc_equal(type, "FL32") || ma_dr_wav_fourcc_equal(type, "FL64")) { compressionFormat = MA_DR_WAVE_FORMAT_IEEE_FLOAT; } else if (ma_dr_wav_fourcc_equal(type, "alaw") || ma_dr_wav_fourcc_equal(type, "ALAW")) { compressionFormat = MA_DR_WAVE_FORMAT_ALAW; } else if (ma_dr_wav_fourcc_equal(type, "ulaw") || ma_dr_wav_fourcc_equal(type, "ULAW")) { compressionFormat = MA_DR_WAVE_FORMAT_MULAW; } else if (ma_dr_wav_fourcc_equal(type, "ima4")) { compressionFormat = MA_DR_WAVE_FORMAT_DVI_ADPCM; sampleSizeInBits = 4; (void)compressionFormat; (void)sampleSizeInBits; return MA_FALSE; } else { return MA_FALSE; } } else { compressionFormat = MA_DR_WAVE_FORMAT_PCM; } aiffFrameCount = frameCount; fmt.formatTag = compressionFormat; fmt.channels = channels; fmt.sampleRate = (ma_uint32)sampleRate; fmt.bitsPerSample = sampleSizeInBits; fmt.blockAlign = (ma_uint16)(fmt.channels * fmt.bitsPerSample / 8); fmt.avgBytesPerSec = fmt.blockAlign * fmt.sampleRate; if (fmt.blockAlign == 0 && compressionFormat == MA_DR_WAVE_FORMAT_DVI_ADPCM) { fmt.blockAlign = 34 * fmt.channels; } if (compressionFormat == MA_DR_WAVE_FORMAT_ALAW || compressionFormat == MA_DR_WAVE_FORMAT_MULAW) { if (fmt.bitsPerSample > 8) { fmt.bitsPerSample = 8; fmt.blockAlign = fmt.channels; } } fmt.bitsPerSample += (fmt.bitsPerSample & 7); if (isAIFCFormType) { if (ma_dr_wav__seek_forward(pWav->onSeek, (chunkSize - commDataBytesToRead), pWav->pUserData) == MA_FALSE) { return MA_FALSE; } cursor += (chunkSize - commDataBytesToRead); } continue; } if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, "SSND")) { ma_uint8 offsetAndBlockSizeData[8]; ma_uint32 offset; foundChunk_data = MA_TRUE; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, offsetAndBlockSizeData, sizeof(offsetAndBlockSizeData), &cursor) != sizeof(offsetAndBlockSizeData)) { return MA_FALSE; } offset = ma_dr_wav_bytes_to_u32_ex(offsetAndBlockSizeData + 0, pWav->container); if (ma_dr_wav__seek_forward(pWav->onSeek, offset, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } cursor += offset; pWav->dataChunkDataPos = cursor; dataChunkSize = chunkSize; if (sequential || !isProcessingMetadata) { break; } else { if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } } if (isProcessingMetadata) { ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown); if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) { break; } } chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; } if (!foundChunk_fmt || !foundChunk_data) { return MA_FALSE; } if ((fmt.sampleRate == 0 || fmt.sampleRate > MA_DR_WAV_MAX_SAMPLE_RATE ) || (fmt.channels == 0 || fmt.channels > MA_DR_WAV_MAX_CHANNELS ) || (fmt.bitsPerSample == 0 || fmt.bitsPerSample > MA_DR_WAV_MAX_BITS_PER_SAMPLE) || fmt.blockAlign == 0) { return MA_FALSE; } translatedFormatTag = fmt.formatTag; if (translatedFormatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { translatedFormatTag = ma_dr_wav_bytes_to_u16_ex(fmt.subFormat + 0, pWav->container); } if (!sequential) { if (!ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData)) { return MA_FALSE; } cursor = pWav->dataChunkDataPos; } if (isProcessingMetadata && metadataParser.metadataCount > 0) { if (ma_dr_wav__seek_from_start(pWav->onSeek, metadataStartPos, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } result = ma_dr_wav__metadata_alloc(&metadataParser, &pWav->allocationCallbacks); if (result != MA_SUCCESS) { return MA_FALSE; } metadataParser.stage = ma_dr_wav__metadata_parser_stage_read; for (;;) { ma_dr_wav_chunk_header header; ma_uint64 metadataBytesRead; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { break; } metadataBytesRead = ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown); if (ma_dr_wav__seek_forward(pWav->onSeek, (header.sizeInBytes + header.paddingSize) - metadataBytesRead, pWav->pUserData) == MA_FALSE) { ma_dr_wav_free(metadataParser.pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } } pWav->pMetadata = metadataParser.pMetadata; pWav->metadataCount = metadataParser.metadataCount; } if (dataChunkSize == 0xFFFFFFFF && (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) && pWav->isSequentialWrite == MA_FALSE) { dataChunkSize = 0; for (;;) { ma_uint8 temp[4096]; size_t bytesRead = pWav->onRead(pWav->pUserData, temp, sizeof(temp)); dataChunkSize += bytesRead; if (bytesRead < sizeof(temp)) { break; } } } if (ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData) == MA_FALSE) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } pWav->fmt = fmt; pWav->sampleRate = fmt.sampleRate; pWav->channels = fmt.channels; pWav->bitsPerSample = fmt.bitsPerSample; pWav->bytesRemaining = dataChunkSize; pWav->translatedFormatTag = translatedFormatTag; pWav->dataChunkDataSize = dataChunkSize; if (sampleCountFromFactChunk != 0) { pWav->totalPCMFrameCount = sampleCountFromFactChunk; } else if (aiffFrameCount != 0) { pWav->totalPCMFrameCount = aiffFrameCount; } else { ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } pWav->totalPCMFrameCount = dataChunkSize / bytesPerFrame; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { ma_uint64 totalBlockHeaderSizeInBytes; ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; if ((blockCount * fmt.blockAlign) < dataChunkSize) { blockCount += 1; } totalBlockHeaderSizeInBytes = blockCount * (6*fmt.channels); pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { ma_uint64 totalBlockHeaderSizeInBytes; ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; if ((blockCount * fmt.blockAlign) < dataChunkSize) { blockCount += 1; } totalBlockHeaderSizeInBytes = blockCount * (4*fmt.channels); pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels; pWav->totalPCMFrameCount += blockCount; } } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { if (pWav->channels > 2) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } } if (ma_dr_wav_get_bytes_per_pcm_frame(pWav) == 0) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (6*pWav->channels))) * 2)) / fmt.channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (4*pWav->channels))) * 2) + (blockCount * pWav->channels)) / fmt.channels; } #endif return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_ex(pWav, onRead, onSeek, NULL, pUserData, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pReadSeekUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); } MA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA); } MA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav) { ma_dr_wav_metadata *result = pWav->pMetadata; pWav->pMetadata = NULL; pWav->metadataCount = 0; return result; } MA_PRIVATE size_t ma_dr_wav__write(ma_dr_wav* pWav, const void* pData, size_t dataSize) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); return pWav->onWrite(pWav->pUserData, pData, dataSize); } MA_PRIVATE size_t ma_dr_wav__write_byte(ma_dr_wav* pWav, ma_uint8 byte) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); return pWav->onWrite(pWav->pUserData, &byte, 1); } MA_PRIVATE size_t ma_dr_wav__write_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap16(value); } return ma_dr_wav__write(pWav, &value, 2); } MA_PRIVATE size_t ma_dr_wav__write_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap32(value); } return ma_dr_wav__write(pWav, &value, 4); } MA_PRIVATE size_t ma_dr_wav__write_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap64(value); } return ma_dr_wav__write(pWav, &value, 8); } MA_PRIVATE size_t ma_dr_wav__write_f32ne_to_le(ma_dr_wav* pWav, float value) { union { ma_uint32 u32; float f32; } u; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); u.f32 = value; if (!ma_dr_wav__is_little_endian()) { u.u32 = ma_dr_wav__bswap32(u.u32); } return ma_dr_wav__write(pWav, &u.u32, 4); } MA_PRIVATE size_t ma_dr_wav__write_or_count(ma_dr_wav* pWav, const void* pData, size_t dataSize) { if (pWav == NULL) { return dataSize; } return ma_dr_wav__write(pWav, pData, dataSize); } MA_PRIVATE size_t ma_dr_wav__write_or_count_byte(ma_dr_wav* pWav, ma_uint8 byte) { if (pWav == NULL) { return 1; } return ma_dr_wav__write_byte(pWav, byte); } MA_PRIVATE size_t ma_dr_wav__write_or_count_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value) { if (pWav == NULL) { return 2; } return ma_dr_wav__write_u16ne_to_le(pWav, value); } MA_PRIVATE size_t ma_dr_wav__write_or_count_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value) { if (pWav == NULL) { return 4; } return ma_dr_wav__write_u32ne_to_le(pWav, value); } #if 0 MA_PRIVATE size_t ma_dr_wav__write_or_count_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value) { if (pWav == NULL) { return 8; } return ma_dr_wav__write_u64ne_to_le(pWav, value); } #endif MA_PRIVATE size_t ma_dr_wav__write_or_count_f32ne_to_le(ma_dr_wav* pWav, float value) { if (pWav == NULL) { return 4; } return ma_dr_wav__write_f32ne_to_le(pWav, value); } MA_PRIVATE size_t ma_dr_wav__write_or_count_string_to_fixed_size_buf(ma_dr_wav* pWav, char* str, size_t bufFixedSize) { size_t len; if (pWav == NULL) { return bufFixedSize; } len = ma_dr_wav__strlen_clamped(str, bufFixedSize); ma_dr_wav__write_or_count(pWav, str, len); if (len < bufFixedSize) { size_t i; for (i = 0; i < bufFixedSize - len; ++i) { ma_dr_wav__write_byte(pWav, 0); } } return bufFixedSize; } MA_PRIVATE size_t ma_dr_wav__write_or_count_metadata(ma_dr_wav* pWav, ma_dr_wav_metadata* pMetadatas, ma_uint32 metadataCount) { size_t bytesWritten = 0; ma_bool32 hasListAdtl = MA_FALSE; ma_bool32 hasListInfo = MA_FALSE; ma_uint32 iMetadata; if (pMetadatas == NULL || metadataCount == 0) { return 0; } for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 chunkSize = 0; if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list)) { hasListInfo = MA_TRUE; } if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_adtl) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list)) { hasListAdtl = MA_TRUE; } switch (pMetadata->type) { case ma_dr_wav_metadata_type_smpl: { ma_uint32 iLoop; chunkSize = MA_DR_WAV_SMPL_BYTES + MA_DR_WAV_SMPL_LOOP_BYTES * pMetadata->data.smpl.sampleLoopCount + pMetadata->data.smpl.samplerSpecificDataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, "smpl", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.manufacturerId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.productId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplePeriodNanoseconds); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiUnityNote); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiPitchFraction); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteFormat); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.sampleLoopCount); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplerSpecificDataSizeInBytes); for (iLoop = 0; iLoop < pMetadata->data.smpl.sampleLoopCount; ++iLoop) { bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].cuePointId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].type); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].firstSampleByteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].lastSampleByteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].sampleFraction); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].playCount); } if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) { bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes); } } break; case ma_dr_wav_metadata_type_inst: { chunkSize = MA_DR_WAV_INST_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "inst", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.midiUnityNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.fineTuneCents, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.gainDecibels, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowVelocity, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highVelocity, 1); } break; case ma_dr_wav_metadata_type_cue: { ma_uint32 iCuePoint; chunkSize = MA_DR_WAV_CUE_BYTES + MA_DR_WAV_CUE_POINT_BYTES * pMetadata->data.cue.cuePointCount; bytesWritten += ma_dr_wav__write_or_count(pWav, "cue ", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.cuePointCount); for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) { bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].id); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].blockStart); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset); } } break; case ma_dr_wav_metadata_type_acid: { chunkSize = MA_DR_WAV_ACID_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "acid", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.flags); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.midiUnityNote); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.reserved1); bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.reserved2); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.numBeats); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterDenominator); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterNumerator); bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.tempo); } break; case ma_dr_wav_metadata_type_bext: { char reservedBuf[MA_DR_WAV_BEXT_RESERVED_BYTES]; ma_uint32 timeReferenceLow; ma_uint32 timeReferenceHigh; chunkSize = MA_DR_WAV_BEXT_BYTES + pMetadata->data.bext.codingHistorySize; bytesWritten += ma_dr_wav__write_or_count(pWav, "bext", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pDescription, MA_DR_WAV_BEXT_DESCRIPTION_BYTES); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorName, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorReference, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate)); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime)); timeReferenceLow = (ma_uint32)(pMetadata->data.bext.timeReference & 0xFFFFFFFF); timeReferenceHigh = (ma_uint32)(pMetadata->data.bext.timeReference >> 32); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceLow); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceHigh); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.version); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessValue); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessRange); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxTruePeakLevel); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxMomentaryLoudness); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxShortTermLoudness); MA_DR_WAV_ZERO_MEMORY(reservedBuf, sizeof(reservedBuf)); bytesWritten += ma_dr_wav__write_or_count(pWav, reservedBuf, sizeof(reservedBuf)); if (pMetadata->data.bext.codingHistorySize > 0) { bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pCodingHistory, pMetadata->data.bext.codingHistorySize); } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_top_level) { chunkSize = pMetadata->data.unknown.dataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes); } } break; default: break; } if ((chunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } if (hasListInfo) { ma_uint32 chunkSize = 4; for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings)) { chunkSize += 8; chunkSize += pMetadata->data.infoText.stringLength + 1; } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) { chunkSize += 8; chunkSize += pMetadata->data.unknown.dataSizeInBytes; } if ((chunkSize % 2) != 0) { chunkSize += 1; } } bytesWritten += ma_dr_wav__write_or_count(pWav, "LIST", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, "INFO", 4); for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 subchunkSize = 0; if (pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) { const char* pID = NULL; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_info_software: pID = "ISFT"; break; case ma_dr_wav_metadata_type_list_info_copyright: pID = "ICOP"; break; case ma_dr_wav_metadata_type_list_info_title: pID = "INAM"; break; case ma_dr_wav_metadata_type_list_info_artist: pID = "IART"; break; case ma_dr_wav_metadata_type_list_info_comment: pID = "ICMT"; break; case ma_dr_wav_metadata_type_list_info_date: pID = "ICRD"; break; case ma_dr_wav_metadata_type_list_info_genre: pID = "IGNR"; break; case ma_dr_wav_metadata_type_list_info_album: pID = "IPRD"; break; case ma_dr_wav_metadata_type_list_info_tracknumber: pID = "ITRK"; break; default: break; } MA_DR_WAV_ASSERT(pID != NULL); if (pMetadata->data.infoText.stringLength) { subchunkSize = pMetadata->data.infoText.stringLength + 1; bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.infoText.pString, pMetadata->data.infoText.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) { if (pMetadata->data.unknown.dataSizeInBytes) { subchunkSize = pMetadata->data.unknown.dataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.unknown.dataSizeInBytes); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize); } } if ((subchunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } } if (hasListAdtl) { ma_uint32 chunkSize = 4; for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_label: case ma_dr_wav_metadata_type_list_note: { chunkSize += 8; chunkSize += MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (pMetadata->data.labelOrNote.stringLength > 0) { chunkSize += pMetadata->data.labelOrNote.stringLength + 1; } } break; case ma_dr_wav_metadata_type_list_labelled_cue_region: { chunkSize += 8; chunkSize += MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (pMetadata->data.labelledCueRegion.stringLength > 0) { chunkSize += pMetadata->data.labelledCueRegion.stringLength + 1; } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) { chunkSize += 8; chunkSize += pMetadata->data.unknown.dataSizeInBytes; } } break; default: break; } if ((chunkSize % 2) != 0) { chunkSize += 1; } } bytesWritten += ma_dr_wav__write_or_count(pWav, "LIST", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, "adtl", 4); for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 subchunkSize = 0; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_label: case ma_dr_wav_metadata_type_list_note: { if (pMetadata->data.labelOrNote.stringLength > 0) { const char *pID = NULL; if (pMetadata->type == ma_dr_wav_metadata_type_list_label) { pID = "labl"; } else if (pMetadata->type == ma_dr_wav_metadata_type_list_note) { pID = "note"; } MA_DR_WAV_ASSERT(pID != NULL); MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL); subchunkSize = MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4); subchunkSize += pMetadata->data.labelOrNote.stringLength + 1; bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelOrNote.cuePointId); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelOrNote.pString, pMetadata->data.labelOrNote.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } break; case ma_dr_wav_metadata_type_list_labelled_cue_region: { subchunkSize = MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "ltxt", 4); if (pMetadata->data.labelledCueRegion.stringLength > 0) { subchunkSize += pMetadata->data.labelledCueRegion.stringLength + 1; } bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.cuePointId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.sampleLength); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.purposeId, 4); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.country); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.language); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.dialect); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.codePage); if (pMetadata->data.labelledCueRegion.stringLength > 0) { MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.pString, pMetadata->data.labelledCueRegion.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) { subchunkSize = pMetadata->data.unknown.dataSizeInBytes; MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize); } } break; default: break; } if ((subchunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } } MA_DR_WAV_ASSERT((bytesWritten % 2) == 0); return bytesWritten; } MA_PRIVATE ma_uint32 ma_dr_wav__riff_chunk_size_riff(ma_uint64 dataChunkSize, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { ma_uint64 chunkSize = 4 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, pMetadata, metadataCount) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize); if (chunkSize > 0xFFFFFFFFUL) { chunkSize = 0xFFFFFFFFUL; } return (ma_uint32)chunkSize; } MA_PRIVATE ma_uint32 ma_dr_wav__data_chunk_size_riff(ma_uint64 dataChunkSize) { if (dataChunkSize <= 0xFFFFFFFFUL) { return (ma_uint32)dataChunkSize; } else { return 0xFFFFFFFFUL; } } MA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_w64(ma_uint64 dataChunkSize) { ma_uint64 dataSubchunkPaddingSize = ma_dr_wav__chunk_padding_size_w64(dataChunkSize); return 80 + 24 + dataChunkSize + dataSubchunkPaddingSize; } MA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_w64(ma_uint64 dataChunkSize) { return 24 + dataChunkSize; } MA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_rf64(ma_uint64 dataChunkSize, ma_dr_wav_metadata *metadata, ma_uint32 numMetadata) { ma_uint64 chunkSize = 4 + 36 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, metadata, numMetadata) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize); if (chunkSize > 0xFFFFFFFFUL) { chunkSize = 0xFFFFFFFFUL; } return chunkSize; } MA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_rf64(ma_uint64 dataChunkSize) { return dataChunkSize; } MA_PRIVATE ma_bool32 ma_dr_wav_preinit_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_bool32 isSequential, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onWrite == NULL) { return MA_FALSE; } if (!isSequential && onSeek == NULL) { return MA_FALSE; } if (pFormat->format == MA_DR_WAVE_FORMAT_EXTENSIBLE) { return MA_FALSE; } if (pFormat->format == MA_DR_WAVE_FORMAT_ADPCM || pFormat->format == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav)); pWav->onWrite = onWrite; pWav->onSeek = onSeek; pWav->pUserData = pUserData; pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } pWav->fmt.formatTag = (ma_uint16)pFormat->format; pWav->fmt.channels = (ma_uint16)pFormat->channels; pWav->fmt.sampleRate = pFormat->sampleRate; pWav->fmt.avgBytesPerSec = (ma_uint32)((pFormat->bitsPerSample * pFormat->sampleRate * pFormat->channels) / 8); pWav->fmt.blockAlign = (ma_uint16)((pFormat->channels * pFormat->bitsPerSample) / 8); pWav->fmt.bitsPerSample = (ma_uint16)pFormat->bitsPerSample; pWav->fmt.extendedSize = 0; pWav->isSequentialWrite = isSequential; return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount) { size_t runningPos = 0; ma_uint64 initialDataChunkSize = 0; ma_uint64 chunkSizeFMT; if (pWav->isSequentialWrite) { initialDataChunkSize = (totalSampleCount * pWav->fmt.bitsPerSample) / 8; if (pFormat->container == ma_dr_wav_container_riff) { if (initialDataChunkSize > (0xFFFFFFFFUL - 36)) { return MA_FALSE; } } } pWav->dataChunkDataSizeTargetWrite = initialDataChunkSize; if (pFormat->container == ma_dr_wav_container_riff) { ma_uint32 chunkSizeRIFF = 28 + (ma_uint32)initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "RIFF", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeRIFF); runningPos += ma_dr_wav__write(pWav, "WAVE", 4); } else if (pFormat->container == ma_dr_wav_container_w64) { ma_uint64 chunkSizeRIFF = 80 + 24 + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_RIFF, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeRIFF); runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_WAVE, 16); } else if (pFormat->container == ma_dr_wav_container_rf64) { runningPos += ma_dr_wav__write(pWav, "RF64", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF); runningPos += ma_dr_wav__write(pWav, "WAVE", 4); } else { return MA_FALSE; } if (pFormat->container == ma_dr_wav_container_rf64) { ma_uint32 initialds64ChunkSize = 28; ma_uint64 initialRiffChunkSize = 8 + initialds64ChunkSize + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "ds64", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, initialds64ChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialRiffChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialDataChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, totalSampleCount); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0); } if (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64) { chunkSizeFMT = 16; runningPos += ma_dr_wav__write(pWav, "fmt ", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, (ma_uint32)chunkSizeFMT); } else if (pFormat->container == ma_dr_wav_container_w64) { chunkSizeFMT = 40; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_FMT, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeFMT); } runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.formatTag); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.channels); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.sampleRate); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.avgBytesPerSec); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample); if (!pWav->isSequentialWrite && pWav->pMetadata != NULL && pWav->metadataCount > 0 && (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64)) { runningPos += ma_dr_wav__write_or_count_metadata(pWav, pWav->pMetadata, pWav->metadataCount); } pWav->dataChunkDataPos = runningPos; if (pFormat->container == ma_dr_wav_container_riff) { ma_uint32 chunkSizeDATA = (ma_uint32)initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "data", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeDATA); } else if (pFormat->container == ma_dr_wav_container_w64) { ma_uint64 chunkSizeDATA = 24 + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_DATA, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeDATA); } else if (pFormat->container == ma_dr_wav_container_rf64) { runningPos += ma_dr_wav__write(pWav, "data", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF); } pWav->container = pFormat->container; pWav->channels = (ma_uint16)pFormat->channels; pWav->sampleRate = pFormat->sampleRate; pWav->bitsPerSample = (ma_uint16)pFormat->bitsPerSample; pWav->translatedFormatTag = (ma_uint16)pFormat->format; pWav->dataChunkDataPos = runningPos; return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init_write__internal(pWav, pFormat, 0); } MA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_TRUE, onWrite, NULL, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); } MA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_write_sequential(pWav, pFormat, totalPCMFrameCount*pFormat->channels, onWrite, pUserData, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } pWav->pMetadata = pMetadata; pWav->metadataCount = metadataCount; return ma_dr_wav_init_write__internal(pWav, pFormat, 0); } MA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { ma_uint64 targetDataSizeBytes = (ma_uint64)((ma_int64)totalFrameCount * pFormat->channels * pFormat->bitsPerSample/8.0); ma_uint64 riffChunkSizeBytes; ma_uint64 fileSizeBytes = 0; if (pFormat->container == ma_dr_wav_container_riff) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_riff(targetDataSizeBytes, pMetadata, metadataCount); fileSizeBytes = (8 + riffChunkSizeBytes); } else if (pFormat->container == ma_dr_wav_container_w64) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_w64(targetDataSizeBytes); fileSizeBytes = riffChunkSizeBytes; } else if (pFormat->container == ma_dr_wav_container_rf64) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_rf64(targetDataSizeBytes, pMetadata, metadataCount); fileSizeBytes = (8 + riffChunkSizeBytes); } return fileSizeBytes; } #ifndef MA_DR_WAV_NO_STDIO MA_PRIVATE size_t ma_dr_wav__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } MA_PRIVATE size_t ma_dr_wav__on_write_stdio(void* pUserData, const void* pData, size_t bytesToWrite) { return fwrite(pData, 1, bytesToWrite, (FILE*)pUserData); } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_stdio(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == ma_dr_wav_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_ex(pWav, filename, NULL, NULL, 0, pAllocationCallbacks); } MA_PRIVATE ma_bool32 ma_dr_wav_init_file__internal_FILE(ma_dr_wav* pWav, FILE* pFile, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; result = ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } result = ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "rb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_ex_w(pWav, filename, NULL, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks); } #endif MA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "rb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks); } #endif MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal_FILE(ma_dr_wav* pWav, FILE* pFile, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; result = ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } result = ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "wb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write_w__internal(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"wb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks); } #endif MA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_file_write_sequential(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_file_write_sequential_w(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } #endif #endif MA_PRIVATE size_t ma_dr_wav__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; size_t bytesRemaining; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->memoryStream.dataSize >= pWav->memoryStream.currentReadPos); bytesRemaining = pWav->memoryStream.dataSize - pWav->memoryStream.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_WAV_COPY_MEMORY(pBufferOut, pWav->memoryStream.data + pWav->memoryStream.currentReadPos, bytesToRead); pWav->memoryStream.currentReadPos += bytesToRead; } return bytesToRead; } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; MA_DR_WAV_ASSERT(pWav != NULL); if (origin == ma_dr_wav_seek_origin_current) { if (offset > 0) { if (pWav->memoryStream.currentReadPos + offset > pWav->memoryStream.dataSize) { return MA_FALSE; } } else { if (pWav->memoryStream.currentReadPos < (size_t)-offset) { return MA_FALSE; } } pWav->memoryStream.currentReadPos += offset; } else { if ((ma_uint32)offset <= pWav->memoryStream.dataSize) { pWav->memoryStream.currentReadPos = offset; } else { return MA_FALSE; } } return MA_TRUE; } MA_PRIVATE size_t ma_dr_wav__on_write_memory(void* pUserData, const void* pDataIn, size_t bytesToWrite) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; size_t bytesRemaining; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->memoryStreamWrite.dataCapacity >= pWav->memoryStreamWrite.currentWritePos); bytesRemaining = pWav->memoryStreamWrite.dataCapacity - pWav->memoryStreamWrite.currentWritePos; if (bytesRemaining < bytesToWrite) { void* pNewData; size_t newDataCapacity = (pWav->memoryStreamWrite.dataCapacity == 0) ? 256 : pWav->memoryStreamWrite.dataCapacity * 2; if ((newDataCapacity - pWav->memoryStreamWrite.currentWritePos) < bytesToWrite) { newDataCapacity = pWav->memoryStreamWrite.currentWritePos + bytesToWrite; } pNewData = ma_dr_wav__realloc_from_callbacks(*pWav->memoryStreamWrite.ppData, newDataCapacity, pWav->memoryStreamWrite.dataCapacity, &pWav->allocationCallbacks); if (pNewData == NULL) { return 0; } *pWav->memoryStreamWrite.ppData = pNewData; pWav->memoryStreamWrite.dataCapacity = newDataCapacity; } MA_DR_WAV_COPY_MEMORY(((ma_uint8*)(*pWav->memoryStreamWrite.ppData)) + pWav->memoryStreamWrite.currentWritePos, pDataIn, bytesToWrite); pWav->memoryStreamWrite.currentWritePos += bytesToWrite; if (pWav->memoryStreamWrite.dataSize < pWav->memoryStreamWrite.currentWritePos) { pWav->memoryStreamWrite.dataSize = pWav->memoryStreamWrite.currentWritePos; } *pWav->memoryStreamWrite.pDataSize = pWav->memoryStreamWrite.dataSize; return bytesToWrite; } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory_write(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; MA_DR_WAV_ASSERT(pWav != NULL); if (origin == ma_dr_wav_seek_origin_current) { if (offset > 0) { if (pWav->memoryStreamWrite.currentWritePos + offset > pWav->memoryStreamWrite.dataSize) { offset = (int)(pWav->memoryStreamWrite.dataSize - pWav->memoryStreamWrite.currentWritePos); } } else { if (pWav->memoryStreamWrite.currentWritePos < (size_t)-offset) { offset = -(int)pWav->memoryStreamWrite.currentWritePos; } } pWav->memoryStreamWrite.currentWritePos += offset; } else { if ((ma_uint32)offset <= pWav->memoryStreamWrite.dataSize) { pWav->memoryStreamWrite.currentWritePos = offset; } else { pWav->memoryStreamWrite.currentWritePos = pWav->memoryStreamWrite.dataSize; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_ex(pWav, data, dataSize, NULL, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (data == NULL || dataSize == 0) { return MA_FALSE; } if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStream.data = (const ma_uint8*)data; pWav->memoryStream.dataSize = dataSize; pWav->memoryStream.currentReadPos = 0; return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); } MA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (data == NULL || dataSize == 0) { return MA_FALSE; } if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStream.data = (const ma_uint8*)data; pWav->memoryStream.dataSize = dataSize; pWav->memoryStream.currentReadPos = 0; return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA); } MA_PRIVATE ma_bool32 ma_dr_wav_init_memory_write__internal(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { if (ppData == NULL || pDataSize == NULL) { return MA_FALSE; } *ppData = NULL; *pDataSize = 0; if (!ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_memory, ma_dr_wav__on_seek_memory_write, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStreamWrite.ppData = ppData; pWav->memoryStreamWrite.pDataSize = pDataSize; pWav->memoryStreamWrite.dataSize = 0; pWav->memoryStreamWrite.dataCapacity = 0; pWav->memoryStreamWrite.currentWritePos = 0; return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); } MA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_memory_write_sequential(pWav, ppData, pDataSize, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } MA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav) { ma_result result = MA_SUCCESS; if (pWav == NULL) { return MA_INVALID_ARGS; } if (pWav->onWrite != NULL) { ma_uint32 paddingSize = 0; if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rf64) { paddingSize = ma_dr_wav__chunk_padding_size_riff(pWav->dataChunkDataSize); } else { paddingSize = ma_dr_wav__chunk_padding_size_w64(pWav->dataChunkDataSize); } if (paddingSize > 0) { ma_uint64 paddingData = 0; ma_dr_wav__write(pWav, &paddingData, paddingSize); } if (pWav->onSeek && !pWav->isSequentialWrite) { if (pWav->container == ma_dr_wav_container_riff) { if (pWav->onSeek(pWav->pUserData, 4, ma_dr_wav_seek_origin_start)) { ma_uint32 riffChunkSize = ma_dr_wav__riff_chunk_size_riff(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount); ma_dr_wav__write_u32ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, ma_dr_wav_seek_origin_start)) { ma_uint32 dataChunkSize = ma_dr_wav__data_chunk_size_riff(pWav->dataChunkDataSize); ma_dr_wav__write_u32ne_to_le(pWav, dataChunkSize); } } else if (pWav->container == ma_dr_wav_container_w64) { if (pWav->onSeek(pWav->pUserData, 16, ma_dr_wav_seek_origin_start)) { ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_w64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, ma_dr_wav_seek_origin_start)) { ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_w64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize); } } else if (pWav->container == ma_dr_wav_container_rf64) { int ds64BodyPos = 12 + 8; if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 0, ma_dr_wav_seek_origin_start)) { ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_rf64(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount); ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 8, ma_dr_wav_seek_origin_start)) { ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_rf64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize); } } } if (pWav->isSequentialWrite) { if (pWav->dataChunkDataSize != pWav->dataChunkDataSizeTargetWrite) { result = MA_INVALID_FILE; } } } else { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); } #ifndef MA_DR_WAV_NO_STDIO if (pWav->onRead == ma_dr_wav__on_read_stdio || pWav->onWrite == ma_dr_wav__on_write_stdio) { fclose((FILE*)pWav->pUserData); } #endif return result; } MA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut) { size_t bytesRead; ma_uint32 bytesPerFrame; if (pWav == NULL || bytesToRead == 0) { return 0; } if (bytesToRead > pWav->bytesRemaining) { bytesToRead = (size_t)pWav->bytesRemaining; } if (bytesToRead == 0) { return 0; } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } if (pBufferOut != NULL) { bytesRead = pWav->onRead(pWav->pUserData, pBufferOut, bytesToRead); } else { bytesRead = 0; while (bytesRead < bytesToRead) { size_t bytesToSeek = (bytesToRead - bytesRead); if (bytesToSeek > 0x7FFFFFFF) { bytesToSeek = 0x7FFFFFFF; } if (pWav->onSeek(pWav->pUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current) == MA_FALSE) { break; } bytesRead += bytesToSeek; } while (bytesRead < bytesToRead) { ma_uint8 buffer[4096]; size_t bytesSeeked; size_t bytesToSeek = (bytesToRead - bytesRead); if (bytesToSeek > sizeof(buffer)) { bytesToSeek = sizeof(buffer); } bytesSeeked = pWav->onRead(pWav->pUserData, buffer, bytesToSeek); bytesRead += bytesSeeked; if (bytesSeeked < bytesToSeek) { break; } } } pWav->readCursorInPCMFrames += bytesRead / bytesPerFrame; pWav->bytesRemaining -= bytesRead; return bytesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint32 bytesPerFrame; ma_uint64 bytesToRead; ma_uint64 framesRemainingInFile; if (pWav == NULL || framesToRead == 0) { return 0; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { return 0; } framesRemainingInFile = pWav->totalPCMFrameCount - pWav->readCursorInPCMFrames; if (framesToRead > framesRemainingInFile) { framesToRead = framesRemainingInFile; } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesToRead = framesToRead * bytesPerFrame; if (bytesToRead > MA_SIZE_MAX) { bytesToRead = (MA_SIZE_MAX / bytesPerFrame) * bytesPerFrame; } if (bytesToRead == 0) { return 0; } return ma_dr_wav_read_raw(pWav, (size_t)bytesToRead, pBufferOut) / bytesPerFrame; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL) { ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } ma_dr_wav__bswap_samples(pBufferOut, framesRead*pWav->channels, bytesPerFrame/pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 framesRead = 0; if (ma_dr_wav_is_container_be(pWav->container)) { if (pWav->container != ma_dr_wav_container_aiff || pWav->aiff.isLE == MA_FALSE) { if (ma_dr_wav__is_little_endian()) { framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut); } else { framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); } goto post_process; } } if (ma_dr_wav__is_little_endian()) { framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); } else { framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut); } post_process: { if (pWav->container == ma_dr_wav_container_aiff && pWav->bitsPerSample == 8 && pWav->aiff.isUnsigned == MA_FALSE) { if (pBufferOut != NULL) { ma_uint64 iSample; for (iSample = 0; iSample < framesRead * pWav->channels; iSample += 1) { ((ma_uint8*)pBufferOut)[iSample] += 128; } } } } return framesRead; } MA_PRIVATE ma_bool32 ma_dr_wav_seek_to_first_pcm_frame(ma_dr_wav* pWav) { if (pWav->onWrite != NULL) { return MA_FALSE; } if (!pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos, ma_dr_wav_seek_origin_start)) { return MA_FALSE; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { MA_DR_WAV_ZERO_OBJECT(&pWav->msadpcm); } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { MA_DR_WAV_ZERO_OBJECT(&pWav->ima); } else { MA_DR_WAV_ASSERT(MA_FALSE); } } pWav->readCursorInPCMFrames = 0; pWav->bytesRemaining = pWav->dataChunkDataSize; return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex) { if (pWav == NULL || pWav->onSeek == NULL) { return MA_FALSE; } if (pWav->onWrite != NULL) { return MA_FALSE; } if (pWav->totalPCMFrameCount == 0) { return MA_TRUE; } if (targetFrameIndex > pWav->totalPCMFrameCount) { targetFrameIndex = pWav->totalPCMFrameCount; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { if (targetFrameIndex < pWav->readCursorInPCMFrames) { if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) { return MA_FALSE; } } if (targetFrameIndex > pWav->readCursorInPCMFrames) { ma_uint64 offsetInFrames = targetFrameIndex - pWav->readCursorInPCMFrames; ma_int16 devnull[2048]; while (offsetInFrames > 0) { ma_uint64 framesRead = 0; ma_uint64 framesToRead = offsetInFrames; if (framesToRead > ma_dr_wav_countof(devnull)/pWav->channels) { framesToRead = ma_dr_wav_countof(devnull)/pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { framesRead = ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, devnull); } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { framesRead = ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, devnull); } else { MA_DR_WAV_ASSERT(MA_FALSE); } if (framesRead != framesToRead) { return MA_FALSE; } offsetInFrames -= framesRead; } } } else { ma_uint64 totalSizeInBytes; ma_uint64 currentBytePos; ma_uint64 targetBytePos; ma_uint64 offset; ma_uint32 bytesPerFrame; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return MA_FALSE; } totalSizeInBytes = pWav->totalPCMFrameCount * bytesPerFrame; currentBytePos = totalSizeInBytes - pWav->bytesRemaining; targetBytePos = targetFrameIndex * bytesPerFrame; if (currentBytePos < targetBytePos) { offset = (targetBytePos - currentBytePos); } else { if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) { return MA_FALSE; } offset = targetBytePos; } while (offset > 0) { int offset32 = ((offset > INT_MAX) ? INT_MAX : (int)offset); if (!pWav->onSeek(pWav->pUserData, offset32, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } pWav->readCursorInPCMFrames += offset32 / bytesPerFrame; pWav->bytesRemaining -= offset32; offset -= offset32; } } return MA_TRUE; } MA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pWav == NULL) { return MA_INVALID_ARGS; } *pCursor = pWav->readCursorInPCMFrames; return MA_SUCCESS; } MA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pWav == NULL) { return MA_INVALID_ARGS; } *pLength = pWav->totalPCMFrameCount; return MA_SUCCESS; } MA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData) { size_t bytesWritten; if (pWav == NULL || bytesToWrite == 0 || pData == NULL) { return 0; } bytesWritten = pWav->onWrite(pWav->pUserData, pData, bytesToWrite); pWav->dataChunkDataSize += bytesWritten; return bytesWritten; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { ma_uint64 bytesToWrite; ma_uint64 bytesWritten; const ma_uint8* pRunningData; if (pWav == NULL || framesToWrite == 0 || pData == NULL) { return 0; } bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8); if (bytesToWrite > MA_SIZE_MAX) { return 0; } bytesWritten = 0; pRunningData = (const ma_uint8*)pData; while (bytesToWrite > 0) { size_t bytesJustWritten; ma_uint64 bytesToWriteThisIteration; bytesToWriteThisIteration = bytesToWrite; MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX); bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, pRunningData); if (bytesJustWritten == 0) { break; } bytesToWrite -= bytesJustWritten; bytesWritten += bytesJustWritten; pRunningData += bytesJustWritten; } return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { ma_uint64 bytesToWrite; ma_uint64 bytesWritten; ma_uint32 bytesPerSample; const ma_uint8* pRunningData; if (pWav == NULL || framesToWrite == 0 || pData == NULL) { return 0; } bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8); if (bytesToWrite > MA_SIZE_MAX) { return 0; } bytesWritten = 0; pRunningData = (const ma_uint8*)pData; bytesPerSample = ma_dr_wav_get_bytes_per_pcm_frame(pWav) / pWav->channels; if (bytesPerSample == 0) { return 0; } while (bytesToWrite > 0) { ma_uint8 temp[4096]; ma_uint32 sampleCount; size_t bytesJustWritten; ma_uint64 bytesToWriteThisIteration; bytesToWriteThisIteration = bytesToWrite; MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX); sampleCount = sizeof(temp)/bytesPerSample; if (bytesToWriteThisIteration > ((ma_uint64)sampleCount)*bytesPerSample) { bytesToWriteThisIteration = ((ma_uint64)sampleCount)*bytesPerSample; } MA_DR_WAV_COPY_MEMORY(temp, pRunningData, (size_t)bytesToWriteThisIteration); ma_dr_wav__bswap_samples(temp, sampleCount, bytesPerSample); bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, temp); if (bytesJustWritten == 0) { break; } bytesToWrite -= bytesJustWritten; bytesWritten += bytesJustWritten; pRunningData += bytesJustWritten; } return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { if (ma_dr_wav__is_little_endian()) { return ma_dr_wav_write_pcm_frames_le(pWav, framesToWrite, pData); } else { return ma_dr_wav_write_pcm_frames_be(pWav, framesToWrite, pData); } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead = 0; static ma_int32 adaptationTable[] = { 230, 230, 230, 230, 307, 409, 512, 614, 768, 614, 512, 409, 307, 230, 230, 230 }; static ma_int32 coeff1Table[] = { 256, 512, 0, 192, 240, 460, 392 }; static ma_int32 coeff2Table[] = { 0, -256, 0, 64, 0, -208, -232 }; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(framesToRead > 0); while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { MA_DR_WAV_ASSERT(framesToRead > 0); if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { ma_uint8 header[7]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); pWav->msadpcm.predictor[0] = header[0]; pWav->msadpcm.delta[0] = ma_dr_wav_bytes_to_s16(header + 1); pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 3); pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 5); pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.cachedFrameCount = 2; if (pWav->msadpcm.predictor[0] >= ma_dr_wav_countof(coeff1Table)) { return totalFramesRead; } } else { ma_uint8 header[14]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); pWav->msadpcm.predictor[0] = header[0]; pWav->msadpcm.predictor[1] = header[1]; pWav->msadpcm.delta[0] = ma_dr_wav_bytes_to_s16(header + 2); pWav->msadpcm.delta[1] = ma_dr_wav_bytes_to_s16(header + 4); pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 6); pWav->msadpcm.prevFrames[1][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 8); pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 10); pWav->msadpcm.prevFrames[1][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 12); pWav->msadpcm.cachedFrames[0] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[1] = pWav->msadpcm.prevFrames[1][0]; pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[1][1]; pWav->msadpcm.cachedFrameCount = 2; if (pWav->msadpcm.predictor[0] >= ma_dr_wav_countof(coeff1Table) || pWav->msadpcm.predictor[1] >= ma_dr_wav_countof(coeff2Table)) { return totalFramesRead; } } } while (framesToRead > 0 && pWav->msadpcm.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { if (pBufferOut != NULL) { ma_uint32 iSample = 0; for (iSample = 0; iSample < pWav->channels; iSample += 1) { pBufferOut[iSample] = (ma_int16)pWav->msadpcm.cachedFrames[(ma_dr_wav_countof(pWav->msadpcm.cachedFrames) - (pWav->msadpcm.cachedFrameCount*pWav->channels)) + iSample]; } pBufferOut += pWav->channels; } framesToRead -= 1; totalFramesRead += 1; pWav->readCursorInPCMFrames += 1; pWav->msadpcm.cachedFrameCount -= 1; } if (framesToRead == 0) { break; } if (pWav->msadpcm.cachedFrameCount == 0) { if (pWav->msadpcm.bytesRemainingInBlock == 0) { continue; } else { ma_uint8 nibbles; ma_int32 nibble0; ma_int32 nibble1; if (pWav->onRead(pWav->pUserData, &nibbles, 1) != 1) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock -= 1; nibble0 = ((nibbles & 0xF0) >> 4); if ((nibbles & 0x80)) { nibble0 |= 0xFFFFFFF0UL; } nibble1 = ((nibbles & 0x0F) >> 0); if ((nibbles & 0x08)) { nibble1 |= 0xFFFFFFF0UL; } if (pWav->channels == 1) { ma_int32 newSample0; ma_int32 newSample1; newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample0 += nibble0 * pWav->msadpcm.delta[0]; newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample0; newSample1 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample1 += nibble1 * pWav->msadpcm.delta[0]; newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample1; pWav->msadpcm.cachedFrames[2] = newSample0; pWav->msadpcm.cachedFrames[3] = newSample1; pWav->msadpcm.cachedFrameCount = 2; } else { ma_int32 newSample0; ma_int32 newSample1; newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample0 += nibble0 * pWav->msadpcm.delta[0]; newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample0; newSample1 = ((pWav->msadpcm.prevFrames[1][1] * coeff1Table[pWav->msadpcm.predictor[1]]) + (pWav->msadpcm.prevFrames[1][0] * coeff2Table[pWav->msadpcm.predictor[1]])) >> 8; newSample1 += nibble1 * pWav->msadpcm.delta[1]; newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767); pWav->msadpcm.delta[1] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[1]) >> 8; if (pWav->msadpcm.delta[1] < 16) { pWav->msadpcm.delta[1] = 16; } pWav->msadpcm.prevFrames[1][0] = pWav->msadpcm.prevFrames[1][1]; pWav->msadpcm.prevFrames[1][1] = newSample1; pWav->msadpcm.cachedFrames[2] = newSample0; pWav->msadpcm.cachedFrames[3] = newSample1; pWav->msadpcm.cachedFrameCount = 1; } } } } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead = 0; ma_uint32 iChannel; static ma_int32 indexTable[16] = { -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 }; static ma_int32 stepTable[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 }; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(framesToRead > 0); while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { MA_DR_WAV_ASSERT(framesToRead > 0); if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { ma_uint8 header[4]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); if (header[2] >= ma_dr_wav_countof(stepTable)) { pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current); pWav->ima.bytesRemainingInBlock = 0; return totalFramesRead; } pWav->ima.predictor[0] = (ma_int16)ma_dr_wav_bytes_to_u16(header + 0); pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[0]; pWav->ima.cachedFrameCount = 1; } else { ma_uint8 header[8]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); if (header[2] >= ma_dr_wav_countof(stepTable) || header[6] >= ma_dr_wav_countof(stepTable)) { pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current); pWav->ima.bytesRemainingInBlock = 0; return totalFramesRead; } pWav->ima.predictor[0] = ma_dr_wav_bytes_to_s16(header + 0); pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.predictor[1] = ma_dr_wav_bytes_to_s16(header + 4); pWav->ima.stepIndex[1] = ma_dr_wav_clamp(header[6], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 2] = pWav->ima.predictor[0]; pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[1]; pWav->ima.cachedFrameCount = 1; } } while (framesToRead > 0 && pWav->ima.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { if (pBufferOut != NULL) { ma_uint32 iSample; for (iSample = 0; iSample < pWav->channels; iSample += 1) { pBufferOut[iSample] = (ma_int16)pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + iSample]; } pBufferOut += pWav->channels; } framesToRead -= 1; totalFramesRead += 1; pWav->readCursorInPCMFrames += 1; pWav->ima.cachedFrameCount -= 1; } if (framesToRead == 0) { break; } if (pWav->ima.cachedFrameCount == 0) { if (pWav->ima.bytesRemainingInBlock == 0) { continue; } else { pWav->ima.cachedFrameCount = 8; for (iChannel = 0; iChannel < pWav->channels; ++iChannel) { ma_uint32 iByte; ma_uint8 nibbles[4]; if (pWav->onRead(pWav->pUserData, &nibbles, 4) != 4) { pWav->ima.cachedFrameCount = 0; return totalFramesRead; } pWav->ima.bytesRemainingInBlock -= 4; for (iByte = 0; iByte < 4; ++iByte) { ma_uint8 nibble0 = ((nibbles[iByte] & 0x0F) >> 0); ma_uint8 nibble1 = ((nibbles[iByte] & 0xF0) >> 4); ma_int32 step = stepTable[pWav->ima.stepIndex[iChannel]]; ma_int32 predictor = pWav->ima.predictor[iChannel]; ma_int32 diff = step >> 3; if (nibble0 & 1) diff += step >> 2; if (nibble0 & 2) diff += step >> 1; if (nibble0 & 4) diff += step; if (nibble0 & 8) diff = -diff; predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767); pWav->ima.predictor[iChannel] = predictor; pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble0], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+0)*pWav->channels + iChannel] = predictor; step = stepTable[pWav->ima.stepIndex[iChannel]]; predictor = pWav->ima.predictor[iChannel]; diff = step >> 3; if (nibble1 & 1) diff += step >> 2; if (nibble1 & 2) diff += step >> 1; if (nibble1 & 4) diff += step; if (nibble1 & 8) diff = -diff; predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767); pWav->ima.predictor[iChannel] = predictor; pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble1], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+1)*pWav->channels + iChannel] = predictor; } } } } } return totalFramesRead; } #ifndef MA_DR_WAV_NO_CONVERSION_API static unsigned short g_ma_dr_wavAlawTable[256] = { 0xEA80, 0xEB80, 0xE880, 0xE980, 0xEE80, 0xEF80, 0xEC80, 0xED80, 0xE280, 0xE380, 0xE080, 0xE180, 0xE680, 0xE780, 0xE480, 0xE580, 0xF540, 0xF5C0, 0xF440, 0xF4C0, 0xF740, 0xF7C0, 0xF640, 0xF6C0, 0xF140, 0xF1C0, 0xF040, 0xF0C0, 0xF340, 0xF3C0, 0xF240, 0xF2C0, 0xAA00, 0xAE00, 0xA200, 0xA600, 0xBA00, 0xBE00, 0xB200, 0xB600, 0x8A00, 0x8E00, 0x8200, 0x8600, 0x9A00, 0x9E00, 0x9200, 0x9600, 0xD500, 0xD700, 0xD100, 0xD300, 0xDD00, 0xDF00, 0xD900, 0xDB00, 0xC500, 0xC700, 0xC100, 0xC300, 0xCD00, 0xCF00, 0xC900, 0xCB00, 0xFEA8, 0xFEB8, 0xFE88, 0xFE98, 0xFEE8, 0xFEF8, 0xFEC8, 0xFED8, 0xFE28, 0xFE38, 0xFE08, 0xFE18, 0xFE68, 0xFE78, 0xFE48, 0xFE58, 0xFFA8, 0xFFB8, 0xFF88, 0xFF98, 0xFFE8, 0xFFF8, 0xFFC8, 0xFFD8, 0xFF28, 0xFF38, 0xFF08, 0xFF18, 0xFF68, 0xFF78, 0xFF48, 0xFF58, 0xFAA0, 0xFAE0, 0xFA20, 0xFA60, 0xFBA0, 0xFBE0, 0xFB20, 0xFB60, 0xF8A0, 0xF8E0, 0xF820, 0xF860, 0xF9A0, 0xF9E0, 0xF920, 0xF960, 0xFD50, 0xFD70, 0xFD10, 0xFD30, 0xFDD0, 0xFDF0, 0xFD90, 0xFDB0, 0xFC50, 0xFC70, 0xFC10, 0xFC30, 0xFCD0, 0xFCF0, 0xFC90, 0xFCB0, 0x1580, 0x1480, 0x1780, 0x1680, 0x1180, 0x1080, 0x1380, 0x1280, 0x1D80, 0x1C80, 0x1F80, 0x1E80, 0x1980, 0x1880, 0x1B80, 0x1A80, 0x0AC0, 0x0A40, 0x0BC0, 0x0B40, 0x08C0, 0x0840, 0x09C0, 0x0940, 0x0EC0, 0x0E40, 0x0FC0, 0x0F40, 0x0CC0, 0x0C40, 0x0DC0, 0x0D40, 0x5600, 0x5200, 0x5E00, 0x5A00, 0x4600, 0x4200, 0x4E00, 0x4A00, 0x7600, 0x7200, 0x7E00, 0x7A00, 0x6600, 0x6200, 0x6E00, 0x6A00, 0x2B00, 0x2900, 0x2F00, 0x2D00, 0x2300, 0x2100, 0x2700, 0x2500, 0x3B00, 0x3900, 0x3F00, 0x3D00, 0x3300, 0x3100, 0x3700, 0x3500, 0x0158, 0x0148, 0x0178, 0x0168, 0x0118, 0x0108, 0x0138, 0x0128, 0x01D8, 0x01C8, 0x01F8, 0x01E8, 0x0198, 0x0188, 0x01B8, 0x01A8, 0x0058, 0x0048, 0x0078, 0x0068, 0x0018, 0x0008, 0x0038, 0x0028, 0x00D8, 0x00C8, 0x00F8, 0x00E8, 0x0098, 0x0088, 0x00B8, 0x00A8, 0x0560, 0x0520, 0x05E0, 0x05A0, 0x0460, 0x0420, 0x04E0, 0x04A0, 0x0760, 0x0720, 0x07E0, 0x07A0, 0x0660, 0x0620, 0x06E0, 0x06A0, 0x02B0, 0x0290, 0x02F0, 0x02D0, 0x0230, 0x0210, 0x0270, 0x0250, 0x03B0, 0x0390, 0x03F0, 0x03D0, 0x0330, 0x0310, 0x0370, 0x0350 }; static unsigned short g_ma_dr_wavMulawTable[256] = { 0x8284, 0x8684, 0x8A84, 0x8E84, 0x9284, 0x9684, 0x9A84, 0x9E84, 0xA284, 0xA684, 0xAA84, 0xAE84, 0xB284, 0xB684, 0xBA84, 0xBE84, 0xC184, 0xC384, 0xC584, 0xC784, 0xC984, 0xCB84, 0xCD84, 0xCF84, 0xD184, 0xD384, 0xD584, 0xD784, 0xD984, 0xDB84, 0xDD84, 0xDF84, 0xE104, 0xE204, 0xE304, 0xE404, 0xE504, 0xE604, 0xE704, 0xE804, 0xE904, 0xEA04, 0xEB04, 0xEC04, 0xED04, 0xEE04, 0xEF04, 0xF004, 0xF0C4, 0xF144, 0xF1C4, 0xF244, 0xF2C4, 0xF344, 0xF3C4, 0xF444, 0xF4C4, 0xF544, 0xF5C4, 0xF644, 0xF6C4, 0xF744, 0xF7C4, 0xF844, 0xF8A4, 0xF8E4, 0xF924, 0xF964, 0xF9A4, 0xF9E4, 0xFA24, 0xFA64, 0xFAA4, 0xFAE4, 0xFB24, 0xFB64, 0xFBA4, 0xFBE4, 0xFC24, 0xFC64, 0xFC94, 0xFCB4, 0xFCD4, 0xFCF4, 0xFD14, 0xFD34, 0xFD54, 0xFD74, 0xFD94, 0xFDB4, 0xFDD4, 0xFDF4, 0xFE14, 0xFE34, 0xFE54, 0xFE74, 0xFE8C, 0xFE9C, 0xFEAC, 0xFEBC, 0xFECC, 0xFEDC, 0xFEEC, 0xFEFC, 0xFF0C, 0xFF1C, 0xFF2C, 0xFF3C, 0xFF4C, 0xFF5C, 0xFF6C, 0xFF7C, 0xFF88, 0xFF90, 0xFF98, 0xFFA0, 0xFFA8, 0xFFB0, 0xFFB8, 0xFFC0, 0xFFC8, 0xFFD0, 0xFFD8, 0xFFE0, 0xFFE8, 0xFFF0, 0xFFF8, 0x0000, 0x7D7C, 0x797C, 0x757C, 0x717C, 0x6D7C, 0x697C, 0x657C, 0x617C, 0x5D7C, 0x597C, 0x557C, 0x517C, 0x4D7C, 0x497C, 0x457C, 0x417C, 0x3E7C, 0x3C7C, 0x3A7C, 0x387C, 0x367C, 0x347C, 0x327C, 0x307C, 0x2E7C, 0x2C7C, 0x2A7C, 0x287C, 0x267C, 0x247C, 0x227C, 0x207C, 0x1EFC, 0x1DFC, 0x1CFC, 0x1BFC, 0x1AFC, 0x19FC, 0x18FC, 0x17FC, 0x16FC, 0x15FC, 0x14FC, 0x13FC, 0x12FC, 0x11FC, 0x10FC, 0x0FFC, 0x0F3C, 0x0EBC, 0x0E3C, 0x0DBC, 0x0D3C, 0x0CBC, 0x0C3C, 0x0BBC, 0x0B3C, 0x0ABC, 0x0A3C, 0x09BC, 0x093C, 0x08BC, 0x083C, 0x07BC, 0x075C, 0x071C, 0x06DC, 0x069C, 0x065C, 0x061C, 0x05DC, 0x059C, 0x055C, 0x051C, 0x04DC, 0x049C, 0x045C, 0x041C, 0x03DC, 0x039C, 0x036C, 0x034C, 0x032C, 0x030C, 0x02EC, 0x02CC, 0x02AC, 0x028C, 0x026C, 0x024C, 0x022C, 0x020C, 0x01EC, 0x01CC, 0x01AC, 0x018C, 0x0174, 0x0164, 0x0154, 0x0144, 0x0134, 0x0124, 0x0114, 0x0104, 0x00F4, 0x00E4, 0x00D4, 0x00C4, 0x00B4, 0x00A4, 0x0094, 0x0084, 0x0078, 0x0070, 0x0068, 0x0060, 0x0058, 0x0050, 0x0048, 0x0040, 0x0038, 0x0030, 0x0028, 0x0020, 0x0018, 0x0010, 0x0008, 0x0000 }; static MA_INLINE ma_int16 ma_dr_wav__alaw_to_s16(ma_uint8 sampleIn) { return (short)g_ma_dr_wavAlawTable[sampleIn]; } static MA_INLINE ma_int16 ma_dr_wav__mulaw_to_s16(ma_uint8 sampleIn) { return (short)g_ma_dr_wavMulawTable[sampleIn]; } MA_PRIVATE void ma_dr_wav__pcm_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { size_t i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_s16(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 2) { for (i = 0; i < totalSampleCount; ++i) { *pOut++ = ((const ma_int16*)pIn)[i]; } return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_s16(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 4) { ma_dr_wav_s32_to_s16(pOut, (const ma_int32*)pIn, totalSampleCount); return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } for (i = 0; i < totalSampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (ma_int16)((ma_int64)sample >> 48); } } MA_PRIVATE void ma_dr_wav__ieee_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { ma_dr_wav_f32_to_s16(pOut, (const float*)pIn, totalSampleCount); return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_s16(pOut, (const double*)pIn, totalSampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if ((pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 16) || pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(ma_int16) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(ma_int16) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_s16__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_s16__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_s16__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_s16__mulaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { return ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = pIn[i]; r = x << 8; r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = ((int)(((unsigned int)(((const ma_uint8*)pIn)[i*3+0]) << 8) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+1]) << 16) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+2])) << 24)) >> 8; r = x >> 8; pOut[i] = (short)r; } } MA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = pIn[i]; r = x >> 16; pOut[i] = (short)r; } } MA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { float x = pIn[i]; float c; c = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); c = c + 1; r = (int)(c * 32767.5f); r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { double x = pIn[i]; double c; c = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); c = c + 1; r = (int)(c * 32767.5); r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; for (i = 0; i < sampleCount; ++i) { pOut[i] = ma_dr_wav__alaw_to_s16(pIn[i]); } } MA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; for (i = 0; i < sampleCount; ++i) { pOut[i] = ma_dr_wav__mulaw_to_s16(pIn[i]); } } MA_PRIVATE void ma_dr_wav__pcm_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { unsigned int i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_f32(pOut, pIn, sampleCount); return; } if (bytesPerSample == 2) { ma_dr_wav_s16_to_f32(pOut, (const ma_int16*)pIn, sampleCount); return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_f32(pOut, pIn, sampleCount); return; } if (bytesPerSample == 4) { ma_dr_wav_s32_to_f32(pOut, (const ma_int32*)pIn, sampleCount); return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut)); return; } for (i = 0; i < sampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (float)((ma_int64)sample / 9223372036854775807.0); } } MA_PRIVATE void ma_dr_wav__ieee_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { unsigned int i; for (i = 0; i < sampleCount; ++i) { *pOut++ = ((const float*)pIn)[i]; } return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_f32(pOut, (const double*)pIn, sampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_int16 samples16[2048]; totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); ma_dr_wav_s16_to_f32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels)); pBufferOut += framesRead*pWav->channels; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT && pWav->bitsPerSample == 32) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(float) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(float) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_f32__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_f32__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_f32__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_f32__mulaw(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT for (i = 0; i < sampleCount; ++i) { *pOut++ = (pIn[i] / 256.0f) * 2 - 1; } #else for (i = 0; i < sampleCount; ++i) { float x = pIn[i]; x = x * 0.00784313725490196078f; x = x - 1; *pOut++ = x; } #endif } MA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = pIn[i] * 0.000030517578125f; } } MA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { double x; ma_uint32 a = ((ma_uint32)(pIn[i*3+0]) << 8); ma_uint32 b = ((ma_uint32)(pIn[i*3+1]) << 16); ma_uint32 c = ((ma_uint32)(pIn[i*3+2]) << 24); x = (double)((ma_int32)(a | b | c) >> 8); *pOut++ = (float)(x * 0.00000011920928955078125); } } MA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (float)(pIn[i] / 2147483648.0); } } MA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (float)pIn[i]; } } MA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ma_dr_wav__alaw_to_s16(pIn[i]) / 32768.0f; } } MA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ma_dr_wav__mulaw_to_s16(pIn[i]) / 32768.0f; } } MA_PRIVATE void ma_dr_wav__pcm_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { unsigned int i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_s32(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 2) { ma_dr_wav_s16_to_s32(pOut, (const ma_int16*)pIn, totalSampleCount); return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_s32(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 4) { for (i = 0; i < totalSampleCount; ++i) { *pOut++ = ((const ma_int32*)pIn)[i]; } return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } for (i = 0; i < totalSampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (ma_int32)((ma_int64)sample >> 32); } } MA_PRIVATE void ma_dr_wav__ieee_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { ma_dr_wav_f32_to_s32(pOut, (const float*)pIn, totalSampleCount); return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_s32(pOut, (const double*)pIn, totalSampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 32) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead = 0; ma_int16 samples16[2048]; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); ma_dr_wav_s16_to_s32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels)); pBufferOut += framesRead*pWav->channels; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(ma_int32) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(ma_int32) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_s32__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_s32__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_s32__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_s32__mulaw(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ((int)pIn[i] - 128) << 24; } } MA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = pIn[i] << 16; } } MA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { unsigned int s0 = pIn[i*3 + 0]; unsigned int s1 = pIn[i*3 + 1]; unsigned int s2 = pIn[i*3 + 2]; ma_int32 sample32 = (ma_int32)((s0 << 8) | (s1 << 16) | (s2 << 24)); *pOut++ = sample32; } } MA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (ma_int32)(2147483648.0f * pIn[i]); } } MA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (ma_int32)(2147483648.0 * pIn[i]); } } MA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ((ma_int32)ma_dr_wav__alaw_to_s16(pIn[i])) << 16; } } MA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i= 0; i < sampleCount; ++i) { *pOut++ = ((ma_int32)ma_dr_wav__mulaw_to_s16(pIn[i])) << 16; } } MA_PRIVATE ma_int16* ma_dr_wav__read_pcm_frames_and_close_s16(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; ma_int16* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int16); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (ma_int16*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_PRIVATE float* ma_dr_wav__read_pcm_frames_and_close_f32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; float* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(float); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (float*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_PRIVATE ma_int32* ma_dr_wav__read_pcm_frames_and_close_s32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; ma_int32* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int32); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (ma_int32*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #ifndef MA_DR_WAV_NO_STDIO MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #endif #endif MA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #endif MA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_wav__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_wav__free_default(p, NULL); } } MA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data) { return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8); } MA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data) { return (ma_int16)ma_dr_wav_bytes_to_u16(data); } MA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data) { return ma_dr_wav_bytes_to_u32_le(data); } MA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data) { union { ma_uint32 u32; float f32; } value; value.u32 = ma_dr_wav_bytes_to_u32(data); return value.f32; } MA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data) { return (ma_int32)ma_dr_wav_bytes_to_u32(data); } MA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data) { return ((ma_uint64)data[0] << 0) | ((ma_uint64)data[1] << 8) | ((ma_uint64)data[2] << 16) | ((ma_uint64)data[3] << 24) | ((ma_uint64)data[4] << 32) | ((ma_uint64)data[5] << 40) | ((ma_uint64)data[6] << 48) | ((ma_uint64)data[7] << 56); } MA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data) { return (ma_int64)ma_dr_wav_bytes_to_u64(data); } MA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16]) { int i; for (i = 0; i < 16; i += 1) { if (a[i] != b[i]) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b) { return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3]; } #ifdef __MRC__ #pragma options opt reset #endif #endif /* dr_wav_c end */ #endif /* MA_DR_WAV_IMPLEMENTATION */ #endif /* MA_NO_WAV */ #if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING) #if !defined(MA_DR_FLAC_IMPLEMENTATION) /* dr_flac_c begin */ #ifndef ma_dr_flac_c #define ma_dr_flac_c #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #endif #ifdef __linux__ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #ifndef __USE_BSD #define __USE_BSD #endif #include #endif #include #include #if !defined(MA_DR_FLAC_NO_SIMD) #if defined(MA_X64) || defined(MA_X86) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 && !defined(MA_DR_FLAC_NO_SSE2) #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if _MSC_VER >= 1600 && !defined(MA_DR_FLAC_NO_SSE41) #define MA_DR_FLAC_SUPPORT_SSE41 #endif #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) #if defined(__SSE2__) && !defined(MA_DR_FLAC_NO_SSE2) #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if defined(__SSE4_1__) && !defined(MA_DR_FLAC_NO_SSE41) #define MA_DR_FLAC_SUPPORT_SSE41 #endif #endif #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include) #if !defined(MA_DR_FLAC_SUPPORT_SSE2) && !defined(MA_DR_FLAC_NO_SSE2) && __has_include() #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if !defined(MA_DR_FLAC_SUPPORT_SSE41) && !defined(MA_DR_FLAC_NO_SSE41) && __has_include() #define MA_DR_FLAC_SUPPORT_SSE41 #endif #endif #if defined(MA_DR_FLAC_SUPPORT_SSE41) #include #elif defined(MA_DR_FLAC_SUPPORT_SSE2) #include #endif #endif #if defined(MA_ARM) #if !defined(MA_DR_FLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) #define MA_DR_FLAC_SUPPORT_NEON #include #endif #endif #endif #if !defined(MA_DR_FLAC_NO_SIMD) && (defined(MA_X86) || defined(MA_X64)) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 #include static void ma_dr_flac__cpuid(int info[4], int fid) { __cpuid(info, fid); } #else #define MA_DR_FLAC_NO_CPUID #endif #else #if defined(__GNUC__) || defined(__clang__) static void ma_dr_flac__cpuid(int info[4], int fid) { #if defined(MA_X86) && defined(__PIC__) __asm__ __volatile__ ( "xchg{l} {%%}ebx, %k1;" "cpuid;" "xchg{l} {%%}ebx, %k1;" : "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #else __asm__ __volatile__ ( "cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #endif } #else #define MA_DR_FLAC_NO_CPUID #endif #endif #else #define MA_DR_FLAC_NO_CPUID #endif static MA_INLINE ma_bool32 ma_dr_flac_has_sse2(void) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE2) #if defined(MA_X64) return MA_TRUE; #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__) return MA_TRUE; #else #if defined(MA_DR_FLAC_NO_CPUID) return MA_FALSE; #else int info[4]; ma_dr_flac__cpuid(info, 1); return (info[3] & (1 << 26)) != 0; #endif #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } static MA_INLINE ma_bool32 ma_dr_flac_has_sse41(void) { #if defined(MA_DR_FLAC_SUPPORT_SSE41) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE41) #if defined(__SSE4_1__) || defined(__AVX__) return MA_TRUE; #else #if defined(MA_DR_FLAC_NO_CPUID) return MA_FALSE; #else int info[4]; ma_dr_flac__cpuid(info, 1); return (info[2] & (1 << 19)) != 0; #endif #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } #if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(MA_X86) || defined(MA_X64)) && !defined(__clang__) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_clzll) || __has_builtin(__builtin_clzl) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #endif #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__clang__) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_bswap16) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #endif #if __has_builtin(__builtin_bswap32) #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #endif #if __has_builtin(__builtin_bswap64) #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #endif #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #endif #elif defined(__WATCOMC__) && defined(__386__) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC extern __inline ma_uint16 _watcom_bswap16(ma_uint16); extern __inline ma_uint32 _watcom_bswap32(ma_uint32); extern __inline ma_uint64 _watcom_bswap64(ma_uint64); #pragma aux _watcom_bswap16 = \ "xchg al, ah" \ parm [ax] \ value [ax] \ modify nomemory; #pragma aux _watcom_bswap32 = \ "bswap eax" \ parm [eax] \ value [eax] \ modify nomemory; #pragma aux _watcom_bswap64 = \ "bswap eax" \ "bswap edx" \ "xchg eax,edx" \ parm [eax edx] \ value [eax edx] \ modify nomemory; #endif #ifndef MA_DR_FLAC_ASSERT #include #define MA_DR_FLAC_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_FLAC_MALLOC #define MA_DR_FLAC_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_FLAC_REALLOC #define MA_DR_FLAC_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_FLAC_FREE #define MA_DR_FLAC_FREE(p) free((p)) #endif #ifndef MA_DR_FLAC_COPY_MEMORY #define MA_DR_FLAC_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_FLAC_ZERO_MEMORY #define MA_DR_FLAC_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #ifndef MA_DR_FLAC_ZERO_OBJECT #define MA_DR_FLAC_ZERO_OBJECT(p) MA_DR_FLAC_ZERO_MEMORY((p), sizeof(*(p))) #endif #define MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE 64 #define MA_DR_FLAC_SUBFRAME_CONSTANT 0 #define MA_DR_FLAC_SUBFRAME_VERBATIM 1 #define MA_DR_FLAC_SUBFRAME_FIXED 8 #define MA_DR_FLAC_SUBFRAME_LPC 32 #define MA_DR_FLAC_SUBFRAME_RESERVED 255 #define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE 0 #define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2 1 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT 0 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE 8 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE 9 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE 10 #define MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES 18 #define MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES 36 #define MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES 12 #define ma_dr_flac_align(x, a) ((((x) + (a) - 1) / (a)) * (a)) MA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_FLAC_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_FLAC_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_FLAC_VERSION_REVISION; } } MA_API const char* ma_dr_flac_version_string(void) { return MA_DR_FLAC_VERSION_STRING; } #if defined(__has_feature) #if __has_feature(thread_sanitizer) #define MA_DR_FLAC_NO_THREAD_SANITIZE __attribute__((no_sanitize("thread"))) #else #define MA_DR_FLAC_NO_THREAD_SANITIZE #endif #else #define MA_DR_FLAC_NO_THREAD_SANITIZE #endif #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) static ma_bool32 ma_dr_flac__gIsLZCNTSupported = MA_FALSE; #endif #ifndef MA_DR_FLAC_NO_CPUID static ma_bool32 ma_dr_flac__gIsSSE2Supported = MA_FALSE; static ma_bool32 ma_dr_flac__gIsSSE41Supported = MA_FALSE; MA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void) { static ma_bool32 isCPUCapsInitialized = MA_FALSE; if (!isCPUCapsInitialized) { #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) int info[4] = {0}; ma_dr_flac__cpuid(info, 0x80000001); ma_dr_flac__gIsLZCNTSupported = (info[2] & (1 << 5)) != 0; #endif ma_dr_flac__gIsSSE2Supported = ma_dr_flac_has_sse2(); ma_dr_flac__gIsSSE41Supported = ma_dr_flac_has_sse41(); isCPUCapsInitialized = MA_TRUE; } } #else static ma_bool32 ma_dr_flac__gIsNEONSupported = MA_FALSE; static MA_INLINE ma_bool32 ma_dr_flac__has_neon(void) { #if defined(MA_DR_FLAC_SUPPORT_NEON) #if defined(MA_ARM) && !defined(MA_DR_FLAC_NO_NEON) #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) return MA_TRUE; #else return MA_FALSE; #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } MA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void) { ma_dr_flac__gIsNEONSupported = ma_dr_flac__has_neon(); #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) ma_dr_flac__gIsLZCNTSupported = MA_TRUE; #endif } #endif static MA_INLINE ma_bool32 ma_dr_flac__is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE ma_uint16 ma_dr_flac__swap_endian_uint16(ma_uint16 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); #endif } static MA_INLINE ma_uint32 ma_dr_flac__swap_endian_uint32(ma_uint32 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT) ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap32(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } static MA_INLINE ma_uint64 ma_dr_flac__swap_endian_uint64(ma_uint64 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) | ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) | ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) | ((n & ((ma_uint64)0x000000FF << 32)) >> 8) | ((n & ((ma_uint64)0xFF000000 )) << 8) | ((n & ((ma_uint64)0x00FF0000 )) << 24) | ((n & ((ma_uint64)0x0000FF00 )) << 40) | ((n & ((ma_uint64)0x000000FF )) << 56); #endif } static MA_INLINE ma_uint16 ma_dr_flac__be2host_16(ma_uint16 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint16(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__be2host_32(ma_uint32 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint32(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__be2host_32_ptr_unaligned(const void* pData) { const ma_uint8* pNum = (ma_uint8*)pData; return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3); } static MA_INLINE ma_uint64 ma_dr_flac__be2host_64(ma_uint64 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint64(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__le2host_32(ma_uint32 n) { if (!ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint32(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__le2host_32_ptr_unaligned(const void* pData) { const ma_uint8* pNum = (ma_uint8*)pData; return *pNum | *(pNum+1) << 8 | *(pNum+2) << 16 | *(pNum+3) << 24; } static MA_INLINE ma_uint32 ma_dr_flac__unsynchsafe_32(ma_uint32 n) { ma_uint32 result = 0; result |= (n & 0x7F000000) >> 3; result |= (n & 0x007F0000) >> 2; result |= (n & 0x00007F00) >> 1; result |= (n & 0x0000007F) >> 0; return result; } static ma_uint8 ma_dr_flac__crc8_table[] = { 0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15, 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D, 0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65, 0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D, 0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5, 0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD, 0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85, 0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD, 0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2, 0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA, 0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2, 0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A, 0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32, 0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A, 0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42, 0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A, 0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C, 0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4, 0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC, 0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4, 0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C, 0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44, 0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C, 0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34, 0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B, 0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63, 0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B, 0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13, 0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB, 0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83, 0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB, 0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3 }; static ma_uint16 ma_dr_flac__crc16_table[] = { 0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011, 0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022, 0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072, 0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041, 0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2, 0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1, 0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1, 0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082, 0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192, 0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1, 0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1, 0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2, 0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151, 0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162, 0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132, 0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101, 0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312, 0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321, 0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371, 0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342, 0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1, 0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2, 0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2, 0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381, 0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291, 0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2, 0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2, 0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1, 0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252, 0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261, 0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231, 0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202 }; static MA_INLINE ma_uint8 ma_dr_flac_crc8_byte(ma_uint8 crc, ma_uint8 data) { return ma_dr_flac__crc8_table[crc ^ data]; } static MA_INLINE ma_uint8 ma_dr_flac_crc8(ma_uint8 crc, ma_uint32 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 ma_uint8 p = 0x07; for (int i = count-1; i >= 0; --i) { ma_uint8 bit = (data & (1 << i)) >> i; if (crc & 0x80) { crc = ((crc << 1) | bit) ^ p; } else { crc = ((crc << 1) | bit); } } return crc; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 32); wholeBytes = count >> 3; leftoverBits = count - (wholeBytes*8); leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { case 4: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (ma_uint8)((crc << leftoverBits) ^ ma_dr_flac__crc8_table[(crc >> (8 - leftoverBits)) ^ (data & leftoverDataMask)]); } return crc; #endif #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16_byte(ma_uint16 crc, ma_uint8 data) { return (crc << 8) ^ ma_dr_flac__crc16_table[(ma_uint8)(crc >> 8) ^ data]; } static MA_INLINE ma_uint16 ma_dr_flac_crc16_cache(ma_uint16 crc, ma_dr_flac_cache_t data) { #ifdef MA_64BIT crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF)); #endif crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 8) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 0) & 0xFF)); return crc; } static MA_INLINE ma_uint16 ma_dr_flac_crc16_bytes(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 byteCount) { switch (byteCount) { #ifdef MA_64BIT case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF)); case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF)); case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF)); case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF)); #endif case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF)); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF)); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 8) & 0xFF)); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 0) & 0xFF)); } return crc; } #if 0 static MA_INLINE ma_uint16 ma_dr_flac_crc16__32bit(ma_uint16 crc, ma_uint32 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 ma_uint16 p = 0x8005; for (int i = count-1; i >= 0; --i) { ma_uint16 bit = (data & (1ULL << i)) >> i; if (r & 0x8000) { r = ((r << 1) | bit) ^ p; } else { r = ((r << 1) | bit); } } return crc; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16__64bit(ma_uint16 crc, ma_uint64 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000 << 32) << leftoverBits)) >> (56 + leftoverBits))); case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000 << 32) << leftoverBits)) >> (48 + leftoverBits))); case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00 << 32) << leftoverBits)) >> (40 + leftoverBits))); case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF << 32) << leftoverBits)) >> (32 + leftoverBits))); case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000 ) << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000 ) << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00 ) << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF ) << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 count) { #ifdef MA_64BIT return ma_dr_flac_crc16__64bit(crc, data, count); #else return ma_dr_flac_crc16__32bit(crc, data, count); #endif } #endif #ifdef MA_64BIT #define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_64 #else #define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_32 #endif #define MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) (sizeof((bs)->cache)) #define MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) (sizeof((bs)->cache)*8) #define MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (bs)->consumedBits) #define MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount) (~((~(ma_dr_flac_cache_t)0) >> (_bitCount))) #define MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, _bitCount) (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (_bitCount)) #define MA_DR_FLAC_CACHE_L1_SELECT(bs, _bitCount) (((bs)->cache) & MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount)) #define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, _bitCount) (MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount))) #define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, _bitCount)(MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount)) & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1))) #define MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs) (sizeof((bs)->cacheL2)) #define MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) (MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs) / sizeof((bs)->cacheL2[0])) #define MA_DR_FLAC_CACHE_L2_LINES_REMAINING(bs) (MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - (bs)->nextL2Line) #ifndef MA_DR_FLAC_NO_CRC static MA_INLINE void ma_dr_flac__reset_crc16(ma_dr_flac_bs* bs) { bs->crc16 = 0; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } static MA_INLINE void ma_dr_flac__update_crc16(ma_dr_flac_bs* bs) { if (bs->crc16CacheIgnoredBytes == 0) { bs->crc16 = ma_dr_flac_crc16_cache(bs->crc16, bs->crc16Cache); } else { bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache, MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bs->crc16CacheIgnoredBytes); bs->crc16CacheIgnoredBytes = 0; } } static MA_INLINE ma_uint16 ma_dr_flac__flush_crc16(ma_dr_flac_bs* bs) { MA_DR_FLAC_ASSERT((MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7) == 0); if (MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) == 0) { ma_dr_flac__update_crc16(bs); } else { bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache >> MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs), (bs->consumedBits >> 3) - bs->crc16CacheIgnoredBytes); bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } return bs->crc16; } #endif static MA_INLINE ma_bool32 ma_dr_flac__reload_l1_cache_from_l2(ma_dr_flac_bs* bs) { size_t bytesRead; size_t alignedL1LineCount; if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } if (bs->unalignedByteCount > 0) { return MA_FALSE; } bytesRead = bs->onRead(bs->pUserData, bs->cacheL2, MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)); bs->nextL2Line = 0; if (bytesRead == MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } alignedL1LineCount = bytesRead / MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs); bs->unalignedByteCount = bytesRead - (alignedL1LineCount * MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs)); if (bs->unalignedByteCount > 0) { bs->unalignedCache = bs->cacheL2[alignedL1LineCount]; } if (alignedL1LineCount > 0) { size_t offset = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - alignedL1LineCount; size_t i; for (i = alignedL1LineCount; i > 0; --i) { bs->cacheL2[i-1 + offset] = bs->cacheL2[i-1]; } bs->nextL2Line = (ma_uint32)offset; bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } else { bs->nextL2Line = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs); return MA_FALSE; } } static ma_bool32 ma_dr_flac__reload_cache(ma_dr_flac_bs* bs) { size_t bytesRead; #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif if (ma_dr_flac__reload_l1_cache_from_l2(bs)) { bs->cache = ma_dr_flac__be2host__cache_line(bs->cache); bs->consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif return MA_TRUE; } bytesRead = bs->unalignedByteCount; if (bytesRead == 0) { bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); return MA_FALSE; } MA_DR_FLAC_ASSERT(bytesRead < MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs)); bs->consumedBits = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bytesRead) * 8; bs->cache = ma_dr_flac__be2host__cache_line(bs->unalignedCache); bs->cache &= MA_DR_FLAC_CACHE_L1_SELECTION_MASK(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)); bs->unalignedByteCount = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache >> bs->consumedBits; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; #endif return MA_TRUE; } static void ma_dr_flac__reset_cache(ma_dr_flac_bs* bs) { bs->nextL2Line = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs); bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); bs->cache = 0; bs->unalignedByteCount = 0; bs->unalignedCache = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = 0; bs->crc16CacheIgnoredBytes = 0; #endif } static MA_INLINE ma_bool32 ma_dr_flac__read_uint32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint32* pResultOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResultOut != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 32); if (bs->consumedBits == MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } if (bitCount <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { #ifdef MA_64BIT *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; #else if (bitCount < MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; } else { *pResultOut = (ma_uint32)bs->cache; bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); bs->cache = 0; } #endif return MA_TRUE; } else { ma_uint32 bitCountHi = MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); ma_uint32 bitCountLo = bitCount - bitCountHi; ma_uint32 resultHi; MA_DR_FLAC_ASSERT(bitCountHi > 0); MA_DR_FLAC_ASSERT(bitCountHi < 32); resultHi = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } *pResultOut = (resultHi << bitCountLo) | (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; return MA_TRUE; } } static ma_bool32 ma_dr_flac__read_int32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int32* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 32); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } if (bitCount < 32) { ma_uint32 signbit; signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; } *pResult = (ma_int32)result; return MA_TRUE; } #ifdef MA_64BIT static ma_bool32 ma_dr_flac__read_uint64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint64* pResultOut) { ma_uint32 resultHi; ma_uint32 resultLo; MA_DR_FLAC_ASSERT(bitCount <= 64); MA_DR_FLAC_ASSERT(bitCount > 32); if (!ma_dr_flac__read_uint32(bs, bitCount - 32, &resultHi)) { return MA_FALSE; } if (!ma_dr_flac__read_uint32(bs, 32, &resultLo)) { return MA_FALSE; } *pResultOut = (((ma_uint64)resultHi) << 32) | ((ma_uint64)resultLo); return MA_TRUE; } #endif #if 0 static ma_bool32 ma_dr_flac__read_int64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int64* pResultOut) { ma_uint64 result; ma_uint64 signbit; MA_DR_FLAC_ASSERT(bitCount <= 64); if (!ma_dr_flac__read_uint64(bs, bitCount, &result)) { return MA_FALSE; } signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; *pResultOut = (ma_int64)result; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__read_uint16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint16* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 16); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_uint16)result; return MA_TRUE; } #if 0 static ma_bool32 ma_dr_flac__read_int16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int16* pResult) { ma_int32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 16); if (!ma_dr_flac__read_int32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_int16)result; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__read_uint8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint8* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 8); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_uint8)result; return MA_TRUE; } static ma_bool32 ma_dr_flac__read_int8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int8* pResult) { ma_int32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 8); if (!ma_dr_flac__read_int32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_int8)result; return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_bits(ma_dr_flac_bs* bs, size_t bitsToSeek) { if (bitsToSeek <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { bs->consumedBits += (ma_uint32)bitsToSeek; bs->cache <<= bitsToSeek; return MA_TRUE; } else { bitsToSeek -= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); bs->consumedBits += MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); bs->cache = 0; #ifdef MA_64BIT while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { ma_uint64 bin; if (!ma_dr_flac__read_uint64(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return MA_FALSE; } bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); } #else while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { ma_uint32 bin; if (!ma_dr_flac__read_uint32(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return MA_FALSE; } bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); } #endif while (bitsToSeek >= 8) { ma_uint8 bin; if (!ma_dr_flac__read_uint8(bs, 8, &bin)) { return MA_FALSE; } bitsToSeek -= 8; } if (bitsToSeek > 0) { ma_uint8 bin; if (!ma_dr_flac__read_uint8(bs, (ma_uint32)bitsToSeek, &bin)) { return MA_FALSE; } bitsToSeek = 0; } MA_DR_FLAC_ASSERT(bitsToSeek == 0); return MA_TRUE; } } static ma_bool32 ma_dr_flac__find_and_seek_to_next_sync_code(ma_dr_flac_bs* bs) { MA_DR_FLAC_ASSERT(bs != NULL); if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return MA_FALSE; } for (;;) { ma_uint8 hi; #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__reset_crc16(bs); #endif if (!ma_dr_flac__read_uint8(bs, 8, &hi)) { return MA_FALSE; } if (hi == 0xFF) { ma_uint8 lo; if (!ma_dr_flac__read_uint8(bs, 6, &lo)) { return MA_FALSE; } if (lo == 0x3E) { return MA_TRUE; } else { if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return MA_FALSE; } } } } } #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) #define MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(MA_X64) || defined(MA_X86)) && !defined(__clang__) #define MA_DR_FLAC_IMPLEMENT_CLZ_MSVC #endif #if defined(__WATCOMC__) && defined(__386__) #define MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM #endif #ifdef __MRC__ #include #define MA_DR_FLAC_IMPLEMENT_CLZ_MRC #endif static MA_INLINE ma_uint32 ma_dr_flac__clz_software(ma_dr_flac_cache_t x) { ma_uint32 n; static ma_uint32 clz_table_4[] = { 0, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 }; if (x == 0) { return sizeof(x)*8; } n = clz_table_4[x >> (sizeof(x)*8 - 4)]; if (n == 0) { #ifdef MA_64BIT if ((x & ((ma_uint64)0xFFFFFFFF << 32)) == 0) { n = 32; x <<= 32; } if ((x & ((ma_uint64)0xFFFF0000 << 32)) == 0) { n += 16; x <<= 16; } if ((x & ((ma_uint64)0xFF000000 << 32)) == 0) { n += 8; x <<= 8; } if ((x & ((ma_uint64)0xF0000000 << 32)) == 0) { n += 4; x <<= 4; } #else if ((x & 0xFFFF0000) == 0) { n = 16; x <<= 16; } if ((x & 0xFF000000) == 0) { n += 8; x <<= 8; } if ((x & 0xF0000000) == 0) { n += 4; x <<= 4; } #endif n += clz_table_4[x >> (sizeof(x)*8 - 4)]; } return n - 1; } #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT static MA_INLINE ma_bool32 ma_dr_flac__is_lzcnt_supported(void) { #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) return MA_TRUE; #elif defined(__MRC__) return MA_TRUE; #else #ifdef MA_DR_FLAC_HAS_LZCNT_INTRINSIC return ma_dr_flac__gIsLZCNTSupported; #else return MA_FALSE; #endif #endif } static MA_INLINE ma_uint32 ma_dr_flac__clz_lzcnt(ma_dr_flac_cache_t x) { #if defined(_MSC_VER) #ifdef MA_64BIT return (ma_uint32)__lzcnt64(x); #else return (ma_uint32)__lzcnt(x); #endif #else #if defined(__GNUC__) || defined(__clang__) #if defined(MA_X64) { ma_uint64 r; __asm__ __volatile__ ( "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return (ma_uint32)r; } #elif defined(MA_X86) { ma_uint32 r; __asm__ __volatile__ ( "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return r; } #elif defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT) { unsigned int r; __asm__ __volatile__ ( #if defined(MA_64BIT) "clz %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(x) #else "clz %[out], %[in]" : [out]"=r"(r) : [in]"r"(x) #endif ); return r; } #else if (x == 0) { return sizeof(x)*8; } #ifdef MA_64BIT return (ma_uint32)__builtin_clzll((ma_uint64)x); #else return (ma_uint32)__builtin_clzl((ma_uint32)x); #endif #endif #else #error "This compiler does not support the lzcnt intrinsic." #endif #endif } #endif #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC #include static MA_INLINE ma_uint32 ma_dr_flac__clz_msvc(ma_dr_flac_cache_t x) { ma_uint32 n; if (x == 0) { return sizeof(x)*8; } #ifdef MA_64BIT _BitScanReverse64((unsigned long*)&n, x); #else _BitScanReverse((unsigned long*)&n, x); #endif return sizeof(x)*8 - n - 1; } #endif #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM static __inline ma_uint32 ma_dr_flac__clz_watcom (ma_uint32); #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT #pragma aux ma_dr_flac__clz_watcom_lzcnt = \ "db 0F3h, 0Fh, 0BDh, 0C0h" \ parm [eax] \ value [eax] \ modify nomemory; #else #pragma aux ma_dr_flac__clz_watcom = \ "bsr eax, eax" \ "xor eax, 31" \ parm [eax] nomemory \ value [eax] \ modify exact [eax] nomemory; #endif #endif static MA_INLINE ma_uint32 ma_dr_flac__clz(ma_dr_flac_cache_t x) { #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT if (ma_dr_flac__is_lzcnt_supported()) { return ma_dr_flac__clz_lzcnt(x); } else #endif { #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC return ma_dr_flac__clz_msvc(x); #elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT) return ma_dr_flac__clz_watcom_lzcnt(x); #elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM) return (x == 0) ? sizeof(x)*8 : ma_dr_flac__clz_watcom(x); #elif defined(__MRC__) return __cntlzw(x); #else return ma_dr_flac__clz_software(x); #endif } } static MA_INLINE ma_bool32 ma_dr_flac__seek_past_next_set_bit(ma_dr_flac_bs* bs, unsigned int* pOffsetOut) { ma_uint32 zeroCounter = 0; ma_uint32 setBitOffsetPlus1; while (bs->cache == 0) { zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } if (bs->cache == 1) { *pOffsetOut = zeroCounter + (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) - 1; if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } return MA_TRUE; } setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache); setBitOffsetPlus1 += 1; if (setBitOffsetPlus1 > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs->consumedBits += setBitOffsetPlus1; bs->cache <<= setBitOffsetPlus1; *pOffsetOut = zeroCounter + setBitOffsetPlus1 - 1; return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_to_byte(ma_dr_flac_bs* bs, ma_uint64 offsetFromStart) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(offsetFromStart > 0); if (offsetFromStart > 0x7FFFFFFF) { ma_uint64 bytesRemaining = offsetFromStart; if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } bytesRemaining -= 0x7FFFFFFF; while (bytesRemaining > 0x7FFFFFFF) { if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } bytesRemaining -= 0x7FFFFFFF; } if (bytesRemaining > 0) { if (!bs->onSeek(bs->pUserData, (int)bytesRemaining, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!bs->onSeek(bs->pUserData, (int)offsetFromStart, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } } ma_dr_flac__reset_cache(bs); return MA_TRUE; } static ma_result ma_dr_flac__read_utf8_coded_number(ma_dr_flac_bs* bs, ma_uint64* pNumberOut, ma_uint8* pCRCOut) { ma_uint8 crc; ma_uint64 result; ma_uint8 utf8[7] = {0}; int byteCount; int i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pNumberOut != NULL); MA_DR_FLAC_ASSERT(pCRCOut != NULL); crc = *pCRCOut; if (!ma_dr_flac__read_uint8(bs, 8, utf8)) { *pNumberOut = 0; return MA_AT_END; } crc = ma_dr_flac_crc8(crc, utf8[0], 8); if ((utf8[0] & 0x80) == 0) { *pNumberOut = utf8[0]; *pCRCOut = crc; return MA_SUCCESS; } if ((utf8[0] & 0xE0) == 0xC0) { byteCount = 2; } else if ((utf8[0] & 0xF0) == 0xE0) { byteCount = 3; } else if ((utf8[0] & 0xF8) == 0xF0) { byteCount = 4; } else if ((utf8[0] & 0xFC) == 0xF8) { byteCount = 5; } else if ((utf8[0] & 0xFE) == 0xFC) { byteCount = 6; } else if ((utf8[0] & 0xFF) == 0xFE) { byteCount = 7; } else { *pNumberOut = 0; return MA_CRC_MISMATCH; } MA_DR_FLAC_ASSERT(byteCount > 1); result = (ma_uint64)(utf8[0] & (0xFF >> (byteCount + 1))); for (i = 1; i < byteCount; ++i) { if (!ma_dr_flac__read_uint8(bs, 8, utf8 + i)) { *pNumberOut = 0; return MA_AT_END; } crc = ma_dr_flac_crc8(crc, utf8[i], 8); result = (result << 6) | (utf8[i] & 0x3F); } *pNumberOut = result; *pCRCOut = crc; return MA_SUCCESS; } static MA_INLINE ma_uint32 ma_dr_flac__ilog2_u32(ma_uint32 x) { #if 1 ma_uint32 result = 0; while (x > 0) { result += 1; x >>= 1; } return result; #endif } static MA_INLINE ma_bool32 ma_dr_flac__use_64_bit_prediction(ma_uint32 bitsPerSample, ma_uint32 order, ma_uint32 precision) { return bitsPerSample + precision + ma_dr_flac__ilog2_u32(order) > 32; } #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_32(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_int32 prediction = 0; MA_DR_FLAC_ASSERT(order <= 32); switch (order) { case 32: prediction += coefficients[31] * pDecodedSamples[-32]; case 31: prediction += coefficients[30] * pDecodedSamples[-31]; case 30: prediction += coefficients[29] * pDecodedSamples[-30]; case 29: prediction += coefficients[28] * pDecodedSamples[-29]; case 28: prediction += coefficients[27] * pDecodedSamples[-28]; case 27: prediction += coefficients[26] * pDecodedSamples[-27]; case 26: prediction += coefficients[25] * pDecodedSamples[-26]; case 25: prediction += coefficients[24] * pDecodedSamples[-25]; case 24: prediction += coefficients[23] * pDecodedSamples[-24]; case 23: prediction += coefficients[22] * pDecodedSamples[-23]; case 22: prediction += coefficients[21] * pDecodedSamples[-22]; case 21: prediction += coefficients[20] * pDecodedSamples[-21]; case 20: prediction += coefficients[19] * pDecodedSamples[-20]; case 19: prediction += coefficients[18] * pDecodedSamples[-19]; case 18: prediction += coefficients[17] * pDecodedSamples[-18]; case 17: prediction += coefficients[16] * pDecodedSamples[-17]; case 16: prediction += coefficients[15] * pDecodedSamples[-16]; case 15: prediction += coefficients[14] * pDecodedSamples[-15]; case 14: prediction += coefficients[13] * pDecodedSamples[-14]; case 13: prediction += coefficients[12] * pDecodedSamples[-13]; case 12: prediction += coefficients[11] * pDecodedSamples[-12]; case 11: prediction += coefficients[10] * pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * pDecodedSamples[- 1]; } return (ma_int32)(prediction >> shift); } static MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_64(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_int64 prediction; MA_DR_FLAC_ASSERT(order <= 32); #ifndef MA_64BIT if (order == 8) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; } else if (order == 7) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; } else if (order == 3) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; } else if (order == 6) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; } else if (order == 5) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; } else if (order == 4) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; } else if (order == 12) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12]; } else if (order == 2) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; } else if (order == 1) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; } else if (order == 10) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; } else if (order == 9) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; } else if (order == 11) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; } else { int j; prediction = 0; for (j = 0; j < (int)order; ++j) { prediction += coefficients[j] * (ma_int64)pDecodedSamples[-j-1]; } } #endif #ifdef MA_64BIT prediction = 0; switch (order) { case 32: prediction += coefficients[31] * (ma_int64)pDecodedSamples[-32]; case 31: prediction += coefficients[30] * (ma_int64)pDecodedSamples[-31]; case 30: prediction += coefficients[29] * (ma_int64)pDecodedSamples[-30]; case 29: prediction += coefficients[28] * (ma_int64)pDecodedSamples[-29]; case 28: prediction += coefficients[27] * (ma_int64)pDecodedSamples[-28]; case 27: prediction += coefficients[26] * (ma_int64)pDecodedSamples[-27]; case 26: prediction += coefficients[25] * (ma_int64)pDecodedSamples[-26]; case 25: prediction += coefficients[24] * (ma_int64)pDecodedSamples[-25]; case 24: prediction += coefficients[23] * (ma_int64)pDecodedSamples[-24]; case 23: prediction += coefficients[22] * (ma_int64)pDecodedSamples[-23]; case 22: prediction += coefficients[21] * (ma_int64)pDecodedSamples[-22]; case 21: prediction += coefficients[20] * (ma_int64)pDecodedSamples[-21]; case 20: prediction += coefficients[19] * (ma_int64)pDecodedSamples[-20]; case 19: prediction += coefficients[18] * (ma_int64)pDecodedSamples[-19]; case 18: prediction += coefficients[17] * (ma_int64)pDecodedSamples[-18]; case 17: prediction += coefficients[16] * (ma_int64)pDecodedSamples[-17]; case 16: prediction += coefficients[15] * (ma_int64)pDecodedSamples[-16]; case 15: prediction += coefficients[14] * (ma_int64)pDecodedSamples[-15]; case 14: prediction += coefficients[13] * (ma_int64)pDecodedSamples[-14]; case 13: prediction += coefficients[12] * (ma_int64)pDecodedSamples[-13]; case 12: prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12]; case 11: prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * (ma_int64)pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * (ma_int64)pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * (ma_int64)pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * (ma_int64)pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * (ma_int64)pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * (ma_int64)pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * (ma_int64)pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * (ma_int64)pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * (ma_int64)pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * (ma_int64)pDecodedSamples[- 1]; } #endif return (ma_int32)(prediction >> shift); } #if 0 static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__reference(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { ma_uint32 zeroCounter = 0; for (;;) { ma_uint8 bit; if (!ma_dr_flac__read_uint8(bs, 1, &bit)) { return MA_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } ma_uint32 decodedRice; if (riceParam > 0) { if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) { return MA_FALSE; } } else { decodedRice = 0; } decodedRice |= (zeroCounter << riceParam); if ((decodedRice & 0x01)) { decodedRice = ~(decodedRice >> 1); } else { decodedRice = (decodedRice >> 1); } if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return MA_TRUE; } #endif #if 0 static ma_bool32 ma_dr_flac__read_rice_parts__reference(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_uint32 zeroCounter = 0; ma_uint32 decodedRice; for (;;) { ma_uint8 bit; if (!ma_dr_flac__read_uint8(bs, 1, &bit)) { return MA_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } if (riceParam > 0) { if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) { return MA_FALSE; } } else { decodedRice = 0; } *pZeroCounterOut = zeroCounter; *pRiceParamPartOut = decodedRice; return MA_TRUE; } #endif #if 0 static MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_dr_flac_cache_t riceParamMask; ma_uint32 zeroCounter; ma_uint32 setBitOffsetPlus1; ma_uint32 riceParamPart; ma_uint32 riceLength; MA_DR_FLAC_ASSERT(riceParam > 0); riceParamMask = MA_DR_FLAC_CACHE_L1_SELECTION_MASK(riceParam); zeroCounter = 0; while (bs->cache == 0) { zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache); zeroCounter += setBitOffsetPlus1; setBitOffsetPlus1 += 1; riceLength = setBitOffsetPlus1 + riceParam; if (riceLength < MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { riceParamPart = (ma_uint32)((bs->cache & (riceParamMask >> setBitOffsetPlus1)) >> MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceLength)); bs->consumedBits += riceLength; bs->cache <<= riceLength; } else { ma_uint32 bitCountLo; ma_dr_flac_cache_t resultHi; bs->consumedBits += riceLength; bs->cache <<= setBitOffsetPlus1 & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1); bitCountLo = bs->consumedBits - MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); resultHi = MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, riceParam); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs->cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs->consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } } riceParamPart = (ma_uint32)(resultHi | MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo)); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; } pZeroCounterOut[0] = zeroCounter; pRiceParamPartOut[0] = riceParamPart; return MA_TRUE; } #endif static MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts_x1(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_uint32 riceParamPlus1 = riceParam + 1; ma_uint32 riceParamPlus1Shift = MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPlus1); ma_uint32 riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; ma_dr_flac_cache_t bs_cache = bs->cache; ma_uint32 bs_consumedBits = bs->consumedBits; ma_uint32 lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { pZeroCounterOut[0] = lzcount; extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { pRiceParamPartOut[0] = (ma_uint32)(bs_cache >> riceParamPlus1Shift); bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { ma_uint32 riceParamPartHi; ma_uint32 riceParamPartLo; ma_uint32 riceParamPartLoBitCount; riceParamPartHi = (ma_uint32)(bs_cache >> riceParamPlus1Shift); riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } riceParamPartLo = (ma_uint32)(bs_cache >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPartLoBitCount))); pRiceParamPartOut[0] = riceParamPartHi | riceParamPartLo; bs_cache <<= riceParamPartLoBitCount; } } else { ma_uint32 zeroCounter = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - bs_consumedBits); for (;;) { if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = ma_dr_flac__clz(bs_cache); zeroCounter += lzcount; if (lzcount < sizeof(bs_cache)*8) { break; } } pZeroCounterOut[0] = zeroCounter; goto extract_rice_param_part; } bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return MA_TRUE; } static MA_INLINE ma_bool32 ma_dr_flac__seek_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam) { ma_uint32 riceParamPlus1 = riceParam + 1; ma_uint32 riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; ma_dr_flac_cache_t bs_cache = bs->cache; ma_uint32 bs_consumedBits = bs->consumedBits; ma_uint32 lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { ma_uint32 riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } bs_cache <<= riceParamPartLoBitCount; } } else { for (;;) { if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { break; } } goto extract_rice_param_part; } bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; ma_uint32 zeroCountPart0; ma_uint32 riceParamPart0; ma_uint32 riceParamMask; ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); (void)bitsPerSample; (void)order; (void)shift; (void)coefficients; riceParamMask = (ma_uint32)~((~0UL) << riceParam); i = 0; while (i < count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; pSamplesOut[i] = riceParamPart0; i += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; ma_uint32 zeroCountPart0 = 0; ma_uint32 zeroCountPart1 = 0; ma_uint32 zeroCountPart2 = 0; ma_uint32 zeroCountPart3 = 0; ma_uint32 riceParamPart0 = 0; ma_uint32 riceParamPart1 = 0; ma_uint32 riceParamPart2 = 0; ma_uint32 riceParamPart3 = 0; ma_uint32 riceParamMask; const ma_int32* pSamplesOutEnd; ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder == 0) { return ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } riceParamMask = (ma_uint32)~((~0UL) << riceParam); pSamplesOutEnd = pSamplesOut + (count & ~3); if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { while (pSamplesOut < pSamplesOutEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } else { while (pSamplesOut < pSamplesOutEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } i = (count & ~3); while (i < count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } else { pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } i += 1; pSamplesOut += 1; } return MA_TRUE; } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE __m128i ma_dr_flac__mm_packs_interleaved_epi32(__m128i a, __m128i b) { __m128i r; r = _mm_packs_epi32(a, b); r = _mm_shuffle_epi32(r, _MM_SHUFFLE(3, 1, 2, 0)); r = _mm_shufflehi_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); r = _mm_shufflelo_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); return r; } #endif #if defined(MA_DR_FLAC_SUPPORT_SSE41) static MA_INLINE __m128i ma_dr_flac__mm_not_si128(__m128i a) { return _mm_xor_si128(a, _mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())); } static MA_INLINE __m128i ma_dr_flac__mm_hadd_epi32(__m128i x) { __m128i x64 = _mm_add_epi32(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); __m128i x32 = _mm_shufflelo_epi16(x64, _MM_SHUFFLE(1, 0, 3, 2)); return _mm_add_epi32(x64, x32); } static MA_INLINE __m128i ma_dr_flac__mm_hadd_epi64(__m128i x) { return _mm_add_epi64(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); } static MA_INLINE __m128i ma_dr_flac__mm_srai_epi64(__m128i x, int count) { __m128i lo = _mm_srli_epi64(x, count); __m128i hi = _mm_srai_epi32(x, count); hi = _mm_and_si128(hi, _mm_set_epi32(0xFFFFFFFF, 0, 0xFFFFFFFF, 0)); return _mm_or_si128(lo, hi); } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts0 = 0; ma_uint32 zeroCountParts1 = 0; ma_uint32 zeroCountParts2 = 0; ma_uint32 zeroCountParts3 = 0; ma_uint32 riceParamParts0 = 0; ma_uint32 riceParamParts1 = 0; ma_uint32 riceParamParts2 = 0; ma_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i riceParamMask128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); #if 1 { int runningOrder = order; if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else switch (order) { case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif while (pDecodedSamples < pDecodedSamplesEnd) { __m128i prediction128; __m128i zeroCountPart128; __m128i riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return MA_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(0x01))), _mm_set1_epi32(0x01))); if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_0, samples128_0); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_4, samples128_4); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_8, samples128_8); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_4, samples128_4)); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return MA_FALSE; } riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts0 = 0; ma_uint32 zeroCountParts1 = 0; ma_uint32 zeroCountParts2 = 0; ma_uint32 zeroCountParts3 = 0; ma_uint32 riceParamParts0 = 0; ma_uint32 riceParamParts1 = 0; ma_uint32 riceParamParts2 = 0; ma_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i prediction128; __m128i riceParamMask128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; MA_DR_FLAC_ASSERT(order <= 12); riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); prediction128 = _mm_setzero_si128(); coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); #if 1 { int runningOrder = order; if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else switch (order) { case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif while (pDecodedSamples < pDecodedSamplesEnd) { __m128i zeroCountPart128; __m128i riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return MA_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(1))), _mm_set1_epi32(1))); for (i = 0; i < 4; i += 1) { prediction128 = _mm_xor_si128(prediction128, prediction128); switch (order) { case 12: case 11: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(1, 1, 0, 0)))); case 10: case 9: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(3, 3, 2, 2)))); case 8: case 7: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(1, 1, 0, 0)))); case 6: case 5: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(3, 3, 2, 2)))); case 4: case 3: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(1, 1, 0, 0)))); case 2: case 1: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(3, 3, 2, 2)))); } prediction128 = ma_dr_flac__mm_hadd_epi64(prediction128); prediction128 = ma_dr_flac__mm_srai_epi64(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return MA_FALSE; } riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder > 0 && lpcOrder <= 12) { if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return ma_dr_flac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return ma_dr_flac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac__vst2q_s32(ma_int32* p, int32x4x2_t x) { vst1q_s32(p+0, x.val[0]); vst1q_s32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_u32(ma_uint32* p, uint32x4x2_t x) { vst1q_u32(p+0, x.val[0]); vst1q_u32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_f32(float* p, float32x4x2_t x) { vst1q_f32(p+0, x.val[0]); vst1q_f32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_s16(ma_int16* p, int16x4x2_t x) { vst1q_s16(p, vcombine_s16(x.val[0], x.val[1])); } static MA_INLINE void ma_dr_flac__vst2q_u16(ma_uint16* p, uint16x4x2_t x) { vst1q_u16(p, vcombine_u16(x.val[0], x.val[1])); } static MA_INLINE int32x4_t ma_dr_flac__vdupq_n_s32x4(ma_int32 x3, ma_int32 x2, ma_int32 x1, ma_int32 x0) { ma_int32 x[4]; x[3] = x3; x[2] = x2; x[1] = x1; x[0] = x0; return vld1q_s32(x); } static MA_INLINE int32x4_t ma_dr_flac__valignrq_s32_1(int32x4_t a, int32x4_t b) { return vextq_s32(b, a, 1); } static MA_INLINE uint32x4_t ma_dr_flac__valignrq_u32_1(uint32x4_t a, uint32x4_t b) { return vextq_u32(b, a, 1); } static MA_INLINE int32x2_t ma_dr_flac__vhaddq_s32(int32x4_t x) { int32x2_t r = vadd_s32(vget_high_s32(x), vget_low_s32(x)); return vpadd_s32(r, r); } static MA_INLINE int64x1_t ma_dr_flac__vhaddq_s64(int64x2_t x) { return vadd_s64(vget_high_s64(x), vget_low_s64(x)); } static MA_INLINE int32x4_t ma_dr_flac__vrevq_s32(int32x4_t x) { return vrev64q_s32(vcombine_s32(vget_high_s32(x), vget_low_s32(x))); } static MA_INLINE int32x4_t ma_dr_flac__vnotq_s32(int32x4_t x) { return veorq_s32(x, vdupq_n_s32(0xFFFFFFFF)); } static MA_INLINE uint32x4_t ma_dr_flac__vnotq_u32(uint32x4_t x) { return veorq_u32(x, vdupq_n_u32(0xFFFFFFFF)); } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts[4]; ma_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int32x2_t shift64; uint32x4_t one128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s32(-shift); one128 = vdupq_n_u32(1); { int runningOrder = order; ma_int32 tempC[4] = {0, 0, 0, 0}; ma_int32 tempS[4] = {0, 0, 0, 0}; if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0); coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4); coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8); } while (pDecodedSamples < pDecodedSamplesEnd) { int32x4_t prediction128; int32x2_t prediction64; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return MA_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_8, samples128_8); prediction128 = vmlaq_s32(prediction128, coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return MA_FALSE; } riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts[4]; ma_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int64x1_t shift64; uint32x4_t one128; int64x2_t prediction128 = { 0 }; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s64(-shift); one128 = vdupq_n_u32(1); { int runningOrder = order; ma_int32 tempC[4] = {0, 0, 0, 0}; ma_int32 tempS[4] = {0, 0, 0, 0}; if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0); coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4); coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8); } while (pDecodedSamples < pDecodedSamplesEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return MA_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); for (i = 0; i < 4; i += 1) { int64x1_t prediction64; prediction128 = veorq_s64(prediction128, prediction128); switch (order) { case 12: case 11: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_8), vget_low_s32(samples128_8))); case 10: case 9: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_8), vget_high_s32(samples128_8))); case 8: case 7: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_4), vget_low_s32(samples128_4))); case 6: case 5: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_4), vget_high_s32(samples128_4))); case 4: case 3: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_0), vget_low_s32(samples128_0))); case 2: case 1: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_0), vget_high_s32(samples128_0))); } prediction64 = ma_dr_flac__vhaddq_s64(prediction128); prediction64 = vshl_s64(prediction64, shift64); prediction64 = vadd_s64(prediction64, vdup_n_s64(vgetq_lane_u32(riceParamPart128, 0))); samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(vreinterpret_s32_s64(prediction64), vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return MA_FALSE; } riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder > 0 && lpcOrder <= 12) { if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return ma_dr_flac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return ma_dr_flac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { #if defined(MA_DR_FLAC_SUPPORT_SSE41) if (ma_dr_flac__gIsSSE41Supported) { return ma_dr_flac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported) { return ma_dr_flac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #endif { #if 0 return ma_dr_flac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #else return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #endif } } static ma_bool32 ma_dr_flac__read_and_seek_residual__rice(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); for (i = 0; i < count; ++i) { if (!ma_dr_flac__seek_rice_parts(bs, riceParam)) { return MA_FALSE; } } return MA_TRUE; } #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static ma_bool32 ma_dr_flac__decode_samples_with_residual__unencoded(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 unencodedBitsPerSample, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(unencodedBitsPerSample <= 31); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { if (unencodedBitsPerSample > 0) { if (!ma_dr_flac__read_int32(bs, unencodedBitsPerSample, pSamplesOut + i)) { return MA_FALSE; } } else { pSamplesOut[i] = 0; } if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] += ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] += ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 blockSize, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_uint8 residualMethod; ma_uint8 partitionOrder; ma_uint32 samplesInPartition; ma_uint32 partitionsRemaining; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(blockSize != 0); MA_DR_FLAC_ASSERT(pDecodedSamples != NULL); if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) { return MA_FALSE; } if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return MA_FALSE; } pDecodedSamples += lpcOrder; if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) { return MA_FALSE; } if (partitionOrder > 8) { return MA_FALSE; } if ((blockSize / (1 << partitionOrder)) < lpcOrder) { return MA_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder; partitionsRemaining = (1 << partitionOrder); for (;;) { ma_uint8 riceParam = 0; if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) { return MA_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) { return MA_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!ma_dr_flac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } } else { ma_uint8 unencodedBitsPerSample = 0; if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return MA_FALSE; } if (!ma_dr_flac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } } pDecodedSamples += samplesInPartition; if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; if (partitionOrder != 0) { samplesInPartition = blockSize / (1 << partitionOrder); } } return MA_TRUE; } static ma_bool32 ma_dr_flac__read_and_seek_residual(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 order) { ma_uint8 residualMethod; ma_uint8 partitionOrder; ma_uint32 samplesInPartition; ma_uint32 partitionsRemaining; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(blockSize != 0); if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) { return MA_FALSE; } if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) { return MA_FALSE; } if (partitionOrder > 8) { return MA_FALSE; } if ((blockSize / (1 << partitionOrder)) <= order) { return MA_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - order; partitionsRemaining = (1 << partitionOrder); for (;;) { ma_uint8 riceParam = 0; if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) { return MA_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) { return MA_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!ma_dr_flac__read_and_seek_residual__rice(bs, samplesInPartition, riceParam)) { return MA_FALSE; } } else { ma_uint8 unencodedBitsPerSample = 0; if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return MA_FALSE; } if (!ma_dr_flac__seek_bits(bs, unencodedBitsPerSample * samplesInPartition)) { return MA_FALSE; } } if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; samplesInPartition = blockSize / (1 << partitionOrder); } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__constant(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples) { ma_uint32 i; ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } for (i = 0; i < blockSize; ++i) { pDecodedSamples[i] = sample; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__verbatim(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples) { ma_uint32 i; for (i = 0; i < blockSize; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__fixed(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples) { ma_uint32 i; static ma_int32 lpcCoefficientsTable[5][4] = { {0, 0, 0, 0}, {1, 0, 0, 0}, {2, -1, 0, 0}, {3, -3, 1, 0}, {4, -6, 4, -1} }; for (i = 0; i < lpcOrder; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } if (!ma_dr_flac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__lpc(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 bitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples) { ma_uint8 i; ma_uint8 lpcPrecision; ma_int8 lpcShift; ma_int32 coefficients[32]; for (i = 0; i < lpcOrder; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, bitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) { return MA_FALSE; } if (lpcPrecision == 15) { return MA_FALSE; } lpcPrecision += 1; if (!ma_dr_flac__read_int8(bs, 5, &lpcShift)) { return MA_FALSE; } if (lpcShift < 0) { return MA_FALSE; } MA_DR_FLAC_ZERO_MEMORY(coefficients, sizeof(coefficients)); for (i = 0; i < lpcOrder; ++i) { if (!ma_dr_flac__read_int32(bs, lpcPrecision, coefficients + i)) { return MA_FALSE; } } if (!ma_dr_flac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__read_next_flac_frame_header(ma_dr_flac_bs* bs, ma_uint8 streaminfoBitsPerSample, ma_dr_flac_frame_header* header) { const ma_uint32 sampleRateTable[12] = {0, 88200, 176400, 192000, 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000}; const ma_uint8 bitsPerSampleTable[8] = {0, 8, 12, (ma_uint8)-1, 16, 20, 24, (ma_uint8)-1}; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(header != NULL); for (;;) { ma_uint8 crc8 = 0xCE; ma_uint8 reserved = 0; ma_uint8 blockingStrategy = 0; ma_uint8 blockSize = 0; ma_uint8 sampleRate = 0; ma_uint8 channelAssignment = 0; ma_uint8 bitsPerSample = 0; ma_bool32 isVariableBlockSize; if (!ma_dr_flac__find_and_seek_to_next_sync_code(bs)) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) { return MA_FALSE; } if (reserved == 1) { continue; } crc8 = ma_dr_flac_crc8(crc8, reserved, 1); if (!ma_dr_flac__read_uint8(bs, 1, &blockingStrategy)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, blockingStrategy, 1); if (!ma_dr_flac__read_uint8(bs, 4, &blockSize)) { return MA_FALSE; } if (blockSize == 0) { continue; } crc8 = ma_dr_flac_crc8(crc8, blockSize, 4); if (!ma_dr_flac__read_uint8(bs, 4, &sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, sampleRate, 4); if (!ma_dr_flac__read_uint8(bs, 4, &channelAssignment)) { return MA_FALSE; } if (channelAssignment > 10) { continue; } crc8 = ma_dr_flac_crc8(crc8, channelAssignment, 4); if (!ma_dr_flac__read_uint8(bs, 3, &bitsPerSample)) { return MA_FALSE; } if (bitsPerSample == 3 || bitsPerSample == 7) { continue; } crc8 = ma_dr_flac_crc8(crc8, bitsPerSample, 3); if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) { return MA_FALSE; } if (reserved == 1) { continue; } crc8 = ma_dr_flac_crc8(crc8, reserved, 1); isVariableBlockSize = blockingStrategy == 1; if (isVariableBlockSize) { ma_uint64 pcmFrameNumber; ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &pcmFrameNumber, &crc8); if (result != MA_SUCCESS) { if (result == MA_AT_END) { return MA_FALSE; } else { continue; } } header->flacFrameNumber = 0; header->pcmFrameNumber = pcmFrameNumber; } else { ma_uint64 flacFrameNumber = 0; ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &flacFrameNumber, &crc8); if (result != MA_SUCCESS) { if (result == MA_AT_END) { return MA_FALSE; } else { continue; } } header->flacFrameNumber = (ma_uint32)flacFrameNumber; header->pcmFrameNumber = 0; } MA_DR_FLAC_ASSERT(blockSize > 0); if (blockSize == 1) { header->blockSizeInPCMFrames = 192; } else if (blockSize <= 5) { MA_DR_FLAC_ASSERT(blockSize >= 2); header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2)); } else if (blockSize == 6) { if (!ma_dr_flac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 8); header->blockSizeInPCMFrames += 1; } else if (blockSize == 7) { if (!ma_dr_flac__read_uint16(bs, 16, &header->blockSizeInPCMFrames)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 16); if (header->blockSizeInPCMFrames == 0xFFFF) { return MA_FALSE; } header->blockSizeInPCMFrames += 1; } else { MA_DR_FLAC_ASSERT(blockSize >= 8); header->blockSizeInPCMFrames = 256 * (1 << (blockSize - 8)); } if (sampleRate <= 11) { header->sampleRate = sampleRateTable[sampleRate]; } else if (sampleRate == 12) { if (!ma_dr_flac__read_uint32(bs, 8, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 8); header->sampleRate *= 1000; } else if (sampleRate == 13) { if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16); } else if (sampleRate == 14) { if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16); header->sampleRate *= 10; } else { continue; } header->channelAssignment = channelAssignment; header->bitsPerSample = bitsPerSampleTable[bitsPerSample]; if (header->bitsPerSample == 0) { header->bitsPerSample = streaminfoBitsPerSample; } if (header->bitsPerSample != streaminfoBitsPerSample) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 8, &header->crc8)) { return MA_FALSE; } #ifndef MA_DR_FLAC_NO_CRC if (header->crc8 != crc8) { continue; } #endif return MA_TRUE; } } static ma_bool32 ma_dr_flac__read_subframe_header(ma_dr_flac_bs* bs, ma_dr_flac_subframe* pSubframe) { ma_uint8 header; int type; if (!ma_dr_flac__read_uint8(bs, 8, &header)) { return MA_FALSE; } if ((header & 0x80) != 0) { return MA_FALSE; } pSubframe->lpcOrder = 0; type = (header & 0x7E) >> 1; if (type == 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_CONSTANT; } else if (type == 1) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_VERBATIM; } else { if ((type & 0x20) != 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_LPC; pSubframe->lpcOrder = (ma_uint8)(type & 0x1F) + 1; } else if ((type & 0x08) != 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_FIXED; pSubframe->lpcOrder = (ma_uint8)(type & 0x07); if (pSubframe->lpcOrder > 4) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED; pSubframe->lpcOrder = 0; } } else { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED; } } if (pSubframe->subframeType == MA_DR_FLAC_SUBFRAME_RESERVED) { return MA_FALSE; } pSubframe->wastedBitsPerSample = 0; if ((header & 0x01) == 1) { unsigned int wastedBitsPerSample; if (!ma_dr_flac__seek_past_next_set_bit(bs, &wastedBitsPerSample)) { return MA_FALSE; } pSubframe->wastedBitsPerSample = (ma_uint8)wastedBitsPerSample + 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex, ma_int32* pDecodedSamplesOut) { ma_dr_flac_subframe* pSubframe; ma_uint32 subframeBitsPerSample; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) { return MA_FALSE; } subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } if (subframeBitsPerSample > 32) { return MA_FALSE; } if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return MA_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = pDecodedSamplesOut; if (frame->header.blockSizeInPCMFrames < pSubframe->lpcOrder) { return MA_FALSE; } switch (pSubframe->subframeType) { case MA_DR_FLAC_SUBFRAME_CONSTANT: { ma_dr_flac__decode_samples__constant(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_VERBATIM: { ma_dr_flac__decode_samples__verbatim(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_FIXED: { ma_dr_flac__decode_samples__fixed(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_LPC: { ma_dr_flac__decode_samples__lpc(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; default: return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex) { ma_dr_flac_subframe* pSubframe; ma_uint32 subframeBitsPerSample; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) { return MA_FALSE; } subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return MA_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = NULL; switch (pSubframe->subframeType) { case MA_DR_FLAC_SUBFRAME_CONSTANT: { if (!ma_dr_flac__seek_bits(bs, subframeBitsPerSample)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_VERBATIM: { unsigned int bitsToSeek = frame->header.blockSizeInPCMFrames * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_FIXED: { unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_LPC: { ma_uint8 lpcPrecision; unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) { return MA_FALSE; } if (lpcPrecision == 15) { return MA_FALSE; } lpcPrecision += 1; bitsToSeek = (pSubframe->lpcOrder * lpcPrecision) + 5; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return MA_FALSE; } } break; default: return MA_FALSE; } return MA_TRUE; } static MA_INLINE ma_uint8 ma_dr_flac__get_channel_count_from_channel_assignment(ma_int8 channelAssignment) { ma_uint8 lookup[] = {1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2}; MA_DR_FLAC_ASSERT(channelAssignment <= 10); return lookup[channelAssignment]; } static ma_result ma_dr_flac__decode_flac_frame(ma_dr_flac* pFlac) { int channelCount; int i; ma_uint8 paddingSizeInBits; ma_uint16 desiredCRC16; #ifndef MA_DR_FLAC_NO_CRC ma_uint16 actualCRC16; #endif MA_DR_FLAC_ZERO_MEMORY(pFlac->currentFLACFrame.subframes, sizeof(pFlac->currentFLACFrame.subframes)); if (pFlac->currentFLACFrame.header.blockSizeInPCMFrames > pFlac->maxBlockSizeInPCMFrames) { return MA_ERROR; } channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); if (channelCount != (int)pFlac->channels) { return MA_ERROR; } for (i = 0; i < channelCount; ++i) { if (!ma_dr_flac__decode_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i, pFlac->pDecodedSamples + (pFlac->currentFLACFrame.header.blockSizeInPCMFrames * i))) { return MA_ERROR; } } paddingSizeInBits = (ma_uint8)(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7); if (paddingSizeInBits > 0) { ma_uint8 padding = 0; if (!ma_dr_flac__read_uint8(&pFlac->bs, paddingSizeInBits, &padding)) { return MA_AT_END; } } #ifndef MA_DR_FLAC_NO_CRC actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs); #endif if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return MA_AT_END; } #ifndef MA_DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return MA_CRC_MISMATCH; } #endif pFlac->currentFLACFrame.pcmFramesRemaining = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; return MA_SUCCESS; } static ma_result ma_dr_flac__seek_flac_frame(ma_dr_flac* pFlac) { int channelCount; int i; ma_uint16 desiredCRC16; #ifndef MA_DR_FLAC_NO_CRC ma_uint16 actualCRC16; #endif channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); for (i = 0; i < channelCount; ++i) { if (!ma_dr_flac__seek_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i)) { return MA_ERROR; } } if (!ma_dr_flac__seek_bits(&pFlac->bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7)) { return MA_ERROR; } #ifndef MA_DR_FLAC_NO_CRC actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs); #endif if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return MA_AT_END; } #ifndef MA_DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return MA_CRC_MISMATCH; } #endif return MA_SUCCESS; } static ma_bool32 ma_dr_flac__read_and_decode_next_flac_frame(ma_dr_flac* pFlac) { MA_DR_FLAC_ASSERT(pFlac != NULL); for (;;) { ma_result result; if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } result = ma_dr_flac__decode_flac_frame(pFlac); if (result != MA_SUCCESS) { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } return MA_TRUE; } } static void ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(ma_dr_flac* pFlac, ma_uint64* pFirstPCMFrame, ma_uint64* pLastPCMFrame) { ma_uint64 firstPCMFrame; ma_uint64 lastPCMFrame; MA_DR_FLAC_ASSERT(pFlac != NULL); firstPCMFrame = pFlac->currentFLACFrame.header.pcmFrameNumber; if (firstPCMFrame == 0) { firstPCMFrame = ((ma_uint64)pFlac->currentFLACFrame.header.flacFrameNumber) * pFlac->maxBlockSizeInPCMFrames; } lastPCMFrame = firstPCMFrame + pFlac->currentFLACFrame.header.blockSizeInPCMFrames; if (lastPCMFrame > 0) { lastPCMFrame -= 1; } if (pFirstPCMFrame) { *pFirstPCMFrame = firstPCMFrame; } if (pLastPCMFrame) { *pLastPCMFrame = lastPCMFrame; } } static ma_bool32 ma_dr_flac__seek_to_first_frame(ma_dr_flac* pFlac) { ma_bool32 result; MA_DR_FLAC_ASSERT(pFlac != NULL); result = ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes); MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); pFlac->currentPCMFrame = 0; return result; } static MA_INLINE ma_result ma_dr_flac__seek_to_next_flac_frame(ma_dr_flac* pFlac) { MA_DR_FLAC_ASSERT(pFlac != NULL); return ma_dr_flac__seek_flac_frame(pFlac); } static ma_uint64 ma_dr_flac__seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 pcmFramesToSeek) { ma_uint64 pcmFramesRead = 0; while (pcmFramesToSeek > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { if (pFlac->currentFLACFrame.pcmFramesRemaining > pcmFramesToSeek) { pcmFramesRead += pcmFramesToSeek; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)pcmFramesToSeek; pcmFramesToSeek = 0; } else { pcmFramesRead += pFlac->currentFLACFrame.pcmFramesRemaining; pcmFramesToSeek -= pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; } } } pFlac->currentPCMFrame += pcmFramesRead; return pcmFramesRead; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__brute_force(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_bool32 isMidFrame = MA_FALSE; ma_uint64 runningPCMFrameCount; MA_DR_FLAC_ASSERT(pFlac != NULL); if (pcmFrameIndex >= pFlac->currentPCMFrame) { runningPCMFrameCount = pFlac->currentPCMFrame; if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } else { isMidFrame = MA_TRUE; } } else { runningPCMFrameCount = 0; if (!ma_dr_flac__seek_to_first_frame(pFlac)) { return MA_FALSE; } if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } for (;;) { ma_uint64 pcmFrameCountInThisFLACFrame; ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { if (!isMidFrame) { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = MA_FALSE; } if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return MA_TRUE; } } next_iteration: if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } } #if !defined(MA_DR_FLAC_NO_CRC) #define MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO 0.6f static ma_bool32 ma_dr_flac__seek_to_approximate_flac_frame_to_byte(ma_dr_flac* pFlac, ma_uint64 targetByte, ma_uint64 rangeLo, ma_uint64 rangeHi, ma_uint64* pLastSuccessfulSeekOffset) { MA_DR_FLAC_ASSERT(pFlac != NULL); MA_DR_FLAC_ASSERT(pLastSuccessfulSeekOffset != NULL); MA_DR_FLAC_ASSERT(targetByte >= rangeLo); MA_DR_FLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes; for (;;) { ma_uint64 lastTargetByte = targetByte; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, targetByte)) { if (targetByte == 0) { ma_dr_flac__seek_to_first_frame(pFlac); return MA_FALSE; } targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); #if 1 if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #else if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #endif } if(targetByte == lastTargetByte) { return MA_FALSE; } } ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); MA_DR_FLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = targetByte; return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 offset) { #if 0 if (ma_dr_flac__decode_flac_frame(pFlac) != MA_SUCCESS) { if (ma_dr_flac__read_and_decode_next_flac_frame(pFlac) == MA_FALSE) { return MA_FALSE; } } #endif return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, offset) == offset; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search_internal(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex, ma_uint64 byteRangeLo, ma_uint64 byteRangeHi) { ma_uint64 targetByte; ma_uint64 pcmRangeLo = pFlac->totalPCMFrameCount; ma_uint64 pcmRangeHi = 0; ma_uint64 lastSuccessfulSeekOffset = (ma_uint64)-1; ma_uint64 closestSeekOffsetBeforeTargetPCMFrame = byteRangeLo; ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; targetByte = byteRangeLo + (ma_uint64)(((ma_int64)((pcmFrameIndex - pFlac->currentPCMFrame) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } for (;;) { if (ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, targetByte, byteRangeLo, byteRangeHi, &lastSuccessfulSeekOffset)) { ma_uint64 newPCMRangeLo; ma_uint64 newPCMRangeHi; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &newPCMRangeLo, &newPCMRangeHi); if (pcmRangeLo == newPCMRangeLo) { if (!ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, closestSeekOffsetBeforeTargetPCMFrame, closestSeekOffsetBeforeTargetPCMFrame, byteRangeHi, &lastSuccessfulSeekOffset)) { break; } if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return MA_TRUE; } else { break; } } pcmRangeLo = newPCMRangeLo; pcmRangeHi = newPCMRangeHi; if (pcmRangeLo <= pcmFrameIndex && pcmRangeHi >= pcmFrameIndex) { if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame) ) { return MA_TRUE; } else { break; } } else { const float approxCompressionRatio = (ma_int64)(lastSuccessfulSeekOffset - pFlac->firstFLACFramePosInBytes) / ((ma_int64)(pcmRangeLo * pFlac->channels * pFlac->bitsPerSample)/8.0f); if (pcmRangeLo > pcmFrameIndex) { byteRangeHi = lastSuccessfulSeekOffset; if (byteRangeLo > byteRangeHi) { byteRangeLo = byteRangeHi; } targetByte = byteRangeLo + ((byteRangeHi - byteRangeLo) / 2); if (targetByte < byteRangeLo) { targetByte = byteRangeLo; } } else { if ((pcmFrameIndex - pcmRangeLo) < seekForwardThreshold) { if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return MA_TRUE; } else { break; } } else { byteRangeLo = lastSuccessfulSeekOffset; if (byteRangeHi < byteRangeLo) { byteRangeHi = byteRangeLo; } targetByte = lastSuccessfulSeekOffset + (ma_uint64)(((ma_int64)((pcmFrameIndex-pcmRangeLo) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * approxCompressionRatio); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } if (closestSeekOffsetBeforeTargetPCMFrame < lastSuccessfulSeekOffset) { closestSeekOffsetBeforeTargetPCMFrame = lastSuccessfulSeekOffset; } } } } } else { break; } } ma_dr_flac__seek_to_first_frame(pFlac); return MA_FALSE; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_uint64 byteRangeLo; ma_uint64 byteRangeHi; ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; if (ma_dr_flac__seek_to_first_frame(pFlac) == MA_FALSE) { return MA_FALSE; } if (pcmFrameIndex < seekForwardThreshold) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFrameIndex) == pcmFrameIndex; } byteRangeLo = pFlac->firstFLACFramePosInBytes; byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); return ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi); } #endif static ma_bool32 ma_dr_flac__seek_to_pcm_frame__seek_table(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_uint32 iClosestSeekpoint = 0; ma_bool32 isMidFrame = MA_FALSE; ma_uint64 runningPCMFrameCount; ma_uint32 iSeekpoint; MA_DR_FLAC_ASSERT(pFlac != NULL); if (pFlac->pSeekpoints == NULL || pFlac->seekpointCount == 0) { return MA_FALSE; } if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) { return MA_FALSE; } for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) { if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) { break; } iClosestSeekpoint = iSeekpoint; } if (pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount == 0 || pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount > pFlac->maxBlockSizeInPCMFrames) { return MA_FALSE; } if (pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame > pFlac->totalPCMFrameCount && pFlac->totalPCMFrameCount > 0) { return MA_FALSE; } #if !defined(MA_DR_FLAC_NO_CRC) if (pFlac->totalPCMFrameCount > 0) { ma_uint64 byteRangeLo; ma_uint64 byteRangeHi; byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); byteRangeLo = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset; if (iClosestSeekpoint < pFlac->seekpointCount-1) { ma_uint32 iNextSeekpoint = iClosestSeekpoint + 1; if (pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset >= pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset || pFlac->pSeekpoints[iNextSeekpoint].pcmFrameCount == 0) { return MA_FALSE; } if (pFlac->pSeekpoints[iNextSeekpoint].firstPCMFrame != (((ma_uint64)0xFFFFFFFF << 32) | 0xFFFFFFFF)) { byteRangeHi = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset - 1; } } if (ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { if (ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); if (ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi)) { return MA_TRUE; } } } } #endif if (pcmFrameIndex >= pFlac->currentPCMFrame && pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame <= pFlac->currentPCMFrame) { runningPCMFrameCount = pFlac->currentPCMFrame; if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } else { isMidFrame = MA_TRUE; } } else { runningPCMFrameCount = pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { return MA_FALSE; } if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } for (;;) { ma_uint64 pcmFrameCountInThisFLACFrame; ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { if (!isMidFrame) { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = MA_FALSE; } if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return MA_TRUE; } } next_iteration: if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } } #ifndef MA_DR_FLAC_NO_OGG typedef struct { ma_uint8 capturePattern[4]; ma_uint8 structureVersion; ma_uint8 headerType; ma_uint64 granulePosition; ma_uint32 serialNumber; ma_uint32 sequenceNumber; ma_uint32 checksum; ma_uint8 segmentCount; ma_uint8 segmentTable[255]; } ma_dr_flac_ogg_page_header; #endif typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; ma_dr_flac_meta_proc onMeta; ma_dr_flac_container container; void* pUserData; void* pUserDataMD; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint64 totalPCMFrameCount; ma_uint16 maxBlockSizeInPCMFrames; ma_uint64 runningFilePos; ma_bool32 hasStreamInfoBlock; ma_bool32 hasMetadataBlocks; ma_dr_flac_bs bs; ma_dr_flac_frame_header firstFrameHeader; #ifndef MA_DR_FLAC_NO_OGG ma_uint32 oggSerial; ma_uint64 oggFirstBytePos; ma_dr_flac_ogg_page_header oggBosHeader; #endif } ma_dr_flac_init_info; static MA_INLINE void ma_dr_flac__decode_block_header(ma_uint32 blockHeader, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize) { blockHeader = ma_dr_flac__be2host_32(blockHeader); *isLastBlock = (ma_uint8)((blockHeader & 0x80000000UL) >> 31); *blockType = (ma_uint8)((blockHeader & 0x7F000000UL) >> 24); *blockSize = (blockHeader & 0x00FFFFFFUL); } static MA_INLINE ma_bool32 ma_dr_flac__read_and_decode_block_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize) { ma_uint32 blockHeader; *blockSize = 0; if (onRead(pUserData, &blockHeader, 4) != 4) { return MA_FALSE; } ma_dr_flac__decode_block_header(blockHeader, isLastBlock, blockType, blockSize); return MA_TRUE; } static ma_bool32 ma_dr_flac__read_streaminfo(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_streaminfo* pStreamInfo) { ma_uint32 blockSizes; ma_uint64 frameSizes = 0; ma_uint64 importantProps; ma_uint8 md5[16]; if (onRead(pUserData, &blockSizes, 4) != 4) { return MA_FALSE; } if (onRead(pUserData, &frameSizes, 6) != 6) { return MA_FALSE; } if (onRead(pUserData, &importantProps, 8) != 8) { return MA_FALSE; } if (onRead(pUserData, md5, sizeof(md5)) != sizeof(md5)) { return MA_FALSE; } blockSizes = ma_dr_flac__be2host_32(blockSizes); frameSizes = ma_dr_flac__be2host_64(frameSizes); importantProps = ma_dr_flac__be2host_64(importantProps); pStreamInfo->minBlockSizeInPCMFrames = (ma_uint16)((blockSizes & 0xFFFF0000) >> 16); pStreamInfo->maxBlockSizeInPCMFrames = (ma_uint16) (blockSizes & 0x0000FFFF); pStreamInfo->minFrameSizeInPCMFrames = (ma_uint32)((frameSizes & (((ma_uint64)0x00FFFFFF << 16) << 24)) >> 40); pStreamInfo->maxFrameSizeInPCMFrames = (ma_uint32)((frameSizes & (((ma_uint64)0x00FFFFFF << 16) << 0)) >> 16); pStreamInfo->sampleRate = (ma_uint32)((importantProps & (((ma_uint64)0x000FFFFF << 16) << 28)) >> 44); pStreamInfo->channels = (ma_uint8 )((importantProps & (((ma_uint64)0x0000000E << 16) << 24)) >> 41) + 1; pStreamInfo->bitsPerSample = (ma_uint8 )((importantProps & (((ma_uint64)0x0000001F << 16) << 20)) >> 36) + 1; pStreamInfo->totalPCMFrameCount = ((importantProps & ((((ma_uint64)0x0000000F << 16) << 16) | 0xFFFFFFFF))); MA_DR_FLAC_COPY_MEMORY(pStreamInfo->md5, md5, sizeof(md5)); return MA_TRUE; } static void* ma_dr_flac__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_FLAC_MALLOC(sz); } static void* ma_dr_flac__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_FLAC_REALLOC(p, sz); } static void ma_dr_flac__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_FLAC_FREE(p); } static void* ma_dr_flac__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* ma_dr_flac__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_FLAC_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void ma_dr_flac__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static ma_bool32 ma_dr_flac__read_and_decode_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_uint64* pFirstFramePos, ma_uint64* pSeektablePos, ma_uint32* pSeekpointCount, ma_allocation_callbacks* pAllocationCallbacks) { ma_uint64 runningFilePos = 42; ma_uint64 seektablePos = 0; ma_uint32 seektableSize = 0; for (;;) { ma_dr_flac_metadata metadata; ma_uint8 isLastBlock = 0; ma_uint8 blockType = 0; ma_uint32 blockSize; if (ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize) == MA_FALSE) { return MA_FALSE; } runningFilePos += 4; metadata.type = blockType; metadata.pRawData = NULL; metadata.rawDataSize = 0; switch (blockType) { case MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION: { if (blockSize < 4) { return MA_FALSE; } if (onMeta) { void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.application.id = ma_dr_flac__be2host_32(*(ma_uint32*)pRawData); metadata.data.application.pData = (const void*)((ma_uint8*)pRawData + sizeof(ma_uint32)); metadata.data.application.dataSize = blockSize - sizeof(ma_uint32); onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE: { seektablePos = runningFilePos; seektableSize = blockSize; if (onMeta) { ma_uint32 seekpointCount; ma_uint32 iSeekpoint; void* pRawData; seekpointCount = blockSize/MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES; pRawData = ma_dr_flac__malloc_from_callbacks(seekpointCount * sizeof(ma_dr_flac_seekpoint), pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } for (iSeekpoint = 0; iSeekpoint < seekpointCount; ++iSeekpoint) { ma_dr_flac_seekpoint* pSeekpoint = (ma_dr_flac_seekpoint*)pRawData + iSeekpoint; if (onRead(pUserData, pSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) != MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pSeekpoint->firstPCMFrame = ma_dr_flac__be2host_64(pSeekpoint->firstPCMFrame); pSeekpoint->flacFrameOffset = ma_dr_flac__be2host_64(pSeekpoint->flacFrameOffset); pSeekpoint->pcmFrameCount = ma_dr_flac__be2host_16(pSeekpoint->pcmFrameCount); } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.seektable.seekpointCount = seekpointCount; metadata.data.seektable.pSeekpoints = (const ma_dr_flac_seekpoint*)pRawData; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT: { if (blockSize < 8) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; ma_uint32 i; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.vorbis_comment.vendorLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 4 < (ma_int64)metadata.data.vorbis_comment.vendorLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.vorbis_comment.vendor = pRunningData; pRunningData += metadata.data.vorbis_comment.vendorLength; metadata.data.vorbis_comment.commentCount = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) / sizeof(ma_uint32) < metadata.data.vorbis_comment.commentCount) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.vorbis_comment.pComments = pRunningData; for (i = 0; i < metadata.data.vorbis_comment.commentCount; ++i) { ma_uint32 commentLength; if (pRunningDataEnd - pRunningData < 4) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } commentLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if (pRunningDataEnd - pRunningData < (ma_int64)commentLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += commentLength; } onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET: { if (blockSize < 396) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; size_t bufferSize; ma_uint8 iTrack; ma_uint8 iIndex; void* pTrackData; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; MA_DR_FLAC_COPY_MEMORY(metadata.data.cuesheet.catalog, pRunningData, 128); pRunningData += 128; metadata.data.cuesheet.leadInSampleCount = ma_dr_flac__be2host_64(*(const ma_uint64*)pRunningData); pRunningData += 8; metadata.data.cuesheet.isCD = (pRunningData[0] & 0x80) != 0; pRunningData += 259; metadata.data.cuesheet.trackCount = pRunningData[0]; pRunningData += 1; metadata.data.cuesheet.pTrackData = NULL; { const char* pRunningDataSaved = pRunningData; bufferSize = metadata.data.cuesheet.trackCount * MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES; for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) { ma_uint8 indexCount; ma_uint32 indexPointSize; if (pRunningDataEnd - pRunningData < MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += 35; indexCount = pRunningData[0]; pRunningData += 1; bufferSize += indexCount * sizeof(ma_dr_flac_cuesheet_track_index); indexPointSize = indexCount * MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES; if (pRunningDataEnd - pRunningData < (ma_int64)indexPointSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += indexPointSize; } pRunningData = pRunningDataSaved; } { char* pRunningTrackData; pTrackData = ma_dr_flac__malloc_from_callbacks(bufferSize, pAllocationCallbacks); if (pTrackData == NULL) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningTrackData = (char*)pTrackData; for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) { ma_uint8 indexCount; MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES); pRunningData += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1; pRunningTrackData += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1; indexCount = pRunningData[0]; pRunningData += 1; pRunningTrackData += 1; for (iIndex = 0; iIndex < indexCount; ++iIndex) { ma_dr_flac_cuesheet_track_index* pTrackIndex = (ma_dr_flac_cuesheet_track_index*)pRunningTrackData; MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES); pRunningData += MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES; pRunningTrackData += sizeof(ma_dr_flac_cuesheet_track_index); pTrackIndex->offset = ma_dr_flac__be2host_64(pTrackIndex->offset); } } metadata.data.cuesheet.pTrackData = pTrackData; } ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); pRawData = NULL; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pTrackData, pAllocationCallbacks); pTrackData = NULL; } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE: { if (blockSize < 32) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.picture.type = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.mimeLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 24 < (ma_int64)metadata.data.picture.mimeLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.picture.mime = pRunningData; pRunningData += metadata.data.picture.mimeLength; metadata.data.picture.descriptionLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 20 < (ma_int64)metadata.data.picture.descriptionLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.picture.description = pRunningData; pRunningData += metadata.data.picture.descriptionLength; metadata.data.picture.width = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.height = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.colorDepth = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.indexColorCount = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pictureDataSize = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pPictureData = (const ma_uint8*)pRunningData; if (pRunningDataEnd - pRunningData < (ma_int64)metadata.data.picture.pictureDataSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING: { if (onMeta) { metadata.data.padding.unused = 0; if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } else { onMeta(pUserDataMD, &metadata); } } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID: { if (onMeta) { if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } } } break; default: { if (onMeta) { void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; } if (onMeta == NULL && blockSize > 0) { if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } } runningFilePos += blockSize; if (isLastBlock) { break; } } *pSeektablePos = seektablePos; *pSeekpointCount = seektableSize / MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES; *pFirstFramePos = runningFilePos; return MA_TRUE; } static ma_bool32 ma_dr_flac__init_private__native(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed) { ma_uint8 isLastBlock; ma_uint8 blockType; ma_uint32 blockSize; (void)onSeek; pInit->container = ma_dr_flac_container_native; if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return MA_FALSE; } if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { if (!relaxed) { return MA_FALSE; } else { pInit->hasStreamInfoBlock = MA_FALSE; pInit->hasMetadataBlocks = MA_FALSE; if (!ma_dr_flac__read_next_flac_frame_header(&pInit->bs, 0, &pInit->firstFrameHeader)) { return MA_FALSE; } if (pInit->firstFrameHeader.bitsPerSample == 0) { return MA_FALSE; } pInit->sampleRate = pInit->firstFrameHeader.sampleRate; pInit->channels = ma_dr_flac__get_channel_count_from_channel_assignment(pInit->firstFrameHeader.channelAssignment); pInit->bitsPerSample = pInit->firstFrameHeader.bitsPerSample; pInit->maxBlockSizeInPCMFrames = 65535; return MA_TRUE; } } else { ma_dr_flac_streaminfo streaminfo; if (!ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) { return MA_FALSE; } pInit->hasStreamInfoBlock = MA_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { ma_dr_flac_metadata metadata; metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } return MA_TRUE; } } #ifndef MA_DR_FLAC_NO_OGG #define MA_DR_FLAC_OGG_MAX_PAGE_SIZE 65307 #define MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32 1605413199 typedef enum { ma_dr_flac_ogg_recover_on_crc_mismatch, ma_dr_flac_ogg_fail_on_crc_mismatch } ma_dr_flac_ogg_crc_mismatch_recovery; #ifndef MA_DR_FLAC_NO_CRC static ma_uint32 ma_dr_flac__crc32_table[] = { 0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L, 0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L, 0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L, 0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL, 0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L, 0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L, 0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L, 0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL, 0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L, 0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L, 0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L, 0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL, 0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L, 0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L, 0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L, 0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL, 0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL, 0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L, 0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L, 0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL, 0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL, 0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L, 0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L, 0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL, 0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL, 0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L, 0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L, 0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL, 0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL, 0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L, 0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L, 0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL, 0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L, 0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL, 0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL, 0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L, 0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L, 0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL, 0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL, 0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L, 0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L, 0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL, 0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL, 0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L, 0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L, 0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL, 0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL, 0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L, 0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L, 0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL, 0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L, 0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L, 0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L, 0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL, 0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L, 0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L, 0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L, 0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL, 0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L, 0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L, 0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L, 0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL, 0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L, 0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L }; #endif static MA_INLINE ma_uint32 ma_dr_flac_crc32_byte(ma_uint32 crc32, ma_uint8 data) { #ifndef MA_DR_FLAC_NO_CRC return (crc32 << 8) ^ ma_dr_flac__crc32_table[(ma_uint8)((crc32 >> 24) & 0xFF) ^ data]; #else (void)data; return crc32; #endif } #if 0 static MA_INLINE ma_uint32 ma_dr_flac_crc32_uint32(ma_uint32 crc32, ma_uint32 data) { crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 24) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 16) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 8) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 0) & 0xFF)); return crc32; } static MA_INLINE ma_uint32 ma_dr_flac_crc32_uint64(ma_uint32 crc32, ma_uint64 data) { crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >> 32) & 0xFFFFFFFF)); crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >> 0) & 0xFFFFFFFF)); return crc32; } #endif static MA_INLINE ma_uint32 ma_dr_flac_crc32_buffer(ma_uint32 crc32, ma_uint8* pData, ma_uint32 dataSize) { ma_uint32 i; for (i = 0; i < dataSize; ++i) { crc32 = ma_dr_flac_crc32_byte(crc32, pData[i]); } return crc32; } static MA_INLINE ma_bool32 ma_dr_flac_ogg__is_capture_pattern(ma_uint8 pattern[4]) { return pattern[0] == 'O' && pattern[1] == 'g' && pattern[2] == 'g' && pattern[3] == 'S'; } static MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_header_size(ma_dr_flac_ogg_page_header* pHeader) { return 27 + pHeader->segmentCount; } static MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_body_size(ma_dr_flac_ogg_page_header* pHeader) { ma_uint32 pageBodySize = 0; int i; for (i = 0; i < pHeader->segmentCount; ++i) { pageBodySize += pHeader->segmentTable[i]; } return pageBodySize; } static ma_result ma_dr_flac_ogg__read_page_header_after_capture_pattern(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32) { ma_uint8 data[23]; ma_uint32 i; MA_DR_FLAC_ASSERT(*pCRC32 == MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32); if (onRead(pUserData, data, 23) != 23) { return MA_AT_END; } *pBytesRead += 23; pHeader->capturePattern[0] = 'O'; pHeader->capturePattern[1] = 'g'; pHeader->capturePattern[2] = 'g'; pHeader->capturePattern[3] = 'S'; pHeader->structureVersion = data[0]; pHeader->headerType = data[1]; MA_DR_FLAC_COPY_MEMORY(&pHeader->granulePosition, &data[ 2], 8); MA_DR_FLAC_COPY_MEMORY(&pHeader->serialNumber, &data[10], 4); MA_DR_FLAC_COPY_MEMORY(&pHeader->sequenceNumber, &data[14], 4); MA_DR_FLAC_COPY_MEMORY(&pHeader->checksum, &data[18], 4); pHeader->segmentCount = data[22]; data[18] = 0; data[19] = 0; data[20] = 0; data[21] = 0; for (i = 0; i < 23; ++i) { *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, data[i]); } if (onRead(pUserData, pHeader->segmentTable, pHeader->segmentCount) != pHeader->segmentCount) { return MA_AT_END; } *pBytesRead += pHeader->segmentCount; for (i = 0; i < pHeader->segmentCount; ++i) { *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, pHeader->segmentTable[i]); } return MA_SUCCESS; } static ma_result ma_dr_flac_ogg__read_page_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32) { ma_uint8 id[4]; *pBytesRead = 0; if (onRead(pUserData, id, 4) != 4) { return MA_AT_END; } *pBytesRead += 4; for (;;) { if (ma_dr_flac_ogg__is_capture_pattern(id)) { ma_result result; *pCRC32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32; result = ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, pHeader, pBytesRead, pCRC32); if (result == MA_SUCCESS) { return MA_SUCCESS; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return result; } } } else { id[0] = id[1]; id[1] = id[2]; id[2] = id[3]; if (onRead(pUserData, &id[3], 1) != 1) { return MA_AT_END; } *pBytesRead += 1; } } } typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; void* pUserData; ma_uint64 currentBytePos; ma_uint64 firstBytePos; ma_uint32 serialNumber; ma_dr_flac_ogg_page_header bosPageHeader; ma_dr_flac_ogg_page_header currentPageHeader; ma_uint32 bytesRemainingInPage; ma_uint32 pageDataSize; ma_uint8 pageData[MA_DR_FLAC_OGG_MAX_PAGE_SIZE]; } ma_dr_flac_oggbs; static size_t ma_dr_flac_oggbs__read_physical(ma_dr_flac_oggbs* oggbs, void* bufferOut, size_t bytesToRead) { size_t bytesActuallyRead = oggbs->onRead(oggbs->pUserData, bufferOut, bytesToRead); oggbs->currentBytePos += bytesActuallyRead; return bytesActuallyRead; } static ma_bool32 ma_dr_flac_oggbs__seek_physical(ma_dr_flac_oggbs* oggbs, ma_uint64 offset, ma_dr_flac_seek_origin origin) { if (origin == ma_dr_flac_seek_origin_start) { if (offset <= 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } oggbs->currentBytePos = offset; return MA_TRUE; } else { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } oggbs->currentBytePos = offset; return ma_dr_flac_oggbs__seek_physical(oggbs, offset - 0x7FFFFFFF, ma_dr_flac_seek_origin_current); } } else { while (offset > 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } oggbs->currentBytePos += 0x7FFFFFFF; offset -= 0x7FFFFFFF; } if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } oggbs->currentBytePos += offset; return MA_TRUE; } } static ma_bool32 ma_dr_flac_oggbs__goto_next_page(ma_dr_flac_oggbs* oggbs, ma_dr_flac_ogg_crc_mismatch_recovery recoveryMethod) { ma_dr_flac_ogg_page_header header; for (;;) { ma_uint32 crc32 = 0; ma_uint32 bytesRead; ma_uint32 pageBodySize; #ifndef MA_DR_FLAC_NO_CRC ma_uint32 actualCRC32; #endif if (ma_dr_flac_ogg__read_page_header(oggbs->onRead, oggbs->pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } oggbs->currentBytePos += bytesRead; pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header); if (pageBodySize > MA_DR_FLAC_OGG_MAX_PAGE_SIZE) { continue; } if (header.serialNumber != oggbs->serialNumber) { if (pageBodySize > 0 && !ma_dr_flac_oggbs__seek_physical(oggbs, pageBodySize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } continue; } if (ma_dr_flac_oggbs__read_physical(oggbs, oggbs->pageData, pageBodySize) != pageBodySize) { return MA_FALSE; } oggbs->pageDataSize = pageBodySize; #ifndef MA_DR_FLAC_NO_CRC actualCRC32 = ma_dr_flac_crc32_buffer(crc32, oggbs->pageData, oggbs->pageDataSize); if (actualCRC32 != header.checksum) { if (recoveryMethod == ma_dr_flac_ogg_recover_on_crc_mismatch) { continue; } else { ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch); return MA_FALSE; } } #else (void)recoveryMethod; #endif oggbs->currentPageHeader = header; oggbs->bytesRemainingInPage = pageBodySize; return MA_TRUE; } } #if 0 static ma_uint8 ma_dr_flac_oggbs__get_current_segment_index(ma_dr_flac_oggbs* oggbs, ma_uint8* pBytesRemainingInSeg) { ma_uint32 bytesConsumedInPage = ma_dr_flac_ogg__get_page_body_size(&oggbs->currentPageHeader) - oggbs->bytesRemainingInPage; ma_uint8 iSeg = 0; ma_uint32 iByte = 0; while (iByte < bytesConsumedInPage) { ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (iByte + segmentSize > bytesConsumedInPage) { break; } else { iSeg += 1; iByte += segmentSize; } } *pBytesRemainingInSeg = oggbs->currentPageHeader.segmentTable[iSeg] - (ma_uint8)(bytesConsumedInPage - iByte); return iSeg; } static ma_bool32 ma_dr_flac_oggbs__seek_to_next_packet(ma_dr_flac_oggbs* oggbs) { for (;;) { ma_bool32 atEndOfPage = MA_FALSE; ma_uint8 bytesRemainingInSeg; ma_uint8 iFirstSeg = ma_dr_flac_oggbs__get_current_segment_index(oggbs, &bytesRemainingInSeg); ma_uint32 bytesToEndOfPacketOrPage = bytesRemainingInSeg; for (ma_uint8 iSeg = iFirstSeg; iSeg < oggbs->currentPageHeader.segmentCount; ++iSeg) { ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (segmentSize < 255) { if (iSeg == oggbs->currentPageHeader.segmentCount-1) { atEndOfPage = MA_TRUE; } break; } bytesToEndOfPacketOrPage += segmentSize; } ma_dr_flac_oggbs__seek_physical(oggbs, bytesToEndOfPacketOrPage, ma_dr_flac_seek_origin_current); oggbs->bytesRemainingInPage -= bytesToEndOfPacketOrPage; if (atEndOfPage) { if (!ma_dr_flac_oggbs__goto_next_page(oggbs)) { return MA_FALSE; } if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { return MA_TRUE; } } else { return MA_TRUE; } } } static ma_bool32 ma_dr_flac_oggbs__seek_to_next_frame(ma_dr_flac_oggbs* oggbs) { return ma_dr_flac_oggbs__seek_to_next_packet(oggbs); } #endif static size_t ma_dr_flac__on_read_ogg(void* pUserData, void* bufferOut, size_t bytesToRead) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData; ma_uint8* pRunningBufferOut = (ma_uint8*)bufferOut; size_t bytesRead = 0; MA_DR_FLAC_ASSERT(oggbs != NULL); MA_DR_FLAC_ASSERT(pRunningBufferOut != NULL); while (bytesRead < bytesToRead) { size_t bytesRemainingToRead = bytesToRead - bytesRead; if (oggbs->bytesRemainingInPage >= bytesRemainingToRead) { MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), bytesRemainingToRead); bytesRead += bytesRemainingToRead; oggbs->bytesRemainingInPage -= (ma_uint32)bytesRemainingToRead; break; } if (oggbs->bytesRemainingInPage > 0) { MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), oggbs->bytesRemainingInPage); bytesRead += oggbs->bytesRemainingInPage; pRunningBufferOut += oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } MA_DR_FLAC_ASSERT(bytesRemainingToRead > 0); if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { break; } } return bytesRead; } static ma_bool32 ma_dr_flac__on_seek_ogg(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData; int bytesSeeked = 0; MA_DR_FLAC_ASSERT(oggbs != NULL); MA_DR_FLAC_ASSERT(offset >= 0); if (origin == ma_dr_flac_seek_origin_start) { if (!ma_dr_flac_oggbs__seek_physical(oggbs, (int)oggbs->firstBytePos, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) { return MA_FALSE; } return ma_dr_flac__on_seek_ogg(pUserData, offset, ma_dr_flac_seek_origin_current); } MA_DR_FLAC_ASSERT(origin == ma_dr_flac_seek_origin_current); while (bytesSeeked < offset) { int bytesRemainingToSeek = offset - bytesSeeked; MA_DR_FLAC_ASSERT(bytesRemainingToSeek >= 0); if (oggbs->bytesRemainingInPage >= (size_t)bytesRemainingToSeek) { bytesSeeked += bytesRemainingToSeek; (void)bytesSeeked; oggbs->bytesRemainingInPage -= bytesRemainingToSeek; break; } if (oggbs->bytesRemainingInPage > 0) { bytesSeeked += (int)oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } MA_DR_FLAC_ASSERT(bytesRemainingToSeek > 0); if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) { return MA_FALSE; } } return MA_TRUE; } static ma_bool32 ma_dr_flac_ogg__seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; ma_uint64 originalBytePos; ma_uint64 runningGranulePosition; ma_uint64 runningFrameBytePos; ma_uint64 runningPCMFrameCount; MA_DR_FLAC_ASSERT(oggbs != NULL); originalBytePos = oggbs->currentBytePos; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes)) { return MA_FALSE; } oggbs->bytesRemainingInPage = 0; runningGranulePosition = 0; for (;;) { if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { ma_dr_flac_oggbs__seek_physical(oggbs, originalBytePos, ma_dr_flac_seek_origin_start); return MA_FALSE; } runningFrameBytePos = oggbs->currentBytePos - ma_dr_flac_ogg__get_page_header_size(&oggbs->currentPageHeader) - oggbs->pageDataSize; if (oggbs->currentPageHeader.granulePosition >= pcmFrameIndex) { break; } if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { if (oggbs->currentPageHeader.segmentTable[0] >= 2) { ma_uint8 firstBytesInPage[2]; firstBytesInPage[0] = oggbs->pageData[0]; firstBytesInPage[1] = oggbs->pageData[1]; if ((firstBytesInPage[0] == 0xFF) && (firstBytesInPage[1] & 0xFC) == 0xF8) { runningGranulePosition = oggbs->currentPageHeader.granulePosition; } continue; } } } if (!ma_dr_flac_oggbs__seek_physical(oggbs, runningFrameBytePos, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { return MA_FALSE; } runningPCMFrameCount = runningGranulePosition; for (;;) { ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_uint64 pcmFrameCountInThisFrame; if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex == pFlac->totalPCMFrameCount && (runningPCMFrameCount + pcmFrameCountInThisFrame) == pFlac->totalPCMFrameCount) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { pFlac->currentPCMFrame = pcmFrameIndex; pFlac->currentFLACFrame.pcmFramesRemaining = 0; return MA_TRUE; } else { return MA_FALSE; } } if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFrame)) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { ma_uint64 pcmFramesToDecode = (size_t)(pcmFrameIndex - runningPCMFrameCount); if (pcmFramesToDecode == 0) { return MA_TRUE; } pFlac->currentPCMFrame = runningPCMFrameCount; return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } } else { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFrame; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } } } } static ma_bool32 ma_dr_flac__init_private__ogg(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed) { ma_dr_flac_ogg_page_header header; ma_uint32 crc32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32; ma_uint32 bytesRead = 0; (void)relaxed; pInit->container = ma_dr_flac_container_ogg; pInit->oggFirstBytePos = 0; if (ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } pInit->runningFilePos += bytesRead; for (;;) { int pageBodySize; if ((header.headerType & 0x02) == 0) { return MA_FALSE; } pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header); if (pageBodySize == 51) { ma_uint32 bytesRemainingInPage = pageBodySize; ma_uint8 packetType; if (onRead(pUserData, &packetType, 1) != 1) { return MA_FALSE; } bytesRemainingInPage -= 1; if (packetType == 0x7F) { ma_uint8 sig[4]; if (onRead(pUserData, sig, 4) != 4) { return MA_FALSE; } bytesRemainingInPage -= 4; if (sig[0] == 'F' && sig[1] == 'L' && sig[2] == 'A' && sig[3] == 'C') { ma_uint8 mappingVersion[2]; if (onRead(pUserData, mappingVersion, 2) != 2) { return MA_FALSE; } if (mappingVersion[0] != 1) { return MA_FALSE; } if (!onSeek(pUserData, 2, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } if (onRead(pUserData, sig, 4) != 4) { return MA_FALSE; } if (sig[0] == 'f' && sig[1] == 'L' && sig[2] == 'a' && sig[3] == 'C') { ma_dr_flac_streaminfo streaminfo; ma_uint8 isLastBlock; ma_uint8 blockType; ma_uint32 blockSize; if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return MA_FALSE; } if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { return MA_FALSE; } if (ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) { pInit->hasStreamInfoBlock = MA_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { ma_dr_flac_metadata metadata; metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } pInit->runningFilePos += pageBodySize; pInit->oggFirstBytePos = pInit->runningFilePos - 79; pInit->oggSerial = header.serialNumber; pInit->oggBosHeader = header; break; } else { return MA_FALSE; } } else { return MA_FALSE; } } else { if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!onSeek(pUserData, pageBodySize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } pInit->runningFilePos += pageBodySize; if (ma_dr_flac_ogg__read_page_header(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } pInit->runningFilePos += bytesRead; } pInit->hasMetadataBlocks = MA_TRUE; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__init_private(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD) { ma_bool32 relaxed; ma_uint8 id[4]; if (pInit == NULL || onRead == NULL || onSeek == NULL) { return MA_FALSE; } MA_DR_FLAC_ZERO_MEMORY(pInit, sizeof(*pInit)); pInit->onRead = onRead; pInit->onSeek = onSeek; pInit->onMeta = onMeta; pInit->container = container; pInit->pUserData = pUserData; pInit->pUserDataMD = pUserDataMD; pInit->bs.onRead = onRead; pInit->bs.onSeek = onSeek; pInit->bs.pUserData = pUserData; ma_dr_flac__reset_cache(&pInit->bs); relaxed = container != ma_dr_flac_container_unknown; for (;;) { if (onRead(pUserData, id, 4) != 4) { return MA_FALSE; } pInit->runningFilePos += 4; if (id[0] == 'I' && id[1] == 'D' && id[2] == '3') { ma_uint8 header[6]; ma_uint8 flags; ma_uint32 headerSize; if (onRead(pUserData, header, 6) != 6) { return MA_FALSE; } pInit->runningFilePos += 6; flags = header[1]; MA_DR_FLAC_COPY_MEMORY(&headerSize, header+2, 4); headerSize = ma_dr_flac__unsynchsafe_32(ma_dr_flac__be2host_32(headerSize)); if (flags & 0x10) { headerSize += 10; } if (!onSeek(pUserData, headerSize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } pInit->runningFilePos += headerSize; } else { break; } } if (id[0] == 'f' && id[1] == 'L' && id[2] == 'a' && id[3] == 'C') { return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef MA_DR_FLAC_NO_OGG if (id[0] == 'O' && id[1] == 'g' && id[2] == 'g' && id[3] == 'S') { return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif if (relaxed) { if (container == ma_dr_flac_container_native) { return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef MA_DR_FLAC_NO_OGG if (container == ma_dr_flac_container_ogg) { return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif } return MA_FALSE; } static void ma_dr_flac__init_from_info(ma_dr_flac* pFlac, const ma_dr_flac_init_info* pInit) { MA_DR_FLAC_ASSERT(pFlac != NULL); MA_DR_FLAC_ASSERT(pInit != NULL); MA_DR_FLAC_ZERO_MEMORY(pFlac, sizeof(*pFlac)); pFlac->bs = pInit->bs; pFlac->onMeta = pInit->onMeta; pFlac->pUserDataMD = pInit->pUserDataMD; pFlac->maxBlockSizeInPCMFrames = pInit->maxBlockSizeInPCMFrames; pFlac->sampleRate = pInit->sampleRate; pFlac->channels = (ma_uint8)pInit->channels; pFlac->bitsPerSample = (ma_uint8)pInit->bitsPerSample; pFlac->totalPCMFrameCount = pInit->totalPCMFrameCount; pFlac->container = pInit->container; } static ma_dr_flac* ma_dr_flac_open_with_metadata_private(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac_init_info init; ma_uint32 allocationSize; ma_uint32 wholeSIMDVectorCountPerChannel; ma_uint32 decodedSamplesAllocationSize; #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac_oggbs* pOggbs = NULL; #endif ma_uint64 firstFramePos; ma_uint64 seektablePos; ma_uint32 seekpointCount; ma_allocation_callbacks allocationCallbacks; ma_dr_flac* pFlac; ma_dr_flac__init_cpu_caps(); if (!ma_dr_flac__init_private(&init, onRead, onSeek, onMeta, container, pUserData, pUserDataMD)) { return NULL; } if (pAllocationCallbacks != NULL) { allocationCallbacks = *pAllocationCallbacks; if (allocationCallbacks.onFree == NULL || (allocationCallbacks.onMalloc == NULL && allocationCallbacks.onRealloc == NULL)) { return NULL; } } else { allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_flac__malloc_default; allocationCallbacks.onRealloc = ma_dr_flac__realloc_default; allocationCallbacks.onFree = ma_dr_flac__free_default; } allocationSize = sizeof(ma_dr_flac); if ((init.maxBlockSizeInPCMFrames % (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) == 0) { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))); } else { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) + 1; } decodedSamplesAllocationSize = wholeSIMDVectorCountPerChannel * MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE * init.channels; allocationSize += decodedSamplesAllocationSize; allocationSize += MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { allocationSize += sizeof(ma_dr_flac_oggbs); pOggbs = (ma_dr_flac_oggbs*)ma_dr_flac__malloc_from_callbacks(sizeof(*pOggbs), &allocationCallbacks); if (pOggbs == NULL) { return NULL; } MA_DR_FLAC_ZERO_MEMORY(pOggbs, sizeof(*pOggbs)); pOggbs->onRead = onRead; pOggbs->onSeek = onSeek; pOggbs->pUserData = pUserData; pOggbs->currentBytePos = init.oggFirstBytePos; pOggbs->firstBytePos = init.oggFirstBytePos; pOggbs->serialNumber = init.oggSerial; pOggbs->bosPageHeader = init.oggBosHeader; pOggbs->bytesRemainingInPage = 0; } #endif firstFramePos = 42; seektablePos = 0; seekpointCount = 0; if (init.hasMetadataBlocks) { ma_dr_flac_read_proc onReadOverride = onRead; ma_dr_flac_seek_proc onSeekOverride = onSeek; void* pUserDataOverride = pUserData; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { onReadOverride = ma_dr_flac__on_read_ogg; onSeekOverride = ma_dr_flac__on_seek_ogg; pUserDataOverride = (void*)pOggbs; } #endif if (!ma_dr_flac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seekpointCount, &allocationCallbacks)) { #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); #endif return NULL; } allocationSize += seekpointCount * sizeof(ma_dr_flac_seekpoint); } pFlac = (ma_dr_flac*)ma_dr_flac__malloc_from_callbacks(allocationSize, &allocationCallbacks); if (pFlac == NULL) { #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); #endif return NULL; } ma_dr_flac__init_from_info(pFlac, &init); pFlac->allocationCallbacks = allocationCallbacks; pFlac->pDecodedSamples = (ma_int32*)ma_dr_flac_align((size_t)pFlac->pExtraData, MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE); #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* pInternalOggbs = (ma_dr_flac_oggbs*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + (seekpointCount * sizeof(ma_dr_flac_seekpoint))); MA_DR_FLAC_COPY_MEMORY(pInternalOggbs, pOggbs, sizeof(*pOggbs)); ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); pOggbs = NULL; pFlac->bs.onRead = ma_dr_flac__on_read_ogg; pFlac->bs.onSeek = ma_dr_flac__on_seek_ogg; pFlac->bs.pUserData = (void*)pInternalOggbs; pFlac->_oggbs = (void*)pInternalOggbs; } #endif pFlac->firstFLACFramePosInBytes = firstFramePos; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } else #endif { if (seektablePos != 0) { pFlac->seekpointCount = seekpointCount; pFlac->pSeekpoints = (ma_dr_flac_seekpoint*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize); MA_DR_FLAC_ASSERT(pFlac->bs.onSeek != NULL); MA_DR_FLAC_ASSERT(pFlac->bs.onRead != NULL); if (pFlac->bs.onSeek(pFlac->bs.pUserData, (int)seektablePos, ma_dr_flac_seek_origin_start)) { ma_uint32 iSeekpoint; for (iSeekpoint = 0; iSeekpoint < seekpointCount; iSeekpoint += 1) { if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints + iSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) == MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) { pFlac->pSeekpoints[iSeekpoint].firstPCMFrame = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].firstPCMFrame); pFlac->pSeekpoints[iSeekpoint].flacFrameOffset = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].flacFrameOffset); pFlac->pSeekpoints[iSeekpoint].pcmFrameCount = ma_dr_flac__be2host_16(pFlac->pSeekpoints[iSeekpoint].pcmFrameCount); } else { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; break; } } if (!pFlac->bs.onSeek(pFlac->bs.pUserData, (int)pFlac->firstFLACFramePosInBytes, ma_dr_flac_seek_origin_start)) { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } else { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } } } if (!init.hasStreamInfoBlock) { pFlac->currentFLACFrame.header = init.firstFrameHeader; for (;;) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { break; } else { if (result == MA_CRC_MISMATCH) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } continue; } else { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } } } return pFlac; } #ifndef MA_DR_FLAC_NO_STDIO #include #ifndef MA_DR_FLAC_NO_WCHAR #include #endif static size_t ma_dr_flac__on_read_stdio(void* pUserData, void* bufferOut, size_t bytesToRead) { return fread(bufferOut, 1, bytesToRead, (FILE*)pUserData); } static ma_bool32 ma_dr_flac__on_seek_stdio(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { MA_DR_FLAC_ASSERT(offset >= 0); return fseek((FILE*)pUserData, offset, (origin == ma_dr_flac_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_fopen(&pFile, pFileName, "rb") != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } #ifndef MA_DR_FLAC_NO_WCHAR MA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } #endif MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_fopen(&pFile, pFileName, "rb") != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } #ifndef MA_DR_FLAC_NO_WCHAR MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } #endif #endif static size_t ma_dr_flac__on_read_memory(void* pUserData, void* bufferOut, size_t bytesToRead) { ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData; size_t bytesRemaining; MA_DR_FLAC_ASSERT(memoryStream != NULL); MA_DR_FLAC_ASSERT(memoryStream->dataSize >= memoryStream->currentReadPos); bytesRemaining = memoryStream->dataSize - memoryStream->currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_FLAC_COPY_MEMORY(bufferOut, memoryStream->data + memoryStream->currentReadPos, bytesToRead); memoryStream->currentReadPos += bytesToRead; } return bytesToRead; } static ma_bool32 ma_dr_flac__on_seek_memory(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData; MA_DR_FLAC_ASSERT(memoryStream != NULL); MA_DR_FLAC_ASSERT(offset >= 0); if (offset > (ma_int64)memoryStream->dataSize) { return MA_FALSE; } if (origin == ma_dr_flac_seek_origin_current) { if (memoryStream->currentReadPos + offset <= memoryStream->dataSize) { memoryStream->currentReadPos += offset; } else { return MA_FALSE; } } else { if ((ma_uint32)offset <= memoryStream->dataSize) { memoryStream->currentReadPos = offset; } else { return MA_FALSE; } } return MA_TRUE; } MA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac__memory_stream memoryStream; ma_dr_flac* pFlac; memoryStream.data = (const ma_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = ma_dr_flac_open(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, &memoryStream, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } MA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac__memory_stream memoryStream; ma_dr_flac* pFlac; memoryStream.data = (const ma_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, onMeta, ma_dr_flac_container_unknown, &memoryStream, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } MA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, container, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, container, pUserData, pUserData, pAllocationCallbacks); } MA_API void ma_dr_flac_close(ma_dr_flac* pFlac) { if (pFlac == NULL) { return; } #ifndef MA_DR_FLAC_NO_STDIO if (pFlac->bs.onRead == ma_dr_flac__on_read_stdio) { fclose((FILE*)pFlac->bs.pUserData); } #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; MA_DR_FLAC_ASSERT(pFlac->bs.onRead == ma_dr_flac__on_read_ogg); if (oggbs->onRead == ma_dr_flac__on_read_stdio) { fclose((FILE*)oggbs->pUserData); } } #endif #endif ma_dr_flac__free_from_callbacks(pFlac, &pFlac->allocationCallbacks); } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (ma_int32)left0; pOutputSamples[i*8+1] = (ma_int32)right0; pOutputSamples[i*8+2] = (ma_int32)left1; pOutputSamples[i*8+3] = (ma_int32)right1; pOutputSamples[i*8+4] = (ma_int32)left2; pOutputSamples[i*8+5] = (ma_int32)right2; pOutputSamples[i*8+6] = (ma_int32)left3; pOutputSamples[i*8+7] = (ma_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (ma_int32)left0; pOutputSamples[i*8+1] = (ma_int32)right0; pOutputSamples[i*8+2] = (ma_int32)left1; pOutputSamples[i*8+3] = (ma_int32)right1; pOutputSamples[i*8+4] = (ma_int32)left2; pOutputSamples[i*8+5] = (ma_int32)right2; pOutputSamples[i*8+6] = (ma_int32)left3; pOutputSamples[i*8+7] = (ma_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (ma_int32)temp0L; pOutputSamples[i*8+1] = (ma_int32)temp0R; pOutputSamples[i*8+2] = (ma_int32)temp1L; pOutputSamples[i*8+3] = (ma_int32)temp1R; pOutputSamples[i*8+4] = (ma_int32)temp2L; pOutputSamples[i*8+5] = (ma_int32)temp2R; pOutputSamples[i*8+6] = (ma_int32)temp3L; pOutputSamples[i*8+7] = (ma_int32)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1); temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1); temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1); temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1); temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1); temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1); temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1); temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (ma_int32)temp0L; pOutputSamples[i*8+1] = (ma_int32)temp0R; pOutputSamples[i*8+2] = (ma_int32)temp1L; pOutputSamples[i*8+3] = (ma_int32)temp1R; pOutputSamples[i*8+4] = (ma_int32)temp2L; pOutputSamples[i*8+5] = (ma_int32)temp2R; pOutputSamples[i*8+6] = (ma_int32)temp3L; pOutputSamples[i*8+7] = (ma_int32)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift); } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; int32x4_t wbpsShift1_4; uint32x4_t one4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); one4 = vdupq_n_u32(1); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1; } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift); } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (ma_int32)tempL0; pOutputSamples[i*8+1] = (ma_int32)tempR0; pOutputSamples[i*8+2] = (ma_int32)tempL1; pOutputSamples[i*8+3] = (ma_int32)tempR1; pOutputSamples[i*8+4] = (ma_int32)tempL2; pOutputSamples[i*8+5] = (ma_int32)tempR2; pOutputSamples[i*8+6] = (ma_int32)tempL3; pOutputSamples[i*8+7] = (ma_int32)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift4_0 = vdupq_n_s32(shift0); int32x4_t shift4_1 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift4_0)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift4_1)); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { pBufferOut[(i*channelCount)+j] = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)left0; pOutputSamples[i*8+1] = (ma_int16)right0; pOutputSamples[i*8+2] = (ma_int16)left1; pOutputSamples[i*8+3] = (ma_int16)right1; pOutputSamples[i*8+4] = (ma_int16)left2; pOutputSamples[i*8+5] = (ma_int16)right2; pOutputSamples[i*8+6] = (ma_int16)left3; pOutputSamples[i*8+7] = (ma_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)left0; pOutputSamples[i*8+1] = (ma_int16)right0; pOutputSamples[i*8+2] = (ma_int16)left1; pOutputSamples[i*8+3] = (ma_int16)right1; pOutputSamples[i*8+4] = (ma_int16)left2; pOutputSamples[i*8+5] = (ma_int16)right2; pOutputSamples[i*8+6] = (ma_int16)left3; pOutputSamples[i*8+7] = (ma_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (ma_int16)temp0L; pOutputSamples[i*8+1] = (ma_int16)temp0R; pOutputSamples[i*8+2] = (ma_int16)temp1L; pOutputSamples[i*8+3] = (ma_int16)temp1R; pOutputSamples[i*8+4] = (ma_int16)temp2L; pOutputSamples[i*8+5] = (ma_int16)temp2R; pOutputSamples[i*8+6] = (ma_int16)temp3L; pOutputSamples[i*8+7] = (ma_int16)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = ((ma_int32)(mid0 + side0) >> 1); temp1L = ((ma_int32)(mid1 + side1) >> 1); temp2L = ((ma_int32)(mid2 + side2) >> 1); temp3L = ((ma_int32)(mid3 + side3) >> 1); temp0R = ((ma_int32)(mid0 - side0) >> 1); temp1R = ((ma_int32)(mid1 - side1) >> 1); temp2R = ((ma_int32)(mid2 - side2) >> 1); temp3R = ((ma_int32)(mid3 - side3) >> 1); temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (ma_int16)temp0L; pOutputSamples[i*8+1] = (ma_int16)temp0R; pOutputSamples[i*8+2] = (ma_int16)temp1L; pOutputSamples[i*8+3] = (ma_int16)temp1R; pOutputSamples[i*8+4] = (ma_int16)temp2L; pOutputSamples[i*8+5] = (ma_int16)temp2R; pOutputSamples[i*8+6] = (ma_int16)temp3L; pOutputSamples[i*8+7] = (ma_int16)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16); } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16); } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; int32x4_t wbpsShift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16); } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16); } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) >> 16); pOutputSamples[i*2+1] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; tempL0 >>= 16; tempL1 >>= 16; tempL2 >>= 16; tempL3 >>= 16; tempR0 >>= 16; tempR1 >>= 16; tempR2 >>= 16; tempR3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)tempL0; pOutputSamples[i*8+1] = (ma_int16)tempR0; pOutputSamples[i*8+2] = (ma_int16)tempL1; pOutputSamples[i*8+3] = (ma_int16)tempR1; pOutputSamples[i*8+4] = (ma_int16)tempL2; pOutputSamples[i*8+5] = (ma_int16)tempR2; pOutputSamples[i*8+6] = (ma_int16)tempL3; pOutputSamples[i*8+7] = (ma_int16)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (ma_int16)(sampleS32 >> 16); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; pOutputSamples[i*2+0] = (float)((ma_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (ma_int32)left0 * factor; pOutputSamples[i*8+1] = (ma_int32)right0 * factor; pOutputSamples[i*8+2] = (ma_int32)left1 * factor; pOutputSamples[i*8+3] = (ma_int32)right1 * factor; pOutputSamples[i*8+4] = (ma_int32)left2 * factor; pOutputSamples[i*8+5] = (ma_int32)right2 * factor; pOutputSamples[i*8+6] = (ma_int32)left3 * factor; pOutputSamples[i*8+7] = (ma_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left * factor; pOutputSamples[i*2+1] = (ma_int32)right * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; float32x4_t leftf; float32x4_t rightf; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; pOutputSamples[i*2+0] = (float)((ma_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (ma_int32)left0 * factor; pOutputSamples[i*8+1] = (ma_int32)right0 * factor; pOutputSamples[i*8+2] = (ma_int32)left1 * factor; pOutputSamples[i*8+3] = (ma_int32)right1 * factor; pOutputSamples[i*8+4] = (ma_int32)left2 * factor; pOutputSamples[i*8+5] = (ma_int32)right2 * factor; pOutputSamples[i*8+6] = (ma_int32)left3 * factor; pOutputSamples[i*8+7] = (ma_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left * factor; pOutputSamples[i*2+1] = (ma_int32)right * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; float32x4_t leftf; float32x4_t rightf; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (float)((((ma_int32)(mid + side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((((ma_int32)(mid - side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; float factor = 1 / 2147483648.0; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (ma_int32)temp0L * factor; pOutputSamples[i*8+1] = (ma_int32)temp0R * factor; pOutputSamples[i*8+2] = (ma_int32)temp1L * factor; pOutputSamples[i*8+3] = (ma_int32)temp1R * factor; pOutputSamples[i*8+4] = (ma_int32)temp2L * factor; pOutputSamples[i*8+5] = (ma_int32)temp2R * factor; pOutputSamples[i*8+6] = (ma_int32)temp3L * factor; pOutputSamples[i*8+7] = (ma_int32)temp3R * factor; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1); temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1); temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1); temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1); temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1); temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1); temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1); temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (ma_int32)temp0L * factor; pOutputSamples[i*8+1] = (ma_int32)temp0R * factor; pOutputSamples[i*8+2] = (ma_int32)temp1L * factor; pOutputSamples[i*8+3] = (ma_int32)temp1R * factor; pOutputSamples[i*8+4] = (ma_int32)temp2L * factor; pOutputSamples[i*8+5] = (ma_int32)temp2R * factor; pOutputSamples[i*8+6] = (ma_int32)temp3L * factor; pOutputSamples[i*8+7] = (ma_int32)temp3R * factor; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) * factor; pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample - 8; float factor; __m128 factor128; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor128 = _mm_set1_ps(factor); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); tempR = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); tempR = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor; } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample - 8; float factor; float32x4_t factor4; int32x4_t shift4; int32x4_t wbps0_4; int32x4_t wbps1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor4 = vdupq_n_f32(factor); wbps0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbps1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; uint32x4_t mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); uint32x4_t side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); righti = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); righti = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor; } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (float)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (ma_int32)tempL0 * factor; pOutputSamples[i*8+1] = (ma_int32)tempR0 * factor; pOutputSamples[i*8+2] = (ma_int32)tempL1 * factor; pOutputSamples[i*8+3] = (ma_int32)tempR1 * factor; pOutputSamples[i*8+4] = (ma_int32)tempL2 * factor; pOutputSamples[i*8+5] = (ma_int32)tempR2 * factor; pOutputSamples[i*8+6] = (ma_int32)tempL3 * factor; pOutputSamples[i*8+7] = (ma_int32)tempR3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; __m128 factor128 = _mm_set1_ps(factor); for (i = 0; i < frameCount4; ++i) { __m128i lefti; __m128i righti; __m128 leftf; __m128 rightf; lefti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); righti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(lefti), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(righti), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; float32x4_t factor4 = vdupq_n_f32(factor); int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; lefti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); righti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (float)(sampleS32 / 2147483648.0); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (unsigned int)frameCountThisIteration; } } return framesRead; } MA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { if (pFlac == NULL) { return MA_FALSE; } if (pFlac->currentPCMFrame == pcmFrameIndex) { return MA_TRUE; } if (pFlac->firstFLACFramePosInBytes == 0) { return MA_FALSE; } if (pcmFrameIndex == 0) { pFlac->currentPCMFrame = 0; return ma_dr_flac__seek_to_first_frame(pFlac); } else { ma_bool32 wasSuccessful = MA_FALSE; ma_uint64 originalPCMFrame = pFlac->currentPCMFrame; if (pcmFrameIndex > pFlac->totalPCMFrameCount) { pcmFrameIndex = pFlac->totalPCMFrameCount; } if (pcmFrameIndex > pFlac->currentPCMFrame) { ma_uint32 offset = (ma_uint32)(pcmFrameIndex - pFlac->currentPCMFrame); if (pFlac->currentFLACFrame.pcmFramesRemaining > offset) { pFlac->currentFLACFrame.pcmFramesRemaining -= offset; pFlac->currentPCMFrame = pcmFrameIndex; return MA_TRUE; } } else { ma_uint32 offsetAbs = (ma_uint32)(pFlac->currentPCMFrame - pcmFrameIndex); ma_uint32 currentFLACFramePCMFrameCount = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; ma_uint32 currentFLACFramePCMFramesConsumed = currentFLACFramePCMFrameCount - pFlac->currentFLACFrame.pcmFramesRemaining; if (currentFLACFramePCMFramesConsumed > offsetAbs) { pFlac->currentFLACFrame.pcmFramesRemaining += offsetAbs; pFlac->currentPCMFrame = pcmFrameIndex; return MA_TRUE; } } #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { wasSuccessful = ma_dr_flac_ogg__seek_to_pcm_frame(pFlac, pcmFrameIndex); } else #endif { if (!pFlac->_noSeekTableSeek) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__seek_table(pFlac, pcmFrameIndex); } #if !defined(MA_DR_FLAC_NO_CRC) if (!wasSuccessful && !pFlac->_noBinarySearchSeek && pFlac->totalPCMFrameCount > 0) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__binary_search(pFlac, pcmFrameIndex); } #endif if (!wasSuccessful && !pFlac->_noBruteForceSeek) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__brute_force(pFlac, pcmFrameIndex); } } if (wasSuccessful) { pFlac->currentPCMFrame = pcmFrameIndex; } else { if (ma_dr_flac_seek_to_pcm_frame(pFlac, originalPCMFrame) == MA_FALSE) { ma_dr_flac_seek_to_pcm_frame(pFlac, 0); } } return wasSuccessful; } } #define MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(extension, type) \ static type* ma_dr_flac__full_read_and_close_ ## extension (ma_dr_flac* pFlac, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut)\ { \ type* pSampleData = NULL; \ ma_uint64 totalPCMFrameCount; \ \ MA_DR_FLAC_ASSERT(pFlac != NULL); \ \ totalPCMFrameCount = pFlac->totalPCMFrameCount; \ \ if (totalPCMFrameCount == 0) { \ type buffer[4096]; \ ma_uint64 pcmFramesRead; \ size_t sampleDataBufferSize = sizeof(buffer); \ \ pSampleData = (type*)ma_dr_flac__malloc_from_callbacks(sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ while ((pcmFramesRead = (ma_uint64)ma_dr_flac_read_pcm_frames_##extension(pFlac, sizeof(buffer)/sizeof(buffer[0])/pFlac->channels, buffer)) > 0) { \ if (((totalPCMFrameCount + pcmFramesRead) * pFlac->channels * sizeof(type)) > sampleDataBufferSize) { \ type* pNewSampleData; \ size_t newSampleDataBufferSize; \ \ newSampleDataBufferSize = sampleDataBufferSize * 2; \ pNewSampleData = (type*)ma_dr_flac__realloc_from_callbacks(pSampleData, newSampleDataBufferSize, sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pNewSampleData == NULL) { \ ma_dr_flac__free_from_callbacks(pSampleData, &pFlac->allocationCallbacks); \ goto on_error; \ } \ \ sampleDataBufferSize = newSampleDataBufferSize; \ pSampleData = pNewSampleData; \ } \ \ MA_DR_FLAC_COPY_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), buffer, (size_t)(pcmFramesRead*pFlac->channels*sizeof(type))); \ totalPCMFrameCount += pcmFramesRead; \ } \ \ \ MA_DR_FLAC_ZERO_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), (size_t)(sampleDataBufferSize - totalPCMFrameCount*pFlac->channels*sizeof(type))); \ } else { \ ma_uint64 dataSize = totalPCMFrameCount*pFlac->channels*sizeof(type); \ if (dataSize > (ma_uint64)MA_SIZE_MAX) { \ goto on_error; \ } \ \ pSampleData = (type*)ma_dr_flac__malloc_from_callbacks((size_t)dataSize, &pFlac->allocationCallbacks); \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ totalPCMFrameCount = ma_dr_flac_read_pcm_frames_##extension(pFlac, pFlac->totalPCMFrameCount, pSampleData); \ } \ \ if (sampleRateOut) *sampleRateOut = pFlac->sampleRate; \ if (channelsOut) *channelsOut = pFlac->channels; \ if (totalPCMFrameCountOut) *totalPCMFrameCountOut = totalPCMFrameCount; \ \ ma_dr_flac_close(pFlac); \ return pSampleData; \ \ on_error: \ ma_dr_flac_close(pFlac); \ return NULL; \ } MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s32, ma_int32) MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s16, ma_int16) MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(f32, float) MA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } MA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } MA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } #endif MA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_flac__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_flac__free_default(p, NULL); } } MA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments) { if (pIter == NULL) { return; } pIter->countRemaining = commentCount; pIter->pRunningData = (const char*)pComments; } MA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut) { ma_int32 length; const char* pComment; if (pCommentLengthOut) { *pCommentLengthOut = 0; } if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return NULL; } length = ma_dr_flac__le2host_32_ptr_unaligned(pIter->pRunningData); pIter->pRunningData += 4; pComment = pIter->pRunningData; pIter->pRunningData += length; pIter->countRemaining -= 1; if (pCommentLengthOut) { *pCommentLengthOut = length; } return pComment; } MA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData) { if (pIter == NULL) { return; } pIter->countRemaining = trackCount; pIter->pRunningData = (const char*)pTrackData; } MA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack) { ma_dr_flac_cuesheet_track cuesheetTrack; const char* pRunningData; ma_uint64 offsetHi; ma_uint64 offsetLo; if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return MA_FALSE; } pRunningData = pIter->pRunningData; offsetHi = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4; offsetLo = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4; cuesheetTrack.offset = offsetLo | (offsetHi << 32); cuesheetTrack.trackNumber = pRunningData[0]; pRunningData += 1; MA_DR_FLAC_COPY_MEMORY(cuesheetTrack.ISRC, pRunningData, sizeof(cuesheetTrack.ISRC)); pRunningData += 12; cuesheetTrack.isAudio = (pRunningData[0] & 0x80) != 0; cuesheetTrack.preEmphasis = (pRunningData[0] & 0x40) != 0; pRunningData += 14; cuesheetTrack.indexCount = pRunningData[0]; pRunningData += 1; cuesheetTrack.pIndexPoints = (const ma_dr_flac_cuesheet_track_index*)pRunningData; pRunningData += cuesheetTrack.indexCount * sizeof(ma_dr_flac_cuesheet_track_index); pIter->pRunningData = pRunningData; pIter->countRemaining -= 1; if (pCuesheetTrack) { *pCuesheetTrack = cuesheetTrack; } return MA_TRUE; } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif /* dr_flac_c end */ #endif /* MA_DR_FLAC_IMPLEMENTATION */ #endif /* MA_NO_FLAC */ #if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING) #if !defined(MA_DR_MP3_IMPLEMENTATION) /* dr_mp3_c begin */ #ifndef ma_dr_mp3_c #define ma_dr_mp3_c #include #include #include MA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_MP3_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_MP3_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_MP3_VERSION_REVISION; } } MA_API const char* ma_dr_mp3_version_string(void) { return MA_DR_MP3_VERSION_STRING; } #if defined(__TINYC__) #define MA_DR_MP3_NO_SIMD #endif #define MA_DR_MP3_OFFSET_PTR(p, offset) ((void*)((ma_uint8*)(p) + (offset))) #define MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE 2304 #ifndef MA_DR_MP3_MAX_FRAME_SYNC_MATCHES #define MA_DR_MP3_MAX_FRAME_SYNC_MATCHES 10 #endif #define MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE #define MA_DR_MP3_MAX_BITRESERVOIR_BYTES 511 #define MA_DR_MP3_SHORT_BLOCK_TYPE 2 #define MA_DR_MP3_STOP_BLOCK_TYPE 3 #define MA_DR_MP3_MODE_MONO 3 #define MA_DR_MP3_MODE_JOINT_STEREO 1 #define MA_DR_MP3_HDR_SIZE 4 #define MA_DR_MP3_HDR_IS_MONO(h) (((h[3]) & 0xC0) == 0xC0) #define MA_DR_MP3_HDR_IS_MS_STEREO(h) (((h[3]) & 0xE0) == 0x60) #define MA_DR_MP3_HDR_IS_FREE_FORMAT(h) (((h[2]) & 0xF0) == 0) #define MA_DR_MP3_HDR_IS_CRC(h) (!((h[1]) & 1)) #define MA_DR_MP3_HDR_TEST_PADDING(h) ((h[2]) & 0x2) #define MA_DR_MP3_HDR_TEST_MPEG1(h) ((h[1]) & 0x8) #define MA_DR_MP3_HDR_TEST_NOT_MPEG25(h) ((h[1]) & 0x10) #define MA_DR_MP3_HDR_TEST_I_STEREO(h) ((h[3]) & 0x10) #define MA_DR_MP3_HDR_TEST_MS_STEREO(h) ((h[3]) & 0x20) #define MA_DR_MP3_HDR_GET_STEREO_MODE(h) (((h[3]) >> 6) & 3) #define MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(h) (((h[3]) >> 4) & 3) #define MA_DR_MP3_HDR_GET_LAYER(h) (((h[1]) >> 1) & 3) #define MA_DR_MP3_HDR_GET_BITRATE(h) ((h[2]) >> 4) #define MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) (((h[2]) >> 2) & 3) #define MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h) (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3) #define MA_DR_MP3_HDR_IS_FRAME_576(h) ((h[1] & 14) == 2) #define MA_DR_MP3_HDR_IS_LAYER_1(h) ((h[1] & 6) == 6) #define MA_DR_MP3_BITS_DEQUANTIZER_OUT -1 #define MA_DR_MP3_MAX_SCF (255 + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210) #define MA_DR_MP3_MAX_SCFI ((MA_DR_MP3_MAX_SCF + 3) & ~3) #define MA_DR_MP3_MIN(a, b) ((a) > (b) ? (b) : (a)) #define MA_DR_MP3_MAX(a, b) ((a) < (b) ? (b) : (a)) #if !defined(MA_DR_MP3_NO_SIMD) #if !defined(MA_DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) #define MA_DR_MP3_ONLY_SIMD #endif #if ((defined(_MSC_VER) && _MSC_VER >= 1400) && defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__))) #if defined(_MSC_VER) #include #endif #include #define MA_DR_MP3_HAVE_SSE 1 #define MA_DR_MP3_HAVE_SIMD 1 #define MA_DR_MP3_VSTORE _mm_storeu_ps #define MA_DR_MP3_VLD _mm_loadu_ps #define MA_DR_MP3_VSET _mm_set1_ps #define MA_DR_MP3_VADD _mm_add_ps #define MA_DR_MP3_VSUB _mm_sub_ps #define MA_DR_MP3_VMUL _mm_mul_ps #define MA_DR_MP3_VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y)) #define MA_DR_MP3_VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y)) #define MA_DR_MP3_VMUL_S(x, s) _mm_mul_ps(x, _mm_set1_ps(s)) #define MA_DR_MP3_VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3)) typedef __m128 ma_dr_mp3_f4; #if defined(_MSC_VER) || defined(MA_DR_MP3_ONLY_SIMD) #define ma_dr_mp3_cpuid __cpuid #else static __inline__ __attribute__((always_inline)) void ma_dr_mp3_cpuid(int CPUInfo[], const int InfoType) { #if defined(__PIC__) __asm__ __volatile__( #if defined(__x86_64__) "push %%rbx\n" "cpuid\n" "xchgl %%ebx, %1\n" "pop %%rbx\n" #else "xchgl %%ebx, %1\n" "cpuid\n" "xchgl %%ebx, %1\n" #endif : "=a" (CPUInfo[0]), "=r" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #else __asm__ __volatile__( "cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #endif } #endif static int ma_dr_mp3_have_simd(void) { #ifdef MA_DR_MP3_ONLY_SIMD return 1; #else static int g_have_simd; int CPUInfo[4]; #ifdef MINIMP3_TEST static int g_counter; if (g_counter++ > 100) return 0; #endif if (g_have_simd) goto end; ma_dr_mp3_cpuid(CPUInfo, 0); if (CPUInfo[0] > 0) { ma_dr_mp3_cpuid(CPUInfo, 1); g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; return g_have_simd - 1; } end: return g_have_simd - 1; #endif } #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) #include #define MA_DR_MP3_HAVE_SSE 0 #define MA_DR_MP3_HAVE_SIMD 1 #define MA_DR_MP3_VSTORE vst1q_f32 #define MA_DR_MP3_VLD vld1q_f32 #define MA_DR_MP3_VSET vmovq_n_f32 #define MA_DR_MP3_VADD vaddq_f32 #define MA_DR_MP3_VSUB vsubq_f32 #define MA_DR_MP3_VMUL vmulq_f32 #define MA_DR_MP3_VMAC(a, x, y) vmlaq_f32(a, x, y) #define MA_DR_MP3_VMSB(a, x, y) vmlsq_f32(a, x, y) #define MA_DR_MP3_VMUL_S(x, s) vmulq_f32(x, vmovq_n_f32(s)) #define MA_DR_MP3_VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x))) typedef float32x4_t ma_dr_mp3_f4; static int ma_dr_mp3_have_simd(void) { return 1; } #else #define MA_DR_MP3_HAVE_SSE 0 #define MA_DR_MP3_HAVE_SIMD 0 #ifdef MA_DR_MP3_ONLY_SIMD #error MA_DR_MP3_ONLY_SIMD used, but SSE/NEON not enabled #endif #endif #else #define MA_DR_MP3_HAVE_SIMD 0 #endif #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(_M_ARM64EC) && !defined(__ARM_ARCH_6M__) #define MA_DR_MP3_HAVE_ARMV6 1 static __inline__ __attribute__((always_inline)) ma_int32 ma_dr_mp3_clip_int16_arm(ma_int32 a) { ma_int32 x = 0; __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); return x; } #else #define MA_DR_MP3_HAVE_ARMV6 0 #endif #ifndef MA_DR_MP3_ASSERT #include #define MA_DR_MP3_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_MP3_COPY_MEMORY #define MA_DR_MP3_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_MP3_MOVE_MEMORY #define MA_DR_MP3_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #ifndef MA_DR_MP3_ZERO_MEMORY #define MA_DR_MP3_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #define MA_DR_MP3_ZERO_OBJECT(p) MA_DR_MP3_ZERO_MEMORY((p), sizeof(*(p))) #ifndef MA_DR_MP3_MALLOC #define MA_DR_MP3_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_MP3_REALLOC #define MA_DR_MP3_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_MP3_FREE #define MA_DR_MP3_FREE(p) free((p)) #endif typedef struct { const ma_uint8 *buf; int pos, limit; } ma_dr_mp3_bs; typedef struct { float scf[3*64]; ma_uint8 total_bands, stereo_bands, bitalloc[64], scfcod[64]; } ma_dr_mp3_L12_scale_info; typedef struct { ma_uint8 tab_offset, code_tab_width, band_count; } ma_dr_mp3_L12_subband_alloc; typedef struct { const ma_uint8 *sfbtab; ma_uint16 part_23_length, big_values, scalefac_compress; ma_uint8 global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb; ma_uint8 table_select[3], region_count[3], subblock_gain[3]; ma_uint8 preflag, scalefac_scale, count1_table, scfsi; } ma_dr_mp3_L3_gr_info; typedef struct { ma_dr_mp3_bs bs; ma_uint8 maindata[MA_DR_MP3_MAX_BITRESERVOIR_BYTES + MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES]; ma_dr_mp3_L3_gr_info gr_info[4]; float grbuf[2][576], scf[40], syn[18 + 15][2*32]; ma_uint8 ist_pos[2][39]; } ma_dr_mp3dec_scratch; static void ma_dr_mp3_bs_init(ma_dr_mp3_bs *bs, const ma_uint8 *data, int bytes) { bs->buf = data; bs->pos = 0; bs->limit = bytes*8; } static ma_uint32 ma_dr_mp3_bs_get_bits(ma_dr_mp3_bs *bs, int n) { ma_uint32 next, cache = 0, s = bs->pos & 7; int shl = n + s; const ma_uint8 *p = bs->buf + (bs->pos >> 3); if ((bs->pos += n) > bs->limit) return 0; next = *p++ & (255 >> s); while ((shl -= 8) > 0) { cache |= next << shl; next = *p++; } return cache | (next >> -shl); } static int ma_dr_mp3_hdr_valid(const ma_uint8 *h) { return h[0] == 0xff && ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) && (MA_DR_MP3_HDR_GET_LAYER(h) != 0) && (MA_DR_MP3_HDR_GET_BITRATE(h) != 15) && (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) != 3); } static int ma_dr_mp3_hdr_compare(const ma_uint8 *h1, const ma_uint8 *h2) { return ma_dr_mp3_hdr_valid(h2) && ((h1[1] ^ h2[1]) & 0xFE) == 0 && ((h1[2] ^ h2[2]) & 0x0C) == 0 && !(MA_DR_MP3_HDR_IS_FREE_FORMAT(h1) ^ MA_DR_MP3_HDR_IS_FREE_FORMAT(h2)); } static unsigned ma_dr_mp3_hdr_bitrate_kbps(const ma_uint8 *h) { static const ma_uint8 halfrate[2][3][15] = { { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } }, { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } }, }; return 2*halfrate[!!MA_DR_MP3_HDR_TEST_MPEG1(h)][MA_DR_MP3_HDR_GET_LAYER(h) - 1][MA_DR_MP3_HDR_GET_BITRATE(h)]; } static unsigned ma_dr_mp3_hdr_sample_rate_hz(const ma_uint8 *h) { static const unsigned g_hz[3] = { 44100, 48000, 32000 }; return g_hz[MA_DR_MP3_HDR_GET_SAMPLE_RATE(h)] >> (int)!MA_DR_MP3_HDR_TEST_MPEG1(h) >> (int)!MA_DR_MP3_HDR_TEST_NOT_MPEG25(h); } static unsigned ma_dr_mp3_hdr_frame_samples(const ma_uint8 *h) { return MA_DR_MP3_HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)MA_DR_MP3_HDR_IS_FRAME_576(h)); } static int ma_dr_mp3_hdr_frame_bytes(const ma_uint8 *h, int free_format_size) { int frame_bytes = ma_dr_mp3_hdr_frame_samples(h)*ma_dr_mp3_hdr_bitrate_kbps(h)*125/ma_dr_mp3_hdr_sample_rate_hz(h); if (MA_DR_MP3_HDR_IS_LAYER_1(h)) { frame_bytes &= ~3; } return frame_bytes ? frame_bytes : free_format_size; } static int ma_dr_mp3_hdr_padding(const ma_uint8 *h) { return MA_DR_MP3_HDR_TEST_PADDING(h) ? (MA_DR_MP3_HDR_IS_LAYER_1(h) ? 4 : 1) : 0; } #ifndef MA_DR_MP3_ONLY_MP3 static const ma_dr_mp3_L12_subband_alloc *ma_dr_mp3_L12_subband_alloc_table(const ma_uint8 *hdr, ma_dr_mp3_L12_scale_info *sci) { const ma_dr_mp3_L12_subband_alloc *alloc; int mode = MA_DR_MP3_HDR_GET_STEREO_MODE(hdr); int nbands, stereo_bands = (mode == MA_DR_MP3_MODE_MONO) ? 0 : (mode == MA_DR_MP3_MODE_JOINT_STEREO) ? (MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32; if (MA_DR_MP3_HDR_IS_LAYER_1(hdr)) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L1[] = { { 76, 4, 32 } }; alloc = g_alloc_L1; nbands = 32; } else if (!MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } }; alloc = g_alloc_L2M2; nbands = 30; } else { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } }; int sample_rate_idx = MA_DR_MP3_HDR_GET_SAMPLE_RATE(hdr); unsigned kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr) >> (int)(mode != MA_DR_MP3_MODE_MONO); if (!kbps) { kbps = 192; } alloc = g_alloc_L2M1; nbands = 27; if (kbps < 56) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } }; alloc = g_alloc_L2M1_lowrate; nbands = sample_rate_idx == 2 ? 12 : 8; } else if (kbps >= 96 && sample_rate_idx != 1) { nbands = 30; } } sci->total_bands = (ma_uint8)nbands; sci->stereo_bands = (ma_uint8)MA_DR_MP3_MIN(stereo_bands, nbands); return alloc; } static void ma_dr_mp3_L12_read_scalefactors(ma_dr_mp3_bs *bs, ma_uint8 *pba, ma_uint8 *scfcod, int bands, float *scf) { static const float g_deq_L12[18*3] = { #define MA_DR_MP3_DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(7),MA_DR_MP3_DQ(15),MA_DR_MP3_DQ(31),MA_DR_MP3_DQ(63),MA_DR_MP3_DQ(127),MA_DR_MP3_DQ(255),MA_DR_MP3_DQ(511),MA_DR_MP3_DQ(1023),MA_DR_MP3_DQ(2047),MA_DR_MP3_DQ(4095),MA_DR_MP3_DQ(8191),MA_DR_MP3_DQ(16383),MA_DR_MP3_DQ(32767),MA_DR_MP3_DQ(65535),MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(5),MA_DR_MP3_DQ(9) }; int i, m; for (i = 0; i < bands; i++) { float s = 0; int ba = *pba++; int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0; for (m = 4; m; m >>= 1) { if (mask & m) { int b = ma_dr_mp3_bs_get_bits(bs, 6); s = g_deq_L12[ba*3 - 6 + b % 3]*(int)(1 << 21 >> b/3); } *scf++ = s; } } } static void ma_dr_mp3_L12_read_scale_info(const ma_uint8 *hdr, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci) { static const ma_uint8 g_bitalloc_code_tab[] = { 0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16, 0,17,18, 3,19,4,5,16, 0,17,18,16, 0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14, 0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16 }; const ma_dr_mp3_L12_subband_alloc *subband_alloc = ma_dr_mp3_L12_subband_alloc_table(hdr, sci); int i, k = 0, ba_bits = 0; const ma_uint8 *ba_code_tab = g_bitalloc_code_tab; for (i = 0; i < sci->total_bands; i++) { ma_uint8 ba; if (i == k) { k += subband_alloc->band_count; ba_bits = subband_alloc->code_tab_width; ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset; subband_alloc++; } ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)]; sci->bitalloc[2*i] = ba; if (i < sci->stereo_bands) { ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)]; } sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0; } for (i = 0; i < 2*sci->total_bands; i++) { sci->scfcod[i] = (ma_uint8)(sci->bitalloc[i] ? MA_DR_MP3_HDR_IS_LAYER_1(hdr) ? 2 : ma_dr_mp3_bs_get_bits(bs, 2) : 6); } ma_dr_mp3_L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf); for (i = sci->stereo_bands; i < sci->total_bands; i++) { sci->bitalloc[2*i + 1] = 0; } } static int ma_dr_mp3_L12_dequantize_granule(float *grbuf, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci, int group_size) { int i, j, k, choff = 576; for (j = 0; j < 4; j++) { float *dst = grbuf + group_size*j; for (i = 0; i < 2*sci->total_bands; i++) { int ba = sci->bitalloc[i]; if (ba != 0) { if (ba < 17) { int half = (1 << (ba - 1)) - 1; for (k = 0; k < group_size; k++) { dst[k] = (float)((int)ma_dr_mp3_bs_get_bits(bs, ba) - half); } } else { unsigned mod = (2 << (ba - 17)) + 1; unsigned code = ma_dr_mp3_bs_get_bits(bs, mod + 2 - (mod >> 3)); for (k = 0; k < group_size; k++, code /= mod) { dst[k] = (float)((int)(code % mod - mod/2)); } } } dst += choff; choff = 18 - choff; } } return group_size*4; } static void ma_dr_mp3_L12_apply_scf_384(ma_dr_mp3_L12_scale_info *sci, const float *scf, float *dst) { int i, k; MA_DR_MP3_COPY_MEMORY(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float)); for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6) { for (k = 0; k < 12; k++) { dst[k + 0] *= scf[0]; dst[k + 576] *= scf[3]; } } } #endif static int ma_dr_mp3_L3_read_side_info(ma_dr_mp3_bs *bs, ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr) { static const ma_uint8 g_scf_long[8][23] = { { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 }, { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 }, { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 } }; static const ma_uint8 g_scf_short[8][40] = { { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; static const ma_uint8 g_scf_mixed[8][40] = { { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; unsigned tables, scfsi = 0; int main_data_begin, part_23_sum = 0; int gr_count = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2; int sr_idx = MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0); if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { gr_count *= 2; main_data_begin = ma_dr_mp3_bs_get_bits(bs, 9); scfsi = ma_dr_mp3_bs_get_bits(bs, 7 + gr_count); } else { main_data_begin = ma_dr_mp3_bs_get_bits(bs, 8 + gr_count) >> gr_count; } do { if (MA_DR_MP3_HDR_IS_MONO(hdr)) { scfsi <<= 4; } gr->part_23_length = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, 12); part_23_sum += gr->part_23_length; gr->big_values = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, 9); if (gr->big_values > 288) { return -1; } gr->global_gain = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 8); gr->scalefac_compress = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 4 : 9); gr->sfbtab = g_scf_long[sr_idx]; gr->n_long_sfb = 22; gr->n_short_sfb = 0; if (ma_dr_mp3_bs_get_bits(bs, 1)) { gr->block_type = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 2); if (!gr->block_type) { return -1; } gr->mixed_block_flag = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->region_count[0] = 7; gr->region_count[1] = 255; if (gr->block_type == MA_DR_MP3_SHORT_BLOCK_TYPE) { scfsi &= 0x0F0F; if (!gr->mixed_block_flag) { gr->region_count[0] = 8; gr->sfbtab = g_scf_short[sr_idx]; gr->n_long_sfb = 0; gr->n_short_sfb = 39; } else { gr->sfbtab = g_scf_mixed[sr_idx]; gr->n_long_sfb = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 8 : 6; gr->n_short_sfb = 30; } } tables = ma_dr_mp3_bs_get_bits(bs, 10); tables <<= 5; gr->subblock_gain[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->subblock_gain[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->subblock_gain[2] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); } else { gr->block_type = 0; gr->mixed_block_flag = 0; tables = ma_dr_mp3_bs_get_bits(bs, 15); gr->region_count[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 4); gr->region_count[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->region_count[2] = 255; } gr->table_select[0] = (ma_uint8)(tables >> 10); gr->table_select[1] = (ma_uint8)((tables >> 5) & 31); gr->table_select[2] = (ma_uint8)((tables) & 31); gr->preflag = (ma_uint8)(MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? ma_dr_mp3_bs_get_bits(bs, 1) : (gr->scalefac_compress >= 500)); gr->scalefac_scale = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->count1_table = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->scfsi = (ma_uint8)((scfsi >> 12) & 15); scfsi <<= 4; gr++; } while(--gr_count); if (part_23_sum + bs->pos > bs->limit + main_data_begin*8) { return -1; } return main_data_begin; } static void ma_dr_mp3_L3_read_scalefactors(ma_uint8 *scf, ma_uint8 *ist_pos, const ma_uint8 *scf_size, const ma_uint8 *scf_count, ma_dr_mp3_bs *bitbuf, int scfsi) { int i, k; for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2) { int cnt = scf_count[i]; if (scfsi & 8) { MA_DR_MP3_COPY_MEMORY(scf, ist_pos, cnt); } else { int bits = scf_size[i]; if (!bits) { MA_DR_MP3_ZERO_MEMORY(scf, cnt); MA_DR_MP3_ZERO_MEMORY(ist_pos, cnt); } else { int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1; for (k = 0; k < cnt; k++) { int s = ma_dr_mp3_bs_get_bits(bitbuf, bits); ist_pos[k] = (ma_uint8)(s == max_scf ? -1 : s); scf[k] = (ma_uint8)s; } } } ist_pos += cnt; scf += cnt; } scf[0] = scf[1] = scf[2] = 0; } static float ma_dr_mp3_L3_ldexp_q2(float y, int exp_q2) { static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f }; int e; do { e = MA_DR_MP3_MIN(30*4, exp_q2); y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2)); } while ((exp_q2 -= e) > 0); return y; } static void ma_dr_mp3_L3_decode_scalefactors(const ma_uint8 *hdr, ma_uint8 *ist_pos, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr, float *scf, int ch) { static const ma_uint8 g_scf_partitions[3][28] = { { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 }, { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 }, { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 } }; const ma_uint8 *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb]; ma_uint8 scf_size[4], iscf[40]; int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi; float gain; if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { static const ma_uint8 g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 }; int part = g_scfc_decode[gr->scalefac_compress]; scf_size[1] = scf_size[0] = (ma_uint8)(part >> 2); scf_size[3] = scf_size[2] = (ma_uint8)(part & 3); } else { static const ma_uint8 g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 }; int k, modprod, sfc, ist = MA_DR_MP3_HDR_TEST_I_STEREO(hdr) && ch; sfc = gr->scalefac_compress >> ist; for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4) { for (modprod = 1, i = 3; i >= 0; i--) { scf_size[i] = (ma_uint8)(sfc / modprod % g_mod[k + i]); modprod *= g_mod[k + i]; } } scf_partition += k; scfsi = -16; } ma_dr_mp3_L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi); if (gr->n_short_sfb) { int sh = 3 - scf_shift; for (i = 0; i < gr->n_short_sfb; i += 3) { iscf[gr->n_long_sfb + i + 0] = (ma_uint8)(iscf[gr->n_long_sfb + i + 0] + (gr->subblock_gain[0] << sh)); iscf[gr->n_long_sfb + i + 1] = (ma_uint8)(iscf[gr->n_long_sfb + i + 1] + (gr->subblock_gain[1] << sh)); iscf[gr->n_long_sfb + i + 2] = (ma_uint8)(iscf[gr->n_long_sfb + i + 2] + (gr->subblock_gain[2] << sh)); } } else if (gr->preflag) { static const ma_uint8 g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 }; for (i = 0; i < 10; i++) { iscf[11 + i] = (ma_uint8)(iscf[11 + i] + g_preamp[i]); } } gain_exp = gr->global_gain + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210 - (MA_DR_MP3_HDR_IS_MS_STEREO(hdr) ? 2 : 0); gain = ma_dr_mp3_L3_ldexp_q2(1 << (MA_DR_MP3_MAX_SCFI/4), MA_DR_MP3_MAX_SCFI - gain_exp); for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++) { scf[i] = ma_dr_mp3_L3_ldexp_q2(gain, iscf[i] << scf_shift); } } static const float g_ma_dr_mp3_pow43[129 + 16] = { 0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f, 0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f }; static float ma_dr_mp3_L3_pow_43(int x) { float frac; int sign, mult = 256; if (x < 129) { return g_ma_dr_mp3_pow43[16 + x]; } if (x < 1024) { mult = 16; x <<= 3; } sign = 2*x & 64; frac = (float)((x & 63) - sign) / ((x & ~63) + sign); return g_ma_dr_mp3_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult; } static void ma_dr_mp3_L3_huffman(float *dst, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr_info, const float *scf, int layer3gr_limit) { static const ma_int16 tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256, -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288, -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288, -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258, -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259, -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258, -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258, -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259, -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258, -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290, -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259, -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258, -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259, -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258, -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 }; static const ma_uint8 tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205}; static const ma_uint8 tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 }; static const ma_int16 tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 }; static const ma_uint8 g_linbits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 }; #define MA_DR_MP3_PEEK_BITS(n) (bs_cache >> (32 - (n))) #define MA_DR_MP3_FLUSH_BITS(n) { bs_cache <<= (n); bs_sh += (n); } #define MA_DR_MP3_CHECK_BITS while (bs_sh >= 0) { bs_cache |= (ma_uint32)*bs_next_ptr++ << bs_sh; bs_sh -= 8; } #define MA_DR_MP3_BSPOS ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh) float one = 0.0f; int ireg = 0, big_val_cnt = gr_info->big_values; const ma_uint8 *sfb = gr_info->sfbtab; const ma_uint8 *bs_next_ptr = bs->buf + bs->pos/8; ma_uint32 bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7); int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8; bs_next_ptr += 4; while (big_val_cnt > 0) { int tab_num = gr_info->table_select[ireg]; int sfb_cnt = gr_info->region_count[ireg++]; const ma_int16 *codebook = tabs + tabindex[tab_num]; int linbits = g_linbits[tab_num]; if (linbits) { do { np = *sfb++ / 2; pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)]; while (leaf < 0) { MA_DR_MP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)]; } MA_DR_MP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; if (lsb == 15) { lsb += MA_DR_MP3_PEEK_BITS(linbits); MA_DR_MP3_FLUSH_BITS(linbits); MA_DR_MP3_CHECK_BITS; *dst = one*ma_dr_mp3_L3_pow_43(lsb)*((ma_int32)bs_cache < 0 ? -1: 1); } else { *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; } MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0); } MA_DR_MP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } else { do { np = *sfb++ / 2; pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)]; while (leaf < 0) { MA_DR_MP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)]; } MA_DR_MP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0); } MA_DR_MP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } } for (np = 1 - big_val_cnt;; dst += 4) { const ma_uint8 *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32; int leaf = codebook_count1[MA_DR_MP3_PEEK_BITS(4)]; if (!(leaf & 8)) { leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))]; } MA_DR_MP3_FLUSH_BITS(leaf & 7); if (MA_DR_MP3_BSPOS > layer3gr_limit) { break; } #define MA_DR_MP3_RELOAD_SCALEFACTOR if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; } #define MA_DR_MP3_DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((ma_int32)bs_cache < 0) ? -one : one; MA_DR_MP3_FLUSH_BITS(1) } MA_DR_MP3_RELOAD_SCALEFACTOR; MA_DR_MP3_DEQ_COUNT1(0); MA_DR_MP3_DEQ_COUNT1(1); MA_DR_MP3_RELOAD_SCALEFACTOR; MA_DR_MP3_DEQ_COUNT1(2); MA_DR_MP3_DEQ_COUNT1(3); MA_DR_MP3_CHECK_BITS; } bs->pos = layer3gr_limit; } static void ma_dr_mp3_L3_midside_stereo(float *left, int n) { int i = 0; float *right = left + 576; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) { for (; i < n - 3; i += 4) { ma_dr_mp3_f4 vl = MA_DR_MP3_VLD(left + i); ma_dr_mp3_f4 vr = MA_DR_MP3_VLD(right + i); MA_DR_MP3_VSTORE(left + i, MA_DR_MP3_VADD(vl, vr)); MA_DR_MP3_VSTORE(right + i, MA_DR_MP3_VSUB(vl, vr)); } #ifdef __GNUC__ if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0) return; #endif } #endif for (; i < n; i++) { float a = left[i]; float b = right[i]; left[i] = a + b; right[i] = a - b; } } static void ma_dr_mp3_L3_intensity_stereo_band(float *left, int n, float kl, float kr) { int i; for (i = 0; i < n; i++) { left[i + 576] = left[i]*kr; left[i] = left[i]*kl; } } static void ma_dr_mp3_L3_stereo_top_band(const float *right, const ma_uint8 *sfb, int nbands, int max_band[3]) { int i, k; max_band[0] = max_band[1] = max_band[2] = -1; for (i = 0; i < nbands; i++) { for (k = 0; k < sfb[i]; k += 2) { if (right[k] != 0 || right[k + 1] != 0) { max_band[i % 3] = i; break; } } right += sfb[i]; } } static void ma_dr_mp3_L3_stereo_process(float *left, const ma_uint8 *ist_pos, const ma_uint8 *sfb, const ma_uint8 *hdr, int max_band[3], int mpeg2_sh) { static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 }; unsigned i, max_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 7 : 64; for (i = 0; sfb[i]; i++) { unsigned ipos = ist_pos[i]; if ((int)i > max_band[i % 3] && ipos < max_pos) { float kl, kr, s = MA_DR_MP3_HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1; if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { kl = g_pan[2*ipos]; kr = g_pan[2*ipos + 1]; } else { kl = 1; kr = ma_dr_mp3_L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh); if (ipos & 1) { kl = kr; kr = 1; } } ma_dr_mp3_L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s); } else if (MA_DR_MP3_HDR_TEST_MS_STEREO(hdr)) { ma_dr_mp3_L3_midside_stereo(left, sfb[i]); } left += sfb[i]; } } static void ma_dr_mp3_L3_intensity_stereo(float *left, ma_uint8 *ist_pos, const ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr) { int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb; int i, max_blocks = gr->n_short_sfb ? 3 : 1; ma_dr_mp3_L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band); if (gr->n_long_sfb) { max_band[0] = max_band[1] = max_band[2] = MA_DR_MP3_MAX(MA_DR_MP3_MAX(max_band[0], max_band[1]), max_band[2]); } for (i = 0; i < max_blocks; i++) { int default_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 3 : 0; int itop = n_sfb - max_blocks + i; int prev = itop - max_blocks; ist_pos[itop] = (ma_uint8)(max_band[i] >= prev ? default_pos : ist_pos[prev]); } ma_dr_mp3_L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1); } static void ma_dr_mp3_L3_reorder(float *grbuf, float *scratch, const ma_uint8 *sfb) { int i, len; float *src = grbuf, *dst = scratch; for (;0 != (len = *sfb); sfb += 3, src += 2*len) { for (i = 0; i < len; i++, src++) { *dst++ = src[0*len]; *dst++ = src[1*len]; *dst++ = src[2*len]; } } MA_DR_MP3_COPY_MEMORY(grbuf, scratch, (dst - scratch)*sizeof(float)); } static void ma_dr_mp3_L3_antialias(float *grbuf, int nbands) { static const float g_aa[2][8] = { {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f}, {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f} }; for (; nbands > 0; nbands--, grbuf += 18) { int i = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4) { ma_dr_mp3_f4 vu = MA_DR_MP3_VLD(grbuf + 18 + i); ma_dr_mp3_f4 vd = MA_DR_MP3_VLD(grbuf + 14 - i); ma_dr_mp3_f4 vc0 = MA_DR_MP3_VLD(g_aa[0] + i); ma_dr_mp3_f4 vc1 = MA_DR_MP3_VLD(g_aa[1] + i); vd = MA_DR_MP3_VREV(vd); MA_DR_MP3_VSTORE(grbuf + 18 + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vu, vc0), MA_DR_MP3_VMUL(vd, vc1))); vd = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vu, vc1), MA_DR_MP3_VMUL(vd, vc0)); MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vd)); } #endif #ifndef MA_DR_MP3_ONLY_SIMD for(; i < 8; i++) { float u = grbuf[18 + i]; float d = grbuf[17 - i]; grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i]; grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i]; } #endif } } static void ma_dr_mp3_L3_dct3_9(float *y) { float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4; s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8]; t0 = s0 + s6*0.5f; s0 -= s6; t4 = (s4 + s2)*0.93969262f; t2 = (s8 + s2)*0.76604444f; s6 = (s4 - s8)*0.17364818f; s4 += s8 - s2; s2 = s0 - s4*0.5f; y[4] = s4 + s0; s8 = t0 - t2 + s6; s0 = t0 - t4 + t2; s4 = t0 + t4 - s6; s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7]; s3 *= 0.86602540f; t0 = (s5 + s1)*0.98480775f; t4 = (s5 - s7)*0.34202014f; t2 = (s1 + s7)*0.64278761f; s1 = (s1 - s5 - s7)*0.86602540f; s5 = t0 - s3 - t2; s7 = t4 - s3 - t0; s3 = t4 + s3 - t2; y[0] = s4 - s7; y[1] = s2 + s1; y[2] = s0 - s3; y[3] = s8 + s5; y[5] = s8 - s5; y[6] = s0 + s3; y[7] = s2 - s1; y[8] = s4 + s7; } static void ma_dr_mp3_L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands) { int i, j; static const float g_twid9[18] = { 0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f }; for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9) { float co[9], si[9]; co[0] = -grbuf[0]; si[0] = grbuf[17]; for (i = 0; i < 4; i++) { si[8 - 2*i] = grbuf[4*i + 1] - grbuf[4*i + 2]; co[1 + 2*i] = grbuf[4*i + 1] + grbuf[4*i + 2]; si[7 - 2*i] = grbuf[4*i + 4] - grbuf[4*i + 3]; co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]); } ma_dr_mp3_L3_dct3_9(co); ma_dr_mp3_L3_dct3_9(si); si[1] = -si[1]; si[3] = -si[3]; si[5] = -si[5]; si[7] = -si[7]; i = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4) { ma_dr_mp3_f4 vovl = MA_DR_MP3_VLD(overlap + i); ma_dr_mp3_f4 vc = MA_DR_MP3_VLD(co + i); ma_dr_mp3_f4 vs = MA_DR_MP3_VLD(si + i); ma_dr_mp3_f4 vr0 = MA_DR_MP3_VLD(g_twid9 + i); ma_dr_mp3_f4 vr1 = MA_DR_MP3_VLD(g_twid9 + 9 + i); ma_dr_mp3_f4 vw0 = MA_DR_MP3_VLD(window + i); ma_dr_mp3_f4 vw1 = MA_DR_MP3_VLD(window + 9 + i); ma_dr_mp3_f4 vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vc, vr1), MA_DR_MP3_VMUL(vs, vr0)); MA_DR_MP3_VSTORE(overlap + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vc, vr0), MA_DR_MP3_VMUL(vs, vr1))); MA_DR_MP3_VSTORE(grbuf + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vovl, vw0), MA_DR_MP3_VMUL(vsum, vw1))); vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vovl, vw1), MA_DR_MP3_VMUL(vsum, vw0)); MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vsum)); } #endif for (; i < 9; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i]; overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i]; grbuf[i] = ovl*window[0 + i] - sum*window[9 + i]; grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i]; } } } static void ma_dr_mp3_L3_idct3(float x0, float x1, float x2, float *dst) { float m1 = x1*0.86602540f; float a1 = x0 - x2*0.5f; dst[1] = x0 + x2; dst[0] = a1 + m1; dst[2] = a1 - m1; } static void ma_dr_mp3_L3_imdct12(float *x, float *dst, float *overlap) { static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f }; float co[3], si[3]; int i; ma_dr_mp3_L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co); ma_dr_mp3_L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si); si[1] = -si[1]; for (i = 0; i < 3; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i]; overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i]; dst[i] = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i]; dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i]; } } static void ma_dr_mp3_L3_imdct_short(float *grbuf, float *overlap, int nbands) { for (;nbands > 0; nbands--, overlap += 9, grbuf += 18) { float tmp[18]; MA_DR_MP3_COPY_MEMORY(tmp, grbuf, sizeof(tmp)); MA_DR_MP3_COPY_MEMORY(grbuf, overlap, 6*sizeof(float)); ma_dr_mp3_L3_imdct12(tmp, grbuf + 6, overlap + 6); ma_dr_mp3_L3_imdct12(tmp + 1, grbuf + 12, overlap + 6); ma_dr_mp3_L3_imdct12(tmp + 2, overlap, overlap + 6); } } static void ma_dr_mp3_L3_change_sign(float *grbuf) { int b, i; for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36) for (i = 1; i < 18; i += 2) grbuf[i] = -grbuf[i]; } static void ma_dr_mp3_L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands) { static const float g_mdct_window[2][18] = { { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f }, { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f } }; if (n_long_bands) { ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands); grbuf += 18*n_long_bands; overlap += 9*n_long_bands; } if (block_type == MA_DR_MP3_SHORT_BLOCK_TYPE) ma_dr_mp3_L3_imdct_short(grbuf, overlap, 32 - n_long_bands); else ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[block_type == MA_DR_MP3_STOP_BLOCK_TYPE], 32 - n_long_bands); } static void ma_dr_mp3_L3_save_reservoir(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s) { int pos = (s->bs.pos + 7)/8u; int remains = s->bs.limit/8u - pos; if (remains > MA_DR_MP3_MAX_BITRESERVOIR_BYTES) { pos += remains - MA_DR_MP3_MAX_BITRESERVOIR_BYTES; remains = MA_DR_MP3_MAX_BITRESERVOIR_BYTES; } if (remains > 0) { MA_DR_MP3_MOVE_MEMORY(h->reserv_buf, s->maindata + pos, remains); } h->reserv = remains; } static int ma_dr_mp3_L3_restore_reservoir(ma_dr_mp3dec *h, ma_dr_mp3_bs *bs, ma_dr_mp3dec_scratch *s, int main_data_begin) { int frame_bytes = (bs->limit - bs->pos)/8; int bytes_have = MA_DR_MP3_MIN(h->reserv, main_data_begin); MA_DR_MP3_COPY_MEMORY(s->maindata, h->reserv_buf + MA_DR_MP3_MAX(0, h->reserv - main_data_begin), MA_DR_MP3_MIN(h->reserv, main_data_begin)); MA_DR_MP3_COPY_MEMORY(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes); ma_dr_mp3_bs_init(&s->bs, s->maindata, bytes_have + frame_bytes); return h->reserv >= main_data_begin; } static void ma_dr_mp3_L3_decode(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s, ma_dr_mp3_L3_gr_info *gr_info, int nch) { int ch; for (ch = 0; ch < nch; ch++) { int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length; ma_dr_mp3_L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch); ma_dr_mp3_L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit); } if (MA_DR_MP3_HDR_TEST_I_STEREO(h->header)) { ma_dr_mp3_L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header); } else if (MA_DR_MP3_HDR_IS_MS_STEREO(h->header)) { ma_dr_mp3_L3_midside_stereo(s->grbuf[0], 576); } for (ch = 0; ch < nch; ch++, gr_info++) { int aa_bands = 31; int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h->header) == 2); if (gr_info->n_short_sfb) { aa_bands = n_long_bands - 1; ma_dr_mp3_L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb); } ma_dr_mp3_L3_antialias(s->grbuf[ch], aa_bands); ma_dr_mp3_L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands); ma_dr_mp3_L3_change_sign(s->grbuf[ch]); } } static void ma_dr_mp3d_DCT_II(float *grbuf, int n) { static const float g_sec[24] = { 10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f }; int i, k = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; k < n; k += 4) { ma_dr_mp3_f4 t[4][8], *x; float *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { ma_dr_mp3_f4 x0 = MA_DR_MP3_VLD(&y[i*18]); ma_dr_mp3_f4 x1 = MA_DR_MP3_VLD(&y[(15 - i)*18]); ma_dr_mp3_f4 x2 = MA_DR_MP3_VLD(&y[(16 + i)*18]); ma_dr_mp3_f4 x3 = MA_DR_MP3_VLD(&y[(31 - i)*18]); ma_dr_mp3_f4 t0 = MA_DR_MP3_VADD(x0, x3); ma_dr_mp3_f4 t1 = MA_DR_MP3_VADD(x1, x2); ma_dr_mp3_f4 t2 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x1, x2), g_sec[3*i + 0]); ma_dr_mp3_f4 t3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x3), g_sec[3*i + 1]); x[0] = MA_DR_MP3_VADD(t0, t1); x[8] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t0, t1), g_sec[3*i + 2]); x[16] = MA_DR_MP3_VADD(t3, t2); x[24] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t3, t2), g_sec[3*i + 2]); } for (x = t[0], i = 0; i < 4; i++, x += 8) { ma_dr_mp3_f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = MA_DR_MP3_VSUB(x0, x7); x0 = MA_DR_MP3_VADD(x0, x7); x7 = MA_DR_MP3_VSUB(x1, x6); x1 = MA_DR_MP3_VADD(x1, x6); x6 = MA_DR_MP3_VSUB(x2, x5); x2 = MA_DR_MP3_VADD(x2, x5); x5 = MA_DR_MP3_VSUB(x3, x4); x3 = MA_DR_MP3_VADD(x3, x4); x4 = MA_DR_MP3_VSUB(x0, x3); x0 = MA_DR_MP3_VADD(x0, x3); x3 = MA_DR_MP3_VSUB(x1, x2); x1 = MA_DR_MP3_VADD(x1, x2); x[0] = MA_DR_MP3_VADD(x0, x1); x[4] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x1), 0.70710677f); x5 = MA_DR_MP3_VADD(x5, x6); x6 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x6, x7), 0.70710677f); x7 = MA_DR_MP3_VADD(x7, xt); x3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x3, x4), 0.70710677f); x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f)); x7 = MA_DR_MP3_VADD(x7, MA_DR_MP3_VMUL_S(x5, 0.382683432f)); x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f)); x0 = MA_DR_MP3_VSUB(xt, x6); xt = MA_DR_MP3_VADD(xt, x6); x[1] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(xt, x7), 0.50979561f); x[2] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x4, x3), 0.54119611f); x[3] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x5), 0.60134488f); x[5] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x0, x5), 0.89997619f); x[6] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x4, x3), 1.30656302f); x[7] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(xt, x7), 2.56291556f); } if (k > n - 3) { #if MA_DR_MP3_HAVE_SSE #define MA_DR_MP3_VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v) #else #define MA_DR_MP3_VSAVE2(i, v) vst1_f32((float32_t *)&y[(i)*18], vget_low_f32(v)) #endif for (i = 0; i < 7; i++, y += 4*18) { ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]); MA_DR_MP3_VSAVE2(0, t[0][i]); MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][i], s)); MA_DR_MP3_VSAVE2(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1])); MA_DR_MP3_VSAVE2(3, MA_DR_MP3_VADD(t[2][1 + i], s)); } MA_DR_MP3_VSAVE2(0, t[0][7]); MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][7], t[3][7])); MA_DR_MP3_VSAVE2(2, t[1][7]); MA_DR_MP3_VSAVE2(3, t[3][7]); } else { #define MA_DR_MP3_VSAVE4(i, v) MA_DR_MP3_VSTORE(&y[(i)*18], v) for (i = 0; i < 7; i++, y += 4*18) { ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]); MA_DR_MP3_VSAVE4(0, t[0][i]); MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][i], s)); MA_DR_MP3_VSAVE4(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1])); MA_DR_MP3_VSAVE4(3, MA_DR_MP3_VADD(t[2][1 + i], s)); } MA_DR_MP3_VSAVE4(0, t[0][7]); MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][7], t[3][7])); MA_DR_MP3_VSAVE4(2, t[1][7]); MA_DR_MP3_VSAVE4(3, t[3][7]); } } else #endif #ifdef MA_DR_MP3_ONLY_SIMD {} #else for (; k < n; k++) { float t[4][8], *x, *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { float x0 = y[i*18]; float x1 = y[(15 - i)*18]; float x2 = y[(16 + i)*18]; float x3 = y[(31 - i)*18]; float t0 = x0 + x3; float t1 = x1 + x2; float t2 = (x1 - x2)*g_sec[3*i + 0]; float t3 = (x0 - x3)*g_sec[3*i + 1]; x[0] = t0 + t1; x[8] = (t0 - t1)*g_sec[3*i + 2]; x[16] = t3 + t2; x[24] = (t3 - t2)*g_sec[3*i + 2]; } for (x = t[0], i = 0; i < 4; i++, x += 8) { float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = x0 - x7; x0 += x7; x7 = x1 - x6; x1 += x6; x6 = x2 - x5; x2 += x5; x5 = x3 - x4; x3 += x4; x4 = x0 - x3; x0 += x3; x3 = x1 - x2; x1 += x2; x[0] = x0 + x1; x[4] = (x0 - x1)*0.70710677f; x5 = x5 + x6; x6 = (x6 + x7)*0.70710677f; x7 = x7 + xt; x3 = (x3 + x4)*0.70710677f; x5 -= x7*0.198912367f; x7 += x5*0.382683432f; x5 -= x7*0.198912367f; x0 = xt - x6; xt += x6; x[1] = (xt + x7)*0.50979561f; x[2] = (x4 + x3)*0.54119611f; x[3] = (x0 - x5)*0.60134488f; x[5] = (x0 + x5)*0.89997619f; x[6] = (x4 - x3)*1.30656302f; x[7] = (xt - x7)*2.56291556f; } for (i = 0; i < 7; i++, y += 4*18) { y[0*18] = t[0][i]; y[1*18] = t[2][i] + t[3][i] + t[3][i + 1]; y[2*18] = t[1][i] + t[1][i + 1]; y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1]; } y[0*18] = t[0][7]; y[1*18] = t[2][7] + t[3][7]; y[2*18] = t[1][7]; y[3*18] = t[3][7]; } #endif } #ifndef MA_DR_MP3_FLOAT_OUTPUT typedef ma_int16 ma_dr_mp3d_sample_t; static ma_int16 ma_dr_mp3d_scale_pcm(float sample) { ma_int16 s; #if MA_DR_MP3_HAVE_ARMV6 ma_int32 s32 = (ma_int32)(sample + .5f); s32 -= (s32 < 0); s = (ma_int16)ma_dr_mp3_clip_int16_arm(s32); #else if (sample >= 32766.5f) return (ma_int16) 32767; if (sample <= -32767.5f) return (ma_int16)-32768; s = (ma_int16)(sample + .5f); s -= (s < 0); #endif return s; } #else typedef float ma_dr_mp3d_sample_t; static float ma_dr_mp3d_scale_pcm(float sample) { return sample*(1.f/32768.f); } #endif static void ma_dr_mp3d_synth_pair(ma_dr_mp3d_sample_t *pcm, int nch, const float *z) { float a; a = (z[14*64] - z[ 0]) * 29; a += (z[ 1*64] + z[13*64]) * 213; a += (z[12*64] - z[ 2*64]) * 459; a += (z[ 3*64] + z[11*64]) * 2037; a += (z[10*64] - z[ 4*64]) * 5153; a += (z[ 5*64] + z[ 9*64]) * 6574; a += (z[ 8*64] - z[ 6*64]) * 37489; a += z[ 7*64] * 75038; pcm[0] = ma_dr_mp3d_scale_pcm(a); z += 2; a = z[14*64] * 104; a += z[12*64] * 1567; a += z[10*64] * 9727; a += z[ 8*64] * 64019; a += z[ 6*64] * -9975; a += z[ 4*64] * -45; a += z[ 2*64] * 146; a += z[ 0*64] * -5; pcm[16*nch] = ma_dr_mp3d_scale_pcm(a); } static void ma_dr_mp3d_synth(float *xl, ma_dr_mp3d_sample_t *dstl, int nch, float *lins) { int i; float *xr = xl + 576*(nch - 1); ma_dr_mp3d_sample_t *dstr = dstl + (nch - 1); static const float g_win[] = { -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992, -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856, -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630, -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313, -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908, -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415, -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835, -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169, -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420, -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590, -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679, -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692, -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629, -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494, -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290 }; float *zlin = lins + 15*64; const float *w = g_win; zlin[4*15] = xl[18*16]; zlin[4*15 + 1] = xr[18*16]; zlin[4*15 + 2] = xl[0]; zlin[4*15 + 3] = xr[0]; zlin[4*31] = xl[1 + 18*16]; zlin[4*31 + 1] = xr[1 + 18*16]; zlin[4*31 + 2] = xl[1]; zlin[4*31 + 3] = xr[1]; ma_dr_mp3d_synth_pair(dstr, nch, lins + 4*15 + 1); ma_dr_mp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1); ma_dr_mp3d_synth_pair(dstl, nch, lins + 4*15); ma_dr_mp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64); #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (i = 14; i >= 0; i--) { #define MA_DR_MP3_VLOAD(k) ma_dr_mp3_f4 w0 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 w1 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 vz = MA_DR_MP3_VLD(&zlin[4*i - 64*k]); ma_dr_mp3_f4 vy = MA_DR_MP3_VLD(&zlin[4*i - 64*(15 - k)]); #define MA_DR_MP3_V0(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0)) ; a = MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1)); } #define MA_DR_MP3_V1(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1))); } #define MA_DR_MP3_V2(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vy, w1), MA_DR_MP3_VMUL(vz, w0))); } ma_dr_mp3_f4 a, b; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*i + 64] = xl[1 + 18*(1 + i)]; zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)]; zlin[4*i - 64 + 2] = xl[18*(1 + i)]; zlin[4*i - 64 + 3] = xr[18*(1 + i)]; MA_DR_MP3_V0(0) MA_DR_MP3_V2(1) MA_DR_MP3_V1(2) MA_DR_MP3_V2(3) MA_DR_MP3_V1(4) MA_DR_MP3_V2(5) MA_DR_MP3_V1(6) MA_DR_MP3_V2(7) { #ifndef MA_DR_MP3_FLOAT_OUTPUT #if MA_DR_MP3_HAVE_SSE static const ma_dr_mp3_f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f }; static const ma_dr_mp3_f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f }; __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min))); dstr[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 1); dstr[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 5); dstl[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 0); dstl[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 4); dstr[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 3); dstr[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 7); dstl[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 2); dstl[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 6); #else int16x4_t pcma, pcmb; a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f)); b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0))))); vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1); vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1); vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0); vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0); vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3); vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3); vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2); vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2); #endif #else #if MA_DR_MP3_HAVE_SSE static const ma_dr_mp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f }; #else const ma_dr_mp3_f4 g_scale = vdupq_n_f32(1.0f/32768.0f); #endif a = MA_DR_MP3_VMUL(a, g_scale); b = MA_DR_MP3_VMUL(b, g_scale); #if MA_DR_MP3_HAVE_SSE _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2))); _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2))); #else vst1q_lane_f32(dstr + (15 - i)*nch, a, 1); vst1q_lane_f32(dstr + (17 + i)*nch, b, 1); vst1q_lane_f32(dstl + (15 - i)*nch, a, 0); vst1q_lane_f32(dstl + (17 + i)*nch, b, 0); vst1q_lane_f32(dstr + (47 - i)*nch, a, 3); vst1q_lane_f32(dstr + (49 + i)*nch, b, 3); vst1q_lane_f32(dstl + (47 - i)*nch, a, 2); vst1q_lane_f32(dstl + (49 + i)*nch, b, 2); #endif #endif } } else #endif #ifdef MA_DR_MP3_ONLY_SIMD {} #else for (i = 14; i >= 0; i--) { #define MA_DR_MP3_LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64]; #define MA_DR_MP3_S0(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] = vz[j]*w1 + vy[j]*w0, a[j] = vz[j]*w0 - vy[j]*w1; } #define MA_DR_MP3_S1(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; } #define MA_DR_MP3_S2(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; } float a[4], b[4]; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*(i + 16)] = xl[1 + 18*(1 + i)]; zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)]; zlin[4*(i - 16) + 2] = xl[18*(1 + i)]; zlin[4*(i - 16) + 3] = xr[18*(1 + i)]; MA_DR_MP3_S0(0) MA_DR_MP3_S2(1) MA_DR_MP3_S1(2) MA_DR_MP3_S2(3) MA_DR_MP3_S1(4) MA_DR_MP3_S2(5) MA_DR_MP3_S1(6) MA_DR_MP3_S2(7) dstr[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[1]); dstr[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[1]); dstl[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[0]); dstl[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[0]); dstr[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[3]); dstr[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[3]); dstl[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[2]); dstl[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[2]); } #endif } static void ma_dr_mp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, ma_dr_mp3d_sample_t *pcm, float *lins) { int i; for (i = 0; i < nch; i++) { ma_dr_mp3d_DCT_II(grbuf + 576*i, nbands); } MA_DR_MP3_COPY_MEMORY(lins, qmf_state, sizeof(float)*15*64); for (i = 0; i < nbands; i += 2) { ma_dr_mp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64); } #ifndef MA_DR_MP3_NONSTANDARD_BUT_LOGICAL if (nch == 1) { for (i = 0; i < 15*64; i += 2) { qmf_state[i] = lins[nbands*64 + i]; } } else #endif { MA_DR_MP3_COPY_MEMORY(qmf_state, lins + nbands*64, sizeof(float)*15*64); } } static int ma_dr_mp3d_match_frame(const ma_uint8 *hdr, int mp3_bytes, int frame_bytes) { int i, nmatch; for (i = 0, nmatch = 0; nmatch < MA_DR_MP3_MAX_FRAME_SYNC_MATCHES; nmatch++) { i += ma_dr_mp3_hdr_frame_bytes(hdr + i, frame_bytes) + ma_dr_mp3_hdr_padding(hdr + i); if (i + MA_DR_MP3_HDR_SIZE > mp3_bytes) return nmatch > 0; if (!ma_dr_mp3_hdr_compare(hdr, hdr + i)) return 0; } return 1; } static int ma_dr_mp3d_find_frame(const ma_uint8 *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes) { int i, k; for (i = 0; i < mp3_bytes - MA_DR_MP3_HDR_SIZE; i++, mp3++) { if (ma_dr_mp3_hdr_valid(mp3)) { int frame_bytes = ma_dr_mp3_hdr_frame_bytes(mp3, *free_format_bytes); int frame_and_padding = frame_bytes + ma_dr_mp3_hdr_padding(mp3); for (k = MA_DR_MP3_HDR_SIZE; !frame_bytes && k < MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - MA_DR_MP3_HDR_SIZE; k++) { if (ma_dr_mp3_hdr_compare(mp3, mp3 + k)) { int fb = k - ma_dr_mp3_hdr_padding(mp3); int nextfb = fb + ma_dr_mp3_hdr_padding(mp3 + k); if (i + k + nextfb + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + k + nextfb)) continue; frame_and_padding = k; frame_bytes = fb; *free_format_bytes = fb; } } if ((frame_bytes && i + frame_and_padding <= mp3_bytes && ma_dr_mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) || (!i && frame_and_padding == mp3_bytes)) { *ptr_frame_bytes = frame_and_padding; return i; } *free_format_bytes = 0; } } *ptr_frame_bytes = 0; return mp3_bytes; } MA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec) { dec->header[0] = 0; } MA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info) { int i = 0, igr, frame_size = 0, success = 1; const ma_uint8 *hdr; ma_dr_mp3_bs bs_frame[1]; ma_dr_mp3dec_scratch scratch; if (mp3_bytes > 4 && dec->header[0] == 0xff && ma_dr_mp3_hdr_compare(dec->header, mp3)) { frame_size = ma_dr_mp3_hdr_frame_bytes(mp3, dec->free_format_bytes) + ma_dr_mp3_hdr_padding(mp3); if (frame_size != mp3_bytes && (frame_size + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + frame_size))) { frame_size = 0; } } if (!frame_size) { MA_DR_MP3_ZERO_MEMORY(dec, sizeof(ma_dr_mp3dec)); i = ma_dr_mp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size); if (!frame_size || i + frame_size > mp3_bytes) { info->frame_bytes = i; return 0; } } hdr = mp3 + i; MA_DR_MP3_COPY_MEMORY(dec->header, hdr, MA_DR_MP3_HDR_SIZE); info->frame_bytes = i + frame_size; info->channels = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2; info->hz = ma_dr_mp3_hdr_sample_rate_hz(hdr); info->layer = 4 - MA_DR_MP3_HDR_GET_LAYER(hdr); info->bitrate_kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr); ma_dr_mp3_bs_init(bs_frame, hdr + MA_DR_MP3_HDR_SIZE, frame_size - MA_DR_MP3_HDR_SIZE); if (MA_DR_MP3_HDR_IS_CRC(hdr)) { ma_dr_mp3_bs_get_bits(bs_frame, 16); } if (info->layer == 3) { int main_data_begin = ma_dr_mp3_L3_read_side_info(bs_frame, scratch.gr_info, hdr); if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit) { ma_dr_mp3dec_init(dec); return 0; } success = ma_dr_mp3_L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin); if (success && pcm != NULL) { for (igr = 0; igr < (MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*576*info->channels)) { MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); ma_dr_mp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels); ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]); } } ma_dr_mp3_L3_save_reservoir(dec, &scratch); } else { #ifdef MA_DR_MP3_ONLY_MP3 return 0; #else ma_dr_mp3_L12_scale_info sci[1]; if (pcm == NULL) { return ma_dr_mp3_hdr_frame_samples(hdr); } ma_dr_mp3_L12_read_scale_info(hdr, bs_frame, sci); MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); for (i = 0, igr = 0; igr < 3; igr++) { if (12 == (i += ma_dr_mp3_L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1))) { i = 0; ma_dr_mp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]); ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]); MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*384*info->channels); } if (bs_frame->pos > bs_frame->limit) { ma_dr_mp3dec_init(dec); return 0; } } #endif } return success*ma_dr_mp3_hdr_frame_samples(dec->header); } MA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples) { size_t i = 0; #if MA_DR_MP3_HAVE_SIMD size_t aligned_count = num_samples & ~7; for(; i < aligned_count; i+=8) { ma_dr_mp3_f4 scale = MA_DR_MP3_VSET(32768.0f); ma_dr_mp3_f4 a = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i ]), scale); ma_dr_mp3_f4 b = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i+4]), scale); #if MA_DR_MP3_HAVE_SSE ma_dr_mp3_f4 s16max = MA_DR_MP3_VSET( 32767.0f); ma_dr_mp3_f4 s16min = MA_DR_MP3_VSET(-32768.0f); __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, s16max), s16min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, s16max), s16min))); out[i ] = (ma_int16)_mm_extract_epi16(pcm8, 0); out[i+1] = (ma_int16)_mm_extract_epi16(pcm8, 1); out[i+2] = (ma_int16)_mm_extract_epi16(pcm8, 2); out[i+3] = (ma_int16)_mm_extract_epi16(pcm8, 3); out[i+4] = (ma_int16)_mm_extract_epi16(pcm8, 4); out[i+5] = (ma_int16)_mm_extract_epi16(pcm8, 5); out[i+6] = (ma_int16)_mm_extract_epi16(pcm8, 6); out[i+7] = (ma_int16)_mm_extract_epi16(pcm8, 7); #else int16x4_t pcma, pcmb; a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f)); b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0))))); vst1_lane_s16(out+i , pcma, 0); vst1_lane_s16(out+i+1, pcma, 1); vst1_lane_s16(out+i+2, pcma, 2); vst1_lane_s16(out+i+3, pcma, 3); vst1_lane_s16(out+i+4, pcmb, 0); vst1_lane_s16(out+i+5, pcmb, 1); vst1_lane_s16(out+i+6, pcmb, 2); vst1_lane_s16(out+i+7, pcmb, 3); #endif } #endif for(; i < num_samples; i++) { float sample = in[i] * 32768.0f; if (sample >= 32766.5f) out[i] = (ma_int16) 32767; else if (sample <= -32767.5f) out[i] = (ma_int16)-32768; else { short s = (ma_int16)(sample + .5f); s -= (s < 0); out[i] = s; } } } #ifndef MA_DR_MP3_SEEK_LEADING_MP3_FRAMES #define MA_DR_MP3_SEEK_LEADING_MP3_FRAMES 2 #endif #define MA_DR_MP3_MIN_DATA_CHUNK_SIZE 16384 #ifndef MA_DR_MP3_DATA_CHUNK_SIZE #define MA_DR_MP3_DATA_CHUNK_SIZE (MA_DR_MP3_MIN_DATA_CHUNK_SIZE*4) #endif #define MA_DR_MP3_COUNTOF(x) (sizeof(x) / sizeof(x[0])) #define MA_DR_MP3_CLAMP(x, lo, hi) (MA_DR_MP3_MAX(lo, MA_DR_MP3_MIN(x, hi))) #ifndef MA_DR_MP3_PI_D #define MA_DR_MP3_PI_D 3.14159265358979323846264 #endif #define MA_DR_MP3_DEFAULT_RESAMPLER_LPF_ORDER 2 static MA_INLINE float ma_dr_mp3_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static MA_INLINE float ma_dr_mp3_mix_f32_fast(float x, float y, float a) { float r0 = (y - x); float r1 = r0*a; return x + r1; } static MA_INLINE ma_uint32 ma_dr_mp3_gcf_u32(ma_uint32 a, ma_uint32 b) { for (;;) { if (b == 0) { break; } else { ma_uint32 t = a; a = b; b = t % a; } } return a; } static void* ma_dr_mp3__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_MP3_MALLOC(sz); } static void* ma_dr_mp3__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_MP3_REALLOC(p, sz); } static void ma_dr_mp3__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_MP3_FREE(p); } static void* ma_dr_mp3__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* ma_dr_mp3__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_MP3_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void ma_dr_mp3__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static ma_allocation_callbacks ma_dr_mp3_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return *pAllocationCallbacks; } else { ma_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_mp3__malloc_default; allocationCallbacks.onRealloc = ma_dr_mp3__realloc_default; allocationCallbacks.onFree = ma_dr_mp3__free_default; return allocationCallbacks; } } static size_t ma_dr_mp3__on_read(ma_dr_mp3* pMP3, void* pBufferOut, size_t bytesToRead) { size_t bytesRead = pMP3->onRead(pMP3->pUserData, pBufferOut, bytesToRead); pMP3->streamCursor += bytesRead; return bytesRead; } static ma_bool32 ma_dr_mp3__on_seek(ma_dr_mp3* pMP3, int offset, ma_dr_mp3_seek_origin origin) { MA_DR_MP3_ASSERT(offset >= 0); if (!pMP3->onSeek(pMP3->pUserData, offset, origin)) { return MA_FALSE; } if (origin == ma_dr_mp3_seek_origin_start) { pMP3->streamCursor = (ma_uint64)offset; } else { pMP3->streamCursor += offset; } return MA_TRUE; } static ma_bool32 ma_dr_mp3__on_seek_64(ma_dr_mp3* pMP3, ma_uint64 offset, ma_dr_mp3_seek_origin origin) { if (offset <= 0x7FFFFFFF) { return ma_dr_mp3__on_seek(pMP3, (int)offset, origin); } if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } offset -= 0x7FFFFFFF; while (offset > 0) { if (offset <= 0x7FFFFFFF) { if (!ma_dr_mp3__on_seek(pMP3, (int)offset, ma_dr_mp3_seek_origin_current)) { return MA_FALSE; } offset = 0; } else { if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_current)) { return MA_FALSE; } offset -= 0x7FFFFFFF; } } return MA_TRUE; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex__callbacks(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { ma_uint32 pcmFramesRead = 0; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onRead != NULL); if (pMP3->atEnd) { return 0; } for (;;) { ma_dr_mp3dec_frame_info info; if (pMP3->dataSize < MA_DR_MP3_MIN_DATA_CHUNK_SIZE) { size_t bytesRead; if (pMP3->pData != NULL) { MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); } pMP3->dataConsumed = 0; if (pMP3->dataCapacity < MA_DR_MP3_DATA_CHUNK_SIZE) { ma_uint8* pNewData; size_t newDataCap; newDataCap = MA_DR_MP3_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { if (pMP3->dataSize == 0) { pMP3->atEnd = MA_TRUE; return 0; } } pMP3->dataSize += bytesRead; } if (pMP3->dataSize > INT_MAX) { pMP3->atEnd = MA_TRUE; return 0; } MA_DR_MP3_ASSERT(pMP3->pData != NULL); MA_DR_MP3_ASSERT(pMP3->dataCapacity > 0); if (pMP3->pData == NULL) { return 0; } pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info); if (info.frame_bytes > 0) { pMP3->dataConsumed += (size_t)info.frame_bytes; pMP3->dataSize -= (size_t)info.frame_bytes; } if (pcmFramesRead > 0) { pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes == 0) { size_t bytesRead; MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); pMP3->dataConsumed = 0; if (pMP3->dataCapacity == pMP3->dataSize) { ma_uint8* pNewData; size_t newDataCap; newDataCap = pMP3->dataCapacity + MA_DR_MP3_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { pMP3->atEnd = MA_TRUE; return 0; } pMP3->dataSize += bytesRead; } }; return pcmFramesRead; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex__memory(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { ma_uint32 pcmFramesRead = 0; ma_dr_mp3dec_frame_info info; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->memory.pData != NULL); if (pMP3->atEnd) { return 0; } for (;;) { pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->memory.pData + pMP3->memory.currentReadPos, (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos), pPCMFrames, &info); if (pcmFramesRead > 0) { pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes > 0) { pMP3->memory.currentReadPos += (size_t)info.frame_bytes; } else { break; } } pMP3->memory.currentReadPos += (size_t)info.frame_bytes; return pcmFramesRead; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { if (pMP3->memory.pData != NULL && pMP3->memory.dataSize > 0) { return ma_dr_mp3_decode_next_frame_ex__memory(pMP3, pPCMFrames); } else { return ma_dr_mp3_decode_next_frame_ex__callbacks(pMP3, pPCMFrames); } } static ma_uint32 ma_dr_mp3_decode_next_frame(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); return ma_dr_mp3_decode_next_frame_ex(pMP3, (ma_dr_mp3d_sample_t*)pMP3->pcmFrames); } #if 0 static ma_uint32 ma_dr_mp3_seek_next_frame(ma_dr_mp3* pMP3) { ma_uint32 pcmFrameCount; MA_DR_MP3_ASSERT(pMP3 != NULL); pcmFrameCount = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFrameCount == 0) { return 0; } pMP3->currentPCMFrame += pcmFrameCount; pMP3->pcmFramesConsumedInMP3Frame = pcmFrameCount; pMP3->pcmFramesRemainingInMP3Frame = 0; return pcmFrameCount; } #endif static ma_bool32 ma_dr_mp3_init_internal(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(onRead != NULL); ma_dr_mp3dec_init(&pMP3->decoder); pMP3->onRead = onRead; pMP3->onSeek = onSeek; pMP3->pUserData = pUserData; pMP3->allocationCallbacks = ma_dr_mp3_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pMP3->allocationCallbacks.onFree == NULL || (pMP3->allocationCallbacks.onMalloc == NULL && pMP3->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } if (ma_dr_mp3_decode_next_frame(pMP3) == 0) { ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); return MA_FALSE; } pMP3->channels = pMP3->mp3FrameChannels; pMP3->sampleRate = pMP3->mp3FrameSampleRate; return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL || onRead == NULL) { return MA_FALSE; } MA_DR_MP3_ZERO_OBJECT(pMP3); return ma_dr_mp3_init_internal(pMP3, onRead, onSeek, pUserData, pAllocationCallbacks); } static size_t ma_dr_mp3__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData; size_t bytesRemaining; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->memory.dataSize >= pMP3->memory.currentReadPos); bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_MP3_COPY_MEMORY(pBufferOut, pMP3->memory.pData + pMP3->memory.currentReadPos, bytesToRead); pMP3->memory.currentReadPos += bytesToRead; } return bytesToRead; } static ma_bool32 ma_dr_mp3__on_seek_memory(void* pUserData, int byteOffset, ma_dr_mp3_seek_origin origin) { ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData; MA_DR_MP3_ASSERT(pMP3 != NULL); if (origin == ma_dr_mp3_seek_origin_current) { if (byteOffset > 0) { if (pMP3->memory.currentReadPos + byteOffset > pMP3->memory.dataSize) { byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos); } } else { if (pMP3->memory.currentReadPos < (size_t)-byteOffset) { byteOffset = -(int)pMP3->memory.currentReadPos; } } pMP3->memory.currentReadPos += byteOffset; } else { if ((ma_uint32)byteOffset <= pMP3->memory.dataSize) { pMP3->memory.currentReadPos = byteOffset; } else { pMP3->memory.currentReadPos = pMP3->memory.dataSize; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL) { return MA_FALSE; } MA_DR_MP3_ZERO_OBJECT(pMP3); if (pData == NULL || dataSize == 0) { return MA_FALSE; } pMP3->memory.pData = (const ma_uint8*)pData; pMP3->memory.dataSize = dataSize; pMP3->memory.currentReadPos = 0; return ma_dr_mp3_init_internal(pMP3, ma_dr_mp3__on_read_memory, ma_dr_mp3__on_seek_memory, pMP3, pAllocationCallbacks); } #ifndef MA_DR_MP3_NO_STDIO #include #include static size_t ma_dr_mp3__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } static ma_bool32 ma_dr_mp3__on_seek_stdio(void* pUserData, int offset, ma_dr_mp3_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == ma_dr_mp3_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; FILE* pFile; if (ma_fopen(&pFile, pFilePath, "rb") != MA_SUCCESS) { return MA_FALSE; } result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; FILE* pFile; if (ma_wfopen(&pFile, pFilePath, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } #endif MA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3) { if (pMP3 == NULL) { return; } #ifndef MA_DR_MP3_NO_STDIO if (pMP3->onRead == ma_dr_mp3__on_read_stdio) { FILE* pFile = (FILE*)pMP3->pUserData; if (pFile != NULL) { fclose(pFile); pMP3->pUserData = NULL; } } #endif ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); } #if defined(MA_DR_MP3_FLOAT_OUTPUT) static void ma_dr_mp3_f32_to_s16(ma_int16* dst, const float* src, ma_uint64 sampleCount) { ma_uint64 i; ma_uint64 i4; ma_uint64 sampleCount4; i = 0; sampleCount4 = sampleCount >> 2; for (i4 = 0; i4 < sampleCount4; i4 += 1) { float x0 = src[i+0]; float x1 = src[i+1]; float x2 = src[i+2]; float x3 = src[i+3]; x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0)); x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1)); x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2)); x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3)); x0 = x0 * 32767.0f; x1 = x1 * 32767.0f; x2 = x2 * 32767.0f; x3 = x3 * 32767.0f; dst[i+0] = (ma_int16)x0; dst[i+1] = (ma_int16)x1; dst[i+2] = (ma_int16)x2; dst[i+3] = (ma_int16)x3; i += 4; } for (; i < sampleCount; i += 1) { float x = src[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); x = x * 32767.0f; dst[i] = (ma_int16)x; } } #endif #if !defined(MA_DR_MP3_FLOAT_OUTPUT) static void ma_dr_mp3_s16_to_f32(float* dst, const ma_int16* src, ma_uint64 sampleCount) { ma_uint64 i; for (i = 0; i < sampleCount; i += 1) { float x = (float)src[i]; x = x * 0.000030517578125f; dst[i] = x; } } #endif static ma_uint64 ma_dr_mp3_read_pcm_frames_raw(ma_dr_mp3* pMP3, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 totalFramesRead = 0; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onRead != NULL); while (framesToRead > 0) { ma_uint32 framesToConsume = (ma_uint32)MA_DR_MP3_MIN(pMP3->pcmFramesRemainingInMP3Frame, framesToRead); if (pBufferOut != NULL) { #if defined(MA_DR_MP3_FLOAT_OUTPUT) float* pFramesOutF32 = (float*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalFramesRead * pMP3->channels); float* pFramesInF32 = (float*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(float) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); MA_DR_MP3_COPY_MEMORY(pFramesOutF32, pFramesInF32, sizeof(float) * framesToConsume * pMP3->channels); #else ma_int16* pFramesOutS16 = (ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(ma_int16) * totalFramesRead * pMP3->channels); ma_int16* pFramesInS16 = (ma_int16*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(ma_int16) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); MA_DR_MP3_COPY_MEMORY(pFramesOutS16, pFramesInS16, sizeof(ma_int16) * framesToConsume * pMP3->channels); #endif } pMP3->currentPCMFrame += framesToConsume; pMP3->pcmFramesConsumedInMP3Frame += framesToConsume; pMP3->pcmFramesRemainingInMP3Frame -= framesToConsume; totalFramesRead += framesToConsume; framesToRead -= framesToConsume; if (framesToRead == 0) { break; } MA_DR_MP3_ASSERT(pMP3->pcmFramesRemainingInMP3Frame == 0); if (ma_dr_mp3_decode_next_frame(pMP3) == 0) { break; } } return totalFramesRead; } MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if defined(MA_DR_MP3_FLOAT_OUTPUT) return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else { ma_int16 pTempS16[8192]; ma_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { ma_uint64 framesJustRead; ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead; ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempS16) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempS16); if (framesJustRead == 0) { break; } ma_dr_mp3_s16_to_f32((float*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if !defined(MA_DR_MP3_FLOAT_OUTPUT) return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else { float pTempF32[4096]; ma_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { ma_uint64 framesJustRead; ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead; ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempF32) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempF32); if (framesJustRead == 0) { break; } ma_dr_mp3_f32_to_s16((ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(ma_int16) * totalPCMFramesRead * pMP3->channels), pTempF32, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } static void ma_dr_mp3_reset(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = 0; pMP3->currentPCMFrame = 0; pMP3->dataSize = 0; pMP3->atEnd = MA_FALSE; ma_dr_mp3dec_init(&pMP3->decoder); } static ma_bool32 ma_dr_mp3_seek_to_start_of_stream(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onSeek != NULL); if (!ma_dr_mp3__on_seek(pMP3, 0, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } ma_dr_mp3_reset(pMP3); return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameOffset) { ma_uint64 framesRead; #if defined(MA_DR_MP3_FLOAT_OUTPUT) framesRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); #else framesRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, frameOffset, NULL); #endif if (framesRead != frameOffset) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_to_pcm_frame__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { MA_DR_MP3_ASSERT(pMP3 != NULL); if (frameIndex == pMP3->currentPCMFrame) { return MA_TRUE; } if (frameIndex < pMP3->currentPCMFrame) { if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } } MA_DR_MP3_ASSERT(frameIndex >= pMP3->currentPCMFrame); return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, (frameIndex - pMP3->currentPCMFrame)); } static ma_bool32 ma_dr_mp3_find_closest_seek_point(ma_dr_mp3* pMP3, ma_uint64 frameIndex, ma_uint32* pSeekPointIndex) { ma_uint32 iSeekPoint; MA_DR_MP3_ASSERT(pSeekPointIndex != NULL); *pSeekPointIndex = 0; if (frameIndex < pMP3->pSeekPoints[0].pcmFrameIndex) { return MA_FALSE; } for (iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) { if (pMP3->pSeekPoints[iSeekPoint].pcmFrameIndex > frameIndex) { break; } *pSeekPointIndex = iSeekPoint; } return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_to_pcm_frame__seek_table(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { ma_dr_mp3_seek_point seekPoint; ma_uint32 priorSeekPointIndex; ma_uint16 iMP3Frame; ma_uint64 leftoverFrames; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->pSeekPoints != NULL); MA_DR_MP3_ASSERT(pMP3->seekPointCount > 0); if (ma_dr_mp3_find_closest_seek_point(pMP3, frameIndex, &priorSeekPointIndex)) { seekPoint = pMP3->pSeekPoints[priorSeekPointIndex]; } else { seekPoint.seekPosInBytes = 0; seekPoint.pcmFrameIndex = 0; seekPoint.mp3FramesToDiscard = 0; seekPoint.pcmFramesToDiscard = 0; } if (!ma_dr_mp3__on_seek_64(pMP3, seekPoint.seekPosInBytes, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } ma_dr_mp3_reset(pMP3); for (iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) { ma_uint32 pcmFramesRead; ma_dr_mp3d_sample_t* pPCMFrames; pPCMFrames = NULL; if (iMP3Frame == seekPoint.mp3FramesToDiscard-1) { pPCMFrames = (ma_dr_mp3d_sample_t*)pMP3->pcmFrames; } pcmFramesRead = ma_dr_mp3_decode_next_frame_ex(pMP3, pPCMFrames); if (pcmFramesRead == 0) { return MA_FALSE; } } pMP3->currentPCMFrame = seekPoint.pcmFrameIndex - seekPoint.pcmFramesToDiscard; leftoverFrames = frameIndex - pMP3->currentPCMFrame; return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, leftoverFrames); } MA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { if (pMP3 == NULL || pMP3->onSeek == NULL) { return MA_FALSE; } if (frameIndex == 0) { return ma_dr_mp3_seek_to_start_of_stream(pMP3); } if (pMP3->pSeekPoints != NULL && pMP3->seekPointCount > 0) { return ma_dr_mp3_seek_to_pcm_frame__seek_table(pMP3, frameIndex); } else { return ma_dr_mp3_seek_to_pcm_frame__brute_force(pMP3, frameIndex); } } MA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount) { ma_uint64 currentPCMFrame; ma_uint64 totalPCMFrameCount; ma_uint64 totalMP3FrameCount; if (pMP3 == NULL) { return MA_FALSE; } if (pMP3->onSeek == NULL) { return MA_FALSE; } currentPCMFrame = pMP3->currentPCMFrame; if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } totalPCMFrameCount = 0; totalMP3FrameCount = 0; for (;;) { ma_uint32 pcmFramesInCurrentMP3Frame; pcmFramesInCurrentMP3Frame = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3Frame == 0) { break; } totalPCMFrameCount += pcmFramesInCurrentMP3Frame; totalMP3FrameCount += 1; } if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return MA_FALSE; } if (pMP3FrameCount != NULL) { *pMP3FrameCount = totalMP3FrameCount; } if (pPCMFrameCount != NULL) { *pPCMFrameCount = totalPCMFrameCount; } return MA_TRUE; } MA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3) { ma_uint64 totalPCMFrameCount; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, NULL, &totalPCMFrameCount)) { return 0; } return totalPCMFrameCount; } MA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3) { ma_uint64 totalMP3FrameCount; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, NULL)) { return 0; } return totalMP3FrameCount; } static void ma_dr_mp3__accumulate_running_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint32 pcmFrameCountIn, ma_uint64* pRunningPCMFrameCount, float* pRunningPCMFrameCountFractionalPart) { float srcRatio; float pcmFrameCountOutF; ma_uint32 pcmFrameCountOut; srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; MA_DR_MP3_ASSERT(srcRatio > 0); pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio); pcmFrameCountOut = (ma_uint32)pcmFrameCountOutF; *pRunningPCMFrameCountFractionalPart = pcmFrameCountOutF - pcmFrameCountOut; *pRunningPCMFrameCount += pcmFrameCountOut; } typedef struct { ma_uint64 bytePos; ma_uint64 pcmFrameIndex; } ma_dr_mp3__seeking_mp3_frame_info; MA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints) { ma_uint32 seekPointCount; ma_uint64 currentPCMFrame; ma_uint64 totalMP3FrameCount; ma_uint64 totalPCMFrameCount; if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) { return MA_FALSE; } seekPointCount = *pSeekPointCount; if (seekPointCount == 0) { return MA_FALSE; } currentPCMFrame = pMP3->currentPCMFrame; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, &totalPCMFrameCount)) { return MA_FALSE; } if (totalMP3FrameCount < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1) { seekPointCount = 1; pSeekPoints[0].seekPosInBytes = 0; pSeekPoints[0].pcmFrameIndex = 0; pSeekPoints[0].mp3FramesToDiscard = 0; pSeekPoints[0].pcmFramesToDiscard = 0; } else { ma_uint64 pcmFramesBetweenSeekPoints; ma_dr_mp3__seeking_mp3_frame_info mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1]; ma_uint64 runningPCMFrameCount = 0; float runningPCMFrameCountFractionalPart = 0; ma_uint64 nextTargetPCMFrame; ma_uint32 iMP3Frame; ma_uint32 iSeekPoint; if (seekPointCount > totalMP3FrameCount-1) { seekPointCount = (ma_uint32)totalMP3FrameCount-1; } pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1); if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } for (iMP3Frame = 0; iMP3Frame < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) { ma_uint32 pcmFramesInCurrentMP3FrameIn; MA_DR_MP3_ASSERT(pMP3->streamCursor >= pMP3->dataSize); mp3FrameInfo[iMP3Frame].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[iMP3Frame].pcmFrameIndex = runningPCMFrameCount; pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { return MA_FALSE; } ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } nextTargetPCMFrame = 0; for (iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) { nextTargetPCMFrame += pcmFramesBetweenSeekPoints; for (;;) { if (nextTargetPCMFrame < runningPCMFrameCount) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } else { size_t i; ma_uint32 pcmFramesInCurrentMP3FrameIn; for (i = 0; i < MA_DR_MP3_COUNTOF(mp3FrameInfo)-1; ++i) { mp3FrameInfo[i] = mp3FrameInfo[i+1]; } mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].pcmFrameIndex = runningPCMFrameCount; pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } } } if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return MA_FALSE; } } *pSeekPointCount = seekPointCount; return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints) { if (pMP3 == NULL) { return MA_FALSE; } if (seekPointCount == 0 || pSeekPoints == NULL) { pMP3->seekPointCount = 0; pMP3->pSeekPoints = NULL; } else { pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; } return MA_TRUE; } static float* ma_dr_mp3__full_read_and_close_f32(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount) { ma_uint64 totalFramesRead = 0; ma_uint64 framesCapacity = 0; float* pFrames = NULL; float temp[4096]; MA_DR_MP3_ASSERT(pMP3 != NULL); for (;;) { ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels; ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } if (framesCapacity < totalFramesRead + framesJustRead) { ma_uint64 oldFramesBufferSize; ma_uint64 newFramesBufferSize; ma_uint64 newFramesCap; float* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(float); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(float); if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) { break; } pNewFrames = (float*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(float))); totalFramesRead += framesJustRead; if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } ma_dr_mp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } static ma_int16* ma_dr_mp3__full_read_and_close_s16(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount) { ma_uint64 totalFramesRead = 0; ma_uint64 framesCapacity = 0; ma_int16* pFrames = NULL; ma_int16 temp[4096]; MA_DR_MP3_ASSERT(pMP3 != NULL); for (;;) { ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels; ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } if (framesCapacity < totalFramesRead + framesJustRead) { ma_uint64 newFramesBufferSize; ma_uint64 oldFramesBufferSize; ma_uint64 newFramesCap; ma_int16* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(ma_int16); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(ma_int16); if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) { break; } pNewFrames = (ma_int16*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(ma_int16))); totalFramesRead += framesJustRead; if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } ma_dr_mp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } MA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } MA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #ifndef MA_DR_MP3_NO_STDIO MA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #endif MA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return ma_dr_mp3__malloc_from_callbacks(sz, pAllocationCallbacks); } else { return ma_dr_mp3__malloc_default(sz, NULL); } } MA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_mp3__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_mp3__free_default(p, NULL); } } #endif /* dr_mp3_c end */ #endif /* MA_DR_MP3_IMPLEMENTATION */ #endif /* MA_NO_MP3 */ /* End globally disabled warnings. */ #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* miniaudio_c */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ miniaudio-0.11.22/extras/miniaudio_split/miniaudio.h000066400000000000000000013231261475701111600224740ustar00rootroot00000000000000/* Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file. miniaudio - v0.11.22 - 2025-02-24 David Reid - mackron@gmail.com Website: https://miniaud.io Documentation: https://miniaud.io/docs GitHub: https://github.com/mackron/miniaudio */ #ifndef miniaudio_h #define miniaudio_h #ifdef __cplusplus extern "C" { #endif #define MA_STRINGIFY(x) #x #define MA_XSTRINGIFY(x) MA_STRINGIFY(x) #define MA_VERSION_MAJOR 0 #define MA_VERSION_MINOR 11 #define MA_VERSION_REVISION 22 #define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION) #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #pragma warning(disable:4214) /* nonstandard extension used: bit field types other than int */ #pragma warning(disable:4324) /* structure was padded due to alignment specifier */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__) || defined(__ppc64__) #define MA_SIZEOF_PTR 8 #else #define MA_SIZEOF_PTR 4 #endif #include /* For size_t. */ /* Sized types. */ #if defined(MA_USE_STDINT) #include typedef int8_t ma_int8; typedef uint8_t ma_uint8; typedef int16_t ma_int16; typedef uint16_t ma_uint16; typedef int32_t ma_int32; typedef uint32_t ma_uint32; typedef int64_t ma_int64; typedef uint64_t ma_uint64; #else typedef signed char ma_int8; typedef unsigned char ma_uint8; typedef signed short ma_int16; typedef unsigned short ma_uint16; typedef signed int ma_int32; typedef unsigned int ma_uint32; #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 ma_int64; typedef unsigned __int64 ma_uint64; #else #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef signed long long ma_int64; typedef unsigned long long ma_uint64; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif #endif /* MA_USE_STDINT */ #if MA_SIZEOF_PTR == 8 typedef ma_uint64 ma_uintptr; #else typedef ma_uint32 ma_uintptr; #endif typedef ma_uint8 ma_bool8; typedef ma_uint32 ma_bool32; #define MA_TRUE 1 #define MA_FALSE 0 /* These float types are not used universally by miniaudio. It's to simplify some macro expansion for atomic types. */ typedef float ma_float; typedef double ma_double; typedef void* ma_handle; typedef void* ma_ptr; /* ma_proc is annoying because when compiling with GCC we get pedantic warnings about converting between `void*` and `void (*)()`. We can't use `void (*)()` with MSVC however, because we'll get warning C4191 about "type cast between incompatible function types". To work around this I'm going to use a different data type depending on the compiler. */ #if defined(__GNUC__) typedef void (*ma_proc)(void); #else typedef void* ma_proc; #endif #if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED) typedef ma_uint16 wchar_t; #endif /* Define NULL for some compilers. */ #ifndef NULL #define NULL 0 #endif #if defined(SIZE_MAX) #define MA_SIZE_MAX SIZE_MAX #else #define MA_SIZE_MAX 0xFFFFFFFF /* When SIZE_MAX is not defined by the standard library just default to the maximum 32-bit unsigned integer. */ #endif /* Platform/backend detection. */ #if defined(_WIN32) || defined(__COSMOPOLITAN__) #define MA_WIN32 #if defined(MA_FORCE_UWP) || (defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || (defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP))) #define MA_WIN32_UWP #elif defined(WINAPI_FAMILY) && (defined(WINAPI_FAMILY_GAMES) && WINAPI_FAMILY == WINAPI_FAMILY_GAMES) #define MA_WIN32_GDK #else #define MA_WIN32_DESKTOP #endif #endif #if !defined(_WIN32) /* If it's not Win32, assume POSIX. */ #define MA_POSIX /* Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented. You can use this to avoid including pthread.h in the header section. The downside is that it results in some fixed sized structures being declared for the various types that are used in miniaudio. The risk here is that these types might be too small for a given platform. This risk is yours to take and no support will be offered if you enable this option. */ #ifndef MA_NO_PTHREAD_IN_HEADER #include /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */ typedef pthread_t ma_pthread_t; typedef pthread_mutex_t ma_pthread_mutex_t; typedef pthread_cond_t ma_pthread_cond_t; #else typedef ma_uintptr ma_pthread_t; typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t; typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t; #endif #if defined(__unix__) #define MA_UNIX #endif #if defined(__linux__) #define MA_LINUX #endif #if defined(__APPLE__) #define MA_APPLE #endif #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define MA_BSD #endif #if defined(__ANDROID__) #define MA_ANDROID #endif #if defined(__EMSCRIPTEN__) #define MA_EMSCRIPTEN #endif #if defined(__ORBIS__) #define MA_ORBIS #endif #if defined(__PROSPERO__) #define MA_PROSPERO #endif #if defined(__NX__) #define MA_NX #endif #if defined(__BEOS__) || defined(__HAIKU__) #define MA_BEOS #endif #if defined(__HAIKU__) #define MA_HAIKU #endif #endif #if defined(__has_c_attribute) #if __has_c_attribute(fallthrough) #define MA_FALLTHROUGH [[fallthrough]] #endif #endif #if !defined(MA_FALLTHROUGH) && defined(__has_attribute) && (defined(__clang__) || defined(__GNUC__)) #if __has_attribute(fallthrough) #define MA_FALLTHROUGH __attribute__((fallthrough)) #endif #endif #if !defined(MA_FALLTHROUGH) #define MA_FALLTHROUGH ((void)0) #endif #ifdef _MSC_VER #define MA_INLINE __forceinline /* noinline was introduced in Visual Studio 2005. */ #if _MSC_VER >= 1400 #define MA_NO_INLINE __declspec(noinline) #else #define MA_NO_INLINE #endif #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when the __attribute__((always_inline)) attribute is defined without an "inline" statement. I think therefore there must be some case where "__inline__" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the command line, we cannot use the "inline" keyword and instead need to use "__inline__". In an attempt to work around this issue I am using "__inline__" only when we're compiling in strict ANSI mode. */ #if defined(__STRICT_ANSI__) #define MA_GNUC_INLINE_HINT __inline__ #else #define MA_GNUC_INLINE_HINT inline #endif #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__) #define MA_INLINE MA_GNUC_INLINE_HINT __attribute__((always_inline)) #define MA_NO_INLINE __attribute__((noinline)) #else #define MA_INLINE MA_GNUC_INLINE_HINT #define MA_NO_INLINE __attribute__((noinline)) #endif #elif defined(__WATCOMC__) #define MA_INLINE __inline #define MA_NO_INLINE #else #define MA_INLINE #define MA_NO_INLINE #endif /* MA_DLL is not officially supported. You're on your own if you want to use this. */ #if defined(MA_DLL) #if defined(_WIN32) #define MA_DLL_IMPORT __declspec(dllimport) #define MA_DLL_EXPORT __declspec(dllexport) #define MA_DLL_PRIVATE static #else #if defined(__GNUC__) && __GNUC__ >= 4 #define MA_DLL_IMPORT __attribute__((visibility("default"))) #define MA_DLL_EXPORT __attribute__((visibility("default"))) #define MA_DLL_PRIVATE __attribute__((visibility("hidden"))) #else #define MA_DLL_IMPORT #define MA_DLL_EXPORT #define MA_DLL_PRIVATE static #endif #endif #endif #if !defined(MA_API) #if defined(MA_DLL) #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION) #define MA_API MA_DLL_EXPORT #else #define MA_API MA_DLL_IMPORT #endif #else #define MA_API extern #endif #endif #if !defined(MA_STATIC) #if defined(MA_DLL) #define MA_PRIVATE MA_DLL_PRIVATE #else #define MA_PRIVATE static #endif #endif /* SIMD alignment in bytes. Currently set to 32 bytes in preparation for future AVX optimizations. */ #define MA_SIMD_ALIGNMENT 32 /* Special wchar_t type to ensure any structures in the public sections that reference it have a consistent size across all platforms. On Windows, wchar_t is 2 bytes, whereas everywhere else it's 4 bytes. Since Windows likes to use wchar_t for its IDs, we need a special explicitly sized wchar type that is always 2 bytes on all platforms. */ #if !defined(MA_POSIX) && defined(MA_WIN32) typedef wchar_t ma_wchar_win32; #else typedef ma_uint16 ma_wchar_win32; #endif /* Logging Levels ============== Log levels are only used to give logging callbacks some context as to the severity of a log message so they can do filtering. All log levels will be posted to registered logging callbacks. If you don't want to output a certain log level you can discriminate against the log level in the callback. MA_LOG_LEVEL_DEBUG Used for debugging. Useful for debug and test builds, but should be disabled in release builds. MA_LOG_LEVEL_INFO Informational logging. Useful for debugging. This will never be called from within the data callback. MA_LOG_LEVEL_WARNING Warnings. You should enable this in you development builds and action them when encountered. These logs usually indicate a potential problem or misconfiguration, but still allow you to keep running. This will never be called from within the data callback. MA_LOG_LEVEL_ERROR Error logging. This will be fired when an operation fails and is subsequently aborted. This can be fired from within the data callback, in which case the device will be stopped. You should always have this log level enabled. */ typedef enum { MA_LOG_LEVEL_DEBUG = 4, MA_LOG_LEVEL_INFO = 3, MA_LOG_LEVEL_WARNING = 2, MA_LOG_LEVEL_ERROR = 1 } ma_log_level; /* Variables needing to be accessed atomically should be declared with this macro for two reasons: 1) It allows people who read the code to identify a variable as such; and 2) It forces alignment on platforms where it's required or optimal. Note that for x86/64, alignment is not strictly necessary, but does have some performance implications. Where supported by the compiler, alignment will be used, but otherwise if the CPU architecture does not require it, it will simply leave it unaligned. This is the case with old versions of Visual Studio, which I've confirmed with at least VC6. */ #if !defined(_MSC_VER) && defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) #include #define MA_ATOMIC(alignment, type) _Alignas(alignment) type #else #if defined(__GNUC__) /* GCC-style compilers. */ #define MA_ATOMIC(alignment, type) type __attribute__((aligned(alignment))) #elif defined(_MSC_VER) && _MSC_VER > 1200 /* 1200 = VC6. Alignment not supported, but not necessary because x86 is the only supported target. */ /* MSVC. */ #define MA_ATOMIC(alignment, type) __declspec(align(alignment)) type #else /* Other compilers. */ #define MA_ATOMIC(alignment, type) type #endif #endif typedef struct ma_context ma_context; typedef struct ma_device ma_device; typedef ma_uint8 ma_channel; typedef enum { MA_CHANNEL_NONE = 0, MA_CHANNEL_MONO = 1, MA_CHANNEL_FRONT_LEFT = 2, MA_CHANNEL_FRONT_RIGHT = 3, MA_CHANNEL_FRONT_CENTER = 4, MA_CHANNEL_LFE = 5, MA_CHANNEL_BACK_LEFT = 6, MA_CHANNEL_BACK_RIGHT = 7, MA_CHANNEL_FRONT_LEFT_CENTER = 8, MA_CHANNEL_FRONT_RIGHT_CENTER = 9, MA_CHANNEL_BACK_CENTER = 10, MA_CHANNEL_SIDE_LEFT = 11, MA_CHANNEL_SIDE_RIGHT = 12, MA_CHANNEL_TOP_CENTER = 13, MA_CHANNEL_TOP_FRONT_LEFT = 14, MA_CHANNEL_TOP_FRONT_CENTER = 15, MA_CHANNEL_TOP_FRONT_RIGHT = 16, MA_CHANNEL_TOP_BACK_LEFT = 17, MA_CHANNEL_TOP_BACK_CENTER = 18, MA_CHANNEL_TOP_BACK_RIGHT = 19, MA_CHANNEL_AUX_0 = 20, MA_CHANNEL_AUX_1 = 21, MA_CHANNEL_AUX_2 = 22, MA_CHANNEL_AUX_3 = 23, MA_CHANNEL_AUX_4 = 24, MA_CHANNEL_AUX_5 = 25, MA_CHANNEL_AUX_6 = 26, MA_CHANNEL_AUX_7 = 27, MA_CHANNEL_AUX_8 = 28, MA_CHANNEL_AUX_9 = 29, MA_CHANNEL_AUX_10 = 30, MA_CHANNEL_AUX_11 = 31, MA_CHANNEL_AUX_12 = 32, MA_CHANNEL_AUX_13 = 33, MA_CHANNEL_AUX_14 = 34, MA_CHANNEL_AUX_15 = 35, MA_CHANNEL_AUX_16 = 36, MA_CHANNEL_AUX_17 = 37, MA_CHANNEL_AUX_18 = 38, MA_CHANNEL_AUX_19 = 39, MA_CHANNEL_AUX_20 = 40, MA_CHANNEL_AUX_21 = 41, MA_CHANNEL_AUX_22 = 42, MA_CHANNEL_AUX_23 = 43, MA_CHANNEL_AUX_24 = 44, MA_CHANNEL_AUX_25 = 45, MA_CHANNEL_AUX_26 = 46, MA_CHANNEL_AUX_27 = 47, MA_CHANNEL_AUX_28 = 48, MA_CHANNEL_AUX_29 = 49, MA_CHANNEL_AUX_30 = 50, MA_CHANNEL_AUX_31 = 51, MA_CHANNEL_LEFT = MA_CHANNEL_FRONT_LEFT, MA_CHANNEL_RIGHT = MA_CHANNEL_FRONT_RIGHT, MA_CHANNEL_POSITION_COUNT = (MA_CHANNEL_AUX_31 + 1) } _ma_channel_position; /* Do not use `_ma_channel_position` directly. Use `ma_channel` instead. */ typedef enum { MA_SUCCESS = 0, MA_ERROR = -1, /* A generic error. */ MA_INVALID_ARGS = -2, MA_INVALID_OPERATION = -3, MA_OUT_OF_MEMORY = -4, MA_OUT_OF_RANGE = -5, MA_ACCESS_DENIED = -6, MA_DOES_NOT_EXIST = -7, MA_ALREADY_EXISTS = -8, MA_TOO_MANY_OPEN_FILES = -9, MA_INVALID_FILE = -10, MA_TOO_BIG = -11, MA_PATH_TOO_LONG = -12, MA_NAME_TOO_LONG = -13, MA_NOT_DIRECTORY = -14, MA_IS_DIRECTORY = -15, MA_DIRECTORY_NOT_EMPTY = -16, MA_AT_END = -17, MA_NO_SPACE = -18, MA_BUSY = -19, MA_IO_ERROR = -20, MA_INTERRUPT = -21, MA_UNAVAILABLE = -22, MA_ALREADY_IN_USE = -23, MA_BAD_ADDRESS = -24, MA_BAD_SEEK = -25, MA_BAD_PIPE = -26, MA_DEADLOCK = -27, MA_TOO_MANY_LINKS = -28, MA_NOT_IMPLEMENTED = -29, MA_NO_MESSAGE = -30, MA_BAD_MESSAGE = -31, MA_NO_DATA_AVAILABLE = -32, MA_INVALID_DATA = -33, MA_TIMEOUT = -34, MA_NO_NETWORK = -35, MA_NOT_UNIQUE = -36, MA_NOT_SOCKET = -37, MA_NO_ADDRESS = -38, MA_BAD_PROTOCOL = -39, MA_PROTOCOL_UNAVAILABLE = -40, MA_PROTOCOL_NOT_SUPPORTED = -41, MA_PROTOCOL_FAMILY_NOT_SUPPORTED = -42, MA_ADDRESS_FAMILY_NOT_SUPPORTED = -43, MA_SOCKET_NOT_SUPPORTED = -44, MA_CONNECTION_RESET = -45, MA_ALREADY_CONNECTED = -46, MA_NOT_CONNECTED = -47, MA_CONNECTION_REFUSED = -48, MA_NO_HOST = -49, MA_IN_PROGRESS = -50, MA_CANCELLED = -51, MA_MEMORY_ALREADY_MAPPED = -52, /* General non-standard errors. */ MA_CRC_MISMATCH = -100, /* General miniaudio-specific errors. */ MA_FORMAT_NOT_SUPPORTED = -200, MA_DEVICE_TYPE_NOT_SUPPORTED = -201, MA_SHARE_MODE_NOT_SUPPORTED = -202, MA_NO_BACKEND = -203, MA_NO_DEVICE = -204, MA_API_NOT_FOUND = -205, MA_INVALID_DEVICE_CONFIG = -206, MA_LOOP = -207, MA_BACKEND_NOT_ENABLED = -208, /* State errors. */ MA_DEVICE_NOT_INITIALIZED = -300, MA_DEVICE_ALREADY_INITIALIZED = -301, MA_DEVICE_NOT_STARTED = -302, MA_DEVICE_NOT_STOPPED = -303, /* Operation errors. */ MA_FAILED_TO_INIT_BACKEND = -400, MA_FAILED_TO_OPEN_BACKEND_DEVICE = -401, MA_FAILED_TO_START_BACKEND_DEVICE = -402, MA_FAILED_TO_STOP_BACKEND_DEVICE = -403 } ma_result; #define MA_MIN_CHANNELS 1 #ifndef MA_MAX_CHANNELS #define MA_MAX_CHANNELS 254 #endif #ifndef MA_MAX_FILTER_ORDER #define MA_MAX_FILTER_ORDER 8 #endif typedef enum { ma_stream_format_pcm = 0 } ma_stream_format; typedef enum { ma_stream_layout_interleaved = 0, ma_stream_layout_deinterleaved } ma_stream_layout; typedef enum { ma_dither_mode_none = 0, ma_dither_mode_rectangle, ma_dither_mode_triangle } ma_dither_mode; typedef enum { /* I like to keep these explicitly defined because they're used as a key into a lookup table. When items are added to this, make sure there are no gaps and that they're added to the lookup table in ma_get_bytes_per_sample(). */ ma_format_unknown = 0, /* Mainly used for indicating an error, but also used as the default for the output format for decoders. */ ma_format_u8 = 1, ma_format_s16 = 2, /* Seems to be the most widely supported format. */ ma_format_s24 = 3, /* Tightly packed. 3 bytes per sample. */ ma_format_s32 = 4, ma_format_f32 = 5, ma_format_count } ma_format; typedef enum { /* Standard rates need to be in priority order. */ ma_standard_sample_rate_48000 = 48000, /* Most common */ ma_standard_sample_rate_44100 = 44100, ma_standard_sample_rate_32000 = 32000, /* Lows */ ma_standard_sample_rate_24000 = 24000, ma_standard_sample_rate_22050 = 22050, ma_standard_sample_rate_88200 = 88200, /* Highs */ ma_standard_sample_rate_96000 = 96000, ma_standard_sample_rate_176400 = 176400, ma_standard_sample_rate_192000 = 192000, ma_standard_sample_rate_16000 = 16000, /* Extreme lows */ ma_standard_sample_rate_11025 = 11025, ma_standard_sample_rate_8000 = 8000, ma_standard_sample_rate_352800 = 352800, /* Extreme highs */ ma_standard_sample_rate_384000 = 384000, ma_standard_sample_rate_min = ma_standard_sample_rate_8000, ma_standard_sample_rate_max = ma_standard_sample_rate_384000, ma_standard_sample_rate_count = 14 /* Need to maintain the count manually. Make sure this is updated if items are added to enum. */ } ma_standard_sample_rate; typedef enum { ma_channel_mix_mode_rectangular = 0, /* Simple averaging based on the plane(s) the channel is sitting on. */ ma_channel_mix_mode_simple, /* Drop excess channels; zeroed out extra channels. */ ma_channel_mix_mode_custom_weights, /* Use custom weights specified in ma_channel_converter_config. */ ma_channel_mix_mode_default = ma_channel_mix_mode_rectangular } ma_channel_mix_mode; typedef enum { ma_standard_channel_map_microsoft, ma_standard_channel_map_alsa, ma_standard_channel_map_rfc3551, /* Based off AIFF. */ ma_standard_channel_map_flac, ma_standard_channel_map_vorbis, ma_standard_channel_map_sound4, /* FreeBSD's sound(4). */ ma_standard_channel_map_sndio, /* www.sndio.org/tips.html */ ma_standard_channel_map_webaudio = ma_standard_channel_map_flac, /* https://webaudio.github.io/web-audio-api/#ChannelOrdering. Only 1, 2, 4 and 6 channels are defined, but can fill in the gaps with logical assumptions. */ ma_standard_channel_map_default = ma_standard_channel_map_microsoft } ma_standard_channel_map; typedef enum { ma_performance_profile_low_latency = 0, ma_performance_profile_conservative } ma_performance_profile; typedef struct { void* pUserData; void* (* onMalloc)(size_t sz, void* pUserData); void* (* onRealloc)(void* p, size_t sz, void* pUserData); void (* onFree)(void* p, void* pUserData); } ma_allocation_callbacks; typedef struct { ma_int32 state; } ma_lcg; /* Atomics. These are typesafe structures to prevent errors as a result of forgetting to reference variables atomically. It's too easy to introduce subtle bugs where you accidentally do a regular assignment instead of an atomic load/store, etc. By using a struct we can enforce the use of atomics at compile time. These types are declared in the header section because we need to reference them in structs below, but functions for using them are only exposed in the implementation section. I do not want these to be part of the public API. There's a few downsides to this system. The first is that you need to declare a new struct for each type. Below are some macros to help with the declarations. They will be named like so: ma_atomic_uint32 - atomic ma_uint32 ma_atomic_int32 - atomic ma_int32 ma_atomic_uint64 - atomic ma_uint64 ma_atomic_float - atomic float ma_atomic_bool32 - atomic ma_bool32 The other downside is that atomic pointers are extremely messy. You need to declare a new struct for each specific type of pointer you need to make atomic. For example, an atomic ma_node* will look like this: MA_ATOMIC_SAFE_TYPE_IMPL_PTR(node) Which will declare a type struct that's named like so: ma_atomic_ptr_node Functions to use the atomic types are declared in the implementation section. All atomic functions are prefixed with the name of the struct. For example: ma_atomic_uint32_set() - Atomic store of ma_uint32 ma_atomic_uint32_get() - Atomic load of ma_uint32 etc. For pointer types it's the same, which makes them a bit messy to use due to the length of each function name, but in return you get type safety and enforcement of atomic operations. */ #define MA_ATOMIC_SAFE_TYPE_DECL(c89TypeExtension, typeSize, type) \ typedef struct \ { \ MA_ATOMIC(typeSize, ma_##type) value; \ } ma_atomic_##type; \ #define MA_ATOMIC_SAFE_TYPE_DECL_PTR(type) \ typedef struct \ { \ MA_ATOMIC(MA_SIZEOF_PTR, ma_##type*) value; \ } ma_atomic_ptr_##type; \ MA_ATOMIC_SAFE_TYPE_DECL(32, 4, uint32) MA_ATOMIC_SAFE_TYPE_DECL(i32, 4, int32) MA_ATOMIC_SAFE_TYPE_DECL(64, 8, uint64) MA_ATOMIC_SAFE_TYPE_DECL(f32, 4, float) MA_ATOMIC_SAFE_TYPE_DECL(32, 4, bool32) /* Spinlocks are 32-bit for compatibility reasons. */ typedef ma_uint32 ma_spinlock; #ifndef MA_NO_THREADING /* Thread priorities should be ordered such that the default priority of the worker thread is 0. */ typedef enum { ma_thread_priority_idle = -5, ma_thread_priority_lowest = -4, ma_thread_priority_low = -3, ma_thread_priority_normal = -2, ma_thread_priority_high = -1, ma_thread_priority_highest = 0, ma_thread_priority_realtime = 1, ma_thread_priority_default = 0 } ma_thread_priority; #if defined(MA_POSIX) typedef ma_pthread_t ma_thread; #elif defined(MA_WIN32) typedef ma_handle ma_thread; #endif #if defined(MA_POSIX) typedef ma_pthread_mutex_t ma_mutex; #elif defined(MA_WIN32) typedef ma_handle ma_mutex; #endif #if defined(MA_POSIX) typedef struct { ma_uint32 value; ma_pthread_mutex_t lock; ma_pthread_cond_t cond; } ma_event; #elif defined(MA_WIN32) typedef ma_handle ma_event; #endif #if defined(MA_POSIX) typedef struct { int value; ma_pthread_mutex_t lock; ma_pthread_cond_t cond; } ma_semaphore; #elif defined(MA_WIN32) typedef ma_handle ma_semaphore; #endif #else /* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */ #ifndef MA_NO_DEVICE_IO #error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO"; #endif #endif /* MA_NO_THREADING */ /* Retrieves the version of miniaudio as separated integers. Each component can be NULL if it's not required. */ MA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); /* Retrieves the version of miniaudio as a string which can be useful for logging purposes. */ MA_API const char* ma_version_string(void); /************************************************************************************************************************************************************** Logging **************************************************************************************************************************************************************/ #include /* For va_list. */ #if defined(__has_attribute) #if __has_attribute(format) #define MA_ATTRIBUTE_FORMAT(fmt, va) __attribute__((format(printf, fmt, va))) #endif #endif #ifndef MA_ATTRIBUTE_FORMAT #define MA_ATTRIBUTE_FORMAT(fmt, va) #endif #ifndef MA_MAX_LOG_CALLBACKS #define MA_MAX_LOG_CALLBACKS 4 #endif /* The callback for handling log messages. Parameters ---------- pUserData (in) The user data pointer that was passed into ma_log_register_callback(). logLevel (in) The log level. This can be one of the following: +----------------------+ | Log Level | +----------------------+ | MA_LOG_LEVEL_DEBUG | | MA_LOG_LEVEL_INFO | | MA_LOG_LEVEL_WARNING | | MA_LOG_LEVEL_ERROR | +----------------------+ pMessage (in) The log message. */ typedef void (* ma_log_callback_proc)(void* pUserData, ma_uint32 level, const char* pMessage); typedef struct { ma_log_callback_proc onLog; void* pUserData; } ma_log_callback; MA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData); typedef struct { ma_log_callback callbacks[MA_MAX_LOG_CALLBACKS]; ma_uint32 callbackCount; ma_allocation_callbacks allocationCallbacks; /* Need to store these persistently because ma_log_postv() might need to allocate a buffer on the heap. */ #ifndef MA_NO_THREADING ma_mutex lock; /* For thread safety just to make it easier and safer for the logging implementation. */ #endif } ma_log; MA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog); MA_API void ma_log_uninit(ma_log* pLog); MA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback); MA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback); MA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage); MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args); MA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...) MA_ATTRIBUTE_FORMAT(3, 4); /************************************************************************************************************************************************************** Biquad Filtering **************************************************************************************************************************************************************/ typedef union { float f32; ma_int32 s32; } ma_biquad_coefficient; typedef struct { ma_format format; ma_uint32 channels; double b0; double b1; double b2; double a0; double a1; double a2; } ma_biquad_config; MA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient b0; ma_biquad_coefficient b1; ma_biquad_coefficient b2; ma_biquad_coefficient a1; ma_biquad_coefficient a2; ma_biquad_coefficient* pR1; ma_biquad_coefficient* pR2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_biquad; MA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ); MA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ); MA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ); MA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ); MA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ); /************************************************************************************************************************************************************** Low-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_lpf1_config, ma_lpf2_config; MA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency); MA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient a; ma_biquad_coefficient* pR1; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_lpf1; MA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF); MA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF); MA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF); MA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF); MA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF); typedef struct { ma_biquad bq; /* The second order low-pass filter is implemented as a biquad filter. */ } ma_lpf2; MA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pHPF); MA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF); MA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF); MA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF); MA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_lpf_config; MA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_lpf1* pLPF1; ma_lpf2* pLPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_lpf; MA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF); MA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF); MA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF); MA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF); MA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF); /************************************************************************************************************************************************************** High-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_hpf1_config, ma_hpf2_config; MA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency); MA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient a; ma_biquad_coefficient* pR1; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_hpf1; MA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF); MA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pHPF); MA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF); MA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF); typedef struct { ma_biquad bq; /* The second order high-pass filter is implemented as a biquad filter. */ } ma_hpf2; MA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF); MA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF); MA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF); MA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_hpf_config; MA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_hpf1* pHPF1; ma_hpf2* pHPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_hpf; MA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF); MA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF); MA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF); MA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF); /************************************************************************************************************************************************************** Band-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_bpf2_config; MA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_biquad bq; /* The second order band-pass filter is implemented as a biquad filter. */ } ma_bpf2; MA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF); MA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF); MA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF); MA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_bpf_config; MA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 bpf2Count; ma_bpf2* pBPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_bpf; MA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF); MA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF); MA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF); MA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF); /************************************************************************************************************************************************************** Notching Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double q; double frequency; } ma_notch2_config, ma_notch_config; MA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency); typedef struct { ma_biquad bq; } ma_notch2; MA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter); MA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter); MA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter); MA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter); /************************************************************************************************************************************************************** Peaking EQ Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double q; double frequency; } ma_peak2_config, ma_peak_config; MA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_biquad bq; } ma_peak2; MA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter); MA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter); MA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter); MA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter); /************************************************************************************************************************************************************** Low Shelf Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double shelfSlope; double frequency; } ma_loshelf2_config, ma_loshelf_config; MA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency); typedef struct { ma_biquad bq; } ma_loshelf2; MA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter); MA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter); MA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter); MA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter); /************************************************************************************************************************************************************** High Shelf Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double shelfSlope; double frequency; } ma_hishelf2_config, ma_hishelf_config; MA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency); typedef struct { ma_biquad bq; } ma_hishelf2; MA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter); MA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter); MA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter); MA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter); /* Delay */ typedef struct { ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 delayInFrames; ma_bool32 delayStart; /* Set to true to delay the start of the output; false otherwise. */ float wet; /* 0..1. Default = 1. */ float dry; /* 0..1. Default = 1. */ float decay; /* 0..1. Default = 0 (no feedback). Feedback decay. Use this for echo. */ } ma_delay_config; MA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay); typedef struct { ma_delay_config config; ma_uint32 cursor; /* Feedback is written to this cursor. Always equal or in front of the read cursor. */ ma_uint32 bufferSizeInFrames; float* pBuffer; } ma_delay; MA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay); MA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount); MA_API void ma_delay_set_wet(ma_delay* pDelay, float value); MA_API float ma_delay_get_wet(const ma_delay* pDelay); MA_API void ma_delay_set_dry(ma_delay* pDelay, float value); MA_API float ma_delay_get_dry(const ma_delay* pDelay); MA_API void ma_delay_set_decay(ma_delay* pDelay, float value); MA_API float ma_delay_get_decay(const ma_delay* pDelay); /* Gainer for smooth volume changes. */ typedef struct { ma_uint32 channels; ma_uint32 smoothTimeInFrames; } ma_gainer_config; MA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames); typedef struct { ma_gainer_config config; ma_uint32 t; float masterVolume; float* pOldGains; float* pNewGains; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_gainer; MA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer); MA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer); MA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain); MA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains); MA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume); MA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume); /* Stereo panner. */ typedef enum { ma_pan_mode_balance = 0, /* Does not blend one side with the other. Technically just a balance. Compatible with other popular audio engines and therefore the default. */ ma_pan_mode_pan /* A true pan. The sound from one side will "move" to the other side and blend with it. */ } ma_pan_mode; typedef struct { ma_format format; ma_uint32 channels; ma_pan_mode mode; float pan; } ma_panner_config; MA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels); typedef struct { ma_format format; ma_uint32 channels; ma_pan_mode mode; float pan; /* -1..1 where 0 is no pan, -1 is left side, +1 is right side. Defaults to 0. */ } ma_panner; MA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner); MA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode); MA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner); MA_API void ma_panner_set_pan(ma_panner* pPanner, float pan); MA_API float ma_panner_get_pan(const ma_panner* pPanner); /* Fader. */ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; } ma_fader_config; MA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate); typedef struct { ma_fader_config config; float volumeBeg; /* If volumeBeg and volumeEnd is equal to 1, no fading happens (ma_fader_process_pcm_frames() will run as a passthrough). */ float volumeEnd; ma_uint64 lengthInFrames; /* The total length of the fade. */ ma_int64 cursorInFrames; /* The current time in frames. Incremented by ma_fader_process_pcm_frames(). Signed because it'll be offset by startOffsetInFrames in set_fade_ex(). */ } ma_fader; MA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader); MA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate); MA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames); MA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames); MA_API float ma_fader_get_current_volume(const ma_fader* pFader); /* Spatializer. */ typedef struct { float x; float y; float z; } ma_vec3f; typedef struct { ma_vec3f v; ma_spinlock lock; } ma_atomic_vec3f; typedef enum { ma_attenuation_model_none, /* No distance attenuation and no spatialization. */ ma_attenuation_model_inverse, /* Equivalent to OpenAL's AL_INVERSE_DISTANCE_CLAMPED. */ ma_attenuation_model_linear, /* Linear attenuation. Equivalent to OpenAL's AL_LINEAR_DISTANCE_CLAMPED. */ ma_attenuation_model_exponential /* Exponential attenuation. Equivalent to OpenAL's AL_EXPONENT_DISTANCE_CLAMPED. */ } ma_attenuation_model; typedef enum { ma_positioning_absolute, ma_positioning_relative } ma_positioning; typedef enum { ma_handedness_right, ma_handedness_left } ma_handedness; typedef struct { ma_uint32 channelsOut; ma_channel* pChannelMapOut; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float speedOfSound; ma_vec3f worldUp; } ma_spatializer_listener_config; MA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut); typedef struct { ma_spatializer_listener_config config; ma_atomic_vec3f position; /* The absolute position of the listener. */ ma_atomic_vec3f direction; /* The direction the listener is facing. The world up vector is config.worldUp. */ ma_atomic_vec3f velocity; ma_bool32 isEnabled; /* Memory management. */ ma_bool32 _ownsHeap; void* _pHeap; } ma_spatializer_listener; MA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener); MA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound); MA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled); MA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener); typedef struct { ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel* pChannelMapIn; ma_attenuation_model attenuationModel; ma_positioning positioning; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float minGain; float maxGain; float minDistance; float maxDistance; float rolloff; float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float dopplerFactor; /* Set to 0 to disable doppler effect. */ float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */ float minSpatializationChannelGain; /* The minimal scaling factor to apply to channel gains when accounting for the direction of the sound relative to the listener. Must be in the range of 0..1. Smaller values means more aggressive directional panning, larger values means more subtle directional panning. */ ma_uint32 gainSmoothTimeInFrames; /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */ } ma_spatializer_config; MA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut); typedef struct { ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel* pChannelMapIn; ma_attenuation_model attenuationModel; ma_positioning positioning; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float minGain; float maxGain; float minDistance; float maxDistance; float rolloff; float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float dopplerFactor; /* Set to 0 to disable doppler effect. */ float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */ ma_uint32 gainSmoothTimeInFrames; /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */ ma_atomic_vec3f position; ma_atomic_vec3f direction; ma_atomic_vec3f velocity; /* For doppler effect. */ float dopplerPitch; /* Will be updated by ma_spatializer_process_pcm_frames() and can be used by higher level functions to apply a pitch shift for doppler effect. */ float minSpatializationChannelGain; ma_gainer gainer; /* For smooth gain transitions. */ float* pNewChannelGainsOut; /* An offset of _pHeap. Used by ma_spatializer_process_pcm_frames() to store new channel gains. The number of elements in this array is equal to config.channelsOut. */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_spatializer; MA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer); MA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer); MA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume); MA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume); MA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer); MA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning); MA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff); MA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain); MA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain); MA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance); MA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance); MA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor); MA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor); MA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir); /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DATA CONVERSION =============== This section contains the APIs for data conversion. You will find everything here for channel mapping, sample format conversion, resampling, etc. ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ /************************************************************************************************************************************************************** Resampling **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_uint32 lpfOrder; /* The low-pass filter order. Setting this to 0 will disable low-pass filtering. */ double lpfNyquistFactor; /* 0..1. Defaults to 1. 1 = Half the sampling frequency (Nyquist Frequency), 0.5 = Quarter the sampling frequency (half Nyquest Frequency), etc. */ } ma_linear_resampler_config; MA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); typedef struct { ma_linear_resampler_config config; ma_uint32 inAdvanceInt; ma_uint32 inAdvanceFrac; ma_uint32 inTimeInt; ma_uint32 inTimeFrac; union { float* f32; ma_int16* s16; } x0; /* The previous input frame. */ union { float* f32; ma_int16* s16; } x1; /* The next input frame. */ ma_lpf lpf; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_linear_resampler; MA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler); MA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler); MA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); MA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); MA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut); MA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler); MA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler); MA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); MA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); MA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler); typedef struct ma_resampler_config ma_resampler_config; typedef void ma_resampling_backend; typedef struct { ma_result (* onGetHeapSize )(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes); ma_result (* onInit )(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend); void (* onUninit )(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks); ma_result (* onProcess )(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); ma_result (* onSetRate )(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); /* Optional. Rate changes will be disabled. */ ma_uint64 (* onGetInputLatency )(void* pUserData, const ma_resampling_backend* pBackend); /* Optional. Latency will be reported as 0. */ ma_uint64 (* onGetOutputLatency )(void* pUserData, const ma_resampling_backend* pBackend); /* Optional. Latency will be reported as 0. */ ma_result (* onGetRequiredInputFrameCount )(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); /* Optional. Latency mitigation will be disabled. */ ma_result (* onGetExpectedOutputFrameCount)(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); /* Optional. Latency mitigation will be disabled. */ ma_result (* onReset )(void* pUserData, ma_resampling_backend* pBackend); } ma_resampling_backend_vtable; typedef enum { ma_resample_algorithm_linear = 0, /* Fastest, lowest quality. Optional low-pass filtering. Default. */ ma_resample_algorithm_custom, } ma_resample_algorithm; struct ma_resampler_config { ma_format format; /* Must be either ma_format_f32 or ma_format_s16. */ ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_resample_algorithm algorithm; /* When set to ma_resample_algorithm_custom, pBackendVTable will be used. */ ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; struct { ma_uint32 lpfOrder; } linear; }; MA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm); typedef struct { ma_resampling_backend* pBackend; ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; ma_format format; ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; union { ma_linear_resampler linear; } state; /* State for stock resamplers so we can avoid a malloc. For stock resamplers, pBackend will point here. */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_resampler; MA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler); /* Initializes a new resampler object from a config. */ MA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler); /* Uninitializes a resampler. */ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks); /* Converts the given input data. Both the input and output frames must be in the format specified in the config when the resampler was initialized. On input, [pFrameCountOut] contains the number of output frames to process. On output it contains the number of output frames that were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use ma_resampler_get_expected_output_frame_count() to know how many output frames will be processed for a given number of input frames. On input, [pFrameCountIn] contains the number of input frames contained in [pFramesIn]. On output it contains the number of whole input frames that were actually processed. You can use ma_resampler_get_required_input_frame_count() to know how many input frames you should provide for a given number of output frames. [pFramesIn] can be NULL, in which case zeroes will be used instead. If [pFramesOut] is NULL, a seek is performed. In this case, if [pFrameCountOut] is not NULL it will seek by the specified number of output frames. Otherwise, if [pFramesCountOut] is NULL and [pFrameCountIn] is not NULL, it will seek by the specified number of input frames. When seeking, [pFramesIn] is allowed to NULL, in which case the internal timing state will be updated, but no input will be processed. In this case, any internal filter state will be updated as if zeroes were passed in. It is an error for [pFramesOut] to be non-NULL and [pFrameCountOut] to be NULL. It is an error for both [pFrameCountOut] and [pFrameCountIn] to be NULL. */ MA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); /* Sets the input and output sample rate. */ MA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); /* Sets the input and output sample rate as a ratio. The ration is in/out. */ MA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio); /* Retrieves the latency introduced by the resampler in input frames. */ MA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler); /* Retrieves the latency introduced by the resampler in output frames. */ MA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler); /* Calculates the number of whole input frames that would need to be read from the client in order to output the specified number of output frames. The returned value does not include cached input frames. It only returns the number of extra frames that would need to be read from the input buffer in order to output the specified number of output frames. */ MA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); /* Calculates the number of whole output frames that would be output after fully reading and consuming the specified number of input frames. */ MA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); /* Resets the resampler's timer and clears its internal cache. */ MA_API ma_result ma_resampler_reset(ma_resampler* pResampler); /************************************************************************************************************************************************************** Channel Conversion **************************************************************************************************************************************************************/ typedef enum { ma_channel_conversion_path_unknown, ma_channel_conversion_path_passthrough, ma_channel_conversion_path_mono_out, /* Converting to mono. */ ma_channel_conversion_path_mono_in, /* Converting from mono. */ ma_channel_conversion_path_shuffle, /* Simple shuffle. Will use this when all channels are present in both input and output channel maps, but just in a different order. */ ma_channel_conversion_path_weights /* Blended based on weights. */ } ma_channel_conversion_path; typedef enum { ma_mono_expansion_mode_duplicate = 0, /* The default. */ ma_mono_expansion_mode_average, /* Average the mono channel across all channels. */ ma_mono_expansion_mode_stereo_only, /* Duplicate to the left and right channels only and ignore the others. */ ma_mono_expansion_mode_default = ma_mono_expansion_mode_duplicate } ma_mono_expansion_mode; typedef struct { ma_format format; ma_uint32 channelsIn; ma_uint32 channelsOut; const ma_channel* pChannelMapIn; const ma_channel* pChannelMapOut; ma_channel_mix_mode mixingMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ float** ppWeights; /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */ } ma_channel_converter_config; MA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode); typedef struct { ma_format format; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel_mix_mode mixingMode; ma_channel_conversion_path conversionPath; ma_channel* pChannelMapIn; ma_channel* pChannelMapOut; ma_uint8* pShuffleTable; /* Indexed by output channel index. */ union { float** f32; ma_int32** s16; } weights; /* [in][out] */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_channel_converter; MA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter); MA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter); MA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); /************************************************************************************************************************************************************** Data Conversion **************************************************************************************************************************************************************/ typedef struct { ma_format formatIn; ma_format formatOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_channel* pChannelMapIn; ma_channel* pChannelMapOut; ma_dither_mode ditherMode; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ float** ppChannelWeights; /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */ ma_bool32 allowDynamicSampleRate; ma_resampler_config resampling; } ma_data_converter_config; MA_API ma_data_converter_config ma_data_converter_config_init_default(void); MA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); typedef enum { ma_data_converter_execution_path_passthrough, /* No conversion. */ ma_data_converter_execution_path_format_only, /* Only format conversion. */ ma_data_converter_execution_path_channels_only, /* Only channel conversion. */ ma_data_converter_execution_path_resample_only, /* Only resampling. */ ma_data_converter_execution_path_resample_first, /* All conversions, but resample as the first step. */ ma_data_converter_execution_path_channels_first /* All conversions, but channels as the first step. */ } ma_data_converter_execution_path; typedef struct { ma_format formatIn; ma_format formatOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_dither_mode ditherMode; ma_data_converter_execution_path executionPath; /* The execution path the data converter will follow when processing. */ ma_channel_converter channelConverter; ma_resampler resampler; ma_bool8 hasPreFormatConversion; ma_bool8 hasPostFormatConversion; ma_bool8 hasChannelConverter; ma_bool8 hasResampler; ma_bool8 isPassthrough; /* Memory management. */ ma_bool8 _ownsHeap; void* _pHeap; } ma_data_converter; MA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter); MA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter); MA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); MA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); MA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut); MA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter); MA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter); MA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); MA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); MA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter); /************************************************************************************************************************************************************ Format Conversion ************************************************************************************************************************************************************/ MA_API void ma_pcm_u8_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode); MA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode); /* Deinterleaves an interleaved buffer. */ MA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames); /* Interleaves a group of deinterleaved buffers. */ MA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames); /************************************************************************************************************************************************************ Channel Maps ************************************************************************************************************************************************************/ /* This is used in the shuffle table to indicate that the channel index is undefined and should be ignored. */ #define MA_CHANNEL_INDEX_NULL 255 /* Retrieves the channel position of the specified channel in the given channel map. The pChannelMap parameter can be null, in which case miniaudio's default channel map will be assumed. */ MA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex); /* Initializes a blank channel map. When a blank channel map is specified anywhere it indicates that the native channel map should be used. */ MA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels); /* Helper for retrieving a standard channel map. The output channel map buffer must have a capacity of at least `channelMapCap`. */ MA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels); /* Copies a channel map. Both input and output channel map buffers must have a capacity of at least `channels`. */ MA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels); /* Copies a channel map if one is specified, otherwise copies the default channel map. The output buffer must have a capacity of at least `channels`. If not NULL, the input channel map must also have a capacity of at least `channels`. */ MA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels); /* Determines whether or not a channel map is valid. A blank channel map is valid (all channels set to MA_CHANNEL_NONE). The way a blank channel map is handled is context specific, but is usually treated as a passthrough. Invalid channel maps: - A channel map with no channels - A channel map with more than one channel and a mono channel The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels); /* Helper for comparing two channel maps for equality. This assumes the channel count is the same between the two. Both channels map buffers must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels); /* Helper for determining if a channel map is blank (all channels set to MA_CHANNEL_NONE). The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels); /* Helper for determining whether or not a channel is present in the given channel map. The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition); /* Find a channel position in the given channel map. Returns MA_TRUE if the channel is found; MA_FALSE otherwise. The index of the channel is output to `pChannelIndex`. The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex); /* Generates a string representing the given channel map. This is for printing and debugging purposes, not serialization/deserialization. Returns the length of the string, not including the null terminator. */ MA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap); /* Retrieves a human readable version of a channel position. */ MA_API const char* ma_channel_position_to_string(ma_channel channel); /************************************************************************************************************************************************************ Conversion Helpers ************************************************************************************************************************************************************/ /* High-level helper for doing a full format conversion in one go. Returns the number of output frames. Call this with pOut set to NULL to determine the required size of the output buffer. frameCountOut should be set to the capacity of pOut. If pOut is NULL, frameCountOut is ignored. A return value of 0 indicates an error. This function is useful for one-off bulk conversions, but if you're streaming data you should use the ma_data_converter APIs instead. */ MA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn); MA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig); /************************************************************************************************************************************************************ Data Source ************************************************************************************************************************************************************/ typedef void ma_data_source; #define MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT 0x00000001 typedef struct { ma_result (* onRead)(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); ma_result (* onSeek)(ma_data_source* pDataSource, ma_uint64 frameIndex); ma_result (* onGetDataFormat)(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); ma_result (* onGetCursor)(ma_data_source* pDataSource, ma_uint64* pCursor); ma_result (* onGetLength)(ma_data_source* pDataSource, ma_uint64* pLength); ma_result (* onSetLooping)(ma_data_source* pDataSource, ma_bool32 isLooping); ma_uint32 flags; } ma_data_source_vtable; typedef ma_data_source* (* ma_data_source_get_next_proc)(ma_data_source* pDataSource); typedef struct { const ma_data_source_vtable* vtable; } ma_data_source_config; MA_API ma_data_source_config ma_data_source_config_init(void); typedef struct { const ma_data_source_vtable* vtable; ma_uint64 rangeBegInFrames; ma_uint64 rangeEndInFrames; /* Set to -1 for unranged (default). */ ma_uint64 loopBegInFrames; /* Relative to rangeBegInFrames. */ ma_uint64 loopEndInFrames; /* Relative to rangeBegInFrames. Set to -1 for the end of the range. */ ma_data_source* pCurrent; /* When non-NULL, the data source being initialized will act as a proxy and will route all operations to pCurrent. Used in conjunction with pNext/onGetNext for seamless chaining. */ ma_data_source* pNext; /* When set to NULL, onGetNext will be used. */ ma_data_source_get_next_proc onGetNext; /* Will be used when pNext is NULL. If both are NULL, no next will be used. */ MA_ATOMIC(4, ma_bool32) isLooping; } ma_data_source_base; MA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource); MA_API void ma_data_source_uninit(ma_data_source* pDataSource); MA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Must support pFramesOut = NULL in which case a forward seek should be performed. */ MA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked); /* Can only seek forward. Equivalent to ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, &framesRead); */ MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex); MA_API ma_result ma_data_source_seek_seconds(ma_data_source* pDataSource, float secondCount, float* pSecondsSeeked); /* Can only seek forward. Abstraction to ma_data_source_seek_pcm_frames() */ MA_API ma_result ma_data_source_seek_to_second(ma_data_source* pDataSource, float seekPointInSeconds); /* Abstraction to ma_data_source_seek_to_pcm_frame() */ MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor); MA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength); /* Returns MA_NOT_IMPLEMENTED if the length is unknown or cannot be determined. Decoders can return this. */ MA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor); MA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength); MA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping); MA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames); MA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames); MA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames); MA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames); MA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource); MA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource); MA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext); MA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource); typedef struct { ma_data_source_base ds; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 cursor; ma_uint64 sizeInFrames; const void* pData; } ma_audio_buffer_ref; MA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef); MA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef); MA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames); MA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop); MA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex); MA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount); MA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount); /* Returns MA_AT_END if the end has been reached. This should be considered successful. */ MA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef); MA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor); MA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength); MA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 sizeInFrames; const void* pData; /* If set to NULL, will allocate a block of memory for you. */ ma_allocation_callbacks allocationCallbacks; } ma_audio_buffer_config; MA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_audio_buffer_ref ref; ma_allocation_callbacks allocationCallbacks; ma_bool32 ownsData; /* Used to control whether or not miniaudio owns the data buffer. If set to true, pData will be freed in ma_audio_buffer_uninit(). */ ma_uint8 _pExtraData[1]; /* For allocating a buffer with the memory located directly after the other memory of the structure. */ } ma_audio_buffer; MA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer); /* Always copies the data. Doesn't make sense to use this otherwise. Use ma_audio_buffer_uninit_and_free() to uninit. */ MA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer); MA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer); MA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop); MA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex); MA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount); MA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount); /* Returns MA_AT_END if the end has been reached. This should be considered successful. */ MA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor); MA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength); MA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames); /* Paged Audio Buffer ================== A paged audio buffer is made up of a linked list of pages. It's expandable, but not shrinkable. It can be used for cases where audio data is streamed in asynchronously while allowing data to be read at the same time. This is lock-free, but not 100% thread safe. You can append a page and read from the buffer across simultaneously across different threads, however only one thread at a time can append, and only one thread at a time can read and seek. */ typedef struct ma_paged_audio_buffer_page ma_paged_audio_buffer_page; struct ma_paged_audio_buffer_page { MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pNext; ma_uint64 sizeInFrames; ma_uint8 pAudioData[1]; }; typedef struct { ma_format format; ma_uint32 channels; ma_paged_audio_buffer_page head; /* Dummy head for the lock-free algorithm. Always has a size of 0. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pTail; /* Never null. Initially set to &head. */ } ma_paged_audio_buffer_data; MA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData); MA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData); MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData); MA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength); MA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage); MA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage); MA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_paged_audio_buffer_data* pData; /* Must not be null. */ } ma_paged_audio_buffer_config; MA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData); typedef struct { ma_data_source_base ds; ma_paged_audio_buffer_data* pData; /* Audio data is read from here. Cannot be null. */ ma_paged_audio_buffer_page* pCurrent; ma_uint64 relativeCursor; /* Relative to the current page. */ ma_uint64 absoluteCursor; } ma_paged_audio_buffer; MA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer); MA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer); MA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Returns MA_AT_END if no more pages available. */ MA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex); MA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor); MA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength); /************************************************************************************************************************************************************ Ring Buffer ************************************************************************************************************************************************************/ typedef struct { void* pBuffer; ma_uint32 subbufferSizeInBytes; ma_uint32 subbufferCount; ma_uint32 subbufferStrideInBytes; MA_ATOMIC(4, ma_uint32) encodedReadOffset; /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */ MA_ATOMIC(4, ma_uint32) encodedWriteOffset; /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */ ma_bool8 ownsBuffer; /* Used to know whether or not miniaudio is responsible for free()-ing the buffer. */ ma_bool8 clearOnWriteAcquire; /* When set, clears the acquired write buffer before returning from ma_rb_acquire_write(). */ ma_allocation_callbacks allocationCallbacks; } ma_rb; MA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB); MA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB); MA_API void ma_rb_uninit(ma_rb* pRB); MA_API void ma_rb_reset(ma_rb* pRB); MA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut); MA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes); MA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut); MA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes); MA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes); MA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes); MA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB); /* Returns the distance between the write pointer and the read pointer. Should never be negative for a correct program. Will return the number of bytes that can be read before the read pointer hits the write pointer. */ MA_API ma_uint32 ma_rb_available_read(ma_rb* pRB); MA_API ma_uint32 ma_rb_available_write(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex); MA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer); typedef struct { ma_data_source_base ds; ma_rb rb; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; /* Not required for the ring buffer itself, but useful for associating the data with some sample rate, particularly for data sources. */ } ma_pcm_rb; MA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB); MA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB); MA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB); MA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB); MA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut); MA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames); MA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut); MA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames); MA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames); MA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames); MA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB); /* Return value is in frames. */ MA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex); MA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer); MA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB); MA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate); /* The idea of the duplex ring buffer is to act as the intermediary buffer when running two asynchronous devices in a duplex set up. The capture device writes to it, and then a playback device reads from it. At the moment this is just a simple naive implementation, but in the future I want to implement some dynamic resampling to seamlessly handle desyncs. Note that the API is work in progress and may change at any time in any version. The size of the buffer is based on the capture side since that's what'll be written to the buffer. It is based on the capture period size in frames. The internal sample rate of the capture device is also needed in order to calculate the size. */ typedef struct { ma_pcm_rb rb; } ma_duplex_rb; MA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB); MA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB); /************************************************************************************************************************************************************ Miscellaneous Helpers ************************************************************************************************************************************************************/ /* Retrieves a human readable description of the given result code. */ MA_API const char* ma_result_description(ma_result result); /* malloc() */ MA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* calloc() */ MA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* realloc() */ MA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* free() */ MA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); /* Performs an aligned malloc, with the assumption that the alignment is a power of 2. */ MA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks); /* Free's an aligned malloc'd buffer. */ MA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); /* Retrieves a friendly name for a format. */ MA_API const char* ma_get_format_name(ma_format format); /* Blends two frames in floating point format. */ MA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels); /* Retrieves the size of a sample in bytes for the given format. This API is efficient and is implemented using a lookup table. Thread Safety: SAFE This API is pure. */ MA_API ma_uint32 ma_get_bytes_per_sample(ma_format format); static MA_INLINE ma_uint32 ma_get_bytes_per_frame(ma_format format, ma_uint32 channels) { return ma_get_bytes_per_sample(format) * channels; } /* Converts a log level to a string. */ MA_API const char* ma_log_level_to_string(ma_uint32 logLevel); /************************************************************************************************************************************************************ Synchronization ************************************************************************************************************************************************************/ /* Locks a spinlock. */ MA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock); /* Locks a spinlock, but does not yield() when looping. */ MA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock); /* Unlocks a spinlock. */ MA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock); #ifndef MA_NO_THREADING /* Creates a mutex. A mutex must be created from a valid context. A mutex is initially unlocked. */ MA_API ma_result ma_mutex_init(ma_mutex* pMutex); /* Deletes a mutex. */ MA_API void ma_mutex_uninit(ma_mutex* pMutex); /* Locks a mutex with an infinite timeout. */ MA_API void ma_mutex_lock(ma_mutex* pMutex); /* Unlocks a mutex. */ MA_API void ma_mutex_unlock(ma_mutex* pMutex); /* Initializes an auto-reset event. */ MA_API ma_result ma_event_init(ma_event* pEvent); /* Uninitializes an auto-reset event. */ MA_API void ma_event_uninit(ma_event* pEvent); /* Waits for the specified auto-reset event to become signalled. */ MA_API ma_result ma_event_wait(ma_event* pEvent); /* Signals the specified auto-reset event. */ MA_API ma_result ma_event_signal(ma_event* pEvent); MA_API ma_result ma_semaphore_init(int initialValue, ma_semaphore* pSemaphore); MA_API void ma_semaphore_uninit(ma_semaphore* pSemaphore); MA_API ma_result ma_semaphore_wait(ma_semaphore* pSemaphore); MA_API ma_result ma_semaphore_release(ma_semaphore* pSemaphore); #endif /* MA_NO_THREADING */ /* Fence ===== This locks while the counter is larger than 0. Counter can be incremented and decremented by any thread, but care needs to be taken when waiting. It is possible for one thread to acquire the fence just as another thread returns from ma_fence_wait(). The idea behind a fence is to allow you to wait for a group of operations to complete. When an operation starts, the counter is incremented which locks the fence. When the operation completes, the fence will be released which decrements the counter. ma_fence_wait() will block until the counter hits zero. If threading is disabled, ma_fence_wait() will spin on the counter. */ typedef struct { #ifndef MA_NO_THREADING ma_event e; #endif ma_uint32 counter; } ma_fence; MA_API ma_result ma_fence_init(ma_fence* pFence); MA_API void ma_fence_uninit(ma_fence* pFence); MA_API ma_result ma_fence_acquire(ma_fence* pFence); /* Increment counter. */ MA_API ma_result ma_fence_release(ma_fence* pFence); /* Decrement counter. */ MA_API ma_result ma_fence_wait(ma_fence* pFence); /* Wait for counter to reach 0. */ /* Notification callback for asynchronous operations. */ typedef void ma_async_notification; typedef struct { void (* onSignal)(ma_async_notification* pNotification); } ma_async_notification_callbacks; MA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification); /* Simple polling notification. This just sets a variable when the notification has been signalled which is then polled with ma_async_notification_poll_is_signalled() */ typedef struct { ma_async_notification_callbacks cb; ma_bool32 signalled; } ma_async_notification_poll; MA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll); MA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll); /* Event Notification This uses an ma_event. If threading is disabled (MA_NO_THREADING), initialization will fail. */ typedef struct { ma_async_notification_callbacks cb; #ifndef MA_NO_THREADING ma_event e; #endif } ma_async_notification_event; MA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent); /************************************************************************************************************************************************************ Job Queue ************************************************************************************************************************************************************/ /* Slot Allocator -------------- The idea of the slot allocator is for it to be used in conjunction with a fixed sized buffer. You use the slot allocator to allocate an index that can be used as the insertion point for an object. Slots are reference counted to help mitigate the ABA problem in the lock-free queue we use for tracking jobs. The slot index is stored in the low 32 bits. The reference counter is stored in the high 32 bits: +-----------------+-----------------+ | 32 Bits | 32 Bits | +-----------------+-----------------+ | Reference Count | Slot Index | +-----------------+-----------------+ */ typedef struct { ma_uint32 capacity; /* The number of slots to make available. */ } ma_slot_allocator_config; MA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity); typedef struct { MA_ATOMIC(4, ma_uint32) bitfield; /* Must be used atomically because the allocation and freeing routines need to make copies of this which must never be optimized away by the compiler. */ } ma_slot_allocator_group; typedef struct { ma_slot_allocator_group* pGroups; /* Slots are grouped in chunks of 32. */ ma_uint32* pSlots; /* 32 bits for reference counting for ABA mitigation. */ ma_uint32 count; /* Allocation count. */ ma_uint32 capacity; /* Memory management. */ ma_bool32 _ownsHeap; void* _pHeap; } ma_slot_allocator; MA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator); MA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator); MA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot); MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot); typedef struct ma_job ma_job; /* Callback for processing a job. Each job type will have their own processing callback which will be called by ma_job_process(). */ typedef ma_result (* ma_job_proc)(ma_job* pJob); /* When a job type is added here an callback needs to be added go "g_jobVTable" in the implementation section. */ typedef enum { /* Miscellaneous. */ MA_JOB_TYPE_QUIT = 0, MA_JOB_TYPE_CUSTOM, /* Resource Manager. */ MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER, MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM, /* Device. */ MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE, /* Count. Must always be last. */ MA_JOB_TYPE_COUNT } ma_job_type; struct ma_job { union { struct { ma_uint16 code; /* Job type. */ ma_uint16 slot; /* Index into a ma_slot_allocator. */ ma_uint32 refcount; } breakup; ma_uint64 allocation; } toc; /* 8 bytes. We encode the job code into the slot allocation data to save space. */ MA_ATOMIC(8, ma_uint64) next; /* refcount + slot for the next item. Does not include the job code. */ ma_uint32 order; /* Execution order. Used to create a data dependency and ensure a job is executed in order. Usage is contextual depending on the job type. */ union { /* Miscellaneous. */ struct { ma_job_proc proc; ma_uintptr data0; ma_uintptr data1; } custom; /* Resource Manager */ union { struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; char* pFilePath; wchar_t* pFilePathW; ma_uint32 flags; /* Resource manager data source flags that were used when initializing the data buffer. */ ma_async_notification* pInitNotification; /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. Will be passed through to MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE when decoding. */ ma_fence* pInitFence; /* Released when initialization of the decoder is complete. */ ma_fence* pDoneFence; /* Released if initialization of the decoder fails. Passed through to PAGE_DATA_BUFFER_NODE untouched if init is successful. */ } loadDataBufferNode; struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataBufferNode; struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; /*ma_decoder**/ void* pDecoder; ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. */ ma_fence* pDoneFence; /* Passed through from LOAD_DATA_BUFFER_NODE and released when the data buffer completes decoding or an error occurs. */ } pageDataBufferNode; struct { /*ma_resource_manager_data_buffer**/ void* pDataBuffer; ma_async_notification* pInitNotification; /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. */ ma_fence* pInitFence; /* Released when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_fence* pDoneFence; /* Released when the data buffer has been fully decoded. */ ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_uint32 isLooping; } loadDataBuffer; struct { /*ma_resource_manager_data_buffer**/ void* pDataBuffer; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataBuffer; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; char* pFilePath; /* Allocated when the job is posted, freed by the job thread after loading. */ wchar_t* pFilePathW; /* ^ As above ^. Only used if pFilePath is NULL. */ ma_uint64 initialSeekPoint; ma_async_notification* pInitNotification; /* Signalled after the first two pages have been decoded and frames can be read from the stream. */ ma_fence* pInitFence; } loadDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_uint32 pageIndex; /* The index of the page to decode into. */ } pageDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_uint64 frameIndex; } seekDataStream; } resourceManager; /* Device. */ union { union { struct { /*ma_device**/ void* pDevice; /*ma_device_type*/ ma_uint32 deviceType; } reroute; } aaudio; } device; } data; }; MA_API ma_job ma_job_init(ma_uint16 code); MA_API ma_result ma_job_process(ma_job* pJob); /* When set, ma_job_queue_next() will not wait and no semaphore will be signaled in ma_job_queue_post(). ma_job_queue_next() will return MA_NO_DATA_AVAILABLE if nothing is available. This flag should always be used for platforms that do not support multithreading. */ typedef enum { MA_JOB_QUEUE_FLAG_NON_BLOCKING = 0x00000001 } ma_job_queue_flags; typedef struct { ma_uint32 flags; ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. */ } ma_job_queue_config; MA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity); typedef struct { ma_uint32 flags; /* Flags passed in at initialization time. */ ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. Set by the config. */ MA_ATOMIC(8, ma_uint64) head; /* The first item in the list. Required for removing from the top of the list. */ MA_ATOMIC(8, ma_uint64) tail; /* The last item in the list. Required for appending to the end of the list. */ #ifndef MA_NO_THREADING ma_semaphore sem; /* Only used when MA_JOB_QUEUE_FLAG_NON_BLOCKING is unset. */ #endif ma_slot_allocator allocator; ma_job* pJobs; #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock lock; #endif /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_job_queue; MA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue); MA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue); MA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob); MA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob); /* Returns MA_CANCELLED if the next job is a quit job. */ /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DEVICE I/O ========== This section contains the APIs for device playback and capture. Here is where you'll find ma_device_init(), etc. ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ #ifndef MA_NO_DEVICE_IO /* Some backends are only supported on certain platforms. */ #if defined(MA_WIN32) #define MA_SUPPORT_WASAPI #if defined(MA_WIN32_DESKTOP) /* DirectSound and WinMM backends are only supported on desktops. */ #define MA_SUPPORT_DSOUND #define MA_SUPPORT_WINMM /* Don't enable JACK here if compiling with Cosmopolitan. It'll be enabled in the Linux section below. */ #if !defined(__COSMOPOLITAN__) #define MA_SUPPORT_JACK /* JACK is technically supported on Windows, but I don't know how many people use it in practice... */ #endif #endif #endif #if defined(MA_UNIX) && !defined(MA_ORBIS) && !defined(MA_PROSPERO) #if defined(MA_LINUX) #if !defined(MA_ANDROID) && !defined(__COSMOPOLITAN__) /* ALSA is not supported on Android. */ #define MA_SUPPORT_ALSA #endif #endif #if !defined(MA_BSD) && !defined(MA_ANDROID) && !defined(MA_EMSCRIPTEN) #define MA_SUPPORT_PULSEAUDIO #define MA_SUPPORT_JACK #endif #if defined(__OpenBSD__) /* <-- Change this to "#if defined(MA_BSD)" to enable sndio on all BSD flavors. */ #define MA_SUPPORT_SNDIO /* sndio is only supported on OpenBSD for now. May be expanded later if there's demand. */ #endif #if defined(__NetBSD__) || defined(__OpenBSD__) #define MA_SUPPORT_AUDIO4 /* Only support audio(4) on platforms with known support. */ #endif #if defined(__FreeBSD__) || defined(__DragonFly__) #define MA_SUPPORT_OSS /* Only support OSS on specific platforms with known support. */ #endif #endif #if defined(MA_ANDROID) #define MA_SUPPORT_AAUDIO #define MA_SUPPORT_OPENSL #endif #if defined(MA_APPLE) #define MA_SUPPORT_COREAUDIO #endif #if defined(MA_EMSCRIPTEN) #define MA_SUPPORT_WEBAUDIO #endif /* All platforms should support custom backends. */ #define MA_SUPPORT_CUSTOM /* Explicitly disable the Null backend for Emscripten because it uses a background thread which is not properly supported right now. */ #if !defined(MA_EMSCRIPTEN) #define MA_SUPPORT_NULL #endif #if defined(MA_SUPPORT_WASAPI) && !defined(MA_NO_WASAPI) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WASAPI)) #define MA_HAS_WASAPI #endif #if defined(MA_SUPPORT_DSOUND) && !defined(MA_NO_DSOUND) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_DSOUND)) #define MA_HAS_DSOUND #endif #if defined(MA_SUPPORT_WINMM) && !defined(MA_NO_WINMM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WINMM)) #define MA_HAS_WINMM #endif #if defined(MA_SUPPORT_ALSA) && !defined(MA_NO_ALSA) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_ALSA)) #define MA_HAS_ALSA #endif #if defined(MA_SUPPORT_PULSEAUDIO) && !defined(MA_NO_PULSEAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_PULSEAUDIO)) #define MA_HAS_PULSEAUDIO #endif #if defined(MA_SUPPORT_JACK) && !defined(MA_NO_JACK) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_JACK)) #define MA_HAS_JACK #endif #if defined(MA_SUPPORT_COREAUDIO) && !defined(MA_NO_COREAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_COREAUDIO)) #define MA_HAS_COREAUDIO #endif #if defined(MA_SUPPORT_SNDIO) && !defined(MA_NO_SNDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_SNDIO)) #define MA_HAS_SNDIO #endif #if defined(MA_SUPPORT_AUDIO4) && !defined(MA_NO_AUDIO4) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AUDIO4)) #define MA_HAS_AUDIO4 #endif #if defined(MA_SUPPORT_OSS) && !defined(MA_NO_OSS) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OSS)) #define MA_HAS_OSS #endif #if defined(MA_SUPPORT_AAUDIO) && !defined(MA_NO_AAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AAUDIO)) #define MA_HAS_AAUDIO #endif #if defined(MA_SUPPORT_OPENSL) && !defined(MA_NO_OPENSL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OPENSL)) #define MA_HAS_OPENSL #endif #if defined(MA_SUPPORT_WEBAUDIO) && !defined(MA_NO_WEBAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WEBAUDIO)) #define MA_HAS_WEBAUDIO #endif #if defined(MA_SUPPORT_CUSTOM) && !defined(MA_NO_CUSTOM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_CUSTOM)) #define MA_HAS_CUSTOM #endif #if defined(MA_SUPPORT_NULL) && !defined(MA_NO_NULL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_NULL)) #define MA_HAS_NULL #endif typedef enum { ma_device_state_uninitialized = 0, ma_device_state_stopped = 1, /* The device's default state after initialization. */ ma_device_state_started = 2, /* The device is started and is requesting and/or delivering audio data. */ ma_device_state_starting = 3, /* Transitioning from a stopped state to started. */ ma_device_state_stopping = 4 /* Transitioning from a started state to stopped. */ } ma_device_state; MA_ATOMIC_SAFE_TYPE_DECL(i32, 4, device_state) #ifdef MA_SUPPORT_WASAPI /* We need a IMMNotificationClient object for WASAPI. */ typedef struct { void* lpVtbl; ma_uint32 counter; ma_device* pDevice; } ma_IMMNotificationClient; #endif /* Backend enums must be in priority order. */ typedef enum { ma_backend_wasapi, ma_backend_dsound, ma_backend_winmm, ma_backend_coreaudio, ma_backend_sndio, ma_backend_audio4, ma_backend_oss, ma_backend_pulseaudio, ma_backend_alsa, ma_backend_jack, ma_backend_aaudio, ma_backend_opensl, ma_backend_webaudio, ma_backend_custom, /* <-- Custom backend, with callbacks defined by the context config. */ ma_backend_null /* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */ } ma_backend; #define MA_BACKEND_COUNT (ma_backend_null+1) /* Device job thread. This is used by backends that require asynchronous processing of certain operations. It is not used by all backends. The device job thread is made up of a thread and a job queue. You can post a job to the thread with ma_device_job_thread_post(). The thread will do the processing of the job. */ typedef struct { ma_bool32 noThread; /* Set this to true if you want to process jobs yourself. */ ma_uint32 jobQueueCapacity; ma_uint32 jobQueueFlags; } ma_device_job_thread_config; MA_API ma_device_job_thread_config ma_device_job_thread_config_init(void); typedef struct { ma_thread thread; ma_job_queue jobQueue; ma_bool32 _hasThread; } ma_device_job_thread; MA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread); MA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob); MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob); /* Device notification types. */ typedef enum { ma_device_notification_type_started, ma_device_notification_type_stopped, ma_device_notification_type_rerouted, ma_device_notification_type_interruption_began, ma_device_notification_type_interruption_ended, ma_device_notification_type_unlocked } ma_device_notification_type; typedef struct { ma_device* pDevice; ma_device_notification_type type; union { struct { int _unused; } started; struct { int _unused; } stopped; struct { int _unused; } rerouted; struct { int _unused; } interruption; } data; } ma_device_notification; /* The notification callback for when the application should be notified of a change to the device. This callback is used for notifying the application of changes such as when the device has started, stopped, rerouted or an interruption has occurred. Note that not all backends will post all notification types. For example, some backends will perform automatic stream routing without any kind of notification to the host program which means miniaudio will never know about it and will never be able to fire the rerouted notification. You should keep this in mind when designing your program. The stopped notification will *not* get fired when a device is rerouted. Parameters ---------- pNotification (in) A pointer to a structure containing information about the event. Use the `pDevice` member of this object to retrieve the relevant device. The `type` member can be used to discriminate against each of the notification types. Remarks ------- Do not restart or uninitialize the device from the callback. Not all notifications will be triggered by all backends, however the started and stopped events should be reliable for all backends. Some backends do not have a good way to detect device stoppages due to unplugging the device which may result in the stopped callback not getting fired. This has been observed with at least one BSD variant. The rerouted notification is fired *after* the reroute has occurred. The stopped notification will *not* get fired when a device is rerouted. The following backends are known to do automatic stream rerouting, but do not have a way to be notified of the change: * DirectSound The interruption notifications are used on mobile platforms for detecting when audio is interrupted due to things like an incoming phone call. Currently this is only implemented on iOS. None of the Android backends will report this notification. */ typedef void (* ma_device_notification_proc)(const ma_device_notification* pNotification); /* The callback for processing audio data from the device. The data callback is fired by miniaudio whenever the device needs to have more data delivered to a playback device, or when a capture device has some data available. This is called as soon as the backend asks for more data which means it may be called with inconsistent frame counts. You cannot assume the callback will be fired with a consistent frame count. Parameters ---------- pDevice (in) A pointer to the relevant device. pOutput (out) A pointer to the output buffer that will receive audio data that will later be played back through the speakers. This will be non-null for a playback or full-duplex device and null for a capture and loopback device. pInput (in) A pointer to the buffer containing input data from a recording device. This will be non-null for a capture, full-duplex or loopback device and null for a playback device. frameCount (in) The number of PCM frames to process. Note that this will not necessarily be equal to what you requested when you initialized the device. The `periodSizeInFrames` and `periodSizeInMilliseconds` members of the device config are just hints, and are not necessarily exactly what you'll get. You must not assume this will always be the same value each time the callback is fired. Remarks ------- You cannot stop and start the device from inside the callback or else you'll get a deadlock. You must also not uninitialize the device from inside the callback. The following APIs cannot be called from inside the callback: ma_device_init() ma_device_init_ex() ma_device_uninit() ma_device_start() ma_device_stop() The proper way to stop the device is to call `ma_device_stop()` from a different thread, normally the main application thread. */ typedef void (* ma_device_data_proc)(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount); /* DEPRECATED. Use ma_device_notification_proc instead. The callback for when the device has been stopped. This will be called when the device is stopped explicitly with `ma_device_stop()` and also called implicitly when the device is stopped through external forces such as being unplugged or an internal error occurring. Parameters ---------- pDevice (in) A pointer to the device that has just stopped. Remarks ------- Do not restart or uninitialize the device from the callback. */ typedef void (* ma_stop_proc)(ma_device* pDevice); /* DEPRECATED. Use ma_device_notification_proc instead. */ typedef enum { ma_device_type_playback = 1, ma_device_type_capture = 2, ma_device_type_duplex = ma_device_type_playback | ma_device_type_capture, /* 3 */ ma_device_type_loopback = 4 } ma_device_type; typedef enum { ma_share_mode_shared = 0, ma_share_mode_exclusive } ma_share_mode; /* iOS/tvOS/watchOS session categories. */ typedef enum { ma_ios_session_category_default = 0, /* AVAudioSessionCategoryPlayAndRecord. */ ma_ios_session_category_none, /* Leave the session category unchanged. */ ma_ios_session_category_ambient, /* AVAudioSessionCategoryAmbient */ ma_ios_session_category_solo_ambient, /* AVAudioSessionCategorySoloAmbient */ ma_ios_session_category_playback, /* AVAudioSessionCategoryPlayback */ ma_ios_session_category_record, /* AVAudioSessionCategoryRecord */ ma_ios_session_category_play_and_record, /* AVAudioSessionCategoryPlayAndRecord */ ma_ios_session_category_multi_route /* AVAudioSessionCategoryMultiRoute */ } ma_ios_session_category; /* iOS/tvOS/watchOS session category options */ typedef enum { ma_ios_session_category_option_mix_with_others = 0x01, /* AVAudioSessionCategoryOptionMixWithOthers */ ma_ios_session_category_option_duck_others = 0x02, /* AVAudioSessionCategoryOptionDuckOthers */ ma_ios_session_category_option_allow_bluetooth = 0x04, /* AVAudioSessionCategoryOptionAllowBluetooth */ ma_ios_session_category_option_default_to_speaker = 0x08, /* AVAudioSessionCategoryOptionDefaultToSpeaker */ ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others = 0x11, /* AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers */ ma_ios_session_category_option_allow_bluetooth_a2dp = 0x20, /* AVAudioSessionCategoryOptionAllowBluetoothA2DP */ ma_ios_session_category_option_allow_air_play = 0x40, /* AVAudioSessionCategoryOptionAllowAirPlay */ } ma_ios_session_category_option; /* OpenSL stream types. */ typedef enum { ma_opensl_stream_type_default = 0, /* Leaves the stream type unset. */ ma_opensl_stream_type_voice, /* SL_ANDROID_STREAM_VOICE */ ma_opensl_stream_type_system, /* SL_ANDROID_STREAM_SYSTEM */ ma_opensl_stream_type_ring, /* SL_ANDROID_STREAM_RING */ ma_opensl_stream_type_media, /* SL_ANDROID_STREAM_MEDIA */ ma_opensl_stream_type_alarm, /* SL_ANDROID_STREAM_ALARM */ ma_opensl_stream_type_notification /* SL_ANDROID_STREAM_NOTIFICATION */ } ma_opensl_stream_type; /* OpenSL recording presets. */ typedef enum { ma_opensl_recording_preset_default = 0, /* Leaves the input preset unset. */ ma_opensl_recording_preset_generic, /* SL_ANDROID_RECORDING_PRESET_GENERIC */ ma_opensl_recording_preset_camcorder, /* SL_ANDROID_RECORDING_PRESET_CAMCORDER */ ma_opensl_recording_preset_voice_recognition, /* SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION */ ma_opensl_recording_preset_voice_communication, /* SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION */ ma_opensl_recording_preset_voice_unprocessed /* SL_ANDROID_RECORDING_PRESET_UNPROCESSED */ } ma_opensl_recording_preset; /* WASAPI audio thread priority characteristics. */ typedef enum { ma_wasapi_usage_default = 0, ma_wasapi_usage_games, ma_wasapi_usage_pro_audio, } ma_wasapi_usage; /* AAudio usage types. */ typedef enum { ma_aaudio_usage_default = 0, /* Leaves the usage type unset. */ ma_aaudio_usage_media, /* AAUDIO_USAGE_MEDIA */ ma_aaudio_usage_voice_communication, /* AAUDIO_USAGE_VOICE_COMMUNICATION */ ma_aaudio_usage_voice_communication_signalling, /* AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING */ ma_aaudio_usage_alarm, /* AAUDIO_USAGE_ALARM */ ma_aaudio_usage_notification, /* AAUDIO_USAGE_NOTIFICATION */ ma_aaudio_usage_notification_ringtone, /* AAUDIO_USAGE_NOTIFICATION_RINGTONE */ ma_aaudio_usage_notification_event, /* AAUDIO_USAGE_NOTIFICATION_EVENT */ ma_aaudio_usage_assistance_accessibility, /* AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY */ ma_aaudio_usage_assistance_navigation_guidance, /* AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE */ ma_aaudio_usage_assistance_sonification, /* AAUDIO_USAGE_ASSISTANCE_SONIFICATION */ ma_aaudio_usage_game, /* AAUDIO_USAGE_GAME */ ma_aaudio_usage_assitant, /* AAUDIO_USAGE_ASSISTANT */ ma_aaudio_usage_emergency, /* AAUDIO_SYSTEM_USAGE_EMERGENCY */ ma_aaudio_usage_safety, /* AAUDIO_SYSTEM_USAGE_SAFETY */ ma_aaudio_usage_vehicle_status, /* AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS */ ma_aaudio_usage_announcement /* AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT */ } ma_aaudio_usage; /* AAudio content types. */ typedef enum { ma_aaudio_content_type_default = 0, /* Leaves the content type unset. */ ma_aaudio_content_type_speech, /* AAUDIO_CONTENT_TYPE_SPEECH */ ma_aaudio_content_type_music, /* AAUDIO_CONTENT_TYPE_MUSIC */ ma_aaudio_content_type_movie, /* AAUDIO_CONTENT_TYPE_MOVIE */ ma_aaudio_content_type_sonification /* AAUDIO_CONTENT_TYPE_SONIFICATION */ } ma_aaudio_content_type; /* AAudio input presets. */ typedef enum { ma_aaudio_input_preset_default = 0, /* Leaves the input preset unset. */ ma_aaudio_input_preset_generic, /* AAUDIO_INPUT_PRESET_GENERIC */ ma_aaudio_input_preset_camcorder, /* AAUDIO_INPUT_PRESET_CAMCORDER */ ma_aaudio_input_preset_voice_recognition, /* AAUDIO_INPUT_PRESET_VOICE_RECOGNITION */ ma_aaudio_input_preset_voice_communication, /* AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION */ ma_aaudio_input_preset_unprocessed, /* AAUDIO_INPUT_PRESET_UNPROCESSED */ ma_aaudio_input_preset_voice_performance /* AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE */ } ma_aaudio_input_preset; typedef enum { ma_aaudio_allow_capture_default = 0, /* Leaves the allowed capture policy unset. */ ma_aaudio_allow_capture_by_all, /* AAUDIO_ALLOW_CAPTURE_BY_ALL */ ma_aaudio_allow_capture_by_system, /* AAUDIO_ALLOW_CAPTURE_BY_SYSTEM */ ma_aaudio_allow_capture_by_none /* AAUDIO_ALLOW_CAPTURE_BY_NONE */ } ma_aaudio_allowed_capture_policy; typedef union { ma_int64 counter; double counterD; } ma_timer; typedef union { ma_wchar_win32 wasapi[64]; /* WASAPI uses a wchar_t string for identification. */ ma_uint8 dsound[16]; /* DirectSound uses a GUID for identification. */ /*UINT_PTR*/ ma_uint32 winmm; /* When creating a device, WinMM expects a Win32 UINT_PTR for device identification. In practice it's actually just a UINT. */ char alsa[256]; /* ALSA uses a name string for identification. */ char pulse[256]; /* PulseAudio uses a name string for identification. */ int jack; /* JACK always uses default devices. */ char coreaudio[256]; /* Core Audio uses a string for identification. */ char sndio[256]; /* "snd/0", etc. */ char audio4[256]; /* "/dev/audio", etc. */ char oss[64]; /* "dev/dsp0", etc. "dev/dsp" for the default device. */ ma_int32 aaudio; /* AAudio uses a 32-bit integer for identification. */ ma_uint32 opensl; /* OpenSL|ES uses a 32-bit unsigned integer for identification. */ char webaudio[32]; /* Web Audio always uses default devices for now, but if this changes it'll be a GUID. */ union { int i; char s[256]; void* p; } custom; /* The custom backend could be anything. Give them a few options. */ int nullbackend; /* The null backend uses an integer for device IDs. */ } ma_device_id; MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB); typedef struct ma_context_config ma_context_config; typedef struct ma_device_config ma_device_config; typedef struct ma_backend_callbacks ma_backend_callbacks; #define MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE (1U << 1) /* If set, this is supported in exclusive mode. Otherwise not natively supported by exclusive mode. */ #ifndef MA_MAX_DEVICE_NAME_LENGTH #define MA_MAX_DEVICE_NAME_LENGTH 255 #endif typedef struct { /* Basic info. This is the only information guaranteed to be filled in during device enumeration. */ ma_device_id id; char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* +1 for null terminator. */ ma_bool32 isDefault; ma_uint32 nativeDataFormatCount; struct { ma_format format; /* Sample format. If set to ma_format_unknown, all sample formats are supported. */ ma_uint32 channels; /* If set to 0, all channels are supported. */ ma_uint32 sampleRate; /* If set to 0, all sample rates are supported. */ ma_uint32 flags; /* A combination of MA_DATA_FORMAT_FLAG_* flags. */ } nativeDataFormats[/*ma_format_count * ma_standard_sample_rate_count * MA_MAX_CHANNELS*/ 64]; /* Not sure how big to make this. There can be *many* permutations for virtual devices which can support anything. */ } ma_device_info; struct ma_device_config { ma_device_type deviceType; ma_uint32 sampleRate; ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInMilliseconds; ma_uint32 periods; ma_performance_profile performanceProfile; ma_bool8 noPreSilencedOutputBuffer; /* When set to true, the contents of the output buffer passed into the data callback will be left undefined rather than initialized to silence. */ ma_bool8 noClip; /* When set to true, the contents of the output buffer passed into the data callback will not be clipped after returning. Only applies when the playback sample format is f32. */ ma_bool8 noDisableDenormals; /* Do not disable denormals when firing the data callback. */ ma_bool8 noFixedSizedCallback; /* Disables strict fixed-sized data callbacks. Setting this to true will result in the period size being treated only as a hint to the backend. This is an optimization for those who don't need fixed sized callbacks. */ ma_device_data_proc dataCallback; ma_device_notification_proc notificationCallback; ma_stop_proc stopCallback; void* pUserData; ma_resampler_config resampling; struct { const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ ma_share_mode shareMode; } playback; struct { const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ ma_share_mode shareMode; } capture; struct { ma_wasapi_usage usage; /* When configured, uses Avrt APIs to set the thread characteristics. */ ma_bool8 noAutoConvertSRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ ma_bool8 noDefaultQualitySRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */ ma_bool8 noAutoStreamRouting; /* Disables automatic stream routing. */ ma_bool8 noHardwareOffloading; /* Disables WASAPI's hardware offloading feature. */ ma_uint32 loopbackProcessID; /* The process ID to include or exclude for loopback mode. Set to 0 to capture audio from all processes. Ignored when an explicit device ID is specified. */ ma_bool8 loopbackProcessExclude; /* When set to true, excludes the process specified by loopbackProcessID. By default, the process will be included. */ } wasapi; struct { ma_bool32 noMMap; /* Disables MMap mode. */ ma_bool32 noAutoFormat; /* Opens the ALSA device with SND_PCM_NO_AUTO_FORMAT. */ ma_bool32 noAutoChannels; /* Opens the ALSA device with SND_PCM_NO_AUTO_CHANNELS. */ ma_bool32 noAutoResample; /* Opens the ALSA device with SND_PCM_NO_AUTO_RESAMPLE. */ } alsa; struct { const char* pStreamNamePlayback; const char* pStreamNameCapture; int channelMap; } pulse; struct { ma_bool32 allowNominalSampleRateChange; /* Desktop only. When enabled, allows changing of the sample rate at the operating system level. */ } coreaudio; struct { ma_opensl_stream_type streamType; ma_opensl_recording_preset recordingPreset; ma_bool32 enableCompatibilityWorkarounds; } opensl; struct { ma_aaudio_usage usage; ma_aaudio_content_type contentType; ma_aaudio_input_preset inputPreset; ma_aaudio_allowed_capture_policy allowedCapturePolicy; ma_bool32 noAutoStartAfterReroute; ma_bool32 enableCompatibilityWorkarounds; ma_bool32 allowSetBufferCapacity; } aaudio; }; /* The callback for handling device enumeration. This is fired from `ma_context_enumerate_devices()`. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. deviceType (in) The type of the device being enumerated. This will always be either `ma_device_type_playback` or `ma_device_type_capture`. pInfo (in) A pointer to a `ma_device_info` containing the ID and name of the enumerated device. Note that this will not include detailed information about the device, only basic information (ID and name). The reason for this is that it would otherwise require opening the backend device to probe for the information which is too inefficient. pUserData (in) The user data pointer passed into `ma_context_enumerate_devices()`. */ typedef ma_bool32 (* ma_enum_devices_callback_proc)(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData); /* Describes some basic details about a playback or capture device. */ typedef struct { const ma_device_id* pDeviceID; ma_share_mode shareMode; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_channel channelMap[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInMilliseconds; ma_uint32 periodCount; } ma_device_descriptor; /* These are the callbacks required to be implemented for a backend. These callbacks are grouped into two parts: context and device. There is one context to many devices. A device is created from a context. The general flow goes like this: 1) A context is created with `onContextInit()` 1a) Available devices can be enumerated with `onContextEnumerateDevices()` if required. 1b) Detailed information about a device can be queried with `onContextGetDeviceInfo()` if required. 2) A device is created from the context that was created in the first step using `onDeviceInit()`, and optionally a device ID that was selected from device enumeration via `onContextEnumerateDevices()`. 3) A device is started or stopped with `onDeviceStart()` / `onDeviceStop()` 4) Data is delivered to and from the device by the backend. This is always done based on the native format returned by the prior call to `onDeviceInit()`. Conversion between the device's native format and the format requested by the application will be handled by miniaudio internally. Initialization of the context is quite simple. You need to do any necessary initialization of internal objects and then output the callbacks defined in this structure. Once the context has been initialized you can initialize a device. Before doing so, however, the application may want to know which physical devices are available. This is where `onContextEnumerateDevices()` comes in. This is fairly simple. For each device, fire the given callback with, at a minimum, the basic information filled out in `ma_device_info`. When the callback returns `MA_FALSE`, enumeration needs to stop and the `onContextEnumerateDevices()` function returns with a success code. Detailed device information can be retrieved from a device ID using `onContextGetDeviceInfo()`. This takes as input the device type and ID, and on output returns detailed information about the device in `ma_device_info`. The `onContextGetDeviceInfo()` callback must handle the case when the device ID is NULL, in which case information about the default device needs to be retrieved. Once the context has been created and the device ID retrieved (if using anything other than the default device), the device can be created. This is a little bit more complicated than initialization of the context due to its more complicated configuration. When initializing a device, a duplex device may be requested. This means a separate data format needs to be specified for both playback and capture. On input, the data format is set to what the application wants. On output it's set to the native format which should match as closely as possible to the requested format. The conversion between the format requested by the application and the device's native format will be handled internally by miniaudio. On input, if the sample format is set to `ma_format_unknown`, the backend is free to use whatever sample format it desires, so long as it's supported by miniaudio. When the channel count is set to 0, the backend should use the device's native channel count. The same applies for sample rate. For the channel map, the default should be used when `ma_channel_map_is_blank()` returns true (all channels set to `MA_CHANNEL_NONE`). On input, the `periodSizeInFrames` or `periodSizeInMilliseconds` option should always be set. The backend should inspect both of these variables. If `periodSizeInFrames` is set, it should take priority, otherwise it needs to be derived from the period size in milliseconds (`periodSizeInMilliseconds`) and the sample rate, keeping in mind that the sample rate may be 0, in which case the sample rate will need to be determined before calculating the period size in frames. On output, all members of the `ma_device_descriptor` object should be set to a valid value, except for `periodSizeInMilliseconds` which is optional (`periodSizeInFrames` *must* be set). Starting and stopping of the device is done with `onDeviceStart()` and `onDeviceStop()` and should be self-explanatory. If the backend uses asynchronous reading and writing, `onDeviceStart()` and `onDeviceStop()` should always be implemented. The handling of data delivery between the application and the device is the most complicated part of the process. To make this a bit easier, some helper callbacks are available. If the backend uses a blocking read/write style of API, the `onDeviceRead()` and `onDeviceWrite()` callbacks can optionally be implemented. These are blocking and work just like reading and writing from a file. If the backend uses a callback for data delivery, that callback must call `ma_device_handle_backend_data_callback()` from within its callback. This allows miniaudio to then process any necessary data conversion and then pass it to the miniaudio data callback. If the backend requires absolute flexibility with its data delivery, it can optionally implement the `onDeviceDataLoop()` callback which will allow it to implement the logic that will run on the audio thread. This is much more advanced and is completely optional. The audio thread should run data delivery logic in a loop while `ma_device_get_state() == ma_device_state_started` and no errors have been encountered. Do not start or stop the device here. That will be handled from outside the `onDeviceDataLoop()` callback. The invocation of the `onDeviceDataLoop()` callback will be handled by miniaudio. When you start the device, miniaudio will fire this callback. When the device is stopped, the `ma_device_get_state() == ma_device_state_started` condition will fail and the loop will be terminated which will then fall through to the part that stops the device. For an example on how to implement the `onDeviceDataLoop()` callback, look at `ma_device_audio_thread__default_read_write()`. Implement the `onDeviceDataLoopWakeup()` callback if you need a mechanism to wake up the audio thread. If the backend supports an optimized retrieval of device information from an initialized `ma_device` object, it should implement the `onDeviceGetInfo()` callback. This is optional, in which case it will fall back to `onContextGetDeviceInfo()` which is less efficient. */ struct ma_backend_callbacks { ma_result (* onContextInit)(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks); ma_result (* onContextUninit)(ma_context* pContext); ma_result (* onContextEnumerateDevices)(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData); ma_result (* onContextGetDeviceInfo)(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo); ma_result (* onDeviceInit)(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture); ma_result (* onDeviceUninit)(ma_device* pDevice); ma_result (* onDeviceStart)(ma_device* pDevice); ma_result (* onDeviceStop)(ma_device* pDevice); ma_result (* onDeviceRead)(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead); ma_result (* onDeviceWrite)(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten); ma_result (* onDeviceDataLoop)(ma_device* pDevice); ma_result (* onDeviceDataLoopWakeup)(ma_device* pDevice); ma_result (* onDeviceGetInfo)(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo); }; struct ma_context_config { ma_log* pLog; ma_thread_priority threadPriority; size_t threadStackSize; void* pUserData; ma_allocation_callbacks allocationCallbacks; struct { ma_handle hWnd; /* HWND. Optional window handle to pass into SetCooperativeLevel(). Will default to the foreground window, and if that fails, the desktop window. */ } dsound; struct { ma_bool32 useVerboseDeviceEnumeration; } alsa; struct { const char* pApplicationName; const char* pServerName; ma_bool32 tryAutoSpawn; /* Enables autospawning of the PulseAudio daemon if necessary. */ } pulse; struct { ma_ios_session_category sessionCategory; ma_uint32 sessionCategoryOptions; ma_bool32 noAudioSessionActivate; /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization. */ ma_bool32 noAudioSessionDeactivate; /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization. */ } coreaudio; struct { const char* pClientName; ma_bool32 tryStartServer; } jack; ma_backend_callbacks custom; }; /* WASAPI specific structure for some commands which must run on a common thread due to bugs in WASAPI. */ typedef struct { int code; ma_event* pEvent; /* This will be signalled when the event is complete. */ union { struct { int _unused; } quit; struct { ma_device_type deviceType; void* pAudioClient; void** ppAudioClientService; ma_result* pResult; /* The result from creating the audio client service. */ } createAudioClient; struct { ma_device* pDevice; ma_device_type deviceType; } releaseAudioClient; } data; } ma_context_command__wasapi; struct ma_context { ma_backend_callbacks callbacks; ma_backend backend; /* DirectSound, ALSA, etc. */ ma_log* pLog; ma_log log; /* Only used if the log is owned by the context. The pLog member will be set to &log in this case. */ ma_thread_priority threadPriority; size_t threadStackSize; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_mutex deviceEnumLock; /* Used to make ma_context_get_devices() thread safe. */ ma_mutex deviceInfoLock; /* Used to make ma_context_get_device_info() thread safe. */ ma_uint32 deviceInfoCapacity; /* Total capacity of pDeviceInfos. */ ma_uint32 playbackDeviceInfoCount; ma_uint32 captureDeviceInfoCount; ma_device_info* pDeviceInfos; /* Playback devices first, then capture. */ union { #ifdef MA_SUPPORT_WASAPI struct { ma_thread commandThread; ma_mutex commandLock; ma_semaphore commandSem; ma_uint32 commandIndex; ma_uint32 commandCount; ma_context_command__wasapi commands[4]; ma_handle hAvrt; ma_proc AvSetMmThreadCharacteristicsA; ma_proc AvRevertMmThreadcharacteristics; ma_handle hMMDevapi; ma_proc ActivateAudioInterfaceAsync; } wasapi; #endif #ifdef MA_SUPPORT_DSOUND struct { ma_handle hWnd; /* Can be null. */ ma_handle hDSoundDLL; ma_proc DirectSoundCreate; ma_proc DirectSoundEnumerateA; ma_proc DirectSoundCaptureCreate; ma_proc DirectSoundCaptureEnumerateA; } dsound; #endif #ifdef MA_SUPPORT_WINMM struct { ma_handle hWinMM; ma_proc waveOutGetNumDevs; ma_proc waveOutGetDevCapsA; ma_proc waveOutOpen; ma_proc waveOutClose; ma_proc waveOutPrepareHeader; ma_proc waveOutUnprepareHeader; ma_proc waveOutWrite; ma_proc waveOutReset; ma_proc waveInGetNumDevs; ma_proc waveInGetDevCapsA; ma_proc waveInOpen; ma_proc waveInClose; ma_proc waveInPrepareHeader; ma_proc waveInUnprepareHeader; ma_proc waveInAddBuffer; ma_proc waveInStart; ma_proc waveInReset; } winmm; #endif #ifdef MA_SUPPORT_ALSA struct { ma_handle asoundSO; ma_proc snd_pcm_open; ma_proc snd_pcm_close; ma_proc snd_pcm_hw_params_sizeof; ma_proc snd_pcm_hw_params_any; ma_proc snd_pcm_hw_params_set_format; ma_proc snd_pcm_hw_params_set_format_first; ma_proc snd_pcm_hw_params_get_format_mask; ma_proc snd_pcm_hw_params_set_channels; ma_proc snd_pcm_hw_params_set_channels_near; ma_proc snd_pcm_hw_params_set_channels_minmax; ma_proc snd_pcm_hw_params_set_rate_resample; ma_proc snd_pcm_hw_params_set_rate; ma_proc snd_pcm_hw_params_set_rate_near; ma_proc snd_pcm_hw_params_set_buffer_size_near; ma_proc snd_pcm_hw_params_set_periods_near; ma_proc snd_pcm_hw_params_set_access; ma_proc snd_pcm_hw_params_get_format; ma_proc snd_pcm_hw_params_get_channels; ma_proc snd_pcm_hw_params_get_channels_min; ma_proc snd_pcm_hw_params_get_channels_max; ma_proc snd_pcm_hw_params_get_rate; ma_proc snd_pcm_hw_params_get_rate_min; ma_proc snd_pcm_hw_params_get_rate_max; ma_proc snd_pcm_hw_params_get_buffer_size; ma_proc snd_pcm_hw_params_get_periods; ma_proc snd_pcm_hw_params_get_access; ma_proc snd_pcm_hw_params_test_format; ma_proc snd_pcm_hw_params_test_channels; ma_proc snd_pcm_hw_params_test_rate; ma_proc snd_pcm_hw_params; ma_proc snd_pcm_sw_params_sizeof; ma_proc snd_pcm_sw_params_current; ma_proc snd_pcm_sw_params_get_boundary; ma_proc snd_pcm_sw_params_set_avail_min; ma_proc snd_pcm_sw_params_set_start_threshold; ma_proc snd_pcm_sw_params_set_stop_threshold; ma_proc snd_pcm_sw_params; ma_proc snd_pcm_format_mask_sizeof; ma_proc snd_pcm_format_mask_test; ma_proc snd_pcm_get_chmap; ma_proc snd_pcm_state; ma_proc snd_pcm_prepare; ma_proc snd_pcm_start; ma_proc snd_pcm_drop; ma_proc snd_pcm_drain; ma_proc snd_pcm_reset; ma_proc snd_device_name_hint; ma_proc snd_device_name_get_hint; ma_proc snd_card_get_index; ma_proc snd_device_name_free_hint; ma_proc snd_pcm_mmap_begin; ma_proc snd_pcm_mmap_commit; ma_proc snd_pcm_recover; ma_proc snd_pcm_readi; ma_proc snd_pcm_writei; ma_proc snd_pcm_avail; ma_proc snd_pcm_avail_update; ma_proc snd_pcm_wait; ma_proc snd_pcm_nonblock; ma_proc snd_pcm_info; ma_proc snd_pcm_info_sizeof; ma_proc snd_pcm_info_get_name; ma_proc snd_pcm_poll_descriptors; ma_proc snd_pcm_poll_descriptors_count; ma_proc snd_pcm_poll_descriptors_revents; ma_proc snd_config_update_free_global; ma_mutex internalDeviceEnumLock; ma_bool32 useVerboseDeviceEnumeration; } alsa; #endif #ifdef MA_SUPPORT_PULSEAUDIO struct { ma_handle pulseSO; ma_proc pa_mainloop_new; ma_proc pa_mainloop_free; ma_proc pa_mainloop_quit; ma_proc pa_mainloop_get_api; ma_proc pa_mainloop_iterate; ma_proc pa_mainloop_wakeup; ma_proc pa_threaded_mainloop_new; ma_proc pa_threaded_mainloop_free; ma_proc pa_threaded_mainloop_start; ma_proc pa_threaded_mainloop_stop; ma_proc pa_threaded_mainloop_lock; ma_proc pa_threaded_mainloop_unlock; ma_proc pa_threaded_mainloop_wait; ma_proc pa_threaded_mainloop_signal; ma_proc pa_threaded_mainloop_accept; ma_proc pa_threaded_mainloop_get_retval; ma_proc pa_threaded_mainloop_get_api; ma_proc pa_threaded_mainloop_in_thread; ma_proc pa_threaded_mainloop_set_name; ma_proc pa_context_new; ma_proc pa_context_unref; ma_proc pa_context_connect; ma_proc pa_context_disconnect; ma_proc pa_context_set_state_callback; ma_proc pa_context_get_state; ma_proc pa_context_get_sink_info_list; ma_proc pa_context_get_source_info_list; ma_proc pa_context_get_sink_info_by_name; ma_proc pa_context_get_source_info_by_name; ma_proc pa_operation_unref; ma_proc pa_operation_get_state; ma_proc pa_channel_map_init_extend; ma_proc pa_channel_map_valid; ma_proc pa_channel_map_compatible; ma_proc pa_stream_new; ma_proc pa_stream_unref; ma_proc pa_stream_connect_playback; ma_proc pa_stream_connect_record; ma_proc pa_stream_disconnect; ma_proc pa_stream_get_state; ma_proc pa_stream_get_sample_spec; ma_proc pa_stream_get_channel_map; ma_proc pa_stream_get_buffer_attr; ma_proc pa_stream_set_buffer_attr; ma_proc pa_stream_get_device_name; ma_proc pa_stream_set_write_callback; ma_proc pa_stream_set_read_callback; ma_proc pa_stream_set_suspended_callback; ma_proc pa_stream_set_moved_callback; ma_proc pa_stream_is_suspended; ma_proc pa_stream_flush; ma_proc pa_stream_drain; ma_proc pa_stream_is_corked; ma_proc pa_stream_cork; ma_proc pa_stream_trigger; ma_proc pa_stream_begin_write; ma_proc pa_stream_write; ma_proc pa_stream_peek; ma_proc pa_stream_drop; ma_proc pa_stream_writable_size; ma_proc pa_stream_readable_size; /*pa_mainloop**/ ma_ptr pMainLoop; /*pa_context**/ ma_ptr pPulseContext; char* pApplicationName; /* Set when the context is initialized. Used by devices for their local pa_context objects. */ char* pServerName; /* Set when the context is initialized. Used by devices for their local pa_context objects. */ } pulse; #endif #ifdef MA_SUPPORT_JACK struct { ma_handle jackSO; ma_proc jack_client_open; ma_proc jack_client_close; ma_proc jack_client_name_size; ma_proc jack_set_process_callback; ma_proc jack_set_buffer_size_callback; ma_proc jack_on_shutdown; ma_proc jack_get_sample_rate; ma_proc jack_get_buffer_size; ma_proc jack_get_ports; ma_proc jack_activate; ma_proc jack_deactivate; ma_proc jack_connect; ma_proc jack_port_register; ma_proc jack_port_name; ma_proc jack_port_get_buffer; ma_proc jack_free; char* pClientName; ma_bool32 tryStartServer; } jack; #endif #ifdef MA_SUPPORT_COREAUDIO struct { ma_handle hCoreFoundation; ma_proc CFStringGetCString; ma_proc CFRelease; ma_handle hCoreAudio; ma_proc AudioObjectGetPropertyData; ma_proc AudioObjectGetPropertyDataSize; ma_proc AudioObjectSetPropertyData; ma_proc AudioObjectAddPropertyListener; ma_proc AudioObjectRemovePropertyListener; ma_handle hAudioUnit; /* Could possibly be set to AudioToolbox on later versions of macOS. */ ma_proc AudioComponentFindNext; ma_proc AudioComponentInstanceDispose; ma_proc AudioComponentInstanceNew; ma_proc AudioOutputUnitStart; ma_proc AudioOutputUnitStop; ma_proc AudioUnitAddPropertyListener; ma_proc AudioUnitGetPropertyInfo; ma_proc AudioUnitGetProperty; ma_proc AudioUnitSetProperty; ma_proc AudioUnitInitialize; ma_proc AudioUnitRender; /*AudioComponent*/ ma_ptr component; ma_bool32 noAudioSessionDeactivate; /* For tracking whether or not the iOS audio session should be explicitly deactivated. Set from the config in ma_context_init__coreaudio(). */ } coreaudio; #endif #ifdef MA_SUPPORT_SNDIO struct { ma_handle sndioSO; ma_proc sio_open; ma_proc sio_close; ma_proc sio_setpar; ma_proc sio_getpar; ma_proc sio_getcap; ma_proc sio_start; ma_proc sio_stop; ma_proc sio_read; ma_proc sio_write; ma_proc sio_onmove; ma_proc sio_nfds; ma_proc sio_pollfd; ma_proc sio_revents; ma_proc sio_eof; ma_proc sio_setvol; ma_proc sio_onvol; ma_proc sio_initpar; } sndio; #endif #ifdef MA_SUPPORT_AUDIO4 struct { int _unused; } audio4; #endif #ifdef MA_SUPPORT_OSS struct { int versionMajor; int versionMinor; } oss; #endif #ifdef MA_SUPPORT_AAUDIO struct { ma_handle hAAudio; /* libaaudio.so */ ma_proc AAudio_createStreamBuilder; ma_proc AAudioStreamBuilder_delete; ma_proc AAudioStreamBuilder_setDeviceId; ma_proc AAudioStreamBuilder_setDirection; ma_proc AAudioStreamBuilder_setSharingMode; ma_proc AAudioStreamBuilder_setFormat; ma_proc AAudioStreamBuilder_setChannelCount; ma_proc AAudioStreamBuilder_setSampleRate; ma_proc AAudioStreamBuilder_setBufferCapacityInFrames; ma_proc AAudioStreamBuilder_setFramesPerDataCallback; ma_proc AAudioStreamBuilder_setDataCallback; ma_proc AAudioStreamBuilder_setErrorCallback; ma_proc AAudioStreamBuilder_setPerformanceMode; ma_proc AAudioStreamBuilder_setUsage; ma_proc AAudioStreamBuilder_setContentType; ma_proc AAudioStreamBuilder_setInputPreset; ma_proc AAudioStreamBuilder_setAllowedCapturePolicy; ma_proc AAudioStreamBuilder_openStream; ma_proc AAudioStream_close; ma_proc AAudioStream_getState; ma_proc AAudioStream_waitForStateChange; ma_proc AAudioStream_getFormat; ma_proc AAudioStream_getChannelCount; ma_proc AAudioStream_getSampleRate; ma_proc AAudioStream_getBufferCapacityInFrames; ma_proc AAudioStream_getFramesPerDataCallback; ma_proc AAudioStream_getFramesPerBurst; ma_proc AAudioStream_requestStart; ma_proc AAudioStream_requestStop; ma_device_job_thread jobThread; /* For processing operations outside of the error callback, specifically device disconnections and rerouting. */ } aaudio; #endif #ifdef MA_SUPPORT_OPENSL struct { ma_handle libOpenSLES; ma_handle SL_IID_ENGINE; ma_handle SL_IID_AUDIOIODEVICECAPABILITIES; ma_handle SL_IID_ANDROIDSIMPLEBUFFERQUEUE; ma_handle SL_IID_RECORD; ma_handle SL_IID_PLAY; ma_handle SL_IID_OUTPUTMIX; ma_handle SL_IID_ANDROIDCONFIGURATION; ma_proc slCreateEngine; } opensl; #endif #ifdef MA_SUPPORT_WEBAUDIO struct { int _unused; } webaudio; #endif #ifdef MA_SUPPORT_NULL struct { int _unused; } null_backend; #endif }; union { #if defined(MA_WIN32) struct { /*HMODULE*/ ma_handle hOle32DLL; ma_proc CoInitialize; ma_proc CoInitializeEx; ma_proc CoUninitialize; ma_proc CoCreateInstance; ma_proc CoTaskMemFree; ma_proc PropVariantClear; ma_proc StringFromGUID2; /*HMODULE*/ ma_handle hUser32DLL; ma_proc GetForegroundWindow; ma_proc GetDesktopWindow; /*HMODULE*/ ma_handle hAdvapi32DLL; ma_proc RegOpenKeyExA; ma_proc RegCloseKey; ma_proc RegQueryValueExA; /*HRESULT*/ long CoInitializeResult; } win32; #endif #ifdef MA_POSIX struct { int _unused; } posix; #endif int _unused; }; }; struct ma_device { ma_context* pContext; ma_device_type type; ma_uint32 sampleRate; ma_atomic_device_state state; /* The state of the device is variable and can change at any time on any thread. Must be used atomically. */ ma_device_data_proc onData; /* Set once at initialization time and should not be changed after. */ ma_device_notification_proc onNotification; /* Set once at initialization time and should not be changed after. */ ma_stop_proc onStop; /* DEPRECATED. Use the notification callback instead. Set once at initialization time and should not be changed after. */ void* pUserData; /* Application defined data. */ ma_mutex startStopLock; ma_event wakeupEvent; ma_event startEvent; ma_event stopEvent; ma_thread thread; ma_result workResult; /* This is set by the worker thread after it's finished doing a job. */ ma_bool8 isOwnerOfContext; /* When set to true, uninitializing the device will also uninitialize the context. Set to true when NULL is passed into ma_device_init(). */ ma_bool8 noPreSilencedOutputBuffer; ma_bool8 noClip; ma_bool8 noDisableDenormals; ma_bool8 noFixedSizedCallback; ma_atomic_float masterVolumeFactor; /* Linear 0..1. Can be read and written simultaneously by different threads. Must be used atomically. */ ma_duplex_rb duplexRB; /* Intermediary buffer for duplex device on asynchronous backends. */ struct { ma_resample_algorithm algorithm; ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; struct { ma_uint32 lpfOrder; } linear; } resampling; struct { ma_device_id* pID; /* Set to NULL if using default ID, otherwise set to the address of "id". */ ma_device_id id; /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */ char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* Maybe temporary. Likely to be replaced with a query API. */ ma_share_mode shareMode; /* Set to whatever was passed in when the device was initialized. */ ma_format format; ma_uint32 channels; ma_channel channelMap[MA_MAX_CHANNELS]; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; ma_data_converter converter; void* pIntermediaryBuffer; /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */ ma_uint32 intermediaryBufferCap; ma_uint32 intermediaryBufferLen; /* How many valid frames are sitting in the intermediary buffer. */ void* pInputCache; /* In external format. Can be null. */ ma_uint64 inputCacheCap; ma_uint64 inputCacheConsumed; ma_uint64 inputCacheRemaining; } playback; struct { ma_device_id* pID; /* Set to NULL if using default ID, otherwise set to the address of "id". */ ma_device_id id; /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */ char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* Maybe temporary. Likely to be replaced with a query API. */ ma_share_mode shareMode; /* Set to whatever was passed in when the device was initialized. */ ma_format format; ma_uint32 channels; ma_channel channelMap[MA_MAX_CHANNELS]; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; ma_data_converter converter; void* pIntermediaryBuffer; /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */ ma_uint32 intermediaryBufferCap; ma_uint32 intermediaryBufferLen; /* How many valid frames are sitting in the intermediary buffer. */ } capture; union { #ifdef MA_SUPPORT_WASAPI struct { /*IAudioClient**/ ma_ptr pAudioClientPlayback; /*IAudioClient**/ ma_ptr pAudioClientCapture; /*IAudioRenderClient**/ ma_ptr pRenderClient; /*IAudioCaptureClient**/ ma_ptr pCaptureClient; /*IMMDeviceEnumerator**/ ma_ptr pDeviceEnumerator; /* Used for IMMNotificationClient notifications. Required for detecting default device changes. */ ma_IMMNotificationClient notificationClient; /*HANDLE*/ ma_handle hEventPlayback; /* Auto reset. Initialized to signaled. */ /*HANDLE*/ ma_handle hEventCapture; /* Auto reset. Initialized to unsignaled. */ ma_uint32 actualBufferSizeInFramesPlayback; /* Value from GetBufferSize(). internalPeriodSizeInFrames is not set to the _actual_ buffer size when low-latency shared mode is being used due to the way the IAudioClient3 API works. */ ma_uint32 actualBufferSizeInFramesCapture; ma_uint32 originalPeriodSizeInFrames; ma_uint32 originalPeriodSizeInMilliseconds; ma_uint32 originalPeriods; ma_performance_profile originalPerformanceProfile; ma_uint32 periodSizeInFramesPlayback; ma_uint32 periodSizeInFramesCapture; void* pMappedBufferCapture; ma_uint32 mappedBufferCaptureCap; ma_uint32 mappedBufferCaptureLen; void* pMappedBufferPlayback; ma_uint32 mappedBufferPlaybackCap; ma_uint32 mappedBufferPlaybackLen; ma_atomic_bool32 isStartedCapture; /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */ ma_atomic_bool32 isStartedPlayback; /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */ ma_uint32 loopbackProcessID; ma_bool8 loopbackProcessExclude; ma_bool8 noAutoConvertSRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ ma_bool8 noDefaultQualitySRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */ ma_bool8 noHardwareOffloading; ma_bool8 allowCaptureAutoStreamRouting; ma_bool8 allowPlaybackAutoStreamRouting; ma_bool8 isDetachedPlayback; ma_bool8 isDetachedCapture; ma_wasapi_usage usage; void* hAvrtHandle; ma_mutex rerouteLock; } wasapi; #endif #ifdef MA_SUPPORT_DSOUND struct { /*LPDIRECTSOUND*/ ma_ptr pPlayback; /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackPrimaryBuffer; /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackBuffer; /*LPDIRECTSOUNDCAPTURE*/ ma_ptr pCapture; /*LPDIRECTSOUNDCAPTUREBUFFER*/ ma_ptr pCaptureBuffer; } dsound; #endif #ifdef MA_SUPPORT_WINMM struct { /*HWAVEOUT*/ ma_handle hDevicePlayback; /*HWAVEIN*/ ma_handle hDeviceCapture; /*HANDLE*/ ma_handle hEventPlayback; /*HANDLE*/ ma_handle hEventCapture; ma_uint32 fragmentSizeInFrames; ma_uint32 iNextHeaderPlayback; /* [0,periods). Used as an index into pWAVEHDRPlayback. */ ma_uint32 iNextHeaderCapture; /* [0,periods). Used as an index into pWAVEHDRCapture. */ ma_uint32 headerFramesConsumedPlayback; /* The number of PCM frames consumed in the buffer in pWAVEHEADER[iNextHeader]. */ ma_uint32 headerFramesConsumedCapture; /* ^^^ */ /*WAVEHDR**/ ma_uint8* pWAVEHDRPlayback; /* One instantiation for each period. */ /*WAVEHDR**/ ma_uint8* pWAVEHDRCapture; /* One instantiation for each period. */ ma_uint8* pIntermediaryBufferPlayback; ma_uint8* pIntermediaryBufferCapture; ma_uint8* _pHeapData; /* Used internally and is used for the heap allocated data for the intermediary buffer and the WAVEHDR structures. */ } winmm; #endif #ifdef MA_SUPPORT_ALSA struct { /*snd_pcm_t**/ ma_ptr pPCMPlayback; /*snd_pcm_t**/ ma_ptr pPCMCapture; /*struct pollfd**/ void* pPollDescriptorsPlayback; /*struct pollfd**/ void* pPollDescriptorsCapture; int pollDescriptorCountPlayback; int pollDescriptorCountCapture; int wakeupfdPlayback; /* eventfd for waking up from poll() when the playback device is stopped. */ int wakeupfdCapture; /* eventfd for waking up from poll() when the capture device is stopped. */ ma_bool8 isUsingMMapPlayback; ma_bool8 isUsingMMapCapture; } alsa; #endif #ifdef MA_SUPPORT_PULSEAUDIO struct { /*pa_mainloop**/ ma_ptr pMainLoop; /*pa_context**/ ma_ptr pPulseContext; /*pa_stream**/ ma_ptr pStreamPlayback; /*pa_stream**/ ma_ptr pStreamCapture; } pulse; #endif #ifdef MA_SUPPORT_JACK struct { /*jack_client_t**/ ma_ptr pClient; /*jack_port_t**/ ma_ptr* ppPortsPlayback; /*jack_port_t**/ ma_ptr* ppPortsCapture; float* pIntermediaryBufferPlayback; /* Typed as a float because JACK is always floating point. */ float* pIntermediaryBufferCapture; } jack; #endif #ifdef MA_SUPPORT_COREAUDIO struct { ma_uint32 deviceObjectIDPlayback; ma_uint32 deviceObjectIDCapture; /*AudioUnit*/ ma_ptr audioUnitPlayback; /*AudioUnit*/ ma_ptr audioUnitCapture; /*AudioBufferList**/ ma_ptr pAudioBufferList; /* Only used for input devices. */ ma_uint32 audioBufferCapInFrames; /* Only used for input devices. The capacity in frames of each buffer in pAudioBufferList. */ ma_event stopEvent; ma_uint32 originalPeriodSizeInFrames; ma_uint32 originalPeriodSizeInMilliseconds; ma_uint32 originalPeriods; ma_performance_profile originalPerformanceProfile; ma_bool32 isDefaultPlaybackDevice; ma_bool32 isDefaultCaptureDevice; ma_bool32 isSwitchingPlaybackDevice; /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */ ma_bool32 isSwitchingCaptureDevice; /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */ void* pNotificationHandler; /* Only used on mobile platforms. Obj-C object for handling route changes. */ } coreaudio; #endif #ifdef MA_SUPPORT_SNDIO struct { ma_ptr handlePlayback; ma_ptr handleCapture; ma_bool32 isStartedPlayback; ma_bool32 isStartedCapture; } sndio; #endif #ifdef MA_SUPPORT_AUDIO4 struct { int fdPlayback; int fdCapture; } audio4; #endif #ifdef MA_SUPPORT_OSS struct { int fdPlayback; int fdCapture; } oss; #endif #ifdef MA_SUPPORT_AAUDIO struct { /*AAudioStream**/ ma_ptr pStreamPlayback; /*AAudioStream**/ ma_ptr pStreamCapture; ma_mutex rerouteLock; ma_aaudio_usage usage; ma_aaudio_content_type contentType; ma_aaudio_input_preset inputPreset; ma_aaudio_allowed_capture_policy allowedCapturePolicy; ma_bool32 noAutoStartAfterReroute; } aaudio; #endif #ifdef MA_SUPPORT_OPENSL struct { /*SLObjectItf*/ ma_ptr pOutputMixObj; /*SLOutputMixItf*/ ma_ptr pOutputMix; /*SLObjectItf*/ ma_ptr pAudioPlayerObj; /*SLPlayItf*/ ma_ptr pAudioPlayer; /*SLObjectItf*/ ma_ptr pAudioRecorderObj; /*SLRecordItf*/ ma_ptr pAudioRecorder; /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueuePlayback; /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueueCapture; ma_bool32 isDrainingCapture; ma_bool32 isDrainingPlayback; ma_uint32 currentBufferIndexPlayback; ma_uint32 currentBufferIndexCapture; ma_uint8* pBufferPlayback; /* This is malloc()'d and is used for storing audio data. Typed as ma_uint8 for easy offsetting. */ ma_uint8* pBufferCapture; } opensl; #endif #ifdef MA_SUPPORT_WEBAUDIO struct { /* AudioWorklets path. */ /* EMSCRIPTEN_WEBAUDIO_T */ int audioContext; /* EMSCRIPTEN_WEBAUDIO_T */ int audioWorklet; float* pIntermediaryBuffer; void* pStackBuffer; ma_result initResult; /* Set to MA_BUSY while initialization is in progress. */ int deviceIndex; /* We store the device in a list on the JavaScript side. This is used to map our C object to the JS object. */ } webaudio; #endif #ifdef MA_SUPPORT_NULL struct { ma_thread deviceThread; ma_event operationEvent; ma_event operationCompletionEvent; ma_semaphore operationSemaphore; ma_uint32 operation; ma_result operationResult; ma_timer timer; double priorRunTime; ma_uint32 currentPeriodFramesRemainingPlayback; ma_uint32 currentPeriodFramesRemainingCapture; ma_uint64 lastProcessedFramePlayback; ma_uint64 lastProcessedFrameCapture; ma_atomic_bool32 isStarted; /* Read and written by multiple threads. Must be used atomically, and must be 32-bit for compiler compatibility. */ } null_device; #endif }; }; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #endif /* Initializes a `ma_context_config` object. Return Value ------------ A `ma_context_config` initialized to defaults. Remarks ------- You must always use this to initialize the default state of the `ma_context_config` object. Not using this will result in your program breaking when miniaudio is updated and new members are added to `ma_context_config`. It also sets logical defaults. You can override members of the returned object by changing it's members directly. See Also -------- ma_context_init() */ MA_API ma_context_config ma_context_config_init(void); /* Initializes a context. The context is used for selecting and initializing an appropriate backend and to represent the backend at a more global level than that of an individual device. There is one context to many devices, and a device is created from a context. A context is required to enumerate devices. Parameters ---------- backends (in, optional) A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order. backendCount (in, optional) The number of items in `backend`. Ignored if `backend` is NULL. pConfig (in, optional) The context configuration. pContext (in) A pointer to the context object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Do not call this function across multiple threads as some backends read and write to global state. Remarks ------- When `backends` is NULL, the default priority order will be used. Below is a list of backends in priority order: |-------------|-----------------------|--------------------------------------------------------| | Name | Enum Name | Supported Operating Systems | |-------------|-----------------------|--------------------------------------------------------| | WASAPI | ma_backend_wasapi | Windows Vista+ | | DirectSound | ma_backend_dsound | Windows XP+ | | WinMM | ma_backend_winmm | Windows XP+ (may work on older versions, but untested) | | Core Audio | ma_backend_coreaudio | macOS, iOS | | ALSA | ma_backend_alsa | Linux | | PulseAudio | ma_backend_pulseaudio | Cross Platform (disabled on Windows, BSD and Android) | | JACK | ma_backend_jack | Cross Platform (disabled on BSD and Android) | | sndio | ma_backend_sndio | OpenBSD | | audio(4) | ma_backend_audio4 | NetBSD, OpenBSD | | OSS | ma_backend_oss | FreeBSD | | AAudio | ma_backend_aaudio | Android 8+ | | OpenSL|ES | ma_backend_opensl | Android (API level 16+) | | Web Audio | ma_backend_webaudio | Web (via Emscripten) | | Null | ma_backend_null | Cross Platform (not used on Web) | |-------------|-----------------------|--------------------------------------------------------| The context can be configured via the `pConfig` argument. The config object is initialized with `ma_context_config_init()`. Individual configuration settings can then be set directly on the structure. Below are the members of the `ma_context_config` object. pLog A pointer to the `ma_log` to post log messages to. Can be NULL if the application does not require logging. See the `ma_log` API for details on how to use the logging system. threadPriority The desired priority to use for the audio thread. Allowable values include the following: |--------------------------------------| | Thread Priority | |--------------------------------------| | ma_thread_priority_idle | | ma_thread_priority_lowest | | ma_thread_priority_low | | ma_thread_priority_normal | | ma_thread_priority_high | | ma_thread_priority_highest (default) | | ma_thread_priority_realtime | | ma_thread_priority_default | |--------------------------------------| threadStackSize The desired size of the stack for the audio thread. Defaults to the operating system's default. pUserData A pointer to application-defined data. This can be accessed from the context object directly such as `context.pUserData`. allocationCallbacks Structure containing custom allocation callbacks. Leaving this at defaults will cause it to use MA_MALLOC, MA_REALLOC and MA_FREE. These allocation callbacks will be used for anything tied to the context, including devices. alsa.useVerboseDeviceEnumeration ALSA will typically enumerate many different devices which can be intrusive and not user-friendly. To combat this, miniaudio will enumerate only unique card/device pairs by default. The problem with this is that you lose a bit of flexibility and control. Setting alsa.useVerboseDeviceEnumeration makes it so the ALSA backend includes all devices. Defaults to false. pulse.pApplicationName PulseAudio only. The application name to use when initializing the PulseAudio context with `pa_context_new()`. pulse.pServerName PulseAudio only. The name of the server to connect to with `pa_context_connect()`. pulse.tryAutoSpawn PulseAudio only. Whether or not to try automatically starting the PulseAudio daemon. Defaults to false. If you set this to true, keep in mind that miniaudio uses a trial and error method to find the most appropriate backend, and this will result in the PulseAudio daemon starting which may be intrusive for the end user. coreaudio.sessionCategory iOS only. The session category to use for the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents. |-----------------------------------------|-------------------------------------| | miniaudio Token | Core Audio Token | |-----------------------------------------|-------------------------------------| | ma_ios_session_category_ambient | AVAudioSessionCategoryAmbient | | ma_ios_session_category_solo_ambient | AVAudioSessionCategorySoloAmbient | | ma_ios_session_category_playback | AVAudioSessionCategoryPlayback | | ma_ios_session_category_record | AVAudioSessionCategoryRecord | | ma_ios_session_category_play_and_record | AVAudioSessionCategoryPlayAndRecord | | ma_ios_session_category_multi_route | AVAudioSessionCategoryMultiRoute | | ma_ios_session_category_none | AVAudioSessionCategoryAmbient | | ma_ios_session_category_default | AVAudioSessionCategoryAmbient | |-----------------------------------------|-------------------------------------| coreaudio.sessionCategoryOptions iOS only. Session category options to use with the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents. |---------------------------------------------------------------------------|------------------------------------------------------------------| | miniaudio Token | Core Audio Token | |---------------------------------------------------------------------------|------------------------------------------------------------------| | ma_ios_session_category_option_mix_with_others | AVAudioSessionCategoryOptionMixWithOthers | | ma_ios_session_category_option_duck_others | AVAudioSessionCategoryOptionDuckOthers | | ma_ios_session_category_option_allow_bluetooth | AVAudioSessionCategoryOptionAllowBluetooth | | ma_ios_session_category_option_default_to_speaker | AVAudioSessionCategoryOptionDefaultToSpeaker | | ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others | AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers | | ma_ios_session_category_option_allow_bluetooth_a2dp | AVAudioSessionCategoryOptionAllowBluetoothA2DP | | ma_ios_session_category_option_allow_air_play | AVAudioSessionCategoryOptionAllowAirPlay | |---------------------------------------------------------------------------|------------------------------------------------------------------| coreaudio.noAudioSessionActivate iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization. coreaudio.noAudioSessionDeactivate iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization. jack.pClientName The name of the client to pass to `jack_client_open()`. jack.tryStartServer Whether or not to try auto-starting the JACK server. Defaults to false. It is recommended that only a single context is active at any given time because it's a bulky data structure which performs run-time linking for the relevant backends every time it's initialized. The location of the context cannot change throughout it's lifetime. Consider allocating the `ma_context` object with `malloc()` if this is an issue. The reason for this is that a pointer to the context is stored in the `ma_device` structure. Example 1 - Default Initialization ---------------------------------- The example below shows how to initialize the context using the default configuration. ```c ma_context context; ma_result result = ma_context_init(NULL, 0, NULL, &context); if (result != MA_SUCCESS) { // Error. } ``` Example 2 - Custom Configuration -------------------------------- The example below shows how to initialize the context using custom backend priorities and a custom configuration. In this hypothetical example, the program wants to prioritize ALSA over PulseAudio on Linux. They also want to avoid using the WinMM backend on Windows because it's latency is too high. They also want an error to be returned if no valid backend is available which they achieve by excluding the Null backend. For the configuration, the program wants to capture any log messages so they can, for example, route it to a log file and user interface. ```c ma_backend backends[] = { ma_backend_alsa, ma_backend_pulseaudio, ma_backend_wasapi, ma_backend_dsound }; ma_log log; ma_log_init(&log); ma_log_register_callback(&log, ma_log_callback_init(my_log_callbac, pMyLogUserData)); ma_context_config config = ma_context_config_init(); config.pLog = &log; // Specify a custom log object in the config so any logs that are posted from ma_context_init() are captured. ma_context context; ma_result result = ma_context_init(backends, sizeof(backends)/sizeof(backends[0]), &config, &context); if (result != MA_SUCCESS) { // Error. if (result == MA_NO_BACKEND) { // Couldn't find an appropriate backend. } } // You could also attach a log callback post-initialization: ma_log_register_callback(ma_context_get_log(&context), ma_log_callback_init(my_log_callback, pMyLogUserData)); ``` See Also -------- ma_context_config_init() ma_context_uninit() */ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext); /* Uninitializes a context. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Do not call this function across multiple threads as some backends read and write to global state. Remarks ------- Results are undefined if you call this while any device created by this context is still active. See Also -------- ma_context_init() */ MA_API ma_result ma_context_uninit(ma_context* pContext); /* Retrieves the size of the ma_context object. This is mainly for the purpose of bindings to know how much memory to allocate. */ MA_API size_t ma_context_sizeof(void); /* Retrieves a pointer to the log object associated with this context. Remarks ------- Pass the returned pointer to `ma_log_post()`, `ma_log_postv()` or `ma_log_postf()` to post a log message. You can attach your own logging callback to the log with `ma_log_register_callback()` Return Value ------------ A pointer to the `ma_log` object that the context uses to post log messages. If some error occurs, NULL will be returned. */ MA_API ma_log* ma_context_get_log(ma_context* pContext); /* Enumerates over every device (both playback and capture). This is a lower-level enumeration function to the easier to use `ma_context_get_devices()`. Use `ma_context_enumerate_devices()` if you would rather not incur an internal heap allocation, or it simply suits your code better. Note that this only retrieves the ID and name/description of the device. The reason for only retrieving basic information is that it would otherwise require opening the backend device in order to probe it for more detailed information which can be inefficient. Consider using `ma_context_get_device_info()` for this, but don't call it from within the enumeration callback. Returning false from the callback will stop enumeration. Returning true will continue enumeration. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. callback (in) The callback to fire for each enumerated device. pUserData (in) A pointer to application-defined data passed to the callback. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. This is guarded using a simple mutex lock. Remarks ------- Do _not_ assume the first enumerated device of a given type is the default device. Some backends and platforms may only support default playback and capture devices. In general, you should not do anything complicated from within the callback. In particular, do not try initializing a device from within the callback. Also, do not try to call `ma_context_get_device_info()` from within the callback. Consider using `ma_context_get_devices()` for a simpler and safer API, albeit at the expense of an internal heap allocation. Example 1 - Simple Enumeration ------------------------------ ma_bool32 ma_device_enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData) { printf("Device Name: %s\n", pInfo->name); return MA_TRUE; } ma_result result = ma_context_enumerate_devices(&context, my_device_enum_callback, pMyUserData); if (result != MA_SUCCESS) { // Error. } See Also -------- ma_context_get_devices() */ MA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData); /* Retrieves basic information about every active playback and/or capture device. This function will allocate memory internally for the device lists and return a pointer to them through the `ppPlaybackDeviceInfos` and `ppCaptureDeviceInfos` parameters. If you do not want to incur the overhead of these allocations consider using `ma_context_enumerate_devices()` which will instead use a callback. Note that this only retrieves the ID and name/description of the device. The reason for only retrieving basic information is that it would otherwise require opening the backend device in order to probe it for more detailed information which can be inefficient. Consider using `ma_context_get_device_info()` for this, but don't call it from within the enumeration callback. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. ppPlaybackDeviceInfos (out) A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for playback devices. pPlaybackDeviceCount (out) A pointer to an unsigned integer that will receive the number of playback devices. ppCaptureDeviceInfos (out) A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for capture devices. pCaptureDeviceCount (out) A pointer to an unsigned integer that will receive the number of capture devices. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Since each call to this function invalidates the pointers from the previous call, you should not be calling this simultaneously across multiple threads. Instead, you need to make a copy of the returned data with your own higher level synchronization. Remarks ------- It is _not_ safe to assume the first device in the list is the default device. You can pass in NULL for the playback or capture lists in which case they'll be ignored. The returned pointers will become invalid upon the next call this this function, or when the context is uninitialized. Do not free the returned pointers. See Also -------- ma_context_enumerate_devices() */ MA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount); /* Retrieves information about a device of the given type, with the specified ID and share mode. Parameters ---------- pContext (in) A pointer to the context performing the query. deviceType (in) The type of the device being queried. Must be either `ma_device_type_playback` or `ma_device_type_capture`. pDeviceID (in) The ID of the device being queried. pDeviceInfo (out) A pointer to the `ma_device_info` structure that will receive the device information. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. This is guarded using a simple mutex lock. Remarks ------- Do _not_ call this from within the `ma_context_enumerate_devices()` callback. It's possible for a device to have different information and capabilities depending on whether or not it's opened in shared or exclusive mode. For example, in shared mode, WASAPI always uses floating point samples for mixing, but in exclusive mode it can be anything. Therefore, this function allows you to specify which share mode you want information for. Note that not all backends and devices support shared or exclusive mode, in which case this function will fail if the requested share mode is unsupported. This leaves pDeviceInfo unmodified in the result of an error. */ MA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo); /* Determines if the given context supports loopback mode. Parameters ---------- pContext (in) A pointer to the context getting queried. Return Value ------------ MA_TRUE if the context supports loopback mode; MA_FALSE otherwise. */ MA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext); /* Initializes a device config with default settings. Parameters ---------- deviceType (in) The type of the device this config is being initialized for. This must set to one of the following: |-------------------------| | Device Type | |-------------------------| | ma_device_type_playback | | ma_device_type_capture | | ma_device_type_duplex | | ma_device_type_loopback | |-------------------------| Return Value ------------ A new device config object with default settings. You will typically want to adjust the config after this function returns. See remarks. Thread Safety ------------- Safe. Callback Safety --------------- Safe, but don't try initializing a device in a callback. Remarks ------- The returned config will be initialized to defaults. You will normally want to customize a few variables before initializing the device. See Example 1 for a typical configuration which sets the sample format, channel count, sample rate, data callback and user data. These are usually things you will want to change before initializing the device. See `ma_device_init()` for details on specific configuration options. Example 1 - Simple Configuration -------------------------------- The example below is what a program will typically want to configure for each device at a minimum. Notice how `ma_device_config_init()` is called first, and then the returned object is modified directly. This is important because it ensures that your program continues to work as new configuration options are added to the `ma_device_config` structure. ```c ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pUserData = pMyUserData; ``` See Also -------- ma_device_init() ma_device_init_ex() */ MA_API ma_device_config ma_device_config_init(ma_device_type deviceType); /* Initializes a device. A device represents a physical audio device. The idea is you send or receive audio data from the device to either play it back through a speaker, or capture it from a microphone. Whether or not you should send or receive data from the device (or both) depends on the type of device you are initializing which can be playback, capture, full-duplex or loopback. (Note that loopback mode is only supported on select backends.) Sending and receiving audio data to and from the device is done via a callback which is fired by miniaudio at periodic time intervals. The frequency at which data is delivered to and from a device depends on the size of its period. The size of the period can be defined in terms of PCM frames or milliseconds, whichever is more convenient. Generally speaking, the smaller the period, the lower the latency at the expense of higher CPU usage and increased risk of glitching due to the more frequent and granular data deliver intervals. The size of a period will depend on your requirements, but miniaudio's defaults should work fine for most scenarios. If you're building a game you should leave this fairly small, whereas if you're building a simple media player you can make it larger. Note that the period size you request is actually just a hint - miniaudio will tell the backend what you want, but the backend is ultimately responsible for what it gives you. You cannot assume you will get exactly what you ask for. When delivering data to and from a device you need to make sure it's in the correct format which you can set through the device configuration. You just set the format that you want to use and miniaudio will perform all of the necessary conversion for you internally. When delivering data to and from the callback you can assume the format is the same as what you requested when you initialized the device. See Remarks for more details on miniaudio's data conversion pipeline. Parameters ---------- pContext (in, optional) A pointer to the context that owns the device. This can be null, in which case it creates a default context internally. pConfig (in) A pointer to the device configuration. Cannot be null. See remarks for details. pDevice (out) A pointer to the device object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to calling this at the same time as `ma_device_uninit()`. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- Setting `pContext` to NULL will result in miniaudio creating a default context internally and is equivalent to passing in a context initialized like so: ```c ma_context_init(NULL, 0, NULL, &context); ``` Do not set `pContext` to NULL if you are needing to open multiple devices. You can, however, use NULL when initializing the first device, and then use device.pContext for the initialization of other devices. The device can be configured via the `pConfig` argument. The config object is initialized with `ma_device_config_init()`. Individual configuration settings can then be set directly on the structure. Below are the members of the `ma_device_config` object. deviceType Must be `ma_device_type_playback`, `ma_device_type_capture`, `ma_device_type_duplex` of `ma_device_type_loopback`. sampleRate The sample rate, in hertz. The most common sample rates are 48000 and 44100. Setting this to 0 will use the device's native sample rate. periodSizeInFrames The desired size of a period in PCM frames. If this is 0, `periodSizeInMilliseconds` will be used instead. If both are 0 the default buffer size will be used depending on the selected performance profile. This value affects latency. See below for details. periodSizeInMilliseconds The desired size of a period in milliseconds. If this is 0, `periodSizeInFrames` will be used instead. If both are 0 the default buffer size will be used depending on the selected performance profile. The value affects latency. See below for details. periods The number of periods making up the device's entire buffer. The total buffer size is `periodSizeInFrames` or `periodSizeInMilliseconds` multiplied by this value. This is just a hint as backends will be the ones who ultimately decide how your periods will be configured. performanceProfile A hint to miniaudio as to the performance requirements of your program. Can be either `ma_performance_profile_low_latency` (default) or `ma_performance_profile_conservative`. This mainly affects the size of default buffers and can usually be left at its default value. noPreSilencedOutputBuffer When set to true, the contents of the output buffer passed into the data callback will be left undefined. When set to false (default), the contents of the output buffer will be cleared the zero. You can use this to avoid the overhead of zeroing out the buffer if you can guarantee that your data callback will write to every sample in the output buffer, or if you are doing your own clearing. noClip When set to true, the contents of the output buffer are left alone after returning and it will be left up to the backend itself to decide whether or not to clip. When set to false (default), the contents of the output buffer passed into the data callback will be clipped after returning. This only applies when the playback sample format is f32. noDisableDenormals By default, miniaudio will disable denormals when the data callback is called. Setting this to true will prevent the disabling of denormals. noFixedSizedCallback Allows miniaudio to fire the data callback with any frame count. When this is set to false (the default), the data callback will be fired with a consistent frame count as specified by `periodSizeInFrames` or `periodSizeInMilliseconds`. When set to true, miniaudio will fire the callback with whatever the backend requests, which could be anything. dataCallback The callback to fire whenever data is ready to be delivered to or from the device. notificationCallback The callback to fire when something has changed with the device, such as whether or not it has been started or stopped. pUserData The user data pointer to use with the device. You can access this directly from the device object like `device.pUserData`. resampling.algorithm The resampling algorithm to use when miniaudio needs to perform resampling between the rate specified by `sampleRate` and the device's native rate. The default value is `ma_resample_algorithm_linear`, and the quality can be configured with `resampling.linear.lpfOrder`. resampling.pBackendVTable A pointer to an optional vtable that can be used for plugging in a custom resampler. resampling.pBackendUserData A pointer that will passed to callbacks in pBackendVTable. resampling.linear.lpfOrder The linear resampler applies a low-pass filter as part of its processing for anti-aliasing. This setting controls the order of the filter. The higher the value, the better the quality, in general. Setting this to 0 will disable low-pass filtering altogether. The maximum value is `MA_MAX_FILTER_ORDER`. The default value is `min(4, MA_MAX_FILTER_ORDER)`. playback.pDeviceID A pointer to a `ma_device_id` structure containing the ID of the playback device to initialize. Setting this NULL (default) will use the system's default playback device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration. playback.format The sample format to use for playback. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after initialization from the device object directly with `device.playback.format`. playback.channels The number of channels to use for playback. When set to 0 the device's native channel count will be used. This can be retrieved after initialization from the device object directly with `device.playback.channels`. playback.pChannelMap The channel map to use for playback. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the device object direct with `device.playback.pChannelMap`. When set, the buffer should contain `channels` items. playback.shareMode The preferred share mode to use for playback. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to ma_share_mode_shared and reinitializing. capture.pDeviceID A pointer to a `ma_device_id` structure containing the ID of the capture device to initialize. Setting this NULL (default) will use the system's default capture device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration. capture.format The sample format to use for capture. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after initialization from the device object directly with `device.capture.format`. capture.channels The number of channels to use for capture. When set to 0 the device's native channel count will be used. This can be retrieved after initialization from the device object directly with `device.capture.channels`. capture.pChannelMap The channel map to use for capture. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the device object direct with `device.capture.pChannelMap`. When set, the buffer should contain `channels` items. capture.shareMode The preferred share mode to use for capture. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to ma_share_mode_shared and reinitializing. wasapi.noAutoConvertSRC WASAPI only. When set to true, disables WASAPI's automatic resampling and forces the use of miniaudio's resampler. Defaults to false. wasapi.noDefaultQualitySRC WASAPI only. Only used when `wasapi.noAutoConvertSRC` is set to false. When set to true, disables the use of `AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY`. You should usually leave this set to false, which is the default. wasapi.noAutoStreamRouting WASAPI only. When set to true, disables automatic stream routing on the WASAPI backend. Defaults to false. wasapi.noHardwareOffloading WASAPI only. When set to true, disables the use of WASAPI's hardware offloading feature. Defaults to false. alsa.noMMap ALSA only. When set to true, disables MMap mode. Defaults to false. alsa.noAutoFormat ALSA only. When set to true, disables ALSA's automatic format conversion by including the SND_PCM_NO_AUTO_FORMAT flag. Defaults to false. alsa.noAutoChannels ALSA only. When set to true, disables ALSA's automatic channel conversion by including the SND_PCM_NO_AUTO_CHANNELS flag. Defaults to false. alsa.noAutoResample ALSA only. When set to true, disables ALSA's automatic resampling by including the SND_PCM_NO_AUTO_RESAMPLE flag. Defaults to false. pulse.pStreamNamePlayback PulseAudio only. Sets the stream name for playback. pulse.pStreamNameCapture PulseAudio only. Sets the stream name for capture. pulse.channelMap PulseAudio only. Sets the channel map that is requested from PulseAudio. See MA_PA_CHANNEL_MAP_* constants. Defaults to MA_PA_CHANNEL_MAP_AIFF. coreaudio.allowNominalSampleRateChange Core Audio only. Desktop only. When enabled, allows the sample rate of the device to be changed at the operating system level. This is disabled by default in order to prevent intrusive changes to the user's system. This is useful if you want to use a sample rate that is known to be natively supported by the hardware thereby avoiding the cost of resampling. When set to true, miniaudio will find the closest match between the sample rate requested in the device config and the sample rates natively supported by the hardware. When set to false, the sample rate currently set by the operating system will always be used. opensl.streamType OpenSL only. Explicitly sets the stream type. If left unset (`ma_opensl_stream_type_default`), the stream type will be left unset. Think of this as the type of audio you're playing. opensl.recordingPreset OpenSL only. Explicitly sets the type of recording your program will be doing. When left unset, the recording preset will be left unchanged. aaudio.usage AAudio only. Explicitly sets the nature of the audio the program will be consuming. When left unset, the usage will be left unchanged. aaudio.contentType AAudio only. Sets the content type. When left unset, the content type will be left unchanged. aaudio.inputPreset AAudio only. Explicitly sets the type of recording your program will be doing. When left unset, the input preset will be left unchanged. aaudio.noAutoStartAfterReroute AAudio only. Controls whether or not the device should be automatically restarted after a stream reroute. When set to false (default) the device will be restarted automatically; otherwise the device will be stopped. Once initialized, the device's config is immutable. If you need to change the config you will need to initialize a new device. After initializing the device it will be in a stopped state. To start it, use `ma_device_start()`. If both `periodSizeInFrames` and `periodSizeInMilliseconds` are set to zero, it will default to `MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY` or `MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE`, depending on whether or not `performanceProfile` is set to `ma_performance_profile_low_latency` or `ma_performance_profile_conservative`. If you request exclusive mode and the backend does not support it an error will be returned. For robustness, you may want to first try initializing the device in exclusive mode, and then fall back to shared mode if required. Alternatively you can just request shared mode (the default if you leave it unset in the config) which is the most reliable option. Some backends do not have a practical way of choosing whether or not the device should be exclusive or not (ALSA, for example) in which case it just acts as a hint. Unless you have special requirements you should try avoiding exclusive mode as it's intrusive to the user. Starting with Windows 10, miniaudio will use low-latency shared mode where possible which may make exclusive mode unnecessary. When sending or receiving data to/from a device, miniaudio will internally perform a format conversion to convert between the format specified by the config and the format used internally by the backend. If you pass in 0 for the sample format, channel count, sample rate _and_ channel map, data transmission will run on an optimized pass-through fast path. You can retrieve the format, channel count and sample rate by inspecting the `playback/capture.format`, `playback/capture.channels` and `sampleRate` members of the device object. When compiling for UWP you must ensure you call this function on the main UI thread because the operating system may need to present the user with a message asking for permissions. Please refer to the official documentation for ActivateAudioInterfaceAsync() for more information. ALSA Specific: When initializing the default device, requesting shared mode will try using the "dmix" device for playback and the "dsnoop" device for capture. If these fail it will try falling back to the "hw" device. Example 1 - Simple Initialization --------------------------------- This example shows how to initialize a simple playback device using a standard configuration. If you are just needing to do simple playback from the default playback device this is usually all you need. ```c ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pMyUserData = pMyUserData; ma_device device; ma_result result = ma_device_init(NULL, &config, &device); if (result != MA_SUCCESS) { // Error } ``` Example 2 - Advanced Initialization ----------------------------------- This example shows how you might do some more advanced initialization. In this hypothetical example we want to control the latency by setting the buffer size and period count. We also want to allow the user to be able to choose which device to output from which means we need a context so we can perform device enumeration. ```c ma_context context; ma_result result = ma_context_init(NULL, 0, NULL, &context); if (result != MA_SUCCESS) { // Error } ma_device_info* pPlaybackDeviceInfos; ma_uint32 playbackDeviceCount; result = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, NULL, NULL); if (result != MA_SUCCESS) { // Error } // ... choose a device from pPlaybackDeviceInfos ... ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.pDeviceID = pMyChosenDeviceID; // <-- Get this from the `id` member of one of the `ma_device_info` objects returned by ma_context_get_devices(). config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pUserData = pMyUserData; config.periodSizeInMilliseconds = 10; config.periods = 3; ma_device device; result = ma_device_init(&context, &config, &device); if (result != MA_SUCCESS) { // Error } ``` See Also -------- ma_device_config_init() ma_device_uninit() ma_device_start() ma_context_init() ma_context_get_devices() ma_context_enumerate_devices() */ MA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice); /* Initializes a device without a context, with extra parameters for controlling the configuration of the internal self-managed context. This is the same as `ma_device_init()`, only instead of a context being passed in, the parameters from `ma_context_init()` are passed in instead. This function allows you to configure the internally created context. Parameters ---------- backends (in, optional) A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order. backendCount (in, optional) The number of items in `backend`. Ignored if `backend` is NULL. pContextConfig (in, optional) The context configuration. pConfig (in) A pointer to the device configuration. Cannot be null. See remarks for details. pDevice (out) A pointer to the device object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to calling this at the same time as `ma_device_uninit()`. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- You only need to use this function if you want to configure the context differently to its defaults. You should never use this function if you want to manage your own context. See the documentation for `ma_context_init()` for information on the different context configuration options. See Also -------- ma_device_init() ma_device_uninit() ma_device_config_init() ma_context_init() */ MA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice); /* Uninitializes a device. This will explicitly stop the device. You do not need to call `ma_device_stop()` beforehand, but it's harmless if you do. Parameters ---------- pDevice (in) A pointer to the device to stop. Return Value ------------ Nothing Thread Safety ------------- Unsafe. As soon as this API is called the device should be considered undefined. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock. See Also -------- ma_device_init() ma_device_stop() */ MA_API void ma_device_uninit(ma_device* pDevice); /* Retrieves a pointer to the context that owns the given device. */ MA_API ma_context* ma_device_get_context(ma_device* pDevice); /* Helper function for retrieving the log object associated with the context that owns this device. */ MA_API ma_log* ma_device_get_log(ma_device* pDevice); /* Retrieves information about the device. Parameters ---------- pDevice (in) A pointer to the device whose information is being retrieved. type (in) The device type. This parameter is required for duplex devices. When retrieving device information, you are doing so for an individual playback or capture device. pDeviceInfo (out) A pointer to the `ma_device_info` that will receive the device information. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. This should be considered unsafe because it may be calling into the backend which may or may not be safe. Callback Safety --------------- Unsafe. You should avoid calling this in the data callback because it may call into the backend which may or may not be safe. */ MA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo); /* Retrieves the name of the device. Parameters ---------- pDevice (in) A pointer to the device whose information is being retrieved. type (in) The device type. This parameter is required for duplex devices. When retrieving device information, you are doing so for an individual playback or capture device. pName (out) A pointer to the buffer that will receive the name. nameCap (in) The capacity of the output buffer, including space for the null terminator. pLengthNotIncludingNullTerminator (out, optional) A pointer to the variable that will receive the length of the name, not including the null terminator. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. This should be considered unsafe because it may be calling into the backend which may or may not be safe. Callback Safety --------------- Unsafe. You should avoid calling this in the data callback because it may call into the backend which may or may not be safe. Remarks ------- If the name does not fully fit into the output buffer, it'll be truncated. You can pass in NULL to `pName` if you want to first get the length of the name for the purpose of memory allocation of the output buffer. Allocating a buffer of size `MA_MAX_DEVICE_NAME_LENGTH + 1` should be enough for most cases and will avoid the need for the inefficiency of calling this function twice. This is implemented in terms of `ma_device_get_info()`. */ MA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator); /* Starts the device. For playback devices this begins playback. For capture devices it begins recording. Use `ma_device_stop()` to stop the device. Parameters ---------- pDevice (in) A pointer to the device to start. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. It's safe to call this from any thread with the exception of the callback thread. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- For a playback device, this will retrieve an initial chunk of audio data from the client before returning. The reason for this is to ensure there is valid audio data in the buffer, which needs to be done before the device begins playback. This API waits until the backend device has been started for real by the worker thread. It also waits on a mutex for thread-safety. Do not call this in any callback. See Also -------- ma_device_stop() */ MA_API ma_result ma_device_start(ma_device* pDevice); /* Stops the device. For playback devices this stops playback. For capture devices it stops recording. Use `ma_device_start()` to start the device again. Parameters ---------- pDevice (in) A pointer to the device to stop. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. It's safe to call this from any thread with the exception of the callback thread. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock. Remarks ------- This API needs to wait on the worker thread to stop the backend device properly before returning. It also waits on a mutex for thread-safety. In addition, some backends need to wait for the device to finish playback/recording of the current fragment which can take some time (usually proportionate to the buffer size that was specified at initialization time). Backends are required to either pause the stream in-place or drain the buffer if pausing is not possible. The reason for this is that stopping the device and the resuming it with ma_device_start() (which you might do when your program loses focus) may result in a situation where those samples are never output to the speakers or received from the microphone which can in turn result in de-syncs. Do not call this in any callback. See Also -------- ma_device_start() */ MA_API ma_result ma_device_stop(ma_device* pDevice); /* Determines whether or not the device is started. Parameters ---------- pDevice (in) A pointer to the device whose start state is being retrieved. Return Value ------------ True if the device is started, false otherwise. Thread Safety ------------- Safe. If another thread calls `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, there's a very small chance the return value will be out of sync. Callback Safety --------------- Safe. This is implemented as a simple accessor. See Also -------- ma_device_start() ma_device_stop() */ MA_API ma_bool32 ma_device_is_started(const ma_device* pDevice); /* Retrieves the state of the device. Parameters ---------- pDevice (in) A pointer to the device whose state is being retrieved. Return Value ------------ The current state of the device. The return value will be one of the following: +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_uninitialized | Will only be returned if the device is in the middle of initialization. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_stopped | The device is stopped. The initial state of the device after initialization. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_started | The device started and requesting and/or delivering audio data. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_starting | The device is in the process of starting. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_stopping | The device is in the process of stopping. | +-------------------------------+------------------------------------------------------------------------------+ Thread Safety ------------- Safe. This is implemented as a simple accessor. Note that if the device is started or stopped at the same time as this function is called, there's a possibility the return value could be out of sync. See remarks. Callback Safety --------------- Safe. This is implemented as a simple accessor. Remarks ------- The general flow of a devices state goes like this: ``` ma_device_init() -> ma_device_state_uninitialized -> ma_device_state_stopped ma_device_start() -> ma_device_state_starting -> ma_device_state_started ma_device_stop() -> ma_device_state_stopping -> ma_device_state_stopped ``` When the state of the device is changed with `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, the value returned by this function could potentially be out of sync. If this is significant to your program you need to implement your own synchronization. */ MA_API ma_device_state ma_device_get_state(const ma_device* pDevice); /* Performs post backend initialization routines for setting up internal data conversion. This should be called whenever the backend is initialized. The only time this should be called from outside of miniaudio is if you're implementing a custom backend, and you would only do it if you are reinitializing the backend due to rerouting or reinitializing for some reason. Parameters ---------- pDevice [in] A pointer to the device. deviceType [in] The type of the device that was just reinitialized. pPlaybackDescriptor [in] The descriptor of the playback device containing the internal data format and buffer sizes. pPlaybackDescriptor [in] The descriptor of the capture device containing the internal data format and buffer sizes. Return Value ------------ MA_SUCCESS if successful; any other error otherwise. Thread Safety ------------- Unsafe. This will be reinitializing internal data converters which may be in use by another thread. Callback Safety --------------- Unsafe. This will be reinitializing internal data converters which may be in use by the callback. Remarks ------- For a duplex device, you can call this for only one side of the system. This is why the deviceType is specified as a parameter rather than deriving it from the device. You do not need to call this manually unless you are doing a custom backend, in which case you need only do it if you're manually performing rerouting or reinitialization. */ MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPlaybackDescriptor, const ma_device_descriptor* pCaptureDescriptor); /* Sets the master volume factor for the device. The volume factor must be between 0 (silence) and 1 (full volume). Use `ma_device_set_master_volume_db()` to use decibel notation, where 0 is full volume and values less than 0 decreases the volume. Parameters ---------- pDevice (in) A pointer to the device whose volume is being set. volume (in) The new volume factor. Must be >= 0. Return Value ------------ MA_SUCCESS if the volume was set successfully. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if volume is negative. Thread Safety ------------- Safe. This just sets a local member of the device object. Callback Safety --------------- Safe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied. Remarks ------- This applies the volume factor across all channels. This does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream. See Also -------- ma_device_get_master_volume() ma_device_set_master_volume_db() ma_device_get_master_volume_db() */ MA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume); /* Retrieves the master volume factor for the device. Parameters ---------- pDevice (in) A pointer to the device whose volume factor is being retrieved. pVolume (in) A pointer to the variable that will receive the volume factor. The returned value will be in the range of [0, 1]. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if pVolume is NULL. Thread Safety ------------- Safe. This just a simple member retrieval. Callback Safety --------------- Safe. Remarks ------- If an error occurs, `*pVolume` will be set to 0. See Also -------- ma_device_set_master_volume() ma_device_set_master_volume_gain_db() ma_device_get_master_volume_gain_db() */ MA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume); /* Sets the master volume for the device as gain in decibels. A gain of 0 is full volume, whereas a gain of < 0 will decrease the volume. Parameters ---------- pDevice (in) A pointer to the device whose gain is being set. gainDB (in) The new volume as gain in decibels. Must be less than or equal to 0, where 0 is full volume and anything less than 0 decreases the volume. Return Value ------------ MA_SUCCESS if the volume was set successfully. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if the gain is > 0. Thread Safety ------------- Safe. This just sets a local member of the device object. Callback Safety --------------- Safe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied. Remarks ------- This applies the gain across all channels. This does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream. See Also -------- ma_device_get_master_volume_gain_db() ma_device_set_master_volume() ma_device_get_master_volume() */ MA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB); /* Retrieves the master gain in decibels. Parameters ---------- pDevice (in) A pointer to the device whose gain is being retrieved. pGainDB (in) A pointer to the variable that will receive the gain in decibels. The returned value will be <= 0. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if pGainDB is NULL. Thread Safety ------------- Safe. This just a simple member retrieval. Callback Safety --------------- Safe. Remarks ------- If an error occurs, `*pGainDB` will be set to 0. See Also -------- ma_device_set_master_volume_db() ma_device_set_master_volume() ma_device_get_master_volume() */ MA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB); /* Called from the data callback of asynchronous backends to allow miniaudio to process the data and fire the miniaudio data callback. Parameters ---------- pDevice (in) A pointer to device whose processing the data callback. pOutput (out) A pointer to the buffer that will receive the output PCM frame data. On a playback device this must not be NULL. On a duplex device this can be NULL, in which case pInput must not be NULL. pInput (in) A pointer to the buffer containing input PCM frame data. On a capture device this must not be NULL. On a duplex device this can be NULL, in which case `pOutput` must not be NULL. frameCount (in) The number of frames being processed. Return Value ------------ MA_SUCCESS if successful; any other result code otherwise. Thread Safety ------------- This function should only ever be called from the internal data callback of the backend. It is safe to call this simultaneously between a playback and capture device in duplex setups. Callback Safety --------------- Do not call this from the miniaudio data callback. It should only ever be called from the internal data callback of the backend. Remarks ------- If both `pOutput` and `pInput` are NULL, and error will be returned. In duplex scenarios, both `pOutput` and `pInput` can be non-NULL, in which case `pInput` will be processed first, followed by `pOutput`. If you are implementing a custom backend, and that backend uses a callback for data delivery, you'll need to call this from inside that callback. */ MA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount); /* Calculates an appropriate buffer size from a descriptor, native sample rate and performance profile. This function is used by backends for helping determine an appropriately sized buffer to use with the device depending on the values of `periodSizeInFrames` and `periodSizeInMilliseconds` in the `pDescriptor` object. Since buffer size calculations based on time depends on the sample rate, a best guess at the device's native sample rate is also required which is where `nativeSampleRate` comes in. In addition, the performance profile is also needed for cases where both the period size in frames and milliseconds are both zero. Parameters ---------- pDescriptor (in) A pointer to device descriptor whose `periodSizeInFrames` and `periodSizeInMilliseconds` members will be used for the calculation of the buffer size. nativeSampleRate (in) The device's native sample rate. This is only ever used when the `periodSizeInFrames` member of `pDescriptor` is zero. In this case, `periodSizeInMilliseconds` will be used instead, in which case a sample rate is required to convert to a size in frames. performanceProfile (in) When both the `periodSizeInFrames` and `periodSizeInMilliseconds` members of `pDescriptor` are zero, miniaudio will fall back to a buffer size based on the performance profile. The profile to use for this calculation is determine by this parameter. Return Value ------------ The calculated buffer size in frames. Thread Safety ------------- This is safe so long as nothing modifies `pDescriptor` at the same time. However, this function should only ever be called from within the backend's device initialization routine and therefore shouldn't have any multithreading concerns. Callback Safety --------------- This is safe to call within the data callback, but there is no reason to ever do this. Remarks ------- If `nativeSampleRate` is zero, this function will fall back to `pDescriptor->sampleRate`. If that is also zero, `MA_DEFAULT_SAMPLE_RATE` will be used instead. */ MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile); /* Retrieves a friendly name for a backend. */ MA_API const char* ma_get_backend_name(ma_backend backend); /* Retrieves the backend enum from the given name. */ MA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend); /* Determines whether or not the given backend is available by the compilation environment. */ MA_API ma_bool32 ma_is_backend_enabled(ma_backend backend); /* Retrieves compile-time enabled backends. Parameters ---------- pBackends (out, optional) A pointer to the buffer that will receive the enabled backends. Set to NULL to retrieve the backend count. Setting the capacity of the buffer to `MA_BUFFER_COUNT` will guarantee it's large enough for all backends. backendCap (in) The capacity of the `pBackends` buffer. pBackendCount (out) A pointer to the variable that will receive the enabled backend count. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if `pBackendCount` is NULL. MA_NO_SPACE if the capacity of `pBackends` is not large enough. If `MA_NO_SPACE` is returned, the `pBackends` buffer will be filled with `*pBackendCount` values. Thread Safety ------------- Safe. Callback Safety --------------- Safe. Remarks ------- If you want to retrieve the number of backends so you can determine the capacity of `pBackends` buffer, you can call this function with `pBackends` set to NULL. This will also enumerate the null backend. If you don't want to include this you need to check for `ma_backend_null` when you enumerate over the returned backends and handle it appropriately. Alternatively, you can disable it at compile time with `MA_NO_NULL`. The returned backends are determined based on compile time settings, not the platform it's currently running on. For example, PulseAudio will be returned if it was enabled at compile time, even when the user doesn't actually have PulseAudio installed. Example 1 --------- The example below retrieves the enabled backend count using a fixed sized buffer allocated on the stack. The buffer is given a capacity of `MA_BACKEND_COUNT` which will guarantee it'll be large enough to store all available backends. Since `MA_BACKEND_COUNT` is always a relatively small value, this should be suitable for most scenarios. ``` ma_backend enabledBackends[MA_BACKEND_COUNT]; size_t enabledBackendCount; result = ma_get_enabled_backends(enabledBackends, MA_BACKEND_COUNT, &enabledBackendCount); if (result != MA_SUCCESS) { // Failed to retrieve enabled backends. Should never happen in this example since all inputs are valid. } ``` See Also -------- ma_is_backend_enabled() */ MA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount); /* Determines whether or not loopback mode is support by a backend. */ MA_API ma_bool32 ma_is_loopback_supported(ma_backend backend); #endif /* MA_NO_DEVICE_IO */ /************************************************************************************************************************************************************ Utilities ************************************************************************************************************************************************************/ /* Calculates a buffer size in milliseconds (rounded up) from the specified number of frames and sample rate. */ MA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate); /* Calculates a buffer size in frames from the specified number of milliseconds and sample rate. */ MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate); /* Copies PCM frames from one buffer to another. */ MA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Copies silent frames into the given buffer. Remarks ------- For all formats except `ma_format_u8`, the output buffer will be filled with 0. For `ma_format_u8` it will be filled with 128. The reason for this is that it makes more sense for the purpose of mixing to initialize it to the center point. */ MA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Offsets a pointer by the specified number of PCM frames. */ MA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels); MA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels); static MA_INLINE float* ma_offset_pcm_frames_ptr_f32(float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (float*)ma_offset_pcm_frames_ptr((void*)p, offsetInFrames, ma_format_f32, channels); } static MA_INLINE const float* ma_offset_pcm_frames_const_ptr_f32(const float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (const float*)ma_offset_pcm_frames_const_ptr((const void*)p, offsetInFrames, ma_format_f32, channels); } /* Clips samples. */ MA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count); MA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count); MA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Helper for applying a volume factor to samples. Note that the source and destination buffers can be the same, in which case it'll perform the operation in-place. */ MA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames(void* pFrames, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains); MA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume); /* Helper for converting a linear factor to gain in decibels. */ MA_API float ma_volume_linear_to_db(float factor); /* Helper for converting gain in decibels to a linear factor. */ MA_API float ma_volume_db_to_linear(float gain); /* Mixes the specified number of frames in floating point format with a volume factor. This will run on an optimized path when the volume is equal to 1. */ MA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume); /************************************************************************************************************************************************************ VFS === The VFS object (virtual file system) is what's used to customize file access. This is useful in cases where stdio FILE* based APIs may not be entirely appropriate for a given situation. ************************************************************************************************************************************************************/ typedef void ma_vfs; typedef ma_handle ma_vfs_file; typedef enum { MA_OPEN_MODE_READ = 0x00000001, MA_OPEN_MODE_WRITE = 0x00000002 } ma_open_mode_flags; typedef enum { ma_seek_origin_start, ma_seek_origin_current, ma_seek_origin_end /* Not used by decoders. */ } ma_seek_origin; typedef struct { ma_uint64 sizeInBytes; } ma_file_info; typedef struct { ma_result (* onOpen) (ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); ma_result (* onOpenW)(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); ma_result (* onClose)(ma_vfs* pVFS, ma_vfs_file file); ma_result (* onRead) (ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead); ma_result (* onWrite)(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten); ma_result (* onSeek) (ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin); ma_result (* onTell) (ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor); ma_result (* onInfo) (ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo); } ma_vfs_callbacks; MA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); MA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); MA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file); MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead); MA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten); MA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin); MA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor); MA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo); MA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_vfs_callbacks cb; ma_allocation_callbacks allocationCallbacks; /* Only used for the wchar_t version of open() on non-Windows platforms. */ } ma_default_vfs; MA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks); typedef ma_result (* ma_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead); typedef ma_result (* ma_seek_proc)(void* pUserData, ma_int64 offset, ma_seek_origin origin); typedef ma_result (* ma_tell_proc)(void* pUserData, ma_int64* pCursor); #if !defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING) typedef enum { ma_encoding_format_unknown = 0, ma_encoding_format_wav, ma_encoding_format_flac, ma_encoding_format_mp3, ma_encoding_format_vorbis } ma_encoding_format; #endif /************************************************************************************************************************************************************ Decoding ======== Decoders are independent of the main device API. Decoding APIs can be called freely inside the device's data callback, but they are not thread safe unless you do your own synchronization. ************************************************************************************************************************************************************/ #ifndef MA_NO_DECODING typedef struct ma_decoder ma_decoder; typedef struct { ma_format preferredFormat; ma_uint32 seekPointCount; /* Set to > 0 to generate a seektable if the decoding backend supports it. */ } ma_decoding_backend_config; MA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount); typedef struct { ma_result (* onInit )(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); ma_result (* onInitFile )(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ ma_result (* onInitFileW )(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ ma_result (* onInitMemory)(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ void (* onUninit )(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks); } ma_decoding_backend_vtable; typedef ma_result (* ma_decoder_read_proc)(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead); /* Returns the number of bytes read. */ typedef ma_result (* ma_decoder_seek_proc)(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin); typedef ma_result (* ma_decoder_tell_proc)(ma_decoder* pDecoder, ma_int64* pCursor); typedef struct { ma_format format; /* Set to 0 or ma_format_unknown to use the stream's internal format. */ ma_uint32 channels; /* Set to 0 to use the stream's internal channels. */ ma_uint32 sampleRate; /* Set to 0 to use the stream's internal sample rate. */ ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_dither_mode ditherMode; ma_resampler_config resampling; ma_allocation_callbacks allocationCallbacks; ma_encoding_format encodingFormat; ma_uint32 seekPointCount; /* When set to > 0, specifies the number of seek points to use for the generation of a seek table. Not all decoding backends support this. */ ma_decoding_backend_vtable** ppCustomBackendVTables; ma_uint32 customBackendCount; void* pCustomBackendUserData; } ma_decoder_config; struct ma_decoder { ma_data_source_base ds; ma_data_source* pBackend; /* The decoding backend we'll be pulling data from. */ const ma_decoding_backend_vtable* pBackendVTable; /* The vtable for the decoding backend. This needs to be stored so we can access the onUninit() callback. */ void* pBackendUserData; ma_decoder_read_proc onRead; ma_decoder_seek_proc onSeek; ma_decoder_tell_proc onTell; void* pUserData; ma_uint64 readPointerInPCMFrames; /* In output sample rate. Used for keeping track of how many frames are available for decoding. */ ma_format outputFormat; ma_uint32 outputChannels; ma_uint32 outputSampleRate; ma_data_converter converter; /* Data conversion is achieved by running frames through this. */ void* pInputCache; /* In input format. Can be null if it's not needed. */ ma_uint64 inputCacheCap; /* The capacity of the input cache. */ ma_uint64 inputCacheConsumed; /* The number of frames that have been consumed in the cache. Used for determining the next valid frame. */ ma_uint64 inputCacheRemaining; /* The number of valid frames remaining in the cache. */ ma_allocation_callbacks allocationCallbacks; union { struct { ma_vfs* pVFS; ma_vfs_file file; } vfs; struct { const ma_uint8* pData; size_t dataSize; size_t currentReadPos; } memory; /* Only used for decoders that were opened against a block of memory. */ } data; }; MA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate); MA_API ma_decoder_config ma_decoder_config_init_default(void); MA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); /* Uninitializes a decoder. */ MA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder); /* Reads PCM frames from the given decoder. This is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Seeks to a PCM frame based on its absolute index. This is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex); /* Retrieves the decoder's output data format. */ MA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); /* Retrieves the current position of the read cursor in PCM frames. */ MA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor); /* Retrieves the length of the decoder in PCM frames. Do not call this on streams of an undefined length, such as internet radio. If the length is unknown or an error occurs, 0 will be returned. This will always return 0 for Vorbis decoders. This is due to a limitation with stb_vorbis in push mode which is what miniaudio uses internally. For MP3's, this will decode the entire file. Do not call this in time critical scenarios. This function is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength); /* Retrieves the number of frames that can be read before reaching the end. This calls `ma_decoder_get_length_in_pcm_frames()` so you need to be aware of the rules for that function, in particular ensuring you do not call it on streams of an undefined length, such as internet radio. If the total length of the decoder cannot be retrieved, such as with Vorbis decoders, `MA_NOT_IMPLEMENTED` will be returned. */ MA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames); /* Helper for opening and decoding a file into a heap allocated block of memory. Free the returned pointer with ma_free(). On input, pConfig should be set to what you want. On output it will be set to what you got. */ MA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); #endif /* MA_NO_DECODING */ /************************************************************************************************************************************************************ Encoding ======== Encoders do not perform any format conversion for you. If your target format does not support the format, and error will be returned. ************************************************************************************************************************************************************/ #ifndef MA_NO_ENCODING typedef struct ma_encoder ma_encoder; typedef ma_result (* ma_encoder_write_proc) (ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten); typedef ma_result (* ma_encoder_seek_proc) (ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin); typedef ma_result (* ma_encoder_init_proc) (ma_encoder* pEncoder); typedef void (* ma_encoder_uninit_proc) (ma_encoder* pEncoder); typedef ma_result (* ma_encoder_write_pcm_frames_proc)(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten); typedef struct { ma_encoding_format encodingFormat; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_allocation_callbacks allocationCallbacks; } ma_encoder_config; MA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); struct ma_encoder { ma_encoder_config config; ma_encoder_write_proc onWrite; ma_encoder_seek_proc onSeek; ma_encoder_init_proc onInit; ma_encoder_uninit_proc onUninit; ma_encoder_write_pcm_frames_proc onWritePCMFrames; void* pUserData; void* pInternalEncoder; union { struct { ma_vfs* pVFS; ma_vfs_file file; } vfs; } data; }; MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API void ma_encoder_uninit(ma_encoder* pEncoder); MA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten); #endif /* MA_NO_ENCODING */ /************************************************************************************************************************************************************ Generation ************************************************************************************************************************************************************/ #ifndef MA_NO_GENERATION typedef enum { ma_waveform_type_sine, ma_waveform_type_square, ma_waveform_type_triangle, ma_waveform_type_sawtooth } ma_waveform_type; typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_waveform_type type; double amplitude; double frequency; } ma_waveform_config; MA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency); typedef struct { ma_data_source_base ds; ma_waveform_config config; double advance; double time; } ma_waveform; MA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform); MA_API void ma_waveform_uninit(ma_waveform* pWaveform); MA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex); MA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude); MA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency); MA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type); MA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double dutyCycle; double amplitude; double frequency; } ma_pulsewave_config; MA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency); typedef struct { ma_waveform waveform; ma_pulsewave_config config; } ma_pulsewave; MA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform); MA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform); MA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex); MA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude); MA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency); MA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate); MA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle); typedef enum { ma_noise_type_white, ma_noise_type_pink, ma_noise_type_brownian } ma_noise_type; typedef struct { ma_format format; ma_uint32 channels; ma_noise_type type; ma_int32 seed; double amplitude; ma_bool32 duplicateChannels; } ma_noise_config; MA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude); typedef struct { ma_data_source_base ds; ma_noise_config config; ma_lcg lcg; union { struct { double** bin; double* accumulation; ma_uint32* counter; } pink; struct { double* accumulation; } brownian; } state; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_noise; MA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise); MA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise); MA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude); MA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed); MA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type); #endif /* MA_NO_GENERATION */ /************************************************************************************************************************************************************ Resource Manager ************************************************************************************************************************************************************/ /* The resource manager cannot be enabled if there is no decoder. */ #if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_NO_DECODING) #define MA_NO_RESOURCE_MANAGER #endif #ifndef MA_NO_RESOURCE_MANAGER typedef struct ma_resource_manager ma_resource_manager; typedef struct ma_resource_manager_data_buffer_node ma_resource_manager_data_buffer_node; typedef struct ma_resource_manager_data_buffer ma_resource_manager_data_buffer; typedef struct ma_resource_manager_data_stream ma_resource_manager_data_stream; typedef struct ma_resource_manager_data_source ma_resource_manager_data_source; typedef enum { MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM = 0x00000001, /* When set, does not load the entire data source in memory. Disk I/O will happen on job threads. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE = 0x00000002, /* Decode data before storing in memory. When set, decoding is done at the resource manager level rather than the mixing thread. Results in faster mixing, but higher memory usage. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC = 0x00000004, /* When set, the resource manager will load the data source asynchronously. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT = 0x00000008, /* When set, waits for initialization of the underlying data source before returning from ma_resource_manager_data_source_init(). */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH = 0x00000010, /* Gives the resource manager a hint that the length of the data source is unknown and calling `ma_data_source_get_length_in_pcm_frames()` should be avoided. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING = 0x00000020 /* When set, configures the data source to loop by default. */ } ma_resource_manager_data_source_flags; /* Pipeline notifications used by the resource manager. Made up of both an async notification and a fence, both of which are optional. */ typedef struct { ma_async_notification* pNotification; ma_fence* pFence; } ma_resource_manager_pipeline_stage_notification; typedef struct { ma_resource_manager_pipeline_stage_notification init; /* Initialization of the decoder. */ ma_resource_manager_pipeline_stage_notification done; /* Decoding fully completed. */ } ma_resource_manager_pipeline_notifications; MA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void); /* BEGIN BACKWARDS COMPATIBILITY */ /* TODO: Remove this block in version 0.12. */ #if 1 #define ma_resource_manager_job ma_job #define ma_resource_manager_job_init ma_job_init #define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_FLAG_NON_BLOCKING MA_JOB_QUEUE_FLAG_NON_BLOCKING #define ma_resource_manager_job_queue_config ma_job_queue_config #define ma_resource_manager_job_queue_config_init ma_job_queue_config_init #define ma_resource_manager_job_queue ma_job_queue #define ma_resource_manager_job_queue_get_heap_size ma_job_queue_get_heap_size #define ma_resource_manager_job_queue_init_preallocated ma_job_queue_init_preallocated #define ma_resource_manager_job_queue_init ma_job_queue_init #define ma_resource_manager_job_queue_uninit ma_job_queue_uninit #define ma_resource_manager_job_queue_post ma_job_queue_post #define ma_resource_manager_job_queue_next ma_job_queue_next #endif /* END BACKWARDS COMPATIBILITY */ /* Maximum job thread count will be restricted to this, but this may be removed later and replaced with a heap allocation thereby removing any limitation. */ #ifndef MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT #define MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT 64 #endif typedef enum { /* Indicates ma_resource_manager_next_job() should not block. Only valid when the job thread count is 0. */ MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING = 0x00000001, /* Disables any kind of multithreading. Implicitly enables MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING. */ MA_RESOURCE_MANAGER_FLAG_NO_THREADING = 0x00000002 } ma_resource_manager_flags; typedef struct { const char* pFilePath; const wchar_t* pFilePathW; const ma_resource_manager_pipeline_notifications* pNotifications; ma_uint64 initialSeekPointInPCMFrames; ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_uint32 flags; ma_bool32 isLooping; /* Deprecated. Use the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING flag in `flags` instead. */ } ma_resource_manager_data_source_config; MA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void); typedef enum { ma_resource_manager_data_supply_type_unknown = 0, /* Used for determining whether or the data supply has been initialized. */ ma_resource_manager_data_supply_type_encoded, /* Data supply is an encoded buffer. Connector is ma_decoder. */ ma_resource_manager_data_supply_type_decoded, /* Data supply is a decoded buffer. Connector is ma_audio_buffer. */ ma_resource_manager_data_supply_type_decoded_paged /* Data supply is a linked list of decoded buffers. Connector is ma_paged_audio_buffer. */ } ma_resource_manager_data_supply_type; typedef struct { MA_ATOMIC(4, ma_resource_manager_data_supply_type) type; /* Read and written from different threads so needs to be accessed atomically. */ union { struct { const void* pData; size_t sizeInBytes; } encoded; struct { const void* pData; ma_uint64 totalFrameCount; ma_uint64 decodedFrameCount; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; } decoded; struct { ma_paged_audio_buffer_data data; ma_uint64 decodedFrameCount; ma_uint32 sampleRate; } decodedPaged; } backend; } ma_resource_manager_data_supply; struct ma_resource_manager_data_buffer_node { ma_uint32 hashedName32; /* The hashed name. This is the key. */ ma_uint32 refCount; MA_ATOMIC(4, ma_result) result; /* Result from asynchronous loading. When loading set to MA_BUSY. When fully loaded set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ ma_bool32 isDataOwnedByResourceManager; /* Set to true when the underlying data buffer was allocated the resource manager. Set to false if it is owned by the application (via ma_resource_manager_register_*()). */ ma_resource_manager_data_supply data; ma_resource_manager_data_buffer_node* pParent; ma_resource_manager_data_buffer_node* pChildLo; ma_resource_manager_data_buffer_node* pChildHi; }; struct ma_resource_manager_data_buffer { ma_data_source_base ds; /* Base data source. A data buffer is a data source. */ ma_resource_manager* pResourceManager; /* A pointer to the resource manager that owns this buffer. */ ma_resource_manager_data_buffer_node* pNode; /* The data node. This is reference counted and is what supplies the data. */ ma_uint32 flags; /* The flags that were passed used to initialize the buffer. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ ma_uint64 seekTargetInPCMFrames; /* Only updated by the public API. Never written nor read from the job thread. */ ma_bool32 seekToCursorOnNextRead; /* On the next read we need to seek to the frame cursor. */ MA_ATOMIC(4, ma_result) result; /* Keeps track of a result of decoding. Set to MA_BUSY while the buffer is still loading. Set to MA_SUCCESS when loading is finished successfully. Otherwise set to some other code. */ MA_ATOMIC(4, ma_bool32) isLooping; /* Can be read and written by different threads at the same time. Must be used atomically. */ ma_atomic_bool32 isConnectorInitialized; /* Used for asynchronous loading to ensure we don't try to initialize the connector multiple times while waiting for the node to fully load. */ union { ma_decoder decoder; /* Supply type is ma_resource_manager_data_supply_type_encoded */ ma_audio_buffer buffer; /* Supply type is ma_resource_manager_data_supply_type_decoded */ ma_paged_audio_buffer pagedBuffer; /* Supply type is ma_resource_manager_data_supply_type_decoded_paged */ } connector; /* Connects this object to the node's data supply. */ }; struct ma_resource_manager_data_stream { ma_data_source_base ds; /* Base data source. A data stream is a data source. */ ma_resource_manager* pResourceManager; /* A pointer to the resource manager that owns this data stream. */ ma_uint32 flags; /* The flags that were passed used to initialize the stream. */ ma_decoder decoder; /* Used for filling pages with data. This is only ever accessed by the job thread. The public API should never touch this. */ ma_bool32 isDecoderInitialized; /* Required for determining whether or not the decoder should be uninitialized in MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM. */ ma_uint64 totalLengthInPCMFrames; /* This is calculated when first loaded by the MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM. */ ma_uint32 relativeCursor; /* The playback cursor, relative to the current page. Only ever accessed by the public API. Never accessed by the job thread. */ MA_ATOMIC(8, ma_uint64) absoluteCursor; /* The playback cursor, in absolute position starting from the start of the file. */ ma_uint32 currentPageIndex; /* Toggles between 0 and 1. Index 0 is the first half of pPageData. Index 1 is the second half. Only ever accessed by the public API. Never accessed by the job thread. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ /* Written by the public API, read by the job thread. */ MA_ATOMIC(4, ma_bool32) isLooping; /* Whether or not the stream is looping. It's important to set the looping flag at the data stream level for smooth loop transitions. */ /* Written by the job thread, read by the public API. */ void* pPageData; /* Buffer containing the decoded data of each page. Allocated once at initialization time. */ MA_ATOMIC(4, ma_uint32) pageFrameCount[2]; /* The number of valid PCM frames in each page. Used to determine the last valid frame. */ /* Written and read by both the public API and the job thread. These must be atomic. */ MA_ATOMIC(4, ma_result) result; /* Result from asynchronous loading. When loading set to MA_BUSY. When initialized set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. If an error occurs when loading, set to an error code. */ MA_ATOMIC(4, ma_bool32) isDecoderAtEnd; /* Whether or not the decoder has reached the end. */ MA_ATOMIC(4, ma_bool32) isPageValid[2]; /* Booleans to indicate whether or not a page is valid. Set to false by the public API, set to true by the job thread. Set to false as the pages are consumed, true when they are filled. */ MA_ATOMIC(4, ma_bool32) seekCounter; /* When 0, no seeking is being performed. When > 0, a seek is being performed and reading should be delayed with MA_BUSY. */ }; struct ma_resource_manager_data_source { union { ma_resource_manager_data_buffer buffer; ma_resource_manager_data_stream stream; } backend; /* Must be the first item because we need the first item to be the data source callbacks for the buffer or stream. */ ma_uint32 flags; /* The flags that were passed in to ma_resource_manager_data_source_init(). */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ }; typedef struct { ma_allocation_callbacks allocationCallbacks; ma_log* pLog; ma_format decodedFormat; /* The decoded format to use. Set to ma_format_unknown (default) to use the file's native format. */ ma_uint32 decodedChannels; /* The decoded channel count to use. Set to 0 (default) to use the file's native channel count. */ ma_uint32 decodedSampleRate; /* the decoded sample rate to use. Set to 0 (default) to use the file's native sample rate. */ ma_uint32 jobThreadCount; /* Set to 0 if you want to self-manage your job threads. Defaults to 1. */ size_t jobThreadStackSize; ma_uint32 jobQueueCapacity; /* The maximum number of jobs that can fit in the queue at a time. Defaults to MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY. Cannot be zero. */ ma_uint32 flags; ma_vfs* pVFS; /* Can be NULL in which case defaults will be used. */ ma_decoding_backend_vtable** ppCustomDecodingBackendVTables; ma_uint32 customDecodingBackendCount; void* pCustomDecodingBackendUserData; } ma_resource_manager_config; MA_API ma_resource_manager_config ma_resource_manager_config_init(void); struct ma_resource_manager { ma_resource_manager_config config; ma_resource_manager_data_buffer_node* pRootDataBufferNode; /* The root buffer in the binary tree. */ #ifndef MA_NO_THREADING ma_mutex dataBufferBSTLock; /* For synchronizing access to the data buffer binary tree. */ ma_thread jobThreads[MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT]; /* The threads for executing jobs. */ #endif ma_job_queue jobQueue; /* Multi-consumer, multi-producer job queue for managing jobs for asynchronous decoding and streaming. */ ma_default_vfs defaultVFS; /* Only used if a custom VFS is not specified. */ ma_log log; /* Only used if no log was specified in the config. */ }; /* Init. */ MA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager); MA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager); MA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager); /* Registration. */ MA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags); MA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags); MA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */ MA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); MA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes); /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */ MA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes); MA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath); MA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath); MA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName); MA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName); /* Data Buffers. */ MA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames); /* Data Streams. */ MA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames); /* Data Sources. */ MA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames); /* Job management. */ MA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob); MA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager); /* Helper for posting a quit job. */ MA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob); MA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob); /* DEPRECATED. Use ma_job_process(). Will be removed in version 0.12. */ MA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager); /* Returns MA_CANCELLED if a MA_JOB_TYPE_QUIT job is found. In non-blocking mode, returns MA_NO_DATA_AVAILABLE if no jobs are available. */ #endif /* MA_NO_RESOURCE_MANAGER */ /************************************************************************************************************************************************************ Node Graph ************************************************************************************************************************************************************/ #ifndef MA_NO_NODE_GRAPH /* Must never exceed 254. */ #ifndef MA_MAX_NODE_BUS_COUNT #define MA_MAX_NODE_BUS_COUNT 254 #endif /* Used internally by miniaudio for memory management. Must never exceed MA_MAX_NODE_BUS_COUNT. */ #ifndef MA_MAX_NODE_LOCAL_BUS_COUNT #define MA_MAX_NODE_LOCAL_BUS_COUNT 2 #endif /* Use this when the bus count is determined by the node instance rather than the vtable. */ #define MA_NODE_BUS_COUNT_UNKNOWN 255 /* For some internal memory management of ma_node_graph. */ typedef struct { size_t offset; size_t sizeInBytes; unsigned char _data[1]; } ma_stack; typedef struct ma_node_graph ma_node_graph; typedef void ma_node; /* Node flags. */ typedef enum { MA_NODE_FLAG_PASSTHROUGH = 0x00000001, MA_NODE_FLAG_CONTINUOUS_PROCESSING = 0x00000002, MA_NODE_FLAG_ALLOW_NULL_INPUT = 0x00000004, MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES = 0x00000008, MA_NODE_FLAG_SILENT_OUTPUT = 0x00000010 } ma_node_flags; /* The playback state of a node. Either started or stopped. */ typedef enum { ma_node_state_started = 0, ma_node_state_stopped = 1 } ma_node_state; typedef struct { /* Extended processing callback. This callback is used for effects that process input and output at different rates (i.e. they perform resampling). This is similar to the simple version, only they take two separate frame counts: one for input, and one for output. On input, `pFrameCountOut` is equal to the capacity of the output buffer for each bus, whereas `pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`. On output, set `pFrameCountOut` to the number of PCM frames that were actually output and set `pFrameCountIn` to the number of input frames that were consumed. */ void (* onProcess)(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut); /* A callback for retrieving the number of input frames that are required to output the specified number of output frames. You would only want to implement this when the node performs resampling. This is optional, even for nodes that perform resampling, but it does offer a small reduction in latency as it allows miniaudio to calculate the exact number of input frames to read at a time instead of having to estimate. */ ma_result (* onGetRequiredInputFrameCount)(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount); /* The number of input buses. This is how many sub-buffers will be contained in the `ppFramesIn` parameters of the callbacks above. */ ma_uint8 inputBusCount; /* The number of output buses. This is how many sub-buffers will be contained in the `ppFramesOut` parameters of the callbacks above. */ ma_uint8 outputBusCount; /* Flags describing characteristics of the node. This is currently just a placeholder for some ideas for later on. */ ma_uint32 flags; } ma_node_vtable; typedef struct { const ma_node_vtable* vtable; /* Should never be null. Initialization of the node will fail if so. */ ma_node_state initialState; /* Defaults to ma_node_state_started. */ ma_uint32 inputBusCount; /* Only used if the vtable specifies an input bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise must be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */ ma_uint32 outputBusCount; /* Only used if the vtable specifies an output bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */ const ma_uint32* pInputChannels; /* The number of elements are determined by the input bus count as determined by the vtable, or `inputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */ const ma_uint32* pOutputChannels; /* The number of elements are determined by the output bus count as determined by the vtable, or `outputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */ } ma_node_config; MA_API ma_node_config ma_node_config_init(void); /* A node has multiple output buses. An output bus is attached to an input bus as an item in a linked list. Think of the input bus as a linked list, with the output bus being an item in that list. */ typedef struct ma_node_output_bus ma_node_output_bus; struct ma_node_output_bus { /* Immutable. */ ma_node* pNode; /* The node that owns this output bus. The input node. Will be null for dummy head and tail nodes. */ ma_uint8 outputBusIndex; /* The index of the output bus on pNode that this output bus represents. */ ma_uint8 channels; /* The number of channels in the audio stream for this bus. */ /* Mutable via multiple threads. Must be used atomically. The weird ordering here is for packing reasons. */ ma_uint8 inputNodeInputBusIndex; /* The index of the input bus on the input. Required for detaching. Will only be used within the spinlock so does not need to be atomic. */ MA_ATOMIC(4, ma_uint32) flags; /* Some state flags for tracking the read state of the output buffer. A combination of MA_NODE_OUTPUT_BUS_FLAG_*. */ MA_ATOMIC(4, ma_uint32) refCount; /* Reference count for some thread-safety when detaching. */ MA_ATOMIC(4, ma_bool32) isAttached; /* This is used to prevent iteration of nodes that are in the middle of being detached. Used for thread safety. */ MA_ATOMIC(4, ma_spinlock) lock; /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */ MA_ATOMIC(4, float) volume; /* Linear. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pNext; /* If null, it's the tail node or detached. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pPrev; /* If null, it's the head node or detached. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node*) pInputNode; /* The node that this output bus is attached to. Required for detaching. */ }; /* A node has multiple input buses. The output buses of a node are connecting to the input busses of another. An input bus is essentially just a linked list of output buses. */ typedef struct ma_node_input_bus ma_node_input_bus; struct ma_node_input_bus { /* Mutable via multiple threads. */ ma_node_output_bus head; /* Dummy head node for simplifying some lock-free thread-safety stuff. */ MA_ATOMIC(4, ma_uint32) nextCounter; /* This is used to determine whether or not the input bus is finding the next node in the list. Used for thread safety when detaching output buses. */ MA_ATOMIC(4, ma_spinlock) lock; /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */ /* Set once at startup. */ ma_uint8 channels; /* The number of channels in the audio stream for this bus. */ }; typedef struct ma_node_base ma_node_base; struct ma_node_base { /* These variables are set once at startup. */ ma_node_graph* pNodeGraph; /* The graph this node belongs to. */ const ma_node_vtable* vtable; ma_uint32 inputBusCount; ma_uint32 outputBusCount; ma_node_input_bus* pInputBuses; ma_node_output_bus* pOutputBuses; float* pCachedData; /* Allocated on the heap. Fixed size. Needs to be stored on the heap because reading from output buses is done in separate function calls. */ ma_uint16 cachedDataCapInFramesPerBus; /* The capacity of the input data cache in frames, per bus. */ /* These variables are read and written only from the audio thread. */ ma_uint16 cachedFrameCountOut; ma_uint16 cachedFrameCountIn; ma_uint16 consumedFrameCountIn; /* These variables are read and written between different threads. */ MA_ATOMIC(4, ma_node_state) state; /* When set to stopped, nothing will be read, regardless of the times in stateTimes. */ MA_ATOMIC(8, ma_uint64) stateTimes[2]; /* Indexed by ma_node_state. Specifies the time based on the global clock that a node should be considered to be in the relevant state. */ MA_ATOMIC(8, ma_uint64) localTime; /* The node's local clock. This is just a running sum of the number of output frames that have been processed. Can be modified by any thread with `ma_node_set_time()`. */ /* Memory management. */ ma_node_input_bus _inputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT]; ma_node_output_bus _outputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT]; void* _pHeap; /* A heap allocation for internal use only. pInputBuses and/or pOutputBuses will point to this if the bus count exceeds MA_MAX_NODE_LOCAL_BUS_COUNT. */ ma_bool32 _ownsHeap; /* If set to true, the node owns the heap allocation and _pHeap will be freed in ma_node_uninit(). */ }; MA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode); MA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode); MA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode); MA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode); MA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode); MA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex); MA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex); MA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode); MA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume); MA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state); MA_API ma_node_state ma_node_get_state(const ma_node* pNode); MA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime); MA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state); MA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime); MA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd); MA_API ma_uint64 ma_node_get_time(const ma_node* pNode); MA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime); typedef struct { ma_uint32 channels; ma_uint32 processingSizeInFrames; /* This is the preferred processing size for node processing callbacks unless overridden by a node itself. Can be 0 in which case it will be based on the frame count passed into ma_node_graph_read_pcm_frames(), but will not be well defined. */ size_t preMixStackSizeInBytes; /* Defaults to 512KB per channel. Reducing this will save memory, but the depth of your node graph will be more restricted. */ } ma_node_graph_config; MA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels); struct ma_node_graph { /* Immutable. */ ma_node_base base; /* The node graph itself is a node so it can be connected as an input to different node graph. This has zero inputs and calls ma_node_graph_read_pcm_frames() to generate it's output. */ ma_node_base endpoint; /* Special node that all nodes eventually connect to. Data is read from this node in ma_node_graph_read_pcm_frames(). */ float* pProcessingCache; /* This will be allocated when processingSizeInFrames is non-zero. This is needed because ma_node_graph_read_pcm_frames() can be called with a variable number of frames, and we may need to do some buffering in situations where the caller requests a frame count that's not a multiple of processingSizeInFrames. */ ma_uint32 processingCacheFramesRemaining; ma_uint32 processingSizeInFrames; /* Read and written by multiple threads. */ MA_ATOMIC(4, ma_bool32) isReading; /* Modified only by the audio thread. */ ma_stack* pPreMixStack; }; MA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph); MA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph); MA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph); MA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph); MA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime); /* Data source node. 0 input buses, 1 output bus. Used for reading from a data source. */ typedef struct { ma_node_config nodeConfig; ma_data_source* pDataSource; } ma_data_source_node_config; MA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource); typedef struct { ma_node_base base; ma_data_source* pDataSource; } ma_data_source_node; MA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode); MA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping); MA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode); /* Splitter Node. 1 input, many outputs. Used for splitting/copying a stream so it can be as input into two separate output nodes. */ typedef struct { ma_node_config nodeConfig; ma_uint32 channels; ma_uint32 outputBusCount; } ma_splitter_node_config; MA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels); typedef struct { ma_node_base base; } ma_splitter_node; MA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode); MA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Biquad Node */ typedef struct { ma_node_config nodeConfig; ma_biquad_config biquad; } ma_biquad_node_config; MA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2); typedef struct { ma_node_base baseNode; ma_biquad biquad; } ma_biquad_node; MA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode); MA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode); MA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Low Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_lpf_config lpf; } ma_lpf_node_config; MA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_lpf lpf; } ma_lpf_node; MA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode); MA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode); MA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* High Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_hpf_config hpf; } ma_hpf_node_config; MA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_hpf hpf; } ma_hpf_node; MA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode); MA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode); MA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Band Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_bpf_config bpf; } ma_bpf_node_config; MA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_bpf bpf; } ma_bpf_node; MA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode); MA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode); MA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Notching Filter Node */ typedef struct { ma_node_config nodeConfig; ma_notch_config notch; } ma_notch_node_config; MA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency); typedef struct { ma_node_base baseNode; ma_notch2 notch; } ma_notch_node; MA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode); MA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode); MA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Peaking Filter Node */ typedef struct { ma_node_config nodeConfig; ma_peak_config peak; } ma_peak_node_config; MA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_peak2 peak; } ma_peak_node; MA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode); MA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode); MA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Low Shelf Filter Node */ typedef struct { ma_node_config nodeConfig; ma_loshelf_config loshelf; } ma_loshelf_node_config; MA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_loshelf2 loshelf; } ma_loshelf_node; MA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode); MA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode); MA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* High Shelf Filter Node */ typedef struct { ma_node_config nodeConfig; ma_hishelf_config hishelf; } ma_hishelf_node_config; MA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_hishelf2 hishelf; } ma_hishelf_node; MA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode); MA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode); MA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_node_config nodeConfig; ma_delay_config delay; } ma_delay_node_config; MA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay); typedef struct { ma_node_base baseNode; ma_delay delay; } ma_delay_node; MA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode); MA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode); MA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode); MA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode); #endif /* MA_NO_NODE_GRAPH */ /* SECTION: miniaudio_engine.h */ /************************************************************************************************************************************************************ Engine ************************************************************************************************************************************************************/ #if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH) typedef struct ma_engine ma_engine; typedef struct ma_sound ma_sound; /* Sound flags. */ typedef enum { /* Resource manager flags. */ MA_SOUND_FLAG_STREAM = 0x00000001, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM */ MA_SOUND_FLAG_DECODE = 0x00000002, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE */ MA_SOUND_FLAG_ASYNC = 0x00000004, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC */ MA_SOUND_FLAG_WAIT_INIT = 0x00000008, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT */ MA_SOUND_FLAG_UNKNOWN_LENGTH = 0x00000010, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH */ MA_SOUND_FLAG_LOOPING = 0x00000020, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING */ /* ma_sound specific flags. */ MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT = 0x00001000, /* Do not attach to the endpoint by default. Useful for when setting up nodes in a complex graph system. */ MA_SOUND_FLAG_NO_PITCH = 0x00002000, /* Disable pitch shifting with ma_sound_set_pitch() and ma_sound_group_set_pitch(). This is an optimization. */ MA_SOUND_FLAG_NO_SPATIALIZATION = 0x00004000 /* Disable spatialization. */ } ma_sound_flags; #ifndef MA_ENGINE_MAX_LISTENERS #define MA_ENGINE_MAX_LISTENERS 4 #endif #define MA_LISTENER_INDEX_CLOSEST ((ma_uint8)-1) typedef enum { ma_engine_node_type_sound, ma_engine_node_type_group } ma_engine_node_type; typedef struct { ma_engine* pEngine; ma_engine_node_type type; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRate; /* Only used when the type is set to ma_engine_node_type_sound. */ ma_uint32 volumeSmoothTimeInPCMFrames; /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */ ma_mono_expansion_mode monoExpansionMode; ma_bool8 isPitchDisabled; /* Pitching can be explicitly disabled with MA_SOUND_FLAG_NO_PITCH to optimize processing. */ ma_bool8 isSpatializationDisabled; /* Spatialization can be explicitly disabled with MA_SOUND_FLAG_NO_SPATIALIZATION. */ ma_uint8 pinnedListenerIndex; /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */ } ma_engine_node_config; MA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags); /* Base node object for both ma_sound and ma_sound_group. */ typedef struct { ma_node_base baseNode; /* Must be the first member for compatibility with the ma_node API. */ ma_engine* pEngine; /* A pointer to the engine. Set based on the value from the config. */ ma_uint32 sampleRate; /* The sample rate of the input data. For sounds backed by a data source, this will be the data source's sample rate. Otherwise it'll be the engine's sample rate. */ ma_uint32 volumeSmoothTimeInPCMFrames; ma_mono_expansion_mode monoExpansionMode; ma_fader fader; ma_linear_resampler resampler; /* For pitch shift. */ ma_spatializer spatializer; ma_panner panner; ma_gainer volumeGainer; /* This will only be used if volumeSmoothTimeInPCMFrames is > 0. */ ma_atomic_float volume; /* Defaults to 1. */ MA_ATOMIC(4, float) pitch; float oldPitch; /* For determining whether or not the resampler needs to be updated to reflect the new pitch. The resampler will be updated on the mixing thread. */ float oldDopplerPitch; /* For determining whether or not the resampler needs to be updated to take a new doppler pitch into account. */ MA_ATOMIC(4, ma_bool32) isPitchDisabled; /* When set to true, pitching will be disabled which will allow the resampler to be bypassed to save some computation. */ MA_ATOMIC(4, ma_bool32) isSpatializationDisabled; /* Set to false by default. When set to false, will not have spatialisation applied. */ MA_ATOMIC(4, ma_uint32) pinnedListenerIndex; /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */ /* When setting a fade, it's not done immediately in ma_sound_set_fade(). It's deferred to the audio thread which means we need to store the settings here. */ struct { ma_atomic_float volumeBeg; ma_atomic_float volumeEnd; ma_atomic_uint64 fadeLengthInFrames; /* <-- Defaults to (~(ma_uint64)0) which is used to indicate that no fade should be applied. */ ma_atomic_uint64 absoluteGlobalTimeInFrames; /* <-- The time to start the fade. */ } fadeSettings; /* Memory management. */ ma_bool8 _ownsHeap; void* _pHeap; } ma_engine_node; MA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode); MA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode); MA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks); #define MA_SOUND_SOURCE_CHANNEL_COUNT 0xFFFFFFFF /* Callback for when a sound reaches the end. */ typedef void (* ma_sound_end_proc)(void* pUserData, ma_sound* pSound); typedef struct { const char* pFilePath; /* Set this to load from the resource manager. */ const wchar_t* pFilePathW; /* Set this to load from the resource manager. */ ma_data_source* pDataSource; /* Set this to load from an existing data source. */ ma_node* pInitialAttachment; /* If set, the sound will be attached to an input of this node. This can be set to a ma_sound. If set to NULL, the sound will be attached directly to the endpoint unless MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT is set in `flags`. */ ma_uint32 initialAttachmentInputBusIndex; /* The index of the input bus of pInitialAttachment to attach the sound to. */ ma_uint32 channelsIn; /* Ignored if using a data source as input (the data source's channel count will be used always). Otherwise, setting to 0 will cause the engine's channel count to be used. */ ma_uint32 channelsOut; /* Set this to 0 (default) to use the engine's channel count. Set to MA_SOUND_SOURCE_CHANNEL_COUNT to use the data source's channel count (only used if using a data source as input). */ ma_mono_expansion_mode monoExpansionMode; /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */ ma_uint32 flags; /* A combination of MA_SOUND_FLAG_* flags. */ ma_uint32 volumeSmoothTimeInPCMFrames; /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */ ma_uint64 initialSeekPointInPCMFrames; /* Initializes the sound such that it's seeked to this location by default. */ ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_sound_end_proc endCallback; /* Fired when the sound reaches the end. Will be fired from the audio thread. Do not restart, uninitialize or otherwise change the state of the sound from here. Instead fire an event or set a variable to indicate to a different thread to change the start of the sound. Will not be fired in response to a scheduled stop with ma_sound_set_stop_time_*(). */ void* pEndCallbackUserData; #ifndef MA_NO_RESOURCE_MANAGER ma_resource_manager_pipeline_notifications initNotifications; #endif ma_fence* pDoneFence; /* Deprecated. Use initNotifications instead. Released when the resource manager has finished decoding the entire sound. Not used with streams. */ ma_bool32 isLooping; /* Deprecated. Use the MA_SOUND_FLAG_LOOPING flag in `flags` instead. */ } ma_sound_config; MA_API ma_sound_config ma_sound_config_init(void); /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */ MA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine); /* Will be renamed to ma_sound_config_init() in version 0.12. */ struct ma_sound { ma_engine_node engineNode; /* Must be the first member for compatibility with the ma_node API. */ ma_data_source* pDataSource; MA_ATOMIC(8, ma_uint64) seekTarget; /* The PCM frame index to seek to in the mixing thread. Set to (~(ma_uint64)0) to not perform any seeking. */ MA_ATOMIC(4, ma_bool32) atEnd; ma_sound_end_proc endCallback; void* pEndCallbackUserData; ma_bool8 ownsDataSource; /* We're declaring a resource manager data source object here to save us a malloc when loading a sound via the resource manager, which I *think* will be the most common scenario. */ #ifndef MA_NO_RESOURCE_MANAGER ma_resource_manager_data_source* pResourceManagerDataSource; #endif }; /* Structure specifically for sounds played with ma_engine_play_sound(). Making this a separate structure to reduce overhead. */ typedef struct ma_sound_inlined ma_sound_inlined; struct ma_sound_inlined { ma_sound sound; ma_sound_inlined* pNext; ma_sound_inlined* pPrev; }; /* A sound group is just a sound. */ typedef ma_sound_config ma_sound_group_config; typedef ma_sound ma_sound_group; MA_API ma_sound_group_config ma_sound_group_config_init(void); /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */ MA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine); /* Will be renamed to ma_sound_config_init() in version 0.12. */ typedef void (* ma_engine_process_proc)(void* pUserData, float* pFramesOut, ma_uint64 frameCount); typedef struct { #if !defined(MA_NO_RESOURCE_MANAGER) ma_resource_manager* pResourceManager; /* Can be null in which case a resource manager will be created for you. */ #endif #if !defined(MA_NO_DEVICE_IO) ma_context* pContext; ma_device* pDevice; /* If set, the caller is responsible for calling ma_engine_data_callback() in the device's data callback. */ ma_device_id* pPlaybackDeviceID; /* The ID of the playback device to use with the default listener. */ ma_device_data_proc dataCallback; /* Can be null. Can be used to provide a custom device data callback. */ ma_device_notification_proc notificationCallback; #endif ma_log* pLog; /* When set to NULL, will use the context's log. */ ma_uint32 listenerCount; /* Must be between 1 and MA_ENGINE_MAX_LISTENERS. */ ma_uint32 channels; /* The number of channels to use when mixing and spatializing. When set to 0, will use the native channel count of the device. */ ma_uint32 sampleRate; /* The sample rate. When set to 0 will use the native channel count of the device. */ ma_uint32 periodSizeInFrames; /* If set to something other than 0, updates will always be exactly this size. The underlying device may be a different size, but from the perspective of the mixer that won't matter.*/ ma_uint32 periodSizeInMilliseconds; /* Used if periodSizeInFrames is unset. */ ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. If set to 0, will use gainSmoothTimeInMilliseconds. */ ma_uint32 gainSmoothTimeInMilliseconds; /* When set to 0, gainSmoothTimeInFrames will be used. If both are set to 0, a default value will be used. */ ma_uint32 defaultVolumeSmoothTimeInPCMFrames; /* Defaults to 0. Controls the default amount of smoothing to apply to volume changes to sounds. High values means more smoothing at the expense of high latency (will take longer to reach the new volume). */ ma_uint32 preMixStackSizeInBytes; /* A stack is used for internal processing in the node graph. This allows you to configure the size of this stack. Smaller values will reduce the maximum depth of your node graph. You should rarely need to modify this. */ ma_allocation_callbacks allocationCallbacks; ma_bool32 noAutoStart; /* When set to true, requires an explicit call to ma_engine_start(). This is false by default, meaning the engine will be started automatically in ma_engine_init(). */ ma_bool32 noDevice; /* When set to true, don't create a default device. ma_engine_read_pcm_frames() can be called manually to read data. */ ma_mono_expansion_mode monoExpansionMode; /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */ ma_vfs* pResourceManagerVFS; /* A pointer to a pre-allocated VFS object to use with the resource manager. This is ignored if pResourceManager is not NULL. */ ma_engine_process_proc onProcess; /* Fired at the end of each call to ma_engine_read_pcm_frames(). For engine's that manage their own internal device (the default configuration), this will be fired from the audio thread, and you do not need to call ma_engine_read_pcm_frames() manually in order to trigger this. */ void* pProcessUserData; /* User data that's passed into onProcess. */ } ma_engine_config; MA_API ma_engine_config ma_engine_config_init(void); struct ma_engine { ma_node_graph nodeGraph; /* An engine is a node graph. It should be able to be plugged into any ma_node_graph API (with a cast) which means this must be the first member of this struct. */ #if !defined(MA_NO_RESOURCE_MANAGER) ma_resource_manager* pResourceManager; #endif #if !defined(MA_NO_DEVICE_IO) ma_device* pDevice; /* Optionally set via the config, otherwise allocated by the engine in ma_engine_init(). */ #endif ma_log* pLog; ma_uint32 sampleRate; ma_uint32 listenerCount; ma_spatializer_listener listeners[MA_ENGINE_MAX_LISTENERS]; ma_allocation_callbacks allocationCallbacks; ma_bool8 ownsResourceManager; ma_bool8 ownsDevice; ma_spinlock inlinedSoundLock; /* For synchronizing access to the inlined sound list. */ ma_sound_inlined* pInlinedSoundHead; /* The first inlined sound. Inlined sounds are tracked in a linked list. */ MA_ATOMIC(4, ma_uint32) inlinedSoundCount; /* The total number of allocated inlined sound objects. Used for debugging. */ ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. */ ma_uint32 defaultVolumeSmoothTimeInPCMFrames; ma_mono_expansion_mode monoExpansionMode; ma_engine_process_proc onProcess; void* pProcessUserData; }; MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine); MA_API void ma_engine_uninit(ma_engine* pEngine); MA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine); #if !defined(MA_NO_RESOURCE_MANAGER) MA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine); #endif MA_API ma_device* ma_engine_get_device(ma_engine* pEngine); MA_API ma_log* ma_engine_get_log(ma_engine* pEngine); MA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine); MA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine); MA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine); MA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime); MA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime); MA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine); /* Deprecated. Use ma_engine_get_time_in_pcm_frames(). Will be removed in version 0.12. */ MA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime); /* Deprecated. Use ma_engine_set_time_in_pcm_frames(). Will be removed in version 0.12. */ MA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine); MA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine); MA_API ma_result ma_engine_start(ma_engine* pEngine); MA_API ma_result ma_engine_stop(ma_engine* pEngine); MA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume); MA_API float ma_engine_get_volume(ma_engine* pEngine); MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB); MA_API float ma_engine_get_gain_db(ma_engine* pEngine); MA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine); MA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ); MA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled); MA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex); #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex); MA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup); /* Fire and forget. */ #endif #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound); MA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound); MA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound); #endif MA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound); MA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound); MA_API void ma_sound_uninit(ma_sound* pSound); MA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound); MA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound); MA_API ma_result ma_sound_start(ma_sound* pSound); MA_API ma_result ma_sound_stop(ma_sound* pSound); MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */ MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */ MA_API void ma_sound_set_volume(ma_sound* pSound, float volume); MA_API float ma_sound_get_volume(const ma_sound* pSound); MA_API void ma_sound_set_pan(ma_sound* pSound, float pan); MA_API float ma_sound_get_pan(const ma_sound* pSound); MA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode); MA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound); MA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch); MA_API float ma_sound_get_pitch(const ma_sound* pSound); MA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled); MA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound); MA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex); MA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound); MA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound); MA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound); MA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound); MA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound); MA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound); MA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound); MA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning); MA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound); MA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff); MA_API float ma_sound_get_rolloff(const ma_sound* pSound); MA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain); MA_API float ma_sound_get_min_gain(const ma_sound* pSound); MA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain); MA_API float ma_sound_get_max_gain(const ma_sound* pSound); MA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance); MA_API float ma_sound_get_min_distance(const ma_sound* pSound); MA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance); MA_API float ma_sound_get_max_distance(const ma_sound* pSound); MA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor); MA_API float ma_sound_get_doppler_factor(const ma_sound* pSound); MA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor); MA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound); MA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds); MA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound); MA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds); MA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound); MA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound); MA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound); MA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping); MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound); MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound); MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */ MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds); /* Abstraction to ma_sound_seek_to_pcm_frame() */ MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor); MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength); MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor); MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength); MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData); MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup); MA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup); MA_API void ma_sound_group_uninit(ma_sound_group* pGroup); MA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup); MA_API ma_result ma_sound_group_start(ma_sound_group* pGroup); MA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup); MA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume); MA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan); MA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode); MA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch); MA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled); MA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex); MA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup); MA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup); MA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning); MA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff); MA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain); MA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain); MA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance); MA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance); MA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor); MA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor); MA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds); MA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup); MA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup); MA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup); #endif /* MA_NO_ENGINE */ /* END SECTION: miniaudio_engine.h */ #ifdef __cplusplus } #endif #endif /* miniaudio_h */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ miniaudio-0.11.22/extras/nodes/000077500000000000000000000000001475701111600162545ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_channel_combiner_node/000077500000000000000000000000001475701111600232245ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_channel_combiner_node/ma_channel_combiner_node.c000066400000000000000000000055121475701111600303430ustar00rootroot00000000000000#ifndef miniaudio_channel_combiner_node_c #define miniaudio_channel_combiner_node_c #include "ma_channel_combiner_node.h" #include /* For memset(). */ MA_API ma_channel_combiner_node_config ma_channel_combiner_node_config_init(ma_uint32 channels) { ma_channel_combiner_node_config config; memset(&config, 0, sizeof(config)); config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_channel_combiner_node_init(). */ config.channels = channels; return config; } static void ma_channel_combiner_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_channel_combiner_node* pCombinerNode = (ma_channel_combiner_node*)pNode; (void)pFrameCountIn; ma_interleave_pcm_frames(ma_format_f32, ma_node_get_output_channels(pCombinerNode, 0), *pFrameCountOut, (const void**)ppFramesIn, (void*)ppFramesOut[0]); } static ma_node_vtable g_ma_channel_combiner_node_vtable = { ma_channel_combiner_node_process_pcm_frames, NULL, MA_NODE_BUS_COUNT_UNKNOWN, /* Input bus count is determined by the channel count and is unknown until the node instance is initialized. */ 1, /* 1 output bus. */ 0 /* Default flags. */ }; MA_API ma_result ma_channel_combiner_node_init(ma_node_graph* pNodeGraph, const ma_channel_combiner_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_combiner_node* pCombinerNode) { ma_result result; ma_node_config baseConfig; ma_uint32 inputChannels[MA_MAX_NODE_BUS_COUNT]; ma_uint32 outputChannels[1]; ma_uint32 iChannel; if (pCombinerNode == NULL) { return MA_INVALID_ARGS; } memset(pCombinerNode, 0, sizeof(*pCombinerNode)); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* All input channels are mono. */ for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { inputChannels[iChannel] = 1; } outputChannels[0] = pConfig->channels; baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_channel_combiner_node_vtable; baseConfig.inputBusCount = pConfig->channels; /* The vtable has an unknown channel count, so must specify it here. */ baseConfig.pInputChannels = inputChannels; baseConfig.pOutputChannels = outputChannels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pCombinerNode->baseNode); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API void ma_channel_combiner_node_uninit(ma_channel_combiner_node* pCombinerNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node is always uninitialized first. */ ma_node_uninit(pCombinerNode, pAllocationCallbacks); } #endif /* miniaudio_channel_combiner_node_c */ miniaudio-0.11.22/extras/nodes/ma_channel_combiner_node/ma_channel_combiner_node.h000066400000000000000000000016451475701111600303530ustar00rootroot00000000000000/* Include ma_channel_combiner_node.h after miniaudio.h */ #ifndef miniaudio_channel_combiner_node_h #define miniaudio_channel_combiner_node_h #include "../../../miniaudio.h" #ifdef __cplusplus extern "C" { #endif typedef struct { ma_node_config nodeConfig; ma_uint32 channels; } ma_channel_combiner_node_config; MA_API ma_channel_combiner_node_config ma_channel_combiner_node_config_init(ma_uint32 channels); typedef struct { ma_node_base baseNode; } ma_channel_combiner_node; MA_API ma_result ma_channel_combiner_node_init(ma_node_graph* pNodeGraph, const ma_channel_combiner_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_combiner_node* pSeparatorNode); MA_API void ma_channel_combiner_node_uninit(ma_channel_combiner_node* pSeparatorNode, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* miniaudio_channel_combiner_node_h */ miniaudio-0.11.22/extras/nodes/ma_channel_combiner_node/ma_channel_combiner_node_example.c000066400000000000000000000002331475701111600320510ustar00rootroot00000000000000/* The channel separator example also demonstrates how to use the combiner. */ #include "../ma_channel_separator_node/ma_channel_separator_node_example.c" miniaudio-0.11.22/extras/nodes/ma_channel_separator_node/000077500000000000000000000000001475701111600234265ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_channel_separator_node/ma_channel_separator_node.c000066400000000000000000000060061475701111600307460ustar00rootroot00000000000000#ifndef miniaudio_channel_separator_node_c #define miniaudio_channel_separator_node_c #include "ma_channel_separator_node.h" #include /* For memset(). */ MA_API ma_channel_separator_node_config ma_channel_separator_node_config_init(ma_uint32 channels) { ma_channel_separator_node_config config; memset(&config, 0, sizeof(config)); config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_channel_separator_node_init(). */ config.channels = channels; return config; } static void ma_channel_separator_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_channel_separator_node* pSplitterNode = (ma_channel_separator_node*)pNode; (void)pFrameCountIn; ma_deinterleave_pcm_frames(ma_format_f32, ma_node_get_input_channels(pSplitterNode, 0), *pFrameCountOut, (const void*)ppFramesIn[0], (void**)ppFramesOut); } static ma_node_vtable g_ma_channel_separator_node_vtable = { ma_channel_separator_node_process_pcm_frames, NULL, 1, /* 1 input bus. */ MA_NODE_BUS_COUNT_UNKNOWN, /* Output bus count is determined by the channel count and is unknown until the node instance is initialized. */ 0 /* Default flags. */ }; MA_API ma_result ma_channel_separator_node_init(ma_node_graph* pNodeGraph, const ma_channel_separator_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_separator_node* pSeparatorNode) { ma_result result; ma_node_config baseConfig; ma_uint32 inputChannels[1]; ma_uint32 outputChannels[MA_MAX_NODE_BUS_COUNT]; ma_uint32 iChannel; if (pSeparatorNode == NULL) { return MA_INVALID_ARGS; } memset(pSeparatorNode, 0, sizeof(*pSeparatorNode)); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels > MA_MAX_NODE_BUS_COUNT) { return MA_INVALID_ARGS; /* Channel count cannot exceed the maximum number of buses. */ } inputChannels[0] = pConfig->channels; /* All output channels are mono. */ for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { outputChannels[iChannel] = 1; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_channel_separator_node_vtable; baseConfig.outputBusCount = pConfig->channels; /* The vtable has an unknown channel count, so must specify it here. */ baseConfig.pInputChannels = inputChannels; baseConfig.pOutputChannels = outputChannels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pSeparatorNode->baseNode); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API void ma_channel_separator_node_uninit(ma_channel_separator_node* pSeparatorNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node is always uninitialized first. */ ma_node_uninit(pSeparatorNode, pAllocationCallbacks); } #endif /* miniaudio_channel_separator_node_c */ miniaudio-0.11.22/extras/nodes/ma_channel_separator_node/ma_channel_separator_node.h000066400000000000000000000016611475701111600307550ustar00rootroot00000000000000/* Include ma_channel_separator_node.h after miniaudio.h */ #ifndef miniaudio_channel_separator_node_h #define miniaudio_channel_separator_node_h #include "../../../miniaudio.h" #ifdef __cplusplus extern "C" { #endif typedef struct { ma_node_config nodeConfig; ma_uint32 channels; } ma_channel_separator_node_config; MA_API ma_channel_separator_node_config ma_channel_separator_node_config_init(ma_uint32 channels); typedef struct { ma_node_base baseNode; } ma_channel_separator_node; MA_API ma_result ma_channel_separator_node_init(ma_node_graph* pNodeGraph, const ma_channel_separator_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_separator_node* pSeparatorNode); MA_API void ma_channel_separator_node_uninit(ma_channel_separator_node* pSeparatorNode, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* miniaudio_channel_separator_node_h */ miniaudio-0.11.22/extras/nodes/ma_channel_separator_node/ma_channel_separator_node_example.c000066400000000000000000000126021475701111600324600ustar00rootroot00000000000000#include "../../../miniaudio.c" #include "ma_channel_separator_node.c" #include "../ma_channel_combiner_node/ma_channel_combiner_node.c" #include #define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 0 /* The input file will determine the channel count. */ #define DEVICE_SAMPLE_RATE 48000 /* In this example we're just separating out the channels with a `ma_channel_separator_node`, and then combining them back together with a `ma_channel_combiner_node` before playing them back. */ static ma_decoder g_decoder; /* The decoder that we'll read data from. */ static ma_data_source_node g_dataSupplyNode; /* The node that will sit at the root level. Will be reading data from g_dataSupply. */ static ma_channel_separator_node g_separatorNode; /* The separator node. */ static ma_channel_combiner_node g_combinerNode; /* The combiner node. */ static ma_node_graph g_nodeGraph; /* The main node graph that we'll be feeding data through. */ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { (void)pInput; (void)pDevice; /* All we need to do is read from the node graph. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_decoder_config decoderConfig; ma_device_config deviceConfig; ma_device device; ma_node_graph_config nodeGraphConfig; ma_channel_separator_node_config separatorNodeConfig; ma_channel_combiner_node_config combinerNodeConfig; ma_data_source_node_config dataSupplyNodeConfig; ma_uint32 iChannel; if (argc < 1) { printf("No input file.\n"); return -1; } /* Decoder. */ decoderConfig = ma_decoder_config_init(DEVICE_FORMAT, 0, DEVICE_SAMPLE_RATE); result = ma_decoder_init_file(argv[1], &decoderConfig, &g_decoder); if (result != MA_SUCCESS) { printf("Failed to load decoder.\n"); return -1; } /* Device. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = g_decoder.outputFormat; deviceConfig.playback.channels = g_decoder.outputChannels; deviceConfig.sampleRate = g_decoder.outputSampleRate; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } /* Node graph. */ nodeGraphConfig = ma_node_graph_config_init(device.playback.channels); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("Failed to initialize node graph."); goto done0; } /* Combiner. Attached straight to the endpoint. Input will be the separator node. */ combinerNodeConfig = ma_channel_combiner_node_config_init(device.playback.channels); result = ma_channel_combiner_node_init(&g_nodeGraph, &combinerNodeConfig, NULL, &g_combinerNode); if (result != MA_SUCCESS) { printf("Failed to initialize channel combiner node."); goto done1; } ma_node_attach_output_bus(&g_combinerNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Separator. Attached to the combiner. We need to attach each of the outputs of the separator to each of the inputs of the combiner. */ separatorNodeConfig = ma_channel_separator_node_config_init(device.playback.channels); result = ma_channel_separator_node_init(&g_nodeGraph, &separatorNodeConfig, NULL, &g_separatorNode); if (result != MA_SUCCESS) { printf("Failed to initialize channel separator node."); goto done2; } /* The separator and combiner must have the same number of output and input buses respectively. */ MA_ASSERT(ma_node_get_output_bus_count(&g_separatorNode) == ma_node_get_input_bus_count(&g_combinerNode)); /* Each of the separator's outputs need to be attached to the corresponding input of the combiner. */ for (iChannel = 0; iChannel < ma_node_get_output_bus_count(&g_separatorNode); iChannel += 1) { ma_node_attach_output_bus(&g_separatorNode, iChannel, &g_combinerNode, iChannel); } /* Data supply. Attached to input bus 0 of the reverb node. */ dataSupplyNodeConfig = ma_data_source_node_config_init(&g_decoder); result = ma_data_source_node_init(&g_nodeGraph, &dataSupplyNodeConfig, NULL, &g_dataSupplyNode); if (result != MA_SUCCESS) { printf("Failed to initialize source node."); goto done3; } ma_node_attach_output_bus(&g_dataSupplyNode, 0, &g_separatorNode, 0); /* Now we just start the device and wait for the user to terminate the program. */ ma_device_start(&device); printf("Press Enter to quit...\n"); getchar(); /* It's important that we stop the device first or else we'll uninitialize the graph from under the device. */ ma_device_stop(&device); /*done4:*/ ma_data_source_node_uninit(&g_dataSupplyNode, NULL); done3: ma_channel_separator_node_uninit(&g_separatorNode, NULL); done2: ma_channel_combiner_node_uninit(&g_combinerNode, NULL); done1: ma_node_graph_uninit(&g_nodeGraph, NULL); done0: ma_device_uninit(&device); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/extras/nodes/ma_ltrim_node/000077500000000000000000000000001475701111600210655ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_ltrim_node/ma_ltrim_node.c000066400000000000000000000071121475701111600240430ustar00rootroot00000000000000#ifndef miniaudio_ltrim_node_c #define miniaudio_ltrim_node_c #include "ma_ltrim_node.h" #include /* For memset(). */ #ifndef ma_min #define ma_min(a, b) (((a) < (b)) ? (a) : (b)) #endif MA_API ma_ltrim_node_config ma_ltrim_node_config_init(ma_uint32 channels, float threshold) { ma_ltrim_node_config config; memset(&config, 0, sizeof(config)); config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_ltrim_node_init(). */ config.channels = channels; config.threshold = threshold; return config; } static void ma_ltrim_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_ltrim_node* pTrimNode = (ma_ltrim_node*)pNode; ma_uint32 framesProcessedIn = 0; ma_uint32 framesProcessedOut = 0; ma_uint32 channelCount = ma_node_get_input_channels(pNode, 0); /* If we haven't yet found the start, skip over every input sample until we find a frame outside of the threshold. */ if (pTrimNode->foundStart == MA_FALSE) { while (framesProcessedIn < *pFrameCountIn) { ma_uint32 iChannel = 0; for (iChannel = 0; iChannel < channelCount; iChannel += 1) { float sample = ppFramesIn[0][framesProcessedIn*channelCount + iChannel]; if (sample < -pTrimNode->threshold || sample > pTrimNode->threshold) { pTrimNode->foundStart = MA_TRUE; break; } } if (pTrimNode->foundStart) { break; /* The start has been found. Get out of this loop and finish off processing. */ } else { framesProcessedIn += 1; } } } /* If there's anything left, just copy it over. */ framesProcessedOut = ma_min(*pFrameCountOut, *pFrameCountIn - framesProcessedIn); ma_copy_pcm_frames(ppFramesOut[0], &ppFramesIn[0][framesProcessedIn], framesProcessedOut, ma_format_f32, channelCount); framesProcessedIn += framesProcessedOut; /* We always "process" every input frame, but we may only done a partial output. */ *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; } static ma_node_vtable g_ma_ltrim_node_vtable = { ma_ltrim_node_process_pcm_frames, NULL, 1, /* 1 input bus. */ 1, /* 1 output bus. */ MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES }; MA_API ma_result ma_ltrim_node_init(ma_node_graph* pNodeGraph, const ma_ltrim_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_ltrim_node* pTrimNode) { ma_result result; ma_node_config baseConfig; if (pTrimNode == NULL) { return MA_INVALID_ARGS; } memset(pTrimNode, 0, sizeof(*pTrimNode)); if (pConfig == NULL) { return MA_INVALID_ARGS; } pTrimNode->threshold = pConfig->threshold; pTrimNode->foundStart = MA_FALSE; baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_ltrim_node_vtable; baseConfig.pInputChannels = &pConfig->channels; baseConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pTrimNode->baseNode); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API void ma_ltrim_node_uninit(ma_ltrim_node* pTrimNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node is always uninitialized first. */ ma_node_uninit(pTrimNode, pAllocationCallbacks); } #endif /* miniaudio_ltrim_node_c */ miniaudio-0.11.22/extras/nodes/ma_ltrim_node/ma_ltrim_node.h000066400000000000000000000016221475701111600240500ustar00rootroot00000000000000/* Include ma_ltrim_node.h after miniaudio.h */ #ifndef miniaudio_ltrim_node_h #define miniaudio_ltrim_node_h #include "../../../miniaudio.h" #ifdef __cplusplus extern "C" { #endif /* The trim node has one input and one output. */ typedef struct { ma_node_config nodeConfig; ma_uint32 channels; float threshold; } ma_ltrim_node_config; MA_API ma_ltrim_node_config ma_ltrim_node_config_init(ma_uint32 channels, float threshold); typedef struct { ma_node_base baseNode; float threshold; ma_bool32 foundStart; } ma_ltrim_node; MA_API ma_result ma_ltrim_node_init(ma_node_graph* pNodeGraph, const ma_ltrim_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_ltrim_node* pTrimNode); MA_API void ma_ltrim_node_uninit(ma_ltrim_node* pTrimNode, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* miniaudio_ltrim_node_h */ miniaudio-0.11.22/extras/nodes/ma_ltrim_node/ma_ltrim_node_example.c000066400000000000000000000075111475701111600255610ustar00rootroot00000000000000#include "../../../miniaudio.c" #include "ma_ltrim_node.c" #include #define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 0 /* The input file will determine the channel count. */ #define DEVICE_SAMPLE_RATE 0 /* The input file will determine the sample rate. */ static ma_decoder g_decoder; /* The decoder that we'll read data from. */ static ma_data_source_node g_dataSupplyNode; /* The node that will sit at the root level. Will be reading data from g_dataSupply. */ static ma_ltrim_node g_trimNode; /* The trim node. */ static ma_node_graph g_nodeGraph; /* The main node graph that we'll be feeding data through. */ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { (void)pInput; (void)pDevice; /* All we need to do is read from the node graph. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_decoder_config decoderConfig; ma_device_config deviceConfig; ma_device device; ma_node_graph_config nodeGraphConfig; ma_ltrim_node_config trimNodeConfig; ma_data_source_node_config dataSupplyNodeConfig; if (argc < 1) { printf("No input file.\n"); return -1; } /* Decoder. */ decoderConfig = ma_decoder_config_init(DEVICE_FORMAT, DEVICE_CHANNELS, DEVICE_SAMPLE_RATE); result = ma_decoder_init_file(argv[1], &decoderConfig, &g_decoder); if (result != MA_SUCCESS) { printf("Failed to load decoder.\n"); return -1; } /* Device. */ deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = g_decoder.outputFormat; deviceConfig.playback.channels = g_decoder.outputChannels; deviceConfig.sampleRate = g_decoder.outputSampleRate; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } /* Node graph. */ nodeGraphConfig = ma_node_graph_config_init(device.playback.channels); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("Failed to initialize node graph."); goto done0; } /* Trimmer. Attached straight to the endpoint. Input will be the data source node. */ trimNodeConfig = ma_ltrim_node_config_init(device.playback.channels, 0); result = ma_ltrim_node_init(&g_nodeGraph, &trimNodeConfig, NULL, &g_trimNode); if (result != MA_SUCCESS) { printf("Failed to initialize ltrim node."); goto done1; } ma_node_attach_output_bus(&g_trimNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Data supply. */ dataSupplyNodeConfig = ma_data_source_node_config_init(&g_decoder); result = ma_data_source_node_init(&g_nodeGraph, &dataSupplyNodeConfig, NULL, &g_dataSupplyNode); if (result != MA_SUCCESS) { printf("Failed to initialize data source node."); goto done2; } ma_node_attach_output_bus(&g_dataSupplyNode, 0, &g_trimNode, 0); /* Now we just start the device and wait for the user to terminate the program. */ ma_device_start(&device); printf("Press Enter to quit...\n"); getchar(); /* It's important that we stop the device first or else we'll uninitialize the graph from under the device. */ ma_device_stop(&device); /*done3:*/ ma_data_source_node_uninit(&g_dataSupplyNode, NULL); done2: ma_ltrim_node_uninit(&g_trimNode, NULL); done1: ma_node_graph_uninit(&g_nodeGraph, NULL); done0: ma_device_uninit(&device); return 0; } miniaudio-0.11.22/extras/nodes/ma_reverb_node/000077500000000000000000000000001475701111600212235ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_reverb_node/ma_reverb_node.c000066400000000000000000000052061475701111600243410ustar00rootroot00000000000000#ifndef miniaudio_reverb_node_c #define miniaudio_reverb_node_c #define VERBLIB_IMPLEMENTATION #include "ma_reverb_node.h" #include /* For memset(). */ MA_API ma_reverb_node_config ma_reverb_node_config_init(ma_uint32 channels, ma_uint32 sampleRate) { ma_reverb_node_config config; memset(&config, 0, sizeof(config)); config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_reverb_node_init(). */ config.channels = channels; config.sampleRate = sampleRate; config.roomSize = verblib_initialroom; config.damping = verblib_initialdamp; config.width = verblib_initialwidth; config.wetVolume = verblib_initialwet; config.dryVolume = verblib_initialdry; config.mode = verblib_initialmode; return config; } static void ma_reverb_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_reverb_node* pReverbNode = (ma_reverb_node*)pNode; (void)pFrameCountIn; verblib_process(&pReverbNode->reverb, ppFramesIn[0], ppFramesOut[0], *pFrameCountOut); } static ma_node_vtable g_ma_reverb_node_vtable = { ma_reverb_node_process_pcm_frames, NULL, 1, /* 1 input bus. */ 1, /* 1 output bus. */ MA_NODE_FLAG_CONTINUOUS_PROCESSING /* Reverb requires continuous processing to ensure the tail get's processed. */ }; MA_API ma_result ma_reverb_node_init(ma_node_graph* pNodeGraph, const ma_reverb_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_reverb_node* pReverbNode) { ma_result result; ma_node_config baseConfig; if (pReverbNode == NULL) { return MA_INVALID_ARGS; } memset(pReverbNode, 0, sizeof(*pReverbNode)); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (verblib_initialize(&pReverbNode->reverb, (unsigned long)pConfig->sampleRate, (unsigned int)pConfig->channels) == 0) { return MA_INVALID_ARGS; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_reverb_node_vtable; baseConfig.pInputChannels = &pConfig->channels; baseConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pReverbNode->baseNode); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API void ma_reverb_node_uninit(ma_reverb_node* pReverbNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node is always uninitialized first. */ ma_node_uninit(pReverbNode, pAllocationCallbacks); } #endif /* miniaudio_reverb_node_c */ miniaudio-0.11.22/extras/nodes/ma_reverb_node/ma_reverb_node.h000066400000000000000000000022051475701111600243420ustar00rootroot00000000000000/* Include ma_reverb_node.h after miniaudio.h */ #ifndef miniaudio_reverb_node_h #define miniaudio_reverb_node_h #include "../../../miniaudio.h" #include "verblib.h" #ifdef __cplusplus extern "C" { #endif /* The reverb node has one input and one output. */ typedef struct { ma_node_config nodeConfig; ma_uint32 channels; /* The number of channels of the source, which will be the same as the output. Must be 1 or 2. */ ma_uint32 sampleRate; float roomSize; float damping; float width; float wetVolume; float dryVolume; float mode; } ma_reverb_node_config; MA_API ma_reverb_node_config ma_reverb_node_config_init(ma_uint32 channels, ma_uint32 sampleRate); typedef struct { ma_node_base baseNode; verblib reverb; } ma_reverb_node; MA_API ma_result ma_reverb_node_init(ma_node_graph* pNodeGraph, const ma_reverb_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_reverb_node* pReverbNode); MA_API void ma_reverb_node_uninit(ma_reverb_node* pReverbNode, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* miniaudio_reverb_node_h */ miniaudio-0.11.22/extras/nodes/ma_reverb_node/ma_reverb_node_example.c000066400000000000000000000111341475701111600260510ustar00rootroot00000000000000#include "../../../miniaudio.c" #include "ma_reverb_node.c" #include #define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 1 /* For this example, always set to 1. */ #define DEVICE_SAMPLE_RATE 48000 /* Cannot be less than 22050 for this example. */ static ma_audio_buffer_ref g_dataSupply; /* The underlying data source of the source node. */ static ma_data_source_node g_dataSupplyNode; /* The node that will sit at the root level. Will be reading data from g_dataSupply. */ static ma_reverb_node g_reverbNode; /* The reverb node. */ static ma_node_graph g_nodeGraph; /* The main node graph that we'll be feeding data through. */ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* This example assumes the playback and capture sides use the same format and channel count. The format must be f32. */ if (pDevice->capture.format != DEVICE_FORMAT || pDevice->playback.format != DEVICE_FORMAT || pDevice->capture.channels != pDevice->playback.channels) { return; } /* The node graph system is a pulling style of API. At the lowest level of the chain will be a node acting as a data source for the purpose of delivering the initial audio data. In our case, the data source is our `pInput` buffer. We need to update the underlying data source so that it read data from `pInput`. */ ma_audio_buffer_ref_set_data(&g_dataSupply, pInput, frameCount); /* With the source buffer configured we can now read directly from the node graph. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; ma_node_graph_config nodeGraphConfig; ma_reverb_node_config reverbNodeConfig; ma_data_source_node_config dataSupplyNodeConfig; deviceConfig = ma_device_config_init(ma_device_type_duplex); deviceConfig.capture.pDeviceID = NULL; deviceConfig.capture.format = DEVICE_FORMAT; deviceConfig.capture.channels = DEVICE_CHANNELS; deviceConfig.capture.shareMode = ma_share_mode_shared; deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.sampleRate = DEVICE_SAMPLE_RATE; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } /* Node graph. */ nodeGraphConfig = ma_node_graph_config_init(device.capture.channels); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("Failed to initialize node graph."); goto done0; } /* Reverb. Attached straight to the endpoint. */ reverbNodeConfig = ma_reverb_node_config_init(device.capture.channels, device.sampleRate); result = ma_reverb_node_init(&g_nodeGraph, &reverbNodeConfig, NULL, &g_reverbNode); if (result != MA_SUCCESS) { printf("Failed to initialize reverb node."); goto done1; } ma_node_attach_output_bus(&g_reverbNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Data supply. Attached to input bus 0 of the reverb node. */ result = ma_audio_buffer_ref_init(device.capture.format, device.capture.channels, NULL, 0, &g_dataSupply); if (result != MA_SUCCESS) { printf("Failed to initialize audio buffer for source."); goto done2; } dataSupplyNodeConfig = ma_data_source_node_config_init(&g_dataSupply); result = ma_data_source_node_init(&g_nodeGraph, &dataSupplyNodeConfig, NULL, &g_dataSupplyNode); if (result != MA_SUCCESS) { printf("Failed to initialize source node."); goto done2; } ma_node_attach_output_bus(&g_dataSupplyNode, 0, &g_reverbNode, 0); /* Now we just start the device and wait for the user to terminate the program. */ ma_device_start(&device); printf("Press Enter to quit...\n"); getchar(); /* It's important that we stop the device first or else we'll uninitialize the graph from under the device. */ ma_device_stop(&device); /*done3:*/ ma_data_source_node_uninit(&g_dataSupplyNode, NULL); done2: ma_reverb_node_uninit(&g_reverbNode, NULL); done1: ma_node_graph_uninit(&g_nodeGraph, NULL); done0: ma_device_uninit(&device); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/extras/nodes/ma_reverb_node/verblib.h000066400000000000000000000652441475701111600230340ustar00rootroot00000000000000/* Reverb Library * Verblib version 0.5 - 2022-10-25 * * Philip Bennefall - philip@blastbay.com * * See the end of this file for licensing terms. * This reverb is based on Freeverb, a public domain reverb written by Jezar at Dreampoint. * * IMPORTANT: The reverb currently only works with 1 or 2 channels, at sample rates of 22050 HZ and above. * These restrictions may be lifted in a future version. * * USAGE * * This is a single-file library. To use it, do something like the following in one .c file. * #define VERBLIB_IMPLEMENTATION * #include "verblib.h" * * You can then #include this file in other parts of the program as you would with any other header file. */ #ifndef VERBLIB_H #define VERBLIB_H #ifdef __cplusplus extern "C" { #endif /* COMPILE-TIME OPTIONS */ /* The maximum sample rate that should be supported, specified as a multiple of 44100. */ #ifndef verblib_max_sample_rate_multiplier #define verblib_max_sample_rate_multiplier 4 #endif /* The silence threshold which is used when calculating decay time. */ #ifndef verblib_silence_threshold #define verblib_silence_threshold 80.0 /* In dB (absolute). */ #endif /* PUBLIC API */ typedef struct verblib verblib; /* Initialize a verblib structure. * * Call this function to initialize the verblib structure. * Returns nonzero (true) on success or 0 (false) on failure. * The function will only fail if one or more of the parameters are invalid. */ int verblib_initialize ( verblib* verb, unsigned long sample_rate, unsigned int channels ); /* Run the reverb. * * Call this function continuously to generate your output. * output_buffer may be the same pointer as input_buffer if in place processing is desired. * frames specifies the number of sample frames that should be processed. */ void verblib_process ( verblib* verb, const float* input_buffer, float* output_buffer, unsigned long frames ); /* Set the size of the room, between 0.0 and 1.0. */ void verblib_set_room_size ( verblib* verb, float value ); /* Get the size of the room. */ float verblib_get_room_size ( const verblib* verb ); /* Set the amount of damping, between 0.0 and 1.0. */ void verblib_set_damping ( verblib* verb, float value ); /* Get the amount of damping. */ float verblib_get_damping ( const verblib* verb ); /* Set the stereo width of the reverb, between 0.0 and 1.0. */ void verblib_set_width ( verblib* verb, float value ); /* Get the stereo width of the reverb. */ float verblib_get_width ( const verblib* verb ); /* Set the volume of the wet signal, between 0.0 and 1.0. */ void verblib_set_wet ( verblib* verb, float value ); /* Get the volume of the wet signal. */ float verblib_get_wet ( const verblib* verb ); /* Set the volume of the dry signal, between 0.0 and 1.0. */ void verblib_set_dry ( verblib* verb, float value ); /* Get the volume of the dry signal. */ float verblib_get_dry ( const verblib* verb ); /* Set the stereo width of the input signal sent to the reverb, 0.0 or greater. * Values less than 1.0 narrow the signal, 1.0 sends the input signal unmodified, values greater than 1.0 widen the signal. */ void verblib_set_input_width ( verblib* verb, float value ); /* Get the stereo width of the input signal sent to the reverb. */ float verblib_get_input_width ( const verblib* verb ); /* Set the mode of the reverb, where values below 0.5 mean normal and values above mean frozen. */ void verblib_set_mode ( verblib* verb, float value ); /* Get the mode of the reverb. */ float verblib_get_mode ( const verblib* verb ); /* Get the decay time in sample frames based on the current room size setting. */ /* If freeze mode is active, the decay time is infinite and this function returns 0. */ unsigned long verblib_get_decay_time_in_frames ( const verblib* verb ); /* INTERNAL STRUCTURES */ /* Allpass filter */ typedef struct verblib_allpass verblib_allpass; struct verblib_allpass { float* buffer; float feedback; int bufsize; int bufidx; }; /* Comb filter */ typedef struct verblib_comb verblib_comb; struct verblib_comb { float* buffer; float feedback; float filterstore; float damp1; float damp2; int bufsize; int bufidx; }; /* Reverb model tuning values */ #define verblib_numcombs 8 #define verblib_numallpasses 4 #define verblib_muted 0.0f #define verblib_fixedgain 0.015f #define verblib_scalewet 3.0f #define verblib_scaledry 2.0f #define verblib_scaledamp 0.8f #define verblib_scaleroom 0.28f #define verblib_offsetroom 0.7f #define verblib_initialroom 0.5f #define verblib_initialdamp 0.25f #define verblib_initialwet 1.0f/verblib_scalewet #define verblib_initialdry 0.0f #define verblib_initialwidth 1.0f #define verblib_initialinputwidth 0.0f #define verblib_initialmode 0.0f #define verblib_freezemode 0.5f #define verblib_stereospread 23 /* * These values assume 44.1KHz sample rate, but will be verblib_scaled appropriately. * The values were obtained by listening tests. */ #define verblib_combtuningL1 1116 #define verblib_combtuningR1 (1116+verblib_stereospread) #define verblib_combtuningL2 1188 #define verblib_combtuningR2 (1188+verblib_stereospread) #define verblib_combtuningL3 1277 #define verblib_combtuningR3 (1277+verblib_stereospread) #define verblib_combtuningL4 1356 #define verblib_combtuningR4 (1356+verblib_stereospread) #define verblib_combtuningL5 1422 #define verblib_combtuningR5 (1422+verblib_stereospread) #define verblib_combtuningL6 1491 #define verblib_combtuningR6 (1491+verblib_stereospread) #define verblib_combtuningL7 1557 #define verblib_combtuningR7 (1557+verblib_stereospread) #define verblib_combtuningL8 1617 #define verblib_combtuningR8 (1617+verblib_stereospread) #define verblib_allpasstuningL1 556 #define verblib_allpasstuningR1 (556+verblib_stereospread) #define verblib_allpasstuningL2 441 #define verblib_allpasstuningR2 (441+verblib_stereospread) #define verblib_allpasstuningL3 341 #define verblib_allpasstuningR3 (341+verblib_stereospread) #define verblib_allpasstuningL4 225 #define verblib_allpasstuningR4 (225+verblib_stereospread) /* The main reverb structure. This is the structure that you will create an instance of when using the reverb. */ struct verblib { unsigned int channels; float gain; float roomsize, roomsize1; float damp, damp1; float wet, wet1, wet2; float dry; float width; float input_width; float mode; /* * The following are all declared inline * to remove the need for dynamic allocation. */ /* Comb filters */ verblib_comb combL[verblib_numcombs]; verblib_comb combR[verblib_numcombs]; /* Allpass filters */ verblib_allpass allpassL[verblib_numallpasses]; verblib_allpass allpassR[verblib_numallpasses]; /* Buffers for the combs */ float bufcombL1[verblib_combtuningL1* verblib_max_sample_rate_multiplier]; float bufcombR1[verblib_combtuningR1* verblib_max_sample_rate_multiplier]; float bufcombL2[verblib_combtuningL2* verblib_max_sample_rate_multiplier]; float bufcombR2[verblib_combtuningR2* verblib_max_sample_rate_multiplier]; float bufcombL3[verblib_combtuningL3* verblib_max_sample_rate_multiplier]; float bufcombR3[verblib_combtuningR3* verblib_max_sample_rate_multiplier]; float bufcombL4[verblib_combtuningL4* verblib_max_sample_rate_multiplier]; float bufcombR4[verblib_combtuningR4* verblib_max_sample_rate_multiplier]; float bufcombL5[verblib_combtuningL5* verblib_max_sample_rate_multiplier]; float bufcombR5[verblib_combtuningR5* verblib_max_sample_rate_multiplier]; float bufcombL6[verblib_combtuningL6* verblib_max_sample_rate_multiplier]; float bufcombR6[verblib_combtuningR6* verblib_max_sample_rate_multiplier]; float bufcombL7[verblib_combtuningL7* verblib_max_sample_rate_multiplier]; float bufcombR7[verblib_combtuningR7* verblib_max_sample_rate_multiplier]; float bufcombL8[verblib_combtuningL8* verblib_max_sample_rate_multiplier]; float bufcombR8[verblib_combtuningR8* verblib_max_sample_rate_multiplier]; /* Buffers for the allpasses */ float bufallpassL1[verblib_allpasstuningL1* verblib_max_sample_rate_multiplier]; float bufallpassR1[verblib_allpasstuningR1* verblib_max_sample_rate_multiplier]; float bufallpassL2[verblib_allpasstuningL2* verblib_max_sample_rate_multiplier]; float bufallpassR2[verblib_allpasstuningR2* verblib_max_sample_rate_multiplier]; float bufallpassL3[verblib_allpasstuningL3* verblib_max_sample_rate_multiplier]; float bufallpassR3[verblib_allpasstuningR3* verblib_max_sample_rate_multiplier]; float bufallpassL4[verblib_allpasstuningL4* verblib_max_sample_rate_multiplier]; float bufallpassR4[verblib_allpasstuningR4* verblib_max_sample_rate_multiplier]; }; #ifdef __cplusplus } #endif #endif /* VERBLIB_H */ /* IMPLEMENTATION */ #ifdef VERBLIB_IMPLEMENTATION #include #include #ifdef _MSC_VER #define VERBLIB_INLINE __forceinline #else #ifdef __GNUC__ #define VERBLIB_INLINE inline __attribute__((always_inline)) #else #define VERBLIB_INLINE inline #endif #endif #define verblib_max(x, y) (((x) > (y)) ? (x) : (y)) #define undenormalise(sample) sample+=1.0f; sample-=1.0f; /* Allpass filter */ static void verblib_allpass_initialize ( verblib_allpass* allpass, float* buf, int size ) { allpass->buffer = buf; allpass->bufsize = size; allpass->bufidx = 0; } static VERBLIB_INLINE float verblib_allpass_process ( verblib_allpass* allpass, float input ) { float output; float bufout; bufout = allpass->buffer[allpass->bufidx]; undenormalise ( bufout ); output = -input + bufout; allpass->buffer[allpass->bufidx] = input + ( bufout * allpass->feedback ); if ( ++allpass->bufidx >= allpass->bufsize ) { allpass->bufidx = 0; } return output; } static void verblib_allpass_mute ( verblib_allpass* allpass ) { int i; for ( i = 0; i < allpass->bufsize; i++ ) { allpass->buffer[i] = 0.0f; } } /* Comb filter */ static void verblib_comb_initialize ( verblib_comb* comb, float* buf, int size ) { comb->buffer = buf; comb->bufsize = size; comb->filterstore = 0.0f; comb->bufidx = 0; } static void verblib_comb_mute ( verblib_comb* comb ) { int i; for ( i = 0; i < comb->bufsize; i++ ) { comb->buffer[i] = 0.0f; } } static void verblib_comb_set_damp ( verblib_comb* comb, float val ) { comb->damp1 = val; comb->damp2 = 1.0f - val; } static VERBLIB_INLINE float verblib_comb_process ( verblib_comb* comb, float input ) { float output; output = comb->buffer[comb->bufidx]; undenormalise ( output ); comb->filterstore = ( output * comb->damp2 ) + ( comb->filterstore * comb->damp1 ); undenormalise ( comb->filterstore ); comb->buffer[comb->bufidx] = input + ( comb->filterstore * comb->feedback ); if ( ++comb->bufidx >= comb->bufsize ) { comb->bufidx = 0; } return output; } static void verblib_update ( verblib* verb ) { /* Recalculate internal values after parameter change. */ int i; verb->wet1 = verb->wet * ( verb->width / 2.0f + 0.5f ); verb->wet2 = verb->wet * ( ( 1.0f - verb->width ) / 2.0f ); if ( verb->mode >= verblib_freezemode ) { verb->roomsize1 = 1.0f; verb->damp1 = 0.0f; verb->gain = verblib_muted; } else { verb->roomsize1 = verb->roomsize; verb->damp1 = verb->damp; verb->gain = verblib_fixedgain; } for ( i = 0; i < verblib_numcombs; i++ ) { verb->combL[i].feedback = verb->roomsize1; verb->combR[i].feedback = verb->roomsize1; verblib_comb_set_damp ( &verb->combL[i], verb->damp1 ); verblib_comb_set_damp ( &verb->combR[i], verb->damp1 ); } } static void verblib_mute ( verblib* verb ) { int i; if ( verblib_get_mode ( verb ) >= verblib_freezemode ) { return; } for ( i = 0; i < verblib_numcombs; i++ ) { verblib_comb_mute ( &verb->combL[i] ); verblib_comb_mute ( &verb->combR[i] ); } for ( i = 0; i < verblib_numallpasses; i++ ) { verblib_allpass_mute ( &verb->allpassL[i] ); verblib_allpass_mute ( &verb->allpassR[i] ); } } static int verblib_get_verblib_scaled_buffer_size ( unsigned long sample_rate, unsigned long value ) { long double result = ( long double ) sample_rate; result /= 44100.0; result = ( ( long double ) value ) * result; if ( result < 1.0 ) { result = 1.0; } return ( int ) result; } int verblib_initialize ( verblib* verb, unsigned long sample_rate, unsigned int channels ) { int i; if ( channels != 1 && channels != 2 ) { return 0; /* Currently supports only 1 or 2 channels. */ } if ( sample_rate < 22050 ) { return 0; /* The minimum supported sample rate is 22050 HZ. */ } else if ( sample_rate > 44100 * verblib_max_sample_rate_multiplier ) { return 0; /* The sample rate is too high. */ } verb->channels = channels; /* Tie the components to their buffers. */ verblib_comb_initialize ( &verb->combL[0], verb->bufcombL1, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL1 ) ); verblib_comb_initialize ( &verb->combR[0], verb->bufcombR1, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR1 ) ); verblib_comb_initialize ( &verb->combL[1], verb->bufcombL2, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL2 ) ); verblib_comb_initialize ( &verb->combR[1], verb->bufcombR2, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR2 ) ); verblib_comb_initialize ( &verb->combL[2], verb->bufcombL3, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL3 ) ); verblib_comb_initialize ( &verb->combR[2], verb->bufcombR3, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR3 ) ); verblib_comb_initialize ( &verb->combL[3], verb->bufcombL4, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL4 ) ); verblib_comb_initialize ( &verb->combR[3], verb->bufcombR4, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR4 ) ); verblib_comb_initialize ( &verb->combL[4], verb->bufcombL5, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL5 ) ); verblib_comb_initialize ( &verb->combR[4], verb->bufcombR5, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR5 ) ); verblib_comb_initialize ( &verb->combL[5], verb->bufcombL6, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL6 ) ); verblib_comb_initialize ( &verb->combR[5], verb->bufcombR6, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR6 ) ); verblib_comb_initialize ( &verb->combL[6], verb->bufcombL7, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL7 ) ); verblib_comb_initialize ( &verb->combR[6], verb->bufcombR7, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR7 ) ); verblib_comb_initialize ( &verb->combL[7], verb->bufcombL8, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningL8 ) ); verblib_comb_initialize ( &verb->combR[7], verb->bufcombR8, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_combtuningR8 ) ); verblib_allpass_initialize ( &verb->allpassL[0], verb->bufallpassL1, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningL1 ) ); verblib_allpass_initialize ( &verb->allpassR[0], verb->bufallpassR1, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningR1 ) ); verblib_allpass_initialize ( &verb->allpassL[1], verb->bufallpassL2, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningL2 ) ); verblib_allpass_initialize ( &verb->allpassR[1], verb->bufallpassR2, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningR2 ) ); verblib_allpass_initialize ( &verb->allpassL[2], verb->bufallpassL3, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningL3 ) ); verblib_allpass_initialize ( &verb->allpassR[2], verb->bufallpassR3, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningR3 ) ); verblib_allpass_initialize ( &verb->allpassL[3], verb->bufallpassL4, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningL4 ) ); verblib_allpass_initialize ( &verb->allpassR[3], verb->bufallpassR4, verblib_get_verblib_scaled_buffer_size ( sample_rate, verblib_allpasstuningR4 ) ); /* Set default values. */ for ( i = 0; i < verblib_numallpasses; i++ ) { verb->allpassL[i].feedback = 0.5f; verb->allpassR[i].feedback = 0.5f; } verblib_set_wet ( verb, verblib_initialwet ); verblib_set_room_size ( verb, verblib_initialroom ); verblib_set_dry ( verb, verblib_initialdry ); verblib_set_damping ( verb, verblib_initialdamp ); verblib_set_width ( verb, verblib_initialwidth ); verblib_set_input_width ( verb, verblib_initialinputwidth ); verblib_set_mode ( verb, verblib_initialmode ); /* The buffers will be full of rubbish - so we MUST mute them. */ verblib_mute ( verb ); return 1; } void verblib_process ( verblib* verb, const float* input_buffer, float* output_buffer, unsigned long frames ) { int i; float outL, outR, input; if ( verb->channels == 1 ) { while ( frames-- > 0 ) { outL = 0.0f; input = ( input_buffer[0] * 2.0f ) * verb->gain; /* Accumulate comb filters in parallel. */ for ( i = 0; i < verblib_numcombs; i++ ) { outL += verblib_comb_process ( &verb->combL[i], input ); } /* Feed through allpasses in series. */ for ( i = 0; i < verblib_numallpasses; i++ ) { outL = verblib_allpass_process ( &verb->allpassL[i], outL ); } /* Calculate output REPLACING anything already there. */ output_buffer[0] = outL * verb->wet1 + input_buffer[0] * verb->dry; /* Increment sample pointers. */ ++input_buffer; ++output_buffer; } } else if ( verb->channels == 2 ) { if ( verb->input_width > 0.0f ) /* Stereo input is widened or narrowed. */ { /* * The stereo mid/side code is derived from: * https://www.musicdsp.org/en/latest/Effects/256-stereo-width-control-obtained-via-transfromation-matrix.html * The description of the code on the above page says: * * This work is hereby placed in the public domain for all purposes, including * use in commercial applications. */ const float tmp = 1 / verblib_max ( 1 + verb->input_width, 2 ); const float coef_mid = 1 * tmp; const float coef_side = verb->input_width * tmp; while ( frames-- > 0 ) { const float mid = ( input_buffer[0] + input_buffer[1] ) * coef_mid; const float side = ( input_buffer[1] - input_buffer[0] ) * coef_side; const float input_left = ( mid - side ) * ( verb->gain * 2.0f ); const float input_right = ( mid + side ) * ( verb->gain * 2.0f ); outL = outR = 0.0f; /* Accumulate comb filters in parallel. */ for ( i = 0; i < verblib_numcombs; i++ ) { outL += verblib_comb_process ( &verb->combL[i], input_left ); outR += verblib_comb_process ( &verb->combR[i], input_right ); } /* Feed through allpasses in series. */ for ( i = 0; i < verblib_numallpasses; i++ ) { outL = verblib_allpass_process ( &verb->allpassL[i], outL ); outR = verblib_allpass_process ( &verb->allpassR[i], outR ); } /* Calculate output REPLACING anything already there. */ output_buffer[0] = outL * verb->wet1 + outR * verb->wet2 + input_buffer[0] * verb->dry; output_buffer[1] = outR * verb->wet1 + outL * verb->wet2 + input_buffer[1] * verb->dry; /* Increment sample pointers. */ input_buffer += 2; output_buffer += 2; } } else /* Stereo input is summed to mono. */ { while ( frames-- > 0 ) { outL = outR = 0.0f; input = ( input_buffer[0] + input_buffer[1] ) * verb->gain; /* Accumulate comb filters in parallel. */ for ( i = 0; i < verblib_numcombs; i++ ) { outL += verblib_comb_process ( &verb->combL[i], input ); outR += verblib_comb_process ( &verb->combR[i], input ); } /* Feed through allpasses in series. */ for ( i = 0; i < verblib_numallpasses; i++ ) { outL = verblib_allpass_process ( &verb->allpassL[i], outL ); outR = verblib_allpass_process ( &verb->allpassR[i], outR ); } /* Calculate output REPLACING anything already there. */ output_buffer[0] = outL * verb->wet1 + outR * verb->wet2 + input_buffer[0] * verb->dry; output_buffer[1] = outR * verb->wet1 + outL * verb->wet2 + input_buffer[1] * verb->dry; /* Increment sample pointers. */ input_buffer += 2; output_buffer += 2; } } } } void verblib_set_room_size ( verblib* verb, float value ) { verb->roomsize = ( value * verblib_scaleroom ) + verblib_offsetroom; verblib_update ( verb ); } float verblib_get_room_size ( const verblib* verb ) { return ( verb->roomsize - verblib_offsetroom ) / verblib_scaleroom; } void verblib_set_damping ( verblib* verb, float value ) { verb->damp = value * verblib_scaledamp; verblib_update ( verb ); } float verblib_get_damping ( const verblib* verb ) { return verb->damp / verblib_scaledamp; } void verblib_set_wet ( verblib* verb, float value ) { verb->wet = value * verblib_scalewet; verblib_update ( verb ); } float verblib_get_wet ( const verblib* verb ) { return verb->wet / verblib_scalewet; } void verblib_set_dry ( verblib* verb, float value ) { verb->dry = value * verblib_scaledry; } float verblib_get_dry ( const verblib* verb ) { return verb->dry / verblib_scaledry; } void verblib_set_width ( verblib* verb, float value ) { verb->width = value; verblib_update ( verb ); } float verblib_get_width ( const verblib* verb ) { return verb->width; } void verblib_set_input_width ( verblib* verb, float value ) { verb->input_width = value; } float verblib_get_input_width ( const verblib* verb ) { return verb->input_width; } void verblib_set_mode ( verblib* verb, float value ) { verb->mode = value; verblib_update ( verb ); } float verblib_get_mode ( const verblib* verb ) { if ( verb->mode >= verblib_freezemode ) { return 1.0f; } return 0.0f; } unsigned long verblib_get_decay_time_in_frames ( const verblib* verb ) { double decay; if ( verb->mode >= verblib_freezemode ) { return 0; /* Freeze mode creates an infinite decay. */ } decay = verblib_silence_threshold / fabs ( -20.0 * log ( 1.0 / verb->roomsize1 ) ); decay *= ( double ) ( verb->combR[7].bufsize * 2 ); return ( unsigned long ) decay; } #endif /* VERBLIB_IMPLEMENTATION */ /* REVISION HISTORY * * Version 0.5 - 2022-10-25 * Added two functions called verblib_set_input_width and verblib_get_input_width. * * Version 0.4 - 2021-01-23 * Added a function called verblib_get_decay_time_in_frames. * * Version 0.3 - 2021-01-18 * Added support for sample rates of 22050 and above. * * Version 0.2 - 2021-01-17 * Added support for processing mono audio. * * Version 0.1 - 2021-01-17 * Initial release. */ /* LICENSE This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT No Attribution License Copyright (c) 2022 Philip Bennefall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ miniaudio-0.11.22/extras/nodes/ma_vocoder_node/000077500000000000000000000000001475701111600213775ustar00rootroot00000000000000miniaudio-0.11.22/extras/nodes/ma_vocoder_node/ma_vocoder_node.c000066400000000000000000000054251475701111600246740ustar00rootroot00000000000000#ifndef miniaudio_vocoder_node_c #define miniaudio_vocoder_node_c #define VOCLIB_IMPLEMENTATION #include "ma_vocoder_node.h" #include /* For memset(). */ MA_API ma_vocoder_node_config ma_vocoder_node_config_init(ma_uint32 channels, ma_uint32 sampleRate) { ma_vocoder_node_config config; memset(&config, 0, sizeof(config)); config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_vocoder_node_init(). */ config.channels = channels; config.sampleRate = sampleRate; config.bands = 16; config.filtersPerBand = 6; return config; } static void ma_vocoder_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_vocoder_node* pVocoderNode = (ma_vocoder_node*)pNode; (void)pFrameCountIn; voclib_process(&pVocoderNode->voclib, ppFramesIn[0], ppFramesIn[1], ppFramesOut[0], *pFrameCountOut); } static ma_node_vtable g_ma_vocoder_node_vtable = { ma_vocoder_node_process_pcm_frames, NULL, 2, /* 2 input buses. */ 1, /* 1 output bus. */ 0 }; MA_API ma_result ma_vocoder_node_init(ma_node_graph* pNodeGraph, const ma_vocoder_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_vocoder_node* pVocoderNode) { ma_result result; ma_node_config baseConfig; ma_uint32 inputChannels[2]; ma_uint32 outputChannels[1]; if (pVocoderNode == NULL) { return MA_INVALID_ARGS; } memset(pVocoderNode, 0, sizeof(*pVocoderNode)); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (voclib_initialize(&pVocoderNode->voclib, (unsigned char)pConfig->bands, (unsigned char)pConfig->filtersPerBand, (unsigned int)pConfig->sampleRate, (unsigned char)pConfig->channels) == 0) { return MA_INVALID_ARGS; } inputChannels [0] = pConfig->channels; /* Source/carrier. */ inputChannels [1] = 1; /* Excite/modulator. Must always be single channel. */ outputChannels[0] = pConfig->channels; /* Output channels is always the same as the source/carrier. */ baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_vocoder_node_vtable; baseConfig.pInputChannels = inputChannels; baseConfig.pOutputChannels = outputChannels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pVocoderNode->baseNode); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API void ma_vocoder_node_uninit(ma_vocoder_node* pVocoderNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node must always be initialized first. */ ma_node_uninit(pVocoderNode, pAllocationCallbacks); } #endif /* miniaudio_vocoder_node_c */ miniaudio-0.11.22/extras/nodes/ma_vocoder_node/ma_vocoder_node.h000066400000000000000000000026771475701111600247070ustar00rootroot00000000000000/* Include ma_vocoder_node.h after miniaudio.h */ #ifndef miniaudio_vocoder_node_h #define miniaudio_vocoder_node_h #include "../../../miniaudio.h" #include "voclib.h" #ifdef __cplusplus extern "C" { #endif /* The vocoder node has two inputs and one output. Inputs: Input Bus 0: The source/carrier stream. Input Bus 1: The excite/modulator stream. The source (input bus 0) and output must have the same channel count, and is restricted to 1 or 2. The excite (input bus 1) is restricted to 1 channel. */ typedef struct { ma_node_config nodeConfig; ma_uint32 channels; /* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */ ma_uint32 sampleRate; ma_uint32 bands; /* Defaults to 16. */ ma_uint32 filtersPerBand; /* Defaults to 6. */ } ma_vocoder_node_config; MA_API ma_vocoder_node_config ma_vocoder_node_config_init(ma_uint32 channels, ma_uint32 sampleRate); typedef struct { ma_node_base baseNode; voclib_instance voclib; } ma_vocoder_node; MA_API ma_result ma_vocoder_node_init(ma_node_graph* pNodeGraph, const ma_vocoder_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_vocoder_node* pVocoderNode); MA_API void ma_vocoder_node_uninit(ma_vocoder_node* pVocoderNode, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* miniaudio_vocoder_node_h */ miniaudio-0.11.22/extras/nodes/ma_vocoder_node/ma_vocoder_node_example.c000066400000000000000000000140411475701111600264010ustar00rootroot00000000000000/* Demonstrates how to apply an effect to a duplex stream using the node graph system. This example applies a vocoder effect to the input stream before outputting it. A custom node called `ma_vocoder_node` is used to achieve the effect which can be found in the extras folder in the miniaudio repository. The vocoder node uses https://github.com/blastbay/voclib to achieve the effect. */ #include "../../../miniaudio.c" #include "ma_vocoder_node.c" #include #define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */ #define DEVICE_CHANNELS 1 /* For this example, always set to 1. */ static ma_waveform g_sourceData; /* The underlying data source of the excite node. */ static ma_audio_buffer_ref g_exciteData; /* The underlying data source of the source node. */ static ma_data_source_node g_sourceNode; /* A data source node containing the source data we'll be sending through to the vocoder. This will be routed into the first bus of the vocoder node. */ static ma_data_source_node g_exciteNode; /* A data source node containing the excite data we'll be sending through to the vocoder. This will be routed into the second bus of the vocoder node. */ static ma_vocoder_node g_vocoderNode; /* The vocoder node. */ static ma_node_graph g_nodeGraph; void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { /* This example assumes the playback and capture sides use the same format and channel count. The format must be f32. */ if (pDevice->capture.format != DEVICE_FORMAT || pDevice->playback.format != DEVICE_FORMAT || pDevice->capture.channels != pDevice->playback.channels) { return; } /* The node graph system is a pulling style of API. At the lowest level of the chain will be a node acting as a data source for the purpose of delivering the initial audio data. In our case, the data source is our `pInput` buffer. We need to update the underlying data source so that it read data from `pInput`. */ ma_audio_buffer_ref_set_data(&g_exciteData, pInput, frameCount); /* With the source buffer configured we can now read directly from the node graph. */ ma_node_graph_read_pcm_frames(&g_nodeGraph, pOutput, frameCount, NULL); } int main(int argc, char** argv) { ma_result result; ma_device_config deviceConfig; ma_device device; ma_node_graph_config nodeGraphConfig; ma_vocoder_node_config vocoderNodeConfig; ma_data_source_node_config sourceNodeConfig; ma_data_source_node_config exciteNodeConfig; ma_waveform_config waveformConfig; deviceConfig = ma_device_config_init(ma_device_type_duplex); deviceConfig.capture.pDeviceID = NULL; deviceConfig.capture.format = DEVICE_FORMAT; deviceConfig.capture.channels = DEVICE_CHANNELS; deviceConfig.capture.shareMode = ma_share_mode_shared; deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.dataCallback = data_callback; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return result; } /* Now we can setup our node graph. */ nodeGraphConfig = ma_node_graph_config_init(device.capture.channels); result = ma_node_graph_init(&nodeGraphConfig, NULL, &g_nodeGraph); if (result != MA_SUCCESS) { printf("Failed to initialize node graph."); goto done0; } /* Vocoder. Attached straight to the endpoint. */ vocoderNodeConfig = ma_vocoder_node_config_init(device.capture.channels, device.sampleRate); result = ma_vocoder_node_init(&g_nodeGraph, &vocoderNodeConfig, NULL, &g_vocoderNode); if (result != MA_SUCCESS) { printf("Failed to initialize vocoder node."); goto done1; } ma_node_attach_output_bus(&g_vocoderNode, 0, ma_node_graph_get_endpoint(&g_nodeGraph), 0); /* Amplify the volume of the vocoder output because in my testing it is a bit quiet. */ ma_node_set_output_bus_volume(&g_vocoderNode, 0, 4); /* Source/carrier. Attached to input bus 0 of the vocoder node. */ waveformConfig = ma_waveform_config_init(device.capture.format, device.capture.channels, device.sampleRate, ma_waveform_type_sawtooth, 1.0, 50); result = ma_waveform_init(&waveformConfig, &g_sourceData); if (result != MA_SUCCESS) { printf("Failed to initialize waveform for excite node."); goto done3; } sourceNodeConfig = ma_data_source_node_config_init(&g_sourceData); result = ma_data_source_node_init(&g_nodeGraph, &sourceNodeConfig, NULL, &g_sourceNode); if (result != MA_SUCCESS) { printf("Failed to initialize excite node."); goto done3; } ma_node_attach_output_bus(&g_sourceNode, 0, &g_vocoderNode, 0); /* Excite/modulator. Attached to input bus 1 of the vocoder node. */ result = ma_audio_buffer_ref_init(device.capture.format, device.capture.channels, NULL, 0, &g_exciteData); if (result != MA_SUCCESS) { printf("Failed to initialize audio buffer for source."); goto done2; } exciteNodeConfig = ma_data_source_node_config_init(&g_exciteData); result = ma_data_source_node_init(&g_nodeGraph, &exciteNodeConfig, NULL, &g_exciteNode); if (result != MA_SUCCESS) { printf("Failed to initialize source node."); goto done2; } ma_node_attach_output_bus(&g_exciteNode, 0, &g_vocoderNode, 1); ma_device_start(&device); printf("Press Enter to quit...\n"); getchar(); /* It's important that we stop the device first or else we'll uninitialize the graph from under the device. */ ma_device_stop(&device); /*done4:*/ ma_data_source_node_uninit(&g_exciteNode, NULL); done3: ma_data_source_node_uninit(&g_sourceNode, NULL); done2: ma_vocoder_node_uninit(&g_vocoderNode, NULL); done1: ma_node_graph_uninit(&g_nodeGraph, NULL); done0: ma_device_uninit(&device); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/extras/nodes/ma_vocoder_node/voclib.h000066400000000000000000000627651475701111600230460ustar00rootroot00000000000000/* Vocoder Library * Voclib version 1.1 - 2019-02-16 * * Philip Bennefall - philip@blastbay.com * * See the end of this file for licensing terms. * The filter implementation was derived from public domain code found on musicdsp.org (see the section called "Filters" for more details). * * USAGE * * This is a single-file library. To use it, do something like the following in one .c file. * #define VOCLIB_IMPLEMENTATION * #include "voclib.h" * * You can then #include this file in other parts of the program as you would with any other header file. */ #ifndef VOCLIB_H #define VOCLIB_H #ifdef __cplusplus extern "C" { #endif /* COMPILE-TIME OPTIONS */ /* The maximum number of bands that the vocoder can be initialized with (lower this number to save memory). */ #define VOCLIB_MAX_BANDS 96 /* The maximum number of filters per vocoder band (lower this number to save memory). */ #define VOCLIB_MAX_FILTERS_PER_BAND 8 /* PUBLIC API */ typedef struct voclib_instance voclib_instance; /* Initialize a voclib_instance structure. * * Call this function to initialize the voclib_instance structure. * bands is the number of bands that the vocoder should use; recommended values are between 12 and 64. * bands must be between 4 and VOCLIB_MAX_BANDS (inclusive). * filters_per_band determines the steapness with which the filterbank divides the signal; a value of 6 is recommended. * filters_per_band must be between 1 and VOCLIB_MAX_FILTERS_PER_BAND (inclusive). * sample_rate is the number of samples per second in hertz, and should be between 8000 and 192000 (inclusive). * carrier_channels is the number of channels that the carrier has, and should be between 1 and 2 (inclusive). * Note: The modulator must always have only one channel. * Returns nonzero (true) on success or 0 (false) on failure. * The function will only fail if one or more of the parameters are invalid. */ int voclib_initialize ( voclib_instance* instance, unsigned char bands, unsigned char filters_per_band, unsigned int sample_rate, unsigned char carrier_channels ); /* Run the vocoder. * * Call this function continuously to generate your output. * carrier_buffer and modulator_buffer should contain the carrier and modulator signals respectively. * The modulator must always have one channel. * If the carrier has two channels, the samples in carrier_buffer must be interleaved. * output_buffer will be filled with the result, and must be able to hold as many channels as the carrier. * If the carrier has two channels, the output buffer will be filled with interleaved samples. * output_buffer may be the same pointer as either carrier_buffer or modulator_buffer as long as it can hold the same number of channels as the carrier. * The processing is performed in place. * frames specifies the number of sample frames that should be processed. * Returns nonzero (true) on success or 0 (false) on failure. * The function will only fail if one or more of the parameters are invalid. */ int voclib_process ( voclib_instance* instance, const float* carrier_buffer, const float* modulator_buffer, float* output_buffer, unsigned int frames ); /* Reset the vocoder sample history. * * In order to run smoothly, the vocoder needs to store a few recent samples internally. * This function resets that internal history. This should only be done if you are processing a new stream. * Resetting the history in the middle of a stream will cause clicks. */ void voclib_reset_history ( voclib_instance* instance ); /* Set the reaction time of the vocoder in seconds. * * The reaction time is the time it takes for the vocoder to respond to a volume change in the modulator. * A value of 0.03 (AKA 30 milliseconds) is recommended for intelligible speech. * Values lower than about 0.02 will make the output sound raspy and unpleasant. * Values above 0.2 or so will make the speech hard to understand, but can be used for special effects. * The value must be between 0.002 and 2.0 (inclusive). * Returns nonzero (true) on success or 0 (false) on failure. * The function will only fail if the parameter is invalid. */ int voclib_set_reaction_time ( voclib_instance* instance, float reaction_time ); /* Get the current reaction time of the vocoder in seconds. */ float voclib_get_reaction_time ( const voclib_instance* instance ); /* Set the formant shift of the vocoder in octaves. * * Formant shifting changes the size of the speaker's head. * A value of 1.0 leaves the head size unmodified. * Values lower than 1.0 make the head larger, and values above 1.0 make it smaller. * The value must be between 0.25 and 4.0 (inclusive). * Returns nonzero (true) on success or 0 (false) on failure. * The function will only fail if the parameter is invalid. */ int voclib_set_formant_shift ( voclib_instance* instance, float formant_shift ); /* Get the current formant shift of the vocoder in octaves. */ float voclib_get_formant_shift ( const voclib_instance* instance ); /* INTERNAL STRUCTURES */ /* this holds the data required to update samples thru a filter. */ typedef struct { float a0, a1, a2, a3, a4; float x1, x2, y1, y2; } voclib_biquad; /* Stores the state required for our envelope follower. */ typedef struct { float coef; float history[4]; } voclib_envelope; /* Holds a set of filters required for one vocoder band. */ typedef struct { voclib_biquad filters[VOCLIB_MAX_FILTERS_PER_BAND]; } voclib_band; /* The main instance structure. This is the structure that you will create an instance of when using the vocoder. */ struct voclib_instance { voclib_band analysis_bands[VOCLIB_MAX_BANDS]; /* The filterbank used for analysis (these are applied to the modulator). */ voclib_envelope analysis_envelopes[VOCLIB_MAX_BANDS]; /* The envelopes used to smooth the analysis bands. */ voclib_band synthesis_bands[VOCLIB_MAX_BANDS * 2]; /* The filterbank used for synthesis (these are applied to the carrier). The second half of the array is only used for stereo carriers. */ float reaction_time; /* In seconds. Higher values make the vocoder respond more slowly to changes in the modulator. */ float formant_shift; /* In octaves. 1.0 is unchanged. */ unsigned int sample_rate; /* In hertz. */ unsigned char bands; unsigned char filters_per_band; unsigned char carrier_channels; }; #ifdef __cplusplus } #endif #endif /* VOCLIB_H */ /* IMPLEMENTATION */ #ifdef VOCLIB_IMPLEMENTATION #include #include #ifdef _MSC_VER #define VOCLIB_INLINE __forceinline #else #ifdef __GNUC__ #define VOCLIB_INLINE inline __attribute__((always_inline)) #else #define VOCLIB_INLINE inline #endif #endif /* Filters * * The filter code below was derived from http://www.musicdsp.org/files/biquad.c. The comment at the top of biquad.c file reads: * * Simple implementation of Biquad filters -- Tom St Denis * * Based on the work Cookbook formulae for audio EQ biquad filter coefficients --------------------------------------------------------- by Robert Bristow-Johnson, pbjrbj@viconet.com a.k.a. robert@audioheads.com * Available on the web at http://www.smartelectronix.com/musicdsp/text/filters005.txt * Enjoy. * * This work is hereby placed in the public domain for all purposes, whether * commercial, free [as in speech] or educational, etc. Use the code and please * give me credit if you wish. * * Tom St Denis -- http://tomstdenis.home.dhs.org */ #ifndef VOCLIB_M_LN2 #define VOCLIB_M_LN2 0.69314718055994530942 #endif #ifndef VOCLIB_M_PI #define VOCLIB_M_PI 3.14159265358979323846 #endif /* Computes a BiQuad filter on a sample. */ static VOCLIB_INLINE float voclib_BiQuad ( float sample, voclib_biquad* b ) { float result; /* compute the result. */ result = b->a0 * sample + b->a1 * b->x1 + b->a2 * b->x2 - b->a3 * b->y1 - b->a4 * b->y2; /* shift x1 to x2, sample to x1. */ b->x2 = b->x1; b->x1 = sample; /* shift y1 to y2, result to y1. */ b->y2 = b->y1; b->y1 = result; return result; } /* filter types. */ enum { VOCLIB_LPF, /* low pass filter */ VOCLIB_HPF, /* High pass filter */ VOCLIB_BPF, /* band pass filter */ VOCLIB_NOTCH, /* Notch Filter */ VOCLIB_PEQ, /* Peaking band EQ filter */ VOCLIB_LSH, /* Low shelf filter */ VOCLIB_HSH /* High shelf filter */ }; /* sets up a BiQuad Filter. */ static void voclib_BiQuad_new ( voclib_biquad* b, int type, float dbGain, /* gain of filter */ float freq, /* center frequency */ float srate, /* sampling rate */ float bandwidth ) /* bandwidth in octaves */ { float A, omega, sn, cs, alpha, beta; float a0, a1, a2, b0, b1, b2; /* setup variables. */ A = ( float ) pow ( 10, dbGain / 40.0f ); omega = ( float ) ( 2.0 * VOCLIB_M_PI * freq / srate ); sn = ( float ) sin ( omega ); cs = ( float ) cos ( omega ); alpha = sn * ( float ) sinh ( VOCLIB_M_LN2 / 2 * bandwidth * omega / sn ); beta = ( float ) sqrt ( A + A ); switch ( type ) { case VOCLIB_LPF: b0 = ( 1 - cs ) / 2; b1 = 1 - cs; b2 = ( 1 - cs ) / 2; a0 = 1 + alpha; a1 = -2 * cs; a2 = 1 - alpha; break; case VOCLIB_HPF: b0 = ( 1 + cs ) / 2; b1 = - ( 1 + cs ); b2 = ( 1 + cs ) / 2; a0 = 1 + alpha; a1 = -2 * cs; a2 = 1 - alpha; break; case VOCLIB_BPF: b0 = alpha; b1 = 0; b2 = -alpha; a0 = 1 + alpha; a1 = -2 * cs; a2 = 1 - alpha; break; case VOCLIB_NOTCH: b0 = 1; b1 = -2 * cs; b2 = 1; a0 = 1 + alpha; a1 = -2 * cs; a2 = 1 - alpha; break; case VOCLIB_PEQ: b0 = 1 + ( alpha * A ); b1 = -2 * cs; b2 = 1 - ( alpha * A ); a0 = 1 + ( alpha / A ); a1 = -2 * cs; a2 = 1 - ( alpha / A ); break; case VOCLIB_LSH: b0 = A * ( ( A + 1 ) - ( A - 1 ) * cs + beta * sn ); b1 = 2 * A * ( ( A - 1 ) - ( A + 1 ) * cs ); b2 = A * ( ( A + 1 ) - ( A - 1 ) * cs - beta * sn ); a0 = ( A + 1 ) + ( A - 1 ) * cs + beta * sn; a1 = -2 * ( ( A - 1 ) + ( A + 1 ) * cs ); a2 = ( A + 1 ) + ( A - 1 ) * cs - beta * sn; break; case VOCLIB_HSH: b0 = A * ( ( A + 1 ) + ( A - 1 ) * cs + beta * sn ); b1 = -2 * A * ( ( A - 1 ) + ( A + 1 ) * cs ); b2 = A * ( ( A + 1 ) + ( A - 1 ) * cs - beta * sn ); a0 = ( A + 1 ) - ( A - 1 ) * cs + beta * sn; a1 = 2 * ( ( A - 1 ) - ( A + 1 ) * cs ); a2 = ( A + 1 ) - ( A - 1 ) * cs - beta * sn; break; default: assert ( 0 ); /* Misuse. */ return; } /* precompute the coefficients. */ b->a0 = b0 / a0; b->a1 = b1 / a0; b->a2 = b2 / a0; b->a3 = a1 / a0; b->a4 = a2 / a0; } /* Reset the filter history. */ static void voclib_BiQuad_reset ( voclib_biquad* b ) { b->x1 = b->x2 = 0.0f; b->y1 = b->y2 = 0.0f; } /* Envelope follower. */ static void voclib_envelope_configure ( voclib_envelope* envelope, double time_in_seconds, double sample_rate ) { envelope->coef = ( float ) ( pow ( 0.01, 1.0 / ( time_in_seconds * sample_rate ) ) ); } /* Reset the envelope history. */ static void voclib_envelope_reset ( voclib_envelope* envelope ) { envelope->history[0] = 0.0f; envelope->history[1] = 0.0f; envelope->history[2] = 0.0f; envelope->history[3] = 0.0f; } static VOCLIB_INLINE float voclib_envelope_tick ( voclib_envelope* envelope, float sample ) { const float coef = envelope->coef; envelope->history[0] = ( float ) ( ( 1.0f - coef ) * fabs ( sample ) ) + ( coef * envelope->history[0] ); envelope->history[1] = ( ( 1.0f - coef ) * envelope->history[0] ) + ( coef * envelope->history[1] ); envelope->history[2] = ( ( 1.0f - coef ) * envelope->history[1] ) + ( coef * envelope->history[2] ); envelope->history[3] = ( ( 1.0f - coef ) * envelope->history[2] ) + ( coef * envelope->history[3] ); return envelope->history[3]; } /* Initialize the vocoder filterbank. */ static void voclib_initialize_filterbank ( voclib_instance* instance, int carrier_only ) { unsigned char i; double step; double lastfreq = 0.0; double minfreq = 80.0; double maxfreq = instance->sample_rate; if ( maxfreq > 12000.0 ) { maxfreq = 12000.0; } step = pow ( ( maxfreq / minfreq ), ( 1.0 / instance->bands ) ); for ( i = 0; i < instance->bands; ++i ) { unsigned char i2; double bandwidth, nextfreq; double priorfreq = lastfreq; if ( lastfreq > 0.0 ) { lastfreq *= step; } else { lastfreq = minfreq; } nextfreq = lastfreq * step; bandwidth = ( nextfreq - priorfreq ) / lastfreq; if ( !carrier_only ) { voclib_BiQuad_new ( &instance->analysis_bands[i].filters[0], VOCLIB_BPF, 0.0f, ( float ) lastfreq, ( float ) instance->sample_rate, ( float ) bandwidth ); for ( i2 = 1; i2 < instance->filters_per_band; ++i2 ) { instance->analysis_bands[i].filters[i2].a0 = instance->analysis_bands[i].filters[0].a0; instance->analysis_bands[i].filters[i2].a1 = instance->analysis_bands[i].filters[0].a1; instance->analysis_bands[i].filters[i2].a2 = instance->analysis_bands[i].filters[0].a2; instance->analysis_bands[i].filters[i2].a3 = instance->analysis_bands[i].filters[0].a3; instance->analysis_bands[i].filters[i2].a4 = instance->analysis_bands[i].filters[0].a4; } } if ( instance->formant_shift != 1.0f ) { voclib_BiQuad_new ( &instance->synthesis_bands[i].filters[0], VOCLIB_BPF, 0.0f, ( float ) ( lastfreq * instance->formant_shift ), ( float ) instance->sample_rate, ( float ) bandwidth ); } else { instance->synthesis_bands[i].filters[0].a0 = instance->analysis_bands[i].filters[0].a0; instance->synthesis_bands[i].filters[0].a1 = instance->analysis_bands[i].filters[0].a1; instance->synthesis_bands[i].filters[0].a2 = instance->analysis_bands[i].filters[0].a2; instance->synthesis_bands[i].filters[0].a3 = instance->analysis_bands[i].filters[0].a3; instance->synthesis_bands[i].filters[0].a4 = instance->analysis_bands[i].filters[0].a4; } instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[0].a0 = instance->synthesis_bands[i].filters[0].a0; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[0].a1 = instance->synthesis_bands[i].filters[0].a1; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[0].a2 = instance->synthesis_bands[i].filters[0].a2; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[0].a3 = instance->synthesis_bands[i].filters[0].a3; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[0].a4 = instance->synthesis_bands[i].filters[0].a4; for ( i2 = 1; i2 < instance->filters_per_band; ++i2 ) { instance->synthesis_bands[i].filters[i2].a0 = instance->synthesis_bands[i].filters[0].a0; instance->synthesis_bands[i].filters[i2].a1 = instance->synthesis_bands[i].filters[0].a1; instance->synthesis_bands[i].filters[i2].a2 = instance->synthesis_bands[i].filters[0].a2; instance->synthesis_bands[i].filters[i2].a3 = instance->synthesis_bands[i].filters[0].a3; instance->synthesis_bands[i].filters[i2].a4 = instance->synthesis_bands[i].filters[0].a4; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2].a0 = instance->synthesis_bands[i].filters[0].a0; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2].a1 = instance->synthesis_bands[i].filters[0].a1; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2].a2 = instance->synthesis_bands[i].filters[0].a2; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2].a3 = instance->synthesis_bands[i].filters[0].a3; instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2].a4 = instance->synthesis_bands[i].filters[0].a4; } } } /* Initialize the vocoder envelopes. */ static void voclib_initialize_envelopes ( voclib_instance* instance ) { unsigned char i; voclib_envelope_configure ( &instance->analysis_envelopes[0], instance->reaction_time, ( double ) instance->sample_rate ); for ( i = 1; i < instance->bands; ++i ) { instance->analysis_envelopes[i].coef = instance->analysis_envelopes[0].coef; } } int voclib_initialize ( voclib_instance* instance, unsigned char bands, unsigned char filters_per_band, unsigned int sample_rate, unsigned char carrier_channels ) { if ( !instance ) { return 0; } if ( bands < 4 || bands > VOCLIB_MAX_BANDS ) { return 0; } if ( filters_per_band < 1 || filters_per_band > VOCLIB_MAX_FILTERS_PER_BAND ) { return 0; } if ( sample_rate < 8000 || sample_rate > 192000 ) { return 0; } if ( carrier_channels < 1 || carrier_channels > 2 ) { return 0; } instance->reaction_time = 0.03f; instance->formant_shift = 1.0f; instance->sample_rate = sample_rate; instance->bands = bands; instance->filters_per_band = filters_per_band; instance->carrier_channels = carrier_channels; voclib_reset_history ( instance ); voclib_initialize_filterbank ( instance, 0 ); voclib_initialize_envelopes ( instance ); return 1; } void voclib_reset_history ( voclib_instance* instance ) { unsigned char i; for ( i = 0; i < instance->bands; ++i ) { unsigned char i2; for ( i2 = 0; i2 < instance->filters_per_band; ++i2 ) { voclib_BiQuad_reset ( &instance->analysis_bands[i].filters[i2] ); voclib_BiQuad_reset ( &instance->synthesis_bands[i].filters[i2] ); voclib_BiQuad_reset ( &instance->synthesis_bands[i + VOCLIB_MAX_BANDS].filters[i2] ); } voclib_envelope_reset ( &instance->analysis_envelopes[i] ); } } int voclib_process ( voclib_instance* instance, const float* carrier_buffer, const float* modulator_buffer, float* output_buffer, unsigned int frames ) { unsigned int i; const unsigned char bands = instance->bands; const unsigned char filters_per_band = instance->filters_per_band; if ( !carrier_buffer ) { return 0; } if ( !modulator_buffer ) { return 0; } if ( !output_buffer ) { return 0; } if ( frames == 0 ) { return 0; } if ( instance->carrier_channels == 2 ) { /* The carrier has two channels and the modulator has 1. */ for ( i = 0; i < frames * 2; i += 2, ++modulator_buffer ) { unsigned char i2; float out_left = 0.0f; float out_right = 0.0f; /* Run the bands in parallel and accumulate the output. */ for ( i2 = 0; i2 < bands; ++i2 ) { unsigned char i3; float analysis_band = voclib_BiQuad ( *modulator_buffer, &instance->analysis_bands[i2].filters[0] ); float synthesis_band_left = voclib_BiQuad ( carrier_buffer[i], &instance->synthesis_bands[i2].filters[0] ); float synthesis_band_right = voclib_BiQuad ( carrier_buffer[i + 1], &instance->synthesis_bands[i2 + VOCLIB_MAX_BANDS].filters[0] ); for ( i3 = 1; i3 < filters_per_band; ++i3 ) { analysis_band = voclib_BiQuad ( analysis_band, &instance->analysis_bands[i2].filters[i3] ); synthesis_band_left = voclib_BiQuad ( synthesis_band_left, &instance->synthesis_bands[i2].filters[i3] ); synthesis_band_right = voclib_BiQuad ( synthesis_band_right, &instance->synthesis_bands[i2 + VOCLIB_MAX_BANDS].filters[i3] ); } analysis_band = voclib_envelope_tick ( &instance->analysis_envelopes[i2], analysis_band ); out_left += synthesis_band_left * analysis_band; out_right += synthesis_band_right * analysis_band; } output_buffer[i] = out_left; output_buffer[i + 1] = out_right; } } else { /* Both the carrier and the modulator have a single channel. */ for ( i = 0; i < frames; ++i ) { unsigned char i2; float out = 0.0f; /* Run the bands in parallel and accumulate the output. */ for ( i2 = 0; i2 < bands; ++i2 ) { unsigned char i3; float analysis_band = voclib_BiQuad ( modulator_buffer[i], &instance->analysis_bands[i2].filters[0] ); float synthesis_band = voclib_BiQuad ( carrier_buffer[i], &instance->synthesis_bands[i2].filters[0] ); for ( i3 = 1; i3 < filters_per_band; ++i3 ) { analysis_band = voclib_BiQuad ( analysis_band, &instance->analysis_bands[i2].filters[i3] ); synthesis_band = voclib_BiQuad ( synthesis_band, &instance->synthesis_bands[i2].filters[i3] ); } analysis_band = voclib_envelope_tick ( &instance->analysis_envelopes[i2], analysis_band ); out += synthesis_band * analysis_band; } output_buffer[i] = out; } } return 1; } int voclib_set_reaction_time ( voclib_instance* instance, float reaction_time ) { if ( reaction_time < 0.002f || reaction_time > 2.0f ) { return 0; } instance->reaction_time = reaction_time; voclib_initialize_envelopes ( instance ); return 1; } float voclib_get_reaction_time ( const voclib_instance* instance ) { return instance->reaction_time; } int voclib_set_formant_shift ( voclib_instance* instance, float formant_shift ) { if ( formant_shift < 0.25f || formant_shift > 4.0f ) { return 0; } instance->formant_shift = formant_shift; voclib_initialize_filterbank ( instance, 1 ); return 1; } float voclib_get_formant_shift ( const voclib_instance* instance ) { return instance->formant_shift; } #endif /* VOCLIB_IMPLEMENTATION */ /* REVISION HISTORY * * Version 1.1 - 2019-02-16 * Breaking change: Introduced a new argument to voclib_initialize called carrier_channels. This allows the vocoder to output stereo natively. * Better assignment of band frequencies when using lower sample rates. * The shell now automatically normalizes the output file to match the peak amplitude in the carrier. * Fixed a memory corruption bug in the shell which would occur in response to an error condition. * * Version 1.0 - 2019-01-27 * Initial release. */ /* LICENSE This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT No Attribution License Copyright (c) 2019 Philip Bennefall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ miniaudio-0.11.22/extras/osaudio/000077500000000000000000000000001475701111600166075ustar00rootroot00000000000000miniaudio-0.11.22/extras/osaudio/README.md000066400000000000000000000042221475701111600200660ustar00rootroot00000000000000This is just a little experiment to explore some ideas for the kind of API that I would build if I was building my own operation system. The name "osaudio" means Operating System Audio. Or maybe you can think of it as Open Source Audio. It's whatever you want it to be. The idea behind this project came about after considering the absurd complexity of audio APIs on various platforms after years of working on miniaudio. This project aims to disprove the idea that complete and flexible audio solutions and simple APIs are mutually exclusive and that it's possible to have both. I challenge anybody to prove me wrong. In addition to the above, I also wanted to explore some ideas for a different API design to miniaudio. miniaudio uses a callback model for data transfer, whereas osaudio uses a blocking read/write model. This project is essentially just a header file with a reference implementation that uses miniaudio under the hood. You can compile this very easily - just compile osaudio_miniaudio.c, and use osaudio.h just like any other header. There are no dependencies for the header, and the miniaudio implementation obviously requires miniaudio. Adjust the include path in osaudio_miniaudio.c if need be. See osaudio.h for full documentation. Below is an example to get you started: ```c #include "osaudio.h" ... osaudio_t audio; osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; osaudio_open(&audio, &config); osaudio_write(audio, myAudioData, frameCount); // <-- This will block until all of the data has been sent to the device. osaudio_close(audio); ``` Compare the code above with the likes of other APIs like Core Audio and PipeWire. I challenge anybody to argue their APIs are cleaner and easier to use than this when it comes to simple audio playback. If you have any feedback on this I'd be interested to hear it. In particular, I'd really like to hear from people who believe the likes of Core Audio (Apple), PipeWire, PulseAudio or any other audio API actually have good APIs (they don't!) and what makes their's better and/or worse than this project. miniaudio-0.11.22/extras/osaudio/osaudio.h000066400000000000000000000647541475701111600204430ustar00rootroot00000000000000/* This is a simple API for low-level audio playback and capture. A reference implementation using miniaudio is provided in osaudio.c which can be found alongside this file. Consider all code public domain. The idea behind this project came about after considering the absurd complexity of audio APIs on various platforms after years of working on miniaudio. This project aims to disprove the idea that complete and flexible audio solutions and simple APIs are mutually exclusive and that it's possible to have both. The idea of reliability through simplicity is the first and foremost goal of this project. The difference between this project and miniaudio is that this project is designed around the idea of what I would build if I was building an audio API for an operating system, such as at the level of WASAPI or ALSA. A cross-platform and cross-backend library like miniaudio is necessarily different in design, but there are indeed things that I would have done differently if given my time again, some of those ideas of which I'm expressing in this project. --- The concept of low-level audio is simple - you have a device, such as a speaker system or a micrphone system, and then you write or read audio data to/from it. So in the case of playback, you need only write your raw audio data to the device which then emits it from the speakers when it's ready. Likewise, for capture you simply read audio data from the device which is filled with data by the microphone. A complete low-level audio solution requires the following: 1) The ability to enumerate devices that are connected to the system. 2) The ability to open and close a connection to a device. 3) The ability to start and stop the device. 4) The ability to write and read audio data to/from the device. 5) The ability to query the device for its data configuration. 6) The ability to notify the application when certain events occur, such as the device being stopped, or rerouted. The API presented here aims to meet all of the above requirements. It uses a single-threaded blocking read/write model for data delivery instead of a callback model. This makes it a bit more flexible since it gives the application full control over the audio thread. It might also make it more feasible to use this API on single-threaded systems. Device enumeration is achieved with a single function: osaudio_enumerate(). This function returns an array of osaudio_info_t structures which contain information about each device. The array is allocated must be freed with free(). Contained within the osaudio_info_t struct is, most importantly, the device ID, which is used to open a connection to the device, and the name of the device which can be used to display to the user. For advanced users, it also includes information about the device's native data configuration. Opening and closing a connection to a device is achieved with osaudio_open() and osaudio_close(). An important concept is that of the ability to configure the device. This is achieved with the osaudio_config_t structure which is passed to osaudio_open(). In addition to the ID of the device, this structure includes information about the desired format, channel count and sample rate. You can also configure the latency of the device, or the buffer size, which is specified in frames. A flags member is used for specifying additional options, such as whether or not to disable automatic rerouting. Finally a callback can be specified for notifications. When osaudio_open() returns, the config structure will be filled with the device's actual configuration. You can inspect the channel map from this structure to know how to arrange the channels in your audio data. This API uses a blocking write/read model for pushing and pulling data to/from the device. This is done with the osaudio_write() and osaudio_read() functions. These functions will block until the requested number of frames have been processed or the device is drained or flushed with osaudio_drain() or osaudio_flush() respectively. It is from these functions that the device is started. As soon as you start writing data with osaudio_write() or reading data with osaudio_read(), the device will start. When the device is drained of flushed with osaudio_drain() or osaudio_flush(), the device will be stopped. osaudio_drain() will block until the device has been drained, whereas osaudio_flush() will stop playback immediately and return. You can also pause and resume the device with osaudio_pause() and osaudio_resume(). Since reading and writing is blocking, it can be useful to know how many frames can be written/read without blocking. This is achieved with osaudio_get_avail(). Querying the device's configuration is achieved with osaudio_get_info(). This function will return a pointer to an osaudio_info_t structure which contains information about the device, most importantly its name and data configuration. The name is important for displaying on a UI, and the data configuration is important for knowing how to format your audio data. The osaudio_info_t structure will contain an array of osaudio_config_t structures. This will contain one entry, which will contain the exact information that was returned in the config structure that was passed to osaudio_open(). A common requirement is to open a device that represents the operating system's default device. This is done easily by simply passing in NULL for the device ID. Below is an example for opening a default device: int result; osaudio_t audio; osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; result = osaudio_open(&audio, &config); if (result != OSAUDIO_SUCCESS) { printf("Failed to open device."); return -1; } ... osaudio_close(audio); In the above example, the default device is opened for playback (OSAUDIO_OUTPUT). The format is set to 32-bit floating point (OSAUDIO_FORMAT_F32), the channel count is set to stereo (2), and the sample rate is set to 48kHz. The device is then closed when we're done with it. If instead we wanted to open a specific device, we can do that by passing in the device ID. Below is an example for how to do this: int result; osaudio_t audio; osaudio_config_t config; unsigned int infoCount; osaudio_info_t* info; result = osaudio_enumerate(&infoCount, &info); if (result != OSAUDIO_SUCCESS) { printf("Failed to enumerate devices.\n"); return -1; } // ... Iterate over the `info` array and find the device you want to open. Use the `direction` member to discriminate between input and output ... osaudio_config_init(&config, OSAUDIO_OUTPUT); config.id = &info[indexOfYourChosenDevice].id; config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; osaudio_open(&audio, &config); ... osaudio_close(audio); free(info); // The pointer returned by osaudio_enumerate() must be freed with free(). The id structure is just a 256 byte array that uniquely identifies the device. Implementations may have different representations for device IDs, and A 256 byte array should accommodates all device ID representations. Implementations are required to zero-fill unused bytes. The osaudio_id_t structure can be copied which makes it suitable for serialization and deserialization in situations where you may want to save the device ID to permanent storage so it can be stored in a config file. Implementations need to do their own data conversion between the device's native data configuration and the requested configuration. In this case, when the format, channels and rate are specified in the config, they should be unchanged when osaudio_open() returns. If this is not possible, osaudio_open() will return OSAUDIO_FORMAT_NOT_SUPPORTED. However, there are cases where it's useful for a program to use the device's native configuration instead of some fixed configuration. This is achieved by setting the format, channels and rate to 0. Below is an example: int result; osaudio_t audio; osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); result = osaudio_open(&audio, &config); if (result != OSAUDIO_SUCCESS) { printf("Failed to open device."); return -1; } // ... `config` will have been updated by osaudio_open() to contain the *actual* format/channels/rate ... osaudio_close(audio); In addition to the code above, you can explicitly call `osaudio_get_info()` to retrieve the format configuration. If you need to know the native configuration before opening the device, you can use enumeration. The format, channels and rate will be continued in the first item in the configs array. The examples above all use playback, but the same applies for capture. The only difference is that the direction is set to OSAUDIO_INPUT instead of OSAUDIO_OUTPUT. To output audio from the speakers you need to call osaudio_write(). Likewise, to capture audio from a microphone you need to call osaudio_read(). These functions will block until the requested number of frames have been written or read. The device will start automatically. Below is an example for writing some data to a device: int result = osaudio_write(audio, myAudioData, myAudioDataFrameCount); if (result == OSAUDIO_SUCCESS) { printf("Successfully wrote %d frames of audio data.\n", myAudioDataFrameCount); } else { printf("Failed to write audio data.\n"); } osaudio_write() and osaudio_read() will return OSAUDIO_SUCCESS if the requested number of frames were written or read. You cannot call osaudio_close() while a write or read operation is in progress. If you want to write or read audio data without blocking, you can use osaudio_get_avail() to determine how many frames are available for writing or reading. Below is an example: unsigned int framesAvailable = osaudio_get_avail(audio); if (result > 0) { printf("There are %d frames available for writing.\n", framesAvailable); } else { printf("There are no frames available for writing.\n"); } If you want to abort a blocking write or read, you can use osaudio_flush(). This will result in any pending write or read operation being aborted. There are several ways of pausing a device. The first is to just drain or flush the device and simply don't do any more read/write operations. A drain and flush will put the device into a stopped state until the next call to either read or write, depending on the device's direction. If, however, this does not suit your requirements, you can use osaudio_pause() and osaudio_resume(). Take note, however, that these functions will result in osaudio_drain() never returning because it'll result in the device being in a stopped state which in turn results in the buffer never being read and therefore never drained. Everything is thread safe with a few minor exceptions which has no practical issues for the client: * You cannot call any function while osaudio_open() is still in progress. * You cannot call osaudio_close() while any other function is still in progress. * You can only call osaudio_write() and osaudio_read() from one thread at a time. None of these issues should be a problem for the client in practice. You won't have a valid osaudio_t object until osaudio_open() has returned. For osaudio_close(), it makes no sense to destroy the object while it's still in use, and doing so would mean the client is using very poor form. For osaudio_write() and osaudio_read(), you wouldn't ever want to call this simultaneously across multiple threads anyway because otherwise you'd end up with garbage audio. The rules above only apply when working with a single osaudio_t object. You can have multiple osaudio_t objects open at the same time, and you can call any function on different osaudio_t objects simultaneously from different threads. --- # Feedback I'm looking for feedback on the following: * Are the supported formats enough? If not, what other formats are needed, and what is the justification for including it? Just because it's the native format on one particular piece of hardware is not enough. Big-endian and little-endian will never be supported. All formats are native-endian. * Are the available channel positions enough? What other positions are needed? * Just some general criticism would be appreciated. */ #ifndef osaudio_h #define osaudio_h #ifdef __cplusplus extern "C" { #endif /* Support far pointers on relevant platforms (DOS, in particular). The version of this file distributed with an operating system wouldn't need this because they would just have an OS-specific version of this file, but as a reference it's useful to use far pointers here. */ #if defined(__MSDOS__) || defined(_MSDOS) || defined(__DOS__) #define OSAUDIO_FAR far #else #define OSAUDIO_FAR #endif typedef struct _osaudio_t* osaudio_t; typedef struct osaudio_config_t osaudio_config_t; typedef struct osaudio_id_t osaudio_id_t; typedef struct osaudio_info_t osaudio_info_t; typedef struct osaudio_notification_t osaudio_notification_t; /* Results codes. */ typedef int osaudio_result_t; #define OSAUDIO_SUCCESS 0 #define OSAUDIO_ERROR -1 #define OSAUDIO_INVALID_ARGS -2 #define OSAUDIO_INVALID_OPERATION -3 #define OSAUDIO_OUT_OF_MEMORY -4 #define OSAUDIO_FORMAT_NOT_SUPPORTED -101 /* The requested format is not supported. */ #define OSAUDIO_XRUN -102 /* An underrun or overrun occurred. Can be returned by osaudio_read() or osaudio_write(). */ #define OSAUDIO_DEVICE_STOPPED -103 /* The device is stopped. Can be returned by osaudio_drain(). It is invalid to call osaudio_drain() on a device that is not running because otherwise it'll get stuck. */ /* Directions. Cannot be combined. Use separate osaudio_t objects for bidirectional setups. */ typedef int osaudio_direction_t; #define OSAUDIO_INPUT 1 #define OSAUDIO_OUTPUT 2 /* All formats are native endian and interleaved. */ typedef int osaudio_format_t; #define OSAUDIO_FORMAT_UNKNOWN 0 #define OSAUDIO_FORMAT_F32 1 #define OSAUDIO_FORMAT_U8 2 #define OSAUDIO_FORMAT_S16 3 #define OSAUDIO_FORMAT_S24 4 /* Tightly packed. */ #define OSAUDIO_FORMAT_S32 5 /* Channel positions. */ typedef unsigned char osaudio_channel_t; #define OSAUDIO_CHANNEL_NONE 0 #define OSAUDIO_CHANNEL_MONO 1 #define OSAUDIO_CHANNEL_FL 2 #define OSAUDIO_CHANNEL_FR 3 #define OSAUDIO_CHANNEL_FC 4 #define OSAUDIO_CHANNEL_LFE 5 #define OSAUDIO_CHANNEL_BL 6 #define OSAUDIO_CHANNEL_BR 7 #define OSAUDIO_CHANNEL_FLC 8 #define OSAUDIO_CHANNEL_FRC 9 #define OSAUDIO_CHANNEL_BC 10 #define OSAUDIO_CHANNEL_SL 11 #define OSAUDIO_CHANNEL_SR 12 #define OSAUDIO_CHANNEL_TC 13 #define OSAUDIO_CHANNEL_TFL 14 #define OSAUDIO_CHANNEL_TFC 15 #define OSAUDIO_CHANNEL_TFR 16 #define OSAUDIO_CHANNEL_TBL 17 #define OSAUDIO_CHANNEL_TBC 18 #define OSAUDIO_CHANNEL_TBR 19 #define OSAUDIO_CHANNEL_AUX0 20 #define OSAUDIO_CHANNEL_AUX1 21 #define OSAUDIO_CHANNEL_AUX2 22 #define OSAUDIO_CHANNEL_AUX3 23 #define OSAUDIO_CHANNEL_AUX4 24 #define OSAUDIO_CHANNEL_AUX5 25 #define OSAUDIO_CHANNEL_AUX6 26 #define OSAUDIO_CHANNEL_AUX7 27 #define OSAUDIO_CHANNEL_AUX8 28 #define OSAUDIO_CHANNEL_AUX9 29 #define OSAUDIO_CHANNEL_AUX10 30 #define OSAUDIO_CHANNEL_AUX11 31 #define OSAUDIO_CHANNEL_AUX12 32 #define OSAUDIO_CHANNEL_AUX13 33 #define OSAUDIO_CHANNEL_AUX14 34 #define OSAUDIO_CHANNEL_AUX15 35 #define OSAUDIO_CHANNEL_AUX16 36 #define OSAUDIO_CHANNEL_AUX17 37 #define OSAUDIO_CHANNEL_AUX18 38 #define OSAUDIO_CHANNEL_AUX19 39 #define OSAUDIO_CHANNEL_AUX20 40 #define OSAUDIO_CHANNEL_AUX21 41 #define OSAUDIO_CHANNEL_AUX22 42 #define OSAUDIO_CHANNEL_AUX23 43 #define OSAUDIO_CHANNEL_AUX24 44 #define OSAUDIO_CHANNEL_AUX25 45 #define OSAUDIO_CHANNEL_AUX26 46 #define OSAUDIO_CHANNEL_AUX27 47 #define OSAUDIO_CHANNEL_AUX28 48 #define OSAUDIO_CHANNEL_AUX29 49 #define OSAUDIO_CHANNEL_AUX30 50 #define OSAUDIO_CHANNEL_AUX31 51 /* The maximum number of channels supported. */ #define OSAUDIO_MAX_CHANNELS 64 /* Notification types. */ typedef int osaudio_notification_type_t; #define OSAUDIO_NOTIFICATION_STARTED 0 /* The device was started in response to a call to osaudio_write() or osaudio_read(). */ #define OSAUDIO_NOTIFICATION_STOPPED 1 /* The device was stopped in response to a call to osaudio_drain() or osaudio_flush(). */ #define OSAUDIO_NOTIFICATION_REROUTED 2 /* The device was rerouted. Not all implementations need to support rerouting. */ #define OSAUDIO_NOTIFICATION_INTERRUPTION_BEGIN 3 /* The device was interrupted due to something like a phone call. */ #define OSAUDIO_NOTIFICATION_INTERRUPTION_END 4 /* The interruption has been ended. */ /* Flags. */ #define OSAUDIO_FLAG_NO_REROUTING 1 /* When set, will tell the implementation to disable automatic rerouting if possible. This is a hint and may be ignored by the implementation. */ #define OSAUDIO_FLAG_REPORT_XRUN 2 /* When set, will tell the implementation to report underruns and overruns via osaudio_write() and osaudio_read() by aborting and returning OSAUDIO_XRUN. */ struct osaudio_notification_t { osaudio_notification_type_t type; /* OSAUDIO_NOTIFICATION_* */ union { struct { int _unused; } started; struct { int _unused; } stopped; struct { int _unused; } rerouted; struct { int _unused; } interruption; } data; }; struct osaudio_id_t { char data[256]; }; struct osaudio_config_t { osaudio_id_t* device_id; /* Set to NULL to use default device. When non-null, automatic routing will be disabled. */ osaudio_direction_t direction; /* OSAUDIO_INPUT or OSAUDIO_OUTPUT. Cannot be combined. Use separate osaudio_t objects for bidirectional setups. */ osaudio_format_t format; /* OSAUDIO_FORMAT_* */ unsigned int channels; /* Number of channels. */ unsigned int rate; /* Sample rate in seconds. */ osaudio_channel_t channel_map[OSAUDIO_MAX_CHANNELS]; /* Leave all items set to 0 for defaults. */ unsigned int buffer_size; /* In frames. Set to 0 to use the system default. */ unsigned int flags; /* A combination of OSAUDIO_FLAG_* */ void (* notification)(void* user_data, const osaudio_notification_t* notification); /* Called when some kind of event occurs, such as a device being closed. Never called from the audio thread. */ void* user_data; /* Passed to notification(). */ }; struct osaudio_info_t { osaudio_id_t id; char name[256]; osaudio_direction_t direction; /* OSAUDIO_INPUT or OSAUDIO_OUTPUT. */ unsigned int config_count; osaudio_config_t* configs; }; /* Enumerates the available devices. On output, `count` will contain the number of items in the `info` array. The array must be freed with free() when it's no longer needed. Use the `direction` member to discriminate between input and output devices. Below is an example: unsigned int count; osaudio_info_t* info; osaudio_enumerate(&count, &info); for (int i = 0; i < count; ++i) { if (info[i].direction == OSAUDIO_OUTPUT) { printf("Output device: %s\n", info[i].name); } else { printf("Input device: %s\n", info[i].name); } } You can use the `id` member to open a specific device with osaudio_open(). You do not need to do device enumeration if you only want to open the default device. */ osaudio_result_t osaudio_enumerate(unsigned int* count, osaudio_info_t** info); /* Initializes a default config. The config object will be cleared to zero, with the direction set to `direction`. This will result in a configuration that uses the device's native format, channels and rate. osaudio_config_t is a transparent struct. Just set the relevant fields to the desired values after calling this function. Example: osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; */ void osaudio_config_init(osaudio_config_t* config, osaudio_direction_t direction); /* Opens a connection to a device. On input, config must be filled with the desired configuration. On output, it will be filled with the actual configuration. Initialize the config with osaudio_config_init() and then fill in the desired configuration. Below is an example: osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; When the format, channels or rate are left at their default values, or set to 0 (or OSAUDIO_FORMAT_UNKNOWN for format), the native format, channels or rate will use the device's native configuration: osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_UNKNOWN; config.channels = 0; config.rate = 0; The code above is equivalent to this: osaudio_config_t config; osaudio_config_init(&config, OSAUDIO_OUTPUT); On output the config will be filled with the actual configuration. The implementation will perform any necessary data conversion between the requested data configuration and the device's native configuration. If it cannot, the function will return a OSAUDIO_FORMAT_NOT_SUPPORTED error. In this case the caller can decide to reinitialize the device to use its native configuration and do its own data conversion, or abort if it cannot do so. Use the channel map to determine the ordering of your channels. Automatic channel map conversion is not performed - that must be done manually by the caller when transferring data to/from the device. Close the device with osaudio_close(). Returns 0 on success, any other error code on failure. */ osaudio_result_t osaudio_open(osaudio_t* audio, osaudio_config_t* config); /* Closes a connection to a device. As soon as this function is called, the device should be considered invalid and unusable. Do not attempt to use the audio object once this function has been called. It's invalid to call this while any other function is still running. You can use osaudio_flush() to quickly abort any pending writes or reads. You can also use osaudio_drain() to wait for all pending writes or reads to complete. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_close(osaudio_t audio); /* Writes audio data to the device. This will block until all data has been written or the device is closed. You can only write from a single thread at any given time. If you want to write from multiple threads, you need to use your own synchronization mechanism. This will automatically start the device if frame_count is > 0 and it's not in a paused state. Use osaudio_get_avail() to determine how much data can be written without blocking. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_write(osaudio_t audio, const void OSAUDIO_FAR* data, unsigned int frame_count); /* Reads audio data from the device. This will block until the requested number of frames has been read or the device is closed. You can only read from a single thread at any given time. If you want to read from multiple threads, you need to use your own synchronization mechanism. This will automatically start the device if frame_count is > 0 and it's not in a paused state. Use osaudio_get_avail() to determine how much data can be read without blocking. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_read(osaudio_t audio, void OSAUDIO_FAR* data, unsigned int frame_count); /* Drains the device. This will block until all pending reads or writes have completed. If after calling this function another call to osaudio_write() or osaudio_read() is made, the device will be resumed like normal. It is invalid to call this while the device is paused. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_drain(osaudio_t audio); /* Flushes the device. This will immediately flush any pending reads or writes. It will not block. Any in-progress reads or writes will return immediately. If after calling this function another thread starts reading or writing, the device will be resumed like normal. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_flush(osaudio_t audio); /* Pauses or resumes the device. Pausing a device will trigger a OSAUDIO_NOTIFICATION_STOPPED notification. Resuming a device will trigger a OSAUDIO_NOTIFICATION_STARTED notification. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_pause(osaudio_t audio); /* Resumes the device. Returns 0 on success, < 0 on failure. */ osaudio_result_t osaudio_resume(osaudio_t audio); /* Returns the number of frames that can be read or written without blocking. */ unsigned int osaudio_get_avail(osaudio_t audio); /* Gets information about the device. There will be one item in the configs array which will contain the device's current configuration, the contents of which will match that of the config that was returned by osaudio_open(). Returns NULL on failure. Do not free the returned pointer. It's up to the implementation to manage the memory of this object. */ const osaudio_info_t* osaudio_get_info(osaudio_t audio); #ifdef __cplusplus } #endif #endif /* osaudio_h */ miniaudio-0.11.22/extras/osaudio/osaudio_dos_soundblaster.c000066400000000000000000001154611475701111600240600ustar00rootroot00000000000000/* This is only designed to work on DOS. I have only tested compiling this with OpenWatcom v2.0. Open to feedback on improving compiler compatibility. This will look at the BLASTER environment variable for the base port, IRQ and DMA channel. We're only allowing a single device to be initialized at any given time. The channel will be defined by the BLASTER environment variable, or if that's not set, it will default to channel 1 (for 8-bit) or channel 5 (for 16-bit). */ /* Keep this file empty if we're not compiling for DOS. */ #if defined(__MSDOS__) || defined(__DOS__) #ifndef osaudio_dos_soundblaster_c #define osaudio_dos_soundblaster_c #include "osaudio.h" #include /* outportb() */ #include /* delay() */ #include /* memset() */ #include /* malloc(), free() */ int g_TESTING = 0; #define OSAUDIO_TIMEOUT_TICKS 18 /* ~1 second timeout (just under - runs at 18.2 ticks per second). Sound Blaster specs claim it should only take about 100 microseconds so this is way overkill. */ #define OSAUDIO_SB_MIXER_PORT 0x004 #define OSAUDIO_SB_MIXER_DATA_PORT 0x005 #define OSAUDIO_SB_DSP_RESET_PORT 0x006 #define OSAUDIO_SB_DSP_READ_PORT 0x00A #define OSAUDIO_SB_DSP_WRITE_PORT 0x00C #define OSAUDIO_SB_DSP_READY_READ_PORT 0x00E #define OSAUDIO_SB_DSP_RESET_CMD 0x01 #define OSAUDIO_SB_DSP_GET_VERSION 0xE1 #define OSAUDIO_ISA_DMA_MASK_REGISTER_8BIT 0x0A #define OSAUDIO_ISA_DMA_MASK_REGISTER_16BIT 0xD4 #define OSAUDIO_ISA_DMA_FLIPFLOP_REGISTER_8BIT 0x0C #define OSAUDIO_ISA_DMA_FLIPFLOP_REGISTER_16BIT 0xD8 #define OSAUDIO_ISA_DMA_MODE_REGISTER_8BIT 0x0B #define OSAUDIO_ISA_DMA_MODE_REGISTER_16BIT 0xD6 #define OSAUDIO_ISA_DMA_MODE_DEMAND 0x00 #define OSAUDIO_ISA_DMA_MODE_SINGLE 0x40 #define OSAUDIO_ISA_DMA_MODE_BLOCK 0x80 #define OSAUDIO_ISA_DMA_MODE_CASCADE 0xC0 #define OSAUDIO_ISA_DMA_MODE_READ 0x08 #define OSAUDIO_ISA_DMA_MODE_WRITE 0x04 #define OSAUDIO_ISA_DMA_MODE_AUTOINIT 0x10 #define OSAUDIO_ISA_DMA_ADDRESS_REGISTER_8BIT 0x00 #define OSAUDIO_ISA_DMA_ADDRESS_REGISTER_16BIT 0xC0 #define OSAUDIO_ISA_DMA_COUNT_REGISTER_8BIT 0x01 #define OSAUDIO_ISA_DMA_COUNT_REGISTER_16BIT 0xC2 #define OSAUDIO_SB_DEVICE_NAME "Sound Blaster" #define OSAUDIO_COUNTOF(x) (sizeof(x) / sizeof(x[0])) #define OSAUDIO_ALIGN(x, a) (((x) + ((a)-1)) & ~((a)-1)) #define OSAUDIO_ALIGN_32(x) OSAUDIO_ALIGN(x, 4) /* BLASTER environment variable defaults. */ static unsigned short OSAUDIO_SB_BASE_PORT = 0x220; static unsigned short OSAUDIO_SB_IRQ = 7; static unsigned short OSAUDIO_SB_DMA_CHANNEL_8 = 1; static unsigned short OSAUDIO_SB_DMA_CHANNEL_16 = 5; static signed char osaudio_g_is_sb16_present = -1; static unsigned char osaudio_g_sb16_version_major = 0; static unsigned char osaudio_g_sb16_version_minor = 0; static osaudio_t osaudio_g_audio = NULL; /* For ISA DMA interrupt because there's no user data option. Only one device can be initialized at a time. */ static osaudio_format_t osaudio_g_supportedFormats[] = { OSAUDIO_FORMAT_S16, OSAUDIO_FORMAT_U8 }; static unsigned char osaudio_g_supportedChannels[] = { 2, 1 }; static unsigned int osaudio_g_supportedSampleRates[] = { 44100, 22050, 11025, 24000, 12000, 8000 }; struct _osaudio_t { void far* pDMABuffer; void (_interrupt _far* old_isr)(void); osaudio_info_t info; osaudio_config_t config; /* info.configs will point to this. */ unsigned int cursor; /* The position of the write or read cursor relative to the start of the current sub-buffer. In frames. */ unsigned char subBufferIndex; /* When 0, the next write and read will happen in the first half of the DMA buffer, when 1, the second half. Will flip-flop between 0 and 1 each interrupt. */ unsigned char isActive; unsigned char isPaused; }; static void osaudio_outportb(unsigned short port, unsigned char value) { _outp(port, value); } static unsigned char osaudio_inportb(unsigned short port) { return _inp(port); } static void osaudio_delay(unsigned int milliseconds) { delay(milliseconds); } static unsigned long osaudio_get_ticks() { union REGS regs; regs.h.ah = 0x00; /* Get system time */ int86(0x1A, ®s, ®s); return ((unsigned long)regs.x.cx << 16) | regs.x.dx; } void far_memset(void far* dst, int c, unsigned int count) { unsigned char far *p = dst; unsigned int i; for (i = 0; i < count; i += 1) { p[i] = c; } } static void far* osaudio_dos_calloc(unsigned int sz) { /* This uses the DOS interrupt 0x21, function 0x48 allocation. */ void far* p; union REGS regs; regs.h.ah = 0x48; regs.x.bx = (sz + 15) / 16; int86(0x21, ®s, ®s); if (regs.x.cflag) { return NULL; } p = MK_FP(regs.x.ax, 0); /* Clear to zero for safety. */ far_memset(p, 0, sz); return p; } static void osaudio_dos_free(void far* p) { /* This uses the DOS interrupt 0x21, function 0x49 free. */ union REGS regs; struct SREGS sregs; regs.h.ah = 0x49; regs.x.bx = FP_OFF(p); sregs.es = FP_SEG(p); intdosx(®s, ®s, &sregs); } static void osaudio_blaster_parse_env() { /* This parses the BLASTER environment variable. */ char* pBlaster; char* p; int unused; pBlaster = getenv("BLASTER"); if (pBlaster == NULL) { return; } /* We have a BLASTER environment variable. */ p = pBlaster; /* I'm not sure if we can assume that each of these are present and in the same order. Therefore we will do this generically and parse each segment, separated by whitespace. */ for (;;) { /* Skip whitespace. */ while (*p == ' ' || *p == '\t') { p += 1; } if (*p == '\0') { break; } /* Parse the segment. */ if (p[0] == 'A') { /* Base port. */ p += 1; OSAUDIO_SB_BASE_PORT = (unsigned short)strtoul(p, &p, 16); /*printf("A%u\n", (unsigned int)OSAUDIO_SB_BASE_PORT);*/ } else if (p[0] == 'I') { /* IRQ. */ p += 1; OSAUDIO_SB_IRQ = (unsigned short)strtoul(p, &p, 10); /*printf("I%u\n", (unsigned int)OSAUDIO_SB_IRQ);*/ } else if (p[0] == 'D') { /* 8-bit DMA channel. */ p += 1; OSAUDIO_SB_DMA_CHANNEL_8 = (unsigned short)strtoul(p, &p, 10); /*printf("D%u\n", (unsigned int)OSAUDIO_SB_DMA_CHANNEL_8);*/ } else if (p[0] == 'H') { /* 16-bit DMA channel. */ p += 1; OSAUDIO_SB_DMA_CHANNEL_16 = (unsigned short)strtoul(p, &p, 10); /*printf("H%u\n", (unsigned int)OSAUDIO_SB_DMA_CHANNEL_16);*/ } else if (p[0] == 'M' || p[0] == 'P' || p[0] == 'T') { /* These are ignored. */ p += 1; unused = (int)strtoul(p, &p, 16); } else { /* Unknown segment. Skip. */ p += 1; unused = (int)strtoul(p, &p, 16); } } } static osaudio_result_t osaudio_init_sb16() { /* This checks for the presence of a Sound Blaster 16 card. */ if (osaudio_g_is_sb16_present == -1) { unsigned long timeoutStart; /* Creative wants us to read settings from the BLASTER environment variable. We don't hard fail here - we'll just fall back to defaults. It'll fail later if we don't have Sound Blaster available. */ osaudio_blaster_parse_env(); /* Getting here means we need to check for SB16. */ osaudio_outportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_RESET_PORT, OSAUDIO_SB_DSP_RESET_CMD); osaudio_delay(1); /* Sound Blaster documentation says to wait 3 microseconds. We'll do 1 milliseconds. */ osaudio_outportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_RESET_PORT, 0x00); /* Wait for DSP to be ready. */ timeoutStart = osaudio_get_ticks(); while ((osaudio_inportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_READY_READ_PORT) & 0x80) == 0) { if (osaudio_get_ticks() - timeoutStart > OSAUDIO_TIMEOUT_TICKS) { osaudio_g_is_sb16_present = 0; return OSAUDIO_ERROR; } } /* Check result of reset. */ if (osaudio_inportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_READ_PORT) == 0xAA) { /* Wait for write port to be ready. */ timeoutStart = osaudio_get_ticks(); while (osaudio_inportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_WRITE_PORT) & 0x80) { if (osaudio_get_ticks() - timeoutStart > OSAUDIO_TIMEOUT_TICKS) { osaudio_g_is_sb16_present = 0; return OSAUDIO_ERROR; } } /* Send DSP command to get version. */ osaudio_outportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_WRITE_PORT, OSAUDIO_SB_DSP_GET_VERSION); osaudio_g_sb16_version_major = osaudio_inportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_READ_PORT); osaudio_g_sb16_version_minor = osaudio_inportb(OSAUDIO_SB_BASE_PORT | OSAUDIO_SB_DSP_READ_PORT); if (osaudio_g_sb16_version_major == 4) { osaudio_g_is_sb16_present = 1; } else { osaudio_g_is_sb16_present = 0; } /* Now configure the IRQ. */ if (osaudio_g_is_sb16_present) { unsigned char irqCode; switch (OSAUDIO_SB_IRQ) { case 2: irqCode = 0x01; break; case 5: irqCode = 0x02; break; case 7: irqCode = 0x04; break; case 10: irqCode = 0x08; break; default: irqCode = 0x04; break; /* Will never hit this. */ } /* printf("Mixer port: %u\n", OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_PORT); printf("Mixer data port: %u\n", OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_DATA_PORT); printf("IRQ code: %u\n", (unsigned int)irqCode); */ osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_PORT, 0x80); osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_DATA_PORT, irqCode); } } else { osaudio_g_is_sb16_present = 0; } } if (osaudio_g_is_sb16_present) { return OSAUDIO_SUCCESS; } else { return OSAUDIO_ERROR; /* Don't appear to have SB16. */ } } osaudio_result_t osaudio_enumerate(unsigned int* count, osaudio_info_t** info) { /* We need only report a default playback device and a default capture device. We're going to support both OSAUDIO_FORMAT_U8 and OSAUDIO_FORMAT_S16. Supported channel counts are mono and stereo. */ osaudio_result_t result; unsigned int nativeFormatCount; unsigned int iSupportedFormat; unsigned int iSupportedChannels; unsigned int iSupportedSampleRate; osaudio_config_t* pRunningConfig; if (count == NULL || info == NULL) { return OSAUDIO_INVALID_ARGS; } result = osaudio_init_sb16(); if (result != OSAUDIO_SUCCESS) { return result; } nativeFormatCount = OSAUDIO_COUNTOF(osaudio_g_supportedFormats) * OSAUDIO_COUNTOF(osaudio_g_supportedChannels) * OSAUDIO_COUNTOF(osaudio_g_supportedSampleRates); *info = (osaudio_info_t*)calloc(1, sizeof(osaudio_info_t) * 2 + (sizeof(osaudio_config_t) * 2 * nativeFormatCount)); if (*info == NULL) { return OSAUDIO_OUT_OF_MEMORY; } *count = 2; /* Now we need to fill out the details. */ pRunningConfig = (osaudio_config_t*)(*info + 2); /* Playback. */ strcpy((*info)[0].name, OSAUDIO_SB_DEVICE_NAME); (*info)[0].direction = OSAUDIO_OUTPUT; (*info)[0].config_count = nativeFormatCount; (*info)[0].configs = pRunningConfig; for (iSupportedFormat = 0; iSupportedFormat < OSAUDIO_COUNTOF(osaudio_g_supportedFormats); iSupportedFormat += 1) { for (iSupportedChannels = 0; iSupportedChannels < OSAUDIO_COUNTOF(osaudio_g_supportedChannels); iSupportedChannels += 1) { for (iSupportedSampleRate = 0; iSupportedSampleRate < OSAUDIO_COUNTOF(osaudio_g_supportedSampleRates); iSupportedSampleRate += 1) { osaudio_config_init(pRunningConfig, OSAUDIO_OUTPUT); pRunningConfig->format = osaudio_g_supportedFormats[iSupportedFormat]; pRunningConfig->channels = osaudio_g_supportedChannels[iSupportedChannels]; pRunningConfig->rate = osaudio_g_supportedSampleRates[iSupportedSampleRate]; if (pRunningConfig->channels == 1) { pRunningConfig->channel_map[0] = OSAUDIO_CHANNEL_MONO; } else { pRunningConfig->channel_map[0] = OSAUDIO_CHANNEL_FL; pRunningConfig->channel_map[1] = OSAUDIO_CHANNEL_FR; } pRunningConfig += 1; } } } /* Capture. */ strcpy((*info)[1].name, OSAUDIO_SB_DEVICE_NAME); (*info)[1].direction = OSAUDIO_INPUT; (*info)[1].config_count = nativeFormatCount; (*info)[1].configs = pRunningConfig; for (iSupportedFormat = 0; iSupportedFormat < OSAUDIO_COUNTOF(osaudio_g_supportedFormats); iSupportedFormat += 1) { for (iSupportedChannels = 0; iSupportedChannels < OSAUDIO_COUNTOF(osaudio_g_supportedChannels); iSupportedChannels += 1) { for (iSupportedSampleRate = 0; iSupportedSampleRate < OSAUDIO_COUNTOF(osaudio_g_supportedSampleRates); iSupportedSampleRate += 1) { osaudio_config_init(pRunningConfig, OSAUDIO_OUTPUT); pRunningConfig->format = osaudio_g_supportedFormats[iSupportedFormat]; pRunningConfig->channels = osaudio_g_supportedChannels[iSupportedChannels]; pRunningConfig->rate = osaudio_g_supportedSampleRates[iSupportedSampleRate]; if (pRunningConfig->channels == 1) { pRunningConfig->channel_map[0] = OSAUDIO_CHANNEL_MONO; } else { pRunningConfig->channel_map[0] = OSAUDIO_CHANNEL_FL; pRunningConfig->channel_map[1] = OSAUDIO_CHANNEL_FR; } pRunningConfig += 1; } } } return OSAUDIO_SUCCESS; } void osaudio_config_init(osaudio_config_t* config, osaudio_direction_t direction) { if (config == NULL) { return; } memset(config, 0, sizeof(*config)); config->direction = direction; } static unsigned int osaudio_find_closest_rate(unsigned int rate, const unsigned int* pAvailableRates, unsigned int availableRateCount) { unsigned int iRate; unsigned int bestRate; unsigned int bestRateDelta; unsigned int rateDelta; bestRate = 0; bestRateDelta = 0xFFFFFFFF; for (iRate = 0; iRate < availableRateCount; iRate += 1) { rateDelta = (pAvailableRates[iRate] > rate) ? (pAvailableRates[iRate] - rate) : (rate - pAvailableRates[iRate]); if (rateDelta < bestRateDelta) { bestRate = pAvailableRates[iRate]; bestRateDelta = rateDelta; } } return bestRate; } #define PIC1_COMMAND 0x20 #define PIC1_DATA 0x21 #define PIC2_COMMAND 0xA0 #define PIC2_DATA 0xA1 #define PIC_EOI 0x20 static void send_eoi(int irq) { if (irq >= 8) { /* If it's IRQ8 or higher, we have to send an EOI to both the master and slave controllers */ osaudio_outportb(PIC2_COMMAND, PIC_EOI); } /* Always send an EOI to the master controller */ osaudio_outportb(PIC1_COMMAND, PIC_EOI); } static void interrupt osaudio_isa_dma_interrupt_handler() { unsigned char status; unsigned int cursor; /* Unfortunately there's no user-data associated with the interrupt handler, so we have to use a global. */ osaudio_t audio = osaudio_g_audio; if (audio == NULL) { return; } /* In 16-bit mode, we need to check if the interrupt is for us. Only applies to SB16. */ #if 0 if (osaudio_g_sb16_version_major == 4) { if (audio->config.format == OSAUDIO_FORMAT_S16) { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_PORT, 0x82); status = osaudio_inportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_DATA_PORT); if ((status & 0x02) == 0) { return; /* Not for us. */ } } } #endif /* g_TESTING += 1; printf("TESTING: %d\n", g_TESTING); */ cursor = audio->cursor; if (cursor < audio->config.buffer_size) { /* This is an xrun. */ unsigned int bytesPerFrame; bytesPerFrame = audio->config.channels * ((audio->config.format == OSAUDIO_FORMAT_S16) ? 2 : 1); /* Fill the rest of the buffer with silence. */ //far_memset((char OSAUDIO_FAR*)audio->pDMABuffer + (audio->subBufferIndex * audio->config.buffer_size * bytesPerFrame) + (cursor * bytesPerFrame), 0, (audio->config.buffer_size - cursor) * bytesPerFrame); //far_memset((char OSAUDIO_FAR*)audio->pDMABuffer + (audio->subBufferIndex * audio->config.buffer_size * bytesPerFrame), 0, audio->config.buffer_size * bytesPerFrame); /* Now fill the entire next buffer with silence as well. */ //far_memset((char OSAUDIO_FAR*)audio->pDMABuffer + ((1 - audio->subBufferIndex) * audio->config.buffer_size * bytesPerFrame), 0, audio->config.buffer_size * bytesPerFrame); far_memset((char OSAUDIO_FAR*)audio->pDMABuffer, 0, audio->config.buffer_size * bytesPerFrame * 2); printf("XRUN: cursor = %u, subBufferIndex = %u; test = %u\n", cursor, audio->subBufferIndex, (audio->config.buffer_size * bytesPerFrame * 2)); return; } /* Flip the sub-buffer index. */ printf("Interrupt: sub-buffer index: %u\n", audio->subBufferIndex); audio->subBufferIndex = 1 - audio->subBufferIndex; /* Make sure the cursor is reset in prepration for the next half of the buffer. */ audio->cursor = 0; /* Mark the sub-buffer as consumed. */ //audio->subBufferConsumed[audio->subBufferIndexInterrupt] = 1; //audio->subBufferIndexInterrupt = 1 - audio->subBufferIndexInterrupt; /* Interrupt acknowledgment. */ if (audio->config.format == OSAUDIO_FORMAT_U8) { status = osaudio_inportb(OSAUDIO_SB_BASE_PORT + 0x00E); } else { status = osaudio_inportb(OSAUDIO_SB_BASE_PORT + 0x00F); } //printf("status: 0x%02X\n", status); (void)status; send_eoi(OSAUDIO_SB_IRQ); } #include void fill_random_unsigned_chars(unsigned char far* buffer, unsigned int size) { unsigned int i; /* Seed the random number generator */ srand((unsigned)time(NULL)); for (i = 0; i < size; i++) { /* Generate a random unsigned char integer */ buffer[i] = (unsigned char)(rand() - RAND_MAX / 2) >> 4; //printf("buffer[%d] = %d\n", i, buffer[i]); } } osaudio_result_t osaudio_open(osaudio_t* audio, osaudio_config_t* config) { osaudio_result_t result; unsigned short dmaMaskRegister; unsigned short flipflopRegister; unsigned char dmaChannel; unsigned int maxDMABufferSizeInFrames; unsigned int actualDMABufferSizeInFrames; unsigned int actualDMABufferSizeInBytes; void far* pDMABuffer; unsigned char picMask; if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } *audio = NULL; if (config == NULL) { return OSAUDIO_INVALID_ARGS; } /* We can only have a single device open at a time. */ if (osaudio_g_audio != NULL) { return OSAUDIO_ERROR; } /* First check that we have SB16. */ result = osaudio_init_sb16(); if (result != OSAUDIO_SUCCESS) { return result; } /* Capture mode is not supported on anything older than Sound Blaster 16. */ if (config->direction == OSAUDIO_INPUT && osaudio_g_sb16_version_major < 4) { return OSAUDIO_ERROR; /* Capture mode not supported. */ } /* We're going to choose our native format configuration first. This way we can determine the Sound Blaster ports, channels and the size of the DMA buffer. */ if (config->format == OSAUDIO_FORMAT_UNKNOWN || (config->format != OSAUDIO_FORMAT_S16 && config->format != OSAUDIO_FORMAT_U8)) { config->format = osaudio_g_supportedFormats[0]; } if (config->channels == 0 || config->channels > 2) { config->channels = osaudio_g_supportedChannels[0]; } if (config->rate == 0) { config->rate = osaudio_g_supportedSampleRates[0]; } if (config->rate > 44100) { config->rate = 44100; } if (config->rate < 8000) { config->rate = 8000; } /*config->rate = osaudio_find_closest_rate(config->rate, osaudio_g_supportedSampleRates, OSAUDIO_COUNTOF(osaudio_g_supportedSampleRates));*/ /* Calculate a desired buffer size if none was specified. I'm not quite sure what would be an appropriate default in milliseconds, but lets go with 20ms for now. The buffer size is in frames, not bytes. */ if (config->buffer_size == 0) { config->buffer_size = (80 * (unsigned long)config->rate) / 1000; } /* Getting here means Sound Blaster 16 is available. We now need to allocate memory. There are two things needing allocating - the DMA buffer, and the osaudio_t object. The allocation of the osaudio_t object will use malloc(). The allocation of the DMA buffer will use the DOS interupt 0x21, function 0x48 for allocation. This ensures that it will be allocated within the first 1MB which we need for Sound Blaster. In addition, by making sure we don't allocate more than 65520 bytes we can ensure we don't cross a 64KB boundary which is another requirement. */ maxDMABufferSizeInFrames = 65520 / config->channels / ((config->format == OSAUDIO_FORMAT_S16) ? 2 : 1); /* 65520 = max size in bytes. */ /* The actual size of the buffer is equal to what we asked for in the configuration. The config will contain valid values at this point. */ actualDMABufferSizeInFrames = config->buffer_size; if (actualDMABufferSizeInFrames > maxDMABufferSizeInFrames) { actualDMABufferSizeInFrames = maxDMABufferSizeInFrames; } actualDMABufferSizeInBytes = actualDMABufferSizeInFrames * config->channels * ((config->format == OSAUDIO_FORMAT_S16) ? 2 : 1); /* Now that we have the size of the DMA buffer we can allocate it. 2x because we're using double buffering. */ pDMABuffer = osaudio_dos_calloc(actualDMABufferSizeInBytes * 2); if (pDMABuffer == NULL) { return OSAUDIO_OUT_OF_MEMORY; } /*printf("actualDMABufferSizeInFrames = %d; maxDMABufferSizeInFrames = %d;\n", actualDMABufferSizeInFrames, maxDMABufferSizeInFrames);*/ /* if (config->format == OSAUDIO_FORMAT_S16) { fill_random_unsigned_chars(pDMABuffer, actualDMABufferSizeInFrames * config->channels * 2 * 2); } else { fill_random_unsigned_chars(pDMABuffer, actualDMABufferSizeInFrames * config->channels * 2); } */ //printf("actualDMABufferSizeInBytes = %u\n", actualDMABufferSizeInBytes); /* Allocate the osaudio_t object using malloc(). This is convenient because it means we can use a near pointer for this object since that is how it's declared in osaudio.h. */ *audio = (osaudio_t)calloc(1, sizeof(**audio)); if (*audio == NULL) { osaudio_dos_free(pDMABuffer); return OSAUDIO_OUT_OF_MEMORY; } (*audio)->subBufferIndex = 0; /* For playback we want to start our sub-buffer at 1. */ if (config->direction == OSAUDIO_OUTPUT) { (*audio)->subBufferIndex = 1; } else { (*audio)->subBufferIndex = 0; } /* Turn on speaker. Can this be done last? */ osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD1); /* Volume control. */ /*osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_PORT, 0x22);*/ /* 0x22 = Master Volume. */ /*osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_MIXER_DATA_PORT, 0xCC);*/ /* 0xLR */ /* Set up our interrupt. This is where we'll be notified when the buffer can be updated. */ (*audio)->old_isr = _dos_getvect(OSAUDIO_SB_IRQ + 8); _dos_setvect(OSAUDIO_SB_IRQ + 8, osaudio_isa_dma_interrupt_handler); /* Need to unmask the interrupt or else nothing will be heard. Should probably do the opposite of this when we're done with the device. */ picMask = osaudio_inportb(0x21); picMask = picMask & ~(1 << OSAUDIO_SB_IRQ); osaudio_outportb(0x21, picMask); /* At this point we've allocated our memory. We can now configure the DMA. */ /* First we need to determine the mask register and the DMA channel. */ if (config->format == OSAUDIO_FORMAT_S16) { dmaMaskRegister = OSAUDIO_ISA_DMA_MASK_REGISTER_16BIT; flipflopRegister = OSAUDIO_ISA_DMA_FLIPFLOP_REGISTER_16BIT; dmaChannel = OSAUDIO_SB_DMA_CHANNEL_16; } else { dmaMaskRegister = OSAUDIO_ISA_DMA_MASK_REGISTER_8BIT; flipflopRegister = OSAUDIO_ISA_DMA_FLIPFLOP_REGISTER_8BIT; dmaChannel = OSAUDIO_SB_DMA_CHANNEL_8; } /*printf("DMA Channel: %d\n", dmaChannel);*/ /* Now we can mask the channel. */ osaudio_outportb(dmaMaskRegister, (dmaChannel & 0x03) | 0x04); { osaudio_outportb(flipflopRegister, 0xFF); /* Mode. */ { unsigned char modeRegister = (config->format == OSAUDIO_FORMAT_S16) ? OSAUDIO_ISA_DMA_MODE_REGISTER_16BIT : OSAUDIO_ISA_DMA_MODE_REGISTER_8BIT; unsigned char mode = OSAUDIO_ISA_DMA_MODE_DEMAND | OSAUDIO_ISA_DMA_MODE_AUTOINIT; if (config->direction == OSAUDIO_OUTPUT) { mode |= OSAUDIO_ISA_DMA_MODE_READ; /* From the perspective of the device. It's reading from the DMA buffer. */ } else { mode |= OSAUDIO_ISA_DMA_MODE_WRITE; /* From the perspective of the device. It's writing to the DMA buffer. */ } mode |= (dmaChannel & 0x03); /* The DMA channel. */ /* print the mode as a hex value for testing. */ /*printf("Mode: 0x%02x\n", mode);*/ osaudio_outportb(modeRegister, mode); } /* Address. */ { unsigned char addressRegister; unsigned char pageRegister; unsigned long address; if (config->format == OSAUDIO_FORMAT_S16) { addressRegister = OSAUDIO_ISA_DMA_ADDRESS_REGISTER_16BIT + ((dmaChannel & 0x03) * 4); } else { addressRegister = OSAUDIO_ISA_DMA_ADDRESS_REGISTER_8BIT + ((dmaChannel & 0x03) * 2); } /* The page register is annoying. It's different depending on the DMA channel. */ switch (dmaChannel) { case 1: pageRegister = 0x83; break; case 2: pageRegister = 0x81; break; case 3: pageRegister = 0x82; break; case 5: pageRegister = 0x8B; break; case 6: pageRegister = 0x89; break; case 7: pageRegister = 0x8A; break; default: pageRegister = 0; break; /* Will never get here. */ } address = ((unsigned long)FP_SEG(pDMABuffer) << 4) + FP_OFF(pDMABuffer); /* Need to do a random shift by 1 bit when specifying the address in 16-bit mode. This one screwed me over hardcore. Thanks to OSDev for the tip: https://web.archive.org/web/20230731120125/https://wiki.osdev.org/ISA_DMA#16_bit_issues */ if (config->format == OSAUDIO_FORMAT_S16) { address >>= 1; } /* print the address as a hex value for testing. */ /* printf("Address: 0x%04x\n", address); printf("Address Register: 0x%02x\n", addressRegister); printf("Page Register: 0x%02x\n", pageRegister); */ /* Page. */ osaudio_outportb(pageRegister, (address >> 16) & 0xFF); /* Address. */ osaudio_outportb(addressRegister, (address >> 0) & 0xFF); osaudio_outportb(addressRegister, (address >> 8) & 0xFF); } /* Size */ { unsigned char countRegister; unsigned int count; if (config->format == OSAUDIO_FORMAT_S16) { countRegister = OSAUDIO_ISA_DMA_COUNT_REGISTER_16BIT + ((dmaChannel & 0x03) * 4); } else { countRegister = OSAUDIO_ISA_DMA_COUNT_REGISTER_8BIT + ((dmaChannel & 0x03) * 2); } /* We're using a double-buffering technique which means we want to double the size of the buffer. */ count = actualDMABufferSizeInBytes * 2; /* 2x because of double buffering. */ if (config->format == OSAUDIO_FORMAT_S16) { count >>= 1; /* 1/2 because of 16-bit mode. */ } count -= 1; /* printf("Size: 0x%04x\n", count); printf("Count Register: 0x%02x\n", countRegister); */ /* Size. */ osaudio_outportb(countRegister, (count >> 0) & 0xFF); osaudio_outportb(countRegister, (count >> 8) & 0xFF); } } osaudio_outportb(dmaMaskRegister, (dmaChannel & 0x03)); /* At this point the DMA buffer should be configured. We can now configure the DSP. */ /* Sample Rate */ { unsigned char command; unsigned short sampleRate; /* Or time constant. */ /* For Sound Blaster 16 we'll use the exact sample rate. Otherwise we'll use the time constant. */ if (osaudio_g_sb16_version_major == 4) { if (config->direction == OSAUDIO_OUTPUT) { command = 0x41; } else { command = 0x42; } sampleRate = config->rate; } else { command = 0x40; sampleRate = 65536 - ((unsigned long)256000000 / (config->channels * config->rate)); } /*printf("Command: 0x%02x\n", command);*/ /*printf("Sample Rate: %u\n", sampleRate);*/ osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, command); if (osaudio_g_sb16_version_major == 4) { /* Note that it's high byte first, unlike the block size below which is low byte first. This one bit me. */ osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, (sampleRate >> 8) & 0xFF); osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, (sampleRate >> 0) & 0xFF); } else { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, (sampleRate >> 8) & 0xFF); } } /* Data Format and Block Size. */ { unsigned char command; unsigned char mode; unsigned int blockSize; /* In bytes. */ if (config->format == OSAUDIO_FORMAT_S16) { if (config->direction == OSAUDIO_OUTPUT) { command = 0xB6; } else { command = 0xBE; } if (config->channels == 1) { mode = 0x10; } else { mode = 0x30; } } else { if (config->direction == OSAUDIO_OUTPUT) { command = 0xC6; } else { command = 0xCE; } if (config->channels == 1) { mode = 0x00; } else { mode = 0x20; } } blockSize = actualDMABufferSizeInBytes; if (config->format == OSAUDIO_FORMAT_S16) { blockSize >>= 1; /* 1/2 because of 16-bit mode. */ } blockSize -= 1; /* Needs to be one less than the actual size. */ /* printf("Command: 0x%02x\n", command); printf("Mode: 0x%02x\n", mode); printf("Block Size: %u\n", blockSize); */ osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, command); osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, mode); osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, (blockSize >> 0) & 0xFF); osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, (blockSize >> 8) & 0xFF); } /* Start in a paused state. */ if (config->format == OSAUDIO_FORMAT_S16) { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD5); } else { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD0); } (*audio)->pDMABuffer = pDMABuffer; strcpy((*audio)->info.name, OSAUDIO_SB_DEVICE_NAME); (*audio)->info.direction = config->direction; (*audio)->info.config_count = 1; (*audio)->info.configs = &(*audio)->config; (*audio)->config = *config; (*audio)->config.buffer_size = actualDMABufferSizeInFrames; /* Don't forget to set the global audio object. We need this for the ISR. */ osaudio_g_audio = *audio; return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_close(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* TODO: Implement me. Look at the SB docs for how to properly shut down. */ /* Restore the old ISR. */ _dos_setvect(OSAUDIO_SB_IRQ + 8, audio->old_isr); /* Free the DMA buffer. */ osaudio_dos_free(audio->pDMABuffer); /* Now we can free the osaudio_t object. */ free(audio); return OSAUDIO_SUCCESS; } static void osaudio_activate(osaudio_t audio) { if (audio->config.format == OSAUDIO_FORMAT_S16) { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD6); } else { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD4); } audio->isActive = 1; } osaudio_result_t osaudio_write(osaudio_t audio, const void OSAUDIO_FAR* data, unsigned int frame_count) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } //printf("ENTERED: frame_count = %u\n", frame_count); while (frame_count > 0) { unsigned int framesAvailable; if (audio->config.buffer_size > audio->cursor) { framesAvailable = audio->config.buffer_size - audio->cursor; } else { framesAvailable = 0; } if (framesAvailable > 0) { void far* dst; unsigned int bytesPerFrame; unsigned int framesToWrite = framesAvailable; if (framesToWrite > frame_count) { framesToWrite = frame_count; } //printf("framesAvailable = %u - %u = %u\n", audio->config.buffer_size, audio->cursor, framesAvailable); /*printf("framesToWrite = %u; framesAvailable = %u\n", framesToWrite, framesAvailable);*/ /* Now we can copy the data. We're doing a cheeky little optimization here. If the input data pointer is equal to the DMA destination, we can skip the copy. This might happen when the caller is writing directly to the DMA buffer, which they may be doing by using a self-managed DMA buffer, in combination with osaudio_get_avail(). */ bytesPerFrame = audio->config.channels * (audio->config.format == OSAUDIO_FORMAT_S16 ? 2 : 1); dst = (void far*)((char far*)audio->pDMABuffer + (audio->subBufferIndex * audio->config.buffer_size * bytesPerFrame) + (audio->cursor * bytesPerFrame)); if (dst == data) { /* Don't do anything. */ } else { /* Move the memory. */ unsigned int i; for (i = 0; i < framesToWrite * audio->config.channels; i += 1) { if (audio->config.format == OSAUDIO_FORMAT_S16) { ((short far*)dst)[i] = ((short far*)data)[i]; } else { ((char far*)dst)[i] = ((char far*)data)[i]; } } } /* Update the cursor. */ audio->cursor += framesToWrite; frame_count -= framesToWrite; data = (char far*)data + (framesToWrite * bytesPerFrame); /* Activate the device. */ if (!audio->isActive) { osaudio_activate(audio); } } else { /* No room. */ if (!audio->isActive) { break; } else { /* Just keep looping. Don't sleep here - in my testing there just isn't enough resolution in the sleep timer. */ } } } return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_read(osaudio_t audio, void OSAUDIO_FAR* data, unsigned int frame_count) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* TODO: Implement me. */ return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_drain(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* It's an invalid operation to drain while the device is paused or else we'll never return from this function. */ if (audio->isPaused) { return OSAUDIO_INVALID_OPERATION; } /* DOS is single threaded so we don't need to worry about waiting for any pending reads or writes. */ /* TODO: Implement me. */ return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_flush(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* TODO: Implement me. */ return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_pause(osaudio_t audio) { if (audio == NULL || audio != osaudio_g_audio) { return OSAUDIO_INVALID_ARGS; } if (audio->isPaused) { return OSAUDIO_SUCCESS; } /* No need to deactivate the device if it's already inactive. */ if (audio->isActive) { if (audio->config.format == OSAUDIO_FORMAT_S16) { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD5); } else { osaudio_outportb(OSAUDIO_SB_BASE_PORT + OSAUDIO_SB_DSP_WRITE_PORT, 0xD0); } } audio->isPaused = 1; return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_resume(osaudio_t audio) { if (audio == NULL || audio != osaudio_g_audio) { return OSAUDIO_INVALID_ARGS; } if (!audio->isPaused) { return OSAUDIO_SUCCESS; } /* Do not activate the device if it's inactive. */ if (audio->isActive) { osaudio_activate(audio); } audio->isPaused = 0; return OSAUDIO_SUCCESS; } unsigned int osaudio_get_avail(osaudio_t audio) { /* TODO: Implement me. */ return 0; } const osaudio_info_t* osaudio_get_info(osaudio_t audio) { if (audio == NULL) { return NULL; } return &audio->info; } #endif /* osaudio_dos_soundblaster_c */ #endif /* __MSDOS__ || __DOS__ */ miniaudio-0.11.22/extras/osaudio/osaudio_miniaudio.c000066400000000000000000001023001475701111600224500ustar00rootroot00000000000000/* Consider this a reference implementation of osaudio. It uses miniaudio under the hood. You can add this file directly to your source tree, but you may need to update the miniaudio path. This will use a mutex in osaudio_read() and osaudio_write(). It's a low-contention lock that's only used for the purpose of osaudio_drain(), but it's still a lock nonetheless. I'm not worrying about this too much right now because this is just an example implementation, but I might improve on this at a later date. */ #ifndef osaudio_miniaudio_c #define osaudio_miniaudio_c #include "osaudio.h" /* If you would rather define your own implementation of miniaudio, define OSAUDIO_NO_MINIAUDIO_IMPLEMENTATION. If you do this, you need to make sure you include the implmeentation before osaudio.c. This would only really be useful if you are wanting to do a unity build which uses other parts of miniaudio that this file is currently excluding. */ #ifndef OSAUDIO_NO_MINIAUDIO_IMPLEMENTATION #define MA_API static #define MA_NO_DECODING #define MA_NO_ENCODING #define MA_NO_RESOURCE_MANAGER #define MA_NO_NODE_GRAPH #define MA_NO_ENGINE #define MA_NO_GENERATION #define MINIAUDIO_IMPLEMENTATION #include "../../miniaudio.h" #endif struct _osaudio_t { ma_device device; osaudio_info_t info; osaudio_config_t config; /* info.configs will point to this. */ ma_pcm_rb buffer; ma_semaphore bufferSemaphore; /* The semaphore for controlling access to the buffer. The audio thread will release the semaphore. The read and write functions will wait on it. */ ma_atomic_bool32 isActive; /* Starts off as false. Set to true when config.buffer_size data has been written in the case of playback, or as soon as osaudio_read() is called in the case of capture. */ ma_atomic_bool32 isPaused; ma_atomic_bool32 isFlushed; /* When set, activation of the device will flush any data that's currently in the buffer. Defaults to false, and will be set to true in osaudio_drain() and osaudio_flush(). */ ma_atomic_bool32 xrunDetected; /* Used for detecting when an xrun has occurred and returning from osaudio_read/write() when OSAUDIO_FLAG_REPORT_XRUN is enabled. */ ma_spinlock activateLock; /* Used for starting and stopping the device. Needed because two variables control this - isActive and isPaused. */ ma_mutex drainLock; /* Used for osaudio_drain(). For mutal exclusion between drain() and read()/write(). Technically results in a lock in read()/write(), but not overthinking that since this is just a reference for now. */ }; static ma_bool32 osaudio_g_is_backend_known = MA_FALSE; static ma_backend osaudio_g_backend = ma_backend_wasapi; static ma_context osaudio_g_context; static ma_mutex osaudio_g_context_lock; /* Only used for device enumeration. Created and destroyed with our context. */ static ma_uint32 osaudio_g_refcount = 0; static ma_spinlock osaudio_g_lock = 0; static osaudio_result_t osaudio_result_from_miniaudio(ma_result result) { switch (result) { case MA_SUCCESS: return OSAUDIO_SUCCESS; case MA_INVALID_ARGS: return OSAUDIO_INVALID_ARGS; case MA_INVALID_OPERATION: return OSAUDIO_INVALID_OPERATION; case MA_OUT_OF_MEMORY: return OSAUDIO_OUT_OF_MEMORY; default: return OSAUDIO_ERROR; } } static ma_format osaudio_format_to_miniaudio(osaudio_format_t format) { switch (format) { case OSAUDIO_FORMAT_F32: return ma_format_f32; case OSAUDIO_FORMAT_U8: return ma_format_u8; case OSAUDIO_FORMAT_S16: return ma_format_s16; case OSAUDIO_FORMAT_S24: return ma_format_s24; case OSAUDIO_FORMAT_S32: return ma_format_s32; default: return ma_format_unknown; } } static osaudio_format_t osaudio_format_from_miniaudio(ma_format format) { switch (format) { case ma_format_f32: return OSAUDIO_FORMAT_F32; case ma_format_u8: return OSAUDIO_FORMAT_U8; case ma_format_s16: return OSAUDIO_FORMAT_S16; case ma_format_s24: return OSAUDIO_FORMAT_S24; case ma_format_s32: return OSAUDIO_FORMAT_S32; default: return OSAUDIO_FORMAT_UNKNOWN; } } static osaudio_channel_t osaudio_channel_from_miniaudio(ma_channel channel) { /* Channel positions between here and miniaudio will remain in sync. */ return (osaudio_channel_t)channel; } static ma_channel osaudio_channel_to_miniaudio(osaudio_channel_t channel) { /* Channel positions between here and miniaudio will remain in sync. */ return (ma_channel)channel; } static void osaudio_dummy_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { (void)pDevice; (void)pOutput; (void)pInput; (void)frameCount; } static osaudio_result_t osaudio_determine_miniaudio_backend(ma_backend* pBackend, ma_device* pDummyDevice) { ma_device dummyDevice; ma_device_config dummyDeviceConfig; ma_result result; /* To do this we initialize a dummy device. We allow the caller to make use of this device as an optimization. This is only used by osaudio_enumerate_devices() because that can make use of the context from the dummy device rather than having to create its own. pDummyDevice can be null. */ if (pDummyDevice == NULL) { pDummyDevice = &dummyDevice; } dummyDeviceConfig = ma_device_config_init(ma_device_type_playback); dummyDeviceConfig.dataCallback = osaudio_dummy_data_callback; result = ma_device_init(NULL, &dummyDeviceConfig, pDummyDevice); if (result != MA_SUCCESS || pDummyDevice->pContext->backend == ma_backend_null) { /* Failed to open a default playback device. Try capture. */ if (result == MA_SUCCESS) { /* This means we successfully initialize a device, but its backend is null. It could be that there's no playback devices attached. Try capture. */ ma_device_uninit(pDummyDevice); } dummyDeviceConfig = ma_device_config_init(ma_device_type_capture); result = ma_device_init(NULL, &dummyDeviceConfig, pDummyDevice); } if (result != MA_SUCCESS) { return osaudio_result_from_miniaudio(result); } *pBackend = pDummyDevice->pContext->backend; /* We're done. */ if (pDummyDevice == &dummyDevice) { ma_device_uninit(&dummyDevice); } return OSAUDIO_SUCCESS; } static osaudio_result_t osaudio_ref_context_nolock() { /* Initialize the global context if necessary. */ if (osaudio_g_refcount == 0) { osaudio_result_t result; /* If we haven't got a known context, we'll need to determine it here. */ if (osaudio_g_is_backend_known == MA_FALSE) { result = osaudio_determine_miniaudio_backend(&osaudio_g_backend, NULL); if (result != OSAUDIO_SUCCESS) { return result; } } result = osaudio_result_from_miniaudio(ma_context_init(&osaudio_g_backend, 1, NULL, &osaudio_g_context)); if (result != OSAUDIO_SUCCESS) { return result; } /* Need a mutex for device enumeration. */ ma_mutex_init(&osaudio_g_context_lock); } osaudio_g_refcount += 1; return OSAUDIO_SUCCESS; } static osaudio_result_t osaudio_unref_context_nolock() { if (osaudio_g_refcount == 0) { return OSAUDIO_INVALID_OPERATION; } osaudio_g_refcount -= 1; /* Uninitialize the context if we don't have any more references. */ if (osaudio_g_refcount == 0) { ma_context_uninit(&osaudio_g_context); ma_mutex_uninit(&osaudio_g_context_lock); } return OSAUDIO_SUCCESS; } static ma_context* osaudio_ref_context() { osaudio_result_t result; ma_spinlock_lock(&osaudio_g_lock); { result = osaudio_ref_context_nolock(); } ma_spinlock_unlock(&osaudio_g_lock); if (result != OSAUDIO_SUCCESS) { return NULL; } return &osaudio_g_context; } static osaudio_result_t osaudio_unref_context() { osaudio_result_t result; ma_spinlock_lock(&osaudio_g_lock); { result = osaudio_unref_context_nolock(); } ma_spinlock_unlock(&osaudio_g_lock); return result; } static void osaudio_info_from_miniaudio(osaudio_info_t* info, const ma_device_info* infoMA) { unsigned int iNativeConfig; /* It just so happens, by absolutely total coincidence, that the size of the ID and name are the same between here and miniaudio. What are the odds?! */ memcpy(info->id.data, &infoMA->id, sizeof(info->id.data)); memcpy(info->name, infoMA->name, sizeof(info->name)); info->config_count = (unsigned int)infoMA->nativeDataFormatCount; for (iNativeConfig = 0; iNativeConfig < info->config_count; iNativeConfig += 1) { unsigned int iChannel; info->configs[iNativeConfig].device_id = &info->id; info->configs[iNativeConfig].direction = info->direction; info->configs[iNativeConfig].format = osaudio_format_from_miniaudio(infoMA->nativeDataFormats[iNativeConfig].format); info->configs[iNativeConfig].channels = (unsigned int)infoMA->nativeDataFormats[iNativeConfig].channels; info->configs[iNativeConfig].rate = (unsigned int)infoMA->nativeDataFormats[iNativeConfig].sampleRate; /* Apparently miniaudio does not report channel positions. I don't know why I'm not doing that. */ for (iChannel = 0; iChannel < info->configs[iNativeConfig].channels; iChannel += 1) { info->configs[iNativeConfig].channel_map[iChannel] = OSAUDIO_CHANNEL_NONE; } } } static osaudio_result_t osaudio_enumerate_nolock(unsigned int* count, osaudio_info_t** info, ma_context* pContext) { osaudio_result_t result; ma_device_info* pPlaybackInfos; ma_uint32 playbackCount; ma_device_info* pCaptureInfos; ma_uint32 captureCount; ma_uint32 iInfo; size_t allocSize; osaudio_info_t* pRunningInfo; osaudio_config_t* pRunningConfig; /* We now need to retrieve the device information from miniaudio. */ result = osaudio_result_from_miniaudio(ma_context_get_devices(pContext, &pPlaybackInfos, &playbackCount, &pCaptureInfos, &captureCount)); if (result != OSAUDIO_SUCCESS) { osaudio_unref_context(); return result; } /* Because the caller needs to free the returned pointer it's important that we keep it all in one allocation. Because there can be a variable number of native configs we'll have to compute the size of the allocation first, and then do a second pass to fill out the data. */ allocSize = ((size_t)playbackCount + (size_t)captureCount) * sizeof(osaudio_info_t); /* Now we need to iterate over each playback and capture device and add up the number of native configs. */ for (iInfo = 0; iInfo < playbackCount; iInfo += 1) { ma_context_get_device_info(pContext, ma_device_type_playback, &pPlaybackInfos[iInfo].id, &pPlaybackInfos[iInfo]); allocSize += pPlaybackInfos[iInfo].nativeDataFormatCount * sizeof(osaudio_config_t); } for (iInfo = 0; iInfo < captureCount; iInfo += 1) { ma_context_get_device_info(pContext, ma_device_type_capture, &pCaptureInfos[iInfo].id, &pCaptureInfos[iInfo]); allocSize += pCaptureInfos[iInfo].nativeDataFormatCount * sizeof(osaudio_config_t); } /* Now that we know the size of the allocation we can allocate it. */ *info = (osaudio_info_t*)calloc(1, allocSize); if (*info == NULL) { osaudio_unref_context(); return OSAUDIO_OUT_OF_MEMORY; } pRunningInfo = *info; pRunningConfig = (osaudio_config_t*)(((unsigned char*)*info) + (((size_t)playbackCount + (size_t)captureCount) * sizeof(osaudio_info_t))); for (iInfo = 0; iInfo < playbackCount; iInfo += 1) { pRunningInfo->direction = OSAUDIO_OUTPUT; pRunningInfo->configs = pRunningConfig; osaudio_info_from_miniaudio(pRunningInfo, &pPlaybackInfos[iInfo]); pRunningConfig += pRunningInfo->config_count; pRunningInfo += 1; } for (iInfo = 0; iInfo < captureCount; iInfo += 1) { pRunningInfo->direction = OSAUDIO_INPUT; pRunningInfo->configs = pRunningConfig; osaudio_info_from_miniaudio(pRunningInfo, &pPlaybackInfos[iInfo]); pRunningConfig += pRunningInfo->config_count; pRunningInfo += 1; } *count = (unsigned int)(playbackCount + captureCount); return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_enumerate(unsigned int* count, osaudio_info_t** info) { osaudio_result_t result; ma_context* pContext = NULL; if (count != NULL) { *count = 0; } if (info != NULL) { *info = NULL; } if (count == NULL || info == NULL) { return OSAUDIO_INVALID_ARGS; } pContext = osaudio_ref_context(); if (pContext == NULL) { return OSAUDIO_ERROR; } ma_mutex_lock(&osaudio_g_context_lock); { result = osaudio_enumerate_nolock(count, info, pContext); } ma_mutex_unlock(&osaudio_g_context_lock); /* We're done. We can now return. */ osaudio_unref_context(); return result; } void osaudio_config_init(osaudio_config_t* config, osaudio_direction_t direction) { if (config == NULL) { return; } memset(config, 0, sizeof(*config)); config->direction = direction; } static void osaudio_data_callback_playback(osaudio_t audio, void* pOutput, ma_uint32 frameCount) { /* If there's content in the buffer, read from it and release the semaphore. There needs to be a whole frameCount chunk in the buffer so we can keep everything in nice clean chunks. When we read from the buffer, we release a semaphore which will allow the main thread to write more data to the buffer. */ ma_uint32 framesToRead; ma_uint32 framesProcessed; void* pBuffer; framesToRead = ma_pcm_rb_available_read(&audio->buffer); if (framesToRead > frameCount) { framesToRead = frameCount; } framesProcessed = framesToRead; /* For robustness we should run this in a loop in case the buffer wraps around. */ while (frameCount > 0) { framesToRead = frameCount; ma_pcm_rb_acquire_read(&audio->buffer, &framesToRead, &pBuffer); if (framesToRead == 0) { break; } memcpy(pOutput, pBuffer, framesToRead * ma_get_bytes_per_frame(audio->device.playback.format, audio->device.playback.channels)); ma_pcm_rb_commit_read(&audio->buffer, framesToRead); frameCount -= framesToRead; pOutput = ((unsigned char*)pOutput) + (framesToRead * ma_get_bytes_per_frame(audio->device.playback.format, audio->device.playback.channels)); } /* Make sure we release the semaphore if we ended up reading anything. */ if (framesProcessed > 0) { ma_semaphore_release(&audio->bufferSemaphore); } if (frameCount > 0) { /* Underrun. Pad with silence. */ ma_silence_pcm_frames(pOutput, frameCount, audio->device.playback.format, audio->device.playback.channels); ma_atomic_bool32_set(&audio->xrunDetected, MA_TRUE); } } static void osaudio_data_callback_capture(osaudio_t audio, const void* pInput, ma_uint32 frameCount) { /* If there's space in the buffer, write to it and release the semaphore. The semaphore is only released on full-chunk boundaries. */ ma_uint32 framesToWrite; ma_uint32 framesProcessed; void* pBuffer; framesToWrite = ma_pcm_rb_available_write(&audio->buffer); if (framesToWrite > frameCount) { framesToWrite = frameCount; } framesProcessed = framesToWrite; while (frameCount > 0) { framesToWrite = frameCount; ma_pcm_rb_acquire_write(&audio->buffer, &framesToWrite, &pBuffer); if (framesToWrite == 0) { break; } memcpy(pBuffer, pInput, framesToWrite * ma_get_bytes_per_frame(audio->device.capture.format, audio->device.capture.channels)); ma_pcm_rb_commit_write(&audio->buffer, framesToWrite); frameCount -= framesToWrite; pInput = ((unsigned char*)pInput) + (framesToWrite * ma_get_bytes_per_frame(audio->device.capture.format, audio->device.capture.channels)); } /* Make sure we release the semaphore if we ended up reading anything. */ if (framesProcessed > 0) { ma_semaphore_release(&audio->bufferSemaphore); } if (frameCount > 0) { /* Overrun. Not enough room to move our input data into the buffer. */ ma_atomic_bool32_set(&audio->xrunDetected, MA_TRUE); } } static void osaudio_nofication_callback(const ma_device_notification* pNotification) { osaudio_t audio = (osaudio_t)pNotification->pDevice->pUserData; if (audio->config.notification != NULL) { osaudio_notification_t notification; switch (pNotification->type) { case ma_device_notification_type_started: { notification.type = OSAUDIO_NOTIFICATION_STARTED; } break; case ma_device_notification_type_stopped: { notification.type = OSAUDIO_NOTIFICATION_STOPPED; } break; case ma_device_notification_type_rerouted: { notification.type = OSAUDIO_NOTIFICATION_REROUTED; } break; case ma_device_notification_type_interruption_began: { notification.type = OSAUDIO_NOTIFICATION_INTERRUPTION_BEGIN; } break; case ma_device_notification_type_interruption_ended: { notification.type = OSAUDIO_NOTIFICATION_INTERRUPTION_END; } break; } audio->config.notification(audio->config.user_data, ¬ification); } } static void osaudio_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { osaudio_t audio = (osaudio_t)pDevice->pUserData; if (audio->info.direction == OSAUDIO_OUTPUT) { osaudio_data_callback_playback(audio, pOutput, frameCount); } else { osaudio_data_callback_capture(audio, pInput, frameCount); } } osaudio_result_t osaudio_open(osaudio_t* audio, osaudio_config_t* config) { osaudio_result_t result; ma_context* pContext = NULL; ma_device_config deviceConfig; ma_device_info deviceInfo; int periodCount = 2; unsigned int iChannel; if (audio != NULL) { *audio = NULL; /* Safety. */ } if (audio == NULL || config == NULL) { return OSAUDIO_INVALID_ARGS; } pContext = osaudio_ref_context(); /* Will be unreferenced in osaudio_close(). */ if (pContext == NULL) { return OSAUDIO_ERROR; } *audio = (osaudio_t)calloc(1, sizeof(**audio)); if (*audio == NULL) { osaudio_unref_context(); return OSAUDIO_OUT_OF_MEMORY; } if (config->direction == OSAUDIO_OUTPUT) { deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = osaudio_format_to_miniaudio(config->format); deviceConfig.playback.channels = (ma_uint32)config->channels; if (config->channel_map[0] != OSAUDIO_CHANNEL_NONE) { for (iChannel = 0; iChannel < config->channels; iChannel += 1) { deviceConfig.playback.pChannelMap[iChannel] = osaudio_channel_to_miniaudio(config->channel_map[iChannel]); } } } else { deviceConfig = ma_device_config_init(ma_device_type_capture); deviceConfig.capture.format = osaudio_format_to_miniaudio(config->format); deviceConfig.capture.channels = (ma_uint32)config->channels; if (config->channel_map[0] != OSAUDIO_CHANNEL_NONE) { for (iChannel = 0; iChannel < config->channels; iChannel += 1) { deviceConfig.capture.pChannelMap[iChannel] = osaudio_channel_to_miniaudio(config->channel_map[iChannel]); } } } deviceConfig.sampleRate = (ma_uint32)config->rate; /* If the buffer size is 0, we'll default to 10ms. */ deviceConfig.periodSizeInFrames = (ma_uint32)config->buffer_size; if (deviceConfig.periodSizeInFrames == 0) { deviceConfig.periodSizeInMilliseconds = 10; } deviceConfig.dataCallback = osaudio_data_callback; deviceConfig.pUserData = *audio; if ((config->flags & OSAUDIO_FLAG_NO_REROUTING) != 0) { deviceConfig.wasapi.noAutoStreamRouting = MA_TRUE; } if (config->notification != NULL) { deviceConfig.notificationCallback = osaudio_nofication_callback; } result = osaudio_result_from_miniaudio(ma_device_init(pContext, &deviceConfig, &((*audio)->device))); if (result != OSAUDIO_SUCCESS) { free(*audio); osaudio_unref_context(); return result; } /* The input config needs to be updated with actual values. */ if (config->direction == OSAUDIO_OUTPUT) { config->format = osaudio_format_from_miniaudio((*audio)->device.playback.format); config->channels = (unsigned int)(*audio)->device.playback.channels; for (iChannel = 0; iChannel < config->channels; iChannel += 1) { config->channel_map[iChannel] = osaudio_channel_from_miniaudio((*audio)->device.playback.channelMap[iChannel]); } } else { config->format = osaudio_format_from_miniaudio((*audio)->device.capture.format); config->channels = (unsigned int)(*audio)->device.capture.channels; for (iChannel = 0; iChannel < config->channels; iChannel += 1) { config->channel_map[iChannel] = osaudio_channel_from_miniaudio((*audio)->device.capture.channelMap[iChannel]); } } config->rate = (unsigned int)(*audio)->device.sampleRate; if (deviceConfig.periodSizeInFrames == 0) { if (config->direction == OSAUDIO_OUTPUT) { config->buffer_size = (int)(*audio)->device.playback.internalPeriodSizeInFrames; } else { config->buffer_size = (int)(*audio)->device.capture.internalPeriodSizeInFrames; } } /* The device object needs to have its local info built. We can get the ID and name from miniaudio. */ result = osaudio_result_from_miniaudio(ma_device_get_info(&(*audio)->device, (*audio)->device.type, &deviceInfo)); if (result == MA_SUCCESS) { memcpy((*audio)->info.id.data, &deviceInfo.id, sizeof((*audio)->info.id.data)); memcpy((*audio)->info.name, deviceInfo.name, sizeof((*audio)->info.name)); } (*audio)->info.direction = config->direction; (*audio)->info.config_count = 1; (*audio)->info.configs = &(*audio)->config; (*audio)->config = *config; (*audio)->config.device_id = &(*audio)->info.id; /* We need a ring buffer. */ result = osaudio_result_from_miniaudio(ma_pcm_rb_init(osaudio_format_to_miniaudio(config->format), (ma_uint32)config->channels, (ma_uint32)config->buffer_size * periodCount, NULL, NULL, &(*audio)->buffer)); if (result != OSAUDIO_SUCCESS) { ma_device_uninit(&(*audio)->device); free(*audio); osaudio_unref_context(); return result; } /* Now we need a semaphore to control access to the ring buffer to block read/write when necessary. */ result = osaudio_result_from_miniaudio(ma_semaphore_init((config->direction == OSAUDIO_OUTPUT) ? periodCount : 0, &(*audio)->bufferSemaphore)); if (result != OSAUDIO_SUCCESS) { ma_pcm_rb_uninit(&(*audio)->buffer); ma_device_uninit(&(*audio)->device); free(*audio); osaudio_unref_context(); return result; } return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_close(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } ma_device_uninit(&audio->device); osaudio_unref_context(); return OSAUDIO_SUCCESS; } static void osaudio_activate(osaudio_t audio) { ma_spinlock_lock(&audio->activateLock); { if (ma_atomic_bool32_get(&audio->isActive) == MA_FALSE) { ma_atomic_bool32_set(&audio->isActive, MA_TRUE); /* If we need to flush, do so now before starting the device. */ if (ma_atomic_bool32_get(&audio->isFlushed) == MA_TRUE) { ma_pcm_rb_reset(&audio->buffer); ma_atomic_bool32_set(&audio->isFlushed, MA_FALSE); } /* If we're not paused, start the device. */ if (ma_atomic_bool32_get(&audio->isPaused) == MA_FALSE) { ma_device_start(&audio->device); } } } ma_spinlock_unlock(&audio->activateLock); } osaudio_result_t osaudio_write(osaudio_t audio, const void* data, unsigned int frame_count) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } ma_mutex_lock(&audio->drainLock); { /* Don't return until everything has been written. */ while (frame_count > 0) { ma_uint32 framesToWrite = frame_count; ma_uint32 framesAvailableInBuffer; /* There should be enough data available in the buffer now, but check anyway. */ framesAvailableInBuffer = ma_pcm_rb_available_write(&audio->buffer); if (framesAvailableInBuffer > 0) { void* pBuffer; if (framesToWrite > framesAvailableInBuffer) { framesToWrite = framesAvailableInBuffer; } ma_pcm_rb_acquire_write(&audio->buffer, &framesToWrite, &pBuffer); { ma_copy_pcm_frames(pBuffer, data, framesToWrite, audio->device.playback.format, audio->device.playback.channels); } ma_pcm_rb_commit_write(&audio->buffer, framesToWrite); frame_count -= (unsigned int)framesToWrite; data = (const void*)((const unsigned char*)data + (framesToWrite * ma_get_bytes_per_frame(audio->device.playback.format, audio->device.playback.channels))); if (framesToWrite > 0) { osaudio_activate(audio); } } else { /* If we get here it means there's not enough data available in the buffer. We need to wait for more. */ ma_semaphore_wait(&audio->bufferSemaphore); /* If we're not active it probably means we've flushed. This write needs to be aborted. */ if (ma_atomic_bool32_get(&audio->isActive) == MA_FALSE) { break; } } } } ma_mutex_unlock(&audio->drainLock); if ((audio->config.flags & OSAUDIO_FLAG_REPORT_XRUN) != 0) { if (ma_atomic_bool32_get(&audio->xrunDetected)) { ma_atomic_bool32_set(&audio->xrunDetected, MA_FALSE); return OSAUDIO_XRUN; } } return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_read(osaudio_t audio, void* data, unsigned int frame_count) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } ma_mutex_lock(&audio->drainLock); { while (frame_count > 0) { ma_uint32 framesToRead = frame_count; ma_uint32 framesAvailableInBuffer; /* There should be enough data available in the buffer now, but check anyway. */ framesAvailableInBuffer = ma_pcm_rb_available_read(&audio->buffer); if (framesAvailableInBuffer > 0) { void* pBuffer; if (framesToRead > framesAvailableInBuffer) { framesToRead = framesAvailableInBuffer; } ma_pcm_rb_acquire_read(&audio->buffer, &framesToRead, &pBuffer); { ma_copy_pcm_frames(data, pBuffer, framesToRead, audio->device.capture.format, audio->device.capture.channels); } ma_pcm_rb_commit_read(&audio->buffer, framesToRead); frame_count -= (unsigned int)framesToRead; data = (void*)((unsigned char*)data + (framesToRead * ma_get_bytes_per_frame(audio->device.capture.format, audio->device.capture.channels))); } else { /* Activate the device from the get go or else we'll never end up capturing anything. */ osaudio_activate(audio); /* If we get here it means there's not enough data available in the buffer. We need to wait for more. */ ma_semaphore_wait(&audio->bufferSemaphore); /* If we're not active it probably means we've flushed. This read needs to be aborted. */ if (ma_atomic_bool32_get(&audio->isActive) == MA_FALSE) { break; } } } } ma_mutex_unlock(&audio->drainLock); if ((audio->config.flags & OSAUDIO_FLAG_REPORT_XRUN) != 0) { if (ma_atomic_bool32_get(&audio->xrunDetected)) { ma_atomic_bool32_set(&audio->xrunDetected, MA_FALSE); return OSAUDIO_XRUN; } } return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_drain(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* This cannot be called while the device is in a paused state. */ if (ma_atomic_bool32_get(&audio->isPaused)) { return OSAUDIO_DEVICE_STOPPED; } /* For capture we want to stop the device immediately or else we won't ever drain the buffer because miniaudio will be constantly filling it. */ if (audio->info.direction == OSAUDIO_INPUT) { ma_device_stop(&audio->device); } /* Mark the device as inactive *before* releasing the semaphore. When read/write completes waiting on the semaphore, they'll check this flag and abort. */ ma_atomic_bool32_set(&audio->isActive, MA_FALSE); /* Again in capture mode, we need to release the semaphore before waiting for the drain lock because there's a chance read() will be waiting on the semaphore and will need to be woken up in order for it to be given to chance to return. */ if (audio->info.direction == OSAUDIO_INPUT) { ma_semaphore_release(&audio->bufferSemaphore); } /* Now we need to wait for any pending reads or writes to complete. */ ma_mutex_lock(&audio->drainLock); { /* No processing should be happening on the buffer at this point. Wait for miniaudio to consume the buffer. */ while (ma_pcm_rb_available_read(&audio->buffer) > 0) { ma_sleep(1); } /* At this point the buffer should be empty, and we shouldn't be in any read or write calls. If it's a playback device, we'll want to stop the device. There's no need to release the semaphore. */ if (audio->info.direction == OSAUDIO_OUTPUT) { ma_device_stop(&audio->device); } } ma_mutex_unlock(&audio->drainLock); return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_flush(osaudio_t audio) { if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } /* First stop the device. This ensures the miniaudio background thread doesn't try modifying the buffer from under us while we're trying to flush it. */ ma_device_stop(&audio->device); /* Mark the device as inactive *before* releasing the semaphore. When read/write completes waiting on the semaphore, they'll check this flag and abort. */ ma_atomic_bool32_set(&audio->isActive, MA_FALSE); /* Release the semaphore after marking the device as inactive. This needs to be released in order to wakeup osaudio_read() and osaudio_write(). */ ma_semaphore_release(&audio->bufferSemaphore); /* The buffer should only be modified by osaudio_read() or osaudio_write(), or the miniaudio background thread. Therefore, we don't actually clear the buffer here. Instead we'll clear it in osaudio_activate(), depending on whether or not the below flag is set. */ ma_atomic_bool32_set(&audio->isFlushed, MA_TRUE); return OSAUDIO_SUCCESS; } osaudio_result_t osaudio_pause(osaudio_t audio) { osaudio_result_t result = OSAUDIO_SUCCESS; if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } ma_spinlock_lock(&audio->activateLock); { if (ma_atomic_bool32_get(&audio->isPaused) == MA_FALSE) { ma_atomic_bool32_set(&audio->isPaused, MA_TRUE); /* No need to stop the device if it's not active. */ if (ma_atomic_bool32_get(&audio->isActive)) { result = osaudio_result_from_miniaudio(ma_device_stop(&audio->device)); } } } ma_spinlock_unlock(&audio->activateLock); return result; } osaudio_result_t osaudio_resume(osaudio_t audio) { osaudio_result_t result = OSAUDIO_SUCCESS; if (audio == NULL) { return OSAUDIO_INVALID_ARGS; } ma_spinlock_lock(&audio->activateLock); { if (ma_atomic_bool32_get(&audio->isPaused)) { ma_atomic_bool32_set(&audio->isPaused, MA_FALSE); /* Don't start the device unless it's active. */ if (ma_atomic_bool32_get(&audio->isActive)) { result = osaudio_result_from_miniaudio(ma_device_start(&audio->device)); } } } ma_spinlock_unlock(&audio->activateLock); return result; } unsigned int osaudio_get_avail(osaudio_t audio) { if (audio == NULL) { return 0; } if (audio->info.direction == OSAUDIO_OUTPUT) { return ma_pcm_rb_available_write(&audio->buffer); } else { return ma_pcm_rb_available_read(&audio->buffer); } } const osaudio_info_t* osaudio_get_info(osaudio_t audio) { if (audio == NULL) { return NULL; } return &audio->info; } #endif /* osaudio_miniaudio_c */ miniaudio-0.11.22/extras/osaudio/tests/000077500000000000000000000000001475701111600177515ustar00rootroot00000000000000miniaudio-0.11.22/extras/osaudio/tests/osaudio_deviceio.c000066400000000000000000000123231475701111600234300ustar00rootroot00000000000000#include "../osaudio.h" /* This example uses miniaudio for decoding audio files. */ #define MINIAUDIO_IMPLEMENTATION #include "../../../miniaudio.h" #include #include #include #define MODE_PLAYBACK 0 #define MODE_CAPTURE 1 #define MODE_DUPLEX 2 void enumerate_devices() { int result; unsigned int iDevice; unsigned int count; osaudio_info_t* pDeviceInfos; result = osaudio_enumerate(&count, &pDeviceInfos); if (result != OSAUDIO_SUCCESS) { printf("Failed to enumerate audio devices.\n"); return; } for (iDevice = 0; iDevice < count; iDevice += 1) { printf("(%s) %s\n", (pDeviceInfos[iDevice].direction == OSAUDIO_OUTPUT) ? "Playback" : "Capture", pDeviceInfos[iDevice].name); } free(pDeviceInfos); } osaudio_t open_device(int direction) { int result; osaudio_t audio; osaudio_config_t config; osaudio_config_init(&config, direction); config.format = OSAUDIO_FORMAT_F32; config.channels = 2; config.rate = 48000; config.flags = OSAUDIO_FLAG_REPORT_XRUN; result = osaudio_open(&audio, &config); if (result != OSAUDIO_SUCCESS) { printf("Failed to open audio device.\n"); return NULL; } return audio; } void do_playback(int argc, char** argv) { int result; osaudio_t audio; const osaudio_config_t* config; const char* pFilePath = NULL; ma_result resultMA; ma_decoder_config decoderConfig; ma_decoder decoder; audio = open_device(OSAUDIO_OUTPUT); if (audio == NULL) { printf("Failed to open audio device.\n"); return; } config = &osaudio_get_info(audio)->configs[0]; /* We want to always use f32. */ if (config->format == OSAUDIO_FORMAT_F32) { if (argc > 1) { pFilePath = argv[1]; decoderConfig = ma_decoder_config_init(ma_format_f32, (ma_uint32)config->channels, (ma_uint32)config->rate); resultMA = ma_decoder_init_file(pFilePath, &decoderConfig, &decoder); if (resultMA == MA_SUCCESS) { /* Now just keep looping over each sample until we get to the end. */ for (;;) { float frames[1024]; ma_uint64 frameCount; resultMA = ma_decoder_read_pcm_frames(&decoder, frames, ma_countof(frames) / config->channels, &frameCount); if (resultMA != MA_SUCCESS) { break; } result = osaudio_write(audio, frames, (unsigned int)frameCount); /* Safe cast. */ if (result != OSAUDIO_SUCCESS && result != OSAUDIO_XRUN) { printf("Error writing to audio device."); break; } if (result == OSAUDIO_XRUN) { printf("WARNING: An xrun occurred while writing to the playback device.\n"); } } } else { printf("Failed to open file: %s\n", pFilePath); } } else { printf("No input file.\n"); } } else { printf("Unsupported device format.\n"); } /* Getting here means we're done and we can tear down. */ osaudio_close(audio); } void do_duplex() { int result; osaudio_t capture; osaudio_t playback; capture = open_device(OSAUDIO_INPUT); if (capture == NULL) { printf("Failed to open capture device.\n"); return; } playback = open_device(OSAUDIO_OUTPUT); if (playback == NULL) { osaudio_close(capture); printf("Failed to open playback device.\n"); return; } for (;;) { float frames[1024]; unsigned int frameCount; frameCount = ma_countof(frames) / osaudio_get_info(capture)->configs[0].channels; /* Capture. */ result = osaudio_read(capture, frames, frameCount); if (result != OSAUDIO_SUCCESS && result != OSAUDIO_XRUN) { printf("Error reading from capture device.\n"); break; } if (result == OSAUDIO_XRUN) { printf("WARNING: An xrun occurred while reading from the capture device.\n"); } /* Playback. */ result = osaudio_write(playback, frames, frameCount); if (result != OSAUDIO_SUCCESS && result != OSAUDIO_XRUN) { printf("Error writing to playback device.\n"); break; } if (result == OSAUDIO_XRUN) { printf("WARNING: An xrun occurred while writing to the playback device.\n"); } } osaudio_close(capture); osaudio_close(playback); } int main(int argc, char** argv) { int mode = MODE_PLAYBACK; int iarg; enumerate_devices(); for (iarg = 0; iarg < argc; iarg += 1) { if (strcmp(argv[iarg], "capture") == 0) { mode = MODE_CAPTURE; } else if (strcmp(argv[iarg], "duplex") == 0) { mode = MODE_DUPLEX; } } switch (mode) { case MODE_PLAYBACK: do_playback(argc, argv); break; case MODE_CAPTURE: break; case MODE_DUPLEX: do_duplex(); break; } (void)argc; (void)argv; return 0; }miniaudio-0.11.22/extras/osaudio/tests/osaudio_sine.c000066400000000000000000000173621475701111600226070ustar00rootroot00000000000000#include "../osaudio.h" #include "../../decoders/litewav/litewav.c" #include #include /* free() */ #if defined(__MSDOS__) || defined(__DOS__) #include #define OSAUDIO_DOS #endif const char* format_to_string(osaudio_format_t format) { switch (format) { case OSAUDIO_FORMAT_F32: return "F32"; case OSAUDIO_FORMAT_U8: return "U8"; case OSAUDIO_FORMAT_S16: return "S16"; case OSAUDIO_FORMAT_S24: return "S24"; case OSAUDIO_FORMAT_S32: return "S32"; default: return "Unknown Format"; } } void enumerate_devices() { osaudio_result_t result; osaudio_info_t* pDeviceInfos; unsigned int deviceCount; unsigned int iDevice; result = osaudio_enumerate(&deviceCount, &pDeviceInfos); if (result != OSAUDIO_SUCCESS) { printf("Failed to enumerate devices."); return; } for (iDevice = 0; iDevice < deviceCount; iDevice += 1) { osaudio_info_t* pDeviceInfo = &pDeviceInfos[iDevice]; printf("Device %u: [%s] %s\n", iDevice, (pDeviceInfo->direction == OSAUDIO_OUTPUT) ? "Playback" : "Capture", pDeviceInfo->name); #if 0 { unsigned int iFormat; printf(" Native Formats\n"); for (iFormat = 0; iFormat < pDeviceInfo->config_count; iFormat += 1) { osaudio_config_t* pConfig = &pDeviceInfo->configs[iFormat]; printf(" %s %uHz %u channels\n", format_to_string(pConfig->format), pConfig->rate, pConfig->channels); } } #endif } free(pDeviceInfos); } extern int g_TESTING; #include /* Sine wave generation. */ #include #if defined(OSAUDIO_DOS) /* For farmalloc(). */ static void OSAUDIO_FAR* far_malloc(unsigned int sz) { unsigned int segment; unsigned int err; err = _dos_allocmem(sz >> 4, &segment); if (err == 0) { return MK_FP(segment, 0); } else { return NULL; } } #else #define far_malloc malloc #endif static char OSAUDIO_FAR* gen_sine_u8(unsigned long frameCount, unsigned int channels, unsigned int sampleRate) { float phase = 0; float phaseIncrement = 2 * 3.14159265f * 220.0f / 44100.0f; unsigned long iFrame; char OSAUDIO_FAR* pData; char OSAUDIO_FAR* pRunningData; pData = (char OSAUDIO_FAR*)far_malloc(frameCount * channels); if (pData == NULL) { return NULL; } pRunningData = pData; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { unsigned int iChannel; float sample = (float)sin(phase) * 0.2f; sample = (sample + 1.0f) * 127.5f; for (iChannel = 0; iChannel < channels; iChannel += 1) { pRunningData[iChannel] = (unsigned char)sample; } pRunningData += channels; phase += phaseIncrement; } return pData; } static short OSAUDIO_FAR* gen_sine_s16(unsigned long frameCount, unsigned int channels, unsigned int sampleRate) { float phase = 0; float phaseIncrement = 2 * 3.14159265f * 220.0f / 44100.0f; unsigned long iFrame; short OSAUDIO_FAR* pData; short OSAUDIO_FAR* pRunningData; pData = (short OSAUDIO_FAR*)far_malloc(frameCount * channels * sizeof(short)); if (pData == NULL) { return NULL; } pRunningData = pData; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { unsigned int iChannel; float sample = (float)sin(phase) * 0.2f; sample = sample * 32767.5f; for (iChannel = 0; iChannel < channels; iChannel += 1) { pRunningData[iChannel] = (short)sample; } pRunningData += channels; phase += phaseIncrement; } return pData; } // // //float sinePhase = 0; //float sinePhaseIncrement = 0; //float sineVolume = 0.2f; // //static void sine_init() //{ // sinePhase = 0; // sinePhaseIncrement = 2 * 3.14159265f * 440.0f / 44100.0f; //} // //static void sine_u8(unsigned char* dst, unsigned int frameCount, unsigned int channels) //{ // unsigned int iFrame; // // for (iFrame = 0; iFrame < frameCount; iFrame += 1) { // unsigned int iChannel; // float sample = (float)sin(sinePhase) * sineVolume; // sample = (sample + 1.0f) * 127.5f; // // for (iChannel = 0; iChannel < channels; iChannel += 1) { // dst[iChannel] = (unsigned char)sample; // } // // dst += channels; // sinePhase += sinePhaseIncrement; // } //} // // //unsigned char data[4096]; int main(int argc, char** argv) { osaudio_result_t result; osaudio_t audio; osaudio_config_t config; void OSAUDIO_FAR* pSineWave; unsigned long sineWaveFrameCount; unsigned long sineWaveCursor = 0; enumerate_devices(); osaudio_config_init(&config, OSAUDIO_OUTPUT); config.format = OSAUDIO_FORMAT_S16; config.channels = 2; config.rate = 44100; result = osaudio_open(&audio, &config); if (result != OSAUDIO_SUCCESS) { printf("Failed to initialize audio.\n"); return -1; } printf("Device: %s (%s %uHz %u channels)\n", osaudio_get_info(audio)->name, format_to_string(config.format), config.rate, config.channels); //printf("sizeof(void*) = %u\n", (unsigned int)sizeof(void far *)); /* 5 seconds. */ sineWaveFrameCount = config.rate * 1; if (config.format == OSAUDIO_FORMAT_U8) { pSineWave = gen_sine_u8(sineWaveFrameCount, config.channels, config.rate); } else { pSineWave = gen_sine_s16(sineWaveFrameCount, config.channels, config.rate); } if (pSineWave == NULL) { printf("Failed to generate sine wave.\n"); return -1; } if (config.format == OSAUDIO_FORMAT_U8) { /*unsigned int framesToSilence = config.rate; while (framesToSilence > 0) { unsigned int framesToWrite; char silence[256]; memset(silence, 128, sizeof(silence)); framesToWrite = framesToSilence; if (framesToWrite > sizeof(silence) / config.channels) { framesToWrite = sizeof(silence) / config.channels; } osaudio_write(audio, silence, framesToWrite); framesToSilence -= framesToWrite; }*/ while (sineWaveCursor < sineWaveFrameCount) { unsigned long framesToWrite = sineWaveFrameCount - sineWaveCursor; if (framesToWrite > 0xFFFF) { framesToWrite = 0xFFFF; } //printf("Writing sine wave: %u\n", (unsigned int)framesToWrite); osaudio_write(audio, (char OSAUDIO_FAR*)pSineWave + (sineWaveCursor * config.channels), (unsigned int)framesToWrite); sineWaveCursor += framesToWrite; //printf("TRACE 0\n"); //sine_u8(data, frameCount, config.channels); //printf("TRACE: %d\n", frameCount); //osaudio_write(audio, data, frameCount); //printf("DONE LOOP\n"); } } else if (config.format == OSAUDIO_FORMAT_S16) { while (sineWaveCursor < sineWaveFrameCount) { unsigned long framesToWrite = sineWaveFrameCount - sineWaveCursor; if (framesToWrite > 0xFFFF) { framesToWrite = 0xFFFF; } osaudio_write(audio, (short OSAUDIO_FAR*)pSineWave + (sineWaveCursor * config.channels), (unsigned int)framesToWrite); sineWaveCursor += framesToWrite; } } #if defined(OSAUDIO_DOS) printf("Processing...\n"); for (;;) { /* Temporary. Just spinning here to ensure the program stays active. */ //delay(1); if (g_TESTING > 0) { //printf("TESTING: %d\n", g_TESTING); } } #endif printf("Shutting down... "); osaudio_close(audio); printf("Done.\n"); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/extras/stb_vorbis.c000066400000000000000000005704261475701111600175020ustar00rootroot00000000000000// Ogg Vorbis audio decoder - v1.22 - public domain // http://nothings.org/stb_vorbis/ // // Original version written by Sean Barrett in 2007. // // Originally sponsored by RAD Game Tools. Seeking implementation // sponsored by Phillip Bennefall, Marc Andersen, Aaron Baker, // Elias Software, Aras Pranckevicius, and Sean Barrett. // // LICENSE // // See end of file for license information. // // Limitations: // // - floor 0 not supported (used in old ogg vorbis files pre-2004) // - lossless sample-truncation at beginning ignored // - cannot concatenate multiple vorbis streams // - sample positions are 32-bit, limiting seekable 192Khz // files to around 6 hours (Ogg supports 64-bit) // // Feature contributors: // Dougall Johnson (sample-exact seeking) // // Bugfix/warning contributors: // Terje Mathisen Niklas Frykholm Andy Hill // Casey Muratori John Bolton Gargaj // Laurent Gomila Marc LeBlanc Ronny Chevalier // Bernhard Wodo Evan Balster github:alxprd // Tom Beaumont Ingo Leitgeb Nicolas Guillemot // Phillip Bennefall Rohit Thiago Goulart // github:manxorist Saga Musix github:infatum // Timur Gagiev Maxwell Koo Peter Waller // github:audinowho Dougall Johnson David Reid // github:Clownacy Pedro J. Estebanez Remi Verschelde // AnthoFoxo github:morlat Gabriel Ravier // // Partial history: // 1.22 - 2021-07-11 - various small fixes // 1.21 - 2021-07-02 - fix bug for files with no comments // 1.20 - 2020-07-11 - several small fixes // 1.19 - 2020-02-05 - warnings // 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc. // 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure) // 1.16 - 2019-03-04 - fix warnings // 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found // 1.14 - 2018-02-11 - delete bogus dealloca usage // 1.13 - 2018-01-29 - fix truncation of last frame (hopefully) // 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files // 1.11 - 2017-07-23 - fix MinGW compilation // 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory // 1.09 - 2016-04-04 - back out 'truncation of last frame' fix from previous version // 1.08 - 2016-04-02 - warnings; setup memory leaks; truncation of last frame // 1.07 - 2015-01-16 - fixes for crashes on invalid files; warning fixes; const // 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson) // some crash fixes when out of memory or with corrupt files // fix some inappropriately signed shifts // 1.05 - 2015-04-19 - don't define __forceinline if it's redundant // 1.04 - 2014-08-27 - fix missing const-correct case in API // 1.03 - 2014-08-07 - warning fixes // 1.02 - 2014-07-09 - declare qsort comparison as explicitly _cdecl in Windows // 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float (interleaved was correct) // 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in >2-channel; // (API change) report sample rate for decode-full-file funcs // // See end of file for full version history. ////////////////////////////////////////////////////////////////////////////// // // HEADER BEGINS HERE // #ifndef STB_VORBIS_INCLUDE_STB_VORBIS_H #define STB_VORBIS_INCLUDE_STB_VORBIS_H #if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) #define STB_VORBIS_NO_STDIO 1 #endif #ifndef STB_VORBIS_NO_STDIO #include #endif #ifdef __cplusplus extern "C" { #endif /////////// THREAD SAFETY // Individual stb_vorbis* handles are not thread-safe; you cannot decode from // them from multiple threads at the same time. However, you can have multiple // stb_vorbis* handles and decode from them independently in multiple thrads. /////////// MEMORY ALLOCATION // normally stb_vorbis uses malloc() to allocate memory at startup, // and alloca() to allocate temporary memory during a frame on the // stack. (Memory consumption will depend on the amount of setup // data in the file and how you set the compile flags for speed // vs. size. In my test files the maximal-size usage is ~150KB.) // // You can modify the wrapper functions in the source (setup_malloc, // setup_temp_malloc, temp_malloc) to change this behavior, or you // can use a simpler allocation model: you pass in a buffer from // which stb_vorbis will allocate _all_ its memory (including the // temp memory). "open" may fail with a VORBIS_outofmem if you // do not pass in enough data; there is no way to determine how // much you do need except to succeed (at which point you can // query get_info to find the exact amount required. yes I know // this is lame). // // If you pass in a non-NULL buffer of the type below, allocation // will occur from it as described above. Otherwise just pass NULL // to use malloc()/alloca() typedef struct { char *alloc_buffer; int alloc_buffer_length_in_bytes; } stb_vorbis_alloc; /////////// FUNCTIONS USEABLE WITH ALL INPUT MODES typedef struct stb_vorbis stb_vorbis; typedef struct { unsigned int sample_rate; int channels; unsigned int setup_memory_required; unsigned int setup_temp_memory_required; unsigned int temp_memory_required; int max_frame_size; } stb_vorbis_info; typedef struct { char *vendor; int comment_list_length; char **comment_list; } stb_vorbis_comment; // get general information about the file extern stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f); // get ogg comments extern stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f); // get the last error detected (clears it, too) extern int stb_vorbis_get_error(stb_vorbis *f); // close an ogg vorbis file and free all memory in use extern void stb_vorbis_close(stb_vorbis *f); // this function returns the offset (in samples) from the beginning of the // file that will be returned by the next decode, if it is known, or -1 // otherwise. after a flush_pushdata() call, this may take a while before // it becomes valid again. // NOT WORKING YET after a seek with PULLDATA API extern int stb_vorbis_get_sample_offset(stb_vorbis *f); // returns the current seek point within the file, or offset from the beginning // of the memory buffer. In pushdata mode it returns 0. extern unsigned int stb_vorbis_get_file_offset(stb_vorbis *f); /////////// PUSHDATA API #ifndef STB_VORBIS_NO_PUSHDATA_API // this API allows you to get blocks of data from any source and hand // them to stb_vorbis. you have to buffer them; stb_vorbis will tell // you how much it used, and you have to give it the rest next time; // and stb_vorbis may not have enough data to work with and you will // need to give it the same data again PLUS more. Note that the Vorbis // specification does not bound the size of an individual frame. extern stb_vorbis *stb_vorbis_open_pushdata( const unsigned char * datablock, int datablock_length_in_bytes, int *datablock_memory_consumed_in_bytes, int *error, const stb_vorbis_alloc *alloc_buffer); // create a vorbis decoder by passing in the initial data block containing // the ogg&vorbis headers (you don't need to do parse them, just provide // the first N bytes of the file--you're told if it's not enough, see below) // on success, returns an stb_vorbis *, does not set error, returns the amount of // data parsed/consumed on this call in *datablock_memory_consumed_in_bytes; // on failure, returns NULL on error and sets *error, does not change *datablock_memory_consumed // if returns NULL and *error is VORBIS_need_more_data, then the input block was // incomplete and you need to pass in a larger block from the start of the file extern int stb_vorbis_decode_frame_pushdata( stb_vorbis *f, const unsigned char *datablock, int datablock_length_in_bytes, int *channels, // place to write number of float * buffers float ***output, // place to write float ** array of float * buffers int *samples // place to write number of output samples ); // decode a frame of audio sample data if possible from the passed-in data block // // return value: number of bytes we used from datablock // // possible cases: // 0 bytes used, 0 samples output (need more data) // N bytes used, 0 samples output (resynching the stream, keep going) // N bytes used, M samples output (one frame of data) // note that after opening a file, you will ALWAYS get one N-bytes,0-sample // frame, because Vorbis always "discards" the first frame. // // Note that on resynch, stb_vorbis will rarely consume all of the buffer, // instead only datablock_length_in_bytes-3 or less. This is because it wants // to avoid missing parts of a page header if they cross a datablock boundary, // without writing state-machiney code to record a partial detection. // // The number of channels returned are stored in *channels (which can be // NULL--it is always the same as the number of channels reported by // get_info). *output will contain an array of float* buffers, one per // channel. In other words, (*output)[0][0] contains the first sample from // the first channel, and (*output)[1][0] contains the first sample from // the second channel. // // *output points into stb_vorbis's internal output buffer storage; these // buffers are owned by stb_vorbis and application code should not free // them or modify their contents. They are transient and will be overwritten // once you ask for more data to get decoded, so be sure to grab any data // you need before then. extern void stb_vorbis_flush_pushdata(stb_vorbis *f); // inform stb_vorbis that your next datablock will not be contiguous with // previous ones (e.g. you've seeked in the data); future attempts to decode // frames will cause stb_vorbis to resynchronize (as noted above), and // once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it // will begin decoding the _next_ frame. // // if you want to seek using pushdata, you need to seek in your file, then // call stb_vorbis_flush_pushdata(), then start calling decoding, then once // decoding is returning you data, call stb_vorbis_get_sample_offset, and // if you don't like the result, seek your file again and repeat. #endif ////////// PULLING INPUT API #ifndef STB_VORBIS_NO_PULLDATA_API // This API assumes stb_vorbis is allowed to pull data from a source-- // either a block of memory containing the _entire_ vorbis stream, or a // FILE * that you or it create, or possibly some other reading mechanism // if you go modify the source to replace the FILE * case with some kind // of callback to your code. (But if you don't support seeking, you may // just want to go ahead and use pushdata.) #if !defined(STB_VORBIS_NO_STDIO) && !defined(STB_VORBIS_NO_INTEGER_CONVERSION) extern int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output); #endif #if !defined(STB_VORBIS_NO_INTEGER_CONVERSION) extern int stb_vorbis_decode_memory(const unsigned char *mem, int len, int *channels, int *sample_rate, short **output); #endif // decode an entire file and output the data interleaved into a malloc()ed // buffer stored in *output. The return value is the number of samples // decoded, or -1 if the file could not be opened or was not an ogg vorbis file. // When you're done with it, just free() the pointer returned in *output. extern stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, int *error, const stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from an ogg vorbis stream in memory (note // this must be the entire stream!). on failure, returns NULL and sets *error #ifndef STB_VORBIS_NO_STDIO extern stb_vorbis * stb_vorbis_open_filename(const char *filename, int *error, const stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from a filename via fopen(). on failure, // returns NULL and sets *error (possibly to VORBIS_file_open_failure). extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close, int *error, const stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from an open FILE *, looking for a stream at // the _current_ seek point (ftell). on failure, returns NULL and sets *error. // note that stb_vorbis must "own" this stream; if you seek it in between // calls to stb_vorbis, it will become confused. Moreover, if you attempt to // perform stb_vorbis_seek_*() operations on this file, it will assume it // owns the _entire_ rest of the file after the start point. Use the next // function, stb_vorbis_open_file_section(), to limit it. extern stb_vorbis * stb_vorbis_open_file_section(FILE *f, int close_handle_on_close, int *error, const stb_vorbis_alloc *alloc_buffer, unsigned int len); // create an ogg vorbis decoder from an open FILE *, looking for a stream at // the _current_ seek point (ftell); the stream will be of length 'len' bytes. // on failure, returns NULL and sets *error. note that stb_vorbis must "own" // this stream; if you seek it in between calls to stb_vorbis, it will become // confused. #endif extern int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number); extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number); // these functions seek in the Vorbis file to (approximately) 'sample_number'. // after calling seek_frame(), the next call to get_frame_*() will include // the specified sample. after calling stb_vorbis_seek(), the next call to // stb_vorbis_get_samples_* will start with the specified sample. If you // do not need to seek to EXACTLY the target sample when using get_samples_*, // you can also use seek_frame(). extern int stb_vorbis_seek_start(stb_vorbis *f); // this function is equivalent to stb_vorbis_seek(f,0) extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f); extern float stb_vorbis_stream_length_in_seconds(stb_vorbis *f); // these functions return the total length of the vorbis stream extern int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output); // decode the next frame and return the number of samples. the number of // channels returned are stored in *channels (which can be NULL--it is always // the same as the number of channels reported by get_info). *output will // contain an array of float* buffers, one per channel. These outputs will // be overwritten on the next call to stb_vorbis_get_frame_*. // // You generally should not intermix calls to stb_vorbis_get_frame_*() // and stb_vorbis_get_samples_*(), since the latter calls the former. #ifndef STB_VORBIS_NO_INTEGER_CONVERSION extern int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts); extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples); #endif // decode the next frame and return the number of *samples* per channel. // Note that for interleaved data, you pass in the number of shorts (the // size of your array), but the return value is the number of samples per // channel, not the total number of samples. // // The data is coerced to the number of channels you request according to the // channel coercion rules (see below). You must pass in the size of your // buffer(s) so that stb_vorbis will not overwrite the end of the buffer. // The maximum buffer size needed can be gotten from get_info(); however, // the Vorbis I specification implies an absolute maximum of 4096 samples // per channel. // Channel coercion rules: // Let M be the number of channels requested, and N the number of channels present, // and Cn be the nth channel; let stereo L be the sum of all L and center channels, // and stereo R be the sum of all R and center channels (channel assignment from the // vorbis spec). // M N output // 1 k sum(Ck) for all k // 2 * stereo L, stereo R // k l k > l, the first l channels, then 0s // k l k <= l, the first k channels // Note that this is not _good_ surround etc. mixing at all! It's just so // you get something useful. extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats); extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples); // gets num_samples samples, not necessarily on a frame boundary--this requires // buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES. // Returns the number of samples stored per channel; it may be less than requested // at the end of the file. If there are no more samples in the file, returns 0. #ifndef STB_VORBIS_NO_INTEGER_CONVERSION extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts); extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples); #endif // gets num_samples samples, not necessarily on a frame boundary--this requires // buffering so you have to supply the buffers. Applies the coercion rules above // to produce 'channels' channels. Returns the number of samples stored per channel; // it may be less than requested at the end of the file. If there are no more // samples in the file, returns 0. #endif //////// ERROR CODES enum STBVorbisError { VORBIS__no_error, VORBIS_need_more_data=1, // not a real error VORBIS_invalid_api_mixing, // can't mix API modes VORBIS_outofmem, // not enough memory VORBIS_feature_not_supported, // uses floor 0 VORBIS_too_many_channels, // STB_VORBIS_MAX_CHANNELS is too small VORBIS_file_open_failure, // fopen() failed VORBIS_seek_without_length, // can't seek in unknown-length file VORBIS_unexpected_eof=10, // file is truncated? VORBIS_seek_invalid, // seek past EOF // decoding errors (corrupt/invalid stream) -- you probably // don't care about the exact details of these // vorbis errors: VORBIS_invalid_setup=20, VORBIS_invalid_stream, // ogg errors: VORBIS_missing_capture_pattern=30, VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number, VORBIS_invalid_first_page, VORBIS_bad_packet_type, VORBIS_cant_find_last_page, VORBIS_seek_failed, VORBIS_ogg_skeleton_not_supported }; #ifdef __cplusplus } #endif #endif // STB_VORBIS_INCLUDE_STB_VORBIS_H // // HEADER ENDS HERE // ////////////////////////////////////////////////////////////////////////////// #ifndef STB_VORBIS_HEADER_ONLY // global configuration settings (e.g. set these in the project/makefile), // or just set them in this file at the top (although ideally the first few // should be visible when the header file is compiled too, although it's not // crucial) // STB_VORBIS_NO_PUSHDATA_API // does not compile the code for the various stb_vorbis_*_pushdata() // functions // #define STB_VORBIS_NO_PUSHDATA_API // STB_VORBIS_NO_PULLDATA_API // does not compile the code for the non-pushdata APIs // #define STB_VORBIS_NO_PULLDATA_API // STB_VORBIS_NO_STDIO // does not compile the code for the APIs that use FILE *s internally // or externally (implied by STB_VORBIS_NO_PULLDATA_API) // #define STB_VORBIS_NO_STDIO // STB_VORBIS_NO_INTEGER_CONVERSION // does not compile the code for converting audio sample data from // float to integer (implied by STB_VORBIS_NO_PULLDATA_API) // #define STB_VORBIS_NO_INTEGER_CONVERSION // STB_VORBIS_NO_FAST_SCALED_FLOAT // does not use a fast float-to-int trick to accelerate float-to-int on // most platforms which requires endianness be defined correctly. //#define STB_VORBIS_NO_FAST_SCALED_FLOAT // STB_VORBIS_MAX_CHANNELS [number] // globally define this to the maximum number of channels you need. // The spec does not put a restriction on channels except that // the count is stored in a byte, so 255 is the hard limit. // Reducing this saves about 16 bytes per value, so using 16 saves // (255-16)*16 or around 4KB. Plus anything other memory usage // I forgot to account for. Can probably go as low as 8 (7.1 audio), // 6 (5.1 audio), or 2 (stereo only). #ifndef STB_VORBIS_MAX_CHANNELS #define STB_VORBIS_MAX_CHANNELS 16 // enough for anyone? #endif // STB_VORBIS_PUSHDATA_CRC_COUNT [number] // after a flush_pushdata(), stb_vorbis begins scanning for the // next valid page, without backtracking. when it finds something // that looks like a page, it streams through it and verifies its // CRC32. Should that validation fail, it keeps scanning. But it's // possible that _while_ streaming through to check the CRC32 of // one candidate page, it sees another candidate page. This #define // determines how many "overlapping" candidate pages it can search // at once. Note that "real" pages are typically ~4KB to ~8KB, whereas // garbage pages could be as big as 64KB, but probably average ~16KB. // So don't hose ourselves by scanning an apparent 64KB page and // missing a ton of real ones in the interim; so minimum of 2 #ifndef STB_VORBIS_PUSHDATA_CRC_COUNT #define STB_VORBIS_PUSHDATA_CRC_COUNT 4 #endif // STB_VORBIS_FAST_HUFFMAN_LENGTH [number] // sets the log size of the huffman-acceleration table. Maximum // supported value is 24. with larger numbers, more decodings are O(1), // but the table size is larger so worse cache missing, so you'll have // to probe (and try multiple ogg vorbis files) to find the sweet spot. #ifndef STB_VORBIS_FAST_HUFFMAN_LENGTH #define STB_VORBIS_FAST_HUFFMAN_LENGTH 10 #endif // STB_VORBIS_FAST_BINARY_LENGTH [number] // sets the log size of the binary-search acceleration table. this // is used in similar fashion to the fast-huffman size to set initial // parameters for the binary search // STB_VORBIS_FAST_HUFFMAN_INT // The fast huffman tables are much more efficient if they can be // stored as 16-bit results instead of 32-bit results. This restricts // the codebooks to having only 65535 possible outcomes, though. // (At least, accelerated by the huffman table.) #ifndef STB_VORBIS_FAST_HUFFMAN_INT #define STB_VORBIS_FAST_HUFFMAN_SHORT #endif // STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH // If the 'fast huffman' search doesn't succeed, then stb_vorbis falls // back on binary searching for the correct one. This requires storing // extra tables with the huffman codes in sorted order. Defining this // symbol trades off space for speed by forcing a linear search in the // non-fast case, except for "sparse" codebooks. // #define STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH // STB_VORBIS_DIVIDES_IN_RESIDUE // stb_vorbis precomputes the result of the scalar residue decoding // that would otherwise require a divide per chunk. you can trade off // space for time by defining this symbol. // #define STB_VORBIS_DIVIDES_IN_RESIDUE // STB_VORBIS_DIVIDES_IN_CODEBOOK // vorbis VQ codebooks can be encoded two ways: with every case explicitly // stored, or with all elements being chosen from a small range of values, // and all values possible in all elements. By default, stb_vorbis expands // this latter kind out to look like the former kind for ease of decoding, // because otherwise an integer divide-per-vector-element is required to // unpack the index. If you define STB_VORBIS_DIVIDES_IN_CODEBOOK, you can // trade off storage for speed. //#define STB_VORBIS_DIVIDES_IN_CODEBOOK #ifdef STB_VORBIS_CODEBOOK_SHORTS #error "STB_VORBIS_CODEBOOK_SHORTS is no longer supported as it produced incorrect results for some input formats" #endif // STB_VORBIS_DIVIDE_TABLE // this replaces small integer divides in the floor decode loop with // table lookups. made less than 1% difference, so disabled by default. // STB_VORBIS_NO_INLINE_DECODE // disables the inlining of the scalar codebook fast-huffman decode. // might save a little codespace; useful for debugging // #define STB_VORBIS_NO_INLINE_DECODE // STB_VORBIS_NO_DEFER_FLOOR // Normally we only decode the floor without synthesizing the actual // full curve. We can instead synthesize the curve immediately. This // requires more memory and is very likely slower, so I don't think // you'd ever want to do it except for debugging. // #define STB_VORBIS_NO_DEFER_FLOOR ////////////////////////////////////////////////////////////////////////////// #ifdef STB_VORBIS_NO_PULLDATA_API #define STB_VORBIS_NO_INTEGER_CONVERSION #define STB_VORBIS_NO_STDIO #endif #if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) #define STB_VORBIS_NO_STDIO 1 #endif #ifndef STB_VORBIS_NO_INTEGER_CONVERSION #ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT // only need endianness for fast-float-to-int, which we don't // use for pushdata #ifndef STB_VORBIS_BIG_ENDIAN #define STB_VORBIS_ENDIAN 0 #else #define STB_VORBIS_ENDIAN 1 #endif #endif #endif #ifndef STB_VORBIS_NO_STDIO #include #endif #ifndef STB_VORBIS_NO_CRT #include #include #include #include // find definition of alloca if it's not in stdlib.h: #if defined(_MSC_VER) || defined(__MINGW32__) #include #endif #if defined(__linux__) || defined(__linux) || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__) #include #endif #else // STB_VORBIS_NO_CRT #define NULL 0 #define malloc(s) 0 #define free(s) ((void) 0) #define realloc(s) 0 #endif // STB_VORBIS_NO_CRT #include #ifdef __MINGW32__ // eff you mingw: // "fixed": // http://sourceforge.net/p/mingw-w64/mailman/message/32882927/ // "no that broke the build, reverted, who cares about C": // http://sourceforge.net/p/mingw-w64/mailman/message/32890381/ #ifdef __forceinline #undef __forceinline #endif #define __forceinline #ifndef alloca #define alloca __builtin_alloca #endif #elif !defined(_MSC_VER) #if __GNUC__ #define __forceinline inline #else #define __forceinline #endif #endif #if STB_VORBIS_MAX_CHANNELS > 256 #error "Value of STB_VORBIS_MAX_CHANNELS outside of allowed range" #endif #if STB_VORBIS_FAST_HUFFMAN_LENGTH > 24 #error "Value of STB_VORBIS_FAST_HUFFMAN_LENGTH outside of allowed range" #endif #if 0 #include #define CHECK(f) _CrtIsValidHeapPointer(f->channel_buffers[1]) #else #define CHECK(f) ((void) 0) #endif #define MAX_BLOCKSIZE_LOG 13 // from specification #define MAX_BLOCKSIZE (1 << MAX_BLOCKSIZE_LOG) typedef unsigned char uint8; typedef signed char int8; typedef unsigned short uint16; typedef signed short int16; typedef unsigned int uint32; typedef signed int int32; #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif typedef float codetype; #ifdef _MSC_VER #define STBV_NOTUSED(v) (void)(v) #else #define STBV_NOTUSED(v) (void)sizeof(v) #endif // @NOTE // // Some arrays below are tagged "//varies", which means it's actually // a variable-sized piece of data, but rather than malloc I assume it's // small enough it's better to just allocate it all together with the // main thing // // Most of the variables are specified with the smallest size I could pack // them into. It might give better performance to make them all full-sized // integers. It should be safe to freely rearrange the structures or change // the sizes larger--nothing relies on silently truncating etc., nor the // order of variables. #define FAST_HUFFMAN_TABLE_SIZE (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH) #define FAST_HUFFMAN_TABLE_MASK (FAST_HUFFMAN_TABLE_SIZE - 1) typedef struct { int dimensions, entries; uint8 *codeword_lengths; float minimum_value; float delta_value; uint8 value_bits; uint8 lookup_type; uint8 sequence_p; uint8 sparse; uint32 lookup_values; codetype *multiplicands; uint32 *codewords; #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT int16 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; #else int32 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; #endif uint32 *sorted_codewords; int *sorted_values; int sorted_entries; } Codebook; typedef struct { uint8 order; uint16 rate; uint16 bark_map_size; uint8 amplitude_bits; uint8 amplitude_offset; uint8 number_of_books; uint8 book_list[16]; // varies } Floor0; typedef struct { uint8 partitions; uint8 partition_class_list[32]; // varies uint8 class_dimensions[16]; // varies uint8 class_subclasses[16]; // varies uint8 class_masterbooks[16]; // varies int16 subclass_books[16][8]; // varies uint16 Xlist[31*8+2]; // varies uint8 sorted_order[31*8+2]; uint8 neighbors[31*8+2][2]; uint8 floor1_multiplier; uint8 rangebits; int values; } Floor1; typedef union { Floor0 floor0; Floor1 floor1; } Floor; typedef struct { uint32 begin, end; uint32 part_size; uint8 classifications; uint8 classbook; uint8 **classdata; int16 (*residue_books)[8]; } Residue; typedef struct { uint8 magnitude; uint8 angle; uint8 mux; } MappingChannel; typedef struct { uint16 coupling_steps; MappingChannel *chan; uint8 submaps; uint8 submap_floor[15]; // varies uint8 submap_residue[15]; // varies } Mapping; typedef struct { uint8 blockflag; uint8 mapping; uint16 windowtype; uint16 transformtype; } Mode; typedef struct { uint32 goal_crc; // expected crc if match int bytes_left; // bytes left in packet uint32 crc_so_far; // running crc int bytes_done; // bytes processed in _current_ chunk uint32 sample_loc; // granule pos encoded in page } CRCscan; typedef struct { uint32 page_start, page_end; uint32 last_decoded_sample; } ProbedPage; struct stb_vorbis { // user-accessible info unsigned int sample_rate; int channels; unsigned int setup_memory_required; unsigned int temp_memory_required; unsigned int setup_temp_memory_required; char *vendor; int comment_list_length; char **comment_list; // input config #ifndef STB_VORBIS_NO_STDIO FILE *f; uint32 f_start; int close_on_free; #endif uint8 *stream; uint8 *stream_start; uint8 *stream_end; uint32 stream_len; uint8 push_mode; // the page to seek to when seeking to start, may be zero uint32 first_audio_page_offset; // p_first is the page on which the first audio packet ends // (but not necessarily the page on which it starts) ProbedPage p_first, p_last; // memory management stb_vorbis_alloc alloc; int setup_offset; int temp_offset; // run-time results int eof; enum STBVorbisError error; // user-useful data // header info int blocksize[2]; int blocksize_0, blocksize_1; int codebook_count; Codebook *codebooks; int floor_count; uint16 floor_types[64]; // varies Floor *floor_config; int residue_count; uint16 residue_types[64]; // varies Residue *residue_config; int mapping_count; Mapping *mapping; int mode_count; Mode mode_config[64]; // varies uint32 total_samples; // decode buffer float *channel_buffers[STB_VORBIS_MAX_CHANNELS]; float *outputs [STB_VORBIS_MAX_CHANNELS]; float *previous_window[STB_VORBIS_MAX_CHANNELS]; int previous_length; #ifndef STB_VORBIS_NO_DEFER_FLOOR int16 *finalY[STB_VORBIS_MAX_CHANNELS]; #else float *floor_buffers[STB_VORBIS_MAX_CHANNELS]; #endif uint32 current_loc; // sample location of next frame to decode int current_loc_valid; // per-blocksize precomputed data // twiddle factors float *A[2],*B[2],*C[2]; float *window[2]; uint16 *bit_reverse[2]; // current page/packet/segment streaming info uint32 serial; // stream serial number for verification int last_page; int segment_count; uint8 segments[255]; uint8 page_flag; uint8 bytes_in_seg; uint8 first_decode; int next_seg; int last_seg; // flag that we're on the last segment int last_seg_which; // what was the segment number of the last seg? uint32 acc; int valid_bits; int packet_bytes; int end_seg_with_known_loc; uint32 known_loc_for_packet; int discard_samples_deferred; uint32 samples_output; // push mode scanning int page_crc_tests; // only in push_mode: number of tests active; -1 if not searching #ifndef STB_VORBIS_NO_PUSHDATA_API CRCscan scan[STB_VORBIS_PUSHDATA_CRC_COUNT]; #endif // sample-access int channel_buffer_start; int channel_buffer_end; }; #if defined(STB_VORBIS_NO_PUSHDATA_API) #define IS_PUSH_MODE(f) FALSE #elif defined(STB_VORBIS_NO_PULLDATA_API) #define IS_PUSH_MODE(f) TRUE #else #define IS_PUSH_MODE(f) ((f)->push_mode) #endif typedef struct stb_vorbis vorb; static int error(vorb *f, enum STBVorbisError e) { f->error = e; if (!f->eof && e != VORBIS_need_more_data) { f->error=e; // breakpoint for debugging } return 0; } // these functions are used for allocating temporary memory // while decoding. if you can afford the stack space, use // alloca(); otherwise, provide a temp buffer and it will // allocate out of those. #define array_size_required(count,size) (count*(sizeof(void *)+(size))) #define temp_alloc(f,size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size)) #define temp_free(f,p) (void)0 #define temp_alloc_save(f) ((f)->temp_offset) #define temp_alloc_restore(f,p) ((f)->temp_offset = (p)) #define temp_block_array(f,count,size) make_block_array(temp_alloc(f,array_size_required(count,size)), count, size) // given a sufficiently large block of memory, make an array of pointers to subblocks of it static void *make_block_array(void *mem, int count, int size) { int i; void ** p = (void **) mem; char *q = (char *) (p + count); for (i=0; i < count; ++i) { p[i] = q; q += size; } return p; } static void *setup_malloc(vorb *f, int sz) { sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs. f->setup_memory_required += sz; if (f->alloc.alloc_buffer) { void *p = (char *) f->alloc.alloc_buffer + f->setup_offset; if (f->setup_offset + sz > f->temp_offset) return NULL; f->setup_offset += sz; return p; } return sz ? malloc(sz) : NULL; } static void setup_free(vorb *f, void *p) { if (f->alloc.alloc_buffer) return; // do nothing; setup mem is a stack free(p); } static void *setup_temp_malloc(vorb *f, int sz) { sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs. if (f->alloc.alloc_buffer) { if (f->temp_offset - sz < f->setup_offset) return NULL; f->temp_offset -= sz; return (char *) f->alloc.alloc_buffer + f->temp_offset; } return malloc(sz); } static void setup_temp_free(vorb *f, void *p, int sz) { if (f->alloc.alloc_buffer) { f->temp_offset += (sz+7)&~7; return; } free(p); } #define CRC32_POLY 0x04c11db7 // from spec static uint32 crc_table[256]; static void crc32_init(void) { int i,j; uint32 s; for(i=0; i < 256; i++) { for (s=(uint32) i << 24, j=0; j < 8; ++j) s = (s << 1) ^ (s >= (1U<<31) ? CRC32_POLY : 0); crc_table[i] = s; } } static __forceinline uint32 crc32_update(uint32 crc, uint8 byte) { return (crc << 8) ^ crc_table[byte ^ (crc >> 24)]; } // used in setup, and for huffman that doesn't go fast path static unsigned int bit_reverse(unsigned int n) { n = ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1); n = ((n & 0xCCCCCCCC) >> 2) | ((n & 0x33333333) << 2); n = ((n & 0xF0F0F0F0) >> 4) | ((n & 0x0F0F0F0F) << 4); n = ((n & 0xFF00FF00) >> 8) | ((n & 0x00FF00FF) << 8); return (n >> 16) | (n << 16); } static float square(float x) { return x*x; } // this is a weird definition of log2() for which log2(1) = 1, log2(2) = 2, log2(4) = 3 // as required by the specification. fast(?) implementation from stb.h // @OPTIMIZE: called multiple times per-packet with "constants"; move to setup static int ilog(int32 n) { static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 }; if (n < 0) return 0; // signed n returns 0 // 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29) if (n < (1 << 14)) if (n < (1 << 4)) return 0 + log2_4[n ]; else if (n < (1 << 9)) return 5 + log2_4[n >> 5]; else return 10 + log2_4[n >> 10]; else if (n < (1 << 24)) if (n < (1 << 19)) return 15 + log2_4[n >> 15]; else return 20 + log2_4[n >> 20]; else if (n < (1 << 29)) return 25 + log2_4[n >> 25]; else return 30 + log2_4[n >> 30]; } #ifndef M_PI #define M_PI 3.14159265358979323846264f // from CRC #endif // code length assigned to a value with no huffman encoding #define NO_CODE 255 /////////////////////// LEAF SETUP FUNCTIONS ////////////////////////// // // these functions are only called at setup, and only a few times // per file static float float32_unpack(uint32 x) { // from the specification uint32 mantissa = x & 0x1fffff; uint32 sign = x & 0x80000000; uint32 exp = (x & 0x7fe00000) >> 21; double res = sign ? -(double)mantissa : (double)mantissa; return (float) ldexp((float)res, (int)exp-788); } // zlib & jpeg huffman tables assume that the output symbols // can either be arbitrarily arranged, or have monotonically // increasing frequencies--they rely on the lengths being sorted; // this makes for a very simple generation algorithm. // vorbis allows a huffman table with non-sorted lengths. This // requires a more sophisticated construction, since symbols in // order do not map to huffman codes "in order". static void add_entry(Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values) { if (!c->sparse) { c->codewords [symbol] = huff_code; } else { c->codewords [count] = huff_code; c->codeword_lengths[count] = len; values [count] = symbol; } } static int compute_codewords(Codebook *c, uint8 *len, int n, uint32 *values) { int i,k,m=0; uint32 available[32]; memset(available, 0, sizeof(available)); // find the first entry for (k=0; k < n; ++k) if (len[k] < NO_CODE) break; if (k == n) { assert(c->sorted_entries == 0); return TRUE; } assert(len[k] < 32); // no error return required, code reading lens checks this // add to the list add_entry(c, 0, k, m++, len[k], values); // add all available leaves for (i=1; i <= len[k]; ++i) available[i] = 1U << (32-i); // note that the above code treats the first case specially, // but it's really the same as the following code, so they // could probably be combined (except the initial code is 0, // and I use 0 in available[] to mean 'empty') for (i=k+1; i < n; ++i) { uint32 res; int z = len[i], y; if (z == NO_CODE) continue; assert(z < 32); // no error return required, code reading lens checks this // find lowest available leaf (should always be earliest, // which is what the specification calls for) // note that this property, and the fact we can never have // more than one free leaf at a given level, isn't totally // trivial to prove, but it seems true and the assert never // fires, so! while (z > 0 && !available[z]) --z; if (z == 0) { return FALSE; } res = available[z]; available[z] = 0; add_entry(c, bit_reverse(res), i, m++, len[i], values); // propagate availability up the tree if (z != len[i]) { for (y=len[i]; y > z; --y) { assert(available[y] == 0); available[y] = res + (1 << (32-y)); } } } return TRUE; } // accelerated huffman table allows fast O(1) match of all symbols // of length <= STB_VORBIS_FAST_HUFFMAN_LENGTH static void compute_accelerated_huffman(Codebook *c) { int i, len; for (i=0; i < FAST_HUFFMAN_TABLE_SIZE; ++i) c->fast_huffman[i] = -1; len = c->sparse ? c->sorted_entries : c->entries; #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT if (len > 32767) len = 32767; // largest possible value we can encode! #endif for (i=0; i < len; ++i) { if (c->codeword_lengths[i] <= STB_VORBIS_FAST_HUFFMAN_LENGTH) { uint32 z = c->sparse ? bit_reverse(c->sorted_codewords[i]) : c->codewords[i]; // set table entries for all bit combinations in the higher bits while (z < FAST_HUFFMAN_TABLE_SIZE) { c->fast_huffman[z] = i; z += 1 << c->codeword_lengths[i]; } } } } #ifdef _MSC_VER #define STBV_CDECL __cdecl #else #define STBV_CDECL #endif static int STBV_CDECL uint32_compare(const void *p, const void *q) { uint32 x = * (uint32 *) p; uint32 y = * (uint32 *) q; return x < y ? -1 : x > y; } static int include_in_sort(Codebook *c, uint8 len) { if (c->sparse) { assert(len != NO_CODE); return TRUE; } if (len == NO_CODE) return FALSE; if (len > STB_VORBIS_FAST_HUFFMAN_LENGTH) return TRUE; return FALSE; } // if the fast table above doesn't work, we want to binary // search them... need to reverse the bits static void compute_sorted_huffman(Codebook *c, uint8 *lengths, uint32 *values) { int i, len; // build a list of all the entries // OPTIMIZATION: don't include the short ones, since they'll be caught by FAST_HUFFMAN. // this is kind of a frivolous optimization--I don't see any performance improvement, // but it's like 4 extra lines of code, so. if (!c->sparse) { int k = 0; for (i=0; i < c->entries; ++i) if (include_in_sort(c, lengths[i])) c->sorted_codewords[k++] = bit_reverse(c->codewords[i]); assert(k == c->sorted_entries); } else { for (i=0; i < c->sorted_entries; ++i) c->sorted_codewords[i] = bit_reverse(c->codewords[i]); } qsort(c->sorted_codewords, c->sorted_entries, sizeof(c->sorted_codewords[0]), uint32_compare); c->sorted_codewords[c->sorted_entries] = 0xffffffff; len = c->sparse ? c->sorted_entries : c->entries; // now we need to indicate how they correspond; we could either // #1: sort a different data structure that says who they correspond to // #2: for each sorted entry, search the original list to find who corresponds // #3: for each original entry, find the sorted entry // #1 requires extra storage, #2 is slow, #3 can use binary search! for (i=0; i < len; ++i) { int huff_len = c->sparse ? lengths[values[i]] : lengths[i]; if (include_in_sort(c,huff_len)) { uint32 code = bit_reverse(c->codewords[i]); int x=0, n=c->sorted_entries; while (n > 1) { // invariant: sc[x] <= code < sc[x+n] int m = x + (n >> 1); if (c->sorted_codewords[m] <= code) { x = m; n -= (n>>1); } else { n >>= 1; } } assert(c->sorted_codewords[x] == code); if (c->sparse) { c->sorted_values[x] = values[i]; c->codeword_lengths[x] = huff_len; } else { c->sorted_values[x] = i; } } } } // only run while parsing the header (3 times) static int vorbis_validate(uint8 *data) { static uint8 vorbis[6] = { 'v', 'o', 'r', 'b', 'i', 's' }; return memcmp(data, vorbis, 6) == 0; } // called from setup only, once per code book // (formula implied by specification) static int lookup1_values(int entries, int dim) { int r = (int) floor(exp((float) log((float) entries) / dim)); if ((int) floor(pow((float) r+1, dim)) <= entries) // (int) cast for MinGW warning; ++r; // floor() to avoid _ftol() when non-CRT if (pow((float) r+1, dim) <= entries) return -1; if ((int) floor(pow((float) r, dim)) > entries) return -1; return r; } // called twice per file static void compute_twiddle_factors(int n, float *A, float *B, float *C) { int n4 = n >> 2, n8 = n >> 3; int k,k2; for (k=k2=0; k < n4; ++k,k2+=2) { A[k2 ] = (float) cos(4*k*M_PI/n); A[k2+1] = (float) -sin(4*k*M_PI/n); B[k2 ] = (float) cos((k2+1)*M_PI/n/2) * 0.5f; B[k2+1] = (float) sin((k2+1)*M_PI/n/2) * 0.5f; } for (k=k2=0; k < n8; ++k,k2+=2) { C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); } } static void compute_window(int n, float *window) { int n2 = n >> 1, i; for (i=0; i < n2; ++i) window[i] = (float) sin(0.5 * M_PI * square((float) sin((i - 0 + 0.5) / n2 * 0.5 * M_PI))); } static void compute_bitreverse(int n, uint16 *rev) { int ld = ilog(n) - 1; // ilog is off-by-one from normal definitions int i, n8 = n >> 3; for (i=0; i < n8; ++i) rev[i] = (bit_reverse(i) >> (32-ld+3)) << 2; } static int init_blocksize(vorb *f, int b, int n) { int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3; f->A[b] = (float *) setup_malloc(f, sizeof(float) * n2); f->B[b] = (float *) setup_malloc(f, sizeof(float) * n2); f->C[b] = (float *) setup_malloc(f, sizeof(float) * n4); if (!f->A[b] || !f->B[b] || !f->C[b]) return error(f, VORBIS_outofmem); compute_twiddle_factors(n, f->A[b], f->B[b], f->C[b]); f->window[b] = (float *) setup_malloc(f, sizeof(float) * n2); if (!f->window[b]) return error(f, VORBIS_outofmem); compute_window(n, f->window[b]); f->bit_reverse[b] = (uint16 *) setup_malloc(f, sizeof(uint16) * n8); if (!f->bit_reverse[b]) return error(f, VORBIS_outofmem); compute_bitreverse(n, f->bit_reverse[b]); return TRUE; } static void neighbors(uint16 *x, int n, int *plow, int *phigh) { int low = -1; int high = 65536; int i; for (i=0; i < n; ++i) { if (x[i] > low && x[i] < x[n]) { *plow = i; low = x[i]; } if (x[i] < high && x[i] > x[n]) { *phigh = i; high = x[i]; } } } // this has been repurposed so y is now the original index instead of y typedef struct { uint16 x,id; } stbv__floor_ordering; static int STBV_CDECL point_compare(const void *p, const void *q) { stbv__floor_ordering *a = (stbv__floor_ordering *) p; stbv__floor_ordering *b = (stbv__floor_ordering *) q; return a->x < b->x ? -1 : a->x > b->x; } // /////////////////////// END LEAF SETUP FUNCTIONS ////////////////////////// #if defined(STB_VORBIS_NO_STDIO) #define USE_MEMORY(z) TRUE #else #define USE_MEMORY(z) ((z)->stream) #endif static uint8 get8(vorb *z) { if (USE_MEMORY(z)) { if (z->stream >= z->stream_end) { z->eof = TRUE; return 0; } return *z->stream++; } #ifndef STB_VORBIS_NO_STDIO { int c = fgetc(z->f); if (c == EOF) { z->eof = TRUE; return 0; } return c; } #endif } static uint32 get32(vorb *f) { uint32 x; x = get8(f); x += get8(f) << 8; x += get8(f) << 16; x += (uint32) get8(f) << 24; return x; } static int getn(vorb *z, uint8 *data, int n) { if (USE_MEMORY(z)) { if (z->stream+n > z->stream_end) { z->eof = 1; return 0; } memcpy(data, z->stream, n); z->stream += n; return 1; } #ifndef STB_VORBIS_NO_STDIO if (fread(data, n, 1, z->f) == 1) return 1; else { z->eof = 1; return 0; } #endif } static void skip(vorb *z, int n) { if (USE_MEMORY(z)) { z->stream += n; if (z->stream >= z->stream_end) z->eof = 1; return; } #ifndef STB_VORBIS_NO_STDIO { long x = ftell(z->f); fseek(z->f, x+n, SEEK_SET); } #endif } static int set_file_offset(stb_vorbis *f, unsigned int loc) { #ifndef STB_VORBIS_NO_PUSHDATA_API if (f->push_mode) return 0; #endif f->eof = 0; if (USE_MEMORY(f)) { if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) { f->stream = f->stream_end; f->eof = 1; return 0; } else { f->stream = f->stream_start + loc; return 1; } } #ifndef STB_VORBIS_NO_STDIO if (loc + f->f_start < loc || loc >= 0x80000000) { loc = 0x7fffffff; f->eof = 1; } else { loc += f->f_start; } if (!fseek(f->f, loc, SEEK_SET)) return 1; f->eof = 1; fseek(f->f, f->f_start, SEEK_END); return 0; #endif } static uint8 ogg_page_header[4] = { 0x4f, 0x67, 0x67, 0x53 }; static int capture_pattern(vorb *f) { if (0x4f != get8(f)) return FALSE; if (0x67 != get8(f)) return FALSE; if (0x67 != get8(f)) return FALSE; if (0x53 != get8(f)) return FALSE; return TRUE; } #define PAGEFLAG_continued_packet 1 #define PAGEFLAG_first_page 2 #define PAGEFLAG_last_page 4 static int start_page_no_capturepattern(vorb *f) { uint32 loc0,loc1,n; if (f->first_decode && !IS_PUSH_MODE(f)) { f->p_first.page_start = stb_vorbis_get_file_offset(f) - 4; } // stream structure version if (0 != get8(f)) return error(f, VORBIS_invalid_stream_structure_version); // header flag f->page_flag = get8(f); // absolute granule position loc0 = get32(f); loc1 = get32(f); // @TODO: validate loc0,loc1 as valid positions? // stream serial number -- vorbis doesn't interleave, so discard get32(f); //if (f->serial != get32(f)) return error(f, VORBIS_incorrect_stream_serial_number); // page sequence number n = get32(f); f->last_page = n; // CRC32 get32(f); // page_segments f->segment_count = get8(f); if (!getn(f, f->segments, f->segment_count)) return error(f, VORBIS_unexpected_eof); // assume we _don't_ know any the sample position of any segments f->end_seg_with_known_loc = -2; if (loc0 != ~0U || loc1 != ~0U) { int i; // determine which packet is the last one that will complete for (i=f->segment_count-1; i >= 0; --i) if (f->segments[i] < 255) break; // 'i' is now the index of the _last_ segment of a packet that ends if (i >= 0) { f->end_seg_with_known_loc = i; f->known_loc_for_packet = loc0; } } if (f->first_decode) { int i,len; len = 0; for (i=0; i < f->segment_count; ++i) len += f->segments[i]; len += 27 + f->segment_count; f->p_first.page_end = f->p_first.page_start + len; f->p_first.last_decoded_sample = loc0; } f->next_seg = 0; return TRUE; } static int start_page(vorb *f) { if (!capture_pattern(f)) return error(f, VORBIS_missing_capture_pattern); return start_page_no_capturepattern(f); } static int start_packet(vorb *f) { while (f->next_seg == -1) { if (!start_page(f)) return FALSE; if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_continued_packet_flag_invalid); } f->last_seg = FALSE; f->valid_bits = 0; f->packet_bytes = 0; f->bytes_in_seg = 0; // f->next_seg is now valid return TRUE; } static int maybe_start_packet(vorb *f) { if (f->next_seg == -1) { int x = get8(f); if (f->eof) return FALSE; // EOF at page boundary is not an error! if (0x4f != x ) return error(f, VORBIS_missing_capture_pattern); if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (0x53 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (!start_page_no_capturepattern(f)) return FALSE; if (f->page_flag & PAGEFLAG_continued_packet) { // set up enough state that we can read this packet if we want, // e.g. during recovery f->last_seg = FALSE; f->bytes_in_seg = 0; return error(f, VORBIS_continued_packet_flag_invalid); } } return start_packet(f); } static int next_segment(vorb *f) { int len; if (f->last_seg) return 0; if (f->next_seg == -1) { f->last_seg_which = f->segment_count-1; // in case start_page fails if (!start_page(f)) { f->last_seg = 1; return 0; } if (!(f->page_flag & PAGEFLAG_continued_packet)) return error(f, VORBIS_continued_packet_flag_invalid); } len = f->segments[f->next_seg++]; if (len < 255) { f->last_seg = TRUE; f->last_seg_which = f->next_seg-1; } if (f->next_seg >= f->segment_count) f->next_seg = -1; assert(f->bytes_in_seg == 0); f->bytes_in_seg = len; return len; } #define EOP (-1) #define INVALID_BITS (-1) static int get8_packet_raw(vorb *f) { if (!f->bytes_in_seg) { // CLANG! if (f->last_seg) return EOP; else if (!next_segment(f)) return EOP; } assert(f->bytes_in_seg > 0); --f->bytes_in_seg; ++f->packet_bytes; return get8(f); } static int get8_packet(vorb *f) { int x = get8_packet_raw(f); f->valid_bits = 0; return x; } static int get32_packet(vorb *f) { uint32 x; x = get8_packet(f); x += get8_packet(f) << 8; x += get8_packet(f) << 16; x += (uint32) get8_packet(f) << 24; return x; } static void flush_packet(vorb *f) { while (get8_packet_raw(f) != EOP); } // @OPTIMIZE: this is the secondary bit decoder, so it's probably not as important // as the huffman decoder? static uint32 get_bits(vorb *f, int n) { uint32 z; if (f->valid_bits < 0) return 0; if (f->valid_bits < n) { if (n > 24) { // the accumulator technique below would not work correctly in this case z = get_bits(f, 24); z += get_bits(f, n-24) << 24; return z; } if (f->valid_bits == 0) f->acc = 0; while (f->valid_bits < n) { int z = get8_packet_raw(f); if (z == EOP) { f->valid_bits = INVALID_BITS; return 0; } f->acc += z << f->valid_bits; f->valid_bits += 8; } } assert(f->valid_bits >= n); z = f->acc & ((1 << n)-1); f->acc >>= n; f->valid_bits -= n; return z; } // @OPTIMIZE: primary accumulator for huffman // expand the buffer to as many bits as possible without reading off end of packet // it might be nice to allow f->valid_bits and f->acc to be stored in registers, // e.g. cache them locally and decode locally static __forceinline void prep_huffman(vorb *f) { if (f->valid_bits <= 24) { if (f->valid_bits == 0) f->acc = 0; do { int z; if (f->last_seg && !f->bytes_in_seg) return; z = get8_packet_raw(f); if (z == EOP) return; f->acc += (unsigned) z << f->valid_bits; f->valid_bits += 8; } while (f->valid_bits <= 24); } } enum { VORBIS_packet_id = 1, VORBIS_packet_comment = 3, VORBIS_packet_setup = 5 }; static int codebook_decode_scalar_raw(vorb *f, Codebook *c) { int i; prep_huffman(f); if (c->codewords == NULL && c->sorted_codewords == NULL) return -1; // cases to use binary search: sorted_codewords && !c->codewords // sorted_codewords && c->entries > 8 if (c->entries > 8 ? c->sorted_codewords!=NULL : !c->codewords) { // binary search uint32 code = bit_reverse(f->acc); int x=0, n=c->sorted_entries, len; while (n > 1) { // invariant: sc[x] <= code < sc[x+n] int m = x + (n >> 1); if (c->sorted_codewords[m] <= code) { x = m; n -= (n>>1); } else { n >>= 1; } } // x is now the sorted index if (!c->sparse) x = c->sorted_values[x]; // x is now sorted index if sparse, or symbol otherwise len = c->codeword_lengths[x]; if (f->valid_bits >= len) { f->acc >>= len; f->valid_bits -= len; return x; } f->valid_bits = 0; return -1; } // if small, linear search assert(!c->sparse); for (i=0; i < c->entries; ++i) { if (c->codeword_lengths[i] == NO_CODE) continue; if (c->codewords[i] == (f->acc & ((1 << c->codeword_lengths[i])-1))) { if (f->valid_bits >= c->codeword_lengths[i]) { f->acc >>= c->codeword_lengths[i]; f->valid_bits -= c->codeword_lengths[i]; return i; } f->valid_bits = 0; return -1; } } error(f, VORBIS_invalid_stream); f->valid_bits = 0; return -1; } #ifndef STB_VORBIS_NO_INLINE_DECODE #define DECODE_RAW(var, f,c) \ if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) \ prep_huffman(f); \ var = f->acc & FAST_HUFFMAN_TABLE_MASK; \ var = c->fast_huffman[var]; \ if (var >= 0) { \ int n = c->codeword_lengths[var]; \ f->acc >>= n; \ f->valid_bits -= n; \ if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \ } else { \ var = codebook_decode_scalar_raw(f,c); \ } #else static int codebook_decode_scalar(vorb *f, Codebook *c) { int i; if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) prep_huffman(f); // fast huffman table lookup i = f->acc & FAST_HUFFMAN_TABLE_MASK; i = c->fast_huffman[i]; if (i >= 0) { f->acc >>= c->codeword_lengths[i]; f->valid_bits -= c->codeword_lengths[i]; if (f->valid_bits < 0) { f->valid_bits = 0; return -1; } return i; } return codebook_decode_scalar_raw(f,c); } #define DECODE_RAW(var,f,c) var = codebook_decode_scalar(f,c); #endif #define DECODE(var,f,c) \ DECODE_RAW(var,f,c) \ if (c->sparse) var = c->sorted_values[var]; #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK #define DECODE_VQ(var,f,c) DECODE_RAW(var,f,c) #else #define DECODE_VQ(var,f,c) DECODE(var,f,c) #endif // CODEBOOK_ELEMENT_FAST is an optimization for the CODEBOOK_FLOATS case // where we avoid one addition #define CODEBOOK_ELEMENT(c,off) (c->multiplicands[off]) #define CODEBOOK_ELEMENT_FAST(c,off) (c->multiplicands[off]) #define CODEBOOK_ELEMENT_BASE(c) (0) static int codebook_decode_start(vorb *f, Codebook *c) { int z = -1; // type 0 is only legal in a scalar context if (c->lookup_type == 0) error(f, VORBIS_invalid_stream); else { DECODE_VQ(z,f,c); if (c->sparse) assert(z < c->sorted_entries); if (z < 0) { // check for EOP if (!f->bytes_in_seg) if (f->last_seg) return z; error(f, VORBIS_invalid_stream); } } return z; } static int codebook_decode(vorb *f, Codebook *c, float *output, int len) { int i,z = codebook_decode_start(f,c); if (z < 0) return FALSE; if (len > c->dimensions) len = c->dimensions; #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { float last = CODEBOOK_ELEMENT_BASE(c); int div = 1; for (i=0; i < len; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; output[i] += val; if (c->sequence_p) last = val + c->minimum_value; div *= c->lookup_values; } return TRUE; } #endif z *= c->dimensions; if (c->sequence_p) { float last = CODEBOOK_ELEMENT_BASE(c); for (i=0; i < len; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; output[i] += val; last = val + c->minimum_value; } } else { float last = CODEBOOK_ELEMENT_BASE(c); for (i=0; i < len; ++i) { output[i] += CODEBOOK_ELEMENT_FAST(c,z+i) + last; } } return TRUE; } static int codebook_decode_step(vorb *f, Codebook *c, float *output, int len, int step) { int i,z = codebook_decode_start(f,c); float last = CODEBOOK_ELEMENT_BASE(c); if (z < 0) return FALSE; if (len > c->dimensions) len = c->dimensions; #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int div = 1; for (i=0; i < len; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; output[i*step] += val; if (c->sequence_p) last = val; div *= c->lookup_values; } return TRUE; } #endif z *= c->dimensions; for (i=0; i < len; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; output[i*step] += val; if (c->sequence_p) last = val; } return TRUE; } static int codebook_decode_deinterleave_repeat(vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode) { int c_inter = *c_inter_p; int p_inter = *p_inter_p; int i,z, effective = c->dimensions; // type 0 is only legal in a scalar context if (c->lookup_type == 0) return error(f, VORBIS_invalid_stream); while (total_decode > 0) { float last = CODEBOOK_ELEMENT_BASE(c); DECODE_VQ(z,f,c); #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK assert(!c->sparse || z < c->sorted_entries); #endif if (z < 0) { if (!f->bytes_in_seg) if (f->last_seg) return FALSE; return error(f, VORBIS_invalid_stream); } // if this will take us off the end of the buffers, stop short! // we check by computing the length of the virtual interleaved // buffer (len*ch), our current offset within it (p_inter*ch)+(c_inter), // and the length we'll be using (effective) if (c_inter + p_inter*ch + effective > len * ch) { effective = len*ch - (p_inter*ch - c_inter); } #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int div = 1; for (i=0; i < effective; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; if (outputs[c_inter]) outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } if (c->sequence_p) last = val; div *= c->lookup_values; } } else #endif { z *= c->dimensions; if (c->sequence_p) { for (i=0; i < effective; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; if (outputs[c_inter]) outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } last = val; } } else { for (i=0; i < effective; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; if (outputs[c_inter]) outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } } } } total_decode -= effective; } *c_inter_p = c_inter; *p_inter_p = p_inter; return TRUE; } static int predict_point(int x, int x0, int x1, int y0, int y1) { int dy = y1 - y0; int adx = x1 - x0; // @OPTIMIZE: force int division to round in the right direction... is this necessary on x86? int err = abs(dy) * (x - x0); int off = err / adx; return dy < 0 ? y0 - off : y0 + off; } // the following table is block-copied from the specification static float inverse_db_table[256] = { 1.0649863e-07f, 1.1341951e-07f, 1.2079015e-07f, 1.2863978e-07f, 1.3699951e-07f, 1.4590251e-07f, 1.5538408e-07f, 1.6548181e-07f, 1.7623575e-07f, 1.8768855e-07f, 1.9988561e-07f, 2.1287530e-07f, 2.2670913e-07f, 2.4144197e-07f, 2.5713223e-07f, 2.7384213e-07f, 2.9163793e-07f, 3.1059021e-07f, 3.3077411e-07f, 3.5226968e-07f, 3.7516214e-07f, 3.9954229e-07f, 4.2550680e-07f, 4.5315863e-07f, 4.8260743e-07f, 5.1396998e-07f, 5.4737065e-07f, 5.8294187e-07f, 6.2082472e-07f, 6.6116941e-07f, 7.0413592e-07f, 7.4989464e-07f, 7.9862701e-07f, 8.5052630e-07f, 9.0579828e-07f, 9.6466216e-07f, 1.0273513e-06f, 1.0941144e-06f, 1.1652161e-06f, 1.2409384e-06f, 1.3215816e-06f, 1.4074654e-06f, 1.4989305e-06f, 1.5963394e-06f, 1.7000785e-06f, 1.8105592e-06f, 1.9282195e-06f, 2.0535261e-06f, 2.1869758e-06f, 2.3290978e-06f, 2.4804557e-06f, 2.6416497e-06f, 2.8133190e-06f, 2.9961443e-06f, 3.1908506e-06f, 3.3982101e-06f, 3.6190449e-06f, 3.8542308e-06f, 4.1047004e-06f, 4.3714470e-06f, 4.6555282e-06f, 4.9580707e-06f, 5.2802740e-06f, 5.6234160e-06f, 5.9888572e-06f, 6.3780469e-06f, 6.7925283e-06f, 7.2339451e-06f, 7.7040476e-06f, 8.2047000e-06f, 8.7378876e-06f, 9.3057248e-06f, 9.9104632e-06f, 1.0554501e-05f, 1.1240392e-05f, 1.1970856e-05f, 1.2748789e-05f, 1.3577278e-05f, 1.4459606e-05f, 1.5399272e-05f, 1.6400004e-05f, 1.7465768e-05f, 1.8600792e-05f, 1.9809576e-05f, 2.1096914e-05f, 2.2467911e-05f, 2.3928002e-05f, 2.5482978e-05f, 2.7139006e-05f, 2.8902651e-05f, 3.0780908e-05f, 3.2781225e-05f, 3.4911534e-05f, 3.7180282e-05f, 3.9596466e-05f, 4.2169667e-05f, 4.4910090e-05f, 4.7828601e-05f, 5.0936773e-05f, 5.4246931e-05f, 5.7772202e-05f, 6.1526565e-05f, 6.5524908e-05f, 6.9783085e-05f, 7.4317983e-05f, 7.9147585e-05f, 8.4291040e-05f, 8.9768747e-05f, 9.5602426e-05f, 0.00010181521f, 0.00010843174f, 0.00011547824f, 0.00012298267f, 0.00013097477f, 0.00013948625f, 0.00014855085f, 0.00015820453f, 0.00016848555f, 0.00017943469f, 0.00019109536f, 0.00020351382f, 0.00021673929f, 0.00023082423f, 0.00024582449f, 0.00026179955f, 0.00027881276f, 0.00029693158f, 0.00031622787f, 0.00033677814f, 0.00035866388f, 0.00038197188f, 0.00040679456f, 0.00043323036f, 0.00046138411f, 0.00049136745f, 0.00052329927f, 0.00055730621f, 0.00059352311f, 0.00063209358f, 0.00067317058f, 0.00071691700f, 0.00076350630f, 0.00081312324f, 0.00086596457f, 0.00092223983f, 0.00098217216f, 0.0010459992f, 0.0011139742f, 0.0011863665f, 0.0012634633f, 0.0013455702f, 0.0014330129f, 0.0015261382f, 0.0016253153f, 0.0017309374f, 0.0018434235f, 0.0019632195f, 0.0020908006f, 0.0022266726f, 0.0023713743f, 0.0025254795f, 0.0026895994f, 0.0028643847f, 0.0030505286f, 0.0032487691f, 0.0034598925f, 0.0036847358f, 0.0039241906f, 0.0041792066f, 0.0044507950f, 0.0047400328f, 0.0050480668f, 0.0053761186f, 0.0057254891f, 0.0060975636f, 0.0064938176f, 0.0069158225f, 0.0073652516f, 0.0078438871f, 0.0083536271f, 0.0088964928f, 0.009474637f, 0.010090352f, 0.010746080f, 0.011444421f, 0.012188144f, 0.012980198f, 0.013823725f, 0.014722068f, 0.015678791f, 0.016697687f, 0.017782797f, 0.018938423f, 0.020169149f, 0.021479854f, 0.022875735f, 0.024362330f, 0.025945531f, 0.027631618f, 0.029427276f, 0.031339626f, 0.033376252f, 0.035545228f, 0.037855157f, 0.040315199f, 0.042935108f, 0.045725273f, 0.048696758f, 0.051861348f, 0.055231591f, 0.058820850f, 0.062643361f, 0.066714279f, 0.071049749f, 0.075666962f, 0.080584227f, 0.085821044f, 0.091398179f, 0.097337747f, 0.10366330f, 0.11039993f, 0.11757434f, 0.12521498f, 0.13335215f, 0.14201813f, 0.15124727f, 0.16107617f, 0.17154380f, 0.18269168f, 0.19456402f, 0.20720788f, 0.22067342f, 0.23501402f, 0.25028656f, 0.26655159f, 0.28387361f, 0.30232132f, 0.32196786f, 0.34289114f, 0.36517414f, 0.38890521f, 0.41417847f, 0.44109412f, 0.46975890f, 0.50028648f, 0.53279791f, 0.56742212f, 0.60429640f, 0.64356699f, 0.68538959f, 0.72993007f, 0.77736504f, 0.82788260f, 0.88168307f, 0.9389798f, 1.0f }; // @OPTIMIZE: if you want to replace this bresenham line-drawing routine, // note that you must produce bit-identical output to decode correctly; // this specific sequence of operations is specified in the spec (it's // drawing integer-quantized frequency-space lines that the encoder // expects to be exactly the same) // ... also, isn't the whole point of Bresenham's algorithm to NOT // have to divide in the setup? sigh. #ifndef STB_VORBIS_NO_DEFER_FLOOR #define LINE_OP(a,b) a *= b #else #define LINE_OP(a,b) a = b #endif #ifdef STB_VORBIS_DIVIDE_TABLE #define DIVTAB_NUMER 32 #define DIVTAB_DENOM 64 int8 integer_divide_table[DIVTAB_NUMER][DIVTAB_DENOM]; // 2KB #endif static __forceinline void draw_line(float *output, int x0, int y0, int x1, int y1, int n) { int dy = y1 - y0; int adx = x1 - x0; int ady = abs(dy); int base; int x=x0,y=y0; int err = 0; int sy; #ifdef STB_VORBIS_DIVIDE_TABLE if (adx < DIVTAB_DENOM && ady < DIVTAB_NUMER) { if (dy < 0) { base = -integer_divide_table[ady][adx]; sy = base-1; } else { base = integer_divide_table[ady][adx]; sy = base+1; } } else { base = dy / adx; if (dy < 0) sy = base - 1; else sy = base+1; } #else base = dy / adx; if (dy < 0) sy = base - 1; else sy = base+1; #endif ady -= abs(base) * adx; if (x1 > n) x1 = n; if (x < x1) { LINE_OP(output[x], inverse_db_table[y&255]); for (++x; x < x1; ++x) { err += ady; if (err >= adx) { err -= adx; y += sy; } else y += base; LINE_OP(output[x], inverse_db_table[y&255]); } } } static int residue_decode(vorb *f, Codebook *book, float *target, int offset, int n, int rtype) { int k; if (rtype == 0) { int step = n / book->dimensions; for (k=0; k < step; ++k) if (!codebook_decode_step(f, book, target+offset+k, n-offset-k, step)) return FALSE; } else { for (k=0; k < n; ) { if (!codebook_decode(f, book, target+offset, n-k)) return FALSE; k += book->dimensions; offset += book->dimensions; } } return TRUE; } // n is 1/2 of the blocksize -- // specification: "Correct per-vector decode length is [n]/2" static void decode_residue(vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8 *do_not_decode) { int i,j,pass; Residue *r = f->residue_config + rn; int rtype = f->residue_types[rn]; int c = r->classbook; int classwords = f->codebooks[c].dimensions; unsigned int actual_size = rtype == 2 ? n*2 : n; unsigned int limit_r_begin = (r->begin < actual_size ? r->begin : actual_size); unsigned int limit_r_end = (r->end < actual_size ? r->end : actual_size); int n_read = limit_r_end - limit_r_begin; int part_read = n_read / r->part_size; int temp_alloc_point = temp_alloc_save(f); #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE uint8 ***part_classdata = (uint8 ***) temp_block_array(f,f->channels, part_read * sizeof(**part_classdata)); #else int **classifications = (int **) temp_block_array(f,f->channels, part_read * sizeof(**classifications)); #endif CHECK(f); for (i=0; i < ch; ++i) if (!do_not_decode[i]) memset(residue_buffers[i], 0, sizeof(float) * n); if (rtype == 2 && ch != 1) { for (j=0; j < ch; ++j) if (!do_not_decode[j]) break; if (j == ch) goto done; for (pass=0; pass < 8; ++pass) { int pcount = 0, class_set = 0; if (ch == 2) { while (pcount < part_read) { int z = r->begin + pcount*r->part_size; int c_inter = (z & 1), p_inter = z>>1; if (pass == 0) { Codebook *c = f->codebooks+r->classbook; int q; DECODE(q,f,c); if (q == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[0][class_set] = r->classdata[q]; #else for (i=classwords-1; i >= 0; --i) { classifications[0][i+pcount] = q % r->classifications; q /= r->classifications; } #endif } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { int z = r->begin + pcount*r->part_size; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[0][class_set][i]; #else int c = classifications[0][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { Codebook *book = f->codebooks + b; #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; #else // saves 1% if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; #endif } else { z += r->part_size; c_inter = z & 1; p_inter = z >> 1; } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } else if (ch > 2) { while (pcount < part_read) { int z = r->begin + pcount*r->part_size; int c_inter = z % ch, p_inter = z/ch; if (pass == 0) { Codebook *c = f->codebooks+r->classbook; int q; DECODE(q,f,c); if (q == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[0][class_set] = r->classdata[q]; #else for (i=classwords-1; i >= 0; --i) { classifications[0][i+pcount] = q % r->classifications; q /= r->classifications; } #endif } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { int z = r->begin + pcount*r->part_size; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[0][class_set][i]; #else int c = classifications[0][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { Codebook *book = f->codebooks + b; if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; } else { z += r->part_size; c_inter = z % ch; p_inter = z / ch; } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } } goto done; } CHECK(f); for (pass=0; pass < 8; ++pass) { int pcount = 0, class_set=0; while (pcount < part_read) { if (pass == 0) { for (j=0; j < ch; ++j) { if (!do_not_decode[j]) { Codebook *c = f->codebooks+r->classbook; int temp; DECODE(temp,f,c); if (temp == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[j][class_set] = r->classdata[temp]; #else for (i=classwords-1; i >= 0; --i) { classifications[j][i+pcount] = temp % r->classifications; temp /= r->classifications; } #endif } } } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { for (j=0; j < ch; ++j) { if (!do_not_decode[j]) { #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[j][class_set][i]; #else int c = classifications[j][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { float *target = residue_buffers[j]; int offset = r->begin + pcount * r->part_size; int n = r->part_size; Codebook *book = f->codebooks + b; if (!residue_decode(f, book, target, offset, n, rtype)) goto done; } } } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } done: CHECK(f); #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE temp_free(f,part_classdata); #else temp_free(f,classifications); #endif temp_alloc_restore(f,temp_alloc_point); } #if 0 // slow way for debugging void inverse_mdct_slow(float *buffer, int n) { int i,j; int n2 = n >> 1; float *x = (float *) malloc(sizeof(*x) * n2); memcpy(x, buffer, sizeof(*x) * n2); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n2; ++j) // formula from paper: //acc += n/4.0f * x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); // formula from wikipedia //acc += 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); // these are equivalent, except the formula from the paper inverts the multiplier! // however, what actually works is NO MULTIPLIER!?! //acc += 64 * 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); acc += x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); buffer[i] = acc; } free(x); } #elif 0 // same as above, but just barely able to run in real time on modern machines void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) { float mcos[16384]; int i,j; int n2 = n >> 1, nmask = (n << 2) -1; float *x = (float *) malloc(sizeof(*x) * n2); memcpy(x, buffer, sizeof(*x) * n2); for (i=0; i < 4*n; ++i) mcos[i] = (float) cos(M_PI / 2 * i / n); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n2; ++j) acc += x[j] * mcos[(2 * i + 1 + n2)*(2*j+1) & nmask]; buffer[i] = acc; } free(x); } #elif 0 // transform to use a slow dct-iv; this is STILL basically trivial, // but only requires half as many ops void dct_iv_slow(float *buffer, int n) { float mcos[16384]; float x[2048]; int i,j; int n2 = n >> 1, nmask = (n << 3) - 1; memcpy(x, buffer, sizeof(*x) * n); for (i=0; i < 8*n; ++i) mcos[i] = (float) cos(M_PI / 4 * i / n); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n; ++j) acc += x[j] * mcos[((2 * i + 1)*(2*j+1)) & nmask]; buffer[i] = acc; } } void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) { int i, n4 = n >> 2, n2 = n >> 1, n3_4 = n - n4; float temp[4096]; memcpy(temp, buffer, n2 * sizeof(float)); dct_iv_slow(temp, n2); // returns -c'-d, a-b' for (i=0; i < n4 ; ++i) buffer[i] = temp[i+n4]; // a-b' for ( ; i < n3_4; ++i) buffer[i] = -temp[n3_4 - i - 1]; // b-a', c+d' for ( ; i < n ; ++i) buffer[i] = -temp[i - n3_4]; // c'+d } #endif #ifndef LIBVORBIS_MDCT #define LIBVORBIS_MDCT 0 #endif #if LIBVORBIS_MDCT // directly call the vorbis MDCT using an interface documented // by Jeff Roberts... useful for performance comparison typedef struct { int n; int log2n; float *trig; int *bitrev; float scale; } mdct_lookup; extern void mdct_init(mdct_lookup *lookup, int n); extern void mdct_clear(mdct_lookup *l); extern void mdct_backward(mdct_lookup *init, float *in, float *out); mdct_lookup M1,M2; void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) { mdct_lookup *M; if (M1.n == n) M = &M1; else if (M2.n == n) M = &M2; else if (M1.n == 0) { mdct_init(&M1, n); M = &M1; } else { if (M2.n) __asm int 3; mdct_init(&M2, n); M = &M2; } mdct_backward(M, buffer, buffer); } #endif // the following were split out into separate functions while optimizing; // they could be pushed back up but eh. __forceinline showed no change; // they're probably already being inlined. static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A) { float *ee0 = e + i_off; float *ee2 = ee0 + k_off; int i; assert((n & 3) == 0); for (i=(n>>2); i > 0; --i) { float k00_20, k01_21; k00_20 = ee0[ 0] - ee2[ 0]; k01_21 = ee0[-1] - ee2[-1]; ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0]; ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1]; ee2[ 0] = k00_20 * A[0] - k01_21 * A[1]; ee2[-1] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-2] - ee2[-2]; k01_21 = ee0[-3] - ee2[-3]; ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2]; ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3]; ee2[-2] = k00_20 * A[0] - k01_21 * A[1]; ee2[-3] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-4] - ee2[-4]; k01_21 = ee0[-5] - ee2[-5]; ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4]; ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5]; ee2[-4] = k00_20 * A[0] - k01_21 * A[1]; ee2[-5] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-6] - ee2[-6]; k01_21 = ee0[-7] - ee2[-7]; ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6]; ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7]; ee2[-6] = k00_20 * A[0] - k01_21 * A[1]; ee2[-7] = k01_21 * A[0] + k00_20 * A[1]; A += 8; ee0 -= 8; ee2 -= 8; } } static void imdct_step3_inner_r_loop(int lim, float *e, int d0, int k_off, float *A, int k1) { int i; float k00_20, k01_21; float *e0 = e + d0; float *e2 = e0 + k_off; for (i=lim >> 2; i > 0; --i) { k00_20 = e0[-0] - e2[-0]; k01_21 = e0[-1] - e2[-1]; e0[-0] += e2[-0];//e0[-0] = e0[-0] + e2[-0]; e0[-1] += e2[-1];//e0[-1] = e0[-1] + e2[-1]; e2[-0] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-1] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-2] - e2[-2]; k01_21 = e0[-3] - e2[-3]; e0[-2] += e2[-2];//e0[-2] = e0[-2] + e2[-2]; e0[-3] += e2[-3];//e0[-3] = e0[-3] + e2[-3]; e2[-2] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-3] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-4] - e2[-4]; k01_21 = e0[-5] - e2[-5]; e0[-4] += e2[-4];//e0[-4] = e0[-4] + e2[-4]; e0[-5] += e2[-5];//e0[-5] = e0[-5] + e2[-5]; e2[-4] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-5] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-6] - e2[-6]; k01_21 = e0[-7] - e2[-7]; e0[-6] += e2[-6];//e0[-6] = e0[-6] + e2[-6]; e0[-7] += e2[-7];//e0[-7] = e0[-7] + e2[-7]; e2[-6] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-7] = (k01_21)*A[0] + (k00_20) * A[1]; e0 -= 8; e2 -= 8; A += k1; } } static void imdct_step3_inner_s_loop(int n, float *e, int i_off, int k_off, float *A, int a_off, int k0) { int i; float A0 = A[0]; float A1 = A[0+1]; float A2 = A[0+a_off]; float A3 = A[0+a_off+1]; float A4 = A[0+a_off*2+0]; float A5 = A[0+a_off*2+1]; float A6 = A[0+a_off*3+0]; float A7 = A[0+a_off*3+1]; float k00,k11; float *ee0 = e +i_off; float *ee2 = ee0+k_off; for (i=n; i > 0; --i) { k00 = ee0[ 0] - ee2[ 0]; k11 = ee0[-1] - ee2[-1]; ee0[ 0] = ee0[ 0] + ee2[ 0]; ee0[-1] = ee0[-1] + ee2[-1]; ee2[ 0] = (k00) * A0 - (k11) * A1; ee2[-1] = (k11) * A0 + (k00) * A1; k00 = ee0[-2] - ee2[-2]; k11 = ee0[-3] - ee2[-3]; ee0[-2] = ee0[-2] + ee2[-2]; ee0[-3] = ee0[-3] + ee2[-3]; ee2[-2] = (k00) * A2 - (k11) * A3; ee2[-3] = (k11) * A2 + (k00) * A3; k00 = ee0[-4] - ee2[-4]; k11 = ee0[-5] - ee2[-5]; ee0[-4] = ee0[-4] + ee2[-4]; ee0[-5] = ee0[-5] + ee2[-5]; ee2[-4] = (k00) * A4 - (k11) * A5; ee2[-5] = (k11) * A4 + (k00) * A5; k00 = ee0[-6] - ee2[-6]; k11 = ee0[-7] - ee2[-7]; ee0[-6] = ee0[-6] + ee2[-6]; ee0[-7] = ee0[-7] + ee2[-7]; ee2[-6] = (k00) * A6 - (k11) * A7; ee2[-7] = (k11) * A6 + (k00) * A7; ee0 -= k0; ee2 -= k0; } } static __forceinline void iter_54(float *z) { float k00,k11,k22,k33; float y0,y1,y2,y3; k00 = z[ 0] - z[-4]; y0 = z[ 0] + z[-4]; y2 = z[-2] + z[-6]; k22 = z[-2] - z[-6]; z[-0] = y0 + y2; // z0 + z4 + z2 + z6 z[-2] = y0 - y2; // z0 + z4 - z2 - z6 // done with y0,y2 k33 = z[-3] - z[-7]; z[-4] = k00 + k33; // z0 - z4 + z3 - z7 z[-6] = k00 - k33; // z0 - z4 - z3 + z7 // done with k33 k11 = z[-1] - z[-5]; y1 = z[-1] + z[-5]; y3 = z[-3] + z[-7]; z[-1] = y1 + y3; // z1 + z5 + z3 + z7 z[-3] = y1 - y3; // z1 + z5 - z3 - z7 z[-5] = k11 - k22; // z1 - z5 + z2 - z6 z[-7] = k11 + k22; // z1 - z5 - z2 + z6 } static void imdct_step3_inner_s_loop_ld654(int n, float *e, int i_off, float *A, int base_n) { int a_off = base_n >> 3; float A2 = A[0+a_off]; float *z = e + i_off; float *base = z - 16 * n; while (z > base) { float k00,k11; float l00,l11; k00 = z[-0] - z[ -8]; k11 = z[-1] - z[ -9]; l00 = z[-2] - z[-10]; l11 = z[-3] - z[-11]; z[ -0] = z[-0] + z[ -8]; z[ -1] = z[-1] + z[ -9]; z[ -2] = z[-2] + z[-10]; z[ -3] = z[-3] + z[-11]; z[ -8] = k00; z[ -9] = k11; z[-10] = (l00+l11) * A2; z[-11] = (l11-l00) * A2; k00 = z[ -4] - z[-12]; k11 = z[ -5] - z[-13]; l00 = z[ -6] - z[-14]; l11 = z[ -7] - z[-15]; z[ -4] = z[ -4] + z[-12]; z[ -5] = z[ -5] + z[-13]; z[ -6] = z[ -6] + z[-14]; z[ -7] = z[ -7] + z[-15]; z[-12] = k11; z[-13] = -k00; z[-14] = (l11-l00) * A2; z[-15] = (l00+l11) * -A2; iter_54(z); iter_54(z-8); z -= 16; } } static void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) { int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; int ld; // @OPTIMIZE: reduce register pressure by using fewer variables? int save_point = temp_alloc_save(f); float *buf2 = (float *) temp_alloc(f, n2 * sizeof(*buf2)); float *u=NULL,*v=NULL; // twiddle factors float *A = f->A[blocktype]; // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" // See notes about bugs in that paper in less-optimal implementation 'inverse_mdct_old' after this function. // kernel from paper // merged: // copy and reflect spectral data // step 0 // note that it turns out that the items added together during // this step are, in fact, being added to themselves (as reflected // by step 0). inexplicable inefficiency! this became obvious // once I combined the passes. // so there's a missing 'times 2' here (for adding X to itself). // this propagates through linearly to the end, where the numbers // are 1/2 too small, and need to be compensated for. { float *d,*e, *AA, *e_stop; d = &buf2[n2-2]; AA = A; e = &buffer[0]; e_stop = &buffer[n2]; while (e != e_stop) { d[1] = (e[0] * AA[0] - e[2]*AA[1]); d[0] = (e[0] * AA[1] + e[2]*AA[0]); d -= 2; AA += 2; e += 4; } e = &buffer[n2-3]; while (d >= buf2) { d[1] = (-e[2] * AA[0] - -e[0]*AA[1]); d[0] = (-e[2] * AA[1] + -e[0]*AA[0]); d -= 2; AA += 2; e -= 4; } } // now we use symbolic names for these, so that we can // possibly swap their meaning as we change which operations // are in place u = buffer; v = buf2; // step 2 (paper output is w, now u) // this could be in place, but the data ends up in the wrong // place... _somebody_'s got to swap it, so this is nominated { float *AA = &A[n2-8]; float *d0,*d1, *e0, *e1; e0 = &v[n4]; e1 = &v[0]; d0 = &u[n4]; d1 = &u[0]; while (AA >= A) { float v40_20, v41_21; v41_21 = e0[1] - e1[1]; v40_20 = e0[0] - e1[0]; d0[1] = e0[1] + e1[1]; d0[0] = e0[0] + e1[0]; d1[1] = v41_21*AA[4] - v40_20*AA[5]; d1[0] = v40_20*AA[4] + v41_21*AA[5]; v41_21 = e0[3] - e1[3]; v40_20 = e0[2] - e1[2]; d0[3] = e0[3] + e1[3]; d0[2] = e0[2] + e1[2]; d1[3] = v41_21*AA[0] - v40_20*AA[1]; d1[2] = v40_20*AA[0] + v41_21*AA[1]; AA -= 8; d0 += 4; d1 += 4; e0 += 4; e1 += 4; } } // step 3 ld = ilog(n) - 1; // ilog is off-by-one from normal definitions // optimized step 3: // the original step3 loop can be nested r inside s or s inside r; // it's written originally as s inside r, but this is dumb when r // iterates many times, and s few. So I have two copies of it and // switch between them halfway. // this is iteration 0 of step 3 imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*0, -(n >> 3), A); imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*1, -(n >> 3), A); // this is iteration 1 of step 3 imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*0, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*1, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*2, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*3, -(n >> 4), A, 16); l=2; for (; l < (ld-3)>>1; ++l) { int k0 = n >> (l+2), k0_2 = k0>>1; int lim = 1 << (l+1); int i; for (i=0; i < lim; ++i) imdct_step3_inner_r_loop(n >> (l+4), u, n2-1 - k0*i, -k0_2, A, 1 << (l+3)); } for (; l < ld-6; ++l) { int k0 = n >> (l+2), k1 = 1 << (l+3), k0_2 = k0>>1; int rlim = n >> (l+6), r; int lim = 1 << (l+1); int i_off; float *A0 = A; i_off = n2-1; for (r=rlim; r > 0; --r) { imdct_step3_inner_s_loop(lim, u, i_off, -k0_2, A0, k1, k0); A0 += k1*4; i_off -= 8; } } // iterations with count: // ld-6,-5,-4 all interleaved together // the big win comes from getting rid of needless flops // due to the constants on pass 5 & 4 being all 1 and 0; // combining them to be simultaneous to improve cache made little difference imdct_step3_inner_s_loop_ld654(n >> 5, u, n2-1, A, n); // output is u // step 4, 5, and 6 // cannot be in-place because of step 5 { uint16 *bitrev = f->bit_reverse[blocktype]; // weirdly, I'd have thought reading sequentially and writing // erratically would have been better than vice-versa, but in // fact that's not what my testing showed. (That is, with // j = bitreverse(i), do you read i and write j, or read j and write i.) float *d0 = &v[n4-4]; float *d1 = &v[n2-4]; while (d0 >= v) { int k4; k4 = bitrev[0]; d1[3] = u[k4+0]; d1[2] = u[k4+1]; d0[3] = u[k4+2]; d0[2] = u[k4+3]; k4 = bitrev[1]; d1[1] = u[k4+0]; d1[0] = u[k4+1]; d0[1] = u[k4+2]; d0[0] = u[k4+3]; d0 -= 4; d1 -= 4; bitrev += 2; } } // (paper output is u, now v) // data must be in buf2 assert(v == buf2); // step 7 (paper output is v, now v) // this is now in place { float *C = f->C[blocktype]; float *d, *e; d = v; e = v + n2 - 4; while (d < e) { float a02,a11,b0,b1,b2,b3; a02 = d[0] - e[2]; a11 = d[1] + e[3]; b0 = C[1]*a02 + C[0]*a11; b1 = C[1]*a11 - C[0]*a02; b2 = d[0] + e[ 2]; b3 = d[1] - e[ 3]; d[0] = b2 + b0; d[1] = b3 + b1; e[2] = b2 - b0; e[3] = b1 - b3; a02 = d[2] - e[0]; a11 = d[3] + e[1]; b0 = C[3]*a02 + C[2]*a11; b1 = C[3]*a11 - C[2]*a02; b2 = d[2] + e[ 0]; b3 = d[3] - e[ 1]; d[2] = b2 + b0; d[3] = b3 + b1; e[0] = b2 - b0; e[1] = b1 - b3; C += 4; d += 4; e -= 4; } } // data must be in buf2 // step 8+decode (paper output is X, now buffer) // this generates pairs of data a la 8 and pushes them directly through // the decode kernel (pushing rather than pulling) to avoid having // to make another pass later // this cannot POSSIBLY be in place, so we refer to the buffers directly { float *d0,*d1,*d2,*d3; float *B = f->B[blocktype] + n2 - 8; float *e = buf2 + n2 - 8; d0 = &buffer[0]; d1 = &buffer[n2-4]; d2 = &buffer[n2]; d3 = &buffer[n-4]; while (e >= v) { float p0,p1,p2,p3; p3 = e[6]*B[7] - e[7]*B[6]; p2 = -e[6]*B[6] - e[7]*B[7]; d0[0] = p3; d1[3] = - p3; d2[0] = p2; d3[3] = p2; p1 = e[4]*B[5] - e[5]*B[4]; p0 = -e[4]*B[4] - e[5]*B[5]; d0[1] = p1; d1[2] = - p1; d2[1] = p0; d3[2] = p0; p3 = e[2]*B[3] - e[3]*B[2]; p2 = -e[2]*B[2] - e[3]*B[3]; d0[2] = p3; d1[1] = - p3; d2[2] = p2; d3[1] = p2; p1 = e[0]*B[1] - e[1]*B[0]; p0 = -e[0]*B[0] - e[1]*B[1]; d0[3] = p1; d1[0] = - p1; d2[3] = p0; d3[0] = p0; B -= 8; e -= 8; d0 += 4; d2 += 4; d1 -= 4; d3 -= 4; } } temp_free(f,buf2); temp_alloc_restore(f,save_point); } #if 0 // this is the original version of the above code, if you want to optimize it from scratch void inverse_mdct_naive(float *buffer, int n) { float s; float A[1 << 12], B[1 << 12], C[1 << 11]; int i,k,k2,k4, n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; int n3_4 = n - n4, ld; // how can they claim this only uses N words?! // oh, because they're only used sparsely, whoops float u[1 << 13], X[1 << 13], v[1 << 13], w[1 << 13]; // set up twiddle factors for (k=k2=0; k < n4; ++k,k2+=2) { A[k2 ] = (float) cos(4*k*M_PI/n); A[k2+1] = (float) -sin(4*k*M_PI/n); B[k2 ] = (float) cos((k2+1)*M_PI/n/2); B[k2+1] = (float) sin((k2+1)*M_PI/n/2); } for (k=k2=0; k < n8; ++k,k2+=2) { C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); } // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" // Note there are bugs in that pseudocode, presumably due to them attempting // to rename the arrays nicely rather than representing the way their actual // implementation bounces buffers back and forth. As a result, even in the // "some formulars corrected" version, a direct implementation fails. These // are noted below as "paper bug". // copy and reflect spectral data for (k=0; k < n2; ++k) u[k] = buffer[k]; for ( ; k < n ; ++k) u[k] = -buffer[n - k - 1]; // kernel from paper // step 1 for (k=k2=k4=0; k < n4; k+=1, k2+=2, k4+=4) { v[n-k4-1] = (u[k4] - u[n-k4-1]) * A[k2] - (u[k4+2] - u[n-k4-3])*A[k2+1]; v[n-k4-3] = (u[k4] - u[n-k4-1]) * A[k2+1] + (u[k4+2] - u[n-k4-3])*A[k2]; } // step 2 for (k=k4=0; k < n8; k+=1, k4+=4) { w[n2+3+k4] = v[n2+3+k4] + v[k4+3]; w[n2+1+k4] = v[n2+1+k4] + v[k4+1]; w[k4+3] = (v[n2+3+k4] - v[k4+3])*A[n2-4-k4] - (v[n2+1+k4]-v[k4+1])*A[n2-3-k4]; w[k4+1] = (v[n2+1+k4] - v[k4+1])*A[n2-4-k4] + (v[n2+3+k4]-v[k4+3])*A[n2-3-k4]; } // step 3 ld = ilog(n) - 1; // ilog is off-by-one from normal definitions for (l=0; l < ld-3; ++l) { int k0 = n >> (l+2), k1 = 1 << (l+3); int rlim = n >> (l+4), r4, r; int s2lim = 1 << (l+2), s2; for (r=r4=0; r < rlim; r4+=4,++r) { for (s2=0; s2 < s2lim; s2+=2) { u[n-1-k0*s2-r4] = w[n-1-k0*s2-r4] + w[n-1-k0*(s2+1)-r4]; u[n-3-k0*s2-r4] = w[n-3-k0*s2-r4] + w[n-3-k0*(s2+1)-r4]; u[n-1-k0*(s2+1)-r4] = (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1] - (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1+1]; u[n-3-k0*(s2+1)-r4] = (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1] + (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1+1]; } } if (l+1 < ld-3) { // paper bug: ping-ponging of u&w here is omitted memcpy(w, u, sizeof(u)); } } // step 4 for (i=0; i < n8; ++i) { int j = bit_reverse(i) >> (32-ld+3); assert(j < n8); if (i == j) { // paper bug: original code probably swapped in place; if copying, // need to directly copy in this case int i8 = i << 3; v[i8+1] = u[i8+1]; v[i8+3] = u[i8+3]; v[i8+5] = u[i8+5]; v[i8+7] = u[i8+7]; } else if (i < j) { int i8 = i << 3, j8 = j << 3; v[j8+1] = u[i8+1], v[i8+1] = u[j8 + 1]; v[j8+3] = u[i8+3], v[i8+3] = u[j8 + 3]; v[j8+5] = u[i8+5], v[i8+5] = u[j8 + 5]; v[j8+7] = u[i8+7], v[i8+7] = u[j8 + 7]; } } // step 5 for (k=0; k < n2; ++k) { w[k] = v[k*2+1]; } // step 6 for (k=k2=k4=0; k < n8; ++k, k2 += 2, k4 += 4) { u[n-1-k2] = w[k4]; u[n-2-k2] = w[k4+1]; u[n3_4 - 1 - k2] = w[k4+2]; u[n3_4 - 2 - k2] = w[k4+3]; } // step 7 for (k=k2=0; k < n8; ++k, k2 += 2) { v[n2 + k2 ] = ( u[n2 + k2] + u[n-2-k2] + C[k2+1]*(u[n2+k2]-u[n-2-k2]) + C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; v[n-2 - k2] = ( u[n2 + k2] + u[n-2-k2] - C[k2+1]*(u[n2+k2]-u[n-2-k2]) - C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; v[n2+1+ k2] = ( u[n2+1+k2] - u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; v[n-1 - k2] = (-u[n2+1+k2] + u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; } // step 8 for (k=k2=0; k < n4; ++k,k2 += 2) { X[k] = v[k2+n2]*B[k2 ] + v[k2+1+n2]*B[k2+1]; X[n2-1-k] = v[k2+n2]*B[k2+1] - v[k2+1+n2]*B[k2 ]; } // decode kernel to output // determined the following value experimentally // (by first figuring out what made inverse_mdct_slow work); then matching that here // (probably vorbis encoder premultiplies by n or n/2, to save it on the decoder?) s = 0.5; // theoretically would be n4 // [[[ note! the s value of 0.5 is compensated for by the B[] in the current code, // so it needs to use the "old" B values to behave correctly, or else // set s to 1.0 ]]] for (i=0; i < n4 ; ++i) buffer[i] = s * X[i+n4]; for ( ; i < n3_4; ++i) buffer[i] = -s * X[n3_4 - i - 1]; for ( ; i < n ; ++i) buffer[i] = -s * X[i - n3_4]; } #endif static float *get_window(vorb *f, int len) { len <<= 1; if (len == f->blocksize_0) return f->window[0]; if (len == f->blocksize_1) return f->window[1]; return NULL; } #ifndef STB_VORBIS_NO_DEFER_FLOOR typedef int16 YTYPE; #else typedef int YTYPE; #endif static int do_floor(vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag) { int n2 = n >> 1; int s = map->chan[i].mux, floor; floor = map->submap_floor[s]; if (f->floor_types[floor] == 0) { return error(f, VORBIS_invalid_stream); } else { Floor1 *g = &f->floor_config[floor].floor1; int j,q; int lx = 0, ly = finalY[0] * g->floor1_multiplier; for (q=1; q < g->values; ++q) { j = g->sorted_order[q]; #ifndef STB_VORBIS_NO_DEFER_FLOOR STBV_NOTUSED(step2_flag); if (finalY[j] >= 0) #else if (step2_flag[j]) #endif { int hy = finalY[j] * g->floor1_multiplier; int hx = g->Xlist[j]; if (lx != hx) draw_line(target, lx,ly, hx,hy, n2); CHECK(f); lx = hx, ly = hy; } } if (lx < n2) { // optimization of: draw_line(target, lx,ly, n,ly, n2); for (j=lx; j < n2; ++j) LINE_OP(target[j], inverse_db_table[ly]); CHECK(f); } } return TRUE; } // The meaning of "left" and "right" // // For a given frame: // we compute samples from 0..n // window_center is n/2 // we'll window and mix the samples from left_start to left_end with data from the previous frame // all of the samples from left_end to right_start can be output without mixing; however, // this interval is 0-length except when transitioning between short and long frames // all of the samples from right_start to right_end need to be mixed with the next frame, // which we don't have, so those get saved in a buffer // frame N's right_end-right_start, the number of samples to mix with the next frame, // has to be the same as frame N+1's left_end-left_start (which they are by // construction) static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) { Mode *m; int i, n, prev, next, window_center; f->channel_buffer_start = f->channel_buffer_end = 0; retry: if (f->eof) return FALSE; if (!maybe_start_packet(f)) return FALSE; // check packet type if (get_bits(f,1) != 0) { if (IS_PUSH_MODE(f)) return error(f,VORBIS_bad_packet_type); while (EOP != get8_packet(f)); goto retry; } if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); i = get_bits(f, ilog(f->mode_count-1)); if (i == EOP) return FALSE; if (i >= f->mode_count) return FALSE; *mode = i; m = f->mode_config + i; if (m->blockflag) { n = f->blocksize_1; prev = get_bits(f,1); next = get_bits(f,1); } else { prev = next = 0; n = f->blocksize_0; } // WINDOWING window_center = n >> 1; if (m->blockflag && !prev) { *p_left_start = (n - f->blocksize_0) >> 2; *p_left_end = (n + f->blocksize_0) >> 2; } else { *p_left_start = 0; *p_left_end = window_center; } if (m->blockflag && !next) { *p_right_start = (n*3 - f->blocksize_0) >> 2; *p_right_end = (n*3 + f->blocksize_0) >> 2; } else { *p_right_start = window_center; *p_right_end = n; } return TRUE; } static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left) { Mapping *map; int i,j,k,n,n2; int zero_channel[256]; int really_zero_channel[256]; // WINDOWING STBV_NOTUSED(left_end); n = f->blocksize[m->blockflag]; map = &f->mapping[m->mapping]; // FLOORS n2 = n >> 1; CHECK(f); for (i=0; i < f->channels; ++i) { int s = map->chan[i].mux, floor; zero_channel[i] = FALSE; floor = map->submap_floor[s]; if (f->floor_types[floor] == 0) { return error(f, VORBIS_invalid_stream); } else { Floor1 *g = &f->floor_config[floor].floor1; if (get_bits(f, 1)) { short *finalY; uint8 step2_flag[256]; static int range_list[4] = { 256, 128, 86, 64 }; int range = range_list[g->floor1_multiplier-1]; int offset = 2; finalY = f->finalY[i]; finalY[0] = get_bits(f, ilog(range)-1); finalY[1] = get_bits(f, ilog(range)-1); for (j=0; j < g->partitions; ++j) { int pclass = g->partition_class_list[j]; int cdim = g->class_dimensions[pclass]; int cbits = g->class_subclasses[pclass]; int csub = (1 << cbits)-1; int cval = 0; if (cbits) { Codebook *c = f->codebooks + g->class_masterbooks[pclass]; DECODE(cval,f,c); } for (k=0; k < cdim; ++k) { int book = g->subclass_books[pclass][cval & csub]; cval = cval >> cbits; if (book >= 0) { int temp; Codebook *c = f->codebooks + book; DECODE(temp,f,c); finalY[offset++] = temp; } else finalY[offset++] = 0; } } if (f->valid_bits == INVALID_BITS) goto error; // behavior according to spec step2_flag[0] = step2_flag[1] = 1; for (j=2; j < g->values; ++j) { int low, high, pred, highroom, lowroom, room, val; low = g->neighbors[j][0]; high = g->neighbors[j][1]; //neighbors(g->Xlist, j, &low, &high); pred = predict_point(g->Xlist[j], g->Xlist[low], g->Xlist[high], finalY[low], finalY[high]); val = finalY[j]; highroom = range - pred; lowroom = pred; if (highroom < lowroom) room = highroom * 2; else room = lowroom * 2; if (val) { step2_flag[low] = step2_flag[high] = 1; step2_flag[j] = 1; if (val >= room) if (highroom > lowroom) finalY[j] = val - lowroom + pred; else finalY[j] = pred - val + highroom - 1; else if (val & 1) finalY[j] = pred - ((val+1)>>1); else finalY[j] = pred + (val>>1); } else { step2_flag[j] = 0; finalY[j] = pred; } } #ifdef STB_VORBIS_NO_DEFER_FLOOR do_floor(f, map, i, n, f->floor_buffers[i], finalY, step2_flag); #else // defer final floor computation until _after_ residue for (j=0; j < g->values; ++j) { if (!step2_flag[j]) finalY[j] = -1; } #endif } else { error: zero_channel[i] = TRUE; } // So we just defer everything else to later // at this point we've decoded the floor into buffer } } CHECK(f); // at this point we've decoded all floors if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); // re-enable coupled channels if necessary memcpy(really_zero_channel, zero_channel, sizeof(really_zero_channel[0]) * f->channels); for (i=0; i < map->coupling_steps; ++i) if (!zero_channel[map->chan[i].magnitude] || !zero_channel[map->chan[i].angle]) { zero_channel[map->chan[i].magnitude] = zero_channel[map->chan[i].angle] = FALSE; } CHECK(f); // RESIDUE DECODE for (i=0; i < map->submaps; ++i) { float *residue_buffers[STB_VORBIS_MAX_CHANNELS]; int r; uint8 do_not_decode[256]; int ch = 0; for (j=0; j < f->channels; ++j) { if (map->chan[j].mux == i) { if (zero_channel[j]) { do_not_decode[ch] = TRUE; residue_buffers[ch] = NULL; } else { do_not_decode[ch] = FALSE; residue_buffers[ch] = f->channel_buffers[j]; } ++ch; } } r = map->submap_residue[i]; decode_residue(f, residue_buffers, ch, n2, r, do_not_decode); } if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); CHECK(f); // INVERSE COUPLING for (i = map->coupling_steps-1; i >= 0; --i) { int n2 = n >> 1; float *m = f->channel_buffers[map->chan[i].magnitude]; float *a = f->channel_buffers[map->chan[i].angle ]; for (j=0; j < n2; ++j) { float a2,m2; if (m[j] > 0) if (a[j] > 0) m2 = m[j], a2 = m[j] - a[j]; else a2 = m[j], m2 = m[j] + a[j]; else if (a[j] > 0) m2 = m[j], a2 = m[j] + a[j]; else a2 = m[j], m2 = m[j] - a[j]; m[j] = m2; a[j] = a2; } } CHECK(f); // finish decoding the floors #ifndef STB_VORBIS_NO_DEFER_FLOOR for (i=0; i < f->channels; ++i) { if (really_zero_channel[i]) { memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); } else { do_floor(f, map, i, n, f->channel_buffers[i], f->finalY[i], NULL); } } #else for (i=0; i < f->channels; ++i) { if (really_zero_channel[i]) { memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); } else { for (j=0; j < n2; ++j) f->channel_buffers[i][j] *= f->floor_buffers[i][j]; } } #endif // INVERSE MDCT CHECK(f); for (i=0; i < f->channels; ++i) inverse_mdct(f->channel_buffers[i], n, f, m->blockflag); CHECK(f); // this shouldn't be necessary, unless we exited on an error // and want to flush to get to the next packet flush_packet(f); if (f->first_decode) { // assume we start so first non-discarded sample is sample 0 // this isn't to spec, but spec would require us to read ahead // and decode the size of all current frames--could be done, // but presumably it's not a commonly used feature f->current_loc = 0u - n2; // start of first frame is positioned for discard (NB this is an intentional unsigned overflow/wrap-around) // we might have to discard samples "from" the next frame too, // if we're lapping a large block then a small at the start? f->discard_samples_deferred = n - right_end; f->current_loc_valid = TRUE; f->first_decode = FALSE; } else if (f->discard_samples_deferred) { if (f->discard_samples_deferred >= right_start - left_start) { f->discard_samples_deferred -= (right_start - left_start); left_start = right_start; *p_left = left_start; } else { left_start += f->discard_samples_deferred; *p_left = left_start; f->discard_samples_deferred = 0; } } else if (f->previous_length == 0 && f->current_loc_valid) { // we're recovering from a seek... that means we're going to discard // the samples from this packet even though we know our position from // the last page header, so we need to update the position based on // the discarded samples here // but wait, the code below is going to add this in itself even // on a discard, so we don't need to do it here... } // check if we have ogg information about the sample # for this packet if (f->last_seg_which == f->end_seg_with_known_loc) { // if we have a valid current loc, and this is final: if (f->current_loc_valid && (f->page_flag & PAGEFLAG_last_page)) { uint32 current_end = f->known_loc_for_packet; // then let's infer the size of the (probably) short final frame if (current_end < f->current_loc + (right_end-left_start)) { if (current_end < f->current_loc) { // negative truncation, that's impossible! *len = 0; } else { *len = current_end - f->current_loc; } *len += left_start; // this doesn't seem right, but has no ill effect on my test files if (*len > right_end) *len = right_end; // this should never happen f->current_loc += *len; return TRUE; } } // otherwise, just set our sample loc // guess that the ogg granule pos refers to the _middle_ of the // last frame? // set f->current_loc to the position of left_start f->current_loc = f->known_loc_for_packet - (n2-left_start); f->current_loc_valid = TRUE; } if (f->current_loc_valid) f->current_loc += (right_start - left_start); if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); *len = right_end; // ignore samples after the window goes to 0 CHECK(f); return TRUE; } static int vorbis_decode_packet(vorb *f, int *len, int *p_left, int *p_right) { int mode, left_end, right_end; if (!vorbis_decode_initial(f, p_left, &left_end, p_right, &right_end, &mode)) return 0; return vorbis_decode_packet_rest(f, len, f->mode_config + mode, *p_left, left_end, *p_right, right_end, p_left); } static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right) { int prev,i,j; // we use right&left (the start of the right- and left-window sin()-regions) // to determine how much to return, rather than inferring from the rules // (same result, clearer code); 'left' indicates where our sin() window // starts, therefore where the previous window's right edge starts, and // therefore where to start mixing from the previous buffer. 'right' // indicates where our sin() ending-window starts, therefore that's where // we start saving, and where our returned-data ends. // mixin from previous window if (f->previous_length) { int i,j, n = f->previous_length; float *w = get_window(f, n); if (w == NULL) return 0; for (i=0; i < f->channels; ++i) { for (j=0; j < n; ++j) f->channel_buffers[i][left+j] = f->channel_buffers[i][left+j]*w[ j] + f->previous_window[i][ j]*w[n-1-j]; } } prev = f->previous_length; // last half of this data becomes previous window f->previous_length = len - right; // @OPTIMIZE: could avoid this copy by double-buffering the // output (flipping previous_window with channel_buffers), but // then previous_window would have to be 2x as large, and // channel_buffers couldn't be temp mem (although they're NOT // currently temp mem, they could be (unless we want to level // performance by spreading out the computation)) for (i=0; i < f->channels; ++i) for (j=0; right+j < len; ++j) f->previous_window[i][j] = f->channel_buffers[i][right+j]; if (!prev) // there was no previous packet, so this data isn't valid... // this isn't entirely true, only the would-have-overlapped data // isn't valid, but this seems to be what the spec requires return 0; // truncate a short frame if (len < right) right = len; f->samples_output += right-left; return right - left; } static int vorbis_pump_first_frame(stb_vorbis *f) { int len, right, left, res; res = vorbis_decode_packet(f, &len, &left, &right); if (res) vorbis_finish_frame(f, len, left, right); return res; } #ifndef STB_VORBIS_NO_PUSHDATA_API static int is_whole_packet_present(stb_vorbis *f) { // make sure that we have the packet available before continuing... // this requires a full ogg parse, but we know we can fetch from f->stream // instead of coding this out explicitly, we could save the current read state, // read the next packet with get8() until end-of-packet, check f->eof, then // reset the state? but that would be slower, esp. since we'd have over 256 bytes // of state to restore (primarily the page segment table) int s = f->next_seg, first = TRUE; uint8 *p = f->stream; if (s != -1) { // if we're not starting the packet with a 'continue on next page' flag for (; s < f->segment_count; ++s) { p += f->segments[s]; if (f->segments[s] < 255) // stop at first short segment break; } // either this continues, or it ends it... if (s == f->segment_count) s = -1; // set 'crosses page' flag if (p > f->stream_end) return error(f, VORBIS_need_more_data); first = FALSE; } for (; s == -1;) { uint8 *q; int n; // check that we have the page header ready if (p + 26 >= f->stream_end) return error(f, VORBIS_need_more_data); // validate the page if (memcmp(p, ogg_page_header, 4)) return error(f, VORBIS_invalid_stream); if (p[4] != 0) return error(f, VORBIS_invalid_stream); if (first) { // the first segment must NOT have 'continued_packet', later ones MUST if (f->previous_length) if ((p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); // if no previous length, we're resynching, so we can come in on a continued-packet, // which we'll just drop } else { if (!(p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); } n = p[26]; // segment counts q = p+27; // q points to segment table p = q + n; // advance past header // make sure we've read the segment table if (p > f->stream_end) return error(f, VORBIS_need_more_data); for (s=0; s < n; ++s) { p += q[s]; if (q[s] < 255) break; } if (s == n) s = -1; // set 'crosses page' flag if (p > f->stream_end) return error(f, VORBIS_need_more_data); first = FALSE; } return TRUE; } #endif // !STB_VORBIS_NO_PUSHDATA_API static int start_decoder(vorb *f) { uint8 header[6], x,y; int len,i,j,k, max_submaps = 0; int longest_floorlist=0; // first page, first packet f->first_decode = TRUE; if (!start_page(f)) return FALSE; // validate page flag if (!(f->page_flag & PAGEFLAG_first_page)) return error(f, VORBIS_invalid_first_page); if (f->page_flag & PAGEFLAG_last_page) return error(f, VORBIS_invalid_first_page); if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_invalid_first_page); // check for expected packet length if (f->segment_count != 1) return error(f, VORBIS_invalid_first_page); if (f->segments[0] != 30) { // check for the Ogg skeleton fishead identifying header to refine our error if (f->segments[0] == 64 && getn(f, header, 6) && header[0] == 'f' && header[1] == 'i' && header[2] == 's' && header[3] == 'h' && header[4] == 'e' && header[5] == 'a' && get8(f) == 'd' && get8(f) == '\0') return error(f, VORBIS_ogg_skeleton_not_supported); else return error(f, VORBIS_invalid_first_page); } // read packet // check packet header if (get8(f) != VORBIS_packet_id) return error(f, VORBIS_invalid_first_page); if (!getn(f, header, 6)) return error(f, VORBIS_unexpected_eof); if (!vorbis_validate(header)) return error(f, VORBIS_invalid_first_page); // vorbis_version if (get32(f) != 0) return error(f, VORBIS_invalid_first_page); f->channels = get8(f); if (!f->channels) return error(f, VORBIS_invalid_first_page); if (f->channels > STB_VORBIS_MAX_CHANNELS) return error(f, VORBIS_too_many_channels); f->sample_rate = get32(f); if (!f->sample_rate) return error(f, VORBIS_invalid_first_page); get32(f); // bitrate_maximum get32(f); // bitrate_nominal get32(f); // bitrate_minimum x = get8(f); { int log0,log1; log0 = x & 15; log1 = x >> 4; f->blocksize_0 = 1 << log0; f->blocksize_1 = 1 << log1; if (log0 < 6 || log0 > 13) return error(f, VORBIS_invalid_setup); if (log1 < 6 || log1 > 13) return error(f, VORBIS_invalid_setup); if (log0 > log1) return error(f, VORBIS_invalid_setup); } // framing_flag x = get8(f); if (!(x & 1)) return error(f, VORBIS_invalid_first_page); // second packet! if (!start_page(f)) return FALSE; if (!start_packet(f)) return FALSE; if (!next_segment(f)) return FALSE; if (get8_packet(f) != VORBIS_packet_comment) return error(f, VORBIS_invalid_setup); for (i=0; i < 6; ++i) header[i] = get8_packet(f); if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup); //file vendor len = get32_packet(f); f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1)); if (f->vendor == NULL) return error(f, VORBIS_outofmem); for(i=0; i < len; ++i) { f->vendor[i] = get8_packet(f); } f->vendor[len] = (char)'\0'; //user comments f->comment_list_length = get32_packet(f); f->comment_list = NULL; if (f->comment_list_length > 0) { f->comment_list = (char**) setup_malloc(f, sizeof(char*) * (f->comment_list_length)); if (f->comment_list == NULL) return error(f, VORBIS_outofmem); } for(i=0; i < f->comment_list_length; ++i) { len = get32_packet(f); f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1)); if (f->comment_list[i] == NULL) return error(f, VORBIS_outofmem); for(j=0; j < len; ++j) { f->comment_list[i][j] = get8_packet(f); } f->comment_list[i][len] = (char)'\0'; } // framing_flag x = get8_packet(f); if (!(x & 1)) return error(f, VORBIS_invalid_setup); skip(f, f->bytes_in_seg); f->bytes_in_seg = 0; do { len = next_segment(f); skip(f, len); f->bytes_in_seg = 0; } while (len); // third packet! if (!start_packet(f)) return FALSE; #ifndef STB_VORBIS_NO_PUSHDATA_API if (IS_PUSH_MODE(f)) { if (!is_whole_packet_present(f)) { // convert error in ogg header to write type if (f->error == VORBIS_invalid_stream) f->error = VORBIS_invalid_setup; return FALSE; } } #endif crc32_init(); // always init it, to avoid multithread race conditions if (get8_packet(f) != VORBIS_packet_setup) return error(f, VORBIS_invalid_setup); for (i=0; i < 6; ++i) header[i] = get8_packet(f); if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup); // codebooks f->codebook_count = get_bits(f,8) + 1; f->codebooks = (Codebook *) setup_malloc(f, sizeof(*f->codebooks) * f->codebook_count); if (f->codebooks == NULL) return error(f, VORBIS_outofmem); memset(f->codebooks, 0, sizeof(*f->codebooks) * f->codebook_count); for (i=0; i < f->codebook_count; ++i) { uint32 *values; int ordered, sorted_count; int total=0; uint8 *lengths; Codebook *c = f->codebooks+i; CHECK(f); x = get_bits(f, 8); if (x != 0x42) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); if (x != 0x43) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); if (x != 0x56) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); c->dimensions = (get_bits(f, 8)<<8) + x; x = get_bits(f, 8); y = get_bits(f, 8); c->entries = (get_bits(f, 8)<<16) + (y<<8) + x; ordered = get_bits(f,1); c->sparse = ordered ? 0 : get_bits(f,1); if (c->dimensions == 0 && c->entries != 0) return error(f, VORBIS_invalid_setup); if (c->sparse) lengths = (uint8 *) setup_temp_malloc(f, c->entries); else lengths = c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); if (!lengths) return error(f, VORBIS_outofmem); if (ordered) { int current_entry = 0; int current_length = get_bits(f,5) + 1; while (current_entry < c->entries) { int limit = c->entries - current_entry; int n = get_bits(f, ilog(limit)); if (current_length >= 32) return error(f, VORBIS_invalid_setup); if (current_entry + n > (int) c->entries) { return error(f, VORBIS_invalid_setup); } memset(lengths + current_entry, current_length, n); current_entry += n; ++current_length; } } else { for (j=0; j < c->entries; ++j) { int present = c->sparse ? get_bits(f,1) : 1; if (present) { lengths[j] = get_bits(f, 5) + 1; ++total; if (lengths[j] == 32) return error(f, VORBIS_invalid_setup); } else { lengths[j] = NO_CODE; } } } if (c->sparse && total >= c->entries >> 2) { // convert sparse items to non-sparse! if (c->entries > (int) f->setup_temp_memory_required) f->setup_temp_memory_required = c->entries; c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); if (c->codeword_lengths == NULL) return error(f, VORBIS_outofmem); memcpy(c->codeword_lengths, lengths, c->entries); setup_temp_free(f, lengths, c->entries); // note this is only safe if there have been no intervening temp mallocs! lengths = c->codeword_lengths; c->sparse = 0; } // compute the size of the sorted tables if (c->sparse) { sorted_count = total; } else { sorted_count = 0; #ifndef STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH for (j=0; j < c->entries; ++j) if (lengths[j] > STB_VORBIS_FAST_HUFFMAN_LENGTH && lengths[j] != NO_CODE) ++sorted_count; #endif } c->sorted_entries = sorted_count; values = NULL; CHECK(f); if (!c->sparse) { c->codewords = (uint32 *) setup_malloc(f, sizeof(c->codewords[0]) * c->entries); if (!c->codewords) return error(f, VORBIS_outofmem); } else { unsigned int size; if (c->sorted_entries) { c->codeword_lengths = (uint8 *) setup_malloc(f, c->sorted_entries); if (!c->codeword_lengths) return error(f, VORBIS_outofmem); c->codewords = (uint32 *) setup_temp_malloc(f, sizeof(*c->codewords) * c->sorted_entries); if (!c->codewords) return error(f, VORBIS_outofmem); values = (uint32 *) setup_temp_malloc(f, sizeof(*values) * c->sorted_entries); if (!values) return error(f, VORBIS_outofmem); } size = c->entries + (sizeof(*c->codewords) + sizeof(*values)) * c->sorted_entries; if (size > f->setup_temp_memory_required) f->setup_temp_memory_required = size; } if (!compute_codewords(c, lengths, c->entries, values)) { if (c->sparse) setup_temp_free(f, values, 0); return error(f, VORBIS_invalid_setup); } if (c->sorted_entries) { // allocate an extra slot for sentinels c->sorted_codewords = (uint32 *) setup_malloc(f, sizeof(*c->sorted_codewords) * (c->sorted_entries+1)); if (c->sorted_codewords == NULL) return error(f, VORBIS_outofmem); // allocate an extra slot at the front so that c->sorted_values[-1] is defined // so that we can catch that case without an extra if c->sorted_values = ( int *) setup_malloc(f, sizeof(*c->sorted_values ) * (c->sorted_entries+1)); if (c->sorted_values == NULL) return error(f, VORBIS_outofmem); ++c->sorted_values; c->sorted_values[-1] = -1; compute_sorted_huffman(c, lengths, values); } if (c->sparse) { setup_temp_free(f, values, sizeof(*values)*c->sorted_entries); setup_temp_free(f, c->codewords, sizeof(*c->codewords)*c->sorted_entries); setup_temp_free(f, lengths, c->entries); c->codewords = NULL; } compute_accelerated_huffman(c); CHECK(f); c->lookup_type = get_bits(f, 4); if (c->lookup_type > 2) return error(f, VORBIS_invalid_setup); if (c->lookup_type > 0) { uint16 *mults; c->minimum_value = float32_unpack(get_bits(f, 32)); c->delta_value = float32_unpack(get_bits(f, 32)); c->value_bits = get_bits(f, 4)+1; c->sequence_p = get_bits(f,1); if (c->lookup_type == 1) { int values = lookup1_values(c->entries, c->dimensions); if (values < 0) return error(f, VORBIS_invalid_setup); c->lookup_values = (uint32) values; } else { c->lookup_values = c->entries * c->dimensions; } if (c->lookup_values == 0) return error(f, VORBIS_invalid_setup); mults = (uint16 *) setup_temp_malloc(f, sizeof(mults[0]) * c->lookup_values); if (mults == NULL) return error(f, VORBIS_outofmem); for (j=0; j < (int) c->lookup_values; ++j) { int q = get_bits(f, c->value_bits); if (q == EOP) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_invalid_setup); } mults[j] = q; } #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int len, sparse = c->sparse; float last=0; // pre-expand the lookup1-style multiplicands, to avoid a divide in the inner loop if (sparse) { if (c->sorted_entries == 0) goto skip; c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->sorted_entries * c->dimensions); } else c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->entries * c->dimensions); if (c->multiplicands == NULL) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); } len = sparse ? c->sorted_entries : c->entries; for (j=0; j < len; ++j) { unsigned int z = sparse ? c->sorted_values[j] : j; unsigned int div=1; for (k=0; k < c->dimensions; ++k) { int off = (z / div) % c->lookup_values; float val = mults[off]*c->delta_value + c->minimum_value + last; c->multiplicands[j*c->dimensions + k] = val; if (c->sequence_p) last = val; if (k+1 < c->dimensions) { if (div > UINT_MAX / (unsigned int) c->lookup_values) { setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_invalid_setup); } div *= c->lookup_values; } } } c->lookup_type = 2; } else #endif { float last=0; CHECK(f); c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->lookup_values); if (c->multiplicands == NULL) { setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); } for (j=0; j < (int) c->lookup_values; ++j) { float val = mults[j] * c->delta_value + c->minimum_value + last; c->multiplicands[j] = val; if (c->sequence_p) last = val; } } #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK skip:; #endif setup_temp_free(f, mults, sizeof(mults[0])*c->lookup_values); CHECK(f); } CHECK(f); } // time domain transfers (notused) x = get_bits(f, 6) + 1; for (i=0; i < x; ++i) { uint32 z = get_bits(f, 16); if (z != 0) return error(f, VORBIS_invalid_setup); } // Floors f->floor_count = get_bits(f, 6)+1; f->floor_config = (Floor *) setup_malloc(f, f->floor_count * sizeof(*f->floor_config)); if (f->floor_config == NULL) return error(f, VORBIS_outofmem); for (i=0; i < f->floor_count; ++i) { f->floor_types[i] = get_bits(f, 16); if (f->floor_types[i] > 1) return error(f, VORBIS_invalid_setup); if (f->floor_types[i] == 0) { Floor0 *g = &f->floor_config[i].floor0; g->order = get_bits(f,8); g->rate = get_bits(f,16); g->bark_map_size = get_bits(f,16); g->amplitude_bits = get_bits(f,6); g->amplitude_offset = get_bits(f,8); g->number_of_books = get_bits(f,4) + 1; for (j=0; j < g->number_of_books; ++j) g->book_list[j] = get_bits(f,8); return error(f, VORBIS_feature_not_supported); } else { stbv__floor_ordering p[31*8+2]; Floor1 *g = &f->floor_config[i].floor1; int max_class = -1; g->partitions = get_bits(f, 5); for (j=0; j < g->partitions; ++j) { g->partition_class_list[j] = get_bits(f, 4); if (g->partition_class_list[j] > max_class) max_class = g->partition_class_list[j]; } for (j=0; j <= max_class; ++j) { g->class_dimensions[j] = get_bits(f, 3)+1; g->class_subclasses[j] = get_bits(f, 2); if (g->class_subclasses[j]) { g->class_masterbooks[j] = get_bits(f, 8); if (g->class_masterbooks[j] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } for (k=0; k < 1 << g->class_subclasses[j]; ++k) { g->subclass_books[j][k] = (int16)get_bits(f,8)-1; if (g->subclass_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } } g->floor1_multiplier = get_bits(f,2)+1; g->rangebits = get_bits(f,4); g->Xlist[0] = 0; g->Xlist[1] = 1 << g->rangebits; g->values = 2; for (j=0; j < g->partitions; ++j) { int c = g->partition_class_list[j]; for (k=0; k < g->class_dimensions[c]; ++k) { g->Xlist[g->values] = get_bits(f, g->rangebits); ++g->values; } } // precompute the sorting for (j=0; j < g->values; ++j) { p[j].x = g->Xlist[j]; p[j].id = j; } qsort(p, g->values, sizeof(p[0]), point_compare); for (j=0; j < g->values-1; ++j) if (p[j].x == p[j+1].x) return error(f, VORBIS_invalid_setup); for (j=0; j < g->values; ++j) g->sorted_order[j] = (uint8) p[j].id; // precompute the neighbors for (j=2; j < g->values; ++j) { int low = 0,hi = 0; neighbors(g->Xlist, j, &low,&hi); g->neighbors[j][0] = low; g->neighbors[j][1] = hi; } if (g->values > longest_floorlist) longest_floorlist = g->values; } } // Residue f->residue_count = get_bits(f, 6)+1; f->residue_config = (Residue *) setup_malloc(f, f->residue_count * sizeof(f->residue_config[0])); if (f->residue_config == NULL) return error(f, VORBIS_outofmem); memset(f->residue_config, 0, f->residue_count * sizeof(f->residue_config[0])); for (i=0; i < f->residue_count; ++i) { uint8 residue_cascade[64]; Residue *r = f->residue_config+i; f->residue_types[i] = get_bits(f, 16); if (f->residue_types[i] > 2) return error(f, VORBIS_invalid_setup); r->begin = get_bits(f, 24); r->end = get_bits(f, 24); if (r->end < r->begin) return error(f, VORBIS_invalid_setup); r->part_size = get_bits(f,24)+1; r->classifications = get_bits(f,6)+1; r->classbook = get_bits(f,8); if (r->classbook >= f->codebook_count) return error(f, VORBIS_invalid_setup); for (j=0; j < r->classifications; ++j) { uint8 high_bits=0; uint8 low_bits=get_bits(f,3); if (get_bits(f,1)) high_bits = get_bits(f,5); residue_cascade[j] = high_bits*8 + low_bits; } r->residue_books = (short (*)[8]) setup_malloc(f, sizeof(r->residue_books[0]) * r->classifications); if (r->residue_books == NULL) return error(f, VORBIS_outofmem); for (j=0; j < r->classifications; ++j) { for (k=0; k < 8; ++k) { if (residue_cascade[j] & (1 << k)) { r->residue_books[j][k] = get_bits(f, 8); if (r->residue_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } else { r->residue_books[j][k] = -1; } } } // precompute the classifications[] array to avoid inner-loop mod/divide // call it 'classdata' since we already have r->classifications r->classdata = (uint8 **) setup_malloc(f, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); if (!r->classdata) return error(f, VORBIS_outofmem); memset(r->classdata, 0, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); for (j=0; j < f->codebooks[r->classbook].entries; ++j) { int classwords = f->codebooks[r->classbook].dimensions; int temp = j; r->classdata[j] = (uint8 *) setup_malloc(f, sizeof(r->classdata[j][0]) * classwords); if (r->classdata[j] == NULL) return error(f, VORBIS_outofmem); for (k=classwords-1; k >= 0; --k) { r->classdata[j][k] = temp % r->classifications; temp /= r->classifications; } } } f->mapping_count = get_bits(f,6)+1; f->mapping = (Mapping *) setup_malloc(f, f->mapping_count * sizeof(*f->mapping)); if (f->mapping == NULL) return error(f, VORBIS_outofmem); memset(f->mapping, 0, f->mapping_count * sizeof(*f->mapping)); for (i=0; i < f->mapping_count; ++i) { Mapping *m = f->mapping + i; int mapping_type = get_bits(f,16); if (mapping_type != 0) return error(f, VORBIS_invalid_setup); m->chan = (MappingChannel *) setup_malloc(f, f->channels * sizeof(*m->chan)); if (m->chan == NULL) return error(f, VORBIS_outofmem); if (get_bits(f,1)) m->submaps = get_bits(f,4)+1; else m->submaps = 1; if (m->submaps > max_submaps) max_submaps = m->submaps; if (get_bits(f,1)) { m->coupling_steps = get_bits(f,8)+1; if (m->coupling_steps > f->channels) return error(f, VORBIS_invalid_setup); for (k=0; k < m->coupling_steps; ++k) { m->chan[k].magnitude = get_bits(f, ilog(f->channels-1)); m->chan[k].angle = get_bits(f, ilog(f->channels-1)); if (m->chan[k].magnitude >= f->channels) return error(f, VORBIS_invalid_setup); if (m->chan[k].angle >= f->channels) return error(f, VORBIS_invalid_setup); if (m->chan[k].magnitude == m->chan[k].angle) return error(f, VORBIS_invalid_setup); } } else m->coupling_steps = 0; // reserved field if (get_bits(f,2)) return error(f, VORBIS_invalid_setup); if (m->submaps > 1) { for (j=0; j < f->channels; ++j) { m->chan[j].mux = get_bits(f, 4); if (m->chan[j].mux >= m->submaps) return error(f, VORBIS_invalid_setup); } } else // @SPECIFICATION: this case is missing from the spec for (j=0; j < f->channels; ++j) m->chan[j].mux = 0; for (j=0; j < m->submaps; ++j) { get_bits(f,8); // discard m->submap_floor[j] = get_bits(f,8); m->submap_residue[j] = get_bits(f,8); if (m->submap_floor[j] >= f->floor_count) return error(f, VORBIS_invalid_setup); if (m->submap_residue[j] >= f->residue_count) return error(f, VORBIS_invalid_setup); } } // Modes f->mode_count = get_bits(f, 6)+1; for (i=0; i < f->mode_count; ++i) { Mode *m = f->mode_config+i; m->blockflag = get_bits(f,1); m->windowtype = get_bits(f,16); m->transformtype = get_bits(f,16); m->mapping = get_bits(f,8); if (m->windowtype != 0) return error(f, VORBIS_invalid_setup); if (m->transformtype != 0) return error(f, VORBIS_invalid_setup); if (m->mapping >= f->mapping_count) return error(f, VORBIS_invalid_setup); } flush_packet(f); f->previous_length = 0; for (i=0; i < f->channels; ++i) { f->channel_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1); f->previous_window[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); f->finalY[i] = (int16 *) setup_malloc(f, sizeof(int16) * longest_floorlist); if (f->channel_buffers[i] == NULL || f->previous_window[i] == NULL || f->finalY[i] == NULL) return error(f, VORBIS_outofmem); memset(f->channel_buffers[i], 0, sizeof(float) * f->blocksize_1); #ifdef STB_VORBIS_NO_DEFER_FLOOR f->floor_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); if (f->floor_buffers[i] == NULL) return error(f, VORBIS_outofmem); #endif } if (!init_blocksize(f, 0, f->blocksize_0)) return FALSE; if (!init_blocksize(f, 1, f->blocksize_1)) return FALSE; f->blocksize[0] = f->blocksize_0; f->blocksize[1] = f->blocksize_1; #ifdef STB_VORBIS_DIVIDE_TABLE if (integer_divide_table[1][1]==0) for (i=0; i < DIVTAB_NUMER; ++i) for (j=1; j < DIVTAB_DENOM; ++j) integer_divide_table[i][j] = i / j; #endif // compute how much temporary memory is needed // 1. { uint32 imdct_mem = (f->blocksize_1 * sizeof(float) >> 1); uint32 classify_mem; int i,max_part_read=0; for (i=0; i < f->residue_count; ++i) { Residue *r = f->residue_config + i; unsigned int actual_size = f->blocksize_1 / 2; unsigned int limit_r_begin = r->begin < actual_size ? r->begin : actual_size; unsigned int limit_r_end = r->end < actual_size ? r->end : actual_size; int n_read = limit_r_end - limit_r_begin; int part_read = n_read / r->part_size; if (part_read > max_part_read) max_part_read = part_read; } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(uint8 *)); #else classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(int *)); #endif // maximum reasonable partition size is f->blocksize_1 f->temp_memory_required = classify_mem; if (imdct_mem > f->temp_memory_required) f->temp_memory_required = imdct_mem; } if (f->alloc.alloc_buffer) { assert(f->temp_offset == f->alloc.alloc_buffer_length_in_bytes); // check if there's enough temp memory so we don't error later if (f->setup_offset + sizeof(*f) + f->temp_memory_required > (unsigned) f->temp_offset) return error(f, VORBIS_outofmem); } // @TODO: stb_vorbis_seek_start expects first_audio_page_offset to point to a page // without PAGEFLAG_continued_packet, so this either points to the first page, or // the page after the end of the headers. It might be cleaner to point to a page // in the middle of the headers, when that's the page where the first audio packet // starts, but we'd have to also correctly skip the end of any continued packet in // stb_vorbis_seek_start. if (f->next_seg == -1) { f->first_audio_page_offset = stb_vorbis_get_file_offset(f); } else { f->first_audio_page_offset = 0; } return TRUE; } static void vorbis_deinit(stb_vorbis *p) { int i,j; setup_free(p, p->vendor); for (i=0; i < p->comment_list_length; ++i) { setup_free(p, p->comment_list[i]); } setup_free(p, p->comment_list); if (p->residue_config) { for (i=0; i < p->residue_count; ++i) { Residue *r = p->residue_config+i; if (r->classdata) { for (j=0; j < p->codebooks[r->classbook].entries; ++j) setup_free(p, r->classdata[j]); setup_free(p, r->classdata); } setup_free(p, r->residue_books); } } if (p->codebooks) { CHECK(p); for (i=0; i < p->codebook_count; ++i) { Codebook *c = p->codebooks + i; setup_free(p, c->codeword_lengths); setup_free(p, c->multiplicands); setup_free(p, c->codewords); setup_free(p, c->sorted_codewords); // c->sorted_values[-1] is the first entry in the array setup_free(p, c->sorted_values ? c->sorted_values-1 : NULL); } setup_free(p, p->codebooks); } setup_free(p, p->floor_config); setup_free(p, p->residue_config); if (p->mapping) { for (i=0; i < p->mapping_count; ++i) setup_free(p, p->mapping[i].chan); setup_free(p, p->mapping); } CHECK(p); for (i=0; i < p->channels && i < STB_VORBIS_MAX_CHANNELS; ++i) { setup_free(p, p->channel_buffers[i]); setup_free(p, p->previous_window[i]); #ifdef STB_VORBIS_NO_DEFER_FLOOR setup_free(p, p->floor_buffers[i]); #endif setup_free(p, p->finalY[i]); } for (i=0; i < 2; ++i) { setup_free(p, p->A[i]); setup_free(p, p->B[i]); setup_free(p, p->C[i]); setup_free(p, p->window[i]); setup_free(p, p->bit_reverse[i]); } #ifndef STB_VORBIS_NO_STDIO if (p->close_on_free) fclose(p->f); #endif } void stb_vorbis_close(stb_vorbis *p) { if (p == NULL) return; vorbis_deinit(p); setup_free(p,p); } static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z) { memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start if (z) { p->alloc = *z; p->alloc.alloc_buffer_length_in_bytes &= ~7; p->temp_offset = p->alloc.alloc_buffer_length_in_bytes; } p->eof = 0; p->error = VORBIS__no_error; p->stream = NULL; p->codebooks = NULL; p->page_crc_tests = -1; #ifndef STB_VORBIS_NO_STDIO p->close_on_free = FALSE; p->f = NULL; #endif } int stb_vorbis_get_sample_offset(stb_vorbis *f) { if (f->current_loc_valid) return f->current_loc; else return -1; } stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f) { stb_vorbis_info d; d.channels = f->channels; d.sample_rate = f->sample_rate; d.setup_memory_required = f->setup_memory_required; d.setup_temp_memory_required = f->setup_temp_memory_required; d.temp_memory_required = f->temp_memory_required; d.max_frame_size = f->blocksize_1 >> 1; return d; } stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f) { stb_vorbis_comment d; d.vendor = f->vendor; d.comment_list_length = f->comment_list_length; d.comment_list = f->comment_list; return d; } int stb_vorbis_get_error(stb_vorbis *f) { int e = f->error; f->error = VORBIS__no_error; return e; } static stb_vorbis * vorbis_alloc(stb_vorbis *f) { stb_vorbis *p = (stb_vorbis *) setup_malloc(f, sizeof(*p)); return p; } #ifndef STB_VORBIS_NO_PUSHDATA_API void stb_vorbis_flush_pushdata(stb_vorbis *f) { f->previous_length = 0; f->page_crc_tests = 0; f->discard_samples_deferred = 0; f->current_loc_valid = FALSE; f->first_decode = FALSE; f->samples_output = 0; f->channel_buffer_start = 0; f->channel_buffer_end = 0; } static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len) { int i,n; for (i=0; i < f->page_crc_tests; ++i) f->scan[i].bytes_done = 0; // if we have room for more scans, search for them first, because // they may cause us to stop early if their header is incomplete if (f->page_crc_tests < STB_VORBIS_PUSHDATA_CRC_COUNT) { if (data_len < 4) return 0; data_len -= 3; // need to look for 4-byte sequence, so don't miss // one that straddles a boundary for (i=0; i < data_len; ++i) { if (data[i] == 0x4f) { if (0==memcmp(data+i, ogg_page_header, 4)) { int j,len; uint32 crc; // make sure we have the whole page header if (i+26 >= data_len || i+27+data[i+26] >= data_len) { // only read up to this page start, so hopefully we'll // have the whole page header start next time data_len = i; break; } // ok, we have it all; compute the length of the page len = 27 + data[i+26]; for (j=0; j < data[i+26]; ++j) len += data[i+27+j]; // scan everything up to the embedded crc (which we must 0) crc = 0; for (j=0; j < 22; ++j) crc = crc32_update(crc, data[i+j]); // now process 4 0-bytes for ( ; j < 26; ++j) crc = crc32_update(crc, 0); // len is the total number of bytes we need to scan n = f->page_crc_tests++; f->scan[n].bytes_left = len-j; f->scan[n].crc_so_far = crc; f->scan[n].goal_crc = data[i+22] + (data[i+23] << 8) + (data[i+24]<<16) + (data[i+25]<<24); // if the last frame on a page is continued to the next, then // we can't recover the sample_loc immediately if (data[i+27+data[i+26]-1] == 255) f->scan[n].sample_loc = ~0; else f->scan[n].sample_loc = data[i+6] + (data[i+7] << 8) + (data[i+ 8]<<16) + (data[i+ 9]<<24); f->scan[n].bytes_done = i+j; if (f->page_crc_tests == STB_VORBIS_PUSHDATA_CRC_COUNT) break; // keep going if we still have room for more } } } } for (i=0; i < f->page_crc_tests;) { uint32 crc; int j; int n = f->scan[i].bytes_done; int m = f->scan[i].bytes_left; if (m > data_len - n) m = data_len - n; // m is the bytes to scan in the current chunk crc = f->scan[i].crc_so_far; for (j=0; j < m; ++j) crc = crc32_update(crc, data[n+j]); f->scan[i].bytes_left -= m; f->scan[i].crc_so_far = crc; if (f->scan[i].bytes_left == 0) { // does it match? if (f->scan[i].crc_so_far == f->scan[i].goal_crc) { // Houston, we have page data_len = n+m; // consumption amount is wherever that scan ended f->page_crc_tests = -1; // drop out of page scan mode f->previous_length = 0; // decode-but-don't-output one frame f->next_seg = -1; // start a new page f->current_loc = f->scan[i].sample_loc; // set the current sample location // to the amount we'd have decoded had we decoded this page f->current_loc_valid = f->current_loc != ~0U; return data_len; } // delete entry f->scan[i] = f->scan[--f->page_crc_tests]; } else { ++i; } } return data_len; } // return value: number of bytes we used int stb_vorbis_decode_frame_pushdata( stb_vorbis *f, // the file we're decoding const uint8 *data, int data_len, // the memory available for decoding int *channels, // place to write number of float * buffers float ***output, // place to write float ** array of float * buffers int *samples // place to write number of output samples ) { int i; int len,right,left; if (!IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (f->page_crc_tests >= 0) { *samples = 0; return vorbis_search_for_page_pushdata(f, (uint8 *) data, data_len); } f->stream = (uint8 *) data; f->stream_end = (uint8 *) data + data_len; f->error = VORBIS__no_error; // check that we have the entire packet in memory if (!is_whole_packet_present(f)) { *samples = 0; return 0; } if (!vorbis_decode_packet(f, &len, &left, &right)) { // save the actual error we encountered enum STBVorbisError error = f->error; if (error == VORBIS_bad_packet_type) { // flush and resynch f->error = VORBIS__no_error; while (get8_packet(f) != EOP) if (f->eof) break; *samples = 0; return (int) (f->stream - data); } if (error == VORBIS_continued_packet_flag_invalid) { if (f->previous_length == 0) { // we may be resynching, in which case it's ok to hit one // of these; just discard the packet f->error = VORBIS__no_error; while (get8_packet(f) != EOP) if (f->eof) break; *samples = 0; return (int) (f->stream - data); } } // if we get an error while parsing, what to do? // well, it DEFINITELY won't work to continue from where we are! stb_vorbis_flush_pushdata(f); // restore the error that actually made us bail f->error = error; *samples = 0; return 1; } // success! len = vorbis_finish_frame(f, len, left, right); for (i=0; i < f->channels; ++i) f->outputs[i] = f->channel_buffers[i] + left; if (channels) *channels = f->channels; *samples = len; *output = f->outputs; return (int) (f->stream - data); } stb_vorbis *stb_vorbis_open_pushdata( const unsigned char *data, int data_len, // the memory available for decoding int *data_used, // only defined if result is not NULL int *error, const stb_vorbis_alloc *alloc) { stb_vorbis *f, p; vorbis_init(&p, alloc); p.stream = (uint8 *) data; p.stream_end = (uint8 *) data + data_len; p.push_mode = TRUE; if (!start_decoder(&p)) { if (p.eof) *error = VORBIS_need_more_data; else *error = p.error; vorbis_deinit(&p); return NULL; } f = vorbis_alloc(&p); if (f) { *f = p; *data_used = (int) (f->stream - data); *error = 0; return f; } else { vorbis_deinit(&p); return NULL; } } #endif // STB_VORBIS_NO_PUSHDATA_API unsigned int stb_vorbis_get_file_offset(stb_vorbis *f) { #ifndef STB_VORBIS_NO_PUSHDATA_API if (f->push_mode) return 0; #endif if (USE_MEMORY(f)) return (unsigned int) (f->stream - f->stream_start); #ifndef STB_VORBIS_NO_STDIO return (unsigned int) (ftell(f->f) - f->f_start); #endif } #ifndef STB_VORBIS_NO_PULLDATA_API // // DATA-PULLING API // static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last) { for(;;) { int n; if (f->eof) return 0; n = get8(f); if (n == 0x4f) { // page header candidate unsigned int retry_loc = stb_vorbis_get_file_offset(f); int i; // check if we're off the end of a file_section stream if (retry_loc - 25 > f->stream_len) return 0; // check the rest of the header for (i=1; i < 4; ++i) if (get8(f) != ogg_page_header[i]) break; if (f->eof) return 0; if (i == 4) { uint8 header[27]; uint32 i, crc, goal, len; for (i=0; i < 4; ++i) header[i] = ogg_page_header[i]; for (; i < 27; ++i) header[i] = get8(f); if (f->eof) return 0; if (header[4] != 0) goto invalid; goal = header[22] + (header[23] << 8) + (header[24]<<16) + ((uint32)header[25]<<24); for (i=22; i < 26; ++i) header[i] = 0; crc = 0; for (i=0; i < 27; ++i) crc = crc32_update(crc, header[i]); len = 0; for (i=0; i < header[26]; ++i) { int s = get8(f); crc = crc32_update(crc, s); len += s; } if (len && f->eof) return 0; for (i=0; i < len; ++i) crc = crc32_update(crc, get8(f)); // finished parsing probable page if (crc == goal) { // we could now check that it's either got the last // page flag set, OR it's followed by the capture // pattern, but I guess TECHNICALLY you could have // a file with garbage between each ogg page and recover // from it automatically? So even though that paranoia // might decrease the chance of an invalid decode by // another 2^32, not worth it since it would hose those // invalid-but-useful files? if (end) *end = stb_vorbis_get_file_offset(f); if (last) { if (header[5] & 0x04) *last = 1; else *last = 0; } set_file_offset(f, retry_loc-1); return 1; } } invalid: // not a valid page, so rewind and look for next one set_file_offset(f, retry_loc); } } } #define SAMPLE_unknown 0xffffffff // seeking is implemented with a binary search, which narrows down the range to // 64K, before using a linear search (because finding the synchronization // pattern can be expensive, and the chance we'd find the end page again is // relatively high for small ranges) // // two initial interpolation-style probes are used at the start of the search // to try to bound either side of the binary search sensibly, while still // working in O(log n) time if they fail. static int get_seek_page_info(stb_vorbis *f, ProbedPage *z) { uint8 header[27], lacing[255]; int i,len; // record where the page starts z->page_start = stb_vorbis_get_file_offset(f); // parse the header getn(f, header, 27); if (header[0] != 'O' || header[1] != 'g' || header[2] != 'g' || header[3] != 'S') return 0; getn(f, lacing, header[26]); // determine the length of the payload len = 0; for (i=0; i < header[26]; ++i) len += lacing[i]; // this implies where the page ends z->page_end = z->page_start + 27 + header[26] + len; // read the last-decoded sample out of the data z->last_decoded_sample = header[6] + (header[7] << 8) + (header[8] << 16) + (header[9] << 24); // restore file state to where we were set_file_offset(f, z->page_start); return 1; } // rarely used function to seek back to the preceding page while finding the // start of a packet static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset) { unsigned int previous_safe, end; // now we want to seek back 64K from the limit if (limit_offset >= 65536 && limit_offset-65536 >= f->first_audio_page_offset) previous_safe = limit_offset - 65536; else previous_safe = f->first_audio_page_offset; set_file_offset(f, previous_safe); while (vorbis_find_page(f, &end, NULL)) { if (end >= limit_offset && stb_vorbis_get_file_offset(f) < limit_offset) return 1; set_file_offset(f, end); } return 0; } // implements the search logic for finding a page and starting decoding. if // the function succeeds, current_loc_valid will be true and current_loc will // be less than or equal to the provided sample number (the closer the // better). static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number) { ProbedPage left, right, mid; int i, start_seg_with_known_loc, end_pos, page_start; uint32 delta, stream_length, padding, last_sample_limit; double offset = 0.0, bytes_per_sample = 0.0; int probe = 0; // find the last page and validate the target sample stream_length = stb_vorbis_stream_length_in_samples(f); if (stream_length == 0) return error(f, VORBIS_seek_without_length); if (sample_number > stream_length) return error(f, VORBIS_seek_invalid); // this is the maximum difference between the window-center (which is the // actual granule position value), and the right-start (which the spec // indicates should be the granule position (give or take one)). padding = ((f->blocksize_1 - f->blocksize_0) >> 2); if (sample_number < padding) last_sample_limit = 0; else last_sample_limit = sample_number - padding; left = f->p_first; while (left.last_decoded_sample == ~0U) { // (untested) the first page does not have a 'last_decoded_sample' set_file_offset(f, left.page_end); if (!get_seek_page_info(f, &left)) goto error; } right = f->p_last; assert(right.last_decoded_sample != ~0U); // starting from the start is handled differently if (last_sample_limit <= left.last_decoded_sample) { if (stb_vorbis_seek_start(f)) { if (f->current_loc > sample_number) return error(f, VORBIS_seek_failed); return 1; } return 0; } while (left.page_end != right.page_start) { assert(left.page_end < right.page_start); // search range in bytes delta = right.page_start - left.page_end; if (delta <= 65536) { // there's only 64K left to search - handle it linearly set_file_offset(f, left.page_end); } else { if (probe < 2) { if (probe == 0) { // first probe (interpolate) double data_bytes = right.page_end - left.page_start; bytes_per_sample = data_bytes / right.last_decoded_sample; offset = left.page_start + bytes_per_sample * (last_sample_limit - left.last_decoded_sample); } else { // second probe (try to bound the other side) double error = ((double) last_sample_limit - mid.last_decoded_sample) * bytes_per_sample; if (error >= 0 && error < 8000) error = 8000; if (error < 0 && error > -8000) error = -8000; offset += error * 2; } // ensure the offset is valid if (offset < left.page_end) offset = left.page_end; if (offset > right.page_start - 65536) offset = right.page_start - 65536; set_file_offset(f, (unsigned int) offset); } else { // binary search for large ranges (offset by 32K to ensure // we don't hit the right page) set_file_offset(f, left.page_end + (delta / 2) - 32768); } if (!vorbis_find_page(f, NULL, NULL)) goto error; } for (;;) { if (!get_seek_page_info(f, &mid)) goto error; if (mid.last_decoded_sample != ~0U) break; // (untested) no frames end on this page set_file_offset(f, mid.page_end); assert(mid.page_start < right.page_start); } // if we've just found the last page again then we're in a tricky file, // and we're close enough (if it wasn't an interpolation probe). if (mid.page_start == right.page_start) { if (probe >= 2 || delta <= 65536) break; } else { if (last_sample_limit < mid.last_decoded_sample) right = mid; else left = mid; } ++probe; } // seek back to start of the last packet page_start = left.page_start; set_file_offset(f, page_start); if (!start_page(f)) return error(f, VORBIS_seek_failed); end_pos = f->end_seg_with_known_loc; assert(end_pos >= 0); for (;;) { for (i = end_pos; i > 0; --i) if (f->segments[i-1] != 255) break; start_seg_with_known_loc = i; if (start_seg_with_known_loc > 0 || !(f->page_flag & PAGEFLAG_continued_packet)) break; // (untested) the final packet begins on an earlier page if (!go_to_page_before(f, page_start)) goto error; page_start = stb_vorbis_get_file_offset(f); if (!start_page(f)) goto error; end_pos = f->segment_count - 1; } // prepare to start decoding f->current_loc_valid = FALSE; f->last_seg = FALSE; f->valid_bits = 0; f->packet_bytes = 0; f->bytes_in_seg = 0; f->previous_length = 0; f->next_seg = start_seg_with_known_loc; for (i = 0; i < start_seg_with_known_loc; i++) skip(f, f->segments[i]); // start decoding (optimizable - this frame is generally discarded) if (!vorbis_pump_first_frame(f)) return 0; if (f->current_loc > sample_number) return error(f, VORBIS_seek_failed); return 1; error: // try to restore the file to a valid state stb_vorbis_seek_start(f); return error(f, VORBIS_seek_failed); } // the same as vorbis_decode_initial, but without advancing static int peek_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) { int bits_read, bytes_read; if (!vorbis_decode_initial(f, p_left_start, p_left_end, p_right_start, p_right_end, mode)) return 0; // either 1 or 2 bytes were read, figure out which so we can rewind bits_read = 1 + ilog(f->mode_count-1); if (f->mode_config[*mode].blockflag) bits_read += 2; bytes_read = (bits_read + 7) / 8; f->bytes_in_seg += bytes_read; f->packet_bytes -= bytes_read; skip(f, -bytes_read); if (f->next_seg == -1) f->next_seg = f->segment_count - 1; else f->next_seg--; f->valid_bits = 0; return 1; } int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number) { uint32 max_frame_samples; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); // fast page-level search if (!seek_to_sample_coarse(f, sample_number)) return 0; assert(f->current_loc_valid); assert(f->current_loc <= sample_number); // linear search for the relevant packet max_frame_samples = (f->blocksize_1*3 - f->blocksize_0) >> 2; while (f->current_loc < sample_number) { int left_start, left_end, right_start, right_end, mode, frame_samples; if (!peek_decode_initial(f, &left_start, &left_end, &right_start, &right_end, &mode)) return error(f, VORBIS_seek_failed); // calculate the number of samples returned by the next frame frame_samples = right_start - left_start; if (f->current_loc + frame_samples > sample_number) { return 1; // the next frame will contain the sample } else if (f->current_loc + frame_samples + max_frame_samples > sample_number) { // there's a chance the frame after this could contain the sample vorbis_pump_first_frame(f); } else { // this frame is too early to be relevant f->current_loc += frame_samples; f->previous_length = 0; maybe_start_packet(f); flush_packet(f); } } // the next frame should start with the sample if (f->current_loc != sample_number) return error(f, VORBIS_seek_failed); return 1; } int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number) { if (!stb_vorbis_seek_frame(f, sample_number)) return 0; if (sample_number != f->current_loc) { int n; uint32 frame_start = f->current_loc; stb_vorbis_get_frame_float(f, &n, NULL); assert(sample_number > frame_start); assert(f->channel_buffer_start + (int) (sample_number-frame_start) <= f->channel_buffer_end); f->channel_buffer_start += (sample_number - frame_start); } return 1; } int stb_vorbis_seek_start(stb_vorbis *f) { if (IS_PUSH_MODE(f)) { return error(f, VORBIS_invalid_api_mixing); } set_file_offset(f, f->first_audio_page_offset); f->previous_length = 0; f->first_decode = TRUE; f->next_seg = -1; return vorbis_pump_first_frame(f); } unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f) { unsigned int restore_offset, previous_safe; unsigned int end, last_page_loc; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (!f->total_samples) { unsigned int last; uint32 lo,hi; char header[6]; // first, store the current decode position so we can restore it restore_offset = stb_vorbis_get_file_offset(f); // now we want to seek back 64K from the end (the last page must // be at most a little less than 64K, but let's allow a little slop) if (f->stream_len >= 65536 && f->stream_len-65536 >= f->first_audio_page_offset) previous_safe = f->stream_len - 65536; else previous_safe = f->first_audio_page_offset; set_file_offset(f, previous_safe); // previous_safe is now our candidate 'earliest known place that seeking // to will lead to the final page' if (!vorbis_find_page(f, &end, &last)) { // if we can't find a page, we're hosed! f->error = VORBIS_cant_find_last_page; f->total_samples = 0xffffffff; goto done; } // check if there are more pages last_page_loc = stb_vorbis_get_file_offset(f); // stop when the last_page flag is set, not when we reach eof; // this allows us to stop short of a 'file_section' end without // explicitly checking the length of the section while (!last) { set_file_offset(f, end); if (!vorbis_find_page(f, &end, &last)) { // the last page we found didn't have the 'last page' flag // set. whoops! break; } //previous_safe = last_page_loc+1; // NOTE: not used after this point, but note for debugging last_page_loc = stb_vorbis_get_file_offset(f); } set_file_offset(f, last_page_loc); // parse the header getn(f, (unsigned char *)header, 6); // extract the absolute granule position lo = get32(f); hi = get32(f); if (lo == 0xffffffff && hi == 0xffffffff) { f->error = VORBIS_cant_find_last_page; f->total_samples = SAMPLE_unknown; goto done; } if (hi) lo = 0xfffffffe; // saturate f->total_samples = lo; f->p_last.page_start = last_page_loc; f->p_last.page_end = end; f->p_last.last_decoded_sample = lo; done: set_file_offset(f, restore_offset); } return f->total_samples == SAMPLE_unknown ? 0 : f->total_samples; } float stb_vorbis_stream_length_in_seconds(stb_vorbis *f) { return stb_vorbis_stream_length_in_samples(f) / (float) f->sample_rate; } int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output) { int len, right,left,i; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (!vorbis_decode_packet(f, &len, &left, &right)) { f->channel_buffer_start = f->channel_buffer_end = 0; return 0; } len = vorbis_finish_frame(f, len, left, right); for (i=0; i < f->channels; ++i) f->outputs[i] = f->channel_buffers[i] + left; f->channel_buffer_start = left; f->channel_buffer_end = left+len; if (channels) *channels = f->channels; if (output) *output = f->outputs; return len; } #ifndef STB_VORBIS_NO_STDIO stb_vorbis * stb_vorbis_open_file_section(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc, unsigned int length) { stb_vorbis *f, p; vorbis_init(&p, alloc); p.f = file; p.f_start = (uint32) ftell(file); p.stream_len = length; p.close_on_free = close_on_free; if (start_decoder(&p)) { f = vorbis_alloc(&p); if (f) { *f = p; vorbis_pump_first_frame(f); return f; } } if (error) *error = p.error; vorbis_deinit(&p); return NULL; } stb_vorbis * stb_vorbis_open_file(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc) { unsigned int len, start; start = (unsigned int) ftell(file); fseek(file, 0, SEEK_END); len = (unsigned int) (ftell(file) - start); fseek(file, start, SEEK_SET); return stb_vorbis_open_file_section(file, close_on_free, error, alloc, len); } stb_vorbis * stb_vorbis_open_filename(const char *filename, int *error, const stb_vorbis_alloc *alloc) { FILE *f; #if defined(_WIN32) && defined(__STDC_WANT_SECURE_LIB__) if (0 != fopen_s(&f, filename, "rb")) f = NULL; #else f = fopen(filename, "rb"); #endif if (f) return stb_vorbis_open_file(f, TRUE, error, alloc); if (error) *error = VORBIS_file_open_failure; return NULL; } #endif // STB_VORBIS_NO_STDIO stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, int *error, const stb_vorbis_alloc *alloc) { stb_vorbis *f, p; if (!data) { if (error) *error = VORBIS_unexpected_eof; return NULL; } vorbis_init(&p, alloc); p.stream = (uint8 *) data; p.stream_end = (uint8 *) data + len; p.stream_start = (uint8 *) p.stream; p.stream_len = len; p.push_mode = FALSE; if (start_decoder(&p)) { f = vorbis_alloc(&p); if (f) { *f = p; vorbis_pump_first_frame(f); if (error) *error = VORBIS__no_error; return f; } } if (error) *error = p.error; vorbis_deinit(&p); return NULL; } #ifndef STB_VORBIS_NO_INTEGER_CONVERSION #define PLAYBACK_MONO 1 #define PLAYBACK_LEFT 2 #define PLAYBACK_RIGHT 4 #define L (PLAYBACK_LEFT | PLAYBACK_MONO) #define C (PLAYBACK_LEFT | PLAYBACK_RIGHT | PLAYBACK_MONO) #define R (PLAYBACK_RIGHT | PLAYBACK_MONO) static int8 channel_position[7][6] = { { 0 }, { C }, { L, R }, { L, C, R }, { L, R, L, R }, { L, C, R, L, R }, { L, C, R, L, R, C }, }; #ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT typedef union { float f; int i; } float_conv; typedef char stb_vorbis_float_size_test[sizeof(float)==4 && sizeof(int) == 4]; #define FASTDEF(x) float_conv x // add (1<<23) to convert to int, then divide by 2^SHIFT, then add 0.5/2^SHIFT to round #define MAGIC(SHIFT) (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT)) #define ADDEND(SHIFT) (((150-SHIFT) << 23) + (1 << 22)) #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s)) #define check_endianness() #else #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) ((int) ((x) * (1 << (s)))) #define check_endianness() #define FASTDEF(x) #endif static void copy_samples(short *dest, float *src, int len) { int i; check_endianness(); for (i=0; i < len; ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp, src[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; dest[i] = v; } } static void compute_samples(int mask, short *output, int num_c, float **data, int d_offset, int len) { #define STB_BUFFER_SIZE 32 float buffer[STB_BUFFER_SIZE]; int i,j,o,n = STB_BUFFER_SIZE; check_endianness(); for (o = 0; o < len; o += STB_BUFFER_SIZE) { memset(buffer, 0, sizeof(buffer)); if (o + n > len) n = len - o; for (j=0; j < num_c; ++j) { if (channel_position[num_c][j] & mask) { for (i=0; i < n; ++i) buffer[i] += data[j][d_offset+o+i]; } } for (i=0; i < n; ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; output[o+i] = v; } } #undef STB_BUFFER_SIZE } static void compute_stereo_samples(short *output, int num_c, float **data, int d_offset, int len) { #define STB_BUFFER_SIZE 32 float buffer[STB_BUFFER_SIZE]; int i,j,o,n = STB_BUFFER_SIZE >> 1; // o is the offset in the source data check_endianness(); for (o = 0; o < len; o += STB_BUFFER_SIZE >> 1) { // o2 is the offset in the output data int o2 = o << 1; memset(buffer, 0, sizeof(buffer)); if (o + n > len) n = len - o; for (j=0; j < num_c; ++j) { int m = channel_position[num_c][j] & (PLAYBACK_LEFT | PLAYBACK_RIGHT); if (m == (PLAYBACK_LEFT | PLAYBACK_RIGHT)) { for (i=0; i < n; ++i) { buffer[i*2+0] += data[j][d_offset+o+i]; buffer[i*2+1] += data[j][d_offset+o+i]; } } else if (m == PLAYBACK_LEFT) { for (i=0; i < n; ++i) { buffer[i*2+0] += data[j][d_offset+o+i]; } } else if (m == PLAYBACK_RIGHT) { for (i=0; i < n; ++i) { buffer[i*2+1] += data[j][d_offset+o+i]; } } } for (i=0; i < (n<<1); ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; output[o2+i] = v; } } #undef STB_BUFFER_SIZE } static void convert_samples_short(int buf_c, short **buffer, int b_offset, int data_c, float **data, int d_offset, int samples) { int i; if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { static int channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} }; for (i=0; i < buf_c; ++i) compute_samples(channel_selector[buf_c][i], buffer[i]+b_offset, data_c, data, d_offset, samples); } else { int limit = buf_c < data_c ? buf_c : data_c; for (i=0; i < limit; ++i) copy_samples(buffer[i]+b_offset, data[i]+d_offset, samples); for ( ; i < buf_c; ++i) memset(buffer[i]+b_offset, 0, sizeof(short) * samples); } } int stb_vorbis_get_frame_short(stb_vorbis *f, int num_c, short **buffer, int num_samples) { float **output = NULL; int len = stb_vorbis_get_frame_float(f, NULL, &output); if (len > num_samples) len = num_samples; if (len) convert_samples_short(num_c, buffer, 0, f->channels, output, 0, len); return len; } static void convert_channels_short_interleaved(int buf_c, short *buffer, int data_c, float **data, int d_offset, int len) { int i; check_endianness(); if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { assert(buf_c == 2); for (i=0; i < buf_c; ++i) compute_stereo_samples(buffer, data_c, data, d_offset, len); } else { int limit = buf_c < data_c ? buf_c : data_c; int j; for (j=0; j < len; ++j) { for (i=0; i < limit; ++i) { FASTDEF(temp); float f = data[i][d_offset+j]; int v = FAST_SCALED_FLOAT_TO_INT(temp, f,15);//data[i][d_offset+j],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; *buffer++ = v; } for ( ; i < buf_c; ++i) *buffer++ = 0; } } } int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts) { float **output; int len; if (num_c == 1) return stb_vorbis_get_frame_short(f,num_c,&buffer, num_shorts); len = stb_vorbis_get_frame_float(f, NULL, &output); if (len) { if (len*num_c > num_shorts) len = num_shorts / num_c; convert_channels_short_interleaved(num_c, buffer, f->channels, output, 0, len); } return len; } int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts) { float **outputs; int len = num_shorts / channels; int n=0; while (n < len) { int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; if (k) convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k); buffer += k*channels; n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int len) { float **outputs; int n=0; while (n < len) { int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; if (k) convert_samples_short(channels, buffer, n, f->channels, f->channel_buffers, f->channel_buffer_start, k); n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } #ifndef STB_VORBIS_NO_STDIO int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output) { int data_len, offset, total, limit, error; short *data; stb_vorbis *v = stb_vorbis_open_filename(filename, &error, NULL); if (v == NULL) return -1; limit = v->channels * 4096; *channels = v->channels; if (sample_rate) *sample_rate = v->sample_rate; offset = data_len = 0; total = limit; data = (short *) malloc(total * sizeof(*data)); if (data == NULL) { stb_vorbis_close(v); return -2; } for (;;) { int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); if (n == 0) break; data_len += n; offset += n * v->channels; if (offset + limit > total) { short *data2; total *= 2; data2 = (short *) realloc(data, total * sizeof(*data)); if (data2 == NULL) { free(data); stb_vorbis_close(v); return -2; } data = data2; } } *output = data; stb_vorbis_close(v); return data_len; } #endif // NO_STDIO int stb_vorbis_decode_memory(const uint8 *mem, int len, int *channels, int *sample_rate, short **output) { int data_len, offset, total, limit, error; short *data; stb_vorbis *v = stb_vorbis_open_memory(mem, len, &error, NULL); if (v == NULL) return -1; limit = v->channels * 4096; *channels = v->channels; if (sample_rate) *sample_rate = v->sample_rate; offset = data_len = 0; total = limit; data = (short *) malloc(total * sizeof(*data)); if (data == NULL) { stb_vorbis_close(v); return -2; } for (;;) { int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); if (n == 0) break; data_len += n; offset += n * v->channels; if (offset + limit > total) { short *data2; total *= 2; data2 = (short *) realloc(data, total * sizeof(*data)); if (data2 == NULL) { free(data); stb_vorbis_close(v); return -2; } data = data2; } } *output = data; stb_vorbis_close(v); return data_len; } #endif // STB_VORBIS_NO_INTEGER_CONVERSION int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats) { float **outputs; int len = num_floats / channels; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < len) { int i,j; int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; for (j=0; j < k; ++j) { for (i=0; i < z; ++i) *buffer++ = f->channel_buffers[i][f->channel_buffer_start+j]; for ( ; i < channels; ++i) *buffer++ = 0; } n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples) { float **outputs; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < num_samples) { int i; int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= num_samples) k = num_samples - n; if (k) { for (i=0; i < z; ++i) memcpy(buffer[i]+n, f->channel_buffers[i]+f->channel_buffer_start, sizeof(float)*k); for ( ; i < channels; ++i) memset(buffer[i]+n, 0, sizeof(float) * k); } n += k; f->channel_buffer_start += k; if (n == num_samples) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } #endif // STB_VORBIS_NO_PULLDATA_API /* Version history 1.17 - 2019-07-08 - fix CVE-2019-13217, -13218, -13219, -13220, -13221, -13222, -13223 found with Mayhem by ForAllSecure 1.16 - 2019-03-04 - fix warnings 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found 1.14 - 2018-02-11 - delete bogus dealloca usage 1.13 - 2018-01-29 - fix truncation of last frame (hopefully) 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files 1.11 - 2017-07-23 - fix MinGW compilation 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory 1.09 - 2016-04-04 - back out 'avoid discarding last frame' fix from previous version 1.08 - 2016-04-02 - fixed multiple warnings; fix setup memory leaks; avoid discarding last frame of audio data 1.07 - 2015-01-16 - fixed some warnings, fix mingw, const-correct API some more crash fixes when out of memory or with corrupt files 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson) some crash fixes when out of memory or with corrupt files 1.05 - 2015-04-19 - don't define __forceinline if it's redundant 1.04 - 2014-08-27 - fix missing const-correct case in API 1.03 - 2014-08-07 - Warning fixes 1.02 - 2014-07-09 - Declare qsort compare function _cdecl on windows 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in multichannel (API change) report sample rate for decode-full-file funcs 0.99996 - bracket #include for macintosh compilation by Laurent Gomila 0.99995 - use union instead of pointer-cast for fast-float-to-int to avoid alias-optimization problem 0.99994 - change fast-float-to-int to work in single-precision FPU mode, remove endian-dependence 0.99993 - remove assert that fired on legal files with empty tables 0.99992 - rewind-to-start 0.99991 - bugfix to stb_vorbis_get_samples_short by Bernhard Wodo 0.9999 - (should have been 0.99990) fix no-CRT support, compiling as C++ 0.9998 - add a full-decode function with a memory source 0.9997 - fix a bug in the read-from-FILE case in 0.9996 addition 0.9996 - query length of vorbis stream in samples/seconds 0.9995 - bugfix to another optimization that only happened in certain files 0.9994 - bugfix to one of the optimizations that caused significant (but inaudible?) errors 0.9993 - performance improvements; runs in 99% to 104% of time of reference implementation 0.9992 - performance improvement of IMDCT; now performs close to reference implementation 0.9991 - performance improvement of IMDCT 0.999 - (should have been 0.9990) performance improvement of IMDCT 0.998 - no-CRT support from Casey Muratori 0.997 - bugfixes for bugs found by Terje Mathisen 0.996 - bugfix: fast-huffman decode initialized incorrectly for sparse codebooks; fixing gives 10% speedup - found by Terje Mathisen 0.995 - bugfix: fix to 'effective' overrun detection - found by Terje Mathisen 0.994 - bugfix: garbage decode on final VQ symbol of a non-multiple - found by Terje Mathisen 0.993 - bugfix: pushdata API required 1 extra byte for empty page (failed to consume final page if empty) - found by Terje Mathisen 0.992 - fixes for MinGW warning 0.991 - turn fast-float-conversion on by default 0.990 - fix push-mode seek recovery if you seek into the headers 0.98b - fix to bad release of 0.98 0.98 - fix push-mode seek recovery; robustify float-to-int and support non-fast mode 0.97 - builds under c++ (typecasting, don't use 'class' keyword) 0.96 - somehow MY 0.95 was right, but the web one was wrong, so here's my 0.95 rereleased as 0.96, fixes a typo in the clamping code 0.95 - clamping code for 16-bit functions 0.94 - not publically released 0.93 - fixed all-zero-floor case (was decoding garbage) 0.92 - fixed a memory leak 0.91 - conditional compiles to omit parts of the API and the infrastructure to support them: STB_VORBIS_NO_PULLDATA_API, STB_VORBIS_NO_PUSHDATA_API, STB_VORBIS_NO_STDIO, STB_VORBIS_NO_INTEGER_CONVERSION 0.90 - first public release */ #endif // STB_VORBIS_HEADER_ONLY /* ------------------------------------------------------------------------------ This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT License Copyright (c) 2017 Sean Barrett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ miniaudio-0.11.22/miniaudio.c000066400000000000000000000000701475701111600157550ustar00rootroot00000000000000#define MINIAUDIO_IMPLEMENTATION #include "miniaudio.h" miniaudio-0.11.22/miniaudio.h000066400000000000000000172666641475701111600160210ustar00rootroot00000000000000/* Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file. miniaudio - v0.11.22 - 2025-02-24 David Reid - mackron@gmail.com Website: https://miniaud.io Documentation: https://miniaud.io/docs GitHub: https://github.com/mackron/miniaudio */ /* 1. Introduction =============== To use miniaudio, include "miniaudio.h": ```c #include "miniaudio.h" ``` The implementation is contained in "miniaudio.c". Just compile this like any other source file. You can include miniaudio.c if you want to compile your project as a single translation unit: ```c #include "miniaudio.c" ``` miniaudio includes both low level and high level APIs. The low level API is good for those who want to do all of their mixing themselves and only require a light weight interface to the underlying audio device. The high level API is good for those who have complex mixing and effect requirements. In miniaudio, objects are transparent structures. Unlike many other libraries, there are no handles to opaque objects which means you need to allocate memory for objects yourself. In the examples presented in this documentation you will often see objects declared on the stack. You need to be careful when translating these examples to your own code so that you don't accidentally declare your objects on the stack and then cause them to become invalid once the function returns. In addition, you must ensure the memory address of your objects remain the same throughout their lifetime. You therefore cannot be making copies of your objects. A config/init pattern is used throughout the entire library. The idea is that you set up a config object and pass that into the initialization routine. The advantage to this system is that the config object can be initialized with logical defaults and new properties added to it without breaking the API. The config object can be allocated on the stack and does not need to be maintained after initialization of the corresponding object. 1.1. Low Level API ------------------ The low level API gives you access to the raw audio data of an audio device. It supports playback, capture, full-duplex and loopback (WASAPI only). You can enumerate over devices to determine which physical device(s) you want to connect to. The low level API uses the concept of a "device" as the abstraction for physical devices. The idea is that you choose a physical device to emit or capture audio from, and then move data to/from the device when miniaudio tells you to. Data is delivered to and from devices asynchronously via a callback which you specify when initializing the device. When initializing the device you first need to configure it. The device configuration allows you to specify things like the format of the data delivered via the callback, the size of the internal buffer and the ID of the device you want to emit or capture audio from. Once you have the device configuration set up you can initialize the device. When initializing a device you need to allocate memory for the device object beforehand. This gives the application complete control over how the memory is allocated. In the example below we initialize a playback device on the stack, but you could allocate it on the heap if that suits your situation better. ```c void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { // In playback mode copy data to pOutput. In capture mode read data from pInput. In full-duplex mode, both // pOutput and pInput will be valid and you can move data from pInput into pOutput. Never process more than // frameCount frames. } int main() { ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.format = ma_format_f32; // Set to ma_format_unknown to use the device's native format. config.playback.channels = 2; // Set to 0 to use the device's native channel count. config.sampleRate = 48000; // Set to 0 to use the device's native sample rate. config.dataCallback = data_callback; // This function will be called when miniaudio needs more data. config.pUserData = pMyCustomData; // Can be accessed from the device object (device.pUserData). ma_device device; if (ma_device_init(NULL, &config, &device) != MA_SUCCESS) { return -1; // Failed to initialize the device. } ma_device_start(&device); // The device is sleeping by default so you'll need to start it manually. // Do something here. Probably your program's main loop. ma_device_uninit(&device); return 0; } ``` In the example above, `data_callback()` is where audio data is written and read from the device. The idea is in playback mode you cause sound to be emitted from the speakers by writing audio data to the output buffer (`pOutput` in the example). In capture mode you read data from the input buffer (`pInput`) to extract sound captured by the microphone. The `frameCount` parameter tells you how many frames can be written to the output buffer and read from the input buffer. A "frame" is one sample for each channel. For example, in a stereo stream (2 channels), one frame is 2 samples: one for the left, one for the right. The channel count is defined by the device config. The size in bytes of an individual sample is defined by the sample format which is also specified in the device config. Multi-channel audio data is always interleaved, which means the samples for each frame are stored next to each other in memory. For example, in a stereo stream the first pair of samples will be the left and right samples for the first frame, the second pair of samples will be the left and right samples for the second frame, etc. The configuration of the device is defined by the `ma_device_config` structure. The config object is always initialized with `ma_device_config_init()`. It's important to always initialize the config with this function as it initializes it with logical defaults and ensures your program doesn't break when new members are added to the `ma_device_config` structure. The example above uses a fairly simple and standard device configuration. The call to `ma_device_config_init()` takes a single parameter, which is whether or not the device is a playback, capture, duplex or loopback device (loopback devices are not supported on all backends). The `config.playback.format` member sets the sample format which can be one of the following (all formats are native-endian): +---------------+----------------------------------------+---------------------------+ | Symbol | Description | Range | +---------------+----------------------------------------+---------------------------+ | ma_format_f32 | 32-bit floating point | [-1, 1] | | ma_format_s16 | 16-bit signed integer | [-32768, 32767] | | ma_format_s24 | 24-bit signed integer (tightly packed) | [-8388608, 8388607] | | ma_format_s32 | 32-bit signed integer | [-2147483648, 2147483647] | | ma_format_u8 | 8-bit unsigned integer | [0, 255] | +---------------+----------------------------------------+---------------------------+ The `config.playback.channels` member sets the number of channels to use with the device. The channel count cannot exceed MA_MAX_CHANNELS. The `config.sampleRate` member sets the sample rate (which must be the same for both playback and capture in full-duplex configurations). This is usually set to 44100 or 48000, but can be set to anything. It's recommended to keep this between 8000 and 384000, however. Note that leaving the format, channel count and/or sample rate at their default values will result in the internal device's native configuration being used which is useful if you want to avoid the overhead of miniaudio's automatic data conversion. In addition to the sample format, channel count and sample rate, the data callback and user data pointer are also set via the config. The user data pointer is not passed into the callback as a parameter, but is instead set to the `pUserData` member of `ma_device` which you can access directly since all miniaudio structures are transparent. Initializing the device is done with `ma_device_init()`. This will return a result code telling you what went wrong, if anything. On success it will return `MA_SUCCESS`. After initialization is complete the device will be in a stopped state. To start it, use `ma_device_start()`. Uninitializing the device will stop it, which is what the example above does, but you can also stop the device with `ma_device_stop()`. To resume the device simply call `ma_device_start()` again. Note that it's important to never stop or start the device from inside the callback. This will result in a deadlock. Instead you set a variable or signal an event indicating that the device needs to stop and handle it in a different thread. The following APIs must never be called inside the callback: ```c ma_device_init() ma_device_init_ex() ma_device_uninit() ma_device_start() ma_device_stop() ``` You must never try uninitializing and reinitializing a device inside the callback. You must also never try to stop and start it from inside the callback. There are a few other things you shouldn't do in the callback depending on your requirements, however this isn't so much a thread-safety thing, but rather a real-time processing thing which is beyond the scope of this introduction. The example above demonstrates the initialization of a playback device, but it works exactly the same for capture. All you need to do is change the device type from `ma_device_type_playback` to `ma_device_type_capture` when setting up the config, like so: ```c ma_device_config config = ma_device_config_init(ma_device_type_capture); config.capture.format = MY_FORMAT; config.capture.channels = MY_CHANNEL_COUNT; ``` In the data callback you just read from the input buffer (`pInput` in the example above) and leave the output buffer alone (it will be set to NULL when the device type is set to `ma_device_type_capture`). These are the available device types and how you should handle the buffers in the callback: +-------------------------+--------------------------------------------------------+ | Device Type | Callback Behavior | +-------------------------+--------------------------------------------------------+ | ma_device_type_playback | Write to output buffer, leave input buffer untouched. | | ma_device_type_capture | Read from input buffer, leave output buffer untouched. | | ma_device_type_duplex | Read from input buffer, write to output buffer. | | ma_device_type_loopback | Read from input buffer, leave output buffer untouched. | +-------------------------+--------------------------------------------------------+ You will notice in the example above that the sample format and channel count is specified separately for playback and capture. This is to support different data formats between the playback and capture devices in a full-duplex system. An example may be that you want to capture audio data as a monaural stream (one channel), but output sound to a stereo speaker system. Note that if you use different formats between playback and capture in a full-duplex configuration you will need to convert the data yourself. There are functions available to help you do this which will be explained later. The example above did not specify a physical device to connect to which means it will use the operating system's default device. If you have multiple physical devices connected and you want to use a specific one you will need to specify the device ID in the configuration, like so: ```c config.playback.pDeviceID = pMyPlaybackDeviceID; // Only if requesting a playback or duplex device. config.capture.pDeviceID = pMyCaptureDeviceID; // Only if requesting a capture, duplex or loopback device. ``` To retrieve the device ID you will need to perform device enumeration, however this requires the use of a new concept called the "context". Conceptually speaking the context sits above the device. There is one context to many devices. The purpose of the context is to represent the backend at a more global level and to perform operations outside the scope of an individual device. Mainly it is used for performing run-time linking against backend libraries, initializing backends and enumerating devices. The example below shows how to enumerate devices. ```c ma_context context; if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) { // Error. } ma_device_info* pPlaybackInfos; ma_uint32 playbackCount; ma_device_info* pCaptureInfos; ma_uint32 captureCount; if (ma_context_get_devices(&context, &pPlaybackInfos, &playbackCount, &pCaptureInfos, &captureCount) != MA_SUCCESS) { // Error. } // Loop over each device info and do something with it. Here we just print the name with their index. You may want // to give the user the opportunity to choose which device they'd prefer. for (ma_uint32 iDevice = 0; iDevice < playbackCount; iDevice += 1) { printf("%d - %s\n", iDevice, pPlaybackInfos[iDevice].name); } ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.pDeviceID = &pPlaybackInfos[chosenPlaybackDeviceIndex].id; config.playback.format = MY_FORMAT; config.playback.channels = MY_CHANNEL_COUNT; config.sampleRate = MY_SAMPLE_RATE; config.dataCallback = data_callback; config.pUserData = pMyCustomData; ma_device device; if (ma_device_init(&context, &config, &device) != MA_SUCCESS) { // Error } ... ma_device_uninit(&device); ma_context_uninit(&context); ``` The first thing we do in this example is initialize a `ma_context` object with `ma_context_init()`. The first parameter is a pointer to a list of `ma_backend` values which are used to override the default backend priorities. When this is NULL, as in this example, miniaudio's default priorities are used. The second parameter is the number of backends listed in the array pointed to by the first parameter. The third parameter is a pointer to a `ma_context_config` object which can be NULL, in which case defaults are used. The context configuration is used for setting the logging callback, custom memory allocation callbacks, user-defined data and some backend-specific configurations. Once the context has been initialized you can enumerate devices. In the example above we use the simpler `ma_context_get_devices()`, however you can also use a callback for handling devices by using `ma_context_enumerate_devices()`. When using `ma_context_get_devices()` you provide a pointer to a pointer that will, upon output, be set to a pointer to a buffer containing a list of `ma_device_info` structures. You also provide a pointer to an unsigned integer that will receive the number of items in the returned buffer. Do not free the returned buffers as their memory is managed internally by miniaudio. The `ma_device_info` structure contains an `id` member which is the ID you pass to the device config. It also contains the name of the device which is useful for presenting a list of devices to the user via the UI. When creating your own context you will want to pass it to `ma_device_init()` when initializing the device. Passing in NULL, like we do in the first example, will result in miniaudio creating the context for you, which you don't want to do since you've already created a context. Note that internally the context is only tracked by it's pointer which means you must not change the location of the `ma_context` object. If this is an issue, consider using `malloc()` to allocate memory for the context. 1.2. High Level API ------------------- The high level API consists of three main parts: * Resource management for loading and streaming sounds. * A node graph for advanced mixing and effect processing. * A high level "engine" that wraps around the resource manager and node graph. The resource manager (`ma_resource_manager`) is used for loading sounds. It supports loading sounds fully into memory and also streaming. It will also deal with reference counting for you which avoids the same sound being loaded multiple times. The node graph is used for mixing and effect processing. The idea is that you connect a number of nodes into the graph by connecting each node's outputs to another node's inputs. Each node can implement its own effect. By chaining nodes together, advanced mixing and effect processing can be achieved. The engine encapsulates both the resource manager and the node graph to create a simple, easy to use high level API. The resource manager and node graph APIs are covered in more later sections of this manual. The code below shows how you can initialize an engine using it's default configuration. ```c ma_result result; ma_engine engine; result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { return result; // Failed to initialize the engine. } ``` This creates an engine instance which will initialize a device internally which you can access with `ma_engine_get_device()`. It will also initialize a resource manager for you which can be accessed with `ma_engine_get_resource_manager()`. The engine itself is a node graph (`ma_node_graph`) which means you can pass a pointer to the engine object into any of the `ma_node_graph` APIs (with a cast). Alternatively, you can use `ma_engine_get_node_graph()` instead of a cast. Note that all objects in miniaudio, including the `ma_engine` object in the example above, are transparent structures. There are no handles to opaque structures in miniaudio which means you need to be mindful of how you declare them. In the example above we are declaring it on the stack, but this will result in the struct being invalidated once the function encapsulating it returns. If allocating the engine on the heap is more appropriate, you can easily do so with a standard call to `malloc()` or whatever heap allocation routine you like: ```c ma_engine* pEngine = malloc(sizeof(*pEngine)); ``` The `ma_engine` API uses the same config/init pattern used all throughout miniaudio. To configure an engine, you can fill out a `ma_engine_config` object and pass it into the first parameter of `ma_engine_init()`: ```c ma_result result; ma_engine engine; ma_engine_config engineConfig; engineConfig = ma_engine_config_init(); engineConfig.pResourceManager = &myCustomResourceManager; // <-- Initialized as some earlier stage. result = ma_engine_init(&engineConfig, &engine); if (result != MA_SUCCESS) { return result; } ``` This creates an engine instance using a custom config. In this particular example it's showing how you can specify a custom resource manager rather than having the engine initialize one internally. This is particularly useful if you want to have multiple engine's share the same resource manager. The engine must be uninitialized with `ma_engine_uninit()` when it's no longer needed. By default the engine will be started, but nothing will be playing because no sounds have been initialized. The easiest but least flexible way of playing a sound is like so: ```c ma_engine_play_sound(&engine, "my_sound.wav", NULL); ``` This plays what miniaudio calls an "inline" sound. It plays the sound once, and then puts the internal sound up for recycling. The last parameter is used to specify which sound group the sound should be associated with which will be explained later. This particular way of playing a sound is simple, but lacks flexibility and features. A more flexible way of playing a sound is to first initialize a sound: ```c ma_result result; ma_sound sound; result = ma_sound_init_from_file(&engine, "my_sound.wav", 0, NULL, NULL, &sound); if (result != MA_SUCCESS) { return result; } ma_sound_start(&sound); ``` This returns a `ma_sound` object which represents a single instance of the specified sound file. If you want to play the same file multiple times simultaneously, you need to create one sound for each instance. Sounds should be uninitialized with `ma_sound_uninit()`. Sounds are not started by default. Start a sound with `ma_sound_start()` and stop it with `ma_sound_stop()`. When a sound is stopped, it is not rewound to the start. Use `ma_sound_seek_to_pcm_frame(&sound, 0)` to seek back to the start of a sound. By default, starting and stopping sounds happens immediately, but sometimes it might be convenient to schedule the sound the be started and/or stopped at a specific time. This can be done with the following functions: ```c ma_sound_set_start_time_in_pcm_frames() ma_sound_set_start_time_in_milliseconds() ma_sound_set_stop_time_in_pcm_frames() ma_sound_set_stop_time_in_milliseconds() ``` The start/stop time needs to be specified based on the absolute timer which is controlled by the engine. The current global time in PCM frames can be retrieved with `ma_engine_get_time_in_pcm_frames()`. The engine's global time can be changed with `ma_engine_set_time_in_pcm_frames()` for synchronization purposes if required. Note that scheduling a start time still requires an explicit call to `ma_sound_start()` before anything will play: ```c ma_sound_set_start_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2); ma_sound_start(&sound); ``` The third parameter of `ma_sound_init_from_file()` is a set of flags that control how the sound be loaded and a few options on which features should be enabled for that sound. By default, the sound is synchronously loaded fully into memory straight from the file system without any kind of decoding. If you want to decode the sound before storing it in memory, you need to specify the `MA_SOUND_FLAG_DECODE` flag. This is useful if you want to incur the cost of decoding at an earlier stage, such as a loading stage. Without this option, decoding will happen dynamically at mixing time which might be too expensive on the audio thread. If you want to load the sound asynchronously, you can specify the `MA_SOUND_FLAG_ASYNC` flag. This will result in `ma_sound_init_from_file()` returning quickly, but the sound will not start playing until the sound has had some audio decoded. The fourth parameter is a pointer to sound group. A sound group is used as a mechanism to organise sounds into groups which have their own effect processing and volume control. An example is a game which might have separate groups for sfx, voice and music. Each of these groups have their own independent volume control. Use `ma_sound_group_init()` or `ma_sound_group_init_ex()` to initialize a sound group. Sounds and sound groups are nodes in the engine's node graph and can be plugged into any `ma_node` API. This makes it possible to connect sounds and sound groups to effect nodes to produce complex effect chains. A sound can have its volume changed with `ma_sound_set_volume()`. If you prefer decibel volume control you can use `ma_volume_db_to_linear()` to convert from decibel representation to linear. Panning and pitching is supported with `ma_sound_set_pan()` and `ma_sound_set_pitch()`. If you know a sound will never have its pitch changed with `ma_sound_set_pitch()` or via the doppler effect, you can specify the `MA_SOUND_FLAG_NO_PITCH` flag when initializing the sound for an optimization. By default, sounds and sound groups have spatialization enabled. If you don't ever want to spatialize your sounds, initialize the sound with the `MA_SOUND_FLAG_NO_SPATIALIZATION` flag. The spatialization model is fairly simple and is roughly on feature parity with OpenAL. HRTF and environmental occlusion are not currently supported, but planned for the future. The supported features include: * Sound and listener positioning and orientation with cones * Attenuation models: none, inverse, linear and exponential * Doppler effect Sounds can be faded in and out with `ma_sound_set_fade_in_pcm_frames()`. To check if a sound is currently playing, you can use `ma_sound_is_playing()`. To check if a sound is at the end, use `ma_sound_at_end()`. Looping of a sound can be controlled with `ma_sound_set_looping()`. Use `ma_sound_is_looping()` to check whether or not the sound is looping. 2. Building =========== miniaudio should work cleanly out of the box without the need to download or install any dependencies. See below for platform-specific details. Note that GCC and Clang require `-msse2`, `-mavx2`, etc. for SIMD optimizations. If you get errors about undefined references to `__sync_val_compare_and_swap_8`, `__atomic_load_8`, etc. you need to link with `-latomic`. 2.1. Windows ------------ The Windows build should compile cleanly on all popular compilers without the need to configure any include paths nor link to any libraries. The UWP build may require linking to mmdevapi.lib if you get errors about an unresolved external symbol for `ActivateAudioInterfaceAsync()`. 2.2. macOS and iOS ------------------ The macOS build should compile cleanly without the need to download any dependencies nor link to any libraries or frameworks. The iOS build needs to be compiled as Objective-C and will need to link the relevant frameworks but should compile cleanly out of the box with Xcode. Compiling through the command line requires linking to `-lpthread` and `-lm`. Due to the way miniaudio links to frameworks at runtime, your application may not pass Apple's notarization process. To fix this there are two options. The first is to compile with `-DMA_NO_RUNTIME_LINKING` which in turn will require linking with `-framework CoreFoundation -framework CoreAudio -framework AudioToolbox`. If you get errors about AudioToolbox, try with `-framework AudioUnit` instead. You may get this when using older versions of iOS. Alternatively, if you would rather keep using runtime linking you can add the following to your entitlements.xcent file: ``` com.apple.security.cs.allow-dyld-environment-variables com.apple.security.cs.allow-unsigned-executable-memory ``` See this discussion for more info: https://github.com/mackron/miniaudio/issues/203. 2.3. Linux ---------- The Linux build only requires linking to `-ldl`, `-lpthread` and `-lm`. You do not need any development packages. You may need to link with `-latomic` if you're compiling for 32-bit ARM. 2.4. BSD -------- The BSD build only requires linking to `-lpthread` and `-lm`. NetBSD uses audio(4), OpenBSD uses sndio and FreeBSD uses OSS. You may need to link with `-latomic` if you're compiling for 32-bit ARM. 2.5. Android ------------ AAudio is the highest priority backend on Android. This should work out of the box without needing any kind of compiler configuration. Support for AAudio starts with Android 8 which means older versions will fall back to OpenSL|ES which requires API level 16+. There have been reports that the OpenSL|ES backend fails to initialize on some Android based devices due to `dlopen()` failing to open "libOpenSLES.so". If this happens on your platform you'll need to disable run-time linking with `MA_NO_RUNTIME_LINKING` and link with -lOpenSLES. 2.6. Emscripten --------------- The Emscripten build emits Web Audio JavaScript directly and should compile cleanly out of the box. You cannot use `-std=c*` compiler flags, nor `-ansi`. You can enable the use of AudioWorkets by defining `MA_ENABLE_AUDIO_WORKLETS` and then compiling with the following options: -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY An example for compiling with AudioWorklet support might look like this: emcc program.c -o bin/program.html -DMA_ENABLE_AUDIO_WORKLETS -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY To run locally, you'll need to use emrun: emrun bin/program.html 2.7. Build Options ------------------ `#define` these options before including miniaudio.c, or pass them as compiler flags: +----------------------------------+--------------------------------------------------------------------+ | Option | Description | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_WASAPI | Disables the WASAPI backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_DSOUND | Disables the DirectSound backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_WINMM | Disables the WinMM backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_ALSA | Disables the ALSA backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_PULSEAUDIO | Disables the PulseAudio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_JACK | Disables the JACK backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_COREAUDIO | Disables the Core Audio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_SNDIO | Disables the sndio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_AUDIO4 | Disables the audio(4) backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_OSS | Disables the OSS backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_AAUDIO | Disables the AAudio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_OPENSL | Disables the OpenSL|ES backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_WEBAUDIO | Disables the Web Audio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_CUSTOM | Disables support for custom backends. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_NULL | Disables the null backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_ONLY_SPECIFIC_BACKENDS | Disables all backends by default and requires `MA_ENABLE_*` to | | | enable specific backends. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_WASAPI | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the WASAPI backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_DSOUND | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the DirectSound backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_WINMM | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the WinMM backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_ALSA | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the ALSA backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_PULSEAUDIO | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the PulseAudio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_JACK | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the JACK backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_COREAUDIO | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the Core Audio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_SNDIO | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the sndio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_AUDIO4 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the audio(4) backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_OSS | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the OSS backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_AAUDIO | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the AAudio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_OPENSL | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the OpenSL|ES backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_WEBAUDIO | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the Web Audio backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_CUSTOM | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable custom backends. | +----------------------------------+--------------------------------------------------------------------+ | MA_ENABLE_NULL | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to | | | enable the null backend. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_DECODING | Disables decoding APIs. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_ENCODING | Disables encoding APIs. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_WAV | Disables the built-in WAV decoder and encoder. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_FLAC | Disables the built-in FLAC decoder. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_MP3 | Disables the built-in MP3 decoder. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_DEVICE_IO | Disables playback and recording. This will disable `ma_context` | | | and `ma_device` APIs. This is useful if you only want to use | | | miniaudio's data conversion and/or decoding APIs. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_RESOURCE_MANAGER | Disables the resource manager. When using the engine this will | | | also disable the following functions: | | | | | | ``` | | | ma_sound_init_from_file() | | | ma_sound_init_from_file_w() | | | ma_sound_init_copy() | | | ma_engine_play_sound_ex() | | | ma_engine_play_sound() | | | ``` | | | | | | The only way to initialize a `ma_sound` object is to initialize it | | | from a data source. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_NODE_GRAPH | Disables the node graph API. This will also disable the engine API | | | because it depends on the node graph. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_ENGINE | Disables the engine API. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_THREADING | Disables the `ma_thread`, `ma_mutex`, `ma_semaphore` and | | | `ma_event` APIs. This option is useful if you only need to use | | | miniaudio for data conversion, decoding and/or encoding. Some | | | families of APIs require threading which means the following | | | options must also be set: | | | | | | ``` | | | MA_NO_DEVICE_IO | | | ``` | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_GENERATION | Disables generation APIs such a `ma_waveform` and `ma_noise`. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_SSE2 | Disables SSE2 optimizations. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_AVX2 | Disables AVX2 optimizations. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_NEON | Disables NEON optimizations. | +----------------------------------+--------------------------------------------------------------------+ | MA_NO_RUNTIME_LINKING | Disables runtime linking. This is useful for passing Apple's | | | notarization process. When enabling this, you may need to avoid | | | using `-std=c89` or `-std=c99` on Linux builds or else you may end | | | up with compilation errors due to conflicts with `timespec` and | | | `timeval` data types. | | | | | | You may need to enable this if your target platform does not allow | | | runtime linking via `dlopen()`. | +----------------------------------+--------------------------------------------------------------------+ | MA_USE_STDINT | (Pass this in as a compiler flag. Do not `#define` this before | | | miniaudio.c) Forces the use of stdint.h for sized types. | +----------------------------------+--------------------------------------------------------------------+ | MA_DEBUG_OUTPUT | Enable `printf()` output of debug logs (`MA_LOG_LEVEL_DEBUG`). | +----------------------------------+--------------------------------------------------------------------+ | MA_COINIT_VALUE | Windows only. The value to pass to internal calls to | | | `CoInitializeEx()`. Defaults to `COINIT_MULTITHREADED`. | +----------------------------------+--------------------------------------------------------------------+ | MA_FORCE_UWP | Windows only. Affects only the WASAPI backend. Will force the | | | WASAPI backend to use the UWP code path instead of the regular | | | desktop path. This is normally auto-detected and should rarely be | | | needed to be used explicitly, but can be useful for debugging. | +----------------------------------+--------------------------------------------------------------------+ | MA_ON_THREAD_ENTRY | Defines some code that will be executed as soon as an internal | | | miniaudio-managed thread is created. This will be the first thing | | | to be executed by the thread entry point. | +----------------------------------+--------------------------------------------------------------------+ | MA_ON_THREAD_EXIT | Defines some code that will be executed from the entry point of an | | | internal miniaudio-managed thread upon exit. This will be the last | | | thing to be executed before the thread's entry point exits. | +----------------------------------+--------------------------------------------------------------------+ | MA_THREAD_DEFAULT_STACK_SIZE | If set, specifies the default stack size used by miniaudio-managed | | | threads. | +----------------------------------+--------------------------------------------------------------------+ | MA_API | Controls how public APIs should be decorated. Default is `extern`. | +----------------------------------+--------------------------------------------------------------------+ 3. Definitions ============== This section defines common terms used throughout miniaudio. Unfortunately there is often ambiguity in the use of terms throughout the audio space, so this section is intended to clarify how miniaudio uses each term. 3.1. Sample ----------- A sample is a single unit of audio data. If the sample format is f32, then one sample is one 32-bit floating point number. 3.2. Frame / PCM Frame ---------------------- A frame is a group of samples equal to the number of channels. For a stereo stream a frame is 2 samples, a mono frame is 1 sample, a 5.1 surround sound frame is 6 samples, etc. The terms "frame" and "PCM frame" are the same thing in miniaudio. Note that this is different to a compressed frame. If ever miniaudio needs to refer to a compressed frame, such as a FLAC frame, it will always clarify what it's referring to with something like "FLAC frame". 3.3. Channel ------------ A stream of monaural audio that is emitted from an individual speaker in a speaker system, or received from an individual microphone in a microphone system. A stereo stream has two channels (a left channel, and a right channel), a 5.1 surround sound system has 6 channels, etc. Some audio systems refer to a channel as a complex audio stream that's mixed with other channels to produce the final mix - this is completely different to miniaudio's use of the term "channel" and should not be confused. 3.4. Sample Rate ---------------- The sample rate in miniaudio is always expressed in Hz, such as 44100, 48000, etc. It's the number of PCM frames that are processed per second. 3.5. Formats ------------ Throughout miniaudio you will see references to different sample formats: +---------------+----------------------------------------+---------------------------+ | Symbol | Description | Range | +---------------+----------------------------------------+---------------------------+ | ma_format_f32 | 32-bit floating point | [-1, 1] | | ma_format_s16 | 16-bit signed integer | [-32768, 32767] | | ma_format_s24 | 24-bit signed integer (tightly packed) | [-8388608, 8388607] | | ma_format_s32 | 32-bit signed integer | [-2147483648, 2147483647] | | ma_format_u8 | 8-bit unsigned integer | [0, 255] | +---------------+----------------------------------------+---------------------------+ All formats are native-endian. 4. Data Sources =============== The data source abstraction in miniaudio is used for retrieving audio data from some source. A few examples include `ma_decoder`, `ma_noise` and `ma_waveform`. You will need to be familiar with data sources in order to make sense of some of the higher level concepts in miniaudio. The `ma_data_source` API is a generic interface for reading from a data source. Any object that implements the data source interface can be plugged into any `ma_data_source` function. To read data from a data source: ```c ma_result result; ma_uint64 framesRead; result = ma_data_source_read_pcm_frames(pDataSource, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; // Failed to read data from the data source. } ``` If you don't need the number of frames that were successfully read you can pass in `NULL` to the `pFramesRead` parameter. If this returns a value less than the number of frames requested it means the end of the file has been reached. `MA_AT_END` will be returned only when the number of frames read is 0. When calling any data source function, with the exception of `ma_data_source_init()` and `ma_data_source_uninit()`, you can pass in any object that implements a data source. For example, you could plug in a decoder like so: ```c ma_result result; ma_uint64 framesRead; ma_decoder decoder; // <-- This would be initialized with `ma_decoder_init_*()`. result = ma_data_source_read_pcm_frames(&decoder, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; // Failed to read data from the decoder. } ``` If you want to seek forward you can pass in `NULL` to the `pFramesOut` parameter. Alternatively you can use `ma_data_source_seek_pcm_frames()`. To seek to a specific PCM frame: ```c result = ma_data_source_seek_to_pcm_frame(pDataSource, frameIndex); if (result != MA_SUCCESS) { return result; // Failed to seek to PCM frame. } ``` You can retrieve the total length of a data source in PCM frames, but note that some data sources may not have the notion of a length, such as noise and waveforms, and others may just not have a way of determining the length such as some decoders. To retrieve the length: ```c ma_uint64 length; result = ma_data_source_get_length_in_pcm_frames(pDataSource, &length); if (result != MA_SUCCESS) { return result; // Failed to retrieve the length. } ``` Care should be taken when retrieving the length of a data source where the underlying decoder is pulling data from a data stream with an undefined length, such as internet radio or some kind of broadcast. If you do this, `ma_data_source_get_length_in_pcm_frames()` may never return. The current position of the cursor in PCM frames can also be retrieved: ```c ma_uint64 cursor; result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &cursor); if (result != MA_SUCCESS) { return result; // Failed to retrieve the cursor. } ``` You will often need to know the data format that will be returned after reading. This can be retrieved like so: ```c ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_channel channelMap[MA_MAX_CHANNELS]; result = ma_data_source_get_data_format(pDataSource, &format, &channels, &sampleRate, channelMap, MA_MAX_CHANNELS); if (result != MA_SUCCESS) { return result; // Failed to retrieve data format. } ``` If you do not need a specific data format property, just pass in NULL to the respective parameter. There may be cases where you want to implement something like a sound bank where you only want to read data within a certain range of the underlying data. To do this you can use a range: ```c result = ma_data_source_set_range_in_pcm_frames(pDataSource, rangeBegInFrames, rangeEndInFrames); if (result != MA_SUCCESS) { return result; // Failed to set the range. } ``` This is useful if you have a sound bank where many sounds are stored in the same file and you want the data source to only play one of those sub-sounds. Note that once the range is set, everything that takes a position, such as cursors and loop points, should always be relatvie to the start of the range. When the range is set, any previously defined loop point will be reset. Custom loop points can also be used with data sources. By default, data sources will loop after they reach the end of the data source, but if you need to loop at a specific location, you can do the following: ```c result = ma_data_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames); if (result != MA_SUCCESS) { return result; // Failed to set the loop point. } ``` The loop point is relative to the current range. It's sometimes useful to chain data sources together so that a seamless transition can be achieved. To do this, you can use chaining: ```c ma_decoder decoder1; ma_decoder decoder2; // ... initialize decoders with ma_decoder_init_*() ... result = ma_data_source_set_next(&decoder1, &decoder2); if (result != MA_SUCCESS) { return result; // Failed to set the next data source. } result = ma_data_source_read_pcm_frames(&decoder1, pFramesOut, frameCount, pFramesRead); if (result != MA_SUCCESS) { return result; // Failed to read from the decoder. } ``` In the example above we're using decoders. When reading from a chain, you always want to read from the top level data source in the chain. In the example above, `decoder1` is the top level data source in the chain. When `decoder1` reaches the end, `decoder2` will start seamlessly without any gaps. Note that when looping is enabled, only the current data source will be looped. You can loop the entire chain by linking in a loop like so: ```c ma_data_source_set_next(&decoder1, &decoder2); // decoder1 -> decoder2 ma_data_source_set_next(&decoder2, &decoder1); // decoder2 -> decoder1 (loop back to the start). ``` Note that setting up chaining is not thread safe, so care needs to be taken if you're dynamically changing links while the audio thread is in the middle of reading. Do not use `ma_decoder_seek_to_pcm_frame()` as a means to reuse a data source to play multiple instances of the same sound simultaneously. This can be extremely inefficient depending on the type of data source and can result in glitching due to subtle changes to the state of internal filters. Instead, initialize multiple data sources for each instance. 4.1. Custom Data Sources ------------------------ You can implement a custom data source by implementing the functions in `ma_data_source_vtable`. Your custom object must have `ma_data_source_base` as it's first member: ```c struct my_data_source { ma_data_source_base base; ... }; ``` In your initialization routine, you need to call `ma_data_source_init()` in order to set up the base object (`ma_data_source_base`): ```c static ma_result my_data_source_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { // Read data here. Output in the same format returned by my_data_source_get_data_format(). } static ma_result my_data_source_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { // Seek to a specific PCM frame here. Return MA_NOT_IMPLEMENTED if seeking is not supported. } static ma_result my_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { // Return the format of the data here. } static ma_result my_data_source_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { // Retrieve the current position of the cursor here. Return MA_NOT_IMPLEMENTED and set *pCursor to 0 if there is no notion of a cursor. } static ma_result my_data_source_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { // Retrieve the length in PCM frames here. Return MA_NOT_IMPLEMENTED and set *pLength to 0 if there is no notion of a length or if the length is unknown. } static ma_data_source_vtable g_my_data_source_vtable = { my_data_source_read, my_data_source_seek, my_data_source_get_data_format, my_data_source_get_cursor, my_data_source_get_length }; ma_result my_data_source_init(my_data_source* pMyDataSource) { ma_result result; ma_data_source_config baseConfig; baseConfig = ma_data_source_config_init(); baseConfig.vtable = &g_my_data_source_vtable; result = ma_data_source_init(&baseConfig, &pMyDataSource->base); if (result != MA_SUCCESS) { return result; } // ... do the initialization of your custom data source here ... return MA_SUCCESS; } void my_data_source_uninit(my_data_source* pMyDataSource) { // ... do the uninitialization of your custom data source here ... // You must uninitialize the base data source. ma_data_source_uninit(&pMyDataSource->base); } ``` Note that `ma_data_source_init()` and `ma_data_source_uninit()` are never called directly outside of the custom data source. It's up to the custom data source itself to call these within their own init/uninit functions. 5. Engine ========= The `ma_engine` API is a high level API for managing and mixing sounds and effect processing. The `ma_engine` object encapsulates a resource manager and a node graph, both of which will be explained in more detail later. Sounds are called `ma_sound` and are created from an engine. Sounds can be associated with a mixing group called `ma_sound_group` which are also created from the engine. Both `ma_sound` and `ma_sound_group` objects are nodes within the engine's node graph. When the engine is initialized, it will normally create a device internally. If you would rather manage the device yourself, you can do so and just pass a pointer to it via the engine config when you initialize the engine. You can also just use the engine without a device, which again can be configured via the engine config. The most basic way to initialize the engine is with a default config, like so: ```c ma_result result; ma_engine engine; result = ma_engine_init(NULL, &engine); if (result != MA_SUCCESS) { return result; // Failed to initialize the engine. } ``` This will result in the engine initializing a playback device using the operating system's default device. This will be sufficient for many use cases, but if you need more flexibility you'll want to configure the engine with an engine config: ```c ma_result result; ma_engine engine; ma_engine_config engineConfig; engineConfig = ma_engine_config_init(); engineConfig.pDevice = &myDevice; result = ma_engine_init(&engineConfig, &engine); if (result != MA_SUCCESS) { return result; // Failed to initialize the engine. } ``` In the example above we're passing in a pre-initialized device. Since the caller is the one in control of the device's data callback, it's their responsibility to manually call `ma_engine_read_pcm_frames()` from inside their data callback: ```c void playback_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { ma_engine_read_pcm_frames(&g_Engine, pOutput, frameCount, NULL); } ``` You can also use the engine independent of a device entirely: ```c ma_result result; ma_engine engine; ma_engine_config engineConfig; engineConfig = ma_engine_config_init(); engineConfig.noDevice = MA_TRUE; engineConfig.channels = 2; // Must be set when not using a device. engineConfig.sampleRate = 48000; // Must be set when not using a device. result = ma_engine_init(&engineConfig, &engine); if (result != MA_SUCCESS) { return result; // Failed to initialize the engine. } ``` Note that when you're not using a device, you must set the channel count and sample rate in the config or else miniaudio won't know what to use (miniaudio will use the device to determine this normally). When not using a device, you need to use `ma_engine_read_pcm_frames()` to process audio data from the engine. This kind of setup is useful if you want to do something like offline processing or want to use a different audio system for playback such as SDL. When a sound is loaded it goes through a resource manager. By default the engine will initialize a resource manager internally, but you can also specify a pre-initialized resource manager: ```c ma_result result; ma_engine engine1; ma_engine engine2; ma_engine_config engineConfig; engineConfig = ma_engine_config_init(); engineConfig.pResourceManager = &myResourceManager; ma_engine_init(&engineConfig, &engine1); ma_engine_init(&engineConfig, &engine2); ``` In this example we are initializing two engines, both of which are sharing the same resource manager. This is especially useful for saving memory when loading the same file across multiple engines. If you were not to use a shared resource manager, each engine instance would use their own which would result in any sounds that are used between both engine's being loaded twice. By using a shared resource manager, it would only be loaded once. Using multiple engine's is useful when you need to output to multiple playback devices, such as in a local multiplayer game where each player is using their own set of headphones. By default an engine will be in a started state. To make it so the engine is not automatically started you can configure it as such: ```c engineConfig.noAutoStart = MA_TRUE; // The engine will need to be started manually. ma_engine_start(&engine); // Later on the engine can be stopped with ma_engine_stop(). ma_engine_stop(&engine); ``` The concept of starting or stopping an engine is only relevant when using the engine with a device. Attempting to start or stop an engine that is not associated with a device will result in `MA_INVALID_OPERATION`. The master volume of the engine can be controlled with `ma_engine_set_volume()` which takes a linear scale, with 0 resulting in silence and anything above 1 resulting in amplification. If you prefer decibel based volume control, use `ma_volume_db_to_linear()` to convert from dB to linear. When a sound is spatialized, it is done so relative to a listener. An engine can be configured to have multiple listeners which can be configured via the config: ```c engineConfig.listenerCount = 2; ``` The maximum number of listeners is restricted to `MA_ENGINE_MAX_LISTENERS`. By default, when a sound is spatialized, it will be done so relative to the closest listener. You can also pin a sound to a specific listener which will be explained later. Listener's have a position, direction, cone, and velocity (for doppler effect). A listener is referenced by an index, the meaning of which is up to the caller (the index is 0 based and cannot go beyond the listener count, minus 1). The position, direction and velocity are all specified in absolute terms: ```c ma_engine_listener_set_position(&engine, listenerIndex, worldPosX, worldPosY, worldPosZ); ``` The direction of the listener represents it's forward vector. The listener's up vector can also be specified and defaults to +1 on the Y axis. ```c ma_engine_listener_set_direction(&engine, listenerIndex, forwardX, forwardY, forwardZ); ma_engine_listener_set_world_up(&engine, listenerIndex, 0, 1, 0); ``` The engine supports directional attenuation. The listener can have a cone the controls how sound is attenuated based on the listener's direction. When a sound is between the inner and outer cones, it will be attenuated between 1 and the cone's outer gain: ```c ma_engine_listener_set_cone(&engine, listenerIndex, innerAngleInRadians, outerAngleInRadians, outerGain); ``` When a sound is inside the inner code, no directional attenuation is applied. When the sound is outside of the outer cone, the attenuation will be set to `outerGain` in the example above. When the sound is in between the inner and outer cones, the attenuation will be interpolated between 1 and the outer gain. The engine's coordinate system follows the OpenGL coordinate system where positive X points right, positive Y points up and negative Z points forward. The simplest and least flexible way to play a sound is like so: ```c ma_engine_play_sound(&engine, "my_sound.wav", pGroup); ``` This is a "fire and forget" style of function. The engine will manage the `ma_sound` object internally. When the sound finishes playing, it'll be put up for recycling. For more flexibility you'll want to initialize a sound object: ```c ma_sound sound; result = ma_sound_init_from_file(&engine, "my_sound.wav", flags, pGroup, NULL, &sound); if (result != MA_SUCCESS) { return result; // Failed to load sound. } ``` Sounds need to be uninitialized with `ma_sound_uninit()`. The example above loads a sound from a file. If the resource manager has been disabled you will not be able to use this function and instead you'll need to initialize a sound directly from a data source: ```c ma_sound sound; result = ma_sound_init_from_data_source(&engine, &dataSource, flags, pGroup, &sound); if (result != MA_SUCCESS) { return result; } ``` Each `ma_sound` object represents a single instance of the sound. If you want to play the same sound multiple times at the same time, you need to initialize a separate `ma_sound` object. For the most flexibility when initializing sounds, use `ma_sound_init_ex()`. This uses miniaudio's standard config/init pattern: ```c ma_sound sound; ma_sound_config soundConfig; soundConfig = ma_sound_config_init(); soundConfig.pFilePath = NULL; // Set this to load from a file path. soundConfig.pDataSource = NULL; // Set this to initialize from an existing data source. soundConfig.pInitialAttachment = &someNodeInTheNodeGraph; soundConfig.initialAttachmentInputBusIndex = 0; soundConfig.channelsIn = 1; soundConfig.channelsOut = 0; // Set to 0 to use the engine's native channel count. result = ma_sound_init_ex(&soundConfig, &sound); if (result != MA_SUCCESS) { return result; } ``` In the example above, the sound is being initialized without a file nor a data source. This is valid, in which case the sound acts as a node in the middle of the node graph. This means you can connect other sounds to this sound and allow it to act like a sound group. Indeed, this is exactly what a `ma_sound_group` is. When loading a sound, you specify a set of flags that control how the sound is loaded and what features are enabled for that sound. When no flags are set, the sound will be fully loaded into memory in exactly the same format as how it's stored on the file system. The resource manager will allocate a block of memory and then load the file directly into it. When reading audio data, it will be decoded dynamically on the fly. In order to save processing time on the audio thread, it might be beneficial to pre-decode the sound. You can do this with the `MA_SOUND_FLAG_DECODE` flag: ```c ma_sound_init_from_file(&engine, "my_sound.wav", MA_SOUND_FLAG_DECODE, pGroup, NULL, &sound); ``` By default, sounds will be loaded synchronously, meaning `ma_sound_init_*()` will not return until the sound has been fully loaded. If this is prohibitive you can instead load sounds asynchronously by specifying the `MA_SOUND_FLAG_ASYNC` flag: ```c ma_sound_init_from_file(&engine, "my_sound.wav", MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC, pGroup, NULL, &sound); ``` This will result in `ma_sound_init_*()` returning quickly, but the sound won't yet have been fully loaded. When you start the sound, it won't output anything until some sound is available. The sound will start outputting audio before the sound has been fully decoded when the `MA_SOUND_FLAG_DECODE` is specified. If you need to wait for an asynchronously loaded sound to be fully loaded, you can use a fence. A fence in miniaudio is a simple synchronization mechanism which simply blocks until it's internal counter hit's zero. You can specify a fence like so: ```c ma_result result; ma_fence fence; ma_sound sounds[4]; result = ma_fence_init(&fence); if (result != MA_SUCCESS) { return result; } // Load some sounds asynchronously. for (int iSound = 0; iSound < 4; iSound += 1) { ma_sound_init_from_file(&engine, mySoundFilesPaths[iSound], MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC, pGroup, &fence, &sounds[iSound]); } // ... do some other stuff here in the mean time ... // Wait for all sounds to finish loading. ma_fence_wait(&fence); ``` If loading the entire sound into memory is prohibitive, you can also configure the engine to stream the audio data: ```c ma_sound_init_from_file(&engine, "my_sound.wav", MA_SOUND_FLAG_STREAM, pGroup, NULL, &sound); ``` When streaming sounds, 2 seconds worth of audio data is stored in memory. Although it should work fine, it's inefficient to use streaming for short sounds. Streaming is useful for things like music tracks in games. When loading a sound from a file path, the engine will reference count the file to prevent it from being loaded if it's already in memory. When you uninitialize a sound, the reference count will be decremented, and if it hits zero, the sound will be unloaded from memory. This reference counting system is not used for streams. The engine will use a 64-bit hash of the file name when comparing file paths which means there's a small chance you might encounter a name collision. If this is an issue, you'll need to use a different name for one of the colliding file paths, or just not load from files and instead load from a data source. You can use `ma_sound_init_copy()` to initialize a copy of another sound. Note, however, that this only works for sounds that were initialized with `ma_sound_init_from_file()` and without the `MA_SOUND_FLAG_STREAM` flag. When you initialize a sound, if you specify a sound group the sound will be attached to that group automatically. If you set it to NULL, it will be automatically attached to the engine's endpoint. If you would instead rather leave the sound unattached by default, you can specify the `MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT` flag. This is useful if you want to set up a complex node graph. Sounds are not started by default. To start a sound, use `ma_sound_start()`. Stop a sound with `ma_sound_stop()`. Sounds can have their volume controlled with `ma_sound_set_volume()` in the same way as the engine's master volume. Sounds support stereo panning and pitching. Set the pan with `ma_sound_set_pan()`. Setting the pan to 0 will result in an unpanned sound. Setting it to -1 will shift everything to the left, whereas +1 will shift it to the right. The pitch can be controlled with `ma_sound_set_pitch()`. A larger value will result in a higher pitch. The pitch must be greater than 0. The engine supports 3D spatialization of sounds. By default sounds will have spatialization enabled, but if a sound does not need to be spatialized it's best to disable it. There are two ways to disable spatialization of a sound: ```c // Disable spatialization at initialization time via a flag: ma_sound_init_from_file(&engine, "my_sound.wav", MA_SOUND_FLAG_NO_SPATIALIZATION, NULL, NULL, &sound); // Dynamically disable or enable spatialization post-initialization: ma_sound_set_spatialization_enabled(&sound, isSpatializationEnabled); ``` By default sounds will be spatialized based on the closest listener. If a sound should always be spatialized relative to a specific listener it can be pinned to one: ```c ma_sound_set_pinned_listener_index(&sound, listenerIndex); ``` Like listeners, sounds have a position. By default, the position of a sound is in absolute space, but it can be changed to be relative to a listener: ```c ma_sound_set_positioning(&sound, ma_positioning_relative); ``` Note that relative positioning of a sound only makes sense if there is either only one listener, or the sound is pinned to a specific listener. To set the position of a sound: ```c ma_sound_set_position(&sound, posX, posY, posZ); ``` The direction works the same way as a listener and represents the sound's forward direction: ```c ma_sound_set_direction(&sound, forwardX, forwardY, forwardZ); ``` Sound's also have a cone for controlling directional attenuation. This works exactly the same as listeners: ```c ma_sound_set_cone(&sound, innerAngleInRadians, outerAngleInRadians, outerGain); ``` The velocity of a sound is used for doppler effect and can be set as such: ```c ma_sound_set_velocity(&sound, velocityX, velocityY, velocityZ); ``` The engine supports different attenuation models which can be configured on a per-sound basis. By default the attenuation model is set to `ma_attenuation_model_inverse` which is the equivalent to OpenAL's `AL_INVERSE_DISTANCE_CLAMPED`. Configure the attenuation model like so: ```c ma_sound_set_attenuation_model(&sound, ma_attenuation_model_inverse); ``` The supported attenuation models include the following: +----------------------------------+----------------------------------------------+ | ma_attenuation_model_none | No distance attenuation. | +----------------------------------+----------------------------------------------+ | ma_attenuation_model_inverse | Equivalent to `AL_INVERSE_DISTANCE_CLAMPED`. | +----------------------------------+----------------------------------------------+ | ma_attenuation_model_linear | Linear attenuation. | +----------------------------------+----------------------------------------------+ | ma_attenuation_model_exponential | Exponential attenuation. | +----------------------------------+----------------------------------------------+ To control how quickly a sound rolls off as it moves away from the listener, you need to configure the rolloff: ```c ma_sound_set_rolloff(&sound, rolloff); ``` You can control the minimum and maximum gain to apply from spatialization: ```c ma_sound_set_min_gain(&sound, minGain); ma_sound_set_max_gain(&sound, maxGain); ``` Likewise, in the calculation of attenuation, you can control the minimum and maximum distances for the attenuation calculation. This is useful if you want to ensure sounds don't drop below a certain volume after the listener moves further away and to have sounds play a maximum volume when the listener is within a certain distance: ```c ma_sound_set_min_distance(&sound, minDistance); ma_sound_set_max_distance(&sound, maxDistance); ``` The engine's spatialization system supports doppler effect. The doppler factor can be configure on a per-sound basis like so: ```c ma_sound_set_doppler_factor(&sound, dopplerFactor); ``` You can fade sounds in and out with `ma_sound_set_fade_in_pcm_frames()` and `ma_sound_set_fade_in_milliseconds()`. Set the volume to -1 to use the current volume as the starting volume: ```c // Fade in over 1 second. ma_sound_set_fade_in_milliseconds(&sound, 0, 1, 1000); // ... sometime later ... // Fade out over 1 second, starting from the current volume. ma_sound_set_fade_in_milliseconds(&sound, -1, 0, 1000); ``` By default sounds will start immediately, but sometimes for timing and synchronization purposes it can be useful to schedule a sound to start or stop: ```c // Start the sound in 1 second from now. ma_sound_set_start_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 1)); // Stop the sound in 2 seconds from now. ma_sound_set_stop_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2)); ``` Note that scheduling a start time still requires an explicit call to `ma_sound_start()` before anything will play. The time is specified in global time which is controlled by the engine. You can get the engine's current time with `ma_engine_get_time_in_pcm_frames()`. The engine's global time is incremented automatically as audio data is read, but it can be reset with `ma_engine_set_time_in_pcm_frames()` in case it needs to be resynchronized for some reason. To determine whether or not a sound is currently playing, use `ma_sound_is_playing()`. This will take the scheduled start and stop times into account. Whether or not a sound should loop can be controlled with `ma_sound_set_looping()`. Sounds will not be looping by default. Use `ma_sound_is_looping()` to determine whether or not a sound is looping. Use `ma_sound_at_end()` to determine whether or not a sound is currently at the end. For a looping sound this should never return true. Alternatively, you can configure a callback that will be fired when the sound reaches the end. Note that the callback is fired from the audio thread which means you cannot be uninitializing sound from the callback. To set the callback you can use `ma_sound_set_end_callback()`. Alternatively, if you're using `ma_sound_init_ex()`, you can pass it into the config like so: ```c soundConfig.endCallback = my_end_callback; soundConfig.pEndCallbackUserData = pMyEndCallbackUserData; ``` The end callback is declared like so: ```c void my_end_callback(void* pUserData, ma_sound* pSound) { ... } ``` Internally a sound wraps around a data source. Some APIs exist to control the underlying data source, mainly for convenience: ```c ma_sound_seek_to_pcm_frame(&sound, frameIndex); ma_sound_get_data_format(&sound, &format, &channels, &sampleRate, pChannelMap, channelMapCapacity); ma_sound_get_cursor_in_pcm_frames(&sound, &cursor); ma_sound_get_length_in_pcm_frames(&sound, &length); ``` Sound groups have the same API as sounds, only they are called `ma_sound_group`, and since they do not have any notion of a data source, anything relating to a data source is unavailable. Internally, sound data is loaded via the `ma_decoder` API which means by default it only supports file formats that have built-in support in miniaudio. You can extend this to support any kind of file format through the use of custom decoders. To do this you'll need to use a self-managed resource manager and configure it appropriately. See the "Resource Management" section below for details on how to set this up. 6. Resource Management ====================== Many programs will want to manage sound resources for things such as reference counting and streaming. This is supported by miniaudio via the `ma_resource_manager` API. The resource manager is mainly responsible for the following: * Loading of sound files into memory with reference counting. * Streaming of sound data. When loading a sound file, the resource manager will give you back a `ma_data_source` compatible object called `ma_resource_manager_data_source`. This object can be passed into any `ma_data_source` API which is how you can read and seek audio data. When loading a sound file, you specify whether or not you want the sound to be fully loaded into memory (and optionally pre-decoded) or streamed. When loading into memory, you can also specify whether or not you want the data to be loaded asynchronously. The example below is how you can initialize a resource manager using it's default configuration: ```c ma_resource_manager_config config; ma_resource_manager resourceManager; config = ma_resource_manager_config_init(); result = ma_resource_manager_init(&config, &resourceManager); if (result != MA_SUCCESS) { ma_device_uninit(&device); printf("Failed to initialize the resource manager."); return -1; } ``` You can configure the format, channels and sample rate of the decoded audio data. By default it will use the file's native data format, but you can configure it to use a consistent format. This is useful for offloading the cost of data conversion to load time rather than dynamically converting at mixing time. To do this, you configure the decoded format, channels and sample rate like the code below: ```c config = ma_resource_manager_config_init(); config.decodedFormat = device.playback.format; config.decodedChannels = device.playback.channels; config.decodedSampleRate = device.sampleRate; ``` In the code above, the resource manager will be configured so that any decoded audio data will be pre-converted at load time to the device's native data format. If instead you used defaults and the data format of the file did not match the device's data format, you would need to convert the data at mixing time which may be prohibitive in high-performance and large scale scenarios like games. Internally the resource manager uses the `ma_decoder` API to load sounds. This means by default it only supports decoders that are built into miniaudio. It's possible to support additional encoding formats through the use of custom decoders. To do so, pass in your `ma_decoding_backend_vtable` vtables into the resource manager config: ```c ma_decoding_backend_vtable* pCustomBackendVTables[] = { &g_ma_decoding_backend_vtable_libvorbis, &g_ma_decoding_backend_vtable_libopus }; ... resourceManagerConfig.ppCustomDecodingBackendVTables = pCustomBackendVTables; resourceManagerConfig.customDecodingBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]); resourceManagerConfig.pCustomDecodingBackendUserData = NULL; ``` This system can allow you to support any kind of file format. See the "Decoding" section for details on how to implement custom decoders. The miniaudio repository includes examples for Opus via libopus and libopusfile and Vorbis via libvorbis and libvorbisfile. Asynchronicity is achieved via a job system. When an operation needs to be performed, such as the decoding of a page, a job will be posted to a queue which will then be processed by a job thread. By default there will be only one job thread running, but this can be configured, like so: ```c config = ma_resource_manager_config_init(); config.jobThreadCount = MY_JOB_THREAD_COUNT; ``` By default job threads are managed internally by the resource manager, however you can also self manage your job threads if, for example, you want to integrate the job processing into your existing job infrastructure, or if you simply don't like the way the resource manager does it. To do this, just set the job thread count to 0 and process jobs manually. To process jobs, you first need to retrieve a job using `ma_resource_manager_next_job()` and then process it using `ma_job_process()`: ```c config = ma_resource_manager_config_init(); config.jobThreadCount = 0; // Don't manage any job threads internally. config.flags = MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING; // Optional. Makes `ma_resource_manager_next_job()` non-blocking. // ... Initialize your custom job threads ... void my_custom_job_thread(...) { for (;;) { ma_job job; ma_result result = ma_resource_manager_next_job(pMyResourceManager, &job); if (result != MA_SUCCESS) { if (result == MA_NO_DATA_AVAILABLE) { // No jobs are available. Keep going. Will only get this if the resource manager was initialized // with MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING. continue; } else if (result == MA_CANCELLED) { // MA_JOB_TYPE_QUIT was posted. Exit. break; } else { // Some other error occurred. break; } } ma_job_process(&job); } } ``` In the example above, the `MA_JOB_TYPE_QUIT` event is the used as the termination indicator, but you can use whatever you would like to terminate the thread. The call to `ma_resource_manager_next_job()` is blocking by default, but can be configured to be non-blocking by initializing the resource manager with the `MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING` configuration flag. Note that the `MA_JOB_TYPE_QUIT` will never be removed from the job queue. This is to give every thread the opportunity to catch the event and terminate naturally. When loading a file, it's sometimes convenient to be able to customize how files are opened and read instead of using standard `fopen()`, `fclose()`, etc. which is what miniaudio will use by default. This can be done by setting `pVFS` member of the resource manager's config: ```c // Initialize your custom VFS object. See documentation for VFS for information on how to do this. my_custom_vfs vfs = my_custom_vfs_init(); config = ma_resource_manager_config_init(); config.pVFS = &vfs; ``` This is particularly useful in programs like games where you want to read straight from an archive rather than the normal file system. If you do not specify a custom VFS, the resource manager will use the operating system's normal file operations. To load a sound file and create a data source, call `ma_resource_manager_data_source_init()`. When loading a sound you need to specify the file path and options for how the sounds should be loaded. By default a sound will be loaded synchronously. The returned data source is owned by the caller which means the caller is responsible for the allocation and freeing of the data source. Below is an example for initializing a data source: ```c ma_resource_manager_data_source dataSource; ma_result result = ma_resource_manager_data_source_init(pResourceManager, pFilePath, flags, &dataSource); if (result != MA_SUCCESS) { // Error. } // ... // A ma_resource_manager_data_source object is compatible with the `ma_data_source` API. To read data, just call // the `ma_data_source_read_pcm_frames()` like you would with any normal data source. result = ma_data_source_read_pcm_frames(&dataSource, pDecodedData, frameCount, &framesRead); if (result != MA_SUCCESS) { // Failed to read PCM frames. } // ... ma_resource_manager_data_source_uninit(&dataSource); ``` The `flags` parameter specifies how you want to perform loading of the sound file. It can be a combination of the following flags: ``` MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING ``` When no flags are specified (set to 0), the sound will be fully loaded into memory, but not decoded, meaning the raw file data will be stored in memory, and then dynamically decoded when `ma_data_source_read_pcm_frames()` is called. To instead decode the audio data before storing it in memory, use the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` flag. By default, the sound file will be loaded synchronously, meaning `ma_resource_manager_data_source_init()` will only return after the entire file has been loaded. This is good for simplicity, but can be prohibitively slow. You can instead load the sound asynchronously using the `MA_RESOURCE_MANAGER_DATA_SOURCE_ASYNC` flag. This will result in `ma_resource_manager_data_source_init()` returning quickly, but no data will be returned by `ma_data_source_read_pcm_frames()` until some data is available. When no data is available because the asynchronous decoding hasn't caught up, `MA_BUSY` will be returned by `ma_data_source_read_pcm_frames()`. For large sounds, it's often prohibitive to store the entire file in memory. To mitigate this, you can instead stream audio data which you can do by specifying the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag. When streaming, data will be decoded in 1 second pages. When a new page needs to be decoded, a job will be posted to the job queue and then subsequently processed in a job thread. The `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING` flag can be used so that the sound will loop when it reaches the end by default. It's recommended you use this flag when you want to have a looping streaming sound. If you try loading a very short sound as a stream, you will get a glitch. This is because the resource manager needs to pre-fill the initial buffer at initialization time, and if you don't specify the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING` flag, the resource manager will assume the sound is not looping and will stop filling the buffer when it reaches the end, therefore resulting in a discontinuous buffer. For in-memory sounds, reference counting is used to ensure the data is loaded only once. This means multiple calls to `ma_resource_manager_data_source_init()` with the same file path will result in the file data only being loaded once. Each call to `ma_resource_manager_data_source_init()` must be matched up with a call to `ma_resource_manager_data_source_uninit()`. Sometimes it can be useful for a program to register self-managed raw audio data and associate it with a file path. Use the `ma_resource_manager_register_*()` and `ma_resource_manager_unregister_*()` APIs to do this. `ma_resource_manager_register_decoded_data()` is used to associate a pointer to raw, self-managed decoded audio data in the specified data format with the specified name. Likewise, `ma_resource_manager_register_encoded_data()` is used to associate a pointer to raw self-managed encoded audio data (the raw file data) with the specified name. Note that these names need not be actual file paths. When `ma_resource_manager_data_source_init()` is called (without the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag), the resource manager will look for these explicitly registered data buffers and, if found, will use it as the backing data for the data source. Note that the resource manager does *not* make a copy of this data so it is up to the caller to ensure the pointer stays valid for its lifetime. Use `ma_resource_manager_unregister_data()` to unregister the self-managed data. You can also use `ma_resource_manager_register_file()` and `ma_resource_manager_unregister_file()` to register and unregister a file. It does not make sense to use the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag with a self-managed data pointer. 6.1. Asynchronous Loading and Synchronization --------------------------------------------- When loading asynchronously, it can be useful to poll whether or not loading has finished. Use `ma_resource_manager_data_source_result()` to determine this. For in-memory sounds, this will return `MA_SUCCESS` when the file has been *entirely* decoded. If the sound is still being decoded, `MA_BUSY` will be returned. Otherwise, some other error code will be returned if the sound failed to load. For streaming data sources, `MA_SUCCESS` will be returned when the first page has been decoded and the sound is ready to be played. If the first page is still being decoded, `MA_BUSY` will be returned. Otherwise, some other error code will be returned if the sound failed to load. In addition to polling, you can also use a simple synchronization object called a "fence" to wait for asynchronously loaded sounds to finish. This is called `ma_fence`. The advantage to using a fence is that it can be used to wait for a group of sounds to finish loading rather than waiting for sounds on an individual basis. There are two stages to loading a sound: * Initialization of the internal decoder; and * Completion of decoding of the file (the file is fully decoded) You can specify separate fences for each of the different stages. Waiting for the initialization of the internal decoder is important for when you need to know the sample format, channels and sample rate of the file. The example below shows how you could use a fence when loading a number of sounds: ```c // This fence will be released when all sounds are finished loading entirely. ma_fence fence; ma_fence_init(&fence); // This will be passed into the initialization routine for each sound. ma_resource_manager_pipeline_notifications notifications = ma_resource_manager_pipeline_notifications_init(); notifications.done.pFence = &fence; // Now load a bunch of sounds: for (iSound = 0; iSound < soundCount; iSound += 1) { ma_resource_manager_data_source_init(pResourceManager, pSoundFilePaths[iSound], flags, ¬ifications, &pSoundSources[iSound]); } // ... DO SOMETHING ELSE WHILE SOUNDS ARE LOADING ... // Wait for loading of sounds to finish. ma_fence_wait(&fence); ``` In the example above we used a fence for waiting until the entire file has been fully decoded. If you only need to wait for the initialization of the internal decoder to complete, you can use the `init` member of the `ma_resource_manager_pipeline_notifications` object: ```c notifications.init.pFence = &fence; ``` If a fence is not appropriate for your situation, you can instead use a callback that is fired on an individual sound basis. This is done in a very similar way to fences: ```c typedef struct { ma_async_notification_callbacks cb; void* pMyData; } my_notification; void my_notification_callback(ma_async_notification* pNotification) { my_notification* pMyNotification = (my_notification*)pNotification; // Do something in response to the sound finishing loading. } ... my_notification myCallback; myCallback.cb.onSignal = my_notification_callback; myCallback.pMyData = pMyData; ma_resource_manager_pipeline_notifications notifications = ma_resource_manager_pipeline_notifications_init(); notifications.done.pNotification = &myCallback; ma_resource_manager_data_source_init(pResourceManager, "my_sound.wav", flags, ¬ifications, &mySound); ``` In the example above we just extend the `ma_async_notification_callbacks` object and pass an instantiation into the `ma_resource_manager_pipeline_notifications` in the same way as we did with the fence, only we set `pNotification` instead of `pFence`. You can set both of these at the same time and they should both work as expected. If using the `pNotification` system, you need to ensure your `ma_async_notification_callbacks` object stays valid. 6.2. Resource Manager Implementation Details -------------------------------------------- Resources are managed in two main ways: * By storing the entire sound inside an in-memory buffer (referred to as a data buffer) * By streaming audio data on the fly (referred to as a data stream) A resource managed data source (`ma_resource_manager_data_source`) encapsulates a data buffer or data stream, depending on whether or not the data source was initialized with the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag. If so, it will make use of a `ma_resource_manager_data_stream` object. Otherwise it will use a `ma_resource_manager_data_buffer` object. Both of these objects are data sources which means they can be used with any `ma_data_source_*()` API. Another major feature of the resource manager is the ability to asynchronously decode audio files. This relieves the audio thread of time-consuming decoding which can negatively affect scalability due to the audio thread needing to complete it's work extremely quickly to avoid glitching. Asynchronous decoding is achieved through a job system. There is a central multi-producer, multi-consumer, fixed-capacity job queue. When some asynchronous work needs to be done, a job is posted to the queue which is then read by a job thread. The number of job threads can be configured for improved scalability, and job threads can all run in parallel without needing to worry about the order of execution (how this is achieved is explained below). When a sound is being loaded asynchronously, playback can begin before the sound has been fully decoded. This enables the application to start playback of the sound quickly, while at the same time allowing to resource manager to keep loading in the background. Since there may be less threads than the number of sounds being loaded at a given time, a simple scheduling system is used to keep decoding time balanced and fair. The resource manager solves this by splitting decoding into chunks called pages. By default, each page is 1 second long. When a page has been decoded, a new job will be posted to start decoding the next page. By dividing up decoding into pages, an individual sound shouldn't ever delay every other sound from having their first page decoded. Of course, when loading many sounds at the same time, there will always be an amount of time required to process jobs in the queue so in heavy load situations there will still be some delay. To determine if a data source is ready to have some frames read, use `ma_resource_manager_data_source_get_available_frames()`. This will return the number of frames available starting from the current position. 6.2.1. Job Queue ---------------- The resource manager uses a job queue which is multi-producer, multi-consumer, and fixed-capacity. This job queue is not currently lock-free, and instead uses a spinlock to achieve thread-safety. Only a fixed number of jobs can be allocated and inserted into the queue which is done through a lock-free data structure for allocating an index into a fixed sized array, with reference counting for mitigation of the ABA problem. The reference count is 32-bit. For many types of jobs it's important that they execute in a specific order. In these cases, jobs are executed serially. For the resource manager, serial execution of jobs is only required on a per-object basis (per data buffer or per data stream). Each of these objects stores an execution counter. When a job is posted it is associated with an execution counter. When the job is processed, it checks if the execution counter of the job equals the execution counter of the owning object and if so, processes the job. If the counters are not equal, the job will be posted back onto the job queue for later processing. When the job finishes processing the execution order of the main object is incremented. This system means the no matter how many job threads are executing, decoding of an individual sound will always get processed serially. The advantage to having multiple threads comes into play when loading multiple sounds at the same time. The resource manager's job queue is not 100% lock-free and will use a spinlock to achieve thread-safety for a very small section of code. This is only relevant when the resource manager uses more than one job thread. If only using a single job thread, which is the default, the lock should never actually wait in practice. The amount of time spent locking should be quite short, but it's something to be aware of for those who have pedantic lock-free requirements and need to use more than one job thread. There are plans to remove this lock in a future version. In addition, posting a job will release a semaphore, which on Win32 is implemented with `ReleaseSemaphore` and on POSIX platforms via a condition variable: ```c pthread_mutex_lock(&pSemaphore->lock); { pSemaphore->value += 1; pthread_cond_signal(&pSemaphore->cond); } pthread_mutex_unlock(&pSemaphore->lock); ``` Again, this is relevant for those with strict lock-free requirements in the audio thread. To avoid this, you can use non-blocking mode (via the `MA_JOB_QUEUE_FLAG_NON_BLOCKING` flag) and implement your own job processing routine (see the "Resource Manager" section above for details on how to do this). 6.2.2. Data Buffers ------------------- When the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag is excluded at initialization time, the resource manager will try to load the data into an in-memory data buffer. Before doing so, however, it will first check if the specified file is already loaded. If so, it will increment a reference counter and just use the already loaded data. This saves both time and memory. When the data buffer is uninitialized, the reference counter will be decremented. If the counter hits zero, the file will be unloaded. This is a detail to keep in mind because it could result in excessive loading and unloading of a sound. For example, the following sequence will result in a file be loaded twice, once after the other: ```c ma_resource_manager_data_source_init(pResourceManager, "my_file", ..., &myDataBuffer0); // Refcount = 1. Initial load. ma_resource_manager_data_source_uninit(&myDataBuffer0); // Refcount = 0. Unloaded. ma_resource_manager_data_source_init(pResourceManager, "my_file", ..., &myDataBuffer1); // Refcount = 1. Reloaded because previous uninit() unloaded it. ma_resource_manager_data_source_uninit(&myDataBuffer1); // Refcount = 0. Unloaded. ``` A binary search tree (BST) is used for storing data buffers as it has good balance between efficiency and simplicity. The key of the BST is a 64-bit hash of the file path that was passed into `ma_resource_manager_data_source_init()`. The advantage of using a hash is that it saves memory over storing the entire path, has faster comparisons, and results in a mostly balanced BST due to the random nature of the hash. The disadvantages are that file names are case-sensitive and there's a small chance of name collisions. If case-sensitivity is an issue, you should normalize your file names to upper- or lower-case before initializing your data sources. If name collisions become an issue, you'll need to change the name of one of the colliding names or just not use the resource manager. When a sound file has not already been loaded and the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC` flag is excluded, the file will be decoded synchronously by the calling thread. There are two options for controlling how the audio is stored in the data buffer - encoded or decoded. When the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` option is excluded, the raw file data will be stored in memory. Otherwise the sound will be decoded before storing it in memory. Synchronous loading is a very simple and standard process of simply adding an item to the BST, allocating a block of memory and then decoding (if `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` is specified). When the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC` flag is specified, loading of the data buffer is done asynchronously. In this case, a job is posted to the queue to start loading and then the function immediately returns, setting an internal result code to `MA_BUSY`. This result code is returned when the program calls `ma_resource_manager_data_source_result()`. When decoding has fully completed `MA_SUCCESS` will be returned. This can be used to know if loading has fully completed. When loading asynchronously, a single job is posted to the queue of the type `MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE`. This involves making a copy of the file path and associating it with job. When the job is processed by the job thread, it will first load the file using the VFS associated with the resource manager. When using a custom VFS, it's important that it be completely thread-safe because it will be used from one or more job threads at the same time. Individual files should only ever be accessed by one thread at a time, however. After opening the file via the VFS, the job will determine whether or not the file is being decoded. If not, it simply allocates a block of memory and loads the raw file contents into it and returns. On the other hand, when the file is being decoded, it will first allocate a decoder on the heap and initialize it. Then it will check if the length of the file is known. If so it will allocate a block of memory to store the decoded output and initialize it to silence. If the size is unknown, it will allocate room for one page. After memory has been allocated, the first page will be decoded. If the sound is shorter than a page, the result code will be set to `MA_SUCCESS` and the completion event will be signalled and loading is now complete. If, however, there is more to decode, a job with the code `MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE` is posted. This job will decode the next page and perform the same process if it reaches the end. If there is more to decode, the job will post another `MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE` job which will keep on happening until the sound has been fully decoded. For sounds of an unknown length, each page will be linked together as a linked list. Internally this is implemented via the `ma_paged_audio_buffer` object. 6.2.3. Data Streams ------------------- Data streams only ever store two pages worth of data for each instance. They are most useful for large sounds like music tracks in games that would consume too much memory if fully decoded in memory. After every frame from a page has been read, a job will be posted to load the next page which is done from the VFS. For data streams, the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC` flag will determine whether or not initialization of the data source waits until the two pages have been decoded. When unset, `ma_resource_manager_data_source_init()` will wait until the two pages have been loaded, otherwise it will return immediately. When frames are read from a data stream using `ma_resource_manager_data_source_read_pcm_frames()`, `MA_BUSY` will be returned if there are no frames available. If there are some frames available, but less than the number requested, `MA_SUCCESS` will be returned, but the actual number of frames read will be less than the number requested. Due to the asynchronous nature of data streams, seeking is also asynchronous. If the data stream is in the middle of a seek, `MA_BUSY` will be returned when trying to read frames. When `ma_resource_manager_data_source_read_pcm_frames()` results in a page getting fully consumed a job is posted to load the next page. This will be posted from the same thread that called `ma_resource_manager_data_source_read_pcm_frames()`. Data streams are uninitialized by posting a job to the queue, but the function won't return until that job has been processed. The reason for this is that the caller owns the data stream object and therefore miniaudio needs to ensure everything completes before handing back control to the caller. Also, if the data stream is uninitialized while pages are in the middle of decoding, they must complete before destroying any underlying object and the job system handles this cleanly. Note that when a new page needs to be loaded, a job will be posted to the resource manager's job thread from the audio thread. You must keep in mind the details mentioned in the "Job Queue" section above regarding locking when posting an event if you require a strictly lock-free audio thread. 7. Node Graph ============= miniaudio's routing infrastructure follows a node graph paradigm. The idea is that you create a node whose outputs are attached to inputs of another node, thereby creating a graph. There are different types of nodes, with each node in the graph processing input data to produce output, which is then fed through the chain. Each node in the graph can apply their own custom effects. At the start of the graph will usually be one or more data source nodes which have no inputs and instead pull their data from a data source. At the end of the graph is an endpoint which represents the end of the chain and is where the final output is ultimately extracted from. Each node has a number of input buses and a number of output buses. An output bus from a node is attached to an input bus of another. Multiple nodes can connect their output buses to another node's input bus, in which case their outputs will be mixed before processing by the node. Below is a diagram that illustrates a hypothetical node graph setup: ``` >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Data flows left to right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +---------------+ +-----------------+ | Data Source 1 =----+ +----------+ +----= Low Pass Filter =----+ +---------------+ | | =----+ +-----------------+ | +----------+ +----= Splitter | +----= ENDPOINT | +---------------+ | | =----+ +-----------------+ | +----------+ | Data Source 2 =----+ +----------+ +----= Echo / Delay =----+ +---------------+ +-----------------+ ``` In the above graph, it starts with two data sources whose outputs are attached to the input of a splitter node. It's at this point that the two data sources are mixed. After mixing, the splitter performs it's processing routine and produces two outputs which is simply a duplication of the input stream. One output is attached to a low pass filter, whereas the other output is attached to a echo/delay. The outputs of the low pass filter and the echo are attached to the endpoint, and since they're both connected to the same input bus, they'll be mixed. Each input bus must be configured to accept the same number of channels, but the number of channels used by input buses can be different to the number of channels for output buses in which case miniaudio will automatically convert the input data to the output channel count before processing. The number of channels of an output bus of one node must match the channel count of the input bus it's attached to. The channel counts cannot be changed after the node has been initialized. If you attempt to attach an output bus to an input bus with a different channel count, attachment will fail. To use a node graph, you first need to initialize a `ma_node_graph` object. This is essentially a container around the entire graph. The `ma_node_graph` object is required for some thread-safety issues which will be explained later. A `ma_node_graph` object is initialized using miniaudio's standard config/init system: ```c ma_node_graph_config nodeGraphConfig = ma_node_graph_config_init(myChannelCount); result = ma_node_graph_init(&nodeGraphConfig, NULL, &nodeGraph); // Second parameter is a pointer to allocation callbacks. if (result != MA_SUCCESS) { // Failed to initialize node graph. } ``` When you initialize the node graph, you're specifying the channel count of the endpoint. The endpoint is a special node which has one input bus and one output bus, both of which have the same channel count, which is specified in the config. Any nodes that connect directly to the endpoint must be configured such that their output buses have the same channel count. When you read audio data from the node graph, it'll have the channel count you specified in the config. To read data from the graph: ```c ma_uint32 framesRead; result = ma_node_graph_read_pcm_frames(&nodeGraph, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { // Failed to read data from the node graph. } ``` When you read audio data, miniaudio starts at the node graph's endpoint node which then pulls in data from its input attachments, which in turn recursively pull in data from their inputs, and so on. At the start of the graph there will be some kind of data source node which will have zero inputs and will instead read directly from a data source. The base nodes don't literally need to read from a `ma_data_source` object, but they will always have some kind of underlying object that sources some kind of audio. The `ma_data_source_node` node can be used to read from a `ma_data_source`. Data is always in floating-point format and in the number of channels you specified when the graph was initialized. The sample rate is defined by the underlying data sources. It's up to you to ensure they use a consistent and appropriate sample rate. The `ma_node` API is designed to allow custom nodes to be implemented with relative ease, but miniaudio includes a few stock nodes for common functionality. This is how you would initialize a node which reads directly from a data source (`ma_data_source_node`) which is an example of one of the stock nodes that comes with miniaudio: ```c ma_data_source_node_config config = ma_data_source_node_config_init(pMyDataSource); ma_data_source_node dataSourceNode; result = ma_data_source_node_init(&nodeGraph, &config, NULL, &dataSourceNode); if (result != MA_SUCCESS) { // Failed to create data source node. } ``` The data source node will use the output channel count to determine the channel count of the output bus. There will be 1 output bus and 0 input buses (data will be drawn directly from the data source). The data source must output to floating-point (`ma_format_f32`) or else an error will be returned from `ma_data_source_node_init()`. By default the node will not be attached to the graph. To do so, use `ma_node_attach_output_bus()`: ```c result = ma_node_attach_output_bus(&dataSourceNode, 0, ma_node_graph_get_endpoint(&nodeGraph), 0); if (result != MA_SUCCESS) { // Failed to attach node. } ``` The code above connects the data source node directly to the endpoint. Since the data source node has only a single output bus, the index will always be 0. Likewise, the endpoint only has a single input bus which means the input bus index will also always be 0. To detach a specific output bus, use `ma_node_detach_output_bus()`. To detach all output buses, use `ma_node_detach_all_output_buses()`. If you want to just move the output bus from one attachment to another, you do not need to detach first. You can just call `ma_node_attach_output_bus()` and it'll deal with it for you. Less frequently you may want to create a specialized node. This will be a node where you implement your own processing callback to apply a custom effect of some kind. This is similar to initializing one of the stock node types, only this time you need to specify a pointer to a vtable containing a pointer to the processing function and the number of input and output buses. Example: ```c static void my_custom_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { // Do some processing of ppFramesIn (one stream of audio data per input bus) const float* pFramesIn_0 = ppFramesIn[0]; // Input bus @ index 0. const float* pFramesIn_1 = ppFramesIn[1]; // Input bus @ index 1. float* pFramesOut_0 = ppFramesOut[0]; // Output bus @ index 0. // Do some processing. On input, `pFrameCountIn` will be the number of input frames in each // buffer in `ppFramesIn` and `pFrameCountOut` will be the capacity of each of the buffers // in `ppFramesOut`. On output, `pFrameCountIn` should be set to the number of input frames // your node consumed and `pFrameCountOut` should be set the number of output frames that // were produced. // // You should process as many frames as you can. If your effect consumes input frames at the // same rate as output frames (always the case, unless you're doing resampling), you need // only look at `ppFramesOut` and process that exact number of frames. If you're doing // resampling, you'll need to be sure to set both `pFrameCountIn` and `pFrameCountOut` // properly. } static ma_node_vtable my_custom_node_vtable = { my_custom_node_process_pcm_frames, // The function that will be called to process your custom node. This is where you'd implement your effect processing. NULL, // Optional. A callback for calculating the number of input frames that are required to process a specified number of output frames. 2, // 2 input buses. 1, // 1 output bus. 0 // Default flags. }; ... // Each bus needs to have a channel count specified. To do this you need to specify the channel // counts in an array and then pass that into the node config. ma_uint32 inputChannels[2]; // Equal in size to the number of input channels specified in the vtable. ma_uint32 outputChannels[1]; // Equal in size to the number of output channels specified in the vtable. inputChannels[0] = channelsIn; inputChannels[1] = channelsIn; outputChannels[0] = channelsOut; ma_node_config nodeConfig = ma_node_config_init(); nodeConfig.vtable = &my_custom_node_vtable; nodeConfig.pInputChannels = inputChannels; nodeConfig.pOutputChannels = outputChannels; ma_node_base node; result = ma_node_init(&nodeGraph, &nodeConfig, NULL, &node); if (result != MA_SUCCESS) { // Failed to initialize node. } ``` When initializing a custom node, as in the code above, you'll normally just place your vtable in static space. The number of input and output buses are specified as part of the vtable. If you need a variable number of buses on a per-node bases, the vtable should have the relevant bus count set to `MA_NODE_BUS_COUNT_UNKNOWN`. In this case, the bus count should be set in the node config: ```c static ma_node_vtable my_custom_node_vtable = { my_custom_node_process_pcm_frames, // The function that will be called process your custom node. This is where you'd implement your effect processing. NULL, // Optional. A callback for calculating the number of input frames that are required to process a specified number of output frames. MA_NODE_BUS_COUNT_UNKNOWN, // The number of input buses is determined on a per-node basis. 1, // 1 output bus. 0 // Default flags. }; ... ma_node_config nodeConfig = ma_node_config_init(); nodeConfig.vtable = &my_custom_node_vtable; nodeConfig.inputBusCount = myBusCount; // <-- Since the vtable specifies MA_NODE_BUS_COUNT_UNKNOWN, the input bus count should be set here. nodeConfig.pInputChannels = inputChannels; // <-- Make sure there are nodeConfig.inputBusCount elements in this array. nodeConfig.pOutputChannels = outputChannels; // <-- The vtable specifies 1 output bus, so there must be 1 element in this array. ``` In the above example it's important to never set the `inputBusCount` and `outputBusCount` members to anything other than their defaults if the vtable specifies an explicit count. They can only be set if the vtable specifies MA_NODE_BUS_COUNT_UNKNOWN in the relevant bus count. Most often you'll want to create a structure to encapsulate your node with some extra data. You need to make sure the `ma_node_base` object is your first member of the structure: ```c typedef struct { ma_node_base base; // <-- Make sure this is always the first member. float someCustomData; } my_custom_node; ``` By doing this, your object will be compatible with all `ma_node` APIs and you can attach it to the graph just like any other node. In the custom processing callback (`my_custom_node_process_pcm_frames()` in the example above), the number of channels for each bus is what was specified by the config when the node was initialized with `ma_node_init()`. In addition, all attachments to each of the input buses will have been pre-mixed by miniaudio. The config allows you to specify different channel counts for each individual input and output bus. It's up to the effect to handle it appropriate, and if it can't, return an error in it's initialization routine. Custom nodes can be assigned some flags to describe their behaviour. These are set via the vtable and include the following: +-----------------------------------------+---------------------------------------------------+ | Flag Name | Description | +-----------------------------------------+---------------------------------------------------+ | MA_NODE_FLAG_PASSTHROUGH | Useful for nodes that do not do any kind of audio | | | processing, but are instead used for tracking | | | time, handling events, etc. Also used by the | | | internal endpoint node. It reads directly from | | | the input bus to the output bus. Nodes with this | | | flag must have exactly 1 input bus and 1 output | | | bus, and both buses must have the same channel | | | counts. | +-----------------------------------------+---------------------------------------------------+ | MA_NODE_FLAG_CONTINUOUS_PROCESSING | Causes the processing callback to be called even | | | when no data is available to be read from input | | | attachments. When a node has at least one input | | | bus, but there are no inputs attached or the | | | inputs do not deliver any data, the node's | | | processing callback will not get fired. This flag | | | will make it so the callback is always fired | | | regardless of whether or not any input data is | | | received. This is useful for effects like | | | echos where there will be a tail of audio data | | | that still needs to be processed even when the | | | original data sources have reached their ends. It | | | may also be useful for nodes that must always | | | have their processing callback fired when there | | | are no inputs attached. | +-----------------------------------------+---------------------------------------------------+ | MA_NODE_FLAG_ALLOW_NULL_INPUT | Used in conjunction with | | | `MA_NODE_FLAG_CONTINUOUS_PROCESSING`. When this | | | is set, the `ppFramesIn` parameter of the | | | processing callback will be set to NULL when | | | there are no input frames are available. When | | | this is unset, silence will be posted to the | | | processing callback. | +-----------------------------------------+---------------------------------------------------+ | MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES | Used to tell miniaudio that input and output | | | frames are processed at different rates. You | | | should set this for any nodes that perform | | | resampling. | +-----------------------------------------+---------------------------------------------------+ | MA_NODE_FLAG_SILENT_OUTPUT | Used to tell miniaudio that a node produces only | | | silent output. This is useful for nodes where you | | | don't want the output to contribute to the final | | | mix. An example might be if you want split your | | | stream and have one branch be output to a file. | | | When using this flag, you should avoid writing to | | | the output buffer of the node's processing | | | callback because miniaudio will ignore it anyway. | +-----------------------------------------+---------------------------------------------------+ If you need to make a copy of an audio stream for effect processing you can use a splitter node called `ma_splitter_node`. This takes has 1 input bus and splits the stream into 2 output buses. You can use it like this: ```c ma_splitter_node_config splitterNodeConfig = ma_splitter_node_config_init(channels); ma_splitter_node splitterNode; result = ma_splitter_node_init(&nodeGraph, &splitterNodeConfig, NULL, &splitterNode); if (result != MA_SUCCESS) { // Failed to create node. } // Attach your output buses to two different input buses (can be on two different nodes). ma_node_attach_output_bus(&splitterNode, 0, ma_node_graph_get_endpoint(&nodeGraph), 0); // Attach directly to the endpoint. ma_node_attach_output_bus(&splitterNode, 1, &myEffectNode, 0); // Attach to input bus 0 of some effect node. ``` The volume of an output bus can be configured on a per-bus basis: ```c ma_node_set_output_bus_volume(&splitterNode, 0, 0.5f); ma_node_set_output_bus_volume(&splitterNode, 1, 0.5f); ``` In the code above we're using the splitter node from before and changing the volume of each of the copied streams. You can start and stop a node with the following: ```c ma_node_set_state(&splitterNode, ma_node_state_started); // The default state. ma_node_set_state(&splitterNode, ma_node_state_stopped); ``` By default the node is in a started state, but since it won't be connected to anything won't actually be invoked by the node graph until it's connected. When you stop a node, data will not be read from any of its input connections. You can use this property to stop a group of sounds atomically. You can configure the initial state of a node in it's config: ```c nodeConfig.initialState = ma_node_state_stopped; ``` Note that for the stock specialized nodes, all of their configs will have a `nodeConfig` member which is the config to use with the base node. This is where the initial state can be configured for specialized nodes: ```c dataSourceNodeConfig.nodeConfig.initialState = ma_node_state_stopped; ``` When using a specialized node like `ma_data_source_node` or `ma_splitter_node`, be sure to not modify the `vtable` member of the `nodeConfig` object. 7.1. Timing ----------- The node graph supports starting and stopping nodes at scheduled times. This is especially useful for data source nodes where you want to get the node set up, but only start playback at a specific time. There are two clocks: local and global. A local clock is per-node, whereas the global clock is per graph. Scheduling starts and stops can only be done based on the global clock because the local clock will not be running while the node is stopped. The global clocks advances whenever `ma_node_graph_read_pcm_frames()` is called. On the other hand, the local clock only advances when the node's processing callback is fired, and is advanced based on the output frame count. To retrieve the global time, use `ma_node_graph_get_time()`. The global time can be set with `ma_node_graph_set_time()` which might be useful if you want to do seeking on a global timeline. Getting and setting the local time is similar. Use `ma_node_get_time()` to retrieve the local time, and `ma_node_set_time()` to set the local time. The global and local times will be advanced by the audio thread, so care should be taken to avoid data races. Ideally you should avoid calling these outside of the node processing callbacks which are always run on the audio thread. There is basic support for scheduling the starting and stopping of nodes. You can only schedule one start and one stop at a time. This is mainly intended for putting nodes into a started or stopped state in a frame-exact manner. Without this mechanism, starting and stopping of a node is limited to the resolution of a call to `ma_node_graph_read_pcm_frames()` which would typically be in blocks of several milliseconds. The following APIs can be used for scheduling node states: ```c ma_node_set_state_time() ma_node_get_state_time() ``` The time is absolute and must be based on the global clock. An example is below: ```c ma_node_set_state_time(&myNode, ma_node_state_started, sampleRate*1); // Delay starting to 1 second. ma_node_set_state_time(&myNode, ma_node_state_stopped, sampleRate*5); // Delay stopping to 5 seconds. ``` An example for changing the state using a relative time. ```c ma_node_set_state_time(&myNode, ma_node_state_started, sampleRate*1 + ma_node_graph_get_time(&myNodeGraph)); ma_node_set_state_time(&myNode, ma_node_state_stopped, sampleRate*5 + ma_node_graph_get_time(&myNodeGraph)); ``` Note that due to the nature of multi-threading the times may not be 100% exact. If this is an issue, consider scheduling state changes from within a processing callback. An idea might be to have some kind of passthrough trigger node that is used specifically for tracking time and handling events. 7.2. Thread Safety and Locking ------------------------------ When processing audio, it's ideal not to have any kind of locking in the audio thread. Since it's expected that `ma_node_graph_read_pcm_frames()` would be run on the audio thread, it does so without the use of any locks. This section discusses the implementation used by miniaudio and goes over some of the compromises employed by miniaudio to achieve this goal. Note that the current implementation may not be ideal - feedback and critiques are most welcome. The node graph API is not *entirely* lock-free. Only `ma_node_graph_read_pcm_frames()` is expected to be lock-free. Attachment, detachment and uninitialization of nodes use locks to simplify the implementation, but are crafted in a way such that such locking is not required when reading audio data from the graph. Locking in these areas are achieved by means of spinlocks. The main complication with keeping `ma_node_graph_read_pcm_frames()` lock-free stems from the fact that a node can be uninitialized, and it's memory potentially freed, while in the middle of being processed on the audio thread. There are times when the audio thread will be referencing a node, which means the uninitialization process of a node needs to make sure it delays returning until the audio thread is finished so that control is not handed back to the caller thereby giving them a chance to free the node's memory. When the audio thread is processing a node, it does so by reading from each of the output buses of the node. In order for a node to process data for one of its output buses, it needs to read from each of its input buses, and so on an so forth. It follows that once all output buses of a node are detached, the node as a whole will be disconnected and no further processing will occur unless it's output buses are reattached, which won't be happening when the node is being uninitialized. By having `ma_node_detach_output_bus()` wait until the audio thread is finished with it, we can simplify a few things, at the expense of making `ma_node_detach_output_bus()` a bit slower. By doing this, the implementation of `ma_node_uninit()` becomes trivial - just detach all output nodes, followed by each of the attachments to each of its input nodes, and then do any final clean up. With the above design, the worst-case scenario is `ma_node_detach_output_bus()` taking as long as it takes to process the output bus being detached. This will happen if it's called at just the wrong moment where the audio thread has just iterated it and has just started processing. The caller of `ma_node_detach_output_bus()` will stall until the audio thread is finished, which includes the cost of recursively processing its inputs. This is the biggest compromise made with the approach taken by miniaudio for its lock-free processing system. The cost of detaching nodes earlier in the pipeline (data sources, for example) will be cheaper than the cost of detaching higher level nodes, such as some kind of final post-processing endpoint. If you need to do mass detachments, detach starting from the lowest level nodes and work your way towards the final endpoint node (but don't try detaching the node graph's endpoint). If the audio thread is not running, detachment will be fast and detachment in any order will be the same. The reason nodes need to wait for their input attachments to complete is due to the potential for desyncs between data sources. If the node was to terminate processing mid way through processing its inputs, there's a chance that some of the underlying data sources will have been read, but then others not. That will then result in a potential desynchronization when detaching and reattaching higher-level nodes. A possible solution to this is to have an option when detaching to terminate processing before processing all input attachments which should be fairly simple. Another compromise, albeit less significant, is locking when attaching and detaching nodes. This locking is achieved by means of a spinlock in order to reduce memory overhead. A lock is present for each input bus and output bus. When an output bus is connected to an input bus, both the output bus and input bus is locked. This locking is specifically for attaching and detaching across different threads and does not affect `ma_node_graph_read_pcm_frames()` in any way. The locking and unlocking is mostly self-explanatory, but a slightly less intuitive aspect comes into it when considering that iterating over attachments must not break as a result of attaching or detaching a node while iteration is occurring. Attaching and detaching are both quite simple. When an output bus of a node is attached to an input bus of another node, it's added to a linked list. Basically, an input bus is a linked list, where each item in the list is and output bus. We have some intentional (and convenient) restrictions on what can done with the linked list in order to simplify the implementation. First of all, whenever something needs to iterate over the list, it must do so in a forward direction. Backwards iteration is not supported. Also, items can only be added to the start of the list. The linked list is a doubly-linked list where each item in the list (an output bus) holds a pointer to the next item in the list, and another to the previous item. A pointer to the previous item is only required for fast detachment of the node - it is never used in iteration. This is an important property because it means from the perspective of iteration, attaching and detaching of an item can be done with a single atomic assignment. This is exploited by both the attachment and detachment process. When attaching the node, the first thing that is done is the setting of the local "next" and "previous" pointers of the node. After that, the item is "attached" to the list by simply performing an atomic exchange with the head pointer. After that, the node is "attached" to the list from the perspective of iteration. Even though the "previous" pointer of the next item hasn't yet been set, from the perspective of iteration it's been attached because iteration will only be happening in a forward direction which means the "previous" pointer won't actually ever get used. The same general process applies to detachment. See `ma_node_attach_output_bus()` and `ma_node_detach_output_bus()` for the implementation of this mechanism. 8. Decoding =========== The `ma_decoder` API is used for reading audio files. Decoders are completely decoupled from devices and can be used independently. Built-in support is included for the following formats: +---------+ | Format | +---------+ | WAV | | MP3 | | FLAC | +---------+ You can disable the built-in decoders by specifying one or more of the following options before the miniaudio implementation: ```c #define MA_NO_WAV #define MA_NO_MP3 #define MA_NO_FLAC ``` miniaudio supports the ability to plug in custom decoders. See the section below for details on how to use custom decoders. A decoder can be initialized from a file with `ma_decoder_init_file()`, a block of memory with `ma_decoder_init_memory()`, or from data delivered via callbacks with `ma_decoder_init()`. Here is an example for loading a decoder from a file: ```c ma_decoder decoder; ma_result result = ma_decoder_init_file("MySong.mp3", NULL, &decoder); if (result != MA_SUCCESS) { return false; // An error occurred. } ... ma_decoder_uninit(&decoder); ``` When initializing a decoder, you can optionally pass in a pointer to a `ma_decoder_config` object (the `NULL` argument in the example above) which allows you to configure the output format, channel count, sample rate and channel map: ```c ma_decoder_config config = ma_decoder_config_init(ma_format_f32, 2, 48000); ``` When passing in `NULL` for decoder config in `ma_decoder_init*()`, the output format will be the same as that defined by the decoding backend. Data is read from the decoder as PCM frames. This will output the number of PCM frames actually read. If this is less than the requested number of PCM frames it means you've reached the end. The return value will be `MA_AT_END` if no samples have been read and the end has been reached. ```c ma_result result = ma_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead, &framesRead); if (framesRead < framesToRead) { // Reached the end. } ``` You can also seek to a specific frame like so: ```c ma_result result = ma_decoder_seek_to_pcm_frame(pDecoder, targetFrame); if (result != MA_SUCCESS) { return false; // An error occurred. } ``` If you want to loop back to the start, you can simply seek back to the first PCM frame: ```c ma_decoder_seek_to_pcm_frame(pDecoder, 0); ``` When loading a decoder, miniaudio uses a trial and error technique to find the appropriate decoding backend. This can be unnecessarily inefficient if the type is already known. In this case you can use `encodingFormat` variable in the device config to specify a specific encoding format you want to decode: ```c decoderConfig.encodingFormat = ma_encoding_format_wav; ``` See the `ma_encoding_format` enum for possible encoding formats. The `ma_decoder_init_file()` API will try using the file extension to determine which decoding backend to prefer. 8.1. Custom Decoders -------------------- It's possible to implement a custom decoder and plug it into miniaudio. This is extremely useful when you want to use the `ma_decoder` API, but need to support an encoding format that's not one of the stock formats supported by miniaudio. This can be put to particularly good use when using the `ma_engine` and/or `ma_resource_manager` APIs because they use `ma_decoder` internally. If, for example, you wanted to support Opus, you can do so with a custom decoder (there if a reference Opus decoder in the "extras" folder of the miniaudio repository which uses libopus + libopusfile). A custom decoder must implement a data source. A vtable called `ma_decoding_backend_vtable` needs to be implemented which is then passed into the decoder config: ```c ma_decoding_backend_vtable* pCustomBackendVTables[] = { &g_ma_decoding_backend_vtable_libvorbis, &g_ma_decoding_backend_vtable_libopus }; ... decoderConfig = ma_decoder_config_init_default(); decoderConfig.pCustomBackendUserData = NULL; decoderConfig.ppCustomBackendVTables = pCustomBackendVTables; decoderConfig.customBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]); ``` The `ma_decoding_backend_vtable` vtable has the following functions: ``` onInit onInitFile onInitFileW onInitMemory onUninit ``` There are only two functions that must be implemented - `onInit` and `onUninit`. The other functions can be implemented for a small optimization for loading from a file path or memory. If these are not specified, miniaudio will deal with it for you via a generic implementation. When you initialize a custom data source (by implementing the `onInit` function in the vtable) you will need to output a pointer to a `ma_data_source` which implements your custom decoder. See the section about data sources for details on how to implement this. Alternatively, see the "custom_decoders" example in the miniaudio repository. The `onInit` function takes a pointer to some callbacks for the purpose of reading raw audio data from some arbitrary source. You'll use these functions to read from the raw data and perform the decoding. When you call them, you will pass in the `pReadSeekTellUserData` pointer to the relevant parameter. The `pConfig` parameter in `onInit` can be used to configure the backend if appropriate. It's only used as a hint and can be ignored. However, if any of the properties are relevant to your decoder, an optimal implementation will handle the relevant properties appropriately. If memory allocation is required, it should be done so via the specified allocation callbacks if possible (the `pAllocationCallbacks` parameter). If an error occurs when initializing the decoder, you should leave `ppBackend` unset, or set to NULL, and make sure everything is cleaned up appropriately and an appropriate result code returned. When multiple custom backends are specified, miniaudio will cycle through the vtables in the order they're listed in the array that's passed into the decoder config so it's important that your initialization routine is clean. When a decoder is uninitialized, the `onUninit` callback will be fired which will give you an opportunity to clean up and internal data. 9. Encoding =========== The `ma_encoding` API is used for writing audio files. The only supported output format is WAV. This can be disabled by specifying the following option before the implementation of miniaudio: ```c #define MA_NO_WAV ``` An encoder can be initialized to write to a file with `ma_encoder_init_file()` or from data delivered via callbacks with `ma_encoder_init()`. Below is an example for initializing an encoder to output to a file. ```c ma_encoder_config config = ma_encoder_config_init(ma_encoding_format_wav, FORMAT, CHANNELS, SAMPLE_RATE); ma_encoder encoder; ma_result result = ma_encoder_init_file("my_file.wav", &config, &encoder); if (result != MA_SUCCESS) { // Error } ... ma_encoder_uninit(&encoder); ``` When initializing an encoder you must specify a config which is initialized with `ma_encoder_config_init()`. Here you must specify the file type, the output sample format, output channel count and output sample rate. The following file types are supported: +------------------------+-------------+ | Enum | Description | +------------------------+-------------+ | ma_encoding_format_wav | WAV | +------------------------+-------------+ If the format, channel count or sample rate is not supported by the output file type an error will be returned. The encoder will not perform data conversion so you will need to convert it before outputting any audio data. To output audio data, use `ma_encoder_write_pcm_frames()`, like in the example below: ```c ma_uint64 framesWritten; result = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite, &framesWritten); if (result != MA_SUCCESS) { ... handle error ... } ``` The `framesWritten` variable will contain the number of PCM frames that were actually written. This is optionally and you can pass in `NULL` if you need this. Encoders must be uninitialized with `ma_encoder_uninit()`. 10. Data Conversion =================== A data conversion API is included with miniaudio which supports the majority of data conversion requirements. This supports conversion between sample formats, channel counts (with channel mapping) and sample rates. 10.1. Sample Format Conversion ------------------------------ Conversion between sample formats is achieved with the `ma_pcm_*_to_*()`, `ma_pcm_convert()` and `ma_convert_pcm_frames_format()` APIs. Use `ma_pcm_*_to_*()` to convert between two specific formats. Use `ma_pcm_convert()` to convert based on a `ma_format` variable. Use `ma_convert_pcm_frames_format()` to convert PCM frames where you want to specify the frame count and channel count as a variable instead of the total sample count. 10.1.1. Dithering ----------------- Dithering can be set using the ditherMode parameter. The different dithering modes include the following, in order of efficiency: +-----------+--------------------------+ | Type | Enum Token | +-----------+--------------------------+ | None | ma_dither_mode_none | | Rectangle | ma_dither_mode_rectangle | | Triangle | ma_dither_mode_triangle | +-----------+--------------------------+ Note that even if the dither mode is set to something other than `ma_dither_mode_none`, it will be ignored for conversions where dithering is not needed. Dithering is available for the following conversions: ``` s16 -> u8 s24 -> u8 s32 -> u8 f32 -> u8 s24 -> s16 s32 -> s16 f32 -> s16 ``` Note that it is not an error to pass something other than ma_dither_mode_none for conversions where dither is not used. It will just be ignored. 10.2. Channel Conversion ------------------------ Channel conversion is used for channel rearrangement and conversion from one channel count to another. The `ma_channel_converter` API is used for channel conversion. Below is an example of initializing a simple channel converter which converts from mono to stereo. ```c ma_channel_converter_config config = ma_channel_converter_config_init( ma_format, // Sample format 1, // Input channels NULL, // Input channel map 2, // Output channels NULL, // Output channel map ma_channel_mix_mode_default); // The mixing algorithm to use when combining channels. result = ma_channel_converter_init(&config, NULL, &converter); if (result != MA_SUCCESS) { // Error. } ``` To perform the conversion simply call `ma_channel_converter_process_pcm_frames()` like so: ```c ma_result result = ma_channel_converter_process_pcm_frames(&converter, pFramesOut, pFramesIn, frameCount); if (result != MA_SUCCESS) { // Error. } ``` It is up to the caller to ensure the output buffer is large enough to accommodate the new PCM frames. Input and output PCM frames are always interleaved. Deinterleaved layouts are not supported. 10.2.1. Channel Mapping ----------------------- In addition to converting from one channel count to another, like the example above, the channel converter can also be used to rearrange channels. When initializing the channel converter, you can optionally pass in channel maps for both the input and output frames. If the channel counts are the same, and each channel map contains the same channel positions with the exception that they're in a different order, a simple shuffling of the channels will be performed. If, however, there is not a 1:1 mapping of channel positions, or the channel counts differ, the input channels will be mixed based on a mixing mode which is specified when initializing the `ma_channel_converter_config` object. When converting from mono to multi-channel, the mono channel is simply copied to each output channel. When going the other way around, the audio of each output channel is simply averaged and copied to the mono channel. In more complicated cases blending is used. The `ma_channel_mix_mode_simple` mode will drop excess channels and silence extra channels. For example, converting from 4 to 2 channels, the 3rd and 4th channels will be dropped, whereas converting from 2 to 4 channels will put silence into the 3rd and 4th channels. The `ma_channel_mix_mode_rectangle` mode uses spacial locality based on a rectangle to compute a simple distribution between input and output. Imagine sitting in the middle of a room, with speakers on the walls representing channel positions. The `MA_CHANNEL_FRONT_LEFT` position can be thought of as being in the corner of the front and left walls. Finally, the `ma_channel_mix_mode_custom_weights` mode can be used to use custom user-defined weights. Custom weights can be passed in as the last parameter of `ma_channel_converter_config_init()`. Predefined channel maps can be retrieved with `ma_channel_map_init_standard()`. This takes a `ma_standard_channel_map` enum as its first parameter, which can be one of the following: +-----------------------------------+-----------------------------------------------------------+ | Name | Description | +-----------------------------------+-----------------------------------------------------------+ | ma_standard_channel_map_default | Default channel map used by miniaudio. See below. | | ma_standard_channel_map_microsoft | Channel map used by Microsoft's bitfield channel maps. | | ma_standard_channel_map_alsa | Default ALSA channel map. | | ma_standard_channel_map_rfc3551 | RFC 3551. Based on AIFF. | | ma_standard_channel_map_flac | FLAC channel map. | | ma_standard_channel_map_vorbis | Vorbis channel map. | | ma_standard_channel_map_sound4 | FreeBSD's sound(4). | | ma_standard_channel_map_sndio | sndio channel map. http://www.sndio.org/tips.html. | | ma_standard_channel_map_webaudio | https://webaudio.github.io/web-audio-api/#ChannelOrdering | +-----------------------------------+-----------------------------------------------------------+ Below are the channel maps used by default in miniaudio (`ma_standard_channel_map_default`): +---------------+---------------------------------+ | Channel Count | Mapping | +---------------+---------------------------------+ | 1 (Mono) | 0: MA_CHANNEL_MONO | +---------------+---------------------------------+ | 2 (Stereo) | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT | +---------------+---------------------------------+ | 3 | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER | +---------------+---------------------------------+ | 4 (Surround) | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER
| | | 3: MA_CHANNEL_BACK_CENTER | +---------------+---------------------------------+ | 5 | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER
| | | 3: MA_CHANNEL_BACK_LEFT
| | | 4: MA_CHANNEL_BACK_RIGHT | +---------------+---------------------------------+ | 6 (5.1) | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER
| | | 3: MA_CHANNEL_LFE
| | | 4: MA_CHANNEL_SIDE_LEFT
| | | 5: MA_CHANNEL_SIDE_RIGHT | +---------------+---------------------------------+ | 7 | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER
| | | 3: MA_CHANNEL_LFE
| | | 4: MA_CHANNEL_BACK_CENTER
| | | 4: MA_CHANNEL_SIDE_LEFT
| | | 5: MA_CHANNEL_SIDE_RIGHT | +---------------+---------------------------------+ | 8 (7.1) | 0: MA_CHANNEL_FRONT_LEFT
| | | 1: MA_CHANNEL_FRONT_RIGHT
| | | 2: MA_CHANNEL_FRONT_CENTER
| | | 3: MA_CHANNEL_LFE
| | | 4: MA_CHANNEL_BACK_LEFT
| | | 5: MA_CHANNEL_BACK_RIGHT
| | | 6: MA_CHANNEL_SIDE_LEFT
| | | 7: MA_CHANNEL_SIDE_RIGHT | +---------------+---------------------------------+ | Other | All channels set to 0. This | | | is equivalent to the same | | | mapping as the device. | +---------------+---------------------------------+ 10.3. Resampling ---------------- Resampling is achieved with the `ma_resampler` object. To create a resampler object, do something like the following: ```c ma_resampler_config config = ma_resampler_config_init( ma_format_s16, channels, sampleRateIn, sampleRateOut, ma_resample_algorithm_linear); ma_resampler resampler; ma_result result = ma_resampler_init(&config, NULL, &resampler); if (result != MA_SUCCESS) { // An error occurred... } ``` Do the following to uninitialize the resampler: ```c ma_resampler_uninit(&resampler); ``` The following example shows how data can be processed ```c ma_uint64 frameCountIn = 1000; ma_uint64 frameCountOut = 2000; ma_result result = ma_resampler_process_pcm_frames(&resampler, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut); if (result != MA_SUCCESS) { // An error occurred... } // At this point, frameCountIn contains the number of input frames that were consumed and frameCountOut contains the // number of output frames written. ``` To initialize the resampler you first need to set up a config (`ma_resampler_config`) with `ma_resampler_config_init()`. You need to specify the sample format you want to use, the number of channels, the input and output sample rate, and the algorithm. The sample format can be either `ma_format_s16` or `ma_format_f32`. If you need a different format you will need to perform pre- and post-conversions yourself where necessary. Note that the format is the same for both input and output. The format cannot be changed after initialization. The resampler supports multiple channels and is always interleaved (both input and output). The channel count cannot be changed after initialization. The sample rates can be anything other than zero, and are always specified in hertz. They should be set to something like 44100, etc. The sample rate is the only configuration property that can be changed after initialization. The miniaudio resampler has built-in support for the following algorithms: +-----------+------------------------------+ | Algorithm | Enum Token | +-----------+------------------------------+ | Linear | ma_resample_algorithm_linear | | Custom | ma_resample_algorithm_custom | +-----------+------------------------------+ The algorithm cannot be changed after initialization. Processing always happens on a per PCM frame basis and always assumes interleaved input and output. De-interleaved processing is not supported. To process frames, use `ma_resampler_process_pcm_frames()`. On input, this function takes the number of output frames you can fit in the output buffer and the number of input frames contained in the input buffer. On output these variables contain the number of output frames that were written to the output buffer and the number of input frames that were consumed in the process. You can pass in NULL for the input buffer in which case it will be treated as an infinitely large buffer of zeros. The output buffer can also be NULL, in which case the processing will be treated as seek. The sample rate can be changed dynamically on the fly. You can change this with explicit sample rates with `ma_resampler_set_rate()` and also with a decimal ratio with `ma_resampler_set_rate_ratio()`. The ratio is in/out. Sometimes it's useful to know exactly how many input frames will be required to output a specific number of frames. You can calculate this with `ma_resampler_get_required_input_frame_count()`. Likewise, it's sometimes useful to know exactly how many frames would be output given a certain number of input frames. You can do this with `ma_resampler_get_expected_output_frame_count()`. Due to the nature of how resampling works, the resampler introduces some latency. This can be retrieved in terms of both the input rate and the output rate with `ma_resampler_get_input_latency()` and `ma_resampler_get_output_latency()`. 10.3.1. Resampling Algorithms ----------------------------- The choice of resampling algorithm depends on your situation and requirements. 10.3.1.1. Linear Resampling --------------------------- The linear resampler is the fastest, but comes at the expense of poorer quality. There is, however, some control over the quality of the linear resampler which may make it a suitable option depending on your requirements. The linear resampler performs low-pass filtering before or after downsampling or upsampling, depending on the sample rates you're converting between. When decreasing the sample rate, the low-pass filter will be applied before downsampling. When increasing the rate it will be performed after upsampling. By default a fourth order low-pass filter will be applied. This can be configured via the `lpfOrder` configuration variable. Setting this to 0 will disable filtering. The low-pass filter has a cutoff frequency which defaults to half the sample rate of the lowest of the input and output sample rates (Nyquist Frequency). The API for the linear resampler is the same as the main resampler API, only it's called `ma_linear_resampler`. 10.3.2. Custom Resamplers ------------------------- You can implement a custom resampler by using the `ma_resample_algorithm_custom` resampling algorithm and setting a vtable in the resampler config: ```c ma_resampler_config config = ma_resampler_config_init(..., ma_resample_algorithm_custom); config.pBackendVTable = &g_customResamplerVTable; ``` Custom resamplers are useful if the stock algorithms are not appropriate for your use case. You need to implement the required functions in `ma_resampling_backend_vtable`. Note that not all functions in the vtable need to be implemented, but if it's possible to implement, they should be. You can use the `ma_linear_resampler` object for an example on how to implement the vtable. The `onGetHeapSize` callback is used to calculate the size of any internal heap allocation the custom resampler will need to make given the supplied config. When you initialize the resampler via the `onInit` callback, you'll be given a pointer to a heap allocation which is where you should store the heap allocated data. You should not free this data in `onUninit` because miniaudio will manage it for you. The `onProcess` callback is where the actual resampling takes place. On input, `pFrameCountIn` points to a variable containing the number of frames in the `pFramesIn` buffer and `pFrameCountOut` points to a variable containing the capacity in frames of the `pFramesOut` buffer. On output, `pFrameCountIn` should be set to the number of input frames that were fully consumed, whereas `pFrameCountOut` should be set to the number of frames that were written to `pFramesOut`. The `onSetRate` callback is optional and is used for dynamically changing the sample rate. If dynamic rate changes are not supported, you can set this callback to NULL. The `onGetInputLatency` and `onGetOutputLatency` functions are used for retrieving the latency in input and output rates respectively. These can be NULL in which case latency calculations will be assumed to be NULL. The `onGetRequiredInputFrameCount` callback is used to give miniaudio a hint as to how many input frames are required to be available to produce the given number of output frames. Likewise, the `onGetExpectedOutputFrameCount` callback is used to determine how many output frames will be produced given the specified number of input frames. miniaudio will use these as a hint, but they are optional and can be set to NULL if you're unable to implement them. 10.4. General Data Conversion ----------------------------- The `ma_data_converter` API can be used to wrap sample format conversion, channel conversion and resampling into one operation. This is what miniaudio uses internally to convert between the format requested when the device was initialized and the format of the backend's native device. The API for general data conversion is very similar to the resampling API. Create a `ma_data_converter` object like this: ```c ma_data_converter_config config = ma_data_converter_config_init( inputFormat, outputFormat, inputChannels, outputChannels, inputSampleRate, outputSampleRate ); ma_data_converter converter; ma_result result = ma_data_converter_init(&config, NULL, &converter); if (result != MA_SUCCESS) { // An error occurred... } ``` In the example above we use `ma_data_converter_config_init()` to initialize the config, however there's many more properties that can be configured, such as channel maps and resampling quality. Something like the following may be more suitable depending on your requirements: ```c ma_data_converter_config config = ma_data_converter_config_init_default(); config.formatIn = inputFormat; config.formatOut = outputFormat; config.channelsIn = inputChannels; config.channelsOut = outputChannels; config.sampleRateIn = inputSampleRate; config.sampleRateOut = outputSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_flac, config.channelMapIn, sizeof(config.channelMapIn)/sizeof(config.channelMapIn[0]), config.channelCountIn); config.resampling.linear.lpfOrder = MA_MAX_FILTER_ORDER; ``` Do the following to uninitialize the data converter: ```c ma_data_converter_uninit(&converter, NULL); ``` The following example shows how data can be processed ```c ma_uint64 frameCountIn = 1000; ma_uint64 frameCountOut = 2000; ma_result result = ma_data_converter_process_pcm_frames(&converter, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut); if (result != MA_SUCCESS) { // An error occurred... } // At this point, frameCountIn contains the number of input frames that were consumed and frameCountOut contains the number // of output frames written. ``` The data converter supports multiple channels and is always interleaved (both input and output). The channel count cannot be changed after initialization. Sample rates can be anything other than zero, and are always specified in hertz. They should be set to something like 44100, etc. The sample rate is the only configuration property that can be changed after initialization, but only if the `resampling.allowDynamicSampleRate` member of `ma_data_converter_config` is set to `MA_TRUE`. To change the sample rate, use `ma_data_converter_set_rate()` or `ma_data_converter_set_rate_ratio()`. The ratio must be in/out. The resampling algorithm cannot be changed after initialization. Processing always happens on a per PCM frame basis and always assumes interleaved input and output. De-interleaved processing is not supported. To process frames, use `ma_data_converter_process_pcm_frames()`. On input, this function takes the number of output frames you can fit in the output buffer and the number of input frames contained in the input buffer. On output these variables contain the number of output frames that were written to the output buffer and the number of input frames that were consumed in the process. You can pass in NULL for the input buffer in which case it will be treated as an infinitely large buffer of zeros. The output buffer can also be NULL, in which case the processing will be treated as seek. Sometimes it's useful to know exactly how many input frames will be required to output a specific number of frames. You can calculate this with `ma_data_converter_get_required_input_frame_count()`. Likewise, it's sometimes useful to know exactly how many frames would be output given a certain number of input frames. You can do this with `ma_data_converter_get_expected_output_frame_count()`. Due to the nature of how resampling works, the data converter introduces some latency if resampling is required. This can be retrieved in terms of both the input rate and the output rate with `ma_data_converter_get_input_latency()` and `ma_data_converter_get_output_latency()`. 11. Filtering ============= 11.1. Biquad Filtering ---------------------- Biquad filtering is achieved with the `ma_biquad` API. Example: ```c ma_biquad_config config = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2); ma_result result = ma_biquad_init(&config, NULL, &biquad); if (result != MA_SUCCESS) { // Error. } ... ma_biquad_process_pcm_frames(&biquad, pFramesOut, pFramesIn, frameCount); ``` Biquad filtering is implemented using transposed direct form 2. The numerator coefficients are b0, b1 and b2, and the denominator coefficients are a0, a1 and a2. The a0 coefficient is required and coefficients must not be pre-normalized. Supported formats are `ma_format_s16` and `ma_format_f32`. If you need to use a different format you need to convert it yourself beforehand. When using `ma_format_s16` the biquad filter will use fixed point arithmetic. When using `ma_format_f32`, floating point arithmetic will be used. Input and output frames are always interleaved. Filtering can be applied in-place by passing in the same pointer for both the input and output buffers, like so: ```c ma_biquad_process_pcm_frames(&biquad, pMyData, pMyData, frameCount); ``` If you need to change the values of the coefficients, but maintain the values in the registers you can do so with `ma_biquad_reinit()`. This is useful if you need to change the properties of the filter while keeping the values of registers valid to avoid glitching. Do not use `ma_biquad_init()` for this as it will do a full initialization which involves clearing the registers to 0. Note that changing the format or channel count after initialization is invalid and will result in an error. 11.2. Low-Pass Filtering ------------------------ Low-pass filtering is achieved with the following APIs: +---------+------------------------------------------+ | API | Description | +---------+------------------------------------------+ | ma_lpf1 | First order low-pass filter | | ma_lpf2 | Second order low-pass filter | | ma_lpf | High order low-pass filter (Butterworth) | +---------+------------------------------------------+ Low-pass filter example: ```c ma_lpf_config config = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); ma_result result = ma_lpf_init(&config, &lpf); if (result != MA_SUCCESS) { // Error. } ... ma_lpf_process_pcm_frames(&lpf, pFramesOut, pFramesIn, frameCount); ``` Supported formats are `ma_format_s16` and` ma_format_f32`. If you need to use a different format you need to convert it yourself beforehand. Input and output frames are always interleaved. Filtering can be applied in-place by passing in the same pointer for both the input and output buffers, like so: ```c ma_lpf_process_pcm_frames(&lpf, pMyData, pMyData, frameCount); ``` The maximum filter order is limited to `MA_MAX_FILTER_ORDER` which is set to 8. If you need more, you can chain first and second order filters together. ```c for (iFilter = 0; iFilter < filterCount; iFilter += 1) { ma_lpf2_process_pcm_frames(&lpf2[iFilter], pMyData, pMyData, frameCount); } ``` If you need to change the configuration of the filter, but need to maintain the state of internal registers you can do so with `ma_lpf_reinit()`. This may be useful if you need to change the sample rate and/or cutoff frequency dynamically while maintaining smooth transitions. Note that changing the format or channel count after initialization is invalid and will result in an error. The `ma_lpf` object supports a configurable order, but if you only need a first order filter you may want to consider using `ma_lpf1`. Likewise, if you only need a second order filter you can use `ma_lpf2`. The advantage of this is that they're lighter weight and a bit more efficient. If an even filter order is specified, a series of second order filters will be processed in a chain. If an odd filter order is specified, a first order filter will be applied, followed by a series of second order filters in a chain. 11.3. High-Pass Filtering ------------------------- High-pass filtering is achieved with the following APIs: +---------+-------------------------------------------+ | API | Description | +---------+-------------------------------------------+ | ma_hpf1 | First order high-pass filter | | ma_hpf2 | Second order high-pass filter | | ma_hpf | High order high-pass filter (Butterworth) | +---------+-------------------------------------------+ High-pass filters work exactly the same as low-pass filters, only the APIs are called `ma_hpf1`, `ma_hpf2` and `ma_hpf`. See example code for low-pass filters for example usage. 11.4. Band-Pass Filtering ------------------------- Band-pass filtering is achieved with the following APIs: +---------+-------------------------------+ | API | Description | +---------+-------------------------------+ | ma_bpf2 | Second order band-pass filter | | ma_bpf | High order band-pass filter | +---------+-------------------------------+ Band-pass filters work exactly the same as low-pass filters, only the APIs are called `ma_bpf2` and `ma_hpf`. See example code for low-pass filters for example usage. Note that the order for band-pass filters must be an even number which means there is no first order band-pass filter, unlike low-pass and high-pass filters. 11.5. Notch Filtering --------------------- Notch filtering is achieved with the following APIs: +-----------+------------------------------------------+ | API | Description | +-----------+------------------------------------------+ | ma_notch2 | Second order notching filter | +-----------+------------------------------------------+ 11.6. Peaking EQ Filtering ------------------------- Peaking filtering is achieved with the following APIs: +----------+------------------------------------------+ | API | Description | +----------+------------------------------------------+ | ma_peak2 | Second order peaking filter | +----------+------------------------------------------+ 11.7. Low Shelf Filtering ------------------------- Low shelf filtering is achieved with the following APIs: +-------------+------------------------------------------+ | API | Description | +-------------+------------------------------------------+ | ma_loshelf2 | Second order low shelf filter | +-------------+------------------------------------------+ Where a high-pass filter is used to eliminate lower frequencies, a low shelf filter can be used to just turn them down rather than eliminate them entirely. 11.8. High Shelf Filtering -------------------------- High shelf filtering is achieved with the following APIs: +-------------+------------------------------------------+ | API | Description | +-------------+------------------------------------------+ | ma_hishelf2 | Second order high shelf filter | +-------------+------------------------------------------+ The high shelf filter has the same API as the low shelf filter, only you would use `ma_hishelf` instead of `ma_loshelf`. Where a low shelf filter is used to adjust the volume of low frequencies, the high shelf filter does the same thing for high frequencies. 12. Waveform and Noise Generation ================================= 12.1. Waveforms --------------- miniaudio supports generation of sine, square, triangle and sawtooth waveforms. This is achieved with the `ma_waveform` API. Example: ```c ma_waveform_config config = ma_waveform_config_init( FORMAT, CHANNELS, SAMPLE_RATE, ma_waveform_type_sine, amplitude, frequency); ma_waveform waveform; ma_result result = ma_waveform_init(&config, &waveform); if (result != MA_SUCCESS) { // Error. } ... ma_waveform_read_pcm_frames(&waveform, pOutput, frameCount); ``` The amplitude, frequency, type, and sample rate can be changed dynamically with `ma_waveform_set_amplitude()`, `ma_waveform_set_frequency()`, `ma_waveform_set_type()`, and `ma_waveform_set_sample_rate()` respectively. You can invert the waveform by setting the amplitude to a negative value. You can use this to control whether or not a sawtooth has a positive or negative ramp, for example. Below are the supported waveform types: +---------------------------+ | Enum Name | +---------------------------+ | ma_waveform_type_sine | | ma_waveform_type_square | | ma_waveform_type_triangle | | ma_waveform_type_sawtooth | +---------------------------+ 12.2. Noise ----------- miniaudio supports generation of white, pink and Brownian noise via the `ma_noise` API. Example: ```c ma_noise_config config = ma_noise_config_init( FORMAT, CHANNELS, ma_noise_type_white, SEED, amplitude); ma_noise noise; ma_result result = ma_noise_init(&config, &noise); if (result != MA_SUCCESS) { // Error. } ... ma_noise_read_pcm_frames(&noise, pOutput, frameCount); ``` The noise API uses simple LCG random number generation. It supports a custom seed which is useful for things like automated testing requiring reproducibility. Setting the seed to zero will default to `MA_DEFAULT_LCG_SEED`. The amplitude and seed can be changed dynamically with `ma_noise_set_amplitude()` and `ma_noise_set_seed()` respectively. By default, the noise API will use different values for different channels. So, for example, the left side in a stereo stream will be different to the right side. To instead have each channel use the same random value, set the `duplicateChannels` member of the noise config to true, like so: ```c config.duplicateChannels = MA_TRUE; ``` Below are the supported noise types. +------------------------+ | Enum Name | +------------------------+ | ma_noise_type_white | | ma_noise_type_pink | | ma_noise_type_brownian | +------------------------+ 13. Audio Buffers ================= miniaudio supports reading from a buffer of raw audio data via the `ma_audio_buffer` API. This can read from memory that's managed by the application, but can also handle the memory management for you internally. Memory management is flexible and should support most use cases. Audio buffers are initialized using the standard configuration system used everywhere in miniaudio: ```c ma_audio_buffer_config config = ma_audio_buffer_config_init( format, channels, sizeInFrames, pExistingData, &allocationCallbacks); ma_audio_buffer buffer; result = ma_audio_buffer_init(&config, &buffer); if (result != MA_SUCCESS) { // Error. } ... ma_audio_buffer_uninit(&buffer); ``` In the example above, the memory pointed to by `pExistingData` will *not* be copied and is how an application can do self-managed memory allocation. If you would rather make a copy of the data, use `ma_audio_buffer_init_copy()`. To uninitialize the buffer, use `ma_audio_buffer_uninit()`. Sometimes it can be convenient to allocate the memory for the `ma_audio_buffer` structure and the raw audio data in a contiguous block of memory. That is, the raw audio data will be located immediately after the `ma_audio_buffer` structure. To do this, use `ma_audio_buffer_alloc_and_init()`: ```c ma_audio_buffer_config config = ma_audio_buffer_config_init( format, channels, sizeInFrames, pExistingData, &allocationCallbacks); ma_audio_buffer* pBuffer result = ma_audio_buffer_alloc_and_init(&config, &pBuffer); if (result != MA_SUCCESS) { // Error } ... ma_audio_buffer_uninit_and_free(&buffer); ``` If you initialize the buffer with `ma_audio_buffer_alloc_and_init()` you should uninitialize it with `ma_audio_buffer_uninit_and_free()`. In the example above, the memory pointed to by `pExistingData` will be copied into the buffer, which is contrary to the behavior of `ma_audio_buffer_init()`. An audio buffer has a playback cursor just like a decoder. As you read frames from the buffer, the cursor moves forward. The last parameter (`loop`) can be used to determine if the buffer should loop. The return value is the number of frames actually read. If this is less than the number of frames requested it means the end has been reached. This should never happen if the `loop` parameter is set to true. If you want to manually loop back to the start, you can do so with with `ma_audio_buffer_seek_to_pcm_frame(pAudioBuffer, 0)`. Below is an example for reading data from an audio buffer. ```c ma_uint64 framesRead = ma_audio_buffer_read_pcm_frames(pAudioBuffer, pFramesOut, desiredFrameCount, isLooping); if (framesRead < desiredFrameCount) { // If not looping, this means the end has been reached. This should never happen in looping mode with valid input. } ``` Sometimes you may want to avoid the cost of data movement between the internal buffer and the output buffer. Instead you can use memory mapping to retrieve a pointer to a segment of data: ```c void* pMappedFrames; ma_uint64 frameCount = frameCountToTryMapping; ma_result result = ma_audio_buffer_map(pAudioBuffer, &pMappedFrames, &frameCount); if (result == MA_SUCCESS) { // Map was successful. The value in frameCount will be how many frames were _actually_ mapped, which may be // less due to the end of the buffer being reached. ma_copy_pcm_frames(pFramesOut, pMappedFrames, frameCount, pAudioBuffer->format, pAudioBuffer->channels); // You must unmap the buffer. ma_audio_buffer_unmap(pAudioBuffer, frameCount); } ``` When you use memory mapping, the read cursor is increment by the frame count passed in to `ma_audio_buffer_unmap()`. If you decide not to process every frame you can pass in a value smaller than the value returned by `ma_audio_buffer_map()`. The disadvantage to using memory mapping is that it does not handle looping for you. You can determine if the buffer is at the end for the purpose of looping with `ma_audio_buffer_at_end()` or by inspecting the return value of `ma_audio_buffer_unmap()` and checking if it equals `MA_AT_END`. You should not treat `MA_AT_END` as an error when returned by `ma_audio_buffer_unmap()`. 14. Ring Buffers ================ miniaudio supports lock free (single producer, single consumer) ring buffers which are exposed via the `ma_rb` and `ma_pcm_rb` APIs. The `ma_rb` API operates on bytes, whereas the `ma_pcm_rb` operates on PCM frames. They are otherwise identical as `ma_pcm_rb` is just a wrapper around `ma_rb`. Unlike most other APIs in miniaudio, ring buffers support both interleaved and deinterleaved streams. The caller can also allocate their own backing memory for the ring buffer to use internally for added flexibility. Otherwise the ring buffer will manage it's internal memory for you. The examples below use the PCM frame variant of the ring buffer since that's most likely the one you will want to use. To initialize a ring buffer, do something like the following: ```c ma_pcm_rb rb; ma_result result = ma_pcm_rb_init(FORMAT, CHANNELS, BUFFER_SIZE_IN_FRAMES, NULL, NULL, &rb); if (result != MA_SUCCESS) { // Error } ``` The `ma_pcm_rb_init()` function takes the sample format and channel count as parameters because it's the PCM variant of the ring buffer API. For the regular ring buffer that operates on bytes you would call `ma_rb_init()` which leaves these out and just takes the size of the buffer in bytes instead of frames. The fourth parameter is an optional pre-allocated buffer and the fifth parameter is a pointer to a `ma_allocation_callbacks` structure for custom memory allocation routines. Passing in `NULL` for this results in `MA_MALLOC()` and `MA_FREE()` being used. Use `ma_pcm_rb_init_ex()` if you need a deinterleaved buffer. The data for each sub-buffer is offset from each other based on the stride. To manage your sub-buffers you can use `ma_pcm_rb_get_subbuffer_stride()`, `ma_pcm_rb_get_subbuffer_offset()` and `ma_pcm_rb_get_subbuffer_ptr()`. Use `ma_pcm_rb_acquire_read()` and `ma_pcm_rb_acquire_write()` to retrieve a pointer to a section of the ring buffer. You specify the number of frames you need, and on output it will set to what was actually acquired. If the read or write pointer is positioned such that the number of frames requested will require a loop, it will be clamped to the end of the buffer. Therefore, the number of frames you're given may be less than the number you requested. After calling `ma_pcm_rb_acquire_read()` or `ma_pcm_rb_acquire_write()`, you do your work on the buffer and then "commit" it with `ma_pcm_rb_commit_read()` or `ma_pcm_rb_commit_write()`. This is where the read/write pointers are updated. When you commit you need to pass in the buffer that was returned by the earlier call to `ma_pcm_rb_acquire_read()` or `ma_pcm_rb_acquire_write()` and is only used for validation. The number of frames passed to `ma_pcm_rb_commit_read()` and `ma_pcm_rb_commit_write()` is what's used to increment the pointers, and can be less that what was originally requested. If you want to correct for drift between the write pointer and the read pointer you can use a combination of `ma_pcm_rb_pointer_distance()`, `ma_pcm_rb_seek_read()` and `ma_pcm_rb_seek_write()`. Note that you can only move the pointers forward, and you should only move the read pointer forward via the consumer thread, and the write pointer forward by the producer thread. If there is too much space between the pointers, move the read pointer forward. If there is too little space between the pointers, move the write pointer forward. You can use a ring buffer at the byte level instead of the PCM frame level by using the `ma_rb` API. This is exactly the same, only you will use the `ma_rb` functions instead of `ma_pcm_rb` and instead of frame counts you will pass around byte counts. The maximum size of the buffer in bytes is `0x7FFFFFFF-(MA_SIMD_ALIGNMENT-1)` due to the most significant bit being used to encode a loop flag and the internally managed buffers always being aligned to `MA_SIMD_ALIGNMENT`. Note that the ring buffer is only thread safe when used by a single consumer thread and single producer thread. 15. Backends ============ The following backends are supported by miniaudio. These are listed in order of default priority. When no backend is specified when initializing a context or device, miniaudio will attempt to use each of these backends in the order listed in the table below. Note that backends that are not usable by the build target will not be included in the build. For example, ALSA, which is specific to Linux, will not be included in the Windows build. +-------------+-----------------------+--------------------------------------------------------+ | Name | Enum Name | Supported Operating Systems | +-------------+-----------------------+--------------------------------------------------------+ | WASAPI | ma_backend_wasapi | Windows Vista+ | | DirectSound | ma_backend_dsound | Windows XP+ | | WinMM | ma_backend_winmm | Windows 95+ | | Core Audio | ma_backend_coreaudio | macOS, iOS | | sndio | ma_backend_sndio | OpenBSD | | audio(4) | ma_backend_audio4 | NetBSD, OpenBSD | | OSS | ma_backend_oss | FreeBSD | | PulseAudio | ma_backend_pulseaudio | Cross Platform (disabled on Windows, BSD and Android) | | ALSA | ma_backend_alsa | Linux | | JACK | ma_backend_jack | Cross Platform (disabled on BSD and Android) | | AAudio | ma_backend_aaudio | Android 8+ | | OpenSL ES | ma_backend_opensl | Android (API level 16+) | | Web Audio | ma_backend_webaudio | Web (via Emscripten) | | Custom | ma_backend_custom | Cross Platform | | Null | ma_backend_null | Cross Platform (not used on Web) | +-------------+-----------------------+--------------------------------------------------------+ Some backends have some nuance details you may want to be aware of. 15.1. WASAPI ------------ - Low-latency shared mode will be disabled when using an application-defined sample rate which is different to the device's native sample rate. To work around this, set `wasapi.noAutoConvertSRC` to true in the device config. This is due to IAudioClient3_InitializeSharedAudioStream() failing when the `AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM` flag is specified. Setting wasapi.noAutoConvertSRC will result in miniaudio's internal resampler being used instead which will in turn enable the use of low-latency shared mode. 15.2. PulseAudio ---------------- - If you experience bad glitching/noise on Arch Linux, consider this fix from the Arch wiki: https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling. Alternatively, consider using a different backend such as ALSA. 15.3. Android ------------- - To capture audio on Android, remember to add the RECORD_AUDIO permission to your manifest: `` - With OpenSL|ES, only a single ma_context can be active at any given time. This is due to a limitation with OpenSL|ES. - With AAudio, only default devices are enumerated. This is due to AAudio not having an enumeration API (devices are enumerated through Java). You can however perform your own device enumeration through Java and then set the ID in the ma_device_id structure (ma_device_id.aaudio) and pass it to ma_device_init(). - The backend API will perform resampling where possible. The reason for this as opposed to using miniaudio's built-in resampler is to take advantage of any potential device-specific optimizations the driver may implement. BSD --- - The sndio backend is currently only enabled on OpenBSD builds. - The audio(4) backend is supported on OpenBSD, but you may need to disable sndiod before you can use it. 15.4. UWP --------- - UWP only supports default playback and capture devices. - UWP requires the Microphone capability to be enabled in the application's manifest (Package.appxmanifest): ``` ... ``` 15.5. Web Audio / Emscripten ---------------------------- - You cannot use `-std=c*` compiler flags, nor `-ansi`. This only applies to the Emscripten build. - The first time a context is initialized it will create a global object called "miniaudio" whose primary purpose is to act as a factory for device objects. - Currently the Web Audio backend uses ScriptProcessorNode's, but this may need to change later as they've been deprecated. - Google has implemented a policy in their browsers that prevent automatic media output without first receiving some kind of user input. The following web page has additional details: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes. Starting the device may fail if you try to start playback without first handling some kind of user input. 16. Optimization Tips ===================== See below for some tips on improving performance. 16.1. Low Level API ------------------- - In the data callback, if your data is already clipped prior to copying it into the output buffer, set the `noClip` config option in the device config to true. This will disable miniaudio's built in clipping function. - By default, miniaudio will pre-silence the data callback's output buffer. If you know that you will always write valid data to the output buffer you can disable pre-silencing by setting the `noPreSilence` config option in the device config to true. 16.2. High Level API -------------------- - If a sound does not require doppler or pitch shifting, consider disabling pitching by initializing the sound with the `MA_SOUND_FLAG_NO_PITCH` flag. - If a sound does not require spatialization, disable it by initializing the sound with the `MA_SOUND_FLAG_NO_SPATIALIZATION` flag. It can be re-enabled again post-initialization with `ma_sound_set_spatialization_enabled()`. - If you know all of your sounds will always be the same sample rate, set the engine's sample rate to match that of the sounds. Likewise, if you're using a self-managed resource manager, consider setting the decoded sample rate to match your sounds. By configuring everything to use a consistent sample rate, sample rate conversion can be avoided. 17. Miscellaneous Notes ======================= - Automatic stream routing is enabled on a per-backend basis. Support is explicitly enabled for WASAPI and Core Audio, however other backends such as PulseAudio may naturally support it, though not all have been tested. - When compiling with VC6 and earlier, decoding is restricted to files less than 2GB in size. This is due to 64-bit file APIs not being available. */ #ifndef miniaudio_h #define miniaudio_h #ifdef __cplusplus extern "C" { #endif #define MA_STRINGIFY(x) #x #define MA_XSTRINGIFY(x) MA_STRINGIFY(x) #define MA_VERSION_MAJOR 0 #define MA_VERSION_MINOR 11 #define MA_VERSION_REVISION 22 #define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION) #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #pragma warning(disable:4214) /* nonstandard extension used: bit field types other than int */ #pragma warning(disable:4324) /* structure was padded due to alignment specifier */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__) || defined(__ppc64__) #define MA_SIZEOF_PTR 8 #else #define MA_SIZEOF_PTR 4 #endif #include /* For size_t. */ /* Sized types. */ #if defined(MA_USE_STDINT) #include typedef int8_t ma_int8; typedef uint8_t ma_uint8; typedef int16_t ma_int16; typedef uint16_t ma_uint16; typedef int32_t ma_int32; typedef uint32_t ma_uint32; typedef int64_t ma_int64; typedef uint64_t ma_uint64; #else typedef signed char ma_int8; typedef unsigned char ma_uint8; typedef signed short ma_int16; typedef unsigned short ma_uint16; typedef signed int ma_int32; typedef unsigned int ma_uint32; #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 ma_int64; typedef unsigned __int64 ma_uint64; #else #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef signed long long ma_int64; typedef unsigned long long ma_uint64; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif #endif /* MA_USE_STDINT */ #if MA_SIZEOF_PTR == 8 typedef ma_uint64 ma_uintptr; #else typedef ma_uint32 ma_uintptr; #endif typedef ma_uint8 ma_bool8; typedef ma_uint32 ma_bool32; #define MA_TRUE 1 #define MA_FALSE 0 /* These float types are not used universally by miniaudio. It's to simplify some macro expansion for atomic types. */ typedef float ma_float; typedef double ma_double; typedef void* ma_handle; typedef void* ma_ptr; /* ma_proc is annoying because when compiling with GCC we get pedantic warnings about converting between `void*` and `void (*)()`. We can't use `void (*)()` with MSVC however, because we'll get warning C4191 about "type cast between incompatible function types". To work around this I'm going to use a different data type depending on the compiler. */ #if defined(__GNUC__) typedef void (*ma_proc)(void); #else typedef void* ma_proc; #endif #if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED) typedef ma_uint16 wchar_t; #endif /* Define NULL for some compilers. */ #ifndef NULL #define NULL 0 #endif #if defined(SIZE_MAX) #define MA_SIZE_MAX SIZE_MAX #else #define MA_SIZE_MAX 0xFFFFFFFF /* When SIZE_MAX is not defined by the standard library just default to the maximum 32-bit unsigned integer. */ #endif /* Platform/backend detection. */ #if defined(_WIN32) || defined(__COSMOPOLITAN__) #define MA_WIN32 #if defined(MA_FORCE_UWP) || (defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || (defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP))) #define MA_WIN32_UWP #elif defined(WINAPI_FAMILY) && (defined(WINAPI_FAMILY_GAMES) && WINAPI_FAMILY == WINAPI_FAMILY_GAMES) #define MA_WIN32_GDK #else #define MA_WIN32_DESKTOP #endif #endif #if !defined(_WIN32) /* If it's not Win32, assume POSIX. */ #define MA_POSIX /* Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented. You can use this to avoid including pthread.h in the header section. The downside is that it results in some fixed sized structures being declared for the various types that are used in miniaudio. The risk here is that these types might be too small for a given platform. This risk is yours to take and no support will be offered if you enable this option. */ #ifndef MA_NO_PTHREAD_IN_HEADER #include /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */ typedef pthread_t ma_pthread_t; typedef pthread_mutex_t ma_pthread_mutex_t; typedef pthread_cond_t ma_pthread_cond_t; #else typedef ma_uintptr ma_pthread_t; typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t; typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t; #endif #if defined(__unix__) #define MA_UNIX #endif #if defined(__linux__) #define MA_LINUX #endif #if defined(__APPLE__) #define MA_APPLE #endif #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define MA_BSD #endif #if defined(__ANDROID__) #define MA_ANDROID #endif #if defined(__EMSCRIPTEN__) #define MA_EMSCRIPTEN #endif #if defined(__ORBIS__) #define MA_ORBIS #endif #if defined(__PROSPERO__) #define MA_PROSPERO #endif #if defined(__NX__) #define MA_NX #endif #if defined(__BEOS__) || defined(__HAIKU__) #define MA_BEOS #endif #if defined(__HAIKU__) #define MA_HAIKU #endif #endif #if defined(__has_c_attribute) #if __has_c_attribute(fallthrough) #define MA_FALLTHROUGH [[fallthrough]] #endif #endif #if !defined(MA_FALLTHROUGH) && defined(__has_attribute) && (defined(__clang__) || defined(__GNUC__)) #if __has_attribute(fallthrough) #define MA_FALLTHROUGH __attribute__((fallthrough)) #endif #endif #if !defined(MA_FALLTHROUGH) #define MA_FALLTHROUGH ((void)0) #endif #ifdef _MSC_VER #define MA_INLINE __forceinline /* noinline was introduced in Visual Studio 2005. */ #if _MSC_VER >= 1400 #define MA_NO_INLINE __declspec(noinline) #else #define MA_NO_INLINE #endif #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when the __attribute__((always_inline)) attribute is defined without an "inline" statement. I think therefore there must be some case where "__inline__" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the command line, we cannot use the "inline" keyword and instead need to use "__inline__". In an attempt to work around this issue I am using "__inline__" only when we're compiling in strict ANSI mode. */ #if defined(__STRICT_ANSI__) #define MA_GNUC_INLINE_HINT __inline__ #else #define MA_GNUC_INLINE_HINT inline #endif #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__) #define MA_INLINE MA_GNUC_INLINE_HINT __attribute__((always_inline)) #define MA_NO_INLINE __attribute__((noinline)) #else #define MA_INLINE MA_GNUC_INLINE_HINT #define MA_NO_INLINE __attribute__((noinline)) #endif #elif defined(__WATCOMC__) #define MA_INLINE __inline #define MA_NO_INLINE #else #define MA_INLINE #define MA_NO_INLINE #endif /* MA_DLL is not officially supported. You're on your own if you want to use this. */ #if defined(MA_DLL) #if defined(_WIN32) #define MA_DLL_IMPORT __declspec(dllimport) #define MA_DLL_EXPORT __declspec(dllexport) #define MA_DLL_PRIVATE static #else #if defined(__GNUC__) && __GNUC__ >= 4 #define MA_DLL_IMPORT __attribute__((visibility("default"))) #define MA_DLL_EXPORT __attribute__((visibility("default"))) #define MA_DLL_PRIVATE __attribute__((visibility("hidden"))) #else #define MA_DLL_IMPORT #define MA_DLL_EXPORT #define MA_DLL_PRIVATE static #endif #endif #endif #if !defined(MA_API) #if defined(MA_DLL) #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION) #define MA_API MA_DLL_EXPORT #else #define MA_API MA_DLL_IMPORT #endif #else #define MA_API extern #endif #endif #if !defined(MA_STATIC) #if defined(MA_DLL) #define MA_PRIVATE MA_DLL_PRIVATE #else #define MA_PRIVATE static #endif #endif /* SIMD alignment in bytes. Currently set to 32 bytes in preparation for future AVX optimizations. */ #define MA_SIMD_ALIGNMENT 32 /* Special wchar_t type to ensure any structures in the public sections that reference it have a consistent size across all platforms. On Windows, wchar_t is 2 bytes, whereas everywhere else it's 4 bytes. Since Windows likes to use wchar_t for its IDs, we need a special explicitly sized wchar type that is always 2 bytes on all platforms. */ #if !defined(MA_POSIX) && defined(MA_WIN32) typedef wchar_t ma_wchar_win32; #else typedef ma_uint16 ma_wchar_win32; #endif /* Logging Levels ============== Log levels are only used to give logging callbacks some context as to the severity of a log message so they can do filtering. All log levels will be posted to registered logging callbacks. If you don't want to output a certain log level you can discriminate against the log level in the callback. MA_LOG_LEVEL_DEBUG Used for debugging. Useful for debug and test builds, but should be disabled in release builds. MA_LOG_LEVEL_INFO Informational logging. Useful for debugging. This will never be called from within the data callback. MA_LOG_LEVEL_WARNING Warnings. You should enable this in you development builds and action them when encountered. These logs usually indicate a potential problem or misconfiguration, but still allow you to keep running. This will never be called from within the data callback. MA_LOG_LEVEL_ERROR Error logging. This will be fired when an operation fails and is subsequently aborted. This can be fired from within the data callback, in which case the device will be stopped. You should always have this log level enabled. */ typedef enum { MA_LOG_LEVEL_DEBUG = 4, MA_LOG_LEVEL_INFO = 3, MA_LOG_LEVEL_WARNING = 2, MA_LOG_LEVEL_ERROR = 1 } ma_log_level; /* Variables needing to be accessed atomically should be declared with this macro for two reasons: 1) It allows people who read the code to identify a variable as such; and 2) It forces alignment on platforms where it's required or optimal. Note that for x86/64, alignment is not strictly necessary, but does have some performance implications. Where supported by the compiler, alignment will be used, but otherwise if the CPU architecture does not require it, it will simply leave it unaligned. This is the case with old versions of Visual Studio, which I've confirmed with at least VC6. */ #if !defined(_MSC_VER) && defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) #include #define MA_ATOMIC(alignment, type) _Alignas(alignment) type #else #if defined(__GNUC__) /* GCC-style compilers. */ #define MA_ATOMIC(alignment, type) type __attribute__((aligned(alignment))) #elif defined(_MSC_VER) && _MSC_VER > 1200 /* 1200 = VC6. Alignment not supported, but not necessary because x86 is the only supported target. */ /* MSVC. */ #define MA_ATOMIC(alignment, type) __declspec(align(alignment)) type #else /* Other compilers. */ #define MA_ATOMIC(alignment, type) type #endif #endif typedef struct ma_context ma_context; typedef struct ma_device ma_device; typedef ma_uint8 ma_channel; typedef enum { MA_CHANNEL_NONE = 0, MA_CHANNEL_MONO = 1, MA_CHANNEL_FRONT_LEFT = 2, MA_CHANNEL_FRONT_RIGHT = 3, MA_CHANNEL_FRONT_CENTER = 4, MA_CHANNEL_LFE = 5, MA_CHANNEL_BACK_LEFT = 6, MA_CHANNEL_BACK_RIGHT = 7, MA_CHANNEL_FRONT_LEFT_CENTER = 8, MA_CHANNEL_FRONT_RIGHT_CENTER = 9, MA_CHANNEL_BACK_CENTER = 10, MA_CHANNEL_SIDE_LEFT = 11, MA_CHANNEL_SIDE_RIGHT = 12, MA_CHANNEL_TOP_CENTER = 13, MA_CHANNEL_TOP_FRONT_LEFT = 14, MA_CHANNEL_TOP_FRONT_CENTER = 15, MA_CHANNEL_TOP_FRONT_RIGHT = 16, MA_CHANNEL_TOP_BACK_LEFT = 17, MA_CHANNEL_TOP_BACK_CENTER = 18, MA_CHANNEL_TOP_BACK_RIGHT = 19, MA_CHANNEL_AUX_0 = 20, MA_CHANNEL_AUX_1 = 21, MA_CHANNEL_AUX_2 = 22, MA_CHANNEL_AUX_3 = 23, MA_CHANNEL_AUX_4 = 24, MA_CHANNEL_AUX_5 = 25, MA_CHANNEL_AUX_6 = 26, MA_CHANNEL_AUX_7 = 27, MA_CHANNEL_AUX_8 = 28, MA_CHANNEL_AUX_9 = 29, MA_CHANNEL_AUX_10 = 30, MA_CHANNEL_AUX_11 = 31, MA_CHANNEL_AUX_12 = 32, MA_CHANNEL_AUX_13 = 33, MA_CHANNEL_AUX_14 = 34, MA_CHANNEL_AUX_15 = 35, MA_CHANNEL_AUX_16 = 36, MA_CHANNEL_AUX_17 = 37, MA_CHANNEL_AUX_18 = 38, MA_CHANNEL_AUX_19 = 39, MA_CHANNEL_AUX_20 = 40, MA_CHANNEL_AUX_21 = 41, MA_CHANNEL_AUX_22 = 42, MA_CHANNEL_AUX_23 = 43, MA_CHANNEL_AUX_24 = 44, MA_CHANNEL_AUX_25 = 45, MA_CHANNEL_AUX_26 = 46, MA_CHANNEL_AUX_27 = 47, MA_CHANNEL_AUX_28 = 48, MA_CHANNEL_AUX_29 = 49, MA_CHANNEL_AUX_30 = 50, MA_CHANNEL_AUX_31 = 51, MA_CHANNEL_LEFT = MA_CHANNEL_FRONT_LEFT, MA_CHANNEL_RIGHT = MA_CHANNEL_FRONT_RIGHT, MA_CHANNEL_POSITION_COUNT = (MA_CHANNEL_AUX_31 + 1) } _ma_channel_position; /* Do not use `_ma_channel_position` directly. Use `ma_channel` instead. */ typedef enum { MA_SUCCESS = 0, MA_ERROR = -1, /* A generic error. */ MA_INVALID_ARGS = -2, MA_INVALID_OPERATION = -3, MA_OUT_OF_MEMORY = -4, MA_OUT_OF_RANGE = -5, MA_ACCESS_DENIED = -6, MA_DOES_NOT_EXIST = -7, MA_ALREADY_EXISTS = -8, MA_TOO_MANY_OPEN_FILES = -9, MA_INVALID_FILE = -10, MA_TOO_BIG = -11, MA_PATH_TOO_LONG = -12, MA_NAME_TOO_LONG = -13, MA_NOT_DIRECTORY = -14, MA_IS_DIRECTORY = -15, MA_DIRECTORY_NOT_EMPTY = -16, MA_AT_END = -17, MA_NO_SPACE = -18, MA_BUSY = -19, MA_IO_ERROR = -20, MA_INTERRUPT = -21, MA_UNAVAILABLE = -22, MA_ALREADY_IN_USE = -23, MA_BAD_ADDRESS = -24, MA_BAD_SEEK = -25, MA_BAD_PIPE = -26, MA_DEADLOCK = -27, MA_TOO_MANY_LINKS = -28, MA_NOT_IMPLEMENTED = -29, MA_NO_MESSAGE = -30, MA_BAD_MESSAGE = -31, MA_NO_DATA_AVAILABLE = -32, MA_INVALID_DATA = -33, MA_TIMEOUT = -34, MA_NO_NETWORK = -35, MA_NOT_UNIQUE = -36, MA_NOT_SOCKET = -37, MA_NO_ADDRESS = -38, MA_BAD_PROTOCOL = -39, MA_PROTOCOL_UNAVAILABLE = -40, MA_PROTOCOL_NOT_SUPPORTED = -41, MA_PROTOCOL_FAMILY_NOT_SUPPORTED = -42, MA_ADDRESS_FAMILY_NOT_SUPPORTED = -43, MA_SOCKET_NOT_SUPPORTED = -44, MA_CONNECTION_RESET = -45, MA_ALREADY_CONNECTED = -46, MA_NOT_CONNECTED = -47, MA_CONNECTION_REFUSED = -48, MA_NO_HOST = -49, MA_IN_PROGRESS = -50, MA_CANCELLED = -51, MA_MEMORY_ALREADY_MAPPED = -52, /* General non-standard errors. */ MA_CRC_MISMATCH = -100, /* General miniaudio-specific errors. */ MA_FORMAT_NOT_SUPPORTED = -200, MA_DEVICE_TYPE_NOT_SUPPORTED = -201, MA_SHARE_MODE_NOT_SUPPORTED = -202, MA_NO_BACKEND = -203, MA_NO_DEVICE = -204, MA_API_NOT_FOUND = -205, MA_INVALID_DEVICE_CONFIG = -206, MA_LOOP = -207, MA_BACKEND_NOT_ENABLED = -208, /* State errors. */ MA_DEVICE_NOT_INITIALIZED = -300, MA_DEVICE_ALREADY_INITIALIZED = -301, MA_DEVICE_NOT_STARTED = -302, MA_DEVICE_NOT_STOPPED = -303, /* Operation errors. */ MA_FAILED_TO_INIT_BACKEND = -400, MA_FAILED_TO_OPEN_BACKEND_DEVICE = -401, MA_FAILED_TO_START_BACKEND_DEVICE = -402, MA_FAILED_TO_STOP_BACKEND_DEVICE = -403 } ma_result; #define MA_MIN_CHANNELS 1 #ifndef MA_MAX_CHANNELS #define MA_MAX_CHANNELS 254 #endif #ifndef MA_MAX_FILTER_ORDER #define MA_MAX_FILTER_ORDER 8 #endif typedef enum { ma_stream_format_pcm = 0 } ma_stream_format; typedef enum { ma_stream_layout_interleaved = 0, ma_stream_layout_deinterleaved } ma_stream_layout; typedef enum { ma_dither_mode_none = 0, ma_dither_mode_rectangle, ma_dither_mode_triangle } ma_dither_mode; typedef enum { /* I like to keep these explicitly defined because they're used as a key into a lookup table. When items are added to this, make sure there are no gaps and that they're added to the lookup table in ma_get_bytes_per_sample(). */ ma_format_unknown = 0, /* Mainly used for indicating an error, but also used as the default for the output format for decoders. */ ma_format_u8 = 1, ma_format_s16 = 2, /* Seems to be the most widely supported format. */ ma_format_s24 = 3, /* Tightly packed. 3 bytes per sample. */ ma_format_s32 = 4, ma_format_f32 = 5, ma_format_count } ma_format; typedef enum { /* Standard rates need to be in priority order. */ ma_standard_sample_rate_48000 = 48000, /* Most common */ ma_standard_sample_rate_44100 = 44100, ma_standard_sample_rate_32000 = 32000, /* Lows */ ma_standard_sample_rate_24000 = 24000, ma_standard_sample_rate_22050 = 22050, ma_standard_sample_rate_88200 = 88200, /* Highs */ ma_standard_sample_rate_96000 = 96000, ma_standard_sample_rate_176400 = 176400, ma_standard_sample_rate_192000 = 192000, ma_standard_sample_rate_16000 = 16000, /* Extreme lows */ ma_standard_sample_rate_11025 = 11025, ma_standard_sample_rate_8000 = 8000, ma_standard_sample_rate_352800 = 352800, /* Extreme highs */ ma_standard_sample_rate_384000 = 384000, ma_standard_sample_rate_min = ma_standard_sample_rate_8000, ma_standard_sample_rate_max = ma_standard_sample_rate_384000, ma_standard_sample_rate_count = 14 /* Need to maintain the count manually. Make sure this is updated if items are added to enum. */ } ma_standard_sample_rate; typedef enum { ma_channel_mix_mode_rectangular = 0, /* Simple averaging based on the plane(s) the channel is sitting on. */ ma_channel_mix_mode_simple, /* Drop excess channels; zeroed out extra channels. */ ma_channel_mix_mode_custom_weights, /* Use custom weights specified in ma_channel_converter_config. */ ma_channel_mix_mode_default = ma_channel_mix_mode_rectangular } ma_channel_mix_mode; typedef enum { ma_standard_channel_map_microsoft, ma_standard_channel_map_alsa, ma_standard_channel_map_rfc3551, /* Based off AIFF. */ ma_standard_channel_map_flac, ma_standard_channel_map_vorbis, ma_standard_channel_map_sound4, /* FreeBSD's sound(4). */ ma_standard_channel_map_sndio, /* www.sndio.org/tips.html */ ma_standard_channel_map_webaudio = ma_standard_channel_map_flac, /* https://webaudio.github.io/web-audio-api/#ChannelOrdering. Only 1, 2, 4 and 6 channels are defined, but can fill in the gaps with logical assumptions. */ ma_standard_channel_map_default = ma_standard_channel_map_microsoft } ma_standard_channel_map; typedef enum { ma_performance_profile_low_latency = 0, ma_performance_profile_conservative } ma_performance_profile; typedef struct { void* pUserData; void* (* onMalloc)(size_t sz, void* pUserData); void* (* onRealloc)(void* p, size_t sz, void* pUserData); void (* onFree)(void* p, void* pUserData); } ma_allocation_callbacks; typedef struct { ma_int32 state; } ma_lcg; /* Atomics. These are typesafe structures to prevent errors as a result of forgetting to reference variables atomically. It's too easy to introduce subtle bugs where you accidentally do a regular assignment instead of an atomic load/store, etc. By using a struct we can enforce the use of atomics at compile time. These types are declared in the header section because we need to reference them in structs below, but functions for using them are only exposed in the implementation section. I do not want these to be part of the public API. There's a few downsides to this system. The first is that you need to declare a new struct for each type. Below are some macros to help with the declarations. They will be named like so: ma_atomic_uint32 - atomic ma_uint32 ma_atomic_int32 - atomic ma_int32 ma_atomic_uint64 - atomic ma_uint64 ma_atomic_float - atomic float ma_atomic_bool32 - atomic ma_bool32 The other downside is that atomic pointers are extremely messy. You need to declare a new struct for each specific type of pointer you need to make atomic. For example, an atomic ma_node* will look like this: MA_ATOMIC_SAFE_TYPE_IMPL_PTR(node) Which will declare a type struct that's named like so: ma_atomic_ptr_node Functions to use the atomic types are declared in the implementation section. All atomic functions are prefixed with the name of the struct. For example: ma_atomic_uint32_set() - Atomic store of ma_uint32 ma_atomic_uint32_get() - Atomic load of ma_uint32 etc. For pointer types it's the same, which makes them a bit messy to use due to the length of each function name, but in return you get type safety and enforcement of atomic operations. */ #define MA_ATOMIC_SAFE_TYPE_DECL(c89TypeExtension, typeSize, type) \ typedef struct \ { \ MA_ATOMIC(typeSize, ma_##type) value; \ } ma_atomic_##type; \ #define MA_ATOMIC_SAFE_TYPE_DECL_PTR(type) \ typedef struct \ { \ MA_ATOMIC(MA_SIZEOF_PTR, ma_##type*) value; \ } ma_atomic_ptr_##type; \ MA_ATOMIC_SAFE_TYPE_DECL(32, 4, uint32) MA_ATOMIC_SAFE_TYPE_DECL(i32, 4, int32) MA_ATOMIC_SAFE_TYPE_DECL(64, 8, uint64) MA_ATOMIC_SAFE_TYPE_DECL(f32, 4, float) MA_ATOMIC_SAFE_TYPE_DECL(32, 4, bool32) /* Spinlocks are 32-bit for compatibility reasons. */ typedef ma_uint32 ma_spinlock; #ifndef MA_NO_THREADING /* Thread priorities should be ordered such that the default priority of the worker thread is 0. */ typedef enum { ma_thread_priority_idle = -5, ma_thread_priority_lowest = -4, ma_thread_priority_low = -3, ma_thread_priority_normal = -2, ma_thread_priority_high = -1, ma_thread_priority_highest = 0, ma_thread_priority_realtime = 1, ma_thread_priority_default = 0 } ma_thread_priority; #if defined(MA_POSIX) typedef ma_pthread_t ma_thread; #elif defined(MA_WIN32) typedef ma_handle ma_thread; #endif #if defined(MA_POSIX) typedef ma_pthread_mutex_t ma_mutex; #elif defined(MA_WIN32) typedef ma_handle ma_mutex; #endif #if defined(MA_POSIX) typedef struct { ma_uint32 value; ma_pthread_mutex_t lock; ma_pthread_cond_t cond; } ma_event; #elif defined(MA_WIN32) typedef ma_handle ma_event; #endif #if defined(MA_POSIX) typedef struct { int value; ma_pthread_mutex_t lock; ma_pthread_cond_t cond; } ma_semaphore; #elif defined(MA_WIN32) typedef ma_handle ma_semaphore; #endif #else /* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */ #ifndef MA_NO_DEVICE_IO #error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO"; #endif #endif /* MA_NO_THREADING */ /* Retrieves the version of miniaudio as separated integers. Each component can be NULL if it's not required. */ MA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); /* Retrieves the version of miniaudio as a string which can be useful for logging purposes. */ MA_API const char* ma_version_string(void); /************************************************************************************************************************************************************** Logging **************************************************************************************************************************************************************/ #include /* For va_list. */ #if defined(__has_attribute) #if __has_attribute(format) #define MA_ATTRIBUTE_FORMAT(fmt, va) __attribute__((format(printf, fmt, va))) #endif #endif #ifndef MA_ATTRIBUTE_FORMAT #define MA_ATTRIBUTE_FORMAT(fmt, va) #endif #ifndef MA_MAX_LOG_CALLBACKS #define MA_MAX_LOG_CALLBACKS 4 #endif /* The callback for handling log messages. Parameters ---------- pUserData (in) The user data pointer that was passed into ma_log_register_callback(). logLevel (in) The log level. This can be one of the following: +----------------------+ | Log Level | +----------------------+ | MA_LOG_LEVEL_DEBUG | | MA_LOG_LEVEL_INFO | | MA_LOG_LEVEL_WARNING | | MA_LOG_LEVEL_ERROR | +----------------------+ pMessage (in) The log message. */ typedef void (* ma_log_callback_proc)(void* pUserData, ma_uint32 level, const char* pMessage); typedef struct { ma_log_callback_proc onLog; void* pUserData; } ma_log_callback; MA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData); typedef struct { ma_log_callback callbacks[MA_MAX_LOG_CALLBACKS]; ma_uint32 callbackCount; ma_allocation_callbacks allocationCallbacks; /* Need to store these persistently because ma_log_postv() might need to allocate a buffer on the heap. */ #ifndef MA_NO_THREADING ma_mutex lock; /* For thread safety just to make it easier and safer for the logging implementation. */ #endif } ma_log; MA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog); MA_API void ma_log_uninit(ma_log* pLog); MA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback); MA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback); MA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage); MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args); MA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...) MA_ATTRIBUTE_FORMAT(3, 4); /************************************************************************************************************************************************************** Biquad Filtering **************************************************************************************************************************************************************/ typedef union { float f32; ma_int32 s32; } ma_biquad_coefficient; typedef struct { ma_format format; ma_uint32 channels; double b0; double b1; double b2; double a0; double a1; double a2; } ma_biquad_config; MA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient b0; ma_biquad_coefficient b1; ma_biquad_coefficient b2; ma_biquad_coefficient a1; ma_biquad_coefficient a2; ma_biquad_coefficient* pR1; ma_biquad_coefficient* pR2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_biquad; MA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ); MA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ); MA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ); MA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ); MA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ); /************************************************************************************************************************************************************** Low-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_lpf1_config, ma_lpf2_config; MA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency); MA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient a; ma_biquad_coefficient* pR1; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_lpf1; MA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF); MA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF); MA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF); MA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF); MA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF); typedef struct { ma_biquad bq; /* The second order low-pass filter is implemented as a biquad filter. */ } ma_lpf2; MA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pHPF); MA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF); MA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF); MA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF); MA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_lpf_config; MA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_lpf1* pLPF1; ma_lpf2* pLPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_lpf; MA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF); MA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF); MA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF); MA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF); MA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF); /************************************************************************************************************************************************************** High-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_hpf1_config, ma_hpf2_config; MA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency); MA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_format format; ma_uint32 channels; ma_biquad_coefficient a; ma_biquad_coefficient* pR1; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_hpf1; MA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF); MA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pHPF); MA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF); MA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF); typedef struct { ma_biquad bq; /* The second order high-pass filter is implemented as a biquad filter. */ } ma_hpf2; MA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF); MA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF); MA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF); MA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_hpf_config; MA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_hpf1* pHPF1; ma_hpf2* pHPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_hpf; MA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF); MA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF); MA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF); MA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF); /************************************************************************************************************************************************************** Band-Pass Filtering **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; double q; } ma_bpf2_config; MA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q); typedef struct { ma_biquad bq; /* The second order band-pass filter is implemented as a biquad filter. */ } ma_bpf2; MA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF); MA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF); MA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF); MA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double cutoffFrequency; ma_uint32 order; /* If set to 0, will be treated as a passthrough (no filtering will be applied). */ } ma_bpf_config; MA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 bpf2Count; ma_bpf2* pBPF2; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_bpf; MA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF); MA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF); MA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF); MA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF); /************************************************************************************************************************************************************** Notching Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double q; double frequency; } ma_notch2_config, ma_notch_config; MA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency); typedef struct { ma_biquad bq; } ma_notch2; MA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter); MA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter); MA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter); MA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter); /************************************************************************************************************************************************************** Peaking EQ Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double q; double frequency; } ma_peak2_config, ma_peak_config; MA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_biquad bq; } ma_peak2; MA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter); MA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter); MA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter); MA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter); /************************************************************************************************************************************************************** Low Shelf Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double shelfSlope; double frequency; } ma_loshelf2_config, ma_loshelf_config; MA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency); typedef struct { ma_biquad bq; } ma_loshelf2; MA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter); MA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter); MA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter); MA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter); /************************************************************************************************************************************************************** High Shelf Filter **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double gainDB; double shelfSlope; double frequency; } ma_hishelf2_config, ma_hishelf_config; MA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency); typedef struct { ma_biquad bq; } ma_hishelf2; MA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter); MA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter); MA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter); MA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter); /* Delay */ typedef struct { ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 delayInFrames; ma_bool32 delayStart; /* Set to true to delay the start of the output; false otherwise. */ float wet; /* 0..1. Default = 1. */ float dry; /* 0..1. Default = 1. */ float decay; /* 0..1. Default = 0 (no feedback). Feedback decay. Use this for echo. */ } ma_delay_config; MA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay); typedef struct { ma_delay_config config; ma_uint32 cursor; /* Feedback is written to this cursor. Always equal or in front of the read cursor. */ ma_uint32 bufferSizeInFrames; float* pBuffer; } ma_delay; MA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay); MA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount); MA_API void ma_delay_set_wet(ma_delay* pDelay, float value); MA_API float ma_delay_get_wet(const ma_delay* pDelay); MA_API void ma_delay_set_dry(ma_delay* pDelay, float value); MA_API float ma_delay_get_dry(const ma_delay* pDelay); MA_API void ma_delay_set_decay(ma_delay* pDelay, float value); MA_API float ma_delay_get_decay(const ma_delay* pDelay); /* Gainer for smooth volume changes. */ typedef struct { ma_uint32 channels; ma_uint32 smoothTimeInFrames; } ma_gainer_config; MA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames); typedef struct { ma_gainer_config config; ma_uint32 t; float masterVolume; float* pOldGains; float* pNewGains; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_gainer; MA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer); MA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer); MA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain); MA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains); MA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume); MA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume); /* Stereo panner. */ typedef enum { ma_pan_mode_balance = 0, /* Does not blend one side with the other. Technically just a balance. Compatible with other popular audio engines and therefore the default. */ ma_pan_mode_pan /* A true pan. The sound from one side will "move" to the other side and blend with it. */ } ma_pan_mode; typedef struct { ma_format format; ma_uint32 channels; ma_pan_mode mode; float pan; } ma_panner_config; MA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels); typedef struct { ma_format format; ma_uint32 channels; ma_pan_mode mode; float pan; /* -1..1 where 0 is no pan, -1 is left side, +1 is right side. Defaults to 0. */ } ma_panner; MA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner); MA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode); MA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner); MA_API void ma_panner_set_pan(ma_panner* pPanner, float pan); MA_API float ma_panner_get_pan(const ma_panner* pPanner); /* Fader. */ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; } ma_fader_config; MA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate); typedef struct { ma_fader_config config; float volumeBeg; /* If volumeBeg and volumeEnd is equal to 1, no fading happens (ma_fader_process_pcm_frames() will run as a passthrough). */ float volumeEnd; ma_uint64 lengthInFrames; /* The total length of the fade. */ ma_int64 cursorInFrames; /* The current time in frames. Incremented by ma_fader_process_pcm_frames(). Signed because it'll be offset by startOffsetInFrames in set_fade_ex(). */ } ma_fader; MA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader); MA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate); MA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames); MA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames); MA_API float ma_fader_get_current_volume(const ma_fader* pFader); /* Spatializer. */ typedef struct { float x; float y; float z; } ma_vec3f; typedef struct { ma_vec3f v; ma_spinlock lock; } ma_atomic_vec3f; typedef enum { ma_attenuation_model_none, /* No distance attenuation and no spatialization. */ ma_attenuation_model_inverse, /* Equivalent to OpenAL's AL_INVERSE_DISTANCE_CLAMPED. */ ma_attenuation_model_linear, /* Linear attenuation. Equivalent to OpenAL's AL_LINEAR_DISTANCE_CLAMPED. */ ma_attenuation_model_exponential /* Exponential attenuation. Equivalent to OpenAL's AL_EXPONENT_DISTANCE_CLAMPED. */ } ma_attenuation_model; typedef enum { ma_positioning_absolute, ma_positioning_relative } ma_positioning; typedef enum { ma_handedness_right, ma_handedness_left } ma_handedness; typedef struct { ma_uint32 channelsOut; ma_channel* pChannelMapOut; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float speedOfSound; ma_vec3f worldUp; } ma_spatializer_listener_config; MA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut); typedef struct { ma_spatializer_listener_config config; ma_atomic_vec3f position; /* The absolute position of the listener. */ ma_atomic_vec3f direction; /* The direction the listener is facing. The world up vector is config.worldUp. */ ma_atomic_vec3f velocity; ma_bool32 isEnabled; /* Memory management. */ ma_bool32 _ownsHeap; void* _pHeap; } ma_spatializer_listener; MA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener); MA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound); MA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z); MA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener); MA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled); MA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener); typedef struct { ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel* pChannelMapIn; ma_attenuation_model attenuationModel; ma_positioning positioning; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float minGain; float maxGain; float minDistance; float maxDistance; float rolloff; float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float dopplerFactor; /* Set to 0 to disable doppler effect. */ float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */ float minSpatializationChannelGain; /* The minimal scaling factor to apply to channel gains when accounting for the direction of the sound relative to the listener. Must be in the range of 0..1. Smaller values means more aggressive directional panning, larger values means more subtle directional panning. */ ma_uint32 gainSmoothTimeInFrames; /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */ } ma_spatializer_config; MA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut); typedef struct { ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel* pChannelMapIn; ma_attenuation_model attenuationModel; ma_positioning positioning; ma_handedness handedness; /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */ float minGain; float maxGain; float minDistance; float maxDistance; float rolloff; float coneInnerAngleInRadians; float coneOuterAngleInRadians; float coneOuterGain; float dopplerFactor; /* Set to 0 to disable doppler effect. */ float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */ ma_uint32 gainSmoothTimeInFrames; /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */ ma_atomic_vec3f position; ma_atomic_vec3f direction; ma_atomic_vec3f velocity; /* For doppler effect. */ float dopplerPitch; /* Will be updated by ma_spatializer_process_pcm_frames() and can be used by higher level functions to apply a pitch shift for doppler effect. */ float minSpatializationChannelGain; ma_gainer gainer; /* For smooth gain transitions. */ float* pNewChannelGainsOut; /* An offset of _pHeap. Used by ma_spatializer_process_pcm_frames() to store new channel gains. The number of elements in this array is equal to config.channelsOut. */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_spatializer; MA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer); MA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer); MA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume); MA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume); MA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer); MA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning); MA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff); MA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain); MA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain); MA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance); MA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance); MA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor); MA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor); MA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z); MA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer); MA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir); /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DATA CONVERSION =============== This section contains the APIs for data conversion. You will find everything here for channel mapping, sample format conversion, resampling, etc. ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ /************************************************************************************************************************************************************** Resampling **************************************************************************************************************************************************************/ typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_uint32 lpfOrder; /* The low-pass filter order. Setting this to 0 will disable low-pass filtering. */ double lpfNyquistFactor; /* 0..1. Defaults to 1. 1 = Half the sampling frequency (Nyquist Frequency), 0.5 = Quarter the sampling frequency (half Nyquest Frequency), etc. */ } ma_linear_resampler_config; MA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); typedef struct { ma_linear_resampler_config config; ma_uint32 inAdvanceInt; ma_uint32 inAdvanceFrac; ma_uint32 inTimeInt; ma_uint32 inTimeFrac; union { float* f32; ma_int16* s16; } x0; /* The previous input frame. */ union { float* f32; ma_int16* s16; } x1; /* The next input frame. */ ma_lpf lpf; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_linear_resampler; MA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler); MA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler); MA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); MA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); MA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut); MA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler); MA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler); MA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); MA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); MA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler); typedef struct ma_resampler_config ma_resampler_config; typedef void ma_resampling_backend; typedef struct { ma_result (* onGetHeapSize )(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes); ma_result (* onInit )(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend); void (* onUninit )(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks); ma_result (* onProcess )(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); ma_result (* onSetRate )(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); /* Optional. Rate changes will be disabled. */ ma_uint64 (* onGetInputLatency )(void* pUserData, const ma_resampling_backend* pBackend); /* Optional. Latency will be reported as 0. */ ma_uint64 (* onGetOutputLatency )(void* pUserData, const ma_resampling_backend* pBackend); /* Optional. Latency will be reported as 0. */ ma_result (* onGetRequiredInputFrameCount )(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); /* Optional. Latency mitigation will be disabled. */ ma_result (* onGetExpectedOutputFrameCount)(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); /* Optional. Latency mitigation will be disabled. */ ma_result (* onReset )(void* pUserData, ma_resampling_backend* pBackend); } ma_resampling_backend_vtable; typedef enum { ma_resample_algorithm_linear = 0, /* Fastest, lowest quality. Optional low-pass filtering. Default. */ ma_resample_algorithm_custom, } ma_resample_algorithm; struct ma_resampler_config { ma_format format; /* Must be either ma_format_f32 or ma_format_s16. */ ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_resample_algorithm algorithm; /* When set to ma_resample_algorithm_custom, pBackendVTable will be used. */ ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; struct { ma_uint32 lpfOrder; } linear; }; MA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm); typedef struct { ma_resampling_backend* pBackend; ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; ma_format format; ma_uint32 channels; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; union { ma_linear_resampler linear; } state; /* State for stock resamplers so we can avoid a malloc. For stock resamplers, pBackend will point here. */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_resampler; MA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler); /* Initializes a new resampler object from a config. */ MA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler); /* Uninitializes a resampler. */ MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks); /* Converts the given input data. Both the input and output frames must be in the format specified in the config when the resampler was initialized. On input, [pFrameCountOut] contains the number of output frames to process. On output it contains the number of output frames that were actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use ma_resampler_get_expected_output_frame_count() to know how many output frames will be processed for a given number of input frames. On input, [pFrameCountIn] contains the number of input frames contained in [pFramesIn]. On output it contains the number of whole input frames that were actually processed. You can use ma_resampler_get_required_input_frame_count() to know how many input frames you should provide for a given number of output frames. [pFramesIn] can be NULL, in which case zeroes will be used instead. If [pFramesOut] is NULL, a seek is performed. In this case, if [pFrameCountOut] is not NULL it will seek by the specified number of output frames. Otherwise, if [pFramesCountOut] is NULL and [pFrameCountIn] is not NULL, it will seek by the specified number of input frames. When seeking, [pFramesIn] is allowed to NULL, in which case the internal timing state will be updated, but no input will be processed. In this case, any internal filter state will be updated as if zeroes were passed in. It is an error for [pFramesOut] to be non-NULL and [pFrameCountOut] to be NULL. It is an error for both [pFrameCountOut] and [pFrameCountIn] to be NULL. */ MA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); /* Sets the input and output sample rate. */ MA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); /* Sets the input and output sample rate as a ratio. The ration is in/out. */ MA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio); /* Retrieves the latency introduced by the resampler in input frames. */ MA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler); /* Retrieves the latency introduced by the resampler in output frames. */ MA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler); /* Calculates the number of whole input frames that would need to be read from the client in order to output the specified number of output frames. The returned value does not include cached input frames. It only returns the number of extra frames that would need to be read from the input buffer in order to output the specified number of output frames. */ MA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); /* Calculates the number of whole output frames that would be output after fully reading and consuming the specified number of input frames. */ MA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); /* Resets the resampler's timer and clears its internal cache. */ MA_API ma_result ma_resampler_reset(ma_resampler* pResampler); /************************************************************************************************************************************************************** Channel Conversion **************************************************************************************************************************************************************/ typedef enum { ma_channel_conversion_path_unknown, ma_channel_conversion_path_passthrough, ma_channel_conversion_path_mono_out, /* Converting to mono. */ ma_channel_conversion_path_mono_in, /* Converting from mono. */ ma_channel_conversion_path_shuffle, /* Simple shuffle. Will use this when all channels are present in both input and output channel maps, but just in a different order. */ ma_channel_conversion_path_weights /* Blended based on weights. */ } ma_channel_conversion_path; typedef enum { ma_mono_expansion_mode_duplicate = 0, /* The default. */ ma_mono_expansion_mode_average, /* Average the mono channel across all channels. */ ma_mono_expansion_mode_stereo_only, /* Duplicate to the left and right channels only and ignore the others. */ ma_mono_expansion_mode_default = ma_mono_expansion_mode_duplicate } ma_mono_expansion_mode; typedef struct { ma_format format; ma_uint32 channelsIn; ma_uint32 channelsOut; const ma_channel* pChannelMapIn; const ma_channel* pChannelMapOut; ma_channel_mix_mode mixingMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ float** ppWeights; /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */ } ma_channel_converter_config; MA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode); typedef struct { ma_format format; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel_mix_mode mixingMode; ma_channel_conversion_path conversionPath; ma_channel* pChannelMapIn; ma_channel* pChannelMapOut; ma_uint8* pShuffleTable; /* Indexed by output channel index. */ union { float** f32; ma_int32** s16; } weights; /* [in][out] */ /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_channel_converter; MA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter); MA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter); MA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount); MA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); /************************************************************************************************************************************************************** Data Conversion **************************************************************************************************************************************************************/ typedef struct { ma_format formatIn; ma_format formatOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_channel* pChannelMapIn; ma_channel* pChannelMapOut; ma_dither_mode ditherMode; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ float** ppChannelWeights; /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */ ma_bool32 allowDynamicSampleRate; ma_resampler_config resampling; } ma_data_converter_config; MA_API ma_data_converter_config ma_data_converter_config_init_default(void); MA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); typedef enum { ma_data_converter_execution_path_passthrough, /* No conversion. */ ma_data_converter_execution_path_format_only, /* Only format conversion. */ ma_data_converter_execution_path_channels_only, /* Only channel conversion. */ ma_data_converter_execution_path_resample_only, /* Only resampling. */ ma_data_converter_execution_path_resample_first, /* All conversions, but resample as the first step. */ ma_data_converter_execution_path_channels_first /* All conversions, but channels as the first step. */ } ma_data_converter_execution_path; typedef struct { ma_format formatIn; ma_format formatOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRateIn; ma_uint32 sampleRateOut; ma_dither_mode ditherMode; ma_data_converter_execution_path executionPath; /* The execution path the data converter will follow when processing. */ ma_channel_converter channelConverter; ma_resampler resampler; ma_bool8 hasPreFormatConversion; ma_bool8 hasPostFormatConversion; ma_bool8 hasChannelConverter; ma_bool8 hasResampler; ma_bool8 isPassthrough; /* Memory management. */ ma_bool8 _ownsHeap; void* _pHeap; } ma_data_converter; MA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter); MA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter); MA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut); MA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut); MA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut); MA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter); MA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter); MA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount); MA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount); MA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter); /************************************************************************************************************************************************************ Format Conversion ************************************************************************************************************************************************************/ MA_API void ma_pcm_u8_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_u8_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s16_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s24_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_s32_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_f32_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode); MA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode); MA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode); /* Deinterleaves an interleaved buffer. */ MA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames); /* Interleaves a group of deinterleaved buffers. */ MA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames); /************************************************************************************************************************************************************ Channel Maps ************************************************************************************************************************************************************/ /* This is used in the shuffle table to indicate that the channel index is undefined and should be ignored. */ #define MA_CHANNEL_INDEX_NULL 255 /* Retrieves the channel position of the specified channel in the given channel map. The pChannelMap parameter can be null, in which case miniaudio's default channel map will be assumed. */ MA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex); /* Initializes a blank channel map. When a blank channel map is specified anywhere it indicates that the native channel map should be used. */ MA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels); /* Helper for retrieving a standard channel map. The output channel map buffer must have a capacity of at least `channelMapCap`. */ MA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels); /* Copies a channel map. Both input and output channel map buffers must have a capacity of at least `channels`. */ MA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels); /* Copies a channel map if one is specified, otherwise copies the default channel map. The output buffer must have a capacity of at least `channels`. If not NULL, the input channel map must also have a capacity of at least `channels`. */ MA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels); /* Determines whether or not a channel map is valid. A blank channel map is valid (all channels set to MA_CHANNEL_NONE). The way a blank channel map is handled is context specific, but is usually treated as a passthrough. Invalid channel maps: - A channel map with no channels - A channel map with more than one channel and a mono channel The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels); /* Helper for comparing two channel maps for equality. This assumes the channel count is the same between the two. Both channels map buffers must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels); /* Helper for determining if a channel map is blank (all channels set to MA_CHANNEL_NONE). The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels); /* Helper for determining whether or not a channel is present in the given channel map. The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition); /* Find a channel position in the given channel map. Returns MA_TRUE if the channel is found; MA_FALSE otherwise. The index of the channel is output to `pChannelIndex`. The channel map buffer must have a capacity of at least `channels`. */ MA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex); /* Generates a string representing the given channel map. This is for printing and debugging purposes, not serialization/deserialization. Returns the length of the string, not including the null terminator. */ MA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap); /* Retrieves a human readable version of a channel position. */ MA_API const char* ma_channel_position_to_string(ma_channel channel); /************************************************************************************************************************************************************ Conversion Helpers ************************************************************************************************************************************************************/ /* High-level helper for doing a full format conversion in one go. Returns the number of output frames. Call this with pOut set to NULL to determine the required size of the output buffer. frameCountOut should be set to the capacity of pOut. If pOut is NULL, frameCountOut is ignored. A return value of 0 indicates an error. This function is useful for one-off bulk conversions, but if you're streaming data you should use the ma_data_converter APIs instead. */ MA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn); MA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig); /************************************************************************************************************************************************************ Data Source ************************************************************************************************************************************************************/ typedef void ma_data_source; #define MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT 0x00000001 typedef struct { ma_result (* onRead)(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); ma_result (* onSeek)(ma_data_source* pDataSource, ma_uint64 frameIndex); ma_result (* onGetDataFormat)(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); ma_result (* onGetCursor)(ma_data_source* pDataSource, ma_uint64* pCursor); ma_result (* onGetLength)(ma_data_source* pDataSource, ma_uint64* pLength); ma_result (* onSetLooping)(ma_data_source* pDataSource, ma_bool32 isLooping); ma_uint32 flags; } ma_data_source_vtable; typedef ma_data_source* (* ma_data_source_get_next_proc)(ma_data_source* pDataSource); typedef struct { const ma_data_source_vtable* vtable; } ma_data_source_config; MA_API ma_data_source_config ma_data_source_config_init(void); typedef struct { const ma_data_source_vtable* vtable; ma_uint64 rangeBegInFrames; ma_uint64 rangeEndInFrames; /* Set to -1 for unranged (default). */ ma_uint64 loopBegInFrames; /* Relative to rangeBegInFrames. */ ma_uint64 loopEndInFrames; /* Relative to rangeBegInFrames. Set to -1 for the end of the range. */ ma_data_source* pCurrent; /* When non-NULL, the data source being initialized will act as a proxy and will route all operations to pCurrent. Used in conjunction with pNext/onGetNext for seamless chaining. */ ma_data_source* pNext; /* When set to NULL, onGetNext will be used. */ ma_data_source_get_next_proc onGetNext; /* Will be used when pNext is NULL. If both are NULL, no next will be used. */ MA_ATOMIC(4, ma_bool32) isLooping; } ma_data_source_base; MA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource); MA_API void ma_data_source_uninit(ma_data_source* pDataSource); MA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Must support pFramesOut = NULL in which case a forward seek should be performed. */ MA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked); /* Can only seek forward. Equivalent to ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, &framesRead); */ MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex); MA_API ma_result ma_data_source_seek_seconds(ma_data_source* pDataSource, float secondCount, float* pSecondsSeeked); /* Can only seek forward. Abstraction to ma_data_source_seek_pcm_frames() */ MA_API ma_result ma_data_source_seek_to_second(ma_data_source* pDataSource, float seekPointInSeconds); /* Abstraction to ma_data_source_seek_to_pcm_frame() */ MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor); MA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength); /* Returns MA_NOT_IMPLEMENTED if the length is unknown or cannot be determined. Decoders can return this. */ MA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor); MA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength); MA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping); MA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames); MA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames); MA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames); MA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames); MA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource); MA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource); MA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource); MA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext); MA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource); typedef struct { ma_data_source_base ds; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 cursor; ma_uint64 sizeInFrames; const void* pData; } ma_audio_buffer_ref; MA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef); MA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef); MA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames); MA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop); MA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex); MA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount); MA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount); /* Returns MA_AT_END if the end has been reached. This should be considered successful. */ MA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef); MA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor); MA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength); MA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 sizeInFrames; const void* pData; /* If set to NULL, will allocate a block of memory for you. */ ma_allocation_callbacks allocationCallbacks; } ma_audio_buffer_config; MA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_audio_buffer_ref ref; ma_allocation_callbacks allocationCallbacks; ma_bool32 ownsData; /* Used to control whether or not miniaudio owns the data buffer. If set to true, pData will be freed in ma_audio_buffer_uninit(). */ ma_uint8 _pExtraData[1]; /* For allocating a buffer with the memory located directly after the other memory of the structure. */ } ma_audio_buffer; MA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer); /* Always copies the data. Doesn't make sense to use this otherwise. Use ma_audio_buffer_uninit_and_free() to uninit. */ MA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer); MA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer); MA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop); MA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex); MA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount); MA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount); /* Returns MA_AT_END if the end has been reached. This should be considered successful. */ MA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer); MA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor); MA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength); MA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames); /* Paged Audio Buffer ================== A paged audio buffer is made up of a linked list of pages. It's expandable, but not shrinkable. It can be used for cases where audio data is streamed in asynchronously while allowing data to be read at the same time. This is lock-free, but not 100% thread safe. You can append a page and read from the buffer across simultaneously across different threads, however only one thread at a time can append, and only one thread at a time can read and seek. */ typedef struct ma_paged_audio_buffer_page ma_paged_audio_buffer_page; struct ma_paged_audio_buffer_page { MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pNext; ma_uint64 sizeInFrames; ma_uint8 pAudioData[1]; }; typedef struct { ma_format format; ma_uint32 channels; ma_paged_audio_buffer_page head; /* Dummy head for the lock-free algorithm. Always has a size of 0. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pTail; /* Never null. Initially set to &head. */ } ma_paged_audio_buffer_data; MA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData); MA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData); MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData); MA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength); MA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage); MA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage); MA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_paged_audio_buffer_data* pData; /* Must not be null. */ } ma_paged_audio_buffer_config; MA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData); typedef struct { ma_data_source_base ds; ma_paged_audio_buffer_data* pData; /* Audio data is read from here. Cannot be null. */ ma_paged_audio_buffer_page* pCurrent; ma_uint64 relativeCursor; /* Relative to the current page. */ ma_uint64 absoluteCursor; } ma_paged_audio_buffer; MA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer); MA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer); MA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Returns MA_AT_END if no more pages available. */ MA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex); MA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor); MA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength); /************************************************************************************************************************************************************ Ring Buffer ************************************************************************************************************************************************************/ typedef struct { void* pBuffer; ma_uint32 subbufferSizeInBytes; ma_uint32 subbufferCount; ma_uint32 subbufferStrideInBytes; MA_ATOMIC(4, ma_uint32) encodedReadOffset; /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */ MA_ATOMIC(4, ma_uint32) encodedWriteOffset; /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */ ma_bool8 ownsBuffer; /* Used to know whether or not miniaudio is responsible for free()-ing the buffer. */ ma_bool8 clearOnWriteAcquire; /* When set, clears the acquired write buffer before returning from ma_rb_acquire_write(). */ ma_allocation_callbacks allocationCallbacks; } ma_rb; MA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB); MA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB); MA_API void ma_rb_uninit(ma_rb* pRB); MA_API void ma_rb_reset(ma_rb* pRB); MA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut); MA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes); MA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut); MA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes); MA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes); MA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes); MA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB); /* Returns the distance between the write pointer and the read pointer. Should never be negative for a correct program. Will return the number of bytes that can be read before the read pointer hits the write pointer. */ MA_API ma_uint32 ma_rb_available_read(ma_rb* pRB); MA_API ma_uint32 ma_rb_available_write(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB); MA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex); MA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer); typedef struct { ma_data_source_base ds; ma_rb rb; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; /* Not required for the ring buffer itself, but useful for associating the data with some sample rate, particularly for data sources. */ } ma_pcm_rb; MA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB); MA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB); MA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB); MA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB); MA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut); MA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames); MA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut); MA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames); MA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames); MA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames); MA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB); /* Return value is in frames. */ MA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex); MA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer); MA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB); MA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB); MA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate); /* The idea of the duplex ring buffer is to act as the intermediary buffer when running two asynchronous devices in a duplex set up. The capture device writes to it, and then a playback device reads from it. At the moment this is just a simple naive implementation, but in the future I want to implement some dynamic resampling to seamlessly handle desyncs. Note that the API is work in progress and may change at any time in any version. The size of the buffer is based on the capture side since that's what'll be written to the buffer. It is based on the capture period size in frames. The internal sample rate of the capture device is also needed in order to calculate the size. */ typedef struct { ma_pcm_rb rb; } ma_duplex_rb; MA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB); MA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB); /************************************************************************************************************************************************************ Miscellaneous Helpers ************************************************************************************************************************************************************/ /* Retrieves a human readable description of the given result code. */ MA_API const char* ma_result_description(ma_result result); /* malloc() */ MA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* calloc() */ MA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* realloc() */ MA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); /* free() */ MA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); /* Performs an aligned malloc, with the assumption that the alignment is a power of 2. */ MA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks); /* Free's an aligned malloc'd buffer. */ MA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); /* Retrieves a friendly name for a format. */ MA_API const char* ma_get_format_name(ma_format format); /* Blends two frames in floating point format. */ MA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels); /* Retrieves the size of a sample in bytes for the given format. This API is efficient and is implemented using a lookup table. Thread Safety: SAFE This API is pure. */ MA_API ma_uint32 ma_get_bytes_per_sample(ma_format format); static MA_INLINE ma_uint32 ma_get_bytes_per_frame(ma_format format, ma_uint32 channels) { return ma_get_bytes_per_sample(format) * channels; } /* Converts a log level to a string. */ MA_API const char* ma_log_level_to_string(ma_uint32 logLevel); /************************************************************************************************************************************************************ Synchronization ************************************************************************************************************************************************************/ /* Locks a spinlock. */ MA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock); /* Locks a spinlock, but does not yield() when looping. */ MA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock); /* Unlocks a spinlock. */ MA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock); #ifndef MA_NO_THREADING /* Creates a mutex. A mutex must be created from a valid context. A mutex is initially unlocked. */ MA_API ma_result ma_mutex_init(ma_mutex* pMutex); /* Deletes a mutex. */ MA_API void ma_mutex_uninit(ma_mutex* pMutex); /* Locks a mutex with an infinite timeout. */ MA_API void ma_mutex_lock(ma_mutex* pMutex); /* Unlocks a mutex. */ MA_API void ma_mutex_unlock(ma_mutex* pMutex); /* Initializes an auto-reset event. */ MA_API ma_result ma_event_init(ma_event* pEvent); /* Uninitializes an auto-reset event. */ MA_API void ma_event_uninit(ma_event* pEvent); /* Waits for the specified auto-reset event to become signalled. */ MA_API ma_result ma_event_wait(ma_event* pEvent); /* Signals the specified auto-reset event. */ MA_API ma_result ma_event_signal(ma_event* pEvent); MA_API ma_result ma_semaphore_init(int initialValue, ma_semaphore* pSemaphore); MA_API void ma_semaphore_uninit(ma_semaphore* pSemaphore); MA_API ma_result ma_semaphore_wait(ma_semaphore* pSemaphore); MA_API ma_result ma_semaphore_release(ma_semaphore* pSemaphore); #endif /* MA_NO_THREADING */ /* Fence ===== This locks while the counter is larger than 0. Counter can be incremented and decremented by any thread, but care needs to be taken when waiting. It is possible for one thread to acquire the fence just as another thread returns from ma_fence_wait(). The idea behind a fence is to allow you to wait for a group of operations to complete. When an operation starts, the counter is incremented which locks the fence. When the operation completes, the fence will be released which decrements the counter. ma_fence_wait() will block until the counter hits zero. If threading is disabled, ma_fence_wait() will spin on the counter. */ typedef struct { #ifndef MA_NO_THREADING ma_event e; #endif ma_uint32 counter; } ma_fence; MA_API ma_result ma_fence_init(ma_fence* pFence); MA_API void ma_fence_uninit(ma_fence* pFence); MA_API ma_result ma_fence_acquire(ma_fence* pFence); /* Increment counter. */ MA_API ma_result ma_fence_release(ma_fence* pFence); /* Decrement counter. */ MA_API ma_result ma_fence_wait(ma_fence* pFence); /* Wait for counter to reach 0. */ /* Notification callback for asynchronous operations. */ typedef void ma_async_notification; typedef struct { void (* onSignal)(ma_async_notification* pNotification); } ma_async_notification_callbacks; MA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification); /* Simple polling notification. This just sets a variable when the notification has been signalled which is then polled with ma_async_notification_poll_is_signalled() */ typedef struct { ma_async_notification_callbacks cb; ma_bool32 signalled; } ma_async_notification_poll; MA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll); MA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll); /* Event Notification This uses an ma_event. If threading is disabled (MA_NO_THREADING), initialization will fail. */ typedef struct { ma_async_notification_callbacks cb; #ifndef MA_NO_THREADING ma_event e; #endif } ma_async_notification_event; MA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent); MA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent); /************************************************************************************************************************************************************ Job Queue ************************************************************************************************************************************************************/ /* Slot Allocator -------------- The idea of the slot allocator is for it to be used in conjunction with a fixed sized buffer. You use the slot allocator to allocate an index that can be used as the insertion point for an object. Slots are reference counted to help mitigate the ABA problem in the lock-free queue we use for tracking jobs. The slot index is stored in the low 32 bits. The reference counter is stored in the high 32 bits: +-----------------+-----------------+ | 32 Bits | 32 Bits | +-----------------+-----------------+ | Reference Count | Slot Index | +-----------------+-----------------+ */ typedef struct { ma_uint32 capacity; /* The number of slots to make available. */ } ma_slot_allocator_config; MA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity); typedef struct { MA_ATOMIC(4, ma_uint32) bitfield; /* Must be used atomically because the allocation and freeing routines need to make copies of this which must never be optimized away by the compiler. */ } ma_slot_allocator_group; typedef struct { ma_slot_allocator_group* pGroups; /* Slots are grouped in chunks of 32. */ ma_uint32* pSlots; /* 32 bits for reference counting for ABA mitigation. */ ma_uint32 count; /* Allocation count. */ ma_uint32 capacity; /* Memory management. */ ma_bool32 _ownsHeap; void* _pHeap; } ma_slot_allocator; MA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator); MA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator); MA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot); MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot); typedef struct ma_job ma_job; /* Callback for processing a job. Each job type will have their own processing callback which will be called by ma_job_process(). */ typedef ma_result (* ma_job_proc)(ma_job* pJob); /* When a job type is added here an callback needs to be added go "g_jobVTable" in the implementation section. */ typedef enum { /* Miscellaneous. */ MA_JOB_TYPE_QUIT = 0, MA_JOB_TYPE_CUSTOM, /* Resource Manager. */ MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE, MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER, MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM, MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM, /* Device. */ MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE, /* Count. Must always be last. */ MA_JOB_TYPE_COUNT } ma_job_type; struct ma_job { union { struct { ma_uint16 code; /* Job type. */ ma_uint16 slot; /* Index into a ma_slot_allocator. */ ma_uint32 refcount; } breakup; ma_uint64 allocation; } toc; /* 8 bytes. We encode the job code into the slot allocation data to save space. */ MA_ATOMIC(8, ma_uint64) next; /* refcount + slot for the next item. Does not include the job code. */ ma_uint32 order; /* Execution order. Used to create a data dependency and ensure a job is executed in order. Usage is contextual depending on the job type. */ union { /* Miscellaneous. */ struct { ma_job_proc proc; ma_uintptr data0; ma_uintptr data1; } custom; /* Resource Manager */ union { struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; char* pFilePath; wchar_t* pFilePathW; ma_uint32 flags; /* Resource manager data source flags that were used when initializing the data buffer. */ ma_async_notification* pInitNotification; /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. Will be passed through to MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE when decoding. */ ma_fence* pInitFence; /* Released when initialization of the decoder is complete. */ ma_fence* pDoneFence; /* Released if initialization of the decoder fails. Passed through to PAGE_DATA_BUFFER_NODE untouched if init is successful. */ } loadDataBufferNode; struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataBufferNode; struct { /*ma_resource_manager**/ void* pResourceManager; /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode; /*ma_decoder**/ void* pDecoder; ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. */ ma_fence* pDoneFence; /* Passed through from LOAD_DATA_BUFFER_NODE and released when the data buffer completes decoding or an error occurs. */ } pageDataBufferNode; struct { /*ma_resource_manager_data_buffer**/ void* pDataBuffer; ma_async_notification* pInitNotification; /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_async_notification* pDoneNotification; /* Signalled when the data buffer has been fully decoded. */ ma_fence* pInitFence; /* Released when the data buffer has been initialized and the format/channels/rate can be retrieved. */ ma_fence* pDoneFence; /* Released when the data buffer has been fully decoded. */ ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_uint32 isLooping; } loadDataBuffer; struct { /*ma_resource_manager_data_buffer**/ void* pDataBuffer; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataBuffer; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; char* pFilePath; /* Allocated when the job is posted, freed by the job thread after loading. */ wchar_t* pFilePathW; /* ^ As above ^. Only used if pFilePath is NULL. */ ma_uint64 initialSeekPoint; ma_async_notification* pInitNotification; /* Signalled after the first two pages have been decoded and frames can be read from the stream. */ ma_fence* pInitFence; } loadDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_async_notification* pDoneNotification; ma_fence* pDoneFence; } freeDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_uint32 pageIndex; /* The index of the page to decode into. */ } pageDataStream; struct { /*ma_resource_manager_data_stream**/ void* pDataStream; ma_uint64 frameIndex; } seekDataStream; } resourceManager; /* Device. */ union { union { struct { /*ma_device**/ void* pDevice; /*ma_device_type*/ ma_uint32 deviceType; } reroute; } aaudio; } device; } data; }; MA_API ma_job ma_job_init(ma_uint16 code); MA_API ma_result ma_job_process(ma_job* pJob); /* When set, ma_job_queue_next() will not wait and no semaphore will be signaled in ma_job_queue_post(). ma_job_queue_next() will return MA_NO_DATA_AVAILABLE if nothing is available. This flag should always be used for platforms that do not support multithreading. */ typedef enum { MA_JOB_QUEUE_FLAG_NON_BLOCKING = 0x00000001 } ma_job_queue_flags; typedef struct { ma_uint32 flags; ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. */ } ma_job_queue_config; MA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity); typedef struct { ma_uint32 flags; /* Flags passed in at initialization time. */ ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. Set by the config. */ MA_ATOMIC(8, ma_uint64) head; /* The first item in the list. Required for removing from the top of the list. */ MA_ATOMIC(8, ma_uint64) tail; /* The last item in the list. Required for appending to the end of the list. */ #ifndef MA_NO_THREADING ma_semaphore sem; /* Only used when MA_JOB_QUEUE_FLAG_NON_BLOCKING is unset. */ #endif ma_slot_allocator allocator; ma_job* pJobs; #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock lock; #endif /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_job_queue; MA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue); MA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue); MA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob); MA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob); /* Returns MA_CANCELLED if the next job is a quit job. */ /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DEVICE I/O ========== This section contains the APIs for device playback and capture. Here is where you'll find ma_device_init(), etc. ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ #ifndef MA_NO_DEVICE_IO /* Some backends are only supported on certain platforms. */ #if defined(MA_WIN32) #define MA_SUPPORT_WASAPI #if defined(MA_WIN32_DESKTOP) /* DirectSound and WinMM backends are only supported on desktops. */ #define MA_SUPPORT_DSOUND #define MA_SUPPORT_WINMM /* Don't enable JACK here if compiling with Cosmopolitan. It'll be enabled in the Linux section below. */ #if !defined(__COSMOPOLITAN__) #define MA_SUPPORT_JACK /* JACK is technically supported on Windows, but I don't know how many people use it in practice... */ #endif #endif #endif #if defined(MA_UNIX) && !defined(MA_ORBIS) && !defined(MA_PROSPERO) #if defined(MA_LINUX) #if !defined(MA_ANDROID) && !defined(__COSMOPOLITAN__) /* ALSA is not supported on Android. */ #define MA_SUPPORT_ALSA #endif #endif #if !defined(MA_BSD) && !defined(MA_ANDROID) && !defined(MA_EMSCRIPTEN) #define MA_SUPPORT_PULSEAUDIO #define MA_SUPPORT_JACK #endif #if defined(__OpenBSD__) /* <-- Change this to "#if defined(MA_BSD)" to enable sndio on all BSD flavors. */ #define MA_SUPPORT_SNDIO /* sndio is only supported on OpenBSD for now. May be expanded later if there's demand. */ #endif #if defined(__NetBSD__) || defined(__OpenBSD__) #define MA_SUPPORT_AUDIO4 /* Only support audio(4) on platforms with known support. */ #endif #if defined(__FreeBSD__) || defined(__DragonFly__) #define MA_SUPPORT_OSS /* Only support OSS on specific platforms with known support. */ #endif #endif #if defined(MA_ANDROID) #define MA_SUPPORT_AAUDIO #define MA_SUPPORT_OPENSL #endif #if defined(MA_APPLE) #define MA_SUPPORT_COREAUDIO #endif #if defined(MA_EMSCRIPTEN) #define MA_SUPPORT_WEBAUDIO #endif /* All platforms should support custom backends. */ #define MA_SUPPORT_CUSTOM /* Explicitly disable the Null backend for Emscripten because it uses a background thread which is not properly supported right now. */ #if !defined(MA_EMSCRIPTEN) #define MA_SUPPORT_NULL #endif #if defined(MA_SUPPORT_WASAPI) && !defined(MA_NO_WASAPI) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WASAPI)) #define MA_HAS_WASAPI #endif #if defined(MA_SUPPORT_DSOUND) && !defined(MA_NO_DSOUND) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_DSOUND)) #define MA_HAS_DSOUND #endif #if defined(MA_SUPPORT_WINMM) && !defined(MA_NO_WINMM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WINMM)) #define MA_HAS_WINMM #endif #if defined(MA_SUPPORT_ALSA) && !defined(MA_NO_ALSA) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_ALSA)) #define MA_HAS_ALSA #endif #if defined(MA_SUPPORT_PULSEAUDIO) && !defined(MA_NO_PULSEAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_PULSEAUDIO)) #define MA_HAS_PULSEAUDIO #endif #if defined(MA_SUPPORT_JACK) && !defined(MA_NO_JACK) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_JACK)) #define MA_HAS_JACK #endif #if defined(MA_SUPPORT_COREAUDIO) && !defined(MA_NO_COREAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_COREAUDIO)) #define MA_HAS_COREAUDIO #endif #if defined(MA_SUPPORT_SNDIO) && !defined(MA_NO_SNDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_SNDIO)) #define MA_HAS_SNDIO #endif #if defined(MA_SUPPORT_AUDIO4) && !defined(MA_NO_AUDIO4) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AUDIO4)) #define MA_HAS_AUDIO4 #endif #if defined(MA_SUPPORT_OSS) && !defined(MA_NO_OSS) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OSS)) #define MA_HAS_OSS #endif #if defined(MA_SUPPORT_AAUDIO) && !defined(MA_NO_AAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AAUDIO)) #define MA_HAS_AAUDIO #endif #if defined(MA_SUPPORT_OPENSL) && !defined(MA_NO_OPENSL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OPENSL)) #define MA_HAS_OPENSL #endif #if defined(MA_SUPPORT_WEBAUDIO) && !defined(MA_NO_WEBAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WEBAUDIO)) #define MA_HAS_WEBAUDIO #endif #if defined(MA_SUPPORT_CUSTOM) && !defined(MA_NO_CUSTOM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_CUSTOM)) #define MA_HAS_CUSTOM #endif #if defined(MA_SUPPORT_NULL) && !defined(MA_NO_NULL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_NULL)) #define MA_HAS_NULL #endif typedef enum { ma_device_state_uninitialized = 0, ma_device_state_stopped = 1, /* The device's default state after initialization. */ ma_device_state_started = 2, /* The device is started and is requesting and/or delivering audio data. */ ma_device_state_starting = 3, /* Transitioning from a stopped state to started. */ ma_device_state_stopping = 4 /* Transitioning from a started state to stopped. */ } ma_device_state; MA_ATOMIC_SAFE_TYPE_DECL(i32, 4, device_state) #ifdef MA_SUPPORT_WASAPI /* We need a IMMNotificationClient object for WASAPI. */ typedef struct { void* lpVtbl; ma_uint32 counter; ma_device* pDevice; } ma_IMMNotificationClient; #endif /* Backend enums must be in priority order. */ typedef enum { ma_backend_wasapi, ma_backend_dsound, ma_backend_winmm, ma_backend_coreaudio, ma_backend_sndio, ma_backend_audio4, ma_backend_oss, ma_backend_pulseaudio, ma_backend_alsa, ma_backend_jack, ma_backend_aaudio, ma_backend_opensl, ma_backend_webaudio, ma_backend_custom, /* <-- Custom backend, with callbacks defined by the context config. */ ma_backend_null /* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */ } ma_backend; #define MA_BACKEND_COUNT (ma_backend_null+1) /* Device job thread. This is used by backends that require asynchronous processing of certain operations. It is not used by all backends. The device job thread is made up of a thread and a job queue. You can post a job to the thread with ma_device_job_thread_post(). The thread will do the processing of the job. */ typedef struct { ma_bool32 noThread; /* Set this to true if you want to process jobs yourself. */ ma_uint32 jobQueueCapacity; ma_uint32 jobQueueFlags; } ma_device_job_thread_config; MA_API ma_device_job_thread_config ma_device_job_thread_config_init(void); typedef struct { ma_thread thread; ma_job_queue jobQueue; ma_bool32 _hasThread; } ma_device_job_thread; MA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread); MA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob); MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob); /* Device notification types. */ typedef enum { ma_device_notification_type_started, ma_device_notification_type_stopped, ma_device_notification_type_rerouted, ma_device_notification_type_interruption_began, ma_device_notification_type_interruption_ended, ma_device_notification_type_unlocked } ma_device_notification_type; typedef struct { ma_device* pDevice; ma_device_notification_type type; union { struct { int _unused; } started; struct { int _unused; } stopped; struct { int _unused; } rerouted; struct { int _unused; } interruption; } data; } ma_device_notification; /* The notification callback for when the application should be notified of a change to the device. This callback is used for notifying the application of changes such as when the device has started, stopped, rerouted or an interruption has occurred. Note that not all backends will post all notification types. For example, some backends will perform automatic stream routing without any kind of notification to the host program which means miniaudio will never know about it and will never be able to fire the rerouted notification. You should keep this in mind when designing your program. The stopped notification will *not* get fired when a device is rerouted. Parameters ---------- pNotification (in) A pointer to a structure containing information about the event. Use the `pDevice` member of this object to retrieve the relevant device. The `type` member can be used to discriminate against each of the notification types. Remarks ------- Do not restart or uninitialize the device from the callback. Not all notifications will be triggered by all backends, however the started and stopped events should be reliable for all backends. Some backends do not have a good way to detect device stoppages due to unplugging the device which may result in the stopped callback not getting fired. This has been observed with at least one BSD variant. The rerouted notification is fired *after* the reroute has occurred. The stopped notification will *not* get fired when a device is rerouted. The following backends are known to do automatic stream rerouting, but do not have a way to be notified of the change: * DirectSound The interruption notifications are used on mobile platforms for detecting when audio is interrupted due to things like an incoming phone call. Currently this is only implemented on iOS. None of the Android backends will report this notification. */ typedef void (* ma_device_notification_proc)(const ma_device_notification* pNotification); /* The callback for processing audio data from the device. The data callback is fired by miniaudio whenever the device needs to have more data delivered to a playback device, or when a capture device has some data available. This is called as soon as the backend asks for more data which means it may be called with inconsistent frame counts. You cannot assume the callback will be fired with a consistent frame count. Parameters ---------- pDevice (in) A pointer to the relevant device. pOutput (out) A pointer to the output buffer that will receive audio data that will later be played back through the speakers. This will be non-null for a playback or full-duplex device and null for a capture and loopback device. pInput (in) A pointer to the buffer containing input data from a recording device. This will be non-null for a capture, full-duplex or loopback device and null for a playback device. frameCount (in) The number of PCM frames to process. Note that this will not necessarily be equal to what you requested when you initialized the device. The `periodSizeInFrames` and `periodSizeInMilliseconds` members of the device config are just hints, and are not necessarily exactly what you'll get. You must not assume this will always be the same value each time the callback is fired. Remarks ------- You cannot stop and start the device from inside the callback or else you'll get a deadlock. You must also not uninitialize the device from inside the callback. The following APIs cannot be called from inside the callback: ma_device_init() ma_device_init_ex() ma_device_uninit() ma_device_start() ma_device_stop() The proper way to stop the device is to call `ma_device_stop()` from a different thread, normally the main application thread. */ typedef void (* ma_device_data_proc)(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount); /* DEPRECATED. Use ma_device_notification_proc instead. The callback for when the device has been stopped. This will be called when the device is stopped explicitly with `ma_device_stop()` and also called implicitly when the device is stopped through external forces such as being unplugged or an internal error occurring. Parameters ---------- pDevice (in) A pointer to the device that has just stopped. Remarks ------- Do not restart or uninitialize the device from the callback. */ typedef void (* ma_stop_proc)(ma_device* pDevice); /* DEPRECATED. Use ma_device_notification_proc instead. */ typedef enum { ma_device_type_playback = 1, ma_device_type_capture = 2, ma_device_type_duplex = ma_device_type_playback | ma_device_type_capture, /* 3 */ ma_device_type_loopback = 4 } ma_device_type; typedef enum { ma_share_mode_shared = 0, ma_share_mode_exclusive } ma_share_mode; /* iOS/tvOS/watchOS session categories. */ typedef enum { ma_ios_session_category_default = 0, /* AVAudioSessionCategoryPlayAndRecord. */ ma_ios_session_category_none, /* Leave the session category unchanged. */ ma_ios_session_category_ambient, /* AVAudioSessionCategoryAmbient */ ma_ios_session_category_solo_ambient, /* AVAudioSessionCategorySoloAmbient */ ma_ios_session_category_playback, /* AVAudioSessionCategoryPlayback */ ma_ios_session_category_record, /* AVAudioSessionCategoryRecord */ ma_ios_session_category_play_and_record, /* AVAudioSessionCategoryPlayAndRecord */ ma_ios_session_category_multi_route /* AVAudioSessionCategoryMultiRoute */ } ma_ios_session_category; /* iOS/tvOS/watchOS session category options */ typedef enum { ma_ios_session_category_option_mix_with_others = 0x01, /* AVAudioSessionCategoryOptionMixWithOthers */ ma_ios_session_category_option_duck_others = 0x02, /* AVAudioSessionCategoryOptionDuckOthers */ ma_ios_session_category_option_allow_bluetooth = 0x04, /* AVAudioSessionCategoryOptionAllowBluetooth */ ma_ios_session_category_option_default_to_speaker = 0x08, /* AVAudioSessionCategoryOptionDefaultToSpeaker */ ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others = 0x11, /* AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers */ ma_ios_session_category_option_allow_bluetooth_a2dp = 0x20, /* AVAudioSessionCategoryOptionAllowBluetoothA2DP */ ma_ios_session_category_option_allow_air_play = 0x40, /* AVAudioSessionCategoryOptionAllowAirPlay */ } ma_ios_session_category_option; /* OpenSL stream types. */ typedef enum { ma_opensl_stream_type_default = 0, /* Leaves the stream type unset. */ ma_opensl_stream_type_voice, /* SL_ANDROID_STREAM_VOICE */ ma_opensl_stream_type_system, /* SL_ANDROID_STREAM_SYSTEM */ ma_opensl_stream_type_ring, /* SL_ANDROID_STREAM_RING */ ma_opensl_stream_type_media, /* SL_ANDROID_STREAM_MEDIA */ ma_opensl_stream_type_alarm, /* SL_ANDROID_STREAM_ALARM */ ma_opensl_stream_type_notification /* SL_ANDROID_STREAM_NOTIFICATION */ } ma_opensl_stream_type; /* OpenSL recording presets. */ typedef enum { ma_opensl_recording_preset_default = 0, /* Leaves the input preset unset. */ ma_opensl_recording_preset_generic, /* SL_ANDROID_RECORDING_PRESET_GENERIC */ ma_opensl_recording_preset_camcorder, /* SL_ANDROID_RECORDING_PRESET_CAMCORDER */ ma_opensl_recording_preset_voice_recognition, /* SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION */ ma_opensl_recording_preset_voice_communication, /* SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION */ ma_opensl_recording_preset_voice_unprocessed /* SL_ANDROID_RECORDING_PRESET_UNPROCESSED */ } ma_opensl_recording_preset; /* WASAPI audio thread priority characteristics. */ typedef enum { ma_wasapi_usage_default = 0, ma_wasapi_usage_games, ma_wasapi_usage_pro_audio, } ma_wasapi_usage; /* AAudio usage types. */ typedef enum { ma_aaudio_usage_default = 0, /* Leaves the usage type unset. */ ma_aaudio_usage_media, /* AAUDIO_USAGE_MEDIA */ ma_aaudio_usage_voice_communication, /* AAUDIO_USAGE_VOICE_COMMUNICATION */ ma_aaudio_usage_voice_communication_signalling, /* AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING */ ma_aaudio_usage_alarm, /* AAUDIO_USAGE_ALARM */ ma_aaudio_usage_notification, /* AAUDIO_USAGE_NOTIFICATION */ ma_aaudio_usage_notification_ringtone, /* AAUDIO_USAGE_NOTIFICATION_RINGTONE */ ma_aaudio_usage_notification_event, /* AAUDIO_USAGE_NOTIFICATION_EVENT */ ma_aaudio_usage_assistance_accessibility, /* AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY */ ma_aaudio_usage_assistance_navigation_guidance, /* AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE */ ma_aaudio_usage_assistance_sonification, /* AAUDIO_USAGE_ASSISTANCE_SONIFICATION */ ma_aaudio_usage_game, /* AAUDIO_USAGE_GAME */ ma_aaudio_usage_assitant, /* AAUDIO_USAGE_ASSISTANT */ ma_aaudio_usage_emergency, /* AAUDIO_SYSTEM_USAGE_EMERGENCY */ ma_aaudio_usage_safety, /* AAUDIO_SYSTEM_USAGE_SAFETY */ ma_aaudio_usage_vehicle_status, /* AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS */ ma_aaudio_usage_announcement /* AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT */ } ma_aaudio_usage; /* AAudio content types. */ typedef enum { ma_aaudio_content_type_default = 0, /* Leaves the content type unset. */ ma_aaudio_content_type_speech, /* AAUDIO_CONTENT_TYPE_SPEECH */ ma_aaudio_content_type_music, /* AAUDIO_CONTENT_TYPE_MUSIC */ ma_aaudio_content_type_movie, /* AAUDIO_CONTENT_TYPE_MOVIE */ ma_aaudio_content_type_sonification /* AAUDIO_CONTENT_TYPE_SONIFICATION */ } ma_aaudio_content_type; /* AAudio input presets. */ typedef enum { ma_aaudio_input_preset_default = 0, /* Leaves the input preset unset. */ ma_aaudio_input_preset_generic, /* AAUDIO_INPUT_PRESET_GENERIC */ ma_aaudio_input_preset_camcorder, /* AAUDIO_INPUT_PRESET_CAMCORDER */ ma_aaudio_input_preset_voice_recognition, /* AAUDIO_INPUT_PRESET_VOICE_RECOGNITION */ ma_aaudio_input_preset_voice_communication, /* AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION */ ma_aaudio_input_preset_unprocessed, /* AAUDIO_INPUT_PRESET_UNPROCESSED */ ma_aaudio_input_preset_voice_performance /* AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE */ } ma_aaudio_input_preset; typedef enum { ma_aaudio_allow_capture_default = 0, /* Leaves the allowed capture policy unset. */ ma_aaudio_allow_capture_by_all, /* AAUDIO_ALLOW_CAPTURE_BY_ALL */ ma_aaudio_allow_capture_by_system, /* AAUDIO_ALLOW_CAPTURE_BY_SYSTEM */ ma_aaudio_allow_capture_by_none /* AAUDIO_ALLOW_CAPTURE_BY_NONE */ } ma_aaudio_allowed_capture_policy; typedef union { ma_int64 counter; double counterD; } ma_timer; typedef union { ma_wchar_win32 wasapi[64]; /* WASAPI uses a wchar_t string for identification. */ ma_uint8 dsound[16]; /* DirectSound uses a GUID for identification. */ /*UINT_PTR*/ ma_uint32 winmm; /* When creating a device, WinMM expects a Win32 UINT_PTR for device identification. In practice it's actually just a UINT. */ char alsa[256]; /* ALSA uses a name string for identification. */ char pulse[256]; /* PulseAudio uses a name string for identification. */ int jack; /* JACK always uses default devices. */ char coreaudio[256]; /* Core Audio uses a string for identification. */ char sndio[256]; /* "snd/0", etc. */ char audio4[256]; /* "/dev/audio", etc. */ char oss[64]; /* "dev/dsp0", etc. "dev/dsp" for the default device. */ ma_int32 aaudio; /* AAudio uses a 32-bit integer for identification. */ ma_uint32 opensl; /* OpenSL|ES uses a 32-bit unsigned integer for identification. */ char webaudio[32]; /* Web Audio always uses default devices for now, but if this changes it'll be a GUID. */ union { int i; char s[256]; void* p; } custom; /* The custom backend could be anything. Give them a few options. */ int nullbackend; /* The null backend uses an integer for device IDs. */ } ma_device_id; MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB); typedef struct ma_context_config ma_context_config; typedef struct ma_device_config ma_device_config; typedef struct ma_backend_callbacks ma_backend_callbacks; #define MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE (1U << 1) /* If set, this is supported in exclusive mode. Otherwise not natively supported by exclusive mode. */ #ifndef MA_MAX_DEVICE_NAME_LENGTH #define MA_MAX_DEVICE_NAME_LENGTH 255 #endif typedef struct { /* Basic info. This is the only information guaranteed to be filled in during device enumeration. */ ma_device_id id; char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* +1 for null terminator. */ ma_bool32 isDefault; ma_uint32 nativeDataFormatCount; struct { ma_format format; /* Sample format. If set to ma_format_unknown, all sample formats are supported. */ ma_uint32 channels; /* If set to 0, all channels are supported. */ ma_uint32 sampleRate; /* If set to 0, all sample rates are supported. */ ma_uint32 flags; /* A combination of MA_DATA_FORMAT_FLAG_* flags. */ } nativeDataFormats[/*ma_format_count * ma_standard_sample_rate_count * MA_MAX_CHANNELS*/ 64]; /* Not sure how big to make this. There can be *many* permutations for virtual devices which can support anything. */ } ma_device_info; struct ma_device_config { ma_device_type deviceType; ma_uint32 sampleRate; ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInMilliseconds; ma_uint32 periods; ma_performance_profile performanceProfile; ma_bool8 noPreSilencedOutputBuffer; /* When set to true, the contents of the output buffer passed into the data callback will be left undefined rather than initialized to silence. */ ma_bool8 noClip; /* When set to true, the contents of the output buffer passed into the data callback will not be clipped after returning. Only applies when the playback sample format is f32. */ ma_bool8 noDisableDenormals; /* Do not disable denormals when firing the data callback. */ ma_bool8 noFixedSizedCallback; /* Disables strict fixed-sized data callbacks. Setting this to true will result in the period size being treated only as a hint to the backend. This is an optimization for those who don't need fixed sized callbacks. */ ma_device_data_proc dataCallback; ma_device_notification_proc notificationCallback; ma_stop_proc stopCallback; void* pUserData; ma_resampler_config resampling; struct { const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ ma_share_mode shareMode; } playback; struct { const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */ ma_share_mode shareMode; } capture; struct { ma_wasapi_usage usage; /* When configured, uses Avrt APIs to set the thread characteristics. */ ma_bool8 noAutoConvertSRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ ma_bool8 noDefaultQualitySRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */ ma_bool8 noAutoStreamRouting; /* Disables automatic stream routing. */ ma_bool8 noHardwareOffloading; /* Disables WASAPI's hardware offloading feature. */ ma_uint32 loopbackProcessID; /* The process ID to include or exclude for loopback mode. Set to 0 to capture audio from all processes. Ignored when an explicit device ID is specified. */ ma_bool8 loopbackProcessExclude; /* When set to true, excludes the process specified by loopbackProcessID. By default, the process will be included. */ } wasapi; struct { ma_bool32 noMMap; /* Disables MMap mode. */ ma_bool32 noAutoFormat; /* Opens the ALSA device with SND_PCM_NO_AUTO_FORMAT. */ ma_bool32 noAutoChannels; /* Opens the ALSA device with SND_PCM_NO_AUTO_CHANNELS. */ ma_bool32 noAutoResample; /* Opens the ALSA device with SND_PCM_NO_AUTO_RESAMPLE. */ } alsa; struct { const char* pStreamNamePlayback; const char* pStreamNameCapture; int channelMap; } pulse; struct { ma_bool32 allowNominalSampleRateChange; /* Desktop only. When enabled, allows changing of the sample rate at the operating system level. */ } coreaudio; struct { ma_opensl_stream_type streamType; ma_opensl_recording_preset recordingPreset; ma_bool32 enableCompatibilityWorkarounds; } opensl; struct { ma_aaudio_usage usage; ma_aaudio_content_type contentType; ma_aaudio_input_preset inputPreset; ma_aaudio_allowed_capture_policy allowedCapturePolicy; ma_bool32 noAutoStartAfterReroute; ma_bool32 enableCompatibilityWorkarounds; ma_bool32 allowSetBufferCapacity; } aaudio; }; /* The callback for handling device enumeration. This is fired from `ma_context_enumerate_devices()`. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. deviceType (in) The type of the device being enumerated. This will always be either `ma_device_type_playback` or `ma_device_type_capture`. pInfo (in) A pointer to a `ma_device_info` containing the ID and name of the enumerated device. Note that this will not include detailed information about the device, only basic information (ID and name). The reason for this is that it would otherwise require opening the backend device to probe for the information which is too inefficient. pUserData (in) The user data pointer passed into `ma_context_enumerate_devices()`. */ typedef ma_bool32 (* ma_enum_devices_callback_proc)(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData); /* Describes some basic details about a playback or capture device. */ typedef struct { const ma_device_id* pDeviceID; ma_share_mode shareMode; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_channel channelMap[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInMilliseconds; ma_uint32 periodCount; } ma_device_descriptor; /* These are the callbacks required to be implemented for a backend. These callbacks are grouped into two parts: context and device. There is one context to many devices. A device is created from a context. The general flow goes like this: 1) A context is created with `onContextInit()` 1a) Available devices can be enumerated with `onContextEnumerateDevices()` if required. 1b) Detailed information about a device can be queried with `onContextGetDeviceInfo()` if required. 2) A device is created from the context that was created in the first step using `onDeviceInit()`, and optionally a device ID that was selected from device enumeration via `onContextEnumerateDevices()`. 3) A device is started or stopped with `onDeviceStart()` / `onDeviceStop()` 4) Data is delivered to and from the device by the backend. This is always done based on the native format returned by the prior call to `onDeviceInit()`. Conversion between the device's native format and the format requested by the application will be handled by miniaudio internally. Initialization of the context is quite simple. You need to do any necessary initialization of internal objects and then output the callbacks defined in this structure. Once the context has been initialized you can initialize a device. Before doing so, however, the application may want to know which physical devices are available. This is where `onContextEnumerateDevices()` comes in. This is fairly simple. For each device, fire the given callback with, at a minimum, the basic information filled out in `ma_device_info`. When the callback returns `MA_FALSE`, enumeration needs to stop and the `onContextEnumerateDevices()` function returns with a success code. Detailed device information can be retrieved from a device ID using `onContextGetDeviceInfo()`. This takes as input the device type and ID, and on output returns detailed information about the device in `ma_device_info`. The `onContextGetDeviceInfo()` callback must handle the case when the device ID is NULL, in which case information about the default device needs to be retrieved. Once the context has been created and the device ID retrieved (if using anything other than the default device), the device can be created. This is a little bit more complicated than initialization of the context due to its more complicated configuration. When initializing a device, a duplex device may be requested. This means a separate data format needs to be specified for both playback and capture. On input, the data format is set to what the application wants. On output it's set to the native format which should match as closely as possible to the requested format. The conversion between the format requested by the application and the device's native format will be handled internally by miniaudio. On input, if the sample format is set to `ma_format_unknown`, the backend is free to use whatever sample format it desires, so long as it's supported by miniaudio. When the channel count is set to 0, the backend should use the device's native channel count. The same applies for sample rate. For the channel map, the default should be used when `ma_channel_map_is_blank()` returns true (all channels set to `MA_CHANNEL_NONE`). On input, the `periodSizeInFrames` or `periodSizeInMilliseconds` option should always be set. The backend should inspect both of these variables. If `periodSizeInFrames` is set, it should take priority, otherwise it needs to be derived from the period size in milliseconds (`periodSizeInMilliseconds`) and the sample rate, keeping in mind that the sample rate may be 0, in which case the sample rate will need to be determined before calculating the period size in frames. On output, all members of the `ma_device_descriptor` object should be set to a valid value, except for `periodSizeInMilliseconds` which is optional (`periodSizeInFrames` *must* be set). Starting and stopping of the device is done with `onDeviceStart()` and `onDeviceStop()` and should be self-explanatory. If the backend uses asynchronous reading and writing, `onDeviceStart()` and `onDeviceStop()` should always be implemented. The handling of data delivery between the application and the device is the most complicated part of the process. To make this a bit easier, some helper callbacks are available. If the backend uses a blocking read/write style of API, the `onDeviceRead()` and `onDeviceWrite()` callbacks can optionally be implemented. These are blocking and work just like reading and writing from a file. If the backend uses a callback for data delivery, that callback must call `ma_device_handle_backend_data_callback()` from within its callback. This allows miniaudio to then process any necessary data conversion and then pass it to the miniaudio data callback. If the backend requires absolute flexibility with its data delivery, it can optionally implement the `onDeviceDataLoop()` callback which will allow it to implement the logic that will run on the audio thread. This is much more advanced and is completely optional. The audio thread should run data delivery logic in a loop while `ma_device_get_state() == ma_device_state_started` and no errors have been encountered. Do not start or stop the device here. That will be handled from outside the `onDeviceDataLoop()` callback. The invocation of the `onDeviceDataLoop()` callback will be handled by miniaudio. When you start the device, miniaudio will fire this callback. When the device is stopped, the `ma_device_get_state() == ma_device_state_started` condition will fail and the loop will be terminated which will then fall through to the part that stops the device. For an example on how to implement the `onDeviceDataLoop()` callback, look at `ma_device_audio_thread__default_read_write()`. Implement the `onDeviceDataLoopWakeup()` callback if you need a mechanism to wake up the audio thread. If the backend supports an optimized retrieval of device information from an initialized `ma_device` object, it should implement the `onDeviceGetInfo()` callback. This is optional, in which case it will fall back to `onContextGetDeviceInfo()` which is less efficient. */ struct ma_backend_callbacks { ma_result (* onContextInit)(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks); ma_result (* onContextUninit)(ma_context* pContext); ma_result (* onContextEnumerateDevices)(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData); ma_result (* onContextGetDeviceInfo)(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo); ma_result (* onDeviceInit)(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture); ma_result (* onDeviceUninit)(ma_device* pDevice); ma_result (* onDeviceStart)(ma_device* pDevice); ma_result (* onDeviceStop)(ma_device* pDevice); ma_result (* onDeviceRead)(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead); ma_result (* onDeviceWrite)(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten); ma_result (* onDeviceDataLoop)(ma_device* pDevice); ma_result (* onDeviceDataLoopWakeup)(ma_device* pDevice); ma_result (* onDeviceGetInfo)(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo); }; struct ma_context_config { ma_log* pLog; ma_thread_priority threadPriority; size_t threadStackSize; void* pUserData; ma_allocation_callbacks allocationCallbacks; struct { ma_handle hWnd; /* HWND. Optional window handle to pass into SetCooperativeLevel(). Will default to the foreground window, and if that fails, the desktop window. */ } dsound; struct { ma_bool32 useVerboseDeviceEnumeration; } alsa; struct { const char* pApplicationName; const char* pServerName; ma_bool32 tryAutoSpawn; /* Enables autospawning of the PulseAudio daemon if necessary. */ } pulse; struct { ma_ios_session_category sessionCategory; ma_uint32 sessionCategoryOptions; ma_bool32 noAudioSessionActivate; /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization. */ ma_bool32 noAudioSessionDeactivate; /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization. */ } coreaudio; struct { const char* pClientName; ma_bool32 tryStartServer; } jack; ma_backend_callbacks custom; }; /* WASAPI specific structure for some commands which must run on a common thread due to bugs in WASAPI. */ typedef struct { int code; ma_event* pEvent; /* This will be signalled when the event is complete. */ union { struct { int _unused; } quit; struct { ma_device_type deviceType; void* pAudioClient; void** ppAudioClientService; ma_result* pResult; /* The result from creating the audio client service. */ } createAudioClient; struct { ma_device* pDevice; ma_device_type deviceType; } releaseAudioClient; } data; } ma_context_command__wasapi; struct ma_context { ma_backend_callbacks callbacks; ma_backend backend; /* DirectSound, ALSA, etc. */ ma_log* pLog; ma_log log; /* Only used if the log is owned by the context. The pLog member will be set to &log in this case. */ ma_thread_priority threadPriority; size_t threadStackSize; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_mutex deviceEnumLock; /* Used to make ma_context_get_devices() thread safe. */ ma_mutex deviceInfoLock; /* Used to make ma_context_get_device_info() thread safe. */ ma_uint32 deviceInfoCapacity; /* Total capacity of pDeviceInfos. */ ma_uint32 playbackDeviceInfoCount; ma_uint32 captureDeviceInfoCount; ma_device_info* pDeviceInfos; /* Playback devices first, then capture. */ union { #ifdef MA_SUPPORT_WASAPI struct { ma_thread commandThread; ma_mutex commandLock; ma_semaphore commandSem; ma_uint32 commandIndex; ma_uint32 commandCount; ma_context_command__wasapi commands[4]; ma_handle hAvrt; ma_proc AvSetMmThreadCharacteristicsA; ma_proc AvRevertMmThreadcharacteristics; ma_handle hMMDevapi; ma_proc ActivateAudioInterfaceAsync; } wasapi; #endif #ifdef MA_SUPPORT_DSOUND struct { ma_handle hWnd; /* Can be null. */ ma_handle hDSoundDLL; ma_proc DirectSoundCreate; ma_proc DirectSoundEnumerateA; ma_proc DirectSoundCaptureCreate; ma_proc DirectSoundCaptureEnumerateA; } dsound; #endif #ifdef MA_SUPPORT_WINMM struct { ma_handle hWinMM; ma_proc waveOutGetNumDevs; ma_proc waveOutGetDevCapsA; ma_proc waveOutOpen; ma_proc waveOutClose; ma_proc waveOutPrepareHeader; ma_proc waveOutUnprepareHeader; ma_proc waveOutWrite; ma_proc waveOutReset; ma_proc waveInGetNumDevs; ma_proc waveInGetDevCapsA; ma_proc waveInOpen; ma_proc waveInClose; ma_proc waveInPrepareHeader; ma_proc waveInUnprepareHeader; ma_proc waveInAddBuffer; ma_proc waveInStart; ma_proc waveInReset; } winmm; #endif #ifdef MA_SUPPORT_ALSA struct { ma_handle asoundSO; ma_proc snd_pcm_open; ma_proc snd_pcm_close; ma_proc snd_pcm_hw_params_sizeof; ma_proc snd_pcm_hw_params_any; ma_proc snd_pcm_hw_params_set_format; ma_proc snd_pcm_hw_params_set_format_first; ma_proc snd_pcm_hw_params_get_format_mask; ma_proc snd_pcm_hw_params_set_channels; ma_proc snd_pcm_hw_params_set_channels_near; ma_proc snd_pcm_hw_params_set_channels_minmax; ma_proc snd_pcm_hw_params_set_rate_resample; ma_proc snd_pcm_hw_params_set_rate; ma_proc snd_pcm_hw_params_set_rate_near; ma_proc snd_pcm_hw_params_set_buffer_size_near; ma_proc snd_pcm_hw_params_set_periods_near; ma_proc snd_pcm_hw_params_set_access; ma_proc snd_pcm_hw_params_get_format; ma_proc snd_pcm_hw_params_get_channels; ma_proc snd_pcm_hw_params_get_channels_min; ma_proc snd_pcm_hw_params_get_channels_max; ma_proc snd_pcm_hw_params_get_rate; ma_proc snd_pcm_hw_params_get_rate_min; ma_proc snd_pcm_hw_params_get_rate_max; ma_proc snd_pcm_hw_params_get_buffer_size; ma_proc snd_pcm_hw_params_get_periods; ma_proc snd_pcm_hw_params_get_access; ma_proc snd_pcm_hw_params_test_format; ma_proc snd_pcm_hw_params_test_channels; ma_proc snd_pcm_hw_params_test_rate; ma_proc snd_pcm_hw_params; ma_proc snd_pcm_sw_params_sizeof; ma_proc snd_pcm_sw_params_current; ma_proc snd_pcm_sw_params_get_boundary; ma_proc snd_pcm_sw_params_set_avail_min; ma_proc snd_pcm_sw_params_set_start_threshold; ma_proc snd_pcm_sw_params_set_stop_threshold; ma_proc snd_pcm_sw_params; ma_proc snd_pcm_format_mask_sizeof; ma_proc snd_pcm_format_mask_test; ma_proc snd_pcm_get_chmap; ma_proc snd_pcm_state; ma_proc snd_pcm_prepare; ma_proc snd_pcm_start; ma_proc snd_pcm_drop; ma_proc snd_pcm_drain; ma_proc snd_pcm_reset; ma_proc snd_device_name_hint; ma_proc snd_device_name_get_hint; ma_proc snd_card_get_index; ma_proc snd_device_name_free_hint; ma_proc snd_pcm_mmap_begin; ma_proc snd_pcm_mmap_commit; ma_proc snd_pcm_recover; ma_proc snd_pcm_readi; ma_proc snd_pcm_writei; ma_proc snd_pcm_avail; ma_proc snd_pcm_avail_update; ma_proc snd_pcm_wait; ma_proc snd_pcm_nonblock; ma_proc snd_pcm_info; ma_proc snd_pcm_info_sizeof; ma_proc snd_pcm_info_get_name; ma_proc snd_pcm_poll_descriptors; ma_proc snd_pcm_poll_descriptors_count; ma_proc snd_pcm_poll_descriptors_revents; ma_proc snd_config_update_free_global; ma_mutex internalDeviceEnumLock; ma_bool32 useVerboseDeviceEnumeration; } alsa; #endif #ifdef MA_SUPPORT_PULSEAUDIO struct { ma_handle pulseSO; ma_proc pa_mainloop_new; ma_proc pa_mainloop_free; ma_proc pa_mainloop_quit; ma_proc pa_mainloop_get_api; ma_proc pa_mainloop_iterate; ma_proc pa_mainloop_wakeup; ma_proc pa_threaded_mainloop_new; ma_proc pa_threaded_mainloop_free; ma_proc pa_threaded_mainloop_start; ma_proc pa_threaded_mainloop_stop; ma_proc pa_threaded_mainloop_lock; ma_proc pa_threaded_mainloop_unlock; ma_proc pa_threaded_mainloop_wait; ma_proc pa_threaded_mainloop_signal; ma_proc pa_threaded_mainloop_accept; ma_proc pa_threaded_mainloop_get_retval; ma_proc pa_threaded_mainloop_get_api; ma_proc pa_threaded_mainloop_in_thread; ma_proc pa_threaded_mainloop_set_name; ma_proc pa_context_new; ma_proc pa_context_unref; ma_proc pa_context_connect; ma_proc pa_context_disconnect; ma_proc pa_context_set_state_callback; ma_proc pa_context_get_state; ma_proc pa_context_get_sink_info_list; ma_proc pa_context_get_source_info_list; ma_proc pa_context_get_sink_info_by_name; ma_proc pa_context_get_source_info_by_name; ma_proc pa_operation_unref; ma_proc pa_operation_get_state; ma_proc pa_channel_map_init_extend; ma_proc pa_channel_map_valid; ma_proc pa_channel_map_compatible; ma_proc pa_stream_new; ma_proc pa_stream_unref; ma_proc pa_stream_connect_playback; ma_proc pa_stream_connect_record; ma_proc pa_stream_disconnect; ma_proc pa_stream_get_state; ma_proc pa_stream_get_sample_spec; ma_proc pa_stream_get_channel_map; ma_proc pa_stream_get_buffer_attr; ma_proc pa_stream_set_buffer_attr; ma_proc pa_stream_get_device_name; ma_proc pa_stream_set_write_callback; ma_proc pa_stream_set_read_callback; ma_proc pa_stream_set_suspended_callback; ma_proc pa_stream_set_moved_callback; ma_proc pa_stream_is_suspended; ma_proc pa_stream_flush; ma_proc pa_stream_drain; ma_proc pa_stream_is_corked; ma_proc pa_stream_cork; ma_proc pa_stream_trigger; ma_proc pa_stream_begin_write; ma_proc pa_stream_write; ma_proc pa_stream_peek; ma_proc pa_stream_drop; ma_proc pa_stream_writable_size; ma_proc pa_stream_readable_size; /*pa_mainloop**/ ma_ptr pMainLoop; /*pa_context**/ ma_ptr pPulseContext; char* pApplicationName; /* Set when the context is initialized. Used by devices for their local pa_context objects. */ char* pServerName; /* Set when the context is initialized. Used by devices for their local pa_context objects. */ } pulse; #endif #ifdef MA_SUPPORT_JACK struct { ma_handle jackSO; ma_proc jack_client_open; ma_proc jack_client_close; ma_proc jack_client_name_size; ma_proc jack_set_process_callback; ma_proc jack_set_buffer_size_callback; ma_proc jack_on_shutdown; ma_proc jack_get_sample_rate; ma_proc jack_get_buffer_size; ma_proc jack_get_ports; ma_proc jack_activate; ma_proc jack_deactivate; ma_proc jack_connect; ma_proc jack_port_register; ma_proc jack_port_name; ma_proc jack_port_get_buffer; ma_proc jack_free; char* pClientName; ma_bool32 tryStartServer; } jack; #endif #ifdef MA_SUPPORT_COREAUDIO struct { ma_handle hCoreFoundation; ma_proc CFStringGetCString; ma_proc CFRelease; ma_handle hCoreAudio; ma_proc AudioObjectGetPropertyData; ma_proc AudioObjectGetPropertyDataSize; ma_proc AudioObjectSetPropertyData; ma_proc AudioObjectAddPropertyListener; ma_proc AudioObjectRemovePropertyListener; ma_handle hAudioUnit; /* Could possibly be set to AudioToolbox on later versions of macOS. */ ma_proc AudioComponentFindNext; ma_proc AudioComponentInstanceDispose; ma_proc AudioComponentInstanceNew; ma_proc AudioOutputUnitStart; ma_proc AudioOutputUnitStop; ma_proc AudioUnitAddPropertyListener; ma_proc AudioUnitGetPropertyInfo; ma_proc AudioUnitGetProperty; ma_proc AudioUnitSetProperty; ma_proc AudioUnitInitialize; ma_proc AudioUnitRender; /*AudioComponent*/ ma_ptr component; ma_bool32 noAudioSessionDeactivate; /* For tracking whether or not the iOS audio session should be explicitly deactivated. Set from the config in ma_context_init__coreaudio(). */ } coreaudio; #endif #ifdef MA_SUPPORT_SNDIO struct { ma_handle sndioSO; ma_proc sio_open; ma_proc sio_close; ma_proc sio_setpar; ma_proc sio_getpar; ma_proc sio_getcap; ma_proc sio_start; ma_proc sio_stop; ma_proc sio_read; ma_proc sio_write; ma_proc sio_onmove; ma_proc sio_nfds; ma_proc sio_pollfd; ma_proc sio_revents; ma_proc sio_eof; ma_proc sio_setvol; ma_proc sio_onvol; ma_proc sio_initpar; } sndio; #endif #ifdef MA_SUPPORT_AUDIO4 struct { int _unused; } audio4; #endif #ifdef MA_SUPPORT_OSS struct { int versionMajor; int versionMinor; } oss; #endif #ifdef MA_SUPPORT_AAUDIO struct { ma_handle hAAudio; /* libaaudio.so */ ma_proc AAudio_createStreamBuilder; ma_proc AAudioStreamBuilder_delete; ma_proc AAudioStreamBuilder_setDeviceId; ma_proc AAudioStreamBuilder_setDirection; ma_proc AAudioStreamBuilder_setSharingMode; ma_proc AAudioStreamBuilder_setFormat; ma_proc AAudioStreamBuilder_setChannelCount; ma_proc AAudioStreamBuilder_setSampleRate; ma_proc AAudioStreamBuilder_setBufferCapacityInFrames; ma_proc AAudioStreamBuilder_setFramesPerDataCallback; ma_proc AAudioStreamBuilder_setDataCallback; ma_proc AAudioStreamBuilder_setErrorCallback; ma_proc AAudioStreamBuilder_setPerformanceMode; ma_proc AAudioStreamBuilder_setUsage; ma_proc AAudioStreamBuilder_setContentType; ma_proc AAudioStreamBuilder_setInputPreset; ma_proc AAudioStreamBuilder_setAllowedCapturePolicy; ma_proc AAudioStreamBuilder_openStream; ma_proc AAudioStream_close; ma_proc AAudioStream_getState; ma_proc AAudioStream_waitForStateChange; ma_proc AAudioStream_getFormat; ma_proc AAudioStream_getChannelCount; ma_proc AAudioStream_getSampleRate; ma_proc AAudioStream_getBufferCapacityInFrames; ma_proc AAudioStream_getFramesPerDataCallback; ma_proc AAudioStream_getFramesPerBurst; ma_proc AAudioStream_requestStart; ma_proc AAudioStream_requestStop; ma_device_job_thread jobThread; /* For processing operations outside of the error callback, specifically device disconnections and rerouting. */ } aaudio; #endif #ifdef MA_SUPPORT_OPENSL struct { ma_handle libOpenSLES; ma_handle SL_IID_ENGINE; ma_handle SL_IID_AUDIOIODEVICECAPABILITIES; ma_handle SL_IID_ANDROIDSIMPLEBUFFERQUEUE; ma_handle SL_IID_RECORD; ma_handle SL_IID_PLAY; ma_handle SL_IID_OUTPUTMIX; ma_handle SL_IID_ANDROIDCONFIGURATION; ma_proc slCreateEngine; } opensl; #endif #ifdef MA_SUPPORT_WEBAUDIO struct { int _unused; } webaudio; #endif #ifdef MA_SUPPORT_NULL struct { int _unused; } null_backend; #endif }; union { #if defined(MA_WIN32) struct { /*HMODULE*/ ma_handle hOle32DLL; ma_proc CoInitialize; ma_proc CoInitializeEx; ma_proc CoUninitialize; ma_proc CoCreateInstance; ma_proc CoTaskMemFree; ma_proc PropVariantClear; ma_proc StringFromGUID2; /*HMODULE*/ ma_handle hUser32DLL; ma_proc GetForegroundWindow; ma_proc GetDesktopWindow; /*HMODULE*/ ma_handle hAdvapi32DLL; ma_proc RegOpenKeyExA; ma_proc RegCloseKey; ma_proc RegQueryValueExA; /*HRESULT*/ long CoInitializeResult; } win32; #endif #ifdef MA_POSIX struct { int _unused; } posix; #endif int _unused; }; }; struct ma_device { ma_context* pContext; ma_device_type type; ma_uint32 sampleRate; ma_atomic_device_state state; /* The state of the device is variable and can change at any time on any thread. Must be used atomically. */ ma_device_data_proc onData; /* Set once at initialization time and should not be changed after. */ ma_device_notification_proc onNotification; /* Set once at initialization time and should not be changed after. */ ma_stop_proc onStop; /* DEPRECATED. Use the notification callback instead. Set once at initialization time and should not be changed after. */ void* pUserData; /* Application defined data. */ ma_mutex startStopLock; ma_event wakeupEvent; ma_event startEvent; ma_event stopEvent; ma_thread thread; ma_result workResult; /* This is set by the worker thread after it's finished doing a job. */ ma_bool8 isOwnerOfContext; /* When set to true, uninitializing the device will also uninitialize the context. Set to true when NULL is passed into ma_device_init(). */ ma_bool8 noPreSilencedOutputBuffer; ma_bool8 noClip; ma_bool8 noDisableDenormals; ma_bool8 noFixedSizedCallback; ma_atomic_float masterVolumeFactor; /* Linear 0..1. Can be read and written simultaneously by different threads. Must be used atomically. */ ma_duplex_rb duplexRB; /* Intermediary buffer for duplex device on asynchronous backends. */ struct { ma_resample_algorithm algorithm; ma_resampling_backend_vtable* pBackendVTable; void* pBackendUserData; struct { ma_uint32 lpfOrder; } linear; } resampling; struct { ma_device_id* pID; /* Set to NULL if using default ID, otherwise set to the address of "id". */ ma_device_id id; /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */ char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* Maybe temporary. Likely to be replaced with a query API. */ ma_share_mode shareMode; /* Set to whatever was passed in when the device was initialized. */ ma_format format; ma_uint32 channels; ma_channel channelMap[MA_MAX_CHANNELS]; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; ma_data_converter converter; void* pIntermediaryBuffer; /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */ ma_uint32 intermediaryBufferCap; ma_uint32 intermediaryBufferLen; /* How many valid frames are sitting in the intermediary buffer. */ void* pInputCache; /* In external format. Can be null. */ ma_uint64 inputCacheCap; ma_uint64 inputCacheConsumed; ma_uint64 inputCacheRemaining; } playback; struct { ma_device_id* pID; /* Set to NULL if using default ID, otherwise set to the address of "id". */ ma_device_id id; /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */ char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; /* Maybe temporary. Likely to be replaced with a query API. */ ma_share_mode shareMode; /* Set to whatever was passed in when the device was initialized. */ ma_format format; ma_uint32 channels; ma_channel channelMap[MA_MAX_CHANNELS]; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; ma_channel_mix_mode channelMixMode; ma_bool32 calculateLFEFromSpatialChannels; ma_data_converter converter; void* pIntermediaryBuffer; /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */ ma_uint32 intermediaryBufferCap; ma_uint32 intermediaryBufferLen; /* How many valid frames are sitting in the intermediary buffer. */ } capture; union { #ifdef MA_SUPPORT_WASAPI struct { /*IAudioClient**/ ma_ptr pAudioClientPlayback; /*IAudioClient**/ ma_ptr pAudioClientCapture; /*IAudioRenderClient**/ ma_ptr pRenderClient; /*IAudioCaptureClient**/ ma_ptr pCaptureClient; /*IMMDeviceEnumerator**/ ma_ptr pDeviceEnumerator; /* Used for IMMNotificationClient notifications. Required for detecting default device changes. */ ma_IMMNotificationClient notificationClient; /*HANDLE*/ ma_handle hEventPlayback; /* Auto reset. Initialized to signaled. */ /*HANDLE*/ ma_handle hEventCapture; /* Auto reset. Initialized to unsignaled. */ ma_uint32 actualBufferSizeInFramesPlayback; /* Value from GetBufferSize(). internalPeriodSizeInFrames is not set to the _actual_ buffer size when low-latency shared mode is being used due to the way the IAudioClient3 API works. */ ma_uint32 actualBufferSizeInFramesCapture; ma_uint32 originalPeriodSizeInFrames; ma_uint32 originalPeriodSizeInMilliseconds; ma_uint32 originalPeriods; ma_performance_profile originalPerformanceProfile; ma_uint32 periodSizeInFramesPlayback; ma_uint32 periodSizeInFramesCapture; void* pMappedBufferCapture; ma_uint32 mappedBufferCaptureCap; ma_uint32 mappedBufferCaptureLen; void* pMappedBufferPlayback; ma_uint32 mappedBufferPlaybackCap; ma_uint32 mappedBufferPlaybackLen; ma_atomic_bool32 isStartedCapture; /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */ ma_atomic_bool32 isStartedPlayback; /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */ ma_uint32 loopbackProcessID; ma_bool8 loopbackProcessExclude; ma_bool8 noAutoConvertSRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ ma_bool8 noDefaultQualitySRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */ ma_bool8 noHardwareOffloading; ma_bool8 allowCaptureAutoStreamRouting; ma_bool8 allowPlaybackAutoStreamRouting; ma_bool8 isDetachedPlayback; ma_bool8 isDetachedCapture; ma_wasapi_usage usage; void* hAvrtHandle; ma_mutex rerouteLock; } wasapi; #endif #ifdef MA_SUPPORT_DSOUND struct { /*LPDIRECTSOUND*/ ma_ptr pPlayback; /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackPrimaryBuffer; /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackBuffer; /*LPDIRECTSOUNDCAPTURE*/ ma_ptr pCapture; /*LPDIRECTSOUNDCAPTUREBUFFER*/ ma_ptr pCaptureBuffer; } dsound; #endif #ifdef MA_SUPPORT_WINMM struct { /*HWAVEOUT*/ ma_handle hDevicePlayback; /*HWAVEIN*/ ma_handle hDeviceCapture; /*HANDLE*/ ma_handle hEventPlayback; /*HANDLE*/ ma_handle hEventCapture; ma_uint32 fragmentSizeInFrames; ma_uint32 iNextHeaderPlayback; /* [0,periods). Used as an index into pWAVEHDRPlayback. */ ma_uint32 iNextHeaderCapture; /* [0,periods). Used as an index into pWAVEHDRCapture. */ ma_uint32 headerFramesConsumedPlayback; /* The number of PCM frames consumed in the buffer in pWAVEHEADER[iNextHeader]. */ ma_uint32 headerFramesConsumedCapture; /* ^^^ */ /*WAVEHDR**/ ma_uint8* pWAVEHDRPlayback; /* One instantiation for each period. */ /*WAVEHDR**/ ma_uint8* pWAVEHDRCapture; /* One instantiation for each period. */ ma_uint8* pIntermediaryBufferPlayback; ma_uint8* pIntermediaryBufferCapture; ma_uint8* _pHeapData; /* Used internally and is used for the heap allocated data for the intermediary buffer and the WAVEHDR structures. */ } winmm; #endif #ifdef MA_SUPPORT_ALSA struct { /*snd_pcm_t**/ ma_ptr pPCMPlayback; /*snd_pcm_t**/ ma_ptr pPCMCapture; /*struct pollfd**/ void* pPollDescriptorsPlayback; /*struct pollfd**/ void* pPollDescriptorsCapture; int pollDescriptorCountPlayback; int pollDescriptorCountCapture; int wakeupfdPlayback; /* eventfd for waking up from poll() when the playback device is stopped. */ int wakeupfdCapture; /* eventfd for waking up from poll() when the capture device is stopped. */ ma_bool8 isUsingMMapPlayback; ma_bool8 isUsingMMapCapture; } alsa; #endif #ifdef MA_SUPPORT_PULSEAUDIO struct { /*pa_mainloop**/ ma_ptr pMainLoop; /*pa_context**/ ma_ptr pPulseContext; /*pa_stream**/ ma_ptr pStreamPlayback; /*pa_stream**/ ma_ptr pStreamCapture; } pulse; #endif #ifdef MA_SUPPORT_JACK struct { /*jack_client_t**/ ma_ptr pClient; /*jack_port_t**/ ma_ptr* ppPortsPlayback; /*jack_port_t**/ ma_ptr* ppPortsCapture; float* pIntermediaryBufferPlayback; /* Typed as a float because JACK is always floating point. */ float* pIntermediaryBufferCapture; } jack; #endif #ifdef MA_SUPPORT_COREAUDIO struct { ma_uint32 deviceObjectIDPlayback; ma_uint32 deviceObjectIDCapture; /*AudioUnit*/ ma_ptr audioUnitPlayback; /*AudioUnit*/ ma_ptr audioUnitCapture; /*AudioBufferList**/ ma_ptr pAudioBufferList; /* Only used for input devices. */ ma_uint32 audioBufferCapInFrames; /* Only used for input devices. The capacity in frames of each buffer in pAudioBufferList. */ ma_event stopEvent; ma_uint32 originalPeriodSizeInFrames; ma_uint32 originalPeriodSizeInMilliseconds; ma_uint32 originalPeriods; ma_performance_profile originalPerformanceProfile; ma_bool32 isDefaultPlaybackDevice; ma_bool32 isDefaultCaptureDevice; ma_bool32 isSwitchingPlaybackDevice; /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */ ma_bool32 isSwitchingCaptureDevice; /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */ void* pNotificationHandler; /* Only used on mobile platforms. Obj-C object for handling route changes. */ } coreaudio; #endif #ifdef MA_SUPPORT_SNDIO struct { ma_ptr handlePlayback; ma_ptr handleCapture; ma_bool32 isStartedPlayback; ma_bool32 isStartedCapture; } sndio; #endif #ifdef MA_SUPPORT_AUDIO4 struct { int fdPlayback; int fdCapture; } audio4; #endif #ifdef MA_SUPPORT_OSS struct { int fdPlayback; int fdCapture; } oss; #endif #ifdef MA_SUPPORT_AAUDIO struct { /*AAudioStream**/ ma_ptr pStreamPlayback; /*AAudioStream**/ ma_ptr pStreamCapture; ma_mutex rerouteLock; ma_aaudio_usage usage; ma_aaudio_content_type contentType; ma_aaudio_input_preset inputPreset; ma_aaudio_allowed_capture_policy allowedCapturePolicy; ma_bool32 noAutoStartAfterReroute; } aaudio; #endif #ifdef MA_SUPPORT_OPENSL struct { /*SLObjectItf*/ ma_ptr pOutputMixObj; /*SLOutputMixItf*/ ma_ptr pOutputMix; /*SLObjectItf*/ ma_ptr pAudioPlayerObj; /*SLPlayItf*/ ma_ptr pAudioPlayer; /*SLObjectItf*/ ma_ptr pAudioRecorderObj; /*SLRecordItf*/ ma_ptr pAudioRecorder; /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueuePlayback; /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueueCapture; ma_bool32 isDrainingCapture; ma_bool32 isDrainingPlayback; ma_uint32 currentBufferIndexPlayback; ma_uint32 currentBufferIndexCapture; ma_uint8* pBufferPlayback; /* This is malloc()'d and is used for storing audio data. Typed as ma_uint8 for easy offsetting. */ ma_uint8* pBufferCapture; } opensl; #endif #ifdef MA_SUPPORT_WEBAUDIO struct { /* AudioWorklets path. */ /* EMSCRIPTEN_WEBAUDIO_T */ int audioContext; /* EMSCRIPTEN_WEBAUDIO_T */ int audioWorklet; float* pIntermediaryBuffer; void* pStackBuffer; ma_result initResult; /* Set to MA_BUSY while initialization is in progress. */ int deviceIndex; /* We store the device in a list on the JavaScript side. This is used to map our C object to the JS object. */ } webaudio; #endif #ifdef MA_SUPPORT_NULL struct { ma_thread deviceThread; ma_event operationEvent; ma_event operationCompletionEvent; ma_semaphore operationSemaphore; ma_uint32 operation; ma_result operationResult; ma_timer timer; double priorRunTime; ma_uint32 currentPeriodFramesRemainingPlayback; ma_uint32 currentPeriodFramesRemainingCapture; ma_uint64 lastProcessedFramePlayback; ma_uint64 lastProcessedFrameCapture; ma_atomic_bool32 isStarted; /* Read and written by multiple threads. Must be used atomically, and must be 32-bit for compiler compatibility. */ } null_device; #endif }; }; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #endif /* Initializes a `ma_context_config` object. Return Value ------------ A `ma_context_config` initialized to defaults. Remarks ------- You must always use this to initialize the default state of the `ma_context_config` object. Not using this will result in your program breaking when miniaudio is updated and new members are added to `ma_context_config`. It also sets logical defaults. You can override members of the returned object by changing it's members directly. See Also -------- ma_context_init() */ MA_API ma_context_config ma_context_config_init(void); /* Initializes a context. The context is used for selecting and initializing an appropriate backend and to represent the backend at a more global level than that of an individual device. There is one context to many devices, and a device is created from a context. A context is required to enumerate devices. Parameters ---------- backends (in, optional) A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order. backendCount (in, optional) The number of items in `backend`. Ignored if `backend` is NULL. pConfig (in, optional) The context configuration. pContext (in) A pointer to the context object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Do not call this function across multiple threads as some backends read and write to global state. Remarks ------- When `backends` is NULL, the default priority order will be used. Below is a list of backends in priority order: |-------------|-----------------------|--------------------------------------------------------| | Name | Enum Name | Supported Operating Systems | |-------------|-----------------------|--------------------------------------------------------| | WASAPI | ma_backend_wasapi | Windows Vista+ | | DirectSound | ma_backend_dsound | Windows XP+ | | WinMM | ma_backend_winmm | Windows XP+ (may work on older versions, but untested) | | Core Audio | ma_backend_coreaudio | macOS, iOS | | ALSA | ma_backend_alsa | Linux | | PulseAudio | ma_backend_pulseaudio | Cross Platform (disabled on Windows, BSD and Android) | | JACK | ma_backend_jack | Cross Platform (disabled on BSD and Android) | | sndio | ma_backend_sndio | OpenBSD | | audio(4) | ma_backend_audio4 | NetBSD, OpenBSD | | OSS | ma_backend_oss | FreeBSD | | AAudio | ma_backend_aaudio | Android 8+ | | OpenSL|ES | ma_backend_opensl | Android (API level 16+) | | Web Audio | ma_backend_webaudio | Web (via Emscripten) | | Null | ma_backend_null | Cross Platform (not used on Web) | |-------------|-----------------------|--------------------------------------------------------| The context can be configured via the `pConfig` argument. The config object is initialized with `ma_context_config_init()`. Individual configuration settings can then be set directly on the structure. Below are the members of the `ma_context_config` object. pLog A pointer to the `ma_log` to post log messages to. Can be NULL if the application does not require logging. See the `ma_log` API for details on how to use the logging system. threadPriority The desired priority to use for the audio thread. Allowable values include the following: |--------------------------------------| | Thread Priority | |--------------------------------------| | ma_thread_priority_idle | | ma_thread_priority_lowest | | ma_thread_priority_low | | ma_thread_priority_normal | | ma_thread_priority_high | | ma_thread_priority_highest (default) | | ma_thread_priority_realtime | | ma_thread_priority_default | |--------------------------------------| threadStackSize The desired size of the stack for the audio thread. Defaults to the operating system's default. pUserData A pointer to application-defined data. This can be accessed from the context object directly such as `context.pUserData`. allocationCallbacks Structure containing custom allocation callbacks. Leaving this at defaults will cause it to use MA_MALLOC, MA_REALLOC and MA_FREE. These allocation callbacks will be used for anything tied to the context, including devices. alsa.useVerboseDeviceEnumeration ALSA will typically enumerate many different devices which can be intrusive and not user-friendly. To combat this, miniaudio will enumerate only unique card/device pairs by default. The problem with this is that you lose a bit of flexibility and control. Setting alsa.useVerboseDeviceEnumeration makes it so the ALSA backend includes all devices. Defaults to false. pulse.pApplicationName PulseAudio only. The application name to use when initializing the PulseAudio context with `pa_context_new()`. pulse.pServerName PulseAudio only. The name of the server to connect to with `pa_context_connect()`. pulse.tryAutoSpawn PulseAudio only. Whether or not to try automatically starting the PulseAudio daemon. Defaults to false. If you set this to true, keep in mind that miniaudio uses a trial and error method to find the most appropriate backend, and this will result in the PulseAudio daemon starting which may be intrusive for the end user. coreaudio.sessionCategory iOS only. The session category to use for the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents. |-----------------------------------------|-------------------------------------| | miniaudio Token | Core Audio Token | |-----------------------------------------|-------------------------------------| | ma_ios_session_category_ambient | AVAudioSessionCategoryAmbient | | ma_ios_session_category_solo_ambient | AVAudioSessionCategorySoloAmbient | | ma_ios_session_category_playback | AVAudioSessionCategoryPlayback | | ma_ios_session_category_record | AVAudioSessionCategoryRecord | | ma_ios_session_category_play_and_record | AVAudioSessionCategoryPlayAndRecord | | ma_ios_session_category_multi_route | AVAudioSessionCategoryMultiRoute | | ma_ios_session_category_none | AVAudioSessionCategoryAmbient | | ma_ios_session_category_default | AVAudioSessionCategoryAmbient | |-----------------------------------------|-------------------------------------| coreaudio.sessionCategoryOptions iOS only. Session category options to use with the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents. |---------------------------------------------------------------------------|------------------------------------------------------------------| | miniaudio Token | Core Audio Token | |---------------------------------------------------------------------------|------------------------------------------------------------------| | ma_ios_session_category_option_mix_with_others | AVAudioSessionCategoryOptionMixWithOthers | | ma_ios_session_category_option_duck_others | AVAudioSessionCategoryOptionDuckOthers | | ma_ios_session_category_option_allow_bluetooth | AVAudioSessionCategoryOptionAllowBluetooth | | ma_ios_session_category_option_default_to_speaker | AVAudioSessionCategoryOptionDefaultToSpeaker | | ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others | AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers | | ma_ios_session_category_option_allow_bluetooth_a2dp | AVAudioSessionCategoryOptionAllowBluetoothA2DP | | ma_ios_session_category_option_allow_air_play | AVAudioSessionCategoryOptionAllowAirPlay | |---------------------------------------------------------------------------|------------------------------------------------------------------| coreaudio.noAudioSessionActivate iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization. coreaudio.noAudioSessionDeactivate iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization. jack.pClientName The name of the client to pass to `jack_client_open()`. jack.tryStartServer Whether or not to try auto-starting the JACK server. Defaults to false. It is recommended that only a single context is active at any given time because it's a bulky data structure which performs run-time linking for the relevant backends every time it's initialized. The location of the context cannot change throughout it's lifetime. Consider allocating the `ma_context` object with `malloc()` if this is an issue. The reason for this is that a pointer to the context is stored in the `ma_device` structure. Example 1 - Default Initialization ---------------------------------- The example below shows how to initialize the context using the default configuration. ```c ma_context context; ma_result result = ma_context_init(NULL, 0, NULL, &context); if (result != MA_SUCCESS) { // Error. } ``` Example 2 - Custom Configuration -------------------------------- The example below shows how to initialize the context using custom backend priorities and a custom configuration. In this hypothetical example, the program wants to prioritize ALSA over PulseAudio on Linux. They also want to avoid using the WinMM backend on Windows because it's latency is too high. They also want an error to be returned if no valid backend is available which they achieve by excluding the Null backend. For the configuration, the program wants to capture any log messages so they can, for example, route it to a log file and user interface. ```c ma_backend backends[] = { ma_backend_alsa, ma_backend_pulseaudio, ma_backend_wasapi, ma_backend_dsound }; ma_log log; ma_log_init(&log); ma_log_register_callback(&log, ma_log_callback_init(my_log_callbac, pMyLogUserData)); ma_context_config config = ma_context_config_init(); config.pLog = &log; // Specify a custom log object in the config so any logs that are posted from ma_context_init() are captured. ma_context context; ma_result result = ma_context_init(backends, sizeof(backends)/sizeof(backends[0]), &config, &context); if (result != MA_SUCCESS) { // Error. if (result == MA_NO_BACKEND) { // Couldn't find an appropriate backend. } } // You could also attach a log callback post-initialization: ma_log_register_callback(ma_context_get_log(&context), ma_log_callback_init(my_log_callback, pMyLogUserData)); ``` See Also -------- ma_context_config_init() ma_context_uninit() */ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext); /* Uninitializes a context. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Do not call this function across multiple threads as some backends read and write to global state. Remarks ------- Results are undefined if you call this while any device created by this context is still active. See Also -------- ma_context_init() */ MA_API ma_result ma_context_uninit(ma_context* pContext); /* Retrieves the size of the ma_context object. This is mainly for the purpose of bindings to know how much memory to allocate. */ MA_API size_t ma_context_sizeof(void); /* Retrieves a pointer to the log object associated with this context. Remarks ------- Pass the returned pointer to `ma_log_post()`, `ma_log_postv()` or `ma_log_postf()` to post a log message. You can attach your own logging callback to the log with `ma_log_register_callback()` Return Value ------------ A pointer to the `ma_log` object that the context uses to post log messages. If some error occurs, NULL will be returned. */ MA_API ma_log* ma_context_get_log(ma_context* pContext); /* Enumerates over every device (both playback and capture). This is a lower-level enumeration function to the easier to use `ma_context_get_devices()`. Use `ma_context_enumerate_devices()` if you would rather not incur an internal heap allocation, or it simply suits your code better. Note that this only retrieves the ID and name/description of the device. The reason for only retrieving basic information is that it would otherwise require opening the backend device in order to probe it for more detailed information which can be inefficient. Consider using `ma_context_get_device_info()` for this, but don't call it from within the enumeration callback. Returning false from the callback will stop enumeration. Returning true will continue enumeration. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. callback (in) The callback to fire for each enumerated device. pUserData (in) A pointer to application-defined data passed to the callback. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. This is guarded using a simple mutex lock. Remarks ------- Do _not_ assume the first enumerated device of a given type is the default device. Some backends and platforms may only support default playback and capture devices. In general, you should not do anything complicated from within the callback. In particular, do not try initializing a device from within the callback. Also, do not try to call `ma_context_get_device_info()` from within the callback. Consider using `ma_context_get_devices()` for a simpler and safer API, albeit at the expense of an internal heap allocation. Example 1 - Simple Enumeration ------------------------------ ma_bool32 ma_device_enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData) { printf("Device Name: %s\n", pInfo->name); return MA_TRUE; } ma_result result = ma_context_enumerate_devices(&context, my_device_enum_callback, pMyUserData); if (result != MA_SUCCESS) { // Error. } See Also -------- ma_context_get_devices() */ MA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData); /* Retrieves basic information about every active playback and/or capture device. This function will allocate memory internally for the device lists and return a pointer to them through the `ppPlaybackDeviceInfos` and `ppCaptureDeviceInfos` parameters. If you do not want to incur the overhead of these allocations consider using `ma_context_enumerate_devices()` which will instead use a callback. Note that this only retrieves the ID and name/description of the device. The reason for only retrieving basic information is that it would otherwise require opening the backend device in order to probe it for more detailed information which can be inefficient. Consider using `ma_context_get_device_info()` for this, but don't call it from within the enumeration callback. Parameters ---------- pContext (in) A pointer to the context performing the enumeration. ppPlaybackDeviceInfos (out) A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for playback devices. pPlaybackDeviceCount (out) A pointer to an unsigned integer that will receive the number of playback devices. ppCaptureDeviceInfos (out) A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for capture devices. pCaptureDeviceCount (out) A pointer to an unsigned integer that will receive the number of capture devices. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. Since each call to this function invalidates the pointers from the previous call, you should not be calling this simultaneously across multiple threads. Instead, you need to make a copy of the returned data with your own higher level synchronization. Remarks ------- It is _not_ safe to assume the first device in the list is the default device. You can pass in NULL for the playback or capture lists in which case they'll be ignored. The returned pointers will become invalid upon the next call this this function, or when the context is uninitialized. Do not free the returned pointers. See Also -------- ma_context_enumerate_devices() */ MA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount); /* Retrieves information about a device of the given type, with the specified ID and share mode. Parameters ---------- pContext (in) A pointer to the context performing the query. deviceType (in) The type of the device being queried. Must be either `ma_device_type_playback` or `ma_device_type_capture`. pDeviceID (in) The ID of the device being queried. pDeviceInfo (out) A pointer to the `ma_device_info` structure that will receive the device information. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. This is guarded using a simple mutex lock. Remarks ------- Do _not_ call this from within the `ma_context_enumerate_devices()` callback. It's possible for a device to have different information and capabilities depending on whether or not it's opened in shared or exclusive mode. For example, in shared mode, WASAPI always uses floating point samples for mixing, but in exclusive mode it can be anything. Therefore, this function allows you to specify which share mode you want information for. Note that not all backends and devices support shared or exclusive mode, in which case this function will fail if the requested share mode is unsupported. This leaves pDeviceInfo unmodified in the result of an error. */ MA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo); /* Determines if the given context supports loopback mode. Parameters ---------- pContext (in) A pointer to the context getting queried. Return Value ------------ MA_TRUE if the context supports loopback mode; MA_FALSE otherwise. */ MA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext); /* Initializes a device config with default settings. Parameters ---------- deviceType (in) The type of the device this config is being initialized for. This must set to one of the following: |-------------------------| | Device Type | |-------------------------| | ma_device_type_playback | | ma_device_type_capture | | ma_device_type_duplex | | ma_device_type_loopback | |-------------------------| Return Value ------------ A new device config object with default settings. You will typically want to adjust the config after this function returns. See remarks. Thread Safety ------------- Safe. Callback Safety --------------- Safe, but don't try initializing a device in a callback. Remarks ------- The returned config will be initialized to defaults. You will normally want to customize a few variables before initializing the device. See Example 1 for a typical configuration which sets the sample format, channel count, sample rate, data callback and user data. These are usually things you will want to change before initializing the device. See `ma_device_init()` for details on specific configuration options. Example 1 - Simple Configuration -------------------------------- The example below is what a program will typically want to configure for each device at a minimum. Notice how `ma_device_config_init()` is called first, and then the returned object is modified directly. This is important because it ensures that your program continues to work as new configuration options are added to the `ma_device_config` structure. ```c ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pUserData = pMyUserData; ``` See Also -------- ma_device_init() ma_device_init_ex() */ MA_API ma_device_config ma_device_config_init(ma_device_type deviceType); /* Initializes a device. A device represents a physical audio device. The idea is you send or receive audio data from the device to either play it back through a speaker, or capture it from a microphone. Whether or not you should send or receive data from the device (or both) depends on the type of device you are initializing which can be playback, capture, full-duplex or loopback. (Note that loopback mode is only supported on select backends.) Sending and receiving audio data to and from the device is done via a callback which is fired by miniaudio at periodic time intervals. The frequency at which data is delivered to and from a device depends on the size of its period. The size of the period can be defined in terms of PCM frames or milliseconds, whichever is more convenient. Generally speaking, the smaller the period, the lower the latency at the expense of higher CPU usage and increased risk of glitching due to the more frequent and granular data deliver intervals. The size of a period will depend on your requirements, but miniaudio's defaults should work fine for most scenarios. If you're building a game you should leave this fairly small, whereas if you're building a simple media player you can make it larger. Note that the period size you request is actually just a hint - miniaudio will tell the backend what you want, but the backend is ultimately responsible for what it gives you. You cannot assume you will get exactly what you ask for. When delivering data to and from a device you need to make sure it's in the correct format which you can set through the device configuration. You just set the format that you want to use and miniaudio will perform all of the necessary conversion for you internally. When delivering data to and from the callback you can assume the format is the same as what you requested when you initialized the device. See Remarks for more details on miniaudio's data conversion pipeline. Parameters ---------- pContext (in, optional) A pointer to the context that owns the device. This can be null, in which case it creates a default context internally. pConfig (in) A pointer to the device configuration. Cannot be null. See remarks for details. pDevice (out) A pointer to the device object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to calling this at the same time as `ma_device_uninit()`. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- Setting `pContext` to NULL will result in miniaudio creating a default context internally and is equivalent to passing in a context initialized like so: ```c ma_context_init(NULL, 0, NULL, &context); ``` Do not set `pContext` to NULL if you are needing to open multiple devices. You can, however, use NULL when initializing the first device, and then use device.pContext for the initialization of other devices. The device can be configured via the `pConfig` argument. The config object is initialized with `ma_device_config_init()`. Individual configuration settings can then be set directly on the structure. Below are the members of the `ma_device_config` object. deviceType Must be `ma_device_type_playback`, `ma_device_type_capture`, `ma_device_type_duplex` of `ma_device_type_loopback`. sampleRate The sample rate, in hertz. The most common sample rates are 48000 and 44100. Setting this to 0 will use the device's native sample rate. periodSizeInFrames The desired size of a period in PCM frames. If this is 0, `periodSizeInMilliseconds` will be used instead. If both are 0 the default buffer size will be used depending on the selected performance profile. This value affects latency. See below for details. periodSizeInMilliseconds The desired size of a period in milliseconds. If this is 0, `periodSizeInFrames` will be used instead. If both are 0 the default buffer size will be used depending on the selected performance profile. The value affects latency. See below for details. periods The number of periods making up the device's entire buffer. The total buffer size is `periodSizeInFrames` or `periodSizeInMilliseconds` multiplied by this value. This is just a hint as backends will be the ones who ultimately decide how your periods will be configured. performanceProfile A hint to miniaudio as to the performance requirements of your program. Can be either `ma_performance_profile_low_latency` (default) or `ma_performance_profile_conservative`. This mainly affects the size of default buffers and can usually be left at its default value. noPreSilencedOutputBuffer When set to true, the contents of the output buffer passed into the data callback will be left undefined. When set to false (default), the contents of the output buffer will be cleared the zero. You can use this to avoid the overhead of zeroing out the buffer if you can guarantee that your data callback will write to every sample in the output buffer, or if you are doing your own clearing. noClip When set to true, the contents of the output buffer are left alone after returning and it will be left up to the backend itself to decide whether or not to clip. When set to false (default), the contents of the output buffer passed into the data callback will be clipped after returning. This only applies when the playback sample format is f32. noDisableDenormals By default, miniaudio will disable denormals when the data callback is called. Setting this to true will prevent the disabling of denormals. noFixedSizedCallback Allows miniaudio to fire the data callback with any frame count. When this is set to false (the default), the data callback will be fired with a consistent frame count as specified by `periodSizeInFrames` or `periodSizeInMilliseconds`. When set to true, miniaudio will fire the callback with whatever the backend requests, which could be anything. dataCallback The callback to fire whenever data is ready to be delivered to or from the device. notificationCallback The callback to fire when something has changed with the device, such as whether or not it has been started or stopped. pUserData The user data pointer to use with the device. You can access this directly from the device object like `device.pUserData`. resampling.algorithm The resampling algorithm to use when miniaudio needs to perform resampling between the rate specified by `sampleRate` and the device's native rate. The default value is `ma_resample_algorithm_linear`, and the quality can be configured with `resampling.linear.lpfOrder`. resampling.pBackendVTable A pointer to an optional vtable that can be used for plugging in a custom resampler. resampling.pBackendUserData A pointer that will passed to callbacks in pBackendVTable. resampling.linear.lpfOrder The linear resampler applies a low-pass filter as part of its processing for anti-aliasing. This setting controls the order of the filter. The higher the value, the better the quality, in general. Setting this to 0 will disable low-pass filtering altogether. The maximum value is `MA_MAX_FILTER_ORDER`. The default value is `min(4, MA_MAX_FILTER_ORDER)`. playback.pDeviceID A pointer to a `ma_device_id` structure containing the ID of the playback device to initialize. Setting this NULL (default) will use the system's default playback device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration. playback.format The sample format to use for playback. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after initialization from the device object directly with `device.playback.format`. playback.channels The number of channels to use for playback. When set to 0 the device's native channel count will be used. This can be retrieved after initialization from the device object directly with `device.playback.channels`. playback.pChannelMap The channel map to use for playback. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the device object direct with `device.playback.pChannelMap`. When set, the buffer should contain `channels` items. playback.shareMode The preferred share mode to use for playback. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to ma_share_mode_shared and reinitializing. capture.pDeviceID A pointer to a `ma_device_id` structure containing the ID of the capture device to initialize. Setting this NULL (default) will use the system's default capture device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration. capture.format The sample format to use for capture. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after initialization from the device object directly with `device.capture.format`. capture.channels The number of channels to use for capture. When set to 0 the device's native channel count will be used. This can be retrieved after initialization from the device object directly with `device.capture.channels`. capture.pChannelMap The channel map to use for capture. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the device object direct with `device.capture.pChannelMap`. When set, the buffer should contain `channels` items. capture.shareMode The preferred share mode to use for capture. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to ma_share_mode_shared and reinitializing. wasapi.noAutoConvertSRC WASAPI only. When set to true, disables WASAPI's automatic resampling and forces the use of miniaudio's resampler. Defaults to false. wasapi.noDefaultQualitySRC WASAPI only. Only used when `wasapi.noAutoConvertSRC` is set to false. When set to true, disables the use of `AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY`. You should usually leave this set to false, which is the default. wasapi.noAutoStreamRouting WASAPI only. When set to true, disables automatic stream routing on the WASAPI backend. Defaults to false. wasapi.noHardwareOffloading WASAPI only. When set to true, disables the use of WASAPI's hardware offloading feature. Defaults to false. alsa.noMMap ALSA only. When set to true, disables MMap mode. Defaults to false. alsa.noAutoFormat ALSA only. When set to true, disables ALSA's automatic format conversion by including the SND_PCM_NO_AUTO_FORMAT flag. Defaults to false. alsa.noAutoChannels ALSA only. When set to true, disables ALSA's automatic channel conversion by including the SND_PCM_NO_AUTO_CHANNELS flag. Defaults to false. alsa.noAutoResample ALSA only. When set to true, disables ALSA's automatic resampling by including the SND_PCM_NO_AUTO_RESAMPLE flag. Defaults to false. pulse.pStreamNamePlayback PulseAudio only. Sets the stream name for playback. pulse.pStreamNameCapture PulseAudio only. Sets the stream name for capture. pulse.channelMap PulseAudio only. Sets the channel map that is requested from PulseAudio. See MA_PA_CHANNEL_MAP_* constants. Defaults to MA_PA_CHANNEL_MAP_AIFF. coreaudio.allowNominalSampleRateChange Core Audio only. Desktop only. When enabled, allows the sample rate of the device to be changed at the operating system level. This is disabled by default in order to prevent intrusive changes to the user's system. This is useful if you want to use a sample rate that is known to be natively supported by the hardware thereby avoiding the cost of resampling. When set to true, miniaudio will find the closest match between the sample rate requested in the device config and the sample rates natively supported by the hardware. When set to false, the sample rate currently set by the operating system will always be used. opensl.streamType OpenSL only. Explicitly sets the stream type. If left unset (`ma_opensl_stream_type_default`), the stream type will be left unset. Think of this as the type of audio you're playing. opensl.recordingPreset OpenSL only. Explicitly sets the type of recording your program will be doing. When left unset, the recording preset will be left unchanged. aaudio.usage AAudio only. Explicitly sets the nature of the audio the program will be consuming. When left unset, the usage will be left unchanged. aaudio.contentType AAudio only. Sets the content type. When left unset, the content type will be left unchanged. aaudio.inputPreset AAudio only. Explicitly sets the type of recording your program will be doing. When left unset, the input preset will be left unchanged. aaudio.noAutoStartAfterReroute AAudio only. Controls whether or not the device should be automatically restarted after a stream reroute. When set to false (default) the device will be restarted automatically; otherwise the device will be stopped. Once initialized, the device's config is immutable. If you need to change the config you will need to initialize a new device. After initializing the device it will be in a stopped state. To start it, use `ma_device_start()`. If both `periodSizeInFrames` and `periodSizeInMilliseconds` are set to zero, it will default to `MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY` or `MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE`, depending on whether or not `performanceProfile` is set to `ma_performance_profile_low_latency` or `ma_performance_profile_conservative`. If you request exclusive mode and the backend does not support it an error will be returned. For robustness, you may want to first try initializing the device in exclusive mode, and then fall back to shared mode if required. Alternatively you can just request shared mode (the default if you leave it unset in the config) which is the most reliable option. Some backends do not have a practical way of choosing whether or not the device should be exclusive or not (ALSA, for example) in which case it just acts as a hint. Unless you have special requirements you should try avoiding exclusive mode as it's intrusive to the user. Starting with Windows 10, miniaudio will use low-latency shared mode where possible which may make exclusive mode unnecessary. When sending or receiving data to/from a device, miniaudio will internally perform a format conversion to convert between the format specified by the config and the format used internally by the backend. If you pass in 0 for the sample format, channel count, sample rate _and_ channel map, data transmission will run on an optimized pass-through fast path. You can retrieve the format, channel count and sample rate by inspecting the `playback/capture.format`, `playback/capture.channels` and `sampleRate` members of the device object. When compiling for UWP you must ensure you call this function on the main UI thread because the operating system may need to present the user with a message asking for permissions. Please refer to the official documentation for ActivateAudioInterfaceAsync() for more information. ALSA Specific: When initializing the default device, requesting shared mode will try using the "dmix" device for playback and the "dsnoop" device for capture. If these fail it will try falling back to the "hw" device. Example 1 - Simple Initialization --------------------------------- This example shows how to initialize a simple playback device using a standard configuration. If you are just needing to do simple playback from the default playback device this is usually all you need. ```c ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pMyUserData = pMyUserData; ma_device device; ma_result result = ma_device_init(NULL, &config, &device); if (result != MA_SUCCESS) { // Error } ``` Example 2 - Advanced Initialization ----------------------------------- This example shows how you might do some more advanced initialization. In this hypothetical example we want to control the latency by setting the buffer size and period count. We also want to allow the user to be able to choose which device to output from which means we need a context so we can perform device enumeration. ```c ma_context context; ma_result result = ma_context_init(NULL, 0, NULL, &context); if (result != MA_SUCCESS) { // Error } ma_device_info* pPlaybackDeviceInfos; ma_uint32 playbackDeviceCount; result = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, NULL, NULL); if (result != MA_SUCCESS) { // Error } // ... choose a device from pPlaybackDeviceInfos ... ma_device_config config = ma_device_config_init(ma_device_type_playback); config.playback.pDeviceID = pMyChosenDeviceID; // <-- Get this from the `id` member of one of the `ma_device_info` objects returned by ma_context_get_devices(). config.playback.format = ma_format_f32; config.playback.channels = 2; config.sampleRate = 48000; config.dataCallback = ma_data_callback; config.pUserData = pMyUserData; config.periodSizeInMilliseconds = 10; config.periods = 3; ma_device device; result = ma_device_init(&context, &config, &device); if (result != MA_SUCCESS) { // Error } ``` See Also -------- ma_device_config_init() ma_device_uninit() ma_device_start() ma_context_init() ma_context_get_devices() ma_context_enumerate_devices() */ MA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice); /* Initializes a device without a context, with extra parameters for controlling the configuration of the internal self-managed context. This is the same as `ma_device_init()`, only instead of a context being passed in, the parameters from `ma_context_init()` are passed in instead. This function allows you to configure the internally created context. Parameters ---------- backends (in, optional) A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order. backendCount (in, optional) The number of items in `backend`. Ignored if `backend` is NULL. pContextConfig (in, optional) The context configuration. pConfig (in) A pointer to the device configuration. Cannot be null. See remarks for details. pDevice (out) A pointer to the device object being initialized. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to calling this at the same time as `ma_device_uninit()`. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- You only need to use this function if you want to configure the context differently to its defaults. You should never use this function if you want to manage your own context. See the documentation for `ma_context_init()` for information on the different context configuration options. See Also -------- ma_device_init() ma_device_uninit() ma_device_config_init() ma_context_init() */ MA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice); /* Uninitializes a device. This will explicitly stop the device. You do not need to call `ma_device_stop()` beforehand, but it's harmless if you do. Parameters ---------- pDevice (in) A pointer to the device to stop. Return Value ------------ Nothing Thread Safety ------------- Unsafe. As soon as this API is called the device should be considered undefined. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock. See Also -------- ma_device_init() ma_device_stop() */ MA_API void ma_device_uninit(ma_device* pDevice); /* Retrieves a pointer to the context that owns the given device. */ MA_API ma_context* ma_device_get_context(ma_device* pDevice); /* Helper function for retrieving the log object associated with the context that owns this device. */ MA_API ma_log* ma_device_get_log(ma_device* pDevice); /* Retrieves information about the device. Parameters ---------- pDevice (in) A pointer to the device whose information is being retrieved. type (in) The device type. This parameter is required for duplex devices. When retrieving device information, you are doing so for an individual playback or capture device. pDeviceInfo (out) A pointer to the `ma_device_info` that will receive the device information. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. This should be considered unsafe because it may be calling into the backend which may or may not be safe. Callback Safety --------------- Unsafe. You should avoid calling this in the data callback because it may call into the backend which may or may not be safe. */ MA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo); /* Retrieves the name of the device. Parameters ---------- pDevice (in) A pointer to the device whose information is being retrieved. type (in) The device type. This parameter is required for duplex devices. When retrieving device information, you are doing so for an individual playback or capture device. pName (out) A pointer to the buffer that will receive the name. nameCap (in) The capacity of the output buffer, including space for the null terminator. pLengthNotIncludingNullTerminator (out, optional) A pointer to the variable that will receive the length of the name, not including the null terminator. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Unsafe. This should be considered unsafe because it may be calling into the backend which may or may not be safe. Callback Safety --------------- Unsafe. You should avoid calling this in the data callback because it may call into the backend which may or may not be safe. Remarks ------- If the name does not fully fit into the output buffer, it'll be truncated. You can pass in NULL to `pName` if you want to first get the length of the name for the purpose of memory allocation of the output buffer. Allocating a buffer of size `MA_MAX_DEVICE_NAME_LENGTH + 1` should be enough for most cases and will avoid the need for the inefficiency of calling this function twice. This is implemented in terms of `ma_device_get_info()`. */ MA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator); /* Starts the device. For playback devices this begins playback. For capture devices it begins recording. Use `ma_device_stop()` to stop the device. Parameters ---------- pDevice (in) A pointer to the device to start. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. It's safe to call this from any thread with the exception of the callback thread. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Remarks ------- For a playback device, this will retrieve an initial chunk of audio data from the client before returning. The reason for this is to ensure there is valid audio data in the buffer, which needs to be done before the device begins playback. This API waits until the backend device has been started for real by the worker thread. It also waits on a mutex for thread-safety. Do not call this in any callback. See Also -------- ma_device_stop() */ MA_API ma_result ma_device_start(ma_device* pDevice); /* Stops the device. For playback devices this stops playback. For capture devices it stops recording. Use `ma_device_start()` to start the device again. Parameters ---------- pDevice (in) A pointer to the device to stop. Return Value ------------ MA_SUCCESS if successful; any other error code otherwise. Thread Safety ------------- Safe. It's safe to call this from any thread with the exception of the callback thread. Callback Safety --------------- Unsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock. Remarks ------- This API needs to wait on the worker thread to stop the backend device properly before returning. It also waits on a mutex for thread-safety. In addition, some backends need to wait for the device to finish playback/recording of the current fragment which can take some time (usually proportionate to the buffer size that was specified at initialization time). Backends are required to either pause the stream in-place or drain the buffer if pausing is not possible. The reason for this is that stopping the device and the resuming it with ma_device_start() (which you might do when your program loses focus) may result in a situation where those samples are never output to the speakers or received from the microphone which can in turn result in de-syncs. Do not call this in any callback. See Also -------- ma_device_start() */ MA_API ma_result ma_device_stop(ma_device* pDevice); /* Determines whether or not the device is started. Parameters ---------- pDevice (in) A pointer to the device whose start state is being retrieved. Return Value ------------ True if the device is started, false otherwise. Thread Safety ------------- Safe. If another thread calls `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, there's a very small chance the return value will be out of sync. Callback Safety --------------- Safe. This is implemented as a simple accessor. See Also -------- ma_device_start() ma_device_stop() */ MA_API ma_bool32 ma_device_is_started(const ma_device* pDevice); /* Retrieves the state of the device. Parameters ---------- pDevice (in) A pointer to the device whose state is being retrieved. Return Value ------------ The current state of the device. The return value will be one of the following: +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_uninitialized | Will only be returned if the device is in the middle of initialization. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_stopped | The device is stopped. The initial state of the device after initialization. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_started | The device started and requesting and/or delivering audio data. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_starting | The device is in the process of starting. | +-------------------------------+------------------------------------------------------------------------------+ | ma_device_state_stopping | The device is in the process of stopping. | +-------------------------------+------------------------------------------------------------------------------+ Thread Safety ------------- Safe. This is implemented as a simple accessor. Note that if the device is started or stopped at the same time as this function is called, there's a possibility the return value could be out of sync. See remarks. Callback Safety --------------- Safe. This is implemented as a simple accessor. Remarks ------- The general flow of a devices state goes like this: ``` ma_device_init() -> ma_device_state_uninitialized -> ma_device_state_stopped ma_device_start() -> ma_device_state_starting -> ma_device_state_started ma_device_stop() -> ma_device_state_stopping -> ma_device_state_stopped ``` When the state of the device is changed with `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, the value returned by this function could potentially be out of sync. If this is significant to your program you need to implement your own synchronization. */ MA_API ma_device_state ma_device_get_state(const ma_device* pDevice); /* Performs post backend initialization routines for setting up internal data conversion. This should be called whenever the backend is initialized. The only time this should be called from outside of miniaudio is if you're implementing a custom backend, and you would only do it if you are reinitializing the backend due to rerouting or reinitializing for some reason. Parameters ---------- pDevice [in] A pointer to the device. deviceType [in] The type of the device that was just reinitialized. pPlaybackDescriptor [in] The descriptor of the playback device containing the internal data format and buffer sizes. pPlaybackDescriptor [in] The descriptor of the capture device containing the internal data format and buffer sizes. Return Value ------------ MA_SUCCESS if successful; any other error otherwise. Thread Safety ------------- Unsafe. This will be reinitializing internal data converters which may be in use by another thread. Callback Safety --------------- Unsafe. This will be reinitializing internal data converters which may be in use by the callback. Remarks ------- For a duplex device, you can call this for only one side of the system. This is why the deviceType is specified as a parameter rather than deriving it from the device. You do not need to call this manually unless you are doing a custom backend, in which case you need only do it if you're manually performing rerouting or reinitialization. */ MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPlaybackDescriptor, const ma_device_descriptor* pCaptureDescriptor); /* Sets the master volume factor for the device. The volume factor must be between 0 (silence) and 1 (full volume). Use `ma_device_set_master_volume_db()` to use decibel notation, where 0 is full volume and values less than 0 decreases the volume. Parameters ---------- pDevice (in) A pointer to the device whose volume is being set. volume (in) The new volume factor. Must be >= 0. Return Value ------------ MA_SUCCESS if the volume was set successfully. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if volume is negative. Thread Safety ------------- Safe. This just sets a local member of the device object. Callback Safety --------------- Safe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied. Remarks ------- This applies the volume factor across all channels. This does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream. See Also -------- ma_device_get_master_volume() ma_device_set_master_volume_db() ma_device_get_master_volume_db() */ MA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume); /* Retrieves the master volume factor for the device. Parameters ---------- pDevice (in) A pointer to the device whose volume factor is being retrieved. pVolume (in) A pointer to the variable that will receive the volume factor. The returned value will be in the range of [0, 1]. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if pVolume is NULL. Thread Safety ------------- Safe. This just a simple member retrieval. Callback Safety --------------- Safe. Remarks ------- If an error occurs, `*pVolume` will be set to 0. See Also -------- ma_device_set_master_volume() ma_device_set_master_volume_gain_db() ma_device_get_master_volume_gain_db() */ MA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume); /* Sets the master volume for the device as gain in decibels. A gain of 0 is full volume, whereas a gain of < 0 will decrease the volume. Parameters ---------- pDevice (in) A pointer to the device whose gain is being set. gainDB (in) The new volume as gain in decibels. Must be less than or equal to 0, where 0 is full volume and anything less than 0 decreases the volume. Return Value ------------ MA_SUCCESS if the volume was set successfully. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if the gain is > 0. Thread Safety ------------- Safe. This just sets a local member of the device object. Callback Safety --------------- Safe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied. Remarks ------- This applies the gain across all channels. This does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream. See Also -------- ma_device_get_master_volume_gain_db() ma_device_set_master_volume() ma_device_get_master_volume() */ MA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB); /* Retrieves the master gain in decibels. Parameters ---------- pDevice (in) A pointer to the device whose gain is being retrieved. pGainDB (in) A pointer to the variable that will receive the gain in decibels. The returned value will be <= 0. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if pDevice is NULL. MA_INVALID_ARGS if pGainDB is NULL. Thread Safety ------------- Safe. This just a simple member retrieval. Callback Safety --------------- Safe. Remarks ------- If an error occurs, `*pGainDB` will be set to 0. See Also -------- ma_device_set_master_volume_db() ma_device_set_master_volume() ma_device_get_master_volume() */ MA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB); /* Called from the data callback of asynchronous backends to allow miniaudio to process the data and fire the miniaudio data callback. Parameters ---------- pDevice (in) A pointer to device whose processing the data callback. pOutput (out) A pointer to the buffer that will receive the output PCM frame data. On a playback device this must not be NULL. On a duplex device this can be NULL, in which case pInput must not be NULL. pInput (in) A pointer to the buffer containing input PCM frame data. On a capture device this must not be NULL. On a duplex device this can be NULL, in which case `pOutput` must not be NULL. frameCount (in) The number of frames being processed. Return Value ------------ MA_SUCCESS if successful; any other result code otherwise. Thread Safety ------------- This function should only ever be called from the internal data callback of the backend. It is safe to call this simultaneously between a playback and capture device in duplex setups. Callback Safety --------------- Do not call this from the miniaudio data callback. It should only ever be called from the internal data callback of the backend. Remarks ------- If both `pOutput` and `pInput` are NULL, and error will be returned. In duplex scenarios, both `pOutput` and `pInput` can be non-NULL, in which case `pInput` will be processed first, followed by `pOutput`. If you are implementing a custom backend, and that backend uses a callback for data delivery, you'll need to call this from inside that callback. */ MA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount); /* Calculates an appropriate buffer size from a descriptor, native sample rate and performance profile. This function is used by backends for helping determine an appropriately sized buffer to use with the device depending on the values of `periodSizeInFrames` and `periodSizeInMilliseconds` in the `pDescriptor` object. Since buffer size calculations based on time depends on the sample rate, a best guess at the device's native sample rate is also required which is where `nativeSampleRate` comes in. In addition, the performance profile is also needed for cases where both the period size in frames and milliseconds are both zero. Parameters ---------- pDescriptor (in) A pointer to device descriptor whose `periodSizeInFrames` and `periodSizeInMilliseconds` members will be used for the calculation of the buffer size. nativeSampleRate (in) The device's native sample rate. This is only ever used when the `periodSizeInFrames` member of `pDescriptor` is zero. In this case, `periodSizeInMilliseconds` will be used instead, in which case a sample rate is required to convert to a size in frames. performanceProfile (in) When both the `periodSizeInFrames` and `periodSizeInMilliseconds` members of `pDescriptor` are zero, miniaudio will fall back to a buffer size based on the performance profile. The profile to use for this calculation is determine by this parameter. Return Value ------------ The calculated buffer size in frames. Thread Safety ------------- This is safe so long as nothing modifies `pDescriptor` at the same time. However, this function should only ever be called from within the backend's device initialization routine and therefore shouldn't have any multithreading concerns. Callback Safety --------------- This is safe to call within the data callback, but there is no reason to ever do this. Remarks ------- If `nativeSampleRate` is zero, this function will fall back to `pDescriptor->sampleRate`. If that is also zero, `MA_DEFAULT_SAMPLE_RATE` will be used instead. */ MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile); /* Retrieves a friendly name for a backend. */ MA_API const char* ma_get_backend_name(ma_backend backend); /* Retrieves the backend enum from the given name. */ MA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend); /* Determines whether or not the given backend is available by the compilation environment. */ MA_API ma_bool32 ma_is_backend_enabled(ma_backend backend); /* Retrieves compile-time enabled backends. Parameters ---------- pBackends (out, optional) A pointer to the buffer that will receive the enabled backends. Set to NULL to retrieve the backend count. Setting the capacity of the buffer to `MA_BUFFER_COUNT` will guarantee it's large enough for all backends. backendCap (in) The capacity of the `pBackends` buffer. pBackendCount (out) A pointer to the variable that will receive the enabled backend count. Return Value ------------ MA_SUCCESS if successful. MA_INVALID_ARGS if `pBackendCount` is NULL. MA_NO_SPACE if the capacity of `pBackends` is not large enough. If `MA_NO_SPACE` is returned, the `pBackends` buffer will be filled with `*pBackendCount` values. Thread Safety ------------- Safe. Callback Safety --------------- Safe. Remarks ------- If you want to retrieve the number of backends so you can determine the capacity of `pBackends` buffer, you can call this function with `pBackends` set to NULL. This will also enumerate the null backend. If you don't want to include this you need to check for `ma_backend_null` when you enumerate over the returned backends and handle it appropriately. Alternatively, you can disable it at compile time with `MA_NO_NULL`. The returned backends are determined based on compile time settings, not the platform it's currently running on. For example, PulseAudio will be returned if it was enabled at compile time, even when the user doesn't actually have PulseAudio installed. Example 1 --------- The example below retrieves the enabled backend count using a fixed sized buffer allocated on the stack. The buffer is given a capacity of `MA_BACKEND_COUNT` which will guarantee it'll be large enough to store all available backends. Since `MA_BACKEND_COUNT` is always a relatively small value, this should be suitable for most scenarios. ``` ma_backend enabledBackends[MA_BACKEND_COUNT]; size_t enabledBackendCount; result = ma_get_enabled_backends(enabledBackends, MA_BACKEND_COUNT, &enabledBackendCount); if (result != MA_SUCCESS) { // Failed to retrieve enabled backends. Should never happen in this example since all inputs are valid. } ``` See Also -------- ma_is_backend_enabled() */ MA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount); /* Determines whether or not loopback mode is support by a backend. */ MA_API ma_bool32 ma_is_loopback_supported(ma_backend backend); #endif /* MA_NO_DEVICE_IO */ /************************************************************************************************************************************************************ Utilities ************************************************************************************************************************************************************/ /* Calculates a buffer size in milliseconds (rounded up) from the specified number of frames and sample rate. */ MA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate); /* Calculates a buffer size in frames from the specified number of milliseconds and sample rate. */ MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate); /* Copies PCM frames from one buffer to another. */ MA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Copies silent frames into the given buffer. Remarks ------- For all formats except `ma_format_u8`, the output buffer will be filled with 0. For `ma_format_u8` it will be filled with 128. The reason for this is that it makes more sense for the purpose of mixing to initialize it to the center point. */ MA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Offsets a pointer by the specified number of PCM frames. */ MA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels); MA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels); static MA_INLINE float* ma_offset_pcm_frames_ptr_f32(float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (float*)ma_offset_pcm_frames_ptr((void*)p, offsetInFrames, ma_format_f32, channels); } static MA_INLINE const float* ma_offset_pcm_frames_const_ptr_f32(const float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (const float*)ma_offset_pcm_frames_const_ptr((const void*)p, offsetInFrames, ma_format_f32, channels); } /* Clips samples. */ MA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count); MA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count); MA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count); MA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels); /* Helper for applying a volume factor to samples. Note that the source and destination buffers can be the same, in which case it'll perform the operation in-place. */ MA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor); MA_API void ma_apply_volume_factor_pcm_frames(void* pFrames, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor); MA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains); MA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume); MA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume); /* Helper for converting a linear factor to gain in decibels. */ MA_API float ma_volume_linear_to_db(float factor); /* Helper for converting gain in decibels to a linear factor. */ MA_API float ma_volume_db_to_linear(float gain); /* Mixes the specified number of frames in floating point format with a volume factor. This will run on an optimized path when the volume is equal to 1. */ MA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume); /************************************************************************************************************************************************************ VFS === The VFS object (virtual file system) is what's used to customize file access. This is useful in cases where stdio FILE* based APIs may not be entirely appropriate for a given situation. ************************************************************************************************************************************************************/ typedef void ma_vfs; typedef ma_handle ma_vfs_file; typedef enum { MA_OPEN_MODE_READ = 0x00000001, MA_OPEN_MODE_WRITE = 0x00000002 } ma_open_mode_flags; typedef enum { ma_seek_origin_start, ma_seek_origin_current, ma_seek_origin_end /* Not used by decoders. */ } ma_seek_origin; typedef struct { ma_uint64 sizeInBytes; } ma_file_info; typedef struct { ma_result (* onOpen) (ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); ma_result (* onOpenW)(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); ma_result (* onClose)(ma_vfs* pVFS, ma_vfs_file file); ma_result (* onRead) (ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead); ma_result (* onWrite)(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten); ma_result (* onSeek) (ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin); ma_result (* onTell) (ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor); ma_result (* onInfo) (ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo); } ma_vfs_callbacks; MA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); MA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile); MA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file); MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead); MA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten); MA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin); MA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor); MA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo); MA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_vfs_callbacks cb; ma_allocation_callbacks allocationCallbacks; /* Only used for the wchar_t version of open() on non-Windows platforms. */ } ma_default_vfs; MA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks); typedef ma_result (* ma_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead); typedef ma_result (* ma_seek_proc)(void* pUserData, ma_int64 offset, ma_seek_origin origin); typedef ma_result (* ma_tell_proc)(void* pUserData, ma_int64* pCursor); #if !defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING) typedef enum { ma_encoding_format_unknown = 0, ma_encoding_format_wav, ma_encoding_format_flac, ma_encoding_format_mp3, ma_encoding_format_vorbis } ma_encoding_format; #endif /************************************************************************************************************************************************************ Decoding ======== Decoders are independent of the main device API. Decoding APIs can be called freely inside the device's data callback, but they are not thread safe unless you do your own synchronization. ************************************************************************************************************************************************************/ #ifndef MA_NO_DECODING typedef struct ma_decoder ma_decoder; typedef struct { ma_format preferredFormat; ma_uint32 seekPointCount; /* Set to > 0 to generate a seektable if the decoding backend supports it. */ } ma_decoding_backend_config; MA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount); typedef struct { ma_result (* onInit )(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); ma_result (* onInitFile )(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ ma_result (* onInitFileW )(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ ma_result (* onInitMemory)(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend); /* Optional. */ void (* onUninit )(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks); } ma_decoding_backend_vtable; typedef ma_result (* ma_decoder_read_proc)(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead); /* Returns the number of bytes read. */ typedef ma_result (* ma_decoder_seek_proc)(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin); typedef ma_result (* ma_decoder_tell_proc)(ma_decoder* pDecoder, ma_int64* pCursor); typedef struct { ma_format format; /* Set to 0 or ma_format_unknown to use the stream's internal format. */ ma_uint32 channels; /* Set to 0 to use the stream's internal channels. */ ma_uint32 sampleRate; /* Set to 0 to use the stream's internal sample rate. */ ma_channel* pChannelMap; ma_channel_mix_mode channelMixMode; ma_dither_mode ditherMode; ma_resampler_config resampling; ma_allocation_callbacks allocationCallbacks; ma_encoding_format encodingFormat; ma_uint32 seekPointCount; /* When set to > 0, specifies the number of seek points to use for the generation of a seek table. Not all decoding backends support this. */ ma_decoding_backend_vtable** ppCustomBackendVTables; ma_uint32 customBackendCount; void* pCustomBackendUserData; } ma_decoder_config; struct ma_decoder { ma_data_source_base ds; ma_data_source* pBackend; /* The decoding backend we'll be pulling data from. */ const ma_decoding_backend_vtable* pBackendVTable; /* The vtable for the decoding backend. This needs to be stored so we can access the onUninit() callback. */ void* pBackendUserData; ma_decoder_read_proc onRead; ma_decoder_seek_proc onSeek; ma_decoder_tell_proc onTell; void* pUserData; ma_uint64 readPointerInPCMFrames; /* In output sample rate. Used for keeping track of how many frames are available for decoding. */ ma_format outputFormat; ma_uint32 outputChannels; ma_uint32 outputSampleRate; ma_data_converter converter; /* Data conversion is achieved by running frames through this. */ void* pInputCache; /* In input format. Can be null if it's not needed. */ ma_uint64 inputCacheCap; /* The capacity of the input cache. */ ma_uint64 inputCacheConsumed; /* The number of frames that have been consumed in the cache. Used for determining the next valid frame. */ ma_uint64 inputCacheRemaining; /* The number of valid frames remaining in the cache. */ ma_allocation_callbacks allocationCallbacks; union { struct { ma_vfs* pVFS; ma_vfs_file file; } vfs; struct { const ma_uint8* pData; size_t dataSize; size_t currentReadPos; } memory; /* Only used for decoders that were opened against a block of memory. */ } data; }; MA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate); MA_API ma_decoder_config ma_decoder_config_init_default(void); MA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder); /* Uninitializes a decoder. */ MA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder); /* Reads PCM frames from the given decoder. This is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); /* Seeks to a PCM frame based on its absolute index. This is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex); /* Retrieves the decoder's output data format. */ MA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); /* Retrieves the current position of the read cursor in PCM frames. */ MA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor); /* Retrieves the length of the decoder in PCM frames. Do not call this on streams of an undefined length, such as internet radio. If the length is unknown or an error occurs, 0 will be returned. This will always return 0 for Vorbis decoders. This is due to a limitation with stb_vorbis in push mode which is what miniaudio uses internally. For MP3's, this will decode the entire file. Do not call this in time critical scenarios. This function is not thread safe without your own synchronization. */ MA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength); /* Retrieves the number of frames that can be read before reaching the end. This calls `ma_decoder_get_length_in_pcm_frames()` so you need to be aware of the rules for that function, in particular ensuring you do not call it on streams of an undefined length, such as internet radio. If the total length of the decoder cannot be retrieved, such as with Vorbis decoders, `MA_NOT_IMPLEMENTED` will be returned. */ MA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames); /* Helper for opening and decoding a file into a heap allocated block of memory. Free the returned pointer with ma_free(). On input, pConfig should be set to what you want. On output it will be set to what you got. */ MA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut); #endif /* MA_NO_DECODING */ /************************************************************************************************************************************************************ Encoding ======== Encoders do not perform any format conversion for you. If your target format does not support the format, and error will be returned. ************************************************************************************************************************************************************/ #ifndef MA_NO_ENCODING typedef struct ma_encoder ma_encoder; typedef ma_result (* ma_encoder_write_proc) (ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten); typedef ma_result (* ma_encoder_seek_proc) (ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin); typedef ma_result (* ma_encoder_init_proc) (ma_encoder* pEncoder); typedef void (* ma_encoder_uninit_proc) (ma_encoder* pEncoder); typedef ma_result (* ma_encoder_write_pcm_frames_proc)(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten); typedef struct { ma_encoding_format encodingFormat; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_allocation_callbacks allocationCallbacks; } ma_encoder_config; MA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); struct ma_encoder { ma_encoder_config config; ma_encoder_write_proc onWrite; ma_encoder_seek_proc onSeek; ma_encoder_init_proc onInit; ma_encoder_uninit_proc onUninit; ma_encoder_write_pcm_frames_proc onWritePCMFrames; void* pUserData; void* pInternalEncoder; union { struct { ma_vfs* pVFS; ma_vfs_file file; } vfs; } data; }; MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder); MA_API void ma_encoder_uninit(ma_encoder* pEncoder); MA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten); #endif /* MA_NO_ENCODING */ /************************************************************************************************************************************************************ Generation ************************************************************************************************************************************************************/ #ifndef MA_NO_GENERATION typedef enum { ma_waveform_type_sine, ma_waveform_type_square, ma_waveform_type_triangle, ma_waveform_type_sawtooth } ma_waveform_type; typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_waveform_type type; double amplitude; double frequency; } ma_waveform_config; MA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency); typedef struct { ma_data_source_base ds; ma_waveform_config config; double advance; double time; } ma_waveform; MA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform); MA_API void ma_waveform_uninit(ma_waveform* pWaveform); MA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex); MA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude); MA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency); MA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type); MA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate); typedef struct { ma_format format; ma_uint32 channels; ma_uint32 sampleRate; double dutyCycle; double amplitude; double frequency; } ma_pulsewave_config; MA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency); typedef struct { ma_waveform waveform; ma_pulsewave_config config; } ma_pulsewave; MA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform); MA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform); MA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex); MA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude); MA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency); MA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate); MA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle); typedef enum { ma_noise_type_white, ma_noise_type_pink, ma_noise_type_brownian } ma_noise_type; typedef struct { ma_format format; ma_uint32 channels; ma_noise_type type; ma_int32 seed; double amplitude; ma_bool32 duplicateChannels; } ma_noise_config; MA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude); typedef struct { ma_data_source_base ds; ma_noise_config config; ma_lcg lcg; union { struct { double** bin; double* accumulation; ma_uint32* counter; } pink; struct { double* accumulation; } brownian; } state; /* Memory management. */ void* _pHeap; ma_bool32 _ownsHeap; } ma_noise; MA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise); MA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise); MA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude); MA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed); MA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type); #endif /* MA_NO_GENERATION */ /************************************************************************************************************************************************************ Resource Manager ************************************************************************************************************************************************************/ /* The resource manager cannot be enabled if there is no decoder. */ #if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_NO_DECODING) #define MA_NO_RESOURCE_MANAGER #endif #ifndef MA_NO_RESOURCE_MANAGER typedef struct ma_resource_manager ma_resource_manager; typedef struct ma_resource_manager_data_buffer_node ma_resource_manager_data_buffer_node; typedef struct ma_resource_manager_data_buffer ma_resource_manager_data_buffer; typedef struct ma_resource_manager_data_stream ma_resource_manager_data_stream; typedef struct ma_resource_manager_data_source ma_resource_manager_data_source; typedef enum { MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM = 0x00000001, /* When set, does not load the entire data source in memory. Disk I/O will happen on job threads. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE = 0x00000002, /* Decode data before storing in memory. When set, decoding is done at the resource manager level rather than the mixing thread. Results in faster mixing, but higher memory usage. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC = 0x00000004, /* When set, the resource manager will load the data source asynchronously. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT = 0x00000008, /* When set, waits for initialization of the underlying data source before returning from ma_resource_manager_data_source_init(). */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH = 0x00000010, /* Gives the resource manager a hint that the length of the data source is unknown and calling `ma_data_source_get_length_in_pcm_frames()` should be avoided. */ MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING = 0x00000020 /* When set, configures the data source to loop by default. */ } ma_resource_manager_data_source_flags; /* Pipeline notifications used by the resource manager. Made up of both an async notification and a fence, both of which are optional. */ typedef struct { ma_async_notification* pNotification; ma_fence* pFence; } ma_resource_manager_pipeline_stage_notification; typedef struct { ma_resource_manager_pipeline_stage_notification init; /* Initialization of the decoder. */ ma_resource_manager_pipeline_stage_notification done; /* Decoding fully completed. */ } ma_resource_manager_pipeline_notifications; MA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void); /* BEGIN BACKWARDS COMPATIBILITY */ /* TODO: Remove this block in version 0.12. */ #if 1 #define ma_resource_manager_job ma_job #define ma_resource_manager_job_init ma_job_init #define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_FLAG_NON_BLOCKING MA_JOB_QUEUE_FLAG_NON_BLOCKING #define ma_resource_manager_job_queue_config ma_job_queue_config #define ma_resource_manager_job_queue_config_init ma_job_queue_config_init #define ma_resource_manager_job_queue ma_job_queue #define ma_resource_manager_job_queue_get_heap_size ma_job_queue_get_heap_size #define ma_resource_manager_job_queue_init_preallocated ma_job_queue_init_preallocated #define ma_resource_manager_job_queue_init ma_job_queue_init #define ma_resource_manager_job_queue_uninit ma_job_queue_uninit #define ma_resource_manager_job_queue_post ma_job_queue_post #define ma_resource_manager_job_queue_next ma_job_queue_next #endif /* END BACKWARDS COMPATIBILITY */ /* Maximum job thread count will be restricted to this, but this may be removed later and replaced with a heap allocation thereby removing any limitation. */ #ifndef MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT #define MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT 64 #endif typedef enum { /* Indicates ma_resource_manager_next_job() should not block. Only valid when the job thread count is 0. */ MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING = 0x00000001, /* Disables any kind of multithreading. Implicitly enables MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING. */ MA_RESOURCE_MANAGER_FLAG_NO_THREADING = 0x00000002 } ma_resource_manager_flags; typedef struct { const char* pFilePath; const wchar_t* pFilePathW; const ma_resource_manager_pipeline_notifications* pNotifications; ma_uint64 initialSeekPointInPCMFrames; ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_uint32 flags; ma_bool32 isLooping; /* Deprecated. Use the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING flag in `flags` instead. */ } ma_resource_manager_data_source_config; MA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void); typedef enum { ma_resource_manager_data_supply_type_unknown = 0, /* Used for determining whether or the data supply has been initialized. */ ma_resource_manager_data_supply_type_encoded, /* Data supply is an encoded buffer. Connector is ma_decoder. */ ma_resource_manager_data_supply_type_decoded, /* Data supply is a decoded buffer. Connector is ma_audio_buffer. */ ma_resource_manager_data_supply_type_decoded_paged /* Data supply is a linked list of decoded buffers. Connector is ma_paged_audio_buffer. */ } ma_resource_manager_data_supply_type; typedef struct { MA_ATOMIC(4, ma_resource_manager_data_supply_type) type; /* Read and written from different threads so needs to be accessed atomically. */ union { struct { const void* pData; size_t sizeInBytes; } encoded; struct { const void* pData; ma_uint64 totalFrameCount; ma_uint64 decodedFrameCount; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; } decoded; struct { ma_paged_audio_buffer_data data; ma_uint64 decodedFrameCount; ma_uint32 sampleRate; } decodedPaged; } backend; } ma_resource_manager_data_supply; struct ma_resource_manager_data_buffer_node { ma_uint32 hashedName32; /* The hashed name. This is the key. */ ma_uint32 refCount; MA_ATOMIC(4, ma_result) result; /* Result from asynchronous loading. When loading set to MA_BUSY. When fully loaded set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ ma_bool32 isDataOwnedByResourceManager; /* Set to true when the underlying data buffer was allocated the resource manager. Set to false if it is owned by the application (via ma_resource_manager_register_*()). */ ma_resource_manager_data_supply data; ma_resource_manager_data_buffer_node* pParent; ma_resource_manager_data_buffer_node* pChildLo; ma_resource_manager_data_buffer_node* pChildHi; }; struct ma_resource_manager_data_buffer { ma_data_source_base ds; /* Base data source. A data buffer is a data source. */ ma_resource_manager* pResourceManager; /* A pointer to the resource manager that owns this buffer. */ ma_resource_manager_data_buffer_node* pNode; /* The data node. This is reference counted and is what supplies the data. */ ma_uint32 flags; /* The flags that were passed used to initialize the buffer. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ ma_uint64 seekTargetInPCMFrames; /* Only updated by the public API. Never written nor read from the job thread. */ ma_bool32 seekToCursorOnNextRead; /* On the next read we need to seek to the frame cursor. */ MA_ATOMIC(4, ma_result) result; /* Keeps track of a result of decoding. Set to MA_BUSY while the buffer is still loading. Set to MA_SUCCESS when loading is finished successfully. Otherwise set to some other code. */ MA_ATOMIC(4, ma_bool32) isLooping; /* Can be read and written by different threads at the same time. Must be used atomically. */ ma_atomic_bool32 isConnectorInitialized; /* Used for asynchronous loading to ensure we don't try to initialize the connector multiple times while waiting for the node to fully load. */ union { ma_decoder decoder; /* Supply type is ma_resource_manager_data_supply_type_encoded */ ma_audio_buffer buffer; /* Supply type is ma_resource_manager_data_supply_type_decoded */ ma_paged_audio_buffer pagedBuffer; /* Supply type is ma_resource_manager_data_supply_type_decoded_paged */ } connector; /* Connects this object to the node's data supply. */ }; struct ma_resource_manager_data_stream { ma_data_source_base ds; /* Base data source. A data stream is a data source. */ ma_resource_manager* pResourceManager; /* A pointer to the resource manager that owns this data stream. */ ma_uint32 flags; /* The flags that were passed used to initialize the stream. */ ma_decoder decoder; /* Used for filling pages with data. This is only ever accessed by the job thread. The public API should never touch this. */ ma_bool32 isDecoderInitialized; /* Required for determining whether or not the decoder should be uninitialized in MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM. */ ma_uint64 totalLengthInPCMFrames; /* This is calculated when first loaded by the MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM. */ ma_uint32 relativeCursor; /* The playback cursor, relative to the current page. Only ever accessed by the public API. Never accessed by the job thread. */ MA_ATOMIC(8, ma_uint64) absoluteCursor; /* The playback cursor, in absolute position starting from the start of the file. */ ma_uint32 currentPageIndex; /* Toggles between 0 and 1. Index 0 is the first half of pPageData. Index 1 is the second half. Only ever accessed by the public API. Never accessed by the job thread. */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ /* Written by the public API, read by the job thread. */ MA_ATOMIC(4, ma_bool32) isLooping; /* Whether or not the stream is looping. It's important to set the looping flag at the data stream level for smooth loop transitions. */ /* Written by the job thread, read by the public API. */ void* pPageData; /* Buffer containing the decoded data of each page. Allocated once at initialization time. */ MA_ATOMIC(4, ma_uint32) pageFrameCount[2]; /* The number of valid PCM frames in each page. Used to determine the last valid frame. */ /* Written and read by both the public API and the job thread. These must be atomic. */ MA_ATOMIC(4, ma_result) result; /* Result from asynchronous loading. When loading set to MA_BUSY. When initialized set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. If an error occurs when loading, set to an error code. */ MA_ATOMIC(4, ma_bool32) isDecoderAtEnd; /* Whether or not the decoder has reached the end. */ MA_ATOMIC(4, ma_bool32) isPageValid[2]; /* Booleans to indicate whether or not a page is valid. Set to false by the public API, set to true by the job thread. Set to false as the pages are consumed, true when they are filled. */ MA_ATOMIC(4, ma_bool32) seekCounter; /* When 0, no seeking is being performed. When > 0, a seek is being performed and reading should be delayed with MA_BUSY. */ }; struct ma_resource_manager_data_source { union { ma_resource_manager_data_buffer buffer; ma_resource_manager_data_stream stream; } backend; /* Must be the first item because we need the first item to be the data source callbacks for the buffer or stream. */ ma_uint32 flags; /* The flags that were passed in to ma_resource_manager_data_source_init(). */ MA_ATOMIC(4, ma_uint32) executionCounter; /* For allocating execution orders for jobs. */ MA_ATOMIC(4, ma_uint32) executionPointer; /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */ }; typedef struct { ma_allocation_callbacks allocationCallbacks; ma_log* pLog; ma_format decodedFormat; /* The decoded format to use. Set to ma_format_unknown (default) to use the file's native format. */ ma_uint32 decodedChannels; /* The decoded channel count to use. Set to 0 (default) to use the file's native channel count. */ ma_uint32 decodedSampleRate; /* the decoded sample rate to use. Set to 0 (default) to use the file's native sample rate. */ ma_uint32 jobThreadCount; /* Set to 0 if you want to self-manage your job threads. Defaults to 1. */ size_t jobThreadStackSize; ma_uint32 jobQueueCapacity; /* The maximum number of jobs that can fit in the queue at a time. Defaults to MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY. Cannot be zero. */ ma_uint32 flags; ma_vfs* pVFS; /* Can be NULL in which case defaults will be used. */ ma_decoding_backend_vtable** ppCustomDecodingBackendVTables; ma_uint32 customDecodingBackendCount; void* pCustomDecodingBackendUserData; } ma_resource_manager_config; MA_API ma_resource_manager_config ma_resource_manager_config_init(void); struct ma_resource_manager { ma_resource_manager_config config; ma_resource_manager_data_buffer_node* pRootDataBufferNode; /* The root buffer in the binary tree. */ #ifndef MA_NO_THREADING ma_mutex dataBufferBSTLock; /* For synchronizing access to the data buffer binary tree. */ ma_thread jobThreads[MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT]; /* The threads for executing jobs. */ #endif ma_job_queue jobQueue; /* Multi-consumer, multi-producer job queue for managing jobs for asynchronous decoding and streaming. */ ma_default_vfs defaultVFS; /* Only used if a custom VFS is not specified. */ ma_log log; /* Only used if no log was specified in the config. */ }; /* Init. */ MA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager); MA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager); MA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager); /* Registration. */ MA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags); MA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags); MA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */ MA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate); MA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes); /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */ MA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes); MA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath); MA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath); MA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName); MA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName); /* Data Buffers. */ MA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer); MA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames); /* Data Streams. */ MA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream); MA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames); /* Data Sources. */ MA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex); MA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor); MA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength); MA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping); MA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource); MA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames); /* Job management. */ MA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob); MA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager); /* Helper for posting a quit job. */ MA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob); MA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob); /* DEPRECATED. Use ma_job_process(). Will be removed in version 0.12. */ MA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager); /* Returns MA_CANCELLED if a MA_JOB_TYPE_QUIT job is found. In non-blocking mode, returns MA_NO_DATA_AVAILABLE if no jobs are available. */ #endif /* MA_NO_RESOURCE_MANAGER */ /************************************************************************************************************************************************************ Node Graph ************************************************************************************************************************************************************/ #ifndef MA_NO_NODE_GRAPH /* Must never exceed 254. */ #ifndef MA_MAX_NODE_BUS_COUNT #define MA_MAX_NODE_BUS_COUNT 254 #endif /* Used internally by miniaudio for memory management. Must never exceed MA_MAX_NODE_BUS_COUNT. */ #ifndef MA_MAX_NODE_LOCAL_BUS_COUNT #define MA_MAX_NODE_LOCAL_BUS_COUNT 2 #endif /* Use this when the bus count is determined by the node instance rather than the vtable. */ #define MA_NODE_BUS_COUNT_UNKNOWN 255 /* For some internal memory management of ma_node_graph. */ typedef struct { size_t offset; size_t sizeInBytes; unsigned char _data[1]; } ma_stack; typedef struct ma_node_graph ma_node_graph; typedef void ma_node; /* Node flags. */ typedef enum { MA_NODE_FLAG_PASSTHROUGH = 0x00000001, MA_NODE_FLAG_CONTINUOUS_PROCESSING = 0x00000002, MA_NODE_FLAG_ALLOW_NULL_INPUT = 0x00000004, MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES = 0x00000008, MA_NODE_FLAG_SILENT_OUTPUT = 0x00000010 } ma_node_flags; /* The playback state of a node. Either started or stopped. */ typedef enum { ma_node_state_started = 0, ma_node_state_stopped = 1 } ma_node_state; typedef struct { /* Extended processing callback. This callback is used for effects that process input and output at different rates (i.e. they perform resampling). This is similar to the simple version, only they take two separate frame counts: one for input, and one for output. On input, `pFrameCountOut` is equal to the capacity of the output buffer for each bus, whereas `pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`. On output, set `pFrameCountOut` to the number of PCM frames that were actually output and set `pFrameCountIn` to the number of input frames that were consumed. */ void (* onProcess)(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut); /* A callback for retrieving the number of input frames that are required to output the specified number of output frames. You would only want to implement this when the node performs resampling. This is optional, even for nodes that perform resampling, but it does offer a small reduction in latency as it allows miniaudio to calculate the exact number of input frames to read at a time instead of having to estimate. */ ma_result (* onGetRequiredInputFrameCount)(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount); /* The number of input buses. This is how many sub-buffers will be contained in the `ppFramesIn` parameters of the callbacks above. */ ma_uint8 inputBusCount; /* The number of output buses. This is how many sub-buffers will be contained in the `ppFramesOut` parameters of the callbacks above. */ ma_uint8 outputBusCount; /* Flags describing characteristics of the node. This is currently just a placeholder for some ideas for later on. */ ma_uint32 flags; } ma_node_vtable; typedef struct { const ma_node_vtable* vtable; /* Should never be null. Initialization of the node will fail if so. */ ma_node_state initialState; /* Defaults to ma_node_state_started. */ ma_uint32 inputBusCount; /* Only used if the vtable specifies an input bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise must be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */ ma_uint32 outputBusCount; /* Only used if the vtable specifies an output bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */ const ma_uint32* pInputChannels; /* The number of elements are determined by the input bus count as determined by the vtable, or `inputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */ const ma_uint32* pOutputChannels; /* The number of elements are determined by the output bus count as determined by the vtable, or `outputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */ } ma_node_config; MA_API ma_node_config ma_node_config_init(void); /* A node has multiple output buses. An output bus is attached to an input bus as an item in a linked list. Think of the input bus as a linked list, with the output bus being an item in that list. */ typedef struct ma_node_output_bus ma_node_output_bus; struct ma_node_output_bus { /* Immutable. */ ma_node* pNode; /* The node that owns this output bus. The input node. Will be null for dummy head and tail nodes. */ ma_uint8 outputBusIndex; /* The index of the output bus on pNode that this output bus represents. */ ma_uint8 channels; /* The number of channels in the audio stream for this bus. */ /* Mutable via multiple threads. Must be used atomically. The weird ordering here is for packing reasons. */ ma_uint8 inputNodeInputBusIndex; /* The index of the input bus on the input. Required for detaching. Will only be used within the spinlock so does not need to be atomic. */ MA_ATOMIC(4, ma_uint32) flags; /* Some state flags for tracking the read state of the output buffer. A combination of MA_NODE_OUTPUT_BUS_FLAG_*. */ MA_ATOMIC(4, ma_uint32) refCount; /* Reference count for some thread-safety when detaching. */ MA_ATOMIC(4, ma_bool32) isAttached; /* This is used to prevent iteration of nodes that are in the middle of being detached. Used for thread safety. */ MA_ATOMIC(4, ma_spinlock) lock; /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */ MA_ATOMIC(4, float) volume; /* Linear. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pNext; /* If null, it's the tail node or detached. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pPrev; /* If null, it's the head node or detached. */ MA_ATOMIC(MA_SIZEOF_PTR, ma_node*) pInputNode; /* The node that this output bus is attached to. Required for detaching. */ }; /* A node has multiple input buses. The output buses of a node are connecting to the input busses of another. An input bus is essentially just a linked list of output buses. */ typedef struct ma_node_input_bus ma_node_input_bus; struct ma_node_input_bus { /* Mutable via multiple threads. */ ma_node_output_bus head; /* Dummy head node for simplifying some lock-free thread-safety stuff. */ MA_ATOMIC(4, ma_uint32) nextCounter; /* This is used to determine whether or not the input bus is finding the next node in the list. Used for thread safety when detaching output buses. */ MA_ATOMIC(4, ma_spinlock) lock; /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */ /* Set once at startup. */ ma_uint8 channels; /* The number of channels in the audio stream for this bus. */ }; typedef struct ma_node_base ma_node_base; struct ma_node_base { /* These variables are set once at startup. */ ma_node_graph* pNodeGraph; /* The graph this node belongs to. */ const ma_node_vtable* vtable; ma_uint32 inputBusCount; ma_uint32 outputBusCount; ma_node_input_bus* pInputBuses; ma_node_output_bus* pOutputBuses; float* pCachedData; /* Allocated on the heap. Fixed size. Needs to be stored on the heap because reading from output buses is done in separate function calls. */ ma_uint16 cachedDataCapInFramesPerBus; /* The capacity of the input data cache in frames, per bus. */ /* These variables are read and written only from the audio thread. */ ma_uint16 cachedFrameCountOut; ma_uint16 cachedFrameCountIn; ma_uint16 consumedFrameCountIn; /* These variables are read and written between different threads. */ MA_ATOMIC(4, ma_node_state) state; /* When set to stopped, nothing will be read, regardless of the times in stateTimes. */ MA_ATOMIC(8, ma_uint64) stateTimes[2]; /* Indexed by ma_node_state. Specifies the time based on the global clock that a node should be considered to be in the relevant state. */ MA_ATOMIC(8, ma_uint64) localTime; /* The node's local clock. This is just a running sum of the number of output frames that have been processed. Can be modified by any thread with `ma_node_set_time()`. */ /* Memory management. */ ma_node_input_bus _inputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT]; ma_node_output_bus _outputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT]; void* _pHeap; /* A heap allocation for internal use only. pInputBuses and/or pOutputBuses will point to this if the bus count exceeds MA_MAX_NODE_LOCAL_BUS_COUNT. */ ma_bool32 _ownsHeap; /* If set to true, the node owns the heap allocation and _pHeap will be freed in ma_node_uninit(). */ }; MA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode); MA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode); MA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode); MA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode); MA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode); MA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex); MA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex); MA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode); MA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume); MA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex); MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state); MA_API ma_node_state ma_node_get_state(const ma_node* pNode); MA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime); MA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state); MA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime); MA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd); MA_API ma_uint64 ma_node_get_time(const ma_node* pNode); MA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime); typedef struct { ma_uint32 channels; ma_uint32 processingSizeInFrames; /* This is the preferred processing size for node processing callbacks unless overridden by a node itself. Can be 0 in which case it will be based on the frame count passed into ma_node_graph_read_pcm_frames(), but will not be well defined. */ size_t preMixStackSizeInBytes; /* Defaults to 512KB per channel. Reducing this will save memory, but the depth of your node graph will be more restricted. */ } ma_node_graph_config; MA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels); struct ma_node_graph { /* Immutable. */ ma_node_base base; /* The node graph itself is a node so it can be connected as an input to different node graph. This has zero inputs and calls ma_node_graph_read_pcm_frames() to generate it's output. */ ma_node_base endpoint; /* Special node that all nodes eventually connect to. Data is read from this node in ma_node_graph_read_pcm_frames(). */ float* pProcessingCache; /* This will be allocated when processingSizeInFrames is non-zero. This is needed because ma_node_graph_read_pcm_frames() can be called with a variable number of frames, and we may need to do some buffering in situations where the caller requests a frame count that's not a multiple of processingSizeInFrames. */ ma_uint32 processingCacheFramesRemaining; ma_uint32 processingSizeInFrames; /* Read and written by multiple threads. */ MA_ATOMIC(4, ma_bool32) isReading; /* Modified only by the audio thread. */ ma_stack* pPreMixStack; }; MA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph); MA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph); MA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph); MA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph); MA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime); /* Data source node. 0 input buses, 1 output bus. Used for reading from a data source. */ typedef struct { ma_node_config nodeConfig; ma_data_source* pDataSource; } ma_data_source_node_config; MA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource); typedef struct { ma_node_base base; ma_data_source* pDataSource; } ma_data_source_node; MA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode); MA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping); MA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode); /* Splitter Node. 1 input, many outputs. Used for splitting/copying a stream so it can be as input into two separate output nodes. */ typedef struct { ma_node_config nodeConfig; ma_uint32 channels; ma_uint32 outputBusCount; } ma_splitter_node_config; MA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels); typedef struct { ma_node_base base; } ma_splitter_node; MA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode); MA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Biquad Node */ typedef struct { ma_node_config nodeConfig; ma_biquad_config biquad; } ma_biquad_node_config; MA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2); typedef struct { ma_node_base baseNode; ma_biquad biquad; } ma_biquad_node; MA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode); MA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode); MA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Low Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_lpf_config lpf; } ma_lpf_node_config; MA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_lpf lpf; } ma_lpf_node; MA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode); MA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode); MA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* High Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_hpf_config hpf; } ma_hpf_node_config; MA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_hpf hpf; } ma_hpf_node; MA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode); MA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode); MA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Band Pass Filter Node */ typedef struct { ma_node_config nodeConfig; ma_bpf_config bpf; } ma_bpf_node_config; MA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order); typedef struct { ma_node_base baseNode; ma_bpf bpf; } ma_bpf_node; MA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode); MA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode); MA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Notching Filter Node */ typedef struct { ma_node_config nodeConfig; ma_notch_config notch; } ma_notch_node_config; MA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency); typedef struct { ma_node_base baseNode; ma_notch2 notch; } ma_notch_node; MA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode); MA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode); MA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Peaking Filter Node */ typedef struct { ma_node_config nodeConfig; ma_peak_config peak; } ma_peak_node_config; MA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_peak2 peak; } ma_peak_node; MA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode); MA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode); MA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* Low Shelf Filter Node */ typedef struct { ma_node_config nodeConfig; ma_loshelf_config loshelf; } ma_loshelf_node_config; MA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_loshelf2 loshelf; } ma_loshelf_node; MA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode); MA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode); MA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); /* High Shelf Filter Node */ typedef struct { ma_node_config nodeConfig; ma_hishelf_config hishelf; } ma_hishelf_node_config; MA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency); typedef struct { ma_node_base baseNode; ma_hishelf2 hishelf; } ma_hishelf_node; MA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode); MA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode); MA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_node_config nodeConfig; ma_delay_config delay; } ma_delay_node_config; MA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay); typedef struct { ma_node_base baseNode; ma_delay delay; } ma_delay_node; MA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode); MA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode); MA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode); MA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value); MA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode); #endif /* MA_NO_NODE_GRAPH */ /* SECTION: miniaudio_engine.h */ /************************************************************************************************************************************************************ Engine ************************************************************************************************************************************************************/ #if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH) typedef struct ma_engine ma_engine; typedef struct ma_sound ma_sound; /* Sound flags. */ typedef enum { /* Resource manager flags. */ MA_SOUND_FLAG_STREAM = 0x00000001, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM */ MA_SOUND_FLAG_DECODE = 0x00000002, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE */ MA_SOUND_FLAG_ASYNC = 0x00000004, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC */ MA_SOUND_FLAG_WAIT_INIT = 0x00000008, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT */ MA_SOUND_FLAG_UNKNOWN_LENGTH = 0x00000010, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH */ MA_SOUND_FLAG_LOOPING = 0x00000020, /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING */ /* ma_sound specific flags. */ MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT = 0x00001000, /* Do not attach to the endpoint by default. Useful for when setting up nodes in a complex graph system. */ MA_SOUND_FLAG_NO_PITCH = 0x00002000, /* Disable pitch shifting with ma_sound_set_pitch() and ma_sound_group_set_pitch(). This is an optimization. */ MA_SOUND_FLAG_NO_SPATIALIZATION = 0x00004000 /* Disable spatialization. */ } ma_sound_flags; #ifndef MA_ENGINE_MAX_LISTENERS #define MA_ENGINE_MAX_LISTENERS 4 #endif #define MA_LISTENER_INDEX_CLOSEST ((ma_uint8)-1) typedef enum { ma_engine_node_type_sound, ma_engine_node_type_group } ma_engine_node_type; typedef struct { ma_engine* pEngine; ma_engine_node_type type; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_uint32 sampleRate; /* Only used when the type is set to ma_engine_node_type_sound. */ ma_uint32 volumeSmoothTimeInPCMFrames; /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */ ma_mono_expansion_mode monoExpansionMode; ma_bool8 isPitchDisabled; /* Pitching can be explicitly disabled with MA_SOUND_FLAG_NO_PITCH to optimize processing. */ ma_bool8 isSpatializationDisabled; /* Spatialization can be explicitly disabled with MA_SOUND_FLAG_NO_SPATIALIZATION. */ ma_uint8 pinnedListenerIndex; /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */ } ma_engine_node_config; MA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags); /* Base node object for both ma_sound and ma_sound_group. */ typedef struct { ma_node_base baseNode; /* Must be the first member for compatibility with the ma_node API. */ ma_engine* pEngine; /* A pointer to the engine. Set based on the value from the config. */ ma_uint32 sampleRate; /* The sample rate of the input data. For sounds backed by a data source, this will be the data source's sample rate. Otherwise it'll be the engine's sample rate. */ ma_uint32 volumeSmoothTimeInPCMFrames; ma_mono_expansion_mode monoExpansionMode; ma_fader fader; ma_linear_resampler resampler; /* For pitch shift. */ ma_spatializer spatializer; ma_panner panner; ma_gainer volumeGainer; /* This will only be used if volumeSmoothTimeInPCMFrames is > 0. */ ma_atomic_float volume; /* Defaults to 1. */ MA_ATOMIC(4, float) pitch; float oldPitch; /* For determining whether or not the resampler needs to be updated to reflect the new pitch. The resampler will be updated on the mixing thread. */ float oldDopplerPitch; /* For determining whether or not the resampler needs to be updated to take a new doppler pitch into account. */ MA_ATOMIC(4, ma_bool32) isPitchDisabled; /* When set to true, pitching will be disabled which will allow the resampler to be bypassed to save some computation. */ MA_ATOMIC(4, ma_bool32) isSpatializationDisabled; /* Set to false by default. When set to false, will not have spatialisation applied. */ MA_ATOMIC(4, ma_uint32) pinnedListenerIndex; /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */ /* When setting a fade, it's not done immediately in ma_sound_set_fade(). It's deferred to the audio thread which means we need to store the settings here. */ struct { ma_atomic_float volumeBeg; ma_atomic_float volumeEnd; ma_atomic_uint64 fadeLengthInFrames; /* <-- Defaults to (~(ma_uint64)0) which is used to indicate that no fade should be applied. */ ma_atomic_uint64 absoluteGlobalTimeInFrames; /* <-- The time to start the fade. */ } fadeSettings; /* Memory management. */ ma_bool8 _ownsHeap; void* _pHeap; } ma_engine_node; MA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes); MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode); MA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode); MA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks); #define MA_SOUND_SOURCE_CHANNEL_COUNT 0xFFFFFFFF /* Callback for when a sound reaches the end. */ typedef void (* ma_sound_end_proc)(void* pUserData, ma_sound* pSound); typedef struct { const char* pFilePath; /* Set this to load from the resource manager. */ const wchar_t* pFilePathW; /* Set this to load from the resource manager. */ ma_data_source* pDataSource; /* Set this to load from an existing data source. */ ma_node* pInitialAttachment; /* If set, the sound will be attached to an input of this node. This can be set to a ma_sound. If set to NULL, the sound will be attached directly to the endpoint unless MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT is set in `flags`. */ ma_uint32 initialAttachmentInputBusIndex; /* The index of the input bus of pInitialAttachment to attach the sound to. */ ma_uint32 channelsIn; /* Ignored if using a data source as input (the data source's channel count will be used always). Otherwise, setting to 0 will cause the engine's channel count to be used. */ ma_uint32 channelsOut; /* Set this to 0 (default) to use the engine's channel count. Set to MA_SOUND_SOURCE_CHANNEL_COUNT to use the data source's channel count (only used if using a data source as input). */ ma_mono_expansion_mode monoExpansionMode; /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */ ma_uint32 flags; /* A combination of MA_SOUND_FLAG_* flags. */ ma_uint32 volumeSmoothTimeInPCMFrames; /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */ ma_uint64 initialSeekPointInPCMFrames; /* Initializes the sound such that it's seeked to this location by default. */ ma_uint64 rangeBegInPCMFrames; ma_uint64 rangeEndInPCMFrames; ma_uint64 loopPointBegInPCMFrames; ma_uint64 loopPointEndInPCMFrames; ma_sound_end_proc endCallback; /* Fired when the sound reaches the end. Will be fired from the audio thread. Do not restart, uninitialize or otherwise change the state of the sound from here. Instead fire an event or set a variable to indicate to a different thread to change the start of the sound. Will not be fired in response to a scheduled stop with ma_sound_set_stop_time_*(). */ void* pEndCallbackUserData; #ifndef MA_NO_RESOURCE_MANAGER ma_resource_manager_pipeline_notifications initNotifications; #endif ma_fence* pDoneFence; /* Deprecated. Use initNotifications instead. Released when the resource manager has finished decoding the entire sound. Not used with streams. */ ma_bool32 isLooping; /* Deprecated. Use the MA_SOUND_FLAG_LOOPING flag in `flags` instead. */ } ma_sound_config; MA_API ma_sound_config ma_sound_config_init(void); /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */ MA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine); /* Will be renamed to ma_sound_config_init() in version 0.12. */ struct ma_sound { ma_engine_node engineNode; /* Must be the first member for compatibility with the ma_node API. */ ma_data_source* pDataSource; MA_ATOMIC(8, ma_uint64) seekTarget; /* The PCM frame index to seek to in the mixing thread. Set to (~(ma_uint64)0) to not perform any seeking. */ MA_ATOMIC(4, ma_bool32) atEnd; ma_sound_end_proc endCallback; void* pEndCallbackUserData; ma_bool8 ownsDataSource; /* We're declaring a resource manager data source object here to save us a malloc when loading a sound via the resource manager, which I *think* will be the most common scenario. */ #ifndef MA_NO_RESOURCE_MANAGER ma_resource_manager_data_source* pResourceManagerDataSource; #endif }; /* Structure specifically for sounds played with ma_engine_play_sound(). Making this a separate structure to reduce overhead. */ typedef struct ma_sound_inlined ma_sound_inlined; struct ma_sound_inlined { ma_sound sound; ma_sound_inlined* pNext; ma_sound_inlined* pPrev; }; /* A sound group is just a sound. */ typedef ma_sound_config ma_sound_group_config; typedef ma_sound ma_sound_group; MA_API ma_sound_group_config ma_sound_group_config_init(void); /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */ MA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine); /* Will be renamed to ma_sound_config_init() in version 0.12. */ typedef void (* ma_engine_process_proc)(void* pUserData, float* pFramesOut, ma_uint64 frameCount); typedef struct { #if !defined(MA_NO_RESOURCE_MANAGER) ma_resource_manager* pResourceManager; /* Can be null in which case a resource manager will be created for you. */ #endif #if !defined(MA_NO_DEVICE_IO) ma_context* pContext; ma_device* pDevice; /* If set, the caller is responsible for calling ma_engine_data_callback() in the device's data callback. */ ma_device_id* pPlaybackDeviceID; /* The ID of the playback device to use with the default listener. */ ma_device_data_proc dataCallback; /* Can be null. Can be used to provide a custom device data callback. */ ma_device_notification_proc notificationCallback; #endif ma_log* pLog; /* When set to NULL, will use the context's log. */ ma_uint32 listenerCount; /* Must be between 1 and MA_ENGINE_MAX_LISTENERS. */ ma_uint32 channels; /* The number of channels to use when mixing and spatializing. When set to 0, will use the native channel count of the device. */ ma_uint32 sampleRate; /* The sample rate. When set to 0 will use the native channel count of the device. */ ma_uint32 periodSizeInFrames; /* If set to something other than 0, updates will always be exactly this size. The underlying device may be a different size, but from the perspective of the mixer that won't matter.*/ ma_uint32 periodSizeInMilliseconds; /* Used if periodSizeInFrames is unset. */ ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. If set to 0, will use gainSmoothTimeInMilliseconds. */ ma_uint32 gainSmoothTimeInMilliseconds; /* When set to 0, gainSmoothTimeInFrames will be used. If both are set to 0, a default value will be used. */ ma_uint32 defaultVolumeSmoothTimeInPCMFrames; /* Defaults to 0. Controls the default amount of smoothing to apply to volume changes to sounds. High values means more smoothing at the expense of high latency (will take longer to reach the new volume). */ ma_uint32 preMixStackSizeInBytes; /* A stack is used for internal processing in the node graph. This allows you to configure the size of this stack. Smaller values will reduce the maximum depth of your node graph. You should rarely need to modify this. */ ma_allocation_callbacks allocationCallbacks; ma_bool32 noAutoStart; /* When set to true, requires an explicit call to ma_engine_start(). This is false by default, meaning the engine will be started automatically in ma_engine_init(). */ ma_bool32 noDevice; /* When set to true, don't create a default device. ma_engine_read_pcm_frames() can be called manually to read data. */ ma_mono_expansion_mode monoExpansionMode; /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */ ma_vfs* pResourceManagerVFS; /* A pointer to a pre-allocated VFS object to use with the resource manager. This is ignored if pResourceManager is not NULL. */ ma_engine_process_proc onProcess; /* Fired at the end of each call to ma_engine_read_pcm_frames(). For engine's that manage their own internal device (the default configuration), this will be fired from the audio thread, and you do not need to call ma_engine_read_pcm_frames() manually in order to trigger this. */ void* pProcessUserData; /* User data that's passed into onProcess. */ } ma_engine_config; MA_API ma_engine_config ma_engine_config_init(void); struct ma_engine { ma_node_graph nodeGraph; /* An engine is a node graph. It should be able to be plugged into any ma_node_graph API (with a cast) which means this must be the first member of this struct. */ #if !defined(MA_NO_RESOURCE_MANAGER) ma_resource_manager* pResourceManager; #endif #if !defined(MA_NO_DEVICE_IO) ma_device* pDevice; /* Optionally set via the config, otherwise allocated by the engine in ma_engine_init(). */ #endif ma_log* pLog; ma_uint32 sampleRate; ma_uint32 listenerCount; ma_spatializer_listener listeners[MA_ENGINE_MAX_LISTENERS]; ma_allocation_callbacks allocationCallbacks; ma_bool8 ownsResourceManager; ma_bool8 ownsDevice; ma_spinlock inlinedSoundLock; /* For synchronizing access to the inlined sound list. */ ma_sound_inlined* pInlinedSoundHead; /* The first inlined sound. Inlined sounds are tracked in a linked list. */ MA_ATOMIC(4, ma_uint32) inlinedSoundCount; /* The total number of allocated inlined sound objects. Used for debugging. */ ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. */ ma_uint32 defaultVolumeSmoothTimeInPCMFrames; ma_mono_expansion_mode monoExpansionMode; ma_engine_process_proc onProcess; void* pProcessUserData; }; MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine); MA_API void ma_engine_uninit(ma_engine* pEngine); MA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine); #if !defined(MA_NO_RESOURCE_MANAGER) MA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine); #endif MA_API ma_device* ma_engine_get_device(ma_engine* pEngine); MA_API ma_log* ma_engine_get_log(ma_engine* pEngine); MA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine); MA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine); MA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine); MA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime); MA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime); MA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine); /* Deprecated. Use ma_engine_get_time_in_pcm_frames(). Will be removed in version 0.12. */ MA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime); /* Deprecated. Use ma_engine_set_time_in_pcm_frames(). Will be removed in version 0.12. */ MA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine); MA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine); MA_API ma_result ma_engine_start(ma_engine* pEngine); MA_API ma_result ma_engine_stop(ma_engine* pEngine); MA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume); MA_API float ma_engine_get_volume(ma_engine* pEngine); MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB); MA_API float ma_engine_get_gain_db(ma_engine* pEngine); MA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine); MA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ); MA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z); MA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex); MA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled); MA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex); #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex); MA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup); /* Fire and forget. */ #endif #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound); MA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound); MA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound); #endif MA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound); MA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound); MA_API void ma_sound_uninit(ma_sound* pSound); MA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound); MA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound); MA_API ma_result ma_sound_start(ma_sound* pSound); MA_API ma_result ma_sound_stop(ma_sound* pSound); MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */ MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */ MA_API void ma_sound_set_volume(ma_sound* pSound, float volume); MA_API float ma_sound_get_volume(const ma_sound* pSound); MA_API void ma_sound_set_pan(ma_sound* pSound, float pan); MA_API float ma_sound_get_pan(const ma_sound* pSound); MA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode); MA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound); MA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch); MA_API float ma_sound_get_pitch(const ma_sound* pSound); MA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled); MA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound); MA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex); MA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound); MA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound); MA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound); MA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound); MA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound); MA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z); MA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound); MA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound); MA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning); MA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound); MA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff); MA_API float ma_sound_get_rolloff(const ma_sound* pSound); MA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain); MA_API float ma_sound_get_min_gain(const ma_sound* pSound); MA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain); MA_API float ma_sound_get_max_gain(const ma_sound* pSound); MA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance); MA_API float ma_sound_get_min_distance(const ma_sound* pSound); MA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance); MA_API float ma_sound_get_max_distance(const ma_sound* pSound); MA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor); MA_API float ma_sound_get_doppler_factor(const ma_sound* pSound); MA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor); MA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound); MA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds); MA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound); MA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds); MA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound); MA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound); MA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound); MA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping); MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound); MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound); MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */ MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds); /* Abstraction to ma_sound_seek_to_pcm_frame() */ MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor); MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength); MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor); MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength); MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData); MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup); MA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup); MA_API void ma_sound_group_uninit(ma_sound_group* pGroup); MA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup); MA_API ma_result ma_sound_group_start(ma_sound_group* pGroup); MA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup); MA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume); MA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan); MA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode); MA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch); MA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled); MA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex); MA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup); MA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup); MA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z); MA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel); MA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning); MA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff); MA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain); MA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain); MA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance); MA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance); MA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain); MA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain); MA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor); MA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor); MA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup); MA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames); MA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds); MA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup); MA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames); MA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds); MA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup); MA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup); #endif /* MA_NO_ENGINE */ /* END SECTION: miniaudio_engine.h */ #ifdef __cplusplus } #endif #endif /* miniaudio_h */ /* This is for preventing greying out of the implementation section. */ #if defined(Q_CREATOR_RUN) || defined(__INTELLISENSE__) || defined(__CDT_PARSER__) #define MINIAUDIO_IMPLEMENTATION #endif /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* IMPLEMENTATION ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION) #ifndef miniaudio_c #define miniaudio_c #include #include /* For INT_MAX */ #include /* sin(), etc. */ #include /* For malloc(), free(), wcstombs(). */ #include /* For memset() */ #include #include #if !defined(_MSC_VER) && !defined(__DMC__) #include /* For strcasecmp(). */ #include /* For wcslen(), wcsrtombs() */ #endif #ifdef _MSC_VER #include /* For _controlfp_s constants */ #endif #if defined(MA_WIN32) #include /* There's a possibility that WIN32_LEAN_AND_MEAN has been defined which will exclude some symbols such as STGM_READ and CLSCTL_ALL. We need to check these and define them ourselves if they're unavailable. */ #ifndef STGM_READ #define STGM_READ 0x00000000L #endif #ifndef CLSCTX_ALL #define CLSCTX_ALL 23 #endif /* IUnknown is used by both the WASAPI and DirectSound backends. It easier to just declare our version here. */ typedef struct ma_IUnknown ma_IUnknown; #endif #if !defined(MA_WIN32) #include #include /* select() (used for ma_sleep()). */ #include #endif #ifdef MA_NX #include /* For nanosleep() */ #endif #include /* For fstat(), etc. */ #ifdef MA_EMSCRIPTEN #include #endif /* Architecture Detection */ #if !defined(MA_64BIT) && !defined(MA_32BIT) #ifdef _WIN32 #ifdef _WIN64 #define MA_64BIT #else #define MA_32BIT #endif #endif #endif #if !defined(MA_64BIT) && !defined(MA_32BIT) #ifdef __GNUC__ #ifdef __LP64__ #define MA_64BIT #else #define MA_32BIT #endif #endif #endif #if !defined(MA_64BIT) && !defined(MA_32BIT) #include #if INTPTR_MAX == INT64_MAX #define MA_64BIT #else #define MA_32BIT #endif #endif #if defined(__arm__) || defined(_M_ARM) #define MA_ARM32 #endif #if defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) #define MA_ARM64 #endif #if defined(__x86_64__) || defined(_M_X64) #define MA_X64 #elif defined(__i386) || defined(_M_IX86) #define MA_X86 #elif defined(MA_ARM32) || defined(MA_ARM64) #define MA_ARM #endif /* Intrinsics Support */ #if (defined(MA_X64) || defined(MA_X86)) && !defined(__COSMOPOLITAN__) #if defined(_MSC_VER) && !defined(__clang__) /* MSVC. */ #if _MSC_VER >= 1400 && !defined(MA_NO_SSE2) /* 2005 */ #define MA_SUPPORT_SSE2 #endif /*#if _MSC_VER >= 1600 && !defined(MA_NO_AVX)*/ /* 2010 */ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if _MSC_VER >= 1700 && !defined(MA_NO_AVX2) /* 2012 */ #define MA_SUPPORT_AVX2 #endif #else /* Assume GNUC-style. */ #if defined(__SSE2__) && !defined(MA_NO_SSE2) #define MA_SUPPORT_SSE2 #endif /*#if defined(__AVX__) && !defined(MA_NO_AVX)*/ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if defined(__AVX2__) && !defined(MA_NO_AVX2) #define MA_SUPPORT_AVX2 #endif #endif /* If at this point we still haven't determined compiler support for the intrinsics just fall back to __has_include. */ #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include) #if !defined(MA_SUPPORT_SSE2) && !defined(MA_NO_SSE2) && __has_include() #define MA_SUPPORT_SSE2 #endif /*#if !defined(MA_SUPPORT_AVX) && !defined(MA_NO_AVX) && __has_include()*/ /* #define MA_SUPPORT_AVX*/ /*#endif*/ #if !defined(MA_SUPPORT_AVX2) && !defined(MA_NO_AVX2) && __has_include() #define MA_SUPPORT_AVX2 #endif #endif #if defined(MA_SUPPORT_AVX2) || defined(MA_SUPPORT_AVX) #include #elif defined(MA_SUPPORT_SSE2) #include #endif #endif #if defined(MA_ARM) #if !defined(MA_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) #define MA_SUPPORT_NEON #include #endif #endif /* Begin globally disabled warnings. */ #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4752) /* found Intel(R) Advanced Vector Extensions; consider using /arch:AVX */ #pragma warning(disable:4049) /* compiler limit : terminating line number emission */ #endif #if defined(MA_X64) || defined(MA_X86) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 #include static MA_INLINE void ma_cpuid(int info[4], int fid) { __cpuid(info, fid); } #else #define MA_NO_CPUID #endif #if _MSC_VER >= 1600 && (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219) static MA_INLINE unsigned __int64 ma_xgetbv(int reg) { return _xgetbv(reg); } #else #define MA_NO_XGETBV #endif #elif (defined(__GNUC__) || defined(__clang__)) && !defined(MA_ANDROID) static MA_INLINE void ma_cpuid(int info[4], int fid) { /* It looks like the -fPIC option uses the ebx register which GCC complains about. We can work around this by just using a different register, the specific register of which I'm letting the compiler decide on. The "k" prefix is used to specify a 32-bit register. The {...} syntax is for supporting different assembly dialects. What's basically happening is that we're saving and restoring the ebx register manually. */ #if defined(MA_X86) && defined(__PIC__) __asm__ __volatile__ ( "xchg{l} {%%}ebx, %k1;" "cpuid;" "xchg{l} {%%}ebx, %k1;" : "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #else __asm__ __volatile__ ( "cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #endif } static MA_INLINE ma_uint64 ma_xgetbv(int reg) { unsigned int hi; unsigned int lo; __asm__ __volatile__ ( "xgetbv" : "=a"(lo), "=d"(hi) : "c"(reg) ); return ((ma_uint64)hi << 32) | (ma_uint64)lo; } #else #define MA_NO_CPUID #define MA_NO_XGETBV #endif #else #define MA_NO_CPUID #define MA_NO_XGETBV #endif static MA_INLINE ma_bool32 ma_has_sse2(void) { #if defined(MA_SUPPORT_SSE2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_SSE2) #if defined(MA_X64) return MA_TRUE; /* 64-bit targets always support SSE2. */ #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__) return MA_TRUE; /* If the compiler is allowed to freely generate SSE2 code we can assume support. */ #else #if defined(MA_NO_CPUID) return MA_FALSE; #else int info[4]; ma_cpuid(info, 1); return (info[3] & (1 << 26)) != 0; #endif #endif #else return MA_FALSE; /* SSE2 is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #if 0 static MA_INLINE ma_bool32 ma_has_avx() { #if defined(MA_SUPPORT_AVX) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX) #if defined(_AVX_) || defined(__AVX__) return MA_TRUE; /* If the compiler is allowed to freely generate AVX code we can assume support. */ #else /* AVX requires both CPU and OS support. */ #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV) return MA_FALSE; #else int info[4]; ma_cpuid(info, 1); if (((info[2] & (1 << 27)) != 0) && ((info[2] & (1 << 28)) != 0)) { ma_uint64 xrc = ma_xgetbv(0); if ((xrc & 0x06) == 0x06) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } #endif #endif #else return MA_FALSE; /* AVX is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #endif static MA_INLINE ma_bool32 ma_has_avx2(void) { #if defined(MA_SUPPORT_AVX2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX2) #if defined(_AVX2_) || defined(__AVX2__) return MA_TRUE; /* If the compiler is allowed to freely generate AVX2 code we can assume support. */ #else /* AVX2 requires both CPU and OS support. */ #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV) return MA_FALSE; #else int info1[4]; int info7[4]; ma_cpuid(info1, 1); ma_cpuid(info7, 7); if (((info1[2] & (1 << 27)) != 0) && ((info7[1] & (1 << 5)) != 0)) { ma_uint64 xrc = ma_xgetbv(0); if ((xrc & 0x06) == 0x06) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } #endif #endif #else return MA_FALSE; /* AVX2 is only supported on x86 and x64 architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } static MA_INLINE ma_bool32 ma_has_neon(void) { #if defined(MA_SUPPORT_NEON) #if defined(MA_ARM) && !defined(MA_NO_NEON) #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) return MA_TRUE; /* If the compiler is allowed to freely generate NEON code we can assume support. */ #else /* TODO: Runtime check. */ return MA_FALSE; #endif #else return MA_FALSE; /* NEON is only supported on ARM architectures. */ #endif #else return MA_FALSE; /* No compiler support. */ #endif } #if defined(__has_builtin) #define MA_COMPILER_HAS_BUILTIN(x) __has_builtin(x) #else #define MA_COMPILER_HAS_BUILTIN(x) 0 #endif #ifndef MA_ASSUME #if MA_COMPILER_HAS_BUILTIN(__builtin_assume) #define MA_ASSUME(x) __builtin_assume(x) #elif MA_COMPILER_HAS_BUILTIN(__builtin_unreachable) #define MA_ASSUME(x) do { if (!(x)) __builtin_unreachable(); } while (0) #elif defined(_MSC_VER) #define MA_ASSUME(x) __assume(x) #else #define MA_ASSUME(x) (void)(x) #endif #endif #ifndef MA_RESTRICT #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) #define MA_RESTRICT __restrict #else #define MA_RESTRICT #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 #define MA_HAS_BYTESWAP16_INTRINSIC #define MA_HAS_BYTESWAP32_INTRINSIC #define MA_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap16) #define MA_HAS_BYTESWAP16_INTRINSIC #endif #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap32) #define MA_HAS_BYTESWAP32_INTRINSIC #endif #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap64) #define MA_HAS_BYTESWAP64_INTRINSIC #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_HAS_BYTESWAP32_INTRINSIC #define MA_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_HAS_BYTESWAP16_INTRINSIC #endif #endif static MA_INLINE ma_bool32 ma_is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE ma_bool32 ma_is_big_endian(void) { return !ma_is_little_endian(); } static MA_INLINE ma_uint32 ma_swap_endian_uint32(ma_uint32 n) { #ifdef MA_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT) /* <-- 64-bit inline assembly has not been tested, so disabling for now. */ /* Inline assembly optimized implementation for ARM. In my testing, GCC does not generate optimized code with __builtin_bswap32(). */ ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) /* <-- This is untested. If someone in the community could test this, that would be appreciated! */ #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } #if !defined(MA_EMSCRIPTEN) #ifdef MA_WIN32 static void ma_sleep__win32(ma_uint32 milliseconds) { Sleep((DWORD)milliseconds); } #endif #ifdef MA_POSIX static void ma_sleep__posix(ma_uint32 milliseconds) { #ifdef MA_EMSCRIPTEN (void)milliseconds; MA_ASSERT(MA_FALSE); /* The Emscripten build should never sleep. */ #else #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || defined(MA_NX) struct timespec ts; ts.tv_sec = milliseconds / 1000; ts.tv_nsec = milliseconds % 1000 * 1000000; nanosleep(&ts, NULL); #else struct timeval tv; tv.tv_sec = milliseconds / 1000; tv.tv_usec = milliseconds % 1000 * 1000; select(0, NULL, NULL, NULL, &tv); #endif #endif } #endif static MA_INLINE void ma_sleep(ma_uint32 milliseconds) { #ifdef MA_WIN32 ma_sleep__win32(milliseconds); #endif #ifdef MA_POSIX ma_sleep__posix(milliseconds); #endif } #endif static MA_INLINE void ma_yield(void) { #if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) /* x86/x64 */ #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__)) && !defined(__clang__) #if _MSC_VER >= 1400 _mm_pause(); #else #if defined(__DMC__) /* Digital Mars does not recognize the PAUSE opcode. Fall back to NOP. */ __asm nop; #else __asm pause; #endif #endif #else __asm__ __volatile__ ("pause"); #endif #elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(_M_ARM64) || (defined(_M_ARM) && _M_ARM >= 7) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) /* ARM */ #if defined(_MSC_VER) /* Apparently there is a __yield() intrinsic that's compatible with ARM, but I cannot find documentation for it nor can I find where it's declared. */ __yield(); #else __asm__ __volatile__ ("yield"); /* ARMv6K/ARMv6T2 and above. */ #endif #else /* Unknown or unsupported architecture. No-op. */ #endif } #define MA_MM_DENORMALS_ZERO_MASK 0x0040 #define MA_MM_FLUSH_ZERO_MASK 0x8000 static MA_INLINE unsigned int ma_disable_denormals(void) { unsigned int prevState; #if defined(_MSC_VER) { /* Older versions of Visual Studio don't support the "safe" versions of _controlfp_s(). I don't know which version of Visual Studio first added support for _controlfp_s(), but I do know that VC6 lacks support. _MSC_VER = 1200 is VC6, but if you get compilation errors on older versions of Visual Studio, let me know and I'll make the necessary adjustment. */ #if _MSC_VER <= 1200 { prevState = _statusfp(); _controlfp(prevState | _DN_FLUSH, _MCW_DN); } #else { unsigned int unused; _controlfp_s(&prevState, 0, 0); _controlfp_s(&unused, prevState | _DN_FLUSH, _MCW_DN); } #endif } #elif defined(MA_X86) || defined(MA_X64) { #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ { prevState = _mm_getcsr(); _mm_setcsr(prevState | MA_MM_DENORMALS_ZERO_MASK | MA_MM_FLUSH_ZERO_MASK); } #else { /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */ prevState = 0; } #endif } #else { /* Unknown or unsupported architecture. No-op. */ prevState = 0; } #endif return prevState; } static MA_INLINE void ma_restore_denormals(unsigned int prevState) { #if defined(_MSC_VER) { /* Older versions of Visual Studio do not support _controlfp_s(). See ma_disable_denormals(). */ #if _MSC_VER <= 1200 { _controlfp(prevState, _MCW_DN); } #else { unsigned int unused; _controlfp_s(&unused, prevState, _MCW_DN); } #endif } #elif defined(MA_X86) || defined(MA_X64) { #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ { _mm_setcsr(prevState); } #else { /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */ (void)prevState; } #endif } #else { /* Unknown or unsupported architecture. No-op. */ (void)prevState; } #endif } #ifdef MA_ANDROID #include int ma_android_sdk_version() { char sdkVersion[PROP_VALUE_MAX + 1] = {0, }; if (__system_property_get("ro.build.version.sdk", sdkVersion)) { return atoi(sdkVersion); } return 0; } #endif #ifndef MA_COINIT_VALUE #define MA_COINIT_VALUE 0 /* 0 = COINIT_MULTITHREADED */ #endif #ifndef MA_FLT_MAX #ifdef FLT_MAX #define MA_FLT_MAX FLT_MAX #else #define MA_FLT_MAX 3.402823466e+38F #endif #endif #ifndef MA_PI #define MA_PI 3.14159265358979323846264f #endif #ifndef MA_PI_D #define MA_PI_D 3.14159265358979323846264 #endif #ifndef MA_TAU #define MA_TAU 6.28318530717958647693f #endif #ifndef MA_TAU_D #define MA_TAU_D 6.28318530717958647693 #endif /* The default format when ma_format_unknown (0) is requested when initializing a device. */ #ifndef MA_DEFAULT_FORMAT #define MA_DEFAULT_FORMAT ma_format_f32 #endif /* The default channel count to use when 0 is used when initializing a device. */ #ifndef MA_DEFAULT_CHANNELS #define MA_DEFAULT_CHANNELS 2 #endif /* The default sample rate to use when 0 is used when initializing a device. */ #ifndef MA_DEFAULT_SAMPLE_RATE #define MA_DEFAULT_SAMPLE_RATE 48000 #endif /* Default periods when none is specified in ma_device_init(). More periods means more work on the CPU. */ #ifndef MA_DEFAULT_PERIODS #define MA_DEFAULT_PERIODS 3 #endif /* The default period size in milliseconds for low latency mode. */ #ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY #define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY 10 #endif /* The default buffer size in milliseconds for conservative mode. */ #ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE #define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE 100 #endif /* The default LPF filter order for linear resampling. Note that this is clamped to MA_MAX_FILTER_ORDER. */ #ifndef MA_DEFAULT_RESAMPLER_LPF_ORDER #if MA_MAX_FILTER_ORDER >= 4 #define MA_DEFAULT_RESAMPLER_LPF_ORDER 4 #else #define MA_DEFAULT_RESAMPLER_LPF_ORDER MA_MAX_FILTER_ORDER #endif #endif #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #endif /* Standard sample rates, in order of priority. */ static ma_uint32 g_maStandardSampleRatePriorities[] = { (ma_uint32)ma_standard_sample_rate_48000, (ma_uint32)ma_standard_sample_rate_44100, (ma_uint32)ma_standard_sample_rate_32000, (ma_uint32)ma_standard_sample_rate_24000, (ma_uint32)ma_standard_sample_rate_22050, (ma_uint32)ma_standard_sample_rate_88200, (ma_uint32)ma_standard_sample_rate_96000, (ma_uint32)ma_standard_sample_rate_176400, (ma_uint32)ma_standard_sample_rate_192000, (ma_uint32)ma_standard_sample_rate_16000, (ma_uint32)ma_standard_sample_rate_11025, (ma_uint32)ma_standard_sample_rate_8000, (ma_uint32)ma_standard_sample_rate_352800, (ma_uint32)ma_standard_sample_rate_384000 }; static MA_INLINE ma_bool32 ma_is_standard_sample_rate(ma_uint32 sampleRate) { ma_uint32 iSampleRate; for (iSampleRate = 0; iSampleRate < sizeof(g_maStandardSampleRatePriorities) / sizeof(g_maStandardSampleRatePriorities[0]); iSampleRate += 1) { if (g_maStandardSampleRatePriorities[iSampleRate] == sampleRate) { return MA_TRUE; } } /* Getting here means the sample rate is not supported. */ return MA_FALSE; } static ma_format g_maFormatPriorities[] = { ma_format_s16, /* Most common */ ma_format_f32, /*ma_format_s24_32,*/ /* Clean alignment */ ma_format_s32, ma_format_s24, /* Unclean alignment */ ma_format_u8 /* Low quality */ }; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif MA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_VERSION_MINOR; } if (pRevision) { *pRevision = MA_VERSION_REVISION; } } MA_API const char* ma_version_string(void) { return MA_VERSION_STRING; } /****************************************************************************** Standard Library Stuff ******************************************************************************/ #ifndef MA_ASSERT #define MA_ASSERT(condition) assert(condition) #endif #ifndef MA_MALLOC #define MA_MALLOC(sz) malloc((sz)) #endif #ifndef MA_REALLOC #define MA_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_FREE #define MA_FREE(p) free((p)) #endif static MA_INLINE void ma_zero_memory_default(void* p, size_t sz) { if (p == NULL) { MA_ASSERT(sz == 0); /* If this is triggered there's an error with the calling code. */ return; } if (sz > 0) { memset(p, 0, sz); } } #ifndef MA_ZERO_MEMORY #define MA_ZERO_MEMORY(p, sz) ma_zero_memory_default((p), (sz)) #endif #ifndef MA_COPY_MEMORY #define MA_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_MOVE_MEMORY #define MA_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #define MA_ZERO_OBJECT(p) MA_ZERO_MEMORY((p), sizeof(*(p))) #define ma_countof(x) (sizeof(x) / sizeof(x[0])) #define ma_max(x, y) (((x) > (y)) ? (x) : (y)) #define ma_min(x, y) (((x) < (y)) ? (x) : (y)) #define ma_abs(x) (((x) > 0) ? (x) : -(x)) #define ma_clamp(x, lo, hi) (ma_max(lo, ma_min(x, hi))) #define ma_offset_ptr(p, offset) (((ma_uint8*)(p)) + (offset)) #define ma_align(x, a) (((x) + ((a)-1)) & ~((a)-1)) #define ma_align_64(x) ma_align(x, 8) #define ma_buffer_frame_capacity(buffer, channels, format) (sizeof(buffer) / ma_get_bytes_per_sample(format) / (channels)) static MA_INLINE double ma_sind(double x) { /* TODO: Implement custom sin(x). */ return sin(x); } static MA_INLINE double ma_expd(double x) { /* TODO: Implement custom exp(x). */ return exp(x); } static MA_INLINE double ma_logd(double x) { /* TODO: Implement custom log(x). */ return log(x); } static MA_INLINE double ma_powd(double x, double y) { /* TODO: Implement custom pow(x, y). */ return pow(x, y); } static MA_INLINE double ma_sqrtd(double x) { /* TODO: Implement custom sqrt(x). */ return sqrt(x); } static MA_INLINE float ma_rsqrtf(float x) { #if defined(MA_SUPPORT_SSE2) && !defined(MA_NO_SSE2) && (defined(MA_X64) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)) { /* For SSE we can use RSQRTSS. This Stack Overflow post suggests that compilers don't necessarily generate optimal code when using intrinsics: https://web.archive.org/web/20221211012522/https://stackoverflow.com/questions/32687079/getting-fewest-instructions-for-rsqrtss-wrapper I'm going to do something similar here, but a bit simpler. */ #if defined(__GNUC__) || defined(__clang__) { float result; __asm__ __volatile__("rsqrtss %1, %0" : "=x"(result) : "x"(x)); return result; } #else { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ps1(x))); } #endif } #else { return 1 / (float)ma_sqrtd(x); } #endif } static MA_INLINE float ma_sinf(float x) { return (float)ma_sind((float)x); } static MA_INLINE double ma_cosd(double x) { return ma_sind((MA_PI_D*0.5) - x); } static MA_INLINE float ma_cosf(float x) { return (float)ma_cosd((float)x); } static MA_INLINE double ma_log10d(double x) { return ma_logd(x) * 0.43429448190325182765; } static MA_INLINE float ma_powf(float x, float y) { return (float)ma_powd((double)x, (double)y); } static MA_INLINE float ma_log10f(float x) { return (float)ma_log10d((double)x); } static MA_INLINE double ma_degrees_to_radians(double degrees) { return degrees * 0.01745329252; } static MA_INLINE double ma_radians_to_degrees(double radians) { return radians * 57.295779512896; } static MA_INLINE float ma_degrees_to_radians_f(float degrees) { return degrees * 0.01745329252f; } static MA_INLINE float ma_radians_to_degrees_f(float radians) { return radians * 57.295779512896f; } /* Return Values: 0: Success 22: EINVAL 34: ERANGE Not using symbolic constants for errors because I want to avoid #including errno.h These are marked as no-inline because of some bad code generation by Clang. None of these functions are used in any performance-critical code within miniaudio. */ MA_API MA_NO_INLINE int ma_strcpy_s(char* dst, size_t dstSizeInBytes, const char* src) { size_t i; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstSizeInBytes && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstSizeInBytes) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_wcscpy_s(wchar_t* dst, size_t dstCap, const wchar_t* src) { size_t i; if (dst == 0) { return 22; } if (dstCap == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstCap && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstCap) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count) { size_t maxcount; size_t i; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } maxcount = count; if (count == ((size_t)-1) || count >= dstSizeInBytes) { /* -1 = _TRUNCATE */ maxcount = dstSizeInBytes - 1; } for (i = 0; i < maxcount && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (src[i] == '\0' || i == count || count == ((size_t)-1)) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } MA_API MA_NO_INLINE int ma_strcat_s(char* dst, size_t dstSizeInBytes, const char* src) { char* dstorig; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } dstorig = dst; while (dstSizeInBytes > 0 && dst[0] != '\0') { dst += 1; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { return 22; /* Unterminated. */ } while (dstSizeInBytes > 0 && src[0] != '\0') { *dst++ = *src++; dstSizeInBytes -= 1; } if (dstSizeInBytes > 0) { dst[0] = '\0'; } else { dstorig[0] = '\0'; return 34; } return 0; } MA_API MA_NO_INLINE int ma_strncat_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count) { char* dstorig; if (dst == 0) { return 22; } if (dstSizeInBytes == 0) { return 34; } if (src == 0) { return 22; } dstorig = dst; while (dstSizeInBytes > 0 && dst[0] != '\0') { dst += 1; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { return 22; /* Unterminated. */ } if (count == ((size_t)-1)) { /* _TRUNCATE */ count = dstSizeInBytes - 1; } while (dstSizeInBytes > 0 && src[0] != '\0' && count > 0) { *dst++ = *src++; dstSizeInBytes -= 1; count -= 1; } if (dstSizeInBytes > 0) { dst[0] = '\0'; } else { dstorig[0] = '\0'; return 34; } return 0; } MA_API MA_NO_INLINE int ma_itoa_s(int value, char* dst, size_t dstSizeInBytes, int radix) { int sign; unsigned int valueU; char* dstEnd; if (dst == NULL || dstSizeInBytes == 0) { return 22; } if (radix < 2 || radix > 36) { dst[0] = '\0'; return 22; } sign = (value < 0 && radix == 10) ? -1 : 1; /* The negative sign is only used when the base is 10. */ if (value < 0) { valueU = -value; } else { valueU = value; } dstEnd = dst; do { int remainder = valueU % radix; if (remainder > 9) { *dstEnd = (char)((remainder - 10) + 'a'); } else { *dstEnd = (char)(remainder + '0'); } dstEnd += 1; dstSizeInBytes -= 1; valueU /= radix; } while (dstSizeInBytes > 0 && valueU > 0); if (dstSizeInBytes == 0) { dst[0] = '\0'; return 22; /* Ran out of room in the output buffer. */ } if (sign < 0) { *dstEnd++ = '-'; dstSizeInBytes -= 1; } if (dstSizeInBytes == 0) { dst[0] = '\0'; return 22; /* Ran out of room in the output buffer. */ } *dstEnd = '\0'; /* At this point the string will be reversed. */ dstEnd -= 1; while (dst < dstEnd) { char temp = *dst; *dst = *dstEnd; *dstEnd = temp; dst += 1; dstEnd -= 1; } return 0; } MA_API MA_NO_INLINE int ma_strcmp(const char* str1, const char* str2) { if (str1 == str2) return 0; /* These checks differ from the standard implementation. It's not important, but I prefer it just for sanity. */ if (str1 == NULL) return -1; if (str2 == NULL) return 1; for (;;) { if (str1[0] == '\0') { break; } if (str1[0] != str2[0]) { break; } str1 += 1; str2 += 1; } return ((unsigned char*)str1)[0] - ((unsigned char*)str2)[0]; } MA_API MA_NO_INLINE int ma_strappend(char* dst, size_t dstSize, const char* srcA, const char* srcB) { int result; result = ma_strncpy_s(dst, dstSize, srcA, (size_t)-1); if (result != 0) { return result; } result = ma_strncat_s(dst, dstSize, srcB, (size_t)-1); if (result != 0) { return result; } return result; } MA_API MA_NO_INLINE char* ma_copy_string(const char* src, const ma_allocation_callbacks* pAllocationCallbacks) { size_t sz; char* dst; if (src == NULL) { return NULL; } sz = strlen(src)+1; dst = (char*)ma_malloc(sz, pAllocationCallbacks); if (dst == NULL) { return NULL; } ma_strcpy_s(dst, sz, src); return dst; } MA_API MA_NO_INLINE wchar_t* ma_copy_string_w(const wchar_t* src, const ma_allocation_callbacks* pAllocationCallbacks) { size_t sz = wcslen(src)+1; wchar_t* dst = (wchar_t*)ma_malloc(sz * sizeof(*dst), pAllocationCallbacks); if (dst == NULL) { return NULL; } ma_wcscpy_s(dst, sz, src); return dst; } #include static ma_result ma_result_from_errno(int e) { if (e == 0) { return MA_SUCCESS; } #ifdef EPERM else if (e == EPERM) { return MA_INVALID_OPERATION; } #endif #ifdef ENOENT else if (e == ENOENT) { return MA_DOES_NOT_EXIST; } #endif #ifdef ESRCH else if (e == ESRCH) { return MA_DOES_NOT_EXIST; } #endif #ifdef EINTR else if (e == EINTR) { return MA_INTERRUPT; } #endif #ifdef EIO else if (e == EIO) { return MA_IO_ERROR; } #endif #ifdef ENXIO else if (e == ENXIO) { return MA_DOES_NOT_EXIST; } #endif #ifdef E2BIG else if (e == E2BIG) { return MA_INVALID_ARGS; } #endif #ifdef ENOEXEC else if (e == ENOEXEC) { return MA_INVALID_FILE; } #endif #ifdef EBADF else if (e == EBADF) { return MA_INVALID_FILE; } #endif #ifdef ECHILD else if (e == ECHILD) { return MA_ERROR; } #endif #ifdef EAGAIN else if (e == EAGAIN) { return MA_UNAVAILABLE; } #endif #ifdef ENOMEM else if (e == ENOMEM) { return MA_OUT_OF_MEMORY; } #endif #ifdef EACCES else if (e == EACCES) { return MA_ACCESS_DENIED; } #endif #ifdef EFAULT else if (e == EFAULT) { return MA_BAD_ADDRESS; } #endif #ifdef ENOTBLK else if (e == ENOTBLK) { return MA_ERROR; } #endif #ifdef EBUSY else if (e == EBUSY) { return MA_BUSY; } #endif #ifdef EEXIST else if (e == EEXIST) { return MA_ALREADY_EXISTS; } #endif #ifdef EXDEV else if (e == EXDEV) { return MA_ERROR; } #endif #ifdef ENODEV else if (e == ENODEV) { return MA_DOES_NOT_EXIST; } #endif #ifdef ENOTDIR else if (e == ENOTDIR) { return MA_NOT_DIRECTORY; } #endif #ifdef EISDIR else if (e == EISDIR) { return MA_IS_DIRECTORY; } #endif #ifdef EINVAL else if (e == EINVAL) { return MA_INVALID_ARGS; } #endif #ifdef ENFILE else if (e == ENFILE) { return MA_TOO_MANY_OPEN_FILES; } #endif #ifdef EMFILE else if (e == EMFILE) { return MA_TOO_MANY_OPEN_FILES; } #endif #ifdef ENOTTY else if (e == ENOTTY) { return MA_INVALID_OPERATION; } #endif #ifdef ETXTBSY else if (e == ETXTBSY) { return MA_BUSY; } #endif #ifdef EFBIG else if (e == EFBIG) { return MA_TOO_BIG; } #endif #ifdef ENOSPC else if (e == ENOSPC) { return MA_NO_SPACE; } #endif #ifdef ESPIPE else if (e == ESPIPE) { return MA_BAD_SEEK; } #endif #ifdef EROFS else if (e == EROFS) { return MA_ACCESS_DENIED; } #endif #ifdef EMLINK else if (e == EMLINK) { return MA_TOO_MANY_LINKS; } #endif #ifdef EPIPE else if (e == EPIPE) { return MA_BAD_PIPE; } #endif #ifdef EDOM else if (e == EDOM) { return MA_OUT_OF_RANGE; } #endif #ifdef ERANGE else if (e == ERANGE) { return MA_OUT_OF_RANGE; } #endif #ifdef EDEADLK else if (e == EDEADLK) { return MA_DEADLOCK; } #endif #ifdef ENAMETOOLONG else if (e == ENAMETOOLONG) { return MA_PATH_TOO_LONG; } #endif #ifdef ENOLCK else if (e == ENOLCK) { return MA_ERROR; } #endif #ifdef ENOSYS else if (e == ENOSYS) { return MA_NOT_IMPLEMENTED; } #endif #ifdef ENOTEMPTY else if (e == ENOTEMPTY) { return MA_DIRECTORY_NOT_EMPTY; } #endif #ifdef ELOOP else if (e == ELOOP) { return MA_TOO_MANY_LINKS; } #endif #ifdef ENOMSG else if (e == ENOMSG) { return MA_NO_MESSAGE; } #endif #ifdef EIDRM else if (e == EIDRM) { return MA_ERROR; } #endif #ifdef ECHRNG else if (e == ECHRNG) { return MA_ERROR; } #endif #ifdef EL2NSYNC else if (e == EL2NSYNC) { return MA_ERROR; } #endif #ifdef EL3HLT else if (e == EL3HLT) { return MA_ERROR; } #endif #ifdef EL3RST else if (e == EL3RST) { return MA_ERROR; } #endif #ifdef ELNRNG else if (e == ELNRNG) { return MA_OUT_OF_RANGE; } #endif #ifdef EUNATCH else if (e == EUNATCH) { return MA_ERROR; } #endif #ifdef ENOCSI else if (e == ENOCSI) { return MA_ERROR; } #endif #ifdef EL2HLT else if (e == EL2HLT) { return MA_ERROR; } #endif #ifdef EBADE else if (e == EBADE) { return MA_ERROR; } #endif #ifdef EBADR else if (e == EBADR) { return MA_ERROR; } #endif #ifdef EXFULL else if (e == EXFULL) { return MA_ERROR; } #endif #ifdef ENOANO else if (e == ENOANO) { return MA_ERROR; } #endif #ifdef EBADRQC else if (e == EBADRQC) { return MA_ERROR; } #endif #ifdef EBADSLT else if (e == EBADSLT) { return MA_ERROR; } #endif #ifdef EBFONT else if (e == EBFONT) { return MA_INVALID_FILE; } #endif #ifdef ENOSTR else if (e == ENOSTR) { return MA_ERROR; } #endif #ifdef ENODATA else if (e == ENODATA) { return MA_NO_DATA_AVAILABLE; } #endif #ifdef ETIME else if (e == ETIME) { return MA_TIMEOUT; } #endif #ifdef ENOSR else if (e == ENOSR) { return MA_NO_DATA_AVAILABLE; } #endif #ifdef ENONET else if (e == ENONET) { return MA_NO_NETWORK; } #endif #ifdef ENOPKG else if (e == ENOPKG) { return MA_ERROR; } #endif #ifdef EREMOTE else if (e == EREMOTE) { return MA_ERROR; } #endif #ifdef ENOLINK else if (e == ENOLINK) { return MA_ERROR; } #endif #ifdef EADV else if (e == EADV) { return MA_ERROR; } #endif #ifdef ESRMNT else if (e == ESRMNT) { return MA_ERROR; } #endif #ifdef ECOMM else if (e == ECOMM) { return MA_ERROR; } #endif #ifdef EPROTO else if (e == EPROTO) { return MA_ERROR; } #endif #ifdef EMULTIHOP else if (e == EMULTIHOP) { return MA_ERROR; } #endif #ifdef EDOTDOT else if (e == EDOTDOT) { return MA_ERROR; } #endif #ifdef EBADMSG else if (e == EBADMSG) { return MA_BAD_MESSAGE; } #endif #ifdef EOVERFLOW else if (e == EOVERFLOW) { return MA_TOO_BIG; } #endif #ifdef ENOTUNIQ else if (e == ENOTUNIQ) { return MA_NOT_UNIQUE; } #endif #ifdef EBADFD else if (e == EBADFD) { return MA_ERROR; } #endif #ifdef EREMCHG else if (e == EREMCHG) { return MA_ERROR; } #endif #ifdef ELIBACC else if (e == ELIBACC) { return MA_ACCESS_DENIED; } #endif #ifdef ELIBBAD else if (e == ELIBBAD) { return MA_INVALID_FILE; } #endif #ifdef ELIBSCN else if (e == ELIBSCN) { return MA_INVALID_FILE; } #endif #ifdef ELIBMAX else if (e == ELIBMAX) { return MA_ERROR; } #endif #ifdef ELIBEXEC else if (e == ELIBEXEC) { return MA_ERROR; } #endif #ifdef EILSEQ else if (e == EILSEQ) { return MA_INVALID_DATA; } #endif #ifdef ERESTART else if (e == ERESTART) { return MA_ERROR; } #endif #ifdef ESTRPIPE else if (e == ESTRPIPE) { return MA_ERROR; } #endif #ifdef EUSERS else if (e == EUSERS) { return MA_ERROR; } #endif #ifdef ENOTSOCK else if (e == ENOTSOCK) { return MA_NOT_SOCKET; } #endif #ifdef EDESTADDRREQ else if (e == EDESTADDRREQ) { return MA_NO_ADDRESS; } #endif #ifdef EMSGSIZE else if (e == EMSGSIZE) { return MA_TOO_BIG; } #endif #ifdef EPROTOTYPE else if (e == EPROTOTYPE) { return MA_BAD_PROTOCOL; } #endif #ifdef ENOPROTOOPT else if (e == ENOPROTOOPT) { return MA_PROTOCOL_UNAVAILABLE; } #endif #ifdef EPROTONOSUPPORT else if (e == EPROTONOSUPPORT) { return MA_PROTOCOL_NOT_SUPPORTED; } #endif #ifdef ESOCKTNOSUPPORT else if (e == ESOCKTNOSUPPORT) { return MA_SOCKET_NOT_SUPPORTED; } #endif #ifdef EOPNOTSUPP else if (e == EOPNOTSUPP) { return MA_INVALID_OPERATION; } #endif #ifdef EPFNOSUPPORT else if (e == EPFNOSUPPORT) { return MA_PROTOCOL_FAMILY_NOT_SUPPORTED; } #endif #ifdef EAFNOSUPPORT else if (e == EAFNOSUPPORT) { return MA_ADDRESS_FAMILY_NOT_SUPPORTED; } #endif #ifdef EADDRINUSE else if (e == EADDRINUSE) { return MA_ALREADY_IN_USE; } #endif #ifdef EADDRNOTAVAIL else if (e == EADDRNOTAVAIL) { return MA_ERROR; } #endif #ifdef ENETDOWN else if (e == ENETDOWN) { return MA_NO_NETWORK; } #endif #ifdef ENETUNREACH else if (e == ENETUNREACH) { return MA_NO_NETWORK; } #endif #ifdef ENETRESET else if (e == ENETRESET) { return MA_NO_NETWORK; } #endif #ifdef ECONNABORTED else if (e == ECONNABORTED) { return MA_NO_NETWORK; } #endif #ifdef ECONNRESET else if (e == ECONNRESET) { return MA_CONNECTION_RESET; } #endif #ifdef ENOBUFS else if (e == ENOBUFS) { return MA_NO_SPACE; } #endif #ifdef EISCONN else if (e == EISCONN) { return MA_ALREADY_CONNECTED; } #endif #ifdef ENOTCONN else if (e == ENOTCONN) { return MA_NOT_CONNECTED; } #endif #ifdef ESHUTDOWN else if (e == ESHUTDOWN) { return MA_ERROR; } #endif #ifdef ETOOMANYREFS else if (e == ETOOMANYREFS) { return MA_ERROR; } #endif #ifdef ETIMEDOUT else if (e == ETIMEDOUT) { return MA_TIMEOUT; } #endif #ifdef ECONNREFUSED else if (e == ECONNREFUSED) { return MA_CONNECTION_REFUSED; } #endif #ifdef EHOSTDOWN else if (e == EHOSTDOWN) { return MA_NO_HOST; } #endif #ifdef EHOSTUNREACH else if (e == EHOSTUNREACH) { return MA_NO_HOST; } #endif #ifdef EALREADY else if (e == EALREADY) { return MA_IN_PROGRESS; } #endif #ifdef EINPROGRESS else if (e == EINPROGRESS) { return MA_IN_PROGRESS; } #endif #ifdef ESTALE else if (e == ESTALE) { return MA_INVALID_FILE; } #endif #ifdef EUCLEAN else if (e == EUCLEAN) { return MA_ERROR; } #endif #ifdef ENOTNAM else if (e == ENOTNAM) { return MA_ERROR; } #endif #ifdef ENAVAIL else if (e == ENAVAIL) { return MA_ERROR; } #endif #ifdef EISNAM else if (e == EISNAM) { return MA_ERROR; } #endif #ifdef EREMOTEIO else if (e == EREMOTEIO) { return MA_IO_ERROR; } #endif #ifdef EDQUOT else if (e == EDQUOT) { return MA_NO_SPACE; } #endif #ifdef ENOMEDIUM else if (e == ENOMEDIUM) { return MA_DOES_NOT_EXIST; } #endif #ifdef EMEDIUMTYPE else if (e == EMEDIUMTYPE) { return MA_ERROR; } #endif #ifdef ECANCELED else if (e == ECANCELED) { return MA_CANCELLED; } #endif #ifdef ENOKEY else if (e == ENOKEY) { return MA_ERROR; } #endif #ifdef EKEYEXPIRED else if (e == EKEYEXPIRED) { return MA_ERROR; } #endif #ifdef EKEYREVOKED else if (e == EKEYREVOKED) { return MA_ERROR; } #endif #ifdef EKEYREJECTED else if (e == EKEYREJECTED) { return MA_ERROR; } #endif #ifdef EOWNERDEAD else if (e == EOWNERDEAD) { return MA_ERROR; } #endif #ifdef ENOTRECOVERABLE else if (e == ENOTRECOVERABLE) { return MA_ERROR; } #endif #ifdef ERFKILL else if (e == ERFKILL) { return MA_ERROR; } #endif #ifdef EHWPOISON else if (e == EHWPOISON) { return MA_ERROR; } #endif else { return MA_ERROR; } } MA_API ma_result ma_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return MA_INVALID_ARGS; } #if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return ma_result_from_errno(err); } #else #if defined(_WIN32) || defined(__APPLE__) *ppFile = fopen(pFilePath, pOpenMode); #else #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE) *ppFile = fopen64(pFilePath, pOpenMode); #else *ppFile = fopen(pFilePath, pOpenMode); #endif #endif if (*ppFile == NULL) { ma_result result = ma_result_from_errno(errno); if (result == MA_SUCCESS) { result = MA_ERROR; /* Just a safety check to make sure we never ever return success when pFile == NULL. */ } return result; } #endif return MA_SUCCESS; } /* _wfopen() isn't always available in all compilation environments. * Windows only. * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define MA_HAS_WFOPEN #endif #endif MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const ma_allocation_callbacks* pAllocationCallbacks) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return MA_INVALID_ARGS; } #if defined(MA_HAS_WFOPEN) { /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return ma_result_from_errno(err); } #else *ppFile = _wfopen(pFilePath, pOpenMode); if (*ppFile == NULL) { return ma_result_from_errno(errno); } #endif (void)pAllocationCallbacks; } #else /* Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility. */ { mbstate_t mbs; size_t lenMB; const wchar_t* pFilePathTemp = pFilePath; char* pFilePathMB = NULL; char pOpenModeMB[32] = {0}; /* Get the length first. */ MA_ZERO_OBJECT(&mbs); lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs); if (lenMB == (size_t)-1) { return ma_result_from_errno(errno); } pFilePathMB = (char*)ma_malloc(lenMB + 1, pAllocationCallbacks); if (pFilePathMB == NULL) { return MA_OUT_OF_MEMORY; } pFilePathTemp = pFilePath; MA_ZERO_OBJECT(&mbs); wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs); /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */ { size_t i = 0; for (;;) { if (pOpenMode[i] == 0) { pOpenModeMB[i] = '\0'; break; } pOpenModeMB[i] = (char)pOpenMode[i]; i += 1; } } *ppFile = fopen(pFilePathMB, pOpenModeMB); ma_free(pFilePathMB, pAllocationCallbacks); } if (*ppFile == NULL) { return MA_ERROR; } #endif return MA_SUCCESS; } static MA_INLINE void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes) { #if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX MA_COPY_MEMORY(dst, src, (size_t)sizeInBytes); #else while (sizeInBytes > 0) { ma_uint64 bytesToCopyNow = sizeInBytes; if (bytesToCopyNow > MA_SIZE_MAX) { bytesToCopyNow = MA_SIZE_MAX; } MA_COPY_MEMORY(dst, src, (size_t)bytesToCopyNow); /* Safe cast to size_t. */ sizeInBytes -= bytesToCopyNow; dst = ( void*)(( ma_uint8*)dst + bytesToCopyNow); src = (const void*)((const ma_uint8*)src + bytesToCopyNow); } #endif } static MA_INLINE void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes) { #if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX MA_ZERO_MEMORY(dst, (size_t)sizeInBytes); #else while (sizeInBytes > 0) { ma_uint64 bytesToZeroNow = sizeInBytes; if (bytesToZeroNow > MA_SIZE_MAX) { bytesToZeroNow = MA_SIZE_MAX; } MA_ZERO_MEMORY(dst, (size_t)bytesToZeroNow); /* Safe cast to size_t. */ sizeInBytes -= bytesToZeroNow; dst = (void*)((ma_uint8*)dst + bytesToZeroNow); } #endif } /* Thanks to good old Bit Twiddling Hacks for this one: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 */ static MA_INLINE unsigned int ma_next_power_of_2(unsigned int x) { x--; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; x++; return x; } static MA_INLINE unsigned int ma_prev_power_of_2(unsigned int x) { return ma_next_power_of_2(x) >> 1; } static MA_INLINE unsigned int ma_round_to_power_of_2(unsigned int x) { unsigned int prev = ma_prev_power_of_2(x); unsigned int next = ma_next_power_of_2(x); if ((next - x) > (x - prev)) { return prev; } else { return next; } } static MA_INLINE unsigned int ma_count_set_bits(unsigned int x) { unsigned int count = 0; while (x != 0) { if (x & 1) { count += 1; } x = x >> 1; } return count; } /************************************************************************************************************************************************************** Allocation Callbacks **************************************************************************************************************************************************************/ static void* ma__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_MALLOC(sz); } static void* ma__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_REALLOC(p, sz); } static void ma__free_default(void* p, void* pUserData) { (void)pUserData; MA_FREE(p); } static ma_allocation_callbacks ma_allocation_callbacks_init_default(void) { ma_allocation_callbacks callbacks; callbacks.pUserData = NULL; callbacks.onMalloc = ma__malloc_default; callbacks.onRealloc = ma__realloc_default; callbacks.onFree = ma__free_default; return callbacks; } static ma_result ma_allocation_callbacks_init_copy(ma_allocation_callbacks* pDst, const ma_allocation_callbacks* pSrc) { if (pDst == NULL) { return MA_INVALID_ARGS; } if (pSrc == NULL) { *pDst = ma_allocation_callbacks_init_default(); } else { if (pSrc->pUserData == NULL && pSrc->onFree == NULL && pSrc->onMalloc == NULL && pSrc->onRealloc == NULL) { *pDst = ma_allocation_callbacks_init_default(); } else { if (pSrc->onFree == NULL || (pSrc->onMalloc == NULL && pSrc->onRealloc == NULL)) { return MA_INVALID_ARGS; /* Invalid allocation callbacks. */ } else { *pDst = *pSrc; } } } return MA_SUCCESS; } /************************************************************************************************************************************************************** Logging **************************************************************************************************************************************************************/ MA_API const char* ma_log_level_to_string(ma_uint32 logLevel) { switch (logLevel) { case MA_LOG_LEVEL_DEBUG: return "DEBUG"; case MA_LOG_LEVEL_INFO: return "INFO"; case MA_LOG_LEVEL_WARNING: return "WARNING"; case MA_LOG_LEVEL_ERROR: return "ERROR"; default: return "ERROR"; } } #if defined(MA_DEBUG_OUTPUT) #if defined(MA_ANDROID) #include #endif /* Customize this to use a specific tag in __android_log_print() for debug output messages. */ #ifndef MA_ANDROID_LOG_TAG #define MA_ANDROID_LOG_TAG "miniaudio" #endif void ma_log_callback_debug(void* pUserData, ma_uint32 level, const char* pMessage) { (void)pUserData; /* Special handling for some platforms. */ #if defined(MA_ANDROID) { /* Android. */ __android_log_print(ANDROID_LOG_DEBUG, MA_ANDROID_LOG_TAG, "%s: %s", ma_log_level_to_string(level), pMessage); } #else { /* Everything else. */ printf("%s: %s", ma_log_level_to_string(level), pMessage); } #endif } #endif MA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData) { ma_log_callback callback; MA_ZERO_OBJECT(&callback); callback.onLog = onLog; callback.pUserData = pUserData; return callback; } MA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog) { if (pLog == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLog); ma_allocation_callbacks_init_copy(&pLog->allocationCallbacks, pAllocationCallbacks); /* We need a mutex for thread safety. */ #ifndef MA_NO_THREADING { ma_result result = ma_mutex_init(&pLog->lock); if (result != MA_SUCCESS) { return result; } } #endif /* If we're using debug output, enable it. */ #if defined(MA_DEBUG_OUTPUT) { ma_log_register_callback(pLog, ma_log_callback_init(ma_log_callback_debug, NULL)); /* Doesn't really matter if this fails. */ } #endif return MA_SUCCESS; } MA_API void ma_log_uninit(ma_log* pLog) { if (pLog == NULL) { return; } #ifndef MA_NO_THREADING ma_mutex_uninit(&pLog->lock); #endif } static void ma_log_lock(ma_log* pLog) { #ifndef MA_NO_THREADING ma_mutex_lock(&pLog->lock); #else (void)pLog; #endif } static void ma_log_unlock(ma_log* pLog) { #ifndef MA_NO_THREADING ma_mutex_unlock(&pLog->lock); #else (void)pLog; #endif } MA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback) { ma_result result = MA_SUCCESS; if (pLog == NULL || callback.onLog == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { if (pLog->callbackCount == ma_countof(pLog->callbacks)) { result = MA_OUT_OF_MEMORY; /* Reached the maximum allowed log callbacks. */ } else { pLog->callbacks[pLog->callbackCount] = callback; pLog->callbackCount += 1; } } ma_log_unlock(pLog); return result; } MA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback) { if (pLog == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { ma_uint32 iLog; for (iLog = 0; iLog < pLog->callbackCount; ) { if (pLog->callbacks[iLog].onLog == callback.onLog) { /* Found. Move everything down a slot. */ ma_uint32 jLog; for (jLog = iLog; jLog < pLog->callbackCount-1; jLog += 1) { pLog->callbacks[jLog] = pLog->callbacks[jLog + 1]; } pLog->callbackCount -= 1; } else { /* Not found. */ iLog += 1; } } } ma_log_unlock(pLog); return MA_SUCCESS; } MA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage) { if (pLog == NULL || pMessage == NULL) { return MA_INVALID_ARGS; } ma_log_lock(pLog); { ma_uint32 iLog; for (iLog = 0; iLog < pLog->callbackCount; iLog += 1) { if (pLog->callbacks[iLog].onLog) { pLog->callbacks[iLog].onLog(pLog->callbacks[iLog].pUserData, level, pMessage); } } } ma_log_unlock(pLog); return MA_SUCCESS; } /* We need to emulate _vscprintf() for the VC6 build. This can be more efficient, but since it's only VC6, and it's just a logging function, I'm happy to keep this simple. In the VC6 build we can implement this in terms of _vsnprintf(). */ #if defined(_MSC_VER) && _MSC_VER < 1900 static int ma_vscprintf(const ma_allocation_callbacks* pAllocationCallbacks, const char* format, va_list args) { #if _MSC_VER > 1200 return _vscprintf(format, args); #else int result; char* pTempBuffer = NULL; size_t tempBufferCap = 1024; if (format == NULL) { errno = EINVAL; return -1; } for (;;) { char* pNewTempBuffer = (char*)ma_realloc(pTempBuffer, tempBufferCap, pAllocationCallbacks); if (pNewTempBuffer == NULL) { ma_free(pTempBuffer, pAllocationCallbacks); errno = ENOMEM; return -1; /* Out of memory. */ } pTempBuffer = pNewTempBuffer; result = _vsnprintf(pTempBuffer, tempBufferCap, format, args); ma_free(pTempBuffer, NULL); if (result != -1) { break; /* Got it. */ } /* Buffer wasn't big enough. Ideally it'd be nice to use an error code to know the reason for sure, but this is reliable enough. */ tempBufferCap *= 2; } return result; #endif } #endif MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args) { if (pLog == NULL || pFormat == NULL) { return MA_INVALID_ARGS; } #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || ((!defined(_MSC_VER) || _MSC_VER >= 1900) && !defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) || (defined(__cplusplus) && __cplusplus >= 201103L) { ma_result result; int length; char pFormattedMessageStack[1024]; char* pFormattedMessageHeap = NULL; /* First try formatting into our fixed sized stack allocated buffer. If this is too small we'll fallback to a heap allocation. */ length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args); if (length < 0) { return MA_INVALID_OPERATION; /* An error occurred when trying to convert the buffer. */ } if ((size_t)length < sizeof(pFormattedMessageStack)) { /* The string was written to the stack. */ result = ma_log_post(pLog, level, pFormattedMessageStack); } else { /* The stack buffer was too small, try the heap. */ pFormattedMessageHeap = (char*)ma_malloc(length + 1, &pLog->allocationCallbacks); if (pFormattedMessageHeap == NULL) { return MA_OUT_OF_MEMORY; } length = vsnprintf(pFormattedMessageHeap, length + 1, pFormat, args); if (length < 0) { ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks); return MA_INVALID_OPERATION; } result = ma_log_post(pLog, level, pFormattedMessageHeap); ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks); } return result; } #else { /* Without snprintf() we need to first measure the string and then heap allocate it. I'm only aware of Visual Studio having support for this without snprintf(), so we'll need to restrict this branch to Visual Studio. For other compilers we need to just not support formatted logging because I don't want the security risk of overflowing a fixed sized stack allocated buffer. */ #if defined(_MSC_VER) && _MSC_VER >= 1200 /* 1200 = VC6 */ { ma_result result; int formattedLen; char* pFormattedMessage = NULL; va_list args2; #if _MSC_VER >= 1800 { va_copy(args2, args); } #else { args2 = args; } #endif formattedLen = ma_vscprintf(&pLog->allocationCallbacks, pFormat, args2); va_end(args2); if (formattedLen <= 0) { return MA_INVALID_OPERATION; } pFormattedMessage = (char*)ma_malloc(formattedLen + 1, &pLog->allocationCallbacks); if (pFormattedMessage == NULL) { return MA_OUT_OF_MEMORY; } /* We'll get errors on newer versions of Visual Studio if we try to use vsprintf(). */ #if _MSC_VER >= 1400 /* 1400 = Visual Studio 2005 */ { vsprintf_s(pFormattedMessage, formattedLen + 1, pFormat, args); } #else { vsprintf(pFormattedMessage, pFormat, args); } #endif result = ma_log_post(pLog, level, pFormattedMessage); ma_free(pFormattedMessage, &pLog->allocationCallbacks); return result; } #else { /* Can't do anything because we don't have a safe way of to emulate vsnprintf() without a manual solution. */ (void)level; (void)args; return MA_INVALID_OPERATION; } #endif } #endif } MA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...) { ma_result result; va_list args; if (pLog == NULL || pFormat == NULL) { return MA_INVALID_ARGS; } va_start(args, pFormat); { result = ma_log_postv(pLog, level, pFormat, args); } va_end(args); return result; } static MA_INLINE ma_uint8 ma_clip_u8(ma_int32 x) { return (ma_uint8)(ma_clamp(x, -128, 127) + 128); } static MA_INLINE ma_int16 ma_clip_s16(ma_int32 x) { return (ma_int16)ma_clamp(x, -32768, 32767); } static MA_INLINE ma_int64 ma_clip_s24(ma_int64 x) { return (ma_int64)ma_clamp(x, -8388608, 8388607); } static MA_INLINE ma_int32 ma_clip_s32(ma_int64 x) { /* This dance is to silence warnings with -std=c89. A good compiler should be able to optimize this away. */ ma_int64 clipMin; ma_int64 clipMax; clipMin = -((ma_int64)2147483647 + 1); clipMax = (ma_int64)2147483647; return (ma_int32)ma_clamp(x, clipMin, clipMax); } static MA_INLINE float ma_clip_f32(float x) { if (x < -1) return -1; if (x > +1) return +1; return x; } static MA_INLINE float ma_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static MA_INLINE float ma_mix_f32_fast(float x, float y, float a) { float r0 = (y - x); float r1 = r0*a; return x + r1; /*return x + (y - x)*a;*/ } #if defined(MA_SUPPORT_SSE2) static MA_INLINE __m128 ma_mix_f32_fast__sse2(__m128 x, __m128 y, __m128 a) { return _mm_add_ps(x, _mm_mul_ps(_mm_sub_ps(y, x), a)); } #endif #if defined(MA_SUPPORT_AVX2) static MA_INLINE __m256 ma_mix_f32_fast__avx2(__m256 x, __m256 y, __m256 a) { return _mm256_add_ps(x, _mm256_mul_ps(_mm256_sub_ps(y, x), a)); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE float32x4_t ma_mix_f32_fast__neon(float32x4_t x, float32x4_t y, float32x4_t a) { return vaddq_f32(x, vmulq_f32(vsubq_f32(y, x), a)); } #endif static MA_INLINE double ma_mix_f64(double x, double y, double a) { return x*(1-a) + y*a; } static MA_INLINE double ma_mix_f64_fast(double x, double y, double a) { return x + (y - x)*a; } static MA_INLINE float ma_scale_to_range_f32(float x, float lo, float hi) { return lo + x*(hi-lo); } /* Greatest common factor using Euclid's algorithm iteratively. */ static MA_INLINE ma_uint32 ma_gcf_u32(ma_uint32 a, ma_uint32 b) { for (;;) { if (b == 0) { break; } else { ma_uint32 t = a; a = b; b = t % a; } } return a; } static ma_uint32 ma_ffs_32(ma_uint32 x) { ma_uint32 i; /* Just a naive implementation just to get things working for now. Will optimize this later. */ for (i = 0; i < 32; i += 1) { if ((x & (1U << i)) != 0) { return i; } } return i; } static MA_INLINE ma_int16 ma_float_to_fixed_16(float x) { return (ma_int16)(x * (1 << 8)); } /* Random Number Generation miniaudio uses the LCG random number generation algorithm. This is good enough for audio. Note that miniaudio's global LCG implementation uses global state which is _not_ thread-local. When this is called across multiple threads, results will be unpredictable. However, it won't crash and results will still be random enough for miniaudio's purposes. */ #ifndef MA_DEFAULT_LCG_SEED #define MA_DEFAULT_LCG_SEED 4321 #endif #define MA_LCG_M 2147483647 #define MA_LCG_A 48271 #define MA_LCG_C 0 static ma_lcg g_maLCG = {MA_DEFAULT_LCG_SEED}; /* Non-zero initial seed. Use ma_seed() to use an explicit seed. */ static MA_INLINE void ma_lcg_seed(ma_lcg* pLCG, ma_int32 seed) { MA_ASSERT(pLCG != NULL); pLCG->state = seed; } static MA_INLINE ma_int32 ma_lcg_rand_s32(ma_lcg* pLCG) { pLCG->state = (MA_LCG_A * pLCG->state + MA_LCG_C) % MA_LCG_M; return pLCG->state; } static MA_INLINE ma_uint32 ma_lcg_rand_u32(ma_lcg* pLCG) { return (ma_uint32)ma_lcg_rand_s32(pLCG); } static MA_INLINE ma_int16 ma_lcg_rand_s16(ma_lcg* pLCG) { return (ma_int16)(ma_lcg_rand_s32(pLCG) & 0xFFFF); } static MA_INLINE double ma_lcg_rand_f64(ma_lcg* pLCG) { return ma_lcg_rand_s32(pLCG) / (double)0x7FFFFFFF; } static MA_INLINE float ma_lcg_rand_f32(ma_lcg* pLCG) { return (float)ma_lcg_rand_f64(pLCG); } static MA_INLINE float ma_lcg_rand_range_f32(ma_lcg* pLCG, float lo, float hi) { return ma_scale_to_range_f32(ma_lcg_rand_f32(pLCG), lo, hi); } static MA_INLINE ma_int32 ma_lcg_rand_range_s32(ma_lcg* pLCG, ma_int32 lo, ma_int32 hi) { if (lo == hi) { return lo; } return lo + ma_lcg_rand_u32(pLCG) / (0xFFFFFFFF / (hi - lo + 1) + 1); } static MA_INLINE void ma_seed(ma_int32 seed) { ma_lcg_seed(&g_maLCG, seed); } static MA_INLINE ma_int32 ma_rand_s32(void) { return ma_lcg_rand_s32(&g_maLCG); } static MA_INLINE ma_uint32 ma_rand_u32(void) { return ma_lcg_rand_u32(&g_maLCG); } static MA_INLINE double ma_rand_f64(void) { return ma_lcg_rand_f64(&g_maLCG); } static MA_INLINE float ma_rand_f32(void) { return ma_lcg_rand_f32(&g_maLCG); } static MA_INLINE float ma_rand_range_f32(float lo, float hi) { return ma_lcg_rand_range_f32(&g_maLCG, lo, hi); } static MA_INLINE ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi) { return ma_lcg_rand_range_s32(&g_maLCG, lo, hi); } static MA_INLINE float ma_dither_f32_rectangle(float ditherMin, float ditherMax) { return ma_rand_range_f32(ditherMin, ditherMax); } static MA_INLINE float ma_dither_f32_triangle(float ditherMin, float ditherMax) { float a = ma_rand_range_f32(ditherMin, 0); float b = ma_rand_range_f32(0, ditherMax); return a + b; } static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, float ditherMax) { if (ditherMode == ma_dither_mode_rectangle) { return ma_dither_f32_rectangle(ditherMin, ditherMax); } if (ditherMode == ma_dither_mode_triangle) { return ma_dither_f32_triangle(ditherMin, ditherMax); } return 0; } static MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 ditherMin, ma_int32 ditherMax) { if (ditherMode == ma_dither_mode_rectangle) { ma_int32 a = ma_rand_range_s32(ditherMin, ditherMax); return a; } if (ditherMode == ma_dither_mode_triangle) { ma_int32 a = ma_rand_range_s32(ditherMin, 0); ma_int32 b = ma_rand_range_s32(0, ditherMax); return a + b; } return 0; } /************************************************************************************************************************************************************** Atomics **************************************************************************************************************************************************************/ /* c89atomic.h begin */ #ifndef ma_atomic_h #if defined(__cplusplus) extern "C" { #endif #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef int ma_atomic_memory_order; #define MA_ATOMIC_HAS_8 #define MA_ATOMIC_HAS_16 #define MA_ATOMIC_HAS_32 #define MA_ATOMIC_HAS_64 #if (defined(_MSC_VER) ) || defined(__WATCOMC__) || defined(__DMC__) #define MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, intrin, ma_atomicType, msvcType) \ ma_atomicType result; \ switch (order) \ { \ case ma_atomic_memory_order_relaxed: \ { \ result = (ma_atomicType)intrin##_nf((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_consume: \ case ma_atomic_memory_order_acquire: \ { \ result = (ma_atomicType)intrin##_acq((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_release: \ { \ result = (ma_atomicType)intrin##_rel((volatile msvcType*)dst, (msvcType)src); \ } break; \ case ma_atomic_memory_order_acq_rel: \ case ma_atomic_memory_order_seq_cst: \ default: \ { \ result = (ma_atomicType)intrin((volatile msvcType*)dst, (msvcType)src); \ } break; \ } \ return result; #define MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, expected, desired, order, intrin, ma_atomicType, msvcType) \ ma_atomicType result; \ switch (order) \ { \ case ma_atomic_memory_order_relaxed: \ { \ result = (ma_atomicType)intrin##_nf((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_consume: \ case ma_atomic_memory_order_acquire: \ { \ result = (ma_atomicType)intrin##_acq((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_release: \ { \ result = (ma_atomicType)intrin##_rel((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ case ma_atomic_memory_order_acq_rel: \ case ma_atomic_memory_order_seq_cst: \ default: \ { \ result = (ma_atomicType)intrin((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \ } break; \ } \ return result; #define ma_atomic_memory_order_relaxed 0 #define ma_atomic_memory_order_consume 1 #define ma_atomic_memory_order_acquire 2 #define ma_atomic_memory_order_release 3 #define ma_atomic_memory_order_acq_rel 4 #define ma_atomic_memory_order_seq_cst 5 #if _MSC_VER < 1600 && defined(MA_X86) #define MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY #endif #if _MSC_VER < 1600 #undef MA_ATOMIC_HAS_8 #undef MA_ATOMIC_HAS_16 #endif #if !defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #include #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { ma_uint8 result = 0; __asm { mov ecx, dst mov al, expected mov dl, desired lock cmpxchg [ecx], dl mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { ma_uint16 result = 0; __asm { mov ecx, dst mov ax, expected mov dx, desired lock cmpxchg [ecx], dx mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { ma_uint32 result = 0; __asm { mov ecx, dst mov eax, expected mov edx, desired lock cmpxchg [ecx], edx mov result, eax } return result; } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { ma_uint32 resultEAX = 0; ma_uint32 resultEDX = 0; __asm { mov esi, dst mov eax, dword ptr expected mov edx, dword ptr expected + 4 mov ebx, dword ptr desired mov ecx, dword ptr desired + 4 lock cmpxchg8b qword ptr [esi] mov resultEAX, eax mov resultEDX, edx } return ((ma_uint64)resultEDX << 32) | resultEAX; } #endif #else #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_compare_and_swap_8( dst, expected, desired) (ma_uint8 )_InterlockedCompareExchange8((volatile char*)dst, (char)desired, (char)expected) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_compare_and_swap_16(dst, expected, desired) (ma_uint16)_InterlockedCompareExchange16((volatile short*)dst, (short)desired, (short)expected) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_compare_and_swap_32(dst, expected, desired) (ma_uint32)_InterlockedCompareExchange((volatile long*)dst, (long)desired, (long)expected) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_compare_and_swap_64(dst, expected, desired) (ma_uint64)_InterlockedCompareExchange64((volatile ma_int64*)dst, (ma_int64)desired, (ma_int64)expected) #endif #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; __asm { mov ecx, dst mov al, src lock xchg [ecx], al mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; __asm { mov ecx, dst mov ax, src lock xchg [ecx], ax mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result = 0; (void)order; __asm { mov ecx, dst mov eax, src lock xchg [ecx], eax mov result, eax } return result; } #endif #else #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange8, ma_uint8, char); #else (void)order; return (ma_uint8)_InterlockedExchange8((volatile char*)dst, (char)src); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange16, ma_uint16, short); #else (void)order; return (ma_uint16)_InterlockedExchange16((volatile short*)dst, (short)src); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange, ma_uint32, long); #else (void)order; return (ma_uint32)_InterlockedExchange((volatile long*)dst, (long)src); #endif } #endif #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange64, ma_uint64, long long); #else (void)order; return (ma_uint64)_InterlockedExchange64((volatile long long*)dst, (long long)src); #endif } #else #endif #endif #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; do { oldValue = *dst; } while (ma_atomic_compare_and_swap_64(dst, oldValue, src) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; __asm { mov ecx, dst mov al, src lock xadd [ecx], al mov result, al } return result; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; __asm { mov ecx, dst mov ax, src lock xadd [ecx], ax mov result, ax } return result; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result = 0; (void)order; __asm { mov ecx, dst mov eax, src lock xadd [ecx], eax mov result, eax } return result; } #endif #else #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd8, ma_uint8, char); #else (void)order; return (ma_uint8)_InterlockedExchangeAdd8((volatile char*)dst, (char)src); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd16, ma_uint16, short); #else (void)order; return (ma_uint16)_InterlockedExchangeAdd16((volatile short*)dst, (short)src); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd, ma_uint32, long); #else (void)order; return (ma_uint32)_InterlockedExchangeAdd((volatile long*)dst, (long)src); #endif } #endif #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd64, ma_uint64, long long); #else (void)order; return (ma_uint64)_InterlockedExchangeAdd64((volatile long long*)dst, (long long)src); #endif } #else #endif #endif #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue + src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY) static MA_INLINE void __stdcall ma_atomic_thread_fence(ma_atomic_memory_order order) { (void)order; __asm { lock add [esp], 0 } } #else #if defined(MA_X64) #define ma_atomic_thread_fence(order) __faststorefence(), (void)order #elif defined(MA_ARM64) #define ma_atomic_thread_fence(order) __dmb(_ARM64_BARRIER_ISH), (void)order #else static MA_INLINE void ma_atomic_thread_fence(ma_atomic_memory_order order) { volatile ma_uint32 barrier = 0; ma_atomic_fetch_add_explicit_32(&barrier, 0, order); } #endif #endif #define ma_atomic_compiler_fence() ma_atomic_thread_fence(ma_atomic_memory_order_seq_cst) #define ma_atomic_signal_fence(order) ma_atomic_thread_fence(order) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange8, ma_uint8, char); #else (void)order; return ma_atomic_compare_and_swap_8((volatile ma_uint8*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange16, ma_uint16, short); #else (void)order; return ma_atomic_compare_and_swap_16((volatile ma_uint16*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange, ma_uint32, long); #else (void)order; return ma_atomic_compare_and_swap_32((volatile ma_uint32*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange64, ma_uint64, long long); #else (void)order; return ma_atomic_compare_and_swap_64((volatile ma_uint64*)ptr, 0, 0); #endif } #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_store_explicit_8( dst, src, order) (void)ma_atomic_exchange_explicit_8 (dst, src, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_store_explicit_16(dst, src, order) (void)ma_atomic_exchange_explicit_16(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_store_explicit_32(dst, src, order) (void)ma_atomic_exchange_explicit_32(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_store_explicit_64(dst, src, order) (void)ma_atomic_exchange_explicit_64(dst, src, order) #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue - src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue - src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue & src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue & src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue ^ src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue ^ src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr8, ma_uint8, char); #else ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue | src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr16, ma_uint16, short); #else ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue | src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr, ma_uint32, long); #else ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_ARM) MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr64, ma_uint64, long long); #else ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; #endif } #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_test_and_set_explicit_8( dst, order) ma_atomic_exchange_explicit_8 (dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_test_and_set_explicit_16(dst, order) ma_atomic_exchange_explicit_16(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_test_and_set_explicit_32(dst, order) ma_atomic_exchange_explicit_32(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_test_and_set_explicit_64(dst, order) ma_atomic_exchange_explicit_64(dst, 1, order) #endif #if defined(MA_ATOMIC_HAS_8) #define ma_atomic_clear_explicit_8( dst, order) ma_atomic_store_explicit_8 (dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_16) #define ma_atomic_clear_explicit_16(dst, order) ma_atomic_store_explicit_16(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_32) #define ma_atomic_clear_explicit_32(dst, order) ma_atomic_store_explicit_32(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_64) #define ma_atomic_clear_explicit_64(dst, order) ma_atomic_store_explicit_64(dst, 0, order) #endif #if defined(MA_ATOMIC_HAS_8) typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_8(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #else typedef ma_uint32 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_32(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_32(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_32(ptr, order) #endif #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE #define MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE #define ma_atomic_memory_order_relaxed __ATOMIC_RELAXED #define ma_atomic_memory_order_consume __ATOMIC_CONSUME #define ma_atomic_memory_order_acquire __ATOMIC_ACQUIRE #define ma_atomic_memory_order_release __ATOMIC_RELEASE #define ma_atomic_memory_order_acq_rel __ATOMIC_ACQ_REL #define ma_atomic_memory_order_seq_cst __ATOMIC_SEQ_CST #define ma_atomic_compiler_fence() __asm__ __volatile__("":::"memory") #define ma_atomic_thread_fence(order) __atomic_thread_fence(order) #define ma_atomic_signal_fence(order) __atomic_signal_fence(order) #define ma_atomic_is_lock_free_8(ptr) __atomic_is_lock_free(1, ptr) #define ma_atomic_is_lock_free_16(ptr) __atomic_is_lock_free(2, ptr) #define ma_atomic_is_lock_free_32(ptr) __atomic_is_lock_free(4, ptr) #define ma_atomic_is_lock_free_64(ptr) __atomic_is_lock_free(8, ptr) #define ma_atomic_test_and_set_explicit_8( dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_16(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_32(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_test_and_set_explicit_64(dst, order) __atomic_exchange_n(dst, 1, order) #define ma_atomic_clear_explicit_8( dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_16(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_32(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_clear_explicit_64(dst, order) __atomic_store_n(dst, 0, order) #define ma_atomic_store_explicit_8( dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_16(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_32(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_store_explicit_64(dst, src, order) __atomic_store_n(dst, src, order) #define ma_atomic_load_explicit_8( dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_16(dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_32(dst, order) __atomic_load_n(dst, order) #define ma_atomic_load_explicit_64(dst, order) __atomic_load_n(dst, order) #define ma_atomic_exchange_explicit_8( dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_16(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_32(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_exchange_explicit_64(dst, src, order) __atomic_exchange_n(dst, src, order) #define ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder) __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder) #define ma_atomic_fetch_add_explicit_8( dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_16(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_32(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_add_explicit_64(dst, src, order) __atomic_fetch_add(dst, src, order) #define ma_atomic_fetch_sub_explicit_8( dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_16(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_32(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_sub_explicit_64(dst, src, order) __atomic_fetch_sub(dst, src, order) #define ma_atomic_fetch_or_explicit_8( dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_16(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_32(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_or_explicit_64(dst, src, order) __atomic_fetch_or(dst, src, order) #define ma_atomic_fetch_xor_explicit_8( dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_16(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_32(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_xor_explicit_64(dst, src, order) __atomic_fetch_xor(dst, src, order) #define ma_atomic_fetch_and_explicit_8( dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_16(dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_32(dst, src, order) __atomic_fetch_and(dst, src, order) #define ma_atomic_fetch_and_explicit_64(dst, src, order) __atomic_fetch_and(dst, src, order) static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } #if defined(__clang__) #pragma clang diagnostic push #if __clang_major__ >= 8 #pragma clang diagnostic ignored "-Watomic-alignment" #endif #endif static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return expected; } #if defined(__clang__) #pragma clang diagnostic pop #endif typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(dst, order) (ma_bool32)__atomic_test_and_set(dst, order) #define ma_atomic_flag_clear_explicit(dst, order) __atomic_clear(dst, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #else #define ma_atomic_memory_order_relaxed 1 #define ma_atomic_memory_order_consume 2 #define ma_atomic_memory_order_acquire 3 #define ma_atomic_memory_order_release 4 #define ma_atomic_memory_order_acq_rel 5 #define ma_atomic_memory_order_seq_cst 6 #define ma_atomic_compiler_fence() __asm__ __volatile__("":::"memory") #if defined(__GNUC__) #define ma_atomic_thread_fence(order) __sync_synchronize(), (void)order static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { if (order > ma_atomic_memory_order_acquire) { __sync_synchronize(); } return __sync_lock_test_and_set(dst, src); } static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; do { oldValue = *dst; } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_add(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_sub(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_or(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_xor(dst, src); } static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { (void)order; return __sync_fetch_and_and(dst, src); } #define ma_atomic_compare_and_swap_8( dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_16(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_32(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #define ma_atomic_compare_and_swap_64(dst, expected, desired) __sync_val_compare_and_swap(dst, expected, desired) #else #if defined(MA_X86) #define ma_atomic_thread_fence(order) __asm__ __volatile__("lock; addl $0, (%%esp)" ::: "memory", "cc") #elif defined(MA_X64) #define ma_atomic_thread_fence(order) __asm__ __volatile__("lock; addq $0, (%%rsp)" ::: "memory", "cc") #else #error Unsupported architecture. Please submit a feature request. #endif static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired) { ma_uint8 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired) { ma_uint16 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired) { ma_uint32 result; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { volatile ma_uint64 result; #if defined(MA_X86) ma_uint32 resultEAX; ma_uint32 resultEDX; __asm__ __volatile__("push %%ebx; xchg %5, %%ebx; lock; cmpxchg8b %0; pop %%ebx" : "+m"(*dst), "=a"(resultEAX), "=d"(resultEDX) : "a"(expected & 0xFFFFFFFF), "d"(expected >> 32), "r"(desired & 0xFFFFFFFF), "c"(desired >> 32) : "cc"); result = ((ma_uint64)resultEDX << 32) | resultEAX; #elif defined(MA_X64) __asm__ __volatile__("lock; cmpxchg %3, %0" : "+m"(*dst), "=a"(result) : "a"(expected), "d"(desired) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result = 0; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result = 0; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 result; (void)order; #if defined(MA_X86) do { result = *dst; } while (ma_atomic_compare_and_swap_64(dst, result, src) != result); #elif defined(MA_X64) __asm__ __volatile__("lock; xchg %1, %0" : "+m"(*dst), "=a"(result) : "a"(src)); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 result; (void)order; #if defined(MA_X86) || defined(MA_X64) __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); #else #error Unsupported architecture. Please submit a feature request. #endif return result; } static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { #if defined(MA_X86) ma_uint64 oldValue; ma_uint64 newValue; (void)order; do { oldValue = *dst; newValue = oldValue + src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); return oldValue; #elif defined(MA_X64) ma_uint64 result; (void)order; __asm__ __volatile__("lock; xadd %1, %0" : "+m"(*dst), "=a"(result) : "a"(src) : "cc"); return result; #endif } static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue - src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue - src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue - src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue & src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue & src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue & src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue ^ src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue ^ src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue ^ src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order) { ma_uint8 oldValue; ma_uint8 newValue; do { oldValue = *dst; newValue = (ma_uint8)(oldValue | src); } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order) { ma_uint16 oldValue; ma_uint16 newValue; do { oldValue = *dst; newValue = (ma_uint16)(oldValue | src); } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order) { ma_uint32 oldValue; ma_uint32 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order) { ma_uint64 oldValue; ma_uint64 newValue; do { oldValue = *dst; newValue = oldValue | src; } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue); (void)order; return oldValue; } #endif #define ma_atomic_signal_fence(order) ma_atomic_thread_fence(order) static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_8((ma_uint8*)ptr, 0, 0); } static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_16((ma_uint16*)ptr, 0, 0); } static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_32((ma_uint32*)ptr, 0, 0); } static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order) { (void)order; return ma_atomic_compare_and_swap_64((ma_uint64*)ptr, 0, 0); } #define ma_atomic_store_explicit_8( dst, src, order) (void)ma_atomic_exchange_explicit_8 (dst, src, order) #define ma_atomic_store_explicit_16(dst, src, order) (void)ma_atomic_exchange_explicit_16(dst, src, order) #define ma_atomic_store_explicit_32(dst, src, order) (void)ma_atomic_exchange_explicit_32(dst, src, order) #define ma_atomic_store_explicit_64(dst, src, order) (void)ma_atomic_exchange_explicit_64(dst, src, order) #define ma_atomic_test_and_set_explicit_8( dst, order) ma_atomic_exchange_explicit_8 (dst, 1, order) #define ma_atomic_test_and_set_explicit_16(dst, order) ma_atomic_exchange_explicit_16(dst, 1, order) #define ma_atomic_test_and_set_explicit_32(dst, order) ma_atomic_exchange_explicit_32(dst, 1, order) #define ma_atomic_test_and_set_explicit_64(dst, order) ma_atomic_exchange_explicit_64(dst, 1, order) #define ma_atomic_clear_explicit_8( dst, order) ma_atomic_store_explicit_8 (dst, 0, order) #define ma_atomic_clear_explicit_16(dst, order) ma_atomic_store_explicit_16(dst, 0, order) #define ma_atomic_clear_explicit_32(dst, order) ma_atomic_store_explicit_32(dst, 0, order) #define ma_atomic_clear_explicit_64(dst, order) ma_atomic_store_explicit_64(dst, 0, order) typedef ma_uint8 ma_atomic_flag; #define ma_atomic_flag_test_and_set_explicit(ptr, order) (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order) #define ma_atomic_flag_clear_explicit(ptr, order) ma_atomic_clear_explicit_8(ptr, order) #define ma_atomic_flag_load_explicit(ptr, order) ma_atomic_load_explicit_8(ptr, order) #endif #if !defined(MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE) #if defined(MA_ATOMIC_HAS_8) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_8(volatile ma_uint8* dst, ma_uint8* expected, ma_uint8 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint8 expectedValue; ma_uint8 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_8(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_8(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_8(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_16) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_16(volatile ma_uint16* dst, ma_uint16* expected, ma_uint16 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint16 expectedValue; ma_uint16 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_16(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_16(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_16(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_32) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_32(volatile ma_uint32* dst, ma_uint32* expected, ma_uint32 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint32 expectedValue; ma_uint32 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_32(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_32(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_32(expected, result, failureOrder); return 0; } } #endif #if defined(MA_ATOMIC_HAS_64) static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_64(volatile ma_uint64* dst, volatile ma_uint64* expected, ma_uint64 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_uint64 expectedValue; ma_uint64 result; (void)successOrder; (void)failureOrder; expectedValue = ma_atomic_load_explicit_64(expected, ma_atomic_memory_order_seq_cst); result = ma_atomic_compare_and_swap_64(dst, expectedValue, desired); if (result == expectedValue) { return 1; } else { ma_atomic_store_explicit_64(expected, result, failureOrder); return 0; } } #endif #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_8 (dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder) #endif #if !defined(MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_8(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_16(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_32(volatile void* ptr) { (void)ptr; return 1; } static MA_INLINE ma_bool32 ma_atomic_is_lock_free_64(volatile void* ptr) { (void)ptr; #if defined(MA_64BIT) return 1; #else #if defined(MA_X86) || defined(MA_X64) return 1; #else return 0; #endif #endif } #endif #if defined(MA_64BIT) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr) { return ma_atomic_is_lock_free_64((volatile ma_uint64*)ptr); } static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order) { return (void*)ma_atomic_load_explicit_64((volatile ma_uint64*)ptr, order); } static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { ma_atomic_store_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order); } static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { return (void*)ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder); } static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired) { return (void*)ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)desired); } #elif defined(MA_32BIT) static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr) { return ma_atomic_is_lock_free_32((volatile ma_uint32*)ptr); } static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order) { return (void*)ma_atomic_load_explicit_32((volatile ma_uint32*)ptr, order); } static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { ma_atomic_store_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order); } static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order) { return (void*)ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder); } static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired) { return (void*)ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)desired); } #else #error Unsupported architecture. #endif #define ma_atomic_flag_test_and_set(ptr) ma_atomic_flag_test_and_set_explicit(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_flag_clear(ptr) ma_atomic_flag_clear_explicit(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_ptr(dst, src) ma_atomic_store_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_ptr(ptr) ma_atomic_load_explicit_ptr((volatile void**)ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_ptr(dst, src) ma_atomic_exchange_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_ptr(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_ptr(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_8( ptr) ma_atomic_test_and_set_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_16(ptr) ma_atomic_test_and_set_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_32(ptr) ma_atomic_test_and_set_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_64(ptr) ma_atomic_test_and_set_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_8( ptr) ma_atomic_clear_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_16(ptr) ma_atomic_clear_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_32(ptr) ma_atomic_clear_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_64(ptr) ma_atomic_clear_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_8( dst, src) ma_atomic_store_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_16(dst, src) ma_atomic_store_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_32(dst, src) ma_atomic_store_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_64(dst, src) ma_atomic_store_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_8( ptr) ma_atomic_load_explicit_8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_16(ptr) ma_atomic_load_explicit_16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_32(ptr) ma_atomic_load_explicit_32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_64(ptr) ma_atomic_load_explicit_64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_8( dst, src) ma_atomic_exchange_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_16(dst, src) ma_atomic_exchange_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_32(dst, src) ma_atomic_exchange_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_64(dst, src) ma_atomic_exchange_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_8( dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_16(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_8( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_16( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_32( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_64( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_8( dst, src) ma_atomic_fetch_add_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_16(dst, src) ma_atomic_fetch_add_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_32(dst, src) ma_atomic_fetch_add_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_64(dst, src) ma_atomic_fetch_add_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_8( dst, src) ma_atomic_fetch_sub_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_16(dst, src) ma_atomic_fetch_sub_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_32(dst, src) ma_atomic_fetch_sub_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_64(dst, src) ma_atomic_fetch_sub_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_8( dst, src) ma_atomic_fetch_or_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_16(dst, src) ma_atomic_fetch_or_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_32(dst, src) ma_atomic_fetch_or_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_64(dst, src) ma_atomic_fetch_or_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_8( dst, src) ma_atomic_fetch_xor_explicit_8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_16(dst, src) ma_atomic_fetch_xor_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_32(dst, src) ma_atomic_fetch_xor_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_64(dst, src) ma_atomic_fetch_xor_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_8( dst, src) ma_atomic_fetch_and_explicit_8 (dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_16(dst, src) ma_atomic_fetch_and_explicit_16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_32(dst, src) ma_atomic_fetch_and_explicit_32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_64(dst, src) ma_atomic_fetch_and_explicit_64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_explicit_i8( ptr, order) (ma_int8 )ma_atomic_test_and_set_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_test_and_set_explicit_i16(ptr, order) (ma_int16)ma_atomic_test_and_set_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_test_and_set_explicit_i32(ptr, order) (ma_int32)ma_atomic_test_and_set_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_test_and_set_explicit_i64(ptr, order) (ma_int64)ma_atomic_test_and_set_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_clear_explicit_i8( ptr, order) ma_atomic_clear_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_clear_explicit_i16(ptr, order) ma_atomic_clear_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_clear_explicit_i32(ptr, order) ma_atomic_clear_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_clear_explicit_i64(ptr, order) ma_atomic_clear_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_store_explicit_i8( dst, src, order) ma_atomic_store_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_store_explicit_i16(dst, src, order) ma_atomic_store_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_store_explicit_i32(dst, src, order) ma_atomic_store_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_store_explicit_i64(dst, src, order) ma_atomic_store_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_load_explicit_i8( ptr, order) (ma_int8 )ma_atomic_load_explicit_8( (ma_uint8* )ptr, order) #define ma_atomic_load_explicit_i16(ptr, order) (ma_int16)ma_atomic_load_explicit_16((ma_uint16*)ptr, order) #define ma_atomic_load_explicit_i32(ptr, order) (ma_int32)ma_atomic_load_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_load_explicit_i64(ptr, order) (ma_int64)ma_atomic_load_explicit_64((ma_uint64*)ptr, order) #define ma_atomic_exchange_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_exchange_explicit_8 ((ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_exchange_explicit_i16(dst, src, order) (ma_int16)ma_atomic_exchange_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_exchange_explicit_i32(dst, src, order) (ma_int32)ma_atomic_exchange_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_exchange_explicit_i64(dst, src, order) (ma_int64)ma_atomic_exchange_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder) #define ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_weak_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder) #define ma_atomic_fetch_add_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_add_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_add_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_add_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_add_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_add_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_add_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_add_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_sub_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_sub_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_sub_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_sub_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_sub_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_sub_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_sub_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_sub_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_or_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_or_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_or_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_or_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_or_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_or_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_or_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_or_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_xor_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_xor_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_xor_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_xor_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_xor_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_xor_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_xor_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_xor_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_fetch_and_explicit_i8( dst, src, order) (ma_int8 )ma_atomic_fetch_and_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order) #define ma_atomic_fetch_and_explicit_i16(dst, src, order) (ma_int16)ma_atomic_fetch_and_explicit_16((ma_uint16*)dst, (ma_uint16)src, order) #define ma_atomic_fetch_and_explicit_i32(dst, src, order) (ma_int32)ma_atomic_fetch_and_explicit_32((ma_uint32*)dst, (ma_uint32)src, order) #define ma_atomic_fetch_and_explicit_i64(dst, src, order) (ma_int64)ma_atomic_fetch_and_explicit_64((ma_uint64*)dst, (ma_uint64)src, order) #define ma_atomic_test_and_set_i8( ptr) ma_atomic_test_and_set_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i16(ptr) ma_atomic_test_and_set_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i32(ptr) ma_atomic_test_and_set_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_test_and_set_i64(ptr) ma_atomic_test_and_set_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i8( ptr) ma_atomic_clear_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i16(ptr) ma_atomic_clear_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i32(ptr) ma_atomic_clear_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_i64(ptr) ma_atomic_clear_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i8( dst, src) ma_atomic_store_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i16(dst, src) ma_atomic_store_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i32(dst, src) ma_atomic_store_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_i64(dst, src) ma_atomic_store_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i8( ptr) ma_atomic_load_explicit_i8( ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i16(ptr) ma_atomic_load_explicit_i16(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i32(ptr) ma_atomic_load_explicit_i32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_i64(ptr) ma_atomic_load_explicit_i64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i8( dst, src) ma_atomic_exchange_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i16(dst, src) ma_atomic_exchange_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i32(dst, src) ma_atomic_exchange_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_i64(dst, src) ma_atomic_exchange_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i8( dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i16(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_i64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i8( dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i16(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i32(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_i64(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i8( dst, src) ma_atomic_fetch_add_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i16(dst, src) ma_atomic_fetch_add_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i32(dst, src) ma_atomic_fetch_add_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_i64(dst, src) ma_atomic_fetch_add_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i8( dst, src) ma_atomic_fetch_sub_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i16(dst, src) ma_atomic_fetch_sub_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i32(dst, src) ma_atomic_fetch_sub_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_i64(dst, src) ma_atomic_fetch_sub_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i8( dst, src) ma_atomic_fetch_or_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i16(dst, src) ma_atomic_fetch_or_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i32(dst, src) ma_atomic_fetch_or_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_i64(dst, src) ma_atomic_fetch_or_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i8( dst, src) ma_atomic_fetch_xor_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i16(dst, src) ma_atomic_fetch_xor_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i32(dst, src) ma_atomic_fetch_xor_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_i64(dst, src) ma_atomic_fetch_xor_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i8( dst, src) ma_atomic_fetch_and_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i16(dst, src) ma_atomic_fetch_and_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i32(dst, src) ma_atomic_fetch_and_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_i64(dst, src) ma_atomic_fetch_and_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_and_swap_i8( dst, expected, dedsired) (ma_int8 )ma_atomic_compare_and_swap_8( (ma_uint8* )dst, (ma_uint8 )expected, (ma_uint8 )dedsired) #define ma_atomic_compare_and_swap_i16(dst, expected, dedsired) (ma_int16)ma_atomic_compare_and_swap_16((ma_uint16*)dst, (ma_uint16)expected, (ma_uint16)dedsired) #define ma_atomic_compare_and_swap_i32(dst, expected, dedsired) (ma_int32)ma_atomic_compare_and_swap_32((ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)dedsired) #define ma_atomic_compare_and_swap_i64(dst, expected, dedsired) (ma_int64)ma_atomic_compare_and_swap_64((ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)dedsired) typedef union { ma_uint32 i; float f; } ma_atomic_if32; typedef union { ma_uint64 i; double f; } ma_atomic_if64; #define ma_atomic_clear_explicit_f32(ptr, order) ma_atomic_clear_explicit_32((ma_uint32*)ptr, order) #define ma_atomic_clear_explicit_f64(ptr, order) ma_atomic_clear_explicit_64((ma_uint64*)ptr, order) static MA_INLINE void ma_atomic_store_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 x; x.f = src; ma_atomic_store_explicit_32((volatile ma_uint32*)dst, x.i, order); } static MA_INLINE void ma_atomic_store_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 x; x.f = src; ma_atomic_store_explicit_64((volatile ma_uint64*)dst, x.i, order); } static MA_INLINE float ma_atomic_load_explicit_f32(volatile const float* ptr, ma_atomic_memory_order order) { ma_atomic_if32 r; r.i = ma_atomic_load_explicit_32((volatile const ma_uint32*)ptr, order); return r.f; } static MA_INLINE double ma_atomic_load_explicit_f64(volatile const double* ptr, ma_atomic_memory_order order) { ma_atomic_if64 r; r.i = ma_atomic_load_explicit_64((volatile const ma_uint64*)ptr, order); return r.f; } static MA_INLINE float ma_atomic_exchange_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_exchange_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if32 d; d.f = desired; return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if64 d; d.f = desired; return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if32 d; d.f = desired; return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder); } static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder) { ma_atomic_if64 d; d.f = desired; return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder); } static MA_INLINE float ma_atomic_fetch_add_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_add_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_add_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_add_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_sub_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_sub_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_sub_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_sub_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_or_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_or_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_or_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_or_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_xor_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_xor_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_xor_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_xor_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } static MA_INLINE float ma_atomic_fetch_and_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order) { ma_atomic_if32 r; ma_atomic_if32 x; x.f = src; r.i = ma_atomic_fetch_and_explicit_32((volatile ma_uint32*)dst, x.i, order); return r.f; } static MA_INLINE double ma_atomic_fetch_and_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order) { ma_atomic_if64 r; ma_atomic_if64 x; x.f = src; r.i = ma_atomic_fetch_and_explicit_64((volatile ma_uint64*)dst, x.i, order); return r.f; } #define ma_atomic_clear_f32(ptr) (float )ma_atomic_clear_explicit_f32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_clear_f64(ptr) (double)ma_atomic_clear_explicit_f64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_f32(dst, src) ma_atomic_store_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_store_f64(dst, src) ma_atomic_store_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_f32(ptr) (float )ma_atomic_load_explicit_f32(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_load_f64(ptr) (double)ma_atomic_load_explicit_f64(ptr, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_f32(dst, src) (float )ma_atomic_exchange_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_exchange_f64(dst, src) (double)ma_atomic_exchange_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_f32(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_strong_f64(dst, expected, desired) ma_atomic_compare_exchange_strong_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_f32(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_compare_exchange_weak_f64(dst, expected, desired) ma_atomic_compare_exchange_weak_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_f32(dst, src) ma_atomic_fetch_add_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_add_f64(dst, src) ma_atomic_fetch_add_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_f32(dst, src) ma_atomic_fetch_sub_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_sub_f64(dst, src) ma_atomic_fetch_sub_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_f32(dst, src) ma_atomic_fetch_or_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_or_f64(dst, src) ma_atomic_fetch_or_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_f32(dst, src) ma_atomic_fetch_xor_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_xor_f64(dst, src) ma_atomic_fetch_xor_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_f32(dst, src) ma_atomic_fetch_and_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst) #define ma_atomic_fetch_and_f64(dst, src) ma_atomic_fetch_and_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst) static MA_INLINE float ma_atomic_compare_and_swap_f32(volatile float* dst, float expected, float desired) { ma_atomic_if32 r; ma_atomic_if32 e, d; e.f = expected; d.f = desired; r.i = ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, e.i, d.i); return r.f; } static MA_INLINE double ma_atomic_compare_and_swap_f64(volatile double* dst, double expected, double desired) { ma_atomic_if64 r; ma_atomic_if64 e, d; e.f = expected; d.f = desired; r.i = ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, e.i, d.i); return r.f; } typedef ma_atomic_flag ma_atomic_spinlock; static MA_INLINE void ma_atomic_spinlock_lock(volatile ma_atomic_spinlock* pSpinlock) { for (;;) { if (ma_atomic_flag_test_and_set_explicit(pSpinlock, ma_atomic_memory_order_acquire) == 0) { break; } while (ma_atomic_flag_load_explicit(pSpinlock, ma_atomic_memory_order_relaxed) == 1) { } } } static MA_INLINE void ma_atomic_spinlock_unlock(volatile ma_atomic_spinlock* pSpinlock) { ma_atomic_flag_clear_explicit(pSpinlock, ma_atomic_memory_order_release); } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #if defined(__cplusplus) } #endif #endif /* c89atomic.h end */ #define MA_ATOMIC_SAFE_TYPE_IMPL(c89TypeExtension, type) \ static MA_INLINE ma_##type ma_atomic_##type##_get(ma_atomic_##type* x) \ { \ return (ma_##type)ma_atomic_load_##c89TypeExtension(&x->value); \ } \ static MA_INLINE void ma_atomic_##type##_set(ma_atomic_##type* x, ma_##type value) \ { \ ma_atomic_store_##c89TypeExtension(&x->value, value); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_exchange(ma_atomic_##type* x, ma_##type value) \ { \ return (ma_##type)ma_atomic_exchange_##c89TypeExtension(&x->value, value); \ } \ static MA_INLINE ma_bool32 ma_atomic_##type##_compare_exchange(ma_atomic_##type* x, ma_##type* expected, ma_##type desired) \ { \ return ma_atomic_compare_exchange_weak_##c89TypeExtension(&x->value, expected, desired); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_add(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_add_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_sub(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_sub_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_or(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_or_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_xor(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_xor_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_fetch_and(ma_atomic_##type* x, ma_##type y) \ { \ return (ma_##type)ma_atomic_fetch_and_##c89TypeExtension(&x->value, y); \ } \ static MA_INLINE ma_##type ma_atomic_##type##_compare_and_swap(ma_atomic_##type* x, ma_##type expected, ma_##type desired) \ { \ return (ma_##type)ma_atomic_compare_and_swap_##c89TypeExtension(&x->value, expected, desired); \ } \ #define MA_ATOMIC_SAFE_TYPE_IMPL_PTR(type) \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_get(ma_atomic_ptr_##type* x) \ { \ return ma_atomic_load_ptr((void**)&x->value); \ } \ static MA_INLINE void ma_atomic_ptr_##type##_set(ma_atomic_ptr_##type* x, ma_##type* value) \ { \ ma_atomic_store_ptr((void**)&x->value, (void*)value); \ } \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_exchange(ma_atomic_ptr_##type* x, ma_##type* value) \ { \ return ma_atomic_exchange_ptr((void**)&x->value, (void*)value); \ } \ static MA_INLINE ma_bool32 ma_atomic_ptr_##type##_compare_exchange(ma_atomic_ptr_##type* x, ma_##type** expected, ma_##type* desired) \ { \ return ma_atomic_compare_exchange_weak_ptr((void**)&x->value, (void*)expected, (void*)desired); \ } \ static MA_INLINE ma_##type* ma_atomic_ptr_##type##_compare_and_swap(ma_atomic_ptr_##type* x, ma_##type* expected, ma_##type* desired) \ { \ return (ma_##type*)ma_atomic_compare_and_swap_ptr((void**)&x->value, (void*)expected, (void*)desired); \ } \ MA_ATOMIC_SAFE_TYPE_IMPL(32, uint32) MA_ATOMIC_SAFE_TYPE_IMPL(i32, int32) MA_ATOMIC_SAFE_TYPE_IMPL(64, uint64) MA_ATOMIC_SAFE_TYPE_IMPL(f32, float) MA_ATOMIC_SAFE_TYPE_IMPL(32, bool32) #if !defined(MA_NO_DEVICE_IO) MA_ATOMIC_SAFE_TYPE_IMPL(i32, device_state) #endif MA_API ma_uint64 ma_calculate_frame_count_after_resampling(ma_uint32 sampleRateOut, ma_uint32 sampleRateIn, ma_uint64 frameCountIn) { /* This is based on the calculation in ma_linear_resampler_get_expected_output_frame_count(). */ ma_uint64 outputFrameCount; ma_uint64 preliminaryInputFrameCountFromFrac; ma_uint64 preliminaryInputFrameCount; if (sampleRateIn == 0 || sampleRateOut == 0 || frameCountIn == 0) { return 0; } if (sampleRateOut == sampleRateIn) { return frameCountIn; } outputFrameCount = (frameCountIn * sampleRateOut) / sampleRateIn; preliminaryInputFrameCountFromFrac = (outputFrameCount * (sampleRateIn / sampleRateOut)) / sampleRateOut; preliminaryInputFrameCount = (outputFrameCount * (sampleRateIn % sampleRateOut)) + preliminaryInputFrameCountFromFrac; if (preliminaryInputFrameCount <= frameCountIn) { outputFrameCount += 1; } return outputFrameCount; } #ifndef MA_DATA_CONVERTER_STACK_BUFFER_SIZE #define MA_DATA_CONVERTER_STACK_BUFFER_SIZE 4096 #endif #if defined(MA_WIN32) static ma_result ma_result_from_GetLastError(DWORD error) { switch (error) { case ERROR_SUCCESS: return MA_SUCCESS; case ERROR_PATH_NOT_FOUND: return MA_DOES_NOT_EXIST; case ERROR_TOO_MANY_OPEN_FILES: return MA_TOO_MANY_OPEN_FILES; case ERROR_NOT_ENOUGH_MEMORY: return MA_OUT_OF_MEMORY; case ERROR_DISK_FULL: return MA_NO_SPACE; case ERROR_HANDLE_EOF: return MA_AT_END; case ERROR_NEGATIVE_SEEK: return MA_BAD_SEEK; case ERROR_INVALID_PARAMETER: return MA_INVALID_ARGS; case ERROR_ACCESS_DENIED: return MA_ACCESS_DENIED; case ERROR_SEM_TIMEOUT: return MA_TIMEOUT; case ERROR_FILE_NOT_FOUND: return MA_DOES_NOT_EXIST; default: break; } return MA_ERROR; } #endif /* MA_WIN32 */ /******************************************************************************* Threading *******************************************************************************/ static MA_INLINE ma_result ma_spinlock_lock_ex(volatile ma_spinlock* pSpinlock, ma_bool32 yield) { if (pSpinlock == NULL) { return MA_INVALID_ARGS; } for (;;) { if (ma_atomic_exchange_explicit_32(pSpinlock, 1, ma_atomic_memory_order_acquire) == 0) { break; } while (ma_atomic_load_explicit_32(pSpinlock, ma_atomic_memory_order_relaxed) == 1) { if (yield) { ma_yield(); } } } return MA_SUCCESS; } MA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock) { return ma_spinlock_lock_ex(pSpinlock, MA_TRUE); } MA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock) { return ma_spinlock_lock_ex(pSpinlock, MA_FALSE); } MA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock) { if (pSpinlock == NULL) { return MA_INVALID_ARGS; } ma_atomic_store_explicit_32(pSpinlock, 0, ma_atomic_memory_order_release); return MA_SUCCESS; } #ifndef MA_NO_THREADING #if defined(MA_POSIX) #define MA_THREADCALL typedef void* ma_thread_result; #elif defined(MA_WIN32) #define MA_THREADCALL WINAPI typedef unsigned long ma_thread_result; #endif typedef ma_thread_result (MA_THREADCALL * ma_thread_entry_proc)(void* pData); #ifdef MA_POSIX static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData) { int result; pthread_attr_t* pAttr = NULL; #if !defined(__EMSCRIPTEN__) && !defined(__3DS__) /* Try setting the thread priority. It's not critical if anything fails here. */ pthread_attr_t attr; if (pthread_attr_init(&attr) == 0) { int scheduler = -1; /* We successfully initialized our attributes object so we can assign the pointer so it's passed into pthread_create(). */ pAttr = &attr; /* We need to set the scheduler policy. Only do this if the OS supports pthread_attr_setschedpolicy() */ #if !defined(MA_BEOS) { if (priority == ma_thread_priority_idle) { #ifdef SCHED_IDLE if (pthread_attr_setschedpolicy(&attr, SCHED_IDLE) == 0) { scheduler = SCHED_IDLE; } #endif } else if (priority == ma_thread_priority_realtime) { #ifdef SCHED_FIFO if (pthread_attr_setschedpolicy(&attr, SCHED_FIFO) == 0) { scheduler = SCHED_FIFO; } #endif #ifdef MA_LINUX } else { scheduler = sched_getscheduler(0); #endif } } #endif if (stackSize > 0) { pthread_attr_setstacksize(&attr, stackSize); } if (scheduler != -1) { int priorityMin = sched_get_priority_min(scheduler); int priorityMax = sched_get_priority_max(scheduler); int priorityStep = (priorityMax - priorityMin) / 7; /* 7 = number of priorities supported by miniaudio. */ struct sched_param sched; if (pthread_attr_getschedparam(&attr, &sched) == 0) { if (priority == ma_thread_priority_idle) { sched.sched_priority = priorityMin; } else if (priority == ma_thread_priority_realtime) { #if defined(MA_PTHREAD_REALTIME_THREAD_PRIORITY) { sched.sched_priority = MA_PTHREAD_REALTIME_THREAD_PRIORITY; } #else { sched.sched_priority = priorityMax; } #endif } else { sched.sched_priority += ((int)priority + 5) * priorityStep; /* +5 because the lowest priority is -5. */ } if (sched.sched_priority < priorityMin) { sched.sched_priority = priorityMin; } if (sched.sched_priority > priorityMax) { sched.sched_priority = priorityMax; } /* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */ if (pthread_attr_setschedparam(&attr, &sched) == 0) { #if !defined(MA_ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28) { pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); } #endif } } } } #else /* It's the emscripten build. We'll have a few unused parameters. */ (void)priority; (void)stackSize; #endif result = pthread_create((pthread_t*)pThread, pAttr, entryProc, pData); /* The thread attributes object is no longer required. */ if (pAttr != NULL) { pthread_attr_destroy(pAttr); } if (result != 0) { return ma_result_from_errno(result); } return MA_SUCCESS; } static void ma_thread_wait__posix(ma_thread* pThread) { pthread_join((pthread_t)*pThread, NULL); } static ma_result ma_mutex_init__posix(ma_mutex* pMutex) { int result; if (pMutex == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pMutex); result = pthread_mutex_init((pthread_mutex_t*)pMutex, NULL); if (result != 0) { return ma_result_from_errno(result); } return MA_SUCCESS; } static void ma_mutex_uninit__posix(ma_mutex* pMutex) { pthread_mutex_destroy((pthread_mutex_t*)pMutex); } static void ma_mutex_lock__posix(ma_mutex* pMutex) { pthread_mutex_lock((pthread_mutex_t*)pMutex); } static void ma_mutex_unlock__posix(ma_mutex* pMutex) { pthread_mutex_unlock((pthread_mutex_t*)pMutex); } static ma_result ma_event_init__posix(ma_event* pEvent) { int result; result = pthread_mutex_init((pthread_mutex_t*)&pEvent->lock, NULL); if (result != 0) { return ma_result_from_errno(result); } result = pthread_cond_init((pthread_cond_t*)&pEvent->cond, NULL); if (result != 0) { pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock); return ma_result_from_errno(result); } pEvent->value = 0; return MA_SUCCESS; } static void ma_event_uninit__posix(ma_event* pEvent) { pthread_cond_destroy((pthread_cond_t*)&pEvent->cond); pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock); } static ma_result ma_event_wait__posix(ma_event* pEvent) { pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock); { while (pEvent->value == 0) { pthread_cond_wait((pthread_cond_t*)&pEvent->cond, (pthread_mutex_t*)&pEvent->lock); } pEvent->value = 0; /* Auto-reset. */ } pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock); return MA_SUCCESS; } static ma_result ma_event_signal__posix(ma_event* pEvent) { pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock); { pEvent->value = 1; pthread_cond_signal((pthread_cond_t*)&pEvent->cond); } pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock); return MA_SUCCESS; } static ma_result ma_semaphore_init__posix(int initialValue, ma_semaphore* pSemaphore) { int result; if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pSemaphore->value = initialValue; result = pthread_mutex_init((pthread_mutex_t*)&pSemaphore->lock, NULL); if (result != 0) { return ma_result_from_errno(result); /* Failed to create mutex. */ } result = pthread_cond_init((pthread_cond_t*)&pSemaphore->cond, NULL); if (result != 0) { pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock); return ma_result_from_errno(result); /* Failed to create condition variable. */ } return MA_SUCCESS; } static void ma_semaphore_uninit__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return; } pthread_cond_destroy((pthread_cond_t*)&pSemaphore->cond); pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock); } static ma_result ma_semaphore_wait__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock); { /* We need to wait on a condition variable before escaping. We can't return from this function until the semaphore has been signaled. */ while (pSemaphore->value == 0) { pthread_cond_wait((pthread_cond_t*)&pSemaphore->cond, (pthread_mutex_t*)&pSemaphore->lock); } pSemaphore->value -= 1; } pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock); return MA_SUCCESS; } static ma_result ma_semaphore_release__posix(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { return MA_INVALID_ARGS; } pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock); { pSemaphore->value += 1; pthread_cond_signal((pthread_cond_t*)&pSemaphore->cond); } pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock); return MA_SUCCESS; } #elif defined(MA_WIN32) static int ma_thread_priority_to_win32(ma_thread_priority priority) { switch (priority) { case ma_thread_priority_idle: return THREAD_PRIORITY_IDLE; case ma_thread_priority_lowest: return THREAD_PRIORITY_LOWEST; case ma_thread_priority_low: return THREAD_PRIORITY_BELOW_NORMAL; case ma_thread_priority_normal: return THREAD_PRIORITY_NORMAL; case ma_thread_priority_high: return THREAD_PRIORITY_ABOVE_NORMAL; case ma_thread_priority_highest: return THREAD_PRIORITY_HIGHEST; case ma_thread_priority_realtime: return THREAD_PRIORITY_TIME_CRITICAL; default: return THREAD_PRIORITY_NORMAL; } } static ma_result ma_thread_create__win32(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData) { DWORD threadID; /* Not used. Only used for passing into CreateThread() so it doesn't fail on Windows 98. */ *pThread = CreateThread(NULL, stackSize, entryProc, pData, 0, &threadID); if (*pThread == NULL) { return ma_result_from_GetLastError(GetLastError()); } SetThreadPriority((HANDLE)*pThread, ma_thread_priority_to_win32(priority)); return MA_SUCCESS; } static void ma_thread_wait__win32(ma_thread* pThread) { WaitForSingleObject((HANDLE)*pThread, INFINITE); CloseHandle((HANDLE)*pThread); } static ma_result ma_mutex_init__win32(ma_mutex* pMutex) { *pMutex = CreateEventA(NULL, FALSE, TRUE, NULL); if (*pMutex == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_mutex_uninit__win32(ma_mutex* pMutex) { CloseHandle((HANDLE)*pMutex); } static void ma_mutex_lock__win32(ma_mutex* pMutex) { WaitForSingleObject((HANDLE)*pMutex, INFINITE); } static void ma_mutex_unlock__win32(ma_mutex* pMutex) { SetEvent((HANDLE)*pMutex); } static ma_result ma_event_init__win32(ma_event* pEvent) { *pEvent = CreateEventA(NULL, FALSE, FALSE, NULL); if (*pEvent == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_event_uninit__win32(ma_event* pEvent) { CloseHandle((HANDLE)*pEvent); } static ma_result ma_event_wait__win32(ma_event* pEvent) { DWORD result = WaitForSingleObject((HANDLE)*pEvent, INFINITE); if (result == WAIT_OBJECT_0) { return MA_SUCCESS; } if (result == WAIT_TIMEOUT) { return MA_TIMEOUT; } return ma_result_from_GetLastError(GetLastError()); } static ma_result ma_event_signal__win32(ma_event* pEvent) { BOOL result = SetEvent((HANDLE)*pEvent); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_semaphore_init__win32(int initialValue, ma_semaphore* pSemaphore) { *pSemaphore = CreateSemaphoreW(NULL, (LONG)initialValue, LONG_MAX, NULL); if (*pSemaphore == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_semaphore_uninit__win32(ma_semaphore* pSemaphore) { CloseHandle((HANDLE)*pSemaphore); } static ma_result ma_semaphore_wait__win32(ma_semaphore* pSemaphore) { DWORD result = WaitForSingleObject((HANDLE)*pSemaphore, INFINITE); if (result == WAIT_OBJECT_0) { return MA_SUCCESS; } if (result == WAIT_TIMEOUT) { return MA_TIMEOUT; } return ma_result_from_GetLastError(GetLastError()); } static ma_result ma_semaphore_release__win32(ma_semaphore* pSemaphore) { BOOL result = ReleaseSemaphore((HANDLE)*pSemaphore, 1, NULL); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } #endif typedef struct { ma_thread_entry_proc entryProc; void* pData; ma_allocation_callbacks allocationCallbacks; } ma_thread_proxy_data; static ma_thread_result MA_THREADCALL ma_thread_entry_proxy(void* pData) { ma_thread_proxy_data* pProxyData = (ma_thread_proxy_data*)pData; ma_thread_entry_proc entryProc; void* pEntryProcData; ma_thread_result result; #if defined(MA_ON_THREAD_ENTRY) MA_ON_THREAD_ENTRY #endif entryProc = pProxyData->entryProc; pEntryProcData = pProxyData->pData; /* Free the proxy data before getting into the real thread entry proc. */ ma_free(pProxyData, &pProxyData->allocationCallbacks); result = entryProc(pEntryProcData); #if defined(MA_ON_THREAD_EXIT) MA_ON_THREAD_EXIT #endif return result; } static ma_result ma_thread_create(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_thread_proxy_data* pProxyData; if (pThread == NULL || entryProc == NULL) { return MA_INVALID_ARGS; } pProxyData = (ma_thread_proxy_data*)ma_malloc(sizeof(*pProxyData), pAllocationCallbacks); /* Will be freed by the proxy entry proc. */ if (pProxyData == NULL) { return MA_OUT_OF_MEMORY; } #if defined(MA_THREAD_DEFAULT_STACK_SIZE) if (stackSize == 0) { stackSize = MA_THREAD_DEFAULT_STACK_SIZE; } #endif pProxyData->entryProc = entryProc; pProxyData->pData = pData; ma_allocation_callbacks_init_copy(&pProxyData->allocationCallbacks, pAllocationCallbacks); #if defined(MA_POSIX) result = ma_thread_create__posix(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData); #elif defined(MA_WIN32) result = ma_thread_create__win32(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData); #endif if (result != MA_SUCCESS) { ma_free(pProxyData, pAllocationCallbacks); return result; } return MA_SUCCESS; } static void ma_thread_wait(ma_thread* pThread) { if (pThread == NULL) { return; } #if defined(MA_POSIX) ma_thread_wait__posix(pThread); #elif defined(MA_WIN32) ma_thread_wait__win32(pThread); #endif } MA_API ma_result ma_mutex_init(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_mutex_init__posix(pMutex); #elif defined(MA_WIN32) return ma_mutex_init__win32(pMutex); #endif } MA_API void ma_mutex_uninit(ma_mutex* pMutex) { if (pMutex == NULL) { return; } #if defined(MA_POSIX) ma_mutex_uninit__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_uninit__win32(pMutex); #endif } MA_API void ma_mutex_lock(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_mutex_lock__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_lock__win32(pMutex); #endif } MA_API void ma_mutex_unlock(ma_mutex* pMutex) { if (pMutex == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_mutex_unlock__posix(pMutex); #elif defined(MA_WIN32) ma_mutex_unlock__win32(pMutex); #endif } MA_API ma_result ma_event_init(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_init__posix(pEvent); #elif defined(MA_WIN32) return ma_event_init__win32(pEvent); #endif } #if 0 static ma_result ma_event_alloc_and_init(ma_event** ppEvent, ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_event* pEvent; if (ppEvent == NULL) { return MA_INVALID_ARGS; } *ppEvent = NULL; pEvent = ma_malloc(sizeof(*pEvent), pAllocationCallbacks); if (pEvent == NULL) { return MA_OUT_OF_MEMORY; } result = ma_event_init(pEvent); if (result != MA_SUCCESS) { ma_free(pEvent, pAllocationCallbacks); return result; } *ppEvent = pEvent; return result; } #endif MA_API void ma_event_uninit(ma_event* pEvent) { if (pEvent == NULL) { return; } #if defined(MA_POSIX) ma_event_uninit__posix(pEvent); #elif defined(MA_WIN32) ma_event_uninit__win32(pEvent); #endif } #if 0 static void ma_event_uninit_and_free(ma_event* pEvent, ma_allocation_callbacks* pAllocationCallbacks) { if (pEvent == NULL) { return; } ma_event_uninit(pEvent); ma_free(pEvent, pAllocationCallbacks); } #endif MA_API ma_result ma_event_wait(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert to the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_wait__posix(pEvent); #elif defined(MA_WIN32) return ma_event_wait__win32(pEvent); #endif } MA_API ma_result ma_event_signal(ma_event* pEvent) { if (pEvent == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert to the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_event_signal__posix(pEvent); #elif defined(MA_WIN32) return ma_event_signal__win32(pEvent); #endif } MA_API ma_result ma_semaphore_init(int initialValue, ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_init__posix(initialValue, pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_init__win32(initialValue, pSemaphore); #endif } MA_API void ma_semaphore_uninit(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return; } #if defined(MA_POSIX) ma_semaphore_uninit__posix(pSemaphore); #elif defined(MA_WIN32) ma_semaphore_uninit__win32(pSemaphore); #endif } MA_API ma_result ma_semaphore_wait(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_wait__posix(pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_wait__win32(pSemaphore); #endif } MA_API ma_result ma_semaphore_release(ma_semaphore* pSemaphore) { if (pSemaphore == NULL) { MA_ASSERT(MA_FALSE); /* Fire an assert so the caller is aware of this bug. */ return MA_INVALID_ARGS; } #if defined(MA_POSIX) return ma_semaphore_release__posix(pSemaphore); #elif defined(MA_WIN32) return ma_semaphore_release__win32(pSemaphore); #endif } #else /* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */ #ifndef MA_NO_DEVICE_IO #error "MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO"; #endif #endif /* MA_NO_THREADING */ #define MA_FENCE_COUNTER_MAX 0x7FFFFFFF MA_API ma_result ma_fence_init(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFence); pFence->counter = 0; #ifndef MA_NO_THREADING { ma_result result; result = ma_event_init(&pFence->e); if (result != MA_SUCCESS) { return result; } } #endif return MA_SUCCESS; } MA_API void ma_fence_uninit(ma_fence* pFence) { if (pFence == NULL) { return; } #ifndef MA_NO_THREADING { ma_event_uninit(&pFence->e); } #endif MA_ZERO_OBJECT(pFence); } MA_API ma_result ma_fence_acquire(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter); ma_uint32 newCounter = oldCounter + 1; /* Make sure we're not about to exceed our maximum value. */ if (newCounter > MA_FENCE_COUNTER_MAX) { MA_ASSERT(MA_FALSE); return MA_OUT_OF_RANGE; } if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) { return MA_SUCCESS; } else { if (oldCounter == MA_FENCE_COUNTER_MAX) { MA_ASSERT(MA_FALSE); return MA_OUT_OF_RANGE; /* The other thread took the last available slot. Abort. */ } } } /* Should never get here. */ /*return MA_SUCCESS;*/ } MA_API ma_result ma_fence_release(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter); ma_uint32 newCounter = oldCounter - 1; if (oldCounter == 0) { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Acquire/release mismatch. */ } if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) { #ifndef MA_NO_THREADING { if (newCounter == 0) { ma_event_signal(&pFence->e); /* <-- ma_fence_wait() will be waiting on this. */ } } #endif return MA_SUCCESS; } else { if (oldCounter == 0) { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Another thread has taken the 0 slot. Acquire/release mismatch. */ } } } /* Should never get here. */ /*return MA_SUCCESS;*/ } MA_API ma_result ma_fence_wait(ma_fence* pFence) { if (pFence == NULL) { return MA_INVALID_ARGS; } for (;;) { ma_uint32 counter; counter = ma_atomic_load_32(&pFence->counter); if (counter == 0) { /* Counter has hit zero. By the time we get here some other thread may have acquired the fence again, but that is where the caller needs to take care with how they se the fence. */ return MA_SUCCESS; } /* Getting here means the counter is > 0. We'll need to wait for something to happen. */ #ifndef MA_NO_THREADING { ma_result result; result = ma_event_wait(&pFence->e); if (result != MA_SUCCESS) { return result; } } #endif } /* Should never get here. */ /*return MA_INVALID_OPERATION;*/ } MA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification) { ma_async_notification_callbacks* pNotificationCallbacks = (ma_async_notification_callbacks*)pNotification; if (pNotification == NULL) { return MA_INVALID_ARGS; } if (pNotificationCallbacks->onSignal == NULL) { return MA_NOT_IMPLEMENTED; } pNotificationCallbacks->onSignal(pNotification); return MA_INVALID_ARGS; } static void ma_async_notification_poll__on_signal(ma_async_notification* pNotification) { ((ma_async_notification_poll*)pNotification)->signalled = MA_TRUE; } MA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll) { if (pNotificationPoll == NULL) { return MA_INVALID_ARGS; } pNotificationPoll->cb.onSignal = ma_async_notification_poll__on_signal; pNotificationPoll->signalled = MA_FALSE; return MA_SUCCESS; } MA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll) { if (pNotificationPoll == NULL) { return MA_FALSE; } return pNotificationPoll->signalled; } static void ma_async_notification_event__on_signal(ma_async_notification* pNotification) { ma_async_notification_event_signal((ma_async_notification_event*)pNotification); } MA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } pNotificationEvent->cb.onSignal = ma_async_notification_event__on_signal; #ifndef MA_NO_THREADING { ma_result result; result = ma_event_init(&pNotificationEvent->e); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { ma_event_uninit(&pNotificationEvent->e); return MA_SUCCESS; } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { return ma_event_wait(&pNotificationEvent->e); } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } MA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent) { if (pNotificationEvent == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { return ma_event_signal(&pNotificationEvent->e); } #else { return MA_NOT_IMPLEMENTED; /* Threading is disabled. */ } #endif } /************************************************************************************************************************************************************ Job Queue ************************************************************************************************************************************************************/ MA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity) { ma_slot_allocator_config config; MA_ZERO_OBJECT(&config); config.capacity = capacity; return config; } static MA_INLINE ma_uint32 ma_slot_allocator_calculate_group_capacity(ma_uint32 slotCapacity) { ma_uint32 cap = slotCapacity / 32; if ((slotCapacity % 32) != 0) { cap += 1; } return cap; } static MA_INLINE ma_uint32 ma_slot_allocator_group_capacity(const ma_slot_allocator* pAllocator) { return ma_slot_allocator_calculate_group_capacity(pAllocator->capacity); } typedef struct { size_t sizeInBytes; size_t groupsOffset; size_t slotsOffset; } ma_slot_allocator_heap_layout; static ma_result ma_slot_allocator_get_heap_layout(const ma_slot_allocator_config* pConfig, ma_slot_allocator_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->capacity == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Groups. */ pHeapLayout->groupsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(ma_slot_allocator_calculate_group_capacity(pConfig->capacity) * sizeof(ma_slot_allocator_group)); /* Slots. */ pHeapLayout->slotsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_uint32)); return MA_SUCCESS; } MA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_slot_allocator_heap_layout layout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_slot_allocator_get_heap_layout(pConfig, &layout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = layout.sizeInBytes; return result; } MA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator) { ma_result result; ma_slot_allocator_heap_layout heapLayout; if (pAllocator == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pAllocator); if (pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_slot_allocator_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pAllocator->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pAllocator->pGroups = (ma_slot_allocator_group*)ma_offset_ptr(pHeap, heapLayout.groupsOffset); pAllocator->pSlots = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.slotsOffset); pAllocator->capacity = pConfig->capacity; return MA_SUCCESS; } MA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_slot_allocator_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap allocation. */ } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_slot_allocator_init_preallocated(pConfig, pHeap, pAllocator); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pAllocator->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocator == NULL) { return; } if (pAllocator->_ownsHeap) { ma_free(pAllocator->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot) { ma_uint32 iAttempt; const ma_uint32 maxAttempts = 2; /* The number of iterations to perform until returning MA_OUT_OF_MEMORY if no slots can be found. */ if (pAllocator == NULL || pSlot == NULL) { return MA_INVALID_ARGS; } for (iAttempt = 0; iAttempt < maxAttempts; iAttempt += 1) { /* We need to acquire a suitable bitfield first. This is a bitfield that's got an available slot within it. */ ma_uint32 iGroup; for (iGroup = 0; iGroup < ma_slot_allocator_group_capacity(pAllocator); iGroup += 1) { /* CAS */ for (;;) { ma_uint32 oldBitfield; ma_uint32 newBitfield; ma_uint32 bitOffset; oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield); /* <-- This copy must happen. The compiler must not optimize this away. */ /* Fast check to see if anything is available. */ if (oldBitfield == 0xFFFFFFFF) { break; /* No available bits in this bitfield. */ } bitOffset = ma_ffs_32(~oldBitfield); MA_ASSERT(bitOffset < 32); newBitfield = oldBitfield | (1 << bitOffset); if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) { ma_uint32 slotIndex; /* Increment the counter as soon as possible to have other threads report out-of-memory sooner than later. */ ma_atomic_fetch_add_32(&pAllocator->count, 1); /* The slot index is required for constructing the output value. */ slotIndex = (iGroup << 5) + bitOffset; /* iGroup << 5 = iGroup * 32 */ if (slotIndex >= pAllocator->capacity) { return MA_OUT_OF_MEMORY; } /* Increment the reference count before constructing the output value. */ pAllocator->pSlots[slotIndex] += 1; /* Construct the output value. */ *pSlot = (((ma_uint64)pAllocator->pSlots[slotIndex] << 32) | slotIndex); return MA_SUCCESS; } } } /* We weren't able to find a slot. If it's because we've reached our capacity we need to return MA_OUT_OF_MEMORY. Otherwise we need to do another iteration and try again. */ if (pAllocator->count < pAllocator->capacity) { ma_yield(); } else { return MA_OUT_OF_MEMORY; } } /* We couldn't find a slot within the maximum number of attempts. */ return MA_OUT_OF_MEMORY; } MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot) { ma_uint32 iGroup; ma_uint32 iBit; if (pAllocator == NULL) { return MA_INVALID_ARGS; } iGroup = (ma_uint32)((slot & 0xFFFFFFFF) >> 5); /* slot / 32 */ iBit = (ma_uint32)((slot & 0xFFFFFFFF) & 31); /* slot % 32 */ if (iGroup >= ma_slot_allocator_group_capacity(pAllocator)) { return MA_INVALID_ARGS; } MA_ASSERT(iBit < 32); /* This must be true due to the logic we used to actually calculate it. */ while (ma_atomic_load_32(&pAllocator->count) > 0) { /* CAS */ ma_uint32 oldBitfield; ma_uint32 newBitfield; oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield); /* <-- This copy must happen. The compiler must not optimize this away. */ newBitfield = oldBitfield & ~(1 << iBit); /* Debugging for checking for double-frees. */ #if defined(MA_DEBUG_OUTPUT) { if ((oldBitfield & (1 << iBit)) == 0) { MA_ASSERT(MA_FALSE); /* Double free detected.*/ } } #endif if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) { ma_atomic_fetch_sub_32(&pAllocator->count, 1); return MA_SUCCESS; } } /* Getting here means there are no allocations available for freeing. */ return MA_INVALID_OPERATION; } #define MA_JOB_ID_NONE ~((ma_uint64)0) #define MA_JOB_SLOT_NONE (ma_uint16)(~0) static MA_INLINE ma_uint32 ma_job_extract_refcount(ma_uint64 toc) { return (ma_uint32)(toc >> 32); } static MA_INLINE ma_uint16 ma_job_extract_slot(ma_uint64 toc) { return (ma_uint16)(toc & 0x0000FFFF); } static MA_INLINE ma_uint16 ma_job_extract_code(ma_uint64 toc) { return (ma_uint16)((toc & 0xFFFF0000) >> 16); } static MA_INLINE ma_uint64 ma_job_toc_to_allocation(ma_uint64 toc) { return ((ma_uint64)ma_job_extract_refcount(toc) << 32) | (ma_uint64)ma_job_extract_slot(toc); } static MA_INLINE ma_uint64 ma_job_set_refcount(ma_uint64 toc, ma_uint32 refcount) { /* Clear the reference count first. */ toc = toc & ~((ma_uint64)0xFFFFFFFF << 32); toc = toc | ((ma_uint64)refcount << 32); return toc; } MA_API ma_job ma_job_init(ma_uint16 code) { ma_job job; MA_ZERO_OBJECT(&job); job.toc.breakup.code = code; job.toc.breakup.slot = MA_JOB_SLOT_NONE; /* Temp value. Will be allocated when posted to a queue. */ job.next = MA_JOB_ID_NONE; return job; } static ma_result ma_job_process__noop(ma_job* pJob); static ma_result ma_job_process__quit(ma_job* pJob); static ma_result ma_job_process__custom(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob); static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob); static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob); #if !defined(MA_NO_DEVICE_IO) static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob); #endif static ma_job_proc g_jobVTable[MA_JOB_TYPE_COUNT] = { /* Miscellaneous. */ ma_job_process__quit, /* MA_JOB_TYPE_QUIT */ ma_job_process__custom, /* MA_JOB_TYPE_CUSTOM */ /* Resource Manager. */ ma_job_process__resource_manager__load_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE */ ma_job_process__resource_manager__free_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE */ ma_job_process__resource_manager__page_data_buffer_node, /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE */ ma_job_process__resource_manager__load_data_buffer, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER */ ma_job_process__resource_manager__free_data_buffer, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER */ ma_job_process__resource_manager__load_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM */ ma_job_process__resource_manager__free_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM */ ma_job_process__resource_manager__page_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM */ ma_job_process__resource_manager__seek_data_stream, /* MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM */ /* Device. */ #if !defined(MA_NO_DEVICE_IO) ma_job_process__device__aaudio_reroute /* MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE */ #endif }; MA_API ma_result ma_job_process(ma_job* pJob) { if (pJob == NULL) { return MA_INVALID_ARGS; } if (pJob->toc.breakup.code >= MA_JOB_TYPE_COUNT) { return MA_INVALID_OPERATION; } return g_jobVTable[pJob->toc.breakup.code](pJob); } static ma_result ma_job_process__noop(ma_job* pJob) { MA_ASSERT(pJob != NULL); /* No-op. */ (void)pJob; return MA_SUCCESS; } static ma_result ma_job_process__quit(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__custom(ma_job* pJob) { MA_ASSERT(pJob != NULL); /* No-op if there's no callback. */ if (pJob->data.custom.proc == NULL) { return MA_SUCCESS; } return pJob->data.custom.proc(pJob); } MA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity) { ma_job_queue_config config; config.flags = flags; config.capacity = capacity; return config; } typedef struct { size_t sizeInBytes; size_t allocatorOffset; size_t jobsOffset; } ma_job_queue_heap_layout; static ma_result ma_job_queue_get_heap_layout(const ma_job_queue_config* pConfig, ma_job_queue_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->capacity == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Allocator. */ { ma_slot_allocator_config allocatorConfig; size_t allocatorHeapSizeInBytes; allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity); result = ma_slot_allocator_get_heap_size(&allocatorConfig, &allocatorHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->allocatorOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += allocatorHeapSizeInBytes; } /* Jobs. */ pHeapLayout->jobsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_job)); return MA_SUCCESS; } MA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_job_queue_heap_layout layout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_job_queue_get_heap_layout(pConfig, &layout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = layout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue) { ma_result result; ma_job_queue_heap_layout heapLayout; ma_slot_allocator_config allocatorConfig; if (pQueue == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pQueue); result = ma_job_queue_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pQueue->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pQueue->flags = pConfig->flags; pQueue->capacity = pConfig->capacity; pQueue->pJobs = (ma_job*)ma_offset_ptr(pHeap, heapLayout.jobsOffset); allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity); result = ma_slot_allocator_init_preallocated(&allocatorConfig, ma_offset_ptr(pHeap, heapLayout.allocatorOffset), &pQueue->allocator); if (result != MA_SUCCESS) { return result; } /* We need a semaphore if we're running in non-blocking mode. If threading is disabled we need to return an error. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_init(0, &pQueue->sem); } #else { /* Threading is disabled and we've requested non-blocking mode. */ return MA_INVALID_OPERATION; } #endif } /* Our queue needs to be initialized with a free standing node. This should always be slot 0. Required for the lock free algorithm. The first job in the queue is just a dummy item for giving us the first item in the list which is stored in the "next" member. */ ma_slot_allocator_alloc(&pQueue->allocator, &pQueue->head); /* Will never fail. */ pQueue->pJobs[ma_job_extract_slot(pQueue->head)].next = MA_JOB_ID_NONE; pQueue->tail = pQueue->head; return MA_SUCCESS; } MA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_job_queue_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_job_queue_init_preallocated(pConfig, pHeap, pQueue); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pQueue->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks) { if (pQueue == NULL) { return; } /* All we need to do is uninitialize the semaphore. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_uninit(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } ma_slot_allocator_uninit(&pQueue->allocator, pAllocationCallbacks); if (pQueue->_ownsHeap) { ma_free(pQueue->_pHeap, pAllocationCallbacks); } } static ma_bool32 ma_job_queue_cas(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) { /* The new counter is taken from the expected value. */ return ma_atomic_compare_and_swap_64(dst, expected, ma_job_set_refcount(desired, ma_job_extract_refcount(expected) + 1)) == expected; } MA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob) { /* Lock free queue implementation based on the paper by Michael and Scott: Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors */ ma_result result; ma_uint64 slot; ma_uint64 tail; ma_uint64 next; if (pQueue == NULL || pJob == NULL) { return MA_INVALID_ARGS; } /* We need a new slot. */ result = ma_slot_allocator_alloc(&pQueue->allocator, &slot); if (result != MA_SUCCESS) { return result; /* Probably ran out of slots. If so, MA_OUT_OF_MEMORY will be returned. */ } /* At this point we should have a slot to place the job. */ MA_ASSERT(ma_job_extract_slot(slot) < pQueue->capacity); /* We need to put the job into memory before we do anything. */ pQueue->pJobs[ma_job_extract_slot(slot)] = *pJob; pQueue->pJobs[ma_job_extract_slot(slot)].toc.allocation = slot; /* This will overwrite the job code. */ pQueue->pJobs[ma_job_extract_slot(slot)].toc.breakup.code = pJob->toc.breakup.code; /* The job code needs to be applied again because the line above overwrote it. */ pQueue->pJobs[ma_job_extract_slot(slot)].next = MA_JOB_ID_NONE; /* Reset for safety. */ #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_lock(&pQueue->lock); #endif { /* The job is stored in memory so now we need to add it to our linked list. We only ever add items to the end of the list. */ for (;;) { tail = ma_atomic_load_64(&pQueue->tail); next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(tail)].next); if (ma_job_toc_to_allocation(tail) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->tail))) { if (ma_job_extract_slot(next) == 0xFFFF) { if (ma_job_queue_cas(&pQueue->pJobs[ma_job_extract_slot(tail)].next, next, slot)) { break; } } else { ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next)); } } } ma_job_queue_cas(&pQueue->tail, tail, slot); } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif /* Signal the semaphore as the last step if we're using synchronous mode. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_release(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } return MA_SUCCESS; } MA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob) { ma_uint64 head; ma_uint64 tail; ma_uint64 next; if (pQueue == NULL || pJob == NULL) { return MA_INVALID_ARGS; } /* If we're running in synchronous mode we'll need to wait on a semaphore. */ if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) { #ifndef MA_NO_THREADING { ma_semaphore_wait(&pQueue->sem); } #else { MA_ASSERT(MA_FALSE); /* Should never get here. Should have been checked at initialization time. */ } #endif } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_lock(&pQueue->lock); #endif { /* BUG: In lock-free mode, multiple threads can be in this section of code. The "head" variable in the loop below is stored. One thread can fall through to the freeing of this item while another is still using "head" for the retrieval of the "next" variable. The slot allocator might need to make use of some reference counting to ensure it's only truly freed when there are no more references to the item. This must be fixed before removing these locks. */ /* Now we need to remove the root item from the list. */ for (;;) { head = ma_atomic_load_64(&pQueue->head); tail = ma_atomic_load_64(&pQueue->tail); next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(head)].next); if (ma_job_toc_to_allocation(head) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->head))) { if (ma_job_extract_slot(head) == ma_job_extract_slot(tail)) { if (ma_job_extract_slot(next) == 0xFFFF) { #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif return MA_NO_DATA_AVAILABLE; } ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next)); } else { *pJob = pQueue->pJobs[ma_job_extract_slot(next)]; if (ma_job_queue_cas(&pQueue->head, head, ma_job_extract_slot(next))) { break; } } } } } #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE ma_spinlock_unlock(&pQueue->lock); #endif ma_slot_allocator_free(&pQueue->allocator, head); /* If it's a quit job make sure it's put back on the queue to ensure other threads have an opportunity to detect it and terminate naturally. We could instead just leave it on the queue, but that would involve fiddling with the lock-free code above and I want to keep that as simple as possible. */ if (pJob->toc.breakup.code == MA_JOB_TYPE_QUIT) { ma_job_queue_post(pQueue, pJob); return MA_CANCELLED; /* Return a cancelled status just in case the thread is checking return codes and not properly checking for a quit job. */ } return MA_SUCCESS; } /******************************************************************************* Dynamic Linking *******************************************************************************/ #ifdef MA_POSIX /* No need for dlfcn.h if we're not using runtime linking. */ #ifndef MA_NO_RUNTIME_LINKING #include #endif #endif MA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename) { #ifndef MA_NO_RUNTIME_LINKING ma_handle handle; ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, "Loading library: %s\n", filename); #ifdef MA_WIN32 /* From MSDN: Desktop applications cannot use LoadPackagedLibrary; if a desktop application calls this function it fails with APPMODEL_ERROR_NO_PACKAGE.*/ #if !defined(MA_WIN32_UWP) || !(defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP))) handle = (ma_handle)LoadLibraryA(filename); #else /* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */ WCHAR filenameW[4096]; if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) { handle = NULL; } else { handle = (ma_handle)LoadPackagedLibrary(filenameW, 0); } #endif #else handle = (ma_handle)dlopen(filename, RTLD_NOW); #endif /* I'm not considering failure to load a library an error nor a warning because seamlessly falling through to a lower-priority backend is a deliberate design choice. Instead I'm logging it as an informational message. */ if (handle == NULL) { ma_log_postf(pLog, MA_LOG_LEVEL_INFO, "Failed to load library: %s\n", filename); } return handle; #else /* Runtime linking is disabled. */ (void)pLog; (void)filename; return NULL; #endif } MA_API void ma_dlclose(ma_log* pLog, ma_handle handle) { #ifndef MA_NO_RUNTIME_LINKING #ifdef MA_WIN32 FreeLibrary((HMODULE)handle); #else /* Hack for Android bug (see https://github.com/android/ndk/issues/360). Calling dlclose() pre-API 28 may segfault. */ #if !defined(MA_ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28) { dlclose((void*)handle); } #else { (void)handle; } #endif #endif (void)pLog; #else /* Runtime linking is disabled. */ (void)pLog; (void)handle; #endif } MA_API ma_proc ma_dlsym(ma_log* pLog, ma_handle handle, const char* symbol) { #ifndef MA_NO_RUNTIME_LINKING ma_proc proc; ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, "Loading symbol: %s\n", symbol); #ifdef _WIN32 proc = (ma_proc)GetProcAddress((HMODULE)handle, symbol); #else #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" #endif proc = (ma_proc)dlsym((void*)handle, symbol); #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || defined(__clang__) #pragma GCC diagnostic pop #endif #endif if (proc == NULL) { ma_log_postf(pLog, MA_LOG_LEVEL_WARNING, "Failed to load symbol: %s\n", symbol); } (void)pLog; /* It's possible for pContext to be unused. */ return proc; #else /* Runtime linking is disabled. */ (void)pLog; (void)handle; (void)symbol; return NULL; #endif } /************************************************************************************************************************************************************ ************************************************************************************************************************************************************* DEVICE I/O ========== ************************************************************************************************************************************************************* ************************************************************************************************************************************************************/ /* Disable run-time linking on certain backends and platforms. */ #ifndef MA_NO_RUNTIME_LINKING #if defined(MA_EMSCRIPTEN) || defined(MA_ORBIS) || defined(MA_PROSPERO) #define MA_NO_RUNTIME_LINKING #endif #endif #ifdef MA_APPLE #include #endif #ifndef MA_NO_DEVICE_IO #if defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200) #include /* For mach_absolute_time() */ #endif #ifdef MA_POSIX #include #include /* No need for dlfcn.h if we're not using runtime linking. */ #ifndef MA_NO_RUNTIME_LINKING #include #endif #endif /* This must be set to at least 26. */ #ifndef MA_AAUDIO_MIN_ANDROID_SDK_VERSION #define MA_AAUDIO_MIN_ANDROID_SDK_VERSION 27 #endif MA_API void ma_device_info_add_native_data_format(ma_device_info* pDeviceInfo, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags) { if (pDeviceInfo == NULL) { return; } if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats)) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } } typedef struct { ma_backend backend; const char* pName; } ma_backend_info; static ma_backend_info gBackendInfo[] = /* Indexed by the backend enum. Must be in the order backends are declared in the ma_backend enum. */ { {ma_backend_wasapi, "WASAPI"}, {ma_backend_dsound, "DirectSound"}, {ma_backend_winmm, "WinMM"}, {ma_backend_coreaudio, "Core Audio"}, {ma_backend_sndio, "sndio"}, {ma_backend_audio4, "audio(4)"}, {ma_backend_oss, "OSS"}, {ma_backend_pulseaudio, "PulseAudio"}, {ma_backend_alsa, "ALSA"}, {ma_backend_jack, "JACK"}, {ma_backend_aaudio, "AAudio"}, {ma_backend_opensl, "OpenSL|ES"}, {ma_backend_webaudio, "Web Audio"}, {ma_backend_custom, "Custom"}, {ma_backend_null, "Null"} }; MA_API const char* ma_get_backend_name(ma_backend backend) { if (backend < 0 || backend >= (int)ma_countof(gBackendInfo)) { return "Unknown"; } return gBackendInfo[backend].pName; } MA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend) { size_t iBackend; if (pBackendName == NULL) { return MA_INVALID_ARGS; } for (iBackend = 0; iBackend < ma_countof(gBackendInfo); iBackend += 1) { if (ma_strcmp(pBackendName, gBackendInfo[iBackend].pName) == 0) { if (pBackend != NULL) { *pBackend = gBackendInfo[iBackend].backend; } return MA_SUCCESS; } } /* Getting here means the backend name is unknown. */ return MA_INVALID_ARGS; } MA_API ma_bool32 ma_is_backend_enabled(ma_backend backend) { /* This looks a little bit gross, but we want all backends to be included in the switch to avoid warnings on some compilers about some enums not being handled by the switch statement. */ switch (backend) { case ma_backend_wasapi: #if defined(MA_HAS_WASAPI) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_dsound: #if defined(MA_HAS_DSOUND) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_winmm: #if defined(MA_HAS_WINMM) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_coreaudio: #if defined(MA_HAS_COREAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_sndio: #if defined(MA_HAS_SNDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_audio4: #if defined(MA_HAS_AUDIO4) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_oss: #if defined(MA_HAS_OSS) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_pulseaudio: #if defined(MA_HAS_PULSEAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_alsa: #if defined(MA_HAS_ALSA) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_jack: #if defined(MA_HAS_JACK) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_aaudio: #if defined(MA_HAS_AAUDIO) #if defined(MA_ANDROID) { return ma_android_sdk_version() >= MA_AAUDIO_MIN_ANDROID_SDK_VERSION; } #else return MA_FALSE; #endif #else return MA_FALSE; #endif case ma_backend_opensl: #if defined(MA_HAS_OPENSL) #if defined(MA_ANDROID) { return ma_android_sdk_version() >= 9; } #else return MA_TRUE; #endif #else return MA_FALSE; #endif case ma_backend_webaudio: #if defined(MA_HAS_WEBAUDIO) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_custom: #if defined(MA_HAS_CUSTOM) return MA_TRUE; #else return MA_FALSE; #endif case ma_backend_null: #if defined(MA_HAS_NULL) return MA_TRUE; #else return MA_FALSE; #endif default: return MA_FALSE; } } MA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount) { size_t backendCount; size_t iBackend; ma_result result = MA_SUCCESS; if (pBackendCount == NULL) { return MA_INVALID_ARGS; } backendCount = 0; for (iBackend = 0; iBackend <= ma_backend_null; iBackend += 1) { ma_backend backend = (ma_backend)iBackend; if (ma_is_backend_enabled(backend)) { /* The backend is enabled. Try adding it to the list. If there's no room, MA_NO_SPACE needs to be returned. */ if (backendCount == backendCap) { result = MA_NO_SPACE; break; } else { pBackends[backendCount] = backend; backendCount += 1; } } } if (pBackendCount != NULL) { *pBackendCount = backendCount; } return result; } MA_API ma_bool32 ma_is_loopback_supported(ma_backend backend) { switch (backend) { case ma_backend_wasapi: return MA_TRUE; case ma_backend_dsound: return MA_FALSE; case ma_backend_winmm: return MA_FALSE; case ma_backend_coreaudio: return MA_FALSE; case ma_backend_sndio: return MA_FALSE; case ma_backend_audio4: return MA_FALSE; case ma_backend_oss: return MA_FALSE; case ma_backend_pulseaudio: return MA_FALSE; case ma_backend_alsa: return MA_FALSE; case ma_backend_jack: return MA_FALSE; case ma_backend_aaudio: return MA_FALSE; case ma_backend_opensl: return MA_FALSE; case ma_backend_webaudio: return MA_FALSE; case ma_backend_custom: return MA_FALSE; /* <-- Will depend on the implementation of the backend. */ case ma_backend_null: return MA_FALSE; default: return MA_FALSE; } } #if defined(MA_WIN32) /* WASAPI error codes. */ #define MA_AUDCLNT_E_NOT_INITIALIZED ((HRESULT)0x88890001) #define MA_AUDCLNT_E_ALREADY_INITIALIZED ((HRESULT)0x88890002) #define MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE ((HRESULT)0x88890003) #define MA_AUDCLNT_E_DEVICE_INVALIDATED ((HRESULT)0x88890004) #define MA_AUDCLNT_E_NOT_STOPPED ((HRESULT)0x88890005) #define MA_AUDCLNT_E_BUFFER_TOO_LARGE ((HRESULT)0x88890006) #define MA_AUDCLNT_E_OUT_OF_ORDER ((HRESULT)0x88890007) #define MA_AUDCLNT_E_UNSUPPORTED_FORMAT ((HRESULT)0x88890008) #define MA_AUDCLNT_E_INVALID_SIZE ((HRESULT)0x88890009) #define MA_AUDCLNT_E_DEVICE_IN_USE ((HRESULT)0x8889000A) #define MA_AUDCLNT_E_BUFFER_OPERATION_PENDING ((HRESULT)0x8889000B) #define MA_AUDCLNT_E_THREAD_NOT_REGISTERED ((HRESULT)0x8889000C) #define MA_AUDCLNT_E_NO_SINGLE_PROCESS ((HRESULT)0x8889000D) #define MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED ((HRESULT)0x8889000E) #define MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED ((HRESULT)0x8889000F) #define MA_AUDCLNT_E_SERVICE_NOT_RUNNING ((HRESULT)0x88890010) #define MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED ((HRESULT)0x88890011) #define MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY ((HRESULT)0x88890012) #define MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL ((HRESULT)0x88890013) #define MA_AUDCLNT_E_EVENTHANDLE_NOT_SET ((HRESULT)0x88890014) #define MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE ((HRESULT)0x88890015) #define MA_AUDCLNT_E_BUFFER_SIZE_ERROR ((HRESULT)0x88890016) #define MA_AUDCLNT_E_CPUUSAGE_EXCEEDED ((HRESULT)0x88890017) #define MA_AUDCLNT_E_BUFFER_ERROR ((HRESULT)0x88890018) #define MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED ((HRESULT)0x88890019) #define MA_AUDCLNT_E_INVALID_DEVICE_PERIOD ((HRESULT)0x88890020) #define MA_AUDCLNT_E_INVALID_STREAM_FLAG ((HRESULT)0x88890021) #define MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE ((HRESULT)0x88890022) #define MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES ((HRESULT)0x88890023) #define MA_AUDCLNT_E_OFFLOAD_MODE_ONLY ((HRESULT)0x88890024) #define MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY ((HRESULT)0x88890025) #define MA_AUDCLNT_E_RESOURCES_INVALIDATED ((HRESULT)0x88890026) #define MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED ((HRESULT)0x88890027) #define MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED ((HRESULT)0x88890028) #define MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED ((HRESULT)0x88890029) #define MA_AUDCLNT_E_HEADTRACKING_ENABLED ((HRESULT)0x88890030) #define MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED ((HRESULT)0x88890040) #define MA_AUDCLNT_S_BUFFER_EMPTY ((HRESULT)0x08890001) #define MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED ((HRESULT)0x08890002) #define MA_AUDCLNT_S_POSITION_STALLED ((HRESULT)0x08890003) #define MA_DS_OK ((HRESULT)0) #define MA_DS_NO_VIRTUALIZATION ((HRESULT)0x0878000A) #define MA_DSERR_ALLOCATED ((HRESULT)0x8878000A) #define MA_DSERR_CONTROLUNAVAIL ((HRESULT)0x8878001E) #define MA_DSERR_INVALIDPARAM ((HRESULT)0x80070057) /*E_INVALIDARG*/ #define MA_DSERR_INVALIDCALL ((HRESULT)0x88780032) #define MA_DSERR_GENERIC ((HRESULT)0x80004005) /*E_FAIL*/ #define MA_DSERR_PRIOLEVELNEEDED ((HRESULT)0x88780046) #define MA_DSERR_OUTOFMEMORY ((HRESULT)0x8007000E) /*E_OUTOFMEMORY*/ #define MA_DSERR_BADFORMAT ((HRESULT)0x88780064) #define MA_DSERR_UNSUPPORTED ((HRESULT)0x80004001) /*E_NOTIMPL*/ #define MA_DSERR_NODRIVER ((HRESULT)0x88780078) #define MA_DSERR_ALREADYINITIALIZED ((HRESULT)0x88780082) #define MA_DSERR_NOAGGREGATION ((HRESULT)0x80040110) /*CLASS_E_NOAGGREGATION*/ #define MA_DSERR_BUFFERLOST ((HRESULT)0x88780096) #define MA_DSERR_OTHERAPPHASPRIO ((HRESULT)0x887800A0) #define MA_DSERR_UNINITIALIZED ((HRESULT)0x887800AA) #define MA_DSERR_NOINTERFACE ((HRESULT)0x80004002) /*E_NOINTERFACE*/ #define MA_DSERR_ACCESSDENIED ((HRESULT)0x80070005) /*E_ACCESSDENIED*/ #define MA_DSERR_BUFFERTOOSMALL ((HRESULT)0x887800B4) #define MA_DSERR_DS8_REQUIRED ((HRESULT)0x887800BE) #define MA_DSERR_SENDLOOP ((HRESULT)0x887800C8) #define MA_DSERR_BADSENDBUFFERGUID ((HRESULT)0x887800D2) #define MA_DSERR_OBJECTNOTFOUND ((HRESULT)0x88781161) #define MA_DSERR_FXUNAVAILABLE ((HRESULT)0x887800DC) static ma_result ma_result_from_HRESULT(HRESULT hr) { switch (hr) { case NOERROR: return MA_SUCCESS; /*case S_OK: return MA_SUCCESS;*/ case E_POINTER: return MA_INVALID_ARGS; case E_UNEXPECTED: return MA_ERROR; case E_NOTIMPL: return MA_NOT_IMPLEMENTED; case E_OUTOFMEMORY: return MA_OUT_OF_MEMORY; case E_INVALIDARG: return MA_INVALID_ARGS; case E_NOINTERFACE: return MA_API_NOT_FOUND; case E_HANDLE: return MA_INVALID_ARGS; case E_ABORT: return MA_ERROR; case E_FAIL: return MA_ERROR; case E_ACCESSDENIED: return MA_ACCESS_DENIED; /* WASAPI */ case MA_AUDCLNT_E_NOT_INITIALIZED: return MA_DEVICE_NOT_INITIALIZED; case MA_AUDCLNT_E_ALREADY_INITIALIZED: return MA_DEVICE_ALREADY_INITIALIZED; case MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_DEVICE_INVALIDATED: return MA_UNAVAILABLE; case MA_AUDCLNT_E_NOT_STOPPED: return MA_DEVICE_NOT_STOPPED; case MA_AUDCLNT_E_BUFFER_TOO_LARGE: return MA_TOO_BIG; case MA_AUDCLNT_E_OUT_OF_ORDER: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_UNSUPPORTED_FORMAT: return MA_FORMAT_NOT_SUPPORTED; case MA_AUDCLNT_E_INVALID_SIZE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_DEVICE_IN_USE: return MA_BUSY; case MA_AUDCLNT_E_BUFFER_OPERATION_PENDING: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_THREAD_NOT_REGISTERED: return MA_DOES_NOT_EXIST; case MA_AUDCLNT_E_NO_SINGLE_PROCESS: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED: return MA_SHARE_MODE_NOT_SUPPORTED; case MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED: return MA_FAILED_TO_OPEN_BACKEND_DEVICE; case MA_AUDCLNT_E_SERVICE_NOT_RUNNING: return MA_NOT_CONNECTED; case MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED: return MA_INVALID_ARGS; case MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY: return MA_SHARE_MODE_NOT_SUPPORTED; case MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL: return MA_INVALID_ARGS; case MA_AUDCLNT_E_EVENTHANDLE_NOT_SET: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE: return MA_INVALID_ARGS; case MA_AUDCLNT_E_BUFFER_SIZE_ERROR: return MA_INVALID_ARGS; case MA_AUDCLNT_E_CPUUSAGE_EXCEEDED: return MA_ERROR; case MA_AUDCLNT_E_BUFFER_ERROR: return MA_ERROR; case MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INVALID_DEVICE_PERIOD: return MA_INVALID_ARGS; case MA_AUDCLNT_E_INVALID_STREAM_FLAG: return MA_INVALID_ARGS; case MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES: return MA_OUT_OF_MEMORY; case MA_AUDCLNT_E_OFFLOAD_MODE_ONLY: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_RESOURCES_INVALIDATED: return MA_INVALID_DATA; case MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_HEADTRACKING_ENABLED: return MA_INVALID_OPERATION; case MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED: return MA_INVALID_OPERATION; case MA_AUDCLNT_S_BUFFER_EMPTY: return MA_NO_SPACE; case MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED: return MA_ALREADY_EXISTS; case MA_AUDCLNT_S_POSITION_STALLED: return MA_ERROR; /* DirectSound */ /*case MA_DS_OK: return MA_SUCCESS;*/ /* S_OK */ case MA_DS_NO_VIRTUALIZATION: return MA_SUCCESS; case MA_DSERR_ALLOCATED: return MA_ALREADY_IN_USE; case MA_DSERR_CONTROLUNAVAIL: return MA_INVALID_OPERATION; /*case MA_DSERR_INVALIDPARAM: return MA_INVALID_ARGS;*/ /* E_INVALIDARG */ case MA_DSERR_INVALIDCALL: return MA_INVALID_OPERATION; /*case MA_DSERR_GENERIC: return MA_ERROR;*/ /* E_FAIL */ case MA_DSERR_PRIOLEVELNEEDED: return MA_INVALID_OPERATION; /*case MA_DSERR_OUTOFMEMORY: return MA_OUT_OF_MEMORY;*/ /* E_OUTOFMEMORY */ case MA_DSERR_BADFORMAT: return MA_FORMAT_NOT_SUPPORTED; /*case MA_DSERR_UNSUPPORTED: return MA_NOT_IMPLEMENTED;*/ /* E_NOTIMPL */ case MA_DSERR_NODRIVER: return MA_FAILED_TO_INIT_BACKEND; case MA_DSERR_ALREADYINITIALIZED: return MA_DEVICE_ALREADY_INITIALIZED; case MA_DSERR_NOAGGREGATION: return MA_ERROR; case MA_DSERR_BUFFERLOST: return MA_UNAVAILABLE; case MA_DSERR_OTHERAPPHASPRIO: return MA_ACCESS_DENIED; case MA_DSERR_UNINITIALIZED: return MA_DEVICE_NOT_INITIALIZED; /*case MA_DSERR_NOINTERFACE: return MA_API_NOT_FOUND;*/ /* E_NOINTERFACE */ /*case MA_DSERR_ACCESSDENIED: return MA_ACCESS_DENIED;*/ /* E_ACCESSDENIED */ case MA_DSERR_BUFFERTOOSMALL: return MA_NO_SPACE; case MA_DSERR_DS8_REQUIRED: return MA_INVALID_OPERATION; case MA_DSERR_SENDLOOP: return MA_DEADLOCK; case MA_DSERR_BADSENDBUFFERGUID: return MA_INVALID_ARGS; case MA_DSERR_OBJECTNOTFOUND: return MA_NO_DEVICE; case MA_DSERR_FXUNAVAILABLE: return MA_UNAVAILABLE; default: return MA_ERROR; } } /* PROPVARIANT */ #define MA_VT_LPWSTR 31 #define MA_VT_BLOB 65 #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif typedef struct { WORD vt; WORD wReserved1; WORD wReserved2; WORD wReserved3; union { struct { ULONG cbSize; BYTE* pBlobData; } blob; WCHAR* pwszVal; char pad[16]; /* Just to ensure the size of the struct matches the official version. */ }; } MA_PROPVARIANT; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop #endif typedef HRESULT (WINAPI * MA_PFN_CoInitialize)(void* pvReserved); typedef HRESULT (WINAPI * MA_PFN_CoInitializeEx)(void* pvReserved, DWORD dwCoInit); typedef void (WINAPI * MA_PFN_CoUninitialize)(void); typedef HRESULT (WINAPI * MA_PFN_CoCreateInstance)(const IID* rclsid, void* pUnkOuter, DWORD dwClsContext, const IID* riid, void* ppv); typedef void (WINAPI * MA_PFN_CoTaskMemFree)(void* pv); typedef HRESULT (WINAPI * MA_PFN_PropVariantClear)(MA_PROPVARIANT *pvar); typedef int (WINAPI * MA_PFN_StringFromGUID2)(const GUID* const rguid, WCHAR* lpsz, int cchMax); typedef HWND (WINAPI * MA_PFN_GetForegroundWindow)(void); typedef HWND (WINAPI * MA_PFN_GetDesktopWindow)(void); #if defined(MA_WIN32_DESKTOP) /* Microsoft documents these APIs as returning LSTATUS, but the Win32 API shipping with some compilers do not define it. It's just a LONG. */ typedef LONG (WINAPI * MA_PFN_RegOpenKeyExA)(HKEY hKey, const char* lpSubKey, DWORD ulOptions, DWORD samDesired, HKEY* phkResult); typedef LONG (WINAPI * MA_PFN_RegCloseKey)(HKEY hKey); typedef LONG (WINAPI * MA_PFN_RegQueryValueExA)(HKEY hKey, const char* lpValueName, DWORD* lpReserved, DWORD* lpType, BYTE* lpData, DWORD* lpcbData); #endif /* MA_WIN32_DESKTOP */ MA_API size_t ma_strlen_WCHAR(const WCHAR* str) { size_t len = 0; while (str[len] != '\0') { len += 1; } return len; } MA_API int ma_strcmp_WCHAR(const WCHAR *s1, const WCHAR *s2) { while (*s1 != '\0' && *s1 == *s2) { s1 += 1; s2 += 1; } return *s1 - *s2; } MA_API int ma_strcpy_s_WCHAR(WCHAR* dst, size_t dstCap, const WCHAR* src) { size_t i; if (dst == 0) { return 22; } if (dstCap == 0) { return 34; } if (src == 0) { dst[0] = '\0'; return 22; } for (i = 0; i < dstCap && src[i] != '\0'; ++i) { dst[i] = src[i]; } if (i < dstCap) { dst[i] = '\0'; return 0; } dst[0] = '\0'; return 34; } #endif /* MA_WIN32 */ #define MA_DEFAULT_PLAYBACK_DEVICE_NAME "Default Playback Device" #define MA_DEFAULT_CAPTURE_DEVICE_NAME "Default Capture Device" /******************************************************************************* Timing *******************************************************************************/ #if defined(MA_WIN32) && !defined(MA_POSIX) static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */ static void ma_timer_init(ma_timer* pTimer) { LARGE_INTEGER counter; if (g_ma_TimerFrequency.QuadPart == 0) { QueryPerformanceFrequency(&g_ma_TimerFrequency); } QueryPerformanceCounter(&counter); pTimer->counter = counter.QuadPart; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { LARGE_INTEGER counter; if (!QueryPerformanceCounter(&counter)) { return 0; } return (double)(counter.QuadPart - pTimer->counter) / g_ma_TimerFrequency.QuadPart; } #elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200) static ma_uint64 g_ma_TimerFrequency = 0; static void ma_timer_init(ma_timer* pTimer) { mach_timebase_info_data_t baseTime; mach_timebase_info(&baseTime); g_ma_TimerFrequency = (baseTime.denom * 1e9) / baseTime.numer; pTimer->counter = mach_absolute_time(); } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter = mach_absolute_time(); ma_uint64 oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / g_ma_TimerFrequency; } #elif defined(MA_EMSCRIPTEN) static MA_INLINE void ma_timer_init(ma_timer* pTimer) { pTimer->counterD = emscripten_get_now(); } static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer) { return (emscripten_get_now() - pTimer->counterD) / 1000; /* Emscripten is in milliseconds. */ } #else #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L #if defined(CLOCK_MONOTONIC) #define MA_CLOCK_ID CLOCK_MONOTONIC #else #define MA_CLOCK_ID CLOCK_REALTIME #endif static void ma_timer_init(ma_timer* pTimer) { struct timespec newTime; clock_gettime(MA_CLOCK_ID, &newTime); pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter; ma_uint64 oldTimeCounter; struct timespec newTime; clock_gettime(MA_CLOCK_ID, &newTime); newTimeCounter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec; oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / 1000000000.0; } #else static void ma_timer_init(ma_timer* pTimer) { struct timeval newTime; gettimeofday(&newTime, NULL); pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec; } static double ma_timer_get_time_in_seconds(ma_timer* pTimer) { ma_uint64 newTimeCounter; ma_uint64 oldTimeCounter; struct timeval newTime; gettimeofday(&newTime, NULL); newTimeCounter = (newTime.tv_sec * 1000000) + newTime.tv_usec; oldTimeCounter = pTimer->counter; return (newTimeCounter - oldTimeCounter) / 1000000.0; } #endif #endif #if 0 static ma_uint32 ma_get_closest_standard_sample_rate(ma_uint32 sampleRateIn) { ma_uint32 closestRate = 0; ma_uint32 closestDiff = 0xFFFFFFFF; size_t iStandardRate; for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate]; ma_uint32 diff; if (sampleRateIn > standardRate) { diff = sampleRateIn - standardRate; } else { diff = standardRate - sampleRateIn; } if (diff == 0) { return standardRate; /* The input sample rate is a standard rate. */ } if (closestDiff > diff) { closestDiff = diff; closestRate = standardRate; } } return closestRate; } #endif static MA_INLINE unsigned int ma_device_disable_denormals(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (!pDevice->noDisableDenormals) { return ma_disable_denormals(); } else { return 0; } } static MA_INLINE void ma_device_restore_denormals(ma_device* pDevice, unsigned int prevState) { MA_ASSERT(pDevice != NULL); if (!pDevice->noDisableDenormals) { ma_restore_denormals(prevState); } else { /* Do nothing. */ (void)prevState; } } static ma_device_notification ma_device_notification_init(ma_device* pDevice, ma_device_notification_type type) { ma_device_notification notification; MA_ZERO_OBJECT(¬ification); notification.pDevice = pDevice; notification.type = type; return notification; } static void ma_device__on_notification(ma_device_notification notification) { MA_ASSERT(notification.pDevice != NULL); if (notification.pDevice->onNotification != NULL) { notification.pDevice->onNotification(¬ification); } /* TEMP FOR COMPATIBILITY: If it's a stopped notification, fire the onStop callback as well. This is only for backwards compatibility and will be removed. */ if (notification.pDevice->onStop != NULL && notification.type == ma_device_notification_type_stopped) { notification.pDevice->onStop(notification.pDevice); } } static void ma_device__on_notification_started(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_started)); } static void ma_device__on_notification_stopped(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_stopped)); } /* Not all platforms support reroute notifications. */ #if !defined(MA_EMSCRIPTEN) static void ma_device__on_notification_rerouted(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_rerouted)); } #endif #if defined(MA_EMSCRIPTEN) #ifdef __cplusplus extern "C" { #endif void EMSCRIPTEN_KEEPALIVE ma_device__on_notification_unlocked(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_unlocked)); } #ifdef __cplusplus } #endif #endif static void ma_device__on_data_inner(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { MA_ASSERT(pDevice != NULL); MA_ASSERT(pDevice->onData != NULL); if (!pDevice->noPreSilencedOutputBuffer && pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels); } pDevice->onData(pDevice, pFramesOut, pFramesIn, frameCount); } static void ma_device__on_data(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { MA_ASSERT(pDevice != NULL); /* Don't read more data from the client if we're in the process of stopping. */ if (ma_device_get_state(pDevice) == ma_device_state_stopping) { return; } if (pDevice->noFixedSizedCallback) { /* Fast path. Not using a fixed sized callback. Process directly from the specified buffers. */ ma_device__on_data_inner(pDevice, pFramesOut, pFramesIn, frameCount); } else { /* Slow path. Using a fixed sized callback. Need to use the intermediary buffer. */ ma_uint32 totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { ma_uint32 totalFramesRemaining = frameCount - totalFramesProcessed; ma_uint32 framesToProcessThisIteration = 0; if (pFramesIn != NULL) { /* Capturing. Write to the intermediary buffer. If there's no room, fire the callback to empty it. */ if (pDevice->capture.intermediaryBufferLen < pDevice->capture.intermediaryBufferCap) { /* There's some room left in the intermediary buffer. Write to it without firing the callback. */ framesToProcessThisIteration = totalFramesRemaining; if (framesToProcessThisIteration > pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen) { framesToProcessThisIteration = pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen; } ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferLen, pDevice->capture.format, pDevice->capture.channels), ma_offset_pcm_frames_const_ptr(pFramesIn, totalFramesProcessed, pDevice->capture.format, pDevice->capture.channels), framesToProcessThisIteration, pDevice->capture.format, pDevice->capture.channels); pDevice->capture.intermediaryBufferLen += framesToProcessThisIteration; } if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) { /* No room left in the intermediary buffer. Fire the data callback. */ if (pDevice->type == ma_device_type_duplex) { /* We'll do the duplex data callback later after we've processed the playback data. */ } else { ma_device__on_data_inner(pDevice, NULL, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap); /* The intermediary buffer has just been drained. */ pDevice->capture.intermediaryBufferLen = 0; } } } if (pFramesOut != NULL) { /* Playing back. Read from the intermediary buffer. If there's nothing in it, fire the callback to fill it. */ if (pDevice->playback.intermediaryBufferLen > 0) { /* There's some content in the intermediary buffer. Read from that without firing the callback. */ if (pDevice->type == ma_device_type_duplex) { /* The frames processed this iteration for a duplex device will always be based on the capture side. Leave it unmodified. */ } else { framesToProcessThisIteration = totalFramesRemaining; if (framesToProcessThisIteration > pDevice->playback.intermediaryBufferLen) { framesToProcessThisIteration = pDevice->playback.intermediaryBufferLen; } } ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, pDevice->playback.format, pDevice->playback.channels), ma_offset_pcm_frames_ptr(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap - pDevice->playback.intermediaryBufferLen, pDevice->playback.format, pDevice->playback.channels), framesToProcessThisIteration, pDevice->playback.format, pDevice->playback.channels); pDevice->playback.intermediaryBufferLen -= framesToProcessThisIteration; } if (pDevice->playback.intermediaryBufferLen == 0) { /* There's nothing in the intermediary buffer. Fire the data callback to fill it. */ if (pDevice->type == ma_device_type_duplex) { /* In duplex mode, the data callback will be fired later. Nothing to do here. */ } else { ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, NULL, pDevice->playback.intermediaryBufferCap); /* The intermediary buffer has just been filled. */ pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap; } } } /* If we're in duplex mode we might need to do a refill of the data. */ if (pDevice->type == ma_device_type_duplex) { if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) { ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap); pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap; /* The playback buffer will have just been filled. */ pDevice->capture.intermediaryBufferLen = 0; /* The intermediary buffer has just been drained. */ } } /* Make sure this is only incremented once in the duplex case. */ totalFramesProcessed += framesToProcessThisIteration; } } } static void ma_device__handle_data_callback(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { float masterVolumeFactor; ma_device_get_master_volume(pDevice, &masterVolumeFactor); /* Use ma_device_get_master_volume() to ensure the volume is loaded atomically. */ if (pDevice->onData) { unsigned int prevDenormalState = ma_device_disable_denormals(pDevice); { /* Volume control of input makes things a bit awkward because the input buffer is read-only. We'll need to use a temp buffer and loop in this case. */ if (pFramesIn != NULL && masterVolumeFactor != 1) { ma_uint8 tempFramesIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 bpfCapture = ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint32 bpfPlayback = ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint32 totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { ma_uint32 framesToProcessThisIteration = frameCount - totalFramesProcessed; if (framesToProcessThisIteration > sizeof(tempFramesIn)/bpfCapture) { framesToProcessThisIteration = sizeof(tempFramesIn)/bpfCapture; } ma_copy_and_apply_volume_factor_pcm_frames(tempFramesIn, ma_offset_ptr(pFramesIn, totalFramesProcessed*bpfCapture), framesToProcessThisIteration, pDevice->capture.format, pDevice->capture.channels, masterVolumeFactor); ma_device__on_data(pDevice, ma_offset_ptr(pFramesOut, totalFramesProcessed*bpfPlayback), tempFramesIn, framesToProcessThisIteration); totalFramesProcessed += framesToProcessThisIteration; } } else { ma_device__on_data(pDevice, pFramesOut, pFramesIn, frameCount); } /* Volume control and clipping for playback devices. */ if (pFramesOut != NULL) { if (masterVolumeFactor != 1) { if (pFramesIn == NULL) { /* <-- In full-duplex situations, the volume will have been applied to the input samples before the data callback. Applying it again post-callback will incorrectly compound it. */ ma_apply_volume_factor_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels, masterVolumeFactor); } } if (!pDevice->noClip && pDevice->playback.format == ma_format_f32) { ma_clip_samples_f32((float*)pFramesOut, (const float*)pFramesOut, frameCount * pDevice->playback.channels); /* Intentionally specifying the same pointer for both input and output for in-place processing. */ } } } ma_device_restore_denormals(pDevice, prevDenormalState); } else { /* No data callback. Just silence the output. */ if (pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels); } } } /* A helper function for reading sample data from the client. */ static void ma_device__read_frames_from_client(ma_device* pDevice, ma_uint32 frameCount, void* pFramesOut) { MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCount > 0); MA_ASSERT(pFramesOut != NULL); if (pDevice->playback.converter.isPassthrough) { ma_device__handle_data_callback(pDevice, pFramesOut, NULL, frameCount); } else { ma_result result; ma_uint64 totalFramesReadOut; void* pRunningFramesOut; totalFramesReadOut = 0; pRunningFramesOut = pFramesOut; /* We run slightly different logic depending on whether or not we're using a heap-allocated buffer for caching input data. This will be the case if the data converter does not have the ability to retrieve the required input frame count for a given output frame count. */ if (pDevice->playback.pInputCache != NULL) { while (totalFramesReadOut < frameCount) { ma_uint64 framesToReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; /* If there's any data available in the cache, that needs to get processed first. */ if (pDevice->playback.inputCacheRemaining > 0) { framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > pDevice->playback.inputCacheRemaining) { framesToReadThisIterationIn = pDevice->playback.inputCacheRemaining; } result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut); if (result != MA_SUCCESS) { break; } pDevice->playback.inputCacheConsumed += framesToReadThisIterationIn; pDevice->playback.inputCacheRemaining -= framesToReadThisIterationIn; totalFramesReadOut += framesToReadThisIterationOut; pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) { break; /* We're done. */ } } /* Getting here means there's no data in the cache and we need to fill it up with data from the client. */ if (pDevice->playback.inputCacheRemaining == 0) { ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, NULL, (ma_uint32)pDevice->playback.inputCacheCap); pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = pDevice->playback.inputCacheCap; } } } else { while (totalFramesReadOut < frameCount) { ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In client format. */ ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint64 framesToReadThisIterationIn; ma_uint64 framesReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; ma_uint64 framesReadThisIterationOut; ma_uint64 requiredInputFrameCount; framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > intermediaryBufferCap) { framesToReadThisIterationIn = intermediaryBufferCap; } ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, framesToReadThisIterationOut, &requiredInputFrameCount); if (framesToReadThisIterationIn > requiredInputFrameCount) { framesToReadThisIterationIn = requiredInputFrameCount; } ma_device__handle_data_callback(pDevice, pIntermediaryBuffer, NULL, (ma_uint32)framesToReadThisIterationIn); /* At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any input frames, we still want to try processing frames because there may some output frames generated from cached input data. */ framesReadThisIterationIn = framesToReadThisIterationIn; framesReadThisIterationOut = framesToReadThisIterationOut; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut); if (result != MA_SUCCESS) { break; } totalFramesReadOut += framesReadThisIterationOut; pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) { break; /* We're done. */ } } } } } /* A helper for sending sample data to the client. */ static void ma_device__send_frames_to_client(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat) { MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCountInDeviceFormat > 0); MA_ASSERT(pFramesInDeviceFormat != NULL); if (pDevice->capture.converter.isPassthrough) { ma_device__handle_data_callback(pDevice, NULL, pFramesInDeviceFormat, frameCountInDeviceFormat); } else { ma_result result; ma_uint8 pFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint64 framesInClientFormatCap = sizeof(pFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint64 totalDeviceFramesProcessed = 0; ma_uint64 totalClientFramesProcessed = 0; const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat; /* We just keep going until we've exhausted all of our input frames and cannot generate any more output frames. */ for (;;) { ma_uint64 deviceFramesProcessedThisIteration; ma_uint64 clientFramesProcessedThisIteration; deviceFramesProcessedThisIteration = (frameCountInDeviceFormat - totalDeviceFramesProcessed); clientFramesProcessedThisIteration = framesInClientFormatCap; result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &deviceFramesProcessedThisIteration, pFramesInClientFormat, &clientFramesProcessedThisIteration); if (result != MA_SUCCESS) { break; } if (clientFramesProcessedThisIteration > 0) { ma_device__handle_data_callback(pDevice, NULL, pFramesInClientFormat, (ma_uint32)clientFramesProcessedThisIteration); /* Safe cast. */ } pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, deviceFramesProcessedThisIteration * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); totalDeviceFramesProcessed += deviceFramesProcessedThisIteration; totalClientFramesProcessed += clientFramesProcessedThisIteration; /* This is just to silence a warning. I might want to use this variable later so leaving in place for now. */ (void)totalClientFramesProcessed; if (deviceFramesProcessedThisIteration == 0 && clientFramesProcessedThisIteration == 0) { break; /* We're done. */ } } } } static ma_result ma_device__handle_duplex_callback_capture(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat, ma_pcm_rb* pRB) { ma_result result; ma_uint32 totalDeviceFramesProcessed = 0; const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat; MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCountInDeviceFormat > 0); MA_ASSERT(pFramesInDeviceFormat != NULL); MA_ASSERT(pRB != NULL); /* Write to the ring buffer. The ring buffer is in the client format which means we need to convert. */ for (;;) { ma_uint32 framesToProcessInDeviceFormat = (frameCountInDeviceFormat - totalDeviceFramesProcessed); ma_uint32 framesToProcessInClientFormat = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint64 framesProcessedInDeviceFormat; ma_uint64 framesProcessedInClientFormat; void* pFramesInClientFormat; result = ma_pcm_rb_acquire_write(pRB, &framesToProcessInClientFormat, &pFramesInClientFormat); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "Failed to acquire capture PCM frames from ring buffer."); break; } if (framesToProcessInClientFormat == 0) { if (ma_pcm_rb_pointer_distance(pRB) == (ma_int32)ma_pcm_rb_get_subbuffer_size(pRB)) { break; /* Overrun. Not enough room in the ring buffer for input frame. Excess frames are dropped. */ } } /* Convert. */ framesProcessedInDeviceFormat = framesToProcessInDeviceFormat; framesProcessedInClientFormat = framesToProcessInClientFormat; result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &framesProcessedInDeviceFormat, pFramesInClientFormat, &framesProcessedInClientFormat); if (result != MA_SUCCESS) { break; } result = ma_pcm_rb_commit_write(pRB, (ma_uint32)framesProcessedInClientFormat); /* Safe cast. */ if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "Failed to commit capture PCM frames to ring buffer."); break; } pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, framesProcessedInDeviceFormat * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); totalDeviceFramesProcessed += (ma_uint32)framesProcessedInDeviceFormat; /* Safe cast. */ /* We're done when we're unable to process any client nor device frames. */ if (framesProcessedInClientFormat == 0 && framesProcessedInDeviceFormat == 0) { break; /* Done. */ } } return MA_SUCCESS; } static ma_result ma_device__handle_duplex_callback_playback(ma_device* pDevice, ma_uint32 frameCount, void* pFramesInInternalFormat, ma_pcm_rb* pRB) { ma_result result; ma_uint8 silentInputFrames[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 totalFramesReadOut = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(frameCount > 0); MA_ASSERT(pFramesInInternalFormat != NULL); MA_ASSERT(pRB != NULL); MA_ASSERT(pDevice->playback.pInputCache != NULL); /* Sitting in the ring buffer should be captured data from the capture callback in external format. If there's not enough data in there for the whole frameCount frames we just use silence instead for the input data. */ MA_ZERO_MEMORY(silentInputFrames, sizeof(silentInputFrames)); while (totalFramesReadOut < frameCount && ma_device_is_started(pDevice)) { /* We should have a buffer allocated on the heap. Any playback frames still sitting in there need to be sent to the internal device before we process any more data from the client. */ if (pDevice->playback.inputCacheRemaining > 0) { ma_uint64 framesConvertedIn = pDevice->playback.inputCacheRemaining; ma_uint64 framesConvertedOut = (frameCount - totalFramesReadOut); ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesConvertedIn, pFramesInInternalFormat, &framesConvertedOut); pDevice->playback.inputCacheConsumed += framesConvertedIn; pDevice->playback.inputCacheRemaining -= framesConvertedIn; totalFramesReadOut += (ma_uint32)framesConvertedOut; /* Safe cast. */ pFramesInInternalFormat = ma_offset_ptr(pFramesInInternalFormat, framesConvertedOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); } /* If there's no more data in the cache we'll need to fill it with some. */ if (totalFramesReadOut < frameCount && pDevice->playback.inputCacheRemaining == 0) { ma_uint32 inputFrameCount; void* pInputFrames; inputFrameCount = (ma_uint32)pDevice->playback.inputCacheCap; result = ma_pcm_rb_acquire_read(pRB, &inputFrameCount, &pInputFrames); if (result == MA_SUCCESS) { if (inputFrameCount > 0) { ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, pInputFrames, inputFrameCount); } else { if (ma_pcm_rb_pointer_distance(pRB) == 0) { break; /* Underrun. */ } } } else { /* No capture data available. Feed in silence. */ inputFrameCount = (ma_uint32)ma_min(pDevice->playback.inputCacheCap, sizeof(silentInputFrames) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels)); ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, silentInputFrames, inputFrameCount); } pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = inputFrameCount; result = ma_pcm_rb_commit_read(pRB, inputFrameCount); if (result != MA_SUCCESS) { return result; /* Should never happen. */ } } } return MA_SUCCESS; } /* A helper for changing the state of the device. */ static MA_INLINE void ma_device__set_state(ma_device* pDevice, ma_device_state newState) { ma_atomic_device_state_set(&pDevice->state, newState); } #if defined(MA_WIN32) static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_ALAW = {0x00000006, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/ /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_MULAW = {0x00000007, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/ #endif MA_API ma_uint32 ma_get_format_priority_index(ma_format format) /* Lower = better. */ { ma_uint32 i; for (i = 0; i < ma_countof(g_maFormatPriorities); ++i) { if (g_maFormatPriorities[i] == format) { return i; } } /* Getting here means the format could not be found or is equal to ma_format_unknown. */ return (ma_uint32)-1; } static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType); static ma_bool32 ma_device_descriptor_is_valid(const ma_device_descriptor* pDeviceDescriptor) { if (pDeviceDescriptor == NULL) { return MA_FALSE; } if (pDeviceDescriptor->format == ma_format_unknown) { return MA_FALSE; } if (pDeviceDescriptor->channels == 0 || pDeviceDescriptor->channels > MA_MAX_CHANNELS) { return MA_FALSE; } if (pDeviceDescriptor->sampleRate == 0) { return MA_FALSE; } return MA_TRUE; } static ma_result ma_device_audio_thread__default_read_write(ma_device* pDevice) { ma_result result = MA_SUCCESS; ma_bool32 exitLoop = MA_FALSE; ma_uint8 capturedDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint8 playbackDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 capturedDeviceDataCapInFrames = 0; ma_uint32 playbackDeviceDataCapInFrames = 0; MA_ASSERT(pDevice != NULL); /* Just some quick validation on the device type and the available callbacks. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { if (pDevice->pContext->callbacks.onDeviceRead == NULL) { return MA_NOT_IMPLEMENTED; } capturedDeviceDataCapInFrames = sizeof(capturedDeviceData) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->pContext->callbacks.onDeviceWrite == NULL) { return MA_NOT_IMPLEMENTED; } playbackDeviceDataCapInFrames = sizeof(playbackDeviceData) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } /* NOTE: The device was started outside of this function, in the worker thread. */ while (ma_device_get_state(pDevice) == ma_device_state_started && !exitLoop) { switch (pDevice->type) { case ma_device_type_duplex: { /* The process is: onDeviceRead() -> convert -> callback -> convert -> onDeviceWrite() */ ma_uint32 totalCapturedDeviceFramesProcessed = 0; ma_uint32 capturedDevicePeriodSizeInFrames = ma_min(pDevice->capture.internalPeriodSizeInFrames, pDevice->playback.internalPeriodSizeInFrames); while (totalCapturedDeviceFramesProcessed < capturedDevicePeriodSizeInFrames) { ma_uint32 capturedDeviceFramesRemaining; ma_uint32 capturedDeviceFramesProcessed; ma_uint32 capturedDeviceFramesToProcess; ma_uint32 capturedDeviceFramesToTryProcessing = capturedDevicePeriodSizeInFrames - totalCapturedDeviceFramesProcessed; if (capturedDeviceFramesToTryProcessing > capturedDeviceDataCapInFrames) { capturedDeviceFramesToTryProcessing = capturedDeviceDataCapInFrames; } result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, capturedDeviceFramesToTryProcessing, &capturedDeviceFramesToProcess); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } capturedDeviceFramesRemaining = capturedDeviceFramesToProcess; capturedDeviceFramesProcessed = 0; /* At this point we have our captured data in device format and we now need to convert it to client format. */ for (;;) { ma_uint8 capturedClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint8 playbackClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 capturedClientDataCapInFrames = sizeof(capturedClientData) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint32 playbackClientDataCapInFrames = sizeof(playbackClientData) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint64 capturedClientFramesToProcessThisIteration = ma_min(capturedClientDataCapInFrames, playbackClientDataCapInFrames); ma_uint64 capturedDeviceFramesToProcessThisIteration = capturedDeviceFramesRemaining; ma_uint8* pRunningCapturedDeviceFrames = ma_offset_ptr(capturedDeviceData, capturedDeviceFramesProcessed * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); /* Convert capture data from device format to client format. */ result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningCapturedDeviceFrames, &capturedDeviceFramesToProcessThisIteration, capturedClientData, &capturedClientFramesToProcessThisIteration); if (result != MA_SUCCESS) { break; } /* If we weren't able to generate any output frames it must mean we've exhausted all of our input. The only time this would not be the case is if capturedClientData was too small which should never be the case when it's of the size MA_DATA_CONVERTER_STACK_BUFFER_SIZE. */ if (capturedClientFramesToProcessThisIteration == 0) { break; } ma_device__handle_data_callback(pDevice, playbackClientData, capturedClientData, (ma_uint32)capturedClientFramesToProcessThisIteration); /* Safe cast .*/ capturedDeviceFramesProcessed += (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */ capturedDeviceFramesRemaining -= (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */ /* At this point the playbackClientData buffer should be holding data that needs to be written to the device. */ for (;;) { ma_uint64 convertedClientFrameCount = capturedClientFramesToProcessThisIteration; ma_uint64 convertedDeviceFrameCount = playbackDeviceDataCapInFrames; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, playbackClientData, &convertedClientFrameCount, playbackDeviceData, &convertedDeviceFrameCount); if (result != MA_SUCCESS) { break; } result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, (ma_uint32)convertedDeviceFrameCount, NULL); /* Safe cast. */ if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } capturedClientFramesToProcessThisIteration -= (ma_uint32)convertedClientFrameCount; /* Safe cast. */ if (capturedClientFramesToProcessThisIteration == 0) { break; } } /* In case an error happened from ma_device_write__null()... */ if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } } /* Make sure we don't get stuck in the inner loop. */ if (capturedDeviceFramesProcessed == 0) { break; } totalCapturedDeviceFramesProcessed += capturedDeviceFramesProcessed; } } break; case ma_device_type_capture: case ma_device_type_loopback: { ma_uint32 periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames; ma_uint32 framesReadThisPeriod = 0; while (framesReadThisPeriod < periodSizeInFrames) { ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesReadThisPeriod; ma_uint32 framesProcessed; ma_uint32 framesToReadThisIteration = framesRemainingInPeriod; if (framesToReadThisIteration > capturedDeviceDataCapInFrames) { framesToReadThisIteration = capturedDeviceDataCapInFrames; } result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, framesToReadThisIteration, &framesProcessed); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } /* Make sure we don't get stuck in the inner loop. */ if (framesProcessed == 0) { break; } ma_device__send_frames_to_client(pDevice, framesProcessed, capturedDeviceData); framesReadThisPeriod += framesProcessed; } } break; case ma_device_type_playback: { /* We write in chunks of the period size, but use a stack allocated buffer for the intermediary. */ ma_uint32 periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames; ma_uint32 framesWrittenThisPeriod = 0; while (framesWrittenThisPeriod < periodSizeInFrames) { ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesWrittenThisPeriod; ma_uint32 framesProcessed; ma_uint32 framesToWriteThisIteration = framesRemainingInPeriod; if (framesToWriteThisIteration > playbackDeviceDataCapInFrames) { framesToWriteThisIteration = playbackDeviceDataCapInFrames; } ma_device__read_frames_from_client(pDevice, framesToWriteThisIteration, playbackDeviceData); result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, framesToWriteThisIteration, &framesProcessed); if (result != MA_SUCCESS) { exitLoop = MA_TRUE; break; } /* Make sure we don't get stuck in the inner loop. */ if (framesProcessed == 0) { break; } framesWrittenThisPeriod += framesProcessed; } } break; /* Should never get here. */ default: break; } } return result; } /******************************************************************************* Null Backend *******************************************************************************/ #ifdef MA_HAS_NULL #define MA_DEVICE_OP_NONE__NULL 0 #define MA_DEVICE_OP_START__NULL 1 #define MA_DEVICE_OP_SUSPEND__NULL 2 #define MA_DEVICE_OP_KILL__NULL 3 static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData) { ma_device* pDevice = (ma_device*)pData; MA_ASSERT(pDevice != NULL); for (;;) { /* Keep the thread alive until the device is uninitialized. */ ma_uint32 operation; /* Wait for an operation to be requested. */ ma_event_wait(&pDevice->null_device.operationEvent); /* At this point an event should have been triggered. */ operation = pDevice->null_device.operation; /* Starting the device needs to put the thread into a loop. */ if (operation == MA_DEVICE_OP_START__NULL) { /* Reset the timer just in case. */ ma_timer_init(&pDevice->null_device.timer); /* Getting here means a suspend or kill operation has been requested. */ pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; } /* Suspending the device means we need to stop the timer and just continue the loop. */ if (operation == MA_DEVICE_OP_SUSPEND__NULL) { /* We need to add the current run time to the prior run time, then reset the timer. */ pDevice->null_device.priorRunTime += ma_timer_get_time_in_seconds(&pDevice->null_device.timer); ma_timer_init(&pDevice->null_device.timer); /* We're done. */ pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; } /* Killing the device means we need to get out of this loop so that this thread can terminate. */ if (operation == MA_DEVICE_OP_KILL__NULL) { pDevice->null_device.operationResult = MA_SUCCESS; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); break; } /* Getting a signal on a "none" operation probably means an error. Return invalid operation. */ if (operation == MA_DEVICE_OP_NONE__NULL) { MA_ASSERT(MA_FALSE); /* <-- Trigger this in debug mode to ensure developers are aware they're doing something wrong (or there's a bug in a miniaudio). */ pDevice->null_device.operationResult = MA_INVALID_OPERATION; ma_event_signal(&pDevice->null_device.operationCompletionEvent); ma_semaphore_release(&pDevice->null_device.operationSemaphore); continue; /* Continue the loop. Don't terminate. */ } } return (ma_thread_result)0; } static ma_result ma_device_do_operation__null(ma_device* pDevice, ma_uint32 operation) { ma_result result; /* TODO: Need to review this and consider just using mutual exclusion. I think the original motivation for this was to just post the event to a queue and return immediately, but that has since changed and now this function is synchronous. I think this can be simplified to just use a mutex. */ /* The first thing to do is wait for an operation slot to become available. We only have a single slot for this, but we could extend this later to support queuing of operations. */ result = ma_semaphore_wait(&pDevice->null_device.operationSemaphore); if (result != MA_SUCCESS) { return result; /* Failed to wait for the event. */ } /* When we get here it means the background thread is not referencing the operation code and it can be changed. After changing this we need to signal an event to the worker thread to let it know that it can start work. */ pDevice->null_device.operation = operation; /* Once the operation code has been set, the worker thread can start work. */ if (ma_event_signal(&pDevice->null_device.operationEvent) != MA_SUCCESS) { return MA_ERROR; } /* We want everything to be synchronous so we're going to wait for the worker thread to complete it's operation. */ if (ma_event_wait(&pDevice->null_device.operationCompletionEvent) != MA_SUCCESS) { return MA_ERROR; } return pDevice->null_device.operationResult; } static ma_uint64 ma_device_get_total_run_time_in_frames__null(ma_device* pDevice) { ma_uint32 internalSampleRate; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { internalSampleRate = pDevice->capture.internalSampleRate; } else { internalSampleRate = pDevice->playback.internalSampleRate; } return (ma_uint64)((pDevice->null_device.priorRunTime + ma_timer_get_time_in_seconds(&pDevice->null_device.timer)) * internalSampleRate); } static ma_result ma_context_enumerate_devices__null(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), "NULL Playback Device", (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), "NULL Capture Device", (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } (void)cbResult; /* Silence a static analysis warning. */ return MA_SUCCESS; } static ma_result ma_context_get_device_info__null(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); if (pDeviceID != NULL && pDeviceID->nullbackend != 0) { return MA_NO_DEVICE; /* Don't know the device. */ } /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), "NULL Playback Device", (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), "NULL Capture Device", (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */ /* Support everything on the null backend. */ pDeviceInfo->nativeDataFormats[0].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[0].channels = 0; pDeviceInfo->nativeDataFormats[0].sampleRate = 0; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; (void)pContext; return MA_SUCCESS; } static ma_result ma_device_uninit__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* Keep it clean and wait for the device thread to finish before returning. */ ma_device_do_operation__null(pDevice, MA_DEVICE_OP_KILL__NULL); /* Wait for the thread to finish before continuing. */ ma_thread_wait(&pDevice->null_device.deviceThread); /* At this point the loop in the device thread is as good as terminated so we can uninitialize our events. */ ma_semaphore_uninit(&pDevice->null_device.operationSemaphore); ma_event_uninit(&pDevice->null_device.operationCompletionEvent); ma_event_uninit(&pDevice->null_device.operationEvent); return MA_SUCCESS; } static ma_result ma_device_init__null(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->null_device); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* The null backend supports everything exactly as we specify it. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { pDescriptorCapture->format = (pDescriptorCapture->format != ma_format_unknown) ? pDescriptorCapture->format : MA_DEFAULT_FORMAT; pDescriptorCapture->channels = (pDescriptorCapture->channels != 0) ? pDescriptorCapture->channels : MA_DEFAULT_CHANNELS; pDescriptorCapture->sampleRate = (pDescriptorCapture->sampleRate != 0) ? pDescriptorCapture->sampleRate : MA_DEFAULT_SAMPLE_RATE; if (pDescriptorCapture->channelMap[0] == MA_CHANNEL_NONE) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); } pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { pDescriptorPlayback->format = (pDescriptorPlayback->format != ma_format_unknown) ? pDescriptorPlayback->format : MA_DEFAULT_FORMAT; pDescriptorPlayback->channels = (pDescriptorPlayback->channels != 0) ? pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS; pDescriptorPlayback->sampleRate = (pDescriptorPlayback->sampleRate != 0) ? pDescriptorPlayback->sampleRate : MA_DEFAULT_SAMPLE_RATE; if (pDescriptorPlayback->channelMap[0] == MA_CHANNEL_NONE) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorPlayback->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorPlayback->channels); } pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); } /* In order to get timing right, we need to create a thread that does nothing but keeps track of the timer. This timer is started when the first period is "written" to it, and then stopped in ma_device_stop__null(). */ result = ma_event_init(&pDevice->null_device.operationEvent); if (result != MA_SUCCESS) { return result; } result = ma_event_init(&pDevice->null_device.operationCompletionEvent); if (result != MA_SUCCESS) { return result; } result = ma_semaphore_init(1, &pDevice->null_device.operationSemaphore); /* <-- It's important that the initial value is set to 1. */ if (result != MA_SUCCESS) { return result; } result = ma_thread_create(&pDevice->null_device.deviceThread, pDevice->pContext->threadPriority, 0, ma_device_thread__null, pDevice, &pDevice->pContext->allocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static ma_result ma_device_start__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_device_do_operation__null(pDevice, MA_DEVICE_OP_START__NULL); ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_TRUE); return MA_SUCCESS; } static ma_result ma_device_stop__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_device_do_operation__null(pDevice, MA_DEVICE_OP_SUSPEND__NULL); ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_FALSE); return MA_SUCCESS; } static ma_bool32 ma_device_is_started__null(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); return ma_atomic_bool32_get(&pDevice->null_device.isStarted); } static ma_result ma_device_write__null(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; ma_uint32 totalPCMFramesProcessed; ma_bool32 wasStartedOnEntry; if (pFramesWritten != NULL) { *pFramesWritten = 0; } wasStartedOnEntry = ma_device_is_started__null(pDevice); /* Keep going until everything has been read. */ totalPCMFramesProcessed = 0; while (totalPCMFramesProcessed < frameCount) { ma_uint64 targetFrame; /* If there are any frames remaining in the current period, consume those first. */ if (pDevice->null_device.currentPeriodFramesRemainingPlayback > 0) { ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed); ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingPlayback; if (framesToProcess > framesRemaining) { framesToProcess = framesRemaining; } /* We don't actually do anything with pPCMFrames, so just mark it as unused to prevent a warning. */ (void)pPCMFrames; pDevice->null_device.currentPeriodFramesRemainingPlayback -= framesToProcess; totalPCMFramesProcessed += framesToProcess; } /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */ if (pDevice->null_device.currentPeriodFramesRemainingPlayback == 0) { pDevice->null_device.currentPeriodFramesRemainingPlayback = 0; if (!ma_device_is_started__null(pDevice) && !wasStartedOnEntry) { result = ma_device_start__null(pDevice); if (result != MA_SUCCESS) { break; } } } /* If we've consumed the whole buffer we can return now. */ MA_ASSERT(totalPCMFramesProcessed <= frameCount); if (totalPCMFramesProcessed == frameCount) { break; } /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */ targetFrame = pDevice->null_device.lastProcessedFramePlayback; for (;;) { ma_uint64 currentFrame; /* Stop waiting if the device has been stopped. */ if (!ma_device_is_started__null(pDevice)) { break; } currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice); if (currentFrame >= targetFrame) { break; } /* Getting here means we haven't yet reached the target sample, so continue waiting. */ ma_sleep(10); } pDevice->null_device.lastProcessedFramePlayback += pDevice->playback.internalPeriodSizeInFrames; pDevice->null_device.currentPeriodFramesRemainingPlayback = pDevice->playback.internalPeriodSizeInFrames; } if (pFramesWritten != NULL) { *pFramesWritten = totalPCMFramesProcessed; } return result; } static ma_result ma_device_read__null(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint32 totalPCMFramesProcessed; if (pFramesRead != NULL) { *pFramesRead = 0; } /* Keep going until everything has been read. */ totalPCMFramesProcessed = 0; while (totalPCMFramesProcessed < frameCount) { ma_uint64 targetFrame; /* If there are any frames remaining in the current period, consume those first. */ if (pDevice->null_device.currentPeriodFramesRemainingCapture > 0) { ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed); ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingCapture; if (framesToProcess > framesRemaining) { framesToProcess = framesRemaining; } /* We need to ensure the output buffer is zeroed. */ MA_ZERO_MEMORY(ma_offset_ptr(pPCMFrames, totalPCMFramesProcessed*bpf), framesToProcess*bpf); pDevice->null_device.currentPeriodFramesRemainingCapture -= framesToProcess; totalPCMFramesProcessed += framesToProcess; } /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */ if (pDevice->null_device.currentPeriodFramesRemainingCapture == 0) { pDevice->null_device.currentPeriodFramesRemainingCapture = 0; } /* If we've consumed the whole buffer we can return now. */ MA_ASSERT(totalPCMFramesProcessed <= frameCount); if (totalPCMFramesProcessed == frameCount) { break; } /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */ targetFrame = pDevice->null_device.lastProcessedFrameCapture + pDevice->capture.internalPeriodSizeInFrames; for (;;) { ma_uint64 currentFrame; /* Stop waiting if the device has been stopped. */ if (!ma_device_is_started__null(pDevice)) { break; } currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice); if (currentFrame >= targetFrame) { break; } /* Getting here means we haven't yet reached the target sample, so continue waiting. */ ma_sleep(10); } pDevice->null_device.lastProcessedFrameCapture += pDevice->capture.internalPeriodSizeInFrames; pDevice->null_device.currentPeriodFramesRemainingCapture = pDevice->capture.internalPeriodSizeInFrames; } if (pFramesRead != NULL) { *pFramesRead = totalPCMFramesProcessed; } return result; } static ma_result ma_context_uninit__null(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_null); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__null(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; (void)pContext; pCallbacks->onContextInit = ma_context_init__null; pCallbacks->onContextUninit = ma_context_uninit__null; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__null; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__null; pCallbacks->onDeviceInit = ma_device_init__null; pCallbacks->onDeviceUninit = ma_device_uninit__null; pCallbacks->onDeviceStart = ma_device_start__null; pCallbacks->onDeviceStop = ma_device_stop__null; pCallbacks->onDeviceRead = ma_device_read__null; pCallbacks->onDeviceWrite = ma_device_write__null; pCallbacks->onDeviceDataLoop = NULL; /* Our backend is asynchronous with a blocking read-write API which means we can get miniaudio to deal with the audio thread. */ /* The null backend always works. */ return MA_SUCCESS; } #endif /******************************************************************************* WIN32 COMMON *******************************************************************************/ #if defined(MA_WIN32) #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit) ((pContext->win32.CoInitializeEx) ? ((MA_PFN_CoInitializeEx)pContext->win32.CoInitializeEx)(pvReserved, dwCoInit) : ((MA_PFN_CoInitialize)pContext->win32.CoInitialize)(pvReserved)) #define ma_CoUninitialize(pContext) ((MA_PFN_CoUninitialize)pContext->win32.CoUninitialize)() #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) ((MA_PFN_CoCreateInstance)pContext->win32.CoCreateInstance)(rclsid, pUnkOuter, dwClsContext, riid, ppv) #define ma_CoTaskMemFree(pContext, pv) ((MA_PFN_CoTaskMemFree)pContext->win32.CoTaskMemFree)(pv) #define ma_PropVariantClear(pContext, pvar) ((MA_PFN_PropVariantClear)pContext->win32.PropVariantClear)(pvar) #else #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit) CoInitializeEx(pvReserved, dwCoInit) #define ma_CoUninitialize(pContext) CoUninitialize() #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv) #define ma_CoTaskMemFree(pContext, pv) CoTaskMemFree(pv) #define ma_PropVariantClear(pContext, pvar) PropVariantClear(pvar) #endif #if !defined(MAXULONG_PTR) && !defined(__WATCOMC__) typedef size_t DWORD_PTR; #endif #if !defined(WAVE_FORMAT_1M08) #define WAVE_FORMAT_1M08 0x00000001 #define WAVE_FORMAT_1S08 0x00000002 #define WAVE_FORMAT_1M16 0x00000004 #define WAVE_FORMAT_1S16 0x00000008 #define WAVE_FORMAT_2M08 0x00000010 #define WAVE_FORMAT_2S08 0x00000020 #define WAVE_FORMAT_2M16 0x00000040 #define WAVE_FORMAT_2S16 0x00000080 #define WAVE_FORMAT_4M08 0x00000100 #define WAVE_FORMAT_4S08 0x00000200 #define WAVE_FORMAT_4M16 0x00000400 #define WAVE_FORMAT_4S16 0x00000800 #endif #if !defined(WAVE_FORMAT_44M08) #define WAVE_FORMAT_44M08 0x00000100 #define WAVE_FORMAT_44S08 0x00000200 #define WAVE_FORMAT_44M16 0x00000400 #define WAVE_FORMAT_44S16 0x00000800 #define WAVE_FORMAT_48M08 0x00001000 #define WAVE_FORMAT_48S08 0x00002000 #define WAVE_FORMAT_48M16 0x00004000 #define WAVE_FORMAT_48S16 0x00008000 #define WAVE_FORMAT_96M08 0x00010000 #define WAVE_FORMAT_96S08 0x00020000 #define WAVE_FORMAT_96M16 0x00040000 #define WAVE_FORMAT_96S16 0x00080000 #endif #ifndef SPEAKER_FRONT_LEFT #define SPEAKER_FRONT_LEFT 0x1 #define SPEAKER_FRONT_RIGHT 0x2 #define SPEAKER_FRONT_CENTER 0x4 #define SPEAKER_LOW_FREQUENCY 0x8 #define SPEAKER_BACK_LEFT 0x10 #define SPEAKER_BACK_RIGHT 0x20 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 #define SPEAKER_BACK_CENTER 0x100 #define SPEAKER_SIDE_LEFT 0x200 #define SPEAKER_SIDE_RIGHT 0x400 #define SPEAKER_TOP_CENTER 0x800 #define SPEAKER_TOP_FRONT_LEFT 0x1000 #define SPEAKER_TOP_FRONT_CENTER 0x2000 #define SPEAKER_TOP_FRONT_RIGHT 0x4000 #define SPEAKER_TOP_BACK_LEFT 0x8000 #define SPEAKER_TOP_BACK_CENTER 0x10000 #define SPEAKER_TOP_BACK_RIGHT 0x20000 #endif /* Implement our own version of MA_WAVEFORMATEXTENSIBLE so we can avoid a header. Be careful with this because MA_WAVEFORMATEX has an extra two bytes over standard WAVEFORMATEX due to padding. The standard version uses tight packing, but for compiler compatibility we're not doing that with ours. */ typedef struct { WORD wFormatTag; WORD nChannels; DWORD nSamplesPerSec; DWORD nAvgBytesPerSec; WORD nBlockAlign; WORD wBitsPerSample; WORD cbSize; } MA_WAVEFORMATEX; typedef struct { WORD wFormatTag; WORD nChannels; DWORD nSamplesPerSec; DWORD nAvgBytesPerSec; WORD nBlockAlign; WORD wBitsPerSample; WORD cbSize; union { WORD wValidBitsPerSample; WORD wSamplesPerBlock; WORD wReserved; } Samples; DWORD dwChannelMask; GUID SubFormat; } MA_WAVEFORMATEXTENSIBLE; #ifndef WAVE_FORMAT_EXTENSIBLE #define WAVE_FORMAT_EXTENSIBLE 0xFFFE #endif #ifndef WAVE_FORMAT_PCM #define WAVE_FORMAT_PCM 1 #endif #ifndef WAVE_FORMAT_IEEE_FLOAT #define WAVE_FORMAT_IEEE_FLOAT 0x0003 #endif /* Converts an individual Win32-style channel identifier (SPEAKER_FRONT_LEFT, etc.) to miniaudio. */ static ma_uint8 ma_channel_id_to_ma__win32(DWORD id) { switch (id) { case SPEAKER_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case SPEAKER_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case SPEAKER_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case SPEAKER_LOW_FREQUENCY: return MA_CHANNEL_LFE; case SPEAKER_BACK_LEFT: return MA_CHANNEL_BACK_LEFT; case SPEAKER_BACK_RIGHT: return MA_CHANNEL_BACK_RIGHT; case SPEAKER_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case SPEAKER_BACK_CENTER: return MA_CHANNEL_BACK_CENTER; case SPEAKER_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case SPEAKER_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case SPEAKER_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case SPEAKER_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case SPEAKER_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case SPEAKER_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case SPEAKER_TOP_BACK_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case SPEAKER_TOP_BACK_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; case SPEAKER_TOP_BACK_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; default: return 0; } } /* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to Win32-style. */ static DWORD ma_channel_id_to_win32(DWORD id) { switch (id) { case MA_CHANNEL_MONO: return SPEAKER_FRONT_CENTER; case MA_CHANNEL_FRONT_LEFT: return SPEAKER_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return SPEAKER_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return SPEAKER_FRONT_CENTER; case MA_CHANNEL_LFE: return SPEAKER_LOW_FREQUENCY; case MA_CHANNEL_BACK_LEFT: return SPEAKER_BACK_LEFT; case MA_CHANNEL_BACK_RIGHT: return SPEAKER_BACK_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return SPEAKER_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return SPEAKER_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return SPEAKER_BACK_CENTER; case MA_CHANNEL_SIDE_LEFT: return SPEAKER_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return SPEAKER_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return SPEAKER_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return SPEAKER_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return SPEAKER_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return SPEAKER_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return SPEAKER_TOP_BACK_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return SPEAKER_TOP_BACK_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return SPEAKER_TOP_BACK_RIGHT; default: return 0; } } /* Converts a channel mapping to a Win32-style channel mask. */ static DWORD ma_channel_map_to_channel_mask__win32(const ma_channel* pChannelMap, ma_uint32 channels) { DWORD dwChannelMask = 0; ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { dwChannelMask |= ma_channel_id_to_win32(pChannelMap[iChannel]); } return dwChannelMask; } /* Converts a Win32-style channel mask to a miniaudio channel map. */ static void ma_channel_mask_to_channel_map__win32(DWORD dwChannelMask, ma_uint32 channels, ma_channel* pChannelMap) { /* If the channel mask is set to 0, just assume a default Win32 channel map. */ if (dwChannelMask == 0) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channels, channels); } else { if (channels == 1 && (dwChannelMask & SPEAKER_FRONT_CENTER) != 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else { /* Just iterate over each bit. */ ma_uint32 iChannel = 0; ma_uint32 iBit; for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) { DWORD bitValue = (dwChannelMask & (1UL << iBit)); if (bitValue != 0) { /* The bit is set. */ pChannelMap[iChannel] = ma_channel_id_to_ma__win32(bitValue); iChannel += 1; } } } } } #ifdef __cplusplus static ma_bool32 ma_is_guid_equal(const void* a, const void* b) { return IsEqualGUID(*(const GUID*)a, *(const GUID*)b); } #else #define ma_is_guid_equal(a, b) IsEqualGUID((const GUID*)a, (const GUID*)b) #endif static MA_INLINE ma_bool32 ma_is_guid_null(const void* guid) { static GUID nullguid = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; return ma_is_guid_equal(guid, &nullguid); } static ma_format ma_format_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF) { MA_ASSERT(pWF != NULL); if (pWF->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { const MA_WAVEFORMATEXTENSIBLE* pWFEX = (const MA_WAVEFORMATEXTENSIBLE*)pWF; if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_PCM)) { if (pWFEX->Samples.wValidBitsPerSample == 32) { return ma_format_s32; } if (pWFEX->Samples.wValidBitsPerSample == 24) { if (pWFEX->wBitsPerSample == 32) { return ma_format_s32; } if (pWFEX->wBitsPerSample == 24) { return ma_format_s24; } } if (pWFEX->Samples.wValidBitsPerSample == 16) { return ma_format_s16; } if (pWFEX->Samples.wValidBitsPerSample == 8) { return ma_format_u8; } } if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) { if (pWFEX->Samples.wValidBitsPerSample == 32) { return ma_format_f32; } /* if (pWFEX->Samples.wValidBitsPerSample == 64) { return ma_format_f64; } */ } } else { if (pWF->wFormatTag == WAVE_FORMAT_PCM) { if (pWF->wBitsPerSample == 32) { return ma_format_s32; } if (pWF->wBitsPerSample == 24) { return ma_format_s24; } if (pWF->wBitsPerSample == 16) { return ma_format_s16; } if (pWF->wBitsPerSample == 8) { return ma_format_u8; } } if (pWF->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { if (pWF->wBitsPerSample == 32) { return ma_format_f32; } if (pWF->wBitsPerSample == 64) { /*return ma_format_f64;*/ } } } return ma_format_unknown; } #endif /******************************************************************************* WASAPI Backend *******************************************************************************/ #ifdef MA_HAS_WASAPI #if 0 #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4091) /* 'typedef ': ignored on left of '' when no variable is declared */ #endif #include #include #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* 0 */ static ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType); /* Some compilers don't define VerifyVersionInfoW. Need to write this ourselves. */ #define MA_WIN32_WINNT_VISTA 0x0600 #define MA_VER_MINORVERSION 0x01 #define MA_VER_MAJORVERSION 0x02 #define MA_VER_SERVICEPACKMAJOR 0x20 #define MA_VER_GREATER_EQUAL 0x03 typedef struct { DWORD dwOSVersionInfoSize; DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformId; WCHAR szCSDVersion[128]; WORD wServicePackMajor; WORD wServicePackMinor; WORD wSuiteMask; BYTE wProductType; BYTE wReserved; } ma_OSVERSIONINFOEXW; typedef BOOL (WINAPI * ma_PFNVerifyVersionInfoW) (ma_OSVERSIONINFOEXW* lpVersionInfo, DWORD dwTypeMask, DWORDLONG dwlConditionMask); typedef ULONGLONG (WINAPI * ma_PFNVerSetConditionMask)(ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, BYTE dwConditionMask); #ifndef PROPERTYKEY_DEFINED #define PROPERTYKEY_DEFINED #ifndef __WATCOMC__ typedef struct { GUID fmtid; DWORD pid; } PROPERTYKEY; #endif #endif /* Some compilers don't define PropVariantInit(). We just do this ourselves since it's just a memset(). */ static MA_INLINE void ma_PropVariantInit(MA_PROPVARIANT* pProp) { MA_ZERO_OBJECT(pProp); } static const PROPERTYKEY MA_PKEY_Device_FriendlyName = {{0xA45C254E, 0xDF1C, 0x4EFD, {0x80, 0x20, 0x67, 0xD1, 0x46, 0xA8, 0x50, 0xE0}}, 14}; static const PROPERTYKEY MA_PKEY_AudioEngine_DeviceFormat = {{0xF19F064D, 0x82C, 0x4E27, {0xBC, 0x73, 0x68, 0x82, 0xA1, 0xBB, 0x8E, 0x4C}}, 0}; static const IID MA_IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; /* 00000000-0000-0000-C000-000000000046 */ #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) static const IID MA_IID_IAgileObject = {0x94EA2B94, 0xE9CC, 0x49E0, {0xC0, 0xFF, 0xEE, 0x64, 0xCA, 0x8F, 0x5B, 0x90}}; /* 94EA2B94-E9CC-49E0-C0FF-EE64CA8F5B90 */ #endif static const IID MA_IID_IAudioClient = {0x1CB9AD4C, 0xDBFA, 0x4C32, {0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2}}; /* 1CB9AD4C-DBFA-4C32-B178-C2F568A703B2 = __uuidof(IAudioClient) */ static const IID MA_IID_IAudioClient2 = {0x726778CD, 0xF60A, 0x4EDA, {0x82, 0xDE, 0xE4, 0x76, 0x10, 0xCD, 0x78, 0xAA}}; /* 726778CD-F60A-4EDA-82DE-E47610CD78AA = __uuidof(IAudioClient2) */ static const IID MA_IID_IAudioClient3 = {0x7ED4EE07, 0x8E67, 0x4CD4, {0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42}}; /* 7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42 = __uuidof(IAudioClient3) */ static const IID MA_IID_IAudioRenderClient = {0xF294ACFC, 0x3146, 0x4483, {0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2}}; /* F294ACFC-3146-4483-A7BF-ADDCA7C260E2 = __uuidof(IAudioRenderClient) */ static const IID MA_IID_IAudioCaptureClient = {0xC8ADBD64, 0xE71E, 0x48A0, {0xA4, 0xDE, 0x18, 0x5C, 0x39, 0x5C, 0xD3, 0x17}}; /* C8ADBD64-E71E-48A0-A4DE-185C395CD317 = __uuidof(IAudioCaptureClient) */ static const IID MA_IID_IMMNotificationClient = {0x7991EEC9, 0x7E89, 0x4D85, {0x83, 0x90, 0x6C, 0x70, 0x3C, 0xEC, 0x60, 0xC0}}; /* 7991EEC9-7E89-4D85-8390-6C703CEC60C0 = __uuidof(IMMNotificationClient) */ #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) static const IID MA_IID_DEVINTERFACE_AUDIO_RENDER = {0xE6327CAD, 0xDCEC, 0x4949, {0xAE, 0x8A, 0x99, 0x1E, 0x97, 0x6A, 0x79, 0xD2}}; /* E6327CAD-DCEC-4949-AE8A-991E976A79D2 */ static const IID MA_IID_DEVINTERFACE_AUDIO_CAPTURE = {0x2EEF81BE, 0x33FA, 0x4800, {0x96, 0x70, 0x1C, 0xD4, 0x74, 0x97, 0x2C, 0x3F}}; /* 2EEF81BE-33FA-4800-9670-1CD474972C3F */ static const IID MA_IID_IActivateAudioInterfaceCompletionHandler = {0x41D949AB, 0x9862, 0x444A, {0x80, 0xF6, 0xC2, 0x61, 0x33, 0x4D, 0xA5, 0xEB}}; /* 41D949AB-9862-444A-80F6-C261334DA5EB */ #endif static const IID MA_CLSID_MMDeviceEnumerator = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; /* BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator) */ static const IID MA_IID_IMMDeviceEnumerator = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; /* A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator) */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #define MA_MM_DEVICE_STATE_ACTIVE 1 #define MA_MM_DEVICE_STATE_DISABLED 2 #define MA_MM_DEVICE_STATE_NOTPRESENT 4 #define MA_MM_DEVICE_STATE_UNPLUGGED 8 typedef struct ma_IMMDeviceEnumerator ma_IMMDeviceEnumerator; typedef struct ma_IMMDeviceCollection ma_IMMDeviceCollection; typedef struct ma_IMMDevice ma_IMMDevice; #else typedef struct ma_IActivateAudioInterfaceCompletionHandler ma_IActivateAudioInterfaceCompletionHandler; typedef struct ma_IActivateAudioInterfaceAsyncOperation ma_IActivateAudioInterfaceAsyncOperation; #endif typedef struct ma_IPropertyStore ma_IPropertyStore; typedef struct ma_IAudioClient ma_IAudioClient; typedef struct ma_IAudioClient2 ma_IAudioClient2; typedef struct ma_IAudioClient3 ma_IAudioClient3; typedef struct ma_IAudioRenderClient ma_IAudioRenderClient; typedef struct ma_IAudioCaptureClient ma_IAudioCaptureClient; typedef ma_int64 MA_REFERENCE_TIME; #define MA_AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000 #define MA_AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000 #define MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000 #define MA_AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000 #define MA_AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000 #define MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x08000000 #define MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM 0x80000000 #define MA_AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000 #define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000 #define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000 /* Buffer flags. */ #define MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY 1 #define MA_AUDCLNT_BUFFERFLAGS_SILENT 2 #define MA_AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR 4 typedef enum { ma_eRender = 0, ma_eCapture = 1, ma_eAll = 2 } ma_EDataFlow; typedef enum { ma_eConsole = 0, ma_eMultimedia = 1, ma_eCommunications = 2 } ma_ERole; typedef enum { MA_AUDCLNT_SHAREMODE_SHARED, MA_AUDCLNT_SHAREMODE_EXCLUSIVE } MA_AUDCLNT_SHAREMODE; typedef enum { MA_AudioCategory_Other = 0 /* <-- miniaudio is only caring about Other. */ } MA_AUDIO_STREAM_CATEGORY; typedef struct { ma_uint32 cbSize; BOOL bIsOffload; MA_AUDIO_STREAM_CATEGORY eCategory; } ma_AudioClientProperties; /* IUnknown */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IUnknown* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IUnknown* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IUnknown* pThis); } ma_IUnknownVtbl; struct ma_IUnknown { ma_IUnknownVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IUnknown_QueryInterface(ma_IUnknown* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IUnknown_AddRef(ma_IUnknown* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IUnknown_Release(ma_IUnknown* pThis) { return pThis->lpVtbl->Release(pThis); } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* IMMNotificationClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMNotificationClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMNotificationClient* pThis); /* IMMNotificationClient */ HRESULT (STDMETHODCALLTYPE * OnDeviceStateChanged) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState); HRESULT (STDMETHODCALLTYPE * OnDeviceAdded) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID); HRESULT (STDMETHODCALLTYPE * OnDeviceRemoved) (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID); HRESULT (STDMETHODCALLTYPE * OnDefaultDeviceChanged)(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID); HRESULT (STDMETHODCALLTYPE * OnPropertyValueChanged)(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key); } ma_IMMNotificationClientVtbl; /* IMMDeviceEnumerator */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDeviceEnumerator* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDeviceEnumerator* pThis); /* IMMDeviceEnumerator */ HRESULT (STDMETHODCALLTYPE * EnumAudioEndpoints) (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices); HRESULT (STDMETHODCALLTYPE * GetDefaultAudioEndpoint) (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint); HRESULT (STDMETHODCALLTYPE * GetDevice) (ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice); HRESULT (STDMETHODCALLTYPE * RegisterEndpointNotificationCallback) (ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient); HRESULT (STDMETHODCALLTYPE * UnregisterEndpointNotificationCallback)(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient); } ma_IMMDeviceEnumeratorVtbl; struct ma_IMMDeviceEnumerator { ma_IMMDeviceEnumeratorVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDeviceEnumerator_QueryInterface(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDeviceEnumerator_AddRef(ma_IMMDeviceEnumerator* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDeviceEnumerator_Release(ma_IMMDeviceEnumerator* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_EnumAudioEndpoints(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices) { return pThis->lpVtbl->EnumAudioEndpoints(pThis, dataFlow, dwStateMask, ppDevices); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint) { return pThis->lpVtbl->GetDefaultAudioEndpoint(pThis, dataFlow, role, ppEndpoint); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDevice(ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice) { return pThis->lpVtbl->GetDevice(pThis, pID, ppDevice); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_RegisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->RegisterEndpointNotificationCallback(pThis, pClient); } static MA_INLINE HRESULT ma_IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->UnregisterEndpointNotificationCallback(pThis, pClient); } /* IMMDeviceCollection */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDeviceCollection* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDeviceCollection* pThis); /* IMMDeviceCollection */ HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IMMDeviceCollection* pThis, UINT* pDevices); HRESULT (STDMETHODCALLTYPE * Item) (ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice); } ma_IMMDeviceCollectionVtbl; struct ma_IMMDeviceCollection { ma_IMMDeviceCollectionVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDeviceCollection_QueryInterface(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDeviceCollection_AddRef(ma_IMMDeviceCollection* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDeviceCollection_Release(ma_IMMDeviceCollection* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDeviceCollection_GetCount(ma_IMMDeviceCollection* pThis, UINT* pDevices) { return pThis->lpVtbl->GetCount(pThis, pDevices); } static MA_INLINE HRESULT ma_IMMDeviceCollection_Item(ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice) { return pThis->lpVtbl->Item(pThis, nDevice, ppDevice); } /* IMMDevice */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDevice* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IMMDevice* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IMMDevice* pThis); /* IMMDevice */ HRESULT (STDMETHODCALLTYPE * Activate) (ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface); HRESULT (STDMETHODCALLTYPE * OpenPropertyStore)(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties); HRESULT (STDMETHODCALLTYPE * GetId) (ma_IMMDevice* pThis, WCHAR** pID); HRESULT (STDMETHODCALLTYPE * GetState) (ma_IMMDevice* pThis, DWORD *pState); } ma_IMMDeviceVtbl; struct ma_IMMDevice { ma_IMMDeviceVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IMMDevice_QueryInterface(ma_IMMDevice* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IMMDevice_AddRef(ma_IMMDevice* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IMMDevice_Release(ma_IMMDevice* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IMMDevice_Activate(ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface) { return pThis->lpVtbl->Activate(pThis, iid, dwClsCtx, pActivationParams, ppInterface); } static MA_INLINE HRESULT ma_IMMDevice_OpenPropertyStore(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties) { return pThis->lpVtbl->OpenPropertyStore(pThis, stgmAccess, ppProperties); } static MA_INLINE HRESULT ma_IMMDevice_GetId(ma_IMMDevice* pThis, WCHAR** pID) { return pThis->lpVtbl->GetId(pThis, pID); } static MA_INLINE HRESULT ma_IMMDevice_GetState(ma_IMMDevice* pThis, DWORD *pState) { return pThis->lpVtbl->GetState(pThis, pState); } #else /* IActivateAudioInterfaceAsyncOperation */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IActivateAudioInterfaceAsyncOperation* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IActivateAudioInterfaceAsyncOperation* pThis); /* IActivateAudioInterfaceAsyncOperation */ HRESULT (STDMETHODCALLTYPE * GetActivateResult)(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface); } ma_IActivateAudioInterfaceAsyncOperationVtbl; struct ma_IActivateAudioInterfaceAsyncOperation { ma_IActivateAudioInterfaceAsyncOperationVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_QueryInterface(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IActivateAudioInterfaceAsyncOperation_AddRef(ma_IActivateAudioInterfaceAsyncOperation* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IActivateAudioInterfaceAsyncOperation_Release(ma_IActivateAudioInterfaceAsyncOperation* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface) { return pThis->lpVtbl->GetActivateResult(pThis, pActivateResult, ppActivatedInterface); } #endif /* IPropertyStore */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IPropertyStore* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IPropertyStore* pThis); /* IPropertyStore */ HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IPropertyStore* pThis, DWORD* pPropCount); HRESULT (STDMETHODCALLTYPE * GetAt) (ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey); HRESULT (STDMETHODCALLTYPE * GetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar); HRESULT (STDMETHODCALLTYPE * SetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar); HRESULT (STDMETHODCALLTYPE * Commit) (ma_IPropertyStore* pThis); } ma_IPropertyStoreVtbl; struct ma_IPropertyStore { ma_IPropertyStoreVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IPropertyStore_QueryInterface(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IPropertyStore_AddRef(ma_IPropertyStore* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IPropertyStore_Release(ma_IPropertyStore* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IPropertyStore_GetCount(ma_IPropertyStore* pThis, DWORD* pPropCount) { return pThis->lpVtbl->GetCount(pThis, pPropCount); } static MA_INLINE HRESULT ma_IPropertyStore_GetAt(ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey) { return pThis->lpVtbl->GetAt(pThis, propIndex, pPropKey); } static MA_INLINE HRESULT ma_IPropertyStore_GetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar) { return pThis->lpVtbl->GetValue(pThis, pKey, pPropVar); } static MA_INLINE HRESULT ma_IPropertyStore_SetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar) { return pThis->lpVtbl->SetValue(pThis, pKey, pPropVar); } static MA_INLINE HRESULT ma_IPropertyStore_Commit(ma_IPropertyStore* pThis) { return pThis->lpVtbl->Commit(pThis); } /* IAudioClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient* pThis, const IID* const riid, void** pp); } ma_IAudioClientVtbl; struct ma_IAudioClient { ma_IAudioClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient_QueryInterface(ma_IAudioClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient_AddRef(ma_IAudioClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient_Release(ma_IAudioClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Initialize(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient_GetBufferSize(ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient_GetStreamLatency(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient_GetCurrentPadding(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient_IsFormatSupported(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient_GetMixFormat(ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient_GetDevicePeriod(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient_Start(ma_IAudioClient* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Stop(ma_IAudioClient* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient_Reset(ma_IAudioClient* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient_SetEventHandle(ma_IAudioClient* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient_GetService(ma_IAudioClient* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } /* IAudioClient2 */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient2* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient2* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient2* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient2* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient2* pThis, const IID* const riid, void** pp); /* IAudioClient2 */ HRESULT (STDMETHODCALLTYPE * IsOffloadCapable) (ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable); HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties); HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration); } ma_IAudioClient2Vtbl; struct ma_IAudioClient2 { ma_IAudioClient2Vtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient2_QueryInterface(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient2_AddRef(ma_IAudioClient2* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient2_Release(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Initialize(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient2_GetBufferSize(ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient2_GetStreamLatency(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient2_GetCurrentPadding(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient2_IsFormatSupported(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient2_GetMixFormat(ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient2_GetDevicePeriod(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient2_Start(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Stop(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_Reset(ma_IAudioClient2* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient2_SetEventHandle(ma_IAudioClient2* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient2_GetService(ma_IAudioClient2* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } static MA_INLINE HRESULT ma_IAudioClient2_IsOffloadCapable(ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); } static MA_INLINE HRESULT ma_IAudioClient2_SetClientProperties(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties) { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); } static MA_INLINE HRESULT ma_IAudioClient2_GetBufferSizeLimits(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); } /* IAudioClient3 */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioClient3* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioClient3* pThis); /* IAudioClient */ HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); HRESULT (STDMETHODCALLTYPE * GetBufferSize) (ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames); HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency); HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames); HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch); HRESULT (STDMETHODCALLTYPE * GetMixFormat) (ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat); HRESULT (STDMETHODCALLTYPE * GetDevicePeriod) (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod); HRESULT (STDMETHODCALLTYPE * Start) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * Reset) (ma_IAudioClient3* pThis); HRESULT (STDMETHODCALLTYPE * SetEventHandle) (ma_IAudioClient3* pThis, HANDLE eventHandle); HRESULT (STDMETHODCALLTYPE * GetService) (ma_IAudioClient3* pThis, const IID* const riid, void** pp); /* IAudioClient2 */ HRESULT (STDMETHODCALLTYPE * IsOffloadCapable) (ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable); HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties); HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration); /* IAudioClient3 */ HRESULT (STDMETHODCALLTYPE * GetSharedModeEnginePeriod) (ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames); HRESULT (STDMETHODCALLTYPE * GetCurrentSharedModeEnginePeriod)(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames); HRESULT (STDMETHODCALLTYPE * InitializeSharedAudioStream) (ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid); } ma_IAudioClient3Vtbl; struct ma_IAudioClient3 { ma_IAudioClient3Vtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioClient3_QueryInterface(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioClient3_AddRef(ma_IAudioClient3* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioClient3_Release(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Initialize(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); } static MA_INLINE HRESULT ma_IAudioClient3_GetBufferSize(ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames) { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); } static MA_INLINE HRESULT ma_IAudioClient3_GetStreamLatency(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency) { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); } static MA_INLINE HRESULT ma_IAudioClient3_GetCurrentPadding(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames) { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); } static MA_INLINE HRESULT ma_IAudioClient3_IsFormatSupported(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); } static MA_INLINE HRESULT ma_IAudioClient3_GetMixFormat(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat) { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); } static MA_INLINE HRESULT ma_IAudioClient3_GetDevicePeriod(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); } static MA_INLINE HRESULT ma_IAudioClient3_Start(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Start(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Stop(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_Reset(ma_IAudioClient3* pThis) { return pThis->lpVtbl->Reset(pThis); } static MA_INLINE HRESULT ma_IAudioClient3_SetEventHandle(ma_IAudioClient3* pThis, HANDLE eventHandle) { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); } static MA_INLINE HRESULT ma_IAudioClient3_GetService(ma_IAudioClient3* pThis, const IID* const riid, void** pp) { return pThis->lpVtbl->GetService(pThis, riid, pp); } static MA_INLINE HRESULT ma_IAudioClient3_IsOffloadCapable(ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); } static MA_INLINE HRESULT ma_IAudioClient3_SetClientProperties(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties) { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); } static MA_INLINE HRESULT ma_IAudioClient3_GetBufferSizeLimits(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); } static MA_INLINE HRESULT ma_IAudioClient3_GetSharedModeEnginePeriod(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames) { return pThis->lpVtbl->GetSharedModeEnginePeriod(pThis, pFormat, pDefaultPeriodInFrames, pFundamentalPeriodInFrames, pMinPeriodInFrames, pMaxPeriodInFrames); } static MA_INLINE HRESULT ma_IAudioClient3_GetCurrentSharedModeEnginePeriod(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames) { return pThis->lpVtbl->GetCurrentSharedModeEnginePeriod(pThis, ppFormat, pCurrentPeriodInFrames); } static MA_INLINE HRESULT ma_IAudioClient3_InitializeSharedAudioStream(ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGUID) { return pThis->lpVtbl->InitializeSharedAudioStream(pThis, streamFlags, periodInFrames, pFormat, pAudioSessionGUID); } /* IAudioRenderClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioRenderClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioRenderClient* pThis); /* IAudioRenderClient */ HRESULT (STDMETHODCALLTYPE * GetBuffer) (ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData); HRESULT (STDMETHODCALLTYPE * ReleaseBuffer)(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags); } ma_IAudioRenderClientVtbl; struct ma_IAudioRenderClient { ma_IAudioRenderClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioRenderClient_QueryInterface(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioRenderClient_AddRef(ma_IAudioRenderClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioRenderClient_Release(ma_IAudioRenderClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioRenderClient_GetBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData) { return pThis->lpVtbl->GetBuffer(pThis, numFramesRequested, ppData); } static MA_INLINE HRESULT ma_IAudioRenderClient_ReleaseBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags) { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesWritten, dwFlags); } /* IAudioCaptureClient */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IAudioCaptureClient* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IAudioCaptureClient* pThis); /* IAudioRenderClient */ HRESULT (STDMETHODCALLTYPE * GetBuffer) (ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition); HRESULT (STDMETHODCALLTYPE * ReleaseBuffer) (ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead); HRESULT (STDMETHODCALLTYPE * GetNextPacketSize)(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket); } ma_IAudioCaptureClientVtbl; struct ma_IAudioCaptureClient { ma_IAudioCaptureClientVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IAudioCaptureClient_QueryInterface(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IAudioCaptureClient_AddRef(ma_IAudioCaptureClient* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IAudioCaptureClient_Release(ma_IAudioCaptureClient* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IAudioCaptureClient_GetBuffer(ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition) { return pThis->lpVtbl->GetBuffer(pThis, ppData, pNumFramesToRead, pFlags, pDevicePosition, pQPCPosition); } static MA_INLINE HRESULT ma_IAudioCaptureClient_ReleaseBuffer(ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead) { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesRead); } static MA_INLINE HRESULT ma_IAudioCaptureClient_GetNextPacketSize(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket) { return pThis->lpVtbl->GetNextPacketSize(pThis, pNumFramesInNextPacket); } #if defined(MA_WIN32_UWP) /* mmdevapi Functions */ typedef HRESULT (WINAPI * MA_PFN_ActivateAudioInterfaceAsync)(const wchar_t* deviceInterfacePath, const IID* riid, MA_PROPVARIANT* activationParams, ma_IActivateAudioInterfaceCompletionHandler* completionHandler, ma_IActivateAudioInterfaceAsyncOperation** activationOperation); #endif /* Avrt Functions */ typedef HANDLE (WINAPI * MA_PFN_AvSetMmThreadCharacteristicsA)(const char* TaskName, DWORD* TaskIndex); typedef BOOL (WINAPI * MA_PFN_AvRevertMmThreadCharacteristics)(HANDLE AvrtHandle); #if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK) typedef struct ma_completion_handler_uwp ma_completion_handler_uwp; typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_completion_handler_uwp* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_completion_handler_uwp* pThis); /* IActivateAudioInterfaceCompletionHandler */ HRESULT (STDMETHODCALLTYPE * ActivateCompleted)(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation); } ma_completion_handler_uwp_vtbl; struct ma_completion_handler_uwp { ma_completion_handler_uwp_vtbl* lpVtbl; MA_ATOMIC(4, ma_uint32) counter; HANDLE hEvent; }; static HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_QueryInterface(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject) { /* We need to "implement" IAgileObject which is just an indicator that's used internally by WASAPI for some multithreading management. To "implement" this, we just make sure we return pThis when the IAgileObject is requested. */ if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IActivateAudioInterfaceCompletionHandler) && !ma_is_guid_equal(riid, &MA_IID_IAgileObject)) { *ppObject = NULL; return E_NOINTERFACE; } /* Getting here means the IID is IUnknown or IMMNotificationClient. */ *ppObject = (void*)pThis; ((ma_completion_handler_uwp_vtbl*)pThis->lpVtbl)->AddRef(pThis); return S_OK; } static ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_AddRef(ma_completion_handler_uwp* pThis) { return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1; } static ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_Release(ma_completion_handler_uwp* pThis) { ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1; if (newRefCount == 0) { return 0; /* We don't free anything here because we never allocate the object on the heap. */ } return (ULONG)newRefCount; } static HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_ActivateCompleted(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation) { (void)pActivateOperation; SetEvent(pThis->hEvent); return S_OK; } static ma_completion_handler_uwp_vtbl g_maCompletionHandlerVtblInstance = { ma_completion_handler_uwp_QueryInterface, ma_completion_handler_uwp_AddRef, ma_completion_handler_uwp_Release, ma_completion_handler_uwp_ActivateCompleted }; static ma_result ma_completion_handler_uwp_init(ma_completion_handler_uwp* pHandler) { MA_ASSERT(pHandler != NULL); MA_ZERO_OBJECT(pHandler); pHandler->lpVtbl = &g_maCompletionHandlerVtblInstance; pHandler->counter = 1; pHandler->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL); if (pHandler->hEvent == NULL) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static void ma_completion_handler_uwp_uninit(ma_completion_handler_uwp* pHandler) { if (pHandler->hEvent != NULL) { CloseHandle(pHandler->hEvent); } } static void ma_completion_handler_uwp_wait(ma_completion_handler_uwp* pHandler) { WaitForSingleObject((HANDLE)pHandler->hEvent, INFINITE); } #endif /* !MA_WIN32_DESKTOP */ /* We need a virtual table for our notification client object that's used for detecting changes to the default device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_QueryInterface(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject) { /* We care about two interfaces - IUnknown and IMMNotificationClient. If the requested IID is something else we just return E_NOINTERFACE. Otherwise we need to increment the reference counter and return S_OK. */ if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IMMNotificationClient)) { *ppObject = NULL; return E_NOINTERFACE; } /* Getting here means the IID is IUnknown or IMMNotificationClient. */ *ppObject = (void*)pThis; ((ma_IMMNotificationClientVtbl*)pThis->lpVtbl)->AddRef(pThis); return S_OK; } static ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_AddRef(ma_IMMNotificationClient* pThis) { return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1; } static ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_Release(ma_IMMNotificationClient* pThis) { ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1; if (newRefCount == 0) { return 0; /* We don't free anything here because we never allocate the object on the heap. */ } return (ULONG)newRefCount; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceStateChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState) { ma_bool32 isThisDevice = MA_FALSE; ma_bool32 isCapture = MA_FALSE; ma_bool32 isPlayback = MA_FALSE; #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceStateChanged(pDeviceID=%S, dwNewState=%u)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)", (unsigned int)dwNewState);*/ #endif /* There have been reports of a hang when a playback device is disconnected. The idea with this code is to explicitly stop the device if we detect that the device is disabled or has been unplugged. */ if (pThis->pDevice->wasapi.allowCaptureAutoStreamRouting && (pThis->pDevice->type == ma_device_type_capture || pThis->pDevice->type == ma_device_type_duplex || pThis->pDevice->type == ma_device_type_loopback)) { isCapture = MA_TRUE; if (ma_strcmp_WCHAR(pThis->pDevice->capture.id.wasapi, pDeviceID) == 0) { isThisDevice = MA_TRUE; } } if (pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting && (pThis->pDevice->type == ma_device_type_playback || pThis->pDevice->type == ma_device_type_duplex)) { isPlayback = MA_TRUE; if (ma_strcmp_WCHAR(pThis->pDevice->playback.id.wasapi, pDeviceID) == 0) { isThisDevice = MA_TRUE; } } /* If the device ID matches our device we need to mark our device as detached and stop it. When a device is added in OnDeviceAdded(), we'll restart it. We only mark it as detached if the device was started at the time of being removed. */ if (isThisDevice) { if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) == 0) { /* Unplugged or otherwise unavailable. Mark as detached if we were in a playing state. We'll use this to determine whether or not we need to automatically start the device when it's plugged back in again. */ if (ma_device_get_state(pThis->pDevice) == ma_device_state_started) { if (isPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_TRUE; } if (isCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_TRUE; } ma_device_stop(pThis->pDevice); } } if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) != 0) { /* The device was activated. If we were detached, we need to start it again. */ ma_bool8 tryRestartingDevice = MA_FALSE; if (isPlayback) { if (pThis->pDevice->wasapi.isDetachedPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE; ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback); tryRestartingDevice = MA_TRUE; } } if (isCapture) { if (pThis->pDevice->wasapi.isDetachedCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE; ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture); tryRestartingDevice = MA_TRUE; } } if (tryRestartingDevice) { if (pThis->pDevice->wasapi.isDetachedPlayback == MA_FALSE && pThis->pDevice->wasapi.isDetachedCapture == MA_FALSE) { ma_device_start(pThis->pDevice); } } } } return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceAdded(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceAdded(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif /* We don't need to worry about this event for our purposes. */ (void)pThis; (void)pDeviceID; return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceRemoved(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDeviceRemoved(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif /* We don't need to worry about this event for our purposes. */ (void)pThis; (void)pDeviceID; return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDefaultDeviceChanged(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnDefaultDeviceChanged(dataFlow=%d, role=%d, pDefaultDeviceID=%S)\n", dataFlow, role, (pDefaultDeviceID != NULL) ? pDefaultDeviceID : L"(NULL)");*/ #endif (void)role; /* We only care about devices with the same data flow as the current device. */ if ((pThis->pDevice->type == ma_device_type_playback && dataFlow != ma_eRender) || (pThis->pDevice->type == ma_device_type_capture && dataFlow != ma_eCapture) || (pThis->pDevice->type == ma_device_type_loopback && dataFlow != ma_eRender)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because dataFlow does match device type.\n"); return S_OK; } /* We need to consider dataFlow as ma_eCapture if device is ma_device_type_loopback */ if (pThis->pDevice->type == ma_device_type_loopback) { dataFlow = ma_eCapture; } /* Don't do automatic stream routing if we're not allowed. */ if ((dataFlow == ma_eRender && pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting == MA_FALSE) || (dataFlow == ma_eCapture && pThis->pDevice->wasapi.allowCaptureAutoStreamRouting == MA_FALSE)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because automatic stream routing has been disabled by the device config.\n"); return S_OK; } /* Not currently supporting automatic stream routing in exclusive mode. This is not working correctly on my machine due to AUDCLNT_E_DEVICE_IN_USE errors when reinitializing the device. If this is a bug in miniaudio, we can try re-enabling this once it's fixed. */ if ((dataFlow == ma_eRender && pThis->pDevice->playback.shareMode == ma_share_mode_exclusive) || (dataFlow == ma_eCapture && pThis->pDevice->capture.shareMode == ma_share_mode_exclusive)) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because the device shared mode is exclusive.\n"); return S_OK; } /* Second attempt at device rerouting. We're going to retrieve the device's state at the time of the route change. We're then going to stop the device, reinitialize the device, and then start it again if the state before stopping was ma_device_state_started. */ { ma_uint32 previousState = ma_device_get_state(pThis->pDevice); ma_bool8 restartDevice = MA_FALSE; if (previousState == ma_device_state_uninitialized || previousState == ma_device_state_starting) { ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Stream rerouting abandoned because the device is in the process of starting.\n"); return S_OK; } if (previousState == ma_device_state_started) { ma_device_stop(pThis->pDevice); restartDevice = MA_TRUE; } if (pDefaultDeviceID != NULL) { /* <-- The input device ID will be null if there's no other device available. */ ma_mutex_lock(&pThis->pDevice->wasapi.rerouteLock); { if (dataFlow == ma_eRender) { ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback); if (pThis->pDevice->wasapi.isDetachedPlayback) { pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE; if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedCapture) { restartDevice = MA_FALSE; /* It's a duplex device and the capture side is detached. We cannot be restarting the device just yet. */ } else { restartDevice = MA_TRUE; /* It's not a duplex device, or the capture side is also attached so we can go ahead and restart the device. */ } } } else { ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture); if (pThis->pDevice->wasapi.isDetachedCapture) { pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE; if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedPlayback) { restartDevice = MA_FALSE; /* It's a duplex device and the playback side is detached. We cannot be restarting the device just yet. */ } else { restartDevice = MA_TRUE; /* It's not a duplex device, or the playback side is also attached so we can go ahead and restart the device. */ } } } } ma_mutex_unlock(&pThis->pDevice->wasapi.rerouteLock); if (restartDevice) { ma_device_start(pThis->pDevice); } } } return S_OK; } static HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnPropertyValueChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key) { #ifdef MA_DEBUG_OUTPUT /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, "IMMNotificationClient_OnPropertyValueChanged(pDeviceID=%S)\n", (pDeviceID != NULL) ? pDeviceID : L"(NULL)");*/ #endif (void)pThis; (void)pDeviceID; (void)key; return S_OK; } static ma_IMMNotificationClientVtbl g_maNotificationCientVtbl = { ma_IMMNotificationClient_QueryInterface, ma_IMMNotificationClient_AddRef, ma_IMMNotificationClient_Release, ma_IMMNotificationClient_OnDeviceStateChanged, ma_IMMNotificationClient_OnDeviceAdded, ma_IMMNotificationClient_OnDeviceRemoved, ma_IMMNotificationClient_OnDefaultDeviceChanged, ma_IMMNotificationClient_OnPropertyValueChanged }; #endif /* MA_WIN32_DESKTOP */ static const char* ma_to_usage_string__wasapi(ma_wasapi_usage usage) { switch (usage) { case ma_wasapi_usage_default: return NULL; case ma_wasapi_usage_games: return "Games"; case ma_wasapi_usage_pro_audio: return "Pro Audio"; default: break; } return NULL; } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) typedef ma_IMMDevice ma_WASAPIDeviceInterface; #else typedef ma_IUnknown ma_WASAPIDeviceInterface; #endif #define MA_CONTEXT_COMMAND_QUIT__WASAPI 1 #define MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI 2 #define MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI 3 static ma_context_command__wasapi ma_context_init_command__wasapi(int code) { ma_context_command__wasapi cmd; MA_ZERO_OBJECT(&cmd); cmd.code = code; return cmd; } static ma_result ma_context_post_command__wasapi(ma_context* pContext, const ma_context_command__wasapi* pCmd) { /* For now we are doing everything synchronously, but I might relax this later if the need arises. */ ma_result result; ma_bool32 isUsingLocalEvent = MA_FALSE; ma_event localEvent; MA_ASSERT(pContext != NULL); MA_ASSERT(pCmd != NULL); if (pCmd->pEvent == NULL) { isUsingLocalEvent = MA_TRUE; result = ma_event_init(&localEvent); if (result != MA_SUCCESS) { return result; /* Failed to create the event for this command. */ } } /* Here is where we add the command to the list. If there's not enough room we'll spin until there is. */ ma_mutex_lock(&pContext->wasapi.commandLock); { ma_uint32 index; /* Spin until we've got some space available. */ while (pContext->wasapi.commandCount == ma_countof(pContext->wasapi.commands)) { ma_yield(); } /* Space is now available. Can safely add to the list. */ index = (pContext->wasapi.commandIndex + pContext->wasapi.commandCount) % ma_countof(pContext->wasapi.commands); pContext->wasapi.commands[index] = *pCmd; pContext->wasapi.commands[index].pEvent = &localEvent; pContext->wasapi.commandCount += 1; /* Now that the command has been added, release the semaphore so ma_context_next_command__wasapi() can return. */ ma_semaphore_release(&pContext->wasapi.commandSem); } ma_mutex_unlock(&pContext->wasapi.commandLock); if (isUsingLocalEvent) { ma_event_wait(&localEvent); ma_event_uninit(&localEvent); } return MA_SUCCESS; } static ma_result ma_context_next_command__wasapi(ma_context* pContext, ma_context_command__wasapi* pCmd) { ma_result result = MA_SUCCESS; MA_ASSERT(pContext != NULL); MA_ASSERT(pCmd != NULL); result = ma_semaphore_wait(&pContext->wasapi.commandSem); if (result == MA_SUCCESS) { ma_mutex_lock(&pContext->wasapi.commandLock); { *pCmd = pContext->wasapi.commands[pContext->wasapi.commandIndex]; pContext->wasapi.commandIndex = (pContext->wasapi.commandIndex + 1) % ma_countof(pContext->wasapi.commands); pContext->wasapi.commandCount -= 1; } ma_mutex_unlock(&pContext->wasapi.commandLock); } return result; } static ma_thread_result MA_THREADCALL ma_context_command_thread__wasapi(void* pUserData) { ma_result result; ma_context* pContext = (ma_context*)pUserData; MA_ASSERT(pContext != NULL); for (;;) { ma_context_command__wasapi cmd; result = ma_context_next_command__wasapi(pContext, &cmd); if (result != MA_SUCCESS) { break; } switch (cmd.code) { case MA_CONTEXT_COMMAND_QUIT__WASAPI: { /* Do nothing. Handled after the switch. */ } break; case MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI: { if (cmd.data.createAudioClient.deviceType == ma_device_type_playback) { *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioRenderClient, cmd.data.createAudioClient.ppAudioClientService)); } else { *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioCaptureClient, cmd.data.createAudioClient.ppAudioClientService)); } } break; case MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI: { if (cmd.data.releaseAudioClient.deviceType == ma_device_type_playback) { if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback); cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback = NULL; } } if (cmd.data.releaseAudioClient.deviceType == ma_device_type_capture) { if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture); cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture = NULL; } } } break; default: { /* Unknown command. Ignore it, but trigger an assert in debug mode so we're aware of it. */ MA_ASSERT(MA_FALSE); } break; } if (cmd.pEvent != NULL) { ma_event_signal(cmd.pEvent); } if (cmd.code == MA_CONTEXT_COMMAND_QUIT__WASAPI) { break; /* Received a quit message. Get out of here. */ } } return (ma_thread_result)0; } static ma_result ma_device_create_IAudioClient_service__wasapi(ma_context* pContext, ma_device_type deviceType, ma_IAudioClient* pAudioClient, void** ppAudioClientService) { ma_result result; ma_result cmdResult; ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI); cmd.data.createAudioClient.deviceType = deviceType; cmd.data.createAudioClient.pAudioClient = (void*)pAudioClient; cmd.data.createAudioClient.ppAudioClientService = ppAudioClientService; cmd.data.createAudioClient.pResult = &cmdResult; /* Declared locally, but won't be dereferenced after this function returns since execution of the command will wait here. */ result = ma_context_post_command__wasapi(pContext, &cmd); /* This will not return until the command has actually been run. */ if (result != MA_SUCCESS) { return result; } return *cmd.data.createAudioClient.pResult; } #if 0 /* Not used at the moment, but leaving here for future use. */ static ma_result ma_device_release_IAudioClient_service__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_result result; ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI); cmd.data.releaseAudioClient.pDevice = pDevice; cmd.data.releaseAudioClient.deviceType = deviceType; result = ma_context_post_command__wasapi(pDevice->pContext, &cmd); /* This will not return until the command has actually been run. */ if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } #endif static void ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF, ma_share_mode shareMode, ma_device_info* pInfo) { MA_ASSERT(pWF != NULL); MA_ASSERT(pInfo != NULL); if (pInfo->nativeDataFormatCount >= ma_countof(pInfo->nativeDataFormats)) { return; /* Too many data formats. Need to ignore this one. Don't think this should ever happen with WASAPI. */ } pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].format = ma_format_from_WAVEFORMATEX(pWF); pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].channels = pWF->nChannels; pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].sampleRate = pWF->nSamplesPerSec; pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].flags = (shareMode == ma_share_mode_exclusive) ? MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE : 0; pInfo->nativeDataFormatCount += 1; } static ma_result ma_context_get_device_info_from_IAudioClient__wasapi(ma_context* pContext, /*ma_IMMDevice**/void* pMMDevice, ma_IAudioClient* pAudioClient, ma_device_info* pInfo) { HRESULT hr; MA_WAVEFORMATEX* pWF = NULL; MA_ASSERT(pAudioClient != NULL); MA_ASSERT(pInfo != NULL); /* Shared Mode. We use GetMixFormat() here. */ hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pAudioClient, (MA_WAVEFORMATEX**)&pWF); if (SUCCEEDED(hr)) { ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_shared, pInfo); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve mix format for device info retrieval."); return ma_result_from_HRESULT(hr); } /* Exclusive Mode. We repeatedly call IsFormatSupported() here. This is not currently supported on UWP. Failure to retrieve the exclusive mode format is not considered an error, so from here on out, MA_SUCCESS is guaranteed to be returned. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { ma_IPropertyStore *pProperties; /* The first thing to do is get the format from PKEY_AudioEngine_DeviceFormat. This should give us a channel count we assume is correct which will simplify our searching. */ hr = ma_IMMDevice_OpenPropertyStore((ma_IMMDevice*)pMMDevice, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT var; ma_PropVariantInit(&var); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_AudioEngine_DeviceFormat, &var); if (SUCCEEDED(hr)) { pWF = (MA_WAVEFORMATEX*)var.blob.pBlobData; /* In my testing, the format returned by PKEY_AudioEngine_DeviceFormat is suitable for exclusive mode so we check this format first. If this fails, fall back to a search. */ hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pWF, NULL); if (SUCCEEDED(hr)) { /* The format returned by PKEY_AudioEngine_DeviceFormat is supported. */ ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_exclusive, pInfo); } else { /* The format returned by PKEY_AudioEngine_DeviceFormat is not supported, so fall back to a search. We assume the channel count returned by MA_PKEY_AudioEngine_DeviceFormat is valid and correct. For simplicity we're only returning one format. */ ma_uint32 channels = pWF->nChannels; ma_channel defaultChannelMap[MA_MAX_CHANNELS]; MA_WAVEFORMATEXTENSIBLE wf; ma_bool32 found; ma_uint32 iFormat; /* Make sure we don't overflow the channel map. */ if (channels > MA_MAX_CHANNELS) { channels = MA_MAX_CHANNELS; } ma_channel_map_init_standard(ma_standard_channel_map_microsoft, defaultChannelMap, ma_countof(defaultChannelMap), channels); MA_ZERO_OBJECT(&wf); wf.cbSize = sizeof(wf); wf.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wf.nChannels = (WORD)channels; wf.dwChannelMask = ma_channel_map_to_channel_mask__win32(defaultChannelMap, channels); found = MA_FALSE; for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) { ma_format format = g_maFormatPriorities[iFormat]; ma_uint32 iSampleRate; wf.wBitsPerSample = (WORD)(ma_get_bytes_per_sample(format)*8); wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; wf.Samples.wValidBitsPerSample = /*(format == ma_format_s24_32) ? 24 :*/ wf.wBitsPerSample; if (format == ma_format_f32) { wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; } else { wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; } for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iSampleRate) { wf.nSamplesPerSec = g_maStandardSampleRatePriorities[iSampleRate]; hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, (MA_WAVEFORMATEX*)&wf, NULL); if (SUCCEEDED(hr)) { ma_add_native_data_format_to_device_info_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf, ma_share_mode_exclusive, pInfo); found = MA_TRUE; break; } } if (found) { break; } } ma_PropVariantClear(pContext, &var); if (!found) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to find suitable device format for device info retrieval."); } } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to retrieve device format for device info retrieval."); } ma_IPropertyStore_Release(pProperties); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "[WASAPI] Failed to open property store for device info retrieval."); } } #else { (void)pMMDevice; /* Unused. */ } #endif return MA_SUCCESS; } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) static ma_EDataFlow ma_device_type_to_EDataFlow(ma_device_type deviceType) { if (deviceType == ma_device_type_playback) { return ma_eRender; } else if (deviceType == ma_device_type_capture) { return ma_eCapture; } else { MA_ASSERT(MA_FALSE); return ma_eRender; /* Should never hit this. */ } } static ma_result ma_context_create_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator** ppDeviceEnumerator) { HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDeviceEnumerator != NULL); *ppDeviceEnumerator = NULL; /* Safety. */ hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } *ppDeviceEnumerator = pDeviceEnumerator; return MA_SUCCESS; } static WCHAR* ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType) { HRESULT hr; ma_IMMDevice* pMMDefaultDevice = NULL; WCHAR* pDefaultDeviceID = NULL; ma_EDataFlow dataFlow; ma_ERole role; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceEnumerator != NULL); (void)pContext; /* Grab the EDataFlow type from the device type. */ dataFlow = ma_device_type_to_EDataFlow(deviceType); /* The role is always eConsole, but we may make this configurable later. */ role = ma_eConsole; hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, dataFlow, role, &pMMDefaultDevice); if (FAILED(hr)) { return NULL; } hr = ma_IMMDevice_GetId(pMMDefaultDevice, &pDefaultDeviceID); ma_IMMDevice_Release(pMMDefaultDevice); pMMDefaultDevice = NULL; if (FAILED(hr)) { return NULL; } return pDefaultDeviceID; } static WCHAR* ma_context_get_default_device_id__wasapi(ma_context* pContext, ma_device_type deviceType) /* Free the returned pointer with ma_CoTaskMemFree() */ { ma_result result; ma_IMMDeviceEnumerator* pDeviceEnumerator; WCHAR* pDefaultDeviceID = NULL; MA_ASSERT(pContext != NULL); result = ma_context_create_IMMDeviceEnumerator__wasapi(pContext, &pDeviceEnumerator); if (result != MA_SUCCESS) { return NULL; } pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType); ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); return pDefaultDeviceID; } static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_IMMDevice** ppMMDevice) { ma_IMMDeviceEnumerator* pDeviceEnumerator; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppMMDevice != NULL); /* This weird COM init/uninit here is a hack to work around a crash when changing devices. What is happening is WASAPI fires a callback from another thread when the device is changed. It's from that thread where this function is getting called. What I'm suspecting is that the other thread is not initializing COM which in turn results in CoCreateInstance() failing. The community has reported that this seems to fix the crash. There are future plans to move all WASAPI operation over to a single thread to make everything safer, but in the meantime while we wait for that to come online I'm happy enough to use this hack instead. */ ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE); { hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); } ma_CoUninitialize(pContext); if (FAILED(hr)) { /* <-- This is checking the call above to ma_CoCreateInstance(). */ ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n"); return ma_result_from_HRESULT(hr); } if (pDeviceID == NULL) { hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, (deviceType == ma_device_type_capture) ? ma_eCapture : ma_eRender, ma_eConsole, ppMMDevice); } else { hr = ma_IMMDeviceEnumerator_GetDevice(pDeviceEnumerator, pDeviceID->wasapi, ppMMDevice); } ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve IMMDevice.\n"); return ma_result_from_HRESULT(hr); } return MA_SUCCESS; } static ma_result ma_context_get_device_id_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, ma_device_id* pDeviceID) { WCHAR* pDeviceIDString; HRESULT hr; MA_ASSERT(pDeviceID != NULL); hr = ma_IMMDevice_GetId(pMMDevice, &pDeviceIDString); if (SUCCEEDED(hr)) { size_t idlen = ma_strlen_WCHAR(pDeviceIDString); if (idlen+1 > ma_countof(pDeviceID->wasapi)) { ma_CoTaskMemFree(pContext, pDeviceIDString); MA_ASSERT(MA_FALSE); /* NOTE: If this is triggered, please report it. It means the format of the ID must have changed and is too long to fit in our fixed sized buffer. */ return MA_ERROR; } MA_COPY_MEMORY(pDeviceID->wasapi, pDeviceIDString, idlen * sizeof(wchar_t)); pDeviceID->wasapi[idlen] = '\0'; ma_CoTaskMemFree(pContext, pDeviceIDString); return MA_SUCCESS; } return MA_ERROR; } static ma_result ma_context_get_device_info_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, WCHAR* pDefaultDeviceID, ma_bool32 onlySimpleInfo, ma_device_info* pInfo) { ma_result result; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(pMMDevice != NULL); MA_ASSERT(pInfo != NULL); /* ID. */ result = ma_context_get_device_id_from_MMDevice__wasapi(pContext, pMMDevice, &pInfo->id); if (result == MA_SUCCESS) { if (pDefaultDeviceID != NULL) { if (ma_strcmp_WCHAR(pInfo->id.wasapi, pDefaultDeviceID) == 0) { pInfo->isDefault = MA_TRUE; } } } /* Description / Friendly Name */ { ma_IPropertyStore *pProperties; hr = ma_IMMDevice_OpenPropertyStore(pMMDevice, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT var; ma_PropVariantInit(&var); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &var); if (SUCCEEDED(hr)) { WideCharToMultiByte(CP_UTF8, 0, var.pwszVal, -1, pInfo->name, sizeof(pInfo->name), 0, FALSE); ma_PropVariantClear(pContext, &var); } ma_IPropertyStore_Release(pProperties); } } /* Format */ if (!onlySimpleInfo) { ma_IAudioClient* pAudioClient; hr = ma_IMMDevice_Activate(pMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pAudioClient); if (SUCCEEDED(hr)) { result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, pMMDevice, pAudioClient, pInfo); ma_IAudioClient_Release(pAudioClient); return result; } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to activate audio client for device info retrieval."); return ma_result_from_HRESULT(hr); } } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices_by_type__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result = MA_SUCCESS; UINT deviceCount; HRESULT hr; ma_uint32 iDevice; WCHAR* pDefaultDeviceID = NULL; ma_IMMDeviceCollection* pDeviceCollection = NULL; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Grab the default device. We use this to know whether or not flag the returned device info as being the default. */ pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType); /* We need to enumerate the devices which returns a device collection. */ hr = ma_IMMDeviceEnumerator_EnumAudioEndpoints(pDeviceEnumerator, ma_device_type_to_EDataFlow(deviceType), MA_MM_DEVICE_STATE_ACTIVE, &pDeviceCollection); if (SUCCEEDED(hr)) { hr = ma_IMMDeviceCollection_GetCount(pDeviceCollection, &deviceCount); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to get device count.\n"); result = ma_result_from_HRESULT(hr); goto done; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; ma_IMMDevice* pMMDevice; MA_ZERO_OBJECT(&deviceInfo); hr = ma_IMMDeviceCollection_Item(pDeviceCollection, iDevice, &pMMDevice); if (SUCCEEDED(hr)) { result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_TRUE, &deviceInfo); /* MA_TRUE = onlySimpleInfo. */ ma_IMMDevice_Release(pMMDevice); if (result == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, deviceType, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { break; } } } } } done: if (pDefaultDeviceID != NULL) { ma_CoTaskMemFree(pContext, pDefaultDeviceID); pDefaultDeviceID = NULL; } if (pDeviceCollection != NULL) { ma_IMMDeviceCollection_Release(pDeviceCollection); pDeviceCollection = NULL; } return result; } static ma_result ma_context_get_IAudioClient_Desktop__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IMMDevice** ppMMDevice) { ma_result result; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppAudioClient != NULL); MA_ASSERT(ppMMDevice != NULL); result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, ppMMDevice); if (result != MA_SUCCESS) { return result; } hr = ma_IMMDevice_Activate(*ppMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, pActivationParams, (void**)ppAudioClient); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } return MA_SUCCESS; } #else static ma_result ma_context_get_IAudioClient_UWP__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IUnknown** ppActivatedInterface) { ma_IActivateAudioInterfaceAsyncOperation *pAsyncOp = NULL; ma_completion_handler_uwp completionHandler; IID iid; WCHAR* iidStr; HRESULT hr; ma_result result; HRESULT activateResult; ma_IUnknown* pActivatedInterface; MA_ASSERT(pContext != NULL); MA_ASSERT(ppAudioClient != NULL); if (pDeviceID != NULL) { iidStr = (WCHAR*)pDeviceID->wasapi; } else { if (deviceType == ma_device_type_capture) { iid = MA_IID_DEVINTERFACE_AUDIO_CAPTURE; } else { iid = MA_IID_DEVINTERFACE_AUDIO_RENDER; } #if defined(__cplusplus) hr = StringFromIID(iid, &iidStr); #else hr = StringFromIID(&iid, &iidStr); #endif if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to convert device IID to string for ActivateAudioInterfaceAsync(). Out of memory.\n"); return ma_result_from_HRESULT(hr); } } result = ma_completion_handler_uwp_init(&completionHandler); if (result != MA_SUCCESS) { ma_CoTaskMemFree(pContext, iidStr); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for waiting for ActivateAudioInterfaceAsync().\n"); return result; } hr = ((MA_PFN_ActivateAudioInterfaceAsync)pContext->wasapi.ActivateAudioInterfaceAsync)(iidStr, &MA_IID_IAudioClient, pActivationParams, (ma_IActivateAudioInterfaceCompletionHandler*)&completionHandler, (ma_IActivateAudioInterfaceAsyncOperation**)&pAsyncOp); if (FAILED(hr)) { ma_completion_handler_uwp_uninit(&completionHandler); ma_CoTaskMemFree(pContext, iidStr); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] ActivateAudioInterfaceAsync() failed.\n"); return ma_result_from_HRESULT(hr); } if (pDeviceID == NULL) { ma_CoTaskMemFree(pContext, iidStr); } /* Wait for the async operation for finish. */ ma_completion_handler_uwp_wait(&completionHandler); ma_completion_handler_uwp_uninit(&completionHandler); hr = ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(pAsyncOp, &activateResult, &pActivatedInterface); ma_IActivateAudioInterfaceAsyncOperation_Release(pAsyncOp); if (FAILED(hr) || FAILED(activateResult)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to activate device.\n"); return FAILED(hr) ? ma_result_from_HRESULT(hr) : ma_result_from_HRESULT(activateResult); } /* Here is where we grab the IAudioClient interface. */ hr = ma_IUnknown_QueryInterface(pActivatedInterface, &MA_IID_IAudioClient, (void**)ppAudioClient); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to query IAudioClient interface.\n"); return ma_result_from_HRESULT(hr); } if (ppActivatedInterface) { *ppActivatedInterface = pActivatedInterface; } else { ma_IUnknown_Release(pActivatedInterface); } return MA_SUCCESS; } #endif /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-audioclient_activation_type */ typedef enum { MA_AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT, MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK } MA_AUDIOCLIENT_ACTIVATION_TYPE; /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-process_loopback_mode */ typedef enum { MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE, MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE } MA_PROCESS_LOOPBACK_MODE; /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_process_loopback_params */ typedef struct { DWORD TargetProcessId; MA_PROCESS_LOOPBACK_MODE ProcessLoopbackMode; } MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */ #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc11-extensions" /* anonymous unions are a C11 extension */ #endif #endif /* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params */ typedef struct { MA_AUDIOCLIENT_ACTIVATION_TYPE ActivationType; union { MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams; }; } MA_AUDIOCLIENT_ACTIVATION_PARAMS; #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) #pragma GCC diagnostic pop #endif #define MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK L"VAD\\Process_Loopback" static ma_result ma_context_get_IAudioClient__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_uint32 loopbackProcessID, ma_bool32 loopbackProcessExclude, ma_IAudioClient** ppAudioClient, ma_WASAPIDeviceInterface** ppDeviceInterface) { ma_result result; ma_bool32 usingProcessLoopback = MA_FALSE; MA_AUDIOCLIENT_ACTIVATION_PARAMS audioclientActivationParams; MA_PROPVARIANT activationParams; MA_PROPVARIANT* pActivationParams = NULL; ma_device_id virtualDeviceID; /* Activation parameters specific to loopback mode. Note that process-specific loopback will only work when a default device ID is specified. */ if (deviceType == ma_device_type_loopback && loopbackProcessID != 0 && pDeviceID == NULL) { usingProcessLoopback = MA_TRUE; } if (usingProcessLoopback) { MA_ZERO_OBJECT(&audioclientActivationParams); audioclientActivationParams.ActivationType = MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK; audioclientActivationParams.ProcessLoopbackParams.ProcessLoopbackMode = (loopbackProcessExclude) ? MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE : MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE; audioclientActivationParams.ProcessLoopbackParams.TargetProcessId = (DWORD)loopbackProcessID; ma_PropVariantInit(&activationParams); activationParams.vt = MA_VT_BLOB; activationParams.blob.cbSize = sizeof(audioclientActivationParams); activationParams.blob.pBlobData = (BYTE*)&audioclientActivationParams; pActivationParams = &activationParams; /* When requesting a specific device ID we need to use a special device ID. */ MA_COPY_MEMORY(virtualDeviceID.wasapi, MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK, (wcslen(MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK) + 1) * sizeof(wchar_t)); /* +1 for the null terminator. */ pDeviceID = &virtualDeviceID; } else { pActivationParams = NULL; /* No activation parameters required. */ } #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) result = ma_context_get_IAudioClient_Desktop__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface); #else result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface); #endif /* If loopback mode was requested with a process ID and initialization failed, it could be because it's trying to run on an older version of Windows where it's not supported. We need to let the caller know about this with a log message. */ if (result != MA_SUCCESS) { if (usingProcessLoopback) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Loopback mode requested to %s process ID %u, but initialization failed. Support for this feature begins with Windows 10 Build 20348. Confirm your version of Windows or consider not using process-specific loopback.\n", (loopbackProcessExclude) ? "exclude" : "include", loopbackProcessID); } } return result; } static ma_result ma_context_enumerate_devices__wasapi(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { /* Different enumeration for desktop and UWP. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* Desktop */ HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_playback, callback, pUserData); ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_capture, callback, pUserData); ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); #else /* UWP The MMDevice API is only supported on desktop applications. For now, while I'm still figuring out how to properly enumerate over devices without using MMDevice, I'm restricting devices to defaults. Hint: DeviceInformation::FindAllAsync() with DeviceClass.AudioCapture/AudioRender. https://blogs.windows.com/buildingapps/2014/05/15/real-time-audio-in-windows-store-and-windows-phone-apps/ */ if (callback) { ma_bool32 cbResult = MA_TRUE; /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } #endif return MA_SUCCESS; } static ma_result ma_context_get_device_info__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) ma_result result; ma_IMMDevice* pMMDevice = NULL; WCHAR* pDefaultDeviceID = NULL; result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, &pMMDevice); if (result != MA_SUCCESS) { return result; } /* We need the default device ID so we can set the isDefault flag in the device info. */ pDefaultDeviceID = ma_context_get_default_device_id__wasapi(pContext, deviceType); result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_FALSE, pDeviceInfo); /* MA_FALSE = !onlySimpleInfo. */ if (pDefaultDeviceID != NULL) { ma_CoTaskMemFree(pContext, pDefaultDeviceID); pDefaultDeviceID = NULL; } ma_IMMDevice_Release(pMMDevice); return result; #else ma_IAudioClient* pAudioClient; ma_result result; /* UWP currently only uses default devices. */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, NULL, &pAudioClient, NULL); if (result != MA_SUCCESS) { return result; } result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, NULL, pAudioClient, pDeviceInfo); pDeviceInfo->isDefault = MA_TRUE; /* UWP only supports default devices. */ ma_IAudioClient_Release(pAudioClient); return result; #endif } static ma_result ma_device_uninit__wasapi(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { if (pDevice->wasapi.pDeviceEnumerator) { ((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator)->lpVtbl->UnregisterEndpointNotificationCallback((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator, &pDevice->wasapi.notificationClient); ma_IMMDeviceEnumerator_Release((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator); } ma_mutex_uninit(&pDevice->wasapi.rerouteLock); } #endif if (pDevice->wasapi.pRenderClient) { if (pDevice->wasapi.pMappedBufferPlayback != NULL) { ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; } ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); } if (pDevice->wasapi.pCaptureClient) { if (pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); } if (pDevice->wasapi.pAudioClientPlayback) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); } if (pDevice->wasapi.pAudioClientCapture) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); } if (pDevice->wasapi.hEventPlayback) { CloseHandle((HANDLE)pDevice->wasapi.hEventPlayback); } if (pDevice->wasapi.hEventCapture) { CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); } return MA_SUCCESS; } typedef struct { /* Input. */ ma_format formatIn; ma_uint32 channelsIn; ma_uint32 sampleRateIn; ma_channel channelMapIn[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesIn; ma_uint32 periodSizeInMillisecondsIn; ma_uint32 periodsIn; ma_share_mode shareMode; ma_performance_profile performanceProfile; ma_bool32 noAutoConvertSRC; ma_bool32 noDefaultQualitySRC; ma_bool32 noHardwareOffloading; ma_uint32 loopbackProcessID; ma_bool32 loopbackProcessExclude; /* Output. */ ma_IAudioClient* pAudioClient; ma_IAudioRenderClient* pRenderClient; ma_IAudioCaptureClient* pCaptureClient; ma_format formatOut; ma_uint32 channelsOut; ma_uint32 sampleRateOut; ma_channel channelMapOut[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesOut; ma_uint32 periodsOut; ma_bool32 usingAudioClient3; char deviceName[256]; ma_device_id id; } ma_device_init_internal_data__wasapi; static ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__wasapi* pData) { HRESULT hr; ma_result result = MA_SUCCESS; const char* errorMsg = ""; MA_AUDCLNT_SHAREMODE shareMode = MA_AUDCLNT_SHAREMODE_SHARED; DWORD streamFlags = 0; MA_REFERENCE_TIME periodDurationInMicroseconds; ma_bool32 wasInitializedUsingIAudioClient3 = MA_FALSE; MA_WAVEFORMATEXTENSIBLE wf; ma_WASAPIDeviceInterface* pDeviceInterface = NULL; ma_IAudioClient2* pAudioClient2; ma_uint32 nativeSampleRate; ma_bool32 usingProcessLoopback = MA_FALSE; MA_ASSERT(pContext != NULL); MA_ASSERT(pData != NULL); /* This function is only used to initialize one device type: either playback, capture or loopback. Never full-duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } usingProcessLoopback = deviceType == ma_device_type_loopback && pData->loopbackProcessID != 0 && pDeviceID == NULL; pData->pAudioClient = NULL; pData->pRenderClient = NULL; pData->pCaptureClient = NULL; streamFlags = MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK; if (!pData->noAutoConvertSRC && pData->sampleRateIn != 0 && pData->shareMode != ma_share_mode_exclusive) { /* <-- Exclusive streams must use the native sample rate. */ streamFlags |= MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM; } if (!pData->noDefaultQualitySRC && pData->sampleRateIn != 0 && (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) != 0) { streamFlags |= MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY; } if (deviceType == ma_device_type_loopback) { streamFlags |= MA_AUDCLNT_STREAMFLAGS_LOOPBACK; } result = ma_context_get_IAudioClient__wasapi(pContext, deviceType, pDeviceID, pData->loopbackProcessID, pData->loopbackProcessExclude, &pData->pAudioClient, &pDeviceInterface); if (result != MA_SUCCESS) { goto done; } MA_ZERO_OBJECT(&wf); /* Try enabling hardware offloading. */ if (!pData->noHardwareOffloading) { hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient2, (void**)&pAudioClient2); if (SUCCEEDED(hr)) { BOOL isHardwareOffloadingSupported = 0; hr = ma_IAudioClient2_IsOffloadCapable(pAudioClient2, MA_AudioCategory_Other, &isHardwareOffloadingSupported); if (SUCCEEDED(hr) && isHardwareOffloadingSupported) { ma_AudioClientProperties clientProperties; MA_ZERO_OBJECT(&clientProperties); clientProperties.cbSize = sizeof(clientProperties); clientProperties.bIsOffload = 1; clientProperties.eCategory = MA_AudioCategory_Other; ma_IAudioClient2_SetClientProperties(pAudioClient2, &clientProperties); } pAudioClient2->lpVtbl->Release(pAudioClient2); } } /* Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode. */ result = MA_FORMAT_NOT_SUPPORTED; if (pData->shareMode == ma_share_mode_exclusive) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) /* In exclusive mode on desktop we always use the backend's native format. */ ma_IPropertyStore* pStore = NULL; hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pStore); if (SUCCEEDED(hr)) { MA_PROPVARIANT prop; ma_PropVariantInit(&prop); hr = ma_IPropertyStore_GetValue(pStore, &MA_PKEY_AudioEngine_DeviceFormat, &prop); if (SUCCEEDED(hr)) { MA_WAVEFORMATEX* pActualFormat = (MA_WAVEFORMATEX*)prop.blob.pBlobData; hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pData->pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pActualFormat, NULL); if (SUCCEEDED(hr)) { MA_COPY_MEMORY(&wf, pActualFormat, sizeof(MA_WAVEFORMATEXTENSIBLE)); } ma_PropVariantClear(pContext, &prop); } ma_IPropertyStore_Release(pStore); } #else /* I do not know how to query the device's native format on UWP so for now I'm just disabling support for exclusive mode. The alternative is to enumerate over different formats and check IsFormatSupported() until you find one that works. TODO: Add support for exclusive mode to UWP. */ hr = S_FALSE; #endif if (hr == S_OK) { shareMode = MA_AUDCLNT_SHAREMODE_EXCLUSIVE; result = MA_SUCCESS; } else { result = MA_SHARE_MODE_NOT_SUPPORTED; } } else { /* In shared mode we are always using the format reported by the operating system. */ MA_WAVEFORMATEXTENSIBLE* pNativeFormat = NULL; hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pData->pAudioClient, (MA_WAVEFORMATEX**)&pNativeFormat); if (hr != S_OK) { /* When using process-specific loopback, GetMixFormat() seems to always fail. */ if (usingProcessLoopback) { wf.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; wf.nChannels = 2; wf.nSamplesPerSec = 44100; wf.wBitsPerSample = 32; wf.nBlockAlign = wf.nChannels * wf.wBitsPerSample / 8; wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; wf.cbSize = sizeof(MA_WAVEFORMATEX); result = MA_SUCCESS; } else { result = MA_FORMAT_NOT_SUPPORTED; } } else { /* I've seen cases where cbSize will be set to sizeof(WAVEFORMATEX) even though the structure itself is given the format tag of WAVE_FORMAT_EXTENSIBLE. If the format tag is WAVE_FORMAT_EXTENSIBLE want to make sure we copy the whole WAVEFORMATEXTENSIBLE structure. Otherwise we'll have to be safe and only copy the WAVEFORMATEX part. */ if (pNativeFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { MA_COPY_MEMORY(&wf, pNativeFormat, sizeof(MA_WAVEFORMATEXTENSIBLE)); } else { /* I've seen a case where cbSize was set to 0. Assume sizeof(WAVEFORMATEX) in this case. */ size_t cbSize = pNativeFormat->cbSize; if (cbSize == 0) { cbSize = sizeof(MA_WAVEFORMATEX); } /* Make sure we don't copy more than the capacity of `wf`. */ if (cbSize > sizeof(wf)) { cbSize = sizeof(wf); } MA_COPY_MEMORY(&wf, pNativeFormat, cbSize); } result = MA_SUCCESS; } ma_CoTaskMemFree(pContext, pNativeFormat); shareMode = MA_AUDCLNT_SHAREMODE_SHARED; } /* Return an error if we still haven't found a format. */ if (result != MA_SUCCESS) { errorMsg = "[WASAPI] Failed to find best device mix format."; goto done; } /* Override the native sample rate with the one requested by the caller, but only if we're not using the default sample rate. We'll use WASAPI to perform the sample rate conversion. */ nativeSampleRate = wf.nSamplesPerSec; if (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) { wf.nSamplesPerSec = (pData->sampleRateIn != 0) ? pData->sampleRateIn : MA_DEFAULT_SAMPLE_RATE; wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; } pData->formatOut = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf); if (pData->formatOut == ma_format_unknown) { /* The format isn't supported. This is almost certainly because the exclusive mode format isn't supported by miniaudio. We need to return MA_SHARE_MODE_NOT_SUPPORTED in this case so that the caller can detect it and fall back to shared mode if desired. We should never get here if shared mode was requested, but just for completeness we'll check for it and return MA_FORMAT_NOT_SUPPORTED. */ if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) { result = MA_SHARE_MODE_NOT_SUPPORTED; } else { result = MA_FORMAT_NOT_SUPPORTED; } errorMsg = "[WASAPI] Native format not supported."; goto done; } pData->channelsOut = wf.nChannels; pData->sampleRateOut = wf.nSamplesPerSec; /* Get the internal channel map based on the channel mask. There is a possibility that GetMixFormat() returns a WAVEFORMATEX instead of a WAVEFORMATEXTENSIBLE, in which case the channel mask will be undefined. In this case we'll just use the default channel map. */ if (wf.wFormatTag == WAVE_FORMAT_EXTENSIBLE || wf.cbSize >= sizeof(MA_WAVEFORMATEXTENSIBLE)) { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pData->channelsOut, pData->channelMapOut); } else { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); } /* Period size. */ pData->periodsOut = (pData->periodsIn != 0) ? pData->periodsIn : MA_DEFAULT_PERIODS; pData->periodSizeInFramesOut = pData->periodSizeInFramesIn; if (pData->periodSizeInFramesOut == 0) { if (pData->periodSizeInMillisecondsIn == 0) { if (pData->performanceProfile == ma_performance_profile_low_latency) { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, wf.nSamplesPerSec); } else { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, wf.nSamplesPerSec); } } else { pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, wf.nSamplesPerSec); } } periodDurationInMicroseconds = ((ma_uint64)pData->periodSizeInFramesOut * 1000 * 1000) / wf.nSamplesPerSec; /* Slightly different initialization for shared and exclusive modes. We try exclusive mode first, and if it fails, fall back to shared mode. */ if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) { MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10; /* If the periodicity is too small, Initialize() will fail with AUDCLNT_E_INVALID_DEVICE_PERIOD. In this case we should just keep increasing it and trying it again. */ hr = E_FAIL; for (;;) { hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL); if (hr == MA_AUDCLNT_E_INVALID_DEVICE_PERIOD) { if (bufferDuration > 500*10000) { break; } else { if (bufferDuration == 0) { /* <-- Just a sanity check to prevent an infinite loop. Should never happen, but it makes me feel better. */ break; } bufferDuration = bufferDuration * 2; continue; } } else { break; } } if (hr == MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED) { ma_uint32 bufferSizeInFrames; hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames); if (SUCCEEDED(hr)) { bufferDuration = (MA_REFERENCE_TIME)((10000.0 * 1000 / wf.nSamplesPerSec * bufferSizeInFrames) + 0.5); /* Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?! */ ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient); #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) hr = ma_IMMDevice_Activate(pDeviceInterface, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pData->pAudioClient); #else hr = ma_IUnknown_QueryInterface(pDeviceInterface, &MA_IID_IAudioClient, (void**)&pData->pAudioClient); #endif if (SUCCEEDED(hr)) { hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL); } } } if (FAILED(hr)) { /* Failed to initialize in exclusive mode. Don't fall back to shared mode - instead tell the client about it. They can reinitialize in shared mode if they want. */ if (hr == E_ACCESSDENIED) { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode. Access denied.", result = MA_ACCESS_DENIED; } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode. Device in use.", result = MA_BUSY; } else { errorMsg = "[WASAPI] Failed to initialize device in exclusive mode."; result = ma_result_from_HRESULT(hr); } goto done; } } if (shareMode == MA_AUDCLNT_SHAREMODE_SHARED) { /* Low latency shared mode via IAudioClient3. NOTE ==== Contrary to the documentation on MSDN (https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient3-initializesharedaudiostream), the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM and AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY with IAudioClient3_InitializeSharedAudioStream() absolutely does not work. Using any of these flags will result in HRESULT code 0x88890021. The other problem is that calling IAudioClient3_GetSharedModeEnginePeriod() with a sample rate different to that returned by IAudioClient_GetMixFormat() also results in an error. I'm therefore disabling low-latency shared mode with AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */ #ifndef MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE { if ((streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) == 0 || nativeSampleRate == wf.nSamplesPerSec) { ma_IAudioClient3* pAudioClient3 = NULL; hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient3, (void**)&pAudioClient3); if (SUCCEEDED(hr)) { ma_uint32 defaultPeriodInFrames; ma_uint32 fundamentalPeriodInFrames; ma_uint32 minPeriodInFrames; ma_uint32 maxPeriodInFrames; hr = ma_IAudioClient3_GetSharedModeEnginePeriod(pAudioClient3, (MA_WAVEFORMATEX*)&wf, &defaultPeriodInFrames, &fundamentalPeriodInFrames, &minPeriodInFrames, &maxPeriodInFrames); if (SUCCEEDED(hr)) { ma_uint32 desiredPeriodInFrames = pData->periodSizeInFramesOut; ma_uint32 actualPeriodInFrames = desiredPeriodInFrames; /* Make sure the period size is a multiple of fundamentalPeriodInFrames. */ actualPeriodInFrames = actualPeriodInFrames / fundamentalPeriodInFrames; actualPeriodInFrames = actualPeriodInFrames * fundamentalPeriodInFrames; /* The period needs to be clamped between minPeriodInFrames and maxPeriodInFrames. */ actualPeriodInFrames = ma_clamp(actualPeriodInFrames, minPeriodInFrames, maxPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Trying IAudioClient3_InitializeSharedAudioStream(actualPeriodInFrames=%d)\n", actualPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " defaultPeriodInFrames=%d\n", defaultPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " fundamentalPeriodInFrames=%d\n", fundamentalPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " minPeriodInFrames=%d\n", minPeriodInFrames); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " maxPeriodInFrames=%d\n", maxPeriodInFrames); /* If the client requested a largish buffer than we don't actually want to use low latency shared mode because it forces small buffers. */ if (actualPeriodInFrames >= desiredPeriodInFrames) { /* MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY must not be in the stream flags. If either of these are specified, IAudioClient3_InitializeSharedAudioStream() will fail. */ hr = ma_IAudioClient3_InitializeSharedAudioStream(pAudioClient3, streamFlags & ~(MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY), actualPeriodInFrames, (MA_WAVEFORMATEX*)&wf, NULL); if (SUCCEEDED(hr)) { wasInitializedUsingIAudioClient3 = MA_TRUE; pData->periodSizeInFramesOut = actualPeriodInFrames; ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Using IAudioClient3\n"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " periodSizeInFramesOut=%d\n", pData->periodSizeInFramesOut); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] IAudioClient3_InitializeSharedAudioStream failed. Falling back to IAudioClient.\n"); } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Not using IAudioClient3 because the desired period size is larger than the maximum supported by IAudioClient3.\n"); } } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] IAudioClient3_GetSharedModeEnginePeriod failed. Falling back to IAudioClient.\n"); } ma_IAudioClient3_Release(pAudioClient3); pAudioClient3 = NULL; } } } #else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[WASAPI] Not using IAudioClient3 because MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE is enabled.\n"); } #endif /* If we don't have an IAudioClient3 then we need to use the normal initialization routine. */ if (!wasInitializedUsingIAudioClient3) { MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10; /* <-- Multiply by 10 for microseconds to 100-nanoseconds. */ hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, 0, (const MA_WAVEFORMATEX*)&wf, NULL); if (FAILED(hr)) { if (hr == E_ACCESSDENIED) { errorMsg = "[WASAPI] Failed to initialize device. Access denied.", result = MA_ACCESS_DENIED; } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) { errorMsg = "[WASAPI] Failed to initialize device. Device in use.", result = MA_BUSY; } else { errorMsg = "[WASAPI] Failed to initialize device.", result = ma_result_from_HRESULT(hr); } goto done; } } } if (!wasInitializedUsingIAudioClient3) { ma_uint32 bufferSizeInFrames = 0; hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames); if (FAILED(hr)) { errorMsg = "[WASAPI] Failed to get audio client's actual buffer size.", result = ma_result_from_HRESULT(hr); goto done; } /* When using process loopback mode, retrieval of the buffer size seems to result in totally incorrect values. In this case we'll just assume it's the same size as what we requested when we initialized the client. */ if (usingProcessLoopback) { bufferSizeInFrames = (ma_uint32)((periodDurationInMicroseconds * pData->periodsOut) * pData->sampleRateOut / 1000000); } pData->periodSizeInFramesOut = bufferSizeInFrames / pData->periodsOut; } pData->usingAudioClient3 = wasInitializedUsingIAudioClient3; if (deviceType == ma_device_type_playback) { result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pRenderClient); } else { result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pCaptureClient); } /*if (FAILED(hr)) {*/ if (result != MA_SUCCESS) { errorMsg = "[WASAPI] Failed to get audio client service."; goto done; } /* Grab the name of the device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { ma_IPropertyStore *pProperties; hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pProperties); if (SUCCEEDED(hr)) { MA_PROPVARIANT varName; ma_PropVariantInit(&varName); hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &varName); if (SUCCEEDED(hr)) { WideCharToMultiByte(CP_UTF8, 0, varName.pwszVal, -1, pData->deviceName, sizeof(pData->deviceName), 0, FALSE); ma_PropVariantClear(pContext, &varName); } ma_IPropertyStore_Release(pProperties); } } #endif /* For the WASAPI backend we need to know the actual IDs of the device in order to do automatic stream routing so that IDs can be compared and we can determine which device has been detached and whether or not it matches with our ma_device. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) { /* Desktop */ ma_context_get_device_id_from_MMDevice__wasapi(pContext, pDeviceInterface, &pData->id); } #else { /* UWP */ /* TODO: Implement me. Need to figure out how to get the ID of the default device. */ } #endif done: /* Clean up. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pDeviceInterface != NULL) { ma_IMMDevice_Release(pDeviceInterface); } #else if (pDeviceInterface != NULL) { ma_IUnknown_Release(pDeviceInterface); } #endif if (result != MA_SUCCESS) { if (pData->pRenderClient) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pData->pRenderClient); pData->pRenderClient = NULL; } if (pData->pCaptureClient) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pData->pCaptureClient); pData->pCaptureClient = NULL; } if (pData->pAudioClient) { ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient); pData->pAudioClient = NULL; } if (errorMsg != NULL && errorMsg[0] != '\0') { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "%s\n", errorMsg); } return result; } else { return MA_SUCCESS; } } static ma_result ma_device_reinit__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_device_init_internal_data__wasapi data; ma_result result; MA_ASSERT(pDevice != NULL); /* We only re-initialize the playback or capture device. Never a full-duplex device. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } /* Before reinitializing the device we need to free the previous audio clients. There's a known memory leak here. We will be calling this from the routing change callback that is fired by WASAPI. If we attempt to release the IAudioClient we will deadlock. In my opinion this is a bug. I'm not sure what I need to do to handle this cleanly, but I think we'll probably need some system where we post an event, but delay the execution of it until the callback has returned. I'm not sure how to do this reliably, however. I have set up some infrastructure for a command thread which might be useful for this. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) { if (pDevice->wasapi.pCaptureClient) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture) { /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_capture);*/ pDevice->wasapi.pAudioClientCapture = NULL; } } if (deviceType == ma_device_type_playback) { if (pDevice->wasapi.pRenderClient) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); pDevice->wasapi.pRenderClient = NULL; } if (pDevice->wasapi.pAudioClientPlayback) { /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_playback);*/ pDevice->wasapi.pAudioClientPlayback = NULL; } } if (deviceType == ma_device_type_playback) { data.formatIn = pDevice->playback.format; data.channelsIn = pDevice->playback.channels; MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap)); data.shareMode = pDevice->playback.shareMode; } else { data.formatIn = pDevice->capture.format; data.channelsIn = pDevice->capture.channels; MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap)); data.shareMode = pDevice->capture.shareMode; } data.sampleRateIn = pDevice->sampleRate; data.periodSizeInFramesIn = pDevice->wasapi.originalPeriodSizeInFrames; data.periodSizeInMillisecondsIn = pDevice->wasapi.originalPeriodSizeInMilliseconds; data.periodsIn = pDevice->wasapi.originalPeriods; data.performanceProfile = pDevice->wasapi.originalPerformanceProfile; data.noAutoConvertSRC = pDevice->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pDevice->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pDevice->wasapi.noHardwareOffloading; data.loopbackProcessID = pDevice->wasapi.loopbackProcessID; data.loopbackProcessExclude = pDevice->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, deviceType, NULL, &data); if (result != MA_SUCCESS) { return result; } /* At this point we have some new objects ready to go. We need to uninitialize the previous ones and then set the new ones. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) { pDevice->wasapi.pAudioClientCapture = data.pAudioClient; pDevice->wasapi.pCaptureClient = data.pCaptureClient; pDevice->capture.internalFormat = data.formatOut; pDevice->capture.internalChannels = data.channelsOut; pDevice->capture.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->capture.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->capture.internalPeriods = data.periodsOut; ma_strcpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), data.deviceName); ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture); /* We must always have a valid ID. */ ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi); } if (deviceType == ma_device_type_playback) { pDevice->wasapi.pAudioClientPlayback = data.pAudioClient; pDevice->wasapi.pRenderClient = data.pRenderClient; pDevice->playback.internalFormat = data.formatOut; pDevice->playback.internalChannels = data.channelsOut; pDevice->playback.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->playback.internalPeriods = data.periodsOut; ma_strcpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), data.deviceName); ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback); pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback); /* We must always have a valid ID because rerouting will look at it. */ ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi); } return MA_SUCCESS; } static ma_result ma_device_init__wasapi(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result = MA_SUCCESS; #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) HRESULT hr; ma_IMMDeviceEnumerator* pDeviceEnumerator; #endif MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->wasapi); pDevice->wasapi.usage = pConfig->wasapi.usage; pDevice->wasapi.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; pDevice->wasapi.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; pDevice->wasapi.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; pDevice->wasapi.loopbackProcessID = pConfig->wasapi.loopbackProcessID; pDevice->wasapi.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; /* Exclusive mode is not allowed with loopback. */ if (pConfig->deviceType == ma_device_type_loopback && pConfig->playback.shareMode == ma_share_mode_exclusive) { return MA_INVALID_DEVICE_CONFIG; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { ma_device_init_internal_data__wasapi data; data.formatIn = pDescriptorCapture->format; data.channelsIn = pDescriptorCapture->channels; data.sampleRateIn = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorCapture->periodSizeInMilliseconds; data.periodsIn = pDescriptorCapture->periodCount; data.shareMode = pDescriptorCapture->shareMode; data.performanceProfile = pConfig->performanceProfile; data.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; data.loopbackProcessID = pConfig->wasapi.loopbackProcessID; data.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture, pDescriptorCapture->pDeviceID, &data); if (result != MA_SUCCESS) { return result; } pDevice->wasapi.pAudioClientCapture = data.pAudioClient; pDevice->wasapi.pCaptureClient = data.pCaptureClient; pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds; pDevice->wasapi.originalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->wasapi.originalPeriods = pDescriptorCapture->periodCount; pDevice->wasapi.originalPerformanceProfile = pConfig->performanceProfile; /* The event for capture needs to be manual reset for the same reason as playback. We keep the initial state set to unsignaled, however, because we want to block until we actually have something for the first call to ma_device_read(). */ pDevice->wasapi.hEventCapture = (ma_handle)CreateEventA(NULL, FALSE, FALSE, NULL); /* Auto reset, unsignaled by default. */ if (pDevice->wasapi.hEventCapture == NULL) { result = ma_result_from_GetLastError(GetLastError()); if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for capture."); return result; } ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture); /* We must always have a valid ID. */ ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi); /* The descriptor needs to be updated with actual values. */ pDescriptorCapture->format = data.formatOut; pDescriptorCapture->channels = data.channelsOut; pDescriptorCapture->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorCapture->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorCapture->periodCount = data.periodsOut; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__wasapi data; data.formatIn = pDescriptorPlayback->format; data.channelsIn = pDescriptorPlayback->channels; data.sampleRateIn = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); data.periodSizeInFramesIn = pDescriptorPlayback->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds; data.periodsIn = pDescriptorPlayback->periodCount; data.shareMode = pDescriptorPlayback->shareMode; data.performanceProfile = pConfig->performanceProfile; data.noAutoConvertSRC = pConfig->wasapi.noAutoConvertSRC; data.noDefaultQualitySRC = pConfig->wasapi.noDefaultQualitySRC; data.noHardwareOffloading = pConfig->wasapi.noHardwareOffloading; data.loopbackProcessID = pConfig->wasapi.loopbackProcessID; data.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude; result = ma_device_init_internal__wasapi(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.hEventCapture = NULL; } return result; } pDevice->wasapi.pAudioClientPlayback = data.pAudioClient; pDevice->wasapi.pRenderClient = data.pRenderClient; pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds; pDevice->wasapi.originalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->wasapi.originalPeriods = pDescriptorPlayback->periodCount; pDevice->wasapi.originalPerformanceProfile = pConfig->performanceProfile; /* The event for playback is needs to be manual reset because we want to explicitly control the fact that it becomes signalled only after the whole available space has been filled, never before. The playback event also needs to be initially set to a signaled state so that the first call to ma_device_write() is able to get passed WaitForMultipleObjects(). */ pDevice->wasapi.hEventPlayback = (ma_handle)CreateEventA(NULL, FALSE, TRUE, NULL); /* Auto reset, signaled by default. */ if (pDevice->wasapi.hEventPlayback == NULL) { result = ma_result_from_GetLastError(GetLastError()); if (pConfig->deviceType == ma_device_type_duplex) { if (pDevice->wasapi.pCaptureClient != NULL) { ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient); pDevice->wasapi.pCaptureClient = NULL; } if (pDevice->wasapi.pAudioClientCapture != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); pDevice->wasapi.pAudioClientCapture = NULL; } CloseHandle((HANDLE)pDevice->wasapi.hEventCapture); pDevice->wasapi.hEventCapture = NULL; } if (pDevice->wasapi.pRenderClient != NULL) { ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient); pDevice->wasapi.pRenderClient = NULL; } if (pDevice->wasapi.pAudioClientPlayback != NULL) { ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); pDevice->wasapi.pAudioClientPlayback = NULL; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create event for playback."); return result; } ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback); pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut; ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback); /* We must always have a valid ID because rerouting will look at it. */ ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi); /* The descriptor needs to be updated with actual values. */ pDescriptorPlayback->format = data.formatOut; pDescriptorPlayback->channels = data.channelsOut; pDescriptorPlayback->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorPlayback->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorPlayback->periodCount = data.periodsOut; } /* We need to register a notification client to detect when the device has been disabled, unplugged or re-routed (when the default device changes). When we are connecting to the default device we want to do automatic stream routing when the device is disabled or unplugged. Otherwise we want to just stop the device outright and let the application handle it. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pConfig->wasapi.noAutoStreamRouting == MA_FALSE) { if ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) && pConfig->capture.pDeviceID == NULL) { pDevice->wasapi.allowCaptureAutoStreamRouting = MA_TRUE; } if ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.pDeviceID == NULL) { pDevice->wasapi.allowPlaybackAutoStreamRouting = MA_TRUE; } } ma_mutex_init(&pDevice->wasapi.rerouteLock); hr = ma_CoCreateInstance(pDevice->pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator); if (FAILED(hr)) { ma_device_uninit__wasapi(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator."); return ma_result_from_HRESULT(hr); } pDevice->wasapi.notificationClient.lpVtbl = (void*)&g_maNotificationCientVtbl; pDevice->wasapi.notificationClient.counter = 1; pDevice->wasapi.notificationClient.pDevice = pDevice; hr = pDeviceEnumerator->lpVtbl->RegisterEndpointNotificationCallback(pDeviceEnumerator, &pDevice->wasapi.notificationClient); if (SUCCEEDED(hr)) { pDevice->wasapi.pDeviceEnumerator = (ma_ptr)pDeviceEnumerator; } else { /* Not the end of the world if we fail to register the notification callback. We just won't support automatic stream routing. */ ma_IMMDeviceEnumerator_Release(pDeviceEnumerator); } #endif ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_FALSE); ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE); return MA_SUCCESS; } static ma_result ma_device__get_available_frames__wasapi(ma_device* pDevice, ma_IAudioClient* pAudioClient, ma_uint32* pFrameCount) { ma_uint32 paddingFramesCount; HRESULT hr; ma_share_mode shareMode; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFrameCount != NULL); *pFrameCount = 0; if ((ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientPlayback && (ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientCapture) { return MA_INVALID_OPERATION; } /* I've had a report that GetCurrentPadding() is returning a frame count of 0 which is preventing higher level function calls from doing anything because it thinks nothing is available. I have taken a look at the documentation and it looks like this is unnecessary in exclusive mode. From Microsoft's documentation: For an exclusive-mode rendering or capture stream that was initialized with the AUDCLNT_STREAMFLAGS_EVENTCALLBACK flag, the client typically has no use for the padding value reported by GetCurrentPadding. Instead, the client accesses an entire buffer during each processing pass. Considering this, I'm going to skip GetCurrentPadding() for exclusive mode and just report the entire buffer. This depends on the caller making sure they wait on the event handler. */ shareMode = ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) ? pDevice->playback.shareMode : pDevice->capture.shareMode; if (shareMode == ma_share_mode_shared) { /* Shared mode. */ hr = ma_IAudioClient_GetCurrentPadding(pAudioClient, &paddingFramesCount); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback - paddingFramesCount; } else { *pFrameCount = paddingFramesCount; } } else { /* Exclusive mode. */ if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback; } else { *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesCapture; } } return MA_SUCCESS; } static ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType) { ma_result result; if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "=== CHANGING DEVICE ===\n"); result = ma_device_reinit__wasapi(pDevice, deviceType); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WASAPI] Reinitializing device after route change failed.\n"); return result; } ma_device__post_init_setup(pDevice, deviceType); ma_device__on_notification_rerouted(pDevice); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "=== DEVICE CHANGED ===\n"); return MA_SUCCESS; } static ma_result ma_device_start__wasapi_nolock(ma_device* pDevice) { HRESULT hr; if (pDevice->pContext->wasapi.hAvrt) { const char* pTaskName = ma_to_usage_string__wasapi(pDevice->wasapi.usage); if (pTaskName) { DWORD idx = 0; pDevice->wasapi.hAvrtHandle = (ma_handle)((MA_PFN_AvSetMmThreadCharacteristicsA)pDevice->pContext->wasapi.AvSetMmThreadCharacteristicsA)(pTaskName, &idx); } } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to start internal capture device. HRESULT = %d.", (int)hr); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_TRUE); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to start internal playback device. HRESULT = %d.", (int)hr); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_TRUE); } return MA_SUCCESS; } static ma_result ma_device_start__wasapi(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to start the device. */ ma_mutex_lock(&pDevice->wasapi.rerouteLock); { result = ma_device_start__wasapi_nolock(pDevice); } ma_mutex_unlock(&pDevice->wasapi.rerouteLock); return result; } static ma_result ma_device_stop__wasapi_nolock(ma_device* pDevice) { ma_result result; HRESULT hr; MA_ASSERT(pDevice != NULL); if (pDevice->wasapi.hAvrtHandle) { ((MA_PFN_AvRevertMmThreadCharacteristics)pDevice->pContext->wasapi.AvRevertMmThreadcharacteristics)((HANDLE)pDevice->wasapi.hAvrtHandle); pDevice->wasapi.hAvrtHandle = NULL; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { /* If we have a mapped buffer we need to release it. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to stop internal capture device."); return ma_result_from_HRESULT(hr); } /* The audio client needs to be reset otherwise restarting will fail. */ hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to reset internal capture device."); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_FALSE); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->wasapi.pMappedBufferPlayback != NULL) { ma_silence_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->wasapi.pMappedBufferPlayback, pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels), pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels ); ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; } /* The buffer needs to be drained before stopping the device. Not doing this will result in the last few frames not getting output to the speakers. This is a problem for very short sounds because it'll result in a significant portion of it not getting played. */ if (ma_atomic_bool32_get(&pDevice->wasapi.isStartedPlayback)) { /* We need to make sure we put a timeout here or else we'll risk getting stuck in a deadlock in some cases. */ DWORD waitTime = (pDevice->wasapi.actualBufferSizeInFramesPlayback * 1000) / pDevice->playback.internalSampleRate; if (pDevice->playback.shareMode == ma_share_mode_exclusive) { WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime); } else { ma_uint32 prevFramesAvailablePlayback = (ma_uint32)-1; ma_uint32 framesAvailablePlayback; for (;;) { result = ma_device__get_available_frames__wasapi(pDevice, (ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &framesAvailablePlayback); if (result != MA_SUCCESS) { break; } if (framesAvailablePlayback >= pDevice->wasapi.actualBufferSizeInFramesPlayback) { break; } /* Just a safety check to avoid an infinite loop. If this iteration results in a situation where the number of available frames has not changed, get out of the loop. I don't think this should ever happen, but I think it's nice to have just in case. */ if (framesAvailablePlayback == prevFramesAvailablePlayback) { break; } prevFramesAvailablePlayback = framesAvailablePlayback; ResetEvent((HANDLE)pDevice->wasapi.hEventPlayback); /* Manual reset. */ WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime); } } } hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to stop internal playback device."); return ma_result_from_HRESULT(hr); } /* The audio client needs to be reset otherwise restarting will fail. */ { ma_int32 retries = 5; while ((hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback)) == MA_AUDCLNT_E_BUFFER_OPERATION_PENDING && retries > 0) { ma_sleep(10); retries -= 1; } } if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to reset internal playback device."); return ma_result_from_HRESULT(hr); } ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE); } return MA_SUCCESS; } static ma_result ma_device_stop__wasapi(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to stop the device. */ ma_mutex_lock(&pDevice->wasapi.rerouteLock); { result = ma_device_stop__wasapi_nolock(pDevice); } ma_mutex_unlock(&pDevice->wasapi.rerouteLock); return result; } #ifndef MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS #define MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS 5000 #endif static ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint32 totalFramesProcessed = 0; /* When reading, we need to get a buffer and process all of it before releasing it. Because the frame count (frameCount) can be different to the size of the buffer, we'll need to cache the pointer to the buffer. */ /* Keep running until we've processed the requested number of frames. */ while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesProcessed; /* If we have a mapped data buffer, consume that first. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { /* We have a cached data pointer so consume that before grabbing another one from WASAPI. */ ma_uint32 framesToProcessNow = framesRemaining; if (framesToProcessNow > pDevice->wasapi.mappedBufferCaptureLen) { framesToProcessNow = pDevice->wasapi.mappedBufferCaptureLen; } /* Now just copy the data over to the output buffer. */ ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pFrames, totalFramesProcessed, pDevice->capture.internalFormat, pDevice->capture.internalChannels), ma_offset_pcm_frames_const_ptr(pDevice->wasapi.pMappedBufferCapture, pDevice->wasapi.mappedBufferCaptureCap - pDevice->wasapi.mappedBufferCaptureLen, pDevice->capture.internalFormat, pDevice->capture.internalChannels), framesToProcessNow, pDevice->capture.internalFormat, pDevice->capture.internalChannels ); totalFramesProcessed += framesToProcessNow; pDevice->wasapi.mappedBufferCaptureLen -= framesToProcessNow; /* If the data buffer has been fully consumed we need to release it. */ if (pDevice->wasapi.mappedBufferCaptureLen == 0) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; } } else { /* We don't have any cached data pointer, so grab another one. */ HRESULT hr; DWORD flags = 0; /* First just ask WASAPI for a data buffer. If it's not available, we'll wait for more. */ hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL); if (hr == S_OK) { /* We got a data buffer. Continue to the next loop iteration which will then read from the mapped pointer. */ pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap; /* There have been reports that indicate that at times the AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY is reported for every call to IAudioCaptureClient_GetBuffer() above which results in spamming of the debug messages below. To partially work around this, I'm only outputting these messages when MA_DEBUG_OUTPUT is explicitly defined. The better solution would be to figure out why the flag is always getting reported. */ #if defined(MA_DEBUG_OUTPUT) { if (flags != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Capture Flags: %ld\n", flags); if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity (possible overrun). Attempting recovery. mappedBufferCaptureCap=%d\n", pDevice->wasapi.mappedBufferCaptureCap); } } } #endif /* Overrun detection. */ if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { /* Glitched. Probably due to an overrun. */ /* If we got an overrun it probably means we're straddling the end of the buffer. In normal capture mode this is the fault of the client application because they're responsible for ensuring data is processed fast enough. In duplex mode, however, the processing of audio is tied to the playback device, so this can possibly be the result of a timing de-sync. In capture mode we're not going to do any kind of recovery because the real fix is for the client application to process faster. In duplex mode, we'll treat this as a desync and reset the buffers to prevent a never-ending sequence of glitches due to straddling the end of the buffer. */ if (pDevice->type == ma_device_type_duplex) { /* Experiment: If we empty out the *entire* buffer we may end up putting ourselves into an underrun position which isn't really any better than the overrun we're probably in right now. Instead we'll just empty out about half. */ ma_uint32 i; ma_uint32 periodCount = (pDevice->wasapi.actualBufferSizeInFramesCapture / pDevice->wasapi.periodSizeInFramesCapture); ma_uint32 iterationCount = periodCount / 2; if ((periodCount % 2) > 0) { iterationCount += 1; } for (i = 0; i < iterationCount; i += 1) { hr = ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: IAudioCaptureClient_ReleaseBuffer() failed with %ld.\n", hr); break; } flags = 0; hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL); if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || FAILED(hr)) { /* The buffer has been completely emptied or an error occurred. In this case we'll need to reset the state of the mapped buffer which will trigger the next iteration to get a fresh buffer from WASAPI. */ pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; if (hr == MA_AUDCLNT_S_BUFFER_EMPTY) { if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: Buffer emptied, and data discontinuity still reported.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: Buffer emptied.\n"); } } if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[WASAPI] Data discontinuity recovery: IAudioCaptureClient_GetBuffer() failed with %ld.\n", hr); } break; } } /* If at this point we have a valid buffer mapped, make sure the buffer length is set appropriately. */ if (pDevice->wasapi.pMappedBufferCapture != NULL) { pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap; } } } continue; } else { if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || hr == MA_AUDCLNT_E_BUFFER_ERROR) { /* No data is available. We need to wait for more. There's two situations to consider here. The first is normal capture mode. If this times out it probably means the microphone isn't delivering data for whatever reason. In this case we'll just abort the read and return whatever we were able to get. The other situations is loopback mode, in which case a timeout probably just means the nothing is playing through the speakers. */ /* Experiment: Use a shorter timeout for loopback mode. */ DWORD timeoutInMilliseconds = MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS; if (pDevice->type == ma_device_type_loopback) { timeoutInMilliseconds = 10; } if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventCapture, timeoutInMilliseconds) != WAIT_OBJECT_0) { if (pDevice->type == ma_device_type_loopback) { continue; /* Keep waiting in loopback mode. */ } else { result = MA_ERROR; break; /* Wait failed. */ } } /* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */ } else { /* An error occurred and we need to abort. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from capture device in preparation for reading from the device. HRESULT = %d. Stopping device.\n", (int)hr); result = ma_result_from_HRESULT(hr); break; } } } } /* If we were unable to process the entire requested frame count, but we still have a mapped buffer, there's a good chance either an error occurred or the device was stopped mid-read. In this case we'll need to make sure the buffer is released. */ if (totalFramesProcessed < frameCount && pDevice->wasapi.pMappedBufferCapture != NULL) { ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap); pDevice->wasapi.pMappedBufferCapture = NULL; pDevice->wasapi.mappedBufferCaptureCap = 0; pDevice->wasapi.mappedBufferCaptureLen = 0; } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } return result; } static ma_result ma_device_write__wasapi(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; ma_uint32 totalFramesProcessed = 0; /* Keep writing to the device until it's stopped or we've consumed all of our input. */ while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesProcessed; /* We're going to do this in a similar way to capture. We'll first check if the cached data pointer is valid, and if so, read from that. Otherwise We will call IAudioRenderClient_GetBuffer() with a requested buffer size equal to our actual period size. If it returns AUDCLNT_E_BUFFER_TOO_LARGE it means we need to wait for some data to become available. */ if (pDevice->wasapi.pMappedBufferPlayback != NULL) { /* We still have some space available in the mapped data buffer. Write to it. */ ma_uint32 framesToProcessNow = framesRemaining; if (framesToProcessNow > (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen)) { framesToProcessNow = (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen); } /* Now just copy the data over to the output buffer. */ ma_copy_pcm_frames( ma_offset_pcm_frames_ptr(pDevice->wasapi.pMappedBufferPlayback, pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels), ma_offset_pcm_frames_const_ptr(pFrames, totalFramesProcessed, pDevice->playback.internalFormat, pDevice->playback.internalChannels), framesToProcessNow, pDevice->playback.internalFormat, pDevice->playback.internalChannels ); totalFramesProcessed += framesToProcessNow; pDevice->wasapi.mappedBufferPlaybackLen += framesToProcessNow; /* If the data buffer has been fully consumed we need to release it. */ if (pDevice->wasapi.mappedBufferPlaybackLen == pDevice->wasapi.mappedBufferPlaybackCap) { ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0); pDevice->wasapi.pMappedBufferPlayback = NULL; pDevice->wasapi.mappedBufferPlaybackCap = 0; pDevice->wasapi.mappedBufferPlaybackLen = 0; /* In exclusive mode we need to wait here. Exclusive mode is weird because GetBuffer() never seems to return AUDCLNT_E_BUFFER_TOO_LARGE, which is what we normally use to determine whether or not we need to wait for more data. */ if (pDevice->playback.shareMode == ma_share_mode_exclusive) { if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) { result = MA_ERROR; break; /* Wait failed. Probably timed out. */ } } } } else { /* We don't have a mapped data buffer so we'll need to get one. */ HRESULT hr; ma_uint32 bufferSizeInFrames; /* Special rules for exclusive mode. */ if (pDevice->playback.shareMode == ma_share_mode_exclusive) { bufferSizeInFrames = pDevice->wasapi.actualBufferSizeInFramesPlayback; } else { bufferSizeInFrames = pDevice->wasapi.periodSizeInFramesPlayback; } hr = ma_IAudioRenderClient_GetBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, bufferSizeInFrames, (BYTE**)&pDevice->wasapi.pMappedBufferPlayback); if (hr == S_OK) { /* We have data available. */ pDevice->wasapi.mappedBufferPlaybackCap = bufferSizeInFrames; pDevice->wasapi.mappedBufferPlaybackLen = 0; } else { if (hr == MA_AUDCLNT_E_BUFFER_TOO_LARGE || hr == MA_AUDCLNT_E_BUFFER_ERROR) { /* Not enough data available. We need to wait for more. */ if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) { result = MA_ERROR; break; /* Wait failed. Probably timed out. */ } } else { /* Some error occurred. We'll need to abort. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to retrieve internal buffer from playback device in preparation for writing to the device. HRESULT = %d. Stopping device.\n", (int)hr); result = ma_result_from_HRESULT(hr); break; } } } } if (pFramesWritten != NULL) { *pFramesWritten = totalFramesProcessed; } return result; } static ma_result ma_device_data_loop_wakeup__wasapi(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { SetEvent((HANDLE)pDevice->wasapi.hEventCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { SetEvent((HANDLE)pDevice->wasapi.hEventPlayback); } return MA_SUCCESS; } static ma_result ma_context_uninit__wasapi(ma_context* pContext) { ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_QUIT__WASAPI); MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_wasapi); ma_context_post_command__wasapi(pContext, &cmd); ma_thread_wait(&pContext->wasapi.commandThread); if (pContext->wasapi.hAvrt) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt); pContext->wasapi.hAvrt = NULL; } #if defined(MA_WIN32_UWP) { if (pContext->wasapi.hMMDevapi) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi); pContext->wasapi.hMMDevapi = NULL; } } #endif /* Only after the thread has been terminated can we uninitialize the sync objects for the command thread. */ ma_semaphore_uninit(&pContext->wasapi.commandSem); ma_mutex_uninit(&pContext->wasapi.commandLock); return MA_SUCCESS; } static ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result = MA_SUCCESS; MA_ASSERT(pContext != NULL); (void)pConfig; #ifdef MA_WIN32_DESKTOP /* WASAPI is only supported in Vista SP1 and newer. The reason for SP1 and not the base version of Vista is that event-driven exclusive mode does not work until SP1. Unfortunately older compilers don't define these functions so we need to dynamically load them in order to avoid a link error. */ { ma_OSVERSIONINFOEXW osvi; ma_handle kernel32DLL; ma_PFNVerifyVersionInfoW _VerifyVersionInfoW; ma_PFNVerSetConditionMask _VerSetConditionMask; kernel32DLL = ma_dlopen(ma_context_get_log(pContext), "kernel32.dll"); if (kernel32DLL == NULL) { return MA_NO_BACKEND; } _VerifyVersionInfoW = (ma_PFNVerifyVersionInfoW )ma_dlsym(ma_context_get_log(pContext), kernel32DLL, "VerifyVersionInfoW"); _VerSetConditionMask = (ma_PFNVerSetConditionMask)ma_dlsym(ma_context_get_log(pContext), kernel32DLL, "VerSetConditionMask"); if (_VerifyVersionInfoW == NULL || _VerSetConditionMask == NULL) { ma_dlclose(ma_context_get_log(pContext), kernel32DLL); return MA_NO_BACKEND; } MA_ZERO_OBJECT(&osvi); osvi.dwOSVersionInfoSize = sizeof(osvi); osvi.dwMajorVersion = ((MA_WIN32_WINNT_VISTA >> 8) & 0xFF); osvi.dwMinorVersion = ((MA_WIN32_WINNT_VISTA >> 0) & 0xFF); osvi.wServicePackMajor = 1; if (_VerifyVersionInfoW(&osvi, MA_VER_MAJORVERSION | MA_VER_MINORVERSION | MA_VER_SERVICEPACKMAJOR, _VerSetConditionMask(_VerSetConditionMask(_VerSetConditionMask(0, MA_VER_MAJORVERSION, MA_VER_GREATER_EQUAL), MA_VER_MINORVERSION, MA_VER_GREATER_EQUAL), MA_VER_SERVICEPACKMAJOR, MA_VER_GREATER_EQUAL))) { result = MA_SUCCESS; } else { result = MA_NO_BACKEND; } ma_dlclose(ma_context_get_log(pContext), kernel32DLL); } #endif if (result != MA_SUCCESS) { return result; } MA_ZERO_OBJECT(&pContext->wasapi); #if defined(MA_WIN32_UWP) { /* Link to mmdevapi so we can get access to ActivateAudioInterfaceAsync(). */ pContext->wasapi.hMMDevapi = ma_dlopen(ma_context_get_log(pContext), "mmdevapi.dll"); if (pContext->wasapi.hMMDevapi) { pContext->wasapi.ActivateAudioInterfaceAsync = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi, "ActivateAudioInterfaceAsync"); if (pContext->wasapi.ActivateAudioInterfaceAsync == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi); return MA_NO_BACKEND; /* ActivateAudioInterfaceAsync() could not be loaded. */ } } else { return MA_NO_BACKEND; /* Failed to load mmdevapi.dll which is required for ActivateAudioInterfaceAsync() */ } } #endif /* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */ pContext->wasapi.hAvrt = ma_dlopen(ma_context_get_log(pContext), "avrt.dll"); if (pContext->wasapi.hAvrt) { pContext->wasapi.AvSetMmThreadCharacteristicsA = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsA"); pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics"); /* If either function could not be found, disable use of avrt entirely. */ if (!pContext->wasapi.AvSetMmThreadCharacteristicsA || !pContext->wasapi.AvRevertMmThreadcharacteristics) { pContext->wasapi.AvSetMmThreadCharacteristicsA = NULL; pContext->wasapi.AvRevertMmThreadcharacteristics = NULL; ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt); pContext->wasapi.hAvrt = NULL; } } /* Annoyingly, WASAPI does not allow you to release an IAudioClient object from a different thread than the one that retrieved it with GetService(). This can result in a deadlock in two situations: 1) When calling ma_device_uninit() from a different thread to ma_device_init(); and 2) When uninitializing and reinitializing the internal IAudioClient object in response to automatic stream routing. We could define ma_device_uninit() such that it must be called on the same thread as ma_device_init(). We could also just not release the IAudioClient when performing automatic stream routing to avoid the deadlock. Neither of these are acceptable solutions in my view so we're going to have to work around this with a worker thread. This is not ideal, but I can't think of a better way to do this. More information about this can be found here: https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nn-audioclient-iaudiorenderclient Note this section: When releasing an IAudioRenderClient interface instance, the client must call the interface's Release method from the same thread as the call to IAudioClient::GetService that created the object. */ { result = ma_mutex_init(&pContext->wasapi.commandLock); if (result != MA_SUCCESS) { return result; } result = ma_semaphore_init(0, &pContext->wasapi.commandSem); if (result != MA_SUCCESS) { ma_mutex_uninit(&pContext->wasapi.commandLock); return result; } result = ma_thread_create(&pContext->wasapi.commandThread, ma_thread_priority_normal, 0, ma_context_command_thread__wasapi, pContext, &pContext->allocationCallbacks); if (result != MA_SUCCESS) { ma_semaphore_uninit(&pContext->wasapi.commandSem); ma_mutex_uninit(&pContext->wasapi.commandLock); return result; } } pCallbacks->onContextInit = ma_context_init__wasapi; pCallbacks->onContextUninit = ma_context_uninit__wasapi; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__wasapi; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__wasapi; pCallbacks->onDeviceInit = ma_device_init__wasapi; pCallbacks->onDeviceUninit = ma_device_uninit__wasapi; pCallbacks->onDeviceStart = ma_device_start__wasapi; pCallbacks->onDeviceStop = ma_device_stop__wasapi; pCallbacks->onDeviceRead = ma_device_read__wasapi; pCallbacks->onDeviceWrite = ma_device_write__wasapi; pCallbacks->onDeviceDataLoop = NULL; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__wasapi; return MA_SUCCESS; } #endif /****************************************************************************** DirectSound Backend ******************************************************************************/ #ifdef MA_HAS_DSOUND /*#include */ /*static const GUID MA_GUID_IID_DirectSoundNotify = {0xb0210783, 0x89cd, 0x11d0, {0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16}};*/ /* miniaudio only uses priority or exclusive modes. */ #define MA_DSSCL_NORMAL 1 #define MA_DSSCL_PRIORITY 2 #define MA_DSSCL_EXCLUSIVE 3 #define MA_DSSCL_WRITEPRIMARY 4 #define MA_DSCAPS_PRIMARYMONO 0x00000001 #define MA_DSCAPS_PRIMARYSTEREO 0x00000002 #define MA_DSCAPS_PRIMARY8BIT 0x00000004 #define MA_DSCAPS_PRIMARY16BIT 0x00000008 #define MA_DSCAPS_CONTINUOUSRATE 0x00000010 #define MA_DSCAPS_EMULDRIVER 0x00000020 #define MA_DSCAPS_CERTIFIED 0x00000040 #define MA_DSCAPS_SECONDARYMONO 0x00000100 #define MA_DSCAPS_SECONDARYSTEREO 0x00000200 #define MA_DSCAPS_SECONDARY8BIT 0x00000400 #define MA_DSCAPS_SECONDARY16BIT 0x00000800 #define MA_DSBCAPS_PRIMARYBUFFER 0x00000001 #define MA_DSBCAPS_STATIC 0x00000002 #define MA_DSBCAPS_LOCHARDWARE 0x00000004 #define MA_DSBCAPS_LOCSOFTWARE 0x00000008 #define MA_DSBCAPS_CTRL3D 0x00000010 #define MA_DSBCAPS_CTRLFREQUENCY 0x00000020 #define MA_DSBCAPS_CTRLPAN 0x00000040 #define MA_DSBCAPS_CTRLVOLUME 0x00000080 #define MA_DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 #define MA_DSBCAPS_CTRLFX 0x00000200 #define MA_DSBCAPS_STICKYFOCUS 0x00004000 #define MA_DSBCAPS_GLOBALFOCUS 0x00008000 #define MA_DSBCAPS_GETCURRENTPOSITION2 0x00010000 #define MA_DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 #define MA_DSBCAPS_LOCDEFER 0x00040000 #define MA_DSBCAPS_TRUEPLAYPOSITION 0x00080000 #define MA_DSBPLAY_LOOPING 0x00000001 #define MA_DSBPLAY_LOCHARDWARE 0x00000002 #define MA_DSBPLAY_LOCSOFTWARE 0x00000004 #define MA_DSBPLAY_TERMINATEBY_TIME 0x00000008 #define MA_DSBPLAY_TERMINATEBY_DISTANCE 0x00000010 #define MA_DSBPLAY_TERMINATEBY_PRIORITY 0x00000020 #define MA_DSBSTATUS_PLAYING 0x00000001 #define MA_DSBSTATUS_BUFFERLOST 0x00000002 #define MA_DSBSTATUS_LOOPING 0x00000004 #define MA_DSBSTATUS_LOCHARDWARE 0x00000008 #define MA_DSBSTATUS_LOCSOFTWARE 0x00000010 #define MA_DSBSTATUS_TERMINATED 0x00000020 #define MA_DSCBSTART_LOOPING 0x00000001 typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; MA_WAVEFORMATEX* lpwfxFormat; GUID guid3DAlgorithm; } MA_DSBUFFERDESC; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; MA_WAVEFORMATEX* lpwfxFormat; DWORD dwFXCount; void* lpDSCFXDesc; /* <-- miniaudio doesn't use this, so set to void*. */ } MA_DSCBUFFERDESC; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwMinSecondarySampleRate; DWORD dwMaxSecondarySampleRate; DWORD dwPrimaryBuffers; DWORD dwMaxHwMixingAllBuffers; DWORD dwMaxHwMixingStaticBuffers; DWORD dwMaxHwMixingStreamingBuffers; DWORD dwFreeHwMixingAllBuffers; DWORD dwFreeHwMixingStaticBuffers; DWORD dwFreeHwMixingStreamingBuffers; DWORD dwMaxHw3DAllBuffers; DWORD dwMaxHw3DStaticBuffers; DWORD dwMaxHw3DStreamingBuffers; DWORD dwFreeHw3DAllBuffers; DWORD dwFreeHw3DStaticBuffers; DWORD dwFreeHw3DStreamingBuffers; DWORD dwTotalHwMemBytes; DWORD dwFreeHwMemBytes; DWORD dwMaxContigFreeHwMemBytes; DWORD dwUnlockTransferRateHwBuffers; DWORD dwPlayCpuOverheadSwBuffers; DWORD dwReserved1; DWORD dwReserved2; } MA_DSCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwUnlockTransferRate; DWORD dwPlayCpuOverhead; } MA_DSBCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwFormats; DWORD dwChannels; } MA_DSCCAPS; typedef struct { DWORD dwSize; DWORD dwFlags; DWORD dwBufferBytes; DWORD dwReserved; } MA_DSCBCAPS; typedef struct { DWORD dwOffset; HANDLE hEventNotify; } MA_DSBPOSITIONNOTIFY; typedef struct ma_IDirectSound ma_IDirectSound; typedef struct ma_IDirectSoundBuffer ma_IDirectSoundBuffer; typedef struct ma_IDirectSoundCapture ma_IDirectSoundCapture; typedef struct ma_IDirectSoundCaptureBuffer ma_IDirectSoundCaptureBuffer; typedef struct ma_IDirectSoundNotify ma_IDirectSoundNotify; /* COM objects. The way these work is that you have a vtable (a list of function pointers, kind of like how C++ works internally), and then you have a structure with a single member, which is a pointer to the vtable. The vtable is where the methods of the object are defined. Methods need to be in a specific order, and parent classes need to have their methods declared first. */ /* IDirectSound */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSound* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSound* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSound* pThis); /* IDirectSound */ HRESULT (STDMETHODCALLTYPE * CreateSoundBuffer) (ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter); HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps); HRESULT (STDMETHODCALLTYPE * DuplicateSoundBuffer)(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate); HRESULT (STDMETHODCALLTYPE * SetCooperativeLevel) (ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel); HRESULT (STDMETHODCALLTYPE * Compact) (ma_IDirectSound* pThis); HRESULT (STDMETHODCALLTYPE * GetSpeakerConfig) (ma_IDirectSound* pThis, DWORD* pSpeakerConfig); HRESULT (STDMETHODCALLTYPE * SetSpeakerConfig) (ma_IDirectSound* pThis, DWORD dwSpeakerConfig); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSound* pThis, const GUID* pGuidDevice); } ma_IDirectSoundVtbl; struct ma_IDirectSound { ma_IDirectSoundVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSound_QueryInterface(ma_IDirectSound* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSound_AddRef(ma_IDirectSound* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSound_Release(ma_IDirectSound* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSound_CreateSoundBuffer(ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateSoundBuffer(pThis, pDSBufferDesc, ppDSBuffer, pUnkOuter); } static MA_INLINE HRESULT ma_IDirectSound_GetCaps(ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCaps); } static MA_INLINE HRESULT ma_IDirectSound_DuplicateSoundBuffer(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate) { return pThis->lpVtbl->DuplicateSoundBuffer(pThis, pDSBufferOriginal, ppDSBufferDuplicate); } static MA_INLINE HRESULT ma_IDirectSound_SetCooperativeLevel(ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel) { return pThis->lpVtbl->SetCooperativeLevel(pThis, hwnd, dwLevel); } static MA_INLINE HRESULT ma_IDirectSound_Compact(ma_IDirectSound* pThis) { return pThis->lpVtbl->Compact(pThis); } static MA_INLINE HRESULT ma_IDirectSound_GetSpeakerConfig(ma_IDirectSound* pThis, DWORD* pSpeakerConfig) { return pThis->lpVtbl->GetSpeakerConfig(pThis, pSpeakerConfig); } static MA_INLINE HRESULT ma_IDirectSound_SetSpeakerConfig(ma_IDirectSound* pThis, DWORD dwSpeakerConfig) { return pThis->lpVtbl->SetSpeakerConfig(pThis, dwSpeakerConfig); } static MA_INLINE HRESULT ma_IDirectSound_Initialize(ma_IDirectSound* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); } /* IDirectSoundBuffer */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundBuffer* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundBuffer* pThis); /* IDirectSoundBuffer */ HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps); HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor); HRESULT (STDMETHODCALLTYPE * GetFormat) (ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten); HRESULT (STDMETHODCALLTYPE * GetVolume) (ma_IDirectSoundBuffer* pThis, LONG* pVolume); HRESULT (STDMETHODCALLTYPE * GetPan) (ma_IDirectSoundBuffer* pThis, LONG* pPan); HRESULT (STDMETHODCALLTYPE * GetFrequency) (ma_IDirectSoundBuffer* pThis, DWORD* pFrequency); HRESULT (STDMETHODCALLTYPE * GetStatus) (ma_IDirectSoundBuffer* pThis, DWORD* pStatus); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc); HRESULT (STDMETHODCALLTYPE * Lock) (ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Play) (ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * SetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition); HRESULT (STDMETHODCALLTYPE * SetFormat) (ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat); HRESULT (STDMETHODCALLTYPE * SetVolume) (ma_IDirectSoundBuffer* pThis, LONG volume); HRESULT (STDMETHODCALLTYPE * SetPan) (ma_IDirectSoundBuffer* pThis, LONG pan); HRESULT (STDMETHODCALLTYPE * SetFrequency) (ma_IDirectSoundBuffer* pThis, DWORD dwFrequency); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IDirectSoundBuffer* pThis); HRESULT (STDMETHODCALLTYPE * Unlock) (ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2); HRESULT (STDMETHODCALLTYPE * Restore) (ma_IDirectSoundBuffer* pThis); } ma_IDirectSoundBufferVtbl; struct ma_IDirectSoundBuffer { ma_IDirectSoundBufferVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundBuffer_QueryInterface(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundBuffer_AddRef(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundBuffer_Release(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCaps(ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSBufferCaps); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCurrentPlayCursor, pCurrentWriteCursor); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFormat(ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetVolume(ma_IDirectSoundBuffer* pThis, LONG* pVolume) { return pThis->lpVtbl->GetVolume(pThis, pVolume); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetPan(ma_IDirectSoundBuffer* pThis, LONG* pPan) { return pThis->lpVtbl->GetPan(pThis, pPan); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFrequency(ma_IDirectSoundBuffer* pThis, DWORD* pFrequency) { return pThis->lpVtbl->GetFrequency(pThis, pFrequency); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_GetStatus(ma_IDirectSoundBuffer* pThis, DWORD* pStatus) { return pThis->lpVtbl->GetStatus(pThis, pStatus); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Initialize(ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSound, pDSBufferDesc); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Lock(ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Play(ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) { return pThis->lpVtbl->Play(pThis, dwReserved1, dwPriority, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition) { return pThis->lpVtbl->SetCurrentPosition(pThis, dwNewPosition); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFormat(ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat) { return pThis->lpVtbl->SetFormat(pThis, pFormat); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetVolume(ma_IDirectSoundBuffer* pThis, LONG volume) { return pThis->lpVtbl->SetVolume(pThis, volume); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetPan(ma_IDirectSoundBuffer* pThis, LONG pan) { return pThis->lpVtbl->SetPan(pThis, pan); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFrequency(ma_IDirectSoundBuffer* pThis, DWORD dwFrequency) { return pThis->lpVtbl->SetFrequency(pThis, dwFrequency); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Stop(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Unlock(ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); } static MA_INLINE HRESULT ma_IDirectSoundBuffer_Restore(ma_IDirectSoundBuffer* pThis) { return pThis->lpVtbl->Restore(pThis); } /* IDirectSoundCapture */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundCapture* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundCapture* pThis); /* IDirectSoundCapture */ HRESULT (STDMETHODCALLTYPE * CreateCaptureBuffer)(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter); HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice); } ma_IDirectSoundCaptureVtbl; struct ma_IDirectSoundCapture { ma_IDirectSoundCaptureVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundCapture_QueryInterface (ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundCapture_AddRef (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundCapture_Release (ma_IDirectSoundCapture* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCapture_CreateCaptureBuffer(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateCaptureBuffer(pThis, pDSCBufferDesc, ppDSCBuffer, pUnkOuter); } static MA_INLINE HRESULT ma_IDirectSoundCapture_GetCaps (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCCaps); } static MA_INLINE HRESULT ma_IDirectSoundCapture_Initialize (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice) { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); } /* IDirectSoundCaptureBuffer */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundCaptureBuffer* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundCaptureBuffer* pThis); /* IDirectSoundCaptureBuffer */ HRESULT (STDMETHODCALLTYPE * GetCaps) (ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps); HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition); HRESULT (STDMETHODCALLTYPE * GetFormat) (ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten); HRESULT (STDMETHODCALLTYPE * GetStatus) (ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus); HRESULT (STDMETHODCALLTYPE * Initialize) (ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc); HRESULT (STDMETHODCALLTYPE * Lock) (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Start) (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags); HRESULT (STDMETHODCALLTYPE * Stop) (ma_IDirectSoundCaptureBuffer* pThis); HRESULT (STDMETHODCALLTYPE * Unlock) (ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2); } ma_IDirectSoundCaptureBufferVtbl; struct ma_IDirectSoundCaptureBuffer { ma_IDirectSoundCaptureBufferVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_QueryInterface(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundCaptureBuffer_AddRef(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundCaptureBuffer_Release(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCaps(ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps) { return pThis->lpVtbl->GetCaps(pThis, pDSCBCaps); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCurrentPosition(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCapturePosition, pReadPosition); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetFormat(ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetStatus(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus) { return pThis->lpVtbl->GetStatus(pThis, pStatus); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Initialize(ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSoundCapture, pDSCBufferDesc); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Lock(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Start(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags) { return pThis->lpVtbl->Start(pThis, dwFlags); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Stop(ma_IDirectSoundCaptureBuffer* pThis) { return pThis->lpVtbl->Stop(pThis); } static MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Unlock(ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); } /* IDirectSoundNotify */ typedef struct { /* IUnknown */ HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject); ULONG (STDMETHODCALLTYPE * AddRef) (ma_IDirectSoundNotify* pThis); ULONG (STDMETHODCALLTYPE * Release) (ma_IDirectSoundNotify* pThis); /* IDirectSoundNotify */ HRESULT (STDMETHODCALLTYPE * SetNotificationPositions)(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies); } ma_IDirectSoundNotifyVtbl; struct ma_IDirectSoundNotify { ma_IDirectSoundNotifyVtbl* lpVtbl; }; static MA_INLINE HRESULT ma_IDirectSoundNotify_QueryInterface(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); } static MA_INLINE ULONG ma_IDirectSoundNotify_AddRef(ma_IDirectSoundNotify* pThis) { return pThis->lpVtbl->AddRef(pThis); } static MA_INLINE ULONG ma_IDirectSoundNotify_Release(ma_IDirectSoundNotify* pThis) { return pThis->lpVtbl->Release(pThis); } static MA_INLINE HRESULT ma_IDirectSoundNotify_SetNotificationPositions(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies) { return pThis->lpVtbl->SetNotificationPositions(pThis, dwPositionNotifies, pPositionNotifies); } typedef BOOL (CALLBACK * ma_DSEnumCallbackAProc) (GUID* pDeviceGUID, const char* pDeviceDescription, const char* pModule, void* pContext); typedef HRESULT (WINAPI * ma_DirectSoundCreateProc) (const GUID* pcGuidDevice, ma_IDirectSound** ppDS8, ma_IUnknown* pUnkOuter); typedef HRESULT (WINAPI * ma_DirectSoundEnumerateAProc) (ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext); typedef HRESULT (WINAPI * ma_DirectSoundCaptureCreateProc) (const GUID* pcGuidDevice, ma_IDirectSoundCapture** ppDSC8, ma_IUnknown* pUnkOuter); typedef HRESULT (WINAPI * ma_DirectSoundCaptureEnumerateAProc)(ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext); static ma_uint32 ma_get_best_sample_rate_within_range(ma_uint32 sampleRateMin, ma_uint32 sampleRateMax) { /* Normalize the range in case we were given something stupid. */ if (sampleRateMin < (ma_uint32)ma_standard_sample_rate_min) { sampleRateMin = (ma_uint32)ma_standard_sample_rate_min; } if (sampleRateMax > (ma_uint32)ma_standard_sample_rate_max) { sampleRateMax = (ma_uint32)ma_standard_sample_rate_max; } if (sampleRateMin > sampleRateMax) { sampleRateMin = sampleRateMax; } if (sampleRateMin == sampleRateMax) { return sampleRateMax; } else { size_t iStandardRate; for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate]; if (standardRate >= sampleRateMin && standardRate <= sampleRateMax) { return standardRate; } } } /* Should never get here. */ MA_ASSERT(MA_FALSE); return 0; } /* Retrieves the channel count and channel map for the given speaker configuration. If the speaker configuration is unknown, the channel count and channel map will be left unmodified. */ static void ma_get_channels_from_speaker_config__dsound(DWORD speakerConfig, WORD* pChannelsOut, DWORD* pChannelMapOut) { WORD channels; DWORD channelMap; channels = 0; if (pChannelsOut != NULL) { channels = *pChannelsOut; } channelMap = 0; if (pChannelMapOut != NULL) { channelMap = *pChannelMapOut; } /* The speaker configuration is a combination of speaker config and speaker geometry. The lower 8 bits is what we care about. The upper 16 bits is for the geometry. */ switch ((BYTE)(speakerConfig)) { case 1 /*DSSPEAKER_HEADPHONE*/: channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break; case 2 /*DSSPEAKER_MONO*/: channels = 1; channelMap = SPEAKER_FRONT_CENTER; break; case 3 /*DSSPEAKER_QUAD*/: channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break; case 4 /*DSSPEAKER_STEREO*/: channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break; case 5 /*DSSPEAKER_SURROUND*/: channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER; break; case 6 /*DSSPEAKER_5POINT1_BACK*/ /*DSSPEAKER_5POINT1*/: channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break; case 7 /*DSSPEAKER_7POINT1_WIDE*/ /*DSSPEAKER_7POINT1*/: channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER; break; case 8 /*DSSPEAKER_7POINT1_SURROUND*/: channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break; case 9 /*DSSPEAKER_5POINT1_SURROUND*/: channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break; default: break; } if (pChannelsOut != NULL) { *pChannelsOut = channels; } if (pChannelMapOut != NULL) { *pChannelMapOut = channelMap; } } static ma_result ma_context_create_IDirectSound__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSound** ppDirectSound) { ma_IDirectSound* pDirectSound; HWND hWnd; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDirectSound != NULL); *ppDirectSound = NULL; pDirectSound = NULL; if (FAILED(((ma_DirectSoundCreateProc)pContext->dsound.DirectSoundCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSound, NULL))) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] DirectSoundCreate() failed for playback device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* The cooperative level must be set before doing anything else. */ hWnd = (HWND)pContext->dsound.hWnd; if (hWnd == 0) { hWnd = ((MA_PFN_GetForegroundWindow)pContext->win32.GetForegroundWindow)(); if (hWnd == 0) { hWnd = ((MA_PFN_GetDesktopWindow)pContext->win32.GetDesktopWindow)(); } } hr = ma_IDirectSound_SetCooperativeLevel(pDirectSound, hWnd, (shareMode == ma_share_mode_exclusive) ? MA_DSSCL_EXCLUSIVE : MA_DSSCL_PRIORITY); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_SetCooperateiveLevel() failed for playback device."); return ma_result_from_HRESULT(hr); } *ppDirectSound = pDirectSound; return MA_SUCCESS; } static ma_result ma_context_create_IDirectSoundCapture__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSoundCapture** ppDirectSoundCapture) { ma_IDirectSoundCapture* pDirectSoundCapture; HRESULT hr; MA_ASSERT(pContext != NULL); MA_ASSERT(ppDirectSoundCapture != NULL); /* DirectSound does not support exclusive mode for capture. */ if (shareMode == ma_share_mode_exclusive) { return MA_SHARE_MODE_NOT_SUPPORTED; } *ppDirectSoundCapture = NULL; pDirectSoundCapture = NULL; hr = ((ma_DirectSoundCaptureCreateProc)pContext->dsound.DirectSoundCaptureCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSoundCapture, NULL); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] DirectSoundCaptureCreate() failed for capture device."); return ma_result_from_HRESULT(hr); } *ppDirectSoundCapture = pDirectSoundCapture; return MA_SUCCESS; } static ma_result ma_context_get_format_info_for_IDirectSoundCapture__dsound(ma_context* pContext, ma_IDirectSoundCapture* pDirectSoundCapture, WORD* pChannels, WORD* pBitsPerSample, DWORD* pSampleRate) { HRESULT hr; MA_DSCCAPS caps; WORD bitsPerSample; DWORD sampleRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pDirectSoundCapture != NULL); if (pChannels) { *pChannels = 0; } if (pBitsPerSample) { *pBitsPerSample = 0; } if (pSampleRate) { *pSampleRate = 0; } MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSoundCapture_GetCaps(pDirectSoundCapture, &caps); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCapture_GetCaps() failed for capture device."); return ma_result_from_HRESULT(hr); } if (pChannels) { *pChannels = (WORD)caps.dwChannels; } /* The device can support multiple formats. We just go through the different formats in order of priority and pick the first one. This the same type of system as the WinMM backend. */ bitsPerSample = 16; sampleRate = 48000; if (caps.dwChannels == 1) { if ((caps.dwFormats & WAVE_FORMAT_48M16) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44M16) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2M16) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1M16) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96M16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((caps.dwFormats & WAVE_FORMAT_48M08) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44M08) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2M08) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1M08) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96M08) != 0) { sampleRate = 96000; } else { bitsPerSample = 16; /* Didn't find it. Just fall back to 16-bit. */ } } } else if (caps.dwChannels == 2) { if ((caps.dwFormats & WAVE_FORMAT_48S16) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44S16) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2S16) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1S16) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96S16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((caps.dwFormats & WAVE_FORMAT_48S08) != 0) { sampleRate = 48000; } else if ((caps.dwFormats & WAVE_FORMAT_44S08) != 0) { sampleRate = 44100; } else if ((caps.dwFormats & WAVE_FORMAT_2S08) != 0) { sampleRate = 22050; } else if ((caps.dwFormats & WAVE_FORMAT_1S08) != 0) { sampleRate = 11025; } else if ((caps.dwFormats & WAVE_FORMAT_96S08) != 0) { sampleRate = 96000; } else { bitsPerSample = 16; /* Didn't find it. Just fall back to 16-bit. */ } } } if (pBitsPerSample) { *pBitsPerSample = bitsPerSample; } if (pSampleRate) { *pSampleRate = sampleRate; } return MA_SUCCESS; } typedef struct { ma_context* pContext; ma_device_type deviceType; ma_enum_devices_callback_proc callback; void* pUserData; ma_bool32 terminated; } ma_context_enumerate_devices_callback_data__dsound; static BOOL CALLBACK ma_context_enumerate_devices_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext) { ma_context_enumerate_devices_callback_data__dsound* pData = (ma_context_enumerate_devices_callback_data__dsound*)lpContext; ma_device_info deviceInfo; (void)lpcstrModule; MA_ZERO_OBJECT(&deviceInfo); /* ID. */ if (lpGuid != NULL) { MA_COPY_MEMORY(deviceInfo.id.dsound, lpGuid, 16); } else { MA_ZERO_MEMORY(deviceInfo.id.dsound, 16); deviceInfo.isDefault = MA_TRUE; } /* Name / Description */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), lpcstrDescription, (size_t)-1); /* Call the callback function, but make sure we stop enumerating if the callee requested so. */ MA_ASSERT(pData != NULL); pData->terminated = (pData->callback(pData->pContext, pData->deviceType, &deviceInfo, pData->pUserData) == MA_FALSE); if (pData->terminated) { return FALSE; /* Stop enumeration. */ } else { return TRUE; /* Continue enumeration. */ } } static ma_result ma_context_enumerate_devices__dsound(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_context_enumerate_devices_callback_data__dsound data; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); data.pContext = pContext; data.callback = callback; data.pUserData = pUserData; data.terminated = MA_FALSE; /* Playback. */ if (!data.terminated) { data.deviceType = ma_device_type_playback; ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data); } /* Capture. */ if (!data.terminated) { data.deviceType = ma_device_type_capture; ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data); } return MA_SUCCESS; } typedef struct { const ma_device_id* pDeviceID; ma_device_info* pDeviceInfo; ma_bool32 found; } ma_context_get_device_info_callback_data__dsound; static BOOL CALLBACK ma_context_get_device_info_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext) { ma_context_get_device_info_callback_data__dsound* pData = (ma_context_get_device_info_callback_data__dsound*)lpContext; MA_ASSERT(pData != NULL); if ((pData->pDeviceID == NULL || ma_is_guid_null(pData->pDeviceID->dsound)) && (lpGuid == NULL || ma_is_guid_null(lpGuid))) { /* Default device. */ ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1); pData->pDeviceInfo->isDefault = MA_TRUE; pData->found = MA_TRUE; return FALSE; /* Stop enumeration. */ } else { /* Not the default device. */ if (lpGuid != NULL && pData->pDeviceID != NULL) { if (memcmp(pData->pDeviceID->dsound, lpGuid, sizeof(pData->pDeviceID->dsound)) == 0) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1); pData->found = MA_TRUE; return FALSE; /* Stop enumeration. */ } } } (void)lpcstrModule; return TRUE; } static ma_result ma_context_get_device_info__dsound(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; HRESULT hr; if (pDeviceID != NULL) { ma_context_get_device_info_callback_data__dsound data; /* ID. */ MA_COPY_MEMORY(pDeviceInfo->id.dsound, pDeviceID->dsound, 16); /* Name / Description. This is retrieved by enumerating over each device until we find that one that matches the input ID. */ data.pDeviceID = pDeviceID; data.pDeviceInfo = pDeviceInfo; data.found = MA_FALSE; if (deviceType == ma_device_type_playback) { ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_get_device_info_callback__dsound, &data); } else { ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_get_device_info_callback__dsound, &data); } if (!data.found) { return MA_NO_DEVICE; } } else { /* I don't think there's a way to get the name of the default device with DirectSound. In this case we just need to use defaults. */ /* ID */ MA_ZERO_MEMORY(pDeviceInfo->id.dsound, 16); /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; } /* Retrieving detailed information is slightly different depending on the device type. */ if (deviceType == ma_device_type_playback) { /* Playback. */ ma_IDirectSound* pDirectSound; MA_DSCAPS caps; WORD channels; result = ma_context_create_IDirectSound__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSound); if (result != MA_SUCCESS) { return result; } MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSound_GetCaps(pDirectSound, &caps); if (FAILED(hr)) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_GetCaps() failed for playback device."); return ma_result_from_HRESULT(hr); } /* Channels. Only a single channel count is reported for DirectSound. */ if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) { /* It supports at least stereo, but could support more. */ DWORD speakerConfig; channels = 2; /* Look at the speaker configuration to get a better idea on the channel count. */ hr = ma_IDirectSound_GetSpeakerConfig(pDirectSound, &speakerConfig); if (SUCCEEDED(hr)) { ma_get_channels_from_speaker_config__dsound(speakerConfig, &channels, NULL); } } else { /* It does not support stereo, which means we are stuck with mono. */ channels = 1; } /* In DirectSound, our native formats are centered around sample rates. All formats are supported, and we're only reporting a single channel count. However, DirectSound can report a range of supported sample rates. We're only going to include standard rates known by miniaudio in order to keep the size of this within reason. */ if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) { /* Multiple sample rates are supported. We'll report in order of our preferred sample rates. */ size_t iStandardSampleRate; for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) { ma_uint32 sampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate]; if (sampleRate >= caps.dwMinSecondarySampleRate && sampleRate <= caps.dwMaxSecondarySampleRate) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } } } else { /* Only a single sample rate is supported. */ pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = caps.dwMaxSecondarySampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } ma_IDirectSound_Release(pDirectSound); } else { /* Capture. This is a little different to playback due to the say the supported formats are reported. Technically capture devices can support a number of different formats, but for simplicity and consistency with ma_device_init() I'm just reporting the best format. */ ma_IDirectSoundCapture* pDirectSoundCapture; WORD channels; WORD bitsPerSample; DWORD sampleRate; result = ma_context_create_IDirectSoundCapture__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSoundCapture); if (result != MA_SUCCESS) { return result; } result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pContext, pDirectSoundCapture, &channels, &bitsPerSample, &sampleRate); if (result != MA_SUCCESS) { ma_IDirectSoundCapture_Release(pDirectSoundCapture); return result; } ma_IDirectSoundCapture_Release(pDirectSoundCapture); /* The format is always an integer format and is based on the bits per sample. */ if (bitsPerSample == 8) { pDeviceInfo->nativeDataFormats[0].format = ma_format_u8; } else if (bitsPerSample == 16) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s16; } else if (bitsPerSample == 24) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s24; } else if (bitsPerSample == 32) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s32; } else { return MA_FORMAT_NOT_SUPPORTED; } pDeviceInfo->nativeDataFormats[0].channels = channels; pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; } return MA_SUCCESS; } static ma_result ma_device_uninit__dsound(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->dsound.pCaptureBuffer != NULL) { ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); } if (pDevice->dsound.pCapture != NULL) { ma_IDirectSoundCapture_Release((ma_IDirectSoundCapture*)pDevice->dsound.pCapture); } if (pDevice->dsound.pPlaybackBuffer != NULL) { ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer); } if (pDevice->dsound.pPlaybackPrimaryBuffer != NULL) { ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer); } if (pDevice->dsound.pPlayback != NULL) { ma_IDirectSound_Release((ma_IDirectSound*)pDevice->dsound.pPlayback); } return MA_SUCCESS; } static ma_result ma_config_to_WAVEFORMATEXTENSIBLE(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* pChannelMap, MA_WAVEFORMATEXTENSIBLE* pWF) { GUID subformat; if (format == ma_format_unknown) { format = MA_DEFAULT_FORMAT; } if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } switch (format) { case ma_format_u8: case ma_format_s16: case ma_format_s24: /*case ma_format_s24_32:*/ case ma_format_s32: { subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; } break; case ma_format_f32: { subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; } break; default: return MA_FORMAT_NOT_SUPPORTED; } MA_ZERO_OBJECT(pWF); pWF->cbSize = sizeof(*pWF); pWF->wFormatTag = WAVE_FORMAT_EXTENSIBLE; pWF->nChannels = (WORD)channels; pWF->nSamplesPerSec = (DWORD)sampleRate; pWF->wBitsPerSample = (WORD)(ma_get_bytes_per_sample(format)*8); pWF->nBlockAlign = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8); pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec; pWF->Samples.wValidBitsPerSample = pWF->wBitsPerSample; pWF->dwChannelMask = ma_channel_map_to_channel_mask__win32(pChannelMap, channels); pWF->SubFormat = subformat; return MA_SUCCESS; } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__dsound(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* DirectSound has a minimum period size of 20ms. In practice, this doesn't seem to be enough for reliable glitch-free processing so going to use 30ms instead. */ ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(30, nativeSampleRate); ma_uint32 periodSizeInFrames; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile); if (periodSizeInFrames < minPeriodSizeInFrames) { periodSizeInFrames = minPeriodSizeInFrames; } return periodSizeInFrames; } static ma_result ma_device_init__dsound(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; HRESULT hr; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->dsound); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* Unfortunately DirectSound uses different APIs and data structures for playback and capture devices. We need to initialize the capture device first because we'll want to match its buffer size and period count on the playback side if we're using full-duplex mode. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEFORMATEXTENSIBLE wf; MA_DSCBUFFERDESC descDS; ma_uint32 periodSizeInFrames; ma_uint32 periodCount; char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */ MA_WAVEFORMATEXTENSIBLE* pActualFormat; result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &wf); if (result != MA_SUCCESS) { return result; } result = ma_context_create_IDirectSoundCapture__dsound(pDevice->pContext, pDescriptorCapture->shareMode, pDescriptorCapture->pDeviceID, (ma_IDirectSoundCapture**)&pDevice->dsound.pCapture); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pDevice->pContext, (ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &wf.nChannels, &wf.wBitsPerSample, &wf.nSamplesPerSec); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; wf.Samples.wValidBitsPerSample = wf.wBitsPerSample; wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM; /* The size of the buffer must be a clean multiple of the period count. */ periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorCapture, wf.nSamplesPerSec, pConfig->performanceProfile); periodCount = (pDescriptorCapture->periodCount > 0) ? pDescriptorCapture->periodCount : MA_DEFAULT_PERIODS; MA_ZERO_OBJECT(&descDS); descDS.dwSize = sizeof(descDS); descDS.dwFlags = 0; descDS.dwBufferBytes = periodSizeInFrames * periodCount * wf.nBlockAlign; descDS.lpwfxFormat = (MA_WAVEFORMATEX*)&wf; hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCapture_CreateCaptureBuffer() failed for capture device."); return ma_result_from_HRESULT(hr); } /* Get the _actual_ properties of the buffer. */ pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata; hr = ma_IDirectSoundCaptureBuffer_GetFormat((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to retrieve the actual format of the capture device's buffer."); return ma_result_from_HRESULT(hr); } /* We can now start setting the output data formats. */ pDescriptorCapture->format = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat); pDescriptorCapture->channels = pActualFormat->nChannels; pDescriptorCapture->sampleRate = pActualFormat->nSamplesPerSec; /* Get the native channel map based on the channel mask. */ if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap); } else { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap); } /* After getting the actual format the size of the buffer in frames may have actually changed. However, we want this to be as close to what the user has asked for as possible, so let's go ahead and release the old capture buffer and create a new one in this case. */ if (periodSizeInFrames != (descDS.dwBufferBytes / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / periodCount)) { descDS.dwBufferBytes = periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * periodCount; ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Second attempt at IDirectSoundCapture_CreateCaptureBuffer() failed for capture device."); return ma_result_from_HRESULT(hr); } } /* DirectSound should give us a buffer exactly the size we asked for. */ pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = periodCount; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEFORMATEXTENSIBLE wf; MA_DSBUFFERDESC descDSPrimary; MA_DSCAPS caps; char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */ MA_WAVEFORMATEXTENSIBLE* pActualFormat; ma_uint32 periodSizeInFrames; ma_uint32 periodCount; MA_DSBUFFERDESC descDS; WORD nativeChannelCount; DWORD nativeChannelMask = 0; result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &wf); if (result != MA_SUCCESS) { return result; } result = ma_context_create_IDirectSound__dsound(pDevice->pContext, pDescriptorPlayback->shareMode, pDescriptorPlayback->pDeviceID, (ma_IDirectSound**)&pDevice->dsound.pPlayback); if (result != MA_SUCCESS) { ma_device_uninit__dsound(pDevice); return result; } MA_ZERO_OBJECT(&descDSPrimary); descDSPrimary.dwSize = sizeof(MA_DSBUFFERDESC); descDSPrimary.dwFlags = MA_DSBCAPS_PRIMARYBUFFER | MA_DSBCAPS_CTRLVOLUME; hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDSPrimary, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackPrimaryBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's primary buffer."); return ma_result_from_HRESULT(hr); } /* We may want to make some adjustments to the format if we are using defaults. */ MA_ZERO_OBJECT(&caps); caps.dwSize = sizeof(caps); hr = ma_IDirectSound_GetCaps((ma_IDirectSound*)pDevice->dsound.pPlayback, &caps); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_GetCaps() failed for playback device."); return ma_result_from_HRESULT(hr); } if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) { DWORD speakerConfig; /* It supports at least stereo, but could support more. */ nativeChannelCount = 2; /* Look at the speaker configuration to get a better idea on the channel count. */ if (SUCCEEDED(ma_IDirectSound_GetSpeakerConfig((ma_IDirectSound*)pDevice->dsound.pPlayback, &speakerConfig))) { ma_get_channels_from_speaker_config__dsound(speakerConfig, &nativeChannelCount, &nativeChannelMask); } } else { /* It does not support stereo, which means we are stuck with mono. */ nativeChannelCount = 1; nativeChannelMask = 0x00000001; } if (pDescriptorPlayback->channels == 0) { wf.nChannels = nativeChannelCount; wf.dwChannelMask = nativeChannelMask; } if (pDescriptorPlayback->sampleRate == 0) { /* We base the sample rate on the values returned by GetCaps(). */ if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) { wf.nSamplesPerSec = ma_get_best_sample_rate_within_range(caps.dwMinSecondarySampleRate, caps.dwMaxSecondarySampleRate); } else { wf.nSamplesPerSec = caps.dwMaxSecondarySampleRate; } } wf.nBlockAlign = (WORD)(wf.nChannels * wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec; /* From MSDN: The method succeeds even if the hardware does not support the requested format; DirectSound sets the buffer to the closest supported format. To determine whether this has happened, an application can call the GetFormat method for the primary buffer and compare the result with the format that was requested with the SetFormat method. */ hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf); if (FAILED(hr)) { /* If setting of the format failed we'll try again with some fallback settings. On Windows 98 I have observed that IEEE_FLOAT does not work. We'll therefore enforce PCM. I also had issues where a sample rate of 48000 did not work correctly. Not sure if it was a driver issue or not, but will use 44100 for the sample rate. */ wf.cbSize = 18; /* NOTE: Don't use sizeof(MA_WAVEFORMATEX) here because it's got an extra 2 bytes due to padding. */ wf.wFormatTag = WAVE_FORMAT_PCM; wf.wBitsPerSample = 16; wf.nChannels = nativeChannelCount; wf.nSamplesPerSec = 44100; wf.nBlockAlign = wf.nChannels * (wf.wBitsPerSample / 8); wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to set format of playback device's primary buffer."); return ma_result_from_HRESULT(hr); } } /* Get the _actual_ properties of the buffer. */ pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata; hr = ma_IDirectSoundBuffer_GetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to retrieve the actual format of the playback device's primary buffer."); return ma_result_from_HRESULT(hr); } /* We now have enough information to start setting some output properties. */ pDescriptorPlayback->format = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat); pDescriptorPlayback->channels = pActualFormat->nChannels; pDescriptorPlayback->sampleRate = pActualFormat->nSamplesPerSec; /* Get the internal channel map based on the channel mask. */ if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap); } else { ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap); } /* The size of the buffer must be a clean multiple of the period count. */ periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); periodCount = (pDescriptorPlayback->periodCount > 0) ? pDescriptorPlayback->periodCount : MA_DEFAULT_PERIODS; /* Meaning of dwFlags (from MSDN): DSBCAPS_CTRLPOSITIONNOTIFY The buffer has position notification capability. DSBCAPS_GLOBALFOCUS With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to another application, even if the new application uses DirectSound. DSBCAPS_GETCURRENTPOSITION2 In the first version of DirectSound, the play cursor was significantly ahead of the actual playing sound on emulated sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the application can get a more accurate play cursor. */ MA_ZERO_OBJECT(&descDS); descDS.dwSize = sizeof(descDS); descDS.dwFlags = MA_DSBCAPS_CTRLPOSITIONNOTIFY | MA_DSBCAPS_GLOBALFOCUS | MA_DSBCAPS_GETCURRENTPOSITION2; descDS.dwBufferBytes = periodSizeInFrames * periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels); descDS.lpwfxFormat = (MA_WAVEFORMATEX*)pActualFormat; hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDS, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackBuffer, NULL); if (FAILED(hr)) { ma_device_uninit__dsound(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's secondary buffer."); return ma_result_from_HRESULT(hr); } /* DirectSound should give us a buffer exactly the size we asked for. */ pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = periodCount; } return MA_SUCCESS; } static ma_result ma_device_data_loop__dsound(ma_device* pDevice) { ma_result result = MA_SUCCESS; ma_uint32 bpfDeviceCapture = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 bpfDevicePlayback = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); HRESULT hr; DWORD lockOffsetInBytesCapture; DWORD lockSizeInBytesCapture; DWORD mappedSizeInBytesCapture; DWORD mappedDeviceFramesProcessedCapture; void* pMappedDeviceBufferCapture; DWORD lockOffsetInBytesPlayback; DWORD lockSizeInBytesPlayback; DWORD mappedSizeInBytesPlayback; void* pMappedDeviceBufferPlayback; DWORD prevReadCursorInBytesCapture = 0; DWORD prevPlayCursorInBytesPlayback = 0; ma_bool32 physicalPlayCursorLoopFlagPlayback = 0; DWORD virtualWriteCursorInBytesPlayback = 0; ma_bool32 virtualWriteCursorLoopFlagPlayback = 0; ma_bool32 isPlaybackDeviceStarted = MA_FALSE; ma_uint32 framesWrittenToPlaybackDevice = 0; /* For knowing whether or not the playback device needs to be started. */ ma_uint32 waitTimeInMilliseconds = 1; DWORD playbackBufferStatus = 0; MA_ASSERT(pDevice != NULL); /* The first thing to do is start the capture device. The playback device is only started after the first period is written. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { hr = ma_IDirectSoundCaptureBuffer_Start((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, MA_DSCBSTART_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCaptureBuffer_Start() failed."); return ma_result_from_HRESULT(hr); } } while (ma_device_get_state(pDevice) == ma_device_state_started) { switch (pDevice->type) { case ma_device_type_duplex: { DWORD physicalCaptureCursorInBytes; DWORD physicalReadCursorInBytes; hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes); if (FAILED(hr)) { return ma_result_from_HRESULT(hr); } /* If nothing is available we just sleep for a bit and return from this iteration. */ if (physicalReadCursorInBytes == prevReadCursorInBytesCapture) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } /* The current position has moved. We need to map all of the captured samples and write them to the playback device, making sure we don't return until every frame has been copied over. */ if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) { /* The capture position has not looped. This is the simple case. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (physicalReadCursorInBytes - prevReadCursorInBytesCapture); } else { /* The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything, do it again from the start. */ if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) { /* Lock up to the end of the buffer. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture; } else { /* Lock starting from the start of the buffer. */ lockOffsetInBytesCapture = 0; lockSizeInBytesCapture = physicalReadCursorInBytes; } } if (lockSizeInBytesCapture == 0) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from capture device in preparation for writing to the device."); return ma_result_from_HRESULT(hr); } /* At this point we have some input data that we need to output. We do not return until every mapped frame of the input data is written to the playback device. */ mappedDeviceFramesProcessedCapture = 0; for (;;) { /* Keep writing to the playback device. */ ma_uint8 inputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 inputFramesInClientFormatCap = sizeof(inputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); ma_uint8 outputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 outputFramesInClientFormatCap = sizeof(outputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); ma_uint32 outputFramesInClientFormatCount; ma_uint32 outputFramesInClientFormatConsumed = 0; ma_uint64 clientCapturedFramesToProcess = ma_min(inputFramesInClientFormatCap, outputFramesInClientFormatCap); ma_uint64 deviceCapturedFramesToProcess = (mappedSizeInBytesCapture / bpfDeviceCapture) - mappedDeviceFramesProcessedCapture; void* pRunningMappedDeviceBufferCapture = ma_offset_ptr(pMappedDeviceBufferCapture, mappedDeviceFramesProcessedCapture * bpfDeviceCapture); result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningMappedDeviceBufferCapture, &deviceCapturedFramesToProcess, inputFramesInClientFormat, &clientCapturedFramesToProcess); if (result != MA_SUCCESS) { break; } outputFramesInClientFormatCount = (ma_uint32)clientCapturedFramesToProcess; mappedDeviceFramesProcessedCapture += (ma_uint32)deviceCapturedFramesToProcess; ma_device__handle_data_callback(pDevice, outputFramesInClientFormat, inputFramesInClientFormat, (ma_uint32)clientCapturedFramesToProcess); /* At this point we have input and output data in client format. All we need to do now is convert it to the output device format. This may take a few passes. */ for (;;) { ma_uint32 framesWrittenThisIteration; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; DWORD availableBytesPlayback; DWORD silentPaddingInBytes = 0; /* <-- Must be initialized to 0. */ /* We need the physical play and write cursors. */ if (FAILED(ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes))) { break; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */ if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback): Play cursor has moved in front of the write cursor (same loop iteration). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } /* If there's no room available for writing we need to wait for more. */ if (availableBytesPlayback == 0) { /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */ if (!isPlaybackDeviceStarted) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } else { ma_sleep(waitTimeInMilliseconds); continue; } } /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */ lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. Go up to the end of the buffer. */ lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; } else { /* Different loop iterations. Go up to the physical play cursor. */ lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from playback device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); break; } /* Experiment: If the playback buffer is being starved, pad it with some silence to get it back in sync. This will cause a glitch, but it may prevent endless glitching due to it constantly running out of data. */ if (isPlaybackDeviceStarted) { DWORD bytesQueuedForPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - availableBytesPlayback; if (bytesQueuedForPlayback < (pDevice->playback.internalPeriodSizeInFrames*bpfDevicePlayback)) { silentPaddingInBytes = (pDevice->playback.internalPeriodSizeInFrames*2*bpfDevicePlayback) - bytesQueuedForPlayback; if (silentPaddingInBytes > lockSizeInBytesPlayback) { silentPaddingInBytes = lockSizeInBytesPlayback; } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Duplex/Playback) Playback buffer starved. availableBytesPlayback=%ld, silentPaddingInBytes=%ld\n", availableBytesPlayback, silentPaddingInBytes); } } /* At this point we have a buffer for output. */ if (silentPaddingInBytes > 0) { MA_ZERO_MEMORY(pMappedDeviceBufferPlayback, silentPaddingInBytes); framesWrittenThisIteration = silentPaddingInBytes/bpfDevicePlayback; } else { ma_uint64 convertedFrameCountIn = (outputFramesInClientFormatCount - outputFramesInClientFormatConsumed); ma_uint64 convertedFrameCountOut = mappedSizeInBytesPlayback/bpfDevicePlayback; void* pConvertedFramesIn = ma_offset_ptr(outputFramesInClientFormat, outputFramesInClientFormatConsumed * bpfDevicePlayback); void* pConvertedFramesOut = pMappedDeviceBufferPlayback; result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pConvertedFramesIn, &convertedFrameCountIn, pConvertedFramesOut, &convertedFrameCountOut); if (result != MA_SUCCESS) { break; } outputFramesInClientFormatConsumed += (ma_uint32)convertedFrameCountOut; framesWrittenThisIteration = (ma_uint32)convertedFrameCountOut; } hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, framesWrittenThisIteration*bpfDevicePlayback, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from playback device after writing to the device."); result = ma_result_from_HRESULT(hr); break; } virtualWriteCursorInBytesPlayback += framesWrittenThisIteration*bpfDevicePlayback; if ((virtualWriteCursorInBytesPlayback/bpfDevicePlayback) == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods) { virtualWriteCursorInBytesPlayback = 0; virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback; } /* We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds a bit of a buffer to prevent the playback buffer from getting starved. */ framesWrittenToPlaybackDevice += framesWrittenThisIteration; if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= (pDevice->playback.internalPeriodSizeInFrames*2)) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } if (framesWrittenThisIteration < mappedSizeInBytesPlayback/bpfDevicePlayback) { break; /* We're finished with the output data.*/ } } if (clientCapturedFramesToProcess == 0) { break; /* We just consumed every input sample. */ } } /* At this point we're done with the mapped portion of the capture buffer. */ hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from capture device after reading from the device."); return ma_result_from_HRESULT(hr); } prevReadCursorInBytesCapture = (lockOffsetInBytesCapture + mappedSizeInBytesCapture); } break; case ma_device_type_capture: { DWORD physicalCaptureCursorInBytes; DWORD physicalReadCursorInBytes; hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes); if (FAILED(hr)) { return MA_ERROR; } /* If the previous capture position is the same as the current position we need to wait a bit longer. */ if (prevReadCursorInBytesCapture == physicalReadCursorInBytes) { ma_sleep(waitTimeInMilliseconds); continue; } /* Getting here means we have capture data available. */ if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) { /* The capture position has not looped. This is the simple case. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (physicalReadCursorInBytes - prevReadCursorInBytesCapture); } else { /* The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything, do it again from the start. */ if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) { /* Lock up to the end of the buffer. */ lockOffsetInBytesCapture = prevReadCursorInBytesCapture; lockSizeInBytesCapture = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture; } else { /* Lock starting from the start of the buffer. */ lockOffsetInBytesCapture = 0; lockSizeInBytesCapture = physicalReadCursorInBytes; } } if (lockSizeInBytesCapture < pDevice->capture.internalPeriodSizeInFrames) { ma_sleep(waitTimeInMilliseconds); continue; /* Nothing is available in the capture buffer. */ } hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from capture device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); } if (lockSizeInBytesCapture != mappedSizeInBytesCapture) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[DirectSound] (Capture) lockSizeInBytesCapture=%ld != mappedSizeInBytesCapture=%ld\n", lockSizeInBytesCapture, mappedSizeInBytesCapture); } ma_device__send_frames_to_client(pDevice, mappedSizeInBytesCapture/bpfDeviceCapture, pMappedDeviceBufferCapture); hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from capture device after reading from the device."); return ma_result_from_HRESULT(hr); } prevReadCursorInBytesCapture = lockOffsetInBytesCapture + mappedSizeInBytesCapture; if (prevReadCursorInBytesCapture == (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture)) { prevReadCursorInBytesCapture = 0; } } break; case ma_device_type_playback: { DWORD availableBytesPlayback; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes); if (FAILED(hr)) { break; } hr = ma_IDirectSoundBuffer_GetStatus((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &playbackBufferStatus); if (SUCCEEDED(hr) && (playbackBufferStatus & MA_DSBSTATUS_PLAYING) == 0 && isPlaybackDeviceStarted) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[DirectSound] Attempting to resume audio due to state: %d.", (int)playbackBufferStatus); hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed after attempting to resume from state %d.", (int)playbackBufferStatus); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; ma_sleep(waitTimeInMilliseconds); continue; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */ if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Playback): Play cursor has moved in front of the write cursor (same loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { /* This is an error. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[DirectSound] (Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\n", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback); availableBytesPlayback = 0; } } /* If there's no room available for writing we need to wait for more. */ if (availableBytesPlayback < pDevice->playback.internalPeriodSizeInFrames) { /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */ if (availableBytesPlayback == 0 && !isPlaybackDeviceStarted) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } else { ma_sleep(waitTimeInMilliseconds); continue; } } /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */ lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. Go up to the end of the buffer. */ lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; } else { /* Different loop iterations. Go up to the physical play cursor. */ lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to map buffer from playback device in preparation for writing to the device."); result = ma_result_from_HRESULT(hr); break; } /* At this point we have a buffer for output. */ ma_device__read_frames_from_client(pDevice, (mappedSizeInBytesPlayback/bpfDevicePlayback), pMappedDeviceBufferPlayback); hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, mappedSizeInBytesPlayback, NULL, 0); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] Failed to unlock internal buffer from playback device after writing to the device."); result = ma_result_from_HRESULT(hr); break; } virtualWriteCursorInBytesPlayback += mappedSizeInBytesPlayback; if (virtualWriteCursorInBytesPlayback == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) { virtualWriteCursorInBytesPlayback = 0; virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback; } /* We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds a bit of a buffer to prevent the playback buffer from getting starved. */ framesWrittenToPlaybackDevice += mappedSizeInBytesPlayback/bpfDevicePlayback; if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= pDevice->playback.internalPeriodSizeInFrames) { hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed."); return ma_result_from_HRESULT(hr); } isPlaybackDeviceStarted = MA_TRUE; } } break; default: return MA_INVALID_ARGS; /* Invalid device type. */ } if (result != MA_SUCCESS) { return result; } } /* Getting here means the device is being stopped. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { hr = ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundCaptureBuffer_Stop() failed."); return ma_result_from_HRESULT(hr); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* The playback device should be drained before stopping. All we do is wait until the available bytes is equal to the size of the buffer. */ if (isPlaybackDeviceStarted) { for (;;) { DWORD availableBytesPlayback = 0; DWORD physicalPlayCursorInBytes; DWORD physicalWriteCursorInBytes; hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes); if (FAILED(hr)) { break; } if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) { physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback; } prevPlayCursorInBytesPlayback = physicalPlayCursorInBytes; if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) { /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback; availableBytesPlayback += physicalPlayCursorInBytes; /* Wrap around. */ } else { break; } } else { /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */ if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) { availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback; } else { break; } } if (availableBytesPlayback >= (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback)) { break; } ma_sleep(waitTimeInMilliseconds); } } hr = ma_IDirectSoundBuffer_Stop((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer); if (FAILED(hr)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Stop() failed."); return ma_result_from_HRESULT(hr); } ma_IDirectSoundBuffer_SetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0); } return MA_SUCCESS; } static ma_result ma_context_uninit__dsound(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_dsound); ma_dlclose(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL); return MA_SUCCESS; } static ma_result ma_context_init__dsound(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pContext->dsound.hDSoundDLL = ma_dlopen(ma_context_get_log(pContext), "dsound.dll"); if (pContext->dsound.hDSoundDLL == NULL) { return MA_API_NOT_FOUND; } pContext->dsound.DirectSoundCreate = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCreate"); pContext->dsound.DirectSoundEnumerateA = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundEnumerateA"); pContext->dsound.DirectSoundCaptureCreate = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCaptureCreate"); pContext->dsound.DirectSoundCaptureEnumerateA = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, "DirectSoundCaptureEnumerateA"); /* We need to support all functions or nothing. DirectSound with Windows 95 seems to not work too well in my testing. For example, it's missing DirectSoundCaptureEnumerateA(). This is a convenient place to just disable the DirectSound backend for Windows 95. */ if (pContext->dsound.DirectSoundCreate == NULL || pContext->dsound.DirectSoundEnumerateA == NULL || pContext->dsound.DirectSoundCaptureCreate == NULL || pContext->dsound.DirectSoundCaptureEnumerateA == NULL) { return MA_API_NOT_FOUND; } pContext->dsound.hWnd = pConfig->dsound.hWnd; pCallbacks->onContextInit = ma_context_init__dsound; pCallbacks->onContextUninit = ma_context_uninit__dsound; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__dsound; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__dsound; pCallbacks->onDeviceInit = ma_device_init__dsound; pCallbacks->onDeviceUninit = ma_device_uninit__dsound; pCallbacks->onDeviceStart = NULL; /* Not used. Started in onDeviceDataLoop. */ pCallbacks->onDeviceStop = NULL; /* Not used. Stopped in onDeviceDataLoop. */ pCallbacks->onDeviceRead = NULL; /* Not used. Data is read directly in onDeviceDataLoop. */ pCallbacks->onDeviceWrite = NULL; /* Not used. Data is written directly in onDeviceDataLoop. */ pCallbacks->onDeviceDataLoop = ma_device_data_loop__dsound; return MA_SUCCESS; } #endif /****************************************************************************** WinMM Backend ******************************************************************************/ #ifdef MA_HAS_WINMM /* Some build configurations will exclude the WinMM API. An example is when WIN32_LEAN_AND_MEAN is defined. We need to define the types and functions we need manually. */ #define MA_MMSYSERR_NOERROR 0 #define MA_MMSYSERR_ERROR 1 #define MA_MMSYSERR_BADDEVICEID 2 #define MA_MMSYSERR_INVALHANDLE 5 #define MA_MMSYSERR_NOMEM 7 #define MA_MMSYSERR_INVALFLAG 10 #define MA_MMSYSERR_INVALPARAM 11 #define MA_MMSYSERR_HANDLEBUSY 12 #define MA_CALLBACK_EVENT 0x00050000 #define MA_WAVE_ALLOWSYNC 0x0002 #define MA_WHDR_DONE 0x00000001 #define MA_WHDR_PREPARED 0x00000002 #define MA_WHDR_BEGINLOOP 0x00000004 #define MA_WHDR_ENDLOOP 0x00000008 #define MA_WHDR_INQUEUE 0x00000010 #define MA_MAXPNAMELEN 32 typedef void* MA_HWAVEIN; typedef void* MA_HWAVEOUT; typedef UINT MA_MMRESULT; typedef UINT MA_MMVERSION; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; } MA_WAVEINCAPSA; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; DWORD dwSupport; } MA_WAVEOUTCAPSA; typedef struct tagWAVEHDR { char* lpData; DWORD dwBufferLength; DWORD dwBytesRecorded; DWORD_PTR dwUser; DWORD dwFlags; DWORD dwLoops; struct tagWAVEHDR* lpNext; DWORD_PTR reserved; } MA_WAVEHDR; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; DWORD dwSupport; GUID ManufacturerGuid; GUID ProductGuid; GUID NameGuid; } MA_WAVEOUTCAPS2A; typedef struct { WORD wMid; WORD wPid; MA_MMVERSION vDriverVersion; CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; WORD wReserved1; GUID ManufacturerGuid; GUID ProductGuid; GUID NameGuid; } MA_WAVEINCAPS2A; typedef UINT (WINAPI * MA_PFN_waveOutGetNumDevs)(void); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEOUTCAPSA* pwoc, UINT cbwoc); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutOpen)(MA_HWAVEOUT* phwo, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutClose)(MA_HWAVEOUT hwo); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutPrepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutUnprepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutWrite)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveOutReset)(MA_HWAVEOUT hwo); typedef UINT (WINAPI * MA_PFN_waveInGetNumDevs)(void); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEINCAPSA* pwic, UINT cbwic); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInOpen)(MA_HWAVEIN* phwi, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInClose)(MA_HWAVEIN hwi); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInPrepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInUnprepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInAddBuffer)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInStart)(MA_HWAVEIN hwi); typedef MA_MMRESULT (WINAPI * MA_PFN_waveInReset)(MA_HWAVEIN hwi); static ma_result ma_result_from_MMRESULT(MA_MMRESULT resultMM) { switch (resultMM) { case MA_MMSYSERR_NOERROR: return MA_SUCCESS; case MA_MMSYSERR_BADDEVICEID: return MA_INVALID_ARGS; case MA_MMSYSERR_INVALHANDLE: return MA_INVALID_ARGS; case MA_MMSYSERR_NOMEM: return MA_OUT_OF_MEMORY; case MA_MMSYSERR_INVALFLAG: return MA_INVALID_ARGS; case MA_MMSYSERR_INVALPARAM: return MA_INVALID_ARGS; case MA_MMSYSERR_HANDLEBUSY: return MA_BUSY; case MA_MMSYSERR_ERROR: return MA_ERROR; default: return MA_ERROR; } } static char* ma_find_last_character(char* str, char ch) { char* last; if (str == NULL) { return NULL; } last = NULL; while (*str != '\0') { if (*str == ch) { last = str; } str += 1; } return last; } static ma_uint32 ma_get_period_size_in_bytes(ma_uint32 periodSizeInFrames, ma_format format, ma_uint32 channels) { return periodSizeInFrames * ma_get_bytes_per_frame(format, channels); } /* Our own "WAVECAPS" structure that contains generic information shared between WAVEOUTCAPS2 and WAVEINCAPS2 so we can do things generically and typesafely. Names are being kept the same for consistency. */ typedef struct { CHAR szPname[MA_MAXPNAMELEN]; DWORD dwFormats; WORD wChannels; GUID NameGuid; } MA_WAVECAPSA; static ma_result ma_get_best_info_from_formats_flags__winmm(DWORD dwFormats, WORD channels, WORD* pBitsPerSample, DWORD* pSampleRate) { WORD bitsPerSample = 0; DWORD sampleRate = 0; if (pBitsPerSample) { *pBitsPerSample = 0; } if (pSampleRate) { *pSampleRate = 0; } if (channels == 1) { bitsPerSample = 16; if ((dwFormats & WAVE_FORMAT_48M16) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44M16) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2M16) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1M16) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96M16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((dwFormats & WAVE_FORMAT_48M08) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44M08) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2M08) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1M08) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96M08) != 0) { sampleRate = 96000; } else { return MA_FORMAT_NOT_SUPPORTED; } } } else { bitsPerSample = 16; if ((dwFormats & WAVE_FORMAT_48S16) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44S16) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2S16) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1S16) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96S16) != 0) { sampleRate = 96000; } else { bitsPerSample = 8; if ((dwFormats & WAVE_FORMAT_48S08) != 0) { sampleRate = 48000; } else if ((dwFormats & WAVE_FORMAT_44S08) != 0) { sampleRate = 44100; } else if ((dwFormats & WAVE_FORMAT_2S08) != 0) { sampleRate = 22050; } else if ((dwFormats & WAVE_FORMAT_1S08) != 0) { sampleRate = 11025; } else if ((dwFormats & WAVE_FORMAT_96S08) != 0) { sampleRate = 96000; } else { return MA_FORMAT_NOT_SUPPORTED; } } } if (pBitsPerSample) { *pBitsPerSample = bitsPerSample; } if (pSampleRate) { *pSampleRate = sampleRate; } return MA_SUCCESS; } static ma_result ma_formats_flags_to_WAVEFORMATEX__winmm(DWORD dwFormats, WORD channels, MA_WAVEFORMATEX* pWF) { ma_result result; MA_ASSERT(pWF != NULL); MA_ZERO_OBJECT(pWF); pWF->cbSize = sizeof(*pWF); pWF->wFormatTag = WAVE_FORMAT_PCM; pWF->nChannels = (WORD)channels; if (pWF->nChannels > 2) { pWF->nChannels = 2; } result = ma_get_best_info_from_formats_flags__winmm(dwFormats, channels, &pWF->wBitsPerSample, &pWF->nSamplesPerSec); if (result != MA_SUCCESS) { return result; } pWF->nBlockAlign = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8); pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec; return MA_SUCCESS; } static ma_result ma_context_get_device_info_from_WAVECAPS(ma_context* pContext, MA_WAVECAPSA* pCaps, ma_device_info* pDeviceInfo) { WORD bitsPerSample; DWORD sampleRate; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); /* Name / Description Unfortunately the name specified in WAVE(OUT/IN)CAPS2 is limited to 31 characters. This results in an unprofessional looking situation where the names of the devices are truncated. To help work around this, we need to look at the name GUID and try looking in the registry for the full name. If we can't find it there, we need to just fall back to the default name. */ /* Set the default to begin with. */ ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), pCaps->szPname, (size_t)-1); /* Now try the registry. There's a few things to consider here: - The name GUID can be null, in which we case we just need to stick to the original 31 characters. - If the name GUID is not present in the registry we'll also need to stick to the original 31 characters. - I like consistency, so I want the returned device names to be consistent with those returned by WASAPI and DirectSound. The problem, however is that WASAPI and DirectSound use " ()" format (such as "Speakers (High Definition Audio)"), but WinMM does not specify the component name. From my admittedly limited testing, I've notice the component name seems to usually fit within the 31 characters of the fixed sized buffer, so what I'm going to do is parse that string for the component name, and then concatenate the name from the registry. */ if (!ma_is_guid_null(&pCaps->NameGuid)) { WCHAR guidStrW[256]; if (((MA_PFN_StringFromGUID2)pContext->win32.StringFromGUID2)(&pCaps->NameGuid, guidStrW, ma_countof(guidStrW)) > 0) { char guidStr[256]; char keyStr[1024]; HKEY hKey; WideCharToMultiByte(CP_UTF8, 0, guidStrW, -1, guidStr, sizeof(guidStr), 0, FALSE); ma_strcpy_s(keyStr, sizeof(keyStr), "SYSTEM\\CurrentControlSet\\Control\\MediaCategories\\"); ma_strcat_s(keyStr, sizeof(keyStr), guidStr); if (((MA_PFN_RegOpenKeyExA)pContext->win32.RegOpenKeyExA)(HKEY_LOCAL_MACHINE, keyStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { BYTE nameFromReg[512]; DWORD nameFromRegSize = sizeof(nameFromReg); LONG resultWin32 = ((MA_PFN_RegQueryValueExA)pContext->win32.RegQueryValueExA)(hKey, "Name", 0, NULL, (BYTE*)nameFromReg, (DWORD*)&nameFromRegSize); ((MA_PFN_RegCloseKey)pContext->win32.RegCloseKey)(hKey); if (resultWin32 == ERROR_SUCCESS) { /* We have the value from the registry, so now we need to construct the name string. */ char name[1024]; if (ma_strcpy_s(name, sizeof(name), pDeviceInfo->name) == 0) { char* nameBeg = ma_find_last_character(name, '('); if (nameBeg != NULL) { size_t leadingLen = (nameBeg - name); ma_strncpy_s(nameBeg + 1, sizeof(name) - leadingLen, (const char*)nameFromReg, (size_t)-1); /* The closing ")", if it can fit. */ if (leadingLen + nameFromRegSize < sizeof(name)-1) { ma_strcat_s(name, sizeof(name), ")"); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), name, (size_t)-1); } } } } } } result = ma_get_best_info_from_formats_flags__winmm(pCaps->dwFormats, pCaps->wChannels, &bitsPerSample, &sampleRate); if (result != MA_SUCCESS) { return result; } if (bitsPerSample == 8) { pDeviceInfo->nativeDataFormats[0].format = ma_format_u8; } else if (bitsPerSample == 16) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s16; } else if (bitsPerSample == 24) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s24; } else if (bitsPerSample == 32) { pDeviceInfo->nativeDataFormats[0].format = ma_format_s32; } else { return MA_FORMAT_NOT_SUPPORTED; } pDeviceInfo->nativeDataFormats[0].channels = pCaps->wChannels; pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; return MA_SUCCESS; } static ma_result ma_context_get_device_info_from_WAVEOUTCAPS2(ma_context* pContext, MA_WAVEOUTCAPS2A* pCaps, ma_device_info* pDeviceInfo) { MA_WAVECAPSA caps; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname)); caps.dwFormats = pCaps->dwFormats; caps.wChannels = pCaps->wChannels; caps.NameGuid = pCaps->NameGuid; return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo); } static ma_result ma_context_get_device_info_from_WAVEINCAPS2(ma_context* pContext, MA_WAVEINCAPS2A* pCaps, ma_device_info* pDeviceInfo) { MA_WAVECAPSA caps; MA_ASSERT(pContext != NULL); MA_ASSERT(pCaps != NULL); MA_ASSERT(pDeviceInfo != NULL); MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname)); caps.dwFormats = pCaps->dwFormats; caps.wChannels = pCaps->wChannels; caps.NameGuid = pCaps->NameGuid; return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo); } static ma_result ma_context_enumerate_devices__winmm(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { UINT playbackDeviceCount; UINT captureDeviceCount; UINT iPlaybackDevice; UINT iCaptureDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ playbackDeviceCount = ((MA_PFN_waveOutGetNumDevs)pContext->winmm.waveOutGetNumDevs)(); for (iPlaybackDevice = 0; iPlaybackDevice < playbackDeviceCount; ++iPlaybackDevice) { MA_MMRESULT result; MA_WAVEOUTCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(iPlaybackDevice, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.winmm = iPlaybackDevice; /* The first enumerated device is the default device. */ if (iPlaybackDevice == 0) { deviceInfo.isDefault = MA_TRUE; } if (ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { return MA_SUCCESS; /* Enumeration was stopped. */ } } } } /* Capture. */ captureDeviceCount = ((MA_PFN_waveInGetNumDevs)pContext->winmm.waveInGetNumDevs)(); for (iCaptureDevice = 0; iCaptureDevice < captureDeviceCount; ++iCaptureDevice) { MA_MMRESULT result; MA_WAVEINCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(iCaptureDevice, (MA_WAVEINCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.winmm = iCaptureDevice; /* The first enumerated device is the default device. */ if (iCaptureDevice == 0) { deviceInfo.isDefault = MA_TRUE; } if (ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) { ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { return MA_SUCCESS; /* Enumeration was stopped. */ } } } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__winmm(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { UINT winMMDeviceID; MA_ASSERT(pContext != NULL); winMMDeviceID = 0; if (pDeviceID != NULL) { winMMDeviceID = (UINT)pDeviceID->winmm; } pDeviceInfo->id.winmm = winMMDeviceID; /* The first ID is the default device. */ if (winMMDeviceID == 0) { pDeviceInfo->isDefault = MA_TRUE; } if (deviceType == ma_device_type_playback) { MA_MMRESULT result; MA_WAVEOUTCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(winMMDeviceID, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { return ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, pDeviceInfo); } } else { MA_MMRESULT result; MA_WAVEINCAPS2A caps; MA_ZERO_OBJECT(&caps); result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(winMMDeviceID, (MA_WAVEINCAPSA*)&caps, sizeof(caps)); if (result == MA_MMSYSERR_NOERROR) { return ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, pDeviceInfo); } } return MA_NO_DEVICE; } static ma_result ma_device_uninit__winmm(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); CloseHandle((HANDLE)pDevice->winmm.hEventCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); CloseHandle((HANDLE)pDevice->winmm.hEventPlayback); } ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks); MA_ZERO_OBJECT(&pDevice->winmm); /* Safety. */ return MA_SUCCESS; } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__winmm(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* WinMM has a minimum period size of 40ms. */ ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(40, nativeSampleRate); ma_uint32 periodSizeInFrames; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile); if (periodSizeInFrames < minPeriodSizeInFrames) { periodSizeInFrames = minPeriodSizeInFrames; } return periodSizeInFrames; } static ma_result ma_device_init__winmm(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { const char* errorMsg = ""; ma_result errorCode = MA_ERROR; ma_result result = MA_SUCCESS; ma_uint32 heapSize; UINT winMMDeviceIDPlayback = 0; UINT winMMDeviceIDCapture = 0; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->winmm); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with WinMM. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } if (pDescriptorPlayback->pDeviceID != NULL) { winMMDeviceIDPlayback = (UINT)pDescriptorPlayback->pDeviceID->winmm; } if (pDescriptorCapture->pDeviceID != NULL) { winMMDeviceIDCapture = (UINT)pDescriptorCapture->pDeviceID->winmm; } /* The capture device needs to be initialized first. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEINCAPSA caps; MA_WAVEFORMATEX wf; MA_MMRESULT resultMM; /* We use an event to know when a new fragment needs to be enqueued. */ pDevice->winmm.hEventCapture = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL); if (pDevice->winmm.hEventCapture == NULL) { errorMsg = "[WinMM] Failed to create event for fragment enqueuing for the capture device.", errorCode = ma_result_from_GetLastError(GetLastError()); goto on_error; } /* The format should be based on the device's actual format. */ if (((MA_PFN_waveInGetDevCapsA)pDevice->pContext->winmm.waveInGetDevCapsA)(winMMDeviceIDCapture, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MA_FORMAT_NOT_SUPPORTED; goto on_error; } result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf); if (result != MA_SUCCESS) { errorMsg = "[WinMM] Could not find appropriate format for internal device.", errorCode = result; goto on_error; } resultMM = ((MA_PFN_waveInOpen)pDevice->pContext->winmm.waveInOpen)((MA_HWAVEIN*)&pDevice->winmm.hDeviceCapture, winMMDeviceIDCapture, &wf, (DWORD_PTR)pDevice->winmm.hEventCapture, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC); if (resultMM != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to open capture device.", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE; goto on_error; } pDescriptorCapture->format = ma_format_from_WAVEFORMATEX(&wf); pDescriptorCapture->channels = wf.nChannels; pDescriptorCapture->sampleRate = wf.nSamplesPerSec; ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); pDescriptorCapture->periodCount = pDescriptorCapture->periodCount; pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { MA_WAVEOUTCAPSA caps; MA_WAVEFORMATEX wf; MA_MMRESULT resultMM; /* We use an event to know when a new fragment needs to be enqueued. */ pDevice->winmm.hEventPlayback = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL); if (pDevice->winmm.hEventPlayback == NULL) { errorMsg = "[WinMM] Failed to create event for fragment enqueuing for the playback device.", errorCode = ma_result_from_GetLastError(GetLastError()); goto on_error; } /* The format should be based on the device's actual format. */ if (((MA_PFN_waveOutGetDevCapsA)pDevice->pContext->winmm.waveOutGetDevCapsA)(winMMDeviceIDPlayback, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MA_FORMAT_NOT_SUPPORTED; goto on_error; } result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf); if (result != MA_SUCCESS) { errorMsg = "[WinMM] Could not find appropriate format for internal device.", errorCode = result; goto on_error; } resultMM = ((MA_PFN_waveOutOpen)pDevice->pContext->winmm.waveOutOpen)((MA_HWAVEOUT*)&pDevice->winmm.hDevicePlayback, winMMDeviceIDPlayback, &wf, (DWORD_PTR)pDevice->winmm.hEventPlayback, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC); if (resultMM != MA_MMSYSERR_NOERROR) { errorMsg = "[WinMM] Failed to open playback device.", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE; goto on_error; } pDescriptorPlayback->format = ma_format_from_WAVEFORMATEX(&wf); pDescriptorPlayback->channels = wf.nChannels; pDescriptorPlayback->sampleRate = wf.nSamplesPerSec; ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); pDescriptorPlayback->periodCount = pDescriptorPlayback->periodCount; pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); } /* The heap allocated data is allocated like so: [Capture WAVEHDRs][Playback WAVEHDRs][Capture Intermediary Buffer][Playback Intermediary Buffer] */ heapSize = 0; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { heapSize += sizeof(MA_WAVEHDR)*pDescriptorCapture->periodCount + (pDescriptorCapture->periodSizeInFrames * pDescriptorCapture->periodCount * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels)); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { heapSize += sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount + (pDescriptorPlayback->periodSizeInFrames * pDescriptorPlayback->periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels)); } pDevice->winmm._pHeapData = (ma_uint8*)ma_calloc(heapSize, &pDevice->pContext->allocationCallbacks); if (pDevice->winmm._pHeapData == NULL) { errorMsg = "[WinMM] Failed to allocate memory for the intermediary buffer.", errorCode = MA_OUT_OF_MEMORY; goto on_error; } MA_ZERO_MEMORY(pDevice->winmm._pHeapData, heapSize); if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPeriod; if (pConfig->deviceType == ma_device_type_capture) { pDevice->winmm.pWAVEHDRCapture = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount)); } else { pDevice->winmm.pWAVEHDRCapture = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount)); } /* Prepare headers. */ for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) { ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->format, pDescriptorCapture->channels); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].lpData = (char*)(pDevice->winmm.pIntermediaryBufferCapture + (periodSizeInBytes*iPeriod)); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwBufferLength = periodSizeInBytes; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwFlags = 0L; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwLoops = 0L; ((MA_PFN_waveInPrepareHeader)pDevice->pContext->winmm.waveInPrepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); /* The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named "isLocked". A value of 0 means it's unlocked and available for writing. A value of 1 means it's locked. */ ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwUser = 0; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPeriod; if (pConfig->deviceType == ma_device_type_playback) { pDevice->winmm.pWAVEHDRPlayback = pDevice->winmm._pHeapData; pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount); } else { pDevice->winmm.pWAVEHDRPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount)); pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount)) + (pDescriptorCapture->periodSizeInFrames*pDescriptorCapture->periodCount*ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels)); } /* Prepare headers. */ for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) { ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->format, pDescriptorPlayback->channels); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].lpData = (char*)(pDevice->winmm.pIntermediaryBufferPlayback + (periodSizeInBytes*iPeriod)); ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwBufferLength = periodSizeInBytes; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwFlags = 0L; ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwLoops = 0L; ((MA_PFN_waveOutPrepareHeader)pDevice->pContext->winmm.waveOutPrepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR)); /* The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named "isLocked". A value of 0 means it's unlocked and available for writing. A value of 1 means it's locked. */ ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwUser = 0; } } return MA_SUCCESS; on_error: if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.pWAVEHDRCapture != NULL) { ma_uint32 iPeriod; for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) { ((MA_PFN_waveInUnprepareHeader)pDevice->pContext->winmm.waveInUnprepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); } } ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.pWAVEHDRCapture != NULL) { ma_uint32 iPeriod; for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) { ((MA_PFN_waveOutUnprepareHeader)pDevice->pContext->winmm.waveOutUnprepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR)); } } ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); } ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks); if (errorMsg != NULL && errorMsg[0] != '\0') { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "%s", errorMsg); } return errorCode; } static ma_result ma_device_start__winmm(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { MA_MMRESULT resultMM; MA_WAVEHDR* pWAVEHDR; ma_uint32 iPeriod; pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture; /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventCapture); /* To start the device we attach all of the buffers and then start it. As the buffers are filled with data we will get notifications. */ for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) { resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] Failed to attach input buffers to capture device in preparation for capture."); return ma_result_from_MMRESULT(resultMM); } /* Make sure all of the buffers start out locked. We don't want to access them until the backend tells us we can. */ pWAVEHDR[iPeriod].dwUser = 1; /* 1 = locked. */ } /* Capture devices need to be explicitly started, unlike playback devices. */ resultMM = ((MA_PFN_waveInStart)pDevice->pContext->winmm.waveInStart)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] Failed to start backend device."); return ma_result_from_MMRESULT(resultMM); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* Don't need to do anything for playback. It'll be started automatically in ma_device_start__winmm(). */ } return MA_SUCCESS; } static ma_result ma_device_stop__winmm(ma_device* pDevice) { MA_MMRESULT resultMM; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->winmm.hDeviceCapture == NULL) { return MA_INVALID_ARGS; } resultMM = ((MA_PFN_waveInReset)pDevice->pContext->winmm.waveInReset)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WinMM] WARNING: Failed to reset capture device."); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_uint32 iPeriod; MA_WAVEHDR* pWAVEHDR; if (pDevice->winmm.hDevicePlayback == NULL) { return MA_INVALID_ARGS; } /* We need to drain the device. To do this we just loop over each header and if it's locked just wait for the event. */ pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback; for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; iPeriod += 1) { if (pWAVEHDR[iPeriod].dwUser == 1) { /* 1 = locked. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) { break; /* An error occurred so just abandon ship and stop the device without draining. */ } pWAVEHDR[iPeriod].dwUser = 0; } } resultMM = ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback); if (resultMM != MA_MMSYSERR_NOERROR) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[WinMM] WARNING: Failed to reset playback device."); } } return MA_SUCCESS; } static ma_result ma_device_write__winmm(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_result result = MA_SUCCESS; MA_MMRESULT resultMM; ma_uint32 totalFramesWritten; MA_WAVEHDR* pWAVEHDR; MA_ASSERT(pDevice != NULL); MA_ASSERT(pPCMFrames != NULL); if (pFramesWritten != NULL) { *pFramesWritten = 0; } pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback; /* Keep processing as much data as possible. */ totalFramesWritten = 0; while (totalFramesWritten < frameCount) { /* If the current header has some space available we need to write part of it. */ if (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser == 0) { /* 0 = unlocked. */ /* This header has room in it. We copy as much of it as we can. If we end up fully consuming the buffer we need to write it out and move on to the next iteration. */ ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedPlayback; ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesWritten)); const void* pSrc = ma_offset_ptr(pPCMFrames, totalFramesWritten*bpf); void* pDst = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].lpData, pDevice->winmm.headerFramesConsumedPlayback*bpf); MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf); pDevice->winmm.headerFramesConsumedPlayback += framesToCopy; totalFramesWritten += framesToCopy; /* If we've consumed the buffer entirely we need to write it out to the device. */ if (pDevice->winmm.headerFramesConsumedPlayback == (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf)) { pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 1; /* 1 = locked. */ pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */ /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventPlayback); /* The device will be started here. */ resultMM = ((MA_PFN_waveOutWrite)pDevice->pContext->winmm.waveOutWrite)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &pWAVEHDR[pDevice->winmm.iNextHeaderPlayback], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { result = ma_result_from_MMRESULT(resultMM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] waveOutWrite() failed."); break; } /* Make sure we move to the next header. */ pDevice->winmm.iNextHeaderPlayback = (pDevice->winmm.iNextHeaderPlayback + 1) % pDevice->playback.internalPeriods; pDevice->winmm.headerFramesConsumedPlayback = 0; } /* If at this point we have consumed the entire input buffer we can return. */ MA_ASSERT(totalFramesWritten <= frameCount); if (totalFramesWritten == frameCount) { break; } /* Getting here means there's more to process. */ continue; } /* Getting here means there isn't enough room in the buffer and we need to wait for one to become available. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) { result = MA_ERROR; break; } /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */ if ((pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags & MA_WHDR_DONE) != 0) { pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 0; /* 0 = unlocked (make it available for writing). */ pDevice->winmm.headerFramesConsumedPlayback = 0; } /* If the device has been stopped we need to break. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { break; } } if (pFramesWritten != NULL) { *pFramesWritten = totalFramesWritten; } return result; } static ma_result ma_device_read__winmm(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_result result = MA_SUCCESS; MA_MMRESULT resultMM; ma_uint32 totalFramesRead; MA_WAVEHDR* pWAVEHDR; MA_ASSERT(pDevice != NULL); MA_ASSERT(pPCMFrames != NULL); if (pFramesRead != NULL) { *pFramesRead = 0; } pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture; /* Keep processing as much data as possible. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { /* If the current header has some space available we need to write part of it. */ if (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser == 0) { /* 0 = unlocked. */ /* The buffer is available for reading. If we fully consume it we need to add it back to the buffer. */ ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedCapture; ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesRead)); const void* pSrc = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderCapture].lpData, pDevice->winmm.headerFramesConsumedCapture*bpf); void* pDst = ma_offset_ptr(pPCMFrames, totalFramesRead*bpf); MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf); pDevice->winmm.headerFramesConsumedCapture += framesToCopy; totalFramesRead += framesToCopy; /* If we've consumed the buffer entirely we need to add it back to the device. */ if (pDevice->winmm.headerFramesConsumedCapture == (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf)) { pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 1; /* 1 = locked. */ pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */ /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */ ResetEvent((HANDLE)pDevice->winmm.hEventCapture); /* The device will be started here. */ resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[pDevice->winmm.iNextHeaderCapture], sizeof(MA_WAVEHDR)); if (resultMM != MA_MMSYSERR_NOERROR) { result = ma_result_from_MMRESULT(resultMM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WinMM] waveInAddBuffer() failed."); break; } /* Make sure we move to the next header. */ pDevice->winmm.iNextHeaderCapture = (pDevice->winmm.iNextHeaderCapture + 1) % pDevice->capture.internalPeriods; pDevice->winmm.headerFramesConsumedCapture = 0; } /* If at this point we have filled the entire input buffer we can return. */ MA_ASSERT(totalFramesRead <= frameCount); if (totalFramesRead == frameCount) { break; } /* Getting here means there's more to process. */ continue; } /* Getting here means there isn't enough any data left to send to the client which means we need to wait for more. */ if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventCapture, INFINITE) != WAIT_OBJECT_0) { result = MA_ERROR; break; } /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */ if ((pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags & MA_WHDR_DONE) != 0) { pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 0; /* 0 = unlocked (make it available for reading). */ pDevice->winmm.headerFramesConsumedCapture = 0; } /* If the device has been stopped we need to break. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { break; } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } static ma_result ma_context_uninit__winmm(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_winmm); ma_dlclose(ma_context_get_log(pContext), pContext->winmm.hWinMM); return MA_SUCCESS; } static ma_result ma_context_init__winmm(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pContext->winmm.hWinMM = ma_dlopen(ma_context_get_log(pContext), "winmm.dll"); if (pContext->winmm.hWinMM == NULL) { return MA_NO_BACKEND; } pContext->winmm.waveOutGetNumDevs = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutGetNumDevs"); pContext->winmm.waveOutGetDevCapsA = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutGetDevCapsA"); pContext->winmm.waveOutOpen = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutOpen"); pContext->winmm.waveOutClose = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutClose"); pContext->winmm.waveOutPrepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutPrepareHeader"); pContext->winmm.waveOutUnprepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutUnprepareHeader"); pContext->winmm.waveOutWrite = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutWrite"); pContext->winmm.waveOutReset = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveOutReset"); pContext->winmm.waveInGetNumDevs = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInGetNumDevs"); pContext->winmm.waveInGetDevCapsA = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInGetDevCapsA"); pContext->winmm.waveInOpen = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInOpen"); pContext->winmm.waveInClose = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInClose"); pContext->winmm.waveInPrepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInPrepareHeader"); pContext->winmm.waveInUnprepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInUnprepareHeader"); pContext->winmm.waveInAddBuffer = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInAddBuffer"); pContext->winmm.waveInStart = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInStart"); pContext->winmm.waveInReset = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, "waveInReset"); pCallbacks->onContextInit = ma_context_init__winmm; pCallbacks->onContextUninit = ma_context_uninit__winmm; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__winmm; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__winmm; pCallbacks->onDeviceInit = ma_device_init__winmm; pCallbacks->onDeviceUninit = ma_device_uninit__winmm; pCallbacks->onDeviceStart = ma_device_start__winmm; pCallbacks->onDeviceStop = ma_device_stop__winmm; pCallbacks->onDeviceRead = ma_device_read__winmm; pCallbacks->onDeviceWrite = ma_device_write__winmm; pCallbacks->onDeviceDataLoop = NULL; /* This is a blocking read-write API, so this can be NULL since miniaudio will manage the audio thread for us. */ return MA_SUCCESS; } #endif /****************************************************************************** ALSA Backend ******************************************************************************/ #ifdef MA_HAS_ALSA #include /* poll(), struct pollfd */ #include /* eventfd() */ #ifdef MA_NO_RUNTIME_LINKING /* asoundlib.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ #if !defined(__cplusplus) #if defined(__STRICT_ANSI__) #if !defined(inline) #define inline __inline__ __attribute__((always_inline)) #define MA_INLINE_DEFINED #endif #endif #endif #include #if defined(MA_INLINE_DEFINED) #undef inline #undef MA_INLINE_DEFINED #endif typedef snd_pcm_uframes_t ma_snd_pcm_uframes_t; typedef snd_pcm_sframes_t ma_snd_pcm_sframes_t; typedef snd_pcm_stream_t ma_snd_pcm_stream_t; typedef snd_pcm_format_t ma_snd_pcm_format_t; typedef snd_pcm_access_t ma_snd_pcm_access_t; typedef snd_pcm_t ma_snd_pcm_t; typedef snd_pcm_hw_params_t ma_snd_pcm_hw_params_t; typedef snd_pcm_sw_params_t ma_snd_pcm_sw_params_t; typedef snd_pcm_format_mask_t ma_snd_pcm_format_mask_t; typedef snd_pcm_info_t ma_snd_pcm_info_t; typedef snd_pcm_channel_area_t ma_snd_pcm_channel_area_t; typedef snd_pcm_chmap_t ma_snd_pcm_chmap_t; typedef snd_pcm_state_t ma_snd_pcm_state_t; /* snd_pcm_stream_t */ #define MA_SND_PCM_STREAM_PLAYBACK SND_PCM_STREAM_PLAYBACK #define MA_SND_PCM_STREAM_CAPTURE SND_PCM_STREAM_CAPTURE /* snd_pcm_format_t */ #define MA_SND_PCM_FORMAT_UNKNOWN SND_PCM_FORMAT_UNKNOWN #define MA_SND_PCM_FORMAT_U8 SND_PCM_FORMAT_U8 #define MA_SND_PCM_FORMAT_S16_LE SND_PCM_FORMAT_S16_LE #define MA_SND_PCM_FORMAT_S16_BE SND_PCM_FORMAT_S16_BE #define MA_SND_PCM_FORMAT_S24_LE SND_PCM_FORMAT_S24_LE #define MA_SND_PCM_FORMAT_S24_BE SND_PCM_FORMAT_S24_BE #define MA_SND_PCM_FORMAT_S32_LE SND_PCM_FORMAT_S32_LE #define MA_SND_PCM_FORMAT_S32_BE SND_PCM_FORMAT_S32_BE #define MA_SND_PCM_FORMAT_FLOAT_LE SND_PCM_FORMAT_FLOAT_LE #define MA_SND_PCM_FORMAT_FLOAT_BE SND_PCM_FORMAT_FLOAT_BE #define MA_SND_PCM_FORMAT_FLOAT64_LE SND_PCM_FORMAT_FLOAT64_LE #define MA_SND_PCM_FORMAT_FLOAT64_BE SND_PCM_FORMAT_FLOAT64_BE #define MA_SND_PCM_FORMAT_MU_LAW SND_PCM_FORMAT_MU_LAW #define MA_SND_PCM_FORMAT_A_LAW SND_PCM_FORMAT_A_LAW #define MA_SND_PCM_FORMAT_S24_3LE SND_PCM_FORMAT_S24_3LE #define MA_SND_PCM_FORMAT_S24_3BE SND_PCM_FORMAT_S24_3BE /* ma_snd_pcm_access_t */ #define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED SND_PCM_ACCESS_MMAP_INTERLEAVED #define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED SND_PCM_ACCESS_MMAP_NONINTERLEAVED #define MA_SND_PCM_ACCESS_MMAP_COMPLEX SND_PCM_ACCESS_MMAP_COMPLEX #define MA_SND_PCM_ACCESS_RW_INTERLEAVED SND_PCM_ACCESS_RW_INTERLEAVED #define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED SND_PCM_ACCESS_RW_NONINTERLEAVED /* Channel positions. */ #define MA_SND_CHMAP_UNKNOWN SND_CHMAP_UNKNOWN #define MA_SND_CHMAP_NA SND_CHMAP_NA #define MA_SND_CHMAP_MONO SND_CHMAP_MONO #define MA_SND_CHMAP_FL SND_CHMAP_FL #define MA_SND_CHMAP_FR SND_CHMAP_FR #define MA_SND_CHMAP_RL SND_CHMAP_RL #define MA_SND_CHMAP_RR SND_CHMAP_RR #define MA_SND_CHMAP_FC SND_CHMAP_FC #define MA_SND_CHMAP_LFE SND_CHMAP_LFE #define MA_SND_CHMAP_SL SND_CHMAP_SL #define MA_SND_CHMAP_SR SND_CHMAP_SR #define MA_SND_CHMAP_RC SND_CHMAP_RC #define MA_SND_CHMAP_FLC SND_CHMAP_FLC #define MA_SND_CHMAP_FRC SND_CHMAP_FRC #define MA_SND_CHMAP_RLC SND_CHMAP_RLC #define MA_SND_CHMAP_RRC SND_CHMAP_RRC #define MA_SND_CHMAP_FLW SND_CHMAP_FLW #define MA_SND_CHMAP_FRW SND_CHMAP_FRW #define MA_SND_CHMAP_FLH SND_CHMAP_FLH #define MA_SND_CHMAP_FCH SND_CHMAP_FCH #define MA_SND_CHMAP_FRH SND_CHMAP_FRH #define MA_SND_CHMAP_TC SND_CHMAP_TC #define MA_SND_CHMAP_TFL SND_CHMAP_TFL #define MA_SND_CHMAP_TFR SND_CHMAP_TFR #define MA_SND_CHMAP_TFC SND_CHMAP_TFC #define MA_SND_CHMAP_TRL SND_CHMAP_TRL #define MA_SND_CHMAP_TRR SND_CHMAP_TRR #define MA_SND_CHMAP_TRC SND_CHMAP_TRC #define MA_SND_CHMAP_TFLC SND_CHMAP_TFLC #define MA_SND_CHMAP_TFRC SND_CHMAP_TFRC #define MA_SND_CHMAP_TSL SND_CHMAP_TSL #define MA_SND_CHMAP_TSR SND_CHMAP_TSR #define MA_SND_CHMAP_LLFE SND_CHMAP_LLFE #define MA_SND_CHMAP_RLFE SND_CHMAP_RLFE #define MA_SND_CHMAP_BC SND_CHMAP_BC #define MA_SND_CHMAP_BLC SND_CHMAP_BLC #define MA_SND_CHMAP_BRC SND_CHMAP_BRC /* Open mode flags. */ #define MA_SND_PCM_NO_AUTO_RESAMPLE SND_PCM_NO_AUTO_RESAMPLE #define MA_SND_PCM_NO_AUTO_CHANNELS SND_PCM_NO_AUTO_CHANNELS #define MA_SND_PCM_NO_AUTO_FORMAT SND_PCM_NO_AUTO_FORMAT #else #include /* For EPIPE, etc. */ typedef unsigned long ma_snd_pcm_uframes_t; typedef long ma_snd_pcm_sframes_t; typedef int ma_snd_pcm_stream_t; typedef int ma_snd_pcm_format_t; typedef int ma_snd_pcm_access_t; typedef int ma_snd_pcm_state_t; typedef struct ma_snd_pcm_t ma_snd_pcm_t; typedef struct ma_snd_pcm_hw_params_t ma_snd_pcm_hw_params_t; typedef struct ma_snd_pcm_sw_params_t ma_snd_pcm_sw_params_t; typedef struct ma_snd_pcm_format_mask_t ma_snd_pcm_format_mask_t; typedef struct ma_snd_pcm_info_t ma_snd_pcm_info_t; typedef struct { void* addr; unsigned int first; unsigned int step; } ma_snd_pcm_channel_area_t; typedef struct { unsigned int channels; unsigned int pos[1]; } ma_snd_pcm_chmap_t; /* snd_pcm_state_t */ #define MA_SND_PCM_STATE_OPEN 0 #define MA_SND_PCM_STATE_SETUP 1 #define MA_SND_PCM_STATE_PREPARED 2 #define MA_SND_PCM_STATE_RUNNING 3 #define MA_SND_PCM_STATE_XRUN 4 #define MA_SND_PCM_STATE_DRAINING 5 #define MA_SND_PCM_STATE_PAUSED 6 #define MA_SND_PCM_STATE_SUSPENDED 7 #define MA_SND_PCM_STATE_DISCONNECTED 8 /* snd_pcm_stream_t */ #define MA_SND_PCM_STREAM_PLAYBACK 0 #define MA_SND_PCM_STREAM_CAPTURE 1 /* snd_pcm_format_t */ #define MA_SND_PCM_FORMAT_UNKNOWN -1 #define MA_SND_PCM_FORMAT_U8 1 #define MA_SND_PCM_FORMAT_S16_LE 2 #define MA_SND_PCM_FORMAT_S16_BE 3 #define MA_SND_PCM_FORMAT_S24_LE 6 #define MA_SND_PCM_FORMAT_S24_BE 7 #define MA_SND_PCM_FORMAT_S32_LE 10 #define MA_SND_PCM_FORMAT_S32_BE 11 #define MA_SND_PCM_FORMAT_FLOAT_LE 14 #define MA_SND_PCM_FORMAT_FLOAT_BE 15 #define MA_SND_PCM_FORMAT_FLOAT64_LE 16 #define MA_SND_PCM_FORMAT_FLOAT64_BE 17 #define MA_SND_PCM_FORMAT_MU_LAW 20 #define MA_SND_PCM_FORMAT_A_LAW 21 #define MA_SND_PCM_FORMAT_S24_3LE 32 #define MA_SND_PCM_FORMAT_S24_3BE 33 /* snd_pcm_access_t */ #define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED 0 #define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED 1 #define MA_SND_PCM_ACCESS_MMAP_COMPLEX 2 #define MA_SND_PCM_ACCESS_RW_INTERLEAVED 3 #define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED 4 /* Channel positions. */ #define MA_SND_CHMAP_UNKNOWN 0 #define MA_SND_CHMAP_NA 1 #define MA_SND_CHMAP_MONO 2 #define MA_SND_CHMAP_FL 3 #define MA_SND_CHMAP_FR 4 #define MA_SND_CHMAP_RL 5 #define MA_SND_CHMAP_RR 6 #define MA_SND_CHMAP_FC 7 #define MA_SND_CHMAP_LFE 8 #define MA_SND_CHMAP_SL 9 #define MA_SND_CHMAP_SR 10 #define MA_SND_CHMAP_RC 11 #define MA_SND_CHMAP_FLC 12 #define MA_SND_CHMAP_FRC 13 #define MA_SND_CHMAP_RLC 14 #define MA_SND_CHMAP_RRC 15 #define MA_SND_CHMAP_FLW 16 #define MA_SND_CHMAP_FRW 17 #define MA_SND_CHMAP_FLH 18 #define MA_SND_CHMAP_FCH 19 #define MA_SND_CHMAP_FRH 20 #define MA_SND_CHMAP_TC 21 #define MA_SND_CHMAP_TFL 22 #define MA_SND_CHMAP_TFR 23 #define MA_SND_CHMAP_TFC 24 #define MA_SND_CHMAP_TRL 25 #define MA_SND_CHMAP_TRR 26 #define MA_SND_CHMAP_TRC 27 #define MA_SND_CHMAP_TFLC 28 #define MA_SND_CHMAP_TFRC 29 #define MA_SND_CHMAP_TSL 30 #define MA_SND_CHMAP_TSR 31 #define MA_SND_CHMAP_LLFE 32 #define MA_SND_CHMAP_RLFE 33 #define MA_SND_CHMAP_BC 34 #define MA_SND_CHMAP_BLC 35 #define MA_SND_CHMAP_BRC 36 /* Open mode flags. */ #define MA_SND_PCM_NO_AUTO_RESAMPLE 0x00010000 #define MA_SND_PCM_NO_AUTO_CHANNELS 0x00020000 #define MA_SND_PCM_NO_AUTO_FORMAT 0x00040000 #endif typedef int (* ma_snd_pcm_open_proc) (ma_snd_pcm_t **pcm, const char *name, ma_snd_pcm_stream_t stream, int mode); typedef int (* ma_snd_pcm_close_proc) (ma_snd_pcm_t *pcm); typedef size_t (* ma_snd_pcm_hw_params_sizeof_proc) (void); typedef int (* ma_snd_pcm_hw_params_any_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params); typedef int (* ma_snd_pcm_hw_params_set_format_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val); typedef int (* ma_snd_pcm_hw_params_set_format_first_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format); typedef void (* ma_snd_pcm_hw_params_get_format_mask_proc) (ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_mask_t *mask); typedef int (* ma_snd_pcm_hw_params_set_channels_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_set_channels_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_set_channels_minmax_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *minimum, unsigned int *maximum); typedef int (* ma_snd_pcm_hw_params_set_rate_resample_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_set_rate_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir); typedef int (* ma_snd_pcm_hw_params_set_rate_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_set_buffer_size_near_proc)(ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val); typedef int (* ma_snd_pcm_hw_params_set_periods_near_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_set_access_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t _access); typedef int (* ma_snd_pcm_hw_params_get_format_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format); typedef int (* ma_snd_pcm_hw_params_get_channels_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_channels_min_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_channels_max_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val); typedef int (* ma_snd_pcm_hw_params_get_rate_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_rate_min_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_rate_max_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir); typedef int (* ma_snd_pcm_hw_params_get_buffer_size_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val); typedef int (* ma_snd_pcm_hw_params_get_periods_proc) (const ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir); typedef int (* ma_snd_pcm_hw_params_get_access_proc) (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t *_access); typedef int (* ma_snd_pcm_hw_params_test_format_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val); typedef int (* ma_snd_pcm_hw_params_test_channels_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val); typedef int (* ma_snd_pcm_hw_params_test_rate_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir); typedef int (* ma_snd_pcm_hw_params_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params); typedef size_t (* ma_snd_pcm_sw_params_sizeof_proc) (void); typedef int (* ma_snd_pcm_sw_params_current_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params); typedef int (* ma_snd_pcm_sw_params_get_boundary_proc) (const ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t* val); typedef int (* ma_snd_pcm_sw_params_set_avail_min_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_set_start_threshold_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_set_stop_threshold_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val); typedef int (* ma_snd_pcm_sw_params_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params); typedef size_t (* ma_snd_pcm_format_mask_sizeof_proc) (void); typedef int (* ma_snd_pcm_format_mask_test_proc) (const ma_snd_pcm_format_mask_t *mask, ma_snd_pcm_format_t val); typedef ma_snd_pcm_chmap_t * (* ma_snd_pcm_get_chmap_proc) (ma_snd_pcm_t *pcm); typedef ma_snd_pcm_state_t (* ma_snd_pcm_state_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_prepare_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_start_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_drop_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_drain_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_reset_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_device_name_hint_proc) (int card, const char *iface, void ***hints); typedef char * (* ma_snd_device_name_get_hint_proc) (const void *hint, const char *id); typedef int (* ma_snd_card_get_index_proc) (const char *name); typedef int (* ma_snd_device_name_free_hint_proc) (void **hints); typedef int (* ma_snd_pcm_mmap_begin_proc) (ma_snd_pcm_t *pcm, const ma_snd_pcm_channel_area_t **areas, ma_snd_pcm_uframes_t *offset, ma_snd_pcm_uframes_t *frames); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_mmap_commit_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_uframes_t offset, ma_snd_pcm_uframes_t frames); typedef int (* ma_snd_pcm_recover_proc) (ma_snd_pcm_t *pcm, int err, int silent); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_readi_proc) (ma_snd_pcm_t *pcm, void *buffer, ma_snd_pcm_uframes_t size); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_writei_proc) (ma_snd_pcm_t *pcm, const void *buffer, ma_snd_pcm_uframes_t size); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_proc) (ma_snd_pcm_t *pcm); typedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_update_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_wait_proc) (ma_snd_pcm_t *pcm, int timeout); typedef int (* ma_snd_pcm_nonblock_proc) (ma_snd_pcm_t *pcm, int nonblock); typedef int (* ma_snd_pcm_info_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_info_t* info); typedef size_t (* ma_snd_pcm_info_sizeof_proc) (void); typedef const char* (* ma_snd_pcm_info_get_name_proc) (const ma_snd_pcm_info_t* info); typedef int (* ma_snd_pcm_poll_descriptors_proc) (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space); typedef int (* ma_snd_pcm_poll_descriptors_count_proc) (ma_snd_pcm_t *pcm); typedef int (* ma_snd_pcm_poll_descriptors_revents_proc) (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); typedef int (* ma_snd_config_update_free_global_proc) (void); /* This array specifies each of the common devices that can be used for both playback and capture. */ static const char* g_maCommonDeviceNamesALSA[] = { "default", "null", "pulse", "jack" }; /* This array allows us to blacklist specific playback devices. */ static const char* g_maBlacklistedPlaybackDeviceNamesALSA[] = { "" }; /* This array allows us to blacklist specific capture devices. */ static const char* g_maBlacklistedCaptureDeviceNamesALSA[] = { "" }; static ma_snd_pcm_format_t ma_convert_ma_format_to_alsa_format(ma_format format) { ma_snd_pcm_format_t ALSAFormats[] = { MA_SND_PCM_FORMAT_UNKNOWN, /* ma_format_unknown */ MA_SND_PCM_FORMAT_U8, /* ma_format_u8 */ MA_SND_PCM_FORMAT_S16_LE, /* ma_format_s16 */ MA_SND_PCM_FORMAT_S24_3LE, /* ma_format_s24 */ MA_SND_PCM_FORMAT_S32_LE, /* ma_format_s32 */ MA_SND_PCM_FORMAT_FLOAT_LE /* ma_format_f32 */ }; if (ma_is_big_endian()) { ALSAFormats[0] = MA_SND_PCM_FORMAT_UNKNOWN; ALSAFormats[1] = MA_SND_PCM_FORMAT_U8; ALSAFormats[2] = MA_SND_PCM_FORMAT_S16_BE; ALSAFormats[3] = MA_SND_PCM_FORMAT_S24_3BE; ALSAFormats[4] = MA_SND_PCM_FORMAT_S32_BE; ALSAFormats[5] = MA_SND_PCM_FORMAT_FLOAT_BE; } return ALSAFormats[format]; } static ma_format ma_format_from_alsa(ma_snd_pcm_format_t formatALSA) { if (ma_is_little_endian()) { switch (formatALSA) { case MA_SND_PCM_FORMAT_S16_LE: return ma_format_s16; case MA_SND_PCM_FORMAT_S24_3LE: return ma_format_s24; case MA_SND_PCM_FORMAT_S32_LE: return ma_format_s32; case MA_SND_PCM_FORMAT_FLOAT_LE: return ma_format_f32; default: break; } } else { switch (formatALSA) { case MA_SND_PCM_FORMAT_S16_BE: return ma_format_s16; case MA_SND_PCM_FORMAT_S24_3BE: return ma_format_s24; case MA_SND_PCM_FORMAT_S32_BE: return ma_format_s32; case MA_SND_PCM_FORMAT_FLOAT_BE: return ma_format_f32; default: break; } } /* Endian agnostic. */ switch (formatALSA) { case MA_SND_PCM_FORMAT_U8: return ma_format_u8; default: return ma_format_unknown; } } static ma_channel ma_convert_alsa_channel_position_to_ma_channel(unsigned int alsaChannelPos) { switch (alsaChannelPos) { case MA_SND_CHMAP_MONO: return MA_CHANNEL_MONO; case MA_SND_CHMAP_FL: return MA_CHANNEL_FRONT_LEFT; case MA_SND_CHMAP_FR: return MA_CHANNEL_FRONT_RIGHT; case MA_SND_CHMAP_RL: return MA_CHANNEL_BACK_LEFT; case MA_SND_CHMAP_RR: return MA_CHANNEL_BACK_RIGHT; case MA_SND_CHMAP_FC: return MA_CHANNEL_FRONT_CENTER; case MA_SND_CHMAP_LFE: return MA_CHANNEL_LFE; case MA_SND_CHMAP_SL: return MA_CHANNEL_SIDE_LEFT; case MA_SND_CHMAP_SR: return MA_CHANNEL_SIDE_RIGHT; case MA_SND_CHMAP_RC: return MA_CHANNEL_BACK_CENTER; case MA_SND_CHMAP_FLC: return MA_CHANNEL_FRONT_LEFT_CENTER; case MA_SND_CHMAP_FRC: return MA_CHANNEL_FRONT_RIGHT_CENTER; case MA_SND_CHMAP_RLC: return 0; case MA_SND_CHMAP_RRC: return 0; case MA_SND_CHMAP_FLW: return 0; case MA_SND_CHMAP_FRW: return 0; case MA_SND_CHMAP_FLH: return 0; case MA_SND_CHMAP_FCH: return 0; case MA_SND_CHMAP_FRH: return 0; case MA_SND_CHMAP_TC: return MA_CHANNEL_TOP_CENTER; case MA_SND_CHMAP_TFL: return MA_CHANNEL_TOP_FRONT_LEFT; case MA_SND_CHMAP_TFR: return MA_CHANNEL_TOP_FRONT_RIGHT; case MA_SND_CHMAP_TFC: return MA_CHANNEL_TOP_FRONT_CENTER; case MA_SND_CHMAP_TRL: return MA_CHANNEL_TOP_BACK_LEFT; case MA_SND_CHMAP_TRR: return MA_CHANNEL_TOP_BACK_RIGHT; case MA_SND_CHMAP_TRC: return MA_CHANNEL_TOP_BACK_CENTER; default: break; } return 0; } static ma_bool32 ma_is_common_device_name__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maCommonDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maCommonDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_playback_device_blacklisted__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maBlacklistedPlaybackDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maBlacklistedPlaybackDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_capture_device_blacklisted__alsa(const char* name) { size_t iName; for (iName = 0; iName < ma_countof(g_maBlacklistedCaptureDeviceNamesALSA); ++iName) { if (ma_strcmp(name, g_maBlacklistedCaptureDeviceNamesALSA[iName]) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_is_device_blacklisted__alsa(ma_device_type deviceType, const char* name) { if (deviceType == ma_device_type_playback) { return ma_is_playback_device_blacklisted__alsa(name); } else { return ma_is_capture_device_blacklisted__alsa(name); } } static const char* ma_find_char(const char* str, char c, int* index) { int i = 0; for (;;) { if (str[i] == '\0') { if (index) *index = -1; return NULL; } if (str[i] == c) { if (index) *index = i; return str + i; } i += 1; } /* Should never get here, but treat it as though the character was not found to make me feel better inside. */ if (index) *index = -1; return NULL; } static ma_bool32 ma_is_device_name_in_hw_format__alsa(const char* hwid) { /* This function is just checking whether or not hwid is in "hw:%d,%d" format. */ int commaPos; const char* dev; int i; if (hwid == NULL) { return MA_FALSE; } if (hwid[0] != 'h' || hwid[1] != 'w' || hwid[2] != ':') { return MA_FALSE; } hwid += 3; dev = ma_find_char(hwid, ',', &commaPos); if (dev == NULL) { return MA_FALSE; } else { dev += 1; /* Skip past the ",". */ } /* Check if the part between the ":" and the "," contains only numbers. If not, return false. */ for (i = 0; i < commaPos; ++i) { if (hwid[i] < '0' || hwid[i] > '9') { return MA_FALSE; } } /* Check if everything after the "," is numeric. If not, return false. */ i = 0; while (dev[i] != '\0') { if (dev[i] < '0' || dev[i] > '9') { return MA_FALSE; } i += 1; } return MA_TRUE; } static int ma_convert_device_name_to_hw_format__alsa(ma_context* pContext, char* dst, size_t dstSize, const char* src) /* Returns 0 on success, non-0 on error. */ { /* src should look something like this: "hw:CARD=I82801AAICH,DEV=0" */ int colonPos; int commaPos; char card[256]; const char* dev; int cardIndex; if (dst == NULL) { return -1; } if (dstSize < 7) { return -1; /* Absolute minimum size of the output buffer is 7 bytes. */ } *dst = '\0'; /* Safety. */ if (src == NULL) { return -1; } /* If the input name is already in "hw:%d,%d" format, just return that verbatim. */ if (ma_is_device_name_in_hw_format__alsa(src)) { return ma_strcpy_s(dst, dstSize, src); } src = ma_find_char(src, ':', &colonPos); if (src == NULL) { return -1; /* Couldn't find a colon */ } dev = ma_find_char(src, ',', &commaPos); if (dev == NULL) { dev = "0"; ma_strncpy_s(card, sizeof(card), src+6, (size_t)-1); /* +6 = ":CARD=" */ } else { dev = dev + 5; /* +5 = ",DEV=" */ ma_strncpy_s(card, sizeof(card), src+6, commaPos-6); /* +6 = ":CARD=" */ } cardIndex = ((ma_snd_card_get_index_proc)pContext->alsa.snd_card_get_index)(card); if (cardIndex < 0) { return -2; /* Failed to retrieve the card index. */ } /* Construction. */ dst[0] = 'h'; dst[1] = 'w'; dst[2] = ':'; if (ma_itoa_s(cardIndex, dst+3, dstSize-3, 10) != 0) { return -3; } if (ma_strcat_s(dst, dstSize, ",") != 0) { return -3; } if (ma_strcat_s(dst, dstSize, dev) != 0) { return -3; } return 0; } static ma_bool32 ma_does_id_exist_in_list__alsa(ma_device_id* pUniqueIDs, ma_uint32 count, const char* pHWID) { ma_uint32 i; MA_ASSERT(pHWID != NULL); for (i = 0; i < count; ++i) { if (ma_strcmp(pUniqueIDs[i].alsa, pHWID) == 0) { return MA_TRUE; } } return MA_FALSE; } static ma_result ma_context_open_pcm__alsa(ma_context* pContext, ma_share_mode shareMode, ma_device_type deviceType, const ma_device_id* pDeviceID, int openMode, ma_snd_pcm_t** ppPCM) { ma_snd_pcm_t* pPCM; ma_snd_pcm_stream_t stream; MA_ASSERT(pContext != NULL); MA_ASSERT(ppPCM != NULL); *ppPCM = NULL; pPCM = NULL; stream = (deviceType == ma_device_type_playback) ? MA_SND_PCM_STREAM_PLAYBACK : MA_SND_PCM_STREAM_CAPTURE; if (pDeviceID == NULL) { ma_bool32 isDeviceOpen; size_t i; /* We're opening the default device. I don't know if trying anything other than "default" is necessary, but it makes me feel better to try as hard as we can get to get _something_ working. */ const char* defaultDeviceNames[] = { "default", NULL, NULL, NULL, NULL, NULL, NULL }; if (shareMode == ma_share_mode_exclusive) { defaultDeviceNames[1] = "hw"; defaultDeviceNames[2] = "hw:0"; defaultDeviceNames[3] = "hw:0,0"; } else { if (deviceType == ma_device_type_playback) { defaultDeviceNames[1] = "dmix"; defaultDeviceNames[2] = "dmix:0"; defaultDeviceNames[3] = "dmix:0,0"; } else { defaultDeviceNames[1] = "dsnoop"; defaultDeviceNames[2] = "dsnoop:0"; defaultDeviceNames[3] = "dsnoop:0,0"; } defaultDeviceNames[4] = "hw"; defaultDeviceNames[5] = "hw:0"; defaultDeviceNames[6] = "hw:0,0"; } isDeviceOpen = MA_FALSE; for (i = 0; i < ma_countof(defaultDeviceNames); ++i) { if (defaultDeviceNames[i] != NULL && defaultDeviceNames[i][0] != '\0') { if (((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, defaultDeviceNames[i], stream, openMode) == 0) { isDeviceOpen = MA_TRUE; break; } } } if (!isDeviceOpen) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_open() failed when trying to open an appropriate default device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } else { /* We're trying to open a specific device. There's a few things to consider here: miniaudio recognizes a special format of device id that excludes the "hw", "dmix", etc. prefix. It looks like this: ":0,0", ":0,1", etc. When an ID of this format is specified, it indicates to miniaudio that it can try different combinations of plugins ("hw", "dmix", etc.) until it finds an appropriate one that works. This comes in very handy when trying to open a device in shared mode ("dmix"), vs exclusive mode ("hw"). */ /* May end up needing to make small adjustments to the ID, so make a copy. */ ma_device_id deviceID = *pDeviceID; int resultALSA = -ENODEV; if (deviceID.alsa[0] != ':') { /* The ID is not in ":0,0" format. Use the ID exactly as-is. */ resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, deviceID.alsa, stream, openMode); } else { char hwid[256]; /* The ID is in ":0,0" format. Try different plugins depending on the shared mode. */ if (deviceID.alsa[1] == '\0') { deviceID.alsa[0] = '\0'; /* An ID of ":" should be converted to "". */ } if (shareMode == ma_share_mode_shared) { if (deviceType == ma_device_type_playback) { ma_strcpy_s(hwid, sizeof(hwid), "dmix"); } else { ma_strcpy_s(hwid, sizeof(hwid), "dsnoop"); } if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) { resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode); } } /* If at this point we still don't have an open device it means we're either preferencing exclusive mode or opening with "dmix"/"dsnoop" failed. */ if (resultALSA != 0) { ma_strcpy_s(hwid, sizeof(hwid), "hw"); if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) { resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode); } } } if (resultALSA < 0) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_open() failed."); return ma_result_from_errno(-resultALSA); } } *ppPCM = pPCM; return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__alsa(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { int resultALSA; ma_bool32 cbResult = MA_TRUE; char** ppDeviceHints; ma_device_id* pUniqueIDs = NULL; ma_uint32 uniqueIDCount = 0; char** ppNextDeviceHint; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); ma_mutex_lock(&pContext->alsa.internalDeviceEnumLock); resultALSA = ((ma_snd_device_name_hint_proc)pContext->alsa.snd_device_name_hint)(-1, "pcm", (void***)&ppDeviceHints); if (resultALSA < 0) { ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock); return ma_result_from_errno(-resultALSA); } ppNextDeviceHint = ppDeviceHints; while (*ppNextDeviceHint != NULL) { char* NAME = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "NAME"); char* DESC = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "DESC"); char* IOID = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "IOID"); ma_device_type deviceType = ma_device_type_playback; ma_bool32 stopEnumeration = MA_FALSE; char hwid[sizeof(pUniqueIDs->alsa)]; ma_device_info deviceInfo; if ((IOID == NULL || ma_strcmp(IOID, "Output") == 0)) { deviceType = ma_device_type_playback; } if ((IOID != NULL && ma_strcmp(IOID, "Input" ) == 0)) { deviceType = ma_device_type_capture; } if (NAME != NULL) { if (pContext->alsa.useVerboseDeviceEnumeration) { /* Verbose mode. Use the name exactly as-is. */ ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1); } else { /* Simplified mode. Use ":%d,%d" format. */ if (ma_convert_device_name_to_hw_format__alsa(pContext, hwid, sizeof(hwid), NAME) == 0) { /* At this point, hwid looks like "hw:0,0". In simplified enumeration mode, we actually want to strip off the plugin name so it looks like ":0,0". The reason for this is that this special format is detected at device initialization time and is used as an indicator to try to use the most appropriate plugin depending on the device type and sharing mode. */ char* dst = hwid; char* src = hwid+2; while ((*dst++ = *src++)); } else { /* Conversion to "hw:%d,%d" failed. Just use the name as-is. */ ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1); } if (ma_does_id_exist_in_list__alsa(pUniqueIDs, uniqueIDCount, hwid)) { goto next_device; /* The device has already been enumerated. Move on to the next one. */ } else { /* The device has not yet been enumerated. Make sure it's added to our list so that it's not enumerated again. */ size_t newCapacity = sizeof(*pUniqueIDs) * (uniqueIDCount + 1); ma_device_id* pNewUniqueIDs = (ma_device_id*)ma_realloc(pUniqueIDs, newCapacity, &pContext->allocationCallbacks); if (pNewUniqueIDs == NULL) { goto next_device; /* Failed to allocate memory. */ } pUniqueIDs = pNewUniqueIDs; MA_COPY_MEMORY(pUniqueIDs[uniqueIDCount].alsa, hwid, sizeof(hwid)); uniqueIDCount += 1; } } } else { MA_ZERO_MEMORY(hwid, sizeof(hwid)); } MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.id.alsa, sizeof(deviceInfo.id.alsa), hwid, (size_t)-1); /* There's no good way to determine whether or not a device is the default on Linux. We're just going to do something simple and just use the name of "default" as the indicator. */ if (ma_strcmp(deviceInfo.id.alsa, "default") == 0) { deviceInfo.isDefault = MA_TRUE; } /* DESC is the friendly name. We treat this slightly differently depending on whether or not we are using verbose device enumeration. In verbose mode we want to take the entire description so that the end-user can distinguish between the subdevices of each card/dev pair. In simplified mode, however, we only want the first part of the description. The value in DESC seems to be split into two lines, with the first line being the name of the device and the second line being a description of the device. I don't like having the description be across two lines because it makes formatting ugly and annoying. I'm therefore deciding to put it all on a single line with the second line being put into parentheses. In simplified mode I'm just stripping the second line entirely. */ if (DESC != NULL) { int lfPos; const char* line2 = ma_find_char(DESC, '\n', &lfPos); if (line2 != NULL) { line2 += 1; /* Skip past the new-line character. */ if (pContext->alsa.useVerboseDeviceEnumeration) { /* Verbose mode. Put the second line in brackets. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), " ("); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), line2); ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), ")"); } else { /* Simplified mode. Strip the second line entirely. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos); } } else { /* There's no second line. Just copy the whole description. */ ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, (size_t)-1); } } if (!ma_is_device_blacklisted__alsa(deviceType, NAME)) { cbResult = callback(pContext, deviceType, &deviceInfo, pUserData); } /* Some devices are both playback and capture, but they are only enumerated by ALSA once. We need to fire the callback again for the other device type in this case. We do this for known devices and where the IOID hint is NULL, which means both Input and Output. */ if (cbResult) { if (ma_is_common_device_name__alsa(NAME) || IOID == NULL) { if (deviceType == ma_device_type_playback) { if (!ma_is_capture_device_blacklisted__alsa(NAME)) { cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } else { if (!ma_is_playback_device_blacklisted__alsa(NAME)) { cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } } } } if (cbResult == MA_FALSE) { stopEnumeration = MA_TRUE; } next_device: free(NAME); free(DESC); free(IOID); ppNextDeviceHint += 1; /* We need to stop enumeration if the callback returned false. */ if (stopEnumeration) { break; } } ma_free(pUniqueIDs, &pContext->allocationCallbacks); ((ma_snd_device_name_free_hint_proc)pContext->alsa.snd_device_name_free_hint)((void**)ppDeviceHints); ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock); return MA_SUCCESS; } typedef struct { ma_device_type deviceType; const ma_device_id* pDeviceID; ma_share_mode shareMode; ma_device_info* pDeviceInfo; ma_bool32 foundDevice; } ma_context_get_device_info_enum_callback_data__alsa; static ma_bool32 ma_context_get_device_info_enum_callback__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pDeviceInfo, void* pUserData) { ma_context_get_device_info_enum_callback_data__alsa* pData = (ma_context_get_device_info_enum_callback_data__alsa*)pUserData; MA_ASSERT(pData != NULL); (void)pContext; if (pData->pDeviceID == NULL && ma_strcmp(pDeviceInfo->id.alsa, "default") == 0) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1); pData->foundDevice = MA_TRUE; } else { if (pData->deviceType == deviceType && (pData->pDeviceID != NULL && ma_strcmp(pData->pDeviceID->alsa, pDeviceInfo->id.alsa) == 0)) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1); pData->foundDevice = MA_TRUE; } } /* Keep enumerating until we have found the device. */ return !pData->foundDevice; } static void ma_context_test_rate_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags, ma_device_info* pDeviceInfo) { MA_ASSERT(pPCM != NULL); MA_ASSERT(pHWParams != NULL); MA_ASSERT(pDeviceInfo != NULL); if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats) && ((ma_snd_pcm_hw_params_test_rate_proc)pContext->alsa.snd_pcm_hw_params_test_rate)(pPCM, pHWParams, sampleRate, 0) == 0) { pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } } static void ma_context_iterate_rates_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 flags, ma_device_info* pDeviceInfo) { ma_uint32 iSampleRate; unsigned int minSampleRate; unsigned int maxSampleRate; int sampleRateDir; /* Not used. Just passed into snd_pcm_hw_params_get_rate_min/max(). */ /* There could be a range. */ ((ma_snd_pcm_hw_params_get_rate_min_proc)pContext->alsa.snd_pcm_hw_params_get_rate_min)(pHWParams, &minSampleRate, &sampleRateDir); ((ma_snd_pcm_hw_params_get_rate_max_proc)pContext->alsa.snd_pcm_hw_params_get_rate_max)(pHWParams, &maxSampleRate, &sampleRateDir); /* Make sure our sample rates are clamped to sane values. Stupid devices like "pulse" will reports rates like "1" which is ridiculous. */ minSampleRate = ma_clamp(minSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max); maxSampleRate = ma_clamp(maxSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max); for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate]; if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, standardSampleRate, flags, pDeviceInfo); } } /* Now make sure our min and max rates are included just in case they aren't in the range of our standard rates. */ if (!ma_is_standard_sample_rate(minSampleRate)) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, minSampleRate, flags, pDeviceInfo); } if (!ma_is_standard_sample_rate(maxSampleRate) && maxSampleRate != minSampleRate) { ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, maxSampleRate, flags, pDeviceInfo); } } static ma_result ma_context_get_device_info__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_context_get_device_info_enum_callback_data__alsa data; ma_result result; int resultALSA; ma_snd_pcm_t* pPCM; ma_snd_pcm_hw_params_t* pHWParams; ma_uint32 iFormat; ma_uint32 iChannel; MA_ASSERT(pContext != NULL); /* We just enumerate to find basic information about the device. */ data.deviceType = deviceType; data.pDeviceID = pDeviceID; data.pDeviceInfo = pDeviceInfo; data.foundDevice = MA_FALSE; result = ma_context_enumerate_devices__alsa(pContext, ma_context_get_device_info_enum_callback__alsa, &data); if (result != MA_SUCCESS) { return result; } if (!data.foundDevice) { return MA_NO_DEVICE; } if (ma_strcmp(pDeviceInfo->id.alsa, "default") == 0) { pDeviceInfo->isDefault = MA_TRUE; } /* For detailed info we need to open the device. */ result = ma_context_open_pcm__alsa(pContext, ma_share_mode_shared, deviceType, pDeviceID, 0, &pPCM); if (result != MA_SUCCESS) { return result; } /* We need to initialize a HW parameters object in order to know what formats are supported. */ pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pContext->alsa.snd_pcm_hw_params_sizeof)(), &pContext->allocationCallbacks); if (pHWParams == NULL) { ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed."); return ma_result_from_errno(-resultALSA); } /* Some ALSA devices can support many permutations of formats, channels and rates. We only support a fixed number of permutations which means we need to employ some strategies to ensure the best combinations are returned. An example is the "pulse" device which can do its own data conversion in software and as a result can support any combination of format, channels and rate. We want to ensure that the first data formats are the best. We have a list of favored sample formats and sample rates, so these will be the basis of our iteration. */ /* Formats. We just iterate over our standard formats and test them, making sure we reset the configuration space each iteration. */ for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) { ma_format format = g_maFormatPriorities[iFormat]; /* For each format we need to make sure we reset the configuration space so we don't return channel counts and rates that aren't compatible with a format. */ ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); /* Test the format first. If this fails it means the format is not supported and we can skip it. */ if (((ma_snd_pcm_hw_params_test_format_proc)pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)) == 0) { /* The format is supported. */ unsigned int minChannels; unsigned int maxChannels; /* The configuration space needs to be restricted to this format so we can get an accurate picture of which sample rates and channel counts are support with this format. */ ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)); /* Now we need to check for supported channels. */ ((ma_snd_pcm_hw_params_get_channels_min_proc)pContext->alsa.snd_pcm_hw_params_get_channels_min)(pHWParams, &minChannels); ((ma_snd_pcm_hw_params_get_channels_max_proc)pContext->alsa.snd_pcm_hw_params_get_channels_max)(pHWParams, &maxChannels); if (minChannels > MA_MAX_CHANNELS) { continue; /* Too many channels. */ } if (maxChannels < MA_MIN_CHANNELS) { continue; /* Not enough channels. */ } /* Make sure the channel count is clamped. This is mainly intended for the max channels because some devices can report an unbound maximum. */ minChannels = ma_clamp(minChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); maxChannels = ma_clamp(maxChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { /* The device supports all channels. Don't iterate over every single one. Instead just set the channels to 0 which means all channels are supported. */ ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, 0, 0, pDeviceInfo); /* Intentionally setting the channel count to 0 as that means all channels are supported. */ } else { /* The device only supports a specific set of channels. We need to iterate over all of them. */ for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { /* Test the channel before applying it to the configuration space. */ unsigned int channels = iChannel; /* Make sure our channel range is reset before testing again or else we'll always fail the test. */ ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)); if (((ma_snd_pcm_hw_params_test_channels_proc)pContext->alsa.snd_pcm_hw_params_test_channels)(pPCM, pHWParams, channels) == 0) { /* The channel count is supported. */ /* The configuration space now needs to be restricted to the channel count before extracting the sample rate. */ ((ma_snd_pcm_hw_params_set_channels_proc)pContext->alsa.snd_pcm_hw_params_set_channels)(pPCM, pHWParams, channels); /* Only after the configuration space has been restricted to the specific channel count should we iterate over our sample rates. */ ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, 0, pDeviceInfo); } else { /* The channel count is not supported. Skip. */ } } } } else { /* The format is not supported. Skip. */ } } ma_free(pHWParams, &pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM); return MA_SUCCESS; } static ma_result ma_device_uninit__alsa(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if ((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); close(pDevice->alsa.wakeupfdCapture); ma_free(pDevice->alsa.pPollDescriptorsCapture, &pDevice->pContext->allocationCallbacks); } if ((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); close(pDevice->alsa.wakeupfdPlayback); ma_free(pDevice->alsa.pPollDescriptorsPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } static ma_result ma_device_init_by_type__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { ma_result result; int resultALSA; ma_snd_pcm_t* pPCM; ma_bool32 isUsingMMap; ma_snd_pcm_format_t formatALSA; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; int openMode; ma_snd_pcm_hw_params_t* pHWParams; ma_snd_pcm_sw_params_t* pSWParams; ma_snd_pcm_uframes_t bufferBoundary; int pollDescriptorCount; struct pollfd* pPollDescriptors; int wakeupfd; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); /* This function should only be called for playback _or_ capture, never duplex. */ MA_ASSERT(pDevice != NULL); formatALSA = ma_convert_ma_format_to_alsa_format(pDescriptor->format); openMode = 0; if (pConfig->alsa.noAutoResample) { openMode |= MA_SND_PCM_NO_AUTO_RESAMPLE; } if (pConfig->alsa.noAutoChannels) { openMode |= MA_SND_PCM_NO_AUTO_CHANNELS; } if (pConfig->alsa.noAutoFormat) { openMode |= MA_SND_PCM_NO_AUTO_FORMAT; } result = ma_context_open_pcm__alsa(pDevice->pContext, pDescriptor->shareMode, deviceType, pDescriptor->pDeviceID, openMode, &pPCM); if (result != MA_SUCCESS) { return result; } /* Hardware parameters. */ pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_hw_params_sizeof)(), &pDevice->pContext->allocationCallbacks); if (pHWParams == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for hardware parameters."); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_hw_params_any_proc)pDevice->pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed."); return ma_result_from_errno(-resultALSA); } /* MMAP Mode. Try using interleaved MMAP access. If this fails, fall back to standard readi/writei. */ isUsingMMap = MA_FALSE; #if 0 /* NOTE: MMAP mode temporarily disabled. */ if (deviceType != ma_device_type_capture) { /* <-- Disabling MMAP mode for capture devices because I apparently do not have a device that supports it which means I can't test it... Contributions welcome. */ if (!pConfig->alsa.noMMap) { if (((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_MMAP_INTERLEAVED) == 0) { pDevice->alsa.isUsingMMap = MA_TRUE; } } } #endif if (!isUsingMMap) { resultALSA = ((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_RW_INTERLEAVED); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set access mode to neither SND_PCM_ACCESS_MMAP_INTERLEAVED nor SND_PCM_ACCESS_RW_INTERLEAVED. snd_pcm_hw_params_set_access() failed."); return ma_result_from_errno(-resultALSA); } } /* Most important properties first. The documentation for OSS (yes, I know this is ALSA!) recommends format, channels, then sample rate. I can't find any documentation for ALSA specifically, so I'm going to copy the recommendation for OSS. */ /* Format. */ { /* At this point we should have a list of supported formats, so now we need to find the best one. We first check if the requested format is supported, and if so, use that one. If it's not supported, we just run though a list of formats and try to find the best one. */ if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN || ((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, formatALSA) != 0) { /* We're either requesting the native format or the specified format is not supported. */ size_t iFormat; formatALSA = MA_SND_PCM_FORMAT_UNKNOWN; for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) { if (((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat])) == 0) { formatALSA = ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat]); break; } } if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Format not supported. The device does not support any miniaudio formats."); return MA_FORMAT_NOT_SUPPORTED; } } resultALSA = ((ma_snd_pcm_hw_params_set_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, formatALSA); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Format not supported. snd_pcm_hw_params_set_format() failed."); return ma_result_from_errno(-resultALSA); } internalFormat = ma_format_from_alsa(formatALSA); if (internalFormat == ma_format_unknown) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] The chosen format is not supported by miniaudio."); return MA_FORMAT_NOT_SUPPORTED; } } /* Channels. */ { unsigned int channels = pDescriptor->channels; if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } resultALSA = ((ma_snd_pcm_hw_params_set_channels_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_channels_near)(pPCM, pHWParams, &channels); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set channel count. snd_pcm_hw_params_set_channels_near() failed."); return ma_result_from_errno(-resultALSA); } internalChannels = (ma_uint32)channels; } /* Sample Rate */ { unsigned int sampleRate; /* It appears there's either a bug in ALSA, a bug in some drivers, or I'm doing something silly; but having resampling enabled causes problems with some device configurations when used in conjunction with MMAP access mode. To fix this problem we need to disable resampling. To reproduce this problem, open the "plug:dmix" device, and set the sample rate to 44100. Internally, it looks like dmix uses a sample rate of 48000. The hardware parameters will get set correctly with no errors, but it looks like the 44100 -> 48000 resampling doesn't work properly - but only with MMAP access mode. You will notice skipping/crackling in the audio, and it'll run at a slightly faster rate. miniaudio has built-in support for sample rate conversion (albeit low quality at the moment), so disabling resampling should be fine for us. The only problem is that it won't be taking advantage of any kind of hardware-accelerated resampling and it won't be very good quality until I get a chance to improve the quality of miniaudio's software sample rate conversion. I don't currently know if the dmix plugin is the only one with this error. Indeed, this is the only one I've been able to reproduce this error with. In the future, we may want to restrict the disabling of resampling to only known bad plugins. */ ((ma_snd_pcm_hw_params_set_rate_resample_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_resample)(pPCM, pHWParams, 0); sampleRate = pDescriptor->sampleRate; if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } resultALSA = ((ma_snd_pcm_hw_params_set_rate_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_near)(pPCM, pHWParams, &sampleRate, 0); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Sample rate not supported. snd_pcm_hw_params_set_rate_near() failed."); return ma_result_from_errno(-resultALSA); } internalSampleRate = (ma_uint32)sampleRate; } /* Periods. */ { ma_uint32 periods = pDescriptor->periodCount; resultALSA = ((ma_snd_pcm_hw_params_set_periods_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_periods_near)(pPCM, pHWParams, &periods, NULL); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set period count. snd_pcm_hw_params_set_periods_near() failed."); return ma_result_from_errno(-resultALSA); } internalPeriods = periods; } /* Buffer Size */ { ma_snd_pcm_uframes_t actualBufferSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile) * internalPeriods; resultALSA = ((ma_snd_pcm_hw_params_set_buffer_size_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_buffer_size_near)(pPCM, pHWParams, &actualBufferSizeInFrames); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set buffer size for device. snd_pcm_hw_params_set_buffer_size() failed."); return ma_result_from_errno(-resultALSA); } internalPeriodSizeInFrames = actualBufferSizeInFrames / internalPeriods; } /* Apply hardware parameters. */ resultALSA = ((ma_snd_pcm_hw_params_proc)pDevice->pContext->alsa.snd_pcm_hw_params)(pPCM, pHWParams); if (resultALSA < 0) { ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set hardware parameters. snd_pcm_hw_params() failed."); return ma_result_from_errno(-resultALSA); } ma_free(pHWParams, &pDevice->pContext->allocationCallbacks); pHWParams = NULL; /* Software parameters. */ pSWParams = (ma_snd_pcm_sw_params_t*)ma_calloc(((ma_snd_pcm_sw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_sw_params_sizeof)(), &pDevice->pContext->allocationCallbacks); if (pSWParams == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for software parameters."); return MA_OUT_OF_MEMORY; } resultALSA = ((ma_snd_pcm_sw_params_current_proc)pDevice->pContext->alsa.snd_pcm_sw_params_current)(pPCM, pSWParams); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to initialize software parameters. snd_pcm_sw_params_current() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_set_avail_min_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_avail_min)(pPCM, pSWParams, ma_prev_power_of_2(internalPeriodSizeInFrames)); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_sw_params_set_avail_min() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_get_boundary_proc)pDevice->pContext->alsa.snd_pcm_sw_params_get_boundary)(pSWParams, &bufferBoundary); if (resultALSA < 0) { bufferBoundary = internalPeriodSizeInFrames * internalPeriods; } if (deviceType == ma_device_type_playback && !isUsingMMap) { /* Only playback devices in writei/readi mode need a start threshold. */ /* Subtle detail here with the start threshold. When in playback-only mode (no full-duplex) we can set the start threshold to the size of a period. But for full-duplex we need to set it such that it is at least two periods. */ resultALSA = ((ma_snd_pcm_sw_params_set_start_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_start_threshold)(pPCM, pSWParams, internalPeriodSizeInFrames*2); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed."); return ma_result_from_errno(-resultALSA); } resultALSA = ((ma_snd_pcm_sw_params_set_stop_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_stop_threshold)(pPCM, pSWParams, bufferBoundary); if (resultALSA < 0) { /* Set to boundary to loop instead of stop in the event of an xrun. */ ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set stop threshold for playback device. snd_pcm_sw_params_set_stop_threshold() failed."); return ma_result_from_errno(-resultALSA); } } resultALSA = ((ma_snd_pcm_sw_params_proc)pDevice->pContext->alsa.snd_pcm_sw_params)(pPCM, pSWParams); if (resultALSA < 0) { ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed."); return ma_result_from_errno(-resultALSA); } ma_free(pSWParams, &pDevice->pContext->allocationCallbacks); pSWParams = NULL; /* Grab the internal channel map. For now we're not going to bother trying to change the channel map and instead just do it ourselves. */ { ma_snd_pcm_chmap_t* pChmap = NULL; if (pDevice->pContext->alsa.snd_pcm_get_chmap != NULL) { pChmap = ((ma_snd_pcm_get_chmap_proc)pDevice->pContext->alsa.snd_pcm_get_chmap)(pPCM); } if (pChmap != NULL) { ma_uint32 iChannel; /* There are cases where the returned channel map can have a different channel count than was returned by snd_pcm_hw_params_set_channels_near(). */ if (pChmap->channels >= internalChannels) { /* Drop excess channels. */ for (iChannel = 0; iChannel < internalChannels; ++iChannel) { internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]); } } else { ma_uint32 i; /* Excess channels use defaults. Do an initial fill with defaults, overwrite the first pChmap->channels, validate to ensure there are no duplicate channels. If validation fails, fall back to defaults. */ ma_bool32 isValid = MA_TRUE; /* Fill with defaults. */ ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); /* Overwrite first pChmap->channels channels. */ for (iChannel = 0; iChannel < pChmap->channels; ++iChannel) { internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]); } /* Validate. */ for (i = 0; i < internalChannels && isValid; ++i) { ma_uint32 j; for (j = i+1; j < internalChannels; ++j) { if (internalChannelMap[i] == internalChannelMap[j]) { isValid = MA_FALSE; break; } } } /* If our channel map is invalid, fall back to defaults. */ if (!isValid) { ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); } } free(pChmap); pChmap = NULL; } else { /* Could not retrieve the channel map. Fall back to a hard-coded assumption. */ ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels); } } /* We need to retrieve the poll descriptors so we can use poll() to wait for data to become available for reading or writing. There's no well defined maximum for this so we're just going to allocate this on the heap. */ pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_count_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_count)(pPCM); if (pollDescriptorCount <= 0) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to retrieve poll descriptors count."); return MA_ERROR; } pPollDescriptors = (struct pollfd*)ma_malloc(sizeof(*pPollDescriptors) * (pollDescriptorCount + 1), &pDevice->pContext->allocationCallbacks); /* +1 because we want room for the wakeup descriptor. */ if (pPollDescriptors == NULL) { ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to allocate memory for poll descriptors."); return MA_OUT_OF_MEMORY; } /* We need an eventfd to wakeup from poll() and avoid a deadlock in situations where the driver never returns from writei() and readi(). This has been observed with the "pulse" device. */ wakeupfd = eventfd(0, 0); if (wakeupfd < 0) { ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to create eventfd for poll wakeup."); return ma_result_from_errno(errno); } /* We'll place the wakeup fd at the start of the buffer. */ pPollDescriptors[0].fd = wakeupfd; pPollDescriptors[0].events = POLLIN; /* We only care about waiting to read from the wakeup file descriptor. */ pPollDescriptors[0].revents = 0; /* We can now extract the PCM poll descriptors which we place after the wakeup descriptor. */ pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors)(pPCM, pPollDescriptors + 1, pollDescriptorCount); /* +1 because we want to place these descriptors after the wakeup descriptor. */ if (pollDescriptorCount <= 0) { close(wakeupfd); ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to retrieve poll descriptors."); return MA_ERROR; } if (deviceType == ma_device_type_capture) { pDevice->alsa.pollDescriptorCountCapture = pollDescriptorCount; pDevice->alsa.pPollDescriptorsCapture = pPollDescriptors; pDevice->alsa.wakeupfdCapture = wakeupfd; } else { pDevice->alsa.pollDescriptorCountPlayback = pollDescriptorCount; pDevice->alsa.pPollDescriptorsPlayback = pPollDescriptors; pDevice->alsa.wakeupfdPlayback = wakeupfd; } /* We're done. Prepare the device. */ resultALSA = ((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)(pPCM); if (resultALSA < 0) { close(wakeupfd); ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks); ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to prepare device."); return ma_result_from_errno(-resultALSA); } if (deviceType == ma_device_type_capture) { pDevice->alsa.pPCMCapture = (ma_ptr)pPCM; pDevice->alsa.isUsingMMapCapture = isUsingMMap; } else { pDevice->alsa.pPCMPlayback = (ma_ptr)pPCM; pDevice->alsa.isUsingMMapPlayback = isUsingMMap; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_copy(pDescriptor->channelMap, internalChannelMap, ma_min(internalChannels, MA_MAX_CHANNELS)); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->alsa); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__alsa(ma_device* pDevice) { int resultALSA; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start capture device."); return ma_result_from_errno(-resultALSA); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* When data is written to the device we wait for the device to get ready to receive data with poll(). In my testing I have observed that poll() can sometimes block forever unless the device is started explicitly with snd_pcm_start() or some data is written with snd_pcm_writei(). To resolve this I've decided to do an explicit start with snd_pcm_start(). The problem with this is that the device is started without any data in the internal buffer which will result in an immediate underrun. If instead we were to call into snd_pcm_writei() in an attempt to prevent the underrun, we would run the risk of a weird deadlock issue as documented inside ma_device_write__alsa(). */ resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start playback device."); return ma_result_from_errno(-resultALSA); } } return MA_SUCCESS; } static ma_result ma_device_stop__alsa(ma_device* pDevice) { /* The stop callback will get called on the worker thread after read/write__alsa() has returned. At this point there is a small chance that our wakeupfd has not been cleared. We'll clear that out now if applicable. */ int resultPoll; int resultRead; if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping capture device...\n"); ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping capture device successful.\n"); /* We need to prepare the device again, otherwise we won't be able to restart the device. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device...\n"); if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device failed.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing capture device successful.\n"); } /* Clear the wakeupfd. */ resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, 1, 0); if (resultPoll > 0) { ma_uint64 t; resultRead = read(((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture)[0].fd, &t, sizeof(t)); if (resultRead != sizeof(t)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to read from capture wakeupfd. read() = %d\n", resultRead); } } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping playback device...\n"); ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Dropping playback device successful.\n"); /* We need to prepare the device again, otherwise we won't be able to restart the device. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device...\n"); if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device failed.\n"); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Preparing playback device successful.\n"); } /* Clear the wakeupfd. */ resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, 1, 0); if (resultPoll > 0) { ma_uint64 t; resultRead = read(((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback)[0].fd, &t, sizeof(t)); if (resultRead != sizeof(t)) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to read from playback wakeupfd. read() = %d\n", resultRead); } } } return MA_SUCCESS; } static ma_result ma_device_wait__alsa(ma_device* pDevice, ma_snd_pcm_t* pPCM, struct pollfd* pPollDescriptors, int pollDescriptorCount, short requiredEvent) { for (;;) { unsigned short revents; int resultALSA; int resultPoll = poll(pPollDescriptors, pollDescriptorCount, -1); if (resultPoll < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[ALSA] poll() failed.\n"); /* There have been reports that poll() is returning an error randomly and that instead of returning an error, simply trying again will work. I'm experimenting with adopting this advice. */ continue; /*return ma_result_from_errno(errno);*/ } /* Before checking the ALSA poll descriptor flag we need to check if the wakeup descriptor has had it's POLLIN flag set. If so, we need to actually read the data and then exit the function. The wakeup descriptor will be the first item in the descriptors buffer. */ if ((pPollDescriptors[0].revents & POLLIN) != 0) { ma_uint64 t; int resultRead = read(pPollDescriptors[0].fd, &t, sizeof(t)); /* <-- Important that we read here so that the next write() does not block. */ if (resultRead < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] read() failed.\n"); return ma_result_from_errno(errno); } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] POLLIN set for wakeupfd\n"); return MA_DEVICE_NOT_STARTED; } /* Getting here means that some data should be able to be read. We need to use ALSA to translate the revents flags for us. */ resultALSA = ((ma_snd_pcm_poll_descriptors_revents_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_revents)(pPCM, pPollDescriptors + 1, pollDescriptorCount - 1, &revents); /* +1, -1 to ignore the wakeup descriptor. */ if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] snd_pcm_poll_descriptors_revents() failed.\n"); return ma_result_from_errno(-resultALSA); } if ((revents & POLLERR) != 0) { ma_snd_pcm_state_t state = ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM); if (state == MA_SND_PCM_STATE_XRUN) { /* The PCM is in a xrun state. This will be recovered from at a higher level. We can disregard this. */ } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[ALSA] POLLERR detected. status = %d\n", ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM)); } } if ((revents & requiredEvent) == requiredEvent) { break; /* We're done. Data available for reading or writing. */ } } return MA_SUCCESS; } static ma_result ma_device_wait_read__alsa(ma_device* pDevice) { return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, (struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, pDevice->alsa.pollDescriptorCountCapture + 1, POLLIN); /* +1 to account for the wakeup descriptor. */ } static ma_result ma_device_wait_write__alsa(ma_device* pDevice) { return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, (struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, pDevice->alsa.pollDescriptorCountPlayback + 1, POLLOUT); /* +1 to account for the wakeup descriptor. */ } static ma_result ma_device_read__alsa(ma_device* pDevice, void* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead) { ma_snd_pcm_sframes_t resultALSA = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFramesOut != NULL); if (pFramesRead != NULL) { *pFramesRead = 0; } while (ma_device_get_state(pDevice) == ma_device_state_started) { ma_result result; /* The first thing to do is wait for data to become available for reading. This will return an error code if the device has been stopped. */ result = ma_device_wait_read__alsa(pDevice); if (result != MA_SUCCESS) { return result; } /* Getting here means we should have data available. */ resultALSA = ((ma_snd_pcm_readi_proc)pDevice->pContext->alsa.snd_pcm_readi)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, pFramesOut, frameCount); if (resultALSA >= 0) { break; /* Success. */ } else { if (resultALSA == -EAGAIN) { /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EGAIN (read)\n");*/ continue; /* Try again. */ } else if (resultALSA == -EPIPE) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EPIPE (read)\n"); /* Overrun. Recover and try again. If this fails we need to return an error. */ resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, resultALSA, MA_TRUE); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to recover device after overrun."); return ma_result_from_errno((int)-resultALSA); } resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start device after underrun."); return ma_result_from_errno((int)-resultALSA); } continue; /* Try reading again. */ } } } if (pFramesRead != NULL) { *pFramesRead = resultALSA; } return MA_SUCCESS; } static ma_result ma_device_write__alsa(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { ma_snd_pcm_sframes_t resultALSA = 0; MA_ASSERT(pDevice != NULL); MA_ASSERT(pFrames != NULL); if (pFramesWritten != NULL) { *pFramesWritten = 0; } while (ma_device_get_state(pDevice) == ma_device_state_started) { ma_result result; /* The first thing to do is wait for space to become available for writing. This will return an error code if the device has been stopped. */ result = ma_device_wait_write__alsa(pDevice); if (result != MA_SUCCESS) { return result; } resultALSA = ((ma_snd_pcm_writei_proc)pDevice->pContext->alsa.snd_pcm_writei)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, pFrames, frameCount); if (resultALSA >= 0) { break; /* Success. */ } else { if (resultALSA == -EAGAIN) { /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EGAIN (write)\n");*/ continue; /* Try again. */ } else if (resultALSA == -EPIPE) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "EPIPE (write)\n"); /* Underrun. Recover and try again. If this fails we need to return an error. */ resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, resultALSA, MA_TRUE); /* MA_TRUE=silent (don't print anything on error). */ if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to recover device after underrun."); return ma_result_from_errno((int)-resultALSA); } /* In my testing I have had a situation where writei() does not automatically restart the device even though I've set it up as such in the software parameters. What will happen is writei() will block indefinitely even though the number of frames is well beyond the auto-start threshold. To work around this I've needed to add an explicit start here. Not sure if this is me just being stupid and not recovering the device properly, but this definitely feels like something isn't quite right here. */ resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback); if (resultALSA < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] Failed to start device after underrun."); return ma_result_from_errno((int)-resultALSA); } continue; /* Try writing again. */ } } } if (pFramesWritten != NULL) { *pFramesWritten = resultALSA; } return MA_SUCCESS; } static ma_result ma_device_data_loop_wakeup__alsa(ma_device* pDevice) { ma_uint64 t = 1; int resultWrite = 0; MA_ASSERT(pDevice != NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Waking up...\n"); /* Write to an eventfd to trigger a wakeup from poll() and abort any reading or writing. */ if (pDevice->alsa.pPollDescriptorsCapture != NULL) { resultWrite = write(pDevice->alsa.wakeupfdCapture, &t, sizeof(t)); } if (pDevice->alsa.pPollDescriptorsPlayback != NULL) { resultWrite = write(pDevice->alsa.wakeupfdPlayback, &t, sizeof(t)); } if (resultWrite < 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] write() failed.\n"); return ma_result_from_errno(errno); } ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[ALSA] Waking up completed successfully.\n"); return MA_SUCCESS; } static ma_result ma_context_uninit__alsa(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_alsa); /* Clean up memory for memory leak checkers. */ ((ma_snd_config_update_free_global_proc)pContext->alsa.snd_config_update_free_global)(); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->alsa.asoundSO); #endif ma_mutex_uninit(&pContext->alsa.internalDeviceEnumLock); return MA_SUCCESS; } static ma_result ma_context_init__alsa(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #ifndef MA_NO_RUNTIME_LINKING const char* libasoundNames[] = { "libasound.so.2", "libasound.so" }; size_t i; for (i = 0; i < ma_countof(libasoundNames); ++i) { pContext->alsa.asoundSO = ma_dlopen(ma_context_get_log(pContext), libasoundNames[i]); if (pContext->alsa.asoundSO != NULL) { break; } } if (pContext->alsa.asoundSO == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "[ALSA] Failed to open shared object.\n"); return MA_NO_BACKEND; } pContext->alsa.snd_pcm_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_open"); pContext->alsa.snd_pcm_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_close"); pContext->alsa.snd_pcm_hw_params_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_sizeof"); pContext->alsa.snd_pcm_hw_params_any = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_any"); pContext->alsa.snd_pcm_hw_params_set_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format"); pContext->alsa.snd_pcm_hw_params_set_format_first = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format_first"); pContext->alsa.snd_pcm_hw_params_get_format_mask = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format_mask"); pContext->alsa.snd_pcm_hw_params_set_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels"); pContext->alsa.snd_pcm_hw_params_set_channels_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels_near"); pContext->alsa.snd_pcm_hw_params_set_channels_minmax = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels_minmax"); pContext->alsa.snd_pcm_hw_params_set_rate_resample = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_resample"); pContext->alsa.snd_pcm_hw_params_set_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate"); pContext->alsa.snd_pcm_hw_params_set_rate_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_near"); pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_buffer_size_near"); pContext->alsa.snd_pcm_hw_params_set_periods_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_periods_near"); pContext->alsa.snd_pcm_hw_params_set_access = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_set_access"); pContext->alsa.snd_pcm_hw_params_get_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format"); pContext->alsa.snd_pcm_hw_params_get_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels"); pContext->alsa.snd_pcm_hw_params_get_channels_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels_min"); pContext->alsa.snd_pcm_hw_params_get_channels_max = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels_max"); pContext->alsa.snd_pcm_hw_params_get_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate"); pContext->alsa.snd_pcm_hw_params_get_rate_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate_min"); pContext->alsa.snd_pcm_hw_params_get_rate_max = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate_max"); pContext->alsa.snd_pcm_hw_params_get_buffer_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_buffer_size"); pContext->alsa.snd_pcm_hw_params_get_periods = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_periods"); pContext->alsa.snd_pcm_hw_params_get_access = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_get_access"); pContext->alsa.snd_pcm_hw_params_test_format = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_format"); pContext->alsa.snd_pcm_hw_params_test_channels = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_channels"); pContext->alsa.snd_pcm_hw_params_test_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params_test_rate"); pContext->alsa.snd_pcm_hw_params = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_hw_params"); pContext->alsa.snd_pcm_sw_params_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_sizeof"); pContext->alsa.snd_pcm_sw_params_current = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_current"); pContext->alsa.snd_pcm_sw_params_get_boundary = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_get_boundary"); pContext->alsa.snd_pcm_sw_params_set_avail_min = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_avail_min"); pContext->alsa.snd_pcm_sw_params_set_start_threshold = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_start_threshold"); pContext->alsa.snd_pcm_sw_params_set_stop_threshold = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params_set_stop_threshold"); pContext->alsa.snd_pcm_sw_params = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_sw_params"); pContext->alsa.snd_pcm_format_mask_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_format_mask_sizeof"); pContext->alsa.snd_pcm_format_mask_test = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_format_mask_test"); pContext->alsa.snd_pcm_get_chmap = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_get_chmap"); pContext->alsa.snd_pcm_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_state"); pContext->alsa.snd_pcm_prepare = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_prepare"); pContext->alsa.snd_pcm_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_start"); pContext->alsa.snd_pcm_drop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_drop"); pContext->alsa.snd_pcm_drain = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_drain"); pContext->alsa.snd_pcm_reset = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_reset"); pContext->alsa.snd_device_name_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_hint"); pContext->alsa.snd_device_name_get_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_get_hint"); pContext->alsa.snd_card_get_index = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_card_get_index"); pContext->alsa.snd_device_name_free_hint = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_device_name_free_hint"); pContext->alsa.snd_pcm_mmap_begin = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_mmap_begin"); pContext->alsa.snd_pcm_mmap_commit = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_mmap_commit"); pContext->alsa.snd_pcm_recover = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_recover"); pContext->alsa.snd_pcm_readi = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_readi"); pContext->alsa.snd_pcm_writei = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_writei"); pContext->alsa.snd_pcm_avail = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_avail"); pContext->alsa.snd_pcm_avail_update = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_avail_update"); pContext->alsa.snd_pcm_wait = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_wait"); pContext->alsa.snd_pcm_nonblock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_nonblock"); pContext->alsa.snd_pcm_info = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info"); pContext->alsa.snd_pcm_info_sizeof = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info_sizeof"); pContext->alsa.snd_pcm_info_get_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_info_get_name"); pContext->alsa.snd_pcm_poll_descriptors = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors"); pContext->alsa.snd_pcm_poll_descriptors_count = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors_count"); pContext->alsa.snd_pcm_poll_descriptors_revents = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_pcm_poll_descriptors_revents"); pContext->alsa.snd_config_update_free_global = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, "snd_config_update_free_global"); #else /* The system below is just for type safety. */ ma_snd_pcm_open_proc _snd_pcm_open = snd_pcm_open; ma_snd_pcm_close_proc _snd_pcm_close = snd_pcm_close; ma_snd_pcm_hw_params_sizeof_proc _snd_pcm_hw_params_sizeof = snd_pcm_hw_params_sizeof; ma_snd_pcm_hw_params_any_proc _snd_pcm_hw_params_any = snd_pcm_hw_params_any; ma_snd_pcm_hw_params_set_format_proc _snd_pcm_hw_params_set_format = snd_pcm_hw_params_set_format; ma_snd_pcm_hw_params_set_format_first_proc _snd_pcm_hw_params_set_format_first = snd_pcm_hw_params_set_format_first; ma_snd_pcm_hw_params_get_format_mask_proc _snd_pcm_hw_params_get_format_mask = snd_pcm_hw_params_get_format_mask; ma_snd_pcm_hw_params_set_channels_proc _snd_pcm_hw_params_set_channels = snd_pcm_hw_params_set_channels; ma_snd_pcm_hw_params_set_channels_near_proc _snd_pcm_hw_params_set_channels_near = snd_pcm_hw_params_set_channels_near; ma_snd_pcm_hw_params_set_rate_resample_proc _snd_pcm_hw_params_set_rate_resample = snd_pcm_hw_params_set_rate_resample; ma_snd_pcm_hw_params_set_rate_near _snd_pcm_hw_params_set_rate = snd_pcm_hw_params_set_rate; ma_snd_pcm_hw_params_set_rate_near_proc _snd_pcm_hw_params_set_rate_near = snd_pcm_hw_params_set_rate_near; ma_snd_pcm_hw_params_set_rate_minmax_proc _snd_pcm_hw_params_set_rate_minmax = snd_pcm_hw_params_set_rate_minmax; ma_snd_pcm_hw_params_set_buffer_size_near_proc _snd_pcm_hw_params_set_buffer_size_near = snd_pcm_hw_params_set_buffer_size_near; ma_snd_pcm_hw_params_set_periods_near_proc _snd_pcm_hw_params_set_periods_near = snd_pcm_hw_params_set_periods_near; ma_snd_pcm_hw_params_set_access_proc _snd_pcm_hw_params_set_access = snd_pcm_hw_params_set_access; ma_snd_pcm_hw_params_get_format_proc _snd_pcm_hw_params_get_format = snd_pcm_hw_params_get_format; ma_snd_pcm_hw_params_get_channels_proc _snd_pcm_hw_params_get_channels = snd_pcm_hw_params_get_channels; ma_snd_pcm_hw_params_get_channels_min_proc _snd_pcm_hw_params_get_channels_min = snd_pcm_hw_params_get_channels_min; ma_snd_pcm_hw_params_get_channels_max_proc _snd_pcm_hw_params_get_channels_max = snd_pcm_hw_params_get_channels_max; ma_snd_pcm_hw_params_get_rate_proc _snd_pcm_hw_params_get_rate = snd_pcm_hw_params_get_rate; ma_snd_pcm_hw_params_get_rate_min_proc _snd_pcm_hw_params_get_rate_min = snd_pcm_hw_params_get_rate_min; ma_snd_pcm_hw_params_get_rate_max_proc _snd_pcm_hw_params_get_rate_max = snd_pcm_hw_params_get_rate_max; ma_snd_pcm_hw_params_get_buffer_size_proc _snd_pcm_hw_params_get_buffer_size = snd_pcm_hw_params_get_buffer_size; ma_snd_pcm_hw_params_get_periods_proc _snd_pcm_hw_params_get_periods = snd_pcm_hw_params_get_periods; ma_snd_pcm_hw_params_get_access_proc _snd_pcm_hw_params_get_access = snd_pcm_hw_params_get_access; ma_snd_pcm_hw_params_test_format_proc _snd_pcm_hw_params_test_format = snd_pcm_hw_params_test_format; ma_snd_pcm_hw_params_test_channels_proc _snd_pcm_hw_params_test_channels = snd_pcm_hw_params_test_channels; ma_snd_pcm_hw_params_test_rate_proc _snd_pcm_hw_params_test_rate = snd_pcm_hw_params_test_rate; ma_snd_pcm_hw_params_proc _snd_pcm_hw_params = snd_pcm_hw_params; ma_snd_pcm_sw_params_sizeof_proc _snd_pcm_sw_params_sizeof = snd_pcm_sw_params_sizeof; ma_snd_pcm_sw_params_current_proc _snd_pcm_sw_params_current = snd_pcm_sw_params_current; ma_snd_pcm_sw_params_get_boundary_proc _snd_pcm_sw_params_get_boundary = snd_pcm_sw_params_get_boundary; ma_snd_pcm_sw_params_set_avail_min_proc _snd_pcm_sw_params_set_avail_min = snd_pcm_sw_params_set_avail_min; ma_snd_pcm_sw_params_set_start_threshold_proc _snd_pcm_sw_params_set_start_threshold = snd_pcm_sw_params_set_start_threshold; ma_snd_pcm_sw_params_set_stop_threshold_proc _snd_pcm_sw_params_set_stop_threshold = snd_pcm_sw_params_set_stop_threshold; ma_snd_pcm_sw_params_proc _snd_pcm_sw_params = snd_pcm_sw_params; ma_snd_pcm_format_mask_sizeof_proc _snd_pcm_format_mask_sizeof = snd_pcm_format_mask_sizeof; ma_snd_pcm_format_mask_test_proc _snd_pcm_format_mask_test = snd_pcm_format_mask_test; ma_snd_pcm_get_chmap_proc _snd_pcm_get_chmap = snd_pcm_get_chmap; ma_snd_pcm_state_proc _snd_pcm_state = snd_pcm_state; ma_snd_pcm_prepare_proc _snd_pcm_prepare = snd_pcm_prepare; ma_snd_pcm_start_proc _snd_pcm_start = snd_pcm_start; ma_snd_pcm_drop_proc _snd_pcm_drop = snd_pcm_drop; ma_snd_pcm_drain_proc _snd_pcm_drain = snd_pcm_drain; ma_snd_pcm_reset_proc _snd_pcm_reset = snd_pcm_reset; ma_snd_device_name_hint_proc _snd_device_name_hint = snd_device_name_hint; ma_snd_device_name_get_hint_proc _snd_device_name_get_hint = snd_device_name_get_hint; ma_snd_card_get_index_proc _snd_card_get_index = snd_card_get_index; ma_snd_device_name_free_hint_proc _snd_device_name_free_hint = snd_device_name_free_hint; ma_snd_pcm_mmap_begin_proc _snd_pcm_mmap_begin = snd_pcm_mmap_begin; ma_snd_pcm_mmap_commit_proc _snd_pcm_mmap_commit = snd_pcm_mmap_commit; ma_snd_pcm_recover_proc _snd_pcm_recover = snd_pcm_recover; ma_snd_pcm_readi_proc _snd_pcm_readi = snd_pcm_readi; ma_snd_pcm_writei_proc _snd_pcm_writei = snd_pcm_writei; ma_snd_pcm_avail_proc _snd_pcm_avail = snd_pcm_avail; ma_snd_pcm_avail_update_proc _snd_pcm_avail_update = snd_pcm_avail_update; ma_snd_pcm_wait_proc _snd_pcm_wait = snd_pcm_wait; ma_snd_pcm_nonblock_proc _snd_pcm_nonblock = snd_pcm_nonblock; ma_snd_pcm_info_proc _snd_pcm_info = snd_pcm_info; ma_snd_pcm_info_sizeof_proc _snd_pcm_info_sizeof = snd_pcm_info_sizeof; ma_snd_pcm_info_get_name_proc _snd_pcm_info_get_name = snd_pcm_info_get_name; ma_snd_pcm_poll_descriptors _snd_pcm_poll_descriptors = snd_pcm_poll_descriptors; ma_snd_pcm_poll_descriptors_count _snd_pcm_poll_descriptors_count = snd_pcm_poll_descriptors_count; ma_snd_pcm_poll_descriptors_revents _snd_pcm_poll_descriptors_revents = snd_pcm_poll_descriptors_revents; ma_snd_config_update_free_global_proc _snd_config_update_free_global = snd_config_update_free_global; pContext->alsa.snd_pcm_open = (ma_proc)_snd_pcm_open; pContext->alsa.snd_pcm_close = (ma_proc)_snd_pcm_close; pContext->alsa.snd_pcm_hw_params_sizeof = (ma_proc)_snd_pcm_hw_params_sizeof; pContext->alsa.snd_pcm_hw_params_any = (ma_proc)_snd_pcm_hw_params_any; pContext->alsa.snd_pcm_hw_params_set_format = (ma_proc)_snd_pcm_hw_params_set_format; pContext->alsa.snd_pcm_hw_params_set_format_first = (ma_proc)_snd_pcm_hw_params_set_format_first; pContext->alsa.snd_pcm_hw_params_get_format_mask = (ma_proc)_snd_pcm_hw_params_get_format_mask; pContext->alsa.snd_pcm_hw_params_set_channels = (ma_proc)_snd_pcm_hw_params_set_channels; pContext->alsa.snd_pcm_hw_params_set_channels_near = (ma_proc)_snd_pcm_hw_params_set_channels_near; pContext->alsa.snd_pcm_hw_params_set_channels_minmax = (ma_proc)_snd_pcm_hw_params_set_channels_minmax; pContext->alsa.snd_pcm_hw_params_set_rate_resample = (ma_proc)_snd_pcm_hw_params_set_rate_resample; pContext->alsa.snd_pcm_hw_params_set_rate = (ma_proc)_snd_pcm_hw_params_set_rate; pContext->alsa.snd_pcm_hw_params_set_rate_near = (ma_proc)_snd_pcm_hw_params_set_rate_near; pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)_snd_pcm_hw_params_set_buffer_size_near; pContext->alsa.snd_pcm_hw_params_set_periods_near = (ma_proc)_snd_pcm_hw_params_set_periods_near; pContext->alsa.snd_pcm_hw_params_set_access = (ma_proc)_snd_pcm_hw_params_set_access; pContext->alsa.snd_pcm_hw_params_get_format = (ma_proc)_snd_pcm_hw_params_get_format; pContext->alsa.snd_pcm_hw_params_get_channels = (ma_proc)_snd_pcm_hw_params_get_channels; pContext->alsa.snd_pcm_hw_params_get_channels_min = (ma_proc)_snd_pcm_hw_params_get_channels_min; pContext->alsa.snd_pcm_hw_params_get_channels_max = (ma_proc)_snd_pcm_hw_params_get_channels_max; pContext->alsa.snd_pcm_hw_params_get_rate = (ma_proc)_snd_pcm_hw_params_get_rate; pContext->alsa.snd_pcm_hw_params_get_rate_min = (ma_proc)_snd_pcm_hw_params_get_rate_min; pContext->alsa.snd_pcm_hw_params_get_rate_max = (ma_proc)_snd_pcm_hw_params_get_rate_max; pContext->alsa.snd_pcm_hw_params_get_buffer_size = (ma_proc)_snd_pcm_hw_params_get_buffer_size; pContext->alsa.snd_pcm_hw_params_get_periods = (ma_proc)_snd_pcm_hw_params_get_periods; pContext->alsa.snd_pcm_hw_params_get_access = (ma_proc)_snd_pcm_hw_params_get_access; pContext->alsa.snd_pcm_hw_params_test_format = (ma_proc)_snd_pcm_hw_params_test_format; pContext->alsa.snd_pcm_hw_params_test_channels = (ma_proc)_snd_pcm_hw_params_test_channels; pContext->alsa.snd_pcm_hw_params_test_rate = (ma_proc)_snd_pcm_hw_params_test_rate; pContext->alsa.snd_pcm_hw_params = (ma_proc)_snd_pcm_hw_params; pContext->alsa.snd_pcm_sw_params_sizeof = (ma_proc)_snd_pcm_sw_params_sizeof; pContext->alsa.snd_pcm_sw_params_current = (ma_proc)_snd_pcm_sw_params_current; pContext->alsa.snd_pcm_sw_params_get_boundary = (ma_proc)_snd_pcm_sw_params_get_boundary; pContext->alsa.snd_pcm_sw_params_set_avail_min = (ma_proc)_snd_pcm_sw_params_set_avail_min; pContext->alsa.snd_pcm_sw_params_set_start_threshold = (ma_proc)_snd_pcm_sw_params_set_start_threshold; pContext->alsa.snd_pcm_sw_params_set_stop_threshold = (ma_proc)_snd_pcm_sw_params_set_stop_threshold; pContext->alsa.snd_pcm_sw_params = (ma_proc)_snd_pcm_sw_params; pContext->alsa.snd_pcm_format_mask_sizeof = (ma_proc)_snd_pcm_format_mask_sizeof; pContext->alsa.snd_pcm_format_mask_test = (ma_proc)_snd_pcm_format_mask_test; pContext->alsa.snd_pcm_get_chmap = (ma_proc)_snd_pcm_get_chmap; pContext->alsa.snd_pcm_state = (ma_proc)_snd_pcm_state; pContext->alsa.snd_pcm_prepare = (ma_proc)_snd_pcm_prepare; pContext->alsa.snd_pcm_start = (ma_proc)_snd_pcm_start; pContext->alsa.snd_pcm_drop = (ma_proc)_snd_pcm_drop; pContext->alsa.snd_pcm_drain = (ma_proc)_snd_pcm_drain; pContext->alsa.snd_pcm_reset = (ma_proc)_snd_pcm_reset; pContext->alsa.snd_device_name_hint = (ma_proc)_snd_device_name_hint; pContext->alsa.snd_device_name_get_hint = (ma_proc)_snd_device_name_get_hint; pContext->alsa.snd_card_get_index = (ma_proc)_snd_card_get_index; pContext->alsa.snd_device_name_free_hint = (ma_proc)_snd_device_name_free_hint; pContext->alsa.snd_pcm_mmap_begin = (ma_proc)_snd_pcm_mmap_begin; pContext->alsa.snd_pcm_mmap_commit = (ma_proc)_snd_pcm_mmap_commit; pContext->alsa.snd_pcm_recover = (ma_proc)_snd_pcm_recover; pContext->alsa.snd_pcm_readi = (ma_proc)_snd_pcm_readi; pContext->alsa.snd_pcm_writei = (ma_proc)_snd_pcm_writei; pContext->alsa.snd_pcm_avail = (ma_proc)_snd_pcm_avail; pContext->alsa.snd_pcm_avail_update = (ma_proc)_snd_pcm_avail_update; pContext->alsa.snd_pcm_wait = (ma_proc)_snd_pcm_wait; pContext->alsa.snd_pcm_nonblock = (ma_proc)_snd_pcm_nonblock; pContext->alsa.snd_pcm_info = (ma_proc)_snd_pcm_info; pContext->alsa.snd_pcm_info_sizeof = (ma_proc)_snd_pcm_info_sizeof; pContext->alsa.snd_pcm_info_get_name = (ma_proc)_snd_pcm_info_get_name; pContext->alsa.snd_pcm_poll_descriptors = (ma_proc)_snd_pcm_poll_descriptors; pContext->alsa.snd_pcm_poll_descriptors_count = (ma_proc)_snd_pcm_poll_descriptors_count; pContext->alsa.snd_pcm_poll_descriptors_revents = (ma_proc)_snd_pcm_poll_descriptors_revents; pContext->alsa.snd_config_update_free_global = (ma_proc)_snd_config_update_free_global; #endif pContext->alsa.useVerboseDeviceEnumeration = pConfig->alsa.useVerboseDeviceEnumeration; result = ma_mutex_init(&pContext->alsa.internalDeviceEnumLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[ALSA] WARNING: Failed to initialize mutex for internal device enumeration."); return result; } pCallbacks->onContextInit = ma_context_init__alsa; pCallbacks->onContextUninit = ma_context_uninit__alsa; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__alsa; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__alsa; pCallbacks->onDeviceInit = ma_device_init__alsa; pCallbacks->onDeviceUninit = ma_device_uninit__alsa; pCallbacks->onDeviceStart = ma_device_start__alsa; pCallbacks->onDeviceStop = ma_device_stop__alsa; pCallbacks->onDeviceRead = ma_device_read__alsa; pCallbacks->onDeviceWrite = ma_device_write__alsa; pCallbacks->onDeviceDataLoop = NULL; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__alsa; return MA_SUCCESS; } #endif /* MA_HAS_ALSA */ /****************************************************************************** PulseAudio Backend ******************************************************************************/ #ifdef MA_HAS_PULSEAUDIO /* The PulseAudio API, along with Apple's Core Audio, is the worst of the mainstream audio APIs. This is a brief description of what's going on in the PulseAudio backend. I apologize if this gets a bit ranty for your liking - you might want to skip this discussion. PulseAudio has something they call the "Simple API", which unfortunately isn't suitable for miniaudio. I've not seen anywhere where it allows you to enumerate over devices, nor does it seem to support the ability to stop and start streams. Looking at the documentation, it appears as though the stream is constantly running and you prevent sound from being emitted or captured by simply not calling the read or write functions. This is not a professional solution as it would be much better to *actually* stop the underlying stream. Perhaps the simple API has some smarts to do this automatically, but I'm not sure. Another limitation with the simple API is that it seems inefficient when you want to have multiple streams to a single context. For these reasons, miniaudio is not using the simple API. Since we're not using the simple API, we're left with the asynchronous API as our only other option. And boy, is this where it starts to get fun, and I don't mean that in a good way... The problems start with the very name of the API - "asynchronous". Yes, this is an asynchronous oriented API which means your commands don't immediately take effect. You instead need to issue your commands, and then wait for them to complete. The waiting mechanism is enabled through the use of a "main loop". In the asynchronous API you cannot get away from the main loop, and the main loop is where almost all of PulseAudio's problems stem from. When you first initialize PulseAudio you need an object referred to as "main loop". You can implement this yourself by defining your own vtable, but it's much easier to just use one of the built-in main loop implementations. There's two generic implementations called pa_mainloop and pa_threaded_mainloop, and another implementation specific to GLib called pa_glib_mainloop. We're using pa_threaded_mainloop because it simplifies management of the worker thread. The idea of the main loop object is pretty self explanatory - you're supposed to use it to implement a worker thread which runs in a loop. The main loop is where operations are actually executed. To initialize the main loop, you just use `pa_threaded_mainloop_new()`. This is the first function you'll call. You can then get a pointer to the vtable with `pa_threaded_mainloop_get_api()` (the main loop vtable is called `pa_mainloop_api`). Again, you can bypass the threaded main loop object entirely and just implement `pa_mainloop_api` directly, but there's no need for it unless you're doing something extremely specialized such as if you want to integrate it into your application's existing main loop infrastructure. (EDIT 2021-01-26: miniaudio is no longer using `pa_threaded_mainloop` due to this issue: https://github.com/mackron/miniaudio/issues/262. It is now using `pa_mainloop` which turns out to be a simpler solution anyway. The rest of this rant still applies, however.) Once you have your main loop vtable (the `pa_mainloop_api` object) you can create the PulseAudio context. This is very similar to miniaudio's context and they map to each other quite well. You have one context to many streams, which is basically the same as miniaudio's one `ma_context` to many `ma_device`s. Here's where it starts to get annoying, however. When you first create the PulseAudio context, which is done with `pa_context_new()`, it's not actually connected to anything. When you connect, you call `pa_context_connect()`. However, if you remember, PulseAudio is an asynchronous API. That means you cannot just assume the context is connected after `pa_context_context()` has returned. You instead need to wait for it to connect. To do this, you need to either wait for a callback to get fired, which you can set with `pa_context_set_state_callback()`, or you can continuously poll the context's state. Either way, you need to run this in a loop. All objects from here out are created from the context, and, I believe, you can't be creating these objects until the context is connected. This waiting loop is therefore unavoidable. In order for the waiting to ever complete, however, the main loop needs to be running. Before attempting to connect the context, the main loop needs to be started with `pa_threaded_mainloop_start()`. The reason for this asynchronous design is to support cases where you're connecting to a remote server, say through a local network or an internet connection. However, the *VAST* majority of cases don't involve this at all - they just connect to a local "server" running on the host machine. The fact that this would be the default rather than making `pa_context_connect()` synchronous tends to boggle the mind. Once the context has been created and connected you can start creating a stream. A PulseAudio stream is analogous to miniaudio's device. The initialization of a stream is fairly standard - you configure some attributes (analogous to miniaudio's device config) and then call `pa_stream_new()` to actually create it. Here is where we start to get into "operations". When configuring the stream, you can get information about the source (such as sample format, sample rate, etc.), however it's not synchronous. Instead, a `pa_operation` object is returned from `pa_context_get_source_info_by_name()` (capture) or `pa_context_get_sink_info_by_name()` (playback). Then, you need to run a loop (again!) to wait for the operation to complete which you can determine via a callback or polling, just like we did with the context. Then, as an added bonus, you need to decrement the reference counter of the `pa_operation` object to ensure memory is cleaned up. All of that just to retrieve basic information about a device! Once the basic information about the device has been retrieved, miniaudio can now create the stream with `ma_stream_new()`. Like the context, this needs to be connected. But we need to be careful here, because we're now about to introduce one of the most horrific design choices in PulseAudio. PulseAudio allows you to specify a callback that is fired when data can be written to or read from a stream. The language is important here because PulseAudio takes it literally, specifically the "can be". You would think these callbacks would be appropriate as the place for writing and reading data to and from the stream, and that would be right, except when it's not. When you initialize the stream, you can set a flag that tells PulseAudio to not start the stream automatically. This is required because miniaudio does not auto-start devices straight after initialization - you need to call `ma_device_start()` manually. The problem is that even when this flag is specified, PulseAudio will immediately fire its write or read callback. This is *technically* correct (based on the wording in the documentation) because indeed, data *can* be written at this point. The problem is that it's not *practical*. It makes sense that the write/read callback would be where a program will want to write or read data to or from the stream, but when it's called before the application has even requested that the stream be started, it's just not practical because the program probably isn't ready for any kind of data delivery at that point (it may still need to load files or whatnot). Instead, this callback should only be fired when the application requests the stream be started which is how it works with literally *every* other callback-based audio API. Since miniaudio forbids firing of the data callback until the device has been started (as it should be with *all* callback based APIs), logic needs to be added to ensure miniaudio doesn't just blindly fire the application-defined data callback from within the PulseAudio callback before the stream has actually been started. The device state is used for this - if the state is anything other than `ma_device_state_starting` or `ma_device_state_started`, the main data callback is not fired. This, unfortunately, is not the end of the problems with the PulseAudio write callback. Any normal callback based audio API will continuously fire the callback at regular intervals based on the size of the internal buffer. This will only ever be fired when the device is running, and will be fired regardless of whether or not the user actually wrote anything to the device/stream. This not the case in PulseAudio. In PulseAudio, the data callback will *only* be called if you wrote something to it previously. That means, if you don't call `pa_stream_write()`, the callback will not get fired. On the surface you wouldn't think this would matter because you should be always writing data, and if you don't have anything to write, just write silence. That's fine until you want to drain the stream. You see, if you're continuously writing data to the stream, the stream will never get drained! That means in order to drain the stream, you need to *not* write data to it! But remember, when you don't write data to the stream, the callback won't get fired again! Why is draining important? Because that's how we've defined stopping to work in miniaudio. In miniaudio, stopping the device requires it to be drained before returning from ma_device_stop(). So we've stopped the device, which requires us to drain, but draining requires us to *not* write data to the stream (or else it won't ever complete draining), but not writing to the stream means the callback won't get fired again! This becomes a problem when stopping and then restarting the device. When the device is stopped, it's drained, which requires us to *not* write anything to the stream. But then, since we didn't write anything to it, the write callback will *never* get called again if we just resume the stream naively. This means that starting the stream requires us to write data to the stream from outside the callback. This disconnect is something PulseAudio has got seriously wrong - there should only ever be a single source of data delivery, that being the callback. (I have tried using `pa_stream_flush()` to trigger the write callback to fire, but this just doesn't work for some reason.) Once you've created the stream, you need to connect it which involves the whole waiting procedure. This is the same process as the context, only this time you'll poll for the state with `pa_stream_get_status()`. The starting and stopping of a streaming is referred to as "corking" in PulseAudio. The analogy is corking a barrel. To start the stream, you uncork it, to stop it you cork it. Personally I think it's silly - why would you not just call it "starting" and "stopping" like any other normal audio API? Anyway, the act of corking is, you guessed it, asynchronous. This means you'll need our waiting loop as usual. Again, why this asynchronous design is the default is absolutely beyond me. Would it really be that hard to just make it run synchronously? Teardown is pretty simple (what?!). It's just a matter of calling the relevant `_unref()` function on each object in reverse order that they were initialized in. That's about it from the PulseAudio side. A bit ranty, I know, but they really need to fix that main loop and callback system. They're embarrassingly unpractical. The main loop thing is an easy fix - have synchronous versions of all APIs. If an application wants these to run asynchronously, they can execute them in a separate thread themselves. The desire to run these asynchronously is such a niche requirement - it makes no sense to make it the default. The stream write callback needs to be change, or an alternative provided, that is constantly fired, regardless of whether or not `pa_stream_write()` has been called, and it needs to take a pointer to a buffer as a parameter which the program just writes to directly rather than having to call `pa_stream_writable_size()` and `pa_stream_write()`. These changes alone will change PulseAudio from one of the worst audio APIs to one of the best. */ /* It is assumed pulseaudio.h is available when linking at compile time. When linking at compile time, we use the declarations in the header to check for type safety. We cannot do this when linking at run time because the header might not be available. */ #ifdef MA_NO_RUNTIME_LINKING /* pulseaudio.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ #if !defined(__cplusplus) #if defined(__STRICT_ANSI__) #if !defined(inline) #define inline __inline__ __attribute__((always_inline)) #define MA_INLINE_DEFINED #endif #endif #endif #include #if defined(MA_INLINE_DEFINED) #undef inline #undef MA_INLINE_DEFINED #endif #define MA_PA_OK PA_OK #define MA_PA_ERR_ACCESS PA_ERR_ACCESS #define MA_PA_ERR_INVALID PA_ERR_INVALID #define MA_PA_ERR_NOENTITY PA_ERR_NOENTITY #define MA_PA_ERR_NOTSUPPORTED PA_ERR_NOTSUPPORTED #define MA_PA_CHANNELS_MAX PA_CHANNELS_MAX #define MA_PA_RATE_MAX PA_RATE_MAX typedef pa_context_flags_t ma_pa_context_flags_t; #define MA_PA_CONTEXT_NOFLAGS PA_CONTEXT_NOFLAGS #define MA_PA_CONTEXT_NOAUTOSPAWN PA_CONTEXT_NOAUTOSPAWN #define MA_PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL typedef pa_stream_flags_t ma_pa_stream_flags_t; #define MA_PA_STREAM_NOFLAGS PA_STREAM_NOFLAGS #define MA_PA_STREAM_START_CORKED PA_STREAM_START_CORKED #define MA_PA_STREAM_INTERPOLATE_TIMING PA_STREAM_INTERPOLATE_TIMING #define MA_PA_STREAM_NOT_MONOTONIC PA_STREAM_NOT_MONOTONIC #define MA_PA_STREAM_AUTO_TIMING_UPDATE PA_STREAM_AUTO_TIMING_UPDATE #define MA_PA_STREAM_NO_REMAP_CHANNELS PA_STREAM_NO_REMAP_CHANNELS #define MA_PA_STREAM_NO_REMIX_CHANNELS PA_STREAM_NO_REMIX_CHANNELS #define MA_PA_STREAM_FIX_FORMAT PA_STREAM_FIX_FORMAT #define MA_PA_STREAM_FIX_RATE PA_STREAM_FIX_RATE #define MA_PA_STREAM_FIX_CHANNELS PA_STREAM_FIX_CHANNELS #define MA_PA_STREAM_DONT_MOVE PA_STREAM_DONT_MOVE #define MA_PA_STREAM_VARIABLE_RATE PA_STREAM_VARIABLE_RATE #define MA_PA_STREAM_PEAK_DETECT PA_STREAM_PEAK_DETECT #define MA_PA_STREAM_START_MUTED PA_STREAM_START_MUTED #define MA_PA_STREAM_ADJUST_LATENCY PA_STREAM_ADJUST_LATENCY #define MA_PA_STREAM_EARLY_REQUESTS PA_STREAM_EARLY_REQUESTS #define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND #define MA_PA_STREAM_START_UNMUTED PA_STREAM_START_UNMUTED #define MA_PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND #define MA_PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME #define MA_PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH typedef pa_sink_flags_t ma_pa_sink_flags_t; #define MA_PA_SINK_NOFLAGS PA_SINK_NOFLAGS #define MA_PA_SINK_HW_VOLUME_CTRL PA_SINK_HW_VOLUME_CTRL #define MA_PA_SINK_LATENCY PA_SINK_LATENCY #define MA_PA_SINK_HARDWARE PA_SINK_HARDWARE #define MA_PA_SINK_NETWORK PA_SINK_NETWORK #define MA_PA_SINK_HW_MUTE_CTRL PA_SINK_HW_MUTE_CTRL #define MA_PA_SINK_DECIBEL_VOLUME PA_SINK_DECIBEL_VOLUME #define MA_PA_SINK_FLAT_VOLUME PA_SINK_FLAT_VOLUME #define MA_PA_SINK_DYNAMIC_LATENCY PA_SINK_DYNAMIC_LATENCY #define MA_PA_SINK_SET_FORMATS PA_SINK_SET_FORMATS typedef pa_source_flags_t ma_pa_source_flags_t; #define MA_PA_SOURCE_NOFLAGS PA_SOURCE_NOFLAGS #define MA_PA_SOURCE_HW_VOLUME_CTRL PA_SOURCE_HW_VOLUME_CTRL #define MA_PA_SOURCE_LATENCY PA_SOURCE_LATENCY #define MA_PA_SOURCE_HARDWARE PA_SOURCE_HARDWARE #define MA_PA_SOURCE_NETWORK PA_SOURCE_NETWORK #define MA_PA_SOURCE_HW_MUTE_CTRL PA_SOURCE_HW_MUTE_CTRL #define MA_PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME #define MA_PA_SOURCE_DYNAMIC_LATENCY PA_SOURCE_DYNAMIC_LATENCY #define MA_PA_SOURCE_FLAT_VOLUME PA_SOURCE_FLAT_VOLUME typedef pa_context_state_t ma_pa_context_state_t; #define MA_PA_CONTEXT_UNCONNECTED PA_CONTEXT_UNCONNECTED #define MA_PA_CONTEXT_CONNECTING PA_CONTEXT_CONNECTING #define MA_PA_CONTEXT_AUTHORIZING PA_CONTEXT_AUTHORIZING #define MA_PA_CONTEXT_SETTING_NAME PA_CONTEXT_SETTING_NAME #define MA_PA_CONTEXT_READY PA_CONTEXT_READY #define MA_PA_CONTEXT_FAILED PA_CONTEXT_FAILED #define MA_PA_CONTEXT_TERMINATED PA_CONTEXT_TERMINATED typedef pa_stream_state_t ma_pa_stream_state_t; #define MA_PA_STREAM_UNCONNECTED PA_STREAM_UNCONNECTED #define MA_PA_STREAM_CREATING PA_STREAM_CREATING #define MA_PA_STREAM_READY PA_STREAM_READY #define MA_PA_STREAM_FAILED PA_STREAM_FAILED #define MA_PA_STREAM_TERMINATED PA_STREAM_TERMINATED typedef pa_operation_state_t ma_pa_operation_state_t; #define MA_PA_OPERATION_RUNNING PA_OPERATION_RUNNING #define MA_PA_OPERATION_DONE PA_OPERATION_DONE #define MA_PA_OPERATION_CANCELLED PA_OPERATION_CANCELLED typedef pa_sink_state_t ma_pa_sink_state_t; #define MA_PA_SINK_INVALID_STATE PA_SINK_INVALID_STATE #define MA_PA_SINK_RUNNING PA_SINK_RUNNING #define MA_PA_SINK_IDLE PA_SINK_IDLE #define MA_PA_SINK_SUSPENDED PA_SINK_SUSPENDED typedef pa_source_state_t ma_pa_source_state_t; #define MA_PA_SOURCE_INVALID_STATE PA_SOURCE_INVALID_STATE #define MA_PA_SOURCE_RUNNING PA_SOURCE_RUNNING #define MA_PA_SOURCE_IDLE PA_SOURCE_IDLE #define MA_PA_SOURCE_SUSPENDED PA_SOURCE_SUSPENDED typedef pa_seek_mode_t ma_pa_seek_mode_t; #define MA_PA_SEEK_RELATIVE PA_SEEK_RELATIVE #define MA_PA_SEEK_ABSOLUTE PA_SEEK_ABSOLUTE #define MA_PA_SEEK_RELATIVE_ON_READ PA_SEEK_RELATIVE_ON_READ #define MA_PA_SEEK_RELATIVE_END PA_SEEK_RELATIVE_END typedef pa_channel_position_t ma_pa_channel_position_t; #define MA_PA_CHANNEL_POSITION_INVALID PA_CHANNEL_POSITION_INVALID #define MA_PA_CHANNEL_POSITION_MONO PA_CHANNEL_POSITION_MONO #define MA_PA_CHANNEL_POSITION_FRONT_LEFT PA_CHANNEL_POSITION_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT PA_CHANNEL_POSITION_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_FRONT_CENTER PA_CHANNEL_POSITION_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_REAR_CENTER PA_CHANNEL_POSITION_REAR_CENTER #define MA_PA_CHANNEL_POSITION_REAR_LEFT PA_CHANNEL_POSITION_REAR_LEFT #define MA_PA_CHANNEL_POSITION_REAR_RIGHT PA_CHANNEL_POSITION_REAR_RIGHT #define MA_PA_CHANNEL_POSITION_LFE PA_CHANNEL_POSITION_LFE #define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER #define MA_PA_CHANNEL_POSITION_SIDE_LEFT PA_CHANNEL_POSITION_SIDE_LEFT #define MA_PA_CHANNEL_POSITION_SIDE_RIGHT PA_CHANNEL_POSITION_SIDE_RIGHT #define MA_PA_CHANNEL_POSITION_AUX0 PA_CHANNEL_POSITION_AUX0 #define MA_PA_CHANNEL_POSITION_AUX1 PA_CHANNEL_POSITION_AUX1 #define MA_PA_CHANNEL_POSITION_AUX2 PA_CHANNEL_POSITION_AUX2 #define MA_PA_CHANNEL_POSITION_AUX3 PA_CHANNEL_POSITION_AUX3 #define MA_PA_CHANNEL_POSITION_AUX4 PA_CHANNEL_POSITION_AUX4 #define MA_PA_CHANNEL_POSITION_AUX5 PA_CHANNEL_POSITION_AUX5 #define MA_PA_CHANNEL_POSITION_AUX6 PA_CHANNEL_POSITION_AUX6 #define MA_PA_CHANNEL_POSITION_AUX7 PA_CHANNEL_POSITION_AUX7 #define MA_PA_CHANNEL_POSITION_AUX8 PA_CHANNEL_POSITION_AUX8 #define MA_PA_CHANNEL_POSITION_AUX9 PA_CHANNEL_POSITION_AUX9 #define MA_PA_CHANNEL_POSITION_AUX10 PA_CHANNEL_POSITION_AUX10 #define MA_PA_CHANNEL_POSITION_AUX11 PA_CHANNEL_POSITION_AUX11 #define MA_PA_CHANNEL_POSITION_AUX12 PA_CHANNEL_POSITION_AUX12 #define MA_PA_CHANNEL_POSITION_AUX13 PA_CHANNEL_POSITION_AUX13 #define MA_PA_CHANNEL_POSITION_AUX14 PA_CHANNEL_POSITION_AUX14 #define MA_PA_CHANNEL_POSITION_AUX15 PA_CHANNEL_POSITION_AUX15 #define MA_PA_CHANNEL_POSITION_AUX16 PA_CHANNEL_POSITION_AUX16 #define MA_PA_CHANNEL_POSITION_AUX17 PA_CHANNEL_POSITION_AUX17 #define MA_PA_CHANNEL_POSITION_AUX18 PA_CHANNEL_POSITION_AUX18 #define MA_PA_CHANNEL_POSITION_AUX19 PA_CHANNEL_POSITION_AUX19 #define MA_PA_CHANNEL_POSITION_AUX20 PA_CHANNEL_POSITION_AUX20 #define MA_PA_CHANNEL_POSITION_AUX21 PA_CHANNEL_POSITION_AUX21 #define MA_PA_CHANNEL_POSITION_AUX22 PA_CHANNEL_POSITION_AUX22 #define MA_PA_CHANNEL_POSITION_AUX23 PA_CHANNEL_POSITION_AUX23 #define MA_PA_CHANNEL_POSITION_AUX24 PA_CHANNEL_POSITION_AUX24 #define MA_PA_CHANNEL_POSITION_AUX25 PA_CHANNEL_POSITION_AUX25 #define MA_PA_CHANNEL_POSITION_AUX26 PA_CHANNEL_POSITION_AUX26 #define MA_PA_CHANNEL_POSITION_AUX27 PA_CHANNEL_POSITION_AUX27 #define MA_PA_CHANNEL_POSITION_AUX28 PA_CHANNEL_POSITION_AUX28 #define MA_PA_CHANNEL_POSITION_AUX29 PA_CHANNEL_POSITION_AUX29 #define MA_PA_CHANNEL_POSITION_AUX30 PA_CHANNEL_POSITION_AUX30 #define MA_PA_CHANNEL_POSITION_AUX31 PA_CHANNEL_POSITION_AUX31 #define MA_PA_CHANNEL_POSITION_TOP_CENTER PA_CHANNEL_POSITION_TOP_CENTER #define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT PA_CHANNEL_POSITION_TOP_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT PA_CHANNEL_POSITION_TOP_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER PA_CHANNEL_POSITION_TOP_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT PA_CHANNEL_POSITION_TOP_REAR_LEFT #define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT PA_CHANNEL_POSITION_TOP_REAR_RIGHT #define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER PA_CHANNEL_POSITION_TOP_REAR_CENTER #define MA_PA_CHANNEL_POSITION_LEFT PA_CHANNEL_POSITION_LEFT #define MA_PA_CHANNEL_POSITION_RIGHT PA_CHANNEL_POSITION_RIGHT #define MA_PA_CHANNEL_POSITION_CENTER PA_CHANNEL_POSITION_CENTER #define MA_PA_CHANNEL_POSITION_SUBWOOFER PA_CHANNEL_POSITION_SUBWOOFER typedef pa_channel_map_def_t ma_pa_channel_map_def_t; #define MA_PA_CHANNEL_MAP_AIFF PA_CHANNEL_MAP_AIFF #define MA_PA_CHANNEL_MAP_ALSA PA_CHANNEL_MAP_ALSA #define MA_PA_CHANNEL_MAP_AUX PA_CHANNEL_MAP_AUX #define MA_PA_CHANNEL_MAP_WAVEEX PA_CHANNEL_MAP_WAVEEX #define MA_PA_CHANNEL_MAP_OSS PA_CHANNEL_MAP_OSS #define MA_PA_CHANNEL_MAP_DEFAULT PA_CHANNEL_MAP_DEFAULT typedef pa_sample_format_t ma_pa_sample_format_t; #define MA_PA_SAMPLE_INVALID PA_SAMPLE_INVALID #define MA_PA_SAMPLE_U8 PA_SAMPLE_U8 #define MA_PA_SAMPLE_ALAW PA_SAMPLE_ALAW #define MA_PA_SAMPLE_ULAW PA_SAMPLE_ULAW #define MA_PA_SAMPLE_S16LE PA_SAMPLE_S16LE #define MA_PA_SAMPLE_S16BE PA_SAMPLE_S16BE #define MA_PA_SAMPLE_FLOAT32LE PA_SAMPLE_FLOAT32LE #define MA_PA_SAMPLE_FLOAT32BE PA_SAMPLE_FLOAT32BE #define MA_PA_SAMPLE_S32LE PA_SAMPLE_S32LE #define MA_PA_SAMPLE_S32BE PA_SAMPLE_S32BE #define MA_PA_SAMPLE_S24LE PA_SAMPLE_S24LE #define MA_PA_SAMPLE_S24BE PA_SAMPLE_S24BE #define MA_PA_SAMPLE_S24_32LE PA_SAMPLE_S24_32LE #define MA_PA_SAMPLE_S24_32BE PA_SAMPLE_S24_32BE typedef pa_mainloop ma_pa_mainloop; typedef pa_threaded_mainloop ma_pa_threaded_mainloop; typedef pa_mainloop_api ma_pa_mainloop_api; typedef pa_context ma_pa_context; typedef pa_operation ma_pa_operation; typedef pa_stream ma_pa_stream; typedef pa_spawn_api ma_pa_spawn_api; typedef pa_buffer_attr ma_pa_buffer_attr; typedef pa_channel_map ma_pa_channel_map; typedef pa_cvolume ma_pa_cvolume; typedef pa_sample_spec ma_pa_sample_spec; typedef pa_sink_info ma_pa_sink_info; typedef pa_source_info ma_pa_source_info; typedef pa_context_notify_cb_t ma_pa_context_notify_cb_t; typedef pa_sink_info_cb_t ma_pa_sink_info_cb_t; typedef pa_source_info_cb_t ma_pa_source_info_cb_t; typedef pa_stream_success_cb_t ma_pa_stream_success_cb_t; typedef pa_stream_request_cb_t ma_pa_stream_request_cb_t; typedef pa_stream_notify_cb_t ma_pa_stream_notify_cb_t; typedef pa_free_cb_t ma_pa_free_cb_t; #else #define MA_PA_OK 0 #define MA_PA_ERR_ACCESS 1 #define MA_PA_ERR_INVALID 2 #define MA_PA_ERR_NOENTITY 5 #define MA_PA_ERR_NOTSUPPORTED 19 #define MA_PA_CHANNELS_MAX 32 #define MA_PA_RATE_MAX 384000 typedef int ma_pa_context_flags_t; #define MA_PA_CONTEXT_NOFLAGS 0x00000000 #define MA_PA_CONTEXT_NOAUTOSPAWN 0x00000001 #define MA_PA_CONTEXT_NOFAIL 0x00000002 typedef int ma_pa_stream_flags_t; #define MA_PA_STREAM_NOFLAGS 0x00000000 #define MA_PA_STREAM_START_CORKED 0x00000001 #define MA_PA_STREAM_INTERPOLATE_TIMING 0x00000002 #define MA_PA_STREAM_NOT_MONOTONIC 0x00000004 #define MA_PA_STREAM_AUTO_TIMING_UPDATE 0x00000008 #define MA_PA_STREAM_NO_REMAP_CHANNELS 0x00000010 #define MA_PA_STREAM_NO_REMIX_CHANNELS 0x00000020 #define MA_PA_STREAM_FIX_FORMAT 0x00000040 #define MA_PA_STREAM_FIX_RATE 0x00000080 #define MA_PA_STREAM_FIX_CHANNELS 0x00000100 #define MA_PA_STREAM_DONT_MOVE 0x00000200 #define MA_PA_STREAM_VARIABLE_RATE 0x00000400 #define MA_PA_STREAM_PEAK_DETECT 0x00000800 #define MA_PA_STREAM_START_MUTED 0x00001000 #define MA_PA_STREAM_ADJUST_LATENCY 0x00002000 #define MA_PA_STREAM_EARLY_REQUESTS 0x00004000 #define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND 0x00008000 #define MA_PA_STREAM_START_UNMUTED 0x00010000 #define MA_PA_STREAM_FAIL_ON_SUSPEND 0x00020000 #define MA_PA_STREAM_RELATIVE_VOLUME 0x00040000 #define MA_PA_STREAM_PASSTHROUGH 0x00080000 typedef int ma_pa_sink_flags_t; #define MA_PA_SINK_NOFLAGS 0x00000000 #define MA_PA_SINK_HW_VOLUME_CTRL 0x00000001 #define MA_PA_SINK_LATENCY 0x00000002 #define MA_PA_SINK_HARDWARE 0x00000004 #define MA_PA_SINK_NETWORK 0x00000008 #define MA_PA_SINK_HW_MUTE_CTRL 0x00000010 #define MA_PA_SINK_DECIBEL_VOLUME 0x00000020 #define MA_PA_SINK_FLAT_VOLUME 0x00000040 #define MA_PA_SINK_DYNAMIC_LATENCY 0x00000080 #define MA_PA_SINK_SET_FORMATS 0x00000100 typedef int ma_pa_source_flags_t; #define MA_PA_SOURCE_NOFLAGS 0x00000000 #define MA_PA_SOURCE_HW_VOLUME_CTRL 0x00000001 #define MA_PA_SOURCE_LATENCY 0x00000002 #define MA_PA_SOURCE_HARDWARE 0x00000004 #define MA_PA_SOURCE_NETWORK 0x00000008 #define MA_PA_SOURCE_HW_MUTE_CTRL 0x00000010 #define MA_PA_SOURCE_DECIBEL_VOLUME 0x00000020 #define MA_PA_SOURCE_DYNAMIC_LATENCY 0x00000040 #define MA_PA_SOURCE_FLAT_VOLUME 0x00000080 typedef int ma_pa_context_state_t; #define MA_PA_CONTEXT_UNCONNECTED 0 #define MA_PA_CONTEXT_CONNECTING 1 #define MA_PA_CONTEXT_AUTHORIZING 2 #define MA_PA_CONTEXT_SETTING_NAME 3 #define MA_PA_CONTEXT_READY 4 #define MA_PA_CONTEXT_FAILED 5 #define MA_PA_CONTEXT_TERMINATED 6 typedef int ma_pa_stream_state_t; #define MA_PA_STREAM_UNCONNECTED 0 #define MA_PA_STREAM_CREATING 1 #define MA_PA_STREAM_READY 2 #define MA_PA_STREAM_FAILED 3 #define MA_PA_STREAM_TERMINATED 4 typedef int ma_pa_operation_state_t; #define MA_PA_OPERATION_RUNNING 0 #define MA_PA_OPERATION_DONE 1 #define MA_PA_OPERATION_CANCELLED 2 typedef int ma_pa_sink_state_t; #define MA_PA_SINK_INVALID_STATE -1 #define MA_PA_SINK_RUNNING 0 #define MA_PA_SINK_IDLE 1 #define MA_PA_SINK_SUSPENDED 2 typedef int ma_pa_source_state_t; #define MA_PA_SOURCE_INVALID_STATE -1 #define MA_PA_SOURCE_RUNNING 0 #define MA_PA_SOURCE_IDLE 1 #define MA_PA_SOURCE_SUSPENDED 2 typedef int ma_pa_seek_mode_t; #define MA_PA_SEEK_RELATIVE 0 #define MA_PA_SEEK_ABSOLUTE 1 #define MA_PA_SEEK_RELATIVE_ON_READ 2 #define MA_PA_SEEK_RELATIVE_END 3 typedef int ma_pa_channel_position_t; #define MA_PA_CHANNEL_POSITION_INVALID -1 #define MA_PA_CHANNEL_POSITION_MONO 0 #define MA_PA_CHANNEL_POSITION_FRONT_LEFT 1 #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT 2 #define MA_PA_CHANNEL_POSITION_FRONT_CENTER 3 #define MA_PA_CHANNEL_POSITION_REAR_CENTER 4 #define MA_PA_CHANNEL_POSITION_REAR_LEFT 5 #define MA_PA_CHANNEL_POSITION_REAR_RIGHT 6 #define MA_PA_CHANNEL_POSITION_LFE 7 #define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER 8 #define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER 9 #define MA_PA_CHANNEL_POSITION_SIDE_LEFT 10 #define MA_PA_CHANNEL_POSITION_SIDE_RIGHT 11 #define MA_PA_CHANNEL_POSITION_AUX0 12 #define MA_PA_CHANNEL_POSITION_AUX1 13 #define MA_PA_CHANNEL_POSITION_AUX2 14 #define MA_PA_CHANNEL_POSITION_AUX3 15 #define MA_PA_CHANNEL_POSITION_AUX4 16 #define MA_PA_CHANNEL_POSITION_AUX5 17 #define MA_PA_CHANNEL_POSITION_AUX6 18 #define MA_PA_CHANNEL_POSITION_AUX7 19 #define MA_PA_CHANNEL_POSITION_AUX8 20 #define MA_PA_CHANNEL_POSITION_AUX9 21 #define MA_PA_CHANNEL_POSITION_AUX10 22 #define MA_PA_CHANNEL_POSITION_AUX11 23 #define MA_PA_CHANNEL_POSITION_AUX12 24 #define MA_PA_CHANNEL_POSITION_AUX13 25 #define MA_PA_CHANNEL_POSITION_AUX14 26 #define MA_PA_CHANNEL_POSITION_AUX15 27 #define MA_PA_CHANNEL_POSITION_AUX16 28 #define MA_PA_CHANNEL_POSITION_AUX17 29 #define MA_PA_CHANNEL_POSITION_AUX18 30 #define MA_PA_CHANNEL_POSITION_AUX19 31 #define MA_PA_CHANNEL_POSITION_AUX20 32 #define MA_PA_CHANNEL_POSITION_AUX21 33 #define MA_PA_CHANNEL_POSITION_AUX22 34 #define MA_PA_CHANNEL_POSITION_AUX23 35 #define MA_PA_CHANNEL_POSITION_AUX24 36 #define MA_PA_CHANNEL_POSITION_AUX25 37 #define MA_PA_CHANNEL_POSITION_AUX26 38 #define MA_PA_CHANNEL_POSITION_AUX27 39 #define MA_PA_CHANNEL_POSITION_AUX28 40 #define MA_PA_CHANNEL_POSITION_AUX29 41 #define MA_PA_CHANNEL_POSITION_AUX30 42 #define MA_PA_CHANNEL_POSITION_AUX31 43 #define MA_PA_CHANNEL_POSITION_TOP_CENTER 44 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT 45 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT 46 #define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER 47 #define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT 48 #define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT 49 #define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER 50 #define MA_PA_CHANNEL_POSITION_LEFT MA_PA_CHANNEL_POSITION_FRONT_LEFT #define MA_PA_CHANNEL_POSITION_RIGHT MA_PA_CHANNEL_POSITION_FRONT_RIGHT #define MA_PA_CHANNEL_POSITION_CENTER MA_PA_CHANNEL_POSITION_FRONT_CENTER #define MA_PA_CHANNEL_POSITION_SUBWOOFER MA_PA_CHANNEL_POSITION_LFE typedef int ma_pa_channel_map_def_t; #define MA_PA_CHANNEL_MAP_AIFF 0 #define MA_PA_CHANNEL_MAP_ALSA 1 #define MA_PA_CHANNEL_MAP_AUX 2 #define MA_PA_CHANNEL_MAP_WAVEEX 3 #define MA_PA_CHANNEL_MAP_OSS 4 #define MA_PA_CHANNEL_MAP_DEFAULT MA_PA_CHANNEL_MAP_AIFF typedef int ma_pa_sample_format_t; #define MA_PA_SAMPLE_INVALID -1 #define MA_PA_SAMPLE_U8 0 #define MA_PA_SAMPLE_ALAW 1 #define MA_PA_SAMPLE_ULAW 2 #define MA_PA_SAMPLE_S16LE 3 #define MA_PA_SAMPLE_S16BE 4 #define MA_PA_SAMPLE_FLOAT32LE 5 #define MA_PA_SAMPLE_FLOAT32BE 6 #define MA_PA_SAMPLE_S32LE 7 #define MA_PA_SAMPLE_S32BE 8 #define MA_PA_SAMPLE_S24LE 9 #define MA_PA_SAMPLE_S24BE 10 #define MA_PA_SAMPLE_S24_32LE 11 #define MA_PA_SAMPLE_S24_32BE 12 typedef struct ma_pa_mainloop ma_pa_mainloop; typedef struct ma_pa_threaded_mainloop ma_pa_threaded_mainloop; typedef struct ma_pa_mainloop_api ma_pa_mainloop_api; typedef struct ma_pa_context ma_pa_context; typedef struct ma_pa_operation ma_pa_operation; typedef struct ma_pa_stream ma_pa_stream; typedef struct ma_pa_spawn_api ma_pa_spawn_api; typedef struct { ma_uint32 maxlength; ma_uint32 tlength; ma_uint32 prebuf; ma_uint32 minreq; ma_uint32 fragsize; } ma_pa_buffer_attr; typedef struct { ma_uint8 channels; ma_pa_channel_position_t map[MA_PA_CHANNELS_MAX]; } ma_pa_channel_map; typedef struct { ma_uint8 channels; ma_uint32 values[MA_PA_CHANNELS_MAX]; } ma_pa_cvolume; typedef struct { ma_pa_sample_format_t format; ma_uint32 rate; ma_uint8 channels; } ma_pa_sample_spec; typedef struct { const char* name; ma_uint32 index; const char* description; ma_pa_sample_spec sample_spec; ma_pa_channel_map channel_map; ma_uint32 owner_module; ma_pa_cvolume volume; int mute; ma_uint32 monitor_source; const char* monitor_source_name; ma_uint64 latency; const char* driver; ma_pa_sink_flags_t flags; void* proplist; ma_uint64 configured_latency; ma_uint32 base_volume; ma_pa_sink_state_t state; ma_uint32 n_volume_steps; ma_uint32 card; ma_uint32 n_ports; void** ports; void* active_port; ma_uint8 n_formats; void** formats; } ma_pa_sink_info; typedef struct { const char *name; ma_uint32 index; const char *description; ma_pa_sample_spec sample_spec; ma_pa_channel_map channel_map; ma_uint32 owner_module; ma_pa_cvolume volume; int mute; ma_uint32 monitor_of_sink; const char *monitor_of_sink_name; ma_uint64 latency; const char *driver; ma_pa_source_flags_t flags; void* proplist; ma_uint64 configured_latency; ma_uint32 base_volume; ma_pa_source_state_t state; ma_uint32 n_volume_steps; ma_uint32 card; ma_uint32 n_ports; void** ports; void* active_port; ma_uint8 n_formats; void** formats; } ma_pa_source_info; typedef void (* ma_pa_context_notify_cb_t)(ma_pa_context* c, void* userdata); typedef void (* ma_pa_sink_info_cb_t) (ma_pa_context* c, const ma_pa_sink_info* i, int eol, void* userdata); typedef void (* ma_pa_source_info_cb_t) (ma_pa_context* c, const ma_pa_source_info* i, int eol, void* userdata); typedef void (* ma_pa_stream_success_cb_t)(ma_pa_stream* s, int success, void* userdata); typedef void (* ma_pa_stream_request_cb_t)(ma_pa_stream* s, size_t nbytes, void* userdata); typedef void (* ma_pa_stream_notify_cb_t) (ma_pa_stream* s, void* userdata); typedef void (* ma_pa_free_cb_t) (void* p); #endif typedef ma_pa_mainloop* (* ma_pa_mainloop_new_proc) (void); typedef void (* ma_pa_mainloop_free_proc) (ma_pa_mainloop* m); typedef void (* ma_pa_mainloop_quit_proc) (ma_pa_mainloop* m, int retval); typedef ma_pa_mainloop_api* (* ma_pa_mainloop_get_api_proc) (ma_pa_mainloop* m); typedef int (* ma_pa_mainloop_iterate_proc) (ma_pa_mainloop* m, int block, int* retval); typedef void (* ma_pa_mainloop_wakeup_proc) (ma_pa_mainloop* m); typedef ma_pa_threaded_mainloop* (* ma_pa_threaded_mainloop_new_proc) (void); typedef void (* ma_pa_threaded_mainloop_free_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_start_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_stop_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_lock_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_unlock_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_wait_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_signal_proc) (ma_pa_threaded_mainloop* m, int wait_for_accept); typedef void (* ma_pa_threaded_mainloop_accept_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_get_retval_proc) (ma_pa_threaded_mainloop* m); typedef ma_pa_mainloop_api* (* ma_pa_threaded_mainloop_get_api_proc) (ma_pa_threaded_mainloop* m); typedef int (* ma_pa_threaded_mainloop_in_thread_proc) (ma_pa_threaded_mainloop* m); typedef void (* ma_pa_threaded_mainloop_set_name_proc) (ma_pa_threaded_mainloop* m, const char* name); typedef ma_pa_context* (* ma_pa_context_new_proc) (ma_pa_mainloop_api* mainloop, const char* name); typedef void (* ma_pa_context_unref_proc) (ma_pa_context* c); typedef int (* ma_pa_context_connect_proc) (ma_pa_context* c, const char* server, ma_pa_context_flags_t flags, const ma_pa_spawn_api* api); typedef void (* ma_pa_context_disconnect_proc) (ma_pa_context* c); typedef void (* ma_pa_context_set_state_callback_proc) (ma_pa_context* c, ma_pa_context_notify_cb_t cb, void* userdata); typedef ma_pa_context_state_t (* ma_pa_context_get_state_proc) (ma_pa_context* c); typedef ma_pa_operation* (* ma_pa_context_get_sink_info_list_proc) (ma_pa_context* c, ma_pa_sink_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_source_info_list_proc) (ma_pa_context* c, ma_pa_source_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_sink_info_by_name_proc) (ma_pa_context* c, const char* name, ma_pa_sink_info_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_context_get_source_info_by_name_proc)(ma_pa_context* c, const char* name, ma_pa_source_info_cb_t cb, void* userdata); typedef void (* ma_pa_operation_unref_proc) (ma_pa_operation* o); typedef ma_pa_operation_state_t (* ma_pa_operation_get_state_proc) (ma_pa_operation* o); typedef ma_pa_channel_map* (* ma_pa_channel_map_init_extend_proc) (ma_pa_channel_map* m, unsigned channels, ma_pa_channel_map_def_t def); typedef int (* ma_pa_channel_map_valid_proc) (const ma_pa_channel_map* m); typedef int (* ma_pa_channel_map_compatible_proc) (const ma_pa_channel_map* m, const ma_pa_sample_spec* ss); typedef ma_pa_stream* (* ma_pa_stream_new_proc) (ma_pa_context* c, const char* name, const ma_pa_sample_spec* ss, const ma_pa_channel_map* map); typedef void (* ma_pa_stream_unref_proc) (ma_pa_stream* s); typedef int (* ma_pa_stream_connect_playback_proc) (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags, const ma_pa_cvolume* volume, ma_pa_stream* sync_stream); typedef int (* ma_pa_stream_connect_record_proc) (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags); typedef int (* ma_pa_stream_disconnect_proc) (ma_pa_stream* s); typedef ma_pa_stream_state_t (* ma_pa_stream_get_state_proc) (ma_pa_stream* s); typedef const ma_pa_sample_spec* (* ma_pa_stream_get_sample_spec_proc) (ma_pa_stream* s); typedef const ma_pa_channel_map* (* ma_pa_stream_get_channel_map_proc) (ma_pa_stream* s); typedef const ma_pa_buffer_attr* (* ma_pa_stream_get_buffer_attr_proc) (ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_set_buffer_attr_proc) (ma_pa_stream* s, const ma_pa_buffer_attr* attr, ma_pa_stream_success_cb_t cb, void* userdata); typedef const char* (* ma_pa_stream_get_device_name_proc) (ma_pa_stream* s); typedef void (* ma_pa_stream_set_write_callback_proc) (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_read_callback_proc) (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_suspended_callback_proc) (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata); typedef void (* ma_pa_stream_set_moved_callback_proc) (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata); typedef int (* ma_pa_stream_is_suspended_proc) (const ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_flush_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_stream_drain_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef int (* ma_pa_stream_is_corked_proc) (ma_pa_stream* s); typedef ma_pa_operation* (* ma_pa_stream_cork_proc) (ma_pa_stream* s, int b, ma_pa_stream_success_cb_t cb, void* userdata); typedef ma_pa_operation* (* ma_pa_stream_trigger_proc) (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata); typedef int (* ma_pa_stream_begin_write_proc) (ma_pa_stream* s, void** data, size_t* nbytes); typedef int (* ma_pa_stream_write_proc) (ma_pa_stream* s, const void* data, size_t nbytes, ma_pa_free_cb_t free_cb, int64_t offset, ma_pa_seek_mode_t seek); typedef int (* ma_pa_stream_peek_proc) (ma_pa_stream* s, const void** data, size_t* nbytes); typedef int (* ma_pa_stream_drop_proc) (ma_pa_stream* s); typedef size_t (* ma_pa_stream_writable_size_proc) (ma_pa_stream* s); typedef size_t (* ma_pa_stream_readable_size_proc) (ma_pa_stream* s); typedef struct { ma_uint32 count; ma_uint32 capacity; ma_device_info* pInfo; } ma_pulse_device_enum_data; static ma_result ma_result_from_pulse(int result) { if (result < 0) { return MA_ERROR; } switch (result) { case MA_PA_OK: return MA_SUCCESS; case MA_PA_ERR_ACCESS: return MA_ACCESS_DENIED; case MA_PA_ERR_INVALID: return MA_INVALID_ARGS; case MA_PA_ERR_NOENTITY: return MA_NO_DEVICE; default: return MA_ERROR; } } #if 0 static ma_pa_sample_format_t ma_format_to_pulse(ma_format format) { if (ma_is_little_endian()) { switch (format) { case ma_format_s16: return MA_PA_SAMPLE_S16LE; case ma_format_s24: return MA_PA_SAMPLE_S24LE; case ma_format_s32: return MA_PA_SAMPLE_S32LE; case ma_format_f32: return MA_PA_SAMPLE_FLOAT32LE; default: break; } } else { switch (format) { case ma_format_s16: return MA_PA_SAMPLE_S16BE; case ma_format_s24: return MA_PA_SAMPLE_S24BE; case ma_format_s32: return MA_PA_SAMPLE_S32BE; case ma_format_f32: return MA_PA_SAMPLE_FLOAT32BE; default: break; } } /* Endian agnostic. */ switch (format) { case ma_format_u8: return MA_PA_SAMPLE_U8; default: return MA_PA_SAMPLE_INVALID; } } #endif static ma_format ma_format_from_pulse(ma_pa_sample_format_t format) { if (ma_is_little_endian()) { switch (format) { case MA_PA_SAMPLE_S16LE: return ma_format_s16; case MA_PA_SAMPLE_S24LE: return ma_format_s24; case MA_PA_SAMPLE_S32LE: return ma_format_s32; case MA_PA_SAMPLE_FLOAT32LE: return ma_format_f32; default: break; } } else { switch (format) { case MA_PA_SAMPLE_S16BE: return ma_format_s16; case MA_PA_SAMPLE_S24BE: return ma_format_s24; case MA_PA_SAMPLE_S32BE: return ma_format_s32; case MA_PA_SAMPLE_FLOAT32BE: return ma_format_f32; default: break; } } /* Endian agnostic. */ switch (format) { case MA_PA_SAMPLE_U8: return ma_format_u8; default: return ma_format_unknown; } } static ma_channel ma_channel_position_from_pulse(ma_pa_channel_position_t position) { switch (position) { case MA_PA_CHANNEL_POSITION_INVALID: return MA_CHANNEL_NONE; case MA_PA_CHANNEL_POSITION_MONO: return MA_CHANNEL_MONO; case MA_PA_CHANNEL_POSITION_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case MA_PA_CHANNEL_POSITION_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case MA_PA_CHANNEL_POSITION_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case MA_PA_CHANNEL_POSITION_REAR_CENTER: return MA_CHANNEL_BACK_CENTER; case MA_PA_CHANNEL_POSITION_REAR_LEFT: return MA_CHANNEL_BACK_LEFT; case MA_PA_CHANNEL_POSITION_REAR_RIGHT: return MA_CHANNEL_BACK_RIGHT; case MA_PA_CHANNEL_POSITION_LFE: return MA_CHANNEL_LFE; case MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case MA_PA_CHANNEL_POSITION_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case MA_PA_CHANNEL_POSITION_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case MA_PA_CHANNEL_POSITION_AUX0: return MA_CHANNEL_AUX_0; case MA_PA_CHANNEL_POSITION_AUX1: return MA_CHANNEL_AUX_1; case MA_PA_CHANNEL_POSITION_AUX2: return MA_CHANNEL_AUX_2; case MA_PA_CHANNEL_POSITION_AUX3: return MA_CHANNEL_AUX_3; case MA_PA_CHANNEL_POSITION_AUX4: return MA_CHANNEL_AUX_4; case MA_PA_CHANNEL_POSITION_AUX5: return MA_CHANNEL_AUX_5; case MA_PA_CHANNEL_POSITION_AUX6: return MA_CHANNEL_AUX_6; case MA_PA_CHANNEL_POSITION_AUX7: return MA_CHANNEL_AUX_7; case MA_PA_CHANNEL_POSITION_AUX8: return MA_CHANNEL_AUX_8; case MA_PA_CHANNEL_POSITION_AUX9: return MA_CHANNEL_AUX_9; case MA_PA_CHANNEL_POSITION_AUX10: return MA_CHANNEL_AUX_10; case MA_PA_CHANNEL_POSITION_AUX11: return MA_CHANNEL_AUX_11; case MA_PA_CHANNEL_POSITION_AUX12: return MA_CHANNEL_AUX_12; case MA_PA_CHANNEL_POSITION_AUX13: return MA_CHANNEL_AUX_13; case MA_PA_CHANNEL_POSITION_AUX14: return MA_CHANNEL_AUX_14; case MA_PA_CHANNEL_POSITION_AUX15: return MA_CHANNEL_AUX_15; case MA_PA_CHANNEL_POSITION_AUX16: return MA_CHANNEL_AUX_16; case MA_PA_CHANNEL_POSITION_AUX17: return MA_CHANNEL_AUX_17; case MA_PA_CHANNEL_POSITION_AUX18: return MA_CHANNEL_AUX_18; case MA_PA_CHANNEL_POSITION_AUX19: return MA_CHANNEL_AUX_19; case MA_PA_CHANNEL_POSITION_AUX20: return MA_CHANNEL_AUX_20; case MA_PA_CHANNEL_POSITION_AUX21: return MA_CHANNEL_AUX_21; case MA_PA_CHANNEL_POSITION_AUX22: return MA_CHANNEL_AUX_22; case MA_PA_CHANNEL_POSITION_AUX23: return MA_CHANNEL_AUX_23; case MA_PA_CHANNEL_POSITION_AUX24: return MA_CHANNEL_AUX_24; case MA_PA_CHANNEL_POSITION_AUX25: return MA_CHANNEL_AUX_25; case MA_PA_CHANNEL_POSITION_AUX26: return MA_CHANNEL_AUX_26; case MA_PA_CHANNEL_POSITION_AUX27: return MA_CHANNEL_AUX_27; case MA_PA_CHANNEL_POSITION_AUX28: return MA_CHANNEL_AUX_28; case MA_PA_CHANNEL_POSITION_AUX29: return MA_CHANNEL_AUX_29; case MA_PA_CHANNEL_POSITION_AUX30: return MA_CHANNEL_AUX_30; case MA_PA_CHANNEL_POSITION_AUX31: return MA_CHANNEL_AUX_31; case MA_PA_CHANNEL_POSITION_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; case MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; default: return MA_CHANNEL_NONE; } } #if 0 static ma_pa_channel_position_t ma_channel_position_to_pulse(ma_channel position) { switch (position) { case MA_CHANNEL_NONE: return MA_PA_CHANNEL_POSITION_INVALID; case MA_CHANNEL_FRONT_LEFT: return MA_PA_CHANNEL_POSITION_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return MA_PA_CHANNEL_POSITION_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_CENTER; case MA_CHANNEL_LFE: return MA_PA_CHANNEL_POSITION_LFE; case MA_CHANNEL_BACK_LEFT: return MA_PA_CHANNEL_POSITION_REAR_LEFT; case MA_CHANNEL_BACK_RIGHT: return MA_PA_CHANNEL_POSITION_REAR_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return MA_PA_CHANNEL_POSITION_REAR_CENTER; case MA_CHANNEL_SIDE_LEFT: return MA_PA_CHANNEL_POSITION_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return MA_PA_CHANNEL_POSITION_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return MA_PA_CHANNEL_POSITION_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT; case MA_CHANNEL_19: return MA_PA_CHANNEL_POSITION_AUX18; case MA_CHANNEL_20: return MA_PA_CHANNEL_POSITION_AUX19; case MA_CHANNEL_21: return MA_PA_CHANNEL_POSITION_AUX20; case MA_CHANNEL_22: return MA_PA_CHANNEL_POSITION_AUX21; case MA_CHANNEL_23: return MA_PA_CHANNEL_POSITION_AUX22; case MA_CHANNEL_24: return MA_PA_CHANNEL_POSITION_AUX23; case MA_CHANNEL_25: return MA_PA_CHANNEL_POSITION_AUX24; case MA_CHANNEL_26: return MA_PA_CHANNEL_POSITION_AUX25; case MA_CHANNEL_27: return MA_PA_CHANNEL_POSITION_AUX26; case MA_CHANNEL_28: return MA_PA_CHANNEL_POSITION_AUX27; case MA_CHANNEL_29: return MA_PA_CHANNEL_POSITION_AUX28; case MA_CHANNEL_30: return MA_PA_CHANNEL_POSITION_AUX29; case MA_CHANNEL_31: return MA_PA_CHANNEL_POSITION_AUX30; case MA_CHANNEL_32: return MA_PA_CHANNEL_POSITION_AUX31; default: return (ma_pa_channel_position_t)position; } } #endif static ma_result ma_wait_for_operation__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP) { int resultPA; ma_pa_operation_state_t state; MA_ASSERT(pContext != NULL); MA_ASSERT(pOP != NULL); for (;;) { state = ((ma_pa_operation_get_state_proc)pContext->pulse.pa_operation_get_state)(pOP); if (state != MA_PA_OPERATION_RUNNING) { break; /* Done. */ } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } return MA_SUCCESS; } static ma_result ma_wait_for_operation_and_unref__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP) { ma_result result; if (pOP == NULL) { return MA_INVALID_ARGS; } result = ma_wait_for_operation__pulse(pContext, pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); return result; } static ma_result ma_wait_for_pa_context_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pPulseContext) { int resultPA; ma_pa_context_state_t state; for (;;) { state = ((ma_pa_context_get_state_proc)pContext->pulse.pa_context_get_state)((ma_pa_context*)pPulseContext); if (state == MA_PA_CONTEXT_READY) { break; /* Done. */ } if (state == MA_PA_CONTEXT_FAILED || state == MA_PA_CONTEXT_TERMINATED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while connecting the PulseAudio context."); return MA_ERROR; } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } /* Should never get here. */ return MA_SUCCESS; } static ma_result ma_wait_for_pa_stream_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pStream) { int resultPA; ma_pa_stream_state_t state; for (;;) { state = ((ma_pa_stream_get_state_proc)pContext->pulse.pa_stream_get_state)((ma_pa_stream*)pStream); if (state == MA_PA_STREAM_READY) { break; /* Done. */ } if (state == MA_PA_STREAM_FAILED || state == MA_PA_STREAM_TERMINATED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while connecting the PulseAudio stream."); return MA_ERROR; } resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL); if (resultPA < 0) { return ma_result_from_pulse(resultPA); } } return MA_SUCCESS; } static ma_result ma_init_pa_mainloop_and_pa_context__pulse(ma_context* pContext, const char* pApplicationName, const char* pServerName, ma_bool32 tryAutoSpawn, ma_ptr* ppMainLoop, ma_ptr* ppPulseContext) { ma_result result; ma_ptr pMainLoop; ma_ptr pPulseContext; MA_ASSERT(ppMainLoop != NULL); MA_ASSERT(ppPulseContext != NULL); /* The PulseAudio context maps well to miniaudio's notion of a context. The pa_context object will be initialized as part of the ma_context. */ pMainLoop = ((ma_pa_mainloop_new_proc)pContext->pulse.pa_mainloop_new)(); if (pMainLoop == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create mainloop."); return MA_FAILED_TO_INIT_BACKEND; } pPulseContext = ((ma_pa_context_new_proc)pContext->pulse.pa_context_new)(((ma_pa_mainloop_get_api_proc)pContext->pulse.pa_mainloop_get_api)((ma_pa_mainloop*)pMainLoop), pApplicationName); if (pPulseContext == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio context."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return MA_FAILED_TO_INIT_BACKEND; } /* Now we need to connect to the context. Everything is asynchronous so we need to wait for it to connect before returning. */ result = ma_result_from_pulse(((ma_pa_context_connect_proc)pContext->pulse.pa_context_connect)((ma_pa_context*)pPulseContext, pServerName, (tryAutoSpawn) ? 0 : MA_PA_CONTEXT_NOAUTOSPAWN, NULL)); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio context."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return result; } /* Since ma_context_init() runs synchronously we need to wait for the PulseAudio context to connect before we return. */ result = ma_wait_for_pa_context_to_connect__pulse(pContext, pMainLoop, pPulseContext); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[PulseAudio] Waiting for connection failed."); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop)); return result; } *ppMainLoop = pMainLoop; *ppPulseContext = pPulseContext; return MA_SUCCESS; } static void ma_device_sink_info_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_pa_sink_info* pInfoOut; if (endOfList > 0) { return; } /* There has been a report that indicates that pInfo can be null which results in a null pointer dereference below. We'll check for this for safety. */ if (pInfo == NULL) { return; } pInfoOut = (ma_pa_sink_info*)pUserData; MA_ASSERT(pInfoOut != NULL); *pInfoOut = *pInfo; (void)pPulseContext; /* Unused. */ } static void ma_device_source_info_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_pa_source_info* pInfoOut; if (endOfList > 0) { return; } /* There has been a report that indicates that pInfo can be null which results in a null pointer dereference below. We'll check for this for safety. */ if (pInfo == NULL) { return; } pInfoOut = (ma_pa_source_info*)pUserData; MA_ASSERT(pInfoOut != NULL); *pInfoOut = *pInfo; (void)pPulseContext; /* Unused. */ } #if 0 static void ma_device_sink_name_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_device* pDevice; if (endOfList > 0) { return; } pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), pInfo->description, (size_t)-1); (void)pPulseContext; /* Unused. */ } static void ma_device_source_name_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_device* pDevice; if (endOfList > 0) { return; } pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), pInfo->description, (size_t)-1); (void)pPulseContext; /* Unused. */ } #endif static ma_result ma_context_get_sink_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_sink_info* pSinkInfo) { ma_pa_operation* pOP; pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_sink_info_callback, pSinkInfo); if (pOP == NULL) { return MA_ERROR; } return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } static ma_result ma_context_get_source_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_source_info* pSourceInfo) { ma_pa_operation* pOP; pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_source_info_callback, pSourceInfo); if (pOP == NULL) { return MA_ERROR; } return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } static ma_result ma_context_get_default_device_index__pulse(ma_context* pContext, ma_device_type deviceType, ma_uint32* pIndex) { ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pIndex != NULL); if (pIndex != NULL) { *pIndex = (ma_uint32)-1; } if (deviceType == ma_device_type_playback) { ma_pa_sink_info sinkInfo; result = ma_context_get_sink_info__pulse(pContext, NULL, &sinkInfo); if (result != MA_SUCCESS) { return result; } if (pIndex != NULL) { *pIndex = sinkInfo.index; } } if (deviceType == ma_device_type_capture) { ma_pa_source_info sourceInfo; result = ma_context_get_source_info__pulse(pContext, NULL, &sourceInfo); if (result != MA_SUCCESS) { return result; } if (pIndex != NULL) { *pIndex = sourceInfo.index; } } return MA_SUCCESS; } typedef struct { ma_context* pContext; ma_enum_devices_callback_proc callback; void* pUserData; ma_bool32 isTerminated; ma_uint32 defaultDeviceIndexPlayback; ma_uint32 defaultDeviceIndexCapture; } ma_context_enumerate_devices_callback_data__pulse; static void ma_context_enumerate_devices_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pSinkInfo, int endOfList, void* pUserData) { ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData; ma_device_info deviceInfo; MA_ASSERT(pData != NULL); if (endOfList || pData->isTerminated) { return; } MA_ZERO_OBJECT(&deviceInfo); /* The name from PulseAudio is the ID for miniaudio. */ if (pSinkInfo->name != NULL) { ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSinkInfo->name, (size_t)-1); } /* The description from PulseAudio is the name for miniaudio. */ if (pSinkInfo->description != NULL) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSinkInfo->description, (size_t)-1); } if (pSinkInfo->index == pData->defaultDeviceIndexPlayback) { deviceInfo.isDefault = MA_TRUE; } pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_playback, &deviceInfo, pData->pUserData); (void)pPulseContext; /* Unused. */ } static void ma_context_enumerate_devices_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pSourceInfo, int endOfList, void* pUserData) { ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData; ma_device_info deviceInfo; MA_ASSERT(pData != NULL); if (endOfList || pData->isTerminated) { return; } MA_ZERO_OBJECT(&deviceInfo); /* The name from PulseAudio is the ID for miniaudio. */ if (pSourceInfo->name != NULL) { ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSourceInfo->name, (size_t)-1); } /* The description from PulseAudio is the name for miniaudio. */ if (pSourceInfo->description != NULL) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSourceInfo->description, (size_t)-1); } if (pSourceInfo->index == pData->defaultDeviceIndexCapture) { deviceInfo.isDefault = MA_TRUE; } pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_capture, &deviceInfo, pData->pUserData); (void)pPulseContext; /* Unused. */ } static ma_result ma_context_enumerate_devices__pulse(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result = MA_SUCCESS; ma_context_enumerate_devices_callback_data__pulse callbackData; ma_pa_operation* pOP = NULL; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); callbackData.pContext = pContext; callbackData.callback = callback; callbackData.pUserData = pUserData; callbackData.isTerminated = MA_FALSE; callbackData.defaultDeviceIndexPlayback = (ma_uint32)-1; callbackData.defaultDeviceIndexCapture = (ma_uint32)-1; /* We need to get the index of the default devices. */ ma_context_get_default_device_index__pulse(pContext, ma_device_type_playback, &callbackData.defaultDeviceIndexPlayback); ma_context_get_default_device_index__pulse(pContext, ma_device_type_capture, &callbackData.defaultDeviceIndexCapture); /* Playback. */ if (!callbackData.isTerminated) { pOP = ((ma_pa_context_get_sink_info_list_proc)pContext->pulse.pa_context_get_sink_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_sink_callback__pulse, &callbackData); if (pOP == NULL) { result = MA_ERROR; goto done; } result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); if (result != MA_SUCCESS) { goto done; } } /* Capture. */ if (!callbackData.isTerminated) { pOP = ((ma_pa_context_get_source_info_list_proc)pContext->pulse.pa_context_get_source_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_source_callback__pulse, &callbackData); if (pOP == NULL) { result = MA_ERROR; goto done; } result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP); ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP); if (result != MA_SUCCESS) { goto done; } } done: return result; } typedef struct { ma_device_info* pDeviceInfo; ma_uint32 defaultDeviceIndex; ma_bool32 foundDevice; } ma_context_get_device_info_callback_data__pulse; static void ma_context_get_device_info_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData) { ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData; if (endOfList > 0) { return; } MA_ASSERT(pData != NULL); pData->foundDevice = MA_TRUE; if (pInfo->name != NULL) { ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1); } if (pInfo->description != NULL) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1); } /* We're just reporting a single data format here. I think technically PulseAudio might support all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to report the "native" device format. */ pData->pDeviceInfo->nativeDataFormats[0].format = ma_format_from_pulse(pInfo->sample_spec.format); pData->pDeviceInfo->nativeDataFormats[0].channels = pInfo->sample_spec.channels; pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate; pData->pDeviceInfo->nativeDataFormats[0].flags = 0; pData->pDeviceInfo->nativeDataFormatCount = 1; if (pData->defaultDeviceIndex == pInfo->index) { pData->pDeviceInfo->isDefault = MA_TRUE; } (void)pPulseContext; /* Unused. */ } static void ma_context_get_device_info_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData) { ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData; if (endOfList > 0) { return; } MA_ASSERT(pData != NULL); pData->foundDevice = MA_TRUE; if (pInfo->name != NULL) { ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1); } if (pInfo->description != NULL) { ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1); } /* We're just reporting a single data format here. I think technically PulseAudio might support all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to report the "native" device format. */ pData->pDeviceInfo->nativeDataFormats[0].format = ma_format_from_pulse(pInfo->sample_spec.format); pData->pDeviceInfo->nativeDataFormats[0].channels = pInfo->sample_spec.channels; pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate; pData->pDeviceInfo->nativeDataFormats[0].flags = 0; pData->pDeviceInfo->nativeDataFormatCount = 1; if (pData->defaultDeviceIndex == pInfo->index) { pData->pDeviceInfo->isDefault = MA_TRUE; } (void)pPulseContext; /* Unused. */ } static ma_result ma_context_get_device_info__pulse(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result = MA_SUCCESS; ma_context_get_device_info_callback_data__pulse callbackData; ma_pa_operation* pOP = NULL; const char* pDeviceName = NULL; MA_ASSERT(pContext != NULL); callbackData.pDeviceInfo = pDeviceInfo; callbackData.foundDevice = MA_FALSE; if (pDeviceID != NULL) { pDeviceName = pDeviceID->pulse; } else { pDeviceName = NULL; } result = ma_context_get_default_device_index__pulse(pContext, deviceType, &callbackData.defaultDeviceIndex); if (deviceType == ma_device_type_playback) { pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_sink_callback__pulse, &callbackData); } else { pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_source_callback__pulse, &callbackData); } if (pOP != NULL) { ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP); } else { result = MA_ERROR; goto done; } if (!callbackData.foundDevice) { result = MA_NO_DEVICE; goto done; } done: return result; } static ma_result ma_device_uninit__pulse(ma_device* pDevice) { ma_context* pContext; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture); ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } if (pDevice->type == ma_device_type_duplex) { ma_duplex_rb_uninit(&pDevice->duplexRB); } ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pDevice->pulse.pPulseContext); ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pDevice->pulse.pPulseContext); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pDevice->pulse.pMainLoop); return MA_SUCCESS; } static ma_pa_buffer_attr ma_device__pa_buffer_attr_new(ma_uint32 periodSizeInFrames, ma_uint32 periods, const ma_pa_sample_spec* ss) { ma_pa_buffer_attr attr; attr.maxlength = periodSizeInFrames * periods * ma_get_bytes_per_frame(ma_format_from_pulse(ss->format), ss->channels); attr.tlength = attr.maxlength / periods; attr.prebuf = (ma_uint32)-1; attr.minreq = (ma_uint32)-1; attr.fragsize = attr.maxlength / periods; return attr; } static ma_pa_stream* ma_device__pa_stream_new__pulse(ma_device* pDevice, const char* pStreamName, const ma_pa_sample_spec* ss, const ma_pa_channel_map* cmap) { static ma_atomic_uint32 g_StreamCounter = { 0 }; char actualStreamName[256]; if (pStreamName != NULL) { ma_strncpy_s(actualStreamName, sizeof(actualStreamName), pStreamName, (size_t)-1); } else { const char* pBaseName = "miniaudio:"; size_t baseNameLen = strlen(pBaseName); ma_strcpy_s(actualStreamName, sizeof(actualStreamName), pBaseName); ma_itoa_s((int)ma_atomic_uint32_get(&g_StreamCounter), actualStreamName + baseNameLen, sizeof(actualStreamName)-baseNameLen, 10); } ma_atomic_uint32_fetch_add(&g_StreamCounter, 1); return ((ma_pa_stream_new_proc)pDevice->pContext->pulse.pa_stream_new)((ma_pa_context*)pDevice->pulse.pPulseContext, actualStreamName, ss, cmap); } static void ma_device_on_read__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 bpf; ma_uint32 deviceState; ma_uint64 frameCount; ma_uint64 framesProcessed; MA_ASSERT(pDevice != NULL); /* Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio can fire this callback before the stream has even started. Ridiculous. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { return; } bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); MA_ASSERT(bpf > 0); frameCount = byteCount / bpf; framesProcessed = 0; while (ma_device_get_state(pDevice) == ma_device_state_started && framesProcessed < frameCount) { const void* pMappedPCMFrames; size_t bytesMapped; ma_uint64 framesMapped; int pulseResult = ((ma_pa_stream_peek_proc)pDevice->pContext->pulse.pa_stream_peek)(pStream, &pMappedPCMFrames, &bytesMapped); if (pulseResult < 0) { break; /* Failed to map. Abort. */ } framesMapped = bytesMapped / bpf; if (framesMapped > 0) { if (pMappedPCMFrames != NULL) { ma_device_handle_backend_data_callback(pDevice, NULL, pMappedPCMFrames, framesMapped); } else { /* It's a hole. */ ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[PulseAudio] ma_device_on_read__pulse: Hole.\n"); } pulseResult = ((ma_pa_stream_drop_proc)pDevice->pContext->pulse.pa_stream_drop)(pStream); if (pulseResult < 0) { break; /* Failed to drop the buffer. */ } framesProcessed += framesMapped; } else { /* Nothing was mapped. Just abort. */ break; } } } static ma_result ma_device_write_to_stream__pulse(ma_device* pDevice, ma_pa_stream* pStream, ma_uint64* pFramesProcessed) { ma_result result = MA_SUCCESS; ma_uint64 framesProcessed = 0; size_t bytesMapped; ma_uint32 bpf; ma_uint32 deviceState; MA_ASSERT(pDevice != NULL); MA_ASSERT(pStream != NULL); bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); MA_ASSERT(bpf > 0); deviceState = ma_device_get_state(pDevice); bytesMapped = ((ma_pa_stream_writable_size_proc)pDevice->pContext->pulse.pa_stream_writable_size)(pStream); if (bytesMapped != (size_t)-1) { if (bytesMapped > 0) { ma_uint64 framesMapped; void* pMappedPCMFrames; int pulseResult = ((ma_pa_stream_begin_write_proc)pDevice->pContext->pulse.pa_stream_begin_write)(pStream, &pMappedPCMFrames, &bytesMapped); if (pulseResult < 0) { result = ma_result_from_pulse(pulseResult); goto done; } framesMapped = bytesMapped / bpf; if (deviceState == ma_device_state_started || deviceState == ma_device_state_starting) { /* Check for starting state just in case this is being used to do the initial fill. */ ma_device_handle_backend_data_callback(pDevice, pMappedPCMFrames, NULL, framesMapped); } else { /* Device is not started. Write silence. */ ma_silence_pcm_frames(pMappedPCMFrames, framesMapped, pDevice->playback.format, pDevice->playback.channels); } pulseResult = ((ma_pa_stream_write_proc)pDevice->pContext->pulse.pa_stream_write)(pStream, pMappedPCMFrames, bytesMapped, NULL, 0, MA_PA_SEEK_RELATIVE); if (pulseResult < 0) { result = ma_result_from_pulse(pulseResult); goto done; /* Failed to write data to stream. */ } framesProcessed += framesMapped; } else { result = MA_SUCCESS; /* No data available for writing. */ goto done; } } else { result = MA_ERROR; /* Failed to retrieve the writable size. Abort. */ goto done; } done: if (pFramesProcessed != NULL) { *pFramesProcessed = framesProcessed; } return result; } static void ma_device_on_write__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 bpf; ma_uint64 frameCount; ma_uint64 framesProcessed; ma_uint32 deviceState; ma_result result; MA_ASSERT(pDevice != NULL); /* Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio can fire this callback before the stream has even started. Ridiculous. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { return; } bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); MA_ASSERT(bpf > 0); frameCount = byteCount / bpf; framesProcessed = 0; while (framesProcessed < frameCount) { ma_uint64 framesProcessedThisIteration; /* Don't keep trying to process frames if the device isn't started. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) { break; } result = ma_device_write_to_stream__pulse(pDevice, pStream, &framesProcessedThisIteration); if (result != MA_SUCCESS) { break; } framesProcessed += framesProcessedThisIteration; } } static void ma_device_on_suspended__pulse(ma_pa_stream* pStream, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; int suspended; (void)pStream; suspended = ((ma_pa_stream_is_suspended_proc)pDevice->pContext->pulse.pa_stream_is_suspended)(pStream); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. pa_stream_is_suspended() returned %d.\n", suspended); if (suspended < 0) { return; } if (suspended == 1) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. Suspended.\n"); ma_device__on_notification_stopped(pDevice); } else { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "[Pulse] Device suspended state changed. Resumed.\n"); ma_device__on_notification_started(pDevice); } } static void ma_device_on_rerouted__pulse(ma_pa_stream* pStream, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; (void)pStream; (void)pUserData; ma_device__on_notification_rerouted(pDevice); } static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__pulse(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* There have been reports from users where buffers of < ~20ms result glitches when running through PipeWire. To work around this we're going to have to use a different default buffer size. */ const ma_uint32 defaultPeriodSizeInMilliseconds_LowLatency = 25; const ma_uint32 defaultPeriodSizeInMilliseconds_Conservative = MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE; MA_ASSERT(nativeSampleRate != 0); if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_LowLatency, nativeSampleRate); } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_Conservative, nativeSampleRate); } } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { return pDescriptor->periodSizeInFrames; } } static ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { /* Notes for PulseAudio: - When both the period size in frames and milliseconds are 0, we default to miniaudio's default buffer sizes rather than leaving it up to PulseAudio because I don't trust PulseAudio to give us any kind of reasonable latency by default. - Do not ever, *ever* forget to use MA_PA_STREAM_ADJUST_LATENCY. If you don't specify this flag, capture mode will just not work properly until you open another PulseAudio app. */ ma_result result = MA_SUCCESS; int error = 0; const char* devPlayback = NULL; const char* devCapture = NULL; ma_format format = ma_format_unknown; ma_uint32 channels = 0; ma_uint32 sampleRate = 0; ma_pa_sink_info sinkInfo; ma_pa_source_info sourceInfo; ma_pa_sample_spec ss; ma_pa_channel_map cmap; ma_pa_buffer_attr attr; const ma_pa_sample_spec* pActualSS = NULL; const ma_pa_buffer_attr* pActualAttr = NULL; const ma_pa_channel_map* pActualChannelMap = NULL; ma_uint32 iChannel; ma_pa_stream_flags_t streamFlags; MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->pulse); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with the PulseAudio backend. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pConfig->capture.shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { if (pDescriptorPlayback->pDeviceID != NULL) { devPlayback = pDescriptorPlayback->pDeviceID->pulse; } format = pDescriptorPlayback->format; channels = pDescriptorPlayback->channels; sampleRate = pDescriptorPlayback->sampleRate; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { if (pDescriptorCapture->pDeviceID != NULL) { devCapture = pDescriptorCapture->pDeviceID->pulse; } format = pDescriptorCapture->format; channels = pDescriptorCapture->channels; sampleRate = pDescriptorCapture->sampleRate; } result = ma_init_pa_mainloop_and_pa_context__pulse(pDevice->pContext, pDevice->pContext->pulse.pApplicationName, pDevice->pContext->pulse.pServerName, MA_FALSE, &pDevice->pulse.pMainLoop, &pDevice->pulse.pPulseContext); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to initialize PA mainloop and context for device.\n"); return result; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { result = ma_context_get_source_info__pulse(pDevice->pContext, devCapture, &sourceInfo); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to retrieve source info for capture device."); goto on_error0; } ss = sourceInfo.sample_spec; cmap = sourceInfo.channel_map; /* Use the requested channel count if we have one. */ if (pDescriptorCapture->channels != 0) { ss.channels = pDescriptorCapture->channels; } /* Use a default channel map. */ ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.channelMap); /* Use the requested sample rate if one was specified. */ if (pDescriptorCapture->sampleRate != 0) { ss.rate = pDescriptorCapture->sampleRate; } streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY; if (ma_format_from_pulse(ss.format) == ma_format_unknown) { if (ma_is_little_endian()) { ss.format = MA_PA_SAMPLE_FLOAT32LE; } else { ss.format = MA_PA_SAMPLE_FLOAT32BE; } streamFlags |= MA_PA_STREAM_FIX_FORMAT; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\n"); } if (ss.rate == 0) { ss.rate = MA_DEFAULT_SAMPLE_RATE; streamFlags |= MA_PA_STREAM_FIX_RATE; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\n", ss.rate); } if (ss.channels == 0) { ss.channels = MA_DEFAULT_CHANNELS; streamFlags |= MA_PA_STREAM_FIX_CHANNELS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\n", ss.channels); } /* We now have enough information to calculate our actual period size in frames. */ pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorCapture, ss.rate, pConfig->performanceProfile); attr = ma_device__pa_buffer_attr_new(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->periodCount, &ss); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames); pDevice->pulse.pStreamCapture = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNameCapture, &ss, &cmap); if (pDevice->pulse.pStreamCapture == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio capture stream.\n"); result = MA_ERROR; goto on_error0; } /* The callback needs to be set before connecting the stream. */ ((ma_pa_stream_set_read_callback_proc)pDevice->pContext->pulse.pa_stream_set_read_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_read__pulse, pDevice); /* State callback for checking when the device has been corked. */ ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_suspended__pulse, pDevice); /* Rerouting notification. */ ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_rerouted__pulse, pDevice); /* Connect after we've got all of our internal state set up. */ if (devCapture != NULL) { streamFlags |= MA_PA_STREAM_DONT_MOVE; } error = ((ma_pa_stream_connect_record_proc)pDevice->pContext->pulse.pa_stream_connect_record)((ma_pa_stream*)pDevice->pulse.pStreamCapture, devCapture, &attr, streamFlags); if (error != MA_PA_OK) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio capture stream."); result = ma_result_from_pulse(error); goto on_error1; } result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamCapture); if (result != MA_SUCCESS) { goto on_error2; } /* Internal format. */ pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualSS != NULL) { ss = *pActualSS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture sample spec: format=%s, channels=%d, rate=%d\n", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Failed to retrieve capture sample spec.\n"); } pDescriptorCapture->format = ma_format_from_pulse(ss.format); pDescriptorCapture->channels = ss.channels; pDescriptorCapture->sampleRate = ss.rate; if (pDescriptorCapture->format == ma_format_unknown || pDescriptorCapture->channels == 0 || pDescriptorCapture->sampleRate == 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Capture sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\n", ma_get_format_name(pDescriptorCapture->format), pDescriptorCapture->channels, pDescriptorCapture->sampleRate); result = MA_ERROR; goto on_error4; } /* Internal channel map. */ pActualChannelMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualChannelMap == NULL) { pActualChannelMap = &cmap; /* Fallback just in case. */ } /* Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For all other channel counts we need to just put up with whatever PipeWire reports and hope it gets fixed sooner than later. I might remove this hack later. */ if (pDescriptorCapture->channels > 2) { for (iChannel = 0; iChannel < pDescriptorCapture->channels; iChannel += 1) { pDescriptorCapture->channelMap[iChannel] = ma_channel_position_from_pulse(pActualChannelMap->map[iChannel]); } } else { /* Hack for mono and stereo. */ if (pDescriptorCapture->channels == 1) { pDescriptorCapture->channelMap[0] = MA_CHANNEL_MONO; } else if (pDescriptorCapture->channels == 2) { pDescriptorCapture->channelMap[0] = MA_CHANNEL_FRONT_LEFT; pDescriptorCapture->channelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } } /* Buffer. */ pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamCapture); if (pActualAttr != NULL) { attr = *pActualAttr; } if (attr.fragsize > 0) { pDescriptorCapture->periodCount = ma_max(attr.maxlength / attr.fragsize, 1); } else { pDescriptorCapture->periodCount = 1; } pDescriptorCapture->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / pDescriptorCapture->periodCount; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Capture actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_context_get_sink_info__pulse(pDevice->pContext, devPlayback, &sinkInfo); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to retrieve sink info for playback device.\n"); goto on_error2; } ss = sinkInfo.sample_spec; cmap = sinkInfo.channel_map; /* Use the requested channel count if we have one. */ if (pDescriptorPlayback->channels != 0) { ss.channels = pDescriptorPlayback->channels; } /* Use a default channel map. */ ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, pConfig->pulse.channelMap); /* Use the requested sample rate if one was specified. */ if (pDescriptorPlayback->sampleRate != 0) { ss.rate = pDescriptorPlayback->sampleRate; } streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY; if (ma_format_from_pulse(ss.format) == ma_format_unknown) { if (ma_is_little_endian()) { ss.format = MA_PA_SAMPLE_FLOAT32LE; } else { ss.format = MA_PA_SAMPLE_FLOAT32BE; } streamFlags |= MA_PA_STREAM_FIX_FORMAT; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\n"); } if (ss.rate == 0) { ss.rate = MA_DEFAULT_SAMPLE_RATE; streamFlags |= MA_PA_STREAM_FIX_RATE; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\n", ss.rate); } if (ss.channels == 0) { ss.channels = MA_DEFAULT_CHANNELS; streamFlags |= MA_PA_STREAM_FIX_CHANNELS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\n", ss.channels); } /* We now have enough information to calculate the actual buffer size in frames. */ pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorPlayback, ss.rate, pConfig->performanceProfile); attr = ma_device__pa_buffer_attr_new(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->periodCount, &ss); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames); pDevice->pulse.pStreamPlayback = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNamePlayback, &ss, &cmap); if (pDevice->pulse.pStreamPlayback == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to create PulseAudio playback stream.\n"); result = MA_ERROR; goto on_error2; } /* Note that this callback will be fired as soon as the stream is connected, even though it's started as corked. The callback needs to handle a device state of ma_device_state_uninitialized. */ ((ma_pa_stream_set_write_callback_proc)pDevice->pContext->pulse.pa_stream_set_write_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_write__pulse, pDevice); /* State callback for checking when the device has been corked. */ ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_suspended__pulse, pDevice); /* Rerouting notification. */ ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_rerouted__pulse, pDevice); /* Connect after we've got all of our internal state set up. */ if (devPlayback != NULL) { streamFlags |= MA_PA_STREAM_DONT_MOVE; } error = ((ma_pa_stream_connect_playback_proc)pDevice->pContext->pulse.pa_stream_connect_playback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, devPlayback, &attr, streamFlags, NULL, NULL); if (error != MA_PA_OK) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to connect PulseAudio playback stream."); result = ma_result_from_pulse(error); goto on_error3; } result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (result != MA_SUCCESS) { goto on_error3; } /* Internal format. */ pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualSS != NULL) { ss = *pActualSS; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback sample spec: format=%s, channels=%d, rate=%d\n", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate); } else { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Failed to retrieve playback sample spec.\n"); } pDescriptorPlayback->format = ma_format_from_pulse(ss.format); pDescriptorPlayback->channels = ss.channels; pDescriptorPlayback->sampleRate = ss.rate; if (pDescriptorPlayback->format == ma_format_unknown || pDescriptorPlayback->channels == 0 || pDescriptorPlayback->sampleRate == 0) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Playback sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\n", ma_get_format_name(pDescriptorPlayback->format), pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate); result = MA_ERROR; goto on_error4; } /* Internal channel map. */ pActualChannelMap = ((ma_pa_stream_get_channel_map_proc)pDevice->pContext->pulse.pa_stream_get_channel_map)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualChannelMap == NULL) { pActualChannelMap = &cmap; /* Fallback just in case. */ } /* Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For all other channel counts we need to just put up with whatever PipeWire reports and hope it gets fixed sooner than later. I might remove this hack later. */ if (pDescriptorPlayback->channels > 2) { for (iChannel = 0; iChannel < pDescriptorPlayback->channels; iChannel += 1) { pDescriptorPlayback->channelMap[iChannel] = ma_channel_position_from_pulse(pActualChannelMap->map[iChannel]); } } else { /* Hack for mono and stereo. */ if (pDescriptorPlayback->channels == 1) { pDescriptorPlayback->channelMap[0] = MA_CHANNEL_MONO; } else if (pDescriptorPlayback->channels == 2) { pDescriptorPlayback->channelMap[0] = MA_CHANNEL_FRONT_LEFT; pDescriptorPlayback->channelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } } /* Buffer. */ pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); if (pActualAttr != NULL) { attr = *pActualAttr; } if (attr.tlength > 0) { pDescriptorPlayback->periodCount = ma_max(attr.maxlength / attr.tlength, 1); } else { pDescriptorPlayback->periodCount = 1; } pDescriptorPlayback->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) / pDescriptorPlayback->periodCount; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[PulseAudio] Playback actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; internalPeriodSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames); } /* We need a ring buffer for handling duplex mode. We can use the main duplex ring buffer in the main part of the ma_device struct. We cannot, however, depend on ma_device_init() initializing this for us later on because that will only do it if it's a fully asynchronous backend - i.e. the onDeviceDataLoop callback is NULL, which is not the case for PulseAudio. */ if (pConfig->deviceType == ma_device_type_duplex) { ma_format rbFormat = (format != ma_format_unknown) ? format : pDescriptorCapture->format; ma_uint32 rbChannels = (channels > 0) ? channels : pDescriptorCapture->channels; ma_uint32 rbSampleRate = (sampleRate > 0) ? sampleRate : pDescriptorCapture->sampleRate; result = ma_duplex_rb_init(rbFormat, rbChannels, rbSampleRate, pDescriptorCapture->sampleRate, pDescriptorCapture->periodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to initialize ring buffer. %s.\n", ma_result_description(result)); goto on_error4; } } return MA_SUCCESS; on_error4: if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } on_error3: if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback); } on_error2: if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } on_error1: if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture); } on_error0: return result; } static void ma_pulse_operation_complete_callback(ma_pa_stream* pStream, int success, void* pUserData) { ma_bool32* pIsSuccessful = (ma_bool32*)pUserData; MA_ASSERT(pIsSuccessful != NULL); *pIsSuccessful = (ma_bool32)success; (void)pStream; /* Unused. */ } static ma_result ma_device__cork_stream__pulse(ma_device* pDevice, ma_device_type deviceType, int cork) { ma_context* pContext = pDevice->pContext; ma_bool32 wasSuccessful; ma_pa_stream* pStream; ma_pa_operation* pOP; ma_result result; /* This should not be called with a duplex device type. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } wasSuccessful = MA_FALSE; pStream = (ma_pa_stream*)((deviceType == ma_device_type_capture) ? pDevice->pulse.pStreamCapture : pDevice->pulse.pStreamPlayback); MA_ASSERT(pStream != NULL); pOP = ((ma_pa_stream_cork_proc)pContext->pulse.pa_stream_cork)(pStream, cork, ma_pulse_operation_complete_callback, &wasSuccessful); if (pOP == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to cork PulseAudio stream."); return MA_ERROR; } result = ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] An error occurred while waiting for the PulseAudio stream to cork."); return result; } if (!wasSuccessful) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[PulseAudio] Failed to %s PulseAudio stream.", (cork) ? "stop" : "start"); return MA_ERROR; } return MA_SUCCESS; } static ma_result ma_device_start__pulse(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 0); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* We need to fill some data before uncorking. Not doing this will result in the write callback never getting fired. We're not going to abort if writing fails because I still want the device to get uncorked. */ ma_device_write_to_stream__pulse(pDevice, (ma_pa_stream*)(pDevice->pulse.pStreamPlayback), NULL); /* No need to check the result here. Always want to fall through an uncork.*/ result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 0); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_stop__pulse(ma_device* pDevice) { ma_result result; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 1); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { /* Ideally we would drain the device here, but there's been cases where PulseAudio seems to be broken on some systems to the point where no audio processing seems to happen. When this happens, draining never completes and we get stuck here. For now I'm disabling draining of the device so we don't just freeze the application. */ #if 0 ma_pa_operation* pOP = ((ma_pa_stream_drain_proc)pDevice->pContext->pulse.pa_stream_drain)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_pulse_operation_complete_callback, &wasSuccessful); ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP); #endif result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 1); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_data_loop__pulse(ma_device* pDevice) { int resultPA; MA_ASSERT(pDevice != NULL); /* NOTE: Don't start the device here. It'll be done at a higher level. */ /* All data is handled through callbacks. All we need to do is iterate over the main loop and let the callbacks deal with it. */ while (ma_device_get_state(pDevice) == ma_device_state_started) { resultPA = ((ma_pa_mainloop_iterate_proc)pDevice->pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pDevice->pulse.pMainLoop, 1, NULL); if (resultPA < 0) { break; } } /* NOTE: Don't stop the device here. It'll be done at a higher level. */ return MA_SUCCESS; } static ma_result ma_device_data_loop_wakeup__pulse(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ((ma_pa_mainloop_wakeup_proc)pDevice->pContext->pulse.pa_mainloop_wakeup)((ma_pa_mainloop*)pDevice->pulse.pMainLoop); return MA_SUCCESS; } static ma_result ma_context_uninit__pulse(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_pulseaudio); ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pContext->pulse.pPulseContext); ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pContext->pulse.pPulseContext); ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pContext->pulse.pMainLoop); ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks); ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO); #endif return MA_SUCCESS; } static ma_result ma_context_init__pulse(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #ifndef MA_NO_RUNTIME_LINKING const char* libpulseNames[] = { "libpulse.so", "libpulse.so.0" }; size_t i; for (i = 0; i < ma_countof(libpulseNames); ++i) { pContext->pulse.pulseSO = ma_dlopen(ma_context_get_log(pContext), libpulseNames[i]); if (pContext->pulse.pulseSO != NULL) { break; } } if (pContext->pulse.pulseSO == NULL) { return MA_NO_BACKEND; } pContext->pulse.pa_mainloop_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_new"); pContext->pulse.pa_mainloop_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_free"); pContext->pulse.pa_mainloop_quit = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_quit"); pContext->pulse.pa_mainloop_get_api = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_get_api"); pContext->pulse.pa_mainloop_iterate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_iterate"); pContext->pulse.pa_mainloop_wakeup = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_mainloop_wakeup"); pContext->pulse.pa_threaded_mainloop_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_new"); pContext->pulse.pa_threaded_mainloop_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_free"); pContext->pulse.pa_threaded_mainloop_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_start"); pContext->pulse.pa_threaded_mainloop_stop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_stop"); pContext->pulse.pa_threaded_mainloop_lock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_lock"); pContext->pulse.pa_threaded_mainloop_unlock = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_unlock"); pContext->pulse.pa_threaded_mainloop_wait = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_wait"); pContext->pulse.pa_threaded_mainloop_signal = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_signal"); pContext->pulse.pa_threaded_mainloop_accept = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_accept"); pContext->pulse.pa_threaded_mainloop_get_retval = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_get_retval"); pContext->pulse.pa_threaded_mainloop_get_api = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_get_api"); pContext->pulse.pa_threaded_mainloop_in_thread = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_in_thread"); pContext->pulse.pa_threaded_mainloop_set_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_threaded_mainloop_set_name"); pContext->pulse.pa_context_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_new"); pContext->pulse.pa_context_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_unref"); pContext->pulse.pa_context_connect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_connect"); pContext->pulse.pa_context_disconnect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_disconnect"); pContext->pulse.pa_context_set_state_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_set_state_callback"); pContext->pulse.pa_context_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_state"); pContext->pulse.pa_context_get_sink_info_list = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_sink_info_list"); pContext->pulse.pa_context_get_source_info_list = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_source_info_list"); pContext->pulse.pa_context_get_sink_info_by_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_sink_info_by_name"); pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_context_get_source_info_by_name"); pContext->pulse.pa_operation_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_operation_unref"); pContext->pulse.pa_operation_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_operation_get_state"); pContext->pulse.pa_channel_map_init_extend = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_init_extend"); pContext->pulse.pa_channel_map_valid = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_valid"); pContext->pulse.pa_channel_map_compatible = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_channel_map_compatible"); pContext->pulse.pa_stream_new = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_new"); pContext->pulse.pa_stream_unref = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_unref"); pContext->pulse.pa_stream_connect_playback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_connect_playback"); pContext->pulse.pa_stream_connect_record = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_connect_record"); pContext->pulse.pa_stream_disconnect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_disconnect"); pContext->pulse.pa_stream_get_state = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_state"); pContext->pulse.pa_stream_get_sample_spec = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_sample_spec"); pContext->pulse.pa_stream_get_channel_map = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_channel_map"); pContext->pulse.pa_stream_get_buffer_attr = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_buffer_attr"); pContext->pulse.pa_stream_set_buffer_attr = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_buffer_attr"); pContext->pulse.pa_stream_get_device_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_get_device_name"); pContext->pulse.pa_stream_set_write_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_write_callback"); pContext->pulse.pa_stream_set_read_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_read_callback"); pContext->pulse.pa_stream_set_suspended_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_suspended_callback"); pContext->pulse.pa_stream_set_moved_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_set_moved_callback"); pContext->pulse.pa_stream_is_suspended = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_is_suspended"); pContext->pulse.pa_stream_flush = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_flush"); pContext->pulse.pa_stream_drain = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_drain"); pContext->pulse.pa_stream_is_corked = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_is_corked"); pContext->pulse.pa_stream_cork = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_cork"); pContext->pulse.pa_stream_trigger = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_trigger"); pContext->pulse.pa_stream_begin_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_begin_write"); pContext->pulse.pa_stream_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_write"); pContext->pulse.pa_stream_peek = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_peek"); pContext->pulse.pa_stream_drop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_drop"); pContext->pulse.pa_stream_writable_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_writable_size"); pContext->pulse.pa_stream_readable_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, "pa_stream_readable_size"); #else /* This strange assignment system is just for type safety. */ ma_pa_mainloop_new_proc _pa_mainloop_new = pa_mainloop_new; ma_pa_mainloop_free_proc _pa_mainloop_free = pa_mainloop_free; ma_pa_mainloop_quit_proc _pa_mainloop_quit = pa_mainloop_quit; ma_pa_mainloop_get_api_proc _pa_mainloop_get_api = pa_mainloop_get_api; ma_pa_mainloop_iterate_proc _pa_mainloop_iterate = pa_mainloop_iterate; ma_pa_mainloop_wakeup_proc _pa_mainloop_wakeup = pa_mainloop_wakeup; ma_pa_threaded_mainloop_new_proc _pa_threaded_mainloop_new = pa_threaded_mainloop_new; ma_pa_threaded_mainloop_free_proc _pa_threaded_mainloop_free = pa_threaded_mainloop_free; ma_pa_threaded_mainloop_start_proc _pa_threaded_mainloop_start = pa_threaded_mainloop_start; ma_pa_threaded_mainloop_stop_proc _pa_threaded_mainloop_stop = pa_threaded_mainloop_stop; ma_pa_threaded_mainloop_lock_proc _pa_threaded_mainloop_lock = pa_threaded_mainloop_lock; ma_pa_threaded_mainloop_unlock_proc _pa_threaded_mainloop_unlock = pa_threaded_mainloop_unlock; ma_pa_threaded_mainloop_wait_proc _pa_threaded_mainloop_wait = pa_threaded_mainloop_wait; ma_pa_threaded_mainloop_signal_proc _pa_threaded_mainloop_signal = pa_threaded_mainloop_signal; ma_pa_threaded_mainloop_accept_proc _pa_threaded_mainloop_accept = pa_threaded_mainloop_accept; ma_pa_threaded_mainloop_get_retval_proc _pa_threaded_mainloop_get_retval = pa_threaded_mainloop_get_retval; ma_pa_threaded_mainloop_get_api_proc _pa_threaded_mainloop_get_api = pa_threaded_mainloop_get_api; ma_pa_threaded_mainloop_in_thread_proc _pa_threaded_mainloop_in_thread = pa_threaded_mainloop_in_thread; ma_pa_threaded_mainloop_set_name_proc _pa_threaded_mainloop_set_name = pa_threaded_mainloop_set_name; ma_pa_context_new_proc _pa_context_new = pa_context_new; ma_pa_context_unref_proc _pa_context_unref = pa_context_unref; ma_pa_context_connect_proc _pa_context_connect = pa_context_connect; ma_pa_context_disconnect_proc _pa_context_disconnect = pa_context_disconnect; ma_pa_context_set_state_callback_proc _pa_context_set_state_callback = pa_context_set_state_callback; ma_pa_context_get_state_proc _pa_context_get_state = pa_context_get_state; ma_pa_context_get_sink_info_list_proc _pa_context_get_sink_info_list = pa_context_get_sink_info_list; ma_pa_context_get_source_info_list_proc _pa_context_get_source_info_list = pa_context_get_source_info_list; ma_pa_context_get_sink_info_by_name_proc _pa_context_get_sink_info_by_name = pa_context_get_sink_info_by_name; ma_pa_context_get_source_info_by_name_proc _pa_context_get_source_info_by_name= pa_context_get_source_info_by_name; ma_pa_operation_unref_proc _pa_operation_unref = pa_operation_unref; ma_pa_operation_get_state_proc _pa_operation_get_state = pa_operation_get_state; ma_pa_channel_map_init_extend_proc _pa_channel_map_init_extend = pa_channel_map_init_extend; ma_pa_channel_map_valid_proc _pa_channel_map_valid = pa_channel_map_valid; ma_pa_channel_map_compatible_proc _pa_channel_map_compatible = pa_channel_map_compatible; ma_pa_stream_new_proc _pa_stream_new = pa_stream_new; ma_pa_stream_unref_proc _pa_stream_unref = pa_stream_unref; ma_pa_stream_connect_playback_proc _pa_stream_connect_playback = pa_stream_connect_playback; ma_pa_stream_connect_record_proc _pa_stream_connect_record = pa_stream_connect_record; ma_pa_stream_disconnect_proc _pa_stream_disconnect = pa_stream_disconnect; ma_pa_stream_get_state_proc _pa_stream_get_state = pa_stream_get_state; ma_pa_stream_get_sample_spec_proc _pa_stream_get_sample_spec = pa_stream_get_sample_spec; ma_pa_stream_get_channel_map_proc _pa_stream_get_channel_map = pa_stream_get_channel_map; ma_pa_stream_get_buffer_attr_proc _pa_stream_get_buffer_attr = pa_stream_get_buffer_attr; ma_pa_stream_set_buffer_attr_proc _pa_stream_set_buffer_attr = pa_stream_set_buffer_attr; ma_pa_stream_get_device_name_proc _pa_stream_get_device_name = pa_stream_get_device_name; ma_pa_stream_set_write_callback_proc _pa_stream_set_write_callback = pa_stream_set_write_callback; ma_pa_stream_set_read_callback_proc _pa_stream_set_read_callback = pa_stream_set_read_callback; ma_pa_stream_set_suspended_callback_proc _pa_stream_set_suspended_callback = pa_stream_set_suspended_callback; ma_pa_stream_set_moved_callback_proc _pa_stream_set_moved_callback = pa_stream_set_moved_callback; ma_pa_stream_is_suspended_proc _pa_stream_is_suspended = pa_stream_is_suspended; ma_pa_stream_flush_proc _pa_stream_flush = pa_stream_flush; ma_pa_stream_drain_proc _pa_stream_drain = pa_stream_drain; ma_pa_stream_is_corked_proc _pa_stream_is_corked = pa_stream_is_corked; ma_pa_stream_cork_proc _pa_stream_cork = pa_stream_cork; ma_pa_stream_trigger_proc _pa_stream_trigger = pa_stream_trigger; ma_pa_stream_begin_write_proc _pa_stream_begin_write = pa_stream_begin_write; ma_pa_stream_write_proc _pa_stream_write = pa_stream_write; ma_pa_stream_peek_proc _pa_stream_peek = pa_stream_peek; ma_pa_stream_drop_proc _pa_stream_drop = pa_stream_drop; ma_pa_stream_writable_size_proc _pa_stream_writable_size = pa_stream_writable_size; ma_pa_stream_readable_size_proc _pa_stream_readable_size = pa_stream_readable_size; pContext->pulse.pa_mainloop_new = (ma_proc)_pa_mainloop_new; pContext->pulse.pa_mainloop_free = (ma_proc)_pa_mainloop_free; pContext->pulse.pa_mainloop_quit = (ma_proc)_pa_mainloop_quit; pContext->pulse.pa_mainloop_get_api = (ma_proc)_pa_mainloop_get_api; pContext->pulse.pa_mainloop_iterate = (ma_proc)_pa_mainloop_iterate; pContext->pulse.pa_mainloop_wakeup = (ma_proc)_pa_mainloop_wakeup; pContext->pulse.pa_threaded_mainloop_new = (ma_proc)_pa_threaded_mainloop_new; pContext->pulse.pa_threaded_mainloop_free = (ma_proc)_pa_threaded_mainloop_free; pContext->pulse.pa_threaded_mainloop_start = (ma_proc)_pa_threaded_mainloop_start; pContext->pulse.pa_threaded_mainloop_stop = (ma_proc)_pa_threaded_mainloop_stop; pContext->pulse.pa_threaded_mainloop_lock = (ma_proc)_pa_threaded_mainloop_lock; pContext->pulse.pa_threaded_mainloop_unlock = (ma_proc)_pa_threaded_mainloop_unlock; pContext->pulse.pa_threaded_mainloop_wait = (ma_proc)_pa_threaded_mainloop_wait; pContext->pulse.pa_threaded_mainloop_signal = (ma_proc)_pa_threaded_mainloop_signal; pContext->pulse.pa_threaded_mainloop_accept = (ma_proc)_pa_threaded_mainloop_accept; pContext->pulse.pa_threaded_mainloop_get_retval = (ma_proc)_pa_threaded_mainloop_get_retval; pContext->pulse.pa_threaded_mainloop_get_api = (ma_proc)_pa_threaded_mainloop_get_api; pContext->pulse.pa_threaded_mainloop_in_thread = (ma_proc)_pa_threaded_mainloop_in_thread; pContext->pulse.pa_threaded_mainloop_set_name = (ma_proc)_pa_threaded_mainloop_set_name; pContext->pulse.pa_context_new = (ma_proc)_pa_context_new; pContext->pulse.pa_context_unref = (ma_proc)_pa_context_unref; pContext->pulse.pa_context_connect = (ma_proc)_pa_context_connect; pContext->pulse.pa_context_disconnect = (ma_proc)_pa_context_disconnect; pContext->pulse.pa_context_set_state_callback = (ma_proc)_pa_context_set_state_callback; pContext->pulse.pa_context_get_state = (ma_proc)_pa_context_get_state; pContext->pulse.pa_context_get_sink_info_list = (ma_proc)_pa_context_get_sink_info_list; pContext->pulse.pa_context_get_source_info_list = (ma_proc)_pa_context_get_source_info_list; pContext->pulse.pa_context_get_sink_info_by_name = (ma_proc)_pa_context_get_sink_info_by_name; pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)_pa_context_get_source_info_by_name; pContext->pulse.pa_operation_unref = (ma_proc)_pa_operation_unref; pContext->pulse.pa_operation_get_state = (ma_proc)_pa_operation_get_state; pContext->pulse.pa_channel_map_init_extend = (ma_proc)_pa_channel_map_init_extend; pContext->pulse.pa_channel_map_valid = (ma_proc)_pa_channel_map_valid; pContext->pulse.pa_channel_map_compatible = (ma_proc)_pa_channel_map_compatible; pContext->pulse.pa_stream_new = (ma_proc)_pa_stream_new; pContext->pulse.pa_stream_unref = (ma_proc)_pa_stream_unref; pContext->pulse.pa_stream_connect_playback = (ma_proc)_pa_stream_connect_playback; pContext->pulse.pa_stream_connect_record = (ma_proc)_pa_stream_connect_record; pContext->pulse.pa_stream_disconnect = (ma_proc)_pa_stream_disconnect; pContext->pulse.pa_stream_get_state = (ma_proc)_pa_stream_get_state; pContext->pulse.pa_stream_get_sample_spec = (ma_proc)_pa_stream_get_sample_spec; pContext->pulse.pa_stream_get_channel_map = (ma_proc)_pa_stream_get_channel_map; pContext->pulse.pa_stream_get_buffer_attr = (ma_proc)_pa_stream_get_buffer_attr; pContext->pulse.pa_stream_set_buffer_attr = (ma_proc)_pa_stream_set_buffer_attr; pContext->pulse.pa_stream_get_device_name = (ma_proc)_pa_stream_get_device_name; pContext->pulse.pa_stream_set_write_callback = (ma_proc)_pa_stream_set_write_callback; pContext->pulse.pa_stream_set_read_callback = (ma_proc)_pa_stream_set_read_callback; pContext->pulse.pa_stream_set_suspended_callback = (ma_proc)_pa_stream_set_suspended_callback; pContext->pulse.pa_stream_set_moved_callback = (ma_proc)_pa_stream_set_moved_callback; pContext->pulse.pa_stream_is_suspended = (ma_proc)_pa_stream_is_suspended; pContext->pulse.pa_stream_flush = (ma_proc)_pa_stream_flush; pContext->pulse.pa_stream_drain = (ma_proc)_pa_stream_drain; pContext->pulse.pa_stream_is_corked = (ma_proc)_pa_stream_is_corked; pContext->pulse.pa_stream_cork = (ma_proc)_pa_stream_cork; pContext->pulse.pa_stream_trigger = (ma_proc)_pa_stream_trigger; pContext->pulse.pa_stream_begin_write = (ma_proc)_pa_stream_begin_write; pContext->pulse.pa_stream_write = (ma_proc)_pa_stream_write; pContext->pulse.pa_stream_peek = (ma_proc)_pa_stream_peek; pContext->pulse.pa_stream_drop = (ma_proc)_pa_stream_drop; pContext->pulse.pa_stream_writable_size = (ma_proc)_pa_stream_writable_size; pContext->pulse.pa_stream_readable_size = (ma_proc)_pa_stream_readable_size; #endif /* We need to make a copy of the application and server names so we can pass them to the pa_context of each device. */ pContext->pulse.pApplicationName = ma_copy_string(pConfig->pulse.pApplicationName, &pContext->allocationCallbacks); if (pContext->pulse.pApplicationName == NULL && pConfig->pulse.pApplicationName != NULL) { return MA_OUT_OF_MEMORY; } pContext->pulse.pServerName = ma_copy_string(pConfig->pulse.pServerName, &pContext->allocationCallbacks); if (pContext->pulse.pServerName == NULL && pConfig->pulse.pServerName != NULL) { ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); return MA_OUT_OF_MEMORY; } result = ma_init_pa_mainloop_and_pa_context__pulse(pContext, pConfig->pulse.pApplicationName, pConfig->pulse.pServerName, pConfig->pulse.tryAutoSpawn, &pContext->pulse.pMainLoop, &pContext->pulse.pPulseContext); if (result != MA_SUCCESS) { ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks); ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO); #endif return result; } /* With pa_mainloop we run a synchronous backend, but we implement our own main loop. */ pCallbacks->onContextInit = ma_context_init__pulse; pCallbacks->onContextUninit = ma_context_uninit__pulse; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__pulse; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__pulse; pCallbacks->onDeviceInit = ma_device_init__pulse; pCallbacks->onDeviceUninit = ma_device_uninit__pulse; pCallbacks->onDeviceStart = ma_device_start__pulse; pCallbacks->onDeviceStop = ma_device_stop__pulse; pCallbacks->onDeviceRead = NULL; /* Not used because we're implementing onDeviceDataLoop. */ pCallbacks->onDeviceWrite = NULL; /* Not used because we're implementing onDeviceDataLoop. */ pCallbacks->onDeviceDataLoop = ma_device_data_loop__pulse; pCallbacks->onDeviceDataLoopWakeup = ma_device_data_loop_wakeup__pulse; return MA_SUCCESS; } #endif /****************************************************************************** JACK Backend ******************************************************************************/ #ifdef MA_HAS_JACK /* It is assumed jack.h is available when compile-time linking is being used. */ #ifdef MA_NO_RUNTIME_LINKING #include typedef jack_nframes_t ma_jack_nframes_t; typedef jack_options_t ma_jack_options_t; typedef jack_status_t ma_jack_status_t; typedef jack_client_t ma_jack_client_t; typedef jack_port_t ma_jack_port_t; typedef JackProcessCallback ma_JackProcessCallback; typedef JackBufferSizeCallback ma_JackBufferSizeCallback; typedef JackShutdownCallback ma_JackShutdownCallback; #define MA_JACK_DEFAULT_AUDIO_TYPE JACK_DEFAULT_AUDIO_TYPE #define ma_JackNoStartServer JackNoStartServer #define ma_JackPortIsInput JackPortIsInput #define ma_JackPortIsOutput JackPortIsOutput #define ma_JackPortIsPhysical JackPortIsPhysical #else typedef ma_uint32 ma_jack_nframes_t; typedef int ma_jack_options_t; typedef int ma_jack_status_t; typedef struct ma_jack_client_t ma_jack_client_t; typedef struct ma_jack_port_t ma_jack_port_t; typedef int (* ma_JackProcessCallback) (ma_jack_nframes_t nframes, void* arg); typedef int (* ma_JackBufferSizeCallback)(ma_jack_nframes_t nframes, void* arg); typedef void (* ma_JackShutdownCallback) (void* arg); #define MA_JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" #define ma_JackNoStartServer 1 #define ma_JackPortIsInput 1 #define ma_JackPortIsOutput 2 #define ma_JackPortIsPhysical 4 #endif typedef ma_jack_client_t* (* ma_jack_client_open_proc) (const char* client_name, ma_jack_options_t options, ma_jack_status_t* status, ...); typedef int (* ma_jack_client_close_proc) (ma_jack_client_t* client); typedef int (* ma_jack_client_name_size_proc) (void); typedef int (* ma_jack_set_process_callback_proc) (ma_jack_client_t* client, ma_JackProcessCallback process_callback, void* arg); typedef int (* ma_jack_set_buffer_size_callback_proc)(ma_jack_client_t* client, ma_JackBufferSizeCallback bufsize_callback, void* arg); typedef void (* ma_jack_on_shutdown_proc) (ma_jack_client_t* client, ma_JackShutdownCallback function, void* arg); typedef ma_jack_nframes_t (* ma_jack_get_sample_rate_proc) (ma_jack_client_t* client); typedef ma_jack_nframes_t (* ma_jack_get_buffer_size_proc) (ma_jack_client_t* client); typedef const char** (* ma_jack_get_ports_proc) (ma_jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags); typedef int (* ma_jack_activate_proc) (ma_jack_client_t* client); typedef int (* ma_jack_deactivate_proc) (ma_jack_client_t* client); typedef int (* ma_jack_connect_proc) (ma_jack_client_t* client, const char* source_port, const char* destination_port); typedef ma_jack_port_t* (* ma_jack_port_register_proc) (ma_jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size); typedef const char* (* ma_jack_port_name_proc) (const ma_jack_port_t* port); typedef void* (* ma_jack_port_get_buffer_proc) (ma_jack_port_t* port, ma_jack_nframes_t nframes); typedef void (* ma_jack_free_proc) (void* ptr); static ma_result ma_context_open_client__jack(ma_context* pContext, ma_jack_client_t** ppClient) { size_t maxClientNameSize; char clientName[256]; ma_jack_status_t status; ma_jack_client_t* pClient; MA_ASSERT(pContext != NULL); MA_ASSERT(ppClient != NULL); if (ppClient) { *ppClient = NULL; } maxClientNameSize = ((ma_jack_client_name_size_proc)pContext->jack.jack_client_name_size)(); /* Includes null terminator. */ ma_strncpy_s(clientName, ma_min(sizeof(clientName), maxClientNameSize), (pContext->jack.pClientName != NULL) ? pContext->jack.pClientName : "miniaudio", (size_t)-1); pClient = ((ma_jack_client_open_proc)pContext->jack.jack_client_open)(clientName, (pContext->jack.tryStartServer) ? 0 : ma_JackNoStartServer, &status, NULL); if (pClient == NULL) { return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (ppClient) { *ppClient = pClient; } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__jack(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* JACK only uses default devices. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* JACK only uses default devices. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } (void)cbResult; /* For silencing a static analysis warning. */ return MA_SUCCESS; } static ma_result ma_context_get_device_info__jack(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_jack_client_t* pClient; ma_result result; const char** ppPorts; MA_ASSERT(pContext != NULL); if (pDeviceID != NULL && pDeviceID->jack != 0) { return MA_NO_DEVICE; /* Don't know the device. */ } /* Name / Description */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } /* Jack only uses default devices. */ pDeviceInfo->isDefault = MA_TRUE; /* Jack only supports f32 and has a specific channel count and sample rate. */ pDeviceInfo->nativeDataFormats[0].format = ma_format_f32; /* The channel count and sample rate can only be determined by opening the device. */ result = ma_context_open_client__jack(pContext, &pClient); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[JACK] Failed to open client."); return result; } pDeviceInfo->nativeDataFormats[0].sampleRate = ((ma_jack_get_sample_rate_proc)pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pClient); pDeviceInfo->nativeDataFormats[0].channels = 0; ppPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ((deviceType == ma_device_type_playback) ? ma_JackPortIsInput : ma_JackPortIsOutput)); if (ppPorts == NULL) { ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } while (ppPorts[pDeviceInfo->nativeDataFormats[0].channels] != NULL) { pDeviceInfo->nativeDataFormats[0].channels += 1; } pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormatCount = 1; ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppPorts); ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient); (void)pContext; return MA_SUCCESS; } static ma_result ma_device_uninit__jack(ma_device* pDevice) { ma_context* pContext; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->jack.pClient != NULL) { ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDevice->jack.pClient); } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks); ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks); ma_free(pDevice->jack.ppPortsPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } static void ma_device__jack_shutdown_callback(void* pUserData) { /* JACK died. Stop the device. */ ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); ma_device_stop(pDevice); } static int ma_device__jack_buffer_size_callback(ma_jack_nframes_t frameCount, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { size_t newBufferSize = frameCount * (pDevice->capture.internalChannels * ma_get_bytes_per_sample(pDevice->capture.internalFormat)); float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks); if (pNewBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks); pDevice->jack.pIntermediaryBufferCapture = pNewBuffer; pDevice->playback.internalPeriodSizeInFrames = frameCount; } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { size_t newBufferSize = frameCount * (pDevice->playback.internalChannels * ma_get_bytes_per_sample(pDevice->playback.internalFormat)); float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks); if (pNewBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks); pDevice->jack.pIntermediaryBufferPlayback = pNewBuffer; pDevice->playback.internalPeriodSizeInFrames = frameCount; } return 0; } static int ma_device__jack_process_callback(ma_jack_nframes_t frameCount, void* pUserData) { ma_device* pDevice; ma_context* pContext; ma_uint32 iChannel; pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); pContext = pDevice->pContext; MA_ASSERT(pContext != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { /* Channels need to be interleaved. */ for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) { const float* pSrc = (const float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[iChannel], frameCount); if (pSrc != NULL) { float* pDst = pDevice->jack.pIntermediaryBufferCapture + iChannel; ma_jack_nframes_t iFrame; for (iFrame = 0; iFrame < frameCount; ++iFrame) { *pDst = *pSrc; pDst += pDevice->capture.internalChannels; pSrc += 1; } } } ma_device_handle_backend_data_callback(pDevice, NULL, pDevice->jack.pIntermediaryBufferCapture, frameCount); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_device_handle_backend_data_callback(pDevice, pDevice->jack.pIntermediaryBufferPlayback, NULL, frameCount); /* Channels need to be deinterleaved. */ for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) { float* pDst = (float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[iChannel], frameCount); if (pDst != NULL) { const float* pSrc = pDevice->jack.pIntermediaryBufferPlayback + iChannel; ma_jack_nframes_t iFrame; for (iFrame = 0; iFrame < frameCount; ++iFrame) { *pDst = *pSrc; pDst += 1; pSrc += pDevice->playback.internalChannels; } } } } return 0; } static ma_result ma_device_init__jack(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; ma_uint32 periodSizeInFrames; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDevice != NULL); if (pConfig->deviceType == ma_device_type_loopback) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Loopback mode not supported."); return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* Only supporting default devices with JACK. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->pDeviceID != NULL && pDescriptorPlayback->pDeviceID->jack != 0) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->pDeviceID != NULL && pDescriptorCapture->pDeviceID->jack != 0)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Only default devices are supported."); return MA_NO_DEVICE; } /* No exclusive mode with the JACK backend. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Exclusive mode not supported."); return MA_SHARE_MODE_NOT_SUPPORTED; } /* Open the client. */ result = ma_context_open_client__jack(pDevice->pContext, (ma_jack_client_t**)&pDevice->jack.pClient); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to open client."); return result; } /* Callbacks. */ if (((ma_jack_set_process_callback_proc)pDevice->pContext->jack.jack_set_process_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_process_callback, pDevice) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to set process callback."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (((ma_jack_set_buffer_size_callback_proc)pDevice->pContext->jack.jack_set_buffer_size_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_buffer_size_callback, pDevice) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to set buffer size callback."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } ((ma_jack_on_shutdown_proc)pDevice->pContext->jack.jack_on_shutdown)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_shutdown_callback, pDevice); /* The buffer size in frames can change. */ periodSizeInFrames = ((ma_jack_get_buffer_size_proc)pDevice->pContext->jack.jack_get_buffer_size)((ma_jack_client_t*)pDevice->jack.pClient); if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPort; const char** ppPorts; pDescriptorCapture->format = ma_format_f32; pDescriptorCapture->channels = 0; pDescriptorCapture->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient); ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput); if (ppPorts == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* Need to count the number of ports first so we can allocate some memory. */ while (ppPorts[pDescriptorCapture->channels] != NULL) { pDescriptorCapture->channels += 1; } pDevice->jack.ppPortsCapture = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsCapture) * pDescriptorCapture->channels, &pDevice->pContext->allocationCallbacks); if (pDevice->jack.ppPortsCapture == NULL) { return MA_OUT_OF_MEMORY; } for (iPort = 0; iPort < pDescriptorCapture->channels; iPort += 1) { char name[64]; ma_strcpy_s(name, sizeof(name), "capture"); ma_itoa_s((int)iPort, name+7, sizeof(name)-7, 10); /* 7 = length of "capture" */ pDevice->jack.ppPortsCapture[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsInput, 0); if (pDevice->jack.ppPortsCapture[iPort] == NULL) { ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); ma_device_uninit__jack(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to register ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = 1; /* There's no notion of a period in JACK. Just set to 1. */ pDevice->jack.pIntermediaryBufferCapture = (float*)ma_calloc(pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels), &pDevice->pContext->allocationCallbacks); if (pDevice->jack.pIntermediaryBufferCapture == NULL) { ma_device_uninit__jack(pDevice); return MA_OUT_OF_MEMORY; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint32 iPort; const char** ppPorts; pDescriptorPlayback->format = ma_format_f32; pDescriptorPlayback->channels = 0; pDescriptorPlayback->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient); ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput); if (ppPorts == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to query physical ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* Need to count the number of ports first so we can allocate some memory. */ while (ppPorts[pDescriptorPlayback->channels] != NULL) { pDescriptorPlayback->channels += 1; } pDevice->jack.ppPortsPlayback = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsPlayback) * pDescriptorPlayback->channels, &pDevice->pContext->allocationCallbacks); if (pDevice->jack.ppPortsPlayback == NULL) { ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks); return MA_OUT_OF_MEMORY; } for (iPort = 0; iPort < pDescriptorPlayback->channels; iPort += 1) { char name[64]; ma_strcpy_s(name, sizeof(name), "playback"); ma_itoa_s((int)iPort, name+8, sizeof(name)-8, 10); /* 8 = length of "playback" */ pDevice->jack.ppPortsPlayback[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsOutput, 0); if (pDevice->jack.ppPortsPlayback[iPort] == NULL) { ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); ma_device_uninit__jack(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to register ports."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } } ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts); pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = 1; /* There's no notion of a period in JACK. Just set to 1. */ pDevice->jack.pIntermediaryBufferPlayback = (float*)ma_calloc(pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels), &pDevice->pContext->allocationCallbacks); if (pDevice->jack.pIntermediaryBufferPlayback == NULL) { ma_device_uninit__jack(pDevice); return MA_OUT_OF_MEMORY; } } return MA_SUCCESS; } static ma_result ma_device_start__jack(ma_device* pDevice) { ma_context* pContext = pDevice->pContext; int resultJACK; size_t i; resultJACK = ((ma_jack_activate_proc)pContext->jack.jack_activate)((ma_jack_client_t*)pDevice->jack.pClient); if (resultJACK != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to activate the JACK client."); return MA_FAILED_TO_START_BACKEND_DEVICE; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput); if (ppServerPorts == NULL) { ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to retrieve physical ports."); return MA_ERROR; } for (i = 0; ppServerPorts[i] != NULL; ++i) { const char* pServerPort = ppServerPorts[i]; const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[i]); resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pServerPort, pClientPort); if (resultJACK != 0) { ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to connect ports."); return MA_ERROR; } } ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput); if (ppServerPorts == NULL) { ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to retrieve physical ports."); return MA_ERROR; } for (i = 0; ppServerPorts[i] != NULL; ++i) { const char* pServerPort = ppServerPorts[i]; const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[i]); resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pClientPort, pServerPort); if (resultJACK != 0) { ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] Failed to connect ports."); return MA_ERROR; } } ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts); } return MA_SUCCESS; } static ma_result ma_device_stop__jack(ma_device* pDevice) { ma_context* pContext = pDevice->pContext; if (((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient) != 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[JACK] An error occurred when deactivating the JACK client."); return MA_ERROR; } ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__jack(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_jack); ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks); pContext->jack.pClientName = NULL; #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO); #endif return MA_SUCCESS; } static ma_result ma_context_init__jack(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #ifndef MA_NO_RUNTIME_LINKING const char* libjackNames[] = { #if defined(MA_WIN32) "libjack.dll", "libjack64.dll" #endif #if defined(MA_UNIX) "libjack.so", "libjack.so.0" #endif }; size_t i; for (i = 0; i < ma_countof(libjackNames); ++i) { pContext->jack.jackSO = ma_dlopen(ma_context_get_log(pContext), libjackNames[i]); if (pContext->jack.jackSO != NULL) { break; } } if (pContext->jack.jackSO == NULL) { return MA_NO_BACKEND; } pContext->jack.jack_client_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_open"); pContext->jack.jack_client_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_close"); pContext->jack.jack_client_name_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_client_name_size"); pContext->jack.jack_set_process_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_set_process_callback"); pContext->jack.jack_set_buffer_size_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_set_buffer_size_callback"); pContext->jack.jack_on_shutdown = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_on_shutdown"); pContext->jack.jack_get_sample_rate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_sample_rate"); pContext->jack.jack_get_buffer_size = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_buffer_size"); pContext->jack.jack_get_ports = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_get_ports"); pContext->jack.jack_activate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_activate"); pContext->jack.jack_deactivate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_deactivate"); pContext->jack.jack_connect = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_connect"); pContext->jack.jack_port_register = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_register"); pContext->jack.jack_port_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_name"); pContext->jack.jack_port_get_buffer = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_port_get_buffer"); pContext->jack.jack_free = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, "jack_free"); #else /* This strange assignment system is here just to ensure type safety of miniaudio's function pointer types. If anything differs slightly the compiler should throw a warning. */ ma_jack_client_open_proc _jack_client_open = jack_client_open; ma_jack_client_close_proc _jack_client_close = jack_client_close; ma_jack_client_name_size_proc _jack_client_name_size = jack_client_name_size; ma_jack_set_process_callback_proc _jack_set_process_callback = jack_set_process_callback; ma_jack_set_buffer_size_callback_proc _jack_set_buffer_size_callback = jack_set_buffer_size_callback; ma_jack_on_shutdown_proc _jack_on_shutdown = jack_on_shutdown; ma_jack_get_sample_rate_proc _jack_get_sample_rate = jack_get_sample_rate; ma_jack_get_buffer_size_proc _jack_get_buffer_size = jack_get_buffer_size; ma_jack_get_ports_proc _jack_get_ports = jack_get_ports; ma_jack_activate_proc _jack_activate = jack_activate; ma_jack_deactivate_proc _jack_deactivate = jack_deactivate; ma_jack_connect_proc _jack_connect = jack_connect; ma_jack_port_register_proc _jack_port_register = jack_port_register; ma_jack_port_name_proc _jack_port_name = jack_port_name; ma_jack_port_get_buffer_proc _jack_port_get_buffer = jack_port_get_buffer; ma_jack_free_proc _jack_free = jack_free; pContext->jack.jack_client_open = (ma_proc)_jack_client_open; pContext->jack.jack_client_close = (ma_proc)_jack_client_close; pContext->jack.jack_client_name_size = (ma_proc)_jack_client_name_size; pContext->jack.jack_set_process_callback = (ma_proc)_jack_set_process_callback; pContext->jack.jack_set_buffer_size_callback = (ma_proc)_jack_set_buffer_size_callback; pContext->jack.jack_on_shutdown = (ma_proc)_jack_on_shutdown; pContext->jack.jack_get_sample_rate = (ma_proc)_jack_get_sample_rate; pContext->jack.jack_get_buffer_size = (ma_proc)_jack_get_buffer_size; pContext->jack.jack_get_ports = (ma_proc)_jack_get_ports; pContext->jack.jack_activate = (ma_proc)_jack_activate; pContext->jack.jack_deactivate = (ma_proc)_jack_deactivate; pContext->jack.jack_connect = (ma_proc)_jack_connect; pContext->jack.jack_port_register = (ma_proc)_jack_port_register; pContext->jack.jack_port_name = (ma_proc)_jack_port_name; pContext->jack.jack_port_get_buffer = (ma_proc)_jack_port_get_buffer; pContext->jack.jack_free = (ma_proc)_jack_free; #endif if (pConfig->jack.pClientName != NULL) { pContext->jack.pClientName = ma_copy_string(pConfig->jack.pClientName, &pContext->allocationCallbacks); } pContext->jack.tryStartServer = pConfig->jack.tryStartServer; /* Getting here means the JACK library is installed, but it doesn't necessarily mean it's usable. We need to quickly test this by connecting a temporary client. */ { ma_jack_client_t* pDummyClient; ma_result result = ma_context_open_client__jack(pContext, &pDummyClient); if (result != MA_SUCCESS) { ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks); #ifndef MA_NO_RUNTIME_LINKING ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO); #endif return MA_NO_BACKEND; } ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDummyClient); } pCallbacks->onContextInit = ma_context_init__jack; pCallbacks->onContextUninit = ma_context_uninit__jack; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__jack; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__jack; pCallbacks->onDeviceInit = ma_device_init__jack; pCallbacks->onDeviceUninit = ma_device_uninit__jack; pCallbacks->onDeviceStart = ma_device_start__jack; pCallbacks->onDeviceStop = ma_device_stop__jack; pCallbacks->onDeviceRead = NULL; /* Not used because JACK is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not used because JACK is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not used because JACK is asynchronous. */ return MA_SUCCESS; } #endif /* MA_HAS_JACK */ /****************************************************************************** Core Audio Backend References ========== - Technical Note TN2091: Device input using the HAL Output Audio Unit https://developer.apple.com/library/archive/technotes/tn2091/_index.html ******************************************************************************/ #ifdef MA_HAS_COREAUDIO #include #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 #define MA_APPLE_MOBILE #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1 #define MA_APPLE_TV #endif #if defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1 #define MA_APPLE_WATCH #endif #if __has_feature(objc_arc) #define MA_BRIDGE_TRANSFER __bridge_transfer #define MA_BRIDGE_RETAINED __bridge_retained #else #define MA_BRIDGE_TRANSFER #define MA_BRIDGE_RETAINED #endif #else #define MA_APPLE_DESKTOP #endif #if defined(MA_APPLE_DESKTOP) #include #else #include #endif #include /* CoreFoundation */ typedef Boolean (* ma_CFStringGetCString_proc)(CFStringRef theString, char* buffer, CFIndex bufferSize, CFStringEncoding encoding); typedef void (* ma_CFRelease_proc)(CFTypeRef cf); /* CoreAudio */ #if defined(MA_APPLE_DESKTOP) typedef OSStatus (* ma_AudioObjectGetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* ioDataSize, void* outData); typedef OSStatus (* ma_AudioObjectGetPropertyDataSize_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize); typedef OSStatus (* ma_AudioObjectSetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData); typedef OSStatus (* ma_AudioObjectAddPropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData); typedef OSStatus (* ma_AudioObjectRemovePropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData); #endif /* AudioToolbox */ typedef AudioComponent (* ma_AudioComponentFindNext_proc)(AudioComponent inComponent, const AudioComponentDescription* inDesc); typedef OSStatus (* ma_AudioComponentInstanceDispose_proc)(AudioComponentInstance inInstance); typedef OSStatus (* ma_AudioComponentInstanceNew_proc)(AudioComponent inComponent, AudioComponentInstance* outInstance); typedef OSStatus (* ma_AudioOutputUnitStart_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioOutputUnitStop_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioUnitAddPropertyListener_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitPropertyListenerProc inProc, void* inProcUserData); typedef OSStatus (* ma_AudioUnitGetPropertyInfo_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, UInt32* outDataSize, Boolean* outWriteable); typedef OSStatus (* ma_AudioUnitGetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void* outData, UInt32* ioDataSize); typedef OSStatus (* ma_AudioUnitSetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void* inData, UInt32 inDataSize); typedef OSStatus (* ma_AudioUnitInitialize_proc)(AudioUnit inUnit); typedef OSStatus (* ma_AudioUnitRender_proc)(AudioUnit inUnit, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inOutputBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData); #define MA_COREAUDIO_OUTPUT_BUS 0 #define MA_COREAUDIO_INPUT_BUS 1 #if defined(MA_APPLE_DESKTOP) static ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit); #endif /* Core Audio So far, Core Audio has been the worst backend to work with due to being both unintuitive and having almost no documentation apart from comments in the headers (which admittedly are quite good). For my own purposes, and for anybody out there whose needing to figure out how this darn thing works, I'm going to outline a few things here. Since miniaudio is a fairly low-level API, one of the things it needs is control over specific devices, and it needs to be able to identify whether or not it can be used as playback and/or capture. The AudioObject API is the only one I've seen that supports this level of detail. There was some public domain sample code I stumbled across that used the AudioComponent and AudioUnit APIs, but I couldn't see anything that gave low-level control over device selection and capabilities (the distinction between playback and capture in particular). Therefore, miniaudio is using the AudioObject API. Most (all?) functions in the AudioObject API take a AudioObjectID as its input. This is the device identifier. When retrieving global information, such as the device list, you use kAudioObjectSystemObject. When retrieving device-specific data, you pass in the ID for that device. In order to retrieve device-specific IDs you need to enumerate over each of the devices. This is done using the AudioObjectGetPropertyDataSize() and AudioObjectGetPropertyData() APIs which seem to be the central APIs for retrieving information about the system and specific devices. To use the AudioObjectGetPropertyData() API you need to use the notion of a property address. A property address is a structure with three variables and is used to identify which property you are getting or setting. The first is the "selector" which is basically the specific property that you're wanting to retrieve or set. The second is the "scope", which is typically set to kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput for input-specific properties and kAudioObjectPropertyScopeOutput for output-specific properties. The last is the "element" which is always set to kAudioObjectPropertyElementMain in miniaudio's case. I don't know of any cases where this would be set to anything different. Back to the earlier issue of device retrieval, you first use the AudioObjectGetPropertyDataSize() API to retrieve the size of the raw data which is just a list of AudioDeviceID's. You use the kAudioObjectSystemObject AudioObjectID, and a property address with the kAudioHardwarePropertyDevices selector and the kAudioObjectPropertyScopeGlobal scope. Once you have the size, allocate a block of memory of that size and then call AudioObjectGetPropertyData(). The data is just a list of AudioDeviceID's so just do "dataSize/sizeof(AudioDeviceID)" to know the device count. */ #if defined(MA_APPLE_MOBILE) static void ma_device__on_notification_interruption_began(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began)); } static void ma_device__on_notification_interruption_ended(ma_device* pDevice) { ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended)); } #endif static ma_result ma_result_from_OSStatus(OSStatus status) { switch (status) { case noErr: return MA_SUCCESS; #if defined(MA_APPLE_DESKTOP) case kAudioHardwareNotRunningError: return MA_DEVICE_NOT_STARTED; case kAudioHardwareUnspecifiedError: return MA_ERROR; case kAudioHardwareUnknownPropertyError: return MA_INVALID_ARGS; case kAudioHardwareBadPropertySizeError: return MA_INVALID_OPERATION; case kAudioHardwareIllegalOperationError: return MA_INVALID_OPERATION; case kAudioHardwareBadObjectError: return MA_INVALID_ARGS; case kAudioHardwareBadDeviceError: return MA_INVALID_ARGS; case kAudioHardwareBadStreamError: return MA_INVALID_ARGS; case kAudioHardwareUnsupportedOperationError: return MA_INVALID_OPERATION; case kAudioDeviceUnsupportedFormatError: return MA_FORMAT_NOT_SUPPORTED; case kAudioDevicePermissionsError: return MA_ACCESS_DENIED; #endif default: return MA_ERROR; } } #if 0 static ma_channel ma_channel_from_AudioChannelBitmap(AudioChannelBitmap bit) { switch (bit) { case kAudioChannelBit_Left: return MA_CHANNEL_LEFT; case kAudioChannelBit_Right: return MA_CHANNEL_RIGHT; case kAudioChannelBit_Center: return MA_CHANNEL_FRONT_CENTER; case kAudioChannelBit_LFEScreen: return MA_CHANNEL_LFE; case kAudioChannelBit_LeftSurround: return MA_CHANNEL_BACK_LEFT; case kAudioChannelBit_RightSurround: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelBit_LeftCenter: return MA_CHANNEL_FRONT_LEFT_CENTER; case kAudioChannelBit_RightCenter: return MA_CHANNEL_FRONT_RIGHT_CENTER; case kAudioChannelBit_CenterSurround: return MA_CHANNEL_BACK_CENTER; case kAudioChannelBit_LeftSurroundDirect: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelBit_RightSurroundDirect: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelBit_TopCenterSurround: return MA_CHANNEL_TOP_CENTER; case kAudioChannelBit_VerticalHeightLeft: return MA_CHANNEL_TOP_FRONT_LEFT; case kAudioChannelBit_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER; case kAudioChannelBit_VerticalHeightRight: return MA_CHANNEL_TOP_FRONT_RIGHT; case kAudioChannelBit_TopBackLeft: return MA_CHANNEL_TOP_BACK_LEFT; case kAudioChannelBit_TopBackCenter: return MA_CHANNEL_TOP_BACK_CENTER; case kAudioChannelBit_TopBackRight: return MA_CHANNEL_TOP_BACK_RIGHT; default: return MA_CHANNEL_NONE; } } #endif static ma_result ma_format_from_AudioStreamBasicDescription(const AudioStreamBasicDescription* pDescription, ma_format* pFormatOut) { MA_ASSERT(pDescription != NULL); MA_ASSERT(pFormatOut != NULL); *pFormatOut = ma_format_unknown; /* Safety. */ /* There's a few things miniaudio doesn't support. */ if (pDescription->mFormatID != kAudioFormatLinearPCM) { return MA_FORMAT_NOT_SUPPORTED; } /* We don't support any non-packed formats that are aligned high. */ if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsAlignedHigh) != 0) { return MA_FORMAT_NOT_SUPPORTED; } /* Only supporting native-endian. */ if ((ma_is_little_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) != 0) || (ma_is_big_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) == 0)) { return MA_FORMAT_NOT_SUPPORTED; } /* We are not currently supporting non-interleaved formats (this will be added in a future version of miniaudio). */ /*if ((pDescription->mFormatFlags & kAudioFormatFlagIsNonInterleaved) != 0) { return MA_FORMAT_NOT_SUPPORTED; }*/ if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsFloat) != 0) { if (pDescription->mBitsPerChannel == 32) { *pFormatOut = ma_format_f32; return MA_SUCCESS; } } else { if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) != 0) { if (pDescription->mBitsPerChannel == 16) { *pFormatOut = ma_format_s16; return MA_SUCCESS; } else if (pDescription->mBitsPerChannel == 24) { if (pDescription->mBytesPerFrame == (pDescription->mBitsPerChannel/8 * pDescription->mChannelsPerFrame)) { *pFormatOut = ma_format_s24; return MA_SUCCESS; } else { if (pDescription->mBytesPerFrame/pDescription->mChannelsPerFrame == sizeof(ma_int32)) { /* TODO: Implement ma_format_s24_32. */ /**pFormatOut = ma_format_s24_32;*/ /*return MA_SUCCESS;*/ return MA_FORMAT_NOT_SUPPORTED; } } } else if (pDescription->mBitsPerChannel == 32) { *pFormatOut = ma_format_s32; return MA_SUCCESS; } } else { if (pDescription->mBitsPerChannel == 8) { *pFormatOut = ma_format_u8; return MA_SUCCESS; } } } /* Getting here means the format is not supported. */ return MA_FORMAT_NOT_SUPPORTED; } #if defined(MA_APPLE_DESKTOP) static ma_channel ma_channel_from_AudioChannelLabel(AudioChannelLabel label) { switch (label) { case kAudioChannelLabel_Unknown: return MA_CHANNEL_NONE; case kAudioChannelLabel_Unused: return MA_CHANNEL_NONE; case kAudioChannelLabel_UseCoordinates: return MA_CHANNEL_NONE; case kAudioChannelLabel_Left: return MA_CHANNEL_LEFT; case kAudioChannelLabel_Right: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_Center: return MA_CHANNEL_FRONT_CENTER; case kAudioChannelLabel_LFEScreen: return MA_CHANNEL_LFE; case kAudioChannelLabel_LeftSurround: return MA_CHANNEL_BACK_LEFT; case kAudioChannelLabel_RightSurround: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelLabel_LeftCenter: return MA_CHANNEL_FRONT_LEFT_CENTER; case kAudioChannelLabel_RightCenter: return MA_CHANNEL_FRONT_RIGHT_CENTER; case kAudioChannelLabel_CenterSurround: return MA_CHANNEL_BACK_CENTER; case kAudioChannelLabel_LeftSurroundDirect: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelLabel_RightSurroundDirect: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelLabel_TopCenterSurround: return MA_CHANNEL_TOP_CENTER; case kAudioChannelLabel_VerticalHeightLeft: return MA_CHANNEL_TOP_FRONT_LEFT; case kAudioChannelLabel_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER; case kAudioChannelLabel_VerticalHeightRight: return MA_CHANNEL_TOP_FRONT_RIGHT; case kAudioChannelLabel_TopBackLeft: return MA_CHANNEL_TOP_BACK_LEFT; case kAudioChannelLabel_TopBackCenter: return MA_CHANNEL_TOP_BACK_CENTER; case kAudioChannelLabel_TopBackRight: return MA_CHANNEL_TOP_BACK_RIGHT; case kAudioChannelLabel_RearSurroundLeft: return MA_CHANNEL_BACK_LEFT; case kAudioChannelLabel_RearSurroundRight: return MA_CHANNEL_BACK_RIGHT; case kAudioChannelLabel_LeftWide: return MA_CHANNEL_SIDE_LEFT; case kAudioChannelLabel_RightWide: return MA_CHANNEL_SIDE_RIGHT; case kAudioChannelLabel_LFE2: return MA_CHANNEL_LFE; case kAudioChannelLabel_LeftTotal: return MA_CHANNEL_LEFT; case kAudioChannelLabel_RightTotal: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_HearingImpaired: return MA_CHANNEL_NONE; case kAudioChannelLabel_Narration: return MA_CHANNEL_MONO; case kAudioChannelLabel_Mono: return MA_CHANNEL_MONO; case kAudioChannelLabel_DialogCentricMix: return MA_CHANNEL_MONO; case kAudioChannelLabel_CenterSurroundDirect: return MA_CHANNEL_BACK_CENTER; case kAudioChannelLabel_Haptic: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_W: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_X: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_Y: return MA_CHANNEL_NONE; case kAudioChannelLabel_Ambisonic_Z: return MA_CHANNEL_NONE; case kAudioChannelLabel_MS_Mid: return MA_CHANNEL_LEFT; case kAudioChannelLabel_MS_Side: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_XY_X: return MA_CHANNEL_LEFT; case kAudioChannelLabel_XY_Y: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_HeadphonesLeft: return MA_CHANNEL_LEFT; case kAudioChannelLabel_HeadphonesRight: return MA_CHANNEL_RIGHT; case kAudioChannelLabel_ClickTrack: return MA_CHANNEL_NONE; case kAudioChannelLabel_ForeignLanguage: return MA_CHANNEL_NONE; case kAudioChannelLabel_Discrete: return MA_CHANNEL_NONE; case kAudioChannelLabel_Discrete_0: return MA_CHANNEL_AUX_0; case kAudioChannelLabel_Discrete_1: return MA_CHANNEL_AUX_1; case kAudioChannelLabel_Discrete_2: return MA_CHANNEL_AUX_2; case kAudioChannelLabel_Discrete_3: return MA_CHANNEL_AUX_3; case kAudioChannelLabel_Discrete_4: return MA_CHANNEL_AUX_4; case kAudioChannelLabel_Discrete_5: return MA_CHANNEL_AUX_5; case kAudioChannelLabel_Discrete_6: return MA_CHANNEL_AUX_6; case kAudioChannelLabel_Discrete_7: return MA_CHANNEL_AUX_7; case kAudioChannelLabel_Discrete_8: return MA_CHANNEL_AUX_8; case kAudioChannelLabel_Discrete_9: return MA_CHANNEL_AUX_9; case kAudioChannelLabel_Discrete_10: return MA_CHANNEL_AUX_10; case kAudioChannelLabel_Discrete_11: return MA_CHANNEL_AUX_11; case kAudioChannelLabel_Discrete_12: return MA_CHANNEL_AUX_12; case kAudioChannelLabel_Discrete_13: return MA_CHANNEL_AUX_13; case kAudioChannelLabel_Discrete_14: return MA_CHANNEL_AUX_14; case kAudioChannelLabel_Discrete_15: return MA_CHANNEL_AUX_15; case kAudioChannelLabel_Discrete_65535: return MA_CHANNEL_NONE; #if 0 /* Introduced in a later version of macOS. */ case kAudioChannelLabel_HOA_ACN: return MA_CHANNEL_NONE; case kAudioChannelLabel_HOA_ACN_0: return MA_CHANNEL_AUX_0; case kAudioChannelLabel_HOA_ACN_1: return MA_CHANNEL_AUX_1; case kAudioChannelLabel_HOA_ACN_2: return MA_CHANNEL_AUX_2; case kAudioChannelLabel_HOA_ACN_3: return MA_CHANNEL_AUX_3; case kAudioChannelLabel_HOA_ACN_4: return MA_CHANNEL_AUX_4; case kAudioChannelLabel_HOA_ACN_5: return MA_CHANNEL_AUX_5; case kAudioChannelLabel_HOA_ACN_6: return MA_CHANNEL_AUX_6; case kAudioChannelLabel_HOA_ACN_7: return MA_CHANNEL_AUX_7; case kAudioChannelLabel_HOA_ACN_8: return MA_CHANNEL_AUX_8; case kAudioChannelLabel_HOA_ACN_9: return MA_CHANNEL_AUX_9; case kAudioChannelLabel_HOA_ACN_10: return MA_CHANNEL_AUX_10; case kAudioChannelLabel_HOA_ACN_11: return MA_CHANNEL_AUX_11; case kAudioChannelLabel_HOA_ACN_12: return MA_CHANNEL_AUX_12; case kAudioChannelLabel_HOA_ACN_13: return MA_CHANNEL_AUX_13; case kAudioChannelLabel_HOA_ACN_14: return MA_CHANNEL_AUX_14; case kAudioChannelLabel_HOA_ACN_15: return MA_CHANNEL_AUX_15; case kAudioChannelLabel_HOA_ACN_65024: return MA_CHANNEL_NONE; #endif default: return MA_CHANNEL_NONE; } } static ma_result ma_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChannelLayout, ma_channel* pChannelMap, size_t channelMapCap) { MA_ASSERT(pChannelLayout != NULL); if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) { UInt32 iChannel; for (iChannel = 0; iChannel < pChannelLayout->mNumberChannelDescriptions && iChannel < channelMapCap; ++iChannel) { pChannelMap[iChannel] = ma_channel_from_AudioChannelLabel(pChannelLayout->mChannelDescriptions[iChannel].mChannelLabel); } } else #if 0 if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) { /* This is the same kind of system that's used by Windows audio APIs. */ UInt32 iChannel = 0; UInt32 iBit; AudioChannelBitmap bitmap = pChannelLayout->mChannelBitmap; for (iBit = 0; iBit < 32 && iChannel < channelMapCap; ++iBit) { AudioChannelBitmap bit = bitmap & (1 << iBit); if (bit != 0) { pChannelMap[iChannel++] = ma_channel_from_AudioChannelBit(bit); } } } else #endif { /* Need to use the tag to determine the channel map. For now I'm just assuming a default channel map, but later on this should be updated to determine the mapping based on the tag. */ UInt32 channelCount; /* Our channel map retrieval APIs below take 32-bit integers, so we'll want to clamp the channel map capacity. */ if (channelMapCap > 0xFFFFFFFF) { channelMapCap = 0xFFFFFFFF; } channelCount = ma_min(AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag), (UInt32)channelMapCap); switch (pChannelLayout->mChannelLayoutTag) { case kAudioChannelLayoutTag_Mono: case kAudioChannelLayoutTag_Stereo: case kAudioChannelLayoutTag_StereoHeadphones: case kAudioChannelLayoutTag_MatrixStereo: case kAudioChannelLayoutTag_MidSide: case kAudioChannelLayoutTag_XY: case kAudioChannelLayoutTag_Binaural: case kAudioChannelLayoutTag_Ambisonic_B_Format: { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } break; case kAudioChannelLayoutTag_Octagonal: { pChannelMap[7] = MA_CHANNEL_SIDE_RIGHT; pChannelMap[6] = MA_CHANNEL_SIDE_LEFT; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Hexagonal: { pChannelMap[5] = MA_CHANNEL_BACK_CENTER; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Pentagonal: { pChannelMap[4] = MA_CHANNEL_FRONT_CENTER; } MA_FALLTHROUGH; /* Intentional fallthrough. */ case kAudioChannelLayoutTag_Quadraphonic: { pChannelMap[3] = MA_CHANNEL_BACK_RIGHT; pChannelMap[2] = MA_CHANNEL_BACK_LEFT; pChannelMap[1] = MA_CHANNEL_RIGHT; pChannelMap[0] = MA_CHANNEL_LEFT; } break; /* TODO: Add support for more tags here. */ default: { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } break; } } return MA_SUCCESS; } #if (defined(MAC_OS_VERSION_12_0) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_12_0) || \ (defined(__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0) #define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMain #else /* kAudioObjectPropertyElementMaster is deprecated. */ #define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMaster #endif /* kAudioDevicePropertyScope* were renamed to kAudioObjectPropertyScope* in 10.8. */ #if !defined(MAC_OS_X_VERSION_10_8) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8) #define kAudioObjectPropertyScopeInput kAudioDevicePropertyScopeInput #define kAudioObjectPropertyScopeOutput kAudioDevicePropertyScopeOutput #endif static ma_result ma_get_device_object_ids__coreaudio(ma_context* pContext, UInt32* pDeviceCount, AudioObjectID** ppDeviceObjectIDs) /* NOTE: Free the returned buffer with ma_free(). */ { AudioObjectPropertyAddress propAddressDevices; UInt32 deviceObjectsDataSize; OSStatus status; AudioObjectID* pDeviceObjectIDs; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceCount != NULL); MA_ASSERT(ppDeviceObjectIDs != NULL); /* Safety. */ *pDeviceCount = 0; *ppDeviceObjectIDs = NULL; propAddressDevices.mSelector = kAudioHardwarePropertyDevices; propAddressDevices.mScope = kAudioObjectPropertyScopeGlobal; propAddressDevices.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pDeviceObjectIDs = (AudioObjectID*)ma_malloc(deviceObjectsDataSize, &pContext->allocationCallbacks); if (pDeviceObjectIDs == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize, pDeviceObjectIDs); if (status != noErr) { ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pDeviceCount = deviceObjectsDataSize / sizeof(AudioObjectID); *ppDeviceObjectIDs = pDeviceObjectIDs; return MA_SUCCESS; } static ma_result ma_get_AudioObject_uid_as_CFStringRef(ma_context* pContext, AudioObjectID objectID, CFStringRef* pUID) { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); propAddress.mSelector = kAudioDevicePropertyDeviceUID; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(*pUID); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, pUID); if (status != noErr) { return ma_result_from_OSStatus(status); } return MA_SUCCESS; } static ma_result ma_get_AudioObject_uid(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut) { CFStringRef uid; ma_result result; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_uid_as_CFStringRef(pContext, objectID, &uid); if (result != MA_SUCCESS) { return result; } if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(uid, bufferOut, bufferSize, kCFStringEncodingUTF8)) { return MA_ERROR; } ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(uid); return MA_SUCCESS; } static ma_result ma_get_AudioObject_name(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut) { AudioObjectPropertyAddress propAddress; CFStringRef deviceName = NULL; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); propAddress.mSelector = kAudioDevicePropertyDeviceNameCFString; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(deviceName); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, &deviceName); if (status != noErr) { return ma_result_from_OSStatus(status); } if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(deviceName, bufferOut, bufferSize, kCFStringEncodingUTF8)) { return MA_ERROR; } ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(deviceName); return MA_SUCCESS; } static ma_bool32 ma_does_AudioObject_support_scope(ma_context* pContext, AudioObjectID deviceObjectID, AudioObjectPropertyScope scope) { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioBufferList* pBufferList; ma_bool32 isSupported; MA_ASSERT(pContext != NULL); /* To know whether or not a device is an input device we need ot look at the stream configuration. If it has an output channel it's a playback device. */ propAddress.mSelector = kAudioDevicePropertyStreamConfiguration; propAddress.mScope = scope; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return MA_FALSE; } pBufferList = (AudioBufferList*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pBufferList == NULL) { return MA_FALSE; /* Out of memory. */ } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pBufferList); if (status != noErr) { ma_free(pBufferList, &pContext->allocationCallbacks); return MA_FALSE; } isSupported = MA_FALSE; if (pBufferList->mNumberBuffers > 0) { isSupported = MA_TRUE; } ma_free(pBufferList, &pContext->allocationCallbacks); return isSupported; } static ma_bool32 ma_does_AudioObject_support_playback(ma_context* pContext, AudioObjectID deviceObjectID) { return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeOutput); } static ma_bool32 ma_does_AudioObject_support_capture(ma_context* pContext, AudioObjectID deviceObjectID) { return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeInput); } static ma_result ma_get_AudioObject_stream_descriptions(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pDescriptionCount, AudioStreamRangedDescription** ppDescriptions) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioStreamRangedDescription* pDescriptions; MA_ASSERT(pContext != NULL); MA_ASSERT(pDescriptionCount != NULL); MA_ASSERT(ppDescriptions != NULL); /* TODO: Experiment with kAudioStreamPropertyAvailablePhysicalFormats instead of (or in addition to) kAudioStreamPropertyAvailableVirtualFormats. My MacBook Pro uses s24/32 format, however, which miniaudio does not currently support. */ propAddress.mSelector = kAudioStreamPropertyAvailableVirtualFormats; /*kAudioStreamPropertyAvailablePhysicalFormats;*/ propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pDescriptions = (AudioStreamRangedDescription*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pDescriptions == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pDescriptions); if (status != noErr) { ma_free(pDescriptions, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pDescriptionCount = dataSize / sizeof(*pDescriptions); *ppDescriptions = pDescriptions; return MA_SUCCESS; } static ma_result ma_get_AudioObject_channel_layout(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, AudioChannelLayout** ppChannelLayout) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioChannelLayout* pChannelLayout; MA_ASSERT(pContext != NULL); MA_ASSERT(ppChannelLayout != NULL); *ppChannelLayout = NULL; /* Safety. */ propAddress.mSelector = kAudioDevicePropertyPreferredChannelLayout; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pChannelLayout = (AudioChannelLayout*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pChannelLayout == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pChannelLayout); if (status != noErr) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *ppChannelLayout = pChannelLayout; return MA_SUCCESS; } static ma_result ma_get_AudioObject_channel_count(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pChannelCount) { AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pChannelCount != NULL); *pChannelCount = 0; /* Safety. */ result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout); if (result != MA_SUCCESS) { return result; } if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) { *pChannelCount = pChannelLayout->mNumberChannelDescriptions; } else if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) { *pChannelCount = ma_count_set_bits(pChannelLayout->mChannelBitmap); } else { *pChannelCount = AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag); } ma_free(pChannelLayout, &pContext->allocationCallbacks); return MA_SUCCESS; } #if 0 static ma_result ma_get_AudioObject_channel_map(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap) { AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout); if (result != MA_SUCCESS) { return result; /* Rather than always failing here, would it be more robust to simply assume a default? */ } result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } #endif static ma_result ma_get_AudioObject_sample_rates(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pSampleRateRangesCount, AudioValueRange** ppSampleRateRanges) /* NOTE: Free the returned pointer with ma_free(). */ { AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; AudioValueRange* pSampleRateRanges; MA_ASSERT(pContext != NULL); MA_ASSERT(pSampleRateRangesCount != NULL); MA_ASSERT(ppSampleRateRanges != NULL); /* Safety. */ *pSampleRateRangesCount = 0; *ppSampleRateRanges = NULL; propAddress.mSelector = kAudioDevicePropertyAvailableNominalSampleRates; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize); if (status != noErr) { return ma_result_from_OSStatus(status); } pSampleRateRanges = (AudioValueRange*)ma_malloc(dataSize, &pContext->allocationCallbacks); if (pSampleRateRanges == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pSampleRateRanges); if (status != noErr) { ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } *pSampleRateRangesCount = dataSize / sizeof(*pSampleRateRanges); *ppSampleRateRanges = pSampleRateRanges; return MA_SUCCESS; } #if 0 static ma_result ma_get_AudioObject_get_closest_sample_rate(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 sampleRateIn, ma_uint32* pSampleRateOut) { UInt32 sampleRateRangeCount; AudioValueRange* pSampleRateRanges; ma_result result; MA_ASSERT(pContext != NULL); MA_ASSERT(pSampleRateOut != NULL); *pSampleRateOut = 0; /* Safety. */ result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges); if (result != MA_SUCCESS) { return result; } if (sampleRateRangeCount == 0) { ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_ERROR; /* Should never hit this case should we? */ } if (sampleRateIn == 0) { /* Search in order of miniaudio's preferred priority. */ UInt32 iMALSampleRate; for (iMALSampleRate = 0; iMALSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iMALSampleRate) { ma_uint32 malSampleRate = g_maStandardSampleRatePriorities[iMALSampleRate]; UInt32 iCASampleRate; for (iCASampleRate = 0; iCASampleRate < sampleRateRangeCount; ++iCASampleRate) { AudioValueRange caSampleRate = pSampleRateRanges[iCASampleRate]; if (caSampleRate.mMinimum <= malSampleRate && caSampleRate.mMaximum >= malSampleRate) { *pSampleRateOut = malSampleRate; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } } } /* If we get here it means none of miniaudio's standard sample rates matched any of the supported sample rates from the device. In this case we just fall back to the first one reported by Core Audio. */ MA_ASSERT(sampleRateRangeCount > 0); *pSampleRateOut = pSampleRateRanges[0].mMinimum; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } else { /* Find the closest match to this sample rate. */ UInt32 currentAbsoluteDifference = INT32_MAX; UInt32 iCurrentClosestRange = (UInt32)-1; UInt32 iRange; for (iRange = 0; iRange < sampleRateRangeCount; ++iRange) { if (pSampleRateRanges[iRange].mMinimum <= sampleRateIn && pSampleRateRanges[iRange].mMaximum >= sampleRateIn) { *pSampleRateOut = sampleRateIn; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } else { UInt32 absoluteDifference; if (pSampleRateRanges[iRange].mMinimum > sampleRateIn) { absoluteDifference = pSampleRateRanges[iRange].mMinimum - sampleRateIn; } else { absoluteDifference = sampleRateIn - pSampleRateRanges[iRange].mMaximum; } if (currentAbsoluteDifference > absoluteDifference) { currentAbsoluteDifference = absoluteDifference; iCurrentClosestRange = iRange; } } } MA_ASSERT(iCurrentClosestRange != (UInt32)-1); *pSampleRateOut = pSampleRateRanges[iCurrentClosestRange].mMinimum; ma_free(pSampleRateRanges, &pContext->allocationCallbacks); return MA_SUCCESS; } /* Should never get here, but it would mean we weren't able to find any suitable sample rates. */ /*ma_free(pSampleRateRanges, &pContext->allocationCallbacks);*/ /*return MA_ERROR;*/ } #endif static ma_result ma_get_AudioObject_closest_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 bufferSizeInFramesIn, ma_uint32* pBufferSizeInFramesOut) { AudioObjectPropertyAddress propAddress; AudioValueRange bufferSizeRange; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); MA_ASSERT(pBufferSizeInFramesOut != NULL); *pBufferSizeInFramesOut = 0; /* Safety. */ propAddress.mSelector = kAudioDevicePropertyBufferFrameSizeRange; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; dataSize = sizeof(bufferSizeRange); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &bufferSizeRange); if (status != noErr) { return ma_result_from_OSStatus(status); } /* This is just a clamp. */ if (bufferSizeInFramesIn < bufferSizeRange.mMinimum) { *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMinimum; } else if (bufferSizeInFramesIn > bufferSizeRange.mMaximum) { *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMaximum; } else { *pBufferSizeInFramesOut = bufferSizeInFramesIn; } return MA_SUCCESS; } static ma_result ma_set_AudioObject_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pPeriodSizeInOut) { ma_result result; ma_uint32 chosenBufferSizeInFrames; AudioObjectPropertyAddress propAddress; UInt32 dataSize; OSStatus status; MA_ASSERT(pContext != NULL); result = ma_get_AudioObject_closest_buffer_size_in_frames(pContext, deviceObjectID, deviceType, *pPeriodSizeInOut, &chosenBufferSizeInFrames); if (result != MA_SUCCESS) { return result; } /* Try setting the size of the buffer... If this fails we just use whatever is currently set. */ propAddress.mSelector = kAudioDevicePropertyBufferFrameSize; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(chosenBufferSizeInFrames), &chosenBufferSizeInFrames); /* Get the actual size of the buffer. */ dataSize = sizeof(*pPeriodSizeInOut); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &chosenBufferSizeInFrames); if (status != noErr) { return ma_result_from_OSStatus(status); } *pPeriodSizeInOut = chosenBufferSizeInFrames; return MA_SUCCESS; } static ma_result ma_find_default_AudioObjectID(ma_context* pContext, ma_device_type deviceType, AudioObjectID* pDeviceObjectID) { AudioObjectPropertyAddress propAddressDefaultDevice; UInt32 defaultDeviceObjectIDSize = sizeof(AudioObjectID); AudioObjectID defaultDeviceObjectID; OSStatus status; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceObjectID != NULL); /* Safety. */ *pDeviceObjectID = 0; propAddressDefaultDevice.mScope = kAudioObjectPropertyScopeGlobal; propAddressDefaultDevice.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; if (deviceType == ma_device_type_playback) { propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultOutputDevice; } else { propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultInputDevice; } defaultDeviceObjectIDSize = sizeof(AudioObjectID); status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDefaultDevice, 0, NULL, &defaultDeviceObjectIDSize, &defaultDeviceObjectID); if (status == noErr) { *pDeviceObjectID = defaultDeviceObjectID; return MA_SUCCESS; } /* If we get here it means we couldn't find the device. */ return MA_NO_DEVICE; } static ma_result ma_find_AudioObjectID(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, AudioObjectID* pDeviceObjectID) { MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceObjectID != NULL); /* Safety. */ *pDeviceObjectID = 0; if (pDeviceID == NULL) { /* Default device. */ return ma_find_default_AudioObjectID(pContext, deviceType, pDeviceObjectID); } else { /* Explicit device. */ UInt32 deviceCount; AudioObjectID* pDeviceObjectIDs; ma_result result; UInt32 iDevice; result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs); if (result != MA_SUCCESS) { return result; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice]; char uid[256]; if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(uid), uid) != MA_SUCCESS) { continue; } if (deviceType == ma_device_type_playback) { if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) { if (strcmp(uid, pDeviceID->coreaudio) == 0) { *pDeviceObjectID = deviceObjectID; ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return MA_SUCCESS; } } } else { if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) { if (strcmp(uid, pDeviceID->coreaudio) == 0) { *pDeviceObjectID = deviceObjectID; ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); return MA_SUCCESS; } } } } ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); } /* If we get here it means we couldn't find the device. */ return MA_NO_DEVICE; } static ma_result ma_find_best_format__coreaudio(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const AudioStreamBasicDescription* pOrigFormat, AudioStreamBasicDescription* pFormat) { UInt32 deviceFormatDescriptionCount; AudioStreamRangedDescription* pDeviceFormatDescriptions; ma_result result; ma_uint32 desiredSampleRate; ma_uint32 desiredChannelCount; ma_format desiredFormat; AudioStreamBasicDescription bestDeviceFormatSoFar; ma_bool32 hasSupportedFormat; UInt32 iFormat; result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &deviceFormatDescriptionCount, &pDeviceFormatDescriptions); if (result != MA_SUCCESS) { return result; } desiredSampleRate = sampleRate; if (desiredSampleRate == 0) { desiredSampleRate = (ma_uint32)pOrigFormat->mSampleRate; } desiredChannelCount = channels; if (desiredChannelCount == 0) { desiredChannelCount = pOrigFormat->mChannelsPerFrame; } desiredFormat = format; if (desiredFormat == ma_format_unknown) { result = ma_format_from_AudioStreamBasicDescription(pOrigFormat, &desiredFormat); if (result != MA_SUCCESS || desiredFormat == ma_format_unknown) { desiredFormat = g_maFormatPriorities[0]; } } /* If we get here it means we don't have an exact match to what the client is asking for. We'll need to find the closest one. The next loop will check for formats that have the same sample rate to what we're asking for. If there is, we prefer that one in all cases. */ MA_ZERO_OBJECT(&bestDeviceFormatSoFar); hasSupportedFormat = MA_FALSE; for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) { ma_format formatFromDescription; ma_result formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &formatFromDescription); if (formatResult == MA_SUCCESS && formatFromDescription != ma_format_unknown) { hasSupportedFormat = MA_TRUE; bestDeviceFormatSoFar = pDeviceFormatDescriptions[iFormat].mFormat; break; } } if (!hasSupportedFormat) { ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks); return MA_FORMAT_NOT_SUPPORTED; } for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) { AudioStreamBasicDescription thisDeviceFormat = pDeviceFormatDescriptions[iFormat].mFormat; ma_format thisSampleFormat; ma_result formatResult; ma_format bestSampleFormatSoFar; /* If the format is not supported by miniaudio we need to skip this one entirely. */ formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &thisSampleFormat); if (formatResult != MA_SUCCESS || thisSampleFormat == ma_format_unknown) { continue; /* The format is not supported by miniaudio. Skip. */ } ma_format_from_AudioStreamBasicDescription(&bestDeviceFormatSoFar, &bestSampleFormatSoFar); /* Getting here means the format is supported by miniaudio which makes this format a candidate. */ if (thisDeviceFormat.mSampleRate != desiredSampleRate) { /* The sample rate does not match, but this format could still be usable, although it's a very low priority. If the best format so far has an equal sample rate we can just ignore this one. */ if (bestDeviceFormatSoFar.mSampleRate == desiredSampleRate) { continue; /* The best sample rate so far has the same sample rate as what we requested which means it's still the best so far. Skip this format. */ } else { /* In this case, neither the best format so far nor this one have the same sample rate. Check the channel count next. */ if (thisDeviceFormat.mChannelsPerFrame != desiredChannelCount) { /* This format has a different sample rate _and_ a different channel count. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { continue; /* No change to the best format. */ } else { /* Both this format and the best so far have different sample rates and different channel counts. Whichever has the best format is the new best. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format. */ } } } else { /* This format has a different sample rate but the desired channel count. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { /* Both this format and the best so far have the desired channel count. Whichever has the best format is the new best. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } else { /* This format has the desired channel count, but the best so far does not. We have a new best. */ bestDeviceFormatSoFar = thisDeviceFormat; continue; } } } } else { /* The sample rates match which makes this format a very high priority contender. If the best format so far has a different sample rate it needs to be replaced with this one. */ if (bestDeviceFormatSoFar.mSampleRate != desiredSampleRate) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { /* In this case both this format and the best format so far have the same sample rate. Check the channel count next. */ if (thisDeviceFormat.mChannelsPerFrame == desiredChannelCount) { /* In this case this format has the same channel count as what the client is requesting. If the best format so far has a different count, this one becomes the new best. */ if (bestDeviceFormatSoFar.mChannelsPerFrame != desiredChannelCount) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { /* In this case both this format and the best so far have the ideal sample rate and channel count. Check the format. */ if (thisSampleFormat == desiredFormat) { bestDeviceFormatSoFar = thisDeviceFormat; break; /* Found the exact match. */ } else { /* The formats are different. The new best format is the one with the highest priority format according to miniaudio. */ if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } } } else { /* In this case the channel count is different to what the client has requested. If the best so far has the same channel count as the requested count then it remains the best. */ if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) { continue; } else { /* This is the case where both have the same sample rate (good) but different channel counts. Right now both have about the same priority, but we need to compare the format now. */ if (thisSampleFormat == bestSampleFormatSoFar) { if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) { bestDeviceFormatSoFar = thisDeviceFormat; continue; } else { continue; /* No change to the best format for now. */ } } } } } } } *pFormat = bestDeviceFormatSoFar; ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks); return MA_SUCCESS; } static ma_result ma_get_AudioUnit_channel_map(ma_context* pContext, AudioUnit audioUnit, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap) { AudioUnitScope deviceScope; AudioUnitElement deviceBus; UInt32 channelLayoutSize; OSStatus status; AudioChannelLayout* pChannelLayout; ma_result result; MA_ASSERT(pContext != NULL); if (deviceType == ma_device_type_playback) { deviceScope = kAudioUnitScope_Input; deviceBus = MA_COREAUDIO_OUTPUT_BUS; } else { deviceScope = kAudioUnitScope_Output; deviceBus = MA_COREAUDIO_INPUT_BUS; } status = ((ma_AudioUnitGetPropertyInfo_proc)pContext->coreaudio.AudioUnitGetPropertyInfo)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, &channelLayoutSize, NULL); if (status != noErr) { return ma_result_from_OSStatus(status); } pChannelLayout = (AudioChannelLayout*)ma_malloc(channelLayoutSize, &pContext->allocationCallbacks); if (pChannelLayout == NULL) { return MA_OUT_OF_MEMORY; } status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, pChannelLayout, &channelLayoutSize); if (status != noErr) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return ma_result_from_OSStatus(status); } result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { ma_free(pChannelLayout, &pContext->allocationCallbacks); return result; } ma_free(pChannelLayout, &pContext->allocationCallbacks); return MA_SUCCESS; } #endif /* MA_APPLE_DESKTOP */ #if !defined(MA_APPLE_DESKTOP) static void ma_AVAudioSessionPortDescription_to_device_info(AVAudioSessionPortDescription* pPortDesc, ma_device_info* pInfo) { MA_ZERO_OBJECT(pInfo); ma_strncpy_s(pInfo->name, sizeof(pInfo->name), [pPortDesc.portName UTF8String], (size_t)-1); ma_strncpy_s(pInfo->id.coreaudio, sizeof(pInfo->id.coreaudio), [pPortDesc.UID UTF8String], (size_t)-1); } #endif static ma_result ma_context_enumerate_devices__coreaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { #if defined(MA_APPLE_DESKTOP) UInt32 deviceCount; AudioObjectID* pDeviceObjectIDs; AudioObjectID defaultDeviceObjectIDPlayback; AudioObjectID defaultDeviceObjectIDCapture; ma_result result; UInt32 iDevice; ma_find_default_AudioObjectID(pContext, ma_device_type_playback, &defaultDeviceObjectIDPlayback); /* OK if this fails. */ ma_find_default_AudioObjectID(pContext, ma_device_type_capture, &defaultDeviceObjectIDCapture); /* OK if this fails. */ result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs); if (result != MA_SUCCESS) { return result; } for (iDevice = 0; iDevice < deviceCount; ++iDevice) { AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice]; ma_device_info info; MA_ZERO_OBJECT(&info); if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(info.id.coreaudio), info.id.coreaudio) != MA_SUCCESS) { continue; } if (ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(info.name), info.name) != MA_SUCCESS) { continue; } if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) { if (deviceObjectID == defaultDeviceObjectIDPlayback) { info.isDefault = MA_TRUE; } if (!callback(pContext, ma_device_type_playback, &info, pUserData)) { break; } } if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) { if (deviceObjectID == defaultDeviceObjectIDCapture) { info.isDefault = MA_TRUE; } if (!callback(pContext, ma_device_type_capture, &info, pUserData)) { break; } } } ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks); #else ma_device_info info; NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs]; for (AVAudioSessionPortDescription* pPortDesc in pOutputs) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info); if (!callback(pContext, ma_device_type_playback, &info, pUserData)) { return MA_SUCCESS; } } for (AVAudioSessionPortDescription* pPortDesc in pInputs) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info); if (!callback(pContext, ma_device_type_capture, &info, pUserData)) { return MA_SUCCESS; } } #endif return MA_SUCCESS; } static ma_result ma_context_get_device_info__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; MA_ASSERT(pContext != NULL); #if defined(MA_APPLE_DESKTOP) /* Desktop */ { AudioObjectID deviceObjectID; AudioObjectID defaultDeviceObjectID; UInt32 streamDescriptionCount; AudioStreamRangedDescription* pStreamDescriptions; UInt32 iStreamDescription; UInt32 sampleRateRangeCount; AudioValueRange* pSampleRateRanges; ma_find_default_AudioObjectID(pContext, deviceType, &defaultDeviceObjectID); /* OK if this fails. */ result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID); if (result != MA_SUCCESS) { return result; } result = ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(pDeviceInfo->id.coreaudio), pDeviceInfo->id.coreaudio); if (result != MA_SUCCESS) { return result; } result = ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pDeviceInfo->name), pDeviceInfo->name); if (result != MA_SUCCESS) { return result; } if (deviceObjectID == defaultDeviceObjectID) { pDeviceInfo->isDefault = MA_TRUE; } /* There could be a large number of permutations here. Fortunately there is only a single channel count being reported which reduces this quite a bit. For sample rates we're only reporting those that are one of miniaudio's recognized "standard" rates. If there are still more formats than can fit into our fixed sized array we'll just need to truncate them. This is unlikely and will probably only happen if some driver performs software data conversion and therefore reports every possible format and sample rate. */ pDeviceInfo->nativeDataFormatCount = 0; /* Formats. */ { ma_format uniqueFormats[ma_format_count]; ma_uint32 uniqueFormatCount = 0; ma_uint32 channels; /* Channels. */ result = ma_get_AudioObject_channel_count(pContext, deviceObjectID, deviceType, &channels); if (result != MA_SUCCESS) { return result; } /* Formats. */ result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &streamDescriptionCount, &pStreamDescriptions); if (result != MA_SUCCESS) { return result; } for (iStreamDescription = 0; iStreamDescription < streamDescriptionCount; ++iStreamDescription) { ma_format format; ma_bool32 hasFormatBeenHandled = MA_FALSE; ma_uint32 iOutputFormat; ma_uint32 iSampleRate; result = ma_format_from_AudioStreamBasicDescription(&pStreamDescriptions[iStreamDescription].mFormat, &format); if (result != MA_SUCCESS) { continue; } MA_ASSERT(format != ma_format_unknown); /* Make sure the format isn't already in the output list. */ for (iOutputFormat = 0; iOutputFormat < uniqueFormatCount; ++iOutputFormat) { if (uniqueFormats[iOutputFormat] == format) { hasFormatBeenHandled = MA_TRUE; break; } } /* If we've already handled this format just skip it. */ if (hasFormatBeenHandled) { continue; } uniqueFormats[uniqueFormatCount] = format; uniqueFormatCount += 1; /* Sample Rates */ result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges); if (result != MA_SUCCESS) { return result; } /* Annoyingly Core Audio reports a sample rate range. We just get all the standard rates that are between this range. */ for (iSampleRate = 0; iSampleRate < sampleRateRangeCount; ++iSampleRate) { ma_uint32 iStandardSampleRate; for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate]; if (standardSampleRate >= pSampleRateRanges[iSampleRate].mMinimum && standardSampleRate <= pSampleRateRanges[iSampleRate].mMaximum) { /* We have a new data format. Add it to the list. */ pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = standardSampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) { break; /* No more room for any more formats. */ } } } } ma_free(pSampleRateRanges, &pContext->allocationCallbacks); if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) { break; /* No more room for any more formats. */ } } ma_free(pStreamDescriptions, &pContext->allocationCallbacks); } } #else /* Mobile */ { AudioComponentDescription desc; AudioComponent component; AudioUnit audioUnit; OSStatus status; AudioUnitScope formatScope; AudioUnitElement formatElement; AudioStreamBasicDescription bestFormat; UInt32 propSize; /* We want to ensure we use a consistent device name to device enumeration. */ if (pDeviceID != NULL && pDeviceID->coreaudio[0] != '\0') { ma_bool32 found = MA_FALSE; if (deviceType == ma_device_type_playback) { NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs]; for (AVAudioSessionPortDescription* pPortDesc in pOutputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo); found = MA_TRUE; break; } } } else { NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; for (AVAudioSessionPortDescription* pPortDesc in pInputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo); found = MA_TRUE; break; } } } if (!found) { return MA_DOES_NOT_EXIST; } } else { if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } } /* Retrieving device information is more annoying on mobile than desktop. For simplicity I'm locking this down to whatever format is reported on a temporary I/O unit. The problem, however, is that this doesn't return a value for the sample rate which we need to retrieve from the AVAudioSession shared instance. */ desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_RemoteIO; desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc); if (component == NULL) { return MA_FAILED_TO_INIT_BACKEND; } status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)(component, &audioUnit); if (status != noErr) { return ma_result_from_OSStatus(status); } formatScope = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output; formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS; propSize = sizeof(bestFormat); status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, &propSize); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit); return ma_result_from_OSStatus(status); } ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit); audioUnit = NULL; /* Only a single format is being reported for iOS. */ pDeviceInfo->nativeDataFormatCount = 1; result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pDeviceInfo->nativeDataFormats[0].format); if (result != MA_SUCCESS) { return result; } pDeviceInfo->nativeDataFormats[0].channels = bestFormat.mChannelsPerFrame; /* It looks like Apple are wanting to push the whole AVAudioSession thing. Thus, we need to use that to determine device settings. To do this we just get the shared instance and inspect. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); pDeviceInfo->nativeDataFormats[0].sampleRate = (ma_uint32)pAudioSession.sampleRate; } } #endif (void)pDeviceInfo; /* Unused. */ return MA_SUCCESS; } static AudioBufferList* ma_allocate_AudioBufferList__coreaudio(ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout, const ma_allocation_callbacks* pAllocationCallbacks) { AudioBufferList* pBufferList; UInt32 audioBufferSizeInBytes; size_t allocationSize; MA_ASSERT(sizeInFrames > 0); MA_ASSERT(format != ma_format_unknown); MA_ASSERT(channels > 0); allocationSize = sizeof(AudioBufferList) - sizeof(AudioBuffer); /* Subtract sizeof(AudioBuffer) because that part is dynamically sized. */ if (layout == ma_stream_layout_interleaved) { /* Interleaved case. This is the simple case because we just have one buffer. */ allocationSize += sizeof(AudioBuffer) * 1; } else { /* Non-interleaved case. This is the more complex case because there's more than one buffer. */ allocationSize += sizeof(AudioBuffer) * channels; } allocationSize += sizeInFrames * ma_get_bytes_per_frame(format, channels); pBufferList = (AudioBufferList*)ma_malloc(allocationSize, pAllocationCallbacks); if (pBufferList == NULL) { return NULL; } audioBufferSizeInBytes = (UInt32)(sizeInFrames * ma_get_bytes_per_sample(format)); if (layout == ma_stream_layout_interleaved) { pBufferList->mNumberBuffers = 1; pBufferList->mBuffers[0].mNumberChannels = channels; pBufferList->mBuffers[0].mDataByteSize = audioBufferSizeInBytes * channels; pBufferList->mBuffers[0].mData = (ma_uint8*)pBufferList + sizeof(AudioBufferList); } else { ma_uint32 iBuffer; pBufferList->mNumberBuffers = channels; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) { pBufferList->mBuffers[iBuffer].mNumberChannels = 1; pBufferList->mBuffers[iBuffer].mDataByteSize = audioBufferSizeInBytes; pBufferList->mBuffers[iBuffer].mData = (ma_uint8*)pBufferList + ((sizeof(AudioBufferList) - sizeof(AudioBuffer)) + (sizeof(AudioBuffer) * channels)) + (audioBufferSizeInBytes * iBuffer); } } return pBufferList; } static ma_result ma_device_realloc_AudioBufferList__coreaudio(ma_device* pDevice, ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout) { MA_ASSERT(pDevice != NULL); MA_ASSERT(format != ma_format_unknown); MA_ASSERT(channels > 0); /* Only resize the buffer if necessary. */ if (pDevice->coreaudio.audioBufferCapInFrames < sizeInFrames) { AudioBufferList* pNewAudioBufferList; pNewAudioBufferList = ma_allocate_AudioBufferList__coreaudio(sizeInFrames, format, channels, layout, &pDevice->pContext->allocationCallbacks); if (pNewAudioBufferList == NULL) { return MA_OUT_OF_MEMORY; } /* At this point we'll have a new AudioBufferList and we can free the old one. */ ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); pDevice->coreaudio.pAudioBufferList = pNewAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = sizeInFrames; } /* Getting here means the capacity of the audio is fine. */ return MA_SUCCESS; } static OSStatus ma_on_output__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pBufferList) { ma_device* pDevice = (ma_device*)pUserData; ma_stream_layout layout; MA_ASSERT(pDevice != NULL); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "INFO: Output Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\n", (int)busNumber, (int)frameCount, (int)pBufferList->mNumberBuffers);*/ /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */ layout = ma_stream_layout_interleaved; if (pBufferList->mBuffers[0].mNumberChannels != pDevice->playback.internalChannels) { layout = ma_stream_layout_deinterleaved; } if (layout == ma_stream_layout_interleaved) { /* For now we can assume everything is interleaved. */ UInt32 iBuffer; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) { if (pBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->playback.internalChannels) { ma_uint32 frameCountForThisBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); if (frameCountForThisBuffer > 0) { ma_device_handle_backend_data_callback(pDevice, pBufferList->mBuffers[iBuffer].mData, NULL, frameCountForThisBuffer); } /*a_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/ } else { /* This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams. We just output silence here. */ MA_ZERO_MEMORY(pBufferList->mBuffers[iBuffer].mData, pBufferList->mBuffers[iBuffer].mDataByteSize); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/ } } } else { /* This is the deinterleaved case. We need to update each buffer in groups of internalChannels. This assumes each buffer is the same size. */ MA_ASSERT(pDevice->playback.internalChannels <= MA_MAX_CHANNELS); /* This should have been validated at initialization time. */ /* For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something very strange has happened and we're not going to support it. */ if ((pBufferList->mNumberBuffers % pDevice->playback.internalChannels) == 0) { ma_uint8 tempBuffer[4096]; UInt32 iBuffer; for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; iBuffer += pDevice->playback.internalChannels) { ma_uint32 frameCountPerBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_sample(pDevice->playback.internalFormat); ma_uint32 framesRemaining = frameCountPerBuffer; while (framesRemaining > 0) { void* ppDeinterleavedBuffers[MA_MAX_CHANNELS]; ma_uint32 iChannel; ma_uint32 framesToRead = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); if (framesToRead > framesRemaining) { framesToRead = framesRemaining; } ma_device_handle_backend_data_callback(pDevice, tempBuffer, NULL, framesToRead); for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) { ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pBufferList->mBuffers[iBuffer+iChannel].mData, (frameCountPerBuffer - framesRemaining) * ma_get_bytes_per_sample(pDevice->playback.internalFormat)); } ma_deinterleave_pcm_frames(pDevice->playback.internalFormat, pDevice->playback.internalChannels, framesToRead, tempBuffer, ppDeinterleavedBuffers); framesRemaining -= framesToRead; } } } } (void)pActionFlags; (void)pTimeStamp; (void)busNumber; (void)frameCount; return noErr; } static OSStatus ma_on_input__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pUnusedBufferList) { ma_device* pDevice = (ma_device*)pUserData; AudioBufferList* pRenderedBufferList; ma_result result; ma_stream_layout layout; ma_uint32 iBuffer; OSStatus status; MA_ASSERT(pDevice != NULL); pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList; MA_ASSERT(pRenderedBufferList); /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */ layout = ma_stream_layout_interleaved; if (pRenderedBufferList->mBuffers[0].mNumberChannels != pDevice->capture.internalChannels) { layout = ma_stream_layout_deinterleaved; } /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "INFO: Input Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\n", (int)busNumber, (int)frameCount, (int)pRenderedBufferList->mNumberBuffers);*/ /* There has been a situation reported where frame count passed into this function is greater than the capacity of our capture buffer. There doesn't seem to be a reliable way to determine what the maximum frame count will be, so we need to instead resort to dynamically reallocating our buffer to ensure it's large enough to capture the number of frames requested by this callback. */ result = ma_device_realloc_AudioBufferList__coreaudio(pDevice, frameCount, pDevice->capture.internalFormat, pDevice->capture.internalChannels, layout); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "Failed to allocate AudioBufferList for capture.\n"); return noErr; } pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList; MA_ASSERT(pRenderedBufferList); /* When you call AudioUnitRender(), Core Audio tries to be helpful by setting the mDataByteSize to the number of bytes that were actually rendered. The problem with this is that the next call can fail with -50 due to the size no longer being set to the capacity of the buffer, but instead the size in bytes of the previous render. This will cause a problem when a future call to this callback specifies a larger number of frames. To work around this we need to explicitly set the size of each buffer to their respective size in bytes. */ for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) { pRenderedBufferList->mBuffers[iBuffer].mDataByteSize = pDevice->coreaudio.audioBufferCapInFrames * ma_get_bytes_per_sample(pDevice->capture.internalFormat) * pRenderedBufferList->mBuffers[iBuffer].mNumberChannels; /*printf("DEBUG: nDataByteSize = %d\n", (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } status = ((ma_AudioUnitRender_proc)pDevice->pContext->coreaudio.AudioUnitRender)((AudioUnit)pDevice->coreaudio.audioUnitCapture, pActionFlags, pTimeStamp, busNumber, frameCount, pRenderedBufferList); if (status != noErr) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, "ERROR: AudioUnitRender() failed with %d.\n", (int)status); return status; } if (layout == ma_stream_layout_interleaved) { for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) { if (pRenderedBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->capture.internalChannels) { ma_device_handle_backend_data_callback(pDevice, NULL, pRenderedBufferList->mBuffers[iBuffer].mData, frameCount); /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " mDataByteSize=%d.\n", (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } else { /* This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams. */ ma_uint8 silentBuffer[4096]; ma_uint32 framesRemaining; MA_ZERO_MEMORY(silentBuffer, sizeof(silentBuffer)); framesRemaining = frameCount; while (framesRemaining > 0) { ma_uint32 framesToSend = sizeof(silentBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); if (framesToSend > framesRemaining) { framesToSend = framesRemaining; } ma_device_handle_backend_data_callback(pDevice, NULL, silentBuffer, framesToSend); framesRemaining -= framesToSend; } /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, " WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\n", (int)frameCount, (int)pRenderedBufferList->mBuffers[iBuffer].mNumberChannels, (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/ } } } else { /* This is the deinterleaved case. We need to interleave the audio data before sending it to the client. This assumes each buffer is the same size. */ MA_ASSERT(pDevice->capture.internalChannels <= MA_MAX_CHANNELS); /* This should have been validated at initialization time. */ /* For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something very strange has happened and we're not going to support it. */ if ((pRenderedBufferList->mNumberBuffers % pDevice->capture.internalChannels) == 0) { ma_uint8 tempBuffer[4096]; for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; iBuffer += pDevice->capture.internalChannels) { ma_uint32 framesRemaining = frameCount; while (framesRemaining > 0) { void* ppDeinterleavedBuffers[MA_MAX_CHANNELS]; ma_uint32 iChannel; ma_uint32 framesToSend = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); if (framesToSend > framesRemaining) { framesToSend = framesRemaining; } for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) { ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pRenderedBufferList->mBuffers[iBuffer+iChannel].mData, (frameCount - framesRemaining) * ma_get_bytes_per_sample(pDevice->capture.internalFormat)); } ma_interleave_pcm_frames(pDevice->capture.internalFormat, pDevice->capture.internalChannels, framesToSend, (const void**)ppDeinterleavedBuffers, tempBuffer); ma_device_handle_backend_data_callback(pDevice, NULL, tempBuffer, framesToSend); framesRemaining -= framesToSend; } } } } (void)pActionFlags; (void)pTimeStamp; (void)busNumber; (void)frameCount; (void)pUnusedBufferList; return noErr; } static void on_start_stop__coreaudio(void* pUserData, AudioUnit audioUnit, AudioUnitPropertyID propertyID, AudioUnitScope scope, AudioUnitElement element) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); /* Don't do anything if it looks like we're just reinitializing due to a device switch. */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isSwitchingCaptureDevice)) { return; } /* There's been a report of a deadlock here when triggered by ma_device_uninit(). It looks like AudioUnitGetProprty (called below) and AudioComponentInstanceDispose (called in ma_device_uninit) can try waiting on the same lock. I'm going to try working around this by not calling any Core Audio APIs in the callback when the device has been stopped or uninitialized. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized || ma_device_get_state(pDevice) == ma_device_state_stopping || ma_device_get_state(pDevice) == ma_device_state_stopped) { ma_device__on_notification_stopped(pDevice); } else { UInt32 isRunning; UInt32 isRunningSize = sizeof(isRunning); OSStatus status = ((ma_AudioUnitGetProperty_proc)pDevice->pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioOutputUnitProperty_IsRunning, scope, element, &isRunning, &isRunningSize); if (status != noErr) { goto done; /* Don't really know what to do in this case... just ignore it, I suppose... */ } if (!isRunning) { /* The stop event is a bit annoying in Core Audio because it will be called when we automatically switch the default device. Some scenarios to consider: 1) When the device is unplugged, this will be called _before_ the default device change notification. 2) When the device is changed via the default device change notification, this will be called _after_ the switch. For case #1, we just check if there's a new default device available. If so, we just ignore the stop event. For case #2 we check a flag. */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isDefaultPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isDefaultCaptureDevice)) { /* It looks like the device is switching through an external event, such as the user unplugging the device or changing the default device via the operating system's sound settings. If we're re-initializing the device, we just terminate because we want the stopping of the device to be seamless to the client (we don't want them receiving the stopped event and thinking that the device has stopped when it hasn't!). */ if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) || ((audioUnit == pDevice->coreaudio.audioUnitCapture) && pDevice->coreaudio.isSwitchingCaptureDevice)) { goto done; } /* Getting here means the device is not reinitializing which means it may have been unplugged. From what I can see, it looks like Core Audio will try switching to the new default device seamlessly. We need to somehow find a way to determine whether or not Core Audio will most likely be successful in switching to the new device. TODO: Try to predict if Core Audio will switch devices. If not, the stopped callback needs to be posted. */ goto done; } /* Getting here means we need to stop the device. */ ma_device__on_notification_stopped(pDevice); } } (void)propertyID; /* Unused. */ done: /* Always signal the stop event. It's possible for the "else" case to get hit which can happen during an interruption. */ ma_event_signal(&pDevice->coreaudio.stopEvent); } #if defined(MA_APPLE_DESKTOP) static ma_spinlock g_DeviceTrackingInitLock_CoreAudio = 0; /* A spinlock for mutal exclusion of the init/uninit of the global tracking data. Initialization to 0 is what we need. */ static ma_uint32 g_DeviceTrackingInitCounter_CoreAudio = 0; static ma_mutex g_DeviceTrackingMutex_CoreAudio; static ma_device** g_ppTrackedDevices_CoreAudio = NULL; static ma_uint32 g_TrackedDeviceCap_CoreAudio = 0; static ma_uint32 g_TrackedDeviceCount_CoreAudio = 0; static OSStatus ma_default_device_changed__coreaudio(AudioObjectID objectID, UInt32 addressCount, const AudioObjectPropertyAddress* pAddresses, void* pUserData) { ma_device_type deviceType; /* Not sure if I really need to check this, but it makes me feel better. */ if (addressCount == 0) { return noErr; } if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultOutputDevice) { deviceType = ma_device_type_playback; } else if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultInputDevice) { deviceType = ma_device_type_capture; } else { return noErr; /* Should never hit this. */ } ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { ma_uint32 iDevice; for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) { ma_result reinitResult; ma_device* pDevice; pDevice = g_ppTrackedDevices_CoreAudio[iDevice]; if (pDevice->type == deviceType || pDevice->type == ma_device_type_duplex) { if (deviceType == ma_device_type_playback) { pDevice->coreaudio.isSwitchingPlaybackDevice = MA_TRUE; reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE); pDevice->coreaudio.isSwitchingPlaybackDevice = MA_FALSE; } else { pDevice->coreaudio.isSwitchingCaptureDevice = MA_TRUE; reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE); pDevice->coreaudio.isSwitchingCaptureDevice = MA_FALSE; } if (reinitResult == MA_SUCCESS) { ma_device__post_init_setup(pDevice, deviceType); /* Restart the device if required. If this fails we need to stop the device entirely. */ if (ma_device_get_state(pDevice) == ma_device_state_started) { OSStatus status; if (deviceType == ma_device_type_playback) { status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } ma_device__set_state(pDevice, ma_device_state_stopped); } } else if (deviceType == ma_device_type_capture) { status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } ma_device__set_state(pDevice, ma_device_state_stopped); } } } ma_device__on_notification_rerouted(pDevice); } } } } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); /* Unused parameters. */ (void)objectID; (void)pUserData; return noErr; } static ma_result ma_context__init_device_tracking__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio); { /* Don't do anything if we've already initialized device tracking. */ if (g_DeviceTrackingInitCounter_CoreAudio == 0) { AudioObjectPropertyAddress propAddress; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; ma_mutex_init(&g_DeviceTrackingMutex_CoreAudio); propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice; ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice; ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); } g_DeviceTrackingInitCounter_CoreAudio += 1; } ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_SUCCESS; } static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio); { if (g_DeviceTrackingInitCounter_CoreAudio > 0) g_DeviceTrackingInitCounter_CoreAudio -= 1; if (g_DeviceTrackingInitCounter_CoreAudio == 0) { AudioObjectPropertyAddress propAddress; propAddress.mScope = kAudioObjectPropertyScopeGlobal; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice; ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice; ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL); /* At this point there should be no tracked devices. If not there's an error somewhere. */ if (g_ppTrackedDevices_CoreAudio != NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active."); ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_INVALID_OPERATION; } ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio); } } ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio); return MA_SUCCESS; } static ma_result ma_device__track__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { /* Allocate memory if required. */ if (g_TrackedDeviceCap_CoreAudio <= g_TrackedDeviceCount_CoreAudio) { ma_uint32 newCap; ma_device** ppNewDevices; newCap = g_TrackedDeviceCap_CoreAudio * 2; if (newCap == 0) { newCap = 1; } ppNewDevices = (ma_device**)ma_realloc(g_ppTrackedDevices_CoreAudio, sizeof(*g_ppTrackedDevices_CoreAudio)*newCap, &pDevice->pContext->allocationCallbacks); if (ppNewDevices == NULL) { ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_OUT_OF_MEMORY; } g_ppTrackedDevices_CoreAudio = ppNewDevices; g_TrackedDeviceCap_CoreAudio = newCap; } g_ppTrackedDevices_CoreAudio[g_TrackedDeviceCount_CoreAudio] = pDevice; g_TrackedDeviceCount_CoreAudio += 1; } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_SUCCESS; } static ma_result ma_device__untrack__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio); { ma_uint32 iDevice; for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) { if (g_ppTrackedDevices_CoreAudio[iDevice] == pDevice) { /* We've found the device. We now need to remove it from the list. */ ma_uint32 jDevice; for (jDevice = iDevice; jDevice < g_TrackedDeviceCount_CoreAudio-1; jDevice += 1) { g_ppTrackedDevices_CoreAudio[jDevice] = g_ppTrackedDevices_CoreAudio[jDevice+1]; } g_TrackedDeviceCount_CoreAudio -= 1; /* If there's nothing else in the list we need to free memory. */ if (g_TrackedDeviceCount_CoreAudio == 0) { ma_free(g_ppTrackedDevices_CoreAudio, &pDevice->pContext->allocationCallbacks); g_ppTrackedDevices_CoreAudio = NULL; g_TrackedDeviceCap_CoreAudio = 0; } break; } } } ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio); return MA_SUCCESS; } #endif #if defined(MA_APPLE_MOBILE) @interface ma_ios_notification_handler:NSObject { ma_device* m_pDevice; } @end @implementation ma_ios_notification_handler -(id)init:(ma_device*)pDevice { self = [super init]; m_pDevice = pDevice; /* For route changes. */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_route_change:) name:AVAudioSessionRouteChangeNotification object:[AVAudioSession sharedInstance]]; /* For interruptions. */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_interruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]]; return self; } -(void)dealloc { [self remove_handler]; #if defined(__has_feature) #if !__has_feature(objc_arc) [super dealloc]; #endif #endif } -(void)remove_handler { [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionRouteChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification object:nil]; } -(void)handle_interruption:(NSNotification*)pNotification { NSInteger type = [[[pNotification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey] integerValue]; switch (type) { case AVAudioSessionInterruptionTypeBegan: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Interruption: AVAudioSessionInterruptionTypeBegan\n"); /* Core Audio will have stopped the internal device automatically, but we need explicitly stop it at a higher level to ensure miniaudio-specific state is updated for consistency. */ ma_device_stop(m_pDevice); /* Fire the notification after the device has been stopped to ensure it's in the correct state when the notification handler is invoked. */ ma_device__on_notification_interruption_began(m_pDevice); } break; case AVAudioSessionInterruptionTypeEnded: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Interruption: AVAudioSessionInterruptionTypeEnded\n"); ma_device__on_notification_interruption_ended(m_pDevice); } break; } } -(void)handle_route_change:(NSNotification*)pNotification { AVAudioSession* pSession = [AVAudioSession sharedInstance]; NSInteger reason = [[[pNotification userInfo] objectForKey:AVAudioSessionRouteChangeReasonKey] integerValue]; switch (reason) { case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOldDeviceUnavailable\n"); } break; case AVAudioSessionRouteChangeReasonNewDeviceAvailable: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNewDeviceAvailable\n"); } break; case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory\n"); } break; case AVAudioSessionRouteChangeReasonWakeFromSleep: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonWakeFromSleep\n"); } break; case AVAudioSessionRouteChangeReasonOverride: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOverride\n"); } break; case AVAudioSessionRouteChangeReasonCategoryChange: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonCategoryChange\n"); } break; case AVAudioSessionRouteChangeReasonUnknown: default: { ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, "[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonUnknown\n"); } break; } ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_DEBUG, "[Core Audio] Changing Route. inputNumberChannels=%d; outputNumberOfChannels=%d\n", (int)pSession.inputNumberOfChannels, (int)pSession.outputNumberOfChannels); /* Let the application know about the route change. */ ma_device__on_notification_rerouted(m_pDevice); } @end #endif static ma_result ma_device_uninit__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_uninitialized); #if defined(MA_APPLE_DESKTOP) /* Make sure we're no longer tracking the device. It doesn't matter if we call this for a non-default device because it'll just gracefully ignore it. */ ma_device__untrack__coreaudio(pDevice); #endif #if defined(MA_APPLE_MOBILE) if (pDevice->coreaudio.pNotificationHandler != NULL) { ma_ios_notification_handler* pNotificationHandler = (MA_BRIDGE_TRANSFER ma_ios_notification_handler*)pDevice->coreaudio.pNotificationHandler; [pNotificationHandler remove_handler]; } #endif if (pDevice->coreaudio.audioUnitCapture != NULL) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } if (pDevice->coreaudio.audioUnitPlayback != NULL) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } typedef struct { ma_bool32 allowNominalSampleRateChange; /* Input. */ ma_format formatIn; ma_uint32 channelsIn; ma_uint32 sampleRateIn; ma_channel channelMapIn[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesIn; ma_uint32 periodSizeInMillisecondsIn; ma_uint32 periodsIn; ma_share_mode shareMode; ma_performance_profile performanceProfile; ma_bool32 registerStopEvent; /* Output. */ #if defined(MA_APPLE_DESKTOP) AudioObjectID deviceObjectID; #endif AudioComponent component; AudioUnit audioUnit; AudioBufferList* pAudioBufferList; /* Only used for input devices. */ ma_format formatOut; ma_uint32 channelsOut; ma_uint32 sampleRateOut; ma_channel channelMapOut[MA_MAX_CHANNELS]; ma_uint32 periodSizeInFramesOut; ma_uint32 periodsOut; char deviceName[256]; } ma_device_init_internal_data__coreaudio; static ma_result ma_device_init_internal__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__coreaudio* pData, void* pDevice_DoNotReference) /* <-- pDevice is typed as void* intentionally so as to avoid accidentally referencing it. */ { ma_result result = MA_SUCCESS; OSStatus status; UInt32 enableIOFlag; AudioStreamBasicDescription bestFormat; ma_uint32 actualPeriodSizeInFrames; AURenderCallbackStruct callbackInfo; #if defined(MA_APPLE_DESKTOP) AudioObjectID deviceObjectID; #endif /* This API should only be used for a single device type: playback or capture. No full-duplex mode. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } MA_ASSERT(pContext != NULL); MA_ASSERT(deviceType == ma_device_type_playback || deviceType == ma_device_type_capture); #if defined(MA_APPLE_DESKTOP) pData->deviceObjectID = 0; #endif pData->component = NULL; pData->audioUnit = NULL; pData->pAudioBufferList = NULL; #if defined(MA_APPLE_DESKTOP) result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID); if (result != MA_SUCCESS) { return result; } pData->deviceObjectID = deviceObjectID; #endif /* Core audio doesn't really use the notion of a period so we can leave this unmodified, but not too over the top. */ pData->periodsOut = pData->periodsIn; if (pData->periodsOut == 0) { pData->periodsOut = MA_DEFAULT_PERIODS; } if (pData->periodsOut > 16) { pData->periodsOut = 16; } /* Audio unit. */ status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)((AudioComponent)pContext->coreaudio.component, (AudioUnit*)&pData->audioUnit); if (status != noErr) { return ma_result_from_OSStatus(status); } /* The input/output buses need to be explicitly enabled and disabled. We set the flag based on the output unit first, then we just swap it for input. */ enableIOFlag = 1; if (deviceType == ma_device_type_capture) { enableIOFlag = 0; } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &enableIOFlag, sizeof(enableIOFlag)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } enableIOFlag = (enableIOFlag == 0) ? 1 : 0; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &enableIOFlag, sizeof(enableIOFlag)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } /* Set the device to use with this audio unit. This is only used on desktop since we are using defaults on mobile. */ #if defined(MA_APPLE_DESKTOP) status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &deviceObjectID, sizeof(deviceObjectID)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(result); } #else /* For some reason it looks like Apple is only allowing selection of the input device. There does not appear to be any way to change the default output route. I have no idea why this is like this, but for now we'll only be able to configure capture devices. */ if (pDeviceID != NULL) { if (deviceType == ma_device_type_capture) { ma_bool32 found = MA_FALSE; NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs]; for (AVAudioSessionPortDescription* pPortDesc in pInputs) { if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) { [[AVAudioSession sharedInstance] setPreferredInput:pPortDesc error:nil]; found = MA_TRUE; break; } } if (found == MA_FALSE) { return MA_DOES_NOT_EXIST; } } } #endif /* Format. This is the hardest part of initialization because there's a few variables to take into account. 1) The format must be supported by the device. 2) The format must be supported miniaudio. 3) There's a priority that miniaudio prefers. Ideally we would like to use a format that's as close to the hardware as possible so we can get as close to a passthrough as possible. The most important property is the sample rate. miniaudio can do format conversion for any sample rate and channel count, but cannot do the same for the sample data format. If the sample data format is not supported by miniaudio it must be ignored completely. On mobile platforms this is a bit different. We just force the use of whatever the audio unit's current format is set to. */ { AudioStreamBasicDescription origFormat; UInt32 origFormatSize = sizeof(origFormat); AudioUnitScope formatScope = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output; AudioUnitElement formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS; if (deviceType == ma_device_type_playback) { status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &origFormat, &origFormatSize); } else { status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &origFormat, &origFormatSize); } if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } #if defined(MA_APPLE_DESKTOP) result = ma_find_best_format__coreaudio(pContext, deviceObjectID, deviceType, pData->formatIn, pData->channelsIn, pData->sampleRateIn, &origFormat, &bestFormat); if (result != MA_SUCCESS) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return result; } /* Technical Note TN2091: Device input using the HAL Output Audio Unit https://developer.apple.com/library/archive/technotes/tn2091/_index.html This documentation says the following: The internal AudioConverter can handle any *simple* conversion. Typically, this means that a client can specify ANY variant of the PCM formats. Consequently, the device's sample rate should match the desired sample rate. If sample rate conversion is needed, it can be accomplished by buffering the input and converting the data on a separate thread with another AudioConverter. The important part here is the mention that it can handle *simple* conversions, which does *not* include sample rate. We therefore want to ensure the sample rate stays consistent. This document is specifically for input, but I'm going to play it safe and apply the same rule to output as well. I have tried going against the documentation by setting the sample rate anyway, but this just results in AudioUnitRender() returning a result code of -10863. I have also tried changing the format directly on the input scope on the input bus, but this just results in `ca_require: IsStreamFormatWritable(inScope, inElement) NotWritable` when trying to set the format. Something that does seem to work, however, has been setting the nominal sample rate on the device object. The problem with this, however, is that it actually changes the sample rate at the operating system level and not just the application. This could be intrusive to the user, however, so I don't think it's wise to make this the default. Instead I'm making this a configuration option. When the `coreaudio.allowNominalSampleRateChange` config option is set to true, changing the sample rate will be allowed. Otherwise it'll be fixed to the current sample rate. To check the system-defined sample rate, run the Audio MIDI Setup program that comes installed on macOS and observe how the sample rate changes as the sample rate is changed by miniaudio. */ if (pData->allowNominalSampleRateChange) { AudioValueRange sampleRateRange; AudioObjectPropertyAddress propAddress; sampleRateRange.mMinimum = bestFormat.mSampleRate; sampleRateRange.mMaximum = bestFormat.mSampleRate; propAddress.mSelector = kAudioDevicePropertyNominalSampleRate; propAddress.mScope = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput; propAddress.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT; status = ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(sampleRateRange), &sampleRateRange); if (status != noErr) { bestFormat.mSampleRate = origFormat.mSampleRate; } } else { bestFormat.mSampleRate = origFormat.mSampleRate; } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat)); if (status != noErr) { /* We failed to set the format, so fall back to the current format of the audio unit. */ bestFormat = origFormat; } #else bestFormat = origFormat; /* Sample rate is a little different here because for some reason kAudioUnitProperty_StreamFormat returns 0... Oh well. We need to instead try setting the sample rate to what the user has requested and then just see the results of it. Need to use some Objective-C here for this since it depends on Apple's AVAudioSession API. To do this we just get the shared AVAudioSession instance and then set it. Note that from what I can tell, it looks like the sample rate is shared between playback and capture for everything. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); [pAudioSession setPreferredSampleRate:(double)pData->sampleRateIn error:nil]; bestFormat.mSampleRate = pAudioSession.sampleRate; /* I've had a report that the channel count returned by AudioUnitGetProperty above is inconsistent with AVAudioSession outputNumberOfChannels. I'm going to try using the AVAudioSession values instead. UPDATE 20/02/2025: When testing on the simulator with an iPhone 15 and iOS 17 I get an error when initializing the audio unit if set the input channels to pAudioSession.inputNumberOfChannels. What is happening is the channel count returned from AudioUnitGetProperty() above is set to 2, but pAudioSession is reporting a channel count of 1. When this happens, the call to AudioUnitSetProprty() below just down below will succeed, but AudioUnitInitialize() further down will fail. The only solution I have come up with is to not set the channel count to pAudioSession.inputNumberOfChannels. */ if (deviceType == ma_device_type_playback) { bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.outputNumberOfChannels; } #if 0 if (deviceType == ma_device_type_capture) { /*printf("DEBUG: bestFormat.mChannelsPerFrame = %d; pAudioSession.inputNumberOfChannels = %d\n", (int)bestFormat.mChannelsPerFrame, (int)pAudioSession.inputNumberOfChannels);*/ bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.inputNumberOfChannels; } #endif } status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } #endif result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pData->formatOut); if (result != MA_SUCCESS) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return result; } if (pData->formatOut == ma_format_unknown) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return MA_FORMAT_NOT_SUPPORTED; } pData->channelsOut = bestFormat.mChannelsPerFrame; pData->sampleRateOut = (ma_uint32)bestFormat.mSampleRate; } /* Clamp the channel count for safety. */ if (pData->channelsOut > MA_MAX_CHANNELS) { pData->channelsOut = MA_MAX_CHANNELS; } /* Internal channel map. This is weird in my testing. If I use the AudioObject to get the channel map, the channel descriptions are set to "Unknown" for some reason. To work around this it looks like retrieving it from the AudioUnit will work. However, and this is where it gets weird, it doesn't seem to work with capture devices, nor at all on iOS... Therefore I'm going to fall back to a default assumption in these cases. */ #if defined(MA_APPLE_DESKTOP) result = ma_get_AudioUnit_channel_map(pContext, pData->audioUnit, deviceType, pData->channelMapOut, pData->channelsOut); if (result != MA_SUCCESS) { #if 0 /* Try falling back to the channel map from the AudioObject. */ result = ma_get_AudioObject_channel_map(pContext, deviceObjectID, deviceType, pData->channelMapOut, pData->channelsOut); if (result != MA_SUCCESS) { return result; } #else /* Fall back to default assumptions. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); #endif } #else /* TODO: Figure out how to get the channel map using AVAudioSession. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut); #endif /* Buffer size. Not allowing this to be configurable on iOS. */ if (pData->periodSizeInFramesIn == 0) { if (pData->periodSizeInMillisecondsIn == 0) { if (pData->performanceProfile == ma_performance_profile_low_latency) { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, pData->sampleRateOut); } else { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, pData->sampleRateOut); } } else { actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, pData->sampleRateOut); } } else { actualPeriodSizeInFrames = pData->periodSizeInFramesIn; } #if defined(MA_APPLE_DESKTOP) result = ma_set_AudioObject_buffer_size_in_frames(pContext, deviceObjectID, deviceType, &actualPeriodSizeInFrames); if (result != MA_SUCCESS) { return result; } #else /* On iOS, the size of the IO buffer needs to be specified in seconds and is a floating point number. I don't trust any potential truncation errors due to converting from float to integer so I'm going to explicitly set the actual period size to the next power of 2. */ @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; MA_ASSERT(pAudioSession != NULL); [pAudioSession setPreferredIOBufferDuration:((float)actualPeriodSizeInFrames / pAudioSession.sampleRate) error:nil]; actualPeriodSizeInFrames = ma_next_power_of_2((ma_uint32)(pAudioSession.IOBufferDuration * pAudioSession.sampleRate)); } #endif /* During testing I discovered that the buffer size can be too big. You'll get an error like this: kAudioUnitErr_TooManyFramesToProcess : inFramesToProcess=4096, mMaxFramesPerSlice=512 Note how inFramesToProcess is smaller than mMaxFramesPerSlice. To fix, we need to set kAudioUnitProperty_MaximumFramesPerSlice to that of the size of our buffer, or do it the other way around and set our buffer size to the kAudioUnitProperty_MaximumFramesPerSlice. */ status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &actualPeriodSizeInFrames, sizeof(actualPeriodSizeInFrames)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } pData->periodSizeInFramesOut = (ma_uint32)actualPeriodSizeInFrames; /* We need a buffer list if this is an input device. We render into this in the input callback. */ if (deviceType == ma_device_type_capture) { ma_bool32 isInterleaved = (bestFormat.mFormatFlags & kAudioFormatFlagIsNonInterleaved) == 0; AudioBufferList* pBufferList; pBufferList = ma_allocate_AudioBufferList__coreaudio(pData->periodSizeInFramesOut, pData->formatOut, pData->channelsOut, (isInterleaved) ? ma_stream_layout_interleaved : ma_stream_layout_deinterleaved, &pContext->allocationCallbacks); if (pBufferList == NULL) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return MA_OUT_OF_MEMORY; } pData->pAudioBufferList = pBufferList; } /* Callbacks. */ callbackInfo.inputProcRefCon = pDevice_DoNotReference; if (deviceType == ma_device_type_playback) { callbackInfo.inputProc = ma_on_output__coreaudio; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } else { callbackInfo.inputProc = ma_on_input__coreaudio; status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo)); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } /* We need to listen for stop events. */ if (pData->registerStopEvent) { status = ((ma_AudioUnitAddPropertyListener_proc)pContext->coreaudio.AudioUnitAddPropertyListener)(pData->audioUnit, kAudioOutputUnitProperty_IsRunning, on_start_stop__coreaudio, pDevice_DoNotReference); if (status != noErr) { ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } } /* Initialize the audio unit. */ status = ((ma_AudioUnitInitialize_proc)pContext->coreaudio.AudioUnitInitialize)(pData->audioUnit); if (status != noErr) { ma_free(pData->pAudioBufferList, &pContext->allocationCallbacks); pData->pAudioBufferList = NULL; ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit); return ma_result_from_OSStatus(status); } /* Grab the name. */ #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pData->deviceName), pData->deviceName); #else if (deviceType == ma_device_type_playback) { ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_PLAYBACK_DEVICE_NAME); } else { ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_CAPTURE_DEVICE_NAME); } #endif return result; } #if defined(MA_APPLE_DESKTOP) static ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit) { ma_device_init_internal_data__coreaudio data; ma_result result; /* This should only be called for playback or capture, not duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } data.allowNominalSampleRateChange = MA_FALSE; /* Don't change the nominal sample rate when switching devices. */ if (deviceType == ma_device_type_capture) { data.formatIn = pDevice->capture.format; data.channelsIn = pDevice->capture.channels; data.sampleRateIn = pDevice->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap)); data.shareMode = pDevice->capture.shareMode; data.performanceProfile = pDevice->coreaudio.originalPerformanceProfile; data.registerStopEvent = MA_TRUE; if (disposePreviousAudioUnit) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } } else if (deviceType == ma_device_type_playback) { data.formatIn = pDevice->playback.format; data.channelsIn = pDevice->playback.channels; data.sampleRateIn = pDevice->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap)); data.shareMode = pDevice->playback.shareMode; data.performanceProfile = pDevice->coreaudio.originalPerformanceProfile; data.registerStopEvent = (pDevice->type != ma_device_type_duplex); if (disposePreviousAudioUnit) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); } } data.periodSizeInFramesIn = pDevice->coreaudio.originalPeriodSizeInFrames; data.periodSizeInMillisecondsIn = pDevice->coreaudio.originalPeriodSizeInMilliseconds; data.periodsIn = pDevice->coreaudio.originalPeriods; /* Need at least 3 periods for duplex. */ if (data.periodsIn < 3 && pDevice->type == ma_device_type_duplex) { data.periodsIn = 3; } result = ma_device_init_internal__coreaudio(pDevice->pContext, deviceType, NULL, &data, (void*)pDevice); if (result != MA_SUCCESS) { return result; } if (deviceType == ma_device_type_capture) { #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDCapture = (ma_uint32)data.deviceObjectID; ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio); #endif pDevice->coreaudio.audioUnitCapture = (ma_ptr)data.audioUnit; pDevice->coreaudio.pAudioBufferList = (ma_ptr)data.pAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = data.periodSizeInFramesOut; pDevice->capture.internalFormat = data.formatOut; pDevice->capture.internalChannels = data.channelsOut; pDevice->capture.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->capture.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->capture.internalPeriods = data.periodsOut; } else if (deviceType == ma_device_type_playback) { #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDPlayback = (ma_uint32)data.deviceObjectID; ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio); #endif pDevice->coreaudio.audioUnitPlayback = (ma_ptr)data.audioUnit; pDevice->playback.internalFormat = data.formatOut; pDevice->playback.internalChannels = data.channelsOut; pDevice->playback.internalSampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut; pDevice->playback.internalPeriods = data.periodsOut; } return MA_SUCCESS; } #endif /* MA_APPLE_DESKTOP */ static ma_result ma_device_init__coreaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with the Core Audio backend for now. */ if (((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* Capture needs to be initialized first. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__coreaudio data; data.allowNominalSampleRateChange = pConfig->coreaudio.allowNominalSampleRateChange; data.formatIn = pDescriptorCapture->format; data.channelsIn = pDescriptorCapture->channels; data.sampleRateIn = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorCapture->periodSizeInMilliseconds; data.periodsIn = pDescriptorCapture->periodCount; data.shareMode = pDescriptorCapture->shareMode; data.performanceProfile = pConfig->performanceProfile; data.registerStopEvent = MA_TRUE; /* Need at least 3 periods for duplex. */ if (data.periodsIn < 3 && pConfig->deviceType == ma_device_type_duplex) { data.periodsIn = 3; } result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_capture, pDescriptorCapture->pDeviceID, &data, (void*)pDevice); if (result != MA_SUCCESS) { return result; } pDevice->coreaudio.isDefaultCaptureDevice = (pConfig->capture.pDeviceID == NULL); #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDCapture = (ma_uint32)data.deviceObjectID; #endif pDevice->coreaudio.audioUnitCapture = (ma_ptr)data.audioUnit; pDevice->coreaudio.pAudioBufferList = (ma_ptr)data.pAudioBufferList; pDevice->coreaudio.audioBufferCapInFrames = data.periodSizeInFramesOut; pDevice->coreaudio.originalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds; pDevice->coreaudio.originalPeriods = pDescriptorCapture->periodCount; pDevice->coreaudio.originalPerformanceProfile = pConfig->performanceProfile; pDescriptorCapture->format = data.formatOut; pDescriptorCapture->channels = data.channelsOut; pDescriptorCapture->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorCapture->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorCapture->periodCount = data.periodsOut; #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio); /* If we are using the default device we'll need to listen for changes to the system's default device so we can seamlessly switch the device in the background. */ if (pConfig->capture.pDeviceID == NULL) { ma_device__track__coreaudio(pDevice); } #endif } /* Playback. */ if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_device_init_internal_data__coreaudio data; data.allowNominalSampleRateChange = pConfig->coreaudio.allowNominalSampleRateChange; data.formatIn = pDescriptorPlayback->format; data.channelsIn = pDescriptorPlayback->channels; data.sampleRateIn = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); data.shareMode = pDescriptorPlayback->shareMode; data.performanceProfile = pConfig->performanceProfile; /* In full-duplex mode we want the playback buffer to be the same size as the capture buffer. */ if (pConfig->deviceType == ma_device_type_duplex) { data.periodSizeInFramesIn = pDescriptorCapture->periodSizeInFrames; data.periodsIn = pDescriptorCapture->periodCount; data.registerStopEvent = MA_FALSE; } else { data.periodSizeInFramesIn = pDescriptorPlayback->periodSizeInFrames; data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds; data.periodsIn = pDescriptorPlayback->periodCount; data.registerStopEvent = MA_TRUE; } result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data, (void*)pDevice); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (pDevice->coreaudio.pAudioBufferList) { ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks); } } return result; } pDevice->coreaudio.isDefaultPlaybackDevice = (pConfig->playback.pDeviceID == NULL); #if defined(MA_APPLE_DESKTOP) pDevice->coreaudio.deviceObjectIDPlayback = (ma_uint32)data.deviceObjectID; #endif pDevice->coreaudio.audioUnitPlayback = (ma_ptr)data.audioUnit; pDevice->coreaudio.originalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds; pDevice->coreaudio.originalPeriods = pDescriptorPlayback->periodCount; pDevice->coreaudio.originalPerformanceProfile = pConfig->performanceProfile; pDescriptorPlayback->format = data.formatOut; pDescriptorPlayback->channels = data.channelsOut; pDescriptorPlayback->sampleRate = data.sampleRateOut; MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut)); pDescriptorPlayback->periodSizeInFrames = data.periodSizeInFramesOut; pDescriptorPlayback->periodCount = data.periodsOut; #if defined(MA_APPLE_DESKTOP) ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio); /* If we are using the default device we'll need to listen for changes to the system's default device so we can seamlessly switch the device in the background. */ if (pDescriptorPlayback->pDeviceID == NULL && (pConfig->deviceType != ma_device_type_duplex || pDescriptorCapture->pDeviceID != NULL)) { ma_device__track__coreaudio(pDevice); } #endif } /* When stopping the device, a callback is called on another thread. We need to wait for this callback before returning from ma_device_stop(). This event is used for this. */ ma_event_init(&pDevice->coreaudio.stopEvent); /* We need to detect when a route has changed so we can update the data conversion pipeline accordingly. This is done differently on non-Desktop Apple platforms. */ #if defined(MA_APPLE_MOBILE) pDevice->coreaudio.pNotificationHandler = (MA_BRIDGE_RETAINED void*)[[ma_ios_notification_handler alloc] init:pDevice]; #endif return MA_SUCCESS; } static ma_result ma_device_start__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { return ma_result_from_OSStatus(status); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { if (pDevice->type == ma_device_type_duplex) { ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); } return ma_result_from_OSStatus(status); } } return MA_SUCCESS; } static ma_result ma_device_stop__coreaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* It's not clear from the documentation whether or not AudioOutputUnitStop() actually drains the device or not. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture); if (status != noErr) { return ma_result_from_OSStatus(status); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback); if (status != noErr) { return ma_result_from_OSStatus(status); } } /* We need to wait for the callback to finish before returning. */ ma_event_wait(&pDevice->coreaudio.stopEvent); return MA_SUCCESS; } static ma_result ma_context_uninit__coreaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_coreaudio); #if defined(MA_APPLE_MOBILE) if (!pContext->coreaudio.noAudioSessionDeactivate) { if (![[AVAudioSession sharedInstance] setActive:false error:nil]) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to deactivate audio session."); return MA_FAILED_TO_INIT_BACKEND; } } #endif #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif #if !defined(MA_APPLE_MOBILE) ma_context__uninit_device_tracking__coreaudio(pContext); #endif (void)pContext; return MA_SUCCESS; } #if defined(MA_APPLE_MOBILE) && defined(__IPHONE_12_0) static AVAudioSessionCategory ma_to_AVAudioSessionCategory(ma_ios_session_category category) { /* The "default" and "none" categories are treated different and should not be used as an input into this function. */ MA_ASSERT(category != ma_ios_session_category_default); MA_ASSERT(category != ma_ios_session_category_none); switch (category) { case ma_ios_session_category_ambient: return AVAudioSessionCategoryAmbient; case ma_ios_session_category_solo_ambient: return AVAudioSessionCategorySoloAmbient; case ma_ios_session_category_playback: return AVAudioSessionCategoryPlayback; case ma_ios_session_category_record: return AVAudioSessionCategoryRecord; case ma_ios_session_category_play_and_record: return AVAudioSessionCategoryPlayAndRecord; case ma_ios_session_category_multi_route: return AVAudioSessionCategoryMultiRoute; case ma_ios_session_category_none: return AVAudioSessionCategoryAmbient; case ma_ios_session_category_default: return AVAudioSessionCategoryAmbient; default: return AVAudioSessionCategoryAmbient; } } #endif static ma_result ma_context_init__coreaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #if !defined(MA_APPLE_MOBILE) ma_result result; #endif MA_ASSERT(pConfig != NULL); MA_ASSERT(pContext != NULL); #if defined(MA_APPLE_MOBILE) @autoreleasepool { AVAudioSession* pAudioSession = [AVAudioSession sharedInstance]; AVAudioSessionCategoryOptions options = pConfig->coreaudio.sessionCategoryOptions; MA_ASSERT(pAudioSession != NULL); if (pConfig->coreaudio.sessionCategory == ma_ios_session_category_default) { /* I'm going to use trial and error to determine our default session category. First we'll try PlayAndRecord. If that fails we'll try Playback and if that fails we'll try record. If all of these fail we'll just not set the category. */ #if !defined(MA_APPLE_TV) && !defined(MA_APPLE_WATCH) options |= AVAudioSessionCategoryOptionDefaultToSpeaker; #endif if ([pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions:options error:nil]) { /* Using PlayAndRecord */ } else if ([pAudioSession setCategory: AVAudioSessionCategoryPlayback withOptions:options error:nil]) { /* Using Playback */ } else if ([pAudioSession setCategory: AVAudioSessionCategoryRecord withOptions:options error:nil]) { /* Using Record */ } else { /* Leave as default? */ } } else { if (pConfig->coreaudio.sessionCategory != ma_ios_session_category_none) { #if defined(__IPHONE_12_0) if (![pAudioSession setCategory: ma_to_AVAudioSessionCategory(pConfig->coreaudio.sessionCategory) withOptions:options error:nil]) { return MA_INVALID_OPERATION; /* Failed to set session category. */ } #else /* Ignore the session category on version 11 and older, but post a warning. */ ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Session category only supported in iOS 12 and newer."); #endif } } if (!pConfig->coreaudio.noAudioSessionActivate) { if (![pAudioSession setActive:true error:nil]) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to activate audio session."); return MA_FAILED_TO_INIT_BACKEND; } } } #endif #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) pContext->coreaudio.hCoreFoundation = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation"); if (pContext->coreaudio.hCoreFoundation == NULL) { return MA_API_NOT_FOUND; } pContext->coreaudio.CFStringGetCString = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, "CFStringGetCString"); pContext->coreaudio.CFRelease = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, "CFRelease"); pContext->coreaudio.hCoreAudio = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/CoreAudio.framework/CoreAudio"); if (pContext->coreaudio.hCoreAudio == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } pContext->coreaudio.AudioObjectGetPropertyData = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectGetPropertyData"); pContext->coreaudio.AudioObjectGetPropertyDataSize = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectGetPropertyDataSize"); pContext->coreaudio.AudioObjectSetPropertyData = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectSetPropertyData"); pContext->coreaudio.AudioObjectAddPropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectAddPropertyListener"); pContext->coreaudio.AudioObjectRemovePropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, "AudioObjectRemovePropertyListener"); /* It looks like Apple has moved some APIs from AudioUnit into AudioToolbox on more recent versions of macOS. They are still defined in AudioUnit, but just in case they decide to remove them from there entirely I'm going to implement a fallback. The way it'll work is that it'll first try AudioUnit, and if the required symbols are not present there we'll fall back to AudioToolbox. */ pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/AudioUnit.framework/AudioUnit"); if (pContext->coreaudio.hAudioUnit == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } if (ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentFindNext") == NULL) { /* Couldn't find the required symbols in AudioUnit, so fall back to AudioToolbox. */ ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), "/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox"); if (pContext->coreaudio.hAudioUnit == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); return MA_API_NOT_FOUND; } } pContext->coreaudio.AudioComponentFindNext = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentFindNext"); pContext->coreaudio.AudioComponentInstanceDispose = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentInstanceDispose"); pContext->coreaudio.AudioComponentInstanceNew = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioComponentInstanceNew"); pContext->coreaudio.AudioOutputUnitStart = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioOutputUnitStart"); pContext->coreaudio.AudioOutputUnitStop = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioOutputUnitStop"); pContext->coreaudio.AudioUnitAddPropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitAddPropertyListener"); pContext->coreaudio.AudioUnitGetPropertyInfo = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitGetPropertyInfo"); pContext->coreaudio.AudioUnitGetProperty = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitGetProperty"); pContext->coreaudio.AudioUnitSetProperty = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitSetProperty"); pContext->coreaudio.AudioUnitInitialize = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitInitialize"); pContext->coreaudio.AudioUnitRender = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, "AudioUnitRender"); #else pContext->coreaudio.CFStringGetCString = (ma_proc)CFStringGetCString; pContext->coreaudio.CFRelease = (ma_proc)CFRelease; #if defined(MA_APPLE_DESKTOP) pContext->coreaudio.AudioObjectGetPropertyData = (ma_proc)AudioObjectGetPropertyData; pContext->coreaudio.AudioObjectGetPropertyDataSize = (ma_proc)AudioObjectGetPropertyDataSize; pContext->coreaudio.AudioObjectSetPropertyData = (ma_proc)AudioObjectSetPropertyData; pContext->coreaudio.AudioObjectAddPropertyListener = (ma_proc)AudioObjectAddPropertyListener; pContext->coreaudio.AudioObjectRemovePropertyListener = (ma_proc)AudioObjectRemovePropertyListener; #endif pContext->coreaudio.AudioComponentFindNext = (ma_proc)AudioComponentFindNext; pContext->coreaudio.AudioComponentInstanceDispose = (ma_proc)AudioComponentInstanceDispose; pContext->coreaudio.AudioComponentInstanceNew = (ma_proc)AudioComponentInstanceNew; pContext->coreaudio.AudioOutputUnitStart = (ma_proc)AudioOutputUnitStart; pContext->coreaudio.AudioOutputUnitStop = (ma_proc)AudioOutputUnitStop; pContext->coreaudio.AudioUnitAddPropertyListener = (ma_proc)AudioUnitAddPropertyListener; pContext->coreaudio.AudioUnitGetPropertyInfo = (ma_proc)AudioUnitGetPropertyInfo; pContext->coreaudio.AudioUnitGetProperty = (ma_proc)AudioUnitGetProperty; pContext->coreaudio.AudioUnitSetProperty = (ma_proc)AudioUnitSetProperty; pContext->coreaudio.AudioUnitInitialize = (ma_proc)AudioUnitInitialize; pContext->coreaudio.AudioUnitRender = (ma_proc)AudioUnitRender; #endif /* Audio component. */ { AudioComponentDescription desc; desc.componentType = kAudioUnitType_Output; #if defined(MA_APPLE_DESKTOP) desc.componentSubType = kAudioUnitSubType_HALOutput; #else desc.componentSubType = kAudioUnitSubType_RemoteIO; #endif desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; pContext->coreaudio.component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc); if (pContext->coreaudio.component == NULL) { #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif return MA_FAILED_TO_INIT_BACKEND; } } #if !defined(MA_APPLE_MOBILE) result = ma_context__init_device_tracking__coreaudio(pContext); if (result != MA_SUCCESS) { #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE) ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio); ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation); #endif return result; } #endif pContext->coreaudio.noAudioSessionDeactivate = pConfig->coreaudio.noAudioSessionDeactivate; pCallbacks->onContextInit = ma_context_init__coreaudio; pCallbacks->onContextUninit = ma_context_uninit__coreaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__coreaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__coreaudio; pCallbacks->onDeviceInit = ma_device_init__coreaudio; pCallbacks->onDeviceUninit = ma_device_uninit__coreaudio; pCallbacks->onDeviceStart = ma_device_start__coreaudio; pCallbacks->onDeviceStop = ma_device_stop__coreaudio; pCallbacks->onDeviceRead = NULL; pCallbacks->onDeviceWrite = NULL; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_COREAUDIO */ /****************************************************************************** sndio Backend ******************************************************************************/ #ifdef MA_HAS_SNDIO #include /* Only supporting OpenBSD. This did not work very well at all on FreeBSD when I tried it. Not sure if this is due to miniaudio's implementation or if it's some kind of system configuration issue, but basically the default device just doesn't emit any sound, or at times you'll hear tiny pieces. I will consider enabling this when there's demand for it or if I can get it tested and debugged more thoroughly. */ #if 0 #if defined(__NetBSD__) || defined(__OpenBSD__) #include #endif #if defined(__FreeBSD__) || defined(__DragonFly__) #include #endif #endif #define MA_SIO_DEVANY "default" #define MA_SIO_PLAY 1 #define MA_SIO_REC 2 #define MA_SIO_NENC 8 #define MA_SIO_NCHAN 8 #define MA_SIO_NRATE 16 #define MA_SIO_NCONF 4 struct ma_sio_hdl; /* <-- Opaque */ struct ma_sio_par { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; unsigned int rchan; unsigned int pchan; unsigned int rate; unsigned int bufsz; unsigned int xrun; unsigned int round; unsigned int appbufsz; int __pad[3]; unsigned int __magic; }; struct ma_sio_enc { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; }; struct ma_sio_conf { unsigned int enc; unsigned int rchan; unsigned int pchan; unsigned int rate; }; struct ma_sio_cap { struct ma_sio_enc enc[MA_SIO_NENC]; unsigned int rchan[MA_SIO_NCHAN]; unsigned int pchan[MA_SIO_NCHAN]; unsigned int rate[MA_SIO_NRATE]; int __pad[7]; unsigned int nconf; struct ma_sio_conf confs[MA_SIO_NCONF]; }; typedef struct ma_sio_hdl* (* ma_sio_open_proc) (const char*, unsigned int, int); typedef void (* ma_sio_close_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_setpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*); typedef int (* ma_sio_getpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*); typedef int (* ma_sio_getcap_proc) (struct ma_sio_hdl*, struct ma_sio_cap*); typedef size_t (* ma_sio_write_proc) (struct ma_sio_hdl*, const void*, size_t); typedef size_t (* ma_sio_read_proc) (struct ma_sio_hdl*, void*, size_t); typedef int (* ma_sio_start_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_stop_proc) (struct ma_sio_hdl*); typedef int (* ma_sio_initpar_proc)(struct ma_sio_par*); static ma_uint32 ma_get_standard_sample_rate_priority_index__sndio(ma_uint32 sampleRate) /* Lower = higher priority */ { ma_uint32 i; for (i = 0; i < ma_countof(g_maStandardSampleRatePriorities); ++i) { if (g_maStandardSampleRatePriorities[i] == sampleRate) { return i; } } return (ma_uint32)-1; } static ma_format ma_format_from_sio_enc__sndio(unsigned int bits, unsigned int bps, unsigned int sig, unsigned int le, unsigned int msb) { /* We only support native-endian right now. */ if ((ma_is_little_endian() && le == 0) || (ma_is_big_endian() && le == 1)) { return ma_format_unknown; } if (bits == 8 && bps == 1 && sig == 0) { return ma_format_u8; } if (bits == 16 && bps == 2 && sig == 1) { return ma_format_s16; } if (bits == 24 && bps == 3 && sig == 1) { return ma_format_s24; } if (bits == 24 && bps == 4 && sig == 1 && msb == 0) { /*return ma_format_s24_32;*/ } if (bits == 32 && bps == 4 && sig == 1) { return ma_format_s32; } return ma_format_unknown; } static ma_format ma_find_best_format_from_sio_cap__sndio(struct ma_sio_cap* caps) { ma_format bestFormat; unsigned int iConfig; MA_ASSERT(caps != NULL); bestFormat = ma_format_unknown; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format == ma_format_unknown) { continue; /* Format not supported. */ } if (bestFormat == ma_format_unknown) { bestFormat = format; } else { if (ma_get_format_priority_index(bestFormat) > ma_get_format_priority_index(format)) { /* <-- Lower = better. */ bestFormat = format; } } } } return bestFormat; } static ma_uint32 ma_find_best_channels_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat) { ma_uint32 maxChannels; unsigned int iConfig; MA_ASSERT(caps != NULL); MA_ASSERT(requiredFormat != ma_format_unknown); /* Just pick whatever configuration has the most channels. */ maxChannels = 0; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { /* The encoding should be of requiredFormat. */ unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int iChannel; unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format != requiredFormat) { continue; } /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; if (deviceType == ma_device_type_playback) { chan = caps->confs[iConfig].pchan; } else { chan = caps->confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps->pchan[iChannel]; } else { channels = caps->rchan[iChannel]; } if (maxChannels < channels) { maxChannels = channels; } } } } return maxChannels; } static ma_uint32 ma_find_best_sample_rate_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat, ma_uint32 requiredChannels) { ma_uint32 firstSampleRate; ma_uint32 bestSampleRate; unsigned int iConfig; MA_ASSERT(caps != NULL); MA_ASSERT(requiredFormat != ma_format_unknown); MA_ASSERT(requiredChannels > 0); MA_ASSERT(requiredChannels <= MA_MAX_CHANNELS); firstSampleRate = 0; /* <-- If the device does not support a standard rate we'll fall back to the first one that's found. */ bestSampleRate = 0; for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) { /* The encoding should be of requiredFormat. */ unsigned int iEncoding; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int iChannel; unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps->enc[iEncoding].bits; bps = caps->enc[iEncoding].bps; sig = caps->enc[iEncoding].sig; le = caps->enc[iEncoding].le; msb = caps->enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format != requiredFormat) { continue; } /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; unsigned int iRate; if (deviceType == ma_device_type_playback) { chan = caps->confs[iConfig].pchan; } else { chan = caps->confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps->pchan[iChannel]; } else { channels = caps->rchan[iChannel]; } if (channels != requiredChannels) { continue; } /* Getting here means we have found a compatible encoding/channel pair. */ for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) { ma_uint32 rate = (ma_uint32)caps->rate[iRate]; ma_uint32 ratePriority; if (firstSampleRate == 0) { firstSampleRate = rate; } /* Disregard this rate if it's not a standard one. */ ratePriority = ma_get_standard_sample_rate_priority_index__sndio(rate); if (ratePriority == (ma_uint32)-1) { continue; } if (ma_get_standard_sample_rate_priority_index__sndio(bestSampleRate) > ratePriority) { /* Lower = better. */ bestSampleRate = rate; } } } } } /* If a standard sample rate was not found just fall back to the first one that was iterated. */ if (bestSampleRate == 0) { bestSampleRate = firstSampleRate; } return bestSampleRate; } static ma_result ma_context_enumerate_devices__sndio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 isTerminating = MA_FALSE; struct ma_sio_hdl* handle; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* sndio doesn't seem to have a good device enumeration API, so I'm therefore only enumerating over default devices for now. */ /* Playback. */ if (!isTerminating) { handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_PLAY, 0); if (handle != NULL) { /* Supports playback. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), MA_SIO_DEVANY); ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME); isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); } } /* Capture. */ if (!isTerminating) { handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_REC, 0); if (handle != NULL) { /* Supports capture. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), "default"); ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME); isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__sndio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { char devid[256]; struct ma_sio_hdl* handle; struct ma_sio_cap caps; unsigned int iConfig; MA_ASSERT(pContext != NULL); /* We need to open the device before we can get information about it. */ if (pDeviceID == NULL) { ma_strcpy_s(devid, sizeof(devid), MA_SIO_DEVANY); ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (deviceType == ma_device_type_playback) ? MA_DEFAULT_PLAYBACK_DEVICE_NAME : MA_DEFAULT_CAPTURE_DEVICE_NAME); } else { ma_strcpy_s(devid, sizeof(devid), pDeviceID->sndio); ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), devid); } handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(devid, (deviceType == ma_device_type_playback) ? MA_SIO_PLAY : MA_SIO_REC, 0); if (handle == NULL) { return MA_NO_DEVICE; } if (((ma_sio_getcap_proc)pContext->sndio.sio_getcap)(handle, &caps) == 0) { return MA_ERROR; } pDeviceInfo->nativeDataFormatCount = 0; for (iConfig = 0; iConfig < caps.nconf; iConfig += 1) { /* The main thing we care about is that the encoding is supported by miniaudio. If it is, we want to give preference to some formats over others. */ unsigned int iEncoding; unsigned int iChannel; unsigned int iRate; for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) { unsigned int bits; unsigned int bps; unsigned int sig; unsigned int le; unsigned int msb; ma_format format; if ((caps.confs[iConfig].enc & (1UL << iEncoding)) == 0) { continue; } bits = caps.enc[iEncoding].bits; bps = caps.enc[iEncoding].bps; sig = caps.enc[iEncoding].sig; le = caps.enc[iEncoding].le; msb = caps.enc[iEncoding].msb; format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb); if (format == ma_format_unknown) { continue; /* Format not supported. */ } /* Channels. */ for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) { unsigned int chan = 0; unsigned int channels; if (deviceType == ma_device_type_playback) { chan = caps.confs[iConfig].pchan; } else { chan = caps.confs[iConfig].rchan; } if ((chan & (1UL << iChannel)) == 0) { continue; } if (deviceType == ma_device_type_playback) { channels = caps.pchan[iChannel]; } else { channels = caps.rchan[iChannel]; } /* Sample Rates. */ for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) { if ((caps.confs[iConfig].rate & (1UL << iRate)) != 0) { ma_device_info_add_native_data_format(pDeviceInfo, format, channels, caps.rate[iRate], 0); } } } } } ((ma_sio_close_proc)pContext->sndio.sio_close)(handle); return MA_SUCCESS; } static ma_result ma_device_uninit__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); } return MA_SUCCESS; } static ma_result ma_device_init_handle__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { const char* pDeviceName; ma_ptr handle; int openFlags = 0; struct ma_sio_cap caps; struct ma_sio_par par; const ma_device_id* pDeviceID; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); MA_ASSERT(pDevice != NULL); if (deviceType == ma_device_type_capture) { openFlags = MA_SIO_REC; } else { openFlags = MA_SIO_PLAY; } pDeviceID = pDescriptor->pDeviceID; format = pDescriptor->format; channels = pDescriptor->channels; sampleRate = pDescriptor->sampleRate; pDeviceName = MA_SIO_DEVANY; if (pDeviceID != NULL) { pDeviceName = pDeviceID->sndio; } handle = (ma_ptr)((ma_sio_open_proc)pDevice->pContext->sndio.sio_open)(pDeviceName, openFlags, 0); if (handle == NULL) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to open device."); return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } /* We need to retrieve the device caps to determine the most appropriate format to use. */ if (((ma_sio_getcap_proc)pDevice->pContext->sndio.sio_getcap)((struct ma_sio_hdl*)handle, &caps) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to retrieve device caps."); return MA_ERROR; } /* Note: sndio reports a huge range of available channels. This is inconvenient for us because there's no real way, as far as I can tell, to get the _actual_ channel count of the device. I'm therefore restricting this to the requested channels, regardless of whether or not the default channel count is requested. For hardware devices, I'm suspecting only a single channel count will be reported and we can safely use the value returned by ma_find_best_channels_from_sio_cap__sndio(). */ if (deviceType == ma_device_type_capture) { if (format == ma_format_unknown) { format = ma_find_best_format_from_sio_cap__sndio(&caps); } if (channels == 0) { if (strlen(pDeviceName) > strlen("rsnd/") && strncmp(pDeviceName, "rsnd/", strlen("rsnd/")) == 0) { channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format); } else { channels = MA_DEFAULT_CHANNELS; } } } else { if (format == ma_format_unknown) { format = ma_find_best_format_from_sio_cap__sndio(&caps); } if (channels == 0) { if (strlen(pDeviceName) > strlen("rsnd/") && strncmp(pDeviceName, "rsnd/", strlen("rsnd/")) == 0) { channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format); } else { channels = MA_DEFAULT_CHANNELS; } } } if (sampleRate == 0) { sampleRate = ma_find_best_sample_rate_from_sio_cap__sndio(&caps, pConfig->deviceType, format, channels); } ((ma_sio_initpar_proc)pDevice->pContext->sndio.sio_initpar)(&par); par.msb = 0; par.le = ma_is_little_endian(); switch (format) { case ma_format_u8: { par.bits = 8; par.bps = 1; par.sig = 0; } break; case ma_format_s24: { par.bits = 24; par.bps = 3; par.sig = 1; } break; case ma_format_s32: { par.bits = 32; par.bps = 4; par.sig = 1; } break; case ma_format_s16: case ma_format_f32: case ma_format_unknown: default: { par.bits = 16; par.bps = 2; par.sig = 1; } break; } if (deviceType == ma_device_type_capture) { par.rchan = channels; } else { par.pchan = channels; } par.rate = sampleRate; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, par.rate, pConfig->performanceProfile); par.round = internalPeriodSizeInFrames; par.appbufsz = par.round * pDescriptor->periodCount; if (((ma_sio_setpar_proc)pDevice->pContext->sndio.sio_setpar)((struct ma_sio_hdl*)handle, &par) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to set buffer size."); return MA_ERROR; } if (((ma_sio_getpar_proc)pDevice->pContext->sndio.sio_getpar)((struct ma_sio_hdl*)handle, &par) == 0) { ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to retrieve buffer size."); return MA_ERROR; } internalFormat = ma_format_from_sio_enc__sndio(par.bits, par.bps, par.sig, par.le, par.msb); internalChannels = (deviceType == ma_device_type_capture) ? par.rchan : par.pchan; internalSampleRate = par.rate; internalPeriods = par.appbufsz / par.round; internalPeriodSizeInFrames = par.round; if (deviceType == ma_device_type_capture) { pDevice->sndio.handleCapture = handle; } else { pDevice->sndio.handlePlayback = handle; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sndio, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->sndio); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); /* <-- Doesn't actually playback until data is written. */ } return MA_SUCCESS; } static ma_result ma_device_stop__sndio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* From the documentation: The sio_stop() function puts the audio subsystem in the same state as before sio_start() is called. It stops recording, drains the play buffer and then stops playback. If samples to play are queued but playback hasn't started yet then playback is forced immediately; playback will actually stop once the buffer is drained. In no case are samples in the play buffer discarded. Therefore, sio_stop() performs all of the necessary draining for us. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handleCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback); } return MA_SUCCESS; } static ma_result ma_device_write__sndio(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int result; if (pFramesWritten != NULL) { *pFramesWritten = 0; } result = ((ma_sio_write_proc)pDevice->pContext->sndio.sio_write)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (result == 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to send data from the client to the device."); return MA_IO_ERROR; } if (pFramesWritten != NULL) { *pFramesWritten = frameCount; } return MA_SUCCESS; } static ma_result ma_device_read__sndio(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int result; if (pFramesRead != NULL) { *pFramesRead = 0; } result = ((ma_sio_read_proc)pDevice->pContext->sndio.sio_read)((struct ma_sio_hdl*)pDevice->sndio.handleCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (result == 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[sndio] Failed to read data from the device to be sent to the device."); return MA_IO_ERROR; } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } static ma_result ma_context_uninit__sndio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_sndio); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__sndio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #ifndef MA_NO_RUNTIME_LINKING const char* libsndioNames[] = { "libsndio.so" }; size_t i; for (i = 0; i < ma_countof(libsndioNames); ++i) { pContext->sndio.sndioSO = ma_dlopen(ma_context_get_log(pContext), libsndioNames[i]); if (pContext->sndio.sndioSO != NULL) { break; } } if (pContext->sndio.sndioSO == NULL) { return MA_NO_BACKEND; } pContext->sndio.sio_open = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_open"); pContext->sndio.sio_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_close"); pContext->sndio.sio_setpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_setpar"); pContext->sndio.sio_getpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_getpar"); pContext->sndio.sio_getcap = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_getcap"); pContext->sndio.sio_write = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_write"); pContext->sndio.sio_read = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_read"); pContext->sndio.sio_start = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_start"); pContext->sndio.sio_stop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_stop"); pContext->sndio.sio_initpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, "sio_initpar"); #else pContext->sndio.sio_open = sio_open; pContext->sndio.sio_close = sio_close; pContext->sndio.sio_setpar = sio_setpar; pContext->sndio.sio_getpar = sio_getpar; pContext->sndio.sio_getcap = sio_getcap; pContext->sndio.sio_write = sio_write; pContext->sndio.sio_read = sio_read; pContext->sndio.sio_start = sio_start; pContext->sndio.sio_stop = sio_stop; pContext->sndio.sio_initpar = sio_initpar; #endif pCallbacks->onContextInit = ma_context_init__sndio; pCallbacks->onContextUninit = ma_context_uninit__sndio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__sndio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__sndio; pCallbacks->onDeviceInit = ma_device_init__sndio; pCallbacks->onDeviceUninit = ma_device_uninit__sndio; pCallbacks->onDeviceStart = ma_device_start__sndio; pCallbacks->onDeviceStop = ma_device_stop__sndio; pCallbacks->onDeviceRead = ma_device_read__sndio; pCallbacks->onDeviceWrite = ma_device_write__sndio; pCallbacks->onDeviceDataLoop = NULL; (void)pConfig; return MA_SUCCESS; } #endif /* MA_HAS_SNDIO */ /****************************************************************************** audio(4) Backend ******************************************************************************/ #ifdef MA_HAS_AUDIO4 #include #include #include #include #include #include #include #ifdef __NetBSD__ #include #endif #if defined(__OpenBSD__) #include #if defined(OpenBSD) && OpenBSD >= 201709 #define MA_AUDIO4_USE_NEW_API #endif #endif static void ma_construct_device_id__audio4(char* id, size_t idSize, const char* base, int deviceIndex) { size_t baseLen; MA_ASSERT(id != NULL); MA_ASSERT(idSize > 0); MA_ASSERT(deviceIndex >= 0); baseLen = strlen(base); MA_ASSERT(idSize > baseLen); ma_strcpy_s(id, idSize, base); ma_itoa_s(deviceIndex, id+baseLen, idSize-baseLen, 10); } static ma_result ma_extract_device_index_from_id__audio4(const char* id, const char* base, int* pIndexOut) { size_t idLen; size_t baseLen; const char* deviceIndexStr; MA_ASSERT(id != NULL); MA_ASSERT(base != NULL); MA_ASSERT(pIndexOut != NULL); idLen = strlen(id); baseLen = strlen(base); if (idLen <= baseLen) { return MA_ERROR; /* Doesn't look like the id starts with the base. */ } if (strncmp(id, base, baseLen) != 0) { return MA_ERROR; /* ID does not begin with base. */ } deviceIndexStr = id + baseLen; if (deviceIndexStr[0] == '\0') { return MA_ERROR; /* No index specified in the ID. */ } if (pIndexOut) { *pIndexOut = atoi(deviceIndexStr); } return MA_SUCCESS; } #if !defined(MA_AUDIO4_USE_NEW_API) /* Old API */ static ma_format ma_format_from_encoding__audio4(unsigned int encoding, unsigned int precision) { if (precision == 8 && (encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR_LE || encoding == AUDIO_ENCODING_ULINEAR_BE)) { return ma_format_u8; } else { if (ma_is_little_endian() && encoding == AUDIO_ENCODING_SLINEAR_LE) { if (precision == 16) { return ma_format_s16; } else if (precision == 24) { return ma_format_s24; } else if (precision == 32) { return ma_format_s32; } } else if (ma_is_big_endian() && encoding == AUDIO_ENCODING_SLINEAR_BE) { if (precision == 16) { return ma_format_s16; } else if (precision == 24) { return ma_format_s24; } else if (precision == 32) { return ma_format_s32; } } } return ma_format_unknown; /* Encoding not supported. */ } static void ma_encoding_from_format__audio4(ma_format format, unsigned int* pEncoding, unsigned int* pPrecision) { MA_ASSERT(pEncoding != NULL); MA_ASSERT(pPrecision != NULL); switch (format) { case ma_format_u8: { *pEncoding = AUDIO_ENCODING_ULINEAR; *pPrecision = 8; } break; case ma_format_s24: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 24; } break; case ma_format_s32: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 32; } break; case ma_format_s16: case ma_format_f32: case ma_format_unknown: default: { *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE; *pPrecision = 16; } break; } } static ma_format ma_format_from_prinfo__audio4(struct audio_prinfo* prinfo) { return ma_format_from_encoding__audio4(prinfo->encoding, prinfo->precision); } static ma_format ma_best_format_from_fd__audio4(int fd, ma_format preferredFormat) { audio_encoding_t encoding; ma_uint32 iFormat; int counter = 0; /* First check to see if the preferred format is supported. */ if (preferredFormat != ma_format_unknown) { counter = 0; for (;;) { MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } if (preferredFormat == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) { return preferredFormat; /* Found the preferred format. */ } /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */ counter += 1; } } /* Getting here means our preferred format is not supported, so fall back to our standard priorities. */ for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) { ma_format format = g_maFormatPriorities[iFormat]; counter = 0; for (;;) { MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } if (format == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) { return format; /* Found a workable format. */ } /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */ counter += 1; } } /* Getting here means not appropriate format was found. */ return ma_format_unknown; } #else static ma_format ma_format_from_swpar__audio4(struct audio_swpar* par) { if (par->bits == 8 && par->bps == 1 && par->sig == 0) { return ma_format_u8; } if (par->bits == 16 && par->bps == 2 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_s16; } if (par->bits == 24 && par->bps == 3 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_s24; } if (par->bits == 32 && par->bps == 4 && par->sig == 1 && par->le == ma_is_little_endian()) { return ma_format_f32; } /* Format not supported. */ return ma_format_unknown; } #endif static ma_result ma_context_get_device_info_from_fd__audio4(ma_context* pContext, ma_device_type deviceType, int fd, ma_device_info* pDeviceInfo) { audio_device_t fdDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(fd >= 0); MA_ASSERT(pDeviceInfo != NULL); (void)pContext; (void)deviceType; if (ioctl(fd, AUDIO_GETDEV, &fdDevice) < 0) { return MA_ERROR; /* Failed to retrieve device info. */ } /* Name. */ ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), fdDevice.name); #if !defined(MA_AUDIO4_USE_NEW_API) { audio_info_t fdInfo; int counter = 0; ma_uint32 channels; ma_uint32 sampleRate; #if defined(__NetBSD__) && (__NetBSD_Version__ >= 900000000) if (ioctl(fd, AUDIO_GETFORMAT, &fdInfo) < 0) { return MA_ERROR; } #else if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { return MA_ERROR; } #endif if (deviceType == ma_device_type_playback) { channels = fdInfo.play.channels; sampleRate = fdInfo.play.sample_rate; } else { channels = fdInfo.record.channels; sampleRate = fdInfo.record.sample_rate; } /* Supported formats. We get this by looking at the encodings. */ pDeviceInfo->nativeDataFormatCount = 0; for (;;) { audio_encoding_t encoding; ma_format format; MA_ZERO_OBJECT(&encoding); encoding.index = counter; if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) { break; } format = ma_format_from_encoding__audio4(encoding.encoding, encoding.precision); if (format != ma_format_unknown) { ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0); } counter += 1; } } #else { struct audio_swpar fdPar; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { return MA_ERROR; } format = ma_format_from_swpar__audio4(&fdPar); if (format == ma_format_unknown) { return MA_FORMAT_NOT_SUPPORTED; } if (deviceType == ma_device_type_playback) { channels = fdPar.pchan; } else { channels = fdPar.rchan; } sampleRate = fdPar.rate; pDeviceInfo->nativeDataFormatCount = 0; ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0); } #endif return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__audio4(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { const int maxDevices = 64; char devpath[256]; int iDevice; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Every device will be named "/dev/audioN", with a "/dev/audioctlN" equivalent. We use the "/dev/audioctlN" version here since we can open it even when another process has control of the "/dev/audioN" device. */ for (iDevice = 0; iDevice < maxDevices; ++iDevice) { struct stat st; int fd; ma_bool32 isTerminating = MA_FALSE; ma_strcpy_s(devpath, sizeof(devpath), "/dev/audioctl"); ma_itoa_s(iDevice, devpath+strlen(devpath), sizeof(devpath)-strlen(devpath), 10); if (stat(devpath, &st) < 0) { break; } /* The device exists, but we need to check if it's usable as playback and/or capture. */ /* Playback. */ if (!isTerminating) { fd = open(devpath, O_RDONLY, 0); if (fd >= 0) { /* Supports playback. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), "/dev/audio", iDevice); if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_playback, fd, &deviceInfo) == MA_SUCCESS) { isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } close(fd); } } /* Capture. */ if (!isTerminating) { fd = open(devpath, O_WRONLY, 0); if (fd >= 0) { /* Supports capture. */ ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), "/dev/audio", iDevice); if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_capture, fd, &deviceInfo) == MA_SUCCESS) { isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } close(fd); } } if (isTerminating) { break; } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__audio4(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { int fd = -1; int deviceIndex = -1; char ctlid[256]; ma_result result; MA_ASSERT(pContext != NULL); /* We need to open the "/dev/audioctlN" device to get the info. To do this we need to extract the number from the device ID which will be in "/dev/audioN" format. */ if (pDeviceID == NULL) { /* Default device. */ ma_strcpy_s(ctlid, sizeof(ctlid), "/dev/audioctl"); } else { /* Specific device. We need to convert from "/dev/audioN" to "/dev/audioctlN". */ result = ma_extract_device_index_from_id__audio4(pDeviceID->audio4, "/dev/audio", &deviceIndex); if (result != MA_SUCCESS) { return result; } ma_construct_device_id__audio4(ctlid, sizeof(ctlid), "/dev/audioctl", deviceIndex); } fd = open(ctlid, (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY, 0); if (fd == -1) { return MA_NO_DEVICE; } if (deviceIndex == -1) { ma_strcpy_s(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), "/dev/audio"); } else { ma_construct_device_id__audio4(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), "/dev/audio", deviceIndex); } result = ma_context_get_device_info_from_fd__audio4(pContext, deviceType, fd, pDeviceInfo); close(fd); return result; } static ma_result ma_device_uninit__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { close(pDevice->audio4.fdCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { close(pDevice->audio4.fdPlayback); } return MA_SUCCESS; } static ma_result ma_device_init_fd__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { const char* pDefaultDeviceNames[] = { "/dev/audio", "/dev/audio0" }; const char* pDefaultDeviceCtlNames[] = { "/dev/audioctl", "/dev/audioctl0" }; int fd; int fdFlags = 0; size_t iDefaultDevice = (size_t)-1; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_uint32 internalPeriodSizeInFrames; ma_uint32 internalPeriods; MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); MA_ASSERT(pDevice != NULL); /* The first thing to do is open the file. */ if (deviceType == ma_device_type_capture) { fdFlags = O_RDONLY; } else { fdFlags = O_WRONLY; } /*fdFlags |= O_NONBLOCK;*/ /* Find the index of the default device as a start. We'll use this index later. Set it to (size_t)-1 otherwise. */ if (pDescriptor->pDeviceID == NULL) { /* Default device. */ for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); ++iDefaultDevice) { fd = open(pDefaultDeviceNames[iDefaultDevice], fdFlags, 0); if (fd != -1) { break; } } } else { /* Specific device. */ fd = open(pDescriptor->pDeviceID->audio4, fdFlags, 0); for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); iDefaultDevice += 1) { if (ma_strcmp(pDefaultDeviceNames[iDefaultDevice], pDescriptor->pDeviceID->audio4) == 0) { break; } } if (iDefaultDevice == ma_countof(pDefaultDeviceNames)) { iDefaultDevice = (size_t)-1; } } if (fd == -1) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to open device."); return ma_result_from_errno(errno); } #if !defined(MA_AUDIO4_USE_NEW_API) /* Old API */ { audio_info_t fdInfo; int fdInfoResult = -1; /* The documentation is a little bit unclear to me as to how it handles formats. It says the following: Regardless of formats supported by underlying driver, the audio driver accepts the following formats. By then the next sentence says this: `encoding` and `precision` are one of the values obtained by AUDIO_GETENC. It sounds like a direct contradiction to me. I'm going to play this safe any only use the best sample format returned by AUDIO_GETENC. If the requested format is supported we'll use that, but otherwise we'll just use our standard format priorities to pick an appropriate one. */ AUDIO_INITINFO(&fdInfo); /* Get the default format from the audioctl file if we're asking for a default device. If we retrieve it from /dev/audio it'll default to mono 8000Hz. */ if (iDefaultDevice != (size_t)-1) { /* We're using a default device. Get the info from the /dev/audioctl file instead of /dev/audio. */ int fdctl = open(pDefaultDeviceCtlNames[iDefaultDevice], fdFlags, 0); if (fdctl != -1) { #if defined(__NetBSD__) && (__NetBSD_Version__ >= 900000000) fdInfoResult = ioctl(fdctl, AUDIO_GETFORMAT, &fdInfo); #else fdInfoResult = ioctl(fdctl, AUDIO_GETINFO, &fdInfo); #endif close(fdctl); } } if (fdInfoResult == -1) { /* We still don't have the default device info so just retrieve it from the main audio device. */ if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] AUDIO_GETINFO failed."); return ma_result_from_errno(errno); } } /* We get the driver to do as much of the data conversion as possible. */ if (deviceType == ma_device_type_capture) { fdInfo.mode = AUMODE_RECORD; ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.record.encoding, &fdInfo.record.precision); if (pDescriptor->channels != 0) { fdInfo.record.channels = ma_clamp(pDescriptor->channels, 1, 12); /* From the documentation: `channels` ranges from 1 to 12. */ } if (pDescriptor->sampleRate != 0) { fdInfo.record.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000); /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */ } } else { fdInfo.mode = AUMODE_PLAY; ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.play.encoding, &fdInfo.play.precision); if (pDescriptor->channels != 0) { fdInfo.play.channels = ma_clamp(pDescriptor->channels, 1, 12); /* From the documentation: `channels` ranges from 1 to 12. */ } if (pDescriptor->sampleRate != 0) { fdInfo.play.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000); /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */ } } if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set device format. AUDIO_SETINFO failed."); return ma_result_from_errno(errno); } if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] AUDIO_GETINFO failed."); return ma_result_from_errno(errno); } if (deviceType == ma_device_type_capture) { internalFormat = ma_format_from_prinfo__audio4(&fdInfo.record); internalChannels = fdInfo.record.channels; internalSampleRate = fdInfo.record.sample_rate; } else { internalFormat = ma_format_from_prinfo__audio4(&fdInfo.play); internalChannels = fdInfo.play.channels; internalSampleRate = fdInfo.play.sample_rate; } if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } /* Buffer. */ { ma_uint32 internalPeriodSizeInBytes; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile); internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels); if (internalPeriodSizeInBytes < 16) { internalPeriodSizeInBytes = 16; } internalPeriods = pDescriptor->periodCount; if (internalPeriods < 2) { internalPeriods = 2; } /* What miniaudio calls a period, audio4 calls a block. */ AUDIO_INITINFO(&fdInfo); fdInfo.hiwat = internalPeriods; fdInfo.lowat = internalPeriods-1; fdInfo.blocksize = internalPeriodSizeInBytes; if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set internal buffer size. AUDIO_SETINFO failed."); return ma_result_from_errno(errno); } internalPeriods = fdInfo.hiwat; internalPeriodSizeInFrames = fdInfo.blocksize / ma_get_bytes_per_frame(internalFormat, internalChannels); } } #else { struct audio_swpar fdPar; /* We need to retrieve the format of the device so we can know the channel count and sample rate. Then we can calculate the buffer size. */ if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to retrieve initial device parameters."); return ma_result_from_errno(errno); } internalFormat = ma_format_from_swpar__audio4(&fdPar); internalChannels = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan; internalSampleRate = fdPar.rate; if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } /* Buffer. */ { ma_uint32 internalPeriodSizeInBytes; internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile); /* What miniaudio calls a period, audio4 calls a block. */ internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels); if (internalPeriodSizeInBytes < 16) { internalPeriodSizeInBytes = 16; } fdPar.nblks = pDescriptor->periodCount; fdPar.round = internalPeriodSizeInBytes; if (ioctl(fd, AUDIO_SETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to set device parameters."); return ma_result_from_errno(errno); } if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to retrieve actual device parameters."); return ma_result_from_errno(errno); } } internalFormat = ma_format_from_swpar__audio4(&fdPar); internalChannels = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan; internalSampleRate = fdPar.rate; internalPeriods = fdPar.nblks; internalPeriodSizeInFrames = fdPar.round / ma_get_bytes_per_frame(internalFormat, internalChannels); } #endif if (internalFormat == ma_format_unknown) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] The device's internal device format is not supported by miniaudio. The device is unusable."); return MA_FORMAT_NOT_SUPPORTED; } if (deviceType == ma_device_type_capture) { pDevice->audio4.fdCapture = fd; } else { pDevice->audio4.fdPlayback = fd; } pDescriptor->format = internalFormat; pDescriptor->channels = internalChannels; pDescriptor->sampleRate = internalSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels); pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames; pDescriptor->periodCount = internalPeriods; return MA_SUCCESS; } static ma_result ma_device_init__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->audio4); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } pDevice->audio4.fdCapture = -1; pDevice->audio4.fdPlayback = -1; /* The version of the operating system dictates whether or not the device is exclusive or shared. NetBSD introduced in-kernel mixing which means it's shared. All other BSD flavours are exclusive as far as I'm aware. */ #if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 800000000 /* NetBSD 8.0+ */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } #else /* All other flavors. */ #endif if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { if (pConfig->deviceType == ma_device_type_duplex) { close(pDevice->audio4.fdCapture); } return result; } } return MA_SUCCESS; } static ma_result ma_device_start__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->audio4.fdCapture == -1) { return MA_INVALID_ARGS; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->audio4.fdPlayback == -1) { return MA_INVALID_ARGS; } } return MA_SUCCESS; } static ma_result ma_device_stop_fd__audio4(ma_device* pDevice, int fd) { if (fd == -1) { return MA_INVALID_ARGS; } #if !defined(MA_AUDIO4_USE_NEW_API) if (ioctl(fd, AUDIO_FLUSH, 0) < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_FLUSH failed."); return ma_result_from_errno(errno); } #else if (ioctl(fd, AUDIO_STOP, 0) < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_STOP failed."); return ma_result_from_errno(errno); } #endif return MA_SUCCESS; } static ma_result ma_device_stop__audio4(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result; result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result; /* Drain the device first. If this fails we'll just need to flush without draining. Unfortunately draining isn't available on newer version of OpenBSD. */ #if !defined(MA_AUDIO4_USE_NEW_API) ioctl(pDevice->audio4.fdPlayback, AUDIO_DRAIN, 0); #endif /* Here is where the device is stopped immediately. */ result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdPlayback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_write__audio4(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int result; if (pFramesWritten != NULL) { *pFramesWritten = 0; } result = write(pDevice->audio4.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (result < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to write data to the device."); return ma_result_from_errno(errno); } if (pFramesWritten != NULL) { *pFramesWritten = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } return MA_SUCCESS; } static ma_result ma_device_read__audio4(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int result; if (pFramesRead != NULL) { *pFramesRead = 0; } result = read(pDevice->audio4.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (result < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[audio4] Failed to read data from the device."); return ma_result_from_errno(errno); } if (pFramesRead != NULL) { *pFramesRead = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } return MA_SUCCESS; } static ma_result ma_context_uninit__audio4(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_audio4); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__audio4(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { MA_ASSERT(pContext != NULL); (void)pConfig; pCallbacks->onContextInit = ma_context_init__audio4; pCallbacks->onContextUninit = ma_context_uninit__audio4; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__audio4; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__audio4; pCallbacks->onDeviceInit = ma_device_init__audio4; pCallbacks->onDeviceUninit = ma_device_uninit__audio4; pCallbacks->onDeviceStart = ma_device_start__audio4; pCallbacks->onDeviceStop = ma_device_stop__audio4; pCallbacks->onDeviceRead = ma_device_read__audio4; pCallbacks->onDeviceWrite = ma_device_write__audio4; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_AUDIO4 */ /****************************************************************************** OSS Backend ******************************************************************************/ #ifdef MA_HAS_OSS #include #include #include #include #ifndef SNDCTL_DSP_HALT #define SNDCTL_DSP_HALT SNDCTL_DSP_RESET #endif #define MA_OSS_DEFAULT_DEVICE_NAME "/dev/dsp" static int ma_open_temp_device__oss() { /* The OSS sample code uses "/dev/mixer" as the device for getting system properties so I'm going to do the same. */ int fd = open("/dev/mixer", O_RDONLY, 0); if (fd >= 0) { return fd; } return -1; } static ma_result ma_context_open_device__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_share_mode shareMode, int* pfd) { const char* deviceName; int flags; MA_ASSERT(pContext != NULL); MA_ASSERT(pfd != NULL); (void)pContext; *pfd = -1; /* This function should only be called for playback or capture, not duplex. */ if (deviceType == ma_device_type_duplex) { return MA_INVALID_ARGS; } deviceName = MA_OSS_DEFAULT_DEVICE_NAME; if (pDeviceID != NULL) { deviceName = pDeviceID->oss; } flags = (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY; if (shareMode == ma_share_mode_exclusive) { flags |= O_EXCL; } *pfd = open(deviceName, flags, 0); if (*pfd == -1) { return ma_result_from_errno(errno); } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__oss(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { int fd; oss_sysinfo si; int result; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); fd = ma_open_temp_device__oss(); if (fd == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration."); return MA_NO_BACKEND; } result = ioctl(fd, SNDCTL_SYSINFO, &si); if (result != -1) { int iAudioDevice; for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) { oss_audioinfo ai; ai.dev = iAudioDevice; result = ioctl(fd, SNDCTL_AUDIOINFO, &ai); if (result != -1) { if (ai.devnode[0] != '\0') { /* <-- Can be blank, according to documentation. */ ma_device_info deviceInfo; ma_bool32 isTerminating = MA_FALSE; MA_ZERO_OBJECT(&deviceInfo); /* ID */ ma_strncpy_s(deviceInfo.id.oss, sizeof(deviceInfo.id.oss), ai.devnode, (size_t)-1); /* The human readable device name should be in the "ai.handle" variable, but it can sometimes be empty in which case we just fall back to "ai.name" which is less user friendly, but usually has a value. */ if (ai.handle[0] != '\0') { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.handle, (size_t)-1); } else { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.name, (size_t)-1); } /* The device can be both playback and capture. */ if (!isTerminating && (ai.caps & PCM_CAP_OUTPUT) != 0) { isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } if (!isTerminating && (ai.caps & PCM_CAP_INPUT) != 0) { isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } if (isTerminating) { break; } } } } } else { close(fd); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve system information for device enumeration."); return MA_NO_BACKEND; } close(fd); return MA_SUCCESS; } static void ma_context_add_native_data_format__oss(ma_context* pContext, oss_audioinfo* pAudioInfo, ma_format format, ma_device_info* pDeviceInfo) { unsigned int minChannels; unsigned int maxChannels; unsigned int iRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pAudioInfo != NULL); MA_ASSERT(pDeviceInfo != NULL); /* If we support all channels we just report 0. */ minChannels = ma_clamp(pAudioInfo->min_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); maxChannels = ma_clamp(pAudioInfo->max_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS); /* OSS has this annoying thing where sample rates can be reported in two ways. We prefer explicitness, which OSS has in the form of nrates/rates, however there are times where nrates can be 0, in which case we'll need to use min_rate and max_rate and report only standard rates. */ if (pAudioInfo->nrates > 0) { for (iRate = 0; iRate < pAudioInfo->nrates; iRate += 1) { unsigned int rate = pAudioInfo->rates[iRate]; if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { ma_device_info_add_native_data_format(pDeviceInfo, format, 0, rate, 0); /* Set the channel count to 0 to indicate that all channel counts are supported. */ } else { unsigned int iChannel; for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, rate, 0); } } } } else { for (iRate = 0; iRate < ma_countof(g_maStandardSampleRatePriorities); iRate += 1) { ma_uint32 standardRate = g_maStandardSampleRatePriorities[iRate]; if (standardRate >= (ma_uint32)pAudioInfo->min_rate && standardRate <= (ma_uint32)pAudioInfo->max_rate) { if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) { ma_device_info_add_native_data_format(pDeviceInfo, format, 0, standardRate, 0); /* Set the channel count to 0 to indicate that all channel counts are supported. */ } else { unsigned int iChannel; for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) { ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, standardRate, 0); } } } } } } static ma_result ma_context_get_device_info__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_bool32 foundDevice; int fdTemp; oss_sysinfo si; int result; MA_ASSERT(pContext != NULL); /* Handle the default device a little differently. */ if (pDeviceID == NULL) { if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } return MA_SUCCESS; } /* If we get here it means we are _not_ using the default device. */ foundDevice = MA_FALSE; fdTemp = ma_open_temp_device__oss(); if (fdTemp == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration."); return MA_NO_BACKEND; } result = ioctl(fdTemp, SNDCTL_SYSINFO, &si); if (result != -1) { int iAudioDevice; for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) { oss_audioinfo ai; ai.dev = iAudioDevice; result = ioctl(fdTemp, SNDCTL_AUDIOINFO, &ai); if (result != -1) { if (ma_strcmp(ai.devnode, pDeviceID->oss) == 0) { /* It has the same name, so now just confirm the type. */ if ((deviceType == ma_device_type_playback && ((ai.caps & PCM_CAP_OUTPUT) != 0)) || (deviceType == ma_device_type_capture && ((ai.caps & PCM_CAP_INPUT) != 0))) { unsigned int formatMask; /* ID */ ma_strncpy_s(pDeviceInfo->id.oss, sizeof(pDeviceInfo->id.oss), ai.devnode, (size_t)-1); /* The human readable device name should be in the "ai.handle" variable, but it can sometimes be empty in which case we just fall back to "ai.name" which is less user friendly, but usually has a value. */ if (ai.handle[0] != '\0') { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.handle, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.name, (size_t)-1); } pDeviceInfo->nativeDataFormatCount = 0; if (deviceType == ma_device_type_playback) { formatMask = ai.oformats; } else { formatMask = ai.iformats; } if (((formatMask & AFMT_S16_LE) != 0 && ma_is_little_endian()) || (AFMT_S16_BE && ma_is_big_endian())) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s16, pDeviceInfo); } if (((formatMask & AFMT_S32_LE) != 0 && ma_is_little_endian()) || (AFMT_S32_BE && ma_is_big_endian())) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s32, pDeviceInfo); } if ((formatMask & AFMT_U8) != 0) { ma_context_add_native_data_format__oss(pContext, &ai, ma_format_u8, pDeviceInfo); } foundDevice = MA_TRUE; break; } } } } } else { close(fdTemp); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve system information for device enumeration."); return MA_NO_BACKEND; } close(fdTemp); if (!foundDevice) { return MA_NO_DEVICE; } return MA_SUCCESS; } static ma_result ma_device_uninit__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { close(pDevice->oss.fdCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { close(pDevice->oss.fdPlayback); } return MA_SUCCESS; } static int ma_format_to_oss(ma_format format) { int ossFormat = AFMT_U8; switch (format) { case ma_format_s16: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break; case ma_format_s24: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break; case ma_format_s32: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break; case ma_format_f32: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break; case ma_format_u8: default: ossFormat = AFMT_U8; break; } return ossFormat; } static ma_format ma_format_from_oss(int ossFormat) { if (ossFormat == AFMT_U8) { return ma_format_u8; } else { if (ma_is_little_endian()) { switch (ossFormat) { case AFMT_S16_LE: return ma_format_s16; case AFMT_S32_LE: return ma_format_s32; default: return ma_format_unknown; } } else { switch (ossFormat) { case AFMT_S16_BE: return ma_format_s16; case AFMT_S32_BE: return ma_format_s32; default: return ma_format_unknown; } } } return ma_format_unknown; } static ma_result ma_device_init_fd__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType) { ma_result result; int ossResult; int fd; const ma_device_id* pDeviceID = NULL; ma_share_mode shareMode; int ossFormat; int ossChannels; int ossSampleRate; int ossFragment; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); pDeviceID = pDescriptor->pDeviceID; shareMode = pDescriptor->shareMode; ossFormat = ma_format_to_oss((pDescriptor->format != ma_format_unknown) ? pDescriptor->format : ma_format_s16); /* Use s16 by default because OSS doesn't like floating point. */ ossChannels = (int)(pDescriptor->channels > 0) ? pDescriptor->channels : MA_DEFAULT_CHANNELS; ossSampleRate = (int)(pDescriptor->sampleRate > 0) ? pDescriptor->sampleRate : MA_DEFAULT_SAMPLE_RATE; result = ma_context_open_device__oss(pDevice->pContext, deviceType, pDeviceID, shareMode, &fd); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } /* The OSS documentation is very clear about the order we should be initializing the device's properties: 1) Format 2) Channels 3) Sample rate. */ /* Format. */ ossResult = ioctl(fd, SNDCTL_DSP_SETFMT, &ossFormat); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set format."); return ma_result_from_errno(errno); } /* Channels. */ ossResult = ioctl(fd, SNDCTL_DSP_CHANNELS, &ossChannels); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set channel count."); return ma_result_from_errno(errno); } /* Sample Rate. */ ossResult = ioctl(fd, SNDCTL_DSP_SPEED, &ossSampleRate); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set sample rate."); return ma_result_from_errno(errno); } /* Buffer. The documentation says that the fragment settings should be set as soon as possible, but I'm not sure if it should be done before or after format/channels/rate. OSS wants the fragment size in bytes and a power of 2. When setting, we specify the power, not the actual value. */ { ma_uint32 periodSizeInFrames; ma_uint32 periodSizeInBytes; ma_uint32 ossFragmentSizePower; periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, (ma_uint32)ossSampleRate, pConfig->performanceProfile); periodSizeInBytes = ma_round_to_power_of_2(periodSizeInFrames * ma_get_bytes_per_frame(ma_format_from_oss(ossFormat), ossChannels)); if (periodSizeInBytes < 16) { periodSizeInBytes = 16; } ossFragmentSizePower = 4; periodSizeInBytes >>= 4; while (periodSizeInBytes >>= 1) { ossFragmentSizePower += 1; } ossFragment = (int)((pConfig->periods << 16) | ossFragmentSizePower); ossResult = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &ossFragment); if (ossResult == -1) { close(fd); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to set fragment size and period count."); return ma_result_from_errno(errno); } } /* Internal settings. */ if (deviceType == ma_device_type_capture) { pDevice->oss.fdCapture = fd; } else { pDevice->oss.fdPlayback = fd; } pDescriptor->format = ma_format_from_oss(ossFormat); pDescriptor->channels = ossChannels; pDescriptor->sampleRate = ossSampleRate; ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); pDescriptor->periodCount = (ma_uint32)(ossFragment >> 16); pDescriptor->periodSizeInFrames = (ma_uint32)(1 << (ossFragment & 0xFFFF)) / ma_get_bytes_per_frame(pDescriptor->format, pDescriptor->channels); if (pDescriptor->format == ma_format_unknown) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] The device's internal format is not supported by miniaudio."); return MA_FORMAT_NOT_SUPPORTED; } return MA_SUCCESS; } static ma_result ma_device_init__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ZERO_OBJECT(&pDevice->oss); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open device."); return result; } } return MA_SUCCESS; } /* Note on Starting and Stopping ============================= In the past I was using SNDCTL_DSP_HALT to stop the device, however this results in issues when trying to resume the device again. If we use SNDCTL_DSP_HALT, the next write() or read() will fail. Instead what we need to do is just not write or read to and from the device when the device is not running. As a result, both the start and stop functions for OSS are just empty stubs. The starting and stopping logic is handled by ma_device_write__oss() and ma_device_read__oss(). These will check the device state, and if the device is stopped they will simply not do any kind of processing. The downside to this technique is that I've noticed a fairly lengthy delay in stopping the device, up to a second. This is on a virtual machine, and as such might just be due to the virtual drivers, but I'm not fully sure. I am not sure how to work around this problem so for the moment that's just how it's going to have to be. When starting the device, OSS will automatically start it when write() or read() is called. */ static ma_result ma_device_start__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* The device is automatically started with reading and writing. */ (void)pDevice; return MA_SUCCESS; } static ma_result ma_device_stop__oss(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* See note above on why this is empty. */ (void)pDevice; return MA_SUCCESS; } static ma_result ma_device_write__oss(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten) { int resultOSS; ma_uint32 deviceState; if (pFramesWritten != NULL) { *pFramesWritten = 0; } /* Don't do any processing if the device is stopped. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) { return MA_SUCCESS; } resultOSS = write(pDevice->oss.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); if (resultOSS < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to send data from the client to the device."); return ma_result_from_errno(errno); } if (pFramesWritten != NULL) { *pFramesWritten = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); } return MA_SUCCESS; } static ma_result ma_device_read__oss(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead) { int resultOSS; ma_uint32 deviceState; if (pFramesRead != NULL) { *pFramesRead = 0; } /* Don't do any processing if the device is stopped. */ deviceState = ma_device_get_state(pDevice); if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) { return MA_SUCCESS; } resultOSS = read(pDevice->oss.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels)); if (resultOSS < 0) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OSS] Failed to read data from the device to be sent to the client."); return ma_result_from_errno(errno); } if (pFramesRead != NULL) { *pFramesRead = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); } return MA_SUCCESS; } static ma_result ma_context_uninit__oss(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_oss); (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init__oss(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { int fd; int ossVersion; int result; MA_ASSERT(pContext != NULL); (void)pConfig; /* Try opening a temporary device first so we can get version information. This is closed at the end. */ fd = ma_open_temp_device__oss(); if (fd == -1) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to open temporary device for retrieving system properties."); /* Looks liks OSS isn't installed, or there are no available devices. */ return MA_NO_BACKEND; } /* Grab the OSS version. */ ossVersion = 0; result = ioctl(fd, OSS_GETVERSION, &ossVersion); if (result == -1) { close(fd); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[OSS] Failed to retrieve OSS version."); return MA_NO_BACKEND; } /* The file handle to temp device is no longer needed. Close ASAP. */ close(fd); pContext->oss.versionMajor = ((ossVersion & 0xFF0000) >> 16); pContext->oss.versionMinor = ((ossVersion & 0x00FF00) >> 8); pCallbacks->onContextInit = ma_context_init__oss; pCallbacks->onContextUninit = ma_context_uninit__oss; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__oss; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__oss; pCallbacks->onDeviceInit = ma_device_init__oss; pCallbacks->onDeviceUninit = ma_device_uninit__oss; pCallbacks->onDeviceStart = ma_device_start__oss; pCallbacks->onDeviceStop = ma_device_stop__oss; pCallbacks->onDeviceRead = ma_device_read__oss; pCallbacks->onDeviceWrite = ma_device_write__oss; pCallbacks->onDeviceDataLoop = NULL; return MA_SUCCESS; } #endif /* MA_HAS_OSS */ /****************************************************************************** AAudio Backend ******************************************************************************/ #ifdef MA_HAS_AAUDIO #ifdef MA_NO_RUNTIME_LINKING #include #endif typedef int32_t ma_aaudio_result_t; typedef int32_t ma_aaudio_direction_t; typedef int32_t ma_aaudio_sharing_mode_t; typedef int32_t ma_aaudio_format_t; typedef int32_t ma_aaudio_stream_state_t; typedef int32_t ma_aaudio_performance_mode_t; typedef int32_t ma_aaudio_usage_t; typedef int32_t ma_aaudio_content_type_t; typedef int32_t ma_aaudio_input_preset_t; typedef int32_t ma_aaudio_allowed_capture_policy_t; typedef int32_t ma_aaudio_data_callback_result_t; typedef struct ma_AAudioStreamBuilder_t* ma_AAudioStreamBuilder; typedef struct ma_AAudioStream_t* ma_AAudioStream; #define MA_AAUDIO_UNSPECIFIED 0 /* Result codes. miniaudio only cares about the success code. */ #define MA_AAUDIO_OK 0 /* Directions. */ #define MA_AAUDIO_DIRECTION_OUTPUT 0 #define MA_AAUDIO_DIRECTION_INPUT 1 /* Sharing modes. */ #define MA_AAUDIO_SHARING_MODE_EXCLUSIVE 0 #define MA_AAUDIO_SHARING_MODE_SHARED 1 /* Formats. */ #define MA_AAUDIO_FORMAT_PCM_I16 1 #define MA_AAUDIO_FORMAT_PCM_FLOAT 2 /* Stream states. */ #define MA_AAUDIO_STREAM_STATE_UNINITIALIZED 0 #define MA_AAUDIO_STREAM_STATE_UNKNOWN 1 #define MA_AAUDIO_STREAM_STATE_OPEN 2 #define MA_AAUDIO_STREAM_STATE_STARTING 3 #define MA_AAUDIO_STREAM_STATE_STARTED 4 #define MA_AAUDIO_STREAM_STATE_PAUSING 5 #define MA_AAUDIO_STREAM_STATE_PAUSED 6 #define MA_AAUDIO_STREAM_STATE_FLUSHING 7 #define MA_AAUDIO_STREAM_STATE_FLUSHED 8 #define MA_AAUDIO_STREAM_STATE_STOPPING 9 #define MA_AAUDIO_STREAM_STATE_STOPPED 10 #define MA_AAUDIO_STREAM_STATE_CLOSING 11 #define MA_AAUDIO_STREAM_STATE_CLOSED 12 #define MA_AAUDIO_STREAM_STATE_DISCONNECTED 13 /* Performance modes. */ #define MA_AAUDIO_PERFORMANCE_MODE_NONE 10 #define MA_AAUDIO_PERFORMANCE_MODE_POWER_SAVING 11 #define MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY 12 /* Usage types. */ #define MA_AAUDIO_USAGE_MEDIA 1 #define MA_AAUDIO_USAGE_VOICE_COMMUNICATION 2 #define MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING 3 #define MA_AAUDIO_USAGE_ALARM 4 #define MA_AAUDIO_USAGE_NOTIFICATION 5 #define MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE 6 #define MA_AAUDIO_USAGE_NOTIFICATION_EVENT 10 #define MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY 11 #define MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE 12 #define MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION 13 #define MA_AAUDIO_USAGE_GAME 14 #define MA_AAUDIO_USAGE_ASSISTANT 16 #define MA_AAUDIO_SYSTEM_USAGE_EMERGENCY 1000 #define MA_AAUDIO_SYSTEM_USAGE_SAFETY 1001 #define MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS 1002 #define MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT 1003 /* Content types. */ #define MA_AAUDIO_CONTENT_TYPE_SPEECH 1 #define MA_AAUDIO_CONTENT_TYPE_MUSIC 2 #define MA_AAUDIO_CONTENT_TYPE_MOVIE 3 #define MA_AAUDIO_CONTENT_TYPE_SONIFICATION 4 /* Input presets. */ #define MA_AAUDIO_INPUT_PRESET_GENERIC 1 #define MA_AAUDIO_INPUT_PRESET_CAMCORDER 5 #define MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION 6 #define MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION 7 #define MA_AAUDIO_INPUT_PRESET_UNPROCESSED 9 #define MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE 10 /* Allowed Capture Policies */ #define MA_AAUDIO_ALLOW_CAPTURE_BY_ALL 1 #define MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM 2 #define MA_AAUDIO_ALLOW_CAPTURE_BY_NONE 3 /* Callback results. */ #define MA_AAUDIO_CALLBACK_RESULT_CONTINUE 0 #define MA_AAUDIO_CALLBACK_RESULT_STOP 1 typedef ma_aaudio_data_callback_result_t (* ma_AAudioStream_dataCallback) (ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t numFrames); typedef void (* ma_AAudioStream_errorCallback)(ma_AAudioStream *pStream, void *pUserData, ma_aaudio_result_t error); typedef ma_aaudio_result_t (* MA_PFN_AAudio_createStreamBuilder) (ma_AAudioStreamBuilder** ppBuilder); typedef ma_aaudio_result_t (* MA_PFN_AAudioStreamBuilder_delete) (ma_AAudioStreamBuilder* pBuilder); typedef void (* MA_PFN_AAudioStreamBuilder_setDeviceId) (ma_AAudioStreamBuilder* pBuilder, int32_t deviceId); typedef void (* MA_PFN_AAudioStreamBuilder_setDirection) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_direction_t direction); typedef void (* MA_PFN_AAudioStreamBuilder_setSharingMode) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_sharing_mode_t sharingMode); typedef void (* MA_PFN_AAudioStreamBuilder_setFormat) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_format_t format); typedef void (* MA_PFN_AAudioStreamBuilder_setChannelCount) (ma_AAudioStreamBuilder* pBuilder, int32_t channelCount); typedef void (* MA_PFN_AAudioStreamBuilder_setSampleRate) (ma_AAudioStreamBuilder* pBuilder, int32_t sampleRate); typedef void (* MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)(ma_AAudioStreamBuilder* pBuilder, int32_t numFrames); typedef void (* MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback) (ma_AAudioStreamBuilder* pBuilder, int32_t numFrames); typedef void (* MA_PFN_AAudioStreamBuilder_setDataCallback) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_dataCallback callback, void* pUserData); typedef void (* MA_PFN_AAudioStreamBuilder_setErrorCallback) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_errorCallback callback, void* pUserData); typedef void (* MA_PFN_AAudioStreamBuilder_setPerformanceMode) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_performance_mode_t mode); typedef void (* MA_PFN_AAudioStreamBuilder_setUsage) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_usage_t contentType); typedef void (* MA_PFN_AAudioStreamBuilder_setContentType) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_content_type_t contentType); typedef void (* MA_PFN_AAudioStreamBuilder_setInputPreset) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_input_preset_t inputPreset); typedef void (* MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy) (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_allowed_capture_policy_t policy); typedef ma_aaudio_result_t (* MA_PFN_AAudioStreamBuilder_openStream) (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_close) (ma_AAudioStream* pStream); typedef ma_aaudio_stream_state_t (* MA_PFN_AAudioStream_getState) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_waitForStateChange) (ma_AAudioStream* pStream, ma_aaudio_stream_state_t inputState, ma_aaudio_stream_state_t* pNextState, int64_t timeoutInNanoseconds); typedef ma_aaudio_format_t (* MA_PFN_AAudioStream_getFormat) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getChannelCount) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getSampleRate) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getBufferCapacityInFrames) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getFramesPerDataCallback) (ma_AAudioStream* pStream); typedef int32_t (* MA_PFN_AAudioStream_getFramesPerBurst) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_requestStart) (ma_AAudioStream* pStream); typedef ma_aaudio_result_t (* MA_PFN_AAudioStream_requestStop) (ma_AAudioStream* pStream); static ma_result ma_result_from_aaudio(ma_aaudio_result_t resultAA) { switch (resultAA) { case MA_AAUDIO_OK: return MA_SUCCESS; default: break; } return MA_ERROR; } static ma_aaudio_usage_t ma_to_usage__aaudio(ma_aaudio_usage usage) { switch (usage) { case ma_aaudio_usage_media: return MA_AAUDIO_USAGE_MEDIA; case ma_aaudio_usage_voice_communication: return MA_AAUDIO_USAGE_VOICE_COMMUNICATION; case ma_aaudio_usage_voice_communication_signalling: return MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING; case ma_aaudio_usage_alarm: return MA_AAUDIO_USAGE_ALARM; case ma_aaudio_usage_notification: return MA_AAUDIO_USAGE_NOTIFICATION; case ma_aaudio_usage_notification_ringtone: return MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE; case ma_aaudio_usage_notification_event: return MA_AAUDIO_USAGE_NOTIFICATION_EVENT; case ma_aaudio_usage_assistance_accessibility: return MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY; case ma_aaudio_usage_assistance_navigation_guidance: return MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE; case ma_aaudio_usage_assistance_sonification: return MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION; case ma_aaudio_usage_game: return MA_AAUDIO_USAGE_GAME; case ma_aaudio_usage_assitant: return MA_AAUDIO_USAGE_ASSISTANT; case ma_aaudio_usage_emergency: return MA_AAUDIO_SYSTEM_USAGE_EMERGENCY; case ma_aaudio_usage_safety: return MA_AAUDIO_SYSTEM_USAGE_SAFETY; case ma_aaudio_usage_vehicle_status: return MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS; case ma_aaudio_usage_announcement: return MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT; default: break; } return MA_AAUDIO_USAGE_MEDIA; } static ma_aaudio_content_type_t ma_to_content_type__aaudio(ma_aaudio_content_type contentType) { switch (contentType) { case ma_aaudio_content_type_speech: return MA_AAUDIO_CONTENT_TYPE_SPEECH; case ma_aaudio_content_type_music: return MA_AAUDIO_CONTENT_TYPE_MUSIC; case ma_aaudio_content_type_movie: return MA_AAUDIO_CONTENT_TYPE_MOVIE; case ma_aaudio_content_type_sonification: return MA_AAUDIO_CONTENT_TYPE_SONIFICATION; default: break; } return MA_AAUDIO_CONTENT_TYPE_SPEECH; } static ma_aaudio_input_preset_t ma_to_input_preset__aaudio(ma_aaudio_input_preset inputPreset) { switch (inputPreset) { case ma_aaudio_input_preset_generic: return MA_AAUDIO_INPUT_PRESET_GENERIC; case ma_aaudio_input_preset_camcorder: return MA_AAUDIO_INPUT_PRESET_CAMCORDER; case ma_aaudio_input_preset_voice_recognition: return MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION; case ma_aaudio_input_preset_voice_communication: return MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION; case ma_aaudio_input_preset_unprocessed: return MA_AAUDIO_INPUT_PRESET_UNPROCESSED; case ma_aaudio_input_preset_voice_performance: return MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE; default: break; } return MA_AAUDIO_INPUT_PRESET_GENERIC; } static ma_aaudio_allowed_capture_policy_t ma_to_allowed_capture_policy__aaudio(ma_aaudio_allowed_capture_policy allowedCapturePolicy) { switch (allowedCapturePolicy) { case ma_aaudio_allow_capture_by_all: return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL; case ma_aaudio_allow_capture_by_system: return MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM; case ma_aaudio_allow_capture_by_none: return MA_AAUDIO_ALLOW_CAPTURE_BY_NONE; default: break; } return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL; } static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUserData, ma_aaudio_result_t error) { ma_result result; ma_job job; ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); (void)error; ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] ERROR CALLBACK: error=%d, AAudioStream_getState()=%d\n", error, ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream)); /* When we get an error, we'll assume that the stream is in an erroneous state and needs to be restarted. From the documentation, we cannot do this from the error callback. Therefore we are going to use an event thread for the AAudio backend to do this cleanly and safely. */ job = ma_job_init(MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE); job.data.device.aaudio.reroute.pDevice = pDevice; if (pStream == pDevice->aaudio.pStreamCapture) { job.data.device.aaudio.reroute.deviceType = ma_device_type_capture; } else { job.data.device.aaudio.reroute.deviceType = ma_device_type_playback; } result = ma_device_job_thread_post(&pDevice->pContext->aaudio.jobThread, &job); if (result != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Device Disconnected. Failed to post job for rerouting.\n"); return; } } static ma_aaudio_data_callback_result_t ma_stream_data_callback_capture__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); if (frameCount > 0) { ma_device_handle_backend_data_callback(pDevice, NULL, pAudioData, (ma_uint32)frameCount); } (void)pStream; return MA_AAUDIO_CALLBACK_RESULT_CONTINUE; } static ma_aaudio_data_callback_result_t ma_stream_data_callback_playback__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount) { ma_device* pDevice = (ma_device*)pUserData; MA_ASSERT(pDevice != NULL); /* I've had a report that AAudio can sometimes post a frame count of 0. We need to check for that here so we don't get any errors at a deeper level. I'm doing the same with the capture side for safety, though I've not yet had any reports about that one. */ if (frameCount > 0) { ma_device_handle_backend_data_callback(pDevice, pAudioData, NULL, (ma_uint32)frameCount); } (void)pStream; return MA_AAUDIO_CALLBACK_RESULT_CONTINUE; } static ma_result ma_create_and_configure_AAudioStreamBuilder__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, const ma_device_descriptor* pDescriptor, const ma_device_config* pConfig, ma_device* pDevice, ma_AAudioStreamBuilder** ppBuilder) { ma_AAudioStreamBuilder* pBuilder; ma_aaudio_result_t resultAA; /* Safety. */ *ppBuilder = NULL; resultAA = ((MA_PFN_AAudio_createStreamBuilder)pContext->aaudio.AAudio_createStreamBuilder)(&pBuilder); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } if (pDeviceID != NULL) { ((MA_PFN_AAudioStreamBuilder_setDeviceId)pContext->aaudio.AAudioStreamBuilder_setDeviceId)(pBuilder, pDeviceID->aaudio); } ((MA_PFN_AAudioStreamBuilder_setDirection)pContext->aaudio.AAudioStreamBuilder_setDirection)(pBuilder, (deviceType == ma_device_type_playback) ? MA_AAUDIO_DIRECTION_OUTPUT : MA_AAUDIO_DIRECTION_INPUT); ((MA_PFN_AAudioStreamBuilder_setSharingMode)pContext->aaudio.AAudioStreamBuilder_setSharingMode)(pBuilder, (shareMode == ma_share_mode_shared) ? MA_AAUDIO_SHARING_MODE_SHARED : MA_AAUDIO_SHARING_MODE_EXCLUSIVE); /* If we have a device descriptor make sure we configure the stream builder to take our requested parameters. */ if (pDescriptor != NULL) { MA_ASSERT(pConfig != NULL); /* We must have a device config if we also have a descriptor. The config is required for AAudio specific configuration options. */ if (pDescriptor->sampleRate != 0) { ((MA_PFN_AAudioStreamBuilder_setSampleRate)pContext->aaudio.AAudioStreamBuilder_setSampleRate)(pBuilder, pDescriptor->sampleRate); } if (pDescriptor->channels != 0) { ((MA_PFN_AAudioStreamBuilder_setChannelCount)pContext->aaudio.AAudioStreamBuilder_setChannelCount)(pBuilder, pDescriptor->channels); } if (pDescriptor->format != ma_format_unknown) { ((MA_PFN_AAudioStreamBuilder_setFormat)pContext->aaudio.AAudioStreamBuilder_setFormat)(pBuilder, (pDescriptor->format == ma_format_s16) ? MA_AAUDIO_FORMAT_PCM_I16 : MA_AAUDIO_FORMAT_PCM_FLOAT); } /* There have been reports where setting the frames per data callback results in an error. In particular, re-routing may inadvertently switch from low-latency mode, resulting in a less stable stream from the legacy path (AudioStreamLegacy). To address this, we simply don't set the value. It can still be set if it's explicitly requested via the aaudio.allowSetBufferCapacity variable in the device config. */ if ((!pConfig->aaudio.enableCompatibilityWorkarounds || ma_android_sdk_version() > 30) && pConfig->aaudio.allowSetBufferCapacity) { /* AAudio is annoying when it comes to its buffer calculation stuff because it doesn't let you retrieve the actual sample rate until after you've opened the stream. But you need to configure the buffer capacity before you open the stream... :/ To solve, we're just going to assume MA_DEFAULT_SAMPLE_RATE (48000) and move on. */ ma_uint32 bufferCapacityInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, pDescriptor->sampleRate, pConfig->performanceProfile) * pDescriptor->periodCount; ((MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames)(pBuilder, bufferCapacityInFrames); ((MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback)pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback)(pBuilder, bufferCapacityInFrames / pDescriptor->periodCount); } if (deviceType == ma_device_type_capture) { if (pConfig->aaudio.inputPreset != ma_aaudio_input_preset_default && pContext->aaudio.AAudioStreamBuilder_setInputPreset != NULL) { ((MA_PFN_AAudioStreamBuilder_setInputPreset)pContext->aaudio.AAudioStreamBuilder_setInputPreset)(pBuilder, ma_to_input_preset__aaudio(pConfig->aaudio.inputPreset)); } ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_capture__aaudio, (void*)pDevice); } else { if (pConfig->aaudio.usage != ma_aaudio_usage_default && pContext->aaudio.AAudioStreamBuilder_setUsage != NULL) { ((MA_PFN_AAudioStreamBuilder_setUsage)pContext->aaudio.AAudioStreamBuilder_setUsage)(pBuilder, ma_to_usage__aaudio(pConfig->aaudio.usage)); } if (pConfig->aaudio.contentType != ma_aaudio_content_type_default && pContext->aaudio.AAudioStreamBuilder_setContentType != NULL) { ((MA_PFN_AAudioStreamBuilder_setContentType)pContext->aaudio.AAudioStreamBuilder_setContentType)(pBuilder, ma_to_content_type__aaudio(pConfig->aaudio.contentType)); } if (pConfig->aaudio.allowedCapturePolicy != ma_aaudio_allow_capture_default && pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy != NULL) { ((MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy)pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy)(pBuilder, ma_to_allowed_capture_policy__aaudio(pConfig->aaudio.allowedCapturePolicy)); } ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_playback__aaudio, (void*)pDevice); } /* If we set AAUDIO_PERFORMANCE_MODE_LOW_LATENCY, we allow for MMAP (non-legacy path). Since there's a mapping between miniaudio's performance profiles and AAudio's performance modes, let's use it. Beware though, with a conservative performance profile, AAudio will indeed take the legacy path. */ ((MA_PFN_AAudioStreamBuilder_setPerformanceMode)pContext->aaudio.AAudioStreamBuilder_setPerformanceMode)(pBuilder, (pConfig->performanceProfile == ma_performance_profile_low_latency) ? MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY : MA_AAUDIO_PERFORMANCE_MODE_NONE); /* We need to set an error callback to detect device changes. */ if (pDevice != NULL) { /* <-- pDevice should never be null if pDescriptor is not null, which is always the case if we hit this branch. Check anyway for safety. */ ((MA_PFN_AAudioStreamBuilder_setErrorCallback)pContext->aaudio.AAudioStreamBuilder_setErrorCallback)(pBuilder, ma_stream_error_callback__aaudio, (void*)pDevice); } } *ppBuilder = pBuilder; return MA_SUCCESS; } static ma_result ma_open_stream_and_close_builder__aaudio(ma_context* pContext, ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream) { ma_result result; result = ma_result_from_aaudio(((MA_PFN_AAudioStreamBuilder_openStream)pContext->aaudio.AAudioStreamBuilder_openStream)(pBuilder, ppStream)); ((MA_PFN_AAudioStreamBuilder_delete)pContext->aaudio.AAudioStreamBuilder_delete)(pBuilder); return result; } static ma_result ma_open_stream_basic__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, ma_AAudioStream** ppStream) { ma_result result; ma_AAudioStreamBuilder* pBuilder; *ppStream = NULL; result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pContext, pDeviceID, deviceType, shareMode, NULL, NULL, NULL, &pBuilder); if (result != MA_SUCCESS) { return result; } /* Let's give AAudio a hint to avoid the legacy path (AudioStreamLegacy). */ ((MA_PFN_AAudioStreamBuilder_setPerformanceMode)pContext->aaudio.AAudioStreamBuilder_setPerformanceMode)(pBuilder, MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY); return ma_open_stream_and_close_builder__aaudio(pContext, pBuilder, ppStream); } static ma_result ma_open_stream__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, const ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream) { ma_result result; ma_AAudioStreamBuilder* pBuilder; MA_ASSERT(pDevice != NULL); MA_ASSERT(pDescriptor != NULL); MA_ASSERT(deviceType != ma_device_type_duplex); /* This function should not be called for a full-duplex device type. */ *ppStream = NULL; result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pDevice->pContext, pDescriptor->pDeviceID, deviceType, pDescriptor->shareMode, pDescriptor, pConfig, pDevice, &pBuilder); if (result != MA_SUCCESS) { return result; } return ma_open_stream_and_close_builder__aaudio(pDevice->pContext, pBuilder, ppStream); } static ma_result ma_close_stream__aaudio(ma_context* pContext, ma_AAudioStream* pStream) { if (pStream == NULL) { return MA_INVALID_ARGS; } return ma_result_from_aaudio(((MA_PFN_AAudioStream_close)pContext->aaudio.AAudioStream_close)(pStream)); } static ma_bool32 ma_has_default_device__aaudio(ma_context* pContext, ma_device_type deviceType) { /* The only way to know this is to try creating a stream. */ ma_AAudioStream* pStream; ma_result result = ma_open_stream_basic__aaudio(pContext, NULL, deviceType, ma_share_mode_shared, &pStream); if (result != MA_SUCCESS) { return MA_FALSE; } ma_close_stream__aaudio(pContext, pStream); return MA_TRUE; } static ma_result ma_wait_for_simple_state_transition__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_aaudio_stream_state_t oldState, ma_aaudio_stream_state_t newState) { ma_aaudio_stream_state_t actualNewState; ma_aaudio_result_t resultAA = ((MA_PFN_AAudioStream_waitForStateChange)pContext->aaudio.AAudioStream_waitForStateChange)(pStream, oldState, &actualNewState, 5000000000); /* 5 second timeout. */ if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } if (newState != actualNewState) { return MA_ERROR; /* Failed to transition into the expected state. */ } return MA_SUCCESS; } static ma_result ma_context_enumerate_devices__aaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Unfortunately AAudio does not have an enumeration API. Therefore I'm only going to report default devices, but only if it can instantiate a stream. */ /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); if (ma_has_default_device__aaudio(pContext, ma_device_type_playback)) { cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); if (ma_has_default_device__aaudio(pContext, ma_device_type_capture)) { cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } return MA_SUCCESS; } static void ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_format format, ma_uint32 flags, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(pStream != NULL); MA_ASSERT(pDeviceInfo != NULL); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = ((MA_PFN_AAudioStream_getChannelCount)pContext->aaudio.AAudioStream_getChannelCount)(pStream); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pContext->aaudio.AAudioStream_getSampleRate)(pStream); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = flags; pDeviceInfo->nativeDataFormatCount += 1; } static void ma_context_add_native_data_format_from_AAudioStream__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_uint32 flags, ma_device_info* pDeviceInfo) { /* AAudio supports s16 and f32. */ ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_f32, flags, pDeviceInfo); ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_s16, flags, pDeviceInfo); } static ma_result ma_context_get_device_info__aaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_AAudioStream* pStream; ma_result result; MA_ASSERT(pContext != NULL); /* ID */ if (pDeviceID != NULL) { pDeviceInfo->id.aaudio = pDeviceID->aaudio; } else { pDeviceInfo->id.aaudio = MA_AAUDIO_UNSPECIFIED; } /* Name */ if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->nativeDataFormatCount = 0; /* We'll need to open the device to get accurate sample rate and channel count information. */ result = ma_open_stream_basic__aaudio(pContext, pDeviceID, deviceType, ma_share_mode_shared, &pStream); if (result != MA_SUCCESS) { return result; } ma_context_add_native_data_format_from_AAudioStream__aaudio(pContext, pStream, 0, pDeviceInfo); ma_close_stream__aaudio(pContext, pStream); pStream = NULL; return MA_SUCCESS; } static ma_result ma_close_streams__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* When re-routing, streams may have been closed and never re-opened. Hence the extra checks below. */ if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); pDevice->aaudio.pStreamCapture = NULL; } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); pDevice->aaudio.pStreamPlayback = NULL; } return MA_SUCCESS; } static ma_result ma_device_uninit__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* Wait for any rerouting to finish before attempting to close the streams. */ ma_mutex_lock(&pDevice->aaudio.rerouteLock); { ma_close_streams__aaudio(pDevice); } ma_mutex_unlock(&pDevice->aaudio.rerouteLock); /* Destroy re-routing lock. */ ma_mutex_uninit(&pDevice->aaudio.rerouteLock); return MA_SUCCESS; } static ma_result ma_device_init_by_type__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream) { ma_result result; int32_t bufferCapacityInFrames; int32_t framesPerDataCallback; ma_AAudioStream* pStream; MA_ASSERT(pDevice != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDescriptor != NULL); *ppStream = NULL; /* Safety. */ /* First step is to open the stream. From there we'll be able to extract the internal configuration. */ result = ma_open_stream__aaudio(pDevice, pConfig, deviceType, pDescriptor, &pStream); if (result != MA_SUCCESS) { return result; /* Failed to open the AAudio stream. */ } /* Now extract the internal configuration. */ pDescriptor->format = (((MA_PFN_AAudioStream_getFormat)pDevice->pContext->aaudio.AAudioStream_getFormat)(pStream) == MA_AAUDIO_FORMAT_PCM_I16) ? ma_format_s16 : ma_format_f32; pDescriptor->channels = ((MA_PFN_AAudioStream_getChannelCount)pDevice->pContext->aaudio.AAudioStream_getChannelCount)(pStream); pDescriptor->sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pDevice->pContext->aaudio.AAudioStream_getSampleRate)(pStream); /* For the channel map we need to be sure we don't overflow any buffers. */ if (pDescriptor->channels <= MA_MAX_CHANNELS) { ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); /* <-- Cannot find info on channel order, so assuming a default. */ } else { ma_channel_map_init_blank(pDescriptor->channelMap, MA_MAX_CHANNELS); /* Too many channels. Use a blank channel map. */ } bufferCapacityInFrames = ((MA_PFN_AAudioStream_getBufferCapacityInFrames)pDevice->pContext->aaudio.AAudioStream_getBufferCapacityInFrames)(pStream); framesPerDataCallback = ((MA_PFN_AAudioStream_getFramesPerDataCallback)pDevice->pContext->aaudio.AAudioStream_getFramesPerDataCallback)(pStream); if (framesPerDataCallback > 0) { pDescriptor->periodSizeInFrames = framesPerDataCallback; pDescriptor->periodCount = bufferCapacityInFrames / framesPerDataCallback; } else { pDescriptor->periodSizeInFrames = bufferCapacityInFrames; pDescriptor->periodCount = 1; } *ppStream = pStream; return MA_SUCCESS; } static ma_result ma_device_init_streams__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } pDevice->aaudio.usage = pConfig->aaudio.usage; pDevice->aaudio.contentType = pConfig->aaudio.contentType; pDevice->aaudio.inputPreset = pConfig->aaudio.inputPreset; pDevice->aaudio.allowedCapturePolicy = pConfig->aaudio.allowedCapturePolicy; pDevice->aaudio.noAutoStartAfterReroute = pConfig->aaudio.noAutoStartAfterReroute; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_capture, pDescriptorCapture, (ma_AAudioStream**)&pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_playback, pDescriptorPlayback, (ma_AAudioStream**)&pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_init__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { ma_result result; MA_ASSERT(pDevice != NULL); result = ma_device_init_streams__aaudio(pDevice, pConfig, pDescriptorPlayback, pDescriptorCapture); if (result != MA_SUCCESS) { return result; } result = ma_mutex_init(&pDevice->aaudio.rerouteLock); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static ma_result ma_device_start_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream) { ma_aaudio_result_t resultAA; ma_aaudio_stream_state_t currentState; MA_ASSERT(pDevice != NULL); if (pStream == NULL) { return MA_INVALID_ARGS; } resultAA = ((MA_PFN_AAudioStream_requestStart)pDevice->pContext->aaudio.AAudioStream_requestStart)(pStream); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } /* Do we actually need to wait for the device to transition into its started state? */ /* The device should be in either a starting or started state. If it's not set to started we need to wait for it to transition. It should go from starting to started. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState != MA_AAUDIO_STREAM_STATE_STARTED) { ma_result result; if (currentState != MA_AAUDIO_STREAM_STATE_STARTING) { return MA_ERROR; /* Expecting the stream to be a starting or started state. */ } result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STARTED); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_stop_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream) { ma_aaudio_result_t resultAA; ma_aaudio_stream_state_t currentState; MA_ASSERT(pDevice != NULL); if (pStream == NULL) { return MA_INVALID_ARGS; } /* From the AAudio documentation: The stream will stop after all of the data currently buffered has been played. This maps with miniaudio's requirement that device's be drained which means we don't need to implement any draining logic. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState == MA_AAUDIO_STREAM_STATE_DISCONNECTED) { return MA_SUCCESS; /* The device is disconnected. Don't try stopping it. */ } resultAA = ((MA_PFN_AAudioStream_requestStop)pDevice->pContext->aaudio.AAudioStream_requestStop)(pStream); if (resultAA != MA_AAUDIO_OK) { return ma_result_from_aaudio(resultAA); } /* The device should be in either a stopping or stopped state. If it's not set to started we need to wait for it to transition. It should go from stopping to stopped. */ currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream); if (currentState != MA_AAUDIO_STREAM_STATE_STOPPED) { ma_result result; if (currentState != MA_AAUDIO_STREAM_STATE_STOPPING) { return MA_ERROR; /* Expecting the stream to be a stopping or stopped state. */ } result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STOPPED); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_device_start__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { if (pDevice->type == ma_device_type_duplex) { ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); } return result; } } return MA_SUCCESS; } static ma_result ma_device_stop__aaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture); if (result != MA_SUCCESS) { return result; } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback); if (result != MA_SUCCESS) { return result; } } ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type deviceType) { ma_result result; int32_t retries = 0; MA_ASSERT(pDevice != NULL); /* TODO: Stop retrying if main thread is about to uninit device. */ ma_mutex_lock(&pDevice->aaudio.rerouteLock); { error_disconnected: /* The first thing to do is close the streams. */ ma_close_streams__aaudio(pDevice); /* Now we need to reinitialize each streams. The hardest part with this is just filling output the config and descriptors. */ ma_device_config deviceConfig; ma_device_descriptor descriptorPlayback; ma_device_descriptor descriptorCapture; deviceConfig = ma_device_config_init(deviceType); deviceConfig.playback.pDeviceID = NULL; /* Only doing rerouting with default devices. */ deviceConfig.playback.shareMode = pDevice->playback.shareMode; deviceConfig.playback.format = pDevice->playback.format; deviceConfig.playback.channels = pDevice->playback.channels; deviceConfig.capture.pDeviceID = NULL; /* Only doing rerouting with default devices. */ deviceConfig.capture.shareMode = pDevice->capture.shareMode; deviceConfig.capture.format = pDevice->capture.format; deviceConfig.capture.channels = pDevice->capture.channels; deviceConfig.sampleRate = pDevice->sampleRate; deviceConfig.aaudio.usage = pDevice->aaudio.usage; deviceConfig.aaudio.contentType = pDevice->aaudio.contentType; deviceConfig.aaudio.inputPreset = pDevice->aaudio.inputPreset; deviceConfig.aaudio.allowedCapturePolicy = pDevice->aaudio.allowedCapturePolicy; deviceConfig.aaudio.noAutoStartAfterReroute = pDevice->aaudio.noAutoStartAfterReroute; deviceConfig.periods = 1; /* Try to get an accurate period size. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { deviceConfig.periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames; } else { deviceConfig.periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames; } if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { descriptorCapture.pDeviceID = deviceConfig.capture.pDeviceID; descriptorCapture.shareMode = deviceConfig.capture.shareMode; descriptorCapture.format = deviceConfig.capture.format; descriptorCapture.channels = deviceConfig.capture.channels; descriptorCapture.sampleRate = deviceConfig.sampleRate; descriptorCapture.periodSizeInFrames = deviceConfig.periodSizeInFrames; descriptorCapture.periodCount = deviceConfig.periods; } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { descriptorPlayback.pDeviceID = deviceConfig.playback.pDeviceID; descriptorPlayback.shareMode = deviceConfig.playback.shareMode; descriptorPlayback.format = deviceConfig.playback.format; descriptorPlayback.channels = deviceConfig.playback.channels; descriptorPlayback.sampleRate = deviceConfig.sampleRate; descriptorPlayback.periodSizeInFrames = deviceConfig.periodSizeInFrames; descriptorPlayback.periodCount = deviceConfig.periods; } result = ma_device_init_streams__aaudio(pDevice, &deviceConfig, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to create stream after route change."); goto done; } result = ma_device_post_init(pDevice, deviceType, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[AAudio] Failed to initialize device after route change."); ma_close_streams__aaudio(pDevice); goto done; } /* We'll only ever do this in response to a reroute. */ ma_device__on_notification_rerouted(pDevice); /* If the device is started, start the streams. Maybe make this configurable? */ if (ma_device_get_state(pDevice) == ma_device_state_started) { if (pDevice->aaudio.noAutoStartAfterReroute == MA_FALSE) { result = ma_device_start__aaudio(pDevice); if (result != MA_SUCCESS) { /* We got disconnected! Retry a few times, until we find a connected device! */ retries += 1; if (retries <= 3) { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Failed to start stream after route change, retrying(%d)", retries); goto error_disconnected; } ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Failed to start stream after route change."); goto done; } } else { ma_device_stop(pDevice); /* Do a full device stop so we set internal state correctly. */ } } result = MA_SUCCESS; } done: /* Re-routing done */ ma_mutex_unlock(&pDevice->aaudio.rerouteLock); return result; } static ma_result ma_device_get_info__aaudio(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo) { ma_AAudioStream* pStream = NULL; MA_ASSERT(pDevice != NULL); MA_ASSERT(type != ma_device_type_duplex); MA_ASSERT(pDeviceInfo != NULL); if (type == ma_device_type_capture) { pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture; pDeviceInfo->id.aaudio = pDevice->capture.id.aaudio; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ } if (type == ma_device_type_playback) { pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback; pDeviceInfo->id.aaudio = pDevice->playback.id.aaudio; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); /* Only supporting default devices. */ } /* Safety. Should never happen. */ if (pStream == NULL) { return MA_INVALID_OPERATION; } pDeviceInfo->nativeDataFormatCount = 0; ma_context_add_native_data_format_from_AAudioStream__aaudio(pDevice->pContext, pStream, 0, pDeviceInfo); return MA_SUCCESS; } static ma_result ma_context_uninit__aaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_aaudio); ma_device_job_thread_uninit(&pContext->aaudio.jobThread, &pContext->allocationCallbacks); ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio); pContext->aaudio.hAAudio = NULL; return MA_SUCCESS; } static ma_result ma_context_init__aaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { #if !defined(MA_NO_RUNTIME_LINKING) size_t i; const char* libNames[] = { "libaaudio.so" }; for (i = 0; i < ma_countof(libNames); ++i) { pContext->aaudio.hAAudio = ma_dlopen(ma_context_get_log(pContext), libNames[i]); if (pContext->aaudio.hAAudio != NULL) { break; } } if (pContext->aaudio.hAAudio == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->aaudio.AAudio_createStreamBuilder = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudio_createStreamBuilder"); pContext->aaudio.AAudioStreamBuilder_delete = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_delete"); pContext->aaudio.AAudioStreamBuilder_setDeviceId = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDeviceId"); pContext->aaudio.AAudioStreamBuilder_setDirection = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDirection"); pContext->aaudio.AAudioStreamBuilder_setSharingMode = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setSharingMode"); pContext->aaudio.AAudioStreamBuilder_setFormat = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setFormat"); pContext->aaudio.AAudioStreamBuilder_setChannelCount = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setChannelCount"); pContext->aaudio.AAudioStreamBuilder_setSampleRate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setSampleRate"); pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setBufferCapacityInFrames"); pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setFramesPerDataCallback"); pContext->aaudio.AAudioStreamBuilder_setDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setDataCallback"); pContext->aaudio.AAudioStreamBuilder_setErrorCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setErrorCallback"); pContext->aaudio.AAudioStreamBuilder_setPerformanceMode = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setPerformanceMode"); pContext->aaudio.AAudioStreamBuilder_setUsage = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setUsage"); pContext->aaudio.AAudioStreamBuilder_setContentType = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setContentType"); pContext->aaudio.AAudioStreamBuilder_setInputPreset = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setInputPreset"); pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_setAllowedCapturePolicy"); pContext->aaudio.AAudioStreamBuilder_openStream = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStreamBuilder_openStream"); pContext->aaudio.AAudioStream_close = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_close"); pContext->aaudio.AAudioStream_getState = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getState"); pContext->aaudio.AAudioStream_waitForStateChange = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_waitForStateChange"); pContext->aaudio.AAudioStream_getFormat = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFormat"); pContext->aaudio.AAudioStream_getChannelCount = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getChannelCount"); pContext->aaudio.AAudioStream_getSampleRate = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getSampleRate"); pContext->aaudio.AAudioStream_getBufferCapacityInFrames = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getBufferCapacityInFrames"); pContext->aaudio.AAudioStream_getFramesPerDataCallback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFramesPerDataCallback"); pContext->aaudio.AAudioStream_getFramesPerBurst = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_getFramesPerBurst"); pContext->aaudio.AAudioStream_requestStart = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_requestStart"); pContext->aaudio.AAudioStream_requestStop = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, "AAudioStream_requestStop"); #else pContext->aaudio.AAudio_createStreamBuilder = (ma_proc)AAudio_createStreamBuilder; pContext->aaudio.AAudioStreamBuilder_delete = (ma_proc)AAudioStreamBuilder_delete; pContext->aaudio.AAudioStreamBuilder_setDeviceId = (ma_proc)AAudioStreamBuilder_setDeviceId; pContext->aaudio.AAudioStreamBuilder_setDirection = (ma_proc)AAudioStreamBuilder_setDirection; pContext->aaudio.AAudioStreamBuilder_setSharingMode = (ma_proc)AAudioStreamBuilder_setSharingMode; pContext->aaudio.AAudioStreamBuilder_setFormat = (ma_proc)AAudioStreamBuilder_setFormat; pContext->aaudio.AAudioStreamBuilder_setChannelCount = (ma_proc)AAudioStreamBuilder_setChannelCount; pContext->aaudio.AAudioStreamBuilder_setSampleRate = (ma_proc)AAudioStreamBuilder_setSampleRate; pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames = (ma_proc)AAudioStreamBuilder_setBufferCapacityInFrames; pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback = (ma_proc)AAudioStreamBuilder_setFramesPerDataCallback; pContext->aaudio.AAudioStreamBuilder_setDataCallback = (ma_proc)AAudioStreamBuilder_setDataCallback; pContext->aaudio.AAudioStreamBuilder_setErrorCallback = (ma_proc)AAudioStreamBuilder_setErrorCallback; pContext->aaudio.AAudioStreamBuilder_setPerformanceMode = (ma_proc)AAudioStreamBuilder_setPerformanceMode; pContext->aaudio.AAudioStreamBuilder_setUsage = (ma_proc)AAudioStreamBuilder_setUsage; pContext->aaudio.AAudioStreamBuilder_setContentType = (ma_proc)AAudioStreamBuilder_setContentType; pContext->aaudio.AAudioStreamBuilder_setInputPreset = (ma_proc)AAudioStreamBuilder_setInputPreset; #if defined(__ANDROID_API__) && __ANDROID_API__ >= 29 pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy = (ma_proc)AAudioStreamBuilder_setAllowedCapturePolicy; #endif pContext->aaudio.AAudioStreamBuilder_openStream = (ma_proc)AAudioStreamBuilder_openStream; pContext->aaudio.AAudioStream_close = (ma_proc)AAudioStream_close; pContext->aaudio.AAudioStream_getState = (ma_proc)AAudioStream_getState; pContext->aaudio.AAudioStream_waitForStateChange = (ma_proc)AAudioStream_waitForStateChange; pContext->aaudio.AAudioStream_getFormat = (ma_proc)AAudioStream_getFormat; pContext->aaudio.AAudioStream_getChannelCount = (ma_proc)AAudioStream_getChannelCount; pContext->aaudio.AAudioStream_getSampleRate = (ma_proc)AAudioStream_getSampleRate; pContext->aaudio.AAudioStream_getBufferCapacityInFrames = (ma_proc)AAudioStream_getBufferCapacityInFrames; pContext->aaudio.AAudioStream_getFramesPerDataCallback = (ma_proc)AAudioStream_getFramesPerDataCallback; pContext->aaudio.AAudioStream_getFramesPerBurst = (ma_proc)AAudioStream_getFramesPerBurst; pContext->aaudio.AAudioStream_requestStart = (ma_proc)AAudioStream_requestStart; pContext->aaudio.AAudioStream_requestStop = (ma_proc)AAudioStream_requestStop; #endif pCallbacks->onContextInit = ma_context_init__aaudio; pCallbacks->onContextUninit = ma_context_uninit__aaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__aaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__aaudio; pCallbacks->onDeviceInit = ma_device_init__aaudio; pCallbacks->onDeviceUninit = ma_device_uninit__aaudio; pCallbacks->onDeviceStart = ma_device_start__aaudio; pCallbacks->onDeviceStop = ma_device_stop__aaudio; pCallbacks->onDeviceRead = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not used because AAudio is asynchronous. */ pCallbacks->onDeviceGetInfo = ma_device_get_info__aaudio; /* We need a job thread so we can deal with rerouting. */ { ma_result result; ma_device_job_thread_config jobThreadConfig; jobThreadConfig = ma_device_job_thread_config_init(); result = ma_device_job_thread_init(&jobThreadConfig, &pContext->allocationCallbacks, &pContext->aaudio.jobThread); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio); pContext->aaudio.hAAudio = NULL; return result; } } (void)pConfig; return MA_SUCCESS; } static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob) { ma_result result; ma_device* pDevice; MA_ASSERT(pJob != NULL); pDevice = (ma_device*)pJob->data.device.aaudio.reroute.pDevice; MA_ASSERT(pDevice != NULL); /* Here is where we need to reroute the device. To do this we need to uninitialize the stream and reinitialize it. */ result = ma_device_reinit__aaudio(pDevice, (ma_device_type)pJob->data.device.aaudio.reroute.deviceType); if (result != MA_SUCCESS) { /* Getting here means we failed to reroute the device. The best thing I can think of here is to just stop the device. */ ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[AAudio] Stopping device due to reroute failure."); ma_device_stop(pDevice); return result; } return MA_SUCCESS; } #else /* Getting here means there is no AAudio backend so we need a no-op job implementation. */ static ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob) { return ma_job_process__noop(pJob); } #endif /* AAudio */ /****************************************************************************** OpenSL|ES Backend ******************************************************************************/ #ifdef MA_HAS_OPENSL #include #ifdef MA_ANDROID #include #endif typedef SLresult (SLAPIENTRY * ma_slCreateEngine_proc)(SLObjectItf* pEngine, SLuint32 numOptions, SLEngineOption* pEngineOptions, SLuint32 numInterfaces, SLInterfaceID* pInterfaceIds, SLboolean* pInterfaceRequired); /* OpenSL|ES has one-per-application objects :( */ static SLObjectItf g_maEngineObjectSL = NULL; static SLEngineItf g_maEngineSL = NULL; static ma_uint32 g_maOpenSLInitCounter = 0; static ma_spinlock g_maOpenSLSpinlock = 0; /* For init/uninit. */ #define MA_OPENSL_OBJ(p) (*((SLObjectItf)(p))) #define MA_OPENSL_OUTPUTMIX(p) (*((SLOutputMixItf)(p))) #define MA_OPENSL_PLAY(p) (*((SLPlayItf)(p))) #define MA_OPENSL_RECORD(p) (*((SLRecordItf)(p))) #ifdef MA_ANDROID #define MA_OPENSL_BUFFERQUEUE(p) (*((SLAndroidSimpleBufferQueueItf)(p))) #else #define MA_OPENSL_BUFFERQUEUE(p) (*((SLBufferQueueItf)(p))) #endif static ma_result ma_result_from_OpenSL(SLuint32 result) { switch (result) { case SL_RESULT_SUCCESS: return MA_SUCCESS; case SL_RESULT_PRECONDITIONS_VIOLATED: return MA_ERROR; case SL_RESULT_PARAMETER_INVALID: return MA_INVALID_ARGS; case SL_RESULT_MEMORY_FAILURE: return MA_OUT_OF_MEMORY; case SL_RESULT_RESOURCE_ERROR: return MA_INVALID_DATA; case SL_RESULT_RESOURCE_LOST: return MA_ERROR; case SL_RESULT_IO_ERROR: return MA_IO_ERROR; case SL_RESULT_BUFFER_INSUFFICIENT: return MA_NO_SPACE; case SL_RESULT_CONTENT_CORRUPTED: return MA_INVALID_DATA; case SL_RESULT_CONTENT_UNSUPPORTED: return MA_FORMAT_NOT_SUPPORTED; case SL_RESULT_CONTENT_NOT_FOUND: return MA_ERROR; case SL_RESULT_PERMISSION_DENIED: return MA_ACCESS_DENIED; case SL_RESULT_FEATURE_UNSUPPORTED: return MA_NOT_IMPLEMENTED; case SL_RESULT_INTERNAL_ERROR: return MA_ERROR; case SL_RESULT_UNKNOWN_ERROR: return MA_ERROR; case SL_RESULT_OPERATION_ABORTED: return MA_ERROR; case SL_RESULT_CONTROL_LOST: return MA_ERROR; default: return MA_ERROR; } } /* Converts an individual OpenSL-style channel identifier (SL_SPEAKER_FRONT_LEFT, etc.) to miniaudio. */ static ma_uint8 ma_channel_id_to_ma__opensl(SLuint32 id) { switch (id) { case SL_SPEAKER_FRONT_LEFT: return MA_CHANNEL_FRONT_LEFT; case SL_SPEAKER_FRONT_RIGHT: return MA_CHANNEL_FRONT_RIGHT; case SL_SPEAKER_FRONT_CENTER: return MA_CHANNEL_FRONT_CENTER; case SL_SPEAKER_LOW_FREQUENCY: return MA_CHANNEL_LFE; case SL_SPEAKER_BACK_LEFT: return MA_CHANNEL_BACK_LEFT; case SL_SPEAKER_BACK_RIGHT: return MA_CHANNEL_BACK_RIGHT; case SL_SPEAKER_FRONT_LEFT_OF_CENTER: return MA_CHANNEL_FRONT_LEFT_CENTER; case SL_SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER; case SL_SPEAKER_BACK_CENTER: return MA_CHANNEL_BACK_CENTER; case SL_SPEAKER_SIDE_LEFT: return MA_CHANNEL_SIDE_LEFT; case SL_SPEAKER_SIDE_RIGHT: return MA_CHANNEL_SIDE_RIGHT; case SL_SPEAKER_TOP_CENTER: return MA_CHANNEL_TOP_CENTER; case SL_SPEAKER_TOP_FRONT_LEFT: return MA_CHANNEL_TOP_FRONT_LEFT; case SL_SPEAKER_TOP_FRONT_CENTER: return MA_CHANNEL_TOP_FRONT_CENTER; case SL_SPEAKER_TOP_FRONT_RIGHT: return MA_CHANNEL_TOP_FRONT_RIGHT; case SL_SPEAKER_TOP_BACK_LEFT: return MA_CHANNEL_TOP_BACK_LEFT; case SL_SPEAKER_TOP_BACK_CENTER: return MA_CHANNEL_TOP_BACK_CENTER; case SL_SPEAKER_TOP_BACK_RIGHT: return MA_CHANNEL_TOP_BACK_RIGHT; default: return 0; } } /* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to OpenSL-style. */ static SLuint32 ma_channel_id_to_opensl(ma_uint8 id) { switch (id) { case MA_CHANNEL_MONO: return SL_SPEAKER_FRONT_CENTER; case MA_CHANNEL_FRONT_LEFT: return SL_SPEAKER_FRONT_LEFT; case MA_CHANNEL_FRONT_RIGHT: return SL_SPEAKER_FRONT_RIGHT; case MA_CHANNEL_FRONT_CENTER: return SL_SPEAKER_FRONT_CENTER; case MA_CHANNEL_LFE: return SL_SPEAKER_LOW_FREQUENCY; case MA_CHANNEL_BACK_LEFT: return SL_SPEAKER_BACK_LEFT; case MA_CHANNEL_BACK_RIGHT: return SL_SPEAKER_BACK_RIGHT; case MA_CHANNEL_FRONT_LEFT_CENTER: return SL_SPEAKER_FRONT_LEFT_OF_CENTER; case MA_CHANNEL_FRONT_RIGHT_CENTER: return SL_SPEAKER_FRONT_RIGHT_OF_CENTER; case MA_CHANNEL_BACK_CENTER: return SL_SPEAKER_BACK_CENTER; case MA_CHANNEL_SIDE_LEFT: return SL_SPEAKER_SIDE_LEFT; case MA_CHANNEL_SIDE_RIGHT: return SL_SPEAKER_SIDE_RIGHT; case MA_CHANNEL_TOP_CENTER: return SL_SPEAKER_TOP_CENTER; case MA_CHANNEL_TOP_FRONT_LEFT: return SL_SPEAKER_TOP_FRONT_LEFT; case MA_CHANNEL_TOP_FRONT_CENTER: return SL_SPEAKER_TOP_FRONT_CENTER; case MA_CHANNEL_TOP_FRONT_RIGHT: return SL_SPEAKER_TOP_FRONT_RIGHT; case MA_CHANNEL_TOP_BACK_LEFT: return SL_SPEAKER_TOP_BACK_LEFT; case MA_CHANNEL_TOP_BACK_CENTER: return SL_SPEAKER_TOP_BACK_CENTER; case MA_CHANNEL_TOP_BACK_RIGHT: return SL_SPEAKER_TOP_BACK_RIGHT; default: return 0; } } /* Converts a channel mapping to an OpenSL-style channel mask. */ static SLuint32 ma_channel_map_to_channel_mask__opensl(const ma_channel* pChannelMap, ma_uint32 channels) { SLuint32 channelMask = 0; ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { channelMask |= ma_channel_id_to_opensl(pChannelMap[iChannel]); } return channelMask; } /* Converts an OpenSL-style channel mask to a miniaudio channel map. */ static void ma_channel_mask_to_channel_map__opensl(SLuint32 channelMask, ma_uint32 channels, ma_channel* pChannelMap) { if (channels == 1 && channelMask == 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else if (channels == 2 && channelMask == 0) { pChannelMap[0] = MA_CHANNEL_FRONT_LEFT; pChannelMap[1] = MA_CHANNEL_FRONT_RIGHT; } else { if (channels == 1 && (channelMask & SL_SPEAKER_FRONT_CENTER) != 0) { pChannelMap[0] = MA_CHANNEL_MONO; } else { /* Just iterate over each bit. */ ma_uint32 iChannel = 0; ma_uint32 iBit; for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) { SLuint32 bitValue = (channelMask & (1UL << iBit)); if (bitValue != 0) { /* The bit is set. */ pChannelMap[iChannel] = ma_channel_id_to_ma__opensl(bitValue); iChannel += 1; } } } } } static SLuint32 ma_round_to_standard_sample_rate__opensl(SLuint32 samplesPerSec) { if (samplesPerSec <= SL_SAMPLINGRATE_8) { return SL_SAMPLINGRATE_8; } if (samplesPerSec <= SL_SAMPLINGRATE_11_025) { return SL_SAMPLINGRATE_11_025; } if (samplesPerSec <= SL_SAMPLINGRATE_12) { return SL_SAMPLINGRATE_12; } if (samplesPerSec <= SL_SAMPLINGRATE_16) { return SL_SAMPLINGRATE_16; } if (samplesPerSec <= SL_SAMPLINGRATE_22_05) { return SL_SAMPLINGRATE_22_05; } if (samplesPerSec <= SL_SAMPLINGRATE_24) { return SL_SAMPLINGRATE_24; } if (samplesPerSec <= SL_SAMPLINGRATE_32) { return SL_SAMPLINGRATE_32; } if (samplesPerSec <= SL_SAMPLINGRATE_44_1) { return SL_SAMPLINGRATE_44_1; } if (samplesPerSec <= SL_SAMPLINGRATE_48) { return SL_SAMPLINGRATE_48; } /* Android doesn't support more than 48000. */ #ifndef MA_ANDROID if (samplesPerSec <= SL_SAMPLINGRATE_64) { return SL_SAMPLINGRATE_64; } if (samplesPerSec <= SL_SAMPLINGRATE_88_2) { return SL_SAMPLINGRATE_88_2; } if (samplesPerSec <= SL_SAMPLINGRATE_96) { return SL_SAMPLINGRATE_96; } if (samplesPerSec <= SL_SAMPLINGRATE_192) { return SL_SAMPLINGRATE_192; } #endif return SL_SAMPLINGRATE_16; } static SLint32 ma_to_stream_type__opensl(ma_opensl_stream_type streamType) { switch (streamType) { case ma_opensl_stream_type_voice: return SL_ANDROID_STREAM_VOICE; case ma_opensl_stream_type_system: return SL_ANDROID_STREAM_SYSTEM; case ma_opensl_stream_type_ring: return SL_ANDROID_STREAM_RING; case ma_opensl_stream_type_media: return SL_ANDROID_STREAM_MEDIA; case ma_opensl_stream_type_alarm: return SL_ANDROID_STREAM_ALARM; case ma_opensl_stream_type_notification: return SL_ANDROID_STREAM_NOTIFICATION; default: break; } return SL_ANDROID_STREAM_VOICE; } static SLint32 ma_to_recording_preset__opensl(ma_opensl_recording_preset recordingPreset) { switch (recordingPreset) { case ma_opensl_recording_preset_generic: return SL_ANDROID_RECORDING_PRESET_GENERIC; case ma_opensl_recording_preset_camcorder: return SL_ANDROID_RECORDING_PRESET_CAMCORDER; case ma_opensl_recording_preset_voice_recognition: return SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION; case ma_opensl_recording_preset_voice_communication: return SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION; case ma_opensl_recording_preset_voice_unprocessed: return SL_ANDROID_RECORDING_PRESET_UNPROCESSED; default: break; } return SL_ANDROID_RECORDING_PRESET_NONE; } static ma_result ma_context_enumerate_devices__opensl(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to enumerate devices. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } /* TODO: Test Me. This is currently untested, so for now we are just returning default devices. */ #if 0 && !defined(MA_ANDROID) ma_bool32 isTerminated = MA_FALSE; SLuint32 pDeviceIDs[128]; SLint32 deviceCount = sizeof(pDeviceIDs) / sizeof(pDeviceIDs[0]); SLAudioIODeviceCapabilitiesItf deviceCaps; SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps); if (resultSL != SL_RESULT_SUCCESS) { /* The interface may not be supported so just report a default device. */ goto return_default_device; } /* Playback */ if (!isTerminated) { resultSL = (*deviceCaps)->GetAvailableAudioOutputs(deviceCaps, &deviceCount, pDeviceIDs); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = pDeviceIDs[iDevice]; SLAudioOutputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc); if (resultSL == SL_RESULT_SUCCESS) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.pDeviceName, (size_t)-1); ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } } /* Capture */ if (!isTerminated) { resultSL = (*deviceCaps)->GetAvailableAudioInputs(deviceCaps, &deviceCount, pDeviceIDs); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = pDeviceIDs[iDevice]; SLAudioInputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc); if (resultSL == SL_RESULT_SUCCESS) { ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.deviceName, (size_t)-1); ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); if (cbResult == MA_FALSE) { isTerminated = MA_TRUE; break; } } } } return MA_SUCCESS; #else goto return_default_device; #endif return_default_device:; cbResult = MA_TRUE; /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT; ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } return MA_SUCCESS; } static void ma_context_add_data_format_ex__opensl(ma_context* pContext, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceInfo != NULL); pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format = format; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels = channels; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate; pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags = 0; pDeviceInfo->nativeDataFormatCount += 1; } static void ma_context_add_data_format__opensl(ma_context* pContext, ma_format format, ma_device_info* pDeviceInfo) { ma_uint32 minChannels = 1; ma_uint32 maxChannels = 2; ma_uint32 minSampleRate = (ma_uint32)ma_standard_sample_rate_8000; ma_uint32 maxSampleRate = (ma_uint32)ma_standard_sample_rate_48000; ma_uint32 iChannel; ma_uint32 iSampleRate; MA_ASSERT(pContext != NULL); MA_ASSERT(pDeviceInfo != NULL); /* Each sample format can support mono and stereo, and we'll support a small subset of standard rates (up to 48000). A better solution would be to somehow find a native sample rate. */ for (iChannel = minChannels; iChannel < maxChannels; iChannel += 1) { for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) { ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate]; if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) { ma_context_add_data_format_ex__opensl(pContext, format, iChannel, standardSampleRate, pDeviceInfo); } } } } static ma_result ma_context_get_device_info__opensl(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to get device info. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } /* TODO: Test Me. This is currently untested, so for now we are just returning default devices. */ #if 0 && !defined(MA_ANDROID) SLAudioIODeviceCapabilitiesItf deviceCaps; SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps); if (resultSL != SL_RESULT_SUCCESS) { /* The interface may not be supported so just report a default device. */ goto return_default_device; } if (deviceType == ma_device_type_playback) { SLAudioOutputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, pDeviceID->opensl, &desc); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.pDeviceName, (size_t)-1); } else { SLAudioInputDescriptor desc; resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, pDeviceID->opensl, &desc); if (resultSL != SL_RESULT_SUCCESS) { return ma_result_from_OpenSL(resultSL); } ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.deviceName, (size_t)-1); } goto return_detailed_info; #else goto return_default_device; #endif return_default_device: if (pDeviceID != NULL) { if ((deviceType == ma_device_type_playback && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOOUTPUT) || (deviceType == ma_device_type_capture && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOINPUT)) { return MA_NO_DEVICE; /* Don't know the device. */ } } /* ID and Name / Description */ if (deviceType == ma_device_type_playback) { pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT; ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } pDeviceInfo->isDefault = MA_TRUE; goto return_detailed_info; return_detailed_info: /* For now we're just outputting a set of values that are supported by the API but not necessarily supported by the device natively. Later on we should work on this so that it more closely reflects the device's actual native format. */ pDeviceInfo->nativeDataFormatCount = 0; #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 ma_context_add_data_format__opensl(pContext, ma_format_f32, pDeviceInfo); #endif ma_context_add_data_format__opensl(pContext, ma_format_s16, pDeviceInfo); ma_context_add_data_format__opensl(pContext, ma_format_u8, pDeviceInfo); return MA_SUCCESS; } #ifdef MA_ANDROID /*void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, SLuint32 eventFlags, const void* pBuffer, SLuint32 bufferSize, SLuint32 dataUsed, void* pContext)*/ static void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; size_t periodSizeInBytes; ma_uint8* pBuffer; SLresult resultSL; MA_ASSERT(pDevice != NULL); (void)pBufferQueue; /* For now, don't do anything unless the buffer was fully processed. From what I can tell, it looks like OpenSL|ES 1.1 improves on buffer queues to the point that we could much more intelligently handle this, but unfortunately it looks like Android is only supporting OpenSL|ES 1.0.1 for now :( */ /* Don't do anything if the device is not started. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { return; } /* Don't do anything if the device is being drained. */ if (pDevice->opensl.isDrainingCapture) { return; } periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); pBuffer = pDevice->opensl.pBufferCapture + (pDevice->opensl.currentBufferIndexCapture * periodSizeInBytes); ma_device_handle_backend_data_callback(pDevice, NULL, pBuffer, pDevice->capture.internalPeriodSizeInFrames); resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pBuffer, periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { return; } pDevice->opensl.currentBufferIndexCapture = (pDevice->opensl.currentBufferIndexCapture + 1) % pDevice->capture.internalPeriods; } static void ma_buffer_queue_callback_playback__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; size_t periodSizeInBytes; ma_uint8* pBuffer; SLresult resultSL; MA_ASSERT(pDevice != NULL); (void)pBufferQueue; /* Don't do anything if the device is not started. */ if (ma_device_get_state(pDevice) != ma_device_state_started) { return; } /* Don't do anything if the device is being drained. */ if (pDevice->opensl.isDrainingPlayback) { return; } periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); pBuffer = pDevice->opensl.pBufferPlayback + (pDevice->opensl.currentBufferIndexPlayback * periodSizeInBytes); ma_device_handle_backend_data_callback(pDevice, pBuffer, NULL, pDevice->playback.internalPeriodSizeInFrames); resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pBuffer, periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { return; } pDevice->opensl.currentBufferIndexPlayback = (pDevice->opensl.currentBufferIndexPlayback + 1) % pDevice->playback.internalPeriods; } #endif static ma_result ma_device_uninit__opensl(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before uninitializing the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { if (pDevice->opensl.pAudioRecorderObj) { MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioRecorderObj); } ma_free(pDevice->opensl.pBufferCapture, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { if (pDevice->opensl.pAudioPlayerObj) { MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioPlayerObj); } if (pDevice->opensl.pOutputMixObj) { MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Destroy((SLObjectItf)pDevice->opensl.pOutputMixObj); } ma_free(pDevice->opensl.pBufferPlayback, &pDevice->pContext->allocationCallbacks); } return MA_SUCCESS; } #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 typedef SLAndroidDataFormat_PCM_EX ma_SLDataFormat_PCM; #else typedef SLDataFormat_PCM ma_SLDataFormat_PCM; #endif static ma_result ma_SLDataFormat_PCM_init__opensl(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* channelMap, ma_SLDataFormat_PCM* pDataFormat) { /* We need to convert our format/channels/rate so that they aren't set to default. */ if (format == ma_format_unknown) { format = MA_DEFAULT_FORMAT; } if (channels == 0) { channels = MA_DEFAULT_CHANNELS; } if (sampleRate == 0) { sampleRate = MA_DEFAULT_SAMPLE_RATE; } #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 if (format == ma_format_f32) { pDataFormat->formatType = SL_ANDROID_DATAFORMAT_PCM_EX; pDataFormat->representation = SL_ANDROID_PCM_REPRESENTATION_FLOAT; } else { pDataFormat->formatType = SL_DATAFORMAT_PCM; } #else pDataFormat->formatType = SL_DATAFORMAT_PCM; #endif pDataFormat->numChannels = channels; ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = ma_round_to_standard_sample_rate__opensl(sampleRate * 1000); /* In millihertz. Annoyingly, the sample rate variable is named differently between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM */ pDataFormat->bitsPerSample = ma_get_bytes_per_sample(format) * 8; pDataFormat->channelMask = ma_channel_map_to_channel_mask__opensl(channelMap, channels); pDataFormat->endianness = (ma_is_little_endian()) ? SL_BYTEORDER_LITTLEENDIAN : SL_BYTEORDER_BIGENDIAN; /* Android has a few restrictions on the format as documented here: https://developer.android.com/ndk/guides/audio/opensl-for-android.html - Only mono and stereo is supported. - Only u8 and s16 formats are supported. - Maximum sample rate of 48000. */ #ifdef MA_ANDROID if (pDataFormat->numChannels > 2) { pDataFormat->numChannels = 2; } #if __ANDROID_API__ >= 21 if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) { /* It's floating point. */ MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT); if (pDataFormat->bitsPerSample > 32) { pDataFormat->bitsPerSample = 32; } } else { if (pDataFormat->bitsPerSample > 16) { pDataFormat->bitsPerSample = 16; } } #else if (pDataFormat->bitsPerSample > 16) { pDataFormat->bitsPerSample = 16; } #endif if (((SLDataFormat_PCM*)pDataFormat)->samplesPerSec > SL_SAMPLINGRATE_48) { ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = SL_SAMPLINGRATE_48; } #endif pDataFormat->containerSize = pDataFormat->bitsPerSample; /* Always tightly packed for now. */ return MA_SUCCESS; } static ma_result ma_deconstruct_SLDataFormat_PCM__opensl(ma_SLDataFormat_PCM* pDataFormat, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_bool32 isFloatingPoint = MA_FALSE; #if defined(MA_ANDROID) && __ANDROID_API__ >= 21 if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) { MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT); isFloatingPoint = MA_TRUE; } #endif if (isFloatingPoint) { if (pDataFormat->bitsPerSample == 32) { *pFormat = ma_format_f32; } } else { if (pDataFormat->bitsPerSample == 8) { *pFormat = ma_format_u8; } else if (pDataFormat->bitsPerSample == 16) { *pFormat = ma_format_s16; } else if (pDataFormat->bitsPerSample == 24) { *pFormat = ma_format_s24; } else if (pDataFormat->bitsPerSample == 32) { *pFormat = ma_format_s32; } } *pChannels = pDataFormat->numChannels; *pSampleRate = ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec / 1000; ma_channel_mask_to_channel_map__opensl(pDataFormat->channelMask, ma_min(pDataFormat->numChannels, channelMapCap), pChannelMap); return MA_SUCCESS; } static ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { #ifdef MA_ANDROID SLDataLocator_AndroidSimpleBufferQueue queue; SLresult resultSL; size_t bufferSizeInBytes; SLInterfaceID itfIDs[2]; const SLboolean itfIDsRequired[] = { SL_BOOLEAN_TRUE, /* SL_IID_ANDROIDSIMPLEBUFFERQUEUE */ SL_BOOLEAN_FALSE /* SL_IID_ANDROIDCONFIGURATION */ }; #endif MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to initialize a new device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* For now, only supporting Android implementations of OpenSL|ES since that's the only one I've been able to test with and I currently depend on Android-specific extensions (simple buffer queues). */ #ifdef MA_ANDROID itfIDs[0] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE; itfIDs[1] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION; /* No exclusive mode with OpenSL|ES. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* Now we can start initializing the device properly. */ MA_ASSERT(pDevice != NULL); MA_ZERO_OBJECT(&pDevice->opensl); queue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { ma_SLDataFormat_PCM pcm; SLDataLocator_IODevice locatorDevice; SLDataSource source; SLDataSink sink; SLAndroidConfigurationItf pRecorderConfig; ma_SLDataFormat_PCM_init__opensl(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &pcm); locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE; locatorDevice.deviceType = SL_IODEVICE_AUDIOINPUT; locatorDevice.deviceID = SL_DEFAULTDEVICEID_AUDIOINPUT; /* Must always use the default device with Android. */ locatorDevice.device = NULL; source.pLocator = &locatorDevice; source.pFormat = NULL; queue.numBuffers = pDescriptorCapture->periodCount; sink.pLocator = &queue; sink.pFormat = (SLDataFormat_PCM*)&pcm; resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) { /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 1; ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16; /* The name of the sample rate variable is different between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM. */ pcm.bitsPerSample = 16; pcm.containerSize = pcm.bitsPerSample; /* Always tightly packed for now. */ pcm.channelMask = 0; resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); } if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create audio recorder."); return ma_result_from_OpenSL(resultSL); } /* Set the recording preset before realizing the player. */ if (pConfig->opensl.recordingPreset != ma_opensl_recording_preset_default) { resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pRecorderConfig); if (resultSL == SL_RESULT_SUCCESS) { SLint32 recordingPreset = ma_to_recording_preset__opensl(pConfig->opensl.recordingPreset); resultSL = (*pRecorderConfig)->SetConfiguration(pRecorderConfig, SL_ANDROID_KEY_RECORDING_PRESET, &recordingPreset, sizeof(SLint32)); if (resultSL != SL_RESULT_SUCCESS) { /* Failed to set the configuration. Just keep going. */ } } } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Realize((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize audio recorder."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_RECORD, &pDevice->opensl.pAudioRecorder); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_RECORD interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueueCapture); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, ma_buffer_queue_callback_capture__opensl_android, pDevice); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to register buffer queue callback."); return ma_result_from_OpenSL(resultSL); } /* The internal format is determined by the "pcm" object. */ ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorCapture->format, &pDescriptorCapture->channels, &pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap)); /* Buffer. */ pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile); pDevice->opensl.currentBufferIndexCapture = 0; bufferSizeInBytes = pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * pDescriptorCapture->periodCount; pDevice->opensl.pBufferCapture = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pDevice->opensl.pBufferCapture == NULL) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to allocate memory for data buffer."); return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pDevice->opensl.pBufferCapture, bufferSizeInBytes); } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_SLDataFormat_PCM pcm; SLDataSource source; SLDataLocator_OutputMix outmixLocator; SLDataSink sink; SLAndroidConfigurationItf pPlayerConfig; ma_SLDataFormat_PCM_init__opensl(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &pcm); resultSL = (*g_maEngineSL)->CreateOutputMix(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pOutputMixObj, 0, NULL, NULL); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create output mix."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Realize((SLObjectItf)pDevice->opensl.pOutputMixObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize output mix object."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->GetInterface((SLObjectItf)pDevice->opensl.pOutputMixObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_OUTPUTMIX, &pDevice->opensl.pOutputMix); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_OUTPUTMIX interface."); return ma_result_from_OpenSL(resultSL); } /* Set the output device. */ if (pDescriptorPlayback->pDeviceID != NULL) { SLuint32 deviceID_OpenSL = pDescriptorPlayback->pDeviceID->opensl; MA_OPENSL_OUTPUTMIX(pDevice->opensl.pOutputMix)->ReRoute((SLOutputMixItf)pDevice->opensl.pOutputMix, 1, &deviceID_OpenSL); } queue.numBuffers = pDescriptorPlayback->periodCount; source.pLocator = &queue; source.pFormat = (SLDataFormat_PCM*)&pcm; outmixLocator.locatorType = SL_DATALOCATOR_OUTPUTMIX; outmixLocator.outputMix = (SLObjectItf)pDevice->opensl.pOutputMixObj; sink.pLocator = &outmixLocator; sink.pFormat = NULL; resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) { /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 2; ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16; pcm.bitsPerSample = 16; pcm.containerSize = pcm.bitsPerSample; /* Always tightly packed for now. */ pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT; resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired); } if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to create audio player."); return ma_result_from_OpenSL(resultSL); } /* Set the stream type before realizing the player. */ if (pConfig->opensl.streamType != ma_opensl_stream_type_default) { resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pPlayerConfig); if (resultSL == SL_RESULT_SUCCESS) { SLint32 streamType = ma_to_stream_type__opensl(pConfig->opensl.streamType); resultSL = (*pPlayerConfig)->SetConfiguration(pPlayerConfig, SL_ANDROID_KEY_STREAM_TYPE, &streamType, sizeof(SLint32)); if (resultSL != SL_RESULT_SUCCESS) { /* Failed to set the configuration. Just keep going. */ } } } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Realize((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_BOOLEAN_FALSE); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to realize audio player."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_PLAY, &pDevice->opensl.pAudioPlayer); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_PLAY interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueuePlayback); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface."); return ma_result_from_OpenSL(resultSL); } resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, ma_buffer_queue_callback_playback__opensl_android, pDevice); if (resultSL != SL_RESULT_SUCCESS) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to register buffer queue callback."); return ma_result_from_OpenSL(resultSL); } /* The internal format is determined by the "pcm" object. */ ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorPlayback->format, &pDescriptorPlayback->channels, &pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap)); /* Buffer. */ pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile); pDevice->opensl.currentBufferIndexPlayback = 0; bufferSizeInBytes = pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) * pDescriptorPlayback->periodCount; pDevice->opensl.pBufferPlayback = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pDevice->opensl.pBufferPlayback == NULL) { ma_device_uninit__opensl(pDevice); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to allocate memory for data buffer."); return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, bufferSizeInBytes); } return MA_SUCCESS; #else return MA_NO_BACKEND; /* Non-Android implementations are not supported. */ #endif } static ma_result ma_device_start__opensl(ma_device* pDevice) { SLresult resultSL; size_t periodSizeInBytes; ma_uint32 iPeriod; MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to start the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_RECORDING); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to start internal capture device."); return ma_result_from_OpenSL(resultSL); } periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels); for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) { resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pDevice->opensl.pBufferCapture + (periodSizeInBytes * iPeriod), periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to enqueue buffer for capture device."); return ma_result_from_OpenSL(resultSL); } } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_PLAYING); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to start internal playback device."); return ma_result_from_OpenSL(resultSL); } /* In playback mode (no duplex) we need to load some initial buffers. In duplex mode we need to enqueue silent buffers. */ if (pDevice->type == ma_device_type_duplex) { MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels)); } else { ma_device__read_frames_from_client(pDevice, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods, pDevice->opensl.pBufferPlayback); } periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels); for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; ++iPeriod) { resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pDevice->opensl.pBufferPlayback + (periodSizeInBytes * iPeriod), periodSizeInBytes); if (resultSL != SL_RESULT_SUCCESS) { MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED); ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to enqueue buffer for playback device."); return ma_result_from_OpenSL(resultSL); } } } return MA_SUCCESS; } static ma_result ma_device_drain__opensl(ma_device* pDevice, ma_device_type deviceType) { SLAndroidSimpleBufferQueueItf pBufferQueue; MA_ASSERT(deviceType == ma_device_type_capture || deviceType == ma_device_type_playback); if (pDevice->type == ma_device_type_capture) { pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture; pDevice->opensl.isDrainingCapture = MA_TRUE; } else { pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback; pDevice->opensl.isDrainingPlayback = MA_TRUE; } for (;;) { SLAndroidSimpleBufferQueueState state; MA_OPENSL_BUFFERQUEUE(pBufferQueue)->GetState(pBufferQueue, &state); if (state.count == 0) { break; } ma_sleep(10); } if (pDevice->type == ma_device_type_capture) { pDevice->opensl.isDrainingCapture = MA_FALSE; } else { pDevice->opensl.isDrainingPlayback = MA_FALSE; } return MA_SUCCESS; } static ma_result ma_device_stop__opensl(ma_device* pDevice) { SLresult resultSL; MA_ASSERT(pDevice != NULL); MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before stopping/uninitializing the device. */ if (g_maOpenSLInitCounter == 0) { return MA_INVALID_OPERATION; } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) { ma_device_drain__opensl(pDevice, ma_device_type_capture); resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal capture device."); return ma_result_from_OpenSL(resultSL); } MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_device_drain__opensl(pDevice, ma_device_type_playback); resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED); if (resultSL != SL_RESULT_SUCCESS) { ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal playback device."); return ma_result_from_OpenSL(resultSL); } MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback); } /* Make sure the client is aware that the device has stopped. There may be an OpenSL|ES callback for this, but I haven't found it. */ ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__opensl(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_opensl); (void)pContext; /* Uninit global data. */ ma_spinlock_lock(&g_maOpenSLSpinlock); { MA_ASSERT(g_maOpenSLInitCounter > 0); /* If you've triggered this, it means you have ma_context_init/uninit mismatch. Each successful call to ma_context_init() must be matched up with a call to ma_context_uninit(). */ g_maOpenSLInitCounter -= 1; if (g_maOpenSLInitCounter == 0) { (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL); } } ma_spinlock_unlock(&g_maOpenSLSpinlock); return MA_SUCCESS; } static ma_result ma_dlsym_SLInterfaceID__opensl(ma_context* pContext, const char* pName, ma_handle* pHandle) { /* We need to return an error if the symbol cannot be found. This is important because there have been reports that some symbols do not exist. */ ma_handle* p = (ma_handle*)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, pName); if (p == NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Cannot find symbol %s", pName); return MA_NO_BACKEND; } *pHandle = *p; return MA_SUCCESS; } static ma_result ma_context_init_engine_nolock__opensl(ma_context* pContext) { g_maOpenSLInitCounter += 1; if (g_maOpenSLInitCounter == 1) { SLresult resultSL; resultSL = ((ma_slCreateEngine_proc)pContext->opensl.slCreateEngine)(&g_maEngineObjectSL, 0, NULL, 0, NULL, NULL); if (resultSL != SL_RESULT_SUCCESS) { g_maOpenSLInitCounter -= 1; return ma_result_from_OpenSL(resultSL); } (*g_maEngineObjectSL)->Realize(g_maEngineObjectSL, SL_BOOLEAN_FALSE); resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_ENGINE, &g_maEngineSL); if (resultSL != SL_RESULT_SUCCESS) { (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL); g_maOpenSLInitCounter -= 1; return ma_result_from_OpenSL(resultSL); } } return MA_SUCCESS; } static ma_result ma_context_init__opensl(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { ma_result result; #if !defined(MA_NO_RUNTIME_LINKING) size_t i; const char* libOpenSLESNames[] = { "libOpenSLES.so" }; #endif MA_ASSERT(pContext != NULL); (void)pConfig; #if !defined(MA_NO_RUNTIME_LINKING) /* Dynamically link against libOpenSLES.so. I have now had multiple reports that SL_IID_ANDROIDSIMPLEBUFFERQUEUE cannot be found. One report was happening at compile time and another at runtime. To try working around this, I'm going to link to libOpenSLES at runtime and extract the symbols rather than reference them directly. This should, hopefully, fix these issues as the compiler won't see any references to the symbols and will hopefully skip the checks. */ for (i = 0; i < ma_countof(libOpenSLESNames); i += 1) { pContext->opensl.libOpenSLES = ma_dlopen(ma_context_get_log(pContext), libOpenSLESNames[i]); if (pContext->opensl.libOpenSLES != NULL) { break; } } if (pContext->opensl.libOpenSLES == NULL) { ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Could not find libOpenSLES.so"); return MA_NO_BACKEND; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ENGINE", &pContext->opensl.SL_IID_ENGINE); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_AUDIOIODEVICECAPABILITIES", &pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ANDROIDSIMPLEBUFFERQUEUE", &pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_RECORD", &pContext->opensl.SL_IID_RECORD); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_PLAY", &pContext->opensl.SL_IID_PLAY); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_OUTPUTMIX", &pContext->opensl.SL_IID_OUTPUTMIX); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } result = ma_dlsym_SLInterfaceID__opensl(pContext, "SL_IID_ANDROIDCONFIGURATION", &pContext->opensl.SL_IID_ANDROIDCONFIGURATION); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); return result; } pContext->opensl.slCreateEngine = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, "slCreateEngine"); if (pContext->opensl.slCreateEngine == NULL) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Cannot find symbol slCreateEngine."); return MA_NO_BACKEND; } #else pContext->opensl.SL_IID_ENGINE = (ma_handle)SL_IID_ENGINE; pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES = (ma_handle)SL_IID_AUDIOIODEVICECAPABILITIES; pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE = (ma_handle)SL_IID_ANDROIDSIMPLEBUFFERQUEUE; pContext->opensl.SL_IID_RECORD = (ma_handle)SL_IID_RECORD; pContext->opensl.SL_IID_PLAY = (ma_handle)SL_IID_PLAY; pContext->opensl.SL_IID_OUTPUTMIX = (ma_handle)SL_IID_OUTPUTMIX; pContext->opensl.SL_IID_ANDROIDCONFIGURATION = (ma_handle)SL_IID_ANDROIDCONFIGURATION; pContext->opensl.slCreateEngine = (ma_proc)slCreateEngine; #endif /* Initialize global data first if applicable. */ ma_spinlock_lock(&g_maOpenSLSpinlock); { result = ma_context_init_engine_nolock__opensl(pContext); } ma_spinlock_unlock(&g_maOpenSLSpinlock); if (result != MA_SUCCESS) { ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES); ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, "[OpenSL] Failed to initialize OpenSL engine."); return result; } pCallbacks->onContextInit = ma_context_init__opensl; pCallbacks->onContextUninit = ma_context_uninit__opensl; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__opensl; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__opensl; pCallbacks->onDeviceInit = ma_device_init__opensl; pCallbacks->onDeviceUninit = ma_device_uninit__opensl; pCallbacks->onDeviceStart = ma_device_start__opensl; pCallbacks->onDeviceStop = ma_device_stop__opensl; pCallbacks->onDeviceRead = NULL; /* Not needed because OpenSL|ES is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not needed because OpenSL|ES is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not needed because OpenSL|ES is asynchronous. */ return MA_SUCCESS; } #endif /* OpenSL|ES */ /****************************************************************************** Web Audio Backend ******************************************************************************/ #ifdef MA_HAS_WEBAUDIO #include #if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 32))) #include #define MA_SUPPORT_AUDIO_WORKLETS #if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 70))) #define MA_SUPPORT_AUDIO_WORKLETS_VARIABLE_BUFFER_SIZE #endif #endif /* TODO: Version 0.12: Swap this logic around so that AudioWorklets are used by default. Add MA_NO_AUDIO_WORKLETS. */ #if defined(MA_ENABLE_AUDIO_WORKLETS) && defined(MA_SUPPORT_AUDIO_WORKLETS) #define MA_USE_AUDIO_WORKLETS #endif /* The thread stack size must be a multiple of 16. */ #ifndef MA_AUDIO_WORKLETS_THREAD_STACK_SIZE #define MA_AUDIO_WORKLETS_THREAD_STACK_SIZE 131072 #endif #if defined(MA_USE_AUDIO_WORKLETS) #define MA_WEBAUDIO_LATENCY_HINT_BALANCED "balanced" #define MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE "interactive" #define MA_WEBAUDIO_LATENCY_HINT_PLAYBACK "playback" #endif static ma_bool32 ma_is_capture_supported__webaudio() { return EM_ASM_INT({ return (navigator.mediaDevices !== undefined && navigator.mediaDevices.getUserMedia !== undefined); }, 0) != 0; /* Must pass in a dummy argument for C99 compatibility. */ } #ifdef __cplusplus extern "C" { #endif void* EMSCRIPTEN_KEEPALIVE ma_malloc_emscripten(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_malloc(sz, pAllocationCallbacks); } void EMSCRIPTEN_KEEPALIVE ma_free_emscripten(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { ma_free(p, pAllocationCallbacks); } void EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_capture__webaudio(ma_device* pDevice, int frameCount, float* pFrames) { ma_device_handle_backend_data_callback(pDevice, NULL, pFrames, (ma_uint32)frameCount); } void EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_playback__webaudio(ma_device* pDevice, int frameCount, float* pFrames) { ma_device_handle_backend_data_callback(pDevice, pFrames, NULL, (ma_uint32)frameCount); } #ifdef __cplusplus } #endif static ma_result ma_context_enumerate_devices__webaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_bool32 cbResult = MA_TRUE; MA_ASSERT(pContext != NULL); MA_ASSERT(callback != NULL); /* Only supporting default devices for now. */ /* Playback. */ if (cbResult) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only supporting default devices. */ cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData); } /* Capture. */ if (cbResult) { if (ma_is_capture_supported__webaudio()) { ma_device_info deviceInfo; MA_ZERO_OBJECT(&deviceInfo); ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); deviceInfo.isDefault = MA_TRUE; /* Only supporting default devices. */ cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData); } } return MA_SUCCESS; } static ma_result ma_context_get_device_info__webaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { MA_ASSERT(pContext != NULL); if (deviceType == ma_device_type_capture && !ma_is_capture_supported__webaudio()) { return MA_NO_DEVICE; } MA_ZERO_MEMORY(pDeviceInfo->id.webaudio, sizeof(pDeviceInfo->id.webaudio)); /* Only supporting default devices for now. */ (void)pDeviceID; if (deviceType == ma_device_type_playback) { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } /* Only supporting default devices. */ pDeviceInfo->isDefault = MA_TRUE; /* Web Audio can support any number of channels and sample rates. It only supports f32 formats, however. */ pDeviceInfo->nativeDataFormats[0].flags = 0; pDeviceInfo->nativeDataFormats[0].format = ma_format_unknown; pDeviceInfo->nativeDataFormats[0].channels = 0; /* All channels are supported. */ pDeviceInfo->nativeDataFormats[0].sampleRate = EM_ASM_INT({ try { var temp = new (window.AudioContext || window.webkitAudioContext)(); var sampleRate = temp.sampleRate; temp.close(); return sampleRate; } catch(e) { return 0; } }, 0); /* Must pass in a dummy argument for C99 compatibility. */ if (pDeviceInfo->nativeDataFormats[0].sampleRate == 0) { return MA_NO_DEVICE; } pDeviceInfo->nativeDataFormatCount = 1; return MA_SUCCESS; } static ma_result ma_device_uninit__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); #if defined(MA_USE_AUDIO_WORKLETS) { EM_ASM({ var device = window.miniaudio.get_device_by_index($0); if (device.streamNode !== undefined) { device.streamNode.disconnect(); device.streamNode = undefined; } device.pDevice = undefined; }, pDevice->webaudio.deviceIndex); emscripten_destroy_web_audio_node(pDevice->webaudio.audioWorklet); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); ma_free(pDevice->webaudio.pStackBuffer, &pDevice->pContext->allocationCallbacks); } #else { EM_ASM({ var device = window.miniaudio.get_device_by_index($0); /* Make sure all nodes are disconnected and marked for collection. */ if (device.scriptNode !== undefined) { device.scriptNode.onaudioprocess = function(e) {}; /* We want to reset the callback to ensure it doesn't get called after AudioContext.close() has returned. Shouldn't happen since we're disconnecting, but just to be safe... */ device.scriptNode.disconnect(); device.scriptNode = undefined; } if (device.streamNode !== undefined) { device.streamNode.disconnect(); device.streamNode = undefined; } /* Stop the device. I think there is a chance the callback could get fired after calling this, hence why we want to clear the callback before closing. */ device.webaudio.close(); device.webaudio = undefined; device.pDevice = undefined; }, pDevice->webaudio.deviceIndex); } #endif /* Clean up the device on the JS side. */ EM_ASM({ window.miniaudio.untrack_device_by_index($0); }, pDevice->webaudio.deviceIndex); ma_free(pDevice->webaudio.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); return MA_SUCCESS; } #if !defined(MA_USE_AUDIO_WORKLETS) static ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__webaudio(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { /* There have been reports of the default buffer size being too small on some browsers. If we're using the default buffer size, we'll make sure the period size is bigger than our standard defaults. */ ma_uint32 periodSizeInFrames; if (nativeSampleRate == 0) { nativeSampleRate = MA_DEFAULT_SAMPLE_RATE; } if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(33, nativeSampleRate); /* 1 frame @ 30 FPS */ } else { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(333, nativeSampleRate); } } else { periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { periodSizeInFrames = pDescriptor->periodSizeInFrames; } /* The size of the buffer must be a power of 2 and between 256 and 16384. */ if (periodSizeInFrames < 256) { periodSizeInFrames = 256; } else if (periodSizeInFrames > 16384) { periodSizeInFrames = 16384; } else { periodSizeInFrames = ma_next_power_of_2(periodSizeInFrames); } return periodSizeInFrames; } #endif #if defined(MA_USE_AUDIO_WORKLETS) typedef struct { ma_device* pDevice; const ma_device_config* pConfig; ma_device_descriptor* pDescriptorPlayback; ma_device_descriptor* pDescriptorCapture; } ma_audio_worklet_thread_initialized_data; static EM_BOOL ma_audio_worklet_process_callback__webaudio(int inputCount, const AudioSampleFrame* pInputs, int outputCount, AudioSampleFrame* pOutputs, int paramCount, const AudioParamFrame* pParams, void* pUserData) { ma_device* pDevice = (ma_device*)pUserData; ma_uint32 frameCount; (void)paramCount; (void)pParams; /* The Emscripten documentation says that it'll always be 128 frames being passed in. Hard coding it like that feels like a very bad idea to me. Even if it's hard coded in the backend, the API and documentation should always refer to variables instead of a hard coded number. In any case, will follow along for the time being. Unfortunately the audio data is not interleaved so we'll need to convert it before we give the data to miniaudio for further processing. */ if (pDevice->type == ma_device_type_playback) { frameCount = pDevice->playback.internalPeriodSizeInFrames; } else { frameCount = pDevice->capture.internalPeriodSizeInFrames; } if (ma_device_get_state(pDevice) != ma_device_state_started) { /* Fill the output buffer with zero to avoid a noise sound */ for (int i = 0; i < outputCount; i += 1) { MA_ZERO_MEMORY(pOutputs[i].data, pOutputs[i].numberOfChannels * frameCount * sizeof(float)); } return EM_TRUE; } if (inputCount > 0) { /* Input data needs to be interleaved before we hand it to the client. */ for (ma_uint32 iChannel = 0; iChannel < pDevice->capture.internalChannels; iChannel += 1) { for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) { pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->capture.internalChannels + iChannel] = pInputs[0].data[frameCount*iChannel + iFrame]; } } ma_device_process_pcm_frames_capture__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer); } if (outputCount > 0) { /* If it's a capture-only device, we'll need to output silence. */ if (pDevice->type == ma_device_type_capture) { MA_ZERO_MEMORY(pOutputs[0].data, frameCount * pDevice->playback.internalChannels * sizeof(float)); } else { ma_device_process_pcm_frames_playback__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer); /* We've read the data from the client. Now we need to deinterleave the buffer and output to the output buffer. */ for (ma_uint32 iChannel = 0; iChannel < pDevice->playback.internalChannels; iChannel += 1) { for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) { pOutputs[0].data[frameCount*iChannel + iFrame] = pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->playback.internalChannels + iChannel]; } } } } return EM_TRUE; } static void ma_audio_worklet_processor_created__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData) { ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData; EmscriptenAudioWorkletNodeCreateOptions audioWorkletOptions; int channels = 0; size_t intermediaryBufferSizeInFrames; int sampleRate; if (success == EM_FALSE) { pParameters->pDevice->webaudio.initResult = MA_ERROR; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } /* The next step is to initialize the audio worklet node. */ MA_ZERO_OBJECT(&audioWorkletOptions); /* The way channel counts work with Web Audio is confusing. As far as I can tell, there's no way to know the channel count from MediaStreamAudioSourceNode (what we use for capture)? The only way to have control is to configure an output channel count on the capture side. This is slightly confusing for capture mode because intuitively you wouldn't actually connect an output to an input-only node, but this is what we'll have to do in order to have proper control over the channel count. In the capture case, we'll have to output silence to its output node. */ if (pParameters->pConfig->deviceType == ma_device_type_capture) { channels = (int)((pParameters->pDescriptorCapture->channels > 0) ? pParameters->pDescriptorCapture->channels : MA_DEFAULT_CHANNELS); audioWorkletOptions.numberOfInputs = 1; } else { channels = (int)((pParameters->pDescriptorPlayback->channels > 0) ? pParameters->pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS); if (pParameters->pConfig->deviceType == ma_device_type_duplex) { audioWorkletOptions.numberOfInputs = 1; } else { audioWorkletOptions.numberOfInputs = 0; } } audioWorkletOptions.numberOfOutputs = 1; audioWorkletOptions.outputChannelCounts = &channels; /* Now that we know the channel count to use we can allocate the intermediary buffer. The intermediary buffer is used for interleaving and deinterleaving. */ #if defined(MA_SUPPORT_AUDIO_WORKLETS_VARIABLE_BUFFER_SIZE) { intermediaryBufferSizeInFrames = (size_t)emscripten_audio_context_quantum_size(audioContext); } #else { intermediaryBufferSizeInFrames = 128; } #endif pParameters->pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(intermediaryBufferSizeInFrames * (ma_uint32)channels * sizeof(float), &pParameters->pDevice->pContext->allocationCallbacks); if (pParameters->pDevice->webaudio.pIntermediaryBuffer == NULL) { pParameters->pDevice->webaudio.initResult = MA_OUT_OF_MEMORY; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } pParameters->pDevice->webaudio.audioWorklet = emscripten_create_wasm_audio_worklet_node(audioContext, "miniaudio", &audioWorkletOptions, &ma_audio_worklet_process_callback__webaudio, pParameters->pDevice); /* With the audio worklet initialized we can now attach it to the graph. */ if (pParameters->pConfig->deviceType == ma_device_type_capture || pParameters->pConfig->deviceType == ma_device_type_duplex) { ma_result attachmentResult = (ma_result)EM_ASM_INT({ var getUserMediaResult = 0; var audioWorklet = emscriptenGetAudioObject($0); var audioContext = emscriptenGetAudioObject($1); navigator.mediaDevices.getUserMedia({audio:true, video:false}) .then(function(stream) { audioContext.streamNode = audioContext.createMediaStreamSource(stream); audioContext.streamNode.connect(audioWorklet); audioWorklet.connect(audioContext.destination); getUserMediaResult = 0; /* 0 = MA_SUCCESS */ }) .catch(function(error) { console.log("navigator.mediaDevices.getUserMedia Failed: " + error); getUserMediaResult = -1; /* -1 = MA_ERROR */ }); return getUserMediaResult; }, pParameters->pDevice->webaudio.audioWorklet, audioContext); if (attachmentResult != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, "Web Audio: Failed to connect capture node."); emscripten_destroy_web_audio_node(pParameters->pDevice->webaudio.audioWorklet); pParameters->pDevice->webaudio.initResult = attachmentResult; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } } /* If it's playback only we can now attach the worklet node to the graph. This has already been done for the duplex case. */ if (pParameters->pConfig->deviceType == ma_device_type_playback) { ma_result attachmentResult = (ma_result)EM_ASM_INT({ var audioWorklet = emscriptenGetAudioObject($0); var audioContext = emscriptenGetAudioObject($1); audioWorklet.connect(audioContext.destination); return 0; /* 0 = MA_SUCCESS */ }, pParameters->pDevice->webaudio.audioWorklet, audioContext); if (attachmentResult != MA_SUCCESS) { ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, "Web Audio: Failed to connect playback node."); pParameters->pDevice->webaudio.initResult = attachmentResult; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); return; } } /* We need to update the descriptors so that they reflect the internal data format. Both capture and playback should be the same. */ sampleRate = EM_ASM_INT({ return emscriptenGetAudioObject($0).sampleRate; }, audioContext); if (pParameters->pDescriptorCapture != NULL) { pParameters->pDescriptorCapture->format = ma_format_f32; pParameters->pDescriptorCapture->channels = (ma_uint32)channels; pParameters->pDescriptorCapture->sampleRate = (ma_uint32)sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorCapture->channelMap, ma_countof(pParameters->pDescriptorCapture->channelMap), pParameters->pDescriptorCapture->channels); pParameters->pDescriptorCapture->periodSizeInFrames = intermediaryBufferSizeInFrames; pParameters->pDescriptorCapture->periodCount = 1; } if (pParameters->pDescriptorPlayback != NULL) { pParameters->pDescriptorPlayback->format = ma_format_f32; pParameters->pDescriptorPlayback->channels = (ma_uint32)channels; pParameters->pDescriptorPlayback->sampleRate = (ma_uint32)sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorPlayback->channelMap, ma_countof(pParameters->pDescriptorPlayback->channelMap), pParameters->pDescriptorPlayback->channels); pParameters->pDescriptorPlayback->periodSizeInFrames = intermediaryBufferSizeInFrames; pParameters->pDescriptorPlayback->periodCount = 1; } /* At this point we're done and we can return. */ ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_DEBUG, "AudioWorklets: Created worklet node: %d\n", pParameters->pDevice->webaudio.audioWorklet); pParameters->pDevice->webaudio.initResult = MA_SUCCESS; ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks); } static void ma_audio_worklet_thread_initialized__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData) { ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData; WebAudioWorkletProcessorCreateOptions workletProcessorOptions; MA_ASSERT(pParameters != NULL); if (success == EM_FALSE) { pParameters->pDevice->webaudio.initResult = MA_ERROR; return; } MA_ZERO_OBJECT(&workletProcessorOptions); workletProcessorOptions.name = "miniaudio"; /* I'm not entirely sure what to call this. Does this need to be globally unique, or does it need only be unique for a given AudioContext? */ emscripten_create_wasm_audio_worklet_processor_async(audioContext, &workletProcessorOptions, ma_audio_worklet_processor_created__webaudio, pParameters); } #endif static ma_result ma_device_init__webaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture) { if (pConfig->deviceType == ma_device_type_loopback) { return MA_DEVICE_TYPE_NOT_SUPPORTED; } /* No exclusive mode with Web Audio. */ if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) || ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode == ma_share_mode_exclusive)) { return MA_SHARE_MODE_NOT_SUPPORTED; } /* With AudioWorklets we'll have just a single AudioContext. I'm not sure why I'm not doing this for ScriptProcessorNode so it might be worthwhile to look into that as well. */ #if defined(MA_USE_AUDIO_WORKLETS) { EmscriptenWebAudioCreateAttributes audioContextAttributes; ma_audio_worklet_thread_initialized_data* pInitParameters; void* pStackBuffer; if (pConfig->performanceProfile == ma_performance_profile_conservative) { audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_PLAYBACK; } else { audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE; } /* In my testing, Firefox does not seem to capture audio data properly if the sample rate is set to anything other than 48K. This does not seem to be the case for other browsers. For this reason, if the device type is anything other than playback, we'll leave the sample rate as-is and let the browser pick the appropriate rate for us. */ if (pConfig->deviceType == ma_device_type_playback) { audioContextAttributes.sampleRate = pDescriptorPlayback->sampleRate; } else { audioContextAttributes.sampleRate = 0; } /* It's not clear if this can return an error. None of the tests in the Emscripten repository check for this, so neither am I for now. */ pDevice->webaudio.audioContext = emscripten_create_audio_context(&audioContextAttributes); /* With the context created we can now create the worklet. We can only have a single worklet per audio context which means we'll need to craft this appropriately to handle duplex devices correctly. */ /* We now need to create a worker thread. This is a bit weird because we need to allocate our own buffer for the thread's stack. The stack needs to be aligned to 16 bytes. I'm going to allocate this on the heap to keep it simple. */ pStackBuffer = ma_aligned_malloc(MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, 16, &pDevice->pContext->allocationCallbacks); if (pStackBuffer == NULL) { emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return MA_OUT_OF_MEMORY; } /* Our thread initialization parameters need to be allocated on the heap so they don't go out of scope. */ pInitParameters = (ma_audio_worklet_thread_initialized_data*)ma_malloc(sizeof(*pInitParameters), &pDevice->pContext->allocationCallbacks); if (pInitParameters == NULL) { ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return MA_OUT_OF_MEMORY; } pInitParameters->pDevice = pDevice; pInitParameters->pConfig = pConfig; pInitParameters->pDescriptorPlayback = pDescriptorPlayback; pInitParameters->pDescriptorCapture = pDescriptorCapture; /* We need to flag the device as not yet initialized so we can wait on it later. Unfortunately all of the Emscripten WebAudio stuff is asynchronous. */ pDevice->webaudio.initResult = MA_BUSY; { emscripten_start_wasm_audio_worklet_thread_async(pDevice->webaudio.audioContext, pStackBuffer, MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, ma_audio_worklet_thread_initialized__webaudio, pInitParameters); } while (pDevice->webaudio.initResult == MA_BUSY) { emscripten_sleep(1); } /* We must wait for initialization to complete. We're just spinning here. The emscripten_sleep() call is why we need to build with `-sASYNCIFY`. */ /* Initialization is now complete. Descriptors were updated when the worklet was initialized. */ if (pDevice->webaudio.initResult != MA_SUCCESS) { ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks); emscripten_destroy_audio_context(pDevice->webaudio.audioContext); return pDevice->webaudio.initResult; } /* We need to add an entry to the miniaudio.devices list on the JS side so we can do some JS/C interop. */ pDevice->webaudio.deviceIndex = EM_ASM_INT({ return window.miniaudio.track_device({ webaudio: emscriptenGetAudioObject($0), state: 1, /* 1 = ma_device_state_stopped */ pDevice: $1 }); }, pDevice->webaudio.audioContext, pDevice); return MA_SUCCESS; } #else { /* ScriptProcessorNode. This path requires us to do almost everything in JS, but we'll do as much as we can in C. */ ma_uint32 deviceIndex; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 periodSizeInFrames; /* The channel count will depend on the device type. If it's a capture, use its, otherwise use the playback side. */ if (pConfig->deviceType == ma_device_type_capture) { channels = (pDescriptorCapture->channels > 0) ? pDescriptorCapture->channels : MA_DEFAULT_CHANNELS; } else { channels = (pDescriptorPlayback->channels > 0) ? pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS; } /* When testing in Firefox, I've seen it where capture mode fails if the sample rate is changed to anything other than it's native rate. For this reason we're leaving the sample rate untouched for capture devices. */ if (pConfig->deviceType == ma_device_type_playback) { sampleRate = pDescriptorPlayback->sampleRate; } else { sampleRate = 0; /* Let the browser decide when capturing. */ } /* The period size needs to be a power of 2. */ if (pConfig->deviceType == ma_device_type_capture) { periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorCapture, sampleRate, pConfig->performanceProfile); } else { periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorPlayback, sampleRate, pConfig->performanceProfile); } /* We need an intermediary buffer for doing interleaving and deinterleaving. */ pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(periodSizeInFrames * channels * sizeof(float), &pDevice->pContext->allocationCallbacks); if (pDevice->webaudio.pIntermediaryBuffer == NULL) { return MA_OUT_OF_MEMORY; } deviceIndex = EM_ASM_INT({ var deviceType = $0; var channels = $1; var sampleRate = $2; var bufferSize = $3; var pIntermediaryBuffer = $4; var pDevice = $5; if (typeof(window.miniaudio) === 'undefined') { return -1; /* Context not initialized. */ } var device = {}; /* First thing we need is an AudioContext. */ var audioContextOptions = {}; if (deviceType == window.miniaudio.device_type.playback && sampleRate != 0) { audioContextOptions.sampleRate = sampleRate; } device.webaudio = new (window.AudioContext || window.webkitAudioContext)(audioContextOptions); device.webaudio.suspend(); /* The AudioContext must be created in a suspended state. */ device.state = window.miniaudio.device_state.stopped; /* We need to create a ScriptProcessorNode. The channel situation is the same as the AudioWorklet path in that we need to specify an output and configure the channel count there. */ var channelCountIn = 0; var channelCountOut = channels; if (deviceType != window.miniaudio.device_type.playback) { channelCountIn = channels; } device.scriptNode = device.webaudio.createScriptProcessor(bufferSize, channelCountIn, channelCountOut); /* The node processing callback. */ device.scriptNode.onaudioprocess = function(e) { if (device.intermediaryBufferView == null || device.intermediaryBufferView.length == 0) { device.intermediaryBufferView = new Float32Array(HEAPF32.buffer, pIntermediaryBuffer, bufferSize * channels); } /* Do the capture side first. */ if (deviceType == window.miniaudio.device_type.capture || deviceType == window.miniaudio.device_type.duplex) { /* The data must be interleaved before being processed miniaudio. */ for (var iChannel = 0; iChannel < channels; iChannel += 1) { var inputBuffer = e.inputBuffer.getChannelData(iChannel); var intermediaryBuffer = device.intermediaryBufferView; for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) { intermediaryBuffer[iFrame*channels + iChannel] = inputBuffer[iFrame]; } } _ma_device_process_pcm_frames_capture__webaudio(pDevice, bufferSize, pIntermediaryBuffer); } if (deviceType == window.miniaudio.device_type.playback || deviceType == window.miniaudio.device_type.duplex) { _ma_device_process_pcm_frames_playback__webaudio(pDevice, bufferSize, pIntermediaryBuffer); for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) { var outputBuffer = e.outputBuffer.getChannelData(iChannel); var intermediaryBuffer = device.intermediaryBufferView; for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) { outputBuffer[iFrame] = intermediaryBuffer[iFrame*channels + iChannel]; } } } else { /* It's a capture-only device. Make sure the output is silenced. */ for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) { e.outputBuffer.getChannelData(iChannel).fill(0.0); } } }; /* Now we need to connect our node to the graph. */ if (deviceType == window.miniaudio.device_type.capture || deviceType == window.miniaudio.device_type.duplex) { navigator.mediaDevices.getUserMedia({audio:true, video:false}) .then(function(stream) { device.streamNode = device.webaudio.createMediaStreamSource(stream); device.streamNode.connect(device.scriptNode); device.scriptNode.connect(device.webaudio.destination); }) .catch(function(error) { console.log("Failed to get user media: " + error); }); } if (deviceType == window.miniaudio.device_type.playback) { device.scriptNode.connect(device.webaudio.destination); } device.pDevice = pDevice; return window.miniaudio.track_device(device); }, pConfig->deviceType, channels, sampleRate, periodSizeInFrames, pDevice->webaudio.pIntermediaryBuffer, pDevice); if (deviceIndex < 0) { return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } pDevice->webaudio.deviceIndex = deviceIndex; /* Grab the sample rate from the audio context directly. */ sampleRate = (ma_uint32)EM_ASM_INT({ return window.miniaudio.get_device_by_index($0).webaudio.sampleRate; }, deviceIndex); if (pDescriptorCapture != NULL) { pDescriptorCapture->format = ma_format_f32; pDescriptorCapture->channels = channels; pDescriptorCapture->sampleRate = sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels); pDescriptorCapture->periodSizeInFrames = periodSizeInFrames; pDescriptorCapture->periodCount = 1; } if (pDescriptorPlayback != NULL) { pDescriptorPlayback->format = ma_format_f32; pDescriptorPlayback->channels = channels; pDescriptorPlayback->sampleRate = sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels); pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames; pDescriptorPlayback->periodCount = 1; } return MA_SUCCESS; } #endif } static ma_result ma_device_start__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); EM_ASM({ var device = window.miniaudio.get_device_by_index($0); device.webaudio.resume(); device.state = window.miniaudio.device_state.started; }, pDevice->webaudio.deviceIndex); return MA_SUCCESS; } static ma_result ma_device_stop__webaudio(ma_device* pDevice) { MA_ASSERT(pDevice != NULL); /* From the WebAudio API documentation for AudioContext.suspend(): Suspends the progression of AudioContext's currentTime, allows any current context processing blocks that are already processed to be played to the destination, and then allows the system to release its claim on audio hardware. I read this to mean that "any current context processing blocks" are processed by suspend() - i.e. They they are drained. We therefore shouldn't need to do any kind of explicit draining. */ EM_ASM({ var device = window.miniaudio.get_device_by_index($0); device.webaudio.suspend(); device.state = window.miniaudio.device_state.stopped; }, pDevice->webaudio.deviceIndex); ma_device__on_notification_stopped(pDevice); return MA_SUCCESS; } static ma_result ma_context_uninit__webaudio(ma_context* pContext) { MA_ASSERT(pContext != NULL); MA_ASSERT(pContext->backend == ma_backend_webaudio); (void)pContext; /* Unused. */ /* Remove the global miniaudio object from window if there are no more references to it. */ EM_ASM({ if (typeof(window.miniaudio) !== 'undefined') { miniaudio.unlock_event_types.map(function(event_type) { document.removeEventListener(event_type, miniaudio.unlock, true); }); window.miniaudio.referenceCount -= 1; if (window.miniaudio.referenceCount === 0) { delete window.miniaudio; } } }); return MA_SUCCESS; } static ma_result ma_context_init__webaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks) { int resultFromJS; MA_ASSERT(pContext != NULL); (void)pConfig; /* Unused. */ /* Here is where our global JavaScript object is initialized. */ resultFromJS = EM_ASM_INT({ if (typeof window === 'undefined' || (window.AudioContext || window.webkitAudioContext) === undefined) { return 0; /* Web Audio not supported. */ } if (typeof(window.miniaudio) === 'undefined') { window.miniaudio = { referenceCount: 0 }; /* Device types. */ window.miniaudio.device_type = {}; window.miniaudio.device_type.playback = $0; window.miniaudio.device_type.capture = $1; window.miniaudio.device_type.duplex = $2; /* Device states. */ window.miniaudio.device_state = {}; window.miniaudio.device_state.stopped = $3; window.miniaudio.device_state.started = $4; /* Device cache for mapping devices to indexes for JavaScript/C interop. */ let miniaudio = window.miniaudio; miniaudio.devices = []; miniaudio.track_device = function(device) { /* Try inserting into a free slot first. */ for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) { if (miniaudio.devices[iDevice] == null) { miniaudio.devices[iDevice] = device; return iDevice; } } /* Getting here means there is no empty slots in the array so we just push to the end. */ miniaudio.devices.push(device); return miniaudio.devices.length - 1; }; miniaudio.untrack_device_by_index = function(deviceIndex) { /* We just set the device's slot to null. The slot will get reused in the next call to ma_track_device. */ miniaudio.devices[deviceIndex] = null; /* Trim the array if possible. */ while (miniaudio.devices.length > 0) { if (miniaudio.devices[miniaudio.devices.length-1] == null) { miniaudio.devices.pop(); } else { break; } } }; miniaudio.untrack_device = function(device) { for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) { if (miniaudio.devices[iDevice] == device) { return miniaudio.untrack_device_by_index(iDevice); } } }; miniaudio.get_device_by_index = function(deviceIndex) { return miniaudio.devices[deviceIndex]; }; miniaudio.unlock_event_types = (function(){ return ['touchend', 'click']; })(); miniaudio.unlock = function() { for(var i = 0; i < miniaudio.devices.length; ++i) { var device = miniaudio.devices[i]; if (device != null && device.webaudio != null && device.state === miniaudio.device_state.started) { device.webaudio.resume().then(() => { _ma_device__on_notification_unlocked(device.pDevice); }, (error) => {console.error("Failed to resume audiocontext", error); }); } } miniaudio.unlock_event_types.map(function(event_type) { document.removeEventListener(event_type, miniaudio.unlock, true); }); }; miniaudio.unlock_event_types.map(function(event_type) { document.addEventListener(event_type, miniaudio.unlock, true); }); } window.miniaudio.referenceCount += 1; return 1; }, ma_device_type_playback, ma_device_type_capture, ma_device_type_duplex, ma_device_state_stopped, ma_device_state_started); if (resultFromJS != 1) { return MA_FAILED_TO_INIT_BACKEND; } pCallbacks->onContextInit = ma_context_init__webaudio; pCallbacks->onContextUninit = ma_context_uninit__webaudio; pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__webaudio; pCallbacks->onContextGetDeviceInfo = ma_context_get_device_info__webaudio; pCallbacks->onDeviceInit = ma_device_init__webaudio; pCallbacks->onDeviceUninit = ma_device_uninit__webaudio; pCallbacks->onDeviceStart = ma_device_start__webaudio; pCallbacks->onDeviceStop = ma_device_stop__webaudio; pCallbacks->onDeviceRead = NULL; /* Not needed because WebAudio is asynchronous. */ pCallbacks->onDeviceWrite = NULL; /* Not needed because WebAudio is asynchronous. */ pCallbacks->onDeviceDataLoop = NULL; /* Not needed because WebAudio is asynchronous. */ return MA_SUCCESS; } #endif /* MA_HAS_WEBAUDIO */ static ma_bool32 ma__is_channel_map_valid(const ma_channel* pChannelMap, ma_uint32 channels) { /* A blank channel map should be allowed, in which case it should use an appropriate default which will depend on context. */ if (pChannelMap != NULL && pChannelMap[0] != MA_CHANNEL_NONE) { ma_uint32 iChannel; if (channels == 0 || channels > MA_MAX_CHANNELS) { return MA_FALSE; /* Channel count out of range. */ } /* A channel cannot be present in the channel map more than once. */ for (iChannel = 0; iChannel < channels; ++iChannel) { ma_uint32 jChannel; for (jChannel = iChannel + 1; jChannel < channels; ++jChannel) { if (pChannelMap[iChannel] == pChannelMap[jChannel]) { return MA_FALSE; } } } } return MA_TRUE; } static ma_bool32 ma_context_is_backend_asynchronous(ma_context* pContext) { MA_ASSERT(pContext != NULL); if (pContext->callbacks.onDeviceRead == NULL && pContext->callbacks.onDeviceWrite == NULL) { if (pContext->callbacks.onDeviceDataLoop == NULL) { return MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } } static ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType) { ma_result result; MA_ASSERT(pDevice != NULL); if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { if (pDevice->capture.format == ma_format_unknown) { pDevice->capture.format = pDevice->capture.internalFormat; } if (pDevice->capture.channels == 0) { pDevice->capture.channels = pDevice->capture.internalChannels; } if (pDevice->capture.channelMap[0] == MA_CHANNEL_NONE) { MA_ASSERT(pDevice->capture.channels <= MA_MAX_CHANNELS); if (pDevice->capture.internalChannels == pDevice->capture.channels) { ma_channel_map_copy(pDevice->capture.channelMap, pDevice->capture.internalChannelMap, pDevice->capture.channels); } else { if (pDevice->capture.channelMixMode == ma_channel_mix_mode_simple) { ma_channel_map_init_blank(pDevice->capture.channelMap, pDevice->capture.channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pDevice->capture.channels); } } } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { if (pDevice->playback.format == ma_format_unknown) { pDevice->playback.format = pDevice->playback.internalFormat; } if (pDevice->playback.channels == 0) { pDevice->playback.channels = pDevice->playback.internalChannels; } if (pDevice->playback.channelMap[0] == MA_CHANNEL_NONE) { MA_ASSERT(pDevice->playback.channels <= MA_MAX_CHANNELS); if (pDevice->playback.internalChannels == pDevice->playback.channels) { ma_channel_map_copy(pDevice->playback.channelMap, pDevice->playback.internalChannelMap, pDevice->playback.channels); } else { if (pDevice->playback.channelMixMode == ma_channel_mix_mode_simple) { ma_channel_map_init_blank(pDevice->playback.channelMap, pDevice->playback.channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pDevice->playback.channels); } } } } if (pDevice->sampleRate == 0) { if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { pDevice->sampleRate = pDevice->capture.internalSampleRate; } else { pDevice->sampleRate = pDevice->playback.internalSampleRate; } } /* Data converters. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { /* Converting from internal device format to client format. */ ma_data_converter_config converterConfig = ma_data_converter_config_init_default(); converterConfig.formatIn = pDevice->capture.internalFormat; converterConfig.channelsIn = pDevice->capture.internalChannels; converterConfig.sampleRateIn = pDevice->capture.internalSampleRate; converterConfig.pChannelMapIn = pDevice->capture.internalChannelMap; converterConfig.formatOut = pDevice->capture.format; converterConfig.channelsOut = pDevice->capture.channels; converterConfig.sampleRateOut = pDevice->sampleRate; converterConfig.pChannelMapOut = pDevice->capture.channelMap; converterConfig.channelMixMode = pDevice->capture.channelMixMode; converterConfig.calculateLFEFromSpatialChannels = pDevice->capture.calculateLFEFromSpatialChannels; converterConfig.allowDynamicSampleRate = MA_FALSE; converterConfig.resampling.algorithm = pDevice->resampling.algorithm; converterConfig.resampling.linear.lpfOrder = pDevice->resampling.linear.lpfOrder; converterConfig.resampling.pBackendVTable = pDevice->resampling.pBackendVTable; converterConfig.resampling.pBackendUserData = pDevice->resampling.pBackendUserData; /* Make sure the old converter is uninitialized first. */ if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) { ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks); } result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->capture.converter); if (result != MA_SUCCESS) { return result; } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { /* Converting from client format to device format. */ ma_data_converter_config converterConfig = ma_data_converter_config_init_default(); converterConfig.formatIn = pDevice->playback.format; converterConfig.channelsIn = pDevice->playback.channels; converterConfig.sampleRateIn = pDevice->sampleRate; converterConfig.pChannelMapIn = pDevice->playback.channelMap; converterConfig.formatOut = pDevice->playback.internalFormat; converterConfig.channelsOut = pDevice->playback.internalChannels; converterConfig.sampleRateOut = pDevice->playback.internalSampleRate; converterConfig.pChannelMapOut = pDevice->playback.internalChannelMap; converterConfig.channelMixMode = pDevice->playback.channelMixMode; converterConfig.calculateLFEFromSpatialChannels = pDevice->playback.calculateLFEFromSpatialChannels; converterConfig.allowDynamicSampleRate = MA_FALSE; converterConfig.resampling.algorithm = pDevice->resampling.algorithm; converterConfig.resampling.linear.lpfOrder = pDevice->resampling.linear.lpfOrder; converterConfig.resampling.pBackendVTable = pDevice->resampling.pBackendVTable; converterConfig.resampling.pBackendUserData = pDevice->resampling.pBackendUserData; /* Make sure the old converter is uninitialized first. */ if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) { ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks); } result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->playback.converter); if (result != MA_SUCCESS) { return result; } } /* If the device is doing playback (ma_device_type_playback or ma_device_type_duplex), there's a couple of situations where we'll need a heap allocated cache. The first is a duplex device for backends that use a callback for data delivery. The reason this is needed is that the input stage needs to have a buffer to place the input data while it waits for the playback stage, after which the miniaudio data callback will get fired. This is not needed for backends that use a blocking API because miniaudio manages temporary buffers on the stack to achieve this. The other situation is when the data converter does not have the ability to query the number of input frames that are required in order to process a given number of output frames. When performing data conversion, it's useful if miniaudio know exactly how many frames it needs from the client in order to generate a given number of output frames. This way, only exactly the number of frames are needed to be read from the client which means no cache is necessary. On the other hand, if miniaudio doesn't know how many frames to read, it is forced to read in fixed sized chunks and then cache any residual unused input frames, those of which will be processed at a later stage. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { ma_uint64 unused; pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = 0; if (pDevice->type == ma_device_type_duplex || /* Duplex. backend may decide to use ma_device_handle_backend_data_callback() which will require this cache. */ ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, 1, &unused) != MA_SUCCESS) /* Data conversion required input frame calculation not supported. */ { /* We need a heap allocated cache. We want to size this based on the period size. */ void* pNewInputCache; ma_uint64 newInputCacheCap; ma_uint64 newInputCacheSizeInBytes; newInputCacheCap = ma_calculate_frame_count_after_resampling(pDevice->playback.internalSampleRate, pDevice->sampleRate, pDevice->playback.internalPeriodSizeInFrames); newInputCacheSizeInBytes = newInputCacheCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); if (newInputCacheSizeInBytes > MA_SIZE_MAX) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; return MA_OUT_OF_MEMORY; /* Allocation too big. Should never hit this, but makes the cast below safer for 32-bit builds. */ } pNewInputCache = ma_realloc(pDevice->playback.pInputCache, (size_t)newInputCacheSizeInBytes, &pDevice->pContext->allocationCallbacks); if (pNewInputCache == NULL) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; return MA_OUT_OF_MEMORY; } pDevice->playback.pInputCache = pNewInputCache; pDevice->playback.inputCacheCap = newInputCacheCap; } else { /* Heap allocation not required. Make sure we clear out the old cache just in case this function was called in response to a route change. */ ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); pDevice->playback.pInputCache = NULL; pDevice->playback.inputCacheCap = 0; } } return MA_SUCCESS; } MA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pDescriptorPlayback, const ma_device_descriptor* pDescriptorCapture) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } /* Capture. */ if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { if (ma_device_descriptor_is_valid(pDescriptorCapture) == MA_FALSE) { return MA_INVALID_ARGS; } pDevice->capture.internalFormat = pDescriptorCapture->format; pDevice->capture.internalChannels = pDescriptorCapture->channels; pDevice->capture.internalSampleRate = pDescriptorCapture->sampleRate; MA_COPY_MEMORY(pDevice->capture.internalChannelMap, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap)); pDevice->capture.internalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames; pDevice->capture.internalPeriods = pDescriptorCapture->periodCount; if (pDevice->capture.internalPeriodSizeInFrames == 0) { pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorCapture->periodSizeInMilliseconds, pDescriptorCapture->sampleRate); } } /* Playback. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { if (ma_device_descriptor_is_valid(pDescriptorPlayback) == MA_FALSE) { return MA_INVALID_ARGS; } pDevice->playback.internalFormat = pDescriptorPlayback->format; pDevice->playback.internalChannels = pDescriptorPlayback->channels; pDevice->playback.internalSampleRate = pDescriptorPlayback->sampleRate; MA_COPY_MEMORY(pDevice->playback.internalChannelMap, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap)); pDevice->playback.internalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames; pDevice->playback.internalPeriods = pDescriptorPlayback->periodCount; if (pDevice->playback.internalPeriodSizeInFrames == 0) { pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorPlayback->periodSizeInMilliseconds, pDescriptorPlayback->sampleRate); } } /* The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead. For loopback devices, we need to retrieve the name of the playback device. */ { ma_device_info deviceInfo; if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { result = ma_device_get_info(pDevice, ma_device_type_capture, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (pDescriptorCapture->pDeviceID == NULL) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), "Capture Device", (size_t)-1); } } } if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (pDescriptorPlayback->pDeviceID == NULL) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), "Playback Device", (size_t)-1); } } } } /* Update data conversion. */ return ma_device__post_init_setup(pDevice, deviceType); /* TODO: Should probably rename ma_device__post_init_setup() to something better. */ } static ma_thread_result MA_THREADCALL ma_worker_thread(void* pData) { ma_device* pDevice = (ma_device*)pData; #ifdef MA_WIN32 HRESULT CoInitializeResult; #endif MA_ASSERT(pDevice != NULL); #ifdef MA_WIN32 CoInitializeResult = ma_CoInitializeEx(pDevice->pContext, NULL, MA_COINIT_VALUE); #endif /* When the device is being initialized its initial state is set to ma_device_state_uninitialized. Before returning from ma_device_init(), the state needs to be set to something valid. In miniaudio the device's default state immediately after initialization is stopped, so therefore we need to mark the device as such. miniaudio will wait on the worker thread to signal an event to know when the worker thread is ready for action. */ ma_device__set_state(pDevice, ma_device_state_stopped); ma_event_signal(&pDevice->stopEvent); for (;;) { /* <-- This loop just keeps the thread alive. The main audio loop is inside. */ ma_result startResult; ma_result stopResult; /* <-- This will store the result from onDeviceStop(). If it returns an error, we don't fire the stopped notification callback. */ /* We wait on an event to know when something has requested that the device be started and the main loop entered. */ ma_event_wait(&pDevice->wakeupEvent); /* Default result code. */ pDevice->workResult = MA_SUCCESS; /* If the reason for the wake up is that we are terminating, just break from the loop. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { break; } /* Getting to this point means the device is wanting to get started. The function that has requested that the device be started will be waiting on an event (pDevice->startEvent) which means we need to make sure we signal the event in both the success and error case. It's important that the state of the device is set _before_ signaling the event. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_starting); /* If the device has a start callback, start it now. */ if (pDevice->pContext->callbacks.onDeviceStart != NULL) { startResult = pDevice->pContext->callbacks.onDeviceStart(pDevice); } else { startResult = MA_SUCCESS; } /* If starting was not successful we'll need to loop back to the start and wait for something to happen (pDevice->wakeupEvent). */ if (startResult != MA_SUCCESS) { pDevice->workResult = startResult; ma_event_signal(&pDevice->startEvent); /* <-- Always signal the start event so ma_device_start() can return as it'll be waiting on it. */ continue; } /* Make sure the state is set appropriately. */ ma_device__set_state(pDevice, ma_device_state_started); /* <-- Set this before signaling the event so that the state is always guaranteed to be good after ma_device_start() has returned. */ ma_event_signal(&pDevice->startEvent); ma_device__on_notification_started(pDevice); if (pDevice->pContext->callbacks.onDeviceDataLoop != NULL) { pDevice->pContext->callbacks.onDeviceDataLoop(pDevice); } else { /* The backend is not using a custom main loop implementation, so now fall back to the blocking read-write implementation. */ ma_device_audio_thread__default_read_write(pDevice); } /* Getting here means we have broken from the main loop which happens the application has requested that device be stopped. */ if (pDevice->pContext->callbacks.onDeviceStop != NULL) { stopResult = pDevice->pContext->callbacks.onDeviceStop(pDevice); } else { stopResult = MA_SUCCESS; /* No stop callback with the backend. Just assume successful. */ } /* After the device has stopped, make sure an event is posted. Don't post a stopped event if stopping failed. This can happen on some backends when the underlying stream has been stopped due to the device being physically unplugged or disabled via an OS setting. */ if (stopResult == MA_SUCCESS) { ma_device__on_notification_stopped(pDevice); } /* If we stopped because the device has been uninitialized, abort now. */ if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { break; } /* A function somewhere is waiting for the device to have stopped for real so we need to signal an event to allow it to continue. */ ma_device__set_state(pDevice, ma_device_state_stopped); ma_event_signal(&pDevice->stopEvent); } #ifdef MA_WIN32 if (CoInitializeResult == S_OK) { ma_CoUninitialize(pDevice->pContext); } #endif return (ma_thread_result)0; } /* Helper for determining whether or not the given device is initialized. */ static ma_bool32 ma_device__is_initialized(ma_device* pDevice) { if (pDevice == NULL) { return MA_FALSE; } return ma_device_get_state(pDevice) != ma_device_state_uninitialized; } #ifdef MA_WIN32 static ma_result ma_context_uninit_backend_apis__win32(ma_context* pContext) { /* For some reason UWP complains when CoUninitialize() is called. I'm just not going to call it on UWP. */ #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) if (pContext->win32.CoInitializeResult == S_OK) { ma_CoUninitialize(pContext); } #if defined(MA_WIN32_DESKTOP) ma_dlclose(ma_context_get_log(pContext), pContext->win32.hUser32DLL); ma_dlclose(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL); #endif ma_dlclose(ma_context_get_log(pContext), pContext->win32.hOle32DLL); #else (void)pContext; #endif return MA_SUCCESS; } static ma_result ma_context_init_backend_apis__win32(ma_context* pContext) { #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK) #if defined(MA_WIN32_DESKTOP) /* User32.dll */ pContext->win32.hUser32DLL = ma_dlopen(ma_context_get_log(pContext), "user32.dll"); if (pContext->win32.hUser32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.GetForegroundWindow = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, "GetForegroundWindow"); pContext->win32.GetDesktopWindow = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, "GetDesktopWindow"); /* Advapi32.dll */ pContext->win32.hAdvapi32DLL = ma_dlopen(ma_context_get_log(pContext), "advapi32.dll"); if (pContext->win32.hAdvapi32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.RegOpenKeyExA = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegOpenKeyExA"); pContext->win32.RegCloseKey = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegCloseKey"); pContext->win32.RegQueryValueExA = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, "RegQueryValueExA"); #endif /* Ole32.dll */ pContext->win32.hOle32DLL = ma_dlopen(ma_context_get_log(pContext), "ole32.dll"); if (pContext->win32.hOle32DLL == NULL) { return MA_FAILED_TO_INIT_BACKEND; } pContext->win32.CoInitialize = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoInitialize"); pContext->win32.CoInitializeEx = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoInitializeEx"); pContext->win32.CoUninitialize = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoUninitialize"); pContext->win32.CoCreateInstance = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoCreateInstance"); pContext->win32.CoTaskMemFree = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "CoTaskMemFree"); pContext->win32.PropVariantClear = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "PropVariantClear"); pContext->win32.StringFromGUID2 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, "StringFromGUID2"); #else (void)pContext; /* Unused. */ #endif pContext->win32.CoInitializeResult = ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE); return MA_SUCCESS; } #else static ma_result ma_context_uninit_backend_apis__nix(ma_context* pContext) { (void)pContext; return MA_SUCCESS; } static ma_result ma_context_init_backend_apis__nix(ma_context* pContext) { (void)pContext; return MA_SUCCESS; } #endif static ma_result ma_context_init_backend_apis(ma_context* pContext) { ma_result result; #ifdef MA_WIN32 result = ma_context_init_backend_apis__win32(pContext); #else result = ma_context_init_backend_apis__nix(pContext); #endif return result; } static ma_result ma_context_uninit_backend_apis(ma_context* pContext) { ma_result result; #ifdef MA_WIN32 result = ma_context_uninit_backend_apis__win32(pContext); #else result = ma_context_uninit_backend_apis__nix(pContext); #endif return result; } /* The default capacity doesn't need to be too big. */ #ifndef MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY #define MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY 32 #endif MA_API ma_device_job_thread_config ma_device_job_thread_config_init(void) { ma_device_job_thread_config config; MA_ZERO_OBJECT(&config); config.noThread = MA_FALSE; config.jobQueueCapacity = MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY; config.jobQueueFlags = 0; return config; } static ma_thread_result MA_THREADCALL ma_device_job_thread_entry(void* pUserData) { ma_device_job_thread* pJobThread = (ma_device_job_thread*)pUserData; MA_ASSERT(pJobThread != NULL); for (;;) { ma_result result; ma_job job; result = ma_device_job_thread_next(pJobThread, &job); if (result != MA_SUCCESS) { break; } if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) { break; } ma_job_process(&job); } return (ma_thread_result)0; } MA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread) { ma_result result; ma_job_queue_config jobQueueConfig; if (pJobThread == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pJobThread); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Initialize the job queue before the thread to ensure it's in a valid state. */ jobQueueConfig = ma_job_queue_config_init(pConfig->jobQueueFlags, pConfig->jobQueueCapacity); result = ma_job_queue_init(&jobQueueConfig, pAllocationCallbacks, &pJobThread->jobQueue); if (result != MA_SUCCESS) { return result; /* Failed to initialize job queue. */ } /* The thread needs to be initialized after the job queue to ensure the thread doesn't try to access it prematurely. */ if (pConfig->noThread == MA_FALSE) { result = ma_thread_create(&pJobThread->thread, ma_thread_priority_normal, 0, ma_device_job_thread_entry, pJobThread, pAllocationCallbacks); if (result != MA_SUCCESS) { ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks); return result; /* Failed to create the job thread. */ } pJobThread->_hasThread = MA_TRUE; } else { pJobThread->_hasThread = MA_FALSE; } return MA_SUCCESS; } MA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks) { if (pJobThread == NULL) { return; } /* The first thing to do is post a quit message to the job queue. If we're using a thread we'll need to wait for it. */ { ma_job job = ma_job_init(MA_JOB_TYPE_QUIT); ma_device_job_thread_post(pJobThread, &job); } /* Wait for the thread to terminate naturally. */ if (pJobThread->_hasThread) { ma_thread_wait(&pJobThread->thread); } /* At this point the thread should be terminated so we can safely uninitialize the job queue. */ ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks); } MA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob) { if (pJobThread == NULL || pJob == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_post(&pJobThread->jobQueue, pJob); } MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob) { if (pJob == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pJob); if (pJobThread == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_next(&pJobThread->jobQueue, pJob); } MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB) { size_t i; if (pA == NULL || pB == NULL) { return MA_FALSE; } for (i = 0; i < sizeof(ma_device_id); i += 1) { if (((const char*)pA)[i] != ((const char*)pB)[i]) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_context_config ma_context_config_init(void) { ma_context_config config; MA_ZERO_OBJECT(&config); return config; } MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext) { ma_result result; ma_context_config defaultConfig; ma_backend defaultBackends[ma_backend_null+1]; ma_uint32 iBackend; ma_backend* pBackendsToIterate; ma_uint32 backendsToIterateCount; if (pContext == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pContext); /* Always make sure the config is set first to ensure properties are available as soon as possible. */ if (pConfig == NULL) { defaultConfig = ma_context_config_init(); pConfig = &defaultConfig; } /* Allocation callbacks need to come first because they'll be passed around to other areas. */ result = ma_allocation_callbacks_init_copy(&pContext->allocationCallbacks, &pConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } /* Get a lot set up first so we can start logging ASAP. */ if (pConfig->pLog != NULL) { pContext->pLog = pConfig->pLog; } else { result = ma_log_init(&pContext->allocationCallbacks, &pContext->log); if (result == MA_SUCCESS) { pContext->pLog = &pContext->log; } else { pContext->pLog = NULL; /* Logging is not available. */ } } pContext->threadPriority = pConfig->threadPriority; pContext->threadStackSize = pConfig->threadStackSize; pContext->pUserData = pConfig->pUserData; /* Backend APIs need to be initialized first. This is where external libraries will be loaded and linked. */ result = ma_context_init_backend_apis(pContext); if (result != MA_SUCCESS) { return result; } for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) { defaultBackends[iBackend] = (ma_backend)iBackend; } pBackendsToIterate = (ma_backend*)backends; backendsToIterateCount = backendCount; if (pBackendsToIterate == NULL) { pBackendsToIterate = (ma_backend*)defaultBackends; backendsToIterateCount = ma_countof(defaultBackends); } MA_ASSERT(pBackendsToIterate != NULL); for (iBackend = 0; iBackend < backendsToIterateCount; iBackend += 1) { ma_backend backend = pBackendsToIterate[iBackend]; /* Make sure all callbacks are reset so we don't accidentally drag in any from previously failed initialization attempts. */ MA_ZERO_OBJECT(&pContext->callbacks); /* These backends are using the new callback system. */ switch (backend) { #ifdef MA_HAS_WASAPI case ma_backend_wasapi: { pContext->callbacks.onContextInit = ma_context_init__wasapi; } break; #endif #ifdef MA_HAS_DSOUND case ma_backend_dsound: { pContext->callbacks.onContextInit = ma_context_init__dsound; } break; #endif #ifdef MA_HAS_WINMM case ma_backend_winmm: { pContext->callbacks.onContextInit = ma_context_init__winmm; } break; #endif #ifdef MA_HAS_COREAUDIO case ma_backend_coreaudio: { pContext->callbacks.onContextInit = ma_context_init__coreaudio; } break; #endif #ifdef MA_HAS_SNDIO case ma_backend_sndio: { pContext->callbacks.onContextInit = ma_context_init__sndio; } break; #endif #ifdef MA_HAS_AUDIO4 case ma_backend_audio4: { pContext->callbacks.onContextInit = ma_context_init__audio4; } break; #endif #ifdef MA_HAS_OSS case ma_backend_oss: { pContext->callbacks.onContextInit = ma_context_init__oss; } break; #endif #ifdef MA_HAS_PULSEAUDIO case ma_backend_pulseaudio: { pContext->callbacks.onContextInit = ma_context_init__pulse; } break; #endif #ifdef MA_HAS_ALSA case ma_backend_alsa: { pContext->callbacks.onContextInit = ma_context_init__alsa; } break; #endif #ifdef MA_HAS_JACK case ma_backend_jack: { pContext->callbacks.onContextInit = ma_context_init__jack; } break; #endif #ifdef MA_HAS_AAUDIO case ma_backend_aaudio: { if (ma_is_backend_enabled(backend)) { pContext->callbacks.onContextInit = ma_context_init__aaudio; } } break; #endif #ifdef MA_HAS_OPENSL case ma_backend_opensl: { if (ma_is_backend_enabled(backend)) { pContext->callbacks.onContextInit = ma_context_init__opensl; } } break; #endif #ifdef MA_HAS_WEBAUDIO case ma_backend_webaudio: { pContext->callbacks.onContextInit = ma_context_init__webaudio; } break; #endif #ifdef MA_HAS_CUSTOM case ma_backend_custom: { /* Slightly different logic for custom backends. Custom backends can optionally set all of their callbacks in the config. */ pContext->callbacks = pConfig->custom; } break; #endif #ifdef MA_HAS_NULL case ma_backend_null: { pContext->callbacks.onContextInit = ma_context_init__null; } break; #endif default: break; } if (pContext->callbacks.onContextInit != NULL) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Attempting to initialize %s backend...\n", ma_get_backend_name(backend)); result = pContext->callbacks.onContextInit(pContext, pConfig, &pContext->callbacks); } else { /* Getting here means the onContextInit callback is not set which means the backend is not enabled. Special case for the custom backend. */ if (backend != ma_backend_custom) { result = MA_BACKEND_NOT_ENABLED; } else { #if !defined(MA_HAS_CUSTOM) result = MA_BACKEND_NOT_ENABLED; #else result = MA_NO_BACKEND; #endif } } /* If this iteration was successful, return. */ if (result == MA_SUCCESS) { result = ma_mutex_init(&pContext->deviceEnumLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Failed to initialize mutex for device enumeration. ma_context_get_devices() is not thread safe.\n"); } result = ma_mutex_init(&pContext->deviceInfoLock); if (result != MA_SUCCESS) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "Failed to initialize mutex for device info retrieval. ma_context_get_device_info() is not thread safe.\n"); } ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "System Architecture:\n"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " Endian: %s\n", ma_is_little_endian() ? "LE" : "BE"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " SSE2: %s\n", ma_has_sse2() ? "YES" : "NO"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " AVX2: %s\n", ma_has_avx2() ? "YES" : "NO"); ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, " NEON: %s\n", ma_has_neon() ? "YES" : "NO"); pContext->backend = backend; return result; } else { if (result == MA_BACKEND_NOT_ENABLED) { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "%s backend is disabled.\n", ma_get_backend_name(backend)); } else { ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Failed to initialize %s backend.\n", ma_get_backend_name(backend)); } } } /* If we get here it means an error occurred. */ MA_ZERO_OBJECT(pContext); /* Safety. */ return MA_NO_BACKEND; } MA_API ma_result ma_context_uninit(ma_context* pContext) { if (pContext == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextUninit != NULL) { pContext->callbacks.onContextUninit(pContext); } ma_mutex_uninit(&pContext->deviceEnumLock); ma_mutex_uninit(&pContext->deviceInfoLock); ma_free(pContext->pDeviceInfos, &pContext->allocationCallbacks); ma_context_uninit_backend_apis(pContext); if (pContext->pLog == &pContext->log) { ma_log_uninit(&pContext->log); } return MA_SUCCESS; } MA_API size_t ma_context_sizeof(void) { return sizeof(ma_context); } MA_API ma_log* ma_context_get_log(ma_context* pContext) { if (pContext == NULL) { return NULL; } return pContext->pLog; } MA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData) { ma_result result; if (pContext == NULL || callback == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextEnumerateDevices == NULL) { return MA_INVALID_OPERATION; } ma_mutex_lock(&pContext->deviceEnumLock); { result = pContext->callbacks.onContextEnumerateDevices(pContext, callback, pUserData); } ma_mutex_unlock(&pContext->deviceEnumLock); return result; } static ma_bool32 ma_context_get_devices__enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData) { /* We need to insert the device info into our main internal buffer. Where it goes depends on the device type. If it's a capture device it's just appended to the end. If it's a playback device it's inserted just before the first capture device. */ /* First make sure we have room. Since the number of devices we add to the list is usually relatively small I've decided to use a simple fixed size increment for buffer expansion. */ const ma_uint32 bufferExpansionCount = 2; const ma_uint32 totalDeviceInfoCount = pContext->playbackDeviceInfoCount + pContext->captureDeviceInfoCount; if (totalDeviceInfoCount >= pContext->deviceInfoCapacity) { ma_uint32 newCapacity = pContext->deviceInfoCapacity + bufferExpansionCount; ma_device_info* pNewInfos = (ma_device_info*)ma_realloc(pContext->pDeviceInfos, sizeof(*pContext->pDeviceInfos)*newCapacity, &pContext->allocationCallbacks); if (pNewInfos == NULL) { return MA_FALSE; /* Out of memory. */ } pContext->pDeviceInfos = pNewInfos; pContext->deviceInfoCapacity = newCapacity; } if (deviceType == ma_device_type_playback) { /* Playback. Insert just before the first capture device. */ /* The first thing to do is move all of the capture devices down a slot. */ ma_uint32 iFirstCaptureDevice = pContext->playbackDeviceInfoCount; size_t iCaptureDevice; for (iCaptureDevice = totalDeviceInfoCount; iCaptureDevice > iFirstCaptureDevice; --iCaptureDevice) { pContext->pDeviceInfos[iCaptureDevice] = pContext->pDeviceInfos[iCaptureDevice-1]; } /* Now just insert where the first capture device was before moving it down a slot. */ pContext->pDeviceInfos[iFirstCaptureDevice] = *pInfo; pContext->playbackDeviceInfoCount += 1; } else { /* Capture. Insert at the end. */ pContext->pDeviceInfos[totalDeviceInfoCount] = *pInfo; pContext->captureDeviceInfoCount += 1; } (void)pUserData; return MA_TRUE; } MA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount) { ma_result result; /* Safety. */ if (ppPlaybackDeviceInfos != NULL) *ppPlaybackDeviceInfos = NULL; if (pPlaybackDeviceCount != NULL) *pPlaybackDeviceCount = 0; if (ppCaptureDeviceInfos != NULL) *ppCaptureDeviceInfos = NULL; if (pCaptureDeviceCount != NULL) *pCaptureDeviceCount = 0; if (pContext == NULL) { return MA_INVALID_ARGS; } if (pContext->callbacks.onContextEnumerateDevices == NULL) { return MA_INVALID_OPERATION; } /* Note that we don't use ma_context_enumerate_devices() here because we want to do locking at a higher level. */ ma_mutex_lock(&pContext->deviceEnumLock); { /* Reset everything first. */ pContext->playbackDeviceInfoCount = 0; pContext->captureDeviceInfoCount = 0; /* Now enumerate over available devices. */ result = pContext->callbacks.onContextEnumerateDevices(pContext, ma_context_get_devices__enum_callback, NULL); if (result == MA_SUCCESS) { /* Playback devices. */ if (ppPlaybackDeviceInfos != NULL) { *ppPlaybackDeviceInfos = pContext->pDeviceInfos; } if (pPlaybackDeviceCount != NULL) { *pPlaybackDeviceCount = pContext->playbackDeviceInfoCount; } /* Capture devices. */ if (ppCaptureDeviceInfos != NULL) { *ppCaptureDeviceInfos = pContext->pDeviceInfos; /* Capture devices come after playback devices. */ if (pContext->playbackDeviceInfoCount > 0) { /* Conditional, because NULL+0 is undefined behavior. */ *ppCaptureDeviceInfos += pContext->playbackDeviceInfoCount; } } if (pCaptureDeviceCount != NULL) { *pCaptureDeviceCount = pContext->captureDeviceInfoCount; } } } ma_mutex_unlock(&pContext->deviceEnumLock); return result; } MA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo) { ma_result result; ma_device_info deviceInfo; /* NOTE: Do not clear pDeviceInfo on entry. The reason is the pDeviceID may actually point to pDeviceInfo->id which will break things. */ if (pContext == NULL || pDeviceInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(&deviceInfo); /* Help the backend out by copying over the device ID if we have one. */ if (pDeviceID != NULL) { MA_COPY_MEMORY(&deviceInfo.id, pDeviceID, sizeof(*pDeviceID)); } if (pContext->callbacks.onContextGetDeviceInfo == NULL) { return MA_INVALID_OPERATION; } ma_mutex_lock(&pContext->deviceInfoLock); { result = pContext->callbacks.onContextGetDeviceInfo(pContext, deviceType, pDeviceID, &deviceInfo); } ma_mutex_unlock(&pContext->deviceInfoLock); *pDeviceInfo = deviceInfo; return result; } MA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext) { if (pContext == NULL) { return MA_FALSE; } return ma_is_loopback_supported(pContext->backend); } MA_API ma_device_config ma_device_config_init(ma_device_type deviceType) { ma_device_config config; MA_ZERO_OBJECT(&config); config.deviceType = deviceType; config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate don't matter here. */ return config; } MA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice) { ma_result result; ma_device_descriptor descriptorPlayback; ma_device_descriptor descriptorCapture; /* The context can be null, in which case we self-manage it. */ if (pContext == NULL) { return ma_device_init_ex(NULL, 0, NULL, pConfig, pDevice); } if (pDevice == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDevice); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Check that we have our callbacks defined. */ if (pContext->callbacks.onDeviceInit == NULL) { return MA_INVALID_OPERATION; } /* Basic config validation. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) { if (pConfig->capture.channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } if (!ma__is_channel_map_valid(pConfig->capture.pChannelMap, pConfig->capture.channels)) { return MA_INVALID_ARGS; } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { if (pConfig->playback.channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } if (!ma__is_channel_map_valid(pConfig->playback.pChannelMap, pConfig->playback.channels)) { return MA_INVALID_ARGS; } } pDevice->pContext = pContext; /* Set the user data and log callback ASAP to ensure it is available for the entire initialization process. */ pDevice->pUserData = pConfig->pUserData; pDevice->onData = pConfig->dataCallback; pDevice->onNotification = pConfig->notificationCallback; pDevice->onStop = pConfig->stopCallback; if (pConfig->playback.pDeviceID != NULL) { MA_COPY_MEMORY(&pDevice->playback.id, pConfig->playback.pDeviceID, sizeof(pDevice->playback.id)); pDevice->playback.pID = &pDevice->playback.id; } else { pDevice->playback.pID = NULL; } if (pConfig->capture.pDeviceID != NULL) { MA_COPY_MEMORY(&pDevice->capture.id, pConfig->capture.pDeviceID, sizeof(pDevice->capture.id)); pDevice->capture.pID = &pDevice->capture.id; } else { pDevice->capture.pID = NULL; } pDevice->noPreSilencedOutputBuffer = pConfig->noPreSilencedOutputBuffer; pDevice->noClip = pConfig->noClip; pDevice->noDisableDenormals = pConfig->noDisableDenormals; pDevice->noFixedSizedCallback = pConfig->noFixedSizedCallback; ma_atomic_float_set(&pDevice->masterVolumeFactor, 1); pDevice->type = pConfig->deviceType; pDevice->sampleRate = pConfig->sampleRate; pDevice->resampling.algorithm = pConfig->resampling.algorithm; pDevice->resampling.linear.lpfOrder = pConfig->resampling.linear.lpfOrder; pDevice->resampling.pBackendVTable = pConfig->resampling.pBackendVTable; pDevice->resampling.pBackendUserData = pConfig->resampling.pBackendUserData; pDevice->capture.shareMode = pConfig->capture.shareMode; pDevice->capture.format = pConfig->capture.format; pDevice->capture.channels = pConfig->capture.channels; ma_channel_map_copy_or_default(pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels); pDevice->capture.channelMixMode = pConfig->capture.channelMixMode; pDevice->capture.calculateLFEFromSpatialChannels = pConfig->capture.calculateLFEFromSpatialChannels; pDevice->playback.shareMode = pConfig->playback.shareMode; pDevice->playback.format = pConfig->playback.format; pDevice->playback.channels = pConfig->playback.channels; ma_channel_map_copy_or_default(pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels); pDevice->playback.channelMixMode = pConfig->playback.channelMixMode; pDevice->playback.calculateLFEFromSpatialChannels = pConfig->playback.calculateLFEFromSpatialChannels; result = ma_mutex_init(&pDevice->startStopLock); if (result != MA_SUCCESS) { return result; } /* When the device is started, the worker thread is the one that does the actual startup of the backend device. We use a semaphore to wait for the background thread to finish the work. The same applies for stopping the device. Each of these semaphores is released internally by the worker thread when the work is completed. The start semaphore is also used to wake up the worker thread. */ result = ma_event_init(&pDevice->wakeupEvent); if (result != MA_SUCCESS) { ma_mutex_uninit(&pDevice->startStopLock); return result; } result = ma_event_init(&pDevice->startEvent); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } result = ma_event_init(&pDevice->stopEvent); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } MA_ZERO_OBJECT(&descriptorPlayback); descriptorPlayback.pDeviceID = pConfig->playback.pDeviceID; descriptorPlayback.shareMode = pConfig->playback.shareMode; descriptorPlayback.format = pConfig->playback.format; descriptorPlayback.channels = pConfig->playback.channels; descriptorPlayback.sampleRate = pConfig->sampleRate; ma_channel_map_copy_or_default(descriptorPlayback.channelMap, ma_countof(descriptorPlayback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels); descriptorPlayback.periodSizeInFrames = pConfig->periodSizeInFrames; descriptorPlayback.periodSizeInMilliseconds = pConfig->periodSizeInMilliseconds; descriptorPlayback.periodCount = pConfig->periods; if (descriptorPlayback.periodCount == 0) { descriptorPlayback.periodCount = MA_DEFAULT_PERIODS; } MA_ZERO_OBJECT(&descriptorCapture); descriptorCapture.pDeviceID = pConfig->capture.pDeviceID; descriptorCapture.shareMode = pConfig->capture.shareMode; descriptorCapture.format = pConfig->capture.format; descriptorCapture.channels = pConfig->capture.channels; descriptorCapture.sampleRate = pConfig->sampleRate; ma_channel_map_copy_or_default(descriptorCapture.channelMap, ma_countof(descriptorCapture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels); descriptorCapture.periodSizeInFrames = pConfig->periodSizeInFrames; descriptorCapture.periodSizeInMilliseconds = pConfig->periodSizeInMilliseconds; descriptorCapture.periodCount = pConfig->periods; if (descriptorCapture.periodCount == 0) { descriptorCapture.periodCount = MA_DEFAULT_PERIODS; } result = pContext->callbacks.onDeviceInit(pDevice, pConfig, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); return result; } #if 0 /* On output the descriptors will contain the *actual* data format of the device. We need this to know how to convert the data between the requested format and the internal format. */ if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { if (!ma_device_descriptor_is_valid(&descriptorCapture)) { ma_device_uninit(pDevice); return MA_INVALID_ARGS; } pDevice->capture.internalFormat = descriptorCapture.format; pDevice->capture.internalChannels = descriptorCapture.channels; pDevice->capture.internalSampleRate = descriptorCapture.sampleRate; ma_channel_map_copy(pDevice->capture.internalChannelMap, descriptorCapture.channelMap, descriptorCapture.channels); pDevice->capture.internalPeriodSizeInFrames = descriptorCapture.periodSizeInFrames; pDevice->capture.internalPeriods = descriptorCapture.periodCount; if (pDevice->capture.internalPeriodSizeInFrames == 0) { pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorCapture.periodSizeInMilliseconds, descriptorCapture.sampleRate); } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { if (!ma_device_descriptor_is_valid(&descriptorPlayback)) { ma_device_uninit(pDevice); return MA_INVALID_ARGS; } pDevice->playback.internalFormat = descriptorPlayback.format; pDevice->playback.internalChannels = descriptorPlayback.channels; pDevice->playback.internalSampleRate = descriptorPlayback.sampleRate; ma_channel_map_copy(pDevice->playback.internalChannelMap, descriptorPlayback.channelMap, descriptorPlayback.channels); pDevice->playback.internalPeriodSizeInFrames = descriptorPlayback.periodSizeInFrames; pDevice->playback.internalPeriods = descriptorPlayback.periodCount; if (pDevice->playback.internalPeriodSizeInFrames == 0) { pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorPlayback.periodSizeInMilliseconds, descriptorPlayback.sampleRate); } } /* The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead. For loopback devices, we need to retrieve the name of the playback device. */ { ma_device_info deviceInfo; if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { result = ma_device_get_info(pDevice, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_playback : ma_device_type_capture, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (descriptorCapture.pDeviceID == NULL) { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), "Capture Device", (size_t)-1); } } } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo); if (result == MA_SUCCESS) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1); } else { /* We failed to retrieve the device info. Fall back to a default name. */ if (descriptorPlayback.pDeviceID == NULL) { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1); } else { ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), "Playback Device", (size_t)-1); } } } } ma_device__post_init_setup(pDevice, pConfig->deviceType); #endif result = ma_device_post_init(pDevice, pConfig->deviceType, &descriptorPlayback, &descriptorCapture); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } /* If we're using fixed sized callbacks we'll need to make use of an intermediary buffer. Needs to be done after post_init_setup() because we'll need access to the sample rate. */ if (pConfig->noFixedSizedCallback == MA_FALSE) { /* We're using a fixed sized data callback so we'll need an intermediary buffer. */ ma_uint32 intermediaryBufferCap = pConfig->periodSizeInFrames; if (intermediaryBufferCap == 0) { intermediaryBufferCap = ma_calculate_buffer_size_in_frames_from_milliseconds(pConfig->periodSizeInMilliseconds, pDevice->sampleRate); } if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) { ma_uint32 intermediaryBufferSizeInBytes; pDevice->capture.intermediaryBufferLen = 0; pDevice->capture.intermediaryBufferCap = intermediaryBufferCap; if (pDevice->capture.intermediaryBufferCap == 0) { pDevice->capture.intermediaryBufferCap = pDevice->capture.internalPeriodSizeInFrames; } intermediaryBufferSizeInBytes = pDevice->capture.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels); pDevice->capture.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks); if (pDevice->capture.pIntermediaryBuffer == NULL) { ma_device_uninit(pDevice); return MA_OUT_OF_MEMORY; } /* Silence the buffer for safety. */ ma_silence_pcm_frames(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap, pDevice->capture.format, pDevice->capture.channels); pDevice->capture.intermediaryBufferLen = pDevice->capture.intermediaryBufferCap; } if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) { ma_uint64 intermediaryBufferSizeInBytes; pDevice->playback.intermediaryBufferLen = 0; if (pConfig->deviceType == ma_device_type_duplex) { pDevice->playback.intermediaryBufferCap = pDevice->capture.intermediaryBufferCap; /* In duplex mode, make sure the intermediary buffer is always the same size as the capture side. */ } else { pDevice->playback.intermediaryBufferCap = intermediaryBufferCap; if (pDevice->playback.intermediaryBufferCap == 0) { pDevice->playback.intermediaryBufferCap = pDevice->playback.internalPeriodSizeInFrames; } } intermediaryBufferSizeInBytes = pDevice->playback.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels); pDevice->playback.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks); if (pDevice->playback.pIntermediaryBuffer == NULL) { ma_device_uninit(pDevice); return MA_OUT_OF_MEMORY; } /* Silence the buffer for safety. */ ma_silence_pcm_frames(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap, pDevice->playback.format, pDevice->playback.channels); pDevice->playback.intermediaryBufferLen = 0; } } else { /* Not using a fixed sized data callback so no need for an intermediary buffer. */ } /* Some backends don't require the worker thread. */ if (!ma_context_is_backend_asynchronous(pContext)) { /* The worker thread. */ result = ma_thread_create(&pDevice->thread, pContext->threadPriority, pContext->threadStackSize, ma_worker_thread, pDevice, &pContext->allocationCallbacks); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } /* Wait for the worker thread to put the device into its stopped state for real. */ ma_event_wait(&pDevice->stopEvent); MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); } else { /* If the backend is asynchronous and the device is duplex, we'll need an intermediary ring buffer. Note that this needs to be done after ma_device__post_init_setup(). */ if (ma_context_is_backend_asynchronous(pContext)) { if (pConfig->deviceType == ma_device_type_duplex) { result = ma_duplex_rb_init(pDevice->capture.format, pDevice->capture.channels, pDevice->sampleRate, pDevice->capture.internalSampleRate, pDevice->capture.internalPeriodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB); if (result != MA_SUCCESS) { ma_device_uninit(pDevice); return result; } } } ma_device__set_state(pDevice, ma_device_state_stopped); } /* Log device information. */ { ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[%s]\n", ma_get_backend_name(pDevice->pContext->backend)); if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(pDevice, ma_device_type_capture, name, sizeof(name), NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " %s (%s)\n", name, "Capture"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Format: %s -> %s\n", ma_get_format_name(pDevice->capture.internalFormat), ma_get_format_name(pDevice->capture.format)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channels: %d -> %d\n", pDevice->capture.internalChannels, pDevice->capture.channels); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Sample Rate: %d -> %d\n", pDevice->capture.internalSampleRate, pDevice->sampleRate); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Buffer Size: %d*%d (%d)\n", pDevice->capture.internalPeriodSizeInFrames, pDevice->capture.internalPeriods, (pDevice->capture.internalPeriodSizeInFrames * pDevice->capture.internalPeriods)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Conversion:\n"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Pre Format Conversion: %s\n", pDevice->capture.converter.hasPreFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Post Format Conversion: %s\n", pDevice->capture.converter.hasPostFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Routing: %s\n", pDevice->capture.converter.hasChannelConverter ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Resampling: %s\n", pDevice->capture.converter.hasResampler ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Passthrough: %s\n", pDevice->capture.converter.isPassthrough ? "YES" : "NO"); { char channelMapStr[1024]; ma_channel_map_to_string(pDevice->capture.internalChannelMap, pDevice->capture.internalChannels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map In: {%s}\n", channelMapStr); ma_channel_map_to_string(pDevice->capture.channelMap, pDevice->capture.channels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map Out: {%s}\n", channelMapStr); } } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(pDevice, ma_device_type_playback, name, sizeof(name), NULL); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " %s (%s)\n", name, "Playback"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Format: %s -> %s\n", ma_get_format_name(pDevice->playback.format), ma_get_format_name(pDevice->playback.internalFormat)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channels: %d -> %d\n", pDevice->playback.channels, pDevice->playback.internalChannels); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Sample Rate: %d -> %d\n", pDevice->sampleRate, pDevice->playback.internalSampleRate); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Buffer Size: %d*%d (%d)\n", pDevice->playback.internalPeriodSizeInFrames, pDevice->playback.internalPeriods, (pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Conversion:\n"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Pre Format Conversion: %s\n", pDevice->playback.converter.hasPreFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Post Format Conversion: %s\n", pDevice->playback.converter.hasPostFormatConversion ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Routing: %s\n", pDevice->playback.converter.hasChannelConverter ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Resampling: %s\n", pDevice->playback.converter.hasResampler ? "YES" : "NO"); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Passthrough: %s\n", pDevice->playback.converter.isPassthrough ? "YES" : "NO"); { char channelMapStr[1024]; ma_channel_map_to_string(pDevice->playback.channelMap, pDevice->playback.channels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map In: {%s}\n", channelMapStr); ma_channel_map_to_string(pDevice->playback.internalChannelMap, pDevice->playback.internalChannels, channelMapStr, sizeof(channelMapStr)); ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, " Channel Map Out: {%s}\n", channelMapStr); } } } MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); return MA_SUCCESS; } MA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice) { ma_result result; ma_context* pContext; ma_backend defaultBackends[ma_backend_null+1]; ma_uint32 iBackend; ma_backend* pBackendsToIterate; ma_uint32 backendsToIterateCount; ma_allocation_callbacks allocationCallbacks; if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pContextConfig != NULL) { result = ma_allocation_callbacks_init_copy(&allocationCallbacks, &pContextConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } } else { allocationCallbacks = ma_allocation_callbacks_init_default(); } pContext = (ma_context*)ma_malloc(sizeof(*pContext), &allocationCallbacks); if (pContext == NULL) { return MA_OUT_OF_MEMORY; } for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) { defaultBackends[iBackend] = (ma_backend)iBackend; } pBackendsToIterate = (ma_backend*)backends; backendsToIterateCount = backendCount; if (pBackendsToIterate == NULL) { pBackendsToIterate = (ma_backend*)defaultBackends; backendsToIterateCount = ma_countof(defaultBackends); } result = MA_NO_BACKEND; for (iBackend = 0; iBackend < backendsToIterateCount; ++iBackend) { /* This is a hack for iOS. If the context config is null, there's a good chance the `ma_device_init(NULL, &deviceConfig, pDevice);` pattern is being used. In this case, set the session category based on the device type. */ #if defined(MA_APPLE_MOBILE) ma_context_config contextConfig; if (pContextConfig == NULL) { contextConfig = ma_context_config_init(); switch (pConfig->deviceType) { case ma_device_type_duplex: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_play_and_record; } break; case ma_device_type_capture: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_record; } break; case ma_device_type_playback: default: { contextConfig.coreaudio.sessionCategory = ma_ios_session_category_playback; } break; } pContextConfig = &contextConfig; } #endif result = ma_context_init(&pBackendsToIterate[iBackend], 1, pContextConfig, pContext); if (result == MA_SUCCESS) { result = ma_device_init(pContext, pConfig, pDevice); if (result == MA_SUCCESS) { break; /* Success. */ } else { ma_context_uninit(pContext); /* Failure. */ } } } if (result != MA_SUCCESS) { ma_free(pContext, &allocationCallbacks); return result; } pDevice->isOwnerOfContext = MA_TRUE; return result; } MA_API void ma_device_uninit(ma_device* pDevice) { if (!ma_device__is_initialized(pDevice)) { return; } /* It's possible for the miniaudio side of the device and the backend to not be in sync due to system-level situations such as the computer being put into sleep mode and the backend not notifying miniaudio of the fact the device has stopped. It's possible for this to result in a deadlock due to miniaudio thinking the device is in a running state, when in fact it's not running at all. For this reason I am no longer explicitly stopping the device. I don't think this should affect anyone in practice since uninitializing the backend will naturally stop the device anyway. */ #if 0 { /* Make sure the device is stopped first. The backends will probably handle this naturally, but I like to do it explicitly for my own sanity. */ if (ma_device_is_started(pDevice)) { ma_device_stop(pDevice); } } #endif /* Putting the device into an uninitialized state will make the worker thread return. */ ma_device__set_state(pDevice, ma_device_state_uninitialized); /* Wake up the worker thread and wait for it to properly terminate. */ if (!ma_context_is_backend_asynchronous(pDevice->pContext)) { ma_event_signal(&pDevice->wakeupEvent); ma_thread_wait(&pDevice->thread); } if (pDevice->pContext->callbacks.onDeviceUninit != NULL) { pDevice->pContext->callbacks.onDeviceUninit(pDevice); } ma_event_uninit(&pDevice->stopEvent); ma_event_uninit(&pDevice->startEvent); ma_event_uninit(&pDevice->wakeupEvent); ma_mutex_uninit(&pDevice->startStopLock); if (ma_context_is_backend_asynchronous(pDevice->pContext)) { if (pDevice->type == ma_device_type_duplex) { ma_duplex_rb_uninit(&pDevice->duplexRB); } } if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) { ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks); } if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) { ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks); } if (pDevice->playback.pInputCache != NULL) { ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks); } if (pDevice->capture.pIntermediaryBuffer != NULL) { ma_free(pDevice->capture.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); } if (pDevice->playback.pIntermediaryBuffer != NULL) { ma_free(pDevice->playback.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks); } if (pDevice->isOwnerOfContext) { ma_allocation_callbacks allocationCallbacks = pDevice->pContext->allocationCallbacks; ma_context_uninit(pDevice->pContext); ma_free(pDevice->pContext, &allocationCallbacks); } MA_ZERO_OBJECT(pDevice); } MA_API ma_context* ma_device_get_context(ma_device* pDevice) { if (pDevice == NULL) { return NULL; } return pDevice->pContext; } MA_API ma_log* ma_device_get_log(ma_device* pDevice) { return ma_context_get_log(ma_device_get_context(pDevice)); } MA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo) { if (pDeviceInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDeviceInfo); if (pDevice == NULL) { return MA_INVALID_ARGS; } /* If the onDeviceGetInfo() callback is set, use that. Otherwise we'll fall back to ma_context_get_device_info(). */ if (pDevice->pContext->callbacks.onDeviceGetInfo != NULL) { return pDevice->pContext->callbacks.onDeviceGetInfo(pDevice, type, pDeviceInfo); } /* Getting here means onDeviceGetInfo is not implemented so we need to fall back to an alternative. */ if (type == ma_device_type_playback) { return ma_context_get_device_info(pDevice->pContext, type, pDevice->playback.pID, pDeviceInfo); } else { /* Here we're getting the capture side, which is the branch we'll be entering for a loopback device, since loopback is capturing. However, if the device is using the default device ID, it won't get the correct information because it'll think we're asking for the default capture device, where in fact for loopback we want the default *playback* device. We'll do a bit of a hack here to make sure we get the correct info. */ if (pDevice->type == ma_device_type_loopback && pDevice->capture.pID == NULL) { type = ma_device_type_playback; } return ma_context_get_device_info(pDevice->pContext, type, pDevice->capture.pID, pDeviceInfo); } } MA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator) { ma_result result; ma_device_info deviceInfo; if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = 0; } if (pName != NULL && nameCap > 0) { pName[0] = '\0'; } result = ma_device_get_info(pDevice, type, &deviceInfo); if (result != MA_SUCCESS) { return result; } if (pName != NULL) { ma_strncpy_s(pName, nameCap, deviceInfo.name, (size_t)-1); /* For safety, make sure the length is based on the truncated output string rather than the source. Otherwise the caller might assume the output buffer contains more content than it actually does. */ if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = strlen(pName); } } else { /* Name not specified. Just report the length of the source string. */ if (pLengthNotIncludingNullTerminator != NULL) { *pLengthNotIncludingNullTerminator = strlen(deviceInfo.name); } } return MA_SUCCESS; } MA_API ma_result ma_device_start(ma_device* pDevice) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { return MA_INVALID_OPERATION; /* Not initialized. */ } if (ma_device_get_state(pDevice) == ma_device_state_started) { return MA_SUCCESS; /* Already started. */ } ma_mutex_lock(&pDevice->startStopLock); { /* We need to check again if the device is in a started state because it's possible for one thread to have started the device while another was waiting on the mutex. */ if (ma_device_get_state(pDevice) == ma_device_state_started) { ma_mutex_unlock(&pDevice->startStopLock); return MA_SUCCESS; /* Already started. */ } /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a stopped or paused state. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped); ma_device__set_state(pDevice, ma_device_state_starting); /* Asynchronous backends need to be handled differently. */ if (ma_context_is_backend_asynchronous(pDevice->pContext)) { if (pDevice->pContext->callbacks.onDeviceStart != NULL) { result = pDevice->pContext->callbacks.onDeviceStart(pDevice); } else { result = MA_INVALID_OPERATION; } if (result == MA_SUCCESS) { ma_device__set_state(pDevice, ma_device_state_started); ma_device__on_notification_started(pDevice); } } else { /* Synchronous backends are started by signaling an event that's being waited on in the worker thread. We first wake up the thread and then wait for the start event. */ ma_event_signal(&pDevice->wakeupEvent); /* Wait for the worker thread to finish starting the device. Note that the worker thread will be the one who puts the device into the started state. Don't call ma_device__set_state() here. */ ma_event_wait(&pDevice->startEvent); result = pDevice->workResult; } /* We changed the state from stopped to started, so if we failed, make sure we put the state back to stopped. */ if (result != MA_SUCCESS) { ma_device__set_state(pDevice, ma_device_state_stopped); } } ma_mutex_unlock(&pDevice->startStopLock); return result; } MA_API ma_result ma_device_stop(ma_device* pDevice) { ma_result result; if (pDevice == NULL) { return MA_INVALID_ARGS; } if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) { return MA_INVALID_OPERATION; /* Not initialized. */ } if (ma_device_get_state(pDevice) == ma_device_state_stopped) { return MA_SUCCESS; /* Already stopped. */ } ma_mutex_lock(&pDevice->startStopLock); { /* We need to check again if the device is in a stopped state because it's possible for one thread to have stopped the device while another was waiting on the mutex. */ if (ma_device_get_state(pDevice) == ma_device_state_stopped) { ma_mutex_unlock(&pDevice->startStopLock); return MA_SUCCESS; /* Already stopped. */ } /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a started or paused state. */ MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_started); ma_device__set_state(pDevice, ma_device_state_stopping); /* Asynchronous backends need to be handled differently. */ if (ma_context_is_backend_asynchronous(pDevice->pContext)) { /* Asynchronous backends must have a stop operation. */ if (pDevice->pContext->callbacks.onDeviceStop != NULL) { result = pDevice->pContext->callbacks.onDeviceStop(pDevice); } else { result = MA_INVALID_OPERATION; } ma_device__set_state(pDevice, ma_device_state_stopped); } else { /* Synchronous backends. The stop callback is always called from the worker thread. Do not call the stop callback here. If the backend is implementing its own audio thread loop we'll need to wake it up if required. Note that we need to make sure the state of the device is *not* playing right now, which it shouldn't be since we set it above. This is super important though, so I'm asserting it here as well for extra safety in case we accidentally change something later. */ MA_ASSERT(ma_device_get_state(pDevice) != ma_device_state_started); if (pDevice->pContext->callbacks.onDeviceDataLoopWakeup != NULL) { pDevice->pContext->callbacks.onDeviceDataLoopWakeup(pDevice); } /* We need to wait for the worker thread to become available for work before returning. Note that the worker thread will be the one who puts the device into the stopped state. Don't call ma_device__set_state() here. */ ma_event_wait(&pDevice->stopEvent); result = MA_SUCCESS; } /* This is a safety measure to ensure the internal buffer has been cleared so any leftover does not get played the next time the device starts. Ideally this should be drained by the backend first. */ pDevice->playback.intermediaryBufferLen = 0; pDevice->playback.inputCacheConsumed = 0; pDevice->playback.inputCacheRemaining = 0; } ma_mutex_unlock(&pDevice->startStopLock); return result; } MA_API ma_bool32 ma_device_is_started(const ma_device* pDevice) { return ma_device_get_state(pDevice) == ma_device_state_started; } MA_API ma_device_state ma_device_get_state(const ma_device* pDevice) { if (pDevice == NULL) { return ma_device_state_uninitialized; } return ma_atomic_device_state_get((ma_atomic_device_state*)&pDevice->state); /* Naughty cast to get rid of a const warning. */ } MA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume) { if (pDevice == NULL) { return MA_INVALID_ARGS; } if (volume < 0.0f) { return MA_INVALID_ARGS; } ma_atomic_float_set(&pDevice->masterVolumeFactor, volume); return MA_SUCCESS; } MA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume) { if (pVolume == NULL) { return MA_INVALID_ARGS; } if (pDevice == NULL) { *pVolume = 0; return MA_INVALID_ARGS; } *pVolume = ma_atomic_float_get(&pDevice->masterVolumeFactor); return MA_SUCCESS; } MA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB) { if (gainDB > 0) { return MA_INVALID_ARGS; } return ma_device_set_master_volume(pDevice, ma_volume_db_to_linear(gainDB)); } MA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB) { float factor; ma_result result; if (pGainDB == NULL) { return MA_INVALID_ARGS; } result = ma_device_get_master_volume(pDevice, &factor); if (result != MA_SUCCESS) { *pGainDB = 0; return result; } *pGainDB = ma_volume_linear_to_db(factor); return MA_SUCCESS; } MA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { if (pDevice == NULL) { return MA_INVALID_ARGS; } if (pOutput == NULL && pInput == NULL) { return MA_INVALID_ARGS; } /* There is an assert deeper in the code that checks that frameCount > 0. Since this is a public facing API we'll need to check for that here. I've had reports that AAudio can sometimes post a frame count of 0. */ if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDevice->type == ma_device_type_duplex) { if (pInput != NULL) { ma_device__handle_duplex_callback_capture(pDevice, frameCount, pInput, &pDevice->duplexRB.rb); } if (pOutput != NULL) { ma_device__handle_duplex_callback_playback(pDevice, frameCount, pOutput, &pDevice->duplexRB.rb); } } else { if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_loopback) { if (pInput == NULL) { return MA_INVALID_ARGS; } ma_device__send_frames_to_client(pDevice, frameCount, pInput); } if (pDevice->type == ma_device_type_playback) { if (pOutput == NULL) { return MA_INVALID_ARGS; } ma_device__read_frames_from_client(pDevice, frameCount, pOutput); } } return MA_SUCCESS; } MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile) { if (pDescriptor == NULL) { return 0; } /* We must have a non-0 native sample rate, but some backends don't allow retrieval of this at the time when the size of the buffer needs to be determined. In this case we need to just take a best guess and move on. We'll try using the sample rate in pDescriptor first. If that's not set we'll just fall back to MA_DEFAULT_SAMPLE_RATE. */ if (nativeSampleRate == 0) { nativeSampleRate = pDescriptor->sampleRate; } if (nativeSampleRate == 0) { nativeSampleRate = MA_DEFAULT_SAMPLE_RATE; } MA_ASSERT(nativeSampleRate != 0); if (pDescriptor->periodSizeInFrames == 0) { if (pDescriptor->periodSizeInMilliseconds == 0) { if (performanceProfile == ma_performance_profile_low_latency) { return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, nativeSampleRate); } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, nativeSampleRate); } } else { return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate); } } else { return pDescriptor->periodSizeInFrames; } } #endif /* MA_NO_DEVICE_IO */ MA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate) { /* Prevent a division by zero. */ if (sampleRate == 0) { return 0; } return (bufferSizeInFrames*1000 + (sampleRate - 1)) / sampleRate; } MA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate) { /* Prevent a division by zero. */ if (sampleRate == 0) { return 0; } return bufferSizeInMilliseconds*sampleRate / 1000; } MA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { if (dst == src) { return; /* No-op. */ } ma_copy_memory_64(dst, src, frameCount * ma_get_bytes_per_frame(format, channels)); } MA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { if (format == ma_format_u8) { ma_uint64 sampleCount = frameCount * channels; ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { ((ma_uint8*)p)[iSample] = 128; } } else { ma_zero_memory_64(p, frameCount * ma_get_bytes_per_frame(format, channels)); } } MA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels) { return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels)); } MA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels) { return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels)); } MA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_u8(pSrc[iSample]); } } MA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s16(pSrc[iSample]); } } MA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { ma_int64 s = ma_clip_s24(pSrc[iSample]); pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >> 0); pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >> 8); pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16); } } MA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s32(pSrc[iSample]); } } MA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_f32(pSrc[iSample]); } } MA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels) { ma_uint64 sampleCount; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); sampleCount = frameCount * channels; switch (format) { case ma_format_u8: ma_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount); break; case ma_format_s16: ma_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount); break; case ma_format_s24: ma_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount); break; case ma_format_s32: ma_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount); break; case ma_format_f32: ma_clip_samples_f32(( float*)pDst, (const float*)pSrc, sampleCount); break; /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */ case ma_format_unknown: case ma_format_count: break; } } MA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_uint8)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_int16)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; ma_uint8* pSamplesOut8; ma_uint8* pSamplesIn8; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } pSamplesOut8 = (ma_uint8*)pSamplesOut; pSamplesIn8 = (ma_uint8*)pSamplesIn; for (iSample = 0; iSample < sampleCount; iSample += 1) { ma_int32 sampleS32; sampleS32 = (ma_int32)(((ma_uint32)(pSamplesIn8[iSample*3+0]) << 8) | ((ma_uint32)(pSamplesIn8[iSample*3+1]) << 16) | ((ma_uint32)(pSamplesIn8[iSample*3+2])) << 24); sampleS32 = (ma_int32)(sampleS32 * factor); pSamplesOut8[iSample*3+0] = (ma_uint8)(((ma_uint32)sampleS32 & 0x0000FF00) >> 8); pSamplesOut8[iSample*3+1] = (ma_uint8)(((ma_uint32)sampleS32 & 0x00FF0000) >> 16); pSamplesOut8[iSample*3+2] = (ma_uint8)(((ma_uint32)sampleS32 & 0xFF000000) >> 24); } } MA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = (ma_int32)(pSamplesIn[iSample] * factor); } } MA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor) { ma_uint64 iSample; if (pSamplesOut == NULL || pSamplesIn == NULL) { return; } if (factor == 1) { if (pSamplesOut == pSamplesIn) { /* In place. No-op. */ } else { /* Just a copy. */ for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = pSamplesIn[iSample]; } } } else { for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamplesOut[iSample] = pSamplesIn[iSample] * factor; } } } MA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_u8(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s16(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s24(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_s32(pSamples, pSamples, sampleCount, factor); } MA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor) { ma_copy_and_apply_volume_factor_f32(pSamples, pSamples, sampleCount, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_u8(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s16(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s24(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_s32(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_f32(pFramesOut, pFramesIn, frameCount*channels, factor); } MA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor) { switch (format) { case ma_format_u8: ma_copy_and_apply_volume_factor_pcm_frames_u8 ((ma_uint8*)pFramesOut, (const ma_uint8*)pFramesIn, frameCount, channels, factor); return; case ma_format_s16: ma_copy_and_apply_volume_factor_pcm_frames_s16((ma_int16*)pFramesOut, (const ma_int16*)pFramesIn, frameCount, channels, factor); return; case ma_format_s24: ma_copy_and_apply_volume_factor_pcm_frames_s24( pFramesOut, pFramesIn, frameCount, channels, factor); return; case ma_format_s32: ma_copy_and_apply_volume_factor_pcm_frames_s32((ma_int32*)pFramesOut, (const ma_int32*)pFramesIn, frameCount, channels, factor); return; case ma_format_f32: ma_copy_and_apply_volume_factor_pcm_frames_f32( (float*)pFramesOut, (const float*)pFramesIn, frameCount, channels, factor); return; default: return; /* Do nothing. */ } } MA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_u8(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s16(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s24(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_s32(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames_f32(pFrames, pFrames, frameCount, channels, factor); } MA_API void ma_apply_volume_factor_pcm_frames(void* pFramesOut, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor) { ma_copy_and_apply_volume_factor_pcm_frames(pFramesOut, pFramesOut, frameCount, format, channels, factor); } MA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains) { ma_uint64 iFrame; if (channels == 2) { /* TODO: Do an optimized implementation for stereo and mono. Can do a SIMD optimized implementation as well. */ } for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOut[iFrame * channels + iChannel] = pFramesIn[iFrame * channels + iChannel] * pChannelGains[iChannel]; } } } static MA_INLINE ma_int16 ma_apply_volume_unclipped_u8(ma_int16 x, ma_int16 volume) { return (ma_int16)(((ma_int32)x * (ma_int32)volume) >> 8); } static MA_INLINE ma_int32 ma_apply_volume_unclipped_s16(ma_int32 x, ma_int16 volume) { return (ma_int32)((x * volume) >> 8); } static MA_INLINE ma_int64 ma_apply_volume_unclipped_s24(ma_int64 x, ma_int16 volume) { return (ma_int64)((x * volume) >> 8); } static MA_INLINE ma_int64 ma_apply_volume_unclipped_s32(ma_int64 x, ma_int16 volume) { return (ma_int64)((x * volume) >> 8); } static MA_INLINE float ma_apply_volume_unclipped_f32(float x, float volume) { return x * volume; } MA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_u8(ma_apply_volume_unclipped_u8(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s16(ma_apply_volume_unclipped_s16(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { ma_int64 s = ma_clip_s24(ma_apply_volume_unclipped_s24(pSrc[iSample], volumeFixed)); pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >> 0); pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >> 8); pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; ma_int16 volumeFixed; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); volumeFixed = ma_float_to_fixed_16(volume); for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_s32(ma_apply_volume_unclipped_s32(pSrc[iSample], volumeFixed)); } } MA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume) { ma_uint64 iSample; MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); /* For the f32 case we need to make sure this supports in-place processing where the input and output buffers are the same. */ for (iSample = 0; iSample < count; iSample += 1) { pDst[iSample] = ma_clip_f32(ma_apply_volume_unclipped_f32(pSrc[iSample], volume)); } } MA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume) { MA_ASSERT(pDst != NULL); MA_ASSERT(pSrc != NULL); if (volume == 1) { ma_clip_pcm_frames(pDst, pSrc, frameCount, format, channels); /* Optimized case for volume = 1. */ } else if (volume == 0) { ma_silence_pcm_frames(pDst, frameCount, format, channels); /* Optimized case for volume = 0. */ } else { ma_uint64 sampleCount = frameCount * channels; switch (format) { case ma_format_u8: ma_copy_and_apply_volume_and_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount, volume); break; case ma_format_s16: ma_copy_and_apply_volume_and_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount, volume); break; case ma_format_s24: ma_copy_and_apply_volume_and_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break; case ma_format_s32: ma_copy_and_apply_volume_and_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break; case ma_format_f32: ma_copy_and_apply_volume_and_clip_samples_f32(( float*)pDst, (const float*)pSrc, sampleCount, volume); break; /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */ case ma_format_unknown: case ma_format_count: break; } } } MA_API float ma_volume_linear_to_db(float factor) { return 20*ma_log10f(factor); } MA_API float ma_volume_db_to_linear(float gain) { return ma_powf(10, gain/20.0f); } MA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume) { ma_uint64 iSample; ma_uint64 sampleCount; if (pDst == NULL || pSrc == NULL || channels == 0) { return MA_INVALID_ARGS; } if (volume == 0) { return MA_SUCCESS; /* No changes if the volume is 0. */ } sampleCount = frameCount * channels; if (volume == 1) { for (iSample = 0; iSample < sampleCount; iSample += 1) { pDst[iSample] += pSrc[iSample]; } } else { for (iSample = 0; iSample < sampleCount; iSample += 1) { pDst[iSample] += ma_apply_volume_unclipped_f32(pSrc[iSample], volume); } } return MA_SUCCESS; } /************************************************************************************************************************************************************** Format Conversion **************************************************************************************************************************************************************/ static MA_INLINE ma_int16 ma_pcm_sample_f32_to_s16(float x) { return (ma_int16)(x * 32767.0f); } static MA_INLINE ma_int16 ma_pcm_sample_u8_to_s16_no_scale(ma_uint8 x) { return (ma_int16)((ma_int16)x - 128); } static MA_INLINE ma_int64 ma_pcm_sample_s24_to_s32_no_scale(const ma_uint8* x) { return (ma_int64)(((ma_uint64)x[0] << 40) | ((ma_uint64)x[1] << 48) | ((ma_uint64)x[2] << 56)) >> 40; /* Make sure the sign bits are maintained. */ } static MA_INLINE void ma_pcm_sample_s32_to_s24_no_scale(ma_int64 x, ma_uint8* s24) { s24[0] = (ma_uint8)((x & 0x000000FF) >> 0); s24[1] = (ma_uint8)((x & 0x0000FF00) >> 8); s24[2] = (ma_uint8)((x & 0x00FF0000) >> 16); } /* u8 */ MA_API void ma_pcm_u8_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_uint8)); } static MA_INLINE void ma_pcm_u8_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_u8[i]; x = (ma_int16)(x - 128); x = (ma_int16)(x << 8); dst_s16[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_u8[i]; x = (ma_int16)(x - 128); dst_s24[i*3+0] = 0; dst_s24[i*3+1] = 0; dst_s24[i*3+2] = (ma_uint8)((ma_int8)x); } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_u8[i]; x = x - 128; x = x << 24; dst_s32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_u8_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)src_u8[i]; x = x * 0.00784313725490196078f; /* 0..255 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_u8_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_u8_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_u8_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_u8_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_u8_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_u8_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode); } #endif } #ifdef MA_USE_REFERENCE_CONVERSION_APIS static MA_INLINE void ma_pcm_interleave_u8__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8** src_u8 = (const ma_uint8**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame]; } } } #else static MA_INLINE void ma_pcm_interleave_u8__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8** src_u8 = (const ma_uint8**)src; if (channels == 1) { ma_copy_memory_64(dst, src[0], frameCount * sizeof(ma_uint8)); } else if (channels == 2) { ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { dst_u8[iFrame*2 + 0] = src_u8[0][iFrame]; dst_u8[iFrame*2 + 1] = src_u8[1][iFrame]; } } else { ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame]; } } } } #endif MA_API void ma_pcm_interleave_u8(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_u8__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_u8__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_u8__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8** dst_u8 = (ma_uint8**)dst; const ma_uint8* src_u8 = (const ma_uint8*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_u8[iChannel][iFrame] = src_u8[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_u8__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_u8(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_u8__optimized(dst, src, frameCount, channels); #endif } /* s16 */ static MA_INLINE void ma_pcm_s16_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_int16* src_s16 = (const ma_int16*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_s16[i]; x = (ma_int16)(x >> 8); x = (ma_int16)(x + 128); dst_u8[i] = (ma_uint8)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int16 x = src_s16[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x80, 0x7F); if ((x + dither) <= 0x7FFF) { x = (ma_int16)(x + dither); } else { x = 0x7FFF; } x = (ma_int16)(x >> 8); x = (ma_int16)(x + 128); dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s16_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s16_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_int16)); } static MA_INLINE void ma_pcm_s16_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s24[i*3+0] = 0; dst_s24[i*3+1] = (ma_uint8)(src_s16[i] & 0xFF); dst_s24[i*3+2] = (ma_uint8)(src_s16[i] >> 8); } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s16_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s32[i] = src_s16[i] << 16; } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s16_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)src_s16[i]; #if 0 /* The accurate way. */ x = x + 32768.0f; /* -32768..32767 to 0..65535 */ x = x * 0.00003051804379339284f; /* 0..65535 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ #else /* The fast way. */ x = x * 0.000030517578125f; /* -32768..32767 to -1..0.999969482421875 */ #endif dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_s16_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s16_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s16_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s16_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s16_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s16_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s16__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_int16** src_s16 = (const ma_int16**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s16[iFrame*channels + iChannel] = src_s16[iChannel][iFrame]; } } } static MA_INLINE void ma_pcm_interleave_s16__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s16__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s16(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s16__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s16__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s16__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_int16** dst_s16 = (ma_int16**)dst; const ma_int16* src_s16 = (const ma_int16*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s16[iChannel][iFrame] = src_s16[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_s16__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s16(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s16__optimized(dst, src, frameCount, channels); #endif } /* s24 */ static MA_INLINE void ma_pcm_s24_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { dst_u8[i] = (ma_uint8)((ma_int8)src_s24[i*3 + 2] + 128); } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s24_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s24_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_uint16 dst_lo = ((ma_uint16)src_s24[i*3 + 1]); ma_uint16 dst_hi = (ma_uint16)((ma_uint16)src_s24[i*3 + 2] << 8); dst_s16[i] = (ma_int16)(dst_lo | dst_hi); } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 16; dst_s16[i] = (ma_int16)x; } } } static MA_INLINE void ma_pcm_s24_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s24_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * 3); } static MA_INLINE void ma_pcm_s24_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { dst_s32[i] = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24); } (void)ditherMode; } static MA_INLINE void ma_pcm_s24_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s24_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_uint8* src_s24 = (const ma_uint8*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { float x = (float)(((ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24)) >> 8); #if 0 /* The accurate way. */ x = x + 8388608.0f; /* -8388608..8388607 to 0..16777215 */ x = x * 0.00000011920929665621f; /* 0..16777215 to 0..2 */ x = x - 1; /* 0..2 to -1..1 */ #else /* The fast way. */ x = x * 0.00000011920928955078125f; /* -8388608..8388607 to -1..0.999969482421875 */ #endif dst_f32[i] = x; } (void)ditherMode; } static MA_INLINE void ma_pcm_s24_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s24_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s24_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s24_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s24_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s24_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s24__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8* dst8 = (ma_uint8*)dst; const ma_uint8** src8 = (const ma_uint8**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst8[iFrame*3*channels + iChannel*3 + 0] = src8[iChannel][iFrame*3 + 0]; dst8[iFrame*3*channels + iChannel*3 + 1] = src8[iChannel][iFrame*3 + 1]; dst8[iFrame*3*channels + iChannel*3 + 2] = src8[iChannel][iFrame*3 + 2]; } } } static MA_INLINE void ma_pcm_interleave_s24__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s24__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s24(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s24__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s24__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s24__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_uint8** dst8 = (ma_uint8**)dst; const ma_uint8* src8 = (const ma_uint8*)src; ma_uint32 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst8[iChannel][iFrame*3 + 0] = src8[iFrame*3*channels + iChannel*3 + 0]; dst8[iChannel][iFrame*3 + 1] = src8[iFrame*3*channels + iChannel*3 + 1]; dst8[iChannel][iFrame*3 + 2] = src8[iFrame*3*channels + iChannel*3 + 2]; } } } static MA_INLINE void ma_pcm_deinterleave_s24__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s24(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s24__optimized(dst, src, frameCount, channels); #endif } /* s32 */ static MA_INLINE void ma_pcm_s32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_u8 = (ma_uint8*)dst; const ma_int32* src_s32 = (const ma_int32*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 24; x = x + 128; dst_u8[i] = (ma_uint8)x; } } } static MA_INLINE void ma_pcm_s32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int16* dst_s16 = (ma_int16*)dst; const ma_int32* src_s32 = (const ma_int32*)src; if (ditherMode == ma_dither_mode_none) { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; x = x >> 16; dst_s16[i] = (ma_int16)x; } } else { ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 x = src_s32[i]; /* Dither. Don't overflow. */ ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF); if ((ma_int64)x + dither <= 0x7FFFFFFF) { x = x + dither; } else { x = 0x7FFFFFFF; } x = x >> 16; dst_s16[i] = (ma_int16)x; } } } static MA_INLINE void ma_pcm_s32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_s32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_uint32 x = (ma_uint32)src_s32[i]; dst_s24[i*3+0] = (ma_uint8)((x & 0x0000FF00) >> 8); dst_s24[i*3+1] = (ma_uint8)((x & 0x00FF0000) >> 16); dst_s24[i*3+2] = (ma_uint8)((x & 0xFF000000) >> 24); } (void)ditherMode; /* No dithering for s32 -> s24. */ } static MA_INLINE void ma_pcm_s32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_s32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(ma_int32)); } static MA_INLINE void ma_pcm_s32_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { float* dst_f32 = (float*)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { double x = src_s32[i]; #if 0 x = x + 2147483648.0; x = x * 0.0000000004656612873077392578125; x = x - 1; #else x = x / 2147483648.0; #endif dst_f32[i] = (float)x; } (void)ditherMode; /* No dithering for s32 -> f32. */ } static MA_INLINE void ma_pcm_s32_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_s32_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_s32_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_s32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_s32_to_f32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_s32_to_f32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_interleave_s32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_int32* dst_s32 = (ma_int32*)dst; const ma_int32** src_s32 = (const ma_int32**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s32[iFrame*channels + iChannel] = src_s32[iChannel][iFrame]; } } } static MA_INLINE void ma_pcm_interleave_s32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_s32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_s32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_s32__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_s32__optimized(dst, src, frameCount, channels); #endif } static MA_INLINE void ma_pcm_deinterleave_s32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_int32** dst_s32 = (ma_int32**)dst; const ma_int32* src_s32 = (const ma_int32*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_s32[iChannel][iFrame] = src_s32[iFrame*channels + iChannel]; } } } static MA_INLINE void ma_pcm_deinterleave_s32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_s32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_s32__optimized(dst, src, frameCount, channels); #endif } /* f32 */ static MA_INLINE void ma_pcm_f32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint8* dst_u8 = (ma_uint8*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -128; ditherMax = 1.0f / 127; } for (i = 0; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x + 1; /* -1..1 to 0..2 */ x = x * 127.5f; /* 0..2 to 0..255 */ dst_u8[i] = (ma_uint8)x; } } static MA_INLINE void ma_pcm_f32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_u8__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_u8__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode); } #endif } #ifdef MA_USE_REFERENCE_CONVERSION_APIS static MA_INLINE void ma_pcm_f32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_int16* dst_s16 = (ma_int16*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } for (i = 0; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 32767.5f; /* 0..2 to 0..65535 */ x = x - 32768.0f; /* 0...65535 to -32768..32767 */ #else /* The fast way. */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ #endif dst_s16[i] = (ma_int16)x; } } #else static MA_INLINE void ma_pcm_f32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i4; ma_uint64 count4; ma_int16* dst_s16 = (ma_int16*)dst; const float* src_f32 = (const float*)src; float ditherMin = 0; float ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } /* Unrolled. */ i = 0; count4 = count >> 2; for (i4 = 0; i4 < count4; i4 += 1) { float d0 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d1 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d2 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float d3 = ma_dither_f32(ditherMode, ditherMin, ditherMax); float x0 = src_f32[i+0]; float x1 = src_f32[i+1]; float x2 = src_f32[i+2]; float x3 = src_f32[i+3]; x0 = x0 + d0; x1 = x1 + d1; x2 = x2 + d2; x3 = x3 + d3; x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0)); x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1)); x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2)); x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3)); x0 = x0 * 32767.0f; x1 = x1 * 32767.0f; x2 = x2 * 32767.0f; x3 = x3 * 32767.0f; dst_s16[i+0] = (ma_int16)x0; dst_s16[i+1] = (ma_int16)x1; dst_s16[i+2] = (ma_int16)x2; dst_s16[i+3] = (ma_int16)x3; i += 4; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i8; ma_uint64 count8; ma_int16* dst_s16; const float* src_f32; float ditherMin; float ditherMax; /* Both the input and output buffers need to be aligned to 16 bytes. */ if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } dst_s16 = (ma_int16*)dst; src_f32 = (const float*)src; ditherMin = 0; ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } i = 0; /* SSE2. SSE allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */ count8 = count >> 3; for (i8 = 0; i8 < count8; i8 += 1) { __m128 d0; __m128 d1; __m128 x0; __m128 x1; if (ditherMode == ma_dither_mode_none) { d0 = _mm_set1_ps(0); d1 = _mm_set1_ps(0); } else if (ditherMode == ma_dither_mode_rectangle) { d0 = _mm_set_ps( ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax) ); d1 = _mm_set_ps( ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax), ma_dither_f32_rectangle(ditherMin, ditherMax) ); } else { d0 = _mm_set_ps( ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax) ); d1 = _mm_set_ps( ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax), ma_dither_f32_triangle(ditherMin, ditherMax) ); } x0 = *((__m128*)(src_f32 + i) + 0); x1 = *((__m128*)(src_f32 + i) + 1); x0 = _mm_add_ps(x0, d0); x1 = _mm_add_ps(x1, d1); x0 = _mm_mul_ps(x0, _mm_set1_ps(32767.0f)); x1 = _mm_mul_ps(x1, _mm_set1_ps(32767.0f)); _mm_stream_si128(((__m128i*)(dst_s16 + i)), _mm_packs_epi32(_mm_cvttps_epi32(x0), _mm_cvttps_epi32(x1))); i += 8; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #endif /* SSE2 */ #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint64 i; ma_uint64 i8; ma_uint64 count8; ma_int16* dst_s16; const float* src_f32; float ditherMin; float ditherMax; if (!ma_has_neon()) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } /* Both the input and output buffers need to be aligned to 16 bytes. */ if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); return; } dst_s16 = (ma_int16*)dst; src_f32 = (const float*)src; ditherMin = 0; ditherMax = 0; if (ditherMode != ma_dither_mode_none) { ditherMin = 1.0f / -32768; ditherMax = 1.0f / 32767; } i = 0; /* NEON. NEON allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */ count8 = count >> 3; for (i8 = 0; i8 < count8; i8 += 1) { float32x4_t d0; float32x4_t d1; float32x4_t x0; float32x4_t x1; int32x4_t i0; int32x4_t i1; if (ditherMode == ma_dither_mode_none) { d0 = vmovq_n_f32(0); d1 = vmovq_n_f32(0); } else if (ditherMode == ma_dither_mode_rectangle) { float d0v[4]; float d1v[4]; d0v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); d0 = vld1q_f32(d0v); d1v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); d1 = vld1q_f32(d1v); } else { float d0v[4]; float d1v[4]; d0v[0] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[1] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[2] = ma_dither_f32_triangle(ditherMin, ditherMax); d0v[3] = ma_dither_f32_triangle(ditherMin, ditherMax); d0 = vld1q_f32(d0v); d1v[0] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[1] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[2] = ma_dither_f32_triangle(ditherMin, ditherMax); d1v[3] = ma_dither_f32_triangle(ditherMin, ditherMax); d1 = vld1q_f32(d1v); } x0 = *((float32x4_t*)(src_f32 + i) + 0); x1 = *((float32x4_t*)(src_f32 + i) + 1); x0 = vaddq_f32(x0, d0); x1 = vaddq_f32(x1, d1); x0 = vmulq_n_f32(x0, 32767.0f); x1 = vmulq_n_f32(x1, 32767.0f); i0 = vcvtq_s32_f32(x0); i1 = vcvtq_s32_f32(x1); *((int16x8_t*)(dst_s16 + i)) = vcombine_s16(vqmovn_s32(i0), vqmovn_s32(i1)); i += 8; } /* Leftover. */ for (; i < count; i += 1) { float x = src_f32[i]; x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax); x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst_s16[i] = (ma_int16)x; } } #endif /* Neon */ #endif /* MA_USE_REFERENCE_CONVERSION_APIS */ MA_API void ma_pcm_f32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s16__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s16__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s16__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_f32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_uint8* dst_s24 = (ma_uint8*)dst; const float* src_f32 = (const float*)src; ma_uint64 i; for (i = 0; i < count; i += 1) { ma_int32 r; float x = src_f32[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 8388607.5f; /* 0..2 to 0..16777215 */ x = x - 8388608.0f; /* 0..16777215 to -8388608..8388607 */ #else /* The fast way. */ x = x * 8388607.0f; /* -1..1 to -8388607..8388607 */ #endif r = (ma_int32)x; dst_s24[(i*3)+0] = (ma_uint8)((r & 0x0000FF) >> 0); dst_s24[(i*3)+1] = (ma_uint8)((r & 0x00FF00) >> 8); dst_s24[(i*3)+2] = (ma_uint8)((r & 0xFF0000) >> 16); } (void)ditherMode; /* No dithering for f32 -> s24. */ } static MA_INLINE void ma_pcm_f32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s24__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s24__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode); } #endif } static MA_INLINE void ma_pcm_f32_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_int32* dst_s32 = (ma_int32*)dst; const float* src_f32 = (const float*)src; ma_uint32 i; for (i = 0; i < count; i += 1) { double x = src_f32[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ #if 0 /* The accurate way. */ x = x + 1; /* -1..1 to 0..2 */ x = x * 2147483647.5; /* 0..2 to 0..4294967295 */ x = x - 2147483648.0; /* 0...4294967295 to -2147483648..2147483647 */ #else /* The fast way. */ x = x * 2147483647.0; /* -1..1 to -2147483647..2147483647 */ #endif dst_s32[i] = (ma_int32)x; } (void)ditherMode; /* No dithering for f32 -> s32. */ } static MA_INLINE void ma_pcm_f32_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode); } #if defined(MA_SUPPORT_SSE2) static MA_INLINE void ma_pcm_f32_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif #if defined(MA_SUPPORT_NEON) static MA_INLINE void ma_pcm_f32_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif MA_API void ma_pcm_f32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode); #else # if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_pcm_f32_to_s32__sse2(dst, src, count, ditherMode); } else #elif defined(MA_SUPPORT_NEON) if (ma_has_neon()) { ma_pcm_f32_to_s32__neon(dst, src, count, ditherMode); } else #endif { ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode); } #endif } MA_API void ma_pcm_f32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode) { (void)ditherMode; ma_copy_memory_64(dst, src, count * sizeof(float)); } static void ma_pcm_interleave_f32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { float* dst_f32 = (float*)dst; const float** src_f32 = (const float**)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_f32[iFrame*channels + iChannel] = src_f32[iChannel][iFrame]; } } } static void ma_pcm_interleave_f32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_interleave_f32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_interleave_f32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_interleave_f32__reference(dst, src, frameCount, channels); #else ma_pcm_interleave_f32__optimized(dst, src, frameCount, channels); #endif } static void ma_pcm_deinterleave_f32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { float** dst_f32 = (float**)dst; const float* src_f32 = (const float*)src; ma_uint64 iFrame; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; iChannel += 1) { dst_f32[iChannel][iFrame] = src_f32[iFrame*channels + iChannel]; } } } static void ma_pcm_deinterleave_f32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels); } MA_API void ma_pcm_deinterleave_f32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels) { #ifdef MA_USE_REFERENCE_CONVERSION_APIS ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels); #else ma_pcm_deinterleave_f32__optimized(dst, src, frameCount, channels); #endif } MA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode) { if (formatOut == formatIn) { ma_copy_memory_64(pOut, pIn, sampleCount * ma_get_bytes_per_sample(formatOut)); return; } switch (formatIn) { case ma_format_u8: { switch (formatOut) { case ma_format_s16: ma_pcm_u8_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_u8_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_u8_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_u8_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s16: { switch (formatOut) { case ma_format_u8: ma_pcm_s16_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_s16_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_s16_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s16_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s24: { switch (formatOut) { case ma_format_u8: ma_pcm_s24_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_s24_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_s24_to_s32(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s24_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_s32: { switch (formatOut) { case ma_format_u8: ma_pcm_s32_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_s32_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_s32_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_f32: ma_pcm_s32_to_f32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; case ma_format_f32: { switch (formatOut) { case ma_format_u8: ma_pcm_f32_to_u8( pOut, pIn, sampleCount, ditherMode); return; case ma_format_s16: ma_pcm_f32_to_s16(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s24: ma_pcm_f32_to_s24(pOut, pIn, sampleCount, ditherMode); return; case ma_format_s32: ma_pcm_f32_to_s32(pOut, pIn, sampleCount, ditherMode); return; default: break; } } break; default: break; } } MA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode) { ma_pcm_convert(pOut, formatOut, pIn, formatIn, frameCount * channels, ditherMode); } MA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames) { if (pInterleavedPCMFrames == NULL || ppDeinterleavedPCMFrames == NULL) { return; /* Invalid args. */ } /* For efficiency we do this per format. */ switch (format) { case ma_format_s16: { const ma_int16* pSrcS16 = (const ma_int16*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { ma_int16* pDstS16 = (ma_int16*)ppDeinterleavedPCMFrames[iChannel]; pDstS16[iPCMFrame] = pSrcS16[iPCMFrame*channels+iChannel]; } } } break; case ma_format_f32: { const float* pSrcF32 = (const float*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { float* pDstF32 = (float*)ppDeinterleavedPCMFrames[iChannel]; pDstF32[iPCMFrame] = pSrcF32[iPCMFrame*channels+iChannel]; } } } break; default: { ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format); ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { void* pDst = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes); const void* pSrc = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes); memcpy(pDst, pSrc, sampleSizeInBytes); } } } break; } } MA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames) { switch (format) { case ma_format_s16: { ma_int16* pDstS16 = (ma_int16*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { const ma_int16* pSrcS16 = (const ma_int16*)ppDeinterleavedPCMFrames[iChannel]; pDstS16[iPCMFrame*channels+iChannel] = pSrcS16[iPCMFrame]; } } } break; case ma_format_f32: { float* pDstF32 = (float*)pInterleavedPCMFrames; ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { const float* pSrcF32 = (const float*)ppDeinterleavedPCMFrames[iChannel]; pDstF32[iPCMFrame*channels+iChannel] = pSrcF32[iPCMFrame]; } } } break; default: { ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format); ma_uint64 iPCMFrame; for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { void* pDst = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes); const void* pSrc = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes); memcpy(pDst, pSrc, sampleSizeInBytes); } } } break; } } /************************************************************************************************************************************************************** Biquad Filter **************************************************************************************************************************************************************/ #ifndef MA_BIQUAD_FIXED_POINT_SHIFT #define MA_BIQUAD_FIXED_POINT_SHIFT 14 #endif static ma_int32 ma_biquad_float_to_fp(double x) { return (ma_int32)(x * (1 << MA_BIQUAD_FIXED_POINT_SHIFT)); } MA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2) { ma_biquad_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.b0 = b0; config.b1 = b1; config.b2 = b2; config.a0 = a0; config.a1 = a1; config.a2 = a2; return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; size_t r2Offset; } ma_biquad_heap_layout; static ma_result ma_biquad_get_heap_layout(const ma_biquad_config* pConfig, ma_biquad_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R0 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* R1 */ pHeapLayout->r2Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_biquad_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_biquad_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ) { ma_result result; ma_biquad_heap_layout heapLayout; if (pBQ == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBQ); result = ma_biquad_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pBQ->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pBQ->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); pBQ->pR2 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r2Offset); return ma_biquad_reinit(pConfig, pBQ); } MA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_biquad_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_biquad_init_preallocated(pConfig, pHeap, pBQ); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBQ->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks) { if (pBQ == NULL) { return; } if (pBQ->_ownsHeap) { ma_free(pBQ->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ) { if (pBQ == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->a0 == 0) { return MA_INVALID_ARGS; /* Division by zero. */ } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pBQ->format != ma_format_unknown && pBQ->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pBQ->channels != 0 && pBQ->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pBQ->format = pConfig->format; pBQ->channels = pConfig->channels; /* Normalize. */ if (pConfig->format == ma_format_f32) { pBQ->b0.f32 = (float)(pConfig->b0 / pConfig->a0); pBQ->b1.f32 = (float)(pConfig->b1 / pConfig->a0); pBQ->b2.f32 = (float)(pConfig->b2 / pConfig->a0); pBQ->a1.f32 = (float)(pConfig->a1 / pConfig->a0); pBQ->a2.f32 = (float)(pConfig->a2 / pConfig->a0); } else { pBQ->b0.s32 = ma_biquad_float_to_fp(pConfig->b0 / pConfig->a0); pBQ->b1.s32 = ma_biquad_float_to_fp(pConfig->b1 / pConfig->a0); pBQ->b2.s32 = ma_biquad_float_to_fp(pConfig->b2 / pConfig->a0); pBQ->a1.s32 = ma_biquad_float_to_fp(pConfig->a1 / pConfig->a0); pBQ->a2.s32 = ma_biquad_float_to_fp(pConfig->a2 / pConfig->a0); } return MA_SUCCESS; } MA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ) { if (pBQ == NULL) { return MA_INVALID_ARGS; } if (pBQ->format == ma_format_f32) { pBQ->pR1->f32 = 0; pBQ->pR2->f32 = 0; } else { pBQ->pR1->s32 = 0; pBQ->pR2->s32 = 0; } return MA_SUCCESS; } static MA_INLINE void ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(ma_biquad* pBQ, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pBQ->channels; const float b0 = pBQ->b0.f32; const float b1 = pBQ->b1.f32; const float b2 = pBQ->b2.f32; const float a1 = pBQ->a1.f32; const float a2 = pBQ->a2.f32; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pBQ->pR1[c].f32; float r2 = pBQ->pR2[c].f32; float x = pX[c]; float y; y = b0*x + r1; r1 = b1*x - a1*y + r2; r2 = b2*x - a2*y; pY[c] = y; pBQ->pR1[c].f32 = r1; pBQ->pR2[c].f32 = r2; } } static MA_INLINE void ma_biquad_process_pcm_frame_f32(ma_biquad* pBQ, float* pY, const float* pX) { ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX); } static MA_INLINE void ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pBQ->channels; const ma_int32 b0 = pBQ->b0.s32; const ma_int32 b1 = pBQ->b1.s32; const ma_int32 b2 = pBQ->b2.s32; const ma_int32 a1 = pBQ->a1.s32; const ma_int32 a2 = pBQ->a2.s32; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pBQ->pR1[c].s32; ma_int32 r2 = pBQ->pR2[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b0*x + r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; r1 = (b1*x - a1*y + r2); r2 = (b2*x - a2*y); pY[c] = (ma_int16)ma_clamp(y, -32768, 32767); pBQ->pR1[c].s32 = r1; pBQ->pR2[c].s32 = r2; } } static MA_INLINE void ma_biquad_process_pcm_frame_s16(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX) { ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX); } MA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pBQ == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pBQ->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX); pY += pBQ->channels; pX += pBQ->channels; } } else if (pBQ->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX); pY += pBQ->channels; pX += pBQ->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ) { if (pBQ == NULL) { return 0; } return 2; } /************************************************************************************************************************************************************** Low-Pass Filter **************************************************************************************************************************************************************/ MA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency) { ma_lpf1_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = 0.5; return config; } MA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_lpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; } ma_lpf1_heap_layout; static ma_result ma_lpf1_get_heap_layout(const ma_lpf1_config* pConfig, ma_lpf1_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R1 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_lpf1_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } result = ma_lpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF) { ma_result result; ma_lpf1_heap_layout heapLayout; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); result = ma_lpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); return ma_lpf1_reinit(pConfig, pLPF); } MA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf1_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf1_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pLPF == NULL) { return; } if (pLPF->_ownsHeap) { ma_free(pLPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF) { double a; if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pLPF->format = pConfig->format; pLPF->channels = pConfig->channels; a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate); if (pConfig->format == ma_format_f32) { pLPF->a.f32 = (float)a; } else { pLPF->a.s32 = ma_biquad_float_to_fp(a); } return MA_SUCCESS; } MA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } if (pLPF->format == ma_format_f32) { pLPF->a.f32 = 0; } else { pLPF->a.s32 = 0; } return MA_SUCCESS; } static MA_INLINE void ma_lpf1_process_pcm_frame_f32(ma_lpf1* pLPF, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pLPF->channels; const float a = pLPF->a.f32; const float b = 1 - a; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pLPF->pR1[c].f32; float x = pX[c]; float y; y = b*x + a*r1; pY[c] = y; pLPF->pR1[c].f32 = y; } } static MA_INLINE void ma_lpf1_process_pcm_frame_s16(ma_lpf1* pLPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pLPF->channels; const ma_int32 a = pLPF->a.s32; const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a); MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pLPF->pR1[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b*x + a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; pY[c] = (ma_int16)y; pLPF->pR1[c].s32 = (ma_int32)y; } } MA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pLPF == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pLPF->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_lpf1_process_pcm_frame_f32(pLPF, pY, pX); pY += pLPF->channels; pX += pLPF->channels; } } else if (pLPF->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_lpf1_process_pcm_frame_s16(pLPF, pY, pX); pY += pLPF->channels; pX += pLPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF) { if (pLPF == NULL) { return 0; } return 1; } static MA_INLINE ma_biquad_config ma_lpf2__get_biquad_config(const ma_lpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = (1 - c) / 2; bqConfig.b1 = 1 - c; bqConfig.b2 = (1 - c) / 2; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_lpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pLPF) { ma_result result; ma_biquad_config bqConfig; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_lpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pLPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf2_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pLPF == NULL) { return; } ma_biquad_uninit(&pLPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF) { ma_result result; ma_biquad_config bqConfig; if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_lpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pLPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } ma_biquad_clear_cache(&pLPF->bq); return MA_SUCCESS; } static MA_INLINE void ma_lpf2_process_pcm_frame_s16(ma_lpf2* pLPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pLPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_lpf2_process_pcm_frame_f32(ma_lpf2* pLPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pLPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pLPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pLPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF) { if (pLPF == NULL) { return 0; } return ma_biquad_get_latency(&pLPF->bq); } MA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_lpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t lpf1Offset; size_t lpf2Offset; /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */ } ma_lpf_heap_layout; static void ma_lpf_calculate_sub_lpf_counts(ma_uint32 order, ma_uint32* pLPF1Count, ma_uint32* pLPF2Count) { MA_ASSERT(pLPF1Count != NULL); MA_ASSERT(pLPF2Count != NULL); *pLPF1Count = order % 2; *pLPF2Count = order / 2; } static ma_result ma_lpf_get_heap_layout(const ma_lpf_config* pConfig, ma_lpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count); pHeapLayout->sizeInBytes = 0; /* LPF 1 */ pHeapLayout->lpf1Offset = pHeapLayout->sizeInBytes; for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) { size_t lpf1HeapSizeInBytes; ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_lpf1) + lpf1HeapSizeInBytes; } /* LPF 2*/ pHeapLayout->lpf2Offset = pHeapLayout->sizeInBytes; for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) { size_t lpf2HeapSizeInBytes; ma_lpf2_config lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_lpf2) + lpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_lpf_reinit__internal(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF, ma_bool32 isNew) { ma_result result; ma_uint32 lpf1Count; ma_uint32 lpf2Count; ma_uint32 ilpf1; ma_uint32 ilpf2; ma_lpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pLPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count); /* The filter order can't change between reinits. */ if (!isNew) { if (pLPF->lpf1Count != lpf1Count || pLPF->lpf2Count != lpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_lpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pLPF1 = (ma_lpf1*)ma_offset_ptr(pHeap, heapLayout.lpf1Offset); pLPF->pLPF2 = (ma_lpf2*)ma_offset_ptr(pHeap, heapLayout.lpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); /* To silence a compiler warning. */ } for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) { ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); if (isNew) { size_t lpf1HeapSizeInBytes; result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_lpf1_init_preallocated(&lpf1Config, ma_offset_ptr(pHeap, heapLayout.lpf1Offset + (sizeof(ma_lpf1) * lpf1Count) + (ilpf1 * lpf1HeapSizeInBytes)), &pLPF->pLPF1[ilpf1]); } } else { result = ma_lpf1_reinit(&lpf1Config, &pLPF->pLPF1[ilpf1]); } if (result != MA_SUCCESS) { ma_uint32 jlpf1; for (jlpf1 = 0; jlpf1 < ilpf1; jlpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) { ma_lpf2_config lpf2Config; double q; double a; /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */ if (lpf1Count == 1) { a = (1 + ilpf2*1) * (MA_PI_D/(pConfig->order*1)); /* Odd order. */ } else { a = (1 + ilpf2*2) * (MA_PI_D/(pConfig->order*2)); /* Even order. */ } q = 1 / (2*ma_cosd(a)); lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t lpf2HeapSizeInBytes; result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_lpf2_init_preallocated(&lpf2Config, ma_offset_ptr(pHeap, heapLayout.lpf2Offset + (sizeof(ma_lpf2) * lpf2Count) + (ilpf2 * lpf2HeapSizeInBytes)), &pLPF->pLPF2[ilpf2]); } } else { result = ma_lpf2_reinit(&lpf2Config, &pLPF->pLPF2[ilpf2]); } if (result != MA_SUCCESS) { ma_uint32 jlpf1; ma_uint32 jlpf2; for (jlpf1 = 0; jlpf1 < lpf1Count; jlpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } for (jlpf2 = 0; jlpf2 < ilpf2; jlpf2 += 1) { ma_lpf2_uninit(&pLPF->pLPF2[jlpf2], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } pLPF->lpf1Count = lpf1Count; pLPF->lpf2Count = lpf2Count; pLPF->format = pConfig->format; pLPF->channels = pConfig->channels; pLPF->sampleRate = pConfig->sampleRate; return MA_SUCCESS; } MA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_lpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_lpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return result; } MA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); return ma_lpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_lpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_lpf_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return; } for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_uninit(&pLPF->pLPF1[ilpf1], pAllocationCallbacks); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_uninit(&pLPF->pLPF2[ilpf2], pAllocationCallbacks); } if (pLPF->_ownsHeap) { ma_free(pLPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF) { return ma_lpf_reinit__internal(pConfig, NULL, pLPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF) { ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return MA_INVALID_ARGS; } for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_clear_cache(&pLPF->pLPF1[ilpf1]); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_clear_cache(&pLPF->pLPF2[ilpf2]); } return MA_SUCCESS; } static MA_INLINE void ma_lpf_process_pcm_frame_f32(ma_lpf* pLPF, float* pY, const void* pX) { ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pLPF->format == ma_format_f32); MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels)); for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_process_pcm_frame_f32(&pLPF->pLPF1[ilpf1], pY, pY); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_process_pcm_frame_f32(&pLPF->pLPF2[ilpf2], pY, pY); } } static MA_INLINE void ma_lpf_process_pcm_frame_s16(ma_lpf* pLPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 ilpf1; ma_uint32 ilpf2; MA_ASSERT(pLPF->format == ma_format_s16); MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels)); for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { ma_lpf1_process_pcm_frame_s16(&pLPF->pLPF1[ilpf1], pY, pY); } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { ma_lpf2_process_pcm_frame_s16(&pLPF->pLPF2[ilpf2], pY, pY); } } MA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ilpf1; ma_uint32 ilpf2; if (pLPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) { result = ma_lpf1_process_pcm_frames(&pLPF->pLPF1[ilpf1], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) { result = ma_lpf2_process_pcm_frames(&pLPF->pLPF2[ilpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pLPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_lpf_process_pcm_frame_f32(pLPF, pFramesOutF32, pFramesInF32); pFramesOutF32 += pLPF->channels; pFramesInF32 += pLPF->channels; } } else if (pLPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_lpf_process_pcm_frame_s16(pLPF, pFramesOutS16, pFramesInS16); pFramesOutS16 += pLPF->channels; pFramesInS16 += pLPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF) { if (pLPF == NULL) { return 0; } return pLPF->lpf2Count*2 + pLPF->lpf1Count; } /************************************************************************************************************************************************************** High-Pass Filtering **************************************************************************************************************************************************************/ MA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency) { ma_hpf1_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; return config; } MA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_hpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } typedef struct { size_t sizeInBytes; size_t r1Offset; } ma_hpf1_heap_layout; static ma_result ma_hpf1_get_heap_layout(const ma_hpf1_config* pConfig, ma_hpf1_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* R1 */ pHeapLayout->r1Offset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_hpf1_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } result = ma_hpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF) { ma_result result; ma_hpf1_heap_layout heapLayout; if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); result = ma_hpf1_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pLPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset); return ma_hpf1_reinit(pConfig, pLPF); } MA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pLPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf1_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf1_init_preallocated(pConfig, pHeap, pLPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pLPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pHPF == NULL) { return; } if (pHPF->_ownsHeap) { ma_free(pHPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF) { double a; if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } pHPF->format = pConfig->format; pHPF->channels = pConfig->channels; a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate); if (pConfig->format == ma_format_f32) { pHPF->a.f32 = (float)a; } else { pHPF->a.s32 = ma_biquad_float_to_fp(a); } return MA_SUCCESS; } static MA_INLINE void ma_hpf1_process_pcm_frame_f32(ma_hpf1* pHPF, float* pY, const float* pX) { ma_uint32 c; const ma_uint32 channels = pHPF->channels; const float a = 1 - pHPF->a.f32; const float b = 1 - a; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float r1 = pHPF->pR1[c].f32; float x = pX[c]; float y; y = b*x - a*r1; pY[c] = y; pHPF->pR1[c].f32 = y; } } static MA_INLINE void ma_hpf1_process_pcm_frame_s16(ma_hpf1* pHPF, ma_int16* pY, const ma_int16* pX) { ma_uint32 c; const ma_uint32 channels = pHPF->channels; const ma_int32 a = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - pHPF->a.s32); const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a); MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int32 r1 = pHPF->pR1[c].s32; ma_int32 x = pX[c]; ma_int32 y; y = (b*x - a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT; pY[c] = (ma_int16)y; pHPF->pR1[c].s32 = (ma_int32)y; } } MA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 n; if (pHPF == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */ if (pHPF->format == ma_format_f32) { /* */ float* pY = ( float*)pFramesOut; const float* pX = (const float*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_hpf1_process_pcm_frame_f32(pHPF, pY, pX); pY += pHPF->channels; pX += pHPF->channels; } } else if (pHPF->format == ma_format_s16) { /* */ ma_int16* pY = ( ma_int16*)pFramesOut; const ma_int16* pX = (const ma_int16*)pFramesIn; for (n = 0; n < frameCount; n += 1) { ma_hpf1_process_pcm_frame_s16(pHPF, pY, pX); pY += pHPF->channels; pX += pHPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */ } return MA_SUCCESS; } MA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF) { if (pHPF == NULL) { return 0; } return 1; } static MA_INLINE ma_biquad_config ma_hpf2__get_biquad_config(const ma_hpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = (1 + c) / 2; bqConfig.b1 = -(1 + c); bqConfig.b2 = (1 + c) / 2; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_hpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF) { ma_result result; ma_biquad_config bqConfig; if (pHPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pHPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pHPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf2_init_preallocated(pConfig, pHeap, pHPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pHPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pHPF == NULL) { return; } ma_biquad_uninit(&pHPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF) { ma_result result; ma_biquad_config bqConfig; if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pHPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_hpf2_process_pcm_frame_s16(ma_hpf2* pHPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pHPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_hpf2_process_pcm_frame_f32(ma_hpf2* pHPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pHPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pHPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pHPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF) { if (pHPF == NULL) { return 0; } return ma_biquad_get_latency(&pHPF->bq); } MA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_hpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t hpf1Offset; size_t hpf2Offset; /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */ } ma_hpf_heap_layout; static void ma_hpf_calculate_sub_hpf_counts(ma_uint32 order, ma_uint32* pHPF1Count, ma_uint32* pHPF2Count) { MA_ASSERT(pHPF1Count != NULL); MA_ASSERT(pHPF2Count != NULL); *pHPF1Count = order % 2; *pHPF2Count = order / 2; } static ma_result ma_hpf_get_heap_layout(const ma_hpf_config* pConfig, ma_hpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_uint32 ihpf1; ma_uint32 ihpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count); pHeapLayout->sizeInBytes = 0; /* HPF 1 */ pHeapLayout->hpf1Offset = pHeapLayout->sizeInBytes; for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) { size_t hpf1HeapSizeInBytes; ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_hpf1) + hpf1HeapSizeInBytes; } /* HPF 2*/ pHeapLayout->hpf2Offset = pHeapLayout->sizeInBytes; for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) { size_t hpf2HeapSizeInBytes; ma_hpf2_config hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_hpf2) + hpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_hpf_reinit__internal(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pHPF, ma_bool32 isNew) { ma_result result; ma_uint32 hpf1Count; ma_uint32 hpf2Count; ma_uint32 ihpf1; ma_uint32 ihpf2; ma_hpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pHPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count); /* The filter order can't change between reinits. */ if (!isNew) { if (pHPF->hpf1Count != hpf1Count || pHPF->hpf2Count != hpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_hpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pHPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pHPF->pHPF1 = (ma_hpf1*)ma_offset_ptr(pHeap, heapLayout.hpf1Offset); pHPF->pHPF2 = (ma_hpf2*)ma_offset_ptr(pHeap, heapLayout.hpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); /* To silence a compiler warning. */ } for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) { ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency); if (isNew) { size_t hpf1HeapSizeInBytes; result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_hpf1_init_preallocated(&hpf1Config, ma_offset_ptr(pHeap, heapLayout.hpf1Offset + (sizeof(ma_hpf1) * hpf1Count) + (ihpf1 * hpf1HeapSizeInBytes)), &pHPF->pHPF1[ihpf1]); } } else { result = ma_hpf1_reinit(&hpf1Config, &pHPF->pHPF1[ihpf1]); } if (result != MA_SUCCESS) { ma_uint32 jhpf1; for (jhpf1 = 0; jhpf1 < ihpf1; jhpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) { ma_hpf2_config hpf2Config; double q; double a; /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */ if (hpf1Count == 1) { a = (1 + ihpf2*1) * (MA_PI_D/(pConfig->order*1)); /* Odd order. */ } else { a = (1 + ihpf2*2) * (MA_PI_D/(pConfig->order*2)); /* Even order. */ } q = 1 / (2*ma_cosd(a)); hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t hpf2HeapSizeInBytes; result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_hpf2_init_preallocated(&hpf2Config, ma_offset_ptr(pHeap, heapLayout.hpf2Offset + (sizeof(ma_hpf2) * hpf2Count) + (ihpf2 * hpf2HeapSizeInBytes)), &pHPF->pHPF2[ihpf2]); } } else { result = ma_hpf2_reinit(&hpf2Config, &pHPF->pHPF2[ihpf2]); } if (result != MA_SUCCESS) { ma_uint32 jhpf1; ma_uint32 jhpf2; for (jhpf1 = 0; jhpf1 < hpf1Count; jhpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } for (jhpf2 = 0; jhpf2 < ihpf2; jhpf2 += 1) { ma_hpf2_uninit(&pHPF->pHPF2[jhpf2], NULL); /* No need for allocation callbacks here since we used a preallocated heap allocation. */ } return result; } } pHPF->hpf1Count = hpf1Count; pHPF->hpf2Count = hpf2Count; pHPF->format = pConfig->format; pHPF->channels = pConfig->channels; pHPF->sampleRate = pConfig->sampleRate; return MA_SUCCESS; } MA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_hpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_hpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return result; } MA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF) { if (pLPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pLPF); return ma_hpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hpf_init_preallocated(pConfig, pHeap, pHPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pHPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ihpf1; ma_uint32 ihpf2; if (pHPF == NULL) { return; } for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_uninit(&pHPF->pHPF1[ihpf1], pAllocationCallbacks); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_uninit(&pHPF->pHPF2[ihpf2], pAllocationCallbacks); } if (pHPF->_ownsHeap) { ma_free(pHPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF) { return ma_hpf_reinit__internal(pConfig, NULL, pHPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ihpf1; ma_uint32 ihpf2; if (pHPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { result = ma_hpf1_process_pcm_frames(&pHPF->pHPF1[ihpf1], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { result = ma_hpf2_process_pcm_frames(&pHPF->pHPF2[ihpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pHPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pHPF->format, pHPF->channels)); for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_process_pcm_frame_f32(&pHPF->pHPF1[ihpf1], pFramesOutF32, pFramesOutF32); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_process_pcm_frame_f32(&pHPF->pHPF2[ihpf2], pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pHPF->channels; pFramesInF32 += pHPF->channels; } } else if (pHPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pHPF->format, pHPF->channels)); for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) { ma_hpf1_process_pcm_frame_s16(&pHPF->pHPF1[ihpf1], pFramesOutS16, pFramesOutS16); } for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) { ma_hpf2_process_pcm_frame_s16(&pHPF->pHPF2[ihpf2], pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pHPF->channels; pFramesInS16 += pHPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF) { if (pHPF == NULL) { return 0; } return pHPF->hpf2Count*2 + pHPF->hpf1Count; } /************************************************************************************************************************************************************** Band-Pass Filtering **************************************************************************************************************************************************************/ MA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q) { ma_bpf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.q = q; /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */ if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_bpf2__get_biquad_config(const ma_bpf2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = q * a; bqConfig.b1 = 0; bqConfig.b2 = -q * a; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_bpf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF) { ma_result result; ma_biquad_config bqConfig; if (pBPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBPF); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_bpf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pBPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_bpf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_bpf2_init_preallocated(pConfig, pHeap, pBPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBPF->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks) { if (pBPF == NULL) { return; } ma_biquad_uninit(&pBPF->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF) { ma_result result; ma_biquad_config bqConfig; if (pBPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_bpf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pBPF->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_bpf2_process_pcm_frame_s16(ma_bpf2* pBPF, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pBPF->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_bpf2_process_pcm_frame_f32(ma_bpf2* pBPF, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pBPF->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pBPF == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pBPF->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF) { if (pBPF == NULL) { return 0; } return ma_biquad_get_latency(&pBPF->bq); } MA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_bpf_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.cutoffFrequency = cutoffFrequency; config.order = ma_min(order, MA_MAX_FILTER_ORDER); return config; } typedef struct { size_t sizeInBytes; size_t bpf2Offset; } ma_bpf_heap_layout; static ma_result ma_bpf_get_heap_layout(const ma_bpf_config* pConfig, ma_bpf_heap_layout* pHeapLayout) { ma_result result; ma_uint32 bpf2Count; ma_uint32 ibpf2; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } /* We must have an even number of order. */ if ((pConfig->order & 0x1) != 0) { return MA_INVALID_ARGS; } bpf2Count = pConfig->order / 2; pHeapLayout->sizeInBytes = 0; /* BPF 2 */ pHeapLayout->bpf2Offset = pHeapLayout->sizeInBytes; for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) { size_t bpf2HeapSizeInBytes; ma_bpf2_config bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107); /* <-- The "q" parameter does not matter for the purpose of calculating the heap size. */ result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += sizeof(ma_bpf2) + bpf2HeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } static ma_result ma_bpf_reinit__internal(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF, ma_bool32 isNew) { ma_result result; ma_uint32 bpf2Count; ma_uint32 ibpf2; ma_bpf_heap_layout heapLayout; /* Only used if isNew is true. */ if (pBPF == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } /* Only supporting f32 and s16. */ if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } /* The format cannot be changed after initialization. */ if (pBPF->format != ma_format_unknown && pBPF->format != pConfig->format) { return MA_INVALID_OPERATION; } /* The channel count cannot be changed after initialization. */ if (pBPF->channels != 0 && pBPF->channels != pConfig->channels) { return MA_INVALID_OPERATION; } if (pConfig->order > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } /* We must have an even number of order. */ if ((pConfig->order & 0x1) != 0) { return MA_INVALID_ARGS; } bpf2Count = pConfig->order / 2; /* The filter order can't change between reinits. */ if (!isNew) { if (pBPF->bpf2Count != bpf2Count) { return MA_INVALID_OPERATION; } } if (isNew) { result = ma_bpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pBPF->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pBPF->pBPF2 = (ma_bpf2*)ma_offset_ptr(pHeap, heapLayout.bpf2Offset); } else { MA_ZERO_OBJECT(&heapLayout); } for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) { ma_bpf2_config bpf2Config; double q; /* TODO: Calculate Q to make this a proper Butterworth filter. */ q = 0.707107; bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q); if (isNew) { size_t bpf2HeapSizeInBytes; result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes); if (result == MA_SUCCESS) { result = ma_bpf2_init_preallocated(&bpf2Config, ma_offset_ptr(pHeap, heapLayout.bpf2Offset + (sizeof(ma_bpf2) * bpf2Count) + (ibpf2 * bpf2HeapSizeInBytes)), &pBPF->pBPF2[ibpf2]); } } else { result = ma_bpf2_reinit(&bpf2Config, &pBPF->pBPF2[ibpf2]); } if (result != MA_SUCCESS) { return result; } } pBPF->bpf2Count = bpf2Count; pBPF->format = pConfig->format; pBPF->channels = pConfig->channels; return MA_SUCCESS; } MA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_bpf_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_bpf_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF) { if (pBPF == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pBPF); return ma_bpf_reinit__internal(pConfig, pHeap, pBPF, /*isNew*/MA_TRUE); } MA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_bpf_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_bpf_init_preallocated(pConfig, pHeap, pBPF); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pBPF->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks) { ma_uint32 ibpf2; if (pBPF == NULL) { return; } for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_uninit(&pBPF->pBPF2[ibpf2], pAllocationCallbacks); } if (pBPF->_ownsHeap) { ma_free(pBPF->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF) { return ma_bpf_reinit__internal(pConfig, NULL, pBPF, /*isNew*/MA_FALSE); } MA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_result result; ma_uint32 ibpf2; if (pBPF == NULL) { return MA_INVALID_ARGS; } /* Faster path for in-place. */ if (pFramesOut == pFramesIn) { for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { result = ma_bpf2_process_pcm_frames(&pBPF->pBPF2[ibpf2], pFramesOut, pFramesOut, frameCount); if (result != MA_SUCCESS) { return result; } } } /* Slightly slower path for copying. */ if (pFramesOut != pFramesIn) { ma_uint32 iFrame; /* */ if (pBPF->format == ma_format_f32) { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pBPF->format, pBPF->channels)); for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_process_pcm_frame_f32(&pBPF->pBPF2[ibpf2], pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pBPF->channels; pFramesInF32 += pBPF->channels; } } else if (pBPF->format == ma_format_s16) { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pBPF->format, pBPF->channels)); for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) { ma_bpf2_process_pcm_frame_s16(&pBPF->pBPF2[ibpf2], pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pBPF->channels; pFramesInS16 += pBPF->channels; } } else { MA_ASSERT(MA_FALSE); return MA_INVALID_OPERATION; /* Should never hit this. */ } } return MA_SUCCESS; } MA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF) { if (pBPF == NULL) { return 0; } return pBPF->bpf2Count*2; } /************************************************************************************************************************************************************** Notching Filter **************************************************************************************************************************************************************/ MA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency) { ma_notch2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.q = q; config.frequency = frequency; if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_notch2__get_biquad_config(const ma_notch2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); bqConfig.b0 = 1; bqConfig.b1 = -2 * c; bqConfig.b2 = 1; bqConfig.a0 = 1 + a; bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - a; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_notch2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_notch2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_notch2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_notch2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_notch2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_notch2_process_pcm_frame_s16(ma_notch2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_notch2_process_pcm_frame_f32(ma_notch2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** Peaking EQ Filter **************************************************************************************************************************************************************/ MA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_peak2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.q = q; config.frequency = frequency; if (config.q == 0) { config.q = 0.707107; } return config; } static MA_INLINE ma_biquad_config ma_peak2__get_biquad_config(const ma_peak2_config* pConfig) { ma_biquad_config bqConfig; double q; double w; double s; double c; double a; double A; MA_ASSERT(pConfig != NULL); q = pConfig->q; w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); a = s / (2*q); A = ma_powd(10, (pConfig->gainDB / 40)); bqConfig.b0 = 1 + (a * A); bqConfig.b1 = -2 * c; bqConfig.b2 = 1 - (a * A); bqConfig.a0 = 1 + (a / A); bqConfig.a1 = -2 * c; bqConfig.a2 = 1 - (a / A); bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_peak2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_peak2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_peak2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_peak2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_peak2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_peak2_process_pcm_frame_s16(ma_peak2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_peak2_process_pcm_frame_f32(ma_peak2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** Low Shelf Filter **************************************************************************************************************************************************************/ MA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency) { ma_loshelf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.shelfSlope = shelfSlope; config.frequency = frequency; return config; } static MA_INLINE ma_biquad_config ma_loshelf2__get_biquad_config(const ma_loshelf2_config* pConfig) { ma_biquad_config bqConfig; double w; double s; double c; double A; double S; double a; double sqrtA; MA_ASSERT(pConfig != NULL); w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); A = ma_powd(10, (pConfig->gainDB / 40)); S = pConfig->shelfSlope; a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2); sqrtA = 2*ma_sqrtd(A)*a; bqConfig.b0 = A * ((A + 1) - (A - 1)*c + sqrtA); bqConfig.b1 = 2 * A * ((A - 1) - (A + 1)*c); bqConfig.b2 = A * ((A + 1) - (A - 1)*c - sqrtA); bqConfig.a0 = (A + 1) + (A - 1)*c + sqrtA; bqConfig.a1 = -2 * ((A - 1) + (A + 1)*c); bqConfig.a2 = (A + 1) + (A - 1)*c - sqrtA; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_loshelf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_loshelf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_loshelf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_loshelf2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_loshelf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_loshelf2_process_pcm_frame_s16(ma_loshelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_loshelf2_process_pcm_frame_f32(ma_loshelf2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /************************************************************************************************************************************************************** High Shelf Filter **************************************************************************************************************************************************************/ MA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency) { ma_hishelf2_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.gainDB = gainDB; config.shelfSlope = shelfSlope; config.frequency = frequency; return config; } static MA_INLINE ma_biquad_config ma_hishelf2__get_biquad_config(const ma_hishelf2_config* pConfig) { ma_biquad_config bqConfig; double w; double s; double c; double A; double S; double a; double sqrtA; MA_ASSERT(pConfig != NULL); w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate; s = ma_sind(w); c = ma_cosd(w); A = ma_powd(10, (pConfig->gainDB / 40)); S = pConfig->shelfSlope; a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2); sqrtA = 2*ma_sqrtd(A)*a; bqConfig.b0 = A * ((A + 1) + (A - 1)*c + sqrtA); bqConfig.b1 = -2 * A * ((A - 1) + (A + 1)*c); bqConfig.b2 = A * ((A + 1) + (A - 1)*c - sqrtA); bqConfig.a0 = (A + 1) - (A - 1)*c + sqrtA; bqConfig.a1 = 2 * ((A - 1) - (A + 1)*c); bqConfig.a2 = (A + 1) - (A - 1)*c - sqrtA; bqConfig.format = pConfig->format; bqConfig.channels = pConfig->channels; return bqConfig; } MA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes) { ma_biquad_config bqConfig; bqConfig = ma_hishelf2__get_biquad_config(pConfig); return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes); } MA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFilter); if (pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hishelf2__get_biquad_config(pConfig); result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_hishelf2_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_hishelf2_init_preallocated(pConfig, pHeap, pFilter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pFilter->bq._ownsHeap = MA_TRUE; /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */ return MA_SUCCESS; } MA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFilter == NULL) { return; } ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks); /* <-- This will free the heap allocation. */ } MA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter) { ma_result result; ma_biquad_config bqConfig; if (pFilter == NULL || pConfig == NULL) { return MA_INVALID_ARGS; } bqConfig = ma_hishelf2__get_biquad_config(pConfig); result = ma_biquad_reinit(&bqConfig, &pFilter->bq); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } static MA_INLINE void ma_hishelf2_process_pcm_frame_s16(ma_hishelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn) { ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn); } static MA_INLINE void ma_hishelf2_process_pcm_frame_f32(ma_hishelf2* pFilter, float* pFrameOut, const float* pFrameIn) { ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn); } MA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFilter == NULL) { return MA_INVALID_ARGS; } return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount); } MA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter) { if (pFilter == NULL) { return 0; } return ma_biquad_get_latency(&pFilter->bq); } /* Delay */ MA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay) { ma_delay_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.sampleRate = sampleRate; config.delayInFrames = delayInFrames; config.delayStart = (decay == 0) ? MA_TRUE : MA_FALSE; /* Delay the start if it looks like we're not configuring an echo. */ config.wet = 1; config.dry = 1; config.decay = decay; return config; } MA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay) { if (pDelay == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDelay); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->decay < 0 || pConfig->decay > 1) { return MA_INVALID_ARGS; } pDelay->config = *pConfig; pDelay->bufferSizeInFrames = pConfig->delayInFrames; pDelay->cursor = 0; pDelay->pBuffer = (float*)ma_malloc((size_t)(pDelay->bufferSizeInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->channels)), pAllocationCallbacks); if (pDelay->pBuffer == NULL) { return MA_OUT_OF_MEMORY; } ma_silence_pcm_frames(pDelay->pBuffer, pDelay->bufferSizeInFrames, ma_format_f32, pConfig->channels); return MA_SUCCESS; } MA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks) { if (pDelay == NULL) { return; } ma_free(pDelay->pBuffer, pAllocationCallbacks); } MA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { ma_uint32 iFrame; ma_uint32 iChannel; float* pFramesOutF32 = (float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; if (pDelay == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < pDelay->config.channels; iChannel += 1) { ma_uint32 iBuffer = (pDelay->cursor * pDelay->config.channels) + iChannel; if (pDelay->config.delayStart) { /* Delayed start. */ /* Read */ pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet; /* Feedback */ pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry); } else { /* Immediate start */ /* Feedback */ pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry); /* Read */ pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet; } } pDelay->cursor = (pDelay->cursor + 1) % pDelay->bufferSizeInFrames; pFramesOutF32 += pDelay->config.channels; pFramesInF32 += pDelay->config.channels; } return MA_SUCCESS; } MA_API void ma_delay_set_wet(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.wet = value; } MA_API float ma_delay_get_wet(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.wet; } MA_API void ma_delay_set_dry(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.dry = value; } MA_API float ma_delay_get_dry(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.dry; } MA_API void ma_delay_set_decay(ma_delay* pDelay, float value) { if (pDelay == NULL) { return; } pDelay->config.decay = value; } MA_API float ma_delay_get_decay(const ma_delay* pDelay) { if (pDelay == NULL) { return 0; } return pDelay->config.decay; } MA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames) { ma_gainer_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.smoothTimeInFrames = smoothTimeInFrames; return config; } typedef struct { size_t sizeInBytes; size_t oldGainsOffset; size_t newGainsOffset; } ma_gainer_heap_layout; static ma_result ma_gainer_get_heap_layout(const ma_gainer_config* pConfig, ma_gainer_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Old gains. */ pHeapLayout->oldGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; /* New gains. */ pHeapLayout->newGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; /* Alignment. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_gainer_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_gainer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer) { ma_result result; ma_gainer_heap_layout heapLayout; ma_uint32 iChannel; if (pGainer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pGainer); if (pConfig == NULL || pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_gainer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pGainer->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pGainer->pOldGains = (float*)ma_offset_ptr(pHeap, heapLayout.oldGainsOffset); pGainer->pNewGains = (float*)ma_offset_ptr(pHeap, heapLayout.newGainsOffset); pGainer->masterVolume = 1; pGainer->config = *pConfig; pGainer->t = (ma_uint32)-1; /* No interpolation by default. */ for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pGainer->pOldGains[iChannel] = 1; pGainer->pNewGains[iChannel] = 1; } return MA_SUCCESS; } MA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_gainer_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap allocation. */ } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_gainer_init_preallocated(pConfig, pHeap, pGainer); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pGainer->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks) { if (pGainer == NULL) { return; } if (pGainer->_ownsHeap) { ma_free(pGainer->_pHeap, pAllocationCallbacks); } } static float ma_gainer_calculate_current_gain(const ma_gainer* pGainer, ma_uint32 channel) { float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; return ma_mix_f32_fast(pGainer->pOldGains[channel], pGainer->pNewGains[channel], a); } static /*__attribute__((noinline))*/ ma_result ma_gainer_process_pcm_frames_internal(ma_gainer * pGainer, void* MA_RESTRICT pFramesOut, const void* MA_RESTRICT pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; ma_uint64 interpolatedFrameCount; MA_ASSERT(pGainer != NULL); /* We don't necessarily need to apply a linear interpolation for the entire frameCount frames. When linear interpolation is not needed we can do a simple volume adjustment which will be more efficient than a lerp with an alpha value of 1. To do this, all we need to do is determine how many frames need to have a lerp applied. Then we just process that number of frames with linear interpolation. After that we run on an optimized path which just applies the new gains without a lerp. */ if (pGainer->t >= pGainer->config.smoothTimeInFrames) { interpolatedFrameCount = 0; } else { interpolatedFrameCount = pGainer->t - pGainer->config.smoothTimeInFrames; if (interpolatedFrameCount > frameCount) { interpolatedFrameCount = frameCount; } } /* Start off with our interpolated frames. When we do this, we'll adjust frameCount and our pointers so that the fast path can work naturally without consideration of the interpolated path. */ if (interpolatedFrameCount > 0) { /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { /* All we're really doing here is moving the old gains towards the new gains. We don't want to be modifying the gains inside the ma_gainer object because that will break things. Instead we can make a copy here on the stack. For extreme channel counts we can fall back to a slower implementation which just uses a standard lerp. */ float* pFramesOutF32 = (float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; float d = 1.0f / pGainer->config.smoothTimeInFrames; if (pGainer->config.channels <= 32) { float pRunningGain[32]; float pRunningGainDelta[32]; /* Could this be heap-allocated as part of the ma_gainer object? */ /* Initialize the running gain. */ for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { float t = (pGainer->pNewGains[iChannel] - pGainer->pOldGains[iChannel]) * pGainer->masterVolume; pRunningGainDelta[iChannel] = t * d; pRunningGain[iChannel] = (pGainer->pOldGains[iChannel] * pGainer->masterVolume) + (t * a); } iFrame = 0; /* Optimized paths for common channel counts. This is mostly just experimenting with some SIMD ideas. It's not necessarily final. */ if (pGainer->config.channels == 2) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean SIMD loop below. */ __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[1], pRunningGainDelta[0]); __m128 runningGain0 = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[1], pRunningGain[0]); for (; iFrame < unrolledLoopCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*4 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*4 + 0]), runningGain0)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); } iFrame = unrolledLoopCount << 1; } else #endif { /* Two different scalar implementations here. Clang (and I assume GCC) will vectorize both of these, but the bottom version results in a nicer vectorization with less instructions emitted. The problem, however, is that the bottom version runs slower when compiled with MSVC. The top version will be partially vectorized by MSVC. */ #if defined(_MSC_VER) && !defined(__clang__) ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean 4x SIMD operation in the loop. */ pRunningGainDelta[2] = pRunningGainDelta[0]; pRunningGainDelta[3] = pRunningGainDelta[1]; pRunningGain[2] = pRunningGain[0] + pRunningGainDelta[0]; pRunningGain[3] = pRunningGain[1] + pRunningGainDelta[1]; for (; iFrame < unrolledLoopCount; iFrame += 1) { pFramesOutF32[iFrame*4 + 0] = pFramesInF32[iFrame*4 + 0] * pRunningGain[0]; pFramesOutF32[iFrame*4 + 1] = pFramesInF32[iFrame*4 + 1] * pRunningGain[1]; pFramesOutF32[iFrame*4 + 2] = pFramesInF32[iFrame*4 + 2] * pRunningGain[2]; pFramesOutF32[iFrame*4 + 3] = pFramesInF32[iFrame*4 + 3] * pRunningGain[3]; /* Move the running gain forward towards the new gain. */ pRunningGain[0] += pRunningGainDelta[0]; pRunningGain[1] += pRunningGainDelta[1]; pRunningGain[2] += pRunningGainDelta[2]; pRunningGain[3] += pRunningGainDelta[3]; } iFrame = unrolledLoopCount << 1; #else for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 2; iChannel += 1) { pFramesOutF32[iFrame*2 + iChannel] = pFramesInF32[iFrame*2 + iChannel] * pRunningGain[iChannel]; } for (iChannel = 0; iChannel < 2; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } #endif } } else if (pGainer->config.channels == 6) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* For 6 channels things are a bit more complicated because 6 isn't cleanly divisible by 4. We need to do 2 frames at a time, meaning we'll be doing 12 samples in a group. Like the stereo case we'll need to expand some arrays so we can do clean 4x SIMD operations. */ ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1; /* Expand some arrays so we can have a clean SIMD loop below. */ __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[3], pRunningGainDelta[2], pRunningGainDelta[1], pRunningGainDelta[0]); __m128 runningGainDelta1 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[5], pRunningGainDelta[4]); __m128 runningGainDelta2 = _mm_set_ps(pRunningGainDelta[5], pRunningGainDelta[4], pRunningGainDelta[3], pRunningGainDelta[2]); __m128 runningGain0 = _mm_set_ps(pRunningGain[3], pRunningGain[2], pRunningGain[1], pRunningGain[0]); __m128 runningGain1 = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[5], pRunningGain[4]); __m128 runningGain2 = _mm_set_ps(pRunningGain[5] + pRunningGainDelta[5], pRunningGain[4] + pRunningGainDelta[4], pRunningGain[3] + pRunningGainDelta[3], pRunningGain[2] + pRunningGainDelta[2]); for (; iFrame < unrolledLoopCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 0]), runningGain0)); _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 4]), runningGain1)); _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 8], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 8]), runningGain2)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1); runningGain2 = _mm_add_ps(runningGain2, runningGainDelta2); } iFrame = unrolledLoopCount << 1; } else #endif { for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 6; iChannel += 1) { pFramesOutF32[iFrame*6 + iChannel] = pFramesInF32[iFrame*6 + iChannel] * pRunningGain[iChannel]; } /* Move the running gain forward towards the new gain. */ for (iChannel = 0; iChannel < 6; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } } else if (pGainer->config.channels == 8) { /* For 8 channels we can just go over frame by frame and do all eight channels as 2 separate 4x SIMD operations. */ #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { __m128 runningGainDelta0 = _mm_loadu_ps(&pRunningGainDelta[0]); __m128 runningGainDelta1 = _mm_loadu_ps(&pRunningGainDelta[4]); __m128 runningGain0 = _mm_loadu_ps(&pRunningGain[0]); __m128 runningGain1 = _mm_loadu_ps(&pRunningGain[4]); for (; iFrame < interpolatedFrameCount; iFrame += 1) { _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 0]), runningGain0)); _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 4]), runningGain1)); runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0); runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1); } } else #endif { /* This is crafted so that it auto-vectorizes when compiled with Clang. */ for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < 8; iChannel += 1) { pFramesOutF32[iFrame*8 + iChannel] = pFramesInF32[iFrame*8 + iChannel] * pRunningGain[iChannel]; } /* Move the running gain forward towards the new gain. */ for (iChannel = 0; iChannel < 8; iChannel += 1) { pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } } for (; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * pRunningGain[iChannel]; pRunningGain[iChannel] += pRunningGainDelta[iChannel]; } } } else { /* Slower path for extreme channel counts where we can't fit enough on the stack. We could also move this to the heap as part of the ma_gainer object which might even be better since it'll only be updated when the gains actually change. */ for (iFrame = 0; iFrame < interpolatedFrameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume; } a += d; } } } /* Make sure the timer is updated. */ pGainer->t = (ma_uint32)ma_min(pGainer->t + interpolatedFrameCount, pGainer->config.smoothTimeInFrames); /* Adjust our arguments so the next part can work normally. */ frameCount -= interpolatedFrameCount; pFramesOut = ma_offset_ptr(pFramesOut, interpolatedFrameCount * sizeof(float)); pFramesIn = ma_offset_ptr(pFramesIn, interpolatedFrameCount * sizeof(float)); } /* All we need to do here is apply the new gains using an optimized path. */ if (pFramesOut != NULL && pFramesIn != NULL) { if (pGainer->config.channels <= 32) { float gains[32]; for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { gains[iChannel] = pGainer->pNewGains[iChannel] * pGainer->masterVolume; } ma_copy_and_apply_volume_factor_per_channel_f32((float*)pFramesOut, (const float*)pFramesIn, frameCount, pGainer->config.channels, gains); } else { /* Slow path. Too many channels to fit on the stack. Need to apply a master volume as a separate path. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ((float*)pFramesOut)[iFrame*pGainer->config.channels + iChannel] = ((const float*)pFramesIn)[iFrame*pGainer->config.channels + iChannel] * pGainer->pNewGains[iChannel] * pGainer->masterVolume; } } } } /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */ if (pGainer->t == (ma_uint32)-1) { pGainer->t = (ma_uint32)ma_min(pGainer->config.smoothTimeInFrames, frameCount); } #if 0 if (pGainer->t >= pGainer->config.smoothTimeInFrames) { /* Fast path. No gain calculation required. */ ma_copy_and_apply_volume_factor_per_channel_f32(pFramesOutF32, pFramesInF32, frameCount, pGainer->config.channels, pGainer->pNewGains); ma_apply_volume_factor_f32(pFramesOutF32, frameCount * pGainer->config.channels, pGainer->masterVolume); /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */ if (pGainer->t == (ma_uint32)-1) { pGainer->t = pGainer->config.smoothTimeInFrames; } } else { /* Slow path. Need to interpolate the gain for each channel individually. */ /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames; float d = 1.0f / pGainer->config.smoothTimeInFrames; ma_uint32 channelCount = pGainer->config.channels; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channelCount; iChannel += 1) { pFramesOutF32[iChannel] = pFramesInF32[iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume; } pFramesOutF32 += channelCount; pFramesInF32 += channelCount; a += d; if (a > 1) { a = 1; } } } pGainer->t = (ma_uint32)ma_min(pGainer->t + frameCount, pGainer->config.smoothTimeInFrames); #if 0 /* Reference implementation. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */ if (pFramesOut != NULL && pFramesIn != NULL) { for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { pFramesOutF32[iFrame * pGainer->config.channels + iChannel] = pFramesInF32[iFrame * pGainer->config.channels + iChannel] * ma_gainer_calculate_current_gain(pGainer, iChannel) * pGainer->masterVolume; } } /* Move interpolation time forward, but don't go beyond our smoothing time. */ pGainer->t = ma_min(pGainer->t + 1, pGainer->config.smoothTimeInFrames); } #endif } #endif return MA_SUCCESS; } MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pGainer == NULL) { return MA_INVALID_ARGS; } /* ma_gainer_process_pcm_frames_internal() marks pFramesOut and pFramesIn with MA_RESTRICT which helps with auto-vectorization. */ return ma_gainer_process_pcm_frames_internal(pGainer, pFramesOut, pFramesIn, frameCount); } static void ma_gainer_set_gain_by_index(ma_gainer* pGainer, float newGain, ma_uint32 iChannel) { pGainer->pOldGains[iChannel] = ma_gainer_calculate_current_gain(pGainer, iChannel); pGainer->pNewGains[iChannel] = newGain; } static void ma_gainer_reset_smoothing_time(ma_gainer* pGainer) { if (pGainer->t == (ma_uint32)-1) { pGainer->t = pGainer->config.smoothTimeInFrames; /* No smoothing required for initial gains setting. */ } else { pGainer->t = 0; } } MA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain) { ma_uint32 iChannel; if (pGainer == NULL) { return MA_INVALID_ARGS; } for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ma_gainer_set_gain_by_index(pGainer, newGain, iChannel); } /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */ ma_gainer_reset_smoothing_time(pGainer); return MA_SUCCESS; } MA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains) { ma_uint32 iChannel; if (pGainer == NULL || pNewGains == NULL) { return MA_INVALID_ARGS; } for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) { ma_gainer_set_gain_by_index(pGainer, pNewGains[iChannel], iChannel); } /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */ ma_gainer_reset_smoothing_time(pGainer); return MA_SUCCESS; } MA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume) { if (pGainer == NULL) { return MA_INVALID_ARGS; } pGainer->masterVolume = volume; return MA_SUCCESS; } MA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume) { if (pGainer == NULL || pVolume == NULL) { return MA_INVALID_ARGS; } *pVolume = pGainer->masterVolume; return MA_SUCCESS; } MA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels) { ma_panner_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.mode = ma_pan_mode_balance; /* Set to balancing mode by default because it's consistent with other audio engines and most likely what the caller is expecting. */ config.pan = 0; return config; } MA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner) { if (pPanner == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pPanner); if (pConfig == NULL) { return MA_INVALID_ARGS; } pPanner->format = pConfig->format; pPanner->channels = pConfig->channels; pPanner->mode = pConfig->mode; pPanner->pan = pConfig->pan; return MA_SUCCESS; } static void ma_stereo_balance_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan) { ma_uint64 iFrame; if (pan > 0) { float factor = 1.0f - pan; if (pFramesOut == pFramesIn) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor; } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor; pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1]; } } } else { float factor = 1.0f + pan; if (pFramesOut == pFramesIn) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor; } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0]; pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor; } } } } static void ma_stereo_balance_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan) { if (pan == 0) { /* Fast path. No panning required. */ if (pFramesOut == pFramesIn) { /* No-op */ } else { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } return; } switch (format) { case ma_format_f32: ma_stereo_balance_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break; /* Unknown format. Just copy. */ default: { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } break; } } static void ma_stereo_pan_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan) { ma_uint64 iFrame; if (pan > 0) { float factorL0 = 1.0f - pan; float factorL1 = 0.0f + pan; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float sample0 = (pFramesIn[iFrame*2 + 0] * factorL0); float sample1 = (pFramesIn[iFrame*2 + 0] * factorL1) + pFramesIn[iFrame*2 + 1]; pFramesOut[iFrame*2 + 0] = sample0; pFramesOut[iFrame*2 + 1] = sample1; } } else { float factorR0 = 0.0f - pan; float factorR1 = 1.0f + pan; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float sample0 = pFramesIn[iFrame*2 + 0] + (pFramesIn[iFrame*2 + 1] * factorR0); float sample1 = (pFramesIn[iFrame*2 + 1] * factorR1); pFramesOut[iFrame*2 + 0] = sample0; pFramesOut[iFrame*2 + 1] = sample1; } } } static void ma_stereo_pan_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan) { if (pan == 0) { /* Fast path. No panning required. */ if (pFramesOut == pFramesIn) { /* No-op */ } else { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } return; } switch (format) { case ma_format_f32: ma_stereo_pan_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break; /* Unknown format. Just copy. */ default: { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2); } break; } } MA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pPanner == NULL || pFramesOut == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } if (pPanner->channels == 2) { /* Stereo case. For now assume channel 0 is left and channel right is 1, but should probably add support for a channel map. */ if (pPanner->mode == ma_pan_mode_balance) { ma_stereo_balance_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan); } else { ma_stereo_pan_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan); } } else { if (pPanner->channels == 1) { /* Panning has no effect on mono streams. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels); } else { /* For now we're not going to support non-stereo set ups. Not sure how I want to handle this case just yet. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels); } } return MA_SUCCESS; } MA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode) { if (pPanner == NULL) { return; } pPanner->mode = mode; } MA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner) { if (pPanner == NULL) { return ma_pan_mode_balance; } return pPanner->mode; } MA_API void ma_panner_set_pan(ma_panner* pPanner, float pan) { if (pPanner == NULL) { return; } pPanner->pan = ma_clamp(pan, -1.0f, 1.0f); } MA_API float ma_panner_get_pan(const ma_panner* pPanner) { if (pPanner == NULL) { return 0; } return pPanner->pan; } MA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_fader_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; return config; } MA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader) { if (pFader == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFader); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* Only f32 is supported for now. */ if (pConfig->format != ma_format_f32) { return MA_INVALID_ARGS; } pFader->config = *pConfig; pFader->volumeBeg = 1; pFader->volumeEnd = 1; pFader->lengthInFrames = 0; pFader->cursorInFrames = 0; return MA_SUCCESS; } MA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pFader == NULL) { return MA_INVALID_ARGS; } /* If the cursor is still negative we need to just copy the absolute number of those frames, but no more than frameCount. */ if (pFader->cursorInFrames < 0) { ma_uint64 absCursorInFrames = (ma_uint64)0 - pFader->cursorInFrames; if (absCursorInFrames > frameCount) { absCursorInFrames = frameCount; } ma_copy_pcm_frames(pFramesOut, pFramesIn, absCursorInFrames, pFader->config.format, pFader->config.channels); pFader->cursorInFrames += absCursorInFrames; frameCount -= absCursorInFrames; pFramesOut = ma_offset_ptr(pFramesOut, ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames); pFramesIn = ma_offset_ptr(pFramesIn, ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames); } if (pFader->cursorInFrames >= 0) { /* For now we need to clamp frameCount so that the cursor never overflows 32-bits. This is required for the conversion to a float which we use for the linear interpolation. This might be changed later. */ if (frameCount + pFader->cursorInFrames > UINT_MAX) { frameCount = UINT_MAX - pFader->cursorInFrames; } /* Optimized path if volumeBeg and volumeEnd are equal. */ if (pFader->volumeBeg == pFader->volumeEnd) { if (pFader->volumeBeg == 1) { /* Straight copy. */ ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels); } else { /* Copy with volume. */ ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeBeg); } } else { /* Slower path. Volumes are different, so may need to do an interpolation. */ if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) { /* Fast path. We've gone past the end of the fade period so just apply the end volume to all samples. */ ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeEnd); } else { /* Slow path. This is where we do the actual fading. */ ma_uint64 iFrame; ma_uint32 iChannel; /* For now we only support f32. Support for other formats might be added later. */ if (pFader->config.format == ma_format_f32) { const float* pFramesInF32 = (const float*)pFramesIn; /* */ float* pFramesOutF32 = ( float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float a = (ma_uint32)ma_min(pFader->cursorInFrames + iFrame, pFader->lengthInFrames) / (float)((ma_uint32)pFader->lengthInFrames); /* Safe cast due to the frameCount clamp at the top of this function. */ float volume = ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, a); for (iChannel = 0; iChannel < pFader->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pFader->config.channels + iChannel] = pFramesInF32[iFrame*pFader->config.channels + iChannel] * volume; } } } else { return MA_NOT_IMPLEMENTED; } } } } pFader->cursorInFrames += frameCount; return MA_SUCCESS; } MA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate) { if (pFader == NULL) { return; } if (pFormat != NULL) { *pFormat = pFader->config.format; } if (pChannels != NULL) { *pChannels = pFader->config.channels; } if (pSampleRate != NULL) { *pSampleRate = pFader->config.sampleRate; } } MA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames) { ma_fader_set_fade_ex(pFader, volumeBeg, volumeEnd, lengthInFrames, 0); } MA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames) { if (pFader == NULL) { return; } /* If the volume is negative, use current volume. */ if (volumeBeg < 0) { volumeBeg = ma_fader_get_current_volume(pFader); } /* The length needs to be clamped to 32-bits due to how we convert it to a float for linear interpolation reasons. I might change this requirement later, but for now it's not important. */ if (lengthInFrames > UINT_MAX) { lengthInFrames = UINT_MAX; } /* The start offset needs to be clamped to ensure it doesn't overflow a signed number. */ if (startOffsetInFrames > INT_MAX) { startOffsetInFrames = INT_MAX; } pFader->volumeBeg = volumeBeg; pFader->volumeEnd = volumeEnd; pFader->lengthInFrames = lengthInFrames; pFader->cursorInFrames = -startOffsetInFrames; } MA_API float ma_fader_get_current_volume(const ma_fader* pFader) { if (pFader == NULL) { return 0.0f; } /* Any frames prior to the start of the fade period will be at unfaded volume. */ if (pFader->cursorInFrames < 0) { return 1.0f; } /* The current volume depends on the position of the cursor. */ if (pFader->cursorInFrames == 0) { return pFader->volumeBeg; } else if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) { /* Safe case because the < 0 case was checked above. */ return pFader->volumeEnd; } else { /* The cursor is somewhere inside the fading period. We can figure this out with a simple linear interpolation between volumeBeg and volumeEnd based on our cursor position. */ return ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, (ma_uint32)pFader->cursorInFrames / (float)((ma_uint32)pFader->lengthInFrames)); /* Safe cast to uint32 because we clamp it in ma_fader_process_pcm_frames(). */ } } MA_API ma_vec3f ma_vec3f_init_3f(float x, float y, float z) { ma_vec3f v; v.x = x; v.y = y; v.z = z; return v; } MA_API ma_vec3f ma_vec3f_sub(ma_vec3f a, ma_vec3f b) { return ma_vec3f_init_3f( a.x - b.x, a.y - b.y, a.z - b.z ); } MA_API ma_vec3f ma_vec3f_neg(ma_vec3f a) { return ma_vec3f_init_3f( -a.x, -a.y, -a.z ); } MA_API float ma_vec3f_dot(ma_vec3f a, ma_vec3f b) { return a.x*b.x + a.y*b.y + a.z*b.z; } MA_API float ma_vec3f_len2(ma_vec3f v) { return ma_vec3f_dot(v, v); } MA_API float ma_vec3f_len(ma_vec3f v) { return (float)ma_sqrtd(ma_vec3f_len2(v)); } MA_API float ma_vec3f_dist(ma_vec3f a, ma_vec3f b) { return ma_vec3f_len(ma_vec3f_sub(a, b)); } MA_API ma_vec3f ma_vec3f_normalize(ma_vec3f v) { float invLen; float len2 = ma_vec3f_len2(v); if (len2 == 0) { return ma_vec3f_init_3f(0, 0, 0); } invLen = ma_rsqrtf(len2); v.x *= invLen; v.y *= invLen; v.z *= invLen; return v; } MA_API ma_vec3f ma_vec3f_cross(ma_vec3f a, ma_vec3f b) { return ma_vec3f_init_3f( a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x ); } MA_API void ma_atomic_vec3f_init(ma_atomic_vec3f* v, ma_vec3f value) { v->v = value; v->lock = 0; /* Important this is initialized to 0. */ } MA_API void ma_atomic_vec3f_set(ma_atomic_vec3f* v, ma_vec3f value) { ma_spinlock_lock(&v->lock); { v->v = value; } ma_spinlock_unlock(&v->lock); } MA_API ma_vec3f ma_atomic_vec3f_get(ma_atomic_vec3f* v) { ma_vec3f r; ma_spinlock_lock(&v->lock); { r = v->v; } ma_spinlock_unlock(&v->lock); return r; } static void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode); static ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition); #ifndef MA_DEFAULT_SPEED_OF_SOUND #define MA_DEFAULT_SPEED_OF_SOUND 343.3f #endif /* These vectors represent the direction that speakers are facing from the center point. They're used for panning in the spatializer. Must be normalized. */ static ma_vec3f g_maChannelDirections[MA_CHANNEL_POSITION_COUNT] = { { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_NONE */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_MONO */ {-0.7071f, 0.0f, -0.7071f }, /* MA_CHANNEL_FRONT_LEFT */ {+0.7071f, 0.0f, -0.7071f }, /* MA_CHANNEL_FRONT_RIGHT */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_FRONT_CENTER */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_LFE */ {-0.7071f, 0.0f, +0.7071f }, /* MA_CHANNEL_BACK_LEFT */ {+0.7071f, 0.0f, +0.7071f }, /* MA_CHANNEL_BACK_RIGHT */ {-0.3162f, 0.0f, -0.9487f }, /* MA_CHANNEL_FRONT_LEFT_CENTER */ {+0.3162f, 0.0f, -0.9487f }, /* MA_CHANNEL_FRONT_RIGHT_CENTER */ { 0.0f, 0.0f, +1.0f }, /* MA_CHANNEL_BACK_CENTER */ {-1.0f, 0.0f, 0.0f }, /* MA_CHANNEL_SIDE_LEFT */ {+1.0f, 0.0f, 0.0f }, /* MA_CHANNEL_SIDE_RIGHT */ { 0.0f, +1.0f, 0.0f }, /* MA_CHANNEL_TOP_CENTER */ {-0.5774f, +0.5774f, -0.5774f }, /* MA_CHANNEL_TOP_FRONT_LEFT */ { 0.0f, +0.7071f, -0.7071f }, /* MA_CHANNEL_TOP_FRONT_CENTER */ {+0.5774f, +0.5774f, -0.5774f }, /* MA_CHANNEL_TOP_FRONT_RIGHT */ {-0.5774f, +0.5774f, +0.5774f }, /* MA_CHANNEL_TOP_BACK_LEFT */ { 0.0f, +0.7071f, +0.7071f }, /* MA_CHANNEL_TOP_BACK_CENTER */ {+0.5774f, +0.5774f, +0.5774f }, /* MA_CHANNEL_TOP_BACK_RIGHT */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_0 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_1 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_2 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_3 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_4 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_5 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_6 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_7 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_8 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_9 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_10 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_11 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_12 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_13 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_14 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_15 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_16 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_17 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_18 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_19 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_20 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_21 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_22 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_23 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_24 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_25 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_26 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_27 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_28 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_29 */ { 0.0f, 0.0f, -1.0f }, /* MA_CHANNEL_AUX_30 */ { 0.0f, 0.0f, -1.0f } /* MA_CHANNEL_AUX_31 */ }; static ma_vec3f ma_get_channel_direction(ma_channel channel) { if (channel >= MA_CHANNEL_POSITION_COUNT) { return ma_vec3f_init_3f(0, 0, -1); } else { return g_maChannelDirections[channel]; } } static float ma_attenuation_inverse(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return minDistance / (minDistance + rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance)); } static float ma_attenuation_linear(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return 1 - rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance) / (maxDistance - minDistance); } static float ma_attenuation_exponential(float distance, float minDistance, float maxDistance, float rolloff) { if (minDistance >= maxDistance) { return 1; /* To avoid division by zero. Do not attenuate. */ } return (float)ma_powd(ma_clamp(distance, minDistance, maxDistance) / minDistance, -rolloff); } /* Doppler Effect calculation taken from the OpenAL spec, with two main differences: 1) The source to listener vector will have already been calculated at an earlier step so we can just use that directly. We need only the position of the source relative to the origin. 2) We don't scale by a frequency because we actually just want the ratio which we'll plug straight into the resampler directly. */ static float ma_doppler_pitch(ma_vec3f relativePosition, ma_vec3f sourceVelocity, ma_vec3f listenVelocity, float speedOfSound, float dopplerFactor) { float len; float vls; float vss; len = ma_vec3f_len(relativePosition); /* There's a case where the position of the source will be right on top of the listener in which case the length will be 0 and we'll end up with a division by zero. We can just return a ratio of 1.0 in this case. This is not considered in the OpenAL spec, but is necessary. */ if (len == 0) { return 1.0; } vls = ma_vec3f_dot(relativePosition, listenVelocity) / len; vss = ma_vec3f_dot(relativePosition, sourceVelocity) / len; vls = ma_min(vls, speedOfSound / dopplerFactor); vss = ma_min(vss, speedOfSound / dopplerFactor); return (speedOfSound - dopplerFactor*vls) / (speedOfSound - dopplerFactor*vss); } static void ma_get_default_channel_map_for_spatializer(ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channelCount) { /* Special case for stereo. Want to default the left and right speakers to side left and side right so that they're facing directly down the X axis rather than slightly forward. Not doing this will result in sounds being quieter when behind the listener. This might actually be good for some scenarios, but I don't think it's an appropriate default because it can be a bit unexpected. */ if (channelCount == 2) { pChannelMap[0] = MA_CHANNEL_SIDE_LEFT; pChannelMap[1] = MA_CHANNEL_SIDE_RIGHT; } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount); } } MA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut) { ma_spatializer_listener_config config; MA_ZERO_OBJECT(&config); config.channelsOut = channelsOut; config.pChannelMapOut = NULL; config.handedness = ma_handedness_right; config.worldUp = ma_vec3f_init_3f(0, 1, 0); config.coneInnerAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterGain = 0; config.speedOfSound = 343.3f; /* Same as OpenAL. Used for doppler effect. */ return config; } typedef struct { size_t sizeInBytes; size_t channelMapOutOffset; } ma_spatializer_listener_heap_layout; static ma_result ma_spatializer_listener_get_heap_layout(const ma_spatializer_listener_config* pConfig, ma_spatializer_listener_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Channel map. We always need this, even for passthroughs. */ pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapOut) * pConfig->channelsOut); return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_spatializer_listener_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener) { ma_result result; ma_spatializer_listener_heap_layout heapLayout; if (pListener == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pListener); result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pListener->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pListener->config = *pConfig; ma_atomic_vec3f_init(&pListener->position, ma_vec3f_init_3f(0, 0, 0)); ma_atomic_vec3f_init(&pListener->direction, ma_vec3f_init_3f(0, 0, -1)); ma_atomic_vec3f_init(&pListener->velocity, ma_vec3f_init_3f(0, 0, 0)); pListener->isEnabled = MA_TRUE; /* Swap the forward direction if we're left handed (it was initialized based on right handed). */ if (pListener->config.handedness == ma_handedness_left) { ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_listener_get_direction(pListener)); ma_spatializer_listener_set_direction(pListener, negDir.x, negDir.y, negDir.z); } /* We must always have a valid channel map. */ pListener->config.pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset); /* Use a slightly different default channel map for stereo. */ if (pConfig->pChannelMapOut == NULL) { ma_get_default_channel_map_for_spatializer(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->channelsOut); } else { ma_channel_map_copy_or_default(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut); } return MA_SUCCESS; } MA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_spatializer_listener_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_spatializer_listener_init_preallocated(pConfig, pHeap, pListener); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pListener->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks) { if (pListener == NULL) { return; } if (pListener->_ownsHeap) { ma_free(pListener->_pHeap, pAllocationCallbacks); } } MA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener) { if (pListener == NULL) { return NULL; } return pListener->config.pChannelMapOut; } MA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pListener == NULL) { return; } pListener->config.coneInnerAngleInRadians = innerAngleInRadians; pListener->config.coneOuterAngleInRadians = outerAngleInRadians; pListener->config.coneOuterGain = outerGain; } MA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pListener == NULL) { return; } if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = pListener->config.coneInnerAngleInRadians; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = pListener->config.coneOuterAngleInRadians; } if (pOuterGain != NULL) { *pOuterGain = pListener->config.coneOuterGain; } } MA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->position, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->position); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->direction, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, -1); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->direction); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } ma_atomic_vec3f_set(&pListener->velocity, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->velocity); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound) { if (pListener == NULL) { return; } pListener->config.speedOfSound = speedOfSound; } MA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return 0; } return pListener->config.speedOfSound; } MA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z) { if (pListener == NULL) { return; } pListener->config.worldUp = ma_vec3f_init_3f(x, y, z); } MA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return ma_vec3f_init_3f(0, 1, 0); } return pListener->config.worldUp; } MA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled) { if (pListener == NULL) { return; } pListener->isEnabled = isEnabled; } MA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener) { if (pListener == NULL) { return MA_FALSE; } return pListener->isEnabled; } MA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut) { ma_spatializer_config config; MA_ZERO_OBJECT(&config); config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.pChannelMapIn = NULL; config.attenuationModel = ma_attenuation_model_inverse; config.positioning = ma_positioning_absolute; config.handedness = ma_handedness_right; config.minGain = 0; config.maxGain = 1; config.minDistance = 1; config.maxDistance = MA_FLT_MAX; config.rolloff = 1; config.coneInnerAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterAngleInRadians = 6.283185f; /* 360 degrees. */ config.coneOuterGain = 0.0f; config.dopplerFactor = 1; config.directionalAttenuationFactor = 1; config.minSpatializationChannelGain = 0.2f; config.gainSmoothTimeInFrames = 360; /* 7.5ms @ 48K. */ return config; } static ma_gainer_config ma_spatializer_gainer_config_init(const ma_spatializer_config* pConfig) { MA_ASSERT(pConfig != NULL); return ma_gainer_config_init(pConfig->channelsOut, pConfig->gainSmoothTimeInFrames); } static ma_result ma_spatializer_validate_config(const ma_spatializer_config* pConfig) { MA_ASSERT(pConfig != NULL); if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } return MA_SUCCESS; } typedef struct { size_t sizeInBytes; size_t channelMapInOffset; size_t newChannelGainsOffset; size_t gainerOffset; } ma_spatializer_heap_layout; static ma_result ma_spatializer_get_heap_layout(const ma_spatializer_config* pConfig, ma_spatializer_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_spatializer_validate_config(pConfig); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes = 0; /* Channel map. */ pHeapLayout->channelMapInOffset = MA_SIZE_MAX; /* <-- MA_SIZE_MAX indicates no allocation necessary. */ if (pConfig->pChannelMapIn != NULL) { pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapIn) * pConfig->channelsIn); } /* New channel gains for output. */ pHeapLayout->newChannelGainsOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(float) * pConfig->channelsOut); /* Gainer. */ { size_t gainerHeapSizeInBytes; ma_gainer_config gainerConfig; gainerConfig = ma_spatializer_gainer_config_init(pConfig); result = ma_gainer_get_heap_size(&gainerConfig, &gainerHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(gainerHeapSizeInBytes); } return MA_SUCCESS; } MA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_spatializer_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; /* Safety. */ result = ma_spatializer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer) { ma_result result; ma_spatializer_heap_layout heapLayout; ma_gainer_config gainerConfig; if (pSpatializer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSpatializer); if (pConfig == NULL || pHeap == NULL) { return MA_INVALID_ARGS; } result = ma_spatializer_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pSpatializer->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pSpatializer->channelsIn = pConfig->channelsIn; pSpatializer->channelsOut = pConfig->channelsOut; pSpatializer->attenuationModel = pConfig->attenuationModel; pSpatializer->positioning = pConfig->positioning; pSpatializer->handedness = pConfig->handedness; pSpatializer->minGain = pConfig->minGain; pSpatializer->maxGain = pConfig->maxGain; pSpatializer->minDistance = pConfig->minDistance; pSpatializer->maxDistance = pConfig->maxDistance; pSpatializer->rolloff = pConfig->rolloff; pSpatializer->coneInnerAngleInRadians = pConfig->coneInnerAngleInRadians; pSpatializer->coneOuterAngleInRadians = pConfig->coneOuterAngleInRadians; pSpatializer->coneOuterGain = pConfig->coneOuterGain; pSpatializer->dopplerFactor = pConfig->dopplerFactor; pSpatializer->minSpatializationChannelGain = pConfig->minSpatializationChannelGain; pSpatializer->directionalAttenuationFactor = pConfig->directionalAttenuationFactor; pSpatializer->gainSmoothTimeInFrames = pConfig->gainSmoothTimeInFrames; ma_atomic_vec3f_init(&pSpatializer->position, ma_vec3f_init_3f(0, 0, 0)); ma_atomic_vec3f_init(&pSpatializer->direction, ma_vec3f_init_3f(0, 0, -1)); ma_atomic_vec3f_init(&pSpatializer->velocity, ma_vec3f_init_3f(0, 0, 0)); pSpatializer->dopplerPitch = 1; /* Swap the forward direction if we're left handed (it was initialized based on right handed). */ if (pSpatializer->handedness == ma_handedness_left) { ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_get_direction(pSpatializer)); ma_spatializer_set_direction(pSpatializer, negDir.x, negDir.y, negDir.z); } /* Channel map. This will be on the heap. */ if (pConfig->pChannelMapIn != NULL) { pSpatializer->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset); ma_channel_map_copy_or_default(pSpatializer->pChannelMapIn, pSpatializer->channelsIn, pConfig->pChannelMapIn, pSpatializer->channelsIn); } /* New channel gains for output channels. */ pSpatializer->pNewChannelGainsOut = (float*)ma_offset_ptr(pHeap, heapLayout.newChannelGainsOffset); /* Gainer. */ gainerConfig = ma_spatializer_gainer_config_init(pConfig); result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pSpatializer->gainer); if (result != MA_SUCCESS) { return result; /* Failed to initialize the gainer. */ } return MA_SUCCESS; } MA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer) { ma_result result; size_t heapSizeInBytes; void* pHeap; /* We'll need a heap allocation to retrieve the size. */ result = ma_spatializer_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_spatializer_init_preallocated(pConfig, pHeap, pSpatializer); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pSpatializer->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks) { if (pSpatializer == NULL) { return; } ma_gainer_uninit(&pSpatializer->gainer, pAllocationCallbacks); if (pSpatializer->_ownsHeap) { ma_free(pSpatializer->_pHeap, pAllocationCallbacks); } } static float ma_calculate_angular_gain(ma_vec3f dirA, ma_vec3f dirB, float coneInnerAngleInRadians, float coneOuterAngleInRadians, float coneOuterGain) { /* Angular attenuation. Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure this out for ourselves at the expense of possibly being inconsistent with other implementations. To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We just need to get the direction from the source to the listener and then do a dot product against that and the direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer angles. If the dot product is greater than the outer angle, we just use coneOuterGain. If it's less than the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain. */ if (coneInnerAngleInRadians < 6.283185f) { float angularGain = 1; float cutoffInner = (float)ma_cosd(coneInnerAngleInRadians*0.5f); float cutoffOuter = (float)ma_cosd(coneOuterAngleInRadians*0.5f); float d; d = ma_vec3f_dot(dirA, dirB); if (d > cutoffInner) { /* It's inside the inner angle. */ angularGain = 1; } else { /* It's outside the inner angle. */ if (d > cutoffOuter) { /* It's between the inner and outer angle. We need to linearly interpolate between 1 and coneOuterGain. */ angularGain = ma_mix_f32(coneOuterGain, 1, (d - cutoffOuter) / (cutoffInner - cutoffOuter)); } else { /* It's outside the outer angle. */ angularGain = coneOuterGain; } } /*printf("d = %f; cutoffInner = %f; cutoffOuter = %f; angularGain = %f\n", d, cutoffInner, cutoffOuter, angularGain);*/ return angularGain; } else { /* Inner angle is 360 degrees so no need to do any attenuation. */ return 1; } } MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_channel* pChannelMapIn = pSpatializer->pChannelMapIn; ma_channel* pChannelMapOut = pListener->config.pChannelMapOut; if (pSpatializer == NULL) { return MA_INVALID_ARGS; } /* If we're not spatializing we need to run an optimized path. */ if (ma_atomic_load_i32(&pSpatializer->attenuationModel) == ma_attenuation_model_none) { if (ma_spatializer_listener_is_enabled(pListener)) { /* No attenuation is required, but we'll need to do some channel conversion. */ if (pSpatializer->channelsIn == pSpatializer->channelsOut) { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, pSpatializer->channelsIn); } else { ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, pSpatializer->channelsOut, (const float*)pFramesIn, pChannelMapIn, pSpatializer->channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default); /* Safe casts to float* because f32 is the only supported format. */ } } else { /* The listener is disabled. Output silence. */ ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut); } /* We're not doing attenuation so don't bother with doppler for now. I'm not sure if this is the correct thinking so might need to review this later. */ pSpatializer->dopplerPitch = 1; } else { /* Let's first determine which listener the sound is closest to. Need to keep in mind that we might not have a world or any listeners, in which case we just spatializer based on the listener being positioned at the origin (0, 0, 0). */ ma_vec3f relativePosNormalized; ma_vec3f relativePos; /* The position relative to the listener. */ ma_vec3f relativeDir; /* The direction of the sound, relative to the listener. */ ma_vec3f listenerVel; /* The velocity of the listener. For doppler pitch calculation. */ float speedOfSound; float distance = 0; float gain = 1; ma_uint32 iChannel; const ma_uint32 channelsOut = pSpatializer->channelsOut; const ma_uint32 channelsIn = pSpatializer->channelsIn; float minDistance = ma_spatializer_get_min_distance(pSpatializer); float maxDistance = ma_spatializer_get_max_distance(pSpatializer); float rolloff = ma_spatializer_get_rolloff(pSpatializer); float dopplerFactor = ma_spatializer_get_doppler_factor(pSpatializer); /* We'll need the listener velocity for doppler pitch calculations. The speed of sound is defined by the listener, so we'll grab that here too. */ if (pListener != NULL) { listenerVel = ma_spatializer_listener_get_velocity(pListener); speedOfSound = pListener->config.speedOfSound; } else { listenerVel = ma_vec3f_init_3f(0, 0, 0); speedOfSound = MA_DEFAULT_SPEED_OF_SOUND; } if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) { /* There's no listener or we're using relative positioning. */ relativePos = ma_spatializer_get_position(pSpatializer); relativeDir = ma_spatializer_get_direction(pSpatializer); } else { /* We've found a listener and we're using absolute positioning. We need to transform the sound's position and direction so that it's relative to listener. Later on we'll use this for determining the factors to apply to each channel to apply the panning effect. */ ma_spatializer_get_relative_position_and_direction(pSpatializer, pListener, &relativePos, &relativeDir); } distance = ma_vec3f_len(relativePos); /* We've gathered the data, so now we can apply some spatialization. */ switch (ma_spatializer_get_attenuation_model(pSpatializer)) { case ma_attenuation_model_inverse: { gain = ma_attenuation_inverse(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_linear: { gain = ma_attenuation_linear(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_exponential: { gain = ma_attenuation_exponential(distance, minDistance, maxDistance, rolloff); } break; case ma_attenuation_model_none: default: { gain = 1; } break; } /* Normalize the position. */ if (distance > 0.001f) { float distanceInv = 1/distance; relativePosNormalized = relativePos; relativePosNormalized.x *= distanceInv; relativePosNormalized.y *= distanceInv; relativePosNormalized.z *= distanceInv; } else { distance = 0; relativePosNormalized = ma_vec3f_init_3f(0, 0, 0); } /* Angular attenuation. Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure this out for ourselves at the expense of possibly being inconsistent with other implementations. To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We just need to get the direction from the source to the listener and then do a dot product against that and the direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer angles. If the dot product is greater than the outer angle, we just use coneOuterGain. If it's less than the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain. */ if (distance > 0) { /* Source angular gain. */ float spatializerConeInnerAngle; float spatializerConeOuterAngle; float spatializerConeOuterGain; ma_spatializer_get_cone(pSpatializer, &spatializerConeInnerAngle, &spatializerConeOuterAngle, &spatializerConeOuterGain); gain *= ma_calculate_angular_gain(relativeDir, ma_vec3f_neg(relativePosNormalized), spatializerConeInnerAngle, spatializerConeOuterAngle, spatializerConeOuterGain); /* We're supporting angular gain on the listener as well for those who want to reduce the volume of sounds that are positioned behind the listener. On default settings, this will have no effect. */ if (pListener != NULL && pListener->config.coneInnerAngleInRadians < 6.283185f) { ma_vec3f listenerDirection; float listenerInnerAngle; float listenerOuterAngle; float listenerOuterGain; if (pListener->config.handedness == ma_handedness_right) { listenerDirection = ma_vec3f_init_3f(0, 0, -1); } else { listenerDirection = ma_vec3f_init_3f(0, 0, +1); } listenerInnerAngle = pListener->config.coneInnerAngleInRadians; listenerOuterAngle = pListener->config.coneOuterAngleInRadians; listenerOuterGain = pListener->config.coneOuterGain; gain *= ma_calculate_angular_gain(listenerDirection, relativePosNormalized, listenerInnerAngle, listenerOuterAngle, listenerOuterGain); } } else { /* The sound is right on top of the listener. Don't do any angular attenuation. */ } /* Clamp the gain. */ gain = ma_clamp(gain, ma_spatializer_get_min_gain(pSpatializer), ma_spatializer_get_max_gain(pSpatializer)); /* The gain needs to be applied per-channel here. The spatialization code below will be changing the per-channel gains which will then eventually be passed into the gainer which will deal with smoothing the gain transitions to avoid harsh changes in gain. */ for (iChannel = 0; iChannel < channelsOut; iChannel += 1) { pSpatializer->pNewChannelGainsOut[iChannel] = gain; } /* Convert to our output channel count. If the listener is disabled we just output silence here. We cannot ignore the whole section of code here because we need to update some internal spatialization state. */ if (ma_spatializer_listener_is_enabled(pListener)) { ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, channelsOut, (const float*)pFramesIn, pChannelMapIn, channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default); } else { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut); } /* Panning. This is where we'll apply the gain and convert to the output channel count. We have an optimized path for when we're converting to a mono stream. In that case we don't really need to do any panning - we just apply the gain to the final output. */ /*printf("distance=%f; gain=%f\n", distance, gain);*/ /* We must have a valid channel map here to ensure we spatialize properly. */ MA_ASSERT(pChannelMapOut != NULL); /* We're not converting to mono so we'll want to apply some panning. This is where the feeling of something being to the left, right, infront or behind the listener is calculated. I'm just using a basic model here. Note that the code below is not based on any specific algorithm. I'm just implementing this off the top of my head and seeing how it goes. There might be better ways to do this. To determine the direction of the sound relative to a speaker I'm using dot products. Each speaker is given a direction. For example, the left channel in a stereo system will be -1 on the X axis and the right channel will be +1 on the X axis. A dot product is performed against the direction vector of the channel and the normalized position of the sound. */ /* Calculate our per-channel gains. We do this based on the normalized relative position of the sound and it's relation to the direction of the channel. */ if (distance > 0) { ma_vec3f unitPos = relativePos; float distanceInv = 1/distance; unitPos.x *= distanceInv; unitPos.y *= distanceInv; unitPos.z *= distanceInv; for (iChannel = 0; iChannel < channelsOut; iChannel += 1) { ma_channel channelOut; float d; float dMin; channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannel); if (ma_is_spatial_channel_position(channelOut)) { d = ma_mix_f32_fast(1, ma_vec3f_dot(unitPos, ma_get_channel_direction(channelOut)), ma_spatializer_get_directional_attenuation_factor(pSpatializer)); } else { d = 1; /* It's not a spatial channel so there's no real notion of direction. */ } /* In my testing, if the panning effect is too aggressive it makes spatialization feel uncomfortable. The "dMin" variable below is used to control the aggressiveness of the panning effect. When set to 0, panning will be most extreme and any sounds that are positioned on the opposite side of the speaker will be completely silent from that speaker. Not only does this feel uncomfortable, it doesn't even remotely represent the real world at all because sounds that come from your right side are still clearly audible from your left side. Setting "dMin" to 1 will result in no panning at all, which is also not ideal. By setting it to something greater than 0, the spatialization effect becomes much less dramatic and a lot more bearable. Summary: 0 = more extreme panning; 1 = no panning. */ dMin = pSpatializer->minSpatializationChannelGain; /* At this point, "d" will be positive if the sound is on the same side as the channel and negative if it's on the opposite side. It will be in the range of -1..1. There's two ways I can think of to calculate a panning value. The first is to simply convert it to 0..1, however this has a problem which I'm not entirely happy with. Considering a stereo system, when a sound is positioned right in front of the listener it'll result in each speaker getting a gain of 0.5. I don't know if I like the idea of having a scaling factor of 0.5 being applied to a sound when it's sitting right in front of the listener. I would intuitively expect that to be played at full volume, or close to it. The second idea I think of is to only apply a reduction in gain when the sound is on the opposite side of the speaker. That is, reduce the gain only when the dot product is negative. The problem with this is that there will not be any attenuation as the sound sweeps around the 180 degrees where the dot product is positive. The idea with this option is that you leave the gain at 1 when the sound is being played on the same side as the speaker and then you just reduce the volume when the sound is on the other side. The summarize, I think the first option should give a better sense of spatialization, but the second option is better for preserving the sound's power. UPDATE: In my testing, I find the first option to sound better. You can feel the sense of space a bit better, but you can also hear the reduction in volume when it's right in front. */ #if 1 { /* Scale the dot product from -1..1 to 0..1. Will result in a sound directly in front losing power by being played at 0.5 gain. */ d = (d + 1) * 0.5f; /* -1..1 to 0..1 */ d = ma_max(d, dMin); pSpatializer->pNewChannelGainsOut[iChannel] *= d; } #else { /* Only reduce the volume of the sound if it's on the opposite side. This path keeps the volume more consistent, but comes at the expense of a worse sense of space and positioning. */ if (d < 0) { d += 1; /* Move into the positive range. */ d = ma_max(d, dMin); channelGainsOut[iChannel] *= d; } } #endif } } else { /* Assume the sound is right on top of us. Don't do any panning. */ } /* Now we need to apply the volume to each channel. This needs to run through the gainer to ensure we get a smooth volume transition. */ ma_gainer_set_gains(&pSpatializer->gainer, pSpatializer->pNewChannelGainsOut); ma_gainer_process_pcm_frames(&pSpatializer->gainer, pFramesOut, pFramesOut, frameCount); /* Before leaving we'll want to update our doppler pitch so that the caller can apply some pitch shifting if they desire. Note that we need to negate the relative position here because the doppler calculation needs to be source-to-listener, but ours is listener-to- source. */ if (dopplerFactor > 0) { pSpatializer->dopplerPitch = ma_doppler_pitch(ma_vec3f_sub(ma_spatializer_listener_get_position(pListener), ma_spatializer_get_position(pSpatializer)), ma_spatializer_get_velocity(pSpatializer), listenerVel, speedOfSound, dopplerFactor); } else { pSpatializer->dopplerPitch = 1; } } return MA_SUCCESS; } MA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume) { if (pSpatializer == NULL) { return MA_INVALID_ARGS; } return ma_gainer_set_master_volume(&pSpatializer->gainer, volume); } MA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume) { if (pSpatializer == NULL) { return MA_INVALID_ARGS; } return ma_gainer_get_master_volume(&pSpatializer->gainer, pVolume); } MA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return pSpatializer->channelsIn; } MA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return pSpatializer->channelsOut; } MA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_i32(&pSpatializer->attenuationModel, attenuationModel); } MA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_attenuation_model_none; } return (ma_attenuation_model)ma_atomic_load_i32(&pSpatializer->attenuationModel); } MA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_i32(&pSpatializer->positioning, positioning); } MA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_positioning_absolute; } return (ma_positioning)ma_atomic_load_i32(&pSpatializer->positioning); } MA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->rolloff, rolloff); } MA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->rolloff); } MA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->minGain, minGain); } MA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->minGain); } MA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->maxGain, maxGain); } MA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->maxGain); } MA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->minDistance, minDistance); } MA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->minDistance); } MA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->maxDistance, maxDistance); } MA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 0; } return ma_atomic_load_f32(&pSpatializer->maxDistance); } MA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->coneInnerAngleInRadians, innerAngleInRadians); ma_atomic_exchange_f32(&pSpatializer->coneOuterAngleInRadians, outerAngleInRadians); ma_atomic_exchange_f32(&pSpatializer->coneOuterGain, outerGain); } MA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pSpatializer == NULL) { return; } if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneInnerAngleInRadians); } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneOuterAngleInRadians); } if (pOuterGain != NULL) { *pOuterGain = ma_atomic_load_f32(&pSpatializer->coneOuterGain); } } MA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->dopplerFactor, dopplerFactor); } MA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 1; } return ma_atomic_load_f32(&pSpatializer->dopplerFactor); } MA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor) { if (pSpatializer == NULL) { return; } ma_atomic_exchange_f32(&pSpatializer->directionalAttenuationFactor, directionalAttenuationFactor); } MA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return 1; } return ma_atomic_load_f32(&pSpatializer->directionalAttenuationFactor); } MA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->position, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->position); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->direction, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, -1); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->direction); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z) { if (pSpatializer == NULL) { return; } ma_atomic_vec3f_set(&pSpatializer->velocity, ma_vec3f_init_3f(x, y, z)); } MA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer) { if (pSpatializer == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->velocity); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */ } MA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir) { if (pRelativePos != NULL) { pRelativePos->x = 0; pRelativePos->y = 0; pRelativePos->z = 0; } if (pRelativeDir != NULL) { pRelativeDir->x = 0; pRelativeDir->y = 0; pRelativeDir->z = -1; } if (pSpatializer == NULL) { return; } if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) { /* There's no listener or we're using relative positioning. */ if (pRelativePos != NULL) { *pRelativePos = ma_spatializer_get_position(pSpatializer); } if (pRelativeDir != NULL) { *pRelativeDir = ma_spatializer_get_direction(pSpatializer); } } else { ma_vec3f spatializerPosition; ma_vec3f spatializerDirection; ma_vec3f listenerPosition; ma_vec3f listenerDirection; ma_vec3f v; ma_vec3f axisX; ma_vec3f axisY; ma_vec3f axisZ; float m[4][4]; spatializerPosition = ma_spatializer_get_position(pSpatializer); spatializerDirection = ma_spatializer_get_direction(pSpatializer); listenerPosition = ma_spatializer_listener_get_position(pListener); listenerDirection = ma_spatializer_listener_get_direction(pListener); /* We need to calculate the right vector from our forward and up vectors. This is done with a cross product. */ axisZ = ma_vec3f_normalize(listenerDirection); /* Normalization required here because we can't trust the caller. */ axisX = ma_vec3f_normalize(ma_vec3f_cross(axisZ, pListener->config.worldUp)); /* Normalization required here because the world up vector may not be perpendicular with the forward vector. */ /* The calculation of axisX above can result in a zero-length vector if the listener is looking straight up on the Y axis. We'll need to fall back to a +X in this case so that the calculations below don't fall apart. This is where a quaternion based listener and sound orientation would come in handy. */ if (ma_vec3f_len2(axisX) == 0) { axisX = ma_vec3f_init_3f(1, 0, 0); } axisY = ma_vec3f_cross(axisX, axisZ); /* No normalization is required here because axisX and axisZ are unit length and perpendicular. */ /* We need to swap the X axis if we're left handed because otherwise the cross product above will have resulted in it pointing in the wrong direction (right handed was assumed in the cross products above). */ if (pListener->config.handedness == ma_handedness_left) { axisX = ma_vec3f_neg(axisX); } /* Lookat. */ m[0][0] = axisX.x; m[1][0] = axisX.y; m[2][0] = axisX.z; m[3][0] = -ma_vec3f_dot(axisX, listenerPosition); m[0][1] = axisY.x; m[1][1] = axisY.y; m[2][1] = axisY.z; m[3][1] = -ma_vec3f_dot(axisY, listenerPosition); m[0][2] = -axisZ.x; m[1][2] = -axisZ.y; m[2][2] = -axisZ.z; m[3][2] = -ma_vec3f_dot(ma_vec3f_neg(axisZ), listenerPosition); m[0][3] = 0; m[1][3] = 0; m[2][3] = 0; m[3][3] = 1; /* Multiply the lookat matrix by the spatializer position to transform it to listener space. This allows calculations to work based on the sound being relative to the origin which makes things simpler. */ if (pRelativePos != NULL) { v = spatializerPosition; pRelativePos->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * 1; pRelativePos->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * 1; pRelativePos->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * 1; } /* The direction of the sound needs to also be transformed so that it's relative to the rotation of the listener. */ if (pRelativeDir != NULL) { v = spatializerDirection; pRelativeDir->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z; pRelativeDir->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z; pRelativeDir->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z; } } } /************************************************************************************************************************************************************** Resampling **************************************************************************************************************************************************************/ MA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_linear_resampler_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; config.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); config.lpfNyquistFactor = 1; return config; } typedef struct { size_t sizeInBytes; size_t x0Offset; size_t x1Offset; size_t lpfOffset; } ma_linear_resampler_heap_layout; static void ma_linear_resampler_adjust_timer_for_new_rate(ma_linear_resampler* pResampler, ma_uint32 oldSampleRateOut, ma_uint32 newSampleRateOut) { /* So what's happening here? Basically we need to adjust the fractional component of the time advance based on the new rate. The old time advance will be based on the old sample rate, but we are needing to adjust it to that it's based on the new sample rate. */ ma_uint32 oldRateTimeWhole = pResampler->inTimeFrac / oldSampleRateOut; /* <-- This should almost never be anything other than 0, but leaving it here to make this more general and robust just in case. */ ma_uint32 oldRateTimeFract = pResampler->inTimeFrac % oldSampleRateOut; pResampler->inTimeFrac = (oldRateTimeWhole * newSampleRateOut) + ((oldRateTimeFract * newSampleRateOut) / oldSampleRateOut); /* Make sure the fractional part is less than the output sample rate. */ pResampler->inTimeInt += pResampler->inTimeFrac / pResampler->config.sampleRateOut; pResampler->inTimeFrac = pResampler->inTimeFrac % pResampler->config.sampleRateOut; } static ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pResampler, void* pHeap, ma_linear_resampler_heap_layout* pHeapLayout, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_bool32 isResamplerAlreadyInitialized) { ma_result result; ma_uint32 gcf; ma_uint32 lpfSampleRate; double lpfCutoffFrequency; ma_lpf_config lpfConfig; ma_uint32 oldSampleRateOut; /* Required for adjusting time advance down the bottom. */ if (pResampler == NULL) { return MA_INVALID_ARGS; } if (sampleRateIn == 0 || sampleRateOut == 0) { return MA_INVALID_ARGS; } oldSampleRateOut = pResampler->config.sampleRateOut; pResampler->config.sampleRateIn = sampleRateIn; pResampler->config.sampleRateOut = sampleRateOut; /* Simplify the sample rate. */ gcf = ma_gcf_u32(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut); pResampler->config.sampleRateIn /= gcf; pResampler->config.sampleRateOut /= gcf; /* Always initialize the low-pass filter, even when the order is 0. */ if (pResampler->config.lpfOrder > MA_MAX_FILTER_ORDER) { return MA_INVALID_ARGS; } lpfSampleRate = (ma_uint32)(ma_max(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut)); lpfCutoffFrequency = ( double)(ma_min(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut) * 0.5 * pResampler->config.lpfNyquistFactor); lpfConfig = ma_lpf_config_init(pResampler->config.format, pResampler->config.channels, lpfSampleRate, lpfCutoffFrequency, pResampler->config.lpfOrder); /* If the resampler is already initialized we don't want to do a fresh initialization of the low-pass filter because it will result in the cached frames getting cleared. Instead we re-initialize the filter which will maintain any cached frames. */ if (isResamplerAlreadyInitialized) { result = ma_lpf_reinit(&lpfConfig, &pResampler->lpf); } else { result = ma_lpf_init_preallocated(&lpfConfig, ma_offset_ptr(pHeap, pHeapLayout->lpfOffset), &pResampler->lpf); } if (result != MA_SUCCESS) { return result; } pResampler->inAdvanceInt = pResampler->config.sampleRateIn / pResampler->config.sampleRateOut; pResampler->inAdvanceFrac = pResampler->config.sampleRateIn % pResampler->config.sampleRateOut; /* Our timer was based on the old rate. We need to adjust it so that it's based on the new rate. */ ma_linear_resampler_adjust_timer_for_new_rate(pResampler, oldSampleRateOut, pResampler->config.sampleRateOut); return MA_SUCCESS; } static ma_result ma_linear_resampler_get_heap_layout(const ma_linear_resampler_config* pConfig, ma_linear_resampler_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* x0 */ pHeapLayout->x0Offset = pHeapLayout->sizeInBytes; if (pConfig->format == ma_format_f32) { pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; } else { pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels; } /* x1 */ pHeapLayout->x1Offset = pHeapLayout->sizeInBytes; if (pConfig->format == ma_format_f32) { pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels; } else { pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels; } /* LPF */ pHeapLayout->lpfOffset = ma_align_64(pHeapLayout->sizeInBytes); { ma_result result; size_t lpfHeapSizeInBytes; ma_lpf_config lpfConfig = ma_lpf_config_init(pConfig->format, pConfig->channels, 1, 1, pConfig->lpfOrder); /* Sample rate and cutoff frequency do not matter. */ result = ma_lpf_get_heap_size(&lpfConfig, &lpfHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += lpfHeapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_linear_resampler_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler) { ma_result result; ma_linear_resampler_heap_layout heapLayout; if (pResampler == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResampler); result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pResampler->config = *pConfig; pResampler->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); if (pConfig->format == ma_format_f32) { pResampler->x0.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x0Offset); pResampler->x1.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x1Offset); } else { pResampler->x0.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x0Offset); pResampler->x1.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x1Offset); } /* Setting the rate will set up the filter and time advances for us. */ result = ma_linear_resampler_set_rate_internal(pResampler, pHeap, &heapLayout, pConfig->sampleRateIn, pConfig->sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_FALSE); if (result != MA_SUCCESS) { return result; } pResampler->inTimeInt = 1; /* Set this to one to force an input sample to always be loaded for the first output frame. */ pResampler->inTimeFrac = 0; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_linear_resampler_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_linear_resampler_init_preallocated(pConfig, pHeap, pResampler); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pResampler->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks) { if (pResampler == NULL) { return; } ma_lpf_uninit(&pResampler->lpf, pAllocationCallbacks); if (pResampler->_ownsHeap) { ma_free(pResampler->_pHeap, pAllocationCallbacks); } } static MA_INLINE ma_int16 ma_linear_resampler_mix_s16(ma_int16 x, ma_int16 y, ma_int32 a, const ma_int32 shift) { ma_int32 b; ma_int32 c; ma_int32 r; MA_ASSERT(a <= (1<> shift); } static void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_int16* MA_RESTRICT pFrameOut) { ma_uint32 c; ma_uint32 a; const ma_uint32 channels = pResampler->config.channels; const ma_uint32 shift = 12; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameOut != NULL); a = (pResampler->inTimeFrac << shift) / pResampler->config.sampleRateOut; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { ma_int16 s = ma_linear_resampler_mix_s16(pResampler->x0.s16[c], pResampler->x1.s16[c], a, shift); pFrameOut[c] = s; } } static void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float* MA_RESTRICT pFrameOut) { ma_uint32 c; float a; const ma_uint32 channels = pResampler->config.channels; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameOut != NULL); a = (float)pResampler->inTimeFrac / pResampler->config.sampleRateOut; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { float s = ma_mix_f32_fast(pResampler->x0.f32[c], pResampler->x1.f32[c], a); pFrameOut[c] = s; } } static ma_result ma_linear_resampler_process_pcm_frames_s16_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const ma_int16* pFramesInS16; /* */ ma_int16* pFramesOutS16; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInS16 = (const ma_int16*)pFramesIn; pFramesOutS16 = ( ma_int16*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInS16 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = pFramesInS16[iChannel]; } pFramesInS16 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = 0; } } /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pResampler->x1.s16, pResampler->x1.s16); } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */ if (pFramesOutS16 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16); pFramesOutS16 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_s16_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const ma_int16* pFramesInS16; /* */ ma_int16* pFramesOutS16; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInS16 = (const ma_int16*)pFramesIn; pFramesOutS16 = ( ma_int16*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInS16 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = pFramesInS16[iChannel]; } pFramesInS16 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel]; pResampler->x1.s16[iChannel] = 0; } } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and we can generate the next output frame. */ if (pFramesOutS16 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16); /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pFramesOutS16, pFramesOutS16); } pFramesOutS16 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_s16(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pResampler != NULL); if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) { return ma_linear_resampler_process_pcm_frames_s16_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { return ma_linear_resampler_process_pcm_frames_s16_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } static ma_result ma_linear_resampler_process_pcm_frames_f32_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const float* pFramesInF32; /* */ float* pFramesOutF32; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInF32 = (const float*)pFramesIn; pFramesOutF32 = ( float*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInF32 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = pFramesInF32[iChannel]; } pFramesInF32 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = 0; } } /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pResampler->x1.f32, pResampler->x1.f32); } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */ if (pFramesOutF32 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32); pFramesOutF32 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_f32_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { const float* pFramesInF32; /* */ float* pFramesOutF32; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pResampler != NULL); MA_ASSERT(pFrameCountIn != NULL); MA_ASSERT(pFrameCountOut != NULL); pFramesInF32 = (const float*)pFramesIn; pFramesOutF32 = ( float*)pFramesOut; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { /* Before interpolating we need to load the buffers. */ while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) { ma_uint32 iChannel; if (pFramesInF32 != NULL) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = pFramesInF32[iChannel]; } pFramesInF32 += pResampler->config.channels; } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel]; pResampler->x1.f32[iChannel] = 0; } } framesProcessedIn += 1; pResampler->inTimeInt -= 1; } if (pResampler->inTimeInt > 0) { break; /* Ran out of input data. */ } /* Getting here means the frames have been loaded and we can generate the next output frame. */ if (pFramesOutF32 != NULL) { MA_ASSERT(pResampler->inTimeInt == 0); ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32); /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */ if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) { ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pFramesOutF32, pFramesOutF32); } pFramesOutF32 += pResampler->config.channels; } framesProcessedOut += 1; /* Advance time forward. */ pResampler->inTimeInt += pResampler->inAdvanceInt; pResampler->inTimeFrac += pResampler->inAdvanceFrac; if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) { pResampler->inTimeFrac -= pResampler->config.sampleRateOut; pResampler->inTimeInt += 1; } } *pFrameCountIn = framesProcessedIn; *pFrameCountOut = framesProcessedOut; return MA_SUCCESS; } static ma_result ma_linear_resampler_process_pcm_frames_f32(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pResampler != NULL); if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) { return ma_linear_resampler_process_pcm_frames_f32_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { return ma_linear_resampler_process_pcm_frames_f32_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } MA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pResampler == NULL) { return MA_INVALID_ARGS; } /* */ if (pResampler->config.format == ma_format_s16) { return ma_linear_resampler_process_pcm_frames_s16(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else if (pResampler->config.format == ma_format_f32) { return ma_linear_resampler_process_pcm_frames_f32(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { /* Should never get here. Getting here means the format is not supported and you didn't check the return value of ma_linear_resampler_init(). */ MA_ASSERT(MA_FALSE); return MA_INVALID_ARGS; } } MA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { return ma_linear_resampler_set_rate_internal(pResampler, NULL, NULL, sampleRateIn, sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_TRUE); } MA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut) { ma_uint32 n; ma_uint32 d; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (ratioInOut <= 0) { return MA_INVALID_ARGS; } d = 1000000; n = (ma_uint32)(ratioInOut * d); if (n == 0) { return MA_INVALID_ARGS; /* Ratio too small. */ } MA_ASSERT(n != 0); return ma_linear_resampler_set_rate(pResampler, n, d); } MA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler) { if (pResampler == NULL) { return 0; } return 1 + ma_lpf_get_latency(&pResampler->lpf); } MA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler) { if (pResampler == NULL) { return 0; } return ma_linear_resampler_get_input_latency(pResampler) * pResampler->config.sampleRateOut / pResampler->config.sampleRateIn; } MA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { ma_uint64 inputFrameCount; if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (outputFrameCount == 0) { return MA_SUCCESS; } /* Any whole input frames are consumed before the first output frame is generated. */ inputFrameCount = pResampler->inTimeInt; outputFrameCount -= 1; /* The rest of the output frames can be calculated in constant time. */ inputFrameCount += outputFrameCount * pResampler->inAdvanceInt; inputFrameCount += (pResampler->inTimeFrac + (outputFrameCount * pResampler->inAdvanceFrac)) / pResampler->config.sampleRateOut; *pInputFrameCount = inputFrameCount; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { ma_uint64 outputFrameCount; ma_uint64 preliminaryInputFrameCountFromFrac; ma_uint64 preliminaryInputFrameCount; if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } /* The first step is to get a preliminary output frame count. This will either be exactly equal to what we need, or less by 1. We need to determine how many input frames will be consumed by this value. If it's greater than our original input frame count it means we won't be able to generate an extra frame because we will have run out of input data. Otherwise we will have enough input for the generation of an extra output frame. This add-by-one logic is necessary due to how the data loading logic works when processing frames. */ outputFrameCount = (inputFrameCount * pResampler->config.sampleRateOut) / pResampler->config.sampleRateIn; /* We need to determine how many *whole* input frames will have been processed to generate our preliminary output frame count. This is used in the logic below to determine whether or not we need to add an extra output frame. */ preliminaryInputFrameCountFromFrac = (pResampler->inTimeFrac + outputFrameCount*pResampler->inAdvanceFrac) / pResampler->config.sampleRateOut; preliminaryInputFrameCount = (pResampler->inTimeInt + outputFrameCount*pResampler->inAdvanceInt ) + preliminaryInputFrameCountFromFrac; /* If the total number of *whole* input frames that would be required to generate our preliminary output frame count is greater than the amount of whole input frames we have available as input we need to *not* add an extra output frame as there won't be enough data to actually process. Otherwise we need to add the extra output frame. */ if (preliminaryInputFrameCount <= inputFrameCount) { outputFrameCount += 1; } *pOutputFrameCount = outputFrameCount; return MA_SUCCESS; } MA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler) { ma_uint32 iChannel; if (pResampler == NULL) { return MA_INVALID_ARGS; } /* Timers need to be cleared back to zero. */ pResampler->inTimeInt = 1; /* Set this to one to force an input sample to always be loaded for the first output frame. */ pResampler->inTimeFrac = 0; /* Cached samples need to be cleared. */ if (pResampler->config.format == ma_format_f32) { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.f32[iChannel] = 0; pResampler->x1.f32[iChannel] = 0; } } else { for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) { pResampler->x0.s16[iChannel] = 0; pResampler->x1.s16[iChannel] = 0; } } /* The low pass filter needs to have its cache reset. */ ma_lpf_clear_cache(&pResampler->lpf); return MA_SUCCESS; } /* Linear resampler backend vtable. */ static ma_linear_resampler_config ma_resampling_backend_get_config__linear(const ma_resampler_config* pConfig) { ma_linear_resampler_config linearConfig; linearConfig = ma_linear_resampler_config_init(pConfig->format, pConfig->channels, pConfig->sampleRateIn, pConfig->sampleRateOut); linearConfig.lpfOrder = pConfig->linear.lpfOrder; return linearConfig; } static ma_result ma_resampling_backend_get_heap_size__linear(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_linear_resampler_config linearConfig; (void)pUserData; linearConfig = ma_resampling_backend_get_config__linear(pConfig); return ma_linear_resampler_get_heap_size(&linearConfig, pHeapSizeInBytes); } static ma_result ma_resampling_backend_init__linear(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend) { ma_resampler* pResampler = (ma_resampler*)pUserData; ma_result result; ma_linear_resampler_config linearConfig; (void)pUserData; linearConfig = ma_resampling_backend_get_config__linear(pConfig); result = ma_linear_resampler_init_preallocated(&linearConfig, pHeap, &pResampler->state.linear); if (result != MA_SUCCESS) { return result; } *ppBackend = &pResampler->state.linear; return MA_SUCCESS; } static void ma_resampling_backend_uninit__linear(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { (void)pUserData; ma_linear_resampler_uninit((ma_linear_resampler*)pBackend, pAllocationCallbacks); } static ma_result ma_resampling_backend_process__linear(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { (void)pUserData; return ma_linear_resampler_process_pcm_frames((ma_linear_resampler*)pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } static ma_result ma_resampling_backend_set_rate__linear(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { (void)pUserData; return ma_linear_resampler_set_rate((ma_linear_resampler*)pBackend, sampleRateIn, sampleRateOut); } static ma_uint64 ma_resampling_backend_get_input_latency__linear(void* pUserData, const ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_get_input_latency((const ma_linear_resampler*)pBackend); } static ma_uint64 ma_resampling_backend_get_output_latency__linear(void* pUserData, const ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_get_output_latency((const ma_linear_resampler*)pBackend); } static ma_result ma_resampling_backend_get_required_input_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { (void)pUserData; return ma_linear_resampler_get_required_input_frame_count((const ma_linear_resampler*)pBackend, outputFrameCount, pInputFrameCount); } static ma_result ma_resampling_backend_get_expected_output_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { (void)pUserData; return ma_linear_resampler_get_expected_output_frame_count((const ma_linear_resampler*)pBackend, inputFrameCount, pOutputFrameCount); } static ma_result ma_resampling_backend_reset__linear(void* pUserData, ma_resampling_backend* pBackend) { (void)pUserData; return ma_linear_resampler_reset((ma_linear_resampler*)pBackend); } static ma_resampling_backend_vtable g_ma_linear_resampler_vtable = { ma_resampling_backend_get_heap_size__linear, ma_resampling_backend_init__linear, ma_resampling_backend_uninit__linear, ma_resampling_backend_process__linear, ma_resampling_backend_set_rate__linear, ma_resampling_backend_get_input_latency__linear, ma_resampling_backend_get_output_latency__linear, ma_resampling_backend_get_required_input_frame_count__linear, ma_resampling_backend_get_expected_output_frame_count__linear, ma_resampling_backend_reset__linear }; MA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm) { ma_resampler_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; config.algorithm = algorithm; /* Linear. */ config.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); return config; } static ma_result ma_resampler_get_vtable(const ma_resampler_config* pConfig, ma_resampler* pResampler, ma_resampling_backend_vtable** ppVTable, void** ppUserData) { MA_ASSERT(pConfig != NULL); MA_ASSERT(ppVTable != NULL); MA_ASSERT(ppUserData != NULL); /* Safety. */ *ppVTable = NULL; *ppUserData = NULL; switch (pConfig->algorithm) { case ma_resample_algorithm_linear: { *ppVTable = &g_ma_linear_resampler_vtable; *ppUserData = pResampler; } break; case ma_resample_algorithm_custom: { *ppVTable = pConfig->pBackendVTable; *ppUserData = pConfig->pBackendUserData; } break; default: return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_resampling_backend_vtable* pVTable; void* pVTableUserData; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_resampler_get_vtable(pConfig, NULL, &pVTable, &pVTableUserData); if (result != MA_SUCCESS) { return result; } if (pVTable == NULL || pVTable->onGetHeapSize == NULL) { return MA_NOT_IMPLEMENTED; } result = pVTable->onGetHeapSize(pVTableUserData, pConfig, pHeapSizeInBytes); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler) { ma_result result; if (pResampler == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResampler); if (pConfig == NULL) { return MA_INVALID_ARGS; } pResampler->_pHeap = pHeap; pResampler->format = pConfig->format; pResampler->channels = pConfig->channels; pResampler->sampleRateIn = pConfig->sampleRateIn; pResampler->sampleRateOut = pConfig->sampleRateOut; result = ma_resampler_get_vtable(pConfig, pResampler, &pResampler->pBackendVTable, &pResampler->pBackendUserData); if (result != MA_SUCCESS) { return result; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onInit == NULL) { return MA_NOT_IMPLEMENTED; /* onInit not implemented. */ } result = pResampler->pBackendVTable->onInit(pResampler->pBackendUserData, pConfig, pHeap, &pResampler->pBackend); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_resampler_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_resampler_init_preallocated(pConfig, pHeap, pResampler); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pResampler->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks) { if (pResampler == NULL) { return; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onUninit == NULL) { return; } pResampler->pBackendVTable->onUninit(pResampler->pBackendUserData, pResampler->pBackend, pAllocationCallbacks); if (pResampler->_ownsHeap) { ma_free(pResampler->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pFrameCountOut == NULL && pFrameCountIn == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onProcess == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onProcess(pResampler->pBackendUserData, pResampler->pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } MA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_result result; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (sampleRateIn == 0 || sampleRateOut == 0) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onSetRate == NULL) { return MA_NOT_IMPLEMENTED; } result = pResampler->pBackendVTable->onSetRate(pResampler->pBackendUserData, pResampler->pBackend, sampleRateIn, sampleRateOut); if (result != MA_SUCCESS) { return result; } pResampler->sampleRateIn = sampleRateIn; pResampler->sampleRateOut = sampleRateOut; return MA_SUCCESS; } MA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio) { ma_uint32 n; ma_uint32 d; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (ratio <= 0) { return MA_INVALID_ARGS; } d = 1000; n = (ma_uint32)(ratio * d); if (n == 0) { return MA_INVALID_ARGS; /* Ratio too small. */ } MA_ASSERT(n != 0); return ma_resampler_set_rate(pResampler, n, d); } MA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler) { if (pResampler == NULL) { return 0; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetInputLatency == NULL) { return 0; } return pResampler->pBackendVTable->onGetInputLatency(pResampler->pBackendUserData, pResampler->pBackend); } MA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler) { if (pResampler == NULL) { return 0; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetOutputLatency == NULL) { return 0; } return pResampler->pBackendVTable->onGetOutputLatency(pResampler->pBackendUserData, pResampler->pBackend); } MA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetRequiredInputFrameCount == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onGetRequiredInputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, outputFrameCount, pInputFrameCount); } MA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetExpectedOutputFrameCount == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onGetExpectedOutputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, inputFrameCount, pOutputFrameCount); } MA_API ma_result ma_resampler_reset(ma_resampler* pResampler) { if (pResampler == NULL) { return MA_INVALID_ARGS; } if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onReset == NULL) { return MA_NOT_IMPLEMENTED; } return pResampler->pBackendVTable->onReset(pResampler->pBackendUserData, pResampler->pBackend); } /************************************************************************************************************************************************************** Channel Conversion **************************************************************************************************************************************************************/ #ifndef MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT #define MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT 12 #endif #define MA_PLANE_LEFT 0 #define MA_PLANE_RIGHT 1 #define MA_PLANE_FRONT 2 #define MA_PLANE_BACK 3 #define MA_PLANE_BOTTOM 4 #define MA_PLANE_TOP 5 static float g_maChannelPlaneRatios[MA_CHANNEL_POSITION_COUNT][6] = { { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_NONE */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_MONO */ { 0.5f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_LEFT */ { 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_RIGHT */ { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_CENTER */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_LFE */ { 0.5f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_LEFT */ { 0.0f, 0.5f, 0.0f, 0.5f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_RIGHT */ { 0.25f, 0.0f, 0.75f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_LEFT_CENTER */ { 0.0f, 0.25f, 0.75f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_FRONT_RIGHT_CENTER */ { 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f}, /* MA_CHANNEL_BACK_CENTER */ { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_SIDE_LEFT */ { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_SIDE_RIGHT */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, /* MA_CHANNEL_TOP_CENTER */ { 0.33f, 0.0f, 0.33f, 0.0f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_FRONT_LEFT */ { 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.5f}, /* MA_CHANNEL_TOP_FRONT_CENTER */ { 0.0f, 0.33f, 0.33f, 0.0f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_FRONT_RIGHT */ { 0.33f, 0.0f, 0.0f, 0.33f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_BACK_LEFT */ { 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 0.5f}, /* MA_CHANNEL_TOP_BACK_CENTER */ { 0.0f, 0.33f, 0.0f, 0.33f, 0.0f, 0.34f}, /* MA_CHANNEL_TOP_BACK_RIGHT */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_0 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_1 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_2 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_3 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_4 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_5 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_6 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_7 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_8 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_9 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_10 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_11 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_12 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_13 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_14 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_15 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_16 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_17 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_18 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_19 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_20 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_21 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_22 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_23 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_24 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_25 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_26 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_27 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_28 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_29 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_30 */ { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, /* MA_CHANNEL_AUX_31 */ }; static float ma_calculate_channel_position_rectangular_weight(ma_channel channelPositionA, ma_channel channelPositionB) { /* Imagine the following simplified example: You have a single input speaker which is the front/left speaker which you want to convert to the following output configuration: - front/left - side/left - back/left The front/left output is easy - it the same speaker position so it receives the full contribution of the front/left input. The amount of contribution to apply to the side/left and back/left speakers, however, is a bit more complicated. Imagine the front/left speaker as emitting audio from two planes - the front plane and the left plane. You can think of the front/left speaker emitting half of its total volume from the front, and the other half from the left. Since part of its volume is being emitted from the left side, and the side/left and back/left channels also emit audio from the left plane, one would expect that they would receive some amount of contribution from front/left speaker. The amount of contribution depends on how many planes are shared between the two speakers. Note that in the examples below I've added a top/front/left speaker as an example just to show how the math works across 3 spatial dimensions. The first thing to do is figure out how each speaker's volume is spread over each of plane: - front/left: 2 planes (front and left) = 1/2 = half its total volume on each plane - side/left: 1 plane (left only) = 1/1 = entire volume from left plane - back/left: 2 planes (back and left) = 1/2 = half its total volume on each plane - top/front/left: 3 planes (top, front and left) = 1/3 = one third its total volume on each plane The amount of volume each channel contributes to each of its planes is what controls how much it is willing to given and take to other channels on the same plane. The volume that is willing to the given by one channel is multiplied by the volume that is willing to be taken by the other to produce the final contribution. */ /* Contribution = Sum(Volume to Give * Volume to Take) */ float contribution = g_maChannelPlaneRatios[channelPositionA][0] * g_maChannelPlaneRatios[channelPositionB][0] + g_maChannelPlaneRatios[channelPositionA][1] * g_maChannelPlaneRatios[channelPositionB][1] + g_maChannelPlaneRatios[channelPositionA][2] * g_maChannelPlaneRatios[channelPositionB][2] + g_maChannelPlaneRatios[channelPositionA][3] * g_maChannelPlaneRatios[channelPositionB][3] + g_maChannelPlaneRatios[channelPositionA][4] * g_maChannelPlaneRatios[channelPositionB][4] + g_maChannelPlaneRatios[channelPositionA][5] * g_maChannelPlaneRatios[channelPositionB][5]; return contribution; } MA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode) { ma_channel_converter_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.pChannelMapIn = pChannelMapIn; config.pChannelMapOut = pChannelMapOut; config.mixingMode = mixingMode; return config; } static ma_int32 ma_channel_converter_float_to_fixed(float x) { return (ma_int32)(x * (1< 0); for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_is_spatial_channel_position(ma_channel_map_get_channel(pChannelMap, channels, iChannel))) { spatialChannelCount++; } } return spatialChannelCount; } static ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition) { int i; if (channelPosition == MA_CHANNEL_NONE || channelPosition == MA_CHANNEL_MONO || channelPosition == MA_CHANNEL_LFE) { return MA_FALSE; } if (channelPosition >= MA_CHANNEL_AUX_0 && channelPosition <= MA_CHANNEL_AUX_31) { return MA_FALSE; } for (i = 0; i < 6; ++i) { /* Each side of a cube. */ if (g_maChannelPlaneRatios[channelPosition][i] != 0) { return MA_TRUE; } } return MA_FALSE; } static ma_bool32 ma_channel_map_is_passthrough(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut) { if (channelsOut == channelsIn) { return ma_channel_map_is_equal(pChannelMapOut, pChannelMapIn, channelsOut); } else { return MA_FALSE; /* Channel counts differ, so cannot be a passthrough. */ } } static ma_channel_conversion_path ma_channel_map_get_conversion_path(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, ma_channel_mix_mode mode) { if (ma_channel_map_is_passthrough(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut)) { return ma_channel_conversion_path_passthrough; } if (channelsOut == 1 && (pChannelMapOut == NULL || pChannelMapOut[0] == MA_CHANNEL_MONO)) { return ma_channel_conversion_path_mono_out; } if (channelsIn == 1 && (pChannelMapIn == NULL || pChannelMapIn[0] == MA_CHANNEL_MONO)) { return ma_channel_conversion_path_mono_in; } if (mode == ma_channel_mix_mode_custom_weights) { return ma_channel_conversion_path_weights; } /* We can use a simple shuffle if both channel maps have the same channel count and all channel positions are present in both. */ if (channelsIn == channelsOut) { ma_uint32 iChannelIn; ma_bool32 areAllChannelPositionsPresent = MA_TRUE; for (iChannelIn = 0; iChannelIn < channelsIn; ++iChannelIn) { ma_bool32 isInputChannelPositionInOutput = ma_channel_map_contains_channel_position(channelsOut, pChannelMapOut, ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn)); if (!isInputChannelPositionInOutput) { areAllChannelPositionsPresent = MA_FALSE; break; } } if (areAllChannelPositionsPresent) { return ma_channel_conversion_path_shuffle; } } /* Getting here means we'll need to use weights. */ return ma_channel_conversion_path_weights; } static ma_result ma_channel_map_build_shuffle_table(const ma_channel* pChannelMapIn, ma_uint32 channelCountIn, const ma_channel* pChannelMapOut, ma_uint32 channelCountOut, ma_uint8* pShuffleTable) { ma_uint32 iChannelIn; ma_uint32 iChannelOut; if (pShuffleTable == NULL || channelCountIn == 0 || channelCountOut == 0) { return MA_INVALID_ARGS; } /* When building the shuffle table we just do a 1:1 mapping based on the first occurrence of a channel. If the input channel has more than one occurrence of a channel position, the second one will be ignored. */ for (iChannelOut = 0; iChannelOut < channelCountOut; iChannelOut += 1) { ma_channel channelOut; /* Default to MA_CHANNEL_INDEX_NULL so that if a mapping is not found it'll be set appropriately. */ pShuffleTable[iChannelOut] = MA_CHANNEL_INDEX_NULL; channelOut = ma_channel_map_get_channel(pChannelMapOut, channelCountOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelCountIn; iChannelIn += 1) { ma_channel channelIn; channelIn = ma_channel_map_get_channel(pChannelMapIn, channelCountIn, iChannelIn); if (channelOut == channelIn) { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; break; } /* Getting here means the channels don't exactly match, but we are going to support some relaxed matching for practicality. If, for example, there are two stereo channel maps, but one uses front left/right and the other uses side left/right, it makes logical sense to just map these. The way we'll do it is we'll check if there is a logical corresponding mapping, and if so, apply it, but we will *not* break from the loop, thereby giving the loop a chance to find an exact match later which will take priority. */ switch (channelOut) { /* Left channels. */ case MA_CHANNEL_FRONT_LEFT: case MA_CHANNEL_SIDE_LEFT: { switch (channelIn) { case MA_CHANNEL_FRONT_LEFT: case MA_CHANNEL_SIDE_LEFT: { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; } break; } } break; /* Right channels. */ case MA_CHANNEL_FRONT_RIGHT: case MA_CHANNEL_SIDE_RIGHT: { switch (channelIn) { case MA_CHANNEL_FRONT_RIGHT: case MA_CHANNEL_SIDE_RIGHT: { pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn; } break; } } break; default: break; } } } return MA_SUCCESS; } static void ma_channel_map_apply_shuffle_table_u8(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_s16(ma_int16* pFramesOut, ma_uint32 channelsOut, const ma_int16* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_s24(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut*3 + 0] = pFramesIn[iChannelIn*3 + 0]; pFramesOut[iChannelOut*3 + 1] = pFramesIn[iChannelIn*3 + 1]; pFramesOut[iChannelOut*3 + 2] = pFramesIn[iChannelIn*3 + 2]; } else { pFramesOut[iChannelOut*3 + 0] = 0; } pFramesOut[iChannelOut*3 + 1] = 0; } pFramesOut[iChannelOut*3 + 2] = 0; pFramesOut += channelsOut*3; pFramesIn += channelsIn*3; } } static void ma_channel_map_apply_shuffle_table_s32(ma_int32* pFramesOut, ma_uint32 channelsOut, const ma_int32* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static void ma_channel_map_apply_shuffle_table_f32(float* pFramesOut, ma_uint32 channelsOut, const float* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable) { ma_uint64 iFrame; ma_uint32 iChannelOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_uint8 iChannelIn = pShuffleTable[iChannelOut]; if (iChannelIn < channelsIn) { /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */ pFramesOut[iChannelOut] = pFramesIn[iChannelIn]; } else { pFramesOut[iChannelOut] = 0; } } pFramesOut += channelsOut; pFramesIn += channelsIn; } } static ma_result ma_channel_map_apply_shuffle_table(void* pFramesOut, ma_uint32 channelsOut, const void* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable, ma_format format) { if (pFramesOut == NULL || pFramesIn == NULL || channelsOut == 0 || pShuffleTable == NULL) { return MA_INVALID_ARGS; } switch (format) { case ma_format_u8: { ma_channel_map_apply_shuffle_table_u8((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s16: { ma_channel_map_apply_shuffle_table_s16((ma_int16*)pFramesOut, channelsOut, (const ma_int16*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s24: { ma_channel_map_apply_shuffle_table_s24((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_s32: { ma_channel_map_apply_shuffle_table_s32((ma_int32*)pFramesOut, channelsOut, (const ma_int32*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; case ma_format_f32: { ma_channel_map_apply_shuffle_table_f32((float*)pFramesOut, channelsOut, (const float*)pFramesIn, channelsIn, frameCount, pShuffleTable); } break; default: return MA_INVALID_ARGS; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_map_apply_mono_out_f32(float* pFramesOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannelIn; ma_uint32 accumulationCount; if (pFramesOut == NULL || pFramesIn == NULL || channelsIn == 0) { return MA_INVALID_ARGS; } /* In this case the output stream needs to be the average of all channels, ignoring NONE. */ /* A quick pre-processing step to get the accumulation counter since we're ignoring NONE channels. */ accumulationCount = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { if (ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn) != MA_CHANNEL_NONE) { accumulationCount += 1; } } if (accumulationCount > 0) { /* <-- Prevent a division by zero. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float accumulation = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); if (channelIn != MA_CHANNEL_NONE) { accumulation += pFramesIn[iChannelIn]; } } pFramesOut[0] = accumulation / accumulationCount; pFramesOut += 1; pFramesIn += channelsIn; } } else { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, 1); } return MA_SUCCESS; } static ma_result ma_channel_map_apply_mono_in_f32(float* MA_RESTRICT pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* MA_RESTRICT pFramesIn, ma_uint64 frameCount, ma_mono_expansion_mode monoExpansionMode) { ma_uint64 iFrame; ma_uint32 iChannelOut; if (pFramesOut == NULL || channelsOut == 0 || pFramesIn == NULL) { return MA_INVALID_ARGS; } /* Note that the MA_CHANNEL_NONE channel must be ignored in all cases. */ switch (monoExpansionMode) { case ma_mono_expansion_mode_average: { float weight; ma_uint32 validChannelCount = 0; for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { validChannelCount += 1; } } weight = 1.0f / validChannelCount; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { pFramesOut[iChannelOut] = pFramesIn[0] * weight; } } pFramesOut += channelsOut; pFramesIn += 1; } } break; case ma_mono_expansion_mode_stereo_only: { if (channelsOut >= 2) { ma_uint32 iChannelLeft = (ma_uint32)-1; ma_uint32 iChannelRight = (ma_uint32)-1; /* We first need to find our stereo channels. We prefer front-left and front-right, but if they're not available, we'll also try side-left and side-right. If neither are available we'll fall through to the default case below. */ for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut == MA_CHANNEL_SIDE_LEFT) { iChannelLeft = iChannelOut; } if (channelOut == MA_CHANNEL_SIDE_RIGHT) { iChannelRight = iChannelOut; } } for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut == MA_CHANNEL_FRONT_LEFT) { iChannelLeft = iChannelOut; } if (channelOut == MA_CHANNEL_FRONT_RIGHT) { iChannelRight = iChannelOut; } } if (iChannelLeft != (ma_uint32)-1 && iChannelRight != (ma_uint32)-1) { /* We found our stereo channels so we can duplicate the signal across those channels. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { if (iChannelOut == iChannelLeft || iChannelOut == iChannelRight) { pFramesOut[iChannelOut] = pFramesIn[0]; } else { pFramesOut[iChannelOut] = 0.0f; } } } pFramesOut += channelsOut; pFramesIn += 1; } break; /* Get out of the switch. */ } else { /* Fallthrough. Does not have left and right channels. */ goto default_handler; } } else { /* Fallthrough. Does not have stereo channels. */ goto default_handler; } }; /* Fallthrough. See comments above. */ case ma_mono_expansion_mode_duplicate: default: { default_handler: { if (channelsOut <= MA_MAX_CHANNELS) { ma_bool32 hasEmptyChannel = MA_FALSE; ma_channel channelPositions[MA_MAX_CHANNELS]; for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { channelPositions[iChannelOut] = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelPositions[iChannelOut] == MA_CHANNEL_NONE) { hasEmptyChannel = MA_TRUE; } } if (hasEmptyChannel == MA_FALSE) { /* Faster path when there's no MA_CHANNEL_NONE channel positions. This should hopefully help the compiler with auto-vectorization.m */ if (channelsOut == 2) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* We want to do two frames in each iteration. */ ma_uint64 unrolledFrameCount = frameCount >> 1; for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) { __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]); __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]); _mm_storeu_ps(&pFramesOut[iFrame*4 + 0], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0))); } /* Tail. */ iFrame = unrolledFrameCount << 1; goto generic_on_fastpath; } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 2; iChannelOut += 1) { pFramesOut[iFrame*2 + iChannelOut] = pFramesIn[iFrame]; } } } } else if (channelsOut == 6) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { /* We want to do two frames in each iteration so we can have a multiple of 4 samples. */ ma_uint64 unrolledFrameCount = frameCount >> 1; for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) { __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]); __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]); _mm_storeu_ps(&pFramesOut[iFrame*12 + 0], in0); _mm_storeu_ps(&pFramesOut[iFrame*12 + 4], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0))); _mm_storeu_ps(&pFramesOut[iFrame*12 + 8], in1); } /* Tail. */ iFrame = unrolledFrameCount << 1; goto generic_on_fastpath; } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 6; iChannelOut += 1) { pFramesOut[iFrame*6 + iChannelOut] = pFramesIn[iFrame]; } } } } else if (channelsOut == 8) { #if defined(MA_SUPPORT_SSE2) if (ma_has_sse2()) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { __m128 in = _mm_set1_ps(pFramesIn[iFrame]); _mm_storeu_ps(&pFramesOut[iFrame*8 + 0], in); _mm_storeu_ps(&pFramesOut[iFrame*8 + 4], in); } } else #endif { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < 8; iChannelOut += 1) { pFramesOut[iFrame*8 + iChannelOut] = pFramesIn[iFrame]; } } } } else { iFrame = 0; #if defined(MA_SUPPORT_SSE2) /* For silencing a warning with non-x86 builds. */ generic_on_fastpath: #endif { for (; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } else { /* Slow path. Need to handle MA_CHANNEL_NONE. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { if (channelPositions[iChannelOut] != MA_CHANNEL_NONE) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } else { /* Slow path. Too many channels to store on the stack. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); if (channelOut != MA_CHANNEL_NONE) { pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame]; } } } } } } break; } return MA_SUCCESS; } static void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode) { ma_channel_conversion_path conversionPath = ma_channel_map_get_conversion_path(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, mode); /* Optimized Path: Passthrough */ if (conversionPath == ma_channel_conversion_path_passthrough) { ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, channelsOut); return; } /* Special Path: Mono Output. */ if (conversionPath == ma_channel_conversion_path_mono_out) { ma_channel_map_apply_mono_out_f32(pFramesOut, pFramesIn, pChannelMapIn, channelsIn, frameCount); return; } /* Special Path: Mono Input. */ if (conversionPath == ma_channel_conversion_path_mono_in) { ma_channel_map_apply_mono_in_f32(pFramesOut, pChannelMapOut, channelsOut, pFramesIn, frameCount, monoExpansionMode); return; } /* Getting here means we aren't running on an optimized conversion path. */ if (channelsOut <= MA_MAX_CHANNELS) { ma_result result; if (mode == ma_channel_mix_mode_simple) { ma_channel shuffleTable[MA_MAX_CHANNELS]; result = ma_channel_map_build_shuffle_table(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, shuffleTable); if (result != MA_SUCCESS) { return; } result = ma_channel_map_apply_shuffle_table(pFramesOut, channelsOut, pFramesIn, channelsIn, frameCount, shuffleTable, ma_format_f32); if (result != MA_SUCCESS) { return; } } else { ma_uint32 iFrame; ma_uint32 iChannelOut; ma_uint32 iChannelIn; float weights[32][32]; /* Do not use MA_MAX_CHANNELS here! */ /* If we have a small enough number of channels, pre-compute the weights. Otherwise we'll just need to fall back to a slower path because otherwise we'll run out of stack space. */ if (channelsIn <= ma_countof(weights) && channelsOut <= ma_countof(weights)) { /* Pre-compute weights. */ for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); weights[iChannelOut][iChannelIn] = ma_calculate_channel_position_rectangular_weight(channelOut, channelIn); } } iFrame = 0; /* Experiment: Try an optimized unroll for some specific cases to see how it improves performance. RESULT: Good gains. */ if (channelsOut == 8) { /* Experiment 2: Expand the inner loop to see what kind of different it makes. RESULT: Small, but worthwhile gain. */ if (channelsIn == 2) { for (; iFrame < frameCount; iFrame += 1) { float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; accumulation[0] += pFramesIn[iFrame*2 + 0] * weights[0][0]; accumulation[1] += pFramesIn[iFrame*2 + 0] * weights[1][0]; accumulation[2] += pFramesIn[iFrame*2 + 0] * weights[2][0]; accumulation[3] += pFramesIn[iFrame*2 + 0] * weights[3][0]; accumulation[4] += pFramesIn[iFrame*2 + 0] * weights[4][0]; accumulation[5] += pFramesIn[iFrame*2 + 0] * weights[5][0]; accumulation[6] += pFramesIn[iFrame*2 + 0] * weights[6][0]; accumulation[7] += pFramesIn[iFrame*2 + 0] * weights[7][0]; accumulation[0] += pFramesIn[iFrame*2 + 1] * weights[0][1]; accumulation[1] += pFramesIn[iFrame*2 + 1] * weights[1][1]; accumulation[2] += pFramesIn[iFrame*2 + 1] * weights[2][1]; accumulation[3] += pFramesIn[iFrame*2 + 1] * weights[3][1]; accumulation[4] += pFramesIn[iFrame*2 + 1] * weights[4][1]; accumulation[5] += pFramesIn[iFrame*2 + 1] * weights[5][1]; accumulation[6] += pFramesIn[iFrame*2 + 1] * weights[6][1]; accumulation[7] += pFramesIn[iFrame*2 + 1] * weights[7][1]; pFramesOut[iFrame*8 + 0] = accumulation[0]; pFramesOut[iFrame*8 + 1] = accumulation[1]; pFramesOut[iFrame*8 + 2] = accumulation[2]; pFramesOut[iFrame*8 + 3] = accumulation[3]; pFramesOut[iFrame*8 + 4] = accumulation[4]; pFramesOut[iFrame*8 + 5] = accumulation[5]; pFramesOut[iFrame*8 + 6] = accumulation[6]; pFramesOut[iFrame*8 + 7] = accumulation[7]; } } else { /* When outputting to 8 channels, we can do everything in groups of two 4x SIMD operations. */ for (; iFrame < frameCount; iFrame += 1) { float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn]; accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn]; accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn]; accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn]; accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn]; accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn]; accumulation[6] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[6][iChannelIn]; accumulation[7] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[7][iChannelIn]; } pFramesOut[iFrame*8 + 0] = accumulation[0]; pFramesOut[iFrame*8 + 1] = accumulation[1]; pFramesOut[iFrame*8 + 2] = accumulation[2]; pFramesOut[iFrame*8 + 3] = accumulation[3]; pFramesOut[iFrame*8 + 4] = accumulation[4]; pFramesOut[iFrame*8 + 5] = accumulation[5]; pFramesOut[iFrame*8 + 6] = accumulation[6]; pFramesOut[iFrame*8 + 7] = accumulation[7]; } } } else if (channelsOut == 6) { /* When outputting to 6 channels we unfortunately don't have a nice multiple of 4 to do 4x SIMD operations. Instead we'll expand our weights and do two frames at a time. */ for (; iFrame < frameCount; iFrame += 1) { float accumulation[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn]; accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn]; accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn]; accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn]; accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn]; accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn]; } pFramesOut[iFrame*6 + 0] = accumulation[0]; pFramesOut[iFrame*6 + 1] = accumulation[1]; pFramesOut[iFrame*6 + 2] = accumulation[2]; pFramesOut[iFrame*6 + 3] = accumulation[3]; pFramesOut[iFrame*6 + 4] = accumulation[4]; pFramesOut[iFrame*6 + 5] = accumulation[5]; } } /* Leftover frames. */ for (; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { float accumulation = 0; for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[iChannelOut][iChannelIn]; } pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation; } } } else { /* Cannot pre-compute weights because not enough room in stack-allocated buffer. */ for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) { float accumulation = 0; ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut); for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) { ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn); accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * ma_calculate_channel_position_rectangular_weight(channelOut, channelIn); } pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation; } } } } } else { /* Fall back to silence. If you hit this, what are you doing with so many channels?! */ ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, channelsOut); } } typedef struct { size_t sizeInBytes; size_t channelMapInOffset; size_t channelMapOutOffset; size_t shuffleTableOffset; size_t weightsOffset; } ma_channel_converter_heap_layout; static ma_channel_conversion_path ma_channel_converter_config_get_conversion_path(const ma_channel_converter_config* pConfig) { return ma_channel_map_get_conversion_path(pConfig->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapOut, pConfig->channelsOut, pConfig->mixingMode); } static ma_result ma_channel_converter_get_heap_layout(const ma_channel_converter_config* pConfig, ma_channel_converter_heap_layout* pHeapLayout) { ma_channel_conversion_path conversionPath; MA_ASSERT(pHeapLayout != NULL); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } if (!ma_channel_map_is_valid(pConfig->pChannelMapIn, pConfig->channelsIn)) { return MA_INVALID_ARGS; } if (!ma_channel_map_is_valid(pConfig->pChannelMapOut, pConfig->channelsOut)) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Input channel map. Only need to allocate this if we have an input channel map (otherwise default channel map is assumed). */ pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes; if (pConfig->pChannelMapIn != NULL) { pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsIn; } /* Output channel map. Only need to allocate this if we have an output channel map (otherwise default channel map is assumed). */ pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes; if (pConfig->pChannelMapOut != NULL) { pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsOut; } /* Alignment for the next section. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); /* Whether or not we use weights of a shuffle table depends on the channel map themselves and the algorithm we've chosen. */ conversionPath = ma_channel_converter_config_get_conversion_path(pConfig); /* Shuffle table */ pHeapLayout->shuffleTableOffset = pHeapLayout->sizeInBytes; if (conversionPath == ma_channel_conversion_path_shuffle) { pHeapLayout->sizeInBytes += sizeof(ma_uint8) * pConfig->channelsOut; } /* Weights */ pHeapLayout->weightsOffset = pHeapLayout->sizeInBytes; if (conversionPath == ma_channel_conversion_path_weights) { pHeapLayout->sizeInBytes += sizeof(float*) * pConfig->channelsIn; pHeapLayout->sizeInBytes += sizeof(float ) * pConfig->channelsIn * pConfig->channelsOut; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_channel_converter_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter) { ma_result result; ma_channel_converter_heap_layout heapLayout; if (pConverter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pConverter); result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pConverter->_pHeap = pHeap; MA_ZERO_MEMORY(pConverter->_pHeap, heapLayout.sizeInBytes); pConverter->format = pConfig->format; pConverter->channelsIn = pConfig->channelsIn; pConverter->channelsOut = pConfig->channelsOut; pConverter->mixingMode = pConfig->mixingMode; if (pConfig->pChannelMapIn != NULL) { pConverter->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset); ma_channel_map_copy_or_default(pConverter->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsIn); } else { pConverter->pChannelMapIn = NULL; /* Use default channel map. */ } if (pConfig->pChannelMapOut != NULL) { pConverter->pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset); ma_channel_map_copy_or_default(pConverter->pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut); } else { pConverter->pChannelMapOut = NULL; /* Use default channel map. */ } pConverter->conversionPath = ma_channel_converter_config_get_conversion_path(pConfig); if (pConverter->conversionPath == ma_channel_conversion_path_shuffle) { pConverter->pShuffleTable = (ma_uint8*)ma_offset_ptr(pHeap, heapLayout.shuffleTableOffset); ma_channel_map_build_shuffle_table(pConverter->pChannelMapIn, pConverter->channelsIn, pConverter->pChannelMapOut, pConverter->channelsOut, pConverter->pShuffleTable); } if (pConverter->conversionPath == ma_channel_conversion_path_weights) { ma_uint32 iChannelIn; ma_uint32 iChannelOut; if (pConverter->format == ma_format_f32) { pConverter->weights.f32 = (float** )ma_offset_ptr(pHeap, heapLayout.weightsOffset); for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { pConverter->weights.f32[iChannelIn] = (float*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(float*) * pConverter->channelsIn) + (sizeof(float) * pConverter->channelsOut * iChannelIn))); } } else { pConverter->weights.s16 = (ma_int32**)ma_offset_ptr(pHeap, heapLayout.weightsOffset); for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { pConverter->weights.s16[iChannelIn] = (ma_int32*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(ma_int32*) * pConverter->channelsIn) + (sizeof(ma_int32) * pConverter->channelsOut * iChannelIn))); } } /* Silence our weights by default. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) { if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = 0.0f; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = 0; } } } /* We now need to fill out our weights table. This is determined by the mixing mode. */ /* In all cases we need to make sure all channels that are present in both channel maps have a 1:1 mapping. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (channelPosIn == channelPosOut) { float weight = 1; if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } switch (pConverter->mixingMode) { case ma_channel_mix_mode_custom_weights: { if (pConfig->ppWeights == NULL) { return MA_INVALID_ARGS; /* Config specified a custom weights mixing mode, but no custom weights have been specified. */ } for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) { float weight = pConfig->ppWeights[iChannelIn][iChannelOut]; if (pConverter->format == ma_format_f32) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } else { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } break; case ma_channel_mix_mode_simple: { /* In simple mode, only set weights for channels that have exactly matching types, leave the rest at zero. The 1:1 mappings have already been covered before this switch statement. */ } break; case ma_channel_mix_mode_rectangular: default: { /* Unmapped input channels. */ for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { if (!ma_channel_map_contains_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, channelPosIn)) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (ma_is_spatial_channel_position(channelPosOut)) { float weight = 0; if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) { weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut); } /* Only apply the weight if we haven't already got some contribution from the respective channels. */ if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } } } } /* Unmapped output channels. */ for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut); if (ma_is_spatial_channel_position(channelPosOut)) { if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, channelPosOut)) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { float weight = 0; if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) { weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut); } /* Only apply the weight if we haven't already got some contribution from the respective channels. */ if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) { pConverter->weights.f32[iChannelIn][iChannelOut] = weight; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) { pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight); } } } } } } } /* If LFE is in the output channel map but was not present in the input channel map, configure its weight now */ if (pConfig->calculateLFEFromSpatialChannels) { if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, MA_CHANNEL_LFE)) { ma_uint32 spatialChannelCount = ma_channel_map_get_spatial_channel_count(pConverter->pChannelMapIn, pConverter->channelsIn); ma_uint32 iChannelOutLFE; if (spatialChannelCount > 0 && ma_channel_map_find_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, MA_CHANNEL_LFE, &iChannelOutLFE)) { const float weightForLFE = 1.0f / spatialChannelCount; for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { const ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn); if (ma_is_spatial_channel_position(channelPosIn)) { if (pConverter->format == ma_format_f32) { if (pConverter->weights.f32[iChannelIn][iChannelOutLFE] == 0) { pConverter->weights.f32[iChannelIn][iChannelOutLFE] = weightForLFE; } } else { if (pConverter->weights.s16[iChannelIn][iChannelOutLFE] == 0) { pConverter->weights.s16[iChannelIn][iChannelOutLFE] = ma_channel_converter_float_to_fixed(weightForLFE); } } } } } } } } break; } } return MA_SUCCESS; } MA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_channel_converter_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_channel_converter_init_preallocated(pConfig, pHeap, pConverter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pConverter->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pConverter == NULL) { return; } if (pConverter->_ownsHeap) { ma_free(pConverter->_pHeap, pAllocationCallbacks); } } static ma_result ma_channel_converter_process_pcm_frames__passthrough(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__shuffle(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsIn == pConverter->channelsOut); return ma_channel_map_apply_shuffle_table(pFramesOut, pConverter->channelsOut, pFramesIn, pConverter->channelsIn, frameCount, pConverter->pShuffleTable, pConverter->format); } static ma_result ma_channel_converter_process_pcm_frames__mono_in(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsIn == 1); switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutU8[iFrame*pConverter->channelsOut + iChannel] = pFramesInU8[iFrame]; } } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; if (pConverter->channelsOut == 2) { for (iFrame = 0; iFrame < frameCount; ++iFrame) { pFramesOutS16[iFrame*2 + 0] = pFramesInS16[iFrame]; pFramesOutS16[iFrame*2 + 1] = pFramesInS16[iFrame]; } } else { for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutS16[iFrame*pConverter->channelsOut + iChannel] = pFramesInS16[iFrame]; } } } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { ma_uint64 iSampleOut = iFrame*pConverter->channelsOut + iChannel; ma_uint64 iSampleIn = iFrame; pFramesOutS24[iSampleOut*3 + 0] = pFramesInS24[iSampleIn*3 + 0]; pFramesOutS24[iSampleOut*3 + 1] = pFramesInS24[iSampleIn*3 + 1]; pFramesOutS24[iSampleOut*3 + 2] = pFramesInS24[iSampleIn*3 + 2]; } } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutS32[iFrame*pConverter->channelsOut + iChannel] = pFramesInS32[iFrame]; } } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; if (pConverter->channelsOut == 2) { for (iFrame = 0; iFrame < frameCount; ++iFrame) { pFramesOutF32[iFrame*2 + 0] = pFramesInF32[iFrame]; pFramesOutF32[iFrame*2 + 1] = pFramesInF32[iFrame]; } } else { for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) { pFramesOutF32[iFrame*pConverter->channelsOut + iChannel] = pFramesInF32[iFrame]; } } } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__mono_out(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); MA_ASSERT(pConverter->channelsOut == 1); switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int32 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8[iFrame*pConverter->channelsIn + iChannel]); } pFramesOutU8[iFrame] = ma_clip_u8(t / pConverter->channelsOut); } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int32 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInS16[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutS16[iFrame] = (ma_int16)(t / pConverter->channelsIn); } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int64 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24[(iFrame*pConverter->channelsIn + iChannel)*3]); } ma_pcm_sample_s32_to_s24_no_scale(t / pConverter->channelsIn, &pFramesOutS24[iFrame*3]); } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { ma_int64 t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInS32[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutS32[iFrame] = (ma_int32)(t / pConverter->channelsIn); } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; ++iFrame) { float t = 0; for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) { t += pFramesInF32[iFrame*pConverter->channelsIn + iChannel]; } pFramesOutF32[iFrame] = t / pConverter->channelsIn; } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } static ma_result ma_channel_converter_process_pcm_frames__weights(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { ma_uint32 iFrame; ma_uint32 iChannelIn; ma_uint32 iChannelOut; MA_ASSERT(pConverter != NULL); MA_ASSERT(pFramesOut != NULL); MA_ASSERT(pFramesIn != NULL); /* This is the more complicated case. Each of the output channels is accumulated with 0 or more input channels. */ /* Clear. */ ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); /* Accumulate. */ switch (pConverter->format) { case ma_format_u8: { /* */ ma_uint8* pFramesOutU8 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInU8 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int16 u8_O = ma_pcm_sample_u8_to_s16_no_scale(pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut]); ma_int16 u8_I = ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8 [iFrame*pConverter->channelsIn + iChannelIn ]); ma_int32 s = (ma_int32)ma_clamp(u8_O + ((u8_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -128, 127); pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_u8((ma_int16)s); } } } } break; case ma_format_s16: { /* */ ma_int16* pFramesOutS16 = ( ma_int16*)pFramesOut; const ma_int16* pFramesInS16 = (const ma_int16*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int32 s = pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut]; s += (pFramesInS16[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT; pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut] = (ma_int16)ma_clamp(s, -32768, 32767); } } } } break; case ma_format_s24: { /* */ ma_uint8* pFramesOutS24 = ( ma_uint8*)pFramesOut; const ma_uint8* pFramesInS24 = (const ma_uint8*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int64 s24_O = ma_pcm_sample_s24_to_s32_no_scale(&pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]); ma_int64 s24_I = ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24 [(iFrame*pConverter->channelsIn + iChannelIn )*3]); ma_int64 s24 = (ma_int32)ma_clamp(s24_O + ((s24_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -8388608, 8388607); ma_pcm_sample_s32_to_s24_no_scale(s24, &pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]); } } } } break; case ma_format_s32: { /* */ ma_int32* pFramesOutS32 = ( ma_int32*)pFramesOut; const ma_int32* pFramesInS32 = (const ma_int32*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { ma_int64 s = pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut]; s += ((ma_int64)pFramesInS32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT; pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_s32(s); } } } } break; case ma_format_f32: { /* */ float* pFramesOutF32 = ( float*)pFramesOut; const float* pFramesInF32 = (const float*)pFramesIn; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) { for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) { pFramesOutF32[iFrame*pConverter->channelsOut + iChannelOut] += pFramesInF32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.f32[iChannelIn][iChannelOut]; } } } } break; default: return MA_INVALID_OPERATION; /* Unknown format. */ } return MA_SUCCESS; } MA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pFramesOut == NULL) { return MA_INVALID_ARGS; } if (pFramesIn == NULL) { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut)); return MA_SUCCESS; } switch (pConverter->conversionPath) { case ma_channel_conversion_path_passthrough: return ma_channel_converter_process_pcm_frames__passthrough(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_mono_out: return ma_channel_converter_process_pcm_frames__mono_out(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_mono_in: return ma_channel_converter_process_pcm_frames__mono_in(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_shuffle: return ma_channel_converter_process_pcm_frames__shuffle(pConverter, pFramesOut, pFramesIn, frameCount); case ma_channel_conversion_path_weights: default: { return ma_channel_converter_process_pcm_frames__weights(pConverter, pFramesOut, pFramesIn, frameCount); } } } MA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapIn, pConverter->channelsIn); return MA_SUCCESS; } MA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapOut, pConverter->channelsOut); return MA_SUCCESS; } /************************************************************************************************************************************************************** Data Conversion **************************************************************************************************************************************************************/ MA_API ma_data_converter_config ma_data_converter_config_init_default(void) { ma_data_converter_config config; MA_ZERO_OBJECT(&config); config.ditherMode = ma_dither_mode_none; config.resampling.algorithm = ma_resample_algorithm_linear; config.allowDynamicSampleRate = MA_FALSE; /* Disable dynamic sample rates by default because dynamic rate adjustments should be quite rare and it allows an optimization for cases when the in and out sample rates are the same. */ /* Linear resampling defaults. */ config.resampling.linear.lpfOrder = 1; return config; } MA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { ma_data_converter_config config = ma_data_converter_config_init_default(); config.formatIn = formatIn; config.formatOut = formatOut; config.channelsIn = channelsIn; config.channelsOut = channelsOut; config.sampleRateIn = sampleRateIn; config.sampleRateOut = sampleRateOut; return config; } typedef struct { size_t sizeInBytes; size_t channelConverterOffset; size_t resamplerOffset; } ma_data_converter_heap_layout; static ma_bool32 ma_data_converter_config_is_resampler_required(const ma_data_converter_config* pConfig) { MA_ASSERT(pConfig != NULL); return pConfig->allowDynamicSampleRate || pConfig->sampleRateIn != pConfig->sampleRateOut; } static ma_format ma_data_converter_config_get_mid_format(const ma_data_converter_config* pConfig) { MA_ASSERT(pConfig != NULL); /* We want to avoid as much data conversion as possible. The channel converter and linear resampler both support s16 and f32 natively. We need to decide on the format to use for this stage. We call this the mid format because it's used in the middle stage of the conversion pipeline. If the output format is either s16 or f32 we use that one. If that is not the case it will do the same thing for the input format. If it's neither we just use f32. If we are using a custom resampling backend, we can only guarantee that f32 will be supported so we'll be forced to use that if resampling is required. */ if (ma_data_converter_config_is_resampler_required(pConfig) && pConfig->resampling.algorithm != ma_resample_algorithm_linear) { return ma_format_f32; /* <-- Force f32 since that is the only one we can guarantee will be supported by the resampler. */ } else { /* */ if (pConfig->formatOut == ma_format_s16 || pConfig->formatOut == ma_format_f32) { return pConfig->formatOut; } else if (pConfig->formatIn == ma_format_s16 || pConfig->formatIn == ma_format_f32) { return pConfig->formatIn; } else { return ma_format_f32; } } } static ma_channel_converter_config ma_channel_converter_config_init_from_data_converter_config(const ma_data_converter_config* pConfig) { ma_channel_converter_config channelConverterConfig; MA_ASSERT(pConfig != NULL); channelConverterConfig = ma_channel_converter_config_init(ma_data_converter_config_get_mid_format(pConfig), pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelMixMode); channelConverterConfig.ppWeights = pConfig->ppChannelWeights; channelConverterConfig.calculateLFEFromSpatialChannels = pConfig->calculateLFEFromSpatialChannels; return channelConverterConfig; } static ma_resampler_config ma_resampler_config_init_from_data_converter_config(const ma_data_converter_config* pConfig) { ma_resampler_config resamplerConfig; ma_uint32 resamplerChannels; MA_ASSERT(pConfig != NULL); /* The resampler is the most expensive part of the conversion process, so we need to do it at the stage where the channel count is at it's lowest. */ if (pConfig->channelsIn < pConfig->channelsOut) { resamplerChannels = pConfig->channelsIn; } else { resamplerChannels = pConfig->channelsOut; } resamplerConfig = ma_resampler_config_init(ma_data_converter_config_get_mid_format(pConfig), resamplerChannels, pConfig->sampleRateIn, pConfig->sampleRateOut, pConfig->resampling.algorithm); resamplerConfig.linear = pConfig->resampling.linear; resamplerConfig.pBackendVTable = pConfig->resampling.pBackendVTable; resamplerConfig.pBackendUserData = pConfig->resampling.pBackendUserData; return resamplerConfig; } static ma_result ma_data_converter_get_heap_layout(const ma_data_converter_config* pConfig, ma_data_converter_heap_layout* pHeapLayout) { ma_result result; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Channel converter. */ pHeapLayout->channelConverterOffset = pHeapLayout->sizeInBytes; { size_t heapSizeInBytes; ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig); result = ma_channel_converter_get_heap_size(&channelConverterConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += heapSizeInBytes; } /* Resampler. */ pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes; if (ma_data_converter_config_is_resampler_required(pConfig)) { size_t heapSizeInBytes; ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig); result = ma_resampler_get_heap_size(&resamplerConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes += heapSizeInBytes; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_data_converter_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_data_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter) { ma_result result; ma_data_converter_heap_layout heapLayout; ma_format midFormat; ma_bool32 isResamplingRequired; if (pConverter == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pConverter); result = ma_data_converter_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pConverter->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pConverter->formatIn = pConfig->formatIn; pConverter->formatOut = pConfig->formatOut; pConverter->channelsIn = pConfig->channelsIn; pConverter->channelsOut = pConfig->channelsOut; pConverter->sampleRateIn = pConfig->sampleRateIn; pConverter->sampleRateOut = pConfig->sampleRateOut; pConverter->ditherMode = pConfig->ditherMode; /* Determine if resampling is required. We need to do this so we can determine an appropriate mid format to use. If resampling is required, the mid format must be ma_format_f32 since that is the only one that is guaranteed to supported by custom resampling backends. */ isResamplingRequired = ma_data_converter_config_is_resampler_required(pConfig); midFormat = ma_data_converter_config_get_mid_format(pConfig); /* Channel converter. We always initialize this, but we check if it configures itself as a passthrough to determine whether or not it's needed. */ { ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig); result = ma_channel_converter_init_preallocated(&channelConverterConfig, ma_offset_ptr(pHeap, heapLayout.channelConverterOffset), &pConverter->channelConverter); if (result != MA_SUCCESS) { return result; } /* If the channel converter is not a passthrough we need to enable it. Otherwise we can skip it. */ if (pConverter->channelConverter.conversionPath != ma_channel_conversion_path_passthrough) { pConverter->hasChannelConverter = MA_TRUE; } } /* Resampler. */ if (isResamplingRequired) { ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig); result = ma_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pConverter->resampler); if (result != MA_SUCCESS) { return result; } pConverter->hasResampler = MA_TRUE; } /* We can simplify pre- and post-format conversion if we have neither channel conversion nor resampling. */ if (pConverter->hasChannelConverter == MA_FALSE && pConverter->hasResampler == MA_FALSE) { /* We have neither channel conversion nor resampling so we'll only need one of pre- or post-format conversion, or none if the input and output formats are the same. */ if (pConverter->formatIn == pConverter->formatOut) { /* The formats are the same so we can just pass through. */ pConverter->hasPreFormatConversion = MA_FALSE; pConverter->hasPostFormatConversion = MA_FALSE; } else { /* The formats are different so we need to do either pre- or post-format conversion. It doesn't matter which. */ pConverter->hasPreFormatConversion = MA_FALSE; pConverter->hasPostFormatConversion = MA_TRUE; } } else { /* We have a channel converter and/or resampler so we'll need channel conversion based on the mid format. */ if (pConverter->formatIn != midFormat) { pConverter->hasPreFormatConversion = MA_TRUE; } if (pConverter->formatOut != midFormat) { pConverter->hasPostFormatConversion = MA_TRUE; } } /* We can enable passthrough optimizations if applicable. Note that we'll only be able to do this if the sample rate is static. */ if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE && pConverter->hasChannelConverter == MA_FALSE && pConverter->hasResampler == MA_FALSE) { pConverter->isPassthrough = MA_TRUE; } /* We now need to determine our execution path. */ if (pConverter->isPassthrough) { pConverter->executionPath = ma_data_converter_execution_path_passthrough; } else { if (pConverter->channelsIn < pConverter->channelsOut) { /* Do resampling first, if necessary. */ MA_ASSERT(pConverter->hasChannelConverter == MA_TRUE); if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_resample_first; } else { pConverter->executionPath = ma_data_converter_execution_path_channels_only; } } else { /* Do channel conversion first, if necessary. */ if (pConverter->hasChannelConverter) { if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_channels_first; } else { pConverter->executionPath = ma_data_converter_execution_path_channels_only; } } else { /* Channel routing not required. */ if (pConverter->hasResampler) { pConverter->executionPath = ma_data_converter_execution_path_resample_only; } else { pConverter->executionPath = ma_data_converter_execution_path_format_only; } } } } return MA_SUCCESS; } MA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_data_converter_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_data_converter_init_preallocated(pConfig, pHeap, pConverter); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pConverter->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks) { if (pConverter == NULL) { return; } if (pConverter->hasResampler) { ma_resampler_uninit(&pConverter->resampler, pAllocationCallbacks); } ma_channel_converter_uninit(&pConverter->channelConverter, pAllocationCallbacks); if (pConverter->_ownsHeap) { ma_free(pConverter->_pHeap, pAllocationCallbacks); } } static ma_result ma_data_converter_process_pcm_frames__passthrough(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pFramesOut != NULL) { if (pFramesIn != NULL) { ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__format_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pFramesOut != NULL) { if (pFramesIn != NULL) { ma_convert_pcm_frames_format(pFramesOut, pConverter->formatOut, pFramesIn, pConverter->formatIn, frameCount, pConverter->channelsIn, pConverter->ditherMode); } else { ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__resample_with_format_conversion(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result = MA_SUCCESS; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; while (framesProcessedOut < frameCountOut) { ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); const void* pFramesInThisIteration; /* */ void* pFramesOutThisIteration; ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; if (pFramesIn != NULL) { pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } else { pFramesInThisIteration = NULL; } if (pFramesOut != NULL) { pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { pFramesOutThisIteration = NULL; } /* Do a pre format conversion if necessary. */ if (pConverter->hasPreFormatConversion) { ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } if (pConverter->hasPostFormatConversion) { if (frameCountInThisIteration > tempBufferOutCap) { frameCountInThisIteration = tempBufferOutCap; } } if (pFramesInThisIteration != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pFramesInThisIteration, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); } else { MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn)); } frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (pConverter->hasPostFormatConversion) { /* Both input and output conversion required. Output to the temp buffer. */ if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration); } else { /* Only pre-format required. Output straight to the output buffer. */ result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pFramesOutThisIteration, &frameCountOutThisIteration); } if (result != MA_SUCCESS) { break; } } else { /* No pre-format required. Just read straight from the input buffer. */ MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE); frameCountInThisIteration = (frameCountIn - framesProcessedIn); frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesInThisIteration, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration); if (result != MA_SUCCESS) { break; } } /* If we are doing a post format conversion we need to do that now. */ if (pConverter->hasPostFormatConversion) { if (pFramesOutThisIteration != NULL) { ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->resampler.channels, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return result; } static ma_result ma_data_converter_process_pcm_frames__resample_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { MA_ASSERT(pConverter != NULL); if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) { /* Neither pre- nor post-format required. This is simple case where only resampling is required. */ return ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } else { /* Format conversion required. */ return ma_data_converter_process_pcm_frames__resample_with_format_conversion(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); } } static ma_result ma_data_converter_process_pcm_frames__channels_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 frameCount; MA_ASSERT(pConverter != NULL); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } frameCount = ma_min(frameCountIn, frameCountOut); if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) { /* No format conversion required. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOut, pFramesIn, frameCount); if (result != MA_SUCCESS) { return result; } } else { /* Format conversion required. */ ma_uint64 framesProcessed = 0; while (framesProcessed < frameCount) { ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); const void* pFramesInThisIteration; /* */ void* pFramesOutThisIteration; ma_uint64 frameCountThisIteration; if (pFramesIn != NULL) { pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessed * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } else { pFramesInThisIteration = NULL; } if (pFramesOut != NULL) { pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessed * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } else { pFramesOutThisIteration = NULL; } /* Do a pre format conversion if necessary. */ if (pConverter->hasPreFormatConversion) { ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn); frameCountThisIteration = (frameCount - framesProcessed); if (frameCountThisIteration > tempBufferInCap) { frameCountThisIteration = tempBufferInCap; } if (pConverter->hasPostFormatConversion) { if (frameCountThisIteration > tempBufferOutCap) { frameCountThisIteration = tempBufferOutCap; } } if (pFramesInThisIteration != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pFramesInThisIteration, pConverter->formatIn, frameCountThisIteration, pConverter->channelsIn, pConverter->ditherMode); } else { MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn)); } if (pConverter->hasPostFormatConversion) { /* Both input and output conversion required. Output to the temp buffer. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pTempBufferIn, frameCountThisIteration); } else { /* Only pre-format required. Output straight to the output buffer. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOutThisIteration, pTempBufferIn, frameCountThisIteration); } if (result != MA_SUCCESS) { break; } } else { /* No pre-format required. Just read straight from the input buffer. */ MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE); frameCountThisIteration = (frameCount - framesProcessed); if (frameCountThisIteration > tempBufferOutCap) { frameCountThisIteration = tempBufferOutCap; } result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pFramesInThisIteration, frameCountThisIteration); if (result != MA_SUCCESS) { break; } } /* If we are doing a post format conversion we need to do that now. */ if (pConverter->hasPostFormatConversion) { if (pFramesOutThisIteration != NULL) { ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->channelConverter.format, frameCountThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode); } } framesProcessed += frameCountThisIteration; } } if (pFrameCountIn != NULL) { *pFrameCountIn = frameCount; } if (pFrameCountOut != NULL) { *pFrameCountOut = frameCount; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__resample_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format. */ ma_uint64 tempBufferInCap; ma_uint8 pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format, channel converter input format. */ ma_uint64 tempBufferMidCap; ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In channel converter output format. */ ma_uint64 tempBufferOutCap; MA_ASSERT(pConverter != NULL); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsIn); MA_ASSERT(pConverter->resampler.channels < pConverter->channelConverter.channelsOut); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); tempBufferMidCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); while (framesProcessedOut < frameCountOut) { ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; const void* pRunningFramesIn = NULL; void* pRunningFramesOut = NULL; const void* pResampleBufferIn; void* pChannelsBufferOut; if (pFramesIn != NULL) { pRunningFramesIn = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } if (pFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } /* Run input data through the resampler and output it to the temporary buffer. */ frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (pConverter->hasPreFormatConversion) { if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } } frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferMidCap) { frameCountOutThisIteration = tempBufferMidCap; } /* We can't read more frames than can fit in the output buffer. */ if (pConverter->hasPostFormatConversion) { if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } } /* We need to ensure we don't try to process too many input frames that we run out of room in the output buffer. If this happens we'll end up glitching. */ /* We need to try to predict how many input frames will be required for the resampler. If the resampler can tell us, we'll use that. Otherwise we'll need to make a best guess. The further off we are from this, the more wasted format conversions we'll end up doing. */ #if 1 { ma_uint64 requiredInputFrameCount; result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount); if (result != MA_SUCCESS) { /* Fall back to a best guess. */ requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut; } if (frameCountInThisIteration > requiredInputFrameCount) { frameCountInThisIteration = requiredInputFrameCount; } } #endif if (pConverter->hasPreFormatConversion) { if (pFramesIn != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); pResampleBufferIn = pTempBufferIn; } else { pResampleBufferIn = NULL; } } else { pResampleBufferIn = pRunningFramesIn; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pResampleBufferIn, &frameCountInThisIteration, pTempBufferMid, &frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* The input data has been resampled so now we need to run it through the channel converter. The input data is always contained in pTempBufferMid. We only need to do this part if we have an output buffer. */ if (pFramesOut != NULL) { if (pConverter->hasPostFormatConversion) { pChannelsBufferOut = pTempBufferOut; } else { pChannelsBufferOut = pRunningFramesOut; } result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pChannelsBufferOut, pTempBufferMid, frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* Finally we do post format conversion. */ if (pConverter->hasPostFormatConversion) { ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pChannelsBufferOut, pConverter->channelConverter.format, frameCountOutThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return MA_SUCCESS; } static ma_result ma_data_converter_process_pcm_frames__channels_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { ma_result result; ma_uint64 frameCountIn; ma_uint64 frameCountOut; ma_uint64 framesProcessedIn; ma_uint64 framesProcessedOut; ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format. */ ma_uint64 tempBufferInCap; ma_uint8 pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In resampler format, channel converter input format. */ ma_uint64 tempBufferMidCap; ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In channel converter output format. */ ma_uint64 tempBufferOutCap; MA_ASSERT(pConverter != NULL); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsOut); MA_ASSERT(pConverter->resampler.channels <= pConverter->channelConverter.channelsIn); frameCountIn = 0; if (pFrameCountIn != NULL) { frameCountIn = *pFrameCountIn; } frameCountOut = 0; if (pFrameCountOut != NULL) { frameCountOut = *pFrameCountOut; } framesProcessedIn = 0; framesProcessedOut = 0; tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn); tempBufferMidCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut); tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels); while (framesProcessedOut < frameCountOut) { ma_uint64 frameCountInThisIteration; ma_uint64 frameCountOutThisIteration; const void* pRunningFramesIn = NULL; void* pRunningFramesOut = NULL; const void* pChannelsBufferIn; void* pResampleBufferOut; if (pFramesIn != NULL) { pRunningFramesIn = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn)); } if (pFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut)); } /* Before doing any processing we need to determine how many frames we should try processing this iteration, for both input and output. The resampler requires us to perform format and channel conversion before passing any data into it. If we get our input count wrong, we'll end up performing redundant pre-processing. This isn't the end of the world, but it does result in some inefficiencies proportionate to how far our estimates are off. If the resampler has a means to calculate exactly how much we'll need, we'll use that. Otherwise we'll make a best guess. In order to do this, we'll need to calculate the output frame count first. */ frameCountOutThisIteration = (frameCountOut - framesProcessedOut); if (frameCountOutThisIteration > tempBufferMidCap) { frameCountOutThisIteration = tempBufferMidCap; } if (pConverter->hasPostFormatConversion) { if (frameCountOutThisIteration > tempBufferOutCap) { frameCountOutThisIteration = tempBufferOutCap; } } /* Now that we have the output frame count we can determine the input frame count. */ frameCountInThisIteration = (frameCountIn - framesProcessedIn); if (pConverter->hasPreFormatConversion) { if (frameCountInThisIteration > tempBufferInCap) { frameCountInThisIteration = tempBufferInCap; } } if (frameCountInThisIteration > tempBufferMidCap) { frameCountInThisIteration = tempBufferMidCap; } #if 1 { ma_uint64 requiredInputFrameCount; result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount); if (result != MA_SUCCESS) { /* Fall back to a best guess. */ requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut; } if (frameCountInThisIteration > requiredInputFrameCount) { frameCountInThisIteration = requiredInputFrameCount; } } #endif /* Pre format conversion. */ if (pConverter->hasPreFormatConversion) { if (pRunningFramesIn != NULL) { ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode); pChannelsBufferIn = pTempBufferIn; } else { pChannelsBufferIn = NULL; } } else { pChannelsBufferIn = pRunningFramesIn; } /* Channel conversion. */ result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferMid, pChannelsBufferIn, frameCountInThisIteration); if (result != MA_SUCCESS) { return result; } /* Resampling. */ if (pConverter->hasPostFormatConversion) { pResampleBufferOut = pTempBufferOut; } else { pResampleBufferOut = pRunningFramesOut; } result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferMid, &frameCountInThisIteration, pResampleBufferOut, &frameCountOutThisIteration); if (result != MA_SUCCESS) { return result; } /* Post format conversion. */ if (pConverter->hasPostFormatConversion) { if (pRunningFramesOut != NULL) { ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pResampleBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->channelsOut, pConverter->ditherMode); } } framesProcessedIn += frameCountInThisIteration; framesProcessedOut += frameCountOutThisIteration; MA_ASSERT(framesProcessedIn <= frameCountIn); MA_ASSERT(framesProcessedOut <= frameCountOut); if (frameCountOutThisIteration == 0) { break; /* Consumed all of our input data. */ } } if (pFrameCountIn != NULL) { *pFrameCountIn = framesProcessedIn; } if (pFrameCountOut != NULL) { *pFrameCountOut = framesProcessedOut; } return MA_SUCCESS; } MA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } switch (pConverter->executionPath) { case ma_data_converter_execution_path_passthrough: return ma_data_converter_process_pcm_frames__passthrough(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_format_only: return ma_data_converter_process_pcm_frames__format_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_channels_only: return ma_data_converter_process_pcm_frames__channels_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_resample_only: return ma_data_converter_process_pcm_frames__resample_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_resample_first: return ma_data_converter_process_pcm_frames__resample_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); case ma_data_converter_execution_path_channels_first: return ma_data_converter_process_pcm_frames__channels_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut); default: return MA_INVALID_OPERATION; /* Should never hit this. */ } } MA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler == MA_FALSE) { return MA_INVALID_OPERATION; /* Dynamic resampling not enabled. */ } return ma_resampler_set_rate(&pConverter->resampler, sampleRateIn, sampleRateOut); } MA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut) { if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler == MA_FALSE) { return MA_INVALID_OPERATION; /* Dynamic resampling not enabled. */ } return ma_resampler_set_rate_ratio(&pConverter->resampler, ratioInOut); } MA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter) { if (pConverter == NULL) { return 0; } if (pConverter->hasResampler) { return ma_resampler_get_input_latency(&pConverter->resampler); } return 0; /* No latency without a resampler. */ } MA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter) { if (pConverter == NULL) { return 0; } if (pConverter->hasResampler) { return ma_resampler_get_output_latency(&pConverter->resampler); } return 0; /* No latency without a resampler. */ } MA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount) { if (pInputFrameCount == NULL) { return MA_INVALID_ARGS; } *pInputFrameCount = 0; if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler) { return ma_resampler_get_required_input_frame_count(&pConverter->resampler, outputFrameCount, pInputFrameCount); } else { *pInputFrameCount = outputFrameCount; /* 1:1 */ return MA_SUCCESS; } } MA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount) { if (pOutputFrameCount == NULL) { return MA_INVALID_ARGS; } *pOutputFrameCount = 0; if (pConverter == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasResampler) { return ma_resampler_get_expected_output_frame_count(&pConverter->resampler, inputFrameCount, pOutputFrameCount); } else { *pOutputFrameCount = inputFrameCount; /* 1:1 */ return MA_SUCCESS; } } MA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasChannelConverter) { ma_channel_converter_get_output_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsOut); } return MA_SUCCESS; } MA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap) { if (pConverter == NULL || pChannelMap == NULL) { return MA_INVALID_ARGS; } if (pConverter->hasChannelConverter) { ma_channel_converter_get_input_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsIn); } return MA_SUCCESS; } MA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter) { if (pConverter == NULL) { return MA_INVALID_ARGS; } /* There's nothing to do if we're not resampling. */ if (pConverter->hasResampler == MA_FALSE) { return MA_SUCCESS; } return ma_resampler_reset(&pConverter->resampler); } /************************************************************************************************************************************************************** Channel Maps **************************************************************************************************************************************************************/ static ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex); MA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex) { if (pChannelMap == NULL) { return ma_channel_map_init_standard_channel(ma_standard_channel_map_default, channelCount, channelIndex); } else { if (channelIndex >= channelCount) { return MA_CHANNEL_NONE; } return pChannelMap[channelIndex]; } } MA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels) { if (pChannelMap == NULL) { return; } MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channels); } static ma_channel ma_channel_map_init_standard_channel_microsoft(ma_uint32 channelCount, ma_uint32 channelIndex) { if (channelCount == 0 || channelIndex >= channelCount) { return MA_CHANNEL_NONE; } /* This is the Microsoft channel map. Based off the speaker configurations mentioned here: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ksmedia/ns-ksmedia-ksaudio_channel_config */ switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: /* No defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { #ifndef MA_USE_QUAD_MICROSOFT_CHANNEL_MAP /* Surround. Using the Surround profile has the advantage of the 3rd channel (MA_CHANNEL_FRONT_CENTER) mapping nicely with higher channel counts. */ case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_CENTER; #else /* Quad. */ case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; #endif } } break; case 5: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_SIDE_LEFT; case 5: return MA_CHANNEL_SIDE_RIGHT; } } break; case 7: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_CENTER; case 5: return MA_CHANNEL_SIDE_LEFT; case 6: return MA_CHANNEL_SIDE_RIGHT; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_alsa(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; case 6: return MA_CHANNEL_BACK_CENTER; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_rfc3551(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 2: return MA_CHANNEL_FRONT_CENTER; case 1: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_CENTER; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_SIDE_LEFT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_FRONT_RIGHT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; } } break; } if (channelCount > 6) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_flac(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_CENTER; case 5: return MA_CHANNEL_SIDE_LEFT; case 6: return MA_CHANNEL_SIDE_RIGHT; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_LFE; case 4: return MA_CHANNEL_BACK_LEFT; case 5: return MA_CHANNEL_BACK_RIGHT; case 6: return MA_CHANNEL_SIDE_LEFT; case 7: return MA_CHANNEL_SIDE_RIGHT; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_vorbis(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; case 6: return MA_CHANNEL_LFE; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_LEFT; case 6: return MA_CHANNEL_BACK_RIGHT; case 7: return MA_CHANNEL_LFE; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_sound4(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; } } break; case 6: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_BACK_LEFT; case 4: return MA_CHANNEL_BACK_RIGHT; case 5: return MA_CHANNEL_LFE; } } break; case 7: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_CENTER; case 6: return MA_CHANNEL_LFE; } } break; case 8: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_CENTER; case 2: return MA_CHANNEL_FRONT_RIGHT; case 3: return MA_CHANNEL_SIDE_LEFT; case 4: return MA_CHANNEL_SIDE_RIGHT; case 5: return MA_CHANNEL_BACK_LEFT; case 6: return MA_CHANNEL_BACK_RIGHT; case 7: return MA_CHANNEL_LFE; } } break; } if (channelCount > 8) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel_sndio(ma_uint32 channelCount, ma_uint32 channelIndex) { switch (channelCount) { case 0: return MA_CHANNEL_NONE; case 1: { return MA_CHANNEL_MONO; } break; case 2: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; } } break; case 3: /* No defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_FRONT_CENTER; } } break; case 4: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; } } break; case 5: /* Not defined, but best guess. */ { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; } } break; case 6: default: { switch (channelIndex) { case 0: return MA_CHANNEL_FRONT_LEFT; case 1: return MA_CHANNEL_FRONT_RIGHT; case 2: return MA_CHANNEL_BACK_LEFT; case 3: return MA_CHANNEL_BACK_RIGHT; case 4: return MA_CHANNEL_FRONT_CENTER; case 5: return MA_CHANNEL_LFE; } } break; } if (channelCount > 6) { if (channelIndex < 32) { /* We have 32 AUX channels. */ return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6)); } } /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */ return MA_CHANNEL_NONE; } static ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex) { if (channelCount == 0 || channelIndex >= channelCount) { return MA_CHANNEL_NONE; } switch (standardChannelMap) { case ma_standard_channel_map_alsa: { return ma_channel_map_init_standard_channel_alsa(channelCount, channelIndex); } break; case ma_standard_channel_map_rfc3551: { return ma_channel_map_init_standard_channel_rfc3551(channelCount, channelIndex); } break; case ma_standard_channel_map_flac: { return ma_channel_map_init_standard_channel_flac(channelCount, channelIndex); } break; case ma_standard_channel_map_vorbis: { return ma_channel_map_init_standard_channel_vorbis(channelCount, channelIndex); } break; case ma_standard_channel_map_sound4: { return ma_channel_map_init_standard_channel_sound4(channelCount, channelIndex); } break; case ma_standard_channel_map_sndio: { return ma_channel_map_init_standard_channel_sndio(channelCount, channelIndex); } break; case ma_standard_channel_map_microsoft: /* Also default. */ /*case ma_standard_channel_map_default;*/ default: { return ma_channel_map_init_standard_channel_microsoft(channelCount, channelIndex); } break; } } MA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels) { ma_uint32 iChannel; if (pChannelMap == NULL || channelMapCap == 0 || channels == 0) { return; } for (iChannel = 0; iChannel < channels; iChannel += 1) { if (channelMapCap == 0) { break; /* Ran out of room. */ } pChannelMap[0] = ma_channel_map_init_standard_channel(standardChannelMap, channels, iChannel); pChannelMap += 1; channelMapCap -= 1; } } MA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels) { if (pOut != NULL && pIn != NULL && channels > 0) { MA_COPY_MEMORY(pOut, pIn, sizeof(*pOut) * channels); } } MA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels) { if (pOut == NULL || channels == 0) { return; } if (pIn != NULL) { ma_channel_map_copy(pOut, pIn, channels); } else { ma_channel_map_init_standard(ma_standard_channel_map_default, pOut, channelMapCapOut, channels); } } MA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels) { /* A channel count of 0 is invalid. */ if (channels == 0) { return MA_FALSE; } /* It does not make sense to have a mono channel when there is more than 1 channel. */ if (channels > 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == MA_CHANNEL_MONO) { return MA_FALSE; } } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels) { ma_uint32 iChannel; if (pChannelMapA == pChannelMapB) { return MA_TRUE; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMapA, channels, iChannel) != ma_channel_map_get_channel(pChannelMapB, channels, iChannel)) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels) { ma_uint32 iChannel; /* A null channel map is equivalent to the default channel map. */ if (pChannelMap == NULL) { return MA_FALSE; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (pChannelMap[iChannel] != MA_CHANNEL_NONE) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition) { return ma_channel_map_find_channel_position(channels, pChannelMap, channelPosition, NULL); } MA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex) { ma_uint32 iChannel; if (pChannelIndex != NULL) { *pChannelIndex = (ma_uint32)-1; } for (iChannel = 0; iChannel < channels; ++iChannel) { if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == channelPosition) { if (pChannelIndex != NULL) { *pChannelIndex = iChannel; } return MA_TRUE; } } /* Getting here means the channel position was not found. */ return MA_FALSE; } MA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap) { size_t len; ma_uint32 iChannel; len = 0; for (iChannel = 0; iChannel < channels; iChannel += 1) { const char* pChannelStr = ma_channel_position_to_string(ma_channel_map_get_channel(pChannelMap, channels, iChannel)); size_t channelStrLen = strlen(pChannelStr); /* Append the string if necessary. */ if (pBufferOut != NULL && bufferCap > len + channelStrLen) { MA_COPY_MEMORY(pBufferOut + len, pChannelStr, channelStrLen); } len += channelStrLen; /* Append a space if it's not the last item. */ if (iChannel+1 < channels) { if (pBufferOut != NULL && bufferCap > len + 1) { pBufferOut[len] = ' '; } len += 1; } } /* Null terminate. Don't increment the length here. */ if (pBufferOut != NULL && bufferCap > len + 1) { pBufferOut[len] = '\0'; } return len; } MA_API const char* ma_channel_position_to_string(ma_channel channel) { switch (channel) { case MA_CHANNEL_NONE : return "CHANNEL_NONE"; case MA_CHANNEL_MONO : return "CHANNEL_MONO"; case MA_CHANNEL_FRONT_LEFT : return "CHANNEL_FRONT_LEFT"; case MA_CHANNEL_FRONT_RIGHT : return "CHANNEL_FRONT_RIGHT"; case MA_CHANNEL_FRONT_CENTER : return "CHANNEL_FRONT_CENTER"; case MA_CHANNEL_LFE : return "CHANNEL_LFE"; case MA_CHANNEL_BACK_LEFT : return "CHANNEL_BACK_LEFT"; case MA_CHANNEL_BACK_RIGHT : return "CHANNEL_BACK_RIGHT"; case MA_CHANNEL_FRONT_LEFT_CENTER : return "CHANNEL_FRONT_LEFT_CENTER"; case MA_CHANNEL_FRONT_RIGHT_CENTER: return "CHANNEL_FRONT_RIGHT_CENTER"; case MA_CHANNEL_BACK_CENTER : return "CHANNEL_BACK_CENTER"; case MA_CHANNEL_SIDE_LEFT : return "CHANNEL_SIDE_LEFT"; case MA_CHANNEL_SIDE_RIGHT : return "CHANNEL_SIDE_RIGHT"; case MA_CHANNEL_TOP_CENTER : return "CHANNEL_TOP_CENTER"; case MA_CHANNEL_TOP_FRONT_LEFT : return "CHANNEL_TOP_FRONT_LEFT"; case MA_CHANNEL_TOP_FRONT_CENTER : return "CHANNEL_TOP_FRONT_CENTER"; case MA_CHANNEL_TOP_FRONT_RIGHT : return "CHANNEL_TOP_FRONT_RIGHT"; case MA_CHANNEL_TOP_BACK_LEFT : return "CHANNEL_TOP_BACK_LEFT"; case MA_CHANNEL_TOP_BACK_CENTER : return "CHANNEL_TOP_BACK_CENTER"; case MA_CHANNEL_TOP_BACK_RIGHT : return "CHANNEL_TOP_BACK_RIGHT"; case MA_CHANNEL_AUX_0 : return "CHANNEL_AUX_0"; case MA_CHANNEL_AUX_1 : return "CHANNEL_AUX_1"; case MA_CHANNEL_AUX_2 : return "CHANNEL_AUX_2"; case MA_CHANNEL_AUX_3 : return "CHANNEL_AUX_3"; case MA_CHANNEL_AUX_4 : return "CHANNEL_AUX_4"; case MA_CHANNEL_AUX_5 : return "CHANNEL_AUX_5"; case MA_CHANNEL_AUX_6 : return "CHANNEL_AUX_6"; case MA_CHANNEL_AUX_7 : return "CHANNEL_AUX_7"; case MA_CHANNEL_AUX_8 : return "CHANNEL_AUX_8"; case MA_CHANNEL_AUX_9 : return "CHANNEL_AUX_9"; case MA_CHANNEL_AUX_10 : return "CHANNEL_AUX_10"; case MA_CHANNEL_AUX_11 : return "CHANNEL_AUX_11"; case MA_CHANNEL_AUX_12 : return "CHANNEL_AUX_12"; case MA_CHANNEL_AUX_13 : return "CHANNEL_AUX_13"; case MA_CHANNEL_AUX_14 : return "CHANNEL_AUX_14"; case MA_CHANNEL_AUX_15 : return "CHANNEL_AUX_15"; case MA_CHANNEL_AUX_16 : return "CHANNEL_AUX_16"; case MA_CHANNEL_AUX_17 : return "CHANNEL_AUX_17"; case MA_CHANNEL_AUX_18 : return "CHANNEL_AUX_18"; case MA_CHANNEL_AUX_19 : return "CHANNEL_AUX_19"; case MA_CHANNEL_AUX_20 : return "CHANNEL_AUX_20"; case MA_CHANNEL_AUX_21 : return "CHANNEL_AUX_21"; case MA_CHANNEL_AUX_22 : return "CHANNEL_AUX_22"; case MA_CHANNEL_AUX_23 : return "CHANNEL_AUX_23"; case MA_CHANNEL_AUX_24 : return "CHANNEL_AUX_24"; case MA_CHANNEL_AUX_25 : return "CHANNEL_AUX_25"; case MA_CHANNEL_AUX_26 : return "CHANNEL_AUX_26"; case MA_CHANNEL_AUX_27 : return "CHANNEL_AUX_27"; case MA_CHANNEL_AUX_28 : return "CHANNEL_AUX_28"; case MA_CHANNEL_AUX_29 : return "CHANNEL_AUX_29"; case MA_CHANNEL_AUX_30 : return "CHANNEL_AUX_30"; case MA_CHANNEL_AUX_31 : return "CHANNEL_AUX_31"; default: break; } return "UNKNOWN"; } /************************************************************************************************************************************************************** Conversion Helpers **************************************************************************************************************************************************************/ MA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn) { ma_data_converter_config config; config = ma_data_converter_config_init(formatIn, formatOut, channelsIn, channelsOut, sampleRateIn, sampleRateOut); config.resampling.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER); return ma_convert_frames_ex(pOut, frameCountOut, pIn, frameCountIn, &config); } MA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig) { ma_result result; ma_data_converter converter; if (frameCountIn == 0 || pConfig == NULL) { return 0; } result = ma_data_converter_init(pConfig, NULL, &converter); if (result != MA_SUCCESS) { return 0; /* Failed to initialize the data converter. */ } if (pOut == NULL) { result = ma_data_converter_get_expected_output_frame_count(&converter, frameCountIn, &frameCountOut); if (result != MA_SUCCESS) { if (result == MA_NOT_IMPLEMENTED) { /* No way to calculate the number of frames, so we'll need to brute force it and loop. */ frameCountOut = 0; while (frameCountIn > 0) { ma_uint64 framesProcessedIn = frameCountIn; ma_uint64 framesProcessedOut = 0xFFFFFFFF; result = ma_data_converter_process_pcm_frames(&converter, pIn, &framesProcessedIn, NULL, &framesProcessedOut); if (result != MA_SUCCESS) { break; } frameCountIn -= framesProcessedIn; } } } } else { result = ma_data_converter_process_pcm_frames(&converter, pIn, &frameCountIn, pOut, &frameCountOut); if (result != MA_SUCCESS) { frameCountOut = 0; } } ma_data_converter_uninit(&converter, NULL); return frameCountOut; } /************************************************************************************************************************************************************** Ring Buffer **************************************************************************************************************************************************************/ static MA_INLINE ma_uint32 ma_rb__extract_offset_in_bytes(ma_uint32 encodedOffset) { return encodedOffset & 0x7FFFFFFF; } static MA_INLINE ma_uint32 ma_rb__extract_offset_loop_flag(ma_uint32 encodedOffset) { return encodedOffset & 0x80000000; } static MA_INLINE void* ma_rb__get_read_ptr(ma_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedReadOffset))); } static MA_INLINE void* ma_rb__get_write_ptr(ma_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedWriteOffset))); } static MA_INLINE ma_uint32 ma_rb__construct_offset(ma_uint32 offsetInBytes, ma_uint32 offsetLoopFlag) { return offsetLoopFlag | offsetInBytes; } static MA_INLINE void ma_rb__deconstruct_offset(ma_uint32 encodedOffset, ma_uint32* pOffsetInBytes, ma_uint32* pOffsetLoopFlag) { MA_ASSERT(pOffsetInBytes != NULL); MA_ASSERT(pOffsetLoopFlag != NULL); *pOffsetInBytes = ma_rb__extract_offset_in_bytes(encodedOffset); *pOffsetLoopFlag = ma_rb__extract_offset_loop_flag(encodedOffset); } MA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB) { ma_result result; const ma_uint32 maxSubBufferSize = 0x7FFFFFFF - (MA_SIMD_ALIGNMENT-1); if (pRB == NULL) { return MA_INVALID_ARGS; } if (subbufferSizeInBytes == 0 || subbufferCount == 0) { return MA_INVALID_ARGS; } if (subbufferSizeInBytes > maxSubBufferSize) { return MA_INVALID_ARGS; /* Maximum buffer size is ~2GB. The most significant bit is a flag for use internally. */ } MA_ZERO_OBJECT(pRB); result = ma_allocation_callbacks_init_copy(&pRB->allocationCallbacks, pAllocationCallbacks); if (result != MA_SUCCESS) { return result; } pRB->subbufferSizeInBytes = (ma_uint32)subbufferSizeInBytes; pRB->subbufferCount = (ma_uint32)subbufferCount; if (pOptionalPreallocatedBuffer != NULL) { pRB->subbufferStrideInBytes = (ma_uint32)subbufferStrideInBytes; pRB->pBuffer = pOptionalPreallocatedBuffer; } else { size_t bufferSizeInBytes; /* Here is where we allocate our own buffer. We always want to align this to MA_SIMD_ALIGNMENT for future SIMD optimization opportunity. To do this we need to make sure the stride is a multiple of MA_SIMD_ALIGNMENT. */ pRB->subbufferStrideInBytes = (pRB->subbufferSizeInBytes + (MA_SIMD_ALIGNMENT-1)) & ~MA_SIMD_ALIGNMENT; bufferSizeInBytes = (size_t)pRB->subbufferCount*pRB->subbufferStrideInBytes; pRB->pBuffer = ma_aligned_malloc(bufferSizeInBytes, MA_SIMD_ALIGNMENT, &pRB->allocationCallbacks); if (pRB->pBuffer == NULL) { return MA_OUT_OF_MEMORY; } MA_ZERO_MEMORY(pRB->pBuffer, bufferSizeInBytes); pRB->ownsBuffer = MA_TRUE; } return MA_SUCCESS; } MA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB) { return ma_rb_init_ex(bufferSizeInBytes, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB); } MA_API void ma_rb_uninit(ma_rb* pRB) { if (pRB == NULL) { return; } if (pRB->ownsBuffer) { ma_aligned_free(pRB->pBuffer, &pRB->allocationCallbacks); } } MA_API void ma_rb_reset(ma_rb* pRB) { if (pRB == NULL) { return; } ma_atomic_exchange_32(&pRB->encodedReadOffset, 0); ma_atomic_exchange_32(&pRB->encodedWriteOffset, 0); } MA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut) { ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; size_t bytesAvailable; size_t bytesRequested; if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) { return MA_INVALID_ARGS; } /* The returned buffer should never move ahead of the write pointer. */ writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); /* The number of bytes available depends on whether or not the read and write pointers are on the same loop iteration. If so, we can only read up to the write pointer. If not, we can only read up to the end of the buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { bytesAvailable = writeOffsetInBytes - readOffsetInBytes; } else { bytesAvailable = pRB->subbufferSizeInBytes - readOffsetInBytes; } bytesRequested = *pSizeInBytes; if (bytesRequested > bytesAvailable) { bytesRequested = bytesAvailable; } *pSizeInBytes = bytesRequested; (*ppBufferOut) = ma_rb__get_read_ptr(pRB); return MA_SUCCESS; } MA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 newReadOffsetInBytes; ma_uint32 newReadOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */ newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + sizeInBytes); if (newReadOffsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; /* <-- sizeInBytes will cause the read offset to overflow. */ } /* Move the read pointer back to the start if necessary. */ newReadOffsetLoopFlag = readOffsetLoopFlag; if (newReadOffsetInBytes == pRB->subbufferSizeInBytes) { newReadOffsetInBytes = 0; newReadOffsetLoopFlag ^= 0x80000000; } ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetInBytes, newReadOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; size_t bytesAvailable; size_t bytesRequested; if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) { return MA_INVALID_ARGS; } /* The returned buffer should never overtake the read buffer. */ readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); /* In the case of writing, if the write pointer and the read pointer are on the same loop iteration we can only write up to the end of the buffer. Otherwise we can only write up to the read pointer. The write pointer should never overtake the read pointer. */ if (writeOffsetLoopFlag == readOffsetLoopFlag) { bytesAvailable = pRB->subbufferSizeInBytes - writeOffsetInBytes; } else { bytesAvailable = readOffsetInBytes - writeOffsetInBytes; } bytesRequested = *pSizeInBytes; if (bytesRequested > bytesAvailable) { bytesRequested = bytesAvailable; } *pSizeInBytes = bytesRequested; *ppBufferOut = ma_rb__get_write_ptr(pRB); /* Clear the buffer if desired. */ if (pRB->clearOnWriteAcquire) { MA_ZERO_MEMORY(*ppBufferOut, *pSizeInBytes); } return MA_SUCCESS; } MA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes) { ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newWriteOffsetInBytes; ma_uint32 newWriteOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */ newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + sizeInBytes); if (newWriteOffsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; /* <-- sizeInBytes will cause the read offset to overflow. */ } /* Move the read pointer back to the start if necessary. */ newWriteOffsetLoopFlag = writeOffsetLoopFlag; if (newWriteOffsetInBytes == pRB->subbufferSizeInBytes) { newWriteOffsetInBytes = 0; newWriteOffsetLoopFlag ^= 0x80000000; } ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetInBytes, newWriteOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newReadOffsetInBytes; ma_uint32 newReadOffsetLoopFlag; if (pRB == NULL || offsetInBytes > pRB->subbufferSizeInBytes) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); newReadOffsetLoopFlag = readOffsetLoopFlag; /* We cannot go past the write buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { if ((readOffsetInBytes + offsetInBytes) > writeOffsetInBytes) { newReadOffsetInBytes = writeOffsetInBytes; } else { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes); } } else { /* May end up looping. */ if ((readOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes; newReadOffsetLoopFlag ^= 0x80000000; /* <-- Looped. */ } else { newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes); } } ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetInBytes, newReadOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; ma_uint32 newWriteOffsetInBytes; ma_uint32 newWriteOffsetLoopFlag; if (pRB == NULL) { return MA_INVALID_ARGS; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); newWriteOffsetLoopFlag = writeOffsetLoopFlag; /* We cannot go past the write buffer. */ if (readOffsetLoopFlag == writeOffsetLoopFlag) { /* May end up looping. */ if ((writeOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes; newWriteOffsetLoopFlag ^= 0x80000000; /* <-- Looped. */ } else { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes); } } else { if ((writeOffsetInBytes + offsetInBytes) > readOffsetInBytes) { newWriteOffsetInBytes = readOffsetInBytes; } else { newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes); } } ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetInBytes, newWriteOffsetLoopFlag)); return MA_SUCCESS; } MA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB) { ma_uint32 readOffset; ma_uint32 readOffsetInBytes; ma_uint32 readOffsetLoopFlag; ma_uint32 writeOffset; ma_uint32 writeOffsetInBytes; ma_uint32 writeOffsetLoopFlag; if (pRB == NULL) { return 0; } readOffset = ma_atomic_load_32(&pRB->encodedReadOffset); ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag); writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset); ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag); if (readOffsetLoopFlag == writeOffsetLoopFlag) { return writeOffsetInBytes - readOffsetInBytes; } else { return writeOffsetInBytes + (pRB->subbufferSizeInBytes - readOffsetInBytes); } } MA_API ma_uint32 ma_rb_available_read(ma_rb* pRB) { ma_int32 dist; if (pRB == NULL) { return 0; } dist = ma_rb_pointer_distance(pRB); if (dist < 0) { return 0; } return dist; } MA_API ma_uint32 ma_rb_available_write(ma_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_size(pRB) - ma_rb_pointer_distance(pRB)); } MA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->subbufferSizeInBytes; } MA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB) { if (pRB == NULL) { return 0; } if (pRB->subbufferStrideInBytes == 0) { return (size_t)pRB->subbufferSizeInBytes; } return (size_t)pRB->subbufferStrideInBytes; } MA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex) { if (pRB == NULL) { return 0; } return subbufferIndex * ma_rb_get_subbuffer_stride(pRB); } MA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer) { if (pRB == NULL) { return NULL; } return ma_offset_ptr(pBuffer, ma_rb_get_subbuffer_offset(pRB, subbufferIndex)); } static ma_result ma_pcm_rb_data_source__on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { /* Since there's no notion of an end, we don't ever want to return MA_AT_END here. But it is possible to return 0. */ ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource; ma_result result; ma_uint64 totalFramesRead; MA_ASSERT(pRB != NULL); /* We need to run this in a loop since the ring buffer itself may loop. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { void* pMappedBuffer; ma_uint32 mappedFrameCount; ma_uint64 framesToRead = frameCount - totalFramesRead; if (framesToRead > 0xFFFFFFFF) { framesToRead = 0xFFFFFFFF; } mappedFrameCount = (ma_uint32)framesToRead; result = ma_pcm_rb_acquire_read(pRB, &mappedFrameCount, &pMappedBuffer); if (result != MA_SUCCESS) { break; } if (mappedFrameCount == 0) { break; /* <-- End of ring buffer. */ } ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, pRB->format, pRB->channels), pMappedBuffer, mappedFrameCount, pRB->format, pRB->channels); result = ma_pcm_rb_commit_read(pRB, mappedFrameCount); if (result != MA_SUCCESS) { break; } totalFramesRead += mappedFrameCount; } /* There is no notion of an "end" in a ring buffer. If we didn't have enough data to fill the requested frame count we'll need to pad with silence. If we don't do this, totalFramesRead might equal 0 which will result in the data source layer at a higher level translating this to MA_AT_END which is incorrect for a ring buffer. */ if (totalFramesRead < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, pRB->format, pRB->channels), (frameCount - totalFramesRead), pRB->format, pRB->channels); totalFramesRead = frameCount; } *pFramesRead = totalFramesRead; return MA_SUCCESS; } static ma_result ma_pcm_rb_data_source__on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource; MA_ASSERT(pRB != NULL); if (pFormat != NULL) { *pFormat = pRB->format; } if (pChannels != NULL) { *pChannels = pRB->channels; } if (pSampleRate != NULL) { *pSampleRate = pRB->sampleRate; } /* Just assume the default channel map. */ if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pRB->channels); } return MA_SUCCESS; } static ma_data_source_vtable ma_gRBDataSourceVTable = { ma_pcm_rb_data_source__on_read, NULL, /* onSeek */ ma_pcm_rb_data_source__on_get_data_format, NULL, /* onGetCursor */ NULL, /* onGetLength */ NULL, /* onSetLooping */ 0 }; static MA_INLINE ma_uint32 ma_pcm_rb_get_bpf(ma_pcm_rb* pRB) { MA_ASSERT(pRB != NULL); return ma_get_bytes_per_frame(pRB->format, pRB->channels); } MA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB) { ma_uint32 bpf; ma_result result; if (pRB == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pRB); bpf = ma_get_bytes_per_frame(format, channels); if (bpf == 0) { return MA_INVALID_ARGS; } result = ma_rb_init_ex(subbufferSizeInFrames*bpf, subbufferCount, subbufferStrideInFrames*bpf, pOptionalPreallocatedBuffer, pAllocationCallbacks, &pRB->rb); if (result != MA_SUCCESS) { return result; } pRB->format = format; pRB->channels = channels; pRB->sampleRate = 0; /* The sample rate is not passed in as a parameter. */ /* The PCM ring buffer is a data source. We need to get that set up as well. */ { ma_data_source_config dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &ma_gRBDataSourceVTable; result = ma_data_source_init(&dataSourceConfig, &pRB->ds); if (result != MA_SUCCESS) { ma_rb_uninit(&pRB->rb); return result; } } return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB) { return ma_pcm_rb_init_ex(format, channels, bufferSizeInFrames, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB); } MA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB) { if (pRB == NULL) { return; } ma_data_source_uninit(&pRB->ds); ma_rb_uninit(&pRB->rb); } MA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB) { if (pRB == NULL) { return; } ma_rb_reset(&pRB->rb); } MA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut) { size_t sizeInBytes; ma_result result; if (pRB == NULL || pSizeInFrames == NULL) { return MA_INVALID_ARGS; } sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB); result = ma_rb_acquire_read(&pRB->rb, &sizeInBytes, ppBufferOut); if (result != MA_SUCCESS) { return result; } *pSizeInFrames = (ma_uint32)(sizeInBytes / (size_t)ma_pcm_rb_get_bpf(pRB)); return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_commit_read(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut) { size_t sizeInBytes; ma_result result; if (pRB == NULL) { return MA_INVALID_ARGS; } sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB); result = ma_rb_acquire_write(&pRB->rb, &sizeInBytes, ppBufferOut); if (result != MA_SUCCESS) { return result; } *pSizeInFrames = (ma_uint32)(sizeInBytes / ma_pcm_rb_get_bpf(pRB)); return MA_SUCCESS; } MA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_commit_write(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_seek_read(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames) { if (pRB == NULL) { return MA_INVALID_ARGS; } return ma_rb_seek_write(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB)); } MA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_pointer_distance(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_available_read(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return ma_rb_available_write(&pRB->rb) / ma_pcm_rb_get_bpf(pRB); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_size(&pRB->rb) / ma_pcm_rb_get_bpf(pRB)); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_stride(&pRB->rb) / ma_pcm_rb_get_bpf(pRB)); } MA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex) { if (pRB == NULL) { return 0; } return (ma_uint32)(ma_rb_get_subbuffer_offset(&pRB->rb, subbufferIndex) / ma_pcm_rb_get_bpf(pRB)); } MA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer) { if (pRB == NULL) { return NULL; } return ma_rb_get_subbuffer_ptr(&pRB->rb, subbufferIndex, pBuffer); } MA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB) { if (pRB == NULL) { return ma_format_unknown; } return pRB->format; } MA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->channels; } MA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB) { if (pRB == NULL) { return 0; } return pRB->sampleRate; } MA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate) { if (pRB == NULL) { return; } pRB->sampleRate = sampleRate; } MA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB) { ma_result result; ma_uint32 sizeInFrames; sizeInFrames = (ma_uint32)ma_calculate_frame_count_after_resampling(sampleRate, captureInternalSampleRate, captureInternalPeriodSizeInFrames * 5); if (sizeInFrames == 0) { return MA_INVALID_ARGS; } result = ma_pcm_rb_init(captureFormat, captureChannels, sizeInFrames, NULL, pAllocationCallbacks, &pRB->rb); if (result != MA_SUCCESS) { return result; } /* Seek forward a bit so we have a bit of a buffer in case of desyncs. */ ma_pcm_rb_seek_write((ma_pcm_rb*)pRB, captureInternalPeriodSizeInFrames * 2); return MA_SUCCESS; } MA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB) { ma_pcm_rb_uninit((ma_pcm_rb*)pRB); return MA_SUCCESS; } /************************************************************************************************************************************************************** Miscellaneous Helpers **************************************************************************************************************************************************************/ MA_API const char* ma_result_description(ma_result result) { switch (result) { case MA_SUCCESS: return "No error"; case MA_ERROR: return "Unknown error"; case MA_INVALID_ARGS: return "Invalid argument"; case MA_INVALID_OPERATION: return "Invalid operation"; case MA_OUT_OF_MEMORY: return "Out of memory"; case MA_OUT_OF_RANGE: return "Out of range"; case MA_ACCESS_DENIED: return "Permission denied"; case MA_DOES_NOT_EXIST: return "Resource does not exist"; case MA_ALREADY_EXISTS: return "Resource already exists"; case MA_TOO_MANY_OPEN_FILES: return "Too many open files"; case MA_INVALID_FILE: return "Invalid file"; case MA_TOO_BIG: return "Too large"; case MA_PATH_TOO_LONG: return "Path too long"; case MA_NAME_TOO_LONG: return "Name too long"; case MA_NOT_DIRECTORY: return "Not a directory"; case MA_IS_DIRECTORY: return "Is a directory"; case MA_DIRECTORY_NOT_EMPTY: return "Directory not empty"; case MA_AT_END: return "At end"; case MA_NO_SPACE: return "No space available"; case MA_BUSY: return "Device or resource busy"; case MA_IO_ERROR: return "Input/output error"; case MA_INTERRUPT: return "Interrupted"; case MA_UNAVAILABLE: return "Resource unavailable"; case MA_ALREADY_IN_USE: return "Resource already in use"; case MA_BAD_ADDRESS: return "Bad address"; case MA_BAD_SEEK: return "Illegal seek"; case MA_BAD_PIPE: return "Broken pipe"; case MA_DEADLOCK: return "Deadlock"; case MA_TOO_MANY_LINKS: return "Too many links"; case MA_NOT_IMPLEMENTED: return "Not implemented"; case MA_NO_MESSAGE: return "No message of desired type"; case MA_BAD_MESSAGE: return "Invalid message"; case MA_NO_DATA_AVAILABLE: return "No data available"; case MA_INVALID_DATA: return "Invalid data"; case MA_TIMEOUT: return "Timeout"; case MA_NO_NETWORK: return "Network unavailable"; case MA_NOT_UNIQUE: return "Not unique"; case MA_NOT_SOCKET: return "Socket operation on non-socket"; case MA_NO_ADDRESS: return "Destination address required"; case MA_BAD_PROTOCOL: return "Protocol wrong type for socket"; case MA_PROTOCOL_UNAVAILABLE: return "Protocol not available"; case MA_PROTOCOL_NOT_SUPPORTED: return "Protocol not supported"; case MA_PROTOCOL_FAMILY_NOT_SUPPORTED: return "Protocol family not supported"; case MA_ADDRESS_FAMILY_NOT_SUPPORTED: return "Address family not supported"; case MA_SOCKET_NOT_SUPPORTED: return "Socket type not supported"; case MA_CONNECTION_RESET: return "Connection reset"; case MA_ALREADY_CONNECTED: return "Already connected"; case MA_NOT_CONNECTED: return "Not connected"; case MA_CONNECTION_REFUSED: return "Connection refused"; case MA_NO_HOST: return "No host"; case MA_IN_PROGRESS: return "Operation in progress"; case MA_CANCELLED: return "Operation cancelled"; case MA_MEMORY_ALREADY_MAPPED: return "Memory already mapped"; case MA_FORMAT_NOT_SUPPORTED: return "Format not supported"; case MA_DEVICE_TYPE_NOT_SUPPORTED: return "Device type not supported"; case MA_SHARE_MODE_NOT_SUPPORTED: return "Share mode not supported"; case MA_NO_BACKEND: return "No backend"; case MA_NO_DEVICE: return "No device"; case MA_API_NOT_FOUND: return "API not found"; case MA_INVALID_DEVICE_CONFIG: return "Invalid device config"; case MA_DEVICE_NOT_INITIALIZED: return "Device not initialized"; case MA_DEVICE_NOT_STARTED: return "Device not started"; case MA_FAILED_TO_INIT_BACKEND: return "Failed to initialize backend"; case MA_FAILED_TO_OPEN_BACKEND_DEVICE: return "Failed to open backend device"; case MA_FAILED_TO_START_BACKEND_DEVICE: return "Failed to start backend device"; case MA_FAILED_TO_STOP_BACKEND_DEVICE: return "Failed to stop backend device"; default: return "Unknown error"; } } MA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return ma__malloc_default(sz, NULL); } } MA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { void* p = ma_malloc(sz, pAllocationCallbacks); if (p != NULL) { MA_ZERO_MEMORY(p, sz); } return p; } MA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, sz, pAllocationCallbacks->pUserData); } else { return NULL; /* Do not fall back to the default implementation. */ } } else { return ma__realloc_default(p, sz, NULL); } } MA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL) { return; } if (pAllocationCallbacks != NULL) { if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } else { return; /* Do no fall back to the default implementation. */ } } else { ma__free_default(p, NULL); } } MA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks) { size_t extraBytes; void* pUnaligned; void* pAligned; if (alignment == 0) { return 0; } extraBytes = alignment-1 + sizeof(void*); pUnaligned = ma_malloc(sz + extraBytes, pAllocationCallbacks); if (pUnaligned == NULL) { return NULL; } pAligned = (void*)(((ma_uintptr)pUnaligned + extraBytes) & ~((ma_uintptr)(alignment-1))); ((void**)pAligned)[-1] = pUnaligned; return pAligned; } MA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { ma_free(((void**)p)[-1], pAllocationCallbacks); } MA_API const char* ma_get_format_name(ma_format format) { switch (format) { case ma_format_unknown: return "Unknown"; case ma_format_u8: return "8-bit Unsigned Integer"; case ma_format_s16: return "16-bit Signed Integer"; case ma_format_s24: return "24-bit Signed Integer (Tightly Packed)"; case ma_format_s32: return "32-bit Signed Integer"; case ma_format_f32: return "32-bit IEEE Floating Point"; default: return "Invalid"; } } MA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels) { ma_uint32 i; for (i = 0; i < channels; ++i) { pOut[i] = ma_mix_f32(pInA[i], pInB[i], factor); } } MA_API ma_uint32 ma_get_bytes_per_sample(ma_format format) { ma_uint32 sizes[] = { 0, /* unknown */ 1, /* u8 */ 2, /* s16 */ 3, /* s24 */ 4, /* s32 */ 4, /* f32 */ }; return sizes[format]; } #define MA_DATA_SOURCE_DEFAULT_RANGE_BEG 0 #define MA_DATA_SOURCE_DEFAULT_RANGE_END ~((ma_uint64)0) #define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG 0 #define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END ~((ma_uint64)0) MA_API ma_data_source_config ma_data_source_config_init(void) { ma_data_source_config config; MA_ZERO_OBJECT(&config); return config; } MA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSourceBase); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->vtable == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->vtable = pConfig->vtable; pDataSourceBase->rangeBegInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG; pDataSourceBase->rangeEndInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END; pDataSourceBase->loopBegInFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG; pDataSourceBase->loopEndInFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END; pDataSourceBase->pCurrent = pDataSource; /* Always read from ourself by default. */ pDataSourceBase->pNext = NULL; pDataSourceBase->onGetNext = NULL; return MA_SUCCESS; } MA_API void ma_data_source_uninit(ma_data_source* pDataSource) { if (pDataSource == NULL) { return; } /* This is placeholder in case we need this later. Data sources need to call this in their uninitialization routine to ensure things work later on if something is added here. */ } static ma_result ma_data_source_resolve_current(ma_data_source* pDataSource, ma_data_source** ppCurrentDataSource) { ma_data_source_base* pCurrentDataSource = (ma_data_source_base*)pDataSource; MA_ASSERT(pDataSource != NULL); MA_ASSERT(ppCurrentDataSource != NULL); if (pCurrentDataSource->pCurrent == NULL) { /* The current data source is NULL. If we're using this in the context of a chain we need to return NULL here so that we don't end up looping. Otherwise we just return the data source itself. */ if (pCurrentDataSource->pNext != NULL || pCurrentDataSource->onGetNext != NULL) { pCurrentDataSource = NULL; } else { pCurrentDataSource = (ma_data_source_base*)pDataSource; /* Not being used in a chain. Make sure we just always read from the data source itself at all times. */ } } else { pCurrentDataSource = (ma_data_source_base*)pCurrentDataSource->pCurrent; } *ppCurrentDataSource = pCurrentDataSource; return MA_SUCCESS; } static ma_result ma_data_source_read_pcm_frames_from_backend(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; MA_ASSERT(pDataSourceBase != NULL); MA_ASSERT(pDataSourceBase->vtable != NULL); MA_ASSERT(pDataSourceBase->vtable->onRead != NULL); MA_ASSERT(pFramesRead != NULL); if (pFramesOut != NULL) { return pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, pFramesRead); } else { /* No output buffer. Probably seeking forward. Read and discard. Can probably optimize this in terms of onSeek and onGetCursor, but need to keep in mind that the data source may not implement these functions. */ ma_result result; ma_uint64 framesRead; ma_format format; ma_uint32 channels; ma_uint64 discardBufferCapInFrames; ma_uint8 pDiscardBuffer[4096]; result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; } discardBufferCapInFrames = sizeof(pDiscardBuffer) / ma_get_bytes_per_frame(format, channels); framesRead = 0; while (framesRead < frameCount) { ma_uint64 framesReadThisIteration = 0; ma_uint64 framesToRead = frameCount - framesRead; if (framesToRead > discardBufferCapInFrames) { framesToRead = discardBufferCapInFrames; } result = pDataSourceBase->vtable->onRead(pDataSourceBase, pDiscardBuffer, framesToRead, &framesReadThisIteration); if (result != MA_SUCCESS) { return result; } framesRead += framesReadThisIteration; } *pFramesRead = framesRead; return MA_SUCCESS; } } static ma_result ma_data_source_read_pcm_frames_within_range(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 framesRead = 0; ma_bool32 loop = ma_data_source_is_looping(pDataSource); if (pDataSourceBase == NULL) { return MA_AT_END; } if (frameCount == 0) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if ((pDataSourceBase->vtable->flags & MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT) != 0 || (pDataSourceBase->rangeEndInFrames == ~((ma_uint64)0) && (pDataSourceBase->loopEndInFrames == ~((ma_uint64)0) || loop == MA_FALSE))) { /* Either the data source is self-managing the range, or no range is set - just read like normal. The data source itself will tell us when the end is reached. */ result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { /* Need to clamp to within the range. */ ma_uint64 relativeCursor; ma_uint64 absoluteCursor; result = ma_data_source_get_cursor_in_pcm_frames(pDataSourceBase, &relativeCursor); if (result != MA_SUCCESS) { /* Failed to retrieve the cursor. Cannot read within a range or loop points. Just read like normal - this may happen for things like noise data sources where it doesn't really matter. */ result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { ma_uint64 rangeBeg; ma_uint64 rangeEnd; /* We have the cursor. We need to make sure we don't read beyond our range. */ rangeBeg = pDataSourceBase->rangeBegInFrames; rangeEnd = pDataSourceBase->rangeEndInFrames; absoluteCursor = rangeBeg + relativeCursor; /* If looping, make sure we're within range. */ if (loop) { if (pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) { rangeEnd = ma_min(rangeEnd, pDataSourceBase->rangeBegInFrames + pDataSourceBase->loopEndInFrames); } } if (frameCount > (rangeEnd - absoluteCursor) && rangeEnd != ~((ma_uint64)0)) { frameCount = (rangeEnd - absoluteCursor); } /* If the cursor is sitting on the end of the range the frame count will be set to 0 which can result in MA_INVALID_ARGS. In this case, we don't want to try reading, but instead return MA_AT_END so the higher level function can know about it. */ if (frameCount > 0) { result = ma_data_source_read_pcm_frames_from_backend(pDataSource, pFramesOut, frameCount, &framesRead); } else { result = MA_AT_END; /* The cursor is sitting on the end of the range which means we're at the end. */ } } } if (pFramesRead != NULL) { *pFramesRead = framesRead; } /* We need to make sure MA_AT_END is returned if we hit the end of the range. */ if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_data_source_base* pCurrentDataSource; void* pRunningFramesOut = pFramesOut; ma_uint64 totalFramesProcessed = 0; ma_format format; ma_uint32 channels; ma_uint32 emptyLoopCounter = 0; /* Keeps track of how many times 0 frames have been read. For infinite loop detection of sounds with no audio data. */ ma_bool32 loop; if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } loop = ma_data_source_is_looping(pDataSource); /* We need to know the data format so we can advance the output buffer as we read frames. If this fails, chaining will not work and we'll just read as much as we can from the current source. */ if (ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0) != MA_SUCCESS) { result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource); if (result != MA_SUCCESS) { return result; } return ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pFramesOut, frameCount, pFramesRead); } /* Looping is a bit of a special case. When the `loop` argument is true, chaining will not work and only the current data source will be read from. */ /* Keep reading until we've read as many frames as possible. */ while (totalFramesProcessed < frameCount) { ma_uint64 framesProcessed; ma_uint64 framesRemaining = frameCount - totalFramesProcessed; /* We need to resolve the data source that we'll actually be reading from. */ result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource); if (result != MA_SUCCESS) { break; } if (pCurrentDataSource == NULL) { break; } result = ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pRunningFramesOut, framesRemaining, &framesProcessed); totalFramesProcessed += framesProcessed; /* If we encountered an error from the read callback, make sure it's propagated to the caller. The caller may need to know whether or not MA_BUSY is returned which is not necessarily considered an error. */ if (result != MA_SUCCESS && result != MA_AT_END) { break; } /* We can determine if we've reached the end by checking if ma_data_source_read_pcm_frames_within_range() returned MA_AT_END. To loop back to the start, all we need to do is seek back to the first frame. */ if (result == MA_AT_END) { /* The result needs to be reset back to MA_SUCCESS (from MA_AT_END) so that we don't accidentally return MA_AT_END when data has been read in prior loop iterations. at the end of this function, the result will be checked for MA_SUCCESS, and if the total number of frames processed is 0, will be explicitly set to MA_AT_END. */ result = MA_SUCCESS; /* We reached the end. If we're looping, we just loop back to the start of the current data source. If we're not looping we need to check if we have another in the chain, and if so, switch to it. */ if (loop) { if (framesProcessed == 0) { emptyLoopCounter += 1; if (emptyLoopCounter > 1) { break; /* Infinite loop detected. Get out. */ } } else { emptyLoopCounter = 0; } result = ma_data_source_seek_to_pcm_frame(pCurrentDataSource, pCurrentDataSource->loopBegInFrames); if (result != MA_SUCCESS) { break; /* Failed to loop. Abort. */ } /* Don't return MA_AT_END for looping sounds. */ result = MA_SUCCESS; } else { if (pCurrentDataSource->pNext != NULL) { pDataSourceBase->pCurrent = pCurrentDataSource->pNext; } else if (pCurrentDataSource->onGetNext != NULL) { pDataSourceBase->pCurrent = pCurrentDataSource->onGetNext(pCurrentDataSource); if (pDataSourceBase->pCurrent == NULL) { break; /* Our callback did not return a next data source. We're done. */ } } else { /* Reached the end of the chain. We're done. */ break; } /* The next data source needs to be rewound to ensure data is read in looping scenarios. */ result = ma_data_source_seek_to_pcm_frame(pDataSourceBase->pCurrent, 0); if (result != MA_SUCCESS) { break; } } } if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesProcessed * ma_get_bytes_per_frame(format, channels)); } } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } MA_ASSERT(!(result == MA_AT_END && totalFramesProcessed > 0)); /* We should never be returning MA_AT_END if we read some data. */ if (result == MA_SUCCESS && totalFramesProcessed == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked) { return ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, pFramesSeeked); } MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } if (pDataSourceBase->vtable->onSeek == NULL) { return MA_NOT_IMPLEMENTED; } if (frameIndex > pDataSourceBase->rangeEndInFrames) { return MA_INVALID_OPERATION; /* Trying to seek too far forward. */ } MA_ASSERT(pDataSourceBase->vtable != NULL); return pDataSourceBase->vtable->onSeek(pDataSource, pDataSourceBase->rangeBegInFrames + frameIndex); } MA_API ma_result ma_data_source_seek_seconds(ma_data_source* pDataSource, float secondCount, float* pSecondsSeeked) { ma_uint64 frameCount; ma_uint64 framesSeeked = 0; ma_uint32 sampleRate; ma_result result; if (pDataSource == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames instead of seconds */ frameCount = (ma_uint64)(secondCount * sampleRate); result = ma_data_source_seek_pcm_frames(pDataSource, frameCount, &framesSeeked); /* VC6 doesn't support division between unsigned 64-bit integer and floating point number. Signed integer needed. This shouldn't affect anything in practice */ *pSecondsSeeked = (ma_int64)framesSeeked / (float)sampleRate; return result; } MA_API ma_result ma_data_source_seek_to_second(ma_data_source* pDataSource, float seekPointInSeconds) { ma_uint64 frameIndex; ma_uint32 sampleRate; ma_result result; if (pDataSource == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames instead of seconds */ frameIndex = (ma_uint64)(seekPointInSeconds * sampleRate); return ma_data_source_seek_to_pcm_frame(pDataSource, frameIndex); } MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_format format; ma_uint32 channels; ma_uint32 sampleRate; /* Initialize to defaults for safety just in case the data source does not implement this callback. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if (pDataSourceBase->vtable->onGetDataFormat == NULL) { return MA_NOT_IMPLEMENTED; } result = pDataSourceBase->vtable->onGetDataFormat(pDataSource, &format, &channels, &sampleRate, pChannelMap, channelMapCap); if (result != MA_SUCCESS) { return result; } if (pFormat != NULL) { *pFormat = format; } if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = sampleRate; } /* Channel map was passed in directly to the callback. This is safe due to the channelMapCap parameter. */ return MA_SUCCESS; } MA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 cursor; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pDataSourceBase == NULL) { return MA_SUCCESS; } MA_ASSERT(pDataSourceBase->vtable != NULL); if (pDataSourceBase->vtable->onGetCursor == NULL) { return MA_NOT_IMPLEMENTED; } result = pDataSourceBase->vtable->onGetCursor(pDataSourceBase, &cursor); if (result != MA_SUCCESS) { return result; } /* The cursor needs to be made relative to the start of the range. */ if (cursor < pDataSourceBase->rangeBegInFrames) { /* Safety check so we don't return some huge number. */ *pCursor = 0; } else { *pCursor = cursor - pDataSourceBase->rangeBegInFrames; } return MA_SUCCESS; } MA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pDataSourceBase == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pDataSourceBase->vtable != NULL); /* If we have a range defined we'll use that to determine the length. This is one of rare times where we'll actually trust the caller. If they've set the range, I think it's mostly safe to assume they've set it based on some higher level knowledge of the structure of the sound bank. */ if (pDataSourceBase->rangeEndInFrames != ~((ma_uint64)0)) { *pLength = pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames; return MA_SUCCESS; } /* Getting here means a range is not defined so we'll need to get the data source itself to tell us the length. */ if (pDataSourceBase->vtable->onGetLength == NULL) { return MA_NOT_IMPLEMENTED; } return pDataSourceBase->vtable->onGetLength(pDataSource, pLength); } MA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor) { ma_result result; ma_uint64 cursorInPCMFrames; ma_uint32 sampleRate; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &cursorInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength) { ma_result result; ma_uint64 lengthInPCMFrames; ma_uint32 sampleRate; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; result = ma_data_source_get_length_in_pcm_frames(pDataSource, &lengthInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pLength = (ma_int64)lengthInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_32(&pDataSourceBase->isLooping, isLooping); MA_ASSERT(pDataSourceBase->vtable != NULL); /* If there's no callback for this just treat it as a successful no-op. */ if (pDataSourceBase->vtable->onSetLooping == NULL) { return MA_SUCCESS; } return pDataSourceBase->vtable->onSetLooping(pDataSource, isLooping); } MA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_FALSE; } return ma_atomic_load_32(&pDataSourceBase->isLooping); } MA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; ma_result result; ma_uint64 relativeCursor; ma_uint64 absoluteCursor; ma_bool32 doSeekAdjustment = MA_FALSE; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if (rangeEndInFrames < rangeBegInFrames) { return MA_INVALID_ARGS; /* The end of the range must come after the beginning. */ } /* We may need to adjust the position of the cursor to ensure it's clamped to the range. Grab it now so we can calculate its absolute position before we change the range. */ result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &relativeCursor); if (result == MA_SUCCESS) { doSeekAdjustment = MA_TRUE; absoluteCursor = relativeCursor + pDataSourceBase->rangeBegInFrames; } else { /* We couldn't get the position of the cursor. It probably means the data source has no notion of a cursor. We'll just leave it at position 0. Don't treat this as an error. */ doSeekAdjustment = MA_FALSE; relativeCursor = 0; absoluteCursor = 0; } pDataSourceBase->rangeBegInFrames = rangeBegInFrames; pDataSourceBase->rangeEndInFrames = rangeEndInFrames; /* The commented out logic below was intended to maintain loop points in response to a change in the range. However, this is not useful because it results in the sound breaking when you move the range outside of the old loop points. I'm simplifying this by simply resetting the loop points. The caller is expected to update their loop points if they change the range. In practice this should be mostly a non-issue because the majority of the time the range will be set once right after initialization. */ pDataSourceBase->loopBegInFrames = 0; pDataSourceBase->loopEndInFrames = ~((ma_uint64)0); /* Seek to within range. Note that our seek positions here are relative to the new range. We don't want to do this if we failed to retrieve the cursor earlier on because it probably means the data source has no notion of a cursor. In practice the seek would probably fail (which we silently ignore), but I'm just not even going to attempt it. */ if (doSeekAdjustment) { if (absoluteCursor < rangeBegInFrames) { ma_data_source_seek_to_pcm_frame(pDataSource, 0); } else if (absoluteCursor > rangeEndInFrames) { ma_data_source_seek_to_pcm_frame(pDataSource, rangeEndInFrames - rangeBegInFrames); } } return MA_SUCCESS; } MA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pRangeBegInFrames != NULL) { *pRangeBegInFrames = 0; } if (pRangeEndInFrames != NULL) { *pRangeEndInFrames = 0; } if (pDataSource == NULL) { return; } if (pRangeBegInFrames != NULL) { *pRangeBegInFrames = pDataSourceBase->rangeBegInFrames; } if (pRangeEndInFrames != NULL) { *pRangeEndInFrames = pDataSourceBase->rangeEndInFrames; } } MA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if (loopEndInFrames < loopBegInFrames) { return MA_INVALID_ARGS; /* The end of the loop point must come after the beginning. */ } if (loopEndInFrames > pDataSourceBase->rangeEndInFrames && loopEndInFrames != ~((ma_uint64)0)) { return MA_INVALID_ARGS; /* The end of the loop point must not go beyond the range. */ } pDataSourceBase->loopBegInFrames = loopBegInFrames; pDataSourceBase->loopEndInFrames = loopEndInFrames; /* The end cannot exceed the range. */ if (pDataSourceBase->loopEndInFrames > (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames) && pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) { pDataSourceBase->loopEndInFrames = (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames); } return MA_SUCCESS; } MA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pLoopBegInFrames != NULL) { *pLoopBegInFrames = 0; } if (pLoopEndInFrames != NULL) { *pLoopEndInFrames = 0; } if (pDataSource == NULL) { return; } if (pLoopBegInFrames != NULL) { *pLoopBegInFrames = pDataSourceBase->loopBegInFrames; } if (pLoopEndInFrames != NULL) { *pLoopEndInFrames = pDataSourceBase->loopEndInFrames; } } MA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->pCurrent = pCurrentDataSource; return MA_SUCCESS; } MA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->pCurrent; } MA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->pNext = pNextDataSource; return MA_SUCCESS; } MA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->pNext; } MA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext) { ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return MA_INVALID_ARGS; } pDataSourceBase->onGetNext = onGetNext; return MA_SUCCESS; } MA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource) { const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource; if (pDataSource == NULL) { return NULL; } return pDataSourceBase->onGetNext; } static ma_result ma_audio_buffer_ref__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; ma_uint64 framesRead = ma_audio_buffer_ref_read_pcm_frames(pAudioBufferRef, pFramesOut, frameCount, MA_FALSE); if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (framesRead < frameCount || framesRead == 0) { return MA_AT_END; } return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_audio_buffer_ref_seek_to_pcm_frame((ma_audio_buffer_ref*)pDataSource, frameIndex); } static ma_result ma_audio_buffer_ref__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pFormat = pAudioBufferRef->format; *pChannels = pAudioBufferRef->channels; *pSampleRate = pAudioBufferRef->sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pAudioBufferRef->channels); return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pCursor = pAudioBufferRef->cursor; return MA_SUCCESS; } static ma_result ma_audio_buffer_ref__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource; *pLength = pAudioBufferRef->sizeInFrames; return MA_SUCCESS; } static ma_data_source_vtable g_ma_audio_buffer_ref_data_source_vtable = { ma_audio_buffer_ref__data_source_on_read, ma_audio_buffer_ref__data_source_on_seek, ma_audio_buffer_ref__data_source_on_get_data_format, ma_audio_buffer_ref__data_source_on_get_cursor, ma_audio_buffer_ref__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef) { ma_result result; ma_data_source_config dataSourceConfig; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pAudioBufferRef); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_audio_buffer_ref_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pAudioBufferRef->ds); if (result != MA_SUCCESS) { return result; } pAudioBufferRef->format = format; pAudioBufferRef->channels = channels; pAudioBufferRef->sampleRate = 0; /* TODO: Version 0.12. Set this to sampleRate. */ pAudioBufferRef->cursor = 0; pAudioBufferRef->sizeInFrames = sizeInFrames; pAudioBufferRef->pData = pData; return MA_SUCCESS; } MA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef) { if (pAudioBufferRef == NULL) { return; } ma_data_source_uninit(&pAudioBufferRef->ds); } MA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames) { if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } pAudioBufferRef->cursor = 0; pAudioBufferRef->sizeInFrames = sizeInFrames; pAudioBufferRef->pData = pData; return MA_SUCCESS; } MA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop) { ma_uint64 totalFramesRead = 0; if (pAudioBufferRef == NULL) { return 0; } if (frameCount == 0) { return 0; } while (totalFramesRead < frameCount) { ma_uint64 framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; ma_uint64 framesRemaining = frameCount - totalFramesRead; ma_uint64 framesToRead; framesToRead = framesRemaining; if (framesToRead > framesAvailable) { framesToRead = framesAvailable; } if (pFramesOut != NULL) { ma_copy_pcm_frames(ma_offset_ptr(pFramesOut, totalFramesRead * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), framesToRead, pAudioBufferRef->format, pAudioBufferRef->channels); } totalFramesRead += framesToRead; pAudioBufferRef->cursor += framesToRead; if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) { if (loop) { pAudioBufferRef->cursor = 0; } else { break; /* We've reached the end and we're not looping. Done. */ } } MA_ASSERT(pAudioBufferRef->cursor < pAudioBufferRef->sizeInFrames); } return totalFramesRead; } MA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex) { if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } if (frameIndex > pAudioBufferRef->sizeInFrames) { return MA_INVALID_ARGS; } pAudioBufferRef->cursor = (size_t)frameIndex; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount) { ma_uint64 framesAvailable; ma_uint64 frameCount = 0; if (ppFramesOut != NULL) { *ppFramesOut = NULL; /* Safety. */ } if (pFrameCount != NULL) { frameCount = *pFrameCount; *pFrameCount = 0; /* Safety. */ } if (pAudioBufferRef == NULL || ppFramesOut == NULL || pFrameCount == NULL) { return MA_INVALID_ARGS; } framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; if (frameCount > framesAvailable) { frameCount = framesAvailable; } *ppFramesOut = ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)); *pFrameCount = frameCount; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount) { ma_uint64 framesAvailable; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; if (frameCount > framesAvailable) { return MA_INVALID_ARGS; /* The frame count was too big. This should never happen in an unmapping. Need to make sure the caller is aware of this. */ } pAudioBufferRef->cursor += frameCount; if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) { return MA_AT_END; /* Successful. Need to tell the caller that the end has been reached so that it can loop if desired. */ } else { return MA_SUCCESS; } } MA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef) { if (pAudioBufferRef == NULL) { return MA_FALSE; } return pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames; } MA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } *pCursor = pAudioBufferRef->cursor; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } *pLength = pAudioBufferRef->sizeInFrames; return MA_SUCCESS; } MA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pAudioBufferRef == NULL) { return MA_INVALID_ARGS; } if (pAudioBufferRef->sizeInFrames <= pAudioBufferRef->cursor) { *pAvailableFrames = 0; } else { *pAvailableFrames = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor; } return MA_SUCCESS; } MA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_audio_buffer_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = 0; /* TODO: Version 0.12. Set this to sampleRate. */ config.sizeInFrames = sizeInFrames; config.pData = pData; ma_allocation_callbacks_init_copy(&config.allocationCallbacks, pAllocationCallbacks); return config; } static ma_result ma_audio_buffer_init_ex(const ma_audio_buffer_config* pConfig, ma_bool32 doCopy, ma_audio_buffer* pAudioBuffer) { ma_result result; if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_MEMORY(pAudioBuffer, sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData)); /* Safety. Don't overwrite the extra data. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->sizeInFrames == 0) { return MA_INVALID_ARGS; /* Not allowing buffer sizes of 0 frames. */ } result = ma_audio_buffer_ref_init(pConfig->format, pConfig->channels, NULL, 0, &pAudioBuffer->ref); if (result != MA_SUCCESS) { return result; } /* TODO: Version 0.12. Set this in ma_audio_buffer_ref_init() instead of here. */ pAudioBuffer->ref.sampleRate = pConfig->sampleRate; ma_allocation_callbacks_init_copy(&pAudioBuffer->allocationCallbacks, &pConfig->allocationCallbacks); if (doCopy) { ma_uint64 allocationSizeInBytes; void* pData; allocationSizeInBytes = pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels); if (allocationSizeInBytes > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pData = ma_malloc((size_t)allocationSizeInBytes, &pAudioBuffer->allocationCallbacks); /* Safe cast to size_t. */ if (pData == NULL) { return MA_OUT_OF_MEMORY; } if (pConfig->pData != NULL) { ma_copy_pcm_frames(pData, pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } else { ma_silence_pcm_frames(pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pData, pConfig->sizeInFrames); pAudioBuffer->ownsData = MA_TRUE; } else { ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pConfig->pData, pConfig->sizeInFrames); pAudioBuffer->ownsData = MA_FALSE; } return MA_SUCCESS; } static void ma_audio_buffer_uninit_ex(ma_audio_buffer* pAudioBuffer, ma_bool32 doFree) { if (pAudioBuffer == NULL) { return; } if (pAudioBuffer->ownsData && pAudioBuffer->ref.pData != &pAudioBuffer->_pExtraData[0]) { ma_free((void*)pAudioBuffer->ref.pData, &pAudioBuffer->allocationCallbacks); /* Naugty const cast, but OK in this case since we've guarded it with the ownsData check. */ } if (doFree) { ma_free(pAudioBuffer, &pAudioBuffer->allocationCallbacks); } ma_audio_buffer_ref_uninit(&pAudioBuffer->ref); } MA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer) { return ma_audio_buffer_init_ex(pConfig, MA_FALSE, pAudioBuffer); } MA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer) { return ma_audio_buffer_init_ex(pConfig, MA_TRUE, pAudioBuffer); } MA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer) { ma_result result; ma_audio_buffer* pAudioBuffer; ma_audio_buffer_config innerConfig; /* We'll be making some changes to the config, so need to make a copy. */ ma_uint64 allocationSizeInBytes; if (ppAudioBuffer == NULL) { return MA_INVALID_ARGS; } *ppAudioBuffer = NULL; /* Safety. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } innerConfig = *pConfig; ma_allocation_callbacks_init_copy(&innerConfig.allocationCallbacks, &pConfig->allocationCallbacks); allocationSizeInBytes = sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData) + (pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels)); if (allocationSizeInBytes > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pAudioBuffer = (ma_audio_buffer*)ma_malloc((size_t)allocationSizeInBytes, &innerConfig.allocationCallbacks); /* Safe cast to size_t. */ if (pAudioBuffer == NULL) { return MA_OUT_OF_MEMORY; } if (pConfig->pData != NULL) { ma_copy_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels); } else { ma_silence_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->sizeInFrames, pConfig->format, pConfig->channels); } innerConfig.pData = &pAudioBuffer->_pExtraData[0]; result = ma_audio_buffer_init_ex(&innerConfig, MA_FALSE, pAudioBuffer); if (result != MA_SUCCESS) { ma_free(pAudioBuffer, &innerConfig.allocationCallbacks); return result; } *ppAudioBuffer = pAudioBuffer; return MA_SUCCESS; } MA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer) { ma_audio_buffer_uninit_ex(pAudioBuffer, MA_FALSE); } MA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer) { ma_audio_buffer_uninit_ex(pAudioBuffer, MA_TRUE); } MA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop) { if (pAudioBuffer == NULL) { return 0; } return ma_audio_buffer_ref_read_pcm_frames(&pAudioBuffer->ref, pFramesOut, frameCount, loop); } MA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_seek_to_pcm_frame(&pAudioBuffer->ref, frameIndex); } MA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount) { if (ppFramesOut != NULL) { *ppFramesOut = NULL; /* Safety. */ } if (pAudioBuffer == NULL) { if (pFrameCount != NULL) { *pFrameCount = 0; } return MA_INVALID_ARGS; } return ma_audio_buffer_ref_map(&pAudioBuffer->ref, ppFramesOut, pFrameCount); } MA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_unmap(&pAudioBuffer->ref, frameCount); } MA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer) { if (pAudioBuffer == NULL) { return MA_FALSE; } return ma_audio_buffer_ref_at_end(&pAudioBuffer->ref); } MA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_cursor_in_pcm_frames(&pAudioBuffer->ref, pCursor); } MA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength) { if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_length_in_pcm_frames(&pAudioBuffer->ref, pLength); } MA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pAudioBuffer == NULL) { return MA_INVALID_ARGS; } return ma_audio_buffer_ref_get_available_frames(&pAudioBuffer->ref, pAvailableFrames); } MA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pData); pData->format = format; pData->channels = channels; pData->pTail = &pData->head; return MA_SUCCESS; } MA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_paged_audio_buffer_page* pPage; if (pData == NULL) { return; } /* All pages need to be freed. */ pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext); while (pPage != NULL) { ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext); ma_free(pPage, pAllocationCallbacks); pPage = pNext; } } MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return NULL; } return &pData->head; } MA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData) { if (pData == NULL) { return NULL; } return pData->pTail; } MA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength) { ma_paged_audio_buffer_page* pPage; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pData == NULL) { return MA_INVALID_ARGS; } /* Calculate the length from the linked list. */ for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) { *pLength += pPage->sizeInFrames; } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage) { ma_paged_audio_buffer_page* pPage; ma_uint64 allocationSize; if (ppPage == NULL) { return MA_INVALID_ARGS; } *ppPage = NULL; if (pData == NULL) { return MA_INVALID_ARGS; } allocationSize = sizeof(*pPage) + (pageSizeInFrames * ma_get_bytes_per_frame(pData->format, pData->channels)); if (allocationSize > MA_SIZE_MAX) { return MA_OUT_OF_MEMORY; /* Too big. */ } pPage = (ma_paged_audio_buffer_page*)ma_malloc((size_t)allocationSize, pAllocationCallbacks); /* Safe cast to size_t. */ if (pPage == NULL) { return MA_OUT_OF_MEMORY; } pPage->pNext = NULL; pPage->sizeInFrames = pageSizeInFrames; if (pInitialData != NULL) { ma_copy_pcm_frames(pPage->pAudioData, pInitialData, pageSizeInFrames, pData->format, pData->channels); } *ppPage = pPage; return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks) { if (pData == NULL || pPage == NULL) { return MA_INVALID_ARGS; } /* It's assumed the page is not attached to the list. */ ma_free(pPage, pAllocationCallbacks); return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage) { if (pData == NULL || pPage == NULL) { return MA_INVALID_ARGS; } /* This function assumes the page has been filled with audio data by this point. As soon as we append, the page will be available for reading. */ /* First thing to do is update the tail. */ for (;;) { ma_paged_audio_buffer_page* pOldTail = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->pTail); ma_paged_audio_buffer_page* pNewTail = pPage; if (ma_atomic_compare_exchange_weak_ptr((volatile void**)&pData->pTail, (void**)&pOldTail, pNewTail)) { /* Here is where we append the page to the list. After this, the page is attached to the list and ready to be read from. */ ma_atomic_exchange_ptr(&pOldTail->pNext, pPage); break; /* Done. */ } } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_paged_audio_buffer_page* pPage; result = ma_paged_audio_buffer_data_allocate_page(pData, pageSizeInFrames, pInitialData, pAllocationCallbacks, &pPage); if (result != MA_SUCCESS) { return result; } return ma_paged_audio_buffer_data_append_page(pData, pPage); /* <-- Should never fail. */ } MA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData) { ma_paged_audio_buffer_config config; MA_ZERO_OBJECT(&config); config.pData = pData; return config; } static ma_result ma_paged_audio_buffer__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_paged_audio_buffer_read_pcm_frames((ma_paged_audio_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_paged_audio_buffer__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_paged_audio_buffer_seek_to_pcm_frame((ma_paged_audio_buffer*)pDataSource, frameIndex); } static ma_result ma_paged_audio_buffer__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_paged_audio_buffer* pPagedAudioBuffer = (ma_paged_audio_buffer*)pDataSource; *pFormat = pPagedAudioBuffer->pData->format; *pChannels = pPagedAudioBuffer->pData->channels; *pSampleRate = 0; /* There is no notion of a sample rate with audio buffers. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pPagedAudioBuffer->pData->channels); return MA_SUCCESS; } static ma_result ma_paged_audio_buffer__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_paged_audio_buffer_get_cursor_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pCursor); } static ma_result ma_paged_audio_buffer__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_paged_audio_buffer_get_length_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pLength); } static ma_data_source_vtable g_ma_paged_audio_buffer_data_source_vtable = { ma_paged_audio_buffer__data_source_on_read, ma_paged_audio_buffer__data_source_on_seek, ma_paged_audio_buffer__data_source_on_get_data_format, ma_paged_audio_buffer__data_source_on_get_cursor, ma_paged_audio_buffer__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer) { ma_result result; ma_data_source_config dataSourceConfig; if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pPagedAudioBuffer); /* A config is required for the format and channel count. */ if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pData == NULL) { return MA_INVALID_ARGS; /* No underlying data specified. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_paged_audio_buffer_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pPagedAudioBuffer->ds); if (result != MA_SUCCESS) { return result; } pPagedAudioBuffer->pData = pConfig->pData; pPagedAudioBuffer->pCurrent = ma_paged_audio_buffer_data_get_head(pConfig->pData); pPagedAudioBuffer->relativeCursor = 0; pPagedAudioBuffer->absoluteCursor = 0; return MA_SUCCESS; } MA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer) { if (pPagedAudioBuffer == NULL) { return; } /* Nothing to do. The data needs to be deleted separately. */ } MA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesRead = 0; ma_format format; ma_uint32 channels; if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } format = pPagedAudioBuffer->pData->format; channels = pPagedAudioBuffer->pData->channels; while (totalFramesRead < frameCount) { /* Read from the current page. The buffer should never be in a state where this is NULL. */ ma_uint64 framesRemainingInCurrentPage; ma_uint64 framesRemainingToRead = frameCount - totalFramesRead; ma_uint64 framesToReadThisIteration; MA_ASSERT(pPagedAudioBuffer->pCurrent != NULL); framesRemainingInCurrentPage = pPagedAudioBuffer->pCurrent->sizeInFrames - pPagedAudioBuffer->relativeCursor; framesToReadThisIteration = ma_min(framesRemainingInCurrentPage, framesRemainingToRead); ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), ma_offset_pcm_frames_ptr(pPagedAudioBuffer->pCurrent->pAudioData, pPagedAudioBuffer->relativeCursor, format, channels), framesToReadThisIteration, format, channels); totalFramesRead += framesToReadThisIteration; pPagedAudioBuffer->absoluteCursor += framesToReadThisIteration; pPagedAudioBuffer->relativeCursor += framesToReadThisIteration; /* Move to the next page if necessary. If there's no more pages, we need to return MA_AT_END. */ MA_ASSERT(pPagedAudioBuffer->relativeCursor <= pPagedAudioBuffer->pCurrent->sizeInFrames); if (pPagedAudioBuffer->relativeCursor == pPagedAudioBuffer->pCurrent->sizeInFrames) { /* We reached the end of the page. Need to move to the next. If there's no more pages, we're done. */ ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPagedAudioBuffer->pCurrent->pNext); if (pNext == NULL) { result = MA_AT_END; break; /* We've reached the end. */ } else { pPagedAudioBuffer->pCurrent = pNext; pPagedAudioBuffer->relativeCursor = 0; } } } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } MA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex) { if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } if (frameIndex == pPagedAudioBuffer->absoluteCursor) { return MA_SUCCESS; /* Nothing to do. */ } if (frameIndex < pPagedAudioBuffer->absoluteCursor) { /* Moving backwards. Need to move the cursor back to the start, and then move forward. */ pPagedAudioBuffer->pCurrent = ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData); pPagedAudioBuffer->absoluteCursor = 0; pPagedAudioBuffer->relativeCursor = 0; /* Fall through to the forward seeking section below. */ } if (frameIndex > pPagedAudioBuffer->absoluteCursor) { /* Moving forward. */ ma_paged_audio_buffer_page* pPage; ma_uint64 runningCursor = 0; for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData)->pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) { ma_uint64 pageRangeBeg = runningCursor; ma_uint64 pageRangeEnd = pageRangeBeg + pPage->sizeInFrames; if (frameIndex >= pageRangeBeg) { if (frameIndex < pageRangeEnd || (frameIndex == pageRangeEnd && pPage == (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(ma_paged_audio_buffer_data_get_tail(pPagedAudioBuffer->pData)))) { /* A small edge case - allow seeking to the very end of the buffer. */ /* We found the page. */ pPagedAudioBuffer->pCurrent = pPage; pPagedAudioBuffer->absoluteCursor = frameIndex; pPagedAudioBuffer->relativeCursor = frameIndex - pageRangeBeg; return MA_SUCCESS; } } runningCursor = pageRangeEnd; } /* Getting here means we tried seeking too far forward. Don't change any state. */ return MA_BAD_SEEK; } return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pPagedAudioBuffer == NULL) { return MA_INVALID_ARGS; } *pCursor = pPagedAudioBuffer->absoluteCursor; return MA_SUCCESS; } MA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength) { return ma_paged_audio_buffer_data_get_length_in_pcm_frames(pPagedAudioBuffer->pData, pLength); } /************************************************************************************************************************************************************** VFS **************************************************************************************************************************************************************/ MA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pVFS == NULL || pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } if (pCallbacks->onOpen == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onOpen(pVFS, pFilePath, openMode, pFile); } MA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pVFS == NULL || pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } if (pCallbacks->onOpenW == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onOpenW(pVFS, pFilePath, openMode, pFile); } MA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onClose == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onClose(pVFS, file); } MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; ma_result result; size_t bytesRead = 0; if (pBytesRead != NULL) { *pBytesRead = 0; } if (pVFS == NULL || file == NULL || pDst == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onRead == NULL) { return MA_NOT_IMPLEMENTED; } result = pCallbacks->onRead(pVFS, file, pDst, sizeInBytes, &bytesRead); if (pBytesRead != NULL) { *pBytesRead = bytesRead; } if (result == MA_SUCCESS && bytesRead == 0 && sizeInBytes > 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (pVFS == NULL || file == NULL || pSrc == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onWrite == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onWrite(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } MA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onSeek == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onSeek(pVFS, file, offset, origin); } MA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onTell == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onTell(pVFS, file, pCursor); } MA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; if (pInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pInfo); if (pVFS == NULL || file == NULL) { return MA_INVALID_ARGS; } if (pCallbacks->onInfo == NULL) { return MA_NOT_IMPLEMENTED; } return pCallbacks->onInfo(pVFS, file, pInfo); } #if !defined(MA_USE_WIN32_FILEIO) && (defined(MA_WIN32) && defined(MA_WIN32_DESKTOP) && !defined(MA_NO_WIN32_FILEIO) && !defined(MA_POSIX)) #define MA_USE_WIN32_FILEIO #endif #if defined(MA_USE_WIN32_FILEIO) /* We need to dynamically load SetFilePointer or SetFilePointerEx because older versions of Windows do not have the Ex version. We therefore need to do some dynamic branching depending on what's available. We load these when we load our first file from the default VFS. It's left open for the life of the program and is left to the OS to uninitialize when the program terminates. */ typedef DWORD (__stdcall * ma_SetFilePointer_proc)(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod); typedef BOOL (__stdcall * ma_SetFilePointerEx_proc)(HANDLE hFile, LARGE_INTEGER liDistanceToMove, LARGE_INTEGER* lpNewFilePointer, DWORD dwMoveMethod); static ma_handle hKernel32DLL = NULL; static ma_SetFilePointer_proc ma_SetFilePointer = NULL; static ma_SetFilePointerEx_proc ma_SetFilePointerEx = NULL; static void ma_win32_fileio_init(void) { if (hKernel32DLL == NULL) { hKernel32DLL = ma_dlopen(NULL, "kernel32.dll"); if (hKernel32DLL != NULL) { ma_SetFilePointer = (ma_SetFilePointer_proc) ma_dlsym(NULL, hKernel32DLL, "SetFilePointer"); ma_SetFilePointerEx = (ma_SetFilePointerEx_proc)ma_dlsym(NULL, hKernel32DLL, "SetFilePointerEx"); } } } static void ma_default_vfs__get_open_settings_win32(ma_uint32 openMode, DWORD* pDesiredAccess, DWORD* pShareMode, DWORD* pCreationDisposition) { *pDesiredAccess = 0; if ((openMode & MA_OPEN_MODE_READ) != 0) { *pDesiredAccess |= GENERIC_READ; } if ((openMode & MA_OPEN_MODE_WRITE) != 0) { *pDesiredAccess |= GENERIC_WRITE; } *pShareMode = 0; if ((openMode & MA_OPEN_MODE_READ) != 0) { *pShareMode |= FILE_SHARE_READ; } if ((openMode & MA_OPEN_MODE_WRITE) != 0) { *pCreationDisposition = CREATE_ALWAYS; /* Opening in write mode. Truncate. */ } else { *pCreationDisposition = OPEN_EXISTING; /* Opening in read mode. File must exist. */ } } static ma_result ma_default_vfs_open__win32(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { HANDLE hFile; DWORD dwDesiredAccess; DWORD dwShareMode; DWORD dwCreationDisposition; (void)pVFS; /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */ ma_win32_fileio_init(); ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition); hFile = CreateFileA(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return ma_result_from_GetLastError(GetLastError()); } *pFile = hFile; return MA_SUCCESS; } static ma_result ma_default_vfs_open_w__win32(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { HANDLE hFile; DWORD dwDesiredAccess; DWORD dwShareMode; DWORD dwCreationDisposition; (void)pVFS; /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */ ma_win32_fileio_init(); ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition); hFile = CreateFileW(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return ma_result_from_GetLastError(GetLastError()); } *pFile = hFile; return MA_SUCCESS; } static ma_result ma_default_vfs_close__win32(ma_vfs* pVFS, ma_vfs_file file) { (void)pVFS; if (CloseHandle((HANDLE)file) == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_default_vfs_read__win32(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { ma_result result = MA_SUCCESS; size_t totalBytesRead; (void)pVFS; totalBytesRead = 0; while (totalBytesRead < sizeInBytes) { size_t bytesRemaining; DWORD bytesToRead; DWORD bytesRead; BOOL readResult; bytesRemaining = sizeInBytes - totalBytesRead; if (bytesRemaining >= 0xFFFFFFFF) { bytesToRead = 0xFFFFFFFF; } else { bytesToRead = (DWORD)bytesRemaining; } readResult = ReadFile((HANDLE)file, ma_offset_ptr(pDst, totalBytesRead), bytesToRead, &bytesRead, NULL); if (readResult == 1 && bytesRead == 0) { result = MA_AT_END; break; /* EOF */ } totalBytesRead += bytesRead; if (bytesRead < bytesToRead) { break; /* EOF */ } if (readResult == 0) { result = ma_result_from_GetLastError(GetLastError()); break; } } if (pBytesRead != NULL) { *pBytesRead = totalBytesRead; } return result; } static ma_result ma_default_vfs_write__win32(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { ma_result result = MA_SUCCESS; size_t totalBytesWritten; (void)pVFS; totalBytesWritten = 0; while (totalBytesWritten < sizeInBytes) { size_t bytesRemaining; DWORD bytesToWrite; DWORD bytesWritten; BOOL writeResult; bytesRemaining = sizeInBytes - totalBytesWritten; if (bytesRemaining >= 0xFFFFFFFF) { bytesToWrite = 0xFFFFFFFF; } else { bytesToWrite = (DWORD)bytesRemaining; } writeResult = WriteFile((HANDLE)file, ma_offset_ptr(pSrc, totalBytesWritten), bytesToWrite, &bytesWritten, NULL); totalBytesWritten += bytesWritten; if (writeResult == 0) { result = ma_result_from_GetLastError(GetLastError()); break; } } if (pBytesWritten != NULL) { *pBytesWritten = totalBytesWritten; } return result; } static ma_result ma_default_vfs_seek__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { LARGE_INTEGER liDistanceToMove; DWORD dwMoveMethod; BOOL result; (void)pVFS; liDistanceToMove.QuadPart = offset; /* */ if (origin == ma_seek_origin_current) { dwMoveMethod = FILE_CURRENT; } else if (origin == ma_seek_origin_end) { dwMoveMethod = FILE_END; } else { dwMoveMethod = FILE_BEGIN; } if (ma_SetFilePointerEx != NULL) { result = ma_SetFilePointerEx((HANDLE)file, liDistanceToMove, NULL, dwMoveMethod); } else if (ma_SetFilePointer != NULL) { /* No SetFilePointerEx() so restrict to 31 bits. */ if (offset > 0x7FFFFFFF) { return MA_OUT_OF_RANGE; } result = ma_SetFilePointer((HANDLE)file, (LONG)liDistanceToMove.QuadPart, NULL, dwMoveMethod); } else { return MA_NOT_IMPLEMENTED; } if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } return MA_SUCCESS; } static ma_result ma_default_vfs_tell__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { LARGE_INTEGER liZero; LARGE_INTEGER liTell; BOOL result; (void)pVFS; liZero.QuadPart = 0; if (ma_SetFilePointerEx != NULL) { result = ma_SetFilePointerEx((HANDLE)file, liZero, &liTell, FILE_CURRENT); } else if (ma_SetFilePointer != NULL) { LONG tell; result = ma_SetFilePointer((HANDLE)file, (LONG)liZero.QuadPart, &tell, FILE_CURRENT); liTell.QuadPart = tell; } else { return MA_NOT_IMPLEMENTED; } if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } if (pCursor != NULL) { *pCursor = liTell.QuadPart; } return MA_SUCCESS; } static ma_result ma_default_vfs_info__win32(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { BY_HANDLE_FILE_INFORMATION fi; BOOL result; (void)pVFS; result = GetFileInformationByHandle((HANDLE)file, &fi); if (result == 0) { return ma_result_from_GetLastError(GetLastError()); } pInfo->sizeInBytes = ((ma_uint64)fi.nFileSizeHigh << 32) | ((ma_uint64)fi.nFileSizeLow); return MA_SUCCESS; } #else static ma_result ma_default_vfs_open__stdio(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_result result; FILE* pFileStd; const char* pOpenModeStr; MA_ASSERT(pFilePath != NULL); MA_ASSERT(openMode != 0); MA_ASSERT(pFile != NULL); (void)pVFS; if ((openMode & MA_OPEN_MODE_READ) != 0) { if ((openMode & MA_OPEN_MODE_WRITE) != 0) { pOpenModeStr = "r+"; } else { pOpenModeStr = "rb"; } } else { pOpenModeStr = "wb"; } result = ma_fopen(&pFileStd, pFilePath, pOpenModeStr); if (result != MA_SUCCESS) { return result; } *pFile = pFileStd; return MA_SUCCESS; } static ma_result ma_default_vfs_open_w__stdio(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { ma_result result; FILE* pFileStd; const wchar_t* pOpenModeStr; MA_ASSERT(pFilePath != NULL); MA_ASSERT(openMode != 0); MA_ASSERT(pFile != NULL); (void)pVFS; if ((openMode & MA_OPEN_MODE_READ) != 0) { if ((openMode & MA_OPEN_MODE_WRITE) != 0) { pOpenModeStr = L"r+"; } else { pOpenModeStr = L"rb"; } } else { pOpenModeStr = L"wb"; } result = ma_wfopen(&pFileStd, pFilePath, pOpenModeStr, (pVFS != NULL) ? &((ma_default_vfs*)pVFS)->allocationCallbacks : NULL); if (result != MA_SUCCESS) { return result; } *pFile = pFileStd; return MA_SUCCESS; } static ma_result ma_default_vfs_close__stdio(ma_vfs* pVFS, ma_vfs_file file) { MA_ASSERT(file != NULL); (void)pVFS; fclose((FILE*)file); return MA_SUCCESS; } static ma_result ma_default_vfs_read__stdio(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { size_t result; MA_ASSERT(file != NULL); MA_ASSERT(pDst != NULL); (void)pVFS; result = fread(pDst, 1, sizeInBytes, (FILE*)file); if (pBytesRead != NULL) { *pBytesRead = result; } if (result != sizeInBytes) { if (result == 0 && feof((FILE*)file)) { return MA_AT_END; } else { return ma_result_from_errno(ferror((FILE*)file)); } } return MA_SUCCESS; } static ma_result ma_default_vfs_write__stdio(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { size_t result; MA_ASSERT(file != NULL); MA_ASSERT(pSrc != NULL); (void)pVFS; result = fwrite(pSrc, 1, sizeInBytes, (FILE*)file); if (pBytesWritten != NULL) { *pBytesWritten = result; } if (result != sizeInBytes) { return ma_result_from_errno(ferror((FILE*)file)); } return MA_SUCCESS; } static ma_result ma_default_vfs_seek__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { int result; int whence; MA_ASSERT(file != NULL); (void)pVFS; if (origin == ma_seek_origin_start) { whence = SEEK_SET; } else if (origin == ma_seek_origin_end) { whence = SEEK_END; } else { whence = SEEK_CUR; } #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _fseeki64((FILE*)file, offset, whence); #else /* No _fseeki64() so restrict to 31 bits. */ if (offset > 0x7FFFFFFF) { return MA_OUT_OF_RANGE; } result = fseek((FILE*)file, (int)offset, whence); #endif #else result = fseek((FILE*)file, (long int)offset, whence); #endif if (result != 0) { return MA_ERROR; } return MA_SUCCESS; } static ma_result ma_default_vfs_tell__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { ma_int64 result; MA_ASSERT(file != NULL); MA_ASSERT(pCursor != NULL); (void)pVFS; #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER > 1200 result = _ftelli64((FILE*)file); #else result = ftell((FILE*)file); #endif #else result = ftell((FILE*)file); #endif *pCursor = result; return MA_SUCCESS; } #if !defined(_MSC_VER) && !((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)) && !defined(MA_BSD) int fileno(FILE *stream); #endif static ma_result ma_default_vfs_info__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { int fd; struct stat info; MA_ASSERT(file != NULL); MA_ASSERT(pInfo != NULL); (void)pVFS; #if defined(_MSC_VER) fd = _fileno((FILE*)file); #else fd = fileno((FILE*)file); #endif if (fstat(fd, &info) != 0) { return ma_result_from_errno(errno); } pInfo->sizeInBytes = info.st_size; return MA_SUCCESS; } #endif static ma_result ma_default_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_open__win32(pVFS, pFilePath, openMode, pFile); #else return ma_default_vfs_open__stdio(pVFS, pFilePath, openMode, pFile); #endif } static ma_result ma_default_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pFile == NULL) { return MA_INVALID_ARGS; } *pFile = NULL; if (pFilePath == NULL || openMode == 0) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_open_w__win32(pVFS, pFilePath, openMode, pFile); #else return ma_default_vfs_open_w__stdio(pVFS, pFilePath, openMode, pFile); #endif } static ma_result ma_default_vfs_close(ma_vfs* pVFS, ma_vfs_file file) { if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_close__win32(pVFS, file); #else return ma_default_vfs_close__stdio(pVFS, file); #endif } static ma_result ma_default_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { if (pBytesRead != NULL) { *pBytesRead = 0; } if (file == NULL || pDst == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_read__win32(pVFS, file, pDst, sizeInBytes, pBytesRead); #else return ma_default_vfs_read__stdio(pVFS, file, pDst, sizeInBytes, pBytesRead); #endif } static ma_result ma_default_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { if (pBytesWritten != NULL) { *pBytesWritten = 0; } if (file == NULL || pSrc == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_write__win32(pVFS, file, pSrc, sizeInBytes, pBytesWritten); #else return ma_default_vfs_write__stdio(pVFS, file, pSrc, sizeInBytes, pBytesWritten); #endif } static ma_result ma_default_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_seek__win32(pVFS, file, offset, origin); #else return ma_default_vfs_seek__stdio(pVFS, file, offset, origin); #endif } static ma_result ma_default_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_tell__win32(pVFS, file, pCursor); #else return ma_default_vfs_tell__stdio(pVFS, file, pCursor); #endif } static ma_result ma_default_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { if (pInfo == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pInfo); if (file == NULL) { return MA_INVALID_ARGS; } #if defined(MA_USE_WIN32_FILEIO) return ma_default_vfs_info__win32(pVFS, file, pInfo); #else return ma_default_vfs_info__stdio(pVFS, file, pInfo); #endif } MA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVFS == NULL) { return MA_INVALID_ARGS; } pVFS->cb.onOpen = ma_default_vfs_open; pVFS->cb.onOpenW = ma_default_vfs_open_w; pVFS->cb.onClose = ma_default_vfs_close; pVFS->cb.onRead = ma_default_vfs_read; pVFS->cb.onWrite = ma_default_vfs_write; pVFS->cb.onSeek = ma_default_vfs_seek; pVFS->cb.onTell = ma_default_vfs_tell; pVFS->cb.onInfo = ma_default_vfs_info; ma_allocation_callbacks_init_copy(&pVFS->allocationCallbacks, pAllocationCallbacks); return MA_SUCCESS; } MA_API ma_result ma_vfs_or_default_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pVFS != NULL) { return ma_vfs_open(pVFS, pFilePath, openMode, pFile); } else { return ma_default_vfs_open(pVFS, pFilePath, openMode, pFile); } } MA_API ma_result ma_vfs_or_default_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile) { if (pVFS != NULL) { return ma_vfs_open_w(pVFS, pFilePath, openMode, pFile); } else { return ma_default_vfs_open_w(pVFS, pFilePath, openMode, pFile); } } MA_API ma_result ma_vfs_or_default_close(ma_vfs* pVFS, ma_vfs_file file) { if (pVFS != NULL) { return ma_vfs_close(pVFS, file); } else { return ma_default_vfs_close(pVFS, file); } } MA_API ma_result ma_vfs_or_default_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead) { if (pVFS != NULL) { return ma_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead); } else { return ma_default_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead); } } MA_API ma_result ma_vfs_or_default_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten) { if (pVFS != NULL) { return ma_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } else { return ma_default_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten); } } MA_API ma_result ma_vfs_or_default_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin) { if (pVFS != NULL) { return ma_vfs_seek(pVFS, file, offset, origin); } else { return ma_default_vfs_seek(pVFS, file, offset, origin); } } MA_API ma_result ma_vfs_or_default_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor) { if (pVFS != NULL) { return ma_vfs_tell(pVFS, file, pCursor); } else { return ma_default_vfs_tell(pVFS, file, pCursor); } } MA_API ma_result ma_vfs_or_default_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo) { if (pVFS != NULL) { return ma_vfs_info(pVFS, file, pInfo); } else { return ma_default_vfs_info(pVFS, file, pInfo); } } static ma_result ma_vfs_open_and_read_file_ex(ma_vfs* pVFS, const char* pFilePath, const wchar_t* pFilePathW, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; ma_vfs_file file; ma_file_info info; void* pData; size_t bytesRead; if (ppData != NULL) { *ppData = NULL; } if (pSize != NULL) { *pSize = 0; } if (ppData == NULL) { return MA_INVALID_ARGS; } if (pFilePath != NULL) { result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); } else { result = ma_vfs_or_default_open_w(pVFS, pFilePathW, MA_OPEN_MODE_READ, &file); } if (result != MA_SUCCESS) { return result; } result = ma_vfs_or_default_info(pVFS, file, &info); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } if (info.sizeInBytes > MA_SIZE_MAX) { ma_vfs_or_default_close(pVFS, file); return MA_TOO_BIG; } pData = ma_malloc((size_t)info.sizeInBytes, pAllocationCallbacks); /* Safe cast. */ if (pData == NULL) { ma_vfs_or_default_close(pVFS, file); return result; } result = ma_vfs_or_default_read(pVFS, file, pData, (size_t)info.sizeInBytes, &bytesRead); /* Safe cast. */ ma_vfs_or_default_close(pVFS, file); if (result != MA_SUCCESS) { ma_free(pData, pAllocationCallbacks); return result; } if (pSize != NULL) { *pSize = bytesRead; } MA_ASSERT(ppData != NULL); *ppData = pData; return MA_SUCCESS; } MA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_vfs_open_and_read_file_ex(pVFS, pFilePath, NULL, ppData, pSize, pAllocationCallbacks); } MA_API ma_result ma_vfs_open_and_read_file_w(ma_vfs* pVFS, const wchar_t* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_vfs_open_and_read_file_ex(pVFS, NULL, pFilePath, ppData, pSize, pAllocationCallbacks); } /************************************************************************************************************************************************************** Decoding and Encoding Headers. These are auto-generated from a tool. **************************************************************************************************************************************************************/ #if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING)) /* dr_wav_h begin */ #ifndef ma_dr_wav_h #define ma_dr_wav_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_WAV_STRINGIFY(x) #x #define MA_DR_WAV_XSTRINGIFY(x) MA_DR_WAV_STRINGIFY(x) #define MA_DR_WAV_VERSION_MAJOR 0 #define MA_DR_WAV_VERSION_MINOR 13 #define MA_DR_WAV_VERSION_REVISION 18 #define MA_DR_WAV_VERSION_STRING MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MAJOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MINOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_REVISION) #include #define MA_DR_WAVE_FORMAT_PCM 0x1 #define MA_DR_WAVE_FORMAT_ADPCM 0x2 #define MA_DR_WAVE_FORMAT_IEEE_FLOAT 0x3 #define MA_DR_WAVE_FORMAT_ALAW 0x6 #define MA_DR_WAVE_FORMAT_MULAW 0x7 #define MA_DR_WAVE_FORMAT_DVI_ADPCM 0x11 #define MA_DR_WAVE_FORMAT_EXTENSIBLE 0xFFFE #define MA_DR_WAV_SEQUENTIAL 0x00000001 #define MA_DR_WAV_WITH_METADATA 0x00000002 MA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_wav_version_string(void); typedef enum { ma_dr_wav_seek_origin_start, ma_dr_wav_seek_origin_current } ma_dr_wav_seek_origin; typedef enum { ma_dr_wav_container_riff, ma_dr_wav_container_rifx, ma_dr_wav_container_w64, ma_dr_wav_container_rf64, ma_dr_wav_container_aiff } ma_dr_wav_container; typedef struct { union { ma_uint8 fourcc[4]; ma_uint8 guid[16]; } id; ma_uint64 sizeInBytes; unsigned int paddingSize; } ma_dr_wav_chunk_header; typedef struct { ma_uint16 formatTag; ma_uint16 channels; ma_uint32 sampleRate; ma_uint32 avgBytesPerSec; ma_uint16 blockAlign; ma_uint16 bitsPerSample; ma_uint16 extendedSize; ma_uint16 validBitsPerSample; ma_uint32 channelMask; ma_uint8 subFormat[16]; } ma_dr_wav_fmt; MA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT); typedef size_t (* ma_dr_wav_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef size_t (* ma_dr_wav_write_proc)(void* pUserData, const void* pData, size_t bytesToWrite); typedef ma_bool32 (* ma_dr_wav_seek_proc)(void* pUserData, int offset, ma_dr_wav_seek_origin origin); typedef ma_uint64 (* ma_dr_wav_chunk_proc)(void* pChunkUserData, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_container container, const ma_dr_wav_fmt* pFMT); typedef struct { const ma_uint8* data; size_t dataSize; size_t currentReadPos; } ma_dr_wav__memory_stream; typedef struct { void** ppData; size_t* pDataSize; size_t dataSize; size_t dataCapacity; size_t currentWritePos; } ma_dr_wav__memory_stream_write; typedef struct { ma_dr_wav_container container; ma_uint32 format; ma_uint32 channels; ma_uint32 sampleRate; ma_uint32 bitsPerSample; } ma_dr_wav_data_format; typedef enum { ma_dr_wav_metadata_type_none = 0, ma_dr_wav_metadata_type_unknown = 1 << 0, ma_dr_wav_metadata_type_smpl = 1 << 1, ma_dr_wav_metadata_type_inst = 1 << 2, ma_dr_wav_metadata_type_cue = 1 << 3, ma_dr_wav_metadata_type_acid = 1 << 4, ma_dr_wav_metadata_type_bext = 1 << 5, ma_dr_wav_metadata_type_list_label = 1 << 6, ma_dr_wav_metadata_type_list_note = 1 << 7, ma_dr_wav_metadata_type_list_labelled_cue_region = 1 << 8, ma_dr_wav_metadata_type_list_info_software = 1 << 9, ma_dr_wav_metadata_type_list_info_copyright = 1 << 10, ma_dr_wav_metadata_type_list_info_title = 1 << 11, ma_dr_wav_metadata_type_list_info_artist = 1 << 12, ma_dr_wav_metadata_type_list_info_comment = 1 << 13, ma_dr_wav_metadata_type_list_info_date = 1 << 14, ma_dr_wav_metadata_type_list_info_genre = 1 << 15, ma_dr_wav_metadata_type_list_info_album = 1 << 16, ma_dr_wav_metadata_type_list_info_tracknumber = 1 << 17, ma_dr_wav_metadata_type_list_all_info_strings = ma_dr_wav_metadata_type_list_info_software | ma_dr_wav_metadata_type_list_info_copyright | ma_dr_wav_metadata_type_list_info_title | ma_dr_wav_metadata_type_list_info_artist | ma_dr_wav_metadata_type_list_info_comment | ma_dr_wav_metadata_type_list_info_date | ma_dr_wav_metadata_type_list_info_genre | ma_dr_wav_metadata_type_list_info_album | ma_dr_wav_metadata_type_list_info_tracknumber, ma_dr_wav_metadata_type_list_all_adtl = ma_dr_wav_metadata_type_list_label | ma_dr_wav_metadata_type_list_note | ma_dr_wav_metadata_type_list_labelled_cue_region, ma_dr_wav_metadata_type_all = -2, ma_dr_wav_metadata_type_all_including_unknown = -1 } ma_dr_wav_metadata_type; typedef enum { ma_dr_wav_smpl_loop_type_forward = 0, ma_dr_wav_smpl_loop_type_pingpong = 1, ma_dr_wav_smpl_loop_type_backward = 2 } ma_dr_wav_smpl_loop_type; typedef struct { ma_uint32 cuePointId; ma_uint32 type; ma_uint32 firstSampleByteOffset; ma_uint32 lastSampleByteOffset; ma_uint32 sampleFraction; ma_uint32 playCount; } ma_dr_wav_smpl_loop; typedef struct { ma_uint32 manufacturerId; ma_uint32 productId; ma_uint32 samplePeriodNanoseconds; ma_uint32 midiUnityNote; ma_uint32 midiPitchFraction; ma_uint32 smpteFormat; ma_uint32 smpteOffset; ma_uint32 sampleLoopCount; ma_uint32 samplerSpecificDataSizeInBytes; ma_dr_wav_smpl_loop* pLoops; ma_uint8* pSamplerSpecificData; } ma_dr_wav_smpl; typedef struct { ma_int8 midiUnityNote; ma_int8 fineTuneCents; ma_int8 gainDecibels; ma_int8 lowNote; ma_int8 highNote; ma_int8 lowVelocity; ma_int8 highVelocity; } ma_dr_wav_inst; typedef struct { ma_uint32 id; ma_uint32 playOrderPosition; ma_uint8 dataChunkId[4]; ma_uint32 chunkStart; ma_uint32 blockStart; ma_uint32 sampleByteOffset; } ma_dr_wav_cue_point; typedef struct { ma_uint32 cuePointCount; ma_dr_wav_cue_point *pCuePoints; } ma_dr_wav_cue; typedef enum { ma_dr_wav_acid_flag_one_shot = 1, ma_dr_wav_acid_flag_root_note_set = 2, ma_dr_wav_acid_flag_stretch = 4, ma_dr_wav_acid_flag_disk_based = 8, ma_dr_wav_acid_flag_acidizer = 16 } ma_dr_wav_acid_flag; typedef struct { ma_uint32 flags; ma_uint16 midiUnityNote; ma_uint16 reserved1; float reserved2; ma_uint32 numBeats; ma_uint16 meterDenominator; ma_uint16 meterNumerator; float tempo; } ma_dr_wav_acid; typedef struct { ma_uint32 cuePointId; ma_uint32 stringLength; char* pString; } ma_dr_wav_list_label_or_note; typedef struct { char* pDescription; char* pOriginatorName; char* pOriginatorReference; char pOriginationDate[10]; char pOriginationTime[8]; ma_uint64 timeReference; ma_uint16 version; char* pCodingHistory; ma_uint32 codingHistorySize; ma_uint8* pUMID; ma_uint16 loudnessValue; ma_uint16 loudnessRange; ma_uint16 maxTruePeakLevel; ma_uint16 maxMomentaryLoudness; ma_uint16 maxShortTermLoudness; } ma_dr_wav_bext; typedef struct { ma_uint32 stringLength; char* pString; } ma_dr_wav_list_info_text; typedef struct { ma_uint32 cuePointId; ma_uint32 sampleLength; ma_uint8 purposeId[4]; ma_uint16 country; ma_uint16 language; ma_uint16 dialect; ma_uint16 codePage; ma_uint32 stringLength; char* pString; } ma_dr_wav_list_labelled_cue_region; typedef enum { ma_dr_wav_metadata_location_invalid, ma_dr_wav_metadata_location_top_level, ma_dr_wav_metadata_location_inside_info_list, ma_dr_wav_metadata_location_inside_adtl_list } ma_dr_wav_metadata_location; typedef struct { ma_uint8 id[4]; ma_dr_wav_metadata_location chunkLocation; ma_uint32 dataSizeInBytes; ma_uint8* pData; } ma_dr_wav_unknown_metadata; typedef struct { ma_dr_wav_metadata_type type; union { ma_dr_wav_cue cue; ma_dr_wav_smpl smpl; ma_dr_wav_acid acid; ma_dr_wav_inst inst; ma_dr_wav_bext bext; ma_dr_wav_list_label_or_note labelOrNote; ma_dr_wav_list_labelled_cue_region labelledCueRegion; ma_dr_wav_list_info_text infoText; ma_dr_wav_unknown_metadata unknown; } data; } ma_dr_wav_metadata; typedef struct { ma_dr_wav_read_proc onRead; ma_dr_wav_write_proc onWrite; ma_dr_wav_seek_proc onSeek; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_dr_wav_container container; ma_dr_wav_fmt fmt; ma_uint32 sampleRate; ma_uint16 channels; ma_uint16 bitsPerSample; ma_uint16 translatedFormatTag; ma_uint64 totalPCMFrameCount; ma_uint64 dataChunkDataSize; ma_uint64 dataChunkDataPos; ma_uint64 bytesRemaining; ma_uint64 readCursorInPCMFrames; ma_uint64 dataChunkDataSizeTargetWrite; ma_bool32 isSequentialWrite; ma_dr_wav_metadata* pMetadata; ma_uint32 metadataCount; ma_dr_wav__memory_stream memoryStream; ma_dr_wav__memory_stream_write memoryStreamWrite; struct { ma_uint32 bytesRemainingInBlock; ma_uint16 predictor[2]; ma_int32 delta[2]; ma_int32 cachedFrames[4]; ma_uint32 cachedFrameCount; ma_int32 prevFrames[2][2]; } msadpcm; struct { ma_uint32 bytesRemainingInBlock; ma_int32 predictor[2]; ma_int32 stepIndex[2]; ma_int32 cachedFrames[16]; ma_uint32 cachedFrameCount; } ima; struct { ma_bool8 isLE; ma_bool8 isUnsigned; } aiff; } ma_dr_wav; MA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount); MA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount); MA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav); MA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav); MA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut); MA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex); MA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor); MA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength); MA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); MA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData); #ifndef MA_DR_WAV_NO_CONVERSION_API MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount); MA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut); MA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount); MA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount); MA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount); MA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); MA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount); #endif #ifndef MA_DR_WAV_NO_STDIO MA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_WAV_NO_CONVERSION_API MA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_WAV_NO_STDIO MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data); MA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data); MA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data); MA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data); MA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data); MA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data); MA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data); MA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16]); MA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b); #ifdef __cplusplus } #endif #endif /* dr_wav_h end */ #endif /* MA_NO_WAV */ #if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING) /* dr_flac_h begin */ #ifndef ma_dr_flac_h #define ma_dr_flac_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_FLAC_STRINGIFY(x) #x #define MA_DR_FLAC_XSTRINGIFY(x) MA_DR_FLAC_STRINGIFY(x) #define MA_DR_FLAC_VERSION_MAJOR 0 #define MA_DR_FLAC_VERSION_MINOR 12 #define MA_DR_FLAC_VERSION_REVISION 43 #define MA_DR_FLAC_VERSION_STRING MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MAJOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MINOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_REVISION) #include #if defined(_MSC_VER) && _MSC_VER >= 1700 #define MA_DR_FLAC_DEPRECATED __declspec(deprecated) #elif (defined(__GNUC__) && __GNUC__ >= 4) #define MA_DR_FLAC_DEPRECATED __attribute__((deprecated)) #elif defined(__has_feature) #if __has_feature(attribute_deprecated) #define MA_DR_FLAC_DEPRECATED __attribute__((deprecated)) #else #define MA_DR_FLAC_DEPRECATED #endif #else #define MA_DR_FLAC_DEPRECATED #endif MA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_flac_version_string(void); #ifndef MA_DR_FLAC_BUFFER_SIZE #define MA_DR_FLAC_BUFFER_SIZE 4096 #endif #ifdef MA_64BIT typedef ma_uint64 ma_dr_flac_cache_t; #else typedef ma_uint32 ma_dr_flac_cache_t; #endif #define MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO 0 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING 1 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION 2 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE 3 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT 4 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET 5 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE 6 #define MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID 127 #define MA_DR_FLAC_PICTURE_TYPE_OTHER 0 #define MA_DR_FLAC_PICTURE_TYPE_FILE_ICON 1 #define MA_DR_FLAC_PICTURE_TYPE_OTHER_FILE_ICON 2 #define MA_DR_FLAC_PICTURE_TYPE_COVER_FRONT 3 #define MA_DR_FLAC_PICTURE_TYPE_COVER_BACK 4 #define MA_DR_FLAC_PICTURE_TYPE_LEAFLET_PAGE 5 #define MA_DR_FLAC_PICTURE_TYPE_MEDIA 6 #define MA_DR_FLAC_PICTURE_TYPE_LEAD_ARTIST 7 #define MA_DR_FLAC_PICTURE_TYPE_ARTIST 8 #define MA_DR_FLAC_PICTURE_TYPE_CONDUCTOR 9 #define MA_DR_FLAC_PICTURE_TYPE_BAND 10 #define MA_DR_FLAC_PICTURE_TYPE_COMPOSER 11 #define MA_DR_FLAC_PICTURE_TYPE_LYRICIST 12 #define MA_DR_FLAC_PICTURE_TYPE_RECORDING_LOCATION 13 #define MA_DR_FLAC_PICTURE_TYPE_DURING_RECORDING 14 #define MA_DR_FLAC_PICTURE_TYPE_DURING_PERFORMANCE 15 #define MA_DR_FLAC_PICTURE_TYPE_SCREEN_CAPTURE 16 #define MA_DR_FLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH 17 #define MA_DR_FLAC_PICTURE_TYPE_ILLUSTRATION 18 #define MA_DR_FLAC_PICTURE_TYPE_BAND_LOGOTYPE 19 #define MA_DR_FLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE 20 typedef enum { ma_dr_flac_container_native, ma_dr_flac_container_ogg, ma_dr_flac_container_unknown } ma_dr_flac_container; typedef enum { ma_dr_flac_seek_origin_start, ma_dr_flac_seek_origin_current } ma_dr_flac_seek_origin; typedef struct { ma_uint64 firstPCMFrame; ma_uint64 flacFrameOffset; ma_uint16 pcmFrameCount; } ma_dr_flac_seekpoint; typedef struct { ma_uint16 minBlockSizeInPCMFrames; ma_uint16 maxBlockSizeInPCMFrames; ma_uint32 minFrameSizeInPCMFrames; ma_uint32 maxFrameSizeInPCMFrames; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint64 totalPCMFrameCount; ma_uint8 md5[16]; } ma_dr_flac_streaminfo; typedef struct { ma_uint32 type; const void* pRawData; ma_uint32 rawDataSize; union { ma_dr_flac_streaminfo streaminfo; struct { int unused; } padding; struct { ma_uint32 id; const void* pData; ma_uint32 dataSize; } application; struct { ma_uint32 seekpointCount; const ma_dr_flac_seekpoint* pSeekpoints; } seektable; struct { ma_uint32 vendorLength; const char* vendor; ma_uint32 commentCount; const void* pComments; } vorbis_comment; struct { char catalog[128]; ma_uint64 leadInSampleCount; ma_bool32 isCD; ma_uint8 trackCount; const void* pTrackData; } cuesheet; struct { ma_uint32 type; ma_uint32 mimeLength; const char* mime; ma_uint32 descriptionLength; const char* description; ma_uint32 width; ma_uint32 height; ma_uint32 colorDepth; ma_uint32 indexColorCount; ma_uint32 pictureDataSize; const ma_uint8* pPictureData; } picture; } data; } ma_dr_flac_metadata; typedef size_t (* ma_dr_flac_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef ma_bool32 (* ma_dr_flac_seek_proc)(void* pUserData, int offset, ma_dr_flac_seek_origin origin); typedef void (* ma_dr_flac_meta_proc)(void* pUserData, ma_dr_flac_metadata* pMetadata); typedef struct { const ma_uint8* data; size_t dataSize; size_t currentReadPos; } ma_dr_flac__memory_stream; typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; void* pUserData; size_t unalignedByteCount; ma_dr_flac_cache_t unalignedCache; ma_uint32 nextL2Line; ma_uint32 consumedBits; ma_dr_flac_cache_t cacheL2[MA_DR_FLAC_BUFFER_SIZE/sizeof(ma_dr_flac_cache_t)]; ma_dr_flac_cache_t cache; ma_uint16 crc16; ma_dr_flac_cache_t crc16Cache; ma_uint32 crc16CacheIgnoredBytes; } ma_dr_flac_bs; typedef struct { ma_uint8 subframeType; ma_uint8 wastedBitsPerSample; ma_uint8 lpcOrder; ma_int32* pSamplesS32; } ma_dr_flac_subframe; typedef struct { ma_uint64 pcmFrameNumber; ma_uint32 flacFrameNumber; ma_uint32 sampleRate; ma_uint16 blockSizeInPCMFrames; ma_uint8 channelAssignment; ma_uint8 bitsPerSample; ma_uint8 crc8; } ma_dr_flac_frame_header; typedef struct { ma_dr_flac_frame_header header; ma_uint32 pcmFramesRemaining; ma_dr_flac_subframe subframes[8]; } ma_dr_flac_frame; typedef struct { ma_dr_flac_meta_proc onMeta; void* pUserDataMD; ma_allocation_callbacks allocationCallbacks; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint16 maxBlockSizeInPCMFrames; ma_uint64 totalPCMFrameCount; ma_dr_flac_container container; ma_uint32 seekpointCount; ma_dr_flac_frame currentFLACFrame; ma_uint64 currentPCMFrame; ma_uint64 firstFLACFramePosInBytes; ma_dr_flac__memory_stream memoryStream; ma_int32* pDecodedSamples; ma_dr_flac_seekpoint* pSeekpoints; void* _oggbs; ma_bool32 _noSeekTableSeek : 1; ma_bool32 _noBinarySearchSeek : 1; ma_bool32 _noBruteForceSeek : 1; ma_dr_flac_bs bs; ma_uint8 pExtraData[1]; } ma_dr_flac; MA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_flac_close(ma_dr_flac* pFlac); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex); #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); typedef struct { ma_uint32 countRemaining; const char* pRunningData; } ma_dr_flac_vorbis_comment_iterator; MA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments); MA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut); typedef struct { ma_uint32 countRemaining; const char* pRunningData; } ma_dr_flac_cuesheet_track_iterator; typedef struct { ma_uint64 offset; ma_uint8 index; ma_uint8 reserved[3]; } ma_dr_flac_cuesheet_track_index; typedef struct { ma_uint64 offset; ma_uint8 trackNumber; char ISRC[12]; ma_bool8 isAudio; ma_bool8 preEmphasis; ma_uint8 indexCount; const ma_dr_flac_cuesheet_track_index* pIndexPoints; } ma_dr_flac_cuesheet_track; MA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData); MA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack); #ifdef __cplusplus } #endif #endif /* dr_flac_h end */ #endif /* MA_NO_FLAC */ #if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING) /* dr_mp3_h begin */ #ifndef ma_dr_mp3_h #define ma_dr_mp3_h #ifdef __cplusplus extern "C" { #endif #define MA_DR_MP3_STRINGIFY(x) #x #define MA_DR_MP3_XSTRINGIFY(x) MA_DR_MP3_STRINGIFY(x) #define MA_DR_MP3_VERSION_MAJOR 0 #define MA_DR_MP3_VERSION_MINOR 6 #define MA_DR_MP3_VERSION_REVISION 40 #define MA_DR_MP3_VERSION_STRING MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MAJOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MINOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_REVISION) #include #define MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME 1152 #define MA_DR_MP3_MAX_SAMPLES_PER_FRAME (MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2) MA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision); MA_API const char* ma_dr_mp3_version_string(void); typedef struct { int frame_bytes, channels, hz, layer, bitrate_kbps; } ma_dr_mp3dec_frame_info; typedef struct { float mdct_overlap[2][9*32], qmf_state[15*2*32]; int reserv, free_format_bytes; ma_uint8 header[4], reserv_buf[511]; } ma_dr_mp3dec; MA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec); MA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info); MA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples); typedef enum { ma_dr_mp3_seek_origin_start, ma_dr_mp3_seek_origin_current } ma_dr_mp3_seek_origin; typedef struct { ma_uint64 seekPosInBytes; ma_uint64 pcmFrameIndex; ma_uint16 mp3FramesToDiscard; ma_uint16 pcmFramesToDiscard; } ma_dr_mp3_seek_point; typedef size_t (* ma_dr_mp3_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); typedef ma_bool32 (* ma_dr_mp3_seek_proc)(void* pUserData, int offset, ma_dr_mp3_seek_origin origin); typedef struct { ma_uint32 channels; ma_uint32 sampleRate; } ma_dr_mp3_config; typedef struct { ma_dr_mp3dec decoder; ma_uint32 channels; ma_uint32 sampleRate; ma_dr_mp3_read_proc onRead; ma_dr_mp3_seek_proc onSeek; void* pUserData; ma_allocation_callbacks allocationCallbacks; ma_uint32 mp3FrameChannels; ma_uint32 mp3FrameSampleRate; ma_uint32 pcmFramesConsumedInMP3Frame; ma_uint32 pcmFramesRemainingInMP3Frame; ma_uint8 pcmFrames[sizeof(float)*MA_DR_MP3_MAX_SAMPLES_PER_FRAME]; ma_uint64 currentPCMFrame; ma_uint64 streamCursor; ma_dr_mp3_seek_point* pSeekPoints; ma_uint32 seekPointCount; size_t dataSize; size_t dataCapacity; size_t dataConsumed; ma_uint8* pData; ma_bool32 atEnd : 1; struct { const ma_uint8* pData; size_t dataSize; size_t currentReadPos; } memory; } ma_dr_mp3; MA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_MP3_NO_STDIO MA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3); MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut); MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut); MA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex); MA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3); MA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3); MA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount); MA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints); MA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints); MA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #ifndef MA_DR_MP3_NO_STDIO MA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks); #endif MA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks); MA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* dr_mp3_h end */ #endif /* MA_NO_MP3 */ /************************************************************************************************************************************************************** Decoding **************************************************************************************************************************************************************/ #ifndef MA_NO_DECODING static ma_result ma_decoder_read_bytes(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { MA_ASSERT(pDecoder != NULL); return pDecoder->onRead(pDecoder, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder_seek_bytes(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin) { MA_ASSERT(pDecoder != NULL); return pDecoder->onSeek(pDecoder, byteOffset, origin); } static ma_result ma_decoder_tell_bytes(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); if (pDecoder->onTell == NULL) { return MA_NOT_IMPLEMENTED; } return pDecoder->onTell(pDecoder, pCursor); } MA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount) { ma_decoding_backend_config config; MA_ZERO_OBJECT(&config); config.preferredFormat = preferredFormat; config.seekPointCount = seekPointCount; return config; } MA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate) { ma_decoder_config config; MA_ZERO_OBJECT(&config); config.format = outputFormat; config.channels = outputChannels; config.sampleRate = outputSampleRate; config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate doesn't matter here. */ config.encodingFormat = ma_encoding_format_unknown; /* Note that we are intentionally leaving the channel map empty here which will cause the default channel map to be used. */ return config; } MA_API ma_decoder_config ma_decoder_config_init_default(void) { return ma_decoder_config_init(ma_format_unknown, 0, 0); } MA_API ma_decoder_config ma_decoder_config_init_copy(const ma_decoder_config* pConfig) { ma_decoder_config config; if (pConfig != NULL) { config = *pConfig; } else { MA_ZERO_OBJECT(&config); } return config; } static ma_result ma_decoder__init_data_converter(ma_decoder* pDecoder, const ma_decoder_config* pConfig) { ma_result result; ma_data_converter_config converterConfig; ma_format internalFormat; ma_uint32 internalChannels; ma_uint32 internalSampleRate; ma_channel internalChannelMap[MA_MAX_CHANNELS]; MA_ASSERT(pDecoder != NULL); MA_ASSERT(pConfig != NULL); result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, &internalSampleRate, internalChannelMap, ma_countof(internalChannelMap)); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal data format. */ } /* Make sure we're not asking for too many channels. */ if (pConfig->channels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } /* The internal channels should have already been validated at a higher level, but we'll do it again explicitly here for safety. */ if (internalChannels > MA_MAX_CHANNELS) { return MA_INVALID_ARGS; } /* Output format. */ if (pConfig->format == ma_format_unknown) { pDecoder->outputFormat = internalFormat; } else { pDecoder->outputFormat = pConfig->format; } if (pConfig->channels == 0) { pDecoder->outputChannels = internalChannels; } else { pDecoder->outputChannels = pConfig->channels; } if (pConfig->sampleRate == 0) { pDecoder->outputSampleRate = internalSampleRate; } else { pDecoder->outputSampleRate = pConfig->sampleRate; } converterConfig = ma_data_converter_config_init( internalFormat, pDecoder->outputFormat, internalChannels, pDecoder->outputChannels, internalSampleRate, pDecoder->outputSampleRate ); converterConfig.pChannelMapIn = internalChannelMap; converterConfig.pChannelMapOut = pConfig->pChannelMap; converterConfig.channelMixMode = pConfig->channelMixMode; converterConfig.ditherMode = pConfig->ditherMode; converterConfig.allowDynamicSampleRate = MA_FALSE; /* Never allow dynamic sample rate conversion. Setting this to true will disable passthrough optimizations. */ converterConfig.resampling = pConfig->resampling; result = ma_data_converter_init(&converterConfig, &pDecoder->allocationCallbacks, &pDecoder->converter); if (result != MA_SUCCESS) { return result; } /* Now that we have the decoder we need to determine whether or not we need a heap-allocated cache. We'll need this if the data converter does not support calculation of the required input frame count. To determine support for this we'll just run a test. */ { ma_uint64 unused; result = ma_data_converter_get_required_input_frame_count(&pDecoder->converter, 1, &unused); if (result != MA_SUCCESS) { /* We were unable to calculate the required input frame count which means we'll need to use a heap-allocated cache. */ ma_uint64 inputCacheCapSizeInBytes; pDecoder->inputCacheCap = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(internalFormat, internalChannels); /* Not strictly necessary, but keeping here for safety in case we change the default value of pDecoder->inputCacheCap. */ inputCacheCapSizeInBytes = pDecoder->inputCacheCap * ma_get_bytes_per_frame(internalFormat, internalChannels); if (inputCacheCapSizeInBytes > MA_SIZE_MAX) { ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } pDecoder->pInputCache = ma_malloc((size_t)inputCacheCapSizeInBytes, &pDecoder->allocationCallbacks); /* Safe cast to size_t. */ if (pDecoder->pInputCache == NULL) { ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } } } return MA_SUCCESS; } static ma_result ma_decoder_internal_on_read__custom(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_read_bytes(pDecoder, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder_internal_on_seek__custom(void* pUserData, ma_int64 offset, ma_seek_origin origin) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_seek_bytes(pDecoder, offset, origin); } static ma_result ma_decoder_internal_on_tell__custom(void* pUserData, ma_int64* pCursor) { ma_decoder* pDecoder = (ma_decoder*)pUserData; MA_ASSERT(pDecoder != NULL); return ma_decoder_tell_bytes(pDecoder, pCursor); } static ma_result ma_decoder_init_from_vtable__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInit == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInit(pVTableUserData, ma_decoder_internal_on_read__custom, ma_decoder_internal_on_seek__custom, ma_decoder_internal_on_tell__custom, pDecoder, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_file__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitFile == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitFile(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_file_w__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitFileW == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitFileW(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_from_memory__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoding_backend_config backendConfig; ma_data_source* pBackend; MA_ASSERT(pVTable != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pVTable->onInitMemory == NULL) { return MA_NOT_IMPLEMENTED; } backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount); result = pVTable->onInitMemory(pVTableUserData, pData, dataSize, &backendConfig, &pDecoder->allocationCallbacks, &pBackend); if (result != MA_SUCCESS) { return result; /* Failed to initialize the backend from this vtable. */ } /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */ pDecoder->pBackend = pBackend; pDecoder->pBackendVTable = pVTable; pDecoder->pBackendUserData = pConfig->pCustomBackendUserData; return MA_SUCCESS; } static ma_result ma_decoder_init_custom__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_vtable__internal(pVTable, pConfig->pCustomBackendUserData, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } else { /* Initialization failed. Move on to the next one, but seek back to the start first so the next vtable starts from the first byte of the file. */ result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start); if (result != MA_SUCCESS) { return result; /* Failed to seek back to the start. */ } } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_file__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_file_w__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } static ma_result ma_decoder_init_custom_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; size_t ivtable; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); if (pConfig->ppCustomBackendVTables == NULL) { return MA_NO_BACKEND; } /* The order each backend is listed is what defines the priority. */ for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) { const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable]; if (pVTable != NULL) { result = ma_decoder_init_from_memory__internal(pVTable, pConfig->pCustomBackendUserData, pData, dataSize, pConfig, pDecoder); if (result == MA_SUCCESS) { return MA_SUCCESS; } } else { /* No vtable. */ } } /* Getting here means we couldn't find a backend. */ return MA_NO_BACKEND; } /* WAV */ #ifdef ma_dr_wav_h #define MA_HAS_WAV typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32, s16 or s32. */ #if !defined(MA_NO_WAV) ma_dr_wav dr; #endif } ma_wav; MA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav); MA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex); MA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor); MA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength); static ma_result ma_wav_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_wav_read_pcm_frames((ma_wav*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_wav_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_wav_seek_to_pcm_frame((ma_wav*)pDataSource, frameIndex); } static ma_result ma_wav_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_wav_get_data_format((ma_wav*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_wav_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_wav_get_cursor_in_pcm_frames((ma_wav*)pDataSource, pCursor); } static ma_result ma_wav_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_wav_get_length_in_pcm_frames((ma_wav*)pDataSource, pLength); } static ma_data_source_vtable g_ma_wav_ds_vtable = { ma_wav_ds_read, ma_wav_ds_seek, ma_wav_ds_get_data_format, ma_wav_ds_get_cursor, ma_wav_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_WAV) static size_t ma_wav_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_wav* pWav = (ma_wav*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pWav != NULL); result = pWav->onRead(pWav->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_wav_dr_callback__seek(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_wav* pWav = (ma_wav*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pWav != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_wav_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pWav->onSeek(pWav->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_wav_init_internal(const ma_decoding_backend_config* pConfig, ma_wav* pWav) { ma_result result; ma_data_source_config dataSourceConfig; if (pWav == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWav); pWav->format = ma_format_unknown; /* Use closest match to source file by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) { pWav->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_wav_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pWav->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } static ma_result ma_wav_post_init(ma_wav* pWav) { /* If an explicit format was not specified, try picking the closest match based on the internal format. The format needs to be supported by miniaudio. */ if (pWav->format == ma_format_unknown) { switch (pWav->dr.translatedFormatTag) { case MA_DR_WAVE_FORMAT_PCM: { if (pWav->dr.bitsPerSample == 8) { pWav->format = ma_format_u8; } else if (pWav->dr.bitsPerSample == 16) { pWav->format = ma_format_s16; } else if (pWav->dr.bitsPerSample == 24) { pWav->format = ma_format_s24; } else if (pWav->dr.bitsPerSample == 32) { pWav->format = ma_format_s32; } } break; case MA_DR_WAVE_FORMAT_IEEE_FLOAT: { if (pWav->dr.bitsPerSample == 32) { pWav->format = ma_format_f32; } } break; default: break; } /* Fall back to f32 if we couldn't find anything. */ if (pWav->format == ma_format_unknown) { pWav->format = ma_format_f32; } } return MA_SUCCESS; } MA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pWav->onRead = onRead; pWav->onSeek = onSeek; pWav->onTell = onTell; pWav->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init(&pWav->dr, ma_wav_dr_callback__read, ma_wav_dr_callback__seek, pWav, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_file(&pWav->dr, pFilePath, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_file_w(&pWav->dr, pFilePath, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav) { ma_result result; result = ma_wav_init_internal(pConfig, pWav); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_init_memory(&pWav->dr, pData, dataSize, pAllocationCallbacks); if (wavResult != MA_TRUE) { return MA_INVALID_FILE; } ma_wav_post_init(pWav); return MA_SUCCESS; } #else { /* wav is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_WAV) { ma_dr_wav_uninit(&pWav->dr); } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pWav->ds); } MA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_wav_get_data_format(pWav, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_wav_read_pcm_frames_f32(&pWav->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_wav_read_pcm_frames_s16(&pWav->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_s32: { totalFramesRead = ma_dr_wav_read_pcm_frames_s32(&pWav->dr, frameCount, (ma_int32*)pFramesOut); } break; /* Fallback to a raw read. */ case ma_format_unknown: return MA_INVALID_OPERATION; /* <-- this should never be hit because initialization would just fall back to a supported format. */ default: { totalFramesRead = ma_dr_wav_read_pcm_frames(&pWav->dr, frameCount, pFramesOut); } break; } /* In the future we'll update ma_dr_wav to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex) { if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_bool32 wavResult; wavResult = ma_dr_wav_seek_to_pcm_frame(&pWav->dr, frameIndex); if (wavResult != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pWav == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pWav->format; } #if !defined(MA_NO_WAV) { if (pChannels != NULL) { *pChannels = pWav->dr.channels; } if (pSampleRate != NULL) { *pSampleRate = pWav->dr.sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pWav->dr.channels); } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_result wavResult = ma_dr_wav_get_cursor_in_pcm_frames(&pWav->dr, pCursor); if (wavResult != MA_SUCCESS) { return (ma_result)wavResult; /* ma_dr_wav result codes map to miniaudio's. */ } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pWav == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_WAV) { ma_result wavResult = ma_dr_wav_get_length_in_pcm_frames(&pWav->dr, pLength); if (wavResult != MA_SUCCESS) { return (ma_result)wavResult; /* ma_dr_wav result codes map to miniaudio's. */ } return MA_SUCCESS; } #else { /* wav is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__wav(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__wav(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_file(pFilePath, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__wav(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__wav(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_wav* pWav; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } result = ma_wav_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pWav); if (result != MA_SUCCESS) { ma_free(pWav, pAllocationCallbacks); return result; } *ppBackend = pWav; return MA_SUCCESS; } static void ma_decoding_backend_uninit__wav(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_wav* pWav = (ma_wav*)pBackend; (void)pUserData; ma_wav_uninit(pWav, pAllocationCallbacks); ma_free(pWav, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_wav = { ma_decoding_backend_init__wav, ma_decoding_backend_init_file__wav, ma_decoding_backend_init_file_w__wav, ma_decoding_backend_init_memory__wav, ma_decoding_backend_uninit__wav }; static ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_wav, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_wav_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_wav, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_wav_h */ /* FLAC */ #ifdef ma_dr_flac_h #define MA_HAS_FLAC typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32, s16 or s32. */ #if !defined(MA_NO_FLAC) ma_dr_flac* dr; #endif } ma_flac; MA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac); MA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex); MA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor); MA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength); static ma_result ma_flac_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_flac_read_pcm_frames((ma_flac*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_flac_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_flac_seek_to_pcm_frame((ma_flac*)pDataSource, frameIndex); } static ma_result ma_flac_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_flac_get_data_format((ma_flac*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_flac_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_flac_get_cursor_in_pcm_frames((ma_flac*)pDataSource, pCursor); } static ma_result ma_flac_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_flac_get_length_in_pcm_frames((ma_flac*)pDataSource, pLength); } static ma_data_source_vtable g_ma_flac_ds_vtable = { ma_flac_ds_read, ma_flac_ds_seek, ma_flac_ds_get_data_format, ma_flac_ds_get_cursor, ma_flac_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_FLAC) static size_t ma_flac_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_flac* pFlac = (ma_flac*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pFlac != NULL); result = pFlac->onRead(pFlac->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_flac_dr_callback__seek(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_flac* pFlac = (ma_flac*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pFlac != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_flac_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pFlac->onSeek(pFlac->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_flac_init_internal(const ma_decoding_backend_config* pConfig, ma_flac* pFlac) { ma_result result; ma_data_source_config dataSourceConfig; if (pFlac == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pFlac); pFlac->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) { pFlac->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_flac_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pFlac->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } MA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pFlac->onRead = onRead; pFlac->onSeek = onSeek; pFlac->onTell = onTell; pFlac->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open(ma_flac_dr_callback__read, ma_flac_dr_callback__seek, pFlac, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_file(pFilePath, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_file_w(pFilePath, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac) { ma_result result; result = ma_flac_init_internal(pConfig, pFlac); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_FLAC) { pFlac->dr = ma_dr_flac_open_memory(pData, dataSize, pAllocationCallbacks); if (pFlac->dr == NULL) { return MA_INVALID_FILE; } return MA_SUCCESS; } #else { /* flac is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFlac == NULL) { return; } (void)pAllocationCallbacks; #if !defined(MA_NO_FLAC) { ma_dr_flac_close(pFlac->dr); } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pFlac->ds); } MA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_flac_get_data_format(pFlac, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_flac_read_pcm_frames_f32(pFlac->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_flac_read_pcm_frames_s16(pFlac->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_s32: { totalFramesRead = ma_dr_flac_read_pcm_frames_s32(pFlac->dr, frameCount, (ma_int32*)pFramesOut); } break; case ma_format_u8: case ma_format_s24: case ma_format_unknown: default: { return MA_INVALID_OPERATION; }; } /* In the future we'll update ma_dr_flac to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex) { if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { ma_bool32 flacResult; flacResult = ma_dr_flac_seek_to_pcm_frame(pFlac->dr, frameIndex); if (flacResult != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pFlac == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pFlac->format; } #if !defined(MA_NO_FLAC) { if (pChannels != NULL) { *pChannels = pFlac->dr->channels; } if (pSampleRate != NULL) { *pSampleRate = pFlac->dr->sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pFlac->dr->channels); } return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { *pCursor = pFlac->dr->currentPCMFrame; return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pFlac == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_FLAC) { *pLength = pFlac->dr->totalPCMFrameCount; return MA_SUCCESS; } #else { /* flac is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__flac(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__flac(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_file(pFilePath, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__flac(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__flac(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_flac* pFlac; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks); if (pFlac == NULL) { return MA_OUT_OF_MEMORY; } result = ma_flac_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pFlac); if (result != MA_SUCCESS) { ma_free(pFlac, pAllocationCallbacks); return result; } *ppBackend = pFlac; return MA_SUCCESS; } static void ma_decoding_backend_uninit__flac(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_flac* pFlac = (ma_flac*)pBackend; (void)pUserData; ma_flac_uninit(pFlac, pAllocationCallbacks); ma_free(pFlac, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_flac = { ma_decoding_backend_init__flac, ma_decoding_backend_init_file__flac, ma_decoding_backend_init_file_w__flac, ma_decoding_backend_init_memory__flac, ma_decoding_backend_uninit__flac }; static ma_result ma_decoder_init_flac__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_flac, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_flac_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_flac, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_flac_h */ /* MP3 */ #ifdef ma_dr_mp3_h #define MA_HAS_MP3 typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_format format; /* Can be f32 or s16. */ #if !defined(MA_NO_MP3) ma_dr_mp3 dr; ma_uint32 seekPointCount; ma_dr_mp3_seek_point* pSeekPoints; /* Only used if seek table generation is used. */ #endif } ma_mp3; MA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3); MA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex); MA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor); MA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength); static ma_result ma_mp3_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_mp3_read_pcm_frames((ma_mp3*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_mp3_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_mp3_seek_to_pcm_frame((ma_mp3*)pDataSource, frameIndex); } static ma_result ma_mp3_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_mp3_get_data_format((ma_mp3*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_mp3_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_mp3_get_cursor_in_pcm_frames((ma_mp3*)pDataSource, pCursor); } static ma_result ma_mp3_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_mp3_get_length_in_pcm_frames((ma_mp3*)pDataSource, pLength); } static ma_data_source_vtable g_ma_mp3_ds_vtable = { ma_mp3_ds_read, ma_mp3_ds_seek, ma_mp3_ds_get_data_format, ma_mp3_ds_get_cursor, ma_mp3_ds_get_length, NULL, /* onSetLooping */ 0 }; #if !defined(MA_NO_MP3) static size_t ma_mp3_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_mp3* pMP3 = (ma_mp3*)pUserData; ma_result result; size_t bytesRead; MA_ASSERT(pMP3 != NULL); result = pMP3->onRead(pMP3->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead); (void)result; return bytesRead; } static ma_bool32 ma_mp3_dr_callback__seek(void* pUserData, int offset, ma_dr_mp3_seek_origin origin) { ma_mp3* pMP3 = (ma_mp3*)pUserData; ma_result result; ma_seek_origin maSeekOrigin; MA_ASSERT(pMP3 != NULL); maSeekOrigin = ma_seek_origin_start; if (origin == ma_dr_mp3_seek_origin_current) { maSeekOrigin = ma_seek_origin_current; } result = pMP3->onSeek(pMP3->pReadSeekTellUserData, offset, maSeekOrigin); if (result != MA_SUCCESS) { return MA_FALSE; } return MA_TRUE; } #endif static ma_result ma_mp3_init_internal(const ma_decoding_backend_config* pConfig, ma_mp3* pMP3) { ma_result result; ma_data_source_config dataSourceConfig; if (pMP3 == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pMP3); pMP3->format = ma_format_f32; /* f32 by default. */ if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) { pMP3->format = pConfig->preferredFormat; } else { /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */ } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_mp3_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pMP3->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } static ma_result ma_mp3_generate_seek_table(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 mp3Result; ma_uint32 seekPointCount = 0; ma_dr_mp3_seek_point* pSeekPoints = NULL; MA_ASSERT(pMP3 != NULL); MA_ASSERT(pConfig != NULL); seekPointCount = pConfig->seekPointCount; if (seekPointCount > 0) { pSeekPoints = (ma_dr_mp3_seek_point*)ma_malloc(sizeof(*pMP3->pSeekPoints) * seekPointCount, pAllocationCallbacks); if (pSeekPoints == NULL) { return MA_OUT_OF_MEMORY; } } mp3Result = ma_dr_mp3_calculate_seek_points(&pMP3->dr, &seekPointCount, pSeekPoints); if (mp3Result != MA_TRUE) { ma_free(pSeekPoints, pAllocationCallbacks); return MA_ERROR; } mp3Result = ma_dr_mp3_bind_seek_table(&pMP3->dr, seekPointCount, pSeekPoints); if (mp3Result != MA_TRUE) { ma_free(pSeekPoints, pAllocationCallbacks); return MA_ERROR; } pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; return MA_SUCCESS; } static ma_result ma_mp3_post_init(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks) { ma_result result; result = ma_mp3_generate_seek_table(pMP3, pConfig, pAllocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pMP3->onRead = onRead; pMP3->onSeek = onSeek; pMP3->onTell = onTell; pMP3->pReadSeekTellUserData = pReadSeekTellUserData; #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init(&pMP3->dr, ma_mp3_dr_callback__read, ma_mp3_dr_callback__seek, pMP3, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_file(&pMP3->dr, pFilePath, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_file_w(&pMP3->dr, pFilePath, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3) { ma_result result; result = ma_mp3_init_internal(pConfig, pMP3); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_init_memory(&pMP3->dr, pData, dataSize, pAllocationCallbacks); if (mp3Result != MA_TRUE) { return MA_INVALID_FILE; } ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks); return MA_SUCCESS; } #else { /* mp3 is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL) { return; } #if !defined(MA_NO_MP3) { ma_dr_mp3_uninit(&pMP3->dr); } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif /* Seek points need to be freed after the MP3 decoder has been uninitialized to ensure they're no longer being referenced. */ ma_free(pMP3->pSeekPoints, pAllocationCallbacks); ma_data_source_uninit(&pMP3->ds); } MA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_mp3_get_data_format(pMP3, &format, NULL, NULL, NULL, 0); switch (format) { case ma_format_f32: { totalFramesRead = ma_dr_mp3_read_pcm_frames_f32(&pMP3->dr, frameCount, (float*)pFramesOut); } break; case ma_format_s16: { totalFramesRead = ma_dr_mp3_read_pcm_frames_s16(&pMP3->dr, frameCount, (ma_int16*)pFramesOut); } break; case ma_format_u8: case ma_format_s24: case ma_format_s32: case ma_format_unknown: default: { return MA_INVALID_OPERATION; }; } /* In the future we'll update ma_dr_mp3 to return MA_AT_END for us. */ if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex) { if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { ma_bool32 mp3Result; mp3Result = ma_dr_mp3_seek_to_pcm_frame(&pMP3->dr, frameIndex); if (mp3Result != MA_TRUE) { return MA_ERROR; } return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pMP3 == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pMP3->format; } #if !defined(MA_NO_MP3) { if (pChannels != NULL) { *pChannels = pMP3->dr.channels; } if (pSampleRate != NULL) { *pSampleRate = pMP3->dr.sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pMP3->dr.channels); } return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { *pCursor = pMP3->dr.currentPCMFrame; return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pMP3 == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_MP3) { *pLength = ma_dr_mp3_get_pcm_frame_count(&pMP3->dr); return MA_SUCCESS; } #else { /* mp3 is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__mp3(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__mp3(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_file(pFilePath, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file_w__mp3(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__mp3(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_mp3* pMP3; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks); if (pMP3 == NULL) { return MA_OUT_OF_MEMORY; } result = ma_mp3_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pMP3); if (result != MA_SUCCESS) { ma_free(pMP3, pAllocationCallbacks); return result; } *ppBackend = pMP3; return MA_SUCCESS; } static void ma_decoding_backend_uninit__mp3(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_mp3* pMP3 = (ma_mp3*)pBackend; (void)pUserData; ma_mp3_uninit(pMP3, pAllocationCallbacks); ma_free(pMP3, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_mp3 = { ma_decoding_backend_init__mp3, ma_decoding_backend_init_file__mp3, ma_decoding_backend_init_file_w__mp3, ma_decoding_backend_init_memory__mp3, ma_decoding_backend_uninit__mp3 }; static ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_mp3_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* ma_dr_mp3_h */ /* Vorbis */ #ifdef STB_VORBIS_INCLUDE_STB_VORBIS_H #define MA_HAS_VORBIS /* The size in bytes of each chunk of data to read from the Vorbis stream. */ #define MA_VORBIS_DATA_CHUNK_SIZE 4096 typedef struct { ma_data_source_base ds; ma_read_proc onRead; ma_seek_proc onSeek; ma_tell_proc onTell; void* pReadSeekTellUserData; ma_allocation_callbacks allocationCallbacks; /* Store the allocation callbacks within the structure because we may need to dynamically expand a buffer in ma_stbvorbis_read_pcm_frames() when using push mode. */ ma_format format; /* Only f32 is allowed with stb_vorbis. */ ma_uint32 channels; ma_uint32 sampleRate; ma_uint64 cursor; #if !defined(MA_NO_VORBIS) stb_vorbis* stb; ma_bool32 usingPushMode; struct { ma_uint8* pData; size_t dataSize; size_t dataCapacity; size_t audioStartOffsetInBytes; ma_uint32 framesConsumed; /* The number of frames consumed in ppPacketData. */ ma_uint32 framesRemaining; /* The number of frames remaining in ppPacketData. */ float** ppPacketData; } push; #endif } ma_stbvorbis; MA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis); MA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks); MA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead); MA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex); MA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap); MA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor); MA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength); static ma_result ma_stbvorbis_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_stbvorbis_read_pcm_frames((ma_stbvorbis*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_stbvorbis_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_stbvorbis_seek_to_pcm_frame((ma_stbvorbis*)pDataSource, frameIndex); } static ma_result ma_stbvorbis_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_stbvorbis_get_data_format((ma_stbvorbis*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_stbvorbis_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_stbvorbis_get_cursor_in_pcm_frames((ma_stbvorbis*)pDataSource, pCursor); } static ma_result ma_stbvorbis_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_stbvorbis_get_length_in_pcm_frames((ma_stbvorbis*)pDataSource, pLength); } static ma_data_source_vtable g_ma_stbvorbis_ds_vtable = { ma_stbvorbis_ds_read, ma_stbvorbis_ds_seek, ma_stbvorbis_ds_get_data_format, ma_stbvorbis_ds_get_cursor, ma_stbvorbis_ds_get_length, NULL, /* onSetLooping */ 0 }; static ma_result ma_stbvorbis_init_internal(const ma_decoding_backend_config* pConfig, ma_stbvorbis* pVorbis) { ma_result result; ma_data_source_config dataSourceConfig; (void)pConfig; if (pVorbis == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pVorbis); pVorbis->format = ma_format_f32; /* Only supporting f32. */ dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_stbvorbis_ds_vtable; result = ma_data_source_init(&dataSourceConfig, &pVorbis->ds); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base data source. */ } return MA_SUCCESS; } #if !defined(MA_NO_VORBIS) static ma_result ma_stbvorbis_post_init(ma_stbvorbis* pVorbis) { stb_vorbis_info info; MA_ASSERT(pVorbis != NULL); info = stb_vorbis_get_info(pVorbis->stb); pVorbis->channels = info.channels; pVorbis->sampleRate = info.sample_rate; return MA_SUCCESS; } static ma_result ma_stbvorbis_init_internal_decoder_push(ma_stbvorbis* pVorbis) { ma_result result; stb_vorbis* stb; size_t dataSize = 0; size_t dataCapacity = 0; ma_uint8* pData = NULL; /* <-- Must be initialized to NULL. */ for (;;) { int vorbisError; int consumedDataSize; /* <-- Fill by stb_vorbis_open_pushdata(). */ size_t bytesRead; ma_uint8* pNewData; /* Allocate memory for the new chunk. */ dataCapacity += MA_VORBIS_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_realloc(pData, dataCapacity, &pVorbis->allocationCallbacks); if (pNewData == NULL) { ma_free(pData, &pVorbis->allocationCallbacks); return MA_OUT_OF_MEMORY; } pData = pNewData; /* Read in the next chunk. */ result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pData, dataSize), (dataCapacity - dataSize), &bytesRead); dataSize += bytesRead; if (result != MA_SUCCESS) { ma_free(pData, &pVorbis->allocationCallbacks); return result; } /* We have a maximum of 31 bits with stb_vorbis. */ if (dataSize > INT_MAX) { ma_free(pData, &pVorbis->allocationCallbacks); return MA_TOO_BIG; } stb = stb_vorbis_open_pushdata(pData, (int)dataSize, &consumedDataSize, &vorbisError, NULL); if (stb != NULL) { /* Successfully opened the Vorbis decoder. We might have some leftover unprocessed data so we'll need to move that down to the front. */ dataSize -= (size_t)consumedDataSize; /* Consume the data. */ MA_MOVE_MEMORY(pData, ma_offset_ptr(pData, consumedDataSize), dataSize); /* We need to track the start point so we can seek back to the start of the audio data when seeking. */ pVorbis->push.audioStartOffsetInBytes = consumedDataSize; break; } else { /* Failed to open the decoder. */ if (vorbisError == VORBIS_need_more_data) { continue; } else { ma_free(pData, &pVorbis->allocationCallbacks); return MA_ERROR; /* Failed to open the stb_vorbis decoder. */ } } } MA_ASSERT(stb != NULL); pVorbis->stb = stb; pVorbis->push.pData = pData; pVorbis->push.dataSize = dataSize; pVorbis->push.dataCapacity = dataCapacity; return MA_SUCCESS; } #endif MA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } if (onRead == NULL || onSeek == NULL) { return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */ } pVorbis->onRead = onRead; pVorbis->onSeek = onSeek; pVorbis->onTell = onTell; pVorbis->pReadSeekTellUserData = pReadSeekTellUserData; ma_allocation_callbacks_init_copy(&pVorbis->allocationCallbacks, pAllocationCallbacks); #if !defined(MA_NO_VORBIS) { /* stb_vorbis lacks a callback based API for its pulling API which means we're stuck with the pushing API. In order for us to be able to successfully initialize the decoder we need to supply it with enough data. We need to keep loading data until we have enough. */ result = ma_stbvorbis_init_internal_decoder_push(pVorbis); if (result != MA_SUCCESS) { return result; } pVorbis->usingPushMode = MA_TRUE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); ma_free(pVorbis->push.pData, pAllocationCallbacks); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_VORBIS) { (void)pAllocationCallbacks; /* Don't know how to make use of this with stb_vorbis. */ /* We can use stb_vorbis' pull mode for file based streams. */ pVorbis->stb = stb_vorbis_open_filename(pFilePath, NULL, NULL); if (pVorbis->stb == NULL) { return MA_INVALID_FILE; } pVorbis->usingPushMode = MA_FALSE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pFilePath; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis) { ma_result result; result = ma_stbvorbis_init_internal(pConfig, pVorbis); if (result != MA_SUCCESS) { return result; } #if !defined(MA_NO_VORBIS) { (void)pAllocationCallbacks; /* stb_vorbis uses an int as its size specifier, restricting it to 32-bit even on 64-bit systems. *sigh*. */ if (dataSize > INT_MAX) { return MA_TOO_BIG; } pVorbis->stb = stb_vorbis_open_memory((const unsigned char*)pData, (int)dataSize, NULL, NULL); if (pVorbis->stb == NULL) { return MA_INVALID_FILE; } pVorbis->usingPushMode = MA_FALSE; result = ma_stbvorbis_post_init(pVorbis); if (result != MA_SUCCESS) { stb_vorbis_close(pVorbis->stb); return result; } return MA_SUCCESS; } #else { /* vorbis is disabled. */ (void)pData; (void)dataSize; (void)pAllocationCallbacks; return MA_NOT_IMPLEMENTED; } #endif } MA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks) { if (pVorbis == NULL) { return; } #if !defined(MA_NO_VORBIS) { stb_vorbis_close(pVorbis->stb); /* We'll have to clear some memory if we're using push mode. */ if (pVorbis->usingPushMode) { ma_free(pVorbis->push.pData, pAllocationCallbacks); } } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); } #endif ma_data_source_uninit(&pVorbis->ds); } MA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { /* We always use floating point format. */ ma_result result = MA_SUCCESS; /* Must be initialized to MA_SUCCESS. */ ma_uint64 totalFramesRead = 0; ma_format format; ma_uint32 channels; ma_stbvorbis_get_data_format(pVorbis, &format, &channels, NULL, NULL, 0); if (format == ma_format_f32) { /* We read differently depending on whether or not we're using push mode. */ if (pVorbis->usingPushMode) { /* Push mode. This is the complex case. */ float* pFramesOutF32 = (float*)pFramesOut; while (totalFramesRead < frameCount) { /* The first thing to do is read from any already-cached frames. */ ma_uint32 framesToReadFromCache = (ma_uint32)ma_min(pVorbis->push.framesRemaining, (frameCount - totalFramesRead)); /* Safe cast because pVorbis->framesRemaining is 32-bit. */ /* The output pointer can be null in which case we just treat it as a seek. */ if (pFramesOut != NULL) { ma_uint64 iFrame; for (iFrame = 0; iFrame < framesToReadFromCache; iFrame += 1) { ma_uint32 iChannel; for (iChannel = 0; iChannel < pVorbis->channels; iChannel += 1) { pFramesOutF32[iChannel] = pVorbis->push.ppPacketData[iChannel][pVorbis->push.framesConsumed + iFrame]; } pFramesOutF32 += pVorbis->channels; } } /* Update pointers and counters. */ pVorbis->push.framesConsumed += framesToReadFromCache; pVorbis->push.framesRemaining -= framesToReadFromCache; totalFramesRead += framesToReadFromCache; /* Don't bother reading any more frames right now if we've just finished loading. */ if (totalFramesRead == frameCount) { break; } MA_ASSERT(pVorbis->push.framesRemaining == 0); /* Getting here means we've run out of cached frames. We'll need to load some more. */ for (;;) { int samplesRead = 0; int consumedDataSize; /* We need to case dataSize to an int, so make sure we can do it safely. */ if (pVorbis->push.dataSize > INT_MAX) { break; /* Too big. */ } consumedDataSize = stb_vorbis_decode_frame_pushdata(pVorbis->stb, pVorbis->push.pData, (int)pVorbis->push.dataSize, NULL, &pVorbis->push.ppPacketData, &samplesRead); if (consumedDataSize != 0) { /* Successfully decoded a Vorbis frame. Consume the data. */ pVorbis->push.dataSize -= (size_t)consumedDataSize; MA_MOVE_MEMORY(pVorbis->push.pData, ma_offset_ptr(pVorbis->push.pData, consumedDataSize), pVorbis->push.dataSize); pVorbis->push.framesConsumed = 0; pVorbis->push.framesRemaining = samplesRead; break; } else { /* Not enough data. Read more. */ size_t bytesRead; /* Expand the data buffer if necessary. */ if (pVorbis->push.dataCapacity == pVorbis->push.dataSize) { size_t newCap = pVorbis->push.dataCapacity + MA_VORBIS_DATA_CHUNK_SIZE; ma_uint8* pNewData; pNewData = (ma_uint8*)ma_realloc(pVorbis->push.pData, newCap, &pVorbis->allocationCallbacks); if (pNewData == NULL) { result = MA_OUT_OF_MEMORY; break; } pVorbis->push.pData = pNewData; pVorbis->push.dataCapacity = newCap; } /* We should have enough room to load some data. */ result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pVorbis->push.pData, pVorbis->push.dataSize), (pVorbis->push.dataCapacity - pVorbis->push.dataSize), &bytesRead); pVorbis->push.dataSize += bytesRead; if (result != MA_SUCCESS) { break; /* Failed to read any data. Get out. */ } } } /* If we don't have a success code at this point it means we've encountered an error or the end of the file has been reached (probably the latter). */ if (result != MA_SUCCESS) { break; } } } else { /* Pull mode. This is the simple case, but we still need to run in a loop because stb_vorbis loves using 32-bit instead of 64-bit. */ while (totalFramesRead < frameCount) { ma_uint64 framesRemaining = (frameCount - totalFramesRead); int framesRead; if (framesRemaining > INT_MAX) { framesRemaining = INT_MAX; } framesRead = stb_vorbis_get_samples_float_interleaved(pVorbis->stb, channels, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)framesRemaining * channels); /* Safe cast. */ totalFramesRead += framesRead; if (framesRead < (int)framesRemaining) { break; /* Nothing left to read. Get out. */ } } } } else { result = MA_INVALID_ARGS; } pVorbis->cursor += totalFramesRead; if (totalFramesRead == 0) { result = MA_AT_END; } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } if (result == MA_SUCCESS && totalFramesRead == 0) { result = MA_AT_END; } return result; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)pFramesOut; (void)frameCount; (void)pFramesRead; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex) { if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { /* Different seeking methods depending on whether or not we're using push mode. */ if (pVorbis->usingPushMode) { /* Push mode. This is the complex case. */ ma_result result; float buffer[4096]; /* If we're seeking backwards, we need to seek back to the start and then brute-force forward. */ if (frameIndex < pVorbis->cursor) { if (frameIndex > 0x7FFFFFFF) { return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */ } /* This is wildly inefficient due to me having trouble getting sample exact seeking working robustly with stb_vorbis_flush_pushdata(). The only way I can think to make this work perfectly is to reinitialize the decoder. Note that we only enter this path when seeking backwards. This will hopefully be removed once we get our own Vorbis decoder implemented. */ stb_vorbis_close(pVorbis->stb); ma_free(pVorbis->push.pData, &pVorbis->allocationCallbacks); MA_ZERO_OBJECT(&pVorbis->push); /* Seek to the start of the file. */ result = pVorbis->onSeek(pVorbis->pReadSeekTellUserData, 0, ma_seek_origin_start); if (result != MA_SUCCESS) { return result; } result = ma_stbvorbis_init_internal_decoder_push(pVorbis); if (result != MA_SUCCESS) { return result; } /* At this point we should be sitting on the first frame. */ pVorbis->cursor = 0; } /* We're just brute-forcing this for now. */ while (pVorbis->cursor < frameIndex) { ma_uint64 framesRead; ma_uint64 framesToRead = ma_countof(buffer)/pVorbis->channels; if (framesToRead > (frameIndex - pVorbis->cursor)) { framesToRead = (frameIndex - pVorbis->cursor); } result = ma_stbvorbis_read_pcm_frames(pVorbis, buffer, framesToRead, &framesRead); if (result != MA_SUCCESS) { return result; } } } else { /* Pull mode. This is the simple case. */ int vorbisResult; if (frameIndex > UINT_MAX) { return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */ } vorbisResult = stb_vorbis_seek(pVorbis->stb, (unsigned int)frameIndex); /* Safe cast. */ if (vorbisResult == 0) { return MA_ERROR; /* See failed. */ } pVorbis->cursor = frameIndex; } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); (void)frameIndex; return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* Defaults for safety. */ if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pVorbis == NULL) { return MA_INVALID_OPERATION; } if (pFormat != NULL) { *pFormat = pVorbis->format; } #if !defined(MA_NO_VORBIS) { if (pChannels != NULL) { *pChannels = pVorbis->channels; } if (pSampleRate != NULL) { *pSampleRate = pVorbis->sampleRate; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, pVorbis->channels); } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { *pCursor = pVorbis->cursor; return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } MA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; /* Safety. */ if (pVorbis == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_VORBIS) { if (pVorbis->usingPushMode) { *pLength = 0; /* I don't know of a good way to determine this reliably with stb_vorbis and push mode. */ } else { *pLength = stb_vorbis_stream_length_in_samples(pVorbis->stb); } return MA_SUCCESS; } #else { /* vorbis is disabled. Should never hit this since initialization would have failed. */ MA_ASSERT(MA_FALSE); return MA_NOT_IMPLEMENTED; } #endif } static ma_result ma_decoding_backend_init__stbvorbis(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_file__stbvorbis(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init_file(pFilePath, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static ma_result ma_decoding_backend_init_memory__stbvorbis(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend) { ma_result result; ma_stbvorbis* pVorbis; (void)pUserData; /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */ /* For now we're just allocating the decoder backend on the heap. */ pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks); if (pVorbis == NULL) { return MA_OUT_OF_MEMORY; } result = ma_stbvorbis_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pVorbis); if (result != MA_SUCCESS) { ma_free(pVorbis, pAllocationCallbacks); return result; } *ppBackend = pVorbis; return MA_SUCCESS; } static void ma_decoding_backend_uninit__stbvorbis(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks) { ma_stbvorbis* pVorbis = (ma_stbvorbis*)pBackend; (void)pUserData; ma_stbvorbis_uninit(pVorbis, pAllocationCallbacks); ma_free(pVorbis, pAllocationCallbacks); } static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_stbvorbis = { ma_decoding_backend_init__stbvorbis, ma_decoding_backend_init_file__stbvorbis, NULL, /* onInitFileW() */ ma_decoding_backend_init_memory__stbvorbis, ma_decoding_backend_uninit__stbvorbis }; static ma_result ma_decoder_init_vorbis__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder); } static ma_result ma_decoder_init_vorbis_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pData, dataSize, pConfig, pDecoder); } #endif /* STB_VORBIS_INCLUDE_STB_VORBIS_H */ static ma_result ma_decoder__init_allocation_callbacks(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { MA_ASSERT(pDecoder != NULL); if (pConfig != NULL) { return ma_allocation_callbacks_init_copy(&pDecoder->allocationCallbacks, &pConfig->allocationCallbacks); } else { pDecoder->allocationCallbacks = ma_allocation_callbacks_init_default(); return MA_SUCCESS; } } static ma_result ma_decoder__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_decoder_read_pcm_frames((ma_decoder*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_decoder__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_decoder_seek_to_pcm_frame((ma_decoder*)pDataSource, frameIndex); } static ma_result ma_decoder__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_decoder_get_data_format((ma_decoder*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_decoder__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_decoder_get_cursor_in_pcm_frames((ma_decoder*)pDataSource, pCursor); } static ma_result ma_decoder__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_decoder_get_length_in_pcm_frames((ma_decoder*)pDataSource, pLength); } static ma_data_source_vtable g_ma_decoder_data_source_vtable = { ma_decoder__data_source_on_read, ma_decoder__data_source_on_seek, ma_decoder__data_source_on_get_data_format, ma_decoder__data_source_on_get_cursor, ma_decoder__data_source_on_get_length, NULL, /* onSetLooping */ 0 }; static ma_result ma_decoder__preinit(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, ma_decoder_tell_proc onTell, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_data_source_config dataSourceConfig; MA_ASSERT(pConfig != NULL); if (pDecoder == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDecoder); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pDecoder->ds); if (result != MA_SUCCESS) { return result; } pDecoder->onRead = onRead; pDecoder->onSeek = onSeek; pDecoder->onTell = onTell; pDecoder->pUserData = pUserData; result = ma_decoder__init_allocation_callbacks(pConfig, pDecoder); if (result != MA_SUCCESS) { ma_data_source_uninit(&pDecoder->ds); return result; } return MA_SUCCESS; } static ma_result ma_decoder__postinit(const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__init_data_converter(pDecoder, pConfig); /* If we failed post initialization we need to uninitialize the decoder before returning to prevent a memory leak. */ if (result != MA_SUCCESS) { ma_decoder_uninit(pDecoder); return result; } return result; } static ma_result ma_decoder_init__internal(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = MA_NO_BACKEND; MA_ASSERT(pConfig != NULL); MA_ASSERT(pDecoder != NULL); /* Silence some warnings in the case that we don't have any decoder backends enabled. */ (void)onRead; (void)onSeek; (void)pUserData; /* If we've specified a specific encoding type, try that first. */ if (pConfig->encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (pConfig->encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_FLAC if (pConfig->encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_MP3 if (pConfig->encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(pConfig, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (pConfig->encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(pConfig, pDecoder); } #endif /* If we weren't able to initialize the decoder, seek back to the start to give the next attempts a clean start. */ if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we couldn't load a specific decoding backend based on the encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (pConfig->encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis__internal(pConfig, pDecoder); if (result != MA_SUCCESS) { onSeek(pDecoder, 0, ma_seek_origin_start); } } #endif } if (result != MA_SUCCESS) { return result; } return ma_decoder__postinit(pConfig, pDecoder); } MA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_decoder_config config; ma_result result; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit(onRead, onSeek, NULL, pUserData, &config, pDecoder); if (result != MA_SUCCESS) { return result; } return ma_decoder_init__internal(onRead, onSeek, pUserData, &config, pDecoder); } static ma_result ma_decoder__on_read_memory(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { size_t bytesRemaining; MA_ASSERT(pDecoder->data.memory.dataSize >= pDecoder->data.memory.currentReadPos); if (pBytesRead != NULL) { *pBytesRead = 0; } bytesRemaining = pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesRemaining == 0) { return MA_AT_END; } if (bytesToRead > 0) { MA_COPY_MEMORY(pBufferOut, pDecoder->data.memory.pData + pDecoder->data.memory.currentReadPos, bytesToRead); pDecoder->data.memory.currentReadPos += bytesToRead; } if (pBytesRead != NULL) { *pBytesRead = bytesToRead; } return MA_SUCCESS; } static ma_result ma_decoder__on_seek_memory(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin) { if (byteOffset > 0 && (ma_uint64)byteOffset > MA_SIZE_MAX) { return MA_BAD_SEEK; } if (origin == ma_seek_origin_current) { if (byteOffset > 0) { if (pDecoder->data.memory.currentReadPos + byteOffset > pDecoder->data.memory.dataSize) { byteOffset = (ma_int64)(pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos); /* Trying to seek too far forward. */ } pDecoder->data.memory.currentReadPos += (size_t)byteOffset; } else { if (pDecoder->data.memory.currentReadPos < (size_t)-byteOffset) { byteOffset = -(ma_int64)pDecoder->data.memory.currentReadPos; /* Trying to seek too far backwards. */ } pDecoder->data.memory.currentReadPos -= (size_t)-byteOffset; } } else { if (origin == ma_seek_origin_end) { if (byteOffset < 0) { byteOffset = -byteOffset; } if (byteOffset > (ma_int64)pDecoder->data.memory.dataSize) { pDecoder->data.memory.currentReadPos = 0; /* Trying to seek too far back. */ } else { pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize - (size_t)byteOffset; } } else { if ((size_t)byteOffset <= pDecoder->data.memory.dataSize) { pDecoder->data.memory.currentReadPos = (size_t)byteOffset; } else { pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize; /* Trying to seek too far forward. */ } } } return MA_SUCCESS; } static ma_result ma_decoder__on_tell_memory(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); MA_ASSERT(pCursor != NULL); *pCursor = (ma_int64)pDecoder->data.memory.currentReadPos; return MA_SUCCESS; } static ma_result ma_decoder__preinit_memory_wrapper(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result = ma_decoder__preinit(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, ma_decoder__on_tell_memory, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } pDecoder->data.memory.pData = (const ma_uint8*)pData; pDecoder->data.memory.dataSize = dataSize; pDecoder->data.memory.currentReadPos = 0; (void)pConfig; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit(NULL, NULL, NULL, NULL, &config, pDecoder); if (result != MA_SUCCESS) { return result; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_memory__internal(pData, dataSize, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* Use trial and error for stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a block of memory. Use miniaudio's abstraction instead. */ result = ma_decoder__preinit_memory_wrapper(pData, dataSize, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = ma_decoder_init__internal(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, NULL, &config, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } #if defined(MA_HAS_WAV) || \ defined(MA_HAS_MP3) || \ defined(MA_HAS_FLAC) || \ defined(MA_HAS_VORBIS) #define MA_HAS_PATH_API #endif #if defined(MA_HAS_PATH_API) static const char* ma_path_file_name(const char* path) { const char* fileName; if (path == NULL) { return NULL; } fileName = path; /* We just loop through the path until we find the last slash. */ while (path[0] != '\0') { if (path[0] == '/' || path[0] == '\\') { fileName = path; } path += 1; } /* At this point the file name is sitting on a slash, so just move forward. */ while (fileName[0] != '\0' && (fileName[0] == '/' || fileName[0] == '\\')) { fileName += 1; } return fileName; } static const wchar_t* ma_path_file_name_w(const wchar_t* path) { const wchar_t* fileName; if (path == NULL) { return NULL; } fileName = path; /* We just loop through the path until we find the last slash. */ while (path[0] != '\0') { if (path[0] == '/' || path[0] == '\\') { fileName = path; } path += 1; } /* At this point the file name is sitting on a slash, so just move forward. */ while (fileName[0] != '\0' && (fileName[0] == '/' || fileName[0] == '\\')) { fileName += 1; } return fileName; } static const char* ma_path_extension(const char* path) { const char* extension; const char* lastOccurance; if (path == NULL) { path = ""; } extension = ma_path_file_name(path); lastOccurance = NULL; /* Just find the last '.' and return. */ while (extension[0] != '\0') { if (extension[0] == '.') { extension += 1; lastOccurance = extension; } extension += 1; } return (lastOccurance != NULL) ? lastOccurance : extension; } static const wchar_t* ma_path_extension_w(const wchar_t* path) { const wchar_t* extension; const wchar_t* lastOccurance; if (path == NULL) { path = L""; } extension = ma_path_file_name_w(path); lastOccurance = NULL; /* Just find the last '.' and return. */ while (extension[0] != '\0') { if (extension[0] == '.') { extension += 1; lastOccurance = extension; } extension += 1; } return (lastOccurance != NULL) ? lastOccurance : extension; } static ma_bool32 ma_path_extension_equal(const char* path, const char* extension) { const char* ext1; const char* ext2; if (path == NULL || extension == NULL) { return MA_FALSE; } ext1 = extension; ext2 = ma_path_extension(path); #if defined(_MSC_VER) || defined(__DMC__) return _stricmp(ext1, ext2) == 0; #else return strcasecmp(ext1, ext2) == 0; #endif } static ma_bool32 ma_path_extension_equal_w(const wchar_t* path, const wchar_t* extension) { const wchar_t* ext1; const wchar_t* ext2; if (path == NULL || extension == NULL) { return MA_FALSE; } ext1 = extension; ext2 = ma_path_extension_w(path); #if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__) return _wcsicmp(ext1, ext2) == 0; #else /* I'm not aware of a wide character version of strcasecmp(). I'm therefore converting the extensions to multibyte strings and comparing those. This isn't the most efficient way to do it, but it should work OK. */ { char ext1MB[4096]; char ext2MB[4096]; const wchar_t* pext1 = ext1; const wchar_t* pext2 = ext2; mbstate_t mbs1; mbstate_t mbs2; MA_ZERO_OBJECT(&mbs1); MA_ZERO_OBJECT(&mbs2); if (wcsrtombs(ext1MB, &pext1, sizeof(ext1MB), &mbs1) == (size_t)-1) { return MA_FALSE; } if (wcsrtombs(ext2MB, &pext2, sizeof(ext2MB), &mbs2) == (size_t)-1) { return MA_FALSE; } return strcasecmp(ext1MB, ext2MB) == 0; } #endif } #endif /* MA_HAS_PATH_API */ static ma_result ma_decoder__on_read_vfs(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead) { MA_ASSERT(pDecoder != NULL); MA_ASSERT(pBufferOut != NULL); return ma_vfs_or_default_read(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pBufferOut, bytesToRead, pBytesRead); } static ma_result ma_decoder__on_seek_vfs(ma_decoder* pDecoder, ma_int64 offset, ma_seek_origin origin) { MA_ASSERT(pDecoder != NULL); return ma_vfs_or_default_seek(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, offset, origin); } static ma_result ma_decoder__on_tell_vfs(ma_decoder* pDecoder, ma_int64* pCursor) { MA_ASSERT(pDecoder != NULL); return ma_vfs_or_default_tell(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pCursor); } static ma_result ma_decoder__preinit_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_vfs_file file; result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); if (result != MA_SUCCESS) { return result; } pDecoder->data.vfs.pVFS = pVFS; pDecoder->data.vfs.file = file; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_vfs(pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(&config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(&config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(&config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(&config, pDecoder); } #endif /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */ if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "wav")) { result = ma_decoder_init_wav__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "flac")) { result = ma_decoder_init_flac__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "mp3")) { result = ma_decoder_init_mp3__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif } /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */ if (result != MA_SUCCESS) { result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder); } else { result = ma_decoder__postinit(&config, pDecoder); } if (result != MA_SUCCESS) { if (pDecoder->data.vfs.file != NULL) { /* <-- Will be reset to NULL if ma_decoder_uninit() is called in one of the steps above which allows us to avoid a double close of the file. */ ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file); } return result; } return MA_SUCCESS; } static ma_result ma_decoder__preinit_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_vfs_file file; result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_READ, &file); if (result != MA_SUCCESS) { return result; } pDecoder->data.vfs.pVFS = pVFS; pDecoder->data.vfs.file = file; return MA_SUCCESS; } MA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_vfs_w(pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav__internal(&config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac__internal(&config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3__internal(&config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis__internal(&config, pDecoder); } #endif /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */ if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ if (result != MA_SUCCESS) { result = ma_decoder_init_custom__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"wav")) { result = ma_decoder_init_wav__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"flac")) { result = ma_decoder_init_flac__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"mp3")) { result = ma_decoder_init_mp3__internal(&config, pDecoder); if (result != MA_SUCCESS) { ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); } } #endif } /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */ if (result != MA_SUCCESS) { result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder); } else { result = ma_decoder__postinit(&config, pDecoder); } if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file); return result; } return MA_SUCCESS; } static ma_result ma_decoder__preinit_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_file(pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_file__internal(pFilePath, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* First try loading based on the file extension so we don't waste time opening and closing files. */ #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "wav")) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "flac")) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "mp3")) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, "ogg")) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif /* If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we need only iterate over our stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } static ma_result ma_decoder__preinit_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } if (pFilePath == NULL || pFilePath[0] == '\0') { return MA_INVALID_ARGS; } return MA_SUCCESS; } MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; config = ma_decoder_config_init_copy(pConfig); result = ma_decoder__preinit_file_w(pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { return result; } /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */ result = MA_NO_BACKEND; if (config.encodingFormat != ma_encoding_format_unknown) { #ifdef MA_HAS_WAV if (config.encodingFormat == ma_encoding_format_wav) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (config.encodingFormat == ma_encoding_format_flac) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (config.encodingFormat == ma_encoding_format_mp3) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (config.encodingFormat == ma_encoding_format_vorbis) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif } if (result != MA_SUCCESS) { /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */ /* We use trial and error to open a decoder. We prioritize custom decoders so that if they implement the same encoding format they take priority over the built-in decoders. */ result = ma_decoder_init_custom_from_file_w__internal(pFilePath, &config, pDecoder); /* If we get to this point and we still haven't found a decoder, and the caller has requested a specific encoding format, there's no hope for it. Abort. */ if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) { return MA_NO_BACKEND; } /* First try loading based on the file extension so we don't waste time opening and closing files. */ #ifdef MA_HAS_WAV if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"wav")) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"flac")) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"mp3")) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L"ogg")) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif /* If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we need only iterate over our stock decoders. */ if (result != MA_SUCCESS) { #ifdef MA_HAS_WAV if (result != MA_SUCCESS) { result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_FLAC if (result != MA_SUCCESS) { result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_MP3 if (result != MA_SUCCESS) { result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder); } #endif #ifdef MA_HAS_VORBIS if (result != MA_SUCCESS) { result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder); } #endif } } /* If at this point we still haven't successfully initialized the decoder it most likely means the backend doesn't have an implementation for loading from a file path. We'll try using miniaudio's built-in file IO for loading file. */ if (result == MA_SUCCESS) { /* Initialization was successful. Finish up. */ result = ma_decoder__postinit(&config, pDecoder); if (result != MA_SUCCESS) { /* The backend was initialized successfully, but for some reason post-initialization failed. This is most likely due to an out of memory error. We're going to abort with an error here and not try to recover. */ if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks); } return result; } } else { /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs_w(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { return result; } } return MA_SUCCESS; } MA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) { pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks); } } if (pDecoder->onRead == ma_decoder__on_read_vfs) { ma_vfs_or_default_close(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file); pDecoder->data.vfs.file = NULL; } ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks); ma_data_source_uninit(&pDecoder->ds); if (pDecoder->pInputCache != NULL) { ma_free(pDecoder->pInputCache, &pDecoder->allocationCallbacks); } return MA_SUCCESS; } MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesReadOut; void* pRunningFramesOut; if (pFramesRead != NULL) { *pFramesRead = 0; /* Safety. */ } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend == NULL) { return MA_INVALID_OPERATION; } /* Fast path. */ if (pDecoder->converter.isPassthrough) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pFramesOut, frameCount, &totalFramesReadOut); } else { /* Getting here means we need to do data conversion. If we're seeking forward and are _not_ doing resampling we can run this in a fast path. If we're doing resampling we need to run through each sample because we need to ensure its internal cache is updated. */ if (pFramesOut == NULL && pDecoder->converter.hasResampler == MA_FALSE) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, NULL, frameCount, &totalFramesReadOut); } else { /* Slow path. Need to run everything through the data converter. */ ma_format internalFormat; ma_uint32 internalChannels; totalFramesReadOut = 0; pRunningFramesOut = pFramesOut; result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, NULL, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal format and channel count. */ } /* We run a different path depending on whether or not we are using a heap-allocated intermediary buffer or not. If the data converter does not support the calculation of the required number of input frames, we'll use the heap-allocated path. Otherwise we'll use the stack-allocated path. */ if (pDecoder->pInputCache != NULL) { /* We don't have a way of determining the required number of input frames, so need to persistently store input data in a cache. */ while (totalFramesReadOut < frameCount) { ma_uint64 framesToReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; /* If there's any data available in the cache, that needs to get processed first. */ if (pDecoder->inputCacheRemaining > 0) { framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > pDecoder->inputCacheRemaining) { framesToReadThisIterationIn = pDecoder->inputCacheRemaining; } result = ma_data_converter_process_pcm_frames(&pDecoder->converter, ma_offset_pcm_frames_ptr(pDecoder->pInputCache, pDecoder->inputCacheConsumed, internalFormat, internalChannels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut); if (result != MA_SUCCESS) { break; } pDecoder->inputCacheConsumed += framesToReadThisIterationIn; pDecoder->inputCacheRemaining -= framesToReadThisIterationIn; totalFramesReadOut += framesToReadThisIterationOut; if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels)); } if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) { break; /* We're done. */ } } /* Getting here means there's no data in the cache and we need to fill it up from the data source. */ if (pDecoder->inputCacheRemaining == 0) { pDecoder->inputCacheConsumed = 0; result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pDecoder->pInputCache, pDecoder->inputCacheCap, &pDecoder->inputCacheRemaining); if (result != MA_SUCCESS) { break; } } } } else { /* We have a way of determining the required number of input frames so just use the stack. */ while (totalFramesReadOut < frameCount) { ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* In internal format. */ ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(internalFormat, internalChannels); ma_uint64 framesToReadThisIterationIn; ma_uint64 framesReadThisIterationIn; ma_uint64 framesToReadThisIterationOut; ma_uint64 framesReadThisIterationOut; ma_uint64 requiredInputFrameCount; framesToReadThisIterationOut = (frameCount - totalFramesReadOut); framesToReadThisIterationIn = framesToReadThisIterationOut; if (framesToReadThisIterationIn > intermediaryBufferCap) { framesToReadThisIterationIn = intermediaryBufferCap; } ma_data_converter_get_required_input_frame_count(&pDecoder->converter, framesToReadThisIterationOut, &requiredInputFrameCount); if (framesToReadThisIterationIn > requiredInputFrameCount) { framesToReadThisIterationIn = requiredInputFrameCount; } if (requiredInputFrameCount > 0) { result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pIntermediaryBuffer, framesToReadThisIterationIn, &framesReadThisIterationIn); /* Note here that even if we've reached the end, we don't want to abort because there might be more output frames needing to be generated from cached input data, which might happen if resampling is being performed. */ if (result != MA_SUCCESS && result != MA_AT_END) { break; } } else { framesReadThisIterationIn = 0; pIntermediaryBuffer[0] = 0; /* <-- This is just to silence a static analysis warning. */ } /* At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any input frames, we still want to try processing frames because there may some output frames generated from cached input data. */ framesReadThisIterationOut = framesToReadThisIterationOut; result = ma_data_converter_process_pcm_frames(&pDecoder->converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut); if (result != MA_SUCCESS) { break; } totalFramesReadOut += framesReadThisIterationOut; if (pRunningFramesOut != NULL) { pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels)); } if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) { break; /* We're done. */ } } } } } pDecoder->readPointerInPCMFrames += totalFramesReadOut; if (pFramesRead != NULL) { *pFramesRead = totalFramesReadOut; } if (result == MA_SUCCESS && totalFramesReadOut == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { ma_result result; ma_uint64 internalFrameIndex; ma_uint32 internalSampleRate; ma_uint64 currentFrameIndex; result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal sample rate. */ } if (internalSampleRate == pDecoder->outputSampleRate) { internalFrameIndex = frameIndex; } else { internalFrameIndex = ma_calculate_frame_count_after_resampling(internalSampleRate, pDecoder->outputSampleRate, frameIndex); } /* Only seek if we're requesting a different frame to what we're currently sitting on. */ ma_data_source_get_cursor_in_pcm_frames(pDecoder->pBackend, ¤tFrameIndex); if (currentFrameIndex != internalFrameIndex) { result = ma_data_source_seek_to_pcm_frame(pDecoder->pBackend, internalFrameIndex); if (result == MA_SUCCESS) { pDecoder->readPointerInPCMFrames = frameIndex; } /* Reset the data converter so that any cached data in the resampler is cleared. */ ma_data_converter_reset(&pDecoder->converter); } return result; } /* Should never get here, but if we do it means onSeekToPCMFrame was not set by the backend. */ return MA_INVALID_ARGS; } MA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pFormat != NULL) { *pFormat = pDecoder->outputFormat; } if (pChannels != NULL) { *pChannels = pDecoder->outputChannels; } if (pSampleRate != NULL) { *pSampleRate = pDecoder->outputSampleRate; } if (pChannelMap != NULL) { ma_data_converter_get_output_channel_map(&pDecoder->converter, pChannelMap, channelMapCap); } return MA_SUCCESS; } MA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } *pCursor = pDecoder->readPointerInPCMFrames; return MA_SUCCESS; } MA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } if (pDecoder->pBackend != NULL) { ma_result result; ma_uint64 internalLengthInPCMFrames; ma_uint32 internalSampleRate; result = ma_data_source_get_length_in_pcm_frames(pDecoder->pBackend, &internalLengthInPCMFrames); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal length. */ } result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the internal sample rate. */ } if (internalSampleRate == pDecoder->outputSampleRate) { *pLength = internalLengthInPCMFrames; } else { *pLength = ma_calculate_frame_count_after_resampling(pDecoder->outputSampleRate, internalSampleRate, internalLengthInPCMFrames); } return MA_SUCCESS; } else { return MA_NO_BACKEND; } } MA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames) { ma_result result; ma_uint64 totalFrameCount; if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDecoder == NULL) { return MA_INVALID_ARGS; } result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount); if (result != MA_SUCCESS) { return result; } if (totalFrameCount <= pDecoder->readPointerInPCMFrames) { *pAvailableFrames = 0; } else { *pAvailableFrames = totalFrameCount - pDecoder->readPointerInPCMFrames; } return MA_SUCCESS; } static ma_result ma_decoder__full_decode_and_uninit(ma_decoder* pDecoder, ma_decoder_config* pConfigOut, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_result result; ma_uint64 totalFrameCount; ma_uint64 bpf; ma_uint64 dataCapInFrames; void* pPCMFramesOut; MA_ASSERT(pDecoder != NULL); totalFrameCount = 0; bpf = ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels); /* The frame count is unknown until we try reading. Thus, we just run in a loop. */ dataCapInFrames = 0; pPCMFramesOut = NULL; for (;;) { ma_uint64 frameCountToTryReading; ma_uint64 framesJustRead; /* Make room if there's not enough. */ if (totalFrameCount == dataCapInFrames) { void* pNewPCMFramesOut; ma_uint64 newDataCapInFrames = dataCapInFrames*2; if (newDataCapInFrames == 0) { newDataCapInFrames = 4096; } if ((newDataCapInFrames * bpf) > MA_SIZE_MAX) { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); return MA_TOO_BIG; } pNewPCMFramesOut = (void*)ma_realloc(pPCMFramesOut, (size_t)(newDataCapInFrames * bpf), &pDecoder->allocationCallbacks); if (pNewPCMFramesOut == NULL) { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); return MA_OUT_OF_MEMORY; } dataCapInFrames = newDataCapInFrames; pPCMFramesOut = pNewPCMFramesOut; } frameCountToTryReading = dataCapInFrames - totalFrameCount; MA_ASSERT(frameCountToTryReading > 0); result = ma_decoder_read_pcm_frames(pDecoder, (ma_uint8*)pPCMFramesOut + (totalFrameCount * bpf), frameCountToTryReading, &framesJustRead); totalFrameCount += framesJustRead; if (result != MA_SUCCESS) { break; } if (framesJustRead < frameCountToTryReading) { break; } } if (pConfigOut != NULL) { pConfigOut->format = pDecoder->outputFormat; pConfigOut->channels = pDecoder->outputChannels; pConfigOut->sampleRate = pDecoder->outputSampleRate; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = pPCMFramesOut; } else { ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks); } if (pFrameCountOut != NULL) { *pFrameCountOut = totalFrameCount; } ma_decoder_uninit(pDecoder); return MA_SUCCESS; } MA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_result result; ma_decoder_config config; ma_decoder decoder; if (pFrameCountOut != NULL) { *pFrameCountOut = 0; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = NULL; } config = ma_decoder_config_init_copy(pConfig); result = ma_decoder_init_vfs(pVFS, pFilePath, &config, &decoder); if (result != MA_SUCCESS) { return result; } result = ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut); return result; } MA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { return ma_decode_from_vfs(NULL, pFilePath, pConfig, pFrameCountOut, ppPCMFramesOut); } MA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut) { ma_decoder_config config; ma_decoder decoder; ma_result result; if (pFrameCountOut != NULL) { *pFrameCountOut = 0; } if (ppPCMFramesOut != NULL) { *ppPCMFramesOut = NULL; } if (pData == NULL || dataSize == 0) { return MA_INVALID_ARGS; } config = ma_decoder_config_init_copy(pConfig); result = ma_decoder_init_memory(pData, dataSize, &config, &decoder); if (result != MA_SUCCESS) { return result; } return ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut); } #endif /* MA_NO_DECODING */ #ifndef MA_NO_ENCODING #if defined(MA_HAS_WAV) static size_t ma_encoder__internal_on_write_wav(void* pUserData, const void* pData, size_t bytesToWrite) { ma_encoder* pEncoder = (ma_encoder*)pUserData; size_t bytesWritten = 0; MA_ASSERT(pEncoder != NULL); pEncoder->onWrite(pEncoder, pData, bytesToWrite, &bytesWritten); return bytesWritten; } static ma_bool32 ma_encoder__internal_on_seek_wav(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_encoder* pEncoder = (ma_encoder*)pUserData; ma_result result; MA_ASSERT(pEncoder != NULL); result = pEncoder->onSeek(pEncoder, offset, (origin == ma_dr_wav_seek_origin_start) ? ma_seek_origin_start : ma_seek_origin_current); if (result != MA_SUCCESS) { return MA_FALSE; } else { return MA_TRUE; } } static ma_result ma_encoder__on_init_wav(ma_encoder* pEncoder) { ma_dr_wav_data_format wavFormat; ma_allocation_callbacks allocationCallbacks; ma_dr_wav* pWav; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)ma_malloc(sizeof(*pWav), &pEncoder->config.allocationCallbacks); if (pWav == NULL) { return MA_OUT_OF_MEMORY; } wavFormat.container = ma_dr_wav_container_riff; wavFormat.channels = pEncoder->config.channels; wavFormat.sampleRate = pEncoder->config.sampleRate; wavFormat.bitsPerSample = ma_get_bytes_per_sample(pEncoder->config.format) * 8; if (pEncoder->config.format == ma_format_f32) { wavFormat.format = MA_DR_WAVE_FORMAT_IEEE_FLOAT; } else { wavFormat.format = MA_DR_WAVE_FORMAT_PCM; } allocationCallbacks.pUserData = pEncoder->config.allocationCallbacks.pUserData; allocationCallbacks.onMalloc = pEncoder->config.allocationCallbacks.onMalloc; allocationCallbacks.onRealloc = pEncoder->config.allocationCallbacks.onRealloc; allocationCallbacks.onFree = pEncoder->config.allocationCallbacks.onFree; if (!ma_dr_wav_init_write(pWav, &wavFormat, ma_encoder__internal_on_write_wav, ma_encoder__internal_on_seek_wav, pEncoder, &allocationCallbacks)) { return MA_ERROR; } pEncoder->pInternalEncoder = pWav; return MA_SUCCESS; } static void ma_encoder__on_uninit_wav(ma_encoder* pEncoder) { ma_dr_wav* pWav; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)pEncoder->pInternalEncoder; MA_ASSERT(pWav != NULL); ma_dr_wav_uninit(pWav); ma_free(pWav, &pEncoder->config.allocationCallbacks); } static ma_result ma_encoder__on_write_pcm_frames_wav(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten) { ma_dr_wav* pWav; ma_uint64 framesWritten; MA_ASSERT(pEncoder != NULL); pWav = (ma_dr_wav*)pEncoder->pInternalEncoder; MA_ASSERT(pWav != NULL); framesWritten = ma_dr_wav_write_pcm_frames(pWav, frameCount, pFramesIn); if (pFramesWritten != NULL) { *pFramesWritten = framesWritten; } return MA_SUCCESS; } #endif MA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_encoder_config config; MA_ZERO_OBJECT(&config); config.encodingFormat = encodingFormat; config.format = format; config.channels = channels; config.sampleRate = sampleRate; return config; } MA_API ma_result ma_encoder_preinit(const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; if (pEncoder == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEncoder); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->format == ma_format_unknown || pConfig->channels == 0 || pConfig->sampleRate == 0) { return MA_INVALID_ARGS; } pEncoder->config = *pConfig; result = ma_allocation_callbacks_init_copy(&pEncoder->config.allocationCallbacks, &pConfig->allocationCallbacks); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init__internal(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, ma_encoder* pEncoder) { ma_result result = MA_SUCCESS; /* This assumes ma_encoder_preinit() has been called prior. */ MA_ASSERT(pEncoder != NULL); if (onWrite == NULL || onSeek == NULL) { return MA_INVALID_ARGS; } pEncoder->onWrite = onWrite; pEncoder->onSeek = onSeek; pEncoder->pUserData = pUserData; switch (pEncoder->config.encodingFormat) { case ma_encoding_format_wav: { #if defined(MA_HAS_WAV) pEncoder->onInit = ma_encoder__on_init_wav; pEncoder->onUninit = ma_encoder__on_uninit_wav; pEncoder->onWritePCMFrames = ma_encoder__on_write_pcm_frames_wav; #else result = MA_NO_BACKEND; #endif } break; default: { result = MA_INVALID_ARGS; } break; } /* Getting here means we should have our backend callbacks set up. */ if (result == MA_SUCCESS) { result = pEncoder->onInit(pEncoder); } return result; } static ma_result ma_encoder__on_write_vfs(ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten) { return ma_vfs_or_default_write(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, pBufferIn, bytesToWrite, pBytesWritten); } static ma_result ma_encoder__on_seek_vfs(ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin) { return ma_vfs_or_default_seek(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, offset, origin); } MA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; ma_vfs_file file; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } /* Now open the file. If this fails we don't need to uninitialize the encoder. */ result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file); if (result != MA_SUCCESS) { return result; } pEncoder->data.vfs.pVFS = pVFS; pEncoder->data.vfs.file = file; result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; ma_vfs_file file; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } /* Now open the file. If this fails we don't need to uninitialize the encoder. */ result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file); if (result != MA_SUCCESS) { return result; } pEncoder->data.vfs.pVFS = pVFS; pEncoder->data.vfs.file = file; result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder); if (result != MA_SUCCESS) { ma_vfs_or_default_close(pVFS, file); return result; } return MA_SUCCESS; } MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { return ma_encoder_init_vfs(NULL, pFilePath, pConfig, pEncoder); } MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { return ma_encoder_init_vfs_w(NULL, pFilePath, pConfig, pEncoder); } MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder) { ma_result result; result = ma_encoder_preinit(pConfig, pEncoder); if (result != MA_SUCCESS) { return result; } return ma_encoder_init__internal(onWrite, onSeek, pUserData, pEncoder); } MA_API void ma_encoder_uninit(ma_encoder* pEncoder) { if (pEncoder == NULL) { return; } if (pEncoder->onUninit) { pEncoder->onUninit(pEncoder); } /* If we have a file handle, close it. */ if (pEncoder->onWrite == ma_encoder__on_write_vfs) { ma_vfs_or_default_close(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file); pEncoder->data.vfs.file = NULL; } } MA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten) { if (pFramesWritten != NULL) { *pFramesWritten = 0; } if (pEncoder == NULL || pFramesIn == NULL) { return MA_INVALID_ARGS; } return pEncoder->onWritePCMFrames(pEncoder, pFramesIn, frameCount, pFramesWritten); } #endif /* MA_NO_ENCODING */ /************************************************************************************************************************************************************** Generation **************************************************************************************************************************************************************/ #ifndef MA_NO_GENERATION MA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency) { ma_waveform_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.type = type; config.amplitude = amplitude; config.frequency = frequency; return config; } static ma_result ma_waveform__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_waveform_read_pcm_frames((ma_waveform*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_waveform__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_waveform_seek_to_pcm_frame((ma_waveform*)pDataSource, frameIndex); } static ma_result ma_waveform__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_waveform* pWaveform = (ma_waveform*)pDataSource; *pFormat = pWaveform->config.format; *pChannels = pWaveform->config.channels; *pSampleRate = pWaveform->config.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pWaveform->config.channels); return MA_SUCCESS; } static ma_result ma_waveform__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor) { ma_waveform* pWaveform = (ma_waveform*)pDataSource; *pCursor = (ma_uint64)(pWaveform->time / pWaveform->advance); return MA_SUCCESS; } static double ma_waveform__calculate_advance(ma_uint32 sampleRate, double frequency) { return (1.0 / (sampleRate / frequency)); } static void ma_waveform__update_advance(ma_waveform* pWaveform) { pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency); } static ma_data_source_vtable g_ma_waveform_data_source_vtable = { ma_waveform__data_source_on_read, ma_waveform__data_source_on_seek, ma_waveform__data_source_on_get_data_format, ma_waveform__data_source_on_get_cursor, NULL, /* onGetLength. There's no notion of a length in waveforms. */ NULL, /* onSetLooping */ 0 }; MA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform) { ma_result result; ma_data_source_config dataSourceConfig; if (pWaveform == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWaveform); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_waveform_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pWaveform->ds); if (result != MA_SUCCESS) { return result; } pWaveform->config = *pConfig; pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency); pWaveform->time = 0; return MA_SUCCESS; } MA_API void ma_waveform_uninit(ma_waveform* pWaveform) { if (pWaveform == NULL) { return; } ma_data_source_uninit(&pWaveform->ds); } MA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.amplitude = amplitude; return MA_SUCCESS; } MA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.frequency = frequency; ma_waveform__update_advance(pWaveform); return MA_SUCCESS; } MA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.type = type; return MA_SUCCESS; } MA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.sampleRate = sampleRate; ma_waveform__update_advance(pWaveform); return MA_SUCCESS; } static float ma_waveform_sine_f32(double time, double amplitude) { return (float)(ma_sind(MA_TAU_D * time) * amplitude); } static ma_int16 ma_waveform_sine_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_sine_f32(time, amplitude)); } static float ma_waveform_square_f32(double time, double dutyCycle, double amplitude) { double f = time - (ma_int64)time; double r; if (f < dutyCycle) { r = amplitude; } else { r = -amplitude; } return (float)r; } static ma_int16 ma_waveform_square_s16(double time, double dutyCycle, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_square_f32(time, dutyCycle, amplitude)); } static float ma_waveform_triangle_f32(double time, double amplitude) { double f = time - (ma_int64)time; double r; r = 2 * ma_abs(2 * (f - 0.5)) - 1; return (float)(r * amplitude); } static ma_int16 ma_waveform_triangle_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_triangle_f32(time, amplitude)); } static float ma_waveform_sawtooth_f32(double time, double amplitude) { double f = time - (ma_int64)time; double r; r = 2 * (f - 0.5); return (float)(r * amplitude); } static ma_int16 ma_waveform_sawtooth_s16(double time, double amplitude) { return ma_pcm_sample_f32_to_s16(ma_waveform_sawtooth_f32(time, amplitude)); } static void ma_waveform_read_pcm_frames__sine(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_sine_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__square(ma_waveform* pWaveform, double dutyCycle, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_square_s16(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__triangle(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_triangle_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } static void ma_waveform_read_pcm_frames__sawtooth(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint64 iChannel; ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format); ma_uint32 bpf = bps * pWaveform->config.channels; MA_ASSERT(pWaveform != NULL); MA_ASSERT(pFramesOut != NULL); if (pWaveform->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s; } } } else if (pWaveform->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_waveform_sawtooth_s16(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude); pWaveform->time += pWaveform->advance; for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } MA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWaveform == NULL) { return MA_INVALID_ARGS; } if (pFramesOut != NULL) { switch (pWaveform->config.type) { case ma_waveform_type_sine: { ma_waveform_read_pcm_frames__sine(pWaveform, pFramesOut, frameCount); } break; case ma_waveform_type_square: { ma_waveform_read_pcm_frames__square(pWaveform, 0.5, pFramesOut, frameCount); } break; case ma_waveform_type_triangle: { ma_waveform_read_pcm_frames__triangle(pWaveform, pFramesOut, frameCount); } break; case ma_waveform_type_sawtooth: { ma_waveform_read_pcm_frames__sawtooth(pWaveform, pFramesOut, frameCount); } break; default: return MA_INVALID_OPERATION; /* Unknown waveform type. */ } } else { pWaveform->time += pWaveform->advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */ } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } MA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->time = pWaveform->advance * (ma_int64)frameIndex; /* Casting for VC6. Won't be an issue in practice. */ return MA_SUCCESS; } MA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency) { ma_pulsewave_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.sampleRate = sampleRate; config.dutyCycle = dutyCycle; config.amplitude = amplitude; config.frequency = frequency; return config; } MA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform) { ma_result result; ma_waveform_config config; if (pWaveform == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pWaveform); config = ma_waveform_config_init( pConfig->format, pConfig->channels, pConfig->sampleRate, ma_waveform_type_square, pConfig->amplitude, pConfig->frequency ); result = ma_waveform_init(&config, &pWaveform->waveform); ma_pulsewave_set_duty_cycle(pWaveform, pConfig->dutyCycle); return result; } MA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform) { if (pWaveform == NULL) { return; } ma_waveform_uninit(&pWaveform->waveform); } MA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pWaveform == NULL) { return MA_INVALID_ARGS; } if (pFramesOut != NULL) { ma_waveform_read_pcm_frames__square(&pWaveform->waveform, pWaveform->config.dutyCycle, pFramesOut, frameCount); } else { pWaveform->waveform.time += pWaveform->waveform.advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */ } if (pFramesRead != NULL) { *pFramesRead = frameCount; } return MA_SUCCESS; } MA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } ma_waveform_seek_to_pcm_frame(&pWaveform->waveform, frameIndex); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.amplitude = amplitude; ma_waveform_set_amplitude(&pWaveform->waveform, amplitude); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.frequency = frequency; ma_waveform_set_frequency(&pWaveform->waveform, frequency); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.sampleRate = sampleRate; ma_waveform_set_sample_rate(&pWaveform->waveform, sampleRate); return MA_SUCCESS; } MA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle) { if (pWaveform == NULL) { return MA_INVALID_ARGS; } pWaveform->config.dutyCycle = dutyCycle; return MA_SUCCESS; } MA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude) { ma_noise_config config; MA_ZERO_OBJECT(&config); config.format = format; config.channels = channels; config.type = type; config.seed = seed; config.amplitude = amplitude; if (config.seed == 0) { config.seed = MA_DEFAULT_LCG_SEED; } return config; } static ma_result ma_noise__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_noise_read_pcm_frames((ma_noise*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_noise__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex) { /* No-op. Just pretend to be successful. */ (void)pDataSource; (void)frameIndex; return MA_SUCCESS; } static ma_result ma_noise__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { ma_noise* pNoise = (ma_noise*)pDataSource; *pFormat = pNoise->config.format; *pChannels = pNoise->config.channels; *pSampleRate = 0; /* There is no notion of sample rate with noise generation. */ ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pNoise->config.channels); return MA_SUCCESS; } static ma_data_source_vtable g_ma_noise_data_source_vtable = { ma_noise__data_source_on_read, ma_noise__data_source_on_seek, /* No-op for noise. */ ma_noise__data_source_on_get_data_format, NULL, /* onGetCursor. No notion of a cursor for noise. */ NULL, /* onGetLength. No notion of a length for noise. */ NULL, /* onSetLooping */ 0 }; #ifndef MA_PINK_NOISE_BIN_SIZE #define MA_PINK_NOISE_BIN_SIZE 16 #endif typedef struct { size_t sizeInBytes; struct { size_t binOffset; size_t accumulationOffset; size_t counterOffset; } pink; struct { size_t accumulationOffset; } brownian; } ma_noise_heap_layout; static ma_result ma_noise_get_heap_layout(const ma_noise_config* pConfig, ma_noise_heap_layout* pHeapLayout) { MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->channels == 0) { return MA_INVALID_ARGS; } pHeapLayout->sizeInBytes = 0; /* Pink. */ if (pConfig->type == ma_noise_type_pink) { /* bin */ pHeapLayout->pink.binOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double*) * pConfig->channels; pHeapLayout->sizeInBytes += sizeof(double ) * pConfig->channels * MA_PINK_NOISE_BIN_SIZE; /* accumulation */ pHeapLayout->pink.accumulationOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels; /* counter */ pHeapLayout->pink.counterOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(ma_uint32) * pConfig->channels; } /* Brownian. */ if (pConfig->type == ma_noise_type_brownian) { /* accumulation */ pHeapLayout->brownian.accumulationOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels; } /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_noise_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_noise_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise) { ma_result result; ma_noise_heap_layout heapLayout; ma_data_source_config dataSourceConfig; ma_uint32 iChannel; if (pNoise == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNoise); result = ma_noise_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pNoise->_pHeap = pHeap; MA_ZERO_MEMORY(pNoise->_pHeap, heapLayout.sizeInBytes); dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_noise_data_source_vtable; result = ma_data_source_init(&dataSourceConfig, &pNoise->ds); if (result != MA_SUCCESS) { return result; } pNoise->config = *pConfig; ma_lcg_seed(&pNoise->lcg, pConfig->seed); if (pNoise->config.type == ma_noise_type_pink) { pNoise->state.pink.bin = (double** )ma_offset_ptr(pHeap, heapLayout.pink.binOffset); pNoise->state.pink.accumulation = (double* )ma_offset_ptr(pHeap, heapLayout.pink.accumulationOffset); pNoise->state.pink.counter = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.pink.counterOffset); for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pNoise->state.pink.bin[iChannel] = (double*)ma_offset_ptr(pHeap, heapLayout.pink.binOffset + (sizeof(double*) * pConfig->channels) + (sizeof(double) * MA_PINK_NOISE_BIN_SIZE * iChannel)); pNoise->state.pink.accumulation[iChannel] = 0; pNoise->state.pink.counter[iChannel] = 1; } } if (pNoise->config.type == ma_noise_type_brownian) { pNoise->state.brownian.accumulation = (double*)ma_offset_ptr(pHeap, heapLayout.brownian.accumulationOffset); for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) { pNoise->state.brownian.accumulation[iChannel] = 0; } } return MA_SUCCESS; } MA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_noise_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_noise_init_preallocated(pConfig, pHeap, pNoise); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pNoise->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks) { if (pNoise == NULL) { return; } ma_data_source_uninit(&pNoise->ds); if (pNoise->_ownsHeap) { ma_free(pNoise->_pHeap, pAllocationCallbacks); } } MA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude) { if (pNoise == NULL) { return MA_INVALID_ARGS; } pNoise->config.amplitude = amplitude; return MA_SUCCESS; } MA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed) { if (pNoise == NULL) { return MA_INVALID_ARGS; } pNoise->lcg.state = seed; return MA_SUCCESS; } MA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type) { if (pNoise == NULL) { return MA_INVALID_ARGS; } /* This function should never have been implemented in the first place. Changing the type dynamically is not supported. Instead you need to uninitialize and reinitialize a fresh `ma_noise` object. This function will be removed in version 0.12. */ MA_ASSERT(MA_FALSE); (void)type; return MA_INVALID_OPERATION; } static MA_INLINE float ma_noise_f32_white(ma_noise* pNoise) { return (float)(ma_lcg_rand_f64(&pNoise->lcg) * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_white(ma_noise* pNoise) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_white(pNoise)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__white(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_white(pNoise); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_white(pNoise); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_white(pNoise); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_white(pNoise); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } static MA_INLINE unsigned int ma_tzcnt32(unsigned int x) { unsigned int n; /* Special case for odd numbers since they should happen about half the time. */ if (x & 0x1) { return 0; } if (x == 0) { return sizeof(x) << 3; } n = 1; if ((x & 0x0000FFFF) == 0) { x >>= 16; n += 16; } if ((x & 0x000000FF) == 0) { x >>= 8; n += 8; } if ((x & 0x0000000F) == 0) { x >>= 4; n += 4; } if ((x & 0x00000003) == 0) { x >>= 2; n += 2; } n -= x & 0x00000001; return n; } /* Pink noise generation based on Tonic (public domain) with modifications. https://github.com/TonicAudio/Tonic/blob/master/src/Tonic/Noise.h This is basically _the_ reference for pink noise from what I've found: http://www.firstpr.com.au/dsp/pink-noise/ */ static MA_INLINE float ma_noise_f32_pink(ma_noise* pNoise, ma_uint32 iChannel) { double result; double binPrev; double binNext; unsigned int ibin; ibin = ma_tzcnt32(pNoise->state.pink.counter[iChannel]) & (MA_PINK_NOISE_BIN_SIZE - 1); binPrev = pNoise->state.pink.bin[iChannel][ibin]; binNext = ma_lcg_rand_f64(&pNoise->lcg); pNoise->state.pink.bin[iChannel][ibin] = binNext; pNoise->state.pink.accumulation[iChannel] += (binNext - binPrev); pNoise->state.pink.counter[iChannel] += 1; result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.pink.accumulation[iChannel]); result /= 10; return (float)(result * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_pink(ma_noise* pNoise, ma_uint32 iChannel) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_pink(pNoise, iChannel)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__pink(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_pink(pNoise, iChannel); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_pink(pNoise, iChannel); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_pink(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_pink(pNoise, iChannel); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } static MA_INLINE float ma_noise_f32_brownian(ma_noise* pNoise, ma_uint32 iChannel) { double result; result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.brownian.accumulation[iChannel]); result /= 1.005; /* Don't escape the -1..1 range on average. */ pNoise->state.brownian.accumulation[iChannel] = result; result /= 20; return (float)(result * pNoise->config.amplitude); } static MA_INLINE ma_int16 ma_noise_s16_brownian(ma_noise* pNoise, ma_uint32 iChannel) { return ma_pcm_sample_f32_to_s16(ma_noise_f32_brownian(pNoise, iChannel)); } static MA_INLINE ma_uint64 ma_noise_read_pcm_frames__brownian(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount) { ma_uint64 iFrame; ma_uint32 iChannel; const ma_uint32 channels = pNoise->config.channels; MA_ASSUME(channels > 0); if (pNoise->config.format == ma_format_f32) { float* pFramesOutF32 = (float*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_brownian(pNoise, iChannel); } } } } else if (pNoise->config.format == ma_format_s16) { ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { ma_int16 s = ma_noise_s16_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = s; } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_brownian(pNoise, iChannel); } } } } else { const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format); const ma_uint32 bpf = bps * channels; if (pNoise->config.duplicateChannels) { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { float s = ma_noise_f32_brownian(pNoise, 0); for (iChannel = 0; iChannel < channels; iChannel += 1) { ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } else { for (iFrame = 0; iFrame < frameCount; iFrame += 1) { for (iChannel = 0; iChannel < channels; iChannel += 1) { float s = ma_noise_f32_brownian(pNoise, iChannel); ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none); } } } } return frameCount; } MA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_uint64 framesRead = 0; if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } if (pNoise == NULL) { return MA_INVALID_ARGS; } /* The output buffer is allowed to be NULL. Since we aren't tracking cursors or anything we can just do nothing and pretend to be successful. */ if (pFramesOut == NULL) { framesRead = frameCount; } else { switch (pNoise->config.type) { case ma_noise_type_white: framesRead = ma_noise_read_pcm_frames__white (pNoise, pFramesOut, frameCount); break; case ma_noise_type_pink: framesRead = ma_noise_read_pcm_frames__pink (pNoise, pFramesOut, frameCount); break; case ma_noise_type_brownian: framesRead = ma_noise_read_pcm_frames__brownian(pNoise, pFramesOut, frameCount); break; default: return MA_INVALID_OPERATION; /* Unknown noise type. */ } } if (pFramesRead != NULL) { *pFramesRead = framesRead; } return MA_SUCCESS; } #endif /* MA_NO_GENERATION */ #ifndef MA_NO_RESOURCE_MANAGER #ifndef MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS #define MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS 1000 #endif #ifndef MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY #define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY 1024 #endif MA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void) { ma_resource_manager_pipeline_notifications notifications; MA_ZERO_OBJECT(¬ifications); return notifications; } static void ma_resource_manager_pipeline_notifications_signal_all_notifications(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pNotification) { ma_async_notification_signal(pPipelineNotifications->init.pNotification); } if (pPipelineNotifications->done.pNotification) { ma_async_notification_signal(pPipelineNotifications->done.pNotification); } } static void ma_resource_manager_pipeline_notifications_acquire_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->init.pFence); } if (pPipelineNotifications->done.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->done.pFence); } } static void ma_resource_manager_pipeline_notifications_release_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications) { if (pPipelineNotifications == NULL) { return; } if (pPipelineNotifications->init.pFence != NULL) { ma_fence_release(pPipelineNotifications->init.pFence); } if (pPipelineNotifications->done.pFence != NULL) { ma_fence_release(pPipelineNotifications->done.pFence); } } #ifndef MA_DEFAULT_HASH_SEED #define MA_DEFAULT_HASH_SEED 42 #endif /* MurmurHash3. Based on code from https://github.com/PeterScott/murmur3/blob/master/murmur3.c (public domain). */ #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #endif static MA_INLINE ma_uint32 ma_rotl32(ma_uint32 x, ma_int8 r) { return (x << r) | (x >> (32 - r)); } static MA_INLINE ma_uint32 ma_hash_getblock(const ma_uint32* blocks, int i) { ma_uint32 block; /* Try silencing a sanitization warning about unaligned access by doing a memcpy() instead of assignment. */ MA_COPY_MEMORY(&block, ma_offset_ptr(blocks, i * sizeof(block)), sizeof(block)); if (ma_is_little_endian()) { return block; } else { return ma_swap_endian_uint32(block); } } static MA_INLINE ma_uint32 ma_hash_fmix32(ma_uint32 h) { h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; h ^= h >> 16; return h; } static ma_uint32 ma_hash_32(const void* key, int len, ma_uint32 seed) { const ma_uint8* data = (const ma_uint8*)key; const ma_uint32* blocks; const ma_uint8* tail; const int nblocks = len / 4; ma_uint32 h1 = seed; ma_uint32 c1 = 0xcc9e2d51; ma_uint32 c2 = 0x1b873593; ma_uint32 k1; int i; blocks = (const ma_uint32 *)(data + nblocks*4); for(i = -nblocks; i; i++) { k1 = ma_hash_getblock(blocks,i); k1 *= c1; k1 = ma_rotl32(k1, 15); k1 *= c2; h1 ^= k1; h1 = ma_rotl32(h1, 13); h1 = h1*5 + 0xe6546b64; } tail = (const ma_uint8*)(data + nblocks*4); k1 = 0; switch(len & 3) { case 3: k1 ^= tail[2] << 16; case 2: k1 ^= tail[1] << 8; case 1: k1 ^= tail[0]; k1 *= c1; k1 = ma_rotl32(k1, 15); k1 *= c2; h1 ^= k1; }; h1 ^= len; h1 = ma_hash_fmix32(h1); return h1; } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #endif /* End MurmurHash3 */ static ma_uint32 ma_hash_string_32(const char* str) { return ma_hash_32(str, (int)strlen(str), MA_DEFAULT_HASH_SEED); } static ma_uint32 ma_hash_string_w_32(const wchar_t* str) { return ma_hash_32(str, (int)wcslen(str) * sizeof(*str), MA_DEFAULT_HASH_SEED); } /* Basic BST Functions */ static ma_result ma_resource_manager_data_buffer_node_search(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(ppDataBufferNode != NULL); pCurrentNode = pResourceManager->pRootDataBufferNode; while (pCurrentNode != NULL) { if (hashedName32 == pCurrentNode->hashedName32) { break; /* Found. */ } else if (hashedName32 < pCurrentNode->hashedName32) { pCurrentNode = pCurrentNode->pChildLo; } else { pCurrentNode = pCurrentNode->pChildHi; } } *ppDataBufferNode = pCurrentNode; if (pCurrentNode == NULL) { return MA_DOES_NOT_EXIST; } else { return MA_SUCCESS; } } static ma_result ma_resource_manager_data_buffer_node_insert_point(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppInsertPoint) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(ppInsertPoint != NULL); *ppInsertPoint = NULL; if (pResourceManager->pRootDataBufferNode == NULL) { return MA_SUCCESS; /* No items. */ } /* We need to find the node that will become the parent of the new node. If a node is found that already has the same hashed name we need to return MA_ALREADY_EXISTS. */ pCurrentNode = pResourceManager->pRootDataBufferNode; while (pCurrentNode != NULL) { if (hashedName32 == pCurrentNode->hashedName32) { result = MA_ALREADY_EXISTS; break; } else { if (hashedName32 < pCurrentNode->hashedName32) { if (pCurrentNode->pChildLo == NULL) { result = MA_SUCCESS; break; } else { pCurrentNode = pCurrentNode->pChildLo; } } else { if (pCurrentNode->pChildHi == NULL) { result = MA_SUCCESS; break; } else { pCurrentNode = pCurrentNode->pChildHi; } } } } *ppInsertPoint = pCurrentNode; return result; } static ma_result ma_resource_manager_data_buffer_node_insert_at(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_buffer_node* pInsertPoint) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); /* The key must have been set before calling this function. */ MA_ASSERT(pDataBufferNode->hashedName32 != 0); if (pInsertPoint == NULL) { /* It's the first node. */ pResourceManager->pRootDataBufferNode = pDataBufferNode; } else { /* It's not the first node. It needs to be inserted. */ if (pDataBufferNode->hashedName32 < pInsertPoint->hashedName32) { MA_ASSERT(pInsertPoint->pChildLo == NULL); pInsertPoint->pChildLo = pDataBufferNode; } else { MA_ASSERT(pInsertPoint->pChildHi == NULL); pInsertPoint->pChildHi = pDataBufferNode; } } pDataBufferNode->pParent = pInsertPoint; return MA_SUCCESS; } #if 0 /* Unused for now. */ static ma_result ma_resource_manager_data_buffer_node_insert(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_result result; ma_resource_manager_data_buffer_node* pInsertPoint; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, pDataBufferNode->hashedName32, &pInsertPoint); if (result != MA_SUCCESS) { return MA_INVALID_ARGS; } return ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint); } #endif static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_min(ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pDataBufferNode != NULL); pCurrentNode = pDataBufferNode; while (pCurrentNode->pChildLo != NULL) { pCurrentNode = pCurrentNode->pChildLo; } return pCurrentNode; } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_max(ma_resource_manager_data_buffer_node* pDataBufferNode) { ma_resource_manager_data_buffer_node* pCurrentNode; MA_ASSERT(pDataBufferNode != NULL); pCurrentNode = pDataBufferNode; while (pCurrentNode->pChildHi != NULL) { pCurrentNode = pCurrentNode->pChildHi; } return pCurrentNode; } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_successor(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->pChildHi != NULL); return ma_resource_manager_data_buffer_node_find_min(pDataBufferNode->pChildHi); } static MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_predecessor(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->pChildLo != NULL); return ma_resource_manager_data_buffer_node_find_max(pDataBufferNode->pChildLo); } static ma_result ma_resource_manager_data_buffer_node_remove(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); if (pDataBufferNode->pChildLo == NULL) { if (pDataBufferNode->pChildHi == NULL) { /* Simple case - deleting a buffer with no children. */ if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); /* There is only a single buffer in the tree which should be equal to the root node. */ pResourceManager->pRootDataBufferNode = NULL; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = NULL; } else { pDataBufferNode->pParent->pChildHi = NULL; } } } else { /* Node has one child - pChildHi != NULL. */ pDataBufferNode->pChildHi->pParent = pDataBufferNode->pParent; if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildHi; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildHi; } else { pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildHi; } } } } else { if (pDataBufferNode->pChildHi == NULL) { /* Node has one child - pChildLo != NULL. */ pDataBufferNode->pChildLo->pParent = pDataBufferNode->pParent; if (pDataBufferNode->pParent == NULL) { MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode); pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildLo; } else { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildLo; } else { pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildLo; } } } else { /* Complex case - deleting a node with two children. */ ma_resource_manager_data_buffer_node* pReplacementDataBufferNode; /* For now we are just going to use the in-order successor as the replacement, but we may want to try to keep this balanced by switching between the two. */ pReplacementDataBufferNode = ma_resource_manager_data_buffer_node_find_inorder_successor(pDataBufferNode); MA_ASSERT(pReplacementDataBufferNode != NULL); /* Now that we have our replacement node we can make the change. The simple way to do this would be to just exchange the values, and then remove the replacement node, however we track specific nodes via pointers which means we can't just swap out the values. We need to instead just change the pointers around. The replacement node should have at most 1 child. Therefore, we can detach it in terms of our simpler cases above. What we're essentially doing is detaching the replacement node and reinserting it into the same position as the deleted node. */ MA_ASSERT(pReplacementDataBufferNode->pParent != NULL); /* The replacement node should never be the root which means it should always have a parent. */ MA_ASSERT(pReplacementDataBufferNode->pChildLo == NULL); /* Because we used in-order successor. This would be pChildHi == NULL if we used in-order predecessor. */ if (pReplacementDataBufferNode->pChildHi == NULL) { if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) { pReplacementDataBufferNode->pParent->pChildLo = NULL; } else { pReplacementDataBufferNode->pParent->pChildHi = NULL; } } else { pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode->pParent; if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) { pReplacementDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode->pChildHi; } else { pReplacementDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode->pChildHi; } } /* The replacement node has essentially been detached from the binary tree, so now we need to replace the old data buffer with it. The first thing to update is the parent */ if (pDataBufferNode->pParent != NULL) { if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) { pDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode; } else { pDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode; } } /* Now need to update the replacement node's pointers. */ pReplacementDataBufferNode->pParent = pDataBufferNode->pParent; pReplacementDataBufferNode->pChildLo = pDataBufferNode->pChildLo; pReplacementDataBufferNode->pChildHi = pDataBufferNode->pChildHi; /* Now the children of the replacement node need to have their parent pointers updated. */ if (pReplacementDataBufferNode->pChildLo != NULL) { pReplacementDataBufferNode->pChildLo->pParent = pReplacementDataBufferNode; } if (pReplacementDataBufferNode->pChildHi != NULL) { pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode; } /* Now the root node needs to be updated. */ if (pResourceManager->pRootDataBufferNode == pDataBufferNode) { pResourceManager->pRootDataBufferNode = pReplacementDataBufferNode; } } } return MA_SUCCESS; } #if 0 /* Unused for now. */ static ma_result ma_resource_manager_data_buffer_node_remove_by_key(ma_resource_manager* pResourceManager, ma_uint32 hashedName32) { ma_result result; ma_resource_manager_data_buffer_node* pDataBufferNode; result = ma_resource_manager_data_buffer_search(pResourceManager, hashedName32, &pDataBufferNode); if (result != MA_SUCCESS) { return result; /* Could not find the data buffer. */ } return ma_resource_manager_data_buffer_remove(pResourceManager, pDataBufferNode); } #endif static ma_resource_manager_data_supply_type ma_resource_manager_data_buffer_node_get_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode) { return (ma_resource_manager_data_supply_type)ma_atomic_load_i32(&pDataBufferNode->data.type); } static void ma_resource_manager_data_buffer_node_set_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_supply_type supplyType) { ma_atomic_exchange_i32(&pDataBufferNode->data.type, supplyType); } static ma_result ma_resource_manager_data_buffer_node_increment_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount) { ma_uint32 refCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); (void)pResourceManager; refCount = ma_atomic_fetch_add_32(&pDataBufferNode->refCount, 1) + 1; if (pNewRefCount != NULL) { *pNewRefCount = refCount; } return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_decrement_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount) { ma_uint32 refCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); (void)pResourceManager; refCount = ma_atomic_fetch_sub_32(&pDataBufferNode->refCount, 1) - 1; if (pNewRefCount != NULL) { *pNewRefCount = refCount; } return MA_SUCCESS; } static void ma_resource_manager_data_buffer_node_free(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); if (pDataBufferNode->isDataOwnedByResourceManager) { if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_encoded) { ma_free((void*)pDataBufferNode->data.backend.encoded.pData, &pResourceManager->config.allocationCallbacks); pDataBufferNode->data.backend.encoded.pData = NULL; pDataBufferNode->data.backend.encoded.sizeInBytes = 0; } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded) { ma_free((void*)pDataBufferNode->data.backend.decoded.pData, &pResourceManager->config.allocationCallbacks); pDataBufferNode->data.backend.decoded.pData = NULL; pDataBufferNode->data.backend.decoded.totalFrameCount = 0; } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded_paged) { ma_paged_audio_buffer_data_uninit(&pDataBufferNode->data.backend.decodedPaged.data, &pResourceManager->config.allocationCallbacks); } else { /* Should never hit this if the node was successfully initialized. */ MA_ASSERT(pDataBufferNode->result != MA_SUCCESS); } } /* The data buffer itself needs to be freed. */ ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); } static ma_result ma_resource_manager_data_buffer_node_result(const ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBufferNode->result); /* Need a naughty const-cast here. */ } static ma_bool32 ma_resource_manager_is_threading_enabled(const ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); return (pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) == 0; } typedef struct { union { ma_async_notification_event e; ma_async_notification_poll p; } backend; /* Must be the first member. */ ma_resource_manager* pResourceManager; } ma_resource_manager_inline_notification; static ma_result ma_resource_manager_inline_notification_init(ma_resource_manager* pResourceManager, ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pNotification != NULL); pNotification->pResourceManager = pResourceManager; if (ma_resource_manager_is_threading_enabled(pResourceManager)) { return ma_async_notification_event_init(&pNotification->backend.e); } else { return ma_async_notification_poll_init(&pNotification->backend.p); } } static void ma_resource_manager_inline_notification_uninit(ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pNotification != NULL); if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) { ma_async_notification_event_uninit(&pNotification->backend.e); } else { /* No need to uninitialize a polling notification. */ } } static void ma_resource_manager_inline_notification_wait(ma_resource_manager_inline_notification* pNotification) { MA_ASSERT(pNotification != NULL); if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) { ma_async_notification_event_wait(&pNotification->backend.e); } else { while (ma_async_notification_poll_is_signalled(&pNotification->backend.p) == MA_FALSE) { ma_result result = ma_resource_manager_process_next_job(pNotification->pResourceManager); if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) { break; } } } } static void ma_resource_manager_inline_notification_wait_and_uninit(ma_resource_manager_inline_notification* pNotification) { ma_resource_manager_inline_notification_wait(pNotification); ma_resource_manager_inline_notification_uninit(pNotification); } static void ma_resource_manager_data_buffer_bst_lock(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_lock(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } else { /* Threading not enabled. Do nothing. */ } } static void ma_resource_manager_data_buffer_bst_unlock(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager != NULL); if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_unlock(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } else { /* Threading not enabled. Do nothing. */ } } #ifndef MA_NO_THREADING static ma_thread_result MA_THREADCALL ma_resource_manager_job_thread(void* pUserData) { ma_resource_manager* pResourceManager = (ma_resource_manager*)pUserData; MA_ASSERT(pResourceManager != NULL); for (;;) { ma_result result; ma_job job; result = ma_resource_manager_next_job(pResourceManager, &job); if (result != MA_SUCCESS) { break; } /* Terminate if we got a quit message. */ if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) { break; } ma_job_process(&job); } return (ma_thread_result)0; } #endif MA_API ma_resource_manager_config ma_resource_manager_config_init(void) { ma_resource_manager_config config; MA_ZERO_OBJECT(&config); config.decodedFormat = ma_format_unknown; config.decodedChannels = 0; config.decodedSampleRate = 0; config.jobThreadCount = 1; /* A single miniaudio-managed job thread by default. */ config.jobQueueCapacity = MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY; /* Flags. */ config.flags = 0; #ifdef MA_NO_THREADING { /* Threading is disabled at compile time so disable threading at runtime as well by default. */ config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; config.jobThreadCount = 0; } #endif return config; } MA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager) { ma_result result; ma_job_queue_config jobQueueConfig; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pResourceManager); if (pConfig == NULL) { return MA_INVALID_ARGS; } #ifndef MA_NO_THREADING { if (pConfig->jobThreadCount > ma_countof(pResourceManager->jobThreads)) { return MA_INVALID_ARGS; /* Requesting too many job threads. */ } } #endif pResourceManager->config = *pConfig; ma_allocation_callbacks_init_copy(&pResourceManager->config.allocationCallbacks, &pConfig->allocationCallbacks); /* Get the log set up early so we can start using it as soon as possible. */ if (pResourceManager->config.pLog == NULL) { result = ma_log_init(&pResourceManager->config.allocationCallbacks, &pResourceManager->log); if (result == MA_SUCCESS) { pResourceManager->config.pLog = &pResourceManager->log; } else { pResourceManager->config.pLog = NULL; /* Logging is unavailable. */ } } if (pResourceManager->config.pVFS == NULL) { result = ma_default_vfs_init(&pResourceManager->defaultVFS, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { return result; /* Failed to initialize the default file system. */ } pResourceManager->config.pVFS = &pResourceManager->defaultVFS; } /* If threading has been disabled at compile time, enforce it at run time as well. */ #ifdef MA_NO_THREADING { pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; } #endif /* We need to force MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING if MA_RESOURCE_MANAGER_FLAG_NO_THREADING is set. */ if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) { pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING; /* We cannot allow job threads when MA_RESOURCE_MANAGER_FLAG_NO_THREADING has been set. This is an invalid use case. */ if (pResourceManager->config.jobThreadCount > 0) { return MA_INVALID_ARGS; } } /* Job queue. */ jobQueueConfig.capacity = pResourceManager->config.jobQueueCapacity; jobQueueConfig.flags = 0; if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING) != 0) { if (pResourceManager->config.jobThreadCount > 0) { return MA_INVALID_ARGS; /* Non-blocking mode is only valid for self-managed job threads. */ } jobQueueConfig.flags |= MA_JOB_QUEUE_FLAG_NON_BLOCKING; } result = ma_job_queue_init(&jobQueueConfig, &pResourceManager->config.allocationCallbacks, &pResourceManager->jobQueue); if (result != MA_SUCCESS) { return result; } /* Custom decoding backends. */ if (pConfig->ppCustomDecodingBackendVTables != NULL && pConfig->customDecodingBackendCount > 0) { size_t sizeInBytes = sizeof(*pResourceManager->config.ppCustomDecodingBackendVTables) * pConfig->customDecodingBackendCount; ma_decoding_backend_vtable** ppCustomDecodingBackendVTables; ppCustomDecodingBackendVTables = (ma_decoding_backend_vtable**)ma_malloc(sizeInBytes, &pResourceManager->config.allocationCallbacks); if (pResourceManager->config.ppCustomDecodingBackendVTables == NULL) { ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } MA_COPY_MEMORY(ppCustomDecodingBackendVTables, pConfig->ppCustomDecodingBackendVTables, sizeInBytes); pResourceManager->config.ppCustomDecodingBackendVTables = ppCustomDecodingBackendVTables; pResourceManager->config.customDecodingBackendCount = pConfig->customDecodingBackendCount; pResourceManager->config.pCustomDecodingBackendUserData = pConfig->pCustomDecodingBackendUserData; } /* Here is where we initialize our threading stuff. We don't do this if we don't support threading. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_uint32 iJobThread; /* Data buffer lock. */ result = ma_mutex_init(&pResourceManager->dataBufferBSTLock); if (result != MA_SUCCESS) { ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return result; } /* Create the job threads last to ensure the threads has access to valid data. */ for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) { result = ma_thread_create(&pResourceManager->jobThreads[iJobThread], ma_thread_priority_normal, pResourceManager->config.jobThreadStackSize, ma_resource_manager_job_thread, pResourceManager, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { ma_mutex_uninit(&pResourceManager->dataBufferBSTLock); ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); return result; } } } #else { /* Threading is disabled at compile time. We should never get here because validation checks should have already been performed. */ MA_ASSERT(MA_FALSE); } #endif } return MA_SUCCESS; } static void ma_resource_manager_delete_all_data_buffer_nodes(ma_resource_manager* pResourceManager) { MA_ASSERT(pResourceManager); /* If everything was done properly, there shouldn't be any active data buffers. */ while (pResourceManager->pRootDataBufferNode != NULL) { ma_resource_manager_data_buffer_node* pDataBufferNode = pResourceManager->pRootDataBufferNode; ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); /* The data buffer has been removed from the BST, so now we need to free its data. */ ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); } } MA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager) { if (pResourceManager == NULL) { return; } /* Job threads need to be killed first. To do this we need to post a quit message to the message queue and then wait for the thread. The quit message will never be removed from the queue which means it will never not be returned after being encountered for the first time which means all threads will eventually receive it. */ ma_resource_manager_post_job_quit(pResourceManager); /* Wait for every job to finish before continuing to ensure nothing is sill trying to access any of our objects below. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_uint32 iJobThread; for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) { ma_thread_wait(&pResourceManager->jobThreads[iJobThread]); } } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } /* At this point the thread should have returned and no other thread should be accessing our data. We can now delete all data buffers. */ ma_resource_manager_delete_all_data_buffer_nodes(pResourceManager); /* The job queue is no longer needed. */ ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks); /* We're no longer doing anything with data buffers so the lock can now be uninitialized. */ if (ma_resource_manager_is_threading_enabled(pResourceManager)) { #ifndef MA_NO_THREADING { ma_mutex_uninit(&pResourceManager->dataBufferBSTLock); } #else { MA_ASSERT(MA_FALSE); /* Should never hit this. */ } #endif } ma_free((ma_decoding_backend_vtable**)pResourceManager->config.ppCustomDecodingBackendVTables, &pResourceManager->config.allocationCallbacks); /* <-- Naughty const-cast, but this is safe. */ if (pResourceManager->config.pLog == &pResourceManager->log) { ma_log_uninit(&pResourceManager->log); } } MA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager) { if (pResourceManager == NULL) { return NULL; } return pResourceManager->config.pLog; } MA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void) { ma_resource_manager_data_source_config config; MA_ZERO_OBJECT(&config); config.rangeBegInPCMFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG; config.rangeEndInPCMFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END; config.loopPointBegInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG; config.loopPointEndInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END; config.isLooping = MA_FALSE; return config; } static ma_decoder_config ma_resource_manager__init_decoder_config(ma_resource_manager* pResourceManager) { ma_decoder_config config; config = ma_decoder_config_init(pResourceManager->config.decodedFormat, pResourceManager->config.decodedChannels, pResourceManager->config.decodedSampleRate); config.allocationCallbacks = pResourceManager->config.allocationCallbacks; config.ppCustomBackendVTables = pResourceManager->config.ppCustomDecodingBackendVTables; config.customBackendCount = pResourceManager->config.customDecodingBackendCount; config.pCustomBackendUserData = pResourceManager->config.pCustomDecodingBackendUserData; return config; } static ma_result ma_resource_manager__init_decoder(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_decoder* pDecoder) { ma_result result; ma_decoder_config config; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); MA_ASSERT(pDecoder != NULL); config = ma_resource_manager__init_decoder_config(pResourceManager); if (pFilePath != NULL) { result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pFilePath, &config, pDecoder); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%s\". %s.\n", pFilePath, ma_result_description(result)); return result; } } else { result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pFilePathW, &config, pDecoder); if (result != MA_SUCCESS) { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%ls\". %s.\n", pFilePathW, ma_result_description(result)); #endif return result; } } return MA_SUCCESS; } static ma_bool32 ma_resource_manager_data_buffer_has_connector(ma_resource_manager_data_buffer* pDataBuffer) { return ma_atomic_bool32_get(&pDataBuffer->isConnectorInitialized); } static ma_data_source* ma_resource_manager_data_buffer_get_connector(ma_resource_manager_data_buffer* pDataBuffer) { if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { return NULL; /* Connector not yet initialized. */ } switch (pDataBuffer->pNode->data.type) { case ma_resource_manager_data_supply_type_encoded: return &pDataBuffer->connector.decoder; case ma_resource_manager_data_supply_type_decoded: return &pDataBuffer->connector.buffer; case ma_resource_manager_data_supply_type_decoded_paged: return &pDataBuffer->connector.pagedBuffer; case ma_resource_manager_data_supply_type_unknown: default: { ma_log_postf(ma_resource_manager_get_log(pDataBuffer->pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to retrieve data buffer connector. Unknown data supply type.\n"); return NULL; }; }; } static ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_manager_data_buffer* pDataBuffer, const ma_resource_manager_data_source_config* pConfig, ma_async_notification* pInitNotification, ma_fence* pInitFence) { ma_result result; MA_ASSERT(pDataBuffer != NULL); MA_ASSERT(pConfig != NULL); MA_ASSERT(ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE); /* The underlying data buffer must be initialized before we'll be able to know how to initialize the backend. */ result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode); if (result != MA_SUCCESS && result != MA_BUSY) { return result; /* The data buffer is in an erroneous state. */ } /* We need to initialize either a ma_decoder or an ma_audio_buffer depending on whether or not the backing data is encoded or decoded. These act as the "instance" to the data and are used to form the connection between underlying data buffer and the data source. If the data buffer is decoded, we can use an ma_audio_buffer. This enables us to use memory mapping when mixing which saves us a bit of data movement overhead. */ switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: /* Connector is a decoder. */ { ma_decoder_config config; config = ma_resource_manager__init_decoder_config(pDataBuffer->pResourceManager); result = ma_decoder_init_memory(pDataBuffer->pNode->data.backend.encoded.pData, pDataBuffer->pNode->data.backend.encoded.sizeInBytes, &config, &pDataBuffer->connector.decoder); } break; case ma_resource_manager_data_supply_type_decoded: /* Connector is an audio buffer. */ { ma_audio_buffer_config config; config = ma_audio_buffer_config_init(pDataBuffer->pNode->data.backend.decoded.format, pDataBuffer->pNode->data.backend.decoded.channels, pDataBuffer->pNode->data.backend.decoded.totalFrameCount, pDataBuffer->pNode->data.backend.decoded.pData, NULL); result = ma_audio_buffer_init(&config, &pDataBuffer->connector.buffer); } break; case ma_resource_manager_data_supply_type_decoded_paged: /* Connector is a paged audio buffer. */ { ma_paged_audio_buffer_config config; config = ma_paged_audio_buffer_config_init(&pDataBuffer->pNode->data.backend.decodedPaged.data); result = ma_paged_audio_buffer_init(&config, &pDataBuffer->connector.pagedBuffer); } break; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown data supply type. Should never happen. Need to post an error here. */ return MA_INVALID_ARGS; }; } /* Initialization of the connector is when we can fire the init notification. This will give the application access to the format/channels/rate of the data source. */ if (result == MA_SUCCESS) { /* The resource manager supports the ability to set the range and loop settings via a config at initialization time. This results in an case where the ranges could be set explicitly via ma_data_source_set_*() before we get to this point here. If this happens, we'll end up hitting a case where we just override those settings which results in what feels like a bug. To address this we only change the relevant properties if they're not equal to defaults. If they're equal to defaults there's no need to change them anyway. If they're *not* set to the default values, we can assume the user has set the range and loop settings via the config. If they're doing their own calls to ma_data_source_set_*() in addition to setting them via the config, that's entirely on the caller and any synchronization issue becomes their problem. */ if (pConfig->rangeBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_BEG || pConfig->rangeEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_END) { ma_data_source_set_range_in_pcm_frames(pDataBuffer, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); } if (pConfig->loopPointBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG || pConfig->loopPointEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END) { ma_data_source_set_loop_point_in_pcm_frames(pDataBuffer, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); } if (pConfig->isLooping != MA_FALSE) { ma_data_source_set_looping(pDataBuffer, pConfig->isLooping); } ma_atomic_bool32_set(&pDataBuffer->isConnectorInitialized, MA_TRUE); if (pInitNotification != NULL) { ma_async_notification_signal(pInitNotification); } if (pInitFence != NULL) { ma_fence_release(pInitFence); } } /* At this point the backend should be initialized. We do *not* want to set pDataSource->result here - that needs to be done at a higher level to ensure it's done as the last step. */ return result; } static ma_result ma_resource_manager_data_buffer_uninit_connector(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBuffer != NULL); (void)pResourceManager; switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: /* Connector is a decoder. */ { ma_decoder_uninit(&pDataBuffer->connector.decoder); } break; case ma_resource_manager_data_supply_type_decoded: /* Connector is an audio buffer. */ { ma_audio_buffer_uninit(&pDataBuffer->connector.buffer); } break; case ma_resource_manager_data_supply_type_decoded_paged: /* Connector is a paged audio buffer. */ { ma_paged_audio_buffer_uninit(&pDataBuffer->connector.pagedBuffer); } break; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown data supply type. Should never happen. Need to post an error here. */ return MA_INVALID_ARGS; }; } return MA_SUCCESS; } static ma_uint32 ma_resource_manager_data_buffer_node_next_execution_order(ma_resource_manager_data_buffer_node* pDataBufferNode) { MA_ASSERT(pDataBufferNode != NULL); return ma_atomic_fetch_add_32(&pDataBufferNode->executionCounter, 1); } static ma_result ma_resource_manager_data_buffer_node_init_supply_encoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW) { ma_result result; size_t dataSizeInBytes; void* pData; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); result = ma_vfs_open_and_read_file_ex(pResourceManager->config.pVFS, pFilePath, pFilePathW, &pData, &dataSizeInBytes, &pResourceManager->config.allocationCallbacks); if (result != MA_SUCCESS) { if (pFilePath != NULL) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%s\". %s.\n", pFilePath, ma_result_description(result)); } else { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to load file \"%ls\". %s.\n", pFilePathW, ma_result_description(result)); #endif } return result; } pDataBufferNode->data.backend.encoded.pData = pData; pDataBufferNode->data.backend.encoded.sizeInBytes = dataSizeInBytes; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_encoded); /* <-- Must be set last. */ return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_init_supply_decoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 flags, ma_decoder** ppDecoder) { ma_result result = MA_SUCCESS; ma_decoder* pDecoder; ma_uint64 totalFrameCount; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(ppDecoder != NULL); MA_ASSERT(pFilePath != NULL || pFilePathW != NULL); *ppDecoder = NULL; /* For safety. */ pDecoder = (ma_decoder*)ma_malloc(sizeof(*pDecoder), &pResourceManager->config.allocationCallbacks); if (pDecoder == NULL) { return MA_OUT_OF_MEMORY; } result = ma_resource_manager__init_decoder(pResourceManager, pFilePath, pFilePathW, pDecoder); if (result != MA_SUCCESS) { ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return result; } /* At this point we have the decoder and we now need to initialize the data supply. This will be either a decoded buffer, or a decoded paged buffer. A regular buffer is just one big heap allocated buffer, whereas a paged buffer is a linked list of paged-sized buffers. The latter is used when the length of a sound is unknown until a full decode has been performed. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) { result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount); if (result != MA_SUCCESS) { return result; } } else { totalFrameCount = 0; } if (totalFrameCount > 0) { /* It's a known length. The data supply is a regular decoded buffer. */ ma_uint64 dataSizeInBytes; void* pData; dataSizeInBytes = totalFrameCount * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels); if (dataSizeInBytes > MA_SIZE_MAX) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return MA_TOO_BIG; } pData = ma_malloc((size_t)dataSizeInBytes, &pResourceManager->config.allocationCallbacks); if (pData == NULL) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } /* The buffer needs to be initialized to silence in case the caller reads from it. */ ma_silence_pcm_frames(pData, totalFrameCount, pDecoder->outputFormat, pDecoder->outputChannels); /* Data has been allocated and the data supply can now be initialized. */ pDataBufferNode->data.backend.decoded.pData = pData; pDataBufferNode->data.backend.decoded.totalFrameCount = totalFrameCount; pDataBufferNode->data.backend.decoded.format = pDecoder->outputFormat; pDataBufferNode->data.backend.decoded.channels = pDecoder->outputChannels; pDataBufferNode->data.backend.decoded.sampleRate = pDecoder->outputSampleRate; pDataBufferNode->data.backend.decoded.decodedFrameCount = 0; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded); /* <-- Must be set last. */ } else { /* It's an unknown length. The data supply is a paged decoded buffer. Setting this up is actually easier than the non-paged decoded buffer because we just need to initialize a ma_paged_audio_buffer object. */ result = ma_paged_audio_buffer_data_init(pDecoder->outputFormat, pDecoder->outputChannels, &pDataBufferNode->data.backend.decodedPaged.data); if (result != MA_SUCCESS) { ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); return result; } pDataBufferNode->data.backend.decodedPaged.sampleRate = pDecoder->outputSampleRate; pDataBufferNode->data.backend.decodedPaged.decodedFrameCount = 0; ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded_paged); /* <-- Must be set last. */ } *ppDecoder = pDecoder; return MA_SUCCESS; } static ma_result ma_resource_manager_data_buffer_node_decode_next_page(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_decoder* pDecoder) { ma_result result = MA_SUCCESS; ma_uint64 pageSizeInFrames; ma_uint64 framesToTryReading; ma_uint64 framesRead; MA_ASSERT(pResourceManager != NULL); MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDecoder != NULL); /* We need to know the size of a page in frames to know how many frames to decode. */ pageSizeInFrames = MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDecoder->outputSampleRate/1000); framesToTryReading = pageSizeInFrames; /* Here is where we do the decoding of the next page. We'll run a slightly different path depending on whether or not we're using a flat or paged buffer because the allocation of the page differs between the two. For a flat buffer it's an offset to an already-allocated buffer. For a paged buffer, we need to allocate a new page and attach it to the linked list. */ switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode)) { case ma_resource_manager_data_supply_type_decoded: { /* The destination buffer is an offset to the existing buffer. Don't read more than we originally retrieved when we first initialized the decoder. */ void* pDst; ma_uint64 framesRemaining = pDataBufferNode->data.backend.decoded.totalFrameCount - pDataBufferNode->data.backend.decoded.decodedFrameCount; if (framesToTryReading > framesRemaining) { framesToTryReading = framesRemaining; } if (framesToTryReading > 0) { pDst = ma_offset_ptr( pDataBufferNode->data.backend.decoded.pData, pDataBufferNode->data.backend.decoded.decodedFrameCount * ma_get_bytes_per_frame(pDataBufferNode->data.backend.decoded.format, pDataBufferNode->data.backend.decoded.channels) ); MA_ASSERT(pDst != NULL); result = ma_decoder_read_pcm_frames(pDecoder, pDst, framesToTryReading, &framesRead); if (framesRead > 0) { pDataBufferNode->data.backend.decoded.decodedFrameCount += framesRead; } } else { framesRead = 0; } } break; case ma_resource_manager_data_supply_type_decoded_paged: { /* The destination buffer is a freshly allocated page. */ ma_paged_audio_buffer_page* pPage; result = ma_paged_audio_buffer_data_allocate_page(&pDataBufferNode->data.backend.decodedPaged.data, framesToTryReading, NULL, &pResourceManager->config.allocationCallbacks, &pPage); if (result != MA_SUCCESS) { return result; } result = ma_decoder_read_pcm_frames(pDecoder, pPage->pAudioData, framesToTryReading, &framesRead); if (result == MA_SUCCESS && framesRead > 0) { pPage->sizeInFrames = framesRead; result = ma_paged_audio_buffer_data_append_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage); if (result == MA_SUCCESS) { pDataBufferNode->data.backend.decodedPaged.decodedFrameCount += framesRead; } else { /* Failed to append the page. Just abort and set the status to MA_AT_END. */ ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks); result = MA_AT_END; } } else { /* No frames were read. Free the page and just set the status to MA_AT_END. */ ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks); result = MA_AT_END; } } break; case ma_resource_manager_data_supply_type_encoded: case ma_resource_manager_data_supply_type_unknown: default: { /* Unexpected data supply type. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Unexpected data supply type (%d) when decoding page.", ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode)); return MA_ERROR; }; } if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } static ma_result ma_resource_manager_data_buffer_node_acquire_critical_section(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_inline_notification* pInitNotification, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pDataBufferNode = NULL; ma_resource_manager_data_buffer_node* pInsertPoint; if (ppDataBufferNode != NULL) { *ppDataBufferNode = NULL; } result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, hashedName32, &pInsertPoint); if (result == MA_ALREADY_EXISTS) { /* The node already exists. We just need to increment the reference count. */ pDataBufferNode = pInsertPoint; result = ma_resource_manager_data_buffer_node_increment_ref(pResourceManager, pDataBufferNode, NULL); if (result != MA_SUCCESS) { return result; /* Should never happen. Failed to increment the reference count. */ } result = MA_ALREADY_EXISTS; goto done; } else { /* The node does not already exist. We need to post a LOAD_DATA_BUFFER_NODE job here. This needs to be done inside the critical section to ensure an uninitialization of the node does not occur before initialization on another thread. */ pDataBufferNode = (ma_resource_manager_data_buffer_node*)ma_malloc(sizeof(*pDataBufferNode), &pResourceManager->config.allocationCallbacks); if (pDataBufferNode == NULL) { return MA_OUT_OF_MEMORY; } MA_ZERO_OBJECT(pDataBufferNode); pDataBufferNode->hashedName32 = hashedName32; pDataBufferNode->refCount = 1; /* Always set to 1 by default (this is our first reference). */ if (pExistingData == NULL) { pDataBufferNode->data.type = ma_resource_manager_data_supply_type_unknown; /* <-- We won't know this until we start decoding. */ pDataBufferNode->result = MA_BUSY; /* Must be set to MA_BUSY before we leave the critical section, so might as well do it now. */ pDataBufferNode->isDataOwnedByResourceManager = MA_TRUE; } else { pDataBufferNode->data = *pExistingData; pDataBufferNode->result = MA_SUCCESS; /* Not loading asynchronously, so just set the status */ pDataBufferNode->isDataOwnedByResourceManager = MA_FALSE; } result = ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint); if (result != MA_SUCCESS) { ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return result; /* Should never happen. Failed to insert the data buffer into the BST. */ } /* Here is where we'll post the job, but only if we're loading asynchronously. If we're loading synchronously we'll defer loading to a later stage, outside of the critical section. */ if (pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) { /* Loading asynchronously. Post the job. */ ma_job job; char* pFilePathCopy = NULL; wchar_t* pFilePathWCopy = NULL; /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */ if (pFilePath != NULL) { pFilePathCopy = ma_copy_string(pFilePath, &pResourceManager->config.allocationCallbacks); } else { pFilePathWCopy = ma_copy_string_w(pFilePathW, &pResourceManager->config.allocationCallbacks); } if (pFilePathCopy == NULL && pFilePathWCopy == NULL) { ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return MA_OUT_OF_MEMORY; } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_init(pResourceManager, pInitNotification); } /* Acquire init and done fences before posting the job. These will be unacquired by the job thread. */ if (pInitFence != NULL) { ma_fence_acquire(pInitFence); } if (pDoneFence != NULL) { ma_fence_acquire(pDoneFence); } /* We now have everything we need to post the job to the job thread. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE); job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); job.data.resourceManager.loadDataBufferNode.pResourceManager = pResourceManager; job.data.resourceManager.loadDataBufferNode.pDataBufferNode = pDataBufferNode; job.data.resourceManager.loadDataBufferNode.pFilePath = pFilePathCopy; job.data.resourceManager.loadDataBufferNode.pFilePathW = pFilePathWCopy; job.data.resourceManager.loadDataBufferNode.flags = flags; job.data.resourceManager.loadDataBufferNode.pInitNotification = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? pInitNotification : NULL; job.data.resourceManager.loadDataBufferNode.pDoneNotification = NULL; job.data.resourceManager.loadDataBufferNode.pInitFence = pInitFence; job.data.resourceManager.loadDataBufferNode.pDoneFence = pDoneFence; if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { result = ma_job_process(&job); } else { result = ma_resource_manager_post_job(pResourceManager, &job); } if (result != MA_SUCCESS) { /* Failed to post job. Probably ran out of memory. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE job. %s.\n", ma_result_description(result)); /* Fences were acquired before posting the job, but since the job was not able to be posted, we need to make sure we release them so nothing gets stuck waiting. */ if (pInitFence != NULL) { ma_fence_release(pInitFence); } if (pDoneFence != NULL) { ma_fence_release(pDoneFence); } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(pInitNotification); } else { /* These will have been freed by the job thread, but with WAIT_INIT they will already have happened since the job has already been handled. */ ma_free(pFilePathCopy, &pResourceManager->config.allocationCallbacks); ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks); } ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); return result; } } } done: if (ppDataBufferNode != NULL) { *ppDataBufferNode = pDataBufferNode; } return result; } static ma_result ma_resource_manager_data_buffer_node_acquire(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_data_buffer_node** ppDataBufferNode) { ma_result result = MA_SUCCESS; ma_bool32 nodeAlreadyExists = MA_FALSE; ma_resource_manager_data_buffer_node* pDataBufferNode = NULL; ma_resource_manager_inline_notification initNotification; /* Used when the WAIT_INIT flag is set. */ if (ppDataBufferNode != NULL) { *ppDataBufferNode = NULL; /* Safety. */ } if (pResourceManager == NULL || (pFilePath == NULL && pFilePathW == NULL && hashedName32 == 0)) { return MA_INVALID_ARGS; } /* If we're specifying existing data, it must be valid. */ if (pExistingData != NULL && pExistingData->type == ma_resource_manager_data_supply_type_unknown) { return MA_INVALID_ARGS; } /* If we don't support threading, remove the ASYNC flag to make the rest of this a bit simpler. */ if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC; } if (hashedName32 == 0) { if (pFilePath != NULL) { hashedName32 = ma_hash_string_32(pFilePath); } else { hashedName32 = ma_hash_string_w_32(pFilePathW); } } /* Here is where we either increment the node's reference count or allocate a new one and add it to the BST. When allocating a new node, we need to make sure the LOAD_DATA_BUFFER_NODE job is posted inside the critical section just in case the caller immediately uninitializes the node as this will ensure the FREE_DATA_BUFFER_NODE job is given an execution order such that the node is not uninitialized before initialization. */ ma_resource_manager_data_buffer_bst_lock(pResourceManager); { result = ma_resource_manager_data_buffer_node_acquire_critical_section(pResourceManager, pFilePath, pFilePathW, hashedName32, flags, pExistingData, pInitFence, pDoneFence, &initNotification, &pDataBufferNode); } ma_resource_manager_data_buffer_bst_unlock(pResourceManager); if (result == MA_ALREADY_EXISTS) { nodeAlreadyExists = MA_TRUE; result = MA_SUCCESS; } else { if (result != MA_SUCCESS) { return result; } } /* If we're loading synchronously, we'll need to load everything now. When loading asynchronously, a job will have been posted inside the BST critical section so that an uninitialization can be allocated an appropriate execution order thereby preventing it from being uninitialized before the node is initialized by the decoding thread(s). */ if (nodeAlreadyExists == MA_FALSE) { /* Don't need to try loading anything if the node already exists. */ if (pFilePath == NULL && pFilePathW == NULL) { /* If this path is hit, it means a buffer is being copied (i.e. initialized from only the hashed name), but that node has been freed in the meantime, probably from some other thread. This is an invalid operation. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Cloning data buffer node failed because the source node was released. The source node must remain valid until the cloning has completed.\n"); result = MA_INVALID_OPERATION; goto done; } if (pDataBufferNode->isDataOwnedByResourceManager) { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0) { /* Loading synchronously. Load the sound in it's entirety here. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) == 0) { /* No decoding. This is the simple case - just store the file contents in memory. */ result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW); if (result != MA_SUCCESS) { goto done; } } else { /* Decoding. We do this the same way as we do when loading asynchronously. */ ma_decoder* pDecoder; result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW, flags, &pDecoder); if (result != MA_SUCCESS) { goto done; } /* We have the decoder, now decode page by page just like we do when loading asynchronously. */ for (;;) { /* Decode next page. */ result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, pDecoder); if (result != MA_SUCCESS) { break; /* Will return MA_AT_END when the last page has been decoded. */ } } /* Reaching the end needs to be considered successful. */ if (result == MA_AT_END) { result = MA_SUCCESS; } /* At this point the data buffer is either fully decoded or some error occurred. Either way, the decoder is no longer necessary. */ ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); } /* Getting here means we were successful. Make sure the status of the node is updated accordingly. */ ma_atomic_exchange_i32(&pDataBufferNode->result, result); } else { /* Loading asynchronously. We may need to wait for initialization. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_wait(&initNotification); } } } else { /* The data is not managed by the resource manager so there's nothing else to do. */ MA_ASSERT(pExistingData != NULL); } } done: /* If we failed to initialize the data buffer we need to free it. */ if (result != MA_SUCCESS) { if (nodeAlreadyExists == MA_FALSE) { ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks); } } /* The init notification needs to be uninitialized. This will be used if the node does not already exist, and we've specified ASYNC | WAIT_INIT. */ if (nodeAlreadyExists == MA_FALSE && pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(&initNotification); } } if (ppDataBufferNode != NULL) { *ppDataBufferNode = pDataBufferNode; } return result; } static ma_result ma_resource_manager_data_buffer_node_unacquire(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pName, const wchar_t* pNameW) { ma_result result = MA_SUCCESS; ma_uint32 refCount = 0xFFFFFFFF; /* The new reference count of the node after decrementing. Initialize to non-0 to be safe we don't fall into the freeing path. */ ma_uint32 hashedName32 = 0; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } if (pDataBufferNode == NULL) { if (pName == NULL && pNameW == NULL) { return MA_INVALID_ARGS; } if (pName != NULL) { hashedName32 = ma_hash_string_32(pName); } else { hashedName32 = ma_hash_string_w_32(pNameW); } } /* The first thing to do is decrement the reference counter of the node. Then, if the reference count is zero, we need to free the node. If the node is still in the process of loading, we'll need to post a job to the job queue to free the node. Otherwise we'll just do it here. */ ma_resource_manager_data_buffer_bst_lock(pResourceManager); { /* Might need to find the node. Must be done inside the critical section. */ if (pDataBufferNode == NULL) { result = ma_resource_manager_data_buffer_node_search(pResourceManager, hashedName32, &pDataBufferNode); if (result != MA_SUCCESS) { goto stage2; /* Couldn't find the node. */ } } result = ma_resource_manager_data_buffer_node_decrement_ref(pResourceManager, pDataBufferNode, &refCount); if (result != MA_SUCCESS) { goto stage2; /* Should never happen. */ } if (refCount == 0) { result = ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode); if (result != MA_SUCCESS) { goto stage2; /* An error occurred when trying to remove the data buffer. This should never happen. */ } } } ma_resource_manager_data_buffer_bst_unlock(pResourceManager); stage2: if (result != MA_SUCCESS) { return result; } /* Here is where we need to free the node. We don't want to do this inside the critical section above because we want to keep that as small as possible for multi-threaded efficiency. */ if (refCount == 0) { if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) { /* The sound is still loading. We need to delay the freeing of the node to a safe time. */ ma_job job; /* We need to mark the node as unavailable for the sake of the resource manager worker threads. */ ma_atomic_exchange_i32(&pDataBufferNode->result, MA_UNAVAILABLE); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE); job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); job.data.resourceManager.freeDataBufferNode.pResourceManager = pResourceManager; job.data.resourceManager.freeDataBufferNode.pDataBufferNode = pDataBufferNode; result = ma_resource_manager_post_job(pResourceManager, &job); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE job. %s.\n", ma_result_description(result)); return result; } /* If we don't support threading, process the job queue here. */ if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { while (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) { result = ma_resource_manager_process_next_job(pResourceManager); if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) { result = MA_SUCCESS; break; } } } else { /* Threading is enabled. The job queue will deal with the rest of the cleanup from here. */ } } else { /* The sound isn't loading so we can just free the node here. */ ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); } } return result; } static ma_uint32 ma_resource_manager_data_buffer_next_execution_order(ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pDataBuffer != NULL); return ma_atomic_fetch_add_32(&pDataBuffer->executionCounter, 1); } static ma_result ma_resource_manager_data_buffer_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_resource_manager_data_buffer_read_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_resource_manager_data_buffer_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_resource_manager_data_buffer_seek_to_pcm_frame((ma_resource_manager_data_buffer*)pDataSource, frameIndex); } static ma_result ma_resource_manager_data_buffer_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_resource_manager_data_buffer_get_data_format((ma_resource_manager_data_buffer*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pCursor); } static ma_result ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_resource_manager_data_buffer_get_length_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pLength); } static ma_result ma_resource_manager_data_buffer_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_resource_manager_data_buffer* pDataBuffer = (ma_resource_manager_data_buffer*)pDataSource; MA_ASSERT(pDataBuffer != NULL); ma_atomic_exchange_32(&pDataBuffer->isLooping, isLooping); /* The looping state needs to be set on the connector as well or else looping won't work when we read audio data. */ ma_data_source_set_looping(ma_resource_manager_data_buffer_get_connector(pDataBuffer), isLooping); return MA_SUCCESS; } static ma_data_source_vtable g_ma_resource_manager_data_buffer_vtable = { ma_resource_manager_data_buffer_cb__read_pcm_frames, ma_resource_manager_data_buffer_cb__seek_to_pcm_frame, ma_resource_manager_data_buffer_cb__get_data_format, ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames, ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames, ma_resource_manager_data_buffer_cb__set_looping, 0 }; static ma_result ma_resource_manager_data_buffer_init_ex_internal(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_uint32 hashedName32, ma_resource_manager_data_buffer* pDataBuffer) { ma_result result = MA_SUCCESS; ma_resource_manager_data_buffer_node* pDataBufferNode; ma_data_source_config dataSourceConfig; ma_bool32 async; ma_uint32 flags; ma_resource_manager_pipeline_notifications notifications; if (pDataBuffer == NULL) { if (pConfig != NULL && pConfig->pNotifications != NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications); } return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataBuffer); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pNotifications != NULL) { notifications = *pConfig->pNotifications; /* From here on out we should be referencing `notifications` instead of `pNotifications`. Set this to NULL to catch errors at testing time. */ } else { MA_ZERO_OBJECT(¬ifications); } /* For safety, always remove the ASYNC flag if threading is disabled on the resource manager. */ flags = pConfig->flags; if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) { flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC; } if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } async = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0; /* Fences need to be acquired before doing anything. These must be acquired and released outside of the node to ensure there's no holes where ma_fence_wait() could prematurely return before the data buffer has completed initialization. When loading asynchronously, the node acquisition routine below will acquire the fences on this thread and then release them on the async thread when the operation is complete. These fences are always released at the "done" tag at the end of this function. They'll be acquired a second if loading asynchronously. This double acquisition system is just done to simplify code maintenance. */ ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); { /* We first need to acquire a node. If ASYNC is not set, this will not return until the entire sound has been loaded. */ result = ma_resource_manager_data_buffer_node_acquire(pResourceManager, pConfig->pFilePath, pConfig->pFilePathW, hashedName32, flags, NULL, notifications.init.pFence, notifications.done.pFence, &pDataBufferNode); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_resource_manager_data_buffer_vtable; result = ma_data_source_init(&dataSourceConfig, &pDataBuffer->ds); if (result != MA_SUCCESS) { ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL); ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } pDataBuffer->pResourceManager = pResourceManager; pDataBuffer->pNode = pDataBufferNode; pDataBuffer->flags = flags; pDataBuffer->result = MA_BUSY; /* Always default to MA_BUSY for safety. It'll be overwritten when loading completes or an error occurs. */ /* If we're loading asynchronously we need to post a job to the job queue to initialize the connector. */ if (async == MA_FALSE || ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_SUCCESS) { /* Loading synchronously or the data has already been fully loaded. We can just initialize the connector from here without a job. */ result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, pConfig, NULL, NULL); ma_atomic_exchange_i32(&pDataBuffer->result, result); ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); goto done; } else { /* The node's data supply isn't initialized yet. The caller has requested that we load asynchronously so we need to post a job to do this. */ ma_job job; ma_resource_manager_inline_notification initNotification; /* Used when the WAIT_INIT flag is set. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_init(pResourceManager, &initNotification); } /* The status of the data buffer needs to be set to MA_BUSY before posting the job so that the worker thread is aware of its busy state. If the LOAD_DATA_BUFFER job sees a status other than MA_BUSY, it'll assume an error and fall through to an early exit. */ ma_atomic_exchange_i32(&pDataBuffer->result, MA_BUSY); /* Acquire fences a second time. These will be released by the async thread. */ ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER); job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer); job.data.resourceManager.loadDataBuffer.pDataBuffer = pDataBuffer; job.data.resourceManager.loadDataBuffer.pInitNotification = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? &initNotification : notifications.init.pNotification; job.data.resourceManager.loadDataBuffer.pDoneNotification = notifications.done.pNotification; job.data.resourceManager.loadDataBuffer.pInitFence = notifications.init.pFence; job.data.resourceManager.loadDataBuffer.pDoneFence = notifications.done.pFence; job.data.resourceManager.loadDataBuffer.rangeBegInPCMFrames = pConfig->rangeBegInPCMFrames; job.data.resourceManager.loadDataBuffer.rangeEndInPCMFrames = pConfig->rangeEndInPCMFrames; job.data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames = pConfig->loopPointBegInPCMFrames; job.data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames = pConfig->loopPointEndInPCMFrames; job.data.resourceManager.loadDataBuffer.isLooping = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0; /* If we need to wait for initialization to complete we can just process the job in place. */ if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { result = ma_job_process(&job); } else { result = ma_resource_manager_post_job(pResourceManager, &job); } if (result != MA_SUCCESS) { /* We failed to post the job. Most likely there isn't enough room in the queue's buffer. */ ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER job. %s.\n", ma_result_description(result)); ma_atomic_exchange_i32(&pDataBuffer->result, result); /* Release the fences after the result has been set on the data buffer. */ ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); } else { if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_wait(&initNotification); if (notifications.init.pNotification != NULL) { ma_async_notification_signal(notifications.init.pNotification); } /* NOTE: Do not release the init fence here. It will have been done by the job. */ /* Make sure we return an error if initialization failed on the async thread. */ result = ma_resource_manager_data_buffer_result(pDataBuffer); if (result == MA_BUSY) { result = MA_SUCCESS; } } } if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { ma_resource_manager_inline_notification_uninit(&initNotification); } } if (result != MA_SUCCESS) { ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL); goto done; } } done: if (result == MA_SUCCESS) { if (pConfig->initialSeekPointInPCMFrames > 0) { ma_resource_manager_data_buffer_seek_to_pcm_frame(pDataBuffer, pConfig->initialSeekPointInPCMFrames); } } ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); return result; } MA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer) { return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, pConfig, 0, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer) { ma_resource_manager_data_source_config config; if (pExistingDataBuffer == NULL) { return MA_INVALID_ARGS; } MA_ASSERT(pExistingDataBuffer->pNode != NULL); /* <-- If you've triggered this, you've passed in an invalid existing data buffer. */ config = ma_resource_manager_data_source_config_init(); config.flags = pExistingDataBuffer->flags; return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, &config, pExistingDataBuffer->pNode->hashedName32, pDataBuffer); } static ma_result ma_resource_manager_data_buffer_uninit_internal(ma_resource_manager_data_buffer* pDataBuffer) { MA_ASSERT(pDataBuffer != NULL); /* The connector should be uninitialized first. */ ma_resource_manager_data_buffer_uninit_connector(pDataBuffer->pResourceManager, pDataBuffer); /* With the connector uninitialized we can unacquire the node. */ ma_resource_manager_data_buffer_node_unacquire(pDataBuffer->pResourceManager, pDataBuffer->pNode, NULL, NULL); /* The base data source needs to be uninitialized as well. */ ma_data_source_uninit(&pDataBuffer->ds); return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer) { ma_result result; if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_result(pDataBuffer) == MA_SUCCESS) { /* The data buffer can be deleted synchronously. */ return ma_resource_manager_data_buffer_uninit_internal(pDataBuffer); } else { /* The data buffer needs to be deleted asynchronously because it's still loading. With the status set to MA_UNAVAILABLE, no more pages will be loaded and the uninitialization should happen fairly quickly. Since the caller owns the data buffer, we need to wait for this event to get processed before returning. */ ma_resource_manager_inline_notification notification; ma_job job; /* We need to mark the node as unavailable so we don't try reading from it anymore, but also to let the loading thread know that it needs to abort it's loading procedure. */ ma_atomic_exchange_i32(&pDataBuffer->result, MA_UNAVAILABLE); result = ma_resource_manager_inline_notification_init(pDataBuffer->pResourceManager, ¬ification); if (result != MA_SUCCESS) { return result; /* Failed to create the notification. This should rarely, if ever, happen. */ } job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER); job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer); job.data.resourceManager.freeDataBuffer.pDataBuffer = pDataBuffer; job.data.resourceManager.freeDataBuffer.pDoneNotification = ¬ification; job.data.resourceManager.freeDataBuffer.pDoneFence = NULL; result = ma_resource_manager_post_job(pDataBuffer->pResourceManager, &job); if (result != MA_SUCCESS) { ma_resource_manager_inline_notification_uninit(¬ification); return result; } ma_resource_manager_inline_notification_wait_and_uninit(¬ification); } return result; } MA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 framesRead = 0; ma_bool32 isDecodedBufferBusy = MA_FALSE; /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } /* We cannot be using the data buffer after it's been uninitialized. If you trigger this assert it means you're trying to read from the data buffer after it's been uninitialized or is in the process of uninitializing. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); /* If the node is not initialized we need to abort with a busy code. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { return MA_BUSY; /* Still loading. */ } /* If we've got a seek scheduled we'll want to do that before reading. However, for paged buffers, there's a chance that the sound hasn't yet been decoded up to the seek point will result in the seek failing. If this happens, we need to keep the seek scheduled and return MA_BUSY. */ if (pDataBuffer->seekToCursorOnNextRead) { pDataBuffer->seekToCursorOnNextRead = MA_FALSE; result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pDataBuffer->seekTargetInPCMFrames); if (result != MA_SUCCESS) { if (result == MA_BAD_SEEK && ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded_paged) { pDataBuffer->seekToCursorOnNextRead = MA_TRUE; /* Keep the seek scheduled. We just haven't loaded enough data yet to do the seek properly. */ return MA_BUSY; } return result; } } /* For decoded buffers (not paged) we need to check beforehand how many frames we have available. We cannot exceed this amount. We'll read as much as we can, and then return MA_BUSY. */ if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded) { ma_uint64 availableFrames; isDecodedBufferBusy = (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY); if (ma_resource_manager_data_buffer_get_available_frames(pDataBuffer, &availableFrames) == MA_SUCCESS) { /* Don't try reading more than the available frame count if the data buffer node is still loading. */ if (isDecodedBufferBusy) { if (frameCount > availableFrames) { frameCount = availableFrames; /* If there's no frames available we want to set the status to MA_AT_END. The logic below will check if the node is busy, and if so, change it to MA_BUSY. The reason we do this is because we don't want to call `ma_data_source_read_pcm_frames()` if the frame count is 0 because that'll result in a situation where it's possible MA_AT_END won't get returned. */ if (frameCount == 0) { result = MA_AT_END; } } else { isDecodedBufferBusy = MA_FALSE; /* We have enough frames available in the buffer to avoid a MA_BUSY status. */ } } else { /* Getting here means the buffer has been fully loaded. We can just pass the frame count straight into ma_data_source_read_pcm_frames() below and let ma_data_source handle it. */ } } } /* Don't attempt to read anything if we've got no frames available. */ if (frameCount > 0) { result = ma_data_source_read_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pFramesOut, frameCount, &framesRead); } /* If we returned MA_AT_END, but the node is still loading, we don't want to return that code or else the caller will interpret the sound as at the end and terminate decoding. */ if (result == MA_AT_END) { if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) { result = MA_BUSY; } } if (isDecodedBufferBusy) { result = MA_BUSY; } if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (result == MA_SUCCESS && framesRead == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex) { ma_result result; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); /* If we haven't yet got a connector we need to abort. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) { pDataBuffer->seekTargetInPCMFrames = frameIndex; pDataBuffer->seekToCursorOnNextRead = MA_TRUE; return MA_BUSY; /* Still loading. */ } result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), frameIndex); if (result != MA_SUCCESS) { return result; } pDataBuffer->seekTargetInPCMFrames = ~(ma_uint64)0; /* <-- For identification purposes. */ pDataBuffer->seekToCursorOnNextRead = MA_FALSE; return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_data_source_get_data_format(&pDataBuffer->connector.decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); }; case ma_resource_manager_data_supply_type_decoded: { *pFormat = pDataBuffer->pNode->data.backend.decoded.format; *pChannels = pDataBuffer->pNode->data.backend.decoded.channels; *pSampleRate = pDataBuffer->pNode->data.backend.decoded.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels); return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_decoded_paged: { *pFormat = pDataBuffer->pNode->data.backend.decodedPaged.data.format; *pChannels = pDataBuffer->pNode->data.backend.decodedPaged.data.channels; *pSampleRate = pDataBuffer->pNode->data.backend.decodedPaged.sampleRate; ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels); return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_unknown: { return MA_BUSY; /* Still loading. */ }; default: { /* Unknown supply type. Should never hit this. */ return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); if (pDataBuffer == NULL || pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_decoder_get_cursor_in_pcm_frames(&pDataBuffer->connector.decoder, pCursor); }; case ma_resource_manager_data_supply_type_decoded: { return ma_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.buffer, pCursor); }; case ma_resource_manager_data_supply_type_decoded_paged: { return ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, pCursor); }; case ma_resource_manager_data_supply_type_unknown: { return MA_BUSY; }; default: { return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE); if (pDataBuffer == NULL || pLength == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) { return MA_BUSY; /* Still loading. */ } return ma_data_source_get_length_in_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pLength); } MA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer) { if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBuffer->result); /* Need a naughty const-cast here. */ } MA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping) { return ma_data_source_set_looping(pDataBuffer, isLooping); } MA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer) { return ma_data_source_is_looping(pDataBuffer); } MA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataBuffer == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) { if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) { return MA_BUSY; } else { return MA_INVALID_OPERATION; /* No connector. */ } } switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode)) { case ma_resource_manager_data_supply_type_encoded: { return ma_decoder_get_available_frames(&pDataBuffer->connector.decoder, pAvailableFrames); }; case ma_resource_manager_data_supply_type_decoded: { return ma_audio_buffer_get_available_frames(&pDataBuffer->connector.buffer, pAvailableFrames); }; case ma_resource_manager_data_supply_type_decoded_paged: { ma_uint64 cursor; ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, &cursor); if (pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount > cursor) { *pAvailableFrames = pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount - cursor; } else { *pAvailableFrames = 0; } return MA_SUCCESS; }; case ma_resource_manager_data_supply_type_unknown: default: { /* Unknown supply type. Should never hit this. */ return MA_INVALID_ARGS; } } } MA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pFilePath, NULL, 0, flags, NULL, NULL, NULL, NULL); } MA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, NULL, pFilePath, 0, flags, NULL, NULL, NULL, NULL); } static ma_result ma_resource_manager_register_data(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, ma_resource_manager_data_supply* pExistingData) { return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pName, pNameW, 0, 0, pExistingData, NULL, NULL, NULL); } static ma_result ma_resource_manager_register_decoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { ma_resource_manager_data_supply data; data.type = ma_resource_manager_data_supply_type_decoded; data.backend.decoded.pData = pData; data.backend.decoded.totalFrameCount = frameCount; data.backend.decoded.format = format; data.backend.decoded.channels = channels; data.backend.decoded.sampleRate = sampleRate; return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data); } MA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { return ma_resource_manager_register_decoded_data_internal(pResourceManager, pName, NULL, pData, frameCount, format, channels, sampleRate); } MA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { return ma_resource_manager_register_decoded_data_internal(pResourceManager, NULL, pName, pData, frameCount, format, channels, sampleRate); } static ma_result ma_resource_manager_register_encoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, size_t sizeInBytes) { ma_resource_manager_data_supply data; data.type = ma_resource_manager_data_supply_type_encoded; data.backend.encoded.pData = pData; data.backend.encoded.sizeInBytes = sizeInBytes; return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data); } MA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes) { return ma_resource_manager_register_encoded_data_internal(pResourceManager, pName, NULL, pData, sizeInBytes); } MA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes) { return ma_resource_manager_register_encoded_data_internal(pResourceManager, NULL, pName, pData, sizeInBytes); } MA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath) { return ma_resource_manager_unregister_data(pResourceManager, pFilePath); } MA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath) { return ma_resource_manager_unregister_data_w(pResourceManager, pFilePath); } MA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName) { return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, pName, NULL); } MA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName) { return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, NULL, pName); } static ma_uint32 ma_resource_manager_data_stream_next_execution_order(ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_fetch_add_32(&pDataStream->executionCounter, 1); } static ma_bool32 ma_resource_manager_data_stream_is_decoder_at_end(const ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_load_32((ma_bool32*)&pDataStream->isDecoderAtEnd); } static ma_uint32 ma_resource_manager_data_stream_seek_counter(const ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); return ma_atomic_load_32((ma_uint32*)&pDataStream->seekCounter); } static ma_result ma_resource_manager_data_stream_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { return ma_resource_manager_data_stream_read_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pFramesOut, frameCount, pFramesRead); } static ma_result ma_resource_manager_data_stream_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex) { return ma_resource_manager_data_stream_seek_to_pcm_frame((ma_resource_manager_data_stream*)pDataSource, frameIndex); } static ma_result ma_resource_manager_data_stream_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { return ma_resource_manager_data_stream_get_data_format((ma_resource_manager_data_stream*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } static ma_result ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor) { return ma_resource_manager_data_stream_get_cursor_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pCursor); } static ma_result ma_resource_manager_data_stream_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength) { return ma_resource_manager_data_stream_get_length_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pLength); } static ma_result ma_resource_manager_data_stream_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping) { ma_resource_manager_data_stream* pDataStream = (ma_resource_manager_data_stream*)pDataSource; MA_ASSERT(pDataStream != NULL); ma_atomic_exchange_32(&pDataStream->isLooping, isLooping); return MA_SUCCESS; } static ma_data_source_vtable g_ma_resource_manager_data_stream_vtable = { ma_resource_manager_data_stream_cb__read_pcm_frames, ma_resource_manager_data_stream_cb__seek_to_pcm_frame, ma_resource_manager_data_stream_cb__get_data_format, ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames, ma_resource_manager_data_stream_cb__get_length_in_pcm_frames, ma_resource_manager_data_stream_cb__set_looping, 0 /*MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT*/ }; static void ma_resource_manager_data_stream_set_absolute_cursor(ma_resource_manager_data_stream* pDataStream, ma_uint64 absoluteCursor) { /* Loop if possible. */ if (absoluteCursor > pDataStream->totalLengthInPCMFrames && pDataStream->totalLengthInPCMFrames > 0) { absoluteCursor = absoluteCursor % pDataStream->totalLengthInPCMFrames; } ma_atomic_exchange_64(&pDataStream->absoluteCursor, absoluteCursor); } MA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream) { ma_result result; ma_data_source_config dataSourceConfig; char* pFilePathCopy = NULL; wchar_t* pFilePathWCopy = NULL; ma_job job; ma_bool32 waitBeforeReturning = MA_FALSE; ma_resource_manager_inline_notification waitNotification; ma_resource_manager_pipeline_notifications notifications; ma_uint32 flags; if (pDataStream == NULL) { if (pConfig != NULL && pConfig->pNotifications != NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications); } return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataStream); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pNotifications != NULL) { notifications = *pConfig->pNotifications; /* From here on out, `notifications` should be used instead of `pNotifications`. Setting this to NULL to catch any errors at testing time. */ } else { MA_ZERO_OBJECT(¬ifications); } dataSourceConfig = ma_data_source_config_init(); dataSourceConfig.vtable = &g_ma_resource_manager_data_stream_vtable; result = ma_data_source_init(&dataSourceConfig, &pDataStream->ds); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return result; } flags = pConfig->flags; if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } pDataStream->pResourceManager = pResourceManager; pDataStream->flags = pConfig->flags; pDataStream->result = MA_BUSY; ma_data_source_set_range_in_pcm_frames(pDataStream, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); ma_data_source_set_loop_point_in_pcm_frames(pDataStream, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); ma_data_source_set_looping(pDataStream, (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0); if (pResourceManager == NULL || (pConfig->pFilePath == NULL && pConfig->pFilePathW == NULL)) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return MA_INVALID_ARGS; } /* We want all access to the VFS and the internal decoder to happen on the job thread just to keep things easier to manage for the VFS. */ /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */ if (pConfig->pFilePath != NULL) { pFilePathCopy = ma_copy_string(pConfig->pFilePath, &pResourceManager->config.allocationCallbacks); } else { pFilePathWCopy = ma_copy_string_w(pConfig->pFilePathW, &pResourceManager->config.allocationCallbacks); } if (pFilePathCopy == NULL && pFilePathWCopy == NULL) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); return MA_OUT_OF_MEMORY; } /* We need to check for the presence of MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC. If it's not set, we need to wait before returning. Otherwise we can return immediately. Likewise, we'll also check for MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT and do the same. */ if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0 || (pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) { waitBeforeReturning = MA_TRUE; ma_resource_manager_inline_notification_init(pResourceManager, &waitNotification); } ma_resource_manager_pipeline_notifications_acquire_all_fences(¬ifications); /* Set the absolute cursor to our initial seek position so retrieval of the cursor returns a good value. */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, pConfig->initialSeekPointInPCMFrames); /* We now have everything we need to post the job. This is the last thing we need to do from here. The rest will be done by the job thread. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.loadDataStream.pDataStream = pDataStream; job.data.resourceManager.loadDataStream.pFilePath = pFilePathCopy; job.data.resourceManager.loadDataStream.pFilePathW = pFilePathWCopy; job.data.resourceManager.loadDataStream.initialSeekPoint = pConfig->initialSeekPointInPCMFrames; job.data.resourceManager.loadDataStream.pInitNotification = (waitBeforeReturning == MA_TRUE) ? &waitNotification : notifications.init.pNotification; job.data.resourceManager.loadDataStream.pInitFence = notifications.init.pFence; result = ma_resource_manager_post_job(pResourceManager, &job); if (result != MA_SUCCESS) { ma_resource_manager_pipeline_notifications_signal_all_notifications(¬ifications); ma_resource_manager_pipeline_notifications_release_all_fences(¬ifications); if (waitBeforeReturning) { ma_resource_manager_inline_notification_uninit(&waitNotification); } ma_free(pFilePathCopy, &pResourceManager->config.allocationCallbacks); ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks); return result; } /* Wait if needed. */ if (waitBeforeReturning) { ma_resource_manager_inline_notification_wait_and_uninit(&waitNotification); if (notifications.init.pNotification != NULL) { ma_async_notification_signal(notifications.init.pNotification); } /* If there was an error during initialization make sure we return that result here. We don't want to do this if we're not waiting because it will most likely be in a busy state. */ if (pDataStream->result != MA_SUCCESS) { return pDataStream->result; } /* NOTE: Do not release pInitFence here. That will be done by the job. */ } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream); } MA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pFilePath; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream); } MA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream) { ma_resource_manager_inline_notification freeEvent; ma_job job; if (pDataStream == NULL) { return MA_INVALID_ARGS; } /* The first thing to do is set the result to unavailable. This will prevent future page decoding. */ ma_atomic_exchange_i32(&pDataStream->result, MA_UNAVAILABLE); /* We need to post a job to ensure we're not in the middle or decoding or anything. Because the object is owned by the caller, we'll need to wait for it to complete before returning which means we need an event. */ ma_resource_manager_inline_notification_init(pDataStream->pResourceManager, &freeEvent); job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.freeDataStream.pDataStream = pDataStream; job.data.resourceManager.freeDataStream.pDoneNotification = &freeEvent; job.data.resourceManager.freeDataStream.pDoneFence = NULL; ma_resource_manager_post_job(pDataStream->pResourceManager, &job); /* We need to wait for the job to finish processing before we return. */ ma_resource_manager_inline_notification_wait_and_uninit(&freeEvent); return MA_SUCCESS; } static ma_uint32 ma_resource_manager_data_stream_get_page_size_in_frames(ma_resource_manager_data_stream* pDataStream) { MA_ASSERT(pDataStream != NULL); MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE); return MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDataStream->decoder.outputSampleRate/1000); } static void* ma_resource_manager_data_stream_get_page_data_pointer(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex, ma_uint32 relativeCursor) { MA_ASSERT(pDataStream != NULL); MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE); MA_ASSERT(pageIndex == 0 || pageIndex == 1); return ma_offset_ptr(pDataStream->pPageData, ((ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * pageIndex) + relativeCursor) * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels)); } static void ma_resource_manager_data_stream_fill_page(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex) { ma_result result = MA_SUCCESS; ma_uint64 pageSizeInFrames; ma_uint64 totalFramesReadForThisPage = 0; void* pPageData = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pageIndex, 0); pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream); /* The decoder needs to inherit the stream's looping and range state. */ { ma_uint64 rangeBeg; ma_uint64 rangeEnd; ma_uint64 loopPointBeg; ma_uint64 loopPointEnd; ma_data_source_set_looping(&pDataStream->decoder, ma_resource_manager_data_stream_is_looping(pDataStream)); ma_data_source_get_range_in_pcm_frames(pDataStream, &rangeBeg, &rangeEnd); ma_data_source_set_range_in_pcm_frames(&pDataStream->decoder, rangeBeg, rangeEnd); ma_data_source_get_loop_point_in_pcm_frames(pDataStream, &loopPointBeg, &loopPointEnd); ma_data_source_set_loop_point_in_pcm_frames(&pDataStream->decoder, loopPointBeg, loopPointEnd); } /* Just read straight from the decoder. It will deal with ranges and looping for us. */ result = ma_data_source_read_pcm_frames(&pDataStream->decoder, pPageData, pageSizeInFrames, &totalFramesReadForThisPage); if (result == MA_AT_END || totalFramesReadForThisPage < pageSizeInFrames) { ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_TRUE); } ma_atomic_exchange_32(&pDataStream->pageFrameCount[pageIndex], (ma_uint32)totalFramesReadForThisPage); ma_atomic_exchange_32(&pDataStream->isPageValid[pageIndex], MA_TRUE); } static void ma_resource_manager_data_stream_fill_pages(ma_resource_manager_data_stream* pDataStream) { ma_uint32 iPage; MA_ASSERT(pDataStream != NULL); for (iPage = 0; iPage < 2; iPage += 1) { ma_resource_manager_data_stream_fill_page(pDataStream, iPage); } } static ma_result ma_resource_manager_data_stream_map(ma_resource_manager_data_stream* pDataStream, void** ppFramesOut, ma_uint64* pFrameCount) { ma_uint64 framesAvailable; ma_uint64 frameCount = 0; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pFrameCount != NULL) { frameCount = *pFrameCount; *pFrameCount = 0; } if (ppFramesOut != NULL) { *ppFramesOut = NULL; } if (pDataStream == NULL || ppFramesOut == NULL || pFrameCount == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */ if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) { return MA_BUSY; } /* If the page we're on is invalid it means we've caught up to the job thread. */ if (ma_atomic_load_32(&pDataStream->isPageValid[pDataStream->currentPageIndex]) == MA_FALSE) { framesAvailable = 0; } else { /* The page we're on is valid so we must have some frames available. We need to make sure that we don't overflow into the next page, even if it's valid. The reason is that the unmap process will only post an update for one page at a time. Keeping mapping tied to page boundaries makes this simpler. */ ma_uint32 currentPageFrameCount = ma_atomic_load_32(&pDataStream->pageFrameCount[pDataStream->currentPageIndex]); MA_ASSERT(currentPageFrameCount >= pDataStream->relativeCursor); framesAvailable = currentPageFrameCount - pDataStream->relativeCursor; } /* If there's no frames available and the result is set to MA_AT_END we need to return MA_AT_END. */ if (framesAvailable == 0) { if (ma_resource_manager_data_stream_is_decoder_at_end(pDataStream)) { return MA_AT_END; } else { return MA_BUSY; /* There are no frames available, but we're not marked as EOF so we might have caught up to the job thread. Need to return MA_BUSY and wait for more data. */ } } MA_ASSERT(framesAvailable > 0); if (frameCount > framesAvailable) { frameCount = framesAvailable; } *ppFramesOut = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pDataStream->currentPageIndex, pDataStream->relativeCursor); *pFrameCount = frameCount; return MA_SUCCESS; } static ma_result ma_resource_manager_data_stream_unmap(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameCount) { ma_uint32 newRelativeCursor; ma_uint32 pageSizeInFrames; ma_job job; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* The frame count should always fit inside a 32-bit integer. */ if (frameCount > 0xFFFFFFFF) { return MA_INVALID_ARGS; } pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream); /* The absolute cursor needs to be updated for ma_resource_manager_data_stream_get_cursor_in_pcm_frames(). */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, ma_atomic_load_64(&pDataStream->absoluteCursor) + frameCount); /* Here is where we need to check if we need to load a new page, and if so, post a job to load it. */ newRelativeCursor = pDataStream->relativeCursor + (ma_uint32)frameCount; /* If the new cursor has flowed over to the next page we need to mark the old one as invalid and post an event for it. */ if (newRelativeCursor >= pageSizeInFrames) { newRelativeCursor -= pageSizeInFrames; /* Here is where we post the job start decoding. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.pageDataStream.pDataStream = pDataStream; job.data.resourceManager.pageDataStream.pageIndex = pDataStream->currentPageIndex; /* The page needs to be marked as invalid so that the public API doesn't try reading from it. */ ma_atomic_exchange_32(&pDataStream->isPageValid[pDataStream->currentPageIndex], MA_FALSE); /* Before posting the job we need to make sure we set some state. */ pDataStream->relativeCursor = newRelativeCursor; pDataStream->currentPageIndex = (pDataStream->currentPageIndex + 1) & 0x01; return ma_resource_manager_post_job(pDataStream->pResourceManager, &job); } else { /* We haven't moved into a new page so we can just move the cursor forward. */ pDataStream->relativeCursor = newRelativeCursor; return MA_SUCCESS; } } MA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesProcessed; ma_format format; ma_uint32 channels; /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (frameCount == 0) { return MA_INVALID_ARGS; } /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */ if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) { return MA_BUSY; } ma_resource_manager_data_stream_get_data_format(pDataStream, &format, &channels, NULL, NULL, 0); /* Reading is implemented in terms of map/unmap. We need to run this in a loop because mapping is clamped against page boundaries. */ totalFramesProcessed = 0; while (totalFramesProcessed < frameCount) { void* pMappedFrames; ma_uint64 mappedFrameCount; mappedFrameCount = frameCount - totalFramesProcessed; result = ma_resource_manager_data_stream_map(pDataStream, &pMappedFrames, &mappedFrameCount); if (result != MA_SUCCESS) { break; } /* Copy the mapped data to the output buffer if we have one. It's allowed for pFramesOut to be NULL in which case a relative forward seek is performed. */ if (pFramesOut != NULL) { ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, format, channels), pMappedFrames, mappedFrameCount, format, channels); } totalFramesProcessed += mappedFrameCount; result = ma_resource_manager_data_stream_unmap(pDataStream, mappedFrameCount); if (result != MA_SUCCESS) { break; /* This is really bad - will only get an error here if we failed to post a job to the queue for loading the next page. */ } } if (pFramesRead != NULL) { *pFramesRead = totalFramesProcessed; } if (result == MA_SUCCESS && totalFramesProcessed == 0) { result = MA_AT_END; } return result; } MA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex) { ma_job job; ma_result streamResult; streamResult = ma_resource_manager_data_stream_result(pDataStream); /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(streamResult != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (streamResult != MA_SUCCESS && streamResult != MA_BUSY) { return MA_INVALID_OPERATION; } /* If we're not already seeking and we're sitting on the same frame, just make this a no-op. */ if (ma_atomic_load_32(&pDataStream->seekCounter) == 0) { if (ma_atomic_load_64(&pDataStream->absoluteCursor) == frameIndex) { return MA_SUCCESS; } } /* Increment the seek counter first to indicate to read_paged_pcm_frames() and map_paged_pcm_frames() that we are in the middle of a seek and MA_BUSY should be returned. */ ma_atomic_fetch_add_32(&pDataStream->seekCounter, 1); /* Update the absolute cursor so that ma_resource_manager_data_stream_get_cursor_in_pcm_frames() returns the new position. */ ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, frameIndex); /* We need to clear our currently loaded pages so that the stream starts playback from the new seek point as soon as possible. These are for the purpose of the public API and will be ignored by the seek job. The seek job will operate on the assumption that both pages have been marked as invalid and the cursor is at the start of the first page. */ pDataStream->relativeCursor = 0; pDataStream->currentPageIndex = 0; ma_atomic_exchange_32(&pDataStream->isPageValid[0], MA_FALSE); ma_atomic_exchange_32(&pDataStream->isPageValid[1], MA_FALSE); /* Make sure the data stream is not marked as at the end or else if we seek in response to hitting the end, we won't be able to read any more data. */ ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_FALSE); /* The public API is not allowed to touch the internal decoder so we need to use a job to perform the seek. When seeking, the job thread will assume both pages are invalid and any content contained within them will be discarded and replaced with newly decoded data. */ job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM); job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream); job.data.resourceManager.seekDataStream.pDataStream = pDataStream; job.data.resourceManager.seekDataStream.frameIndex = frameIndex; return ma_resource_manager_post_job(pDataStream->pResourceManager, &job); } MA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pFormat != NULL) { *pFormat = ma_format_unknown; } if (pChannels != NULL) { *pChannels = 0; } if (pSampleRate != NULL) { *pSampleRate = 0; } if (pChannelMap != NULL) { MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap); } if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { return MA_INVALID_OPERATION; } /* We're being a little bit naughty here and accessing the internal decoder from the public API. The output data format is constant, and we've defined this function such that the application is responsible for ensuring it's not called while uninitializing so it should be safe. */ return ma_data_source_get_data_format(&pDataStream->decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } MA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor) { ma_result result; if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } /* If the stream is in an erroneous state we need to return an invalid operation. We can allow this to be called when the data stream is in a busy state because the caller may have asked for an initial seek position and it's convenient to return that as the cursor position. */ result = ma_resource_manager_data_stream_result(pDataStream); if (result != MA_SUCCESS && result != MA_BUSY) { return MA_INVALID_OPERATION; } *pCursor = ma_atomic_load_64(&pDataStream->absoluteCursor); return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength) { ma_result streamResult; if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; streamResult = ma_resource_manager_data_stream_result(pDataStream); /* We cannot be using the data source after it's been uninitialized. */ MA_ASSERT(streamResult != MA_UNAVAILABLE); if (pDataStream == NULL) { return MA_INVALID_ARGS; } if (streamResult != MA_SUCCESS) { return streamResult; } /* We most definitely do not want to be calling ma_decoder_get_length_in_pcm_frames() directly. Instead we want to use a cached value that we calculated when we initialized it on the job thread. */ *pLength = pDataStream->totalLengthInPCMFrames; if (*pLength == 0) { return MA_NOT_IMPLEMENTED; /* Some decoders may not have a known length. */ } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream) { if (pDataStream == NULL) { return MA_INVALID_ARGS; } return (ma_result)ma_atomic_load_i32(&pDataStream->result); } MA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping) { return ma_data_source_set_looping(pDataStream, isLooping); } MA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream) { if (pDataStream == NULL) { return MA_FALSE; } return ma_atomic_load_32((ma_bool32*)&pDataStream->isLooping); /* Naughty const-cast. Value won't change from here in practice (maybe from another thread). */ } MA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames) { ma_uint32 pageIndex0; ma_uint32 pageIndex1; ma_uint32 relativeCursor; ma_uint64 availableFrames; if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataStream == NULL) { return MA_INVALID_ARGS; } pageIndex0 = pDataStream->currentPageIndex; pageIndex1 = (pDataStream->currentPageIndex + 1) & 0x01; relativeCursor = pDataStream->relativeCursor; availableFrames = 0; if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex0])) { availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex0]) - relativeCursor; if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex1])) { availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex1]); } } *pAvailableFrames = availableFrames; return MA_SUCCESS; } static ma_result ma_resource_manager_data_source_preinit(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSource); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pResourceManager == NULL) { return MA_INVALID_ARGS; } pDataSource->flags = pConfig->flags; if (pConfig->isLooping) { pDataSource->flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } return MA_SUCCESS; } MA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource) { ma_result result; result = ma_resource_manager_data_source_preinit(pResourceManager, pConfig, pDataSource); if (result != MA_SUCCESS) { return result; } /* The data source itself is just a data stream or a data buffer. */ if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_init_ex(pResourceManager, pConfig, &pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_init_ex(pResourceManager, pConfig, &pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePath = pName; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource); } MA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource) { ma_resource_manager_data_source_config config; config = ma_resource_manager_data_source_config_init(); config.pFilePathW = pName; config.flags = flags; config.pNotifications = pNotifications; return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource); } MA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource) { ma_result result; ma_resource_manager_data_source_config config; if (pExistingDataSource == NULL) { return MA_INVALID_ARGS; } config = ma_resource_manager_data_source_config_init(); config.flags = pExistingDataSource->flags; result = ma_resource_manager_data_source_preinit(pResourceManager, &config, pDataSource); if (result != MA_SUCCESS) { return result; } /* Copying can only be done from data buffers. Streams cannot be copied. */ if ((pExistingDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return MA_INVALID_OPERATION; } return ma_resource_manager_data_buffer_init_copy(pResourceManager, &pExistingDataSource->backend.buffer, &pDataSource->backend.buffer); } MA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } /* All we need to is uninitialize the underlying data buffer or data stream. */ if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_uninit(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_uninit(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { /* Safety. */ if (pFramesRead != NULL) { *pFramesRead = 0; } if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_read_pcm_frames(&pDataSource->backend.stream, pFramesOut, frameCount, pFramesRead); } else { return ma_resource_manager_data_buffer_read_pcm_frames(&pDataSource->backend.buffer, pFramesOut, frameCount, pFramesRead); } } MA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_seek_to_pcm_frame(&pDataSource->backend.stream, frameIndex); } else { return ma_resource_manager_data_buffer_seek_to_pcm_frame(&pDataSource->backend.buffer, frameIndex); } } MA_API ma_result ma_resource_manager_data_source_map(ma_resource_manager_data_source* pDataSource, void** ppFramesOut, ma_uint64* pFrameCount) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_map(&pDataSource->backend.stream, ppFramesOut, pFrameCount); } else { return MA_NOT_IMPLEMENTED; /* Mapping not supported with data buffers. */ } } MA_API ma_result ma_resource_manager_data_source_unmap(ma_resource_manager_data_source* pDataSource, ma_uint64 frameCount) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_unmap(&pDataSource->backend.stream, frameCount); } else { return MA_NOT_IMPLEMENTED; /* Mapping not supported with data buffers. */ } } MA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_data_format(&pDataSource->backend.stream, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } else { return ma_resource_manager_data_buffer_get_data_format(&pDataSource->backend.buffer, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } } MA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_cursor_in_pcm_frames(&pDataSource->backend.stream, pCursor); } else { return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(&pDataSource->backend.buffer, pCursor); } } MA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_length_in_pcm_frames(&pDataSource->backend.stream, pLength); } else { return ma_resource_manager_data_buffer_get_length_in_pcm_frames(&pDataSource->backend.buffer, pLength); } } MA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_result(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_result(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping) { if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_set_looping(&pDataSource->backend.stream, isLooping); } else { return ma_resource_manager_data_buffer_set_looping(&pDataSource->backend.buffer, isLooping); } } MA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource) { if (pDataSource == NULL) { return MA_FALSE; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_is_looping(&pDataSource->backend.stream); } else { return ma_resource_manager_data_buffer_is_looping(&pDataSource->backend.buffer); } } MA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames) { if (pAvailableFrames == NULL) { return MA_INVALID_ARGS; } *pAvailableFrames = 0; if (pDataSource == NULL) { return MA_INVALID_ARGS; } if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) { return ma_resource_manager_data_stream_get_available_frames(&pDataSource->backend.stream, pAvailableFrames); } else { return ma_resource_manager_data_buffer_get_available_frames(&pDataSource->backend.buffer, pAvailableFrames); } } MA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob) { if (pResourceManager == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_post(&pResourceManager->jobQueue, pJob); } MA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager) { ma_job job = ma_job_init(MA_JOB_TYPE_QUIT); return ma_resource_manager_post_job(pResourceManager, &job); } MA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob) { if (pResourceManager == NULL) { return MA_INVALID_ARGS; } return ma_job_queue_next(&pResourceManager->jobQueue, pJob); } static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.loadDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.loadDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); MA_ASSERT(pDataBufferNode->isDataOwnedByResourceManager == MA_TRUE); /* The data should always be owned by the resource manager. */ /* The data buffer is not getting deleted, but we may be getting executed out of order. If so, we need to push the job back onto the queue and return. */ if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */ } /* First thing we need to do is check whether or not the data buffer is getting deleted. If so we just abort. */ if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) != MA_BUSY) { result = ma_resource_manager_data_buffer_node_result(pDataBufferNode); /* The data buffer may be getting deleted before it's even been loaded. */ goto done; } /* We're ready to start loading. Essentially what we're doing here is initializing the data supply of the node. Once this is complete, data buffers can have their connectors initialized which will allow then to have audio data read from them. Note that when the data supply type has been moved away from "unknown", that is when other threads will determine that the node is available for data delivery and the data buffer connectors can be initialized. Therefore, it's important that it is set after the data supply has been initialized. */ if ((pJob->data.resourceManager.loadDataBufferNode.flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) != 0) { /* Decoding. This is the complex case because we're not going to be doing the entire decoding process here. Instead it's going to be split of multiple jobs and loaded in pages. The reason for this is to evenly distribute decoding time across multiple sounds, rather than having one huge sound hog all the available processing resources. The first thing we do is initialize a decoder. This is allocated on the heap and is passed around to the paging jobs. When the last paging job has completed it's processing, it'll free the decoder for us. This job does not do any actual decoding. It instead just posts a PAGE_DATA_BUFFER_NODE job which is where the actual decoding work will be done. However, once this job is complete, the node will be in a state where data buffer connectors can be initialized. */ ma_decoder* pDecoder; /* <-- Free'd on the last page decode. */ ma_job pageDataBufferNodeJob; /* Allocate the decoder by initializing a decoded data supply. */ result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW, pJob->data.resourceManager.loadDataBufferNode.flags, &pDecoder); /* Don't ever propagate an MA_BUSY result code or else the resource manager will think the node is just busy decoding rather than in an error state. This should never happen, but including this logic for safety just in case. */ if (result == MA_BUSY) { result = MA_ERROR; } if (result != MA_SUCCESS) { if (pJob->data.resourceManager.loadDataBufferNode.pFilePath != NULL) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to initialize data supply for \"%s\". %s.\n", pJob->data.resourceManager.loadDataBufferNode.pFilePath, ma_result_description(result)); } else { #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER) ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, "Failed to initialize data supply for \"%ls\", %s.\n", pJob->data.resourceManager.loadDataBufferNode.pFilePathW, ma_result_description(result)); #endif } goto done; } /* At this point the node's data supply is initialized and other threads can start initializing their data buffer connectors. However, no data will actually be available until we start to actually decode it. To do this, we need to post a paging job which is where the decoding work is done. Note that if an error occurred at an earlier point, this section will have been skipped. */ pageDataBufferNodeJob = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE); pageDataBufferNodeJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pResourceManager = pResourceManager; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDataBufferNode = pDataBufferNode; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDecoder = pDecoder; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneNotification = pJob->data.resourceManager.loadDataBufferNode.pDoneNotification; pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneFence = pJob->data.resourceManager.loadDataBufferNode.pDoneFence; /* The job has been set up so it can now be posted. */ result = ma_resource_manager_post_job(pResourceManager, &pageDataBufferNodeJob); /* When we get here, we want to make sure the result code is set to MA_BUSY. The reason for this is that the result will be copied over to the node's internal result variable. In this case, since the decoding is still in-progress, we need to make sure the result code is set to MA_BUSY. */ if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE job. %s\n", ma_result_description(result)); ma_decoder_uninit(pDecoder); ma_free(pDecoder, &pResourceManager->config.allocationCallbacks); } else { result = MA_BUSY; } } else { /* No decoding. This is the simple case. We need only read the file content into memory and we're done. */ result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW); } done: /* File paths are no longer needed. */ ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePath, &pResourceManager->config.allocationCallbacks); ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePathW, &pResourceManager->config.allocationCallbacks); /* We need to set the result to at the very end to ensure no other threads try reading the data before we've fully initialized the object. Other threads are going to be inspecting this variable to determine whether or not they're ready to read data. We can only change the result if it's set to MA_BUSY because otherwise we may be changing away from an error code which would be bad. An example is if the application creates a data buffer, but then immediately deletes it before we've got to this point. In this case, pDataBuffer->result will be MA_UNAVAILABLE, and setting it to MA_SUCCESS or any other error code would cause the buffer to look like it's in a state that it's not. */ ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result); /* At this point initialization is complete and we can signal the notification if any. */ if (pJob->data.resourceManager.loadDataBufferNode.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pInitNotification); } if (pJob->data.resourceManager.loadDataBufferNode.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pInitFence); } /* If we have a success result it means we've fully loaded the buffer. This will happen in the non-decoding case. */ if (result != MA_BUSY) { if (pJob->data.resourceManager.loadDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.loadDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pDoneFence); } } /* Increment the node's execution pointer so that the next jobs can be processed. This is how we keep decoding of pages in-order. */ ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); /* A busy result should be considered successful from the point of view of the job system. */ if (result == MA_BUSY) { result = MA_SUCCESS; } return result; } static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.freeDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.freeDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.freeDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataBufferNode.pDoneFence); } ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer_node* pDataBufferNode; MA_ASSERT(pJob != NULL); pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.pageDataBufferNode.pResourceManager; MA_ASSERT(pResourceManager != NULL); pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.pageDataBufferNode.pDataBufferNode; MA_ASSERT(pDataBufferNode != NULL); if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* Don't do any more decoding if the data buffer has started the uninitialization process. */ result = ma_resource_manager_data_buffer_node_result(pDataBufferNode); if (result != MA_BUSY) { goto done; } /* We're ready to decode the next page. */ result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, (ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder); /* If we have a success code by this point, we want to post another job. We're going to set the result back to MA_BUSY to make it clear that there's still more to load. */ if (result == MA_SUCCESS) { ma_job newJob; newJob = *pJob; /* Everything is the same as the input job, except the execution order. */ newJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode); /* We need a fresh execution order. */ result = ma_resource_manager_post_job(pResourceManager, &newJob); /* Since the sound isn't yet fully decoded we want the status to be set to busy. */ if (result == MA_SUCCESS) { result = MA_BUSY; } } done: /* If there's still more to decode the result will be set to MA_BUSY. Otherwise we can free the decoder. */ if (result != MA_BUSY) { ma_decoder_uninit((ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder); ma_free(pJob->data.resourceManager.pageDataBufferNode.pDecoder, &pResourceManager->config.allocationCallbacks); } /* If we reached the end we need to treat it as successful. */ if (result == MA_AT_END) { result = MA_SUCCESS; } /* Make sure we set the result of node in case some error occurred. */ ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result); /* Signal the notification after setting the result in case the notification callback wants to inspect the result code. */ if (result != MA_BUSY) { if (pJob->data.resourceManager.pageDataBufferNode.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.pageDataBufferNode.pDoneNotification); } if (pJob->data.resourceManager.pageDataBufferNode.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.pageDataBufferNode.pDoneFence); } } ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer* pDataBuffer; ma_resource_manager_data_supply_type dataSupplyType = ma_resource_manager_data_supply_type_unknown; ma_bool32 isConnectorInitialized = MA_FALSE; /* All we're doing here is checking if the node has finished loading. If not, we just re-post the job and keep waiting. Otherwise we increment the execution counter and set the buffer's result code. */ MA_ASSERT(pJob != NULL); pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.loadDataBuffer.pDataBuffer; MA_ASSERT(pDataBuffer != NULL); pResourceManager = pDataBuffer->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */ } /* First thing we need to do is check whether or not the data buffer is getting deleted. If so we just abort, but making sure we increment the execution pointer. */ result = ma_resource_manager_data_buffer_result(pDataBuffer); if (result != MA_BUSY) { goto done; /* <-- This will ensure the execution pointer is incremented. */ } else { result = MA_SUCCESS; /* <-- Make sure this is reset. */ (void)result; /* <-- This is to suppress a static analysis diagnostic about "result" not being used. But for safety when I do future maintenance I don't want to delete that assignment. */ } /* Try initializing the connector if we haven't already. */ isConnectorInitialized = ma_resource_manager_data_buffer_has_connector(pDataBuffer); if (isConnectorInitialized == MA_FALSE) { dataSupplyType = ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode); if (dataSupplyType != ma_resource_manager_data_supply_type_unknown) { /* We can now initialize the connector. If this fails, we need to abort. It's very rare for this to fail. */ ma_resource_manager_data_source_config dataSourceConfig; /* For setting initial looping state and range. */ dataSourceConfig = ma_resource_manager_data_source_config_init(); dataSourceConfig.rangeBegInPCMFrames = pJob->data.resourceManager.loadDataBuffer.rangeBegInPCMFrames; dataSourceConfig.rangeEndInPCMFrames = pJob->data.resourceManager.loadDataBuffer.rangeEndInPCMFrames; dataSourceConfig.loopPointBegInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames; dataSourceConfig.loopPointEndInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames; dataSourceConfig.isLooping = pJob->data.resourceManager.loadDataBuffer.isLooping; result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, &dataSourceConfig, pJob->data.resourceManager.loadDataBuffer.pInitNotification, pJob->data.resourceManager.loadDataBuffer.pInitFence); if (result != MA_SUCCESS) { ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, "Failed to initialize connector for data buffer. %s.\n", ma_result_description(result)); goto done; } } else { /* Don't have a known data supply type. Most likely the data buffer node is still loading, but it could be that an error occurred. */ } } else { /* The connector is already initialized. Nothing to do here. */ } /* If the data node is still loading, we need to repost the job and *not* increment the execution pointer (i.e. we need to not fall through to the "done" label). There is a hole between here and the where the data connector is initialized where the data buffer node may have finished initializing. We need to check for this by checking the result of the data buffer node and whether or not we had an unknown data supply type at the time of trying to initialize the data connector. */ result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode); if (result == MA_BUSY || (result == MA_SUCCESS && isConnectorInitialized == MA_FALSE && dataSupplyType == ma_resource_manager_data_supply_type_unknown)) { return ma_resource_manager_post_job(pResourceManager, pJob); } done: /* Only move away from a busy code so that we don't trash any existing error codes. */ ma_atomic_compare_and_swap_i32(&pDataBuffer->result, MA_BUSY, result); /* Only signal the other threads after the result has been set just for cleanliness sake. */ if (pJob->data.resourceManager.loadDataBuffer.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pDoneNotification); } if (pJob->data.resourceManager.loadDataBuffer.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pDoneFence); } /* If at this point the data buffer has not had it's connector initialized, it means the notification event was never signalled which means we need to signal it here. */ if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE && result != MA_SUCCESS) { if (pJob->data.resourceManager.loadDataBuffer.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pInitNotification); } if (pJob->data.resourceManager.loadDataBuffer.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pInitFence); } } ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_buffer* pDataBuffer; MA_ASSERT(pJob != NULL); pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.freeDataBuffer.pDataBuffer; MA_ASSERT(pDataBuffer != NULL); pResourceManager = pDataBuffer->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } ma_resource_manager_data_buffer_uninit_internal(pDataBuffer); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataBuffer.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataBuffer.pDoneNotification); } if (pJob->data.resourceManager.freeDataBuffer.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataBuffer.pDoneFence); } ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1); return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_decoder_config decoderConfig; ma_uint32 pageBufferSizeInBytes; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.loadDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } if (ma_resource_manager_data_stream_result(pDataStream) != MA_BUSY) { result = MA_INVALID_OPERATION; /* Most likely the data stream is being uninitialized. */ goto done; } /* We need to initialize the decoder first so we can determine the size of the pages. */ decoderConfig = ma_resource_manager__init_decoder_config(pResourceManager); if (pJob->data.resourceManager.loadDataStream.pFilePath != NULL) { result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePath, &decoderConfig, &pDataStream->decoder); } else { result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePathW, &decoderConfig, &pDataStream->decoder); } if (result != MA_SUCCESS) { goto done; } /* Retrieve the total length of the file before marking the decoder as loaded. */ if ((pDataStream->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) { result = ma_decoder_get_length_in_pcm_frames(&pDataStream->decoder, &pDataStream->totalLengthInPCMFrames); if (result != MA_SUCCESS) { goto done; /* Failed to retrieve the length. */ } } else { pDataStream->totalLengthInPCMFrames = 0; } /* Only mark the decoder as initialized when the length of the decoder has been retrieved because that can possibly require a scan over the whole file and we don't want to have another thread trying to access the decoder while it's scanning. */ pDataStream->isDecoderInitialized = MA_TRUE; /* We have the decoder so we can now initialize our page buffer. */ pageBufferSizeInBytes = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * 2 * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels); pDataStream->pPageData = ma_malloc(pageBufferSizeInBytes, &pResourceManager->config.allocationCallbacks); if (pDataStream->pPageData == NULL) { ma_decoder_uninit(&pDataStream->decoder); result = MA_OUT_OF_MEMORY; goto done; } /* Seek to our initial seek point before filling the initial pages. */ ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.loadDataStream.initialSeekPoint); /* We have our decoder and our page buffer, so now we need to fill our pages. */ ma_resource_manager_data_stream_fill_pages(pDataStream); /* And now we're done. We want to make sure the result is MA_SUCCESS. */ result = MA_SUCCESS; done: ma_free(pJob->data.resourceManager.loadDataStream.pFilePath, &pResourceManager->config.allocationCallbacks); ma_free(pJob->data.resourceManager.loadDataStream.pFilePathW, &pResourceManager->config.allocationCallbacks); /* We can only change the status away from MA_BUSY. If it's set to anything else it means an error has occurred somewhere or the uninitialization process has started (most likely). */ ma_atomic_compare_and_swap_i32(&pDataStream->result, MA_BUSY, result); /* Only signal the other threads after the result has been set just for cleanliness sake. */ if (pJob->data.resourceManager.loadDataStream.pInitNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.loadDataStream.pInitNotification); } if (pJob->data.resourceManager.loadDataStream.pInitFence != NULL) { ma_fence_release(pJob->data.resourceManager.loadDataStream.pInitFence); } ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob) { ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.freeDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* If our status is not MA_UNAVAILABLE we have a bug somewhere. */ MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) == MA_UNAVAILABLE); if (pDataStream->isDecoderInitialized) { ma_decoder_uninit(&pDataStream->decoder); } if (pDataStream->pPageData != NULL) { ma_free(pDataStream->pPageData, &pResourceManager->config.allocationCallbacks); pDataStream->pPageData = NULL; /* Just in case... */ } ma_data_source_uninit(&pDataStream->ds); /* The event needs to be signalled last. */ if (pJob->data.resourceManager.freeDataStream.pDoneNotification != NULL) { ma_async_notification_signal(pJob->data.resourceManager.freeDataStream.pDoneNotification); } if (pJob->data.resourceManager.freeDataStream.pDoneFence != NULL) { ma_fence_release(pJob->data.resourceManager.freeDataStream.pDoneFence); } /*ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);*/ return MA_SUCCESS; } static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.pageDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* For streams, the status should be MA_SUCCESS. */ if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) { result = MA_INVALID_OPERATION; goto done; } ma_resource_manager_data_stream_fill_page(pDataStream, pJob->data.resourceManager.pageDataStream.pageIndex); done: ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob) { ma_result result = MA_SUCCESS; ma_resource_manager* pResourceManager; ma_resource_manager_data_stream* pDataStream; MA_ASSERT(pJob != NULL); pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.seekDataStream.pDataStream; MA_ASSERT(pDataStream != NULL); pResourceManager = pDataStream->pResourceManager; if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) { return ma_resource_manager_post_job(pResourceManager, pJob); /* Out of order. */ } /* For streams the status should be MA_SUCCESS for this to do anything. */ if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS || pDataStream->isDecoderInitialized == MA_FALSE) { result = MA_INVALID_OPERATION; goto done; } /* With seeking we just assume both pages are invalid and the relative frame cursor at position 0. This is basically exactly the same as loading, except instead of initializing the decoder, we seek to a frame. */ ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.seekDataStream.frameIndex); /* After seeking we'll need to reload the pages. */ ma_resource_manager_data_stream_fill_pages(pDataStream); /* We need to let the public API know that we're done seeking. */ ma_atomic_fetch_sub_32(&pDataStream->seekCounter, 1); done: ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1); return result; } MA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob) { if (pResourceManager == NULL || pJob == NULL) { return MA_INVALID_ARGS; } return ma_job_process(pJob); } MA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager) { ma_result result; ma_job job; if (pResourceManager == NULL) { return MA_INVALID_ARGS; } /* This will return MA_CANCELLED if the next job is a quit job. */ result = ma_resource_manager_next_job(pResourceManager, &job); if (result != MA_SUCCESS) { return result; } return ma_job_process(&job); } #else /* We'll get here if the resource manager is being excluded from the build. We need to define the job processing callbacks as no-ops. */ static ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } static ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob) { return ma_job_process__noop(pJob); } #endif /* MA_NO_RESOURCE_MANAGER */ #ifndef MA_NO_NODE_GRAPH static ma_stack* ma_stack_init(size_t sizeInBytes, const ma_allocation_callbacks* pAllocationCallbacks) { ma_stack* pStack; if (sizeInBytes == 0) { return NULL; } pStack = (ma_stack*)ma_malloc(sizeof(*pStack) - sizeof(pStack->_data) + sizeInBytes, pAllocationCallbacks); if (pStack == NULL) { return NULL; } pStack->offset = 0; pStack->sizeInBytes = sizeInBytes; return pStack; } static void ma_stack_uninit(ma_stack* pStack, const ma_allocation_callbacks* pAllocationCallbacks) { if (pStack == NULL) { return; } ma_free(pStack, pAllocationCallbacks); } static void* ma_stack_alloc(ma_stack* pStack, size_t sz) { /* The size of the allocation is stored in the memory directly before the pointer. This needs to include padding to keep it aligned to ma_uintptr */ void* p = (void*)((char*)pStack->_data + pStack->offset); size_t* pSize = (size_t*)p; sz = (sz + (sizeof(ma_uintptr) - 1)) & ~(sizeof(ma_uintptr) - 1); /* Padding. */ if (pStack->offset + sz + sizeof(size_t) > pStack->sizeInBytes) { return NULL; /* Out of memory. */ } pStack->offset += sz + sizeof(size_t); *pSize = sz; return (void*)((char*)p + sizeof(size_t)); } static void ma_stack_free(ma_stack* pStack, void* p) { size_t* pSize; if (p == NULL) { return; } pSize = (size_t*)p - 1; pStack->offset -= *pSize + sizeof(size_t); } /* 10ms @ 48K = 480. Must never exceed 65535. */ #ifndef MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS #define MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS 480 #endif #ifndef MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL #define MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL 524288 #endif static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime); MA_API void ma_debug_fill_pcm_frames_with_sine_wave(float* pFramesOut, ma_uint32 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate) { #ifndef MA_NO_GENERATION { ma_waveform_config waveformConfig; ma_waveform waveform; waveformConfig = ma_waveform_config_init(format, channels, sampleRate, ma_waveform_type_sine, 1.0, 400); ma_waveform_init(&waveformConfig, &waveform); ma_waveform_read_pcm_frames(&waveform, pFramesOut, frameCount, NULL); } #else { (void)pFramesOut; (void)frameCount; (void)format; (void)channels; (void)sampleRate; #if defined(MA_DEBUG_OUTPUT) { #if _MSC_VER #pragma message ("ma_debug_fill_pcm_frames_with_sine_wave() will do nothing because MA_NO_GENERATION is enabled.") #endif } #endif } #endif } MA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels) { ma_node_graph_config config; MA_ZERO_OBJECT(&config); config.channels = channels; config.processingSizeInFrames = 0; return config; } static void ma_node_graph_set_is_reading(ma_node_graph* pNodeGraph, ma_bool32 isReading) { MA_ASSERT(pNodeGraph != NULL); ma_atomic_exchange_32(&pNodeGraph->isReading, isReading); } #if 0 static ma_bool32 ma_node_graph_is_reading(ma_node_graph* pNodeGraph) { MA_ASSERT(pNodeGraph != NULL); return ma_atomic_load_32(&pNodeGraph->isReading); } #endif static void ma_node_graph_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_graph* pNodeGraph = (ma_node_graph*)pNode; ma_uint64 framesRead; ma_node_graph_read_pcm_frames(pNodeGraph, ppFramesOut[0], *pFrameCountOut, &framesRead); *pFrameCountOut = (ma_uint32)framesRead; /* Safe cast. */ (void)ppFramesIn; (void)pFrameCountIn; } static ma_node_vtable g_node_graph_node_vtable = { ma_node_graph_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 0, /* 0 input buses. */ 1, /* 1 output bus. */ 0 /* Flags. */ }; static void ma_node_graph_endpoint_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { MA_ASSERT(pNode != NULL); MA_ASSERT(ma_node_get_input_bus_count(pNode) == 1); MA_ASSERT(ma_node_get_output_bus_count(pNode) == 1); /* Input channel count needs to be the same as the output channel count. */ MA_ASSERT(ma_node_get_input_channels(pNode, 0) == ma_node_get_output_channels(pNode, 0)); /* We don't need to do anything here because it's a passthrough. */ (void)pNode; (void)ppFramesIn; (void)pFrameCountIn; (void)ppFramesOut; (void)pFrameCountOut; #if 0 /* The data has already been mixed. We just need to move it to the output buffer. */ if (ppFramesIn != NULL) { ma_copy_pcm_frames(ppFramesOut[0], ppFramesIn[0], *pFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNode, 0)); } #endif } static ma_node_vtable g_node_graph_endpoint_vtable = { ma_node_graph_endpoint_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* 1 input bus. */ 1, /* 1 output bus. */ MA_NODE_FLAG_PASSTHROUGH /* Flags. The endpoint is a passthrough. */ }; MA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph) { ma_result result; ma_node_config baseConfig; ma_node_config endpointConfig; if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNodeGraph); pNodeGraph->processingSizeInFrames = pConfig->processingSizeInFrames; /* Base node so we can use the node graph as a node into another graph. */ baseConfig = ma_node_config_init(); baseConfig.vtable = &g_node_graph_node_vtable; baseConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pNodeGraph->base); if (result != MA_SUCCESS) { return result; } /* Endpoint. */ endpointConfig = ma_node_config_init(); endpointConfig.vtable = &g_node_graph_endpoint_vtable; endpointConfig.pInputChannels = &pConfig->channels; endpointConfig.pOutputChannels = &pConfig->channels; result = ma_node_init(pNodeGraph, &endpointConfig, pAllocationCallbacks, &pNodeGraph->endpoint); if (result != MA_SUCCESS) { ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); return result; } /* Processing cache. */ if (pConfig->processingSizeInFrames > 0) { pNodeGraph->pProcessingCache = (float*)ma_malloc(pConfig->processingSizeInFrames * pConfig->channels * sizeof(float), pAllocationCallbacks); if (pNodeGraph->pProcessingCache == NULL) { ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); return MA_OUT_OF_MEMORY; } } /* We need a pre-mix stack. The size of this stack is configurable via the config. The default value depends on the channel count. */ { size_t preMixStackSizeInBytes = pConfig->preMixStackSizeInBytes; if (preMixStackSizeInBytes == 0) { preMixStackSizeInBytes = pConfig->channels * MA_DEFAULT_PREMIX_STACK_SIZE_PER_CHANNEL; } pNodeGraph->pPreMixStack = ma_stack_init(preMixStackSizeInBytes, pAllocationCallbacks); if (pNodeGraph->pPreMixStack == NULL) { ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); if (pNodeGraph->pProcessingCache != NULL) { ma_free(pNodeGraph->pProcessingCache, pAllocationCallbacks); } return MA_OUT_OF_MEMORY; } } return MA_SUCCESS; } MA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks) { if (pNodeGraph == NULL) { return; } ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks); ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks); if (pNodeGraph->pProcessingCache != NULL) { ma_free(pNodeGraph->pProcessingCache, pAllocationCallbacks); pNodeGraph->pProcessingCache = NULL; } if (pNodeGraph->pPreMixStack != NULL) { ma_stack_uninit(pNodeGraph->pPreMixStack, pAllocationCallbacks); pNodeGraph->pPreMixStack = NULL; } } MA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return NULL; } return &pNodeGraph->endpoint; } MA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result = MA_SUCCESS; ma_uint64 totalFramesRead; ma_uint32 channels; if (pFramesRead != NULL) { *pFramesRead = 0; /* Safety. */ } if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } channels = ma_node_get_output_channels(&pNodeGraph->endpoint, 0); /* We'll be nice and try to do a full read of all frameCount frames. */ totalFramesRead = 0; while (totalFramesRead < frameCount) { ma_uint32 framesJustRead; ma_uint64 framesToRead; float* pRunningFramesOut; framesToRead = frameCount - totalFramesRead; if (framesToRead > 0xFFFFFFFF) { framesToRead = 0xFFFFFFFF; } pRunningFramesOut = (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels); /* If there's anything in the cache, consume that first. */ if (pNodeGraph->processingCacheFramesRemaining > 0) { ma_uint32 framesToReadFromCache; framesToReadFromCache = (ma_uint32)framesToRead; if (framesToReadFromCache > pNodeGraph->processingCacheFramesRemaining) { framesToReadFromCache = pNodeGraph->processingCacheFramesRemaining; } MA_COPY_MEMORY(pRunningFramesOut, pNodeGraph->pProcessingCache, framesToReadFromCache * channels * sizeof(float)); MA_MOVE_MEMORY(pNodeGraph->pProcessingCache, pNodeGraph->pProcessingCache + (framesToReadFromCache * channels), (pNodeGraph->processingCacheFramesRemaining - framesToReadFromCache) * channels * sizeof(float)); pNodeGraph->processingCacheFramesRemaining -= framesToReadFromCache; totalFramesRead += framesToReadFromCache; continue; } else { /* If processingSizeInFrames is non-zero, we need to make sure we always read in chunks of that size. If the frame count is less than that, we need to read into the cache and then continue on. */ float* pReadDst = pRunningFramesOut; if (pNodeGraph->processingSizeInFrames > 0) { if (framesToRead < pNodeGraph->processingSizeInFrames) { pReadDst = pNodeGraph->pProcessingCache; /* We need to read into the cache because otherwise we'll overflow the output buffer. */ } framesToRead = pNodeGraph->processingSizeInFrames; } ma_node_graph_set_is_reading(pNodeGraph, MA_TRUE); { result = ma_node_read_pcm_frames(&pNodeGraph->endpoint, 0, pReadDst, (ma_uint32)framesToRead, &framesJustRead, ma_node_get_time(&pNodeGraph->endpoint)); } ma_node_graph_set_is_reading(pNodeGraph, MA_FALSE); /* Do not increment the total frames read counter if we read into the cache. We use this to determine how many frames have been written to the final output buffer. */ if (pReadDst == pNodeGraph->pProcessingCache) { /* We read into the cache. */ pNodeGraph->processingCacheFramesRemaining = framesJustRead; } else { /* We read straight into the output buffer. */ totalFramesRead += framesJustRead; } if (result != MA_SUCCESS) { break; } /* Abort if we weren't able to read any frames or else we risk getting stuck in a loop. */ if (framesJustRead == 0) { break; } } } /* Let's go ahead and silence any leftover frames just for some added safety to ensure the caller doesn't try emitting garbage out of the speakers. */ if (totalFramesRead < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels), (frameCount - totalFramesRead), ma_format_f32, channels); } if (pFramesRead != NULL) { *pFramesRead = totalFramesRead; } return result; } MA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return 0; } return ma_node_get_output_channels(&pNodeGraph->endpoint, 0); } MA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph) { if (pNodeGraph == NULL) { return 0; } return ma_node_get_time(&pNodeGraph->endpoint); /* Global time is just the local time of the endpoint. */ } MA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime) { if (pNodeGraph == NULL) { return MA_INVALID_ARGS; } return ma_node_set_time(&pNodeGraph->endpoint, globalTime); /* Global time is just the local time of the endpoint. */ } #define MA_NODE_OUTPUT_BUS_FLAG_HAS_READ 0x01 /* Whether or not this bus ready to read more data. Only used on nodes with multiple output buses. */ static ma_result ma_node_output_bus_init(ma_node* pNode, ma_uint32 outputBusIndex, ma_uint32 channels, ma_node_output_bus* pOutputBus) { MA_ASSERT(pOutputBus != NULL); MA_ASSERT(outputBusIndex < MA_MAX_NODE_BUS_COUNT); MA_ASSERT(outputBusIndex < ma_node_get_output_bus_count(pNode)); MA_ASSERT(channels < 256); MA_ZERO_OBJECT(pOutputBus); if (channels == 0) { return MA_INVALID_ARGS; } pOutputBus->pNode = pNode; pOutputBus->outputBusIndex = (ma_uint8)outputBusIndex; pOutputBus->channels = (ma_uint8)channels; pOutputBus->flags = MA_NODE_OUTPUT_BUS_FLAG_HAS_READ; /* <-- Important that this flag is set by default. */ pOutputBus->volume = 1; return MA_SUCCESS; } static void ma_node_output_bus_lock(ma_node_output_bus* pOutputBus) { ma_spinlock_lock(&pOutputBus->lock); } static void ma_node_output_bus_unlock(ma_node_output_bus* pOutputBus) { ma_spinlock_unlock(&pOutputBus->lock); } static ma_uint32 ma_node_output_bus_get_channels(const ma_node_output_bus* pOutputBus) { return pOutputBus->channels; } static void ma_node_output_bus_set_has_read(ma_node_output_bus* pOutputBus, ma_bool32 hasRead) { if (hasRead) { ma_atomic_fetch_or_32(&pOutputBus->flags, MA_NODE_OUTPUT_BUS_FLAG_HAS_READ); } else { ma_atomic_fetch_and_32(&pOutputBus->flags, (ma_uint32)~MA_NODE_OUTPUT_BUS_FLAG_HAS_READ); } } static ma_bool32 ma_node_output_bus_has_read(ma_node_output_bus* pOutputBus) { return (ma_atomic_load_32(&pOutputBus->flags) & MA_NODE_OUTPUT_BUS_FLAG_HAS_READ) != 0; } static void ma_node_output_bus_set_is_attached(ma_node_output_bus* pOutputBus, ma_bool32 isAttached) { ma_atomic_exchange_32(&pOutputBus->isAttached, isAttached); } static ma_bool32 ma_node_output_bus_is_attached(ma_node_output_bus* pOutputBus) { return ma_atomic_load_32(&pOutputBus->isAttached); } static ma_result ma_node_output_bus_set_volume(ma_node_output_bus* pOutputBus, float volume) { MA_ASSERT(pOutputBus != NULL); if (volume < 0.0f) { volume = 0.0f; } ma_atomic_exchange_f32(&pOutputBus->volume, volume); return MA_SUCCESS; } static float ma_node_output_bus_get_volume(const ma_node_output_bus* pOutputBus) { return ma_atomic_load_f32((float*)&pOutputBus->volume); } static ma_result ma_node_input_bus_init(ma_uint32 channels, ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(channels < 256); MA_ZERO_OBJECT(pInputBus); if (channels == 0) { return MA_INVALID_ARGS; } pInputBus->channels = (ma_uint8)channels; return MA_SUCCESS; } static void ma_node_input_bus_lock(ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); ma_spinlock_lock(&pInputBus->lock); } static void ma_node_input_bus_unlock(ma_node_input_bus* pInputBus) { MA_ASSERT(pInputBus != NULL); ma_spinlock_unlock(&pInputBus->lock); } static void ma_node_input_bus_next_begin(ma_node_input_bus* pInputBus) { ma_atomic_fetch_add_32(&pInputBus->nextCounter, 1); } static void ma_node_input_bus_next_end(ma_node_input_bus* pInputBus) { ma_atomic_fetch_sub_32(&pInputBus->nextCounter, 1); } static ma_uint32 ma_node_input_bus_get_next_counter(ma_node_input_bus* pInputBus) { return ma_atomic_load_32(&pInputBus->nextCounter); } static ma_uint32 ma_node_input_bus_get_channels(const ma_node_input_bus* pInputBus) { return pInputBus->channels; } static void ma_node_input_bus_detach__no_output_bus_lock(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); /* Mark the output bus as detached first. This will prevent future iterations on the audio thread from iterating this output bus. */ ma_node_output_bus_set_is_attached(pOutputBus, MA_FALSE); /* We cannot use the output bus lock here since it'll be getting used at a higher level, but we do still need to use the input bus lock since we'll be updating pointers on two different output buses. The same rules apply here as the attaching case. Although we're using a lock here, we're *not* using a lock when iterating over the list in the audio thread. We therefore need to craft this in a way such that the iteration on the audio thread doesn't break. The first thing to do is swap out the "next" pointer of the previous output bus with the new "next" output bus. This is the operation that matters for iteration on the audio thread. After that, the previous pointer on the new "next" pointer needs to be updated, after which point the linked list will be in a good state. */ ma_node_input_bus_lock(pInputBus); { ma_node_output_bus* pOldPrev = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pPrev); ma_node_output_bus* pOldNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pNext); if (pOldPrev != NULL) { ma_atomic_exchange_ptr(&pOldPrev->pNext, pOldNext); /* <-- This is where the output bus is detached from the list. */ } if (pOldNext != NULL) { ma_atomic_exchange_ptr(&pOldNext->pPrev, pOldPrev); /* <-- This is required for detachment. */ } } ma_node_input_bus_unlock(pInputBus); /* At this point the output bus is detached and the linked list is completely unaware of it. Reset some data for safety. */ ma_atomic_exchange_ptr(&pOutputBus->pNext, NULL); /* Using atomic exchanges here, mainly for the benefit of analysis tools which don't always recognize spinlocks. */ ma_atomic_exchange_ptr(&pOutputBus->pPrev, NULL); /* As above. */ pOutputBus->pInputNode = NULL; pOutputBus->inputNodeInputBusIndex = 0; /* For thread-safety reasons, we don't want to be returning from this straight away. We need to wait for the audio thread to finish with the output bus. There's two things we need to wait for. The first is the part that selects the next output bus in the list, and the other is the part that reads from the output bus. Basically all we're doing is waiting for the input bus to stop referencing the output bus. We're doing this part last because we want the section above to run while the audio thread is finishing up with the output bus, just for efficiency reasons. We marked the output bus as detached right at the top of this function which is going to prevent the audio thread from iterating the output bus again. */ /* Part 1: Wait for the current iteration to complete. */ while (ma_node_input_bus_get_next_counter(pInputBus) > 0) { ma_yield(); } /* Part 2: Wait for any reads to complete. */ while (ma_atomic_load_32(&pOutputBus->refCount) > 0) { ma_yield(); } /* At this point we're done detaching and we can be guaranteed that the audio thread is not going to attempt to reference this output bus again (until attached again). */ } #if 0 /* Not used at the moment, but leaving here in case I need it later. */ static void ma_node_input_bus_detach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); ma_node_output_bus_lock(pOutputBus); { ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus); } ma_node_output_bus_unlock(pOutputBus); } #endif static void ma_node_input_bus_attach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus, ma_node* pNewInputNode, ma_uint32 inputNodeInputBusIndex) { MA_ASSERT(pInputBus != NULL); MA_ASSERT(pOutputBus != NULL); ma_node_output_bus_lock(pOutputBus); { ma_node_output_bus* pOldInputNode = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pInputNode); /* Detach from any existing attachment first if necessary. */ if (pOldInputNode != NULL) { ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus); } /* At this point we can be sure the output bus is not attached to anything. The linked list in the old input bus has been updated so that pOutputBus will not get iterated again. */ pOutputBus->pInputNode = pNewInputNode; /* No need for an atomic assignment here because modification of this variable always happens within a lock. */ pOutputBus->inputNodeInputBusIndex = (ma_uint8)inputNodeInputBusIndex; /* Now we need to attach the output bus to the linked list. This involves updating two pointers on two different output buses so I'm going to go ahead and keep this simple and just use a lock. There are ways to do this without a lock, but it's just too hard to maintain for its value. Although we're locking here, it's important to remember that we're *not* locking when iterating and reading audio data since that'll be running on the audio thread. As a result we need to be careful how we craft this so that we don't break iteration. What we're going to do is always attach the new item so that it becomes the first item in the list. That way, as we're iterating we won't break any links in the list and iteration will continue safely. The detaching case will also be crafted in a way as to not break list iteration. It's important to remember to use atomic exchanges here since no locking is happening on the audio thread during iteration. */ ma_node_input_bus_lock(pInputBus); { ma_node_output_bus* pNewPrev = &pInputBus->head; ma_node_output_bus* pNewNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext); /* Update the local output bus. */ ma_atomic_exchange_ptr(&pOutputBus->pPrev, pNewPrev); ma_atomic_exchange_ptr(&pOutputBus->pNext, pNewNext); /* Update the other output buses to point back to the local output bus. */ ma_atomic_exchange_ptr(&pInputBus->head.pNext, pOutputBus); /* <-- This is where the output bus is actually attached to the input bus. */ /* Do the previous pointer last. This is only used for detachment. */ if (pNewNext != NULL) { ma_atomic_exchange_ptr(&pNewNext->pPrev, pOutputBus); } } ma_node_input_bus_unlock(pInputBus); /* Mark the node as attached last. This is used to controlling whether or the output bus will be iterated on the audio thread. Mainly required for detachment purposes. */ ma_node_output_bus_set_is_attached(pOutputBus, MA_TRUE); } ma_node_output_bus_unlock(pOutputBus); } static ma_node_output_bus* ma_node_input_bus_next(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus) { ma_node_output_bus* pNext; MA_ASSERT(pInputBus != NULL); if (pOutputBus == NULL) { return NULL; } ma_node_input_bus_next_begin(pInputBus); { pNext = pOutputBus; for (;;) { pNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pNext->pNext); if (pNext == NULL) { break; /* Reached the end. */ } if (ma_node_output_bus_is_attached(pNext) == MA_FALSE) { continue; /* The node is not attached. Keep checking. */ } /* The next node has been selected. */ break; } /* We need to increment the reference count of the selected node. */ if (pNext != NULL) { ma_atomic_fetch_add_32(&pNext->refCount, 1); } /* The previous node is no longer being referenced. */ ma_atomic_fetch_sub_32(&pOutputBus->refCount, 1); } ma_node_input_bus_next_end(pInputBus); return pNext; } static ma_node_output_bus* ma_node_input_bus_first(ma_node_input_bus* pInputBus) { return ma_node_input_bus_next(pInputBus, &pInputBus->head); } static ma_result ma_node_input_bus_read_pcm_frames(ma_node* pInputNode, ma_node_input_bus* pInputBus, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime) { ma_result result = MA_SUCCESS; ma_node_output_bus* pOutputBus; ma_node_output_bus* pFirst; ma_uint32 inputChannels; ma_bool32 doesOutputBufferHaveContent = MA_FALSE; /* This will be called from the audio thread which means we can't be doing any locking. Basically, this function will not perform any locking, whereas attaching and detaching will, but crafted in such a way that we don't need to perform any locking here. The important thing to remember is to always iterate in a forward direction. In order to process any data we need to first read from all input buses. That's where this function comes in. This iterates over each of the attachments and accumulates/mixes them. We also convert the channels to the nodes output channel count before mixing. We want to do this channel conversion so that the caller of this function can invoke the processing callback without having to do it themselves. When we iterate over each of the attachments on the input bus, we need to read as much data as we can from each of them so that we don't end up with holes between each of the attachments. To do this, we need to read from each attachment in a loop and read as many frames as we can, up to `frameCount`. */ MA_ASSERT(pInputNode != NULL); MA_ASSERT(pFramesRead != NULL); /* pFramesRead is critical and must always be specified. On input it's undefined and on output it'll be set to the number of frames actually read. */ *pFramesRead = 0; /* Safety. */ inputChannels = ma_node_input_bus_get_channels(pInputBus); /* We need to be careful with how we call ma_node_input_bus_first() and ma_node_input_bus_next(). They are both critical to our lock-free thread-safety system. We can only call ma_node_input_bus_first() once per iteration, however we have an optimization to checks whether or not it's the first item in the list. We therefore need to store a pointer to the first item rather than repeatedly calling ma_node_input_bus_first(). It's safe to keep hold of this pointer, so long as we don't dereference it after calling ma_node_input_bus_next(), which we won't be. */ pFirst = ma_node_input_bus_first(pInputBus); if (pFirst == NULL) { return MA_SUCCESS; /* No attachments. Read nothing. */ } for (pOutputBus = pFirst; pOutputBus != NULL; pOutputBus = ma_node_input_bus_next(pInputBus, pOutputBus)) { ma_uint32 framesProcessed = 0; ma_bool32 isSilentOutput = MA_FALSE; MA_ASSERT(pOutputBus->pNode != NULL); MA_ASSERT(((ma_node_base*)pOutputBus->pNode)->vtable != NULL); isSilentOutput = (((ma_node_base*)pOutputBus->pNode)->vtable->flags & MA_NODE_FLAG_SILENT_OUTPUT) != 0; if (pFramesOut != NULL) { /* Read. */ while (framesProcessed < frameCount) { float* pRunningFramesOut; ma_uint32 framesToRead; ma_uint32 framesJustRead = 0; framesToRead = frameCount - framesProcessed; pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(pFramesOut, framesProcessed, inputChannels); if (doesOutputBufferHaveContent == MA_FALSE) { /* Fast path. First attachment. We just read straight into the output buffer (no mixing required). */ result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, pRunningFramesOut, framesToRead, &framesJustRead, globalTime + framesProcessed); } else { /* Slow path. Not the first attachment. Mixing required. */ ma_uint32 preMixBufferCapInFrames = ((ma_node_base*)pInputNode)->cachedDataCapInFramesPerBus; float* pPreMixBuffer = (float*)ma_stack_alloc(((ma_node_base*)pInputNode)->pNodeGraph->pPreMixStack, preMixBufferCapInFrames * inputChannels * sizeof(float)); if (pPreMixBuffer == NULL) { /* If you're hitting this assert it means you've got an unusually deep chain of nodes, you've got an excessively large processing size, or you have a combination of both, and as a result have run out of stack space. You can increase this using the preMixStackSizeInBytes variable in ma_node_graph_config. If you're using ma_engine, you can do it via the preMixStackSizeInBytes variable in ma_engine_config. It defaults to 512KB per output channel. */ MA_ASSERT(MA_FALSE); } else { if (framesToRead > preMixBufferCapInFrames) { framesToRead = preMixBufferCapInFrames; } result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, pPreMixBuffer, framesToRead, &framesJustRead, globalTime + framesProcessed); if (result == MA_SUCCESS || result == MA_AT_END) { if (isSilentOutput == MA_FALSE) { /* Don't mix if the node outputs silence. */ ma_mix_pcm_frames_f32(pRunningFramesOut, pPreMixBuffer, framesJustRead, inputChannels, /*volume*/1); } } /* The pre-mix buffer is no longer required. */ ma_stack_free(((ma_node_base*)pInputNode)->pNodeGraph->pPreMixStack, pPreMixBuffer); pPreMixBuffer = NULL; } } framesProcessed += framesJustRead; /* If we reached the end or otherwise failed to read any data we need to finish up with this output node. */ if (result != MA_SUCCESS) { break; } /* If we didn't read anything, abort so we don't get stuck in a loop. */ if (framesJustRead == 0) { break; } } /* If it's the first attachment we didn't do any mixing. Any leftover samples need to be silenced. */ if (pOutputBus == pFirst && framesProcessed < frameCount) { ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, framesProcessed, ma_format_f32, inputChannels), (frameCount - framesProcessed), ma_format_f32, inputChannels); } if (isSilentOutput == MA_FALSE) { doesOutputBufferHaveContent = MA_TRUE; } } else { /* Seek. */ ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, NULL, frameCount, &framesProcessed, globalTime); } } /* If we didn't output anything, output silence. */ if (doesOutputBufferHaveContent == MA_FALSE && pFramesOut != NULL) { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, inputChannels); } /* In this path we always "process" the entire amount. */ *pFramesRead = frameCount; return result; } MA_API ma_node_config ma_node_config_init(void) { ma_node_config config; MA_ZERO_OBJECT(&config); config.initialState = ma_node_state_started; /* Nodes are started by default. */ config.inputBusCount = MA_NODE_BUS_COUNT_UNKNOWN; config.outputBusCount = MA_NODE_BUS_COUNT_UNKNOWN; return config; } static ma_uint16 ma_node_config_get_cache_size_in_frames(const ma_node_config* pConfig, const ma_node_graph* pNodeGraph) { ma_uint32 cacheSizeInFrames; (void)pConfig; if (pNodeGraph->processingSizeInFrames > 0) { cacheSizeInFrames = pNodeGraph->processingSizeInFrames; } else { cacheSizeInFrames = MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS; } if (cacheSizeInFrames > 0xFFFF) { cacheSizeInFrames = 0xFFFF; } return (ma_uint16)cacheSizeInFrames; } static ma_result ma_node_detach_full(ma_node* pNode); static float* ma_node_get_cached_input_ptr(ma_node* pNode, ma_uint32 inputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; float* pBasePtr; MA_ASSERT(pNodeBase != NULL); /* Input data is stored at the front of the buffer. */ pBasePtr = pNodeBase->pCachedData; for (iInputBus = 0; iInputBus < inputBusIndex; iInputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]); } return pBasePtr; } static float* ma_node_get_cached_output_ptr(ma_node* pNode, ma_uint32 outputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; ma_uint32 iOutputBus; float* pBasePtr; MA_ASSERT(pNodeBase != NULL); /* Cached output data starts after the input data. */ pBasePtr = pNodeBase->pCachedData; for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]); } for (iOutputBus = 0; iOutputBus < outputBusIndex; iOutputBus += 1) { pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iOutputBus]); } return pBasePtr; } typedef struct { size_t sizeInBytes; size_t inputBusOffset; size_t outputBusOffset; size_t cachedDataOffset; ma_uint32 inputBusCount; /* So it doesn't have to be calculated twice. */ ma_uint32 outputBusCount; /* So it doesn't have to be calculated twice. */ } ma_node_heap_layout; static ma_result ma_node_translate_bus_counts(const ma_node_config* pConfig, ma_uint32* pInputBusCount, ma_uint32* pOutputBusCount) { ma_uint32 inputBusCount; ma_uint32 outputBusCount; MA_ASSERT(pConfig != NULL); MA_ASSERT(pInputBusCount != NULL); MA_ASSERT(pOutputBusCount != NULL); /* Bus counts are determined by the vtable, unless they're set to `MA_NODE_BUS_COUNT_UNKNWON`, in which case they're taken from the config. */ if (pConfig->vtable->inputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) { inputBusCount = pConfig->inputBusCount; } else { inputBusCount = pConfig->vtable->inputBusCount; if (pConfig->inputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->inputBusCount != pConfig->vtable->inputBusCount) { return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */ } } if (pConfig->vtable->outputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) { outputBusCount = pConfig->outputBusCount; } else { outputBusCount = pConfig->vtable->outputBusCount; if (pConfig->outputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->outputBusCount != pConfig->vtable->outputBusCount) { return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */ } } /* Bus counts must be within limits. */ if (inputBusCount > MA_MAX_NODE_BUS_COUNT || outputBusCount > MA_MAX_NODE_BUS_COUNT) { return MA_INVALID_ARGS; } /* We must have channel counts for each bus. */ if ((inputBusCount > 0 && pConfig->pInputChannels == NULL) || (outputBusCount > 0 && pConfig->pOutputChannels == NULL)) { return MA_INVALID_ARGS; /* You must specify channel counts for each input and output bus. */ } /* Some special rules for passthrough nodes. */ if ((pConfig->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { if ((pConfig->vtable->inputBusCount != 0 && pConfig->vtable->inputBusCount != 1) || pConfig->vtable->outputBusCount != 1) { return MA_INVALID_ARGS; /* Passthrough nodes must have exactly 1 output bus and either 0 or 1 input bus. */ } if (pConfig->pInputChannels[0] != pConfig->pOutputChannels[0]) { return MA_INVALID_ARGS; /* Passthrough nodes must have the same number of channels between input and output nodes. */ } } *pInputBusCount = inputBusCount; *pOutputBusCount = outputBusCount; return MA_SUCCESS; } static ma_result ma_node_get_heap_layout(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, ma_node_heap_layout* pHeapLayout) { ma_result result; ma_uint32 inputBusCount; ma_uint32 outputBusCount; MA_ASSERT(pHeapLayout != NULL); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL || pConfig->vtable == NULL || pConfig->vtable->onProcess == NULL) { return MA_INVALID_ARGS; } result = ma_node_translate_bus_counts(pConfig, &inputBusCount, &outputBusCount); if (result != MA_SUCCESS) { return result; } pHeapLayout->sizeInBytes = 0; /* Input buses. */ if (inputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) { pHeapLayout->inputBusOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_input_bus) * inputBusCount); } else { pHeapLayout->inputBusOffset = MA_SIZE_MAX; /* MA_SIZE_MAX indicates that no heap allocation is required for the input bus. */ } /* Output buses. */ if (outputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) { pHeapLayout->outputBusOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_output_bus) * outputBusCount); } else { pHeapLayout->outputBusOffset = MA_SIZE_MAX; } /* Cached audio data. We need to allocate memory for caching both input and output data. We have an optimization where no caching is necessary for specific conditions: - The node has 0 inputs and 1 output. When a node meets the above conditions, no cache is allocated. The size choice for this buffer is a little bit finicky. We don't want to be too wasteful by allocating too much, but at the same time we want it be large enough so that enough frames can be processed for each call to ma_node_read_pcm_frames() so that it keeps things efficient. For now I'm going with 10ms @ 48K which is 480 frames per bus. This is configurable at compile time. It might also be worth investigating whether or not this can be configured at run time. */ if (inputBusCount == 0 && outputBusCount == 1) { /* Fast path. No cache needed. */ pHeapLayout->cachedDataOffset = MA_SIZE_MAX; } else { /* Slow path. Cache needed. */ size_t cachedDataSizeInBytes = 0; ma_uint32 cacheCapInFrames; ma_uint32 iBus; /* The capacity of the cache is based on our callback processing size. */ cacheCapInFrames = ma_node_config_get_cache_size_in_frames(pConfig, pNodeGraph); for (iBus = 0; iBus < inputBusCount; iBus += 1) { cachedDataSizeInBytes += cacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pInputChannels[iBus]); } for (iBus = 0; iBus < outputBusCount; iBus += 1) { cachedDataSizeInBytes += cacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pOutputChannels[iBus]); } pHeapLayout->cachedDataOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(cachedDataSizeInBytes); } /* Not technically part of the heap, but we can output the input and output bus counts so we can avoid a redundant call to ma_node_translate_bus_counts(). */ pHeapLayout->inputBusCount = inputBusCount; pHeapLayout->outputBusCount = outputBusCount; /* Make sure allocation size is aligned. */ pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes); return MA_SUCCESS; } MA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_node_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_result result; ma_node_heap_layout heapLayout; ma_uint32 iInputBus; ma_uint32 iOutputBus; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNodeBase); result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } pNodeBase->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pNodeBase->pNodeGraph = pNodeGraph; pNodeBase->vtable = pConfig->vtable; pNodeBase->state = pConfig->initialState; pNodeBase->stateTimes[ma_node_state_started] = 0; pNodeBase->stateTimes[ma_node_state_stopped] = (ma_uint64)(ma_int64)-1; /* Weird casting for VC6 compatibility. */ pNodeBase->inputBusCount = heapLayout.inputBusCount; pNodeBase->outputBusCount = heapLayout.outputBusCount; if (heapLayout.inputBusOffset != MA_SIZE_MAX) { pNodeBase->pInputBuses = (ma_node_input_bus*)ma_offset_ptr(pHeap, heapLayout.inputBusOffset); } else { pNodeBase->pInputBuses = pNodeBase->_inputBuses; } if (heapLayout.outputBusOffset != MA_SIZE_MAX) { pNodeBase->pOutputBuses = (ma_node_output_bus*)ma_offset_ptr(pHeap, heapLayout.outputBusOffset); } else { pNodeBase->pOutputBuses = pNodeBase->_outputBuses; } if (heapLayout.cachedDataOffset != MA_SIZE_MAX) { pNodeBase->pCachedData = (float*)ma_offset_ptr(pHeap, heapLayout.cachedDataOffset); pNodeBase->cachedDataCapInFramesPerBus = ma_node_config_get_cache_size_in_frames(pConfig, pNodeGraph); } else { pNodeBase->pCachedData = NULL; } /* We need to run an initialization step for each input and output bus. */ for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) { result = ma_node_input_bus_init(pConfig->pInputChannels[iInputBus], &pNodeBase->pInputBuses[iInputBus]); if (result != MA_SUCCESS) { return result; } } for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) { result = ma_node_output_bus_init(pNodeBase, iOutputBus, pConfig->pOutputChannels[iOutputBus], &pNodeBase->pOutputBuses[iOutputBus]); if (result != MA_SUCCESS) { return result; } } /* The cached data needs to be initialized to silence (or a sine wave tone if we're debugging). */ if (pNodeBase->pCachedData != NULL) { ma_uint32 iBus; #if 1 /* Toggle this between 0 and 1 to turn debugging on or off. 1 = fill with a sine wave for debugging; 0 = fill with silence. */ /* For safety we'll go ahead and default the buffer to silence. */ for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) { ma_silence_pcm_frames(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus])); } for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) { ma_silence_pcm_frames(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus])); } #else /* For debugging. Default to a sine wave. */ for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) { ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus]), 48000); } for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) { ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus]), 48000); } #endif } return MA_SUCCESS; } MA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_node_get_heap_size(pNodeGraph, pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_node_init_preallocated(pNodeGraph, pConfig, pHeap, pNode); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } ((ma_node_base*)pNode)->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return; } /* The first thing we need to do is fully detach the node. This will detach all inputs and outputs. We need to do this first because it will sever the connection with the node graph and allow us to complete uninitialization without needing to worry about thread-safety with the audio thread. The detachment process will wait for any local processing of the node to finish. */ ma_node_detach_full(pNode); /* At this point the node should be completely unreferenced by the node graph and we can finish up the uninitialization process without needing to worry about thread-safety. */ if (pNodeBase->_ownsHeap) { ma_free(pNodeBase->_pHeap, pAllocationCallbacks); } } MA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode) { if (pNode == NULL) { return NULL; } return ((const ma_node_base*)pNode)->pNodeGraph; } MA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ((ma_node_base*)pNode)->inputBusCount; } MA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ((ma_node_base*)pNode)->outputBusCount; } MA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNode == NULL) { return 0; } if (inputBusIndex >= ma_node_get_input_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[inputBusIndex]); } MA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNode == NULL) { return 0; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[outputBusIndex]); } static ma_result ma_node_detach_full(ma_node* pNode) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iInputBus; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } /* Make sure the node is completely detached first. This will not return until the output bus is guaranteed to no longer be referenced by the audio thread. */ ma_node_detach_all_output_buses(pNode); /* At this point all output buses will have been detached from the graph and we can be guaranteed that none of its input nodes will be getting processed by the graph. We can detach these without needing to worry about the audio thread touching them. */ for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNode); iInputBus += 1) { ma_node_input_bus* pInputBus; ma_node_output_bus* pOutputBus; pInputBus = &pNodeBase->pInputBuses[iInputBus]; /* This is important. We cannot be using ma_node_input_bus_first() or ma_node_input_bus_next(). Those functions are specifically for the audio thread. We'll instead just manually iterate using standard linked list logic. We don't need to worry about the audio thread referencing these because the step above severed the connection to the graph. */ for (pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext); pOutputBus != NULL; pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext)) { ma_node_detach_output_bus(pOutputBus->pNode, pOutputBus->outputBusIndex); /* This won't do any waiting in practice and should be efficient. */ } } return MA_SUCCESS; } MA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex) { ma_result result = MA_SUCCESS; ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_node_base* pInputNodeBase; if (pNode == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return MA_INVALID_ARGS; /* Invalid output bus index. */ } /* We need to lock the output bus because we need to inspect the input node and grab its input bus. */ ma_node_output_bus_lock(&pNodeBase->pOutputBuses[outputBusIndex]); { pInputNodeBase = (ma_node_base*)pNodeBase->pOutputBuses[outputBusIndex].pInputNode; if (pInputNodeBase != NULL) { ma_node_input_bus_detach__no_output_bus_lock(&pInputNodeBase->pInputBuses[pNodeBase->pOutputBuses[outputBusIndex].inputNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex]); } } ma_node_output_bus_unlock(&pNodeBase->pOutputBuses[outputBusIndex]); return result; } MA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode) { ma_uint32 iOutputBus; if (pNode == NULL) { return MA_INVALID_ARGS; } for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNode); iOutputBus += 1) { ma_node_detach_output_bus(pNode, iOutputBus); } return MA_SUCCESS; } MA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_node_base* pOtherNodeBase = (ma_node_base*)pOtherNode; if (pNodeBase == NULL || pOtherNodeBase == NULL) { return MA_INVALID_ARGS; } if (pNodeBase == pOtherNodeBase) { return MA_INVALID_OPERATION; /* Cannot attach a node to itself. */ } if (outputBusIndex >= ma_node_get_output_bus_count(pNode) || otherNodeInputBusIndex >= ma_node_get_input_bus_count(pOtherNode)) { return MA_INVALID_OPERATION; /* Invalid bus index. */ } /* The output channel count of the output node must be the same as the input channel count of the input node. */ if (ma_node_get_output_channels(pNode, outputBusIndex) != ma_node_get_input_channels(pOtherNode, otherNodeInputBusIndex)) { return MA_INVALID_OPERATION; /* Channel count is incompatible. */ } /* This will deal with detaching if the output bus is already attached to something. */ ma_node_input_bus_attach(&pOtherNodeBase->pInputBuses[otherNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex], pOtherNode, otherNodeInputBusIndex); return MA_SUCCESS; } MA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return MA_INVALID_ARGS; /* Invalid bus index. */ } return ma_node_output_bus_set_volume(&pNodeBase->pOutputBuses[outputBusIndex], volume); } MA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNodeBase == NULL) { return 0; } if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) { return 0; /* Invalid bus index. */ } return ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex]); } MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state) { ma_node_base* pNodeBase = (ma_node_base*)pNode; if (pNodeBase == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_i32(&pNodeBase->state, state); return MA_SUCCESS; } MA_API ma_node_state ma_node_get_state(const ma_node* pNode) { const ma_node_base* pNodeBase = (const ma_node_base*)pNode; if (pNodeBase == NULL) { return ma_node_state_stopped; } return (ma_node_state)ma_atomic_load_i32(&pNodeBase->state); } MA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime) { if (pNode == NULL) { return MA_INVALID_ARGS; } /* Validation check for safety since we'll be using this as an index into stateTimes[]. */ if (state != ma_node_state_started && state != ma_node_state_stopped) { return MA_INVALID_ARGS; } ma_atomic_exchange_64(&((ma_node_base*)pNode)->stateTimes[state], globalTime); return MA_SUCCESS; } MA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state) { if (pNode == NULL) { return 0; } /* Validation check for safety since we'll be using this as an index into stateTimes[]. */ if (state != ma_node_state_started && state != ma_node_state_stopped) { return 0; } return ma_atomic_load_64(&((ma_node_base*)pNode)->stateTimes[state]); } MA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime) { if (pNode == NULL) { return ma_node_state_stopped; } return ma_node_get_state_by_time_range(pNode, globalTime, globalTime); } MA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd) { ma_node_state state; if (pNode == NULL) { return ma_node_state_stopped; } state = ma_node_get_state(pNode); /* An explicitly stopped node is always stopped. */ if (state == ma_node_state_stopped) { return ma_node_state_stopped; } /* Getting here means the node is marked as started, but it may still not be truly started due to its start time not having been reached yet. Also, the stop time may have also been reached in which case it'll be considered stopped. */ if (ma_node_get_state_time(pNode, ma_node_state_started) > globalTimeBeg) { return ma_node_state_stopped; /* Start time has not yet been reached. */ } if (ma_node_get_state_time(pNode, ma_node_state_stopped) <= globalTimeEnd) { return ma_node_state_stopped; /* Stop time has been reached. */ } /* Getting here means the node is marked as started and is within its start/stop times. */ return ma_node_state_started; } MA_API ma_uint64 ma_node_get_time(const ma_node* pNode) { if (pNode == NULL) { return 0; } return ma_atomic_load_64(&((ma_node_base*)pNode)->localTime); } MA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime) { if (pNode == NULL) { return MA_INVALID_ARGS; } ma_atomic_exchange_64(&((ma_node_base*)pNode)->localTime, localTime); return MA_SUCCESS; } static void ma_node_process_pcm_frames_internal(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_base* pNodeBase = (ma_node_base*)pNode; MA_ASSERT(pNode != NULL); if (pNodeBase->vtable->onProcess) { pNodeBase->vtable->onProcess(pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut); } } static ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_result result = MA_SUCCESS; ma_uint32 iInputBus; ma_uint32 iOutputBus; ma_uint32 inputBusCount; ma_uint32 outputBusCount; ma_uint32 totalFramesRead = 0; float* ppFramesIn[MA_MAX_NODE_BUS_COUNT]; float* ppFramesOut[MA_MAX_NODE_BUS_COUNT]; ma_uint64 globalTimeBeg; ma_uint64 globalTimeEnd; ma_uint64 startTime; ma_uint64 stopTime; ma_uint32 timeOffsetBeg; ma_uint32 timeOffsetEnd; ma_uint32 frameCountIn; ma_uint32 frameCountOut; /* pFramesRead is mandatory. It must be used to determine how many frames were read. It's normal and expected that the number of frames read may be different to that requested. Therefore, the caller must look at this value to correctly determine how many frames were read. */ MA_ASSERT(pFramesRead != NULL); /* <-- If you've triggered this assert, you're using this function wrong. You *must* use this variable and inspect it after the call returns. */ if (pFramesRead == NULL) { return MA_INVALID_ARGS; } *pFramesRead = 0; /* Safety. */ if (pNodeBase == NULL) { return MA_INVALID_ARGS; } if (outputBusIndex >= ma_node_get_output_bus_count(pNodeBase)) { return MA_INVALID_ARGS; /* Invalid output bus index. */ } /* Don't do anything if we're in a stopped state. */ if (ma_node_get_state_by_time_range(pNode, globalTime, globalTime + frameCount) != ma_node_state_started) { return MA_SUCCESS; /* We're in a stopped state. This is not an error - we just need to not read anything. */ } globalTimeBeg = globalTime; globalTimeEnd = globalTime + frameCount; startTime = ma_node_get_state_time(pNode, ma_node_state_started); stopTime = ma_node_get_state_time(pNode, ma_node_state_stopped); /* At this point we know that we are inside our start/stop times. However, we may need to adjust our frame count and output pointer to accommodate since we could be straddling the time period that this function is getting called for. It's possible (and likely) that the start time does not line up with the output buffer. We therefore need to offset it by a number of frames to accommodate. The same thing applies for the stop time. */ timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0; timeOffsetEnd = (globalTimeEnd > stopTime) ? (ma_uint32)(globalTimeEnd - stopTime) : 0; /* Trim based on the start offset. We need to silence the start of the buffer. */ if (timeOffsetBeg > 0) { ma_silence_pcm_frames(pFramesOut, timeOffsetBeg, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex)); pFramesOut += timeOffsetBeg * ma_node_get_output_channels(pNode, outputBusIndex); frameCount -= timeOffsetBeg; } /* Trim based on the end offset. We don't need to silence the tail section because we'll just have a reduced value written to pFramesRead. */ if (timeOffsetEnd > 0) { frameCount -= timeOffsetEnd; } /* We run on different paths depending on the bus counts. */ inputBusCount = ma_node_get_input_bus_count(pNode); outputBusCount = ma_node_get_output_bus_count(pNode); /* Run a simplified path when there are no inputs and one output. In this case there's nothing to actually read and we can go straight to output. This is a very common scenario because the vast majority of data source nodes will use this setup so this optimization I think is worthwhile. */ if (inputBusCount == 0 && outputBusCount == 1) { /* Fast path. No need to read from input and no need for any caching. */ frameCountIn = 0; frameCountOut = frameCount; /* Just read as much as we can. The callback will return what was actually read. */ ppFramesOut[0] = pFramesOut; /* If it's a passthrough we won't be expecting the callback to output anything, so we'll need to pre-silence the output buffer. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex)); } ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut); totalFramesRead = frameCountOut; } else { /* Slow path. Need to read input data. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) { /* Fast path. We're running a passthrough. We need to read directly into the output buffer, but still fire the callback so that event handling and trigger nodes can do their thing. Since it's a passthrough there's no need for any kind of caching logic. */ MA_ASSERT(outputBusCount == inputBusCount); MA_ASSERT(outputBusCount == 1); MA_ASSERT(outputBusIndex == 0); /* We just read directly from input bus to output buffer, and then afterwards fire the callback. */ ppFramesOut[0] = pFramesOut; ppFramesIn[0] = ppFramesOut[0]; result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[0], ppFramesIn[0], frameCount, &totalFramesRead, globalTime); if (result == MA_SUCCESS) { /* Even though it's a passthrough, we still need to fire the callback. */ frameCountIn = totalFramesRead; frameCountOut = totalFramesRead; if (totalFramesRead > 0) { ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut); /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Explicit cast to silence the warning. */ } /* A passthrough should never have modified the input and output frame counts. If you're triggering these asserts you need to fix your processing callback. */ MA_ASSERT(frameCountIn == totalFramesRead); MA_ASSERT(frameCountOut == totalFramesRead); } } else { /* Slow path. Need to do caching. */ ma_uint32 framesToProcessIn; ma_uint32 framesToProcessOut; ma_bool32 consumeNullInput = MA_FALSE; /* We use frameCount as a basis for the number of frames to read since that's what's being requested, however we still need to clamp it to whatever can fit in the cache. This will also be used as the basis for determining how many input frames to read. This is not ideal because it can result in too many input frames being read which introduces latency. To solve this, nodes can implement an optional callback called onGetRequiredInputFrameCount which is used as hint to miniaudio as to how many input frames it needs to read at a time. This callback is completely optional, and if it's not set, miniaudio will assume `frameCount`. This function will be called multiple times for each period of time, once for each output node. We cannot read from each input node each time this function is called. Instead we need to check whether or not this is first output bus to be read from for this time period, and if so, read from our input data. To determine whether or not we're ready to read data, we check a flag. There will be one flag for each output. When the flag is set, it means data has been read previously and that we're ready to advance time forward for our input nodes by reading fresh data. */ framesToProcessOut = frameCount; if (framesToProcessOut > pNodeBase->cachedDataCapInFramesPerBus) { framesToProcessOut = pNodeBase->cachedDataCapInFramesPerBus; } framesToProcessIn = frameCount; if (pNodeBase->vtable->onGetRequiredInputFrameCount) { pNodeBase->vtable->onGetRequiredInputFrameCount(pNode, framesToProcessOut, &framesToProcessIn); /* <-- It does not matter if this fails. */ } if (framesToProcessIn > pNodeBase->cachedDataCapInFramesPerBus) { framesToProcessIn = pNodeBase->cachedDataCapInFramesPerBus; } MA_ASSERT(framesToProcessIn <= 0xFFFF); MA_ASSERT(framesToProcessOut <= 0xFFFF); if (ma_node_output_bus_has_read(&pNodeBase->pOutputBuses[outputBusIndex])) { /* Getting here means we need to do another round of processing. */ pNodeBase->cachedFrameCountOut = 0; for (;;) { frameCountOut = 0; /* We need to prepare our output frame pointers for processing. In the same iteration we need to mark every output bus as unread so that future calls to this function for different buses for the current time period don't pull in data when they should instead be reading from cache. */ for (iOutputBus = 0; iOutputBus < outputBusCount; iOutputBus += 1) { ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[iOutputBus], MA_FALSE); /* <-- This is what tells the next calls to this function for other output buses for this time period to read from cache instead of pulling in more data. */ ppFramesOut[iOutputBus] = ma_node_get_cached_output_ptr(pNode, iOutputBus); } /* We only need to read from input buses if there isn't already some data in the cache. */ if (pNodeBase->cachedFrameCountIn == 0) { ma_uint32 maxFramesReadIn = 0; /* Here is where we pull in data from the input buses. This is what will trigger an advance in time. */ for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) { ma_uint32 framesRead; /* The first thing to do is get the offset within our bulk allocation to store this input data. */ ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus); /* Once we've determined our destination pointer we can read. Note that we must inspect the number of frames read and fill any leftovers with silence for safety. */ result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[iInputBus], ppFramesIn[iInputBus], framesToProcessIn, &framesRead, globalTime); if (result != MA_SUCCESS) { /* It doesn't really matter if we fail because we'll just fill with silence. */ framesRead = 0; /* Just for safety, but I don't think it's really needed. */ } /* TODO: Minor optimization opportunity here. If no frames were read and the buffer is already filled with silence, no need to re-silence it. */ /* Any leftover frames need to silenced for safety. */ if (framesRead < framesToProcessIn) { ma_silence_pcm_frames(ppFramesIn[iInputBus] + (framesRead * ma_node_get_input_channels(pNodeBase, iInputBus)), (framesToProcessIn - framesRead), ma_format_f32, ma_node_get_input_channels(pNodeBase, iInputBus)); } maxFramesReadIn = ma_max(maxFramesReadIn, framesRead); } /* This was a fresh load of input data so reset our consumption counter. */ pNodeBase->consumedFrameCountIn = 0; /* We don't want to keep processing if there's nothing to process, so set the number of cached input frames to the maximum number we read from each attachment (the lesser will be padded with silence). If we didn't read anything, this will be set to 0 and the entire buffer will have been assigned to silence. This being equal to 0 is an important property for us because it allows us to detect when NULL can be passed into the processing callback for the input buffer for the purpose of continuous processing. */ pNodeBase->cachedFrameCountIn = (ma_uint16)maxFramesReadIn; } else { /* We don't need to read anything, but we do need to prepare our input frame pointers. */ for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) { ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus) + (pNodeBase->consumedFrameCountIn * ma_node_get_input_channels(pNodeBase, iInputBus)); } } /* At this point we have our input data so now we need to do some processing. Sneaky little optimization here - we can set the pointer to the output buffer for this output bus so that the final copy into the output buffer is done directly by onProcess(). */ if (pFramesOut != NULL) { ppFramesOut[outputBusIndex] = ma_offset_pcm_frames_ptr_f32(pFramesOut, pNodeBase->cachedFrameCountOut, ma_node_get_output_channels(pNode, outputBusIndex)); } /* Give the processing function the entire capacity of the output buffer. */ frameCountOut = (framesToProcessOut - pNodeBase->cachedFrameCountOut); /* We need to treat nodes with continuous processing a little differently. For these ones, we always want to fire the callback with the requested number of frames, regardless of pNodeBase->cachedFrameCountIn, which could be 0. Also, we want to check if we can pass in NULL for the input buffer to the callback. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_CONTINUOUS_PROCESSING) != 0) { /* We're using continuous processing. Make sure we specify the whole frame count at all times. */ frameCountIn = framesToProcessIn; /* Give the processing function as much input data as we've got in the buffer, including any silenced padding from short reads. */ if ((pNodeBase->vtable->flags & MA_NODE_FLAG_ALLOW_NULL_INPUT) != 0 && pNodeBase->consumedFrameCountIn == 0 && pNodeBase->cachedFrameCountIn == 0) { consumeNullInput = MA_TRUE; } else { consumeNullInput = MA_FALSE; } /* Since we're using continuous processing we're always passing in a full frame count regardless of how much input data was read. If this is greater than what we read as input, we'll end up with an underflow. We instead need to make sure our cached frame count is set to the number of frames we'll be passing to the data callback. Not doing this will result in an underflow when we "consume" the cached data later on. Note that this check needs to be done after the "consumeNullInput" check above because we use the property of cachedFrameCountIn being 0 to determine whether or not we should be passing in a null pointer to the processing callback for when the node is configured with MA_NODE_FLAG_ALLOW_NULL_INPUT. */ if (pNodeBase->cachedFrameCountIn < (ma_uint16)frameCountIn) { pNodeBase->cachedFrameCountIn = (ma_uint16)frameCountIn; } } else { frameCountIn = pNodeBase->cachedFrameCountIn; /* Give the processing function as much valid input data as we've got. */ consumeNullInput = MA_FALSE; } /* Process data slightly differently depending on whether or not we're consuming NULL input (checked just above). */ if (consumeNullInput) { ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut); } else { /* We want to skip processing if there's no input data, but we can only do that safely if we know that there is no chance of any output frames being produced. If continuous processing is being used, this won't be a problem because the input frame count will always be non-0. However, if continuous processing is *not* enabled and input and output data is processed at different rates, we still need to process that last input frame because there could be a few excess output frames needing to be produced from cached data. The `MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES` flag is used as the indicator for determining whether or not we need to process the node even when there are no input frames available right now. */ if (frameCountIn > 0 || (pNodeBase->vtable->flags & MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES) != 0) { ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut); /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Explicit cast to silence the warning. */ } else { frameCountOut = 0; /* No data was processed. */ } } /* Thanks to our sneaky optimization above we don't need to do any data copying directly into the output buffer - the onProcess() callback just did that for us. We do, however, need to apply the number of input and output frames that were processed. Note that due to continuous processing above, we need to do explicit checks here. If we just consumed a NULL input buffer it means that no actual input data was processed from the internal buffers and we don't want to be modifying any counters. */ if (consumeNullInput == MA_FALSE) { pNodeBase->consumedFrameCountIn += (ma_uint16)frameCountIn; pNodeBase->cachedFrameCountIn -= (ma_uint16)frameCountIn; } /* The cached output frame count is always equal to what we just read. */ pNodeBase->cachedFrameCountOut += (ma_uint16)frameCountOut; /* If we couldn't process any data, we're done. The loop needs to be terminated here or else we'll get stuck in a loop. */ if (pNodeBase->cachedFrameCountOut == framesToProcessOut || (frameCountOut == 0 && frameCountIn == 0)) { break; } } } else { /* We're not needing to read anything from the input buffer so just read directly from our already-processed data. */ if (pFramesOut != NULL) { ma_copy_pcm_frames(pFramesOut, ma_node_get_cached_output_ptr(pNodeBase, outputBusIndex), pNodeBase->cachedFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNodeBase, outputBusIndex)); } } /* The number of frames read is always equal to the number of cached output frames. */ totalFramesRead = pNodeBase->cachedFrameCountOut; /* Now that we've read the data, make sure our read flag is set. */ ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[outputBusIndex], MA_TRUE); } } /* Apply volume, if necessary. */ ma_apply_volume_factor_f32(pFramesOut, totalFramesRead * ma_node_get_output_channels(pNodeBase, outputBusIndex), ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex])); /* Advance our local time forward. */ ma_atomic_fetch_add_64(&pNodeBase->localTime, (ma_uint64)totalFramesRead); *pFramesRead = totalFramesRead + timeOffsetBeg; /* Must include the silenced section at the start of the buffer. */ return result; } /* Data source node. */ MA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource) { ma_data_source_node_config config; MA_ZERO_OBJECT(&config); config.nodeConfig = ma_node_config_init(); config.pDataSource = pDataSource; return config; } static void ma_data_source_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_data_source_node* pDataSourceNode = (ma_data_source_node*)pNode; ma_format format; ma_uint32 channels; ma_uint32 frameCount; ma_uint64 framesRead = 0; MA_ASSERT(pDataSourceNode != NULL); MA_ASSERT(pDataSourceNode->pDataSource != NULL); MA_ASSERT(ma_node_get_input_bus_count(pDataSourceNode) == 0); MA_ASSERT(ma_node_get_output_bus_count(pDataSourceNode) == 1); /* We don't want to read from ppFramesIn at all. Instead we read from the data source. */ (void)ppFramesIn; (void)pFrameCountIn; frameCount = *pFrameCountOut; /* miniaudio should never be calling this with a frame count of zero. */ MA_ASSERT(frameCount > 0); if (ma_data_source_get_data_format(pDataSourceNode->pDataSource, &format, &channels, NULL, NULL, 0) == MA_SUCCESS) { /* <-- Don't care about sample rate here. */ /* The node graph system requires samples be in floating point format. This is checked in ma_data_source_node_init(). */ MA_ASSERT(format == ma_format_f32); (void)format; /* Just to silence some static analysis tools. */ ma_data_source_read_pcm_frames(pDataSourceNode->pDataSource, ppFramesOut[0], frameCount, &framesRead); } *pFrameCountOut = (ma_uint32)framesRead; } static ma_node_vtable g_ma_data_source_node_vtable = { ma_data_source_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 0, /* 0 input buses. */ 1, /* 1 output bus. */ 0 }; MA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode) { ma_result result; ma_format format; /* For validating the format, which must be ma_format_f32. */ ma_uint32 channels; /* For specifying the channel count of the output bus. */ ma_node_config baseConfig; if (pDataSourceNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDataSourceNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } result = ma_data_source_get_data_format(pConfig->pDataSource, &format, &channels, NULL, NULL, 0); /* Don't care about sample rate. This will check pDataSource for NULL. */ if (result != MA_SUCCESS) { return result; } MA_ASSERT(format == ma_format_f32); /* <-- If you've triggered this it means your data source is not outputting floating-point samples. You must configure your data source to use ma_format_f32. */ if (format != ma_format_f32) { return MA_INVALID_ARGS; /* Invalid format. */ } /* The channel count is defined by the data source. If the caller has manually changed the channels we just ignore it. */ baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_data_source_node_vtable; /* Explicitly set the vtable here to prevent callers from setting it incorrectly. */ /* The channel count is defined by the data source. It is invalid for the caller to manually set the channel counts in the config. `ma_data_source_node_config_init()` will have defaulted the channel count pointer to NULL which is how it must remain. If you trigger any of these asserts it means you're explicitly setting the channel count. Instead, configure the output channel count of your data source to be the necessary channel count. */ if (baseConfig.pOutputChannels != NULL) { return MA_INVALID_ARGS; } baseConfig.pOutputChannels = &channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDataSourceNode->base); if (result != MA_SUCCESS) { return result; } pDataSourceNode->pDataSource = pConfig->pDataSource; return MA_SUCCESS; } MA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_uninit(&pDataSourceNode->base, pAllocationCallbacks); } MA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping) { if (pDataSourceNode == NULL) { return MA_INVALID_ARGS; } return ma_data_source_set_looping(pDataSourceNode->pDataSource, isLooping); } MA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode) { if (pDataSourceNode == NULL) { return MA_FALSE; } return ma_data_source_is_looping(pDataSourceNode->pDataSource); } /* Splitter Node. */ MA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels) { ma_splitter_node_config config; MA_ZERO_OBJECT(&config); config.nodeConfig = ma_node_config_init(); config.channels = channels; config.outputBusCount = 2; return config; } static void ma_splitter_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_node_base* pNodeBase = (ma_node_base*)pNode; ma_uint32 iOutputBus; ma_uint32 channels; MA_ASSERT(pNodeBase != NULL); MA_ASSERT(ma_node_get_input_bus_count(pNodeBase) == 1); /* We don't need to consider the input frame count - it'll be the same as the output frame count and we process everything. */ (void)pFrameCountIn; /* NOTE: This assumes the same number of channels for all inputs and outputs. This was checked in ma_splitter_node_init(). */ channels = ma_node_get_input_channels(pNodeBase, 0); /* Splitting is just copying the first input bus and copying it over to each output bus. */ for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) { ma_copy_pcm_frames(ppFramesOut[iOutputBus], ppFramesIn[0], *pFrameCountOut, ma_format_f32, channels); } } static ma_node_vtable g_ma_splitter_node_vtable = { ma_splitter_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* 1 input bus. */ MA_NODE_BUS_COUNT_UNKNOWN, /* The output bus count is specified on a per-node basis. */ 0 }; MA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode) { ma_result result; ma_node_config baseConfig; ma_uint32 pInputChannels[1]; ma_uint32 pOutputChannels[MA_MAX_NODE_BUS_COUNT]; ma_uint32 iOutputBus; if (pSplitterNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSplitterNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->outputBusCount > MA_MAX_NODE_BUS_COUNT) { return MA_INVALID_ARGS; /* Too many output buses. */ } /* Splitters require the same number of channels between inputs and outputs. */ pInputChannels[0] = pConfig->channels; for (iOutputBus = 0; iOutputBus < pConfig->outputBusCount; iOutputBus += 1) { pOutputChannels[iOutputBus] = pConfig->channels; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_splitter_node_vtable; baseConfig.pInputChannels = pInputChannels; baseConfig.pOutputChannels = pOutputChannels; baseConfig.outputBusCount = pConfig->outputBusCount; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pSplitterNode->base); if (result != MA_SUCCESS) { return result; /* Failed to initialize the base node. */ } return MA_SUCCESS; } MA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_node_uninit(pSplitterNode, pAllocationCallbacks); } /* Biquad Node */ MA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2) { ma_biquad_node_config config; config.nodeConfig = ma_node_config_init(); config.biquad = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2); return config; } static void ma_biquad_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_biquad_process_pcm_frames(&pLPFNode->biquad, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_biquad_node_vtable = { ma_biquad_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->biquad.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_biquad_init(&pConfig->biquad, pAllocationCallbacks, &pNode->biquad); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_biquad_node_vtable; baseNodeConfig.pInputChannels = &pConfig->biquad.channels; baseNodeConfig.pOutputChannels = &pConfig->biquad.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; MA_ASSERT(pNode != NULL); return ma_biquad_reinit(pConfig, &pLPFNode->biquad); } MA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_biquad_uninit(&pLPFNode->biquad, pAllocationCallbacks); } /* Low Pass Filter Node */ MA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_lpf_node_config config; config.nodeConfig = ma_node_config_init(); config.lpf = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_lpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_lpf_process_pcm_frames(&pLPFNode->lpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_lpf_node_vtable = { ma_lpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->lpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_lpf_init(&pConfig->lpf, pAllocationCallbacks, &pNode->lpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_lpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->lpf.channels; baseNodeConfig.pOutputChannels = &pConfig->lpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_lpf_reinit(pConfig, &pLPFNode->lpf); } MA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_lpf_uninit(&pLPFNode->lpf, pAllocationCallbacks); } /* High Pass Filter Node */ MA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_hpf_node_config config; config.nodeConfig = ma_node_config_init(); config.hpf = ma_hpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_hpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_hpf_process_pcm_frames(&pHPFNode->hpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_hpf_node_vtable = { ma_hpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->hpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_hpf_init(&pConfig->hpf, pAllocationCallbacks, &pNode->hpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_hpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->hpf.channels; baseNodeConfig.pOutputChannels = &pConfig->hpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_hpf_reinit(pConfig, &pHPFNode->hpf); } MA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_hpf_uninit(&pHPFNode->hpf, pAllocationCallbacks); } /* Band Pass Filter Node */ MA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order) { ma_bpf_node_config config; config.nodeConfig = ma_node_config_init(); config.bpf = ma_bpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order); return config; } static void ma_bpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_bpf_process_pcm_frames(&pBPFNode->bpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_bpf_node_vtable = { ma_bpf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->bpf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_bpf_init(&pConfig->bpf, pAllocationCallbacks, &pNode->bpf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_bpf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->bpf.channels; baseNodeConfig.pOutputChannels = &pConfig->bpf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_bpf_reinit(pConfig, &pBPFNode->bpf); } MA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_bpf_uninit(&pBPFNode->bpf, pAllocationCallbacks); } /* Notching Filter Node */ MA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency) { ma_notch_node_config config; config.nodeConfig = ma_node_config_init(); config.notch = ma_notch2_config_init(ma_format_f32, channels, sampleRate, q, frequency); return config; } static void ma_notch_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_notch_node* pBPFNode = (ma_notch_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_notch2_process_pcm_frames(&pBPFNode->notch, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_notch_node_vtable = { ma_notch_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->notch.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_notch2_init(&pConfig->notch, pAllocationCallbacks, &pNode->notch); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_notch_node_vtable; baseNodeConfig.pInputChannels = &pConfig->notch.channels; baseNodeConfig.pOutputChannels = &pConfig->notch.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode) { ma_notch_node* pNotchNode = (ma_notch_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_notch2_reinit(pConfig, &pNotchNode->notch); } MA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_notch_node* pNotchNode = (ma_notch_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_notch2_uninit(&pNotchNode->notch, pAllocationCallbacks); } /* Peaking Filter Node */ MA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_peak_node_config config; config.nodeConfig = ma_node_config_init(); config.peak = ma_peak2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_peak_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_peak_node* pBPFNode = (ma_peak_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_peak2_process_pcm_frames(&pBPFNode->peak, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_peak_node_vtable = { ma_peak_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->peak.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_peak2_init(&pConfig->peak, pAllocationCallbacks, &pNode->peak); if (result != MA_SUCCESS) { ma_node_uninit(pNode, pAllocationCallbacks); return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_peak_node_vtable; baseNodeConfig.pInputChannels = &pConfig->peak.channels; baseNodeConfig.pOutputChannels = &pConfig->peak.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode) { ma_peak_node* pPeakNode = (ma_peak_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_peak2_reinit(pConfig, &pPeakNode->peak); } MA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_peak_node* pPeakNode = (ma_peak_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_peak2_uninit(&pPeakNode->peak, pAllocationCallbacks); } /* Low Shelf Filter Node */ MA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_loshelf_node_config config; config.nodeConfig = ma_node_config_init(); config.loshelf = ma_loshelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_loshelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_loshelf_node* pBPFNode = (ma_loshelf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_loshelf2_process_pcm_frames(&pBPFNode->loshelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_loshelf_node_vtable = { ma_loshelf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->loshelf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_loshelf2_init(&pConfig->loshelf, pAllocationCallbacks, &pNode->loshelf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_loshelf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->loshelf.channels; baseNodeConfig.pOutputChannels = &pConfig->loshelf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode) { ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_loshelf2_reinit(pConfig, &pLoshelfNode->loshelf); } MA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_loshelf2_uninit(&pLoshelfNode->loshelf, pAllocationCallbacks); } /* High Shelf Filter Node */ MA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency) { ma_hishelf_node_config config; config.nodeConfig = ma_node_config_init(); config.hishelf = ma_hishelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency); return config; } static void ma_hishelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_hishelf_node* pBPFNode = (ma_hishelf_node*)pNode; MA_ASSERT(pNode != NULL); (void)pFrameCountIn; ma_hishelf2_process_pcm_frames(&pBPFNode->hishelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_hishelf_node_vtable = { ma_hishelf_node_process_pcm_frames, NULL, /* onGetRequiredInputFrameCount */ 1, /* One input. */ 1, /* One output. */ 0 /* Default flags. */ }; MA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode) { ma_result result; ma_node_config baseNodeConfig; if (pNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pNode); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->hishelf.format != ma_format_f32) { return MA_INVALID_ARGS; /* The format must be f32. */ } result = ma_hishelf2_init(&pConfig->hishelf, pAllocationCallbacks, &pNode->hishelf); if (result != MA_SUCCESS) { return result; } baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_hishelf_node_vtable; baseNodeConfig.pInputChannels = &pConfig->hishelf.channels; baseNodeConfig.pOutputChannels = &pConfig->hishelf.channels; result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode); if (result != MA_SUCCESS) { return result; } return result; } MA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode) { ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode; if (pNode == NULL) { return MA_INVALID_ARGS; } return ma_hishelf2_reinit(pConfig, &pHishelfNode->hishelf); } MA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks) { ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode; if (pNode == NULL) { return; } ma_node_uninit(pNode, pAllocationCallbacks); ma_hishelf2_uninit(&pHishelfNode->hishelf, pAllocationCallbacks); } MA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay) { ma_delay_node_config config; config.nodeConfig = ma_node_config_init(); config.delay = ma_delay_config_init(channels, sampleRate, delayInFrames, decay); return config; } static void ma_delay_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_delay_node* pDelayNode = (ma_delay_node*)pNode; (void)pFrameCountIn; ma_delay_process_pcm_frames(&pDelayNode->delay, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut); } static ma_node_vtable g_ma_delay_node_vtable = { ma_delay_node_process_pcm_frames, NULL, 1, /* 1 input channels. */ 1, /* 1 output channel. */ MA_NODE_FLAG_CONTINUOUS_PROCESSING /* Delay requires continuous processing to ensure the tail get's processed. */ }; MA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode) { ma_result result; ma_node_config baseConfig; if (pDelayNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pDelayNode); result = ma_delay_init(&pConfig->delay, pAllocationCallbacks, &pDelayNode->delay); if (result != MA_SUCCESS) { return result; } baseConfig = pConfig->nodeConfig; baseConfig.vtable = &g_ma_delay_node_vtable; baseConfig.pInputChannels = &pConfig->delay.channels; baseConfig.pOutputChannels = &pConfig->delay.channels; result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDelayNode->baseNode); if (result != MA_SUCCESS) { ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks); return result; } return result; } MA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks) { if (pDelayNode == NULL) { return; } /* The base node is always uninitialized first. */ ma_node_uninit(pDelayNode, pAllocationCallbacks); ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks); } MA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_wet(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_wet(&pDelayNode->delay); } MA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_dry(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_dry(&pDelayNode->delay); } MA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value) { if (pDelayNode == NULL) { return; } ma_delay_set_decay(&pDelayNode->delay, value); } MA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode) { if (pDelayNode == NULL) { return 0; } return ma_delay_get_decay(&pDelayNode->delay); } #endif /* MA_NO_NODE_GRAPH */ /* SECTION: miniaudio_engine.c */ #if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH) /************************************************************************************************************************************************************** Engine **************************************************************************************************************************************************************/ #define MA_SEEK_TARGET_NONE (~(ma_uint64)0) static void ma_sound_set_at_end(ma_sound* pSound, ma_bool32 atEnd) { MA_ASSERT(pSound != NULL); ma_atomic_exchange_32(&pSound->atEnd, atEnd); /* Fire any callbacks or events. */ if (atEnd) { if (pSound->endCallback != NULL) { pSound->endCallback(pSound->pEndCallbackUserData, pSound); } } } static ma_bool32 ma_sound_get_at_end(const ma_sound* pSound) { MA_ASSERT(pSound != NULL); return ma_atomic_load_32(&pSound->atEnd); } MA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags) { ma_engine_node_config config; MA_ZERO_OBJECT(&config); config.pEngine = pEngine; config.type = type; config.isPitchDisabled = (flags & MA_SOUND_FLAG_NO_PITCH) != 0; config.isSpatializationDisabled = (flags & MA_SOUND_FLAG_NO_SPATIALIZATION) != 0; config.monoExpansionMode = pEngine->monoExpansionMode; return config; } static void ma_engine_node_update_pitch_if_required(ma_engine_node* pEngineNode) { ma_bool32 isUpdateRequired = MA_FALSE; float newPitch; MA_ASSERT(pEngineNode != NULL); newPitch = ma_atomic_load_explicit_f32(&pEngineNode->pitch, ma_atomic_memory_order_acquire); if (pEngineNode->oldPitch != newPitch) { pEngineNode->oldPitch = newPitch; isUpdateRequired = MA_TRUE; } if (pEngineNode->oldDopplerPitch != pEngineNode->spatializer.dopplerPitch) { pEngineNode->oldDopplerPitch = pEngineNode->spatializer.dopplerPitch; isUpdateRequired = MA_TRUE; } if (isUpdateRequired) { float basePitch = (float)pEngineNode->sampleRate / ma_engine_get_sample_rate(pEngineNode->pEngine); ma_linear_resampler_set_rate_ratio(&pEngineNode->resampler, basePitch * pEngineNode->oldPitch * pEngineNode->oldDopplerPitch); } } static ma_bool32 ma_engine_node_is_pitching_enabled(const ma_engine_node* pEngineNode) { MA_ASSERT(pEngineNode != NULL); /* Don't try to be clever by skipping resampling in the pitch=1 case or else you'll glitch when moving away from 1. */ return !ma_atomic_load_explicit_32(&pEngineNode->isPitchDisabled, ma_atomic_memory_order_acquire); } static ma_bool32 ma_engine_node_is_spatialization_enabled(const ma_engine_node* pEngineNode) { MA_ASSERT(pEngineNode != NULL); return !ma_atomic_load_explicit_32(&pEngineNode->isSpatializationDisabled, ma_atomic_memory_order_acquire); } static ma_uint64 ma_engine_node_get_required_input_frame_count(const ma_engine_node* pEngineNode, ma_uint64 outputFrameCount) { ma_uint64 inputFrameCount = 0; if (ma_engine_node_is_pitching_enabled(pEngineNode)) { ma_result result = ma_linear_resampler_get_required_input_frame_count(&pEngineNode->resampler, outputFrameCount, &inputFrameCount); if (result != MA_SUCCESS) { inputFrameCount = 0; } } else { inputFrameCount = outputFrameCount; /* No resampling, so 1:1. */ } return inputFrameCount; } static ma_result ma_engine_node_set_volume(ma_engine_node* pEngineNode, float volume) { if (pEngineNode == NULL) { return MA_INVALID_ARGS; } ma_atomic_float_set(&pEngineNode->volume, volume); /* If we're not smoothing we should bypass the volume gainer entirely. */ if (pEngineNode->volumeSmoothTimeInPCMFrames == 0) { /* We should always have an active spatializer because it can be enabled and disabled dynamically. We can just use that for holding our volume. */ ma_spatializer_set_master_volume(&pEngineNode->spatializer, volume); } else { /* We're using volume smoothing, so apply the master volume to the gainer. */ ma_gainer_set_gain(&pEngineNode->volumeGainer, volume); } return MA_SUCCESS; } static ma_result ma_engine_node_get_volume(const ma_engine_node* pEngineNode, float* pVolume) { if (pVolume == NULL) { return MA_INVALID_ARGS; } *pVolume = 0.0f; if (pEngineNode == NULL) { return MA_INVALID_ARGS; } *pVolume = ma_atomic_float_get((ma_atomic_float*)&pEngineNode->volume); return MA_SUCCESS; } static void ma_engine_node_process_pcm_frames__general(ma_engine_node* pEngineNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { ma_uint32 frameCountIn; ma_uint32 frameCountOut; ma_uint32 totalFramesProcessedIn; ma_uint32 totalFramesProcessedOut; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_bool32 isPitchingEnabled; ma_bool32 isFadingEnabled; ma_bool32 isSpatializationEnabled; ma_bool32 isPanningEnabled; ma_bool32 isVolumeSmoothingEnabled; frameCountIn = *pFrameCountIn; frameCountOut = *pFrameCountOut; channelsIn = ma_spatializer_get_input_channels(&pEngineNode->spatializer); channelsOut = ma_spatializer_get_output_channels(&pEngineNode->spatializer); totalFramesProcessedIn = 0; totalFramesProcessedOut = 0; /* Update the fader if applicable. */ { ma_uint64 fadeLengthInFrames = ma_atomic_uint64_get(&pEngineNode->fadeSettings.fadeLengthInFrames); if (fadeLengthInFrames != ~(ma_uint64)0) { float fadeVolumeBeg = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeBeg); float fadeVolumeEnd = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeEnd); ma_int64 fadeStartOffsetInFrames = (ma_int64)ma_atomic_uint64_get(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames); if (fadeStartOffsetInFrames == (ma_int64)(~(ma_uint64)0)) { fadeStartOffsetInFrames = 0; } else { fadeStartOffsetInFrames -= ma_engine_get_time_in_pcm_frames(pEngineNode->pEngine); } ma_fader_set_fade_ex(&pEngineNode->fader, fadeVolumeBeg, fadeVolumeEnd, fadeLengthInFrames, fadeStartOffsetInFrames); /* Reset the fade length so we don't erroneously apply it again. */ ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, ~(ma_uint64)0); } } isPitchingEnabled = ma_engine_node_is_pitching_enabled(pEngineNode); isFadingEnabled = pEngineNode->fader.volumeBeg != 1 || pEngineNode->fader.volumeEnd != 1; isSpatializationEnabled = ma_engine_node_is_spatialization_enabled(pEngineNode); isPanningEnabled = pEngineNode->panner.pan != 0 && channelsOut != 1; isVolumeSmoothingEnabled = pEngineNode->volumeSmoothTimeInPCMFrames > 0; /* Keep going while we've still got data available for processing. */ while (totalFramesProcessedOut < frameCountOut) { /* We need to process in a specific order. We always do resampling first because it's likely we're going to be increasing the channel count after spatialization. Also, I want to do fading based on the output sample rate. We'll first read into a buffer from the resampler. Then we'll do all processing that operates on the on the input channel count. We'll then get the spatializer to output to the output buffer and then do all effects from that point directly in the output buffer in-place. Note that we're always running the resampler if pitching is enabled, even when the pitch is 1. If we try to be clever and skip resampling when the pitch is 1, we'll get a glitch when we move away from 1, back to 1, and then away from 1 again. We'll want to implement any pitch=1 optimizations in the resampler itself. There's a small optimization here that we'll utilize since it might be a fairly common case. When the input and output channel counts are the same, we'll read straight into the output buffer from the resampler and do everything in-place. */ const float* pRunningFramesIn; float* pRunningFramesOut; float* pWorkingBuffer; /* This is the buffer that we'll be processing frames in. This is in input channels. */ float temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE / sizeof(float)]; ma_uint32 tempCapInFrames = ma_countof(temp) / channelsIn; ma_uint32 framesAvailableIn; ma_uint32 framesAvailableOut; ma_uint32 framesJustProcessedIn; ma_uint32 framesJustProcessedOut; ma_bool32 isWorkingBufferValid = MA_FALSE; framesAvailableIn = frameCountIn - totalFramesProcessedIn; framesAvailableOut = frameCountOut - totalFramesProcessedOut; pRunningFramesIn = ma_offset_pcm_frames_const_ptr_f32(ppFramesIn[0], totalFramesProcessedIn, channelsIn); pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesProcessedOut, channelsOut); if (channelsIn == channelsOut) { /* Fast path. Channel counts are the same. No need for an intermediary input buffer. */ pWorkingBuffer = pRunningFramesOut; } else { /* Slow path. Channel counts are different. Need to use an intermediary input buffer. */ pWorkingBuffer = temp; if (framesAvailableOut > tempCapInFrames) { framesAvailableOut = tempCapInFrames; } } /* First is resampler. */ if (isPitchingEnabled) { ma_uint64 resampleFrameCountIn = framesAvailableIn; ma_uint64 resampleFrameCountOut = framesAvailableOut; ma_linear_resampler_process_pcm_frames(&pEngineNode->resampler, pRunningFramesIn, &resampleFrameCountIn, pWorkingBuffer, &resampleFrameCountOut); isWorkingBufferValid = MA_TRUE; framesJustProcessedIn = (ma_uint32)resampleFrameCountIn; framesJustProcessedOut = (ma_uint32)resampleFrameCountOut; } else { framesJustProcessedIn = ma_min(framesAvailableIn, framesAvailableOut); framesJustProcessedOut = framesJustProcessedIn; /* When no resampling is being performed, the number of output frames is the same as input frames. */ } /* Fading. */ if (isFadingEnabled) { if (isWorkingBufferValid) { ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut); /* In-place processing. */ } else { ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut); isWorkingBufferValid = MA_TRUE; } } /* If we're using smoothing, we won't be applying volume via the spatializer, but instead from a ma_gainer. In this case we'll want to apply our volume now. */ if (isVolumeSmoothingEnabled) { if (isWorkingBufferValid) { ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut); } else { ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut); isWorkingBufferValid = MA_TRUE; } } /* If at this point we still haven't actually done anything with the working buffer we need to just read straight from the input buffer. */ if (isWorkingBufferValid == MA_FALSE) { pWorkingBuffer = (float*)pRunningFramesIn; /* Naughty const cast, but it's safe at this point because we won't ever be writing to it from this point out. */ } /* Spatialization. */ if (isSpatializationEnabled) { ma_uint32 iListener; /* When determining the listener to use, we first check to see if the sound is pinned to a specific listener. If so, we use that. Otherwise we just use the closest listener. */ if (pEngineNode->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pEngineNode->pinnedListenerIndex < ma_engine_get_listener_count(pEngineNode->pEngine)) { iListener = pEngineNode->pinnedListenerIndex; } else { ma_vec3f spatializerPosition = ma_spatializer_get_position(&pEngineNode->spatializer); iListener = ma_engine_find_closest_listener(pEngineNode->pEngine, spatializerPosition.x, spatializerPosition.y, spatializerPosition.z); } ma_spatializer_process_pcm_frames(&pEngineNode->spatializer, &pEngineNode->pEngine->listeners[iListener], pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut); } else { /* No spatialization, but we still need to do channel conversion and master volume. */ float volume; ma_engine_node_get_volume(pEngineNode, &volume); /* Should never fail. */ if (channelsIn == channelsOut) { /* No channel conversion required. Just copy straight to the output buffer. */ if (isVolumeSmoothingEnabled) { /* Volume has already been applied. Just copy straight to the output buffer. */ ma_copy_pcm_frames(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, ma_format_f32, channelsOut); } else { /* Volume has not been applied yet. Copy and apply volume in the same pass. */ ma_copy_and_apply_volume_factor_f32(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, volume); } } else { /* Channel conversion required. TODO: Add support for channel maps here. */ ma_channel_map_apply_f32(pRunningFramesOut, NULL, channelsOut, pWorkingBuffer, NULL, channelsIn, framesJustProcessedOut, ma_channel_mix_mode_simple, pEngineNode->monoExpansionMode); /* If we're using smoothing, the volume will have already been applied. */ if (!isVolumeSmoothingEnabled) { ma_apply_volume_factor_f32(pRunningFramesOut, framesJustProcessedOut * channelsOut, volume); } } } /* At this point we can guarantee that the output buffer contains valid data. We can process everything in place now. */ /* Panning. */ if (isPanningEnabled) { ma_panner_process_pcm_frames(&pEngineNode->panner, pRunningFramesOut, pRunningFramesOut, framesJustProcessedOut); /* In-place processing. */ } /* We're done for this chunk. */ totalFramesProcessedIn += framesJustProcessedIn; totalFramesProcessedOut += framesJustProcessedOut; /* If we didn't process any output frames this iteration it means we've either run out of input data, or run out of room in the output buffer. */ if (framesJustProcessedOut == 0) { break; } } /* At this point we're done processing. */ *pFrameCountIn = totalFramesProcessedIn; *pFrameCountOut = totalFramesProcessedOut; } static void ma_engine_node_process_pcm_frames__sound(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { /* For sounds, we need to first read from the data source. Then we need to apply the engine effects (pan, pitch, fades, etc.). */ ma_result result = MA_SUCCESS; ma_sound* pSound = (ma_sound*)pNode; ma_uint32 frameCount = *pFrameCountOut; ma_uint32 totalFramesRead = 0; ma_format dataSourceFormat; ma_uint32 dataSourceChannels; ma_uint8 temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint32 tempCapInFrames; ma_uint64 seekTarget; /* This is a data source node which means no input buses. */ (void)ppFramesIn; (void)pFrameCountIn; /* If we're marked at the end we need to stop the sound and do nothing. */ if (ma_sound_at_end(pSound)) { ma_sound_stop(pSound); *pFrameCountOut = 0; return; } /* If we're seeking, do so now before reading. */ seekTarget = ma_atomic_load_64(&pSound->seekTarget); if (seekTarget != MA_SEEK_TARGET_NONE) { ma_data_source_seek_to_pcm_frame(pSound->pDataSource, seekTarget); /* Any time-dependant effects need to have their times updated. */ ma_node_set_time(pSound, seekTarget); ma_atomic_exchange_64(&pSound->seekTarget, MA_SEEK_TARGET_NONE); } /* We want to update the pitch once. For sounds, this can be either at the start or at the end. If we don't force this to only ever be updating once, we could end up in a situation where retrieving the required input frame count ends up being different to what we actually retrieve. What could happen is that the required input frame count is calculated, the pitch is update, and then this processing function is called resulting in a different number of input frames being processed. Do not call this in ma_engine_node_process_pcm_frames__general() or else you'll hit the aforementioned bug. */ ma_engine_node_update_pitch_if_required(&pSound->engineNode); /* For the convenience of the caller, we're doing to allow data sources to use non-floating-point formats and channel counts that differ from the main engine. */ result = ma_data_source_get_data_format(pSound->pDataSource, &dataSourceFormat, &dataSourceChannels, NULL, NULL, 0); if (result == MA_SUCCESS) { tempCapInFrames = sizeof(temp) / ma_get_bytes_per_frame(dataSourceFormat, dataSourceChannels); /* Keep reading until we've read as much as was requested or we reach the end of the data source. */ while (totalFramesRead < frameCount) { ma_uint32 framesRemaining = frameCount - totalFramesRead; ma_uint32 framesToRead; ma_uint64 framesJustRead; ma_uint32 frameCountIn; ma_uint32 frameCountOut; const float* pRunningFramesIn; float* pRunningFramesOut; /* The first thing we need to do is read into the temporary buffer. We can calculate exactly how many input frames we'll need after resampling. */ framesToRead = (ma_uint32)ma_engine_node_get_required_input_frame_count(&pSound->engineNode, framesRemaining); if (framesToRead > tempCapInFrames) { framesToRead = tempCapInFrames; } result = ma_data_source_read_pcm_frames(pSound->pDataSource, temp, framesToRead, &framesJustRead); /* If we reached the end of the sound we'll want to mark it as at the end and stop it. This should never be returned for looping sounds. */ if (result == MA_AT_END) { ma_sound_set_at_end(pSound, MA_TRUE); /* This will be set to false in ma_sound_start(). */ } pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesRead, ma_node_get_output_channels(pNode, 0)); frameCountIn = (ma_uint32)framesJustRead; frameCountOut = framesRemaining; /* Convert if necessary. */ if (dataSourceFormat == ma_format_f32) { /* Fast path. No data conversion necessary. */ pRunningFramesIn = (float*)temp; ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut); } else { /* Slow path. Need to do sample format conversion to f32. If we give the f32 buffer the same count as the first temp buffer, we're guaranteed it'll be large enough. */ float tempf32[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* Do not do `MA_DATA_CONVERTER_STACK_BUFFER_SIZE/sizeof(float)` here like we've done in other places. */ ma_convert_pcm_frames_format(tempf32, ma_format_f32, temp, dataSourceFormat, framesJustRead, dataSourceChannels, ma_dither_mode_none); /* Now that we have our samples in f32 format we can process like normal. */ pRunningFramesIn = tempf32; ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut); } /* We should have processed all of our input frames since we calculated the required number of input frames at the top. */ MA_ASSERT(frameCountIn == framesJustRead); totalFramesRead += (ma_uint32)frameCountOut; /* Safe cast. */ if (result != MA_SUCCESS || ma_sound_at_end(pSound)) { break; /* Might have reached the end. */ } } } *pFrameCountOut = totalFramesRead; } static void ma_engine_node_process_pcm_frames__group(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut) { /* Make sure the pitch is updated before trying to read anything. It's important that this is done only once and not in ma_engine_node_process_pcm_frames__general(). The reason for this is that ma_engine_node_process_pcm_frames__general() will call ma_engine_node_get_required_input_frame_count(), and if another thread modifies the pitch just after that call it can result in a glitch due to the input rate changing. */ ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode); /* For groups, the input data has already been read and we just need to apply the effect. */ ma_engine_node_process_pcm_frames__general((ma_engine_node*)pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut); } static ma_result ma_engine_node_get_required_input_frame_count__group(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount) { ma_uint64 inputFrameCount; MA_ASSERT(pInputFrameCount != NULL); /* Our pitch will affect this calculation. We need to update it. */ ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode); inputFrameCount = ma_engine_node_get_required_input_frame_count((ma_engine_node*)pNode, outputFrameCount); if (inputFrameCount > 0xFFFFFFFF) { inputFrameCount = 0xFFFFFFFF; /* Will never happen because miniaudio will only ever process in relatively small chunks. */ } *pInputFrameCount = (ma_uint32)inputFrameCount; return MA_SUCCESS; } static ma_node_vtable g_ma_engine_node_vtable__sound = { ma_engine_node_process_pcm_frames__sound, NULL, /* onGetRequiredInputFrameCount */ 0, /* Sounds are data source nodes which means they have zero inputs (their input is drawn from the data source itself). */ 1, /* Sounds have one output bus. */ 0 /* Default flags. */ }; static ma_node_vtable g_ma_engine_node_vtable__group = { ma_engine_node_process_pcm_frames__group, ma_engine_node_get_required_input_frame_count__group, 1, /* Groups have one input bus. */ 1, /* Groups have one output bus. */ MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES /* The engine node does resampling so should let miniaudio know about it. */ }; static ma_node_config ma_engine_node_base_node_config_init(const ma_engine_node_config* pConfig) { ma_node_config baseNodeConfig; if (pConfig->type == ma_engine_node_type_sound) { /* Sound. */ baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_engine_node_vtable__sound; baseNodeConfig.initialState = ma_node_state_stopped; /* Sounds are stopped by default. */ } else { /* Group. */ baseNodeConfig = ma_node_config_init(); baseNodeConfig.vtable = &g_ma_engine_node_vtable__group; baseNodeConfig.initialState = ma_node_state_started; /* Groups are started by default. */ } return baseNodeConfig; } static ma_spatializer_config ma_engine_node_spatializer_config_init(const ma_node_config* pBaseNodeConfig) { return ma_spatializer_config_init(pBaseNodeConfig->pInputChannels[0], pBaseNodeConfig->pOutputChannels[0]); } typedef struct { size_t sizeInBytes; size_t baseNodeOffset; size_t resamplerOffset; size_t spatializerOffset; size_t gainerOffset; } ma_engine_node_heap_layout; static ma_result ma_engine_node_get_heap_layout(const ma_engine_node_config* pConfig, ma_engine_node_heap_layout* pHeapLayout) { ma_result result; size_t tempHeapSize; ma_node_config baseNodeConfig; ma_linear_resampler_config resamplerConfig; ma_spatializer_config spatializerConfig; ma_gainer_config gainerConfig; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT}; /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */ MA_ASSERT(pHeapLayout); MA_ZERO_OBJECT(pHeapLayout); if (pConfig == NULL) { return MA_INVALID_ARGS; } if (pConfig->pEngine == NULL) { return MA_INVALID_ARGS; /* An engine must be specified. */ } pHeapLayout->sizeInBytes = 0; channelsIn = (pConfig->channelsIn != 0) ? pConfig->channelsIn : ma_engine_get_channels(pConfig->pEngine); channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine); /* Base node. */ baseNodeConfig = ma_engine_node_base_node_config_init(pConfig); baseNodeConfig.pInputChannels = &channelsIn; baseNodeConfig.pOutputChannels = &channelsOut; result = ma_node_get_heap_size(ma_engine_get_node_graph(pConfig->pEngine), &baseNodeConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the base node. */ } pHeapLayout->baseNodeOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Resmapler. */ resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, channelsIn, 1, 1); /* Input and output sample rates don't affect the calculation of the heap size. */ resamplerConfig.lpfOrder = 0; result = ma_linear_resampler_get_heap_size(&resamplerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the resampler. */ } pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Spatializer. */ spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig); if (spatializerConfig.channelsIn == 2) { spatializerConfig.pChannelMapIn = defaultStereoChannelMap; } result = ma_spatializer_get_heap_size(&spatializerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the size of the heap for the spatializer. */ } pHeapLayout->spatializerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); /* Gainer. Will not be used if we are not using smoothing. */ if (pConfig->volumeSmoothTimeInPCMFrames > 0) { gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames); result = ma_gainer_get_heap_size(&gainerConfig, &tempHeapSize); if (result != MA_SUCCESS) { return result; } pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes; pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize); } return MA_SUCCESS; } MA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes) { ma_result result; ma_engine_node_heap_layout heapLayout; if (pHeapSizeInBytes == NULL) { return MA_INVALID_ARGS; } *pHeapSizeInBytes = 0; result = ma_engine_node_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } *pHeapSizeInBytes = heapLayout.sizeInBytes; return MA_SUCCESS; } MA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode) { ma_result result; ma_engine_node_heap_layout heapLayout; ma_node_config baseNodeConfig; ma_linear_resampler_config resamplerConfig; ma_fader_config faderConfig; ma_spatializer_config spatializerConfig; ma_panner_config pannerConfig; ma_gainer_config gainerConfig; ma_uint32 channelsIn; ma_uint32 channelsOut; ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT}; /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */ if (pEngineNode == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEngineNode); result = ma_engine_node_get_heap_layout(pConfig, &heapLayout); if (result != MA_SUCCESS) { return result; } if (pConfig->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pConfig->pinnedListenerIndex >= ma_engine_get_listener_count(pConfig->pEngine)) { return MA_INVALID_ARGS; /* Invalid listener. */ } pEngineNode->_pHeap = pHeap; MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes); pEngineNode->pEngine = pConfig->pEngine; pEngineNode->sampleRate = (pConfig->sampleRate > 0) ? pConfig->sampleRate : ma_engine_get_sample_rate(pEngineNode->pEngine); pEngineNode->volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames; pEngineNode->monoExpansionMode = pConfig->monoExpansionMode; ma_atomic_float_set(&pEngineNode->volume, 1); pEngineNode->pitch = 1; pEngineNode->oldPitch = 1; pEngineNode->oldDopplerPitch = 1; pEngineNode->isPitchDisabled = pConfig->isPitchDisabled; pEngineNode->isSpatializationDisabled = pConfig->isSpatializationDisabled; pEngineNode->pinnedListenerIndex = pConfig->pinnedListenerIndex; ma_atomic_float_set(&pEngineNode->fadeSettings.volumeBeg, 1); ma_atomic_float_set(&pEngineNode->fadeSettings.volumeEnd, 1); ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, (~(ma_uint64)0)); ma_atomic_uint64_set(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames, (~(ma_uint64)0)); /* <-- Indicates that the fade should start immediately. */ channelsIn = (pConfig->channelsIn != 0) ? pConfig->channelsIn : ma_engine_get_channels(pConfig->pEngine); channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine); /* If the sample rate of the sound is different to the engine, make sure pitching is enabled so that the resampler is activated. Not doing this will result in the sound not being resampled if MA_SOUND_FLAG_NO_PITCH is used. */ if (pEngineNode->sampleRate != ma_engine_get_sample_rate(pEngineNode->pEngine)) { pEngineNode->isPitchDisabled = MA_FALSE; } /* Base node. */ baseNodeConfig = ma_engine_node_base_node_config_init(pConfig); baseNodeConfig.pInputChannels = &channelsIn; baseNodeConfig.pOutputChannels = &channelsOut; result = ma_node_init_preallocated(&pConfig->pEngine->nodeGraph, &baseNodeConfig, ma_offset_ptr(pHeap, heapLayout.baseNodeOffset), &pEngineNode->baseNode); if (result != MA_SUCCESS) { goto error0; } /* We can now initialize the effects we need in order to implement the engine node. There's a defined order of operations here, mainly centered around when we convert our channels from the data source's native channel count to the engine's channel count. As a rule, we want to do as much computation as possible before spatialization because there's a chance that will increase the channel count, thereby increasing the amount of work needing to be done to process. */ /* We'll always do resampling first. */ resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], pEngineNode->sampleRate, ma_engine_get_sample_rate(pEngineNode->pEngine)); resamplerConfig.lpfOrder = 0; /* <-- Need to disable low-pass filtering for pitch shifting for now because there's cases where the biquads are becoming unstable. Need to figure out a better fix for this. */ result = ma_linear_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pEngineNode->resampler); if (result != MA_SUCCESS) { goto error1; } /* After resampling will come the fader. */ faderConfig = ma_fader_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], ma_engine_get_sample_rate(pEngineNode->pEngine)); result = ma_fader_init(&faderConfig, &pEngineNode->fader); if (result != MA_SUCCESS) { goto error2; } /* Spatialization comes next. We spatialize based on the node's output channel count. It's up the caller to ensure channels counts link up correctly in the node graph. */ spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig); spatializerConfig.gainSmoothTimeInFrames = pEngineNode->pEngine->gainSmoothTimeInFrames; if (spatializerConfig.channelsIn == 2) { spatializerConfig.pChannelMapIn = defaultStereoChannelMap; } result = ma_spatializer_init_preallocated(&spatializerConfig, ma_offset_ptr(pHeap, heapLayout.spatializerOffset), &pEngineNode->spatializer); if (result != MA_SUCCESS) { goto error2; } /* After spatialization comes panning. We need to do this after spatialization because otherwise we wouldn't be able to pan mono sounds. */ pannerConfig = ma_panner_config_init(ma_format_f32, baseNodeConfig.pOutputChannels[0]); result = ma_panner_init(&pannerConfig, &pEngineNode->panner); if (result != MA_SUCCESS) { goto error3; } /* We'll need a gainer for smoothing out volume changes if we have a non-zero smooth time. We apply this before converting to the output channel count. */ if (pConfig->volumeSmoothTimeInPCMFrames > 0) { gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames); result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pEngineNode->volumeGainer); if (result != MA_SUCCESS) { goto error3; } } return MA_SUCCESS; /* No need for allocation callbacks here because we use a preallocated heap. */ error3: ma_spatializer_uninit(&pEngineNode->spatializer, NULL); error2: ma_linear_resampler_uninit(&pEngineNode->resampler, NULL); error1: ma_node_uninit(&pEngineNode->baseNode, NULL); error0: return result; } MA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode) { ma_result result; size_t heapSizeInBytes; void* pHeap; result = ma_engine_node_get_heap_size(pConfig, &heapSizeInBytes); if (result != MA_SUCCESS) { return result; } if (heapSizeInBytes > 0) { pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks); if (pHeap == NULL) { return MA_OUT_OF_MEMORY; } } else { pHeap = NULL; } result = ma_engine_node_init_preallocated(pConfig, pHeap, pEngineNode); if (result != MA_SUCCESS) { ma_free(pHeap, pAllocationCallbacks); return result; } pEngineNode->_ownsHeap = MA_TRUE; return MA_SUCCESS; } MA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks) { /* The base node always needs to be uninitialized first to ensure it's detached from the graph completely before we destroy anything that might be in the middle of being used by the processing function. */ ma_node_uninit(&pEngineNode->baseNode, pAllocationCallbacks); /* Now that the node has been uninitialized we can safely uninitialize the rest. */ if (pEngineNode->volumeSmoothTimeInPCMFrames > 0) { ma_gainer_uninit(&pEngineNode->volumeGainer, pAllocationCallbacks); } ma_spatializer_uninit(&pEngineNode->spatializer, pAllocationCallbacks); ma_linear_resampler_uninit(&pEngineNode->resampler, pAllocationCallbacks); /* Free the heap last. */ if (pEngineNode->_ownsHeap) { ma_free(pEngineNode->_pHeap, pAllocationCallbacks); } } MA_API ma_sound_config ma_sound_config_init(void) { return ma_sound_config_init_2(NULL); } MA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine) { ma_sound_config config; MA_ZERO_OBJECT(&config); if (pEngine != NULL) { config.monoExpansionMode = pEngine->monoExpansionMode; } else { config.monoExpansionMode = ma_mono_expansion_mode_default; } config.rangeEndInPCMFrames = ~((ma_uint64)0); config.loopPointEndInPCMFrames = ~((ma_uint64)0); return config; } MA_API ma_sound_group_config ma_sound_group_config_init(void) { return ma_sound_group_config_init_2(NULL); } MA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine) { ma_sound_group_config config; MA_ZERO_OBJECT(&config); if (pEngine != NULL) { config.monoExpansionMode = pEngine->monoExpansionMode; } else { config.monoExpansionMode = ma_mono_expansion_mode_default; } return config; } MA_API ma_engine_config ma_engine_config_init(void) { ma_engine_config config; MA_ZERO_OBJECT(&config); config.listenerCount = 1; /* Always want at least one listener. */ config.monoExpansionMode = ma_mono_expansion_mode_default; return config; } #if !defined(MA_NO_DEVICE_IO) static void ma_engine_data_callback_internal(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { ma_engine* pEngine = (ma_engine*)pDevice->pUserData; (void)pFramesIn; /* Experiment: Try processing a resource manager job if we're on the Emscripten build. This serves two purposes: 1) It ensures jobs are actually processed at some point since we cannot guarantee that the caller is doing the right thing and calling ma_resource_manager_process_next_job(); and 2) It's an attempt at working around an issue where processing jobs on the Emscripten main loop doesn't work as well as it should. When trying to load sounds without the `DECODE` flag or with the `ASYNC` flag, the sound data is just not able to be loaded in time before the callback is processed. I think it's got something to do with the single- threaded nature of Web, but I'm not entirely sure. */ #if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_EMSCRIPTEN) { if (pEngine->pResourceManager != NULL) { if ((pEngine->pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) { ma_resource_manager_process_next_job(pEngine->pResourceManager); } } } #endif ma_engine_read_pcm_frames(pEngine, pFramesOut, frameCount, NULL); } static ma_uint32 ma_device__get_processing_size_in_frames(ma_device* pDevice) { /* The processing size is the period size. The device can have a fixed sized processing size, or it can be decided by the backend in which case it can be variable. */ if (pDevice->playback.intermediaryBufferCap > 0) { /* Using a fixed sized processing callback. */ return pDevice->playback.intermediaryBufferCap; } else { /* Not using a fixed sized processing callback. Need to estimate the processing size based on the backend. */ return pDevice->playback.internalPeriodSizeInFrames; } } #endif MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine) { ma_result result; ma_node_graph_config nodeGraphConfig; ma_engine_config engineConfig; ma_spatializer_listener_config listenerConfig; ma_uint32 iListener; if (pEngine == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pEngine); /* The config is allowed to be NULL in which case we use defaults for everything. */ if (pConfig != NULL) { engineConfig = *pConfig; } else { engineConfig = ma_engine_config_init(); } pEngine->monoExpansionMode = engineConfig.monoExpansionMode; pEngine->defaultVolumeSmoothTimeInPCMFrames = engineConfig.defaultVolumeSmoothTimeInPCMFrames; pEngine->onProcess = engineConfig.onProcess; pEngine->pProcessUserData = engineConfig.pProcessUserData; ma_allocation_callbacks_init_copy(&pEngine->allocationCallbacks, &engineConfig.allocationCallbacks); #if !defined(MA_NO_RESOURCE_MANAGER) { pEngine->pResourceManager = engineConfig.pResourceManager; } #endif #if !defined(MA_NO_DEVICE_IO) { pEngine->pDevice = engineConfig.pDevice; /* If we don't have a device, we need one. */ if (pEngine->pDevice == NULL && engineConfig.noDevice == MA_FALSE) { ma_device_config deviceConfig; pEngine->pDevice = (ma_device*)ma_malloc(sizeof(*pEngine->pDevice), &pEngine->allocationCallbacks); if (pEngine->pDevice == NULL) { return MA_OUT_OF_MEMORY; } deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.pDeviceID = engineConfig.pPlaybackDeviceID; deviceConfig.playback.format = ma_format_f32; deviceConfig.playback.channels = engineConfig.channels; deviceConfig.sampleRate = engineConfig.sampleRate; deviceConfig.dataCallback = (engineConfig.dataCallback != NULL) ? engineConfig.dataCallback : ma_engine_data_callback_internal; deviceConfig.pUserData = pEngine; deviceConfig.notificationCallback = engineConfig.notificationCallback; deviceConfig.periodSizeInFrames = engineConfig.periodSizeInFrames; deviceConfig.periodSizeInMilliseconds = engineConfig.periodSizeInMilliseconds; deviceConfig.noPreSilencedOutputBuffer = MA_TRUE; /* We'll always be outputting to every frame in the callback so there's no need for a pre-silenced buffer. */ deviceConfig.noClip = MA_TRUE; /* The engine will do clipping itself. */ if (engineConfig.pContext == NULL) { ma_context_config contextConfig = ma_context_config_init(); contextConfig.allocationCallbacks = pEngine->allocationCallbacks; contextConfig.pLog = engineConfig.pLog; /* If the engine config does not specify a log, use the resource manager's if we have one. */ #ifndef MA_NO_RESOURCE_MANAGER { if (contextConfig.pLog == NULL && engineConfig.pResourceManager != NULL) { contextConfig.pLog = ma_resource_manager_get_log(engineConfig.pResourceManager); } } #endif result = ma_device_init_ex(NULL, 0, &contextConfig, &deviceConfig, pEngine->pDevice); } else { result = ma_device_init(engineConfig.pContext, &deviceConfig, pEngine->pDevice); } if (result != MA_SUCCESS) { ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); pEngine->pDevice = NULL; return result; } pEngine->ownsDevice = MA_TRUE; } /* Update the channel count and sample rate of the engine config so we can reference it below. */ if (pEngine->pDevice != NULL) { engineConfig.channels = pEngine->pDevice->playback.channels; engineConfig.sampleRate = pEngine->pDevice->sampleRate; /* The processing size used by the engine is determined by engineConfig.periodSizeInFrames. We want to make this equal to what the device is using for it's period size. If we don't do that, it's possible that the node graph will split it's processing into multiple passes which can introduce glitching. */ engineConfig.periodSizeInFrames = ma_device__get_processing_size_in_frames(pEngine->pDevice); } } #endif if (engineConfig.channels == 0 || engineConfig.sampleRate == 0) { return MA_INVALID_ARGS; } pEngine->sampleRate = engineConfig.sampleRate; /* The engine always uses either the log that was passed into the config, or the context's log is available. */ if (engineConfig.pLog != NULL) { pEngine->pLog = engineConfig.pLog; } else { #if !defined(MA_NO_DEVICE_IO) { pEngine->pLog = ma_device_get_log(pEngine->pDevice); } #else { pEngine->pLog = NULL; } #endif } /* The engine is a node graph. This needs to be initialized after we have the device so we can determine the channel count. */ nodeGraphConfig = ma_node_graph_config_init(engineConfig.channels); nodeGraphConfig.processingSizeInFrames = engineConfig.periodSizeInFrames; nodeGraphConfig.preMixStackSizeInBytes = engineConfig.preMixStackSizeInBytes; result = ma_node_graph_init(&nodeGraphConfig, &pEngine->allocationCallbacks, &pEngine->nodeGraph); if (result != MA_SUCCESS) { goto on_error_1; } /* We need at least one listener. */ if (engineConfig.listenerCount == 0) { engineConfig.listenerCount = 1; } if (engineConfig.listenerCount > MA_ENGINE_MAX_LISTENERS) { result = MA_INVALID_ARGS; /* Too many listeners. */ goto on_error_1; } for (iListener = 0; iListener < engineConfig.listenerCount; iListener += 1) { listenerConfig = ma_spatializer_listener_config_init(ma_node_graph_get_channels(&pEngine->nodeGraph)); /* If we're using a device, use the device's channel map for the listener. Otherwise just use miniaudio's default channel map. */ #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { /* Temporarily disabled. There is a subtle bug here where front-left and front-right will be used by the device's channel map, but this is not what we want to use for spatialization. Instead we want to use side-left and side-right. I need to figure out a better solution for this. For now, disabling the use of device channel maps. */ /*listenerConfig.pChannelMapOut = pEngine->pDevice->playback.channelMap;*/ } } #endif result = ma_spatializer_listener_init(&listenerConfig, &pEngine->allocationCallbacks, &pEngine->listeners[iListener]); /* TODO: Change this to a pre-allocated heap. */ if (result != MA_SUCCESS) { goto on_error_2; } pEngine->listenerCount += 1; } /* Gain smoothing for spatialized sounds. */ pEngine->gainSmoothTimeInFrames = engineConfig.gainSmoothTimeInFrames; if (pEngine->gainSmoothTimeInFrames == 0) { ma_uint32 gainSmoothTimeInMilliseconds = engineConfig.gainSmoothTimeInMilliseconds; if (gainSmoothTimeInMilliseconds == 0) { gainSmoothTimeInMilliseconds = 8; } pEngine->gainSmoothTimeInFrames = (gainSmoothTimeInMilliseconds * ma_engine_get_sample_rate(pEngine)) / 1000; /* 8ms by default. */ } /* We need a resource manager. */ #ifndef MA_NO_RESOURCE_MANAGER { if (pEngine->pResourceManager == NULL) { ma_resource_manager_config resourceManagerConfig; pEngine->pResourceManager = (ma_resource_manager*)ma_malloc(sizeof(*pEngine->pResourceManager), &pEngine->allocationCallbacks); if (pEngine->pResourceManager == NULL) { result = MA_OUT_OF_MEMORY; goto on_error_2; } resourceManagerConfig = ma_resource_manager_config_init(); resourceManagerConfig.pLog = pEngine->pLog; /* Always use the engine's log for internally-managed resource managers. */ resourceManagerConfig.decodedFormat = ma_format_f32; resourceManagerConfig.decodedChannels = 0; /* Leave the decoded channel count as 0 so we can get good spatialization. */ resourceManagerConfig.decodedSampleRate = ma_engine_get_sample_rate(pEngine); ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks); resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS; /* The Emscripten build cannot use threads unless it's targeting pthreads. */ #if defined(MA_EMSCRIPTEN) && !defined(__EMSCRIPTEN_PTHREADS__) { resourceManagerConfig.jobThreadCount = 0; resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; } #endif result = ma_resource_manager_init(&resourceManagerConfig, pEngine->pResourceManager); if (result != MA_SUCCESS) { goto on_error_3; } pEngine->ownsResourceManager = MA_TRUE; } } #endif /* Setup some stuff for inlined sounds. That is sounds played with ma_engine_play_sound(). */ pEngine->inlinedSoundLock = 0; pEngine->pInlinedSoundHead = NULL; /* Start the engine if required. This should always be the last step. */ #if !defined(MA_NO_DEVICE_IO) { if (engineConfig.noAutoStart == MA_FALSE && pEngine->pDevice != NULL) { result = ma_engine_start(pEngine); if (result != MA_SUCCESS) { goto on_error_4; /* Failed to start the engine. */ } } } #endif return MA_SUCCESS; #if !defined(MA_NO_DEVICE_IO) on_error_4: #endif #if !defined(MA_NO_RESOURCE_MANAGER) on_error_3: if (pEngine->ownsResourceManager) { ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks); } #endif /* MA_NO_RESOURCE_MANAGER */ on_error_2: for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks); } ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks); on_error_1: #if !defined(MA_NO_DEVICE_IO) { if (pEngine->ownsDevice) { ma_device_uninit(pEngine->pDevice); ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); } } #endif return result; } MA_API void ma_engine_uninit(ma_engine* pEngine) { ma_uint32 iListener; if (pEngine == NULL) { return; } /* The device must be uninitialized before the node graph to ensure the audio thread doesn't try accessing it. */ #if !defined(MA_NO_DEVICE_IO) { if (pEngine->ownsDevice) { ma_device_uninit(pEngine->pDevice); ma_free(pEngine->pDevice, &pEngine->allocationCallbacks); } else { if (pEngine->pDevice != NULL) { ma_device_stop(pEngine->pDevice); } } } #endif /* All inlined sounds need to be deleted. I'm going to use a lock here just to future proof in case I want to do some kind of garbage collection later on. */ ma_spinlock_lock(&pEngine->inlinedSoundLock); { for (;;) { ma_sound_inlined* pSoundToDelete = pEngine->pInlinedSoundHead; if (pSoundToDelete == NULL) { break; /* Done. */ } pEngine->pInlinedSoundHead = pSoundToDelete->pNext; ma_sound_uninit(&pSoundToDelete->sound); ma_free(pSoundToDelete, &pEngine->allocationCallbacks); } } ma_spinlock_unlock(&pEngine->inlinedSoundLock); for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks); } /* Make sure the node graph is uninitialized after the audio thread has been shutdown to prevent accessing of the node graph after being uninitialized. */ ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks); /* Uninitialize the resource manager last to ensure we don't have a thread still trying to access it. */ #ifndef MA_NO_RESOURCE_MANAGER if (pEngine->ownsResourceManager) { ma_resource_manager_uninit(pEngine->pResourceManager); ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks); } #endif } MA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead) { ma_result result; ma_uint64 framesRead = 0; if (pFramesRead != NULL) { *pFramesRead = 0; } result = ma_node_graph_read_pcm_frames(&pEngine->nodeGraph, pFramesOut, frameCount, &framesRead); if (result != MA_SUCCESS) { return result; } if (pFramesRead != NULL) { *pFramesRead = framesRead; } if (pEngine->onProcess) { pEngine->onProcess(pEngine->pProcessUserData, (float*)pFramesOut, framesRead); /* Safe cast to float* because the engine always works on floating point samples. */ } return MA_SUCCESS; } MA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } return &pEngine->nodeGraph; } #if !defined(MA_NO_RESOURCE_MANAGER) MA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } #if !defined(MA_NO_RESOURCE_MANAGER) { return pEngine->pResourceManager; } #else { return NULL; } #endif } #endif MA_API ma_device* ma_engine_get_device(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } #if !defined(MA_NO_DEVICE_IO) { return pEngine->pDevice; } #else { return NULL; } #endif } MA_API ma_log* ma_engine_get_log(ma_engine* pEngine) { if (pEngine == NULL) { return NULL; } if (pEngine->pLog != NULL) { return pEngine->pLog; } else { #if !defined(MA_NO_DEVICE_IO) { return ma_device_get_log(ma_engine_get_device(pEngine)); } #else { return NULL; } #endif } } MA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine) { return ma_node_graph_get_endpoint(&pEngine->nodeGraph); } MA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine) { return ma_node_graph_get_time(&pEngine->nodeGraph); } MA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine) { return ma_engine_get_time_in_pcm_frames(pEngine) * 1000 / ma_engine_get_sample_rate(pEngine); } MA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime) { return ma_node_graph_set_time(&pEngine->nodeGraph, globalTime); } MA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime) { return ma_engine_set_time_in_pcm_frames(pEngine, globalTime * ma_engine_get_sample_rate(pEngine) / 1000); } MA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine) { return ma_engine_get_time_in_pcm_frames(pEngine); } MA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime) { return ma_engine_set_time_in_pcm_frames(pEngine, globalTime); } MA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine) { return ma_node_graph_get_channels(&pEngine->nodeGraph); } MA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return pEngine->sampleRate; } MA_API ma_result ma_engine_start(ma_engine* pEngine) { ma_result result; if (pEngine == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { result = ma_device_start(pEngine->pDevice); } else { result = MA_INVALID_OPERATION; /* The engine is running without a device which means there's no real notion of "starting" the engine. */ } } #else { result = MA_INVALID_OPERATION; /* Device IO is disabled, so there's no real notion of "starting" the engine. */ } #endif if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_engine_stop(ma_engine* pEngine) { ma_result result; if (pEngine == NULL) { return MA_INVALID_ARGS; } #if !defined(MA_NO_DEVICE_IO) { if (pEngine->pDevice != NULL) { result = ma_device_stop(pEngine->pDevice); } else { result = MA_INVALID_OPERATION; /* The engine is running without a device which means there's no real notion of "stopping" the engine. */ } } #else { result = MA_INVALID_OPERATION; /* Device IO is disabled, so there's no real notion of "stopping" the engine. */ } #endif if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } MA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume) { if (pEngine == NULL) { return MA_INVALID_ARGS; } return ma_node_set_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0, volume); } MA_API float ma_engine_get_volume(ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return ma_node_get_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0); } MA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB) { return ma_engine_set_volume(pEngine, ma_volume_db_to_linear(gainDB)); } MA_API float ma_engine_get_gain_db(ma_engine* pEngine) { return ma_volume_linear_to_db(ma_engine_get_volume(pEngine)); } MA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine) { if (pEngine == NULL) { return 0; } return pEngine->listenerCount; } MA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ) { ma_uint32 iListener; ma_uint32 iListenerClosest; float closestLen2 = MA_FLT_MAX; if (pEngine == NULL || pEngine->listenerCount == 1) { return 0; } iListenerClosest = 0; for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) { if (ma_engine_listener_is_enabled(pEngine, iListener)) { float len2 = ma_vec3f_len2(ma_vec3f_sub(ma_spatializer_listener_get_position(&pEngine->listeners[iListener]), ma_vec3f_init_3f(absolutePosX, absolutePosY, absolutePosZ))); if (closestLen2 > len2) { closestLen2 = len2; iListenerClosest = iListener; } } } MA_ASSERT(iListenerClosest < 255); return iListenerClosest; } MA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_position(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_listener_get_position(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_direction(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, -1); } return ma_spatializer_listener_get_direction(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_velocity(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_listener_get_velocity(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_cone(&pEngine->listeners[listenerIndex], innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = 0; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = 0; } if (pOuterGain != NULL) { *pOuterGain = 0; } if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_get_cone(&pEngine->listeners[listenerIndex], pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_world_up(&pEngine->listeners[listenerIndex], x, y, z); } MA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return ma_vec3f_init_3f(0, 1, 0); } return ma_spatializer_listener_get_world_up(&pEngine->listeners[listenerIndex]); } MA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return; } ma_spatializer_listener_set_enabled(&pEngine->listeners[listenerIndex], isEnabled); } MA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex) { if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) { return MA_FALSE; } return ma_spatializer_listener_is_enabled(&pEngine->listeners[listenerIndex]); } #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex) { ma_result result = MA_SUCCESS; ma_sound_inlined* pSound = NULL; ma_sound_inlined* pNextSound = NULL; if (pEngine == NULL || pFilePath == NULL) { return MA_INVALID_ARGS; } /* Attach to the endpoint node if nothing is specified. */ if (pNode == NULL) { pNode = ma_node_graph_get_endpoint(&pEngine->nodeGraph); nodeInputBusIndex = 0; } /* We want to check if we can recycle an already-allocated inlined sound. Since this is just a helper I'm not *too* concerned about performance here and I'm happy to use a lock to keep the implementation simple. Maybe this can be optimized later if there's enough demand, but if this function is being used it probably means the caller doesn't really care too much. What we do is check the atEnd flag. When this is true, we can recycle the sound. Otherwise we just keep iterating. If we reach the end without finding a sound to recycle we just allocate a new one. This doesn't scale well for a massive number of sounds being played simultaneously as we don't ever actually free the sound objects. Some kind of garbage collection routine might be valuable for this which I'll think about. */ ma_spinlock_lock(&pEngine->inlinedSoundLock); { ma_uint32 soundFlags = 0; for (pNextSound = pEngine->pInlinedSoundHead; pNextSound != NULL; pNextSound = pNextSound->pNext) { if (ma_sound_at_end(&pNextSound->sound)) { /* The sound is at the end which means it's available for recycling. All we need to do is uninitialize it and reinitialize it. All we're doing is recycling memory. */ pSound = pNextSound; ma_atomic_fetch_sub_32(&pEngine->inlinedSoundCount, 1); break; } } if (pSound != NULL) { /* We actually want to detach the sound from the list here. The reason is because we want the sound to be in a consistent state at the non-recycled case to simplify the logic below. */ if (pEngine->pInlinedSoundHead == pSound) { pEngine->pInlinedSoundHead = pSound->pNext; } if (pSound->pPrev != NULL) { pSound->pPrev->pNext = pSound->pNext; } if (pSound->pNext != NULL) { pSound->pNext->pPrev = pSound->pPrev; } /* Now the previous sound needs to be uninitialized. */ ma_sound_uninit(&pNextSound->sound); } else { /* No sound available for recycling. Allocate one now. */ pSound = (ma_sound_inlined*)ma_malloc(sizeof(*pSound), &pEngine->allocationCallbacks); } if (pSound != NULL) { /* Safety check for the allocation above. */ /* At this point we should have memory allocated for the inlined sound. We just need to initialize it like a normal sound now. */ soundFlags |= MA_SOUND_FLAG_ASYNC; /* For inlined sounds we don't want to be sitting around waiting for stuff to load so force an async load. */ soundFlags |= MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT; /* We want specific control over where the sound is attached in the graph. We'll attach it manually just before playing the sound. */ soundFlags |= MA_SOUND_FLAG_NO_PITCH; /* Pitching isn't usable with inlined sounds, so disable it to save on speed. */ soundFlags |= MA_SOUND_FLAG_NO_SPATIALIZATION; /* Not currently doing spatialization with inlined sounds, but this might actually change later. For now disable spatialization. Will be removed if we ever add support for spatialization here. */ result = ma_sound_init_from_file(pEngine, pFilePath, soundFlags, NULL, NULL, &pSound->sound); if (result == MA_SUCCESS) { /* Now attach the sound to the graph. */ result = ma_node_attach_output_bus(pSound, 0, pNode, nodeInputBusIndex); if (result == MA_SUCCESS) { /* At this point the sound should be loaded and we can go ahead and add it to the list. The new item becomes the new head. */ pSound->pNext = pEngine->pInlinedSoundHead; pSound->pPrev = NULL; pEngine->pInlinedSoundHead = pSound; /* <-- This is what attaches the sound to the list. */ if (pSound->pNext != NULL) { pSound->pNext->pPrev = pSound; } } else { ma_free(pSound, &pEngine->allocationCallbacks); } } else { ma_free(pSound, &pEngine->allocationCallbacks); } } else { result = MA_OUT_OF_MEMORY; } } ma_spinlock_unlock(&pEngine->inlinedSoundLock); if (result != MA_SUCCESS) { return result; } /* Finally we can start playing the sound. */ result = ma_sound_start(&pSound->sound); if (result != MA_SUCCESS) { /* Failed to start the sound. We need to mark it for recycling and return an error. */ ma_atomic_exchange_32(&pSound->sound.atEnd, MA_TRUE); return result; } ma_atomic_fetch_add_32(&pEngine->inlinedSoundCount, 1); return result; } MA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup) { return ma_engine_play_sound_ex(pEngine, pFilePath, pGroup, 0); } #endif static ma_result ma_sound_preinit(ma_engine* pEngine, ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pSound); pSound->seekTarget = MA_SEEK_TARGET_NONE; if (pEngine == NULL) { return MA_INVALID_ARGS; } return MA_SUCCESS; } static ma_result ma_sound_init_from_data_source_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result; ma_engine_node_config engineNodeConfig; ma_engine_node_type type; /* Will be set to ma_engine_node_type_group if no data source is specified. */ /* Do not clear pSound to zero here - that's done at a higher level with ma_sound_preinit(). */ MA_ASSERT(pEngine != NULL); MA_ASSERT(pSound != NULL); if (pConfig == NULL) { return MA_INVALID_ARGS; } pSound->pDataSource = pConfig->pDataSource; if (pConfig->pDataSource != NULL) { type = ma_engine_node_type_sound; } else { type = ma_engine_node_type_group; } /* Sounds are engine nodes. Before we can initialize this we need to determine the channel count. If we can't do this we need to abort. It's up to the caller to ensure they're using a data source that provides this information upfront. */ engineNodeConfig = ma_engine_node_config_init(pEngine, type, pConfig->flags); engineNodeConfig.channelsIn = pConfig->channelsIn; engineNodeConfig.channelsOut = pConfig->channelsOut; engineNodeConfig.volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames; engineNodeConfig.monoExpansionMode = pConfig->monoExpansionMode; if (engineNodeConfig.volumeSmoothTimeInPCMFrames == 0) { engineNodeConfig.volumeSmoothTimeInPCMFrames = pEngine->defaultVolumeSmoothTimeInPCMFrames; } /* If we're loading from a data source the input channel count needs to be the data source's native channel count. */ if (pConfig->pDataSource != NULL) { result = ma_data_source_get_data_format(pConfig->pDataSource, NULL, &engineNodeConfig.channelsIn, &engineNodeConfig.sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; /* Failed to retrieve the channel count. */ } if (engineNodeConfig.channelsIn == 0) { return MA_INVALID_OPERATION; /* Invalid channel count. */ } if (engineNodeConfig.channelsOut == MA_SOUND_SOURCE_CHANNEL_COUNT) { engineNodeConfig.channelsOut = engineNodeConfig.channelsIn; } } /* Getting here means we should have a valid channel count and we can initialize the engine node. */ result = ma_engine_node_init(&engineNodeConfig, &pEngine->allocationCallbacks, &pSound->engineNode); if (result != MA_SUCCESS) { return result; } /* If no attachment is specified, attach the sound straight to the endpoint. */ if (pConfig->pInitialAttachment == NULL) { /* No group. Attach straight to the endpoint by default, unless the caller has requested that it not. */ if ((pConfig->flags & MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT) == 0) { result = ma_node_attach_output_bus(pSound, 0, ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0); } } else { /* An attachment is specified. Attach to it by default. The sound has only a single output bus, and the config will specify which input bus to attach to. */ result = ma_node_attach_output_bus(pSound, 0, pConfig->pInitialAttachment, pConfig->initialAttachmentInputBusIndex); } if (result != MA_SUCCESS) { ma_engine_node_uninit(&pSound->engineNode, &pEngine->allocationCallbacks); return result; } /* Apply initial range and looping state to the data source if applicable. */ if (pConfig->rangeBegInPCMFrames != 0 || pConfig->rangeEndInPCMFrames != ~((ma_uint64)0)) { ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames); } if (pConfig->loopPointBegInPCMFrames != 0 || pConfig->loopPointEndInPCMFrames != ~((ma_uint64)0)) { ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames); } ma_sound_set_looping(pSound, pConfig->isLooping || ((pConfig->flags & MA_SOUND_FLAG_LOOPING) != 0)); return MA_SUCCESS; } #ifndef MA_NO_RESOURCE_MANAGER MA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result = MA_SUCCESS; ma_uint32 flags; ma_sound_config config; ma_resource_manager_pipeline_notifications notifications; /* The engine requires knowledge of the channel count of the underlying data source before it can initialize the sound. Therefore, we need to make the resource manager wait until initialization of the underlying data source to be initialized so we can get access to the channel count. To do this, the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT is forced. Because we're initializing the data source before the sound, there's a chance the notification will get triggered before this function returns. This is OK, so long as the caller is aware of it and can avoid accessing the sound from within the notification. */ flags = pConfig->flags | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT; if (pConfig->isLooping) { flags |= MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING; } pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks); if (pSound->pResourceManagerDataSource == NULL) { return MA_OUT_OF_MEMORY; } /* Removed in 0.12. Set pDoneFence on the notifications. */ notifications = pConfig->initNotifications; if (pConfig->pDoneFence != NULL && notifications.done.pFence == NULL) { notifications.done.pFence = pConfig->pDoneFence; } /* We must wrap everything around the fence if one was specified. This ensures ma_fence_wait() does not return prematurely before the sound has finished initializing. */ if (notifications.done.pFence) { ma_fence_acquire(notifications.done.pFence); } { ma_resource_manager_data_source_config resourceManagerDataSourceConfig = ma_resource_manager_data_source_config_init(); resourceManagerDataSourceConfig.pFilePath = pConfig->pFilePath; resourceManagerDataSourceConfig.pFilePathW = pConfig->pFilePathW; resourceManagerDataSourceConfig.flags = flags; resourceManagerDataSourceConfig.pNotifications = ¬ifications; resourceManagerDataSourceConfig.initialSeekPointInPCMFrames = pConfig->initialSeekPointInPCMFrames; resourceManagerDataSourceConfig.rangeBegInPCMFrames = pConfig->rangeBegInPCMFrames; resourceManagerDataSourceConfig.rangeEndInPCMFrames = pConfig->rangeEndInPCMFrames; resourceManagerDataSourceConfig.loopPointBegInPCMFrames = pConfig->loopPointBegInPCMFrames; resourceManagerDataSourceConfig.loopPointEndInPCMFrames = pConfig->loopPointEndInPCMFrames; resourceManagerDataSourceConfig.isLooping = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_LOOPING) != 0; result = ma_resource_manager_data_source_init_ex(pEngine->pResourceManager, &resourceManagerDataSourceConfig, pSound->pResourceManagerDataSource); if (result != MA_SUCCESS) { goto done; } pSound->ownsDataSource = MA_TRUE; /* <-- Important. Not setting this will result in the resource manager data source never getting uninitialized. */ /* We need to use a slightly customized version of the config so we'll need to make a copy. */ config = *pConfig; config.pFilePath = NULL; config.pFilePathW = NULL; config.pDataSource = pSound->pResourceManagerDataSource; result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound); if (result != MA_SUCCESS) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); MA_ZERO_OBJECT(pSound); goto done; } } done: if (notifications.done.pFence) { ma_fence_release(notifications.done.pFence); } return result; } MA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound) { ma_sound_config config; if (pFilePath == NULL) { return MA_INVALID_ARGS; } config = ma_sound_config_init_2(pEngine); config.pFilePath = pFilePath; config.flags = flags; config.pInitialAttachment = pGroup; config.pDoneFence = pDoneFence; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound) { ma_sound_config config; if (pFilePath == NULL) { return MA_INVALID_ARGS; } config = ma_sound_config_init_2(pEngine); config.pFilePathW = pFilePath; config.flags = flags; config.pInitialAttachment = pGroup; config.pDoneFence = pDoneFence; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound) { ma_result result; ma_sound_config config; result = ma_sound_preinit(pEngine, pSound); if (result != MA_SUCCESS) { return result; } if (pExistingSound == NULL) { return MA_INVALID_ARGS; } /* Cloning only works for data buffers (not streams) that are loaded from the resource manager. */ if (pExistingSound->pResourceManagerDataSource == NULL) { return MA_INVALID_OPERATION; } /* We need to make a clone of the data source. If the data source is not a data buffer (i.e. a stream) this will fail. */ pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks); if (pSound->pResourceManagerDataSource == NULL) { return MA_OUT_OF_MEMORY; } result = ma_resource_manager_data_source_init_copy(pEngine->pResourceManager, pExistingSound->pResourceManagerDataSource, pSound->pResourceManagerDataSource); if (result != MA_SUCCESS) { ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); return result; } config = ma_sound_config_init_2(pEngine); config.pDataSource = pSound->pResourceManagerDataSource; config.flags = flags; config.pInitialAttachment = pGroup; config.monoExpansionMode = pExistingSound->engineNode.monoExpansionMode; config.volumeSmoothTimeInPCMFrames = pExistingSound->engineNode.volumeSmoothTimeInPCMFrames; result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound); if (result != MA_SUCCESS) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks); MA_ZERO_OBJECT(pSound); return result; } /* Make sure the sound is marked as the owner of the data source or else it will never get uninitialized. */ pSound->ownsDataSource = MA_TRUE; return MA_SUCCESS; } #endif MA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound) { ma_sound_config config = ma_sound_config_init_2(pEngine); config.pDataSource = pDataSource; config.flags = flags; config.pInitialAttachment = pGroup; return ma_sound_init_ex(pEngine, &config, pSound); } MA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound) { ma_result result; result = ma_sound_preinit(pEngine, pSound); if (result != MA_SUCCESS) { return result; } if (pConfig == NULL) { return MA_INVALID_ARGS; } pSound->endCallback = pConfig->endCallback; pSound->pEndCallbackUserData = pConfig->pEndCallbackUserData; /* We need to load the sound differently depending on whether or not we're loading from a file. */ #ifndef MA_NO_RESOURCE_MANAGER if (pConfig->pFilePath != NULL || pConfig->pFilePathW != NULL) { return ma_sound_init_from_file_internal(pEngine, pConfig, pSound); } else #endif { /* Getting here means we're not loading from a file. We may be loading from an already-initialized data source, or none at all. If we aren't specifying any data source, we'll be initializing the equivalent to a group. ma_data_source_init_from_data_source_internal() will deal with this for us, so no special treatment required here. */ return ma_sound_init_from_data_source_internal(pEngine, pConfig, pSound); } } MA_API void ma_sound_uninit(ma_sound* pSound) { if (pSound == NULL) { return; } /* Always uninitialize the node first. This ensures it's detached from the graph and does not return until it has done so which makes thread safety beyond this point trivial. */ ma_engine_node_uninit(&pSound->engineNode, &pSound->engineNode.pEngine->allocationCallbacks); /* Once the sound is detached from the group we can guarantee that it won't be referenced by the mixer thread which means it's safe for us to destroy the data source. */ #ifndef MA_NO_RESOURCE_MANAGER if (pSound->ownsDataSource) { ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource); ma_free(pSound->pResourceManagerDataSource, &pSound->engineNode.pEngine->allocationCallbacks); pSound->pDataSource = NULL; } #else MA_ASSERT(pSound->ownsDataSource == MA_FALSE); #endif } MA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound) { if (pSound == NULL) { return NULL; } return pSound->engineNode.pEngine; } MA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound) { if (pSound == NULL) { return NULL; } return pSound->pDataSource; } MA_API ma_result ma_sound_start(ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* If the sound is already playing, do nothing. */ if (ma_sound_is_playing(pSound)) { return MA_SUCCESS; } /* If the sound is at the end it means we want to start from the start again. */ if (ma_sound_at_end(pSound)) { ma_result result = ma_data_source_seek_to_pcm_frame(pSound->pDataSource, 0); if (result != MA_SUCCESS && result != MA_NOT_IMPLEMENTED) { return result; /* Failed to seek back to the start. */ } /* Make sure we clear the end indicator. */ ma_atomic_exchange_32(&pSound->atEnd, MA_FALSE); } /* Make sure the sound is started. If there's a start delay, the sound won't actually start until the start time is reached. */ ma_node_set_state(pSound, ma_node_state_started); return MA_SUCCESS; } MA_API ma_result ma_sound_stop(ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* This will stop the sound immediately. Use ma_sound_set_stop_time() to stop the sound at a specific time. */ ma_node_set_state(pSound, ma_node_state_stopped); return MA_SUCCESS; } MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* Stopping with a fade out requires us to schedule the stop into the future by the fade length. */ ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound)) + fadeLengthInFrames, fadeLengthInFrames); return MA_SUCCESS; } MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInMilliseconds) { ma_uint64 sampleRate; if (pSound == NULL) { return MA_INVALID_ARGS; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); return ma_sound_stop_with_fade_in_pcm_frames(pSound, (fadeLengthInMilliseconds * sampleRate) / 1000); } MA_API void ma_sound_set_volume(ma_sound* pSound, float volume) { if (pSound == NULL) { return; } ma_engine_node_set_volume(&pSound->engineNode, volume); } MA_API float ma_sound_get_volume(const ma_sound* pSound) { float volume = 0; if (pSound == NULL) { return 0; } ma_engine_node_get_volume(&pSound->engineNode, &volume); return volume; } MA_API void ma_sound_set_pan(ma_sound* pSound, float pan) { if (pSound == NULL) { return; } ma_panner_set_pan(&pSound->engineNode.panner, pan); } MA_API float ma_sound_get_pan(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_panner_get_pan(&pSound->engineNode.panner); } MA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode) { if (pSound == NULL) { return; } ma_panner_set_mode(&pSound->engineNode.panner, panMode); } MA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound) { if (pSound == NULL) { return ma_pan_mode_balance; } return ma_panner_get_mode(&pSound->engineNode.panner); } MA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch) { if (pSound == NULL) { return; } if (pitch <= 0) { return; } ma_atomic_exchange_explicit_f32(&pSound->engineNode.pitch, pitch, ma_atomic_memory_order_release); } MA_API float ma_sound_get_pitch(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_atomic_load_f32(&pSound->engineNode.pitch); /* Naughty const-cast for this. */ } MA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled) { if (pSound == NULL) { return; } ma_atomic_exchange_explicit_32(&pSound->engineNode.isSpatializationDisabled, !enabled, ma_atomic_memory_order_release); } MA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } return ma_engine_node_is_spatialization_enabled(&pSound->engineNode); } MA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex) { if (pSound == NULL || listenerIndex >= ma_engine_get_listener_count(ma_sound_get_engine(pSound))) { return; } ma_atomic_exchange_explicit_32(&pSound->engineNode.pinnedListenerIndex, listenerIndex, ma_atomic_memory_order_release); } MA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound) { if (pSound == NULL) { return MA_LISTENER_INDEX_CLOSEST; } return ma_atomic_load_explicit_32(&pSound->engineNode.pinnedListenerIndex, ma_atomic_memory_order_acquire); } MA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound) { ma_uint32 listenerIndex; if (pSound == NULL) { return 0; } listenerIndex = ma_sound_get_pinned_listener_index(pSound); if (listenerIndex == MA_LISTENER_INDEX_CLOSEST) { ma_vec3f position = ma_sound_get_position(pSound); return ma_engine_find_closest_listener(ma_sound_get_engine(pSound), position.x, position.y, position.z); } return listenerIndex; } MA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound) { ma_vec3f relativePos; ma_engine* pEngine; if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, -1); } pEngine = ma_sound_get_engine(pSound); if (pEngine == NULL) { return ma_vec3f_init_3f(0, 0, -1); } ma_spatializer_get_relative_position_and_direction(&pSound->engineNode.spatializer, &pEngine->listeners[ma_sound_get_listener_index(pSound)], &relativePos, NULL); return ma_vec3f_normalize(ma_vec3f_neg(relativePos)); } MA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_position(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_position(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_direction(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_direction(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z) { if (pSound == NULL) { return; } ma_spatializer_set_velocity(&pSound->engineNode.spatializer, x, y, z); } MA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound) { if (pSound == NULL) { return ma_vec3f_init_3f(0, 0, 0); } return ma_spatializer_get_velocity(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel) { if (pSound == NULL) { return; } ma_spatializer_set_attenuation_model(&pSound->engineNode.spatializer, attenuationModel); } MA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound) { if (pSound == NULL) { return ma_attenuation_model_none; } return ma_spatializer_get_attenuation_model(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning) { if (pSound == NULL) { return; } ma_spatializer_set_positioning(&pSound->engineNode.spatializer, positioning); } MA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound) { if (pSound == NULL) { return ma_positioning_absolute; } return ma_spatializer_get_positioning(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff) { if (pSound == NULL) { return; } ma_spatializer_set_rolloff(&pSound->engineNode.spatializer, rolloff); } MA_API float ma_sound_get_rolloff(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_rolloff(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain) { if (pSound == NULL) { return; } ma_spatializer_set_min_gain(&pSound->engineNode.spatializer, minGain); } MA_API float ma_sound_get_min_gain(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_min_gain(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain) { if (pSound == NULL) { return; } ma_spatializer_set_max_gain(&pSound->engineNode.spatializer, maxGain); } MA_API float ma_sound_get_max_gain(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_max_gain(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance) { if (pSound == NULL) { return; } ma_spatializer_set_min_distance(&pSound->engineNode.spatializer, minDistance); } MA_API float ma_sound_get_min_distance(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_min_distance(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance) { if (pSound == NULL) { return; } ma_spatializer_set_max_distance(&pSound->engineNode.spatializer, maxDistance); } MA_API float ma_sound_get_max_distance(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_max_distance(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { if (pSound == NULL) { return; } ma_spatializer_set_cone(&pSound->engineNode.spatializer, innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { if (pInnerAngleInRadians != NULL) { *pInnerAngleInRadians = 0; } if (pOuterAngleInRadians != NULL) { *pOuterAngleInRadians = 0; } if (pOuterGain != NULL) { *pOuterGain = 0; } if (pSound == NULL) { return; } ma_spatializer_get_cone(&pSound->engineNode.spatializer, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor) { if (pSound == NULL) { return; } ma_spatializer_set_doppler_factor(&pSound->engineNode.spatializer, dopplerFactor); } MA_API float ma_sound_get_doppler_factor(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_spatializer_get_doppler_factor(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor) { if (pSound == NULL) { return; } ma_spatializer_set_directional_attenuation_factor(&pSound->engineNode.spatializer, directionalAttenuationFactor); } MA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound) { if (pSound == NULL) { return 1; } return ma_spatializer_get_directional_attenuation_factor(&pSound->engineNode.spatializer); } MA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return; } ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, fadeLengthInFrames, (~(ma_uint64)0)); } MA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_fade_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * pSound->engineNode.fader.config.sampleRate) / 1000); } MA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } /* We don't want to update the fader at this point because we need to use the engine's current time to derive the fader's start offset. The timer is being updated on the audio thread so in order to do this as accurately as possible we'll need to defer this to the audio thread. */ ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeBeg, volumeBeg); ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeEnd, volumeEnd); ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.fadeLengthInFrames, fadeLengthInFrames); ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.absoluteGlobalTimeInFrames, absoluteGlobalTimeInFrames); } MA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_uint32 sampleRate; if (pSound == NULL) { return; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * sampleRate) / 1000, (absoluteGlobalTimeInMilliseconds * sampleRate) / 1000); } MA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound) { if (pSound == NULL) { return MA_INVALID_ARGS; } return ma_fader_get_current_volume(&pSound->engineNode.fader); } MA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } ma_node_set_state_time(pSound, ma_node_state_started, absoluteGlobalTimeInFrames); } MA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_start_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000); } MA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames) { if (pSound == NULL) { return; } ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, absoluteGlobalTimeInFrames, 0); } MA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds) { if (pSound == NULL) { return; } ma_sound_set_stop_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000); } MA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames) { if (pSound == NULL) { return; } if (fadeLengthInFrames > 0) { if (fadeLengthInFrames > stopAbsoluteGlobalTimeInFrames) { fadeLengthInFrames = stopAbsoluteGlobalTimeInFrames; } ma_sound_set_fade_start_in_pcm_frames(pSound, -1, 0, fadeLengthInFrames, stopAbsoluteGlobalTimeInFrames - fadeLengthInFrames); } ma_node_set_state_time(pSound, ma_node_state_stopped, stopAbsoluteGlobalTimeInFrames); } MA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds) { ma_uint32 sampleRate; if (pSound == NULL) { return; } sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, (stopAbsoluteGlobalTimeInMilliseconds * sampleRate) / 1000, (fadeLengthInMilliseconds * sampleRate) / 1000); } MA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } return ma_node_get_state_by_time(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound))) == ma_node_state_started; } MA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound) { if (pSound == NULL) { return 0; } return ma_node_get_time(pSound); } MA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound) { return ma_sound_get_time_in_pcm_frames(pSound) * 1000 / ma_engine_get_sample_rate(ma_sound_get_engine(pSound)); } MA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping) { if (pSound == NULL) { return; } /* Looping is only a valid concept if the sound is backed by a data source. */ if (pSound->pDataSource == NULL) { return; } /* The looping state needs to be applied to the data source in order for any looping to actually happen. */ ma_data_source_set_looping(pSound->pDataSource, isLooping); } MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } /* There is no notion of looping for sounds that are not backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_FALSE; } return ma_data_source_is_looping(pSound->pDataSource); } MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound) { if (pSound == NULL) { return MA_FALSE; } /* There is no notion of an end of a sound if it's not backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_FALSE; } return ma_sound_get_at_end(pSound); } MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* Seeking is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } /* We can't be seeking while reading at the same time. We just set the seek target and get the mixing thread to do the actual seek. */ ma_atomic_exchange_64(&pSound->seekTarget, frameIndex); return MA_SUCCESS; } MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds) { ma_uint64 frameIndex; ma_uint32 sampleRate; ma_result result; if (pSound == NULL) { return MA_INVALID_ARGS; } result = ma_sound_get_data_format(pSound, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* We need PCM frames. We need to convert first */ frameIndex = (ma_uint64)(seekPointInSeconds * sampleRate); return ma_sound_seek_to_pcm_frame(pSound, frameIndex); } MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The data format is retrieved directly from the data source if the sound is backed by one. Otherwise we pull it from the node. */ if (pSound->pDataSource == NULL) { ma_uint32 channels; if (pFormat != NULL) { *pFormat = ma_format_f32; } channels = ma_node_get_input_channels(&pSound->engineNode, 0); if (pChannels != NULL) { *pChannels = channels; } if (pSampleRate != NULL) { *pSampleRate = pSound->engineNode.resampler.config.sampleRateIn; } if (pChannelMap != NULL) { ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channels); } return MA_SUCCESS; } else { return ma_data_source_get_data_format(pSound->pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap); } } MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor) { ma_uint64 seekTarget; if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a cursor is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } seekTarget = ma_atomic_load_64(&pSound->seekTarget); if (seekTarget != MA_SEEK_TARGET_NONE) { *pCursor = seekTarget; return MA_SUCCESS; } else { return ma_data_source_get_cursor_in_pcm_frames(pSound->pDataSource, pCursor); } } MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a sound length is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } return ma_data_source_get_length_in_pcm_frames(pSound->pDataSource, pLength); } MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor) { ma_result result; ma_uint64 cursorInPCMFrames; ma_uint32 sampleRate; if (pCursor != NULL) { *pCursor = 0; } result = ma_sound_get_cursor_in_pcm_frames(pSound, &cursorInPCMFrames); if (result != MA_SUCCESS) { return result; } result = ma_sound_get_data_format(pSound, NULL, NULL, &sampleRate, NULL, 0); if (result != MA_SUCCESS) { return result; } /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */ *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate; return MA_SUCCESS; } MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of a sound length is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } return ma_data_source_get_length_in_seconds(pSound->pDataSource, pLength); } MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData) { if (pSound == NULL) { return MA_INVALID_ARGS; } /* The notion of an end is only valid for sounds that are backed by a data source. */ if (pSound->pDataSource == NULL) { return MA_INVALID_OPERATION; } pSound->endCallback = callback; pSound->pEndCallbackUserData = pUserData; return MA_SUCCESS; } MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup) { ma_sound_group_config config = ma_sound_group_config_init_2(pEngine); config.flags = flags; config.pInitialAttachment = pParentGroup; return ma_sound_group_init_ex(pEngine, &config, pGroup); } MA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup) { ma_sound_config soundConfig; if (pGroup == NULL) { return MA_INVALID_ARGS; } MA_ZERO_OBJECT(pGroup); if (pConfig == NULL) { return MA_INVALID_ARGS; } /* A sound group is just a sound without a data source. */ soundConfig = *pConfig; soundConfig.pFilePath = NULL; soundConfig.pFilePathW = NULL; soundConfig.pDataSource = NULL; /* Groups need to have spatialization disabled by default because I think it'll be pretty rare that programs will want to spatialize groups (but not unheard of). Certainly it feels like disabling this by default feels like the right option. Spatialization can be enabled with a call to ma_sound_group_set_spatialization_enabled(). */ soundConfig.flags |= MA_SOUND_FLAG_NO_SPATIALIZATION; return ma_sound_init_ex(pEngine, &soundConfig, pGroup); } MA_API void ma_sound_group_uninit(ma_sound_group* pGroup) { ma_sound_uninit(pGroup); } MA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup) { return ma_sound_get_engine(pGroup); } MA_API ma_result ma_sound_group_start(ma_sound_group* pGroup) { return ma_sound_start(pGroup); } MA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup) { return ma_sound_stop(pGroup); } MA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume) { ma_sound_set_volume(pGroup, volume); } MA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup) { return ma_sound_get_volume(pGroup); } MA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan) { ma_sound_set_pan(pGroup, pan); } MA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup) { return ma_sound_get_pan(pGroup); } MA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode) { ma_sound_set_pan_mode(pGroup, panMode); } MA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup) { return ma_sound_get_pan_mode(pGroup); } MA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch) { ma_sound_set_pitch(pGroup, pitch); } MA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup) { return ma_sound_get_pitch(pGroup); } MA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled) { ma_sound_set_spatialization_enabled(pGroup, enabled); } MA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup) { return ma_sound_is_spatialization_enabled(pGroup); } MA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex) { ma_sound_set_pinned_listener_index(pGroup, listenerIndex); } MA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup) { return ma_sound_get_pinned_listener_index(pGroup); } MA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup) { return ma_sound_get_listener_index(pGroup); } MA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup) { return ma_sound_get_direction_to_listener(pGroup); } MA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_position(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup) { return ma_sound_get_position(pGroup); } MA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_direction(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup) { return ma_sound_get_direction(pGroup); } MA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z) { ma_sound_set_velocity(pGroup, x, y, z); } MA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup) { return ma_sound_get_velocity(pGroup); } MA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel) { ma_sound_set_attenuation_model(pGroup, attenuationModel); } MA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup) { return ma_sound_get_attenuation_model(pGroup); } MA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning) { ma_sound_set_positioning(pGroup, positioning); } MA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup) { return ma_sound_get_positioning(pGroup); } MA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff) { ma_sound_set_rolloff(pGroup, rolloff); } MA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup) { return ma_sound_get_rolloff(pGroup); } MA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain) { ma_sound_set_min_gain(pGroup, minGain); } MA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup) { return ma_sound_get_min_gain(pGroup); } MA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain) { ma_sound_set_max_gain(pGroup, maxGain); } MA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup) { return ma_sound_get_max_gain(pGroup); } MA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance) { ma_sound_set_min_distance(pGroup, minDistance); } MA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup) { return ma_sound_get_min_distance(pGroup); } MA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance) { ma_sound_set_max_distance(pGroup, maxDistance); } MA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup) { return ma_sound_get_max_distance(pGroup); } MA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain) { ma_sound_set_cone(pGroup, innerAngleInRadians, outerAngleInRadians, outerGain); } MA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain) { ma_sound_get_cone(pGroup, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); } MA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor) { ma_sound_set_doppler_factor(pGroup, dopplerFactor); } MA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup) { return ma_sound_get_doppler_factor(pGroup); } MA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor) { ma_sound_set_directional_attenuation_factor(pGroup, directionalAttenuationFactor); } MA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup) { return ma_sound_get_directional_attenuation_factor(pGroup); } MA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames) { ma_sound_set_fade_in_pcm_frames(pGroup, volumeBeg, volumeEnd, fadeLengthInFrames); } MA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds) { ma_sound_set_fade_in_milliseconds(pGroup, volumeBeg, volumeEnd, fadeLengthInMilliseconds); } MA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup) { return ma_sound_get_current_fade_volume(pGroup); } MA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames) { ma_sound_set_start_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); } MA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_sound_set_start_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); } MA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames) { ma_sound_set_stop_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames); } MA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds) { ma_sound_set_stop_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds); } MA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup) { return ma_sound_is_playing(pGroup); } MA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup) { return ma_sound_get_time_in_pcm_frames(pGroup); } #endif /* MA_NO_ENGINE */ /* END SECTION: miniaudio_engine.c */ /************************************************************************************************************************************************************** *************************************************************************************************************************************************************** Auto Generated ============== All code below is auto-generated from a tool. This mostly consists of decoding backend implementations such as ma_dr_wav, ma_dr_flac, etc. If you find a bug in the code below please report the bug to the respective repository for the relevant project (probably dr_libs). *************************************************************************************************************************************************************** **************************************************************************************************************************************************************/ #if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING)) #if !defined(MA_DR_WAV_IMPLEMENTATION) /* dr_wav_c begin */ #ifndef ma_dr_wav_c #define ma_dr_wav_c #ifdef __MRC__ #pragma options opt off #endif #include #include #include #ifndef MA_DR_WAV_NO_STDIO #include #ifndef MA_DR_WAV_NO_WCHAR #include #endif #endif #ifndef MA_DR_WAV_ASSERT #include #define MA_DR_WAV_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_WAV_MALLOC #define MA_DR_WAV_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_WAV_REALLOC #define MA_DR_WAV_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_WAV_FREE #define MA_DR_WAV_FREE(p) free((p)) #endif #ifndef MA_DR_WAV_COPY_MEMORY #define MA_DR_WAV_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_WAV_ZERO_MEMORY #define MA_DR_WAV_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #ifndef MA_DR_WAV_ZERO_OBJECT #define MA_DR_WAV_ZERO_OBJECT(p) MA_DR_WAV_ZERO_MEMORY((p), sizeof(*p)) #endif #define ma_dr_wav_countof(x) (sizeof(x) / sizeof(x[0])) #define ma_dr_wav_align(x, a) ((((x) + (a) - 1) / (a)) * (a)) #define ma_dr_wav_min(a, b) (((a) < (b)) ? (a) : (b)) #define ma_dr_wav_max(a, b) (((a) > (b)) ? (a) : (b)) #define ma_dr_wav_clamp(x, lo, hi) (ma_dr_wav_max((lo), ma_dr_wav_min((hi), (x)))) #define ma_dr_wav_offset_ptr(p, offset) (((ma_uint8*)(p)) + (offset)) #define MA_DR_WAV_MAX_SIMD_VECTOR_SIZE 32 #define MA_DR_WAV_INT64_MIN ((ma_int64) ((ma_uint64)0x80000000 << 32)) #define MA_DR_WAV_INT64_MAX ((ma_int64)(((ma_uint64)0x7FFFFFFF << 32) | 0xFFFFFFFF)) #if defined(_MSC_VER) && _MSC_VER >= 1400 #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_bswap16) #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #endif #if __has_builtin(__builtin_bswap32) #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #endif #if __has_builtin(__builtin_bswap64) #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #endif #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #endif #endif MA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_WAV_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_WAV_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_WAV_VERSION_REVISION; } } MA_API const char* ma_dr_wav_version_string(void) { return MA_DR_WAV_VERSION_STRING; } #ifndef MA_DR_WAV_MAX_SAMPLE_RATE #define MA_DR_WAV_MAX_SAMPLE_RATE 384000 #endif #ifndef MA_DR_WAV_MAX_CHANNELS #define MA_DR_WAV_MAX_CHANNELS 256 #endif #ifndef MA_DR_WAV_MAX_BITS_PER_SAMPLE #define MA_DR_WAV_MAX_BITS_PER_SAMPLE 64 #endif static const ma_uint8 ma_dr_wavGUID_W64_RIFF[16] = {0x72,0x69,0x66,0x66, 0x2E,0x91, 0xCF,0x11, 0xA5,0xD6, 0x28,0xDB,0x04,0xC1,0x00,0x00}; static const ma_uint8 ma_dr_wavGUID_W64_WAVE[16] = {0x77,0x61,0x76,0x65, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_FMT [16] = {0x66,0x6D,0x74,0x20, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_FACT[16] = {0x66,0x61,0x63,0x74, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static const ma_uint8 ma_dr_wavGUID_W64_DATA[16] = {0x64,0x61,0x74,0x61, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; static MA_INLINE int ma_dr_wav__is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE void ma_dr_wav_bytes_to_guid(const ma_uint8* data, ma_uint8* guid) { int i; for (i = 0; i < 16; ++i) { guid[i] = data[i]; } } static MA_INLINE ma_uint16 ma_dr_wav__bswap16(ma_uint16 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC #if defined(_MSC_VER) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); #endif } static MA_INLINE ma_uint32 ma_dr_wav__bswap32(ma_uint32 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT) ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } static MA_INLINE ma_uint64 ma_dr_wav__bswap64(ma_uint64 n) { #ifdef MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC #if defined(_MSC_VER) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) | ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) | ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) | ((n & ((ma_uint64)0x000000FF << 32)) >> 8) | ((n & ((ma_uint64)0xFF000000 )) << 8) | ((n & ((ma_uint64)0x00FF0000 )) << 24) | ((n & ((ma_uint64)0x0000FF00 )) << 40) | ((n & ((ma_uint64)0x000000FF )) << 56); #endif } static MA_INLINE ma_int16 ma_dr_wav__bswap_s16(ma_int16 n) { return (ma_int16)ma_dr_wav__bswap16((ma_uint16)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s16(ma_int16* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s16(pSamples[iSample]); } } static MA_INLINE void ma_dr_wav__bswap_s24(ma_uint8* p) { ma_uint8 t; t = p[0]; p[0] = p[2]; p[2] = t; } static MA_INLINE void ma_dr_wav__bswap_samples_s24(ma_uint8* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { ma_uint8* pSample = pSamples + (iSample*3); ma_dr_wav__bswap_s24(pSample); } } static MA_INLINE ma_int32 ma_dr_wav__bswap_s32(ma_int32 n) { return (ma_int32)ma_dr_wav__bswap32((ma_uint32)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s32(ma_int32* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s32(pSamples[iSample]); } } static MA_INLINE ma_int64 ma_dr_wav__bswap_s64(ma_int64 n) { return (ma_int64)ma_dr_wav__bswap64((ma_uint64)n); } static MA_INLINE void ma_dr_wav__bswap_samples_s64(ma_int64* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_s64(pSamples[iSample]); } } static MA_INLINE float ma_dr_wav__bswap_f32(float n) { union { ma_uint32 i; float f; } x; x.f = n; x.i = ma_dr_wav__bswap32(x.i); return x.f; } static MA_INLINE void ma_dr_wav__bswap_samples_f32(float* pSamples, ma_uint64 sampleCount) { ma_uint64 iSample; for (iSample = 0; iSample < sampleCount; iSample += 1) { pSamples[iSample] = ma_dr_wav__bswap_f32(pSamples[iSample]); } } static MA_INLINE void ma_dr_wav__bswap_samples(void* pSamples, ma_uint64 sampleCount, ma_uint32 bytesPerSample) { switch (bytesPerSample) { case 1: { } break; case 2: { ma_dr_wav__bswap_samples_s16((ma_int16*)pSamples, sampleCount); } break; case 3: { ma_dr_wav__bswap_samples_s24((ma_uint8*)pSamples, sampleCount); } break; case 4: { ma_dr_wav__bswap_samples_s32((ma_int32*)pSamples, sampleCount); } break; case 8: { ma_dr_wav__bswap_samples_s64((ma_int64*)pSamples, sampleCount); } break; default: { MA_DR_WAV_ASSERT(MA_FALSE); } break; } } MA_PRIVATE MA_INLINE ma_bool32 ma_dr_wav_is_container_be(ma_dr_wav_container container) { if (container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_aiff) { return MA_TRUE; } else { return MA_FALSE; } } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_le(const ma_uint8* data) { return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8); } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_be(const ma_uint8* data) { return ((ma_uint16)data[1] << 0) | ((ma_uint16)data[0] << 8); } MA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_ex(const ma_uint8* data, ma_dr_wav_container container) { if (ma_dr_wav_is_container_be(container)) { return ma_dr_wav_bytes_to_u16_be(data); } else { return ma_dr_wav_bytes_to_u16_le(data); } } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_le(const ma_uint8* data) { return ((ma_uint32)data[0] << 0) | ((ma_uint32)data[1] << 8) | ((ma_uint32)data[2] << 16) | ((ma_uint32)data[3] << 24); } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_be(const ma_uint8* data) { return ((ma_uint32)data[3] << 0) | ((ma_uint32)data[2] << 8) | ((ma_uint32)data[1] << 16) | ((ma_uint32)data[0] << 24); } MA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_ex(const ma_uint8* data, ma_dr_wav_container container) { if (ma_dr_wav_is_container_be(container)) { return ma_dr_wav_bytes_to_u32_be(data); } else { return ma_dr_wav_bytes_to_u32_le(data); } } MA_PRIVATE ma_int64 ma_dr_wav_aiff_extented_to_s64(const ma_uint8* data) { ma_uint32 exponent = ((ma_uint32)data[0] << 8) | data[1]; ma_uint64 hi = ((ma_uint64)data[2] << 24) | ((ma_uint64)data[3] << 16) | ((ma_uint64)data[4] << 8) | ((ma_uint64)data[5] << 0); ma_uint64 lo = ((ma_uint64)data[6] << 24) | ((ma_uint64)data[7] << 16) | ((ma_uint64)data[8] << 8) | ((ma_uint64)data[9] << 0); ma_uint64 significand = (hi << 32) | lo; int sign = exponent >> 15; exponent &= 0x7FFF; if (exponent == 0 && significand == 0) { return 0; } else if (exponent == 0x7FFF) { return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX; } exponent -= 16383; if (exponent > 63) { return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX; } else if (exponent < 1) { return 0; } significand >>= (63 - exponent); if (sign) { return -(ma_int64)significand; } else { return (ma_int64)significand; } } MA_PRIVATE void* ma_dr_wav__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_WAV_MALLOC(sz); } MA_PRIVATE void* ma_dr_wav__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_WAV_REALLOC(p, sz); } MA_PRIVATE void ma_dr_wav__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_WAV_FREE(p); } MA_PRIVATE void* ma_dr_wav__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } MA_PRIVATE void* ma_dr_wav__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_WAV_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } MA_PRIVATE void ma_dr_wav__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } MA_PRIVATE ma_allocation_callbacks ma_dr_wav_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return *pAllocationCallbacks; } else { ma_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_wav__malloc_default; allocationCallbacks.onRealloc = ma_dr_wav__realloc_default; allocationCallbacks.onFree = ma_dr_wav__free_default; return allocationCallbacks; } } static MA_INLINE ma_bool32 ma_dr_wav__is_compressed_format_tag(ma_uint16 formatTag) { return formatTag == MA_DR_WAVE_FORMAT_ADPCM || formatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM; } MA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_riff(ma_uint64 chunkSize) { return (unsigned int)(chunkSize % 2); } MA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_w64(ma_uint64 chunkSize) { return (unsigned int)(chunkSize % 8); } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut); MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut); MA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount); MA_PRIVATE ma_result ma_dr_wav__read_chunk_header(ma_dr_wav_read_proc onRead, void* pUserData, ma_dr_wav_container container, ma_uint64* pRunningBytesReadOut, ma_dr_wav_chunk_header* pHeaderOut) { if (container == ma_dr_wav_container_riff || container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_rf64 || container == ma_dr_wav_container_aiff) { ma_uint8 sizeInBytes[4]; if (onRead(pUserData, pHeaderOut->id.fourcc, 4) != 4) { return MA_AT_END; } if (onRead(pUserData, sizeInBytes, 4) != 4) { return MA_INVALID_FILE; } pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u32_ex(sizeInBytes, container); pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_riff(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 8; } else if (container == ma_dr_wav_container_w64) { ma_uint8 sizeInBytes[8]; if (onRead(pUserData, pHeaderOut->id.guid, 16) != 16) { return MA_AT_END; } if (onRead(pUserData, sizeInBytes, 8) != 8) { return MA_INVALID_FILE; } pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u64(sizeInBytes) - 24; pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_w64(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 24; } else { return MA_INVALID_FILE; } return MA_SUCCESS; } MA_PRIVATE ma_bool32 ma_dr_wav__seek_forward(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData) { ma_uint64 bytesRemainingToSeek = offset; while (bytesRemainingToSeek > 0) { if (bytesRemainingToSeek > 0x7FFFFFFF) { if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } bytesRemainingToSeek -= 0x7FFFFFFF; } else { if (!onSeek(pUserData, (int)bytesRemainingToSeek, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } bytesRemainingToSeek = 0; } } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav__seek_from_start(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData) { if (offset <= 0x7FFFFFFF) { return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_start); } if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_start)) { return MA_FALSE; } offset -= 0x7FFFFFFF; for (;;) { if (offset <= 0x7FFFFFFF) { return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_current); } if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } offset -= 0x7FFFFFFF; } } MA_PRIVATE size_t ma_dr_wav__on_read(ma_dr_wav_read_proc onRead, void* pUserData, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor) { size_t bytesRead; MA_DR_WAV_ASSERT(onRead != NULL); MA_DR_WAV_ASSERT(pCursor != NULL); bytesRead = onRead(pUserData, pBufferOut, bytesToRead); *pCursor += bytesRead; return bytesRead; } #if 0 MA_PRIVATE ma_bool32 ma_dr_wav__on_seek(ma_dr_wav_seek_proc onSeek, void* pUserData, int offset, ma_dr_wav_seek_origin origin, ma_uint64* pCursor) { MA_DR_WAV_ASSERT(onSeek != NULL); MA_DR_WAV_ASSERT(pCursor != NULL); if (!onSeek(pUserData, offset, origin)) { return MA_FALSE; } if (origin == ma_dr_wav_seek_origin_start) { *pCursor = offset; } else { *pCursor += offset; } return MA_TRUE; } #endif #define MA_DR_WAV_SMPL_BYTES 36 #define MA_DR_WAV_SMPL_LOOP_BYTES 24 #define MA_DR_WAV_INST_BYTES 7 #define MA_DR_WAV_ACID_BYTES 24 #define MA_DR_WAV_CUE_BYTES 4 #define MA_DR_WAV_BEXT_BYTES 602 #define MA_DR_WAV_BEXT_DESCRIPTION_BYTES 256 #define MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES 32 #define MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES 32 #define MA_DR_WAV_BEXT_RESERVED_BYTES 180 #define MA_DR_WAV_BEXT_UMID_BYTES 64 #define MA_DR_WAV_CUE_POINT_BYTES 24 #define MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES 4 #define MA_DR_WAV_LIST_LABELLED_TEXT_BYTES 20 #define MA_DR_WAV_METADATA_ALIGNMENT 8 typedef enum { ma_dr_wav__metadata_parser_stage_count, ma_dr_wav__metadata_parser_stage_read } ma_dr_wav__metadata_parser_stage; typedef struct { ma_dr_wav_read_proc onRead; ma_dr_wav_seek_proc onSeek; void *pReadSeekUserData; ma_dr_wav__metadata_parser_stage stage; ma_dr_wav_metadata *pMetadata; ma_uint32 metadataCount; ma_uint8 *pData; ma_uint8 *pDataCursor; ma_uint64 metadataCursor; ma_uint64 extraCapacity; } ma_dr_wav__metadata_parser; MA_PRIVATE size_t ma_dr_wav__metadata_memory_capacity(ma_dr_wav__metadata_parser* pParser) { ma_uint64 cap = sizeof(ma_dr_wav_metadata) * (ma_uint64)pParser->metadataCount + pParser->extraCapacity; if (cap > MA_SIZE_MAX) { return 0; } return (size_t)cap; } MA_PRIVATE ma_uint8* ma_dr_wav__metadata_get_memory(ma_dr_wav__metadata_parser* pParser, size_t size, size_t align) { ma_uint8* pResult; if (align) { ma_uintptr modulo = (ma_uintptr)pParser->pDataCursor % align; if (modulo != 0) { pParser->pDataCursor += align - modulo; } } pResult = pParser->pDataCursor; MA_DR_WAV_ASSERT((pResult + size) <= (pParser->pData + ma_dr_wav__metadata_memory_capacity(pParser))); pParser->pDataCursor += size; return pResult; } MA_PRIVATE void ma_dr_wav__metadata_request_extra_memory_for_stage_2(ma_dr_wav__metadata_parser* pParser, size_t bytes, size_t align) { size_t extra = bytes + (align ? (align - 1) : 0); pParser->extraCapacity += extra; } MA_PRIVATE ma_result ma_dr_wav__metadata_alloc(ma_dr_wav__metadata_parser* pParser, ma_allocation_callbacks* pAllocationCallbacks) { if (pParser->extraCapacity != 0 || pParser->metadataCount != 0) { pAllocationCallbacks->onFree(pParser->pData, pAllocationCallbacks->pUserData); pParser->pData = (ma_uint8*)pAllocationCallbacks->onMalloc(ma_dr_wav__metadata_memory_capacity(pParser), pAllocationCallbacks->pUserData); pParser->pDataCursor = pParser->pData; if (pParser->pData == NULL) { return MA_OUT_OF_MEMORY; } pParser->pMetadata = (ma_dr_wav_metadata*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_metadata) * pParser->metadataCount, 1); pParser->metadataCursor = 0; } return MA_SUCCESS; } MA_PRIVATE size_t ma_dr_wav__metadata_parser_read(ma_dr_wav__metadata_parser* pParser, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor) { if (pCursor != NULL) { return ma_dr_wav__on_read(pParser->onRead, pParser->pReadSeekUserData, pBufferOut, bytesToRead, pCursor); } else { return pParser->onRead(pParser->pReadSeekUserData, pBufferOut, bytesToRead); } } MA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata) { ma_uint8 smplHeaderData[MA_DR_WAV_SMPL_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead; if (pMetadata == NULL) { return 0; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplHeaderData, sizeof(smplHeaderData), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); MA_DR_WAV_ASSERT(pChunkHeader != NULL); if (pMetadata != NULL && bytesJustRead == sizeof(smplHeaderData)) { ma_uint32 iSampleLoop; pMetadata->type = ma_dr_wav_metadata_type_smpl; pMetadata->data.smpl.manufacturerId = ma_dr_wav_bytes_to_u32(smplHeaderData + 0); pMetadata->data.smpl.productId = ma_dr_wav_bytes_to_u32(smplHeaderData + 4); pMetadata->data.smpl.samplePeriodNanoseconds = ma_dr_wav_bytes_to_u32(smplHeaderData + 8); pMetadata->data.smpl.midiUnityNote = ma_dr_wav_bytes_to_u32(smplHeaderData + 12); pMetadata->data.smpl.midiPitchFraction = ma_dr_wav_bytes_to_u32(smplHeaderData + 16); pMetadata->data.smpl.smpteFormat = ma_dr_wav_bytes_to_u32(smplHeaderData + 20); pMetadata->data.smpl.smpteOffset = ma_dr_wav_bytes_to_u32(smplHeaderData + 24); pMetadata->data.smpl.sampleLoopCount = ma_dr_wav_bytes_to_u32(smplHeaderData + 28); pMetadata->data.smpl.samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(smplHeaderData + 32); if (pMetadata->data.smpl.sampleLoopCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES) { pMetadata->data.smpl.pLoops = (ma_dr_wav_smpl_loop*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_smpl_loop) * pMetadata->data.smpl.sampleLoopCount, MA_DR_WAV_METADATA_ALIGNMENT); for (iSampleLoop = 0; iSampleLoop < pMetadata->data.smpl.sampleLoopCount; ++iSampleLoop) { ma_uint8 smplLoopData[MA_DR_WAV_SMPL_LOOP_BYTES]; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplLoopData, sizeof(smplLoopData), &totalBytesRead); if (bytesJustRead == sizeof(smplLoopData)) { pMetadata->data.smpl.pLoops[iSampleLoop].cuePointId = ma_dr_wav_bytes_to_u32(smplLoopData + 0); pMetadata->data.smpl.pLoops[iSampleLoop].type = ma_dr_wav_bytes_to_u32(smplLoopData + 4); pMetadata->data.smpl.pLoops[iSampleLoop].firstSampleByteOffset = ma_dr_wav_bytes_to_u32(smplLoopData + 8); pMetadata->data.smpl.pLoops[iSampleLoop].lastSampleByteOffset = ma_dr_wav_bytes_to_u32(smplLoopData + 12); pMetadata->data.smpl.pLoops[iSampleLoop].sampleFraction = ma_dr_wav_bytes_to_u32(smplLoopData + 16); pMetadata->data.smpl.pLoops[iSampleLoop].playCount = ma_dr_wav_bytes_to_u32(smplLoopData + 20); } else { break; } } if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) { pMetadata->data.smpl.pSamplerSpecificData = ma_dr_wav__metadata_get_memory(pParser, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, 1); MA_DR_WAV_ASSERT(pMetadata->data.smpl.pSamplerSpecificData != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, &totalBytesRead); } } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_cue_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata) { ma_uint8 cueHeaderSectionData[MA_DR_WAV_CUE_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead; if (pMetadata == NULL) { return 0; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueHeaderSectionData, sizeof(cueHeaderSectionData), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(cueHeaderSectionData)) { pMetadata->type = ma_dr_wav_metadata_type_cue; pMetadata->data.cue.cuePointCount = ma_dr_wav_bytes_to_u32(cueHeaderSectionData); if (pMetadata->data.cue.cuePointCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES) { pMetadata->data.cue.pCuePoints = (ma_dr_wav_cue_point*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_cue_point) * pMetadata->data.cue.cuePointCount, MA_DR_WAV_METADATA_ALIGNMENT); MA_DR_WAV_ASSERT(pMetadata->data.cue.pCuePoints != NULL); if (pMetadata->data.cue.cuePointCount > 0) { ma_uint32 iCuePoint; for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) { ma_uint8 cuePointData[MA_DR_WAV_CUE_POINT_BYTES]; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cuePointData, sizeof(cuePointData), &totalBytesRead); if (bytesJustRead == sizeof(cuePointData)) { pMetadata->data.cue.pCuePoints[iCuePoint].id = ma_dr_wav_bytes_to_u32(cuePointData + 0); pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition = ma_dr_wav_bytes_to_u32(cuePointData + 4); pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[0] = cuePointData[8]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[1] = cuePointData[9]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[2] = cuePointData[10]; pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[3] = cuePointData[11]; pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart = ma_dr_wav_bytes_to_u32(cuePointData + 12); pMetadata->data.cue.pCuePoints[iCuePoint].blockStart = ma_dr_wav_bytes_to_u32(cuePointData + 16); pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset = ma_dr_wav_bytes_to_u32(cuePointData + 20); } else { break; } } } } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_inst_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata) { ma_uint8 instData[MA_DR_WAV_INST_BYTES]; ma_uint64 bytesRead; if (pMetadata == NULL) { return 0; } bytesRead = ma_dr_wav__metadata_parser_read(pParser, instData, sizeof(instData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(instData)) { pMetadata->type = ma_dr_wav_metadata_type_inst; pMetadata->data.inst.midiUnityNote = (ma_int8)instData[0]; pMetadata->data.inst.fineTuneCents = (ma_int8)instData[1]; pMetadata->data.inst.gainDecibels = (ma_int8)instData[2]; pMetadata->data.inst.lowNote = (ma_int8)instData[3]; pMetadata->data.inst.highNote = (ma_int8)instData[4]; pMetadata->data.inst.lowVelocity = (ma_int8)instData[5]; pMetadata->data.inst.highVelocity = (ma_int8)instData[6]; } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_acid_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata) { ma_uint8 acidData[MA_DR_WAV_ACID_BYTES]; ma_uint64 bytesRead; if (pMetadata == NULL) { return 0; } bytesRead = ma_dr_wav__metadata_parser_read(pParser, acidData, sizeof(acidData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(acidData)) { pMetadata->type = ma_dr_wav_metadata_type_acid; pMetadata->data.acid.flags = ma_dr_wav_bytes_to_u32(acidData + 0); pMetadata->data.acid.midiUnityNote = ma_dr_wav_bytes_to_u16(acidData + 4); pMetadata->data.acid.reserved1 = ma_dr_wav_bytes_to_u16(acidData + 6); pMetadata->data.acid.reserved2 = ma_dr_wav_bytes_to_f32(acidData + 8); pMetadata->data.acid.numBeats = ma_dr_wav_bytes_to_u32(acidData + 12); pMetadata->data.acid.meterDenominator = ma_dr_wav_bytes_to_u16(acidData + 16); pMetadata->data.acid.meterNumerator = ma_dr_wav_bytes_to_u16(acidData + 18); pMetadata->data.acid.tempo = ma_dr_wav_bytes_to_f32(acidData + 20); } return bytesRead; } MA_PRIVATE size_t ma_dr_wav__strlen(const char* str) { size_t result = 0; while (*str++) { result += 1; } return result; } MA_PRIVATE size_t ma_dr_wav__strlen_clamped(const char* str, size_t maxToRead) { size_t result = 0; while (*str++ && result < maxToRead) { result += 1; } return result; } MA_PRIVATE char* ma_dr_wav__metadata_copy_string(ma_dr_wav__metadata_parser* pParser, const char* str, size_t maxToRead) { size_t len = ma_dr_wav__strlen_clamped(str, maxToRead); if (len) { char* result = (char*)ma_dr_wav__metadata_get_memory(pParser, len + 1, 1); MA_DR_WAV_ASSERT(result != NULL); MA_DR_WAV_COPY_MEMORY(result, str, len); result[len] = '\0'; return result; } else { return NULL; } } typedef struct { const void* pBuffer; size_t sizeInBytes; size_t cursor; } ma_dr_wav_buffer_reader; MA_PRIVATE ma_result ma_dr_wav_buffer_reader_init(const void* pBuffer, size_t sizeInBytes, ma_dr_wav_buffer_reader* pReader) { MA_DR_WAV_ASSERT(pBuffer != NULL); MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ZERO_OBJECT(pReader); pReader->pBuffer = pBuffer; pReader->sizeInBytes = sizeInBytes; pReader->cursor = 0; return MA_SUCCESS; } MA_PRIVATE const void* ma_dr_wav_buffer_reader_ptr(const ma_dr_wav_buffer_reader* pReader) { MA_DR_WAV_ASSERT(pReader != NULL); return ma_dr_wav_offset_ptr(pReader->pBuffer, pReader->cursor); } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_seek(ma_dr_wav_buffer_reader* pReader, size_t bytesToSeek) { MA_DR_WAV_ASSERT(pReader != NULL); if (pReader->cursor + bytesToSeek > pReader->sizeInBytes) { return MA_BAD_SEEK; } pReader->cursor += bytesToSeek; return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read(ma_dr_wav_buffer_reader* pReader, void* pDst, size_t bytesToRead, size_t* pBytesRead) { ma_result result = MA_SUCCESS; size_t bytesRemaining; MA_DR_WAV_ASSERT(pReader != NULL); if (pBytesRead != NULL) { *pBytesRead = 0; } bytesRemaining = (pReader->sizeInBytes - pReader->cursor); if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (pDst == NULL) { result = ma_dr_wav_buffer_reader_seek(pReader, bytesToRead); } else { MA_DR_WAV_COPY_MEMORY(pDst, ma_dr_wav_buffer_reader_ptr(pReader), bytesToRead); pReader->cursor += bytesToRead; } MA_DR_WAV_ASSERT(pReader->cursor <= pReader->sizeInBytes); if (result == MA_SUCCESS) { if (pBytesRead != NULL) { *pBytesRead = bytesToRead; } } return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u16(ma_dr_wav_buffer_reader* pReader, ma_uint16* pDst) { ma_result result; size_t bytesRead; ma_uint8 data[2]; MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ASSERT(pDst != NULL); *pDst = 0; result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead); if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) { return result; } *pDst = ma_dr_wav_bytes_to_u16(data); return MA_SUCCESS; } MA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u32(ma_dr_wav_buffer_reader* pReader, ma_uint32* pDst) { ma_result result; size_t bytesRead; ma_uint8 data[4]; MA_DR_WAV_ASSERT(pReader != NULL); MA_DR_WAV_ASSERT(pDst != NULL); *pDst = 0; result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead); if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) { return result; } *pDst = ma_dr_wav_bytes_to_u32(data); return MA_SUCCESS; } MA_PRIVATE ma_uint64 ma_dr_wav__read_bext_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize) { ma_uint8 bextData[MA_DR_WAV_BEXT_BYTES]; size_t bytesRead = ma_dr_wav__metadata_parser_read(pParser, bextData, sizeof(bextData), NULL); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesRead == sizeof(bextData)) { ma_dr_wav_buffer_reader reader; ma_uint32 timeReferenceLow; ma_uint32 timeReferenceHigh; size_t extraBytes; pMetadata->type = ma_dr_wav_metadata_type_bext; if (ma_dr_wav_buffer_reader_init(bextData, bytesRead, &reader) == MA_SUCCESS) { pMetadata->data.bext.pDescription = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_DESCRIPTION_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_DESCRIPTION_BYTES); pMetadata->data.bext.pOriginatorName = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); pMetadata->data.bext.pOriginatorReference = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate), NULL); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime), NULL); ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceLow); ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceHigh); pMetadata->data.bext.timeReference = ((ma_uint64)timeReferenceHigh << 32) + timeReferenceLow; ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.version); pMetadata->data.bext.pUMID = ma_dr_wav__metadata_get_memory(pParser, MA_DR_WAV_BEXT_UMID_BYTES, 1); ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES, NULL); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessValue); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessRange); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxTruePeakLevel); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxMomentaryLoudness); ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxShortTermLoudness); MA_DR_WAV_ASSERT((ma_dr_wav_offset_ptr(ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_RESERVED_BYTES)) == (bextData + MA_DR_WAV_BEXT_BYTES)); extraBytes = (size_t)(chunkSize - MA_DR_WAV_BEXT_BYTES); if (extraBytes > 0) { pMetadata->data.bext.pCodingHistory = (char*)ma_dr_wav__metadata_get_memory(pParser, extraBytes + 1, 1); MA_DR_WAV_ASSERT(pMetadata->data.bext.pCodingHistory != NULL); bytesRead += ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.bext.pCodingHistory, extraBytes, NULL); pMetadata->data.bext.codingHistorySize = (ma_uint32)ma_dr_wav__strlen(pMetadata->data.bext.pCodingHistory); } else { pMetadata->data.bext.pCodingHistory = NULL; pMetadata->data.bext.codingHistorySize = 0; } } } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_list_label_or_note_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize, ma_dr_wav_metadata_type type) { ma_uint8 cueIDBuffer[MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueIDBuffer, sizeof(cueIDBuffer), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(cueIDBuffer)) { ma_uint32 sizeIncludingNullTerminator; pMetadata->type = type; pMetadata->data.labelOrNote.cuePointId = ma_dr_wav_bytes_to_u32(cueIDBuffer); sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (sizeIncludingNullTerminator > 0) { pMetadata->data.labelOrNote.stringLength = sizeIncludingNullTerminator - 1; pMetadata->data.labelOrNote.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelOrNote.pString, sizeIncludingNullTerminator, &totalBytesRead); } else { pMetadata->data.labelOrNote.stringLength = 0; pMetadata->data.labelOrNote.pString = NULL; } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize) { ma_uint8 buffer[MA_DR_WAV_LIST_LABELLED_TEXT_BYTES]; ma_uint64 totalBytesRead = 0; size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &totalBytesRead); MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read); if (bytesJustRead == sizeof(buffer)) { ma_uint32 sizeIncludingNullTerminator; pMetadata->type = ma_dr_wav_metadata_type_list_labelled_cue_region; pMetadata->data.labelledCueRegion.cuePointId = ma_dr_wav_bytes_to_u32(buffer + 0); pMetadata->data.labelledCueRegion.sampleLength = ma_dr_wav_bytes_to_u32(buffer + 4); pMetadata->data.labelledCueRegion.purposeId[0] = buffer[8]; pMetadata->data.labelledCueRegion.purposeId[1] = buffer[9]; pMetadata->data.labelledCueRegion.purposeId[2] = buffer[10]; pMetadata->data.labelledCueRegion.purposeId[3] = buffer[11]; pMetadata->data.labelledCueRegion.country = ma_dr_wav_bytes_to_u16(buffer + 12); pMetadata->data.labelledCueRegion.language = ma_dr_wav_bytes_to_u16(buffer + 14); pMetadata->data.labelledCueRegion.dialect = ma_dr_wav_bytes_to_u16(buffer + 16); pMetadata->data.labelledCueRegion.codePage = ma_dr_wav_bytes_to_u16(buffer + 18); sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (sizeIncludingNullTerminator > 0) { pMetadata->data.labelledCueRegion.stringLength = sizeIncludingNullTerminator - 1; pMetadata->data.labelledCueRegion.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL); ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelledCueRegion.pString, sizeIncludingNullTerminator, &totalBytesRead); } else { pMetadata->data.labelledCueRegion.stringLength = 0; pMetadata->data.labelledCueRegion.pString = NULL; } } return totalBytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_info_text_chunk(ma_dr_wav__metadata_parser* pParser, ma_uint64 chunkSize, ma_dr_wav_metadata_type type) { ma_uint64 bytesRead = 0; ma_uint32 stringSizeWithNullTerminator = (ma_uint32)chunkSize; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, stringSizeWithNullTerminator, 1); } else { ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor]; pMetadata->type = type; if (stringSizeWithNullTerminator > 0) { pMetadata->data.infoText.stringLength = stringSizeWithNullTerminator - 1; pMetadata->data.infoText.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, stringSizeWithNullTerminator, 1); MA_DR_WAV_ASSERT(pMetadata->data.infoText.pString != NULL); bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.infoText.pString, (size_t)stringSizeWithNullTerminator, NULL); if (bytesRead == chunkSize) { pParser->metadataCursor += 1; } else { } } else { pMetadata->data.infoText.stringLength = 0; pMetadata->data.infoText.pString = NULL; pParser->metadataCursor += 1; } } return bytesRead; } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_unknown_chunk(ma_dr_wav__metadata_parser* pParser, const ma_uint8* pChunkId, ma_uint64 chunkSize, ma_dr_wav_metadata_location location) { ma_uint64 bytesRead = 0; if (location == ma_dr_wav_metadata_location_invalid) { return 0; } if (ma_dr_wav_fourcc_equal(pChunkId, "data") || ma_dr_wav_fourcc_equal(pChunkId, "fmt ") || ma_dr_wav_fourcc_equal(pChunkId, "fact")) { return 0; } if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)chunkSize, 1); } else { ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor]; pMetadata->type = ma_dr_wav_metadata_type_unknown; pMetadata->data.unknown.chunkLocation = location; pMetadata->data.unknown.id[0] = pChunkId[0]; pMetadata->data.unknown.id[1] = pChunkId[1]; pMetadata->data.unknown.id[2] = pChunkId[2]; pMetadata->data.unknown.id[3] = pChunkId[3]; pMetadata->data.unknown.dataSizeInBytes = (ma_uint32)chunkSize; pMetadata->data.unknown.pData = (ma_uint8 *)ma_dr_wav__metadata_get_memory(pParser, (size_t)chunkSize, 1); MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL); bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes, NULL); if (bytesRead == pMetadata->data.unknown.dataSizeInBytes) { pParser->metadataCursor += 1; } else { } } return bytesRead; } MA_PRIVATE ma_bool32 ma_dr_wav__chunk_matches(ma_dr_wav_metadata_type allowedMetadataTypes, const ma_uint8* pChunkID, ma_dr_wav_metadata_type type, const char* pID) { return (allowedMetadataTypes & type) && ma_dr_wav_fourcc_equal(pChunkID, pID); } MA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_chunk(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata_type allowedMetadataTypes) { const ma_uint8 *pChunkID = pChunkHeader->id.fourcc; ma_uint64 bytesRead = 0; if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_smpl, "smpl")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_SMPL_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { ma_uint8 buffer[4]; size_t bytesJustRead; if (!pParser->onSeek(pParser->pReadSeekUserData, 28, ma_dr_wav_seek_origin_current)) { return bytesRead; } bytesRead += 28; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead); if (bytesJustRead == sizeof(buffer)) { ma_uint32 loopCount = ma_dr_wav_bytes_to_u32(buffer); ma_uint64 calculatedLoopCount; calculatedLoopCount = (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES; if (calculatedLoopCount == loopCount) { bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead); if (bytesJustRead == sizeof(buffer)) { ma_uint32 samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(buffer); pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_smpl_loop) * loopCount, MA_DR_WAV_METADATA_ALIGNMENT); ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, samplerSpecificDataSizeInBytes, 1); } } else { } } } else { bytesRead = ma_dr_wav__read_smpl_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_inst, "inst")) { if (pChunkHeader->sizeInBytes == MA_DR_WAV_INST_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_inst_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_acid, "acid")) { if (pChunkHeader->sizeInBytes == MA_DR_WAV_ACID_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_acid_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_cue, "cue ")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_CUE_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { size_t cueCount; pParser->metadataCount += 1; cueCount = (size_t)(pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_cue_point) * cueCount, MA_DR_WAV_METADATA_ALIGNMENT); } else { bytesRead = ma_dr_wav__read_cue_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_bext, "bext")) { if (pChunkHeader->sizeInBytes >= MA_DR_WAV_BEXT_BYTES) { if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { char buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES + 1]; size_t allocSizeNeeded = MA_DR_WAV_BEXT_UMID_BYTES; size_t bytesJustRead; buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_DESCRIPTION_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_DESCRIPTION_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; buffer[MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; buffer[MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES] = '\0'; bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES, &bytesRead); if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES) { return bytesRead; } allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1; allocSizeNeeded += (size_t)pChunkHeader->sizeInBytes - MA_DR_WAV_BEXT_BYTES; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, allocSizeNeeded, 1); pParser->metadataCount += 1; } else { bytesRead = ma_dr_wav__read_bext_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], pChunkHeader->sizeInBytes); if (bytesRead == pChunkHeader->sizeInBytes) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav_fourcc_equal(pChunkID, "LIST") || ma_dr_wav_fourcc_equal(pChunkID, "list")) { ma_dr_wav_metadata_location listType = ma_dr_wav_metadata_location_invalid; while (bytesRead < pChunkHeader->sizeInBytes) { ma_uint8 subchunkId[4]; ma_uint8 subchunkSizeBuffer[4]; ma_uint64 subchunkDataSize; ma_uint64 subchunkBytesRead = 0; ma_uint64 bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkId, sizeof(subchunkId), &bytesRead); if (bytesJustRead != sizeof(subchunkId)) { break; } if (ma_dr_wav_fourcc_equal(subchunkId, "adtl")) { listType = ma_dr_wav_metadata_location_inside_adtl_list; continue; } else if (ma_dr_wav_fourcc_equal(subchunkId, "INFO")) { listType = ma_dr_wav_metadata_location_inside_info_list; continue; } bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkSizeBuffer, sizeof(subchunkSizeBuffer), &bytesRead); if (bytesJustRead != sizeof(subchunkSizeBuffer)) { break; } subchunkDataSize = ma_dr_wav_bytes_to_u32(subchunkSizeBuffer); if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_label, "labl") || ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_note, "note")) { if (subchunkDataSize >= MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES) { ma_uint64 stringSizeWithNullTerm = subchunkDataSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerm, 1); } else { subchunkBytesRead = ma_dr_wav__read_list_label_or_note_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize, ma_dr_wav_fourcc_equal(subchunkId, "labl") ? ma_dr_wav_metadata_type_list_label : ma_dr_wav_metadata_type_list_note); if (subchunkBytesRead == subchunkDataSize) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_labelled_cue_region, "ltxt")) { if (subchunkDataSize >= MA_DR_WAV_LIST_LABELLED_TEXT_BYTES) { ma_uint64 stringSizeWithNullTerminator = subchunkDataSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) { pParser->metadataCount += 1; ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerminator, 1); } else { subchunkBytesRead = ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize); if (subchunkBytesRead == subchunkDataSize) { pParser->metadataCursor += 1; } else { } } } else { } } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_software, "ISFT")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_software); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_copyright, "ICOP")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_copyright); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_title, "INAM")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_title); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_artist, "IART")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_artist); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_comment, "ICMT")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_comment); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_date, "ICRD")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_date); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_genre, "IGNR")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_genre); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_album, "IPRD")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_album); } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_tracknumber, "ITRK")) { subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize, ma_dr_wav_metadata_type_list_info_tracknumber); } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) { subchunkBytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, subchunkId, subchunkDataSize, listType); } bytesRead += subchunkBytesRead; MA_DR_WAV_ASSERT(subchunkBytesRead <= subchunkDataSize); if (subchunkBytesRead < subchunkDataSize) { ma_uint64 bytesToSeek = subchunkDataSize - subchunkBytesRead; if (!pParser->onSeek(pParser->pReadSeekUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current)) { break; } bytesRead += bytesToSeek; } if ((subchunkDataSize % 2) == 1) { if (!pParser->onSeek(pParser->pReadSeekUserData, 1, ma_dr_wav_seek_origin_current)) { break; } bytesRead += 1; } } } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) { bytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, pChunkID, pChunkHeader->sizeInBytes, ma_dr_wav_metadata_location_top_level); } return bytesRead; } MA_PRIVATE ma_uint32 ma_dr_wav_get_bytes_per_pcm_frame(ma_dr_wav* pWav) { ma_uint32 bytesPerFrame; if ((pWav->bitsPerSample & 0x7) == 0) { bytesPerFrame = (pWav->bitsPerSample * pWav->fmt.channels) >> 3; } else { bytesPerFrame = pWav->fmt.blockAlign; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { if (bytesPerFrame != pWav->fmt.channels) { return 0; } } return bytesPerFrame; } MA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT) { if (pFMT == NULL) { return 0; } if (pFMT->formatTag != MA_DR_WAVE_FORMAT_EXTENSIBLE) { return pFMT->formatTag; } else { return ma_dr_wav_bytes_to_u16(pFMT->subFormat); } } MA_PRIVATE ma_bool32 ma_dr_wav_preinit(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onRead == NULL || onSeek == NULL) { return MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav)); pWav->onRead = onRead; pWav->onSeek = onSeek; pWav->pUserData = pReadSeekUserData; pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init__internal(ma_dr_wav* pWav, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags) { ma_result result; ma_uint64 cursor; ma_bool32 sequential; ma_uint8 riff[4]; ma_dr_wav_fmt fmt; unsigned short translatedFormatTag; ma_uint64 dataChunkSize = 0; ma_uint64 sampleCountFromFactChunk = 0; ma_uint64 metadataStartPos; ma_dr_wav__metadata_parser metadataParser; ma_bool8 isProcessingMetadata = MA_FALSE; ma_bool8 foundChunk_fmt = MA_FALSE; ma_bool8 foundChunk_data = MA_FALSE; ma_bool8 isAIFCFormType = MA_FALSE; ma_uint64 aiffFrameCount = 0; cursor = 0; sequential = (flags & MA_DR_WAV_SEQUENTIAL) != 0; MA_DR_WAV_ZERO_OBJECT(&fmt); if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff, sizeof(riff), &cursor) != sizeof(riff)) { return MA_FALSE; } if (ma_dr_wav_fourcc_equal(riff, "RIFF")) { pWav->container = ma_dr_wav_container_riff; } else if (ma_dr_wav_fourcc_equal(riff, "RIFX")) { pWav->container = ma_dr_wav_container_rifx; } else if (ma_dr_wav_fourcc_equal(riff, "riff")) { int i; ma_uint8 riff2[12]; pWav->container = ma_dr_wav_container_w64; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff2, sizeof(riff2), &cursor) != sizeof(riff2)) { return MA_FALSE; } for (i = 0; i < 12; ++i) { if (riff2[i] != ma_dr_wavGUID_W64_RIFF[i+4]) { return MA_FALSE; } } } else if (ma_dr_wav_fourcc_equal(riff, "RF64")) { pWav->container = ma_dr_wav_container_rf64; } else if (ma_dr_wav_fourcc_equal(riff, "FORM")) { pWav->container = ma_dr_wav_container_aiff; } else { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) { ma_uint8 chunkSizeBytes[4]; ma_uint8 wave[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) { if (ma_dr_wav_bytes_to_u32_ex(chunkSizeBytes, pWav->container) < 36) { } } else if (pWav->container == ma_dr_wav_container_rf64) { if (ma_dr_wav_bytes_to_u32_le(chunkSizeBytes) != 0xFFFFFFFF) { return MA_FALSE; } } else { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) { return MA_FALSE; } if (!ma_dr_wav_fourcc_equal(wave, "WAVE")) { return MA_FALSE; } } else if (pWav->container == ma_dr_wav_container_w64) { ma_uint8 chunkSizeBytes[8]; ma_uint8 wave[16]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (ma_dr_wav_bytes_to_u64(chunkSizeBytes) < 80) { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) { return MA_FALSE; } if (!ma_dr_wav_guid_equal(wave, ma_dr_wavGUID_W64_WAVE)) { return MA_FALSE; } } else if (pWav->container == ma_dr_wav_container_aiff) { ma_uint8 chunkSizeBytes[4]; ma_uint8 aiff[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) { return MA_FALSE; } if (ma_dr_wav_bytes_to_u32_be(chunkSizeBytes) < 18) { return MA_FALSE; } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, aiff, sizeof(aiff), &cursor) != sizeof(aiff)) { return MA_FALSE; } if (ma_dr_wav_fourcc_equal(aiff, "AIFF")) { isAIFCFormType = MA_FALSE; } else if (ma_dr_wav_fourcc_equal(aiff, "AIFC")) { isAIFCFormType = MA_TRUE; } else { return MA_FALSE; } } else { return MA_FALSE; } if (pWav->container == ma_dr_wav_container_rf64) { ma_uint8 sizeBytes[8]; ma_uint64 bytesRemainingInChunk; ma_dr_wav_chunk_header header; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { return MA_FALSE; } if (!ma_dr_wav_fourcc_equal(header.id.fourcc, "ds64")) { return MA_FALSE; } bytesRemainingInChunk = header.sizeInBytes + header.paddingSize; if (!ma_dr_wav__seek_forward(pWav->onSeek, 8, pWav->pUserData)) { return MA_FALSE; } bytesRemainingInChunk -= 8; cursor += 8; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { return MA_FALSE; } bytesRemainingInChunk -= 8; dataChunkSize = ma_dr_wav_bytes_to_u64(sizeBytes); if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { return MA_FALSE; } bytesRemainingInChunk -= 8; sampleCountFromFactChunk = ma_dr_wav_bytes_to_u64(sizeBytes); if (!ma_dr_wav__seek_forward(pWav->onSeek, bytesRemainingInChunk, pWav->pUserData)) { return MA_FALSE; } cursor += bytesRemainingInChunk; } metadataStartPos = cursor; isProcessingMetadata = !sequential && ((flags & MA_DR_WAV_WITH_METADATA) != 0); if (pWav->container != ma_dr_wav_container_riff && pWav->container != ma_dr_wav_container_rf64) { isProcessingMetadata = MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(&metadataParser, sizeof(metadataParser)); if (isProcessingMetadata) { metadataParser.onRead = pWav->onRead; metadataParser.onSeek = pWav->onSeek; metadataParser.pReadSeekUserData = pWav->pUserData; metadataParser.stage = ma_dr_wav__metadata_parser_stage_count; } for (;;) { ma_dr_wav_chunk_header header; ma_uint64 chunkSize; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { break; } chunkSize = header.sizeInBytes; if (!sequential && onChunk != NULL) { ma_uint64 callbackBytesRead = onChunk(pChunkUserData, pWav->onRead, pWav->onSeek, pWav->pUserData, &header, pWav->container, &fmt); if (callbackBytesRead > 0) { if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } } } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "fmt ")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FMT))) { ma_uint8 fmtData[16]; foundChunk_fmt = MA_TRUE; if (pWav->onRead(pWav->pUserData, fmtData, sizeof(fmtData)) != sizeof(fmtData)) { return MA_FALSE; } cursor += sizeof(fmtData); fmt.formatTag = ma_dr_wav_bytes_to_u16_ex(fmtData + 0, pWav->container); fmt.channels = ma_dr_wav_bytes_to_u16_ex(fmtData + 2, pWav->container); fmt.sampleRate = ma_dr_wav_bytes_to_u32_ex(fmtData + 4, pWav->container); fmt.avgBytesPerSec = ma_dr_wav_bytes_to_u32_ex(fmtData + 8, pWav->container); fmt.blockAlign = ma_dr_wav_bytes_to_u16_ex(fmtData + 12, pWav->container); fmt.bitsPerSample = ma_dr_wav_bytes_to_u16_ex(fmtData + 14, pWav->container); fmt.extendedSize = 0; fmt.validBitsPerSample = 0; fmt.channelMask = 0; MA_DR_WAV_ZERO_MEMORY(fmt.subFormat, sizeof(fmt.subFormat)); if (header.sizeInBytes > 16) { ma_uint8 fmt_cbSize[2]; int bytesReadSoFar = 0; if (pWav->onRead(pWav->pUserData, fmt_cbSize, sizeof(fmt_cbSize)) != sizeof(fmt_cbSize)) { return MA_FALSE; } cursor += sizeof(fmt_cbSize); bytesReadSoFar = 18; fmt.extendedSize = ma_dr_wav_bytes_to_u16_ex(fmt_cbSize, pWav->container); if (fmt.extendedSize > 0) { if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { if (fmt.extendedSize != 22) { return MA_FALSE; } } if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { ma_uint8 fmtext[22]; if (pWav->onRead(pWav->pUserData, fmtext, fmt.extendedSize) != fmt.extendedSize) { return MA_FALSE; } fmt.validBitsPerSample = ma_dr_wav_bytes_to_u16_ex(fmtext + 0, pWav->container); fmt.channelMask = ma_dr_wav_bytes_to_u32_ex(fmtext + 2, pWav->container); ma_dr_wav_bytes_to_guid(fmtext + 6, fmt.subFormat); } else { if (pWav->onSeek(pWav->pUserData, fmt.extendedSize, ma_dr_wav_seek_origin_current) == MA_FALSE) { return MA_FALSE; } } cursor += fmt.extendedSize; bytesReadSoFar += fmt.extendedSize; } if (pWav->onSeek(pWav->pUserData, (int)(header.sizeInBytes - bytesReadSoFar), ma_dr_wav_seek_origin_current) == MA_FALSE) { return MA_FALSE; } cursor += (header.sizeInBytes - bytesReadSoFar); } if (header.paddingSize > 0) { if (ma_dr_wav__seek_forward(pWav->onSeek, header.paddingSize, pWav->pUserData) == MA_FALSE) { break; } cursor += header.paddingSize; } continue; } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "data")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_DATA))) { foundChunk_data = MA_TRUE; pWav->dataChunkDataPos = cursor; if (pWav->container != ma_dr_wav_container_rf64) { dataChunkSize = chunkSize; } if (sequential || !isProcessingMetadata) { break; } else { chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } } if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, "fact")) || ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FACT))) { if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) { ma_uint8 sampleCount[4]; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCount, 4, &cursor) != 4) { return MA_FALSE; } chunkSize -= 4; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { sampleCountFromFactChunk = ma_dr_wav_bytes_to_u32_ex(sampleCount, pWav->container); } else { sampleCountFromFactChunk = 0; } } else if (pWav->container == ma_dr_wav_container_w64) { if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCountFromFactChunk, 8, &cursor) != 8) { return MA_FALSE; } chunkSize -= 8; } else if (pWav->container == ma_dr_wav_container_rf64) { } chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, "COMM")) { ma_uint8 commData[24]; ma_uint32 commDataBytesToRead; ma_uint16 channels; ma_uint32 frameCount; ma_uint16 sampleSizeInBits; ma_int64 sampleRate; ma_uint16 compressionFormat; foundChunk_fmt = MA_TRUE; if (isAIFCFormType) { commDataBytesToRead = 24; if (header.sizeInBytes < commDataBytesToRead) { return MA_FALSE; } } else { commDataBytesToRead = 18; if (header.sizeInBytes != commDataBytesToRead) { return MA_FALSE; } } if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, commData, commDataBytesToRead, &cursor) != commDataBytesToRead) { return MA_FALSE; } channels = ma_dr_wav_bytes_to_u16_ex (commData + 0, pWav->container); frameCount = ma_dr_wav_bytes_to_u32_ex (commData + 2, pWav->container); sampleSizeInBits = ma_dr_wav_bytes_to_u16_ex (commData + 6, pWav->container); sampleRate = ma_dr_wav_aiff_extented_to_s64(commData + 8); if (sampleRate < 0 || sampleRate > 0xFFFFFFFF) { return MA_FALSE; } if (isAIFCFormType) { const ma_uint8* type = commData + 18; if (ma_dr_wav_fourcc_equal(type, "NONE")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; } else if (ma_dr_wav_fourcc_equal(type, "raw ")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; if (sampleSizeInBits == 8) { pWav->aiff.isUnsigned = MA_TRUE; } } else if (ma_dr_wav_fourcc_equal(type, "sowt")) { compressionFormat = MA_DR_WAVE_FORMAT_PCM; pWav->aiff.isLE = MA_TRUE; } else if (ma_dr_wav_fourcc_equal(type, "fl32") || ma_dr_wav_fourcc_equal(type, "fl64") || ma_dr_wav_fourcc_equal(type, "FL32") || ma_dr_wav_fourcc_equal(type, "FL64")) { compressionFormat = MA_DR_WAVE_FORMAT_IEEE_FLOAT; } else if (ma_dr_wav_fourcc_equal(type, "alaw") || ma_dr_wav_fourcc_equal(type, "ALAW")) { compressionFormat = MA_DR_WAVE_FORMAT_ALAW; } else if (ma_dr_wav_fourcc_equal(type, "ulaw") || ma_dr_wav_fourcc_equal(type, "ULAW")) { compressionFormat = MA_DR_WAVE_FORMAT_MULAW; } else if (ma_dr_wav_fourcc_equal(type, "ima4")) { compressionFormat = MA_DR_WAVE_FORMAT_DVI_ADPCM; sampleSizeInBits = 4; (void)compressionFormat; (void)sampleSizeInBits; return MA_FALSE; } else { return MA_FALSE; } } else { compressionFormat = MA_DR_WAVE_FORMAT_PCM; } aiffFrameCount = frameCount; fmt.formatTag = compressionFormat; fmt.channels = channels; fmt.sampleRate = (ma_uint32)sampleRate; fmt.bitsPerSample = sampleSizeInBits; fmt.blockAlign = (ma_uint16)(fmt.channels * fmt.bitsPerSample / 8); fmt.avgBytesPerSec = fmt.blockAlign * fmt.sampleRate; if (fmt.blockAlign == 0 && compressionFormat == MA_DR_WAVE_FORMAT_DVI_ADPCM) { fmt.blockAlign = 34 * fmt.channels; } if (compressionFormat == MA_DR_WAVE_FORMAT_ALAW || compressionFormat == MA_DR_WAVE_FORMAT_MULAW) { if (fmt.bitsPerSample > 8) { fmt.bitsPerSample = 8; fmt.blockAlign = fmt.channels; } } fmt.bitsPerSample += (fmt.bitsPerSample & 7); if (isAIFCFormType) { if (ma_dr_wav__seek_forward(pWav->onSeek, (chunkSize - commDataBytesToRead), pWav->pUserData) == MA_FALSE) { return MA_FALSE; } cursor += (chunkSize - commDataBytesToRead); } continue; } if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, "SSND")) { ma_uint8 offsetAndBlockSizeData[8]; ma_uint32 offset; foundChunk_data = MA_TRUE; if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, offsetAndBlockSizeData, sizeof(offsetAndBlockSizeData), &cursor) != sizeof(offsetAndBlockSizeData)) { return MA_FALSE; } offset = ma_dr_wav_bytes_to_u32_ex(offsetAndBlockSizeData + 0, pWav->container); if (ma_dr_wav__seek_forward(pWav->onSeek, offset, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } cursor += offset; pWav->dataChunkDataPos = cursor; dataChunkSize = chunkSize; if (sequential || !isProcessingMetadata) { break; } else { if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; continue; } } if (isProcessingMetadata) { ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown); if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) { break; } } chunkSize += header.paddingSize; if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) { break; } cursor += chunkSize; } if (!foundChunk_fmt || !foundChunk_data) { return MA_FALSE; } if ((fmt.sampleRate == 0 || fmt.sampleRate > MA_DR_WAV_MAX_SAMPLE_RATE ) || (fmt.channels == 0 || fmt.channels > MA_DR_WAV_MAX_CHANNELS ) || (fmt.bitsPerSample == 0 || fmt.bitsPerSample > MA_DR_WAV_MAX_BITS_PER_SAMPLE) || fmt.blockAlign == 0) { return MA_FALSE; } translatedFormatTag = fmt.formatTag; if (translatedFormatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) { translatedFormatTag = ma_dr_wav_bytes_to_u16_ex(fmt.subFormat + 0, pWav->container); } if (!sequential) { if (!ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData)) { return MA_FALSE; } cursor = pWav->dataChunkDataPos; } if (isProcessingMetadata && metadataParser.metadataCount > 0) { if (ma_dr_wav__seek_from_start(pWav->onSeek, metadataStartPos, pWav->pUserData) == MA_FALSE) { return MA_FALSE; } result = ma_dr_wav__metadata_alloc(&metadataParser, &pWav->allocationCallbacks); if (result != MA_SUCCESS) { return MA_FALSE; } metadataParser.stage = ma_dr_wav__metadata_parser_stage_read; for (;;) { ma_dr_wav_chunk_header header; ma_uint64 metadataBytesRead; result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); if (result != MA_SUCCESS) { break; } metadataBytesRead = ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown); if (ma_dr_wav__seek_forward(pWav->onSeek, (header.sizeInBytes + header.paddingSize) - metadataBytesRead, pWav->pUserData) == MA_FALSE) { ma_dr_wav_free(metadataParser.pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } } pWav->pMetadata = metadataParser.pMetadata; pWav->metadataCount = metadataParser.metadataCount; } if (dataChunkSize == 0xFFFFFFFF && (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) && pWav->isSequentialWrite == MA_FALSE) { dataChunkSize = 0; for (;;) { ma_uint8 temp[4096]; size_t bytesRead = pWav->onRead(pWav->pUserData, temp, sizeof(temp)); dataChunkSize += bytesRead; if (bytesRead < sizeof(temp)) { break; } } } if (ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData) == MA_FALSE) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } pWav->fmt = fmt; pWav->sampleRate = fmt.sampleRate; pWav->channels = fmt.channels; pWav->bitsPerSample = fmt.bitsPerSample; pWav->bytesRemaining = dataChunkSize; pWav->translatedFormatTag = translatedFormatTag; pWav->dataChunkDataSize = dataChunkSize; if (sampleCountFromFactChunk != 0) { pWav->totalPCMFrameCount = sampleCountFromFactChunk; } else if (aiffFrameCount != 0) { pWav->totalPCMFrameCount = aiffFrameCount; } else { ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } pWav->totalPCMFrameCount = dataChunkSize / bytesPerFrame; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { ma_uint64 totalBlockHeaderSizeInBytes; ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; if ((blockCount * fmt.blockAlign) < dataChunkSize) { blockCount += 1; } totalBlockHeaderSizeInBytes = blockCount * (6*fmt.channels); pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { ma_uint64 totalBlockHeaderSizeInBytes; ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; if ((blockCount * fmt.blockAlign) < dataChunkSize) { blockCount += 1; } totalBlockHeaderSizeInBytes = blockCount * (4*fmt.channels); pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels; pWav->totalPCMFrameCount += blockCount; } } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { if (pWav->channels > 2) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } } if (ma_dr_wav_get_bytes_per_pcm_frame(pWav) == 0) { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); return MA_FALSE; } #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (6*pWav->channels))) * 2)) / fmt.channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { ma_uint64 blockCount = dataChunkSize / fmt.blockAlign; pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (4*pWav->channels))) * 2) + (blockCount * pWav->channels)) / fmt.channels; } #endif return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_ex(pWav, onRead, onSeek, NULL, pUserData, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pReadSeekUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); } MA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA); } MA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav) { ma_dr_wav_metadata *result = pWav->pMetadata; pWav->pMetadata = NULL; pWav->metadataCount = 0; return result; } MA_PRIVATE size_t ma_dr_wav__write(ma_dr_wav* pWav, const void* pData, size_t dataSize) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); return pWav->onWrite(pWav->pUserData, pData, dataSize); } MA_PRIVATE size_t ma_dr_wav__write_byte(ma_dr_wav* pWav, ma_uint8 byte) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); return pWav->onWrite(pWav->pUserData, &byte, 1); } MA_PRIVATE size_t ma_dr_wav__write_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap16(value); } return ma_dr_wav__write(pWav, &value, 2); } MA_PRIVATE size_t ma_dr_wav__write_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap32(value); } return ma_dr_wav__write(pWav, &value, 4); } MA_PRIVATE size_t ma_dr_wav__write_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value) { MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); if (!ma_dr_wav__is_little_endian()) { value = ma_dr_wav__bswap64(value); } return ma_dr_wav__write(pWav, &value, 8); } MA_PRIVATE size_t ma_dr_wav__write_f32ne_to_le(ma_dr_wav* pWav, float value) { union { ma_uint32 u32; float f32; } u; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->onWrite != NULL); u.f32 = value; if (!ma_dr_wav__is_little_endian()) { u.u32 = ma_dr_wav__bswap32(u.u32); } return ma_dr_wav__write(pWav, &u.u32, 4); } MA_PRIVATE size_t ma_dr_wav__write_or_count(ma_dr_wav* pWav, const void* pData, size_t dataSize) { if (pWav == NULL) { return dataSize; } return ma_dr_wav__write(pWav, pData, dataSize); } MA_PRIVATE size_t ma_dr_wav__write_or_count_byte(ma_dr_wav* pWav, ma_uint8 byte) { if (pWav == NULL) { return 1; } return ma_dr_wav__write_byte(pWav, byte); } MA_PRIVATE size_t ma_dr_wav__write_or_count_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value) { if (pWav == NULL) { return 2; } return ma_dr_wav__write_u16ne_to_le(pWav, value); } MA_PRIVATE size_t ma_dr_wav__write_or_count_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value) { if (pWav == NULL) { return 4; } return ma_dr_wav__write_u32ne_to_le(pWav, value); } #if 0 MA_PRIVATE size_t ma_dr_wav__write_or_count_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value) { if (pWav == NULL) { return 8; } return ma_dr_wav__write_u64ne_to_le(pWav, value); } #endif MA_PRIVATE size_t ma_dr_wav__write_or_count_f32ne_to_le(ma_dr_wav* pWav, float value) { if (pWav == NULL) { return 4; } return ma_dr_wav__write_f32ne_to_le(pWav, value); } MA_PRIVATE size_t ma_dr_wav__write_or_count_string_to_fixed_size_buf(ma_dr_wav* pWav, char* str, size_t bufFixedSize) { size_t len; if (pWav == NULL) { return bufFixedSize; } len = ma_dr_wav__strlen_clamped(str, bufFixedSize); ma_dr_wav__write_or_count(pWav, str, len); if (len < bufFixedSize) { size_t i; for (i = 0; i < bufFixedSize - len; ++i) { ma_dr_wav__write_byte(pWav, 0); } } return bufFixedSize; } MA_PRIVATE size_t ma_dr_wav__write_or_count_metadata(ma_dr_wav* pWav, ma_dr_wav_metadata* pMetadatas, ma_uint32 metadataCount) { size_t bytesWritten = 0; ma_bool32 hasListAdtl = MA_FALSE; ma_bool32 hasListInfo = MA_FALSE; ma_uint32 iMetadata; if (pMetadatas == NULL || metadataCount == 0) { return 0; } for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 chunkSize = 0; if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list)) { hasListInfo = MA_TRUE; } if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_adtl) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list)) { hasListAdtl = MA_TRUE; } switch (pMetadata->type) { case ma_dr_wav_metadata_type_smpl: { ma_uint32 iLoop; chunkSize = MA_DR_WAV_SMPL_BYTES + MA_DR_WAV_SMPL_LOOP_BYTES * pMetadata->data.smpl.sampleLoopCount + pMetadata->data.smpl.samplerSpecificDataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, "smpl", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.manufacturerId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.productId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplePeriodNanoseconds); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiUnityNote); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiPitchFraction); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteFormat); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.sampleLoopCount); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplerSpecificDataSizeInBytes); for (iLoop = 0; iLoop < pMetadata->data.smpl.sampleLoopCount; ++iLoop) { bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].cuePointId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].type); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].firstSampleByteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].lastSampleByteOffset); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].sampleFraction); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].playCount); } if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) { bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes); } } break; case ma_dr_wav_metadata_type_inst: { chunkSize = MA_DR_WAV_INST_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "inst", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.midiUnityNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.fineTuneCents, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.gainDecibels, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highNote, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowVelocity, 1); bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highVelocity, 1); } break; case ma_dr_wav_metadata_type_cue: { ma_uint32 iCuePoint; chunkSize = MA_DR_WAV_CUE_BYTES + MA_DR_WAV_CUE_POINT_BYTES * pMetadata->data.cue.cuePointCount; bytesWritten += ma_dr_wav__write_or_count(pWav, "cue ", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.cuePointCount); for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) { bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].id); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].blockStart); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset); } } break; case ma_dr_wav_metadata_type_acid: { chunkSize = MA_DR_WAV_ACID_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "acid", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.flags); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.midiUnityNote); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.reserved1); bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.reserved2); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.numBeats); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterDenominator); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterNumerator); bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.tempo); } break; case ma_dr_wav_metadata_type_bext: { char reservedBuf[MA_DR_WAV_BEXT_RESERVED_BYTES]; ma_uint32 timeReferenceLow; ma_uint32 timeReferenceHigh; chunkSize = MA_DR_WAV_BEXT_BYTES + pMetadata->data.bext.codingHistorySize; bytesWritten += ma_dr_wav__write_or_count(pWav, "bext", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pDescription, MA_DR_WAV_BEXT_DESCRIPTION_BYTES); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorName, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES); bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorReference, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate)); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime)); timeReferenceLow = (ma_uint32)(pMetadata->data.bext.timeReference & 0xFFFFFFFF); timeReferenceHigh = (ma_uint32)(pMetadata->data.bext.timeReference >> 32); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceLow); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceHigh); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.version); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessValue); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessRange); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxTruePeakLevel); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxMomentaryLoudness); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxShortTermLoudness); MA_DR_WAV_ZERO_MEMORY(reservedBuf, sizeof(reservedBuf)); bytesWritten += ma_dr_wav__write_or_count(pWav, reservedBuf, sizeof(reservedBuf)); if (pMetadata->data.bext.codingHistorySize > 0) { bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pCodingHistory, pMetadata->data.bext.codingHistorySize); } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_top_level) { chunkSize = pMetadata->data.unknown.dataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes); } } break; default: break; } if ((chunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } if (hasListInfo) { ma_uint32 chunkSize = 4; for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings)) { chunkSize += 8; chunkSize += pMetadata->data.infoText.stringLength + 1; } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) { chunkSize += 8; chunkSize += pMetadata->data.unknown.dataSizeInBytes; } if ((chunkSize % 2) != 0) { chunkSize += 1; } } bytesWritten += ma_dr_wav__write_or_count(pWav, "LIST", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, "INFO", 4); for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 subchunkSize = 0; if (pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) { const char* pID = NULL; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_info_software: pID = "ISFT"; break; case ma_dr_wav_metadata_type_list_info_copyright: pID = "ICOP"; break; case ma_dr_wav_metadata_type_list_info_title: pID = "INAM"; break; case ma_dr_wav_metadata_type_list_info_artist: pID = "IART"; break; case ma_dr_wav_metadata_type_list_info_comment: pID = "ICMT"; break; case ma_dr_wav_metadata_type_list_info_date: pID = "ICRD"; break; case ma_dr_wav_metadata_type_list_info_genre: pID = "IGNR"; break; case ma_dr_wav_metadata_type_list_info_album: pID = "IPRD"; break; case ma_dr_wav_metadata_type_list_info_tracknumber: pID = "ITRK"; break; default: break; } MA_DR_WAV_ASSERT(pID != NULL); if (pMetadata->data.infoText.stringLength) { subchunkSize = pMetadata->data.infoText.stringLength + 1; bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.infoText.pString, pMetadata->data.infoText.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) { if (pMetadata->data.unknown.dataSizeInBytes) { subchunkSize = pMetadata->data.unknown.dataSizeInBytes; bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.unknown.dataSizeInBytes); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize); } } if ((subchunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } } if (hasListAdtl) { ma_uint32 chunkSize = 4; for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_label: case ma_dr_wav_metadata_type_list_note: { chunkSize += 8; chunkSize += MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; if (pMetadata->data.labelOrNote.stringLength > 0) { chunkSize += pMetadata->data.labelOrNote.stringLength + 1; } } break; case ma_dr_wav_metadata_type_list_labelled_cue_region: { chunkSize += 8; chunkSize += MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; if (pMetadata->data.labelledCueRegion.stringLength > 0) { chunkSize += pMetadata->data.labelledCueRegion.stringLength + 1; } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) { chunkSize += 8; chunkSize += pMetadata->data.unknown.dataSizeInBytes; } } break; default: break; } if ((chunkSize % 2) != 0) { chunkSize += 1; } } bytesWritten += ma_dr_wav__write_or_count(pWav, "LIST", 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, "adtl", 4); for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) { ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata]; ma_uint32 subchunkSize = 0; switch (pMetadata->type) { case ma_dr_wav_metadata_type_list_label: case ma_dr_wav_metadata_type_list_note: { if (pMetadata->data.labelOrNote.stringLength > 0) { const char *pID = NULL; if (pMetadata->type == ma_dr_wav_metadata_type_list_label) { pID = "labl"; } else if (pMetadata->type == ma_dr_wav_metadata_type_list_note) { pID = "note"; } MA_DR_WAV_ASSERT(pID != NULL); MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL); subchunkSize = MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4); subchunkSize += pMetadata->data.labelOrNote.stringLength + 1; bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelOrNote.cuePointId); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelOrNote.pString, pMetadata->data.labelOrNote.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } break; case ma_dr_wav_metadata_type_list_labelled_cue_region: { subchunkSize = MA_DR_WAV_LIST_LABELLED_TEXT_BYTES; bytesWritten += ma_dr_wav__write_or_count(pWav, "ltxt", 4); if (pMetadata->data.labelledCueRegion.stringLength > 0) { subchunkSize += pMetadata->data.labelledCueRegion.stringLength + 1; } bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.cuePointId); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.sampleLength); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.purposeId, 4); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.country); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.language); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.dialect); bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.codePage); if (pMetadata->data.labelledCueRegion.stringLength > 0) { MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.pString, pMetadata->data.labelledCueRegion.stringLength); bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\0'); } } break; case ma_dr_wav_metadata_type_unknown: { if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) { subchunkSize = pMetadata->data.unknown.dataSizeInBytes; MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4); bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize); bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize); } } break; default: break; } if ((subchunkSize % 2) != 0) { bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0); } } } MA_DR_WAV_ASSERT((bytesWritten % 2) == 0); return bytesWritten; } MA_PRIVATE ma_uint32 ma_dr_wav__riff_chunk_size_riff(ma_uint64 dataChunkSize, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { ma_uint64 chunkSize = 4 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, pMetadata, metadataCount) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize); if (chunkSize > 0xFFFFFFFFUL) { chunkSize = 0xFFFFFFFFUL; } return (ma_uint32)chunkSize; } MA_PRIVATE ma_uint32 ma_dr_wav__data_chunk_size_riff(ma_uint64 dataChunkSize) { if (dataChunkSize <= 0xFFFFFFFFUL) { return (ma_uint32)dataChunkSize; } else { return 0xFFFFFFFFUL; } } MA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_w64(ma_uint64 dataChunkSize) { ma_uint64 dataSubchunkPaddingSize = ma_dr_wav__chunk_padding_size_w64(dataChunkSize); return 80 + 24 + dataChunkSize + dataSubchunkPaddingSize; } MA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_w64(ma_uint64 dataChunkSize) { return 24 + dataChunkSize; } MA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_rf64(ma_uint64 dataChunkSize, ma_dr_wav_metadata *metadata, ma_uint32 numMetadata) { ma_uint64 chunkSize = 4 + 36 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, metadata, numMetadata) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize); if (chunkSize > 0xFFFFFFFFUL) { chunkSize = 0xFFFFFFFFUL; } return chunkSize; } MA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_rf64(ma_uint64 dataChunkSize) { return dataChunkSize; } MA_PRIVATE ma_bool32 ma_dr_wav_preinit_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_bool32 isSequential, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onWrite == NULL) { return MA_FALSE; } if (!isSequential && onSeek == NULL) { return MA_FALSE; } if (pFormat->format == MA_DR_WAVE_FORMAT_EXTENSIBLE) { return MA_FALSE; } if (pFormat->format == MA_DR_WAVE_FORMAT_ADPCM || pFormat->format == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return MA_FALSE; } MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav)); pWav->onWrite = onWrite; pWav->onSeek = onSeek; pWav->pUserData = pUserData; pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } pWav->fmt.formatTag = (ma_uint16)pFormat->format; pWav->fmt.channels = (ma_uint16)pFormat->channels; pWav->fmt.sampleRate = pFormat->sampleRate; pWav->fmt.avgBytesPerSec = (ma_uint32)((pFormat->bitsPerSample * pFormat->sampleRate * pFormat->channels) / 8); pWav->fmt.blockAlign = (ma_uint16)((pFormat->channels * pFormat->bitsPerSample) / 8); pWav->fmt.bitsPerSample = (ma_uint16)pFormat->bitsPerSample; pWav->fmt.extendedSize = 0; pWav->isSequentialWrite = isSequential; return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount) { size_t runningPos = 0; ma_uint64 initialDataChunkSize = 0; ma_uint64 chunkSizeFMT; if (pWav->isSequentialWrite) { initialDataChunkSize = (totalSampleCount * pWav->fmt.bitsPerSample) / 8; if (pFormat->container == ma_dr_wav_container_riff) { if (initialDataChunkSize > (0xFFFFFFFFUL - 36)) { return MA_FALSE; } } } pWav->dataChunkDataSizeTargetWrite = initialDataChunkSize; if (pFormat->container == ma_dr_wav_container_riff) { ma_uint32 chunkSizeRIFF = 28 + (ma_uint32)initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "RIFF", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeRIFF); runningPos += ma_dr_wav__write(pWav, "WAVE", 4); } else if (pFormat->container == ma_dr_wav_container_w64) { ma_uint64 chunkSizeRIFF = 80 + 24 + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_RIFF, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeRIFF); runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_WAVE, 16); } else if (pFormat->container == ma_dr_wav_container_rf64) { runningPos += ma_dr_wav__write(pWav, "RF64", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF); runningPos += ma_dr_wav__write(pWav, "WAVE", 4); } else { return MA_FALSE; } if (pFormat->container == ma_dr_wav_container_rf64) { ma_uint32 initialds64ChunkSize = 28; ma_uint64 initialRiffChunkSize = 8 + initialds64ChunkSize + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "ds64", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, initialds64ChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialRiffChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialDataChunkSize); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, totalSampleCount); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0); } if (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64) { chunkSizeFMT = 16; runningPos += ma_dr_wav__write(pWav, "fmt ", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, (ma_uint32)chunkSizeFMT); } else if (pFormat->container == ma_dr_wav_container_w64) { chunkSizeFMT = 40; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_FMT, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeFMT); } runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.formatTag); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.channels); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.sampleRate); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.avgBytesPerSec); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign); runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample); if (!pWav->isSequentialWrite && pWav->pMetadata != NULL && pWav->metadataCount > 0 && (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64)) { runningPos += ma_dr_wav__write_or_count_metadata(pWav, pWav->pMetadata, pWav->metadataCount); } pWav->dataChunkDataPos = runningPos; if (pFormat->container == ma_dr_wav_container_riff) { ma_uint32 chunkSizeDATA = (ma_uint32)initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, "data", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeDATA); } else if (pFormat->container == ma_dr_wav_container_w64) { ma_uint64 chunkSizeDATA = 24 + initialDataChunkSize; runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_DATA, 16); runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeDATA); } else if (pFormat->container == ma_dr_wav_container_rf64) { runningPos += ma_dr_wav__write(pWav, "data", 4); runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF); } pWav->container = pFormat->container; pWav->channels = (ma_uint16)pFormat->channels; pWav->sampleRate = pFormat->sampleRate; pWav->bitsPerSample = (ma_uint16)pFormat->bitsPerSample; pWav->translatedFormatTag = (ma_uint16)pFormat->format; pWav->dataChunkDataPos = runningPos; return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init_write__internal(pWav, pFormat, 0); } MA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_TRUE, onWrite, NULL, pUserData, pAllocationCallbacks)) { return MA_FALSE; } return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); } MA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_write_sequential(pWav, pFormat, totalPCMFrameCount*pFormat->channels, onWrite, pUserData, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) { return MA_FALSE; } pWav->pMetadata = pMetadata; pWav->metadataCount = metadataCount; return ma_dr_wav_init_write__internal(pWav, pFormat, 0); } MA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount) { ma_uint64 targetDataSizeBytes = (ma_uint64)((ma_int64)totalFrameCount * pFormat->channels * pFormat->bitsPerSample/8.0); ma_uint64 riffChunkSizeBytes; ma_uint64 fileSizeBytes = 0; if (pFormat->container == ma_dr_wav_container_riff) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_riff(targetDataSizeBytes, pMetadata, metadataCount); fileSizeBytes = (8 + riffChunkSizeBytes); } else if (pFormat->container == ma_dr_wav_container_w64) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_w64(targetDataSizeBytes); fileSizeBytes = riffChunkSizeBytes; } else if (pFormat->container == ma_dr_wav_container_rf64) { riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_rf64(targetDataSizeBytes, pMetadata, metadataCount); fileSizeBytes = (8 + riffChunkSizeBytes); } return fileSizeBytes; } #ifndef MA_DR_WAV_NO_STDIO MA_PRIVATE size_t ma_dr_wav__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } MA_PRIVATE size_t ma_dr_wav__on_write_stdio(void* pUserData, const void* pData, size_t bytesToWrite) { return fwrite(pData, 1, bytesToWrite, (FILE*)pUserData); } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_stdio(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == ma_dr_wav_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_ex(pWav, filename, NULL, NULL, 0, pAllocationCallbacks); } MA_PRIVATE ma_bool32 ma_dr_wav_init_file__internal_FILE(ma_dr_wav* pWav, FILE* pFile, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; result = ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } result = ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "rb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_ex_w(pWav, filename, NULL, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks); } #endif MA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "rb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks); } #endif MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal_FILE(ma_dr_wav* pWav, FILE* pFile, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; result = ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } result = ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_fopen(&pFile, filename, "wb") != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_PRIVATE ma_bool32 ma_dr_wav_init_file_write_w__internal(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (ma_wfopen(&pFile, filename, L"wb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks); } #endif MA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_file_write_sequential(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_file_write_sequential_w(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } #endif #endif MA_PRIVATE size_t ma_dr_wav__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; size_t bytesRemaining; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->memoryStream.dataSize >= pWav->memoryStream.currentReadPos); bytesRemaining = pWav->memoryStream.dataSize - pWav->memoryStream.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_WAV_COPY_MEMORY(pBufferOut, pWav->memoryStream.data + pWav->memoryStream.currentReadPos, bytesToRead); pWav->memoryStream.currentReadPos += bytesToRead; } return bytesToRead; } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; MA_DR_WAV_ASSERT(pWav != NULL); if (origin == ma_dr_wav_seek_origin_current) { if (offset > 0) { if (pWav->memoryStream.currentReadPos + offset > pWav->memoryStream.dataSize) { return MA_FALSE; } } else { if (pWav->memoryStream.currentReadPos < (size_t)-offset) { return MA_FALSE; } } pWav->memoryStream.currentReadPos += offset; } else { if ((ma_uint32)offset <= pWav->memoryStream.dataSize) { pWav->memoryStream.currentReadPos = offset; } else { return MA_FALSE; } } return MA_TRUE; } MA_PRIVATE size_t ma_dr_wav__on_write_memory(void* pUserData, const void* pDataIn, size_t bytesToWrite) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; size_t bytesRemaining; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(pWav->memoryStreamWrite.dataCapacity >= pWav->memoryStreamWrite.currentWritePos); bytesRemaining = pWav->memoryStreamWrite.dataCapacity - pWav->memoryStreamWrite.currentWritePos; if (bytesRemaining < bytesToWrite) { void* pNewData; size_t newDataCapacity = (pWav->memoryStreamWrite.dataCapacity == 0) ? 256 : pWav->memoryStreamWrite.dataCapacity * 2; if ((newDataCapacity - pWav->memoryStreamWrite.currentWritePos) < bytesToWrite) { newDataCapacity = pWav->memoryStreamWrite.currentWritePos + bytesToWrite; } pNewData = ma_dr_wav__realloc_from_callbacks(*pWav->memoryStreamWrite.ppData, newDataCapacity, pWav->memoryStreamWrite.dataCapacity, &pWav->allocationCallbacks); if (pNewData == NULL) { return 0; } *pWav->memoryStreamWrite.ppData = pNewData; pWav->memoryStreamWrite.dataCapacity = newDataCapacity; } MA_DR_WAV_COPY_MEMORY(((ma_uint8*)(*pWav->memoryStreamWrite.ppData)) + pWav->memoryStreamWrite.currentWritePos, pDataIn, bytesToWrite); pWav->memoryStreamWrite.currentWritePos += bytesToWrite; if (pWav->memoryStreamWrite.dataSize < pWav->memoryStreamWrite.currentWritePos) { pWav->memoryStreamWrite.dataSize = pWav->memoryStreamWrite.currentWritePos; } *pWav->memoryStreamWrite.pDataSize = pWav->memoryStreamWrite.dataSize; return bytesToWrite; } MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory_write(void* pUserData, int offset, ma_dr_wav_seek_origin origin) { ma_dr_wav* pWav = (ma_dr_wav*)pUserData; MA_DR_WAV_ASSERT(pWav != NULL); if (origin == ma_dr_wav_seek_origin_current) { if (offset > 0) { if (pWav->memoryStreamWrite.currentWritePos + offset > pWav->memoryStreamWrite.dataSize) { offset = (int)(pWav->memoryStreamWrite.dataSize - pWav->memoryStreamWrite.currentWritePos); } } else { if (pWav->memoryStreamWrite.currentWritePos < (size_t)-offset) { offset = -(int)pWav->memoryStreamWrite.currentWritePos; } } pWav->memoryStreamWrite.currentWritePos += offset; } else { if ((ma_uint32)offset <= pWav->memoryStreamWrite.dataSize) { pWav->memoryStreamWrite.currentWritePos = offset; } else { pWav->memoryStreamWrite.currentWritePos = pWav->memoryStreamWrite.dataSize; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_ex(pWav, data, dataSize, NULL, NULL, 0, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (data == NULL || dataSize == 0) { return MA_FALSE; } if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStream.data = (const ma_uint8*)data; pWav->memoryStream.dataSize = dataSize; pWav->memoryStream.currentReadPos = 0; return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags); } MA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks) { if (data == NULL || dataSize == 0) { return MA_FALSE; } if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStream.data = (const ma_uint8*)data; pWav->memoryStream.dataSize = dataSize; pWav->memoryStream.currentReadPos = 0; return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA); } MA_PRIVATE ma_bool32 ma_dr_wav_init_memory_write__internal(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks) { if (ppData == NULL || pDataSize == NULL) { return MA_FALSE; } *ppData = NULL; *pDataSize = 0; if (!ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_memory, ma_dr_wav__on_seek_memory_write, pWav, pAllocationCallbacks)) { return MA_FALSE; } pWav->memoryStreamWrite.ppData = ppData; pWav->memoryStreamWrite.pDataSize = pDataSize; pWav->memoryStreamWrite.dataSize = 0; pWav->memoryStreamWrite.dataCapacity = 0; pWav->memoryStreamWrite.currentWritePos = 0; return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount); } MA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, 0, MA_FALSE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks); } MA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { if (pFormat == NULL) { return MA_FALSE; } return ma_dr_wav_init_memory_write_sequential(pWav, ppData, pDataSize, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks); } MA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav) { ma_result result = MA_SUCCESS; if (pWav == NULL) { return MA_INVALID_ARGS; } if (pWav->onWrite != NULL) { ma_uint32 paddingSize = 0; if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rf64) { paddingSize = ma_dr_wav__chunk_padding_size_riff(pWav->dataChunkDataSize); } else { paddingSize = ma_dr_wav__chunk_padding_size_w64(pWav->dataChunkDataSize); } if (paddingSize > 0) { ma_uint64 paddingData = 0; ma_dr_wav__write(pWav, &paddingData, paddingSize); } if (pWav->onSeek && !pWav->isSequentialWrite) { if (pWav->container == ma_dr_wav_container_riff) { if (pWav->onSeek(pWav->pUserData, 4, ma_dr_wav_seek_origin_start)) { ma_uint32 riffChunkSize = ma_dr_wav__riff_chunk_size_riff(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount); ma_dr_wav__write_u32ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, ma_dr_wav_seek_origin_start)) { ma_uint32 dataChunkSize = ma_dr_wav__data_chunk_size_riff(pWav->dataChunkDataSize); ma_dr_wav__write_u32ne_to_le(pWav, dataChunkSize); } } else if (pWav->container == ma_dr_wav_container_w64) { if (pWav->onSeek(pWav->pUserData, 16, ma_dr_wav_seek_origin_start)) { ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_w64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, ma_dr_wav_seek_origin_start)) { ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_w64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize); } } else if (pWav->container == ma_dr_wav_container_rf64) { int ds64BodyPos = 12 + 8; if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 0, ma_dr_wav_seek_origin_start)) { ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_rf64(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount); ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize); } if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 8, ma_dr_wav_seek_origin_start)) { ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_rf64(pWav->dataChunkDataSize); ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize); } } } if (pWav->isSequentialWrite) { if (pWav->dataChunkDataSize != pWav->dataChunkDataSizeTargetWrite) { result = MA_INVALID_FILE; } } } else { ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks); } #ifndef MA_DR_WAV_NO_STDIO if (pWav->onRead == ma_dr_wav__on_read_stdio || pWav->onWrite == ma_dr_wav__on_write_stdio) { fclose((FILE*)pWav->pUserData); } #endif return result; } MA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut) { size_t bytesRead; ma_uint32 bytesPerFrame; if (pWav == NULL || bytesToRead == 0) { return 0; } if (bytesToRead > pWav->bytesRemaining) { bytesToRead = (size_t)pWav->bytesRemaining; } if (bytesToRead == 0) { return 0; } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } if (pBufferOut != NULL) { bytesRead = pWav->onRead(pWav->pUserData, pBufferOut, bytesToRead); } else { bytesRead = 0; while (bytesRead < bytesToRead) { size_t bytesToSeek = (bytesToRead - bytesRead); if (bytesToSeek > 0x7FFFFFFF) { bytesToSeek = 0x7FFFFFFF; } if (pWav->onSeek(pWav->pUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current) == MA_FALSE) { break; } bytesRead += bytesToSeek; } while (bytesRead < bytesToRead) { ma_uint8 buffer[4096]; size_t bytesSeeked; size_t bytesToSeek = (bytesToRead - bytesRead); if (bytesToSeek > sizeof(buffer)) { bytesToSeek = sizeof(buffer); } bytesSeeked = pWav->onRead(pWav->pUserData, buffer, bytesToSeek); bytesRead += bytesSeeked; if (bytesSeeked < bytesToSeek) { break; } } } pWav->readCursorInPCMFrames += bytesRead / bytesPerFrame; pWav->bytesRemaining -= bytesRead; return bytesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint32 bytesPerFrame; ma_uint64 bytesToRead; ma_uint64 framesRemainingInFile; if (pWav == NULL || framesToRead == 0) { return 0; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { return 0; } framesRemainingInFile = pWav->totalPCMFrameCount - pWav->readCursorInPCMFrames; if (framesToRead > framesRemainingInFile) { framesToRead = framesRemainingInFile; } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesToRead = framesToRead * bytesPerFrame; if (bytesToRead > MA_SIZE_MAX) { bytesToRead = (MA_SIZE_MAX / bytesPerFrame) * bytesPerFrame; } if (bytesToRead == 0) { return 0; } return ma_dr_wav_read_raw(pWav, (size_t)bytesToRead, pBufferOut) / bytesPerFrame; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL) { ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } ma_dr_wav__bswap_samples(pBufferOut, framesRead*pWav->channels, bytesPerFrame/pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 framesRead = 0; if (ma_dr_wav_is_container_be(pWav->container)) { if (pWav->container != ma_dr_wav_container_aiff || pWav->aiff.isLE == MA_FALSE) { if (ma_dr_wav__is_little_endian()) { framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut); } else { framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); } goto post_process; } } if (ma_dr_wav__is_little_endian()) { framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); } else { framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut); } post_process: { if (pWav->container == ma_dr_wav_container_aiff && pWav->bitsPerSample == 8 && pWav->aiff.isUnsigned == MA_FALSE) { if (pBufferOut != NULL) { ma_uint64 iSample; for (iSample = 0; iSample < framesRead * pWav->channels; iSample += 1) { ((ma_uint8*)pBufferOut)[iSample] += 128; } } } } return framesRead; } MA_PRIVATE ma_bool32 ma_dr_wav_seek_to_first_pcm_frame(ma_dr_wav* pWav) { if (pWav->onWrite != NULL) { return MA_FALSE; } if (!pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos, ma_dr_wav_seek_origin_start)) { return MA_FALSE; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { MA_DR_WAV_ZERO_OBJECT(&pWav->msadpcm); } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { MA_DR_WAV_ZERO_OBJECT(&pWav->ima); } else { MA_DR_WAV_ASSERT(MA_FALSE); } } pWav->readCursorInPCMFrames = 0; pWav->bytesRemaining = pWav->dataChunkDataSize; return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex) { if (pWav == NULL || pWav->onSeek == NULL) { return MA_FALSE; } if (pWav->onWrite != NULL) { return MA_FALSE; } if (pWav->totalPCMFrameCount == 0) { return MA_TRUE; } if (targetFrameIndex > pWav->totalPCMFrameCount) { targetFrameIndex = pWav->totalPCMFrameCount; } if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) { if (targetFrameIndex < pWav->readCursorInPCMFrames) { if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) { return MA_FALSE; } } if (targetFrameIndex > pWav->readCursorInPCMFrames) { ma_uint64 offsetInFrames = targetFrameIndex - pWav->readCursorInPCMFrames; ma_int16 devnull[2048]; while (offsetInFrames > 0) { ma_uint64 framesRead = 0; ma_uint64 framesToRead = offsetInFrames; if (framesToRead > ma_dr_wav_countof(devnull)/pWav->channels) { framesToRead = ma_dr_wav_countof(devnull)/pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { framesRead = ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, devnull); } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { framesRead = ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, devnull); } else { MA_DR_WAV_ASSERT(MA_FALSE); } if (framesRead != framesToRead) { return MA_FALSE; } offsetInFrames -= framesRead; } } } else { ma_uint64 totalSizeInBytes; ma_uint64 currentBytePos; ma_uint64 targetBytePos; ma_uint64 offset; ma_uint32 bytesPerFrame; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return MA_FALSE; } totalSizeInBytes = pWav->totalPCMFrameCount * bytesPerFrame; currentBytePos = totalSizeInBytes - pWav->bytesRemaining; targetBytePos = targetFrameIndex * bytesPerFrame; if (currentBytePos < targetBytePos) { offset = (targetBytePos - currentBytePos); } else { if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) { return MA_FALSE; } offset = targetBytePos; } while (offset > 0) { int offset32 = ((offset > INT_MAX) ? INT_MAX : (int)offset); if (!pWav->onSeek(pWav->pUserData, offset32, ma_dr_wav_seek_origin_current)) { return MA_FALSE; } pWav->readCursorInPCMFrames += offset32 / bytesPerFrame; pWav->bytesRemaining -= offset32; offset -= offset32; } } return MA_TRUE; } MA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor) { if (pCursor == NULL) { return MA_INVALID_ARGS; } *pCursor = 0; if (pWav == NULL) { return MA_INVALID_ARGS; } *pCursor = pWav->readCursorInPCMFrames; return MA_SUCCESS; } MA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength) { if (pLength == NULL) { return MA_INVALID_ARGS; } *pLength = 0; if (pWav == NULL) { return MA_INVALID_ARGS; } *pLength = pWav->totalPCMFrameCount; return MA_SUCCESS; } MA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData) { size_t bytesWritten; if (pWav == NULL || bytesToWrite == 0 || pData == NULL) { return 0; } bytesWritten = pWav->onWrite(pWav->pUserData, pData, bytesToWrite); pWav->dataChunkDataSize += bytesWritten; return bytesWritten; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { ma_uint64 bytesToWrite; ma_uint64 bytesWritten; const ma_uint8* pRunningData; if (pWav == NULL || framesToWrite == 0 || pData == NULL) { return 0; } bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8); if (bytesToWrite > MA_SIZE_MAX) { return 0; } bytesWritten = 0; pRunningData = (const ma_uint8*)pData; while (bytesToWrite > 0) { size_t bytesJustWritten; ma_uint64 bytesToWriteThisIteration; bytesToWriteThisIteration = bytesToWrite; MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX); bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, pRunningData); if (bytesJustWritten == 0) { break; } bytesToWrite -= bytesJustWritten; bytesWritten += bytesJustWritten; pRunningData += bytesJustWritten; } return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { ma_uint64 bytesToWrite; ma_uint64 bytesWritten; ma_uint32 bytesPerSample; const ma_uint8* pRunningData; if (pWav == NULL || framesToWrite == 0 || pData == NULL) { return 0; } bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8); if (bytesToWrite > MA_SIZE_MAX) { return 0; } bytesWritten = 0; pRunningData = (const ma_uint8*)pData; bytesPerSample = ma_dr_wav_get_bytes_per_pcm_frame(pWav) / pWav->channels; if (bytesPerSample == 0) { return 0; } while (bytesToWrite > 0) { ma_uint8 temp[4096]; ma_uint32 sampleCount; size_t bytesJustWritten; ma_uint64 bytesToWriteThisIteration; bytesToWriteThisIteration = bytesToWrite; MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX); sampleCount = sizeof(temp)/bytesPerSample; if (bytesToWriteThisIteration > ((ma_uint64)sampleCount)*bytesPerSample) { bytesToWriteThisIteration = ((ma_uint64)sampleCount)*bytesPerSample; } MA_DR_WAV_COPY_MEMORY(temp, pRunningData, (size_t)bytesToWriteThisIteration); ma_dr_wav__bswap_samples(temp, sampleCount, bytesPerSample); bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, temp); if (bytesJustWritten == 0) { break; } bytesToWrite -= bytesJustWritten; bytesWritten += bytesJustWritten; pRunningData += bytesJustWritten; } return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels; } MA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData) { if (ma_dr_wav__is_little_endian()) { return ma_dr_wav_write_pcm_frames_le(pWav, framesToWrite, pData); } else { return ma_dr_wav_write_pcm_frames_be(pWav, framesToWrite, pData); } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead = 0; static ma_int32 adaptationTable[] = { 230, 230, 230, 230, 307, 409, 512, 614, 768, 614, 512, 409, 307, 230, 230, 230 }; static ma_int32 coeff1Table[] = { 256, 512, 0, 192, 240, 460, 392 }; static ma_int32 coeff2Table[] = { 0, -256, 0, 64, 0, -208, -232 }; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(framesToRead > 0); while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { MA_DR_WAV_ASSERT(framesToRead > 0); if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { ma_uint8 header[7]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); pWav->msadpcm.predictor[0] = header[0]; pWav->msadpcm.delta[0] = ma_dr_wav_bytes_to_s16(header + 1); pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 3); pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 5); pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.cachedFrameCount = 2; if (pWav->msadpcm.predictor[0] >= ma_dr_wav_countof(coeff1Table)) { return totalFramesRead; } } else { ma_uint8 header[14]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); pWav->msadpcm.predictor[0] = header[0]; pWav->msadpcm.predictor[1] = header[1]; pWav->msadpcm.delta[0] = ma_dr_wav_bytes_to_s16(header + 2); pWav->msadpcm.delta[1] = ma_dr_wav_bytes_to_s16(header + 4); pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 6); pWav->msadpcm.prevFrames[1][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 8); pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 10); pWav->msadpcm.prevFrames[1][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 12); pWav->msadpcm.cachedFrames[0] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[1] = pWav->msadpcm.prevFrames[1][0]; pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[1][1]; pWav->msadpcm.cachedFrameCount = 2; if (pWav->msadpcm.predictor[0] >= ma_dr_wav_countof(coeff1Table) || pWav->msadpcm.predictor[1] >= ma_dr_wav_countof(coeff2Table)) { return totalFramesRead; } } } while (framesToRead > 0 && pWav->msadpcm.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { if (pBufferOut != NULL) { ma_uint32 iSample = 0; for (iSample = 0; iSample < pWav->channels; iSample += 1) { pBufferOut[iSample] = (ma_int16)pWav->msadpcm.cachedFrames[(ma_dr_wav_countof(pWav->msadpcm.cachedFrames) - (pWav->msadpcm.cachedFrameCount*pWav->channels)) + iSample]; } pBufferOut += pWav->channels; } framesToRead -= 1; totalFramesRead += 1; pWav->readCursorInPCMFrames += 1; pWav->msadpcm.cachedFrameCount -= 1; } if (framesToRead == 0) { break; } if (pWav->msadpcm.cachedFrameCount == 0) { if (pWav->msadpcm.bytesRemainingInBlock == 0) { continue; } else { ma_uint8 nibbles; ma_int32 nibble0; ma_int32 nibble1; if (pWav->onRead(pWav->pUserData, &nibbles, 1) != 1) { return totalFramesRead; } pWav->msadpcm.bytesRemainingInBlock -= 1; nibble0 = ((nibbles & 0xF0) >> 4); if ((nibbles & 0x80)) { nibble0 |= 0xFFFFFFF0UL; } nibble1 = ((nibbles & 0x0F) >> 0); if ((nibbles & 0x08)) { nibble1 |= 0xFFFFFFF0UL; } if (pWav->channels == 1) { ma_int32 newSample0; ma_int32 newSample1; newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample0 += nibble0 * pWav->msadpcm.delta[0]; newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample0; newSample1 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample1 += nibble1 * pWav->msadpcm.delta[0]; newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample1; pWav->msadpcm.cachedFrames[2] = newSample0; pWav->msadpcm.cachedFrames[3] = newSample1; pWav->msadpcm.cachedFrameCount = 2; } else { ma_int32 newSample0; ma_int32 newSample1; newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8; newSample0 += nibble0 * pWav->msadpcm.delta[0]; newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767); pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8; if (pWav->msadpcm.delta[0] < 16) { pWav->msadpcm.delta[0] = 16; } pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.prevFrames[0][1] = newSample0; newSample1 = ((pWav->msadpcm.prevFrames[1][1] * coeff1Table[pWav->msadpcm.predictor[1]]) + (pWav->msadpcm.prevFrames[1][0] * coeff2Table[pWav->msadpcm.predictor[1]])) >> 8; newSample1 += nibble1 * pWav->msadpcm.delta[1]; newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767); pWav->msadpcm.delta[1] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[1]) >> 8; if (pWav->msadpcm.delta[1] < 16) { pWav->msadpcm.delta[1] = 16; } pWav->msadpcm.prevFrames[1][0] = pWav->msadpcm.prevFrames[1][1]; pWav->msadpcm.prevFrames[1][1] = newSample1; pWav->msadpcm.cachedFrames[2] = newSample0; pWav->msadpcm.cachedFrames[3] = newSample1; pWav->msadpcm.cachedFrameCount = 1; } } } } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead = 0; ma_uint32 iChannel; static ma_int32 indexTable[16] = { -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 }; static ma_int32 stepTable[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 }; MA_DR_WAV_ASSERT(pWav != NULL); MA_DR_WAV_ASSERT(framesToRead > 0); while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { MA_DR_WAV_ASSERT(framesToRead > 0); if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { ma_uint8 header[4]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); if (header[2] >= ma_dr_wav_countof(stepTable)) { pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current); pWav->ima.bytesRemainingInBlock = 0; return totalFramesRead; } pWav->ima.predictor[0] = (ma_int16)ma_dr_wav_bytes_to_u16(header + 0); pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[0]; pWav->ima.cachedFrameCount = 1; } else { ma_uint8 header[8]; if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) { return totalFramesRead; } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); if (header[2] >= ma_dr_wav_countof(stepTable) || header[6] >= ma_dr_wav_countof(stepTable)) { pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current); pWav->ima.bytesRemainingInBlock = 0; return totalFramesRead; } pWav->ima.predictor[0] = ma_dr_wav_bytes_to_s16(header + 0); pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.predictor[1] = ma_dr_wav_bytes_to_s16(header + 4); pWav->ima.stepIndex[1] = ma_dr_wav_clamp(header[6], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 2] = pWav->ima.predictor[0]; pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[1]; pWav->ima.cachedFrameCount = 1; } } while (framesToRead > 0 && pWav->ima.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) { if (pBufferOut != NULL) { ma_uint32 iSample; for (iSample = 0; iSample < pWav->channels; iSample += 1) { pBufferOut[iSample] = (ma_int16)pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + iSample]; } pBufferOut += pWav->channels; } framesToRead -= 1; totalFramesRead += 1; pWav->readCursorInPCMFrames += 1; pWav->ima.cachedFrameCount -= 1; } if (framesToRead == 0) { break; } if (pWav->ima.cachedFrameCount == 0) { if (pWav->ima.bytesRemainingInBlock == 0) { continue; } else { pWav->ima.cachedFrameCount = 8; for (iChannel = 0; iChannel < pWav->channels; ++iChannel) { ma_uint32 iByte; ma_uint8 nibbles[4]; if (pWav->onRead(pWav->pUserData, &nibbles, 4) != 4) { pWav->ima.cachedFrameCount = 0; return totalFramesRead; } pWav->ima.bytesRemainingInBlock -= 4; for (iByte = 0; iByte < 4; ++iByte) { ma_uint8 nibble0 = ((nibbles[iByte] & 0x0F) >> 0); ma_uint8 nibble1 = ((nibbles[iByte] & 0xF0) >> 4); ma_int32 step = stepTable[pWav->ima.stepIndex[iChannel]]; ma_int32 predictor = pWav->ima.predictor[iChannel]; ma_int32 diff = step >> 3; if (nibble0 & 1) diff += step >> 2; if (nibble0 & 2) diff += step >> 1; if (nibble0 & 4) diff += step; if (nibble0 & 8) diff = -diff; predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767); pWav->ima.predictor[iChannel] = predictor; pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble0], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+0)*pWav->channels + iChannel] = predictor; step = stepTable[pWav->ima.stepIndex[iChannel]]; predictor = pWav->ima.predictor[iChannel]; diff = step >> 3; if (nibble1 & 1) diff += step >> 2; if (nibble1 & 2) diff += step >> 1; if (nibble1 & 4) diff += step; if (nibble1 & 8) diff = -diff; predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767); pWav->ima.predictor[iChannel] = predictor; pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble1], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1); pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+1)*pWav->channels + iChannel] = predictor; } } } } } return totalFramesRead; } #ifndef MA_DR_WAV_NO_CONVERSION_API static unsigned short g_ma_dr_wavAlawTable[256] = { 0xEA80, 0xEB80, 0xE880, 0xE980, 0xEE80, 0xEF80, 0xEC80, 0xED80, 0xE280, 0xE380, 0xE080, 0xE180, 0xE680, 0xE780, 0xE480, 0xE580, 0xF540, 0xF5C0, 0xF440, 0xF4C0, 0xF740, 0xF7C0, 0xF640, 0xF6C0, 0xF140, 0xF1C0, 0xF040, 0xF0C0, 0xF340, 0xF3C0, 0xF240, 0xF2C0, 0xAA00, 0xAE00, 0xA200, 0xA600, 0xBA00, 0xBE00, 0xB200, 0xB600, 0x8A00, 0x8E00, 0x8200, 0x8600, 0x9A00, 0x9E00, 0x9200, 0x9600, 0xD500, 0xD700, 0xD100, 0xD300, 0xDD00, 0xDF00, 0xD900, 0xDB00, 0xC500, 0xC700, 0xC100, 0xC300, 0xCD00, 0xCF00, 0xC900, 0xCB00, 0xFEA8, 0xFEB8, 0xFE88, 0xFE98, 0xFEE8, 0xFEF8, 0xFEC8, 0xFED8, 0xFE28, 0xFE38, 0xFE08, 0xFE18, 0xFE68, 0xFE78, 0xFE48, 0xFE58, 0xFFA8, 0xFFB8, 0xFF88, 0xFF98, 0xFFE8, 0xFFF8, 0xFFC8, 0xFFD8, 0xFF28, 0xFF38, 0xFF08, 0xFF18, 0xFF68, 0xFF78, 0xFF48, 0xFF58, 0xFAA0, 0xFAE0, 0xFA20, 0xFA60, 0xFBA0, 0xFBE0, 0xFB20, 0xFB60, 0xF8A0, 0xF8E0, 0xF820, 0xF860, 0xF9A0, 0xF9E0, 0xF920, 0xF960, 0xFD50, 0xFD70, 0xFD10, 0xFD30, 0xFDD0, 0xFDF0, 0xFD90, 0xFDB0, 0xFC50, 0xFC70, 0xFC10, 0xFC30, 0xFCD0, 0xFCF0, 0xFC90, 0xFCB0, 0x1580, 0x1480, 0x1780, 0x1680, 0x1180, 0x1080, 0x1380, 0x1280, 0x1D80, 0x1C80, 0x1F80, 0x1E80, 0x1980, 0x1880, 0x1B80, 0x1A80, 0x0AC0, 0x0A40, 0x0BC0, 0x0B40, 0x08C0, 0x0840, 0x09C0, 0x0940, 0x0EC0, 0x0E40, 0x0FC0, 0x0F40, 0x0CC0, 0x0C40, 0x0DC0, 0x0D40, 0x5600, 0x5200, 0x5E00, 0x5A00, 0x4600, 0x4200, 0x4E00, 0x4A00, 0x7600, 0x7200, 0x7E00, 0x7A00, 0x6600, 0x6200, 0x6E00, 0x6A00, 0x2B00, 0x2900, 0x2F00, 0x2D00, 0x2300, 0x2100, 0x2700, 0x2500, 0x3B00, 0x3900, 0x3F00, 0x3D00, 0x3300, 0x3100, 0x3700, 0x3500, 0x0158, 0x0148, 0x0178, 0x0168, 0x0118, 0x0108, 0x0138, 0x0128, 0x01D8, 0x01C8, 0x01F8, 0x01E8, 0x0198, 0x0188, 0x01B8, 0x01A8, 0x0058, 0x0048, 0x0078, 0x0068, 0x0018, 0x0008, 0x0038, 0x0028, 0x00D8, 0x00C8, 0x00F8, 0x00E8, 0x0098, 0x0088, 0x00B8, 0x00A8, 0x0560, 0x0520, 0x05E0, 0x05A0, 0x0460, 0x0420, 0x04E0, 0x04A0, 0x0760, 0x0720, 0x07E0, 0x07A0, 0x0660, 0x0620, 0x06E0, 0x06A0, 0x02B0, 0x0290, 0x02F0, 0x02D0, 0x0230, 0x0210, 0x0270, 0x0250, 0x03B0, 0x0390, 0x03F0, 0x03D0, 0x0330, 0x0310, 0x0370, 0x0350 }; static unsigned short g_ma_dr_wavMulawTable[256] = { 0x8284, 0x8684, 0x8A84, 0x8E84, 0x9284, 0x9684, 0x9A84, 0x9E84, 0xA284, 0xA684, 0xAA84, 0xAE84, 0xB284, 0xB684, 0xBA84, 0xBE84, 0xC184, 0xC384, 0xC584, 0xC784, 0xC984, 0xCB84, 0xCD84, 0xCF84, 0xD184, 0xD384, 0xD584, 0xD784, 0xD984, 0xDB84, 0xDD84, 0xDF84, 0xE104, 0xE204, 0xE304, 0xE404, 0xE504, 0xE604, 0xE704, 0xE804, 0xE904, 0xEA04, 0xEB04, 0xEC04, 0xED04, 0xEE04, 0xEF04, 0xF004, 0xF0C4, 0xF144, 0xF1C4, 0xF244, 0xF2C4, 0xF344, 0xF3C4, 0xF444, 0xF4C4, 0xF544, 0xF5C4, 0xF644, 0xF6C4, 0xF744, 0xF7C4, 0xF844, 0xF8A4, 0xF8E4, 0xF924, 0xF964, 0xF9A4, 0xF9E4, 0xFA24, 0xFA64, 0xFAA4, 0xFAE4, 0xFB24, 0xFB64, 0xFBA4, 0xFBE4, 0xFC24, 0xFC64, 0xFC94, 0xFCB4, 0xFCD4, 0xFCF4, 0xFD14, 0xFD34, 0xFD54, 0xFD74, 0xFD94, 0xFDB4, 0xFDD4, 0xFDF4, 0xFE14, 0xFE34, 0xFE54, 0xFE74, 0xFE8C, 0xFE9C, 0xFEAC, 0xFEBC, 0xFECC, 0xFEDC, 0xFEEC, 0xFEFC, 0xFF0C, 0xFF1C, 0xFF2C, 0xFF3C, 0xFF4C, 0xFF5C, 0xFF6C, 0xFF7C, 0xFF88, 0xFF90, 0xFF98, 0xFFA0, 0xFFA8, 0xFFB0, 0xFFB8, 0xFFC0, 0xFFC8, 0xFFD0, 0xFFD8, 0xFFE0, 0xFFE8, 0xFFF0, 0xFFF8, 0x0000, 0x7D7C, 0x797C, 0x757C, 0x717C, 0x6D7C, 0x697C, 0x657C, 0x617C, 0x5D7C, 0x597C, 0x557C, 0x517C, 0x4D7C, 0x497C, 0x457C, 0x417C, 0x3E7C, 0x3C7C, 0x3A7C, 0x387C, 0x367C, 0x347C, 0x327C, 0x307C, 0x2E7C, 0x2C7C, 0x2A7C, 0x287C, 0x267C, 0x247C, 0x227C, 0x207C, 0x1EFC, 0x1DFC, 0x1CFC, 0x1BFC, 0x1AFC, 0x19FC, 0x18FC, 0x17FC, 0x16FC, 0x15FC, 0x14FC, 0x13FC, 0x12FC, 0x11FC, 0x10FC, 0x0FFC, 0x0F3C, 0x0EBC, 0x0E3C, 0x0DBC, 0x0D3C, 0x0CBC, 0x0C3C, 0x0BBC, 0x0B3C, 0x0ABC, 0x0A3C, 0x09BC, 0x093C, 0x08BC, 0x083C, 0x07BC, 0x075C, 0x071C, 0x06DC, 0x069C, 0x065C, 0x061C, 0x05DC, 0x059C, 0x055C, 0x051C, 0x04DC, 0x049C, 0x045C, 0x041C, 0x03DC, 0x039C, 0x036C, 0x034C, 0x032C, 0x030C, 0x02EC, 0x02CC, 0x02AC, 0x028C, 0x026C, 0x024C, 0x022C, 0x020C, 0x01EC, 0x01CC, 0x01AC, 0x018C, 0x0174, 0x0164, 0x0154, 0x0144, 0x0134, 0x0124, 0x0114, 0x0104, 0x00F4, 0x00E4, 0x00D4, 0x00C4, 0x00B4, 0x00A4, 0x0094, 0x0084, 0x0078, 0x0070, 0x0068, 0x0060, 0x0058, 0x0050, 0x0048, 0x0040, 0x0038, 0x0030, 0x0028, 0x0020, 0x0018, 0x0010, 0x0008, 0x0000 }; static MA_INLINE ma_int16 ma_dr_wav__alaw_to_s16(ma_uint8 sampleIn) { return (short)g_ma_dr_wavAlawTable[sampleIn]; } static MA_INLINE ma_int16 ma_dr_wav__mulaw_to_s16(ma_uint8 sampleIn) { return (short)g_ma_dr_wavMulawTable[sampleIn]; } MA_PRIVATE void ma_dr_wav__pcm_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { size_t i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_s16(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 2) { for (i = 0; i < totalSampleCount; ++i) { *pOut++ = ((const ma_int16*)pIn)[i]; } return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_s16(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 4) { ma_dr_wav_s32_to_s16(pOut, (const ma_int32*)pIn, totalSampleCount); return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } for (i = 0; i < totalSampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (ma_int16)((ma_int64)sample >> 48); } } MA_PRIVATE void ma_dr_wav__ieee_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { ma_dr_wav_f32_to_s16(pOut, (const float*)pIn, totalSampleCount); return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_s16(pOut, (const double*)pIn, totalSampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if ((pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 16) || pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(ma_int16) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(ma_int16) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_s16__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_s16__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_s16__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_s16__mulaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) { return ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = pIn[i]; r = x << 8; r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = ((int)(((unsigned int)(((const ma_uint8*)pIn)[i*3+0]) << 8) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+1]) << 16) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+2])) << 24)) >> 8; r = x >> 8; pOut[i] = (short)r; } } MA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { int x = pIn[i]; r = x >> 16; pOut[i] = (short)r; } } MA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { float x = pIn[i]; float c; c = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); c = c + 1; r = (int)(c * 32767.5f); r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount) { int r; size_t i; for (i = 0; i < sampleCount; ++i) { double x = pIn[i]; double c; c = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); c = c + 1; r = (int)(c * 32767.5); r = r - 32768; pOut[i] = (short)r; } } MA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; for (i = 0; i < sampleCount; ++i) { pOut[i] = ma_dr_wav__alaw_to_s16(pIn[i]); } } MA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; for (i = 0; i < sampleCount; ++i) { pOut[i] = ma_dr_wav__mulaw_to_s16(pIn[i]); } } MA_PRIVATE void ma_dr_wav__pcm_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { unsigned int i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_f32(pOut, pIn, sampleCount); return; } if (bytesPerSample == 2) { ma_dr_wav_s16_to_f32(pOut, (const ma_int16*)pIn, sampleCount); return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_f32(pOut, pIn, sampleCount); return; } if (bytesPerSample == 4) { ma_dr_wav_s32_to_f32(pOut, (const ma_int32*)pIn, sampleCount); return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut)); return; } for (i = 0; i < sampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (float)((ma_int64)sample / 9223372036854775807.0); } } MA_PRIVATE void ma_dr_wav__ieee_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { unsigned int i; for (i = 0; i < sampleCount; ++i) { *pOut++ = ((const float*)pIn)[i]; } return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_f32(pOut, (const double*)pIn, sampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_int16 samples16[2048]; totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); ma_dr_wav_s16_to_f32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels)); pBufferOut += framesRead*pWav->channels; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT && pWav->bitsPerSample == 32) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(float) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(float) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_f32__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_f32__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_f32__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_f32__mulaw(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT for (i = 0; i < sampleCount; ++i) { *pOut++ = (pIn[i] / 256.0f) * 2 - 1; } #else for (i = 0; i < sampleCount; ++i) { float x = pIn[i]; x = x * 0.00784313725490196078f; x = x - 1; *pOut++ = x; } #endif } MA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = pIn[i] * 0.000030517578125f; } } MA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { double x; ma_uint32 a = ((ma_uint32)(pIn[i*3+0]) << 8); ma_uint32 b = ((ma_uint32)(pIn[i*3+1]) << 16); ma_uint32 c = ((ma_uint32)(pIn[i*3+2]) << 24); x = (double)((ma_int32)(a | b | c) >> 8); *pOut++ = (float)(x * 0.00000011920928955078125); } } MA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (float)(pIn[i] / 2147483648.0); } } MA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (float)pIn[i]; } } MA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ma_dr_wav__alaw_to_s16(pIn[i]) / 32768.0f; } } MA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ma_dr_wav__mulaw_to_s16(pIn[i]) / 32768.0f; } } MA_PRIVATE void ma_dr_wav__pcm_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { unsigned int i; if (bytesPerSample == 1) { ma_dr_wav_u8_to_s32(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 2) { ma_dr_wav_s16_to_s32(pOut, (const ma_int16*)pIn, totalSampleCount); return; } if (bytesPerSample == 3) { ma_dr_wav_s24_to_s32(pOut, pIn, totalSampleCount); return; } if (bytesPerSample == 4) { for (i = 0; i < totalSampleCount; ++i) { *pOut++ = ((const ma_int32*)pIn)[i]; } return; } if (bytesPerSample > 8) { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } for (i = 0; i < totalSampleCount; ++i) { ma_uint64 sample = 0; unsigned int shift = (8 - bytesPerSample) * 8; unsigned int j; for (j = 0; j < bytesPerSample; j += 1) { MA_DR_WAV_ASSERT(j < 8); sample |= (ma_uint64)(pIn[j]) << shift; shift += 8; } pIn += j; *pOut++ = (ma_int32)((ma_int64)sample >> 32); } } MA_PRIVATE void ma_dr_wav__ieee_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { ma_dr_wav_f32_to_s32(pOut, (const float*)pIn, totalSampleCount); return; } else if (bytesPerSample == 8) { ma_dr_wav_f64_to_s32(pOut, (const double*)pIn, totalSampleCount); return; } else { MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut)); return; } } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 32) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut); } bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__pcm_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead = 0; ma_int16 samples16[2048]; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); ma_dr_wav_s16_to_s32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels)); pBufferOut += framesRead*pWav->channels; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav__ieee_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample); pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_alaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 totalFramesRead; ma_uint8 sampleData[4096] = {0}; ma_uint32 bytesPerFrame; ma_uint32 bytesPerSample; ma_uint64 samplesRead; bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } bytesPerSample = bytesPerFrame / pWav->channels; if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) { return 0; } totalFramesRead = 0; while (framesToRead > 0) { ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame); ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData); if (framesRead == 0) { break; } MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration); samplesRead = framesRead * pWav->channels; if ((samplesRead * bytesPerSample) > sizeof(sampleData)) { MA_DR_WAV_ASSERT(MA_FALSE); break; } ma_dr_wav_mulaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead); #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT { if (pWav->container == ma_dr_wav_container_aiff) { ma_uint64 iSample; for (iSample = 0; iSample < samplesRead; iSample += 1) { pBufferOut[iSample] = -pBufferOut[iSample]; } } } #endif pBufferOut += samplesRead; framesToRead -= framesRead; totalFramesRead += framesRead; } return totalFramesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { if (pWav == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL); } if (framesToRead * pWav->channels * sizeof(ma_int32) > MA_SIZE_MAX) { framesToRead = MA_SIZE_MAX / sizeof(ma_int32) / pWav->channels; } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) { return ma_dr_wav_read_pcm_frames_s32__pcm(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) { return ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) { return ma_dr_wav_read_pcm_frames_s32__ieee(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) { return ma_dr_wav_read_pcm_frames_s32__alaw(pWav, framesToRead, pBufferOut); } if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) { return ma_dr_wav_read_pcm_frames_s32__mulaw(pWav, framesToRead, pBufferOut); } return 0; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) { ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) { ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } return framesRead; } MA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ((int)pIn[i] - 128) << 24; } } MA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = pIn[i] << 16; } } MA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { unsigned int s0 = pIn[i*3 + 0]; unsigned int s1 = pIn[i*3 + 1]; unsigned int s2 = pIn[i*3 + 2]; ma_int32 sample32 = (ma_int32)((s0 << 8) | (s1 << 16) | (s2 << 24)); *pOut++ = sample32; } } MA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (ma_int32)(2147483648.0f * pIn[i]); } } MA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = (ma_int32)(2147483648.0 * pIn[i]); } } MA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i = 0; i < sampleCount; ++i) { *pOut++ = ((ma_int32)ma_dr_wav__alaw_to_s16(pIn[i])) << 16; } } MA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount) { size_t i; if (pOut == NULL || pIn == NULL) { return; } for (i= 0; i < sampleCount; ++i) { *pOut++ = ((ma_int32)ma_dr_wav__mulaw_to_s16(pIn[i])) << 16; } } MA_PRIVATE ma_int16* ma_dr_wav__read_pcm_frames_and_close_s16(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; ma_int16* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int16); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (ma_int16*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_PRIVATE float* ma_dr_wav__read_pcm_frames_and_close_f32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; float* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(float); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (float*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_PRIVATE ma_int32* ma_dr_wav__read_pcm_frames_and_close_s32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount) { ma_uint64 sampleDataSize; ma_int32* pSampleData; ma_uint64 framesRead; MA_DR_WAV_ASSERT(pWav != NULL); sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int32); if (sampleDataSize > MA_SIZE_MAX) { ma_dr_wav_uninit(pWav); return NULL; } pSampleData = (ma_int32*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks); if (pSampleData == NULL) { ma_dr_wav_uninit(pWav); return NULL; } framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData); if (framesRead != pWav->totalPCMFrameCount) { ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks); ma_dr_wav_uninit(pWav); return NULL; } ma_dr_wav_uninit(pWav); if (sampleRate) { *sampleRate = pWav->sampleRate; } if (channels) { *channels = pWav->channels; } if (totalFrameCount) { *totalFrameCount = pWav->totalPCMFrameCount; } return pSampleData; } MA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #ifndef MA_DR_WAV_NO_STDIO MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #ifndef MA_DR_WAV_NO_WCHAR MA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (sampleRateOut) { *sampleRateOut = 0; } if (channelsOut) { *channelsOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #endif #endif MA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } MA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_wav wav; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalFrameCountOut) { *totalFrameCountOut = 0; } if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut); } #endif MA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_wav__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_wav__free_default(p, NULL); } } MA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data) { return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8); } MA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data) { return (ma_int16)ma_dr_wav_bytes_to_u16(data); } MA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data) { return ma_dr_wav_bytes_to_u32_le(data); } MA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data) { union { ma_uint32 u32; float f32; } value; value.u32 = ma_dr_wav_bytes_to_u32(data); return value.f32; } MA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data) { return (ma_int32)ma_dr_wav_bytes_to_u32(data); } MA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data) { return ((ma_uint64)data[0] << 0) | ((ma_uint64)data[1] << 8) | ((ma_uint64)data[2] << 16) | ((ma_uint64)data[3] << 24) | ((ma_uint64)data[4] << 32) | ((ma_uint64)data[5] << 40) | ((ma_uint64)data[6] << 48) | ((ma_uint64)data[7] << 56); } MA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data) { return (ma_int64)ma_dr_wav_bytes_to_u64(data); } MA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16]) { int i; for (i = 0; i < 16; i += 1) { if (a[i] != b[i]) { return MA_FALSE; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b) { return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3]; } #ifdef __MRC__ #pragma options opt reset #endif #endif /* dr_wav_c end */ #endif /* MA_DR_WAV_IMPLEMENTATION */ #endif /* MA_NO_WAV */ #if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING) #if !defined(MA_DR_FLAC_IMPLEMENTATION) /* dr_flac_c begin */ #ifndef ma_dr_flac_c #define ma_dr_flac_c #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #endif #ifdef __linux__ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #ifndef __USE_BSD #define __USE_BSD #endif #include #endif #include #include #if !defined(MA_DR_FLAC_NO_SIMD) #if defined(MA_X64) || defined(MA_X86) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 && !defined(MA_DR_FLAC_NO_SSE2) #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if _MSC_VER >= 1600 && !defined(MA_DR_FLAC_NO_SSE41) #define MA_DR_FLAC_SUPPORT_SSE41 #endif #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) #if defined(__SSE2__) && !defined(MA_DR_FLAC_NO_SSE2) #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if defined(__SSE4_1__) && !defined(MA_DR_FLAC_NO_SSE41) #define MA_DR_FLAC_SUPPORT_SSE41 #endif #endif #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include) #if !defined(MA_DR_FLAC_SUPPORT_SSE2) && !defined(MA_DR_FLAC_NO_SSE2) && __has_include() #define MA_DR_FLAC_SUPPORT_SSE2 #endif #if !defined(MA_DR_FLAC_SUPPORT_SSE41) && !defined(MA_DR_FLAC_NO_SSE41) && __has_include() #define MA_DR_FLAC_SUPPORT_SSE41 #endif #endif #if defined(MA_DR_FLAC_SUPPORT_SSE41) #include #elif defined(MA_DR_FLAC_SUPPORT_SSE2) #include #endif #endif #if defined(MA_ARM) #if !defined(MA_DR_FLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) #define MA_DR_FLAC_SUPPORT_NEON #include #endif #endif #endif #if !defined(MA_DR_FLAC_NO_SIMD) && (defined(MA_X86) || defined(MA_X64)) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 #include static void ma_dr_flac__cpuid(int info[4], int fid) { __cpuid(info, fid); } #else #define MA_DR_FLAC_NO_CPUID #endif #else #if defined(__GNUC__) || defined(__clang__) static void ma_dr_flac__cpuid(int info[4], int fid) { #if defined(MA_X86) && defined(__PIC__) __asm__ __volatile__ ( "xchg{l} {%%}ebx, %k1;" "cpuid;" "xchg{l} {%%}ebx, %k1;" : "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #else __asm__ __volatile__ ( "cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #endif } #else #define MA_DR_FLAC_NO_CPUID #endif #endif #else #define MA_DR_FLAC_NO_CPUID #endif static MA_INLINE ma_bool32 ma_dr_flac_has_sse2(void) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE2) #if defined(MA_X64) return MA_TRUE; #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__) return MA_TRUE; #else #if defined(MA_DR_FLAC_NO_CPUID) return MA_FALSE; #else int info[4]; ma_dr_flac__cpuid(info, 1); return (info[3] & (1 << 26)) != 0; #endif #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } static MA_INLINE ma_bool32 ma_dr_flac_has_sse41(void) { #if defined(MA_DR_FLAC_SUPPORT_SSE41) #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE41) #if defined(__SSE4_1__) || defined(__AVX__) return MA_TRUE; #else #if defined(MA_DR_FLAC_NO_CPUID) return MA_FALSE; #else int info[4]; ma_dr_flac__cpuid(info, 1); return (info[2] & (1 << 19)) != 0; #endif #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } #if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(MA_X86) || defined(MA_X64)) && !defined(__clang__) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_clzll) || __has_builtin(__builtin_clzl) #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC #endif #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__clang__) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_bswap16) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #endif #if __has_builtin(__builtin_bswap32) #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #endif #if __has_builtin(__builtin_bswap64) #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #endif #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #endif #elif defined(__WATCOMC__) && defined(__386__) #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC extern __inline ma_uint16 _watcom_bswap16(ma_uint16); extern __inline ma_uint32 _watcom_bswap32(ma_uint32); extern __inline ma_uint64 _watcom_bswap64(ma_uint64); #pragma aux _watcom_bswap16 = \ "xchg al, ah" \ parm [ax] \ value [ax] \ modify nomemory; #pragma aux _watcom_bswap32 = \ "bswap eax" \ parm [eax] \ value [eax] \ modify nomemory; #pragma aux _watcom_bswap64 = \ "bswap eax" \ "bswap edx" \ "xchg eax,edx" \ parm [eax edx] \ value [eax edx] \ modify nomemory; #endif #ifndef MA_DR_FLAC_ASSERT #include #define MA_DR_FLAC_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_FLAC_MALLOC #define MA_DR_FLAC_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_FLAC_REALLOC #define MA_DR_FLAC_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_FLAC_FREE #define MA_DR_FLAC_FREE(p) free((p)) #endif #ifndef MA_DR_FLAC_COPY_MEMORY #define MA_DR_FLAC_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_FLAC_ZERO_MEMORY #define MA_DR_FLAC_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #ifndef MA_DR_FLAC_ZERO_OBJECT #define MA_DR_FLAC_ZERO_OBJECT(p) MA_DR_FLAC_ZERO_MEMORY((p), sizeof(*(p))) #endif #define MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE 64 #define MA_DR_FLAC_SUBFRAME_CONSTANT 0 #define MA_DR_FLAC_SUBFRAME_VERBATIM 1 #define MA_DR_FLAC_SUBFRAME_FIXED 8 #define MA_DR_FLAC_SUBFRAME_LPC 32 #define MA_DR_FLAC_SUBFRAME_RESERVED 255 #define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE 0 #define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2 1 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT 0 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE 8 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE 9 #define MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE 10 #define MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES 18 #define MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES 36 #define MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES 12 #define ma_dr_flac_align(x, a) ((((x) + (a) - 1) / (a)) * (a)) MA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_FLAC_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_FLAC_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_FLAC_VERSION_REVISION; } } MA_API const char* ma_dr_flac_version_string(void) { return MA_DR_FLAC_VERSION_STRING; } #if defined(__has_feature) #if __has_feature(thread_sanitizer) #define MA_DR_FLAC_NO_THREAD_SANITIZE __attribute__((no_sanitize("thread"))) #else #define MA_DR_FLAC_NO_THREAD_SANITIZE #endif #else #define MA_DR_FLAC_NO_THREAD_SANITIZE #endif #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) static ma_bool32 ma_dr_flac__gIsLZCNTSupported = MA_FALSE; #endif #ifndef MA_DR_FLAC_NO_CPUID static ma_bool32 ma_dr_flac__gIsSSE2Supported = MA_FALSE; static ma_bool32 ma_dr_flac__gIsSSE41Supported = MA_FALSE; MA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void) { static ma_bool32 isCPUCapsInitialized = MA_FALSE; if (!isCPUCapsInitialized) { #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) int info[4] = {0}; ma_dr_flac__cpuid(info, 0x80000001); ma_dr_flac__gIsLZCNTSupported = (info[2] & (1 << 5)) != 0; #endif ma_dr_flac__gIsSSE2Supported = ma_dr_flac_has_sse2(); ma_dr_flac__gIsSSE41Supported = ma_dr_flac_has_sse41(); isCPUCapsInitialized = MA_TRUE; } } #else static ma_bool32 ma_dr_flac__gIsNEONSupported = MA_FALSE; static MA_INLINE ma_bool32 ma_dr_flac__has_neon(void) { #if defined(MA_DR_FLAC_SUPPORT_NEON) #if defined(MA_ARM) && !defined(MA_DR_FLAC_NO_NEON) #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) return MA_TRUE; #else return MA_FALSE; #endif #else return MA_FALSE; #endif #else return MA_FALSE; #endif } MA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void) { ma_dr_flac__gIsNEONSupported = ma_dr_flac__has_neon(); #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) ma_dr_flac__gIsLZCNTSupported = MA_TRUE; #endif } #endif static MA_INLINE ma_bool32 ma_dr_flac__is_little_endian(void) { #if defined(MA_X86) || defined(MA_X64) return MA_TRUE; #elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN return MA_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static MA_INLINE ma_uint16 ma_dr_flac__swap_endian_uint16(ma_uint16 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); #endif } static MA_INLINE ma_uint32 ma_dr_flac__swap_endian_uint32(ma_uint32 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT) ma_uint32 r; __asm__ __volatile__ ( #if defined(MA_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap32(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } static MA_INLINE ma_uint64 ma_dr_flac__swap_endian_uint64(ma_uint64 n) { #ifdef MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) | ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) | ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) | ((n & ((ma_uint64)0x000000FF << 32)) >> 8) | ((n & ((ma_uint64)0xFF000000 )) << 8) | ((n & ((ma_uint64)0x00FF0000 )) << 24) | ((n & ((ma_uint64)0x0000FF00 )) << 40) | ((n & ((ma_uint64)0x000000FF )) << 56); #endif } static MA_INLINE ma_uint16 ma_dr_flac__be2host_16(ma_uint16 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint16(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__be2host_32(ma_uint32 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint32(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__be2host_32_ptr_unaligned(const void* pData) { const ma_uint8* pNum = (ma_uint8*)pData; return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3); } static MA_INLINE ma_uint64 ma_dr_flac__be2host_64(ma_uint64 n) { if (ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint64(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__le2host_32(ma_uint32 n) { if (!ma_dr_flac__is_little_endian()) { return ma_dr_flac__swap_endian_uint32(n); } return n; } static MA_INLINE ma_uint32 ma_dr_flac__le2host_32_ptr_unaligned(const void* pData) { const ma_uint8* pNum = (ma_uint8*)pData; return *pNum | *(pNum+1) << 8 | *(pNum+2) << 16 | *(pNum+3) << 24; } static MA_INLINE ma_uint32 ma_dr_flac__unsynchsafe_32(ma_uint32 n) { ma_uint32 result = 0; result |= (n & 0x7F000000) >> 3; result |= (n & 0x007F0000) >> 2; result |= (n & 0x00007F00) >> 1; result |= (n & 0x0000007F) >> 0; return result; } static ma_uint8 ma_dr_flac__crc8_table[] = { 0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15, 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D, 0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65, 0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D, 0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5, 0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD, 0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85, 0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD, 0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2, 0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA, 0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2, 0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A, 0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32, 0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A, 0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42, 0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A, 0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C, 0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4, 0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC, 0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4, 0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C, 0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44, 0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C, 0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34, 0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B, 0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63, 0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B, 0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13, 0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB, 0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83, 0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB, 0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3 }; static ma_uint16 ma_dr_flac__crc16_table[] = { 0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011, 0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022, 0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072, 0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041, 0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2, 0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1, 0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1, 0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082, 0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192, 0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1, 0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1, 0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2, 0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151, 0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162, 0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132, 0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101, 0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312, 0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321, 0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371, 0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342, 0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1, 0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2, 0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2, 0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381, 0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291, 0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2, 0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2, 0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1, 0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252, 0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261, 0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231, 0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202 }; static MA_INLINE ma_uint8 ma_dr_flac_crc8_byte(ma_uint8 crc, ma_uint8 data) { return ma_dr_flac__crc8_table[crc ^ data]; } static MA_INLINE ma_uint8 ma_dr_flac_crc8(ma_uint8 crc, ma_uint32 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 ma_uint8 p = 0x07; for (int i = count-1; i >= 0; --i) { ma_uint8 bit = (data & (1 << i)) >> i; if (crc & 0x80) { crc = ((crc << 1) | bit) ^ p; } else { crc = ((crc << 1) | bit); } } return crc; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 32); wholeBytes = count >> 3; leftoverBits = count - (wholeBytes*8); leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { case 4: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (ma_uint8)((crc << leftoverBits) ^ ma_dr_flac__crc8_table[(crc >> (8 - leftoverBits)) ^ (data & leftoverDataMask)]); } return crc; #endif #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16_byte(ma_uint16 crc, ma_uint8 data) { return (crc << 8) ^ ma_dr_flac__crc16_table[(ma_uint8)(crc >> 8) ^ data]; } static MA_INLINE ma_uint16 ma_dr_flac_crc16_cache(ma_uint16 crc, ma_dr_flac_cache_t data) { #ifdef MA_64BIT crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF)); #endif crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 8) & 0xFF)); crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 0) & 0xFF)); return crc; } static MA_INLINE ma_uint16 ma_dr_flac_crc16_bytes(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 byteCount) { switch (byteCount) { #ifdef MA_64BIT case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF)); case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF)); case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF)); case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF)); #endif case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF)); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF)); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 8) & 0xFF)); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 0) & 0xFF)); } return crc; } #if 0 static MA_INLINE ma_uint16 ma_dr_flac_crc16__32bit(ma_uint16 crc, ma_uint32 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 ma_uint16 p = 0x8005; for (int i = count-1; i >= 0; --i) { ma_uint16 bit = (data & (1ULL << i)) >> i; if (r & 0x8000) { r = ((r << 1) | bit) ^ p; } else { r = ((r << 1) | bit); } } return crc; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16__64bit(ma_uint16 crc, ma_uint64 data, ma_uint32 count) { #ifdef MA_DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else ma_uint32 wholeBytes; ma_uint32 leftoverBits; ma_uint64 leftoverDataMask; static ma_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; MA_DR_FLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000 << 32) << leftoverBits)) >> (56 + leftoverBits))); case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000 << 32) << leftoverBits)) >> (48 + leftoverBits))); case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00 << 32) << leftoverBits)) >> (40 + leftoverBits))); case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF << 32) << leftoverBits)) >> (32 + leftoverBits))); case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000 ) << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000 ) << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00 ) << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF ) << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif } static MA_INLINE ma_uint16 ma_dr_flac_crc16(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 count) { #ifdef MA_64BIT return ma_dr_flac_crc16__64bit(crc, data, count); #else return ma_dr_flac_crc16__32bit(crc, data, count); #endif } #endif #ifdef MA_64BIT #define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_64 #else #define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_32 #endif #define MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) (sizeof((bs)->cache)) #define MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) (sizeof((bs)->cache)*8) #define MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (bs)->consumedBits) #define MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount) (~((~(ma_dr_flac_cache_t)0) >> (_bitCount))) #define MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, _bitCount) (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (_bitCount)) #define MA_DR_FLAC_CACHE_L1_SELECT(bs, _bitCount) (((bs)->cache) & MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount)) #define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, _bitCount) (MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount))) #define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, _bitCount)(MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount)) & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1))) #define MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs) (sizeof((bs)->cacheL2)) #define MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) (MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs) / sizeof((bs)->cacheL2[0])) #define MA_DR_FLAC_CACHE_L2_LINES_REMAINING(bs) (MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - (bs)->nextL2Line) #ifndef MA_DR_FLAC_NO_CRC static MA_INLINE void ma_dr_flac__reset_crc16(ma_dr_flac_bs* bs) { bs->crc16 = 0; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } static MA_INLINE void ma_dr_flac__update_crc16(ma_dr_flac_bs* bs) { if (bs->crc16CacheIgnoredBytes == 0) { bs->crc16 = ma_dr_flac_crc16_cache(bs->crc16, bs->crc16Cache); } else { bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache, MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bs->crc16CacheIgnoredBytes); bs->crc16CacheIgnoredBytes = 0; } } static MA_INLINE ma_uint16 ma_dr_flac__flush_crc16(ma_dr_flac_bs* bs) { MA_DR_FLAC_ASSERT((MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7) == 0); if (MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) == 0) { ma_dr_flac__update_crc16(bs); } else { bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache >> MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs), (bs->consumedBits >> 3) - bs->crc16CacheIgnoredBytes); bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } return bs->crc16; } #endif static MA_INLINE ma_bool32 ma_dr_flac__reload_l1_cache_from_l2(ma_dr_flac_bs* bs) { size_t bytesRead; size_t alignedL1LineCount; if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } if (bs->unalignedByteCount > 0) { return MA_FALSE; } bytesRead = bs->onRead(bs->pUserData, bs->cacheL2, MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)); bs->nextL2Line = 0; if (bytesRead == MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } alignedL1LineCount = bytesRead / MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs); bs->unalignedByteCount = bytesRead - (alignedL1LineCount * MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs)); if (bs->unalignedByteCount > 0) { bs->unalignedCache = bs->cacheL2[alignedL1LineCount]; } if (alignedL1LineCount > 0) { size_t offset = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - alignedL1LineCount; size_t i; for (i = alignedL1LineCount; i > 0; --i) { bs->cacheL2[i-1 + offset] = bs->cacheL2[i-1]; } bs->nextL2Line = (ma_uint32)offset; bs->cache = bs->cacheL2[bs->nextL2Line++]; return MA_TRUE; } else { bs->nextL2Line = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs); return MA_FALSE; } } static ma_bool32 ma_dr_flac__reload_cache(ma_dr_flac_bs* bs) { size_t bytesRead; #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif if (ma_dr_flac__reload_l1_cache_from_l2(bs)) { bs->cache = ma_dr_flac__be2host__cache_line(bs->cache); bs->consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif return MA_TRUE; } bytesRead = bs->unalignedByteCount; if (bytesRead == 0) { bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); return MA_FALSE; } MA_DR_FLAC_ASSERT(bytesRead < MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs)); bs->consumedBits = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bytesRead) * 8; bs->cache = ma_dr_flac__be2host__cache_line(bs->unalignedCache); bs->cache &= MA_DR_FLAC_CACHE_L1_SELECTION_MASK(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)); bs->unalignedByteCount = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache >> bs->consumedBits; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; #endif return MA_TRUE; } static void ma_dr_flac__reset_cache(ma_dr_flac_bs* bs) { bs->nextL2Line = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs); bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); bs->cache = 0; bs->unalignedByteCount = 0; bs->unalignedCache = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = 0; bs->crc16CacheIgnoredBytes = 0; #endif } static MA_INLINE ma_bool32 ma_dr_flac__read_uint32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint32* pResultOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResultOut != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 32); if (bs->consumedBits == MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } if (bitCount <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { #ifdef MA_64BIT *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; #else if (bitCount < MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; } else { *pResultOut = (ma_uint32)bs->cache; bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); bs->cache = 0; } #endif return MA_TRUE; } else { ma_uint32 bitCountHi = MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); ma_uint32 bitCountLo = bitCount - bitCountHi; ma_uint32 resultHi; MA_DR_FLAC_ASSERT(bitCountHi > 0); MA_DR_FLAC_ASSERT(bitCountHi < 32); resultHi = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } *pResultOut = (resultHi << bitCountLo) | (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; return MA_TRUE; } } static ma_bool32 ma_dr_flac__read_int32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int32* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 32); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } if (bitCount < 32) { ma_uint32 signbit; signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; } *pResult = (ma_int32)result; return MA_TRUE; } #ifdef MA_64BIT static ma_bool32 ma_dr_flac__read_uint64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint64* pResultOut) { ma_uint32 resultHi; ma_uint32 resultLo; MA_DR_FLAC_ASSERT(bitCount <= 64); MA_DR_FLAC_ASSERT(bitCount > 32); if (!ma_dr_flac__read_uint32(bs, bitCount - 32, &resultHi)) { return MA_FALSE; } if (!ma_dr_flac__read_uint32(bs, 32, &resultLo)) { return MA_FALSE; } *pResultOut = (((ma_uint64)resultHi) << 32) | ((ma_uint64)resultLo); return MA_TRUE; } #endif #if 0 static ma_bool32 ma_dr_flac__read_int64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int64* pResultOut) { ma_uint64 result; ma_uint64 signbit; MA_DR_FLAC_ASSERT(bitCount <= 64); if (!ma_dr_flac__read_uint64(bs, bitCount, &result)) { return MA_FALSE; } signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; *pResultOut = (ma_int64)result; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__read_uint16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint16* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 16); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_uint16)result; return MA_TRUE; } #if 0 static ma_bool32 ma_dr_flac__read_int16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int16* pResult) { ma_int32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 16); if (!ma_dr_flac__read_int32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_int16)result; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__read_uint8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint8* pResult) { ma_uint32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 8); if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_uint8)result; return MA_TRUE; } static ma_bool32 ma_dr_flac__read_int8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int8* pResult) { ma_int32 result; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pResult != NULL); MA_DR_FLAC_ASSERT(bitCount > 0); MA_DR_FLAC_ASSERT(bitCount <= 8); if (!ma_dr_flac__read_int32(bs, bitCount, &result)) { return MA_FALSE; } *pResult = (ma_int8)result; return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_bits(ma_dr_flac_bs* bs, size_t bitsToSeek) { if (bitsToSeek <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { bs->consumedBits += (ma_uint32)bitsToSeek; bs->cache <<= bitsToSeek; return MA_TRUE; } else { bitsToSeek -= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); bs->consumedBits += MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); bs->cache = 0; #ifdef MA_64BIT while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { ma_uint64 bin; if (!ma_dr_flac__read_uint64(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return MA_FALSE; } bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); } #else while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) { ma_uint32 bin; if (!ma_dr_flac__read_uint32(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return MA_FALSE; } bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); } #endif while (bitsToSeek >= 8) { ma_uint8 bin; if (!ma_dr_flac__read_uint8(bs, 8, &bin)) { return MA_FALSE; } bitsToSeek -= 8; } if (bitsToSeek > 0) { ma_uint8 bin; if (!ma_dr_flac__read_uint8(bs, (ma_uint32)bitsToSeek, &bin)) { return MA_FALSE; } bitsToSeek = 0; } MA_DR_FLAC_ASSERT(bitsToSeek == 0); return MA_TRUE; } } static ma_bool32 ma_dr_flac__find_and_seek_to_next_sync_code(ma_dr_flac_bs* bs) { MA_DR_FLAC_ASSERT(bs != NULL); if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return MA_FALSE; } for (;;) { ma_uint8 hi; #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__reset_crc16(bs); #endif if (!ma_dr_flac__read_uint8(bs, 8, &hi)) { return MA_FALSE; } if (hi == 0xFF) { ma_uint8 lo; if (!ma_dr_flac__read_uint8(bs, 6, &lo)) { return MA_FALSE; } if (lo == 0x3E) { return MA_TRUE; } else { if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return MA_FALSE; } } } } } #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) #define MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(MA_X64) || defined(MA_X86)) && !defined(__clang__) #define MA_DR_FLAC_IMPLEMENT_CLZ_MSVC #endif #if defined(__WATCOMC__) && defined(__386__) #define MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM #endif #ifdef __MRC__ #include #define MA_DR_FLAC_IMPLEMENT_CLZ_MRC #endif static MA_INLINE ma_uint32 ma_dr_flac__clz_software(ma_dr_flac_cache_t x) { ma_uint32 n; static ma_uint32 clz_table_4[] = { 0, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 }; if (x == 0) { return sizeof(x)*8; } n = clz_table_4[x >> (sizeof(x)*8 - 4)]; if (n == 0) { #ifdef MA_64BIT if ((x & ((ma_uint64)0xFFFFFFFF << 32)) == 0) { n = 32; x <<= 32; } if ((x & ((ma_uint64)0xFFFF0000 << 32)) == 0) { n += 16; x <<= 16; } if ((x & ((ma_uint64)0xFF000000 << 32)) == 0) { n += 8; x <<= 8; } if ((x & ((ma_uint64)0xF0000000 << 32)) == 0) { n += 4; x <<= 4; } #else if ((x & 0xFFFF0000) == 0) { n = 16; x <<= 16; } if ((x & 0xFF000000) == 0) { n += 8; x <<= 8; } if ((x & 0xF0000000) == 0) { n += 4; x <<= 4; } #endif n += clz_table_4[x >> (sizeof(x)*8 - 4)]; } return n - 1; } #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT static MA_INLINE ma_bool32 ma_dr_flac__is_lzcnt_supported(void) { #if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) return MA_TRUE; #elif defined(__MRC__) return MA_TRUE; #else #ifdef MA_DR_FLAC_HAS_LZCNT_INTRINSIC return ma_dr_flac__gIsLZCNTSupported; #else return MA_FALSE; #endif #endif } static MA_INLINE ma_uint32 ma_dr_flac__clz_lzcnt(ma_dr_flac_cache_t x) { #if defined(_MSC_VER) #ifdef MA_64BIT return (ma_uint32)__lzcnt64(x); #else return (ma_uint32)__lzcnt(x); #endif #else #if defined(__GNUC__) || defined(__clang__) #if defined(MA_X64) { ma_uint64 r; __asm__ __volatile__ ( "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return (ma_uint32)r; } #elif defined(MA_X86) { ma_uint32 r; __asm__ __volatile__ ( "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return r; } #elif defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT) { unsigned int r; __asm__ __volatile__ ( #if defined(MA_64BIT) "clz %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(x) #else "clz %[out], %[in]" : [out]"=r"(r) : [in]"r"(x) #endif ); return r; } #else if (x == 0) { return sizeof(x)*8; } #ifdef MA_64BIT return (ma_uint32)__builtin_clzll((ma_uint64)x); #else return (ma_uint32)__builtin_clzl((ma_uint32)x); #endif #endif #else #error "This compiler does not support the lzcnt intrinsic." #endif #endif } #endif #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC #include static MA_INLINE ma_uint32 ma_dr_flac__clz_msvc(ma_dr_flac_cache_t x) { ma_uint32 n; if (x == 0) { return sizeof(x)*8; } #ifdef MA_64BIT _BitScanReverse64((unsigned long*)&n, x); #else _BitScanReverse((unsigned long*)&n, x); #endif return sizeof(x)*8 - n - 1; } #endif #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM static __inline ma_uint32 ma_dr_flac__clz_watcom (ma_uint32); #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT #pragma aux ma_dr_flac__clz_watcom_lzcnt = \ "db 0F3h, 0Fh, 0BDh, 0C0h" \ parm [eax] \ value [eax] \ modify nomemory; #else #pragma aux ma_dr_flac__clz_watcom = \ "bsr eax, eax" \ "xor eax, 31" \ parm [eax] nomemory \ value [eax] \ modify exact [eax] nomemory; #endif #endif static MA_INLINE ma_uint32 ma_dr_flac__clz(ma_dr_flac_cache_t x) { #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT if (ma_dr_flac__is_lzcnt_supported()) { return ma_dr_flac__clz_lzcnt(x); } else #endif { #ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC return ma_dr_flac__clz_msvc(x); #elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT) return ma_dr_flac__clz_watcom_lzcnt(x); #elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM) return (x == 0) ? sizeof(x)*8 : ma_dr_flac__clz_watcom(x); #elif defined(__MRC__) return __cntlzw(x); #else return ma_dr_flac__clz_software(x); #endif } } static MA_INLINE ma_bool32 ma_dr_flac__seek_past_next_set_bit(ma_dr_flac_bs* bs, unsigned int* pOffsetOut) { ma_uint32 zeroCounter = 0; ma_uint32 setBitOffsetPlus1; while (bs->cache == 0) { zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } if (bs->cache == 1) { *pOffsetOut = zeroCounter + (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) - 1; if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } return MA_TRUE; } setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache); setBitOffsetPlus1 += 1; if (setBitOffsetPlus1 > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs->consumedBits += setBitOffsetPlus1; bs->cache <<= setBitOffsetPlus1; *pOffsetOut = zeroCounter + setBitOffsetPlus1 - 1; return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_to_byte(ma_dr_flac_bs* bs, ma_uint64 offsetFromStart) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(offsetFromStart > 0); if (offsetFromStart > 0x7FFFFFFF) { ma_uint64 bytesRemaining = offsetFromStart; if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } bytesRemaining -= 0x7FFFFFFF; while (bytesRemaining > 0x7FFFFFFF) { if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } bytesRemaining -= 0x7FFFFFFF; } if (bytesRemaining > 0) { if (!bs->onSeek(bs->pUserData, (int)bytesRemaining, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!bs->onSeek(bs->pUserData, (int)offsetFromStart, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } } ma_dr_flac__reset_cache(bs); return MA_TRUE; } static ma_result ma_dr_flac__read_utf8_coded_number(ma_dr_flac_bs* bs, ma_uint64* pNumberOut, ma_uint8* pCRCOut) { ma_uint8 crc; ma_uint64 result; ma_uint8 utf8[7] = {0}; int byteCount; int i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pNumberOut != NULL); MA_DR_FLAC_ASSERT(pCRCOut != NULL); crc = *pCRCOut; if (!ma_dr_flac__read_uint8(bs, 8, utf8)) { *pNumberOut = 0; return MA_AT_END; } crc = ma_dr_flac_crc8(crc, utf8[0], 8); if ((utf8[0] & 0x80) == 0) { *pNumberOut = utf8[0]; *pCRCOut = crc; return MA_SUCCESS; } if ((utf8[0] & 0xE0) == 0xC0) { byteCount = 2; } else if ((utf8[0] & 0xF0) == 0xE0) { byteCount = 3; } else if ((utf8[0] & 0xF8) == 0xF0) { byteCount = 4; } else if ((utf8[0] & 0xFC) == 0xF8) { byteCount = 5; } else if ((utf8[0] & 0xFE) == 0xFC) { byteCount = 6; } else if ((utf8[0] & 0xFF) == 0xFE) { byteCount = 7; } else { *pNumberOut = 0; return MA_CRC_MISMATCH; } MA_DR_FLAC_ASSERT(byteCount > 1); result = (ma_uint64)(utf8[0] & (0xFF >> (byteCount + 1))); for (i = 1; i < byteCount; ++i) { if (!ma_dr_flac__read_uint8(bs, 8, utf8 + i)) { *pNumberOut = 0; return MA_AT_END; } crc = ma_dr_flac_crc8(crc, utf8[i], 8); result = (result << 6) | (utf8[i] & 0x3F); } *pNumberOut = result; *pCRCOut = crc; return MA_SUCCESS; } static MA_INLINE ma_uint32 ma_dr_flac__ilog2_u32(ma_uint32 x) { #if 1 ma_uint32 result = 0; while (x > 0) { result += 1; x >>= 1; } return result; #endif } static MA_INLINE ma_bool32 ma_dr_flac__use_64_bit_prediction(ma_uint32 bitsPerSample, ma_uint32 order, ma_uint32 precision) { return bitsPerSample + precision + ma_dr_flac__ilog2_u32(order) > 32; } #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_32(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_int32 prediction = 0; MA_DR_FLAC_ASSERT(order <= 32); switch (order) { case 32: prediction += coefficients[31] * pDecodedSamples[-32]; case 31: prediction += coefficients[30] * pDecodedSamples[-31]; case 30: prediction += coefficients[29] * pDecodedSamples[-30]; case 29: prediction += coefficients[28] * pDecodedSamples[-29]; case 28: prediction += coefficients[27] * pDecodedSamples[-28]; case 27: prediction += coefficients[26] * pDecodedSamples[-27]; case 26: prediction += coefficients[25] * pDecodedSamples[-26]; case 25: prediction += coefficients[24] * pDecodedSamples[-25]; case 24: prediction += coefficients[23] * pDecodedSamples[-24]; case 23: prediction += coefficients[22] * pDecodedSamples[-23]; case 22: prediction += coefficients[21] * pDecodedSamples[-22]; case 21: prediction += coefficients[20] * pDecodedSamples[-21]; case 20: prediction += coefficients[19] * pDecodedSamples[-20]; case 19: prediction += coefficients[18] * pDecodedSamples[-19]; case 18: prediction += coefficients[17] * pDecodedSamples[-18]; case 17: prediction += coefficients[16] * pDecodedSamples[-17]; case 16: prediction += coefficients[15] * pDecodedSamples[-16]; case 15: prediction += coefficients[14] * pDecodedSamples[-15]; case 14: prediction += coefficients[13] * pDecodedSamples[-14]; case 13: prediction += coefficients[12] * pDecodedSamples[-13]; case 12: prediction += coefficients[11] * pDecodedSamples[-12]; case 11: prediction += coefficients[10] * pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * pDecodedSamples[- 1]; } return (ma_int32)(prediction >> shift); } static MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_64(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_int64 prediction; MA_DR_FLAC_ASSERT(order <= 32); #ifndef MA_64BIT if (order == 8) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; } else if (order == 7) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; } else if (order == 3) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; } else if (order == 6) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; } else if (order == 5) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; } else if (order == 4) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; } else if (order == 12) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12]; } else if (order == 2) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; } else if (order == 1) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; } else if (order == 10) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; } else if (order == 9) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; } else if (order == 11) { prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (ma_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (ma_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; } else { int j; prediction = 0; for (j = 0; j < (int)order; ++j) { prediction += coefficients[j] * (ma_int64)pDecodedSamples[-j-1]; } } #endif #ifdef MA_64BIT prediction = 0; switch (order) { case 32: prediction += coefficients[31] * (ma_int64)pDecodedSamples[-32]; case 31: prediction += coefficients[30] * (ma_int64)pDecodedSamples[-31]; case 30: prediction += coefficients[29] * (ma_int64)pDecodedSamples[-30]; case 29: prediction += coefficients[28] * (ma_int64)pDecodedSamples[-29]; case 28: prediction += coefficients[27] * (ma_int64)pDecodedSamples[-28]; case 27: prediction += coefficients[26] * (ma_int64)pDecodedSamples[-27]; case 26: prediction += coefficients[25] * (ma_int64)pDecodedSamples[-26]; case 25: prediction += coefficients[24] * (ma_int64)pDecodedSamples[-25]; case 24: prediction += coefficients[23] * (ma_int64)pDecodedSamples[-24]; case 23: prediction += coefficients[22] * (ma_int64)pDecodedSamples[-23]; case 22: prediction += coefficients[21] * (ma_int64)pDecodedSamples[-22]; case 21: prediction += coefficients[20] * (ma_int64)pDecodedSamples[-21]; case 20: prediction += coefficients[19] * (ma_int64)pDecodedSamples[-20]; case 19: prediction += coefficients[18] * (ma_int64)pDecodedSamples[-19]; case 18: prediction += coefficients[17] * (ma_int64)pDecodedSamples[-18]; case 17: prediction += coefficients[16] * (ma_int64)pDecodedSamples[-17]; case 16: prediction += coefficients[15] * (ma_int64)pDecodedSamples[-16]; case 15: prediction += coefficients[14] * (ma_int64)pDecodedSamples[-15]; case 14: prediction += coefficients[13] * (ma_int64)pDecodedSamples[-14]; case 13: prediction += coefficients[12] * (ma_int64)pDecodedSamples[-13]; case 12: prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12]; case 11: prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * (ma_int64)pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * (ma_int64)pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * (ma_int64)pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * (ma_int64)pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * (ma_int64)pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * (ma_int64)pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * (ma_int64)pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * (ma_int64)pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * (ma_int64)pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * (ma_int64)pDecodedSamples[- 1]; } #endif return (ma_int32)(prediction >> shift); } #if 0 static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__reference(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { ma_uint32 zeroCounter = 0; for (;;) { ma_uint8 bit; if (!ma_dr_flac__read_uint8(bs, 1, &bit)) { return MA_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } ma_uint32 decodedRice; if (riceParam > 0) { if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) { return MA_FALSE; } } else { decodedRice = 0; } decodedRice |= (zeroCounter << riceParam); if ((decodedRice & 0x01)) { decodedRice = ~(decodedRice >> 1); } else { decodedRice = (decodedRice >> 1); } if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return MA_TRUE; } #endif #if 0 static ma_bool32 ma_dr_flac__read_rice_parts__reference(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_uint32 zeroCounter = 0; ma_uint32 decodedRice; for (;;) { ma_uint8 bit; if (!ma_dr_flac__read_uint8(bs, 1, &bit)) { return MA_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } if (riceParam > 0) { if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) { return MA_FALSE; } } else { decodedRice = 0; } *pZeroCounterOut = zeroCounter; *pRiceParamPartOut = decodedRice; return MA_TRUE; } #endif #if 0 static MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_dr_flac_cache_t riceParamMask; ma_uint32 zeroCounter; ma_uint32 setBitOffsetPlus1; ma_uint32 riceParamPart; ma_uint32 riceLength; MA_DR_FLAC_ASSERT(riceParam > 0); riceParamMask = MA_DR_FLAC_CACHE_L1_SELECTION_MASK(riceParam); zeroCounter = 0; while (bs->cache == 0) { zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs); if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } } setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache); zeroCounter += setBitOffsetPlus1; setBitOffsetPlus1 += 1; riceLength = setBitOffsetPlus1 + riceParam; if (riceLength < MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { riceParamPart = (ma_uint32)((bs->cache & (riceParamMask >> setBitOffsetPlus1)) >> MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceLength)); bs->consumedBits += riceLength; bs->cache <<= riceLength; } else { ma_uint32 bitCountLo; ma_dr_flac_cache_t resultHi; bs->consumedBits += riceLength; bs->cache <<= setBitOffsetPlus1 & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1); bitCountLo = bs->consumedBits - MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs); resultHi = MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, riceParam); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs->cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs->consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } } riceParamPart = (ma_uint32)(resultHi | MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo)); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; } pZeroCounterOut[0] = zeroCounter; pRiceParamPartOut[0] = riceParamPart; return MA_TRUE; } #endif static MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts_x1(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut) { ma_uint32 riceParamPlus1 = riceParam + 1; ma_uint32 riceParamPlus1Shift = MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPlus1); ma_uint32 riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; ma_dr_flac_cache_t bs_cache = bs->cache; ma_uint32 bs_consumedBits = bs->consumedBits; ma_uint32 lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { pZeroCounterOut[0] = lzcount; extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { pRiceParamPartOut[0] = (ma_uint32)(bs_cache >> riceParamPlus1Shift); bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { ma_uint32 riceParamPartHi; ma_uint32 riceParamPartLo; ma_uint32 riceParamPartLoBitCount; riceParamPartHi = (ma_uint32)(bs_cache >> riceParamPlus1Shift); riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } riceParamPartLo = (ma_uint32)(bs_cache >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPartLoBitCount))); pRiceParamPartOut[0] = riceParamPartHi | riceParamPartLo; bs_cache <<= riceParamPartLoBitCount; } } else { ma_uint32 zeroCounter = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - bs_consumedBits); for (;;) { if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = ma_dr_flac__clz(bs_cache); zeroCounter += lzcount; if (lzcount < sizeof(bs_cache)*8) { break; } } pZeroCounterOut[0] = zeroCounter; goto extract_rice_param_part; } bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return MA_TRUE; } static MA_INLINE ma_bool32 ma_dr_flac__seek_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam) { ma_uint32 riceParamPlus1 = riceParam + 1; ma_uint32 riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; ma_dr_flac_cache_t bs_cache = bs->cache; ma_uint32 bs_consumedBits = bs->consumedBits; ma_uint32 lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { ma_uint32 riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } bs_cache <<= riceParamPartLoBitCount; } } else { for (;;) { if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef MA_DR_FLAC_NO_CRC ma_dr_flac__update_crc16(bs); #endif bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef MA_DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { if (!ma_dr_flac__reload_cache(bs)) { return MA_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = ma_dr_flac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { break; } } goto extract_rice_param_part; } bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; ma_uint32 zeroCountPart0; ma_uint32 riceParamPart0; ma_uint32 riceParamMask; ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); (void)bitsPerSample; (void)order; (void)shift; (void)coefficients; riceParamMask = (ma_uint32)~((~0UL) << riceParam); i = 0; while (i < count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; pSamplesOut[i] = riceParamPart0; i += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; ma_uint32 zeroCountPart0 = 0; ma_uint32 zeroCountPart1 = 0; ma_uint32 zeroCountPart2 = 0; ma_uint32 zeroCountPart3 = 0; ma_uint32 riceParamPart0 = 0; ma_uint32 riceParamPart1 = 0; ma_uint32 riceParamPart2 = 0; ma_uint32 riceParamPart3 = 0; ma_uint32 riceParamMask; const ma_int32* pSamplesOutEnd; ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder == 0) { return ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } riceParamMask = (ma_uint32)~((~0UL) << riceParam); pSamplesOutEnd = pSamplesOut + (count & ~3); if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { while (pSamplesOut < pSamplesOutEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } else { while (pSamplesOut < pSamplesOutEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } i = (count & ~3); while (i < count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return MA_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } else { pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } i += 1; pSamplesOut += 1; } return MA_TRUE; } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE __m128i ma_dr_flac__mm_packs_interleaved_epi32(__m128i a, __m128i b) { __m128i r; r = _mm_packs_epi32(a, b); r = _mm_shuffle_epi32(r, _MM_SHUFFLE(3, 1, 2, 0)); r = _mm_shufflehi_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); r = _mm_shufflelo_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); return r; } #endif #if defined(MA_DR_FLAC_SUPPORT_SSE41) static MA_INLINE __m128i ma_dr_flac__mm_not_si128(__m128i a) { return _mm_xor_si128(a, _mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())); } static MA_INLINE __m128i ma_dr_flac__mm_hadd_epi32(__m128i x) { __m128i x64 = _mm_add_epi32(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); __m128i x32 = _mm_shufflelo_epi16(x64, _MM_SHUFFLE(1, 0, 3, 2)); return _mm_add_epi32(x64, x32); } static MA_INLINE __m128i ma_dr_flac__mm_hadd_epi64(__m128i x) { return _mm_add_epi64(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); } static MA_INLINE __m128i ma_dr_flac__mm_srai_epi64(__m128i x, int count) { __m128i lo = _mm_srli_epi64(x, count); __m128i hi = _mm_srai_epi32(x, count); hi = _mm_and_si128(hi, _mm_set_epi32(0xFFFFFFFF, 0, 0xFFFFFFFF, 0)); return _mm_or_si128(lo, hi); } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts0 = 0; ma_uint32 zeroCountParts1 = 0; ma_uint32 zeroCountParts2 = 0; ma_uint32 zeroCountParts3 = 0; ma_uint32 riceParamParts0 = 0; ma_uint32 riceParamParts1 = 0; ma_uint32 riceParamParts2 = 0; ma_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i riceParamMask128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); #if 1 { int runningOrder = order; if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else switch (order) { case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif while (pDecodedSamples < pDecodedSamplesEnd) { __m128i prediction128; __m128i zeroCountPart128; __m128i riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return MA_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(0x01))), _mm_set1_epi32(0x01))); if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_0, samples128_0); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_4, samples128_4); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_8, samples128_8); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_4, samples128_4)); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return MA_FALSE; } riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts0 = 0; ma_uint32 zeroCountParts1 = 0; ma_uint32 zeroCountParts2 = 0; ma_uint32 zeroCountParts3 = 0; ma_uint32 riceParamParts0 = 0; ma_uint32 riceParamParts1 = 0; ma_uint32 riceParamParts2 = 0; ma_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i prediction128; __m128i riceParamMask128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; MA_DR_FLAC_ASSERT(order <= 12); riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); prediction128 = _mm_setzero_si128(); coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); #if 1 { int runningOrder = order; if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else switch (order) { case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif while (pDecodedSamples < pDecodedSamplesEnd) { __m128i zeroCountPart128; __m128i riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return MA_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(1))), _mm_set1_epi32(1))); for (i = 0; i < 4; i += 1) { prediction128 = _mm_xor_si128(prediction128, prediction128); switch (order) { case 12: case 11: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(1, 1, 0, 0)))); case 10: case 9: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(3, 3, 2, 2)))); case 8: case 7: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(1, 1, 0, 0)))); case 6: case 5: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(3, 3, 2, 2)))); case 4: case 3: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(1, 1, 0, 0)))); case 2: case 1: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(3, 3, 2, 2)))); } prediction128 = ma_dr_flac__mm_hadd_epi64(prediction128); prediction128 = ma_dr_flac__mm_srai_epi64(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return MA_FALSE; } riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder > 0 && lpcOrder <= 12) { if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return ma_dr_flac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return ma_dr_flac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac__vst2q_s32(ma_int32* p, int32x4x2_t x) { vst1q_s32(p+0, x.val[0]); vst1q_s32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_u32(ma_uint32* p, uint32x4x2_t x) { vst1q_u32(p+0, x.val[0]); vst1q_u32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_f32(float* p, float32x4x2_t x) { vst1q_f32(p+0, x.val[0]); vst1q_f32(p+4, x.val[1]); } static MA_INLINE void ma_dr_flac__vst2q_s16(ma_int16* p, int16x4x2_t x) { vst1q_s16(p, vcombine_s16(x.val[0], x.val[1])); } static MA_INLINE void ma_dr_flac__vst2q_u16(ma_uint16* p, uint16x4x2_t x) { vst1q_u16(p, vcombine_u16(x.val[0], x.val[1])); } static MA_INLINE int32x4_t ma_dr_flac__vdupq_n_s32x4(ma_int32 x3, ma_int32 x2, ma_int32 x1, ma_int32 x0) { ma_int32 x[4]; x[3] = x3; x[2] = x2; x[1] = x1; x[0] = x0; return vld1q_s32(x); } static MA_INLINE int32x4_t ma_dr_flac__valignrq_s32_1(int32x4_t a, int32x4_t b) { return vextq_s32(b, a, 1); } static MA_INLINE uint32x4_t ma_dr_flac__valignrq_u32_1(uint32x4_t a, uint32x4_t b) { return vextq_u32(b, a, 1); } static MA_INLINE int32x2_t ma_dr_flac__vhaddq_s32(int32x4_t x) { int32x2_t r = vadd_s32(vget_high_s32(x), vget_low_s32(x)); return vpadd_s32(r, r); } static MA_INLINE int64x1_t ma_dr_flac__vhaddq_s64(int64x2_t x) { return vadd_s64(vget_high_s64(x), vget_low_s64(x)); } static MA_INLINE int32x4_t ma_dr_flac__vrevq_s32(int32x4_t x) { return vrev64q_s32(vcombine_s32(vget_high_s32(x), vget_low_s32(x))); } static MA_INLINE int32x4_t ma_dr_flac__vnotq_s32(int32x4_t x) { return veorq_s32(x, vdupq_n_s32(0xFFFFFFFF)); } static MA_INLINE uint32x4_t ma_dr_flac__vnotq_u32(uint32x4_t x) { return veorq_u32(x, vdupq_n_u32(0xFFFFFFFF)); } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts[4]; ma_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int32x2_t shift64; uint32x4_t one128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s32(-shift); one128 = vdupq_n_u32(1); { int runningOrder = order; ma_int32 tempC[4] = {0, 0, 0, 0}; ma_int32 tempS[4] = {0, 0, 0, 0}; if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0); coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4); coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8); } while (pDecodedSamples < pDecodedSamplesEnd) { int32x4_t prediction128; int32x2_t prediction64; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return MA_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_8, samples128_8); prediction128 = vmlaq_s32(prediction128, coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); prediction64 = ma_dr_flac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return MA_FALSE; } riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut) { int i; ma_uint32 riceParamMask; ma_int32* pDecodedSamples = pSamplesOut; ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); ma_uint32 zeroCountParts[4]; ma_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int64x1_t shift64; uint32x4_t one128; int64x2_t prediction128 = { 0 }; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (ma_uint32)~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s64(-shift); one128 = vdupq_n_u32(1); { int runningOrder = order; ma_int32 tempC[4] = {0, 0, 0, 0}; ma_int32 tempS[4] = {0, 0, 0, 0}; if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0); coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4); coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8); } while (pDecodedSamples < pDecodedSamplesEnd) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return MA_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); for (i = 0; i < 4; i += 1) { int64x1_t prediction64; prediction128 = veorq_s64(prediction128, prediction128); switch (order) { case 12: case 11: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_8), vget_low_s32(samples128_8))); case 10: case 9: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_8), vget_high_s32(samples128_8))); case 8: case 7: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_4), vget_low_s32(samples128_4))); case 6: case 5: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_4), vget_high_s32(samples128_4))); case 4: case 3: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_0), vget_low_s32(samples128_0))); case 2: case 1: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_0), vget_high_s32(samples128_0))); } prediction64 = ma_dr_flac__vhaddq_s64(prediction128); prediction64 = vshl_s64(prediction64, shift64); prediction64 = vadd_s64(prediction64, vdup_n_s64(vgetq_lane_u32(riceParamPart128, 0))); samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(vreinterpret_s32_s64(prediction64), vdup_n_s32(0)), samples128_0); riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } i = (count & ~3); while (i < (int)count) { if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return MA_FALSE; } riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder > 0 && lpcOrder <= 12) { if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return ma_dr_flac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return ma_dr_flac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif static ma_bool32 ma_dr_flac__decode_samples_with_residual__rice(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { #if defined(MA_DR_FLAC_SUPPORT_SSE41) if (ma_dr_flac__gIsSSE41Supported) { return ma_dr_flac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported) { return ma_dr_flac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #endif { #if 0 return ma_dr_flac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #else return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #endif } } static ma_bool32 ma_dr_flac__read_and_seek_residual__rice(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); for (i = 0; i < count; ++i) { if (!ma_dr_flac__seek_rice_parts(bs, riceParam)) { return MA_FALSE; } } return MA_TRUE; } #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static ma_bool32 ma_dr_flac__decode_samples_with_residual__unencoded(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 unencodedBitsPerSample, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut) { ma_uint32 i; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(unencodedBitsPerSample <= 31); MA_DR_FLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { if (unencodedBitsPerSample > 0) { if (!ma_dr_flac__read_int32(bs, unencodedBitsPerSample, pSamplesOut + i)) { return MA_FALSE; } } else { pSamplesOut[i] = 0; } if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] += ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] += ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples_with_residual(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 blockSize, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pDecodedSamples) { ma_uint8 residualMethod; ma_uint8 partitionOrder; ma_uint32 samplesInPartition; ma_uint32 partitionsRemaining; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(blockSize != 0); MA_DR_FLAC_ASSERT(pDecodedSamples != NULL); if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) { return MA_FALSE; } if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return MA_FALSE; } pDecodedSamples += lpcOrder; if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) { return MA_FALSE; } if (partitionOrder > 8) { return MA_FALSE; } if ((blockSize / (1 << partitionOrder)) < lpcOrder) { return MA_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder; partitionsRemaining = (1 << partitionOrder); for (;;) { ma_uint8 riceParam = 0; if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) { return MA_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) { return MA_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!ma_dr_flac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } } else { ma_uint8 unencodedBitsPerSample = 0; if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return MA_FALSE; } if (!ma_dr_flac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } } pDecodedSamples += samplesInPartition; if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; if (partitionOrder != 0) { samplesInPartition = blockSize / (1 << partitionOrder); } } return MA_TRUE; } static ma_bool32 ma_dr_flac__read_and_seek_residual(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 order) { ma_uint8 residualMethod; ma_uint8 partitionOrder; ma_uint32 samplesInPartition; ma_uint32 partitionsRemaining; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(blockSize != 0); if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) { return MA_FALSE; } if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) { return MA_FALSE; } if (partitionOrder > 8) { return MA_FALSE; } if ((blockSize / (1 << partitionOrder)) <= order) { return MA_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - order; partitionsRemaining = (1 << partitionOrder); for (;;) { ma_uint8 riceParam = 0; if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) { return MA_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) { return MA_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!ma_dr_flac__read_and_seek_residual__rice(bs, samplesInPartition, riceParam)) { return MA_FALSE; } } else { ma_uint8 unencodedBitsPerSample = 0; if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return MA_FALSE; } if (!ma_dr_flac__seek_bits(bs, unencodedBitsPerSample * samplesInPartition)) { return MA_FALSE; } } if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; samplesInPartition = blockSize / (1 << partitionOrder); } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__constant(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples) { ma_uint32 i; ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } for (i = 0; i < blockSize; ++i) { pDecodedSamples[i] = sample; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__verbatim(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples) { ma_uint32 i; for (i = 0; i < blockSize; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__fixed(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples) { ma_uint32 i; static ma_int32 lpcCoefficientsTable[5][4] = { {0, 0, 0, 0}, {1, 0, 0, 0}, {2, -1, 0, 0}, {3, -3, 1, 0}, {4, -6, 4, -1} }; for (i = 0; i < lpcOrder; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } if (!ma_dr_flac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_samples__lpc(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 bitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples) { ma_uint8 i; ma_uint8 lpcPrecision; ma_int8 lpcShift; ma_int32 coefficients[32]; for (i = 0; i < lpcOrder; ++i) { ma_int32 sample; if (!ma_dr_flac__read_int32(bs, bitsPerSample, &sample)) { return MA_FALSE; } pDecodedSamples[i] = sample; } if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) { return MA_FALSE; } if (lpcPrecision == 15) { return MA_FALSE; } lpcPrecision += 1; if (!ma_dr_flac__read_int8(bs, 5, &lpcShift)) { return MA_FALSE; } if (lpcShift < 0) { return MA_FALSE; } MA_DR_FLAC_ZERO_MEMORY(coefficients, sizeof(coefficients)); for (i = 0; i < lpcOrder; ++i) { if (!ma_dr_flac__read_int32(bs, lpcPrecision, coefficients + i)) { return MA_FALSE; } } if (!ma_dr_flac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__read_next_flac_frame_header(ma_dr_flac_bs* bs, ma_uint8 streaminfoBitsPerSample, ma_dr_flac_frame_header* header) { const ma_uint32 sampleRateTable[12] = {0, 88200, 176400, 192000, 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000}; const ma_uint8 bitsPerSampleTable[8] = {0, 8, 12, (ma_uint8)-1, 16, 20, 24, (ma_uint8)-1}; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(header != NULL); for (;;) { ma_uint8 crc8 = 0xCE; ma_uint8 reserved = 0; ma_uint8 blockingStrategy = 0; ma_uint8 blockSize = 0; ma_uint8 sampleRate = 0; ma_uint8 channelAssignment = 0; ma_uint8 bitsPerSample = 0; ma_bool32 isVariableBlockSize; if (!ma_dr_flac__find_and_seek_to_next_sync_code(bs)) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) { return MA_FALSE; } if (reserved == 1) { continue; } crc8 = ma_dr_flac_crc8(crc8, reserved, 1); if (!ma_dr_flac__read_uint8(bs, 1, &blockingStrategy)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, blockingStrategy, 1); if (!ma_dr_flac__read_uint8(bs, 4, &blockSize)) { return MA_FALSE; } if (blockSize == 0) { continue; } crc8 = ma_dr_flac_crc8(crc8, blockSize, 4); if (!ma_dr_flac__read_uint8(bs, 4, &sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, sampleRate, 4); if (!ma_dr_flac__read_uint8(bs, 4, &channelAssignment)) { return MA_FALSE; } if (channelAssignment > 10) { continue; } crc8 = ma_dr_flac_crc8(crc8, channelAssignment, 4); if (!ma_dr_flac__read_uint8(bs, 3, &bitsPerSample)) { return MA_FALSE; } if (bitsPerSample == 3 || bitsPerSample == 7) { continue; } crc8 = ma_dr_flac_crc8(crc8, bitsPerSample, 3); if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) { return MA_FALSE; } if (reserved == 1) { continue; } crc8 = ma_dr_flac_crc8(crc8, reserved, 1); isVariableBlockSize = blockingStrategy == 1; if (isVariableBlockSize) { ma_uint64 pcmFrameNumber; ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &pcmFrameNumber, &crc8); if (result != MA_SUCCESS) { if (result == MA_AT_END) { return MA_FALSE; } else { continue; } } header->flacFrameNumber = 0; header->pcmFrameNumber = pcmFrameNumber; } else { ma_uint64 flacFrameNumber = 0; ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &flacFrameNumber, &crc8); if (result != MA_SUCCESS) { if (result == MA_AT_END) { return MA_FALSE; } else { continue; } } header->flacFrameNumber = (ma_uint32)flacFrameNumber; header->pcmFrameNumber = 0; } MA_DR_FLAC_ASSERT(blockSize > 0); if (blockSize == 1) { header->blockSizeInPCMFrames = 192; } else if (blockSize <= 5) { MA_DR_FLAC_ASSERT(blockSize >= 2); header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2)); } else if (blockSize == 6) { if (!ma_dr_flac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 8); header->blockSizeInPCMFrames += 1; } else if (blockSize == 7) { if (!ma_dr_flac__read_uint16(bs, 16, &header->blockSizeInPCMFrames)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 16); if (header->blockSizeInPCMFrames == 0xFFFF) { return MA_FALSE; } header->blockSizeInPCMFrames += 1; } else { MA_DR_FLAC_ASSERT(blockSize >= 8); header->blockSizeInPCMFrames = 256 * (1 << (blockSize - 8)); } if (sampleRate <= 11) { header->sampleRate = sampleRateTable[sampleRate]; } else if (sampleRate == 12) { if (!ma_dr_flac__read_uint32(bs, 8, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 8); header->sampleRate *= 1000; } else if (sampleRate == 13) { if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16); } else if (sampleRate == 14) { if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) { return MA_FALSE; } crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16); header->sampleRate *= 10; } else { continue; } header->channelAssignment = channelAssignment; header->bitsPerSample = bitsPerSampleTable[bitsPerSample]; if (header->bitsPerSample == 0) { header->bitsPerSample = streaminfoBitsPerSample; } if (header->bitsPerSample != streaminfoBitsPerSample) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 8, &header->crc8)) { return MA_FALSE; } #ifndef MA_DR_FLAC_NO_CRC if (header->crc8 != crc8) { continue; } #endif return MA_TRUE; } } static ma_bool32 ma_dr_flac__read_subframe_header(ma_dr_flac_bs* bs, ma_dr_flac_subframe* pSubframe) { ma_uint8 header; int type; if (!ma_dr_flac__read_uint8(bs, 8, &header)) { return MA_FALSE; } if ((header & 0x80) != 0) { return MA_FALSE; } pSubframe->lpcOrder = 0; type = (header & 0x7E) >> 1; if (type == 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_CONSTANT; } else if (type == 1) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_VERBATIM; } else { if ((type & 0x20) != 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_LPC; pSubframe->lpcOrder = (ma_uint8)(type & 0x1F) + 1; } else if ((type & 0x08) != 0) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_FIXED; pSubframe->lpcOrder = (ma_uint8)(type & 0x07); if (pSubframe->lpcOrder > 4) { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED; pSubframe->lpcOrder = 0; } } else { pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED; } } if (pSubframe->subframeType == MA_DR_FLAC_SUBFRAME_RESERVED) { return MA_FALSE; } pSubframe->wastedBitsPerSample = 0; if ((header & 0x01) == 1) { unsigned int wastedBitsPerSample; if (!ma_dr_flac__seek_past_next_set_bit(bs, &wastedBitsPerSample)) { return MA_FALSE; } pSubframe->wastedBitsPerSample = (ma_uint8)wastedBitsPerSample + 1; } return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex, ma_int32* pDecodedSamplesOut) { ma_dr_flac_subframe* pSubframe; ma_uint32 subframeBitsPerSample; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) { return MA_FALSE; } subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } if (subframeBitsPerSample > 32) { return MA_FALSE; } if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return MA_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = pDecodedSamplesOut; if (frame->header.blockSizeInPCMFrames < pSubframe->lpcOrder) { return MA_FALSE; } switch (pSubframe->subframeType) { case MA_DR_FLAC_SUBFRAME_CONSTANT: { ma_dr_flac__decode_samples__constant(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_VERBATIM: { ma_dr_flac__decode_samples__verbatim(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_FIXED: { ma_dr_flac__decode_samples__fixed(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; case MA_DR_FLAC_SUBFRAME_LPC: { ma_dr_flac__decode_samples__lpc(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; default: return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_flac__seek_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex) { ma_dr_flac_subframe* pSubframe; ma_uint32 subframeBitsPerSample; MA_DR_FLAC_ASSERT(bs != NULL); MA_DR_FLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) { return MA_FALSE; } subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return MA_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = NULL; switch (pSubframe->subframeType) { case MA_DR_FLAC_SUBFRAME_CONSTANT: { if (!ma_dr_flac__seek_bits(bs, subframeBitsPerSample)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_VERBATIM: { unsigned int bitsToSeek = frame->header.blockSizeInPCMFrames * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_FIXED: { unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return MA_FALSE; } } break; case MA_DR_FLAC_SUBFRAME_LPC: { ma_uint8 lpcPrecision; unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) { return MA_FALSE; } if (lpcPrecision == 15) { return MA_FALSE; } lpcPrecision += 1; bitsToSeek = (pSubframe->lpcOrder * lpcPrecision) + 5; if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) { return MA_FALSE; } if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return MA_FALSE; } } break; default: return MA_FALSE; } return MA_TRUE; } static MA_INLINE ma_uint8 ma_dr_flac__get_channel_count_from_channel_assignment(ma_int8 channelAssignment) { ma_uint8 lookup[] = {1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2}; MA_DR_FLAC_ASSERT(channelAssignment <= 10); return lookup[channelAssignment]; } static ma_result ma_dr_flac__decode_flac_frame(ma_dr_flac* pFlac) { int channelCount; int i; ma_uint8 paddingSizeInBits; ma_uint16 desiredCRC16; #ifndef MA_DR_FLAC_NO_CRC ma_uint16 actualCRC16; #endif MA_DR_FLAC_ZERO_MEMORY(pFlac->currentFLACFrame.subframes, sizeof(pFlac->currentFLACFrame.subframes)); if (pFlac->currentFLACFrame.header.blockSizeInPCMFrames > pFlac->maxBlockSizeInPCMFrames) { return MA_ERROR; } channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); if (channelCount != (int)pFlac->channels) { return MA_ERROR; } for (i = 0; i < channelCount; ++i) { if (!ma_dr_flac__decode_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i, pFlac->pDecodedSamples + (pFlac->currentFLACFrame.header.blockSizeInPCMFrames * i))) { return MA_ERROR; } } paddingSizeInBits = (ma_uint8)(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7); if (paddingSizeInBits > 0) { ma_uint8 padding = 0; if (!ma_dr_flac__read_uint8(&pFlac->bs, paddingSizeInBits, &padding)) { return MA_AT_END; } } #ifndef MA_DR_FLAC_NO_CRC actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs); #endif if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return MA_AT_END; } #ifndef MA_DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return MA_CRC_MISMATCH; } #endif pFlac->currentFLACFrame.pcmFramesRemaining = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; return MA_SUCCESS; } static ma_result ma_dr_flac__seek_flac_frame(ma_dr_flac* pFlac) { int channelCount; int i; ma_uint16 desiredCRC16; #ifndef MA_DR_FLAC_NO_CRC ma_uint16 actualCRC16; #endif channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); for (i = 0; i < channelCount; ++i) { if (!ma_dr_flac__seek_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i)) { return MA_ERROR; } } if (!ma_dr_flac__seek_bits(&pFlac->bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7)) { return MA_ERROR; } #ifndef MA_DR_FLAC_NO_CRC actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs); #endif if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return MA_AT_END; } #ifndef MA_DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return MA_CRC_MISMATCH; } #endif return MA_SUCCESS; } static ma_bool32 ma_dr_flac__read_and_decode_next_flac_frame(ma_dr_flac* pFlac) { MA_DR_FLAC_ASSERT(pFlac != NULL); for (;;) { ma_result result; if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } result = ma_dr_flac__decode_flac_frame(pFlac); if (result != MA_SUCCESS) { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } return MA_TRUE; } } static void ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(ma_dr_flac* pFlac, ma_uint64* pFirstPCMFrame, ma_uint64* pLastPCMFrame) { ma_uint64 firstPCMFrame; ma_uint64 lastPCMFrame; MA_DR_FLAC_ASSERT(pFlac != NULL); firstPCMFrame = pFlac->currentFLACFrame.header.pcmFrameNumber; if (firstPCMFrame == 0) { firstPCMFrame = ((ma_uint64)pFlac->currentFLACFrame.header.flacFrameNumber) * pFlac->maxBlockSizeInPCMFrames; } lastPCMFrame = firstPCMFrame + pFlac->currentFLACFrame.header.blockSizeInPCMFrames; if (lastPCMFrame > 0) { lastPCMFrame -= 1; } if (pFirstPCMFrame) { *pFirstPCMFrame = firstPCMFrame; } if (pLastPCMFrame) { *pLastPCMFrame = lastPCMFrame; } } static ma_bool32 ma_dr_flac__seek_to_first_frame(ma_dr_flac* pFlac) { ma_bool32 result; MA_DR_FLAC_ASSERT(pFlac != NULL); result = ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes); MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); pFlac->currentPCMFrame = 0; return result; } static MA_INLINE ma_result ma_dr_flac__seek_to_next_flac_frame(ma_dr_flac* pFlac) { MA_DR_FLAC_ASSERT(pFlac != NULL); return ma_dr_flac__seek_flac_frame(pFlac); } static ma_uint64 ma_dr_flac__seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 pcmFramesToSeek) { ma_uint64 pcmFramesRead = 0; while (pcmFramesToSeek > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { if (pFlac->currentFLACFrame.pcmFramesRemaining > pcmFramesToSeek) { pcmFramesRead += pcmFramesToSeek; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)pcmFramesToSeek; pcmFramesToSeek = 0; } else { pcmFramesRead += pFlac->currentFLACFrame.pcmFramesRemaining; pcmFramesToSeek -= pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; } } } pFlac->currentPCMFrame += pcmFramesRead; return pcmFramesRead; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__brute_force(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_bool32 isMidFrame = MA_FALSE; ma_uint64 runningPCMFrameCount; MA_DR_FLAC_ASSERT(pFlac != NULL); if (pcmFrameIndex >= pFlac->currentPCMFrame) { runningPCMFrameCount = pFlac->currentPCMFrame; if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } else { isMidFrame = MA_TRUE; } } else { runningPCMFrameCount = 0; if (!ma_dr_flac__seek_to_first_frame(pFlac)) { return MA_FALSE; } if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } for (;;) { ma_uint64 pcmFrameCountInThisFLACFrame; ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { if (!isMidFrame) { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = MA_FALSE; } if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return MA_TRUE; } } next_iteration: if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } } #if !defined(MA_DR_FLAC_NO_CRC) #define MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO 0.6f static ma_bool32 ma_dr_flac__seek_to_approximate_flac_frame_to_byte(ma_dr_flac* pFlac, ma_uint64 targetByte, ma_uint64 rangeLo, ma_uint64 rangeHi, ma_uint64* pLastSuccessfulSeekOffset) { MA_DR_FLAC_ASSERT(pFlac != NULL); MA_DR_FLAC_ASSERT(pLastSuccessfulSeekOffset != NULL); MA_DR_FLAC_ASSERT(targetByte >= rangeLo); MA_DR_FLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes; for (;;) { ma_uint64 lastTargetByte = targetByte; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, targetByte)) { if (targetByte == 0) { ma_dr_flac__seek_to_first_frame(pFlac); return MA_FALSE; } targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); #if 1 if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #else if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #endif } if(targetByte == lastTargetByte) { return MA_FALSE; } } ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); MA_DR_FLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = targetByte; return MA_TRUE; } static ma_bool32 ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 offset) { #if 0 if (ma_dr_flac__decode_flac_frame(pFlac) != MA_SUCCESS) { if (ma_dr_flac__read_and_decode_next_flac_frame(pFlac) == MA_FALSE) { return MA_FALSE; } } #endif return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, offset) == offset; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search_internal(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex, ma_uint64 byteRangeLo, ma_uint64 byteRangeHi) { ma_uint64 targetByte; ma_uint64 pcmRangeLo = pFlac->totalPCMFrameCount; ma_uint64 pcmRangeHi = 0; ma_uint64 lastSuccessfulSeekOffset = (ma_uint64)-1; ma_uint64 closestSeekOffsetBeforeTargetPCMFrame = byteRangeLo; ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; targetByte = byteRangeLo + (ma_uint64)(((ma_int64)((pcmFrameIndex - pFlac->currentPCMFrame) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } for (;;) { if (ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, targetByte, byteRangeLo, byteRangeHi, &lastSuccessfulSeekOffset)) { ma_uint64 newPCMRangeLo; ma_uint64 newPCMRangeHi; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &newPCMRangeLo, &newPCMRangeHi); if (pcmRangeLo == newPCMRangeLo) { if (!ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, closestSeekOffsetBeforeTargetPCMFrame, closestSeekOffsetBeforeTargetPCMFrame, byteRangeHi, &lastSuccessfulSeekOffset)) { break; } if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return MA_TRUE; } else { break; } } pcmRangeLo = newPCMRangeLo; pcmRangeHi = newPCMRangeHi; if (pcmRangeLo <= pcmFrameIndex && pcmRangeHi >= pcmFrameIndex) { if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame) ) { return MA_TRUE; } else { break; } } else { const float approxCompressionRatio = (ma_int64)(lastSuccessfulSeekOffset - pFlac->firstFLACFramePosInBytes) / ((ma_int64)(pcmRangeLo * pFlac->channels * pFlac->bitsPerSample)/8.0f); if (pcmRangeLo > pcmFrameIndex) { byteRangeHi = lastSuccessfulSeekOffset; if (byteRangeLo > byteRangeHi) { byteRangeLo = byteRangeHi; } targetByte = byteRangeLo + ((byteRangeHi - byteRangeLo) / 2); if (targetByte < byteRangeLo) { targetByte = byteRangeLo; } } else { if ((pcmFrameIndex - pcmRangeLo) < seekForwardThreshold) { if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return MA_TRUE; } else { break; } } else { byteRangeLo = lastSuccessfulSeekOffset; if (byteRangeHi < byteRangeLo) { byteRangeHi = byteRangeLo; } targetByte = lastSuccessfulSeekOffset + (ma_uint64)(((ma_int64)((pcmFrameIndex-pcmRangeLo) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * approxCompressionRatio); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } if (closestSeekOffsetBeforeTargetPCMFrame < lastSuccessfulSeekOffset) { closestSeekOffsetBeforeTargetPCMFrame = lastSuccessfulSeekOffset; } } } } } else { break; } } ma_dr_flac__seek_to_first_frame(pFlac); return MA_FALSE; } static ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_uint64 byteRangeLo; ma_uint64 byteRangeHi; ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; if (ma_dr_flac__seek_to_first_frame(pFlac) == MA_FALSE) { return MA_FALSE; } if (pcmFrameIndex < seekForwardThreshold) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFrameIndex) == pcmFrameIndex; } byteRangeLo = pFlac->firstFLACFramePosInBytes; byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); return ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi); } #endif static ma_bool32 ma_dr_flac__seek_to_pcm_frame__seek_table(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_uint32 iClosestSeekpoint = 0; ma_bool32 isMidFrame = MA_FALSE; ma_uint64 runningPCMFrameCount; ma_uint32 iSeekpoint; MA_DR_FLAC_ASSERT(pFlac != NULL); if (pFlac->pSeekpoints == NULL || pFlac->seekpointCount == 0) { return MA_FALSE; } if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) { return MA_FALSE; } for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) { if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) { break; } iClosestSeekpoint = iSeekpoint; } if (pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount == 0 || pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount > pFlac->maxBlockSizeInPCMFrames) { return MA_FALSE; } if (pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame > pFlac->totalPCMFrameCount && pFlac->totalPCMFrameCount > 0) { return MA_FALSE; } #if !defined(MA_DR_FLAC_NO_CRC) if (pFlac->totalPCMFrameCount > 0) { ma_uint64 byteRangeLo; ma_uint64 byteRangeHi; byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); byteRangeLo = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset; if (iClosestSeekpoint < pFlac->seekpointCount-1) { ma_uint32 iNextSeekpoint = iClosestSeekpoint + 1; if (pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset >= pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset || pFlac->pSeekpoints[iNextSeekpoint].pcmFrameCount == 0) { return MA_FALSE; } if (pFlac->pSeekpoints[iNextSeekpoint].firstPCMFrame != (((ma_uint64)0xFFFFFFFF << 32) | 0xFFFFFFFF)) { byteRangeHi = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset - 1; } } if (ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { if (ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); if (ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi)) { return MA_TRUE; } } } } #endif if (pcmFrameIndex >= pFlac->currentPCMFrame && pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame <= pFlac->currentPCMFrame) { runningPCMFrameCount = pFlac->currentPCMFrame; if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } else { isMidFrame = MA_TRUE; } } else { runningPCMFrameCount = pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { return MA_FALSE; } if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } for (;;) { ma_uint64 pcmFrameCountInThisFLACFrame; ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { if (!isMidFrame) { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == MA_CRC_MISMATCH) { goto next_iteration; } else { return MA_FALSE; } } } else { runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = MA_FALSE; } if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return MA_TRUE; } } next_iteration: if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } } } #ifndef MA_DR_FLAC_NO_OGG typedef struct { ma_uint8 capturePattern[4]; ma_uint8 structureVersion; ma_uint8 headerType; ma_uint64 granulePosition; ma_uint32 serialNumber; ma_uint32 sequenceNumber; ma_uint32 checksum; ma_uint8 segmentCount; ma_uint8 segmentTable[255]; } ma_dr_flac_ogg_page_header; #endif typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; ma_dr_flac_meta_proc onMeta; ma_dr_flac_container container; void* pUserData; void* pUserDataMD; ma_uint32 sampleRate; ma_uint8 channels; ma_uint8 bitsPerSample; ma_uint64 totalPCMFrameCount; ma_uint16 maxBlockSizeInPCMFrames; ma_uint64 runningFilePos; ma_bool32 hasStreamInfoBlock; ma_bool32 hasMetadataBlocks; ma_dr_flac_bs bs; ma_dr_flac_frame_header firstFrameHeader; #ifndef MA_DR_FLAC_NO_OGG ma_uint32 oggSerial; ma_uint64 oggFirstBytePos; ma_dr_flac_ogg_page_header oggBosHeader; #endif } ma_dr_flac_init_info; static MA_INLINE void ma_dr_flac__decode_block_header(ma_uint32 blockHeader, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize) { blockHeader = ma_dr_flac__be2host_32(blockHeader); *isLastBlock = (ma_uint8)((blockHeader & 0x80000000UL) >> 31); *blockType = (ma_uint8)((blockHeader & 0x7F000000UL) >> 24); *blockSize = (blockHeader & 0x00FFFFFFUL); } static MA_INLINE ma_bool32 ma_dr_flac__read_and_decode_block_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize) { ma_uint32 blockHeader; *blockSize = 0; if (onRead(pUserData, &blockHeader, 4) != 4) { return MA_FALSE; } ma_dr_flac__decode_block_header(blockHeader, isLastBlock, blockType, blockSize); return MA_TRUE; } static ma_bool32 ma_dr_flac__read_streaminfo(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_streaminfo* pStreamInfo) { ma_uint32 blockSizes; ma_uint64 frameSizes = 0; ma_uint64 importantProps; ma_uint8 md5[16]; if (onRead(pUserData, &blockSizes, 4) != 4) { return MA_FALSE; } if (onRead(pUserData, &frameSizes, 6) != 6) { return MA_FALSE; } if (onRead(pUserData, &importantProps, 8) != 8) { return MA_FALSE; } if (onRead(pUserData, md5, sizeof(md5)) != sizeof(md5)) { return MA_FALSE; } blockSizes = ma_dr_flac__be2host_32(blockSizes); frameSizes = ma_dr_flac__be2host_64(frameSizes); importantProps = ma_dr_flac__be2host_64(importantProps); pStreamInfo->minBlockSizeInPCMFrames = (ma_uint16)((blockSizes & 0xFFFF0000) >> 16); pStreamInfo->maxBlockSizeInPCMFrames = (ma_uint16) (blockSizes & 0x0000FFFF); pStreamInfo->minFrameSizeInPCMFrames = (ma_uint32)((frameSizes & (((ma_uint64)0x00FFFFFF << 16) << 24)) >> 40); pStreamInfo->maxFrameSizeInPCMFrames = (ma_uint32)((frameSizes & (((ma_uint64)0x00FFFFFF << 16) << 0)) >> 16); pStreamInfo->sampleRate = (ma_uint32)((importantProps & (((ma_uint64)0x000FFFFF << 16) << 28)) >> 44); pStreamInfo->channels = (ma_uint8 )((importantProps & (((ma_uint64)0x0000000E << 16) << 24)) >> 41) + 1; pStreamInfo->bitsPerSample = (ma_uint8 )((importantProps & (((ma_uint64)0x0000001F << 16) << 20)) >> 36) + 1; pStreamInfo->totalPCMFrameCount = ((importantProps & ((((ma_uint64)0x0000000F << 16) << 16) | 0xFFFFFFFF))); MA_DR_FLAC_COPY_MEMORY(pStreamInfo->md5, md5, sizeof(md5)); return MA_TRUE; } static void* ma_dr_flac__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_FLAC_MALLOC(sz); } static void* ma_dr_flac__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_FLAC_REALLOC(p, sz); } static void ma_dr_flac__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_FLAC_FREE(p); } static void* ma_dr_flac__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* ma_dr_flac__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_FLAC_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void ma_dr_flac__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static ma_bool32 ma_dr_flac__read_and_decode_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_uint64* pFirstFramePos, ma_uint64* pSeektablePos, ma_uint32* pSeekpointCount, ma_allocation_callbacks* pAllocationCallbacks) { ma_uint64 runningFilePos = 42; ma_uint64 seektablePos = 0; ma_uint32 seektableSize = 0; for (;;) { ma_dr_flac_metadata metadata; ma_uint8 isLastBlock = 0; ma_uint8 blockType = 0; ma_uint32 blockSize; if (ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize) == MA_FALSE) { return MA_FALSE; } runningFilePos += 4; metadata.type = blockType; metadata.pRawData = NULL; metadata.rawDataSize = 0; switch (blockType) { case MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION: { if (blockSize < 4) { return MA_FALSE; } if (onMeta) { void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.application.id = ma_dr_flac__be2host_32(*(ma_uint32*)pRawData); metadata.data.application.pData = (const void*)((ma_uint8*)pRawData + sizeof(ma_uint32)); metadata.data.application.dataSize = blockSize - sizeof(ma_uint32); onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE: { seektablePos = runningFilePos; seektableSize = blockSize; if (onMeta) { ma_uint32 seekpointCount; ma_uint32 iSeekpoint; void* pRawData; seekpointCount = blockSize/MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES; pRawData = ma_dr_flac__malloc_from_callbacks(seekpointCount * sizeof(ma_dr_flac_seekpoint), pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } for (iSeekpoint = 0; iSeekpoint < seekpointCount; ++iSeekpoint) { ma_dr_flac_seekpoint* pSeekpoint = (ma_dr_flac_seekpoint*)pRawData + iSeekpoint; if (onRead(pUserData, pSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) != MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pSeekpoint->firstPCMFrame = ma_dr_flac__be2host_64(pSeekpoint->firstPCMFrame); pSeekpoint->flacFrameOffset = ma_dr_flac__be2host_64(pSeekpoint->flacFrameOffset); pSeekpoint->pcmFrameCount = ma_dr_flac__be2host_16(pSeekpoint->pcmFrameCount); } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.seektable.seekpointCount = seekpointCount; metadata.data.seektable.pSeekpoints = (const ma_dr_flac_seekpoint*)pRawData; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT: { if (blockSize < 8) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; ma_uint32 i; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.vorbis_comment.vendorLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 4 < (ma_int64)metadata.data.vorbis_comment.vendorLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.vorbis_comment.vendor = pRunningData; pRunningData += metadata.data.vorbis_comment.vendorLength; metadata.data.vorbis_comment.commentCount = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) / sizeof(ma_uint32) < metadata.data.vorbis_comment.commentCount) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.vorbis_comment.pComments = pRunningData; for (i = 0; i < metadata.data.vorbis_comment.commentCount; ++i) { ma_uint32 commentLength; if (pRunningDataEnd - pRunningData < 4) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } commentLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if (pRunningDataEnd - pRunningData < (ma_int64)commentLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += commentLength; } onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET: { if (blockSize < 396) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; size_t bufferSize; ma_uint8 iTrack; ma_uint8 iIndex; void* pTrackData; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; MA_DR_FLAC_COPY_MEMORY(metadata.data.cuesheet.catalog, pRunningData, 128); pRunningData += 128; metadata.data.cuesheet.leadInSampleCount = ma_dr_flac__be2host_64(*(const ma_uint64*)pRunningData); pRunningData += 8; metadata.data.cuesheet.isCD = (pRunningData[0] & 0x80) != 0; pRunningData += 259; metadata.data.cuesheet.trackCount = pRunningData[0]; pRunningData += 1; metadata.data.cuesheet.pTrackData = NULL; { const char* pRunningDataSaved = pRunningData; bufferSize = metadata.data.cuesheet.trackCount * MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES; for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) { ma_uint8 indexCount; ma_uint32 indexPointSize; if (pRunningDataEnd - pRunningData < MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += 35; indexCount = pRunningData[0]; pRunningData += 1; bufferSize += indexCount * sizeof(ma_dr_flac_cuesheet_track_index); indexPointSize = indexCount * MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES; if (pRunningDataEnd - pRunningData < (ma_int64)indexPointSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningData += indexPointSize; } pRunningData = pRunningDataSaved; } { char* pRunningTrackData; pTrackData = ma_dr_flac__malloc_from_callbacks(bufferSize, pAllocationCallbacks); if (pTrackData == NULL) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } pRunningTrackData = (char*)pTrackData; for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) { ma_uint8 indexCount; MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES); pRunningData += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1; pRunningTrackData += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1; indexCount = pRunningData[0]; pRunningData += 1; pRunningTrackData += 1; for (iIndex = 0; iIndex < indexCount; ++iIndex) { ma_dr_flac_cuesheet_track_index* pTrackIndex = (ma_dr_flac_cuesheet_track_index*)pRunningTrackData; MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES); pRunningData += MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES; pRunningTrackData += sizeof(ma_dr_flac_cuesheet_track_index); pTrackIndex->offset = ma_dr_flac__be2host_64(pTrackIndex->offset); } } metadata.data.cuesheet.pTrackData = pTrackData; } ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); pRawData = NULL; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pTrackData, pAllocationCallbacks); pTrackData = NULL; } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE: { if (blockSize < 32) { return MA_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.picture.type = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.mimeLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 24 < (ma_int64)metadata.data.picture.mimeLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.picture.mime = pRunningData; pRunningData += metadata.data.picture.mimeLength; metadata.data.picture.descriptionLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if ((pRunningDataEnd - pRunningData) - 20 < (ma_int64)metadata.data.picture.descriptionLength) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.data.picture.description = pRunningData; pRunningData += metadata.data.picture.descriptionLength; metadata.data.picture.width = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.height = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.colorDepth = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.indexColorCount = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pictureDataSize = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pPictureData = (const ma_uint8*)pRunningData; if (pRunningDataEnd - pRunningData < (ma_int64)metadata.data.picture.pictureDataSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING: { if (onMeta) { metadata.data.padding.unused = 0; if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } else { onMeta(pUserDataMD, &metadata); } } } break; case MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID: { if (onMeta) { if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } } } break; default: { if (onMeta) { void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return MA_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); return MA_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; onMeta(pUserDataMD, &metadata); ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; } if (onMeta == NULL && blockSize > 0) { if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) { isLastBlock = MA_TRUE; } } runningFilePos += blockSize; if (isLastBlock) { break; } } *pSeektablePos = seektablePos; *pSeekpointCount = seektableSize / MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES; *pFirstFramePos = runningFilePos; return MA_TRUE; } static ma_bool32 ma_dr_flac__init_private__native(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed) { ma_uint8 isLastBlock; ma_uint8 blockType; ma_uint32 blockSize; (void)onSeek; pInit->container = ma_dr_flac_container_native; if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return MA_FALSE; } if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { if (!relaxed) { return MA_FALSE; } else { pInit->hasStreamInfoBlock = MA_FALSE; pInit->hasMetadataBlocks = MA_FALSE; if (!ma_dr_flac__read_next_flac_frame_header(&pInit->bs, 0, &pInit->firstFrameHeader)) { return MA_FALSE; } if (pInit->firstFrameHeader.bitsPerSample == 0) { return MA_FALSE; } pInit->sampleRate = pInit->firstFrameHeader.sampleRate; pInit->channels = ma_dr_flac__get_channel_count_from_channel_assignment(pInit->firstFrameHeader.channelAssignment); pInit->bitsPerSample = pInit->firstFrameHeader.bitsPerSample; pInit->maxBlockSizeInPCMFrames = 65535; return MA_TRUE; } } else { ma_dr_flac_streaminfo streaminfo; if (!ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) { return MA_FALSE; } pInit->hasStreamInfoBlock = MA_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { ma_dr_flac_metadata metadata; metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } return MA_TRUE; } } #ifndef MA_DR_FLAC_NO_OGG #define MA_DR_FLAC_OGG_MAX_PAGE_SIZE 65307 #define MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32 1605413199 typedef enum { ma_dr_flac_ogg_recover_on_crc_mismatch, ma_dr_flac_ogg_fail_on_crc_mismatch } ma_dr_flac_ogg_crc_mismatch_recovery; #ifndef MA_DR_FLAC_NO_CRC static ma_uint32 ma_dr_flac__crc32_table[] = { 0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L, 0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L, 0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L, 0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL, 0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L, 0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L, 0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L, 0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL, 0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L, 0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L, 0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L, 0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL, 0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L, 0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L, 0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L, 0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL, 0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL, 0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L, 0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L, 0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL, 0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL, 0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L, 0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L, 0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL, 0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL, 0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L, 0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L, 0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL, 0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL, 0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L, 0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L, 0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL, 0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L, 0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL, 0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL, 0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L, 0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L, 0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL, 0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL, 0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L, 0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L, 0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL, 0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL, 0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L, 0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L, 0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL, 0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL, 0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L, 0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L, 0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL, 0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L, 0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L, 0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L, 0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL, 0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L, 0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L, 0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L, 0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL, 0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L, 0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L, 0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L, 0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL, 0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L, 0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L }; #endif static MA_INLINE ma_uint32 ma_dr_flac_crc32_byte(ma_uint32 crc32, ma_uint8 data) { #ifndef MA_DR_FLAC_NO_CRC return (crc32 << 8) ^ ma_dr_flac__crc32_table[(ma_uint8)((crc32 >> 24) & 0xFF) ^ data]; #else (void)data; return crc32; #endif } #if 0 static MA_INLINE ma_uint32 ma_dr_flac_crc32_uint32(ma_uint32 crc32, ma_uint32 data) { crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 24) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 16) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 8) & 0xFF)); crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 0) & 0xFF)); return crc32; } static MA_INLINE ma_uint32 ma_dr_flac_crc32_uint64(ma_uint32 crc32, ma_uint64 data) { crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >> 32) & 0xFFFFFFFF)); crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >> 0) & 0xFFFFFFFF)); return crc32; } #endif static MA_INLINE ma_uint32 ma_dr_flac_crc32_buffer(ma_uint32 crc32, ma_uint8* pData, ma_uint32 dataSize) { ma_uint32 i; for (i = 0; i < dataSize; ++i) { crc32 = ma_dr_flac_crc32_byte(crc32, pData[i]); } return crc32; } static MA_INLINE ma_bool32 ma_dr_flac_ogg__is_capture_pattern(ma_uint8 pattern[4]) { return pattern[0] == 'O' && pattern[1] == 'g' && pattern[2] == 'g' && pattern[3] == 'S'; } static MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_header_size(ma_dr_flac_ogg_page_header* pHeader) { return 27 + pHeader->segmentCount; } static MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_body_size(ma_dr_flac_ogg_page_header* pHeader) { ma_uint32 pageBodySize = 0; int i; for (i = 0; i < pHeader->segmentCount; ++i) { pageBodySize += pHeader->segmentTable[i]; } return pageBodySize; } static ma_result ma_dr_flac_ogg__read_page_header_after_capture_pattern(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32) { ma_uint8 data[23]; ma_uint32 i; MA_DR_FLAC_ASSERT(*pCRC32 == MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32); if (onRead(pUserData, data, 23) != 23) { return MA_AT_END; } *pBytesRead += 23; pHeader->capturePattern[0] = 'O'; pHeader->capturePattern[1] = 'g'; pHeader->capturePattern[2] = 'g'; pHeader->capturePattern[3] = 'S'; pHeader->structureVersion = data[0]; pHeader->headerType = data[1]; MA_DR_FLAC_COPY_MEMORY(&pHeader->granulePosition, &data[ 2], 8); MA_DR_FLAC_COPY_MEMORY(&pHeader->serialNumber, &data[10], 4); MA_DR_FLAC_COPY_MEMORY(&pHeader->sequenceNumber, &data[14], 4); MA_DR_FLAC_COPY_MEMORY(&pHeader->checksum, &data[18], 4); pHeader->segmentCount = data[22]; data[18] = 0; data[19] = 0; data[20] = 0; data[21] = 0; for (i = 0; i < 23; ++i) { *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, data[i]); } if (onRead(pUserData, pHeader->segmentTable, pHeader->segmentCount) != pHeader->segmentCount) { return MA_AT_END; } *pBytesRead += pHeader->segmentCount; for (i = 0; i < pHeader->segmentCount; ++i) { *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, pHeader->segmentTable[i]); } return MA_SUCCESS; } static ma_result ma_dr_flac_ogg__read_page_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32) { ma_uint8 id[4]; *pBytesRead = 0; if (onRead(pUserData, id, 4) != 4) { return MA_AT_END; } *pBytesRead += 4; for (;;) { if (ma_dr_flac_ogg__is_capture_pattern(id)) { ma_result result; *pCRC32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32; result = ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, pHeader, pBytesRead, pCRC32); if (result == MA_SUCCESS) { return MA_SUCCESS; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return result; } } } else { id[0] = id[1]; id[1] = id[2]; id[2] = id[3]; if (onRead(pUserData, &id[3], 1) != 1) { return MA_AT_END; } *pBytesRead += 1; } } } typedef struct { ma_dr_flac_read_proc onRead; ma_dr_flac_seek_proc onSeek; void* pUserData; ma_uint64 currentBytePos; ma_uint64 firstBytePos; ma_uint32 serialNumber; ma_dr_flac_ogg_page_header bosPageHeader; ma_dr_flac_ogg_page_header currentPageHeader; ma_uint32 bytesRemainingInPage; ma_uint32 pageDataSize; ma_uint8 pageData[MA_DR_FLAC_OGG_MAX_PAGE_SIZE]; } ma_dr_flac_oggbs; static size_t ma_dr_flac_oggbs__read_physical(ma_dr_flac_oggbs* oggbs, void* bufferOut, size_t bytesToRead) { size_t bytesActuallyRead = oggbs->onRead(oggbs->pUserData, bufferOut, bytesToRead); oggbs->currentBytePos += bytesActuallyRead; return bytesActuallyRead; } static ma_bool32 ma_dr_flac_oggbs__seek_physical(ma_dr_flac_oggbs* oggbs, ma_uint64 offset, ma_dr_flac_seek_origin origin) { if (origin == ma_dr_flac_seek_origin_start) { if (offset <= 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } oggbs->currentBytePos = offset; return MA_TRUE; } else { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } oggbs->currentBytePos = offset; return ma_dr_flac_oggbs__seek_physical(oggbs, offset - 0x7FFFFFFF, ma_dr_flac_seek_origin_current); } } else { while (offset > 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } oggbs->currentBytePos += 0x7FFFFFFF; offset -= 0x7FFFFFFF; } if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } oggbs->currentBytePos += offset; return MA_TRUE; } } static ma_bool32 ma_dr_flac_oggbs__goto_next_page(ma_dr_flac_oggbs* oggbs, ma_dr_flac_ogg_crc_mismatch_recovery recoveryMethod) { ma_dr_flac_ogg_page_header header; for (;;) { ma_uint32 crc32 = 0; ma_uint32 bytesRead; ma_uint32 pageBodySize; #ifndef MA_DR_FLAC_NO_CRC ma_uint32 actualCRC32; #endif if (ma_dr_flac_ogg__read_page_header(oggbs->onRead, oggbs->pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } oggbs->currentBytePos += bytesRead; pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header); if (pageBodySize > MA_DR_FLAC_OGG_MAX_PAGE_SIZE) { continue; } if (header.serialNumber != oggbs->serialNumber) { if (pageBodySize > 0 && !ma_dr_flac_oggbs__seek_physical(oggbs, pageBodySize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } continue; } if (ma_dr_flac_oggbs__read_physical(oggbs, oggbs->pageData, pageBodySize) != pageBodySize) { return MA_FALSE; } oggbs->pageDataSize = pageBodySize; #ifndef MA_DR_FLAC_NO_CRC actualCRC32 = ma_dr_flac_crc32_buffer(crc32, oggbs->pageData, oggbs->pageDataSize); if (actualCRC32 != header.checksum) { if (recoveryMethod == ma_dr_flac_ogg_recover_on_crc_mismatch) { continue; } else { ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch); return MA_FALSE; } } #else (void)recoveryMethod; #endif oggbs->currentPageHeader = header; oggbs->bytesRemainingInPage = pageBodySize; return MA_TRUE; } } #if 0 static ma_uint8 ma_dr_flac_oggbs__get_current_segment_index(ma_dr_flac_oggbs* oggbs, ma_uint8* pBytesRemainingInSeg) { ma_uint32 bytesConsumedInPage = ma_dr_flac_ogg__get_page_body_size(&oggbs->currentPageHeader) - oggbs->bytesRemainingInPage; ma_uint8 iSeg = 0; ma_uint32 iByte = 0; while (iByte < bytesConsumedInPage) { ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (iByte + segmentSize > bytesConsumedInPage) { break; } else { iSeg += 1; iByte += segmentSize; } } *pBytesRemainingInSeg = oggbs->currentPageHeader.segmentTable[iSeg] - (ma_uint8)(bytesConsumedInPage - iByte); return iSeg; } static ma_bool32 ma_dr_flac_oggbs__seek_to_next_packet(ma_dr_flac_oggbs* oggbs) { for (;;) { ma_bool32 atEndOfPage = MA_FALSE; ma_uint8 bytesRemainingInSeg; ma_uint8 iFirstSeg = ma_dr_flac_oggbs__get_current_segment_index(oggbs, &bytesRemainingInSeg); ma_uint32 bytesToEndOfPacketOrPage = bytesRemainingInSeg; for (ma_uint8 iSeg = iFirstSeg; iSeg < oggbs->currentPageHeader.segmentCount; ++iSeg) { ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (segmentSize < 255) { if (iSeg == oggbs->currentPageHeader.segmentCount-1) { atEndOfPage = MA_TRUE; } break; } bytesToEndOfPacketOrPage += segmentSize; } ma_dr_flac_oggbs__seek_physical(oggbs, bytesToEndOfPacketOrPage, ma_dr_flac_seek_origin_current); oggbs->bytesRemainingInPage -= bytesToEndOfPacketOrPage; if (atEndOfPage) { if (!ma_dr_flac_oggbs__goto_next_page(oggbs)) { return MA_FALSE; } if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { return MA_TRUE; } } else { return MA_TRUE; } } } static ma_bool32 ma_dr_flac_oggbs__seek_to_next_frame(ma_dr_flac_oggbs* oggbs) { return ma_dr_flac_oggbs__seek_to_next_packet(oggbs); } #endif static size_t ma_dr_flac__on_read_ogg(void* pUserData, void* bufferOut, size_t bytesToRead) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData; ma_uint8* pRunningBufferOut = (ma_uint8*)bufferOut; size_t bytesRead = 0; MA_DR_FLAC_ASSERT(oggbs != NULL); MA_DR_FLAC_ASSERT(pRunningBufferOut != NULL); while (bytesRead < bytesToRead) { size_t bytesRemainingToRead = bytesToRead - bytesRead; if (oggbs->bytesRemainingInPage >= bytesRemainingToRead) { MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), bytesRemainingToRead); bytesRead += bytesRemainingToRead; oggbs->bytesRemainingInPage -= (ma_uint32)bytesRemainingToRead; break; } if (oggbs->bytesRemainingInPage > 0) { MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), oggbs->bytesRemainingInPage); bytesRead += oggbs->bytesRemainingInPage; pRunningBufferOut += oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } MA_DR_FLAC_ASSERT(bytesRemainingToRead > 0); if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { break; } } return bytesRead; } static ma_bool32 ma_dr_flac__on_seek_ogg(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData; int bytesSeeked = 0; MA_DR_FLAC_ASSERT(oggbs != NULL); MA_DR_FLAC_ASSERT(offset >= 0); if (origin == ma_dr_flac_seek_origin_start) { if (!ma_dr_flac_oggbs__seek_physical(oggbs, (int)oggbs->firstBytePos, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) { return MA_FALSE; } return ma_dr_flac__on_seek_ogg(pUserData, offset, ma_dr_flac_seek_origin_current); } MA_DR_FLAC_ASSERT(origin == ma_dr_flac_seek_origin_current); while (bytesSeeked < offset) { int bytesRemainingToSeek = offset - bytesSeeked; MA_DR_FLAC_ASSERT(bytesRemainingToSeek >= 0); if (oggbs->bytesRemainingInPage >= (size_t)bytesRemainingToSeek) { bytesSeeked += bytesRemainingToSeek; (void)bytesSeeked; oggbs->bytesRemainingInPage -= bytesRemainingToSeek; break; } if (oggbs->bytesRemainingInPage > 0) { bytesSeeked += (int)oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } MA_DR_FLAC_ASSERT(bytesRemainingToSeek > 0); if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) { return MA_FALSE; } } return MA_TRUE; } static ma_bool32 ma_dr_flac_ogg__seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; ma_uint64 originalBytePos; ma_uint64 runningGranulePosition; ma_uint64 runningFrameBytePos; ma_uint64 runningPCMFrameCount; MA_DR_FLAC_ASSERT(oggbs != NULL); originalBytePos = oggbs->currentBytePos; if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes)) { return MA_FALSE; } oggbs->bytesRemainingInPage = 0; runningGranulePosition = 0; for (;;) { if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { ma_dr_flac_oggbs__seek_physical(oggbs, originalBytePos, ma_dr_flac_seek_origin_start); return MA_FALSE; } runningFrameBytePos = oggbs->currentBytePos - ma_dr_flac_ogg__get_page_header_size(&oggbs->currentPageHeader) - oggbs->pageDataSize; if (oggbs->currentPageHeader.granulePosition >= pcmFrameIndex) { break; } if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { if (oggbs->currentPageHeader.segmentTable[0] >= 2) { ma_uint8 firstBytesInPage[2]; firstBytesInPage[0] = oggbs->pageData[0]; firstBytesInPage[1] = oggbs->pageData[1]; if ((firstBytesInPage[0] == 0xFF) && (firstBytesInPage[1] & 0xFC) == 0xF8) { runningGranulePosition = oggbs->currentPageHeader.granulePosition; } continue; } } } if (!ma_dr_flac_oggbs__seek_physical(oggbs, runningFrameBytePos, ma_dr_flac_seek_origin_start)) { return MA_FALSE; } if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) { return MA_FALSE; } runningPCMFrameCount = runningGranulePosition; for (;;) { ma_uint64 firstPCMFrameInFLACFrame = 0; ma_uint64 lastPCMFrameInFLACFrame = 0; ma_uint64 pcmFrameCountInThisFrame; if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return MA_FALSE; } ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex == pFlac->totalPCMFrameCount && (runningPCMFrameCount + pcmFrameCountInThisFrame) == pFlac->totalPCMFrameCount) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { pFlac->currentPCMFrame = pcmFrameIndex; pFlac->currentFLACFrame.pcmFramesRemaining = 0; return MA_TRUE; } else { return MA_FALSE; } } if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFrame)) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { ma_uint64 pcmFramesToDecode = (size_t)(pcmFrameIndex - runningPCMFrameCount); if (pcmFramesToDecode == 0) { return MA_TRUE; } pFlac->currentPCMFrame = runningPCMFrameCount; return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } } else { ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac); if (result == MA_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFrame; } else { if (result == MA_CRC_MISMATCH) { continue; } else { return MA_FALSE; } } } } } static ma_bool32 ma_dr_flac__init_private__ogg(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed) { ma_dr_flac_ogg_page_header header; ma_uint32 crc32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32; ma_uint32 bytesRead = 0; (void)relaxed; pInit->container = ma_dr_flac_container_ogg; pInit->oggFirstBytePos = 0; if (ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } pInit->runningFilePos += bytesRead; for (;;) { int pageBodySize; if ((header.headerType & 0x02) == 0) { return MA_FALSE; } pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header); if (pageBodySize == 51) { ma_uint32 bytesRemainingInPage = pageBodySize; ma_uint8 packetType; if (onRead(pUserData, &packetType, 1) != 1) { return MA_FALSE; } bytesRemainingInPage -= 1; if (packetType == 0x7F) { ma_uint8 sig[4]; if (onRead(pUserData, sig, 4) != 4) { return MA_FALSE; } bytesRemainingInPage -= 4; if (sig[0] == 'F' && sig[1] == 'L' && sig[2] == 'A' && sig[3] == 'C') { ma_uint8 mappingVersion[2]; if (onRead(pUserData, mappingVersion, 2) != 2) { return MA_FALSE; } if (mappingVersion[0] != 1) { return MA_FALSE; } if (!onSeek(pUserData, 2, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } if (onRead(pUserData, sig, 4) != 4) { return MA_FALSE; } if (sig[0] == 'f' && sig[1] == 'L' && sig[2] == 'a' && sig[3] == 'C') { ma_dr_flac_streaminfo streaminfo; ma_uint8 isLastBlock; ma_uint8 blockType; ma_uint32 blockSize; if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return MA_FALSE; } if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { return MA_FALSE; } if (ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) { pInit->hasStreamInfoBlock = MA_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { ma_dr_flac_metadata metadata; metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } pInit->runningFilePos += pageBodySize; pInit->oggFirstBytePos = pInit->runningFilePos - 79; pInit->oggSerial = header.serialNumber; pInit->oggBosHeader = header; break; } else { return MA_FALSE; } } else { return MA_FALSE; } } else { if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } } else { if (!onSeek(pUserData, pageBodySize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } } pInit->runningFilePos += pageBodySize; if (ma_dr_flac_ogg__read_page_header(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) { return MA_FALSE; } pInit->runningFilePos += bytesRead; } pInit->hasMetadataBlocks = MA_TRUE; return MA_TRUE; } #endif static ma_bool32 ma_dr_flac__init_private(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD) { ma_bool32 relaxed; ma_uint8 id[4]; if (pInit == NULL || onRead == NULL || onSeek == NULL) { return MA_FALSE; } MA_DR_FLAC_ZERO_MEMORY(pInit, sizeof(*pInit)); pInit->onRead = onRead; pInit->onSeek = onSeek; pInit->onMeta = onMeta; pInit->container = container; pInit->pUserData = pUserData; pInit->pUserDataMD = pUserDataMD; pInit->bs.onRead = onRead; pInit->bs.onSeek = onSeek; pInit->bs.pUserData = pUserData; ma_dr_flac__reset_cache(&pInit->bs); relaxed = container != ma_dr_flac_container_unknown; for (;;) { if (onRead(pUserData, id, 4) != 4) { return MA_FALSE; } pInit->runningFilePos += 4; if (id[0] == 'I' && id[1] == 'D' && id[2] == '3') { ma_uint8 header[6]; ma_uint8 flags; ma_uint32 headerSize; if (onRead(pUserData, header, 6) != 6) { return MA_FALSE; } pInit->runningFilePos += 6; flags = header[1]; MA_DR_FLAC_COPY_MEMORY(&headerSize, header+2, 4); headerSize = ma_dr_flac__unsynchsafe_32(ma_dr_flac__be2host_32(headerSize)); if (flags & 0x10) { headerSize += 10; } if (!onSeek(pUserData, headerSize, ma_dr_flac_seek_origin_current)) { return MA_FALSE; } pInit->runningFilePos += headerSize; } else { break; } } if (id[0] == 'f' && id[1] == 'L' && id[2] == 'a' && id[3] == 'C') { return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef MA_DR_FLAC_NO_OGG if (id[0] == 'O' && id[1] == 'g' && id[2] == 'g' && id[3] == 'S') { return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif if (relaxed) { if (container == ma_dr_flac_container_native) { return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef MA_DR_FLAC_NO_OGG if (container == ma_dr_flac_container_ogg) { return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif } return MA_FALSE; } static void ma_dr_flac__init_from_info(ma_dr_flac* pFlac, const ma_dr_flac_init_info* pInit) { MA_DR_FLAC_ASSERT(pFlac != NULL); MA_DR_FLAC_ASSERT(pInit != NULL); MA_DR_FLAC_ZERO_MEMORY(pFlac, sizeof(*pFlac)); pFlac->bs = pInit->bs; pFlac->onMeta = pInit->onMeta; pFlac->pUserDataMD = pInit->pUserDataMD; pFlac->maxBlockSizeInPCMFrames = pInit->maxBlockSizeInPCMFrames; pFlac->sampleRate = pInit->sampleRate; pFlac->channels = (ma_uint8)pInit->channels; pFlac->bitsPerSample = (ma_uint8)pInit->bitsPerSample; pFlac->totalPCMFrameCount = pInit->totalPCMFrameCount; pFlac->container = pInit->container; } static ma_dr_flac* ma_dr_flac_open_with_metadata_private(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac_init_info init; ma_uint32 allocationSize; ma_uint32 wholeSIMDVectorCountPerChannel; ma_uint32 decodedSamplesAllocationSize; #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac_oggbs* pOggbs = NULL; #endif ma_uint64 firstFramePos; ma_uint64 seektablePos; ma_uint32 seekpointCount; ma_allocation_callbacks allocationCallbacks; ma_dr_flac* pFlac; ma_dr_flac__init_cpu_caps(); if (!ma_dr_flac__init_private(&init, onRead, onSeek, onMeta, container, pUserData, pUserDataMD)) { return NULL; } if (pAllocationCallbacks != NULL) { allocationCallbacks = *pAllocationCallbacks; if (allocationCallbacks.onFree == NULL || (allocationCallbacks.onMalloc == NULL && allocationCallbacks.onRealloc == NULL)) { return NULL; } } else { allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_flac__malloc_default; allocationCallbacks.onRealloc = ma_dr_flac__realloc_default; allocationCallbacks.onFree = ma_dr_flac__free_default; } allocationSize = sizeof(ma_dr_flac); if ((init.maxBlockSizeInPCMFrames % (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) == 0) { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))); } else { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) + 1; } decodedSamplesAllocationSize = wholeSIMDVectorCountPerChannel * MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE * init.channels; allocationSize += decodedSamplesAllocationSize; allocationSize += MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { allocationSize += sizeof(ma_dr_flac_oggbs); pOggbs = (ma_dr_flac_oggbs*)ma_dr_flac__malloc_from_callbacks(sizeof(*pOggbs), &allocationCallbacks); if (pOggbs == NULL) { return NULL; } MA_DR_FLAC_ZERO_MEMORY(pOggbs, sizeof(*pOggbs)); pOggbs->onRead = onRead; pOggbs->onSeek = onSeek; pOggbs->pUserData = pUserData; pOggbs->currentBytePos = init.oggFirstBytePos; pOggbs->firstBytePos = init.oggFirstBytePos; pOggbs->serialNumber = init.oggSerial; pOggbs->bosPageHeader = init.oggBosHeader; pOggbs->bytesRemainingInPage = 0; } #endif firstFramePos = 42; seektablePos = 0; seekpointCount = 0; if (init.hasMetadataBlocks) { ma_dr_flac_read_proc onReadOverride = onRead; ma_dr_flac_seek_proc onSeekOverride = onSeek; void* pUserDataOverride = pUserData; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { onReadOverride = ma_dr_flac__on_read_ogg; onSeekOverride = ma_dr_flac__on_seek_ogg; pUserDataOverride = (void*)pOggbs; } #endif if (!ma_dr_flac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seekpointCount, &allocationCallbacks)) { #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); #endif return NULL; } allocationSize += seekpointCount * sizeof(ma_dr_flac_seekpoint); } pFlac = (ma_dr_flac*)ma_dr_flac__malloc_from_callbacks(allocationSize, &allocationCallbacks); if (pFlac == NULL) { #ifndef MA_DR_FLAC_NO_OGG ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); #endif return NULL; } ma_dr_flac__init_from_info(pFlac, &init); pFlac->allocationCallbacks = allocationCallbacks; pFlac->pDecodedSamples = (ma_int32*)ma_dr_flac_align((size_t)pFlac->pExtraData, MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE); #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* pInternalOggbs = (ma_dr_flac_oggbs*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + (seekpointCount * sizeof(ma_dr_flac_seekpoint))); MA_DR_FLAC_COPY_MEMORY(pInternalOggbs, pOggbs, sizeof(*pOggbs)); ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks); pOggbs = NULL; pFlac->bs.onRead = ma_dr_flac__on_read_ogg; pFlac->bs.onSeek = ma_dr_flac__on_seek_ogg; pFlac->bs.pUserData = (void*)pInternalOggbs; pFlac->_oggbs = (void*)pInternalOggbs; } #endif pFlac->firstFLACFramePosInBytes = firstFramePos; #ifndef MA_DR_FLAC_NO_OGG if (init.container == ma_dr_flac_container_ogg) { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } else #endif { if (seektablePos != 0) { pFlac->seekpointCount = seekpointCount; pFlac->pSeekpoints = (ma_dr_flac_seekpoint*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize); MA_DR_FLAC_ASSERT(pFlac->bs.onSeek != NULL); MA_DR_FLAC_ASSERT(pFlac->bs.onRead != NULL); if (pFlac->bs.onSeek(pFlac->bs.pUserData, (int)seektablePos, ma_dr_flac_seek_origin_start)) { ma_uint32 iSeekpoint; for (iSeekpoint = 0; iSeekpoint < seekpointCount; iSeekpoint += 1) { if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints + iSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) == MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) { pFlac->pSeekpoints[iSeekpoint].firstPCMFrame = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].firstPCMFrame); pFlac->pSeekpoints[iSeekpoint].flacFrameOffset = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].flacFrameOffset); pFlac->pSeekpoints[iSeekpoint].pcmFrameCount = ma_dr_flac__be2host_16(pFlac->pSeekpoints[iSeekpoint].pcmFrameCount); } else { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; break; } } if (!pFlac->bs.onSeek(pFlac->bs.pUserData, (int)pFlac->firstFLACFramePosInBytes, ma_dr_flac_seek_origin_start)) { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } else { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } } } if (!init.hasStreamInfoBlock) { pFlac->currentFLACFrame.header = init.firstFrameHeader; for (;;) { ma_result result = ma_dr_flac__decode_flac_frame(pFlac); if (result == MA_SUCCESS) { break; } else { if (result == MA_CRC_MISMATCH) { if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } continue; } else { ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } } } return pFlac; } #ifndef MA_DR_FLAC_NO_STDIO #include #ifndef MA_DR_FLAC_NO_WCHAR #include #endif static size_t ma_dr_flac__on_read_stdio(void* pUserData, void* bufferOut, size_t bytesToRead) { return fread(bufferOut, 1, bytesToRead, (FILE*)pUserData); } static ma_bool32 ma_dr_flac__on_seek_stdio(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { MA_DR_FLAC_ASSERT(offset >= 0); return fseek((FILE*)pUserData, offset, (origin == ma_dr_flac_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_fopen(&pFile, pFileName, "rb") != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } #ifndef MA_DR_FLAC_NO_WCHAR MA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } #endif MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_fopen(&pFile, pFileName, "rb") != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } #ifndef MA_DR_FLAC_NO_WCHAR MA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; FILE* pFile; if (ma_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return NULL; } pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } #endif #endif static size_t ma_dr_flac__on_read_memory(void* pUserData, void* bufferOut, size_t bytesToRead) { ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData; size_t bytesRemaining; MA_DR_FLAC_ASSERT(memoryStream != NULL); MA_DR_FLAC_ASSERT(memoryStream->dataSize >= memoryStream->currentReadPos); bytesRemaining = memoryStream->dataSize - memoryStream->currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_FLAC_COPY_MEMORY(bufferOut, memoryStream->data + memoryStream->currentReadPos, bytesToRead); memoryStream->currentReadPos += bytesToRead; } return bytesToRead; } static ma_bool32 ma_dr_flac__on_seek_memory(void* pUserData, int offset, ma_dr_flac_seek_origin origin) { ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData; MA_DR_FLAC_ASSERT(memoryStream != NULL); MA_DR_FLAC_ASSERT(offset >= 0); if (offset > (ma_int64)memoryStream->dataSize) { return MA_FALSE; } if (origin == ma_dr_flac_seek_origin_current) { if (memoryStream->currentReadPos + offset <= memoryStream->dataSize) { memoryStream->currentReadPos += offset; } else { return MA_FALSE; } } else { if ((ma_uint32)offset <= memoryStream->dataSize) { memoryStream->currentReadPos = offset; } else { return MA_FALSE; } } return MA_TRUE; } MA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac__memory_stream memoryStream; ma_dr_flac* pFlac; memoryStream.data = (const ma_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = ma_dr_flac_open(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, &memoryStream, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } MA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac__memory_stream memoryStream; ma_dr_flac* pFlac; memoryStream.data = (const ma_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, onMeta, ma_dr_flac_container_unknown, &memoryStream, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } MA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, container, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } MA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, container, pUserData, pUserData, pAllocationCallbacks); } MA_API void ma_dr_flac_close(ma_dr_flac* pFlac) { if (pFlac == NULL) { return; } #ifndef MA_DR_FLAC_NO_STDIO if (pFlac->bs.onRead == ma_dr_flac__on_read_stdio) { fclose((FILE*)pFlac->bs.pUserData); } #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs; MA_DR_FLAC_ASSERT(pFlac->bs.onRead == ma_dr_flac__on_read_ogg); if (oggbs->onRead == ma_dr_flac__on_read_stdio) { fclose((FILE*)oggbs->pUserData); } } #endif #endif ma_dr_flac__free_from_callbacks(pFlac, &pFlac->allocationCallbacks); } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (ma_int32)left0; pOutputSamples[i*8+1] = (ma_int32)right0; pOutputSamples[i*8+2] = (ma_int32)left1; pOutputSamples[i*8+3] = (ma_int32)right1; pOutputSamples[i*8+4] = (ma_int32)left2; pOutputSamples[i*8+5] = (ma_int32)right2; pOutputSamples[i*8+6] = (ma_int32)left3; pOutputSamples[i*8+7] = (ma_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (ma_int32)left0; pOutputSamples[i*8+1] = (ma_int32)right0; pOutputSamples[i*8+2] = (ma_int32)left1; pOutputSamples[i*8+3] = (ma_int32)right1; pOutputSamples[i*8+4] = (ma_int32)left2; pOutputSamples[i*8+5] = (ma_int32)right2; pOutputSamples[i*8+6] = (ma_int32)left3; pOutputSamples[i*8+7] = (ma_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left; pOutputSamples[i*2+1] = (ma_int32)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (ma_int32)temp0L; pOutputSamples[i*8+1] = (ma_int32)temp0R; pOutputSamples[i*8+2] = (ma_int32)temp1L; pOutputSamples[i*8+3] = (ma_int32)temp1R; pOutputSamples[i*8+4] = (ma_int32)temp2L; pOutputSamples[i*8+5] = (ma_int32)temp2R; pOutputSamples[i*8+6] = (ma_int32)temp3L; pOutputSamples[i*8+7] = (ma_int32)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1); temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1); temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1); temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1); temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1); temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1); temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1); temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (ma_int32)temp0L; pOutputSamples[i*8+1] = (ma_int32)temp0R; pOutputSamples[i*8+2] = (ma_int32)temp1L; pOutputSamples[i*8+3] = (ma_int32)temp1R; pOutputSamples[i*8+4] = (ma_int32)temp2L; pOutputSamples[i*8+5] = (ma_int32)temp2R; pOutputSamples[i*8+6] = (ma_int32)temp3L; pOutputSamples[i*8+7] = (ma_int32)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift); } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_int32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; int32x4_t wbpsShift1_4; uint32x4_t one4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); one4 = vdupq_n_u32(1); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1; } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift); } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)); pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (ma_int32)tempL0; pOutputSamples[i*8+1] = (ma_int32)tempR0; pOutputSamples[i*8+2] = (ma_int32)tempL1; pOutputSamples[i*8+3] = (ma_int32)tempR1; pOutputSamples[i*8+4] = (ma_int32)tempL2; pOutputSamples[i*8+5] = (ma_int32)tempR2; pOutputSamples[i*8+6] = (ma_int32)tempL3; pOutputSamples[i*8+7] = (ma_int32)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift4_0 = vdupq_n_s32(shift0); int32x4_t shift4_1 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift4_0)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift4_1)); ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_s32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { pBufferOut[(i*channelCount)+j] = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)left0; pOutputSamples[i*8+1] = (ma_int16)right0; pOutputSamples[i*8+2] = (ma_int16)left1; pOutputSamples[i*8+3] = (ma_int16)right1; pOutputSamples[i*8+4] = (ma_int16)left2; pOutputSamples[i*8+5] = (ma_int16)right2; pOutputSamples[i*8+6] = (ma_int16)left3; pOutputSamples[i*8+7] = (ma_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)left0; pOutputSamples[i*8+1] = (ma_int16)right0; pOutputSamples[i*8+2] = (ma_int16)left1; pOutputSamples[i*8+3] = (ma_int16)right1; pOutputSamples[i*8+4] = (ma_int16)left2; pOutputSamples[i*8+5] = (ma_int16)right2; pOutputSamples[i*8+6] = (ma_int16)left3; pOutputSamples[i*8+7] = (ma_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (ma_int16)left; pOutputSamples[i*2+1] = (ma_int16)right; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (ma_int16)temp0L; pOutputSamples[i*8+1] = (ma_int16)temp0R; pOutputSamples[i*8+2] = (ma_int16)temp1L; pOutputSamples[i*8+3] = (ma_int16)temp1R; pOutputSamples[i*8+4] = (ma_int16)temp2L; pOutputSamples[i*8+5] = (ma_int16)temp2R; pOutputSamples[i*8+6] = (ma_int16)temp3L; pOutputSamples[i*8+7] = (ma_int16)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = ((ma_int32)(mid0 + side0) >> 1); temp1L = ((ma_int32)(mid1 + side1) >> 1); temp2L = ((ma_int32)(mid2 + side2) >> 1); temp3L = ((ma_int32)(mid3 + side3) >> 1); temp0R = ((ma_int32)(mid0 - side0) >> 1); temp1R = ((ma_int32)(mid1 - side1) >> 1); temp2R = ((ma_int32)(mid2 - side2) >> 1); temp3R = ((ma_int32)(mid3 - side3) >> 1); temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (ma_int16)temp0L; pOutputSamples[i*8+1] = (ma_int16)temp0R; pOutputSamples[i*8+2] = (ma_int16)temp1L; pOutputSamples[i*8+3] = (ma_int16)temp1R; pOutputSamples[i*8+4] = (ma_int16)temp2L; pOutputSamples[i*8+5] = (ma_int16)temp2R; pOutputSamples[i*8+6] = (ma_int16)temp3L; pOutputSamples[i*8+7] = (ma_int16)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16); } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16); } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; int32x4_t wbpsShift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16); } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16); } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) >> 16); pOutputSamples[i*2+1] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; tempL0 >>= 16; tempL1 >>= 16; tempL2 >>= 16; tempL3 >>= 16; tempR0 >>= 16; tempR1 >>= 16; tempR2 >>= 16; tempR3 >>= 16; pOutputSamples[i*8+0] = (ma_int16)tempL0; pOutputSamples[i*8+1] = (ma_int16)tempR0; pOutputSamples[i*8+2] = (ma_int16)tempL1; pOutputSamples[i*8+3] = (ma_int16)tempR1; pOutputSamples[i*8+4] = (ma_int16)tempL2; pOutputSamples[i*8+5] = (ma_int16)tempR2; pOutputSamples[i*8+6] = (ma_int16)tempL3; pOutputSamples[i*8+7] = (ma_int16)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_s16__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (ma_int16)(sampleS32 >> 16); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 left = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 side = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 right = left - side; pOutputSamples[i*2+0] = (float)((ma_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 right0 = left0 - side0; ma_uint32 right1 = left1 - side1; ma_uint32 right2 = left2 - side2; ma_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (ma_int32)left0 * factor; pOutputSamples[i*8+1] = (ma_int32)right0 * factor; pOutputSamples[i*8+2] = (ma_int32)left1 * factor; pOutputSamples[i*8+3] = (ma_int32)right1 * factor; pOutputSamples[i*8+4] = (ma_int32)left2 * factor; pOutputSamples[i*8+5] = (ma_int32)right2 * factor; pOutputSamples[i*8+6] = (ma_int32)left3 * factor; pOutputSamples[i*8+7] = (ma_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left * factor; pOutputSamples[i*2+1] = (ma_int32)right * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; float32x4_t leftf; float32x4_t rightf; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 left = pInputSamples0U32[i] << shift0; ma_uint32 side = pInputSamples1U32[i] << shift1; ma_uint32 right = left - side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; for (i = 0; i < frameCount; ++i) { ma_uint32 side = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); ma_uint32 left = right + side; pOutputSamples[i*2+0] = (float)((ma_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; ma_uint32 left0 = right0 + side0; ma_uint32 left1 = right1 + side1; ma_uint32 left2 = right2 + side2; ma_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (ma_int32)left0 * factor; pOutputSamples[i*8+1] = (ma_int32)right0 * factor; pOutputSamples[i*8+2] = (ma_int32)left1 * factor; pOutputSamples[i*8+3] = (ma_int32)right1 * factor; pOutputSamples[i*8+4] = (ma_int32)left2 * factor; pOutputSamples[i*8+5] = (ma_int32)right2 * factor; pOutputSamples[i*8+6] = (ma_int32)left3 * factor; pOutputSamples[i*8+7] = (ma_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left * factor; pOutputSamples[i*2+1] = (ma_int32)right * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; float32x4_t leftf; float32x4_t rightf; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 side = pInputSamples0U32[i] << shift0; ma_uint32 right = pInputSamples1U32[i] << shift1; ma_uint32 left = right + side; pOutputSamples[i*2+0] = (ma_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { ma_uint32 mid = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (float)((((ma_int32)(mid + side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((((ma_int32)(mid - side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample; float factor = 1 / 2147483648.0; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (ma_int32)temp0L * factor; pOutputSamples[i*8+1] = (ma_int32)temp0R * factor; pOutputSamples[i*8+2] = (ma_int32)temp1L * factor; pOutputSamples[i*8+3] = (ma_int32)temp1R * factor; pOutputSamples[i*8+4] = (ma_int32)temp2L * factor; pOutputSamples[i*8+5] = (ma_int32)temp2R * factor; pOutputSamples[i*8+6] = (ma_int32)temp3L * factor; pOutputSamples[i*8+7] = (ma_int32)temp3R * factor; } } else { for (i = 0; i < frameCount4; ++i) { ma_uint32 temp0L; ma_uint32 temp1L; ma_uint32 temp2L; ma_uint32 temp3L; ma_uint32 temp0R; ma_uint32 temp1R; ma_uint32 temp2R; ma_uint32 temp3R; ma_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1); temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1); temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1); temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1); temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1); temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1); temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1); temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (ma_int32)temp0L * factor; pOutputSamples[i*8+1] = (ma_int32)temp0R * factor; pOutputSamples[i*8+2] = (ma_int32)temp1L * factor; pOutputSamples[i*8+3] = (ma_int32)temp1R * factor; pOutputSamples[i*8+4] = (ma_int32)temp2L * factor; pOutputSamples[i*8+5] = (ma_int32)temp2R * factor; pOutputSamples[i*8+6] = (ma_int32)temp3L * factor; pOutputSamples[i*8+7] = (ma_int32)temp3R * factor; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) * factor; pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample - 8; float factor; __m128 factor128; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor128 = _mm_set1_ps(factor); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); tempR = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); tempR = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor; } } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift = unusedBitsPerSample - 8; float factor; float32x4_t factor4; int32x4_t shift4; int32x4_t wbps0_4; int32x4_t wbps1_4; MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor4 = vdupq_n_f32(factor); wbps0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbps1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; uint32x4_t mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); uint32x4_t side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); righti = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); righti = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { ma_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor; } } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { for (ma_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (float)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) / 2147483648.0); } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (ma_int32)tempL0 * factor; pOutputSamples[i*8+1] = (ma_int32)tempR0 * factor; pOutputSamples[i*8+2] = (ma_int32)tempL1 * factor; pOutputSamples[i*8+3] = (ma_int32)tempR1 * factor; pOutputSamples[i*8+4] = (ma_int32)tempL2 * factor; pOutputSamples[i*8+5] = (ma_int32)tempR2 * factor; pOutputSamples[i*8+6] = (ma_int32)tempL3 * factor; pOutputSamples[i*8+7] = (ma_int32)tempR3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #if defined(MA_DR_FLAC_SUPPORT_SSE2) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; __m128 factor128 = _mm_set1_ps(factor); for (i = 0; i < frameCount4; ++i) { __m128i lefti; __m128i righti; __m128 leftf; __m128 rightf; lefti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); righti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(lefti), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(righti), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif #if defined(MA_DR_FLAC_SUPPORT_NEON) static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { ma_uint64 i; ma_uint64 frameCount4 = frameCount >> 2; const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0; const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1; ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; float32x4_t factor4 = vdupq_n_f32(factor); int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; lefti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); righti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif static MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples) { #if defined(MA_DR_FLAC_SUPPORT_SSE2) if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(MA_DR_FLAC_SUPPORT_NEON) if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { #if 0 ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } MA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut) { ma_uint64 framesRead; ma_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead); } MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) { break; } } else { unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; ma_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { ma_dr_flac_read_pcm_frames_f32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { ma_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (float)(sampleS32 / 2147483648.0); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (unsigned int)frameCountThisIteration; } } return framesRead; } MA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex) { if (pFlac == NULL) { return MA_FALSE; } if (pFlac->currentPCMFrame == pcmFrameIndex) { return MA_TRUE; } if (pFlac->firstFLACFramePosInBytes == 0) { return MA_FALSE; } if (pcmFrameIndex == 0) { pFlac->currentPCMFrame = 0; return ma_dr_flac__seek_to_first_frame(pFlac); } else { ma_bool32 wasSuccessful = MA_FALSE; ma_uint64 originalPCMFrame = pFlac->currentPCMFrame; if (pcmFrameIndex > pFlac->totalPCMFrameCount) { pcmFrameIndex = pFlac->totalPCMFrameCount; } if (pcmFrameIndex > pFlac->currentPCMFrame) { ma_uint32 offset = (ma_uint32)(pcmFrameIndex - pFlac->currentPCMFrame); if (pFlac->currentFLACFrame.pcmFramesRemaining > offset) { pFlac->currentFLACFrame.pcmFramesRemaining -= offset; pFlac->currentPCMFrame = pcmFrameIndex; return MA_TRUE; } } else { ma_uint32 offsetAbs = (ma_uint32)(pFlac->currentPCMFrame - pcmFrameIndex); ma_uint32 currentFLACFramePCMFrameCount = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; ma_uint32 currentFLACFramePCMFramesConsumed = currentFLACFramePCMFrameCount - pFlac->currentFLACFrame.pcmFramesRemaining; if (currentFLACFramePCMFramesConsumed > offsetAbs) { pFlac->currentFLACFrame.pcmFramesRemaining += offsetAbs; pFlac->currentPCMFrame = pcmFrameIndex; return MA_TRUE; } } #ifndef MA_DR_FLAC_NO_OGG if (pFlac->container == ma_dr_flac_container_ogg) { wasSuccessful = ma_dr_flac_ogg__seek_to_pcm_frame(pFlac, pcmFrameIndex); } else #endif { if (!pFlac->_noSeekTableSeek) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__seek_table(pFlac, pcmFrameIndex); } #if !defined(MA_DR_FLAC_NO_CRC) if (!wasSuccessful && !pFlac->_noBinarySearchSeek && pFlac->totalPCMFrameCount > 0) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__binary_search(pFlac, pcmFrameIndex); } #endif if (!wasSuccessful && !pFlac->_noBruteForceSeek) { wasSuccessful = ma_dr_flac__seek_to_pcm_frame__brute_force(pFlac, pcmFrameIndex); } } if (wasSuccessful) { pFlac->currentPCMFrame = pcmFrameIndex; } else { if (ma_dr_flac_seek_to_pcm_frame(pFlac, originalPCMFrame) == MA_FALSE) { ma_dr_flac_seek_to_pcm_frame(pFlac, 0); } } return wasSuccessful; } } #define MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(extension, type) \ static type* ma_dr_flac__full_read_and_close_ ## extension (ma_dr_flac* pFlac, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut)\ { \ type* pSampleData = NULL; \ ma_uint64 totalPCMFrameCount; \ \ MA_DR_FLAC_ASSERT(pFlac != NULL); \ \ totalPCMFrameCount = pFlac->totalPCMFrameCount; \ \ if (totalPCMFrameCount == 0) { \ type buffer[4096]; \ ma_uint64 pcmFramesRead; \ size_t sampleDataBufferSize = sizeof(buffer); \ \ pSampleData = (type*)ma_dr_flac__malloc_from_callbacks(sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ while ((pcmFramesRead = (ma_uint64)ma_dr_flac_read_pcm_frames_##extension(pFlac, sizeof(buffer)/sizeof(buffer[0])/pFlac->channels, buffer)) > 0) { \ if (((totalPCMFrameCount + pcmFramesRead) * pFlac->channels * sizeof(type)) > sampleDataBufferSize) { \ type* pNewSampleData; \ size_t newSampleDataBufferSize; \ \ newSampleDataBufferSize = sampleDataBufferSize * 2; \ pNewSampleData = (type*)ma_dr_flac__realloc_from_callbacks(pSampleData, newSampleDataBufferSize, sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pNewSampleData == NULL) { \ ma_dr_flac__free_from_callbacks(pSampleData, &pFlac->allocationCallbacks); \ goto on_error; \ } \ \ sampleDataBufferSize = newSampleDataBufferSize; \ pSampleData = pNewSampleData; \ } \ \ MA_DR_FLAC_COPY_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), buffer, (size_t)(pcmFramesRead*pFlac->channels*sizeof(type))); \ totalPCMFrameCount += pcmFramesRead; \ } \ \ \ MA_DR_FLAC_ZERO_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), (size_t)(sampleDataBufferSize - totalPCMFrameCount*pFlac->channels*sizeof(type))); \ } else { \ ma_uint64 dataSize = totalPCMFrameCount*pFlac->channels*sizeof(type); \ if (dataSize > (ma_uint64)MA_SIZE_MAX) { \ goto on_error; \ } \ \ pSampleData = (type*)ma_dr_flac__malloc_from_callbacks((size_t)dataSize, &pFlac->allocationCallbacks); \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ totalPCMFrameCount = ma_dr_flac_read_pcm_frames_##extension(pFlac, pFlac->totalPCMFrameCount, pSampleData); \ } \ \ if (sampleRateOut) *sampleRateOut = pFlac->sampleRate; \ if (channelsOut) *channelsOut = pFlac->channels; \ if (totalPCMFrameCountOut) *totalPCMFrameCountOut = totalPCMFrameCount; \ \ ma_dr_flac_close(pFlac); \ return pSampleData; \ \ on_error: \ ma_dr_flac_close(pFlac); \ return NULL; \ } MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s32, ma_int32) MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s16, ma_int16) MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(f32, float) MA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } MA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } MA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } #ifndef MA_DR_FLAC_NO_STDIO MA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } #endif MA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_flac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } MA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_flac__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_flac__free_default(p, NULL); } } MA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments) { if (pIter == NULL) { return; } pIter->countRemaining = commentCount; pIter->pRunningData = (const char*)pComments; } MA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut) { ma_int32 length; const char* pComment; if (pCommentLengthOut) { *pCommentLengthOut = 0; } if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return NULL; } length = ma_dr_flac__le2host_32_ptr_unaligned(pIter->pRunningData); pIter->pRunningData += 4; pComment = pIter->pRunningData; pIter->pRunningData += length; pIter->countRemaining -= 1; if (pCommentLengthOut) { *pCommentLengthOut = length; } return pComment; } MA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData) { if (pIter == NULL) { return; } pIter->countRemaining = trackCount; pIter->pRunningData = (const char*)pTrackData; } MA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack) { ma_dr_flac_cuesheet_track cuesheetTrack; const char* pRunningData; ma_uint64 offsetHi; ma_uint64 offsetLo; if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return MA_FALSE; } pRunningData = pIter->pRunningData; offsetHi = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4; offsetLo = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4; cuesheetTrack.offset = offsetLo | (offsetHi << 32); cuesheetTrack.trackNumber = pRunningData[0]; pRunningData += 1; MA_DR_FLAC_COPY_MEMORY(cuesheetTrack.ISRC, pRunningData, sizeof(cuesheetTrack.ISRC)); pRunningData += 12; cuesheetTrack.isAudio = (pRunningData[0] & 0x80) != 0; cuesheetTrack.preEmphasis = (pRunningData[0] & 0x40) != 0; pRunningData += 14; cuesheetTrack.indexCount = pRunningData[0]; pRunningData += 1; cuesheetTrack.pIndexPoints = (const ma_dr_flac_cuesheet_track_index*)pRunningData; pRunningData += cuesheetTrack.indexCount * sizeof(ma_dr_flac_cuesheet_track_index); pIter->pRunningData = pRunningData; pIter->countRemaining -= 1; if (pCuesheetTrack) { *pCuesheetTrack = cuesheetTrack; } return MA_TRUE; } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif /* dr_flac_c end */ #endif /* MA_DR_FLAC_IMPLEMENTATION */ #endif /* MA_NO_FLAC */ #if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING) #if !defined(MA_DR_MP3_IMPLEMENTATION) /* dr_mp3_c begin */ #ifndef ma_dr_mp3_c #define ma_dr_mp3_c #include #include #include MA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision) { if (pMajor) { *pMajor = MA_DR_MP3_VERSION_MAJOR; } if (pMinor) { *pMinor = MA_DR_MP3_VERSION_MINOR; } if (pRevision) { *pRevision = MA_DR_MP3_VERSION_REVISION; } } MA_API const char* ma_dr_mp3_version_string(void) { return MA_DR_MP3_VERSION_STRING; } #if defined(__TINYC__) #define MA_DR_MP3_NO_SIMD #endif #define MA_DR_MP3_OFFSET_PTR(p, offset) ((void*)((ma_uint8*)(p) + (offset))) #define MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE 2304 #ifndef MA_DR_MP3_MAX_FRAME_SYNC_MATCHES #define MA_DR_MP3_MAX_FRAME_SYNC_MATCHES 10 #endif #define MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE #define MA_DR_MP3_MAX_BITRESERVOIR_BYTES 511 #define MA_DR_MP3_SHORT_BLOCK_TYPE 2 #define MA_DR_MP3_STOP_BLOCK_TYPE 3 #define MA_DR_MP3_MODE_MONO 3 #define MA_DR_MP3_MODE_JOINT_STEREO 1 #define MA_DR_MP3_HDR_SIZE 4 #define MA_DR_MP3_HDR_IS_MONO(h) (((h[3]) & 0xC0) == 0xC0) #define MA_DR_MP3_HDR_IS_MS_STEREO(h) (((h[3]) & 0xE0) == 0x60) #define MA_DR_MP3_HDR_IS_FREE_FORMAT(h) (((h[2]) & 0xF0) == 0) #define MA_DR_MP3_HDR_IS_CRC(h) (!((h[1]) & 1)) #define MA_DR_MP3_HDR_TEST_PADDING(h) ((h[2]) & 0x2) #define MA_DR_MP3_HDR_TEST_MPEG1(h) ((h[1]) & 0x8) #define MA_DR_MP3_HDR_TEST_NOT_MPEG25(h) ((h[1]) & 0x10) #define MA_DR_MP3_HDR_TEST_I_STEREO(h) ((h[3]) & 0x10) #define MA_DR_MP3_HDR_TEST_MS_STEREO(h) ((h[3]) & 0x20) #define MA_DR_MP3_HDR_GET_STEREO_MODE(h) (((h[3]) >> 6) & 3) #define MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(h) (((h[3]) >> 4) & 3) #define MA_DR_MP3_HDR_GET_LAYER(h) (((h[1]) >> 1) & 3) #define MA_DR_MP3_HDR_GET_BITRATE(h) ((h[2]) >> 4) #define MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) (((h[2]) >> 2) & 3) #define MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h) (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3) #define MA_DR_MP3_HDR_IS_FRAME_576(h) ((h[1] & 14) == 2) #define MA_DR_MP3_HDR_IS_LAYER_1(h) ((h[1] & 6) == 6) #define MA_DR_MP3_BITS_DEQUANTIZER_OUT -1 #define MA_DR_MP3_MAX_SCF (255 + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210) #define MA_DR_MP3_MAX_SCFI ((MA_DR_MP3_MAX_SCF + 3) & ~3) #define MA_DR_MP3_MIN(a, b) ((a) > (b) ? (b) : (a)) #define MA_DR_MP3_MAX(a, b) ((a) < (b) ? (b) : (a)) #if !defined(MA_DR_MP3_NO_SIMD) #if !defined(MA_DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) #define MA_DR_MP3_ONLY_SIMD #endif #if ((defined(_MSC_VER) && _MSC_VER >= 1400) && defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__))) #if defined(_MSC_VER) #include #endif #include #define MA_DR_MP3_HAVE_SSE 1 #define MA_DR_MP3_HAVE_SIMD 1 #define MA_DR_MP3_VSTORE _mm_storeu_ps #define MA_DR_MP3_VLD _mm_loadu_ps #define MA_DR_MP3_VSET _mm_set1_ps #define MA_DR_MP3_VADD _mm_add_ps #define MA_DR_MP3_VSUB _mm_sub_ps #define MA_DR_MP3_VMUL _mm_mul_ps #define MA_DR_MP3_VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y)) #define MA_DR_MP3_VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y)) #define MA_DR_MP3_VMUL_S(x, s) _mm_mul_ps(x, _mm_set1_ps(s)) #define MA_DR_MP3_VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3)) typedef __m128 ma_dr_mp3_f4; #if defined(_MSC_VER) || defined(MA_DR_MP3_ONLY_SIMD) #define ma_dr_mp3_cpuid __cpuid #else static __inline__ __attribute__((always_inline)) void ma_dr_mp3_cpuid(int CPUInfo[], const int InfoType) { #if defined(__PIC__) __asm__ __volatile__( #if defined(__x86_64__) "push %%rbx\n" "cpuid\n" "xchgl %%ebx, %1\n" "pop %%rbx\n" #else "xchgl %%ebx, %1\n" "cpuid\n" "xchgl %%ebx, %1\n" #endif : "=a" (CPUInfo[0]), "=r" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #else __asm__ __volatile__( "cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #endif } #endif static int ma_dr_mp3_have_simd(void) { #ifdef MA_DR_MP3_ONLY_SIMD return 1; #else static int g_have_simd; int CPUInfo[4]; #ifdef MINIMP3_TEST static int g_counter; if (g_counter++ > 100) return 0; #endif if (g_have_simd) goto end; ma_dr_mp3_cpuid(CPUInfo, 0); if (CPUInfo[0] > 0) { ma_dr_mp3_cpuid(CPUInfo, 1); g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; return g_have_simd - 1; } end: return g_have_simd - 1; #endif } #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) #include #define MA_DR_MP3_HAVE_SSE 0 #define MA_DR_MP3_HAVE_SIMD 1 #define MA_DR_MP3_VSTORE vst1q_f32 #define MA_DR_MP3_VLD vld1q_f32 #define MA_DR_MP3_VSET vmovq_n_f32 #define MA_DR_MP3_VADD vaddq_f32 #define MA_DR_MP3_VSUB vsubq_f32 #define MA_DR_MP3_VMUL vmulq_f32 #define MA_DR_MP3_VMAC(a, x, y) vmlaq_f32(a, x, y) #define MA_DR_MP3_VMSB(a, x, y) vmlsq_f32(a, x, y) #define MA_DR_MP3_VMUL_S(x, s) vmulq_f32(x, vmovq_n_f32(s)) #define MA_DR_MP3_VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x))) typedef float32x4_t ma_dr_mp3_f4; static int ma_dr_mp3_have_simd(void) { return 1; } #else #define MA_DR_MP3_HAVE_SSE 0 #define MA_DR_MP3_HAVE_SIMD 0 #ifdef MA_DR_MP3_ONLY_SIMD #error MA_DR_MP3_ONLY_SIMD used, but SSE/NEON not enabled #endif #endif #else #define MA_DR_MP3_HAVE_SIMD 0 #endif #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(_M_ARM64EC) && !defined(__ARM_ARCH_6M__) #define MA_DR_MP3_HAVE_ARMV6 1 static __inline__ __attribute__((always_inline)) ma_int32 ma_dr_mp3_clip_int16_arm(ma_int32 a) { ma_int32 x = 0; __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); return x; } #else #define MA_DR_MP3_HAVE_ARMV6 0 #endif #ifndef MA_DR_MP3_ASSERT #include #define MA_DR_MP3_ASSERT(expression) assert(expression) #endif #ifndef MA_DR_MP3_COPY_MEMORY #define MA_DR_MP3_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef MA_DR_MP3_MOVE_MEMORY #define MA_DR_MP3_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #ifndef MA_DR_MP3_ZERO_MEMORY #define MA_DR_MP3_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #define MA_DR_MP3_ZERO_OBJECT(p) MA_DR_MP3_ZERO_MEMORY((p), sizeof(*(p))) #ifndef MA_DR_MP3_MALLOC #define MA_DR_MP3_MALLOC(sz) malloc((sz)) #endif #ifndef MA_DR_MP3_REALLOC #define MA_DR_MP3_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef MA_DR_MP3_FREE #define MA_DR_MP3_FREE(p) free((p)) #endif typedef struct { const ma_uint8 *buf; int pos, limit; } ma_dr_mp3_bs; typedef struct { float scf[3*64]; ma_uint8 total_bands, stereo_bands, bitalloc[64], scfcod[64]; } ma_dr_mp3_L12_scale_info; typedef struct { ma_uint8 tab_offset, code_tab_width, band_count; } ma_dr_mp3_L12_subband_alloc; typedef struct { const ma_uint8 *sfbtab; ma_uint16 part_23_length, big_values, scalefac_compress; ma_uint8 global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb; ma_uint8 table_select[3], region_count[3], subblock_gain[3]; ma_uint8 preflag, scalefac_scale, count1_table, scfsi; } ma_dr_mp3_L3_gr_info; typedef struct { ma_dr_mp3_bs bs; ma_uint8 maindata[MA_DR_MP3_MAX_BITRESERVOIR_BYTES + MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES]; ma_dr_mp3_L3_gr_info gr_info[4]; float grbuf[2][576], scf[40], syn[18 + 15][2*32]; ma_uint8 ist_pos[2][39]; } ma_dr_mp3dec_scratch; static void ma_dr_mp3_bs_init(ma_dr_mp3_bs *bs, const ma_uint8 *data, int bytes) { bs->buf = data; bs->pos = 0; bs->limit = bytes*8; } static ma_uint32 ma_dr_mp3_bs_get_bits(ma_dr_mp3_bs *bs, int n) { ma_uint32 next, cache = 0, s = bs->pos & 7; int shl = n + s; const ma_uint8 *p = bs->buf + (bs->pos >> 3); if ((bs->pos += n) > bs->limit) return 0; next = *p++ & (255 >> s); while ((shl -= 8) > 0) { cache |= next << shl; next = *p++; } return cache | (next >> -shl); } static int ma_dr_mp3_hdr_valid(const ma_uint8 *h) { return h[0] == 0xff && ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) && (MA_DR_MP3_HDR_GET_LAYER(h) != 0) && (MA_DR_MP3_HDR_GET_BITRATE(h) != 15) && (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) != 3); } static int ma_dr_mp3_hdr_compare(const ma_uint8 *h1, const ma_uint8 *h2) { return ma_dr_mp3_hdr_valid(h2) && ((h1[1] ^ h2[1]) & 0xFE) == 0 && ((h1[2] ^ h2[2]) & 0x0C) == 0 && !(MA_DR_MP3_HDR_IS_FREE_FORMAT(h1) ^ MA_DR_MP3_HDR_IS_FREE_FORMAT(h2)); } static unsigned ma_dr_mp3_hdr_bitrate_kbps(const ma_uint8 *h) { static const ma_uint8 halfrate[2][3][15] = { { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } }, { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } }, }; return 2*halfrate[!!MA_DR_MP3_HDR_TEST_MPEG1(h)][MA_DR_MP3_HDR_GET_LAYER(h) - 1][MA_DR_MP3_HDR_GET_BITRATE(h)]; } static unsigned ma_dr_mp3_hdr_sample_rate_hz(const ma_uint8 *h) { static const unsigned g_hz[3] = { 44100, 48000, 32000 }; return g_hz[MA_DR_MP3_HDR_GET_SAMPLE_RATE(h)] >> (int)!MA_DR_MP3_HDR_TEST_MPEG1(h) >> (int)!MA_DR_MP3_HDR_TEST_NOT_MPEG25(h); } static unsigned ma_dr_mp3_hdr_frame_samples(const ma_uint8 *h) { return MA_DR_MP3_HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)MA_DR_MP3_HDR_IS_FRAME_576(h)); } static int ma_dr_mp3_hdr_frame_bytes(const ma_uint8 *h, int free_format_size) { int frame_bytes = ma_dr_mp3_hdr_frame_samples(h)*ma_dr_mp3_hdr_bitrate_kbps(h)*125/ma_dr_mp3_hdr_sample_rate_hz(h); if (MA_DR_MP3_HDR_IS_LAYER_1(h)) { frame_bytes &= ~3; } return frame_bytes ? frame_bytes : free_format_size; } static int ma_dr_mp3_hdr_padding(const ma_uint8 *h) { return MA_DR_MP3_HDR_TEST_PADDING(h) ? (MA_DR_MP3_HDR_IS_LAYER_1(h) ? 4 : 1) : 0; } #ifndef MA_DR_MP3_ONLY_MP3 static const ma_dr_mp3_L12_subband_alloc *ma_dr_mp3_L12_subband_alloc_table(const ma_uint8 *hdr, ma_dr_mp3_L12_scale_info *sci) { const ma_dr_mp3_L12_subband_alloc *alloc; int mode = MA_DR_MP3_HDR_GET_STEREO_MODE(hdr); int nbands, stereo_bands = (mode == MA_DR_MP3_MODE_MONO) ? 0 : (mode == MA_DR_MP3_MODE_JOINT_STEREO) ? (MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32; if (MA_DR_MP3_HDR_IS_LAYER_1(hdr)) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L1[] = { { 76, 4, 32 } }; alloc = g_alloc_L1; nbands = 32; } else if (!MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } }; alloc = g_alloc_L2M2; nbands = 30; } else { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } }; int sample_rate_idx = MA_DR_MP3_HDR_GET_SAMPLE_RATE(hdr); unsigned kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr) >> (int)(mode != MA_DR_MP3_MODE_MONO); if (!kbps) { kbps = 192; } alloc = g_alloc_L2M1; nbands = 27; if (kbps < 56) { static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } }; alloc = g_alloc_L2M1_lowrate; nbands = sample_rate_idx == 2 ? 12 : 8; } else if (kbps >= 96 && sample_rate_idx != 1) { nbands = 30; } } sci->total_bands = (ma_uint8)nbands; sci->stereo_bands = (ma_uint8)MA_DR_MP3_MIN(stereo_bands, nbands); return alloc; } static void ma_dr_mp3_L12_read_scalefactors(ma_dr_mp3_bs *bs, ma_uint8 *pba, ma_uint8 *scfcod, int bands, float *scf) { static const float g_deq_L12[18*3] = { #define MA_DR_MP3_DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(7),MA_DR_MP3_DQ(15),MA_DR_MP3_DQ(31),MA_DR_MP3_DQ(63),MA_DR_MP3_DQ(127),MA_DR_MP3_DQ(255),MA_DR_MP3_DQ(511),MA_DR_MP3_DQ(1023),MA_DR_MP3_DQ(2047),MA_DR_MP3_DQ(4095),MA_DR_MP3_DQ(8191),MA_DR_MP3_DQ(16383),MA_DR_MP3_DQ(32767),MA_DR_MP3_DQ(65535),MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(5),MA_DR_MP3_DQ(9) }; int i, m; for (i = 0; i < bands; i++) { float s = 0; int ba = *pba++; int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0; for (m = 4; m; m >>= 1) { if (mask & m) { int b = ma_dr_mp3_bs_get_bits(bs, 6); s = g_deq_L12[ba*3 - 6 + b % 3]*(int)(1 << 21 >> b/3); } *scf++ = s; } } } static void ma_dr_mp3_L12_read_scale_info(const ma_uint8 *hdr, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci) { static const ma_uint8 g_bitalloc_code_tab[] = { 0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16, 0,17,18, 3,19,4,5,16, 0,17,18,16, 0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14, 0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16 }; const ma_dr_mp3_L12_subband_alloc *subband_alloc = ma_dr_mp3_L12_subband_alloc_table(hdr, sci); int i, k = 0, ba_bits = 0; const ma_uint8 *ba_code_tab = g_bitalloc_code_tab; for (i = 0; i < sci->total_bands; i++) { ma_uint8 ba; if (i == k) { k += subband_alloc->band_count; ba_bits = subband_alloc->code_tab_width; ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset; subband_alloc++; } ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)]; sci->bitalloc[2*i] = ba; if (i < sci->stereo_bands) { ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)]; } sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0; } for (i = 0; i < 2*sci->total_bands; i++) { sci->scfcod[i] = (ma_uint8)(sci->bitalloc[i] ? MA_DR_MP3_HDR_IS_LAYER_1(hdr) ? 2 : ma_dr_mp3_bs_get_bits(bs, 2) : 6); } ma_dr_mp3_L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf); for (i = sci->stereo_bands; i < sci->total_bands; i++) { sci->bitalloc[2*i + 1] = 0; } } static int ma_dr_mp3_L12_dequantize_granule(float *grbuf, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci, int group_size) { int i, j, k, choff = 576; for (j = 0; j < 4; j++) { float *dst = grbuf + group_size*j; for (i = 0; i < 2*sci->total_bands; i++) { int ba = sci->bitalloc[i]; if (ba != 0) { if (ba < 17) { int half = (1 << (ba - 1)) - 1; for (k = 0; k < group_size; k++) { dst[k] = (float)((int)ma_dr_mp3_bs_get_bits(bs, ba) - half); } } else { unsigned mod = (2 << (ba - 17)) + 1; unsigned code = ma_dr_mp3_bs_get_bits(bs, mod + 2 - (mod >> 3)); for (k = 0; k < group_size; k++, code /= mod) { dst[k] = (float)((int)(code % mod - mod/2)); } } } dst += choff; choff = 18 - choff; } } return group_size*4; } static void ma_dr_mp3_L12_apply_scf_384(ma_dr_mp3_L12_scale_info *sci, const float *scf, float *dst) { int i, k; MA_DR_MP3_COPY_MEMORY(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float)); for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6) { for (k = 0; k < 12; k++) { dst[k + 0] *= scf[0]; dst[k + 576] *= scf[3]; } } } #endif static int ma_dr_mp3_L3_read_side_info(ma_dr_mp3_bs *bs, ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr) { static const ma_uint8 g_scf_long[8][23] = { { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 }, { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 }, { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 } }; static const ma_uint8 g_scf_short[8][40] = { { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; static const ma_uint8 g_scf_mixed[8][40] = { { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; unsigned tables, scfsi = 0; int main_data_begin, part_23_sum = 0; int gr_count = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2; int sr_idx = MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0); if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { gr_count *= 2; main_data_begin = ma_dr_mp3_bs_get_bits(bs, 9); scfsi = ma_dr_mp3_bs_get_bits(bs, 7 + gr_count); } else { main_data_begin = ma_dr_mp3_bs_get_bits(bs, 8 + gr_count) >> gr_count; } do { if (MA_DR_MP3_HDR_IS_MONO(hdr)) { scfsi <<= 4; } gr->part_23_length = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, 12); part_23_sum += gr->part_23_length; gr->big_values = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, 9); if (gr->big_values > 288) { return -1; } gr->global_gain = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 8); gr->scalefac_compress = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 4 : 9); gr->sfbtab = g_scf_long[sr_idx]; gr->n_long_sfb = 22; gr->n_short_sfb = 0; if (ma_dr_mp3_bs_get_bits(bs, 1)) { gr->block_type = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 2); if (!gr->block_type) { return -1; } gr->mixed_block_flag = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->region_count[0] = 7; gr->region_count[1] = 255; if (gr->block_type == MA_DR_MP3_SHORT_BLOCK_TYPE) { scfsi &= 0x0F0F; if (!gr->mixed_block_flag) { gr->region_count[0] = 8; gr->sfbtab = g_scf_short[sr_idx]; gr->n_long_sfb = 0; gr->n_short_sfb = 39; } else { gr->sfbtab = g_scf_mixed[sr_idx]; gr->n_long_sfb = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 8 : 6; gr->n_short_sfb = 30; } } tables = ma_dr_mp3_bs_get_bits(bs, 10); tables <<= 5; gr->subblock_gain[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->subblock_gain[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->subblock_gain[2] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); } else { gr->block_type = 0; gr->mixed_block_flag = 0; tables = ma_dr_mp3_bs_get_bits(bs, 15); gr->region_count[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 4); gr->region_count[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3); gr->region_count[2] = 255; } gr->table_select[0] = (ma_uint8)(tables >> 10); gr->table_select[1] = (ma_uint8)((tables >> 5) & 31); gr->table_select[2] = (ma_uint8)((tables) & 31); gr->preflag = (ma_uint8)(MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? ma_dr_mp3_bs_get_bits(bs, 1) : (gr->scalefac_compress >= 500)); gr->scalefac_scale = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->count1_table = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1); gr->scfsi = (ma_uint8)((scfsi >> 12) & 15); scfsi <<= 4; gr++; } while(--gr_count); if (part_23_sum + bs->pos > bs->limit + main_data_begin*8) { return -1; } return main_data_begin; } static void ma_dr_mp3_L3_read_scalefactors(ma_uint8 *scf, ma_uint8 *ist_pos, const ma_uint8 *scf_size, const ma_uint8 *scf_count, ma_dr_mp3_bs *bitbuf, int scfsi) { int i, k; for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2) { int cnt = scf_count[i]; if (scfsi & 8) { MA_DR_MP3_COPY_MEMORY(scf, ist_pos, cnt); } else { int bits = scf_size[i]; if (!bits) { MA_DR_MP3_ZERO_MEMORY(scf, cnt); MA_DR_MP3_ZERO_MEMORY(ist_pos, cnt); } else { int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1; for (k = 0; k < cnt; k++) { int s = ma_dr_mp3_bs_get_bits(bitbuf, bits); ist_pos[k] = (ma_uint8)(s == max_scf ? -1 : s); scf[k] = (ma_uint8)s; } } } ist_pos += cnt; scf += cnt; } scf[0] = scf[1] = scf[2] = 0; } static float ma_dr_mp3_L3_ldexp_q2(float y, int exp_q2) { static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f }; int e; do { e = MA_DR_MP3_MIN(30*4, exp_q2); y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2)); } while ((exp_q2 -= e) > 0); return y; } static void ma_dr_mp3_L3_decode_scalefactors(const ma_uint8 *hdr, ma_uint8 *ist_pos, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr, float *scf, int ch) { static const ma_uint8 g_scf_partitions[3][28] = { { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 }, { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 }, { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 } }; const ma_uint8 *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb]; ma_uint8 scf_size[4], iscf[40]; int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi; float gain; if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { static const ma_uint8 g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 }; int part = g_scfc_decode[gr->scalefac_compress]; scf_size[1] = scf_size[0] = (ma_uint8)(part >> 2); scf_size[3] = scf_size[2] = (ma_uint8)(part & 3); } else { static const ma_uint8 g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 }; int k, modprod, sfc, ist = MA_DR_MP3_HDR_TEST_I_STEREO(hdr) && ch; sfc = gr->scalefac_compress >> ist; for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4) { for (modprod = 1, i = 3; i >= 0; i--) { scf_size[i] = (ma_uint8)(sfc / modprod % g_mod[k + i]); modprod *= g_mod[k + i]; } } scf_partition += k; scfsi = -16; } ma_dr_mp3_L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi); if (gr->n_short_sfb) { int sh = 3 - scf_shift; for (i = 0; i < gr->n_short_sfb; i += 3) { iscf[gr->n_long_sfb + i + 0] = (ma_uint8)(iscf[gr->n_long_sfb + i + 0] + (gr->subblock_gain[0] << sh)); iscf[gr->n_long_sfb + i + 1] = (ma_uint8)(iscf[gr->n_long_sfb + i + 1] + (gr->subblock_gain[1] << sh)); iscf[gr->n_long_sfb + i + 2] = (ma_uint8)(iscf[gr->n_long_sfb + i + 2] + (gr->subblock_gain[2] << sh)); } } else if (gr->preflag) { static const ma_uint8 g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 }; for (i = 0; i < 10; i++) { iscf[11 + i] = (ma_uint8)(iscf[11 + i] + g_preamp[i]); } } gain_exp = gr->global_gain + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210 - (MA_DR_MP3_HDR_IS_MS_STEREO(hdr) ? 2 : 0); gain = ma_dr_mp3_L3_ldexp_q2(1 << (MA_DR_MP3_MAX_SCFI/4), MA_DR_MP3_MAX_SCFI - gain_exp); for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++) { scf[i] = ma_dr_mp3_L3_ldexp_q2(gain, iscf[i] << scf_shift); } } static const float g_ma_dr_mp3_pow43[129 + 16] = { 0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f, 0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f }; static float ma_dr_mp3_L3_pow_43(int x) { float frac; int sign, mult = 256; if (x < 129) { return g_ma_dr_mp3_pow43[16 + x]; } if (x < 1024) { mult = 16; x <<= 3; } sign = 2*x & 64; frac = (float)((x & 63) - sign) / ((x & ~63) + sign); return g_ma_dr_mp3_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult; } static void ma_dr_mp3_L3_huffman(float *dst, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr_info, const float *scf, int layer3gr_limit) { static const ma_int16 tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256, -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288, -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288, -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258, -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259, -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258, -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258, -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259, -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258, -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290, -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259, -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258, -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259, -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258, -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 }; static const ma_uint8 tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205}; static const ma_uint8 tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 }; static const ma_int16 tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 }; static const ma_uint8 g_linbits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 }; #define MA_DR_MP3_PEEK_BITS(n) (bs_cache >> (32 - (n))) #define MA_DR_MP3_FLUSH_BITS(n) { bs_cache <<= (n); bs_sh += (n); } #define MA_DR_MP3_CHECK_BITS while (bs_sh >= 0) { bs_cache |= (ma_uint32)*bs_next_ptr++ << bs_sh; bs_sh -= 8; } #define MA_DR_MP3_BSPOS ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh) float one = 0.0f; int ireg = 0, big_val_cnt = gr_info->big_values; const ma_uint8 *sfb = gr_info->sfbtab; const ma_uint8 *bs_next_ptr = bs->buf + bs->pos/8; ma_uint32 bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7); int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8; bs_next_ptr += 4; while (big_val_cnt > 0) { int tab_num = gr_info->table_select[ireg]; int sfb_cnt = gr_info->region_count[ireg++]; const ma_int16 *codebook = tabs + tabindex[tab_num]; int linbits = g_linbits[tab_num]; if (linbits) { do { np = *sfb++ / 2; pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)]; while (leaf < 0) { MA_DR_MP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)]; } MA_DR_MP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; if (lsb == 15) { lsb += MA_DR_MP3_PEEK_BITS(linbits); MA_DR_MP3_FLUSH_BITS(linbits); MA_DR_MP3_CHECK_BITS; *dst = one*ma_dr_mp3_L3_pow_43(lsb)*((ma_int32)bs_cache < 0 ? -1: 1); } else { *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; } MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0); } MA_DR_MP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } else { do { np = *sfb++ / 2; pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)]; while (leaf < 0) { MA_DR_MP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)]; } MA_DR_MP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0); } MA_DR_MP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } } for (np = 1 - big_val_cnt;; dst += 4) { const ma_uint8 *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32; int leaf = codebook_count1[MA_DR_MP3_PEEK_BITS(4)]; if (!(leaf & 8)) { leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))]; } MA_DR_MP3_FLUSH_BITS(leaf & 7); if (MA_DR_MP3_BSPOS > layer3gr_limit) { break; } #define MA_DR_MP3_RELOAD_SCALEFACTOR if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; } #define MA_DR_MP3_DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((ma_int32)bs_cache < 0) ? -one : one; MA_DR_MP3_FLUSH_BITS(1) } MA_DR_MP3_RELOAD_SCALEFACTOR; MA_DR_MP3_DEQ_COUNT1(0); MA_DR_MP3_DEQ_COUNT1(1); MA_DR_MP3_RELOAD_SCALEFACTOR; MA_DR_MP3_DEQ_COUNT1(2); MA_DR_MP3_DEQ_COUNT1(3); MA_DR_MP3_CHECK_BITS; } bs->pos = layer3gr_limit; } static void ma_dr_mp3_L3_midside_stereo(float *left, int n) { int i = 0; float *right = left + 576; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) { for (; i < n - 3; i += 4) { ma_dr_mp3_f4 vl = MA_DR_MP3_VLD(left + i); ma_dr_mp3_f4 vr = MA_DR_MP3_VLD(right + i); MA_DR_MP3_VSTORE(left + i, MA_DR_MP3_VADD(vl, vr)); MA_DR_MP3_VSTORE(right + i, MA_DR_MP3_VSUB(vl, vr)); } #ifdef __GNUC__ if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0) return; #endif } #endif for (; i < n; i++) { float a = left[i]; float b = right[i]; left[i] = a + b; right[i] = a - b; } } static void ma_dr_mp3_L3_intensity_stereo_band(float *left, int n, float kl, float kr) { int i; for (i = 0; i < n; i++) { left[i + 576] = left[i]*kr; left[i] = left[i]*kl; } } static void ma_dr_mp3_L3_stereo_top_band(const float *right, const ma_uint8 *sfb, int nbands, int max_band[3]) { int i, k; max_band[0] = max_band[1] = max_band[2] = -1; for (i = 0; i < nbands; i++) { for (k = 0; k < sfb[i]; k += 2) { if (right[k] != 0 || right[k + 1] != 0) { max_band[i % 3] = i; break; } } right += sfb[i]; } } static void ma_dr_mp3_L3_stereo_process(float *left, const ma_uint8 *ist_pos, const ma_uint8 *sfb, const ma_uint8 *hdr, int max_band[3], int mpeg2_sh) { static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 }; unsigned i, max_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 7 : 64; for (i = 0; sfb[i]; i++) { unsigned ipos = ist_pos[i]; if ((int)i > max_band[i % 3] && ipos < max_pos) { float kl, kr, s = MA_DR_MP3_HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1; if (MA_DR_MP3_HDR_TEST_MPEG1(hdr)) { kl = g_pan[2*ipos]; kr = g_pan[2*ipos + 1]; } else { kl = 1; kr = ma_dr_mp3_L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh); if (ipos & 1) { kl = kr; kr = 1; } } ma_dr_mp3_L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s); } else if (MA_DR_MP3_HDR_TEST_MS_STEREO(hdr)) { ma_dr_mp3_L3_midside_stereo(left, sfb[i]); } left += sfb[i]; } } static void ma_dr_mp3_L3_intensity_stereo(float *left, ma_uint8 *ist_pos, const ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr) { int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb; int i, max_blocks = gr->n_short_sfb ? 3 : 1; ma_dr_mp3_L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band); if (gr->n_long_sfb) { max_band[0] = max_band[1] = max_band[2] = MA_DR_MP3_MAX(MA_DR_MP3_MAX(max_band[0], max_band[1]), max_band[2]); } for (i = 0; i < max_blocks; i++) { int default_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 3 : 0; int itop = n_sfb - max_blocks + i; int prev = itop - max_blocks; ist_pos[itop] = (ma_uint8)(max_band[i] >= prev ? default_pos : ist_pos[prev]); } ma_dr_mp3_L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1); } static void ma_dr_mp3_L3_reorder(float *grbuf, float *scratch, const ma_uint8 *sfb) { int i, len; float *src = grbuf, *dst = scratch; for (;0 != (len = *sfb); sfb += 3, src += 2*len) { for (i = 0; i < len; i++, src++) { *dst++ = src[0*len]; *dst++ = src[1*len]; *dst++ = src[2*len]; } } MA_DR_MP3_COPY_MEMORY(grbuf, scratch, (dst - scratch)*sizeof(float)); } static void ma_dr_mp3_L3_antialias(float *grbuf, int nbands) { static const float g_aa[2][8] = { {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f}, {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f} }; for (; nbands > 0; nbands--, grbuf += 18) { int i = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4) { ma_dr_mp3_f4 vu = MA_DR_MP3_VLD(grbuf + 18 + i); ma_dr_mp3_f4 vd = MA_DR_MP3_VLD(grbuf + 14 - i); ma_dr_mp3_f4 vc0 = MA_DR_MP3_VLD(g_aa[0] + i); ma_dr_mp3_f4 vc1 = MA_DR_MP3_VLD(g_aa[1] + i); vd = MA_DR_MP3_VREV(vd); MA_DR_MP3_VSTORE(grbuf + 18 + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vu, vc0), MA_DR_MP3_VMUL(vd, vc1))); vd = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vu, vc1), MA_DR_MP3_VMUL(vd, vc0)); MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vd)); } #endif #ifndef MA_DR_MP3_ONLY_SIMD for(; i < 8; i++) { float u = grbuf[18 + i]; float d = grbuf[17 - i]; grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i]; grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i]; } #endif } } static void ma_dr_mp3_L3_dct3_9(float *y) { float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4; s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8]; t0 = s0 + s6*0.5f; s0 -= s6; t4 = (s4 + s2)*0.93969262f; t2 = (s8 + s2)*0.76604444f; s6 = (s4 - s8)*0.17364818f; s4 += s8 - s2; s2 = s0 - s4*0.5f; y[4] = s4 + s0; s8 = t0 - t2 + s6; s0 = t0 - t4 + t2; s4 = t0 + t4 - s6; s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7]; s3 *= 0.86602540f; t0 = (s5 + s1)*0.98480775f; t4 = (s5 - s7)*0.34202014f; t2 = (s1 + s7)*0.64278761f; s1 = (s1 - s5 - s7)*0.86602540f; s5 = t0 - s3 - t2; s7 = t4 - s3 - t0; s3 = t4 + s3 - t2; y[0] = s4 - s7; y[1] = s2 + s1; y[2] = s0 - s3; y[3] = s8 + s5; y[5] = s8 - s5; y[6] = s0 + s3; y[7] = s2 - s1; y[8] = s4 + s7; } static void ma_dr_mp3_L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands) { int i, j; static const float g_twid9[18] = { 0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f }; for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9) { float co[9], si[9]; co[0] = -grbuf[0]; si[0] = grbuf[17]; for (i = 0; i < 4; i++) { si[8 - 2*i] = grbuf[4*i + 1] - grbuf[4*i + 2]; co[1 + 2*i] = grbuf[4*i + 1] + grbuf[4*i + 2]; si[7 - 2*i] = grbuf[4*i + 4] - grbuf[4*i + 3]; co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]); } ma_dr_mp3_L3_dct3_9(co); ma_dr_mp3_L3_dct3_9(si); si[1] = -si[1]; si[3] = -si[3]; si[5] = -si[5]; si[7] = -si[7]; i = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4) { ma_dr_mp3_f4 vovl = MA_DR_MP3_VLD(overlap + i); ma_dr_mp3_f4 vc = MA_DR_MP3_VLD(co + i); ma_dr_mp3_f4 vs = MA_DR_MP3_VLD(si + i); ma_dr_mp3_f4 vr0 = MA_DR_MP3_VLD(g_twid9 + i); ma_dr_mp3_f4 vr1 = MA_DR_MP3_VLD(g_twid9 + 9 + i); ma_dr_mp3_f4 vw0 = MA_DR_MP3_VLD(window + i); ma_dr_mp3_f4 vw1 = MA_DR_MP3_VLD(window + 9 + i); ma_dr_mp3_f4 vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vc, vr1), MA_DR_MP3_VMUL(vs, vr0)); MA_DR_MP3_VSTORE(overlap + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vc, vr0), MA_DR_MP3_VMUL(vs, vr1))); MA_DR_MP3_VSTORE(grbuf + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vovl, vw0), MA_DR_MP3_VMUL(vsum, vw1))); vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vovl, vw1), MA_DR_MP3_VMUL(vsum, vw0)); MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vsum)); } #endif for (; i < 9; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i]; overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i]; grbuf[i] = ovl*window[0 + i] - sum*window[9 + i]; grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i]; } } } static void ma_dr_mp3_L3_idct3(float x0, float x1, float x2, float *dst) { float m1 = x1*0.86602540f; float a1 = x0 - x2*0.5f; dst[1] = x0 + x2; dst[0] = a1 + m1; dst[2] = a1 - m1; } static void ma_dr_mp3_L3_imdct12(float *x, float *dst, float *overlap) { static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f }; float co[3], si[3]; int i; ma_dr_mp3_L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co); ma_dr_mp3_L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si); si[1] = -si[1]; for (i = 0; i < 3; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i]; overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i]; dst[i] = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i]; dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i]; } } static void ma_dr_mp3_L3_imdct_short(float *grbuf, float *overlap, int nbands) { for (;nbands > 0; nbands--, overlap += 9, grbuf += 18) { float tmp[18]; MA_DR_MP3_COPY_MEMORY(tmp, grbuf, sizeof(tmp)); MA_DR_MP3_COPY_MEMORY(grbuf, overlap, 6*sizeof(float)); ma_dr_mp3_L3_imdct12(tmp, grbuf + 6, overlap + 6); ma_dr_mp3_L3_imdct12(tmp + 1, grbuf + 12, overlap + 6); ma_dr_mp3_L3_imdct12(tmp + 2, overlap, overlap + 6); } } static void ma_dr_mp3_L3_change_sign(float *grbuf) { int b, i; for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36) for (i = 1; i < 18; i += 2) grbuf[i] = -grbuf[i]; } static void ma_dr_mp3_L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands) { static const float g_mdct_window[2][18] = { { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f }, { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f } }; if (n_long_bands) { ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands); grbuf += 18*n_long_bands; overlap += 9*n_long_bands; } if (block_type == MA_DR_MP3_SHORT_BLOCK_TYPE) ma_dr_mp3_L3_imdct_short(grbuf, overlap, 32 - n_long_bands); else ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[block_type == MA_DR_MP3_STOP_BLOCK_TYPE], 32 - n_long_bands); } static void ma_dr_mp3_L3_save_reservoir(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s) { int pos = (s->bs.pos + 7)/8u; int remains = s->bs.limit/8u - pos; if (remains > MA_DR_MP3_MAX_BITRESERVOIR_BYTES) { pos += remains - MA_DR_MP3_MAX_BITRESERVOIR_BYTES; remains = MA_DR_MP3_MAX_BITRESERVOIR_BYTES; } if (remains > 0) { MA_DR_MP3_MOVE_MEMORY(h->reserv_buf, s->maindata + pos, remains); } h->reserv = remains; } static int ma_dr_mp3_L3_restore_reservoir(ma_dr_mp3dec *h, ma_dr_mp3_bs *bs, ma_dr_mp3dec_scratch *s, int main_data_begin) { int frame_bytes = (bs->limit - bs->pos)/8; int bytes_have = MA_DR_MP3_MIN(h->reserv, main_data_begin); MA_DR_MP3_COPY_MEMORY(s->maindata, h->reserv_buf + MA_DR_MP3_MAX(0, h->reserv - main_data_begin), MA_DR_MP3_MIN(h->reserv, main_data_begin)); MA_DR_MP3_COPY_MEMORY(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes); ma_dr_mp3_bs_init(&s->bs, s->maindata, bytes_have + frame_bytes); return h->reserv >= main_data_begin; } static void ma_dr_mp3_L3_decode(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s, ma_dr_mp3_L3_gr_info *gr_info, int nch) { int ch; for (ch = 0; ch < nch; ch++) { int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length; ma_dr_mp3_L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch); ma_dr_mp3_L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit); } if (MA_DR_MP3_HDR_TEST_I_STEREO(h->header)) { ma_dr_mp3_L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header); } else if (MA_DR_MP3_HDR_IS_MS_STEREO(h->header)) { ma_dr_mp3_L3_midside_stereo(s->grbuf[0], 576); } for (ch = 0; ch < nch; ch++, gr_info++) { int aa_bands = 31; int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h->header) == 2); if (gr_info->n_short_sfb) { aa_bands = n_long_bands - 1; ma_dr_mp3_L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb); } ma_dr_mp3_L3_antialias(s->grbuf[ch], aa_bands); ma_dr_mp3_L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands); ma_dr_mp3_L3_change_sign(s->grbuf[ch]); } } static void ma_dr_mp3d_DCT_II(float *grbuf, int n) { static const float g_sec[24] = { 10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f }; int i, k = 0; #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (; k < n; k += 4) { ma_dr_mp3_f4 t[4][8], *x; float *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { ma_dr_mp3_f4 x0 = MA_DR_MP3_VLD(&y[i*18]); ma_dr_mp3_f4 x1 = MA_DR_MP3_VLD(&y[(15 - i)*18]); ma_dr_mp3_f4 x2 = MA_DR_MP3_VLD(&y[(16 + i)*18]); ma_dr_mp3_f4 x3 = MA_DR_MP3_VLD(&y[(31 - i)*18]); ma_dr_mp3_f4 t0 = MA_DR_MP3_VADD(x0, x3); ma_dr_mp3_f4 t1 = MA_DR_MP3_VADD(x1, x2); ma_dr_mp3_f4 t2 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x1, x2), g_sec[3*i + 0]); ma_dr_mp3_f4 t3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x3), g_sec[3*i + 1]); x[0] = MA_DR_MP3_VADD(t0, t1); x[8] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t0, t1), g_sec[3*i + 2]); x[16] = MA_DR_MP3_VADD(t3, t2); x[24] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t3, t2), g_sec[3*i + 2]); } for (x = t[0], i = 0; i < 4; i++, x += 8) { ma_dr_mp3_f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = MA_DR_MP3_VSUB(x0, x7); x0 = MA_DR_MP3_VADD(x0, x7); x7 = MA_DR_MP3_VSUB(x1, x6); x1 = MA_DR_MP3_VADD(x1, x6); x6 = MA_DR_MP3_VSUB(x2, x5); x2 = MA_DR_MP3_VADD(x2, x5); x5 = MA_DR_MP3_VSUB(x3, x4); x3 = MA_DR_MP3_VADD(x3, x4); x4 = MA_DR_MP3_VSUB(x0, x3); x0 = MA_DR_MP3_VADD(x0, x3); x3 = MA_DR_MP3_VSUB(x1, x2); x1 = MA_DR_MP3_VADD(x1, x2); x[0] = MA_DR_MP3_VADD(x0, x1); x[4] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x1), 0.70710677f); x5 = MA_DR_MP3_VADD(x5, x6); x6 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x6, x7), 0.70710677f); x7 = MA_DR_MP3_VADD(x7, xt); x3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x3, x4), 0.70710677f); x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f)); x7 = MA_DR_MP3_VADD(x7, MA_DR_MP3_VMUL_S(x5, 0.382683432f)); x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f)); x0 = MA_DR_MP3_VSUB(xt, x6); xt = MA_DR_MP3_VADD(xt, x6); x[1] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(xt, x7), 0.50979561f); x[2] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x4, x3), 0.54119611f); x[3] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x5), 0.60134488f); x[5] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x0, x5), 0.89997619f); x[6] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x4, x3), 1.30656302f); x[7] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(xt, x7), 2.56291556f); } if (k > n - 3) { #if MA_DR_MP3_HAVE_SSE #define MA_DR_MP3_VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v) #else #define MA_DR_MP3_VSAVE2(i, v) vst1_f32((float32_t *)&y[(i)*18], vget_low_f32(v)) #endif for (i = 0; i < 7; i++, y += 4*18) { ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]); MA_DR_MP3_VSAVE2(0, t[0][i]); MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][i], s)); MA_DR_MP3_VSAVE2(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1])); MA_DR_MP3_VSAVE2(3, MA_DR_MP3_VADD(t[2][1 + i], s)); } MA_DR_MP3_VSAVE2(0, t[0][7]); MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][7], t[3][7])); MA_DR_MP3_VSAVE2(2, t[1][7]); MA_DR_MP3_VSAVE2(3, t[3][7]); } else { #define MA_DR_MP3_VSAVE4(i, v) MA_DR_MP3_VSTORE(&y[(i)*18], v) for (i = 0; i < 7; i++, y += 4*18) { ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]); MA_DR_MP3_VSAVE4(0, t[0][i]); MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][i], s)); MA_DR_MP3_VSAVE4(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1])); MA_DR_MP3_VSAVE4(3, MA_DR_MP3_VADD(t[2][1 + i], s)); } MA_DR_MP3_VSAVE4(0, t[0][7]); MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][7], t[3][7])); MA_DR_MP3_VSAVE4(2, t[1][7]); MA_DR_MP3_VSAVE4(3, t[3][7]); } } else #endif #ifdef MA_DR_MP3_ONLY_SIMD {} #else for (; k < n; k++) { float t[4][8], *x, *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { float x0 = y[i*18]; float x1 = y[(15 - i)*18]; float x2 = y[(16 + i)*18]; float x3 = y[(31 - i)*18]; float t0 = x0 + x3; float t1 = x1 + x2; float t2 = (x1 - x2)*g_sec[3*i + 0]; float t3 = (x0 - x3)*g_sec[3*i + 1]; x[0] = t0 + t1; x[8] = (t0 - t1)*g_sec[3*i + 2]; x[16] = t3 + t2; x[24] = (t3 - t2)*g_sec[3*i + 2]; } for (x = t[0], i = 0; i < 4; i++, x += 8) { float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = x0 - x7; x0 += x7; x7 = x1 - x6; x1 += x6; x6 = x2 - x5; x2 += x5; x5 = x3 - x4; x3 += x4; x4 = x0 - x3; x0 += x3; x3 = x1 - x2; x1 += x2; x[0] = x0 + x1; x[4] = (x0 - x1)*0.70710677f; x5 = x5 + x6; x6 = (x6 + x7)*0.70710677f; x7 = x7 + xt; x3 = (x3 + x4)*0.70710677f; x5 -= x7*0.198912367f; x7 += x5*0.382683432f; x5 -= x7*0.198912367f; x0 = xt - x6; xt += x6; x[1] = (xt + x7)*0.50979561f; x[2] = (x4 + x3)*0.54119611f; x[3] = (x0 - x5)*0.60134488f; x[5] = (x0 + x5)*0.89997619f; x[6] = (x4 - x3)*1.30656302f; x[7] = (xt - x7)*2.56291556f; } for (i = 0; i < 7; i++, y += 4*18) { y[0*18] = t[0][i]; y[1*18] = t[2][i] + t[3][i] + t[3][i + 1]; y[2*18] = t[1][i] + t[1][i + 1]; y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1]; } y[0*18] = t[0][7]; y[1*18] = t[2][7] + t[3][7]; y[2*18] = t[1][7]; y[3*18] = t[3][7]; } #endif } #ifndef MA_DR_MP3_FLOAT_OUTPUT typedef ma_int16 ma_dr_mp3d_sample_t; static ma_int16 ma_dr_mp3d_scale_pcm(float sample) { ma_int16 s; #if MA_DR_MP3_HAVE_ARMV6 ma_int32 s32 = (ma_int32)(sample + .5f); s32 -= (s32 < 0); s = (ma_int16)ma_dr_mp3_clip_int16_arm(s32); #else if (sample >= 32766.5f) return (ma_int16) 32767; if (sample <= -32767.5f) return (ma_int16)-32768; s = (ma_int16)(sample + .5f); s -= (s < 0); #endif return s; } #else typedef float ma_dr_mp3d_sample_t; static float ma_dr_mp3d_scale_pcm(float sample) { return sample*(1.f/32768.f); } #endif static void ma_dr_mp3d_synth_pair(ma_dr_mp3d_sample_t *pcm, int nch, const float *z) { float a; a = (z[14*64] - z[ 0]) * 29; a += (z[ 1*64] + z[13*64]) * 213; a += (z[12*64] - z[ 2*64]) * 459; a += (z[ 3*64] + z[11*64]) * 2037; a += (z[10*64] - z[ 4*64]) * 5153; a += (z[ 5*64] + z[ 9*64]) * 6574; a += (z[ 8*64] - z[ 6*64]) * 37489; a += z[ 7*64] * 75038; pcm[0] = ma_dr_mp3d_scale_pcm(a); z += 2; a = z[14*64] * 104; a += z[12*64] * 1567; a += z[10*64] * 9727; a += z[ 8*64] * 64019; a += z[ 6*64] * -9975; a += z[ 4*64] * -45; a += z[ 2*64] * 146; a += z[ 0*64] * -5; pcm[16*nch] = ma_dr_mp3d_scale_pcm(a); } static void ma_dr_mp3d_synth(float *xl, ma_dr_mp3d_sample_t *dstl, int nch, float *lins) { int i; float *xr = xl + 576*(nch - 1); ma_dr_mp3d_sample_t *dstr = dstl + (nch - 1); static const float g_win[] = { -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992, -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856, -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630, -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313, -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908, -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415, -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835, -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169, -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420, -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590, -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679, -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692, -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629, -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494, -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290 }; float *zlin = lins + 15*64; const float *w = g_win; zlin[4*15] = xl[18*16]; zlin[4*15 + 1] = xr[18*16]; zlin[4*15 + 2] = xl[0]; zlin[4*15 + 3] = xr[0]; zlin[4*31] = xl[1 + 18*16]; zlin[4*31 + 1] = xr[1 + 18*16]; zlin[4*31 + 2] = xl[1]; zlin[4*31 + 3] = xr[1]; ma_dr_mp3d_synth_pair(dstr, nch, lins + 4*15 + 1); ma_dr_mp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1); ma_dr_mp3d_synth_pair(dstl, nch, lins + 4*15); ma_dr_mp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64); #if MA_DR_MP3_HAVE_SIMD if (ma_dr_mp3_have_simd()) for (i = 14; i >= 0; i--) { #define MA_DR_MP3_VLOAD(k) ma_dr_mp3_f4 w0 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 w1 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 vz = MA_DR_MP3_VLD(&zlin[4*i - 64*k]); ma_dr_mp3_f4 vy = MA_DR_MP3_VLD(&zlin[4*i - 64*(15 - k)]); #define MA_DR_MP3_V0(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0)) ; a = MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1)); } #define MA_DR_MP3_V1(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1))); } #define MA_DR_MP3_V2(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vy, w1), MA_DR_MP3_VMUL(vz, w0))); } ma_dr_mp3_f4 a, b; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*i + 64] = xl[1 + 18*(1 + i)]; zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)]; zlin[4*i - 64 + 2] = xl[18*(1 + i)]; zlin[4*i - 64 + 3] = xr[18*(1 + i)]; MA_DR_MP3_V0(0) MA_DR_MP3_V2(1) MA_DR_MP3_V1(2) MA_DR_MP3_V2(3) MA_DR_MP3_V1(4) MA_DR_MP3_V2(5) MA_DR_MP3_V1(6) MA_DR_MP3_V2(7) { #ifndef MA_DR_MP3_FLOAT_OUTPUT #if MA_DR_MP3_HAVE_SSE static const ma_dr_mp3_f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f }; static const ma_dr_mp3_f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f }; __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min))); dstr[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 1); dstr[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 5); dstl[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 0); dstl[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 4); dstr[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 3); dstr[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 7); dstl[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 2); dstl[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 6); #else int16x4_t pcma, pcmb; a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f)); b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0))))); vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1); vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1); vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0); vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0); vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3); vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3); vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2); vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2); #endif #else #if MA_DR_MP3_HAVE_SSE static const ma_dr_mp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f }; #else const ma_dr_mp3_f4 g_scale = vdupq_n_f32(1.0f/32768.0f); #endif a = MA_DR_MP3_VMUL(a, g_scale); b = MA_DR_MP3_VMUL(b, g_scale); #if MA_DR_MP3_HAVE_SSE _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2))); _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2))); #else vst1q_lane_f32(dstr + (15 - i)*nch, a, 1); vst1q_lane_f32(dstr + (17 + i)*nch, b, 1); vst1q_lane_f32(dstl + (15 - i)*nch, a, 0); vst1q_lane_f32(dstl + (17 + i)*nch, b, 0); vst1q_lane_f32(dstr + (47 - i)*nch, a, 3); vst1q_lane_f32(dstr + (49 + i)*nch, b, 3); vst1q_lane_f32(dstl + (47 - i)*nch, a, 2); vst1q_lane_f32(dstl + (49 + i)*nch, b, 2); #endif #endif } } else #endif #ifdef MA_DR_MP3_ONLY_SIMD {} #else for (i = 14; i >= 0; i--) { #define MA_DR_MP3_LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64]; #define MA_DR_MP3_S0(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] = vz[j]*w1 + vy[j]*w0, a[j] = vz[j]*w0 - vy[j]*w1; } #define MA_DR_MP3_S1(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; } #define MA_DR_MP3_S2(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; } float a[4], b[4]; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*(i + 16)] = xl[1 + 18*(1 + i)]; zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)]; zlin[4*(i - 16) + 2] = xl[18*(1 + i)]; zlin[4*(i - 16) + 3] = xr[18*(1 + i)]; MA_DR_MP3_S0(0) MA_DR_MP3_S2(1) MA_DR_MP3_S1(2) MA_DR_MP3_S2(3) MA_DR_MP3_S1(4) MA_DR_MP3_S2(5) MA_DR_MP3_S1(6) MA_DR_MP3_S2(7) dstr[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[1]); dstr[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[1]); dstl[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[0]); dstl[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[0]); dstr[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[3]); dstr[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[3]); dstl[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[2]); dstl[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[2]); } #endif } static void ma_dr_mp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, ma_dr_mp3d_sample_t *pcm, float *lins) { int i; for (i = 0; i < nch; i++) { ma_dr_mp3d_DCT_II(grbuf + 576*i, nbands); } MA_DR_MP3_COPY_MEMORY(lins, qmf_state, sizeof(float)*15*64); for (i = 0; i < nbands; i += 2) { ma_dr_mp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64); } #ifndef MA_DR_MP3_NONSTANDARD_BUT_LOGICAL if (nch == 1) { for (i = 0; i < 15*64; i += 2) { qmf_state[i] = lins[nbands*64 + i]; } } else #endif { MA_DR_MP3_COPY_MEMORY(qmf_state, lins + nbands*64, sizeof(float)*15*64); } } static int ma_dr_mp3d_match_frame(const ma_uint8 *hdr, int mp3_bytes, int frame_bytes) { int i, nmatch; for (i = 0, nmatch = 0; nmatch < MA_DR_MP3_MAX_FRAME_SYNC_MATCHES; nmatch++) { i += ma_dr_mp3_hdr_frame_bytes(hdr + i, frame_bytes) + ma_dr_mp3_hdr_padding(hdr + i); if (i + MA_DR_MP3_HDR_SIZE > mp3_bytes) return nmatch > 0; if (!ma_dr_mp3_hdr_compare(hdr, hdr + i)) return 0; } return 1; } static int ma_dr_mp3d_find_frame(const ma_uint8 *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes) { int i, k; for (i = 0; i < mp3_bytes - MA_DR_MP3_HDR_SIZE; i++, mp3++) { if (ma_dr_mp3_hdr_valid(mp3)) { int frame_bytes = ma_dr_mp3_hdr_frame_bytes(mp3, *free_format_bytes); int frame_and_padding = frame_bytes + ma_dr_mp3_hdr_padding(mp3); for (k = MA_DR_MP3_HDR_SIZE; !frame_bytes && k < MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - MA_DR_MP3_HDR_SIZE; k++) { if (ma_dr_mp3_hdr_compare(mp3, mp3 + k)) { int fb = k - ma_dr_mp3_hdr_padding(mp3); int nextfb = fb + ma_dr_mp3_hdr_padding(mp3 + k); if (i + k + nextfb + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + k + nextfb)) continue; frame_and_padding = k; frame_bytes = fb; *free_format_bytes = fb; } } if ((frame_bytes && i + frame_and_padding <= mp3_bytes && ma_dr_mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) || (!i && frame_and_padding == mp3_bytes)) { *ptr_frame_bytes = frame_and_padding; return i; } *free_format_bytes = 0; } } *ptr_frame_bytes = 0; return mp3_bytes; } MA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec) { dec->header[0] = 0; } MA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info) { int i = 0, igr, frame_size = 0, success = 1; const ma_uint8 *hdr; ma_dr_mp3_bs bs_frame[1]; ma_dr_mp3dec_scratch scratch; if (mp3_bytes > 4 && dec->header[0] == 0xff && ma_dr_mp3_hdr_compare(dec->header, mp3)) { frame_size = ma_dr_mp3_hdr_frame_bytes(mp3, dec->free_format_bytes) + ma_dr_mp3_hdr_padding(mp3); if (frame_size != mp3_bytes && (frame_size + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + frame_size))) { frame_size = 0; } } if (!frame_size) { MA_DR_MP3_ZERO_MEMORY(dec, sizeof(ma_dr_mp3dec)); i = ma_dr_mp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size); if (!frame_size || i + frame_size > mp3_bytes) { info->frame_bytes = i; return 0; } } hdr = mp3 + i; MA_DR_MP3_COPY_MEMORY(dec->header, hdr, MA_DR_MP3_HDR_SIZE); info->frame_bytes = i + frame_size; info->channels = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2; info->hz = ma_dr_mp3_hdr_sample_rate_hz(hdr); info->layer = 4 - MA_DR_MP3_HDR_GET_LAYER(hdr); info->bitrate_kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr); ma_dr_mp3_bs_init(bs_frame, hdr + MA_DR_MP3_HDR_SIZE, frame_size - MA_DR_MP3_HDR_SIZE); if (MA_DR_MP3_HDR_IS_CRC(hdr)) { ma_dr_mp3_bs_get_bits(bs_frame, 16); } if (info->layer == 3) { int main_data_begin = ma_dr_mp3_L3_read_side_info(bs_frame, scratch.gr_info, hdr); if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit) { ma_dr_mp3dec_init(dec); return 0; } success = ma_dr_mp3_L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin); if (success && pcm != NULL) { for (igr = 0; igr < (MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*576*info->channels)) { MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); ma_dr_mp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels); ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]); } } ma_dr_mp3_L3_save_reservoir(dec, &scratch); } else { #ifdef MA_DR_MP3_ONLY_MP3 return 0; #else ma_dr_mp3_L12_scale_info sci[1]; if (pcm == NULL) { return ma_dr_mp3_hdr_frame_samples(hdr); } ma_dr_mp3_L12_read_scale_info(hdr, bs_frame, sci); MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); for (i = 0, igr = 0; igr < 3; igr++) { if (12 == (i += ma_dr_mp3_L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1))) { i = 0; ma_dr_mp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]); ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]); MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*384*info->channels); } if (bs_frame->pos > bs_frame->limit) { ma_dr_mp3dec_init(dec); return 0; } } #endif } return success*ma_dr_mp3_hdr_frame_samples(dec->header); } MA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples) { size_t i = 0; #if MA_DR_MP3_HAVE_SIMD size_t aligned_count = num_samples & ~7; for(; i < aligned_count; i+=8) { ma_dr_mp3_f4 scale = MA_DR_MP3_VSET(32768.0f); ma_dr_mp3_f4 a = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i ]), scale); ma_dr_mp3_f4 b = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i+4]), scale); #if MA_DR_MP3_HAVE_SSE ma_dr_mp3_f4 s16max = MA_DR_MP3_VSET( 32767.0f); ma_dr_mp3_f4 s16min = MA_DR_MP3_VSET(-32768.0f); __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, s16max), s16min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, s16max), s16min))); out[i ] = (ma_int16)_mm_extract_epi16(pcm8, 0); out[i+1] = (ma_int16)_mm_extract_epi16(pcm8, 1); out[i+2] = (ma_int16)_mm_extract_epi16(pcm8, 2); out[i+3] = (ma_int16)_mm_extract_epi16(pcm8, 3); out[i+4] = (ma_int16)_mm_extract_epi16(pcm8, 4); out[i+5] = (ma_int16)_mm_extract_epi16(pcm8, 5); out[i+6] = (ma_int16)_mm_extract_epi16(pcm8, 6); out[i+7] = (ma_int16)_mm_extract_epi16(pcm8, 7); #else int16x4_t pcma, pcmb; a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f)); b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0))))); vst1_lane_s16(out+i , pcma, 0); vst1_lane_s16(out+i+1, pcma, 1); vst1_lane_s16(out+i+2, pcma, 2); vst1_lane_s16(out+i+3, pcma, 3); vst1_lane_s16(out+i+4, pcmb, 0); vst1_lane_s16(out+i+5, pcmb, 1); vst1_lane_s16(out+i+6, pcmb, 2); vst1_lane_s16(out+i+7, pcmb, 3); #endif } #endif for(; i < num_samples; i++) { float sample = in[i] * 32768.0f; if (sample >= 32766.5f) out[i] = (ma_int16) 32767; else if (sample <= -32767.5f) out[i] = (ma_int16)-32768; else { short s = (ma_int16)(sample + .5f); s -= (s < 0); out[i] = s; } } } #ifndef MA_DR_MP3_SEEK_LEADING_MP3_FRAMES #define MA_DR_MP3_SEEK_LEADING_MP3_FRAMES 2 #endif #define MA_DR_MP3_MIN_DATA_CHUNK_SIZE 16384 #ifndef MA_DR_MP3_DATA_CHUNK_SIZE #define MA_DR_MP3_DATA_CHUNK_SIZE (MA_DR_MP3_MIN_DATA_CHUNK_SIZE*4) #endif #define MA_DR_MP3_COUNTOF(x) (sizeof(x) / sizeof(x[0])) #define MA_DR_MP3_CLAMP(x, lo, hi) (MA_DR_MP3_MAX(lo, MA_DR_MP3_MIN(x, hi))) #ifndef MA_DR_MP3_PI_D #define MA_DR_MP3_PI_D 3.14159265358979323846264 #endif #define MA_DR_MP3_DEFAULT_RESAMPLER_LPF_ORDER 2 static MA_INLINE float ma_dr_mp3_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static MA_INLINE float ma_dr_mp3_mix_f32_fast(float x, float y, float a) { float r0 = (y - x); float r1 = r0*a; return x + r1; } static MA_INLINE ma_uint32 ma_dr_mp3_gcf_u32(ma_uint32 a, ma_uint32 b) { for (;;) { if (b == 0) { break; } else { ma_uint32 t = a; a = b; b = t % a; } } return a; } static void* ma_dr_mp3__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return MA_DR_MP3_MALLOC(sz); } static void* ma_dr_mp3__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return MA_DR_MP3_REALLOC(p, sz); } static void ma_dr_mp3__free_default(void* p, void* pUserData) { (void)pUserData; MA_DR_MP3_FREE(p); } static void* ma_dr_mp3__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* ma_dr_mp3__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { MA_DR_MP3_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void ma_dr_mp3__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static ma_allocation_callbacks ma_dr_mp3_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return *pAllocationCallbacks; } else { ma_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = ma_dr_mp3__malloc_default; allocationCallbacks.onRealloc = ma_dr_mp3__realloc_default; allocationCallbacks.onFree = ma_dr_mp3__free_default; return allocationCallbacks; } } static size_t ma_dr_mp3__on_read(ma_dr_mp3* pMP3, void* pBufferOut, size_t bytesToRead) { size_t bytesRead = pMP3->onRead(pMP3->pUserData, pBufferOut, bytesToRead); pMP3->streamCursor += bytesRead; return bytesRead; } static ma_bool32 ma_dr_mp3__on_seek(ma_dr_mp3* pMP3, int offset, ma_dr_mp3_seek_origin origin) { MA_DR_MP3_ASSERT(offset >= 0); if (!pMP3->onSeek(pMP3->pUserData, offset, origin)) { return MA_FALSE; } if (origin == ma_dr_mp3_seek_origin_start) { pMP3->streamCursor = (ma_uint64)offset; } else { pMP3->streamCursor += offset; } return MA_TRUE; } static ma_bool32 ma_dr_mp3__on_seek_64(ma_dr_mp3* pMP3, ma_uint64 offset, ma_dr_mp3_seek_origin origin) { if (offset <= 0x7FFFFFFF) { return ma_dr_mp3__on_seek(pMP3, (int)offset, origin); } if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } offset -= 0x7FFFFFFF; while (offset > 0) { if (offset <= 0x7FFFFFFF) { if (!ma_dr_mp3__on_seek(pMP3, (int)offset, ma_dr_mp3_seek_origin_current)) { return MA_FALSE; } offset = 0; } else { if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_current)) { return MA_FALSE; } offset -= 0x7FFFFFFF; } } return MA_TRUE; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex__callbacks(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { ma_uint32 pcmFramesRead = 0; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onRead != NULL); if (pMP3->atEnd) { return 0; } for (;;) { ma_dr_mp3dec_frame_info info; if (pMP3->dataSize < MA_DR_MP3_MIN_DATA_CHUNK_SIZE) { size_t bytesRead; if (pMP3->pData != NULL) { MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); } pMP3->dataConsumed = 0; if (pMP3->dataCapacity < MA_DR_MP3_DATA_CHUNK_SIZE) { ma_uint8* pNewData; size_t newDataCap; newDataCap = MA_DR_MP3_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { if (pMP3->dataSize == 0) { pMP3->atEnd = MA_TRUE; return 0; } } pMP3->dataSize += bytesRead; } if (pMP3->dataSize > INT_MAX) { pMP3->atEnd = MA_TRUE; return 0; } MA_DR_MP3_ASSERT(pMP3->pData != NULL); MA_DR_MP3_ASSERT(pMP3->dataCapacity > 0); if (pMP3->pData == NULL) { return 0; } pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info); if (info.frame_bytes > 0) { pMP3->dataConsumed += (size_t)info.frame_bytes; pMP3->dataSize -= (size_t)info.frame_bytes; } if (pcmFramesRead > 0) { pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes == 0) { size_t bytesRead; MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); pMP3->dataConsumed = 0; if (pMP3->dataCapacity == pMP3->dataSize) { ma_uint8* pNewData; size_t newDataCap; newDataCap = pMP3->dataCapacity + MA_DR_MP3_DATA_CHUNK_SIZE; pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { pMP3->atEnd = MA_TRUE; return 0; } pMP3->dataSize += bytesRead; } }; return pcmFramesRead; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex__memory(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { ma_uint32 pcmFramesRead = 0; ma_dr_mp3dec_frame_info info; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->memory.pData != NULL); if (pMP3->atEnd) { return 0; } for (;;) { pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->memory.pData + pMP3->memory.currentReadPos, (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos), pPCMFrames, &info); if (pcmFramesRead > 0) { pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes > 0) { pMP3->memory.currentReadPos += (size_t)info.frame_bytes; } else { break; } } pMP3->memory.currentReadPos += (size_t)info.frame_bytes; return pcmFramesRead; } static ma_uint32 ma_dr_mp3_decode_next_frame_ex(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames) { if (pMP3->memory.pData != NULL && pMP3->memory.dataSize > 0) { return ma_dr_mp3_decode_next_frame_ex__memory(pMP3, pPCMFrames); } else { return ma_dr_mp3_decode_next_frame_ex__callbacks(pMP3, pPCMFrames); } } static ma_uint32 ma_dr_mp3_decode_next_frame(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); return ma_dr_mp3_decode_next_frame_ex(pMP3, (ma_dr_mp3d_sample_t*)pMP3->pcmFrames); } #if 0 static ma_uint32 ma_dr_mp3_seek_next_frame(ma_dr_mp3* pMP3) { ma_uint32 pcmFrameCount; MA_DR_MP3_ASSERT(pMP3 != NULL); pcmFrameCount = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFrameCount == 0) { return 0; } pMP3->currentPCMFrame += pcmFrameCount; pMP3->pcmFramesConsumedInMP3Frame = pcmFrameCount; pMP3->pcmFramesRemainingInMP3Frame = 0; return pcmFrameCount; } #endif static ma_bool32 ma_dr_mp3_init_internal(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(onRead != NULL); ma_dr_mp3dec_init(&pMP3->decoder); pMP3->onRead = onRead; pMP3->onSeek = onSeek; pMP3->pUserData = pUserData; pMP3->allocationCallbacks = ma_dr_mp3_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pMP3->allocationCallbacks.onFree == NULL || (pMP3->allocationCallbacks.onMalloc == NULL && pMP3->allocationCallbacks.onRealloc == NULL)) { return MA_FALSE; } if (ma_dr_mp3_decode_next_frame(pMP3) == 0) { ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); return MA_FALSE; } pMP3->channels = pMP3->mp3FrameChannels; pMP3->sampleRate = pMP3->mp3FrameSampleRate; return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL || onRead == NULL) { return MA_FALSE; } MA_DR_MP3_ZERO_OBJECT(pMP3); return ma_dr_mp3_init_internal(pMP3, onRead, onSeek, pUserData, pAllocationCallbacks); } static size_t ma_dr_mp3__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData; size_t bytesRemaining; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->memory.dataSize >= pMP3->memory.currentReadPos); bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { MA_DR_MP3_COPY_MEMORY(pBufferOut, pMP3->memory.pData + pMP3->memory.currentReadPos, bytesToRead); pMP3->memory.currentReadPos += bytesToRead; } return bytesToRead; } static ma_bool32 ma_dr_mp3__on_seek_memory(void* pUserData, int byteOffset, ma_dr_mp3_seek_origin origin) { ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData; MA_DR_MP3_ASSERT(pMP3 != NULL); if (origin == ma_dr_mp3_seek_origin_current) { if (byteOffset > 0) { if (pMP3->memory.currentReadPos + byteOffset > pMP3->memory.dataSize) { byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos); } } else { if (pMP3->memory.currentReadPos < (size_t)-byteOffset) { byteOffset = -(int)pMP3->memory.currentReadPos; } } pMP3->memory.currentReadPos += byteOffset; } else { if ((ma_uint32)byteOffset <= pMP3->memory.dataSize) { pMP3->memory.currentReadPos = byteOffset; } else { pMP3->memory.currentReadPos = pMP3->memory.dataSize; } } return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL) { return MA_FALSE; } MA_DR_MP3_ZERO_OBJECT(pMP3); if (pData == NULL || dataSize == 0) { return MA_FALSE; } pMP3->memory.pData = (const ma_uint8*)pData; pMP3->memory.dataSize = dataSize; pMP3->memory.currentReadPos = 0; return ma_dr_mp3_init_internal(pMP3, ma_dr_mp3__on_read_memory, ma_dr_mp3__on_seek_memory, pMP3, pAllocationCallbacks); } #ifndef MA_DR_MP3_NO_STDIO #include #include static size_t ma_dr_mp3__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } static ma_bool32 ma_dr_mp3__on_seek_stdio(void* pUserData, int offset, ma_dr_mp3_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == ma_dr_mp3_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } MA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; FILE* pFile; if (ma_fopen(&pFile, pFilePath, "rb") != MA_SUCCESS) { return MA_FALSE; } result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks) { ma_bool32 result; FILE* pFile; if (ma_wfopen(&pFile, pFilePath, L"rb", pAllocationCallbacks) != MA_SUCCESS) { return MA_FALSE; } result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != MA_TRUE) { fclose(pFile); return result; } return MA_TRUE; } #endif MA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3) { if (pMP3 == NULL) { return; } #ifndef MA_DR_MP3_NO_STDIO if (pMP3->onRead == ma_dr_mp3__on_read_stdio) { FILE* pFile = (FILE*)pMP3->pUserData; if (pFile != NULL) { fclose(pFile); pMP3->pUserData = NULL; } } #endif ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); } #if defined(MA_DR_MP3_FLOAT_OUTPUT) static void ma_dr_mp3_f32_to_s16(ma_int16* dst, const float* src, ma_uint64 sampleCount) { ma_uint64 i; ma_uint64 i4; ma_uint64 sampleCount4; i = 0; sampleCount4 = sampleCount >> 2; for (i4 = 0; i4 < sampleCount4; i4 += 1) { float x0 = src[i+0]; float x1 = src[i+1]; float x2 = src[i+2]; float x3 = src[i+3]; x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0)); x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1)); x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2)); x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3)); x0 = x0 * 32767.0f; x1 = x1 * 32767.0f; x2 = x2 * 32767.0f; x3 = x3 * 32767.0f; dst[i+0] = (ma_int16)x0; dst[i+1] = (ma_int16)x1; dst[i+2] = (ma_int16)x2; dst[i+3] = (ma_int16)x3; i += 4; } for (; i < sampleCount; i += 1) { float x = src[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); x = x * 32767.0f; dst[i] = (ma_int16)x; } } #endif #if !defined(MA_DR_MP3_FLOAT_OUTPUT) static void ma_dr_mp3_s16_to_f32(float* dst, const ma_int16* src, ma_uint64 sampleCount) { ma_uint64 i; for (i = 0; i < sampleCount; i += 1) { float x = (float)src[i]; x = x * 0.000030517578125f; dst[i] = x; } } #endif static ma_uint64 ma_dr_mp3_read_pcm_frames_raw(ma_dr_mp3* pMP3, ma_uint64 framesToRead, void* pBufferOut) { ma_uint64 totalFramesRead = 0; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onRead != NULL); while (framesToRead > 0) { ma_uint32 framesToConsume = (ma_uint32)MA_DR_MP3_MIN(pMP3->pcmFramesRemainingInMP3Frame, framesToRead); if (pBufferOut != NULL) { #if defined(MA_DR_MP3_FLOAT_OUTPUT) float* pFramesOutF32 = (float*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalFramesRead * pMP3->channels); float* pFramesInF32 = (float*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(float) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); MA_DR_MP3_COPY_MEMORY(pFramesOutF32, pFramesInF32, sizeof(float) * framesToConsume * pMP3->channels); #else ma_int16* pFramesOutS16 = (ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(ma_int16) * totalFramesRead * pMP3->channels); ma_int16* pFramesInS16 = (ma_int16*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(ma_int16) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); MA_DR_MP3_COPY_MEMORY(pFramesOutS16, pFramesInS16, sizeof(ma_int16) * framesToConsume * pMP3->channels); #endif } pMP3->currentPCMFrame += framesToConsume; pMP3->pcmFramesConsumedInMP3Frame += framesToConsume; pMP3->pcmFramesRemainingInMP3Frame -= framesToConsume; totalFramesRead += framesToConsume; framesToRead -= framesToConsume; if (framesToRead == 0) { break; } MA_DR_MP3_ASSERT(pMP3->pcmFramesRemainingInMP3Frame == 0); if (ma_dr_mp3_decode_next_frame(pMP3) == 0) { break; } } return totalFramesRead; } MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if defined(MA_DR_MP3_FLOAT_OUTPUT) return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else { ma_int16 pTempS16[8192]; ma_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { ma_uint64 framesJustRead; ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead; ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempS16) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempS16); if (framesJustRead == 0) { break; } ma_dr_mp3_s16_to_f32((float*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } MA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if !defined(MA_DR_MP3_FLOAT_OUTPUT) return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else { float pTempF32[4096]; ma_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { ma_uint64 framesJustRead; ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead; ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempF32) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempF32); if (framesJustRead == 0) { break; } ma_dr_mp3_f32_to_s16((ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(ma_int16) * totalPCMFramesRead * pMP3->channels), pTempF32, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } static void ma_dr_mp3_reset(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = 0; pMP3->currentPCMFrame = 0; pMP3->dataSize = 0; pMP3->atEnd = MA_FALSE; ma_dr_mp3dec_init(&pMP3->decoder); } static ma_bool32 ma_dr_mp3_seek_to_start_of_stream(ma_dr_mp3* pMP3) { MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->onSeek != NULL); if (!ma_dr_mp3__on_seek(pMP3, 0, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } ma_dr_mp3_reset(pMP3); return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameOffset) { ma_uint64 framesRead; #if defined(MA_DR_MP3_FLOAT_OUTPUT) framesRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); #else framesRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, frameOffset, NULL); #endif if (framesRead != frameOffset) { return MA_FALSE; } return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_to_pcm_frame__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { MA_DR_MP3_ASSERT(pMP3 != NULL); if (frameIndex == pMP3->currentPCMFrame) { return MA_TRUE; } if (frameIndex < pMP3->currentPCMFrame) { if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } } MA_DR_MP3_ASSERT(frameIndex >= pMP3->currentPCMFrame); return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, (frameIndex - pMP3->currentPCMFrame)); } static ma_bool32 ma_dr_mp3_find_closest_seek_point(ma_dr_mp3* pMP3, ma_uint64 frameIndex, ma_uint32* pSeekPointIndex) { ma_uint32 iSeekPoint; MA_DR_MP3_ASSERT(pSeekPointIndex != NULL); *pSeekPointIndex = 0; if (frameIndex < pMP3->pSeekPoints[0].pcmFrameIndex) { return MA_FALSE; } for (iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) { if (pMP3->pSeekPoints[iSeekPoint].pcmFrameIndex > frameIndex) { break; } *pSeekPointIndex = iSeekPoint; } return MA_TRUE; } static ma_bool32 ma_dr_mp3_seek_to_pcm_frame__seek_table(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { ma_dr_mp3_seek_point seekPoint; ma_uint32 priorSeekPointIndex; ma_uint16 iMP3Frame; ma_uint64 leftoverFrames; MA_DR_MP3_ASSERT(pMP3 != NULL); MA_DR_MP3_ASSERT(pMP3->pSeekPoints != NULL); MA_DR_MP3_ASSERT(pMP3->seekPointCount > 0); if (ma_dr_mp3_find_closest_seek_point(pMP3, frameIndex, &priorSeekPointIndex)) { seekPoint = pMP3->pSeekPoints[priorSeekPointIndex]; } else { seekPoint.seekPosInBytes = 0; seekPoint.pcmFrameIndex = 0; seekPoint.mp3FramesToDiscard = 0; seekPoint.pcmFramesToDiscard = 0; } if (!ma_dr_mp3__on_seek_64(pMP3, seekPoint.seekPosInBytes, ma_dr_mp3_seek_origin_start)) { return MA_FALSE; } ma_dr_mp3_reset(pMP3); for (iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) { ma_uint32 pcmFramesRead; ma_dr_mp3d_sample_t* pPCMFrames; pPCMFrames = NULL; if (iMP3Frame == seekPoint.mp3FramesToDiscard-1) { pPCMFrames = (ma_dr_mp3d_sample_t*)pMP3->pcmFrames; } pcmFramesRead = ma_dr_mp3_decode_next_frame_ex(pMP3, pPCMFrames); if (pcmFramesRead == 0) { return MA_FALSE; } } pMP3->currentPCMFrame = seekPoint.pcmFrameIndex - seekPoint.pcmFramesToDiscard; leftoverFrames = frameIndex - pMP3->currentPCMFrame; return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, leftoverFrames); } MA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex) { if (pMP3 == NULL || pMP3->onSeek == NULL) { return MA_FALSE; } if (frameIndex == 0) { return ma_dr_mp3_seek_to_start_of_stream(pMP3); } if (pMP3->pSeekPoints != NULL && pMP3->seekPointCount > 0) { return ma_dr_mp3_seek_to_pcm_frame__seek_table(pMP3, frameIndex); } else { return ma_dr_mp3_seek_to_pcm_frame__brute_force(pMP3, frameIndex); } } MA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount) { ma_uint64 currentPCMFrame; ma_uint64 totalPCMFrameCount; ma_uint64 totalMP3FrameCount; if (pMP3 == NULL) { return MA_FALSE; } if (pMP3->onSeek == NULL) { return MA_FALSE; } currentPCMFrame = pMP3->currentPCMFrame; if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } totalPCMFrameCount = 0; totalMP3FrameCount = 0; for (;;) { ma_uint32 pcmFramesInCurrentMP3Frame; pcmFramesInCurrentMP3Frame = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3Frame == 0) { break; } totalPCMFrameCount += pcmFramesInCurrentMP3Frame; totalMP3FrameCount += 1; } if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return MA_FALSE; } if (pMP3FrameCount != NULL) { *pMP3FrameCount = totalMP3FrameCount; } if (pPCMFrameCount != NULL) { *pPCMFrameCount = totalPCMFrameCount; } return MA_TRUE; } MA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3) { ma_uint64 totalPCMFrameCount; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, NULL, &totalPCMFrameCount)) { return 0; } return totalPCMFrameCount; } MA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3) { ma_uint64 totalMP3FrameCount; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, NULL)) { return 0; } return totalMP3FrameCount; } static void ma_dr_mp3__accumulate_running_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint32 pcmFrameCountIn, ma_uint64* pRunningPCMFrameCount, float* pRunningPCMFrameCountFractionalPart) { float srcRatio; float pcmFrameCountOutF; ma_uint32 pcmFrameCountOut; srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; MA_DR_MP3_ASSERT(srcRatio > 0); pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio); pcmFrameCountOut = (ma_uint32)pcmFrameCountOutF; *pRunningPCMFrameCountFractionalPart = pcmFrameCountOutF - pcmFrameCountOut; *pRunningPCMFrameCount += pcmFrameCountOut; } typedef struct { ma_uint64 bytePos; ma_uint64 pcmFrameIndex; } ma_dr_mp3__seeking_mp3_frame_info; MA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints) { ma_uint32 seekPointCount; ma_uint64 currentPCMFrame; ma_uint64 totalMP3FrameCount; ma_uint64 totalPCMFrameCount; if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) { return MA_FALSE; } seekPointCount = *pSeekPointCount; if (seekPointCount == 0) { return MA_FALSE; } currentPCMFrame = pMP3->currentPCMFrame; if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, &totalPCMFrameCount)) { return MA_FALSE; } if (totalMP3FrameCount < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1) { seekPointCount = 1; pSeekPoints[0].seekPosInBytes = 0; pSeekPoints[0].pcmFrameIndex = 0; pSeekPoints[0].mp3FramesToDiscard = 0; pSeekPoints[0].pcmFramesToDiscard = 0; } else { ma_uint64 pcmFramesBetweenSeekPoints; ma_dr_mp3__seeking_mp3_frame_info mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1]; ma_uint64 runningPCMFrameCount = 0; float runningPCMFrameCountFractionalPart = 0; ma_uint64 nextTargetPCMFrame; ma_uint32 iMP3Frame; ma_uint32 iSeekPoint; if (seekPointCount > totalMP3FrameCount-1) { seekPointCount = (ma_uint32)totalMP3FrameCount-1; } pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1); if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } for (iMP3Frame = 0; iMP3Frame < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) { ma_uint32 pcmFramesInCurrentMP3FrameIn; MA_DR_MP3_ASSERT(pMP3->streamCursor >= pMP3->dataSize); mp3FrameInfo[iMP3Frame].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[iMP3Frame].pcmFrameIndex = runningPCMFrameCount; pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { return MA_FALSE; } ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } nextTargetPCMFrame = 0; for (iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) { nextTargetPCMFrame += pcmFramesBetweenSeekPoints; for (;;) { if (nextTargetPCMFrame < runningPCMFrameCount) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } else { size_t i; ma_uint32 pcmFramesInCurrentMP3FrameIn; for (i = 0; i < MA_DR_MP3_COUNTOF(mp3FrameInfo)-1; ++i) { mp3FrameInfo[i] = mp3FrameInfo[i+1]; } mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].pcmFrameIndex = runningPCMFrameCount; pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } } } if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) { return MA_FALSE; } if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return MA_FALSE; } } *pSeekPointCount = seekPointCount; return MA_TRUE; } MA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints) { if (pMP3 == NULL) { return MA_FALSE; } if (seekPointCount == 0 || pSeekPoints == NULL) { pMP3->seekPointCount = 0; pMP3->pSeekPoints = NULL; } else { pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; } return MA_TRUE; } static float* ma_dr_mp3__full_read_and_close_f32(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount) { ma_uint64 totalFramesRead = 0; ma_uint64 framesCapacity = 0; float* pFrames = NULL; float temp[4096]; MA_DR_MP3_ASSERT(pMP3 != NULL); for (;;) { ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels; ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } if (framesCapacity < totalFramesRead + framesJustRead) { ma_uint64 oldFramesBufferSize; ma_uint64 newFramesBufferSize; ma_uint64 newFramesCap; float* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(float); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(float); if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) { break; } pNewFrames = (float*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(float))); totalFramesRead += framesJustRead; if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } ma_dr_mp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } static ma_int16* ma_dr_mp3__full_read_and_close_s16(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount) { ma_uint64 totalFramesRead = 0; ma_uint64 framesCapacity = 0; ma_int16* pFrames = NULL; ma_int16 temp[4096]; MA_DR_MP3_ASSERT(pMP3 != NULL); for (;;) { ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels; ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } if (framesCapacity < totalFramesRead + framesJustRead) { ma_uint64 newFramesBufferSize; ma_uint64 oldFramesBufferSize; ma_uint64 newFramesCap; ma_int16* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(ma_int16); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(ma_int16); if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) { break; } pNewFrames = (ma_int16*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(ma_int16))); totalFramesRead += framesJustRead; if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } ma_dr_mp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } MA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } MA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #ifndef MA_DR_MP3_NO_STDIO MA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } MA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks) { ma_dr_mp3 mp3; if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #endif MA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return ma_dr_mp3__malloc_from_callbacks(sz, pAllocationCallbacks); } else { return ma_dr_mp3__malloc_default(sz, NULL); } } MA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { ma_dr_mp3__free_from_callbacks(p, pAllocationCallbacks); } else { ma_dr_mp3__free_default(p, NULL); } } #endif /* dr_mp3_c end */ #endif /* MA_DR_MP3_IMPLEMENTATION */ #endif /* MA_NO_MP3 */ /* End globally disabled warnings. */ #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* miniaudio_c */ #endif /* MINIAUDIO_IMPLEMENTATION */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2025 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ miniaudio-0.11.22/research/000077500000000000000000000000001475701111600154325ustar00rootroot00000000000000miniaudio-0.11.22/research/README.txt000066400000000000000000000004721475701111600171330ustar00rootroot00000000000000This folder contains code that I'm experimenting with outside of the main miniaudio library. It's just for my own research and experimenting which I'm putting into the repository for version control purposes and to get feedback from the community. You should not consider any of this code to be production quality.miniaudio-0.11.22/resources/000077500000000000000000000000001475701111600156505ustar00rootroot00000000000000miniaudio-0.11.22/resources/branding/000077500000000000000000000000001475701111600174345ustar00rootroot00000000000000miniaudio-0.11.22/resources/branding/icon-128x128.png000066400000000000000000000022451475701111600220300ustar00rootroot00000000000000‰PNG  IHDR€€Ã>aËoiCCPicc(‘u‘½KBQÆjb”TCDƒEƒDcäb jբׯÀ˽JHkÐÒ 4D-} ýµ­AP-ý}-!·÷d „žË¹ïçœçåœç€=”Óòf‡ò…’<˱ë7}8a:®™úBd>JÛñuMÕ» Õ«ý¾–£;™25°u OkºQžm”tÅ;ÂZ6ž>ör@ák¥'êü¢8SçÅF4<vÕÓ“iâDkY#/<.ìÍçÊÚßyÔMÜ©ÂRDêÌaL à!A™ur”˜ZÌZûü¿¾EŠâÑä¯SÁG†¬x}¢–¥kJjZô”|9**÷ÿyšé©ÉzwwœÏ–õ> ®]¨U-ëûزj'àx‚ËBÃ_”œf>E¯64ï!ônÁùUCKìÁÅ6 >êq#þ+9dÚÓix;ƒžôßB×j=«¿uN º)Otû0&û{×~3zh"êlÂÖ pHYs.#.#x¥?vÜIDATx^íAJDQÿˆ‡òþ+o¥à ‚Ô@ÒåºíéTŠçJæõ|=??g |œMnð? p\P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷P€ãŽÇ÷8.ÀçÛó?¯·fÓ¾ù5}šänUjÓJhj ¸U¨M+ ©-àV 6­T€¦¶€[€Ú´RšÚnUjÓJhj ¸U¨M+ ©-àV 6­T€¦¶€[€Ú´RšÚnUjÓJhj ¸U¨M+ ©-àÖ—ßP-Zé PTqªT‹v*@QYÄ© @P-Ú©Ee§*Aµh§•EœªÕ¢ PTqªT‹v*@QYÄ© @P-Ú©Ee§*Aµh§•EœªÕ¢ PTqªT‹v*@QYÄ© @P-Ú©Ee§*Aµh§•EœªÕ¢ PTqªT‹v*@QYÄ©~cAõ?;ýÆÿÐówSþ H‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iH‰Í+ÀX¡iœ__ qÅ—°IEND®B`‚miniaudio-0.11.22/resources/branding/icon-256x256.png000066400000000000000000000043541475701111600220370ustar00rootroot00000000000000‰PNG  IHDR\r¨foiCCPicc(‘u‘;KA…¿$E#‚ Šˆ¤P±ˆ b)L£1‚¯f³y »qÙÝ b+ØX¢¯Â ­`« Š bãðÕHXï!A’YfïÇ™9—™3àŸ2tÓ©3ïÚñX4<¿°®%D+A:èÑtÇšžLPs|ÝãSõnPõª½¯êhJ¥| £ºe»ÂãÂSk®¥x[¸]Ïi)á#áˆ-¾Vz²Ä/г%þPl'âàW=ÃÙ NV°ž³Máá^Ó(èçQ7 ¥ós³R»dvã'F”0I ¬`à2(5/™U÷ ýúfX.‹ulqdɉ7"jAº¦¥fDOËg°®rÿŸ§“.uE!øìyï}P¿ ÅÏû>ö¼â žà2_ö¯JNcŸ¢ï”µÞChل󫲖܃‹-è|´4[û•2ý™ ¼Aó´ÝBãR)«¿uN ±!OtûÐ/û[–ågþ@q  pHYs.#.#x¥?v#IDATx^íÖÁMAEÁYä œÿ‰¬Œ Nö“öÐÛÕ£'_çy^Ç“_“[[š?ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßêÀ 0, ÃÇ·:ð Àðñ­N@¼Ã0||«o€À°€ ßê·'ø>×íw´àûžçõ¾Þÿg¿úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ @Fo0^@úø™€dôè ¿/ \çy^Ùtƒ HüHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ ­¿éRHù 'Ð @ëo:T@R~à ´Ðú›N €”ßp­€´þ¦H å7œ@+ðhÇ`ú÷¹>0ň» <Ï뮫ýîåÀ¯k7ÿ€'B`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ouà €áã[€x†`øøV' Þa>¾Õ €7@`X@†ou?NqFtµŒIEND®B`‚miniaudio-0.11.22/resources/branding/icon-64x64.png000066400000000000000000000012451475701111600216650ustar00rootroot00000000000000‰PNG  IHDR@@ªiqÞoiCCPicc(‘u‘;KA…¿$E#‚ Šˆ¤P±ˆ b)L£1‚¯f³y »qÙÝ b+ØX¢¯Â ­`« Š bãðÕHXï!A’YfïÇ™9—™3àŸ2tÓ©3ïÚñX4<¿°®%D+A:èÑtÇšžLPs|ÝãSõnPõª½¯êhJ¥| £ºe»ÂãÂSk®¥x[¸]Ïi)á#áˆ-¾Vz²Ä/г%þPl'âàW=ÃÙ NV°ž³Máá^Ó(èçQ7 ¥ós³R»dvã'F”0I ¬`à2(5/™U÷ ýúfX.‹ulqdɉ7"jAº¦¥fDOËg°®rÿŸ§“.uE!øìyï}P¿ ÅÏû>ö¼â žà2_ö¯JNcŸ¢ï”µÞChل󫲖܃‹-è|´4[û•2ý™ ¼Aó´ÝBãR)«¿uN ±!OtûÐ/û[–ågþ@q  pHYs.#.#x¥?vÜIDATx^í™A „0“ÅGùÿ“¿ZÁ'êPLyOÓé®÷º× ~~ƒïþ]½"`xÀpZ‚@#0 @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€ @€@O˜ƒ)‰±`ÉIEND®B`‚miniaudio-0.11.22/tests/000077500000000000000000000000001475701111600150005ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/000077500000000000000000000000001475701111600162365ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/README.md000066400000000000000000000017401475701111600175170ustar00rootroot00000000000000Building ======== Build and run from this directory. Example: gcc ../test_deviceio/ma_test_deviceio.c -o bin/test_deviceio -ldl -lm -lpthread -Wall -Wextra -Wpedantic -std=c89 ./bin/test_deviceio Output files will be placed in the "res/output" folder. Emscripten ---------- On Linux, do `source ~/emsdk/emsdk_env.sh` before compiling. On Windows, you need to move into the build and run emsdk_env.bat from a command prompt using an absolute path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't work for me for some reason. Example: emcc ../test_emscripten/ma_test_emscripten.c -o bin/test_emscripten.html -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY -DMA_ENABLE_AUDIO_WORKLETS -Wall -Wextra If you output WASM it may not work when running the web page locally. To test you can run with something like this: emrun ./bin/test_emscripten.html If you want to see stdout on the command line when running from emrun, add `--emrun` to your emcc command.miniaudio-0.11.22/tests/_build/res/000077500000000000000000000000001475701111600170275ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/res/benchmarks/000077500000000000000000000000001475701111600211445ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_f32_to_f32__mono_8000.raw000066400000000000000000000005001475701111600261150ustar00rootroot000000000000008>H}>à¹>Øð>Æ?¸%?v6?ÈB?HJ?ÊL?JJ?ÆB?z6?°%?Ð?Äð>ð¹>8}>>€80¾ }¾ô¹¾Èð¾Ì¿¶%¿r6¿ÐB¿@J¿ÔL¿@J¿ÌB¿v6¿´%¿Î¿Äð¾ô¹¾ }¾8¾€8 > }>ü¹>¸ð>Ô?®%?z6?ÊB?DJ?ÐL?DJ?ÈB?z6?²%?Î?Èð>ð¹> }>8>€¸¾0}¾ô¹¾Àð¾Ð¿²%¿x6¿ÊB¿DJ¿ÐL¿FJ¿ÈB¿z6¿°%¿Î¿Ðð¾ä¹¾H}¾¾miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_f32_to_s16__mono_8000.raw000066400000000000000000000002401475701111600261350ustar00rootroot00000000000000©x.6P}>ع>Üð>Æ?º%?t6?ÈB?FJ?ÌL?LJ?ÄB?x6?´%?È?Ôð>ä¹>H}>>¸¾(}¾ø¹¾¼ð¾Ô¿°%¿t6¿ÐB¿BJ¿ÎL¿HJ¿ÂB¿~6¿²%¿È¿Øð¾à¹¾@}¾(¾À8>(}>ð¹>Èð>Î?´%?r6?ÒB?:J?ØL?BJ?ÆB?€6?ª%?Ö?´ð>º>ø|>X>¹¾(}¾ü¹¾¸ð¾Ö¿ª%¿~6¿ÆB¿HJ¿ÐL¿DJ¿ÈB¿z6¿°%¿Î¿Ðð¾ä¹¾P}¾ðÿ½miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_s16_to_s16__mono_8000.raw000066400000000000000000000002401475701111600261540ustar00rootroot00000000000000ªv.7H}>à¹>Øð>Æ?¸%?v6?ÈB?HJ?ÊL?JJ?ÆB?z6?°%?Ð?Äð>ð¹>8}>>€80¾ }¾ô¹¾Èð¾Ì¿¶%¿r6¿ÐB¿@J¿ÔL¿@J¿ÌB¿v6¿´%¿Î¿Äð¾ô¹¾ }¾8¾€8 > }>ü¹>¸ð>Ô?®%?z6?ÊB?DJ?ÐL?DJ?ÈB?z6?²%?Î?Èð>ð¹> }>8>€¸¾0}¾ô¹¾Àð¾Ð¿²%¿x6¿ÊB¿DJ¿ÐL¿FJ¿ÈB¿z6¿°%¿Î¿Ðð¾ä¹¾H}¾¾miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_s24_to_s16__mono_8000.raw000066400000000000000000000002401475701111600261530ustar00rootroot00000000000000©x.6H}>à¹>Øð>Æ?¸%?v6?ÈB?HJ?ÊL?JJ?ÆB?z6?°%?Ð?Äð>ð¹>8}>>€80¾ }¾ô¹¾Èð¾Ì¿¶%¿r6¿ÐB¿@J¿ÔL¿@J¿ÌB¿v6¿´%¿Î¿Äð¾ô¹¾ }¾8¾€8 > }>ü¹>¸ð>Ô?®%?z6?ÊB?DJ?ÐL?DJ?ÈB?z6?²%?Î?Èð>ð¹> }>8>€¸¾0}¾ô¹¾Àð¾Ð¿²%¿x6¿ÊB¿DJ¿ÐL¿FJ¿ÈB¿z6¿°%¿Î¿Ðð¾ä¹¾H}¾¾miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_s32_to_s16__mono_8000.raw000066400000000000000000000002401475701111600261520ustar00rootroot00000000000000©x.6x>¸>ð>?$?6?B?J?L?J?B?6?$??ð>¸>x>>¼¾€¾¼¾ô¾¿&¿8¿D¿L¿N¿L¿D¿8¿&¿¿ô¾¼¾€¾¾>x>¸>ð>?$?6?B?J?L?J?B?6?$??ð>¸>x>>¼¾€¾¼¾ô¾¿&¿8¿D¿L¿N¿L¿D¿8¿&¿¿ô¾¼¾€¾¾miniaudio-0.11.22/tests/_build/res/benchmarks/pcm_u8_to_s16__mono_8000.raw000066400000000000000000000002401475701111600260770ustar00rootroot00000000000000.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàï.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàðminiaudio-0.11.22/tests/_build/res/benchmarks/pcm_u8_to_s24__mono_8000.raw000066400000000000000000000003601475701111600261010ustar00rootroot00000000000000.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàï.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàðminiaudio-0.11.22/tests/_build/res/benchmarks/pcm_u8_to_s32__mono_8000.raw000066400000000000000000000005001475701111600260740ustar00rootroot00000000000000.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàï.<HR[aefea[RH<.ÿïàÑ÷­¤žš™šž¤­·ÃÑàðminiaudio-0.11.22/tests/_build/res/benchmarks/pcm_u8_to_u8__mono_8000.raw000066400000000000000000000001201475701111600260170ustar00rootroot00000000000000€Ÿ®¼ÈÒÛáåæåáÛÒȼ®Ÿo`QC7-$$-7CQ`o€Ÿ®¼ÈÒÛáåæåáÛÒȼ®Ÿo`QC7-$$-7CQ`pminiaudio-0.11.22/tests/_build/res/output/000077500000000000000000000000001475701111600203675ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/res/output/DO_NOT_DELETE000066400000000000000000000000001475701111600223440ustar00rootroot00000000000000miniaudio-0.11.22/tests/_build/res/sine_s16_mono_48000.wav000066400000000000000000002734541475701111600227770ustar00rootroot00000000000000RIFF$wWAVEfmt €»wdatawåÅ ›b¯"-(‰-º2È7 Ý“-"°' -E2S70<Ü@PEˆI†M¢ "žœQ›išÕ™™´™,šðšœ‚OŸb¡Ñ£…¦Œ©Ö¬n°?´`¸ª¼AÁþÅõÊÐ_ÕÎÚ[àæÀë”ñm÷Rý: ú¿…% ³%+d05t:-?¹CHLéO{S¼V¾Yk\Ð^á`¡b d#eåePfaf#f…e•dSc´aÌ_‹]["XUQàMèI´EHAœ<È7»2ˆ-.(®"a›Æ ãú;ôfîœèíâOÝÓ×zÒ@Í@È[ÿ¾Hº¶ ²r®ÿªÞ§¥s¢8 Fž³œf›šÛ™ ™¯™šÜšô›^ Ÿ1¡‘£G¦?©Š¬°è³÷·J¼ÐÀŀʛÏäÔLÚÜß{å@ëñæöÊü¬“n; 7%ž*ë/ 5:Ã>RC£G¿K“O*StV{Y/\ž^±`~bîce×eIfef)fše¬ducÝaü_Â]?[fXOUßQ:NEJF±A =:833.ª(3#•ìQ lФúÂôïî ésãÍÝUØñҼͯÈÎÃ&¿­º{¶x²Æ®L«#¨A¥¬¢g ržÑœ„›Œšì™™­™ šÇš×›;òžþ Y£¦ü¨6¬Á¯‹³—·ã»dÀÅ Ê#ÏfÔÑÙRßå²ê„ð]ö@ü# ã ·z¶$"*p/™4Œ9Y>çBDG_K@OÖR-V5Y÷[d^‰`TbÑc÷dÊe?fjf/f«eÈd‘cb)`û]|[­X—U4RN¥J}FB{=­8§3.()±#jªÖ ö,ûLõtï©éòãUÞÍØrÓ1Î"É?Ä¿»Ø¶Ô²¯›«j¨€¥æ¢–  žðœ¢›šõ™¥™¥™š²š»›ʞǠ"£¾¥³¨è«m¯/³8·z»ú¿¯Ä•ɬÎêÓPÙÓÞxä.êýïÓõ¸û˜…Y 4ï¡1$§)ø.49ê=BãFKçN‡RáUóX¹[/^Z`-bµcÝdºe9•4r/#*³$"v¸å #Aü[ö†ð²êÿäRßÒÙeÔ#Ï ÊÅfÀỘ·Š³Ã¯5¬û¨¦W£¡ðž=՛ǚšª™¡™é™š„›Ðœužd ¯¢>¥%¨K«Ç®w²|¶«º)¿ËñȹÍöÒPØÒÝnã#éîîÁô¨ú…rI %ç˜3#§(.03:8 =®AFDJ9NáQLUiX=[Ã]û_ßasc®d˜e)fffIf×e eðc{b´`œ^0\zYwV%S˜OºK§GPCÄ>þ95é/¡*3%£þ=m’¯Çüèöñ>ë~åÚßMÚãÔÏ~ÊÅÐÀH¼û·ä³°ˆ¬@©G¦£3¡Ÿ`ó›Üšš°™™à™yšl›­œKž4 v¢¥Ý§«n®$²¶Jº½¾^Ã=ÈBÍyÒÓ×PÝëâžèdî<ôúäÆ ™d®"0(…-¾2Ä7¡ë ñåöÌü©˜hBù§0%£*è/5ý9Å>OC¦G¾K’O+SsV|Y0\š^·`xbòc eÕeMfaf-f•e±drcÞaý_À]A[gXLUâQ8NEJF¬A=6843.«(1#šæ$J r†¦úÃôìî$éoãÏÝUØðҿͪÈÒÃ$¿¯ºy¶y²Å®N«"¨@¥­¢g ržÒœ‚›šè™¡™ª™šÉšÔ›=ñžÿ W£¦ù¨8¬Â¯ˆ³›·Þ»hÀÅ Ê!ÏhÔÍÙXßúä¶ê‚ð^ö?ü% æ ¶x!³$$*q/–4Ž9X>æBFG^K?OØR,V5Y÷[d^‰`TbÒcödÉeBfff3f¨eÉdc b&`þ]x[°X—U4RN¥J|FBz=¬8ª3}.()³#r¤Û ñ*ûNõsï©éóãSÞÏØpÓ2Î"É@ÄŒ¿»Ó¶Ù²¯ž«h¨‚¥ã¢š ›žöœ› šõ™£™¦™š²š¼›ɞɠ£Ä¥¬¨ï«h¯0³9·x»ý¿­Ä•É­ÎçÓTÙÏÞ|ä+êþïÓõ·û›\ 3ï¢/$ª)õ.!49ë=~BäFKéN…RâUòXº[0^Y`.b²cád·e=fdf=f¸eßd³c-b[`.^»[ñXâU‡RæNKáF€Bê=94ø.¦)2$¡ï3[ ‚›¶ûÕõûï/êwäÔÞPÙêÓ¬Î”É°Äø¿}»5·3³g¯í«¯¨Â¥£È Êž¾›¯š𣙥™õ™žš¡›òœž˜ æ¢¥k¨›«¯×²Õ¶»Ž¿?Ä"É1ÎrÓÍØVÞðãªétïKõ/û÷Ö ©m°#*)}.ª3ª8}=BF J•N/R›U¬X|[ú]+`b•cÆdªe2fffBfÊeõdÔcQb‹`c^÷[6Y,V×R?O_KCGëBS>“9‘4v/ *´$"w·ç (=ü^ö„ð³êþäSßÒÙcÔ'ÏÊ!ÅdÀá»™·‰³Ã¯6¬ú¨¦X£ÿ ðž=՛ɚ š­™™î™ˆš‰›Ìœwžc °¢>¥%¨K«Æ®y²z¶­º'¿ÍïȼÍòÒRØÒÝlã'éêîÄô¤ú‰nN !èš/#¬(.33:8 =°AFHJ7NãQKUhX>[Å]÷_äamc³d–e*fefJfÕeeìcb²`œ^0\zYuV)S”O½K¥GRCÀ>:5î/ž*4%¤ü?k”¬Êüæö ñ>ë|åÜßLÚäÔœÏ~Ê‘ÅÎÀL¼ô·ì³°‹¬@©D¦”£0¡Ÿað›àšš³™œ™à™zšj›®œLž3 w¢ÿ¤Þ§ÿªs®²¶Hº½¾_Ã;ÈEÍvÒÕ×PÝéâ èdî;ôúþÿçÄ ›c±"-(†-¾2Å7Ÿ Û“."®'-D2R71<Û@QEˆI…MZPWT–PÐLÇHˆD@U;g6X1,´&*!ŠÏ) Maþ‚ø¡òÒì çbáÌÛ\ÖÑáËâÆÂ}½#¹ù´±x­ª§F¤Ð¡¨ŸÐPœ›JšÄ™™™È™Bš%›KœÓ¦ŸÑ¡F¤§ªz­±þ´¹½ÂãÆßË ÑWÖÑÛ_áçÑì òƒøbþK+ ÎŒ)!³&,V1i6R;@„DÉHÐL•PTNW?Zâ\5_:aèbFdMeÿeYf^f f_ecd cdai_]Z–WcTíP%M0IäDv@¾;á6Ë1“,.'®!VŒµ Òîþ ù*óXí‘ççáJÜÜÖÑYÌSÇ†Âæ½„¹[µp±Í­fªU§‚¤¢ÕŸùmœ9›WšÍ™›™¼™9š ›.œ«zŸ˜¡ ¤È¦Õ©)­À°¢´»¸½¨ÁsÆhËÐÜÕNÛÝà‹æEìòó÷ÞýÀ¡ €H¨ 3&˜+Þ0ô5ã:š?DhHtLAPÇSWýY¨\_aÄb,d7eòeUf`ffse|d.cŽaš_R]ÂZÛW³T=Q‚MIMEÞ@/ÁÿÅõÊÐbÕËÚ]àæÃë’ño÷Qý8 õÅ* °%+c05r:/?·CHLîOuSÁVºYn\Î^ã`žbd!eæeOfcf!f…e–dQc·aÊ_Œ]þZ$XÿTQÞMèIµEEA¡<Ä7¼2‰-+(³"dšÆ äú>ôbî¡èçâTÝÑ×xÒEÍ9Èbû¾Jº¶#²n®«Ú§¥s¢7 Hž°œj›yšá™œ™±™šÝšò›aŸ3¡‘£F¦A©‡¬°å³ú·H¼ÑÀÅÊœÏãÔNÚÙßå<ë ñäöËü¬“m>û¥3% *ì/ 5:Â>QC¦G»K—O&SwVxY3\™^¶`zbðceÕeKfdf*f˜e®dtcÝaý_À]A[eXOUàQ9NFJF¯A=9823.ª(1#˜êP l‰§úÁôíî#éoãÑÝRØóһͯÈÎÃ&¿­º|¶v²È®J«&¨>¥¯¢c vžÎœˆ›ˆšî™œ™®™ šÉšÕ›;ôžû [£¦ú¨9¬¾¯Ž³”·å»cÀÅ Ê$ÏfÔÎÙWßûäµê„ð\ö@ü$ ä ¹v"³$"*s/•49V>êBAGcKÄ#É2ÎoÓÑØQÞôã©ésïMõ,ûõØ ¦qµ#&).ª3©8=B‚F¢J‘N4R—U­X}[ø]-`b—cÃd­e0fgfAfÊeödÒcUb…`i^ó[8Y+VØR=ObKAGêBW>Ž9–4r/"*´$!x¶ç '>ü]öƒð¶êûäVßÏÙfÔ$Ï ÊÅdÀ⻘·Š³Â¯7¬ù¨¦W£ÿ òž;֛Ț š­™œ™î™‰š‡›Ïœtže ­¢A¥"¨O«Â®|²w¶°º#¿ÑîȻÍóÒRØÐÝqã"éíîÃô¤úŠmO ë—1#¬(.6378=¬AFCJ;NßQNUfXA[À]ý_Þarc°d˜e(fgfGfÙe eïc|b³`^/\|YsV+S’O¿K£GSCÁ>: 5ë/¡*2%¥ü=n’®Èüçö ñ>ë}åÛßLÚåÔšÏÊÅÓÀF¼û·ä³°…¬C©C¦”£0¡!Ÿ]õ›Ûšš±™œ™á™yšk›®œKž4 v¢ÿ¤ß§ÿªr® ²¶Kºº¾aÃ:ÈEÍxÒÓ×PÝêâ ècî<ôúÿÿçà œb±",(ˆ-¼2Å7 ZPWT”PÑLÉHƒD @L;q6O1,®&-!ˆÒ, Ieþø£òÐì çbáÍÛYÖ ÑßË䯀½¹ÿ´±z­ª §H¤Ð¡§ŸÑNœ ›HšÅ™˜™Ç™Fš!›NœÐ©ŸÎ¡I¤ § ªx­±ü´!¹~½ÂàÆãËÑ]ÖÌÛbá çÐì¢ò‚øaþN' Ј.!®&,S1l6P;@†DÇHÒL“PTMWAZà\7_8aébFdLefYf^f fbead cead_]}Z˜WdTéP*M+IèDt@¾;â6Ê1“,/'¬!R‘° Öìþ ù*óWí’çæáMÜØÖ‚ÑVÌVÇ…Â罃¹Zµs±É­kªQ§…¤¢ÖŸønœ8›XšÍ™š™½™8š ›-œ­vŸ¡ ¤Ë¦Ò©+­¿°£´º¸½©ÁrÆhË‘ÐÚÕQÛÛà‹æGìòö÷ÜýÀ£ ~I© 1&›+Ü0õ5â:š?!DfHwL=PÊSWÿY¦\_ aÈb'd;eñeTfcffxexd2cŒa™_U]½ZáW®T@Q‚MŠIQEÚ@2¢ "žœQ›išÕ™œ™·™(šôšœˆIŸg¡Í£‡¦‹©×¬m°A´\¸¯¼<ÁÆòÊÐ]ÕÏÚZàæÂë”ñk÷Vý3 ôÄ# ¶%+f0€5r:-?ºCHLêOxS¾V½Yl\Ï^â`Ÿbd#eåeOfdff‡e•dRcµaÍ_ˆ]["XÿT‘QÜMêIµEDA¢<Â7¿2†-.(°"d˜È ãú<ôdîŸèêâPÝÓ×yÒCÍ;È`û¾Kº¶"²n®«Ø§¥o¢; Džµœe›}šÞ™Ÿ™®™šÙšô›aŸ4¡‘£E¦A©ˆ¬°è³ø·H¼ÒÀłʚÏäÔMÚÚß~å=ë ñäöËü«”m=þ¢4%¡*è/5ü9Å>QC£GÀK’O*StVzY1\œ^´`{bïce×eIfff(fše­dscßaû_Ã]>[hXLUáQ:NDJF­A=:813.¨(4#–ê N oˆ¤úÄôëî%énãÑÝSØñҾͫÈÒÃ$¿¯ºx¶{²Ä®L«&¨<¥²¢a wžÎœ†›Œšè™¤™¦™šÃšÙ›9õžû Z£¦ø¨:¬¾¯³–·ã»dÀÅ Ê"ÏiÔÍÙWßûäµêƒð^ö>ü'æ ·w#²$#*q/–49W>èBCG`K?OÖR.V4Y÷[f^…`YbÍcûdÆeBfhf1fªeÇd’cb*`ú]{[¯X•U7RN¨JzFBy=¬8«3z.-)®#m§Ù ô+ûMõsï«éðãUÞÎØqÓ1Î$É<Ä‘¿»Õ¶Ù²¯¡«e¨„¥â¢š œžôœŸ›Ÿšô™¦™£™š²š¹›ƞʠ!£½¥´¨è«l¯1³4·»ö¿²Ä“ɬÎëÓOÙÕÞvä/êûïÖõµû~_ /ô4$¥)ø. 49é=BàFKçN†RâUòXº[/^Z`-b³càd¹e;fff;f¸eâd¯c2bV`3^¶[ôXáU‡RçNKßF‚Bè=94ù.¥)3$Ÿò1] ž´ûÖõûï/êväÖÞMÙìӬΓɱÄ÷¿}»6·1³j¯ë«°¨Á¥£Ê Èž»›²š𤙦™ñ™£š›óœŸž• è¢~¥k¨›«¯Ö²Õ¶»Ž¿?Ä"É2ÎoÓÑØQÞõã¦éwïIõ0ûûÒ ¬j°#+)z.¬3ª8|=B}F¥JN4R–U¯X|[ø]-`b•cÆdªe2fffCfÇeødÑcUb‡`f^õ[7Y+VÙR“9”4q/%*°$%u¸æ *;ü_öƒð´êýäUßÏÙfÔ$Ï ÊÅfÀà»™·Š³Á¯8¬ø¨¦W£ÿ ñž<֛Ț š«™¡™é™š„›Ïœužf «¢C¥¨R«À®}²w¶¯º&¿ÎîȽÍñÒTØÏÝpã#éìîÅô¡úkN $ä-#­(.3398 =¯AFFJ7NäQIUkX<[Ä]ú_áaoc²d–e*fffHf×eeíc~b²`^/\|YsV,SOÁK¡GUCÁ>: 5é/£*1%¦ú?m’®Èüçö ñ<ëåØßPÚáÔžÏ}ÊÅÑÀH¼ù·æ³°†¬C©C¦”£1¡Ÿ`ó›Ýšš²™œ™à™{šg›³œFž8 s¢¥Ü§«p®"²¶Jºº¾bÃ9ÈFÍvÒÕ×NÝîâ›ègî:ôúäÆ šd±"-(†-¿2Ã7¡¢  žœP›išÕ™™µ™*šóšœ‰GŸi¡Ì£‰¦‰©Ø¬k°C´\¸®¼>ÁÿÅõÊÐbÕÊÚ_àæÄë’ño÷Qý8 ÷Ä€( ±%+d0€5r:.?¹CHLêOyS¾V½Yl\Ï^â`Ÿbd!eçeNfcf"f„e—dPc¸aÈ_]ûZ'XýTQßMæI¸EBA£<Â7¿2†--(²"g—È äÿÿú;ôeîžèëâOÝÕ×wÒCÍ=È^ý¾Iº¶!²r®þªà§þ¤w¢4 Iž±œi›zšà™›™µ™šášð›`!Ÿ-¡˜£?¦E©†¬°è³÷·I¼ÒÀÅÊšÏæÔKÚÜß|å>ë ñåöÊü­“l>ü¥3% *ê/ 5:Ä>OC§G»K—O&SwVyY0\^³`|bðc eÚeGfgf'f›e­dtcÝaü_Â]?[iXIUæQ4NHJF®A=9823.ª(1#˜é!N nˆ¦úÁôîî#énãÒÝQØóҼͭÈÑÃ"¿³ºt¶~²Â®N«$¨?¥­¢g qžÓœ‚›Žšé™ ™ª™šÆšØ›:òžÿ W£¦÷¨:¬¿¯Œ³˜·à»gÀÅ Ê!ÏhÔÏÙUßüäµêƒð]ö@ü$ ç µy!²$%*q/•4‘9T>êBDG]KCOÓR/V4Y÷[e^ˆ`TbÒc÷dÈeCfdf7f¢eÐdŠcb&`ü]|[¬X™U2R’N£J€FB€=§8­3{.*)±#k¬Ô ø+ûOõqï¬éñãSÞÐØnÓ5ÎÉAÄŽ¿»Ø¶Ô²¯›«j¨€¥æ¢— žžñœ¢›šö™¤™¤™š³š¹›ȞȠ"£¾¥³¨é«k¯1³6·|»ù¿¯Ä•ɬÎéÓPÙÔÞwä0êúïÕõµûž~_ /óŸ2$¦)ø.49ç=‚BàFKéN„RäUñX¸[3^U`3b®cãd¶e=fef‘9•4q/$*²$#w¶æ %@ü\öƒð¶êúäXßÌÙjÔ Ï ÊÅfÀ⻘·Š³Á¯7¬û¨¦Y£ü õž9؛ƚ𬙠™è™š›Ôœqžg ¬¢A¥"¨O«Â®|²x¶®º'¿ÍðȺÍôÒPØÔÝlã&éêîÄô¤ú‰nN ê—2#©(./3=8 =°AFFJ7NäQIUkX;[Æ]ø_âapc°d—e+fcfLfÔeeíc~b²`œ^1\zYtV+S‘OÁK¢GSCÂ>: 5é/¢*1%¦û>n±Åüéöñ>ë~åÚßLÚåԛπʎÅÑÀH¼ù·è³°‰¬@©E¦“£1¡Ÿ_ó›Þšš³™›™á™zši›°œIž6 t¢¥Ü§«p®!²¶Kº»¾`Ã;ÈDÍwÒÖ×LÝîâœègî:ôúäÈ —g¶"((‹-»2Å7 Á®¼\¸B´l°Ø¬Š©†¦Ð£d¡MŸ„œôš(š¸™™™Ø™gšR›Žœž :¢Å¤•§¶ª®Ê±¸µç¹Q¾òÂÈÇÍÌýÑU×ÏÜgâèÞí±ó•ùsÿ_; Ý‘/"®'-C2S70<Ü@OEŒI€MBQ­TàW¿ZS]›_Œa/c}dref`fUfòe9e)dÆb a_©\üY WÇS?PvLgH D›?à:ø5Ú0›+2&¨ K|¤ ÀÛý÷÷òGìŠæÝàOÛÛÕ‘ÐgËsƪÁ½¿¸œ´Æ°%­Ø©Æ¦ ¤™¡yŸ¬-œ ›6š¿™š™Ì™Yš6›pœøÕŸ¢„¤R§jªÊ­r±Yµ…¹æ½…ÂVÇUÌ„ÑÖÖOÜãá•çUí-óùðþѶ ‹W¬!2'Ž,Ñ1Ú6Å;n@íD)I*MéPeT•W‚Z]i_ca cadbe f_fXfÿeNeEdêb8a5_â\?ZPWT•PÐLÉH…D@Q;l6S1,°&+!‹Î) Kdþ€ø£òÏìçaáÎÛZÖÑàËãÆÂ½!¹ú´±u­#ª §J¤Í¡ªŸÎQœ›G𯙙™Ä™Jš›QœÏ¨ŸÐ¡G¤ §!ªv­±û´¹½ÂæÆÞË ÑXÖÐÛ^áçÍì¥ò}øhþF/ Ò‰,!°&,U1j6R;@…DÊHÎL—PTQW>Zâ\5_:açbGdMeþe[f[ff]eed ceai_]ƒZ”WfTèP+M)IëDq@Á;ß6Ì1“,.'®!U± Õìþ ù*óXí‘çåáMÜÚÖ€ÑYÌSÇ…Â轃¹[µq±Ë­hªU§¤¢×Ÿöpœ7›VšÑ™—™¿™7š ›0œªyŸ›¡¤Í¦Ò©*­À°¢´º¸½§ÁrÆjËŽÐÝÕNÛÝàŠæHìò÷÷Úýß ‚G§ 2&š+Ü0÷5à:œ?DhHvL>PÉSWýY©\_aÅb)d:eñeVf_ffse|d0cŒa›_S]¾ZàW°T>Q„M‰IPEÜ@0RC¤G¾K”O(SvVxY4\—^¹`wbñceÖeJfef(fše®drcàaù_Å]=[iXJUäQ6NHJF¯A=7853.­(0#™è!O m‰¥úÂôîî"épãÏÝUØðҾͫÈÓà ¿µºs¶~²Â®N«"¨C¥ª¢h ržÐœ†›Œšè™¤™¥™šÂšÛ›7öžû Z£¦ý¨3¬Å¯‡³›·à»eÀÅ Ê#ÏhÔÌÙYßùä·ê‚ð^ö>ü'æ ¸u%°$%*q/”4’9T>êBDG]KBOÔR.V6Yô[h^…`WbÏcùdÆeFfbf7f¤eÌdcb+`ø]~[¬X˜U4RN¤JFB}=«8¨3.()²#m¨Ø õ.ûJõvï¨éóãRÞÒØlÓ5Î!É?Ä¿»×¶Õ²¯œ«j¨€¥æ¢•  žòœŸ›¡šò™¥™¦™š³š»›ɞʠ£Á¥²¨ç«o¯-³9·z»ú¿¯Ä•ɬÎêÓNÙØÞsä2êùïÖõµûŸ{b -õ4$¥)ø.49é=BáFKèN‡RàUõX¶[3^V`2b®cäd¶eÄ!É4ÎnÓÑØQÞöã¤é{ïEõ1ûõØ ¨m²#()~.ª3ª8|=B~F¤JN5R•U°Xz[ú],`b–cÅd«e0fhfBfÉe÷dÏcXb…`g^ö[4Y.V×R=OaKCGéBV>9“4u/ *¶$y¶æ '=ü^ö„ð³êýäVßÎÙgÔ#Ï ÊÅgÀß»š·Š³À¯9¬ø¨¦X£þ òž;כƚš©™ ™ì™‰š‰›Ìœvže ¬¢C¥ ¨P«Â®{²y¶®º&¿ÎïȻÍóÒRØÑÝoã#éíîÂô¦ú‡pL #ç™1#ª(.23:8 =³AFMJ1NèQGUkX>[Á]þ_Üatc®d˜e*fefIf×eeîc}b²`^1\yYvV(S”O½K§GNCÆ>ý95é/¡*2%¦ú@k“®Éüåö ñ9ë‚åØßNÚãÔ›ÏÊŽÅÑÀH¼ù·ç³°‡¬B©D¦’£3¡Ÿ`ó›Ûšš°™ž™Þ™|šg›³œFž9 q¢¥Ü§«q®!²¶Kºº¾aÃ<ÈAÍ|ÒÎ×UÝèâžèfî:ôúÿÿæà ž_®"-(‰-»2Æ7Ÿ¢ !žœN›kšÓ™ž™´™-šîšœƒLŸf¡Í£ˆ¦‰©Ù¬k°D´Z¸¯¼=ÁÆóÊÐ^ÕÏÚ[àæÄëñr÷Ný; öÄ€( ³%+f05r:/?·CHLêOyS¾V¼Ym\Ï^á`¡b d%eãeQfbf!f…e—dPc·aË_Š]["XÿTQßMæI¸EBA¢<Ä7½2‡-.(­"`›Ç áú=ôeîèíâNÝÓ×zÒBÍ<È`û¾Iº¶²r®«Ü§¥q¢8 Gž±œj›zšß™™±™šÝšó›^!Ÿ/¡”£E¦?©‹¬°è³ø·I¼ÐÀ‘Å}ÊÏãÔMÚÚßå;ë ñäöÊü®p;þ¤2%¡*ë/ 5:Ä>OC§G¼K”O*SsV{Y1\›^´`|bîce×eHfff)f˜e¯dscÞaû_Ã]=[jXKUâQ8NEJF¬A=5863.«(1#šæ$K pˆ¦úÂôìî%émãÒÝRØóһͮÈÐÃ#¿²ºu¶}²Á®Q« ¨B¥­¢d vžÎœ…›Žšè™¢™©™šÆšÙ›8õžü Y£¦ø¨8¬Á¯Š³š·ß»gÀÅ Ê!ÏiÔÌÙXßûä´ê…ð[ö@ü&ç ¶x!³$#*r/–4Ž9V>éBDG`K=OÙR*V8Yô[g^‡`TbÓcõdÊeBfef5f¦eËdc b(`ü]z[¯X–U4R‘N£JFB|=«8©3~.()²#j­Ò ú/ûJõuïªéðãVÞÍØqÓ3Î!É>Ä¿»Ù¶Ô²¯œ«i¨¥ä¢š šž÷œ››£šò™¥™¥™š±š¼›ɞʠ£Ã¥®¨í«i¯1³7·y»ý¿¬Ä—É«ÎéÓQÙÓÞxä.êüïÔõ·û›€^ /ôž2$¨)õ.!49è=BáFKéN†RáUóX·[3^W`0b±cßd»e9fhf:f¸eád±c0bX`0^º[ðXåUƒRêNKáF€Bê=9 4÷.¦)3$Ÿò0] ‚™¹ûÓõúï2êtäÖÞPÙèӭΔɰÄù¿|»6·0³k¯ë«¯¨Ã¥£Ë Çž¹›µšÿ™©™ ™ø™œš¢›ñœŸž— ä¢ƒ¥f¨Ÿ«¯Ö²×¶»¿?Ä"É1ÎrÓÌØXÞïã«érïMõ,û÷Õ ©l°#+){.«3ª8|=B{F¨JŒN7R–U®X|[ù]+`b’cÉd¨e2fgfBfÈeùdÎcWb‡`e^÷[5Y,VØR>O_KEGçBY>‹9š4m/(*®$&t¹ä %?ü\ö…ð³êþäTßÐÙeÔ%Ï ÊÅfÀß»š·Š³Á¯7¬ú¨¦Z£ü ôž:כǚš«™ ™é™š›Ôœožj ª¢B¥"¨N«Ã®|²w¶¯º&¿ÍðȻÍòÒSØÐÝpã"éíîÄô£úŠnL $ç˜2#ª(.2388=¯AFJJ2NçQIUjX=[Ã]û_àaqc°d–e,fcfLfÓeeíc|bµ`š^2\yYuV)S”O½K¦GOCÄ>: 5î/*5%¤û?l“®Éüåö ñ=ë~åÚßNÚâÔœÏÊŒÅÕÀD¼ü·å³°ˆ¬?©H¦£5¡Ÿaò›Ýšš°™ž™ß™zšj›¯œIž6 t¢¥Û§«o®"²¶Kº»¾`Ã<ÈAÍ|ÒÐ×RÝêâègî:ôúáÈ šb¯"-(ˆ-½2Ä7 QC¤GÀK‘O*SuVyY2\›^³`}bîceÖeJfdf+f—e°dqcßaü_Â]?[hXJUåQ4NKJF³A =;823.©(3#–ë N n‰¤úÄôëî%énãÑÝRØóҼͭÈÐÃ$¿±ºu¶~²À®R«¨C¥ª¢h sžÐœ…›‹šë™Ÿ™¬™ šÇšØ›8öžû Y£¦ö¨;¬¾¯Œ³™·à»eÀÅ Ê$ÏfÔÏÙUßþä²ê†ðZöCü! á »u#²$#*r/–49U>êBCG_KAOÓR0V4Yõ[h^…`WbÐc÷dÉeBfff3f§eÊd‘cb)`ü]x[³X‘U:RŒN§J|FB}=©8¬3{.+)¯#j¬Ô ÷-ûKõuï¨éôãRÞÑØmÓ4Î"É?ÄŽ¿»Ö¶Ö²¯›«j¨€¥æ¢— žžòœ ›Ÿšõ™¤™¥™š³š¹›ƞʠ £¿¥³¨è«k¯2³5·|»ú¿­Ä˜É¨ÎîÓLÙØÞsä2êùï×õ´ûž}` .õ3$¦)÷."49í=|BåFKèN‡RàUôX·[3^V`2b®cãd·e=fdf=f·eád²c.bZ`/^º[ñXäU„RèNKáF‚Bç=94ù.¦)1$¢ï3\ €µûÕõüï-êzäÑÞSÙçÓ®Î“É±Äø¿|»6·2³i¯ë«±¨¿¥"£Ç Êž»›³š𧙢™ö™ šœ›÷œšž› â¢ƒ¥g¨ž«¯Õ²×¶»¿AÄ!É1ÎrÓÍØUÞòã¨évïJõ.û÷× §o¶#%)€.¨3«8}=BF¥JŽN6R•U°Xz[û])`b’cÈd¨e3fffCfÇeødÐcWb…`h^ó[8Y+VØR>O`KCGéBV>9“4u/*¸$|³é %@ü\ö…ð³êþäSßÒÙcÔ&Ï ÊÅgÀß»š·Š³À¯9¬ø¨¦Y£û õž:֛Ț𩙣™ç™š‚›Òœržh «¢B¥!¨O«Ä®z²y¶­º'¿ÎïȺÍôÒQØÒÝnã$éìîÃô¦ú†rI &åš1#©(.13;8 =±AFJJ4NæQHUjX>[Ã]û_ßaqc°d˜e)fgfFfÚe eñc{b´`œ^/\}YqV-SOÁK¢GSCÁ>: 5ë/Ÿ*4%¤ü?k”¬Êüåö ñ:ëå×ßPÚâԜπʎÅÑÀJ¼õ·ì³°¬>©E¦“£2¡Ÿbñ›Üš𫙢™Ý™zšl›¬œLž4 u¢¥Ú§«n®#²¶Lº¹¾cÃ8ÈFÍwÒÒ×SÝèâ èdî;ôúãÇ šb¯".(†-¾2Ä7¡Zä\2_;aèbFdNeþeYf^f f_ecd ccah_]~Z˜WbTëP*M*IëDn@Æ;Ù6Ò1,/'°! YŒ³ Ôíþù.óRí˜çßáRÜÖÖƒÑWÌTÇ…Â轂¹\µq±Ê­kªP§…¤¢ÕŸùmœ9›WšÎ™™™¾™8š ›/œ«xŸœ¡¤Ì¦Ó©(­Ã°Ÿ´¾¸½ªÁrÆhË’ÐÙÕPÛÝà‰æIìòõ÷Ýý¿¥ |J¨ 4&˜+Ü0ø5Þ: ?DnHoLEPÄS WýY§\_ aÇb&d=eîeXf`ffvezd0caš_S]ÀZÝW²T©‹¬°ç³ù·H¼ÐÀ‘Å~ÊœÏãÔNÚØßå:ë ñãöËü¬“m=þ£3% *ê/5þ9Ä>OC§G¼K–O&SxVvY5\™^µ`{bðc eØeGfhf'f›e«dvcÛaÿ_Á]=[kXGUèQ3NIJF¯A=7843.«(2#˜ç$K p‰£úÅôêî&émãÑÝSØòҼͮÈÎÃ&¿¯ºx¶{²Ã®N«#¨A¥«¢h qžÒœ…›‰šî™™¬™šÅšØ›:óžþ X£¦÷¨;¬½¯³”·å»bÀ Å Ê!ÏjÔËÙYßùä¸ê€ð`ö<ü)ê ²|µ$$*o/˜4Ž9U>ìB@GcK;OÛR(V;Yð[k^ƒ`WbÒcôdËeBfdf6f¥eÊd“cb-`ø]}[­X—U5RN¤J~FB}=«8§3.&)³#lªÖ ö,ûNõqï­éîãWÞÍØqÓ1Î#É>Ä¿»Ø¶Ô²¯›«j¨€¥æ¢– Ÿžñœ¢›œšø™¡™§™š±š½›ʞȠ £Á¥°¨ë«i¯3³4·~»÷¿±Ä“É­ÎéÓPÙÖÞtä1êúïÖõµû~_ /ô4$¥)ø. 49é=BáFKçN‡RàUõX¶[2^Y`,b¶cÜd»e;fdf>f·eßdµc+b\`/^¸[ôXàU‡RèNKâFBê=9!4ö.§)2$Ÿó0] ›¶ûÕõûï/êxäÒÞRÙèӭΔɰÄù¿{»7·1³i¯í«®¨Â¥£Ê Æž·›´š𣙦™ô™Ÿš ›òœžž˜ ä¢‚¥h¨œ«¯Ó²Ú¶»“¿;Ä%É0ÎqÓÏØSÞóã¨évïJõ.ûøÔ «j°#*)|.ª3«8{=B{F§JN7R–U­X}[ù]*` bŽcÌd¥e5fefCfÈe÷dÑcTb‰`c^ù[4Y,VÙR;OdK@GëBV>Ž9—4q/#*³$"w·æ '<üaö~ðºêùäVßÏÙfÔ$Ï ÊÅdÀâ»—·³¾¯:¬÷¨¦X£ý óž:؛ƚšª™¡™è™š›Ôœqžh «¢@¥%¨K«Æ®z²v¶²º#¿ÏðȹÍõÒPØÒÝoã#éíîÃô£ú‹lO !é—2#«(.5368=­AFGJ8NâQKUhX>[Å]ø_âaoc²d–e*fffGfÚe eñczbµ`œ^/\|YsV*S•OºK©GMCÇ>ý9 5ê/¡*2%¥ü=o±Æüèö ñ=ë~åÚßMÚäÔœÏ~Ê‘ÅÎÀK¼÷·è³°ˆ¬A©E¦’£1¡ Ÿ^õ›Ûšš±™™à™zši›±œGž8 r¢¥Þ§þªs® ²¶Lº¹¾bÃ:ÈEÍvÒÖ×MÝîâ›èhî7ô úûÿé a°"+(‹-¸2Ê7›ZQWT˜PÌLÍH€D @N;n6R1,²&*!‹Ð, Kbþƒø òÐìç]áÒÛVÖ ÑÝËåÆÂ½ ¹ü´±x­ ª §I¤Ð¡¥ŸÕIœ%›CšÉ™—™Æ™Hš›PœÑ¦ŸÒ¡E¤§ªy­±ú´#¹}½ÂäÆßË ÑZÖÍÛaáçÎì¤òøeþI, Њ+!°&,R1m6O;@„DÊHÏL–PTPW>Zã\4_;aæbHdMeýe\f[f f`ead cdaf_]zZœWaTëP*M)IêDr@Á;Þ6Î1,1'¬!W‹· Ïñþù,óWí’çåáMÜØÖƒÑVÌUÇ…Âæ½…¹Zµq±Ì­gªT§„¤¢ÖŸùlœ;›TšÐ™™™½™9š›0œ¬vŸž¡¤Ì¦Ô©'­Ä°ž´¾¸½ªÁpÆkËŽÐÞÕLÛßà‡æKìòö÷Ýý¾¦ {Lª 1&›+Û0÷5á:›?DgHwL>PÈS WúY¬\þ^aÃb+d8eòeUfaffvezd1c‹a›_S]¿ZàW­TBQM‹IPEÙ@4RC£G¿K“O(SxVvY4\™^¶`zbðceÖeJfdf+f—e°dpcâaø_Æ];[jXKUãQ7NFJF®A=6843.©(5#”ìO nˆ¦úÂôíî#épãÎÝWØíÒÁÍ©ÈÓÃ#¿±ºu¶²¾®T«¨C¥¬¢e užÐœƒ›šç™¢™ª™šÇš×›;òžþ X£¦ü¨6¬Á¯Œ³•·å»bÀ!ÅÊ%ÏeÔÐÙVßûäµêƒð\öBü" ä ·yµ$"*r/–4Ž9W>éBBGbKfdf9—4o/&*¯$&t¹ä $@ü]ö‚ð¸êøäXßÏÙdÔ'ÏÊ!ÅcÀä»”·Ž³¾¯;¬ö¨¦T£¡ñž;כǚšª™¢™ç™š›Óœrže ¯¢?¥$¨L«Ä®{²y¶®º%¿ÏîȼÍóÒPØÕÝjã(éèîÆô£úŠnL #è—3#©(.2388=¯AFFJ7NãQKUjX;[Æ]÷_äamcµd’e-fdfHfÚe eñcyb¶`›^1\zYtV*S”O½K¥GPCÅ>þ9 5é/£*0%¦û>o¯Èüæö ñ=ëåØßOÚáÔžÏÊŽÅÒÀG¼ú·æ³°ˆ¬A©E¦’£2¡Ÿbñ›Þšš±™™à™zši›°œIž6 t¢¥Û§«n®$²¶Kº»¾_Ã=ÈBÍyÒÒ×RÝèâ¢è`î?ôúåÅ šd°".(†-½2Æ7Ÿ©‹¬°é³÷·J¼ÏÀ‘Å~ÊœÏäÔLÚÛß~å<ë ñãöËü®q;ý¦/%¤*é/ 5:Á>RC¦G¼K•O)SsV}Y.\^´`zbòc eÛeEfif&f›e­drcáaù_Ä]>[gXMUâQ7NHJF°A =9823.ª(2#˜ç#M n‰¤úÄôìî#éoãÑÝSØñҾͫÈÑÃ%¿¯ºx¶z²Ä®N«#¨@¥­¢f sžÑœƒ›Žšê™ž™­™ šÉšÕ›<ñž¡V£¦ú¨6¬Ã¯‰³™·á»eÀÅ Ê%ÏfÔÍÙYßøä¸êð^ö?ü% ä ºt%±$#*s/“4“9R>íB@GbK>OÕR0V3Y÷[g^„`XbÏcødÈeDfcf5f¨eÇd”cb*`ü]y[°X•U6RN¥J}FBz=¬8ª3|.*)±#n§Ù ó*ûNõsïªéñãUÞÍØrÓ1Î"É@ÄŽ¿»Ù¶Ó²¯š«k¨¥ç¢• ŸžóœŸ›Ÿšö™¡™¨™š³šº›ƞ͠£Ä¥­¨í«i¯1³7·{»ú¿­Ä—É«ÎêÓPÙÔÞvä1êùï×õ´ûž}a -õ4$¥)ø. 49é=BßFKäNˆRáUòX¹[2^V`2b¯cádºe8fkf6f¼eßd±c1bW`0^»[ðXãU†RçNKáF~Bì=9"4ö.§)0$¢ð1_ }ž¶ûÓõýï.êxäÔÞOÙêӬΔɱÄ÷¿}»6·/³m¯è«³¨¾¥!£É Èžº›³šš¨™ ™ù™œš¡›óœœžš ã¢ƒ¥f¨ «¯Û²Ñ¶»Œ¿@Ä"É1ÎqÓÎØVÞïã¬ésïKõ.ûôÛ £sµ#')}.¬3¨8~=B|F¨JŒN8R”U°Xz[û]*`b“cÇd©e3fefDfÇe÷dÒcTb‰`d^÷[4Y/VÕRAO]KFGæBY>9—4q/#*³$!yµè (=ü_öð·êúäXßÍÙfÔ$Ï ÊÅgÀÞ»œ·‡³Ä¯5¬û¨¦Z£ü ôž9؛ǚš«™Ÿ™ì™Šš‡›Îœužf «¢C¥ ¨P«Ã®z²y¶®º&¿ÏíȽÍñÒTØÏÝqã!éïîÁô¥ú‰nN "ç™1#«(.3388=°AFHJ6NãQKUjX<[Ä]û_Þasc®d™e)fffHf×eeïc|b´`›^0\|YrV-SOÂK¢GRCÃ>ÿ9 5ê/ *3%¥û>n‘¯Èüåö ñ;ëåÚßMÚãÔœÏÊÅÐÀH¼ú·æ³°‡¬B©E¦’£1¡ Ÿ]÷›Ùšš®™ ™Ü™~šh›¯œJž5 u¢¥Ü§«o®#²¶Kº½¾\Ã@È>Í~ÒÎ×UÝçâŸèfî8ôúýÿæÆ ˜f²",(‡-¾2Ä7 Zã\3_;aébEdNeþeZf^f f`ebd cbai_]‚Z•WeTèP,M)IëDp@Ã;Ü6Ñ1,3'«!V³ Óîþ ù*óXí‘çåáOÜÕÖ†ÑSÌWǃÂê½€¹]µo±Í­hªS§ƒ¤¢ÖŸøoœ7›WšÏ™—™Á™5š ›.œ«xŸœ¡¤Í¦Ñ©+­À°¡´¼¸½©ÁrÆiËÐÜÕNÛÝà‰æKìòû÷×ýÅŸ €I¬ -&Ÿ+×0ü5Û:¡?DmHrLAPÈSWÿY§\_ aÇb(d:eñeVf_ffse|d/cŽa˜_U]¿ZÞW±T=Q„MŠIPEÜ@0ÁþÅöÊÐ`ÕÌÚ]àæÃë’ño÷Qý8 õÅ€' ³%+d0‚5o:1?·CHLéOyS¿V»Yn\Î^â`ŸbdeëeIfgff…e˜dPc¶aÌ_Š]ÿZ%XþTQàMæI·EDAŸ<Ç7»2ˆ--(¯"c™Ç ãú;ôdî èèâSÝÑ×yÒDÍ:Èbú¾Kº¶!²q®«Û§¥t¢6 Iž°œh›}šÝ™ ™­™šÚšö›] Ÿ1¡’£G¦>©Š¬°æ³û·F¼ÑÀ‘Å|ÊŸÏâÔLÚÛßå;ë ñâöÌü¬“m=ý¤3% *ë/ 5:Â>QC¥G¼K–O'SxVuY6\—^¸`ybðc eØeIfdf+f–e±dqcàaù_Å]<[kXIUäQ6NHJF±A =;813.«(0#šæ%J q‡¥úÄôìî"éqãÎÝUØñҽͬÈÑÃ#¿±ºw¶{²Ã®O«!¨C¥ª¢g tžÏœ†›Œšè™¤™¥™šÀšÜ›8óžþ X£¦ù¨9¬¾¯Ž³–·â»dÀ!ÅÊ&ÏeÔÏÙWßúä¶êƒð]ö?ü&ê ³z ´$"*s/”4‘9T>ìB@GbK>OÖR.V5Yõ[h^„`XbÐcödÊeBfef5f¦eÉd”cb-`ø]}[®X•U7RN§J|FB{=¬8¨3.()²#m¨Ø ô*ûNõrï«éñãTÞÐØoÓ3Î ÉAÄŒ¿»Ô¶×²¯ž«g¨ƒ¥ä¢— Ÿžñœ¡›Ÿšô™¤™¦™š´š¸›ĞΠ£Ã¥±¨é«l¯0³5·»ö¿²Ä“ɬÎëÓNÙÖÞvä/êüïÓõ¸ûš‚[ 2ñ 2$¦)÷.!49é=ƒBÝFKåN†RäUðXº[0^X`0b±càdºe9fhf9f»eßd²c/bX`2^·[ôXàUˆRæNKâF}Bî=9$4õ.§)3$žó/_ ´û×õùï2êtäÖÞNÙìӪΗɭÄú¿|»5·2³j¯ë«¯¨Ã¥£Í Æžº›³š𦙣™ô™¡šž›óœžž– è¢~¥k¨›«¯Ö²Ö¶»¿@Ä!É3ÎpÓÎØTÞòãªésïMõ+û÷Õ ©nµ#%)€.¨3¬8{=B{F¨JN5R™U«X~[ø],`b–cÄd¬e1fffCfÇeùdÏcWb…`h^ó[9Y)VÛR;ObKAGìBT>‘9“4s/#*³$"w¶ç %AüZö‡ð±êÿäSßÑÙeÔ$Ï ÊÅfÀâ»–·³¿¯8¬û¨¦Y£ÿ ðž>ӛɚš«™Ÿ™ë™‹š…›Òœpži ª¢C¥!¨P«À®~²v¶°º&¿ÍðȺÍõÒOØÔÝmã$éíîÁô§ú‡oN ë•4#¨(.3368=ªAFEJ7NäQJUiX>[Â]ü_ßaqc±d–e*fgfFfÛe eôcwb¸`˜^3\yYvV'S–O¼K¦GQCÂ>: 5ë/ *4%¢9q®Ëüãö ñ<ë~åÛßKÚåÔ›ÏÊÅÒÀF¼û·ç³°‹¬<©J¦Ž£5¡Ÿ`ó›Üšš°™™à™zši›±œGž7 u¢ÿ¤à§ýªs® ²¶Jºº¾aÃ;ÈCÍzÒÐ×SÝéâžèfî:ôúÿÿåÅ ›c²"*(‰-½2Ã7£OC¦G¾K’O+SsV{Y1\›^³`~bìce×eHfef+f•e³dncâaú_Ã]>[hXKUåQ4NJJF²A =:833.­(.#›ç"O k¡úÅôìî#éoãÑÝRØóһͯÈÍÃ(¿¬º{¶x²Æ®K«&¨=¥°¢d sžÒœƒ›šë™™®™ šÈš×›9õžü Y£¦ø¨9¬Â¯ˆ³š·à»dÀ"ÅÊ(ÏbÔÒÙTßýä´ê„ð\öAü# ã ¹v#³$"*r/•49U>ëB@GdK:OÚR,V4Yù[c^ˆ`VbÐc÷dÊe?fjf0f©eÉd‘cb+`ø]~[¬X˜U4RN¥J|FBy=®8¨3}.*)°#m¨Ø õ-ûKõvï§éôãQÞÒØnÓ3Î"É>Ä¿»Ø¶Õ²¯«g¨ƒ¥ä¢˜ žžòœŸ› šô™¤™¦™š²šº›Ȟʠ£À¥²¨è«n¯-³:·x»ý¿¬Ä—ɪÎìÓMÙØÞrä3êúïÔõ·ûš‚] /ô3$¨)ô.$49ì=€BàFKåNˆRáUóX¸[1^Y`-b´cßd¹e;fgf9f¼eÝd´c-bZ`0^¹[óXàUˆRæNKáFBç=!94þ.¡)6$œõ-` œ·ûÓõüï/êxäÒÞRÙçӯΓɰÄù¿{»7·1³j¯ë«°¨Á¥£Ê Çž¸›³š𦙤™ô™ŸšŸ›ôœœž™ ã¢ƒ¥h¨œ«¯Ö²Ö¶»¿>Ä"É3ÎoÓÑØQÞôã¨éuïKõ-û÷Õ ªk±#))~.¨3¬8{=B{F¨J‹N8R•U¯X{[ú]*`b“cÈd¨e2fhf@fÌeôdÒcUb‡`f^ö[5Y.VÕR@O_KCGêBV>Ž9˜4n/&*±$#w¶ç '>ü]öƒð¶êúäXßÌÙjÔ Ï ÊÅdÀå»”·³Á¯5¬ý¨þ¥\£û õž9֛ʚ š°™›™ì™š‚›Ôœožk §¢F¥¨Q«Â®|²v¶²º"¿ÒëȾÍðÒVØÍÝrã!éîîÂô¥ú‰nN !é—2#«(.5358=ªAFCJ:NáQLUgX@[Á]ý_Ýasc¯d˜e*fdfJf×e eñcyb¶`š^1\{YtV)S”O½K¦GOCÅ>þ95é/¡*1%§ú?l“­Ëüãö ñ;ëå×ßPÚáÔÏ€ÊÅÓÀF¼ú·ç³°‡¬A©E¦’£3¡Ÿ_ö›Ùšš­™Ÿ™ß™zšl›¬œLž4 u¢¥Ý§«q®!²¶Jº»¾aÃ9ÈGÍtÒÖ×OÝëâŸècî=ôúæà a±",(ˆ-½2Å7žPvLhHDœ?à:ø5Ú0+-&® N{¤ ÀÛýù÷òNì„æâàKÛÝÕÐjËrƨÁ½¼¸ ´Ä°%­×©È¦ ¤›¡xŸ«/œ ›8š½™›™Ì™Xš8›nœùÖŸ¢ˆ¤M§pªÅ­u±Yµƒ¹é½ƒÂVÇṼÑÖÖPÜãá“çXí(ó ùíþÒ¶ ‹Vª!2'‘,Ì1à6À;q@ìD(I,MèPdT˜W}Z]e_ea cadae f[f]fûeQeBdëb9a4_ã\>ZPWT”PÑLÈH†D@Q;k6T1,±&,!ˆÒ, Jcþ‚ø¡òÑì ç`áÐÛXÖ ÑàËâÆÂ~½¹þ´±{­ª §J¤Ì¡¬ŸÌRœ›HšÆ™˜™Å™Iš›PœÏ©ŸÏ¡G¤§ª{­±ý´¹€½ÂæÆÞË ÑZÖÍÛaáçÐì¢òøbþL* Òˆ-!®&,R1n6N; @‚DÍHÍL–PTQWÁÿÅõÊÐ^ÕÏÚZàæÂë’ñn÷Tý5 ôÅ€) ¯%!+_0‡5k:4?´C HLèO{S»VÀYi\Ò^à`Ÿbd!eåeRf_f$f„e–dRcµaÌ_‹]þZ&XûT”QÛMêI´EFAŸ<Å7½2ˆ-,(°"bœÅ äú<ôdîŸèëâNÝÖ×uÒGÍ9Èaû¾Iº¶ ²r®«Ý§¥v¢4 Jž°œi›zšá™›™³™šàšð›bŸ2¡“£D¦A©ˆ¬°å³ù·I¼ÏÀ’Å|ÊžÏãÔLÚÛß}å>ë ñçöÈü®’m=þ£3%¡*é/ 5:Ã>OC§G¼K•O*SrV}Y-\Ÿ^²`}bïc eÙeGfhf&f›e­dscàaù_Ä]=[jXJUäQ6NFJF¬A=5863.­(0#™è"L p‡§úÁôíî%ékãÖÝMØ÷ҹͯÈÏÃ$¿±ºw¶z²Æ®J«&¨@¥«¢h ržÐœ‡›ˆšï™›™¯™ šÉšÕ›=ðž¡U£¦ø¨9¬À¯Œ³–·ã»dÀÅ Ê#ÏhÔÌÙYßúäµê„ð\ö?ü'æ ¸v"³$#*r/•49U>êBBGbK;OÛR*V6Yø[a^Œ`RbÓcödÉeAfhf1fªeÆd”cb+`ú]{[¯X”U9R‹N¨J|FB|=¬8§3€.')³#n©Õ ø.ûMõqï­éîãXÞÌØrÓ/Î&É<Ä¿»Ö¶×²¯›«k¨¥æ¢˜ œžöœœ›¡šô™¤™¦™š±š¼›Ȟʠ£Â¥°¨ê«l¯.³:·x»ü¿®Ä•ɬÎêÓOÙÕÞwä/êûïÕõµû€\ 2ñ 2$¦)÷.!49é=BßFKæN…RæUìX¿[,^[`.b³cÝd½e7fjf8fºeád¯c3bT`5^µ[õXàU‡RçNKâFBë=9"4ö.¨)0$¡ñ0` |ŸµûÔõüï/êwäÔÞPÙéӬΗɬÄü¿z»6·3³h¯í«®¨Ã¥£Ë Éž¾›®š𣙦™ó™ šŸ›óœžž– ç¢¥k¨š«¯Ó²Ù¶»¿?Ä"É2ÎpÓÎØUÞñãªésïMõ,ûõ× ©m²#().¨3«8}=B€F£JN4R˜U¬X~[ù])` b‘cÈdªe0fif@fÊeödÑcWb„`i^ó[9Y)VÚRŒ9™4n/&*±$#w¶ç '=ü_ö‚ð¶êûäUßÑÙeÔ$Ï ÊÅiÀÞ»š·‰³Â¯7¬û¨¦Z£ü ôž:כǚš«™ ™ê™Œš„›Ñœsžg «¢B¥"¨M«Å®z²x¶°º#¿ÑîȹÍöÒOØÔÝmã$éëîÅô£úŠnL #è™0#«(.23;8 =¯AFFJ7NäQJUiX>[Â]ü_Þatc¬d›e(fffIfÖeeïc{bµ`™^4\xYuV*S’O¿K¤GQCÃ>: 5î/*6%£û@j–«Ëüäö ñ=ëåÙßOÚàÔŸÏ}Ê‘ÅÏÀJ¼ö·ë³°Œ¬>©F¦’£2¡Ÿ_ô›Ûšš­™ ™Ý™|šj›­œMž2 w¢ÿ¤Þ§«p®"²¶Jº½¾^Ã=ÈCÍwÒÕ×OÝëâŸècî=ôúåÄ `°",(Š-¹2É7œLýr÷’ñÀëæYàÏÚ_ÕÐóÊÆ:Á²¼Z¸C´l°Ö¬©„¦Ò£a¡PŸ€œïš+š·™™™Ù™fšQ›œ ž <¢Ä¤”§¸ª®È±¼µä¹R¾òÂÈÇÌÌÿÑT×ÎÜiâèÝíµóŽùzÿZ> Û“-"¯'-B2U7.<Ý@PEˆI…M=Q±TßW½ZV]˜_a-c}dsef`fTfóe8e*dÆb a_¤\ZWÈS@PuLhHDš?ã:ô5ß0—+4&§ H~¤ ¾ßýó÷òFì‹æÜàOÛÝÕŽÐjËqƪÁ½¾¸ž´Ä°'­Õ©É¦ ¤š¡zŸ¨4œ›=š¹™ž™Ê™Zš7›lœýП ¢¤T§iªÊ­r±Zµƒ¹è½„ÂVÇUÌ„ÑÕÖQÜâá•çUí+ó ùîþÓ³ W ®!.'“,Ì1ß6Á;r@éD,I'MíPaT™W~Z]f_da cadcef_fYfþeOeDdêb8a6_â\>ZQWT˜PÎLÊH„D@Q;l6S1,±&+!‹Î' O`þ‚ø£òÍìç_áÏÛXÖ ÑßËäÆÂ}½#¹ù´±v­!ª §G¤Ð¡¦ŸÓLœ#›E𯙙™Æ™Eš#›LœÒ§ŸÏ¡I¤ §"ªv­±ý´¹€½ÂäÆßË ÑZÖÌÛcá çÐì£ò~øgþG. Ћ*!±&,S1l6P;@ƒDËHÎL—PTQW>Zâ\5_:açbIdIefUfbffee^dcaai_]Z˜WaTíP(M+IêDp@Ã;Ý6Ï1,2'«!VŒµ Òîþ ù*óWí”çâáPÜÖÖ„ÑUÌVǃÂ齃¹[µp±Ì­hªS§…¤¢×Ÿømœ9›WšÍ™œ™º™<š›3œ©yŸ›¡ ¤Ê¦Ö©&­Ã° ´¼¸½¨ÁrÆiË‘ÐÚÕOÛÝà‰æJìòõ÷Þý¾¥ |K« 0&š+Þ0ó5å:—?"DfHvL@PÇSWýY§\_aÄb+d7eóeUf`ffte|d.cŽa™_T]¿ZÞW±T>QƒMŠIOEÝ@/¢ "žŒœS›fšÚ™—™º™'šòšœƒLŸe¡Ï£†¦‹©×¬l°C´Z¸±¼;ÁÆðÊÐ_ÕÎÚ[àæÂë“ñn÷Rý7 õÅ( ³%+e05s:.?¹CHLéOzS½V¼Yn\Í^ä`bd eçeOfbf"f„e˜dOc¸aÉ_]ýZ%XýT“QÛMêI³EGAŸ<Æ7º2‹-*(²"b›Ç âú=ôeîœèîâLÝ××vÒDÍ;È`ü¾Iº¶ ²q®«Ü§¥q¢: Džµœe›~šÝ™Ÿ™¯™šÜšô›_Ÿ0¡•£C¦A©Š¬°ê³ø·G¼ÒÀÅ}Ê ÏàÔNÚÚß~å=ë ñäöÊü®‘n>û¦2%Ÿ*í/ 5:Á>QC¥G½K•O(SuVzY1\›^´`|bïce×eHfff)f˜e±dncäaö_Æ]=[iXKUãQ6NHJF®A=6853.¬(0#šç"N mФúÃôíî"éqãÎÝVØïҾͬÈÑÃ#¿±ºw¶z²Å®L«%¨?¥­¢e užÏœ†›Ššì™ž™­™ šÉšÔ›=ñžÿ X£¦û¨6¬Â¯Š³™·à»fÀÅ Ê%ÏdÔÐÙVßûä¶ê‚ð]öAü# ã ¹w!´$"*q/˜4Œ9Y>çBCGaK>O×R-V5Yö[f^†`WbÏcúdÅeEfef2f©eÉdc b)`ù]}[­X—U5RN¥J~FB{=«8ª3}.))²#o¦Ø ö.ûJõuï¨éôãSÞÏØpÓ1Î#É@Ä‹¿»Ó¶×²¯›«j¨¥ä¢˜ žžóœž›¡šó™¤™§™šµš¸›ƞ͠£Å¥®¨ë«k¯0³6·~»ö¿±Ä•É«ÎêÓPÙÔÞvä2ê÷ïÙõ²ûŸ~_ /óž4$¥)ø.49ç=‚BáFKëN‚RæUïXº[1^W`1b±cßd»e9fff>f´eåd®c2bV`2^¸[òXäU„RéNKáF€Bë=9"4õ.¨)1$ ñ2\ ‚™¹ûÒõþï-êxäÔÞOÙëӫΕɯÄú¿z»8·0³j¯ì«®¨Ä¥£Ì Çž¼›°š𥙣™ö™žš ›òœžž˜ å¢¥h¨«¯Ö²×¶»¿>Ä"É3ÎoÓÐØSÞòãªésïMõ,ûøÓ ¬l²#)){.®3¦8€=BF¤JN6R•U°Xz[ú],`b•cÅd«e1fhf@fËeõdÒcTbˆ`f^ö[5Y,VØR>O`KCGéBV>9”4s/!*¶$y¶æ %>ü_öð¸êøäYßÌÙiÔ"Ï Ê ÅcÀã»—·‹³Á¯7¬ú¨¦X£ÿ ðž=֛ƚš©™¡™ê™‹š†›Ðœržh ¬¢?¥&¨K«Ä®}²t¶´º ¿ÔêȾÍñÒSØÐÝqã!éíîÃô¤ú‹lN "ç›.#®(ÿ-8338=­AFIJ4NæQHUlX:[Ç]÷_âaqc¯d™e'fhfFfÛe eòczb´`œ^0\{YuV(S”O¾K¤GRCÁ>: 5ë/Ÿ*5%¡9p‘®Éüæö ñ>ë}åÛßMÚãÔœÏÊÅÒÀF¼ú·è³°‹¬>©G¦‘£3¡Ÿbó›Ûšš°™™à™zšj›°œHž7 s¢¥Ý§«r® ²¶Jº»¾aÃ:ÈDÍyÒÑ×SÝèâ èdî;ôúãÇ šb®"0(„-À2Â7¡¢Â¤—§µª®Ë±¸µæ¹S¾ðÂÊÇËÌþÑU×ÏÜhâèÞí´óù{ÿX> Ù–+"±' -E2R72<Ú@RE†I‡MPwLfH Dš?ã:õ5Ü0š+2&© K|¥ ¿Ûýø÷òIì‰æÞàMÛÝÕÐjËqƪÁ½¾¸ ´Á°*­Ñ©Í¦¤œ¡xŸ«/œ ›8š½™š™Î™Wš8›nœùÕŸ¢ƒ¤S§jªÉ­s±Yµ„¹è½ƒÂWÇTÌ…ÑÖÖOÜãá”çWí*ó ùëþÖ² ŽU¬!1',Í1à6¿;s@êD)I,MçPfT–WZ]g_da c`dae f]f[fýeMeGdèb:a4_â\@ZMWT’PÒLÉHƒD @O;m6R1,¯&-!‰Ð, Ifþ~ø¤òÎìç^áÑÛWÖ ÑáË߯Âx½&¹ú´±|­ª§F¤Ð¡§ŸÒMœ!›FšÇ™˜™Æ™Gš ›OœÐ¨ŸÏ¡I¤ §ªx­±ú´"¹~½ÂåÆÞË ÑYÖÍÛcá çÑì¢ò€ødþK) ΋*!²&,W1h6T;@‡DÇHÑL”PTMWBZÝ\9_8aèbHdKefXf_ffee]dcbah_]~Z˜WcTêP*M*IêDq@Á;ß6Í1‘,0'¬!T޳ Ôíþ ù+óUí–çááQÜÕÖ„ÑVÌUÇ…Â罃¹[µq±Ë­jªQ§…¤¢ÕŸûlœ8›XšÍ™š™¾™7š ›.œ¬xŸš¡ ¤Ê¦Ô©)­À°¢´»¸½¦ÁtÆhËÐÝÕLÛßàˆæJìòù÷Ùýá H§ 4&˜+Ý0ö5á:›?DgHwL>PÈSWüYª\_aÄb+d7eôeSfbffveyd2c‹a›_S]ÀZÜW´T;Q†M‰INEÞ@/ë ñäöËü¬’o<ü¦1%¢*é/ 5ÿ9Ä>PC¦G¼K–O&SxVxY1\^±`bìceØeGfhf'f™e¯dqcâaø_Å]<[jXJUåQ3NKJF±A =9823.«(1#™ç#K q†§úÂôìî$énãÒÝQØôҺͰÈÌÃ)¿«º{¶z²Â®Q«¨D¥©¢k nžÕœ›šì™™®™ šÈš×›:ôžü X£¦÷¨:¬¿¯‹³˜·â»dÀÅ Ê$ÏfÔÏÙUßüä¶ê‚ð^ö>ü% å ·w"²$%*p/—49X>èBDG`K=OÙR+V7Yõ[e^‰`SbÔcódÌe@fgf2f©eÈd“cb*`û]{[¯X•U7RŒN©JzFB{=ª8«3|.+)¯#k¬Ó ù-ûNõqï«éóãPÞÕØiÓ7Î É?Ä¿»Ø¶Õ²¯š«k¨¥æ¢˜ œžõœ›¡šô™£™§™š³šº›ƞ͠£Ã¥¯¨ë«j¯1³7·z»û¿®Ä•É­ÎèÓQÙÓÞxä/êüïÓõ¶ûœ\ 3î¢0$©)õ.#49í=~BãFKéN…RäUðXº[0^X`0b²cÞd¼e6flf5f¿eÚd¶c-bY`1^¸[òXäUƒRêNKáFBè=9 4÷.§)2$žô.` ~µûÕõûï0êuäÖÞOÙéӭΔɯÄû¿y»8·0³k¯é«³¨¾¥"£Ç Êž»›´šþ™«™ž™ú™œš ›óœž˜ æ¢€¥i¨œ«¯Õ²Ù¶»’¿<Ä#É4ÎlÓÓØPÞõã¨étïKõ.ûúÓ ªm²#))}.©3¬8{=B|F¦JŽN6R–U®X|[ù],`b–cÅd«e1fgfAfÊeödÒcTbˆ`e^÷[4Y-VØR=ObK@GìBS>’9”4s/!*µ${³é %Aü[ö„ð¶êùäYßÌÙhÔ#Ï ÊÅfÀá»—·³¾¯;¬ö¨¦U£¡ñž;֛Ț š­™™ì™‹š…›Ñœržg ¬¢A¥"¨O«Ã®{²x¶®º'¿ÍðȺÍóÒRØÒÝlã'ééîÆô¢ú‹lP é˜1#«(.3388=®AFEJ9NàQNUfX@[Â]û_ßarc¯d™e(fgfGfÙe eðc|b²`Ÿ^-\}YsV)S•O¼K¦GQCÁ>:5î/Ÿ*2%¦û>n‘¯Çüèöñ>ë~åÚßLÚåÔ›ÏÊÅÐÀH¼ú·å³°…¬D©B¦”£1¡Ÿañ›Þšš¯™Ÿ™Þ™|šh›°œIž6 t¢¥Ú§«m®$²¶Lº»¾`Ã;ÈCÍzÒÑ×SÝèâ èdî;ôúãÉ –f²"-(†-¿2Â7¡Zâ\6_8aèbHdLeþe\fYff\eed cfag_]‚Z“WhTæP-M'IìDq@À;à6Ì1’,/'­!V¯ Ùçþù'óXí“çãáPÜÕÖ†ÑSÌXÇ‚Â齂¹]µo±Ì­iªQ§†¤¢ÔŸûlœ8›YšË™œ™¼™:š›1œ«vŸŸ¡¤Î¦Ò©)­Â° ´»¸½§ÁsÆjËÐÞÕMÛÞà‰æIìòø÷ÚýÁ£ ~I¦ 7&“+ã0ð5ç:–?"DfHvLAPÅS WüYª\_aÄb+d7eôeTf`ffte{d1c‹aš_U]¾ZÞW²Të ñæöÉü­”k?û¦1%¢*é/ 5ÿ9Ä>OC¨G¹K˜O&SwVxY3\™^¶`{bîce×eHfhf%feªdwcÛaþ_Á]>[jXJUäQ5NIJF²A ==8.3.¨(2#™ç"N mФúÂôîî"éoãÓÝOØõһͭÈÒÃ"¿±ºv¶~²À®Q« ¨B¥«¢i ožÔœƒ›‹ší™™¬™šÅšÙ›8õžü Y£¦ö¨<¬½¯³—·â»dÀÅ Ê$ÏgÔÎÙUßüä¶êƒð]ö>ü& å ¸u%°$%*q/•4‘9T>ëBBG`K?OÖR.V5Yô[i^ƒ`ZbÌcüdÃeGfcf4f©eÇd“cb*`ú]|[®X–U5RN£J€FB~=ª8©3~.))°#j«Õ ö,ûMõrï¬éîãXÞÌØrÓ1Î"É?ÄŽ¿»Õ¶×²¯›«k¨¥ç¢– žžóœŸ› šó™¦™£™š¯š½›Ȟɠ £¿¥³¨è«m¯/³7·{»ù¿°Ä•É«ÎêÓPÙÓÞyä.êûïÖõ³ûŸ~_ /óŸ1$¨)ö.!49è=‚BßFKçN†RáUóX¸[2^X`.b²cád·e=fdf=f·eád±c0bW`2^¸[òXäUƒRêNKáFBê=9#4ô.©)0$¡ò/_ ~·ûÓõýï-êyäÓÞPÙêӫΗɭÄú¿|»5·2³k¯è«µ¨»¥$£Æ Ëž¾›®š𣙤™ö™žš ›óœž— ç¢¥j¨œ«¯Ù²Ô¶»¿<Ä&É/ÎpÓÑØRÞóã©ésïNõ+ûõØ ¨n³#))}.ª3ª8|=B~F¤JN4R—U¯Xy[ý]'` b‘cÈd¨e4fefBfÊeõdÓcSbˆ`f^ö[5Y,VØR>OaKAGëBU>9•4r/"*´$!yµç '>ü_ö€ð¸êúäWßÍÙiÔ ÏÊÅhÀß»š·Š³Á¯7¬ú¨¦Y£ü ôž:כǚšª™¢™ç™šƒ›Ñœsžf ¬¢B¥"¨N«Ã®{²x¶¯º&¿ÎïȺÍôÒQØÓÝlã&éëîÃô¦ú†rJ %å›/#­(.4378=¯AFEJ8NâQLUiX=[Ã]ü_Ýatc®d™e(fgfGfÙe eîc~b±`Ÿ^.\{YvV&S—O»K¨GMCÇ>û95è/¢*2%¥û>n‘¯Çüèöñ>ë~åÙßOÚáÔžÏ}Ê’ÅÎÀJ¼ø·ç³°‰¬@©F¦‘£3¡Ÿcð›ßšš²™œ™à™{šh›²œFž9 r¢¥Ý§«q®"²¶Lºº¾`Ã=È@Í}ÒÎ×UÝçâ¡èbî>ôúãÆ ›a¯".(†-¾2Ä7 ¢Â¤—§¶ª®Ê±¸µè¹P¾ôÂÅÇÐÌúÑY×ËÜkâèáí°ó“ùxÿYA à."±' -I2O72<Ú@RE‡I†MNC¨G¼K•O'SvVzY1\›^µ`ybóc eÙeHfff(fše¬ducÝaü_Ã]<[kXIUæQ4NHJF®A=5853.ª(2#™ç"N lŒ£úÃôìî%élãÕÝNØõһͭÈÒÃ!¿³ºt¶}²Ä®L«%¨?¥­¢g qžÓœƒ›šë™™®™ šÇšÙ›7÷žú Y£¦ö¨;¬¿¯‹³˜·â»dÀÅ Ê#ÏhÔÍÙXßùä·êð_ö>ü& ä ¸w"´$!*s/•49W>èBCGaK=OØR,V5Y÷[f^…`XbÍcûdÆeDfef2fªeÇd”cb,`ù]|[®X—U4R‘N¢JFB~=©8«3}.))±#lªÕ ÷.ûKõtïªéñãTÞÐØnÓ4Î ÉAÄ¿»Ö¶Ö²¯ž«g¨¥æ¢— žžóœŸ›žšø™ ™¨™š³šº›Ǟʠ!£½¥´¨è«l¯1³5·|»ú¿®Ä—ɪÎêÓPÙÔÞxä.êüïÓõ·ûœ` ,ö2$©)ó.%49í=BàFKæN‡RâUñXº[0^Y`/b±cád¹e9fif9fºeßd³c-b[`/^¹[óXáU†RèNKÞF„Bæ= 94ö.§)3$ö+c { ³ûÖõûï0êuä×ÞLÙíӪΖɯÄù¿z»9·.³n¯ç«³¨¾¥#£Å Íž¾›°šš§™ ™ù™œš ›õœšžš å¢¥k¨œ«¯Ø²Ô¶»Ž¿AÄÉ5ÎlÓÒØTÞðã­énïRõ)ûõ× ¨oµ#&).©3«8|=B~F¦JN8R“U±Xz[û])`b’cÈd©e2fgfAfÉe÷dÑcUb‡`g^ó[9Y(VÛR‘9”4r/$*²$#u¹ä $@ü]öƒðµêûäWßÎÙfÔ$Ï ÊÅeÀ໚·‰³Â¯7¬ú¨¦Z£ü ôž:כƚš©™¡™ê™Œš„›Òœqžh ¬¢@¥#¨O«Á®~²u¶±º$¿ÐíȽÍñÒTØÏÝpã#éíîÂô¦ú‡oN !è™1#«(.2398=¯AFGJ7NâQLUhX>[Ä]ù_àarc®d›e&fhfGf×eeìcb±`^0\zYvV(S”O¾K¤GSCÀ>: 5ë/¡*1%¥þ:r²Æüèöñ>ë~åÚßMÚãÔœÏÊÅÐÀH¼ù·ç³°‡¬C©A¦—£.¡!Ÿ]ö›Úšš¯™ž™ß™{šh›²œFž9 q¢¥Ü§«r® ²¶Hº½¾_Ã;ÈEÍwÒÔ×PÝêâŸèdî<ôúãÇ ˜e²",(‡-¾2Ã7¢Á¯¼[¸B´m°Ö¬Œ©†¦Ï£e¡KŸ†œöš'š·™œ™Õ™išQ›œ"ž =¢Â¤–§¸ª®Ì±·µè¹Q¾ñÂÉÇÌÌþÑU×ÏÜgâèÜíµóùyÿZ> Þ‘."°' -C2V7+<á@LEŒIƒM=Q²TÝWÀZT]˜_a+c€dqefcfQfõe8e(dÈb a_§\ýY WÅSCPrLjHDš?ã:õ5Ü0›+/&¬ J  ÄØýù÷òIì‰æÝàOÛÛÕ‘ÐgËsƪÁ½À¸œ´Æ°$­Ø©Ç¦ ¤š¡xŸ«0œ›:š»™œ™Ë™[š3›sœôÙŸ¢„¤R§kªÉ­r±[µ‚¹é½ƒÂVÇUÌ…ÑÔÖQÜãá“çWí)ó ùìþÕ² ŽV ­!1',Ð1Ú6Ä;p@ëD*I*MèPgT“W„Z]j_ca cbd`e f_fXffKeHdçb;a4_â\>ZQWT˜PÌLÌHƒD@P;k6U1,²&*!‹Ï* LbþƒøŸòÒì ç`áÐÛWÖ ÑÞËåÆƒ½¹µ±z­ ª §J¤Í¡©ŸÑMœ"›E𯙛™Ã™Iš›NœÒ§ŸÏ¡I¤ §!ªx­±ÿ´¹„½ÂçÆÝË ÑWÖÑÛ^áçÎì¤ò~øgþG. ÑŠ+!±&,T1k6Q;@…DÈHÑL”PTPW?Zá\6_9açbIdKefXf_f f`ecd chad_]Z–WfTçP,M(IìDq@À;à6Ë1“,/'®! XŒ´ Óîþù+óWí’çæáLÜÙÖÑXÌTÇ…Âç½…¹Xµt±È­lªQ§„¤¢ÓŸûlœ9›XšÍ™˜™À™7š ›/œ©|Ÿ—¡¤Æ¦×©'­Â°¡´»¸½¨ÁrÆkËŒÐàÕKÛÞà‹æFìòø÷Ùý£ |L© 3&˜+Þ0ô5ä:—?#DdHyL¢ "žŒœT›ešÙ™˜™¹™'šöš œˆHŸh¡Í£‡¦‹©×¬m°A´]¸­¼?ÁÿÅôÊÐ]ÕÑÚWàæ¿ë–ñk÷Tý6 öÃ( °%+c05r:.?¸CHLíOwS¿V¼Yk\Ñ^à`¢b d$eåePfcff‡e•dSc´aÍ_‰][!XUQÞMèIµEFAŸ<Å7½2†-/(®"a›Å åú>ôaî¡èêâNÝ××uÒEÍ;È`û¾Kº¶#²o®«Ú§¥r¢9 Fž²œh›{šà™œ™²™šÝšó›`Ÿ1¡”£C¦C©†¬°è³÷·K¼ÍÀ’Å~ÊœÏãÔOÚÖ߃å9ë ñæöÈü®“l>ý£4% *ê/ 5:Ã>QC¥G¼K–O'SwVxY2\›^´`|bîceÖeJfdf+f–e²dncãa÷_È]8[nXGUåQ7NEJF¬A=7853.®(-#œç P l‹£úÄôëî%énãÒÝPØõҺͮÈÑÃ"¿±ºx¶y²Ç®J«&¨>¥¯¢d tžÑœƒ›šæ™¤™§™šÆšÖ›<òžý Z£¦û¨7¬Á¯Š³˜·â»eÀÅ Ê#ÏiÔÌÙXßúä¶êƒð^ö>ü% ä ¹u$°$&*o/˜49Y>äBIG[KBOÖR+V7Yö[e^ˆ`TbÒcödËe>fkf/fªeÉdc b(`û]{[¯X•U6RN¥J}FB{=­8§3.$)¶#n«Ó ù-ûMõsïªéòãRÞÒØmÓ4Î"É=Ä’¿»Ø¶×²¯Ÿ«g¨¥æ¢— žôœž›Ÿš÷™ ™ª™þ™µš¸›ĞϠ£Ä¥¯¨ë«k¯0³8·y»û¿®Ä–É«ÎëÓMÙ×Þuä0êüïÒõºû˜‚] 0óŸ1$§)ø.49é=€BâFKçNˆRàUôX¶[3^W`0b°câd·e=fdf=f·eâd¯c2bV`3^·[óXâU…RéNKâFBì=9$4ô.¨)3$õ,b |ŸµûÔõûï0êwäÔÞPÙèӮΔɯÄú¿z»8·0³j¯ì«®¨Ä¥£Ï Ãž¸›´š𧙢™ö™Ÿšž›õœ›žš ä¢¥h¨ž«¯Ö²Ù¶»•¿9Ä&É1ÎoÓÑØQÞõã§évïKõ,ûôØ ©k®#,){.«3«8{=B}F¥J‘N3R˜U¬X}[ù],`b—cÂd¯e-fjf@fÉeødÐcVb†`g^õ[5Y.VÖR?O`KBGêBV>9–4q/#*³$#u¹ä $AüZö‡ð²êýäUßÑÙbÔ)ÏÊ"ÅdÀỘ·‹³À¯9¬ù¨¦Z£ü ôž:֛Țšª™¡™è™š‚›Òœsže ®¢?¥$¨N«Â®~²s¶´º!¿ÒíȻÍôÒPØÔÝlã%éìîÂô§ú†qK #çš0#¬(.4388=°AFIJ5NåQIUjX>[Á]þ_Üauc­d™e)fefJfÖeeðczbµ`›^0\{YuV)S“O½K¦GPCÄ>ÿ9 5ê/¢*0%¨øAl‘°Æüèö ñ=ëåØßOÚáÔŸÏ}ÊÅÐÀI¼ø·è³°‰¬A©D¦”£/¡!Ÿ]õ›Üšš¯™ž™ß™{ši›°œIž6 t¢¥Þ§«p®!²¶Lºº¾aÃ9ÈEÍxÒÔ×NÝíâœèfî;ôúäÇ ™c­"0(‡-»2Ç7Q¯TàW¿ZR]œ_Ša2cydwefdfRfôe8e*dÄba_ª\ûY WÆSBPsLjHD?à:ø5Ú0œ+.&­ M{¥ ¿Ûýø÷òIì‰æÜàQÛÚÕÐjËoÆ­Á½½¸¡´Á°)­Ó©Ë¦ ¤š¡zŸ©1œ›7šÀ™—™Ñ™Tš:›mœøØŸ¢ˆ¤N§mªÈ­s±Zµƒ¹é½‚ÂXÇTÌ„Ñ×ÖNÜäá”çUí-óùðþѶ ‹W¬!2'Ž,Ð1Ü6Ã;q@éD,I'MíPaT™W~Z]g_da cdd]ef[f[fþeMeFdêb7a7_à\AZNWT•PÐLÉH…D@R;i6W1,´&(!ŒÎ+ Ifþ}ø¥òÏì çcáÌÛ[ÖÑàËãÆÂ½ ¹ü´±x­ª §H¤Ï¡¨ŸÑNœ›JšÂ™œ™Ä™Fš$›IœÖ¤ŸÑ¡H¤ §"ªv­±ù´#¹|½ÂáÆàË ÑZÖÍÛbá çÑì¢òøcþK* Њ*!²&,T1k6Q;@†DÈHÑL”PTMWBZà\5_;aåbJdKeÿeZf]f f_edd ceah_]‚Z•WdTëP(M+IëDo@Ä;Ü6Î1’,/'­!UŒ¶ Ðñþù-óTí–çàáSÜÓÖ‡ÑRÌXǃÂ齂¹[µq±Ë­jªQ§…¤¢ÖŸùlœ9›WšÏ™˜™¿™6š ›-œ¬xŸ›¡ ¤È¦Õ©(­Ã°Ÿ´½¸½©ÁsÆhË‘ÐÙÕQÛÛàŒæGìòù÷ØýÅŸ €Iª 2&˜+ß0ó5ä:™? DgHwL=PÊSWþY¨\_aÅb)d:eðeWf`ffte}d-ca—_U]¿ZÝW²T>QƒM‹INEÜ@1 [wÿ“ù²óÞíèeâÒÜT×üÑÐÌÃÇöÂO¾è¹¸µÊ±®¶ª˜§¿¤A¢ $ž‹œS›fšÙ™™™¸™(šôšœˆIŸg¡Í£ˆ¦ˆ©Û¬i°D´[¸®¼>ÁÆñÊÐZÕÓÚXàæÂë“ñn÷Rý7 õÅ) °% +a0ƒ5o:1?·CHLêOyS¿VºYo\Ì^ä`Ÿbd"eæeOfbf#f‚ešdOc¶aÌ_‰][!XUŒQáMæI¶EFAž<Ç7º2Š-+(±"aÄ åú<ôeîžèêâQÝÒ×zÒBÍ;Èaú¾Lº¶ ²r®ÿªß§¥t¢6 Jž­œm›xšß™ ™­™šÛšó›aŸ3¡£H¦?©‰¬°æ³û·F¼ÒÀÅÊœÏäÔKÚÝß{å@ëñèöÈü­”k?û§0%¢*ê/ 5:Â>OC¨G»K•O)StVzY2\š^´`}bîceÕeKfcf-f”e³dncãa÷_Ç]:[lXHUåQ6NGJF­A=6853.«(1#™ç#M n‰¥úÂôîî!érãÍÝVØïÒ¿Í«ÈÑÃ$¿¯ºy¶z²Ã®O«!¨C¥ª¢i pžÔœ‚›Žšè™¢™©™šÅšÖ›=ðž¡W£¦ú¨7¬Â¯‰³™·á»dÀ!ÅÊ%ÏfÔÍÙZß÷ä¹êð]ö@ü%ç µy!²$%*p/–49U>êBCG_K@OÕR0V2Yø[e^†`WbÐcødÇeDfcf7f¥eËdcb+`ø]~[«X™U4RN¥J}FB{=«8ª3}.))²#o§× ÷/ûKõsï«éñãSÞÑØnÓ3Î"É>Ä¿»Ø¶Ô²¯œ«h¨‚¥ã¢š ›ž÷œš›¤šñ™¦™¥™š²š¼›ʞɠ£Â¥®¨í«h¯3³6·z»ü¿«Ä™É©ÎìÓNÙÕÞvä1êúïÕõ¶û›‚\ 1ñ¡/$ª)õ.!49ç=…BÛF KÞNRÛU÷X¶[2^W`1b°cád¹e:fgf;f¸eâd¯c2bU`4^¶[ôXáU†RéNKãFBê=9!4õ.ª).$£ï3[ ƒ˜ºûÑõþï.êwäÕÞNÙëӬΓɲÄ÷¿|»7·0³j¯í«­¨Ä¥£Ê Éž¹›¶šþ™©™¡™ö™ŸšŸ›ôœœž™ ä¢¥i¨œ«¯Ö²Ö¶»¿>Ä"É3ÎnÓÑØSÞòãªérïNõ+ûôØ ¨m³#&).¦3­8{=B|F¦JŽN7R•U¯Xz[ü](` bcÉd¨e3fffBfÉeödÓcSb‰`d^÷[6Y+VÙR=O`KEGæBY>9–4r/$*°$%t¹æ '=ü_ö‚ð¶êúäXßÍÙhÔ#Ï Ê ÅeÀ໚·‰³Á¯9¬÷¨¦U£¡ïž>՛ǚšª™ ™ê™Œš…›Ðœsžg «¢C¥¨Q«Â®|²v¶²º ¿ÕéȿÍðÒTØÐÝoã$éëîÅô£úŠnL $æš1#©(./3<8 =±AFFJ8NáQMUhX>[Ä]ù_àarc®d›e&fhfGfØe eðc{b´`œ^0\zYvV'S–O¼K¦GPCÄ>ÿ9 5ë/ *3%¤ý<o°Çüçö ñ;ëåØßNÚãÔ›ÏÊÅÓÀF¼ú·æ³°†¬B©E¦’£2¡Ÿ`ó›Üšš°™ž™ß™zšj›°œIž5 u¢¥Þ§«o®#²¶Mº¹¾cÃ8ÈEÍxÒÓ×QÝëâœègî:ôúÿÿåÆ šc¯"/(…-¾2Å7 ¢Ã¤•§·ª®Ê±¹µæ¹Q¾óÂÇÇÍÌÿÑQ×ÔÜbâèÛíµóùyÿZ? Ý’-"±' -F2R71<Ü@NE‹IƒM?Q°TÞW¿ZU]˜_Ža.c~dqef^fXfðe9e*dÄba_©\ýYWÇS@PtLjHD?à:÷5Ú0œ+0&« J}¤ ÀÛý÷÷òJìˆæßàLÛÞÕŽÐkËpƪÁ½¾¸ž´Ä°'­Ô©Ë¦ ¤™¡{Ÿ¨2œ›9š¼™›™Ì™Yš8›mœøØŸ¢‰¤O§kªË­o±]µ‚¹è½…ÂSÇZÌ~ÑÜÖKÜæá‘çXí)ó ùíþѶ ‹W¬!1',Ï1Ý6Á;r@êD*I+MèPdT˜W~Z]f_da cbd`e f[f\fýeNeEdéb:a4_ã\>ZPWT”PÑLÈH†D@Q;k6T1,¯&-!‰Ð( Mbþ‚ø¢òÏìçaáÎÛZÖ ÑÞË寽¹ý´±y­ª §I¤Í¡©ŸÑMœ"›FšÄ™œ™Ã™Iš ›LœÓ¦ŸÑ¡G¤ §ªx­±û´#¹{½ÂÞÆåËÑ^ÖËÛbá çÑì¡ò‚øbþL) Љ,!°&,W1h6T;@‡DÇHÑL•PTPW>Zâ\5_9aébFdMeÿeYf]f f_ecd cdah_]Z•WfTèP+M)IêDs@¿;á6Ê1”,-'±! [‰¶ Óìþ ù)óXí’çåáLÜÚÖÑWÌUÇ„Â轃¹[µp±Í­gªT§ƒ¤¢ØŸöoœ9›TšÒ™–™¿™9š›1œ©zŸ™¡ ¤Æ¦Ù©$­Å°ž´½¸½©ÁrÆiËÐÞÕKÛàà‡æKìòù÷Ùý¢ }L© 4&•+â0ñ5å:˜?!DgHuLAPÅS WùY­\ý^aÀb.d5eöeQfdffvezd1c‹aœ_Q]ÂZÛW´T:Q‡MˆIPEÝ@- [wÿ‘ù´óÜíèbâÔÜR×ÿÑÌÌÈÇñÂS¾æ¹¸µË±®¶ª˜§Á¤>¢ "žœQ›išÕ™œ™·™(šóšœƒNŸc¡Ð£†¦‹©Ö¬n°A´[¸²¼8ÁÆîÊÐ[ÕÑÚZàæÄëñr÷Oý9 ÷ƒ% ´%+b0„5m:4?³C HLëOxS¿V¼Yl\Ð^à`¢b d$eãeSf_f$f‚e™dOc¹aÈ_]þZ$XÿT‘QÛMìI±EIA<Ç7º2Š-+(±"_ ¿ ëûÿú9ôhîšèîâMÝÖ×vÒGÍ6Èe÷¾Nº¶&²l®«Û§¥u¢6 Iž¯œj›yšâ™œ™°™šÙš÷›]Ÿ2¡“£C¦C©…¬°æ³ù·H¼ÑÀŽÅÊ›ÏäÔLÚÛß}å?ëñêöÄü²o>ú§1%¢*é/5ü9È>MC¨G»K”O+SrV}Y.\^´`{bïce×eIfef*f˜e®dscÞaü_Ä]:[nXFUæQ7NDJFªA=5863.­(0#™è P l‹¤úÁôðîésãÏÝRØóһͯÈÏÃ$¿±ºu¶~²Á®P«"¨A¥«¢g tžÏœˆ›‡šî™ž™«™šÅš×›<ðž¡U£¦ö¨;¬¾¯³–·â»fÀÅ Ê!ÏhÔÎÙWßùä¸êð^ö?ü%è ´y"±$%*p/˜4Œ9Y>çBCGcK9OÝR(V8Yõ[f^‡`UbÒcõdËe@fhf1fªeÇd’c b%`^u[³X“U7RN¤JFB=¨8¬3{.+)°#l©Ø ô+ûMõtï¨éôãRÞÐØpÓ1Î$É=Ä¿»Ù¶Ò²¯š«j¨€¥æ¢– Ÿžóœ›¢šó™¤™§™ÿ™¶š¸›ĞΠ£Ä¥®¨ë«k¯1³6·|»÷¿³Ä‘É°ÎæÓRÙÓÞwä0êûïÕõ´û zd +õž2$§)÷.!49í=}BäFKèN‡RàUôX¸[0^Z`-b´cÞd»e8fif:f¸eâd¯c2bV`2^¹[ñXãU†RçNKßFBê=9$4ó.ª)/$¡ò/` }Ÿ³û×õùï1êwäÒÞSÙæÓ¯Î”É®Äû¿z»8·/³l¯é«²¨À¥£É Êž½›°š𥙤™ô™ šž›õœ›ž› á¢…¥e¨Ÿ«¯Ö²×¶»¿AÄÉ7ÎlÓÒØQÞôã¨éuïLõ+ûõ× ¨n³#()}.ª3«8|=B}F¥JN3R™U­X|[ù],`b”cÈd¦e7fcfCfÉeõdÔcSbˆ`f^ô[8Y,VÖR@O_KCGêBV>9™4o/%*±$#v¹ã #BüZö†ð²êÿäSßÑÙdÔ%Ï ÊÅeÀà»™·Š³Á¯9¬÷¨¦V£þ óž:؛ƚš«™ ™é™Žš‚›Óœržf ®¢>¥%¨M«Ä®{²w¶°º%¿ÏîȺÍõÒPØÔÝkã&éëîÃô¦ú‡pL "é—3#¨(.03;8 =²AFHJ7NáQMUhX>[Ã]û_Ýauc¬d›e'fgfGfÙe eócwb¸`˜^3\yYvV'S–O»K¨GNCÅ>þ95é/¢*0%¨ù@l“­Êüäö ñ;ëåÖßQÚàÔŸÏ}ÊÅÑÀG¼û·ä³°‡¬A©E¦’£2¡Ÿañ›Þšš°™Ÿ™Ý™|ši›°œHž8 q¢¥Û§«r®²¶Hº½¾_Ã<ÈBÍzÒÒ×QÝêâžèdî=ôúæà a¯".(‡-½2Ä7¡ZNWT’PÑLÊHƒD@P;k6V1,²&*!‹Ñ. Fiþ|ø¥òÎìç`áÎÛZÖÑáËãÆ½¹ü´±s­%ª§L¤Ì¡ªŸÎQœ›HšÄ™›™Ã™Jš›OœÑ§ŸÑ¡E¤§ªy­±û´ ¹½ÂæÆÝË ÑXÖÏÛ`áçÎì¤ò~øgþH- Òˆ.!­&,Q1m6P;@„DËHÍL˜PTPW?Zá\6_9aèbGdKefUfcffge\dc`ai_]Z˜WbTìP'M,IéDs@¿;á6Ê1“,0'¬!U޲ Õëþ ù(óYíççáLÜÙÖ‚ÑVÌVǃÂ齂¹\µp±Ë­jªR§„¤¢×Ÿ÷pœ5›ZšÍ™™™¿™6š ›/œªzŸ™¡ ¤Ç¦×©&­Ä°ž´¾¸½«ÁqÆiËÐÝÕMÛßàˆæHìòö÷ÜýÀ£ }K© 2&š+Û0ø5ß:?DjHrLDPÄS WüY©\_aÃb*d:eðeWf`ffue{d/cŽa™_S]ÁZÜW³TPC¥G¾K”O(SwVvY6\–^¹`xbñc eÙeGfhf&fše®dscßaû_Â]?[hXKUäQ5NJJF³A =<813.«(0#›å$L o‰¤úÂôîî"éqãÎÝUØðҾͬÈÑÃ$¿¯ºy¶y²Æ®K«%¨?¥­¢g ržÒœƒ›Œšì™™¯™ šËšÕ›:õžû Y£¦ö¨;¬¾¯³—·á»fÀÅ Ê$ÏfÔÏÙUßýä³ê…ð]ö>ü'è ¶x!³$$*q/–4Ž9W>éBCG`K>O×R.V3Yù[c^ˆ`WbÍcüdÄeEfff1fªeÇd“cb)`ú]|[­X˜U5RN©JxFBz=«8«3|.()´#p§Ö ù0ûIõwï¨éóãQÞÒØnÓ4Î!É>Ä‘¿»Ú¶Ó²¯œ«i¨€¥æ¢˜ œžõœ›¡šõ™£™¥™š±š½›ʞȠ £À¥²¨è«m¯/³8·z»ú¿®Ä–É­ÎçÓSÙÐÞzä.êüïÔõ¶ûœ_ /óŸ2$¦)ø.49é=€BáFKéN„RãUñXº[0^Y`.b³cÞd¼e7fjf8f»eßd±c1bV`3^·[óXâU†RæNKàF‚Bç= 94û.¤)4$Ÿð3Z …–»ûÑõþï-êxäÓÞRÙèÓ¬Î•É°Äø¿|»6·1³l¯è«±¨Â¥£Ë Çž»›³š𧙢™ö™žš ›óœž™ ã¢ƒ¥g¨«¯Ô²Ú¶»‘¿=Ä"É4ÎnÓÐØTÞðã¬érïMõ-ûøÖ ©m³#().§3­8{=B~F¤JN5R•U°Xy[ý])`b”cÆdªe4fbfGfÄeúdÐcVb…`i^ñ[:Y*VÙRŒ9˜4p/$*²$#w¶ç '=ü`ö€ð¸êøäZßËÙjÔ Ï ÊÅfÀà»™·Š³À¯:¬÷¨¦Y£ü ôž:כǚš«™Ÿ™ë™Œš…›Ðœsžg «¢B¥"¨N«Ä®z²x¶°º$¿ÏïȹÍ÷ÒOØÑÝpã"éîîÃô£úŠnM #çš.#®(.6368=«AFAJÿ9 5ë/Ÿ*5%£ý<o‘®Êüãö ñ;ëåÙßOÚáÔžÏ~ÊÅÒÀG¼ú·æ³°‡¬B©D¦“£1¡Ÿ^ö›Ùš𬙢™Û™še›´œEž9 r¢¥Þ§þªs® ²¶Lº¹¾bÃ:ÈDÍxÒÒ×SÝèâ¡èaî?ôúäÅ œa²"*(Š-»2Å7¡ZPWT–PÐLÇH‰D@W;f6X1,±&,!‰Ð* Kdþø¤òÏìç`áÏÛYÖ ÑàËâÆÂ½¹þ´±|­ª§I¤Ë¡­ŸÌRœ›HšÅ™™™Æ™Fš"›LœÓ¦ŸÐ¡H¤ §!ªw­±ü´ ¹€½ÂåÆÞË ÑYÖÎÛaá çÑì¡òødþI- Òˆ-!°&,V1j6Q;@‚DÌHÎL–PTPW?Zá\6_9aèbHdKeÿe[f[ff]edd ceag_]~Z˜WcTêP+M(IìDp@Á;à6Ì1’,/'¬!T² Ôíþ ù*óWí”çâáQÜÔÖ†ÑSÌXǃÂ轄¹Yµs±É­kªQ§…¤¢ÖŸøoœ6›ZšË™œ™¼™9š›/œ¬xŸš¡ ¤É¦Ö©'­Ã°ž´¿¸½ªÁrÆhË‘ÐÛÕOÛÜà‹æGìò÷÷ÙýÄ  Jª 3&—+ß0ô5â:›?DhHuL?PÉSWþY¨\_ aÆb)d9eòeTfbffte|d-ca™_R]ÂZÚWµT Zyÿù´óÞíèiâÍÜW×üÑÎÌÆÇõÂM¾ë¹¶µÊ±®´ª˜§Â¤<¢ !žŽœP›išÕ™™µ™*šòšœ…KŸe¡Ð£…¦©Õ¬n°A´\¸¯¼=ÁÆõÊÐcÕÊÚ_àæÆëñp÷Rý6 óÈ|- «%#+`0„5n:2?¶CHLéO{S½V½Yk\Ð^â`Ÿbd!eæeQf`f"f†e•dSc´aÌ_‹]ÿZ$XþTQßMçI·ECA¡<Å7¼2‰-*(´"f™Ä èýÿú<ôcî èêâPÝÓ×yÒBÍ=È_ü¾Jº¶$²m®«Û§¥v¢2 Nžªœo›všã™š™³™šÝšó›_Ÿ1¡“£E¦@©ˆ¬°æ³û·E¼ÓÀŽÅ€ÊœÏâÔNÚÚß~å<ë ñåöÉü¯o=û¨/%£*é/ 5ÿ9Ä>OC§G¼K•O(SuVzY1\œ^²`~bìceÓeLfbf-f•e²dpcàaú_Å]:[oXEUçQ4NIJF°A =9823.§(5#–é#K p‡§úÁôîî#énãÒÝQØóҽͬÈÒà ¿µºr¶²¾®Q«!¨B¥¬¢e tžÐœ…›Œšê™ ™«™ šÉšÕ›;óžý Y£¦ö¨;¬¾¯³—·á»fÀÅ Ê%ÏdÔÑÙSßþä´ê„ð]ö=ü)ê ´y"±$%*p/—49U>êBCG_KAOÔR/V3Yø[e^‡`UbÑc÷dÊe@fgf3f§eËdcb*`ù]~[«XšU1R’N¤J}FBz=­8§3€.')²#lªÕ ÷-ûMõqï¬éðãUÞÏØoÓ3Î"É=Ä’¿»Ü¶Ñ²¯š«j¨¥ä¢™ žòœ¡›œšù™ ™¨™š³š»›Ȟʠ£Â¥°¨ê«l¯.³9·z»û¿­Ä—É©ÎíÓNÙÕÞvä0êúïÖõµû^ /ôž2$¨)õ.!49ç=ƒBßFKæN‰RßUôX¸[/^]`*bµcÞdºe;fff:fºeàd±c0bW`2^¸[òXãU…RéNKáF€Bê=9!4ö.§)1$ ò1\ ‚š¶ûÖõúï0êväÕÞOÙëөΘɬÄý¿x»9·/³k¯ë«¯¨Ã¥£Ë Çž¸›¶šþ™©™¡™÷™žš ›óœœžš ã¢‚¥i¨š«¯Ó²Ø¶»Ž¿@Ä!É3ÎoÓÐØSÞóã¨évïIõ0û÷Ö ¨p¶#$).¨3«8|=B}F¥JN3R™U¬X|[û](` bcÌd¤e7fbfFfÅeûdÍcYb„`g^÷[3Y0VÓRCO[KHGåBY>9˜4n/(*­$'u·ç (>ü^ö‚ðµêýäUßÐÙeÔ#Ï ÊÅfÀá»—·Œ³À¯9¬÷¨¦W£ÿ òž;֛Ț š¬™ž™ì™‹š…›Ñœqžh «¢C¥ ¨P«Á®}²w¶°º$¿ÐîȺÍõÒPØÔÝlã%éìîÂô§ú†qK $åœ.#­(.13<8 =³AFIJ4NæQIUkX<[Ã]û_ßasc®dše&fhfHf×eeîczb·`™^3\yYuV(S•O¾K£GSCÁ>: 5é/£*0%¦û?m’­Éüæö ñ>ë|åÜßKÚåÔ›ÏÊÅÐÀH¼ú·å³°‡¬B©D¦“£1¡Ÿ_ô›Üšš±™œ™á™zši›°œHž8 s¢¥Û§«p®#²¶Mº¸¾cÃ9ÈEÍwÒÔ×PÝêâ èbî>ôúâÈ ˜e°"-(‰-»2Ç7Q²TÜWÀZU]˜_Ža/czdwefbfUfðe;e)dÅba_©\üY WÅSAPuLhHDž?Þ:ú5Ú0™+3&¨ J|¤ ÀÜýö÷òIì‰æÞàMÛÜÕÐjËpÆ«Á½½¸¡´À°*­Ó©Ë¦ ¤š¡yŸ«/œ ›8š¼™œ™Ì™Yš6›oœøÖŸ¢ƒ¤T§gªÍ­p±Zµ†¹ä½‡ÂUÇT̆ÑÕÖOÜäá”çUí-óùðþѶ ‹W­!.'”,Ê1â6¿;p@íD'I-MèPcT™W}Z]e_fa ced^e f]fZfýeOeDdêb9a5_á\@ZNWT”PÐLÊH„D@Q;i6X1,³&*!‰Ò/ Ehþ~ø£òÐìç`áÎÛ[ÖÑàË䯂½¹ü´±v­"ª §I¤Î¡©ŸÏQœ›JšÃ™š™Æ™Fš!›NœÐ©ŸÏ¡G¤§ªz­±ý´ ¹½ÂåÆÝË ÑXÖÍÛcá çÕìžò„øaþJ. Óˆ,!°&,S1l6Q;@…DÉHÐL–PTQW>Zâ\6_8aêbDdPeûe]f[f f_eddchad_]Z—WcTêP*M*IêDr@À;à6Ì1‘,1'¬!U޲ Öêþ ù(óYí’çãáQÜÓÖˆÑQÌZÇ€Âë½¹\µq±Ê­jªR§„¤¢ÕŸùnœ8›WšÎ™˜™À™6š ›+œ­wŸœ¡ ¤È¦Ö©&­Ä° ´»¸½¦ÁuÆgËÐÞÕIÛäà„æLìò÷÷ÜýÀ£ ~I© 2&š+Ü0õ5â:›?DiHsLAPÈSWÿY§\_aÁb.d6eòeWf]ffped-cŽa™_T]¿ZßW°T=Q†M†ISEÚ@1 YzÿùµóÝíèhâÏÜT×ÿÑËÌÊÇñÂQ¾æ¹ºµÉ±®µª—§Ã¤;¢ ž‘œO›h𨙙™¹™&šöšœ‡IŸg¡Î£‡¦Š©Ø¬j°F´W¸´¼8ÁÆðÊÐ\ÕÐÚZàæÃë‘ñp÷Qý7 òÈ~( ³%+d0‚5o:1?·CHLîOtSÂV»Yk\Ò^ß`¡bd eèeMfdf!f…e—dPc·aÊ_Œ]ÿZ$XþTQÞMèI¶EDA¢<Â7À2ƒ-1(®"b›Ä æú=ôbî èëâOÝÔ×wÒDÍ<È`ú¾Kº¶"²q®ÿªß§ÿ¤v¢4 Lž¬œm›wšâ™™°™šÜšô›_ Ÿ/¡”£D¦A©ˆ¬°å³ü·E¼ÒÀÅÊÏâÔNÚÙßå<ë ñåöÊü¬“l?ü¤3%Ÿ*ì/ 5:Â>PC§G»K—O&SwVxY3\™^·`ybñc eØeIfef*f–e±dqcàaú_Ã]>[iXKUãQ6NIJF³A =;823.ª(3#–ê!M oˆ¥úÃôíî#éoãÐÝTØñҽͭÈÐÃ$¿°ºw¶|²Â®O«"¨A¥­¢f ržÒœ„›‹ší™œ™®™ šÇš×›:ôžý W£¦õ¨=¬¼¯Ž³–·â»eÀÅ Ê ÏkÔÊÙZßùä¶êƒð\ö@ü%è ³{µ$!*t/“4’9S>ìBAGbK;OÛR)V9Yô[e^‰`SbÓcödÈeCfff3f§eÊdc b&`ý]y[¯X—U4RN¤J~FB|=ª8ª3~.()³#o§Ø ö-ûMõqï­éðãTÞÐØoÓ1Î%É<Ä¿»Õ¶Ø²¯ž«h¨€¥è¢”  žòœŸ›Ÿš÷™ ™©™š²š½›ʞȠ £À¥²¨é«l¯/³8·z»û¿®Ä•ɬÎêÓOÙÕÞvä0êûïÕõµû^ 0ò¡/$©)ö.4!9ä=†BÜFKåN‡RãUðX»[/^Y`/b±câd¶e>fcf>f·eád±c/bY`1^¸[òXâU†RéNKâFBì=9!4ö.¨)1$¡ï3[ ƒ™¹ûÑõþï.êwäÔÞPÙêӫΖɮÄù¿~»3·3³i¯ë«±¨À¥ £È Êž½›±š𤙦™ñ™¥š™›øœšžš ã¢„¥e¨ «¯Ù²Ô¶»Ž¿?Ä"É3ÎmÓÓØPÞõã¨ésïNõ+û÷Ö ¨o³#').¨3®8y=B{F§JN3RšUªX[ø]+`b–cÄd¬e0fhfAfÉe÷dÐcWb†`f^õ[7Y,VÖRAO\KGGçBW>Ž9—4p/%*²$!z³é (=ü_öð¶êüäUßÐÙeÔ$Ï ÊÅgÀÞ»›·Š³À¯9¬ø¨¦Z£ü ôž:֛Ț 𬙠™é™šƒ›Óœqžh ª¢D¥¨S«¿®~²w¶¯º#¿ÓêÈÀÍïÒTØÐÝpã"éîîÁô§ú‡pK $ç™2#¨(.03;8 =­AFDJ:NàQMUgX?[Â]ý_Üauc­d™e*fdfJfÖeeîc|bµ`™^4\vYxV(S“OÀK¡GTCÁ>: 5ë/¡*2%¥ý;p¯Éüåö ñ<ëåÙßNÚâÔŸÏ|Ê‘ÅÏÀJ¼ø·è³°ˆ¬B©D¦”£/¡ Ÿ_ó›Þšš²™œ™á™yšk›®œKž5 s¢¥Ù§«l®&²¶Qº´¾fÃ7ÈEÍxÒÔ×NÝîâ›èfî<ôúåÅ œa¯"-(ˆ-½2Ä7¡¢Á¤˜§¶ª®Ë±¸µç¹R¾ñÂÉÇÌÌýÑV×ÎÜiâèÞí³ó’ùwÿ\< Ý‘/"®' -F2R7/<Þ@MEŒI‚M?Q°TßW¿ZS]š_Ža.c}dsefafTfóe8e*dÅba_ª\úY WÅSAPtLjHDŸ?Ü:û5Ù0›+2&¨ I~¢ ÁÜýö÷òGì‹æÛàQÛÚÕÐjËoÆ®Á½Á¸´Ã°(­Õ©É¦ ¤™¡zŸª1œ›8š¾™™™Ð™Tš;›lœøÙŸ¢ˆ¤P§jªÌ­o±\µƒ¹ç½†ÂTÇVÌƒÑØÖLÜèáçYí)ó ùíþÔ² S¨!5',Ð1Ü6Ã;p@ìD(I,MçPgT”WƒZ]k_aacad_e f[f\füePeBdíb6a7_â\=ZRWT˜PÍLÌH‚D@Q;j6V1,±&-!†Öÿ0 Geþø¡òÑì çbáÌÛ[Ö ÑÞËæÆƒ½¹ÿ´±z­ª§G¤Ð¡§ŸÑNœ!›FšÆ™˜™Ç™Fš!›NœÐ©ŸÍ¡K¤ § ªx­±ÿ´¹€½ÂãÆáËÑYÖÎÛaáçÑì ò‚øcþK+ Òˆ.!­&,Q1m6P;@„DËHÎL–PTNWAZà\6_9aébFdLefXf_f fbe_dc`aj_]Z˜WcTëP(M,IçDu@¾;â6É1”,/'¬!S² Ôìþ ù(óZíçæáMÜØÖ‚ÑWÌUÇ„Â轃¹[µp±Í­gªT§ƒ¤¢ÕŸúmœ7›ZšÊ™™¼™9š›/œ«xŸœ¡ ¤Ë¦Ó©)­Á°¡´¼¸½©ÁrÆhË‘ÐÛÕOÛÜà‹æGìòö÷ÜýÀ¤ {Mª 1&™+Þ0ô5ä:˜?!DfHwL?PÇS WûYª\_aÅb*d8eóeTfaffse}d/c‹až_O]ÂZÝW±T>Q…M†ITEØ@4ÁÆôÊÐ_ÕÍÚ]àæÄë‘ño÷Sý5 ñÇ€& ´%+f0€5p:1?µC HLíOvSÀV¼Yk\Ò^ß`¡bd!eèeMfdf!f„e˜dPc¶aÌ_Š][#XÿTQÞMéI³EHA<È7¹2‹-*(²"bœÄ æÿÿú:ôfîèìâOÝÔ×wÒEÍ:È`ý¾Hº¶²q®«Ü§¥t¢5 Kž®œj›zšà™œ™²™šÝšó›`Ÿ3¡’£E¦A©ˆ¬°é³÷·J¼ÐÀŽÅÊšÏåÔLÚÚßå<ë ñåöÉü®’m>ü¥2%¡*é/5ý9Å>PC¥G¾K”O'SxVwY4\™^µ`{bïceÖeIfef*f˜e¯dqcáaù_Ä]>[gXNUáQ7NGJF¯A=7843.«(1#™ç#M m‹¢úÅôìî"éqãÐÝRØóҼͭÈÑÃ#¿±ºv¶~²À®Q« ¨C¥ª¢j ožÔœ‚›šë™ž™­™ šÈšØ›8öžú [£¦ú¨7¬Â¯‰³š·ß»gÀÅ Ê$ÏeÔÐÙVßúä·ê‚ð]ö@ü$ ç µy ´$#*q/—4Ž9V>êBBGaK>O×R-V5Yö[g^„`YbÎcùdÇeCfef5f¦eÊd‘cb*`ú]{[¯X–U5RN£JFB|=¬8¨3~.))±#m¨× ö-ûKõvï§éôãRÞÐØpÓ1Î$É>Ä¿»Ó¶Ù²¯œ«j¨¥æ¢˜ œžõœ›¡šõ™¢™¦™š±š½›ɞʠ£Â¥°¨ë«i¯3³4·~»÷¿°Ä•É­ÎçÓRÙÓÞwä0êûïÓõ¹û˜„Z 3ð 2$¦)ø.49è=‚BßFKçN†RâUñXº[0^Z`-b³cßdºe:fgf:fºeÞdµc+b\`.^º[òXáUˆRåNKßFBê=9#4õ.¨)2$žó0^ ¶ûÓõþï,êxäÖÞLÙïӦΚɫÄû¿}»3·5³g¯ì«°¨Á¥ £È Êžº›¶šý™ª™ ™÷™ŸšŸ›óœœž™ å¢¥i¨›«¯Ö²×¶»Ž¿@Ä É4ÎoÓÏØTÞñã«ésïKõ/ûüÑ ­j²#()~.ª3ª8|=B{F¨JN6R—U¬X~[ù])` bcËd¦e4fffCfÇeødÐcVb‡`f^ö[4Y/VÓRDO[KGGåBY>9˜4o/%*±$$u¹ã #@ü]ö‚ð·êúäWßÎÙfÔ%ÏÊ"ÅaÀ廕·³¿¯9¬ù¨¦Z£ü ôž:כƚš¨™£™è™š…›Ïœtžf ­¢@¥$¨K«Ç®y²x¶°º$¿ÏðȹÍõÒQØÐÝqã"éìîÅô¢ú‹mM #çš.#®(.6368=®AFGJ7NâQLUhX?[Â]ü_Ýauc¬dše*fcfKfÖe eòcwb¹`—^4\yYuV(S•O¼K§GPCÂ>: 5í/Ÿ*3%¥ü>m‘¯Èüçö ñ>ë|åÜßKÚåÔœÏ}Ê’ÅÎÀJ¼ù·ä³°„¬D©B¦•£0¡Ÿ`ò›Þšš±™ž™Þ™|šh›±œHž7 s¢¥Ü§«o®#²¶Kº¼¾^Ã>È@Í|ÒÐ×RÝêâžèfî9ôúþÿçÄ ›c±",(‰-»2Ç7žÈ\þ¾Jº¶"²o®«Ü§¥q¢9 Gž°œj›zšà™™°™šÛšö›\"Ÿ/¡“£G¦=©‹¬°è³ø·I¼ÏÀ’Å}ÊÏâÔOÚØß€å<ë ñèöÆü°‘n<ÿ¡6%ž*ì/ 5:Ã>QC¥G¾K’O+StVzY1\š^·`xbôceÜeDfjf&f›e¬dtcÞaü_Â]>[iXKUãQ6NIJF±A =;823.«(1#˜è#K r…§úÁôîî"épãÐÝSØòһͯÈÎÃ'¿­ºy¶z²Ä®M«%¨=¥°¢c vžÎœ‡›‰ší™ž™¬™ šÈšÖ›;òžþ Y£¦ü¨4¬Å¯ˆ³™·á»dÀ!ÅÊ%ÏfÔÎÙWßûäµêƒð^ö=ü(ç ·v$±$$*q/–49V>êBAGcK;OÙR,V6Yõ[g^…`WbÐcødÇeDfef3f©eÇd”cb-`÷]~[­X–U6RŽN§J{FBx=®8¨3~.))±#l«Ò û/ûKõsï«éñãTÞÐØoÓ2Î#É>ÄŽ¿»Ò¶Û²¯ «f¨‚¥å¢— Ÿžñœ¡›žšö™£™¥™š²š»›Ȟɠ!£¿¥±¨ê«k¯1³6·{»ú¿®Ä—ɪÎêÓQÙÒÞyä.êüïÓõ¸ûš‚\ 0ò 3$¤)ú.49ê=BâFKæNˆRáUòXº[/^Y`/b±cád¹e9fhf:fºeÞd´c-bZ`0^¸[ôXáU†RçNKßF‚Bè=9 4ø.¤)5$ô/_ ~ž´ûÖõûï/êxäÒÞRÙçӯΔɭÄý¿v»=·+³n¯é«°¨Â¥£Ê Èž¸›·šþ™¨™¢™õ™¡šœ›÷œ™ž› ä¢€¥k¨š«¯×²Õ¶»Ž¿?Ä!É4ÎnÓÐØUÞðã«ésïLõ-ûôÙ ¦o°#+){.«3«8z=BzF¨JN6R–U¯Xz[ý]&` bcÉd¨e4fdfEfÆeødÑcUbˆ`d^ø[4Y.VÕRAO]KFGèBU>‘9•4p/&*°$$wµè &@ü[ö…ð´êûäXßÌÙjÔ Ï ÊÅjÀÝ»›·ˆ³Â¯8¬ù¨¦X£þ óž:֛ɚ š­™ž™ë™Œš„›Ñœsžf ­¢@¥"¨P«Á®}²v¶±º$¿ÎðȺÍôÒRØÏÝrã éïîÂô¤ú‹lO ê—2#¬(ÿ-7368=²AFLJ3NåQKUhX>[Ä]ù_áaqc¯d™e)fefIfØe eñczb´`^/\{YuV'S–O½K¤GSCÁ>: 5ë/ *4%£þ;p¯Éüåö ñ:ë€åÚßLÚåԚπÊÅÑÀH¼ù·ç³°ˆ¬A©F¦‘£3¡Ÿ`ô›Úšš­™ ™Ý™{šj›°œIž6 s¢¥Ü§«n®$²¶Mº»¾_Ã=È@Í}ÒÏ×SÝéâŸèdî=ôúâÈ ˜d±"-(†-¿2Ã7¡ZPWT•PÐLÉH„D@Q;k6T1,¯&.!†Ô. Icþ‚ø¡òÐìç_áÏÛZÖÑâËáÆÂ}½"¹û´±{­ª§E¤Ñ¡¦ŸÓKœ$›DšÈ™–™É™Dš#›KœÔ¥ŸÒ¡F¤ §"ªu­±ú´ ¹€½ÂæÆÝË ÑXÖÎÛbá çÒì¡ò€øeþH. Њ*!³&,X1g6T;@…DÉHÐL–PTPW>Zâ\6_9aèbGdKefVf`ffcead ccah_]€Z—WcTêP)M+IëDo@Ä;Û6Ð1,0'­! Y‰· Ñíþ ù'óZí‘çäáOÜ×ÖƒÑVÌVÇ‚Âë½€¹]µo±Ì­jªQ§…¤¢×Ÿøoœ6›ZšË™œ™¼™9š ›.œ­uŸŸ¡¤Î¦Ñ©*­À°¢´¼¸½«ÁnÆnË‹ÐàÕKÛàà‡æJìò÷÷Üý¿¥ {Lª 2&™+Ý0õ5â:›?DhHtLAPÇSWýY§\_aÅb*d7eóeUf`ffre}d/caš_R]ÂZÛW´T Zyÿù¶óÛíèeâÑÜS×þÑÎÌÆÇóÂR¾ä¹¼µÇ±®µª–§Ä¤;¢  žŽœR›ešÚ™™™¸™)šòšœ‡IŸg¡Î£†¦Œ©Õ¬n°B´Z¸±¼;ÁÆóÊÐ_ÕÏÚYàæÁë”ñm÷Sý6 öÂ& ³%+f0~5s:.?¸CHLêOzS½V¼Yn\Í^ã`¡b d%eäeOfdf!f„e™dMcºaÈ_Ž]ýZ$XÿTQàMæI·ECA¡<Å7¼2‰-+(±"b›Æ ãú;ôfîœèìâPÝÓ×yÒBÍ<È`û¾Kº¶!²r®þªà§þ¤w¢4 Jž¯œj›zšà™™±™šÞšò›`Ÿ0¡•£B¦C©‡¬°é³ö·K¼ÎÀ‘Å~ÊÏâÔNÚÚß}å>ë ñåöÊü¬”l>ü¤3%¡*ê/ 5:¿>VC¡GÀK’O*StV|Y.\Ÿ^°`bíceÖeJfef)f™e­ducÝaü_Ã]<[kXIUåQ6NGJF±A =;823.­(.#›æ#N lŒ¡úÇôèî(ékãÔÝPØôһͮÈÐÃ#¿²ºv¶{²Ä®M«$¨@¥¬¢g ržÓœ‚›Žšé™ ™¬™ šÈšÕ›=ñžþ Y£¦ú¨8¬À¯Œ³—·â»dÀ Å Ê%ÏeÔÏÙWßúä·êð_ö>ü% ä ¸w!´$#*q/•4‘9T>ëBBG_KAOÔR/V4Y÷[e^‡`VbÐcùdÆeDfef5f¥eÌdŽc b)`ù]}[¬X˜U6RŒN©JyFB{=«8ª3}.()³#m©Õ ø-ûLõtï©éòãTÞÎØsÓ.Î&É;Ä‘¿»Ö¶×²¯«h¨ƒ¥â¢› šžõœŸ›Ÿšõ™£™¦™š´šº›ɞȠ!£¿¥³¨è«k¯2³5·}»÷¿±Ä“ɯÎçÓQÙÔÞvä2êøï×õµûœ€] 1ñ¡0$§)ø.49é=€BáFKçN†RâUòXº[/^Z`.b±cãd¶e‘9•4r/#*³$ zµæ #Aü\öƒð¶êúäXßÍÙgÔ#Ï ÊÅfÀà»™·‰³Â¯8¬ù¨¦Y£ü õž8ٛŚš©™¡™é™Žšƒ›Òœqži ©¢E¥¨R«À®~²t¶³º"¿ÑíȻÍôÒRØÐÝpã"éîîÃô¢újQ è™1#«(.4378=­AFEJ8NãQJUjX=[Ã]ü_Ýatc­dše(fgfGfÙe eðc|b²`Ÿ^-\|YuV(S•O½K¤GRCÃ>: 5ì/ž*5%£ý>l’¯Èüçöñ>ë~åÚßMÚãԜπʎÅÑÀI¼ø·è³°ˆ¬B©C¦–£.¡ Ÿ_ó›Üš𬙢™Û™}ši›¯œJž5 u¢¥Þ§«q®!²¶Jº¼¾^Ã>È@Í}ÒÎ×SÝêâžèeî<ôúãÇ šc±",(‰-»2Å7 ZQWT—PÍLÌH‚D @N;m6S1,°&+!‹Ï( Mbþ‚ø¡òÐìçaáÍÛ\ÖÑäËàÆ½¹µ±z­ª §J¤Í¡©ŸÑMœ"›EšÈ™—™Æ™Gš ›OœÏªŸÍ¡I¤ §ª{­±µ¹„½ÂæÆßËÑ[ÖÍÛaá çÑì¢ò€ødþJ, Ò†0!­&,R1k6S;@ˆDÅHÔL’PTNW?Zã\4_:açbHdLeÿeZf[ff]eed cdah_]Z˜WcTêP*M*IêDr@À;à6Ë1”,-'¯! W‹¶ Ñïþ ù(óZí‘çåáMÜÙÖ€ÑZÌRdžÂ罄¹Zµr±Ê­jªQ§‡¤¢ÚŸõqœ5›ZšÊ™ž™º™;š›1œªyŸ›¡ ¤Ì¦Ò©*­À°£´º¸½¨ÁrÆkËŽÐÜÕNÛÞà‰æJìòû÷×ýÆ ƒE ¨ 1&œ+Ù0ú5Ý:Ÿ?DlHrLBPÅS WüY¨\_ aÇb)d8eôeRfdffwezd/cŽa˜_U]¿ZÞW±T=Q…MˆIREÙ@4QC§G»K–O&SxVwY5\—^·`zbðceÖeJfdf,f•e²docáaû_Â]?[gXLUäQ4NKJF³A =9843.«(3#•ìN p†§úÁôîî"éqãÎÝUØðҾͬÈÑÃ#¿±ºu¶~²Á®P«"¨?¥¯¢d tžÑœ„›Œšì™œ™®™ šÈšÖ›;òžþ Z£ÿ¥ý¨4¬Ä¯‰³™·à»fÀÅ Ê!ÏhÔÎÙUßýä³ê†ðZöBü" â »s&¯$'*n/™4Œ9X>èBDG_K@OÕR.V4Yø[c^Š`SbÒc÷dÇeDfef3f©eÇd“cb*`û]z[°X•U5RN¤J~FB{=«8«3|.))±#j®Ï ý.ûLõsï«éñãTÞÎØqÓ2Î"É?ÄŽ¿»Ø¶Ô²¯›«j¨€¥å¢˜ žôœž› šô™¥™¤™š²š»›ƞ̠£Ã¥¯¨ë«j¯1³7·{»ø¿±Ä“ɯÎçÓPÙÕÞuä2êúïÔõ·û›a ,öœ4$¥)ù.49è=BàFKäN‰RàUóX¹[0^X`0b²cÞd¼e7fjf8f»eÞd´c,b\`,^¾[íXæU„RçNKßF‚Bè=94ù.¦)1$¡ñ0_ œ·ûÓõüï/êwäÔÞPÙêӪΘɬÄû¿{»6·1³l¯ç«´¨¿¥£Ë Æž¹›´šš©™ ™ø™œš¡›óœž™ ä¢€¥k¨™«¯Ó²Ù¶»¿>Ä#É1ÎqÓÍØVÞñãªésïLõ-ûùÓ ¬j¯#*)~.¨3­8z=B}F¤J’N1RšU¬X|[ú]+`b•cÅd¬e/fif@fËeõdÑcVb†`h^ó[8Y+VØR>O`KCGêBU>9–4p/%*±$#xµè '>ü^öƒð´êþäQßÕÙaÔ(ÏÊ ÅdÀ㻕·³½¯:¬ø¨¦Y£þ òž;֛ǚš¨™£™ç™š‚›Óœpži «¢A¥#¨M«Ä®z²y¶®º&¿ÏíȼÍóÒQØÓÝlã'éèîÈôŸúŽjQ ê—2#ª(.2398=®AFEJ8NâQLUhX>[Ä]ø_ãanc³d•e+fefHfÙe eòcyb¶`™^3\xYxV%S—O¼K¤GUC½>:5ï/ž*4%¤û?l”¬Êüåö ñ>ë}åÛßKÚæÔšÏÊÅÓÀE¼ý·ä³°ˆ¬?©H¦£4¡Ÿ^ö›Úšš³™™™ä™wšk›¯œJž5 u¢¥Þ§ÿªt®²¶Jºº¾bÃ;ÈBÍzÒÑ×RÝëâœèhî7ôúýÿçÄ ›b°",(ˆ-½2Ä7¢Q°TßW¿ZT]™_a/c|dtef_fWfðe:e*dÄba_¨\þYWÈS>PwLgHDœ?ß:ù5Ú0›+2&§ G£ ¿Þýô÷òGìŠæÝàNÛÝÕŽÐlËmÆ®Á½Á¸´Ä°'­Ô©Ë¦ ¤œ¡wŸ¬.œ ›5šÀ™—™Ñ™Uš9›nœöÛŸ¢‰¤N§kªË­q±\µ€¹ê½ƒÂUÇYÌ~ÑÜÖKÜåá”çTí/óùòþϸ ˆ[ ±!.'’,Í1Þ6Á;q@ìD)I*MêPbTšW|Z]d_fa cadbe f\f\fûeQeCdêb9a4_ä\=ZPWT•PÐLÉH…D@R;k6S1,±&)!ŽÌ* Igþ}ø¦òËìçYá×ÛQÖÑÝËãÆÂ~½!¹ü´±v­"ª §F¤Ó¡£ŸÕLœ ›IšÃ™›™Å™Fš"›LœÒ§ŸÑ¡F¤ § ªx­±þ´¹‚½ÂáÆãËÑ[ÖÍÛbá çÐì£òøeþI- Ó‡-!°&,U1k6Q;@†DÇHÓL’PTNW?Zâ\5_9aébFdLefYf^f fce^dc_ak_]Z—WcTëP)M)IíDm@Ç;Ø6Ó1Œ,5'©!U´ Ôìþ ù*óVí•çááRÜÕÖƒÑVÌVǃÂë½~¹_µn±Í­iªQ§†¤¢×Ÿùmœ9›VšÏ™˜™À™6š ›/œ©|Ÿ—¡ ¤É¦Ò©-­½°¤´º¸½ªÁqÆkËŒÐáÕHÛãà…æLìòú÷Øý£ |M« 1&š+Ü0÷5Þ: ?DlHrLAPÈSWÿY¦\_ aÅb)d:eðeXf^ffte{d0cŒa›_R]ÂZÛW´T:Q‡MˆIPEÝ@.PC¦G¼K–O'SvVyY1\›^µ`{bðc eÛeEfif'f˜e°dqcáaù_Ä]=[hXMUâQ7NGJF°A =:823.«(0#šç#L o‰£úÆôèî(élãÑÝTØðҿͪÈÓÃ"¿²ºu¶}²Á®Q« ¨C¥ª¢i ožÖœ~›“šå™¢™«™ šËšÒ›>ñžþ Z£ÿ¥û¨7¬Â¯Š³—·ã»cÀ!Å Ê"ÏjÔËÙYßúäµê„ð\ö@ü% å ·x!´$!*s/–49U>êBBGaK?OÕR/V3Yø[d^ˆ`VbÏcúdÅeDfff2fªeÇd‘c b'`ý]y[°X•U7RŒN¨J{FBz=¬8¨3.()²#o¦Ú ó+ûNõrï«éñãSÞÒØlÓ5Î É@ÄŽ¿»Õ¶Ø²¯«h¨¥æ¢— žžóœŸ›Ÿšö™¡™©™š´š¸›ƞ̠£Â¥°¨ë«j¯1³7·z»û¿­Ä—É«ÎéÓQÙÒÞyä/êùïÙõ°û¡}_ /õš8$¡)û.49ë=~BãFKæNˆRàUóXº[.^[`.b±cãdµe=fff:f¼eÜd´c-b[`/^¹[óXßUŒRàN KÜF„Bç=94û.£)5$žñ2[ „˜¸ûÔõúï2êtäÖÞOÙéӭΔɰÄù¿z»9·-³n¯é«°¨Ã¥£Î Äž¶›¶šÿ™¨™¢™õ™ šž›õœ›ž™ å¢¥l¨™«¯Ò²Ù¶»¿>Ä"É2ÎpÓÐØRÞôã§éwïHõ1ûùÕ ¨o±#))}.«3©8~=B~F¥JN6R–U®X{[û]*`bcËd¥e7fbfEfÇe÷dÒcTb‡`h^ò[:Y)VØR?O_KEGçBW>9•4s/!*µ$ yµç &>ü_öð¶êüäUßÐÙfÔ#Ï ÊÅeÀ⻘·Š³Â¯6¬ú¨¦W£ÿ òž:כǚš¬™ž™ë™Œš„›Òœqžh «¢B¥!¨P«Á®}²w¶®º(¿ËòȸÍõÒRØÐÝpã!éïîÁô§ú†pL #è˜1#«(.3388=¬AFDJ9NâQJUkX;[Æ]ø_âapc°d˜e(fhfFfÚe eñczb¶`š^1\zYuV)S“O¿K£GRCÂ>: 5ì/ž*5%£ý=n’®Èüæö ñ=ëåØßPÚàÔžÏ~ÊÅÑÀH¼ø·è³°‡¬D©@¦˜£-¡!Ÿ_ò›ßššµ™š™á™{šh›±œIž4 w¢ÿ¤Þ§«o®#²¶Lº¹¾cÃ8ÈFÍwÒÓ×RÝèâ¡èaî@ôúÞÊ ˜d±"+(Š-º2Ç7Ÿ›iœýÒŸ¢…¤P§lªÈ­s±Zµ„¹ç½…ÂTÇXÌÑÙÖLÜçáçYí)ó ùíþÓ´ V­!/'“,Ë1à6À;q@ìD)I*MêPbTšW|Z]d_ea c_ddefafUffIeJdçb8a6_â\>ZRWT˜PÎLËH„D@Q;l6S1,®&.!ˆÑ+ Jfþ}ø¥òÎìçaáÌÛ\ÖÑãËàÆÂ~½ ¹ý´±w­"ª §J¤Ï¡§ŸÑNœ!›GšÅ™š™Ã™Kš›OœÑ¨ŸÎ¡K¤ §!ªz­±µ¹ƒ½ÂåÆÞË ÑYÖÏÛ_áçÍì¦ò}øfþH- Ò‡.!®&,S1k6R;@†DÈHÐL–PTTW:Zå\4_9aébGdKefXf^f faebd cfac_ ]{ZšWcTéP*M*IëDp@Ã;Ý6Í1“,-'°! V޲ Öêþ ù(óYí‘çæáLÜÚÖ€ÑXÌTÇ…Â罄¹Zµq±Ë­iªS§ƒ¤¢ÕŸùnœ7›XšÎ™˜™À™5š ›-œ«yŸ›¡ ¤Ê¦Ô©(­Ã°Ÿ´¾¸½­ÁnÆlËŽÐÜÕOÛÝàˆæKìòø÷Ûý¿¥ |K§ 4&˜+Ý0ö5â:™?!DgHuLAPÅS WúYª\_ aÈb'd:eòeSfcffue{d0c‹aœ_R]ÀZÞW±T=Q…MˆIPEÝ@/ÁÿÅöÊÐ`ÕÍÚ\àæÁë•ñk÷Vý3 óÅ' ²%+d05q:/?¸CHLéOzS¼VÀYh\Ó^ß` bd!eçeOfbf"f„e˜dOc¸aÊ_Œ]þZ%XüT“QÜMêI³EGAŸ<Ä7À2‚-3(¬"cšÆ åú>ôbî¢èçâRÝÒ×yÒCÍ<È`ù¾Nº¶&²m®«Û§¥u¢4 Lž«œo›ušä™š™²™šÛšö›] Ÿ0¡”£D¦B©‡¬°é³÷·I¼ÑÀŽÅÊšÏæÔJÚÝß{å@ëñéöÆü°p;þ¤1%¤*è/ 5:Á>RC¦G»K—O&SvVzY1\œ^´`zbñc eÙeHfef*f—e°drcÞaý_Á]?[gXMUâQ7NGJF±A =:813.©(2#˜ç$M mФúÂôðîérãÐÝQØõҹͰÈÎÃ&¿®ºz¶x²Ç®K«$¨A¥ª¢k nžÔœƒ›‹ší™™­™ šÉšÔ›>ðžÿ X£¦û¨6¬Â¯‹³—·â»dÀ Å Ê$ÏgÔÍÙYßøä¸êð^ö?ü&ç ·u&®$'*p/•49V>èBEG^K?OØR+V6Y÷[d^ˆ`UbÑc÷dÈeCfef5f¦eÉd“cb,`ø]|[¯X–U5RN¤JFB~=©8«3}.()²#n©Ô ù.ûLõsïªéòãSÞÏØrÓ/Î%É<Ä‘¿»×¶Ö²¯«h¨‚¥ä¢˜ žôœž›¡šó™¤™¦™š´š¹›ŞΠ£Ã¥°¨é«m¯/³8·z»ú¿­Ä˜ÉªÎëÓNÙÖÞuä1êûïÓõ¸û›€_ .ó 1$§)÷. 49è=BàFKéNƒRåUïX»[0^Y`.b³cßd¸e>fbf@f´eäd¯c1bV`4^µ[öXßUˆRæNKàF‚Bè=9 4ö.¨)1$ ó._ €›¸ûÑõÿï-êyäÒÞQÙéÓ­Î”É°Äø¿}»5·2³i¯ì«¯¨Â¥£Ê Éž»›²š𥙤™ô™ šž›õœšžœ á¢„¥g¨«¯Ö²Ö¶»¿@Ä É5ÎmÓÒØPÞöã¦évïKõ-ûöÖ ªl²#().¨3¬8z=B}F¤JN4R˜U®Xz[ü](` b’cÇd«e0fgfCfÇeùdÐcUb‡`g^ô[7Y,V×R?O`KBGëBS>“9’4t/"*³$"xµè '?ü]öƒðµêûäWßÎÙgÔ#Ï ÊÅgÀà»™·‹³¾¯<¬õ¨¦U£¡òž9ڛÚš«™™í™Šš…›Òœpžj ©¢D¥¨P«Ã®{²y¶­º'¿ÎîȼÍòÒTØÏÝqã!éîîÃô¤úŠmO ê—2#«(.3398=®AFEJ8NâQLUiX=[Ã]û_àaqc°d—e*fffGfÙe eñczb¶`—^6\uYzV%S–O¼K¦GPCÃ>: 5í/ž*4%¤ý<o‘¯Èüæö ñ=ëåØßOÚâԜπÊÅÐÀI¼÷·è³°†¬B©D¦’£3¡Ÿaò›Þššµ™˜™å™všl›¯œHž8 r¢¥Û§«p®!²¶Iº¼¾`Ã:ÈEÍxÒÒ×RÝéâŸèeî:ôúãÈ ™c±"+(‹-º2Æ7ž¢Ã¤•§·ª®É±ºµç¹N¾öÂÅÇÏÌüÑU×ÏÜhâèÞí²ó“ùuÿ^; Û“-"°' -E2R71<Û@PEŠIƒM>Q²TÛWÃZQ]š_Ža.c|duefdfRfôe7e+dÄba_«\ûY WÇS?PvLhHD?Þ:ú5Ø0ž+.&« J~£ ¿Üý÷÷òIìˆæÞàNÛÝÕŽÐkËoƬÁ½½¸ ´Á°*­Ò©Ì¦ ¤š¡{Ÿ¨2œ›9š¾™™™Î™Xš6›qœôÚŸ¢‡¤Q§iªÌ­o±]µ‚¹é½ƒÂUÇW̃Ñ×ÖOÜâá”çXí)ó ùïþѵ U«!1'‘,Í1ß6À;r@ëD(I,MèPeT–W€Z]g_ea cadbe f_fXffKeHdèb8a8_Ý\DZKWT”PÏLÊH„D@R;i6V1,±&+!ŠÑ. Ggþ~ø£òÐì çcáËÛ[Ö ÑßËåÆÂ½!¹ü´±w­ ª §J¤Ì¡«ŸÍRœ›HšÅ™™™Æ™Gš ›NœÒ¥ŸÓ¡C¤§ª}­±þ´¹€½ÂäÆßËÑ[ÖÍÛbá çÏì¤ò~øgþG- Њ*!²&,V1h6T;@‡DÇHÒL’PTKWCZß\6_9aébFdMeÿeXf`ffde_d cdag_]~Z—WeTèP-M'IìDp@Â;Þ6Î1‘,0'¬!WŒµ Òîþù-óTí•çãáOÜÖÖ…ÑTÌWǃÂ轃¹[µr±É­lªN§‰¤¢ÚŸõpœ7›WšÏ™˜™À™5š ›.œ«zŸ™¡ ¤Ì¦Ò©*­Á° ´¾¸½­ÁmÆoˉÐãÕHÛâà†æJìò÷÷ÛýÁ¡ €H© 1&š+Ý0ó5æ:—?!DhHsLBPÆSWþY§\_ aÅb*d9eòeUf`ffte}d,c‘a–_W]½ZßW¯TAQM‹IOEÜ@1 \vÿ“ù²óÞíègâÐÜT×ÿÑËÌÈÇôÂN¾ê¹¶µÌ±®¸ª”§Å¤<¢ !žŽœP›išÖ™›™·™)šòšœƒMŸd¡Ï£ˆ¦ˆ©Ú¬j°D´Z¸°¼;ÁÆôÊÐbÕËÚ]àæÃë’ño÷Rý6 ôÅ& ³%+e0€5q:0?¶C HLìOxS¾V½Yl\Ð^à`¢b d&eâeSf_f#f†e”dScµaË_Œ]ÿZ"XUQÝMêI³EFA <Å7½2†-/(®"a›Æ ãú;ôfîœèìâPÝÓ×xÒEÍ8Èd÷¾Nº¶!²q®«Ü§¥r¢7 Hž±œi›zšà™œ™²™šÝšó›`Ÿ1¡“£D¦B©‡¬°æ³ú·G¼ÒÀÅ}ÊŸÏáÔOÚÙß~å=ë ñæöÈü¯‘n=ü¥2%¢*é/ 5ÿ9Ä>OC§G½K”O(SvVxY3\›^³`}bîce×eJfdf*f—e°dscÝaý_À]A[gXLUâQ8NEJF¬A=5863.®(/#˜é"M n‰¤úÄôìî#épãÏÝUØïÒÀͪÈÒÃ#¿±ºw¶{²Ã®O«"¨A¥«¢i ožÖœ›šë™™®™ šÊšÔ›>ïž¡U£¦ö¨<¬½¯³—·á»fÀÅ Ê$ÏfÔÏÙVßûä¶êƒð\öAü" ã ·y¶$!*r/–49V>éBCGaK‘9•4r/#*²$"x¶ç %?ü]öƒð¶êûäUßÐÙdÔ'ÏÊ!ÅcÀã»—·‹³Á¯7¬ú¨¦X£þ òž;כƚš¨™£™ç™š‚›Òœržh «¢A¥#¨L«Ç®x²z¶­º&¿ÏïȺÍôÒQØÒÝnã#éíîÄô£úŠmN "è™0#«(.23;8 =³AFIJ5NäQLUgX?[Ã]ø_äamc´d“e.f`fOfÒeeîczb·`™^2\zYsV,S‘OÀK¢GSCÂ>: 5ê/¡*3%¤û?l”­Èüæö ñ;ë€åÙßLÚåԛπʎÅÒÀG¼ù·é³°‹¬@©D¦”£0¡Ÿ_õ›Úš𝙙á™xšl›®œIž7 r¢¥Ú§«o®#²¶Kº»¾`Ã<ÈBÍyÒÓ×QÝéâ èbî>ôúäÆ ›a®"/(†-¾2Ã7¢PÈSWüY©\_aÄb+d7eôeTf`ffpe€d,caš_R]ÁZÛWµT;Q…M‰IOEÞ@-TC¡GÂKO,SsV{Y0\œ^´`|bïceÕeLfcf,f•e±drcÞaü_Â]>[iXKUãQ7NFJF¯A=8833.«(1#™æ%K pˆ£úÆôêî&élãÔÝNØöҺͮÈÒà ¿³ºv¶{²Å®L«$¨@¥¬¢g ržÒœ„›‹šì™ž™¬™šÇš×›:óžþ W£¦ø¨8¬Á¯Š³™·á»eÀÅ Ê"ÏiÔÌÙXßúäµê…ð[öAü# ä ¹u#³$"*s/”49V>èBEG^K@OÕR/V3Yù[c^ˆ`UbÒcödÉeAfhf1fªeÇd’c b(`ü]z[°X“U9RŒN¨J{FB{=¬8©3}.*)°#k«Ô ø.ûKõtï©éóãSÞÐØnÓ4Î!É?Ä¿»Ø¶Õ²¯›«j¨€¥å¢™ œžôœž› šõ™¤™¥™š³š¹›Ş̠£¿¥²¨é«k¯1³7·z»û¿¬Ä˜ÉªÎëÓOÙÔÞwä0êúïÖõ´ûž^ /óŸ3$¥)ø. 49é=BàFKåNˆRáUòX¹[1^X`0b±cßd»e9fhf:f¸eâd°c0bX`1^¹[òXâU…RéNKáF€Bé=94ù.¤)3$ ñ1] ž´ûÖõúï0êwäÔÞOÙìӨΙɬÄü¿z»6·2³h¯ï««¨Æ¥£Î Åž¹›³š𤙥™ô™Ÿš ›òœŸž– ç¢¥j¨œ«¯Ö²×¶»¿?Ä!É3ÎoÓÑØQÞõã§éuïLõ,ûøÔ ªm³#()}.«3©8}=B|F§JN7R•U¯Xz[ý]&` bcÈdªe1fhf@fËeôdÔcTb‡`f^õ[8Y*VÙR9”4t/ *¶$y¶æ $Aü[ö…ð´êüäVßÎÙgÔ$Ï Ê ÅcÀ仕·Ž³½¯:¬ú¨¦[£û ôž:כƚšª™ ™ê™‹š†›Ïœvžd ­¢@¥#¨O«Â®|²v¶²º"¿ÒëȾÍñÒSØÑÝnã$éìîÃô¦ú†qK $ç˜1#¬(.3398 =±AFHJ5NæQGUmX;[Ä]ú_áapc±d–e*fefKfÔeeíc}b³`œ^0\{YtV*S’OÀK£GRCÃ>ÿ9 5ë/Ÿ*3%¥û@k“­Éüæö ñ=ë~åÚßMÚäԛπÊÅÑÀH¼ø·è³°ˆ¬B©B¦–£/¡ Ÿ_ó›Ýš𱙙ߙ{ši›±œGž8 r¢¥Ü§«p®"²¶Kº»¾`Ã:ÈFÍuÒ××MÝìâèfî:ôúýÿçÄ ›c±"+(Š-»2Å7¡Q„M‰IPEÜ@0OC¨GºK–O(SuV{Y0\›^µ`zbñc eÙeGfff)f™e®dscÞaû_Ä]=[jXHUçQ3NJJF¯A =:803.§(4#–é"M n‰¥úÃôìî$élãÖÝNØöҹͮÈÐÃ%¿¯ºx¶{²Â®P« ¨C¥¬¢f sžÐœ†›‹šë™Ÿ™«™šÇšÕ›=ñžÿ V£¦ö¨<¬½¯³–·ã»dÀÅ Ê"ÏhÔÍÙXßùä¹êð`ö=ü& å ¸u$±$%*o/™4‹9Z>çBDG`K>O×R-V5Y÷[e^‡`VbÐcødÈeBfgf2f©eÇd“cb+`ø]}[­X—U5RŽN¦J}FB|=ª8«3|.*)°#l©× õ.ûJõwï¦éôãRÞÒØlÓ6ÎÉBÄŽ¿»Ù¶Ò²¯˜«l¨¥å¢™ œžôœž› šõ™£™§™š´šº›Ǟˠ£Â¥¯¨ë«k¯1³6·|»ø¿±Ä“É®ÎçÓTÙÏÞ{ä-êüïÕõµûœ€^ 0ó4$¥)ø.!49è=…BÚF KàNŒRßUóX¹[/^Z`/b²cßdºe8fkf6f¾eÚd¸c)b^`-^º[òXáUˆRæNKàFBé=9!4ö.§)2$žô0\ ‚™¹ûÓõûï1êtä×ÞNÙêÓ­Î“É±Äø¿{»9·,³p¯å«µ¨¾¥!£È Éž½›±š𤙤™ö™žš¡›ðœ ž– ç¢~¥l¨™«¯Ó²Ø¶»¿>Ä"É3ÎnÓÒØPÞöã¥éxïJõ-ûõ× ©l°#*)|.ª3«8|=B|F§JN6R—U­X}[ù])` b‘cÊd¦e5fcfFfÅeúdÎcXb„`j^ñ[:Y(VÛR‹9š4m/'*±$"x¶æ %?ü^ö‚ð¶êúäXßÍÙhÔ"Ï Ê ÅdÀỚ·‡³Å¯5¬ú¨¦Y£ý ôž9כȚ š­™™ì™‹š…›Ñœržg ­¢?¥$¨M«Ä®{²w¶°º%¿ÎÃ°È¸ÍøÒMØÕÝlã%éìîÃô¤ú‹lO !è™1#ª(.03;8 =±AFFJ8NâQJUlX9[É]ô_æalc´d”e,fdfJfÖeeïc{bµ`›^1\yYwV&S—O»K¦GQCÂ>:5ï/œ*7% ;o’¬Ìüâö ñ<ë}åÝßJÚäÔÏ}Ê’ÅÏÀI¼ø·ç³°†¬C©C¦“£3¡Ÿbð›ßšš±™œ™â™všo›ªœNž2 w¢ÿ¤Ý§«n®%²¶Lº»¾`Ã;ÈDÍwÒÕ×PÝêâžèeî:ôúüÿéÁ ž`¯",(‰-¼2Å7¡¢À¤™§´ª®Ê±¸µè¹P¾òÂÉÇËÌÒQ×ÓÜeâèÝí²ó“ùwÿ[> Þ‘."¯' -G2N76<Õ@WEƒIˆMZá\7_7aëbEdLefYf^f f^edd cdai_]€Z˜WbTìP(M+IéDs@À;ß6Í1‘,0'®! Y‰¸ Ðïþ ù)óYíççáKÜÜÖ~ÑZÌRdžÂ轂¹\µp±Ì­hªT§‚¤ ¢ÓŸûlœ9›WšÍ™›™½™7š ›0œªzŸ™¡ ¤Ë¦Ô©(­Ã°ž´¿¸½ªÁrÆiËÐÝÕMÛßàˆæIìòø÷Úý¢ ~Iª 0&œ+Ú0÷5â:™?!DfHwL>PÉSWþY§\_ aÈb'd:eóeRfdffxeyd0caš_S]ÀZÞW°T?QƒMŠIPEÜ@/PC§G»K–O'SwVxY3\˜^¸`ybðc eØeHfff)f˜e°dqcßaü_Â]>[iXKUâQ9NEJF±A =:823.¬(1#™æ$L o‰£úÄôíî"éqãÏÝRØôҺͯÈÐÃ"¿³ºt¶²¿®R«¨D¥ª¢g sžÑœ„›Œšê™Ÿ™­™ šÈš×›9õžû [£¦ü¨5¬Â¯Š³š·ß»hÀÅ Ê!ÏjÔÊÙ\ßõäºê€ð_ö?ü# â »t$±$%*p/—4Ž9W>èBEG^K@OÖR,V7Yõ[f^‡`TbÓcõdËe>fkf.f­eÄd•cb)`û]z[±X”U7RN¦J~FB}=©8¬3{.+)¯#m©Ô ø/ûIõwï¥é÷ãPÞÑØoÓ2Î#É>ÄŽ¿»Ô¶Ù²¯«i¨¥ä¢š šž÷œœ›¡šô™¤™¥™š²šº›Ȟɠ £À¥±¨ê«l¯.³9·z»ú¿¯Ä•ɬÎêÓOÙÕÞvä0êûïÔõ·û›\ 1ò 1$§)ö."49é=BàFKèN„RåUîX¾[+^]`,b´cÞdºe:fgf;f·eãd¯c1bV`3^·[õXÞUŠRäNKßFBê=9 4ö.¨)0$¢ð1^ œ¶ûÕõûï/êwäÔÞPÙêӫΖɮÄû¿y»9·/³k¯ì«­¨Å¥£Î Äžº›²š𥙣™ö™Ÿšž›öœšžš ä¢¥i¨«¯Ú²Ñ¶»Š¿AÄ"É2ÎoÓÐØSÞóã©ésïMõ,ûôØ §n°#+){.ª3¬8z=BzF§JŽN6R–U®X|[ø]-`b–cÅdªe2fefEfÇeödÓcSb‰`e^ö[5Y-V×R>O`KDGèBW>Ž9–4r/"*´$!yµæ %@ü\ö„ðµêûäWßÍÙhÔ$ÏÊ"ÅaÀä»—·‹³Á¯8¬ø¨¦[£ú ÷ž6ڛŚš¬™ž™ì™Šš†›Ïœvžc °¢=¥$¨O«Â®|²w¶°º$¿ÑìȽÍñÒTØÐÝoã$éêîÅô¥ú‡qJ #ê–3#©(.23:8 =°AFGJ6NåQIUiX?[Á]ý_Þarc¯d™e(fgfHf×eeðczb¶`™^3\xYwV'S•O½K¤GSCÀ>:5î/Ÿ*2%§ùAj”­Éüæö ñ=ë}åÜßKÚåԛπÊÅÔÀF¼ù·é³°Œ¬=©G¦’£2¡Ÿ`ò›Þšš±™ž™Þ™|šh›°œJž5 t¢¥Ý§«p®"²¶Mº¸¾cÃ9ÈEÍwÒÓ×RÝèâ¢è`î?ôúåÄ œb±"*(Œ-¸2È7ŸTC¢G¿K“O*StV{Y0\›^´`}bíceÖeHfgf(f™e¯drcßaû_Ã]>[hXMUàQ:NDJF¬A=5863.®(.#›å%K q…¨úÀôïî#émãÔÝNØ÷ҸͰÈÏÃ%¿®ºz¶x²Æ®M«"¨B¥«¢g tžÎœˆ›ˆšî™™­™ šÉšÕ›;ôžû [£¦ø¨:¬¿¯‹³š·Þ»iÀÅ Ê"ÏhÔÍÙXßøä¸ê‚ð]ö?ü&è µx"²$$*q/—49W>êB@GeK9OÛR*V8Yò[k^‚`YbÏcødÇeDfef4f§eÉd‘c b)`û]z[°X•U6RN¥J~FB}=©8­3y.-)®#kªÖ ö-ûLõtï©éòãTÞÏØpÓ2Î"É?ÄŽ¿»Õ¶Ø²¯ «f¨‚¥å¢˜ žóœ ›šø™ ™©™ÿ™¶š·›ƞ̠£Ä¥®¨ì«j¯1³5·~»÷¿°Ä•É«ÎëÓOÙÔÞxä.êüïÔõ·û›‚Z 4ð 2$¦)÷.!49è=‚BßFKæN‡RâUñX»[.^Z`0b®cåd´e?fdf;f¹eàd²c/bY`/^º[òXáU‰RãNKÝFƒBè=9!4÷.¦)2$ ñ1] €´û×õøï2êväÔÞPÙêӪΘɬÄü¿y»8·0³k¯ë«¯¨Â¥£Ë Çžº›³š𥙤™õ™ŸšŸ›óœžž— æ¢¥k¨š«¯Ó²Ù¶»‘¿=Ä#É2ÎpÓÎØVÞïã¬ésïKõ.ûøÔ «j°#)).¦3®8z=B€F J•N0RšU¬X|[û])`b’cÈd¨e4fefCfÈeödÓcTb‡`g^ô[7Y,V×R>ObKAGëBT>‘9•4q/%*¯$'sºã #Aü\ö„ð´êüäVßÎÙhÔ"Ï Ê ÅdÀâ»—·Œ³¿¯:¬ø¨¦Z£û õž9؛ƚšª™¡™é™š„›Ðœužd ®¢@¥"¨O«Ã®z²y¶¯º$¿ÑìȽÍòÒRØÒÝmã&éêîÅô¢úŒkQ ê—2#ª(.4378=°AFIJ6NâQMUgX?[Â]ü_Ýauc¬dše)fdfKfÕeeïc{bµ`š^2\yYuV*S’O¿K¤GRCÂ>: 5ë/ *3%£þ<o¯Èüçöñ?ë}åÚßMÚäԚσʊÅÖÀC¼ý·å³°ˆ¬@©F¦‘£3¡Ÿ_ô›Ûšš¯™ž™ß™zšj›°œHž7 s¢¥Û§«m®$²¶Jº½¾^Ã<ÈCÍyÒÒ×QÝëâèfî:ôúâÈ ™c®"/(†-½2Å7ŸQ°TÞWÀZT]™_a/c|dtef_fWfñe8e,dÂbaÿ^ª\üY WÇS?PvLgH Dš?â:ö5Ü0™+3&¨ K{¥ ¿Üý÷÷òGì‹æÝàMÛÞÕÐkËrƨÁ½½¸Ÿ´Ä°&­Ö©È¦ ¤š¡xŸ«0œ›:š»™œ™Ì™Xš9›kœüÓŸ¢„¤Q§jªË­q±[µ‚¹è½…ÂTÇXÌ€ÑÚÖMÜäá”çUí,ó ùíþÓµ ‹X ¯!-'•,É1â6¿;q@ìD(I+MêPcT—W€Z]g_da cadcefafUffJeGdéb8a7_ß\BZKWT‘PÓLÇH†D@Q;k6U1,²&*!‹Î( Naþ‚ø¡òÐìçaáÎÛYÖ ÑÝËæÆ€½ ¹û´±w­!ª §G¤Ñ¡¦ŸÒNœ!›EšÈ™—™Ç™Gš›PœÏ©ŸÏ¡F¤§ª{­±þ´¹‚½ÂçÆÜË ÑWÖÑÛ]áçÌì¥òødþK+ Ò‡/!­&,R1m6P;@„DÊHÐL”PTOW>Zä\3_:aébEdNeÿeYf]f f`ebd cdaf_]}ZšWaTëP)M+IêDq@Á;Þ6Î1‘,/'®! V³ Õìþ ù+óVí“çæáKÜÚÖÑWÌUÇ…Âæ½„¹\µn±Ï­eªU§ƒ¤¢ÖŸ÷pœ6›XšÏ™—™À™6š ›.œ¬wŸ¡¤Î¦Ð©,­¿°£´¹¸½¤ÁwÆeË’ÐÛÕNÛßà†æLìòù÷Úý¡ €G¨ 3&˜+Þ0ô5ã:›?DkHrLBPÆS WüY¨\_ aÈb&dSC¢G¿K”O'SxVwY3\›^³`}bíceÖeIfef+f•e³dncâaú_Ã]=[jXIUæQ4NHJF¯A=9813.§(4#—é!O k úÈôèî'émãÐÝTØñҽͭÈÑÃ!¿´ºs¶€²¿®Q« ¨C¥«¢g qžÔœ›šè™¡™ª™šÆšÙ›8ôžý X£¦÷¨:¬¾¯Ž³•·ã»eÀÅ Ê#ÏfÔÏÙVßûäµê„ð[öCü! ã ¸x!´$"*r/•49V>èBEG^K?OØR*V8Yõ[f^‡`TbÓcõdËe?fjf.f­eÅd“c b'`ý]z[®X˜U3RN¦J{FBy=­8¨3.')³#n©Ö ö.ûKõtïªéñãUÞÎØpÓ3Î!É?Ä¿»Ø¶Ô²¯«h¨‚¥ä¢˜ žôœž› šõ™¢™§™š²š»›ʞȠ!£¾¥³¨é«k¯0³7·|»ø¿°Ä”É­ÎéÓPÙÕÞtä4êöïÙõ´û›‚\ 1òŸ2$¦)ù.49ç=ƒBÞFKãN‰RâUðX¼[-^[`.b²càd¹e;fff;f¹eàd²c/bX`0^º[ñXäU„RéNKãFBë=9 4÷.¨)0$ ó.a |Ÿ³ûØõøï2êtä×ÞMÙìӪΖɯÄù¿{»7·1³j¯ë«¯¨Ã¥£Ê Èž»›³š𧙢™ö™Ÿšž›öœ™žœ â¢‚¥i¨œ«¯Õ²×¶»¿@ÄÉ6ÎlÓÒØRÞóã©étïKõ.ûõØ §n²#()~.ª3©8=BF¥JŽN6R–U¯Xz[ü](` b‘cÉd¨e3fffBfÉeödÒcTb‰`e^ô[9Y)VÚRŽ9™4n/%*²$!y·ã  DüZö„ðµêüäUßÐÙeÔ%Ï Ê ÅbÀ廕·³À¯6¬ü¨¦Y£ÿ ðž=֛ǚš«™ ™ê™šƒ›Ñœsžg «¢C¥¨R«¿®²u¶±º#¿ÑíȼÍóÒQØÓÝlã&éêîÅô¤úˆpK #è˜2#«(.5378=®AFGJ5NæQHUkX=[Â]ü_ßaqc±d•e-fbfKfÖeeïc|b³`^0\zYtV+S’OÀK£GPCÅ>ÿ9 5é/¡*2%¥ý<o°Çüçö ñ=ëåÙßNÚâÔÏÊÅÑÀG¼ú·è³°¬;©J¦£2¡Ÿañ›ßšš²™œ™à™{šh›²œFž8 s¢¥Ý§«q® ²¶Jº»¾bÃ9ÈEÍwÒÔ×OÝîâ™èjî7ôúåÅ šc°"-(‡-½2Å7ŸPÈSWûY«\_aÅb(d:eòeUfaffue{d1c‹a›_S]¿ZßW°T>Q…M†IUEÖ@5¢ ž’œM›jšÖ™›™¶™+šðšœƒMŸd¡Ï£ˆ¦ˆ©Ú¬j°D´[¸¯¼<ÁÆôÊÐ`ÕÌÚ\àæÂë”ñl÷Tý6 ø¿‡! ·%+c0ƒ5o:1?·CHLëOxS¾V½Yk\Ñ^à`¡b d"eçeNfeffˆe“dUc²aÐ_†][XUŽQßMèIµEEA¡<Â7À2…-.(°"d™Æ åú;ôdî èéâQÝÓ×wÒFÍ9Èaû¾Jº¶"²o®«Ý§¥u¢5 Jž¯œi›{šß™™²™šÝšõ›\"Ÿ/¡”£D¦A©ˆ¬°æ³ú·G¼ÒÀŽÅ€ÊœÏãÔMÚÛß|å@ëñèöÈü®’m>û§0%¢*é/ 5ÿ9Ä>PC¥G½K•O(SuV{Y.\Ÿ^±`~bìceÓeLfcf+f–e³dmcäa÷_Å]>[gXNUßQ:NEJF®A =9833.«(0#šæ$L n‹¡úÆôëî$énãÒÝQØôҺͯÈÎÃ&¿°ºu¶²¿®Q«"¨@¥­¢f sžÑœ…›‹šê™ ™¬™ šÊšÓ›=òžþ W£¦÷¨:¬¿¯Œ³—·â»eÀÅ Ê"ÏiÔÌÙYßùä¶êƒð]ö@ü$ ä ¸v$±$$*q/•4‘9T>ëBBG`K?O×R,V6Yö[f^‡`UbÑc÷dÉeBfef5f¦eÊd‘cb*`û]z[¯X–U6RN¥J}FB=§8®3y.+)±#o¥Ù õ.ûJõuïªéðãUÞÐØnÓ5ÎÉBÄŒ¿»Ó¶Ø²¯«h¨‚¥ä¢˜ žžòœ ›Ÿšõ™¤™¥™š²š¼›ʞǠ!£¿¥²¨ê«j¯2³5·|»ù¿¯Ä•É­ÎèÓQÙÓÞxä/êûïÕõµû_ /ò 1$§)ø.4 9æ=„BÝFKäNŠRÞUõX·[1^Z`,b´càd¸e9˜4p/$*²$#v¸å '>ü]ö„ð´êüäVßÏÙfÔ%ÏÊ ÅeÀỘ·‹³À¯9¬ù¨¦Z£ü ôž:כƚš©™¡™é™š„›Ñœržh «¢B¥ ¨R«¿®€²s¶²º%¿ÍòȶÍùÒMØÔÝnã"éïîÂô£úŒkP é—4#¨(.13:8 =±AFJJ3NçQGUlX<[Ä]ù_âanc´d•e*fefIfØe eïc|b³`^/\zYvV(S”O¾K£GSCÂ>: 5ê/¡*2%¦ü<o¯Éüæö ñ>ë}åÚßOÚàÔ Ï|ÊÅÑÀH¼ù·è³°Š¬@©E¦”£/¡ Ÿ_ô›Üšš°™ž™ß™|šg›±œIž5 v¢ÿ¤Þ§«o®#²¶Kº¼¾^Ã=ÈCÍxÒÓ×QÝéâ èdî:ôúýÿçÄ ›b¯".(‡-¼2Å7 Zá\7_7aëbDdNeþeZf]f f`ebd ccah_]~Z˜WcTéP,M(IëDr@¿;á6Ê1•,,'°! W³ Ôíþ ù*óXí’çåáNÜÖÖ„ÑVÌUÇ„Âé½¹]µo±Ì­iªS§ƒ¤¢ÔŸúmœ8›YšË™›™¾™7š ›-œ¬yŸš¡ ¤È¦Ö©'­Ã° ´»¸½¨ÁsÆiËŽÐÞÕLÛßà‰æGìòõ÷ÜýÀ¤ |Lª 3&˜+Þ0õ5à:ž?DlHsL?PÊSWZ¥\_ aÉb&d;eñeUfbffve{d/cŽa˜_U]¿ZÞW°T>Q„M‰IREØ@4 Zyÿù´óÝíèeâÑÜT×þÑÍÌÆÇõÂO¾è¹¹µÇ± ®³ª˜§Ã¤;¢ ž’œN›jšÕ™œ™¶™*šñšœ„LŸd¡Ð£…¦©Ô¬p°>´_¸¬¼@ÁþÅöÊÐbÕËÚ_àÿåÈëŽñq÷Pý8 õÄ€( ²%+d0€5r:/?·CHLìOwS¿V¼Yl\Ñ^ß`¢b d$eåeOfcf!f„e™dMcºaÈ_]þZ$XÿTQàMåI¸EDA <Å7¼2ˆ--(°"d™Ç äú;ôeîŸèéâRÝÑ×yÒEÍ9Èc÷¾Nº¶#²p®«Þ§¥u¢6 Hž±œi›zšà™™±™šÝšñ›bŸ4¡‘£E¦A©‡¬°æ³ù·I¼ÏÀ‘Å~ÊÏâÔNÚÙ߀å:ë ñäöÈü±Žq;ý¤5%*í/ 5:Ä>OC§GºK—O(StV|Y/\›^¶`ybñc e×eIfef*f—e°dqcáaø_Ç]8[oXFUçQ4NHJF­A=7843.«(0#šç#L o‰£úÅôìî#épãÏÝTØòҼͮÈÍÃ)¿«º|¶w²Æ®M«#¨@¥­¢e užÏœ…›Œšê™Ÿ™¬™ šÉšÔ›<òžÿ W£¦ø¨8¬Â¯Š³—·ã»cÀ!ÅÊ'ÏcÔÓÙRßþä³ê…ð]ö>ü&æ ·x ´$#*q/—49Y>åBHG\K@OØR*V9Yò[j^‚`ZbÎcødÈeCfef3f©eÇd”cb,`ù]{[±X’U:R‹N§J}FB~=¨8¬3{.*)²#n¨× õ-ûLõsïªéòãSÞÒØkÓ7ÎÉ?Ä¿»Ù¶Ô²¯œ«i¨¥å¢˜ žóœ ›žšö™¢™§™š´š¹›Ǟˠ£Â¥¯¨ì«i¯1³8·y»û¿®Ä–ɬÎéÓPÙÔÞwä0êúïÖõ´ûž}a -õœ5$¤)ù. 49ê=€BâFKéN„RäUñX¹[1^X`/b²càd¹e:fgf;f¸eâd¯c1bW`2^·[ôXàU‡RèNKáF€Bê=9!4õ.©)/$£î5Z ³ûÙõ÷ï3êsäØÞMÙëӬΔɰÄù¿{»8·/³l¯é«±¨Â¥£Ë Èž¼›²š𧙢™õ™¡š›õœ›žš ã¢ƒ¥g¨«¯Ô²Ù¶»¿?Ä É5ÎmÓÑØSÞñã¬épïOõ,ûûÐ ¯h ¯#*)}.©3­8x=BwF«J‹N7R–U®X|[ú]*`b“cÇd©e3fefDfÇe÷dÒcTb‡`h^ò[:Y)VØR?O_KDGéBU>9•4r/#*³$!y´ê +;ü`öð¶êûäWßÎÙgÔ"Ï ÊÅhÀß»š·‰³Â¯7¬ù¨¦X£ý ôž9؛ƚšª™ ™ë™‹š…›Ðœsžh «¢A¥"¨O«Ã®|²v¶°º&¿ÍñȸÍöÒPØÒÝnã$éìîÃô¥úˆoM "çš0#¬(.3398 =¯AFFJ8NâQKUhX@[À]þ_Ýarc°d˜e(fhfEfÜe eòc{b³`^0\zYuV)S”O¼K¨GMCÆ>þ9 5é/£*/%¨ú>n‘¯Èüæö ñ<ëåÖßQÚßÔ Ï|Ê‘ÅÐÀG¼û·å³°‡¬A©D¦•£.¡#Ÿ[÷›Úšš±™œ™á™yšj›¯œJž5 t¢¥Û§«q® ²¶Kº¹¾cÃ9ÈDÍyÒÒ×QÝêâžèfî:ôúãÈ ˜d±",(‰-º2È7 Ý’-"±' -E2R71<Û@QEˆI…M=Q±TßW¾ZU]˜_a-c~drefbfTfñe:e(dÇb a_¨\þYWÉS?PuLiHD?ß:ù5Ù0œ+0&ª I  ÃÛýõ÷òEìæÚàQÛÙÕ’ÐhËsƧÁ½¼¸ ´Â°)­Ó©Ê¦ ¤™¡{Ÿ©0œ›8š¾™š™Ì™Zš5›pœøÖŸ¢†¤Q§jªÊ­r±Yµ†¹å½†ÂSÇXÌ‚ÑÙÖLÜæá‘çYí(ó ùêþ×± ŽV ®!0'‘,Ì1à6¿;t@éD)I,MçPgT”W‚Z]i_ca c`dbe f]fZfÿeMeEdëb6a8_à\AZMWT’PÑLÊHƒD @O;l6T1,°&-!‡Ô/ Fhþ}ø¥òÍìç_áÐÛXÖ ÑàËãÆ€½¹þ´±z­ª§G¤Ï¡¨ŸÑNœ ›HšÄ™š™Æ™Fš"›KœÔ¦ŸÑ¡E¤§ªz­±ý´¹‚½ÂäÆßË ÑZÖÎÛ`áçÏì¥ò}øgþG. Òˆ-!¯&,U1i6T;@ˆDÇHÑL•PTQW=Zä\3_;aæbJdIefXf]f f_ecd ceaf_]Z—WeTçP-M'IìDq@Á;Þ6Ï1Ž,3'«!WŒµ Ñðþù-óVí’çæáLÜÙÖÑYÌRLJÂå½…¹[µp±Ì­hªS§…¤¢×Ÿ÷pœ6›YšÌ™›™½™8š›0œ«xŸ›¡ ¤Ë¦Õ©&­Å°´¾¸½¨ÁrÆkËÐÞÕMÛÞà‰æIìòö÷Ýý¾¥ }I¨ 2&š+Ü0õ5ä:—?"DfHvL?PÈSWþY¨\_ aÈb(d9eôeQfdffred,caš_R]ÁZÝW±T>Q„MˆIREÚ@2PC§GºK˜O%SxVxY2\›^´`|bïc eØeHfff)f™e­dtcÞaû_Ä]<[jXKUãQ6NGJF°A =9823.¬(/#›æ#M n‰¥úÂôîî"éoãÒÝPØöҹͯÈÏÃ$¿²ºt¶€²¾®S«¨E¥¨¢k ožÓœ„›‹šì™™­™ šÈš×›9õžú \£ÿ¥ü¨7¬¿¯Ž³”·å»bÀ Å Ê$ÏfÔÏÙUßýä´ê„ð]ö>ü'è µx"²$$*r/•49U>éBDG`K>OØR*V9Yò[j^ƒ`XbÐcödÊeAfgf3f¦eËd‘cb+`ù]|[¯X•U6RN¥J}FB|=«8ª3}.()³#n¨Ö ø-ûKõtï«éñãTÞÏØoÓ4Î É@ÄŽ¿»Ô¶Ø²¯«i¨¥ä¢š ›žôœ ›šù™ž™«™þ™¶š·›ƞ̠£À¥²¨è«n¯-³:·x»ý¿ªÄ›É¦ÎïÓLÙÖÞuä1êûïÔõ·û›€^ /ô5$£)ù. 49ë=BáFKçN†RâUóX·[3^V`0b²cßdºe:fgf9f¼eÜd¶c+b\`/^¸[ôXßUŠRäNKßFBé=9!4ö.¨)0$¢ï2] €´ûÖõúï1êuäÖÞNÙëӫΖɭÄü¿y»9·.³l¯ê«±¨Á¥£Ê Éž¼›±š𥙤™õ™žš ›óœž˜ å¢€¥k¨š«¯Ö²×¶»¿<Ä%É0ÎrÓÍØUÞòã¨évïJõ-ûõØ §o³#))|.¬3©8|=B{F¨JŒN8R”U¯X|[ù]+`b’cÉd¨e2fgfBfÉe÷dÐcVb†`g^õ[6Y-VÖR?O`KBGëBU>9—4o/%*²$"x¶æ &?ü^öð¸êøäZßËÙjÔ!Ï Ê ÅbÀä»–·Œ³Á¯6¬û¨¦Y£þ ñž=ԛʚ š®™™ì™‹š…›Ðœsžh ª¢B¥#¨L«Æ®y²x¶±º#¿ÐîȻÍôÒQØÑÝpã"éîîÂô¤úŠnL %äœ.#®(.5378=°AFHJ6NãQKUiX>[Ã]ú_áapc±d–e+fefIfÖeeîc}b²`^/\|YsV+S’O¿K£GSCÀ>:5í/ *1%§ùAk“­Êüäö ñ;ë€åØßPÚßÔ Ï}ÊÅÒÀG¼ú·æ³°‡¬B©D¦“£1¡Ÿ`ò›Ýšš±™™à™yšk›¯œIž6 t¢¥Ü§«m®%²¶Mºº¾`Ã<ÈAÍ|ÒÐ×RÝéâ ècî=ôúÿÿæÅ ›b­"0(†-½2Æ7ZRWT—PÎLËH„D@P;l6S1,¬&0!…Õ/ Fhþ}ø¥òÎìç_áÑÛVÖ ÑÛËçÆƒ½¹ÿ´±y­ ª §I¤Î¡¨ŸÑNœ!›FšÆ™˜™È™Eš!›NœÑ§ŸÑ¡E¤§ª|­±þ´ ¹}½ÂÞÆåËÑ]ÖÌÛbá çÐì¢òødþI- Ô†/!®&,S1k6R;@…DÉHÐL•PTQW=Zã\5_8aêbEdNeþeZf]f faecd cgae_]Z”WfTéP)M,IçDv@¼;ã6É1”,.'¯! X‹µ Òïþù,óVí“çäáOÜÕÖ†ÑSÌWÇ…Â彇¹Wµs±Ê­jªR§…¤¢ØŸ÷oœ8›WšÍ™›™½™8š ›,œ®wŸ›¡ ¤Ê¦Õ©'­Â° ´½¸½¨ÁsÆhË‘ÐÚÕPÛÝàˆæKìòù÷ÚýÁ£ }Kª 2&™+Ý0ö5à:œ? DeHyL¢ #ž‹œS›hšÕ™™´™,šðšœ…JŸg¡Î£†¦Œ©Ö¬l°D´Y¸²¼:ÁÆóÊÐbÕËÚ]àæÄë’ño÷Qý7 óÇ~) ±%+c0‚5o:1?·CHLéOyS¾V½Yk\Ñ^à`¡b d%eãeQfbf!f…e˜dNc¹aÈ_Ž]ýZ%XýT’QÜMêI³EFA <Å7¼2ˆ-,(±"a èÿÿú>ô`î£èçâSÝÑ×zÒBÍ<È`û¾Kº¶!²p®«Ú§¥r¢6 Kž­œk›zšà™™±™šßšñ›bŸ1¡”£C¦C©†¬°æ³ú·G¼ÑÀÅ~ÊÏâÔOÚØß€å;ë ñæöÈü®“l?û¥2%¢*é/5ü9È>KC¬G·K™O$SyVwY4\˜^¶`{bïce×eHfgf(f˜e°dqcàaú_Ã]>[iXKUâQ8NFJF¯A =9833.ª(2#—ê!M nŠ£úÅôëî$énãÒÝQØôҺͰÈÍÃ'¿®ºw¶}²Á®P«"¨A¥¬¢g pžÕœ›šè™¡™©™šÄšÙ›9ôžü [£þ¥þ¨4¬Ã¯‰³™·á»fÀÅ Ê!ÏjÔËÙZßøä·êƒð\öAü$è ´z ³$$*q/–49U>êBCG`K>OØR+V7Yõ[f^‡`VbÐc÷dÊe@fhf2f¨eÊdc b)`û]{[®X˜U2R“N¢J~FB{=«8ª3}.()³#mªÔ ø,ûMõsï©éóãTÞÎØrÓ/Î%É<Ä‘¿»×¶Õ²¯š«l¨}¥è¢– žžóœŸ›Ÿšö™¢™§™š³šº›ŞΠ£Ã¥°¨é«m¯/³7·|»÷¿²Ä’ɯÎèÓPÙÔÞvä1êúïÕõ¶û›\ 3ï¢/$©)÷.49é=BàFKåN‰RßUôX¹[/^[`,b³cád·e9”4s/#*²$#v¸å %?ü^ö‚ð¶êúäXßÍÙhÔ"Ï ÊÅfÀà»™·‹³¿¯9¬ú¨¦[£ú öž8ٛŚšª™¢™ç™šƒ›Ðœvžb ±¢=¥%¨L«Å®z²y¶®º&¿ÎïȻÍôÒPØÔÝlã%éìîÃô¤ú‹lN "è™0#¬(.3398 =°AFHJ6NäQJUiX>[Ä]ù_áaoc³d–e)fgfFfÚe eðczb¶`š^1\zYuV)S”O½K¥GRCÁ>: 5î/ž*4%¤û@k”¬Êüåö ñ;ëå×ßOÚâÔœÏÊÅÒÀG¼ú·æ³°†¬C©C¦”£0¡ Ÿ^ô›Ýšš²™š™ä™všn›«œLž6 r¢¥×§«l®&²¶Mº¸¾cÃ9ÈFÍuÒÖ×OÝëâžèdî<ôúminiaudio-0.11.22/tests/android/000077500000000000000000000000001475701111600164205ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/000077500000000000000000000000001475701111600215255ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/.gitignore000066400000000000000000000003411475701111600235130ustar00rootroot00000000000000*.iml .gradle /local.properties /.idea/caches /.idea/libraries /.idea/modules.xml /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml .DS_Store /build /captures .externalNativeBuild .cxx local.properties miniaudio-0.11.22/tests/android/MiniaudioTester/app/000077500000000000000000000000001475701111600223055ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/.gitignore000066400000000000000000000000061475701111600242710ustar00rootroot00000000000000/buildminiaudio-0.11.22/tests/android/MiniaudioTester/app/build.gradle.kts000066400000000000000000000025461475701111600253730ustar00rootroot00000000000000plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) } android { namespace = "io.miniaud.miniaudiotester" compileSdk = 35 defaultConfig { applicationId = "io.miniaud.miniaudiotester" minSdk = 26 targetSdk = 35 versionCode = 1 versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) } } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = "11" } externalNativeBuild { cmake { path = file("src/main/cpp/CMakeLists.txt") version = "3.22.1" } } buildFeatures { viewBinding = true } } dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) implementation(libs.androidx.constraintlayout) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) }miniaudio-0.11.22/tests/android/MiniaudioTester/app/proguard-rules.pro000066400000000000000000000013561475701111600260070ustar00rootroot00000000000000# Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFileminiaudio-0.11.22/tests/android/MiniaudioTester/app/src/000077500000000000000000000000001475701111600230745ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/000077500000000000000000000000001475701111600253545ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/java/000077500000000000000000000000001475701111600262755ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/java/io/000077500000000000000000000000001475701111600267045ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/java/io/miniaud/000077500000000000000000000000001475701111600303325ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/java/io/miniaud/miniaudiotester/000077500000000000000000000000001475701111600335375ustar00rootroot00000000000000ExampleInstrumentedTest.kt000066400000000000000000000012471475701111600406610ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/androidTest/java/io/miniaud/miniaudiotesterpackage io.miniaud.miniaudiotester import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 import org.junit.Test import org.junit.runner.RunWith import org.junit.Assert.* /** * Instrumented test, which will execute on an Android device. * * See [testing documentation](http://d.android.com/tools/testing). */ @RunWith(AndroidJUnit4::class) class ExampleInstrumentedTest { @Test fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("io.miniaud.miniaudiotester", appContext.packageName) } }miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/000077500000000000000000000000001475701111600240205ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/AndroidManifest.xml000066400000000000000000000016531475701111600276160ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/cpp/000077500000000000000000000000001475701111600246025ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/cpp/CMakeLists.txt000066400000000000000000000034651475701111600273520ustar00rootroot00000000000000# For more information about using CMake with Android Studio, read the # documentation: https://d.android.com/studio/projects/add-native-code.html. # For more examples on how to use CMake, see https://github.com/android/ndk-samples. # Sets the minimum CMake version required for this project. cmake_minimum_required(VERSION 3.22.1) # Declares the project name. The project name can be accessed via ${ PROJECT_NAME}, # Since this is the top level CMakeLists.txt, the project name is also accessible # with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level # build script scope). project("miniaudiotester") # Creates and names a library, sets it as either STATIC # or SHARED, and provides the relative paths to its source code. # You can define multiple libraries, and CMake builds them for you. # Gradle automatically packages shared libraries with your APK. # # In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define # the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME} # is preferred for the same purpose. # # In order to load a library into your app from Java/Kotlin, you must call # System.loadLibrary() and pass the name of the library defined here; # for GameActivity/NativeActivity derived applications, the same library name must be # used in the AndroidManifest.xml file. add_library(${CMAKE_PROJECT_NAME} SHARED # List C/C++ source files with relative paths to this CMakeLists.txt. native-lib.cpp) # Specifies libraries CMake should link to your target library. You # can link libraries from various origins, such as libraries defined in this # build script, prebuilt third-party libraries, or Android system libraries. target_link_libraries(${CMAKE_PROJECT_NAME} # List libraries link to the target library android log)miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/cpp/native-lib.cpp000066400000000000000000000125461475701111600273500ustar00rootroot00000000000000#include #include #define MA_DEBUG_OUTPUT #include "../../../../../../../miniaudio.c" /* Android projects have very deep folder structures... */ typedef enum { BACKEND_AUTO, BACKEND_AAUDIO, BACKEND_OPENSL } backend_choice_t; typedef struct { ma_device device; ma_waveform waveform; bool hasDevice; bool hasError; /* Will be set to true if something went wrong. */ std::string errorMessage; /* Will be an empty string if there is no error message. */ } audio_state_t; static void audio_state_set_error(audio_state_t* pAudioState, const char* pMessage) { assert(pAudioState != nullptr); pAudioState->hasError = true; pAudioState->errorMessage = pMessage; } static void data_callback(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { auto* pAudioState = (audio_state_t*)pDevice->pUserData; assert(pAudioState != nullptr); ma_waveform_read_pcm_frames(&pAudioState->waveform, pFramesOut, frameCount, nullptr); } extern "C" JNIEXPORT jlong JNICALL Java_io_miniaud_miniaudiotester_MainActivity_UninitializeAudio(JNIEnv *env, jobject, jlong audioState) { auto* pAudioState = (audio_state_t*)audioState; if (pAudioState == nullptr) { return 0; } if (pAudioState->hasDevice) { ma_device_uninit(&pAudioState->device); ma_waveform_uninit(&pAudioState->waveform); pAudioState->hasDevice = false; } pAudioState->hasError = false; pAudioState->errorMessage = ""; return (jlong)pAudioState; } extern "C" JNIEXPORT jlong JNICALL Java_io_miniaud_miniaudiotester_MainActivity_PlayAudio(JNIEnv *env, jobject, jlong audioState, int backend) { auto* pAudioState = (audio_state_t*)audioState; ma_result result; if (pAudioState == nullptr) { pAudioState = new audio_state_t; pAudioState->hasDevice = false; pAudioState->hasError = false; } /* If we don't have a device, create one. */ if (!pAudioState->hasDevice) { ma_context_config contextConfig = ma_context_config_init(); ma_backend pBackends[1]; size_t backendCount; if (backend == BACKEND_AUTO) { backendCount = 0; } else { backendCount = 1; if (backend == BACKEND_AAUDIO) { pBackends[0] = ma_backend_aaudio; } else if (backend == BACKEND_OPENSL) { pBackends[0] = ma_backend_opensl; } else { backendCount = 0; } } ma_device_config deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.dataCallback = data_callback; deviceConfig.pUserData = pAudioState; result = ma_device_init_ex((backendCount == 0) ? nullptr : pBackends, backendCount, &contextConfig, &deviceConfig, &pAudioState->device); if (result != MA_SUCCESS) { audio_state_set_error(pAudioState, (std::string("Failed to initialize device. ") + ma_result_description(result)).c_str()); pAudioState->hasDevice = false; } /* Before starting the device we will need a waveform object. This should never fail to initialize. */ ma_waveform_config waveformConfig = ma_waveform_config_init(pAudioState->device.playback.format, pAudioState->device.playback.channels, pAudioState->device.sampleRate, ma_waveform_type_sine, 0.2, 400); ma_waveform_init(&waveformConfig, &pAudioState->waveform); pAudioState->hasDevice = true; } /* At this point we should have a device. Start it. */ result = ma_device_start(&pAudioState->device); if (result != MA_SUCCESS) { audio_state_set_error(pAudioState, (std::string("Failed to start device. ") + ma_result_description(result)).c_str()); } return (jlong)pAudioState; } extern "C" JNIEXPORT jlong JNICALL Java_io_miniaud_miniaudiotester_MainActivity_PauseAudio(JNIEnv *env, jobject, jlong audioState) { auto* pAudioState = (audio_state_t*)audioState; if (pAudioState == nullptr) { return true; } if (!pAudioState->hasError) { if (pAudioState->hasDevice) { ma_result result = ma_device_stop(&pAudioState->device); if (result != MA_SUCCESS) { audio_state_set_error(pAudioState, ma_result_description(result)); } } else { audio_state_set_error(pAudioState, "Trying to pause audio, but there is no device."); } } return (jlong)pAudioState; } extern "C" JNIEXPORT jboolean JNICALL Java_io_miniaud_miniaudiotester_MainActivity_HasAudioError(JNIEnv *env, jobject, jlong audioState) { auto* pAudioState = (audio_state_t*)audioState; if (pAudioState == nullptr) { return true; } return pAudioState->hasError; } extern "C" JNIEXPORT jstring JNICALL Java_io_miniaud_miniaudiotester_MainActivity_GetAudioError(JNIEnv *env, jobject, jlong audioState) { auto* pAudioState = (audio_state_t*)audioState; if (pAudioState == nullptr) { return env->NewStringUTF("Out of memory"); } return env->NewStringUTF(pAudioState->errorMessage.c_str()); } extern "C" JNIEXPORT void JNICALL Java_io_miniaud_miniaudiotester_MainActivity_DeleteAudioState(JNIEnv *env, jobject thiz, jlong audioState) { Java_io_miniaud_miniaudiotester_MainActivity_UninitializeAudio(env, thiz, audioState); delete (audio_state_t*)audioState; }miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/java/000077500000000000000000000000001475701111600247415ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/java/io/000077500000000000000000000000001475701111600253505ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/java/io/miniaud/000077500000000000000000000000001475701111600267765ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/java/io/miniaud/miniaudiotester/000077500000000000000000000000001475701111600322035ustar00rootroot00000000000000MainActivity.kt000066400000000000000000000047541475701111600350770ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/java/io/miniaud/miniaudiotesterpackage io.miniaud.miniaudiotester import android.annotation.SuppressLint import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.TextView import io.miniaud.miniaudiotester.databinding.ActivityMainBinding enum class AudioBackend(val value: Int) { BACKEND_AUTO(0), BACKEND_AAUDIO(1), BACKEND_OPENSL(2) } class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding @SuppressLint("SetTextI18n") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityMainBinding.inflate(layoutInflater) setContentView(binding.root) binding.btnPlay.setOnClickListener { val backend: AudioBackend; if (binding.radioAAudio.isChecked) { backend = AudioBackend.BACKEND_AAUDIO } else if (binding.radioOpenSL.isChecked) { backend = AudioBackend.BACKEND_OPENSL } else { backend = AudioBackend.BACKEND_AUTO } audioState = PlayAudio(audioState, backend.value) if (HasAudioError(audioState)) { binding.textInfo.text = GetAudioError(audioState) } else { binding.textInfo.text = "Playing..." } } binding.btnStop.setOnClickListener { audioState = PauseAudio(audioState) if (HasAudioError(audioState)) { binding.textInfo.text = GetAudioError(audioState) } else { binding.textInfo.text = "Paused." } } binding.btnUninit.setOnClickListener { audioState = UninitializeAudio(audioState) if (HasAudioError(audioState)) { binding.textInfo.text = GetAudioError(audioState) } else { binding.textInfo.text = "Device uninitialized." } } } private var audioState: Long = 0 external fun UninitializeAudio(audioState: Long): Long external fun PlayAudio(audioState: Long, backend: Int): Long external fun PauseAudio(audioState: Long): Long external fun HasAudioError(audioState: Long): Boolean external fun GetAudioError(audioState: Long): String external fun DeleteAudioState(audioState: Long) companion object { // Used to load the 'miniaudiotester' library on application startup. init { System.loadLibrary("miniaudiotester") } } }miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/000077500000000000000000000000001475701111600246115ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/drawable/000077500000000000000000000000001475701111600263725ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/drawable/ic_launcher_background.xml000066400000000000000000000127461475701111600336010ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/drawable/ic_launcher_foreground.xml000066400000000000000000000032461475701111600336270ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/layout/000077500000000000000000000000001475701111600261265ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/layout/activity_main.xml000066400000000000000000000075231475701111600315170ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-anydpi/000077500000000000000000000000001475701111600273565ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-anydpi/ic_launcher.xml000066400000000000000000000005271475701111600323600ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml000066400000000000000000000005271475701111600335670ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-hdpi/000077500000000000000000000000001475701111600270165ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-hdpi/ic_launcher.webp000066400000000000000000000025741475701111600321610ustar00rootroot00000000000000RIFFtWEBPVP8X GGALPHÌ€cÛÖòä¾÷Ç=Á¥M…ÎÀÊ,Jjz¦6•»T!c@ Ó±×}/ë¿XÅŠˆ Àß»$(¥ Ru)Ðhm®oÄz}³ÕÔ¡è½5ÊÛ^hwöFi I`ÁÞŒòÍ‘’ž Ó]ž Kìñœ&û1ˆB¢!!jnd µ É1Š¥¬\ɪl¨Ó?C[k¼Àt'Þôò·ý”ø2ý¨ýÅøýjÿïœQývÔNÿ¿¼Á‚–ÂÔÿL¿Lûþ­ÿ¡üÊã ýnŒ»KmPX;5sƒÅòëf~k°‰Cå€Ü™/;¼ªÔïJ¢æjÞ ï7aiCš´=wŒê·+·œ}•¶é€d„©Êá•kI¿W²Èw£ê¾œu-<zX?Ý–?þ´I¿Š›\t˜¦íx{äõl…—`o#„Ý.Uõ°?¿Ëëò‚Äܾ„8-é]kÜÇbê¬8%ÿør¿ìW À°ÿûþø&|ƒ‰SVŸø£‘DÜ‘û¤ÉmRKvø€Öe¤¤BÁèëÀMª¾ íªD“ Þü¦\”Á¶åŠØËîŸlñ ?Ú§¸™?€Cb•z<ŸÍžÁ8‰RÄ{ mÔáËóPÅ r5_Š …ÑgþkÉ,ýÿᜑvq¸‡Žôt/!]|5QCegK ËWߟï³ÚÏì{¤Ãhsö¤‡{)œòs„ÓOØq/ Ű,‹h`-¢`A²B¯²õi$½N?‚Ôáºp&¯hàJ ŸÅõ%TÇiHXþï Á°UÛz ^Ê ªTH‚ª½½¢¢Eõu‰}4jª{ï´µ}ù=<ê& .Ì4(žIjV†rõí¯´-÷‹]rošò•ëÈê°´GÀ$»þq‡á<%¬”“$¦P‡"`nÚlš?—4OCÎÙÎÒ.`²¡hEc85Ç‚Ž1l3E Þ;L;|ÅŽ?~½\Š#a»œÆö/FX£Á6–”o òxäÈ'ØqÁ½Õèÿûjõu¥Õt,oƒd^~ê³±‹|·éKâT ZJ.>PŽ~KÂ,à ?ÝŽß¿RëíüZ¯^]Jgáäj°iôî¾Gæ!úó6F­ª<÷DÔÀaÚ!º+$_RÃt2/7ðôéˆU$3>q¬s,—ªe÷ÞÆ?åL~Ꞙ¬~›n¢òÏA¼‡ÕÔ`Kë¾Åö“‹÷eÆýÊSÕÄvZ·Eú¸«hQJ/_ /óSùU˜DÖ?7 ¹¿†g±ŒëWg5Úƒ¬ Oo Î4éWëﻆ¹ü•Ñ´#.µ¥^ umŸf&Aç„ì2yÿ%rÐÍ ]òa£«iïåó¯‡áí ÐÔ1VÅÆ£óxTÝEg¯Ÿ²0èœ\é„Lù€Ÿoû†Êo#ZA„ #ÃgÆmÕ=o€ŽRiB#„ø÷_ýÍßK*ò¥sñ™£/ýG¤ŒŸÿ¿á¬Ÿ÷üï?àÓŸþSš†i†_"xÿÊë¾ÚØ nijZ¾ÓŽÔâ±ÒÃØ¸qNÙ÷‰ÉuaÉ1ÍçÊü@ªöX"àå*9åòXæÚJty˜šIýP Ä»²÷TnÎ'óŠIºÙÑu,UöÏmZÿŸ=+y»à‰ãtÊ‘tù—0@miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp000066400000000000000000000055221475701111600333640ustar00rootroot00000000000000RIFFJ WEBPVP8X GGALPH½ nÛ¶1IÚ_dfôˆduEF:#˶նmÛ¶Ýý ¶m[¯P¶íªïÜ»„¿Û€Z+¥‹*…€•±ekTÚjÖ êèT‡BmuÒŒÐvØÝoüµdóžöl^ò×wÖÀš$Yd¯ø|+ÞðÙY@Ù¤ Ì|y+I'"Îyï½s"âIn}y& M",°à’"Ž;’?,lí´Fÿ$ųÊ^H~Эk·ì£ÏzñÜ Õ$BÓ—dÌšÇäWMˆjaÌrÆŽ t1—ET5‹cö3fBcî?¶JÎ$…‰òDU‰p4)L°Ç#ª‚Řý&Z¸lEË)L¸pE te_2fâc~£*±¸™1Œy'lY}{éBpÜ;¦¼÷3Ș«r,æÑ3PÏc`Ki|O Eø³Ò% ¦‘>O΃)fñ"…Á ߀-¢qèfºp·tAX\NÇ€o€-0êSJH¯µ ÐºŽ.$Ç 9(Àà0zíy,`q%,áÃÊF¿Þ{Ú@)óGxÿ¤”R¨_D–ã’ ”Æà ámì‚ÖèÛÞÎáÃöÒ‡å¹w\Áðÿƒñùta9î­ÛÞÆ>(…Ì¢ð–¶B)uÈŸ”°„ÿ5*ÓðVx6À¦ ï锌=ÁŸm- tïZº×Ó €mú‚’ðûf‹‚ôÍt!9Þ›Ž T4r#]8Ž›'Dª©Ö7(á?hM¡¨IŸHúP&œÖÛªQ}ÕÔ9æ©ídìkácrû³c;›j©Ò¹aÇ|IR\µœüêØa¹´Bm[ÏèË~s¤ç+ñNé~»btO›EíU:›wáûëIRD\I!Éõï_4.ŸM+$Ò4æò£{è»Õ¬xõ·6:Ÿk4H¬Éd»‡{å ý³pí–;¶¬]øÏG/\9wÜðžlÆ Ñº®%Û50bÌÄ©s>çN™8fÄ@W¶¥N#ù:•iÜžëêéííéʵnͤ4‚UÚFuõõu‘Õ 5VP8 f0#*HH>-†B¡¡ mk b[,G´ Ýð¿‘^ȶ/ì}ù§Gn­û™ù³þoüg±0ÓÔ~±~`?W?U}ãýúUþåÖ7è;úíéûEð…û;ûŸðü«úOþ›ÓOÈtžú¤ùÎðûµ¿øSÂwrû?JÎx®ý+ÐWú¿üQï÷|É}û'ð üŸú¯üOî}?i}Ž?L;/ðVŒˆ®b0'›ÊðŠñúù(½ýšÚ`î´&ƪ|}FBAQ/hVDÎÎþá‹T½¿P·-.{ñžaÜÁX«·wÁÜxôïÊâô¶ãùÂ~sàŠ¾[Lï˜ÖgÁA¨(ÚÐP~›ä^?ÑùÑ´w¡Aõ˜ãî¼$êwó þÿþ®ÿÔE÷»øØÿWGšjY®Aâx… „¥Ç¨%}œG€£Ø5ÔòÕˆ03Pí’ØÂKe6¬FAL†îy4É`‰:±^p¿EïŠq x'ÇK÷¬¹@pÑ·²¼Ü!bO½7 Bþ‘µŒÂÛjw4ªÇ>XÞvKåy°Lþ6î¨4©Ïâ¢î·aK¸ßB#¹tky¦Ê{Š§á¥«÷bÅ›êÖnbŒçtÔγ:#²)ëü^W!h@»Ž¯9£ÃBÐèà/ îm]ž=µ+=ÉGø±.…Oi RTÕOJì¿)7÷‘ð‰‰>}g‡3I©Í%Í­wCp6 ‡!2{q· ÿ4öþìÀ‡ÍV-†^]Ÿÿ_lÃ_D\õCÌU#ú:}›–Nv›aÄ»ÆýÔƒ-?Öm?ÿý¾2y“ªGon_gMŽïU@ĸÄ4)Ùè>˜­¥~ÿKåD0°àlUWÝ›ÏÔ`¹« ÿy¸óê+ü>àsAû…Ä—XCýãöèþyå¸a¹ù˜X„™Í§ÛL‡ƒ-.5ˆžIJùUß0e¾Òà•å’ÜçÒù˜­ßŸm¸·Ä¼šãJa¢^мr3)5`Ú0Œ­ mnKíDãœYdBtÆ0£ žáN¨qM3: o›¡œÔNƒ cû*çøæF6_%î¤ßÀ§jFú¸Ž‘mwëLÆ«³_xž™¬¹Ú±թÿÚ^@Í.ƒ3?3þu…Zå&‘lŒSuqÍÅÒÒjô„ÄM!— o§},ÍÜ÷(Ã}××…gìóŠzâO]uìs'îP"WfRz±‚0ª¨ýy§£&_!³Ôiç.ç¿/Ü©ÿ–NP^É/•þØú¯NÇš5¨ÐRY¹ç|¯Í£Ãö _Òo w>ª½a)}°«3ÊÀxà&wÚkÃŽ¦ÛCiMûö;µÿìÏà3b$òVQ—QüÄôU|ŽIùÄ,³õÖo’гyk rP!§ðªyNCWæ£õHbê%RÅêh‰Ðiñì¬b™1ÇjàþyYûÆòÿÃÿÏ«±œUe?÷¨G/]À Ik E~{×û×0¼„æ¯AçúÞãW%p¦0ýZ@ÈEuá€cHâüÌuã¬yj 5¤ôå?Ïþë¿ó¸6Šß¾•Š ^.ýÉ›ƒ"–y9q äÔ^‘ ÙgÇÝ*E·^©{\‚MÊä#ÕÕÛ>wÅËdűãE­@À’ÙH0ãæ–ÚF–;{0éꢧáÓ¨=Å› Öd3³ñ¾ï¡?%Ò&¨l°ä›i· Ÿ¾øü8èžUðjÞ êÐ=U1wîÀ ]]›•P…PÍÒ×x ž“îÀòÕù?ýiŠÃ¸‹ËÝ üµÔ#_@î|MÝ8ÚFí#Õ;è6úz0åÝ')Í™`NT›O9lN¿³ûãP× „æh‡NÛ*¯•[¸/Éhœ¬g¶°ä†ûҜվ°Ž©pÄÝ´Ùöaœ¦{ó«äOâ)'d”¤1î( Õ÷e.†M|ã¥^¦)±n/N‘†ÈÓ9ÝI^*0•é}ÒýgýÀ#Õ’ jØÚÂ]xsª{󎀨/¿]f¤œDÔ¥¶=@’^VòN¥¤á› ?>+„zÎeàMbfWÙ¸¿×Š&XW½¨˜¾Ö–x3 ž…ÒpO’¯ºe®†o‡©^Hü À×¢‹Oä >Y‚l9«š-†B¡¡5· b[-H@kƒWñW›WÔ;¿’ÿË}’ö˜Û_âú“ï3ÏÖèåyìyû?éA~»jTùœú#þ_¸OêùÍNìÇæ9’ðGèYû}‡‚×x3õ¢Eª§ðVèÏv­8õ5Ž¡.ú溅_µ§Hþû©¯y!ÊhÆ |'äík¤”ºKߨ´^`$»ôJt+ûf²¡s¯8E²Ú ˜yЫëE^SÜðfr<ûøOí~ ðŸ¾DÙ°oÿPÚ«þTˆÂubø2Éþ>P×1òR•î{' {[JÒ_Ò«ê‰jy¼VÓ!ͼÞ!,ÏùŸ ´B“”p—ôä˜Ú§yòÁ&¥¸Ž8«KÙÊ7É Ôn+¢Ïúí Ôœ»ä¹ÅnàãW¬_âvé¨bÌËöäŠÑ–1¾²å ‰ãC>¤ëÈ­ÇÏÿ"/»Ð®yå~3ºh£ö¢‹Cšù£Õ¤MLéÙ—ÛzpÃÃÙ8 ½#Èœ<ŸÐœª˜¦1ËCÕÿM®šN"´ÊŠVãžþó®üˆ‰ô±ð˜»bíjøÉ›üá6K íxçaL‰dÐ-˜ƒk¥’\_Z¯äÂ×PÄvªß<¯äëPZ“Ü娳°²û¦tӞј‰‚B‹bne%ÇâõBÙÆ,°%˜ïùpHh¯…G@ÖðPíýÞÈ”DzÿæœVþî&6(]}‘¥ -îàPÍÞWÀ2ã]‚ý¿É_÷ò)Ú7ùŸKèO¹ Óy¯ÎJþÿ()(Źÿ=7]Åñ°7PvZq¯ÿÿ=ôë-ÑêæûooÙ`Ÿ§\¼Ìn*ùFZ©´u!qæà‡@fb‘F}};š]ò㺜5›n›2YQú^ S$_ ,CÑã$OÜ}ñãEØ@iŠ]s^7jìôãhW‡5-¹|ŸµÈV?.˨®ŽüÞ"ýIㆣšà=ÙÍÌ÷€*miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp000066400000000000000000000033541475701111600333720ustar00rootroot00000000000000RIFFäWEBPVP8X //ALPH\ kÛ¶iÛêS{]Û6#™mÛVfólߨÆóu~Î.7~¶ß\cö§5¿ "&%+ã g2Öÿ­Ñ´mÛ¦5ð_«³Ð@§E'žç¿üþû/óÏO,êÀê²9 Æ¼?³èŸÌ«¸ò(µ²‚d"ÉŠ• V•Áý^â…E‹òE?À”d€)%eSaº0%àéËÏÇÊ ãÏ”8„?w‡qXÂÀHWܦÄ"¼  ÔG1}jù˜Þךӗm€ößÅô} c\ÝV_ÆôU{ n>¦÷€äã˜^Tƒµçcºâ¬SkB!p‹r=~¤Ä!ü©?¬B§ôqx~P Ö®c1„À-Ö-+™Æ2߀­²•!dwU± Ñô }vžïZÀü6™ø'Ó¬Rþ9-qø[çƒd#GêXT¦ÙUŠd!ÂÍŒ*íÚÞ$Óò¥äívΠX“´¿FúPžàÉ‹âmÒæÈ >”|àGÛ$¥ê\³YoÈà%ÄòÍœf9ƒÒU®n×½•$)E’då¾nus euI“[?øEÿðÁÖM‡r+Wµqç1;n¼ÈþÍ7Ÿç_ÜØ1¦KãªN#Cm]­Æmºö6|ø°^]Û4®å¬FÆÊær®jõš5«Wu9gJVP8 b*00>-†B¡¡5¶ b['L¬þƒëߊ¿°)œiÞMÝ¢¿ ±>`?V¿Ñÿn÷ªô=èýWû7ZO –WìGÁŸíç°ìWÿûʽô<úí"$ø]Ú_úÞùá/¶Ô~ÿ¾Õó¹þƒÓÇüï2_D¿÷þ[ü÷üÏæ_Ä®ŸB/ÖdbY+‡,®¯~¦91m:Él”h_ñß‘¥Ò43ëóñÈâé åeÕ,ù&c•›îI ²EÖ þþ{1íUB}XåÙw‡asÎ&–ý4Wjí¼3Ps}«=ÉHêï²Ãñ é`ÔŸ1ÆW꣞šå²µçÃõ'âü§,ƒ½ÿúU¸øžw)7²ÙÿŸÎ£ãÐë§ÿEW›ë•[®B@FTª€™å)“0оËýÆK¡vÓ!%é¹»r¹«Tó©Qc. ~©é„73q¾ïáè nÉXz\õý`6_›kT)¯‚L[±)„“C¿L"{Ì; cí‘O–§ë™Ø«±h玠(ù›zóöóö®âJEú³ù®çÍ÷©ÿý΢DxGüÝû@¥™ì/?s<^%‡«(¿›ÿßTK_-ëÈì]#±"Ëã –V9Ì€‹}š.•ög”ÿ5{<ÒK]+¾M´q\J"™•C?HˆŸ{5Mú±ŸtÒÁNÁ0õø^šðW}¾—ŠNWr|·™vÏœÌz0+`‰³²QÓ•P_Í-¥[Yцn‚~׎…hØþ.8‘>ÚBj³u(éésAD7Hminiaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-xhdpi/000077500000000000000000000000001475701111600272065ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-xhdpi/ic_launcher.webp000066400000000000000000000035541475701111600323500ustar00rootroot00000000000000RIFFdWEBPVP8X __ALPH0€c[›"å¯ú«qwww÷Ã\V3‡œ˜Vãn‘»Ñ2XÅé?B#bà‹µDåg ‹ˆÆ€URUéóª @BȬݽ¾¼úúåõn-hDAÓ!1yØÊBÖ}8.ƒÎçšX ;F,ÆlZ4 !~ƒ\bÒ¥:•äqáÑc –hyç$Ø+ôd++ï}RÛY à¿ÿ~ûx7ÒÁJpÐDÓ#'OÝzswÉåÂ¥£b=°Ò—ÈŽñ³i9ݽ”ž3²AǦ‹Ô8=‘R<}AL^Χ =P95£+§/¡`È×ÁÐëéêXM®ƒ"¾¨¦mx|fÚç3ã#m5EñÂÈ„üÊÚÆ&ß7ÖVæ'H0+¬äì‚Â"Ÿd'[Œ T–ï øZ VP8 ð*``>1‡B¢! Uƒ‚ZÞÖOTÓ-Œ†ãð5¶ûôâwÓGÌê/ª¯Hê¯Yÿó¯S-¯eïÙŸØïhïþyÌÜó]ð¾û\WyÎ;ˆ½%ñK^Y±õ”ôýn™Õ¬=¶brM¦ûÓµkIöª­jÚí`xÿ°p‘JBÁBáÿv³M!ì,ž1ð0ÂÔ) $ÊÕvRÏp‰C2‡Xáo2Ðèæô¾írqô¨'d@½Ø_jŸŠºfSv…”¬ž öiBœçþ¥º t^o)ìJA| ¹*¦cé^\‰¢ÿœ^Âýéz;ä"þþü3_¾hâ~L¥ÛÉEÀç\´_=Îbf]šÑª¤jê‹ÂÛÇæT5/½M‚ÜÎþƒÏ»éLÕeÔŸàþ$÷…»'š–¹FìSÍÀ2 ŠÀ­Ýƒ³M½æßÑ“@gÑEã¸OšLï㔻ݻ_³¤ó•ÔZîYF‘Ö4ò„y]5ï”éè§V {~QîŠ×Ïm¡(¨ÉÐzÁX¿±XVÚw»Ü©Y‹$ý «â^µ¡ÔfzLCRå®Á2僈<.¥ü¿¤V#È}h %¼Ì•Ó˜}¯†¹¬Ã‡ü?âmÿæ0ÊE‘çøµ]‚AUrFH.¸××n7_v@–4<©Î±c9XÜœ^׎}o@+KFß e„fãöþä€{ƒ£bé³% ¼î†.¬šý‰¶6G)Ÿ°¸K ŸÀã?ØGê¨Ê6ؽí2Ø,§ü€ïbꎠ°õüçÿ–oü˜#÷iÚÁÝû1¨å$Ñ<ÆÞT$]ÌÊJI«ßºoF ΧMg7¯H´a«ù|zÐ.r{¥IEzíáG¬´Ϥ êuKÿ«_ÁÉ»%á¶-%›1Pì6K1–’ï{{„NÙÿŒØ+úL‚æ¾ðÓƒ¢hÝ‚~¥Ë0œ ³`30s¾{2ö0æ¸@¨²ãÑûî¿d‡Ÿ‡kÅÄüä²½¦ÃÙæ)ÆjçÒy«ªU@ÁÇ+¯YCshn#G*ëõwR®–Ç#Øu2¹µ¦Ž¦wY»m%Äõ|‡Û ót÷‹ƒ-¦‡´ßR¾¡V$MP Ò¬ÆtaILJµ‰œOÓ;`9JtÃkž6õö‹ìÈ|î6wEÈÔ™NïÓÎÁ¡+wP2˜eç1ñêj+ˆ•Í£Qb¦M]ÿü t®| º<õŽÌl°k%3h½ ÃÁ®‰Ÿ2×[]H3ÿëß8Ôä~S²«¿"ަûü…ª–[oî–zǰ[¦¬ó Š4v”NÝ.2ž¯£Òͺm àƒ£­#-Å(9hûcóÖä=ú·÷³4¤´>Ò>ëúroñ„DkãÛh’õ…â… ]¸±lLú9®‹SÊ/ÜuÏ/û¬ð§g¿<_wå_'ræÈ¡ ´¢/½Œ€Œ{ï6xÏ :Ó0rbüs´ù‰aŽ…TÝ­®Þƒ²d:M…¶4}Hç$Ëÿ1¯P-«Í¤ˆ4¥ødA¤D›)í‰c¸'L“›´\=|¯ÎåúBêk_¿y4µšAgìÃ$Ÿö»2í‡ö Õ·ìò{”H«Äminiaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp000066400000000000000000000075161475701111600335610ustar00rootroot00000000000000RIFFFWEBPVP8X __ALPHð…ÿ¿éfÛ¶ýÿI´MŠdWŠÔ>lÇiÛ¶mÛ¶mÛç¹tض±û°:Æü2Ì9¶s9"&€þd¥ô¦Jql”1š:ÔÆ¨X°¶š cãsKKsãcJÔVsö´a"Ê-<á]ßû÷E7í¿ç¾ûîÙãEÿþÞ»ž°#"6:[FÑÖ§~í¼»ÑÅ»ÏýÚS·‘6ÙÑš¨üÄŸìD«wÎy/"â½sΣuçOžX&Ò:ZM½ï ð^:â=\ñ¾)"­Ódž¨ùÅÛ°!]²€Û¿Ø$2œ2CTùЀw=Îw|¨BdÒÄ–èi×Î#•Þ×<Èrj”¦ÚÏ€ AjeøY´J‰&zÄM€Cªpã#ˆt* Ñ»€”‡ à=L&†ô‡ :à‡†LÏ,•ÿdRÿ$Û#CC§Ãd48œQ%ÓCåÓàa‡Ó‡Èô@“þ2íðKºkŠèûp![ÁáGLª[šÞ Èx¼t—,= d^€Ç튡Úpˆ ÇMÛÉt™ ‡(:üJ1wfè©@ˆCžC¦#MƒWÁ#’׌îˆ?hz|‚;Ñ4µÁí dÚ3ü9xDÔãkÜž¡‰½˜öÍ“mGó»!ˆªà#¬ÛPTº>.—WImføq@ˆKžÁffõ#8DÖá—š9IQýfHl·NN²ü$ Ä&Ïå\’V_† º‚ï( Èž§ó ¤[ Ïݧ;ÖÙ&=q³ٴhõvHˆO|Hi"b6߆G„=~l™‰åþ«ÿH).«‹«¬‰4×®Õ ¤æNHŒ»—ÔÂí±ºã@•°zW¬î>,A¯Åëp°t{¬î88ivg¬v¯%m¿>F7LkC¤TõüX]\WšˆÕÀ?cõ¿ªRDlJßÕÏʆ‰ÈÞƒâ>Q°ÔÒ÷t@â#À‹ûr-&wо8Ý~Lζ°=+Nl³ª…ò•¯ÇéÇ•<%•ž „ØàU¥¾$Ý¿x#$6‚[ì7I”û)\l~WËÓ¦¹¡ç!.xÅPºÐ¼>.W,ÌfTû($Ä$¾0V 6s‡î„ÄD°ûØ|;\ÚúµØ|k‰Û¡|åÈ]xöœP飶¹¼ýÓqùÊö2·G¹êòåp±ð¸êÀjž:äò¶WÞ¸m€;!Smþ>lV uÌ…ú!×ÂÅÀáú#ê%îŒT¥ñ<ÉžÀ½´QÑÔM;6ý @²&Àç¦Ç,u•ûëó?ƒ„lÁ¯çëî©m+ÿ€Y ÿYÝ6 ¨ÛºÒX?>d'xœqP£¢©ëlF': "YÁ™‡NŒî±›<àŸ€dC€ÿ<9f™zɹÚÔÚ/—üz}ª–cê-çF'W>µ/iÏ­LŽæ˜zÍvxréE×.]¸î¥K“Ö©÷l'Žþ >=^€?»01d™ÒȺ¸cfõ —"! A¸âM«3;Šš)¥ª¯Ö\<üK;à¥Wâ°ó+‡/6k}ŠÒ˶ܘYyèwoà|è^ðÀmß{øÊL£l™Ò̺otrnõ!Ÿ¿DDB'AD.ùÂÃVç&Gû4SÊÙkSs+‡¾ö·7 Q|«ˆo$^ÿÛ×¶27U+¦ *[¬MÌ,­ð†³Gбì>çGo8amif¢V´Š2ªlaxûÔÜòÚ!~í§þßó®¾e×Þ½»n¹ú¼ÿþìÓ¯yô!kËsSÛ‡ VQ†YçK£æôüòêúA‡{Ê£ûØGŸrÌa­¯.ÏO7£¥¼fÊ8+“/Vê;&¦š3sóó ós3Í©‰õJ1oSY™\q°:R«×ëõÚHu°ØŸ3Š)ªÌJimŒ1Z+ÅL©VP8 ‚ °-*``>1ˆB¢!!y¶X ¶^§½ÄÞ¿ =®*ïÖÿ~è˜ê€2]ªþ«îƒáG«?0Ó¿ï½QüÂþÆ~Òû¾úJôýfë"ýÀöý†ô¹ý˜ø6ý«ý³ø ý‰ÿÑÖ«ýW¶Ÿô?½…þUöË)ïè?,¾Bvµ7øÍõ<ãÁ[ë_î¼%õﯔ‡(ž>Á?‰ÿtÿ_ýògäc>¯Nà÷ þKý;ý—÷ŸÝÏñ]þ¿pý‹ÿZÜO«¦H’ÉW›ÃQ£Ð®ìAJ¹ƒ´øOâ”±ä²,ªÅ…n(×®‚ú&«R´ñË–æl ‹KÿåZÊ]å=‡3¯šSa£†¯iÙsín‡ç.zo¬L±AûF|q`™èB¯¯ ç/þÂAÊ‹ôâ—%¢Ø‹çMOªóùéõxÈ5ÃçMT@9Ýìª%/ω-Ìœ93Í‚pˆóŒU,\š‚^°W ò0ZÒr§Ý¢á=!:"DÐþÿ܇ÿò_í©gÃâ“ë×÷É3FªV:r‚Ç$¥ñ/ùœù^Ñæ6Ä4¹9yDˆqá/³ñ"^Œ®e<”ý fl•ó~ ”4ø[WÔ}}ö«Œ­Æþ•‰œŠ.µî~[ubHäs~Ýõiã³æ2 Ä„Õn•Í˹çy°Èßì^‰<Ȫ†}v)².£xŸ}5¯´˜pò`”í¹2¬.ÜÌqFÛ%cÙßbp”, RÎ);kÇЉqWÊì)˜²çàÔ«©.}‹Ä•g1nr ªßoVýâàV7Άp«_uúDe 4£Peö™p˜¦7HjF~< ©œ.L+òCøüNþàÆvÀ#£\„ÇR³šå“úÏ¥ïĶ' ×瘾J$ç«:ÌöàâM¦ä+áêà jÙz\Œ“$L…Bv–Ú.eÚ*òfЬOûl=õEqmþ++ôºÉÁÿEp#ÂtÆʬ`*шÔ6‚)8óÒ:ÙÀ<=·áTu¨qÑþ_#&À~êb£}ÿs8Y¢†WC¼Æ…à4Y\¿ÛÐdŒA=òWL2#Uæ„Eï`?Oi&î9ÃØ™ü2ƒ•D¨›¢ø¸x¢Þ<ܘý`JƼ3ð0Ÿ\õ†ÿ‰¢4QÁ¡{=^ø†"K—r¬·}‘R ëÀÕƒ—ÃPu{ÝÍÑj¾j›»ÑA¸K¸ˆu ^ðÐè6ß®ò–ó†ÒZü ¨çjdÊbøÖœ‹|¯ámþ»êåX>˜p"¡ôÉ![?éjùŸ‘È>#ÊHtüfÜeb'5ýDðcž‡6-!qªwù|×Ì™ƒz×3‚ß7ëËÔä éûB®hwÀ(ŸÈŽ¿áK‰Ü¯®—ö¤ÚøžW˜í$¿ð\©ÿ×üw)w©¬-ÿ/^ÅboŠÚŽº%÷Ñ|s {]Ä×ÌÅ0kÅ¿àÿa=¥ÜôU&ÛÍÍz‰4„pv,M¸Å±¥åM壄Õ(qIô‚Ï|?à´ð9ŒÇÿu«Ñ£Õmîbð,f“ÏãcÚ fÝòË(¯êç°êÅZ?šÇR(äH  þœÂÝê” ¹›ÑFä¾EX³ýKîʈ켎Ïç9;罚,»ä­¨`1Û亂}×V §Í79¦ï%mÛ/‰Þ`ã|WìV˜ÉñS“i†½CÝŒp¬ë|Mš7¥ŒÎ>øÑß6Yõüsß;JaÊÊæ\ësðŸBMˬõ– kÃyýüéŠlž÷ñÊ\¾¬-á oécc¼“aOÃz E=Ú*T›Ã BE>¥|ÏsŸJl7‰ ã„-ö)gÊ“~MÛ Øžc,š— «–Ì&,ݰœü’?ƒ‰_ è\k:T^N‡ –¦ù~A¿鸜ÿßóÜYBq»¥OF£g]¦elEmüÛJŠ¢å’í=?¿UÁc*s›ÿÿŠƒÉOSÒ¯9‰~H£w~òWk€—dWŠðG^S –ª_Q/>Û (ö·W–.—L¾äUxAß»]e„7i]˜#ÙWŽòö?ñ˜éè 'OÉ'4ƒ¦i[îí«ÿ¿úVÉIÍU—¶­NѬöQ˱Èä{X­½[±üÉĄ̷ó»nXMpâ}Ó焬Y³^aÍ÷âjý˜`Ò4¡AnÜuäÁDšakºkYBT%߯›5]6/¯ËÝ#®C]¤·!mÓzε|Ë^9Üõ\ÆñûSÇ—<—F¾o&[¾Éxn’ƒØÈe½ê0°Ã”ÇB‰M~æüdp¹˜&“'"}ㆤ?ü(üé:ÂyEi2ÿúŒ9ØÅ—0wwÒ/7ÿCzsxâ`’Òè$Æú‹ãLH¿­ÈàüüýŽ«½' ^²Ù´«Ñõ>Z¼ ï³ô–®bBý‰Â™0.Ñ s²WîxÉM÷¹)ù…6·®ßX5¶TщöØçÐb%ßcÆoïCT¢ëíöÛÕ_:ÁVƒïðrì!4o#åKWñ (á·¥ûŽÊ»Y•MœGeíÛÞpy¸ÝkÔ&x߇m¿+¨‚XˆgcÔõÖÍ9ølœþœæ_ G÷&Eó{/7˜CÁSûKãÁ·Íù„]ùð£`”áìoîoE¶âŽnËA¶X.Ï% 7qYï§äÜÍgÐй_y ýõB<š­—«ŽjY× Äö8Zês"#¬/Áiü@ý÷™áhê%¿V r#òÜ_ôf>ÝhÜ$'ØïúxþæUŒa0YšŒ2ôî«EF`s”„Àb£ÁW~¥ï“G%ÿÒØ´À%ެ³¡ž `’'2À•§Q;k7·q›OØÿñŒßBê:\óýF"cÊVN9S‹yý•ËíúÑíA;ÖÊV(íÐ.*0È14¾Þ}±}ï".ÝI¤"<Œú< Ç­éUOá ¥¤Æë;ª£Z´¾°ÿSBĪ‘¨zI²¾y-_@Ô šÁÔßèç˳åA¤Ì¡ˆÎT'¥áWµ\& Ã(cÀ( ‰n¶TûB0;ÑØyæ#óÓÅÎÆ„Í@#J¿¬­{üÖ£¯Û¡Šùpûë£ÛÝme¾DÀ¬¢Êö®¾…Õý±¿ga°¯«½²Èb ¹]TÑÔÕÓÓgÀžž®¦Š"›£@n¤ªê[Û»b¿½¥¾*U`sÝÈóÜ‚Dº¬¼¼"ÖËËËÒ‰B7#èGäÒr\ÏócÝó\Ç’r‘1n@Æ!‡Ñ€ð§RVP8 @ /*>1‡B¢! t¢r‚X›R²•ìËQ~ùûsàų{hß_Òð‡V¾W¼Ëþ³ògû—Í/ø?ªñ<ÁÁR鋿ùõØÿvÿ÷±}?P:ê£Àöþ=þïÓCöáÛö¯ö“à/ö:éOãe‘ž0xw5»"[‡š‡˜¬}zÄúþ’¦).%ºT¤e1mÓ@Ök0oÕzý‰V ‹k¨@ûµw‹£ê…ñÒÝÒÁÒ­Ïtƒ,í9úQkË­ xçþû ¦}ºÐþóèŠÙ×& ñ@Yˆ¿ÞÔ@÷9L#µýïéÛRý6Íi´ñlPE$!ùz±Æü¼DæœE—ç¼t+q›VßÎnBôØ3Í;kë¿É˜4¸ì\ŒËy¢Z©®½,ñ ×ì ·ÿôâ.ÏnàÂÅÚ ’ý€­Y^~\¶n?˜ƒXðþÿ`ëÿþš¼ÔKæ_ƒ_ŒLFü·ÖÙž_ž¡Þ« YÃóÙÿcÕæMUéúƒUI¿P¯è°Ì1ú]’½Ö²2Ü|¨¤-Ó?"¶ÖFå«Ýi<~AmI'BWòÄmeZæZ„Ä5wDU> "²u äS,ÛX½m>WtÑØÇ‘ËY}|“d°˜YóQO1@§‹d­m±û¦sa £#°c^%ëæ{ýV&‚)Áù³hWSwöÉ¡s*Õ8öR_>ÑQ^ßJ‚ Òh›è\Ƨ׵Sô£ßƒ8a—¥ÌDâøšâw©°¨á¾TÉï‡À°ŠÂTVd¿³»ËƒG7©½ù•@¤x¶D|Eé6€ãØF¸[…‚»Î¡«²ú~ðt_ý§A¿“¿ñtØôÙ¤ŸTu#AâMÍ­VQ‚è.̈́ׯµK)þÿŽe2‰ÂX² ïˆÅAÕž¥ÝcB÷ÜG÷’g$HËatSuD~¶ìô^Òl_“˜Zpn»ÆÆ¬,ºä(Ó,ï~Ð[sÏ]06ö€ÜÑĈ´Ø¸êI„NÅFVæ…F¢tä®ÝuÍü89ÅÞ«NŸÔcømh"mȦñ$Úº9ã²6¸FûÝ2ž½ˆk¸Vó‡î®iIbÔk¯ÀÉ:骦åh­Ìï~ä>êÒâ@œTCüH¦ý€J¨­µþmÿ°{E|Êp“>ü™eÑÕ;ï6¬¹ˆšvy2Ö3·Ã>Aê¬ӿĨ#zBQØBǼ;°9VÝ}xz®ó°sT}7ÿ:ö<é-ûçqUç /^¦Æ³ÍÊ»¨äó)ïŠówŽÞýYQ8ÄRÔ‰ioã àñâ± <橯§û®ÈAXth_ Ù*®r?@K‰\1»C[¾Ô›u*‹°\_O2Ö•.Ëe ×òŽàC*W#Æ¥Awû¶aMHr`,¡|{ÿþ:# i¨RB™ºƒšüÿs™å8>Z×6©#R~Õ³&Òã(þ›7÷mêª+òf#•†¥*Åõ‹ „wbïÌECr$«'x>ªûݨº?ÄLÙ¬ÃKA5Cl§æ(Šr·dÛÀdŽ8*žÙ³Ïs–HðŒŽQ‰ _ W]¤ys…$nrrý"°±{îšJ¿(¾]Z4¨Õ<ðüáÇÚ—GËÎ}÷‡‰qª¹#±Ä»¸ ß­1r#íÛAY<ƒcdÂýòºþ>·SýЇ‘ÖÐý`px"²üõ6X¹I»~ý|/¾þn…6Ofzý3Š.;S×*T,{ÍÒbÓ{×ËÔÓZ0C®í!„&±NãýW®y¨xÆ·ò¨T$÷¢Þˆ š ÈrãmóIÛŠò…•ÕÛn-?ÿ˜èÑ>¸ˆgººý÷FÈðE:#,ª”pydÒ#u¼.ZÂ+d+* •~ËѹÔ0s@5Üo3úwΚYU0Ø¢’Ï‹âP1C-Dņþ+ë]é¡®ßBÞ,®óW\‡ð“—„cßó¶E¿¿üî–Dz$KëÚQuÿ¡‡òi>· çþRW…´’¬¦!mìUN_„¼7œ F±”ÿQ!nÔþïçj’SÏ"»›Ö†zç‹òöÎ]1«)ñ¸˜Ï6%™·\êb“…¡&§øë|  k¤wAœmŒìä€þ{r8ŸMy@¿O÷Òg« ˜+§{Z ¿k"ÐXÔqen¿wB|fÏWZ_…”BÚ8òM ô.‰D§ˆ¾¾Uó05õfTš U~¿;®Ê…N¥<¹+/—GYͰ¼¾Èƒš º^¹›‰¿•t„þŠÿz,—°í/ðǬկÉzËø˜>l†î2ˆ78›<ǯ²´PuF6e|穃´r¥îW:ôhWÈ µc þmÅTÊësBl¤LUÊ Àf›y/ó!A†‚q=›å7Á‚fBèèiœà¤=;ZwIeâëÇú€KWú—î¾6ýXu¼À´óU¾Í;Ùpic_launcher_round.webp000066400000000000000000000134321475701111600336640ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-xxhdpiRIFFWEBPVP8X ALPH#…mÛ¶1Hvw#úöC°%§“„#HÚ_|„ˆHmGµm-ÙÁ]¦ €õ/@0—ßõ@g0–¶m;&Iºïçý"QÈlÛ¶mÛ¶mÛó昕µóÌÎ6Û]¶íêÊŒøÞ÷¹™ñ½¹Žˆ Nwl"H9#IÈ…Öi„$e‡4%ŒÊ)“úú{R}hxÛVaÔ@—òAC€÷?ä }÷Þi»þ îqhóƵKͽ` ¸r@CìSN?î€]ÐîÕó>ù÷g;àUg©g\zΑ}à‚`AÌ`xÚ_óÏ-@° £!¡8ç†ËD’h¯$1˜÷ëŸý ‘\Ø÷ÎÛ”hÄxË|ñʾHnU\8óÑ&Ñ ê^à¨7¾r&ä¡j.zåb 2 ³SÄä»ß½B¨†ˆÓߺˆèø"pñsg ‘•QDì÷ÁÝP*Ð,¢pÅcû!†j`ˆ|ùͤ€..¸ö¬€pÆ×ND Dw[ÄÀ­§#Z×™J|ð6¢ºžqÂe€u—áûÿÄ•hÎÝÎ.2ü õÍÁˆª Çž‚Ä®1• b %0xÁ.1ÀU‚ÈP­é»Â€X?¢j-a÷©`R9ˆLa»A¨óÉ`Á&£Ó ½‡`G nÞ°ð­P f#,þ¦ÍPÇnfXÁ-[¡| °Š+êPGˆ=Ö€˜£ N0I6YøPÖax¿·ŠÀ±áCø¸1òûˆ½È£0s8^ÁßEìC>ÿîaœBãÔËMøe*ƅѾŠXË>*"Ç#øÓˆ}ÈëË ã`å>÷ÃU/^>(Yûˆ·{òßî=²m¡<åhdV¸í/Ú%{ ±–D{Õ¼M!ž·½jÈn¡Ë.WÑÙópËÏš·%Ä“wƒ!Æ‹ÎQÑðA¤"GLxˆjƒÅ=Ï‘eâÊ<´A·"Õòdið.Ú˜‹[‘ñz"Çb:°\Ž>al×"¹bÂuäXN9D¶‰ó#[3X¾ ‡œÅÐy!RÈ.1´ÌX; ™?µ–Øö€åÌpØ¡´V‚Ÿ9£O9…¡…“ æ ÂÉæ-ÐÃÑÈþ…ØÊÀn`ÞˆýwlÅ´w™¿dhFìYæTD6ƒ1o24'öšìÉÜöÂp÷àÍÀÝÀÜ;p4C1€ à”¾fĤ)IS`£“ú'}“‰f=½`^´X+0,zØÄl"Œ6@L…æBJäÐh@ŒPî„ÑbYǰÑh& MêÃÐhÀ¶­m››‰Ú4ØÙ ZåNX›ÐÜ´ÀÕnj"-sG,ZÔ‚‰ÀüV\‹†©¼‰õùòfÉ—­Dî°v¡§&†çæoÑf¹Fƒ˜¾@ög•&4wÿ–7Ã'îh®”>_OÏ™sÓÇÉÕ ®Õ_ ós)¡¹\é_¹û¸W3Èã?’)_²ô—äB+1~> 9ÃÜÿƲ%$–@Öÿ±ÍZ•bù»†)W²ò·e”ZiÆGȦÿ?Õ…–&÷Ý~š[ž¨ÝÑCŒÑz‹ŸA¦ÅC—‹SÑßÿônÉrDŸ¼{½&Ž…Ö[;ü.äÉYbìVëï{¼'1?ô°óÚŽÖ_;æ X†lßuB;j½}÷‰¹¡ÛÔUæàØÀÐW;øRXnÌö\C[ÉZÏÍ“óÂT«­-Ô°è Û_ŠÜ`§iN´ËŠþÚÅ{¸åÄ|×­CÁÛZµËà9q\<Í“ÚÇ¢¯vÐI°|Ž>BAí­è«Ùï– ó¾³k! ãÀP0œ åB81°Æ•¡×C6ÜÉú\+z‹Ãvs@ìzTÑ[ãK†¢G˜X}”BÆ  ؾpVû‚±¬ wFw¬™ã†š…¨Ú„Š@t@³Àþ©¨øÉý fDg’fì+ª­èc0JD VQ‚"‰ÎI4¶ª"_ÖA€$‡6ÁT=2l"ItAòu ªFĺ$Dç˥Š•›–¸\èJy2ÍXzu8±rÌG¨ãI š9æUᆹÓQˆÎ' ‘[?üÁ«À¾üh“F¢K%ÉS¤þñ (ï6ñÙßÅ2¹u)ëÁ–ÚAædIË¿ÀÕHIºÙÍBX¾ãþ½–À.ñ°åÏpÄÝÑå"ÍØƒrÅöûæ`¸ ÔÿúÓͮᘒÔuÍÌjÚ¼jêž5ƒ“%GÀ¶?ýpab#ÆäÞ}AÐ`…Ö-ÀŽ4 ì ,ûÅ·§9õ²Œ.T&AµéÓ/û·¯‘r€ã$‰l›öƒ¯ÏOÞª7brU1’² 8kÎæÚ`A£Û"A4óÿý—Y[Ê¡F£Œ.T¬ ¾îã9kÊÞÉ ‘r€-  aäê9Ÿþwzthxh¸ÞˆÉU9áîfÒšÿ7cé–Tô‚hçæ5KæL›¹ÖåˆÃÛ†ê2º„*–Ëå)¡m‹?üó??ü|ÞN; Lªõƒ§Fchóúµ+–-YU—ÅzY–õz#¹„ª–äÉ=Fò¸iÉ4Њ¾ÞQêÃÉ’xÙˆ±,S,“K¨pIîžR*ËÒPIÂHº§SL1¦èî.¡ê%¹§”ÊX–†‘fBpwÉÝSJž’»» !‹’{J)–ei€Fuw¹»$AȨ ¹§IÄHA#!A2,A€ t5VP8 Ȱ?*>1‰B¢!!ê…¤ ³füè¿fü€ìLæþ#òGò+æÔþû7è¯Ç.}CÙïéþé>qÿ¤õKæúyþk©ï˜?èâÿd=ÞÔúÝôý“ÿÿíOê¥ý¿ýç°òïîÿ¿þØøÑ|%þÓþÊü þ¼ÿéëáuþÁô«å¿ø«¾ãßKŸ7û/^Ðwã¶&õ·<þÕß¡«|¿Ìú©þ¹þ“‘>fÜÑýÉ|™ÿÁ÷cîKéÿý~áÍ©ÿ®üãîÕûwìOú¸Ú²ÏÔô°YÚñžl8óìÖðm¤ñ0¼ËÈ Åù£s‚f]¼ÖIа>¶1Ê©pO»Qq¨þvŠTRþÞÇ÷6AÚ¹í”r'ë~ +l!y„lM8»m÷4;&Oùìd³Ë¡°3Syª§G*ò±Qa‘BŠ…:’¿EYœtн¸XJ˜Ÿ)šéMö£'pæ9@ˆ{ïÈÊÖ‡È7•œ[ƒNû6yàu€|H;šò…³Ir¢'IÕŠcCinV›9£ªdáRkŠ¿”v6«œ-Y 2`&ÅÃÚßÈ!mê4tùéÜõ…;”‘7U€:T·¦Õ¼ýeìÌþüN××Ú¬^Ío‡¢>~Êf ‹´îl†öB³Zú¡doö•Dþú›žþÿ¼_èNä1™ÕªiQuFŽ´¾ú?XÁïqX†vÄüÞPõía ”+xíx¢ãúËÎÚWÕꦈÒ=óIüPCdÎxFeíÈf¦J§vQJ4c]‹®7¿ ïàJKÓ¹6sé¡u°Ãºø˜ñ¼:xßeWfÿˆ·YåP0±Ø£Mg!µæWú<£øí~ûÿ܉7~Y ˆ ¦.¹o ¾'§Àn¢ð›‹Éïçèžâ~5lú÷S>ve4Ý)•q5pZýõ[ W÷ó>V-ö}òÿŽè3ÿ×¥W4þ{ÝŽãyÏü™=&þx¤3ªWÇoþoË%D‚¾·p1Âô'5Öy£´¦¶Ð'rºSvB¹uÂa¼Yl’"ÝWò.UÙy†ãÿU!Å1T¾ß‚Vûx›¼Ký³*Йϗùb|‚m()?  ³µ¿Ý¼¢zPÅæ§qò?òT‚cÛ,¸%O‡_rw]×yú’˜˜ãÝv@&YnŽka„*éû_ÂwMf7ÀI ^érä÷þ^ñÇÆ³ìû¢Ùó²×µßÏú\ P=n¸–²´¬àæùÐMhuÿpZ†ÿ¥PµP]§?¯„ áÇý ¦–>ï£áµÌ’ =êO/Ÿ¬^}º4ê­”»¤+APa‡½Xñ”ò’•Ыð44ø¹PU?Òø Œee1Z±b »ª4ýCR¬%Itc9GáˆZíIÙuĶèo[1&ò¼¨éçëìz%ÜßÒÞþ¬<Œ•an2žl•ϸXaz’ î‘ p”ddõ—à; *KZú2÷Ñ7ýw˜'?Ñíÿh†>0«ÖN|\KÑjù)Ö…qÁæâ:`é[èDCüñ8õ+£›ŽÍ:eÌÅûÄãtžü<0¿pïñäÎ-§sÄÄ ÖÜ™ð—ùÐÕòÍaù¾aö¤}ˆ"KƒT;J{SÇ;8°cEWª’-Ï 6S\\Ý TæʶhVÄJ‚e?¨”×ôtwGbWæ´ƒTÙK~´ó¼U5—TˆBÓ\ek³ÑK” ©"%€®˜‚ÝølkM Ù99{ “løó´OˆÎF¥P|ïXI`ÃÕ8~¬Ã1ë5ÇðÌ‚åæÀùÉD_‚v}RÕ®W“¢]üÿ>]æ3„lW¶2ÜÍ‚·óM²ÉAžw6¹ë0(5:Š!’xi-^ÄàÂ)<}‰±Ç÷ô;1ú´3¼àg;IXR‡à Ú9Á瘱Žä–WÛʲI‡¦?:qª|>Ä zJ ‰´ñí™0zâõþ&\6·¯ïrd@|{ÝH´Â–[ØÎí4rù…‡_öâ½y®¥À³‹˜oý“º<ÁÐdj•ì#¨/­¶×Xpm«K¾‹tú×eú7Ê.1.dgG$# NêC¹´#œ y9@ÈQ'[šíŸÃ‡€¬(®|®à|h /bÁ3-³î¯DÜbÒ€í#Ûa_ú4ŒxCÓG´t±-ò¦Œ³¶„a‘½_A(‚`«xÓQ¿µ4àMQþݼ¥üú^Ÿ²™\É+Õª½ì¾J­ötXûÔä5'Ï—ò¨¿÷ê-ê^1 $.ˆÔèEž‘àÌšþ`ºæ’¦ V¤?¾Ps®t[rÚG§PP`zÝõàë/3É!þA‹X qcw9ÊÁ#»î‡+À¼" (TAÄ¡2-À„ÍTÇb؜ӄŸpÿ¿^ÓɇJ°à†’ZÆûá$¨3<ÞèMe~øeJÒåïöæŠY6>:óç£u#}°¿¯Ïd-÷ÏN´øÝ׌6ŸžA$”.0Ÿ> »ÀTðÐÿó™»,l èpéN îÈŒ)Ù÷h&^ŠíÚN±ÁÒk㪠Ë»ôlÅWÎÞÓ'9Ò]dú!$çÌËñ¥‚¶‘ž_{œ1_¥vÀÍtÊyç§–Xr§;i"4ª¢¡Ú§¡PÄÞÐ¥„9‡öãÿ¹šë¦£1MÀÞ웘*©=wµ`@ÈhÐDᬥëÄ(4 U9fDJØ¢ÊÀÔ1b8´~6ëìz³Ö”'­ü0ìš ôŸì¹‹üaš ¸o  ëE…Í}Ùü‰=ZÔˆ¹ÀY€‰´4ŠÐpÊyYôó™‰<åÚ_éÙ$û¦DH’Üúã|)gÖ Ô›m`>sˆÃÌÑñU'TWpÑ+æu&5é¬-¡u¬q'+ƒß'PÁƒk*’Ùr[ƒäd½YY-§8ÊüÆ×䣖`”¸‘O­#êš?[ÆõŠ[[ÐHíÑ,}à¢!51p\Zw1•pŽŠfn·Ñ¾Ë‹Þ0„þ6Þ¾é‚Ì4QZ àBfD騧H§’îýéÆyåé襎/k7aÏٺʈA‚Šr 5NÛHè} ;Ÿþè©)¤|¬Á%@]Å"5ÃN™~\kž ÅS!‰rd•ìØÙ'‰Ê$´;ï ¯P”!ÙñÏßSlìTÔ#Q˜¡vÊ9¿PYߨPœv˜rgl³€í˃)ìwkBŽLq uí«?™g|&KeÚ¨w,e`˜ŒRT}Ï€ˆ ,"X ¨3‚JÕ !CÒËEB†T,ÔÅ¢ÕÙ6 U0ÕªX@ePøàÿÿþøÿÿ¡²ìD÷X(‰&怯5©P¾iÇäÀdŸhF¡|ñãh™:ƒWé…Õ…òúÔ‘µ!Cê=L,<0ÕÝ‹mxrÔæ6G_|{JŠêRl.?ªr+ ŽK玬@mõØ;Э(<à†1sëŠè^€óWîÉ&²ÔÇÏ,¢HvÈÓ°æ´µûWðb7=»¼ú%•$oF¦s¿8t…^¹j̪øSe$r€KÍ1ŠC"!!Y,À ¦àì ÆPÂnøû[៵ü—üŽùÌ·¿³ü1òy'hf÷Ôê¾íþuÃõ-þCÔõCüïåWkÏ쾈Vÿn}ÜÿézÎôþyý­ïú?ý¿`ÿØ_Zû_¸_ ÙØØõcÿÁ{ û-°Æ$óçÚìÎEÆß…Á›4võ©Wöø†ýL»d§%9%#Qô JmýÛ¶^~êgï.eQÝø†×0I !áÛïè'¥Ô°v‘òû܆[ÿøoè„b^¨™á÷W¹ÊåNËÿ÷AÂhÈÌó݈¶ÏäVû,|Òw>-93°If##èA¸Ì7i’Te÷Ûã~1W‡Uìµ…©Âí]%¯sÄó°™3¬$„HèìëÃ5x_!çF4Kô&AD5ú,z“ب…åv3ó6 ü§¹Ye'Õ PÑ]¿7ˆ3Pú–ÆôJcJÉ5ɲ•”Àà* þºó0úEýüzn)La÷9ÿô½ŸýqÊx]ÿ×xêv%©ð ÎßÿÿòLâ²\F‰ÉSs¥”~ÑO²–š¿š—IE!£útÛo! ~ !7-­·ˆ¼ä•2m€þðéßÿÔ_.*[QßòÔ.RÄçõÃ`!²˜ö§û¯4û¼ç8Ï}þu…ü,uL•ÿÇl‡`II¿æqw#ÿÚ=ÏjÝ©§Oÿ –kĹ™¸œ@¡¹%†ÿ æºóØÈêÝ¿ð$kÀV(ЩŸƒà0#UºQ_ž,¢^ý¥è÷£²$[ãöò#IÄEˆ» 5~¾ÞMŒžRˆz÷†¼-НpJ¹¹;­ÖcÈc&eN’GÝ}iXñCÃ1\×xüÖì/•ˆñpôc?;/§Z€‹Ÿ?Ù¯u=apºqœ'È6üê>‚¥Møè¨TQ}Ö6ŽÄZPQ="̤Vt?¶¸ûŠÙGßDx%…ûÍýÆö~ Y`Óè±XŒû 'µ\ð8n¼ƒôuÍ~”5˜.lV†äø¦¾ ëtV•i¾l±õ¥(lÊ6é,²<µUÂS¸þ^>ÝÕCÿ#ºèïZ®îf'Yw_ø¤Õ×€²^5;Âð5ï‹ï'ùðÞ–Ã혻ŸºC¢žÊÒákÀ}ý9 ±±0÷H#%Ð|F\à×zÒðþN®Ý¯˜˜?ÃØ©“I¯‰‘‡ó.où¶JÏñÓ]ä.½B9Ò$EÝ!†­O*}™ÖyZ$?”7¦®íæ™?Ø\Œå+½›=H—<ØZCþ}$v¼jÍÄWÔ,–f0àãÙq®HpúÀÅK;Æäy§ë8 8ðd(s½‡$‹¢ÆµË$î¥/Î9E’+>ØÇY!”¨ÐC4?ÆsA” –r-ç­–[”¯…AÃnÞ%þ×ÿßñäÿÿ¤0qÞñ_âeºþnÑ¥7³8O¢)›3}Š*`1ÒL$‰Çz§"<â»C‚ÆùÅfi´c |Ö©iâç Vø¸­ÀScЮ†Ž}4­eq®Éo‡‰Qhnma²â}ºŸ¼à~CÙ&cH¶ 2Ôß3…º×NÉ‹|7¦_Øœ\<¡#hß’B»ðŽxP°^deo ß ~*¼7Ó¶å B{æ ©?p›4žscÜ~½á)"ùCpFíG¤É‘MãW >•ÎP»bˆ?¯ä9 (&žÚ'UÞãÑÿ•ŠYݱ–x€INÔÁâjõ ÞÈÚ%seà4§ž˜º§(œhi«ùó»sÌø&;ÝT]ÍìXªW£-#c |KL›³!5àþX %ý UÐ6hVæíá¯Äègòâ:2ñ3öòê´—áT=“/xË&•5ƒò89Û”НwOH"ïvÊ>}J3×ÇNç8˜‚©£Í[+![Ú O^ÓKÍáÔW’ˆŸæ ýð/rSÙߟdUaÔÚÚó1ªÉ ä;9÷ûÔˆZ4'­–KÐkô;½h:”ߪv%>Ùà`!ä9¸í¹ 6w;qœ¤`asFBì*ÍÆ¨¯èNH¬]KÇŸ}Qþ¤—r Œ`x8V~šTò— lÒþÅÿÍËsÇ §¦Å ˆ¤êÉ[ÞF_:Ä¿-I›Ç´“ ËÁ©:DÐÁåƒGÊU‡M&Ïi|4—]ü´KسvŸ™š5hý@zê-6€tÆÅû*[ÚN^¼¸Åò"'aŸe¬èÀ7´@/hKŒ}Œ2OjBR{­n˜`Ÿå·4$ýER!'#°Õ¦]:Ùÿ) a;øg°›næ´CL·½ŒR8& £(¸w ÿ¦?”±<ä)ä=’¹8­2ósÅׂmo¯NÌØÆQ#.€AÔ`ÃZV!G­²N«£M{ jm—øÀ IzÛÙúp]S÷˜zaàûo™êß-Æ¡`=RñE:¥òlNÿ¦Xø±‰g‡ Îg§¤×²Nªs™”rEÂç„} 5Œjr£G]J^0÷Ë~P·œ‚j°ÿDóãÞ›ègõºuê‡å?bÊñ:·ãn ®V5{ýˆêÆ=QZZ1ŠyØ'Ú—[þâØîCáˆàÎçâ…HÆÉÍÌ}â, Ñ&jïV$ ;Š¡ÎóåÒ+pûVOda¸,—\ÝÓ·Ò&@×0ôpË›/~y!òp¨ïB½èí›’Üÿ6î˜:Ov٦˥ö‘¸ÆÛëÒŽ¼'˜õ†3Ü<þƒ~ÎzJÑîsô”@•†½y(bBÌ<ýh¨»º²D„4ôX‡òñcÁzò™!7£ÁtáâIV;üs´¯jVÎ(ªvHöì_!9*)ÄyY)¬œ,±,¦>aÓ¿½?Mº]Y:9üM„¢^O­r¿ö=ÁVq€ ð:·j7W~Ƽ™àï^ûÉ„WÓ—a…,Mþ2 j½mÛþ 2Zªš½x‡qÒEõ kN eŸ¥¦ô¦^mùç¦Ä ž„#>Ðk©“&³*ü„zlŠþ/÷ç¥/"‹cÌEÞåšÎÿze(‘9Ãß’~Û““ñ'X­À=1œt{68Á†) üï¼Ø h®=_‰þÊbÁ*rìEVõL¹*ˆîxlÄMHïÖé¿4¼†mð ±yNñÞ& b/\PÐ,¾ê lL§»û’ñ.ã¿Û¾eYGw!Ç•“ÎÒ«'ݸœN .GtX·Y£ô L¬©ÆÍ··ÅöìÜmLë}ùÁ¡ø&Ý÷JŽWæTÖ+©¶DcUºP/JS§<ÄyÂ;KèžOpQþ<ÇS™i]ˉ„3þ+rÀŸÝÅÜ¡&!ù›¹=ä¾Ì^=â¢=~wH3Yçw}×ËÇZLÔ†oÝV˜LボÊSWî¡/óÌÕi Á‡K6qÿÅϼ’˜7;Á`G¹Ç®9‚ý® {¢vO^¬¿Äâ¿øíý÷=.;¨•¤ø§Ø2ÃÖº£÷O™˜ÑÎ HÝi‡æ5)øœ^¬ÿAï÷ó¾¶tD$©”šv¯|ª©^ Ã‡~·“&¶)£ü$@ÂY%pâÚv·v¾Ü4cÕB%¹!]Ég¶cˆ†ªÿ³ÿKsjI¦äsÈ)Ïåé²1ÐÖ’þ¯ô&"´[@G ]VO«W[8ˆïœ§“‚ΖªÔ¿=°³í—Øÿ®õF¥×囸v¸Â ‚ÔèI¯ê¹3è ¶ò5´0²Õâif,¥ž»Ç‹ ±|ãp—æü®p€CŒ®OæÒÌ_Û!Çuy¤öxgýâsV rR"­Ã`’ïáÏï2É=]éXßíÛ8¼üÏÿyç‰uÛÓ™×&ÃņX8|A„Y ã› þ”¼£º‹wUF:»Shóg¿ÏfË8Ú,(¶7?ýè”¶tG›'€¨],81•Í„™~ÀiÊ3^øW».o Ä6ûðûëg„Hhþ7AÕ7­¥ÄãV$O¬­ÅƒaÜk1e'ZÚfçbV®ªâ[è® ikÙ7ŒÿMg °Ã¸ízWò/å—ÊïsY¡';9ߥÂÒþ™:õV£ ûìtMž4CDv› €8æŠw$PD¼ÓSžãòÃcÃ;aFˆší%÷38è錸»ƒ³6’㦙i‘€ic_launcher_round.webp000066400000000000000000000171421475701111600340560ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/mipmap-xxxhdpiRIFFZWEBPVP8X ¿¿ALPHf …mÛ6í¤óÿ‡Û#"ú×€¤7^£Áæ’ö_!"R«I’$ENFõ®˜™™™o,ýÿ/R×IÕm6W"&`þïÅYÄUIóÞü8–&\é¹ø;>µˆ «RáSßq1}™d>û•5ô…‰\zÖ|å³€&Vô\ñµ+©!&´¢rå×®  %øðÇÁÁÃÇ? šD2[>y}a—ž‹>µkâDåæbâ øÐ-Ô˜0‚Û®¦/LÅè¹æ6Ðd!nØbJl¼¡0Y·^bŠ ®Ù6Qλ”*¦ª*—nŸ‚-ça1eeÎÛšfëF,¦®Ì†mx˜ 3Lí™ xÕI¥ i%J'­.‹ž)_‘Wœœ~'YÝÇO1õO_Mž;‰§9uÌ«Å>J;ŒW…9¶ µ€Ø}¯Ãk„[ÀÁ›‰ÇÎ/¦ ¼DçqƒgcÑÌ=͸Û/½†iFóæóx¬R'¦1?JŽ‘;þŸ.[";î¢óø$÷ï&iÊdÏÝŒOzÏÝ4èý³®câÎÿLçÖpÇ¿eç1áΗ©4gåµÿaƒÕ>âäYgªø–5ˆ†ì:ƒ¤†øŽ&r}ž@*Æhð ²4Q&·Ú~™ ¾dͼm ’2ñnPA¦]Š”å=d×F&“S&CIÔò¬6'‡:¸¤D\2CC/Y”]D+™´­HÖ­di%df ²Ü€ÕJâdƒ)ÁU4õ²RÞ²¥­fŒC—žDí°)òRÚª×$ˆ€.ÂÑPNfAâŽK°ÚIœÌ@ËîÂÖšbb‘ÚŽhhȰDLDÄF{@„ÐŒZ«ÛHPÊ 4W1ø ´¶¹:u$(ÍÕÖ ïÔ\-Ak› äÒ\I"n-z',×Öª–Y¢¨ÙZîÑR`4l­aÏ’Íèlk†x)0?ßZgϰd3ºµÎœÆKINŸl®9r)Øs­ubh/Á´Ö‡ýN ïm­ƒKµ¼µ”ØëðRHïEn'Ë{,Ù~kŽ–âän{INï;LSÏÍ:½“ž›Åídöqâw+_£©gÏ*Y²ñK„[ÉÁ«ÆK²3_ª4z!m/œo¾ECï%ÍÒ]óð+¸•Ì®·³ú2òIÂmäà¹aœƒ±óé^­¤úTb¼pÍçwÑÌ{ŸÌj–n÷yø©vzé­ÙKéúárðè(ÒœSŸ¤8zöçdÜ×7Ÿl¥Ÿ«#ã¥aWê„ÛÇÁýCªÍ¹:k½ÿ€ZHGæ\m÷ýìC4ñÓ/ô½ísÁÙ«þ7‘­“Áÿb”æœ%‡®Æj™«8$ˆ®ß²£}¶^x¶C,¯ GnÛÆºjŽN,«šÛ¾®ªeT×^x–PÑÉ낦+GêÄrK°oG¤ÚE© v#i™t:ueаqIÏÀ å„wo'Õ*Jv¾‘Ë.Á@'.v‰ F @Z®…ÎÝ3Jµ‰R›^K³ÒE/ 5Î?FÇŠ›½*V‹ÈeÝ. h%á×wÈ-bmÛåb%d™;³&. h%À6~v­ªZCUëŸIÙfedÉ];‚挭{û’€V0é='ŠÕ.óo’˜q´åÇʦµæ1ËfL²Ô×6GSgG%ÇÄàž=û:·„»Ã»è a›|ò¬¬VÕ?𲯰3òÑ·‚C§Òflí¬:ùÜšh…¼z\uÌœ=»_È-`u¯½NŸ'p:ó™YqÏãi§g;³âûÊÓÏ:r©™ö8 ;{åÝGeM7Ysw§ú´Ñ8íìÞ}’©êîyõi›qwfö:u×z<Í̺»æè3ÓŒŸ³Ö‘Ž S=ÖŽQ­iÆ_dÖ:‚4­„†YsU€]kAVð42ÔÄ£¾V›Õi€n­6z;ÒôgÎ* ͵Í`°–Á'.š2'O"I¤Iº®ˆ^¥Œ©b1wƒ wéº2À·ß†cšÀþ3¶AÈҕntÅ{–¦„a~wbi¼¢”®t›ß½EÖTpphrb (])†w\®”&ž-v¿ì’^8 ¢DWJÇ™Ko€&œÅég÷9«m˜ H%ºÒ)|ÓùªÒs³Û‰™˜’"J)]áð¥×šXî˜â+3ž HRD)àÑUak"%ðÒ=g­Ñ3Q%Q¢”àÀ¶+7*ÑÄIûï{ÜôY3=iI%ÔÁáí—¯ [%)œzè¿GfTÁž8(¤ˆˆÎ'N츤(ÑÄH£Çþu—£¯µÖ´Í–Byÿüö #M„t¡âMê¨Ö>3ÍÄÖ¢¡"vŸØtA˜Xe™*Ì?ø—wÙÕ¾¯5m{RI,P1» v̈DZ56!ŽüÏÝ™£Qß÷53™äÐBT¬}oŒ6^P%­ÛêË÷{95õ}_kM{¢ âøóýô ÒÙÀÞ§îüƒYÃhØF}_Ó0é @€#RºøC¾é"€´¤1°­ØûÂC¾åT‡£ÑhÔ×´m¦ XÔ`2Š%.}Ïû¯¿x -–É+Nïyù±ÇÞ²­~~4 G}_3Í´ÔÀ†®„%6ßxëW\°‰Eíe‘XôÄþÙ—ž}ñ8¶²†Ãá¨ïk¦™ w0]ו®+¶¤MW^}í%nŸYÏrŸ9}xßÛ¯¾ñÆÉ´¥:ªµï‡Ãᨯ™ÆLW-À”®ëJWbP”BÄúm—]¸ýü­›6¬]Sº"\û:œ?=wìà‘½o=‡ë(k_û¾ú>Ó˜é+À.¥”®”®Dé" @е3kÖD9ž>›6`gö5k_k_kíûLc¦¶Ceñ(±°ÐQeÎU.ôÔ\X³.žé´m¦º$ED‰%"’ €ÒiÛé̬ ²f¦eê -ŒPÑb¡ÅA€Á‹çb®ÎôBL# ¡…¡PH±a0‹¤N§bLS „ТHBB,46¶ñ¢ƒiR@Xc Ó¶b¡XT€YÔ,4VP8 ÎS*ÀÀ>1ˆB¢!!:]œ ²7{H€…æ†ÿMø“ÜÖüŸ÷OÚÉks÷OÁ¿ÿŒØãù&^}~{íÃè—¡0Ô¿ö_ÕÃþ½w6ýõ ûÿþO»ÇûÚ?zâ~À>@?”Yÿÿíoÿ/Úû¨?óÏñû}s?nþ?jÿj~ÿœjÿ·ùÿÜÓßÖ_ì?‹?®þ\¡égöW·Ù˾ç~‹ú·¶ÎÍxz÷z´~]ýÓ¿£Tßù¤¶õã¿¶gÔ?ÑýÃ|®ýCècéßü>á?Ì¿­ÿ¹ÿûÑþGæÏØ/¢êªK"¶fÙˆx¤.‡½–[] òR:UˆÙÖh¦CÂvØ‘ñh̶2 îkOàƒþ=1 iXGÔÊ©ÕúÏ9úŽä<ÊÊ;x¤LòßýÆù(ù› –,‘ ·]%ÜÄHŒ èã1 H˜˜c†›S+  b1=•ñÙÖzEsŠÈ.ºñ¶š?8Soe¨Um*/ós?ÿÓ¯Ý@ðשö×¶’;abHó¾£ ñ«p–Él—\.íÄzß\õ,q'œ¢ëÕý|åŽõ4³‡,šî0é™[@UyUØØÊ^LáD£÷y@Ùz÷1ÈJÉ•ž •žþv™.gÁå5â>™eÃ9üÞV…p7@룔.PapJ9GaÚf€Þu-;ìª~ÂonýLÝ,¿ª]ù‰TÓçÅg7Àq¦‘Þ Î1­²~RÌF”{æó¾Ó1«™«KhÁÍâyØœ·ÿqº É{oqS&›áz> :Óë¬b‡Ç&±ü{Z#’,ù’i¤•öÎ÷ ±ž~ÝWh~çÉÍä¢ò'H¯ÛͰnp?³D稘‘ þÿ d?”›%sÝu!cägHà‹\(˜Þs0ÕóÔµÖ¸ç€teMÐÓ{à5hø¶ä%ô!Ì ZtáB > ÁMß„ÖÎÁ¯Á4Í¿qf¿¿X'L,0[ÀKjTf&Âæñèíß…{‰2~)Ò `¥çue^u¥ŠÌ±~Ú0zv¿,Ë·ºê¨hIc*¾(a^bvøb¯îÉ4º†´æÕ|ØVÒis¾+Û>!h—Øò¡À‘œáiâï„ÝuœmôCÝ2IðÛ ($Ū3a¸&ºîZÕÁ9§sĬó«GÇ%’+›ù*ë’œcή3FWbèUŠÚ¸ZŠKì2 ˆky"ã™ `ÿæµñ-rî£FD¸´äºj+_é¾ß˜\6ðñ 1ðq2ã Úx}_ï§LF”•±yI‹Ê‡qN½Ü­³™_¶ûOýƒN¹€¡hr5‚k™PáoNÈRÒë ¸È …¼¥Ý€_p`‘Cãæ ×œ”ñ/vü¬ZšéG ¿àfê ‰~7§/¶Ÿ¹×"ýlÿˆ™·×ËÃQ*þ :§¢ï…Å iÄ:º—}¾WvÝ‘¢`ÎŽÿõêjÐ#ƒ£u³wÎ"å;r<(’ý¡tÑÿûWl_´Â!\R5#:¥‘Ÿ“X"4ø~ßR$ºž ò¦‡K¦ÌÔ4q)ZÇ2•ŽQœžíÚùÉ O@ÆÛýM±eÚp˜M¢½Êñ®.vÙ~UÑ¥ïXâcdiˆå¨¹öh ÅUz¨Gi'êdòÁ“` ûJͲëø<åŽÓ¿ë"“7?‘Cøå0C{¸ñ§ÐóÂÿk™‰;4Ÿ¯sþÞôqÐBªïÉQ[ÅÅ g)rÆ&<7tV™W{ŸZ†!å³ï2*t»2pò€7·a¢æqMî´‡¢IËË+PœJÄ zÞOFR½âÐãlL…ƒ°*ßЖҮ*bøfÔ“ñW÷®XQ¾lâŸ9cÀ¢¨/{Û B\A|çŒþL¡ÃÉóÜt59FŒ†÷>…ó‚A»i¼Š“LDóìbFGxÔÑ–åK‚¿}ÿ2œÛ )B–¿œ›èQªL"§ÃU0_溲þG_¨‰£Ž²ÃJjqH+ìäóÅۺʸ0§Ü\}­%¥÷;:¶,¥…€Y-y!8ñè[ÅwóKæ›7ÕCþ%HCš¯ ÿ®ã;#ÓüÅ2ˆÝáÙLië@ípú yMŸ„cû§Ç¸Ñ|4”g.’19ÕbâÈ/m[¿ˆh;Ëÿ*o2€Âĺ7oÛ)õ ž¢B{bW‹È|wM«¹ TÉ{R”œwÞµ$´àpõ»¯þÿ¦ÛcMY ;³™³5µã½fŒ+ýúõÕ…Ûåüj4ŸÓ¢Ró¤vS×ñ¢–'þ‡„yàö "Ð'`É ?"$:wr)^­ç«|WPÎ8R276£i†ß£¶eÌwñ°…(æV‹ª_ q‚?ÅÊñà|dKäª~$´|v}’ÄPø¸8ˆîèÀ.PËÖrÏe¶³7Ïëºm%:ÌÈK‡š¨Ïcé š_–yÓÙ“4ŰäVmëLcM?5±¶ÿÿJÙìë#ã"½#€»„õŸéÏeï˜ýI´Gö·ÌúK7k›ÉuRòêæ ¬æó!(xBjF¦dHÀR3|þ‚G¸³HY*›î`å–U'§êB¶pãiHW¬·?3¿kN@eÿÄ_0ºž0Õϛ˫6’o$yAÙ$  ¿šŒ½ÃÇ‹õ´³¿eWšõTzéíF€_0 n' <{¶·kîL Žc'Éf§úˆÒ½.ŠÞ³a«Jâ/+ ´á* {Óì·ï­üý&²Pbÿí•ùþÞx¹‚é·ì©NÊØ°¡ˆìŽg˜'àD£´€x Ç?Â_œ³ø´Ô°xt ó EÅ4‡™Cz·gª•`!v1ôšK0¶I%ðË&ØÞ&‘2¢œIÜX=(`†¼ªå{aµ¯¯òîUxÿ ?jPøÔ(Ož÷YÀàÝ„JTåù3ÕÎûsÀËJLmŒ¦OPõǼäçÜžÇëTûÏ8}cÈCÀôÓÒ ƒ%NfË 6+K’³¶L“£Ù;¬žq˜Sû½õêrl«nŽ8áL¤©ÿ14òÅÿ,e1yQd¼?ÿÿæ)\ 2蹸FÓxõ°ùvJ%¸Z©sº+°mV ©^‹·X}§ìppÔ§¿¿ñ’åT»ÐÁ‘ð¥E«-óé¹]ˤ­ñŸµåËA­¬–óŸ0ZkvØ±î¥ É´»uÜ27P u§ÈöãAïÇ’*ë¤Ûu2â^Pùk 9)‰=ñ)v7žîÈD¸¯x´ªÀ<§…KU ’ £P¦ÿQö“Oò>€¨-÷®×´å©l”j©Ú€þJWa‰ÖÃiÛ‹OJå7œ>ýךýÀ·Ñ%ÿÚ¬ÁùzªnIÕ_ÇSHßI¢¾äh‚s-!ѽaGºã¼÷7bMÑL@#zÁYpŒÔUŸ‘¹õ`î‚ZR§ŒKé·Ùù7êGŽ!?Šy [QGå~ûxo7Sö×rOJå'²,ëFhåQPn]Hìy~—õG†ü7h-°Ÿ|£×ð—$Õ‘¬_Ð@ËààkzBqveô¾ÁšéÁ*€‘=7ÆîúÿkŸð:;é`ÎįLÇ?Aþ‰T»­æ„·µV=ª AÁåĽ 7$aìRS_}cª}í¸l x Û‹]uÜ–“û‰6qz9Ô÷ùŒ$º/} Ëö:øAB"dðE&¶ îÎÿ¤­ÒÔ|¿tÀ{œõ¯æ^úÞO¶­¬¤v°Œ27س½MižW+²}¯%õ%»q¿ ÐÕOåŒ'”$é5Æo’@£´€íÞ|²ó[Í‚¬‹WfÒ[â°}ýéÂÉ¿÷xWÆÝîuâß,ŠVÍ+ùC¶F¾õkІD³š±‡J§RޤîÏߣã4Œùëæü UÈô=rÇDL.·ÍI‚? |{ÞGIAíþäC1¶ »96²oTl#¦¸‘Ò»Ö²yIµV½:dJñà£ßש"¶üÔ,¦Ý*‘F.TüB’À=±{|ʈšé{Ÿ´,>GùŽAÉåcÙ±’é% _yB`óÏ|ñ¯í:_+c| ”"Àãϵðã ôíË.7ó‚ü'sÈm¼å%Ò¤® æÐPñƒUÂçãL…g𬠳 ºâÚ`ÇÃí•w°¤zDs‡Ãsiª…ŽźŸ_P¼ªüZ%¡ö5žÉEÇò7,h\8aWhÂ}V˜¥Q®UªŠ£šfcÁžÂʘ"„€N©âŠÓðÍ’êøCWC4Õ½œÔ?”½±Õ”Új{Þä¶OÈ«ªKöÎ $)¢­B"$òâƒü”>¾·Ü¬iÙˆdðÉÑäÍGÊT-«æɘÆ’M^Ðõr`,×74\𪀖HÇÖmÁÀŸ ~±=ù=(á4Œ Q9SÝZP¿ÄÅÔ,­%fç+ìn~[nS,˜u ÿ¿¹ðE9½”þúço¿.}‚®B_zxĤtGLó&àý‰«Em_m&ÈåµT!½ü0þÍ“eÄ Ül뱩WÿÏÞ3yœÓW—Ó®÷rÛ¸4qˆð›:ÍÒ óÙØè êï›s®}÷XÒx×;ØWaPÞHH=ô ¾ÓS~Îe3vhß™ÀìqµvöÃa(–ž¢y{Ô|Ä´Ö¤ _£#ôÕ‡ØùiÄÔO–°øfΕd “3GB}Í3iü¬üûÞ#§Ó˜ ¦Ðä­5’/JÕ÷³« ,¤ =©Á9Î'ÕìÝx=¿®Ù?3ÎzoÍ€ŒEãáÊ 6¯zIѯ¼&1$Ûk à*NNˆ°èèЕ8-…†zæ¯^T·²¿‰³Ÿ†ÐaÍzé>¹)·¸—@¾:¡ÂÌgoÌ¿£sdÖÄ8+Óµ÷Ý]wÓ9J9Fç`ó‡¹ÌX,Ÿ5e•΂ëÕüoZ¨ ŒDMÑ×I™šìI— Õ\:Œ‚Ï|}Y™L$.ìj¨bn¹—V0†µ1¾é4ï Ý´µ1ªåM]¸¨ôg±I¸y6X°c¿ÐxàšvnFÅàûµmæ²LIF؉ñ!‹r[%'ÍŽö°AÖYÕÍ[ïÿbq!÷ŽQZ? ð±U….+aj€Æ©^'7®’³ ¨*= ^˜Úú¿ÙøEƒ ÿ!@&±ìjv¤– ¥Q—¡UòvÓC¯WCÕ×R±ZÖŠ°XÁ=qgÌ”<ºJÍîí"i'fµþÁ~‚ºÞÉ»Ãu¸Ú ”]Ú¨÷:…2‰ Ãë¥yø¯ÓV›ËZ0«R…€»Oãô®,®n….´ñ³µÿzC¤ýt™Bʧ°L ÷Ôš?[LgBVÝöÎ$X~Oσ¸n‰ï³¹¾Õ°t³ž… #Öí&䍨õ!Ê!Ç©‡–c€íi„á~ú©Pl!%ÿRßÁ²¶ùµd;½òòË?%7Ñ\úiÑà}רK@D9syCCç¿ì0ö´ <£›TP}Ã($»/æÐminiaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values-night/000077500000000000000000000000001475701111600272175ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values-night/themes.xml000066400000000000000000000014571475701111600312350ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values/000077500000000000000000000000001475701111600261105ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values/colors.xml000066400000000000000000000005721475701111600301370ustar00rootroot00000000000000 #FFBB86FC #FF6200EE #FF3700B3 #FF03DAC5 #FF018786 #FF000000 #FFFFFFFF miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values/strings.xml000066400000000000000000000007351475701111600303300ustar00rootroot00000000000000 MiniaudioTester Automatic OpenSL|ES AAudio Backend Starts playback. Pause playback. Stops playback and uninitializes miniaudio. miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/values/themes.xml000066400000000000000000000014571475701111600301260ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/xml/000077500000000000000000000000001475701111600254115ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/xml/backup_rules.xml000066400000000000000000000007361475701111600306200ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/main/res/xml/data_extraction_rules.xml000066400000000000000000000010471475701111600325200ustar00rootroot00000000000000 miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/000077500000000000000000000000001475701111600240535ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/java/000077500000000000000000000000001475701111600247745ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/java/io/000077500000000000000000000000001475701111600254035ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/java/io/miniaud/000077500000000000000000000000001475701111600270315ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/java/io/miniaud/miniaudiotester/000077500000000000000000000000001475701111600322365ustar00rootroot00000000000000ExampleUnitTest.kt000066400000000000000000000005361475701111600356160ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/app/src/test/java/io/miniaud/miniaudiotesterpackage io.miniaud.miniaudiotester import org.junit.Test import org.junit.Assert.* /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/testing). */ class ExampleUnitTest { @Test fun addition_isCorrect() { assertEquals(4, 2 + 2) } }miniaudio-0.11.22/tests/android/MiniaudioTester/build.gradle.kts000066400000000000000000000003321475701111600246020ustar00rootroot00000000000000// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false }miniaudio-0.11.22/tests/android/MiniaudioTester/gradle.properties000066400000000000000000000025021475701111600251000ustar00rootroot00000000000000# Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. For more details, visit # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects # org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=trueminiaudio-0.11.22/tests/android/MiniaudioTester/gradle/000077500000000000000000000000001475701111600227635ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/gradle/libs.versions.toml000066400000000000000000000020621475701111600264600ustar00rootroot00000000000000[versions] agp = "8.8.1" kotlin = "1.9.24" coreKtx = "1.15.0" junit = "4.13.2" junitVersion = "1.2.1" espressoCore = "3.6.1" appcompat = "1.7.0" material = "1.12.0" constraintlayout = "2.1.4" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } miniaudio-0.11.22/tests/android/MiniaudioTester/gradle/wrapper/000077500000000000000000000000001475701111600244435ustar00rootroot00000000000000miniaudio-0.11.22/tests/android/MiniaudioTester/gradle/wrapper/gradle-wrapper.jar000066400000000000000000001635031475701111600300650ustar00rootroot00000000000000PK A META-INF/PK Am±>=@?META-INF/MANIFEST.MFóMÌËLK-.Ñ K-*ÎÌϳR0Ô3àåòÌ-ÈIÍMÍ+I, ê†d–ä¤Z)¸%¦ä¤*„%¤ñrñrPK Aorg/PK A org/gradle/PK Aorg/gradle/wrapper/PK A•%Ó¦¹/org/gradle/wrapper/BootstrapMainStarter$1.classRËnÓ@=Ó¸u1¦„ôEy”@_IikÁ6ˆU‘@.,RuØLì!™ÊGã ü6 ±àø(ı ]t1ssÎÕ¹÷ÎÏ_ßxŠ½ó¸³ˆ»îá¾M|4ži£ÝsZ«}.à穸k£ÞŒ‡=eÏd/c¦ç‰ÌÎ¥Õeié0“c“ ”=<ÚO¦õ±b»í+7.Pÿ£ômïB%œÀÚßM• Ñ-°wźláƒ6i<øZ2³93Ööìèê³#ð‡Ò±w¹Úºl hÂãâòø¹æx8F×èE´‚v~ÿÄ—ê9à½P%pw8Ð.ÑR3êSò ѵ²ÜAcî+jŸgèQEoN SzéÝB£z÷±Œ•ªÄjÅ\Ã:­‡ÛØÀ zQ^ÅÁoPK Ai,«$ -org/gradle/wrapper/BootstrapMainStarter.classVÛSWÿsÙ°,ˆ1*‰‚±BI/µV°V(Ð-m´Ú.É!¬nvéf£Ðjï­½<÷·þ ö%Ø2µÓ—v¦“ãô;»IIb¼ÀÌÙ³ßõ÷]7ÿ>ýý1€£øIF2^à C˜”0%cïÊðA•0#aVF —d\Æ{2æǼŒd\ÁUq¼BNP®…p]ÂR2"¸!c7%|؉^|$A aQØÊ‹£ .aIÆ~ †¢„eeÊ4¹1´r™—‚§tSwN3øÉ+ þŒUà ÛUÝ䳕Ò"·çµEƒ(aÕÊkÆÍÖÅ{èw–u²‘T-»˜.ÚZÁàé»¶¶²Âíô9ËrʽÌhº™u4Ûáö8C ,® ‰ëê-펖64³˜Î:¶nÇ=Šn¥/èwñhv‘<ìl#Ì {.'­aénVfèð¸ÓšMèó–éðUÇ [µ´'bÔÓ0¹“^˜SXB¹D¨]ÃŽß.I¸üî,[†Xƒ€Í— žwÒ$w7'nm¥ž¼H«ÙSçI¾‹r•¿=£­¸btr6±šç+Žn™e ·¨:KºYPµŠ™_æ¶_¢%u­ÉPŒ-q iûõgôÅóºMÐ-{\f­Šç‚I‰jWË”0 `ƒ NãÊÂV8sÓÑKüØ «bâ¦åÄ Ê‡ÃãÎ2_t+¯c‹OŸ‹ëf\Ðɧ¾XâCƒå¡CÏ–“K‹·­„Û ”ò³ç9%¥9 ,¬HøX Ê©£ ‚; îŠc«Ö|‚OÜÃ}Ê.µwÊë¦TkÊ)¢à3|N­*Z‚RÛRU_àK_ákê¤zÒ3†U梾 ¾Á`\­4‹T ä[ßá‚ïñ€¦ì‡làˆ‚ð#ÃÐ+*0ô>¯iò¶X åìiFZ$K–]Òh²O&žÕÆñõêVoÑæ‰ÞÕFW¬€c-ÌM‘ßD²qh§Æ›ë:U“TŸ‘T…ñ–ÊÔ;#RäNv­ìðRózH$['tk=ÊeÍæ&Å›¬o²º§çh‰8ò6¿lsÜ•¯ØÂPý=ÒäÖ£ ðeîdÚ,±Xâî: º×¶Ø`»Ô¶Ùl"´zñϼ¤”žNòEë/¨›w¬Û¼¥-j=𒶨‘¨¨y1/ [Ö\ûf òUÚe÷“v¡S/7,¶ƒxBY|·šÍ™ZI,<ñJ¶ìG xâÏ&–¯Ó[šžŒžá °_é² Ct]b :OI Ó“a£$EÊì$úî>¶ÙCÿ w¾\Øïÿœo4ûÁ Hn"”#RGÎw¨ ¹ŠNb(Utm {ÌÿÛ£þ*z¢þðŽ*Âch ¼“¤#9_xW¶ŠÝcÁhyGè}ÏÕ¨ÿ/ô®CŽúC”A€ö» Sè¤s/A݇ô¡Ÿ~8Œ#Ž E¯Rü7q%нBÑß# ܤ@-8q;Dv˜{Kã0À*ŽÐÍG¶ÎÑ¢cäM%Ê8N¼›äãMœ „½UK•Ç;I¼1¢D°í ú%Ğↄ„ˆDvN¹˜Þ¦ŸDôí©Õâg¢ùèy|±Üpxïö©#Uô­c€ýëèÙÄþÜâU˜ý]£ý¿@õ}Ⱥ¥iˆP8T©(Õj@§ ö1*BŽ“Ü ºqg)öæÁ?ßð Þ2Ç õhÁ )¥È˜$NÖᔉÓx± œ‘š³&Îa¨Ã15ð’‰(^Žœ™ú˜ÈaTŠóÆ \00Îq¼rYø yÏ/§Ë>/9"½äó…á§óʘa¨+ G”y ŽnwpØ[r—.ú^Ù•JÞ®ÂU®{|±h{ÕÊÆá…0°៴];8Íp>¹ Ç‚ì™by%âÚ”·]q¡:?+üI>ë¦9ï¹3Å}[>×”á`ή0t‹+¼ê;Ef°r.­C¯T9œÚסÿˆF¥I”j¶BÀƒjehŽ»eQbhIæ¯òEžvE¾4‘ËŒŽÊœ ^*É ›¢EÏ¥ A^¸å`Ž*;Ê`®—£„P¼6Æj'$Ww½¼, ^–S‚zr «µXõ}²<Ú3é¼o{éÜøÈõ¢XlÏ%mTÙbÕ¡)yÄMÅ¥v7^Àuš±MŠë*³àUÉ'kK–Ñõ8ýÐÂ~\´ÐнÚÐna:,E?±ê7ðŠ… ,Ƌޛg LZ¸„)ÓÒò*•uÚ û”Ö¡Ò§'ªn`Ï‹ £Dœ1ðš…×qÙ¸làM†Ìÿè:%½‰7>{U©:½1Þ ZRv¨}Ç·…^ªµî2« ’B£ñò âíªp‹"Ó³ÅpV–ƒ‘yˆ^!ðm·Lƒ·Èª¿BOæ¶:® §øvÁˆcrhGœ¶­Ô&ç|oIdj›†1.‡B›ç×å årr†´y›ÚÖ±KÍÐE·aÄšåÄÐõ×,‡†ÖœZÃdß$ÒÓ,é5Zã©°Tï2B©¾eh)má;Ê«“d+t’Ÿ“ï¨Ç—hÄW„ô5á~ÊÝ8¤®Û¸Âej'‘C´§Ù¬á½}Á®ú›ïbOêChŸÁLuµ†W “¼y QR†š#Á˜–æO“K/ï¢.ÉJS¬ ù ]ößÖw”Ý÷„ôúð#Nà'Å.Eœ mƒÝ žBR±DYCj׫ÎõÑ^‡µšÞ¯å5ÊÙ˜™êì^A}Ìtæô„~ GˆY8¡¿‡’sB_…I´c‡ï¢!„éTB§*ÞFÓ þ ¢3íú ïßQàDЪ¥ñêHþLEý…ó+Žá7²ÿI'~G`©T޹F"Ÿ¦Du²˜tòiÕ˜ìFzY•S;™”¦’ªƒ6p΀Õ@yÑ QËk‚²’ÞñXIë¾ÑyË£éÚ;«Ø³Šæ6ZQÑþÞ¡ÕÇkhq<§ÐBÄ\z>'Õ?/]>ÈS†æ¿PK AѺNì,À4org/gradle/wrapper/Download$ProxyAuthenticator.class•UÝSQÿ]D×E‰PSó#5TPûÒ4S1ÊB%PÓìe…ÜÂ]Z–Ô¨gëœé¡¦/{èj¦éÜDG‡{Î=çwÎý³ç^þ~ü`/ExÐ'¢ž/ôW#€ ×D bHÀM÷ ¸åÀm.‹aF¸ÇÕQc"îc\„ xª SB Ucª¦šã ^߃=¤'†ºˆª)s¹5ÅX×ÒdqGô„œ^’ •ï F»¹®fÉ5ô­íÉœ¹®h¦šMÝ`f4M1Bi9›U3ÑT0eÈÉ´Ü4äLF1‚Óú¦–Öåd÷É£ M)ÅŒRø¦n$K|ª®1ty}‘Wò[9¨)fðtepfxÞ#7/ŠIËZ*7 UKÈA SOèi†j ¿˜Uˆ¿3nʉ׳rƪUÀ4C§÷Ì"Gym[ íçĸž3JXå}t¹œŸ„4JxˆGK˜Á O0+aó åULåÔtR1$DñŒRŠeHˆa^@\Âje wéösz)ไe¬pj/$´£CÀ*Càÿ¾)CCñœ2Gë™ýbpÑ,Ä”79%Kð…í oZÙÞ[:ÇÒwCRó»/‚c¨ŒÆæ—Wz.š·„%}•ÅX„L¥¬ÈB(©tÏPÃǼ8‚ž#üñ!­â-Ñè‹õ{OºOF‚O·©šˆJ j;k*ų©Ûæ6Õy¡Ü”tøàC]å6"aê¡uÙ˜4 ™Hؽ¾Uz—O9b5Ä/XË£‚zëÁ°ñ{†+´ ’¤qG¥¶÷¤ØÐDk•eüŒfð«`Ђ6’v>ä…à/´³“\öçQñöwˆV™GUdÂÊ.½yT»EZò¨Ùƒ4Û÷ ¾R—óÐå®ÝCÝÜ>\+}ýy\Ú…{‡ø\Þ±èr>môx_!â;Üø~¢ãâømñô—0œ¸†NŠrc]¤1ÂúÑMš3-TqݪˆýAÜêÆBA#$m…n°Ó»Ñp(äáš—Nàa~ ß‹V’ÍÄÀC ®ãs9èß©ቦPK A$É~ãX !org/gradle/wrapper/Download.class­Z xÇu~±KpyA%è„eÐ’u’–l‘¢$H¼D”)Y’WÀ’„báÅB8Žíȉí(vl'qœ¦n›¦n›8‘œ”EÛJÈ­Ý6é÷HÛôH´MO×½’°ÿ  @B´Ó¯ú„Ù™7oÞ{óŽfWzãGW_#¢-ü¬‡VÓïyè}«½·Dóû¢ù…þÐCnú#1ø¶àúc•þÄCJßQéÏúsUÒ_xè/é»úý•hþZ°ýhþÖC»é{ ýBï¡:ú-¡ï{èËôbúŸDóÏ*ý‹‡^¤UèßÄómÑü»hÞÍxèKôŸú/úoÑüO9Tÿ@¥zèG4£0©ÌÚÄ%e$þÔUp)»<ôE.SÙía…UHàrA)WØ£p…‡¶Ñ·TÖðäJÑT©\-ž5BR­Â^˜Í‹D³X4KDS'š¥¢Y&ŸÂË^¡òJíçZl„W©¼ÚC'yÊ~•oRy­ Þ §ò: òz•7xèë¼Qåz…7 RƒÊ*7)ô…›=à•o26+¼Eá[UÞªò6•·«¼CåÂÆ]B{«Êm*ߦòn•÷¨|»Êw¨¼W,lW¸Cá}LZ07¬Ž˜žLI¦5ûŒ=³÷™ñ˜©Gú,sÔ2’É®hÒ6ÀÈäéÜäÞ”=fÄíhX·M«{÷ôí95ÔÙ öö€­ëý¬ÞÓã£-!ÛŠÆGÛ˜*;ÌxÒÖãöK*w2U´îßßÙ*<†K‰ê‰©ª¯¿÷@g(tªã d—ŠˆÁºŽÞžžÎŽh85ìîì8Õìê †:1³/„Åk˜|ý{÷e`rÇÌÑQ±]¦5Ú2j鑘Ñ2a鉄aµtÉIXª`Ü£Lô† +5ãL5‰yþh.&çFîƒd÷mÑxÔÞÃÔ^¿€ó½7Ÿ²iˆÉÕaF`duW4nô¤ÆOÖ€~:fÿ›a=6¤[Q1vˆ.{,Š ¯ZÈd˜h.hÙ³Ý÷º•a3>MYÆÜì’n/­L•![ŸéÖÎnÔˆ£‰QŸ‘7ì–Áþ £%j¶ìÆ ©AÑ#aR«)1’v4îèª*\‹è<6b‹k²:ƒqÛ°âz RIÃÚ;j8YŸNŒˆÔ(9ÞÅñÔx¿!Œ¬°M[uñQ{,O’É’ø"™Í°3%T hð ìZ–ov )n„…Q°¡ô¦Ùé>cØÑqÃLÙ9ãÁWŠ1S]nƒ½);‘²CÇtIj–äfƒñüI%©ƒVlŽÿºÚÞ¯ð…*TøÂ‡sÌQ¦Õs³i®óWB“q[?W`sJˆ©CôÚõd4<736 ü|'‰ð„sc$ˆZ0>bOëIcûÖÎxXÖÒ†ú"9Z ÍjF ;³Èê6ì1!^žÇg#1hkÉÌ_3$s–WÉ ­B¬ì=}»JжõZº‹ ®%y\ù’Œ;òÝ2«ÐYš·B"|—œ@Ⱥ˜jáTL·Áœ'ÖVá¶¥çâÕ„N˜vã-'Ëiq}Q A2âqtTdÀÖÎNåhn3™âr3™OÜk…Q4ž™²Â†(V@D‰BŽFÐÑ<¡ÑéA¢”FSŠ©m[÷.g $r·F¢ó}Œž@Æl;Hä›W¸Gã^ºŠbÉÙ¦ÀBz矬BUŸÂG4îçÆ<¨ñÕèYzJ£Kô’Æwò0ð3[´ízŒH~i;ò!-JÈ?&šãßÅ'4ºLiÞ 7áWap³ ¤Æ'ùNÌl×ønÖ5>-š0chðˆÆ£<¦pTã{øŒÆ1a÷çæTD²Y©„mDŽklr‚iQxzsé³<«Á?¡'ýy Âì„Â÷jlqRc›VRø¬ÆœÐøœˆÌšwEÔÈÜülOEc²zj³šAôXæ¸_ãI¾O4ïCñûGt83Òê·325~?½)lº•ž_Eü€h>(¼ò è=$š‡3+>ß.€‚€•Y#ûq*@aÞä¢ýÒ¿múº•4üB']§×™Êdþi|ža:toO°ç€0)vtp` Ï/1Õ_ª~ó¬aùõ8œ4Â8’ý³¸)”dÏ-?ùÈtðGPVôtJðü}1ˆ*–%£p¥?•S  F…:ÓŠÞç@¸;c„F/ÓU?ÌÑøQ~ ›@d,Ð.ZãÇù£HÌYØE…ÍA8/ðÇœ„Ï_».·¢*»f&ÜŽž|ðUø ŸäÃû›wjü?]À—]º¨"3ùõ\àÜx,p:öé¶nO& Gð¬<Ók`gLkÇÕÚd:‘ŸoEüšôODí±âMúã¦íO¦ j"~Ð&ŽþCCÝð»7Sº§t3xTWHìsð\$ù3BèÀY®5gäÀpuf8>KQÌd s:xÐ+ ë°W¬O¶¬Oúë×'ÛäßMy]?ÉŸœAšà¾ÜmoÕB º÷¡[²%è@N¢bwl¿øu!ŒâyìùuÝUþ1ËœÈ\K—=t™ÿ¿ÝªÅe&?'A°ŠÂ/–Ú“ò,_ÐMRÊìþç¼Ðy’†íƒˆXÞµ €Oʨju ÄŒ«k²‡þìÚ=~&µ’ò" ee›Ò9Îì]…Q?ÿêî«/~csUØn¸ÓÓE>¨èIâ˜U¾ßÒGÇå ;ñž’w>%ø[&¬v£€ôXrN>dÝt,c¬D>Ô|¿Ib[¦6  Ñ7ŸÍyU“D®8âÖ¿K ³ „c³¯YwYs|Þš|)ó^Ü–ÝhΈÆÏšg¿]Eœq|á4Ê½ê ‡µOÚâû[]±ŠÏ+ë;JA‘³ïqîÓ×í9VÙü “»n¢ÕtŒ˜L*'Ù”Bÿ,•Ð-§s4™߇ñûòÆïÇøþ¼ñ0~ `ì¯cè{Å™|>ì<ñR…§¼Ð‡Ñ~£A*#žå ÜÔøùm^!Ÿ™DøIÚˆö <~)x\ÝHØ>$f?5Qi;€4D4‡0{Ô;i57§0ÝE#tuµ| iz7Ò1ŒhFèyÌ|…FišÆè :ôº—¾K}+¾~›ÆéŠÃš¯£{yY ›·PŠ·Óüyy²…~–>5 ´ßOÏÑga èø `F9ôž¥Ï¢çö$öôôŸ;4¬6††kÜMh”æÐŠ_œsOyv^……Ó¸h½‚KÝ«¨‚×pH\“{;˜1ÈÙ›ÂoÈÈhÄoʽyqLü–Ü›Çÿ7ä=Å*ú&ze³~=78Gjþ] „Ë_)àZü£»Š¹Õ8$ÄÿX 0÷ü/PK AyL¢¡Ê1org/gradle/wrapper/DownloadProgressListener.classuÁ ‚@Eï+ÓjDËöEÐ@Û–EERûI¦ˆ#3cþ[‹> Š4Úv‡»9œ×ûñ°ÂÀƒç¡O˜Äª.r%ãÐJ[™ÍM Ç„ñ,Èä]Š‚­8Ÿökߟ_ÃPU:â]š3aºý©G­ÍÆ©±\°^¶&a¡t"-ãœE­eY²ÿÂè›Ë›¼8\3ެK tÐŽBNûÐkØûPK A!9|¶„ 3org/gradle/wrapper/ExclusiveFileAccessManager.class•WÛsWÿYÒÚ«u|iªVÍMNZ*;±•JŠlB×NåKœÆŽ[—t-دvÅjÇÜSšB[(·¶ÐP`x¡ 3íL«$x†ô©Ì0à }á…0¿³+9¾%L=öÙs¾óÝ¿ß÷íúOÿýýÁ¯t<ŠgZ ãYµÌjxNG_ÔpNGϨ×Ô Íx^mMEœSKA-EµH ›1¯¶ ::`éÔvIÃb3lIÅžDIGŽºqu”ñåfxJ_¥~O¡ªc—u,áJ ê§íÄñ–ñ _Õð5öñÉ¡± #ùñá SgGFòÏ tŽ_2/›YÛtæ³S¾g9óý­C®SñMÇŸ1íªhñ­’t«þDE@äv”]ÛÎ;¾ô.›¶"Æ,Çò Ä2ù|÷Œ@tÈ-R°mÜrä©jiNzÓæœ-•=·`Ú3¦g©sõ,jÉŽ»Þ|vÞ3‹¶Ì.yf¹,½ìð•‚]­X—åˆeËÁBAV*¦cÎKŽÆÍ€ 0˜ ã°Ü¬âëOUß²³×)T=O:~vÈ´me±¿{]Ô“s—dÁWÊ䕲å-3ÄQºd»…EÝ!£C½…Óq¤] 0ŠE•(¹Þ;&f£*2³B5ûþ?ÍÊ^¨¤£±}Òò虫\j÷L§è–ÂøC¶‡ÖlÙtGuZÝÛ5Ó[" äMn,Ér¹Q–‡ïíõÀôtÿ1•„)ß,,N˜å@LÃ×5|CÃ75|K@gùdÙ·ˆ'ÂhÊšwL¿êQ÷ÄÀtnkŽ}¢2†ts¥óÒŸ&J',ÛVXjÊt³Š%syNÙnE>]µ¤o3•É;6‚‹ÄlK¡q¸oF3åV½B½ÖûîŽÌ>%l W Ä!½8$`¬ÍÀ ø¶À›»ïDÕ²‹Ò3ð"®x ßèýD]AÌõÙ…EßU úð²Wðªï©åûx•À¹cóLÕQ­½V$ÃCnÕ.¦×O#€&¤A7zxŠ N5@¸ïT3„Ï(ïúåz˜§Yò4©}Ï ˆž] Ò³û4½?ˆE¹vqÝÀ<Ì ŠáÓøLø¥˜ÁNŠpÿ8>K.š‰ü1´â‰DgÖ[A|ö4n›khéLp©Á¸ÖS½¼ÍESÑv\ÇcêÙöêÙ~]+蘭ËvvRˆÜ÷5dwÞ¹˜ÈÅÊý=ï#rÍ<ª‰\KªåT´¤öúÛ8º‚äloç7ð`.–ŠÕÊÅSñ WÿšŠßÄ®TŒ U4]»‰Ýï¬~¨Tô®7½‡6•‰övîãþà7ÝBZ §§Hè Ò«@'¼c ¥¿›KlÏ“¸3Ö1·™ÿ¿ãcÑÆ¶‰õDQDDwp>¨žäPõzp}”ÕÊ@8B gmγ*& _$W™Ô ëö+ôkôŽrÖ}¿F¿A?~‹Ô(µ‚AZÆÇ8‰ðÃñŸü:üưŠqÁ¤Ð8­ Ó›“"‰¼Ø…Q±câï?… z5)“çqj…™sDP·hí hô F›9Òˆ‹ޏë§uì>cÄÑ~êþiMȈvz5ÀHMü¾ ªŠø †ð$?b‡)n¬IŽPò$)SÐþƒã¢üݳŠhÑ ǧB¢†¤†<£À¿q¢ÏÒ0¶Ê.Ò¶åƒÃx½dÐ(§øÇWW½§Žw@óMì߉¥ß­5S< Ÿ ’a„<õÀuõ.«ËŸç3ôäGhí¹…GÞAtü=’£dl¥Ù¦@]± …ùßéçysŽýùü:õmŒšO• ‘ ²¼8x4ó?PK Aì„,y†-org/gradle/wrapper/GradleUserHomeLookup.classSÛNÛ@= $vŒÔ”K J)$´ÄÚÒ E¢`@"\”@¤Õ-Þsc-ÂÄg¥ØOˆN™QMž} (1ŠáìÁ#Šj€ RŽ`뛿Í€i­õm¹õßP/ÊQ«ðWM:‡Ü‰â;"¢¬+) Q¤gc@'Q„)‹f! Ip @"p€å´Hw·bo’8=N%ŤډÓ;RN² ½8½÷êôÞCÇÉ?»§Ó•éË÷¡¹7oþWç½yüá+V‰ ž¡b3ž©Bųäðl9Ü­à9**$¹ÏUð<Ï÷ã~¼PΫx^ìÇKüx©‚{TÔJÆZ\‹/Sñr¼BÁ+UÌtɯRñjÜ+aï“ÃkäðZ÷ãu ^ïÇüx£ 7)x³Š…x‹Šx«‚·©X,îÇ ôãí*Âx‡Šwâ]òëÝrxÞëÇE?.©¨Äûäüý*>€ªÈ`XÅRñ0F|HÁeëqEÅ]¸êÇ‡å†øñQ“Ÿ—‹ŸPñI|ª ŸÆg<"9?+!Iþ>/‡/¨ø"¾¤âËøŠ‚¯ªØŽ¯ ÌêØÛÒi?²¯§}ï‘ÎîíGºw÷vuïDNè§õ¦¸žhê±­Xr`ƒÀÔV3™²õ¤½_§ PÉö¶öÞ–®H{[§.˲g_W{oŽ:¯€Z²©bc,³7 ”…ö øZÍ~J«‰Ä’Æ®tâ˜aõêÇâ†TÒŒêñýº“ó,ÑgÆRK"¦5Ð4`éýq£éŒ¥ VS‡3=àÎvê±$ò%ø+03|¨ÔdGºn ¯ÎcY@Í"o×-j—#f6m‹Å ®VY&협’Å2M»-FÞŠ!ÝJüX˜¯g4kj5 =Ù/Ýíð¨2j&OHnX[¼¡ç\Ê6»s¢òZǶC1‡ìãç!Ò‘ÓŸ·ìÓRE°t‘k_ÚŽÅ›ÆéÒNk•í4´³"n HeçzE!â,r_M–Ò~Öˆ¦m“ü‹¼ørI··Ÿ®9 ¾ÎàèýýÅn¸)\™Œ­êJr•^PÄÞPÎÚ¬Bù2¦…KØüqf¥Ô-—IÃnÚ··‹k‚ræ{Î%mýlÎò„òm—Ù×S©6ãø63ìo·,Çþ©=¶=¹Srr^Á7V…'Žj‰ª[&µéF!T{Ì´5ÜôžYr¾VHLˆ6óL2nêýö¢GÑÖ`#¥á(è×ÐD§BÃ7ñ-ú¿øP2‡&sð ²NsÙ–§ ¸|Y áÛøŽ‚ïjø¾OžSå§Ò1ÃXý; ?À5ü?Vð â§Ì¢ñCÔ©§D ?ÃÏüBÃ/ñ+ 1àš˜kŠ˜©‰Yb63R1Gs%qžÌB¯{(¥Ìù,‰ã2ò\£å;NÖÍxÜ<³/y2ÉÃØ=Ö…&Ó”*Ì,è:ÏÖyˆî\©›ˆ‡)2¨§Z¬tÂHÚ©–Õýòxl m19—Ô¸Rcd/(w:òd­ñl™yÛœâÀB=`ØùíböX»(m¢J¶Ç lDUÎCaÙÐP4˜î%FÞ;Òv‹¬p1}°pâîKx wB·¬)i¡“jç…õ˜Ò`xßÓj‹e“vø†À^u¬+y®”OG€b8VÐôC^iã)­ٞk^%בs‹çU¦ØÅmª“—W³:¦æÄw¦ÒÄrRZ·xݘWææLº±ô.¼%+dÙ¥Ë;–fCq]Þ¬ùׇ']/ÌúÉm¥WjÆ©N­uM§Ñ6Ë4ëE›é¾Ž)ŸbH­˜}®©˜gÃXé¾.‡ëù^qïE|ê” Ž¯oöõÖXùˆÉ]%sM·xG6ó ˜m:E½ˆS^;gç;«wÐ2ÏÈ{£ã¾žè á\ÛSi=NÍÈçwûÙ††ƒdàÑOè ÜíÞ?ä±Ç+r3<öJMÜŽ•dæÉÆì6ªR6`8u¿Ð¤1 ó™ (¥RiÛ̾¾œL•¤â¾SR_éö±ä©1ݱы>aíÎu©%“ãä‹‚ŠgŸÜ^µŽ‚×WÄ4O¦‡x½ lØ›!ÿ—ð!ˆvB`gSPÅywÞ\ã|wÞ¼†ó=yóiðó›7u޽¤4ñWð·¼qS.9,û8V8ÄösÔ\Àø[‰>$7‹{¨TiWGPY:ßNå»FQÑ7 ¥Ùôeà?ô•_Fe_Y ª§ÏÐz2˜šAõ8¹F’§IòQÔrg ¹€A(”u¯Ž‡ÇóÔâNíõ‹#Áp$9&¿ùöÈF9J¬)Ò2:rá¾Æ@Ã0G°”>Ì’–æ‘ÆRMÅ€m¨C–Ð|iÔL •€óuÔ1J•/¾¬ÀµÙ´ªbü–¹ÿ.%׎¼äªrüBØ9ˆ–,ß,Gá –óoE )°2ƒ[‡±ª®;nVޝÑ,Ü£tÔ»7 f°:ƒ5¬Íà¶`jdëû–ãö«ÑØÁÆû0[›|—±¹¯¬±g[†qÇU:¨å!l¸ɪÕ6Œö‹r “g6Ñ[ ™£ÛüªaʨaOÑ<ž 0ù‰ÚuPÏNYêÞÈÀÕpßiœá¬Ž;Ïâµï¤Ugñ$~Ícª¹«Oæ_-|{¬{ • î u)ªÊGgÖà>'€ª ¶Ý‹énä9éÈ Sª=‚.鯲¼P÷S¬9̵qw.prÐZ1‡bø¢ÍŠYŸS=ŠíD¯¡¨aì(ŽÎÉ<¸ê,œ`*K®§ÿPK AúâæªÛ"org/gradle/wrapper/IDownload.classEÁ Â0 †ÿÌéæ¼ ^õbÁë®* AÑ{ÝÊØ(í¨Óùl|JìTf $_òçÏóuX ï¡ë! ø‰®”ÔÌai'$|TÆ:Ü/Ó ?&áãNJø„@ÅÕXaXQÕГ7é†&° ã°zDèV„çÊ™&¦§œ6ÝX”›Ùú`ÚÑ-³×6¦˜L͉ôv·ÓeLµÌCz~@Få@º«Yá%üHÁ™ë'ø©„Ÿ)ø9~¡à<~©àWxLÁãøµ‚ß°þß"N˜iÓ ÍavÂyܲ‘ 'ð; ¿WðüQÁ“ø“‚?ã/D\˜„¨V+mĪMË©N›·ëÉjJ jÇ¢N4 „º55e™-$õ¯|à¿áï žÂ¤ÀÒiïu§MGOhSBÙWt„ìäå³%+i/ÆŒÀ•³‚FàúKLÑ\г¥‹Êva:PÑ™^hw4*\–ó’kQž—–^\)¡6jkªãæ®À†’•¶dœQŸ|5\$çÇ5g—ʧöò@¢y—šÐгpú6`Ù&•‘ÆšewÆRæÄr,oIàÚšRe¿¸~—ë©¶Ð\s©nõ”gçB²së`Ê2ÒŽ¶Ku†È1j4ª¥è¢ZIWU|ÎWPá1æP™³j›YmÃlj 9ù49ÞUÌ[:–¥y‹c™‡ìžc)G£«Ü§Ùvþ±‹NæÐù45‘gõjÖ¼yΚ !±¨„BR’gáyq)¤P€ƒ1.(Ìe%ÔOßWßU½¶N·qMá¡¶øm”;ÖšguhéwXñ¸ Öpg/˜ÙÀ¾¨0Š„aŧM[˦mš»ií9‡l¼H›vX(65¼ºÈc…Àá „(÷)ß÷Xô²,JË|ˆ®{v³‹˜g>BúT᫪ÉßÏD¢‘†ÔT—v”j›ßt»œ7°s1` tù.U½z’ÿÊ{ÒÍ„×z¶e÷%Ø’øK)y9XÁÆÿû튢u’,5N V>]¤æêE¾#¼+§Ká%TÓ—N È>+*ø)P¿%ÛÓƒÈíéMäöô,r{z7Ñ7¢~;ð|ân§ÑÊ Q]]ýD]ÃÊêÇà« ûÇ௠ƨ Ǭ‡ôQ–áfjƒÄ¬Ä-ÔVÑI@ºwÄšèAÁOÚ#=¾[`=eòY„úëDYóÎBîG¹7S2˜_¹€š ŽÓ»—V}\6ŠõõTŽ¢™/z‹&pygÃ"D]Õ©ÓXBý„‰~iŸ'´ò>Hþðû6ÓÜ?e]ËG1<« ˧Lhñ‡ýYQbWfI+¯"‚Æ ®&¢ ª½ÍkX|ØÏñ!ì÷¤]Û—³x+ZÜÝç ´Â3¸N`›yt½ çe¨%X¤¤†”„ƒtLÏš¬¢ppµ}'þ;™•È .ƒzÖG?ÚlÈn”yjOà¶–@‘è‰ô,dá•+½©/;m.P˜Ç¶Š-"…«§œ>òG=„ç†d©k-«&°†â±¶Ïœ:‹uý<ºb7LBˆƒ"!’ô1ïw1u7®qÿ‡QƒÕ„ï5„§µè¡û}4$¼Ç ß#„òã„ï; Ý' ß§ ݾ#Ì=I¨~íb nëq‹Ø†±]â v‹ö’¦na£GÜ=âzÅ#Ø'Σ_<ñö‹‸€[]L‚Lú—a7ö‚ORNõ’v?É®Ç^IÒ~ô‘mFuû5âqôÓ®Àˆ¸—rk?ñ÷àYìÃÓ¢/ÀA’r ®äi¢÷ön#O¨´Ò ùöIIè~ æßHv9BÂà,–•{­‡%4ý þQA#6? :T±•Ò.î¥"n‚r8ƒõ§Jf¯âdO0%†Ú!—^Ça·†áî%`¢“F•´¶Þ_7­ö@þPK AØ ’$|-org/gradle/wrapper/Install$InstallCheck.class•”]OA†ßi·]ºÝB-~ ¢|K[*[ šÅIŒ&E/0MðnX†²°ýÈn«þ#o¸ÐD¢ÑÄK/üQÆ3³K[J 4MÏÌÙ÷9ïÙ™Ý?üPÂ#qäeXNP(Èð@¦+:Šr\5@IǃQõø¾+^6j‚a´|ÄßsËiX/W<¦ Üq۞ؾϫ´"¬py½jí´<§^¥Uz¸ŠÁ|U÷[Üu·…}¬Òºð¶\îûÂgØÌ^TçÊ ¯j&¬o6…g…”…^ÕѶûTd¬ìÔÅëvmOxoùž«\5lîV¸çÈ<¼¨×ÎLë~Û¶)aØÈžïp˜êñ'NÝi=e˜ïƒ hªBf[‡U¦‚áøá9ŽØgˆfsïR;-noófØ”ÁU' «Å"C!{e¸dE>»€’l è?g 5 Útþ%ÏÚR}u2eÒØi´=[Ȳݶ"!&nâ–‰Q\3a"eÂ@ÒÄîêXgXº¢#¸-ÃC†t×Û›½#a·&ÿQ›TÁ ½Q zñ"ÈH4ËH;4&('w JÙ:4šÆOÄwYþôÏJ5N1.ï° \§¹¬Â Å0d“ƒy6€0uޏ‰ÈCÂ.eQǨüH~ùZ¾pŠè—&C%À¦¡±$Ø,FÙœBÎ2Lâ fÎÔL6¡=ù°Ìså½Tþ+´ßеOТ't!Úãu±Çk*ߣ ‘ä3–Á4U xVÈ‹‘íØI_Ïã=œf%‡Äs˜¿ &3ýl°x‹ÄÑ«‰ïwv¼+þŽÈeâ”/u6»WÌ.ûœU1‡´Ú}úd„6êPK Aävp£.- org/gradle/wrapper/Install.class­Y |TÕÕ?'³¼ax,‰„0lH +aGb“$%, ÔêKò’ŒÌß¼1 ]´­µ­­ZjÑV­]è‚­¨$h*ÚÚZ[—jmk­»Ý»}Ú~~¥Mÿç¾™É$yøûø…ûÞ»÷ÜsÏò?çž{ç‡ÿ¹ï-á¿i/çKS ÍÒL‘¦pš©ÒÉç´ •rHãéâŸ<¤ ϱ™ÒÌ òl>SšpçðÜ ೤™§qq¦ð|¡_ qI€Kƒt—i\¤é\¤»¹RzÊ[•¼-Òxq ò^¤:^&ŸË¥Y!ÍÊñtŒÏð*«exuÞËk¤óœ¯•ç¹A~׸VFêDúuBX¤"^àóä¹Aㆠ­äŸ¤UXÒl’¦Iøl–©[üNéÙªq³ÆÛ¼=À;¤cgjù]Ò´éyÞ¥ñnß-¯é|~O6ò…_¤ÍÂ}#n•6iVjܤíljÜäNî’&¤Òsqvs(À{ä•fecp"ÈÝ|É8¶8)*ÙNÉóR¨GãÞ u‰U»¸o<½Î{¥y¯Æï RŒ›¤y¿~@ãË4¾A H'íIªÑ#X¤9Ò7ì”…Å„×k(IÓ®ïöl1àÓŠE’I‰ÄàhnP4O°8-Ûï€ÊlßjíN2MÚ퉔ūZz}ж­¼Q$?ðénE"Ï1æ+!i¹6‰:œ°‰Òc dÄ›³Q»:ë5£!Ž%­T7ŒžK2ÁR]"3âˆ?D +u_ “F’;#qlcÐÕSRº j%’M†o\»5%ÝZ.ö¡–L©íRâ+ÐÖu,À>c·[žðîý.NÅ÷F ñ™®q–럷­¾¬”1µ Y¬^F$­ÁÙ!Á’a²9§_2£°Š²Šr˜ÕÇS13›Ú=J,o»)û‹¶7“*‹Æ®î@’?¡ñ'Õ¶Dw_N¦bZXâšÁÜes ³y˜Ôù×üË¿CIêZéôgþ½ÎGþ‘ÿ”±ð˜²Mç×$õýYÜW®Êz“iÆ[€sq’[NæpÚÖe%zœãßÄ‘Õ jô1ñ1ÂQ9µ.Ó·RT¤ì.ih§›ÁÜnEPwšöHí'—”޾™6Š(ç¢aJ‰ëÕBødvgºðt®ÞÖJÁ(±Õy(«ÞðKtÙë•+Þv¡6Òj§¬œ{é7Ò'´׳–ÂvW€7»ª ¸F\ô8å•ñ6h¸Øåú ô$×;^ ¬]ðµ»¶TnŒRÝí†-µ:ÈùÚ¢‰$züíéˆð–”ÊuRþÈ,©®?ÇÛ‰ ÷@…% ®òã<Õiw)lËšb;9 Ï(©KŸ½8ª8±vnä;‘‘C‹$ëcÝ6N­þµ#¨“Óf»ÇZØUül;Xjös\Å:õó7Ù ëzàÉ1ËúÙ-ìk !`toB!Öl–-˜$å^£‘Š£(°6è™í~+3%Y}–¤Ï”£ÈO]¿y êÉq%.¶”‹ çþÂÉN5­ÉD4e›ï£¦äÆ‹ÙëdüqriµÞ¹ŠÊǨI®ËÔ¶°§ÑDuò{C,1ÂÔñDµiÔ‘fj‰Ë…‰Š†¤XZÄÍuÔðíÖcDlÔØ Tlædò¢œ5òušû儬wÆðPú–Kzµê*kÍi!yÌ…˜¤ÈM™ÛÃœš »šJ Ò‰(ó=r[pzWËU¦PR§ØS ÔÌU[è„×rõ’èYKö¡šŽ9™oKº€gšJK®ÎprvhÙXä.p{söG¨œÕ*›5&zÖ É™5ri\×ÐfïæŽ`ºAÝB& ¹^Ë…Jr½5òBlR—‘Ü”°Ìú¨ƒ[ ããf¯þíŸlÑ`.ç ÑÛã\r‡†‘5æò«*W××{'‚°¯Û‹Ish/•‘BôºŒ˜.ÇW} äÎïr¡žWÒ>õ¼Š®Æó Ð^CEû1|]^<ç• Ð¸²A ¶ŒÏ§GH?BÊÊVVq„üe•GhâaµÂÇÑN'?Ú¹˜¦)td˜G³©oóéZŒ”9<éôI"õ&2±z©òÔ›ÈåAïut=zDš£$ ϵåý4išÉMe÷ÐD¼äW{CÞ~*¨öÉãŒj?ú'„üƒ4¥¥,äù*Ê+¨°Ÿ¦>HEwŽ’³:–sd­¤´’/RrnpVËʹ–n OA"­¢ýôip Ò2ºöõ`n}†n†f3 çgés šK3é¼ùéVÌöbæm˜ƒã¸£ß¾FöL;J¡Mƒ4½¥|€f4yVxó'Ó·Õ¾BoÞ­4³2äë§™+¼…Þ[†þZòy ¡ä¬ƒC¿ªì§ÙI¯öËKÈÿ@E?Yí¤pËÍ©öyVø ý!ï±ÛiQ> …¼…þ¥8Js«µÖOgyo£ñ!ßäEý4ogÈ']Å;¯ðóÁ¡'d¹ùwBÈIt6 Ï¥õô(³í B´P«@çb¸xIQZ@12Žy­¡$fYTçJQõÐNê¥Vê£n´Þ @¾°ë…‰/W&ï€I “/Ðaœx~‰¾ Svãý ­Ñ.ZN_Á¨¸nÖ5ûé«04 =_£¯+Ù¯¤Ctdn¢óèàâÅêké›t'ø X—‘6¶~öjT¤Ñ]ÝÍÝCô&Í^¯Ñ‘À(ß…ù8ÍרîMš0•ý4†æxúDþ2xÐ×Ty/-`:@S J¼÷Si‹§¢ù(•¥ò;1RÌs+†*Gyyˆ šRÕ÷A´h‘ ,¾SÉ ¾˜OãÐ~z_ ÷!ய¡Õ=Ý {\„ºVé«$ÌÚ¬CÁ”ÕÛQØ6\.¢{é>ØìL5e´¤Ú[)!ºô&Z ´.ÛY°\S –7·xѱ¢¹ÅWÙÜÔŠÂÕ¾AZÙò ÐÙÎâÏÑy?–»‘Æ#è¦ÀÐ!ºI¡f)žg3µÀȵ*dýøÒ·¡ŸÔ+é;x“ôS—µC=¤R¤¼I¸æ©·ïª°>¬’(ÿ s5ü=œu|žŠáƒ´ QW-iiõZƒÇš&h½´Rœyl…Œ…¾ÛiŽâ'Ï9@zEH»—Öæ‘|/VŒvî×Áÿ ~ýM€« Z-Þ7„ç.¦|(—Ñ÷é(ɲŠnL;<€™â漬sžûÑ# —“gILËÆ1~€?†‰f Ð=ÙåbI§âÿcô¸³mÀ€~%úCØ6Î=@ÞÃTÔR^ðŽªÙÄMƒTÛ⿟êZ<ëàõ‚zø®_ß<@ç9y|ò8rPÃZ?H[éüùn MÔT¼¾¶Þúûé-Õ‡©(¤lub%hî§æÈbâmMi¦Ãv^±S¥wõS‹tì…±Whƒ´ß]pA?½G`ˆG?]ØO†6…°«h»zÞ€$âÀpME{¬=ûÝó(¿MÕ€Y-`µ0ºXÙo\F?Àü'ÁéQècðÉ“àö8€üöa_x Àý1fþDy´p݉Ýè ŒIðƒþ)¬ÖE³@uÖ\J[éiP{±ÞùôSú|s hŸ¡Ÿ£o?<û =«ÀþP©°FA ýB½¨z. öz †°n ãcüÕiT«ÑómÔPè8ÍFŸÁ›KDB´$;'„Áöz1]DtáKbjzq”Z~jo,/0û©#ï‹äóòÊÆv÷ˆþs˜÷YÀý9eŒ©‡´:M¤—TÌŠÈBzž&äÉï+éUÂ’ïV–«0[ˆGç&ÏÚYØç”)@VÌZDW¶Ö›Èç9t…!øH— ‹4WÅ÷K°üËXøÄÖ«ðÅ/‘f…­îZBÈF`1¨^ŘÎSÛ”sæƒò×J•Y?¬¤ß(?ˆÈóoš¨ÑoyÖ›`’'¿¥K„§°¸DÒõƒÔ%ÅAÄAòŲÃì‘&‚—(v1'fâ¨H”«Ôë§n„ÂÓƒt âÈj16@ɲQ-…¼Ò• ùèR‰©žƒ4Á‰®žöÀÁ¡OÉ¢½ÒPo¡ò±—.ÀÎoA:‹lõ Â'RLîÃ.´/kÀ&€è/ýM¦ÿA®~ÆùŒ÷O:‡þ—ÞAÿ§ƒ×%X¸ ô>$œËØCW°—öáy-ž×±O{+ì2ÞÓÿ»»ÕŸè5x|2jŒ?c-I|×g}=ý5½Ó]ô×áË¡ " ÿ©¼Êiÿ¦É½Ž8;NUņVµœËº5zƒP,y“Æå Áë¾,‰ Q‚ç|£fb‰Ì>²bü&pöÙj®ÅùØrMå¨èf¶¬ðÞL+*U½×wpè5s6²SÏð^¨JXŸÇS>ë4“'¡Z™Ló8?gÏ/ÎZ¢ö¾CY¢UÎkjÏwj, [Dÿ§ê®Ã*ÆòŽKmtÏq*äa¡'à­ãi¡ë1K,­••co WÖ~µÄ %BØ!ƒ4úOÚ-eGvg`‚Ó®"VT>ÉÏî¬u‡ÀaÉyìq™ì?µÉ^@Ë™\NX~U̹Ïv’?«•ßÑ |üð½ ï¡Óäàqi3ou$-`fœc<‡]99§ª@–Sœœ²&;;eM€ƒ*ÓçZ|<`ãæÎ<÷eÞÚŸËq'°Âx¢›1Ø÷ ŒAy@5èë÷+Ì{prØKïCìN!çßžƒÊoÜPK Að¿:öo4org/gradle/wrapper/Logger.class…“koÒ`Çÿ—UncŒá@Ø&s*]7¼‹11$KHð’°`²wÏÊ“®³´¬_ÅO¡Fgâ ?€ÊxžRŽ5KÓÓçrÎÿw.éï??h G ·b¸‚Û1TP£†º4w¤¹+ͶUÁŽ‚]†èÉØ.;`XxfX†ûœ!R9¨öèÓ²û‚!Ý1,ñj<8Î>?4éd¹ckÜìqÇ{ÿ0â#†bÇvtUwxßꇇÂQ;¶® §É6m!Wéó÷\5¹¥«]×1,½)Ê@ŒF\÷s ©®Ëµw/ùÐ'.Hq«Ï°3«×:âNWœŒ…¥‰fuæâ…ç-Ce"Úè„!ÇÐÔl·U£#—;²›m"x©*­@o¦ÑÛbˆwí±£‰=C•˜ôj[Æ$‘B#‰’ î%qŸc”‰±I![3ŒÌ”‘¡JgŒ´ÇXó&Õ¡ovÂHIFií ó” Qª¤V÷(µIØ”’õ)rµŽ /‡,®Ó*üœñÈåàꊧPæ¹*qw(¤PÝ&nü_Ý–7Û›PK AJJ¯'ï8org/gradle/wrapper/PathAssembler$LocalDistribution.class•QÛJÃ@=›¤­ñïwjÅ7EA(*(‚¾mÛ¥nIÙ¦Š¥`|ðü(qv[Ī ¾ÌÌ™™3sf÷íýå@ËY¤0ƒmf]Ì»X`pk²•\Ê&Ãp¹Áoy ãà@†b§W*IÅÞ•‘Lö–sýMýhýœÁ)Æ5Á0R–‘8jßT„:ã•2~9®òðœ+©q/é$W²Å0fj%Z§d¥È8bð£H¨bÈ[-A-ÛåXÕƒºâµPwŠ7›B'<¹Ú§ú Sk?†Ð ~]$_SæœÑÜú÷[³ÔG¯ Ó¸­ª¢ ü¾%[šç!ƒEp=¤áºXb(ü_ 1*BÕƒãJCT;§_qå¯iX¥OLÑÏZðµŠ|-ˆ¼ Fú²d ]P‡M~$ÿ –ßèÀÊov`?ªghYI¶A´k #ÄeVº4Âc€‰ôxf"½Ð¢ØÇxoM@^×Rù'XŸÃÓ&©Ì@¯ÛÐÈ0ñ+ÙþN¾ÿ…laÒØ)Œ’×§:˜#]™PK A´çtx7‘&org/gradle/wrapper/PathAssembler.class•VéÕ=cKy<^¢Ø 6vPœ@dI¶šM›˜”Ø2‰À²]oÔ `FÒDžDš1³$viKiÓB÷–®iéBWº‹¤·¤Ë·þM-¿Þ;3–l!ø ÷î{ºïÜs—wçýûí7ßp ÿ’p?Ö;0 MÂU\“H*ñPæAaðö/žaJ°Î;KvÏ×%ˆ¸ÁÛ›!Ë5Am%-«lø…Òcªeãº:½i«ºå†= »Ñ(:B†bèW‚Ãß]µSË ™}BÀá]6Kõ¢ÞÑ&ð *? î$%ÍMÈÈþj\ˆç˜.Ž™Wy“ŠOYó xHÆœñ#iüXÆ“xJÆ*æe<Š,ÝíÝÈ2~‚WdäQ [ÞÌbÒÑJÕ”ñSÖù~NAIÉø¯&ðK¿béU¼"àÔû/zÆøµˆßÈø-~'â÷2æ0O>›~PÄdü¯áO2þŒ×ô¹ìÊ„™šÔŠÝV‹Lí V˜@•iÕlQ» ŽnkeuןCS†S*DuÃŽ®SÁF5}ñ£^ÉŒ3ömr›„¿àMÛø«Œ¿±ÛÛl.únn èmî2Þª¿)Òu¨Ž4SÄßeüƒ5RÙr…œ‰RF5+êè×tãñím83—»ªæí=[‹~©Ÿx÷˜ÇF› õ`Sœtk¯/Ö²à›•Ù"Ϧtªª±÷týýRãff;>kêÍ-€V¼»DíÌãè/<÷´<¿»ÓßÝ"JiŠrÉPˆºh)WÔeSp¤õÍoDLÞ½&ÜÿÓ¹¼®’q¿y¢|rÿíÛúÂÜ?¼îˆrÿ 9Å&¸`ìò$»*øÖB±Œ·ÓË´L`¼Õg ±³´n7¸_ºë¤7‘/¨›sW²wò¿Ãrr;M÷P,ÓÚ."übQŸq”’Õ„çU÷ÙÑK{ |˲ղÄyÓ ŒÙ[ûY¡7Î(=Þ€v àƒ8 ¢Uâ´þð®u’~Ô3IÓµPÏÑê~ššƒñ„×\ÕÐ(Ñ #€#x˜$ÙSÂyLÒÌS>À#¤ÉºÄo ­ÒM´€(¡EF\¤Cž¶ÄÓbiLû˜o“%‘æ›ñDí5²ñd ÁÙøX¢†Ð™À6ÄUþ+\CÇ6¤Õ:i%WÑé¦a @C=5ôž îèØ£Ù£ëJÉÆ¡Ð6®B5ôUêÞ "Dc üPî¡F‚¢Ä&Æ\Ï.zœëžÝ¤Ø\ :ð,ýwšPzà CR;-Ó·ê4EfŠô£ GÆ I!Ò¤ï˜ ‹VšOĉ`ûmôWq¨†Ã³ _<úcýJS O’ÑS.½¸S§wÂ¥"¸ezwa֥ׯ_*ŸÀ«tŽOŽGîº,œM’µ»·1´ RÃ5é=^Å=•ì6Ž®FF(WÇî¸ÈG)éQÂk„ï<“è$·{)á#”òcdù=@!Ñóÿ£X û¢E,ÑÙc$/cÅõf¼Î~»ì?FrBN$;müðY_¥“\|}‰Q»÷¡¡—LTíCUÜWqï sЏž=F‰›!+Yt‘ß»%ëž­[ëÃ%ךH—ñYòíþ]ô<ãˆo÷y:ɘƒ§Ù$§æÞsÃdg:Ɔ¾ÏÙV¹¥K9#½ªÛ]QÛ¶ìÎÍ”nv¦-m•¾Î½†v^g-£*6`Ja©Èà#Y­" GANÅ lª¸‰”Š-|,Ðûì÷ƒg+[ò *øDŧøLÅ縥â |©â+|­â|+ÐXyvyÊ) î'ð1MnÄBʶ6‹w{/(æè¶æX,£Ö(~> WÙ¹Ê## IŽÀ±=×þ›(¾DÚÊÊWFîÙ$v tð$õ0;©À/èÓð~Ç*˜x¤BDôV©`ª -nýµ|/âº#·¿ÿŽÐ)ãÚÅøy­eðǤ2FIiÙý&Ñ^ÓÊ«,=A•5ò²ñÙ¶ì’áð¾´Tã‘mªMëfRص/}6·’-Æ·„bU ñ$eñgþ‡èRevXà|ø3%Àóò_ ๡~Šcg5hçOÈW‚ò -aŽ‚£¯÷Äï.¤›²Ö5¢T ô —cúÐOƒÅ_ð ü¶‹šå{ðLõæáý¾¾»»ðÑP;½ e™™ý3ýyÔñ؆:â•JÐ{3»P—wÑ@ô¡æÃy42ESÍ÷pä~GwÐ"03°ƒV;¸L¥M`Äôæq¬¹=çî ¿4éÈãøˆ/è£öZú‚>×u‚Þœô`iûÑNß]xÈG7Yø κcÃA=·#7?£”ÇáÇ ÆI4¹lv1ê4ýÝ$ Ĩn¼Ìq˜³R!9K€MÏ-²z›™À9üBÔ¯r‰œäWÊ)´5È"è î,µÛìÊ9z|Œ~…_=/±’ÊÈ!Ž~üLë0›Ä÷8WIþH±-_„Ú÷{ÉÿM F1µWÁU>…Ë ¯=€ÿ’‚úއ¨SpñL<`¦×Ý–_b†qW»üPK Aª=©°?-org/gradle/wrapper/WrapperConfiguration.class“mOAÇg¡ôÚãJKŸ|iᤠ" HULCß-œåH¹’»«&~*M$&¾ðø¡Œ3w ”e›˜&3³3óŸýíîõÏß_¿ Ë:¤ÀÒàaæ’`@EƒG xLá<™2OÈ<%³¨Á’ÏŽxN£8m—ÁPíˆæ–kÖöÖÖ3Ýõ5îÛ ²QO‹»M«Ž5·)÷½çÁ!ƒBwª~È+ó õÎ1í«sM¢(ê/;®¬0è/•wÄ^´°ž®9®ý®sܰ½¼Ñ ÷nïóÖ÷Z‹d,8t|åZÛkZM´lë‹ÇONlÏÚü‹¶ûÉiv,.âsñmâìî£nsúô =ÌN æN8¡u‰ Ñ½ÐÆØq$&ƒL*AîÂ=HL)£ÆìBCO*A4dF r_ ¢É s¨©ôÉ )%È  2¯)©AeEÔ,õÉ ²$!ƒÂçX Ìþywã ¬âyõ%^}9„¯°úÏ3à 2¦y~žÉOȸ¨`;¾Êä¯)Hãƒ^V0ƒYWðõ^”а¿;98ÐÝ14ØÝß724Ð3’èOt K÷×Njí-;Þž´-#;¾[ÂüN3›·µ¬}HËt eû’]„rbbßàAqy1ypßÈ–mÛG’C½–éNŒ$ûº*=” 8%g™9ݲ =/a©£zÁ62í‰â9©¿ ÄuÀÈþ NÃlç=qÔ¤Ìì˜1.aCi·[Z:£·Ÿ²´Ýk?ìÌ‚§`i¶aféRݘi‘œãzÊÞoX4šÖ”„­ÑrðÛ!vÖSºF`N3Mš-ì1²z_arT·µQÖ5Üc¦´Ì!Í2xï²Ý®\ò)éá&* Ÿ´µÔ‰^-çÞ«Ùcd {¯„õZú»nÃ! ]«÷$E×锞s=°' r|Ë™¸4gé9ÍÒ÷yJ¬Ñƒ Y†„EÑ Ž€¬n· ts@òfÁJ•BU¢(Eò2æÈDK×ÒÒ²2t!cjé„'-BF–Y×&‹vÑÝÙ\ÁvŽwËø†Œ—d¼Lî×m¯z¤”^B<úÿd‰¬ )G£Go..?¤n.¶LÆ—Öaš6é§åz5¶K³lÝq hÖ8Y[ç#ƒ”0H M·(aɨþ-ÊÂW ÃvМ$›ç‘ûÜ`Pm¬‹Þ¬Ü?}U·b§ú4FÙásïN‘Òú˜VÈÜè\;ïéˆ/TÈÒ,P¡§©(ŽHždHW)¯(±MËî5òyb-Ù«$E;µ¸¤¢"6² Íÿ»vÈ o±JˆVð;Û6w»±ÔîT â›$Ú¯º™ö-†T|ß¡Æ]²y µI½XjZ]"%ðÈ)Y¿6¿>’6i›5íˆ~šªg#•M «”;•Šïâ{,í5Ÿ;¬¯ÃëUÀkUD· u=‚£*®ãû$$í)Õ-¯«ø^Q‘ÇI?dIe ÍžPñ#æø1ë½Ää„F/Q²0©â'Æi?e6õ!#—¤(莄Ÿ1õçeøLø%ê|º%y°Ó,dÒÂKÜ¢"§|j™“¡ÙS¿RqŒmý5ÿ¿Uñ;^ýG©Q¥Ëšh†&Ÿ…}#YÜŽI¯§7w<}EüAÅñ'æLÇQQñWüMÆßUüÿ”°¯ÏŒˆDœ2ì‰È }ʉx>§§Œ1COGŒ¬¯)7rƒ’a…W¡äTÖÖN{üRçÓ“Ë|88a™§œ÷«ÄÛïAXTY¬Öø¾oeÝ‚zfu”Ç‘´y±¥º®¡çtR³ý{…·»:‰íßvêý:ÉZ˜¯|`GË_8檫x†8󨊣¾¢êò~Ì•œ£7ó:§Ë+x‹µ@¤ü-I Ý:bäqJÞ»q(¸Kq6±Û·ßb¤…j &™šÐù˜Ïï};dm§?JßpõEö¤“›)º@a Ú¦¨ƒÅ•führ%’•Qßæ¦2&ÛÔxëg“lL¿->lDÚÜé×ÁM6øuF¿g–ôÊÛºߊ C±šþ!Ì£BµhÀ^ÜG»×Ю ›h¿Ï³_FûÏ~í;=ûU´ßïÙ7Ӿ˳_‹0·kZ‡¹c‹™z8ÍóIvz‰³v¨¡Ð0ixUñpõ,sÏ¢fò´€ë§Ña\‡ªs oе(ŽC´ÖØ BÏbùj‡ÃJà%Ì®Ž%¯@Åü«,,V.£ZÈX@3#Œ8šÐæ‘Õêš‘¼RMô`:B¥ûéB€N¦c³X@À xÑe,޵^F8¿Œº8isOÆ[¯`IìQfQ?ƒ¥b^ÆÓ –Ï¢aÎÙ ç¬Iœ­tÎV9gw‘‡"3Xí6;‡kc‹s¶Ö9['ÎÖ_@cŸpÃÇ qvCÛ,bW/’þ<…guÐE4n"kÖÐÿÅÍXBÿ™èeÛ(¦Û‰rÅ}îÇNLbÅnº¿—öà<îÅ ÿ„pa€öKq‡…K§éÆ0 VìHI¬8Cª„K—¢ê?RMÁ“Q%Ó¿Vš£tʯ<Z‹0«hn!çÅ{È£­×9o(g.¡nmt²‘rgíÓñRHÃ"2„¸ü ÑLòŽDÆrõ â.<€7’^¬MÒ«h–Éî7Ñ.@§#Ä}¬¨Éâ "áð¦l¾%Þ4‹-‡çp÷°XnŶÊÌê%úPG ”2kµ«‚›Yu™ è¸2Ÿ&"[²rÛ‡É÷ôÆ[g°ƒ~;/@éã¹M´–dÕ客ÔäT­¥P, Ia’UOs#ÍMä\Ö#"t[éf8¯80Œ´£HyCTÏ!âøÈHsˆôš¢ºcô£/··ÐÌÖ…œTÜUYÇÇ<¹0ýßîÞòýÊËãžËÁâåã8áú*C9ö­ŽôÝ»mñÊŒ=‹HN@N3XL¹Ìˆ[[Å\ mRH # SdL9¾\ö¸ÙŠÅ¥l¥ 9O†ŠC(ˆ.ÊH']¤„Tí µú!Ùž ތīS´ª˜§]ÌçhµDL…³yW !p 5 éÖk¶N¯<ÚXœzZ*%q3a0LQwxˆ|q†,8‹åx˜’é¢?æñcKQ—–¢.-®.¼š"öc#ÞLg‘d ª_EXÆ™`-q-z3AiÌ·šD#»7è6²á×þ¶^á—Ç=n*êÒäê"á-‚ÿáÿPK AÔe‹ #gradle-wrapper-classpath.properties+(ÊÏJM.)¶M/JLÉIÕMÎÉä**Í+ÉÌMµåPK A)gradle-wrapper-parameter-names.propertiesPK Aorg/gradle/cli/PK AÕÜ?®<S1org/gradle/cli/AbstractCommandLineConverter.class•T]oA= ‹ëÚ"¶µ~C?”R*O¦Òh4!­ÒÄÇaY×m`— C£Âߢ/4ÑÄà2ÞP–´ôaçÞ9{ï¹sæÞÝ?þPFÙ@;:v D°c@ÇóÀ{xY9y†xÕõ\Ycˆfs§ Ú‘ß±V®g{m[´x»KHªá[¼{Ê…ì' &?»†bÃNɼӵKV×-ÕÛ)¸%ü^{€ìÈ÷Îm!mQaظÌõµÿŸ¯|¢j«U©›n†Ãl㌟óR—{Né…¬•ì¤}f[²’ C¤… ‡´¬-¢ k’ôÚ–Á=,È÷¹Ø‚ak^ÀÌÁß«Š^tÊê Ö”Âõ¥-JŒ×_,»/]ßèØc¸ÕtË¡ +;Xš¨rŠîCµuVQ CWˆ uÁhúCaÙoÜ ™«ú¶Ô1aà6Cúºë2Qľ‰LÜÃK†Â &„!9¯‰a{ Qá23Quá {¶'§M¡†Ð~rÕÝìõ3|i153 ¯mnžDevf¨èÎ߆J…£–š~-C…Hý;"d©9´š´«“edcù °äDq‡Ö¸SX¡Õ`I²w/!)²Œ:·FyÝ7²ÙÍ_ˆ|¼@ô8_AË #ÄöFˆŸVX! ÊK`öªR~œ;©xëô†)ï>=ŠNâRnpŽ´âØœœcÿhÿ˜âŸ¯òÏ”ô4=c/ƒ-e·ÿPK A׃µ³Xì ;org/gradle/cli/AbstractPropertiesCommandLineConverter.class­V[WUþN2ÉÀ0å H¡°Ô„¤ÄKKµIQJ©†‹¦‚Ø;L†0fâÌáOøîZ¾ûZ_¢t­ºúìÿñA—·}N.iÊ2Y9çì}öÞç;ûvòëßOð6¾Q0Œ÷e| `ó|¸£`w,â'?ä«û ÒøHÁÇÈô` Ë=˜Å V»ð‰>íB¶ƒxÀ‰Ïø°&cë.cCÆ Á”i™Þƒ?]cì¼ÁЗ1-c¹¼·i8´Í"qB[׊kšcrºÆ”¼mÓe¸™±B¢àhù¢‘Ћfb~ÓõM÷V»d8ži¸ öÞžfå¹ÙÛÚ'¦á$ F]èp¥ä™¶Å0‰fv´}-QÔ¬B"ë9¦U ёѻ†§™E#Ï0ÖfÏÕ³f±[·­-³PvòTä4ØÐV5Ç%\ÜÁ’X3L¾Xž¤íÚQgIW‘‘´¬W]Àp§0™?¡•¬:£ì™ÅÄ’VJFOѹ’MA`i Ò®q¸¦ËÆâAÉ1\W@ µó¦\ì¶AÜŠ€A)5"É“ã4‚¡æä8,ÕäF³hªJ+gŽ ^Èzš¾KÂŽŒ‡añ@7ª e<¢ fÍ‚¥y"¨ß¾´;D='þûš+›;†î%£­,†üW»’J /G¬dí²£÷L¶Xg<Ãm©x# ý§íªx ã*&0.ãKo 'ã+A“|gºŒ<ß¡o©(`[†©b»*ŠØSaÁ¦¼¾­¢„¯ Â«ÂC™û”%M—UÅ4¥Ü¹zÝù%ÜLEu|tššg·1qBuÞ)”÷ Ëk$1Ãø‹ú 5ÖÈÃÖxE;i1g¯÷Yu[së°¨ª¯D:2ÜKZMÍu6ò?Al©†T'¶[ô'\íL’z ½¢o’B‘“EŸ1]^„½Í†.³õ¡&…z6ðK®Z6<ñ¶ÒS+Y‚h~ßu.›VÞ8XÙb·»uš÷ù2©¿iÕî°•t»ežÔd£N§Û¾³áH;¾4A†Á?2/y/• ™jéŸÀ~¤…£43Œ1𺸄ˀ$ñ¾ æ‰Ú<Ég’yWjFK$í§ùj,ð ¾ ÿtþì†D“”­ °¯ ¸'R® kýøÔ$G è}/aŠNäƫ֪ÄjŠ~Œäú¨ýDH›ñæARüôßèô ͹?·‚î ”#ô0,_;‚Êðiqá9|·¤)Ô[Aßl øq"û0àÇú%ÊT‘Âéq¯Ô¶þù9þ„NêËäR7¦È3ä…wÈó„oƒ="\ü× Ó bôÓjŠèkDóÛæ·ÊQ0Þ¾Îá-úé#KuïsÎuâÜQ‘þÄ€ŒÙ¿ác¿cøÚº)Q‚á=áÐ[ýótx’V¿p¢2‹?Ç`á'g[©:¶é«YMᶘçþPK A}­ÎyGK1org/gradle/cli/CommandLineArgumentException.class•‘ÍJ1…Oú3£µ¶Zm+êÂî´UÜV " Âà–îÓi˜FfĘ́¯åªàÂð¡Ä$-U´fq“{rïwOÈûÇë€34K(`Ë„mu çœ žöê‡þ=}¤^DEèõSÅEØ=.å˜T}.Øm˜ÐQ¤•š/ ©â&Ÿ‹…t‚_ªÐ GÌ "î]Ê8¦bl *Ìb&Ò«ç€=¤\Š.³$¡¡¥þrAÐ^âí›2˜(ùdæ[ÃÅ€f‰&Õ—V”ú2S»æÆoë/c§PFŽ ‚Î?^E°û5ÿ.)Ùâ-äõ/˜•1ttuÖÓyNïN»3y±÷+:–¬ÚÔ•;XէƬJëk–â ŒuÍ0¬Êœu£gäõî¶;ÇSä~ÂötÓ¾…ÌÊ0w3§*6¬ÅMÛ]ûPK A³ßâúg)org/gradle/cli/CommandLineConverter.classQMKÃ@}ÓÖÆÔ¯ª'Ï"4 F<6¥ EQ($xߦë²%ÝÈvSúÛ<øüQâ6…L ]XvæÍ¾÷†™Ÿß¯o÷8wÐupJp’L-¸6„~/œ²óS¦„ÿb¸fã”%ìu<å‰ ¼*Dè<.þid¦æÎn$…b&לpW'<(a‘ÑR‰`ÄqàÙKxî…™¾Ðl’r?I¥ÿÆôœOFÙlÆÔ$”jçήwÚøºvRm_Uˆ%J¡¡ïÐÄýªñ°vJQ–ë„?ÉÔê_”äFë%p}»b.·;o¾ºÿ-7Û‰Zä3®ÌfSm¡Õi¶M´l¶g³–ÅÛplÔÀ~Qqk*[9Àa¯‘#ïÉPK ASf Õg&org/gradle/cli/CommandLineOption.classV[wUÝ“¦4™^ˆ´i¡\ä"iBµ´ ­ÜZ.Å^ÐÖŠÓdL¦™0™pïwü¼ø¦¼ð .UYË哾ùü.—¸Ïd:™Ü¤Ë‡œós¾³¿ÛþNæ÷~þÀËø&Œm8'ã|œkE–Zqo é¢Þ‰à.Eð .‹A•±AšŒwÃh/ÝÊ iEHzWœ¯Š…ª8ɉÁC^ܾ&KFA†-A6ó¶næ :¦®¨×ÕTÑÖÔœfJhÓ³9Õ.Zš„Ý•§c¥¥¡æ²©9ÛÒsÙÑü¡¨V¶¸ªåìù[y^ÚäÓ7ÔB*›«÷Æâf$£Ò–î8#!Z /!¬çÒÅeÕæJ‚´Dÿ²–YÌ/êöŠ„¡jÿL+›ÊZjÆÐRiCO›««j.3¥ç´YLjão8£å--­ÚZFB˘žÓíÃbqŸùI[³ÔeCí_73šHafŠ«Ëš5/΄ÃfZ5TKkw³Åtà Ú+:3¼ëÙNUæÇ³-¡»ÒÓë©çkƒê´ÍÙjúê´šw®Ê(ʸ.!¹a‘pV³g×)³)Þ_Cš½Õ{ œ‰¬¨…c.[$ Çk¨Ò¿‘lª¹'è´¡«{âRS|~2ävÆ?á§êæõx+ÉÚbi…¢ÁÈzkNu#£Y¢ j>¯å2ÓZ¡ fYËT¼¡òR­QŽ–ûxu¤Wx8R‹º± Eë1Ã0oøÐïgëmñަ¥ž74ŸŠ¢Ór_q9éë\…WO•w¸–/jÝh¼Šz"#ñÿåÐzÎ,Zií¤.Zª»FkP *Ø$}ÙÂiµ°B+ ¶c‡Œ› na·‚]bèÇïá¶‚÷1£à|(¡³º 2>Rð1>aÑÊ Sz´‰5 ‚‚½xAÁ$>UDœé¼P~Ã.*8…Ó ö•Êï%>Ä‚Ïñ…¸û¥‚¯ðµ‚;ÂôÎg¥¨ÂñÙå+ZšþEkߌõM' gÓ6-‡0 ë:ú ¦NVçÏŸ=!!¤{ŠÝLX`©e2zF»I«Áœ3Uö\É%ÑNµ§e5CC]ñZ]AáºmѸYC¶YÚb×Z.+ÈËØ&%ôÅÇÿëb Ý`¯ð)ð³sÜ4 º"((¼á{±j^×ð<ÿ¸·ñë QÁ*°>\¸ÄòÖ{ø#™åæœóÎü%ýNîíÇ׃\ý&9ŸI<†”x‚ÀùÇhzˆ`âG4?DKyGN®!$azÿZ%ÜÅV a ¿"2“ø Á5(,Þ{ú碑⸠!ŽÛ¹Š¡=èÆVú½£ôé$¥Ij¼Hôa¼Dÿ›„/üi;ÐßaÊ çÒÎ¥ƒ”»xÊšdôÉ8$ó‹¬ð«TŘfŠ+q½Yøúƒ£r²*6÷:^”ð›]Û%׸wG\788ˉ¤H€ir`ÂÎv?/'¨î’š†ì–ª†ØÙãç¨cæGaf„;B'”ˆFÖí|vévÊçrȵ#áx=Œ¶zCÄ8Pc.ÆÎÑ}‚vr cйëü JR̰i1!¤hô¹ÇØìˆ]ÑnŠÉGˆ•S³…†À¯Ö«ÓÁ¢ô0§»ì ƒ.§jÈ5"GO¥ú† ý™ªñ޹nÝæJ0¶·ï.b4Öó-ÂÉÎл˜n=ðŒw³"`´á‚~´r<ña³s>Ìã)C—ÓÕ0Œ9y®mjú®V!:«©|¸Šk‚Ø"%²£ƒ…*ðÕý5&˜@TZ¥[AkI )†áª±Zb²=Níʆr2¦jŠÁ³ å¾sš¶噜É(…B`4JY:TCaôÙeºcªùU•¨°*çœb2ô”vŒTzCɘ‡gKEËÔ·N„ö¶R¯9‡r,m:µïBM}¯V´Î÷{"O.6¸ÿu1á³ ¢‹~è-ôëg~¿hW´ªƒKt/ÐO‘vs´¯£Ù }„+ ï£î=í]h§±YèØ,êÙ¼l$ë Ùã®ÖŠúÉ®“7õ½ Ü4O?Àõ îðgԻ𠞥þïh;_‘¦!ÈöѸwiýÞõP˜¶¾þCEÓžEVÐh`l­l í,…[±¨m'GT&p ÝDA¬nÓÊE‡ÀÂé!iØ/8<~Ù[$›"­ÀáVôì8z€b3%®ø‘+Ž>gÖ*hÅ/V!r'î·ßÂÀeš§Ém3=³:Irƒæ›n w„¿NÄ0ñ¾Š!ñØŠuñ2‹aÚíÂÍI·ôPK A¥D£¢&3org/gradle/cli/CommandLineParser$AfterOptions.class­•mOAÇÿ{-½r-´¨ >W+p€Š"ÆDð!$MFxa²´g9½î™í¡øü.¾D%ÑÄà‡2Î^ÏrÒ’cšìÎÌÎþffwnûó×·fqÛ€ŽQiŒu“4®£h ‰IS°tLë˜aÈT¼z‹jÉ6ÃPÉ“5«&yÕµ­ŠëXO¹lØÕ¥}Ÿ†ÔG8þ]†‘±x÷ñ2CrÉ«<§ +ÛõM[>ã›.YN”¼ wË\:JIËi0dï½ômùäïxB©ËBØrÉå†Mªu0r$f„Žî§¬óuþ~Ó^õ¹ô›F†þ±Ò+þ–[.5k՗ލ-Œo0$¸¬©äÚz<Aè˜eèkÊͨ´èS ÈbÅÑÆVçï…ùg<±â‰?ÕdþÊ`±Smññ¢‘t\cX>ÂÇcg‚>Ðv¦Õ@]7|”- ƪ·-+öCGõÅ@›Ï”ª0‹ ²j¸žE7 7æcékâµðÞ‰W7xØ’Š1§ãf·0Ï0y¬d˜8ÎÙ3Ì¿5èó?U†Ñ¶=ì¾ q~ :5úh˜hþkºmqéóåÕêƒ_ò2w·íC^€2 ô\¦é ¥G@õI]ÐTŸ‘¥‡´G¤i4gL¶Í,~Ab—T ½4ö"A;Ÿ£‹­Ã`È‘m éŽò:CóÙ¤ú÷3q‘æ‚äÓôhbÆoPK AŒ‹Müu <org/gradle/cli/CommandLineParser$BeforeFirstSubCommand.classÅVërÛTþޭ䏲Ò:¦I à§I|‰sk›ØiK’^‰Üœr“Õ¨±¥Ž,Ó¾À[”˜2ÐþƒáxöHnb×Nä0áϹìÙ³ûí§=«ýóŸ_~0‡‡2Ncñ K2†°È‘“!aYF—ø‚«ŠÍ ǪP»&CÆuŽ!Üä¸%ã6>’1€u޼Œ(68 wúoŒz|†a,oÙ•LÅV·«zF«™5«VSÍí¼aêwU»®Û9Ò^6LùÂpsÒ_ýu W¼Ý¢—›ÚdÖ¬má”l4jeݾ§–«$‰æ-M­nª¶!öM¡$à2 ­ê-[¿aØu§Ø(7m2(·MS·×ªj½®“Ú¢/ÈxWCiX;PíBNg, –YtTÛ)§âò}›ø”ã3%l1ÄüøTðŸ3,ùzºoî˜Ö³Kfž=ìHÁ9Œ T_1$w°bW5Ýt®?ÕôfœkšŒ5s$]%½˜—€±‰ñúÄ4Cä Y åGºæp|­@EYxÔ.ù†´~H@ÃÝ„]*ÿ[qèçrå‰jëí€;˜;þk§G柮G&ާİÞSEêõQɪ¦éõz|q†×|ïyÊóÕpŒj†Š( mªjÝa8ß ÓË”Ww[E–‚ñ^lqŸá6v¿ëÆÊ(=­»WN#¯#¡rN©YS‰–¥.8ÍÔ~éêrWøûß´ö¿€¹ÿ¿¨KÇ*bÔ; QËÅ"Q¼iD@Ôr0¼M»[´Ò¬$’?!H¦vüö¼CãIqÆæÑÇfð.ɆéŒô1J¶á®¨–’ŒáœoZý }4«{JÉÛEßFâGž£?õ3x/ÊJ#Òï˜õÄ'¾Gtr)IÛp‚ô•g{(EOJ¿âT)˜.>Gdƒ/ö-¥G¤WZo=sPß#—`K3‹Q–Ã[FŠ]FŽ]¥¶pÕ…¾àÚ‡®b“Y¬¦h@˜~R ¤Èæ(®!ijJ3n¿‘ã8B§# g›¡HW¢™»Ü±îú…a6ç:Nx*ûŽ9µÀg\Çó.{bµ€ î×¹èÚ¸„÷i^Eˆ¾`– Nó¸$úä,’ÔÏS‘DŸ¼Ñgq¢ŸÎâc)€/hþR’ÿPK A´*«ZMïForg/gradle/cli/CommandLineParser$CaseInsensitiveStringComparator.class¥S]OA=wû±P·RˇŠ"ˆUhAx1¦„¨MLšÔ¤„÷¡êàv—Ìn‰ÅÿÀ‹/˜ø`|öñãÎîƒEkâCçÎÜ9÷Ü{Ng?ÿðÀ&6 °Q)`Ì,9Ü5Ë=K&½l£fcÅÆ*!¿¥|m2ËÕ]B¶t%a¢¥|ù|Ðß“zGìyœ)·‚Žðv…Væœ&³Ñ+æ"”M?”~¨"u$Û‘V~¯ô…Q  NÓ÷¥nx" %œ©6mÜÁ#¥nÔóÖ›uBå_Єñ¶êù"ñ[šf)ÏýåØÖ°àm¦*´ƒîȧÊH›j·fŠpÉÁ\ëp ¥ß©LbÊûúèÿÙsì‰ ÂÔEŠ‹£Ý"L¦ïd'höü@KÓŸ0}Á›1/dü MXEÏnØü…qsYXÆ'>9|r9Ç\í=¬w¼±Pä5o’ô—yï$L Ì‘Œ…i±ft–cyeõ™í¹·ÈÍ›}ö˜³™˜©lôy:E¾Á¡1k-©LYÍn3q§2®òÎâ\Ãuæ™M&:åâÒcî#íÿ€ï2‹µ•OÈ­òïù㿈(&íJ`æR’‡­ÔºØ™p6k·0Ï÷,ÄøÛXŒã\‰ç·Øî*w™ÅM/ýPK A|ìRÎÐ&=org/gradle/cli/CommandLineParser$KnownOptionParserState.classÍXéwUÿ½6ͤÓK‘*EqDè’t‚;VkE¬´E­+. ɤ3ufÒ‚ŠHQpCqPð![ÿ>žäu¿\|ÂÿŸIø\@-V< á°À¥gØZ§YÍ“ˆæ€5ͨ-4Τ¦j§×ª¨ 窬ÓÕm͵løÅ Z n­ÍïÔpi S¬5ê¿—˜$뻦 —b^¡)ÄÌSº™tçÐd%f³ùâsT‹CPÅž`Åg^íá •€ôt ¤µÒÎH‘@Ú'ÙØ„N‚rŒ"#ÁŸ^häÛÁN°oGQ7AUß‘çt$‹ åYFRkº|²ôžÃyÞaCè@Æçg‚²°pPÆÉëèn'»Iì<:\(ð=õÄšÆpÑÁÿòÙ,§œÊá›Á«ía…µîà¿Ò±<çÔV²â8æŠoßSTÀ=âGŒˆŸ°KüŒQñ ½’~Ãqñ;~àWqÂóW”|²‹ò¶›â\Šãä¹ÊTÎÏÛ°kqS Žä'×Í'Q.á–¿QsŠw8¿Th·áÚDL)Ù GcMóCG!O Ø+žm>V6ådÜŒ¾ hd¬ ŠFÆí^Ñð©wŒ¬÷øÞ‰&Ï aÄà ‘îWÐ~qˆÿªpÐN߽̾2BIî þ7ÄÁ³!ù?PK A$ľ¢¥ô<org/gradle/cli/CommandLineParser$MissingOptionArgState.class•mOÓPÇÿwÝÖ*ˆLDÙ² ‘!¨ ·'š`0ÁWÖÌšîo;¢ñoôÓøB…Ä~?”ñܶÌKË’îœÛs~ç±íŸ¿¿~˜Å’Žr:’È'I*(uZG 7ÕÙŒ’Šq”ã˜eМ-ÏrD·†_øòK.]S®zÜ3Œ§B˜²js×5]†¹š#ņäuÛ,nÚV±ê4›\Ôk–0¿É#%Šr×–wŸ¡’í[cˆU:å3¤ WZÍ S¾â6œ®9›Ü^ãÒRzxóÞZ”îÈsËu-Ñ˲VµÐ;‹®žTJºÉ?n˜¤I/¸GQ²µw|›m.ÅUO’ÛRn!ÊeCåwä&à# Ö» º@ûë~Ê+ŽØ•:0ßÝrïæ`€´#:L‰:՞ͭÅ1Ç𦯉÷ö)û[ùPR—2Ãäq\ôU§%7ÍÇ–Ú’Ñ#63ª†V—Ûtœ201,¸ˆKî`<ŽE†ùþ–ˆaú$ýe˜=y&z·ƒaêà °ÜýÒýioÙ¦ SÊžx[t¿­¦)<†L/gdè핤÷=Ij$iˆ¨ ÑÉ0iOH‹Ð*ÏöÉ~"ºCj„ÌAæQòÜÂ{Iœ¡³ÑÀgI‚/),£ß9Œ…ÐÅªå »ˆ}kó4º¶ÝÁÑÚ çqÁçЖ„œgŸ2À`þ¢»(LïBû~÷ÉÇeÃ6n0Ä)I')BòeŒ‡à{a‚I¦㇡Ÿ;rL¶¡ÉvŽ\ Q_Q”ãëÿíÓ•;û‚ûêãŒÀ0À¥AS¸B’e4hØØÎ¡dšv6lÒo¼’®ã†_єš Äh8%1õ+aêûUÂÒ' øPK ATK>ªÄ=org/gradle/cli/CommandLineParser$OptionAwareParserState.class­UÛnÓ@=›¤qâ¸$”6\Ê%¤)MÝKÚ@)½p)E¡ E*oÇÓĮօOá xá$ ˆJ|…˜MÝ’*A./Þ™³çŒgf퟿¾ÿPĽ8È©Ð0*w×TzŒ©Èc\…Ž “*L+(¨ˆcVAQÁu†„á4›Ü®•,ÛdÈ–Q/Ô¯5̂Ѱ O¹pÍÚêÌCÔ{i¹¹™è\û èe˶¼; óÁð`ùñ CdÕ©Q²IéØh5«¦xÆ« ò ”ƒ7*\XÒö™.Cúɶg9öʾZÙãŵuÛ6Åjƒ»®I¸…À,s½™è]SMþ¶j’%¼} ÃP¾ôŠ¿æ…·ë…²',»¾4þœ!ÌE]&ܤ–8ö†c$Ž${¿]pÆGÓì§±õ˜oûRËNKæš%t×éi©¨!‰”†Ó˜ÓÐSnbXÁ¼†[XP°¨a Ë s™¬¼ðL±f ×+·ª~˜a°—[ªÝf˜:ç~½¨Z§)9höæOØS†É©­‚» cÁsž›mÏqÌrºœ |ê¯Õ¼ñ¯ðFËüËdUº©ºÔ©áÜ0L×ÍÍÍÐ-=ƽ”»õ_îïqk³Þ¥vr®l0.’¡Ï¥FÒå|©”œxò„¡!òJ„ÓšÒ'vÁtö!}ráOþYÐYг,T6‚$Ëaˆ|iŠÑZÏíÔç ûÌ‹dKTTŸø‚ȇC¾(ÅÁò<ÑCž(.âÅ.#ãóì ¯*êŸ&ª>ZÙ7Dß!½eSZ2B™ÇÞ#¹‡ø¦oªÛo+5UÉÀ¦cÓºÅCÝ¢¯{•ö B£*^ÙvÒ#8G«Ni$èy6¢˜Ž+ùÿÑ1Eˆ8­3$r£]‹ØoPK A˜%àÌ»ª7org/gradle/cli/CommandLineParser$OptionComparator.class•TmOÓP~îÖÑQ:¯ ¾€ Ý ƒ2@Š.Ñ,YÀd†Äe4³¤kIÛ†?„/~#‰á³ÿƨ_ç¶ N6).]ÏË}Îsî=çô~ýõù €E”%d0#¡Ÿ¿ú0+bN‚UÂJ"E,IHs;'"V8|UÄSk"Öz6LÛô7’eA(;íªi;­æ¾á¾Ñ÷-ò Vºníé®ÉíÈ)øïL!»{䛎]všGº«ûŽË WlÛpË–îy!–ªŽÛP®~`jÝ2UÂ6uû€§y­»žáN_åÐÄz`Q¢W…kÂH-¡TˆÓ ôÃT|À%|‘ÎÚ4yÔ`õP?ÖUK·jÍwM»¡…kÉÚw÷º¯uz”Š-ÇÖ¤¤ñž$Þ/0LßÍÐ[3¶î·xѪÿÚMË7-õO¥7â ±IÔRÍi¹uã¥É;?Ú‘~žSËÈb@Æž‰ ™Z½a×ÃB¶ÏÏh÷Οñ\ƶið®ö‚a+6eY÷ŒŠí¶gúæ±Ñ™{"!c /&ãªÆqã ¥ÿý¿vŽa¸[ëhŠãÇ‚Z×0ü0 }‹¥m j†¯]{–…a¤=¿eÑžBº$Í>•½Pí¶Þ}à4¥s2¯|=ѧÕéQ*t±e躣KŠ.@ >rd ’¥’d$S3gH|$%!z÷p'û†aÒå€Ü!Éx‹¢àD–"¹2{Šä9„·ì ©Oè¹€¸Sìp­ çHs»wnL8…tr™­I"þŽ!öyö3Ⱥ2GY¹v÷‚¬à>i<2‡˜ Ø<l’4!»M»{ín•Vˆ™™Ù ôé ùäš#fÂdYþä"’5’‰¨>¬{}FCÀåNS˜Æ#ZOâq€Ï£H·INQÍ2(RÔ8éô˦ÉSÄ<Ùi’Ëÿ PK AäfC˜§£8org/gradle/cli/CommandLineParser$OptionParserState.class•’ßJAÆ¿³Y³º¦ÿ4Õ¶Ö¨£×JoJ¤P¥… …H.¼›$Ã:²™•Ù‰ø }¯/ú}¨Ò3›€ˆ…4»ß™³ßùΜýýçá€#ÔB°ÂÇF€ÍUBñXie? õ½Áo¦}IXl)-O‡ƒ®4碛pf¹•öDÒF¹ó8éÛK•–ή­Jõa2iÚVXþTú®µ4ÍDd™dËÇVjâ(6¢ŸÈ¨—¨¨™B÷]ŸQ]í¤AXH5‡ÆžÊ[ûÅĶóOúÖ÷&£ŸBÃT3k8ÚNê­+q#¢Dè8j[£tܘš¸KûMdT¾Ì‹¼W^'ÒÊÛ„Ýúdð‡†[ƒw{H¨ý›»´Ó¡éɯÊm¤òÌsàÆ+aÅ;„£é÷@(?^ÑY÷JöxÂ÷Ó\a{ò(„ê$“_åÿׇ{ŠðÜL |ŠX‰ufÿÞfs'é'æ8. ñðygXÊu+¹®âe®—/;çÚþ‰ÕÃéßðÊÈ0‚çÑ:^çeorÿ[nÎø}‡y?Ä"k™õ•³—gÿPK A¢Æ÷E«¶3org/gradle/cli/CommandLineParser$OptionString.class•TÿNAþözåÊq”ZDQ‹´GËQÄŸ kLŒ&(ÿ[®—rx½kî£âø/$‰&>€ï¤qv[l“B“ÎîÌÎ|óÍÌîýúóý'€9<éE?LÄ´Ž4ŠB-¥0£ã, ³:4…( 1—Âmá;¯á®†{ Ö²ËÛü#·<î׬µ8týÚCOЈÝÀ§Í¢ë»ñÃT¾Ý¯ÝRXgP+AÕaXv}ge§¾é„oø¦çˆLͽuºBoÕxËŒU™° Cê ßwŠǣȡSk9kV-äUϱlϵ*A½ÎýªHñš‡‘æNÆSéš?s£†Ç?¯ð:幘/t*´-æö‡W¼!éh¸ÏŠƒæ±† /ÏTww~eÙåÓ¬e!ærg‰cèã¶íDQ®ä¹ŽÀOE„–;McBÒ»…ÛÉ-Ü!¹%Œá.ÕÌ"‡{ä©äN'Möë¬zz‹ÆÇY%¼B65[ümŽ~çèkÿE“T‡BZÆ“q‘5²<”]/h¦¸äŸÀ}LѾ‚>‡‡‘ÆM²c”ïGÃäMHxº¦) ˆ±ïPK A`M~U¸2org/gradle/cli/CommandLineParser$ParserState.class•SßoÒPþN) s€ÛÔ97Õ½Œ&MLÈf‚ÙÃÞ.а.åÖÜvFÿ'_|ÑÄÿÿ(ã¹-›Ý Aš´çG¿óïœÛþþóó€´mdQ³‘C-Ç6êxbaÇBƒ{áI/zIÈ4šÇ³Œ\ÂjÏ“îáùdàªbàs¦Ò †Â?ÊÓñ4iF§^H(¼*tU?'‹ï¤tU×aèòËv/Pcg¬ÄÈw¡ï9Ý`2r¤;$uõTy‡Pšˆ/—#}Œ¼@Ö½3ñI8¾c§)OŽ;ÍBÞ / ¡ÆZå Ž°È›…&¡œøWtŸÌi2§íâqf¸YC!‡¼ûzÞPÚ•h&ß—ûP2£»e²»gÆv¡nÓ‚$Ù$T@|„*>AŸÑ%¾ W|Å):ËT Ð3€¿â‚Â_qIÅ_q3!ŠžÅ¹ t–¯^= xÎc @椚ÙCäÍ!ð÷:°Z_ eªàYòÊqà>8YM¨ÝHÅEÿF‚Ÿw@³@9\"žÙ!µvÚC”œzÀ¨1‹ø‰vñ«®¥x••&Òƒá€k$}ËŒfÇö!¶uõÁÇÏTsj]Åp9Ð9†+Î1Œø:ó*…4ñ*4fEù!Š´“æ¿Ëœ¦./1YœŸÍ ®‡µ?PK A£=l)&org/gradle/cli/CommandLineParser.classYi`\Å‘þJš™7zz¶eÙ²=`láë–1¶°åS>K6–±‘ÌXz’Fψ™¶8B¸ÂŽŽ``‡‚¹d ÙM¸ÂÈîØÍ²aÙƒ=€ !lÇÇ~ýÞ›ÑÌè‰üPwOwUuUuÕ×ÕO¯{ö€YòT:ñ±jþW5¿×±Ÿhøƒ/>Ññ)þ¨sú3 ÿ§áOùø >סã yøRÃa#ñç|ÁÑ|ìÇ1ÕׄW‹ø%GÇÉÕÄ£c¼xýâS¿5ÕøEžŽ]¢û%_ͪ¡fFúeu‘¿ŒÖ¤PÇt|ÂeŒ&cu”࿱—qª¯8&¨& œ¤äž¬š‰JO‹ï”|7#ñP"t‰™M$(°¹ÓùÎL8?²=ݱ×cq3Ö”&LMÖsÇsO°¶A0ÚeúAQC(çÖöj]¬ÝZ¢-um 3fÏÆ5iŒµfÎ Å≦îmÔkG0ÒJKͶhÌÌš×dcÊu;ƒ13cßM‚üŒ‰ÍÜ0Ý[‚1«×¬«_ݸµ±®aÅÖ5uëÖ­XÛ(¬ê ^¬îN„ÂÕ1³ÝÜU½&˜ V‘ù‚QQ[Ù¥=I£Ò¨‚]¤Ék µG‚‰î-\‘¹ºÀþFÚ«móWEcíÕí±`kجn ‡ªÛV…"¦­ìüE”9:Gw6„v™­Ž»Êú1Ö|ÆyqeÌ41ë×òP<¸-lÒ‰¾¡H(±H[RÊsô,‹¶šJîÔØ½c›[§…«¢-Áðú`,¤~;“žDGˆ’§|…º¶³©¬·Kg–lloi¶‹­5M%ä· ü¤9.bˆI+vµ˜ÉÐÙ"˜[’FUÏóRŠo;ÃRØñ¬`öFNç”â3#­ŒmL=ƒ šŒ4åPõ%$Ðl¢ÓÉuöÎ * cÝLate+ïr"n꣓uUC›—iظ̀èéJ…›Ç]B\ð kÙΰX5¹P°jØìÃ:ÄÉ)Bˆp(^H˜i%ƒ¹…¯n ZÍükn »‰Ý’É_>N¶§¢‚ Ïœ&3A†32g R4ìÑd«Š Z”8?lçyÒO¤®«‹m'áˆf@çØh¬ÕŒ%sÆžUÊuÅÌ6ë’3iÊ­ Å•¾¹ÛÍ¢Ä%Áp77õš‘DLý^a÷E™9ÍšV\ÑEW ™p¼ vX8)â¬ä4iFf(Må¼aú„}îŽà.ÁÔl?ºFò´,ƒN@6ßÍ 7üwåž3ô½á§ÉEš5ÙF¼îŒ†p JÒ-‹†Ãf‹n1íR^¢¾:ít[½­“BÞY‹ñÔ™dïÁ3‰›©R÷­»­M΄A-µVÔvmê‚ϼ.(SžYìn‘Z¦Q_;¥S™©[ZÌx|Úœ™3ÓK†FR^Ñ9»fpÎUœg ‡sPY‘1O‰ð/ ›}›ëMÑîX k#…ÈãIªRr ÜŠ[ Ü€ ܬFßÁíD¨-Î Æ;¸&-†´Šià{¸OP<ì’Á´1¤MÚ¹ƒt¨†·\Í×ku§¸;5ÙnHXv‘¨!]r1%ûð ‰ Ã0§²Ò„t *‡Ü1½ðT]BØ­¬ÜtáÂ-å†ì”¸!»¤ÇKå2C.—+%‹ã¥Ū2C¾!W*¢or•\Mx´ÖÕ²ZÅm¸…UŒ3W¹¥ªŒqŸ\ÉêlE,rRzüà´…[UÆíºV®3ä[r½!7(GÜ(Wr“|Û›åjCnÁí†Ü*·ò%*ûÜŲ!·ËwYX¹À¤Š2Îu]Ì4y®‚Ó‡Y <'”kïP͆Ü%w't°3²ÝluY9LáÙC¾'÷d˜R‹{23$*Š ¼ƒ0d·\/€!{ä^C¾/÷hrŸ7å†ÜŸÅžkCPáæ™ŸɈ: ù¡\lȃò÷™nÑEñâbÅ`ÈÃ*ÅÆ¹c&{ý>Vi%±¬=f Ù½ƒwbª¼eic›^ÏRĉ^ÒÉw÷w¶`Ö× „OðFŸ3<,ôdn>g?Ü_çy2°Ï|ô—Ÿ˜Þ%õ €Áz¢Xç>"£Nd1ìV“fY72³pLbÊh1s}Á¸½6=£JqŠ®ÒÁÅ´Ï*£É9¡¤ôDuXàU ªëÇ»?›¹²}eÊг¡›§[»Ö‚eN(åóqæ%ÏB=—:‚ñFsWÂú®Áz˱~Œ-)u+Z v{¶©—p,‘|”•¸”ƒÕ{þâî`8žE< ÔrÐ_n¾ÆÛ·¥Cc^¼{[܉բ’z×v„ ç46º˜ð—<[]¿kŒt6SN¶¾oÌÆ;:낊´š»ÔƒÚC“êÕqÖ»›¦[àc¥¡`©ÛÑ|ݽóÛ(~®zvú‚V†7\eŸ £"šzü–¸ª>²ÝL°žP_·k¡°©pÊ6#í‰+Lé€üh¤1I`E™4c…Ò/·]AËin±çع¼™<í±hw׆ڧ0=ëÕ—g3†Nj'"³@#yëYk>nV²0=tziÎH_û»…ò×r3Þ %?~u©'þ\“‡éßv³ÇBä‘‹ Aå ¯Š7ºÝo}m°hüÜ~½ý ÂÇ¡öW„‡sú Èé_&º%î@,yÛÂÝñŽäÅ‘å<ހà MçÙ<ïkéš³®àÇÖ­²0nGRZÕžñA<[1ëQ; hK½&§i13|d³7ØLó]$7$åJ“¦þÙAÈh5㡘ٚz=©ïæ‚ÖÂè´ž¿_‘Ó.Ÿóq*:±€'©ª—£õF†à&kümþñ¹loU}Áõ²ãï¤ášíwùkr9ârÙxÊúám>ß3ÈyÂ⼃­Î˜æâNŽ ›wánöWñ¹})”¬…ìm^YùAh½ðïO ñYL+,ãl"G€íÆ®ß˱‡ý÷ùÇ7<£ÐÜ7hb>Åxú‘×ܽ¹ìiäô!_pÆŒhèÇÈæ² 9€Qå}(à Âðôa´`·¼®F…‚¿Â˜ZoeÀÛ‹±»å±€·°¨ãv£ ã›ë„Æ}r§½8i7N"eÀKâ“{1±Öðõâ\N‚IAUÀ[°°“k|6e)Š­Ðüå¹Èâ=•Lg“iŠÅtªEëñ:¤ðúRt“ŸÄÔ=("õ4RïA~?¦ó(N{,$ªõ)³¾>ÌÈ¡»Æ)Y>gGK;¼åÈ®Õ,JÍ¡¼ª²%TZXÖ‹rE\Þ‹ ÕO¬õü½¨Ü€?i.UÁMjºªÑ[“W”§\Vý æÒ*þRv×ê™"uG¤žYÕxmžì;þâ>,¦.’®®³¾Ó‡ÒKéÖ‘ÍlÜwlfe/N¯ØoEˆŠ§'QÁöÛõb¶ãô Wb#Ó`cm3Æ< ñרŠ_ã"¼KÊ÷° Ÿ£ÇÑ*#`Êx´É)h—btH):åLl—&„evH'¢Ò….¹ËMˆÉ^ÄåQþ~;å9ôÈ˸TÞÄ7äC\)À5ò®“?ãz9†sr˜–*öÅhêåÃp?Û»0à‡=ŒQÖœFÍ {•ºØtw›‚ñt‰c1~DŽÌÎÁ†k½ŒûßUôaŽ ±Ò!Œ¯t0¨F!SE/ÎÜwüƒ²XžÂSýá'æMâ©Íd_ø8ç¼ç¾‘g¦ôMÍ'¡Ð9Íóø×K ô(=SXº-,õ3úð,-Nž¡=ÓÏu†Sá9ÎPôièÔðœ†çÙ Ýñ¦Q³ûc"™áÛ%¹Ïp;°üªs›Ë`q·–x<¿™ð¹à6V¦€¹‹è‹~,¦ï–Ôz*-wÔü‡¼®FŽG|¶˜:%f)ÅXJ¨X–²œBV4[J^ Ï‘²^l×úT{À”€ß œúp…íÃäå¢ÁËÇ÷ü…gÄ9Ü…*Ô+±/#ß’½ZáJNxy½çæ*ú™ŒuìR6+í|*,í&©‘£VäUÀV} 5^ƇbiÌÒ•bY­¼Ð‡5»µùÉ…çyžÇÚæ\µÐ$hêÅ:4¯"iÏù4¥ˆh¹¾pƒm”7ƒ¼ÙãH´ßÌ8¼à‰T ^ÊÈRè”Çx 0ÓK%³°k˜ŸAæg„鵓r7sä~ÆÝ!ÆÙo_ÿŒçðžÇÇœ9Ì`9†Ÿ‹Ž_K_”¼$³ñ²,Á+² ¯J;~);ñšÜ†×å%¼!¯âMyxw§•Ø#){9í%ÊqÇGˆÒÏ2wR»ŸãŒÞ0 /r5{‚—,º5¤ÙËðqÃBH»\ˆ—‰ƒš Öd^pôK¼ÆPΓñ7xY§ñ+òçb–Ü‹7X:y¨ñóx“Yçµ²F园ɯSšü-1ÍÞáï8gËèOÉø{zSe× yµNv½¥a®•`¿aZx¼úà 5Öøm‹èCãd"æQL´ðtLîq:ɛŠeÍc%,3w„…Çä]}sÚêê²Sž}ÆÞÇ~e?š2<‹Ê_¯p媲>lJ¯›0Ý©›j½§ìA^Ãió† uoQ£ÜEûŽ¿Ãø¹pê8Ð~?ÞâžoSÑw/¿å-ýOijw‰g¿ÃÞ¶Kñ/´ÿýžU°üGÒy•^¤}×B±•Œ«‡,ÌZJ¾÷,;–ó–ô;É¢Ÿ½òøxŽb´†f9Ír¶öKêaß2ÿJ|ß‹sð=ijSž8TÞPqhQn§ÈsʃØYQä™Uëµ@Ýë”O~lm.¼ÈI=oÓA`‹2/-ÉõÖìõ'a*oµõ¢}CÓ‘Ms­‡wÅý¨iVÕò„*,ØK¿:&U¦@Äcéå©HbÏ{V5”ky¿†E=ð!Æâ#Þ&³Pÿ==÷ k Oц?âr®]?1Ë>gŽAäù’y{8u cÑaÝ*^®Ž°òHÝ*‡R·Ê!çV¹•g©ò-y‡hÇà·.Ž#¨f€N>Œ©_À{EV43$§øñïøçf®f¯N¹8÷Ѭ·Áœ´;ÙËlçÎdþOü— sNöÃÂù¿]w–aìÌÈûŸÔi‰µ ;{±g<¹Oajaø v<sð[©€Gò¸%.ÇX"œüÐ"ùQ kGOa©XÇg\Ÿp³±ŸÏ>Î>Á¾›â.a¿“ý.ö=¼¸Œ¿Ç³¿œýì¿AÉ#Ù_Éþ›ì¯òäð´;q é¯eéV)^ñåý?PK A‹å>É&org/gradle/cli/ParsedCommandLine.class•Wiwg~FÛÈòÄ‹ê%v“TMc[–å’ñR·Ž›8¶SâÆÆ)-L¬‰¬TÖ(£‘·”.PhÙ¡liÙ7 ’`rX¾Áá;ßøÆŸ œœ˜ç}g$KÖ¸1GçÌÜ÷Î}Ÿ÷Þç.3úǽ?þÀü.‚v˜*òø`Ö!‰‹*¬‚΢ .¶ŠbuŽf¹¸T“¸,.+*žWñBM0#hÄ'ëñ".©øT=^ÂËa¼¢âÕ·}:‚|FÅkt ã³âþ¹0^÷7„ÅçÅÎ/Ô㋸$–__Vñ•0¾A¾V¯ãMaó qù¦¸¼©â[ ͼ1s…#+3¶•É¥©™¼ /ëE;“˜Òóà êf2éœn-CÁÉê§#Î2«çÒÀð¤i¥Ò–žÊ ÙÌÀ“ºU0RãæÒ’žKMfrÆ)yâð(‘ò–Q0r¶£*T>cØ4y¤Zãq ²Œ%sÙH•ŒË¶¥Yéâñ©hªÀ™Ìô¾Mª-°C#™\ÆUЯ08a–~.k ÷Î*Œ›)CxÏð¦‹Kç ë)ñLAtÒ\г³º•kWYçpÎ#„AÍ™ ´¼äÌ FA|»”ÒWÓݳwó/뀽˜)xØÖàÓV5KÔ¶x±  ­:Ô•|)ÜÃö#÷wOP¿cÆÖžcI(ßVñÃ^yØ¢ÈUØ6K¥Þïõ¤ÿbÑ´±\jÂÌú½Óîµ3Tp‘UG(ˆŒí|ÑVÐQ³áH1“M– 7S8–± ´RΊ|{…çY›#Û¶õô·nQ/”ª¬5^kÑKošu·O;=F‚¸m,·RÚÙ¯h¤q3›5$ßbwcÖLOËF¶Ü™mÞÆ ž¶¼ßûLïÐÏn"ªÝöûª9mØG7M”h©z*gJwr‹vè©”DœÕ³Ec úY®ÁeçyíK„?ëa{ÿòÿ?ÂÕœqZ:¯«fy Ó×ÈŒY´ŒcÑöm5ðû…Óã Ý é¸^Xd‹kèÇþšùÞဂ6žŽY–¾"Öð|PÃ[x[Ãwñ= ßÇÄîç1sµ=>4ü?Rñc¶ÂfÖUüDÃOñ3Ýñ8ë*$cÕ/GWý†º*ÀSç.°„5œÂ“~ŽU¾n¶˜ |ɘ†_à—=¦0­a ç4ü WU\Ó0³~ßp´WLöHZÏ–¼:zyÁpyØéøëé*ôÄr¦Kç}j¿Ècü­†ë¸ªážÑð®Ö’[û£v.•”2}Ri›ŒÆ—c9SV´UõPÉPŒIÎir+÷°©9¹¨ã‘´Ž°gËS§¹ Óù´ØQ¥¨Z³yˆœÛ‡ãµàµOBçMkI'Æ GÃ>ýÞ ï=Ÿ7r©‘W=¶~©„Ìœ­gDô­1[¼f(O :º½6y…ÙP=𸟳J8žJe³œÒÇÃü2mç‡sQÑëP0À•ïãš-^^äúЦ5[¼¼þêy?ŒAÊC€2?TjÞH܆’¸ßümøo"@1H1tꆦXG1rõ}kÐL%×°CÁœ¤Ð à¯hœ¾ƒ&Ú4úo!º† ;‚®]LHÒ°e(”ø=¡ŽÀZý˜[]ÿ×êú;7dÃò?‚Æk'W­ü¾o£ÔÎÏñ ùAþØ…ì†=xá5Äð:IáŽCüa£b!ZÀcxœ(DÃÌp1Ž')Å1ÒóaÊïŽæ8¥”÷!°NÎü*’*&TþïÀ=t«hTÑÄÕÐý_éP;É=œ'¼’XœáÙ­/ÚúÚçý F«ÞÆÎ™ù€ë¥bXˆ@Çu #Bw¶vÉp§ú\‡}bÈ9¹Ã»¼‡x?}düÁ©À¨“•¡€àTò}HH.ßÁÝo!’Œîº…ÝsÉèyëV¬ü£«ëOÞÂC×ËIØ/ë¥a$¡qÖa’xA1c¬¾ã¤x‚š)R_J@{ñ& (ü+“}š?Av˜ö3xŠþG¸û f™”«97­ðßCTE§Bºï"¦¢å]t¸Œ”Fœ×.ã'¨ññޜ軅؜ ›t<ìõ2¯i Êâ1éi›³¡ì_3ã%œ‚§ß6ì ;AØ“÷ýžq“÷6ïA-ÁöV4Rg©‘Z¦l G® ¸¶ºþoÿµrNÚ$«gسdyŽE:ú+ŽŽ‘ÉN:$ôËÌ•œèųøxU¡ Í'\ž5øïB%Ç»6 Zç3¾]^ᜈ¢kéô>lšJþ ;ï k>ÚeÞ'*ù6zþ’Eä—Ge¤)ö¤Aù<],;[í¢ÃS;\ô¬Oº†r=l8>Y ŠÃ߀äŠ^ÚÜ9ÙŠÎ ºðNL¯ç‘vczÂÍ­&@S܇¹›Òšg\¬H«VvWc£òŒ .¸ˆ97­{ªXšŘ”ã°—GôoøÛ )ãªÈ‘¶,ÏI8åsöÈQ¦HI 0­›$AbïsŒÖ9ûŠ{ö`_ið–«*^QUt¥ Õ ¢š¹èó‰ñûÏåŒ9%ö<'ì tçE¾B^âKãårÖvs?ê–Ø`ÙÑAé^EAEXP QP –dȹÿPK AyßtÚE,org/gradle/cli/ParsedCommandLineOption.classS]OÔ@=ݯîGeùPa„eQª¨ø"ˆhHV1YƒÁ·awR»í¦íá§ðl⋘¨IÔg”ñN[`Y$ñ¡Ó™Û{Ï=çÜéï?ߘ“4²(ª˜H#‚b ¸ž¦å†ŠÉ$ô4¸™Á-L%q[¾ï¨¸+ßÓr¹§â¾Š [ÌlpWA¶´É¶˜Þð„©—„ëÍ(H•…a1¯áp#-Ÿgƒ³É,C/{ްŒ™9*IÌ Kxs ¢…ñU±E»JÅ%añ—Ú:w^³u“"¹’]aæ*s„<‡Á˜·!ˆI¡d;†n8¬jr½b ýs\^]´k5fU%ÔJݶEí’÷V¥Ý…ñ³”´•=Vy÷‚Õé£ j”;*i=z&xŽÔ «V£Qã–§ §p6K:dÇ)¹ñKn07T@–½U.Û §ÂŸ Évàé“ICzt°]p¶-)kèDNÃ(Æ t]6Mn0“,ñøÒû ÷±(#ÍWmîæ-ÛËo°-žgÖvÞ¿“²Ñ°Š‡f0« ?L'æùZÃôDÝäA¦K©@Ó϶*Õðó$¡Ñÿï)”•õM^!ÛO†îŒ+vï–i¥áÊQ,7_… ”¬ŽÒÀZ~“¾«Â]ªÕ½m\¡(K? LºHï.:EÐ8íÉrZ/PdQÚÙâ>”â!"kûˆ~E쳟}‘Vù_‚*bTÓG;-ÈÇ%ôûø¸bí„XÓÅoˆï¢í‰µœºäÏâÄ"¡Âpú(=@&‚_Ðö¨2êwì%Ž ^*õè$üAêPÀPS÷é°û =1D:¥š!䉩ä¡ÓIfÅ%þÞ±„n‚‰‡05W(v•¾bžRD ×$ÈÄÚ"xÓjÊ2D¬Ï§ìç†xr7‚k> º½!âóV.p£]Á.ÔØG²àÓ±ô€ãDÇ\“Ô8"Ùy Rð‰ŒÿPK A\vÆB| :org/gradle/cli/ProjectPropertiesCommandLineConverter.class’KOÂ@…ÏD|?PâìÀšuã#QŒ+¢$÷C;–1m‡  ÿJW&.üþ(ãª1ØDã,îéœ9ßôv¦oï/¯ö±[@yl汕G)‡ívÙ }FHWkw„LSºœ°Ü!¿]®nY×7ÎZK:Ì¿cJDóØÌ螎ZRy¶§˜ësÛñ…ÝVò;ÚHŸ+-ø )ƒ€…n´kS†#cruLXõøgh|Ó×B†„j­õÀFÌöYèÙ­Dè™èÎè%×LøÜ%”ÖŽñŽ…Ž*‡_‰¨å½?õÖˆ:("‡<Ú„bJÕö ®­ØŠtòfë^*K÷¸Õ ßµ¦ XUÞðV½Œ£Üi01Èk ÂÁp8ƒwZ±ß8T0gî?Pôa¦Î›™m”ŒÎí=ƒžÌC S³s ¦§£‹| Ë1\áôZêq-}CÓ_èJšžEˉèjš™E+ ¨ùw'©õPK A Ï8=|ü9org/gradle/cli/SystemPropertiesCommandLineConverter.class’ËJÃ@†ÏØ«mµ¶ÖjÕEÜ5BPÄ…R/Pé~šÓ‘$&ÓBÞJW‚ À‡'i©AÄYœ3óÏÿÍœ¹¼¼¾Àl— "l¡Y„Íl E Ê<&Ï dÚú@¶ËÇH ÚgÞLÝŠ{:r”Rïs‹:C*X4NĬœ°€ÀQŸ Û´;hZ3a ѽÜG!]îºÔG‹v¹7S"Š5eb o}ɸG ÑÖûtFM‡z¶9‚y¶²¶~X{()spL`7e.°KV, øTXxÉ¢Šõ¿”fDT E¤G ÄPÇWãJm®h~²­Æ49Aíjx­µÑ° ­ÓsÃhöÌ gÔ™¢n8üÇ5©Û] .FÔ’¿s°9õàQˉ΢ⲙ*•sû/@žUg J*æc±e+sƒÊ+1¾ Õî$p¦¾ô´€6¿¡™/t-Í,¢;©h-Í.¢Z ª>kìZÿPK AýØ?¢gradle-cli-classpath.properties+(ÊÏJM.)¶å**Í+ÉÌMµåPK A%gradle-cli-parameter-names.propertiesPK A íAMETA-INF/PK Am±>=@?¤)META-INF/MANIFEST.MFPK AíA›org/PK A íA¿org/gradle/PK AíAêorg/gradle/wrapper/PK A•%Ó¦¹/¤org/gradle/wrapper/BootstrapMainStarter$1.classPK Ai,«$ -¤#org/gradle/wrapper/BootstrapMainStarter.classPK AhQþ}¢Ò#¤org/gradle/wrapper/Download$1.classPK A¥"I;ØA¤p org/gradle/wrapper/Download$DefaultDownloadProgressListener.classPK AѺNì,À4¤ org/gradle/wrapper/Download$ProxyAuthenticator.classPK A$É~ãX !¤ˆorg/gradle/wrapper/Download.classPK AyL¢¡Ê1¤ª!org/gradle/wrapper/DownloadProgressListener.classPK A!9|¶„ 3¤š"org/gradle/wrapper/ExclusiveFileAccessManager.classPK Aì„,y†-¤¡)org/gradle/wrapper/GradleUserHomeLookup.classPK A™c67§ *¤e,org/gradle/wrapper/GradleWrapperMain.classPK AúâæªÛ"¤T6org/gradle/wrapper/IDownload.classPK A9lâV†"¤>7org/gradle/wrapper/Install$1.classPK AØ ’$|-¤Ô?org/gradle/wrapper/Install$InstallCheck.classPK Aävp£.- ¤›Borg/gradle/wrapper/Install.classPK Að¿:öo4¤|Worg/gradle/wrapper/Logger.classPK AJJ¯'ï8¤(Zorg/gradle/wrapper/PathAssembler$LocalDistribution.classPK A´çtx7‘&¤ \org/gradle/wrapper/PathAssembler.classPK A„ÍëÂ| 0¤†corg/gradle/wrapper/SystemPropertiesHandler.classPK Aª=©°?-¤–horg/gradle/wrapper/WrapperConfiguration.classPK AGü¨ (¤‘korg/gradle/wrapper/WrapperExecutor.classPK AÔe‹ #¤ìtgradle-wrapper-classpath.propertiesPK A)¤Lugradle-wrapper-parameter-names.propertiesPK AíA•uorg/gradle/cli/PK AÕÜ?®<S1¤Äuorg/gradle/cli/AbstractCommandLineConverter.classPK A׃µ³Xì ;¤Oxorg/gradle/cli/AbstractPropertiesCommandLineConverter.classPK A}­ÎyGK1¤}org/gradle/cli/CommandLineArgumentException.classPK A³ßâúg)¤–~org/gradle/cli/CommandLineConverter.classPK ASf Õg&¤öorg/gradle/cli/CommandLineOption.classPK Aü튯¥å(¤<†org/gradle/cli/CommandLineParser$1.classPK A$f{K¿ ;¤'‡org/gradle/cli/CommandLineParser$AfterFirstSubCommand.classPK A¥D£¢&3¤ËŠorg/gradle/cli/CommandLineParser$AfterOptions.classPK AŒ‹Müu <¤¾org/gradle/cli/CommandLineParser$BeforeFirstSubCommand.classPK A´*«ZMïF¤’org/gradle/cli/CommandLineParser$CaseInsensitiveStringComparator.classPK A|ìRÎÐ&=¤Å”org/gradle/cli/CommandLineParser$KnownOptionParserState.classPK A$ľ¢¥ô<¤ð›org/gradle/cli/CommandLineParser$MissingOptionArgState.classPK ATK>ªÄ=¤ïžorg/gradle/cli/CommandLineParser$OptionAwareParserState.classPK A˜%àÌ»ª7¤ô¡org/gradle/cli/CommandLineParser$OptionComparator.classPK AäfC˜§£8¤¥org/gradle/cli/CommandLineParser$OptionParserState.classPK A¢Æ÷E«¶3¤§org/gradle/cli/CommandLineParser$OptionString.classPK AgAq²”x=¤ý©org/gradle/cli/CommandLineParser$OptionStringComparator.classPK A`M~U¸2¤ì¬org/gradle/cli/CommandLineParser$ParserState.classPK ApÍX Ýk?¤@¯org/gradle/cli/CommandLineParser$UnknownOptionParserState.classPK A£=l)&¤z²org/gradle/cli/CommandLineParser.classPK A‹å>É&¤ÔÄorg/gradle/cli/ParsedCommandLine.classPK AyßtÚE,¤áÌorg/gradle/cli/ParsedCommandLineOption.classPK A\vÆB| :¤Ðorg/gradle/cli/ProjectPropertiesCommandLineConverter.classPK A Ï8=|ü9¤ÙÑorg/gradle/cli/SystemPropertiesCommandLineConverter.classPK AýØ?¢¤¬Ógradle-cli-classpath.propertiesPK A%¤þÓgradle-cli-parameter-names.propertiesPK66êCÔminiaudio-0.11.22/tests/android/MiniaudioTester/gradle/wrapper/gradle-wrapper.properties000066400000000000000000000003521475701111600314750ustar00rootroot00000000000000#Sat Feb 22 16:36:56 AEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists miniaudio-0.11.22/tests/android/MiniaudioTester/gradlew000066400000000000000000000132061475701111600230770ustar00rootroot00000000000000#!/usr/bin/env sh # # Copyright 2015 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { echo "$*" } die () { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin or MSYS, switch paths to Windows format before running java if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=`expr $i + 1` done case $i in 0) set -- ;; 1) set -- "$args0" ;; 2) set -- "$args0" "$args1" ;; 3) set -- "$args0" "$args1" "$args2" ;; 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Escape application args save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" exec "$JAVACMD" "$@" miniaudio-0.11.22/tests/android/MiniaudioTester/gradlew.bat000066400000000000000000000051621475701111600236460ustar00rootroot00000000000000@rem @rem Copyright 2015 the original author or authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Resolve any "." and ".." in APP_HOME to make it shorter. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega miniaudio-0.11.22/tests/android/MiniaudioTester/settings.gradle.kts000066400000000000000000000010341475701111600253430ustar00rootroot00000000000000pluginManagement { repositories { google { content { includeGroupByRegex("com\\.android.*") includeGroupByRegex("com\\.google.*") includeGroupByRegex("androidx.*") } } mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() } } rootProject.name = "MiniaudioTester" include(":app") miniaudio-0.11.22/tests/common/000077500000000000000000000000001475701111600162705ustar00rootroot00000000000000miniaudio-0.11.22/tests/common/common.c000066400000000000000000000027721475701111600177340ustar00rootroot00000000000000#include "../../miniaudio.c" #include "../../external/fs/fs.c" #include #define MAX_TESTS 64 #define TEST_OUTPUT_DIR "output" typedef int (* ma_test_entry_proc)(int argc, char** argv); typedef struct { const char* pName; ma_test_entry_proc onEntry; } ma_test; static struct { ma_test pTests[MAX_TESTS]; size_t count; } g_Tests; ma_result ma_register_test(const char* pName, ma_test_entry_proc onEntry) { MA_ASSERT(pName != NULL); MA_ASSERT(onEntry != NULL); if (g_Tests.count >= MAX_TESTS) { printf("Failed to register test %s because there are too many tests already registered. Increase the value of MAX_TESTS\n", pName); return MA_INVALID_OPERATION; } g_Tests.pTests[g_Tests.count].pName = pName; g_Tests.pTests[g_Tests.count].onEntry = onEntry; g_Tests.count += 1; return MA_SUCCESS; } int ma_run_tests(int argc, char** argv) { int result; ma_bool32 hasError = MA_FALSE; size_t iTest; fs_mkdir(NULL, TEST_OUTPUT_DIR); for (iTest = 0; iTest < g_Tests.count; iTest += 1) { printf("=== BEGIN %s ===\n", g_Tests.pTests[iTest].pName); result = g_Tests.pTests[iTest].onEntry(argc, argv); printf("=== END %s : %s ===\n", g_Tests.pTests[iTest].pName, (result == 0) ? "PASSED" : "FAILED"); if (result != 0) { hasError = MA_TRUE; } } if (hasError) { return 1; /* Something failed. */ } else { return 0; /* Everything passed. */ } } miniaudio-0.11.22/tests/conversion/000077500000000000000000000000001475701111600171655ustar00rootroot00000000000000miniaudio-0.11.22/tests/conversion/conversion.c000066400000000000000000000265771475701111600215370ustar00rootroot00000000000000 #include "../common/common.c" ma_result init_data_converter(ma_uint32 rateIn, ma_uint32 rateOut, ma_resample_algorithm algorithm, ma_data_converter* pDataConverter) { ma_result result; ma_data_converter_config config; config = ma_data_converter_config_init(ma_format_s16, ma_format_s16, 1, 1, rateIn, rateOut); config.resampling.algorithm = algorithm; result = ma_data_converter_init(&config, NULL, pDataConverter); if (result != MA_SUCCESS) { return result; } return MA_SUCCESS; } #if 0 ma_result test_data_converter__passthrough() { /* Notes: - The isPassthrough flag should be set to true. Both the positive and negative cases need to be tested. - ma_data_converter_set_rate() should fail with MA_INVALID_OPERATION. - The output should be identical to the input. */ printf("Passthrough\n"); return MA_SUCCESS; } #endif ma_result test_data_converter__resampling_expected_output_fixed_interval(ma_data_converter* pDataConverter, ma_uint64 frameCountPerIteration) { ma_result result = MA_SUCCESS; ma_int16 input[4096]; ma_int16 i; MA_ASSERT(frameCountPerIteration < ma_countof(input)); /* Fill the input buffer with sequential numbers so we can get an idea on the state of things. Useful for inspecting the linear backend in particular. */ for (i = 0; i < (ma_int16)ma_countof(input); i += 1) { input[i] = i; } for (i = 0; i < (ma_int16)ma_countof(input); i += (ma_int16)frameCountPerIteration) { ma_int16 output[4096]; ma_uint64 outputFrameCount; ma_uint64 inputFrameCount; ma_uint64 expectedOutputFrameCount; /* We retrieve the required number of input frames for the specified number of output frames, and then compare with what we actually get when reading. */ ma_data_converter_get_expected_output_frame_count(pDataConverter, frameCountPerIteration, &expectedOutputFrameCount); outputFrameCount = ma_countof(output); inputFrameCount = frameCountPerIteration; result = ma_data_converter_process_pcm_frames(pDataConverter, input, &inputFrameCount, output, &outputFrameCount); if (result != MA_SUCCESS) { printf("Failed to process frames."); break; } if (outputFrameCount != expectedOutputFrameCount) { printf("ERROR: Predicted vs actual output count mismatch: predicted=%d, actual=%d\n", (int)expectedOutputFrameCount, (int)outputFrameCount); result = MA_ERROR; } } if (result != MA_SUCCESS) { printf("FAILED\n"); } else { printf("PASSED\n"); } return result; } ma_result test_data_converter__resampling_expected_output_by_algorithm_and_rate_fixed_interval(ma_resample_algorithm algorithm, ma_uint32 rateIn, ma_uint32 rateOut, ma_uint64 frameCountPerIteration) { ma_result result; ma_bool32 hasError = MA_FALSE; ma_data_converter converter; result = init_data_converter(rateIn, rateOut, algorithm, &converter); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_fixed_interval(&converter, frameCountPerIteration); ma_data_converter_uninit(&converter, NULL); if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_expected_output_by_algorithm_fixed_interval(ma_resample_algorithm algorithm, ma_uint64 frameCountPerIteration) { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_data_converter__resampling_expected_output_by_algorithm_and_rate_fixed_interval(algorithm, 44100, 48000, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_by_algorithm_and_rate_fixed_interval(algorithm, 48000, 44100, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_by_algorithm_and_rate_fixed_interval(algorithm, 44100, 192000, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_by_algorithm_and_rate_fixed_interval(algorithm, 192000, 44100, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_expected_output_by_algorithm(ma_resample_algorithm algorithm) { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_data_converter__resampling_expected_output_by_algorithm_fixed_interval(algorithm, 1); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_by_algorithm_fixed_interval(algorithm, 16); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_expected_output_by_algorithm_fixed_interval(algorithm, 127); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_expected_output(void) { ma_result result; ma_bool32 hasError = MA_FALSE; printf("Linear\n"); result = test_data_converter__resampling_expected_output_by_algorithm(ma_resample_algorithm_linear); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_required_input_fixed_interval(ma_data_converter* pDataConverter, ma_uint64 frameCountPerIteration) { ma_result result = MA_SUCCESS; ma_int16 input[4096]; ma_int16 i; MA_ASSERT(frameCountPerIteration < ma_countof(input)); /* Fill the input buffer with sequential numbers so we can get an idea on the state of things. Useful for inspecting the linear backend in particular. */ for (i = 0; i < (ma_int16)ma_countof(input); i += 1) { input[i] = i; } for (i = 0; i < (ma_int16)ma_countof(input); i += (ma_int16)frameCountPerIteration) { ma_int16 output[4096]; ma_uint64 outputFrameCount; ma_uint64 inputFrameCount; ma_uint64 requiredInputFrameCount; /* We retrieve the required number of input frames for the specified number of output frames, and then compare with what we actually get when reading. */ ma_data_converter_get_required_input_frame_count(pDataConverter, frameCountPerIteration, &requiredInputFrameCount); outputFrameCount = frameCountPerIteration; inputFrameCount = ma_countof(input); result = ma_data_converter_process_pcm_frames(pDataConverter, input, &inputFrameCount, output, &outputFrameCount); if (result != MA_SUCCESS) { printf("Failed to process frames."); break; } if (inputFrameCount != requiredInputFrameCount) { printf("ERROR: Predicted vs actual input count mismatch: predicted=%d, actual=%d\n", (int)requiredInputFrameCount, (int)inputFrameCount); result = MA_ERROR; } } if (result != MA_SUCCESS) { printf("FAILED\n"); } else { printf("PASSED\n"); } return result; } ma_result test_data_converter__resampling_required_input_by_algorithm_and_rate_fixed_interval(ma_resample_algorithm algorithm, ma_uint32 rateIn, ma_uint32 rateOut, ma_uint64 frameCountPerIteration) { ma_result result; ma_bool32 hasError = MA_FALSE; ma_data_converter converter; result = init_data_converter(rateIn, rateOut, algorithm, &converter); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_fixed_interval(&converter, frameCountPerIteration); ma_data_converter_uninit(&converter, NULL); if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_required_input_by_algorithm_fixed_interval(ma_resample_algorithm algorithm, ma_uint64 frameCountPerIteration) { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_data_converter__resampling_required_input_by_algorithm_and_rate_fixed_interval(algorithm, 44100, 48000, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_by_algorithm_and_rate_fixed_interval(algorithm, 48000, 44100, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_by_algorithm_and_rate_fixed_interval(algorithm, 44100, 192000, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_by_algorithm_and_rate_fixed_interval(algorithm, 192000, 44100, frameCountPerIteration); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_required_input_by_algorithm(ma_resample_algorithm algorithm) { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_data_converter__resampling_required_input_by_algorithm_fixed_interval(algorithm, 1); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_by_algorithm_fixed_interval(algorithm, 16); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input_by_algorithm_fixed_interval(algorithm, 127); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling_required_input(void) { ma_result result; ma_bool32 hasError = MA_FALSE; printf("Linear\n"); result = test_data_converter__resampling_required_input_by_algorithm(ma_resample_algorithm_linear); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_data_converter__resampling(void) { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_data_converter__resampling_expected_output(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_data_converter__resampling_required_input(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } int test_entry__data_converter(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; (void)argc; (void)argv; #if 0 result = test_data_converter__passthrough(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #endif result = test_data_converter__resampling(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } int main(int argc, char** argv) { ma_register_test("Data Conversion", test_entry__data_converter); return ma_run_tests(argc, argv); } miniaudio-0.11.22/tests/cpp/000077500000000000000000000000001475701111600155625ustar00rootroot00000000000000miniaudio-0.11.22/tests/cpp/cpp.cpp000066400000000000000000000000421475701111600170440ustar00rootroot00000000000000#include "../deviceio/deviceio.c" miniaudio-0.11.22/tests/debugging/000077500000000000000000000000001475701111600167335ustar00rootroot00000000000000miniaudio-0.11.22/tests/debugging/debugging.cpp000066400000000000000000000003421475701111600213710ustar00rootroot00000000000000/* This is just a sandbox for debugging miniaudio. Do not run this as part of some automated testing process. */ #include "../../miniaudio.c" int main(int argc, char** argv) { (void)argc; (void)argv; return 0; } miniaudio-0.11.22/tests/deviceio/000077500000000000000000000000001475701111600165675ustar00rootroot00000000000000miniaudio-0.11.22/tests/deviceio/deviceio.c000066400000000000000000000522621475701111600205310ustar00rootroot00000000000000/* USAGE: ma_test_deviceio [input/output file] [mode] [backend] [waveform] [noise] [--auto] In playback mode the input file is optional, in which case a waveform or noise source will be used instead. For capture and loopback modes it must specify an output parameter, and must be specified. In duplex mode it is optional, but if specified will be an output file that will receive the captured audio. "mode" can be one of the following: playback capture duplex loopback "backend" is one of the miniaudio backends: wasapi dsound or directsound winmm coreaudio sndio audio4 oss pulseaudio or pulse alsa jack aaudio opensl webaudio null "waveform" can be one of the following: sine square triangle sawtooth "noise" can be one of the following: white pink brownian or brown If multiple backends are specified, the priority will be based on the order in which you specify them. If multiple waveform or noise types are specified the last one on the command line will have priority. */ #include "../common/common.c" #ifndef AUTO_CLOSE_TIME_IN_MILLISECONDS #define AUTO_CLOSE_TIME_IN_MILLISECONDS 5000 #endif typedef enum { source_type_waveform, source_type_noise, source_type_decoder } source_type; static struct { ma_context context; ma_device device; source_type sourceType; ma_waveform waveform; ma_noise noise; ma_decoder decoder; ma_encoder encoder; ma_bool32 hasEncoder; /* Used for duplex mode to determine whether or not audio data should be written to a file. */ ma_bool32 wantsToClose; ma_uint64 runTimeInFrames; /* Only used in auto mode. */ } g_State; const char* get_mode_description(ma_device_type deviceType) { if (deviceType == ma_device_type_playback) { return "Playback"; } if (deviceType == ma_device_type_capture) { return "Capture"; } if (deviceType == ma_device_type_duplex) { return "Duplex"; } if (deviceType == ma_device_type_loopback) { return "Loopback"; } /* Should never get here. */ return "Unknown"; } ma_bool32 try_parse_mode(const char* arg, ma_device_type* pDeviceType) { MA_ASSERT(arg != NULL); MA_ASSERT(pDeviceType != NULL); if (strcmp(arg, "playback") == 0) { *pDeviceType = ma_device_type_playback; return MA_TRUE; } if (strcmp(arg, "capture") == 0) { *pDeviceType = ma_device_type_capture; return MA_TRUE; } if (strcmp(arg, "duplex") == 0) { *pDeviceType = ma_device_type_duplex; return MA_TRUE; } if (strcmp(arg, "loopback") == 0) { *pDeviceType = ma_device_type_loopback; return MA_TRUE; } return MA_FALSE; } ma_bool32 try_parse_backend(const char* arg, ma_backend* pBackends, ma_uint32 backendCap, ma_uint32* pBackendCount) { ma_uint32 backendCount; MA_ASSERT(arg != NULL); MA_ASSERT(pBackends != NULL); MA_ASSERT(pBackendCount != NULL); backendCount = *pBackendCount; if (backendCount == backendCap) { return MA_FALSE; /* No more room. */ } if (strcmp(arg, "wasapi") == 0) { pBackends[backendCount++] = ma_backend_wasapi; goto done; } if (strcmp(arg, "dsound") == 0 || strcmp(arg, "directsound") == 0) { pBackends[backendCount++] = ma_backend_dsound; goto done; } if (strcmp(arg, "winmm") == 0) { pBackends[backendCount++] = ma_backend_winmm; goto done; } if (strcmp(arg, "coreaudio") == 0) { pBackends[backendCount++] = ma_backend_coreaudio; goto done; } if (strcmp(arg, "sndio") == 0) { pBackends[backendCount++] = ma_backend_sndio; goto done; } if (strcmp(arg, "audio4") == 0) { pBackends[backendCount++] = ma_backend_audio4; goto done; } if (strcmp(arg, "oss") == 0) { pBackends[backendCount++] = ma_backend_oss; goto done; } if (strcmp(arg, "pulseaudio") == 0 || strcmp(arg, "pulse") == 0) { pBackends[backendCount++] = ma_backend_pulseaudio; goto done; } if (strcmp(arg, "alsa") == 0) { pBackends[backendCount++] = ma_backend_alsa; goto done; } if (strcmp(arg, "jack") == 0) { pBackends[backendCount++] = ma_backend_jack; goto done; } if (strcmp(arg, "aaudio") == 0) { pBackends[backendCount++] = ma_backend_aaudio; goto done; } if (strcmp(arg, "opensl") == 0) { pBackends[backendCount++] = ma_backend_opensl; goto done; } if (strcmp(arg, "webaudio") == 0) { pBackends[backendCount++] = ma_backend_webaudio; goto done; } if (strcmp(arg, "null") == 0) { pBackends[backendCount++] = ma_backend_null; goto done; } done: if (*pBackendCount < backendCount) { *pBackendCount = backendCount; return MA_TRUE; /* This argument was a backend. */ } else { return MA_FALSE; /* This argument was not a backend. */ } } ma_bool32 try_parse_waveform(const char* arg, ma_waveform_type* pWaveformType) { MA_ASSERT(arg != NULL); MA_ASSERT(pWaveformType != NULL); if (strcmp(arg, "sine") == 0) { *pWaveformType = ma_waveform_type_sine; return MA_TRUE; } if (strcmp(arg, "square") == 0) { *pWaveformType = ma_waveform_type_square; return MA_TRUE; } if (strcmp(arg, "triangle") == 0) { *pWaveformType = ma_waveform_type_triangle; return MA_TRUE; } if (strcmp(arg, "sawtooth") == 0) { *pWaveformType = ma_waveform_type_sawtooth; return MA_TRUE; } return MA_FALSE; } ma_bool32 try_parse_noise(const char* arg, ma_noise_type* pNoiseType) { MA_ASSERT(arg != NULL); MA_ASSERT(pNoiseType != NULL); if (strcmp(arg, "white") == 0) { *pNoiseType = ma_noise_type_white; return MA_TRUE; } if (strcmp(arg, "pink") == 0) { *pNoiseType = ma_noise_type_pink; return MA_TRUE; } if (strcmp(arg, "brownian") == 0 || strcmp(arg, "brown") == 0) { *pNoiseType = ma_noise_type_brownian; return MA_TRUE; } return MA_FALSE; } ma_result print_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pDeviceInfo) { ma_result result; ma_device_info detailedDeviceInfo; MA_ASSERT(pDeviceInfo != NULL); #if 1 result = ma_context_get_device_info(pContext, deviceType, &pDeviceInfo->id, &detailedDeviceInfo); if (result != MA_SUCCESS) { return result; } #else detailedDeviceInfo = *pDeviceInfo; #endif { ma_uint32 iFormat; printf("%s\n", pDeviceInfo->name); printf(" Default: %s\n", (detailedDeviceInfo.isDefault) ? "Yes" : "No"); printf(" Format Count: %d\n", detailedDeviceInfo.nativeDataFormatCount); for (iFormat = 0; iFormat < detailedDeviceInfo.nativeDataFormatCount; ++iFormat) { printf(" %s, %d, %d\n", ma_get_format_name(detailedDeviceInfo.nativeDataFormats[iFormat].format), detailedDeviceInfo.nativeDataFormats[iFormat].channels, detailedDeviceInfo.nativeDataFormats[iFormat].sampleRate); } } return MA_SUCCESS; } ma_result enumerate_devices(ma_context* pContext) { ma_result result; ma_device_info* pPlaybackDevices; ma_uint32 playbackDeviceCount; ma_device_info* pCaptureDevices; ma_uint32 captureDeviceCount; ma_uint32 iDevice; MA_ASSERT(pContext != NULL); result = ma_context_get_devices(pContext, &pPlaybackDevices, &playbackDeviceCount, &pCaptureDevices, &captureDeviceCount); if (result != MA_SUCCESS) { return result; } printf("Playback Devices\n"); printf("----------------\n"); for (iDevice = 0; iDevice < playbackDeviceCount; iDevice += 1) { printf("%d: ", iDevice); print_device_info(pContext, ma_device_type_playback, &pPlaybackDevices[iDevice]); } printf("\n"); printf("Capture Devices\n"); printf("---------------\n"); for (iDevice = 0; iDevice < captureDeviceCount; iDevice += 1) { printf("%d: ", iDevice); print_device_info(pContext, ma_device_type_capture, &pCaptureDevices[iDevice]); } printf("\n"); return MA_SUCCESS; } void on_log(void* pUserData, ma_uint32 logLevel, const char* message) { (void)pUserData; printf("%s: %s", ma_log_level_to_string(logLevel), message); } void on_notification(const ma_device_notification* pNotification) { MA_ASSERT(pNotification != NULL); switch (pNotification->type) { case ma_device_notification_type_started: { printf("Started\n"); } break; case ma_device_notification_type_stopped: { printf("Stopped\n"); } break; case ma_device_notification_type_rerouted: { printf("Rerouted\n"); } break; case ma_device_notification_type_interruption_began: { printf("Interruption Began\n"); } break; case ma_device_notification_type_interruption_ended: { printf("Interruption Ended\n"); } break; default: break; } } void on_data(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { g_State.runTimeInFrames += frameCount; if (g_State.runTimeInFrames >= (g_State.device.sampleRate * AUTO_CLOSE_TIME_IN_MILLISECONDS) / 1000) { g_State.wantsToClose = MA_TRUE; } switch (pDevice->type) { case ma_device_type_playback: { /* In the playback case we just read from our input source. We're going to use ma_data_source_read_pcm_frames() for this to ensure the data source abstraction is working properly for each type. */ if (g_State.sourceType == source_type_decoder) { ma_data_source_read_pcm_frames(&g_State.decoder, pFramesOut, frameCount, NULL); } else if (g_State.sourceType == source_type_waveform) { ma_data_source_read_pcm_frames(&g_State.waveform, pFramesOut, frameCount, NULL); } else if (g_State.sourceType == source_type_noise) { ma_data_source_read_pcm_frames(&g_State.noise, pFramesOut, frameCount, NULL); } } break; case ma_device_type_capture: case ma_device_type_loopback: { /* In the capture and loopback cases we just output straight to a file. */ ma_encoder_write_pcm_frames(&g_State.encoder, pFramesIn, frameCount, NULL); } break; case ma_device_type_duplex: { /* The duplex case is easy. We just move from pFramesIn to pFramesOut. */ MA_ASSERT(pDevice->playback.format == pDevice->capture.format); MA_ASSERT(pDevice->playback.channels == pDevice->capture.channels); MA_COPY_MEMORY(pFramesOut, pFramesIn, ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels) * frameCount); /* Also output to the encoder if necessary. */ if (g_State.hasEncoder) { ma_encoder_write_pcm_frames(&g_State.encoder, pFramesIn, frameCount, NULL); } } break; default: { /* Should never hit this. */ MA_ASSERT(MA_FALSE); } break; } } int main(int argc, char** argv) { int iarg; ma_result result; ma_backend enabledBackends[MA_BACKEND_COUNT]; size_t enabledBackendCount; size_t iEnabledBackend; ma_backend backends[MA_BACKEND_COUNT]; ma_uint32 backendCount = 0; ma_context_config contextConfig; ma_device_type deviceType = ma_device_type_playback; ma_format deviceFormat = ma_format_unknown; ma_uint32 deviceChannels = 0; ma_uint32 deviceSampleRate = 0; ma_device_config deviceConfig; ma_waveform_type waveformType = ma_waveform_type_sine; ma_noise_type noiseType = ma_noise_type_white; const char* pFilePath = NULL; /* Input or output file path, depending on the mode. */ ma_bool32 enumerate = MA_TRUE; ma_bool32 interactive = MA_TRUE; /* Default to a sine wave if nothing is passed into the command line. */ waveformType = ma_waveform_type_sine; g_State.sourceType = source_type_waveform; /* We need to iterate over the command line arguments and gather our settings. */ for (iarg = 1; iarg < argc; iarg += 1) { if (strcmp(argv[iarg], "--auto") == 0) { interactive = MA_FALSE; continue; } /* mode */ if (try_parse_mode(argv[iarg], &deviceType)) { continue; } /* backend */ if (try_parse_backend(argv[iarg], backends, ma_countof(backends), &backendCount)) { continue; } /* waveform */ if (try_parse_waveform(argv[iarg], &waveformType)) { g_State.sourceType = source_type_waveform; continue; } /* noise */ if (try_parse_noise(argv[iarg], &noiseType)) { g_State.sourceType = source_type_noise; continue; } /* Getting here means the argument should be considered the input or output file. */ pFilePath = argv[iarg]; g_State.sourceType = source_type_decoder; } /* Here we'll quickly print the available backends. */ printf("Enabled Backends:\n"); result = ma_get_enabled_backends(enabledBackends, ma_countof(enabledBackends), &enabledBackendCount); if (result != MA_SUCCESS) { printf("Failed to retrieve available backends.\n"); return -1; } for (iEnabledBackend = 0; iEnabledBackend < enabledBackendCount; iEnabledBackend += 1) { printf(" %s\n", ma_get_backend_name(enabledBackends[iEnabledBackend])); } printf("\n"); /* Initialize the context first. If no backends were passed into the command line we just use defaults. */ contextConfig = ma_context_config_init(); result = ma_context_init((backendCount == 0) ? NULL : backends, backendCount, &contextConfig, &g_State.context); if (result != MA_SUCCESS) { printf("Failed to initialize context.\n"); return -1; } ma_log_register_callback(ma_context_get_log(&g_State.context), ma_log_callback_init(on_log, NULL)); /* Here we'll print some info about what we're doing. */ printf("Backend: %s\n", ma_get_backend_name(g_State.context.backend)); printf("Mode: %s\n", get_mode_description(deviceType)); printf("\n"); /* Enumerate if required. */ if (enumerate) { enumerate_devices(&g_State.context); } /* Now that the context has been initialized we can do the device. In duplex mode we want to use the same format for both playback and capture so we don't need to do any data conversion between the two. */ if (deviceType == ma_device_type_duplex) { if (deviceFormat == ma_format_unknown) { deviceFormat = ma_format_f32; } if (deviceChannels == 0) { deviceChannels = 0; } if (deviceSampleRate == 0) { deviceSampleRate = 48000; } } deviceConfig = ma_device_config_init(deviceType); deviceConfig.playback.format = deviceFormat; deviceConfig.playback.channels = deviceChannels; deviceConfig.capture.format = deviceFormat; deviceConfig.capture.channels = deviceChannels; deviceConfig.sampleRate = deviceSampleRate; deviceConfig.dataCallback = on_data; deviceConfig.notificationCallback = on_notification; result = ma_device_init(&g_State.context, &deviceConfig, &g_State.device); if (result != MA_SUCCESS) { printf("Failed to initialize device.\n"); ma_context_uninit(&g_State.context); return -1; } /* We can now initialize our input and output sources. */ if (deviceType == ma_device_type_playback) { if (g_State.sourceType == source_type_decoder) { ma_decoder_config decoderConfig; decoderConfig = ma_decoder_config_init(g_State.device.playback.format, g_State.device.playback.channels, g_State.device.sampleRate); result = ma_decoder_init_file(pFilePath, &decoderConfig, &g_State.decoder); if (result != MA_SUCCESS) { printf("Failed to open file for decoding \"%s\".\n", pFilePath); ma_device_uninit(&g_State.device); ma_context_uninit(&g_State.context); return -1; } } if (g_State.sourceType == source_type_waveform) { ma_waveform_config waveformConfig; waveformConfig = ma_waveform_config_init(g_State.device.playback.format, g_State.device.playback.channels, g_State.device.sampleRate, waveformType, 0.1, 220); result = ma_waveform_init(&waveformConfig, &g_State.waveform); if (result != MA_SUCCESS) { printf("Failed to initialize waveform.\n"); ma_device_uninit(&g_State.device); ma_context_uninit(&g_State.context); return -1; } } if (g_State.sourceType == source_type_noise) { ma_noise_config noiseConfig; noiseConfig = ma_noise_config_init(g_State.device.playback.format, g_State.device.playback.channels, noiseType, 0, 0.1); result = ma_noise_init(&noiseConfig, NULL, &g_State.noise); if (result != MA_SUCCESS) { printf("Failed to initialize noise.\n"); ma_device_uninit(&g_State.device); ma_context_uninit(&g_State.context); return -1; } } } if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback || (deviceType == ma_device_type_duplex && pFilePath != NULL && pFilePath[0] != '\0')) { ma_encoder_config encoderConfig; encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, g_State.device.capture.format, g_State.device.capture.channels, g_State.device.sampleRate); result = ma_encoder_init_file(pFilePath, &encoderConfig, &g_State.encoder); if (result != MA_SUCCESS) { printf("Failed to initialize output file for capture \"%s\".\n", pFilePath); ma_device_uninit(&g_State.device); ma_context_uninit(&g_State.context); return -1; } g_State.hasEncoder = MA_TRUE; } /* Print the name of the device. */ if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(&g_State.device, ma_device_type_playback, name, sizeof(name), NULL); printf("Playback Device: %s\n", name); } if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) { char name[MA_MAX_DEVICE_NAME_LENGTH + 1]; ma_device_get_name(&g_State.device, ma_device_type_capture, name, sizeof(name), NULL); printf("Capture Device: %s\n", name); } /* Everything should be initialized at this point so we can now print our configuration and start the device. */ result = ma_device_start(&g_State.device); if (result != MA_SUCCESS) { printf("Failed to start device.\n"); goto done; } /* Now we just keep looping and wait for user input. */ for (;;) { if (interactive) { int c; if (ma_device_is_started(&g_State.device)) { printf("Press Q to quit, P to pause.\n"); } else { printf("Press Q to quit, P to resume.\n"); } for (;;) { c = getchar(); if (c != '\n') { break; } } if (c == 'q' || c == 'Q') { g_State.wantsToClose = MA_TRUE; break; } if (c == 'p' || c == 'P') { if (ma_device_is_started(&g_State.device)) { result = ma_device_stop(&g_State.device); if (result != MA_SUCCESS) { printf("ERROR: Error when stopping the device: %s\n", ma_result_description(result)); } } else { result = ma_device_start(&g_State.device); if (result != MA_SUCCESS) { printf("ERROR: Error when starting the device: %s\n", ma_result_description(result)); } } } } else { /* Running in auto-close mode. Just sleep for a bit. The data callback will control when this loop aborts. */ if (g_State.wantsToClose) { break; } ma_sleep(10); } } done: ma_device_uninit(&g_State.device); ma_context_uninit(&g_State.context); if (g_State.sourceType == source_type_decoder) { ma_decoder_uninit(&g_State.decoder); } if (g_State.sourceType == source_type_waveform) { ma_waveform_uninit(&g_State.waveform); } if (g_State.sourceType == source_type_noise) { ma_noise_uninit(&g_State.noise, NULL); } if (g_State.hasEncoder) { ma_encoder_uninit(&g_State.encoder); } return 0; } miniaudio-0.11.22/tests/emscripten/000077500000000000000000000000001475701111600171515ustar00rootroot00000000000000miniaudio-0.11.22/tests/emscripten/emscripten.c000066400000000000000000000075371475701111600215020ustar00rootroot00000000000000#define MA_DEBUG_OUTPUT #define MA_NO_DECODING #define MA_NO_ENCODING #include "../../miniaudio.c" #include #define DEVICE_FORMAT ma_format_f32 #define DEVICE_CHANNELS 2 #define DEVICE_SAMPLE_RATE 48000 ma_bool32 isRunning = MA_FALSE; ma_device device; ma_waveform sineWave; /* For playback example. */ void main_loop__em() { } void data_callback_playback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { MA_ASSERT(pDevice->playback.channels == DEVICE_CHANNELS); ma_waveform_read_pcm_frames(&sineWave, pOutput, frameCount, NULL); (void)pInput; /* Unused. */ } static void do_playback() { ma_device_config deviceConfig; ma_waveform_config sineWaveConfig; deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS; deviceConfig.sampleRate = DEVICE_SAMPLE_RATE; deviceConfig.dataCallback = data_callback_playback; deviceConfig.pUserData = &sineWave; if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) { printf("Failed to open playback device.\n"); return; } sineWaveConfig = ma_waveform_config_init(device.playback.format, device.playback.channels, device.sampleRate, ma_waveform_type_sine, 0.2, 220); ma_waveform_init(&sineWaveConfig, &sineWave); if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start device."); return; } } void data_callback_duplex(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) { MA_ASSERT(pDevice->capture.format == pDevice->playback.format); MA_ASSERT(pDevice->capture.channels == pDevice->playback.channels); /* In this example the format and channel count are the same for both input and output which means we can just memcpy(). */ MA_COPY_MEMORY(pOutput, pInput, frameCount * ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels)); } static void do_duplex() { ma_result result; ma_device_config deviceConfig; deviceConfig = ma_device_config_init(ma_device_type_duplex); deviceConfig.capture.pDeviceID = NULL; deviceConfig.capture.format = DEVICE_FORMAT; deviceConfig.capture.channels = 2; deviceConfig.capture.shareMode = ma_share_mode_shared; deviceConfig.playback.pDeviceID = NULL; deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = 2; deviceConfig.sampleRate = DEVICE_SAMPLE_RATE; deviceConfig.dataCallback = data_callback_duplex; result = ma_device_init(NULL, &deviceConfig, &device); if (result != MA_SUCCESS) { return; } if (ma_device_start(&device) != MA_SUCCESS) { printf("Failed to start device."); return; } } static EM_BOOL on_canvas_click(int eventType, const EmscriptenMouseEvent* pMouseEvent, void* pUserData) { if (isRunning == MA_FALSE) { if (pMouseEvent->button == 0) { /* Left click. */ do_playback(); } else if (pMouseEvent->button == 2) { /* Right click. */ do_duplex(); } isRunning = MA_TRUE; } else { if (ma_device_get_state(&device) == ma_device_state_started) { ma_device_stop(&device); } else { ma_device_start(&device); } } (void)eventType; (void)pUserData; return EM_FALSE; } int main(int argc, char** argv) { printf("Click inside canvas to start playing:\n"); printf(" Left click for playback\n"); printf(" Right click for duplex\n"); /* The device must be started in response to an input event. */ emscripten_set_mouseup_callback("canvas", &device, 0, on_canvas_click); emscripten_set_main_loop(main_loop__em, 0, 1); (void)argc; (void)argv; return 0; } miniaudio-0.11.22/tests/emscripten/emscripten.html000066400000000000000000000136271475701111600222210ustar00rootroot00000000000000 miniaudio - Emscripten Test
emscripten
Downloading...

Resize canvas Lock/hide mouse pointer    


{{{ SCRIPT }}} miniaudio-0.11.22/tests/filtering/000077500000000000000000000000001475701111600167635ustar00rootroot00000000000000miniaudio-0.11.22/tests/filtering/filtering.c000066400000000000000000000036261475701111600211210ustar00rootroot00000000000000#include "../common/common.c" ma_result filtering_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_decoder* pDecoder, ma_encoder* pEncoder) { ma_result result; ma_decoder_config decoderConfig; ma_encoder_config encoderConfig; decoderConfig = ma_decoder_config_init(format, channels, sampleRate); result = ma_decoder_init_file(pInputFilePath, &decoderConfig, pDecoder); if (result != MA_SUCCESS) { printf("Failed to open \"%s\" for decoding. %s\n", pInputFilePath, ma_result_description(result)); return result; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, pDecoder->outputFormat, pDecoder->outputChannels, pDecoder->outputSampleRate); result = ma_encoder_init_file(pOutputFilePath, &encoderConfig, pEncoder); if (result != MA_SUCCESS) { printf("Failed to open \"%s\" for encoding. %s\n", pOutputFilePath, ma_result_description(result)); ma_decoder_uninit(pDecoder); return result; } return MA_SUCCESS; } #include "filtering_dithering.c" #include "filtering_lpf.c" #include "filtering_hpf.c" #include "filtering_bpf.c" #include "filtering_notch.c" #include "filtering_peak.c" #include "filtering_loshelf.c" #include "filtering_hishelf.c" int main(int argc, char** argv) { ma_register_test("Dithering", test_entry__dithering); ma_register_test("Low-Pass Filtering", test_entry__lpf); ma_register_test("High-Pass Filtering", test_entry__hpf); ma_register_test("Band-Pass Filtering", test_entry__bpf); ma_register_test("Notching Filtering", test_entry__notch); ma_register_test("Peaking EQ Filtering", test_entry__peak); ma_register_test("Low Shelf Filtering", test_entry__loshelf); ma_register_test("High Shelf Filtering", test_entry__hishelf); return ma_run_tests(argc, argv); } miniaudio-0.11.22/tests/filtering/filtering_bpf.c000066400000000000000000000115501475701111600217430ustar00rootroot00000000000000ma_result bpf_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_bpf2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_bpf2_config bpfConfig; ma_bpf2 bpf; printf(" %s\n", pOutputFilePath); result = bpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } bpfConfig = ma_bpf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 0); result = ma_bpf2_init(&bpfConfig, NULL, &bpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_bpf2_process_pcm_frames(&bpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_bpf2__f32(const char* pInputFilePath) { return test_bpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf2_f32.wav", ma_format_f32); } ma_result test_bpf2__s16(const char* pInputFilePath) { return test_bpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf2_s16.wav", ma_format_s16); } ma_result test_bpf4__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_bpf_config bpfConfig; ma_bpf bpf; printf(" %s\n", pOutputFilePath); result = bpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } bpfConfig = ma_bpf_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 4); result = ma_bpf_init(&bpfConfig, NULL, &bpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_bpf_process_pcm_frames(&bpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_bpf4__f32(const char* pInputFilePath) { return test_bpf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf4_f32.wav", ma_format_f32); } ma_result test_bpf4__s16(const char* pInputFilePath) { return test_bpf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf4_s16.wav", ma_format_s16); } int test_entry__bpf(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_bpf2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_bpf2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_bpf4__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_bpf4__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_dithering.c000066400000000000000000000043041475701111600231500ustar00rootroot00000000000000 ma_result test_dithering__u8(const char* pInputFilePath) { const char* pOutputFilePath = TEST_OUTPUT_DIR"/dithering_u8.wav"; ma_result result; ma_decoder_config decoderConfig; ma_decoder decoder; ma_encoder_config encoderConfig; ma_encoder encoder; decoderConfig = ma_decoder_config_init(ma_format_f32, 0, 0); result = ma_decoder_init_file(pInputFilePath, &decoderConfig, &decoder); if (result != MA_SUCCESS) { return result; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, ma_format_u8, decoder.outputChannels, decoder.outputSampleRate); result = ma_encoder_init_file(pOutputFilePath, &encoderConfig, &encoder); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(ma_format_u8, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Convert, with dithering. */ ma_convert_pcm_frames_format(tempOut, ma_format_u8, tempIn, decoder.outputFormat, framesJustRead, decoder.outputChannels, ma_dither_mode_triangle); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } int test_entry__dithering(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_dithering__u8(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_hishelf.c000066400000000000000000000120471475701111600226200ustar00rootroot00000000000000ma_result hishelf_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_hishelf2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_hishelf2_config hishelfConfig; ma_hishelf2 hishelf; printf(" %s\n", pOutputFilePath); result = hishelf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } hishelfConfig = ma_hishelf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 18, 1, 16000); result = ma_hishelf2_init(&hishelfConfig, NULL, &hishelf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_hishelf2_process_pcm_frames(&hishelf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_hishelf2__f32(const char* pInputFilePath) { return test_hishelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf2_f32.wav", ma_format_f32); } ma_result test_hishelf2__s16(const char* pInputFilePath) { return test_hishelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf2_s16.wav", ma_format_s16); } #if 0 ma_result test_hishelf4__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_hishelf_config hishelfConfig; ma_hishelf hishelf; printf(" %s\n", pOutputFilePath); result = hishelf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } hishelfConfig = ma_hishelf_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 4); result = ma_hishelf_init(&hishelfConfig, &hishelf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); framesJustRead = ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead); /* Filter */ ma_hishelf_process_pcm_frames(&hishelf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_hishelf4__f32(const char* pInputFilePath) { return test_hishelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf4_f32.wav", ma_format_f32); } ma_result test_hishelf4__s16(const char* pInputFilePath) { return test_hishelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf4_s16.wav", ma_format_s16); } #endif int test_entry__hishelf(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_hishelf2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hishelf2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #if 0 result = test_hishelf4__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hishelf4__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #endif if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_hpf.c000066400000000000000000000157531475701111600217620ustar00rootroot00000000000000 ma_result hpf_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_hpf1__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_hpf1_config hpfConfig; ma_hpf1 hpf; printf(" %s\n", pOutputFilePath); result = hpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } hpfConfig = ma_hpf1_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000); result = ma_hpf1_init(&hpfConfig, NULL, &hpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_hpf1_process_pcm_frames(&hpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_hpf1__f32(const char* pInputFilePath) { return test_hpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf1_f32.wav", ma_format_f32); } ma_result test_hpf1__s16(const char* pInputFilePath) { return test_hpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf1_s16.wav", ma_format_s16); } ma_result test_hpf2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_hpf2_config hpfConfig; ma_hpf2 hpf; printf(" %s\n", pOutputFilePath); result = hpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } hpfConfig = ma_hpf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 0); result = ma_hpf2_init(&hpfConfig, NULL, &hpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_hpf2_process_pcm_frames(&hpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_hpf2__f32(const char* pInputFilePath) { return test_hpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf2_f32.wav", ma_format_f32); } ma_result test_hpf2__s16(const char* pInputFilePath) { return test_hpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf2_s16.wav", ma_format_s16); } ma_result test_hpf3__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_hpf_config hpfConfig; ma_hpf hpf; printf(" %s\n", pOutputFilePath); result = hpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } hpfConfig = ma_hpf_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 3); result = ma_hpf_init(&hpfConfig, NULL, &hpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_hpf_process_pcm_frames(&hpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_hpf3__f32(const char* pInputFilePath) { return test_hpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf3_f32.wav", ma_format_f32); } ma_result test_hpf3__s16(const char* pInputFilePath) { return test_hpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf3_s16.wav", ma_format_s16); } int test_entry__hpf(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_hpf1__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hpf1__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hpf2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hpf2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hpf3__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_hpf3__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_loshelf.c000066400000000000000000000120441475701111600226270ustar00rootroot00000000000000ma_result loshelf_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_loshelf2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_loshelf2_config loshelfConfig; ma_loshelf2 loshelf; printf(" %s\n", pOutputFilePath); result = loshelf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } loshelfConfig = ma_loshelf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 6, 1, 200); result = ma_loshelf2_init(&loshelfConfig, NULL, &loshelf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_loshelf2_process_pcm_frames(&loshelf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_loshelf2__f32(const char* pInputFilePath) { return test_loshelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf2_f32.wav", ma_format_f32); } ma_result test_loshelf2__s16(const char* pInputFilePath) { return test_loshelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf2_s16.wav", ma_format_s16); } #if 0 ma_result test_loshelf4__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_loshelf_config loshelfConfig; ma_loshelf loshelf; printf(" %s\n", pOutputFilePath); result = loshelf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } loshelfConfig = ma_loshelf_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 4); result = ma_loshelf_init(&loshelfConfig, &loshelf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); framesJustRead = ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead); /* Filter */ ma_loshelf_process_pcm_frames(&loshelf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_loshelf4__f32(const char* pInputFilePath) { return test_loshelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf4_f32.wav", ma_format_f32); } ma_result test_loshelf4__s16(const char* pInputFilePath) { return test_loshelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf4_s16.wav", ma_format_s16); } #endif int test_entry__loshelf(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_loshelf2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_loshelf2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #if 0 result = test_loshelf4__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_loshelf4__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #endif if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_lpf.c000066400000000000000000000157741475701111600217710ustar00rootroot00000000000000 ma_result lpf_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_lpf1__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_lpf1_config lpfConfig; ma_lpf1 lpf; printf(" %s\n", pOutputFilePath); result = lpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } lpfConfig = ma_lpf1_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000); result = ma_lpf1_init(&lpfConfig, NULL, &lpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_lpf1_process_pcm_frames(&lpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_lpf1__f32(const char* pInputFilePath) { return test_lpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf1_f32.wav", ma_format_f32); } ma_result test_lpf1__s16(const char* pInputFilePath) { return test_lpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf1_s16.wav", ma_format_s16); } ma_result test_lpf2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_lpf2_config lpfConfig; ma_lpf2 lpf; printf(" %s\n", pOutputFilePath); result = lpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } lpfConfig = ma_lpf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 0); result = ma_lpf2_init(&lpfConfig, NULL, &lpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_lpf2_process_pcm_frames(&lpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_lpf2__f32(const char* pInputFilePath) { return test_lpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf2_f32.wav", ma_format_f32); } ma_result test_lpf2__s16(const char* pInputFilePath) { return test_lpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf2_s16.wav", ma_format_s16); } ma_result test_lpf3__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_lpf_config lpfConfig; ma_lpf lpf; printf(" %s\n", pOutputFilePath); result = lpf_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } lpfConfig = ma_lpf_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, /*poles*/3); result = ma_lpf_init(&lpfConfig, NULL, &lpf); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_lpf_process_pcm_frames(&lpf, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_lpf3__f32(const char* pInputFilePath) { return test_lpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf3_f32.wav", ma_format_f32); } ma_result test_lpf3__s16(const char* pInputFilePath) { return test_lpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf3_s16.wav", ma_format_s16); } int test_entry__lpf(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_lpf1__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_lpf1__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_lpf2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_lpf2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_lpf3__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_lpf3__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_notch.c000066400000000000000000000117101475701111600223050ustar00rootroot00000000000000ma_result notch_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_notch2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_notch2_config notchConfig; ma_notch2 notch; printf(" %s\n", pOutputFilePath); result = notch_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } notchConfig = ma_notch2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 1, 60); result = ma_notch2_init(¬chConfig, NULL, ¬ch); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_notch2_process_pcm_frames(¬ch, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_notch2__f32(const char* pInputFilePath) { return test_notch2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch2_f32.wav", ma_format_f32); } ma_result test_notch2__s16(const char* pInputFilePath) { return test_notch2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch2_s16.wav", ma_format_s16); } #if 0 ma_result test_notch4__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_notch_config notchConfig; ma_notch notch; printf(" %s\n", pOutputFilePath); result = notch_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } notchConfig = ma_notch_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 4); result = ma_notch_init(¬chConfig, ¬ch); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); framesJustRead = ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead); /* Filter */ ma_notch_process_pcm_frames(¬ch, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_notch4__f32(const char* pInputFilePath) { return test_notch4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch4_f32.wav", ma_format_f32); } ma_result test_notch4__s16(const char* pInputFilePath) { return test_notch4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch4_s16.wav", ma_format_s16); } #endif int test_entry__notch(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_notch2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_notch2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #if 0 result = test_notch4__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_notch4__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #endif if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/filtering/filtering_peak.c000066400000000000000000000116431475701111600221170ustar00rootroot00000000000000ma_result peak_init_decoder_and_encoder(const char* pInputFilePath, const char* pOutputFilePath, ma_format format, ma_decoder* pDecoder, ma_encoder* pEncoder) { return filtering_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, 0, 0, pDecoder, pEncoder); } ma_result test_peak2__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_peak2_config peakConfig; ma_peak2 peak; printf(" %s\n", pOutputFilePath); result = peak_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } peakConfig = ma_peak2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 24, 0, 16000); result = ma_peak2_init(&peakConfig, NULL, &peak); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead, &framesJustRead); /* Filter */ ma_peak2_process_pcm_frames(&peak, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead, NULL); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_peak2__f32(const char* pInputFilePath) { return test_peak2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak2_f32.wav", ma_format_f32); } ma_result test_peak2__s16(const char* pInputFilePath) { return test_peak2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak2_s16.wav", ma_format_s16); } #if 0 ma_result test_peak4__by_format(const char* pInputFilePath, const char* pOutputFilePath, ma_format format) { ma_result result; ma_decoder decoder; ma_encoder encoder; ma_peak_config peakConfig; ma_peak peak; printf(" %s\n", pOutputFilePath); result = peak_init_decoder_and_encoder(pInputFilePath, pOutputFilePath, format, &decoder, &encoder); if (result != MA_SUCCESS) { return result; } peakConfig = ma_peak_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 2000, 4); result = ma_peak_init(&peakConfig, &peak); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return result; } for (;;) { ma_uint8 tempIn[4096]; ma_uint8 tempOut[4096]; ma_uint64 tempCapIn = sizeof(tempIn) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 tempCapOut = sizeof(tempOut) / ma_get_bytes_per_frame(decoder.outputFormat, decoder.outputChannels); ma_uint64 framesToRead; ma_uint64 framesJustRead; framesToRead = ma_min(tempCapIn, tempCapOut); framesJustRead = ma_decoder_read_pcm_frames(&decoder, tempIn, framesToRead); /* Filter */ ma_peak_process_pcm_frames(&peak, tempOut, tempIn, framesJustRead); /* Write to the WAV file. */ ma_encoder_write_pcm_frames(&encoder, tempOut, framesJustRead); if (framesJustRead < framesToRead) { break; } } ma_decoder_uninit(&decoder); ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_peak4__f32(const char* pInputFilePath) { return test_peak4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak4_f32.wav", ma_format_f32); } ma_result test_peak4__s16(const char* pInputFilePath) { return test_peak4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak4_s16.wav", ma_format_s16); } #endif int test_entry__peak(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; const char* pInputFilePath; if (argc < 2) { printf("No input file.\n"); return -1; } pInputFilePath = argv[1]; result = test_peak2__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_peak2__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #if 0 result = test_peak4__f32(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_peak4__s16(pInputFilePath); if (result != MA_SUCCESS) { hasError = MA_TRUE; } #endif if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/generation/000077500000000000000000000000001475701111600171335ustar00rootroot00000000000000miniaudio-0.11.22/tests/generation/generation.c000066400000000000000000000004561475701111600214370ustar00rootroot00000000000000#define MA_NO_DEVICE_IO #include "../common/common.c" #include "generation_noise.c" #include "generation_waveform.c" int main(int argc, char** argv) { ma_register_test("Noise", test_entry__noise); ma_register_test("Waveform", test_entry__waveform); return ma_run_tests(argc, argv); } miniaudio-0.11.22/tests/generation/generation_noise.c000066400000000000000000000074761475701111600226450ustar00rootroot00000000000000 ma_result test_noise__by_format_and_type(ma_format format, ma_noise_type type, const char* pFileName) { ma_result result; ma_noise_config noiseConfig; ma_noise noise; ma_encoder_config encoderConfig; ma_encoder encoder; ma_uint32 iFrame; printf(" %s\n", pFileName); noiseConfig = ma_noise_config_init(format, 1, type, 0, 0.1); result = ma_noise_init(&noiseConfig, NULL, &noise); if (result != MA_SUCCESS) { return result; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, format, noiseConfig.channels, 48000); result = ma_encoder_init_file(pFileName, &encoderConfig, &encoder); if (result != MA_SUCCESS) { printf("Failed to open \"%s\" for writing. %s\n", pFileName, ma_result_description(result)); return result; } /* We'll do a few seconds of data. */ for (iFrame = 0; iFrame < encoder.config.sampleRate * 10; iFrame += 1) { ma_uint8 temp[1024]; ma_noise_read_pcm_frames(&noise, temp, 1, NULL); ma_encoder_write_pcm_frames(&encoder, temp, 1, NULL); } ma_encoder_uninit(&encoder); return MA_SUCCESS; } ma_result test_noise__f32() { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_white, TEST_OUTPUT_DIR"/noise_f32_white.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_pink, TEST_OUTPUT_DIR"/noise_f32_pink.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_brownian, TEST_OUTPUT_DIR"/noise_f32_brownian.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_noise__s16() { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_white, TEST_OUTPUT_DIR"/noise_s16_white.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_pink, TEST_OUTPUT_DIR"/noise_s16_pink.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_brownian, TEST_OUTPUT_DIR"/noise_s16_brownian.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_noise__u8() { ma_result result; ma_bool32 hasError = MA_FALSE; result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_white, TEST_OUTPUT_DIR"/noise_u8_white.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_pink, TEST_OUTPUT_DIR"/noise_u8_pink.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_brownian, TEST_OUTPUT_DIR"/noise_u8_brownian.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } int test_entry__noise(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; (void)argc; (void)argv; result = test_noise__f32(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__s16(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_noise__u8(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } } miniaudio-0.11.22/tests/generation/generation_waveform.c000066400000000000000000000170361475701111600233470ustar00rootroot00000000000000 ma_result test_waveform__by_format_and_type(ma_format format, ma_waveform_type type, double amplitude, const char* pFileName) { ma_result result; ma_waveform_config waveformConfig; ma_waveform waveform; ma_encoder_config encoderConfig; ma_encoder encoder; ma_uint32 iFrame; printf(" %s\n", pFileName); waveformConfig = ma_waveform_config_init(format, 2, 48000, type, amplitude, 220); result = ma_waveform_init(&waveformConfig, &waveform); if (result != MA_SUCCESS) { return result; } encoderConfig = ma_encoder_config_init(ma_encoding_format_wav, waveformConfig.format, waveformConfig.channels, waveformConfig.sampleRate); result = ma_encoder_init_file(pFileName, &encoderConfig, &encoder); if (result != MA_SUCCESS) { return result; /* Failed to initialize encoder. */ } /* We'll do a few seconds of data. */ for (iFrame = 0; iFrame < waveformConfig.sampleRate * 10; iFrame += 1) { float temp[MA_MAX_CHANNELS]; ma_waveform_read_pcm_frames(&waveform, temp, 1, NULL); ma_encoder_write_pcm_frames(&encoder, temp, 1, NULL); } ma_encoder_uninit(&encoder); ma_waveform_uninit(&waveform); return MA_SUCCESS; } ma_result test_waveform__f32() { ma_result result; ma_bool32 hasError = MA_FALSE; double amplitude = 0.2; /* Sine */ result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_sine.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_sine_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Square */ result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_square.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_square_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Triangle */ result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_triangle.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_triangle_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Sawtooth */ result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_sawtooth.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_sawtooth_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_waveform__s16() { ma_result result; ma_bool32 hasError = MA_FALSE; double amplitude = 0.2; /* Sine */ result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_sine.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_sine_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Square */ result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_square.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_square_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Triangle */ result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_triangle.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_triangle_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Sawtooth */ result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_sawtooth.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_sawtooth_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } ma_result test_waveform__u8() { ma_result result; ma_bool32 hasError = MA_FALSE; double amplitude = 0.2; /* Sine */ result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_sine.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_sine_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Square */ result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_square.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_square_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Triangle */ result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_triangle.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_triangle_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } /* Sawtooth */ result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_sawtooth.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_sawtooth_neg.wav"); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return MA_ERROR; } else { return MA_SUCCESS; } } int test_entry__waveform(int argc, char** argv) { ma_result result; ma_bool32 hasError = MA_FALSE; (void)argc; (void)argv; result = test_waveform__f32(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__s16(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } result = test_waveform__u8(); if (result != MA_SUCCESS) { hasError = MA_TRUE; } if (hasError) { return -1; } else { return 0; } }miniaudio-0.11.22/tools/000077500000000000000000000000001475701111600147765ustar00rootroot00000000000000miniaudio-0.11.22/tools/audioconverter/000077500000000000000000000000001475701111600200275ustar00rootroot00000000000000miniaudio-0.11.22/tools/audioconverter/audioconverter.c000066400000000000000000000224431475701111600232310ustar00rootroot00000000000000/* USAGE: audioconverter [input file] [output file] [format] [channels] [rate] EXAMPLES: audioconverter my_file.flac my_file.wav audioconverter my_file.flac my_file.wav f32 44100 linear --linear-order 8 */ #define _CRT_SECURE_NO_WARNINGS /* For stb_vorbis' usage of fopen() instead of fopen_s(). */ #define STB_VORBIS_HEADER_ONLY #include "../../extras/stb_vorbis.c" /* Enables Vorbis decoding. */ #define MA_NO_DEVICE_IO #define MA_NO_THREADING #define MINIAUDIO_IMPLEMENTATION #include "../../miniaudio.h" #include void print_usage() { printf("USAGE: audioconverter [input file] [output file] [format] [channels] [rate]\n"); printf(" [format] is optional and can be one of the following:\n"); printf(" u8 8-bit unsigned integer\n"); printf(" s16 16-bit signed integer\n"); printf(" s24 24-bit signed integer (tightly packed)\n"); printf(" s32 32-bit signed integer\n"); printf(" f32 32-bit floating point\n"); printf(" [channels] is optional and in the range of %d and %d\n", MA_MIN_CHANNELS, MA_MAX_CHANNELS); printf(" [rate] is optional and in the range of %d and %d\n", ma_standard_sample_rate_min, ma_standard_sample_rate_max); printf("\n"); printf("PARAMETERS:\n"); printf(" --linear-order [0..%d]\n", MA_MAX_FILTER_ORDER); } ma_result do_conversion(ma_decoder* pDecoder, ma_encoder* pEncoder) { ma_result result = MA_SUCCESS; MA_ASSERT(pDecoder != NULL); MA_ASSERT(pEncoder != NULL); /* All we do is read from the decoder and then write straight to the encoder. All of the necessary data conversion will happen internally. */ for (;;) { ma_uint8 pRawData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; ma_uint64 framesReadThisIteration; ma_uint64 framesToReadThisIteration; framesToReadThisIteration = sizeof(pRawData) / ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels); result = ma_decoder_read_pcm_frames(pDecoder, pRawData, framesToReadThisIteration, &framesReadThisIteration); if (result != MA_SUCCESS) { break; /* Reached the end, or an error occurred. */ } /* At this point we have the raw data from the decoder. We now just need to write it to the encoder. */ ma_encoder_write_pcm_frames(pEncoder, pRawData, framesReadThisIteration, NULL); /* Get out of the loop if we've reached the end. */ if (framesReadThisIteration < framesToReadThisIteration) { break; } } return result; } ma_bool32 is_number(const char* str) { if (str == NULL || str[0] == '\0') { return MA_FALSE; } while (str[0] != '\0') { if (str[0] < '0' || str[0] > '9') { return MA_FALSE; } str += 1; } return MA_TRUE; } ma_bool32 try_parse_uint32_in_range(const char* str, ma_uint32* pValue, ma_uint32 lo, ma_uint32 hi) { ma_uint32 x; if (!is_number(str)) { return MA_FALSE; /* Not an integer. */ } x = (ma_uint32)atoi(str); if (x < lo || x > hi) { return MA_FALSE; /* Out of range. */ } if (pValue != NULL) { *pValue = x; } return MA_TRUE; } ma_bool32 try_parse_format(const char* str, ma_format* pValue) { ma_format format; /* */ if (strcmp(str, "u8") == 0) { format = ma_format_u8; } else if (strcmp(str, "s16") == 0) { format = ma_format_s16; } else if (strcmp(str, "s24") == 0) { format = ma_format_s24; } else if (strcmp(str, "s32") == 0) { format = ma_format_s32; } else if (strcmp(str, "f32") == 0) { format = ma_format_f32; } else { return MA_FALSE; /* Not a format. */ } if (pValue != NULL) { *pValue = format; } return MA_TRUE; } ma_bool32 try_parse_channels(const char* str, ma_uint32* pValue) { return try_parse_uint32_in_range(str, pValue, MA_MIN_CHANNELS, MA_MAX_CHANNELS); } ma_bool32 try_parse_sample_rate(const char* str, ma_uint32* pValue) { return try_parse_uint32_in_range(str, pValue, ma_standard_sample_rate_min, ma_standard_sample_rate_max); } ma_bool32 try_parse_resample_algorithm(const char* str, ma_resample_algorithm* pValue) { ma_resample_algorithm algorithm; /* */ if (strcmp(str, "linear") == 0) { algorithm = ma_resample_algorithm_linear; } else { return MA_FALSE; /* Not a valid algorithm */ } if (pValue != NULL) { *pValue = algorithm; } return MA_TRUE; } int main(int argc, char** argv) { ma_result result; ma_decoder_config decoderConfig; ma_decoder decoder; ma_encoder_config encoderConfig; ma_encoder encoder; ma_encoding_format outputEncodingFormat; ma_format format = ma_format_unknown; ma_uint32 channels = 0; ma_uint32 rate = 0; ma_resample_algorithm resampleAlgorithm; ma_uint32 linearOrder = 8; int iarg; const char* pOutputFilePath; /* Print help if requested. */ if (argc == 2) { if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { print_usage(); return 0; } } if (argc < 3) { print_usage(); return -1; } resampleAlgorithm = ma_resample_algorithm_linear; /* The fourth and fifth arguments can be a format and/or rate specifier. It doesn't matter which order they are in as we can identify them by whether or not it's a number. If it's a number we assume it's a sample rate, otherwise we assume it's a format specifier. */ for (iarg = 3; iarg < argc; iarg += 1) { if (strcmp(argv[iarg], "--linear-order") == 0) { iarg += 1; if (iarg >= argc) { break; } if (!try_parse_uint32_in_range(argv[iarg], &linearOrder, 0, 8)) { printf("Expecting a number between 0 and %d for --linear-order.\n", MA_MAX_FILTER_ORDER); return -1; } continue; } if (try_parse_resample_algorithm(argv[iarg], &resampleAlgorithm)) { continue; } if (try_parse_format(argv[iarg], &format)) { continue; } if (try_parse_channels(argv[iarg], &channels)) { continue; } if (try_parse_sample_rate(argv[iarg], &rate)) { continue; } /* Getting here means we have an unknown parameter. */ printf("Warning: Unknown parameter \"%s\"", argv[iarg]); } /* Initialize a decoder for the input file. */ decoderConfig = ma_decoder_config_init(format, channels, rate); decoderConfig.resampling.algorithm = resampleAlgorithm; decoderConfig.resampling.linear.lpfOrder = linearOrder; result = ma_decoder_init_file(argv[1], &decoderConfig, &decoder); if (result != MA_SUCCESS) { printf("Failed to open input file. Check the file exists and the format is supported. Supported input formats:\n"); #if defined(ma_dr_opus_h) printf(" Opus\n"); #endif #if defined(ma_dr_mp3_h) printf(" MP3\n"); #endif #if defined(ma_dr_flac_h) printf(" FLAC\n"); #endif #if defined(STB_VORBIS_INCLUDE_STB_VORBIS_H) printf(" Vorbis\n"); #endif #if defined(ma_dr_wav_h) printf(" WAV\n"); #endif return (int)result; } pOutputFilePath = argv[2]; outputEncodingFormat = ma_encoding_format_wav; /* Wave by default in case we don't know the file extension. */ if (ma_path_extension_equal(pOutputFilePath, "wav")) { outputEncodingFormat = ma_encoding_format_wav; } else { printf("Warning: Unknown file extension \"%s\". Encoding as WAV.\n", ma_path_extension(pOutputFilePath)); } /* Initialize the encoder for the output file. */ encoderConfig = ma_encoder_config_init(outputEncodingFormat, decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate); result = ma_encoder_init_file(pOutputFilePath, &encoderConfig, &encoder); if (result != MA_SUCCESS) { ma_decoder_uninit(&decoder); printf("Failed to open output file. Check that the directory exists and that the file is not already opened by another process. %s", ma_result_description(result)); return -1; } /* We have our decoder and encoder ready, so now we can do the conversion. */ result = do_conversion(&decoder, &encoder); /* Done. */ ma_encoder_uninit(&encoder); ma_decoder_uninit(&decoder); return (int)result; } /* stb_vorbis implementation must come after the implementation of miniaudio. */ #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(push) #pragma warning(disable:4100) /* unreferenced formal parameter */ #pragma warning(disable:4244) /* '=': conversion from '' to '', possible loss of data */ #pragma warning(disable:4245) /* '=': conversion from '' to '', signed/unsigned mismatch */ #pragma warning(disable:4456) /* declaration of '' hides previous local declaration */ #pragma warning(disable:4457) /* declaration of '' hides function parameter */ #pragma warning(disable:4701) /* potentially uninitialized local variable '' used */ #else #endif #undef STB_VORBIS_HEADER_ONLY #include "../../extras/stb_vorbis.c" #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #else #endif