<commit_before>/* Swfdec
 * Copyright (C) 2006 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <alsa/asoundlib.h>
#include "swfdec_playback.h"

/* Why ALSA sucks for beginners:
 * - snd_pcm_delay is not sample-exact, but period-exact most of the time.
 *   Yay for getting told the time every 512 samples when a human notices
 *   a delay of 100 samples (oooops)
 * - lots of functions are simply not implemented. So the super-smart idea
 *   of using snd_pcm_rewind to avoid XRUNS and still get low latency has
 *   some issues when dmix just returns -EIO all of the time. That wouldn't
 *   be so bad if there was actually a way to query if it's supported.
 * - But to make up for all this, you have 10 hardware parameters, 10 
 *   software parameters and 10 configuration parameters. All of this is
 *   naturally supported on 10 driver APIs depending on kernel. So if your
 *   sound card seems to do weird stuff, that is not my fault.
 * Welcome to Linux sound in the 21st century.
 */
<commit_msg>add workaround for broken ALSA headers<commit_after>/* Swfdec
 * Copyright (C) 2006 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

/* HACK: ALSA headers don't compile with C99 otherwise */
#define __need_timespec 1

#include <alsa/asoundlib.h>
#include "swfdec_playback.h"

/* Why ALSA sucks for beginners:
 * - snd_pcm_delay is not sample-exact, but period-exact most of the time.
 *   Yay for getting told the time every 512 samples when a human notices
 *   a delay of 100 samples (oooops)
 * - lots of functions are simply not implemented. So the super-smart idea
 *   of using snd_pcm_rewind to avoid XRUNS and still get low latency has
 *   some issues when dmix just returns -EIO all of the time. That wouldn't
 *   be so bad if there was actually a way to query if it's supported.
 * - But to make up for all this, you have 10 hardware parameters, 10 
 *   software parameters and 10 configuration parameters. All of this is
 *   naturally supported on 10 driver APIs depending on kernel. So if your
 *   sound card seems to do weird stuff, that is not my fault.
 * Welcome to Linux sound in the 21st century.
 */

{'fraction_non_alphanumeric': 0.06002172732210755, 'fraction_numerical': 0.018739815317762087, 'mean_word_length': 3.5808457711442787, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5984251', 'n_tokens_mistral': 1059, 'n_tokens_neox': 972, 'n_words': 558}